@mediusinc/mng-commons 5.3.0-rc.1 → 5.3.0-rc.3

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 (106) hide show
  1. package/core/data-list/filter-metadata.model.d.ts +20 -0
  2. package/core/helpers/number.d.ts +5 -0
  3. package/core/helpers/type-helpers.d.ts +1 -0
  4. package/core/index.d.ts +2 -0
  5. package/core/provide.d.ts +3 -2
  6. package/core/services/tokens/module-config.token.d.ts +7 -6
  7. package/esm2022/core/data-list/data-list-params-helpers.mjs +3 -1
  8. package/esm2022/core/data-list/filter-metadata.model.mjs +2 -0
  9. package/esm2022/core/helpers/date.mjs +2 -2
  10. package/esm2022/core/helpers/number.mjs +19 -0
  11. package/esm2022/core/helpers/type-helpers.mjs +1 -1
  12. package/esm2022/core/index.mjs +3 -1
  13. package/esm2022/core/pipes/boolean.pipe.mjs +7 -1
  14. package/esm2022/core/provide.mjs +4 -3
  15. package/esm2022/core/services/tokens/module-config.token.mjs +1 -1
  16. package/esm2022/filter/descriptors/filter-lookup.descriptor.mjs +2 -3
  17. package/esm2022/filter/descriptors/filter.descriptor.mjs +76 -31
  18. package/esm2022/filter/models/filter.model.mjs +6 -1
  19. package/esm2022/form/components/date-range/date-range.component.mjs +45 -14
  20. package/esm2022/form/components/dropdown/dropdown.component.mjs +77 -93
  21. package/esm2022/form/components/number-range/number-range.component.mjs +29 -12
  22. package/esm2022/table/api/descriptors/column.descriptor.mjs +2 -1
  23. package/esm2022/table/api/descriptors/table.descriptor.mjs +22 -21
  24. package/esm2022/table/api/index.mjs +2 -1
  25. package/esm2022/table/api/models/row-expandable-component.model.mjs +2 -0
  26. package/esm2022/table/api/models/table-columns.model.mjs +1 -1
  27. package/esm2022/table/api/models/table.model.mjs +1 -1
  28. package/esm2022/table/components/column-filter/column-filter.component.mjs +396 -0
  29. package/esm2022/table/components/column-value/column-value.component.mjs +3 -3
  30. package/esm2022/table/components/filter/filter-active-tag/filter-active-tag.component.mjs +52 -0
  31. package/esm2022/table/components/filter/filter-form/filter-form.component.mjs +197 -0
  32. package/esm2022/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.mjs +135 -0
  33. package/esm2022/table/components/table/table.component.mjs +34 -25
  34. package/esm2022/table/helpers/filters.mjs +297 -0
  35. package/esm2022/table/index.mjs +13 -2
  36. package/esm2022/table/models/filter.model.mjs +2 -0
  37. package/esm2022/table/pipes/filter-value.pipe.mjs +77 -0
  38. package/esm2022/table/provide.mjs +19 -0
  39. package/esm2022/table/services/data-list.service.mjs +1 -1
  40. package/esm2022/table/services/table-feature-config.token.mjs +3 -0
  41. package/esm2022/tableview/action/components/action/action.component.mjs +3 -3
  42. package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +2 -2
  43. package/esm2022/tableview/action/components/localization/data-language-dropdown.component.mjs +2 -2
  44. package/esm2022/tableview/action/components/table/action-table.component.mjs +3 -3
  45. package/esm2022/tableview/api/editor/descriptors/field-base.descriptor.mjs +1 -3
  46. package/esm2022/tableview/api/editor/descriptors/field.descriptor.mjs +14 -1
  47. package/esm2022/tableview/api/editor/models/editor-fields.model.mjs +1 -1
  48. package/esm2022/tableview/api/editor/models/field-image-preview.model.mjs +2 -0
  49. package/esm2022/tableview/api/index.mjs +2 -1
  50. package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +11 -13
  51. package/esm2022/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +3 -3
  52. package/esm2022/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.mjs +3 -3
  53. package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +3 -3
  54. package/esm2022/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.mjs +9 -3
  55. package/esm2022/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +3 -3
  56. package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +3 -3
  57. package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +3 -3
  58. package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +3 -4
  59. package/fesm2022/mediusinc-mng-commons-core.mjs +32 -4
  60. package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
  61. package/fesm2022/mediusinc-mng-commons-filter.mjs +81 -32
  62. package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
  63. package/fesm2022/mediusinc-mng-commons-form.mjs +149 -117
  64. package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
  65. package/fesm2022/mediusinc-mng-commons-table-api.mjs +22 -20
  66. package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
  67. package/fesm2022/mediusinc-mng-commons-table.mjs +833 -360
  68. package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
  69. package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +23 -14
  70. package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
  71. package/fesm2022/mediusinc-mng-commons-tableview.mjs +27 -22
  72. package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
  73. package/filter/descriptors/filter.descriptor.d.ts +60 -16
  74. package/filter/models/filter.model.d.ts +4 -0
  75. package/form/components/date-range/date-range.component.d.ts +9 -3
  76. package/form/components/dropdown/dropdown.component.d.ts +6 -7
  77. package/form/components/number-range/number-range.component.d.ts +8 -4
  78. package/i18n/en.json +32 -0
  79. package/i18n/sl.json +32 -0
  80. package/package.json +1 -1
  81. package/table/api/descriptors/table.descriptor.d.ts +15 -8
  82. package/table/api/index.d.ts +1 -0
  83. package/table/api/models/row-expandable-component.model.d.ts +4 -0
  84. package/table/api/models/table-columns.model.d.ts +3 -3
  85. package/table/api/models/table.model.d.ts +0 -12
  86. package/table/components/{column-filter-full/column-filter-full.component.d.ts → column-filter/column-filter.component.d.ts} +23 -38
  87. package/table/components/filter/filter-active-tag/filter-active-tag.component.d.ts +20 -0
  88. package/table/components/filter/filter-form/filter-form.component.d.ts +53 -0
  89. package/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.d.ts +35 -0
  90. package/table/components/table/table.component.d.ts +10 -7
  91. package/table/helpers/filters.d.ts +31 -0
  92. package/table/index.d.ts +10 -1
  93. package/table/models/filter.model.d.ts +24 -0
  94. package/table/pipes/filter-value.pipe.d.ts +19 -0
  95. package/table/provide.d.ts +8 -0
  96. package/table/services/data-list.service.d.ts +3 -2
  97. package/table/services/table-feature-config.token.d.ts +6 -0
  98. package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +4 -4
  99. package/tableview/api/editor/descriptors/field.descriptor.d.ts +13 -3
  100. package/tableview/api/editor/models/editor-fields.model.d.ts +4 -4
  101. package/tableview/api/editor/models/field-image-preview.model.d.ts +4 -0
  102. package/tableview/api/index.d.ts +1 -0
  103. package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +8 -6
  104. package/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.d.ts +1 -0
  105. package/version-info.json +5 -5
  106. package/esm2022/table/components/column-filter-full/column-filter-full.component.mjs +0 -655
@@ -1,23 +1,23 @@
1
- import { AsyncPipe } from '@angular/common';
1
+ import { AsyncPipe, NgClass } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { forwardRef, inject, Injector, DestroyRef, input, booleanAttribute, output, signal, computed, effect, Component, ChangeDetectionStrategy, viewChild, ElementRef, Directive } from '@angular/core';
4
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
- import * as i3 from '@angular/forms';
6
- import { NG_VALUE_ACCESSOR, FormsModule, FormBuilder, ReactiveFormsModule, NgControl } from '@angular/forms';
3
+ import { forwardRef, inject, Injector, DestroyRef, input, booleanAttribute, output, signal, computed, effect, Component, ChangeDetectionStrategy, ChangeDetectorRef, viewChild, ElementRef, Directive } from '@angular/core';
4
+ import { takeUntilDestroyed, toObservable as toObservable$1 } from '@angular/core/rxjs-interop';
5
+ import * as i1$1 from '@angular/forms';
6
+ import { NG_VALUE_ACCESSOR, FormsModule, NG_VALIDATORS, FormBuilder, Validators, ReactiveFormsModule, NgControl } from '@angular/forms';
7
7
  import * as i2 from '@ngx-translate/core';
8
8
  import { TranslateService, TranslateModule } from '@ngx-translate/core';
9
9
  import * as i1 from 'primeng/autocomplete';
10
10
  import { AutoCompleteModule } from 'primeng/autocomplete';
11
- import { ReplaySubject, take, switchMap, of, merge } from 'rxjs';
11
+ import { ReplaySubject, take, switchMap, of, merge, combineLatest, tap, map as map$1 } from 'rxjs';
12
12
  import { map } from 'rxjs/operators';
13
13
  import { LoggerService, CommonsInternalError, FilterMatchMode, fromSubscribeError, getErrorLogLevel, toObservable } from '@mediusinc/mng-commons/core';
14
- import * as i1$1 from 'primeng/calendar';
14
+ import * as i2$1 from 'primeng/calendar';
15
15
  import { CalendarModule } from 'primeng/calendar';
16
16
  import * as i1$2 from 'primeng/dropdown';
17
17
  import { Dropdown, DropdownModule } from 'primeng/dropdown';
18
- import * as i2$1 from 'primeng/multiselect';
18
+ import * as i2$2 from 'primeng/multiselect';
19
19
  import { MultiSelect, MultiSelectModule } from 'primeng/multiselect';
20
- import * as i2$2 from 'primeng/inputnumber';
20
+ import * as i2$3 from 'primeng/inputnumber';
21
21
  import { InputNumberModule } from 'primeng/inputnumber';
22
22
 
23
23
  const AUTOCOMPLETE_VALUE_ACCESSOR = {
@@ -397,7 +397,7 @@ class AutocompleteComponent {
397
397
  }
398
398
  }
399
399
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
400
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.0.5", type: AutocompleteComponent, isStandalone: true, selector: "mng-autocomplete", inputs: { dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: true, transformFunction: null }, optionsTrackProperty: { classPropertyName: "optionsTrackProperty", publicName: "optionsTrackProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsValuePropertyInit: { classPropertyName: "optionsValuePropertyInit", publicName: "optionsValueProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelPropertyInit: { classPropertyName: "optionsLabelPropertyInit", publicName: "optionsLabelProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelTranslate: { classPropertyName: "optionsLabelTranslate", publicName: "optionsLabelTranslate", isSignal: true, isRequired: false, transformFunction: null }, inlineSearch: { classPropertyName: "inlineSearch", publicName: "inlineSearch", isSignal: true, isRequired: false, transformFunction: null }, openOnFocus: { classPropertyName: "openOnFocus", publicName: "openOnFocus", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, dropdownClassName: { classPropertyName: "dropdownClassName", publicName: "dropdownClassName", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, autoClear: { classPropertyName: "autoClear", publicName: "autoClear", isSignal: true, isRequired: false, transformFunction: null }, selectFirst: { classPropertyName: "selectFirst", publicName: "selectFirst", isSignal: true, isRequired: false, transformFunction: null }, searchTrim: { classPropertyName: "searchTrim", publicName: "searchTrim", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", blur: "blur" }, providers: [AUTOCOMPLETE_VALUE_ACCESSOR], ngImport: i0, template: "<p-autoComplete\n [ngModel]=\"ngModelValue()\"\n [placeholder]=\"placeholder()\"\n [dropdown]=\"true\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [suggestions]=\"suggestions()\"\n [multiple]=\"multiselect()\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [minLength]=\"openOnFocus() ? 0 : 1\"\n [showClear]=\"showClear()\"\n [forceSelection]=\"autoClear()\"\n [disabled]=\"disabled()\"\n [completeOnFocus]=\"openOnFocus()\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n (onFocus)=\"onFocus($event)\"\n (onBlur)=\"onBlur($event)\"\n (onClear)=\"onClear()\"\n (onShow)=\"onShow()\"\n (onHide)=\"onHide()\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n", dependencies: [{ kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i1.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "variant"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
400
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.0.5", type: AutocompleteComponent, isStandalone: true, selector: "mng-autocomplete", inputs: { dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: true, transformFunction: null }, optionsTrackProperty: { classPropertyName: "optionsTrackProperty", publicName: "optionsTrackProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsValuePropertyInit: { classPropertyName: "optionsValuePropertyInit", publicName: "optionsValueProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelPropertyInit: { classPropertyName: "optionsLabelPropertyInit", publicName: "optionsLabelProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelTranslate: { classPropertyName: "optionsLabelTranslate", publicName: "optionsLabelTranslate", isSignal: true, isRequired: false, transformFunction: null }, inlineSearch: { classPropertyName: "inlineSearch", publicName: "inlineSearch", isSignal: true, isRequired: false, transformFunction: null }, openOnFocus: { classPropertyName: "openOnFocus", publicName: "openOnFocus", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, dropdownClassName: { classPropertyName: "dropdownClassName", publicName: "dropdownClassName", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, autoClear: { classPropertyName: "autoClear", publicName: "autoClear", isSignal: true, isRequired: false, transformFunction: null }, selectFirst: { classPropertyName: "selectFirst", publicName: "selectFirst", isSignal: true, isRequired: false, transformFunction: null }, searchTrim: { classPropertyName: "searchTrim", publicName: "searchTrim", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", blur: "blur" }, providers: [AUTOCOMPLETE_VALUE_ACCESSOR], ngImport: i0, template: "<p-autoComplete\n [ngModel]=\"ngModelValue()\"\n [placeholder]=\"placeholder()\"\n [dropdown]=\"true\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [suggestions]=\"suggestions()\"\n [multiple]=\"multiselect()\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [minLength]=\"openOnFocus() ? 0 : 1\"\n [showClear]=\"showClear()\"\n [forceSelection]=\"autoClear()\"\n [disabled]=\"disabled()\"\n [completeOnFocus]=\"openOnFocus()\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n (onFocus)=\"onFocus($event)\"\n (onBlur)=\"onBlur($event)\"\n (onClear)=\"onClear()\"\n (onShow)=\"onShow()\"\n (onHide)=\"onHide()\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n", dependencies: [{ kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i1.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "variant"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
401
401
  }
402
402
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: AutocompleteComponent, decorators: [{
403
403
  type: Component,
@@ -409,16 +409,23 @@ const DATE_RANGE_VALUE_ACCESSOR = {
409
409
  useExisting: forwardRef(() => DateRangeComponent),
410
410
  multi: true
411
411
  };
412
+ const DATE_RANGE_VALIDATOR = {
413
+ provide: NG_VALIDATORS,
414
+ useExisting: forwardRef(() => DateRangeComponent),
415
+ multi: true
416
+ };
412
417
  class DateRangeComponent {
413
418
  constructor() {
414
419
  this.formBuilder = inject(FormBuilder);
415
420
  this.injector = inject(Injector);
416
421
  this.destroyRef = inject(DestroyRef);
422
+ this.cdr = inject(ChangeDetectorRef);
417
423
  this.placeholder = input();
418
424
  this.showTime = input(false);
419
425
  this.showSeconds = input(false);
420
426
  this.dateFormat = input();
421
427
  this.className = input();
428
+ this.required = input(false, { transform: booleanAttribute });
422
429
  this.disabled = input(false, {
423
430
  transform: booleanAttribute
424
431
  });
@@ -426,6 +433,8 @@ class DateRangeComponent {
426
433
  this.onChangeFn = () => { };
427
434
  // eslint-disable-next-line @typescript-eslint/no-empty-function
428
435
  this.onTouchedFn = () => { };
436
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
437
+ this.onValidatorChangeFn = () => { };
429
438
  }
430
439
  get fromCtrl() {
431
440
  return this.fromToFormControl.get('from');
@@ -438,9 +447,9 @@ class DateRangeComponent {
438
447
  }
439
448
  ngOnInit() {
440
449
  this.fromToFormControl = this.formBuilder.group({
441
- from: [],
442
- to: [],
443
- dateRange: []
450
+ from: [null, Validators.required],
451
+ to: [null, Validators.required],
452
+ dateRange: [null, Validators.required]
444
453
  });
445
454
  effect(() => {
446
455
  this.setDisabledState(this.disabled());
@@ -455,6 +464,9 @@ class DateRangeComponent {
455
464
  registerOnTouched(fn) {
456
465
  this.onTouchedFn = fn;
457
466
  }
467
+ registerOnValidatorChange(fn) {
468
+ this.onValidatorChangeFn = fn;
469
+ }
458
470
  setDisabledState(isDisabled) {
459
471
  if (isDisabled && this.fromToFormControl?.enabled) {
460
472
  this.fromToFormControl.disable();
@@ -481,15 +493,34 @@ class DateRangeComponent {
481
493
  startDate = new Date(obj);
482
494
  }
483
495
  if (this.showTime()) {
484
- this.fromCtrl.setValue(startDate);
485
- this.toCtrl.setValue(endDate);
496
+ this.fromCtrl.setValue(startDate, { emitEvent: false });
497
+ this.toCtrl.setValue(endDate, { emitEvent: false });
486
498
  }
487
499
  else if (startDate || endDate) {
488
- this.dateRangeCtrl.setValue([startDate, endDate]);
500
+ this.dateRangeCtrl.setValue([startDate, endDate], { emitEvent: false });
501
+ }
502
+ else {
503
+ this.dateRangeCtrl.setValue(null, { emitEvent: false });
504
+ }
505
+ }
506
+ validate() {
507
+ if (!this.required())
508
+ return null;
509
+ if (this.showTime()) {
510
+ if (this.fromCtrl.hasError('required') || this.toCtrl.hasError('required')) {
511
+ return {
512
+ required: true
513
+ };
514
+ }
489
515
  }
490
516
  else {
491
- this.dateRangeCtrl.setValue(null);
517
+ if (this.dateRangeCtrl.hasError('required')) {
518
+ return {
519
+ required: true
520
+ };
521
+ }
492
522
  }
523
+ return null;
493
524
  }
494
525
  onValueChange() {
495
526
  if (this.showTime()) {
@@ -503,11 +534,11 @@ class DateRangeComponent {
503
534
  }
504
535
  }
505
536
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: DateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
506
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: DateRangeComponent, isStandalone: true, selector: "mng-date-range", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "className()" } }, providers: [DATE_RANGE_VALUE_ACCESSOR], ngImport: i0, template: "@if (showTime()) {\n <div class=\"flex gap-2\">\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"fromCtrl\"\n [maxDate]=\"toCtrl.value\"\n [placeholder]=\"placeholder()\"\n [dateFormat]=\"dateFormat()\"\n [showTime]=\"true\"\n [showSeconds]=\"showSeconds()\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\"></p-calendar>\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"toCtrl\"\n [minDate]=\"fromCtrl.value\"\n [placeholder]=\"placeholder()\"\n [dateFormat]=\"dateFormat()\"\n [showTime]=\"true\"\n [showSeconds]=\"showSeconds()\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\"></p-calendar>\n </div>\n} @else {\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"dateRangeCtrl\"\n [placeholder]=\"placeholder()\"\n [dateFormat]=\"dateFormat()\"\n selectionMode=\"range\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\"></p-calendar>\n}\n", dependencies: [{ kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i1$1.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepYearPicker", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
537
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: DateRangeComponent, isStandalone: true, selector: "mng-date-range", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "className()" } }, providers: [DATE_RANGE_VALUE_ACCESSOR, DATE_RANGE_VALIDATOR], ngImport: i0, template: "@if (showTime()) {\n <div class=\"flex gap-2\">\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"fromCtrl\"\n [maxDate]=\"toCtrl.value\"\n [placeholder]=\"placeholder()\"\n [dateFormat]=\"dateFormat()\"\n [showTime]=\"true\"\n [showSeconds]=\"showSeconds()\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\"></p-calendar>\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"toCtrl\"\n [minDate]=\"fromCtrl.value\"\n [placeholder]=\"placeholder()\"\n [dateFormat]=\"dateFormat()\"\n [showTime]=\"true\"\n [showSeconds]=\"showSeconds()\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\"></p-calendar>\n </div>\n} @else {\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"dateRangeCtrl\"\n [placeholder]=\"placeholder()\"\n [dateFormat]=\"dateFormat()\"\n selectionMode=\"range\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\"></p-calendar>\n}\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i2$1.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepYearPicker", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
507
538
  }
508
539
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: DateRangeComponent, decorators: [{
509
540
  type: Component,
510
- args: [{ standalone: true, selector: 'mng-date-range', providers: [DATE_RANGE_VALUE_ACCESSOR], imports: [CalendarModule, ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
541
+ args: [{ standalone: true, selector: 'mng-date-range', providers: [DATE_RANGE_VALUE_ACCESSOR, DATE_RANGE_VALIDATOR], imports: [FormsModule, CalendarModule, ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
511
542
  '[class]': 'className()'
512
543
  }, template: "@if (showTime()) {\n <div class=\"flex gap-2\">\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"fromCtrl\"\n [maxDate]=\"toCtrl.value\"\n [placeholder]=\"placeholder()\"\n [dateFormat]=\"dateFormat()\"\n [showTime]=\"true\"\n [showSeconds]=\"showSeconds()\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\"></p-calendar>\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"toCtrl\"\n [minDate]=\"fromCtrl.value\"\n [placeholder]=\"placeholder()\"\n [dateFormat]=\"dateFormat()\"\n [showTime]=\"true\"\n [showSeconds]=\"showSeconds()\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\"></p-calendar>\n </div>\n} @else {\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"dateRangeCtrl\"\n [placeholder]=\"placeholder()\"\n [dateFormat]=\"dateFormat()\"\n selectionMode=\"range\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\"></p-calendar>\n}\n" }]
513
544
  }] });
@@ -542,6 +573,7 @@ class DropdownComponent {
542
573
  this.changeValueOnBlur = input(false, { transform: booleanAttribute });
543
574
  this.loadingInput = input(false, { alias: 'loading', transform: booleanAttribute });
544
575
  this.disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });
576
+ this.appendTo = input('body');
545
577
  this.valueChange = output();
546
578
  this.blur = output();
547
579
  this.primeDropdown = viewChild(Dropdown);
@@ -593,9 +625,30 @@ class DropdownComponent {
593
625
  effect(() => {
594
626
  this._value = this.ngModelValue();
595
627
  });
596
- }
597
- ngOnInit() {
598
- this.setDataProviderAndOptions();
628
+ combineLatest([toObservable$1(this.dataProvider), toObservable$1(this.options)])
629
+ .pipe(tap(() => this._loading.set(true)), switchMap(([dataProvider, options]) => {
630
+ if (dataProvider) {
631
+ this.dataProviderService = dataProvider.serviceType ? this.injector.get(dataProvider.serviceType) : null;
632
+ return toObservable(dataProvider.lookup({ limit: 50 }, this.dataProviderService));
633
+ }
634
+ else {
635
+ return of(options ?? []);
636
+ }
637
+ }), switchMap(items => this.transformItems(items)), takeUntilDestroyed())
638
+ .subscribe({
639
+ next: res => {
640
+ this.items.set(res);
641
+ this._loading.set(false);
642
+ this.selectFirstItem();
643
+ this.adjustValueOnItemsValuePropertyTypeMismatch();
644
+ },
645
+ error: err => {
646
+ this.items.set([]);
647
+ this._loading.set(false);
648
+ const error = fromSubscribeError(err, 'DropdownComponentError');
649
+ this.logger.log(error, getErrorLogLevel(error));
650
+ }
651
+ });
599
652
  }
600
653
  registerOnChange(fn) {
601
654
  this.onChangeFn = fn;
@@ -655,76 +708,6 @@ class DropdownComponent {
655
708
  this.propagateValueChange(primeMultiselect.value);
656
709
  }
657
710
  }
658
- setDataProviderAndOptions() {
659
- const dataProvider = this.dataProvider();
660
- const options = this.options();
661
- if (dataProvider) {
662
- this._loading.set(true);
663
- this.dataProviderService = dataProvider.serviceType ? this.injector.get(dataProvider.serviceType) : null;
664
- toObservable(dataProvider.lookup({ limit: 50 }, this.dataProviderService))
665
- .pipe(switchMap(items => {
666
- if (this.optionsLabelTranslate()) {
667
- const translationKeys = items.map(item => (typeof item === 'object' && this.optionsLabelPropertyInit()
668
- ? item[this.optionsLabelPropertyInit()]
669
- : item));
670
- if (translationKeys.length === 0) {
671
- return of([]);
672
- }
673
- return this.translate.stream(translationKeys).pipe(map(translations => items.map(item => {
674
- if (typeof item === 'object' && this.optionsLabelPropertyInit()) {
675
- const label = item[this.optionsLabelPropertyInit()];
676
- const translation = translations[label];
677
- if (translation) {
678
- return { ...item, [this.optionsLabelProperty()]: translation };
679
- }
680
- return { ...item };
681
- }
682
- else {
683
- const translation = translations[item];
684
- return {
685
- [this.optionsLabelProperty()]: translation ?? item,
686
- [this.optionsValueProperty()]: item
687
- };
688
- }
689
- })));
690
- }
691
- else {
692
- return of(items);
693
- }
694
- }), takeUntilDestroyed(this.destroyRef))
695
- .subscribe({
696
- next: res => {
697
- this.items.set(res);
698
- this._loading.set(false);
699
- this.selectFirstItem();
700
- this.adjustValueOnItemsValuePropertyTypeMismatch();
701
- },
702
- error: err => {
703
- this._loading.set(false);
704
- const error = fromSubscribeError(err, 'DropdownComponentError');
705
- this.logger.log(error, getErrorLogLevel(error));
706
- }
707
- });
708
- }
709
- else {
710
- toObservable(options ?? [])
711
- .pipe(takeUntilDestroyed(this.destroyRef))
712
- .subscribe({
713
- next: qr => {
714
- this.items.set(qr);
715
- this._loading.set(false);
716
- this.selectFirstItem();
717
- this.adjustValueOnItemsValuePropertyTypeMismatch();
718
- },
719
- error: err => {
720
- this.items.set([]);
721
- this._loading.set(false);
722
- const error = fromSubscribeError(err, 'DropdownComponentError');
723
- this.logger.log(error, getErrorLogLevel(error));
724
- }
725
- });
726
- }
727
- }
728
711
  selectFirstItem() {
729
712
  if (this.firstTimeSettingItems && this.items().length > 0 && this.selectFirstItemInput() && !this._value) {
730
713
  const optionsValueProperty = this.optionsValueProperty();
@@ -734,24 +717,57 @@ class DropdownComponent {
734
717
  this.propagateValueChange(value);
735
718
  }
736
719
  }
720
+ transformItems(items) {
721
+ if (this.optionsLabelTranslate()) {
722
+ const translationKeys = items.map(item => (typeof item === 'object' && this.optionsLabelPropertyInit() ? item[this.optionsLabelPropertyInit()] : item));
723
+ if (translationKeys.length === 0) {
724
+ return of([]);
725
+ }
726
+ return this.translate.stream(translationKeys).pipe(map$1(translations => items.map(item => {
727
+ if (typeof item === 'object' && this.optionsLabelPropertyInit()) {
728
+ const label = item[this.optionsLabelPropertyInit()];
729
+ const translation = translations[label];
730
+ if (translation) {
731
+ return { ...item, [this.optionsLabelProperty()]: translation };
732
+ }
733
+ return { ...item };
734
+ }
735
+ else {
736
+ const translation = translations[item];
737
+ return {
738
+ [this.optionsLabelProperty()]: translation ?? item,
739
+ [this.optionsValueProperty()]: item
740
+ };
741
+ }
742
+ })));
743
+ }
744
+ else {
745
+ return of(items);
746
+ }
747
+ }
737
748
  adjustValueOnItemsValuePropertyTypeMismatch(setNgModelValue = false) {
738
749
  const optionsValueProp = this.optionsValueProperty();
739
- if (optionsValueProp &&
740
- this._value &&
741
- this.items().length > 0 &&
742
- this.items()[0][optionsValueProp] != null &&
743
- typeof this.items()[0][optionsValueProp] !== typeof this._value) {
744
- // types dont match, search and compare by string
745
- const selectedOption = this.items().find(i => i[optionsValueProp] != null && i[optionsValueProp].toString() === this._value.toString());
746
- if (selectedOption) {
747
- this.ngModelValue.set(selectedOption[optionsValueProp]);
750
+ if (optionsValueProp && this._value != null && this.items().length > 0 && this.items()[0][optionsValueProp] != null) {
751
+ if (Array.isArray(this._value)) {
752
+ if (this._value.length > 0 && typeof this.items()[0][optionsValueProp] !== typeof this._value[0]) {
753
+ const stringValues = this._value.map(v => v.toString());
754
+ const selectedOptions = this.items().filter(i => i[optionsValueProp] != null && stringValues.includes(i[optionsValueProp].toString()));
755
+ if (selectedOptions.length > 0) {
756
+ this.ngModelValue.set(selectedOptions.map(i => i[optionsValueProp]));
757
+ return;
758
+ }
759
+ }
748
760
  }
749
- else if (setNgModelValue) {
750
- // force write to ngModelValue anyway
751
- this.ngModelValue.set(this._value);
761
+ else if (typeof this.items()[0][optionsValueProp] !== typeof this._value) {
762
+ // types dont match, search and compare by string
763
+ const selectedOption = this.items().find(i => i[optionsValueProp] != null && i[optionsValueProp].toString() === this._value.toString());
764
+ if (selectedOption) {
765
+ this.ngModelValue.set(selectedOption[optionsValueProp]);
766
+ return;
767
+ }
752
768
  }
753
769
  }
754
- else if (setNgModelValue) {
770
+ if (setNgModelValue) {
755
771
  // force write to ngModelValue anyway
756
772
  this.ngModelValue.set(this._value);
757
773
  }
@@ -762,11 +778,11 @@ class DropdownComponent {
762
778
  this.valueChange.emit(value);
763
779
  }
764
780
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
765
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: DropdownComponent, isStandalone: true, selector: "mng-dropdown", inputs: { dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionsTrackProperty: { classPropertyName: "optionsTrackProperty", publicName: "optionsTrackProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelPropertyInit: { classPropertyName: "optionsLabelPropertyInit", publicName: "optionsLabelProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelTranslate: { classPropertyName: "optionsLabelTranslate", publicName: "optionsLabelTranslate", isSignal: true, isRequired: false, transformFunction: null }, optionsValuePropertyInput: { classPropertyName: "optionsValuePropertyInput", publicName: "optionsValueProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsDisabledProperty: { classPropertyName: "optionsDisabledProperty", publicName: "optionsDisabledProperty", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, selectFirstItemInput: { classPropertyName: "selectFirstItemInput", publicName: "selectFirstItem", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, dropdownClassName: { classPropertyName: "dropdownClassName", publicName: "dropdownClassName", isSignal: true, isRequired: false, transformFunction: null }, changeValueOnBlur: { classPropertyName: "changeValueOnBlur", publicName: "changeValueOnBlur", isSignal: true, isRequired: false, transformFunction: null }, loadingInput: { classPropertyName: "loadingInput", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", blur: "blur" }, providers: [DROPDOWN_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeDropdown", first: true, predicate: Dropdown, descendants: true, isSignal: true }, { propertyName: "primeMultiselect", first: true, predicate: MultiSelect, descendants: true, isSignal: true }], ngImport: i0, template: "@if (!multiselect()) {\n <p-dropdown\n [ngModel]=\"ngModelValue()\"\n [placeholder]=\"placeholder()\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [optionValue]=\"optionsValueProperty()\"\n [optionDisabled]=\"optionsDisabledProperty()\"\n [options]=\"items()\"\n [showClear]=\"showClear()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [disabled]=\"disabled()\"\n (onBlur)=\"onDropdownBlur($event)\"\n (onChange)=\"onDropdownChange($event)\"\n (onShow)=\"onDropdownPanelShow()\"\n (onHide)=\"onDropdownPanelHide()\"\n [dropdownIcon]=\"loading() ? 'pi pi-spinner pi-spin' : 'pi pi-chevron-down'\"\n appendTo=\"body\">\n </p-dropdown>\n} @else {\n <p-multiSelect\n [ngModel]=\"ngModelValue()\"\n [maxSelectedLabels]=\"1\"\n [selectedItemsLabel]=\"'mngDropdown.multiselectOverMaxDisplayLimit' | translate\"\n [placeholder]=\"placeholder()\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [optionValue]=\"optionsValueProperty()\"\n [optionDisabled]=\"optionsDisabledProperty()\"\n [options]=\"items()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [filter]=\"true\"\n [showToggleAll]=\"false\"\n [disabled]=\"disabled()\"\n (onChange)=\"onMultiselectChange($event)\"\n (onPanelHide)=\"onMultiselectPanelHide()\"\n (onBlur)=\"onMultiselectBlur($event)\"\n appendTo=\"body\">\n </p-multiSelect>\n}\n", dependencies: [{ kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i1$2.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i2$1.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
781
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: DropdownComponent, isStandalone: true, selector: "mng-dropdown", inputs: { dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionsTrackProperty: { classPropertyName: "optionsTrackProperty", publicName: "optionsTrackProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelPropertyInit: { classPropertyName: "optionsLabelPropertyInit", publicName: "optionsLabelProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelTranslate: { classPropertyName: "optionsLabelTranslate", publicName: "optionsLabelTranslate", isSignal: true, isRequired: false, transformFunction: null }, optionsValuePropertyInput: { classPropertyName: "optionsValuePropertyInput", publicName: "optionsValueProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsDisabledProperty: { classPropertyName: "optionsDisabledProperty", publicName: "optionsDisabledProperty", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, selectFirstItemInput: { classPropertyName: "selectFirstItemInput", publicName: "selectFirstItem", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, dropdownClassName: { classPropertyName: "dropdownClassName", publicName: "dropdownClassName", isSignal: true, isRequired: false, transformFunction: null }, changeValueOnBlur: { classPropertyName: "changeValueOnBlur", publicName: "changeValueOnBlur", isSignal: true, isRequired: false, transformFunction: null }, loadingInput: { classPropertyName: "loadingInput", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", blur: "blur" }, providers: [DROPDOWN_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeDropdown", first: true, predicate: Dropdown, descendants: true, isSignal: true }, { propertyName: "primeMultiselect", first: true, predicate: MultiSelect, descendants: true, isSignal: true }], ngImport: i0, template: "@if (!multiselect()) {\n <p-dropdown\n [ngModel]=\"ngModelValue()\"\n [placeholder]=\"placeholder()\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [optionValue]=\"optionsValueProperty()\"\n [optionDisabled]=\"optionsDisabledProperty()\"\n [options]=\"items()\"\n [showClear]=\"showClear()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [disabled]=\"disabled()\"\n (onBlur)=\"onDropdownBlur($event)\"\n (onChange)=\"onDropdownChange($event)\"\n (onShow)=\"onDropdownPanelShow()\"\n (onHide)=\"onDropdownPanelHide()\"\n [dropdownIcon]=\"loading() ? 'pi pi-spinner pi-spin' : 'pi pi-chevron-down'\"\n [appendTo]=\"appendTo()\">\n </p-dropdown>\n} @else {\n <p-multiSelect\n [ngModel]=\"ngModelValue()\"\n [maxSelectedLabels]=\"1\"\n [selectedItemsLabel]=\"'mngDropdown.multiselectOverMaxDisplayLimit' | translate\"\n [placeholder]=\"placeholder()\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [optionValue]=\"optionsValueProperty()\"\n [optionDisabled]=\"optionsDisabledProperty()\"\n [options]=\"items()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [filter]=\"true\"\n [showToggleAll]=\"false\"\n [disabled]=\"disabled()\"\n (onChange)=\"onMultiselectChange($event)\"\n (onPanelHide)=\"onMultiselectPanelHide()\"\n (onBlur)=\"onMultiselectBlur($event)\"\n appendTo=\"body\">\n </p-multiSelect>\n}\n", dependencies: [{ kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i1$2.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i2$2.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
766
782
  }
767
783
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: DropdownComponent, decorators: [{
768
784
  type: Component,
769
- args: [{ standalone: true, selector: 'mng-dropdown', providers: [DROPDOWN_VALUE_ACCESSOR], imports: [DropdownModule, MultiSelectModule, TranslateModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!multiselect()) {\n <p-dropdown\n [ngModel]=\"ngModelValue()\"\n [placeholder]=\"placeholder()\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [optionValue]=\"optionsValueProperty()\"\n [optionDisabled]=\"optionsDisabledProperty()\"\n [options]=\"items()\"\n [showClear]=\"showClear()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [disabled]=\"disabled()\"\n (onBlur)=\"onDropdownBlur($event)\"\n (onChange)=\"onDropdownChange($event)\"\n (onShow)=\"onDropdownPanelShow()\"\n (onHide)=\"onDropdownPanelHide()\"\n [dropdownIcon]=\"loading() ? 'pi pi-spinner pi-spin' : 'pi pi-chevron-down'\"\n appendTo=\"body\">\n </p-dropdown>\n} @else {\n <p-multiSelect\n [ngModel]=\"ngModelValue()\"\n [maxSelectedLabels]=\"1\"\n [selectedItemsLabel]=\"'mngDropdown.multiselectOverMaxDisplayLimit' | translate\"\n [placeholder]=\"placeholder()\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [optionValue]=\"optionsValueProperty()\"\n [optionDisabled]=\"optionsDisabledProperty()\"\n [options]=\"items()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [filter]=\"true\"\n [showToggleAll]=\"false\"\n [disabled]=\"disabled()\"\n (onChange)=\"onMultiselectChange($event)\"\n (onPanelHide)=\"onMultiselectPanelHide()\"\n (onBlur)=\"onMultiselectBlur($event)\"\n appendTo=\"body\">\n </p-multiSelect>\n}\n" }]
785
+ args: [{ standalone: true, selector: 'mng-dropdown', providers: [DROPDOWN_VALUE_ACCESSOR], imports: [DropdownModule, MultiSelectModule, TranslateModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!multiselect()) {\n <p-dropdown\n [ngModel]=\"ngModelValue()\"\n [placeholder]=\"placeholder()\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [optionValue]=\"optionsValueProperty()\"\n [optionDisabled]=\"optionsDisabledProperty()\"\n [options]=\"items()\"\n [showClear]=\"showClear()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [disabled]=\"disabled()\"\n (onBlur)=\"onDropdownBlur($event)\"\n (onChange)=\"onDropdownChange($event)\"\n (onShow)=\"onDropdownPanelShow()\"\n (onHide)=\"onDropdownPanelHide()\"\n [dropdownIcon]=\"loading() ? 'pi pi-spinner pi-spin' : 'pi pi-chevron-down'\"\n [appendTo]=\"appendTo()\">\n </p-dropdown>\n} @else {\n <p-multiSelect\n [ngModel]=\"ngModelValue()\"\n [maxSelectedLabels]=\"1\"\n [selectedItemsLabel]=\"'mngDropdown.multiselectOverMaxDisplayLimit' | translate\"\n [placeholder]=\"placeholder()\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [optionValue]=\"optionsValueProperty()\"\n [optionDisabled]=\"optionsDisabledProperty()\"\n [options]=\"items()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [filter]=\"true\"\n [showToggleAll]=\"false\"\n [disabled]=\"disabled()\"\n (onChange)=\"onMultiselectChange($event)\"\n (onPanelHide)=\"onMultiselectPanelHide()\"\n (onBlur)=\"onMultiselectBlur($event)\"\n appendTo=\"body\">\n </p-multiSelect>\n}\n" }]
770
786
  }], ctorParameters: () => [] });
771
787
 
772
788
  const NUMBER_RANGE_VALUE_ACCESSOR = {
@@ -774,6 +790,11 @@ const NUMBER_RANGE_VALUE_ACCESSOR = {
774
790
  useExisting: forwardRef(() => NumberRangeComponent),
775
791
  multi: true
776
792
  };
793
+ const NUMBER_RANGE_VALIDATOR = {
794
+ provide: NG_VALIDATORS,
795
+ useExisting: forwardRef(() => NumberRangeComponent),
796
+ multi: true
797
+ };
777
798
  class NumberRangeComponent {
778
799
  get fromCtrl() {
779
800
  return this.fromToFormControl.get('from');
@@ -783,23 +804,26 @@ class NumberRangeComponent {
783
804
  }
784
805
  constructor() {
785
806
  this.formBuilder = inject(FormBuilder);
807
+ this.cdr = inject(ChangeDetectorRef);
786
808
  this.placeholder = input();
787
809
  this.useGrouping = input(true);
788
810
  this.minFractionDigits = input();
789
811
  this.maxFractionDigits = input();
812
+ this.required = input(false, { transform: booleanAttribute });
790
813
  this.disabled = input(false, {
791
814
  transform: booleanAttribute
792
815
  });
793
- this.className = input();
794
816
  this.keyDown = output();
795
817
  this.fromToFormControl = this.formBuilder.group({
796
- from: [],
797
- to: []
818
+ from: [null, Validators.required],
819
+ to: [null, Validators.required]
798
820
  });
799
821
  // eslint-disable-next-line @typescript-eslint/no-empty-function
800
822
  this.onChangeFn = () => { };
801
823
  // eslint-disable-next-line @typescript-eslint/no-empty-function
802
824
  this.onTouchedFn = () => { };
825
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
826
+ this.onValidatorChangeFn = () => { };
803
827
  effect(() => {
804
828
  this.setDisabledState(this.disabled());
805
829
  });
@@ -835,8 +859,18 @@ class NumberRangeComponent {
835
859
  else if (typeof obj === 'string' || typeof obj === 'number') {
836
860
  start = this.toNumber(obj);
837
861
  }
838
- this.fromCtrl.setValue(start);
839
- this.toCtrl.setValue(end);
862
+ this.fromCtrl.setValue(start, { emitEvent: false });
863
+ this.toCtrl.setValue(end, { emitEvent: false });
864
+ }
865
+ validate() {
866
+ if (!this.required())
867
+ return null;
868
+ if (this.fromCtrl.hasError('required') || this.toCtrl.hasError('required')) {
869
+ return {
870
+ required: true
871
+ };
872
+ }
873
+ return null;
840
874
  }
841
875
  onKeyDown(event) {
842
876
  this.keyDown.emit(event);
@@ -858,13 +892,11 @@ class NumberRangeComponent {
858
892
  this.onChangeFn([fromDate, toDate]);
859
893
  }
860
894
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: NumberRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
861
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.0.5", type: NumberRangeComponent, isStandalone: true, selector: "mng-number-range", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, useGrouping: { classPropertyName: "useGrouping", publicName: "useGrouping", isSignal: true, isRequired: false, transformFunction: null }, minFractionDigits: { classPropertyName: "minFractionDigits", publicName: "minFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, maxFractionDigits: { classPropertyName: "maxFractionDigits", publicName: "maxFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { keyDown: "keyDown" }, host: { properties: { "class": "className()" } }, providers: [NUMBER_RANGE_VALUE_ACCESSOR], ngImport: i0, template: "<div class=\"flex gap-2\">\n <p-inputNumber\n [formControl]=\"fromCtrl\"\n [placeholder]=\"placeholder()\"\n [useGrouping]=\"useGrouping()\"\n [minFractionDigits]=\"minFractionDigits()\"\n [maxFractionDigits]=\"maxFractionDigits()\"\n [max]=\"toCtrl.value\"\n (onKeyDown)=\"onKeyDown($event)\"\n (onBlur)=\"onBlur()\" />\n <p-inputNumber\n [formControl]=\"toCtrl\"\n [placeholder]=\"placeholder()\"\n [useGrouping]=\"useGrouping()\"\n [minFractionDigits]=\"minFractionDigits()\"\n [maxFractionDigits]=\"maxFractionDigits()\"\n [min]=\"fromCtrl.value\"\n (onKeyDown)=\"onKeyDown($event)\"\n (onBlur)=\"onBlur()\" />\n</div>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i2$2.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
895
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.0.5", type: NumberRangeComponent, isStandalone: true, selector: "mng-number-range", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, useGrouping: { classPropertyName: "useGrouping", publicName: "useGrouping", isSignal: true, isRequired: false, transformFunction: null }, minFractionDigits: { classPropertyName: "minFractionDigits", publicName: "minFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, maxFractionDigits: { classPropertyName: "maxFractionDigits", publicName: "maxFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { keyDown: "keyDown" }, providers: [NUMBER_RANGE_VALUE_ACCESSOR, NUMBER_RANGE_VALIDATOR], ngImport: i0, template: "<div class=\"flex gap-2\">\n <p-inputNumber\n [formControl]=\"fromCtrl\"\n [placeholder]=\"placeholder()\"\n [useGrouping]=\"useGrouping()\"\n [minFractionDigits]=\"minFractionDigits()\"\n [maxFractionDigits]=\"maxFractionDigits()\"\n [max]=\"toCtrl.value\"\n (onKeyDown)=\"onKeyDown($event)\"\n (onBlur)=\"onBlur()\" />\n <p-inputNumber\n [formControl]=\"toCtrl\"\n [placeholder]=\"placeholder()\"\n [useGrouping]=\"useGrouping()\"\n [minFractionDigits]=\"minFractionDigits()\"\n [maxFractionDigits]=\"maxFractionDigits()\"\n [min]=\"fromCtrl.value\"\n (onKeyDown)=\"onKeyDown($event)\"\n (onBlur)=\"onBlur()\" />\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i2$3.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
862
896
  }
863
897
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: NumberRangeComponent, decorators: [{
864
898
  type: Component,
865
- args: [{ standalone: true, selector: 'mng-number-range', providers: [NUMBER_RANGE_VALUE_ACCESSOR], imports: [ReactiveFormsModule, InputNumberModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
866
- '[class]': 'className()'
867
- }, template: "<div class=\"flex gap-2\">\n <p-inputNumber\n [formControl]=\"fromCtrl\"\n [placeholder]=\"placeholder()\"\n [useGrouping]=\"useGrouping()\"\n [minFractionDigits]=\"minFractionDigits()\"\n [maxFractionDigits]=\"maxFractionDigits()\"\n [max]=\"toCtrl.value\"\n (onKeyDown)=\"onKeyDown($event)\"\n (onBlur)=\"onBlur()\" />\n <p-inputNumber\n [formControl]=\"toCtrl\"\n [placeholder]=\"placeholder()\"\n [useGrouping]=\"useGrouping()\"\n [minFractionDigits]=\"minFractionDigits()\"\n [maxFractionDigits]=\"maxFractionDigits()\"\n [min]=\"fromCtrl.value\"\n (onKeyDown)=\"onKeyDown($event)\"\n (onBlur)=\"onBlur()\" />\n</div>\n" }]
899
+ args: [{ standalone: true, selector: 'mng-number-range', providers: [NUMBER_RANGE_VALUE_ACCESSOR, NUMBER_RANGE_VALIDATOR], imports: [FormsModule, ReactiveFormsModule, InputNumberModule, NgClass], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex gap-2\">\n <p-inputNumber\n [formControl]=\"fromCtrl\"\n [placeholder]=\"placeholder()\"\n [useGrouping]=\"useGrouping()\"\n [minFractionDigits]=\"minFractionDigits()\"\n [maxFractionDigits]=\"maxFractionDigits()\"\n [max]=\"toCtrl.value\"\n (onKeyDown)=\"onKeyDown($event)\"\n (onBlur)=\"onBlur()\" />\n <p-inputNumber\n [formControl]=\"toCtrl\"\n [placeholder]=\"placeholder()\"\n [useGrouping]=\"useGrouping()\"\n [minFractionDigits]=\"minFractionDigits()\"\n [maxFractionDigits]=\"maxFractionDigits()\"\n [min]=\"fromCtrl.value\"\n (onKeyDown)=\"onKeyDown($event)\"\n (onBlur)=\"onBlur()\" />\n</div>\n" }]
868
900
  }], ctorParameters: () => [] });
869
901
 
870
902
  class InputTrimDirective {
@@ -920,5 +952,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImpor
920
952
  * Generated bundle index. Do not edit.
921
953
  */
922
954
 
923
- export { AUTOCOMPLETE_VALUE_ACCESSOR, AutocompleteComponent, DATE_RANGE_VALUE_ACCESSOR, DROPDOWN_VALUE_ACCESSOR, DateRangeComponent, DropdownComponent, InputTrimDirective, NUMBER_RANGE_VALUE_ACCESSOR, NumberRangeComponent };
955
+ export { AUTOCOMPLETE_VALUE_ACCESSOR, AutocompleteComponent, DATE_RANGE_VALIDATOR, DATE_RANGE_VALUE_ACCESSOR, DROPDOWN_VALUE_ACCESSOR, DateRangeComponent, DropdownComponent, InputTrimDirective, NUMBER_RANGE_VALIDATOR, NUMBER_RANGE_VALUE_ACCESSOR, NumberRangeComponent };
924
956
  //# sourceMappingURL=mediusinc-mng-commons-form.mjs.map