@mediusinc/mng-commons 5.4.0 → 5.5.0-rc.1
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.
- package/core/descriptors/table.descriptor.d.ts +4 -2
- package/core/directives/rerender.directive.d.ts +9 -0
- package/core/helpers/route.d.ts +25 -25
- package/core/index.d.ts +2 -0
- package/core/models/version.model.d.ts +16 -4
- package/core/reactivity/effect.d.ts +16 -0
- package/esm2022/core/components/notification/notification-wrapper.component.mjs +4 -4
- package/esm2022/core/components/pages/error/error.page.component.mjs +4 -4
- package/esm2022/core/components/pages/not-found/not-found.page.component.mjs +4 -4
- package/esm2022/core/data-list/data-list-params-helpers.mjs +18 -3
- package/esm2022/core/descriptors/table.descriptor.mjs +1 -1
- package/esm2022/core/directives/component.directive.mjs +4 -4
- package/esm2022/core/directives/rerender.directive.mjs +25 -0
- package/esm2022/core/directives/template.directive.mjs +4 -4
- package/esm2022/core/index.mjs +4 -1
- package/esm2022/core/models/version.model.mjs +1 -1
- package/esm2022/core/pipes/boolean.pipe.mjs +6 -6
- package/esm2022/core/pipes/class-map.pipe.mjs +4 -4
- package/esm2022/core/pipes/enum.pipe.mjs +4 -4
- package/esm2022/core/pipes/enumerate-async.pipe.mjs +4 -4
- package/esm2022/core/pipes/enumerate.pipe.mjs +4 -4
- package/esm2022/core/pipes/getter.pipe.mjs +5 -5
- package/esm2022/core/pipes/i18n-property.pipe.mjs +4 -4
- package/esm2022/core/pipes/json-path.pipe.mjs +4 -4
- package/esm2022/core/pipes/parametrize.pipe.mjs +4 -4
- package/esm2022/core/pipes/template.pipe.mjs +4 -4
- package/esm2022/core/reactivity/effect.mjs +22 -0
- package/esm2022/core/security/permission.service.mjs +4 -4
- package/esm2022/core/services/commons-init.service.mjs +4 -4
- package/esm2022/core/services/commons-router.service.mjs +4 -4
- package/esm2022/core/services/commons-storage.service.mjs +4 -4
- package/esm2022/core/services/commons.service.mjs +8 -8
- package/esm2022/filter/descriptors/filter-lookup.descriptor.mjs +32 -25
- package/esm2022/filter/descriptors/filter.descriptor.mjs +53 -1
- package/esm2022/form/components/autocomplete/autocomplete.component.mjs +4 -4
- package/esm2022/form/components/date-range/date-range.component.mjs +4 -4
- package/esm2022/form/components/dropdown/dropdown.component.mjs +4 -4
- package/esm2022/form/components/number-range/number-range.component.mjs +4 -4
- package/esm2022/form/directives/input-trim.directive.mjs +4 -4
- package/esm2022/table/api/descriptors/sort.descriptor.mjs +2 -2
- package/esm2022/table/api/descriptors/table.descriptor.mjs +31 -7
- package/esm2022/table/components/column-filter/column-filter.component.mjs +33 -40
- package/esm2022/table/components/column-value/column-value.component.mjs +6 -6
- package/esm2022/table/components/filter/filter-active-tag/filter-active-tag.component.mjs +7 -7
- package/esm2022/table/components/filter/filter-form/filter-form.component.mjs +28 -35
- package/esm2022/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.mjs +44 -45
- package/esm2022/table/components/table/table.component.mjs +114 -430
- package/esm2022/table/helpers/filters.mjs +9 -25
- package/esm2022/table/helpers/table.mjs +24 -0
- package/esm2022/table/index.mjs +2 -2
- package/esm2022/table/models/column-preferences.model.mjs +1 -1
- package/esm2022/table/models/filter.model.mjs +1 -1
- package/esm2022/table/pipes/filter-value.pipe.mjs +4 -4
- package/esm2022/table/pipes/locale-default-row-class.pipe.mjs +4 -4
- package/esm2022/table/pipes/table-column-filter-class.pipe.mjs +4 -4
- package/esm2022/table/services/table-data.service.mjs +194 -0
- package/esm2022/table/services/table-metadata.service.mjs +136 -0
- package/esm2022/table/services/table-preferences.service.mjs +142 -0
- package/esm2022/tableview/action/components/action/action.component.mjs +6 -7
- package/esm2022/tableview/action/components/editor/action-editor.component.mjs +4 -4
- package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +69 -46
- package/esm2022/tableview/action/components/localization/data-language-dropdown.component.mjs +4 -4
- package/esm2022/tableview/action/components/route/action-route.component.mjs +5 -6
- package/esm2022/tableview/action/components/table/action-table.component.mjs +6 -6
- package/esm2022/tableview/action/helpers/action-execution.mjs +25 -0
- package/esm2022/tableview/action/models/execution/action-instance.model.mjs +2 -3
- package/esm2022/tableview/action/services/action-executor.service.mjs +12 -79
- package/esm2022/tableview/action/services/component-action-executor.service.mjs +4 -4
- package/esm2022/tableview/action/services/data-provider-executor.service.mjs +4 -4
- package/esm2022/tableview/action/services/navigation.service.mjs +4 -4
- package/esm2022/tableview/action/services/root-action-executor.service.mjs +4 -4
- package/esm2022/tableview/action/services/view-container.service.mjs +4 -4
- package/esm2022/tableview/api/action/descriptors/action-confirmation.descriptor.mjs +13 -1
- package/esm2022/tableview/api/action/descriptors/action-editor.descriptor.mjs +67 -10
- package/esm2022/tableview/api/action/descriptors/action-link-descriptor.factory.mjs +2 -2
- package/esm2022/tableview/api/action/descriptors/action-link.descriptor.mjs +17 -1
- package/esm2022/tableview/api/action/descriptors/action.descriptor.mjs +32 -7
- package/esm2022/tableview/api/action/models/execution/action-instance-state.model.mjs +2 -2
- package/esm2022/tableview/api/editor/descriptors/field-many.descriptor.mjs +2 -1
- package/esm2022/tableview/api/editor/models/formly-custom-field.model.mjs +4 -4
- package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +13 -5
- package/esm2022/tableview/api/tableview/helpers/tableview-default-actions.mjs +3 -2
- package/esm2022/tableview/api/tableview/helpers/tableview-descriptor-helpers.mjs +2 -2
- package/esm2022/tableview/editor/components/editor/auto-save-status/auto-save-status.component.mjs +4 -4
- package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +31 -38
- package/esm2022/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +7 -5
- package/esm2022/tableview/editor/components/formly/fields/formly-field-custom/formly-field-custom.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.mjs +7 -5
- package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +7 -5
- package/esm2022/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.mjs +5 -5
- package/esm2022/tableview/editor/components/formly/fields/formly-field-label/formly-field-label.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +5 -6
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +5 -6
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +6 -7
- package/esm2022/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-type.abstract.component.mjs +6 -5
- package/esm2022/tableview/editor/components/formly/pipes/formly-field-label.pipe.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +4 -4
- package/esm2022/tableview/editor/helpers/editor-autosave.mjs +2 -2
- package/esm2022/tableview/editor/services/form-editor.service.mjs +4 -4
- package/esm2022/tableview/index.mjs +1 -2
- package/esm2022/tableview/tableview/components/route/tableview-route.component.mjs +4 -4
- package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +4 -4
- package/fesm2022/mediusinc-mng-commons-core.mjs +130 -71
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-filter.mjs +83 -24
- package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +15 -15
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-model.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs +31 -7
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +704 -606
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +146 -26
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +260 -317
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons.mjs.map +1 -1
- package/filter/descriptors/filter-lookup.descriptor.d.ts +17 -20
- package/filter/descriptors/filter.descriptor.d.ts +32 -2
- package/form/components/date-range/date-range.component.d.ts +3 -3
- package/form/components/number-range/number-range.component.d.ts +2 -2
- package/package.json +4 -4
- package/table/api/descriptors/column.descriptor.d.ts +1 -1
- package/table/api/descriptors/sort.descriptor.d.ts +2 -2
- package/table/api/descriptors/table.descriptor.d.ts +20 -6
- package/table/components/column-filter/column-filter.component.d.ts +8 -14
- package/table/components/filter/filter-active-tag/filter-active-tag.component.d.ts +5 -5
- package/table/components/filter/filter-form/filter-form.component.d.ts +10 -19
- package/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.d.ts +11 -13
- package/table/components/table/table.component.d.ts +20 -64
- package/table/helpers/filters.d.ts +4 -7
- package/table/helpers/table.d.ts +6 -0
- package/table/index.d.ts +1 -1
- package/table/models/column-preferences.model.d.ts +2 -2
- package/table/models/filter.model.d.ts +14 -2
- package/table/services/table-data.service.d.ts +36 -0
- package/table/services/table-metadata.service.d.ts +31 -0
- package/table/services/table-preferences.service.d.ts +25 -0
- package/tableview/action/components/editor/injector-context/action-editor-injector-context.component.d.ts +4 -7
- package/tableview/action/components/localization/data-language-dropdown.component.d.ts +1 -1
- package/tableview/action/helpers/action-execution.d.ts +7 -0
- package/tableview/action/models/execution/action-instance.model.d.ts +1 -2
- package/tableview/action/services/action-executor.service.d.ts +1 -2
- package/tableview/api/action/descriptors/action-confirmation.descriptor.d.ts +1 -0
- package/tableview/api/action/descriptors/action-editor.descriptor.d.ts +12 -4
- package/tableview/api/action/descriptors/action-link.descriptor.d.ts +1 -0
- package/tableview/api/action/descriptors/action.descriptor.d.ts +5 -3
- package/tableview/api/action/models/execution/action-instance-state.model.d.ts +1 -1
- package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +4 -10
- package/tableview/api/editor/descriptors/field-group.descriptor.d.ts +1 -1
- package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +6 -4
- package/tableview/editor/components/editor/form-editor.component.d.ts +3 -2
- package/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.d.ts +1 -1
- package/tableview/editor/components/formly/fields/formly-field-type.abstract.component.d.ts +2 -1
- package/tableview/index.d.ts +0 -1
- package/version-info.json +6 -6
- package/esm2022/table/services/data-list.service.mjs +0 -29
- package/esm2022/tableview/action/models/execution/action-instance-state.model.mjs +0 -32
- package/table/services/data-list.service.d.ts +0 -19
- package/tableview/action/models/execution/action-instance-state.model.d.ts +0 -30
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommonsInternalError, LoggerService, fromEnumValuesAsValueArray, fromEnumConstantsAsValueArray, getEnumConstantName } from '@mediusinc/mng-commons/core';
|
|
1
|
+
import { CommonsInternalError, LoggerService, FilterMatchMode, fromEnumValuesAsValueArray, fromEnumConstantsAsValueArray, getEnumConstantName } from '@mediusinc/mng-commons/core';
|
|
2
2
|
import { of } from 'rxjs';
|
|
3
3
|
import { LookupDataProviderInst } from '@mediusinc/mng-commons/form/api';
|
|
4
4
|
import { findClassIdAttribute, trySetLookupItemsProperties } from '@mediusinc/mng-commons/model';
|
|
@@ -203,6 +203,11 @@ class FilterDescriptor {
|
|
|
203
203
|
* @param value Value for default filter.
|
|
204
204
|
* @param matchMode Match mode for default filter.
|
|
205
205
|
*/
|
|
206
|
+
/**
|
|
207
|
+
* Sets default filter value for filter.
|
|
208
|
+
*
|
|
209
|
+
* @deprecated Use {withDefaultFilterValue} instead.
|
|
210
|
+
*/
|
|
206
211
|
withDefaultFilter(value, matchMode) {
|
|
207
212
|
this._hasDefaultValue = true;
|
|
208
213
|
this._defaultValue = value;
|
|
@@ -210,6 +215,41 @@ class FilterDescriptor {
|
|
|
210
215
|
this.validateDefaultFilter(value, matchMode);
|
|
211
216
|
return this;
|
|
212
217
|
}
|
|
218
|
+
/**
|
|
219
|
+
* Sets the default value for a filter with the specified match mode.
|
|
220
|
+
*
|
|
221
|
+
* @param {FilterMatchModeType} matchMode - The match mode of the filter.
|
|
222
|
+
* @param {FilterModel | FilterModel[]} [value] - The default value(s) for the filter. Type of value differs based on match mode and filter model.
|
|
223
|
+
*/
|
|
224
|
+
withDefaultValue(matchMode, value) {
|
|
225
|
+
return this.withDefaultValueUnsafe(matchMode, value);
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Sets the default value for a filter with the specified match mode.
|
|
229
|
+
*
|
|
230
|
+
* This function is UNSAFE!
|
|
231
|
+
*
|
|
232
|
+
* @param {FilterMatchModeType} matchMode - The match mode of the filter.
|
|
233
|
+
* @param {FilterModel | FilterModel[]} [value] - The default value(s) for the filter. Type of value differs based on match mode and filter model.
|
|
234
|
+
*/
|
|
235
|
+
withDefaultValueUnsafe(matchMode, value) {
|
|
236
|
+
this._hasDefaultValue = true;
|
|
237
|
+
this._defaultValue = value;
|
|
238
|
+
this._defaultMatchMode = matchMode;
|
|
239
|
+
if (matchMode) {
|
|
240
|
+
this.validateDefaultFilter(value, matchMode);
|
|
241
|
+
}
|
|
242
|
+
return this;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Turns of the default value and match mode for filter.
|
|
246
|
+
*/
|
|
247
|
+
withoutDefaultValue() {
|
|
248
|
+
this._hasDefaultValue = false;
|
|
249
|
+
this._defaultValue = undefined;
|
|
250
|
+
this._defaultMatchMode = undefined;
|
|
251
|
+
return this;
|
|
252
|
+
}
|
|
213
253
|
validateDefaultFilter(value, matchMode) {
|
|
214
254
|
if (matchMode === 'between' && value != null && (!Array.isArray(value) || value.filter(v => v != null).length !== 2)) {
|
|
215
255
|
throw new CommonsInternalError(`Default value for filter match mode ${matchMode} must provide exactly 2 values in array`);
|
|
@@ -365,6 +405,18 @@ class FilterDescriptor {
|
|
|
365
405
|
this._matchModes = matchModes;
|
|
366
406
|
return this;
|
|
367
407
|
}
|
|
408
|
+
/**
|
|
409
|
+
* Sets default match mode for this filter. If non provided, the default is applied. If custom match modes are provided, it will be validated against it.
|
|
410
|
+
*
|
|
411
|
+
* @param matchMode Match mode option.
|
|
412
|
+
*/
|
|
413
|
+
withDefaultMatchMode(matchMode) {
|
|
414
|
+
if (matchMode != null && Array.isArray(this._matchModes) && !this._matchModes.includes(matchMode)) {
|
|
415
|
+
throw new CommonsInternalError(`Filter match mode ${matchMode} cannot be set for property ${this._property}, because custom match modes do not include it.`);
|
|
416
|
+
}
|
|
417
|
+
this._defaultMatchMode = matchMode;
|
|
418
|
+
return this;
|
|
419
|
+
}
|
|
368
420
|
/**
|
|
369
421
|
* Filter title. If non provided, the defaults are applied.
|
|
370
422
|
*
|
|
@@ -417,7 +469,6 @@ class FilterLookupDescriptor extends FilterDescriptor {
|
|
|
417
469
|
super(property);
|
|
418
470
|
this._lookupType = FilterLookupTypeEnum.Dropdown;
|
|
419
471
|
this._optionsLabelTranslate = false;
|
|
420
|
-
this._multiselect = false;
|
|
421
472
|
this._dropdownClassName = 'mng-filter-lookup-dropdown';
|
|
422
473
|
this._filterType = FilterTypeEnum.Lookup;
|
|
423
474
|
if (cfg?.dataProvider) {
|
|
@@ -426,7 +477,8 @@ class FilterLookupDescriptor extends FilterDescriptor {
|
|
|
426
477
|
else {
|
|
427
478
|
this._dataProvider = new LookupDataProviderInst(cfg?.type, cfg?.serviceType);
|
|
428
479
|
}
|
|
429
|
-
this._optionsValueProperty =
|
|
480
|
+
this._optionsValueProperty =
|
|
481
|
+
typeof cfg?.optionsValueProperty === 'undefined' ? (findClassIdAttribute(this._dataProvider.classType) ?? undefined) : cfg?.optionsValueProperty;
|
|
430
482
|
trySetLookupItemsProperties(this, false);
|
|
431
483
|
}
|
|
432
484
|
get lookupType() {
|
|
@@ -444,9 +496,6 @@ class FilterLookupDescriptor extends FilterDescriptor {
|
|
|
444
496
|
get optionsValueProperty() {
|
|
445
497
|
return this._optionsValueProperty ?? undefined;
|
|
446
498
|
}
|
|
447
|
-
get multiselect() {
|
|
448
|
-
return this._multiselect;
|
|
449
|
-
}
|
|
450
499
|
get autocompleteOpenOnFocus() {
|
|
451
500
|
return this._autocompleteOpenOnFocus;
|
|
452
501
|
}
|
|
@@ -499,15 +548,6 @@ class FilterLookupDescriptor extends FilterDescriptor {
|
|
|
499
548
|
this._dataProvider.withLookup(lookup);
|
|
500
549
|
return this;
|
|
501
550
|
}
|
|
502
|
-
/**
|
|
503
|
-
* Sets multiselect for lookups.
|
|
504
|
-
*
|
|
505
|
-
* @param multiselect Enables/disables the feature.
|
|
506
|
-
*/
|
|
507
|
-
withMultiselect(multiselect = true) {
|
|
508
|
-
this._multiselect = multiselect;
|
|
509
|
-
return this;
|
|
510
|
-
}
|
|
511
551
|
/**
|
|
512
552
|
* Sets the dropdown class name.
|
|
513
553
|
* @param dropdownClassName Class name for dropdown.
|
|
@@ -517,17 +557,32 @@ class FilterLookupDescriptor extends FilterDescriptor {
|
|
|
517
557
|
return this;
|
|
518
558
|
}
|
|
519
559
|
/**
|
|
520
|
-
*
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
560
|
+
* @deprecated use {withMatchModes} if you want to limit match mode options to 'in' and 'notIn'.
|
|
561
|
+
*/
|
|
562
|
+
withMultiselect(multiselect = true) {
|
|
563
|
+
if (multiselect) {
|
|
564
|
+
this.withMatchModes([FilterMatchMode.In, FilterMatchMode.NotIn, FilterMatchMode.Exists, FilterMatchMode.DoesNotExist]);
|
|
565
|
+
}
|
|
566
|
+
else {
|
|
567
|
+
this.withMatchModes();
|
|
568
|
+
}
|
|
569
|
+
return this;
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* @deprecated Use {withDefaultFilterValue} instead.
|
|
524
573
|
*/
|
|
525
574
|
withDefaultFilter(value, matchMode) {
|
|
526
575
|
this._hasDefaultValue = true;
|
|
527
576
|
this._defaultValue = value;
|
|
528
577
|
this._defaultMatchMode = matchMode;
|
|
529
578
|
this.validateDefaultFilter(value, matchMode);
|
|
530
|
-
|
|
579
|
+
const isMultiselect = Array.isArray(this._matchModes) &&
|
|
580
|
+
this._matchModes.length === 4 &&
|
|
581
|
+
this._matchModes[0] === FilterMatchMode.In &&
|
|
582
|
+
this._matchModes[1] === FilterMatchMode.NotIn &&
|
|
583
|
+
this._matchModes[1] === FilterMatchMode.Exists &&
|
|
584
|
+
this._matchModes[1] === FilterMatchMode.DoesNotExist;
|
|
585
|
+
if ((Array.isArray(value) && !isMultiselect) || (isMultiselect && !Array.isArray(value))) {
|
|
531
586
|
throw new CommonsInternalError(`Default value not in correct format for property ${this._property}.`, { name: 'FilterDescriptorError' });
|
|
532
587
|
}
|
|
533
588
|
return this;
|
|
@@ -559,7 +614,6 @@ class FilterLookupDescriptor extends FilterDescriptor {
|
|
|
559
614
|
filter._lookupType = this._lookupType;
|
|
560
615
|
filter._optionsLabelProperty = this._optionsLabelProperty;
|
|
561
616
|
filter._optionsLabelTranslate = this._optionsLabelTranslate;
|
|
562
|
-
filter._multiselect = this._multiselect;
|
|
563
617
|
filter._dropdownClassName = this._dropdownClassName;
|
|
564
618
|
filter._autocompleteOpenOnFocus = this._autocompleteOpenOnFocus;
|
|
565
619
|
filter._autocompleteInlineSearch = this._autocompleteInlineSearch;
|
|
@@ -596,11 +650,17 @@ class FilterLookupEnumDescriptor extends FilterLookupDescriptor {
|
|
|
596
650
|
});
|
|
597
651
|
return this;
|
|
598
652
|
}
|
|
653
|
+
/**
|
|
654
|
+
* @deprecated use {withMatchModes} if you want to limit match mode options to 'in' and 'notIn'.
|
|
655
|
+
*/
|
|
599
656
|
withMultiselectEnum(multiselect = true) {
|
|
600
|
-
|
|
657
|
+
super.withMultiselect(multiselect);
|
|
658
|
+
return this;
|
|
601
659
|
}
|
|
602
660
|
/**
|
|
603
661
|
* Do not use, use `withDefaultFilterEnum` instead.
|
|
662
|
+
*
|
|
663
|
+
* @deprecated Use {withDefaultFilterValue} instead.
|
|
604
664
|
*/
|
|
605
665
|
withDefaultFilter() {
|
|
606
666
|
throw new CommonsInternalError(`withDefaultFilter on FilterLookupEnumDescriptor should not be used. Use withDefaultFilterEnum instead.`, { name: 'FilterDescriptorError' });
|
|
@@ -608,8 +668,7 @@ class FilterLookupEnumDescriptor extends FilterLookupDescriptor {
|
|
|
608
668
|
/**
|
|
609
669
|
* Sets default filter value for filter.
|
|
610
670
|
*
|
|
611
|
-
* @
|
|
612
|
-
* @param matchMode Match mode for default filter.
|
|
671
|
+
* @deprecated Use {withDefaultFilterValue} instead.
|
|
613
672
|
*/
|
|
614
673
|
withDefaultFilterEnum(value, matchMode) {
|
|
615
674
|
let defaultOptionValue;
|
|
@@ -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 _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,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACN,IAAA,cAAA,CAAA,cAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO,CAAA;AACP,IAAA,cAAA,CAAA,cAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI,CAAA;AACJ,IAAA,cAAA,CAAA,cAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACN,IAAA,cAAA,CAAA,cAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU,CAAA;AACd,CAAC,EAPW,cAAc,KAAd,cAAc,GAOzB,EAAA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Y,CAAC,KAAK,CAAC,CAAC;AACzB,QAAA,OAAO,KAAK,CAAC;KAChB;AACJ;;MCzUY,uBAAuB,CAAA;AAKhC,IAAA,WAAA,CAAY,0BAAyE,EAAA;AACjF,QAAA,IAAI,CAAC,eAAe,GAAG,0BAA0B,CAAC;KACrD;;AAGD,IAAA,IAAW,cAAc,GAAA;QACrB,OAAO,IAAI,CAAC,eAAe,CAAC;KAC/B;AAED,IAAA,IAAW,cAAc,GAAA;QACrB,OAAO,IAAI,CAAC,eAAe,CAAC;KAC/B;;AAGD,IAAA,IAAW,WAAW,GAAA;QAClB,OAAO,IAAI,CAAC,YAAY,CAAC;KAC5B;AAEM,IAAA,eAAe,CAAC,WAA8D,EAAA;AACjF,QAAA,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;AAChC,QAAA,OAAO,IAAI,CAAC;KACf;IAEM,kBAAkB,CAAC,MAAM,GAAG,IAAI,EAAA;AACnC,QAAA,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC;AAC9B,QAAA,OAAO,IAAI,CAAC;KACf;IAEM,IAAI,GAAA;QACP,MAAM,UAAU,GAAG,IAAI,uBAAuB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AACrE,QAAA,UAAU,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;AAClD,QAAA,UAAU,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;AAC5C,QAAA,OAAO,UAAU,CAAC;KACrB;AACJ;;AC3CD;;ACAA;;AAEG;;;;"}
|
|
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, FilterMatchModeType, IFilterDescriptor, ILookupDataProvider, LoggerService} from '@mediusinc/mng-commons/core';\nimport {InputTrimType} 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\n /**\n * Sets default filter value for filter.\n *\n * @deprecated Use {withDefaultFilterValue} instead.\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 public withDefaultValue(matchMode: 'exists' | 'doesNotExist'): this;\n public withDefaultValue(matchMode: 'between', value: [FilterModel, FilterModel]): this;\n public withDefaultValue(matchMode: 'in' | 'notIn', value: FilterModel[]): this;\n public withDefaultValue(\n matchMode: 'lessThan' | 'lessThanOrEqualTo' | 'greaterThan' | 'greaterThanOrEqualTo',\n value: FilterModel extends number | Date ? FilterModel : never\n ): this;\n public withDefaultValue(matchMode: 'contains' | 'notContains' | 'startsWith' | 'endsWith', value: FilterModel extends string ? FilterModel : never): this;\n public withDefaultValue(matchMode: 'equals' | 'notEquals', value: FilterModel): this;\n /**\n * Sets the default value for a filter with the specified match mode.\n *\n * @param {FilterMatchModeType} matchMode - The match mode of the filter.\n * @param {FilterModel | FilterModel[]} [value] - The default value(s) for the filter. Type of value differs based on match mode and filter model.\n */\n public withDefaultValue(matchMode: FilterMatchModeType, value?: FilterModel | FilterModel[] | undefined): this {\n return this.withDefaultValueUnsafe(matchMode, value);\n }\n\n /**\n * Sets the default value for a filter with the specified match mode.\n *\n * This function is UNSAFE!\n *\n * @param {FilterMatchModeType} matchMode - The match mode of the filter.\n * @param {FilterModel | FilterModel[]} [value] - The default value(s) for the filter. Type of value differs based on match mode and filter model.\n */\n public withDefaultValueUnsafe(matchMode?: string, value?: any | any[] | undefined): this {\n this._hasDefaultValue = true;\n this._defaultValue = value;\n this._defaultMatchMode = matchMode;\n if (matchMode) {\n this.validateDefaultFilter(value, matchMode);\n }\n return this;\n }\n\n /**\n * Turns of the default value and match mode for filter.\n */\n public withoutDefaultValue(): this {\n this._hasDefaultValue = false;\n this._defaultValue = undefined;\n this._defaultMatchMode = undefined;\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: ILookupDataProvider<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 * Sets default match mode for this filter. If non provided, the default is applied. If custom match modes are provided, it will be validated against it.\n *\n * @param matchMode Match mode option.\n */\n public withDefaultMatchMode(matchMode?: FilterMatchModeExtendedType): this {\n if (matchMode != null && Array.isArray(this._matchModes) && !this._matchModes.includes(matchMode)) {\n throw new CommonsInternalError(`Filter match mode ${matchMode} cannot be set for property ${this._property}, because custom match modes do not include it.`);\n }\n this._defaultMatchMode = matchMode;\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 FilterMatchMode,\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, FilterValue = FilterModel, Sorts = keyof FilterModel, Filters extends keyof any = keyof FilterModel>\n extends FilterDescriptor<FilterValue, 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\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 =\n 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 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 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 * @deprecated use {withMatchModes} if you want to limit match mode options to 'in' and 'notIn'.\n */\n public withMultiselect(multiselect = true): this {\n if (multiselect) {\n this.withMatchModes([FilterMatchMode.In, FilterMatchMode.NotIn, FilterMatchMode.Exists, FilterMatchMode.DoesNotExist]);\n } else {\n this.withMatchModes();\n }\n return this;\n }\n\n /**\n * @deprecated Use {withDefaultFilterValue} instead.\n */\n public override withDefaultFilter(value: FilterValue | FilterValue[] | undefined, matchMode: FilterMatchModeExtendedType): this {\n this._hasDefaultValue = true;\n this._defaultValue = value;\n this._defaultMatchMode = matchMode;\n\n this.validateDefaultFilter(value, matchMode);\n\n const isMultiselect =\n Array.isArray(this._matchModes) &&\n this._matchModes.length === 4 &&\n this._matchModes[0] === FilterMatchMode.In &&\n this._matchModes[1] === FilterMatchMode.NotIn &&\n this._matchModes[1] === FilterMatchMode.Exists &&\n this._matchModes[1] === FilterMatchMode.DoesNotExist;\n if ((Array.isArray(value) && !isMultiselect) || (isMultiselect && !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, FilterValue, Sorts, Filters> {\n const descriptor = new FilterLookupDescriptor<FilterModel, TableModel, Service, FilterValue, 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, FilterValue, Sorts, Filters>) {\n super.copyFieldsTo(filter);\n filter._lookupType = this._lookupType;\n filter._optionsLabelProperty = this._optionsLabelProperty;\n filter._optionsLabelTranslate = this._optionsLabelTranslate;\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, EnumConstantType, 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 /**\n * @deprecated use {withMatchModes} if you want to limit match mode options to 'in' and 'notIn'.\n */\n public withMultiselectEnum(multiselect = true): this {\n super.withMultiselect(multiselect);\n return this;\n }\n\n /**\n * Do not use, use `withDefaultFilterEnum` instead.\n *\n * @deprecated Use {withDefaultFilterValue} 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 * @deprecated Use {withDefaultFilterValue} instead.\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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-commons-form-api.mjs","sources":["../../form/api/src/data-providers/lookup.data-provider.ts","../../form/api/src/data-providers/lookup-data-provider.factory.ts","../../form/api/src/descriptors/button-style.builder.ts","../../form/api/src/descriptors/action-button.descriptor.ts","../../form/api/src/index.ts","../../form/api/src/mediusinc-mng-commons-form-api.ts"],"sourcesContent":["import {ClassOptType, DataProviderInst, ILookupDataProvider, LookupDataProviderLookupFnType, ServiceClassOptType} from '@mediusinc/mng-commons/core';\n\nexport class LookupDataProviderInst<\n Model,\n Service = any,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n ModelClass = ClassOptType<Model>,\n ServiceClass = ServiceClassOptType<Service>\n >\n extends DataProviderInst<Model, Service, ModelClass, ServiceClass>\n implements ILookupDataProvider<Model, Service, Sorts, Filters, ModelClass, ServiceClass>\n{\n protected _lookup: LookupDataProviderLookupFnType<Model, Service, Sorts, Filters> = () => [];\n\n public constructor(type: ModelClass, serviceType: ServiceClass) {\n super(type, serviceType);\n }\n\n get lookup() {\n return this._lookup;\n }\n\n withLookup(fn: LookupDataProviderLookupFnType<Model, Service, Sorts, Filters>): this {\n this._lookup = fn;\n return this;\n }\n}\n","import {ClassType, ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor, TypeDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {LookupDataProviderInst} from './lookup.data-provider';\n\nexport class LookupDataProvider extends LookupDataProviderInst<any> {\n protected constructor() {\n super(undefined, undefined);\n }\n\n public static create<Model, Sorts = keyof Model, Filters extends keyof any = keyof Model>(): LookupDataProviderInst<Model, undefined, Sorts, Filters, undefined, undefined> {\n return lookupDataProvider<Model, Sorts, Filters>();\n }\n\n public static fromClass<Model, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n type: ClassType<Model>\n ): LookupDataProviderInst<Model, undefined, Sorts, Filters, ClassType<Model>, undefined> {\n return lookupDataProviderFromClass<Model, Sorts, Filters>(type);\n }\n\n public static fromClassWithService<Model, Service, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n type: ClassType<Model>,\n serviceType: ServiceClassType<Service>\n ): LookupDataProviderInst<Model, Service, Sorts, Filters, ClassType<Model>, ServiceClassType<Service>> {\n return lookupDataProviderFromClass<Model, Service, Sorts, Filters>(type, serviceType);\n }\n\n public static fromService<Service, Model, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n serviceType: ServiceClassType<Service>\n ): LookupDataProviderInst<Model, Service, Sorts, Filters, undefined, ServiceClassType<Service>> {\n return lookupDataProviderWithService<Service, Model, Sorts, Filters>(serviceType);\n }\n}\n\nexport type LookupDataProviderCreateOptsType<TableModel, Sorts = keyof TableModel, Filters = keyof TableModel> = {\n filtersType?: TypeDescriptor<Filters>;\n sortsType?: TypeDescriptor<Sorts>;\n};\n\nexport function lookupDataProvider<Model, Sorts = keyof Model, Filters extends keyof any = keyof Model>(): LookupDataProviderInst<\n Model,\n undefined,\n Sorts,\n Filters,\n undefined,\n undefined\n>;\nexport function lookupDataProvider<Model, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n type: TypeDescriptor<Model>,\n opts?: LookupDataProviderCreateOptsType<Model, Sorts, Filters>\n): LookupDataProviderInst<Model, undefined, Sorts, Filters, undefined, undefined>;\nexport function lookupDataProvider<Model, Service = any, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n type: TypeDescriptor<Model>,\n serviceType: ServiceClassType<Service>,\n opts?: LookupDataProviderCreateOptsType<Model, Sorts, Filters>\n): LookupDataProviderInst<Model, Service, Sorts, Filters, undefined, ServiceClassType<Service>>;\nexport function lookupDataProvider<Model, Service = any, Sorts = keyof Model, Filters extends keyof any = keyof Model, ServiceClass = ServiceClassType<Service>>(\n type?: TypeDescriptor<Model>,\n serviceTypeOrOpts?: ServiceClass | LookupDataProviderCreateOptsType<Model, Sorts, Filters>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n opts?: LookupDataProviderCreateOptsType<Model, Sorts, Filters>\n) {\n if (serviceTypeOrOpts === undefined || typeof serviceTypeOrOpts === 'function') {\n return new LookupDataProviderInst<Model, Service, Sorts, Filters, undefined, ServiceClass>(undefined, serviceTypeOrOpts as ServiceClass);\n } else {\n return new LookupDataProviderInst<Model, Service, Sorts, Filters, undefined, ServiceClass>(undefined, undefined as ServiceClass);\n }\n}\n\nexport function lookupDataProviderWithService<Service, Model, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n serviceType: ServiceClassType<Service>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n opts?: LookupDataProviderCreateOptsType<Model, Sorts, Filters>\n): LookupDataProviderInst<Model, Service, Sorts, Filters, undefined, ServiceClassType<Service>> {\n return new LookupDataProviderInst<Model, Service, Sorts, Filters, undefined, ServiceClassType<Service>>(undefined, serviceType);\n}\n\nexport function lookupDataProviderFromClass<Model, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n type: ClassType<Model>\n): LookupDataProviderInst<Model, undefined, Sorts, Filters, ClassType<Model>, undefined>;\nexport function lookupDataProviderFromClass<Model, Service = any, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n type: ClassType<Model>,\n serviceType: ServiceClassType<Service>\n): LookupDataProviderInst<Model, Service, Sorts, Filters, ClassType<Model>, ServiceClassType<Service>>;\nexport function lookupDataProviderFromClass<Model, Service = any, Sorts = keyof Model, Filters extends keyof any = keyof Model, ServiceClass = ServiceClassType<Service>>(\n type: ClassType<Model>,\n serviceType?: ServiceClass\n) {\n return new LookupDataProviderInst<Model, Service, Sorts, Filters, ClassType<Model>, ServiceClass>(type, serviceType as ServiceClass);\n}\n\nexport function lookupDataProviderFromModel<Model, Sorts = keyof Model, Filters extends keyof any = keyof Model, ModelClass = ClassType<Model>>(\n model: ModelDescriptor<Model, ModelClass>,\n opts?: LookupDataProviderCreateOptsType<Model, Sorts, Filters>\n): LookupDataProviderInst<Model, undefined, Sorts, Filters, ModelClass, undefined>;\nexport function lookupDataProviderFromModel<Model, Sorts = keyof Model, Filters extends keyof any = keyof Model, Service = any, ModelClass = ClassType<Model>>(\n model: ModelDescriptor<Model, ModelClass>,\n ServiceClass: ServiceClassType<Service>,\n opts?: LookupDataProviderCreateOptsType<Model, Sorts, Filters>\n): LookupDataProviderInst<Model, Service, Sorts, Filters, ModelClass, ServiceClassType<Service>>;\nexport function lookupDataProviderFromModel<\n Model,\n Service = any,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n ModelClass = ClassType<Model>,\n ServiceClass = ServiceClassType<Service>\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n>(model: ModelDescriptor<Model, ModelClass>, serviceTypeOrOpts?: ServiceClass, opts?: LookupDataProviderCreateOptsType<Model, Sorts, Filters>) {\n return typeof serviceTypeOrOpts === 'function'\n ? new LookupDataProviderInst<Model, Service, Sorts, Filters, ClassType<Model>, ServiceClassType<Service>>(\n model.type as ClassType<Model>,\n serviceTypeOrOpts as ServiceClassType<Service>\n )\n : new LookupDataProviderInst<Model, undefined, Sorts, Filters, ClassType<Model>, undefined>(model.type as ClassType<Model>, undefined);\n}\n","import {StyleLevelEnum, StyleSizeEnum} from '@mediusinc/mng-commons/core';\n\nexport class ButtonStyleBuilder {\n private _size: StyleSizeEnum = StyleSizeEnum.Normal;\n private _actionLevel: StyleLevelEnum;\n\n private _textButton = false;\n private _outlineButton = false;\n private _raisedButton = false;\n private _roundedStyle = ButtonStyleRoundedEnum.DEFAULT;\n private _customClass?: string;\n\n constructor(level = StyleLevelEnum.Default, customClass?: string) {\n this._actionLevel = level;\n this._customClass = customClass;\n }\n\n public build(hasNoTitle = false): string {\n const styles = [this.convertActionLevelToStyleClass(), this.convertSizeToStyleClass(), this._customClass];\n\n if (hasNoTitle && this._roundedStyle === ButtonStyleRoundedEnum.DEFAULT) {\n styles.push(`p-button-rounded mng-action-button-icon`);\n }\n\n if (this._textButton) {\n styles.push(`p-button-text`);\n }\n\n if (this._outlineButton) {\n styles.push(`p-button-outlined`);\n }\n\n if (this._raisedButton) {\n styles.push(`p-button-raised`);\n }\n\n if (this._roundedStyle === ButtonStyleRoundedEnum.ROUNDED) {\n styles.push('p-button-rounded');\n }\n\n return styles.join(' ');\n }\n\n /**\n * creates instance of style builder with custom properties\n * @param actionLevel ActionLevelEnum\n * @param size ActionSizeEnum\n * @param textButton if true, text button will be applied\n * @param outlineButton if true, outlined button will be applied\n * @param raisedButton if true, raised button will be applied\n * @param customClass additional custom classes (will be added at generating)\n */\n public static create(\n actionLevel?: StyleLevelEnum,\n size?: StyleSizeEnum,\n textButton?: boolean,\n outlineButton?: boolean,\n raisedButton?: boolean,\n roundedButton?: ButtonStyleRoundedEnum,\n customClass?: string\n ): ButtonStyleBuilder {\n const descriptor = new ButtonStyleBuilder(actionLevel, customClass);\n descriptor._actionLevel = actionLevel ?? descriptor._actionLevel;\n descriptor._size = size ?? descriptor._size;\n descriptor._textButton = textButton ?? descriptor._textButton;\n descriptor._outlineButton = outlineButton ?? descriptor._outlineButton;\n descriptor._raisedButton = raisedButton ?? descriptor._raisedButton;\n descriptor._roundedStyle = roundedButton ?? descriptor._roundedStyle;\n descriptor._customClass = customClass;\n\n return descriptor;\n }\n\n /**\n * sets custom action level and returns this object\n * @param actionLevel\n */\n public withActionLevel(actionLevel: StyleLevelEnum): ButtonStyleBuilder {\n this._actionLevel = actionLevel;\n return this;\n }\n\n /**\n * sets custom size and return this object\n * @param size\n */\n public withSize(size: StyleSizeEnum): ButtonStyleBuilder {\n this._size = size;\n return this;\n }\n\n /**\n * sets text button property\n * @param withText default true\n */\n public withTextButton(withText = true): ButtonStyleBuilder {\n this._textButton = withText;\n return this;\n }\n\n /**\n * sets outline button property\n * @param withOutline default true\n */\n public withOutlineButton(withOutline = true): ButtonStyleBuilder {\n this._outlineButton = withOutline;\n return this;\n }\n\n /**\n * sets raised button property\n * @param withRaised default true\n */\n public withRaisedButton(withRaised = true): ButtonStyleBuilder {\n this._raisedButton = withRaised;\n return this;\n }\n\n public withRoundedButton(roundedStyle = ButtonStyleRoundedEnum.ROUNDED): ButtonStyleBuilder {\n this._roundedStyle = roundedStyle;\n return this;\n }\n\n /**\n * sets custom style class\n * @param customClass\n */\n public withCustomClass(customClass: string): ButtonStyleBuilder {\n this._customClass = customClass;\n return this;\n }\n\n private convertActionLevelToStyleClass(): string {\n switch (this._actionLevel) {\n case StyleLevelEnum.Default:\n case StyleLevelEnum.Primary:\n return 'p-button-primary';\n case StyleLevelEnum.Secondary:\n return 'p-button-secondary';\n case StyleLevelEnum.Info:\n return 'p-button-info';\n case StyleLevelEnum.Help:\n return 'p-button-help';\n case StyleLevelEnum.Success:\n return 'p-button-success';\n case StyleLevelEnum.Warning:\n return 'p-button-warning';\n case StyleLevelEnum.Danger:\n return 'p-button-danger';\n }\n }\n\n private convertSizeToStyleClass(): string {\n switch (this._size) {\n case StyleSizeEnum.ExtraSmall:\n return 'p-button-sm mng-button-xs';\n case StyleSizeEnum.Small:\n return 'p-button-sm mng-button-sm';\n case StyleSizeEnum.Large:\n return 'p-button-lg mng-button-lg';\n case StyleSizeEnum.ExtraLarge:\n return 'p-button-lg mng-button-xl';\n case StyleSizeEnum.Normal:\n default:\n return '';\n }\n }\n\n public copy(): ButtonStyleBuilder {\n const builder = new ButtonStyleBuilder(this._actionLevel, this._customClass);\n\n builder._size = this._size;\n builder._textButton = this._textButton;\n builder._outlineButton = this._outlineButton;\n builder._raisedButton = this._raisedButton;\n builder._roundedStyle = this._roundedStyle;\n\n return builder;\n }\n\n public get actionLevel() {\n return this._actionLevel;\n }\n\n public get size() {\n return this._size;\n }\n\n public get textButton() {\n return this._textButton;\n }\n\n public get outlineButton() {\n return this._outlineButton;\n }\n\n public get raisedButton() {\n return this._raisedButton;\n }\n\n public get roundedStyle() {\n return this._roundedStyle;\n }\n\n public get customClass() {\n return this._customClass;\n }\n}\n\nexport enum ButtonStyleRoundedEnum {\n DEFAULT,\n ROUNDED,\n SQUARE\n}\n","import {ButtonStyleBuilder} from './button-style.builder';\n\nexport class ActionButtonDescriptor {\n private _label?: string | null;\n\n private _icon?: string | null;\n private _iconPosition: 'left' | 'right' = 'left';\n\n private _styleClass = new ButtonStyleBuilder();\n\n private _badge?: string;\n private _tooltip?: string;\n private _tooltipPosition?: 'top' | 'bottom' | 'left' | 'right';\n\n public withLabel(label?: string | null): this {\n this._label = label;\n return this;\n }\n\n public withIcon(icon: string | null): this {\n this._icon = icon;\n return this;\n }\n\n public withIconPosition(iconPosition: 'left' | 'right'): this {\n this._iconPosition = iconPosition;\n return this;\n }\n\n public withStyleClass(style: ButtonStyleBuilder): this {\n this._styleClass = style;\n return this;\n }\n\n public withBadge(badge: string): this {\n this._badge = badge;\n return this;\n }\n\n public withTooltip(tooltip: string, position?: 'top' | 'bottom' | 'left' | 'right'): this {\n this._tooltip = tooltip;\n this._tooltipPosition = position ?? 'top';\n return this;\n }\n\n public withTooltipPosition(position: 'top' | 'bottom' | 'left' | 'right'): this {\n this._tooltipPosition = position;\n return this;\n }\n\n public get label() {\n return this._label;\n }\n\n public get icon() {\n return this._icon;\n }\n\n public get iconPosition() {\n return this._iconPosition;\n }\n\n public get styleClass() {\n return this._styleClass;\n }\n\n public get badge() {\n return this._badge;\n }\n\n public get tooltip() {\n return this._tooltip;\n }\n\n public get tooltipPosition() {\n return this._tooltipPosition;\n }\n\n public copy(): ActionButtonDescriptor {\n const descriptor = new ActionButtonDescriptor();\n descriptor._label = this._label;\n descriptor._icon = this._icon;\n descriptor._iconPosition = this._iconPosition;\n descriptor._styleClass = this._styleClass.copy();\n descriptor._badge = this._badge;\n descriptor._tooltip = this._tooltip;\n return descriptor;\n }\n}\n","// data providers\nexport * from './data-providers/lookup.data-provider';\nexport * from './data-providers/lookup-data-provider.factory';\n\n// descriptors\nexport * from './descriptors/action-button.descriptor';\nexport * from './descriptors/button-style.builder';\n\n// models\nexport * from './models/trim.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEM,MAAO,sBAQT,SAAQ,gBAA0D,CAAA;IAKlE,WAAmB,CAAA,IAAgB,EAAE,WAAyB,EAAA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G,IAAI,sBAAsB,EAAE,CAAC;AAChD,QAAA,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;AAChC,QAAA,UAAU,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;AAC9B,QAAA,UAAU,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QAC9C,UAAU,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;AACjD,QAAA,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;AAChC,QAAA,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;AACpC,QAAA,OAAO,UAAU,CAAC;KACrB;AACJ;;ACxFD;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mediusinc-mng-commons-form-api.mjs","sources":["../../form/api/src/data-providers/lookup.data-provider.ts","../../form/api/src/data-providers/lookup-data-provider.factory.ts","../../form/api/src/descriptors/button-style.builder.ts","../../form/api/src/descriptors/action-button.descriptor.ts","../../form/api/src/index.ts","../../form/api/src/mediusinc-mng-commons-form-api.ts"],"sourcesContent":["import {ClassOptType, DataProviderInst, ILookupDataProvider, LookupDataProviderLookupFnType, ServiceClassOptType} from '@mediusinc/mng-commons/core';\n\nexport class LookupDataProviderInst<\n Model,\n Service = any,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n ModelClass = ClassOptType<Model>,\n ServiceClass = ServiceClassOptType<Service>\n >\n extends DataProviderInst<Model, Service, ModelClass, ServiceClass>\n implements ILookupDataProvider<Model, Service, Sorts, Filters, ModelClass, ServiceClass>\n{\n protected _lookup: LookupDataProviderLookupFnType<Model, Service, Sorts, Filters> = () => [];\n\n public constructor(type: ModelClass, serviceType: ServiceClass) {\n super(type, serviceType);\n }\n\n get lookup() {\n return this._lookup;\n }\n\n withLookup(fn: LookupDataProviderLookupFnType<Model, Service, Sorts, Filters>): this {\n this._lookup = fn;\n return this;\n }\n}\n","import {ClassType, ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor, TypeDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {LookupDataProviderInst} from './lookup.data-provider';\n\nexport class LookupDataProvider extends LookupDataProviderInst<any> {\n protected constructor() {\n super(undefined, undefined);\n }\n\n public static create<Model, Sorts = keyof Model, Filters extends keyof any = keyof Model>(): LookupDataProviderInst<Model, undefined, Sorts, Filters, undefined, undefined> {\n return lookupDataProvider<Model, Sorts, Filters>();\n }\n\n public static fromClass<Model, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n type: ClassType<Model>\n ): LookupDataProviderInst<Model, undefined, Sorts, Filters, ClassType<Model>, undefined> {\n return lookupDataProviderFromClass<Model, Sorts, Filters>(type);\n }\n\n public static fromClassWithService<Model, Service, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n type: ClassType<Model>,\n serviceType: ServiceClassType<Service>\n ): LookupDataProviderInst<Model, Service, Sorts, Filters, ClassType<Model>, ServiceClassType<Service>> {\n return lookupDataProviderFromClass<Model, Service, Sorts, Filters>(type, serviceType);\n }\n\n public static fromService<Service, Model, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n serviceType: ServiceClassType<Service>\n ): LookupDataProviderInst<Model, Service, Sorts, Filters, undefined, ServiceClassType<Service>> {\n return lookupDataProviderWithService<Service, Model, Sorts, Filters>(serviceType);\n }\n}\n\nexport type LookupDataProviderCreateOptsType<TableModel, Sorts = keyof TableModel, Filters = keyof TableModel> = {\n filtersType?: TypeDescriptor<Filters>;\n sortsType?: TypeDescriptor<Sorts>;\n};\n\nexport function lookupDataProvider<Model, Sorts = keyof Model, Filters extends keyof any = keyof Model>(): LookupDataProviderInst<\n Model,\n undefined,\n Sorts,\n Filters,\n undefined,\n undefined\n>;\nexport function lookupDataProvider<Model, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n type: TypeDescriptor<Model>,\n opts?: LookupDataProviderCreateOptsType<Model, Sorts, Filters>\n): LookupDataProviderInst<Model, undefined, Sorts, Filters, undefined, undefined>;\nexport function lookupDataProvider<Model, Service = any, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n type: TypeDescriptor<Model>,\n serviceType: ServiceClassType<Service>,\n opts?: LookupDataProviderCreateOptsType<Model, Sorts, Filters>\n): LookupDataProviderInst<Model, Service, Sorts, Filters, undefined, ServiceClassType<Service>>;\nexport function lookupDataProvider<Model, Service = any, Sorts = keyof Model, Filters extends keyof any = keyof Model, ServiceClass = ServiceClassType<Service>>(\n type?: TypeDescriptor<Model>,\n serviceTypeOrOpts?: ServiceClass | LookupDataProviderCreateOptsType<Model, Sorts, Filters>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n opts?: LookupDataProviderCreateOptsType<Model, Sorts, Filters>\n) {\n if (serviceTypeOrOpts === undefined || typeof serviceTypeOrOpts === 'function') {\n return new LookupDataProviderInst<Model, Service, Sorts, Filters, undefined, ServiceClass>(undefined, serviceTypeOrOpts as ServiceClass);\n } else {\n return new LookupDataProviderInst<Model, Service, Sorts, Filters, undefined, ServiceClass>(undefined, undefined as ServiceClass);\n }\n}\n\nexport function lookupDataProviderWithService<Service, Model, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n serviceType: ServiceClassType<Service>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n opts?: LookupDataProviderCreateOptsType<Model, Sorts, Filters>\n): LookupDataProviderInst<Model, Service, Sorts, Filters, undefined, ServiceClassType<Service>> {\n return new LookupDataProviderInst<Model, Service, Sorts, Filters, undefined, ServiceClassType<Service>>(undefined, serviceType);\n}\n\nexport function lookupDataProviderFromClass<Model, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n type: ClassType<Model>\n): LookupDataProviderInst<Model, undefined, Sorts, Filters, ClassType<Model>, undefined>;\nexport function lookupDataProviderFromClass<Model, Service = any, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n type: ClassType<Model>,\n serviceType: ServiceClassType<Service>\n): LookupDataProviderInst<Model, Service, Sorts, Filters, ClassType<Model>, ServiceClassType<Service>>;\nexport function lookupDataProviderFromClass<Model, Service = any, Sorts = keyof Model, Filters extends keyof any = keyof Model, ServiceClass = ServiceClassType<Service>>(\n type: ClassType<Model>,\n serviceType?: ServiceClass\n) {\n return new LookupDataProviderInst<Model, Service, Sorts, Filters, ClassType<Model>, ServiceClass>(type, serviceType as ServiceClass);\n}\n\nexport function lookupDataProviderFromModel<Model, Sorts = keyof Model, Filters extends keyof any = keyof Model, ModelClass = ClassType<Model>>(\n model: ModelDescriptor<Model, ModelClass>,\n opts?: LookupDataProviderCreateOptsType<Model, Sorts, Filters>\n): LookupDataProviderInst<Model, undefined, Sorts, Filters, ModelClass, undefined>;\nexport function lookupDataProviderFromModel<Model, Sorts = keyof Model, Filters extends keyof any = keyof Model, Service = any, ModelClass = ClassType<Model>>(\n model: ModelDescriptor<Model, ModelClass>,\n ServiceClass: ServiceClassType<Service>,\n opts?: LookupDataProviderCreateOptsType<Model, Sorts, Filters>\n): LookupDataProviderInst<Model, Service, Sorts, Filters, ModelClass, ServiceClassType<Service>>;\nexport function lookupDataProviderFromModel<\n Model,\n Service = any,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n ModelClass = ClassType<Model>,\n ServiceClass = ServiceClassType<Service>\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n>(model: ModelDescriptor<Model, ModelClass>, serviceTypeOrOpts?: ServiceClass, opts?: LookupDataProviderCreateOptsType<Model, Sorts, Filters>) {\n return typeof serviceTypeOrOpts === 'function'\n ? new LookupDataProviderInst<Model, Service, Sorts, Filters, ClassType<Model>, ServiceClassType<Service>>(\n model.type as ClassType<Model>,\n serviceTypeOrOpts as ServiceClassType<Service>\n )\n : new LookupDataProviderInst<Model, undefined, Sorts, Filters, ClassType<Model>, undefined>(model.type as ClassType<Model>, undefined);\n}\n","import {StyleLevelEnum, StyleSizeEnum} from '@mediusinc/mng-commons/core';\n\nexport class ButtonStyleBuilder {\n private _size: StyleSizeEnum = StyleSizeEnum.Normal;\n private _actionLevel: StyleLevelEnum;\n\n private _textButton = false;\n private _outlineButton = false;\n private _raisedButton = false;\n private _roundedStyle = ButtonStyleRoundedEnum.DEFAULT;\n private _customClass?: string;\n\n constructor(level = StyleLevelEnum.Default, customClass?: string) {\n this._actionLevel = level;\n this._customClass = customClass;\n }\n\n public build(hasNoTitle = false): string {\n const styles = [this.convertActionLevelToStyleClass(), this.convertSizeToStyleClass(), this._customClass];\n\n if (hasNoTitle && this._roundedStyle === ButtonStyleRoundedEnum.DEFAULT) {\n styles.push(`p-button-rounded mng-action-button-icon`);\n }\n\n if (this._textButton) {\n styles.push(`p-button-text`);\n }\n\n if (this._outlineButton) {\n styles.push(`p-button-outlined`);\n }\n\n if (this._raisedButton) {\n styles.push(`p-button-raised`);\n }\n\n if (this._roundedStyle === ButtonStyleRoundedEnum.ROUNDED) {\n styles.push('p-button-rounded');\n }\n\n return styles.join(' ');\n }\n\n /**\n * creates instance of style builder with custom properties\n * @param actionLevel ActionLevelEnum\n * @param size ActionSizeEnum\n * @param textButton if true, text button will be applied\n * @param outlineButton if true, outlined button will be applied\n * @param raisedButton if true, raised button will be applied\n * @param customClass additional custom classes (will be added at generating)\n */\n public static create(\n actionLevel?: StyleLevelEnum,\n size?: StyleSizeEnum,\n textButton?: boolean,\n outlineButton?: boolean,\n raisedButton?: boolean,\n roundedButton?: ButtonStyleRoundedEnum,\n customClass?: string\n ): ButtonStyleBuilder {\n const descriptor = new ButtonStyleBuilder(actionLevel, customClass);\n descriptor._actionLevel = actionLevel ?? descriptor._actionLevel;\n descriptor._size = size ?? descriptor._size;\n descriptor._textButton = textButton ?? descriptor._textButton;\n descriptor._outlineButton = outlineButton ?? descriptor._outlineButton;\n descriptor._raisedButton = raisedButton ?? descriptor._raisedButton;\n descriptor._roundedStyle = roundedButton ?? descriptor._roundedStyle;\n descriptor._customClass = customClass;\n\n return descriptor;\n }\n\n /**\n * sets custom action level and returns this object\n * @param actionLevel\n */\n public withActionLevel(actionLevel: StyleLevelEnum): ButtonStyleBuilder {\n this._actionLevel = actionLevel;\n return this;\n }\n\n /**\n * sets custom size and return this object\n * @param size\n */\n public withSize(size: StyleSizeEnum): ButtonStyleBuilder {\n this._size = size;\n return this;\n }\n\n /**\n * sets text button property\n * @param withText default true\n */\n public withTextButton(withText = true): ButtonStyleBuilder {\n this._textButton = withText;\n return this;\n }\n\n /**\n * sets outline button property\n * @param withOutline default true\n */\n public withOutlineButton(withOutline = true): ButtonStyleBuilder {\n this._outlineButton = withOutline;\n return this;\n }\n\n /**\n * sets raised button property\n * @param withRaised default true\n */\n public withRaisedButton(withRaised = true): ButtonStyleBuilder {\n this._raisedButton = withRaised;\n return this;\n }\n\n public withRoundedButton(roundedStyle = ButtonStyleRoundedEnum.ROUNDED): ButtonStyleBuilder {\n this._roundedStyle = roundedStyle;\n return this;\n }\n\n /**\n * sets custom style class\n * @param customClass\n */\n public withCustomClass(customClass: string): ButtonStyleBuilder {\n this._customClass = customClass;\n return this;\n }\n\n private convertActionLevelToStyleClass(): string {\n switch (this._actionLevel) {\n case StyleLevelEnum.Default:\n case StyleLevelEnum.Primary:\n return 'p-button-primary';\n case StyleLevelEnum.Secondary:\n return 'p-button-secondary';\n case StyleLevelEnum.Info:\n return 'p-button-info';\n case StyleLevelEnum.Help:\n return 'p-button-help';\n case StyleLevelEnum.Success:\n return 'p-button-success';\n case StyleLevelEnum.Warning:\n return 'p-button-warning';\n case StyleLevelEnum.Danger:\n return 'p-button-danger';\n }\n }\n\n private convertSizeToStyleClass(): string {\n switch (this._size) {\n case StyleSizeEnum.ExtraSmall:\n return 'p-button-sm mng-button-xs';\n case StyleSizeEnum.Small:\n return 'p-button-sm mng-button-sm';\n case StyleSizeEnum.Large:\n return 'p-button-lg mng-button-lg';\n case StyleSizeEnum.ExtraLarge:\n return 'p-button-lg mng-button-xl';\n case StyleSizeEnum.Normal:\n default:\n return '';\n }\n }\n\n public copy(): ButtonStyleBuilder {\n const builder = new ButtonStyleBuilder(this._actionLevel, this._customClass);\n\n builder._size = this._size;\n builder._textButton = this._textButton;\n builder._outlineButton = this._outlineButton;\n builder._raisedButton = this._raisedButton;\n builder._roundedStyle = this._roundedStyle;\n\n return builder;\n }\n\n public get actionLevel() {\n return this._actionLevel;\n }\n\n public get size() {\n return this._size;\n }\n\n public get textButton() {\n return this._textButton;\n }\n\n public get outlineButton() {\n return this._outlineButton;\n }\n\n public get raisedButton() {\n return this._raisedButton;\n }\n\n public get roundedStyle() {\n return this._roundedStyle;\n }\n\n public get customClass() {\n return this._customClass;\n }\n}\n\nexport enum ButtonStyleRoundedEnum {\n DEFAULT,\n ROUNDED,\n SQUARE\n}\n","import {ButtonStyleBuilder} from './button-style.builder';\n\nexport class ActionButtonDescriptor {\n private _label?: string | null;\n\n private _icon?: string | null;\n private _iconPosition: 'left' | 'right' = 'left';\n\n private _styleClass = new ButtonStyleBuilder();\n\n private _badge?: string;\n private _tooltip?: string;\n private _tooltipPosition?: 'top' | 'bottom' | 'left' | 'right';\n\n public withLabel(label?: string | null): this {\n this._label = label;\n return this;\n }\n\n public withIcon(icon: string | null): this {\n this._icon = icon;\n return this;\n }\n\n public withIconPosition(iconPosition: 'left' | 'right'): this {\n this._iconPosition = iconPosition;\n return this;\n }\n\n public withStyleClass(style: ButtonStyleBuilder): this {\n this._styleClass = style;\n return this;\n }\n\n public withBadge(badge: string): this {\n this._badge = badge;\n return this;\n }\n\n public withTooltip(tooltip: string, position?: 'top' | 'bottom' | 'left' | 'right'): this {\n this._tooltip = tooltip;\n this._tooltipPosition = position ?? 'top';\n return this;\n }\n\n public withTooltipPosition(position: 'top' | 'bottom' | 'left' | 'right'): this {\n this._tooltipPosition = position;\n return this;\n }\n\n public get label() {\n return this._label;\n }\n\n public get icon() {\n return this._icon;\n }\n\n public get iconPosition() {\n return this._iconPosition;\n }\n\n public get styleClass() {\n return this._styleClass;\n }\n\n public get badge() {\n return this._badge;\n }\n\n public get tooltip() {\n return this._tooltip;\n }\n\n public get tooltipPosition() {\n return this._tooltipPosition;\n }\n\n public copy(): ActionButtonDescriptor {\n const descriptor = new ActionButtonDescriptor();\n descriptor._label = this._label;\n descriptor._icon = this._icon;\n descriptor._iconPosition = this._iconPosition;\n descriptor._styleClass = this._styleClass.copy();\n descriptor._badge = this._badge;\n descriptor._tooltip = this._tooltip;\n return descriptor;\n }\n}\n","// data providers\nexport * from './data-providers/lookup.data-provider';\nexport * from './data-providers/lookup-data-provider.factory';\n\n// descriptors\nexport * from './descriptors/action-button.descriptor';\nexport * from './descriptors/button-style.builder';\n\n// models\nexport * from './models/trim.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEM,MAAO,sBAQT,SAAQ,gBAA0D,CAAA;IAKlE,WAAmB,CAAA,IAAgB,EAAE,WAAyB,EAAA;AAC1D,QAAA,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC;AAHlB,QAAA,IAAA,CAAA,OAAO,GAAmE,MAAM,EAAE;;AAM5F,IAAA,IAAI,MAAM,GAAA;QACN,OAAO,IAAI,CAAC,OAAO;;AAGvB,IAAA,UAAU,CAAC,EAAkE,EAAA;AACzE,QAAA,IAAI,CAAC,OAAO,GAAG,EAAE;AACjB,QAAA,OAAO,IAAI;;AAElB;;ACtBK,MAAO,kBAAmB,SAAQ,sBAA2B,CAAA;AAC/D,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC;;AAGxB,IAAA,OAAO,MAAM,GAAA;QAChB,OAAO,kBAAkB,EAAyB;;IAG/C,OAAO,SAAS,CACnB,IAAsB,EAAA;AAEtB,QAAA,OAAO,2BAA2B,CAAwB,IAAI,CAAC;;AAG5D,IAAA,OAAO,oBAAoB,CAC9B,IAAsB,EACtB,WAAsC,EAAA;AAEtC,QAAA,OAAO,2BAA2B,CAAiC,IAAI,EAAE,WAAW,CAAC;;IAGlF,OAAO,WAAW,CACrB,WAAsC,EAAA;AAEtC,QAAA,OAAO,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