@mediusinc/mng-commons 5.4.0-rc.5 → 5.4.0-rc.7

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 (45) hide show
  1. package/core/data-list/data-list-params-helpers.d.ts +12 -2
  2. package/esm2022/core/data-list/data-list-params-helpers.mjs +14 -8
  3. package/esm2022/filter/descriptors/filter-generic.descriptor.mjs +11 -1
  4. package/esm2022/form/components/autocomplete/autocomplete.component.mjs +10 -5
  5. package/esm2022/form/components/dropdown/dropdown.component.mjs +67 -99
  6. package/esm2022/table/api/descriptors/table.descriptor.mjs +6 -2
  7. package/esm2022/table/components/filter/filter-form/filter-form.component.mjs +11 -11
  8. package/esm2022/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.mjs +4 -3
  9. package/esm2022/table/components/table/table.component.mjs +45 -9
  10. package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +4 -18
  11. package/esm2022/tableview/api/editor/descriptors/editor.descriptor.mjs +9 -1
  12. package/esm2022/tableview/api/editor/descriptors/field-group.descriptor.mjs +10 -1
  13. package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +14 -2
  14. package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +24 -5
  15. package/esm2022/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +3 -3
  16. package/esm2022/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +3 -3
  17. package/esm2022/tableview/editor/helpers/editor-formly.mjs +7 -1
  18. package/fesm2022/mediusinc-mng-commons-core.mjs +13 -7
  19. package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
  20. package/fesm2022/mediusinc-mng-commons-filter.mjs +10 -0
  21. package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
  22. package/fesm2022/mediusinc-mng-commons-form.mjs +75 -103
  23. package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
  24. package/fesm2022/mediusinc-mng-commons-table-api.mjs +5 -1
  25. package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
  26. package/fesm2022/mediusinc-mng-commons-table.mjs +57 -20
  27. package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
  28. package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +30 -1
  29. package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
  30. package/fesm2022/mediusinc-mng-commons-tableview.mjs +35 -24
  31. package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
  32. package/filter/descriptors/filter-generic.descriptor.d.ts +5 -2
  33. package/form/components/autocomplete/autocomplete.component.d.ts +1 -0
  34. package/form/components/dropdown/dropdown.component.d.ts +5 -10
  35. package/package.json +1 -1
  36. package/table/api/descriptors/table.descriptor.d.ts +1 -0
  37. package/table/components/filter/filter-form/filter-form.component.d.ts +11 -8
  38. package/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.d.ts +3 -2
  39. package/table/components/table/table.component.d.ts +6 -2
  40. package/tableview/action/components/editor/injector-context/action-editor-injector-context.component.d.ts +0 -2
  41. package/tableview/api/editor/descriptors/editor.descriptor.d.ts +3 -0
  42. package/tableview/api/editor/descriptors/field-group.descriptor.d.ts +5 -0
  43. package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +8 -0
  44. package/tableview/editor/components/editor/form-editor.component.d.ts +5 -1
  45. package/version-info.json +6 -6
@@ -652,9 +652,14 @@ class FilterGenericDescriptor {
652
652
  constructor(propertyLookupDataProvider) {
653
653
  this._propertyLookup = propertyLookupDataProvider;
654
654
  }
655
+ // must set return types explicitly due to ng-packagr bug: https://github.com/ng-packagr/ng-packagr/issues/1405
655
656
  get propertyLookup() {
656
657
  return this._propertyLookup;
657
658
  }
659
+ get propertySearch() {
660
+ return this._propertySearch;
661
+ }
662
+ // must set return types explicitly due to ng-packagr bug: https://github.com/ng-packagr/ng-packagr/issues/1405
658
663
  get valueLookup() {
659
664
  return this._valueLookup;
660
665
  }
@@ -662,8 +667,13 @@ class FilterGenericDescriptor {
662
667
  this._valueLookup = valueLookup;
663
668
  return this;
664
669
  }
670
+ withPropertySearch(search = true) {
671
+ this._propertySearch = search;
672
+ return this;
673
+ }
665
674
  copy() {
666
675
  const descriptor = new FilterGenericDescriptor(this._propertyLookup);
676
+ descriptor._propertySearch = this._propertySearch;
667
677
  descriptor._valueLookup = this._valueLookup;
668
678
  return descriptor;
669
679
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mediusinc-mng-commons-filter.mjs","sources":["../../filter/src/models/filter.model.ts","../../filter/src/descriptors/filter.descriptor.ts","../../filter/src/descriptors/filter-lookup.descriptor.ts","../../filter/src/descriptors/filter-generic.descriptor.ts","../../filter/src/index.ts","../../filter/src/mediusinc-mng-commons-filter.ts"],"sourcesContent":["export enum FilterTypeEnum {\n String,\n Number,\n Boolean,\n Date,\n Lookup,\n LookupEnum\n}\n\nexport enum FilterLookupTypeEnum {\n Dropdown,\n Autocomplete\n}\n\nexport enum FilterDisplayTypeEnum {\n Column,\n OverlayWithTag\n}\n","import {CommonsInternalError, FilterMatchModeExtendedType, IFilterDescriptor, ILookupDataProvider, LoggerService} from '@mediusinc/mng-commons/core';\nimport {InputTrimType, LookupDataProviderInst} from '@mediusinc/mng-commons/form/api';\n\nimport {FilterDisplayTypeEnum, FilterTypeEnum} from '../models/filter.model';\n\nexport type FilterDatePickerDisplayOptsType = {\n applyFromDisplayFormat?: boolean;\n format?: string;\n showTime?: boolean;\n showSeconds?: boolean;\n};\n\nexport type FilterDateValueOptsType = {\n utc?: boolean;\n noTime?: boolean;\n noTimeZone?: boolean;\n};\n\nexport type FilterDateOptsType = FilterDateValueOptsType &\n FilterDatePickerDisplayOptsType & {\n displayFormat?: string;\n };\n\nexport type FilterNumberFractionOptsType = {\n minFractionDigits?: number;\n maxFractionDigits?: number;\n};\n\nexport type FilterLocaleOptsType = {\n locale?: string;\n};\n\nexport type FilterNumberOptsType = FilterNumberFractionOptsType &\n FilterLocaleOptsType & {\n displayFormat?: string;\n };\n\nexport class FilterDescriptor<FilterModel, TableModel> implements IFilterDescriptor<FilterModel, TableModel> {\n protected readonly _property: string;\n protected _showOnColumn?: string;\n\n protected _filterType = FilterTypeEnum.String;\n protected _displayType?: FilterDisplayTypeEnum;\n\n // default value\n protected _hasDefaultValue = false;\n protected _defaultMatchMode?: FilterMatchModeExtendedType;\n protected _defaultValue?: FilterModel | FilterModel[];\n protected _matchModes?: string[];\n\n // value display\n private _displayFormat?: string;\n private _displayFormatApplyToField?: boolean;\n private _locale?: string;\n\n // number filter field specific properties\n protected _numberMinFractionDigits?: number;\n protected _numberMaxFractionDigits?: number;\n protected _numberUseGrouping = true;\n\n // date filter field specific properties\n protected _datePickerFormat?: string;\n protected _datePickerShowTime?: boolean;\n protected _datePickerShowSeconds?: boolean;\n protected _dateValueNoTime?: boolean;\n protected _dateValueNoTimezone?: boolean;\n protected _dateValueUtc?: boolean;\n\n protected _placeholder?: string;\n protected _className = '';\n protected _columnClassName = '';\n protected _columnWidth: number | null = null;\n protected _columnMinWidth: number | null = null;\n protected _inputTrim?: InputTrimType;\n protected _title?: string;\n\n protected _isGenericFilter = false;\n protected _valueSuggestionProvider?: ILookupDataProvider<string, any, any, 'field'>;\n protected _dropdownClassName = '';\n\n constructor(property: string) {\n this._property = property;\n this._showOnColumn = property;\n }\n\n public get filterType() {\n return this._filterType;\n }\n\n public get showOnColumn() {\n return this._showOnColumn;\n }\n\n public get displayType() {\n return this._displayType;\n }\n\n public get hasDefaultValue() {\n return this._hasDefaultValue;\n }\n\n public get defaultValue() {\n return this._defaultValue;\n }\n\n public get defaultMatchMode() {\n return this._defaultMatchMode;\n }\n\n public get matchModes() {\n return this._matchModes;\n }\n\n public get displayFormat() {\n return this._displayFormat;\n }\n\n public get displayFormatApplyToField() {\n return this._displayFormatApplyToField;\n }\n\n public get locale() {\n return this._locale;\n }\n\n public get numberMinFractionDigits() {\n return this._numberMinFractionDigits;\n }\n\n public get numberMaxFractionDigits() {\n return this._numberMaxFractionDigits;\n }\n\n public get numberUseGrouping() {\n return this._numberUseGrouping;\n }\n\n public get datePickerFormat() {\n return this._datePickerFormat;\n }\n\n public get datePickerShowTime() {\n return this._datePickerShowTime;\n }\n\n public get datePickerShowSeconds() {\n return this._datePickerShowSeconds;\n }\n\n public get dateValueUtc() {\n return this._dateValueUtc;\n }\n\n public get dateValueNoTimezone() {\n return this._dateValueNoTimezone;\n }\n\n public get dateValueNoTime() {\n return this._dateValueNoTime;\n }\n\n public get placeholder() {\n return this._placeholder;\n }\n\n public get className() {\n return this._className;\n }\n\n public get columnClassName() {\n return this._columnClassName;\n }\n\n public get columnWidth() {\n return this._columnWidth;\n }\n\n public get columnMinWidth() {\n return this._columnMinWidth;\n }\n\n public get trimOption() {\n return this._inputTrim;\n }\n\n public get property() {\n return this._property;\n }\n\n public get title() {\n return this._title;\n }\n\n public get isGenericFilter() {\n return this._isGenericFilter;\n }\n\n public get genericValueProvider() {\n return this._valueSuggestionProvider;\n }\n\n public get dropdownClassName(): string {\n return this._dropdownClassName;\n }\n\n /**\n * Converts filter to given type.\n *\n * @param filterType Filter type.\n */\n public asFilterType(filterType: FilterTypeEnum) {\n this._filterType = filterType;\n return this;\n }\n\n /**\n * Sets the filter as a generic filter. For internal use only.\n *\n * @internal\n */\n public asGenericFilter(): this {\n this._isGenericFilter = true;\n return this;\n }\n\n /**\n * Set filter as date type.\n *\n * @param opts Additional options.\n */\n public asDate(opts?: FilterDateOptsType): this {\n this._filterType = FilterTypeEnum.Date;\n this.withDisplayFormat(opts?.displayFormat).withDatePickerDisplay(opts).withDateValue(opts);\n return this;\n }\n\n /**\n * Set filter as number type.\n *\n * @param opts Additional options.\n */\n public asNumber(opts?: FilterNumberOptsType): this {\n this._filterType = FilterTypeEnum.Number;\n this.withDisplayFormat(opts?.displayFormat).withNumberFractions(opts?.minFractionDigits, opts?.maxFractionDigits).withLocale(opts?.locale);\n return this;\n }\n\n /**\n * Shows filter on column for given property.\n *\n * @param property Column property to show filter on.\n * @param displayType Optional display type override. If not column, the filter will not be shown on column.\n */\n public withShowOnColumn(property: keyof TableModel, displayType: FilterDisplayTypeEnum | undefined = FilterDisplayTypeEnum.Column): this {\n return this.withShowOnColumnUnsafe(property as string, displayType);\n }\n\n /**\n * Shows filter on column for given property.\n *\n * This function is UNSAFE.\n *\n * @param property Column property to show filter on.\n * @param displayType Optional display type override. If not column, the filter will not be shown on column.\n */\n public withShowOnColumnUnsafe(property: string, displayType: FilterDisplayTypeEnum | undefined = FilterDisplayTypeEnum.Column): this {\n this._showOnColumn = property;\n this._displayType = displayType;\n return this;\n }\n\n /**\n * Changes display type of filter.\n *\n * @param type Display type.\n */\n public withDisplayType(type?: FilterDisplayTypeEnum): this {\n this._displayType = type;\n return this;\n }\n\n /**\n * Sets default filter value for filter.\n *\n * @param value Value for default filter.\n * @param matchMode Match mode for default filter.\n */\n public withDefaultFilter(value: FilterModel | FilterModel[] | undefined, matchMode: FilterMatchModeExtendedType): this {\n this._hasDefaultValue = true;\n this._defaultValue = value;\n this._defaultMatchMode = matchMode;\n this.validateDefaultFilter(value, matchMode);\n return this;\n }\n\n protected validateDefaultFilter(value: FilterModel | FilterModel[] | undefined, matchMode: FilterMatchModeExtendedType) {\n if (matchMode === 'between' && value != null && (!Array.isArray(value) || value.filter(v => v != null).length !== 2)) {\n throw new CommonsInternalError(`Default value for filter match mode ${matchMode} must provide exactly 2 values in array`);\n }\n if ((matchMode === 'in' || matchMode === 'notIn') && value != null && (!Array.isArray(value) || value.filter(v => v != null).length === 0)) {\n throw new CommonsInternalError(`Default value for filter match mode ${matchMode} must be array and provide at least 1 non-null value`);\n }\n if (matchMode === 'exists' || matchMode === 'doesNotExist') {\n this._defaultValue = undefined;\n }\n\n if (matchMode && this._matchModes && this._matchModes.indexOf(matchMode) < 0) {\n this._defaultMatchMode = undefined;\n LoggerService.get().debug(`WARNING: Default filter match mode '${matchMode}' could not be assigned for property ${this._property}.`);\n }\n }\n\n /**\n * Sets format for display of filter value (applies to date and number).\n *\n * @param format Format (Angular formatting rules apply).\n * @param applyToField If the format should also be applied to field on filter editing form.\n */\n public withDisplayFormat(format?: string, applyToField?: boolean): this {\n this._displayFormat = format;\n this._displayFormatApplyToField = applyToField;\n return this;\n }\n\n /**\n * Sets locale for filter.\n *\n * @param locale Locale.\n */\n public withLocale(locale?: string): this {\n this._locale = locale;\n return this;\n }\n\n /**\n * Sets fraction for number filter editing field.\n *\n * @param min Min fraction digits (i.e. digits after decimal).\n * @param max Max fraction digits (i.e. digits after decimal).\n */\n public withNumberFractions(min?: number, max?: number) {\n this._numberMinFractionDigits = min;\n this._numberMaxFractionDigits = max;\n return this;\n }\n\n /**\n * If number grouping should be used.\n *\n * @param useGrouping Enables/disbaled the feature.\n */\n public withNumberGrouping(useGrouping = true): this {\n this._numberUseGrouping = useGrouping;\n return this;\n }\n\n /**\n * Sets a data provider for autocomplete text suggestions.\n *\n * @param valueDataProvider Data provider for autocomplete.\n */\n public withGenericValueProvider(valueDataProvider: LookupDataProviderInst<string, any, any, 'field'>): this {\n if (!(this.filterType === FilterTypeEnum.String || this.filterType === FilterTypeEnum.LookupEnum)) {\n throw new CommonsInternalError('Generic value lookup can only be set for the string or lookup enum filter types.');\n }\n\n this._valueSuggestionProvider = valueDataProvider;\n return this;\n }\n\n /**\n * @deprecated Use ${withDatePickerDisplay} instead.\n */\n public withDateFormat(format?: string, showTime = false, showSeconds = false): this {\n this._datePickerFormat = format;\n this._datePickerShowTime = showTime;\n this._datePickerShowSeconds = showSeconds;\n return this;\n }\n\n /**\n * Sets date picker display options.\n *\n * @param opts Options.\n */\n public withDatePickerDisplay(opts?: FilterDatePickerDisplayOptsType): this {\n this._displayFormatApplyToField = opts?.applyFromDisplayFormat;\n this._datePickerFormat = opts?.format;\n this._datePickerShowTime = opts?.showTime;\n this._datePickerShowSeconds = opts?.showSeconds;\n return this;\n }\n\n /**\n * Sets filter date value formatting options.\n *\n * @param opts Options.\n */\n public withDateValue(opts?: FilterDateValueOptsType): this {\n this._dateValueUtc = opts?.utc;\n this._dateValueNoTimezone = opts?.noTimeZone;\n this._dateValueNoTime = opts?.noTime;\n return this;\n }\n\n /**\n * Sets placeholder for filter field.\n *\n * @param placeholder Text for placeholder.\n */\n public withPlaceholder(placeholder: string): this {\n this._placeholder = placeholder;\n return this;\n }\n\n /**\n * Sets class name for filter.\n *\n * @param className Class name.\n */\n public withClassName(className: string): this {\n this._className = className;\n return this;\n }\n\n /**\n * Sets class name for column display type.\n *\n * @param className Class name for column.\n */\n public withColumnClassName(className: string): this {\n this._columnClassName = className;\n return this;\n }\n\n /**\n * Set column width for column display type.\n *\n * @param width Relative width (in percentage) of table width:\n * @param minWidth\n */\n public withColumnWidth(width?: number, minWidth?: number): this {\n this._columnWidth = width ?? null;\n this._columnMinWidth = minWidth ?? null;\n return this;\n }\n\n /**\n * Sets input trimming for filter value field.\n *\n * @param trimOption Trim setting.\n */\n public withInputTrimming(trimOption: InputTrimType = 'both'): this {\n this._inputTrim = trimOption;\n return this;\n }\n\n /**\n * Sets range of match modes for this filter. If non provided, the defaults are applied.\n *\n * @param matchModes Match mode options.\n */\n public withMatchModes(matchModes?: Array<FilterMatchModeExtendedType>): this {\n this._matchModes = matchModes;\n return this;\n }\n\n /**\n * Filter title. If non provided, the defaults are applied.\n *\n * @param title Title for the field.\n */\n public withTitle(title: string): this {\n this._title = title;\n return this;\n }\n\n public withDropdownClassName(dropdownClassName: string): this {\n this._dropdownClassName = dropdownClassName;\n return this;\n }\n\n /**\n * Copies current descriptor to a new instance.\n */\n public copy(): FilterDescriptor<FilterModel, TableModel> {\n const descriptor = new FilterDescriptor<FilterModel, TableModel>(this._property);\n this.copyFieldsTo(descriptor);\n return descriptor;\n }\n\n protected copyFieldsTo(descriptor: FilterDescriptor<FilterModel, TableModel>) {\n descriptor._filterType = this._filterType;\n descriptor._hasDefaultValue = this._hasDefaultValue;\n descriptor._defaultValue = this._defaultValue;\n descriptor._defaultMatchMode = this._defaultMatchMode;\n descriptor._displayFormat = this._displayFormat;\n descriptor._locale = this._locale;\n descriptor._numberMinFractionDigits = this._numberMinFractionDigits;\n descriptor._numberMaxFractionDigits = this._numberMaxFractionDigits;\n descriptor._numberUseGrouping = this._numberUseGrouping;\n descriptor._datePickerFormat = this._datePickerFormat;\n descriptor._datePickerShowTime = this._datePickerShowTime;\n descriptor._dateValueUtc = this._dateValueUtc;\n descriptor._dateValueNoTimezone = this._dateValueNoTimezone;\n descriptor._dateValueNoTime = this._dateValueNoTime;\n descriptor._placeholder = this._placeholder;\n descriptor._className = this._className;\n descriptor._columnWidth = this._columnWidth;\n descriptor._columnMinWidth = this._columnMinWidth;\n descriptor._columnClassName = this._columnClassName;\n descriptor._isGenericFilter = this._isGenericFilter;\n descriptor._valueSuggestionProvider = this._valueSuggestionProvider;\n descriptor._dropdownClassName = this._dropdownClassName;\n }\n}\n","import {of} from 'rxjs';\n\nimport {\n ClassOptType,\n ClassType,\n CommonsInternalError,\n EnumConstantType,\n EnumValue,\n FilterMatchModeExtendedType,\n ILookupDataProvider,\n ILookupDescriptor,\n LookupDataProviderLookupFnType,\n ServiceClassOptType,\n ServiceClassType,\n fromEnumConstantsAsValueArray,\n fromEnumValuesAsValueArray,\n getEnumConstantName\n} from '@mediusinc/mng-commons/core';\nimport {LookupDataProviderInst} from '@mediusinc/mng-commons/form/api';\nimport {EnumDescriptor, findClassIdAttribute, trySetLookupItemsProperties} from '@mediusinc/mng-commons/model';\n\nimport {FilterLookupTypeEnum, FilterTypeEnum} from '../models/filter.model';\nimport {FilterDescriptor} from './filter.descriptor';\n\nexport type FilterLookupDescriptorConstructorOptsType<\n FilterModel,\n Service,\n Sorts = keyof FilterModel,\n Filters extends keyof any = keyof FilterModel\n> = FilterLookupDescriptorCreateOptsProviderType<FilterModel, Service, Sorts, Filters> & {\n type?: ClassType<FilterModel>;\n optionsValueProperty?: string | null;\n};\n\nexport type FilterLookupDescriptorCreateOptsProviderType<FilterModel, Service, Sorts = keyof FilterModel, Filters extends keyof any = keyof FilterModel> = {\n serviceType?: ServiceClassType<Service>;\n dataProvider?: ILookupDataProvider<FilterModel, Service, Sorts, Filters>;\n};\n\nexport type FilterLookupAutocompleteOptsType = {\n openOnFocus?: boolean;\n inlineSearch?: boolean;\n autoClear?: boolean;\n};\n\nexport class FilterLookupDescriptor<FilterModel, TableModel, Service = any, Sorts = keyof FilterModel, Filters extends keyof any = keyof FilterModel>\n extends FilterDescriptor<FilterModel, TableModel>\n implements ILookupDescriptor<FilterModel, Service, Sorts, Filters>\n{\n protected readonly _dataProvider: ILookupDataProvider<FilterModel, Service, Sorts, Filters>;\n protected readonly _optionsValueProperty?: string | null;\n protected _lookupType?: FilterLookupTypeEnum = FilterLookupTypeEnum.Dropdown;\n protected _optionsLabelProperty?: string;\n protected _optionsLabelTranslate = false;\n protected _multiselect = false;\n\n protected override _dropdownClassName = 'mng-filter-lookup-dropdown';\n\n protected _autocompleteOpenOnFocus?: boolean;\n protected _autocompleteInlineSearch?: boolean;\n protected _autocompleteAutoClear?: boolean;\n\n constructor(property: string, cfg?: FilterLookupDescriptorConstructorOptsType<FilterModel, Service, Sorts, Filters>) {\n super(property);\n this._filterType = FilterTypeEnum.Lookup;\n\n if (cfg?.dataProvider) {\n this._dataProvider = cfg.dataProvider;\n } else {\n this._dataProvider = new LookupDataProviderInst<FilterModel, Service, Sorts, Filters, ClassOptType<FilterModel>, ServiceClassOptType<Service>>(\n cfg?.type,\n cfg?.serviceType\n );\n }\n\n this._optionsValueProperty = typeof cfg?.optionsValueProperty === 'undefined' ? findClassIdAttribute(this._dataProvider.classType) ?? undefined : cfg?.optionsValueProperty;\n\n trySetLookupItemsProperties(this, false);\n }\n\n public get lookupType() {\n return this._lookupType;\n }\n\n public get dataProvider() {\n return this._dataProvider;\n }\n\n public get optionsLabelProperty() {\n return this._optionsLabelProperty;\n }\n\n public get optionsLabelTranslate() {\n return this._optionsLabelTranslate;\n }\n\n public get optionsValueProperty() {\n return this._optionsValueProperty ?? undefined;\n }\n\n public get multiselect() {\n return this._multiselect;\n }\n\n public get autocompleteOpenOnFocus() {\n return this._autocompleteOpenOnFocus;\n }\n\n public get autocompleteAutoClear() {\n return this._autocompleteAutoClear;\n }\n\n public get autocompleteInlineSearch() {\n return this._autocompleteInlineSearch;\n }\n\n public override get dropdownClassName() {\n return this._dropdownClassName;\n }\n\n /**\n * Sets label property for options display.\n *\n * @param property Property for label options.\n * @param translate If the options should be translated through the i18n.\n */\n public withOptionsLabelProperty(property: keyof FilterModel, translate = false): this {\n return this.withOptionsLabelPropertyUnsafe(property as string, translate);\n }\n\n /**\n * Sets label property for options display.\n *\n * This function is UNSAFE!\n *\n * @param property Property for label options.\n * @param translate If the options should be translated through the i18n.\n */\n public withOptionsLabelPropertyUnsafe(property: string, translate = false): this {\n this._optionsLabelProperty = property;\n this._optionsLabelTranslate = translate;\n return this;\n }\n\n /**\n * Method will set `optionsValueProperty`, because track properties are not supported here as filters need final value to work correctly.\n * Use `optionsValueProperty` in filter creation instead.\n */\n public withOptionsTrackProperty(): this {\n return this;\n }\n\n /**\n * Method will set `optionsValueProperty`, because track properties are not supported here as filters need final value to work correctly.\n * Use `optionsValueProperty` in filter creation instead.\n */\n public withOptionsTrackPropertyUnsafe(): this {\n return this;\n }\n\n public withLookup(lookup?: LookupDataProviderLookupFnType<FilterModel, Service, Sorts, Filters>): this {\n this._dataProvider.withLookup(lookup);\n return this;\n }\n\n /**\n * Sets multiselect for lookups.\n *\n * @param multiselect Enables/disables the feature.\n */\n public withMultiselect(multiselect = true) {\n this._multiselect = multiselect;\n return this;\n }\n\n /**\n * Sets the dropdown class name.\n * @param dropdownClassName Class name for dropdown.\n */\n public override withDropdownClassName(dropdownClassName: string): this {\n this._dropdownClassName = dropdownClassName;\n return this;\n }\n\n /**\n * Sets default filter value for filter.\n *\n * @param value Value for default filter.\n * @param matchMode Match mode for default filter.\n */\n public override withDefaultFilter(value: FilterModel | FilterModel[] | undefined, matchMode: FilterMatchModeExtendedType): this {\n this._hasDefaultValue = true;\n this._defaultValue = value;\n this._defaultMatchMode = matchMode;\n\n this.validateDefaultFilter(value, matchMode);\n\n if ((Array.isArray(value) && !this.multiselect) || (this.multiselect && !Array.isArray(value))) {\n throw new CommonsInternalError(`Default value not in correct format for property ${this._property}.`, {name: 'FilterDescriptorError'});\n }\n\n return this;\n }\n\n /**\n * Sets lookup as autocomplete instead of dropdown.\n *\n * @param opts Additional options.\n */\n public asAutocomplete(opts?: FilterLookupAutocompleteOptsType): this {\n this._lookupType = FilterLookupTypeEnum.Autocomplete;\n this._autocompleteAutoClear = opts?.autoClear;\n this._autocompleteOpenOnFocus = opts?.openOnFocus;\n this._autocompleteInlineSearch = opts?.inlineSearch;\n return this;\n }\n\n /**\n * Copies current descriptor to a new instance.\n */\n public override copy(): FilterLookupDescriptor<FilterModel, TableModel, Service, Sorts, Filters> {\n const descriptor = new FilterLookupDescriptor<FilterModel, TableModel, Service, Sorts, Filters>(this._property, {\n dataProvider: this.dataProvider\n });\n this.copyFieldsTo(descriptor);\n return descriptor;\n }\n\n protected override copyFieldsTo(filter: FilterLookupDescriptor<FilterModel, TableModel, Service, Sorts, Filters>) {\n super.copyFieldsTo(filter);\n filter._lookupType = this._lookupType;\n filter._optionsLabelProperty = this._optionsLabelProperty;\n filter._optionsLabelTranslate = this._optionsLabelTranslate;\n filter._multiselect = this._multiselect;\n filter._dropdownClassName = this._dropdownClassName;\n filter._autocompleteOpenOnFocus = this._autocompleteOpenOnFocus;\n filter._autocompleteInlineSearch = this._autocompleteInlineSearch;\n }\n}\n\nexport class FilterLookupEnumDescriptor<Enum, TableModel> extends FilterLookupDescriptor<EnumValue, TableModel, undefined, never, never> {\n private readonly _enum: EnumDescriptor<Enum>;\n private readonly _optionEnumValues: EnumValue[];\n private readonly _nameAsValue: boolean = false;\n\n constructor(property: string, enumDesc: EnumDescriptor<Enum>, options?: Array<Enum>) {\n super(property, {\n dataProvider: new LookupDataProviderInst<EnumValue, undefined, never, never, undefined, undefined>(undefined, undefined),\n optionsValueProperty: 'value'\n });\n this._filterType = FilterTypeEnum.LookupEnum;\n\n this._enum = enumDesc;\n\n this._optionEnumValues = Array.isArray(options)\n ? fromEnumValuesAsValueArray(this._enum.type, options, this._enum.nameAsValue, this._enum.i18nBaseKey ?? undefined)\n : fromEnumConstantsAsValueArray(this._enum.type, this._enum.nameAsValue, this._enum.i18nBaseKey ?? undefined);\n\n this.withLookup(() => of(this._optionEnumValues));\n this.withOptionsLabelProperty('title', this._enum.i18nBaseKey !== null);\n }\n\n public get enum() {\n return this._enum;\n }\n\n /**\n * Sets lookup as autocomplete instead of dropdown.\n *\n * @param opts Additional options.\n */\n public override asAutocomplete(opts?: FilterLookupAutocompleteOptsType): this {\n super.asAutocomplete({\n ...opts,\n openOnFocus: opts?.openOnFocus ?? true,\n inlineSearch: opts?.inlineSearch ?? true\n });\n return this;\n }\n\n public withMultiselectEnum(multiselect = true): FilterLookupEnumDescriptor<Enum, TableModel> {\n return super.withMultiselect(multiselect) as FilterLookupEnumDescriptor<Enum, TableModel>;\n }\n\n /**\n * Do not use, use `withDefaultFilterEnum` instead.\n */\n public override withDefaultFilter(): this {\n throw new CommonsInternalError(`withDefaultFilter on FilterLookupEnumDescriptor should not be used. Use withDefaultFilterEnum instead.`, {name: 'FilterDescriptorError'});\n }\n\n /**\n * Sets default filter value for filter.\n *\n * @param value Value(s) for default filter.\n * @param matchMode Match mode for default filter.\n */\n public withDefaultFilterEnum(value: EnumConstantType | EnumConstantType[] | undefined, matchMode: FilterMatchModeExtendedType): this {\n let defaultOptionValue: any | any[];\n if (Array.isArray(value)) {\n defaultOptionValue = this._nameAsValue ? value.map(value => getEnumConstantName(this.enum.type, value)) : value;\n } else if (value != null) {\n defaultOptionValue = this._nameAsValue ? getEnumConstantName(this.enum.type, value) : value;\n }\n\n if (defaultOptionValue != null) {\n let option: any | any[];\n if (Array.isArray(defaultOptionValue)) {\n option = defaultOptionValue.map(value => this._optionEnumValues.find(o => o.value === value));\n } else {\n option = this._optionEnumValues.find(o => o.value === defaultOptionValue);\n }\n\n let defaultFilterValue: any | any[];\n if (Array.isArray(option)) {\n defaultFilterValue = this._optionsValueProperty ? option.map(value => value[this._optionsValueProperty as keyof object]) : option;\n } else {\n defaultFilterValue = this._optionsValueProperty ? option[this._optionsValueProperty as keyof object] : option;\n }\n\n super.withDefaultFilter(defaultFilterValue, matchMode);\n }\n return this;\n }\n\n /**\n * Copies current descriptor to a new instance.\n */\n public override copy(): FilterLookupEnumDescriptor<Enum, TableModel> {\n const field = new FilterLookupEnumDescriptor<Enum, TableModel>(this._property, this.enum, []);\n this.copyFieldsTo(field);\n return field;\n }\n}\n","import {LookupDataProviderInst} from '@mediusinc/mng-commons/form/api';\n\nimport {FilterGenericProperty} from '../models/filter-generic-property.model';\n\nexport class FilterGenericDescriptor {\n protected _propertyLookup: LookupDataProviderInst<FilterGenericProperty>;\n protected _valueLookup?: LookupDataProviderInst<string, any, any, 'field'>;\n\n constructor(propertyLookupDataProvider: LookupDataProviderInst<FilterGenericProperty>) {\n this._propertyLookup = propertyLookupDataProvider;\n }\n\n public get propertyLookup() {\n return this._propertyLookup;\n }\n\n public get valueLookup() {\n return this._valueLookup;\n }\n\n public withValueLookup(valueLookup: LookupDataProviderInst<string, any, any, 'field'>): this {\n this._valueLookup = valueLookup;\n return this;\n }\n\n public copy(): FilterGenericDescriptor {\n const descriptor = new FilterGenericDescriptor(this._propertyLookup);\n descriptor._valueLookup = this._valueLookup;\n return descriptor;\n }\n}\n","// descriptors\nexport * from './descriptors/filter.descriptor';\nexport * from './descriptors/filter-lookup.descriptor';\nexport * from './descriptors/filter-generic.descriptor';\n\n// models\nexport * from './models/filter.model';\nexport * from './models/filter-generic-property.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;IAAY,eAOX;AAPD,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,cAAA,CAAA,QAAA,CAAA,GAAA,CAAA,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filter/src/descriptors/filter.descriptor.ts","../../filter/src/descriptors/filter-lookup.descriptor.ts","../../filter/src/descriptors/filter-generic.descriptor.ts","../../filter/src/index.ts","../../filter/src/mediusinc-mng-commons-filter.ts"],"sourcesContent":["export enum FilterTypeEnum {\n String,\n Number,\n Boolean,\n Date,\n Lookup,\n LookupEnum\n}\n\nexport enum FilterLookupTypeEnum {\n Dropdown,\n Autocomplete\n}\n\nexport enum FilterDisplayTypeEnum {\n Column,\n OverlayWithTag\n}\n","import {CommonsInternalError, FilterMatchModeExtendedType, IFilterDescriptor, ILookupDataProvider, LoggerService} from '@mediusinc/mng-commons/core';\nimport {InputTrimType, LookupDataProviderInst} from '@mediusinc/mng-commons/form/api';\n\nimport {FilterDisplayTypeEnum, FilterTypeEnum} from '../models/filter.model';\n\nexport type FilterDatePickerDisplayOptsType = {\n applyFromDisplayFormat?: boolean;\n format?: string;\n showTime?: boolean;\n showSeconds?: boolean;\n};\n\nexport type FilterDateValueOptsType = {\n utc?: boolean;\n noTime?: boolean;\n noTimeZone?: boolean;\n};\n\nexport type FilterDateOptsType = FilterDateValueOptsType &\n FilterDatePickerDisplayOptsType & {\n displayFormat?: string;\n };\n\nexport type FilterNumberFractionOptsType = {\n minFractionDigits?: number;\n maxFractionDigits?: number;\n};\n\nexport type FilterLocaleOptsType = {\n locale?: string;\n};\n\nexport type FilterNumberOptsType = FilterNumberFractionOptsType &\n FilterLocaleOptsType & {\n displayFormat?: string;\n };\n\nexport class FilterDescriptor<FilterModel, TableModel> implements IFilterDescriptor<FilterModel, TableModel> {\n protected readonly _property: string;\n protected _showOnColumn?: string;\n\n protected _filterType = FilterTypeEnum.String;\n protected _displayType?: FilterDisplayTypeEnum;\n\n // default value\n protected _hasDefaultValue = false;\n protected _defaultMatchMode?: FilterMatchModeExtendedType;\n protected _defaultValue?: FilterModel | FilterModel[];\n protected _matchModes?: string[];\n\n // value display\n private _displayFormat?: string;\n private _displayFormatApplyToField?: boolean;\n private _locale?: string;\n\n // number filter field specific properties\n protected _numberMinFractionDigits?: number;\n protected _numberMaxFractionDigits?: number;\n protected _numberUseGrouping = true;\n\n // date filter field specific properties\n protected _datePickerFormat?: string;\n protected _datePickerShowTime?: boolean;\n protected _datePickerShowSeconds?: boolean;\n protected _dateValueNoTime?: boolean;\n protected _dateValueNoTimezone?: boolean;\n protected _dateValueUtc?: boolean;\n\n protected _placeholder?: string;\n protected _className = '';\n protected _columnClassName = '';\n protected _columnWidth: number | null = null;\n protected _columnMinWidth: number | null = null;\n protected _inputTrim?: InputTrimType;\n protected _title?: string;\n\n protected _isGenericFilter = false;\n protected _valueSuggestionProvider?: ILookupDataProvider<string, any, any, 'field'>;\n protected _dropdownClassName = '';\n\n constructor(property: string) {\n this._property = property;\n this._showOnColumn = property;\n }\n\n public get filterType() {\n return this._filterType;\n }\n\n public get showOnColumn() {\n return this._showOnColumn;\n }\n\n public get displayType() {\n return this._displayType;\n }\n\n public get hasDefaultValue() {\n return this._hasDefaultValue;\n }\n\n public get defaultValue() {\n return this._defaultValue;\n }\n\n public get defaultMatchMode() {\n return this._defaultMatchMode;\n }\n\n public get matchModes() {\n return this._matchModes;\n }\n\n public get displayFormat() {\n return this._displayFormat;\n }\n\n public get displayFormatApplyToField() {\n return this._displayFormatApplyToField;\n }\n\n public get locale() {\n return this._locale;\n }\n\n public get numberMinFractionDigits() {\n return this._numberMinFractionDigits;\n }\n\n public get numberMaxFractionDigits() {\n return this._numberMaxFractionDigits;\n }\n\n public get numberUseGrouping() {\n return this._numberUseGrouping;\n }\n\n public get datePickerFormat() {\n return this._datePickerFormat;\n }\n\n public get datePickerShowTime() {\n return this._datePickerShowTime;\n }\n\n public get datePickerShowSeconds() {\n return this._datePickerShowSeconds;\n }\n\n public get dateValueUtc() {\n return this._dateValueUtc;\n }\n\n public get dateValueNoTimezone() {\n return this._dateValueNoTimezone;\n }\n\n public get dateValueNoTime() {\n return this._dateValueNoTime;\n }\n\n public get placeholder() {\n return this._placeholder;\n }\n\n public get className() {\n return this._className;\n }\n\n public get columnClassName() {\n return this._columnClassName;\n }\n\n public get columnWidth() {\n return this._columnWidth;\n }\n\n public get columnMinWidth() {\n return this._columnMinWidth;\n }\n\n public get trimOption() {\n return this._inputTrim;\n }\n\n public get property() {\n return this._property;\n }\n\n public get title() {\n return this._title;\n }\n\n public get isGenericFilter() {\n return this._isGenericFilter;\n }\n\n public get genericValueProvider() {\n return this._valueSuggestionProvider;\n }\n\n public get dropdownClassName(): string {\n return this._dropdownClassName;\n }\n\n /**\n * Converts filter to given type.\n *\n * @param filterType Filter type.\n */\n public asFilterType(filterType: FilterTypeEnum) {\n this._filterType = filterType;\n return this;\n }\n\n /**\n * Sets the filter as a generic filter. For internal use only.\n *\n * @internal\n */\n public asGenericFilter(): this {\n this._isGenericFilter = true;\n return this;\n }\n\n /**\n * Set filter as date type.\n *\n * @param opts Additional options.\n */\n public asDate(opts?: FilterDateOptsType): this {\n this._filterType = FilterTypeEnum.Date;\n this.withDisplayFormat(opts?.displayFormat).withDatePickerDisplay(opts).withDateValue(opts);\n return this;\n }\n\n /**\n * Set filter as number type.\n *\n * @param opts Additional options.\n */\n public asNumber(opts?: FilterNumberOptsType): this {\n this._filterType = FilterTypeEnum.Number;\n this.withDisplayFormat(opts?.displayFormat).withNumberFractions(opts?.minFractionDigits, opts?.maxFractionDigits).withLocale(opts?.locale);\n return this;\n }\n\n /**\n * Shows filter on column for given property.\n *\n * @param property Column property to show filter on.\n * @param displayType Optional display type override. If not column, the filter will not be shown on column.\n */\n public withShowOnColumn(property: keyof TableModel, displayType: FilterDisplayTypeEnum | undefined = FilterDisplayTypeEnum.Column): this {\n return this.withShowOnColumnUnsafe(property as string, displayType);\n }\n\n /**\n * Shows filter on column for given property.\n *\n * This function is UNSAFE.\n *\n * @param property Column property to show filter on.\n * @param displayType Optional display type override. If not column, the filter will not be shown on column.\n */\n public withShowOnColumnUnsafe(property: string, displayType: FilterDisplayTypeEnum | undefined = FilterDisplayTypeEnum.Column): this {\n this._showOnColumn = property;\n this._displayType = displayType;\n return this;\n }\n\n /**\n * Changes display type of filter.\n *\n * @param type Display type.\n */\n public withDisplayType(type?: FilterDisplayTypeEnum): this {\n this._displayType = type;\n return this;\n }\n\n /**\n * Sets default filter value for filter.\n *\n * @param value Value for default filter.\n * @param matchMode Match mode for default filter.\n */\n public withDefaultFilter(value: FilterModel | FilterModel[] | undefined, matchMode: FilterMatchModeExtendedType): this {\n this._hasDefaultValue = true;\n this._defaultValue = value;\n this._defaultMatchMode = matchMode;\n this.validateDefaultFilter(value, matchMode);\n return this;\n }\n\n protected validateDefaultFilter(value: FilterModel | FilterModel[] | undefined, matchMode: FilterMatchModeExtendedType) {\n if (matchMode === 'between' && value != null && (!Array.isArray(value) || value.filter(v => v != null).length !== 2)) {\n throw new CommonsInternalError(`Default value for filter match mode ${matchMode} must provide exactly 2 values in array`);\n }\n if ((matchMode === 'in' || matchMode === 'notIn') && value != null && (!Array.isArray(value) || value.filter(v => v != null).length === 0)) {\n throw new CommonsInternalError(`Default value for filter match mode ${matchMode} must be array and provide at least 1 non-null value`);\n }\n if (matchMode === 'exists' || matchMode === 'doesNotExist') {\n this._defaultValue = undefined;\n }\n\n if (matchMode && this._matchModes && this._matchModes.indexOf(matchMode) < 0) {\n this._defaultMatchMode = undefined;\n LoggerService.get().debug(`WARNING: Default filter match mode '${matchMode}' could not be assigned for property ${this._property}.`);\n }\n }\n\n /**\n * Sets format for display of filter value (applies to date and number).\n *\n * @param format Format (Angular formatting rules apply).\n * @param applyToField If the format should also be applied to field on filter editing form.\n */\n public withDisplayFormat(format?: string, applyToField?: boolean): this {\n this._displayFormat = format;\n this._displayFormatApplyToField = applyToField;\n return this;\n }\n\n /**\n * Sets locale for filter.\n *\n * @param locale Locale.\n */\n public withLocale(locale?: string): this {\n this._locale = locale;\n return this;\n }\n\n /**\n * Sets fraction for number filter editing field.\n *\n * @param min Min fraction digits (i.e. digits after decimal).\n * @param max Max fraction digits (i.e. digits after decimal).\n */\n public withNumberFractions(min?: number, max?: number) {\n this._numberMinFractionDigits = min;\n this._numberMaxFractionDigits = max;\n return this;\n }\n\n /**\n * If number grouping should be used.\n *\n * @param useGrouping Enables/disbaled the feature.\n */\n public withNumberGrouping(useGrouping = true): this {\n this._numberUseGrouping = useGrouping;\n return this;\n }\n\n /**\n * Sets a data provider for autocomplete text suggestions.\n *\n * @param valueDataProvider Data provider for autocomplete.\n */\n public withGenericValueProvider(valueDataProvider: LookupDataProviderInst<string, any, any, 'field'>): this {\n if (!(this.filterType === FilterTypeEnum.String || this.filterType === FilterTypeEnum.LookupEnum)) {\n throw new CommonsInternalError('Generic value lookup can only be set for the string or lookup enum filter types.');\n }\n\n this._valueSuggestionProvider = valueDataProvider;\n return this;\n }\n\n /**\n * @deprecated Use ${withDatePickerDisplay} instead.\n */\n public withDateFormat(format?: string, showTime = false, showSeconds = false): this {\n this._datePickerFormat = format;\n this._datePickerShowTime = showTime;\n this._datePickerShowSeconds = showSeconds;\n return this;\n }\n\n /**\n * Sets date picker display options.\n *\n * @param opts Options.\n */\n public withDatePickerDisplay(opts?: FilterDatePickerDisplayOptsType): this {\n this._displayFormatApplyToField = opts?.applyFromDisplayFormat;\n this._datePickerFormat = opts?.format;\n this._datePickerShowTime = opts?.showTime;\n this._datePickerShowSeconds = opts?.showSeconds;\n return this;\n }\n\n /**\n * Sets filter date value formatting options.\n *\n * @param opts Options.\n */\n public withDateValue(opts?: FilterDateValueOptsType): this {\n this._dateValueUtc = opts?.utc;\n this._dateValueNoTimezone = opts?.noTimeZone;\n this._dateValueNoTime = opts?.noTime;\n return this;\n }\n\n /**\n * Sets placeholder for filter field.\n *\n * @param placeholder Text for placeholder.\n */\n public withPlaceholder(placeholder: string): this {\n this._placeholder = placeholder;\n return this;\n }\n\n /**\n * Sets class name for filter.\n *\n * @param className Class name.\n */\n public withClassName(className: string): this {\n this._className = className;\n return this;\n }\n\n /**\n * Sets class name for column display type.\n *\n * @param className Class name for column.\n */\n public withColumnClassName(className: string): this {\n this._columnClassName = className;\n return this;\n }\n\n /**\n * Set column width for column display type.\n *\n * @param width Relative width (in percentage) of table width:\n * @param minWidth\n */\n public withColumnWidth(width?: number, minWidth?: number): this {\n this._columnWidth = width ?? null;\n this._columnMinWidth = minWidth ?? null;\n return this;\n }\n\n /**\n * Sets input trimming for filter value field.\n *\n * @param trimOption Trim setting.\n */\n public withInputTrimming(trimOption: InputTrimType = 'both'): this {\n this._inputTrim = trimOption;\n return this;\n }\n\n /**\n * Sets range of match modes for this filter. If non provided, the defaults are applied.\n *\n * @param matchModes Match mode options.\n */\n public withMatchModes(matchModes?: Array<FilterMatchModeExtendedType>): this {\n this._matchModes = matchModes;\n return this;\n }\n\n /**\n * Filter title. If non provided, the defaults are applied.\n *\n * @param title Title for the field.\n */\n public withTitle(title: string): this {\n this._title = title;\n return this;\n }\n\n public withDropdownClassName(dropdownClassName: string): this {\n this._dropdownClassName = dropdownClassName;\n return this;\n }\n\n /**\n * Copies current descriptor to a new instance.\n */\n public copy(): FilterDescriptor<FilterModel, TableModel> {\n const descriptor = new FilterDescriptor<FilterModel, TableModel>(this._property);\n this.copyFieldsTo(descriptor);\n return descriptor;\n }\n\n protected copyFieldsTo(descriptor: FilterDescriptor<FilterModel, TableModel>) {\n descriptor._filterType = this._filterType;\n descriptor._hasDefaultValue = this._hasDefaultValue;\n descriptor._defaultValue = this._defaultValue;\n descriptor._defaultMatchMode = this._defaultMatchMode;\n descriptor._displayFormat = this._displayFormat;\n descriptor._locale = this._locale;\n descriptor._numberMinFractionDigits = this._numberMinFractionDigits;\n descriptor._numberMaxFractionDigits = this._numberMaxFractionDigits;\n descriptor._numberUseGrouping = this._numberUseGrouping;\n descriptor._datePickerFormat = this._datePickerFormat;\n descriptor._datePickerShowTime = this._datePickerShowTime;\n descriptor._dateValueUtc = this._dateValueUtc;\n descriptor._dateValueNoTimezone = this._dateValueNoTimezone;\n descriptor._dateValueNoTime = this._dateValueNoTime;\n descriptor._placeholder = this._placeholder;\n descriptor._className = this._className;\n descriptor._columnWidth = this._columnWidth;\n descriptor._columnMinWidth = this._columnMinWidth;\n descriptor._columnClassName = this._columnClassName;\n descriptor._isGenericFilter = this._isGenericFilter;\n descriptor._valueSuggestionProvider = this._valueSuggestionProvider;\n descriptor._dropdownClassName = this._dropdownClassName;\n }\n}\n","import {of} from 'rxjs';\n\nimport {\n ClassOptType,\n ClassType,\n CommonsInternalError,\n EnumConstantType,\n EnumValue,\n FilterMatchModeExtendedType,\n ILookupDataProvider,\n ILookupDescriptor,\n LookupDataProviderLookupFnType,\n ServiceClassOptType,\n ServiceClassType,\n fromEnumConstantsAsValueArray,\n fromEnumValuesAsValueArray,\n getEnumConstantName\n} from '@mediusinc/mng-commons/core';\nimport {LookupDataProviderInst} from '@mediusinc/mng-commons/form/api';\nimport {EnumDescriptor, findClassIdAttribute, trySetLookupItemsProperties} from '@mediusinc/mng-commons/model';\n\nimport {FilterLookupTypeEnum, FilterTypeEnum} from '../models/filter.model';\nimport {FilterDescriptor} from './filter.descriptor';\n\nexport type FilterLookupDescriptorConstructorOptsType<\n FilterModel,\n Service,\n Sorts = keyof FilterModel,\n Filters extends keyof any = keyof FilterModel\n> = FilterLookupDescriptorCreateOptsProviderType<FilterModel, Service, Sorts, Filters> & {\n type?: ClassType<FilterModel>;\n optionsValueProperty?: string | null;\n};\n\nexport type FilterLookupDescriptorCreateOptsProviderType<FilterModel, Service, Sorts = keyof FilterModel, Filters extends keyof any = keyof FilterModel> = {\n serviceType?: ServiceClassType<Service>;\n dataProvider?: ILookupDataProvider<FilterModel, Service, Sorts, Filters>;\n};\n\nexport type FilterLookupAutocompleteOptsType = {\n openOnFocus?: boolean;\n inlineSearch?: boolean;\n autoClear?: boolean;\n};\n\nexport class FilterLookupDescriptor<FilterModel, TableModel, Service = any, Sorts = keyof FilterModel, Filters extends keyof any = keyof FilterModel>\n extends FilterDescriptor<FilterModel, TableModel>\n implements ILookupDescriptor<FilterModel, Service, Sorts, Filters>\n{\n protected readonly _dataProvider: ILookupDataProvider<FilterModel, Service, Sorts, Filters>;\n protected readonly _optionsValueProperty?: string | null;\n protected _lookupType?: FilterLookupTypeEnum = FilterLookupTypeEnum.Dropdown;\n protected _optionsLabelProperty?: string;\n protected _optionsLabelTranslate = false;\n protected _multiselect = false;\n\n protected override _dropdownClassName = 'mng-filter-lookup-dropdown';\n\n protected _autocompleteOpenOnFocus?: boolean;\n protected _autocompleteInlineSearch?: boolean;\n protected _autocompleteAutoClear?: boolean;\n\n constructor(property: string, cfg?: FilterLookupDescriptorConstructorOptsType<FilterModel, Service, Sorts, Filters>) {\n super(property);\n this._filterType = FilterTypeEnum.Lookup;\n\n if (cfg?.dataProvider) {\n this._dataProvider = cfg.dataProvider;\n } else {\n this._dataProvider = new LookupDataProviderInst<FilterModel, Service, Sorts, Filters, ClassOptType<FilterModel>, ServiceClassOptType<Service>>(\n cfg?.type,\n cfg?.serviceType\n );\n }\n\n this._optionsValueProperty = typeof cfg?.optionsValueProperty === 'undefined' ? findClassIdAttribute(this._dataProvider.classType) ?? undefined : cfg?.optionsValueProperty;\n\n trySetLookupItemsProperties(this, false);\n }\n\n public get lookupType() {\n return this._lookupType;\n }\n\n public get dataProvider() {\n return this._dataProvider;\n }\n\n public get optionsLabelProperty() {\n return this._optionsLabelProperty;\n }\n\n public get optionsLabelTranslate() {\n return this._optionsLabelTranslate;\n }\n\n public get optionsValueProperty() {\n return this._optionsValueProperty ?? undefined;\n }\n\n public get multiselect() {\n return this._multiselect;\n }\n\n public get autocompleteOpenOnFocus() {\n return this._autocompleteOpenOnFocus;\n }\n\n public get autocompleteAutoClear() {\n return this._autocompleteAutoClear;\n }\n\n public get autocompleteInlineSearch() {\n return this._autocompleteInlineSearch;\n }\n\n public override get dropdownClassName() {\n return this._dropdownClassName;\n }\n\n /**\n * Sets label property for options display.\n *\n * @param property Property for label options.\n * @param translate If the options should be translated through the i18n.\n */\n public withOptionsLabelProperty(property: keyof FilterModel, translate = false): this {\n return this.withOptionsLabelPropertyUnsafe(property as string, translate);\n }\n\n /**\n * Sets label property for options display.\n *\n * This function is UNSAFE!\n *\n * @param property Property for label options.\n * @param translate If the options should be translated through the i18n.\n */\n public withOptionsLabelPropertyUnsafe(property: string, translate = false): this {\n this._optionsLabelProperty = property;\n this._optionsLabelTranslate = translate;\n return this;\n }\n\n /**\n * Method will set `optionsValueProperty`, because track properties are not supported here as filters need final value to work correctly.\n * Use `optionsValueProperty` in filter creation instead.\n */\n public withOptionsTrackProperty(): this {\n return this;\n }\n\n /**\n * Method will set `optionsValueProperty`, because track properties are not supported here as filters need final value to work correctly.\n * Use `optionsValueProperty` in filter creation instead.\n */\n public withOptionsTrackPropertyUnsafe(): this {\n return this;\n }\n\n public withLookup(lookup?: LookupDataProviderLookupFnType<FilterModel, Service, Sorts, Filters>): this {\n this._dataProvider.withLookup(lookup);\n return this;\n }\n\n /**\n * Sets multiselect for lookups.\n *\n * @param multiselect Enables/disables the feature.\n */\n public withMultiselect(multiselect = true) {\n this._multiselect = multiselect;\n return this;\n }\n\n /**\n * Sets the dropdown class name.\n * @param dropdownClassName Class name for dropdown.\n */\n public override withDropdownClassName(dropdownClassName: string): this {\n this._dropdownClassName = dropdownClassName;\n return this;\n }\n\n /**\n * Sets default filter value for filter.\n *\n * @param value Value for default filter.\n * @param matchMode Match mode for default filter.\n */\n public override withDefaultFilter(value: FilterModel | FilterModel[] | undefined, matchMode: FilterMatchModeExtendedType): this {\n this._hasDefaultValue = true;\n this._defaultValue = value;\n this._defaultMatchMode = matchMode;\n\n this.validateDefaultFilter(value, matchMode);\n\n if ((Array.isArray(value) && !this.multiselect) || (this.multiselect && !Array.isArray(value))) {\n throw new CommonsInternalError(`Default value not in correct format for property ${this._property}.`, {name: 'FilterDescriptorError'});\n }\n\n return this;\n }\n\n /**\n * Sets lookup as autocomplete instead of dropdown.\n *\n * @param opts Additional options.\n */\n public asAutocomplete(opts?: FilterLookupAutocompleteOptsType): this {\n this._lookupType = FilterLookupTypeEnum.Autocomplete;\n this._autocompleteAutoClear = opts?.autoClear;\n this._autocompleteOpenOnFocus = opts?.openOnFocus;\n this._autocompleteInlineSearch = opts?.inlineSearch;\n return this;\n }\n\n /**\n * Copies current descriptor to a new instance.\n */\n public override copy(): FilterLookupDescriptor<FilterModel, TableModel, Service, Sorts, Filters> {\n const descriptor = new FilterLookupDescriptor<FilterModel, TableModel, Service, Sorts, Filters>(this._property, {\n dataProvider: this.dataProvider\n });\n this.copyFieldsTo(descriptor);\n return descriptor;\n }\n\n protected override copyFieldsTo(filter: FilterLookupDescriptor<FilterModel, TableModel, Service, Sorts, Filters>) {\n super.copyFieldsTo(filter);\n filter._lookupType = this._lookupType;\n filter._optionsLabelProperty = this._optionsLabelProperty;\n filter._optionsLabelTranslate = this._optionsLabelTranslate;\n filter._multiselect = this._multiselect;\n filter._dropdownClassName = this._dropdownClassName;\n filter._autocompleteOpenOnFocus = this._autocompleteOpenOnFocus;\n filter._autocompleteInlineSearch = this._autocompleteInlineSearch;\n }\n}\n\nexport class FilterLookupEnumDescriptor<Enum, TableModel> extends FilterLookupDescriptor<EnumValue, TableModel, undefined, never, never> {\n private readonly _enum: EnumDescriptor<Enum>;\n private readonly _optionEnumValues: EnumValue[];\n private readonly _nameAsValue: boolean = false;\n\n constructor(property: string, enumDesc: EnumDescriptor<Enum>, options?: Array<Enum>) {\n super(property, {\n dataProvider: new LookupDataProviderInst<EnumValue, undefined, never, never, undefined, undefined>(undefined, undefined),\n optionsValueProperty: 'value'\n });\n this._filterType = FilterTypeEnum.LookupEnum;\n\n this._enum = enumDesc;\n\n this._optionEnumValues = Array.isArray(options)\n ? fromEnumValuesAsValueArray(this._enum.type, options, this._enum.nameAsValue, this._enum.i18nBaseKey ?? undefined)\n : fromEnumConstantsAsValueArray(this._enum.type, this._enum.nameAsValue, this._enum.i18nBaseKey ?? undefined);\n\n this.withLookup(() => of(this._optionEnumValues));\n this.withOptionsLabelProperty('title', this._enum.i18nBaseKey !== null);\n }\n\n public get enum() {\n return this._enum;\n }\n\n /**\n * Sets lookup as autocomplete instead of dropdown.\n *\n * @param opts Additional options.\n */\n public override asAutocomplete(opts?: FilterLookupAutocompleteOptsType): this {\n super.asAutocomplete({\n ...opts,\n openOnFocus: opts?.openOnFocus ?? true,\n inlineSearch: opts?.inlineSearch ?? true\n });\n return this;\n }\n\n public withMultiselectEnum(multiselect = true): FilterLookupEnumDescriptor<Enum, TableModel> {\n return super.withMultiselect(multiselect) as FilterLookupEnumDescriptor<Enum, TableModel>;\n }\n\n /**\n * Do not use, use `withDefaultFilterEnum` instead.\n */\n public override withDefaultFilter(): this {\n throw new CommonsInternalError(`withDefaultFilter on FilterLookupEnumDescriptor should not be used. Use withDefaultFilterEnum instead.`, {name: 'FilterDescriptorError'});\n }\n\n /**\n * Sets default filter value for filter.\n *\n * @param value Value(s) for default filter.\n * @param matchMode Match mode for default filter.\n */\n public withDefaultFilterEnum(value: EnumConstantType | EnumConstantType[] | undefined, matchMode: FilterMatchModeExtendedType): this {\n let defaultOptionValue: any | any[];\n if (Array.isArray(value)) {\n defaultOptionValue = this._nameAsValue ? value.map(value => getEnumConstantName(this.enum.type, value)) : value;\n } else if (value != null) {\n defaultOptionValue = this._nameAsValue ? getEnumConstantName(this.enum.type, value) : value;\n }\n\n if (defaultOptionValue != null) {\n let option: any | any[];\n if (Array.isArray(defaultOptionValue)) {\n option = defaultOptionValue.map(value => this._optionEnumValues.find(o => o.value === value));\n } else {\n option = this._optionEnumValues.find(o => o.value === defaultOptionValue);\n }\n\n let defaultFilterValue: any | any[];\n if (Array.isArray(option)) {\n defaultFilterValue = this._optionsValueProperty ? option.map(value => value[this._optionsValueProperty as keyof object]) : option;\n } else {\n defaultFilterValue = this._optionsValueProperty ? option[this._optionsValueProperty as keyof object] : option;\n }\n\n super.withDefaultFilter(defaultFilterValue, matchMode);\n }\n return this;\n }\n\n /**\n * Copies current descriptor to a new instance.\n */\n public override copy(): FilterLookupEnumDescriptor<Enum, TableModel> {\n const field = new FilterLookupEnumDescriptor<Enum, TableModel>(this._property, this.enum, []);\n this.copyFieldsTo(field);\n return field;\n }\n}\n","import {LookupDataProviderInst} from '@mediusinc/mng-commons/form/api';\n\nimport {FilterGenericProperty} from '../models/filter-generic-property.model';\n\nexport class FilterGenericDescriptor {\n protected _propertyLookup: LookupDataProviderInst<FilterGenericProperty>;\n protected _propertySearch?: boolean;\n protected _valueLookup?: LookupDataProviderInst<string, any, any, 'field'>;\n\n constructor(propertyLookupDataProvider: LookupDataProviderInst<FilterGenericProperty>) {\n this._propertyLookup = propertyLookupDataProvider;\n }\n\n // must set return types explicitly due to ng-packagr bug: https://github.com/ng-packagr/ng-packagr/issues/1405\n public get propertyLookup(): LookupDataProviderInst<FilterGenericProperty> {\n return this._propertyLookup;\n }\n\n public get propertySearch() {\n return this._propertySearch;\n }\n\n // must set return types explicitly due to ng-packagr bug: https://github.com/ng-packagr/ng-packagr/issues/1405\n public get valueLookup(): LookupDataProviderInst<string, any, any, 'field'> | undefined {\n return this._valueLookup;\n }\n\n public withValueLookup(valueLookup: LookupDataProviderInst<string, any, any, 'field'>): this {\n this._valueLookup = valueLookup;\n return this;\n }\n\n public withPropertySearch(search = true): this {\n this._propertySearch = search;\n return this;\n }\n\n public copy(): FilterGenericDescriptor {\n const descriptor = new FilterGenericDescriptor(this._propertyLookup);\n descriptor._propertySearch = this._propertySearch;\n descriptor._valueLookup = this._valueLookup;\n return descriptor;\n }\n}\n","// descriptors\nexport * from './descriptors/filter.descriptor';\nexport * from './descriptors/filter-lookup.descriptor';\nexport * from './descriptors/filter-generic.descriptor';\n\n// models\nexport * from './models/filter.model';\nexport * from './models/filter-generic-property.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;IAAY,eAOX;AAPD,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,cAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACN,IAAA,cAAA,CAAA,cAAA,CAAA,QAAA,CAAA,GA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AA,UAAU,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;AAC5C,QAAA,OAAO,UAAU,CAAC;KACrB;AACJ;;AC3CD;;ACAA;;AAEG;;;;"}
@@ -1,14 +1,14 @@
1
- import { AsyncPipe, NgClass } from '@angular/common';
1
+ import { AsyncPipe, JsonPipe, 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, ChangeDetectorRef, viewChild, ElementRef, Directive } from '@angular/core';
3
+ import { forwardRef, inject, Injector, DestroyRef, input, booleanAttribute, output, viewChild, signal, computed, effect, Component, ChangeDetectionStrategy, ChangeDetectorRef, ElementRef, Directive } from '@angular/core';
4
4
  import { takeUntilDestroyed, toObservable as toObservable$1 } from '@angular/core/rxjs-interop';
5
5
  import * as i1$1 from '@angular/forms';
6
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
- import { AutoCompleteModule } from 'primeng/autocomplete';
11
- import { ReplaySubject, take, switchMap, of, merge, combineLatest, tap, map as map$1 } from 'rxjs';
10
+ import { AutoComplete, AutoCompleteModule } from 'primeng/autocomplete';
11
+ import { ReplaySubject, take, switchMap, of, merge, Subject, distinctUntilChanged, debounceTime, 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
14
  import * as i2$1 from 'primeng/calendar';
@@ -52,6 +52,7 @@ class AutocompleteComponent {
52
52
  this.disabledInput = input(false, { transform: booleanAttribute, alias: 'disabled' });
53
53
  this.valueChange = output();
54
54
  this.blur = output();
55
+ this.primeAutocomplete = viewChild(AutoComplete);
55
56
  this.isInited = false;
56
57
  this.searchSubscription = null;
57
58
  this.dataProviderService = null;
@@ -205,7 +206,11 @@ class AutocompleteComponent {
205
206
  */
206
207
  onBlur(event) {
207
208
  this.isFocused = false;
208
- if (!this.isPanelShown) {
209
+ const inputSearchVal = this.primeAutocomplete()?.inputEL?.nativeElement?.value;
210
+ if (this.autoClear() && this._value != null && (inputSearchVal == null || inputSearchVal === '')) {
211
+ this.propagateValueChange(null);
212
+ }
213
+ else if (!this.isPanelShown) {
209
214
  this.selectFirstItem();
210
215
  }
211
216
  this.onTouchedFn();
@@ -431,7 +436,7 @@ class AutocompleteComponent {
431
436
  }
432
437
  }
433
438
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
434
- 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 (onUnselect)=\"onUnselect($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 }); }
439
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.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], viewQueries: [{ propertyName: "primeAutocomplete", first: true, predicate: AutoComplete, descendants: true, isSignal: true }], 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 (onUnselect)=\"onUnselect($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 }); }
435
440
  }
436
441
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: AutocompleteComponent, decorators: [{
437
442
  type: Component,
@@ -629,7 +634,8 @@ class DropdownComponent {
629
634
  this.firstTimeSettingItems = true;
630
635
  this.isDropdownPanelShown = false;
631
636
  // used with custom input functionality
632
- this.valueSuggestionProviderSubscription = null;
637
+ this.fetchedItems = [];
638
+ this.customInputSubject = new Subject();
633
639
  this.optionsLabelProperty = computed(() => {
634
640
  if (this.optionsLabelTranslate()) {
635
641
  // setup translation properties
@@ -664,36 +670,11 @@ class DropdownComponent {
664
670
  effect(() => {
665
671
  this._value = this.ngModelValue();
666
672
  });
667
- combineLatest([toObservable$1(this.dataProvider), toObservable$1(this.options)])
668
- .pipe(tap(() => this._loading.set(true)), switchMap(([dataProvider, options]) => {
669
- if (dataProvider) {
670
- this.dataProviderService = dataProvider.serviceType ? this.injector.get(dataProvider.serviceType) : null;
671
- return toObservable(dataProvider.lookup({ limit: 50 }, this.dataProviderService));
672
- }
673
- else {
674
- return of(options ?? []);
675
- }
676
- }), switchMap(items => this.transformItems(items)), takeUntilDestroyed())
677
- .subscribe({
678
- next: res => {
679
- this.setItems(res);
680
- if (this.inlineSearch()) {
681
- if (!this.valueSuggestionResultCacheSubject) {
682
- this.valueSuggestionResultCacheSubject = new ReplaySubject(1);
683
- }
684
- this.valueSuggestionResultCacheSubject?.next(res);
685
- }
686
- this._loading.set(false);
687
- this.selectFirstItem(); // only selects first item if selectFirstItemInput is set accordingly
688
- this.adjustValueOnItemsValuePropertyTypeMismatch();
689
- },
690
- error: err => {
691
- this.setItems([]);
692
- this._loading.set(false);
693
- const error = fromSubscribeError(err, 'DropdownComponentError');
694
- this.logger.log(error, getErrorLogLevel(error));
695
- }
696
- });
673
+ this.customInputSubject
674
+ .asObservable()
675
+ .pipe(distinctUntilChanged(), debounceTime(250), takeUntilDestroyed())
676
+ .subscribe(v => this.searchItems(v));
677
+ this.fetchItems();
697
678
  effect(() => {
698
679
  if (this.allowInput()) {
699
680
  if (this.optionsLabelProperty() && !this.optionsValueProperty()) {
@@ -741,66 +722,72 @@ class DropdownComponent {
741
722
  this.propagateValueChange(event.value);
742
723
  }
743
724
  if (this.allowInput()) {
744
- const optionsLabelProperty = this.optionsLabelProperty();
745
- let query = undefined;
746
- if (typeof event?.value === 'string' && event?.value.trim() === '') {
747
- return;
748
- }
749
- else if (typeof event.value === 'string') {
750
- query = this.trimValue(event.value);
751
- }
752
- this.valueSuggestionProviderSubscription?.unsubscribe();
753
- if (this.dataProvider()) {
754
- if (!this.inlineSearch()) {
755
- const params = {
756
- limit: 10
757
- };
758
- if (optionsLabelProperty) {
759
- params.sort = [{ property: optionsLabelProperty }];
760
- }
761
- if (query && query.length > 0 && optionsLabelProperty) {
762
- params.filters = {
763
- [optionsLabelProperty]: {
764
- value: query,
765
- matchMode: FilterMatchMode.StartsWith
766
- }
767
- };
768
- }
769
- this.valueSuggestionProviderSubscription = this.getLookup(params, query)
770
- .pipe(takeUntilDestroyed(this.destroyRef))
771
- .subscribe({
772
- next: items => {
773
- this.setItems(items);
774
- },
775
- error: err => {
776
- this.setItems([]);
777
- const error = fromSubscribeError(err, 'DropdownComponentError', {
778
- search: query,
779
- params: params
780
- });
781
- this.logger.log(error, getErrorLogLevel(error));
782
- }
783
- });
725
+ const query = typeof event.value !== 'string' || event.value.length === 0 ? undefined : this.trimValue(event.value);
726
+ this.customInputSubject.next(query);
727
+ }
728
+ }
729
+ searchItems(query) {
730
+ if (this.inlineSearch()) {
731
+ // no need to refetch, just set items from cached fetched items
732
+ this.setItems(this.fetchedItems, query);
733
+ }
734
+ else {
735
+ this.fetchItems(query);
736
+ }
737
+ }
738
+ fetchItems(query) {
739
+ this.optionsSubscription?.unsubscribe();
740
+ this.optionsSubscription = combineLatest([toObservable$1(this.dataProvider, { injector: this.injector }), toObservable$1(this.options, { injector: this.injector })])
741
+ .pipe(tap(() => this._loading.set(true)), switchMap(([dataProvider, options]) => {
742
+ if (dataProvider) {
743
+ if (!this.dataProviderService) {
744
+ this.dataProviderService = dataProvider.serviceType ? this.injector.get(dataProvider.serviceType) : null;
784
745
  }
785
- else if (this.valueSuggestionResultCacheSubject) {
786
- this.valueSuggestionProviderSubscription = this.valueSuggestionResultCacheSubject.pipe(take(1)).subscribe(result => {
787
- this.setItems(result, query);
788
- });
746
+ const params = {
747
+ limit: this.allowInput() ? 10 : 50
748
+ };
749
+ const optionsLabelProperty = this.optionsLabelProperty();
750
+ if (optionsLabelProperty) {
751
+ params.sort = [{ property: optionsLabelProperty }];
789
752
  }
753
+ if (query != null && optionsLabelProperty) {
754
+ params.filters = {
755
+ [optionsLabelProperty]: {
756
+ value: query,
757
+ matchMode: FilterMatchMode.StartsWith
758
+ }
759
+ };
760
+ }
761
+ return toObservable(dataProvider.lookup(params, this.dataProviderService, query));
790
762
  }
791
- else if (this.options().length > 0) {
792
- this.setItems(this.options(), query);
763
+ else {
764
+ return of(options ?? []);
793
765
  }
794
- }
766
+ }), switchMap(items => this.transformItems(items)), takeUntilDestroyed(this.destroyRef))
767
+ .subscribe({
768
+ next: res => {
769
+ this.fetchedItems = res;
770
+ this.setItems(res, query);
771
+ this._loading.set(false);
772
+ this.selectFirstItem(); // only selects first item if selectFirstItemInput is set accordingly
773
+ this.adjustValueOnItemsValuePropertyTypeMismatch();
774
+ },
775
+ error: err => {
776
+ this.setItems([], query);
777
+ this._loading.set(false);
778
+ const error = fromSubscribeError(err, 'DropdownComponentError');
779
+ this.logger.log(error, getErrorLogLevel(error));
780
+ }
781
+ });
795
782
  }
796
783
  /**
797
784
  * Sets the items in the dropdown. If a query is provided, the items will be filtered by the query (using a 'starts with' filter).
798
785
  *
799
786
  * @param items The items to set.
800
- * @param [query] The query to filter the items by.
801
787
  */
802
788
  setItems(items, query) {
803
789
  if (this.allowInput()) {
790
+ // just validate that items are as expected in case of allowing input
804
791
  if (items.length > 0) {
805
792
  // items can either be objects (with optionsValueProperty specifying a string property) or strings
806
793
  if (typeof items[0] === 'object') {
@@ -816,7 +803,7 @@ class DropdownComponent {
816
803
  }
817
804
  }
818
805
  }
819
- if (query) {
806
+ if (query && query.length > 0 && (this.inlineSearch() || this.allowInput())) {
820
807
  const queryLowerCase = query?.toLowerCase() ?? '';
821
808
  const filteredItems = items.filter(i => {
822
809
  let itemLabel = i;
@@ -928,21 +915,6 @@ class DropdownComponent {
928
915
  this.onChangeFn(value);
929
916
  this.valueChange.emit(value);
930
917
  }
931
- /**
932
- * Gets the lookup from the data provider.
933
- *
934
- * @param params The parameters to pass to the lookup.
935
- * @param [query] The search query to filter the items by.
936
- */
937
- getLookup(params, query) {
938
- const dataProvider = this.dataProvider();
939
- if (dataProvider) {
940
- return toObservable(dataProvider.lookup(params, this.dataProviderService, query)).pipe(switchMap(res => {
941
- return of(res ?? []);
942
- }));
943
- }
944
- return of([]);
945
- }
946
918
  /**
947
919
  * Trims the leading and/or trailing whitespace from the given value based on the search trimming mode.
948
920
  *
@@ -961,11 +933,11 @@ class DropdownComponent {
961
933
  }
962
934
  }
963
935
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
964
- 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 }, allowInput: { classPropertyName: "allowInput", publicName: "allowInput", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, inlineSearch: { classPropertyName: "inlineSearch", publicName: "inlineSearch", isSignal: true, isRequired: false, transformFunction: null }, searchTrim: { classPropertyName: "searchTrim", publicName: "searchTrim", 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 [editable]=\"allowInput()\"\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 }); }
936
+ 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 }, allowInput: { classPropertyName: "allowInput", publicName: "allowInput", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, inlineSearch: { classPropertyName: "inlineSearch", publicName: "inlineSearch", isSignal: true, isRequired: false, transformFunction: null }, searchTrim: { classPropertyName: "searchTrim", publicName: "searchTrim", 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 [editable]=\"allowInput()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [disabled]=\"disabled()\"\n [filter]=\"inlineSearch() && !allowInput()\"\n [filterBy]=\"optionsLabelProperty()\"\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 }); }
965
937
  }
966
938
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: DropdownComponent, decorators: [{
967
939
  type: Component,
968
- 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 [editable]=\"allowInput()\"\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" }]
940
+ args: [{ standalone: true, selector: 'mng-dropdown', providers: [DROPDOWN_VALUE_ACCESSOR], imports: [DropdownModule, MultiSelectModule, TranslateModule, FormsModule, JsonPipe], 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 [editable]=\"allowInput()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [disabled]=\"disabled()\"\n [filter]=\"inlineSearch() && !allowInput()\"\n [filterBy]=\"optionsLabelProperty()\"\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" }]
969
941
  }], ctorParameters: () => [] });
970
942
 
971
943
  const NUMBER_RANGE_VALUE_ACCESSOR = {