@sd-angular/core 1.1.61 → 1.1.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,9 @@
1
+ @import './color.scss';
2
+
1
3
  .font-weight-medium {
2
4
  font-weight: 500;
3
5
  }
4
6
 
5
7
  .text-grey {
6
- color: rgba(0, 0, 0, 0.38);
8
+ color: $black400;
7
9
  }
@@ -14,7 +14,7 @@
14
14
  SdHeaderTitleComponent.decorators = [
15
15
  { type: core.Component, args: [{
16
16
  selector: 'sd-header-title',
17
- template: "<div class=\"d-flex\">\r\n <div *ngIf=\"icon\" class=\"flex-shrink-1 c-header-icon\">\r\n <mat-icon style=\"color: #757575;\"\r\n class=\"material-symbols-outlined\">{{icon}}</mat-icon>\r\n </div>\r\n <div class=\"d-flex flex-column w-100 overflow-hidden\">\r\n <div class=\"d-flex\">\r\n <span class=\"T16M\">{{title}}</span>\r\n <ng-container *ngIf=\"tooltip\">\r\n <mat-icon\r\n [matTooltip]=\"tooltip\"\r\n class=\"material-icons-outlined c-header-icon-tooltip\"> info </mat-icon>\r\n </ng-container>\r\n </div>\r\n <span *ngIf=\"description\" class=\"c-header-description\">{{description}}</span>\r\n </div>\r\n <div class=\"flex-shrink-1\">\r\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\r\n </div>\r\n</div>\r\n",
17
+ template: "<div class=\"d-flex\">\r\n <div *ngIf=\"icon\" class=\"flex-shrink-1 c-header-icon\">\r\n <mat-icon class=\"material-symbols-outlined text-grey\">{{icon}}</mat-icon>\r\n </div>\r\n <div class=\"d-flex flex-column w-100 overflow-hidden\">\r\n <div class=\"d-flex\">\r\n <span class=\"T16M\">{{title}}</span>\r\n <ng-container *ngIf=\"tooltip\">\r\n <mat-icon\r\n [matTooltip]=\"tooltip\"\r\n class=\"material-icons-outlined c-header-icon-tooltip\"> info </mat-icon>\r\n </ng-container>\r\n </div>\r\n <span *ngIf=\"description\" class=\"c-header-description\">{{description}}</span>\r\n </div>\r\n <div class=\"flex-shrink-1\">\r\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\r\n </div>\r\n</div>\r\n",
18
18
  styles: [".c-header-icon{align-items:center;display:flex;height:28px;margin-right:8px;width:28px}.c-header-icon-tooltip{align-items:center;color:#757575;display:flex;font-size:20px;height:28px!important;margin-left:10px}.c-header-description{font-size:14px;line-height:20px}"]
19
19
  },] }
20
20
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"sd-angular-core-header-title.umd.js","sources":["../../../../projects/sd-core/header-title/src/lib/header-title.component.ts","../../../../projects/sd-core/header-title/src/lib/header-title.module.ts","../../../../projects/sd-core/header-title/sd-angular-core-header-title.ts"],"sourcesContent":["import { Component, OnInit, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-header-title',\r\n templateUrl: './header-title.component.html',\r\n styleUrls: ['./header-title.component.scss']\r\n})\r\nexport class SdHeaderTitleComponent implements OnInit {\r\n\r\n @Input() title: string;\r\n @Input() icon: string;\r\n @Input() description: string;\r\n @Input() tooltip: string;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { SdHeaderTitleComponent } from './header-title.component';\r\nimport {MatTooltipModule} from '@angular/material/tooltip';\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatIconModule,\r\n MatTooltipModule\r\n ],\r\n declarations: [SdHeaderTitleComponent],\r\n exports: [SdHeaderTitleComponent]\r\n})\r\nexport class SdHeaderTitleModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {SdHeaderTitleComponent as ɵa} from './src/lib/header-title.component';"],"names":["Component","Input","NgModule","CommonModule","MatIconModule","MatTooltipModule"],"mappings":";;;;;;;QAcE;SAAiB;QAEjB,yCAAQ,GAAR;SACC;;;;gBAfFA,cAAS,SAAC;oBACT,QAAQ,EAAE,iBAAiB;oBAC3B,syBAA4C;;iBAE7C;;;;wBAGEC,UAAK;uBACLA,UAAK;8BACLA,UAAK;0BACLA,UAAK;;;;QCER;;;;;gBATCC,aAAQ,SAAC;oBACR,OAAO,EAAE;wBACPC,mBAAY;wBACZC,kBAAa;wBACbC,wBAAgB;qBACjB;oBACD,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;iBAClC;;;ICbD;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"sd-angular-core-header-title.umd.js","sources":["../../../../projects/sd-core/header-title/src/lib/header-title.component.ts","../../../../projects/sd-core/header-title/src/lib/header-title.module.ts","../../../../projects/sd-core/header-title/sd-angular-core-header-title.ts"],"sourcesContent":["import { Component, OnInit, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-header-title',\r\n templateUrl: './header-title.component.html',\r\n styleUrls: ['./header-title.component.scss']\r\n})\r\nexport class SdHeaderTitleComponent implements OnInit {\r\n\r\n @Input() title: string;\r\n @Input() icon: string;\r\n @Input() description: string;\r\n @Input() tooltip: string;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { SdHeaderTitleComponent } from './header-title.component';\r\nimport {MatTooltipModule} from '@angular/material/tooltip';\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatIconModule,\r\n MatTooltipModule\r\n ],\r\n declarations: [SdHeaderTitleComponent],\r\n exports: [SdHeaderTitleComponent]\r\n})\r\nexport class SdHeaderTitleModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {SdHeaderTitleComponent as ɵa} from './src/lib/header-title.component';"],"names":["Component","Input","NgModule","CommonModule","MatIconModule","MatTooltipModule"],"mappings":";;;;;;;QAcE;SAAiB;QAEjB,yCAAQ,GAAR;SACC;;;;gBAfFA,cAAS,SAAC;oBACT,QAAQ,EAAE,iBAAiB;oBAC3B,6wBAA4C;;iBAE7C;;;;wBAGEC,UAAK;uBACLA,UAAK;8BACLA,UAAK;0BACLA,UAAK;;;;QCER;;;;;gBATCC,aAAQ,SAAC;oBACR,OAAO,EAAE;wBACPC,mBAAY;wBACZC,kBAAa;wBACbC,wBAAgB;qBACjB;oBACD,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;iBAClC;;;ICbD;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core"),require("@angular/common"),require("@angular/material/icon"),require("@angular/material/tooltip")):"function"==typeof define&&define.amd?define("@sd-angular/core/header-title",["exports","@angular/core","@angular/common","@angular/material/icon","@angular/material/tooltip"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self)["sd-angular"]=e["sd-angular"]||{},e["sd-angular"].core=e["sd-angular"].core||{},e["sd-angular"].core["header-title"]={}),e.ng.core,e.ng.common,e.ng.material.icon,e.ng.material.tooltip)}(this,(function(e,n,t,o,r){"use strict";var i=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();i.decorators=[{type:n.Component,args:[{selector:"sd-header-title",template:'<div class="d-flex">\r\n <div *ngIf="icon" class="flex-shrink-1 c-header-icon">\r\n <mat-icon style="color: #757575;"\r\n class="material-symbols-outlined">{{icon}}</mat-icon>\r\n </div>\r\n <div class="d-flex flex-column w-100 overflow-hidden">\r\n <div class="d-flex">\r\n <span class="T16M">{{title}}</span>\r\n <ng-container *ngIf="tooltip">\r\n <mat-icon\r\n [matTooltip]="tooltip"\r\n class="material-icons-outlined c-header-icon-tooltip"> info </mat-icon>\r\n </ng-container>\r\n </div>\r\n <span *ngIf="description" class="c-header-description">{{description}}</span>\r\n </div>\r\n <div class="flex-shrink-1">\r\n <ng-content select="[sdHeaderRight]"></ng-content>\r\n </div>\r\n</div>\r\n',styles:[".c-header-icon{align-items:center;display:flex;height:28px;margin-right:8px;width:28px}.c-header-icon-tooltip{align-items:center;color:#757575;display:flex;font-size:20px;height:28px!important;margin-left:10px}.c-header-description{font-size:14px;line-height:20px}"]}]}],i.ctorParameters=function(){return[]},i.propDecorators={title:[{type:n.Input}],icon:[{type:n.Input}],description:[{type:n.Input}],tooltip:[{type:n.Input}]};var a=function(){};a.decorators=[{type:n.NgModule,args:[{imports:[t.CommonModule,o.MatIconModule,r.MatTooltipModule],declarations:[i],exports:[i]}]}],e.SdHeaderTitleModule=a,e.ɵa=i,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core"),require("@angular/common"),require("@angular/material/icon"),require("@angular/material/tooltip")):"function"==typeof define&&define.amd?define("@sd-angular/core/header-title",["exports","@angular/core","@angular/common","@angular/material/icon","@angular/material/tooltip"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self)["sd-angular"]=e["sd-angular"]||{},e["sd-angular"].core=e["sd-angular"].core||{},e["sd-angular"].core["header-title"]={}),e.ng.core,e.ng.common,e.ng.material.icon,e.ng.material.tooltip)}(this,(function(e,n,t,o,r){"use strict";var i=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();i.decorators=[{type:n.Component,args:[{selector:"sd-header-title",template:'<div class="d-flex">\r\n <div *ngIf="icon" class="flex-shrink-1 c-header-icon">\r\n <mat-icon class="material-symbols-outlined text-grey">{{icon}}</mat-icon>\r\n </div>\r\n <div class="d-flex flex-column w-100 overflow-hidden">\r\n <div class="d-flex">\r\n <span class="T16M">{{title}}</span>\r\n <ng-container *ngIf="tooltip">\r\n <mat-icon\r\n [matTooltip]="tooltip"\r\n class="material-icons-outlined c-header-icon-tooltip"> info </mat-icon>\r\n </ng-container>\r\n </div>\r\n <span *ngIf="description" class="c-header-description">{{description}}</span>\r\n </div>\r\n <div class="flex-shrink-1">\r\n <ng-content select="[sdHeaderRight]"></ng-content>\r\n </div>\r\n</div>\r\n',styles:[".c-header-icon{align-items:center;display:flex;height:28px;margin-right:8px;width:28px}.c-header-icon-tooltip{align-items:center;color:#757575;display:flex;font-size:20px;height:28px!important;margin-left:10px}.c-header-description{font-size:14px;line-height:20px}"]}]}],i.ctorParameters=function(){return[]},i.propDecorators={title:[{type:n.Input}],icon:[{type:n.Input}],description:[{type:n.Input}],tooltip:[{type:n.Input}]};var a=function(){};a.decorators=[{type:n.NgModule,args:[{imports:[t.CommonModule,o.MatIconModule,r.MatTooltipModule],declarations:[i],exports:[i]}]}],e.SdHeaderTitleModule=a,e.ɵa=i,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=sd-angular-core-header-title.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../projects/sd-core/header-title/src/lib/header-title.component.ts","../../../../projects/sd-core/header-title/src/lib/header-title.module.ts"],"names":["SdHeaderTitleComponent","prototype","ngOnInit","Component","args","selector","template","Input","NgModule","imports","CommonModule","MatIconModule","MatTooltipModule","declarations","exports"],"mappings":"wqBAcE,SAAAA,YAEAA,EAAAC,UAAAC,SAAA,sCAdDC,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,kBACVC,SAAA,4lCAKCC,EAAAA,oBACAA,EAAAA,2BACAA,EAAAA,uBACAA,EAAAA,eCEH,iCATCC,EAAAA,SAAQJ,KAAA,CAAC,CACRK,QAAS,CACPC,EAAAA,aACAC,EAAAA,cACAC,EAAAA,kBAEFC,aAAc,CAACb,GACfc,QAAS,CAACd","sourcesContent":["import { Component, OnInit, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-header-title',\r\n templateUrl: './header-title.component.html',\r\n styleUrls: ['./header-title.component.scss']\r\n})\r\nexport class SdHeaderTitleComponent implements OnInit {\r\n\r\n @Input() title: string;\r\n @Input() icon: string;\r\n @Input() description: string;\r\n @Input() tooltip: string;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { SdHeaderTitleComponent } from './header-title.component';\r\nimport {MatTooltipModule} from '@angular/material/tooltip';\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatIconModule,\r\n MatTooltipModule\r\n ],\r\n declarations: [SdHeaderTitleComponent],\r\n exports: [SdHeaderTitleComponent]\r\n})\r\nexport class SdHeaderTitleModule { }\r\n"]}
1
+ {"version":3,"sources":["../../../../projects/sd-core/header-title/src/lib/header-title.component.ts","../../../../projects/sd-core/header-title/src/lib/header-title.module.ts"],"names":["SdHeaderTitleComponent","prototype","ngOnInit","Component","args","selector","template","Input","NgModule","imports","CommonModule","MatIconModule","MatTooltipModule","declarations","exports"],"mappings":"wqBAcE,SAAAA,YAEAA,EAAAC,UAAAC,SAAA,sCAdDC,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,kBACVC,SAAA,qkCAKCC,EAAAA,oBACAA,EAAAA,2BACAA,EAAAA,uBACAA,EAAAA,eCEH,iCATCC,EAAAA,SAAQJ,KAAA,CAAC,CACRK,QAAS,CACPC,EAAAA,aACAC,EAAAA,cACAC,EAAAA,kBAEFC,aAAc,CAACb,GACfc,QAAS,CAACd","sourcesContent":["import { Component, OnInit, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-header-title',\r\n templateUrl: './header-title.component.html',\r\n styleUrls: ['./header-title.component.scss']\r\n})\r\nexport class SdHeaderTitleComponent implements OnInit {\r\n\r\n @Input() title: string;\r\n @Input() icon: string;\r\n @Input() description: string;\r\n @Input() tooltip: string;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { SdHeaderTitleComponent } from './header-title.component';\r\nimport {MatTooltipModule} from '@angular/material/tooltip';\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatIconModule,\r\n MatTooltipModule\r\n ],\r\n declarations: [SdHeaderTitleComponent],\r\n exports: [SdHeaderTitleComponent]\r\n})\r\nexport class SdHeaderTitleModule { }\r\n"]}
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/material/dialog'), require('@angular/material/icon'), require('@angular/material/button'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/forms'), require('ngx-toastr'), require('@sd-angular/core/button'), require('@sd-angular/core/common'), require('@sd-angular/core/translate'), require('rxjs/operators'), require('rxjs'), require('uuid')) :
3
- typeof define === 'function' && define.amd ? define('@sd-angular/core/notify', ['exports', '@angular/core', '@angular/common', '@angular/material/dialog', '@angular/material/icon', '@angular/material/button', '@angular/material/form-field', '@angular/material/input', '@angular/forms', 'ngx-toastr', '@sd-angular/core/button', '@sd-angular/core/common', '@sd-angular/core/translate', 'rxjs/operators', 'rxjs', 'uuid'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['sd-angular'] = global['sd-angular'] || {}, global['sd-angular'].core = global['sd-angular'].core || {}, global['sd-angular'].core.notify = {}), global.ng.core, global.ng.common, global.ng.material.dialog, global.ng.material.icon, global.ng.material.button, global.ng.material.formField, global.ng.material.input, global.ng.forms, global['ngx-toastr'], global['sd-angular'].core.button, global['sd-angular'].core.common, global['sd-angular'].core.translate, global.rxjs.operators, global.rxjs, global.uuid));
5
- }(this, (function (exports, core, common, dialog, icon, button, formField, input, forms, ngxToastr, button$1, common$1, translate, operators, rxjs, uuid) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/material/dialog'), require('@angular/material/icon'), require('@angular/material/button'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/forms'), require('ngx-toastr'), require('@sd-angular/core/button'), require('@sd-angular/core/common'), require('uuid'), require('@sd-angular/core/translate'), require('rxjs/operators'), require('rxjs'), require('@angular/material/datepicker')) :
3
+ typeof define === 'function' && define.amd ? define('@sd-angular/core/notify', ['exports', '@angular/core', '@angular/common', '@angular/material/dialog', '@angular/material/icon', '@angular/material/button', '@angular/material/form-field', '@angular/material/input', '@angular/forms', 'ngx-toastr', '@sd-angular/core/button', '@sd-angular/core/common', 'uuid', '@sd-angular/core/translate', 'rxjs/operators', 'rxjs', '@angular/material/datepicker'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['sd-angular'] = global['sd-angular'] || {}, global['sd-angular'].core = global['sd-angular'].core || {}, global['sd-angular'].core.notify = {}), global.ng.core, global.ng.common, global.ng.material.dialog, global.ng.material.icon, global.ng.material.button, global.ng.material.formField, global.ng.material.input, global.ng.forms, global['ngx-toastr'], global['sd-angular'].core.button, global['sd-angular'].core.common, global.uuid, global['sd-angular'].core.translate, global.rxjs.operators, global.rxjs, global.ng.material.datepicker));
5
+ }(this, (function (exports, core, common, dialog, icon, button, formField, input, forms, ngxToastr, button$1, common$1, uuid, translate, operators, rxjs, datepicker) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -324,19 +324,25 @@
324
324
 
325
325
  var DialogConfirmComponent = /** @class */ (function () {
326
326
  function DialogConfirmComponent(dialogRef, data) {
327
- var _a, _b, _c;
327
+ var _a, _b, _c, _d, _e;
328
328
  this.dialogRef = dialogRef;
329
329
  this.data = data;
330
330
  this.isString = false;
331
- this.isString = typeof ((_a = this.data) === null || _a === void 0 ? void 0 : _a.message) === "string";
332
- this.value = (_c = (_b = data === null || data === void 0 ? void 0 : data.input) === null || _b === void 0 ? void 0 : _b.defaultValue) !== null && _c !== void 0 ? _c : '';
331
+ this.id = "I" + uuid.v4();
332
+ this.isString = typeof ((_a = this.data) === null || _a === void 0 ? void 0 : _a.message) === 'string';
333
+ if (data === null || data === void 0 ? void 0 : data.input) {
334
+ this.value = (_c = (_b = data === null || data === void 0 ? void 0 : data.input) === null || _b === void 0 ? void 0 : _b.defaultValue) !== null && _c !== void 0 ? _c : '';
335
+ }
336
+ if (data === null || data === void 0 ? void 0 : data.date) {
337
+ this.value = (_e = (_d = data === null || data === void 0 ? void 0 : data.date) === null || _d === void 0 ? void 0 : _d.defaultValue) !== null && _e !== void 0 ? _e : '';
338
+ }
333
339
  }
334
340
  return DialogConfirmComponent;
335
341
  }());
336
342
  DialogConfirmComponent.decorators = [
337
343
  { type: core.Component, args: [{
338
- selector: "sd-dialog-confirm",
339
- template: "<h1 mat-dialog-title class=\"\">\r\n <mat-icon *ngIf=\"data?.icon\" [ngClass]=\"data?.icon\">\r\n {{ data?.icon }}\r\n </mat-icon>\r\n <span [innerHtml]=\"data?.title || 'Confirm'\"></span>\r\n</h1>\r\n<div mat-dialog-content>\r\n <div *ngIf=\"isString\" [innerHtml]=\"data?.message\"></div>\r\n <div *ngIf=\"!isString\" [innerHtml]=\"data?.message | json\"></div>\r\n <div *ngIf=\"data?.input\">\r\n <mat-form-field appearance=\"outline\">\r\n <textarea\r\n style=\"width: 100%\"\r\n matInput\r\n placeholder=\"{{ data.input?.placeholder }}\"\r\n [(ngModel)]=\"value\"\r\n autocomplete=\"off\"\r\n rows=\"5\"\r\n [maxlength]=\"data.input?.maxlength\"\r\n ></textarea>\r\n <!-- <span *ngIf=\"data.input?.maxlength\" matSuffix>{{value?.length || 0}}/{{data.input?.maxlength}}</span> -->\r\n </mat-form-field>\r\n </div>\r\n</div>\r\n<div mat-dialog-actions align=\"end\">\r\n <sd-button\r\n *ngIf=\"data?.noTitle\"\r\n [color]=\"data?.noButtonColor || 'secondary'\"\r\n [mat-dialog-close]=\"'CANCEL'\"\r\n [title]=\"data?.noTitle\"\r\n size=\"sm\"\r\n ></sd-button>\r\n <sd-button\r\n class=\"ml-12\"\r\n *ngIf=\"data?.yesTitle\"\r\n [mat-dialog-close]=\"value || 'ACCEPT'\"\r\n [color]=\"data?.yesButtonColor || 'primary'\"\r\n [disabled]=\"data.input?.required && !value\"\r\n cdkFocusInitial\r\n [title]=\"data?.yesTitle\"\r\n size=\"sm\"\r\n ></sd-button>\r\n</div>\r\n",
344
+ selector: 'sd-dialog-confirm',
345
+ template: "<h1 mat-dialog-title class=\"\">\r\n <mat-icon *ngIf=\"data?.icon\" [ngClass]=\"data?.icon\">\r\n {{ data?.icon }}\r\n </mat-icon>\r\n <span [innerHtml]=\"data?.title || 'Confirm'\"></span>\r\n</h1>\r\n<div mat-dialog-content>\r\n <div *ngIf=\"isString\" [innerHtml]=\"data?.message\"></div>\r\n <div *ngIf=\"!isString\" [innerHtml]=\"data?.message | json\"></div>\r\n <div *ngIf=\"data?.input\">\r\n <mat-form-field appearance=\"outline\">\r\n <textarea style=\"width: 100%\" matInput [placeholder]=\"data.input?.placeholder\" [(ngModel)]=\"value\"\r\n autocomplete=\"off\" rows=\"5\" [maxlength]=\"data.input?.maxlength\"></textarea>\r\n </mat-form-field>\r\n </div>\r\n <div *ngIf=\"data?.date\">\r\n <mat-form-field class=\"sd-md\" appearance=\"outline\">\r\n <input [id]=\"id\" matInpu [autocomplete]=\"id\" autocorrect=\"off\" [matDatepicker]=\"picker2\"\r\n [placeholder]=\"data.date?.placeholder\" [min]=\"data.date?.min\" [max]=\"data.date?.max\" />\r\n <mat-icon class=\"pointer sd-suffix-icon\" (click)=\"picker2.open()\" #btn matSuffix>today\r\n </mat-icon>\r\n <mat-datepicker #picker2></mat-datepicker>\r\n </mat-form-field>\r\n </div>\r\n</div>\r\n<div mat-dialog-actions align=\"end\">\r\n <sd-button *ngIf=\"data?.noTitle\" [color]=\"data?.noButtonColor || 'secondary'\" [mat-dialog-close]=\"'CANCEL'\"\r\n [title]=\"data?.noTitle\" size=\"sm\"></sd-button>\r\n <sd-button class=\"ml-12\" *ngIf=\"data?.yesTitle\" [mat-dialog-close]=\"value || 'ACCEPT'\"\r\n [color]=\"data?.yesButtonColor || 'primary'\" [disabled]=\"data.input?.required && !value\" cdkFocusInitial\r\n [title]=\"data?.yesTitle\" size=\"sm\"></sd-button>\r\n</div>",
340
346
  styles: [":host .mat-dialog-content{margin:0 -16px 16px!important}:host .mat-button{background-color:#f5f5f5}:host>>>.mat-dialog-title{align-items:center;display:flex;justify-content:flex-start}:host>>>.mat-dialog-title .mat-icon{margin-right:5px}:host{display:block;padding:12px 16px}:host>>>.mat-dialog-title .mat-icon.info{color:#2962ff}:host>>>.mat-dialog-title .mat-icon.warning{color:#ffc107}:host>>>.mat-dialog-title .mat-icon.done{color:#4caf50}:host>>>.mat-dialog-title .mat-icon.error{color:#d32f2f}"]
341
347
  },] }
342
348
  ];
@@ -359,45 +365,45 @@
359
365
  this.alert = {
360
366
  info: function (message, title, yesTitle, icon) {
361
367
  _this.dialog.open(DialogConfirmComponent, {
362
- width: "400px",
368
+ width: '400px',
363
369
  data: {
364
- icon: icon || "info",
365
- title: title || _this.translate("Notice"),
366
- message: message || "Done!",
367
- yesTitle: yesTitle || _this.translate("Ok"),
370
+ icon: icon || 'info',
371
+ title: title || _this.translate('Notice'),
372
+ message: message || 'Done!',
373
+ yesTitle: yesTitle || _this.translate('Ok'),
368
374
  },
369
375
  });
370
376
  },
371
377
  success: function (message, title, yesTitle, icon) {
372
378
  _this.dialog.open(DialogConfirmComponent, {
373
- width: "400px",
379
+ width: '400px',
374
380
  data: {
375
- icon: icon || "done",
376
- title: title || _this.translate("Success"),
377
- message: message || "Done!",
378
- yesTitle: yesTitle || _this.translate("Ok"),
381
+ icon: icon || 'done',
382
+ title: title || _this.translate('Success'),
383
+ message: message || 'Done!',
384
+ yesTitle: yesTitle || _this.translate('Ok'),
379
385
  },
380
386
  });
381
387
  },
382
388
  warning: function (message, title, yesTitle, icon) {
383
389
  _this.dialog.open(DialogConfirmComponent, {
384
- width: "400px",
390
+ width: '400px',
385
391
  data: {
386
- icon: icon || "warning",
387
- title: title || _this.translate("Warning"),
388
- message: message || "Something went wrong!",
389
- yesTitle: yesTitle || _this.translate("Ok"),
392
+ icon: icon || 'warning',
393
+ title: title || _this.translate('Warning'),
394
+ message: message || 'Something went wrong!',
395
+ yesTitle: yesTitle || _this.translate('Ok'),
390
396
  },
391
397
  });
392
398
  },
393
399
  error: function (message, title, yesTitle, icon) {
394
400
  _this.dialog.open(DialogConfirmComponent, {
395
- width: "400px",
401
+ width: '400px',
396
402
  data: {
397
- icon: icon || "error",
398
- title: title || _this.translate("Error"),
399
- message: message || "Something went wrong!",
400
- yesTitle: yesTitle || _this.translate("Ok"),
403
+ icon: icon || 'error',
404
+ title: title || _this.translate('Error'),
405
+ message: message || 'Something went wrong!',
406
+ yesTitle: yesTitle || _this.translate('Ok'),
401
407
  },
402
408
  });
403
409
  },
@@ -407,9 +413,9 @@
407
413
  // tslint:disable-next-line: max-line-length
408
414
  // const style = `border-radius: 5px; margin: 0; padding: 12px; z-index: 99999; top: 5px; right: 5px; display: none; position: fixed;color: #4F8A10; background-color: #DFF2BF`;
409
415
  // tslint:disable-next-line: max-line-length
410
- // const html = `<div id="${this.notifyId}" style="${style}"><i class="fa fa-check"></i> ${message || this.translate('Success')}</div>`;
416
+ // const html = `<div id='${this.notifyId}' style='${style}'><i class='fa fa-check'></i> ${message || this.translate('Success')}</div>`;
411
417
  // this.showNotify(html, delay);
412
- var content = message || _this.translate("Success");
418
+ var content = message || _this.translate('Success');
413
419
  _this.toastr.success(content, title, {
414
420
  enableHtml: true,
415
421
  timeOut: delay || 3000,
@@ -519,11 +525,11 @@
519
525
  var id = "sd-notify-ckb-" + uuid.v4();
520
526
  var messageLength = messages.length;
521
527
  var messageRests = messages.splice(showNum);
522
- var messageContainer = "<ul class=\"sd-notify__list\">{0}{1}</ul>";
523
- var messageTemp = "<li class=\"sd-notify__item\">- {0}</li>";
528
+ var messageContainer = "<ul class='sd-notify__list'>{0}{1}</ul>";
529
+ var messageTemp = "<li class='sd-notify__item'>- {0}</li>";
524
530
  var contentRest = '';
525
531
  if (messageRests === null || messageRests === void 0 ? void 0 : messageRests.length) {
526
- contentRest = "<input id=\"" + id + "\" class=\"cdk-visually-hidden sd-notify__checkbox\" type=\"checkbox\" />\n <label class=\"sd-notify__text sd-notify__text--show\" for=\"" + id + "\">" + _this.translate('Show more') + "</label>\n <div class=\"sd-notify__item--rest\">\n " + messageRests.map(function (m) { return String.format(messageTemp, m); }).join('') + "\n </div>\n <label class=\"sd-notify__text sd-notify__text--less\" for=\"" + id + "\">" + _this.translate('Show less') + "</label>";
532
+ contentRest = "<input id='" + id + "' class='cdk-visually-hidden sd-notify__checkbox' type='checkbox' />\n <label class='sd-notify__text sd-notify__text--show' for='" + id + "'>" + _this.translate('Show more') + "</label>\n <div class='sd-notify__item--rest'>\n " + messageRests.map(function (m) { return String.format(messageTemp, m); }).join('') + "\n </div>\n <label class='sd-notify__text sd-notify__text--less' for='" + id + "'>" + _this.translate('Show less') + "</label>";
527
533
  }
528
534
  var content = String.format(messageContainer, messages.map(function (m) { return String.format(messageTemp, m); }).join(''), contentRest);
529
535
  var toast;
@@ -560,47 +566,47 @@
560
566
  });
561
567
  this.handle = {
562
568
  error: function (err) {
563
- if (typeof err === "string") {
569
+ if (typeof err === 'string') {
564
570
  _this.notify.warning(err);
565
571
  }
566
- else if (typeof err === "object") {
572
+ else if (typeof err === 'object') {
567
573
  var message = (err === null || err === void 0 ? void 0 : err.error) || (err === null || err === void 0 ? void 0 : err.message) || (err === null || err === void 0 ? void 0 : err.ExceptionMessage) || (err === null || err === void 0 ? void 0 : err.Message) ||
568
- "Unknown error";
569
- if (typeof err.json === "function") {
574
+ 'Unknown error';
575
+ if (typeof err.json === 'function') {
570
576
  err = err.json();
571
577
  if (err) {
572
578
  message =
573
579
  (err === null || err === void 0 ? void 0 : err.error) || (err === null || err === void 0 ? void 0 : err.message) || (err === null || err === void 0 ? void 0 : err.ExceptionMessage) || (err === null || err === void 0 ? void 0 : err.Message) ||
574
- "Unknown error";
580
+ 'Unknown error';
575
581
  }
576
582
  }
577
583
  _this.notify.warning(message);
578
584
  }
579
585
  else {
580
- _this.notify.warning("Unknown error");
586
+ _this.notify.warning('Unknown error');
581
587
  }
582
588
  },
583
589
  };
584
590
  this.confirm = function (message, option) {
585
591
  if (option === void 0) { option = {}; }
586
592
  var dialogRef = _this.dialog.open(DialogConfirmComponent, {
587
- width: "400px",
593
+ width: '400px',
588
594
  data: {
589
- title: (option === null || option === void 0 ? void 0 : option.title) || _this.translate("Confirm"),
595
+ title: (option === null || option === void 0 ? void 0 : option.title) || _this.translate('Confirm'),
590
596
  message: message,
591
- yesTitle: (option === null || option === void 0 ? void 0 : option.yesTitle) || _this.translate("Yes"),
592
- noTitle: (option === null || option === void 0 ? void 0 : option.noTitle) || _this.translate("No"),
593
- noButtonColor: (option === null || option === void 0 ? void 0 : option.noButtonColor) || "secondary",
594
- yesButtonColor: (option === null || option === void 0 ? void 0 : option.yesButtonColor) || "primary",
597
+ yesTitle: (option === null || option === void 0 ? void 0 : option.yesTitle) || _this.translate('Yes'),
598
+ noTitle: (option === null || option === void 0 ? void 0 : option.noTitle) || _this.translate('No'),
599
+ noButtonColor: (option === null || option === void 0 ? void 0 : option.noButtonColor) || 'secondary',
600
+ yesButtonColor: (option === null || option === void 0 ? void 0 : option.yesButtonColor) || 'primary',
595
601
  },
596
602
  });
597
603
  return new Promise(function (resolve, reject) {
598
604
  dialogRef.afterClosed().subscribe(function (result) {
599
605
  if (result) {
600
- if (result === "ACCEPT") {
606
+ if (result === 'ACCEPT') {
601
607
  resolve(null);
602
608
  }
603
- else if (result === "CANCEL") {
609
+ else if (result === 'CANCEL') {
604
610
  reject(result);
605
611
  }
606
612
  else {
@@ -610,19 +616,19 @@
610
616
  });
611
617
  });
612
618
  };
613
- this.confirmDelete = function () { return _this.confirm(_this.translate("Delete record(s)")); };
614
- this.confirmApprove = function () { return _this.confirm(_this.translate("Approve record(s)")); };
619
+ this.confirmDelete = function () { return _this.confirm(_this.translate('Delete record(s)')); };
620
+ this.confirmApprove = function () { return _this.confirm(_this.translate('Approve record(s)')); };
615
621
  this.confirmWithInput = function (title, option) {
616
622
  if (option === void 0) { option = {}; }
617
623
  var dialogRef = _this.dialog.open(DialogConfirmComponent, {
618
- width: "400px",
624
+ width: '400px',
619
625
  data: {
620
- title: title || _this.translate("Confirm"),
626
+ title: title || _this.translate('Confirm'),
621
627
  message: option === null || option === void 0 ? void 0 : option.message,
622
- yesTitle: (option === null || option === void 0 ? void 0 : option.yesTitle) || _this.translate("Yes"),
623
- noTitle: (option === null || option === void 0 ? void 0 : option.noTitle) || _this.translate("No"),
624
- noButtonColor: (option === null || option === void 0 ? void 0 : option.noButtonColor) || "secondary",
625
- yesButtonColor: (option === null || option === void 0 ? void 0 : option.yesButtonColor) || "primary",
628
+ yesTitle: (option === null || option === void 0 ? void 0 : option.yesTitle) || _this.translate('Yes'),
629
+ noTitle: (option === null || option === void 0 ? void 0 : option.noTitle) || _this.translate('No'),
630
+ noButtonColor: (option === null || option === void 0 ? void 0 : option.noButtonColor) || 'secondary',
631
+ yesButtonColor: (option === null || option === void 0 ? void 0 : option.yesButtonColor) || 'primary',
626
632
  input: {
627
633
  maxlength: (option === null || option === void 0 ? void 0 : option.maxlength) || 255,
628
634
  required: option === null || option === void 0 ? void 0 : option.required,
@@ -633,10 +639,44 @@
633
639
  return new Promise(function (resolve, reject) {
634
640
  dialogRef.afterClosed().subscribe(function (result) {
635
641
  if (result) {
636
- if (result === "ACCEPT") {
642
+ if (result === 'ACCEPT') {
643
+ resolve(result);
644
+ }
645
+ else if (result === 'CANCEL') {
646
+ reject(result);
647
+ }
648
+ else {
649
+ resolve(result);
650
+ }
651
+ }
652
+ });
653
+ });
654
+ };
655
+ this.confirmWithDate = function (title, option) {
656
+ if (option === void 0) { option = {}; }
657
+ var dialogRef = _this.dialog.open(DialogConfirmComponent, {
658
+ width: '400px',
659
+ data: {
660
+ title: title || _this.translate('Confirm'),
661
+ message: option === null || option === void 0 ? void 0 : option.message,
662
+ yesTitle: (option === null || option === void 0 ? void 0 : option.yesTitle) || _this.translate('Yes'),
663
+ noTitle: (option === null || option === void 0 ? void 0 : option.noTitle) || _this.translate('No'),
664
+ noButtonColor: (option === null || option === void 0 ? void 0 : option.noButtonColor) || 'secondary',
665
+ yesButtonColor: (option === null || option === void 0 ? void 0 : option.yesButtonColor) || 'primary',
666
+ date: {
667
+ placeholder: option === null || option === void 0 ? void 0 : option.placeholder,
668
+ required: option === null || option === void 0 ? void 0 : option.required,
669
+ defaultValue: (option === null || option === void 0 ? void 0 : option.defaultValue) || '',
670
+ },
671
+ },
672
+ });
673
+ return new Promise(function (resolve, reject) {
674
+ dialogRef.afterClosed().subscribe(function (result) {
675
+ if (result) {
676
+ if (result === 'ACCEPT') {
637
677
  resolve(result);
638
678
  }
639
- else if (result === "CANCEL") {
679
+ else if (result === 'CANCEL') {
640
680
  reject(result);
641
681
  }
642
682
  else {
@@ -674,6 +714,7 @@
674
714
  forms.FormsModule,
675
715
  formField.MatFormFieldModule,
676
716
  input.MatInputModule,
717
+ datepicker.MatDatepickerModule,
677
718
  icon.MatIconModule,
678
719
  button.MatButtonModule,
679
720
  dialog.MatDialogModule,