@sd-angular/core 1.1.61 → 1.1.64

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('@sd-angular/core/date-time')) :
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', '@sd-angular/core/date-time'], 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['sd-angular'].core['date-time']));
5
+ }(this, (function (exports, core, common, dialog, icon, button, formField, input, forms, ngxToastr, button$1, common$1, uuid, translate, operators, rxjs, dateTime) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -324,19 +324,28 @@
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, _f, _g;
328
328
  this.dialogRef = dialogRef;
329
329
  this.data = data;
330
+ this.required = false;
330
331
  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 : '';
332
+ this.id = "I" + uuid.v4();
333
+ this.isString = typeof ((_a = this.data) === null || _a === void 0 ? void 0 : _a.message) === 'string';
334
+ if (data === null || data === void 0 ? void 0 : data.input) {
335
+ 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 : '';
336
+ this.required = ((_d = data === null || data === void 0 ? void 0 : data.input) === null || _d === void 0 ? void 0 : _d.required) || false;
337
+ }
338
+ if (data === null || data === void 0 ? void 0 : data.date) {
339
+ this.value = (_f = (_e = data === null || data === void 0 ? void 0 : data.date) === null || _e === void 0 ? void 0 : _e.defaultValue) !== null && _f !== void 0 ? _f : '';
340
+ this.required = ((_g = data === null || data === void 0 ? void 0 : data.date) === null || _g === void 0 ? void 0 : _g.required) || false;
341
+ }
333
342
  }
334
343
  return DialogConfirmComponent;
335
344
  }());
336
345
  DialogConfirmComponent.decorators = [
337
346
  { 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",
347
+ selector: 'sd-dialog-confirm',
348
+ 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 <sd-date-time [placeholder]=\"data.date?.placeholder\" [(model)]=\"value\" type=\"date\" [min]=\"data.date?.min\"\r\n [max]=\"data.date?.max\" [required]=\"required\">\r\n </sd-date-time>\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]=\"required && !value\" cdkFocusInitial\r\n [title]=\"data?.yesTitle\" size=\"sm\"></sd-button>\r\n</div>",
340
349
  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
350
  },] }
342
351
  ];
@@ -359,45 +368,45 @@
359
368
  this.alert = {
360
369
  info: function (message, title, yesTitle, icon) {
361
370
  _this.dialog.open(DialogConfirmComponent, {
362
- width: "400px",
371
+ width: '400px',
363
372
  data: {
364
- icon: icon || "info",
365
- title: title || _this.translate("Notice"),
366
- message: message || "Done!",
367
- yesTitle: yesTitle || _this.translate("Ok"),
373
+ icon: icon || 'info',
374
+ title: title || _this.translate('Notice'),
375
+ message: message || 'Done!',
376
+ yesTitle: yesTitle || _this.translate('Ok'),
368
377
  },
369
378
  });
370
379
  },
371
380
  success: function (message, title, yesTitle, icon) {
372
381
  _this.dialog.open(DialogConfirmComponent, {
373
- width: "400px",
382
+ width: '400px',
374
383
  data: {
375
- icon: icon || "done",
376
- title: title || _this.translate("Success"),
377
- message: message || "Done!",
378
- yesTitle: yesTitle || _this.translate("Ok"),
384
+ icon: icon || 'done',
385
+ title: title || _this.translate('Success'),
386
+ message: message || 'Done!',
387
+ yesTitle: yesTitle || _this.translate('Ok'),
379
388
  },
380
389
  });
381
390
  },
382
391
  warning: function (message, title, yesTitle, icon) {
383
392
  _this.dialog.open(DialogConfirmComponent, {
384
- width: "400px",
393
+ width: '400px',
385
394
  data: {
386
- icon: icon || "warning",
387
- title: title || _this.translate("Warning"),
388
- message: message || "Something went wrong!",
389
- yesTitle: yesTitle || _this.translate("Ok"),
395
+ icon: icon || 'warning',
396
+ title: title || _this.translate('Warning'),
397
+ message: message || 'Something went wrong!',
398
+ yesTitle: yesTitle || _this.translate('Ok'),
390
399
  },
391
400
  });
392
401
  },
393
402
  error: function (message, title, yesTitle, icon) {
394
403
  _this.dialog.open(DialogConfirmComponent, {
395
- width: "400px",
404
+ width: '400px',
396
405
  data: {
397
- icon: icon || "error",
398
- title: title || _this.translate("Error"),
399
- message: message || "Something went wrong!",
400
- yesTitle: yesTitle || _this.translate("Ok"),
406
+ icon: icon || 'error',
407
+ title: title || _this.translate('Error'),
408
+ message: message || 'Something went wrong!',
409
+ yesTitle: yesTitle || _this.translate('Ok'),
401
410
  },
402
411
  });
403
412
  },
@@ -407,9 +416,9 @@
407
416
  // tslint:disable-next-line: max-line-length
408
417
  // 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
418
  // 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>`;
419
+ // const html = `<div id='${this.notifyId}' style='${style}'><i class='fa fa-check'></i> ${message || this.translate('Success')}</div>`;
411
420
  // this.showNotify(html, delay);
412
- var content = message || _this.translate("Success");
421
+ var content = message || _this.translate('Success');
413
422
  _this.toastr.success(content, title, {
414
423
  enableHtml: true,
415
424
  timeOut: delay || 3000,
@@ -519,11 +528,11 @@
519
528
  var id = "sd-notify-ckb-" + uuid.v4();
520
529
  var messageLength = messages.length;
521
530
  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>";
531
+ var messageContainer = "<ul class='sd-notify__list'>{0}{1}</ul>";
532
+ var messageTemp = "<li class='sd-notify__item'>- {0}</li>";
524
533
  var contentRest = '';
525
534
  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>";
535
+ 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
536
  }
528
537
  var content = String.format(messageContainer, messages.map(function (m) { return String.format(messageTemp, m); }).join(''), contentRest);
529
538
  var toast;
@@ -560,47 +569,47 @@
560
569
  });
561
570
  this.handle = {
562
571
  error: function (err) {
563
- if (typeof err === "string") {
572
+ if (typeof err === 'string') {
564
573
  _this.notify.warning(err);
565
574
  }
566
- else if (typeof err === "object") {
575
+ else if (typeof err === 'object') {
567
576
  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") {
577
+ 'Unknown error';
578
+ if (typeof err.json === 'function') {
570
579
  err = err.json();
571
580
  if (err) {
572
581
  message =
573
582
  (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";
583
+ 'Unknown error';
575
584
  }
576
585
  }
577
586
  _this.notify.warning(message);
578
587
  }
579
588
  else {
580
- _this.notify.warning("Unknown error");
589
+ _this.notify.warning('Unknown error');
581
590
  }
582
591
  },
583
592
  };
584
593
  this.confirm = function (message, option) {
585
594
  if (option === void 0) { option = {}; }
586
595
  var dialogRef = _this.dialog.open(DialogConfirmComponent, {
587
- width: "400px",
596
+ width: '400px',
588
597
  data: {
589
- title: (option === null || option === void 0 ? void 0 : option.title) || _this.translate("Confirm"),
598
+ title: (option === null || option === void 0 ? void 0 : option.title) || _this.translate('Confirm'),
590
599
  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",
600
+ yesTitle: (option === null || option === void 0 ? void 0 : option.yesTitle) || _this.translate('Yes'),
601
+ noTitle: (option === null || option === void 0 ? void 0 : option.noTitle) || _this.translate('No'),
602
+ noButtonColor: (option === null || option === void 0 ? void 0 : option.noButtonColor) || 'secondary',
603
+ yesButtonColor: (option === null || option === void 0 ? void 0 : option.yesButtonColor) || 'primary',
595
604
  },
596
605
  });
597
606
  return new Promise(function (resolve, reject) {
598
607
  dialogRef.afterClosed().subscribe(function (result) {
599
608
  if (result) {
600
- if (result === "ACCEPT") {
609
+ if (result === 'ACCEPT') {
601
610
  resolve(null);
602
611
  }
603
- else if (result === "CANCEL") {
612
+ else if (result === 'CANCEL') {
604
613
  reject(result);
605
614
  }
606
615
  else {
@@ -610,19 +619,19 @@
610
619
  });
611
620
  });
612
621
  };
613
- this.confirmDelete = function () { return _this.confirm(_this.translate("Delete record(s)")); };
614
- this.confirmApprove = function () { return _this.confirm(_this.translate("Approve record(s)")); };
622
+ this.confirmDelete = function () { return _this.confirm(_this.translate('Delete record(s)')); };
623
+ this.confirmApprove = function () { return _this.confirm(_this.translate('Approve record(s)')); };
615
624
  this.confirmWithInput = function (title, option) {
616
625
  if (option === void 0) { option = {}; }
617
626
  var dialogRef = _this.dialog.open(DialogConfirmComponent, {
618
- width: "400px",
627
+ width: '400px',
619
628
  data: {
620
- title: title || _this.translate("Confirm"),
629
+ title: title || _this.translate('Confirm'),
621
630
  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",
631
+ yesTitle: (option === null || option === void 0 ? void 0 : option.yesTitle) || _this.translate('Yes'),
632
+ noTitle: (option === null || option === void 0 ? void 0 : option.noTitle) || _this.translate('No'),
633
+ noButtonColor: (option === null || option === void 0 ? void 0 : option.noButtonColor) || 'secondary',
634
+ yesButtonColor: (option === null || option === void 0 ? void 0 : option.yesButtonColor) || 'primary',
626
635
  input: {
627
636
  maxlength: (option === null || option === void 0 ? void 0 : option.maxlength) || 255,
628
637
  required: option === null || option === void 0 ? void 0 : option.required,
@@ -633,10 +642,44 @@
633
642
  return new Promise(function (resolve, reject) {
634
643
  dialogRef.afterClosed().subscribe(function (result) {
635
644
  if (result) {
636
- if (result === "ACCEPT") {
645
+ if (result === 'ACCEPT') {
646
+ resolve(result);
647
+ }
648
+ else if (result === 'CANCEL') {
649
+ reject(result);
650
+ }
651
+ else {
652
+ resolve(result);
653
+ }
654
+ }
655
+ });
656
+ });
657
+ };
658
+ this.confirmWithDate = function (title, option) {
659
+ if (option === void 0) { option = {}; }
660
+ var dialogRef = _this.dialog.open(DialogConfirmComponent, {
661
+ width: '400px',
662
+ data: {
663
+ title: title || _this.translate('Confirm'),
664
+ message: option === null || option === void 0 ? void 0 : option.message,
665
+ yesTitle: (option === null || option === void 0 ? void 0 : option.yesTitle) || _this.translate('Yes'),
666
+ noTitle: (option === null || option === void 0 ? void 0 : option.noTitle) || _this.translate('No'),
667
+ noButtonColor: (option === null || option === void 0 ? void 0 : option.noButtonColor) || 'secondary',
668
+ yesButtonColor: (option === null || option === void 0 ? void 0 : option.yesButtonColor) || 'primary',
669
+ date: {
670
+ placeholder: option === null || option === void 0 ? void 0 : option.placeholder,
671
+ required: option === null || option === void 0 ? void 0 : option.required,
672
+ defaultValue: (option === null || option === void 0 ? void 0 : option.defaultValue) || '',
673
+ },
674
+ },
675
+ });
676
+ return new Promise(function (resolve, reject) {
677
+ dialogRef.afterClosed().subscribe(function (result) {
678
+ if (result) {
679
+ if (result === 'ACCEPT') {
637
680
  resolve(result);
638
681
  }
639
- else if (result === "CANCEL") {
682
+ else if (result === 'CANCEL') {
640
683
  reject(result);
641
684
  }
642
685
  else {
@@ -674,6 +717,7 @@
674
717
  forms.FormsModule,
675
718
  formField.MatFormFieldModule,
676
719
  input.MatInputModule,
720
+ dateTime.SdDateTimeModule,
677
721
  icon.MatIconModule,
678
722
  button.MatButtonModule,
679
723
  dialog.MatDialogModule,