diff --git a/package.json b/package.json index fc14cf87..c97b0009 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fuse/starter", - "version": "13.2.0", + "version": "13.3.0", "description": "Fuse - Angular Admin Template and Starter Project", "author": "https://themeforest.net/user/srcn", "license": "https://themeforest.net/licenses/standard", @@ -13,17 +13,17 @@ "lint": "ng lint" }, "dependencies": { - "@angular/animations": "12.1.1", - "@angular/cdk": "12.1.1", - "@angular/common": "12.1.1", - "@angular/compiler": "12.1.1", - "@angular/core": "12.1.1", - "@angular/forms": "12.1.1", - "@angular/material": "12.1.1", - "@angular/material-moment-adapter": "12.1.1", - "@angular/platform-browser": "12.1.1", - "@angular/platform-browser-dynamic": "12.1.1", - "@angular/router": "12.1.1", + "@angular/animations": "12.1.2", + "@angular/cdk": "12.1.2", + "@angular/common": "12.1.2", + "@angular/compiler": "12.1.2", + "@angular/core": "12.1.2", + "@angular/forms": "12.1.2", + "@angular/material": "12.1.2", + "@angular/material-moment-adapter": "12.1.2", + "@angular/platform-browser": "12.1.2", + "@angular/platform-browser-dynamic": "12.1.2", + "@angular/router": "12.1.2", "@fullcalendar/angular": "4.4.5-beta", "@fullcalendar/core": "4.4.2", "@fullcalendar/daygrid": "4.4.2", @@ -32,15 +32,15 @@ "@fullcalendar/moment": "4.4.2", "@fullcalendar/rrule": "4.4.2", "@fullcalendar/timegrid": "4.4.2", - "@ngneat/transloco": "2.21.0", - "apexcharts": "3.27.1", + "@ngneat/transloco": "2.22.0", + "apexcharts": "3.27.2", "crypto-js": "3.3.0", - "highlight.js": "11.0.1", + "highlight.js": "11.1.0", "lodash-es": "4.17.21", "moment": "2.29.1", "ng-apexcharts": "1.5.12", "ngx-markdown": "12.0.1", - "ngx-quill": "14.1.1", + "ngx-quill": "14.1.2", "perfect-scrollbar": "1.5.1", "quill": "1.3.7", "rrule": "2.6.8", @@ -50,38 +50,38 @@ "zone.js": "0.11.4" }, "devDependencies": { - "@angular-devkit/build-angular": "12.1.0", - "@angular-eslint/builder": "12.2.0", - "@angular-eslint/eslint-plugin": "12.2.0", - "@angular-eslint/eslint-plugin-template": "12.2.0", - "@angular-eslint/schematics": "12.2.0", - "@angular-eslint/template-parser": "12.2.0", - "@angular/cli": "12.1.0", - "@angular/compiler-cli": "12.1.1", + "@angular-devkit/build-angular": "12.1.2", + "@angular-eslint/builder": "12.3.1", + "@angular-eslint/eslint-plugin": "12.3.1", + "@angular-eslint/eslint-plugin-template": "12.3.1", + "@angular-eslint/schematics": "12.3.1", + "@angular-eslint/template-parser": "12.3.1", + "@angular/cli": "12.1.2", + "@angular/compiler-cli": "12.1.2", "@tailwindcss/aspect-ratio": "0.2.1", "@tailwindcss/line-clamp": "0.2.1", "@tailwindcss/typography": "0.4.1", "@types/chroma-js": "2.1.3", "@types/crypto-js": "3.1.47", "@types/highlight.js": "10.1.0", - "@types/jasmine": "3.6.11", - "@types/lodash": "4.14.170", + "@types/jasmine": "3.8.1", + "@types/lodash": "4.14.171", "@types/lodash-es": "4.17.4", - "@types/node": "12.20.15", - "@typescript-eslint/eslint-plugin": "4.28.1", - "@typescript-eslint/parser": "4.28.1", - "autoprefixer": "10.2.6", + "@types/node": "12.20.16", + "@typescript-eslint/eslint-plugin": "4.28.3", + "@typescript-eslint/parser": "4.28.3", + "autoprefixer": "10.3.1", "chroma-js": "2.1.2", - "eslint": "7.29.0", + "eslint": "7.30.0", "eslint-plugin-import": "2.23.4", - "eslint-plugin-jsdoc": "35.4.1", + "eslint-plugin-jsdoc": "35.4.3", "eslint-plugin-prefer-arrow": "1.2.3", - "jasmine-core": "3.7.1", + "jasmine-core": "3.8.0", "karma": "6.3.4", "karma-chrome-launcher": "3.1.0", "karma-coverage": "2.0.3", "karma-jasmine": "4.0.1", - "karma-jasmine-html-reporter": "1.6.0", + "karma-jasmine-html-reporter": "1.7.0", "lodash": "4.17.21", "postcss": "8.3.5", "tailwindcss": "2.2.4", diff --git a/src/@fuse/fuse.module.ts b/src/@fuse/fuse.module.ts index 3bd69876..455f1807 100644 --- a/src/@fuse/fuse.module.ts +++ b/src/@fuse/fuse.module.ts @@ -1,5 +1,6 @@ import { NgModule, Optional, SkipSelf } from '@angular/core'; import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field'; +import { FuseConfirmationModule } from '@fuse/services/confirmation'; import { FuseMediaWatcherModule } from '@fuse/services/media-watcher/media-watcher.module'; import { FuseSplashScreenModule } from '@fuse/services/splash-screen/splash-screen.module'; import { FuseTailwindConfigModule } from '@fuse/services/tailwind/tailwind.module'; @@ -7,6 +8,7 @@ import { FuseUtilsModule } from '@fuse/services/utils/utils.module'; @NgModule({ imports : [ + FuseConfirmationModule, FuseMediaWatcherModule, FuseSplashScreenModule, FuseTailwindConfigModule, diff --git a/src/@fuse/services/confirmation/confirmation.module.ts b/src/@fuse/services/confirmation/confirmation.module.ts new file mode 100644 index 00000000..2ebbef45 --- /dev/null +++ b/src/@fuse/services/confirmation/confirmation.module.ts @@ -0,0 +1,31 @@ +import { NgModule } from '@angular/core'; +import { MatButtonModule } from '@angular/material/button'; +import { MatDialogModule } from '@angular/material/dialog'; +import { MatIconModule } from '@angular/material/icon'; +import { FuseConfirmationService } from '@fuse/services/confirmation/confirmation.service'; +import { FuseConfirmationDialogComponent } from '@fuse/services/confirmation/dialog/dialog.component'; +import { CommonModule } from '@angular/common'; + +@NgModule({ + declarations: [ + FuseConfirmationDialogComponent + ], + imports: [ + MatButtonModule, + MatDialogModule, + MatIconModule, + CommonModule + ], + providers : [ + FuseConfirmationService + ] +}) +export class FuseConfirmationModule +{ + /** + * Constructor + */ + constructor(private _fuseConfirmationService: FuseConfirmationService) + { + } +} diff --git a/src/@fuse/services/confirmation/confirmation.service.ts b/src/@fuse/services/confirmation/confirmation.service.ts new file mode 100644 index 00000000..10fe2e9a --- /dev/null +++ b/src/@fuse/services/confirmation/confirmation.service.ts @@ -0,0 +1,57 @@ +import { Injectable } from '@angular/core'; +import { MatDialog, MatDialogRef } from '@angular/material/dialog'; +import { merge } from 'lodash-es'; +import { FuseConfirmationDialogComponent } from '@fuse/services/confirmation/dialog/dialog.component'; +import { FuseConfirmationConfig } from '@fuse/services/confirmation/confirmation.types'; + +@Injectable() +export class FuseConfirmationService +{ + private _defaultConfig: FuseConfirmationConfig = { + title : 'Confirm action', + message : 'Are you sure you want to confirm this action?', + icon : { + show : true, + name : 'heroicons_outline:exclamation', + color: 'warn' + }, + actions : { + confirm: { + show : true, + label: 'Confirm', + color: 'warn' + }, + cancel : { + show : true, + label: 'Cancel' + } + }, + dismissible: false + }; + + /** + * Constructor + */ + constructor( + private _matDialog: MatDialog + ) + { + } + + // ----------------------------------------------------------------------------------------------------- + // @ Public methods + // ----------------------------------------------------------------------------------------------------- + + open(config: FuseConfirmationConfig = {}): MatDialogRef + { + // Merge the user config with the default config + const userConfig = merge({}, this._defaultConfig, config); + + // Open the dialog + return this._matDialog.open(FuseConfirmationDialogComponent, { + autoFocus : false, + disableClose: !userConfig.dismissible, + data : userConfig + }); + } +} diff --git a/src/@fuse/services/confirmation/confirmation.types.ts b/src/@fuse/services/confirmation/confirmation.types.ts new file mode 100644 index 00000000..53bd2dc5 --- /dev/null +++ b/src/@fuse/services/confirmation/confirmation.types.ts @@ -0,0 +1,22 @@ +export interface FuseConfirmationConfig +{ + title?: string; + message?: string; + icon?: { + show?: boolean; + name?: string; + color?: 'primary' | 'accent' | 'warn' | 'basic' | 'info' | 'success' | 'warning' | 'error'; + }; + actions?: { + confirm?: { + show?: boolean; + label?: string; + color?: 'primary' | 'accent' | 'warn'; + }; + cancel?: { + show?: boolean; + label?: string; + }; + }; + dismissible?: boolean; +} diff --git a/src/@fuse/services/confirmation/dialog/dialog.component.html b/src/@fuse/services/confirmation/dialog/dialog.component.html new file mode 100644 index 00000000..af0fee6d --- /dev/null +++ b/src/@fuse/services/confirmation/dialog/dialog.component.html @@ -0,0 +1,85 @@ +
+ + + +
+ +
+
+ + +
+ + + +
+ +
+
+ + +
+ + + +
+
+ + + +
+
+
+
+ +
+ + + +
+ + + + + + + + + + + +
+
+ +
diff --git a/src/@fuse/services/confirmation/dialog/dialog.component.ts b/src/@fuse/services/confirmation/dialog/dialog.component.ts new file mode 100644 index 00000000..52d718c3 --- /dev/null +++ b/src/@fuse/services/confirmation/dialog/dialog.component.ts @@ -0,0 +1,38 @@ +import { Component, Inject, OnInit, ViewEncapsulation } from '@angular/core'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { FuseConfirmationConfig } from '@fuse/services/confirmation/confirmation.types'; + +@Component({ + selector : 'fuse-confirmation-dialog', + templateUrl : './dialog.component.html', + encapsulation: ViewEncapsulation.None +}) +export class FuseConfirmationDialogComponent implements OnInit +{ + /** + * Constructor + */ + constructor( + @Inject(MAT_DIALOG_DATA) public data: FuseConfirmationConfig, + public matDialogRef: MatDialogRef + ) + { + } + + // ----------------------------------------------------------------------------------------------------- + // @ Lifecycle hooks + // ----------------------------------------------------------------------------------------------------- + + /** + * On init + */ + ngOnInit(): void + { + + } + + // ----------------------------------------------------------------------------------------------------- + // @ Public methods + // ----------------------------------------------------------------------------------------------------- + +} diff --git a/src/@fuse/services/confirmation/index.ts b/src/@fuse/services/confirmation/index.ts new file mode 100644 index 00000000..f6f2fee1 --- /dev/null +++ b/src/@fuse/services/confirmation/index.ts @@ -0,0 +1 @@ +export * from '@fuse/services/confirmation/public-api'; diff --git a/src/@fuse/services/confirmation/public-api.ts b/src/@fuse/services/confirmation/public-api.ts new file mode 100644 index 00000000..815db9fd --- /dev/null +++ b/src/@fuse/services/confirmation/public-api.ts @@ -0,0 +1,3 @@ +export * from '@fuse/services/confirmation/confirmation.module'; +export * from '@fuse/services/confirmation/confirmation.service'; +export * from '@fuse/services/confirmation/confirmation.types'; diff --git a/src/@fuse/version/fuse-version.ts b/src/@fuse/version/fuse-version.ts index 43095ce0..757bd8e4 100644 --- a/src/@fuse/version/fuse-version.ts +++ b/src/@fuse/version/fuse-version.ts @@ -1,3 +1,3 @@ import { Version } from '@fuse/version/version'; -export const FUSE_VERSION = new Version('13.2.0').full; +export const FUSE_VERSION = new Version('13.3.0').full; diff --git a/tailwind.config.js b/tailwind.config.js index 60201bb7..e11d245b 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -290,7 +290,11 @@ const config = { }, 'tbody tr' : { borderBottomColor: 'var(--fuse-border)' - } + }, + 'ol[type="A" s]' : false, + 'ol[type="a" s]' : false, + 'ol[type="I" s]' : false, + 'ol[type="i" s]' : false } }, sm : {