@mediusinc/mng-commons 5.3.0-rc.3 → 5.3.0-rc.5
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/data-list/data-list.model.d.ts +1 -1
- package/core/data-providers/lookup.data-provider.d.ts +5 -5
- package/core/descriptors/lookup.descriptor.d.ts +3 -3
- package/core/descriptors/table.descriptor.d.ts +1 -1
- package/esm2022/core/data-list/data-list-params-helpers.mjs +1 -1
- package/esm2022/core/data-list/data-list.model.mjs +1 -1
- package/esm2022/core/data-providers/lookup.data-provider.mjs +1 -1
- package/esm2022/core/descriptors/lookup.descriptor.mjs +1 -1
- package/esm2022/core/descriptors/table.descriptor.mjs +1 -1
- package/esm2022/filter/descriptors/filter-lookup.descriptor.mjs +60 -2
- package/esm2022/filter/descriptors/filter.descriptor.mjs +118 -8
- package/esm2022/form/api/data-providers/lookup-data-provider.factory.mjs +17 -6
- package/esm2022/form/api/data-providers/lookup.data-provider.mjs +1 -1
- package/esm2022/form/components/autocomplete/autocomplete.component.mjs +1 -1
- package/esm2022/form/components/dropdown/dropdown.component.mjs +1 -1
- package/esm2022/model/helpers/model.mjs +1 -1
- package/esm2022/table/api/data-providers/table-data-provider.factory.mjs +16 -7
- package/esm2022/table/api/descriptors/column.descriptor.mjs +125 -4
- package/esm2022/table/api/descriptors/sort.descriptor.mjs +23 -1
- package/esm2022/table/api/descriptors/table-descriptor.factory.mjs +1 -1
- package/esm2022/table/api/descriptors/table.descriptor.mjs +424 -43
- package/esm2022/table/api/helpers/table-data-provider-descriptor-convert.mjs +7 -0
- package/esm2022/table/api/index.mjs +2 -1
- package/esm2022/table/api/models/table-columns.model.mjs +1 -1
- package/esm2022/table/components/table/table.component.mjs +4 -4
- package/esm2022/tableview/api/editor/descriptors/editor.descriptor.mjs +6 -6
- package/esm2022/tableview/api/editor/descriptors/field-base.descriptor.mjs +2 -2
- package/esm2022/tableview/api/editor/descriptors/field-lookup.descriptor.mjs +1 -1
- package/esm2022/tableview/api/index.mjs +2 -1
- package/esm2022/tableview/api/tableview/data-providers/tableview-data-provider.factory.mjs +16 -7
- package/esm2022/tableview/api/tableview/descriptors/tableview-descriptor.factory.mjs +1 -1
- package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +5 -5
- package/esm2022/tableview/api/tableview/helpers/tableview-data-provider-descriptor-convert.mjs +7 -0
- package/esm2022/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +1 -1
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-filter.mjs +176 -8
- package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form-api.mjs +16 -5
- package/fesm2022/mediusinc-mng-commons-form-api.mjs.map +1 -1
- 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 +591 -52
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +3 -3
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +32 -17
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/filter/descriptors/filter-lookup.descriptor.d.ts +70 -12
- package/filter/descriptors/filter.descriptor.d.ts +116 -5
- package/form/api/data-providers/lookup-data-provider.factory.d.ts +16 -12
- package/form/api/data-providers/lookup.data-provider.d.ts +5 -5
- package/form/components/autocomplete/autocomplete.component.d.ts +1 -1
- package/form/components/dropdown/dropdown.component.d.ts +1 -1
- package/model/helpers/model.d.ts +1 -1
- package/package.json +1 -1
- package/table/api/data-providers/table-data-provider.factory.d.ts +9 -5
- package/table/api/descriptors/column.descriptor.d.ts +126 -5
- package/table/api/descriptors/sort.descriptor.d.ts +22 -0
- package/table/api/descriptors/table-descriptor.factory.d.ts +8 -4
- package/table/api/descriptors/table.descriptor.d.ts +421 -27
- package/table/api/helpers/table-data-provider-descriptor-convert.d.ts +20 -0
- package/table/api/index.d.ts +1 -0
- package/table/api/models/table-columns.model.d.ts +6 -6
- package/table/components/column-filter/column-filter.component.d.ts +1 -1
- package/table/components/filter/filter-form/filter-form.component.d.ts +1 -1
- package/tableview/action/components/localization/data-language-dropdown.component.d.ts +1 -1
- package/tableview/api/editor/descriptors/editor.descriptor.d.ts +11 -11
- package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +1 -1
- package/tableview/api/editor/descriptors/field-lookup.descriptor.d.ts +12 -12
- package/tableview/api/index.d.ts +1 -0
- package/tableview/api/tableview/data-providers/tableview-data-provider.factory.d.ts +9 -5
- package/tableview/api/tableview/descriptors/tableview-descriptor.factory.d.ts +10 -6
- package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +17 -17
- package/tableview/api/tableview/helpers/tableview-data-provider-descriptor-convert.d.ts +20 -0
- package/version-info.json +6 -6
|
@@ -28,7 +28,6 @@ class FilterDescriptor {
|
|
|
28
28
|
this._filterType = FilterTypeEnum.String;
|
|
29
29
|
// default value
|
|
30
30
|
this._hasDefaultValue = false;
|
|
31
|
-
this._matchModes = null;
|
|
32
31
|
this._numberUseGrouping = true;
|
|
33
32
|
this._className = '';
|
|
34
33
|
this._columnClassName = '';
|
|
@@ -118,32 +117,72 @@ class FilterDescriptor {
|
|
|
118
117
|
get title() {
|
|
119
118
|
return this._title;
|
|
120
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* Converts filter to given type.
|
|
122
|
+
*
|
|
123
|
+
* @param filterType Filter type.
|
|
124
|
+
*/
|
|
121
125
|
asFilterType(filterType) {
|
|
122
126
|
this._filterType = filterType;
|
|
123
127
|
return this;
|
|
124
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Set filter as date type.
|
|
131
|
+
*
|
|
132
|
+
* @param opts Additional options.
|
|
133
|
+
*/
|
|
125
134
|
asDate(opts) {
|
|
126
135
|
this._filterType = FilterTypeEnum.Date;
|
|
127
136
|
this.withDisplayFormat(opts?.displayFormat).withDatePickerDisplay(opts).withDateValue(opts);
|
|
128
137
|
return this;
|
|
129
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* Set filter as number type.
|
|
141
|
+
*
|
|
142
|
+
* @param opts Additional options.
|
|
143
|
+
*/
|
|
130
144
|
asNumber(opts) {
|
|
131
145
|
this._filterType = FilterTypeEnum.Number;
|
|
132
146
|
this.withDisplayFormat(opts?.displayFormat).withNumberFractions(opts?.minFractionDigits, opts?.maxFractionDigits).withLocale(opts?.locale);
|
|
133
147
|
return this;
|
|
134
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* Shows filter on column for given property.
|
|
151
|
+
*
|
|
152
|
+
* @param property Column property to show filter on.
|
|
153
|
+
* @param displayType Optional display type override. If not column, the filter will not be shown on column.
|
|
154
|
+
*/
|
|
135
155
|
withShowOnColumn(property, displayType = FilterDisplayTypeEnum.Column) {
|
|
136
156
|
return this.withShowOnColumnUnsafe(property, displayType);
|
|
137
157
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
158
|
+
/**
|
|
159
|
+
* Shows filter on column for given property.
|
|
160
|
+
*
|
|
161
|
+
* This function is UNSAFE.
|
|
162
|
+
*
|
|
163
|
+
* @param property Column property to show filter on.
|
|
164
|
+
* @param displayType Optional display type override. If not column, the filter will not be shown on column.
|
|
165
|
+
*/
|
|
142
166
|
withShowOnColumnUnsafe(property, displayType = FilterDisplayTypeEnum.Column) {
|
|
143
167
|
this._showOnColumn = property;
|
|
144
168
|
this._displayType = displayType;
|
|
145
169
|
return this;
|
|
146
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* Changes display type of filter.
|
|
173
|
+
*
|
|
174
|
+
* @param type Display type.
|
|
175
|
+
*/
|
|
176
|
+
withDisplayType(type) {
|
|
177
|
+
this._displayType = type;
|
|
178
|
+
return this;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Sets default filter value for filter.
|
|
182
|
+
*
|
|
183
|
+
* @param value Value for default filter.
|
|
184
|
+
* @param matchMode Match mode for default filter.
|
|
185
|
+
*/
|
|
147
186
|
withDefaultFilter(value, matchMode) {
|
|
148
187
|
this._hasDefaultValue = true;
|
|
149
188
|
this._defaultValue = value;
|
|
@@ -166,20 +205,42 @@ class FilterDescriptor {
|
|
|
166
205
|
LoggerService.get().debug(`WARNING: Default filter match mode '${matchMode}' could not be assigned for property ${this._property}.`);
|
|
167
206
|
}
|
|
168
207
|
}
|
|
208
|
+
/**
|
|
209
|
+
* Sets format for display of filter value (applies to date and number).
|
|
210
|
+
*
|
|
211
|
+
* @param format Format (Angular formatting rules apply).
|
|
212
|
+
* @param applyToField If the format should also be applied to field on filter editing form.
|
|
213
|
+
*/
|
|
169
214
|
withDisplayFormat(format, applyToField) {
|
|
170
215
|
this._displayFormat = format;
|
|
171
216
|
this._displayFormatApplyToField = applyToField;
|
|
172
217
|
return this;
|
|
173
218
|
}
|
|
219
|
+
/**
|
|
220
|
+
* Sets locale for filter.
|
|
221
|
+
*
|
|
222
|
+
* @param locale Locale.
|
|
223
|
+
*/
|
|
174
224
|
withLocale(locale) {
|
|
175
225
|
this._locale = locale;
|
|
176
226
|
return this;
|
|
177
227
|
}
|
|
228
|
+
/**
|
|
229
|
+
* Sets fraction for number filter editing field.
|
|
230
|
+
*
|
|
231
|
+
* @param min Min fraction digits (i.e. digits after decimal).
|
|
232
|
+
* @param max Max fraction digits (i.e. digits after decimal).
|
|
233
|
+
*/
|
|
178
234
|
withNumberFractions(min, max) {
|
|
179
235
|
this._numberMinFractionDigits = min;
|
|
180
236
|
this._numberMaxFractionDigits = max;
|
|
181
237
|
return this;
|
|
182
238
|
}
|
|
239
|
+
/**
|
|
240
|
+
* If number grouping should be used.
|
|
241
|
+
*
|
|
242
|
+
* @param useGrouping Enables/disbaled the feature.
|
|
243
|
+
*/
|
|
183
244
|
withNumberGrouping(useGrouping = true) {
|
|
184
245
|
this._numberUseGrouping = useGrouping;
|
|
185
246
|
return this;
|
|
@@ -193,6 +254,11 @@ class FilterDescriptor {
|
|
|
193
254
|
this._datePickerShowSeconds = showSeconds;
|
|
194
255
|
return this;
|
|
195
256
|
}
|
|
257
|
+
/**
|
|
258
|
+
* Sets date picker display options.
|
|
259
|
+
*
|
|
260
|
+
* @param opts Options.
|
|
261
|
+
*/
|
|
196
262
|
withDatePickerDisplay(opts) {
|
|
197
263
|
this._displayFormatApplyToField = opts?.applyFromDisplayFormat;
|
|
198
264
|
this._datePickerFormat = opts?.format;
|
|
@@ -200,41 +266,85 @@ class FilterDescriptor {
|
|
|
200
266
|
this._datePickerShowSeconds = opts?.showSeconds;
|
|
201
267
|
return this;
|
|
202
268
|
}
|
|
269
|
+
/**
|
|
270
|
+
* Sets filter date value formatting options.
|
|
271
|
+
*
|
|
272
|
+
* @param opts Options.
|
|
273
|
+
*/
|
|
203
274
|
withDateValue(opts) {
|
|
204
275
|
this._dateValueUtc = opts?.utc;
|
|
205
276
|
this._dateValueNoTimezone = opts?.noTimeZone;
|
|
206
277
|
this._dateValueNoTime = opts?.noTime;
|
|
207
278
|
return this;
|
|
208
279
|
}
|
|
280
|
+
/**
|
|
281
|
+
* Sets placeholder for filter field.
|
|
282
|
+
*
|
|
283
|
+
* @param placeholder Text for placeholder.
|
|
284
|
+
*/
|
|
209
285
|
withPlaceholder(placeholder) {
|
|
210
286
|
this._placeholder = placeholder;
|
|
211
287
|
return this;
|
|
212
288
|
}
|
|
289
|
+
/**
|
|
290
|
+
* Sets class name for filter.
|
|
291
|
+
*
|
|
292
|
+
* @param className Class name.
|
|
293
|
+
*/
|
|
213
294
|
withClassName(className) {
|
|
214
295
|
this._className = className;
|
|
215
296
|
return this;
|
|
216
297
|
}
|
|
298
|
+
/**
|
|
299
|
+
* Sets class name for column display type.
|
|
300
|
+
*
|
|
301
|
+
* @param className Class name for column.
|
|
302
|
+
*/
|
|
217
303
|
withColumnClassName(className) {
|
|
218
304
|
this._columnClassName = className;
|
|
219
305
|
return this;
|
|
220
306
|
}
|
|
307
|
+
/**
|
|
308
|
+
* Set column width for column display type.
|
|
309
|
+
*
|
|
310
|
+
* @param width Relative width (in percentage) of table width:
|
|
311
|
+
* @param minWidth
|
|
312
|
+
*/
|
|
221
313
|
withColumnWidth(width, minWidth) {
|
|
222
314
|
this._columnWidth = width ?? null;
|
|
223
315
|
this._columnMinWidth = minWidth ?? null;
|
|
224
316
|
return this;
|
|
225
317
|
}
|
|
318
|
+
/**
|
|
319
|
+
* Sets input trimming for filter value field.
|
|
320
|
+
*
|
|
321
|
+
* @param trimOption Trim setting.
|
|
322
|
+
*/
|
|
226
323
|
withInputTrimming(trimOption = 'both') {
|
|
227
324
|
this._inputTrim = trimOption;
|
|
228
325
|
return this;
|
|
229
326
|
}
|
|
327
|
+
/**
|
|
328
|
+
* Sets range of match modes for this filter. If non provided, the defaults are applied.
|
|
329
|
+
*
|
|
330
|
+
* @param matchModes Match mode options.
|
|
331
|
+
*/
|
|
230
332
|
withMatchModes(matchModes) {
|
|
231
333
|
this._matchModes = matchModes;
|
|
232
334
|
return this;
|
|
233
335
|
}
|
|
234
|
-
|
|
235
|
-
|
|
336
|
+
/**
|
|
337
|
+
* Filter title. If non provided, the defaults are applied.
|
|
338
|
+
*
|
|
339
|
+
* @param title Title for the field.
|
|
340
|
+
*/
|
|
341
|
+
withTitle(title) {
|
|
342
|
+
this._title = title;
|
|
236
343
|
return this;
|
|
237
344
|
}
|
|
345
|
+
/**
|
|
346
|
+
* Copies current descriptor to a new instance.
|
|
347
|
+
*/
|
|
238
348
|
copy() {
|
|
239
349
|
const descriptor = new FilterDescriptor(this._property);
|
|
240
350
|
this.copyFieldsTo(descriptor);
|
|
@@ -310,9 +420,23 @@ class FilterLookupDescriptor extends FilterDescriptor {
|
|
|
310
420
|
get dropdownClassName() {
|
|
311
421
|
return this._dropdownClassName;
|
|
312
422
|
}
|
|
423
|
+
/**
|
|
424
|
+
* Sets label property for options display.
|
|
425
|
+
*
|
|
426
|
+
* @param property Property for label options.
|
|
427
|
+
* @param translate If the options should be translated through the i18n.
|
|
428
|
+
*/
|
|
313
429
|
withOptionsLabelProperty(property, translate = false) {
|
|
314
430
|
return this.withOptionsLabelPropertyUnsafe(property, translate);
|
|
315
431
|
}
|
|
432
|
+
/**
|
|
433
|
+
* Sets label property for options display.
|
|
434
|
+
*
|
|
435
|
+
* This function is UNSAFE!
|
|
436
|
+
*
|
|
437
|
+
* @param property Property for label options.
|
|
438
|
+
* @param translate If the options should be translated through the i18n.
|
|
439
|
+
*/
|
|
316
440
|
withOptionsLabelPropertyUnsafe(property, translate = false) {
|
|
317
441
|
this._optionsLabelProperty = property;
|
|
318
442
|
this._optionsLabelTranslate = translate;
|
|
@@ -320,11 +444,15 @@ class FilterLookupDescriptor extends FilterDescriptor {
|
|
|
320
444
|
}
|
|
321
445
|
/**
|
|
322
446
|
* Method will set `optionsValueProperty`, because track properties are not supported here as filters need final value to work correctly.
|
|
323
|
-
* Use `optionsValueProperty` instead.
|
|
447
|
+
* Use `optionsValueProperty` in filter creation instead.
|
|
324
448
|
*/
|
|
325
449
|
withOptionsTrackProperty() {
|
|
326
450
|
return this;
|
|
327
451
|
}
|
|
452
|
+
/**
|
|
453
|
+
* Method will set `optionsValueProperty`, because track properties are not supported here as filters need final value to work correctly.
|
|
454
|
+
* Use `optionsValueProperty` in filter creation instead.
|
|
455
|
+
*/
|
|
328
456
|
withOptionsTrackPropertyUnsafe() {
|
|
329
457
|
return this;
|
|
330
458
|
}
|
|
@@ -332,14 +460,29 @@ class FilterLookupDescriptor extends FilterDescriptor {
|
|
|
332
460
|
this._dataProvider.withLookup(lookup);
|
|
333
461
|
return this;
|
|
334
462
|
}
|
|
463
|
+
/**
|
|
464
|
+
* Sets multiselect for lookups.
|
|
465
|
+
*
|
|
466
|
+
* @param multiselect Enables/disables the feature.
|
|
467
|
+
*/
|
|
335
468
|
withMultiselect(multiselect = true) {
|
|
336
469
|
this._multiselect = multiselect;
|
|
337
470
|
return this;
|
|
338
471
|
}
|
|
472
|
+
/**
|
|
473
|
+
* Sets the dropdown class name.
|
|
474
|
+
* @param dropdownClassName Class name for dropdown.
|
|
475
|
+
*/
|
|
339
476
|
withDropdownClassName(dropdownClassName) {
|
|
340
477
|
this._dropdownClassName = dropdownClassName;
|
|
341
478
|
return this;
|
|
342
479
|
}
|
|
480
|
+
/**
|
|
481
|
+
* Sets default filter value for filter.
|
|
482
|
+
*
|
|
483
|
+
* @param value Value for default filter.
|
|
484
|
+
* @param matchMode Match mode for default filter.
|
|
485
|
+
*/
|
|
343
486
|
withDefaultFilter(value, matchMode) {
|
|
344
487
|
this._hasDefaultValue = true;
|
|
345
488
|
this._defaultValue = value;
|
|
@@ -350,6 +493,11 @@ class FilterLookupDescriptor extends FilterDescriptor {
|
|
|
350
493
|
}
|
|
351
494
|
return this;
|
|
352
495
|
}
|
|
496
|
+
/**
|
|
497
|
+
* Sets lookup as autocomplete instead of dropdown.
|
|
498
|
+
*
|
|
499
|
+
* @param opts Additional options.
|
|
500
|
+
*/
|
|
353
501
|
asAutocomplete(opts) {
|
|
354
502
|
this._lookupType = FilterLookupTypeEnum.Autocomplete;
|
|
355
503
|
this._autocompleteAutoClear = opts?.autoClear;
|
|
@@ -357,6 +505,9 @@ class FilterLookupDescriptor extends FilterDescriptor {
|
|
|
357
505
|
this._autocompleteInlineSearch = opts?.inlineSearch;
|
|
358
506
|
return this;
|
|
359
507
|
}
|
|
508
|
+
/**
|
|
509
|
+
* Copies current descriptor to a new instance.
|
|
510
|
+
*/
|
|
360
511
|
copy() {
|
|
361
512
|
const descriptor = new FilterLookupDescriptor(this._property, {
|
|
362
513
|
dataProvider: this.dataProvider
|
|
@@ -393,6 +544,11 @@ class FilterLookupEnumDescriptor extends FilterLookupDescriptor {
|
|
|
393
544
|
get enum() {
|
|
394
545
|
return this._enum;
|
|
395
546
|
}
|
|
547
|
+
/**
|
|
548
|
+
* Sets lookup as autocomplete instead of dropdown.
|
|
549
|
+
*
|
|
550
|
+
* @param opts Additional options.
|
|
551
|
+
*/
|
|
396
552
|
asAutocomplete(opts) {
|
|
397
553
|
super.asAutocomplete({
|
|
398
554
|
...opts,
|
|
@@ -404,9 +560,18 @@ class FilterLookupEnumDescriptor extends FilterLookupDescriptor {
|
|
|
404
560
|
withMultiselectEnum(multiselect = true) {
|
|
405
561
|
return super.withMultiselect(multiselect);
|
|
406
562
|
}
|
|
563
|
+
/**
|
|
564
|
+
* Do not use, use `withDefaultFilterEnum` instead.
|
|
565
|
+
*/
|
|
407
566
|
withDefaultFilter() {
|
|
408
567
|
throw new CommonsInternalError(`withDefaultFilter on FilterLookupEnumDescriptor should not be used. Use withDefaultFilterEnum instead.`, { name: 'FilterDescriptorError' });
|
|
409
568
|
}
|
|
569
|
+
/**
|
|
570
|
+
* Sets default filter value for filter.
|
|
571
|
+
*
|
|
572
|
+
* @param value Value(s) for default filter.
|
|
573
|
+
* @param matchMode Match mode for default filter.
|
|
574
|
+
*/
|
|
410
575
|
withDefaultFilterEnum(value, matchMode) {
|
|
411
576
|
let defaultOptionValue;
|
|
412
577
|
if (Array.isArray(value)) {
|
|
@@ -434,6 +599,9 @@ class FilterLookupEnumDescriptor extends FilterLookupDescriptor {
|
|
|
434
599
|
}
|
|
435
600
|
return this;
|
|
436
601
|
}
|
|
602
|
+
/**
|
|
603
|
+
* Copies current descriptor to a new instance.
|
|
604
|
+
*/
|
|
437
605
|
copy() {
|
|
438
606
|
const field = new FilterLookupEnumDescriptor(this._property, this.enum, []);
|
|
439
607
|
this.copyFieldsTo(field);
|
|
@@ -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/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, 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[] | null = null;\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 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 asFilterType(filterType: FilterTypeEnum) {\n this._filterType = filterType;\n return this;\n }\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 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 public withShowOnColumn(property: keyof TableModel, displayType: FilterDisplayTypeEnum | undefined = FilterDisplayTypeEnum.Column): this {\n return this.withShowOnColumnUnsafe(property as string, displayType);\n }\n\n public withDisplayType(type?: FilterDisplayTypeEnum): this {\n this._displayType = type;\n return this;\n }\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 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 public withDisplayFormat(format?: string, applyToField?: boolean): this {\n this._displayFormat = format;\n this._displayFormatApplyToField = applyToField;\n return this;\n }\n\n public withLocale(locale?: string): this {\n this._locale = locale;\n return this;\n }\n\n public withNumberFractions(min?: number, max?: number) {\n this._numberMinFractionDigits = min;\n this._numberMaxFractionDigits = max;\n return this;\n }\n\n public withNumberGrouping(useGrouping = true): this {\n this._numberUseGrouping = useGrouping;\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 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 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 public withPlaceholder(placeholder: string): this {\n this._placeholder = placeholder;\n return this;\n }\n\n public withClassName(className: string): this {\n this._className = className;\n return this;\n }\n\n public withColumnClassName(className: string): this {\n this._columnClassName = className;\n return this;\n }\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 public withInputTrimming(trimOption: InputTrimType = 'both'): this {\n this._inputTrim = trimOption;\n return this;\n }\n\n public withMatchModes(matchModes: Array<FilterMatchModeExtendedType>): this {\n this._matchModes = matchModes;\n return this;\n }\n\n public withTitle(key: string): this {\n this._title = key;\n return this;\n }\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 }\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<FilterModel, Service> = FilterLookupDescriptorCreateOptsProviderType<FilterModel, Service> & {\n type?: ClassType<FilterModel>;\n optionsValueProperty?: string | null;\n};\n\nexport type FilterLookupDescriptorCreateOptsProviderType<FilterModel, Service> = {\n serviceType?: ServiceClassType<Service>;\n dataProvider?: ILookupDataProvider<FilterModel, Service>;\n};\n\nexport type FilterLookupAutocompleteOptsType = {\n openOnFocus?: boolean;\n inlineSearch?: boolean;\n autoClear?: boolean;\n};\n\nexport class FilterLookupDescriptor<FilterModel, TableModel, Service = any> extends FilterDescriptor<FilterModel, TableModel> implements ILookupDescriptor<FilterModel> {\n protected readonly _dataProvider: ILookupDataProvider<FilterModel, Service>;\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 _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>) {\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, ClassOptType<FilterModel>, ServiceClassOptType<Service>>(cfg?.type, cfg?.serviceType);\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 get dropdownClassName() {\n return this._dropdownClassName;\n }\n\n public withOptionsLabelProperty(property: keyof FilterModel, translate = false): this {\n return this.withOptionsLabelPropertyUnsafe(property as string, translate);\n }\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` instead.\n */\n public withOptionsTrackProperty(): this {\n return this;\n }\n\n public withOptionsTrackPropertyUnsafe(): this {\n return this;\n }\n\n public withLookup(lookup?: LookupDataProviderLookupFnType<FilterModel, Service>): this {\n this._dataProvider.withLookup(lookup);\n return this;\n }\n\n public withMultiselect(multiselect = true) {\n this._multiselect = multiselect;\n return this;\n }\n\n public withDropdownClassName(dropdownClassName: string): this {\n this._dropdownClassName = dropdownClassName;\n return this;\n }\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 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 public override copy(): FilterLookupDescriptor<FilterModel, TableModel, Service> {\n const descriptor = new FilterLookupDescriptor<FilterModel, TableModel, Service>(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>) {\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> {\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, 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 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 public override withDefaultFilter(): this {\n throw new CommonsInternalError(`withDefaultFilter on FilterLookupEnumDescriptor should not be used. Use withDefaultFilterEnum instead.`, {name: 'FilterDescriptorError'});\n }\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 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","// descriptors\nexport * from './descriptors/filter.descriptor';\nexport * from './descriptors/filter-lookup.descriptor';\n\n// models\nexport * from './models/filter.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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C,YAAY,CAAC,KAAK,CAAC,CAAC;AACzB,QAAA,OAAO,KAAK,CAAC;KAChB;AACJ;;ACxQD;;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/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, 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 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 /**\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 * 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 * @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 /**\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 }\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 _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 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 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","// descriptors\nexport * from './descriptors/filter.descriptor';\nexport * from './descriptors/filter-lookup.descriptor';\n\n// models\nexport * from './models/filter.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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AM,CAAC;aACjH;AAED,YAAA,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;SAC1D;AACD,QAAA,OAAO,IAAI,CAAC;KACf;AAED;;AAEG;IACa,IAAI,GAAA;AAChB,QAAA,MAAM,KAAK,GAAG,IAAI,0BAA0B,CAAmB,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC9F,QAAA,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AACzB,QAAA,OAAO,KAAK,CAAC;KAChB;AACJ;;AC7UD;;ACAA;;AAEG;;;;"}
|
|
@@ -31,17 +31,28 @@ class LookupDataProvider extends LookupDataProviderInst {
|
|
|
31
31
|
return lookupDataProviderWithService(serviceType);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
function lookupDataProvider(type,
|
|
35
|
-
|
|
34
|
+
function lookupDataProvider(type, serviceTypeOrOpts,
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
36
|
+
opts) {
|
|
37
|
+
if (serviceTypeOrOpts === undefined || typeof serviceTypeOrOpts === 'function') {
|
|
38
|
+
return new LookupDataProviderInst(undefined, serviceTypeOrOpts);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
return new LookupDataProviderInst(undefined, undefined);
|
|
42
|
+
}
|
|
36
43
|
}
|
|
37
|
-
function lookupDataProviderWithService(serviceType
|
|
44
|
+
function lookupDataProviderWithService(serviceType,
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
46
|
+
opts) {
|
|
38
47
|
return new LookupDataProviderInst(undefined, serviceType);
|
|
39
48
|
}
|
|
40
49
|
function lookupDataProviderFromClass(type, serviceType) {
|
|
41
50
|
return new LookupDataProviderInst(type, serviceType);
|
|
42
51
|
}
|
|
43
|
-
function lookupDataProviderFromModel(model,
|
|
44
|
-
return
|
|
52
|
+
function lookupDataProviderFromModel(model, serviceTypeOrOpts, opts) {
|
|
53
|
+
return typeof serviceTypeOrOpts === 'function'
|
|
54
|
+
? new LookupDataProviderInst(model.type, serviceTypeOrOpts)
|
|
55
|
+
: new LookupDataProviderInst(model.type, undefined);
|
|
45
56
|
}
|
|
46
57
|
|
|
47
58
|
class ButtonStyleBuilder {
|