@sd-angular/core 1.3.164 → 1.3.166

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 (54) hide show
  1. package/bundles/sd-angular-core-common.umd.js +4 -4
  2. package/bundles/sd-angular-core-common.umd.js.map +1 -1
  3. package/bundles/sd-angular-core-common.umd.min.js +1 -1
  4. package/bundles/sd-angular-core-common.umd.min.js.map +1 -1
  5. package/bundles/sd-angular-core-grid-material.umd.js +1 -1
  6. package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
  7. package/bundles/sd-angular-core-grid-material.umd.min.js +1 -1
  8. package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
  9. package/bundles/sd-angular-core-input-number.umd.js +1 -1
  10. package/bundles/sd-angular-core-input-number.umd.js.map +1 -1
  11. package/bundles/sd-angular-core-input-number.umd.min.js +1 -1
  12. package/bundles/sd-angular-core-input-number.umd.min.js.map +1 -1
  13. package/bundles/sd-angular-core-table.umd.js +53 -53
  14. package/bundles/sd-angular-core-table.umd.js.map +1 -1
  15. package/bundles/sd-angular-core-table.umd.min.js +1 -1
  16. package/bundles/sd-angular-core-table.umd.min.js.map +1 -1
  17. package/common/sd-angular-core-common.metadata.json +1 -1
  18. package/common/src/lib/directives/sd-for.directive.d.ts +1 -1
  19. package/esm2015/common/src/lib/directives/sd-for.directive.js +5 -5
  20. package/esm2015/grid-material/src/lib/services/grid-filter/grid-filter.service.js +2 -2
  21. package/esm2015/input-number/src/lib/input-number.component.js +2 -2
  22. package/esm2015/table/sd-angular-core-table.js +4 -4
  23. package/esm2015/table/src/lib/components/popup-configuration/popup-configuration.component.js +2 -2
  24. package/esm2015/table/src/lib/components/popup-filter/popup-filter.component.js +2 -2
  25. package/esm2015/table/src/lib/components/table-filter/table-filter.component.js +2 -2
  26. package/esm2015/table/src/lib/directives/sd-table-expand-def.directive.js +15 -0
  27. package/esm2015/table/src/lib/directives/sd-table-filter-def.directive.js +22 -0
  28. package/esm2015/table/src/lib/directives/sd-table-footer-def.directive.js +18 -0
  29. package/esm2015/table/src/lib/services/table-filter/table-filter.service.js +6 -6
  30. package/esm2015/table/src/lib/table.component.js +23 -17
  31. package/esm2015/table/src/lib/table.module.js +4 -21
  32. package/fesm2015/sd-angular-core-common.js +4 -4
  33. package/fesm2015/sd-angular-core-common.js.map +1 -1
  34. package/fesm2015/sd-angular-core-grid-material.js +1 -1
  35. package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
  36. package/fesm2015/sd-angular-core-input-number.js +1 -1
  37. package/fesm2015/sd-angular-core-input-number.js.map +1 -1
  38. package/fesm2015/sd-angular-core-table.js +32 -43
  39. package/fesm2015/sd-angular-core-table.js.map +1 -1
  40. package/input-number/sd-angular-core-input-number.metadata.json +1 -1
  41. package/package.json +1 -1
  42. package/{sd-angular-core-1.3.164.tgz → sd-angular-core-1.3.166.tgz} +0 -0
  43. package/table/sd-angular-core-table.d.ts +3 -3
  44. package/table/sd-angular-core-table.metadata.json +1 -1
  45. package/table/src/lib/components/popup-filter/popup-filter.component.d.ts +1 -1
  46. package/table/src/lib/components/table-filter/table-filter.component.d.ts +1 -1
  47. package/table/src/lib/directives/{sd-material-filter-def.directive.d.ts → sd-table-filter-def.directive.d.ts} +1 -1
  48. package/table/src/lib/directives/{sd-material-footer-def.directive.d.ts → sd-table-footer-def.directive.d.ts} +1 -1
  49. package/table/src/lib/services/table-filter/table-filter.service.d.ts +1 -1
  50. package/table/src/lib/table.component.d.ts +3 -3
  51. package/esm2015/table/src/lib/directives/sd-material-filter-def.directive.js +0 -22
  52. package/esm2015/table/src/lib/directives/sd-material-footer-def.directive.js +0 -18
  53. package/esm2015/table/src/lib/directives/sd-material-sub-information-def.directive.js +0 -15
  54. /package/table/src/lib/directives/{sd-material-sub-information-def.directive.d.ts → sd-table-expand-def.directive.d.ts} +0 -0
@@ -366,7 +366,7 @@ _name = new WeakMap(), _form = new WeakMap(), _blurOnEnter_1 = new WeakMap(), _m
366
366
  SdInputNumber.decorators = [
367
367
  { type: Component, args: [{
368
368
  selector: 'sd-input-number',
369
- template: "<label *ngIf=\"!appearance && label && !sdLabelDef?.templateRef\" class=\"d-block mb-0 T14M\">{{label}} <span class=\"text-danger mb-2\"\r\n *ngIf=\"isRequired\">*</span></label>\r\n<ng-container *ngIf=\"sdLabelDef?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdLabelDef.templateRef\">\r\n </ng-container>\r\n</ng-container>\r\n<div class=\"d-flex align-items-center\" [class.sd-view]=\"sdView?.templateRef\" [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\" (click)=\"onClick()\">\r\n <ng-container *ngIf=\"sdView?.templateRef && !isFocused; else default\">\r\n <ng-container *ngTemplateOutlet=\"sdView.templateRef;context: { value: formControl.value }\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #default>\r\n <mat-form-field class=\"sd-md\" [ngClass]=\"{ 'sd-sm': size === 'sm', 'no-padding-wrapper': disableErrorMessage}\"\r\n [appearance]=\"appearance || 'outline'\">\r\n <mat-label *ngIf=\"appearance && label\">{{label}}</mat-label>\r\n <input [id]=\"id\" [formControl]=\"inputControl\" #control matInput\r\n [placeholder]=\"placeholder || (appearance ? label : '')\" [errorStateMatcher]=\"matcher\"\r\n (keyup.enter)=\"onKeyupEnter()\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" (keydown)=\"onKeydown($event)\"\r\n [required]=\"isRequired\" [readonly]=\"isReadonly\" [autocomplete]=\"id\" (paste)=\"onPaste($event)\" autocorrect=\"off\"\r\n [attr.data-qclabel]=\"label\" [attr.data-qcid]=\"qcId\"\r\n [sdPopoverTriggerFor]=\"null\" [sdPopoverDisabled]=\"!disableErrorMessage || formControl.valid\">\r\n <ng-container *ngIf=\"sdSuffix?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdSuffix.templateRef\">\r\n </ng-container>\r\n </ng-container>\r\n <svg \r\n #copyTooltip=\"matTooltip\" \r\n *ngIf=\"copyable\" \r\n matSuffix \r\n [matTooltip]=\"copied ? 'Copied' : 'Copy'\" \r\n class=\"icon-copy\" \r\n focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\" \r\n (click)=\"onCopyText()\">\r\n <path d=\"M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z\"></path>\r\n </svg>\r\n <mat-error *ngIf=\"formControl?.errors?.required\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{ \"This field is required\" | sdTranslate }}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.min\"> \r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Kh\u00F4ng nh\u1EADp b\u00E9 h\u01A1n '}} <strong>{{minNumber}}</strong></ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.max\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Kh\u00F4ng nh\u1EADp l\u1EDBn h\u01A1n '}} <strong>{{maxNumber}}</strong></ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.customValidator\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{formControl.errors?.customValidator}}</ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </ng-template>\r\n</div>\r\n<!-- <sd-popover #error=\"sdPopover\" type=\"danger\" width=\"300px\">\r\n <span *ngIf=\"formControl.errors?.required\">\r\n {{ \"This field is required\" | sdTranslate }}\r\n </span>\r\n <span *ngIf=\"formControl.errors?.customValidator\">\r\n {{formControl.errors?.customValidator}}\r\n </span>\r\n</sd-popover> -->",
369
+ template: "<label *ngIf=\"!appearance && label && !sdLabelDef?.templateRef\" class=\"d-block mb-0 T14M\">{{label}} <span class=\"text-danger mb-2\"\r\n *ngIf=\"isRequired\">*</span></label>\r\n<ng-container *ngIf=\"sdLabelDef?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdLabelDef.templateRef\">\r\n </ng-container>\r\n</ng-container>\r\n<div class=\"d-flex align-items-center\" [class.sd-view]=\"sdView?.templateRef\" [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\" (click)=\"onClick()\">\r\n <ng-container *ngIf=\"sdView?.templateRef && !isFocused; else default\">\r\n <ng-container *ngTemplateOutlet=\"sdView.templateRef;context: { value: formControl.value }\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #default>\r\n <mat-form-field class=\"sd-md\" [ngClass]=\"{ 'sd-sm': size === 'sm', 'no-padding-wrapper': disableErrorMessage}\"\r\n [appearance]=\"appearance || 'outline'\">\r\n <mat-label *ngIf=\"appearance && label\">{{label}}</mat-label>\r\n <input aria-hidden=\"true\" [id]=\"id\" [formControl]=\"inputControl\" #control matInput\r\n [placeholder]=\"placeholder || (appearance ? label : '')\" [errorStateMatcher]=\"matcher\"\r\n (keyup.enter)=\"onKeyupEnter()\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" (keydown)=\"onKeydown($event)\"\r\n [required]=\"isRequired\" [readonly]=\"isReadonly\" [autocomplete]=\"id\" (paste)=\"onPaste($event)\" autocorrect=\"off\"\r\n [attr.data-qclabel]=\"label\" [attr.data-qcid]=\"qcId\"\r\n [sdPopoverTriggerFor]=\"null\" [sdPopoverDisabled]=\"!disableErrorMessage || formControl.valid\">\r\n <ng-container *ngIf=\"sdSuffix?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdSuffix.templateRef\">\r\n </ng-container>\r\n </ng-container>\r\n <svg \r\n #copyTooltip=\"matTooltip\" \r\n *ngIf=\"copyable\" \r\n matSuffix \r\n [matTooltip]=\"copied ? 'Copied' : 'Copy'\" \r\n class=\"icon-copy\" \r\n focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\" \r\n (click)=\"onCopyText()\">\r\n <path d=\"M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z\"></path>\r\n </svg>\r\n <mat-error *ngIf=\"formControl?.errors?.required\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{ \"This field is required\" | sdTranslate }}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.min\"> \r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Kh\u00F4ng nh\u1EADp b\u00E9 h\u01A1n '}} <strong>{{minNumber}}</strong></ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.max\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Kh\u00F4ng nh\u1EADp l\u1EDBn h\u01A1n '}} <strong>{{maxNumber}}</strong></ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.customValidator\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{formControl.errors?.customValidator}}</ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </ng-template>\r\n</div>\r\n<!-- <sd-popover #error=\"sdPopover\" type=\"danger\" width=\"300px\">\r\n <span *ngIf=\"formControl.errors?.required\">\r\n {{ \"This field is required\" | sdTranslate }}\r\n </span>\r\n <span *ngIf=\"formControl.errors?.customValidator\">\r\n {{formControl.errors?.customValidator}}\r\n </span>\r\n</sd-popover> -->",
370
370
  changeDetection: ChangeDetectionStrategy.OnPush,
371
371
  styles: [":host ::ng-deep .mat-form-field.sd-form-tooltip{width:calc(100% - 30px)}:host ::ng-deep .mat-form-field.no-padding-wrapper .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:#f6f6f6;color:#e9e9e9}:host ::ng-deep .mat-form-field input.mat-input-element:disabled{color:#4d4d4d!important}:host ::ng-deep .mat-form-field .mat-placeholder-required{color:#f82c13}:host ::ng-deep .mat-form-field:hover .icon-copy{opacity:1}:host ::ng-deep .mat-form-field .icon-copy{cursor:pointer;fill:rgba(0,0,0,.5);height:.9em;opacity:0;transition:opacity .2s linear;width:.9em}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}.sd-tooltip{display:inline-block;margin:auto;text-align:center;width:30px}:host{display:block;padding-top:5px}.sd-md:hover .btn-copy{visibility:visible}.btn-copy{background:#e9e9e9!important;font-size:12px;line-height:26px!important;margin-bottom:3px;visibility:hidden}"]
372
372
  },] }
@@ -1 +1 @@
1
- {"version":3,"file":"sd-angular-core-input-number.js","sources":["../../../../projects/sd-core/input-number/src/lib/input-number.component.ts","../../../../projects/sd-core/input-number/src/lib/input-number.module.ts","../../../../projects/sd-core/input-number/src/public-api.ts","../../../../projects/sd-core/input-number/sd-angular-core-input-number.ts"],"sourcesContent":["import {\r\n Component,\r\n Input,\r\n ViewChild,\r\n Output,\r\n EventEmitter,\r\n ChangeDetectorRef,\r\n OnDestroy,\r\n AfterViewInit,\r\n ElementRef,\r\n OnInit,\r\n ContentChild,\r\n ChangeDetectionStrategy,\r\n HostListener,\r\n Inject,\r\n SimpleChanges,\r\n Optional\r\n} from '@angular/core';\r\nimport { AbstractControl, NgForm, ValidatorFn, Validators, AsyncValidatorFn, FormGroup, FormControl, FormGroupDirective } from '@angular/forms';\r\nimport * as uuid from 'uuid';\r\nimport hash from 'object-hash';\r\n\r\nimport { Subscription } from 'rxjs';\r\nimport { SdFormControl, SdSuffixDirective } from '@sd-angular/core/common';\r\nimport { SdViewDefDirective } from '@sd-angular/core/common';\r\nimport { FORM_CONFIG } from '@sd-angular/core/common';\r\nimport { IFormConfiguration } from '@sd-angular/core/common';\r\nimport { MatFormFieldAppearance } from '@angular/material/form-field';\r\nimport { ErrorStateMatcher } from '@angular/material/core';\r\nimport { SdLabelDefDirective } from '@sd-angular/core/common';\r\nimport { debounceTime } from 'rxjs/operators';\r\nimport { MatTooltip } from '@angular/material/tooltip';\r\nclass SdInputNumberErrotStateMatcher implements ErrorStateMatcher {\r\n constructor(private formControl: FormControl) { }\r\n isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {\r\n const isSubmitted = form && form.submitted;\r\n return !!(this.formControl?.invalid && (this.formControl?.dirty || this.formControl?.touched || isSubmitted));\r\n }\r\n}\r\n@Component({\r\n selector: 'sd-input-number',\r\n templateUrl: './input-number.component.html',\r\n styleUrls: ['./input-number.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SdInputNumber implements OnDestroy, OnInit, AfterViewInit {\r\n id = `I${uuid.v4()}`;\r\n #name = uuid.v4();\r\n @Input() set name(val: string) {\r\n if (val) {\r\n this.#name = val;\r\n }\r\n }\r\n @Input() size: 'sm' | 'lg';\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 qcId: string;\r\n label: string;\r\n @Input('label') set _label(val: string) {\r\n this.label = val;\r\n this.qcId = hash({\r\n selector: 'sd-input-number',\r\n label: val\r\n });\r\n };\r\n @Input() placeholder: string;\r\n disableErrorMessage = false;\r\n @Input('disableErrorMessage') set _disableErrorMessage(val: boolean | '') {\r\n this.disableErrorMessage = (val === '') || val;\r\n }\r\n #blurOnEnter = false;\r\n @Input('blurOnEnter') set _blurOnEnter(val: boolean | '') {\r\n this.#blurOnEnter = (val === '') || val;\r\n }\r\n #model: any;\r\n @Input() set model(value: any) {\r\n if (this.#model !== value) {\r\n this.#model = value;\r\n this.formControl.setValue(this.#model, {\r\n emitEvent: false\r\n });\r\n if (value || value === 0) {\r\n const val = value.toString().replace(/\\./g, ',');\r\n this.inputControl.setValue(this.#getValueWithFormat(val), {\r\n emitEvent: false\r\n });\r\n } else {\r\n this.inputControl.setValue('', {\r\n emitEvent: false\r\n });\r\n }\r\n }\r\n }\r\n @Output() modelChange = new EventEmitter();\r\n\r\n // Validator\r\n isRequired = false;\r\n @Input() set required(val: boolean | '') {\r\n this.isRequired = (val === '') || val;\r\n this.#updateValidator();\r\n }\r\n @Input() type: 'negative' | 'positive'; //negative: chỉ nhập số âm, positive: chỉ số dương\r\n @Input() precision: number = 3; //số chữ số thập phân \r\n\r\n isReadonly = false;\r\n @Input() set readonly(val: boolean | '') {\r\n this.isReadonly = (val === '') || val;\r\n }\r\n\r\n minNumber: number;\r\n @Input() set min(val: number) {\r\n this.minNumber = val;\r\n this.#updateValidator();\r\n }\r\n\r\n maxNumber: number;\r\n @Input() set max(val: number) {\r\n this.maxNumber = val;\r\n this.#updateValidator();\r\n }\r\n\r\n #validator: (value: any) => string | Promise<string>;\r\n @Input() set validator(validator: (value: any) => string | Promise<string>) {\r\n this.#validator = validator;\r\n this.#updateValidator();\r\n }\r\n\r\n @Input() set disabled(val: boolean | '') {\r\n val = (val === '') || val;\r\n if (val) {\r\n this.inputControl.disable();\r\n this.formControl.disable();\r\n } else {\r\n this.inputControl.enable();\r\n this.formControl.enable();\r\n }\r\n }\r\n @Input() appearance: MatFormFieldAppearance;\r\n\r\n @ViewChild('copyTooltip') copyTooltip: MatTooltip;\r\n copyable = false;\r\n @Input('copyable') set _copyable(val: boolean | '') {\r\n this.copyable = (val === '') || val;\r\n }\r\n copied = false;\r\n\r\n @Output() sdChange = new EventEmitter<any>();\r\n @Output() sdFocus = new EventEmitter<any>();\r\n @Output() sdFocusForceBlur = new EventEmitter<any>();\r\n @Output() keyupEnter = new EventEmitter();\r\n\r\n @ViewChild('control') control: ElementRef;\r\n formControl = new SdFormControl();\r\n inputControl = new SdFormControl();\r\n #subscription = new Subscription();\r\n matcher = new SdInputNumberErrotStateMatcher(this.formControl);\r\n\r\n @ContentChild(SdViewDefDirective) sdView: SdViewDefDirective;\r\n @ContentChild(SdSuffixDirective) sdSuffix: SdSuffixDirective;\r\n @ContentChild(SdLabelDefDirective) sdLabelDef: SdLabelDefDirective;\r\n isFocused = false;\r\n constructor(\r\n private ref: ChangeDetectorRef,\r\n @Inject(FORM_CONFIG) @Optional() private formConfig: IFormConfiguration) {\r\n }\r\n\r\n ngOnInit() {\r\n this.appearance = this.appearance || this.formConfig?.appearance;\r\n this.#subscription.add(this.inputControl.touchChanges.subscribe(() => {\r\n this.formControl.markAsTouched();\r\n this.ref.markForCheck();\r\n }));\r\n this.#subscription.add(this.formControl.sdChanges.subscribe(() => {\r\n this.ref.markForCheck();\r\n }));\r\n this.#subscription.add(this.inputControl.sdChanges.subscribe(() => {\r\n this.ref.markForCheck();\r\n }));\r\n }\r\n\r\n private get regex() {\r\n let result = `(([0-9]+(\\\\.[0-9])?)+(\\\\,[0-9]{0,${this.precision}}){0,1})$`;\r\n if (this.precision === 0) {\r\n result = `(([0-9]+(\\\\.[0-9])?)+)$`;\r\n }\r\n if (this.type === 'negative') {\r\n result = `[-]${result}`;\r\n }\r\n if (!this.type) {\r\n result = `[-]?${result}`;\r\n }\r\n return result;\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.#subscription.add(this.inputControl.valueChanges.subscribe(() => {\r\n const val = this.inputControl.value;\r\n if (!val) {\r\n this.#onChange(undefined);\r\n return;\r\n }\r\n const value = this.#toNumber(val);\r\n if (!isNaN(value)) {\r\n this.inputControl.setValue(this.#getValueWithFormat(val), {\r\n emitEvent: false\r\n });\r\n this.#onChange(value);\r\n }\r\n }));\r\n this.#form?.addControl(this.#name, this.formControl);\r\n this.ref.detectChanges();\r\n }\r\n\r\n #getValueWithFormat = (value: string) => {\r\n const arrayNext = value.split(',');\r\n if (arrayNext.length >= 2) {\r\n return `${this.#formatNumber(arrayNext[0])},${arrayNext[1]}`;\r\n }\r\n return this.#formatNumber(value);\r\n }\r\n\r\n #formatNumber = (text: any) => {\r\n return Number.toVNCurrency((text?.toString() || '').replace(/\\./g, ''));\r\n // const arrs: string[] = (text?.toString() || '').replace(/\\./g, '').split('');\r\n // return arrs.reverse().reduce((acc, num, index) => {\r\n // return num + (num !== '-' && index && !(index % 3) ? '.' : '') + acc;\r\n // }, '');\r\n }\r\n\r\n #toNumber = (text: any) => +((text?.toString() || '').replace(/\\./g, '').replace(/,/g, '.'));\r\n\r\n ngOnDestroy() {\r\n this.#form?.removeControl(this.#name);\r\n this.#subscription.unsubscribe();\r\n }\r\n\r\n reValidate = () => {\r\n this.formControl.updateValueAndValidity();\r\n }\r\n\r\n #updateValidator = () => {\r\n this.formControl.clearValidators();\r\n this.formControl.clearAsyncValidators();\r\n const validators: ValidatorFn[] = [];\r\n const asyncValidators: AsyncValidatorFn[] = [];\r\n if (this.isRequired) {\r\n validators.push(Validators.required);\r\n }\r\n if (this.minNumber || this.minNumber === 0) {\r\n validators.push(Validators.min(this.minNumber));\r\n }\r\n if (this.maxNumber || this.maxNumber === 0) {\r\n validators.push(Validators.max(this.maxNumber));\r\n }\r\n if (this.#validator) {\r\n asyncValidators.push(this.#customValidator(this.#validator));\r\n }\r\n this.formControl.setValidators(validators);\r\n this.formControl.setAsyncValidators(asyncValidators);\r\n this.formControl.updateValueAndValidity();\r\n }\r\n\r\n #onChange = (value: any) => {\r\n this.#model = value ?? null;\r\n this.modelChange.emit(this.#model);\r\n this.sdChange.emit(this.#model);\r\n this.formControl.setValue(this.#model);\r\n }\r\n\r\n onKeyupEnter = () => {\r\n const val: string = (this.inputControl.value ?? '').toString();\r\n if (val.length > val.trim().length) {\r\n this.inputControl.setValue(val.trim());\r\n }\r\n this.keyupEnter.emit(this.inputControl.value);\r\n if (this.#blurOnEnter) {\r\n this.blur();\r\n }\r\n }\r\n\r\n onKeydown = (event: KeyboardEvent) => {\r\n if (event.ctrlKey && event.key == 'v') {\r\n this.#checkValue(event, '');\r\n return;\r\n }\r\n const key = event.keyCode || event.charCode;\r\n if (key == 8 || key == 46 || key == 37 || key == 39 || key == 35 || key == 36 || key == 9) {\r\n return;\r\n }\r\n if (event.ctrlKey && (event.key == 'c' || event.key == 'x' || event.key == 'a')) {\r\n return;\r\n }\r\n if (event.shiftKey && key == 9) {\r\n return;\r\n }\r\n this.#checkValue(event, event.key);\r\n }\r\n\r\n onPaste(event: ClipboardEvent) {\r\n const nextKey = event.clipboardData.getData('text');\r\n this.#checkValue(event, nextKey)\r\n }\r\n\r\n #checkValue = (event, nextKey) => {\r\n const current: string = event.target.value;\r\n // if(this.maxNumber === +current.toString().replace(/\\./g, '').replace(/,/g, '.')){\r\n // event.preventDefault();\r\n // return;\r\n // }\r\n const curval_arr = current.split(\"\");\r\n curval_arr.splice(event.target.selectionStart, (event.target.selectionEnd - event.target.selectionStart), nextKey);\r\n const newval = curval_arr.join(\"\");\r\n if (this.type !== 'positive' && newval === '-') {\r\n return;\r\n }\r\n const regExp: RegExp = new RegExp(`^${this.regex}`, 'g');\r\n if (newval && !String(newval).match(regExp)) {\r\n event.preventDefault();\r\n return;\r\n }\r\n // const value = (newval.toString().replace(/\\./g, '').replace(/,/g, '.'));\r\n // if ((this.maxNumber || this.maxNumber === 0) && +value > this.maxNumber) {\r\n // setTimeout(() => {\r\n // this.inputControl.setValue(this.#getValueWithFormat(this.maxNumber.toString().replace(/\\./g, ',')));\r\n // }, 10);\r\n // event.preventDefault();\r\n // }\r\n }\r\n\r\n onFocus = () => {\r\n this.isFocused = true;\r\n this.sdFocus.emit();\r\n if (this.sdFocusForceBlur.observers?.length > 0) {\r\n this.blur();\r\n this.sdFocusForceBlur.emit();\r\n }\r\n }\r\n\r\n onBlur = () => {\r\n this.isFocused = false;\r\n const val: string = (this.inputControl.value ?? '').toString();\r\n const arrayValue = val.split(',');\r\n if (arrayValue.length >= 2 && arrayValue[1] == '') {\r\n this.inputControl.setValue(this.#formatNumber(arrayValue[0]));\r\n return;\r\n }\r\n if (val.length > val.trim().length) {\r\n this.inputControl.setValue(val.trim());\r\n }\r\n }\r\n\r\n onClick = () => {\r\n if (this.sdView?.templateRef) {\r\n if (!this.formControl.disabled && !this.isFocused) {\r\n this.focus();\r\n }\r\n }\r\n }\r\n\r\n blur = () => {\r\n this.isFocused = false;\r\n this.control?.nativeElement?.blur();\r\n }\r\n\r\n focus = () => {\r\n this.isFocused = true;\r\n setTimeout(() => {\r\n this.control?.nativeElement?.focus();\r\n }, 100);\r\n }\r\n\r\n #customValidator = (func: (value: any) => string | Promise<string>): AsyncValidatorFn => {\r\n return async (c: AbstractControl): Promise<{ [key: string]: any } | null> => {\r\n const value = c.value ?? null;\r\n if (func && typeof (func) === 'function') {\r\n const result = func(value);\r\n if (result instanceof Promise) {\r\n const message = await result;\r\n if (message) {\r\n return {\r\n customValidator: message\r\n };\r\n }\r\n return null;\r\n }\r\n if (result) {\r\n return {\r\n customValidator: result\r\n };\r\n }\r\n return null;\r\n }\r\n return null;\r\n };\r\n }\r\n\r\n onCopyText() {\r\n SdUtility.copyToClipboard(this.inputControl.value);\r\n this.copied = true;\r\n setTimeout(() => {\r\n this.copied = false;\r\n }, 2000);\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdInputNumber } from './input-number.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { SdTranslateModule } from '@sd-angular/core/translate';\r\nimport { SdCommonModule } from '@sd-angular/core/common';\r\nimport { SdPopoverModule } from '@sd-angular/core/popover';\r\n\r\n@NgModule({\r\n declarations: [SdInputNumber],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatTooltipModule,\r\n SdTranslateModule,\r\n SdCommonModule,\r\n SdPopoverModule,\r\n MatButtonModule\r\n ],\r\n exports: [\r\n SdInputNumber\r\n ]\r\n})\r\nexport class SdInputNumberModule { }\r\n","/*\r\n * Public API Surface of superdev-angular-core\r\n */\r\n\r\nexport * from './lib/input-number.module';\r\nexport * from './lib/input-number.component';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuid.v4"],"mappings":";;;;;;;;;;;;;;;;;AAgCA,MAAM,8BAA8B;IAClC,YAAoB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;KAAK;IACjD,YAAY,CAAC,OAA2B,EAAE,IAAwC;;QAChF,MAAM,WAAW,GAAG,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC;QAC3C,OAAO,CAAC,EAAE,OAAA,IAAI,CAAC,WAAW,0CAAE,OAAO,MAAK,OAAA,IAAI,CAAC,WAAW,0CAAE,KAAK,YAAI,IAAI,CAAC,WAAW,0CAAE,OAAO,CAAA,IAAI,WAAW,CAAC,CAAC,CAAC;KAC/G;CACF;MAOY,aAAa;IA4HxB,YACU,GAAsB,EACW,UAA8B;QAD/D,QAAG,GAAH,GAAG,CAAmB;QACW,eAAU,G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K,CAAC,CAAC;QACnD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,UAAU,CAAC;YACT,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;SACrB,EAAE,IAAI,CAAC,CAAC;KACV;;;;YAnXF,SAAS,SAAC;gBACT,QAAQ,EAAE,iBAAiB;gBAC3B,23HAA4C;gBAE5C,eAAe,EAAE,uBAAuB,CAAC,MAAM;;aAChD;;;YAtCC,iBAAiB;4CAqKd,MAAM,SAAC,WAAW,cAAG,QAAQ;;;mBA3H/B,KAAK;mBAKL,KAAK;mBAEL,KAAK;qBAWL,KAAK,SAAC,OAAO;0BAOb,KAAK;mCAEL,KAAK,SAAC,qBAAqB;2BAI3B,KAAK,SAAC,aAAa;oBAInB,KAAK;0BAkBL,MAAM;uBAIN,KAAK;mBAIL,KAAK;wBACL,KAAK;uBAGL,KAAK;kBAKL,KAAK;kBAML,KAAK;wBAML,KAAK;uBAKL,KAAK;yBAUL,KAAK;0BAEL,SAAS,SAAC,aAAa;wBAEvB,KAAK,SAAC,UAAU;uBAKhB,MAAM;sBACN,MAAM;+BACN,MAAM;yBACN,MAAM;sBAEN,SAAS,SAAC,SAAS;qBAMnB,YAAY,SAAC,kBAAkB;uBAC/B,YAAY,SAAC,iBAAiB;yBAC9B,YAAY,SAAC,mBAAmB;;;MCvItB,mBAAmB;;;YAnB/B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,aAAa,CAAC;gBAC7B,OAAO,EAAE;oBACP,YAAY;oBACZ,WAAW;oBACX,mBAAmB;oBACnB,kBAAkB;oBAClB,cAAc;oBACd,aAAa;oBACb,gBAAgB;oBAChB,iBAAiB;oBACjB,cAAc;oBACd,eAAe;oBACf,eAAe;iBAChB;gBACD,OAAO,EAAE;oBACP,aAAa;iBACd;aACF;;;AC/BD;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"sd-angular-core-input-number.js","sources":["../../../../projects/sd-core/input-number/src/lib/input-number.component.ts","../../../../projects/sd-core/input-number/src/lib/input-number.module.ts","../../../../projects/sd-core/input-number/src/public-api.ts","../../../../projects/sd-core/input-number/sd-angular-core-input-number.ts"],"sourcesContent":["import {\r\n Component,\r\n Input,\r\n ViewChild,\r\n Output,\r\n EventEmitter,\r\n ChangeDetectorRef,\r\n OnDestroy,\r\n AfterViewInit,\r\n ElementRef,\r\n OnInit,\r\n ContentChild,\r\n ChangeDetectionStrategy,\r\n HostListener,\r\n Inject,\r\n SimpleChanges,\r\n Optional\r\n} from '@angular/core';\r\nimport { AbstractControl, NgForm, ValidatorFn, Validators, AsyncValidatorFn, FormGroup, FormControl, FormGroupDirective } from '@angular/forms';\r\nimport * as uuid from 'uuid';\r\nimport hash from 'object-hash';\r\n\r\nimport { Subscription } from 'rxjs';\r\nimport { SdFormControl, SdSuffixDirective } from '@sd-angular/core/common';\r\nimport { SdViewDefDirective } from '@sd-angular/core/common';\r\nimport { FORM_CONFIG } from '@sd-angular/core/common';\r\nimport { IFormConfiguration } from '@sd-angular/core/common';\r\nimport { MatFormFieldAppearance } from '@angular/material/form-field';\r\nimport { ErrorStateMatcher } from '@angular/material/core';\r\nimport { SdLabelDefDirective } from '@sd-angular/core/common';\r\nimport { debounceTime } from 'rxjs/operators';\r\nimport { MatTooltip } from '@angular/material/tooltip';\r\nclass SdInputNumberErrotStateMatcher implements ErrorStateMatcher {\r\n constructor(private formControl: FormControl) { }\r\n isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {\r\n const isSubmitted = form && form.submitted;\r\n return !!(this.formControl?.invalid && (this.formControl?.dirty || this.formControl?.touched || isSubmitted));\r\n }\r\n}\r\n@Component({\r\n selector: 'sd-input-number',\r\n templateUrl: './input-number.component.html',\r\n styleUrls: ['./input-number.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SdInputNumber implements OnDestroy, OnInit, AfterViewInit {\r\n id = `I${uuid.v4()}`;\r\n #name = uuid.v4();\r\n @Input() set name(val: string) {\r\n if (val) {\r\n this.#name = val;\r\n }\r\n }\r\n @Input() size: 'sm' | 'lg';\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 qcId: string;\r\n label: string;\r\n @Input('label') set _label(val: string) {\r\n this.label = val;\r\n this.qcId = hash({\r\n selector: 'sd-input-number',\r\n label: val\r\n });\r\n };\r\n @Input() placeholder: string;\r\n disableErrorMessage = false;\r\n @Input('disableErrorMessage') set _disableErrorMessage(val: boolean | '') {\r\n this.disableErrorMessage = (val === '') || val;\r\n }\r\n #blurOnEnter = false;\r\n @Input('blurOnEnter') set _blurOnEnter(val: boolean | '') {\r\n this.#blurOnEnter = (val === '') || val;\r\n }\r\n #model: any;\r\n @Input() set model(value: any) {\r\n if (this.#model !== value) {\r\n this.#model = value;\r\n this.formControl.setValue(this.#model, {\r\n emitEvent: false\r\n });\r\n if (value || value === 0) {\r\n const val = value.toString().replace(/\\./g, ',');\r\n this.inputControl.setValue(this.#getValueWithFormat(val), {\r\n emitEvent: false\r\n });\r\n } else {\r\n this.inputControl.setValue('', {\r\n emitEvent: false\r\n });\r\n }\r\n }\r\n }\r\n @Output() modelChange = new EventEmitter();\r\n\r\n // Validator\r\n isRequired = false;\r\n @Input() set required(val: boolean | '') {\r\n this.isRequired = (val === '') || val;\r\n this.#updateValidator();\r\n }\r\n @Input() type: 'negative' | 'positive'; //negative: chỉ nhập số âm, positive: chỉ số dương\r\n @Input() precision: number = 3; //số chữ số thập phân \r\n\r\n isReadonly = false;\r\n @Input() set readonly(val: boolean | '') {\r\n this.isReadonly = (val === '') || val;\r\n }\r\n\r\n minNumber: number;\r\n @Input() set min(val: number) {\r\n this.minNumber = val;\r\n this.#updateValidator();\r\n }\r\n\r\n maxNumber: number;\r\n @Input() set max(val: number) {\r\n this.maxNumber = val;\r\n this.#updateValidator();\r\n }\r\n\r\n #validator: (value: any) => string | Promise<string>;\r\n @Input() set validator(validator: (value: any) => string | Promise<string>) {\r\n this.#validator = validator;\r\n this.#updateValidator();\r\n }\r\n\r\n @Input() set disabled(val: boolean | '') {\r\n val = (val === '') || val;\r\n if (val) {\r\n this.inputControl.disable();\r\n this.formControl.disable();\r\n } else {\r\n this.inputControl.enable();\r\n this.formControl.enable();\r\n }\r\n }\r\n @Input() appearance: MatFormFieldAppearance;\r\n\r\n @ViewChild('copyTooltip') copyTooltip: MatTooltip;\r\n copyable = false;\r\n @Input('copyable') set _copyable(val: boolean | '') {\r\n this.copyable = (val === '') || val;\r\n }\r\n copied = false;\r\n\r\n @Output() sdChange = new EventEmitter<any>();\r\n @Output() sdFocus = new EventEmitter<any>();\r\n @Output() sdFocusForceBlur = new EventEmitter<any>();\r\n @Output() keyupEnter = new EventEmitter();\r\n\r\n @ViewChild('control') control: ElementRef;\r\n formControl = new SdFormControl();\r\n inputControl = new SdFormControl();\r\n #subscription = new Subscription();\r\n matcher = new SdInputNumberErrotStateMatcher(this.formControl);\r\n\r\n @ContentChild(SdViewDefDirective) sdView: SdViewDefDirective;\r\n @ContentChild(SdSuffixDirective) sdSuffix: SdSuffixDirective;\r\n @ContentChild(SdLabelDefDirective) sdLabelDef: SdLabelDefDirective;\r\n isFocused = false;\r\n constructor(\r\n private ref: ChangeDetectorRef,\r\n @Inject(FORM_CONFIG) @Optional() private formConfig: IFormConfiguration) {\r\n }\r\n\r\n ngOnInit() {\r\n this.appearance = this.appearance || this.formConfig?.appearance;\r\n this.#subscription.add(this.inputControl.touchChanges.subscribe(() => {\r\n this.formControl.markAsTouched();\r\n this.ref.markForCheck();\r\n }));\r\n this.#subscription.add(this.formControl.sdChanges.subscribe(() => {\r\n this.ref.markForCheck();\r\n }));\r\n this.#subscription.add(this.inputControl.sdChanges.subscribe(() => {\r\n this.ref.markForCheck();\r\n }));\r\n }\r\n\r\n private get regex() {\r\n let result = `(([0-9]+(\\\\.[0-9])?)+(\\\\,[0-9]{0,${this.precision}}){0,1})$`;\r\n if (this.precision === 0) {\r\n result = `(([0-9]+(\\\\.[0-9])?)+)$`;\r\n }\r\n if (this.type === 'negative') {\r\n result = `[-]${result}`;\r\n }\r\n if (!this.type) {\r\n result = `[-]?${result}`;\r\n }\r\n return result;\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.#subscription.add(this.inputControl.valueChanges.subscribe(() => {\r\n const val = this.inputControl.value;\r\n if (!val) {\r\n this.#onChange(undefined);\r\n return;\r\n }\r\n const value = this.#toNumber(val);\r\n if (!isNaN(value)) {\r\n this.inputControl.setValue(this.#getValueWithFormat(val), {\r\n emitEvent: false\r\n });\r\n this.#onChange(value);\r\n }\r\n }));\r\n this.#form?.addControl(this.#name, this.formControl);\r\n this.ref.detectChanges();\r\n }\r\n\r\n #getValueWithFormat = (value: string) => {\r\n const arrayNext = value.split(',');\r\n if (arrayNext.length >= 2) {\r\n return `${this.#formatNumber(arrayNext[0])},${arrayNext[1]}`;\r\n }\r\n return this.#formatNumber(value);\r\n }\r\n\r\n #formatNumber = (text: any) => {\r\n return Number.toVNCurrency((text?.toString() || '').replace(/\\./g, ''));\r\n // const arrs: string[] = (text?.toString() || '').replace(/\\./g, '').split('');\r\n // return arrs.reverse().reduce((acc, num, index) => {\r\n // return num + (num !== '-' && index && !(index % 3) ? '.' : '') + acc;\r\n // }, '');\r\n }\r\n\r\n #toNumber = (text: any) => +((text?.toString() || '').replace(/\\./g, '').replace(/,/g, '.'));\r\n\r\n ngOnDestroy() {\r\n this.#form?.removeControl(this.#name);\r\n this.#subscription.unsubscribe();\r\n }\r\n\r\n reValidate = () => {\r\n this.formControl.updateValueAndValidity();\r\n }\r\n\r\n #updateValidator = () => {\r\n this.formControl.clearValidators();\r\n this.formControl.clearAsyncValidators();\r\n const validators: ValidatorFn[] = [];\r\n const asyncValidators: AsyncValidatorFn[] = [];\r\n if (this.isRequired) {\r\n validators.push(Validators.required);\r\n }\r\n if (this.minNumber || this.minNumber === 0) {\r\n validators.push(Validators.min(this.minNumber));\r\n }\r\n if (this.maxNumber || this.maxNumber === 0) {\r\n validators.push(Validators.max(this.maxNumber));\r\n }\r\n if (this.#validator) {\r\n asyncValidators.push(this.#customValidator(this.#validator));\r\n }\r\n this.formControl.setValidators(validators);\r\n this.formControl.setAsyncValidators(asyncValidators);\r\n this.formControl.updateValueAndValidity();\r\n }\r\n\r\n #onChange = (value: any) => {\r\n this.#model = value ?? null;\r\n this.modelChange.emit(this.#model);\r\n this.sdChange.emit(this.#model);\r\n this.formControl.setValue(this.#model);\r\n }\r\n\r\n onKeyupEnter = () => {\r\n const val: string = (this.inputControl.value ?? '').toString();\r\n if (val.length > val.trim().length) {\r\n this.inputControl.setValue(val.trim());\r\n }\r\n this.keyupEnter.emit(this.inputControl.value);\r\n if (this.#blurOnEnter) {\r\n this.blur();\r\n }\r\n }\r\n\r\n onKeydown = (event: KeyboardEvent) => {\r\n if (event.ctrlKey && event.key == 'v') {\r\n this.#checkValue(event, '');\r\n return;\r\n }\r\n const key = event.keyCode || event.charCode;\r\n if (key == 8 || key == 46 || key == 37 || key == 39 || key == 35 || key == 36 || key == 9) {\r\n return;\r\n }\r\n if (event.ctrlKey && (event.key == 'c' || event.key == 'x' || event.key == 'a')) {\r\n return;\r\n }\r\n if (event.shiftKey && key == 9) {\r\n return;\r\n }\r\n this.#checkValue(event, event.key);\r\n }\r\n\r\n onPaste(event: ClipboardEvent) {\r\n const nextKey = event.clipboardData.getData('text');\r\n this.#checkValue(event, nextKey)\r\n }\r\n\r\n #checkValue = (event, nextKey) => {\r\n const current: string = event.target.value;\r\n // if(this.maxNumber === +current.toString().replace(/\\./g, '').replace(/,/g, '.')){\r\n // event.preventDefault();\r\n // return;\r\n // }\r\n const curval_arr = current.split(\"\");\r\n curval_arr.splice(event.target.selectionStart, (event.target.selectionEnd - event.target.selectionStart), nextKey);\r\n const newval = curval_arr.join(\"\");\r\n if (this.type !== 'positive' && newval === '-') {\r\n return;\r\n }\r\n const regExp: RegExp = new RegExp(`^${this.regex}`, 'g');\r\n if (newval && !String(newval).match(regExp)) {\r\n event.preventDefault();\r\n return;\r\n }\r\n // const value = (newval.toString().replace(/\\./g, '').replace(/,/g, '.'));\r\n // if ((this.maxNumber || this.maxNumber === 0) && +value > this.maxNumber) {\r\n // setTimeout(() => {\r\n // this.inputControl.setValue(this.#getValueWithFormat(this.maxNumber.toString().replace(/\\./g, ',')));\r\n // }, 10);\r\n // event.preventDefault();\r\n // }\r\n }\r\n\r\n onFocus = () => {\r\n this.isFocused = true;\r\n this.sdFocus.emit();\r\n if (this.sdFocusForceBlur.observers?.length > 0) {\r\n this.blur();\r\n this.sdFocusForceBlur.emit();\r\n }\r\n }\r\n\r\n onBlur = () => {\r\n this.isFocused = false;\r\n const val: string = (this.inputControl.value ?? '').toString();\r\n const arrayValue = val.split(',');\r\n if (arrayValue.length >= 2 && arrayValue[1] == '') {\r\n this.inputControl.setValue(this.#formatNumber(arrayValue[0]));\r\n return;\r\n }\r\n if (val.length > val.trim().length) {\r\n this.inputControl.setValue(val.trim());\r\n }\r\n }\r\n\r\n onClick = () => {\r\n if (this.sdView?.templateRef) {\r\n if (!this.formControl.disabled && !this.isFocused) {\r\n this.focus();\r\n }\r\n }\r\n }\r\n\r\n blur = () => {\r\n this.isFocused = false;\r\n this.control?.nativeElement?.blur();\r\n }\r\n\r\n focus = () => {\r\n this.isFocused = true;\r\n setTimeout(() => {\r\n this.control?.nativeElement?.focus();\r\n }, 100);\r\n }\r\n\r\n #customValidator = (func: (value: any) => string | Promise<string>): AsyncValidatorFn => {\r\n return async (c: AbstractControl): Promise<{ [key: string]: any } | null> => {\r\n const value = c.value ?? null;\r\n if (func && typeof (func) === 'function') {\r\n const result = func(value);\r\n if (result instanceof Promise) {\r\n const message = await result;\r\n if (message) {\r\n return {\r\n customValidator: message\r\n };\r\n }\r\n return null;\r\n }\r\n if (result) {\r\n return {\r\n customValidator: result\r\n };\r\n }\r\n return null;\r\n }\r\n return null;\r\n };\r\n }\r\n\r\n onCopyText() {\r\n SdUtility.copyToClipboard(this.inputControl.value);\r\n this.copied = true;\r\n setTimeout(() => {\r\n this.copied = false;\r\n }, 2000);\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdInputNumber } from './input-number.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { SdTranslateModule } from '@sd-angular/core/translate';\r\nimport { SdCommonModule } from '@sd-angular/core/common';\r\nimport { SdPopoverModule } from '@sd-angular/core/popover';\r\n\r\n@NgModule({\r\n declarations: [SdInputNumber],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatTooltipModule,\r\n SdTranslateModule,\r\n SdCommonModule,\r\n SdPopoverModule,\r\n MatButtonModule\r\n ],\r\n exports: [\r\n SdInputNumber\r\n ]\r\n})\r\nexport class SdInputNumberModule { }\r\n","/*\r\n * Public API Surface of superdev-angular-core\r\n */\r\n\r\nexport * from './lib/input-number.module';\r\nexport * from './lib/input-number.component';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuid.v4"],"mappings":";;;;;;;;;;;;;;;;;AAgCA,MAAM,8BAA8B;IAClC,YAAoB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;KAAK;IACjD,YAAY,CAAC,OAA2B,EAAE,IAAwC;;QAChF,MAAM,WAAW,GAAG,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC;QAC3C,OAAO,CAAC,EAAE,OAAA,IAAI,CAAC,WAAW,0CAAE,OAAO,MAAK,OAAA,IAAI,CAAC,WAAW,0CAAE,KAAK,YAAI,IAAI,C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B;gBACD,OAAO,EAAE;oBACP,aAAa;iBACd;aACF;;;AC/BD;;;;ACAA;;;;;;"}
@@ -1,10 +1,7 @@
1
1
  import { SdScrollDirective, SdCommonModule } from '@sd-angular/core/common';
2
2
  import { InjectionToken, Directive, TemplateRef, Input, Component, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild, Injectable, Inject, Optional, EventEmitter, HostListener, QueryList, ContentChild, ContentChildren, Pipe, Output, NgModule } from '@angular/core';
3
3
  import { CommonModule, DatePipe, DecimalPipe } from '@angular/common';
4
- import { FormsModule, ReactiveFormsModule } from '@angular/forms';
5
- import { MatFormFieldModule } from '@angular/material/form-field';
6
4
  import { MatIconModule } from '@angular/material/icon';
7
- import { MatInputModule } from '@angular/material/input';
8
5
  import { __classPrivateFieldGet, __classPrivateFieldSet, __awaiter } from 'tslib';
9
6
  import { MatPaginator, MatPaginatorIntl, MatPaginatorModule } from '@angular/material/paginator';
10
7
  import { MatSort, MatSortModule } from '@angular/material/sort';
@@ -24,19 +21,14 @@ import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
24
21
  import { MatTableModule } from '@angular/material/table';
25
22
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
26
23
  import { CdkTableModule, CdkColumnDef } from '@angular/cdk/table';
27
- import { ScrollingModule } from '@angular/cdk/scrolling';
28
24
  import { MatMenuModule } from '@angular/material/menu';
29
- import { MatSliderModule } from '@angular/material/slider';
30
25
  import { MatButtonModule } from '@angular/material/button';
31
26
  import { SdServiceModule } from '@sd-angular/core/service';
32
27
  import { MatTooltipModule } from '@angular/material/tooltip';
33
- import { MatChipsModule } from '@angular/material/chips';
34
- import { MatRadioModule } from '@angular/material/radio';
35
28
  import { MatSlideToggleModule } from '@angular/material/slide-toggle';
36
29
  import { SdFormModule } from '@sd-angular/core/form';
37
30
  import { MatCheckboxModule } from '@angular/material/checkbox';
38
31
  import { MatListModule } from '@angular/material/list';
39
- import { MatDividerModule } from '@angular/material/divider';
40
32
  import { SdGroupModule } from '@sd-angular/core/group';
41
33
 
42
34
  const DEFAULT_TABLE_CONFIG = {
@@ -124,7 +116,7 @@ _filterRegister = new WeakMap();
124
116
  SdPopupFilter.decorators = [
125
117
  { type: Component, args: [{
126
118
  selector: 'sd-popup-filter',
127
- template: "<sd-modal width=\"500px\" [title]=\"'Filter' | sdTranslate\">\r\n <sd-modal-body class=\"c-popup-filter\">\r\n <ng-container *ngFor=\"let column of columns | sdFilterColumn\">\r\n <div class=\"d-flex align-items-baseline\">\r\n <ng-container>\r\n <div *sdDesktop class=\"c-checkable\">\r\n <mat-slide-toggle [(ngModel)]=\"inlineColumn[column.field]\" color=\"primary\"></mat-slide-toggle>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-filterable\">\r\n <sd-input\r\n *ngIf=\"column.type === 'string'\"\r\n [label]=\"column.title\"\r\n type=\"text\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n appearance=\"outline\">\r\n </sd-input>\r\n <sd-input\r\n *ngIf=\"column.type === 'number'\"\r\n [label]=\"column.title\"\r\n type=\" number\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n appearance=\"outline\">\r\n </sd-input>\r\n <sd-select\r\n *ngIf=\"column.type === 'bool'\"\r\n [label]=\"column.title\"\r\n [items]=\"[\r\n { value: '1', display: column.trueValue || 'True' },\r\n { value: '0', display: column.falseValue || 'False' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n appearance=\"outline\">\r\n </sd-select>\r\n <sd-autocomplete\r\n *ngIf=\"column.type === 'values' || column.type === 'lazy-values'\"\r\n [label]=\"column.title\"\r\n [items]=\"column.option.items\"\r\n [valueField]=\"column.option.valueField\"\r\n [displayField]=\"column.option.displayField\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n appearance=\"outline\">\r\n </sd-autocomplete>\r\n <sd-date-time\r\n *ngIf=\"column.type === 'date' || column.type === 'datetime' || column.type === 'time'\"\r\n [label]=\"column.title\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n type=\"date\"\r\n appearance=\"outline\">\r\n </sd-date-time>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngFor=\"let item of externalFilters | sdFilterExternal\">\r\n <div class=\"d-flex align-items-baseline\">\r\n <ng-container>\r\n <div *sdDesktop class=\"c-checkable\">\r\n <mat-slide-toggle [(ngModel)]=\"inlineExternal[item.field]\" color=\"primary\"></mat-slide-toggle>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-filterable\">\r\n <sd-input\r\n [label]=\"item.title\"\r\n *ngIf=\"item.type === 'string'\"\r\n type=\"text\"\r\n [(model)]=\"externalFilter[item.field]\"\r\n appearance=\"outline\">\r\n </sd-input>\r\n <sd-input-number [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"externalFilter[item.field]\" appearance=\"outline\">\r\n </sd-input-number>\r\n <sd-select\r\n [label]=\"item.title\"\r\n *ngIf=\"item.type === 'bool'\"\r\n [items]=\"[\r\n { value: '1', display: item.option?.displayOnTrue || 'True' },\r\n { value: '0', display: item.option?.displayOnFalse || 'False' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"externalFilter[item.field]\"\r\n appearance=\"outline\">\r\n </sd-select>\r\n <ng-container *ngIf=\"item.type === 'values'\">\r\n <sd-select\r\n *ngIf=\"item.option?.selection === 'MULTIPLE'\"\r\n [label]=\"item.title\"\r\n [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\"\r\n [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\"\r\n appearance=\"outline\"\r\n multiple>\r\n </sd-select>\r\n <sd-autocomplete\r\n *ngIf=\"item.option?.selection === 'AUTOCOMPLETE'\"\r\n [label]=\"item.title\"\r\n [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\"\r\n [displayField]=\"item.option.displayField\"\r\n appearance=\"outline\"\r\n [(model)]=\"externalFilter[item.field]\">\r\n </sd-autocomplete>\r\n <sd-select\r\n *ngIf=\"item.option?.selection === 'MULTIPLEAUTOCOMPLETE'\"\r\n [label]=\"item.title\"\r\n [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\"\r\n [displayField]=\"item.option.displayField\"\r\n appearance=\"outline\"\r\n [(model)]=\"externalFilter[item.field]\"\r\n filtered=\"true\"\r\n multiple>\r\n </sd-select>\r\n <sd-select\r\n *ngIf=\"!item.option?.selection\"\r\n [label]=\"item.title\"\r\n [items]=\"item.values\"\r\n [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\"\r\n [displayField]=\"item.option.displayField\"\r\n appearance=\"outline\"\r\n [(model)]=\"externalFilter[item.field]\">\r\n </sd-select>\r\n </ng-container>\r\n <sd-date-time\r\n [label]=\"item.title\"\r\n *ngIf=\"item.type === 'date' || item.type === 'datetime'\"\r\n [(model)]=\"externalFilter[item.field]\"\r\n [type]=\"item.type\"\r\n appearance=\"outline\">\r\n </sd-date-time>\r\n <sd-date-range\r\n [label]=\"item.title\"\r\n *ngIf=\"item.type === 'daterange' && externalFilter[item.field]\"\r\n [(from)]=\"externalFilter[item.field].from\"\r\n [(to)]=\"externalFilter[item.field].to\"\r\n [min]=\"item.minDate\"\r\n [max]=\"item.maxDate\"\r\n appearance=\"outline\">\r\n </sd-date-range>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngFor=\"let filter of filterDefs\">\r\n <div class=\"d-flex align-items-baseline\">\r\n <ng-container>\r\n <div *sdDesktop class=\"c-checkable\">\r\n <mat-slide-toggle [(ngModel)]=\"inlineFilterDef[filter.sdMaterialFilterDef]\" color=\"primary\"> </mat-slide-toggle>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-filterable\">\r\n <ng-container *ngTemplateOutlet=\"filter.templateRef; context: { filterDef: filterDef }\"> </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </sd-modal-body>\r\n <sd-modal-footer *sdDesktop>\r\n <sd-button class=\"mr-auto\" (action)=\"onClear()\" title=\"M\u1EB7c \u0111\u1ECBnh\" size=\"sm\" type=\"link\"> </sd-button>\r\n <sd-button (action)=\"onApply()\" title=\"\u0110\u1ED3ng \u00FD\" color=\"primary\" size=\"sm\" type=\"fill\"></sd-button>\r\n </sd-modal-footer>\r\n <sd-modal-footer *sdMobileTablet>\r\n <sd-button style=\"flex: 1; padding-right: 5px\" (action)=\"onClear()\" title=\"M\u1EB7c \u0111\u1ECBnh\" width=\"100%\" size=\"sm\" type=\"link\"></sd-button>\r\n <sd-button\r\n style=\"flex: 1; padding-left: 5px\"\r\n (action)=\"onApply()\"\r\n title=\"\u0110\u1ED3ng \u00FD\"\r\n color=\"primary\"\r\n width=\"100%\"\r\n size=\"sm\"\r\n type=\"fill\"></sd-button>\r\n </sd-modal-footer>\r\n</sd-modal>\r\n",
119
+ template: "<sd-modal width=\"500px\" [title]=\"'Filter' | sdTranslate\">\r\n <sd-modal-body class=\"c-popup-filter\">\r\n <ng-container *ngFor=\"let column of columns | sdFilterColumn\">\r\n <div class=\"d-flex align-items-baseline\">\r\n <ng-container>\r\n <div *sdDesktop class=\"c-checkable\">\r\n <mat-slide-toggle [(ngModel)]=\"inlineColumn[column.field]\" color=\"primary\"></mat-slide-toggle>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-filterable\">\r\n <sd-input\r\n *ngIf=\"column.type === 'string'\"\r\n [label]=\"column.title\"\r\n type=\"text\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n appearance=\"outline\">\r\n </sd-input>\r\n <sd-input\r\n *ngIf=\"column.type === 'number'\"\r\n [label]=\"column.title\"\r\n type=\" number\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n appearance=\"outline\">\r\n </sd-input>\r\n <sd-select\r\n *ngIf=\"column.type === 'bool'\"\r\n [label]=\"column.title\"\r\n [items]=\"[\r\n { value: '1', display: column.trueValue || 'True' },\r\n { value: '0', display: column.falseValue || 'False' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n appearance=\"outline\">\r\n </sd-select>\r\n <sd-autocomplete\r\n *ngIf=\"column.type === 'values' || column.type === 'lazy-values'\"\r\n [label]=\"column.title\"\r\n [items]=\"column.option.items\"\r\n [valueField]=\"column.option.valueField\"\r\n [displayField]=\"column.option.displayField\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n appearance=\"outline\">\r\n </sd-autocomplete>\r\n <sd-date-time\r\n *ngIf=\"column.type === 'date' || column.type === 'datetime' || column.type === 'time'\"\r\n [label]=\"column.title\"\r\n [(model)]=\"columnFilter[column.field]\"\r\n type=\"date\"\r\n appearance=\"outline\">\r\n </sd-date-time>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngFor=\"let item of externalFilters | sdFilterExternal\">\r\n <div class=\"d-flex align-items-baseline\">\r\n <ng-container>\r\n <div *sdDesktop class=\"c-checkable\">\r\n <mat-slide-toggle [(ngModel)]=\"inlineExternal[item.field]\" color=\"primary\"></mat-slide-toggle>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-filterable\">\r\n <sd-input\r\n [label]=\"item.title\"\r\n *ngIf=\"item.type === 'string'\"\r\n type=\"text\"\r\n [(model)]=\"externalFilter[item.field]\"\r\n appearance=\"outline\">\r\n </sd-input>\r\n <sd-input-number [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"externalFilter[item.field]\" appearance=\"outline\">\r\n </sd-input-number>\r\n <sd-select\r\n [label]=\"item.title\"\r\n *ngIf=\"item.type === 'bool'\"\r\n [items]=\"[\r\n { value: '1', display: item.option?.displayOnTrue || 'True' },\r\n { value: '0', display: item.option?.displayOnFalse || 'False' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"externalFilter[item.field]\"\r\n appearance=\"outline\">\r\n </sd-select>\r\n <ng-container *ngIf=\"item.type === 'values'\">\r\n <sd-select\r\n *ngIf=\"item.option?.selection === 'MULTIPLE'\"\r\n [label]=\"item.title\"\r\n [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\"\r\n [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\"\r\n appearance=\"outline\"\r\n multiple>\r\n </sd-select>\r\n <sd-autocomplete\r\n *ngIf=\"item.option?.selection === 'AUTOCOMPLETE'\"\r\n [label]=\"item.title\"\r\n [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\"\r\n [displayField]=\"item.option.displayField\"\r\n appearance=\"outline\"\r\n [(model)]=\"externalFilter[item.field]\">\r\n </sd-autocomplete>\r\n <sd-select\r\n *ngIf=\"item.option?.selection === 'MULTIPLEAUTOCOMPLETE'\"\r\n [label]=\"item.title\"\r\n [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\"\r\n [displayField]=\"item.option.displayField\"\r\n appearance=\"outline\"\r\n [(model)]=\"externalFilter[item.field]\"\r\n filtered=\"true\"\r\n multiple>\r\n </sd-select>\r\n <sd-select\r\n *ngIf=\"!item.option?.selection\"\r\n [label]=\"item.title\"\r\n [items]=\"item.values\"\r\n [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\"\r\n [displayField]=\"item.option.displayField\"\r\n appearance=\"outline\"\r\n [(model)]=\"externalFilter[item.field]\">\r\n </sd-select>\r\n </ng-container>\r\n <sd-date-time\r\n [label]=\"item.title\"\r\n *ngIf=\"item.type === 'date' || item.type === 'datetime'\"\r\n [(model)]=\"externalFilter[item.field]\"\r\n [type]=\"item.type\"\r\n appearance=\"outline\">\r\n </sd-date-time>\r\n <sd-date-range\r\n [label]=\"item.title\"\r\n *ngIf=\"item.type === 'daterange' && externalFilter[item.field]\"\r\n [(from)]=\"externalFilter[item.field].from\"\r\n [(to)]=\"externalFilter[item.field].to\"\r\n [min]=\"item.minDate\"\r\n [max]=\"item.maxDate\"\r\n appearance=\"outline\">\r\n </sd-date-range>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngFor=\"let filter of filterDefs\">\r\n <div class=\"d-flex align-items-baseline\">\r\n <ng-container>\r\n <div *sdDesktop class=\"c-checkable\">\r\n <mat-slide-toggle [(ngModel)]=\"inlineFilterDef[filter.sdTableFilterDef]\" color=\"primary\"> </mat-slide-toggle>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-filterable\">\r\n <ng-container *ngTemplateOutlet=\"filter.templateRef; context: { filterDef: filterDef }\"> </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </sd-modal-body>\r\n <sd-modal-footer *sdDesktop>\r\n <sd-button class=\"mr-auto\" (action)=\"onClear()\" title=\"M\u1EB7c \u0111\u1ECBnh\" size=\"sm\" type=\"link\"> </sd-button>\r\n <sd-button (action)=\"onApply()\" title=\"\u0110\u1ED3ng \u00FD\" color=\"primary\" size=\"sm\" type=\"fill\"></sd-button>\r\n </sd-modal-footer>\r\n <sd-modal-footer *sdMobileTablet>\r\n <sd-button style=\"flex: 1; padding-right: 5px\" (action)=\"onClear()\" title=\"M\u1EB7c \u0111\u1ECBnh\" width=\"100%\" size=\"sm\" type=\"link\"></sd-button>\r\n <sd-button\r\n style=\"flex: 1; padding-left: 5px\"\r\n (action)=\"onApply()\"\r\n title=\"\u0110\u1ED3ng \u00FD\"\r\n color=\"primary\"\r\n width=\"100%\"\r\n size=\"sm\"\r\n type=\"fill\"></sd-button>\r\n </sd-modal-footer>\r\n</sd-modal>\r\n",
128
120
  changeDetection: ChangeDetectionStrategy.OnPush,
129
121
  styles: [".c-checkable{width:50px}.c-filterable{flex:1}::ng-deep sd-modal-body.c-popup-filter .mat-form-field-wrapper{padding-bottom:0}"]
130
122
  },] }
@@ -215,7 +207,7 @@ _subscription = new WeakMap();
215
207
  SdTableFilter.decorators = [
216
208
  { type: Component, args: [{
217
209
  selector: 'sd-table-filter',
218
- template: "<ng-container *ngIf=\"!filter?.disabled\">\r\n <ng-container *ngIf=\"filter?.enableCollapse;else noCollapse\">\r\n <sd-group class=\"p-12\" [isExpanded]=\"false\" title=\"T\u00ECm ki\u1EBFm\" expandable>\r\n <div sdGroupBody>\r\n <ng-container *ngTemplateOutlet=\"noCollapse\"></ng-container>\r\n </div>\r\n </sd-group>\r\n </ng-container>\r\n <ng-template #noCollapse>\r\n <div *ngIf=\"!isMobileOrTablet && (externalFilters?.length || filterDefs?.length)\" class=\"row mx-0 mb-8\">\r\n <ng-container *ngIf=\"filter?.sorts?.length\">\r\n <ng-container *ngFor=\"let field of filter?.sorts\">\r\n <ng-container *ngIf=\"externalFilters?.length\">\r\n <ng-container *ngFor=\"let item of externalFilters | sdFilterExternal:field\">\r\n <ng-container *ngTemplateOutlet=\"filterExternal; context: {item: item}\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngFor=\"let item of filterDefs\">\r\n <div *ngIf=\"inlineFilterDef[item.sdMaterialFilterDef] && item.sdMaterialFilterDef === field\"\r\n class=\"col-lg-2 col-md-3 col-sm-6 px-8\">\r\n <ng-container *ngTemplateOutlet=\"item.templateRef;context:{filterDef:filterDef, isInline: true}\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!filter?.sorts?.length\">\r\n <ng-container *ngIf=\"externalFilters?.length\">\r\n <ng-container *ngFor=\"let item of externalFilters | sdFilterExternal\">\r\n <ng-container *ngTemplateOutlet=\"filterExternal; context: {item: item}\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngFor=\"let item of filterDefs\">\r\n <div *ngIf=\"inlineFilterDef[item.sdMaterialFilterDef]\" class=\"col-lg-2 col-md-3 col-sm-6 px-8\">\r\n <ng-container *ngTemplateOutlet=\"item.templateRef;context:{filterDef:filterDef, isInline: true}\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <ng-template #filterExternal let-item=\"item\">\r\n <div *ngIf=\"inlineExternal[item.field]\" class=\"col-lg-2 col-md-3 col-sm-6 px-8\">\r\n <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'string'\" type=\"text\" [(model)]=\"externalFilter[item.field]\"\r\n (keyupEnter)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-input>\r\n <sd-input-number [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"externalFilter[item.field]\"\r\n (keyupEnter)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-input-number>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'bool'\" [items]=\"[{value:'1',display:item.option?.displayOnTrue || 'True' },\r\n {value:'0',display:item.option?.displayOnFalse || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-select>\r\n <ng-container *ngIf=\"(item.type === 'values' || item.type === 'lazy-values') && item.option\">\r\n <sd-select *ngIf=\"item.option?.selection === 'MULTIPLE'\" [label]=\"item.title\" [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" [selectAll]=\"item.option.selectAll\"\r\n appearance=\"outline\" multiple>\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"item.option?.selection === 'AUTOCOMPLETE'\" [label]=\"item.title\"\r\n [items]=\"item.option.items\" [valueField]=\"item.option.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-autocomplete>\r\n <sd-select *ngIf=\"item.option?.selection === 'MULTIPLEAUTOCOMPLETE'\" [label]=\"item.title\"\r\n [items]=\"item.option.items\" [valueField]=\"item.option.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" filtered=\"true\" appearance=\"outline\"\r\n multiple>\r\n </sd-select>\r\n <sd-select *ngIf=\"!item.option?.selection\" [label]=\"item.title\" [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-select>\r\n </ng-container>\r\n <sd-date-time [label]=\"item.title\" *ngIf=\"item.type ==='date' || item.type ==='datetime'\"\r\n [(model)]=\"externalFilter[item.field]\" [type]=\"item.type\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-date-time>\r\n <sd-date-range [label]=\"item.title\" *ngIf=\"item.type ==='daterange' && externalFilter[item.field]\"\r\n [(from)]=\"externalFilter[item.field].from\" [(to)]=\"externalFilter[item.field].to\" [min]=\"item.minDate\"\r\n [max]=\"item.maxDate\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-date-range>\r\n </div>\r\n </ng-template>\r\n <sd-popup-filter [filterRegister]=\"filterRegister\" [columns]=\"columns\" [externalFilters]=\"externalFilters\"\r\n [filterDefs]=\"filterDefs\">\r\n </sd-popup-filter>\r\n </ng-template>\r\n</ng-container>",
210
+ template: "<ng-container *ngIf=\"!filter?.disabled\">\r\n <ng-container *ngIf=\"filter?.enableCollapse;else noCollapse\">\r\n <sd-group class=\"p-12\" [isExpanded]=\"false\" title=\"T\u00ECm ki\u1EBFm\" expandable>\r\n <div sdGroupBody>\r\n <ng-container *ngTemplateOutlet=\"noCollapse\"></ng-container>\r\n </div>\r\n </sd-group>\r\n </ng-container>\r\n <ng-template #noCollapse>\r\n <div *ngIf=\"!isMobileOrTablet && (externalFilters?.length || filterDefs?.length)\" class=\"row mx-0 mb-8\">\r\n <ng-container *ngIf=\"filter?.sorts?.length\">\r\n <ng-container *ngFor=\"let field of filter?.sorts\">\r\n <ng-container *ngIf=\"externalFilters?.length\">\r\n <ng-container *ngFor=\"let item of externalFilters | sdFilterExternal:field\">\r\n <ng-container *ngTemplateOutlet=\"filterExternal; context: {item: item}\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngFor=\"let item of filterDefs\">\r\n <div *ngIf=\"inlineFilterDef[item.sdTableFilterDef] && item.sdTableFilterDef === field\"\r\n class=\"col-lg-2 col-md-3 col-sm-6 px-8\">\r\n <ng-container *ngTemplateOutlet=\"item.templateRef;context:{filterDef:filterDef, isInline: true}\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!filter?.sorts?.length\">\r\n <ng-container *ngIf=\"externalFilters?.length\">\r\n <ng-container *ngFor=\"let item of externalFilters | sdFilterExternal\">\r\n <ng-container *ngTemplateOutlet=\"filterExternal; context: {item: item}\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngFor=\"let item of filterDefs\">\r\n <div *ngIf=\"inlineFilterDef[item.sdTableFilterDef]\" class=\"col-lg-2 col-md-3 col-sm-6 px-8\">\r\n <ng-container *ngTemplateOutlet=\"item.templateRef;context:{filterDef:filterDef, isInline: true}\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <ng-template #filterExternal let-item=\"item\">\r\n <div *ngIf=\"inlineExternal[item.field]\" class=\"col-lg-2 col-md-3 col-sm-6 px-8\">\r\n <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'string'\" type=\"text\" [(model)]=\"externalFilter[item.field]\"\r\n (keyupEnter)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-input>\r\n <sd-input-number [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"externalFilter[item.field]\"\r\n (keyupEnter)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-input-number>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'bool'\" [items]=\"[{value:'1',display:item.option?.displayOnTrue || 'True' },\r\n {value:'0',display:item.option?.displayOnFalse || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-select>\r\n <ng-container *ngIf=\"(item.type === 'values' || item.type === 'lazy-values') && item.option\">\r\n <sd-select *ngIf=\"item.option?.selection === 'MULTIPLE'\" [label]=\"item.title\" [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" [selectAll]=\"item.option.selectAll\"\r\n appearance=\"outline\" multiple>\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"item.option?.selection === 'AUTOCOMPLETE'\" [label]=\"item.title\"\r\n [items]=\"item.option.items\" [valueField]=\"item.option.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-autocomplete>\r\n <sd-select *ngIf=\"item.option?.selection === 'MULTIPLEAUTOCOMPLETE'\" [label]=\"item.title\"\r\n [items]=\"item.option.items\" [valueField]=\"item.option.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" filtered=\"true\" appearance=\"outline\"\r\n multiple>\r\n </sd-select>\r\n <sd-select *ngIf=\"!item.option?.selection\" [label]=\"item.title\" [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-select>\r\n </ng-container>\r\n <sd-date-time [label]=\"item.title\" *ngIf=\"item.type ==='date' || item.type ==='datetime'\"\r\n [(model)]=\"externalFilter[item.field]\" [type]=\"item.type\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-date-time>\r\n <sd-date-range [label]=\"item.title\" *ngIf=\"item.type ==='daterange' && externalFilter[item.field]\"\r\n [(from)]=\"externalFilter[item.field].from\" [(to)]=\"externalFilter[item.field].to\" [min]=\"item.minDate\"\r\n [max]=\"item.maxDate\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-date-range>\r\n </div>\r\n </ng-template>\r\n <sd-popup-filter [filterRegister]=\"filterRegister\" [columns]=\"columns\" [externalFilters]=\"externalFilters\"\r\n [filterDefs]=\"filterDefs\">\r\n </sd-popup-filter>\r\n </ng-template>\r\n</ng-container>",
219
211
  changeDetection: ChangeDetectionStrategy.OnPush,
220
212
  styles: [":host{display:block;padding-left:0;padding-right:0}:host ::ng-deep .mat-form-field-wrapper{padding-bottom:0}"]
221
213
  },] }
@@ -243,14 +235,14 @@ class SdMaterialFilterDefDirective {
243
235
  }
244
236
  SdMaterialFilterDefDirective.decorators = [
245
237
  { type: Directive, args: [{
246
- selector: '[sdMaterialFilterDef]'
238
+ selector: '[sdTableFilterDef]'
247
239
  },] }
248
240
  ];
249
241
  SdMaterialFilterDefDirective.ctorParameters = () => [
250
242
  { type: TemplateRef }
251
243
  ];
252
244
  SdMaterialFilterDefDirective.propDecorators = {
253
- sdMaterialFilterDef: [{ type: Input }],
245
+ sdTableFilterDef: [{ type: Input }],
254
246
  showing: [{ type: Input, args: ['defaultShowing',] }]
255
247
  };
256
248
 
@@ -261,7 +253,7 @@ class SdMaterialSubInformationDefDirective {
261
253
  }
262
254
  SdMaterialSubInformationDefDirective.decorators = [
263
255
  { type: Directive, args: [{
264
- selector: '[sdMaterialSubInformationDef]'
256
+ selector: '[sdTableExpandDef]'
265
257
  },] }
266
258
  ];
267
259
  SdMaterialSubInformationDefDirective.ctorParameters = () => [
@@ -275,14 +267,14 @@ class SdMaterialFooterDefDirective {
275
267
  }
276
268
  SdMaterialFooterDefDirective.decorators = [
277
269
  { type: Directive, args: [{
278
- selector: '[sdMaterialFooterDef]'
270
+ selector: '[sdTableFooterDef]'
279
271
  },] }
280
272
  ];
281
273
  SdMaterialFooterDefDirective.ctorParameters = () => [
282
274
  { type: TemplateRef }
283
275
  ];
284
276
  SdMaterialFooterDefDirective.propDecorators = {
285
- sdMaterialFooterDef: [{ type: Input }]
277
+ sdTableFooterDef: [{ type: Input }]
286
278
  };
287
279
 
288
280
  var _COLUMNS, _prefix, _getSetting, _default;
@@ -499,7 +491,7 @@ class SdTableFilterService {
499
491
  // Filter def
500
492
  filterDef: keys.includes('filterDef') ? (value === null || value === void 0 ? void 0 : value.filterDef) || {} : filterDef,
501
493
  // Force
502
- notReload: !!notReload,
494
+ notReload: !!(value === null || value === void 0 ? void 0 : value.notReload),
503
495
  };
504
496
  filterValue.set(updatedFilter);
505
497
  return updatedFilter;
@@ -531,7 +523,7 @@ class SdTableFilterService {
531
523
  }
532
524
  // Filter def
533
525
  for (const item of filterDefs || []) {
534
- inlineFilterDef[item.sdMaterialFilterDef] = item === null || item === void 0 ? void 0 : item.defaultShowing;
526
+ inlineFilterDef[item.sdTableFilterDef] = item === null || item === void 0 ? void 0 : item.defaultShowing;
535
527
  }
536
528
  return {
537
529
  // Filter column
@@ -558,7 +550,7 @@ class SdTableFilterService {
558
550
  }
559
551
  // Filter def
560
552
  for (const item of filterDefs || []) {
561
- filterDef[item.sdMaterialFilterDef] = undefined;
553
+ filterDef[item.sdTableFilterDef] = undefined;
562
554
  }
563
555
  return {
564
556
  // Filter column
@@ -585,7 +577,7 @@ class SdTableFilterService {
585
577
  }
586
578
  // Filter def
587
579
  for (const item of filterDefs || []) {
588
- inlineFilterDef[item.sdMaterialFilterDef] = (_g = (_f = configuration === null || configuration === void 0 ? void 0 : configuration.inlineFilterDef) === null || _f === void 0 ? void 0 : _f[item.sdMaterialFilterDef]) !== null && _g !== void 0 ? _g : item === null || item === void 0 ? void 0 : item.defaultShowing;
580
+ inlineFilterDef[item.sdTableFilterDef] = (_g = (_f = configuration === null || configuration === void 0 ? void 0 : configuration.inlineFilterDef) === null || _f === void 0 ? void 0 : _f[item.sdTableFilterDef]) !== null && _g !== void 0 ? _g : item === null || item === void 0 ? void 0 : item.defaultShowing;
589
581
  }
590
582
  return {
591
583
  // Filter column
@@ -620,7 +612,7 @@ class SdTableFilterService {
620
612
  }
621
613
  // Filter def
622
614
  for (const item of filterDefs || []) {
623
- filterDef[item.sdMaterialFilterDef] = (_q = (_p = value === null || value === void 0 ? void 0 : value.filterDef) === null || _p === void 0 ? void 0 : _p[item.sdMaterialFilterDef]) !== null && _q !== void 0 ? _q : undefined;
615
+ filterDef[item.sdTableFilterDef] = (_q = (_p = value === null || value === void 0 ? void 0 : value.filterDef) === null || _p === void 0 ? void 0 : _p[item.sdTableFilterDef]) !== null && _q !== void 0 ? _q : undefined;
624
616
  }
625
617
  return {
626
618
  // Filter column
@@ -689,7 +681,7 @@ _setting = new WeakMap();
689
681
  SdPopupConfiguration.decorators = [
690
682
  { type: Component, args: [{
691
683
  selector: 'sd-popup-configuration',
692
- template: "<sd-modal width=\"sm\" [title]=\"'Configuration' | sdTranslate\" #modal>\r\n <sd-modal-body *ngIf=\"configuration\">\r\n <div class=\"c-container\">\r\n <div class=\"c-table\" style=\"max-height: 70vh\">\r\n <table\r\n #table\r\n mat-table\r\n [dataSource]=\"configuration.columns\"\r\n cdkDropList\r\n [cdkDropListData]=\"configuration.columns\"\r\n (cdkDropListDropped)=\"dropTable($event)\">\r\n >\r\n <ng-container matColumnDef=\"stt\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 50px\">#</th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item; let idx = index\">\r\n <div class=\"c-handle\" (mousedown)=\"handleMouseDown()\" (mouseup)=\"handleMouseUp()\">\r\n <svg width=\"24px\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path\r\n d=\"M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z\"></path>\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\"></path>\r\n </svg>\r\n </div>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"title\">\r\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef>{{ 'Title' | sdTranslate }}</th>\r\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\r\n <sd-input [placeholder]=\"item?.origin?.title\" [(model)]=\"item.title\" disableErrorMessage></sd-input>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"width\">\r\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef style=\"width: 80px\">{{ 'Width' | sdTranslate }}</th>\r\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\r\n <!-- <span>{{item.width}}</span>\r\n <mat-slider\r\n step=\"1\"\r\n min=\"0\"\r\n [max]=\"+item?.origin?.width*3\"\r\n [(ngModel)]=\"+item.width\"\r\n aria-label=\"units\">\r\n </mat-slider> -->\r\n <sd-input [placeholder]=\"item?.origin?.width\" [(model)]=\"item.width\" disableErrorMessage></sd-input>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"invisible\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 80px\">{{ 'Hidden' | sdTranslate }}</th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item\">\r\n <mat-slide-toggle [(ngModel)]=\"item.invisible\" color=\"primary\"> </mat-slide-toggle>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"fixed\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 80px\">{{ 'Freeze' | sdTranslate }}</th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item\">\r\n <mat-slide-toggle [(ngModel)]=\"item.fixed\" color=\"primary\"></mat-slide-toggle>\r\n </td>\r\n </ng-container>\r\n <tr mat-header-row *matHeaderRowDef=\"['stt', 'title', 'width', 'invisible', 'fixed']; sticky: true\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: ['stt', 'title', 'width', 'invisible', 'fixed']\"\r\n cdkDrag\r\n [cdkDragData]=\"row\"\r\n cdkDragLockAxis=\"y\"\r\n [cdkDragDisabled]=\"disabledDrag\"></tr>\r\n </table>\r\n </div>\r\n </div>\r\n </sd-modal-body>\r\n <sd-modal-footer>\r\n <sd-button class=\"mr-8s\" (action)=\"onReset()\" title=\"M\u1EB7c \u0111\u1ECBnh\" color=\"info\" size=\"sm\"> </sd-button>\r\n <sd-button (action)=\"onSave()\" title=\"L\u01B0u\" type=\"fill\" color=\"info\" size=\"sm\"> </sd-button>\r\n </sd-modal-footer>\r\n</sd-modal>\r\n",
684
+ template: "<sd-modal width=\"sm\" [title]=\"'Configuration' | sdTranslate\" #modal>\r\n <sd-modal-body *ngIf=\"configuration\">\r\n <div class=\"c-container\">\r\n <div class=\"c-table\" style=\"max-height: 70vh\">\r\n <table\r\n #table\r\n mat-table\r\n [dataSource]=\"configuration.columns\"\r\n cdkDropList\r\n [cdkDropListData]=\"configuration.columns\"\r\n (cdkDropListDropped)=\"dropTable($event)\">\r\n >\r\n <ng-container matColumnDef=\"stt\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 50px\">#</th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item; let idx = index\">\r\n <div class=\"c-handle\" (mousedown)=\"handleMouseDown()\" (mouseup)=\"handleMouseUp()\">\r\n <svg width=\"24px\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path\r\n d=\"M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z\"></path>\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\"></path>\r\n </svg>\r\n </div>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"title\">\r\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef>{{ 'Title' | sdTranslate }}</th>\r\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\r\n <sd-input [placeholder]=\"item?.origin?.title\" [(model)]=\"item.title\" disableErrorMessage></sd-input>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"width\">\r\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef style=\"width: 80px\">{{ 'Width' | sdTranslate }}</th>\r\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\r\n <sd-input [placeholder]=\"item?.origin?.width\" [(model)]=\"item.width\" disableErrorMessage></sd-input>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"invisible\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 80px\">{{ 'Hidden' | sdTranslate }}</th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item\">\r\n <mat-slide-toggle [(ngModel)]=\"item.invisible\" color=\"primary\"> </mat-slide-toggle>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"fixed\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 80px\">{{ 'Freeze' | sdTranslate }}</th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item\">\r\n <mat-slide-toggle [(ngModel)]=\"item.fixed\" color=\"primary\"></mat-slide-toggle>\r\n </td>\r\n </ng-container>\r\n <tr mat-header-row *matHeaderRowDef=\"['stt', 'title', 'width', 'invisible', 'fixed']; sticky: true\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: ['stt', 'title', 'width', 'invisible', 'fixed']\"\r\n cdkDrag\r\n [cdkDragData]=\"row\"\r\n cdkDragLockAxis=\"y\"\r\n [cdkDragDisabled]=\"disabledDrag\"></tr>\r\n </table>\r\n </div>\r\n </div>\r\n </sd-modal-body>\r\n <sd-modal-footer>\r\n <sd-button class=\"mr-8s\" (action)=\"onReset()\" title=\"M\u1EB7c \u0111\u1ECBnh\" color=\"info\" size=\"sm\"> </sd-button>\r\n <sd-button (action)=\"onSave()\" title=\"L\u01B0u\" type=\"fill\" color=\"info\" size=\"sm\"> </sd-button>\r\n </sd-modal-footer>\r\n</sd-modal>\r\n",
693
685
  styles: [".c-table{overflow:auto;position:relative}.c-table table{width:100%}.c-table .c-th{color:#000;font-size:14px;font-weight:500;line-height:20px}.c-container{min-height:200px;position:relative}.c-handle{color:#ccc;cursor:move}"]
694
686
  },] }
695
687
  ];
@@ -767,9 +759,9 @@ class SdTable {
767
759
  this.footerDef = {};
768
760
  this.hasFooter = false;
769
761
  for (const footerDef of this.sdFooterDefs) {
770
- if (footerDef.sdMaterialFooterDef) {
762
+ if (footerDef.sdTableFooterDef) {
771
763
  this.hasFooter = true;
772
- this.footerDef[footerDef.sdMaterialFooterDef] = footerDef;
764
+ this.footerDef[footerDef.sdTableFooterDef] = footerDef;
773
765
  }
774
766
  }
775
767
  });
@@ -1416,23 +1408,29 @@ class SdTable {
1416
1408
  }
1417
1409
  }));
1418
1410
  _format.set(this, (rawItems, columns) => __awaiter(this, void 0, void 0, function* () {
1419
- var _4, _5;
1411
+ var _4, _5, _6;
1420
1412
  const items = rawItems.map(MapToSdTableItem);
1421
1413
  for (const column of columns) {
1422
1414
  // Clickable
1423
1415
  const { field, cellStyle, click, tooltip, htmlTemplate, transform } = column;
1424
- let objValues = {};
1425
- if (column.type === 'values') {
1426
- objValues = __classPrivateFieldGet(this, _cacheObjValues)[field] || {};
1427
- }
1428
1416
  if (column.type === 'lazy-values') {
1429
- const values = items.map(item => { var _a; return (_a = item.data) === null || _a === void 0 ? void 0 : _a[field]; }).filter(val => !!val || val === 0).union();
1417
+ __classPrivateFieldGet(this, _cacheObjValues)[field] = __classPrivateFieldGet(this, _cacheObjValues)[field] || {};
1418
+ const values = items
1419
+ .map(item => { var _a; return (_a = item.data) === null || _a === void 0 ? void 0 : _a[field]; })
1420
+ .filter(val => (!!val || val === 0) && !Object.keys(__classPrivateFieldGet(this, _cacheObjValues)[field]).includes(val))
1421
+ .union();
1430
1422
  const { option: { views }, } = column;
1431
1423
  if (views && values.length) {
1432
- objValues = Array.toObject(yield views(values).catch((err) => {
1424
+ const lazyItems = (yield views(values).catch(err => {
1433
1425
  console.error(err);
1434
1426
  return [];
1435
- }), column.option.valueField) || {};
1427
+ }))
1428
+ .filter(item => values.includes(item === null || item === void 0 ? void 0 : item[column.option.valueField]))
1429
+ .map(e => ({
1430
+ [column.option.valueField]: e === null || e === void 0 ? void 0 : e[column.option.valueField],
1431
+ [column.option.displayField]: e === null || e === void 0 ? void 0 : e[column.option.displayField],
1432
+ }));
1433
+ Object.assign(__classPrivateFieldGet(this, _cacheObjValues)[field], Array.toObject(lazyItems, column.option.valueField) || {});
1436
1434
  }
1437
1435
  }
1438
1436
  for (const item of items) {
@@ -1482,7 +1480,7 @@ class SdTable {
1482
1480
  }
1483
1481
  }
1484
1482
  if (column.type === 'values' || column.type === 'lazy-values') {
1485
- display.data = ((_4 = objValues[value]) === null || _4 === void 0 ? void 0 : _4[column.option.displayField]) || value;
1483
+ display.data = ((_5 = (_4 = __classPrivateFieldGet(this, _cacheObjValues)[field]) === null || _4 === void 0 ? void 0 : _4[value]) === null || _5 === void 0 ? void 0 : _5[column.option.displayField]) || value;
1486
1484
  }
1487
1485
  if (column.type === 'number' && Number.isNumber(value)) {
1488
1486
  display.data = Number.toVNCurrency(value);
@@ -1501,7 +1499,7 @@ class SdTable {
1501
1499
  display.badge = {
1502
1500
  type: !(column === null || column === void 0 ? void 0 : column.badgeType) ? 'round' : column.badgeType,
1503
1501
  color: column.badge(value, rowData),
1504
- icon: (_5 = column.badgeIcon) === null || _5 === void 0 ? void 0 : _5.call(column, value, rowData),
1502
+ icon: (_6 = column.badgeIcon) === null || _6 === void 0 ? void 0 : _6.call(column, value, rowData),
1505
1503
  };
1506
1504
  }
1507
1505
  else if (column.type === 'bool') {
@@ -1596,7 +1594,7 @@ _gridId = new WeakMap(), _optionChanges = new WeakMap(), _localItems = new WeakM
1596
1594
  SdTable.decorators = [
1597
1595
  { type: Component, args: [{
1598
1596
  selector: 'sd-table',
1599
- template: "<ng-container *ngIf=\"configuration\">\r\n <sd-table-filter\r\n *ngIf=\"!gridOption.filter?.disabled && filterRegister\"\r\n [filterRegister]=\"filterRegister\"\r\n [filter]=\"gridOption?.filter\"\r\n [columns]=\"configuration.firstColumns\"\r\n [externalFilters]=\"gridOption?.filter?.externalFilters\"\r\n [filterDefs]=\"filterDefs\">\r\n </sd-table-filter>\r\n <ng-container *ngIf=\"items | sdGroup : gridOption; $implicit as groupedItems\">\r\n <div class=\"c-container\">\r\n <div class=\"c-loading\" *ngIf=\"isLoading\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n <ng-container>\r\n <div\r\n class=\"c-table\"\r\n sdScroll\r\n [ngStyle]=\"{\r\n 'max-height': gridOption?.style?.maxHeight,\r\n 'min-height': gridOption?.style?.minHeight\r\n }\">\r\n <table\r\n mat-table\r\n [dataSource]=\"groupedItems\"\r\n matSort\r\n [matSortDisabled]=\"!gridOption.sort?.enable\"\r\n 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 <ng-container *ngIf=\"sdSubInformation?.templateRef\">\r\n <ng-container *ngIf=\"gridOption?.expand?.always; else useExpandCollapse\">\r\n <ng-container *ngTemplateOutlet=\"sdSubInformation.templateRef; context: { item: item }\"> </ng-container>\r\n </ng-container>\r\n <ng-template #useExpandCollapse>\r\n <div [@detailExpand]=\"item.isExpanded ? 'expanded' : 'collapsed'\">\r\n <ng-container *ngIf=\"item.isExpanded\">\r\n <ng-container *ngTemplateOutlet=\"sdSubInformation.templateRef; context: { item: item }\"> </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-template>\r\n </ng-container>\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\r\n class=\"p-0\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"width: 1px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button\r\n *ngIf=\"!element.isExpanding && !gridOption?.expand?.always\"\r\n mat-icon-button\r\n 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\r\n class=\"text-center px-15\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"min-width: 50px; max-width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\">\r\n <ng-container *ngIf=\"items | selectionVisibleSelectAll : gridOption?.selector | async\">\r\n <mat-checkbox\r\n *ngIf=\"!gridOption.selector?.single\"\r\n class=\"c-selection\"\r\n color=\"primary\"\r\n [(ngModel)]=\"isSelectAll\"\r\n (change)=\"onSelectAll()\">\r\n </mat-checkbox>\r\n </ng-container>\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?.selector\">\r\n <mat-checkbox\r\n class=\"c-selection\"\r\n color=\"primary\"\r\n [(ngModel)]=\"item.isSelected\"\r\n (change)=\"onSelect(item)\"\r\n [disabled]=\"selectedItems | selectionDisable : item : gridOption?.selector\">\r\n </mat-checkbox>\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\r\n class=\"px-8 py-8\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n 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 matColumnDef=\"sdGroup\">\r\n <th mat-header-cell *matHeaderCellDef class=\"px-8 py-8\" [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"!item?.sdGroup ? 1 : configuration.displayedColumns.length\">\r\n <div [innerHtml]=\"item?.sdGroup?.htmlTemplate | safeHtml\"></div>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container\r\n *ngFor=\"let column of configuration.firstColumns; let i = index\"\r\n [matColumnDef]=\"column.field\"\r\n [sticky]=\"configuration.fixedColumn[column.field]\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n class=\"px-8 py-8 c-th\"\r\n [ngStyle]=\"{ 'min-width': configuration.firstColumns[i].width }\"\r\n [attr.rowspan]=\"configuration.multipleHeader && column.type !== 'children-col' ? 2 : 1\"\r\n [attr.colspan]=\"column.type === 'children-col' ? column.children?.length : 1\">\r\n <div>\r\n <div\r\n aria-hidden=\"true\"\r\n mat-sort-header\r\n [disabled]=\"!column.sortable || column.type === 'children-col'\"\r\n [class.text-right]=\"column.align === 'right' || (!column.align && column.type === 'number')\"\r\n [class.text-center]=\"column.align === 'center'\"\r\n [innerHTML]=\"configuration.firstColumns[i].titleHtml || configuration.firstColumns[i].title\"></div>\r\n <sd-column-inline-filter\r\n *ngIf=\"!gridOption.filter?.disabled && columnOperator\"\r\n [value]=\"columnFilter[column.field]\"\r\n [(inlineOperator)]=\"columnOperator[column.field]\"\r\n [columnFilter]=\"columnFilter\"\r\n [cacheValues]=\"cacheValues\"\r\n [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n <td class=\"c-td px-0\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-cell\r\n class=\"d-block px-8\"\r\n *ngIf=\"!item?.sdGroup\"\r\n [sdId]=\"item.meta.id\"\r\n [key]=\"key\"\r\n [value]=\"item[column.field]\"\r\n [column]=\"column\"\r\n [item]=\"item\"\r\n [idx]=\"i\"\r\n [cellDef]=\"cellDef\"\r\n [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=\"footerDef[column.field].templateRef; context: { items: items, column: column }\">\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\" [matColumnDef]=\"column.field\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"c-th px-8\" [ngStyle]=\"{ 'min-width': column.width }\">\r\n <div>\r\n <div\r\n [class.text-right]=\"column.align === 'right' || (!column.align && column.type === 'number')\"\r\n [class.text-center]=\"column.align === 'center'\"\r\n [innerHTML]=\"column.titleHtml || column.title\"></div>\r\n <sd-column-inline-filter\r\n *ngIf=\"!gridOption.filter?.disabled && columnOperator\"\r\n [value]=\"columnFilter[column.field]\"\r\n [(inlineOperator)]=\"columnOperator[column.field]\"\r\n [columnFilter]=\"columnFilter\"\r\n [cacheValues]=\"cacheValues\"\r\n [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n <td class=\"c-td px-0\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-cell\r\n class=\"d-block px-8\"\r\n [sdId]=\"item.meta.id\"\r\n [key]=\"key\"\r\n [value]=\"item[column.field]\"\r\n [column]=\"column\"\r\n [item]=\"item\"\r\n [idx]=\"i\"\r\n [cellDef]=\"cellDef\"\r\n [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=\"footerDef[column.field].templateRef; context: { items: items, column: column }\">\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\"></tr>\r\n </ng-container>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: configuration.displayedColumns\"\r\n matRipple\r\n class=\"c-row\"\r\n [class.selected]=\"row.isSelected\"></tr>\r\n\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 </div>\r\n </ng-container>\r\n <div class=\"c-paginator\">\r\n <div class=\"c-action\">\r\n <sd-button\r\n *ngIf=\"tableFilter\"\r\n class=\"mr-8\"\r\n [title]=\"'Filter' | sdTranslate\"\r\n icon=\"filter_alt\"\r\n size=\"sm\"\r\n (action)=\"tableFilter.open()\"\r\n type=\"link\">\r\n </sd-button>\r\n <sd-button\r\n *ngIf=\"gridOption.reload?.visible\"\r\n class=\"mr-8\"\r\n [title]=\"'Reload' | sdTranslate\"\r\n icon=\"refresh\"\r\n size=\"sm\"\r\n (action)=\"reload()\"\r\n [disabled]=\"!items?.length\"\r\n 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\" 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\" [matMenuTriggerFor]=\"menu\" type=\"link\">\r\n </sd-button>\r\n </ng-template>\r\n\r\n <mat-menu #menu=\"matMenu\">\r\n <button mat-menu-item (click)=\"exportExcel()\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">file_download</mat-icon>\r\n <span> Xu\u1EA5t excel</span>\r\n </button>\r\n <button mat-menu-item (click)=\"exportCSV()\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">file_download</mat-icon>\r\n <span> Xu\u1EA5t CSV</span>\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n <sd-button\r\n *ngIf=\"popupConfiguration\"\r\n class=\"mr-8\"\r\n [title]=\"'Configure' | sdTranslate\"\r\n icon=\"settings\"\r\n size=\"sm\"\r\n (action)=\"popupConfiguration.open()\"\r\n type=\"link\">\r\n </sd-button>\r\n </div>\r\n <mat-paginator\r\n [class.d-none]=\"gridOption.paginate?.hidden\"\r\n [length]=\"total\"\r\n [pageSize]=\"gridOption.paginate?.pageSize\"\r\n [pageSizeOptions]=\"gridOption.paginate?.pages\"\r\n [showFirstLastButtons]=\"gridOption.paginate?.showFirstLastButtons\"></mat-paginator>\r\n </div>\r\n </div>\r\n <sd-table-quick-action [gridOption]=\"gridOption\" [selectedItems]=\"selectedItems\" (clear)=\"onClearSelection(groupedItems)\">\r\n </sd-table-quick-action>\r\n <sd-popup-configuration *ngIf=\"gridOption?.key && gridOption.config?.visible\" [gridOption]=\"gridOption\">\r\n </sd-popup-configuration>\r\n </ng-container>\r\n</ng-container>\r\n",
1597
+ template: "<ng-container *ngIf=\"configuration\">\r\n <sd-table-filter\r\n *ngIf=\"!gridOption.filter?.disabled && filterRegister\"\r\n [filterRegister]=\"filterRegister\"\r\n [filter]=\"gridOption?.filter\"\r\n [columns]=\"configuration.firstColumns\"\r\n [externalFilters]=\"gridOption?.filter?.externalFilters\"\r\n [filterDefs]=\"filterDefs\">\r\n </sd-table-filter>\r\n <ng-container *ngIf=\"items | sdGroup : gridOption; $implicit as groupedItems\">\r\n <div class=\"c-container\">\r\n <div class=\"c-loading\" *ngIf=\"isLoading\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n <ng-container>\r\n <div\r\n class=\"c-table\"\r\n sdScroll\r\n [ngStyle]=\"{\r\n 'max-height': gridOption?.style?.maxHeight,\r\n 'min-height': gridOption?.style?.minHeight\r\n }\">\r\n <table mat-table [dataSource]=\"groupedItems\" matSort [matSortDisabled]=\"!gridOption.sort?.enable\" 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 <ng-container *ngIf=\"sdSubInformation?.templateRef\">\r\n <ng-container *ngIf=\"gridOption?.expand?.always; else useExpandCollapse\">\r\n <ng-container *ngTemplateOutlet=\"sdSubInformation.templateRef; context: { item: item }\"> </ng-container>\r\n </ng-container>\r\n <ng-template #useExpandCollapse>\r\n <div [@detailExpand]=\"item.isExpanded ? 'expanded' : 'collapsed'\">\r\n <ng-container *ngIf=\"item.isExpanded\">\r\n <ng-container *ngTemplateOutlet=\"sdSubInformation.templateRef; context: { item: item }\"> </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-template>\r\n </ng-container>\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\r\n class=\"p-0\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"width: 1px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button\r\n *ngIf=\"!element.isExpanding && !gridOption?.expand?.always\"\r\n mat-icon-button\r\n 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\r\n class=\"text-center px-15\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"min-width: 50px; max-width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\">\r\n <ng-container *ngIf=\"items | selectionVisibleSelectAll : gridOption?.selector | async\">\r\n <mat-checkbox\r\n *ngIf=\"!gridOption.selector?.single\"\r\n class=\"c-selection\"\r\n color=\"primary\"\r\n [(ngModel)]=\"isSelectAll\"\r\n (change)=\"onSelectAll()\">\r\n </mat-checkbox>\r\n </ng-container>\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?.selector\">\r\n <mat-checkbox\r\n class=\"c-selection\"\r\n color=\"primary\"\r\n [(ngModel)]=\"item.isSelected\"\r\n (change)=\"onSelect(item)\"\r\n [disabled]=\"selectedItems | selectionDisable : item : gridOption?.selector\">\r\n </mat-checkbox>\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\r\n class=\"px-8 py-8\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n 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 matColumnDef=\"sdGroup\">\r\n <th mat-header-cell *matHeaderCellDef class=\"px-8 py-8\" [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"!item?.sdGroup ? 1 : configuration.displayedColumns.length\">\r\n <div [innerHtml]=\"item?.sdGroup?.htmlTemplate | safeHtml\"></div>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container\r\n *sdFor=\"let column of configuration.firstColumns; let i = index\"\r\n [matColumnDef]=\"column.field\"\r\n [sticky]=\"configuration.fixedColumn[column.field]\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n class=\"px-8 py-8 c-th\"\r\n [ngStyle]=\"{ 'min-width': configuration.firstColumns[i].width }\"\r\n [attr.rowspan]=\"configuration.multipleHeader && column.type !== 'children-col' ? 2 : 1\"\r\n [attr.colspan]=\"column.type === 'children-col' ? column.children?.length : 1\">\r\n <div>\r\n <div\r\n aria-hidden=\"true\"\r\n mat-sort-header\r\n [disabled]=\"!column.sortable || column.type === 'children-col'\"\r\n [class.text-right]=\"column.align === 'right' || (!column.align && column.type === 'number')\"\r\n [class.text-center]=\"column.align === 'center'\"\r\n [innerHTML]=\"configuration.firstColumns[i].titleHtml || configuration.firstColumns[i].title\"></div>\r\n <sd-column-inline-filter\r\n *ngIf=\"!gridOption.filter?.disabled && columnOperator\"\r\n [value]=\"columnFilter[column.field]\"\r\n [(inlineOperator)]=\"columnOperator[column.field]\"\r\n [columnFilter]=\"columnFilter\"\r\n [cacheValues]=\"cacheValues\"\r\n [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n <td class=\"c-td px-0\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-cell\r\n class=\"d-block px-8\"\r\n *ngIf=\"!item?.sdGroup\"\r\n [sdId]=\"item.meta.id\"\r\n [key]=\"key\"\r\n [value]=\"item[column.field]\"\r\n [column]=\"column\"\r\n [item]=\"item\"\r\n [idx]=\"i\"\r\n [cellDef]=\"cellDef\"\r\n [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=\"footerDef[column.field].templateRef; context: { items: items, column: column }\">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <ng-container *sdFor=\"let column of configuration.secondColumns; let i = index\" [matColumnDef]=\"column.field\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"c-th px-8\" [ngStyle]=\"{ 'min-width': column.width }\">\r\n <div>\r\n <div\r\n [class.text-right]=\"column.align === 'right' || (!column.align && column.type === 'number')\"\r\n [class.text-center]=\"column.align === 'center'\"\r\n [innerHTML]=\"column.titleHtml || column.title\"></div>\r\n <sd-column-inline-filter\r\n *ngIf=\"!gridOption.filter?.disabled && columnOperator\"\r\n [value]=\"columnFilter[column.field]\"\r\n [(inlineOperator)]=\"columnOperator[column.field]\"\r\n [columnFilter]=\"columnFilter\"\r\n [cacheValues]=\"cacheValues\"\r\n [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n <td class=\"c-td px-0\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-cell\r\n class=\"d-block px-8\"\r\n [sdId]=\"item.meta.id\"\r\n [key]=\"key\"\r\n [value]=\"item[column.field]\"\r\n [column]=\"column\"\r\n [item]=\"item\"\r\n [idx]=\"i\"\r\n [cellDef]=\"cellDef\"\r\n [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=\"footerDef[column.field].templateRef; context: { items: items, column: column }\">\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\"></tr>\r\n </ng-container>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: configuration.displayedColumns\"\r\n matRipple\r\n class=\"c-row\"\r\n [class.selected]=\"row.isSelected\"></tr>\r\n\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 </div>\r\n </ng-container>\r\n <div class=\"c-paginator\">\r\n <div class=\"c-action\">\r\n <sd-button\r\n *ngIf=\"tableFilter\"\r\n class=\"mr-8\"\r\n [title]=\"'Filter' | sdTranslate\"\r\n icon=\"filter_alt\"\r\n size=\"sm\"\r\n (action)=\"tableFilter.open()\"\r\n type=\"link\">\r\n </sd-button>\r\n <sd-button\r\n *ngIf=\"gridOption.reload?.visible\"\r\n class=\"mr-8\"\r\n [title]=\"'Reload' | sdTranslate\"\r\n icon=\"refresh\"\r\n size=\"sm\"\r\n (action)=\"reload()\"\r\n [disabled]=\"!items?.length\"\r\n 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\" 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\" [matMenuTriggerFor]=\"menu\" type=\"link\">\r\n </sd-button>\r\n </ng-template>\r\n\r\n <mat-menu #menu=\"matMenu\">\r\n <button mat-menu-item (click)=\"exportExcel()\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">file_download</mat-icon>\r\n <span> Xu\u1EA5t excel</span>\r\n </button>\r\n <button mat-menu-item (click)=\"exportCSV()\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">file_download</mat-icon>\r\n <span> Xu\u1EA5t CSV</span>\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n <sd-button\r\n *ngIf=\"popupConfiguration\"\r\n class=\"mr-8\"\r\n [title]=\"'Configure' | sdTranslate\"\r\n icon=\"settings\"\r\n size=\"sm\"\r\n (action)=\"popupConfiguration.open()\"\r\n type=\"link\">\r\n </sd-button>\r\n </div>\r\n <mat-paginator\r\n [class.d-none]=\"gridOption.paginate?.hidden\"\r\n [length]=\"total\"\r\n [pageSize]=\"gridOption.paginate?.pageSize\"\r\n [pageSizeOptions]=\"gridOption.paginate?.pages\"\r\n [showFirstLastButtons]=\"gridOption.paginate?.showFirstLastButtons\"></mat-paginator>\r\n </div>\r\n </div>\r\n <sd-table-quick-action [gridOption]=\"gridOption\" [selectedItems]=\"selectedItems\" (clear)=\"onClearSelection(groupedItems)\">\r\n </sd-table-quick-action>\r\n <sd-popup-configuration *ngIf=\"gridOption?.key && gridOption.config?.visible\" [gridOption]=\"gridOption\"> </sd-popup-configuration>\r\n </ng-container>\r\n</ng-container>\r\n",
1600
1598
  changeDetection: ChangeDetectionStrategy.OnPush,
1601
1599
  animations: [
1602
1600
  trigger('detailExpand', [
@@ -2377,10 +2375,6 @@ SdTableModule.decorators = [
2377
2375
  { type: NgModule, args: [{
2378
2376
  imports: [
2379
2377
  CommonModule,
2380
- FormsModule,
2381
- ReactiveFormsModule,
2382
- MatInputModule,
2383
- MatFormFieldModule,
2384
2378
  MatSortModule,
2385
2379
  MatPaginatorModule,
2386
2380
  MatTableModule,
@@ -2389,18 +2383,13 @@ SdTableModule.decorators = [
2389
2383
  MatButtonModule,
2390
2384
  MatTooltipModule,
2391
2385
  MatProgressSpinnerModule,
2392
- MatChipsModule,
2393
- MatRadioModule,
2394
2386
  MatSlideToggleModule,
2395
2387
  MatCheckboxModule,
2396
2388
  MatListModule,
2397
- MatDividerModule,
2398
2389
  CdkTableModule,
2399
2390
  DragDropModule,
2400
2391
  SdFormModule,
2401
2392
  SdServiceModule,
2402
- MatSliderModule,
2403
- ScrollingModule,
2404
2393
  SdCommonModule,
2405
2394
  SdGroupModule,
2406
2395
  ],