@sd-angular/core 0.0.1044 → 0.0.1048

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 (59) hide show
  1. package/assets/scss/sd-core.scss +8 -0
  2. package/autocomplete/src/lib/autocomplete.component.d.ts +1 -1
  3. package/badge/sd-angular-core-badge.metadata.json +1 -1
  4. package/bundles/sd-angular-core-autocomplete.umd.js +4 -1
  5. package/bundles/sd-angular-core-autocomplete.umd.js.map +1 -1
  6. package/bundles/sd-angular-core-autocomplete.umd.min.js +1 -1
  7. package/bundles/sd-angular-core-autocomplete.umd.min.js.map +1 -1
  8. package/bundles/sd-angular-core-badge.umd.js +1 -1
  9. package/bundles/sd-angular-core-badge.umd.js.map +1 -1
  10. package/bundles/sd-angular-core-badge.umd.min.js +1 -1
  11. package/bundles/sd-angular-core-badge.umd.min.js.map +1 -1
  12. package/bundles/sd-angular-core-comment.umd.js +1 -1
  13. package/bundles/sd-angular-core-comment.umd.min.js +2 -2
  14. package/bundles/sd-angular-core-comment.umd.min.js.map +1 -1
  15. package/bundles/sd-angular-core-common.umd.js +38 -2
  16. package/bundles/sd-angular-core-common.umd.js.map +1 -1
  17. package/bundles/sd-angular-core-common.umd.min.js +1 -1
  18. package/bundles/sd-angular-core-common.umd.min.js.map +1 -1
  19. package/bundles/sd-angular-core-editor.umd.js +6 -3
  20. package/bundles/sd-angular-core-editor.umd.js.map +1 -1
  21. package/bundles/sd-angular-core-editor.umd.min.js +1 -1
  22. package/bundles/sd-angular-core-editor.umd.min.js.map +1 -1
  23. package/bundles/sd-angular-core-grid-material.umd.js +2 -2
  24. package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
  25. package/bundles/sd-angular-core-grid-material.umd.min.js +1 -1
  26. package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
  27. package/bundles/sd-angular-core-setting.umd.js +1 -1
  28. package/bundles/sd-angular-core-setting.umd.js.map +1 -1
  29. package/bundles/sd-angular-core-setting.umd.min.js +1 -1
  30. package/bundles/sd-angular-core-setting.umd.min.js.map +1 -1
  31. package/comment/sd-angular-core-comment.metadata.json +1 -1
  32. package/common/sd-angular-core-common.metadata.json +1 -1
  33. package/common/src/lib/directives/sd-scroll.directive.d.ts +10 -0
  34. package/common/src/public-api.d.ts +1 -0
  35. package/esm2015/autocomplete/src/lib/autocomplete.component.js +6 -3
  36. package/esm2015/badge/src/lib/badge.component.js +2 -2
  37. package/esm2015/comment/src/lib/comment.component.js +1 -1
  38. package/esm2015/common/src/lib/common.module.js +6 -3
  39. package/esm2015/common/src/lib/directives/sd-scroll.directive.js +34 -0
  40. package/esm2015/common/src/public-api.js +2 -1
  41. package/esm2015/editor/src/lib/editor.component.js +7 -4
  42. package/esm2015/grid-material/src/lib/grid-material.component.js +3 -3
  43. package/esm2015/setting/src/lib/setting.service.js +2 -2
  44. package/fesm2015/sd-angular-core-autocomplete.js +5 -2
  45. package/fesm2015/sd-angular-core-autocomplete.js.map +1 -1
  46. package/fesm2015/sd-angular-core-badge.js +1 -1
  47. package/fesm2015/sd-angular-core-badge.js.map +1 -1
  48. package/fesm2015/sd-angular-core-comment.js +1 -1
  49. package/fesm2015/sd-angular-core-common.js +39 -4
  50. package/fesm2015/sd-angular-core-common.js.map +1 -1
  51. package/fesm2015/sd-angular-core-editor.js +6 -3
  52. package/fesm2015/sd-angular-core-editor.js.map +1 -1
  53. package/fesm2015/sd-angular-core-grid-material.js +2 -2
  54. package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
  55. package/fesm2015/sd-angular-core-setting.js +1 -1
  56. package/fesm2015/sd-angular-core-setting.js.map +1 -1
  57. package/grid-material/sd-angular-core-grid-material.metadata.json +1 -1
  58. package/package.json +1 -1
  59. package/{sd-angular-core-0.0.1044.tgz → sd-angular-core-0.0.1048.tgz} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"sd-angular-core-editor.js","sources":["../../../../projects/sd-core/editor/src/lib/constant.ts","../../../../projects/sd-core/editor/src/lib/editor.component.ts","../../../../projects/sd-core/editor/src/lib/editor.module.ts","../../../../projects/sd-core/editor/src/public-api.ts","../../../../projects/sd-core/editor/sd-angular-core-editor.ts"],"sourcesContent":["export const Constants = {\r\n ARE_YOU_WANT_TO_DELETE: 'Are you sure you want to delete?',\r\n ACTIVE: 'active',\r\n IN_ACTIVE: 'inactive',\r\n APPROVE: 'approve',\r\n UN_APPROVE: 'unapprove',\r\n ACCEPT_SIZE_IMAGE: 'Logo only accept image with size <= 2MB',\r\n ACCEPT_TYPE_IMAGE:\r\n 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon',\r\n PAGE_TYPE_NEW: 'new',\r\n PAGE_TYPE_EDIT: 'edit',\r\n SAVE: 'saveOb',\r\n SAVE_AND_CONTINUE: 'saveAndContOb',\r\n IMAGE_SIZE: 2048000,\r\n SUCCESS: 'Success',\r\n IMPORT_SUCCESSFULLY: 'Import successfully!',\r\n ERROR: 'Error',\r\n FAILED: 'fail',\r\n FILE: 'file',\r\n NONE: 'none',\r\n NOT_EXIST_ID_OR_LINK: 'This ID/Link is not existing',\r\n FEATURE_IS_PENDING: 'This feature is pending',\r\n NOT_SUPPORT_FILE_IMAGE: 'File upload is not supported.',\r\n NOT_SUPPORT_FILE_IMPORT: 'File import is not supported.',\r\n NETWORK_ERROR: 'Network Error',\r\n SORT_BY: [\r\n {\r\n value: 0,\r\n name: 'Created Date'\r\n },\r\n {\r\n value: 1,\r\n name: 'Title'\r\n }\r\n ],\r\n DESC: [\r\n {\r\n value: true,\r\n name: 'Descending'\r\n },\r\n {\r\n value: false,\r\n name: 'Ascending'\r\n }\r\n ],\r\n FORM_ERRORS: {\r\n Id: '',\r\n textSearch: '',\r\n ImportLogId: '',\r\n SortBy: '',\r\n Reverse: '',\r\n },\r\n VALIDATION_MESSAGES: {}\r\n};\r\n\r\nexport const PROMOTION_PERMISSIONS = ['ListPromotion', 'AddNewPromotion', 'EditPromotion',\r\n 'ActiveOrInactivePromotion', 'RemovePromotion', 'ImportPromotion', 'ExportPromotion'];\r\n\r\nexport const ValidateMessageConstants = {\r\n TITLE_REQUIRED: 'Title is required',\r\n TITLE_MAXLENGTH: 'Title is not more than 55 characters',\r\n TITLE_PATTERN: 'Title is required',\r\n\r\n CREATED_AT_REQUIRED: 'Created At is required',\r\n\r\n SHOW_ON_HOME_REQUIRED: 'Show On Home is required',\r\n\r\n DISPLAY_NUMBER_REQUIRED: 'Display Number is required',\r\n\r\n CONTENT_TYPE_REQUIRED: 'Content Type is required',\r\n\r\n DISCOUNT_PERCENT_REQUIRED: 'Discount percent is required',\r\n DISCOUNT_PERCENT_MAX: 'Max discount percent is 100, cannot input greater',\r\n DISCOUNT_PERCENT_MIN: 'Min discount percent is 0, cannot input lower'\r\n};\r\n\r\nexport const PROMOTION_FORM = {\r\n FORM_ERRORS: {\r\n title: '',\r\n createdAt: '',\r\n displayNumber: '',\r\n showOnHome: '',\r\n discountPercent: '',\r\n isActive: '',\r\n ctaLabelName: '',\r\n ctaDeepLink: '',\r\n tags: ''\r\n },\r\n VALIDATION_MESSAGES: {\r\n title: {\r\n required: ValidateMessageConstants.TITLE_REQUIRED,\r\n maxlength: ValidateMessageConstants.TITLE_MAXLENGTH,\r\n pattern: ValidateMessageConstants.TITLE_PATTERN\r\n },\r\n createdAt: {\r\n required: ValidateMessageConstants.CREATED_AT_REQUIRED\r\n },\r\n showOnHome: {\r\n required: ValidateMessageConstants.SHOW_ON_HOME_REQUIRED\r\n },\r\n displayNumber: {\r\n required: ValidateMessageConstants.DISPLAY_NUMBER_REQUIRED\r\n },\r\n discountPercent: {\r\n required: ValidateMessageConstants.DISCOUNT_PERCENT_REQUIRED,\r\n max: ValidateMessageConstants.DISCOUNT_PERCENT_MAX,\r\n min: ValidateMessageConstants.DISCOUNT_PERCENT_MIN\r\n },\r\n tags: {\r\n required: ValidateMessageConstants.CONTENT_TYPE_REQUIRED\r\n }\r\n }\r\n};\r\n","import {\r\n Component,\r\n ViewChild,\r\n Input,\r\n OnInit,\r\n Output,\r\n EventEmitter,\r\n ChangeDetectorRef,\r\n AfterViewInit, OnDestroy\r\n} from '@angular/core';\r\nimport {QuillEditorComponent} from 'ngx-quill';\r\nimport * as uuid from 'uuid';\r\nimport {FormControl, FormGroup, NgForm, ValidatorFn, Validators} from '@angular/forms';\r\nimport {Constants} from './constant';\r\nimport {Subscription} from 'rxjs';\r\nimport {SdApiService} from '@sd-angular/core/api';\r\nimport 'quill-mention';\r\n\r\n@Component({\r\n selector: 'sd-editor',\r\n templateUrl: './editor.component.html',\r\n styleUrls: ['./editor.component.scss'],\r\n})\r\nexport class SdEditor implements OnInit, AfterViewInit, OnDestroy {\r\n #name = `N${uuid.v4()}`;\r\n id: string = `I${uuid.v4()}`;\r\n #subscription = new Subscription();\r\n @ViewChild('editor') editor: QuillEditorComponent;\r\n @Input() label: string;\r\n #model: string;\r\n @Input() set model(val: string) {\r\n this.#model = val;\r\n this.modelHTML = val;\r\n this.formControl.setValue(this.#model, {\r\n emitEvent: false\r\n });\r\n this.ref.detectChanges();\r\n }\r\n\r\n @Input() set disabled(val: boolean | '') {\r\n val = (val === '') || val;\r\n if (val) {\r\n this.formControl.disable();\r\n } else {\r\n this.formControl.enable();\r\n }\r\n }\r\n\r\n required = false;\r\n\r\n @Input() set pRequired(val: boolean | '') {\r\n this.required = (val === '') || val;\r\n this.#updateValidator();\r\n }\r\n\r\n minlength: number;\r\n\r\n @Input('minlength') set _minlength(val: number) {\r\n this.minlength = +val;\r\n this.#updateValidator();\r\n }\r\n\r\n maxlength: number;\r\n\r\n @Input('maxlength') set _maxlength(val: number) {\r\n this.maxlength = +val;\r\n this.#updateValidator();\r\n }\r\n\r\n @Output() modelChange = new EventEmitter<string>();\r\n\r\n @Input() placeholder: string = '';\r\n\r\n @Input() styles: any = {height: '250px'};\r\n\r\n formControl = new FormControl();\r\n\r\n @Input() domain = '';\r\n @Input() urlUploadImage: string;\r\n #form: FormGroup;\r\n @Input() set form(val: NgForm | FormGroup) {\r\n if (val) {\r\n if (val instanceof NgForm) {\r\n this.#form = val.form;\r\n } else {\r\n this.#form = val;\r\n }\r\n }\r\n }\r\n\r\n @Input() toolbar: any;\r\n @Input() enableHTMLButton = false;\r\n showHtmlEditor = false;\r\n modelHTML: string;\r\n\r\n quillEvent: any;\r\n @Input() mentionValues: { id: string, value: string, link?: string }[];\r\n\r\n quillConfig = {\r\n // toolbar: '.toolbar',\r\n toolbar: {\r\n container: [\r\n ['bold', 'italic', 'underline', 'strike'], // toggled buttons\r\n ['blockquote', 'code-block'],\r\n\r\n [{'header': 1}, {'header': 2}], // custom button values\r\n [{'list': 'ordered'}, {'list': 'bullet'}],\r\n [{'script': 'sub'}, {'script': 'super'}], // superscript/subscript\r\n [{'indent': '-1'}, {'indent': '+1'}], // outdent/indent\r\n [{'direction': 'rtl'}], // text direction\r\n\r\n [{'size': ['small', false, 'large', 'huge']}], // custom dropdown\r\n [{'header': [1, 2, 3, 4, 5, 6, false]}],\r\n\r\n [{'color': []}, {'background': []}], // dropdown with defaults from theme\r\n [{'font': []}],\r\n [{'align': []}],\r\n\r\n ['clean'], // remove formatting button\r\n\r\n ['link', 'image', 'video'] // link and image, video\r\n ]\r\n },\r\n mention: {\r\n allowedChars: /^[A-Za-z\\sÅÄÖåäö]*$/,\r\n mentionDenotationChars: ['@'],\r\n source: (searchTerm, renderList, mentionChar) => {\r\n if (this.mentionValues) {\r\n let values;\r\n if (mentionChar === '@') {\r\n values = this.mentionValues;\r\n } else {\r\n values = [];\r\n }\r\n\r\n if (searchTerm.length === 0) {\r\n renderList(values, searchTerm);\r\n } else {\r\n const matches = [];\r\n // tslint:disable-next-line:prefer-for-of\r\n for (let i = 0; i < values.length; i++) {\r\n // tslint:disable-next-line:no-bitwise\r\n if (~values[i].value.toLowerCase().indexOf(searchTerm.toLowerCase())) {\r\n matches.push(values[i]);\r\n }\r\n }\r\n renderList(matches, searchTerm);\r\n }\r\n }\r\n },\r\n },\r\n keyboard: {\r\n bindings: {\r\n enter: {\r\n key: 13,\r\n handler: (range, context) => {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n textLength: number = 0;\r\n @Output() sdChange = new EventEmitter<string>();\r\n\r\n constructor(\r\n private ref: ChangeDetectorRef,\r\n private sdApiService: SdApiService\r\n ) {\r\n }\r\n\r\n ngOnInit() {\r\n this.#form?.addControl(this.#name, this.formControl);\r\n if (this.toolbar) {\r\n this.quillConfig.toolbar.container = this.toolbar;\r\n console.log('toolbar', this.quillConfig);\r\n }\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.#subscription.add(this.formControl.valueChanges.subscribe((val) => {\r\n this.modelChange.emit(val);\r\n this.sdChange.emit(val);\r\n }));\r\n }\r\n\r\n ngOnDestroy() {\r\n this.#form?.removeControl(this.#name);\r\n this.#subscription.unsubscribe();\r\n }\r\n\r\n #updateValidator = () => {\r\n this.formControl.clearValidators();\r\n this.formControl.clearAsyncValidators();\r\n const validators: ValidatorFn[] = [];\r\n if (this.required) {\r\n validators.push(Validators.required);\r\n }\r\n if (this.minlength > 0) {\r\n validators.push(Validators.minLength(this.minlength));\r\n }\r\n if (this.maxlength > 0) {\r\n validators.push(Validators.maxLength(this.maxlength));\r\n }\r\n this.formControl.setValidators(validators);\r\n this.formControl.updateValueAndValidity();\r\n }\r\n\r\n editorInit = (quill) => {\r\n this.quillEvent = quill;\r\n // const txtArea = document.createElement('textarea');\r\n // txtArea.style.cssText =\r\n // 'width: 100%;margin: 0px;background: rgb(29, 29, 29);' +\r\n // 'box-sizing: border-box;color: rgb(204, 204, 204);' +\r\n // 'font-size: 15px;outline: none;padding: 20px;' +\r\n // 'line-height: 24px;font-family: Consolas, Menlo, Monaco, &quot;Courier New&quot;, monospace;' +\r\n // 'position: absolute;top: 0;bottom: 0;border: none;display:none';\r\n\r\n // const htmlEditor = quill.addContainer('ql-custom');\r\n // htmlEditor.appendChild(txtArea);\r\n\r\n // const myEditor = quill.container;\r\n // quill.on('text-change', (delta, oldDelta, source) => {\r\n // const html = myEditor.children[0].innerHTML;\r\n // txtArea.value = html;\r\n // // if (quill.getLength() > this.maxlength) {\r\n // // quill.deleteText(this.maxlength, quill.getLength());\r\n // // }\r\n // // this.formControl.setValue(html);\r\n // });\r\n\r\n const self = this;\r\n quill.getModule('toolbar').addHandler('image', function () {\r\n let fileInput = this.container.querySelector('input.ql-image[type=file]');\r\n\r\n if (fileInput == null) {\r\n fileInput = document.createElement('input');\r\n fileInput.setAttribute('type', Constants.FILE);\r\n fileInput.setAttribute('accept', 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon');\r\n fileInput.classList.add('ql-image');\r\n fileInput.addEventListener('change', () => {\r\n const files = fileInput.files;\r\n const range = this.quill.getSelection(true);\r\n if (!files || !files.length) {\r\n return;\r\n }\r\n\r\n const formData = new FormData();\r\n formData.append(Constants.FILE, files[0]);\r\n\r\n this.quill.enable(false);\r\n /*this.apiService.post(this.domain + this.urlUploadImage, formData).subscribe((resp: any) => {\r\n this.quill.enable(true);\r\n this.quill.editor.insertEmbed(range.index, 'image', resp.data.imageUrl || resp.data.publish_url || resp.url);\r\n const content = this.quill.getContents();\r\n this.quill.setContents(content);\r\n this.quill.setSelection(range.index + 1, 'silent');\r\n fileInput.value = '';\r\n });*/\r\n self.#uploadImage(formData, quill, range, fileInput);\r\n });\r\n this.container.appendChild(fileInput);\r\n }\r\n fileInput.click();\r\n });\r\n }\r\n\r\n onModelChange = (val: string) => {\r\n this.formControl.setValue(val);\r\n this.modelHTML = val;\r\n }\r\n\r\n onClickShowHtmlEditor = () => {\r\n this.showHtmlEditor = !this.showHtmlEditor;\r\n }\r\n\r\n #uploadImage = (formData, quill, range, fileInput) => {\r\n if (!this.urlUploadImage) {\r\n this.urlUploadImage = '/partner/v2/merchandise/file/uploaduserfile';\r\n }\r\n // this.domain = 'https://api-commerce-qc.vinid.dev';\r\n this.sdApiService.post(this.urlUploadImage, formData).then((resp: any) => {\r\n quill.enable(true);\r\n quill.editor.insertEmbed(range.index, 'image', resp?.data?.imageUrl || resp?.data?.publish_url || resp?.url || '');\r\n const content = quill.getContents();\r\n quill.setContents(content);\r\n quill.setSelection(range.index + 1, 'silent');\r\n fileInput.value = '';\r\n });\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { QuillModule } from 'ngx-quill';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { SdEditor } from './editor.component';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdTranslateModule } from '@sd-angular/core/translate';\r\nimport {SdButtonModule} from '@sd-angular/core/button';\r\nimport {SdTextareaModule} from '@sd-angular/core/textarea';\r\nimport {SdApiModule, SdApiService} from '@sd-angular/core/api';\r\n\r\n@NgModule({\r\n declarations: [SdEditor],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n QuillModule.forRoot(),\r\n SdTranslateModule,\r\n SdButtonModule,\r\n SdTextareaModule,\r\n SdApiModule\r\n ],\r\n exports: [SdEditor],\r\n providers: [],\r\n})\r\nexport class SdEditorModule { }\r\n","/*\r\n * Public API Surface of superdev-angular-core\r\n */\r\n\r\nexport * from './lib/editor.module';\r\nexport * from './lib/constant';\r\nexport * from './lib/editor.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuid.v4"],"mappings":";;;;;;;;;;;;;MAAa,SAAS,GAAG;IACrB,sBAAsB,EAAE,kCAAkC;IAC1D,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,UAAU;IACrB,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,WAAW;IACvB,iBAAiB,EAAE,yCAAyC;IAC5D,iBAAiB,EACf,2DAA2D;IAC7D,aAAa,EAAE,KAAK;IACpB,cAAc,EAAE,MAAM;IACtB,IAAI,EAAE,QAAQ;IACd,iBAAiB,EAAE,eAAe;IAClC,UAAU,EAAE,OAAO;IACnB,OAAO,EAAE,SAAS;IAClB,mBAAmB,EAAE,sBAAsB;IAC3C,KAAK,EAAE,OAAO;IACd,MAA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,CAAC,QAAQ,CAAC;gBACxB,OAAO,EAAE;oBACP,YAAY;oBACZ,WAAW;oBACX,mBAAmB;oBACnB,WAAW,CAAC,OAAO,EAAE;oBACrB,iBAAiB;oBACjB,cAAc;oBACd,gBAAgB;oBAChB,WAAW;iBACZ;gBACD,OAAO,EAAE,CAAC,QAAQ,CAAC;gBACnB,SAAS,EAAE,EAAE;aACd;;;ACxBD;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"sd-angular-core-editor.js","sources":["../../../../projects/sd-core/editor/src/lib/constant.ts","../../../../projects/sd-core/editor/src/lib/editor.component.ts","../../../../projects/sd-core/editor/src/lib/editor.module.ts","../../../../projects/sd-core/editor/src/public-api.ts","../../../../projects/sd-core/editor/sd-angular-core-editor.ts"],"sourcesContent":["export const Constants = {\r\n ARE_YOU_WANT_TO_DELETE: 'Are you sure you want to delete?',\r\n ACTIVE: 'active',\r\n IN_ACTIVE: 'inactive',\r\n APPROVE: 'approve',\r\n UN_APPROVE: 'unapprove',\r\n ACCEPT_SIZE_IMAGE: 'Logo only accept image with size <= 2MB',\r\n ACCEPT_TYPE_IMAGE:\r\n 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon',\r\n PAGE_TYPE_NEW: 'new',\r\n PAGE_TYPE_EDIT: 'edit',\r\n SAVE: 'saveOb',\r\n SAVE_AND_CONTINUE: 'saveAndContOb',\r\n IMAGE_SIZE: 2048000,\r\n SUCCESS: 'Success',\r\n IMPORT_SUCCESSFULLY: 'Import successfully!',\r\n ERROR: 'Error',\r\n FAILED: 'fail',\r\n FILE: 'file',\r\n NONE: 'none',\r\n NOT_EXIST_ID_OR_LINK: 'This ID/Link is not existing',\r\n FEATURE_IS_PENDING: 'This feature is pending',\r\n NOT_SUPPORT_FILE_IMAGE: 'File upload is not supported.',\r\n NOT_SUPPORT_FILE_IMPORT: 'File import is not supported.',\r\n NETWORK_ERROR: 'Network Error',\r\n SORT_BY: [\r\n {\r\n value: 0,\r\n name: 'Created Date'\r\n },\r\n {\r\n value: 1,\r\n name: 'Title'\r\n }\r\n ],\r\n DESC: [\r\n {\r\n value: true,\r\n name: 'Descending'\r\n },\r\n {\r\n value: false,\r\n name: 'Ascending'\r\n }\r\n ],\r\n FORM_ERRORS: {\r\n Id: '',\r\n textSearch: '',\r\n ImportLogId: '',\r\n SortBy: '',\r\n Reverse: '',\r\n },\r\n VALIDATION_MESSAGES: {}\r\n};\r\n\r\nexport const PROMOTION_PERMISSIONS = ['ListPromotion', 'AddNewPromotion', 'EditPromotion',\r\n 'ActiveOrInactivePromotion', 'RemovePromotion', 'ImportPromotion', 'ExportPromotion'];\r\n\r\nexport const ValidateMessageConstants = {\r\n TITLE_REQUIRED: 'Title is required',\r\n TITLE_MAXLENGTH: 'Title is not more than 55 characters',\r\n TITLE_PATTERN: 'Title is required',\r\n\r\n CREATED_AT_REQUIRED: 'Created At is required',\r\n\r\n SHOW_ON_HOME_REQUIRED: 'Show On Home is required',\r\n\r\n DISPLAY_NUMBER_REQUIRED: 'Display Number is required',\r\n\r\n CONTENT_TYPE_REQUIRED: 'Content Type is required',\r\n\r\n DISCOUNT_PERCENT_REQUIRED: 'Discount percent is required',\r\n DISCOUNT_PERCENT_MAX: 'Max discount percent is 100, cannot input greater',\r\n DISCOUNT_PERCENT_MIN: 'Min discount percent is 0, cannot input lower'\r\n};\r\n\r\nexport const PROMOTION_FORM = {\r\n FORM_ERRORS: {\r\n title: '',\r\n createdAt: '',\r\n displayNumber: '',\r\n showOnHome: '',\r\n discountPercent: '',\r\n isActive: '',\r\n ctaLabelName: '',\r\n ctaDeepLink: '',\r\n tags: ''\r\n },\r\n VALIDATION_MESSAGES: {\r\n title: {\r\n required: ValidateMessageConstants.TITLE_REQUIRED,\r\n maxlength: ValidateMessageConstants.TITLE_MAXLENGTH,\r\n pattern: ValidateMessageConstants.TITLE_PATTERN\r\n },\r\n createdAt: {\r\n required: ValidateMessageConstants.CREATED_AT_REQUIRED\r\n },\r\n showOnHome: {\r\n required: ValidateMessageConstants.SHOW_ON_HOME_REQUIRED\r\n },\r\n displayNumber: {\r\n required: ValidateMessageConstants.DISPLAY_NUMBER_REQUIRED\r\n },\r\n discountPercent: {\r\n required: ValidateMessageConstants.DISCOUNT_PERCENT_REQUIRED,\r\n max: ValidateMessageConstants.DISCOUNT_PERCENT_MAX,\r\n min: ValidateMessageConstants.DISCOUNT_PERCENT_MIN\r\n },\r\n tags: {\r\n required: ValidateMessageConstants.CONTENT_TYPE_REQUIRED\r\n }\r\n }\r\n};\r\n","import {\r\n Component,\r\n ViewChild,\r\n Input,\r\n OnInit,\r\n Output,\r\n EventEmitter,\r\n ChangeDetectorRef,\r\n AfterViewInit, OnDestroy\r\n} from '@angular/core';\r\nimport {QuillEditorComponent} from 'ngx-quill';\r\nimport * as uuid from 'uuid';\r\nimport {FormControl, FormGroup, NgForm, ValidatorFn, Validators} from '@angular/forms';\r\nimport {Constants} from './constant';\r\nimport {Subscription} from 'rxjs';\r\nimport {SdApiService} from '@sd-angular/core/api';\r\nimport 'quill-mention';\r\n\r\n@Component({\r\n selector: 'sd-editor',\r\n templateUrl: './editor.component.html',\r\n styleUrls: ['./editor.component.scss'],\r\n})\r\nexport class SdEditor implements OnInit, AfterViewInit, OnDestroy {\r\n #name = `N${uuid.v4()}`;\r\n id: string = `I${uuid.v4()}`;\r\n #subscription = new Subscription();\r\n @ViewChild('editor') editor: QuillEditorComponent;\r\n @Input() label: string;\r\n #model: string;\r\n @Input() set model(val: string) {\r\n this.#model = val;\r\n this.modelHTML = val;\r\n this.formControl.setValue(this.#model, {\r\n emitEvent: false\r\n });\r\n this.ref.detectChanges();\r\n }\r\n\r\n @Input() set disabled(val: boolean | '') {\r\n val = (val === '') || val;\r\n if (val) {\r\n this.formControl.disable();\r\n } else {\r\n this.formControl.enable();\r\n }\r\n }\r\n\r\n required = false;\r\n\r\n @Input() set pRequired(val: boolean | '') {\r\n this.required = (val === '') || val;\r\n this.#updateValidator();\r\n }\r\n\r\n minlength: number;\r\n\r\n @Input('minlength') set _minlength(val: number) {\r\n this.minlength = +val;\r\n this.#updateValidator();\r\n }\r\n\r\n maxlength: number;\r\n\r\n @Input('maxlength') set _maxlength(val: number) {\r\n this.maxlength = +val;\r\n this.#updateValidator();\r\n }\r\n\r\n @Output() modelChange = new EventEmitter<string>();\r\n\r\n @Input() placeholder: string = '';\r\n\r\n @Input() styles: any = {height: '250px'};\r\n\r\n formControl = new FormControl();\r\n\r\n @Input() domain = '';\r\n @Input() urlUploadImage: string;\r\n #form: FormGroup;\r\n @Input() set form(val: NgForm | FormGroup) {\r\n if (val) {\r\n if (val instanceof NgForm) {\r\n this.#form = val.form;\r\n } else {\r\n this.#form = val;\r\n }\r\n }\r\n }\r\n\r\n @Input() toolbar: any;\r\n @Input() enableHTMLButton = false;\r\n showHtmlEditor = false;\r\n modelHTML: string;\r\n\r\n quillEvent: any;\r\n @Input() mentionValues: { id: string, value: string, link?: string }[];\r\n\r\n quillConfig = {\r\n // toolbar: '.toolbar',\r\n toolbar: {\r\n container: [\r\n ['bold', 'italic', 'underline', 'strike'], // toggled buttons\r\n ['blockquote', 'code-block'],\r\n\r\n [{'header': 1}, {'header': 2}], // custom button values\r\n [{'list': 'ordered'}, {'list': 'bullet'}],\r\n [{'script': 'sub'}, {'script': 'super'}], // superscript/subscript\r\n [{'indent': '-1'}, {'indent': '+1'}], // outdent/indent\r\n [{'direction': 'rtl'}], // text direction\r\n\r\n [{'size': ['small', false, 'large', 'huge']}], // custom dropdown\r\n [{'header': [1, 2, 3, 4, 5, 6, false]}],\r\n\r\n [{'color': []}, {'background': []}], // dropdown with defaults from theme\r\n [{'font': []}],\r\n [{'align': []}],\r\n\r\n ['clean'], // remove formatting button\r\n\r\n ['link', 'image', 'video'] // link and image, video\r\n ]\r\n },\r\n mention: {\r\n allowedChars: /^[A-Za-z\\sÅÄÖåäö]*$/,\r\n mentionDenotationChars: ['@'],\r\n source: (searchTerm, renderList, mentionChar) => {\r\n if (this.mentionValues) {\r\n let values;\r\n if (mentionChar === '@') {\r\n values = this.mentionValues;\r\n } else {\r\n values = [];\r\n }\r\n\r\n if (searchTerm.length === 0) {\r\n renderList(values, searchTerm);\r\n } else {\r\n const matches = [];\r\n // tslint:disable-next-line:prefer-for-of\r\n for (let i = 0; i < values.length; i++) {\r\n // tslint:disable-next-line:no-bitwise\r\n if (~values[i].value.toLowerCase().indexOf(searchTerm.toLowerCase())) {\r\n matches.push(values[i]);\r\n }\r\n }\r\n renderList(matches, searchTerm);\r\n }\r\n }\r\n },\r\n },\r\n keyboard: {\r\n bindings: {\r\n enter: {\r\n key: 13,\r\n handler: (range, context) => {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n textLength: number = 0;\r\n @Output() sdChange = new EventEmitter<string>();\r\n\r\n constructor(\r\n private ref: ChangeDetectorRef,\r\n private sdApiService: SdApiService\r\n ) {\r\n }\r\n\r\n ngOnInit() {\r\n this.#form?.addControl(this.#name, this.formControl);\r\n if (this.toolbar) {\r\n this.quillConfig.toolbar.container = this.toolbar;\r\n console.log('toolbar', this.quillConfig);\r\n }\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.#subscription.add(this.formControl.valueChanges.subscribe((val) => {\r\n this.modelChange.emit(val);\r\n this.sdChange.emit(val);\r\n }));\r\n }\r\n\r\n ngOnDestroy() {\r\n this.#form?.removeControl(this.#name);\r\n this.#subscription.unsubscribe();\r\n }\r\n\r\n #updateValidator = () => {\r\n this.formControl.clearValidators();\r\n this.formControl.clearAsyncValidators();\r\n const validators: ValidatorFn[] = [];\r\n if (this.required) {\r\n validators.push(Validators.required);\r\n }\r\n if (this.minlength > 0) {\r\n validators.push(Validators.minLength(this.minlength));\r\n }\r\n if (this.maxlength > 0) {\r\n validators.push(Validators.maxLength(this.maxlength));\r\n }\r\n this.formControl.setValidators(validators);\r\n this.formControl.updateValueAndValidity();\r\n }\r\n\r\n editorInit = (quill) => {\r\n this.quillEvent = quill;\r\n // const txtArea = document.createElement('textarea');\r\n // txtArea.style.cssText =\r\n // 'width: 100%;margin: 0px;background: rgb(29, 29, 29);' +\r\n // 'box-sizing: border-box;color: rgb(204, 204, 204);' +\r\n // 'font-size: 15px;outline: none;padding: 20px;' +\r\n // 'line-height: 24px;font-family: Consolas, Menlo, Monaco, &quot;Courier New&quot;, monospace;' +\r\n // 'position: absolute;top: 0;bottom: 0;border: none;display:none';\r\n\r\n // const htmlEditor = quill.addContainer('ql-custom');\r\n // htmlEditor.appendChild(txtArea);\r\n\r\n // const myEditor = quill.container;\r\n // quill.on('text-change', (delta, oldDelta, source) => {\r\n // const html = myEditor.children[0].innerHTML;\r\n // txtArea.value = html;\r\n // // if (quill.getLength() > this.maxlength) {\r\n // // quill.deleteText(this.maxlength, quill.getLength());\r\n // // }\r\n // // this.formControl.setValue(html);\r\n // });\r\n\r\n const self = this;\r\n quill.getModule('toolbar').addHandler('image', function () {\r\n let fileInput = this.container.querySelector('input.ql-image[type=file]');\r\n\r\n if (fileInput == null) {\r\n fileInput = document.createElement('input');\r\n fileInput.setAttribute('type', Constants.FILE);\r\n fileInput.setAttribute('accept', 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon');\r\n fileInput.classList.add('ql-image');\r\n fileInput.addEventListener('change', () => {\r\n const files = fileInput.files;\r\n const range = this.quill.getSelection(true);\r\n if (!files || !files.length) {\r\n return;\r\n }\r\n\r\n const formData = new FormData();\r\n formData.append(Constants.FILE, files[0]);\r\n\r\n this.quill.enable(false);\r\n /*this.apiService.post(this.domain + this.urlUploadImage, formData).subscribe((resp: any) => {\r\n this.quill.enable(true);\r\n this.quill.editor.insertEmbed(range.index, 'image', resp.data.imageUrl || resp.data.publish_url || resp.url);\r\n const content = this.quill.getContents();\r\n this.quill.setContents(content);\r\n this.quill.setSelection(range.index + 1, 'silent');\r\n fileInput.value = '';\r\n });*/\r\n self.#uploadImage(formData, quill, range, fileInput);\r\n });\r\n this.container.appendChild(fileInput);\r\n }\r\n fileInput.click();\r\n });\r\n }\r\n\r\n onModelChange = (val: string) => {\r\n this.formControl.setValue(val);\r\n this.modelHTML = val;\r\n }\r\n\r\n onClickShowHtmlEditor = () => {\r\n this.showHtmlEditor = !this.showHtmlEditor;\r\n }\r\n\r\n #uploadImage = (formData, quill, range, fileInput) => {\r\n if (!this.urlUploadImage) {\r\n this.urlUploadImage = '/partner/v2/merchandise/file/uploaduserfile';\r\n }\r\n // this.domain = 'https://api-commerce-qc.vinid.dev';\r\n this.sdApiService.post(this.urlUploadImage, formData).then((resp: any) => {\r\n quill.enable(true);\r\n // quill.editor.insertEmbed(range.index, 'image', resp?.data?.imageUrl || resp?.data?.publish_url || resp?.url || '');\r\n quill.getModule('clipboard').dangerouslyPasteHTML(range.index, '<a target=\"_blank\" href=\"' + (resp?.data?.imageUrl || resp?.data?.publish_url || resp?.url || '')\r\n + '\"><img src=\"' + (resp?.data?.imageUrl || resp?.data?.publish_url || resp?.url || '') + '\" alt=\"c-image-editor-quill\"></a>', 'user');\r\n // quill.insertText();\r\n const content = quill.getContents();\r\n quill.setContents(content);\r\n quill.setSelection(range.index + 1, 'user');\r\n fileInput.value = '';\r\n });\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { QuillModule } from 'ngx-quill';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { SdEditor } from './editor.component';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdTranslateModule } from '@sd-angular/core/translate';\r\nimport {SdButtonModule} from '@sd-angular/core/button';\r\nimport {SdTextareaModule} from '@sd-angular/core/textarea';\r\nimport {SdApiModule, SdApiService} from '@sd-angular/core/api';\r\n\r\n@NgModule({\r\n declarations: [SdEditor],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n QuillModule.forRoot(),\r\n SdTranslateModule,\r\n SdButtonModule,\r\n SdTextareaModule,\r\n SdApiModule\r\n ],\r\n exports: [SdEditor],\r\n providers: [],\r\n})\r\nexport class SdEditorModule { }\r\n","/*\r\n * Public API Surface of superdev-angular-core\r\n */\r\n\r\nexport * from './lib/editor.module';\r\nexport * from './lib/constant';\r\nexport * from './lib/editor.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuid.v4"],"mappings":";;;;;;;;;;;;;MAAa,SAAS,GAAG;IACrB,sBAAsB,EAAE,kCAAkC;IAC1D,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,UAAU;IACrB,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,WAAW;IACvB,iBAAiB,EAAE,yCAAyC;IAC5D,iBAAiB,EACf,2DAA2D;IAC7D,aAAa,EAAE,KAAK;IACpB,cAAc,EAAE,MAAM;IACtB,IAAI,EAAE,QAAQ;IACd,iBAAiB,EAAE,eAAe;IAClC,UAAU,EAAE,OAAO;IACnB,OAAO,EAAE,SAAS;IAClB,mBAAmB,EAAE,sBAAsB;IAC3C,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,oBAAoB,EAAE,8BAA8B;IACpD,kBAAkB,EAAE,yBAAyB;IAC7C,sBAAsB,EAAE,+BAA+B;IACvD,uBAAuB,EAAE,+BAA+B;IACxD,aAAa,EAAE,eAAe;IAC9B,OAAO,EAAE;QACP;YACE,KAAK,EAAE,CAAC;YACR,IAAI,EAAE,cAAc;SACrB;QACD;YACE,KAAK,EAAE,CAAC;YACR,IAAI,EAAE,OAAO;SACd;KACF;IACD,IAAI,EAAE;QACJ;YACE,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,YAAY;SACnB;QACD;YACE,KAAK,EAAE,KAAK;YACZ,IAAI,EAAE,WAAW;SAClB;KACF;IACD,WAAW,EAAE;QACT,EAAE,EAAE,EAAE;QACN,UAAU,EAAE,EAAE;QACd,WAAW,EAAE,EAAE;QACf,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,EAAE;KACZ;IACH,mBAAmB,EAAE,EAAE;EACzB;MAEW,qBAAqB,GAAG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1975
  { type: Component, args: [{
1976
1976
  selector: 'sd-grid-material',
1977
- template: "<ng-container *ngIf=\"gridConfigurationObserver | async as gridConfiguration\">\r\n <ng-container *ngIf=\"\r\n gridConfiguration\r\n | sdGridConfigurationResult\r\n : gridOption\r\n : sdSubInformation as configuration\r\n \">\r\n <ng-container *ngIf=\"!gridOption.filter?.disabled\">\r\n <sd-grid-filter [filter]=\"gridOption?.filter\" [columns]=\"configuration.firstColumns\" [filterDefs]=\"filterDefs\">\r\n </sd-grid-filter>\r\n </ng-container>\r\n <div class=\"c-container {{ gridOption?.style?.grid }}\" [ngClass]=\"{ 'mat-elevation-z2': gridOption?.shadow }\">\r\n <div class=\"c-loading\" *ngIf=\"isLoading\">\r\n <mat-spinner *ngIf=\"isLoading\"></mat-spinner>\r\n </div>\r\n <ng-container>\r\n <div class=\"c-table\" [ngStyle]=\"{\r\n 'max-height': gridOption?.maxHeight,\r\n 'min-height': gridOption?.minHeight\r\n }\">\r\n <table *ngIf=\"items?.length; else elseEmpty\" mat-table [dataSource]=\"items\" matSort\r\n [matSortDisabled]=\"!gridOption.sortable\" cdkDropList cdkDropListOrientation=\"horizontal\"\r\n [cdkDropListDisabled]=\"!gridOption.dropDragColumnEnable\"\r\n (cdkDropListDropped)=\"drop($event, configuration.displayedColumns)\" multiTemplateDataRows>\r\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\r\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"configuration.displayedColumns.length\">\r\n <div *ngIf=\"sdSubInformation?.templateRef\" [@detailExpand]=\"item.isExpanded ? 'expanded' : 'collapsed'\">\r\n <ng-container *ngIf=\"item.isExpanded\">\r\n <ng-container *ngTemplateOutlet=\"\r\n sdSubInformation.templateRef;\r\n context: { item: item }\r\n \">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\r\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 1px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button *ngIf=\"!element.isExpanding\" mat-icon-button aria-label=\"Expand & Collapse\"\r\n (click)=\"onExpand(element)\">\r\n <mat-icon *ngIf=\"!element.isExpanded\">expand_more</mat-icon>\r\n <mat-icon *ngIf=\"element.isExpanded\">expand_less</mat-icon>\r\n </button>\r\n <div *ngIf=\"element.isExpanding\" class=\"lds-ring\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdSelection\" sticky>\r\n <th class=\"text-center px-15\" mat-header-cell *matHeaderCellDef style=\"min-width: 50px; max-width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\">\r\n <ng-container *ngIf=\"items | selectionVisibleSelectAll: gridOption?.selection | async\">\r\n <mat-checkbox *ngIf=\"!gridOption.selection?.single\" class=\"c-selection\" color=\"primary\"\r\n [(ngModel)]=\"isSelectAll\" (change)=\"onSelectAll()\">\r\n </mat-checkbox>\r\n </ng-container>\r\n\r\n </th>\r\n <td class=\"text-center px-15\" mat-cell *matCellDef=\"let item\" style=\"min-width: 50px; max-width: 50px\">\r\n <ng-container *ngIf=\"item | selectionVisible:gridOption?.selection\">\r\n <mat-checkbox class=\"c-selection\" color=\"primary\" [(ngModel)]=\"item.isSelected\"\r\n (change)=\"onSelect(item)\" [disabled]=\"\r\n selectedItems | selectionDisable: item:gridOption?.selection\r\n \">\r\n </mat-checkbox>\r\n </ng-container>\r\n\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdEditorValidation\">\r\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 2px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\">\r\n </th>\r\n <td class=\"p-0 position-relative\" mat-cell *matCellDef=\"let item; index as idx\">\r\n <sd-desktop-editor-validation [sdId]=\"item.sdId\" [item]=\"item\" [items]=\"items\" [gridOption]=\"gridOption\">\r\n </sd-desktop-editor-validation>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdEditor\">\r\n <th class=\"px-8 py-8\" mat-header-cell *matHeaderCellDef style=\"width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\">\r\n <button class=\"c-btn-add\"\r\n *ngIf=\"gridOption.editor?.addable && (!gridOption.editor.limit || gridOption.editor.limit > items.length)\"\r\n (click)=\"onCreate()\" aria-hidden=\"true\" mat-icon-button>\r\n <mat-icon class=\"c-icon-add\">add</mat-icon>\r\n </button>\r\n </th>\r\n <td class=\"px-8\" mat-cell *matCellDef=\"let item; index as idx\">\r\n <ng-container *sdLet=\"item.editorStatus | sdEditorHandlerRow:item:gridOption as editorHandler\">\r\n <div *ngIf=\"editorHandler\" class=\"d-flex align-items-center justify-content-center\">\r\n <button *ngIf=\"editorHandler.editable\" class=\"mx-2\" (click)=\"onUpdate(item)\" aria-hidden=\"true\"\r\n mat-icon-button>\r\n <mat-icon class=\"c-icon\">edit</mat-icon>\r\n </button>\r\n <button *ngIf=\"editorHandler.removable\" class=\"mx-2\" (click)=\"onRemove(item)\" aria-hidden=\"true\"\r\n mat-icon-button>\r\n <mat-icon class=\"c-icon\">delete</mat-icon>\r\n </button>\r\n <button *ngIf=\"editorHandler.savable\" class=\"mx-2\" (click)=\"onSave(item)\" aria-hidden=\"true\"\r\n mat-icon-button>\r\n <mat-icon class=\"c-icon\">save</mat-icon>\r\n </button>\r\n <button *ngIf=\"editorHandler.cancelable\" class=\"mx-2\" (click)=\"onCancel(item)\" aria-hidden=\"true\"\r\n mat-icon-button>\r\n <mat-icon class=\"c-icon\">close</mat-icon>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdCommand\">\r\n <th class=\"px-8 py-8\" mat-header-cell *matHeaderCellDef style=\"width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td class=\"px-8\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-command [commands]=\"gridOption.commands\" [item]=\"item\"></sd-desktop-command>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of configuration.firstColumns; let i = index\" [matColumnDef]=\"column.field\"\r\n [sticky]=\"configuration.fixedColumn[column.field]\">\r\n <th mat-header-cell *matHeaderCellDef cdkDrag class=\"px-8 py-8 c-th\"\r\n [ngStyle]=\"{ 'min-width': configuration.firstColumns[i].width }\" [attr.rowspan]=\"\r\n configuration.multipleHeader && column.type !== 'children-col'\r\n ? 2\r\n : 1\r\n \" [attr.colspan]=\"\r\n column.type === 'children-col' ? column.children?.length : 1\r\n \">\r\n <div>\r\n <div aria-hidden=\"false\" role=\"presentation\" mat-sort-header [disabled]=\"\r\n !column.sortable || column.type === 'children-col'\r\n \" [innerHTML]=\"configuration.firstColumns[i].titleHtml || configuration.firstColumns[i].title\">\r\n </div>\r\n <sd-column-inline-filter *ngIf=\"gridOption.filter?.inlineColumn\" [value]=\"columnFilter[column.field]\"\r\n [columnFilter]=\"columnFilter\" [column]=\"column\" (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n <td class=\"c-td px-8\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-cell [sdId]=\"item.sdId\" [key]=\"key\" [value]=\"item[column.field]\" [column]=\"column\"\r\n [item]=\"item\" [idx]=\"i\" [cellDef]=\"cellDef\" [gridOption]=\"gridOption\">\r\n </sd-desktop-cell>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-container *ngIf=\"footerDef[column.field]\">\r\n <ng-container *ngTemplateOutlet=\"\r\n footerDef[column.field].templateRef;\r\n context: { items: items, column: column }\r\n \">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of configuration.secondColumns; let i = index\"\r\n [matColumnDef]=\"column.field\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"c-th px-8\"\r\n [ngStyle]=\"{ 'min-width': column.width }\">\r\n <div>\r\n <div [innerHTML]=\"column.titleHtml || column.title\"></div>\r\n <sd-column-inline-filter *ngIf=\"gridOption.filter?.inlineColumn\" [value]=\"columnFilter[column.field]\"\r\n [columnFilter]=\"columnFilter\" [column]=\"column\" (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n <td class=\"c-td px-8\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-cell [sdId]=\"item.sdId\" [key]=\"key\" [value]=\"item[column.field]\" [column]=\"column\"\r\n [item]=\"item\" [idx]=\"i\" [cellDef]=\"cellDef\" [gridOption]=\"gridOption\">\r\n </sd-desktop-cell>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-container *ngIf=\"footerDef[column.field]\">\r\n <ng-container *ngTemplateOutlet=\"\r\n footerDef[column.field].templateRef;\r\n context: { items: items, column: column }\r\n \">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"configuration.firstHeaders; sticky: true\"></tr>\r\n <ng-container *ngIf=\"configuration.secondHeaders?.length\">\r\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"configuration.secondHeaders; sticky: true\">\r\n </tr>\r\n </ng-container>\r\n <tr mat-row *matRowDef=\"let row; columns: configuration.displayedColumns\" matRipple class=\"c-row\"\r\n [class.selected]=\"row.isSelected\" [style]=\"row | sdStyleRowCss:gridOption\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']\" class=\"c-detail-row\"></tr>\r\n <ng-container *ngIf=\"hasFooter && configuration.displayedFooters?.length\">\r\n <tr mat-footer-row *matFooterRowDef=\"configuration.displayedFooters; sticky: true\"></tr>\r\n </ng-container>\r\n </table>\r\n <ng-template #elseEmpty>\r\n <table mat-table [dataSource]=\"[{}]\">\r\n <ng-container matColumnDef=\"sdSelection\" sticky>\r\n <th class=\"px-15\" mat-header-cell *matHeaderCellDef style=\"min-width: 50px; max-width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdEditorValidation\">\r\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 4px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\">\r\n </th>\r\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\">\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdEditor\">\r\n <th class=\"px-8\" mat-header-cell *matHeaderCellDef style=\"min-width: 50px; max-width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\">\r\n <button class=\"c-btn-add\"\r\n *ngIf=\"gridOption.editor?.addable && (!gridOption.editor.limit || gridOption.editor.limit > items.length)\"\r\n (click)=\"onCreate()\" aria-hidden=\"true\" mat-icon-button>\r\n <mat-icon class=\"c-icon-add\">add</mat-icon>\r\n </button>\r\n </th>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdCommand\">\r\n <th class=\"px-8\" mat-header-cell *matHeaderCellDef style=\"min-width: 50px; max-width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdSubInformationAction\">\r\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 1px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdEmpty\">\r\n <td class=\"c-empty\" mat-cell *matCellDef=\"let item\"\r\n [attr.colspan]=\"configuration.displayedColumns.length\">\r\n <ng-container *ngIf=\"sdEmptyData?.templateRef; else sdEmptyDataNoRef\">\r\n <ng-container *ngTemplateOutlet=\"\r\n sdEmptyData.templateRef;\r\n context: { item: item }\r\n \">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #sdEmptyDataNoRef>\r\n <mat-icon fontSet=\"material-icons-outlined\">leaderboard</mat-icon>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of configuration.columns\" [matColumnDef]=\"column.field\"\r\n [sticky]=\"configuration.fixedColumn[column.field]\">\r\n <th mat-header-cell *matHeaderCellDef class=\"c-th px-8 py-8\" [ngStyle]=\"{ 'min-width': column.width }\">\r\n <div [innerHTML]=\"column.titleHtml || column.title\"></div>\r\n </th>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of configuration.firstColumns; let i = index\"\r\n [matColumnDef]=\"column.field\" [sticky]=\"configuration.fixedColumn[column.field]\">\r\n <th mat-header-cell *matHeaderCellDef class=\"c-th px-8 py-8\"\r\n [ngStyle]=\"{ 'min-width': configuration.firstColumns[i].width }\" [attr.rowspan]=\"\r\n configuration.multipleHeader &&\r\n column.type !== 'children-col'\r\n ? 2\r\n : 1\r\n \" [attr.colspan]=\"\r\n column.type === 'children-col' ? column.children?.length : 1\r\n \">\r\n <div>\r\n <div [innerHTML]=\"configuration.firstColumns[i].titleHtml || configuration.firstColumns[i].title\">\r\n </div>\r\n <sd-column-inline-filter *ngIf=\"gridOption.filter?.inlineColumn\"\r\n [value]=\"columnFilter[column.field]\" [columnFilter]=\"columnFilter\" [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\"></sd-column-inline-filter>\r\n </div>\r\n </th>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of configuration.secondColumns\" [matColumnDef]=\"column.field\">\r\n <th mat-header-cell *matHeaderCellDef class=\"c-th px-8 py-8\" [ngStyle]=\"{ 'min-width': column.width }\">\r\n <div>\r\n <div [innerHTML]=\"column.titleHtml || column.title\"></div>\r\n <sd-column-inline-filter *ngIf=\"gridOption.filter?.inlineColumn\"\r\n [value]=\"columnFilter[column.field]\" [columnFilter]=\"columnFilter\" [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\"></sd-column-inline-filter>\r\n </div>\r\n </th>\r\n </ng-container>\r\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"configuration.firstHeaders; sticky: true\">\r\n </tr>\r\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"configuration.secondHeaders; sticky: true\">\r\n </tr>\r\n <tr mat-row *matRowDef=\"let row; columns: ['sdEmpty']\"></tr>\r\n </table>\r\n </ng-template>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-paginator\">\r\n <div class=\"c-action\">\r\n <sd-button *ngIf=\"\r\n !gridOption.filter?.disabled && !gridOption.filter?.inlineColumn\r\n \" class=\"mr-10\" [title]=\"'Filter' | sdTranslate\" icon=\"filter_alt\" size=\"sm\" (action)=\"gridFilter.open()\"\r\n type=\"link\">\r\n </sd-button>\r\n <sd-button *ngIf=\"gridOption.reload?.visible\" class=\"mr-10\" [title]=\"'Reload' | sdTranslate\" icon=\"refresh\"\r\n size=\"sm\" (action)=\"reload()\" [disabled]=\"!items?.length\" type=\"link\">\r\n </sd-button>\r\n <ng-container *ngIf=\"gridOption.export?.visible && items?.length\">\r\n <ng-container *ngIf=\"isExporting; else unExporting\">\r\n <sd-button class=\"mr-10\" [loading]=\"isExporting\" [title]=\"exportTitle | sdTranslate\" icon=\"get_app\"\r\n size=\"sm\" type=\"link\">\r\n </sd-button>\r\n </ng-container>\r\n <ng-template #unExporting>\r\n <sd-button class=\"mr-10\" [title]=\"exportTitle | sdTranslate\" icon=\"get_app\" size=\"sm\"\r\n [matMenuTriggerFor]=\"menu\" type=\"link\">\r\n </sd-button>\r\n </ng-template>\r\n\r\n <mat-menu #menu=\"matMenu\">\r\n <button *ngIf=\"gridOption.export?.visibleExcel !== false\" mat-menu-item\r\n (click)=\"sdPopupExport.exportDefault()\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">file_download</mat-icon>\r\n <span> {{ \"Export excel\" | sdTranslate }}</span>\r\n </button>\r\n <button *ngIf=\"gridOption.export?.visibleCSV !== false\" mat-menu-item\r\n (click)=\"sdPopupExport.exportDefault(true)\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">file_download</mat-icon>\r\n <span> {{ \"Export CSV\" | sdTranslate }}</span>\r\n </button>\r\n <button *ngIf=\"gridOption.export?.key\" mat-menu-item (click)=\"sdPopupExport.open()\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">settings</mat-icon>\r\n <span> {{ \"Configure\" | sdTranslate }}</span>\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n <sd-button *ngIf=\"gridOption.config?.visible\" class=\"mr-10\" [title]=\"'Configure' | sdTranslate\"\r\n icon=\"settings\" size=\"sm\" (action)=\"popupGridConfiguration.open()\" type=\"link\">\r\n </sd-button>\r\n </div>\r\n <mat-paginator [class.d-none]=\"gridOption.paginate?.hidden\" [length]=\"total\"\r\n [pageSize]=\"gridOption.paginate?.pageSize\" [pageSizeOptions]=\"gridOption.paginate?.pages\"\r\n [showFirstLastButtons]=\"gridOption.paginate?.showFirstLastButtons\"></mat-paginator>\r\n </div>\r\n </div>\r\n <sd-popup-export *ngIf=\"gridOption.export?.visible\" [gridOption]=\"gridOption\" (export)=\"onExport($event)\"\r\n #sdPopupExport>\r\n </sd-popup-export>\r\n <sd-popup-grid-configuration [gridOption]=\"gridOption\" [key]=\"key\" #popupGridConfiguration>\r\n </sd-popup-grid-configuration>\r\n </ng-container>\r\n</ng-container>\r\n<sd-grid-quick-action [gridOption]=\"gridOption\" [selectedItems]=\"selectedItems\" (clear)=\"onClearSelection()\">\r\n</sd-grid-quick-action>",
1977
+ template: "<ng-container *ngIf=\"gridConfigurationObserver | async as gridConfiguration\">\r\n <ng-container *ngIf=\"\r\n gridConfiguration\r\n | sdGridConfigurationResult\r\n : gridOption\r\n : sdSubInformation as configuration\r\n \">\r\n <ng-container *ngIf=\"!gridOption.filter?.disabled\">\r\n <sd-grid-filter [filter]=\"gridOption?.filter\" [columns]=\"configuration.firstColumns\" [filterDefs]=\"filterDefs\">\r\n </sd-grid-filter>\r\n </ng-container>\r\n <div class=\"c-container {{ gridOption?.style?.grid }}\" [ngClass]=\"{ 'mat-elevation-z2': gridOption?.shadow }\">\r\n <div class=\"c-loading\" *ngIf=\"isLoading\">\r\n <mat-spinner *ngIf=\"isLoading\"></mat-spinner>\r\n </div>\r\n <ng-container>\r\n <div class=\"c-table\" sdScroll [ngStyle]=\"{\r\n 'max-height': gridOption?.maxHeight,\r\n 'min-height': gridOption?.minHeight\r\n }\">\r\n <table *ngIf=\"items?.length; else elseEmpty\" mat-table [dataSource]=\"items\" matSort\r\n [matSortDisabled]=\"!gridOption.sortable\" cdkDropList cdkDropListOrientation=\"horizontal\"\r\n [cdkDropListDisabled]=\"!gridOption.dropDragColumnEnable\"\r\n (cdkDropListDropped)=\"drop($event, configuration.displayedColumns)\" multiTemplateDataRows>\r\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\r\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"configuration.displayedColumns.length\">\r\n <div *ngIf=\"sdSubInformation?.templateRef\" [@detailExpand]=\"item.isExpanded ? 'expanded' : 'collapsed'\">\r\n <ng-container *ngIf=\"item.isExpanded\">\r\n <ng-container *ngTemplateOutlet=\"\r\n sdSubInformation.templateRef;\r\n context: { item: item }\r\n \">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\r\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 1px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button *ngIf=\"!element.isExpanding\" mat-icon-button aria-label=\"Expand & Collapse\"\r\n (click)=\"onExpand(element)\">\r\n <mat-icon *ngIf=\"!element.isExpanded\">expand_more</mat-icon>\r\n <mat-icon *ngIf=\"element.isExpanded\">expand_less</mat-icon>\r\n </button>\r\n <div *ngIf=\"element.isExpanding\" class=\"lds-ring\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdSelection\" sticky>\r\n <th class=\"text-center px-15\" mat-header-cell *matHeaderCellDef style=\"min-width: 50px; max-width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\">\r\n <ng-container *ngIf=\"items | selectionVisibleSelectAll: gridOption?.selection | async\">\r\n <mat-checkbox *ngIf=\"!gridOption.selection?.single\" class=\"c-selection\" color=\"primary\"\r\n [(ngModel)]=\"isSelectAll\" (change)=\"onSelectAll()\">\r\n </mat-checkbox>\r\n </ng-container>\r\n\r\n </th>\r\n <td class=\"text-center px-15\" mat-cell *matCellDef=\"let item\" style=\"min-width: 50px; max-width: 50px\">\r\n <ng-container *ngIf=\"item | selectionVisible:gridOption?.selection\">\r\n <mat-checkbox class=\"c-selection\" color=\"primary\" [(ngModel)]=\"item.isSelected\"\r\n (change)=\"onSelect(item)\" [disabled]=\"\r\n selectedItems | selectionDisable: item:gridOption?.selection\r\n \">\r\n </mat-checkbox>\r\n </ng-container>\r\n\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdEditorValidation\">\r\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 2px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\">\r\n </th>\r\n <td class=\"p-0 position-relative\" mat-cell *matCellDef=\"let item; index as idx\">\r\n <sd-desktop-editor-validation [sdId]=\"item.sdId\" [item]=\"item\" [items]=\"items\" [gridOption]=\"gridOption\">\r\n </sd-desktop-editor-validation>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdEditor\">\r\n <th class=\"px-8 py-8\" mat-header-cell *matHeaderCellDef style=\"width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\">\r\n <button class=\"c-btn-add\"\r\n *ngIf=\"gridOption.editor?.addable && (!gridOption.editor.limit || gridOption.editor.limit > items.length)\"\r\n (click)=\"onCreate()\" aria-hidden=\"true\" mat-icon-button>\r\n <mat-icon class=\"c-icon-add\">add</mat-icon>\r\n </button>\r\n </th>\r\n <td class=\"px-8\" mat-cell *matCellDef=\"let item; index as idx\">\r\n <ng-container *sdLet=\"item.editorStatus | sdEditorHandlerRow:item:gridOption as editorHandler\">\r\n <div *ngIf=\"editorHandler\" class=\"d-flex align-items-center justify-content-center\">\r\n <button *ngIf=\"editorHandler.editable\" class=\"mx-2\" (click)=\"onUpdate(item)\" aria-hidden=\"true\"\r\n mat-icon-button>\r\n <mat-icon class=\"c-icon\">edit</mat-icon>\r\n </button>\r\n <button *ngIf=\"editorHandler.removable\" class=\"mx-2\" (click)=\"onRemove(item)\" aria-hidden=\"true\"\r\n mat-icon-button>\r\n <mat-icon class=\"c-icon\">delete</mat-icon>\r\n </button>\r\n <button *ngIf=\"editorHandler.savable\" class=\"mx-2\" (click)=\"onSave(item)\" aria-hidden=\"true\"\r\n mat-icon-button>\r\n <mat-icon class=\"c-icon\">save</mat-icon>\r\n </button>\r\n <button *ngIf=\"editorHandler.cancelable\" class=\"mx-2\" (click)=\"onCancel(item)\" aria-hidden=\"true\"\r\n mat-icon-button>\r\n <mat-icon class=\"c-icon\">close</mat-icon>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdCommand\">\r\n <th class=\"px-8 py-8\" mat-header-cell *matHeaderCellDef style=\"width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td class=\"px-8\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-command [commands]=\"gridOption.commands\" [item]=\"item\"></sd-desktop-command>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of configuration.firstColumns; let i = index\" [matColumnDef]=\"column.field\"\r\n [sticky]=\"configuration.fixedColumn[column.field]\">\r\n <th mat-header-cell *matHeaderCellDef cdkDrag class=\"px-8 py-8 c-th\"\r\n [ngStyle]=\"{ 'min-width': configuration.firstColumns[i].width }\" [attr.rowspan]=\"\r\n configuration.multipleHeader && column.type !== 'children-col'\r\n ? 2\r\n : 1\r\n \" [attr.colspan]=\"\r\n column.type === 'children-col' ? column.children?.length : 1\r\n \">\r\n <div>\r\n <div aria-hidden=\"false\" role=\"presentation\" mat-sort-header [disabled]=\"\r\n !column.sortable || column.type === 'children-col'\r\n \" [innerHTML]=\"configuration.firstColumns[i].titleHtml || configuration.firstColumns[i].title\">\r\n </div>\r\n <sd-column-inline-filter *ngIf=\"gridOption.filter?.inlineColumn\" [value]=\"columnFilter[column.field]\"\r\n [columnFilter]=\"columnFilter\" [column]=\"column\" (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n <td class=\"c-td px-8\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-cell [sdId]=\"item.sdId\" [key]=\"key\" [value]=\"item[column.field]\" [column]=\"column\"\r\n [item]=\"item\" [idx]=\"i\" [cellDef]=\"cellDef\" [gridOption]=\"gridOption\">\r\n </sd-desktop-cell>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-container *ngIf=\"footerDef[column.field]\">\r\n <ng-container *ngTemplateOutlet=\"\r\n footerDef[column.field].templateRef;\r\n context: { items: items, column: column }\r\n \">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of configuration.secondColumns; let i = index\"\r\n [matColumnDef]=\"column.field\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"c-th px-8\"\r\n [ngStyle]=\"{ 'min-width': column.width }\">\r\n <div>\r\n <div [innerHTML]=\"column.titleHtml || column.title\"></div>\r\n <sd-column-inline-filter *ngIf=\"gridOption.filter?.inlineColumn\" [value]=\"columnFilter[column.field]\"\r\n [columnFilter]=\"columnFilter\" [column]=\"column\" (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n <td class=\"c-td px-8\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-cell [sdId]=\"item.sdId\" [key]=\"key\" [value]=\"item[column.field]\" [column]=\"column\"\r\n [item]=\"item\" [idx]=\"i\" [cellDef]=\"cellDef\" [gridOption]=\"gridOption\">\r\n </sd-desktop-cell>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-container *ngIf=\"footerDef[column.field]\">\r\n <ng-container *ngTemplateOutlet=\"\r\n footerDef[column.field].templateRef;\r\n context: { items: items, column: column }\r\n \">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"configuration.firstHeaders; sticky: true\"></tr>\r\n <ng-container *ngIf=\"configuration.secondHeaders?.length\">\r\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"configuration.secondHeaders; sticky: true\">\r\n </tr>\r\n </ng-container>\r\n <tr mat-row *matRowDef=\"let row; columns: configuration.displayedColumns\" matRipple class=\"c-row\"\r\n [class.selected]=\"row.isSelected\" [style]=\"row | sdStyleRowCss:gridOption\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']\" class=\"c-detail-row\"></tr>\r\n <ng-container *ngIf=\"hasFooter && configuration.displayedFooters?.length\">\r\n <tr mat-footer-row *matFooterRowDef=\"configuration.displayedFooters; sticky: true\"></tr>\r\n </ng-container>\r\n </table>\r\n <ng-template #elseEmpty>\r\n <table mat-table [dataSource]=\"[{}]\">\r\n <ng-container matColumnDef=\"sdSelection\" sticky>\r\n <th class=\"px-15\" mat-header-cell *matHeaderCellDef style=\"min-width: 50px; max-width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdEditorValidation\">\r\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 4px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\">\r\n </th>\r\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\">\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdEditor\">\r\n <th class=\"px-8\" mat-header-cell *matHeaderCellDef style=\"min-width: 50px; max-width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\">\r\n <button class=\"c-btn-add\"\r\n *ngIf=\"gridOption.editor?.addable && (!gridOption.editor.limit || gridOption.editor.limit > items.length)\"\r\n (click)=\"onCreate()\" aria-hidden=\"true\" mat-icon-button>\r\n <mat-icon class=\"c-icon-add\">add</mat-icon>\r\n </button>\r\n </th>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdCommand\">\r\n <th class=\"px-8\" mat-header-cell *matHeaderCellDef style=\"min-width: 50px; max-width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdSubInformationAction\">\r\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 1px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdEmpty\">\r\n <td class=\"c-empty\" mat-cell *matCellDef=\"let item\"\r\n [attr.colspan]=\"configuration.displayedColumns.length\">\r\n <ng-container *ngIf=\"sdEmptyData?.templateRef; else sdEmptyDataNoRef\">\r\n <ng-container *ngTemplateOutlet=\"\r\n sdEmptyData.templateRef;\r\n context: { item: item }\r\n \">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #sdEmptyDataNoRef>\r\n <mat-icon fontSet=\"material-icons-outlined\">leaderboard</mat-icon>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of configuration.columns\" [matColumnDef]=\"column.field\"\r\n [sticky]=\"configuration.fixedColumn[column.field]\">\r\n <th mat-header-cell *matHeaderCellDef class=\"c-th px-8 py-8\" [ngStyle]=\"{ 'min-width': column.width }\">\r\n <div [innerHTML]=\"column.titleHtml || column.title\"></div>\r\n </th>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of configuration.firstColumns; let i = index\"\r\n [matColumnDef]=\"column.field\" [sticky]=\"configuration.fixedColumn[column.field]\">\r\n <th mat-header-cell *matHeaderCellDef class=\"c-th px-8 py-8\"\r\n [ngStyle]=\"{ 'min-width': configuration.firstColumns[i].width }\" [attr.rowspan]=\"\r\n configuration.multipleHeader &&\r\n column.type !== 'children-col'\r\n ? 2\r\n : 1\r\n \" [attr.colspan]=\"\r\n column.type === 'children-col' ? column.children?.length : 1\r\n \">\r\n <div>\r\n <div [innerHTML]=\"configuration.firstColumns[i].titleHtml || configuration.firstColumns[i].title\">\r\n </div>\r\n <sd-column-inline-filter *ngIf=\"gridOption.filter?.inlineColumn\"\r\n [value]=\"columnFilter[column.field]\" [columnFilter]=\"columnFilter\" [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\"></sd-column-inline-filter>\r\n </div>\r\n </th>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of configuration.secondColumns\" [matColumnDef]=\"column.field\">\r\n <th mat-header-cell *matHeaderCellDef class=\"c-th px-8 py-8\" [ngStyle]=\"{ 'min-width': column.width }\">\r\n <div>\r\n <div [innerHTML]=\"column.titleHtml || column.title\"></div>\r\n <sd-column-inline-filter *ngIf=\"gridOption.filter?.inlineColumn\"\r\n [value]=\"columnFilter[column.field]\" [columnFilter]=\"columnFilter\" [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\"></sd-column-inline-filter>\r\n </div>\r\n </th>\r\n </ng-container>\r\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"configuration.firstHeaders; sticky: true\">\r\n </tr>\r\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"configuration.secondHeaders; sticky: true\">\r\n </tr>\r\n <tr mat-row *matRowDef=\"let row; columns: ['sdEmpty']\"></tr>\r\n </table>\r\n </ng-template>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-paginator\">\r\n <div class=\"c-action\">\r\n <sd-button *ngIf=\"\r\n !gridOption.filter?.disabled && !gridOption.filter?.inlineColumn\r\n \" class=\"mr-10\" [title]=\"'Filter' | sdTranslate\" icon=\"filter_alt\" size=\"sm\" (action)=\"gridFilter.open()\"\r\n type=\"link\">\r\n </sd-button>\r\n <sd-button *ngIf=\"gridOption.reload?.visible\" class=\"mr-10\" [title]=\"'Reload' | sdTranslate\" icon=\"refresh\"\r\n size=\"sm\" (action)=\"reload()\" [disabled]=\"!items?.length\" type=\"link\">\r\n </sd-button>\r\n <ng-container *ngIf=\"gridOption.export?.visible && items?.length\">\r\n <ng-container *ngIf=\"isExporting; else unExporting\">\r\n <sd-button class=\"mr-10\" [loading]=\"isExporting\" [title]=\"exportTitle | sdTranslate\" icon=\"get_app\"\r\n size=\"sm\" type=\"link\">\r\n </sd-button>\r\n </ng-container>\r\n <ng-template #unExporting>\r\n <sd-button class=\"mr-10\" [title]=\"exportTitle | sdTranslate\" icon=\"get_app\" size=\"sm\"\r\n [matMenuTriggerFor]=\"menu\" type=\"link\">\r\n </sd-button>\r\n </ng-template>\r\n\r\n <mat-menu #menu=\"matMenu\">\r\n <button *ngIf=\"gridOption.export?.visibleExcel !== false\" mat-menu-item\r\n (click)=\"sdPopupExport.exportDefault()\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">file_download</mat-icon>\r\n <span> {{ \"Export excel\" | sdTranslate }}</span>\r\n </button>\r\n <button *ngIf=\"gridOption.export?.visibleCSV !== false\" mat-menu-item\r\n (click)=\"sdPopupExport.exportDefault(true)\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">file_download</mat-icon>\r\n <span> {{ \"Export CSV\" | sdTranslate }}</span>\r\n </button>\r\n <button *ngIf=\"gridOption.export?.key\" mat-menu-item (click)=\"sdPopupExport.open()\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">settings</mat-icon>\r\n <span> {{ \"Configure\" | sdTranslate }}</span>\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n <sd-button *ngIf=\"gridOption.config?.visible\" class=\"mr-10\" [title]=\"'Configure' | sdTranslate\"\r\n icon=\"settings\" size=\"sm\" (action)=\"popupGridConfiguration.open()\" type=\"link\">\r\n </sd-button>\r\n </div>\r\n <mat-paginator [class.d-none]=\"gridOption.paginate?.hidden\" [length]=\"total\"\r\n [pageSize]=\"gridOption.paginate?.pageSize\" [pageSizeOptions]=\"gridOption.paginate?.pages\"\r\n [showFirstLastButtons]=\"gridOption.paginate?.showFirstLastButtons\"></mat-paginator>\r\n </div>\r\n </div>\r\n <sd-popup-export *ngIf=\"gridOption.export?.visible\" [gridOption]=\"gridOption\" (export)=\"onExport($event)\"\r\n #sdPopupExport>\r\n </sd-popup-export>\r\n <sd-popup-grid-configuration [gridOption]=\"gridOption\" [key]=\"key\" #popupGridConfiguration>\r\n </sd-popup-grid-configuration>\r\n </ng-container>\r\n</ng-container>\r\n<sd-grid-quick-action [gridOption]=\"gridOption\" [selectedItems]=\"selectedItems\" (clear)=\"onClearSelection()\">\r\n</sd-grid-quick-action>",
1978
1978
  animations: [
1979
1979
  trigger('detailExpand', [
1980
1980
  state('collapsed', style({ height: '0', minHeight: '0', visibility: 'hidden' })),
@@ -1982,7 +1982,7 @@ SdGridMaterial.decorators = [
1982
1982
  transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
1983
1983
  ]),
1984
1984
  ],
1985
- styles: [":host{display:flex;flex-direction:column;height:100%;overflow:auto}:host .c-container{display:flex;flex:1;flex-direction:column;min-height:200px;position:relative}:host .c-container .c-table{flex:1;min-height:300px;overflow:auto;position:relative}:host .c-container .c-table table{border-collapse:separate;width:100%}:host .c-container .c-table table tr.c-first-header.mat-header-row,:host .c-container .c-table table tr.c-second-header.mat-header-row{height:40px}:host .c-container .c-table table tr.c-detail-row{height:0}:host .c-container .c-table table tr.c-row.activated{background-color:#e5ecff}:host .c-container .c-table table tr.c-row.selected{background-color:#eef2ff}:host .c-container .c-table table tr.c-row:not(.selected):not(.activated):hover{background-color:#f5f5f5}:host .c-container .c-table table tr.c-row td{border-bottom-width:0}:host .c-container .c-table table tr.c-row.c-expandable{cursor:pointer}:host .c-container .c-table table tr.c-row.c-expandable:hover{background:#f5f5f5}:host .c-container .c-table table th.mat-header-cell{background-color:#f2f3f4;border-bottom:0!important}:host .c-container .c-table table td.mat-cell,:host .c-container .c-table table td.mat-footer-cell,:host .c-container .c-table table th.mat-header-cell{border-bottom-color:#f2f2f2!important}:host .c-container .c-table .c-th{color:#212121;font-size:14px;font-weight:500;line-height:20px;vertical-align:middle}:host .c-container .c-table .c-td:first{padding-left:10px}:host .c-container .c-loading{align-items:center;background:rgba(0,0,0,.15);bottom:56px;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:2}:host .c-container .c-paginator{align-items:center;background-color:#fff;display:flex;flex-direction:row;justify-content:space-between}:host .c-container .c-paginator .c-action{padding:5px}:host .c-container .c-empty{background-color:#fff;border:none!important;text-align:center}:host .c-container .c-empty mat-icon{font-size:150px;height:auto;margin-bottom:30px;margin-top:30px;opacity:.2;width:auto}:host button.c-btn-add{background-color:#fff;box-shadow:0 2px 4px rgba(47,49,54,.16)}:host mat-icon.c-icon{color:rgba(0,0,0,.54)!important}:host mat-icon.c-icon-add{color:#2962ff!important}:host .lds-ring{display:inline-block;height:40px;position:relative;width:40px}:host .lds-ring div{-webkit-animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border:4px solid transparent;border-radius:50%;border-top-color:#cef;box-sizing:border-box;display:block;height:32px;margin:4px;position:absolute;width:32px}:host .lds-ring div:first-child{-webkit-animation-delay:-.45s;animation-delay:-.45s}:host .lds-ring div:nth-child(2){-webkit-animation-delay:-.3s;animation-delay:-.3s}:host .lds-ring div:nth-child(3){-webkit-animation-delay:-.15s;animation-delay:-.15s}:host .style1 .mat-table{border:1px solid #dde0e5}:host .style1 .mat-table tr.mat-header-row{background:#f2f3f4}:host .style1 .mat-table th.mat-header-cell{padding:10px 0}:host .style1 .c-paginator{border:1px solid #dde0e5;border-top:none!important}:host .style1 .mat-form-field-wrapper{background:#fff;padding:0}@-webkit-keyframes lds-ring{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes lds-ring{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}:host ::ng-deep .mat-sort-header-content{display:block;text-align:left;width:100%}:host ::ng-deep .mat-select-arrow{color:#a6a6a6}:host ::ng-deep .mat-sort-header-disabled{background-image:none!important;cursor:default!important;padding-right:12px!important}:host ::ng-deep .mat-sort-header-container{align-items:start!important}:host ::ng-deep .mat-sort-header-arrow{margin-top:4px!important}:host ::ng-deep .mat-sort-header{cursor:pointer}:host ::ng-deep .mat-sort-header[aria-sort]{background-position:center right 0;background-repeat:no-repeat;background-size:16px 16px;cursor:pointer;padding-right:24px}:host ::ng-deep .mat-sort-header[aria-sort=none]{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z'/%3E%3C/svg%3E\")}:host ::ng-deep .mat-sort-header[aria-sort=ascending]{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z'/%3E%3C/svg%3E\")}:host ::ng-deep .mat-sort-header[aria-sort=descending]{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z'/%3E%3C/svg%3E\")}"]
1985
+ styles: [":host{display:flex;flex-direction:column;height:100%;overflow:auto}:host .c-container{display:flex;flex:1;flex-direction:column;min-height:200px;position:relative}:host .c-container .c-table{flex:1;min-height:300px;position:relative}:host .c-container .c-table table{border-collapse:separate;width:100%}:host .c-container .c-table table tr.c-first-header.mat-header-row,:host .c-container .c-table table tr.c-second-header.mat-header-row{height:40px}:host .c-container .c-table table tr.c-detail-row{height:0}:host .c-container .c-table table tr.c-row.activated{background-color:#e5ecff}:host .c-container .c-table table tr.c-row.selected{background-color:#eef2ff}:host .c-container .c-table table tr.c-row:not(.selected):not(.activated):hover{background-color:#f5f5f5}:host .c-container .c-table table tr.c-row td{border-bottom-width:0}:host .c-container .c-table table tr.c-row.c-expandable{cursor:pointer}:host .c-container .c-table table tr.c-row.c-expandable:hover{background:#f5f5f5}:host .c-container .c-table table th.mat-header-cell{background-color:#f2f3f4;border-bottom:0!important}:host .c-container .c-table table td.mat-cell,:host .c-container .c-table table td.mat-footer-cell,:host .c-container .c-table table th.mat-header-cell{border-bottom-color:#f2f2f2!important}:host .c-container .c-table .c-th{color:#212121;font-size:14px;font-weight:500;line-height:20px;vertical-align:middle}:host .c-container .c-table .c-td:first{padding-left:10px}:host .c-container .c-loading{align-items:center;background:rgba(0,0,0,.15);bottom:56px;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:2}:host .c-container .c-paginator{align-items:center;background-color:#fff;display:flex;flex-direction:row;justify-content:space-between}:host .c-container .c-paginator .c-action{padding:5px}:host .c-container .c-empty{background-color:#fff;border:none!important;text-align:center}:host .c-container .c-empty mat-icon{font-size:150px;height:auto;margin-bottom:30px;margin-top:30px;opacity:.2;width:auto}:host button.c-btn-add{background-color:#fff;box-shadow:0 2px 4px rgba(47,49,54,.16)}:host mat-icon.c-icon{color:rgba(0,0,0,.54)!important}:host mat-icon.c-icon-add{color:#2962ff!important}:host .lds-ring{display:inline-block;height:40px;position:relative;width:40px}:host .lds-ring div{-webkit-animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border:4px solid transparent;border-radius:50%;border-top-color:#cef;box-sizing:border-box;display:block;height:32px;margin:4px;position:absolute;width:32px}:host .lds-ring div:first-child{-webkit-animation-delay:-.45s;animation-delay:-.45s}:host .lds-ring div:nth-child(2){-webkit-animation-delay:-.3s;animation-delay:-.3s}:host .lds-ring div:nth-child(3){-webkit-animation-delay:-.15s;animation-delay:-.15s}:host .style1 .mat-table{border:1px solid #dde0e5}:host .style1 .mat-table tr.mat-header-row{background:#f2f3f4}:host .style1 .mat-table th.mat-header-cell{padding:10px 0}:host .style1 .c-paginator{border:1px solid #dde0e5;border-top:none!important}:host .style1 .mat-form-field-wrapper{background:#fff;padding:0}@-webkit-keyframes lds-ring{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes lds-ring{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}:host ::ng-deep .mat-sort-header-content{display:block;text-align:left;width:100%}:host ::ng-deep .mat-select-arrow{color:#a6a6a6}:host ::ng-deep .mat-sort-header-disabled{background-image:none!important;cursor:default!important;padding-right:12px!important}:host ::ng-deep .mat-sort-header-container{align-items:start!important}:host ::ng-deep .mat-sort-header-arrow{margin-top:4px!important}:host ::ng-deep .mat-sort-header{cursor:pointer}:host ::ng-deep .mat-sort-header[aria-sort]{background-position:center right 0;background-repeat:no-repeat;background-size:16px 16px;cursor:pointer;padding-right:24px}:host ::ng-deep .mat-sort-header[aria-sort=none]{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z'/%3E%3C/svg%3E\")}:host ::ng-deep .mat-sort-header[aria-sort=ascending]{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z'/%3E%3C/svg%3E\")}:host ::ng-deep .mat-sort-header[aria-sort=descending]{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z'/%3E%3C/svg%3E\")}"]
1986
1986
  },] }
1987
1987
  ];
1988
1988
  SdGridMaterial.ctorParameters = () => [