@sd-angular/core 1.1.85 → 1.1.89

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 (92) hide show
  1. package/autocomplete/sd-angular-core-autocomplete.metadata.json +1 -1
  2. package/autocomplete/src/lib/autocomplete.component.d.ts +0 -1
  3. package/bundles/sd-angular-core-autocomplete.umd.js +10 -10
  4. package/bundles/sd-angular-core-autocomplete.umd.js.map +1 -1
  5. package/bundles/sd-angular-core-autocomplete.umd.min.js +2 -2
  6. package/bundles/sd-angular-core-autocomplete.umd.min.js.map +1 -1
  7. package/bundles/sd-angular-core-chip.umd.js +13 -19
  8. package/bundles/sd-angular-core-chip.umd.js.map +1 -1
  9. package/bundles/sd-angular-core-chip.umd.min.js +2 -2
  10. package/bundles/sd-angular-core-chip.umd.min.js.map +1 -1
  11. package/bundles/sd-angular-core-date-range.umd.js +8 -1
  12. package/bundles/sd-angular-core-date-range.umd.js.map +1 -1
  13. package/bundles/sd-angular-core-date-range.umd.min.js +1 -1
  14. package/bundles/sd-angular-core-date-range.umd.min.js.map +1 -1
  15. package/bundles/sd-angular-core-date-time.umd.js +6 -6
  16. package/bundles/sd-angular-core-date-time.umd.js.map +1 -1
  17. package/bundles/sd-angular-core-date-time.umd.min.js +1 -1
  18. package/bundles/sd-angular-core-date-time.umd.min.js.map +1 -1
  19. package/bundles/sd-angular-core-grid.umd.js +6 -6
  20. package/bundles/sd-angular-core-grid.umd.js.map +1 -1
  21. package/bundles/sd-angular-core-grid.umd.min.js +1 -1
  22. package/bundles/sd-angular-core-grid.umd.min.js.map +1 -1
  23. package/bundles/sd-angular-core-input-currency.umd.js +1 -1
  24. package/bundles/sd-angular-core-input-currency.umd.js.map +1 -1
  25. package/bundles/sd-angular-core-input-currency.umd.min.js +1 -1
  26. package/bundles/sd-angular-core-input-currency.umd.min.js.map +1 -1
  27. package/bundles/sd-angular-core-input.umd.js +1 -1
  28. package/bundles/sd-angular-core-input.umd.js.map +1 -1
  29. package/bundles/sd-angular-core-input.umd.min.js +1 -1
  30. package/bundles/sd-angular-core-input.umd.min.js.map +1 -1
  31. package/bundles/sd-angular-core-select-editor.umd.js +1 -1
  32. package/bundles/sd-angular-core-select-editor.umd.js.map +1 -1
  33. package/bundles/sd-angular-core-select-editor.umd.min.js +1 -1
  34. package/bundles/sd-angular-core-select-editor.umd.min.js.map +1 -1
  35. package/bundles/sd-angular-core-select.umd.js +1 -1
  36. package/bundles/sd-angular-core-select.umd.js.map +1 -1
  37. package/bundles/sd-angular-core-select.umd.min.js +1 -1
  38. package/bundles/sd-angular-core-select.umd.min.js.map +1 -1
  39. package/bundles/sd-angular-core-textarea.umd.js +9 -6
  40. package/bundles/sd-angular-core-textarea.umd.js.map +1 -1
  41. package/bundles/sd-angular-core-textarea.umd.min.js +2 -2
  42. package/bundles/sd-angular-core-textarea.umd.min.js.map +1 -1
  43. package/chip/sd-angular-core-chip.metadata.json +1 -1
  44. package/chip/src/lib/chip.component.d.ts +7 -4
  45. package/date-range/sd-angular-core-date-range.metadata.json +1 -1
  46. package/date-range/src/lib/date-range.component.d.ts +1 -0
  47. package/date-time/sd-angular-core-date-time.metadata.json +1 -1
  48. package/date-time/src/lib/date-time.component.d.ts +2 -2
  49. package/esm2015/autocomplete/src/lib/autocomplete.component.js +2 -2
  50. package/esm2015/chip/src/lib/chip.component.js +16 -22
  51. package/esm2015/date-range/src/lib/date-range.component.js +5 -2
  52. package/esm2015/date-time/src/lib/date-time.component.js +7 -7
  53. package/esm2015/grid/src/lib/components/grid-config/grid-config.component.js +2 -2
  54. package/esm2015/grid/src/lib/components/grid-desktop-column-edit/grid-desktop-column-edit.component.js +2 -2
  55. package/esm2015/grid/src/lib/components/grid-desktop-inline-filter/grid-desktop-inline-filter.component.js +2 -2
  56. package/esm2015/grid/src/lib/components/grid-popup-editor/grid-popup-editor.component.js +2 -2
  57. package/esm2015/grid/src/lib/components/grid-popup-filter/grid-popup-filter.component.js +2 -2
  58. package/esm2015/grid/src/lib/components/grid-popup-quick-filter-detail/grid-popup-quick-filter-detail.component.js +2 -2
  59. package/esm2015/input/src/lib/input.component.js +2 -2
  60. package/esm2015/input-currency/src/lib/input-currency.component.js +2 -2
  61. package/esm2015/select/src/lib/select.component.js +2 -2
  62. package/esm2015/select-editor/src/lib/select-editor.component.js +2 -2
  63. package/esm2015/textarea/src/lib/textarea.component.js +12 -9
  64. package/fesm2015/sd-angular-core-autocomplete.js +1 -1
  65. package/fesm2015/sd-angular-core-autocomplete.js.map +1 -1
  66. package/fesm2015/sd-angular-core-chip.js +15 -21
  67. package/fesm2015/sd-angular-core-chip.js.map +1 -1
  68. package/fesm2015/sd-angular-core-date-range.js +4 -1
  69. package/fesm2015/sd-angular-core-date-range.js.map +1 -1
  70. package/fesm2015/sd-angular-core-date-time.js +6 -6
  71. package/fesm2015/sd-angular-core-date-time.js.map +1 -1
  72. package/fesm2015/sd-angular-core-grid.js +6 -6
  73. package/fesm2015/sd-angular-core-grid.js.map +1 -1
  74. package/fesm2015/sd-angular-core-input-currency.js +1 -1
  75. package/fesm2015/sd-angular-core-input-currency.js.map +1 -1
  76. package/fesm2015/sd-angular-core-input.js +1 -1
  77. package/fesm2015/sd-angular-core-input.js.map +1 -1
  78. package/fesm2015/sd-angular-core-select-editor.js +1 -1
  79. package/fesm2015/sd-angular-core-select-editor.js.map +1 -1
  80. package/fesm2015/sd-angular-core-select.js +1 -1
  81. package/fesm2015/sd-angular-core-select.js.map +1 -1
  82. package/fesm2015/sd-angular-core-textarea.js +11 -8
  83. package/fesm2015/sd-angular-core-textarea.js.map +1 -1
  84. package/grid/sd-angular-core-grid.metadata.json +1 -1
  85. package/input/sd-angular-core-input.metadata.json +1 -1
  86. package/input-currency/sd-angular-core-input-currency.metadata.json +1 -1
  87. package/package.json +1 -1
  88. package/{sd-angular-core-1.1.85.tgz → sd-angular-core-1.1.89.tgz} +0 -0
  89. package/select/sd-angular-core-select.metadata.json +1 -1
  90. package/select-editor/sd-angular-core-select-editor.metadata.json +1 -1
  91. package/textarea/sd-angular-core-textarea.metadata.json +1 -1
  92. package/textarea/src/lib/textarea.component.d.ts +5 -2
@@ -54,7 +54,7 @@ class SdDateTime {
54
54
  this.formControl = new SdFormControl();
55
55
  _form.set(this, void 0);
56
56
  this.type = 'datetime';
57
- this.isRequired = false;
57
+ this.required = false;
58
58
  this.sdChange = new EventEmitter();
59
59
  this.modelChange = new EventEmitter();
60
60
  _subscription.set(this, new Subscription());
@@ -178,9 +178,9 @@ class SdDateTime {
178
178
  this.formControl.enable();
179
179
  }
180
180
  }
181
- set required(val) {
182
- this.isRequired = (val === '') || val;
183
- if (this.isRequired) {
181
+ set _required(val) {
182
+ this.required = (val === '') || val;
183
+ if (this.required) {
184
184
  this.formControl.setValidators([Validators.required]);
185
185
  }
186
186
  else {
@@ -246,7 +246,7 @@ _date = new WeakMap(), _name = new WeakMap(), _form = new WeakMap(), _subscripti
246
246
  SdDateTime.decorators = [
247
247
  { type: Component, args: [{
248
248
  selector: 'sd-date-time',
249
- template: "<label *ngIf=\"!appearance && label\" class=\"d-block mb-0 T14M\">{{label}} <span class=\"text-danger mb-2\"\r\n *ngIf=\"isRequired\">*</span></label>\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\r\n *ngIf=\"sdView?.templateRef && !isFocused && !datePicker?.opened && !dateTimePicker?.opened; 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 *ngIf=\"type === 'datetime' || type === 'time'\" class=\"sd-md\"\r\n [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\" matInput (dateInput)=\"onChange($event)\" [autocomplete]=\"id\" autocorrect=\"off\"\r\n [formControl]=\"formControl\" [ngxMatDatetimePicker]=\"picker1\"\r\n [placeholder]=\"placeholder || (!appearance ? label : '')\" [min]=\"min\" [required]=\"isRequired\" [max]=\"max\"\r\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" [attr.data-qclabel]=\"label\" [attr.data-qcid]=\"qcId\" #input />\r\n <!-- <mat-icon class=\"pointer sd-suffix-icon\" (click)=\"!formControl?.disabled && picker1.open()\" matSuffix>today\r\n </mat-icon> -->\r\n <mat-icon *ngIf=\"formControl?.value && !isRequired && !formControl.disabled\" class=\"pointer sd-suffix-icon\"\r\n (click)=\"clear($event)\" matSuffix>cancel\r\n </mat-icon>\r\n <mat-datepicker-toggle matSuffix [for]=\"picker1\">\r\n </mat-datepicker-toggle>\r\n <ngx-mat-datetime-picker #picker1 [defaultTime]=\"defaultTime\" [touchUi]=\"isMobileOrTablet\" [showSpinners]=\"false\"\r\n (opened)=\"onFocus()\" (closed)=\"onBlur();focusInputElement()\">\r\n </ngx-mat-datetime-picker>\r\n\r\n <mat-error *ngIf=\"formControl?.errors?.required && formControl?.touched && !disableErrorMessage\">\r\n {{ \"This field is required\" | sdTranslate }}\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.matDatetimePickerMin && formControl?.touched && !disableErrorMessage\">\r\n {{ \"Min date\" | sdTranslate }}:\r\n <strong>{{ min | date: \"dd/MM/yyyy HH:mm\" }}</strong>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.matDatetimePickerMax && formControl?.touched && !disableErrorMessage\">\r\n {{ \"Max date\" | sdTranslate }}:\r\n <strong>{{ max | date: \"dd/MM/yyyy HH:mm\" }}</strong>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.matDatetimePickerParse && formControl?.touched && !disableErrorMessage\">\r\n {{ \"Parse error\" | sdTranslate }}:\r\n <strong>{{ formControl?.errors?.matDatetimePickerParse?.text }}</strong>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.customValidator && formControl?.touched && !disableErrorMessage\">\r\n <strong>{{ formControl?.errors?.customValidator }}</strong>\r\n </mat-error>\r\n </mat-form-field>\r\n <mat-form-field *ngIf=\"type === 'date'\" class=\"sd-md\"\r\n [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\" matInput (dateInput)=\"onChange($event)\" [autocomplete]=\"id\" autocorrect=\"off\"\r\n [formControl]=\"formControl\" [required]=\"isRequired\" [matDatepicker]=\"picker2\"\r\n [placeholder]=\"placeholder || (!appearance ? label : '')\" [min]=\"min\" [max]=\"max\" (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\" [attr.data-qclabel]=\"label\" [attr.data-qcid]=\"qcId\" #input />\r\n <mat-icon *ngIf=\"formControl?.value && !isRequired && !formControl.disabled\" class=\"pointer sd-suffix-icon\"\r\n (click)=\"clear($event)\" matSuffix>cancel\r\n </mat-icon>\r\n\r\n <mat-icon class=\"pointer sd-suffix-icon\" (click)=\"!formControl?.disabled && picker2.open()\" #btn matSuffix>today\r\n </mat-icon>\r\n\r\n <mat-datepicker #picker2 [touchUi]=\"isMobileOrTablet\"></mat-datepicker>\r\n\r\n <mat-error *ngIf=\"formControl?.errors?.required && formControl?.touched && !disableErrorMessage\">\r\n {{ \"This field is required\" | sdTranslate }}\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.customValidator && formControl?.touched && !disableErrorMessage\">\r\n <strong>{{ formControl?.errors?.customValidator }}</strong>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- <ngx-mat-timepicker *ngIf=\"type === 'time'\" formControlName=\"name\" [disabled]=\"disabled\" showSpinners=\"false\" stepHour=\"1\"\r\n stepMinute=\"1\" stepSecond=\"1\">\r\n</ngx-mat-timepicker> -->\r\n <mat-form-field *ngIf=\"type === 'month'\" class=\"sd-md\"\r\n [ngClass]=\"{ 'sd-sm': size === 'sm' , 'no-padding-wrapper': disableErrorMessage}\" appearance=\"outline\">\r\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\r\n <input [id]=\"id\" matInput (dateInput)=\"onChange($event)\" [autocomplete]=\"id\" autocorrect=\"off\"\r\n [formControl]=\"formControl\" [required]=\"isRequired\" [matDatepicker]=\"pickerMonth\"\r\n placeholder=\"{{ placeholder || label }}\" [min]=\"min\" [max]=\"max\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" #input />\r\n\r\n <mat-icon *ngIf=\"formControl?.value && !isRequired && !formControl.disabled\" class=\"pointer sd-suffix-icon\"\r\n (click)=\"clear($event)\" matSuffix>cancel\r\n </mat-icon>\r\n <mat-icon class=\"pointer sd-suffix-icon\" (click)=\"!formControl?.disabled && pickerMonth.open()\" #btn matSuffix>\r\n today\r\n </mat-icon>\r\n\r\n <mat-datepicker #pickerMonth [touchUi]=\"isMobileOrTablet\" startView=\"multi-year\"\r\n (monthSelected)=\"setMonthAndYear($event, pickerMonth)\"></mat-datepicker>\r\n\r\n <mat-error *ngIf=\"formControl?.errors?.required && formControl?.touched && !disableErrorMessage\">\r\n {{ \"This field is required\" | sdTranslate }}\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.customValidator && formControl?.touched && !disableErrorMessage\">\r\n <strong>{{ formControl?.errors?.customValidator }}</strong>\r\n </mat-error>\r\n </mat-form-field>\r\n </ng-template>\r\n</div>",
249
+ template: "<label *ngIf=\"!appearance && label\" class=\"d-block mb-0 T14M\">{{label}} <span class=\"text-danger mb-2\"\r\n *ngIf=\"required\">*</span></label>\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\r\n *ngIf=\"sdView?.templateRef && !isFocused && !datePicker?.opened && !dateTimePicker?.opened; 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 *ngIf=\"type === 'datetime' || type === 'time'\" class=\"sd-md\"\r\n [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\" matInput (dateInput)=\"onChange($event)\" [autocomplete]=\"id\" autocorrect=\"off\"\r\n [formControl]=\"formControl\" [ngxMatDatetimePicker]=\"picker1\"\r\n [placeholder]=\"placeholder || (appearance ? label : '')\" [min]=\"min\" [required]=\"required\" [max]=\"max\"\r\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" [attr.data-qclabel]=\"label\" [attr.data-qcid]=\"qcId\" #input />\r\n <!-- <mat-icon class=\"pointer sd-suffix-icon\" (click)=\"!formControl?.disabled && picker1.open()\" matSuffix>today\r\n </mat-icon> -->\r\n <mat-icon *ngIf=\"formControl?.value && !required && !formControl.disabled\" class=\"pointer sd-suffix-icon\"\r\n (click)=\"clear($event)\" matSuffix>cancel\r\n </mat-icon>\r\n <mat-datepicker-toggle matSuffix [for]=\"picker1\">\r\n </mat-datepicker-toggle>\r\n <ngx-mat-datetime-picker #picker1 [defaultTime]=\"defaultTime\" [touchUi]=\"isMobileOrTablet\" [showSpinners]=\"false\"\r\n (opened)=\"onFocus()\" (closed)=\"onBlur();focusInputElement()\">\r\n </ngx-mat-datetime-picker>\r\n\r\n <mat-error *ngIf=\"formControl?.errors?.required && formControl?.touched && !disableErrorMessage\">\r\n {{ \"This field is required\" | sdTranslate }}\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.matDatetimePickerMin && formControl?.touched && !disableErrorMessage\">\r\n {{ \"Min date\" | sdTranslate }}:\r\n <strong>{{ min | date: \"dd/MM/yyyy HH:mm\" }}</strong>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.matDatetimePickerMax && formControl?.touched && !disableErrorMessage\">\r\n {{ \"Max date\" | sdTranslate }}:\r\n <strong>{{ max | date: \"dd/MM/yyyy HH:mm\" }}</strong>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.matDatetimePickerParse && formControl?.touched && !disableErrorMessage\">\r\n {{ \"Parse error\" | sdTranslate }}:\r\n <strong>{{ formControl?.errors?.matDatetimePickerParse?.text }}</strong>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.customValidator && formControl?.touched && !disableErrorMessage\">\r\n <strong>{{ formControl?.errors?.customValidator }}</strong>\r\n </mat-error>\r\n </mat-form-field>\r\n <mat-form-field *ngIf=\"type === 'date'\" class=\"sd-md\"\r\n [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\" matInput (dateInput)=\"onChange($event)\" [autocomplete]=\"id\" autocorrect=\"off\"\r\n [formControl]=\"formControl\" [required]=\"required\" [matDatepicker]=\"picker2\"\r\n [placeholder]=\"placeholder || (appearance ? label : '')\" [min]=\"min\" [max]=\"max\" (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\" [attr.data-qclabel]=\"label\" [attr.data-qcid]=\"qcId\" #input />\r\n <mat-icon *ngIf=\"formControl?.value && !required && !formControl.disabled\" class=\"pointer sd-suffix-icon\"\r\n (click)=\"clear($event)\" matSuffix>cancel\r\n </mat-icon>\r\n\r\n <mat-icon class=\"pointer sd-suffix-icon\" (click)=\"!formControl?.disabled && picker2.open()\" #btn matSuffix>today\r\n </mat-icon>\r\n\r\n <mat-datepicker #picker2 [touchUi]=\"isMobileOrTablet\"></mat-datepicker>\r\n\r\n <mat-error *ngIf=\"formControl?.errors?.required && formControl?.touched && !disableErrorMessage\">\r\n {{ \"This field is required\" | sdTranslate }}\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.customValidator && formControl?.touched && !disableErrorMessage\">\r\n <strong>{{ formControl?.errors?.customValidator }}</strong>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- <ngx-mat-timepicker *ngIf=\"type === 'time'\" formControlName=\"name\" [disabled]=\"disabled\" showSpinners=\"false\" stepHour=\"1\"\r\n stepMinute=\"1\" stepSecond=\"1\">\r\n</ngx-mat-timepicker> -->\r\n <mat-form-field *ngIf=\"type === 'month'\" class=\"sd-md\"\r\n [ngClass]=\"{ 'sd-sm': size === 'sm' , 'no-padding-wrapper': disableErrorMessage}\" appearance=\"outline\">\r\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\r\n <input [id]=\"id\" matInput (dateInput)=\"onChange($event)\" [autocomplete]=\"id\" autocorrect=\"off\"\r\n [formControl]=\"formControl\" [required]=\"required\" [matDatepicker]=\"pickerMonth\"\r\n [placeholder]=\"placeholder || (appearance ? label : '')\" [min]=\"min\" [max]=\"max\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" #input />\r\n\r\n <mat-icon *ngIf=\"formControl?.value && !required && !formControl.disabled\" class=\"pointer sd-suffix-icon\"\r\n (click)=\"clear($event)\" matSuffix>cancel\r\n </mat-icon>\r\n <mat-icon class=\"pointer sd-suffix-icon\" (click)=\"!formControl?.disabled && pickerMonth.open()\" #btn matSuffix>\r\n today\r\n </mat-icon>\r\n\r\n <mat-datepicker #pickerMonth [touchUi]=\"isMobileOrTablet\" startView=\"multi-year\"\r\n (monthSelected)=\"setMonthAndYear($event, pickerMonth)\"></mat-datepicker>\r\n\r\n <mat-error *ngIf=\"formControl?.errors?.required && formControl?.touched && !disableErrorMessage\">\r\n {{ \"This field is required\" | sdTranslate }}\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.customValidator && formControl?.touched && !disableErrorMessage\">\r\n <strong>{{ formControl?.errors?.customValidator }}</strong>\r\n </mat-error>\r\n </mat-form-field>\r\n </ng-template>\r\n</div>",
250
250
  changeDetection: ChangeDetectionStrategy.OnPush,
251
251
  providers: [
252
252
  { provide: MAT_DATE_FORMATS, useValue: ɵ0 },
@@ -270,7 +270,7 @@ SdDateTime.propDecorators = {
270
270
  form: [{ type: Input }],
271
271
  type: [{ type: Input }],
272
272
  disabled: [{ type: Input }],
273
- required: [{ type: Input }],
273
+ _required: [{ type: Input, args: ['required',] }],
274
274
  _label: [{ type: Input, args: ['label',] }],
275
275
  placeholder: [{ type: Input }],
276
276
  defaultTime: [{ type: Input }],
@@ -1 +1 @@
1
- {"version":3,"file":"sd-angular-core-date-time.js","sources":["../../../../projects/sd-core/date-time/src/lib/date-time.component.ts","../../../../projects/sd-core/date-time/src/lib/date-time.module.ts","../../../../projects/sd-core/date-time/sd-angular-core-date-time.ts"],"sourcesContent":["import {\r\n Component,\r\n Input,\r\n EventEmitter,\r\n Output,\r\n OnDestroy,\r\n AfterViewInit,\r\n ChangeDetectorRef,\r\n OnInit,\r\n ViewChild,\r\n ChangeDetectionStrategy,\r\n ContentChild,\r\n ElementRef,\r\n Inject,\r\n Optional\r\n} from '@angular/core';\r\nimport * as uuid from 'uuid';\r\nimport hash from 'object-hash';\r\nimport moment, { Moment } from 'moment';\r\nimport { FormGroup, NgForm, Validators } from '@angular/forms';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\nimport { MatDatepicker, MatDatepickerInputEvent } from '@angular/material/datepicker';\r\nimport { NgxMatDatetimePicker, NGX_MAT_DATE_FORMATS, } from '@angular-material-components/datetime-picker';\r\nimport { MAT_DATE_FORMATS } from '@angular/material/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { FORM_CONFIG, IFormConfiguration, SdFormControl, SdViewDefDirective } from '@sd-angular/core/common';\r\nimport { MatFormFieldAppearance } from '@angular/material/form-field';\r\n\r\nconst CUSTOM_DATETIME_FORMATS = {\r\n parse: {\r\n dateInput: 'DD/MM/YYYY HH:mm'\r\n },\r\n display: {\r\n dateInput: 'DD/MM/YYYY HH:mm',\r\n monthYearLabel: 'MMM YYYY',\r\n dateA11yLabel: 'LL',\r\n monthYearA11yLabel: 'MMMM YYYY'\r\n }\r\n};\r\nconst CUSTOM_DATE_FORMATS = {\r\n parse: {\r\n dateInput: 'DD/MM/YYYY'\r\n },\r\n display: {\r\n dateInput: 'DD/MM/YYYY',\r\n monthYearLabel: 'MMM YYYY',\r\n dateA11yLabel: 'LL',\r\n monthYearA11yLabel: 'MMMM YYYY'\r\n }\r\n};\r\n@Component({\r\n selector: 'sd-date-time',\r\n templateUrl: './date-time.component.html',\r\n styleUrls: ['./date-time.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [\r\n { provide: MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS },\r\n { provide: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATETIME_FORMATS }\r\n ]\r\n})\r\nexport class SdDateTime implements OnDestroy, OnInit, AfterViewInit {\r\n id = `I${uuid.v4()}`;\r\n isMobileOrTablet = false;\r\n #date: any;\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() appearance: MatFormFieldAppearance;\r\n disableErrorMessage = false;\r\n @Input('disableErrorMessage') set _disableErrorMessage(val: boolean | '') {\r\n this.disableErrorMessage = (val === '') || val;\r\n val = (val === '') || val;\r\n }\r\n formControl = new SdFormControl();\r\n min: Date;\r\n @Input('min') set _min(val: string | Date) {\r\n if (Date.isDate(val)) {\r\n this.min = new Date(val);\r\n } else {\r\n this.min = null;\r\n }\r\n }\r\n max: Date;\r\n @Input('max') set _max(val: string | Date) {\r\n if (Date.isDate(val)) {\r\n this.max = new Date(val);\r\n } else {\r\n this.max = null;\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 @Input() type: 'datetime' | 'date' | 'time' | 'month' = 'datetime';\r\n @Input() set disabled(val: boolean | '') {\r\n val = (val === '') || val;\r\n if (val) {\r\n this.formControl.disable();\r\n } else {\r\n this.formControl.enable();\r\n }\r\n }\r\n isRequired = false;\r\n @Input() set required(val: boolean | '') {\r\n this.isRequired = (val === '') || val;\r\n if (this.isRequired) {\r\n this.formControl.setValidators([Validators.required]);\r\n } else {\r\n this.formControl.clearValidators();\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-date-time',\r\n label: val\r\n });\r\n };\r\n @Input() placeholder: string;\r\n @Input() defaultTime: any;\r\n @Input() set minDate(val: string | Date) {\r\n if (Date.isDate(val)) {\r\n this.min = new Date(val);\r\n } else {\r\n this.min = null;\r\n }\r\n }\r\n @Input() set maxDate(val: string | Date) {\r\n if (Date.isDate(val)) {\r\n this.max = new Date(val);\r\n } else {\r\n this.max = null;\r\n }\r\n }\r\n @Input() validator: (value: any) => string | Promise<string>;\r\n @Output() sdChange = new EventEmitter();\r\n\r\n @Input() set model(val: any) {\r\n if (!Date.isDate(val)) {\r\n val = null;\r\n }\r\n if (this.#date !== val) {\r\n this.#date = val;\r\n const date = Date.isDate(this.#date) ? moment(Date.toFormat(this.#date, 'MM/dd/yyyy HH:mm:ss'), 'MM/DD/YYYY HH:mm:ss') : null;\r\n this.formControl.setValue(date);\r\n }\r\n }\r\n @Output() modelChange = new EventEmitter();\r\n #subscription = new Subscription();\r\n @ContentChild(SdViewDefDirective) sdView: SdViewDefDirective;\r\n @ViewChild('input') input: ElementRef;\r\n @ViewChild(MatDatepicker) datePicker: MatDatepicker<Moment>;\r\n @ViewChild(NgxMatDatetimePicker) dateTimePicker: NgxMatDatetimePicker<Moment>;\r\n isFocused = false;\r\n constructor(\r\n private ref: ChangeDetectorRef,\r\n deviceService: DeviceDetectorService,\r\n @Inject(FORM_CONFIG) @Optional() private formConfig: IFormConfiguration) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.#form?.removeControl(this.#name);\r\n this.#subscription.unsubscribe();\r\n }\r\n\r\n ngOnInit() {\r\n this.appearance = this.appearance || this.formConfig?.appearance;\r\n this.#subscription.add(this.formControl.sdChanges.subscribe(() => {\r\n // this.formControl.updateValueAndValidity();\r\n this.ref.markForCheck();\r\n }));\r\n this.#form?.addControl(this.#name, this.formControl);\r\n }\r\n\r\n ngAfterViewInit() {\r\n }\r\n\r\n onFocus = () => {\r\n this.isFocused = true;\r\n }\r\n\r\n onBlur = () => {\r\n this.isFocused = false;\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.input?.nativeElement?.blur();\r\n }\r\n\r\n focus = () => {\r\n this.isFocused = true;\r\n setTimeout(() => {\r\n this.input?.nativeElement?.focus();\r\n if (this.type === 'date') {\r\n this.datePicker?.open();\r\n } else {\r\n this.dateTimePicker?.open();\r\n }\r\n //\r\n }, 100);\r\n }\r\n\r\n focusInputElement() {\r\n this.input?.nativeElement?.focus();\r\n }\r\n\r\n onChange = (event: MatDatepickerInputEvent<Moment>) => {\r\n const value = event.value?.toDate();\r\n /**\r\n * Focus input khi `ngx-mat-datetime-picker` đang mở sẽ trigger hàm cancel() làm cho giá trị _selected không được update mới nhất\r\n * Case riêng trường hợp type = `datetime` thì xử lý focus element sau khi `ngx-mat-datetime-picker` emit event (closed)\r\n * @see https://github.com/h2qutc/ngx-mat-datetime-picker/blob/HEAD/projects/datetime-picker/src/lib/datetime-input.ts#L343\r\n */\r\n if (!this.dateTimePicker) {\r\n this.input?.nativeElement?.focus();\r\n }\r\n if (value) {\r\n if (new Date(this.#date) !== value) {\r\n this.modelChange.emit(value);\r\n this.sdChange.emit(value);\r\n }\r\n } else {\r\n if (!this.formControl?.value) {\r\n this.modelChange.emit(null);\r\n this.sdChange.emit(null);\r\n }\r\n }\r\n }\r\n\r\n clear = ($event: any) => {\r\n $event?.stopPropagation();\r\n if (this.formControl.value) {\r\n this.formControl.setValue(null);\r\n this.modelChange.emit(null);\r\n this.sdChange.emit(null);\r\n }\r\n }\r\n\r\n setMonthAndYear = (normalizedMonthAndYear: Moment, datepicker: MatDatepicker<Moment>) => {\r\n const ctrlValue = this.formControl.value || moment();\r\n ctrlValue.month(normalizedMonthAndYear.month());\r\n ctrlValue.year(normalizedMonthAndYear.year());\r\n this.formControl.setValue(ctrlValue);\r\n datepicker.close();\r\n this.modelChange.emit(ctrlValue);\r\n this.sdChange.emit(ctrlValue);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatDatepickerModule } from '@angular/material/datepicker';\r\nimport {\r\n NgxMatDatetimePickerModule,\r\n NgxMatTimepickerModule\r\n} from '@angular-material-components/datetime-picker';\r\nimport { SdDateTime } from './date-time.component';\r\nimport { SdTranslateModule } from '@sd-angular/core/translate';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { NgxMatMomentModule } from '@angular-material-components/moment-adapter';\r\nimport { MatMomentDateModule } from '@angular/material-moment-adapter';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { SdCommonModule } from '@sd-angular/core/common';\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatFormFieldModule,\r\n MatDatepickerModule,\r\n MatMomentDateModule,\r\n NgxMatDatetimePickerModule,\r\n NgxMatTimepickerModule,\r\n NgxMatMomentModule,\r\n SdTranslateModule,\r\n SdCommonModule\r\n ],\r\n declarations: [\r\n SdDateTime\r\n ],\r\n exports: [\r\n SdCommonModule,\r\n SdDateTime\r\n ],\r\n providers: [\r\n ]\r\n})\r\nexport class SdDateTimeModule {\r\n\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuid.v4"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,uBAAuB,GAAG;IAC9B,KAAK,EAAE;QACL,SAAS,EAAE,kBAAkB;KAC9B;IACD,OAAO,EAAE;QACP,SAAS,EAAE,kBAAkB;QAC7B,cAAc,EAAE,UAAU;QAC1B,aAAa,EAAE,IAAI;QACnB,kBAAkB,EAAE,WAAW;KAChC;CACF,CAAC;AACF,MAAM,mBAAmB,GAAG;IAC1B,KAAK,EAAE;QACL,SAAS,EAAE,YAAY;KACxB;IACD,OAAO,EAAE;QACP,SAAS,EAAE,YAAY;QACvB,cAAc,EAAE,UAAU;QAC1B,aAAa,EAAE,IAAI;QACnB,kBAAkB,EAAE,WAAW;KAChC;CACF,CAAC;WAOyC,mBAAmB,OACf,uBAAuB;MAGzD,UAAU;IA2GrB,YACU,GAAsB,EAC9B,aAAoC,EACK,UAA8B;QAF/D,QAAG,GAAH,GAAG,CAAmB;QAEW,eAAU,GAAV,UAAU,CAAoB;QA7GzE,OAAE,GAAG,IAAIA,EAAO,EAAE,EAAE,CAAC;QACrB,qBAAgB,GAAG,KAAK,CAAC;QACzB,wBAAW;QACX,gBAAQA,EAAO,EAAE,EAAC;QAOlB,wBAAmB,GAAG,KAAK,CAAC;QAK5B,gBAAW,GAAG,IAAI,aAAa,EAAE,CAAC;QAkBlC,wBAAiB;QAUR,SAAI,GAA2C,UAAU,CAAC;QASnE,eAAU,GAAG,KAAK,CAAC;QAmCT,aAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QAY9B,gBAAW,GAAG,IAAI,YAAY,EAAE,CAAC;QAC3C,wBAAgB,IAAI,YAAY,EAAE,EAAC;QAKnC,cAAS,GAAG,KAAK,CAAC;QAyBlB,YAAO,GAAG;YACR,IAAI,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Ac;oBACd,aAAa;oBACb,kBAAkB;oBAClB,mBAAmB;oBACnB,mBAAmB;oBACnB,0BAA0B;oBAC1B,sBAAsB;oBACtB,kBAAkB;oBAClB,iBAAiB;oBACjB,cAAc;iBACf;gBACD,YAAY,EAAE;oBACZ,UAAU;iBACX;gBACD,OAAO,EAAE;oBACP,cAAc;oBACd,UAAU;iBACX;gBACD,SAAS,EAAE,EACV;aACF;;;ACzCD;;;;;;"}
1
+ {"version":3,"file":"sd-angular-core-date-time.js","sources":["../../../../projects/sd-core/date-time/src/lib/date-time.component.ts","../../../../projects/sd-core/date-time/src/lib/date-time.module.ts","../../../../projects/sd-core/date-time/sd-angular-core-date-time.ts"],"sourcesContent":["import {\r\n Component,\r\n Input,\r\n EventEmitter,\r\n Output,\r\n OnDestroy,\r\n AfterViewInit,\r\n ChangeDetectorRef,\r\n OnInit,\r\n ViewChild,\r\n ChangeDetectionStrategy,\r\n ContentChild,\r\n ElementRef,\r\n Inject,\r\n Optional\r\n} from '@angular/core';\r\nimport * as uuid from 'uuid';\r\nimport hash from 'object-hash';\r\nimport moment, { Moment } from 'moment';\r\nimport { FormGroup, NgForm, Validators } from '@angular/forms';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\nimport { MatDatepicker, MatDatepickerInputEvent } from '@angular/material/datepicker';\r\nimport { NgxMatDatetimePicker, NGX_MAT_DATE_FORMATS, } from '@angular-material-components/datetime-picker';\r\nimport { MAT_DATE_FORMATS } from '@angular/material/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { FORM_CONFIG, IFormConfiguration, SdFormControl, SdViewDefDirective } from '@sd-angular/core/common';\r\nimport { MatFormFieldAppearance } from '@angular/material/form-field';\r\n\r\nconst CUSTOM_DATETIME_FORMATS = {\r\n parse: {\r\n dateInput: 'DD/MM/YYYY HH:mm'\r\n },\r\n display: {\r\n dateInput: 'DD/MM/YYYY HH:mm',\r\n monthYearLabel: 'MMM YYYY',\r\n dateA11yLabel: 'LL',\r\n monthYearA11yLabel: 'MMMM YYYY'\r\n }\r\n};\r\nconst CUSTOM_DATE_FORMATS = {\r\n parse: {\r\n dateInput: 'DD/MM/YYYY'\r\n },\r\n display: {\r\n dateInput: 'DD/MM/YYYY',\r\n monthYearLabel: 'MMM YYYY',\r\n dateA11yLabel: 'LL',\r\n monthYearA11yLabel: 'MMMM YYYY'\r\n }\r\n};\r\n@Component({\r\n selector: 'sd-date-time',\r\n templateUrl: './date-time.component.html',\r\n styleUrls: ['./date-time.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [\r\n { provide: MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS },\r\n { provide: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATETIME_FORMATS }\r\n ]\r\n})\r\nexport class SdDateTime implements OnDestroy, OnInit, AfterViewInit {\r\n id = `I${uuid.v4()}`;\r\n isMobileOrTablet = false;\r\n #date: any;\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() appearance: MatFormFieldAppearance;\r\n disableErrorMessage = false;\r\n @Input('disableErrorMessage') set _disableErrorMessage(val: boolean | '') {\r\n this.disableErrorMessage = (val === '') || val;\r\n val = (val === '') || val;\r\n }\r\n formControl = new SdFormControl();\r\n min: Date;\r\n @Input('min') set _min(val: string | Date) {\r\n if (Date.isDate(val)) {\r\n this.min = new Date(val);\r\n } else {\r\n this.min = null;\r\n }\r\n }\r\n max: Date;\r\n @Input('max') set _max(val: string | Date) {\r\n if (Date.isDate(val)) {\r\n this.max = new Date(val);\r\n } else {\r\n this.max = null;\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 @Input() type: 'datetime' | 'date' | 'time' | 'month' = 'datetime';\r\n @Input() set disabled(val: boolean | '') {\r\n val = (val === '') || val;\r\n if (val) {\r\n this.formControl.disable();\r\n } else {\r\n this.formControl.enable();\r\n }\r\n }\r\n required = false;\r\n @Input('required') set _required(val: boolean | '') {\r\n this.required = (val === '') || val;\r\n if (this.required) {\r\n this.formControl.setValidators([Validators.required]);\r\n } else {\r\n this.formControl.clearValidators();\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-date-time',\r\n label: val\r\n });\r\n };\r\n @Input() placeholder: string;\r\n @Input() defaultTime: any;\r\n @Input() set minDate(val: string | Date) {\r\n if (Date.isDate(val)) {\r\n this.min = new Date(val);\r\n } else {\r\n this.min = null;\r\n }\r\n }\r\n @Input() set maxDate(val: string | Date) {\r\n if (Date.isDate(val)) {\r\n this.max = new Date(val);\r\n } else {\r\n this.max = null;\r\n }\r\n }\r\n @Input() validator: (value: any) => string | Promise<string>;\r\n @Output() sdChange = new EventEmitter();\r\n\r\n @Input() set model(val: any) {\r\n if (!Date.isDate(val)) {\r\n val = null;\r\n }\r\n if (this.#date !== val) {\r\n this.#date = val;\r\n const date = Date.isDate(this.#date) ? moment(Date.toFormat(this.#date, 'MM/dd/yyyy HH:mm:ss'), 'MM/DD/YYYY HH:mm:ss') : null;\r\n this.formControl.setValue(date);\r\n }\r\n }\r\n @Output() modelChange = new EventEmitter();\r\n #subscription = new Subscription();\r\n @ContentChild(SdViewDefDirective) sdView: SdViewDefDirective;\r\n @ViewChild('input') input: ElementRef;\r\n @ViewChild(MatDatepicker) datePicker: MatDatepicker<Moment>;\r\n @ViewChild(NgxMatDatetimePicker) dateTimePicker: NgxMatDatetimePicker<Moment>;\r\n isFocused = false;\r\n constructor(\r\n private ref: ChangeDetectorRef,\r\n deviceService: DeviceDetectorService,\r\n @Inject(FORM_CONFIG) @Optional() private formConfig: IFormConfiguration) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.#form?.removeControl(this.#name);\r\n this.#subscription.unsubscribe();\r\n }\r\n\r\n ngOnInit() {\r\n this.appearance = this.appearance || this.formConfig?.appearance;\r\n this.#subscription.add(this.formControl.sdChanges.subscribe(() => {\r\n // this.formControl.updateValueAndValidity();\r\n this.ref.markForCheck();\r\n }));\r\n this.#form?.addControl(this.#name, this.formControl);\r\n }\r\n\r\n ngAfterViewInit() {\r\n }\r\n\r\n onFocus = () => {\r\n this.isFocused = true;\r\n }\r\n\r\n onBlur = () => {\r\n this.isFocused = false;\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.input?.nativeElement?.blur();\r\n }\r\n\r\n focus = () => {\r\n this.isFocused = true;\r\n setTimeout(() => {\r\n this.input?.nativeElement?.focus();\r\n if (this.type === 'date') {\r\n this.datePicker?.open();\r\n } else {\r\n this.dateTimePicker?.open();\r\n }\r\n //\r\n }, 100);\r\n }\r\n\r\n focusInputElement() {\r\n this.input?.nativeElement?.focus();\r\n }\r\n\r\n onChange = (event: MatDatepickerInputEvent<Moment>) => {\r\n const value = event.value?.toDate();\r\n /**\r\n * Focus input khi `ngx-mat-datetime-picker` đang mở sẽ trigger hàm cancel() làm cho giá trị _selected không được update mới nhất\r\n * Case riêng trường hợp type = `datetime` thì xử lý focus element sau khi `ngx-mat-datetime-picker` emit event (closed)\r\n * @see https://github.com/h2qutc/ngx-mat-datetime-picker/blob/HEAD/projects/datetime-picker/src/lib/datetime-input.ts#L343\r\n */\r\n if (!this.dateTimePicker) {\r\n this.input?.nativeElement?.focus();\r\n }\r\n if (value) {\r\n if (new Date(this.#date) !== value) {\r\n this.modelChange.emit(value);\r\n this.sdChange.emit(value);\r\n }\r\n } else {\r\n if (!this.formControl?.value) {\r\n this.modelChange.emit(null);\r\n this.sdChange.emit(null);\r\n }\r\n }\r\n }\r\n\r\n clear = ($event: any) => {\r\n $event?.stopPropagation();\r\n if (this.formControl.value) {\r\n this.formControl.setValue(null);\r\n this.modelChange.emit(null);\r\n this.sdChange.emit(null);\r\n }\r\n }\r\n\r\n setMonthAndYear = (normalizedMonthAndYear: Moment, datepicker: MatDatepicker<Moment>) => {\r\n const ctrlValue = this.formControl.value || moment();\r\n ctrlValue.month(normalizedMonthAndYear.month());\r\n ctrlValue.year(normalizedMonthAndYear.year());\r\n this.formControl.setValue(ctrlValue);\r\n datepicker.close();\r\n this.modelChange.emit(ctrlValue);\r\n this.sdChange.emit(ctrlValue);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatDatepickerModule } from '@angular/material/datepicker';\r\nimport {\r\n NgxMatDatetimePickerModule,\r\n NgxMatTimepickerModule\r\n} from '@angular-material-components/datetime-picker';\r\nimport { SdDateTime } from './date-time.component';\r\nimport { SdTranslateModule } from '@sd-angular/core/translate';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { NgxMatMomentModule } from '@angular-material-components/moment-adapter';\r\nimport { MatMomentDateModule } from '@angular/material-moment-adapter';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { SdCommonModule } from '@sd-angular/core/common';\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatFormFieldModule,\r\n MatDatepickerModule,\r\n MatMomentDateModule,\r\n NgxMatDatetimePickerModule,\r\n NgxMatTimepickerModule,\r\n NgxMatMomentModule,\r\n SdTranslateModule,\r\n SdCommonModule\r\n ],\r\n declarations: [\r\n SdDateTime\r\n ],\r\n exports: [\r\n SdCommonModule,\r\n SdDateTime\r\n ],\r\n providers: [\r\n ]\r\n})\r\nexport class SdDateTimeModule {\r\n\r\n}\r\n","/**\n *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C1B,sBAAsB;oBACtB,kBAAkB;oBAClB,iBAAiB;oBACjB,cAAc;iBACf;gBACD,YAAY,EAAE;oBACZ,UAAU;iBACX;gBACD,OAAO,EAAE;oBACP,cAAc;oBACd,UAAU;iBACX;gBACD,SAAS,EAAE,EACV;aACF;;;ACzCD;;;;;;"}
@@ -1983,7 +1983,7 @@ _setting = new WeakMap(), _initDefault = new WeakMap();
1983
1983
  SdGridConfig.decorators = [
1984
1984
  { type: Component, args: [{
1985
1985
  selector: 'sd-grid-config',
1986
- template: "<sd-modal [title]=\"'Configuration' | sdTranslate\" #modal>\r\n <sd-modal-body *ngIf=\"storage\">\r\n <div class=\"row\">\r\n <div class=\"col-md-3 col-6\">\r\n <sd-input-number [label]=\"'Page size' | sdTranslate\" [(model)]=\"storage.pageSize\" step=\"1\">\r\n </sd-input-number>\r\n </div>\r\n </div>\r\n <div class=\"sd-box sd-box-primary\">\r\n <div class=\"sd-box-body p-0\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table table-striped table-sm table-hover table-bordered c-table\">\r\n <thead class=\"thead-light\">\r\n <tr>\r\n <th class=\"text-center\" style=\"width: 50px\">#</th>\r\n <th *sdDesktop class=\"text-center\" style=\"width: 80px\"></th>\r\n <!-- <th class=\"text-uppercase\" style=\"width: 120px\">Field </th> -->\r\n <th class=\"text-uppercase\">{{'Title' | sdTranslate}}</th>\r\n <th *sdDesktop class=\"text-uppercase\" style=\"width: 80px\">{{'Width' | sdTranslate}}</th>\r\n <th class=\"text-uppercase\" style=\"width: 80px\">{{'Hidden' | sdTranslate}}</th>\r\n <th *sdDesktop class=\"text-uppercase\" style=\"width: 80px\">{{'Freeze' | sdTranslate}}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let column of storage.columnConfigs; let idx = index\">\r\n <td class=\"align-middle text-center\">\r\n {{idx+1}}\r\n </td>\r\n <td *sdDesktop class=\"align-middle text-center\">\r\n <button type=\"button\" [disabled]=\"idx==0\" type=\"button\" class=\"c-btn-icon\" placement=\"top\"\r\n matTooltip=\"Up\" (click)=\"moveColumnUp(idx)\">\r\n <i class=\"fa fa-arrow-up text-primary\" aria-hidden=\"true\"></i>\r\n </button>\r\n <button type=\"button\" [disabled]=\"idx==storage.columnConfigs.length-1\" type=\"button\"\r\n class=\"c-btn-icon\" placement=\"top\" matTooltip=\"Down\" (click)=\"moveColumnDown(idx)\">\r\n <i class=\"fa fa-arrow-down text-primary\" aria-hidden=\"true\"></i>\r\n </button>\r\n </td>\r\n <!-- <td class=\"align-middle\">{{column.originColumn.field}}</td> -->\r\n <td class=\"align-middle\">\r\n <input type=\"text\" placeholder=\"{{column.originColumn.title}}\" [(ngModel)]=\"column.title\"\r\n class=\"form-control form-control-sm\">\r\n </td>\r\n <td *sdDesktop class=\"align-middle\">\r\n <input type=\"text\" placeholder=\"{{column.originColumn.width}}\" [(ngModel)]=\"column.width\"\r\n class=\"form-control form-control-sm\">\r\n </td>\r\n <td class=\"align-middle text-center\">\r\n <mat-slide-toggle [(ngModel)]=\"column.hidden\" color=\"primary\"></mat-slide-toggle>\r\n </td>\r\n <td *sdDesktop class=\"align-middle text-center\">\r\n <mat-slide-toggle [(ngModel)]=\"column.fixed\" color=\"primary\"></mat-slide-toggle>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n </sd-modal-body>\r\n <sd-modal-footer *sdDesktop>\r\n <sd-button class=\"mr-auto\" (action)=\"reset()\" icon=\"refresh\" [title]=\"'Reset' | sdTranslate\" size=\"sm\"></sd-button>\r\n <sd-button (action)=\"save()\" icon=\"save\" [title]=\"'Save' | sdTranslate\" color=\"primary\" size=\"sm\"></sd-button>\r\n </sd-modal-footer>\r\n <sd-modal-footer *sdMobileTablet>\r\n <sd-button style=\"flex: 1; padding-right: 5px;\" (action)=\"reset()\" icon=\"refresh\" [title]=\"'Reset' | sdTranslate\"\r\n width=\"100%\" size=\"sm\"></sd-button>\r\n <sd-button style=\"flex: 1; padding-left: 5px;\" (action)=\"save()\" icon=\"save\" [title]=\"'Save' | sdTranslate\"\r\n color=\"primary\" width=\"100%\" size=\"sm\"></sd-button>\r\n </sd-modal-footer>\r\n</sd-modal>",
1986
+ template: "<sd-modal [title]=\"'Configuration' | sdTranslate\" #modal>\r\n <sd-modal-body *ngIf=\"storage\">\r\n <div class=\"row\">\r\n <div class=\"col-md-3 col-6\">\r\n <sd-input-currency [label]=\"'Page size' | sdTranslate\" [(model)]=\"storage.pageSize\" step=\"1\">\r\n </sd-input-currency>\r\n </div>\r\n </div>\r\n <div class=\"sd-box sd-box-primary\">\r\n <div class=\"sd-box-body p-0\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table table-striped table-sm table-hover table-bordered c-table\">\r\n <thead class=\"thead-light\">\r\n <tr>\r\n <th class=\"text-center\" style=\"width: 50px\">#</th>\r\n <th *sdDesktop class=\"text-center\" style=\"width: 80px\"></th>\r\n <!-- <th class=\"text-uppercase\" style=\"width: 120px\">Field </th> -->\r\n <th class=\"text-uppercase\">{{'Title' | sdTranslate}}</th>\r\n <th *sdDesktop class=\"text-uppercase\" style=\"width: 80px\">{{'Width' | sdTranslate}}</th>\r\n <th class=\"text-uppercase\" style=\"width: 80px\">{{'Hidden' | sdTranslate}}</th>\r\n <th *sdDesktop class=\"text-uppercase\" style=\"width: 80px\">{{'Freeze' | sdTranslate}}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let column of storage.columnConfigs; let idx = index\">\r\n <td class=\"align-middle text-center\">\r\n {{idx+1}}\r\n </td>\r\n <td *sdDesktop class=\"align-middle text-center\">\r\n <button type=\"button\" [disabled]=\"idx==0\" type=\"button\" class=\"c-btn-icon\" placement=\"top\"\r\n matTooltip=\"Up\" (click)=\"moveColumnUp(idx)\">\r\n <i class=\"fa fa-arrow-up text-primary\" aria-hidden=\"true\"></i>\r\n </button>\r\n <button type=\"button\" [disabled]=\"idx==storage.columnConfigs.length-1\" type=\"button\"\r\n class=\"c-btn-icon\" placement=\"top\" matTooltip=\"Down\" (click)=\"moveColumnDown(idx)\">\r\n <i class=\"fa fa-arrow-down text-primary\" aria-hidden=\"true\"></i>\r\n </button>\r\n </td>\r\n <!-- <td class=\"align-middle\">{{column.originColumn.field}}</td> -->\r\n <td class=\"align-middle\">\r\n <input type=\"text\" placeholder=\"{{column.originColumn.title}}\" [(ngModel)]=\"column.title\"\r\n class=\"form-control form-control-sm\">\r\n </td>\r\n <td *sdDesktop class=\"align-middle\">\r\n <input type=\"text\" placeholder=\"{{column.originColumn.width}}\" [(ngModel)]=\"column.width\"\r\n class=\"form-control form-control-sm\">\r\n </td>\r\n <td class=\"align-middle text-center\">\r\n <mat-slide-toggle [(ngModel)]=\"column.hidden\" color=\"primary\"></mat-slide-toggle>\r\n </td>\r\n <td *sdDesktop class=\"align-middle text-center\">\r\n <mat-slide-toggle [(ngModel)]=\"column.fixed\" color=\"primary\"></mat-slide-toggle>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n </sd-modal-body>\r\n <sd-modal-footer *sdDesktop>\r\n <sd-button class=\"mr-auto\" (action)=\"reset()\" icon=\"refresh\" [title]=\"'Reset' | sdTranslate\" size=\"sm\"></sd-button>\r\n <sd-button (action)=\"save()\" icon=\"save\" [title]=\"'Save' | sdTranslate\" color=\"primary\" size=\"sm\"></sd-button>\r\n </sd-modal-footer>\r\n <sd-modal-footer *sdMobileTablet>\r\n <sd-button style=\"flex: 1; padding-right: 5px;\" (action)=\"reset()\" icon=\"refresh\" [title]=\"'Reset' | sdTranslate\"\r\n width=\"100%\" size=\"sm\"></sd-button>\r\n <sd-button style=\"flex: 1; padding-left: 5px;\" (action)=\"save()\" icon=\"save\" [title]=\"'Save' | sdTranslate\"\r\n color=\"primary\" width=\"100%\" size=\"sm\"></sd-button>\r\n </sd-modal-footer>\r\n</sd-modal>",
1987
1987
  styles: [".c-btn-icon{background:none!important;border:none;opacity:.8}.c-btn-icon:hover{cursor:pointer;opacity:1}.c-btn-icon:disabled{background:none!important;border:none;cursor:not-allowed;opacity:.3}.table td,.table th{padding:.2rem!important}.c-table.table{margin-bottom:5px}"]
1988
1988
  },] }
1989
1989
  ];
@@ -2047,7 +2047,7 @@ class SdGridDesktopColumnEdit {
2047
2047
  SdGridDesktopColumnEdit.decorators = [
2048
2048
  { type: Component, args: [{
2049
2049
  selector: 'sd-grid-desktop-column-edit',
2050
- template: "<ng-container *ngIf=\"column && item\">\r\n <div *ngIf=\"column.type === 'string'\">\r\n <div *ngIf=\"column.editor?.item;else elseUseInput\">\r\n <sd-select *ngIf=\"!column.editor?.autocomplete\" size=\"sm\" [(model)]=\"item[column.field]\"\r\n [items]=\"item[column.editor?.item?.dependOnField] | sdDynamicItems:dynamicItems\"\r\n [valueField]=\"column.editor.item.value\" [displayField]=\"column.editor.item.display\"\r\n (sdSelection)=\"onSelectionChange($event)\" [placeholder]=\"column.title\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"column.editor?.autocomplete\" size=\"sm\" [(model)]=\"item[column.field]\"\r\n [items]=\"item[column.editor?.item?.dependOnField] | sdDynamicItems:dynamicItems\"\r\n [valueField]=\"column.editor.item.value\" [displayField]=\"column.editor.item.display\"\r\n (sdChange)=\"onAutocompleteChange($event)\" [placeholder]=\"column.title\">\r\n </sd-autocomplete>\r\n </div>\r\n <ng-template #elseUseInput>\r\n <sd-input size=\"sm\" *ngIf=\"column.editor?.click\" [(model)]=\"item[column.field]\"\r\n (keyupEnter)=\"column.editor?.keyupEnter && column.editor?.keyupEnter(item)\"\r\n (sdChange)=\"onEditorChange(column,item,item[column.field])\" (sdClick)=\"column.editor.click(item)\"></sd-input>\r\n <sd-input size=\"sm\" *ngIf=\"!column.editor?.click\" [(model)]=\"item[column.field]\"\r\n (keyupEnter)=\"column.editor?.keyupEnter && column.editor?.keyupEnter(item)\"\r\n (sdChange)=\"onEditorChange(column,item,item[column.field])\"></sd-input>\r\n </ng-template>\r\n </div>\r\n <div *ngIf=\"column.type === 'color'\">\r\n <sd-input size=\"sm\" type=\"color\" [(model)]=\"item[column.field]\"\r\n (sdChange)=\"onEditorChange(column,item,item[column.field])\">\r\n </sd-input>\r\n </div>\r\n <div *ngIf=\"column.type === 'number'\">\r\n <sd-input-number size=\"sm\" [(model)]=\"item[column.field]\"\r\n (keyupEnter)=\"column.editor?.keyupEnter && column.editor?.keyupEnter(item)\"\r\n (sdChange)=\"onEditorChange(column,item,item[column.field])\"></sd-input-number>\r\n </div>\r\n <div *ngIf=\"column.type === 'date'\">\r\n <sd-date-time size=\"sm\" [(model)]=\"item[column.field]\" type=\"date\"></sd-date-time>\r\n </div>\r\n <div class=\"text-center\" *ngIf=\"column.type === 'datetime'\">\r\n <sd-date-time size=\"sm\" [(model)]=\"item[column.field]\" type=\"datetime\"></sd-date-time>\r\n </div>\r\n <div class=\"text-center\" *ngIf=\"column.type === 'time'\">\r\n <sd-time [(model)]=\"item[column.field]\"></sd-time>\r\n <!-- <sd-grid-date-picker-control [(model)]=\"item[column.field]\" type=\"time\"></sd-grid-date-picker-control> -->\r\n </div>\r\n <div class=\"align-middle text-center\" *ngIf=\"column.type === 'bool'\">\r\n <sd-switch [(model)]=\"item[column.field]\" (sdChange)=\"onEditorChange(column,item,item[column.field])\">\r\n </sd-switch>\r\n </div>\r\n <div *ngIf=\"column.type === 'values'\">\r\n <div *ngIf=\"column.editor?.item;else elseUseValues\">\r\n <sd-select *ngIf=\"!column.editor?.autocomplete\" size=\"sm\" [(model)]=\"item[column.field]\"\r\n [items]=\"item[column.editor?.item?.dependOnField] | sdDynamicItems:dynamicItems\"\r\n [valueField]=\"column.editor.item.value\" [displayField]=\"column.editor.item.display\"\r\n (sdSelection)=\"onSelectionChange($event)\" [placeholder]=\"column.title\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"column.editor?.autocomplete\" size=\"sm\" [(model)]=\"item[column.field]\"\r\n [items]=\"item[column.editor?.item?.dependOnField] | sdDynamicItems:dynamicItems\"\r\n [valueField]=\"column.editor.item.value\" [displayField]=\"column.editor.item.display\"\r\n (sdChange)=\"onAutocompleteChange($event)\" [placeholder]=\"column.title\">\r\n </sd-autocomplete>\r\n </div>\r\n <ng-template #elseUseValues>\r\n <sd-select *ngIf=\"!column.editor?.autocomplete\" size=\"sm\" [(model)]=\"item[column.field]\" [items]=\"column.values\" valueField=\"value\" displayField=\"text\"\r\n (sdSelection)=\"onSelectionChange($event)\" [placeholder]=\"column.title\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"column.editor?.autocomplete\" size=\"sm\" [(model)]=\"item[column.field]\" [items]=\"column.values\" valueField=\"value\" displayField=\"text\"\r\n (sdChange)=\"onAutocompleteChange($event)\" [placeholder]=\"column.title\">\r\n </sd-autocomplete>\r\n </ng-template>\r\n </div>\r\n <div *ngIf=\"column.type === 'radio'\">\r\n <section class=\"mt-5 ml-5\">\r\n <mat-radio-group class=\"d-flex\" [(ngModel)]=\"item[column.field]\"\r\n (change)=\"column.editor?.change && column.editor?.change(item)\">\r\n <mat-radio-button *ngIf=\"!column.editor?.required\" color=\"warn\" class=\"mr-5\" value=\"\">\r\n {{'Please select' | sdTranslate}}\r\n </mat-radio-button>\r\n <mat-radio-button color=\"primary\" class=\"mr-5\" *ngFor=\"let data of column.values\"\r\n [value]=\"data[column.valueField]\">\r\n {{data[column.displayField]}}\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </section>\r\n </div>\r\n <div class=\"align-middle text-center\" *ngIf=\"column.type === 'image'\">\r\n <img [src]=\"item[column.field]\" [width]=\"column.display?.width\" [height]=\"column.display?.height\"\r\n style=\"margin: 5px 0\" (click)=\"column.click && column.click(item[column.field], item)\">\r\n </div>\r\n</ng-container>",
2050
+ template: "<ng-container *ngIf=\"column && item\">\r\n <div *ngIf=\"column.type === 'string'\">\r\n <div *ngIf=\"column.editor?.item;else elseUseInput\">\r\n <sd-select *ngIf=\"!column.editor?.autocomplete\" size=\"sm\" [(model)]=\"item[column.field]\"\r\n [items]=\"item[column.editor?.item?.dependOnField] | sdDynamicItems:dynamicItems\"\r\n [valueField]=\"column.editor.item.value\" [displayField]=\"column.editor.item.display\"\r\n (sdSelection)=\"onSelectionChange($event)\" [placeholder]=\"column.title\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"column.editor?.autocomplete\" size=\"sm\" [(model)]=\"item[column.field]\"\r\n [items]=\"item[column.editor?.item?.dependOnField] | sdDynamicItems:dynamicItems\"\r\n [valueField]=\"column.editor.item.value\" [displayField]=\"column.editor.item.display\"\r\n (sdChange)=\"onAutocompleteChange($event)\" [placeholder]=\"column.title\">\r\n </sd-autocomplete>\r\n </div>\r\n <ng-template #elseUseInput>\r\n <sd-input size=\"sm\" *ngIf=\"column.editor?.click\" [(model)]=\"item[column.field]\"\r\n (keyupEnter)=\"column.editor?.keyupEnter && column.editor?.keyupEnter(item)\"\r\n (sdChange)=\"onEditorChange(column,item,item[column.field])\" (sdClick)=\"column.editor.click(item)\"></sd-input>\r\n <sd-input size=\"sm\" *ngIf=\"!column.editor?.click\" [(model)]=\"item[column.field]\"\r\n (keyupEnter)=\"column.editor?.keyupEnter && column.editor?.keyupEnter(item)\"\r\n (sdChange)=\"onEditorChange(column,item,item[column.field])\"></sd-input>\r\n </ng-template>\r\n </div>\r\n <div *ngIf=\"column.type === 'color'\">\r\n <sd-input size=\"sm\" type=\"color\" [(model)]=\"item[column.field]\"\r\n (sdChange)=\"onEditorChange(column,item,item[column.field])\">\r\n </sd-input>\r\n </div>\r\n <div *ngIf=\"column.type === 'number'\">\r\n <sd-input-currency size=\"sm\" [(model)]=\"item[column.field]\"\r\n (keyupEnter)=\"column.editor?.keyupEnter && column.editor?.keyupEnter(item)\"\r\n (sdChange)=\"onEditorChange(column,item,item[column.field])\"></sd-input-currency>\r\n </div>\r\n <div *ngIf=\"column.type === 'date'\">\r\n <sd-date-time size=\"sm\" [(model)]=\"item[column.field]\" type=\"date\"></sd-date-time>\r\n </div>\r\n <div class=\"text-center\" *ngIf=\"column.type === 'datetime'\">\r\n <sd-date-time size=\"sm\" [(model)]=\"item[column.field]\" type=\"datetime\"></sd-date-time>\r\n </div>\r\n <div class=\"text-center\" *ngIf=\"column.type === 'time'\">\r\n <sd-time [(model)]=\"item[column.field]\"></sd-time>\r\n <!-- <sd-grid-date-picker-control [(model)]=\"item[column.field]\" type=\"time\"></sd-grid-date-picker-control> -->\r\n </div>\r\n <div class=\"align-middle text-center\" *ngIf=\"column.type === 'bool'\">\r\n <sd-switch [(model)]=\"item[column.field]\" (sdChange)=\"onEditorChange(column,item,item[column.field])\">\r\n </sd-switch>\r\n </div>\r\n <div *ngIf=\"column.type === 'values'\">\r\n <div *ngIf=\"column.editor?.item;else elseUseValues\">\r\n <sd-select *ngIf=\"!column.editor?.autocomplete\" size=\"sm\" [(model)]=\"item[column.field]\"\r\n [items]=\"item[column.editor?.item?.dependOnField] | sdDynamicItems:dynamicItems\"\r\n [valueField]=\"column.editor.item.value\" [displayField]=\"column.editor.item.display\"\r\n (sdSelection)=\"onSelectionChange($event)\" [placeholder]=\"column.title\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"column.editor?.autocomplete\" size=\"sm\" [(model)]=\"item[column.field]\"\r\n [items]=\"item[column.editor?.item?.dependOnField] | sdDynamicItems:dynamicItems\"\r\n [valueField]=\"column.editor.item.value\" [displayField]=\"column.editor.item.display\"\r\n (sdChange)=\"onAutocompleteChange($event)\" [placeholder]=\"column.title\">\r\n </sd-autocomplete>\r\n </div>\r\n <ng-template #elseUseValues>\r\n <sd-select *ngIf=\"!column.editor?.autocomplete\" size=\"sm\" [(model)]=\"item[column.field]\" [items]=\"column.values\" valueField=\"value\" displayField=\"text\"\r\n (sdSelection)=\"onSelectionChange($event)\" [placeholder]=\"column.title\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"column.editor?.autocomplete\" size=\"sm\" [(model)]=\"item[column.field]\" [items]=\"column.values\" valueField=\"value\" displayField=\"text\"\r\n (sdChange)=\"onAutocompleteChange($event)\" [placeholder]=\"column.title\">\r\n </sd-autocomplete>\r\n </ng-template>\r\n </div>\r\n <div *ngIf=\"column.type === 'radio'\">\r\n <section class=\"mt-5 ml-5\">\r\n <mat-radio-group class=\"d-flex\" [(ngModel)]=\"item[column.field]\"\r\n (change)=\"column.editor?.change && column.editor?.change(item)\">\r\n <mat-radio-button *ngIf=\"!column.editor?.required\" color=\"warn\" class=\"mr-5\" value=\"\">\r\n {{'Please select' | sdTranslate}}\r\n </mat-radio-button>\r\n <mat-radio-button color=\"primary\" class=\"mr-5\" *ngFor=\"let data of column.values\"\r\n [value]=\"data[column.valueField]\">\r\n {{data[column.displayField]}}\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </section>\r\n </div>\r\n <div class=\"align-middle text-center\" *ngIf=\"column.type === 'image'\">\r\n <img [src]=\"item[column.field]\" [width]=\"column.display?.width\" [height]=\"column.display?.height\"\r\n style=\"margin: 5px 0\" (click)=\"column.click && column.click(item[column.field], item)\">\r\n </div>\r\n</ng-container>",
2051
2051
  changeDetection: ChangeDetectionStrategy.OnPush,
2052
2052
  styles: [".c-input-xs{font-size:13px!important;height:28px!important;line-height:1.5!important;padding:3px!important}"]
2053
2053
  },] }
@@ -2094,7 +2094,7 @@ class SdGridDesktopInlineFilter {
2094
2094
  SdGridDesktopInlineFilter.decorators = [
2095
2095
  { type: Component, args: [{
2096
2096
  selector: 'sd-grid-desktop-inline-filter',
2097
- template: "<ng-container *ngIf=\"filterOption?.multiple !== false\">\r\n <ng-container *ngIf=\"columns?.length && filterOption?.columnInline === 'outside'\">\r\n <ng-container *ngFor=\"let item of columns\">\r\n <ng-container\r\n *ngIf=\"item.type !== 'children' && item.type !== 'image' && !item?.filter?.disabled && item.priority !== 'low'\">\r\n <ng-container *ngIf=\"inlineColumn[item.field] || inlineColumn[item.field] === undefined\">\r\n <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'string'\" type=\"text\" [(model)]=\"filter[item.field]\"\r\n (keyupEnter)=\"onUpdateFilter()\">\r\n </sd-input>\r\n <sd-input-number [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"filter[item.field]\"\r\n (keyupEnter)=\"onUpdateFilter()\">\r\n </sd-input-number>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'bool'\" [items]=\"[{value:'1',display:item.trueValue || 'True' },\r\n {value:'0',display:item.falseValue || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n [(model)]=\"filter[item.field]\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'radio'\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"filter[item.field]\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n <sd-select *ngIf=\"item.type === 'values' && !item?.editor?.autocomplete\" [label]=\"item.title\"\r\n [items]=\"item.values\" valueField=\"value\" displayField=\"text\" [(model)]=\"filter[item.field]\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"item.type === 'values' && item?.editor?.autocomplete\" [items]=\"item.values\"\r\n valueField=\"value\" displayField=\"text\" [(model)]=\"filter[item.field]\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-autocomplete>\r\n <sd-date-time *ngIf=\"item.type === 'date' || item.type === 'datetime' || item.type === 'time'\"\r\n [label]=\"item.title\" [(model)]=\"filter[item.field]\" type=\"date\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-date-time>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container\r\n *ngIf=\"item.type === 'children' && item.children?.length && !item?.filter?.disabled && item.priority !== 'low'\">\r\n <ng-container *ngFor=\"let childColumn of item.children\">\r\n <ng-container\r\n *ngIf=\"inlineColumn[childColumn.field] && !childColumn?.filter?.disabled && childColumn.priority !== 'low' && childColumn.type !== 'image'\">\r\n <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n <sd-input [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'string'\" type=\"text\"\r\n [(model)]=\"filter[childColumn.field]\" (keyupEnter)=\"onUpdateFilter()\">\r\n </sd-input>\r\n <sd-input-number [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'number'\"\r\n [(model)]=\"filter[childColumn.field]\" (keyupEnter)=\"onUpdateFilter()\">\r\n </sd-input-number>\r\n <sd-select [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'bool'\" [items]=\"[{value:'1',display:childColumn.trueValue || 'True' },\r\n {value:'0',display:childColumn.falseValue || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n [(model)]=\"filter[childColumn.field]\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n <sd-select [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'radio'\" [items]=\"childColumn.values\"\r\n [valueField]=\"childColumn.valueField\" [displayField]=\"childColumn.displayField\"\r\n [(model)]=\"filter[childColumn.field]\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n <sd-select *ngIf=\"childColumn.type === 'values' && !item?.editor?.autocomplete\"\r\n [label]=\"childColumn.title\" [items]=\"childColumn.values\" valueField=\"value\" displayField=\"text\"\r\n [(model)]=\"filter[childColumn.field]\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"childColumn.type === 'values' && item?.editor?.autocomplete\"\r\n [items]=\"childColumn.values\" valueField=\"value\" displayField=\"text\"\r\n [(model)]=\"filter[childColumn.field]\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-autocomplete>\r\n <sd-date-time\r\n *ngIf=\"childColumn.type === 'date' || childColumn.type === 'datetime' || childColumn.type === 'time'\"\r\n [label]=\"childColumn.title\" [(model)]=\"filter[childColumn.field]\" type=\"date\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-date-time>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"filterOption?.externalFilters?.length\">\r\n <ng-container *ngFor=\"let item of filterOption.externalFilters\">\r\n <ng-container\r\n *ngIf=\"(inlineExternal[item.field] || inlineExternal[item.field] === undefined) && item.priority !== 'low'\">\r\n <div *ngIf=\"item.type !=='daterange' && item.type !=='numberrange';else elseFilterRange\"\r\n class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'string'\" type=\"text\"\r\n [(model)]=\"externalFilter[item.field]\" (keyupEnter)=\"onUpdateFilter()\">\r\n </sd-input>\r\n <sd-input-number [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"externalFilter[item.field]\"\r\n (keyupEnter)=\"onUpdateFilter()\">\r\n </sd-input-number>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'bool'\" [items]=\"[{value:'1',display:item.trueValue || 'True' },\r\n {value:'0',display:item.falseValue || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'radio'\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'custom'\"\r\n [(model)]=\"externalFilter[displayKey + item.field]\"\r\n (sdFocusForceBlur)=\"item?.onClick(externalFilter, item.field, displayKey + item.field)\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-input>\r\n <ng-container *ngIf=\"item.type === 'values'\">\r\n <sd-select *ngIf=\"item.selection === 'MULTIPLE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\"\r\n (sdChange)=\"onUpdateFilter()\" multiple=\"true\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"item.selection === 'AUTOCOMPLETE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-autocomplete>\r\n <sd-select *ngIf=\"item.selection === 'MULTIPLEAUTOCOMPLETE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\"\r\n (sdChange)=\"onUpdateFilter()\" filtered=\"true\" multiple=\"true\">\r\n </sd-select>\r\n <sd-select *ngIf=\"!item.selection\" [label]=\"item.title\" [items]=\"item.values\" [valueField]=\"item.valueField\"\r\n [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n </ng-container>\r\n <sd-date-time [label]=\"item.title\" *ngIf=\"item.type ==='date'\" [(model)]=\"externalFilter[item.field]\"\r\n type=\"date\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-date-time>\r\n <sd-date-range [label]=\"item.title\" *ngIf=\"item.type ==='daterangefull'\"\r\n [(from)]=\"externalFilter[item.field].from\" [(to)]=\"externalFilter[item.field].to\" [min]=\"item.minDate\"\r\n [max]=\"item.maxDate\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-date-range>\r\n </div>\r\n <ng-template #elseFilterRange>\r\n <ng-container *ngIf=\"item.type ==='daterange' && externalFilter[item.field]\">\r\n <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n <sd-date-time [label]=\"item.fromTitle\" [(model)]=\"externalFilter[item.field].from\"\r\n [type]=\"item.enableTime ? 'datetime' : 'date'\" [minDate]=\"item.minDate\"\r\n [maxDate]=\"externalFilter[item.field].to || item.maxDate\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-date-time>\r\n </div>\r\n <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n <sd-date-time [label]=\"item.toTitle\" [(model)]=\"externalFilter[item.field].to\"\r\n [type]=\"item.enableTime ? 'datetime' : 'date'\"\r\n [minDate]=\"item.minDate || externalFilter[item.field].from\" [maxDate]=\"item.maxDate\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-date-time>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"item.type ==='numberrange' && externalFilter[item.field]\">\r\n <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n <sd-input [label]=\"item.fromTitle\" type=\" number\" [(model)]=\"externalFilter[item.field].from\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-input>\r\n </div>\r\n <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n <sd-input [label]=\"item.toTitle\" type=\" number\" [(model)]=\"externalFilter[item.field].to\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-input>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-container>",
2097
+ template: "<ng-container *ngIf=\"filterOption?.multiple !== false\">\r\n <ng-container *ngIf=\"columns?.length && filterOption?.columnInline === 'outside'\">\r\n <ng-container *ngFor=\"let item of columns\">\r\n <ng-container\r\n *ngIf=\"item.type !== 'children' && item.type !== 'image' && !item?.filter?.disabled && item.priority !== 'low'\">\r\n <ng-container *ngIf=\"inlineColumn[item.field] || inlineColumn[item.field] === undefined\">\r\n <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'string'\" type=\"text\" [(model)]=\"filter[item.field]\"\r\n (keyupEnter)=\"onUpdateFilter()\">\r\n </sd-input>\r\n <sd-input-currency [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"filter[item.field]\"\r\n (keyupEnter)=\"onUpdateFilter()\">\r\n </sd-input-currency>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'bool'\" [items]=\"[{value:'1',display:item.trueValue || 'True' },\r\n {value:'0',display:item.falseValue || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n [(model)]=\"filter[item.field]\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'radio'\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"filter[item.field]\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n <sd-select *ngIf=\"item.type === 'values' && !item?.editor?.autocomplete\" [label]=\"item.title\"\r\n [items]=\"item.values\" valueField=\"value\" displayField=\"text\" [(model)]=\"filter[item.field]\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"item.type === 'values' && item?.editor?.autocomplete\" [items]=\"item.values\"\r\n valueField=\"value\" displayField=\"text\" [(model)]=\"filter[item.field]\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-autocomplete>\r\n <sd-date-time *ngIf=\"item.type === 'date' || item.type === 'datetime' || item.type === 'time'\"\r\n [label]=\"item.title\" [(model)]=\"filter[item.field]\" type=\"date\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-date-time>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container\r\n *ngIf=\"item.type === 'children' && item.children?.length && !item?.filter?.disabled && item.priority !== 'low'\">\r\n <ng-container *ngFor=\"let childColumn of item.children\">\r\n <ng-container\r\n *ngIf=\"inlineColumn[childColumn.field] && !childColumn?.filter?.disabled && childColumn.priority !== 'low' && childColumn.type !== 'image'\">\r\n <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n <sd-input [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'string'\" type=\"text\"\r\n [(model)]=\"filter[childColumn.field]\" (keyupEnter)=\"onUpdateFilter()\">\r\n </sd-input>\r\n <sd-input-currency [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'number'\"\r\n [(model)]=\"filter[childColumn.field]\" (keyupEnter)=\"onUpdateFilter()\">\r\n </sd-input-currency>\r\n <sd-select [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'bool'\" [items]=\"[{value:'1',display:childColumn.trueValue || 'True' },\r\n {value:'0',display:childColumn.falseValue || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n [(model)]=\"filter[childColumn.field]\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n <sd-select [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'radio'\" [items]=\"childColumn.values\"\r\n [valueField]=\"childColumn.valueField\" [displayField]=\"childColumn.displayField\"\r\n [(model)]=\"filter[childColumn.field]\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n <sd-select *ngIf=\"childColumn.type === 'values' && !item?.editor?.autocomplete\"\r\n [label]=\"childColumn.title\" [items]=\"childColumn.values\" valueField=\"value\" displayField=\"text\"\r\n [(model)]=\"filter[childColumn.field]\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"childColumn.type === 'values' && item?.editor?.autocomplete\"\r\n [items]=\"childColumn.values\" valueField=\"value\" displayField=\"text\"\r\n [(model)]=\"filter[childColumn.field]\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-autocomplete>\r\n <sd-date-time\r\n *ngIf=\"childColumn.type === 'date' || childColumn.type === 'datetime' || childColumn.type === 'time'\"\r\n [label]=\"childColumn.title\" [(model)]=\"filter[childColumn.field]\" type=\"date\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-date-time>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"filterOption?.externalFilters?.length\">\r\n <ng-container *ngFor=\"let item of filterOption.externalFilters\">\r\n <ng-container\r\n *ngIf=\"(inlineExternal[item.field] || inlineExternal[item.field] === undefined) && item.priority !== 'low'\">\r\n <div *ngIf=\"item.type !=='daterange' && item.type !=='numberrange';else elseFilterRange\"\r\n class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'string'\" type=\"text\"\r\n [(model)]=\"externalFilter[item.field]\" (keyupEnter)=\"onUpdateFilter()\">\r\n </sd-input>\r\n <sd-input-currency [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"externalFilter[item.field]\"\r\n (keyupEnter)=\"onUpdateFilter()\">\r\n </sd-input-currency>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'bool'\" [items]=\"[{value:'1',display:item.trueValue || 'True' },\r\n {value:'0',display:item.falseValue || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'radio'\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'custom'\"\r\n [(model)]=\"externalFilter[displayKey + item.field]\"\r\n (sdFocusForceBlur)=\"item?.onClick(externalFilter, item.field, displayKey + item.field)\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-input>\r\n <ng-container *ngIf=\"item.type === 'values'\">\r\n <sd-select *ngIf=\"item.selection === 'MULTIPLE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\"\r\n (sdChange)=\"onUpdateFilter()\" multiple=\"true\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"item.selection === 'AUTOCOMPLETE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-autocomplete>\r\n <sd-select *ngIf=\"item.selection === 'MULTIPLEAUTOCOMPLETE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\"\r\n (sdChange)=\"onUpdateFilter()\" filtered=\"true\" multiple=\"true\">\r\n </sd-select>\r\n <sd-select *ngIf=\"!item.selection\" [label]=\"item.title\" [items]=\"item.values\" [valueField]=\"item.valueField\"\r\n [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-select>\r\n </ng-container>\r\n <sd-date-time [label]=\"item.title\" *ngIf=\"item.type ==='date'\" [(model)]=\"externalFilter[item.field]\"\r\n type=\"date\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-date-time>\r\n <sd-date-range [label]=\"item.title\" *ngIf=\"item.type ==='daterangefull'\"\r\n [(from)]=\"externalFilter[item.field].from\" [(to)]=\"externalFilter[item.field].to\" [min]=\"item.minDate\"\r\n [max]=\"item.maxDate\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-date-range>\r\n </div>\r\n <ng-template #elseFilterRange>\r\n <ng-container *ngIf=\"item.type ==='daterange' && externalFilter[item.field]\">\r\n <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n <sd-date-time [label]=\"item.fromTitle\" [(model)]=\"externalFilter[item.field].from\"\r\n [type]=\"item.enableTime ? 'datetime' : 'date'\" [minDate]=\"item.minDate\"\r\n [maxDate]=\"externalFilter[item.field].to || item.maxDate\" (sdChange)=\"onUpdateFilter()\">\r\n </sd-date-time>\r\n </div>\r\n <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n <sd-date-time [label]=\"item.toTitle\" [(model)]=\"externalFilter[item.field].to\"\r\n [type]=\"item.enableTime ? 'datetime' : 'date'\"\r\n [minDate]=\"item.minDate || externalFilter[item.field].from\" [maxDate]=\"item.maxDate\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-date-time>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"item.type ==='numberrange' && externalFilter[item.field]\">\r\n <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n <sd-input [label]=\"item.fromTitle\" type=\" number\" [(model)]=\"externalFilter[item.field].from\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-input>\r\n </div>\r\n <div class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n <sd-input [label]=\"item.toTitle\" type=\" number\" [(model)]=\"externalFilter[item.field].to\"\r\n (sdChange)=\"onUpdateFilter()\">\r\n </sd-input>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-container>",
2098
2098
  styles: [""]
2099
2099
  },] }
2100
2100
  ];
@@ -2167,7 +2167,7 @@ class SdGridPopupEditor {
2167
2167
  SdGridPopupEditor.decorators = [
2168
2168
  { type: Component, args: [{
2169
2169
  selector: 'sd-grid-popup-editor',
2170
- template: "<sd-modal [title]=\"(isModified ? 'Edit' : 'Create')\" width=\"sm\" #modal>\r\n <sd-modal-body *ngIf=\"item && columns?.length\">\r\n <form #formEditor=\"ngForm\">\r\n <ng-container *ngFor=\"let column of columns\">\r\n <div *ngIf=\"column | editorPopupVisible:item\" class=\"row\">\r\n <div class=\"col-12\">\r\n <sd-input *ngIf=\"column.type === 'string'\" [(model)]=\"item[column.field]\"></sd-input>\r\n <sd-input-number *ngIf=\"column.type === 'number'\" [(model)]=\"item[column.field]\">\r\n </sd-input-number>\r\n <sd-select *ngIf=\"column.type === 'values'\" [(model)]=\"item[column.field]\" [items]=\"column.values\">\r\n </sd-select>\r\n <sd-switch *ngIf=\"column.type === 'boolean'\" [(model)]=\"item[column.field]\">\r\n </sd-switch>\r\n <sd-select *ngIf=\"column.type === 'radio'\" [(model)]=\"item[column.field]\" [items]=\"column.values\">\r\n </sd-select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </form>\r\n </sd-modal-body>\r\n <sd-modal-footer *sdDesktop>\r\n <sd-button class=\"mr-auto\" (action)=\"onCancel()\" icon=\"close\" [title]=\"'Cancel' | sdTranslate\" size=\"sm\">\r\n </sd-button>\r\n <sd-button (action)=\"onSave()\" icon=\"save\" [title]=\"'Save' | sdTranslate\" color=\"primary\" size=\"sm\"></sd-button>\r\n </sd-modal-footer>\r\n <sd-modal-footer *sdMobileTablet>\r\n <sd-button style=\"flex: 1; padding-right: 5px;\" (action)=\"onCancel()\" icon=\"close\" [title]=\"'Cancel' | sdTranslate\"\r\n width=\"100%\" size=\"sm\"></sd-button>\r\n <sd-button style=\"flex: 1; padding-left: 5px;\" (action)=\"onSave()\" icon=\"save\" [title]=\"'Save' | sdTranslate\"\r\n color=\"primary\" width=\"100%\" size=\"sm\"></sd-button>\r\n </sd-modal-footer>\r\n</sd-modal>"
2170
+ template: "<sd-modal [title]=\"(isModified ? 'Edit' : 'Create')\" width=\"sm\" #modal>\r\n <sd-modal-body *ngIf=\"item && columns?.length\">\r\n <form #formEditor=\"ngForm\">\r\n <ng-container *ngFor=\"let column of columns\">\r\n <div *ngIf=\"column | editorPopupVisible:item\" class=\"row\">\r\n <div class=\"col-12\">\r\n <sd-input *ngIf=\"column.type === 'string'\" [(model)]=\"item[column.field]\"></sd-input>\r\n <sd-input-currency *ngIf=\"column.type === 'number'\" [(model)]=\"item[column.field]\">\r\n </sd-input-currency>\r\n <sd-select *ngIf=\"column.type === 'values'\" [(model)]=\"item[column.field]\" [items]=\"column.values\">\r\n </sd-select>\r\n <sd-switch *ngIf=\"column.type === 'boolean'\" [(model)]=\"item[column.field]\">\r\n </sd-switch>\r\n <sd-select *ngIf=\"column.type === 'radio'\" [(model)]=\"item[column.field]\" [items]=\"column.values\">\r\n </sd-select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </form>\r\n </sd-modal-body>\r\n <sd-modal-footer *sdDesktop>\r\n <sd-button class=\"mr-auto\" (action)=\"onCancel()\" icon=\"close\" [title]=\"'Cancel' | sdTranslate\" size=\"sm\">\r\n </sd-button>\r\n <sd-button (action)=\"onSave()\" icon=\"save\" [title]=\"'Save' | sdTranslate\" color=\"primary\" size=\"sm\"></sd-button>\r\n </sd-modal-footer>\r\n <sd-modal-footer *sdMobileTablet>\r\n <sd-button style=\"flex: 1; padding-right: 5px;\" (action)=\"onCancel()\" icon=\"close\" [title]=\"'Cancel' | sdTranslate\"\r\n width=\"100%\" size=\"sm\"></sd-button>\r\n <sd-button style=\"flex: 1; padding-left: 5px;\" (action)=\"onSave()\" icon=\"save\" [title]=\"'Save' | sdTranslate\"\r\n color=\"primary\" width=\"100%\" size=\"sm\"></sd-button>\r\n </sd-modal-footer>\r\n</sd-modal>"
2171
2171
  },] }
2172
2172
  ];
2173
2173
  SdGridPopupEditor.ctorParameters = () => [];
@@ -2756,7 +2756,7 @@ _loadConfiguration = new WeakMap();
2756
2756
  SdGridPopupFilter.decorators = [
2757
2757
  { type: Component, args: [{
2758
2758
  selector: 'sd-grid-popup-filter',
2759
- template: "<sd-modal width=\"sm\" [title]=\"'Filter' | sdTranslate\" #modal>\r\n <sd-modal-body>\r\n <div\r\n *ngIf=\"key && filterOption?.multiple !== false && (!filterOption?.quickFilterVisibility || filterOption?.quickFilterVisibility === 'popup')\">\r\n <mat-form-field class=\"sd-md\" appearance=\"outline\">\r\n <mat-label>{{'Quick filters' | sdTranslate}}</mat-label>\r\n <mat-select [(ngModel)]=\"selectedCode\" (selectionChange)=\"onSelectionChange($event)\" #matSelect>\r\n <mat-option value=\"\">{{'Please select' | sdTranslate}}</mat-option>\r\n <mat-option *ngFor=\"let quickFilter of quickFilters\" [value]=\"quickFilter.code\">\r\n <div style=\"display:flex; justify-content: space-between\">\r\n <span>{{quickFilter.code}}</span>\r\n <div>\r\n <mat-icon class=\"mr-1 c-fa-icon\" (click)=\"onEditQuickFilter($event, quickFilter)\" fontSet=\"fa\"\r\n fontIcon=\"fa-pencil\"></mat-icon>\r\n <mat-icon class=\"mr-0 c-fa-icon\" (click)=\"onDeleteQuickFilter($event, quickFilter)\" fontSet=\"fa\"\r\n fontIcon=\"fa-trash-o\"></mat-icon>\r\n </div>\r\n </div>\r\n </mat-option>\r\n <mat-option [value]=\"newQuickFilter\">\r\n <div (click)=\"onCreateQuickFilter($event)\">\r\n <mat-icon class=\"mr-1\" fontSet=\"material-icons-outlined\">add</mat-icon>\r\n <span>{{'Create quick filter' | sdTranslate}}</span>\r\n </div>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <ng-container *ngIf=\"filterOption?.multiple === false\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-label>{{'Select field' | sdTranslate}}</mat-label>\r\n <mat-select [(ngModel)]=\"selectedField\">\r\n <mat-option value=\"\">{{'Please select' | sdTranslate}}</mat-option>\r\n <mat-option *ngFor=\"let item of externalFilters\" [value]=\"'external' + item.field\">\r\n {{item.title}}\r\n </mat-option>\r\n <ng-container *ngFor=\"let item of columns\">\r\n <mat-option *ngIf=\"item.type !== 'children'\" [value]=\"'column' + item.field\">\r\n {{item.title}}\r\n </mat-option>\r\n <ng-container *ngIf=\"item.type === 'children' && item.children?.length\">\r\n <ng-container *ngFor=\"let childColumn of item.children\">\r\n <mat-option [value]=\"'column' + childColumn.field\">\r\n {{childColumn.title}}\r\n </mat-option>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </mat-select>\r\n </mat-form-field>\r\n </ng-container>\r\n <ng-container *ngFor=\"let item of externalFilters\">\r\n <div *ngIf=\"filterOption?.multiple !== false || selectedField === 'external' + item.field\"\r\n class=\"d-flex align-items-baseline\">\r\n <ng-container *ngIf=\"filterOption?.multiple !== false\">\r\n <div *sdDesktop class=\"c-checkable\">\r\n <sd-switch [(model)]=\"inlineExternal[item.field]\" (sdChange)=\"onInlineChange()\">\r\n </sd-switch>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-filterable\">\r\n <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'string'\" type=\"text\"\r\n [(model)]=\"externalFilter[item.field]\">\r\n </sd-input>\r\n <sd-input-number [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"externalFilter[item.field]\">\r\n </sd-input-number>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'bool'\" [items]=\" [{value:'1',display:item.trueValue || 'True' },\r\n {value:'0',display:item.falseValue || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n [(model)]=\"externalFilter[item.field]\">\r\n </sd-select>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'radio'\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\">\r\n </sd-select>\r\n <ng-container *ngIf=\"item.type === 'values'\">\r\n <sd-select *ngIf=\"item.selection === 'MULTIPLE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\"\r\n multiple=\"true\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"item.selection === 'AUTOCOMPLETE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\">\r\n </sd-autocomplete>\r\n <sd-select *ngIf=\"item.selection === 'MULTIPLEAUTOCOMPLETE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\"\r\n filtered=\"true\" multiple=\"true\">\r\n </sd-select>\r\n <sd-select *ngIf=\"!item.selection\" [label]=\"item.title\" [items]=\"item.values\" [valueField]=\"item.valueField\"\r\n [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\">\r\n </sd-select>\r\n </ng-container>\r\n <sd-input *ngIf=\"item.type === 'custom'\" [label]=\"item.title\"\r\n [(model)]=\"externalFilter[displayKey + item.field]\"\r\n (sdFocusForceBlur)=\"item?.onClick(externalFilter, item.field, displayKey + item.field)\">\r\n </sd-input>\r\n <sd-date-time [label]=\"item.title\" *ngIf=\"item.type ==='date'\" [(model)]=\"externalFilter[item.field]\"\r\n type=\"date\">\r\n </sd-date-time>\r\n <sd-date-range [label]=\"item.title\" *ngIf=\"item.type ==='daterangefull'\"\r\n [(from)]=\"externalFilter[item.field].from\" [(to)]=\"externalFilter[item.field].to\" [min]=\"item.minDate\"\r\n [max]=\"item.maxDate\">\r\n </sd-date-range>\r\n <ng-container *ngIf=\"item.type ==='daterange'\">\r\n <div class=\"row\">\r\n <div class=\"col-6\">\r\n <sd-date-time [label]=\"item.fromTitle\" [(model)]=\"externalFilter[item.field].from\"\r\n [type]=\"item.enableTime ? 'datetime' : 'date'\" [minDate]=\"item.minDate\"\r\n [maxDate]=\"externalFilter[item.field].to || item.maxDate\">\r\n </sd-date-time>\r\n </div>\r\n <div class=\"col-6\">\r\n <sd-date-time [label]=\"item.toTitle\" [(model)]=\"externalFilter[item.field].to\"\r\n [type]=\"item.enableTime ? 'datetime' : 'date'\"\r\n [minDate]=\"item.minDate || externalFilter[item.field].from\" [maxDate]=\"item.maxDate\">\r\n </sd-date-time>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"row\" *ngIf=\"item.type ==='numberrange'\">\r\n <div class=\"col-6\">\r\n <sd-input [label]=\"item.fromTitle\" type=\" number\" [(model)]=\"externalFilter[item.field].from\">\r\n </sd-input>\r\n </div>\r\n <div class=\"col-6\">\r\n <sd-input [label]=\"item.toTitle\" type=\" number\" [(model)]=\"externalFilter[item.field].to\">\r\n </sd-input>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of columns\">\r\n <div class=\"d-flex align-items-baseline\"\r\n *ngIf=\"column.type !== 'children' && (filterOption?.multiple !== false || selectedField === 'column' + column.field)\">\r\n <ng-container *ngIf=\"filterOption?.multiple !== false\">\r\n <div *sdDesktop class=\"c-checkable\">\r\n <sd-switch [(model)]=\"inlineColumn[column.field]\" (sdChange)=\"onInlineChange()\">\r\n </sd-switch>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-filterable\">\r\n <sd-input *ngIf=\"column.type === 'string'\" [label]=\"column.title\" type=\"text\"\r\n [(model)]=\"filter[column.field]\">\r\n </sd-input>\r\n <sd-input *ngIf=\"column.type === 'number'\" [label]=\"column.title\" type=\" number\"\r\n [(model)]=\"filter[column.field]\">\r\n </sd-input>\r\n <sd-select *ngIf=\"column.type === 'bool'\" [label]=\"column.title\" [items]=\"[{value:'1',display:column.trueValue || 'True' },\r\n {value:'0',display:column.falseValue || 'False' }]\" [(model)]=\"filter[column.field]\">\r\n </sd-select>\r\n <sd-select *ngIf=\"column.type === 'radio'\" [label]=\"column.title\" [items]=\"column.values\"\r\n [valueField]=\"column.valueField\" [displayField]=\"column.displayField\" [(model)]=\"filter[column.field]\">\r\n </sd-select>\r\n <sd-select *ngIf=\"column.type === 'values' && !column?.editor?.autocomplete\" [label]=\"column.title\"\r\n [items]=\"column.values\" valueField=\"value\" displayField=\"text\" [(model)]=\"filter[column.field]\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"column.type === 'values' && column?.editor?.autocomplete\" [label]=\"column.title\"\r\n [items]=\"column.values\" valueField=\"value\" displayField=\"text\" [(model)]=\"filter[column.field]\">\r\n </sd-autocomplete>\r\n <sd-date-time *ngIf=\"column.type ==='date' || column.type==='datetime' ||\r\n column.type==='time'\" [label]=\"column.title\" [(model)]=\" filter[column.field]\" type=\"date\">\r\n </sd-date-time>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"column.type === 'children' && column.children?.length\">\r\n <ng-container *ngFor=\"let childColumn of column.children\">\r\n <div class=\"d-flex align-items-baseline\"\r\n *ngIf=\"filterOption?.multiple !== false || selectedField === 'column' + childColumn.field\">\r\n <ng-container *ngIf=\"filterOption?.multiple !== false\">\r\n <div *sdDesktop class=\"c-checkable\">\r\n <sd-switch [(model)]=\"inlineColumn[childColumn.field]\" (sdChange)=\"onInlineChange()\">\r\n </sd-switch>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-filterable\">\r\n <sd-input [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'string'\" type=\"text\"\r\n [(model)]=\"filter[childColumn.field]\">\r\n </sd-input>\r\n <sd-input [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'number'\" type=\" number\"\r\n [(model)]=\"filter[childColumn.field]\">\r\n </sd-input>\r\n <sd-select [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'bool'\" [items]=\"[{value:'1',display:column.trueValue || 'True' },\r\n {value:'0',display:childColumn.falseValue || 'False' }]\" [(model)]=\"filter[childColumn.field]\">\r\n </sd-select>\r\n <sd-select [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'radio'\" [items]=\"childColumn.values\"\r\n [valueField]=\"childColumn.valueField\" [displayField]=\"childColumn.displayField\"\r\n [(model)]=\"filter[childColumn.field]\">\r\n </sd-select>\r\n <sd-autocomplete [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'values'\"\r\n [items]=\"childColumn.values\" valueField=\"value\" displayField=\"text\"\r\n [(model)]=\"filter[childColumn.field]\">\r\n </sd-autocomplete>\r\n <sd-date-time [label]=\"childColumn.title\" *ngIf=\"childColumn.type ==='date' || childColumn.type==='datetime' ||\r\n childColumn.type==='time'\" [(model)]=\" filter[childColumn.field]\" type=\"date\">\r\n </sd-date-time>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </sd-modal-body>\r\n <sd-modal-footer *sdDesktop>\r\n <sd-button class=\"mr-auto\" (action)=\"onClear()\" icon=\"clear\" [title]=\"'Clear filter' | sdTranslate\" size=\"sm\">\r\n </sd-button>\r\n <sd-button (action)=\"onAccept()\" icon=\"done\" [title]=\"'Accept' | sdTranslate\" color=\"primary\" size=\"sm\"></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()\" icon=\"clear\"\r\n [title]=\"'Clear filter' | sdTranslate\" width=\"100%\" size=\"sm\"></sd-button>\r\n <sd-button style=\"flex: 1; padding-left: 5px;\" (action)=\"onAccept()\" icon=\"done\" [title]=\"'Accept' | sdTranslate\"\r\n color=\"primary\" width=\"100%\" size=\"sm\"></sd-button>\r\n </sd-modal-footer>\r\n</sd-modal>\r\n<sd-grid-popup-quick-filter-detail #popupQuickFilterDetail (accept)=\"onAcceptQuickFilter($event)\">\r\n</sd-grid-popup-quick-filter-detail>",
2759
+ template: "<sd-modal width=\"sm\" [title]=\"'Filter' | sdTranslate\" #modal>\r\n <sd-modal-body>\r\n <div\r\n *ngIf=\"key && filterOption?.multiple !== false && (!filterOption?.quickFilterVisibility || filterOption?.quickFilterVisibility === 'popup')\">\r\n <mat-form-field class=\"sd-md\" appearance=\"outline\">\r\n <mat-label>{{'Quick filters' | sdTranslate}}</mat-label>\r\n <mat-select [(ngModel)]=\"selectedCode\" (selectionChange)=\"onSelectionChange($event)\" #matSelect>\r\n <mat-option value=\"\">{{'Please select' | sdTranslate}}</mat-option>\r\n <mat-option *ngFor=\"let quickFilter of quickFilters\" [value]=\"quickFilter.code\">\r\n <div style=\"display:flex; justify-content: space-between\">\r\n <span>{{quickFilter.code}}</span>\r\n <div>\r\n <mat-icon class=\"mr-1 c-fa-icon\" (click)=\"onEditQuickFilter($event, quickFilter)\" fontSet=\"fa\"\r\n fontIcon=\"fa-pencil\"></mat-icon>\r\n <mat-icon class=\"mr-0 c-fa-icon\" (click)=\"onDeleteQuickFilter($event, quickFilter)\" fontSet=\"fa\"\r\n fontIcon=\"fa-trash-o\"></mat-icon>\r\n </div>\r\n </div>\r\n </mat-option>\r\n <mat-option [value]=\"newQuickFilter\">\r\n <div (click)=\"onCreateQuickFilter($event)\">\r\n <mat-icon class=\"mr-1\" fontSet=\"material-icons-outlined\">add</mat-icon>\r\n <span>{{'Create quick filter' | sdTranslate}}</span>\r\n </div>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <ng-container *ngIf=\"filterOption?.multiple === false\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-label>{{'Select field' | sdTranslate}}</mat-label>\r\n <mat-select [(ngModel)]=\"selectedField\">\r\n <mat-option value=\"\">{{'Please select' | sdTranslate}}</mat-option>\r\n <mat-option *ngFor=\"let item of externalFilters\" [value]=\"'external' + item.field\">\r\n {{item.title}}\r\n </mat-option>\r\n <ng-container *ngFor=\"let item of columns\">\r\n <mat-option *ngIf=\"item.type !== 'children'\" [value]=\"'column' + item.field\">\r\n {{item.title}}\r\n </mat-option>\r\n <ng-container *ngIf=\"item.type === 'children' && item.children?.length\">\r\n <ng-container *ngFor=\"let childColumn of item.children\">\r\n <mat-option [value]=\"'column' + childColumn.field\">\r\n {{childColumn.title}}\r\n </mat-option>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </mat-select>\r\n </mat-form-field>\r\n </ng-container>\r\n <ng-container *ngFor=\"let item of externalFilters\">\r\n <div *ngIf=\"filterOption?.multiple !== false || selectedField === 'external' + item.field\"\r\n class=\"d-flex align-items-baseline\">\r\n <ng-container *ngIf=\"filterOption?.multiple !== false\">\r\n <div *sdDesktop class=\"c-checkable\">\r\n <sd-switch [(model)]=\"inlineExternal[item.field]\" (sdChange)=\"onInlineChange()\">\r\n </sd-switch>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-filterable\">\r\n <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'string'\" type=\"text\"\r\n [(model)]=\"externalFilter[item.field]\">\r\n </sd-input>\r\n <sd-input-currency [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"externalFilter[item.field]\">\r\n </sd-input-currency>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'bool'\" [items]=\" [{value:'1',display:item.trueValue || 'True' },\r\n {value:'0',display:item.falseValue || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n [(model)]=\"externalFilter[item.field]\">\r\n </sd-select>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'radio'\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\">\r\n </sd-select>\r\n <ng-container *ngIf=\"item.type === 'values'\">\r\n <sd-select *ngIf=\"item.selection === 'MULTIPLE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\"\r\n multiple=\"true\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"item.selection === 'AUTOCOMPLETE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\">\r\n </sd-autocomplete>\r\n <sd-select *ngIf=\"item.selection === 'MULTIPLEAUTOCOMPLETE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\"\r\n filtered=\"true\" multiple=\"true\">\r\n </sd-select>\r\n <sd-select *ngIf=\"!item.selection\" [label]=\"item.title\" [items]=\"item.values\" [valueField]=\"item.valueField\"\r\n [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.field]\">\r\n </sd-select>\r\n </ng-container>\r\n <sd-input *ngIf=\"item.type === 'custom'\" [label]=\"item.title\"\r\n [(model)]=\"externalFilter[displayKey + item.field]\"\r\n (sdFocusForceBlur)=\"item?.onClick(externalFilter, item.field, displayKey + item.field)\">\r\n </sd-input>\r\n <sd-date-time [label]=\"item.title\" *ngIf=\"item.type ==='date'\" [(model)]=\"externalFilter[item.field]\"\r\n type=\"date\">\r\n </sd-date-time>\r\n <sd-date-range [label]=\"item.title\" *ngIf=\"item.type ==='daterangefull'\"\r\n [(from)]=\"externalFilter[item.field].from\" [(to)]=\"externalFilter[item.field].to\" [min]=\"item.minDate\"\r\n [max]=\"item.maxDate\">\r\n </sd-date-range>\r\n <ng-container *ngIf=\"item.type ==='daterange'\">\r\n <div class=\"row\">\r\n <div class=\"col-6\">\r\n <sd-date-time [label]=\"item.fromTitle\" [(model)]=\"externalFilter[item.field].from\"\r\n [type]=\"item.enableTime ? 'datetime' : 'date'\" [minDate]=\"item.minDate\"\r\n [maxDate]=\"externalFilter[item.field].to || item.maxDate\">\r\n </sd-date-time>\r\n </div>\r\n <div class=\"col-6\">\r\n <sd-date-time [label]=\"item.toTitle\" [(model)]=\"externalFilter[item.field].to\"\r\n [type]=\"item.enableTime ? 'datetime' : 'date'\"\r\n [minDate]=\"item.minDate || externalFilter[item.field].from\" [maxDate]=\"item.maxDate\">\r\n </sd-date-time>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"row\" *ngIf=\"item.type ==='numberrange'\">\r\n <div class=\"col-6\">\r\n <sd-input [label]=\"item.fromTitle\" type=\" number\" [(model)]=\"externalFilter[item.field].from\">\r\n </sd-input>\r\n </div>\r\n <div class=\"col-6\">\r\n <sd-input [label]=\"item.toTitle\" type=\" number\" [(model)]=\"externalFilter[item.field].to\">\r\n </sd-input>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of columns\">\r\n <div class=\"d-flex align-items-baseline\"\r\n *ngIf=\"column.type !== 'children' && (filterOption?.multiple !== false || selectedField === 'column' + column.field)\">\r\n <ng-container *ngIf=\"filterOption?.multiple !== false\">\r\n <div *sdDesktop class=\"c-checkable\">\r\n <sd-switch [(model)]=\"inlineColumn[column.field]\" (sdChange)=\"onInlineChange()\">\r\n </sd-switch>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-filterable\">\r\n <sd-input *ngIf=\"column.type === 'string'\" [label]=\"column.title\" type=\"text\"\r\n [(model)]=\"filter[column.field]\">\r\n </sd-input>\r\n <sd-input *ngIf=\"column.type === 'number'\" [label]=\"column.title\" type=\" number\"\r\n [(model)]=\"filter[column.field]\">\r\n </sd-input>\r\n <sd-select *ngIf=\"column.type === 'bool'\" [label]=\"column.title\" [items]=\"[{value:'1',display:column.trueValue || 'True' },\r\n {value:'0',display:column.falseValue || 'False' }]\" [(model)]=\"filter[column.field]\">\r\n </sd-select>\r\n <sd-select *ngIf=\"column.type === 'radio'\" [label]=\"column.title\" [items]=\"column.values\"\r\n [valueField]=\"column.valueField\" [displayField]=\"column.displayField\" [(model)]=\"filter[column.field]\">\r\n </sd-select>\r\n <sd-select *ngIf=\"column.type === 'values' && !column?.editor?.autocomplete\" [label]=\"column.title\"\r\n [items]=\"column.values\" valueField=\"value\" displayField=\"text\" [(model)]=\"filter[column.field]\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"column.type === 'values' && column?.editor?.autocomplete\" [label]=\"column.title\"\r\n [items]=\"column.values\" valueField=\"value\" displayField=\"text\" [(model)]=\"filter[column.field]\">\r\n </sd-autocomplete>\r\n <sd-date-time *ngIf=\"column.type ==='date' || column.type==='datetime' ||\r\n column.type==='time'\" [label]=\"column.title\" [(model)]=\" filter[column.field]\" type=\"date\">\r\n </sd-date-time>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"column.type === 'children' && column.children?.length\">\r\n <ng-container *ngFor=\"let childColumn of column.children\">\r\n <div class=\"d-flex align-items-baseline\"\r\n *ngIf=\"filterOption?.multiple !== false || selectedField === 'column' + childColumn.field\">\r\n <ng-container *ngIf=\"filterOption?.multiple !== false\">\r\n <div *sdDesktop class=\"c-checkable\">\r\n <sd-switch [(model)]=\"inlineColumn[childColumn.field]\" (sdChange)=\"onInlineChange()\">\r\n </sd-switch>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-filterable\">\r\n <sd-input [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'string'\" type=\"text\"\r\n [(model)]=\"filter[childColumn.field]\">\r\n </sd-input>\r\n <sd-input [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'number'\" type=\" number\"\r\n [(model)]=\"filter[childColumn.field]\">\r\n </sd-input>\r\n <sd-select [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'bool'\" [items]=\"[{value:'1',display:column.trueValue || 'True' },\r\n {value:'0',display:childColumn.falseValue || 'False' }]\" [(model)]=\"filter[childColumn.field]\">\r\n </sd-select>\r\n <sd-select [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'radio'\" [items]=\"childColumn.values\"\r\n [valueField]=\"childColumn.valueField\" [displayField]=\"childColumn.displayField\"\r\n [(model)]=\"filter[childColumn.field]\">\r\n </sd-select>\r\n <sd-autocomplete [label]=\"childColumn.title\" *ngIf=\"childColumn.type === 'values'\"\r\n [items]=\"childColumn.values\" valueField=\"value\" displayField=\"text\"\r\n [(model)]=\"filter[childColumn.field]\">\r\n </sd-autocomplete>\r\n <sd-date-time [label]=\"childColumn.title\" *ngIf=\"childColumn.type ==='date' || childColumn.type==='datetime' ||\r\n childColumn.type==='time'\" [(model)]=\" filter[childColumn.field]\" type=\"date\">\r\n </sd-date-time>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </sd-modal-body>\r\n <sd-modal-footer *sdDesktop>\r\n <sd-button class=\"mr-auto\" (action)=\"onClear()\" icon=\"clear\" [title]=\"'Clear filter' | sdTranslate\" size=\"sm\">\r\n </sd-button>\r\n <sd-button (action)=\"onAccept()\" icon=\"done\" [title]=\"'Accept' | sdTranslate\" color=\"primary\" size=\"sm\"></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()\" icon=\"clear\"\r\n [title]=\"'Clear filter' | sdTranslate\" width=\"100%\" size=\"sm\"></sd-button>\r\n <sd-button style=\"flex: 1; padding-left: 5px;\" (action)=\"onAccept()\" icon=\"done\" [title]=\"'Accept' | sdTranslate\"\r\n color=\"primary\" width=\"100%\" size=\"sm\"></sd-button>\r\n </sd-modal-footer>\r\n</sd-modal>\r\n<sd-grid-popup-quick-filter-detail #popupQuickFilterDetail (accept)=\"onAcceptQuickFilter($event)\">\r\n</sd-grid-popup-quick-filter-detail>",
2760
2760
  encapsulation: ViewEncapsulation.None,
2761
2761
  styles: [".c-fa-icon{color:grey;font-size:20px}.c-checkable{width:50px}.c-filterable{flex:1}"]
2762
2762
  },] }
@@ -2941,7 +2941,7 @@ class SdGridPopupQuickFilterDetail {
2941
2941
  SdGridPopupQuickFilterDetail.decorators = [
2942
2942
  { type: Component, args: [{
2943
2943
  selector: 'sd-grid-popup-quick-filter-detail',
2944
- template: "<sd-modal width=\"sm\" [title]=\"(page === 1 ? 'Select filtered fields':'Input filtered fields') | sdTranslate\" #modal>\r\n <sd-modal-body>\r\n <div class=\"row\">\r\n <ng-container *ngIf=\"page === 1\">\r\n <div *ngFor=\"let field of selectableFields\" class=\"col-12\">\r\n <sd-switch [(model)]=\"selectedField[field.id]\" [label]=\"field.title\" (sdChange)=\"onSelectFields()\">\r\n </sd-switch>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"page === 2\">\r\n <div class=\"col-12\" *ngFor=\"let item of fields\">\r\n <ng-container *ngIf=\"item.group === 'external'\">\r\n <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'string'\" type=\"text\"\r\n [(model)]=\"externalFilter[item.code]\">\r\n </sd-input>\r\n <sd-input-number [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"externalFilter[item.code]\">\r\n </sd-input-number>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'bool'\" [items]=\" [{value:'1',display:item.trueValue || 'True' },\r\n {value:'0',display:item.falseValue || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n [(model)]=\"externalFilter[item.code]\">\r\n </sd-select>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'radio'\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.code]\">\r\n </sd-select>\r\n <ng-container *ngIf=\"item.type === 'values'\">\r\n <sd-select *ngIf=\"item.selection === 'MULTIPLE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.code]\"\r\n multiple=\"true\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"item.selection === 'AUTOCOMPLETE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.code]\">\r\n </sd-autocomplete>\r\n <sd-select *ngIf=\"item.selection === 'MULTIPLEAUTOCOMPLETE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.code]\"\r\n filtered=\"true\" multiple=\"true\">\r\n </sd-select>\r\n <sd-select *ngIf=\"!item.selection\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.code]\">\r\n </sd-select>\r\n </ng-container>\r\n <sd-input *ngIf=\"item.type === 'custom'\" [label]=\"item.title\"\r\n [(model)]=\"externalFilter[displayKey + item.code]\"\r\n (sdFocusForceBlur)=\"item?.onClick(externalFilter, item.code, displayKey + item.code)\">\r\n </sd-input>\r\n <sd-date-time [label]=\"item.title\" *ngIf=\"item.type ==='date'\" [(model)]=\"externalFilter[item.code]\"\r\n type=\"date\">\r\n </sd-date-time>\r\n <sd-date-range [label]=\"item.title\" *ngIf=\"item.type ==='daterangefull'\"\r\n [(from)]=\"externalFilter[item.code].from\" [(to)]=\"externalFilter[item.code].to\" [min]=\"item.minDate\"\r\n [max]=\"item.maxDate\">\r\n </sd-date-range>\r\n <ng-container *ngIf=\"item.type ==='daterange'\">\r\n <div class=\"row\">\r\n <div class=\"col-6\">\r\n <sd-date-time [label]=\"item.fromTitle\" [(model)]=\"externalFilter[item.code].from\"\r\n [type]=\"item.enableTime ? 'datetime' : 'date'\" [minDate]=\"item.minDate\"\r\n [maxDate]=\"externalFilter[item.code].to || item.maxDate\">\r\n </sd-date-time>\r\n </div>\r\n <div class=\"col-6\">\r\n <sd-date-time [label]=\"item.toTitle\" [(model)]=\"externalFilter[item.code].to\"\r\n [type]=\"item.enableTime ? 'datetime' : 'date'\"\r\n [minDate]=\"item.minDate || externalFilter[item.code].from\" [maxDate]=\"item.maxDate\">\r\n </sd-date-time>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"row\" *ngIf=\"item.type ==='numberrange'\">\r\n <div class=\"col-6\">\r\n <sd-input [label]=\"item.fromTitle\" type=\" number\" [(model)]=\"externalFilter[item.code].from\">\r\n </sd-input>\r\n </div>\r\n <div class=\"col-6\">\r\n <sd-input [label]=\"item.toTitle\" type=\" number\" [(model)]=\"externalFilter[item.code].to\">\r\n </sd-input>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"item.group === 'column'\">\r\n <sd-input *ngIf=\"item.type === 'string'\" [label]=\"item.title\" type=\"text\" [(model)]=\"filter[item.code]\">\r\n </sd-input>\r\n <sd-input *ngIf=\"item.type === 'number'\" [label]=\"item.title\" type=\" number\" [(model)]=\"filter[item.code]\">\r\n </sd-input>\r\n <sd-select *ngIf=\"item.type === 'bool'\" [label]=\"item.title\" [items]=\"[{value:'1',display:item.trueValue || 'True' },\r\n {value:'0',display:item.falseValue || 'False' }]\" [(model)]=\"filter[item.code]\">\r\n </sd-select>\r\n <sd-select *ngIf=\"item.type === 'radio'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"filter[item.code]\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"item.type === 'values' && item.editor?.autocomplete\" [label]=\"item.title\"\r\n [items]=\"item.values\" valueField=\"value\" displayField=\"text\" [(model)]=\"filter[item.code]\">\r\n </sd-autocomplete>\r\n <sd-select *ngIf=\"item.type === 'values' && !item.editor?.autocomplete\" [label]=\"item.title\"\r\n [items]=\"item.values\" valueField=\"value\" displayField=\"text\" [(model)]=\"filter[item.code]\">\r\n </sd-select>\r\n <sd-date-time *ngIf=\"item.type ==='date' || item.type==='datetime' ||\r\n item.type==='time'\" [label]=\"item.title\" [(model)]=\" filter[item.code]\" type=\"date\">\r\n </sd-date-time>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </sd-modal-body>\r\n <ng-container *ngIf=\"page === 1\">\r\n <sd-modal-footer *sdDesktop>\r\n <sd-button class=\"mr-auto\" (action)=\"onCancel()\" icon=\"clear\" [title]=\"'Cancel' | sdTranslate\" size=\"sm\">\r\n </sd-button>\r\n <sd-button (action)=\"page = 2\" icon=\"arrow_forward\" [title]=\"'Next' | sdTranslate\" color=\"primary\"\r\n iconSuffix=\"true\" [disabled]=\"!fields.length\" size=\"sm\"></sd-button>\r\n </sd-modal-footer>\r\n <sd-modal-footer *sdMobileTablet>\r\n <sd-button style=\"flex: 1; padding-right: 5px;\" (action)=\"onCancel()\" icon=\"clear\"\r\n [title]=\"'Cancel' | sdTranslate\" width=\"100%\" size=\"sm\"></sd-button>\r\n <sd-button style=\"flex: 1; padding-left: 5px;\" (action)=\"page = 2\" icon=\"arrow_forward\"\r\n [title]=\"'Next' | sdTranslate\" color=\"primary\" width=\"100%\" iconSuffix=\"true\" [disabled]=\"!fields.length\"\r\n size=\"sm\">\r\n </sd-button>\r\n </sd-modal-footer>\r\n </ng-container>\r\n <ng-container *ngIf=\"page === 2\">\r\n <sd-modal-footer *sdDesktop>\r\n <sd-button class=\"mr-auto\" (action)=\"page = 1\" icon=\"arrow_back\" [title]=\"'Back' | sdTranslate\" size=\"sm\">\r\n </sd-button>\r\n <sd-button (action)=\"onAccept()\" icon=\"done\" [title]=\"'Accept' | sdTranslate\" color=\"primary\" size=\"sm\">\r\n </sd-button>\r\n </sd-modal-footer>\r\n <sd-modal-footer *sdMobileTablet>\r\n <sd-button style=\"flex: 1; padding-right: 5px;\" (action)=\"page = 1\" icon=\"arrow_back\"\r\n [title]=\"'Back' | sdTranslate\" width=\"100%\" size=\"sm\"></sd-button>\r\n <sd-button style=\"flex: 1; padding-left: 5px;\" (action)=\"onAccept()\" icon=\"done\" [title]=\"'Accept' | sdTranslate\"\r\n color=\"primary\" width=\"100%\" size=\"sm\"></sd-button>\r\n </sd-modal-footer>\r\n </ng-container>\r\n</sd-modal>",
2944
+ template: "<sd-modal width=\"sm\" [title]=\"(page === 1 ? 'Select filtered fields':'Input filtered fields') | sdTranslate\" #modal>\r\n <sd-modal-body>\r\n <div class=\"row\">\r\n <ng-container *ngIf=\"page === 1\">\r\n <div *ngFor=\"let field of selectableFields\" class=\"col-12\">\r\n <sd-switch [(model)]=\"selectedField[field.id]\" [label]=\"field.title\" (sdChange)=\"onSelectFields()\">\r\n </sd-switch>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"page === 2\">\r\n <div class=\"col-12\" *ngFor=\"let item of fields\">\r\n <ng-container *ngIf=\"item.group === 'external'\">\r\n <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'string'\" type=\"text\"\r\n [(model)]=\"externalFilter[item.code]\">\r\n </sd-input>\r\n <sd-input-currency [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"externalFilter[item.code]\">\r\n </sd-input-currency>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'bool'\" [items]=\" [{value:'1',display:item.trueValue || 'True' },\r\n {value:'0',display:item.falseValue || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n [(model)]=\"externalFilter[item.code]\">\r\n </sd-select>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'radio'\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.code]\">\r\n </sd-select>\r\n <ng-container *ngIf=\"item.type === 'values'\">\r\n <sd-select *ngIf=\"item.selection === 'MULTIPLE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.code]\"\r\n multiple=\"true\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"item.selection === 'AUTOCOMPLETE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.code]\">\r\n </sd-autocomplete>\r\n <sd-select *ngIf=\"item.selection === 'MULTIPLEAUTOCOMPLETE'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.code]\"\r\n filtered=\"true\" multiple=\"true\">\r\n </sd-select>\r\n <sd-select *ngIf=\"!item.selection\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"externalFilter[item.code]\">\r\n </sd-select>\r\n </ng-container>\r\n <sd-input *ngIf=\"item.type === 'custom'\" [label]=\"item.title\"\r\n [(model)]=\"externalFilter[displayKey + item.code]\"\r\n (sdFocusForceBlur)=\"item?.onClick(externalFilter, item.code, displayKey + item.code)\">\r\n </sd-input>\r\n <sd-date-time [label]=\"item.title\" *ngIf=\"item.type ==='date'\" [(model)]=\"externalFilter[item.code]\"\r\n type=\"date\">\r\n </sd-date-time>\r\n <sd-date-range [label]=\"item.title\" *ngIf=\"item.type ==='daterangefull'\"\r\n [(from)]=\"externalFilter[item.code].from\" [(to)]=\"externalFilter[item.code].to\" [min]=\"item.minDate\"\r\n [max]=\"item.maxDate\">\r\n </sd-date-range>\r\n <ng-container *ngIf=\"item.type ==='daterange'\">\r\n <div class=\"row\">\r\n <div class=\"col-6\">\r\n <sd-date-time [label]=\"item.fromTitle\" [(model)]=\"externalFilter[item.code].from\"\r\n [type]=\"item.enableTime ? 'datetime' : 'date'\" [minDate]=\"item.minDate\"\r\n [maxDate]=\"externalFilter[item.code].to || item.maxDate\">\r\n </sd-date-time>\r\n </div>\r\n <div class=\"col-6\">\r\n <sd-date-time [label]=\"item.toTitle\" [(model)]=\"externalFilter[item.code].to\"\r\n [type]=\"item.enableTime ? 'datetime' : 'date'\"\r\n [minDate]=\"item.minDate || externalFilter[item.code].from\" [maxDate]=\"item.maxDate\">\r\n </sd-date-time>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"row\" *ngIf=\"item.type ==='numberrange'\">\r\n <div class=\"col-6\">\r\n <sd-input [label]=\"item.fromTitle\" type=\" number\" [(model)]=\"externalFilter[item.code].from\">\r\n </sd-input>\r\n </div>\r\n <div class=\"col-6\">\r\n <sd-input [label]=\"item.toTitle\" type=\" number\" [(model)]=\"externalFilter[item.code].to\">\r\n </sd-input>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"item.group === 'column'\">\r\n <sd-input *ngIf=\"item.type === 'string'\" [label]=\"item.title\" type=\"text\" [(model)]=\"filter[item.code]\">\r\n </sd-input>\r\n <sd-input *ngIf=\"item.type === 'number'\" [label]=\"item.title\" type=\" number\" [(model)]=\"filter[item.code]\">\r\n </sd-input>\r\n <sd-select *ngIf=\"item.type === 'bool'\" [label]=\"item.title\" [items]=\"[{value:'1',display:item.trueValue || 'True' },\r\n {value:'0',display:item.falseValue || 'False' }]\" [(model)]=\"filter[item.code]\">\r\n </sd-select>\r\n <sd-select *ngIf=\"item.type === 'radio'\" [label]=\"item.title\" [items]=\"item.values\"\r\n [valueField]=\"item.valueField\" [displayField]=\"item.displayField\" [(model)]=\"filter[item.code]\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"item.type === 'values' && item.editor?.autocomplete\" [label]=\"item.title\"\r\n [items]=\"item.values\" valueField=\"value\" displayField=\"text\" [(model)]=\"filter[item.code]\">\r\n </sd-autocomplete>\r\n <sd-select *ngIf=\"item.type === 'values' && !item.editor?.autocomplete\" [label]=\"item.title\"\r\n [items]=\"item.values\" valueField=\"value\" displayField=\"text\" [(model)]=\"filter[item.code]\">\r\n </sd-select>\r\n <sd-date-time *ngIf=\"item.type ==='date' || item.type==='datetime' ||\r\n item.type==='time'\" [label]=\"item.title\" [(model)]=\" filter[item.code]\" type=\"date\">\r\n </sd-date-time>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </sd-modal-body>\r\n <ng-container *ngIf=\"page === 1\">\r\n <sd-modal-footer *sdDesktop>\r\n <sd-button class=\"mr-auto\" (action)=\"onCancel()\" icon=\"clear\" [title]=\"'Cancel' | sdTranslate\" size=\"sm\">\r\n </sd-button>\r\n <sd-button (action)=\"page = 2\" icon=\"arrow_forward\" [title]=\"'Next' | sdTranslate\" color=\"primary\"\r\n iconSuffix=\"true\" [disabled]=\"!fields.length\" size=\"sm\"></sd-button>\r\n </sd-modal-footer>\r\n <sd-modal-footer *sdMobileTablet>\r\n <sd-button style=\"flex: 1; padding-right: 5px;\" (action)=\"onCancel()\" icon=\"clear\"\r\n [title]=\"'Cancel' | sdTranslate\" width=\"100%\" size=\"sm\"></sd-button>\r\n <sd-button style=\"flex: 1; padding-left: 5px;\" (action)=\"page = 2\" icon=\"arrow_forward\"\r\n [title]=\"'Next' | sdTranslate\" color=\"primary\" width=\"100%\" iconSuffix=\"true\" [disabled]=\"!fields.length\"\r\n size=\"sm\">\r\n </sd-button>\r\n </sd-modal-footer>\r\n </ng-container>\r\n <ng-container *ngIf=\"page === 2\">\r\n <sd-modal-footer *sdDesktop>\r\n <sd-button class=\"mr-auto\" (action)=\"page = 1\" icon=\"arrow_back\" [title]=\"'Back' | sdTranslate\" size=\"sm\">\r\n </sd-button>\r\n <sd-button (action)=\"onAccept()\" icon=\"done\" [title]=\"'Accept' | sdTranslate\" color=\"primary\" size=\"sm\">\r\n </sd-button>\r\n </sd-modal-footer>\r\n <sd-modal-footer *sdMobileTablet>\r\n <sd-button style=\"flex: 1; padding-right: 5px;\" (action)=\"page = 1\" icon=\"arrow_back\"\r\n [title]=\"'Back' | sdTranslate\" width=\"100%\" size=\"sm\"></sd-button>\r\n <sd-button style=\"flex: 1; padding-left: 5px;\" (action)=\"onAccept()\" icon=\"done\" [title]=\"'Accept' | sdTranslate\"\r\n color=\"primary\" width=\"100%\" size=\"sm\"></sd-button>\r\n </sd-modal-footer>\r\n </ng-container>\r\n</sd-modal>",
2945
2945
  styles: [""]
2946
2946
  },] }
2947
2947
  ];