@sd-angular/core 1.0.20 → 1.0.23

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.
Files changed (34) hide show
  1. package/assets/scss/core/toastr.scss +39 -0
  2. package/bundles/sd-angular-core-common.umd.js +11 -0
  3. package/bundles/sd-angular-core-common.umd.js.map +1 -1
  4. package/bundles/sd-angular-core-common.umd.min.js +1 -1
  5. package/bundles/sd-angular-core-common.umd.min.js.map +1 -1
  6. package/bundles/sd-angular-core-grid-material.umd.js +8 -3
  7. package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
  8. package/bundles/sd-angular-core-grid-material.umd.min.js +1 -1
  9. package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
  10. package/bundles/sd-angular-core-notify.umd.js +392 -16
  11. package/bundles/sd-angular-core-notify.umd.js.map +1 -1
  12. package/bundles/sd-angular-core-notify.umd.min.js +15 -1
  13. package/bundles/sd-angular-core-notify.umd.min.js.map +1 -1
  14. package/bundles/sd-angular-core-side-drawer.umd.js +1 -1
  15. package/bundles/sd-angular-core-side-drawer.umd.min.js +1 -1
  16. package/common/src/lib/typings/string.extension.d.ts +1 -0
  17. package/esm2015/common/src/lib/typings/string.extension.js +8 -1
  18. package/esm2015/grid-material/src/lib/grid-material.component.js +9 -4
  19. package/esm2015/grid-material/src/lib/models/grid-editor.model.js +1 -1
  20. package/esm2015/notify/src/lib/notify.service.js +79 -13
  21. package/esm2015/side-drawer/src/lib/side-drawer/side-drawer.component.js +1 -1
  22. package/fesm2015/sd-angular-core-common.js +7 -0
  23. package/fesm2015/sd-angular-core-common.js.map +1 -1
  24. package/fesm2015/sd-angular-core-grid-material.js +8 -3
  25. package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
  26. package/fesm2015/sd-angular-core-notify.js +78 -12
  27. package/fesm2015/sd-angular-core-notify.js.map +1 -1
  28. package/fesm2015/sd-angular-core-side-drawer.js +1 -1
  29. package/grid-material/src/lib/models/grid-editor.model.d.ts +1 -0
  30. package/notify/sd-angular-core-notify.metadata.json +1 -1
  31. package/notify/src/lib/notify.service.d.ts +4 -2
  32. package/package.json +1 -1
  33. package/{sd-angular-core-1.0.20.tgz → sd-angular-core-1.0.23.tgz} +0 -0
  34. package/side-drawer/sd-angular-core-side-drawer.metadata.json +1 -1
@@ -8,7 +8,10 @@ import { MatInputModule } from '@angular/material/input';
8
8
  import { FormsModule } from '@angular/forms';
9
9
  import { ToastrService, ToastrModule } from 'ngx-toastr';
10
10
  import { SdButtonModule } from '@sd-angular/core/button';
11
+ import { __classPrivateFieldGet } from 'tslib';
12
+ import '@sd-angular/core/common';
11
13
  import { SdTranslateService } from '@sd-angular/core/translate';
14
+ import { takeUntil } from 'rxjs/operators';
12
15
 
13
16
  class DialogConfirmComponent {
14
17
  constructor(dialogRef, data) {
@@ -32,6 +35,8 @@ DialogConfirmComponent.ctorParameters = () => [
32
35
  { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
33
36
  ];
34
37
 
38
+ var _buildToastMultiMesssage;
39
+ let notifyId = 0;
35
40
  class SdNotifyService {
36
41
  constructor(dialog, toastr, translateService) {
37
42
  this.dialog = dialog;
@@ -103,12 +108,17 @@ class SdNotifyService {
103
108
  // tslint:disable-next-line: max-line-length
104
109
  // const html = `<div id="${this.notifyId}" style="${style}"><i class="fa fa-exclamation-triangle"></i> ${message || this.translate('Warning')}</div>`;
105
110
  // this.showNotify(html, delay);
106
- const content = message || this.translate("Warning");
107
- this.toastr.warning(content, title, {
108
- enableHtml: true,
109
- timeOut: delay || 3000,
110
- closeButton: true,
111
- });
111
+ if (Array.isArray(message)) {
112
+ __classPrivateFieldGet(this, _buildToastMultiMesssage).call(this, 'warning', message, delay, title);
113
+ }
114
+ else {
115
+ const content = message || this.translate("Warning");
116
+ this.toastr.warning(content, title, {
117
+ enableHtml: true,
118
+ timeOut: delay || 3000,
119
+ closeButton: true,
120
+ });
121
+ }
112
122
  },
113
123
  error: (message, delay, title) => {
114
124
  // tslint:disable-next-line: max-line-length
@@ -116,14 +126,69 @@ class SdNotifyService {
116
126
  // tslint:disable-next-line: max-line-length
117
127
  // const html = `<div id="${this.notifyId}" style="${style}"><i class="fa fa-times"></i> ${message || this.translate('Error')}</div>`;
118
128
  // this.showNotify(html, delay);
119
- const content = message || this.translate("Error");
120
- this.toastr.error(content, title, {
121
- enableHtml: true,
122
- timeOut: delay || 3000,
123
- closeButton: true,
124
- });
129
+ if (Array.isArray(message)) {
130
+ __classPrivateFieldGet(this, _buildToastMultiMesssage).call(this, 'error', message, delay, title);
131
+ }
132
+ else {
133
+ const content = message || this.translate("Error");
134
+ this.toastr.error(content, title, {
135
+ enableHtml: true,
136
+ timeOut: delay || 3000,
137
+ closeButton: true,
138
+ });
139
+ }
125
140
  },
126
141
  };
142
+ _buildToastMultiMesssage.set(this, (type, messages, delay, title) => {
143
+ /** số lượng item hiển thị mặc định */
144
+ const showNum = 2;
145
+ const id = notifyId++;
146
+ const messageLength = messages.length;
147
+ const messageRests = messages.splice(showNum);
148
+ const messageContainer = `<ul class="sd-notify__list">{0}{1}</ul>`;
149
+ const messageTemp = `<li class="sd-notify__item">- {0}</li>`;
150
+ let contentRest = '';
151
+ if (messageRests === null || messageRests === void 0 ? void 0 : messageRests.length) {
152
+ contentRest = `<input id="sd-notify-ckb-${id}" class="cdk-visually-hidden sd-notify__checkbox" type="checkbox" />
153
+ <label class="sd-notify__text sd-notify__text--show text-secondary" for="sd-notify-ckb-${id}">${this.translate('Show more')}</label>
154
+ <div class="sd-notify__item--rest">
155
+ ${messageRests.map(m => String.format(messageTemp, m)).join('')}
156
+ </div>
157
+ <label class="sd-notify__text sd-notify__text--less text-secondary" for="sd-notify-ckb-${id}">${this.translate('Show less')}</label>`;
158
+ }
159
+ const content = String.format(messageContainer, messages.map(m => String.format(messageTemp, m)).join(''), contentRest);
160
+ let toast;
161
+ // khi truyền message html sẽ bị sanitize nên phải truyền innerHTML khi toast hiện lên
162
+ // @see https://github.com/scttcper/ngx-toastr/blob/v12.1.0/src/lib/toastr/toastr.service.ts#L271
163
+ switch (type) {
164
+ case 'error':
165
+ toast = this.toastr.error(content, `${title || this.translate('Error')} (${messageLength})`, {
166
+ enableHtml: true,
167
+ timeOut: delay || 3000,
168
+ messageClass: `toast-message toast-message-${id}`,
169
+ closeButton: true,
170
+ tapToDismiss: false
171
+ });
172
+ break;
173
+ case 'warning':
174
+ toast = this.toastr.warning(content, `${title || this.translate('Warning')} (${messageLength})`, {
175
+ enableHtml: true,
176
+ timeOut: delay || 3000,
177
+ messageClass: `toast-message toast-message-${id}`,
178
+ closeButton: true,
179
+ tapToDismiss: false
180
+ });
181
+ break;
182
+ }
183
+ if (toast) {
184
+ toast.onShown
185
+ .pipe(takeUntil(toast.onHidden))
186
+ .subscribe(() => {
187
+ const messageEle = document.querySelector(`.toast-message-${id}`);
188
+ messageEle.innerHTML = content;
189
+ });
190
+ }
191
+ });
127
192
  this.handle = {
128
193
  error: (err) => {
129
194
  if (typeof err === "string") {
@@ -215,6 +280,7 @@ class SdNotifyService {
215
280
  };
216
281
  }
217
282
  }
283
+ _buildToastMultiMesssage = new WeakMap();
218
284
  SdNotifyService.decorators = [
219
285
  { type: Injectable }
220
286
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"sd-angular-core-notify.js","sources":["../../../../projects/sd-core/notify/src/lib/components/dialog-confirm/dialog-confirm.component.ts","../../../../projects/sd-core/notify/src/lib/notify.service.ts","../../../../projects/sd-core/notify/src/lib/notify.module.ts","../../../../projects/sd-core/notify/src/public-api.ts","../../../../projects/sd-core/notify/sd-angular-core-notify.ts"],"sourcesContent":["import { Component, Inject } from \"@angular/core\";\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\r\n\r\nexport interface DialogData {\r\n icon?: string;\r\n title?: string;\r\n message?: string;\r\n yesTitle?: string;\r\n noTitle?: string;\r\n yesButtonColor?: string;\r\n noButtonColor?: string;\r\n input?: {\r\n placeholder?: string;\r\n minlength?: number;\r\n maxlength?: number;\r\n required?: boolean;\r\n defaultValue?: string;\r\n };\r\n}\r\n\r\n@Component({\r\n selector: \"sd-dialog-confirm\",\r\n templateUrl: \"dialog-confirm.component.html\",\r\n styleUrls: [\"./dialog-confirm.component.css\"],\r\n})\r\nexport class DialogConfirmComponent {\r\n value: string;\r\n isString = false;\r\n constructor(\r\n public dialogRef: MatDialogRef<DialogConfirmComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: DialogData\r\n ) {\r\n this.isString = typeof this.data?.message === \"string\";\r\n this.value = data?.input?.defaultValue ?? '';\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { DialogConfirmComponent } from \"./components/dialog-confirm/dialog-confirm.component\";\r\nimport { ToastrService } from \"ngx-toastr\";\r\nimport { SdTranslateService } from \"@sd-angular/core/translate\";\r\n\r\n@Injectable()\r\nexport class SdNotifyService {\r\n constructor(\r\n private dialog: MatDialog,\r\n private toastr: ToastrService,\r\n private translateService: SdTranslateService\r\n ) {}\r\n\r\n alert = {\r\n info: (\r\n message?: string,\r\n title?: string,\r\n yesTitle?: string,\r\n icon?: string\r\n ) => {\r\n this.dialog.open(DialogConfirmComponent, {\r\n width: \"400px\",\r\n data: {\r\n icon: icon || \"info\",\r\n title: title || this.translate(\"Notice\"),\r\n message: message || \"Done!\",\r\n yesTitle: yesTitle || this.translate(\"Ok\"),\r\n },\r\n });\r\n },\r\n success: (\r\n message?: string,\r\n title?: string,\r\n yesTitle?: string,\r\n icon?: string\r\n ) => {\r\n this.dialog.open(DialogConfirmComponent, {\r\n width: \"400px\",\r\n data: {\r\n icon: icon || \"done\",\r\n title: title || this.translate(\"Success\"),\r\n message: message || \"Done!\",\r\n yesTitle: yesTitle || this.translate(\"Ok\"),\r\n },\r\n });\r\n },\r\n warning: (\r\n message?: string,\r\n title?: string,\r\n yesTitle?: string,\r\n icon?: string\r\n ) => {\r\n this.dialog.open(DialogConfirmComponent, {\r\n width: \"400px\",\r\n data: {\r\n icon: icon || \"warning\",\r\n title: title || this.translate(\"Warning\"),\r\n message: message || \"Something went wrong!\",\r\n yesTitle: yesTitle || this.translate(\"Ok\"),\r\n },\r\n });\r\n },\r\n error: (\r\n message?: string,\r\n title?: string,\r\n yesTitle?: string,\r\n icon?: string\r\n ) => {\r\n this.dialog.open(DialogConfirmComponent, {\r\n width: \"400px\",\r\n data: {\r\n icon: icon || \"error\",\r\n title: title || this.translate(\"Error\"),\r\n message: message || \"Something went wrong!\",\r\n yesTitle: yesTitle || this.translate(\"Ok\"),\r\n },\r\n });\r\n },\r\n };\r\n\r\n notify = {\r\n success: (message?: string, delay?: number, title?: string) => {\r\n // tslint:disable-next-line: max-line-length\r\n // 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`;\r\n // tslint:disable-next-line: max-line-length\r\n // const html = `<div id=\"${this.notifyId}\" style=\"${style}\"><i class=\"fa fa-check\"></i> ${message || this.translate('Success')}</div>`;\r\n // this.showNotify(html, delay);\r\n const content = message || this.translate(\"Success\");\r\n this.toastr.success(content, title, {\r\n enableHtml: true,\r\n timeOut: delay || 3000,\r\n closeButton: true,\r\n });\r\n },\r\n warning: (message?: string, delay?: number, title?: string) => {\r\n // tslint:disable-next-line: max-line-length\r\n // const style = `border-radius: 5px; margin: 0; padding: 12px; z-index: 99999; top: 5px; right: 5px; display: none; position: fixed;color: #9F6000; background-color: #FEEFB3`;\r\n // tslint:disable-next-line: max-line-length\r\n // const html = `<div id=\"${this.notifyId}\" style=\"${style}\"><i class=\"fa fa-exclamation-triangle\"></i> ${message || this.translate('Warning')}</div>`;\r\n // this.showNotify(html, delay);\r\n const content = message || this.translate(\"Warning\");\r\n this.toastr.warning(content, title, {\r\n enableHtml: true,\r\n timeOut: delay || 3000,\r\n closeButton: true,\r\n });\r\n },\r\n error: (message?: string, delay?: number, title?: string) => {\r\n // tslint:disable-next-line: max-line-length\r\n // const style = `border-radius: 5px; margin: 0; padding: 12px; z-index: 99999; top: 5px; right: 5px; display: none; position: fixed;color: #D8000C; background-color: #FFD2D2`;\r\n // tslint:disable-next-line: max-line-length\r\n // const html = `<div id=\"${this.notifyId}\" style=\"${style}\"><i class=\"fa fa-times\"></i> ${message || this.translate('Error')}</div>`;\r\n // this.showNotify(html, delay);\r\n const content = message || this.translate(\"Error\");\r\n this.toastr.error(content, title, {\r\n enableHtml: true,\r\n timeOut: delay || 3000,\r\n closeButton: true,\r\n });\r\n },\r\n };\r\n\r\n handle = {\r\n error: (err: any) => {\r\n if (typeof err === \"string\") {\r\n this.notify.warning(err);\r\n } else if (typeof err === \"object\") {\r\n let message =\r\n err?.error ||\r\n err?.message ||\r\n err?.ExceptionMessage ||\r\n err?.Message ||\r\n \"Unknown error\";\r\n if (typeof err.json === \"function\") {\r\n err = err.json();\r\n if (err) {\r\n message =\r\n err?.error ||\r\n err?.message ||\r\n err?.ExceptionMessage ||\r\n err?.Message ||\r\n \"Unknown error\";\r\n }\r\n }\r\n this.notify.warning(message);\r\n } else {\r\n this.notify.warning(\"Unknown error\");\r\n }\r\n },\r\n };\r\n\r\n confirm = (\r\n message: string,\r\n option: {\r\n title?: string;\r\n yesTitle?: string;\r\n noTitle?: string;\r\n yesButtonColor?: string;\r\n noButtonColor?: string;\r\n } = {}\r\n ) => {\r\n const dialogRef = this.dialog.open(DialogConfirmComponent, {\r\n width: \"400px\",\r\n data: {\r\n title: option?.title || this.translate(\"Confirm\"),\r\n message,\r\n yesTitle: option?.yesTitle || this.translate(\"Yes\"),\r\n noTitle: option?.noTitle || this.translate(\"No\"),\r\n noButtonColor: option?.noButtonColor || \"secondary\",\r\n yesButtonColor: option?.yesButtonColor || \"primary\",\r\n },\r\n });\r\n return new Promise((resolve, reject) => {\r\n dialogRef.afterClosed().subscribe((result) => {\r\n if (result) {\r\n if (result === \"ACCEPT\") {\r\n resolve(null);\r\n } else if (result === \"CANCEL\") {\r\n reject(result);\r\n } else {\r\n resolve(null);\r\n }\r\n }\r\n });\r\n });\r\n };\r\n\r\n confirmDelete = () => this.confirm(this.translate(\"Delete record(s)\"));\r\n\r\n confirmApprove = () => this.confirm(this.translate(\"Approve record(s)\"));\r\n\r\n confirmWithInput = (\r\n title: string,\r\n option: {\r\n message?: string;\r\n yesTitle?: string;\r\n noTitle?: string;\r\n required?: boolean;\r\n maxlength?: number;\r\n yesButtonColor?: string;\r\n noButtonColor?: string;\r\n defaultValue?: string;\r\n } = {}\r\n ): Promise<string> => {\r\n const dialogRef = this.dialog.open(DialogConfirmComponent, {\r\n width: \"400px\",\r\n data: {\r\n title: title || this.translate(\"Confirm\"),\r\n message: option?.message,\r\n yesTitle: option?.yesTitle || this.translate(\"Yes\"),\r\n noTitle: option?.noTitle || this.translate(\"No\"),\r\n noButtonColor: option?.noButtonColor || \"secondary\",\r\n yesButtonColor: option?.yesButtonColor || \"primary\",\r\n input: {\r\n maxlength: option?.maxlength || 255,\r\n required: option?.required,\r\n defaultValue: option?.defaultValue || ''\r\n },\r\n },\r\n });\r\n return new Promise((resolve, reject) => {\r\n dialogRef.afterClosed().subscribe((result) => {\r\n if (result) {\r\n if (result === \"ACCEPT\") {\r\n resolve(result);\r\n } else if (result === \"CANCEL\") {\r\n reject(result);\r\n } else {\r\n resolve(result);\r\n }\r\n }\r\n });\r\n });\r\n };\r\n\r\n private translate = (value: string): string => {\r\n return this.translateService.translate(value);\r\n };\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { CommonModule } from \"@angular/common\";\r\nimport { MatDialogModule } from \"@angular/material/dialog\";\r\nimport { MatIconModule } from \"@angular/material/icon\";\r\nimport { MatButtonModule } from \"@angular/material/button\";\r\nimport { MatFormFieldModule } from \"@angular/material/form-field\";\r\nimport { MatInputModule } from \"@angular/material/input\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { ToastrService, ToastrModule } from \"ngx-toastr\";\r\nimport { SdButtonModule } from \"@sd-angular/core/button\";\r\n\r\nimport { SdNotifyService } from \"./notify.service\";\r\nimport { DialogConfirmComponent } from \"./components/dialog-confirm/dialog-confirm.component\";\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatDialogModule,\r\n ToastrModule.forRoot(),\r\n\r\n SdButtonModule,\r\n ],\r\n declarations: [DialogConfirmComponent],\r\n entryComponents: [DialogConfirmComponent],\r\n exports: [],\r\n providers: [SdNotifyService],\r\n})\r\nexport class SdNotifyModule {}\r\n","/*\r\n * Public API Surface of superdev-angular-core\r\n */\r\n\r\nexport { SdNotifyModule } from './lib/notify.module';\r\nexport * from './lib/notify.service';\r\nexport * from './lib/components/dialog-confirm/dialog-confirm.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAyBa,sBAAsB;IAGjC,YACS,SAA+C,EACtB,IAAgB;;QADzC,cAAS,GAAT,SAAS,CAAsC;QACtB,SAAI,GAAJ,IAAI,CAAY;QAHlD,aAAQ,GAAG,KAAK,CAAC;QAKf,IAAI,CAAC,QAAQ,GAAG,cAAO,IAAI,CAAC,IAAI,0CAAE,OAAO,CAAA,KAAK,QAAQ,CAAC;QACvD,IAAI,CAAC,KAAK,eAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,0CAAE,YAAY,mCAAI,EAAE,CAAC;KAC9C;;;YAdF,SAAS,SAAC;gBACT,QAAQ,EAAE,mBAAmB;gBAC7B,m+CAA4C;;aAE7C;;;YAvBQ,YAAY;4CA6BhB,MAAM,SAAC,eAAe;;;MCvBd,eAAe;IAC1B,YACU,MAAiB,EACjB,MAAqB,EACrB,gBAAoC;QAFpC,WAAM,GAAN,MAAM,CAAW;QACjB,WAAM,GAAN,MAAM,CAAe;QACrB,qBAAgB,GAAhB,gBAAgB,CAAoB;QAG9C,UAAK,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;yBACjB;6BAAM,IAAI,MAAM,KAAK,QAAQ,EAAE;4BAC9B,MAAM,CAAC,MAAM,CAAC,CAAC;yBAChB;6BAAM;4BACL,OAAO,CAAC,MAAM,CAAC,CAAC;yBACjB;qBACF;iBACF,CAAC,CAAC;aACJ,CAAC,CAAC;SACJ,CAAC;QAEM,cAAS,GAAG,CAAC,KAAa;YAChC,OAAO,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;SAC/C,CAAC;KAlOE;;;YANL,UAAU;;;YALF,SAAS;YAET,aAAa;YACb,kBAAkB;;;MC4Bd,cAAc;;;YAlB1B,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,WAAW;oBACX,kBAAkB;oBAClB,cAAc;oBACd,aAAa;oBACb,eAAe;oBACf,eAAe;oBACf,YAAY,CAAC,OAAO,EAAE;oBAEtB,cAAc;iBACf;gBACD,YAAY,EAAE,CAAC,sBAAsB,CAAC;gBACtC,eAAe,EAAE,CAAC,sBAAsB,CAAC;gBACzC,OAAO,EAAE,EAAE;gBACX,SAAS,EAAE,CAAC,eAAe,CAAC;aAC7B;;;AC/BD;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"sd-angular-core-notify.js","sources":["../../../../projects/sd-core/notify/src/lib/components/dialog-confirm/dialog-confirm.component.ts","../../../../projects/sd-core/notify/src/lib/notify.service.ts","../../../../projects/sd-core/notify/src/lib/notify.module.ts","../../../../projects/sd-core/notify/src/public-api.ts","../../../../projects/sd-core/notify/sd-angular-core-notify.ts"],"sourcesContent":["import { Component, Inject } from \"@angular/core\";\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\r\n\r\nexport interface DialogData {\r\n icon?: string;\r\n title?: string;\r\n message?: string;\r\n yesTitle?: string;\r\n noTitle?: string;\r\n yesButtonColor?: string;\r\n noButtonColor?: string;\r\n input?: {\r\n placeholder?: string;\r\n minlength?: number;\r\n maxlength?: number;\r\n required?: boolean;\r\n defaultValue?: string;\r\n };\r\n}\r\n\r\n@Component({\r\n selector: \"sd-dialog-confirm\",\r\n templateUrl: \"dialog-confirm.component.html\",\r\n styleUrls: [\"./dialog-confirm.component.css\"],\r\n})\r\nexport class DialogConfirmComponent {\r\n value: string;\r\n isString = false;\r\n constructor(\r\n public dialogRef: MatDialogRef<DialogConfirmComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: DialogData\r\n ) {\r\n this.isString = typeof this.data?.message === \"string\";\r\n this.value = data?.input?.defaultValue ?? '';\r\n }\r\n}\r\n","import \"@sd-angular/core/common\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { DialogConfirmComponent } from \"./components/dialog-confirm/dialog-confirm.component\";\r\nimport { ActiveToast, ToastrService } from \"ngx-toastr\";\r\nimport { SdTranslateService } from \"@sd-angular/core/translate\";\r\nimport { takeUntil } from \"rxjs/operators\";\r\n\r\nlet notifyId = 0;\r\n\r\n@Injectable()\r\nexport class SdNotifyService {\r\n constructor(\r\n private dialog: MatDialog,\r\n private toastr: ToastrService,\r\n private translateService: SdTranslateService\r\n ) {}\r\n\r\n alert = {\r\n info: (\r\n message?: string,\r\n title?: string,\r\n yesTitle?: string,\r\n icon?: string\r\n ) => {\r\n this.dialog.open(DialogConfirmComponent, {\r\n width: \"400px\",\r\n data: {\r\n icon: icon || \"info\",\r\n title: title || this.translate(\"Notice\"),\r\n message: message || \"Done!\",\r\n yesTitle: yesTitle || this.translate(\"Ok\"),\r\n },\r\n });\r\n },\r\n success: (\r\n message?: string,\r\n title?: string,\r\n yesTitle?: string,\r\n icon?: string\r\n ) => {\r\n this.dialog.open(DialogConfirmComponent, {\r\n width: \"400px\",\r\n data: {\r\n icon: icon || \"done\",\r\n title: title || this.translate(\"Success\"),\r\n message: message || \"Done!\",\r\n yesTitle: yesTitle || this.translate(\"Ok\"),\r\n },\r\n });\r\n },\r\n warning: (\r\n message?: string,\r\n title?: string,\r\n yesTitle?: string,\r\n icon?: string\r\n ) => {\r\n this.dialog.open(DialogConfirmComponent, {\r\n width: \"400px\",\r\n data: {\r\n icon: icon || \"warning\",\r\n title: title || this.translate(\"Warning\"),\r\n message: message || \"Something went wrong!\",\r\n yesTitle: yesTitle || this.translate(\"Ok\"),\r\n },\r\n });\r\n },\r\n error: (\r\n message?: string,\r\n title?: string,\r\n yesTitle?: string,\r\n icon?: string\r\n ) => {\r\n this.dialog.open(DialogConfirmComponent, {\r\n width: \"400px\",\r\n data: {\r\n icon: icon || \"error\",\r\n title: title || this.translate(\"Error\"),\r\n message: message || \"Something went wrong!\",\r\n yesTitle: yesTitle || this.translate(\"Ok\"),\r\n },\r\n });\r\n },\r\n };\r\n\r\n notify = {\r\n success: (message?: string, delay?: number, title?: string) => {\r\n // tslint:disable-next-line: max-line-length\r\n // 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`;\r\n // tslint:disable-next-line: max-line-length\r\n // const html = `<div id=\"${this.notifyId}\" style=\"${style}\"><i class=\"fa fa-check\"></i> ${message || this.translate('Success')}</div>`;\r\n // this.showNotify(html, delay);\r\n const content = message || this.translate(\"Success\");\r\n this.toastr.success(content, title, {\r\n enableHtml: true,\r\n timeOut: delay || 3000,\r\n closeButton: true,\r\n });\r\n },\r\n warning: (message?: string | string[], delay?: number, title?: string) => {\r\n // tslint:disable-next-line: max-line-length\r\n // const style = `border-radius: 5px; margin: 0; padding: 12px; z-index: 99999; top: 5px; right: 5px; display: none; position: fixed;color: #9F6000; background-color: #FEEFB3`;\r\n // tslint:disable-next-line: max-line-length\r\n // const html = `<div id=\"${this.notifyId}\" style=\"${style}\"><i class=\"fa fa-exclamation-triangle\"></i> ${message || this.translate('Warning')}</div>`;\r\n // this.showNotify(html, delay);\r\n if (Array.isArray(message)){\r\n this.#buildToastMultiMesssage('warning', message, delay, title);\r\n }\r\n else {\r\n const content = message || this.translate(\"Warning\");\r\n this.toastr.warning(content, title, {\r\n enableHtml: true,\r\n timeOut: delay || 3000,\r\n closeButton: true,\r\n });\r\n }\r\n },\r\n error: (message?: string | string[], delay?: number, title?: string) => {\r\n // tslint:disable-next-line: max-line-length\r\n // const style = `border-radius: 5px; margin: 0; padding: 12px; z-index: 99999; top: 5px; right: 5px; display: none; position: fixed;color: #D8000C; background-color: #FFD2D2`;\r\n // tslint:disable-next-line: max-line-length\r\n // const html = `<div id=\"${this.notifyId}\" style=\"${style}\"><i class=\"fa fa-times\"></i> ${message || this.translate('Error')}</div>`;\r\n // this.showNotify(html, delay);\r\n if (Array.isArray(message)){\r\n this.#buildToastMultiMesssage('error', message, delay, title);\r\n }\r\n else {\r\n const content = message || this.translate(\"Error\");\r\n this.toastr.error(content, title, {\r\n enableHtml: true,\r\n timeOut: delay || 3000,\r\n closeButton: true,\r\n });\r\n }\r\n },\r\n };\r\n\r\n #buildToastMultiMesssage = (type: 'warning' | 'error', messages: string[], delay?: number, title?: string) => {\r\n /** số lượng item hiển thị mặc định */\r\n const showNum = 2;\r\n const id = notifyId++;\r\n const messageLength = messages.length;\r\n const messageRests = messages.splice(showNum);\r\n const messageContainer = `<ul class=\"sd-notify__list\">{0}{1}</ul>`;\r\n const messageTemp = `<li class=\"sd-notify__item\">- {0}</li>`;\r\n let contentRest = '';\r\n if (messageRests?.length) {\r\n contentRest = `<input id=\"sd-notify-ckb-${id}\" class=\"cdk-visually-hidden sd-notify__checkbox\" type=\"checkbox\" />\r\n <label class=\"sd-notify__text sd-notify__text--show text-secondary\" for=\"sd-notify-ckb-${id}\">${this.translate('Show more')}</label>\r\n <div class=\"sd-notify__item--rest\">\r\n ${messageRests.map(m => String.format(messageTemp, m)).join('')}\r\n </div>\r\n <label class=\"sd-notify__text sd-notify__text--less text-secondary\" for=\"sd-notify-ckb-${id}\">${this.translate('Show less')}</label>`;\r\n }\r\n const content = String.format(messageContainer, messages.map(m => String.format(messageTemp, m)).join(''), contentRest);\r\n let toast: ActiveToast<any>;\r\n // khi truyền message html sẽ bị sanitize nên phải truyền innerHTML khi toast hiện lên\r\n // @see https://github.com/scttcper/ngx-toastr/blob/v12.1.0/src/lib/toastr/toastr.service.ts#L271\r\n switch (type) {\r\n case 'error':\r\n toast = this.toastr.error(content, `${title || this.translate('Error')} (${messageLength})`, {\r\n enableHtml: true,\r\n timeOut: delay || 3000,\r\n messageClass: `toast-message toast-message-${id}`,\r\n closeButton: true,\r\n tapToDismiss: false\r\n });\r\n break;\r\n case 'warning':\r\n toast = this.toastr.warning(content, `${title || this.translate('Warning')} (${messageLength})`, {\r\n enableHtml: true,\r\n timeOut: delay || 3000,\r\n messageClass: `toast-message toast-message-${id}`,\r\n closeButton: true,\r\n tapToDismiss: false\r\n });\r\n break;\r\n }\r\n \r\n if (toast) {\r\n toast.onShown\r\n .pipe(\r\n takeUntil(toast.onHidden)\r\n )\r\n .subscribe(() => {\r\n const messageEle: HTMLDivElement = document.querySelector(`.toast-message-${id}`);\r\n messageEle.innerHTML = content;\r\n })\r\n }\r\n }\r\n\r\n handle = {\r\n error: (err: any) => {\r\n if (typeof err === \"string\") {\r\n this.notify.warning(err);\r\n } else if (typeof err === \"object\") {\r\n let message =\r\n err?.error ||\r\n err?.message ||\r\n err?.ExceptionMessage ||\r\n err?.Message ||\r\n \"Unknown error\";\r\n if (typeof err.json === \"function\") {\r\n err = err.json();\r\n if (err) {\r\n message =\r\n err?.error ||\r\n err?.message ||\r\n err?.ExceptionMessage ||\r\n err?.Message ||\r\n \"Unknown error\";\r\n }\r\n }\r\n this.notify.warning(message);\r\n } else {\r\n this.notify.warning(\"Unknown error\");\r\n }\r\n },\r\n };\r\n\r\n confirm = (\r\n message: string,\r\n option: {\r\n title?: string;\r\n yesTitle?: string;\r\n noTitle?: string;\r\n yesButtonColor?: string;\r\n noButtonColor?: string;\r\n } = {}\r\n ) => {\r\n const dialogRef = this.dialog.open(DialogConfirmComponent, {\r\n width: \"400px\",\r\n data: {\r\n title: option?.title || this.translate(\"Confirm\"),\r\n message,\r\n yesTitle: option?.yesTitle || this.translate(\"Yes\"),\r\n noTitle: option?.noTitle || this.translate(\"No\"),\r\n noButtonColor: option?.noButtonColor || \"secondary\",\r\n yesButtonColor: option?.yesButtonColor || \"primary\",\r\n },\r\n });\r\n return new Promise((resolve, reject) => {\r\n dialogRef.afterClosed().subscribe((result) => {\r\n if (result) {\r\n if (result === \"ACCEPT\") {\r\n resolve(null);\r\n } else if (result === \"CANCEL\") {\r\n reject(result);\r\n } else {\r\n resolve(null);\r\n }\r\n }\r\n });\r\n });\r\n };\r\n\r\n confirmDelete = () => this.confirm(this.translate(\"Delete record(s)\"));\r\n\r\n confirmApprove = () => this.confirm(this.translate(\"Approve record(s)\"));\r\n\r\n confirmWithInput = (\r\n title: string,\r\n option: {\r\n message?: string;\r\n yesTitle?: string;\r\n noTitle?: string;\r\n required?: boolean;\r\n maxlength?: number;\r\n yesButtonColor?: string;\r\n noButtonColor?: string;\r\n defaultValue?: string;\r\n } = {}\r\n ): Promise<string> => {\r\n const dialogRef = this.dialog.open(DialogConfirmComponent, {\r\n width: \"400px\",\r\n data: {\r\n title: title || this.translate(\"Confirm\"),\r\n message: option?.message,\r\n yesTitle: option?.yesTitle || this.translate(\"Yes\"),\r\n noTitle: option?.noTitle || this.translate(\"No\"),\r\n noButtonColor: option?.noButtonColor || \"secondary\",\r\n yesButtonColor: option?.yesButtonColor || \"primary\",\r\n input: {\r\n maxlength: option?.maxlength || 255,\r\n required: option?.required,\r\n defaultValue: option?.defaultValue || ''\r\n },\r\n },\r\n });\r\n return new Promise((resolve, reject) => {\r\n dialogRef.afterClosed().subscribe((result) => {\r\n if (result) {\r\n if (result === \"ACCEPT\") {\r\n resolve(result);\r\n } else if (result === \"CANCEL\") {\r\n reject(result);\r\n } else {\r\n resolve(result);\r\n }\r\n }\r\n });\r\n });\r\n };\r\n\r\n private translate = (value: string): string => {\r\n return this.translateService.translate(value);\r\n };\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { CommonModule } from \"@angular/common\";\r\nimport { MatDialogModule } from \"@angular/material/dialog\";\r\nimport { MatIconModule } from \"@angular/material/icon\";\r\nimport { MatButtonModule } from \"@angular/material/button\";\r\nimport { MatFormFieldModule } from \"@angular/material/form-field\";\r\nimport { MatInputModule } from \"@angular/material/input\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { ToastrService, ToastrModule } from \"ngx-toastr\";\r\nimport { SdButtonModule } from \"@sd-angular/core/button\";\r\n\r\nimport { SdNotifyService } from \"./notify.service\";\r\nimport { DialogConfirmComponent } from \"./components/dialog-confirm/dialog-confirm.component\";\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatDialogModule,\r\n ToastrModule.forRoot(),\r\n\r\n SdButtonModule,\r\n ],\r\n declarations: [DialogConfirmComponent],\r\n entryComponents: [DialogConfirmComponent],\r\n exports: [],\r\n providers: [SdNotifyService],\r\n})\r\nexport class SdNotifyModule {}\r\n","/*\r\n * Public API Surface of superdev-angular-core\r\n */\r\n\r\nexport { SdNotifyModule } from './lib/notify.module';\r\nexport * from './lib/notify.service';\r\nexport * from './lib/components/dialog-confirm/dialog-confirm.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAyBa,sBAAsB;IAGjC,YACS,SAA+C,EACtB,IAAgB;;QADzC,cAAS,GAAT,SAAS,CAAsC;QACtB,SAAI,GAAJ,IAAI,CAAY;QAHlD,aAAQ,GAAG,KAAK,CAAC;QAKf,IAAI,CAAC,QAAQ,GAAG,cAAO,IAAI,CAAC,IAAI,0CAAE,OAAO,CAAA,KAAK,QAAQ,CAAC;QACvD,IAAI,CAAC,KAAK,eAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,0CAAE,YAAY,mCAAI,EAAE,CAAC;KAC9C;;;YAd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BACjC,SAAS,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,CAAC,MAAM;oBACvC,IAAI,MAAM,EAAE;wBACV,IAAI,MAAM,KAAK,QAAQ,EAAE;4BACvB,OAAO,CAAC,MAAM,CAAC,CAAC;yBACjB;6BAAM,IAAI,MAAM,KAAK,QAAQ,EAAE;4BAC9B,MAAM,CAAC,MAAM,CAAC,CAAC;yBAChB;6BAAM;4BACL,OAAO,CAAC,MAAM,CAAC,CAAC;yBACjB;qBACF;iBACF,CAAC,CAAC;aACJ,CAAC,CAAC;SACJ,CAAC;QAEM,cAAS,GAAG,CAAC,KAAa;YAChC,OAAO,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;SAC/C,CAAC;KAlSE;;;;YANL,UAAU;;;YARF,SAAS;YAEI,aAAa;YAC1B,kBAAkB;;;MC2Bd,cAAc;;;YAlB1B,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,WAAW;oBACX,kBAAkB;oBAClB,cAAc;oBACd,aAAa;oBACb,eAAe;oBACf,eAAe;oBACf,YAAY,CAAC,OAAO,EAAE;oBAEtB,cAAc;iBACf;gBACD,YAAY,EAAE,CAAC,sBAAsB,CAAC;gBACtC,eAAe,EAAE,CAAC,sBAAsB,CAAC;gBACzC,OAAO,EAAE,EAAE;gBACX,SAAS,EAAE,CAAC,eAAe,CAAC;aAC7B;;;AC/BD;;;;ACAA;;;;;;"}
@@ -61,7 +61,7 @@ SdSideDrawer.decorators = [
61
61
  selector: "sd-side-drawer",
62
62
  template: "<ng-template cdkPortal>\r\n <div [id]=\"id\" class=\"side-drawer\" [ngStyle]=\"{'width': width}\" [ngClass]=\"{'side-drawer--active': isOpened,'side-drawer--loading': isLoading}\"\r\n (mouseover)=\"isHover = true\" (mouseout)=\"isHover = false\">\r\n <ng-container *ngIf=\"isOpened\">\r\n <div class=\"side-drawer__header media align-items-center\">\r\n <div class=\"side-drawer__title media-body\">\r\n <ng-content select=\"[sdTitle]\"></ng-content>\r\n </div>\r\n <button type=\"button\" class=\"c-action\" (click)=\"toggleEditable()\" *ngIf=\"editable\" mat-icon-button>\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button type=\"button\" class=\"c-action\" (click)=\"close()\" mat-icon-button>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n <div *ngIf=\"isOpened\" class=\"side-drawer__body\">\r\n <div class=\"side-drawer__content\">\r\n <ng-content select=\"[sdBody]\"></ng-content>\r\n </div>\r\n </div>\r\n <div class=\"side-drawer__footer\">\r\n <ng-content select=\"[sdFooter]\"></ng-content>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <button *ngIf=\"isOpened\" type=\"button\" class=\"side-drawer-backdrop\" (click)=\"close()\"\r\n [ngClass]=\"{ 'side-drawer-backdrop--active': isHover }\"></button>\r\n</ng-template>",
63
63
  changeDetection: ChangeDetectionStrategy.OnPush,
64
- styles: [".text-black400{color:#757575}.side-drawer{background-color:#fff;bottom:0;box-shadow:0 .4px .8px rgba(0,0,0,.1),0 3px 6px rgba(0,0,0,.2);display:flex;flex-direction:column;opacity:0;pointer-events:none;position:fixed;right:0;top:0;transform:translate3d(100%,0,0);transition:all .3s ease-in-out;visibility:hidden;z-index:999}.c-action{color:#212121}.c-action:focus{outline:none}.side-drawer__icon{background:transparent;border:0;color:#212121;outline:none;overflow:hidden}.side-drawer__icon .mat-icon{float:left}.side-drawer__header{min-height:64px;padding:12px 16px}.side-drawer__body{flex:1;position:relative}.side-drawer__content{bottom:0;left:0;overflow:auto;padding:0 16px 16px;position:absolute;right:0;top:0}.side-drawer__footer{border-top:1px solid #dde0e5;padding:5px 0}.side-drawer-backdrop{background:none;border:0;bottom:0;height:100%;left:0;outline:none!important;position:fixed;right:0;top:0;transition:all .3s ease-in-out;width:100%;z-index:99}.side-drawer-backdrop--active{background-color:rgba(0,0,0,.4)}.side-drawer--active{opacity:1;pointer-events:all;transform:translateZ(0);visibility:visible}.side-drawer__title{font-size:20px;font-weight:500;line-height:28px}"]
64
+ styles: [".text-black400{color:#757575}.side-drawer{background-color:#fff;bottom:0;box-shadow:0 .4px .8px rgba(0,0,0,.1),0 3px 6px rgba(0,0,0,.2);display:flex;flex-direction:column;opacity:0;pointer-events:none;position:fixed;right:0;top:0;transform:translate3d(100%,0,0);transition:all .3s ease-in-out;visibility:hidden;z-index:999}.c-action{color:#212121}.c-action:focus{outline:none}.side-drawer__icon{background:transparent;border:0;color:#212121;outline:none;overflow:hidden}.side-drawer__icon .mat-icon{float:left}.side-drawer__header{min-height:64px;padding:12px 16px}.side-drawer__body{flex:1;position:relative}.side-drawer__content{bottom:0;left:0;overflow:auto;padding:0 16px 16px;position:absolute;right:0;top:0}.side-drawer__footer{border-top:1px solid #dde0e5;padding:8px 0}.side-drawer-backdrop{background:none;border:0;bottom:0;height:100%;left:0;outline:none!important;position:fixed;right:0;top:0;transition:all .3s ease-in-out;width:100%;z-index:99}.side-drawer-backdrop--active{background-color:rgba(0,0,0,.4)}.side-drawer--active{opacity:1;pointer-events:all;transform:translateZ(0);visibility:visible}.side-drawer__title{font-size:20px;font-weight:500;line-height:28px}"]
65
65
  },] }
66
66
  ];
67
67
  SdSideDrawer.ctorParameters = () => [
@@ -3,6 +3,7 @@ export interface SdEditorBase<T = any> {
3
3
  addable?: boolean;
4
4
  disabled?: boolean | ((rowData: T) => boolean);
5
5
  onAdd?: (rowData: T, rowDatas?: T[]) => void;
6
+ onRemove?: (rowData: T, rowDatas?: T[]) => void;
6
7
  onEdit?: (rowData: T) => void;
7
8
  onSave?: (rowData: T) => void | Promise<void>;
8
9
  validate?: (rowData: T, idx?: number) => string | Promise<string>;
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"SdNotifyModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":14,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":17,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":21,"character":4},{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialogModule","line":22,"character":4},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"ngx-toastr","name":"ToastrModule","line":23,"character":4},"member":"forRoot"}},{"__symbolic":"reference","module":"@sd-angular/core/button","name":"SdButtonModule","line":25,"character":4}],"declarations":[{"__symbolic":"reference","name":"DialogConfirmComponent"}],"entryComponents":[{"__symbolic":"reference","name":"DialogConfirmComponent"}],"exports":[],"providers":[{"__symbolic":"reference","name":"SdNotifyService"}]}]}],"members":{}},"SdNotifyService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialog","line":9,"character":20},{"__symbolic":"reference","module":"ngx-toastr","name":"ToastrService","line":10,"character":20},{"__symbolic":"reference","module":"@sd-angular/core/translate","name":"SdTranslateService","line":11,"character":30}]}]}},"DialogData":{"__symbolic":"interface"},"DialogConfirmComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":20,"character":1},"arguments":[{"selector":"sd-dialog-confirm","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","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}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":30,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/material/dialog","name":"MAT_DIALOG_DATA","line":30,"character":12}]}]],"parameters":[{"__symbolic":"reference","name":"MatDialogRef","module":"@angular/material/dialog","arguments":[{"__symbolic":"reference","name":"DialogConfirmComponent"}]},{"__symbolic":"reference","name":"any"}]}]}}},"origins":{"SdNotifyModule":"./src/lib/notify.module","SdNotifyService":"./src/lib/notify.service","DialogData":"./src/lib/components/dialog-confirm/dialog-confirm.component","DialogConfirmComponent":"./src/lib/components/dialog-confirm/dialog-confirm.component"},"importAs":"@sd-angular/core/notify"}
1
+ {"__symbolic":"module","version":4,"metadata":{"SdNotifyModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":14,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":17,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":21,"character":4},{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialogModule","line":22,"character":4},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"ngx-toastr","name":"ToastrModule","line":23,"character":4},"member":"forRoot"}},{"__symbolic":"reference","module":"@sd-angular/core/button","name":"SdButtonModule","line":25,"character":4}],"declarations":[{"__symbolic":"reference","name":"DialogConfirmComponent"}],"entryComponents":[{"__symbolic":"reference","name":"DialogConfirmComponent"}],"exports":[],"providers":[{"__symbolic":"reference","name":"SdNotifyService"}]}]}],"members":{}},"SdNotifyService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":10,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialog","line":13,"character":20},{"__symbolic":"reference","module":"ngx-toastr","name":"ToastrService","line":14,"character":20},{"__symbolic":"reference","module":"@sd-angular/core/translate","name":"SdTranslateService","line":15,"character":30}]}]}},"DialogData":{"__symbolic":"interface"},"DialogConfirmComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":20,"character":1},"arguments":[{"selector":"sd-dialog-confirm","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","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}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":30,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/material/dialog","name":"MAT_DIALOG_DATA","line":30,"character":12}]}]],"parameters":[{"__symbolic":"reference","name":"MatDialogRef","module":"@angular/material/dialog","arguments":[{"__symbolic":"reference","name":"DialogConfirmComponent"}]},{"__symbolic":"reference","name":"any"}]}]}}},"origins":{"SdNotifyModule":"./src/lib/notify.module","SdNotifyService":"./src/lib/notify.service","DialogData":"./src/lib/components/dialog-confirm/dialog-confirm.component","DialogConfirmComponent":"./src/lib/components/dialog-confirm/dialog-confirm.component"},"importAs":"@sd-angular/core/notify"}
@@ -1,7 +1,9 @@
1
+ import "@sd-angular/core/common";
1
2
  import { MatDialog } from "@angular/material/dialog";
2
3
  import { ToastrService } from "ngx-toastr";
3
4
  import { SdTranslateService } from "@sd-angular/core/translate";
4
5
  export declare class SdNotifyService {
6
+ #private;
5
7
  private dialog;
6
8
  private toastr;
7
9
  private translateService;
@@ -14,8 +16,8 @@ export declare class SdNotifyService {
14
16
  };
15
17
  notify: {
16
18
  success: (message?: string, delay?: number, title?: string) => void;
17
- warning: (message?: string, delay?: number, title?: string) => void;
18
- error: (message?: string, delay?: number, title?: string) => void;
19
+ warning: (message?: string | string[], delay?: number, title?: string) => void;
20
+ error: (message?: string | string[], delay?: number, title?: string) => void;
19
21
  };
20
22
  handle: {
21
23
  error: (err: any) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sd-angular/core",
3
- "version": "1.0.20",
3
+ "version": "1.0.23",
4
4
  "homepage": "https://www.facebook.com/DarkP3ter",
5
5
  "author": {
6
6
  "name": "darkpeter",
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"SdSideDrawer":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":19,"character":1},"arguments":[{"selector":"sd-side-drawer","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":23,"character":19},"member":"OnPush"},"template":"<ng-template cdkPortal>\r\n <div [id]=\"id\" class=\"side-drawer\" [ngStyle]=\"{'width': width}\" [ngClass]=\"{'side-drawer--active': isOpened,'side-drawer--loading': isLoading}\"\r\n (mouseover)=\"isHover = true\" (mouseout)=\"isHover = false\">\r\n <ng-container *ngIf=\"isOpened\">\r\n <div class=\"side-drawer__header media align-items-center\">\r\n <div class=\"side-drawer__title media-body\">\r\n <ng-content select=\"[sdTitle]\"></ng-content>\r\n </div>\r\n <button type=\"button\" class=\"c-action\" (click)=\"toggleEditable()\" *ngIf=\"editable\" mat-icon-button>\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button type=\"button\" class=\"c-action\" (click)=\"close()\" mat-icon-button>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n <div *ngIf=\"isOpened\" class=\"side-drawer__body\">\r\n <div class=\"side-drawer__content\">\r\n <ng-content select=\"[sdBody]\"></ng-content>\r\n </div>\r\n </div>\r\n <div class=\"side-drawer__footer\">\r\n <ng-content select=\"[sdFooter]\"></ng-content>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <button *ngIf=\"isOpened\" type=\"button\" class=\"side-drawer-backdrop\" (click)=\"close()\"\r\n [ngClass]=\"{ 'side-drawer-backdrop--active': isHover }\"></button>\r\n</ng-template>","styles":[".text-black400{color:#757575}.side-drawer{background-color:#fff;bottom:0;box-shadow:0 .4px .8px rgba(0,0,0,.1),0 3px 6px rgba(0,0,0,.2);display:flex;flex-direction:column;opacity:0;pointer-events:none;position:fixed;right:0;top:0;transform:translate3d(100%,0,0);transition:all .3s ease-in-out;visibility:hidden;z-index:999}.c-action{color:#212121}.c-action:focus{outline:none}.side-drawer__icon{background:transparent;border:0;color:#212121;outline:none;overflow:hidden}.side-drawer__icon .mat-icon{float:left}.side-drawer__header{min-height:64px;padding:12px 16px}.side-drawer__body{flex:1;position:relative}.side-drawer__content{bottom:0;left:0;overflow:auto;padding:0 16px 16px;position:absolute;right:0;top:0}.side-drawer__footer{border-top:1px solid #dde0e5;padding:5px 0}.side-drawer-backdrop{background:none;border:0;bottom:0;height:100%;left:0;outline:none!important;position:fixed;right:0;top:0;transition:all .3s ease-in-out;width:100%;z-index:99}.side-drawer-backdrop--active{background-color:rgba(0,0,0,.4)}.side-drawer--active{opacity:1;pointer-events:all;transform:translateZ(0);visibility:visible}.side-drawer__title{font-size:20px;font-weight:500;line-height:28px}"]}]}],"members":{"portal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":27,"character":3},"arguments":[{"__symbolic":"reference","module":"@angular/cdk/portal","name":"CdkPortal","line":27,"character":13}]}]}],"title":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":3}}]}],"editable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":29,"character":3}}]}],"width":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"editingChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":31,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":39,"character":17},{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef","line":40,"character":16},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":41,"character":22},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":42,"character":17},{"__symbolic":"reference","module":"@sd-angular/core/loading","name":"SdLoadingService","line":43,"character":28}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"toggleEditable":[{"__symbolic":"method"}]}},"SdSideDrawerModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":10,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":12,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":13,"character":4},{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialogModule","line":14,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":15,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/button","name":"SdButtonModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/cdk/portal","name":"PortalModule","line":17,"character":4}],"declarations":[{"__symbolic":"reference","name":"SdSideDrawer"}],"exports":[{"__symbolic":"reference","name":"SdSideDrawer"}],"providers":[]}]}],"members":{}}},"origins":{"SdSideDrawer":"./src/lib/side-drawer/side-drawer.component","SdSideDrawerModule":"./src/lib/side-drawer.module"},"importAs":"@sd-angular/core/side-drawer"}
1
+ {"__symbolic":"module","version":4,"metadata":{"SdSideDrawer":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":19,"character":1},"arguments":[{"selector":"sd-side-drawer","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":23,"character":19},"member":"OnPush"},"template":"<ng-template cdkPortal>\r\n <div [id]=\"id\" class=\"side-drawer\" [ngStyle]=\"{'width': width}\" [ngClass]=\"{'side-drawer--active': isOpened,'side-drawer--loading': isLoading}\"\r\n (mouseover)=\"isHover = true\" (mouseout)=\"isHover = false\">\r\n <ng-container *ngIf=\"isOpened\">\r\n <div class=\"side-drawer__header media align-items-center\">\r\n <div class=\"side-drawer__title media-body\">\r\n <ng-content select=\"[sdTitle]\"></ng-content>\r\n </div>\r\n <button type=\"button\" class=\"c-action\" (click)=\"toggleEditable()\" *ngIf=\"editable\" mat-icon-button>\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button type=\"button\" class=\"c-action\" (click)=\"close()\" mat-icon-button>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n <div *ngIf=\"isOpened\" class=\"side-drawer__body\">\r\n <div class=\"side-drawer__content\">\r\n <ng-content select=\"[sdBody]\"></ng-content>\r\n </div>\r\n </div>\r\n <div class=\"side-drawer__footer\">\r\n <ng-content select=\"[sdFooter]\"></ng-content>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <button *ngIf=\"isOpened\" type=\"button\" class=\"side-drawer-backdrop\" (click)=\"close()\"\r\n [ngClass]=\"{ 'side-drawer-backdrop--active': isHover }\"></button>\r\n</ng-template>","styles":[".text-black400{color:#757575}.side-drawer{background-color:#fff;bottom:0;box-shadow:0 .4px .8px rgba(0,0,0,.1),0 3px 6px rgba(0,0,0,.2);display:flex;flex-direction:column;opacity:0;pointer-events:none;position:fixed;right:0;top:0;transform:translate3d(100%,0,0);transition:all .3s ease-in-out;visibility:hidden;z-index:999}.c-action{color:#212121}.c-action:focus{outline:none}.side-drawer__icon{background:transparent;border:0;color:#212121;outline:none;overflow:hidden}.side-drawer__icon .mat-icon{float:left}.side-drawer__header{min-height:64px;padding:12px 16px}.side-drawer__body{flex:1;position:relative}.side-drawer__content{bottom:0;left:0;overflow:auto;padding:0 16px 16px;position:absolute;right:0;top:0}.side-drawer__footer{border-top:1px solid #dde0e5;padding:8px 0}.side-drawer-backdrop{background:none;border:0;bottom:0;height:100%;left:0;outline:none!important;position:fixed;right:0;top:0;transition:all .3s ease-in-out;width:100%;z-index:99}.side-drawer-backdrop--active{background-color:rgba(0,0,0,.4)}.side-drawer--active{opacity:1;pointer-events:all;transform:translateZ(0);visibility:visible}.side-drawer__title{font-size:20px;font-weight:500;line-height:28px}"]}]}],"members":{"portal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":27,"character":3},"arguments":[{"__symbolic":"reference","module":"@angular/cdk/portal","name":"CdkPortal","line":27,"character":13}]}]}],"title":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":3}}]}],"editable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":29,"character":3}}]}],"width":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"editingChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":31,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":39,"character":17},{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef","line":40,"character":16},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":41,"character":22},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":42,"character":17},{"__symbolic":"reference","module":"@sd-angular/core/loading","name":"SdLoadingService","line":43,"character":28}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"toggleEditable":[{"__symbolic":"method"}]}},"SdSideDrawerModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":10,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":12,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":13,"character":4},{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialogModule","line":14,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":15,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/button","name":"SdButtonModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/cdk/portal","name":"PortalModule","line":17,"character":4}],"declarations":[{"__symbolic":"reference","name":"SdSideDrawer"}],"exports":[{"__symbolic":"reference","name":"SdSideDrawer"}],"providers":[]}]}],"members":{}}},"origins":{"SdSideDrawer":"./src/lib/side-drawer/side-drawer.component","SdSideDrawerModule":"./src/lib/side-drawer.module"},"importAs":"@sd-angular/core/side-drawer"}