@lucca-front/ng 20.3.3-rc.6 → 21.0.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/api/index.d.ts +18 -0
- package/breadcrumbs/index.d.ts +1 -3
- package/callout/index.d.ts +8 -2
- package/chip/index.d.ts +3 -2
- package/clear/index.d.ts +30 -0
- package/code/index.d.ts +9 -0
- package/container/index.d.ts +2 -2
- package/core/index.d.ts +6 -6
- package/core-select/department/index.d.ts +1 -1
- package/core-select/index.d.ts +2 -1
- package/core-select/occupation-category/index.d.ts +26 -0
- package/data-table/index.d.ts +68 -30
- package/date/index.d.ts +18 -0
- package/date2/index.d.ts +15 -15
- package/department/index.d.ts +10 -1
- package/divider/index.d.ts +7 -4
- package/dropdown/index.d.ts +6 -3
- package/establishment/index.d.ts +15 -0
- package/fancy-box/index.d.ts +2 -1
- package/fesm2022/lucca-front-ng-a11y.mjs +32 -32
- package/fesm2022/lucca-front-ng-a11y.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-animations.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-api.mjs +76 -59
- package/fesm2022/lucca-front-ng-api.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-app-layout.mjs +8 -8
- package/fesm2022/lucca-front-ng-app-layout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-box.mjs +8 -8
- package/fesm2022/lucca-front-ng-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs +18 -30
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-button.mjs +12 -7
- package/fesm2022/lucca-front-ng-button.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-callout.mjs +117 -64
- package/fesm2022/lucca-front-ng-callout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-chip.mjs +29 -25
- package/fesm2022/lucca-front-ng-chip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-clear.mjs +94 -0
- package/fesm2022/lucca-front-ng-clear.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-code.mjs +21 -0
- package/fesm2022/lucca-front-ng-code.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-comment.mjs +31 -31
- package/fesm2022/lucca-front-ng-comment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-container.mjs +18 -18
- package/fesm2022/lucca-front-ng-container.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-api.mjs +14 -16
- package/fesm2022/lucca-front-ng-core-select-api.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-department.mjs +16 -18
- package/fesm2022/lucca-front-ng-core-select-department.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-establishment.mjs +18 -19
- package/fesm2022/lucca-front-ng-core-select-establishment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs +12 -13
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-occupation-category.mjs +79 -0
- package/fesm2022/lucca-front-ng-core-select-occupation-category.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-core-select-user.mjs +60 -62
- package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select.mjs +103 -113
- package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core.mjs +48 -49
- package/fesm2022/lucca-front-ng-core.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-data-table.mjs +266 -87
- package/fesm2022/lucca-front-ng-data-table.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date.mjs +113 -97
- package/fesm2022/lucca-front-ng-date.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date2.mjs +134 -136
- package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-department.mjs +56 -47
- package/fesm2022/lucca-front-ng-department.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dialog.mjs +53 -56
- package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-divider.mjs +13 -15
- package/fesm2022/lucca-front-ng-divider.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dropdown.mjs +225 -224
- package/fesm2022/lucca-front-ng-dropdown.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-empty-state.mjs +13 -9
- package/fesm2022/lucca-front-ng-empty-state.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-establishment.mjs +85 -71
- package/fesm2022/lucca-front-ng-establishment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-fancy-box.mjs +10 -6
- package/fesm2022/lucca-front-ng-fancy-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-file-upload.mjs +112 -112
- package/fesm2022/lucca-front-ng-file-upload.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-filter-pills.mjs +78 -81
- package/fesm2022/lucca-front-ng-filter-pills.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-footer.mjs +12 -19
- package/fesm2022/lucca-front-ng-footer.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-field.mjs +88 -88
- package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-header.mjs +23 -0
- package/fesm2022/lucca-front-ng-form-header.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-form.mjs +24 -0
- package/fesm2022/lucca-front-ng-form.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-formly.mjs +77 -77
- package/fesm2022/lucca-front-ng-formly.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs +19 -20
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-html.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-markdown.mjs +3 -2
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-markdown.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-plain-text.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs +206 -150
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms.mjs +185 -171
- package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-gauge.mjs +26 -26
- package/fesm2022/lucca-front-ng-gauge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-grid.mjs +26 -26
- package/fesm2022/lucca-front-ng-grid.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-highlight-data.mjs +20 -20
- package/fesm2022/lucca-front-ng-highlight-data.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-horizontal-navigation.mjs +17 -32
- package/fesm2022/lucca-front-ng-horizontal-navigation.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-icon.mjs +6 -6
- package/fesm2022/lucca-front-ng-icon.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-index-table.mjs +355 -0
- package/fesm2022/lucca-front-ng-index-table.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-inline-message.mjs +4 -4
- package/fesm2022/lucca-front-ng-inline-message.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-input.mjs +67 -57
- package/fesm2022/lucca-front-ng-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-link.mjs +24 -23
- package/fesm2022/lucca-front-ng-link.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listbox.mjs +31 -31
- package/fesm2022/lucca-front-ng-listbox.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listing.mjs +28 -24
- package/fesm2022/lucca-front-ng-listing.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-loading.mjs +11 -11
- package/fesm2022/lucca-front-ng-loading.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-main-layout.mjs +14 -14
- package/fesm2022/lucca-front-ng-main-layout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-mobile-push.mjs +39 -31
- package/fesm2022/lucca-front-ng-mobile-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-modal.mjs +57 -62
- package/fesm2022/lucca-front-ng-modal.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-multi-select.mjs +247 -230
- package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-new-badge.mjs +4 -4
- package/fesm2022/lucca-front-ng-new-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-number-format.mjs +11 -13
- package/fesm2022/lucca-front-ng-number-format.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-number.mjs +11 -10
- package/fesm2022/lucca-front-ng-number.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-numeric-badge.mjs +22 -10
- package/fesm2022/lucca-front-ng-numeric-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-option.mjs +287 -240
- package/fesm2022/lucca-front-ng-option.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-page-header.mjs +11 -11
- package/fesm2022/lucca-front-ng-page-header.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-pagination.mjs +38 -38
- package/fesm2022/lucca-front-ng-pagination.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-plg-push.mjs +54 -5
- package/fesm2022/lucca-front-ng-plg-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover.mjs +38 -28
- package/fesm2022/lucca-front-ng-popover.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover2.mjs +36 -33
- package/fesm2022/lucca-front-ng-popover2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popup.mjs +13 -10
- package/fesm2022/lucca-front-ng-popup.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-progress-bar.mjs +28 -0
- package/fesm2022/lucca-front-ng-progress-bar.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-read-more.mjs +46 -78
- package/fesm2022/lucca-front-ng-read-more.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-safe-content.mjs +10 -11
- package/fesm2022/lucca-front-ng-safe-content.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-scroll-box.mjs +46 -0
- package/fesm2022/lucca-front-ng-scroll-box.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-scroll.mjs +10 -8
- package/fesm2022/lucca-front-ng-scroll.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-scrollBox.mjs +1 -66
- package/fesm2022/lucca-front-ng-scrollBox.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs +98 -0
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-segmented-control.mjs +71 -0
- package/fesm2022/lucca-front-ng-segmented-control.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-segmentedControl.mjs +1 -66
- package/fesm2022/lucca-front-ng-segmentedControl.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmentedControlTabs.mjs +1 -93
- package/fesm2022/lucca-front-ng-segmentedControlTabs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-select.mjs +21 -20
- package/fesm2022/lucca-front-ng-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-sidepanel.mjs +7 -7
- package/fesm2022/lucca-front-ng-sidepanel.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-simple-select.mjs +75 -67
- package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-skeleton.mjs +46 -44
- package/fesm2022/lucca-front-ng-skeleton.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-sortable-list.mjs +49 -0
- package/fesm2022/lucca-front-ng-sortable-list.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-status-badge.mjs +34 -0
- package/fesm2022/lucca-front-ng-status-badge.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-statusBadge.mjs +1 -29
- package/fesm2022/lucca-front-ng-statusBadge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-table-of-content.mjs +39 -0
- package/fesm2022/lucca-front-ng-table-of-content.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-tag.mjs +35 -13
- package/fesm2022/lucca-front-ng-tag.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-time.mjs +132 -142
- package/fesm2022/lucca-front-ng-time.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-title.mjs +10 -10
- package/fesm2022/lucca-front-ng-title.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-toast.mjs +26 -23
- package/fesm2022/lucca-front-ng-toast.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tooltip.mjs +40 -32
- package/fesm2022/lucca-front-ng-tooltip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tree-select.mjs +20 -21
- package/fesm2022/lucca-front-ng-tree-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user-popover.mjs +23 -27
- package/fesm2022/lucca-front-ng-user-popover.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user.mjs +134 -111
- package/fesm2022/lucca-front-ng-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-vertical-navigation.mjs +91 -0
- package/fesm2022/lucca-front-ng-vertical-navigation.mjs.map +1 -0
- package/file-upload/index.d.ts +25 -25
- package/footer/index.d.ts +7 -7
- package/form/index.d.ts +9 -0
- package/form-field/index.d.ts +33 -32
- package/form-header/index.d.ts +9 -0
- package/forms/index.d.ts +39 -37
- package/forms/rich-text-input/index.d.ts +4 -1
- package/gauge/index.d.ts +17 -17
- package/grid/index.d.ts +14 -14
- package/horizontal-navigation/index.d.ts +5 -8
- package/index-table/index.d.ts +103 -0
- package/input/index.d.ts +27 -15
- package/link/index.d.ts +3 -4
- package/listbox/index.d.ts +20 -20
- package/listing/index.d.ts +13 -9
- package/loading/index.d.ts +4 -4
- package/main-layout/index.d.ts +3 -3
- package/modal/index.d.ts +3 -2
- package/multi-select/index.d.ts +13 -3
- package/number/index.d.ts +3 -0
- package/option/index.d.ts +58 -4
- package/package.json +125 -69
- package/page-header/index.d.ts +5 -5
- package/plg-push/index.d.ts +13 -1
- package/popover/index.d.ts +12 -0
- package/popup/index.d.ts +3 -0
- package/progress-bar/index.d.ts +14 -0
- package/read-more/index.d.ts +6 -12
- package/scroll/index.d.ts +3 -0
- package/scroll-box/index.d.ts +15 -0
- package/scrollBox/index.d.ts +1 -19
- package/segmented-control/index.d.ts +28 -0
- package/segmented-control-tabs/index.d.ts +34 -0
- package/segmentedControl/index.d.ts +1 -28
- package/segmentedControlTabs/index.d.ts +1 -34
- package/select/index.d.ts +5 -4
- package/simple-select/index.d.ts +1 -0
- package/skeleton/index.d.ts +2 -1
- package/sortable-list/index.d.ts +22 -0
- package/src/components/cdk/_dragDrop.scss +31 -3
- package/src/definitions/option/_option-item.scss +6 -0
- package/status-badge/index.d.ts +16 -0
- package/statusBadge/index.d.ts +1 -16
- package/table-of-content/index.d.ts +16 -0
- package/time/index.d.ts +30 -30
- package/toast/index.d.ts +3 -0
- package/tooltip/index.d.ts +9 -0
- package/user/index.d.ts +20 -3
- package/vertical-navigation/index.d.ts +42 -0
|
@@ -12,35 +12,34 @@ class NoopTreeSelectDirective {
|
|
|
12
12
|
#select;
|
|
13
13
|
constructor() {
|
|
14
14
|
this.#select = inject(ALuSelectInputComponent);
|
|
15
|
-
this.groupingFnInput = input(() => null,
|
|
16
|
-
this.groupingFn = linkedSignal(() => this.groupingFnInput()
|
|
15
|
+
this.groupingFnInput = input(() => null, { alias: 'noopTreeSelect' });
|
|
16
|
+
this.groupingFn = linkedSignal(() => this.groupingFnInput());
|
|
17
17
|
this.#select.treeGenerator = this;
|
|
18
18
|
}
|
|
19
19
|
generateTrees(items) {
|
|
20
20
|
return items;
|
|
21
21
|
}
|
|
22
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
23
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: NoopTreeSelectDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
23
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.2", type: NoopTreeSelectDirective, isStandalone: true, selector: "lu-simple-select[noopTreeSelect],lu-multi-select[noopTreeSelect]", inputs: { groupingFnInput: { classPropertyName: "groupingFnInput", publicName: "noopTreeSelect", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: NoopTreeSelectDirective, decorators: [{
|
|
26
26
|
type: Directive,
|
|
27
27
|
args: [{
|
|
28
28
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
29
29
|
selector: 'lu-simple-select[noopTreeSelect],lu-multi-select[noopTreeSelect]',
|
|
30
|
-
standalone: true,
|
|
31
30
|
}]
|
|
32
|
-
}], ctorParameters: () => []
|
|
31
|
+
}], ctorParameters: () => [] });
|
|
33
32
|
|
|
34
33
|
class LuCoreSelectDepartmentsDirective extends ALuCoreSelectApiDirective {
|
|
35
34
|
constructor() {
|
|
36
35
|
super(...arguments);
|
|
37
36
|
this.httpClient = inject(HttpClient);
|
|
38
|
-
this.url = input('/organization/structure/api/departments/tree'
|
|
39
|
-
this.filters = input(null
|
|
40
|
-
this.operationIds = input(null
|
|
41
|
-
this.uniqueOperationIds = input(null
|
|
42
|
-
this.appInstanceId = input(null
|
|
43
|
-
this.searchDelimiter = input(' '
|
|
37
|
+
this.url = input('/organization/structure/api/departments/tree');
|
|
38
|
+
this.filters = input(null);
|
|
39
|
+
this.operationIds = input(null);
|
|
40
|
+
this.uniqueOperationIds = input(null);
|
|
41
|
+
this.appInstanceId = input(null);
|
|
42
|
+
this.searchDelimiter = input(' ');
|
|
44
43
|
this.params$ = toObservable(computed(() => {
|
|
45
44
|
const operationIds = this.operationIds();
|
|
46
45
|
const uniqueOperationIds = this.uniqueOperationIds();
|
|
@@ -100,21 +99,20 @@ class LuCoreSelectDepartmentsDirective extends ALuCoreSelectApiDirective {
|
|
|
100
99
|
}
|
|
101
100
|
return result;
|
|
102
101
|
}
|
|
103
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
104
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
102
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: LuCoreSelectDepartmentsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
103
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.2", type: LuCoreSelectDepartmentsDirective, isStandalone: true, selector: "lu-simple-select[departments],lu-multi-select[departments]", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, operationIds: { classPropertyName: "operationIds", publicName: "operationIds", isSignal: true, isRequired: false, transformFunction: null }, uniqueOperationIds: { classPropertyName: "uniqueOperationIds", publicName: "uniqueOperationIds", isSignal: true, isRequired: false, transformFunction: null }, appInstanceId: { classPropertyName: "appInstanceId", publicName: "appInstanceId", isSignal: true, isRequired: false, transformFunction: null }, searchDelimiter: { classPropertyName: "searchDelimiter", publicName: "searchDelimiter", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
105
104
|
{
|
|
106
105
|
provide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,
|
|
107
106
|
useExisting: forwardRef(() => LuCoreSelectDepartmentsDirective),
|
|
108
107
|
},
|
|
109
108
|
], exportAs: ["luDepartments"], usesInheritance: true, hostDirectives: [{ directive: NoopTreeSelectDirective }], ngImport: i0 }); }
|
|
110
109
|
}
|
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: LuCoreSelectDepartmentsDirective, decorators: [{
|
|
112
111
|
type: Directive,
|
|
113
112
|
args: [{
|
|
114
113
|
// The attribute is already prefixed with "lu-simple-select" / "lu-multi-select"
|
|
115
114
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
116
115
|
selector: 'lu-simple-select[departments],lu-multi-select[departments]',
|
|
117
|
-
standalone: true,
|
|
118
116
|
exportAs: 'luDepartments',
|
|
119
117
|
providers: [
|
|
120
118
|
{
|
|
@@ -124,7 +122,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
124
122
|
],
|
|
125
123
|
hostDirectives: [NoopTreeSelectDirective],
|
|
126
124
|
}]
|
|
127
|
-
}]
|
|
125
|
+
}] });
|
|
128
126
|
|
|
129
127
|
/**
|
|
130
128
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-core-select-department.mjs","sources":["../../../packages/ng/core-select/department/noop-tree-select.directive.ts","../../../packages/ng/core-select/department/departments.directive.ts","../../../packages/ng/core-select/department/lucca-front-ng-core-select-department.ts"],"sourcesContent":["import { Directive, inject, input, linkedSignal } from '@angular/core';\nimport { ALuSelectInputComponent, TreeGenerator, TreeGroupingFn, TreeNode } from '@lucca-front/ng/core-select';\n\n@Directive({\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[noopTreeSelect],lu-multi-select[noopTreeSelect]',\n\tstandalone: true,\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class NoopTreeSelectDirective<T extends TreeNode<any>, V> implements TreeGenerator<T, T> {\n\t#select = inject<ALuSelectInputComponent<T, V>>(ALuSelectInputComponent);\n\n\tgroupingFnInput = input<TreeGroupingFn<T>>(() => null, { alias: 'noopTreeSelect' });\n\n\tgroupingFn = linkedSignal(() => this.groupingFnInput());\n\n\tconstructor() {\n\t\tthis.#select.treeGenerator = this;\n\t}\n\n\tgenerateTrees(items: T[]): T[] {\n\t\treturn items;\n\t}\n}\n","import { HttpClient } from '@angular/common/http';\nimport { computed, Directive, forwardRef, inject, input, OnInit } from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider, TreeNode } from '@lucca-front/ng/core-select';\nimport { ALuCoreSelectApiDirective } from '@lucca-front/ng/core-select/api';\nimport { combineLatest, map, Observable } from 'rxjs';\nimport { NoopTreeSelectDirective } from './noop-tree-select.directive';\nimport { ILuDepartment } from '@lucca-front/ng/department';\nimport { filter } from 'rxjs/operators';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\" / \"lu-multi-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[departments],lu-multi-select[departments]',\n\tstandalone: true,\n\texportAs: 'luDepartments',\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectDepartmentsDirective),\n\t\t},\n\t],\n\thostDirectives: [NoopTreeSelectDirective],\n})\nexport class LuCoreSelectDepartmentsDirective<T extends ILuDepartment = ILuDepartment> extends ALuCoreSelectApiDirective<TreeNode<T>> implements OnInit, CoreSelectApiTotalCountProvider {\n\tprotected httpClient = inject(HttpClient);\n\n\turl = input<string>('/organization/structure/api/departments/tree');\n\tfilters = input<Record<string, string | number | boolean> | null>(null);\n\toperationIds = input<readonly number[] | null>(null);\n\tuniqueOperationIds = input<readonly number[] | null>(null);\n\tappInstanceId = input<number | null>(null);\n\tsearchDelimiter = input<string>(' ');\n\n\tpublic override ngOnInit(): void {\n\t\tsuper.ngOnInit();\n\t}\n\n\tprotected override buildOptions(): Observable<TreeNode<T>[]> {\n\t\treturn combineLatest([super.buildOptions(), this.clue$]).pipe(\n\t\t\tmap(([data, clue]) => {\n\t\t\t\treturn this.trim(data, clue);\n\t\t\t}),\n\t\t);\n\t}\n\n\tprotected override getOptions(params: Record<string, string | number | boolean> | null): Observable<TreeNode<T>[]> {\n\t\treturn this.httpClient\n\t\t\t.get<TreeNode<T>>(this.url(), {\n\t\t\t\tparams,\n\t\t\t})\n\t\t\t.pipe(\n\t\t\t\tmap((data) => {\n\t\t\t\t\treturn data.children;\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\ttrim(options: TreeNode<T>[], clue: string): TreeNode<T>[] {\n\t\treturn options\n\t\t\t.map((option) => {\n\t\t\t\tif (option.node.name.toLowerCase().includes(clue.toLowerCase())) {\n\t\t\t\t\treturn { ...option };\n\t\t\t\t}\n\t\t\t\tconst trimmedChildren = option.children ? this.trim(option.children, clue) : [];\n\t\t\t\tif (trimmedChildren.length) {\n\t\t\t\t\treturn { ...option, children: trimmedChildren };\n\t\t\t\t}\n\t\t\t\treturn undefined;\n\t\t\t})\n\t\t\t.filter((o) => !!o);\n\t}\n\n\tprotected override params$: Observable<Record<string, string | number | boolean>> = toObservable(\n\t\tcomputed(() => {\n\t\t\tconst operationIds = this.operationIds();\n\t\t\tconst uniqueOperationIds = this.uniqueOperationIds();\n\t\t\tconst appInstanceId = this.appInstanceId();\n\t\t\treturn {\n\t\t\t\t...this.filters(),\n\t\t\t\t...(operationIds ? { operations: operationIds.join(',') } : {}),\n\t\t\t\t...(uniqueOperationIds ? { uniqueOperations: uniqueOperationIds.join(',') } : {}),\n\t\t\t\t...(appInstanceId ? { appInstanceId } : {}),\n\t\t\t};\n\t\t}),\n\t);\n\n\tpublic totalCount$ = this.select.options$.pipe(\n\t\tfilter((opts) => opts.length > 0),\n\t\tmap((opts) => {\n\t\t\treturn opts.map((branch) => this.flattenTree(branch)).flat().length;\n\t\t}),\n\t);\n\n\tprotected flattenTree(branch: TreeNode<T>): T[] {\n\t\tconst result: T[] = [branch.node];\n\t\tif (branch.children.length > 0) {\n\t\t\tresult.push(...branch.children.map((child) => this.flattenTree(child)).flat());\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected override optionKey = (option: TreeNode<T> | T) => {\n\t\tif (!option) {\n\t\t\treturn null;\n\t\t}\n\t\treturn 'node' in option ? option.node.id : option.id;\n\t};\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.NoopTreeSelectDirective"],"mappings":";;;;;;;;;AAQA;MACa,uBAAuB,CAAA;AACnC,IAAA,OAAO;AAMP,IAAA,WAAA,GAAA;AANA,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAgC,uBAAuB,CAAC;AAExE,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAoB,MAAM,IAAI,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,iBAAA,EAAI,KAAK,EAAE,gBAAgB,OAAzB,EAAE,KAAK,EAAE,gBAAgB,EAAE,GAAC;QAEnF,IAAA,CAAA,UAAU,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,eAAe,EAAE,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,YAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AAGtD,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,GAAG,IAAI;IAClC;AAEA,IAAA,aAAa,CAAC,KAAU,EAAA;AACvB,QAAA,OAAO,KAAK;IACb;+GAbY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kEAAA,EAAA,MA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,CAAC,MAAM,gCAAgC,CAAC;AAC/D,aAAA;AACD,SAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAA,uBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAGW,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAd5C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;;AAGV,oBAAA,QAAQ,EAAE,4DAA4D;AACtE,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,SAAS,EAAE;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,oCAAoC;AAC7C,4BAAA,WAAW,EAAE,UAAU,CAAC,sCAAsC,CAAC;AAC/D,yBAAA;AACD,qBAAA;oBACD,cAAc,EAAE,CAAC,uBAAuB,CAAC;AACzC,iBAAA;;;ACvBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-core-select-department.mjs","sources":["../../../packages/ng/core-select/department/noop-tree-select.directive.ts","../../../packages/ng/core-select/department/departments.directive.ts","../../../packages/ng/core-select/department/lucca-front-ng-core-select-department.ts"],"sourcesContent":["import { Directive, inject, input, linkedSignal } from '@angular/core';\nimport { ALuSelectInputComponent, TreeGenerator, TreeGroupingFn, TreeNode } from '@lucca-front/ng/core-select';\n\n@Directive({\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[noopTreeSelect],lu-multi-select[noopTreeSelect]',\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class NoopTreeSelectDirective<T extends TreeNode<any>, V> implements TreeGenerator<T, T> {\n\t#select = inject<ALuSelectInputComponent<T, V>>(ALuSelectInputComponent);\n\n\tgroupingFnInput = input<TreeGroupingFn<T>>(() => null, { alias: 'noopTreeSelect' });\n\n\tgroupingFn = linkedSignal(() => this.groupingFnInput());\n\n\tconstructor() {\n\t\tthis.#select.treeGenerator = this;\n\t}\n\n\tgenerateTrees(items: T[]): T[] {\n\t\treturn items;\n\t}\n}\n","import { HttpClient } from '@angular/common/http';\nimport { computed, Directive, forwardRef, inject, input, OnInit } from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider, TreeNode } from '@lucca-front/ng/core-select';\nimport { ALuCoreSelectApiDirective } from '@lucca-front/ng/core-select/api';\nimport { ILuDepartment } from '@lucca-front/ng/department';\nimport { combineLatest, map, Observable } from 'rxjs';\nimport { filter } from 'rxjs/operators';\nimport { NoopTreeSelectDirective } from './noop-tree-select.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\" / \"lu-multi-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[departments],lu-multi-select[departments]',\n\texportAs: 'luDepartments',\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectDepartmentsDirective),\n\t\t},\n\t],\n\thostDirectives: [NoopTreeSelectDirective],\n})\nexport class LuCoreSelectDepartmentsDirective<T extends ILuDepartment = ILuDepartment> extends ALuCoreSelectApiDirective<TreeNode<T>> implements OnInit, CoreSelectApiTotalCountProvider {\n\tprotected httpClient = inject(HttpClient);\n\n\turl = input<string>('/organization/structure/api/departments/tree');\n\tfilters = input<Record<string, string | number | boolean> | null>(null);\n\toperationIds = input<readonly number[] | null>(null);\n\tuniqueOperationIds = input<readonly number[] | null>(null);\n\tappInstanceId = input<number | null>(null);\n\tsearchDelimiter = input<string>(' ');\n\n\tpublic override ngOnInit(): void {\n\t\tsuper.ngOnInit();\n\t}\n\n\tprotected override buildOptions(): Observable<TreeNode<T>[]> {\n\t\treturn combineLatest([super.buildOptions(), this.clue$]).pipe(\n\t\t\tmap(([data, clue]) => {\n\t\t\t\treturn this.trim(data, clue);\n\t\t\t}),\n\t\t);\n\t}\n\n\tprotected override getOptions(params: Record<string, string | number | boolean> | null): Observable<TreeNode<T>[]> {\n\t\treturn this.httpClient\n\t\t\t.get<TreeNode<T>>(this.url(), {\n\t\t\t\tparams,\n\t\t\t})\n\t\t\t.pipe(\n\t\t\t\tmap((data) => {\n\t\t\t\t\treturn data.children;\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\ttrim(options: TreeNode<T>[], clue: string): TreeNode<T>[] {\n\t\treturn options\n\t\t\t.map((option) => {\n\t\t\t\tif (option.node.name.toLowerCase().includes(clue.toLowerCase())) {\n\t\t\t\t\treturn { ...option };\n\t\t\t\t}\n\t\t\t\tconst trimmedChildren = option.children ? this.trim(option.children, clue) : [];\n\t\t\t\tif (trimmedChildren.length) {\n\t\t\t\t\treturn { ...option, children: trimmedChildren };\n\t\t\t\t}\n\t\t\t\treturn undefined;\n\t\t\t})\n\t\t\t.filter((o) => !!o);\n\t}\n\n\tprotected override params$: Observable<Record<string, string | number | boolean>> = toObservable(\n\t\tcomputed(() => {\n\t\t\tconst operationIds = this.operationIds();\n\t\t\tconst uniqueOperationIds = this.uniqueOperationIds();\n\t\t\tconst appInstanceId = this.appInstanceId();\n\t\t\treturn {\n\t\t\t\t...this.filters(),\n\t\t\t\t...(operationIds ? { operations: operationIds.join(',') } : {}),\n\t\t\t\t...(uniqueOperationIds ? { uniqueOperations: uniqueOperationIds.join(',') } : {}),\n\t\t\t\t...(appInstanceId ? { appInstanceId } : {}),\n\t\t\t};\n\t\t}),\n\t);\n\n\tpublic totalCount$ = this.select.options$.pipe(\n\t\tfilter((opts) => opts.length > 0),\n\t\tmap((opts) => {\n\t\t\treturn opts.map((branch) => this.flattenTree(branch)).flat().length;\n\t\t}),\n\t);\n\n\tprotected flattenTree(branch: TreeNode<T>): T[] {\n\t\tconst result: T[] = [branch.node];\n\t\tif (branch.children.length > 0) {\n\t\t\tresult.push(...branch.children.map((child) => this.flattenTree(child)).flat());\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected override optionKey = (option: TreeNode<T> | T) => {\n\t\tif (!option) {\n\t\t\treturn null;\n\t\t}\n\t\treturn 'node' in option ? option.node.id : option.id;\n\t};\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.NoopTreeSelectDirective"],"mappings":";;;;;;;;;AAOA;MACa,uBAAuB,CAAA;AACnC,IAAA,OAAO;AAMP,IAAA,WAAA,GAAA;AANA,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAgC,uBAAuB,CAAC;AAExE,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAoB,MAAM,IAAI,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC;QAEnF,IAAU,CAAA,UAAA,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;AAGtD,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,GAAG,IAAI;;AAGlC,IAAA,aAAa,CAAC,KAAU,EAAA;AACvB,QAAA,OAAO,KAAK;;8GAZD,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kEAAA,EAAA,MAAA,EAAA,EAAA,eAAA,EAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBALnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;AAEV,oBAAA,QAAQ,EAAE,kEAAkE;AAC5E,iBAAA;;;ACiBK,MAAO,gCAA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C,sCAAsC,CAAC;AAC/D,yBAAA;AACD,qBAAA;oBACD,cAAc,EAAE,CAAC,uBAAuB,CAAC;AACzC,iBAAA;;;ACtBD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, Injectable, Component, DestroyRef, input, computed, forwardRef, Directive } from '@angular/core';
|
|
3
|
+
import { inject, Injectable, ChangeDetectionStrategy, Component, DestroyRef, input, computed, forwardRef, Directive } from '@angular/core';
|
|
4
4
|
import { map, combineLatest, shareReplay, debounceTime, switchMap, filter } from 'rxjs';
|
|
5
5
|
import { toSignal, toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { applySearchDelimiter, CORE_SELECT_API_TOTAL_COUNT_PROVIDER } from '@lucca-front/ng/core-select';
|
|
@@ -17,10 +17,10 @@ class EstablishmentGroupingService {
|
|
|
17
17
|
this.legalUnitsCount$ = this.http.get(this.legalUnitsUrl, { params: this.countParams }).pipe(map((res) => res.count));
|
|
18
18
|
this.useGrouping$ = combineLatest([this.legalUnitsCount$, this.establishmentsCount$]).pipe(map(([luCount, establishmentCount]) => luCount > 1 && establishmentCount > 1 && luCount !== establishmentCount), shareReplay());
|
|
19
19
|
}
|
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
21
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: EstablishmentGroupingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
21
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: EstablishmentGroupingService, providedIn: 'root' }); }
|
|
22
22
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: EstablishmentGroupingService, decorators: [{
|
|
24
24
|
type: Injectable,
|
|
25
25
|
args: [{ providedIn: 'root' }]
|
|
26
26
|
}] });
|
|
@@ -29,15 +29,15 @@ class LuEstablishmentGroupingComponent {
|
|
|
29
29
|
constructor() {
|
|
30
30
|
this.group = inject(PORTAL_CONTEXT).$implicit;
|
|
31
31
|
}
|
|
32
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
33
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
32
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: LuEstablishmentGroupingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
33
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.2", type: LuEstablishmentGroupingComponent, isStandalone: true, selector: "lu-establishment-grouping", ngImport: i0, template: `{{ group.options[0].legalUnit.name }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
34
34
|
}
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: LuEstablishmentGroupingComponent, decorators: [{
|
|
36
36
|
type: Component,
|
|
37
37
|
args: [{
|
|
38
38
|
selector: 'lu-establishment-grouping',
|
|
39
|
-
standalone: true,
|
|
40
39
|
template: `{{ group.options[0].legalUnit.name }}`,
|
|
40
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
41
41
|
}]
|
|
42
42
|
}] });
|
|
43
43
|
|
|
@@ -47,12 +47,12 @@ class LuCoreSelectEstablishmentsDirective extends ALuCoreSelectApiDirective {
|
|
|
47
47
|
this.#groupingService = inject(EstablishmentGroupingService);
|
|
48
48
|
this.#destroyRef = inject(DestroyRef);
|
|
49
49
|
this.httpClient = inject(HttpClient);
|
|
50
|
-
this.url = input('/organization/structure/api/establishments'
|
|
51
|
-
this.filters = input(null
|
|
52
|
-
this.operationIds = input(null
|
|
53
|
-
this.uniqueOperationIds = input(null
|
|
54
|
-
this.appInstanceId = input(null
|
|
55
|
-
this.searchDelimiter = input(' '
|
|
50
|
+
this.url = input('/organization/structure/api/establishments');
|
|
51
|
+
this.filters = input(null);
|
|
52
|
+
this.operationIds = input(null);
|
|
53
|
+
this.uniqueOperationIds = input(null);
|
|
54
|
+
this.appInstanceId = input(null);
|
|
55
|
+
this.searchDelimiter = input(' ');
|
|
56
56
|
this.clue = toSignal(this.clue$);
|
|
57
57
|
this.params$ = toObservable(computed(() => {
|
|
58
58
|
const operationIds = this.operationIds();
|
|
@@ -106,21 +106,20 @@ class LuCoreSelectEstablishmentsDirective extends ALuCoreSelectApiDirective {
|
|
|
106
106
|
.pipe(map((res) => (Array.isArray(res) ? res : res?.items) ?? []));
|
|
107
107
|
return this.#groupingService.useGrouping$.pipe(switchMap(() => options$));
|
|
108
108
|
}
|
|
109
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
110
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
109
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: LuCoreSelectEstablishmentsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
110
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.2", type: LuCoreSelectEstablishmentsDirective, isStandalone: true, selector: "lu-simple-select[establishments],lu-multi-select[establishments]", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, operationIds: { classPropertyName: "operationIds", publicName: "operationIds", isSignal: true, isRequired: false, transformFunction: null }, uniqueOperationIds: { classPropertyName: "uniqueOperationIds", publicName: "uniqueOperationIds", isSignal: true, isRequired: false, transformFunction: null }, appInstanceId: { classPropertyName: "appInstanceId", publicName: "appInstanceId", isSignal: true, isRequired: false, transformFunction: null }, searchDelimiter: { classPropertyName: "searchDelimiter", publicName: "searchDelimiter", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
111
111
|
{
|
|
112
112
|
provide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,
|
|
113
113
|
useExisting: forwardRef(() => LuCoreSelectEstablishmentsDirective),
|
|
114
114
|
},
|
|
115
115
|
], exportAs: ["luEstablishments"], usesInheritance: true, ngImport: i0 }); }
|
|
116
116
|
}
|
|
117
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: LuCoreSelectEstablishmentsDirective, decorators: [{
|
|
118
118
|
type: Directive,
|
|
119
119
|
args: [{
|
|
120
120
|
// The attribute is already prefixed with "lu-simple-select" / "lu-multi-select"
|
|
121
121
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
122
122
|
selector: 'lu-simple-select[establishments],lu-multi-select[establishments]',
|
|
123
|
-
standalone: true,
|
|
124
123
|
exportAs: 'luEstablishments',
|
|
125
124
|
providers: [
|
|
126
125
|
{
|
|
@@ -129,7 +128,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
129
128
|
},
|
|
130
129
|
],
|
|
131
130
|
}]
|
|
132
|
-
}]
|
|
131
|
+
}] });
|
|
133
132
|
|
|
134
133
|
/**
|
|
135
134
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-core-select-establishment.mjs","sources":["../../../packages/ng/core-select/establishment/establishment-grouping.service.ts","../../../packages/ng/core-select/establishment/establishment-grouping.component.ts","../../../packages/ng/core-select/establishment/establishments.directive.ts","../../../packages/ng/core-select/establishment/lucca-front-ng-core-select-establishment.ts"],"sourcesContent":["import { HttpClient, HttpParams } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { combineLatest, map, shareReplay } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class EstablishmentGroupingService {\n\tprotected http = inject(HttpClient);\n\tprotected establishmentsUrl = '/organization/structure/api/establishments';\n\tprotected legalUnitsUrl = '/organization/structure/api/legal-units';\n\n\tprotected countParams: HttpParams = new HttpParams().set('fields.root', 'count').set('limit', 0);\n\tprotected establishmentsCount$ = this.http.get<{ count: number }>(this.establishmentsUrl, { params: this.countParams }).pipe(map((res) => res.count));\n\tprotected legalUnitsCount$ = this.http.get<{ count: number }>(this.legalUnitsUrl, { params: this.countParams }).pipe(map((res) => res.count));\n\n\tpublic useGrouping$ = combineLatest([this.legalUnitsCount$, this.establishmentsCount$]).pipe(\n\t\tmap(([luCount, establishmentCount]) => luCount > 1 && establishmentCount > 1 && luCount !== establishmentCount),\n\t\tshareReplay(),\n\t);\n}\n","import { Component, inject } from '@angular/core';\nimport { PORTAL_CONTEXT } from '@lucca-front/ng/core';\nimport { LuOptionGroupByContext } from '@lucca-front/ng/core-select';\nimport { LuCoreSelectEstablishment } from './models';\n\n@Component({\n\tselector: 'lu-establishment-grouping',\n\tstandalone: true,\n\ttemplate: `{{ group.options[0].legalUnit.name }}`,\n})\nexport class LuEstablishmentGroupingComponent {\n\tgroup = inject<LuOptionGroupByContext<LuCoreSelectEstablishment, number>>(PORTAL_CONTEXT).$implicit;\n}\n","import { HttpClient } from '@angular/common/http';\nimport { DestroyRef, Directive, OnInit, computed, forwardRef, inject, input } from '@angular/core';\nimport { takeUntilDestroyed, toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider, applySearchDelimiter } from '@lucca-front/ng/core-select';\nimport { ALuCoreSelectApiDirective } from '@lucca-front/ng/core-select/api';\nimport { Observable, debounceTime, filter, map, switchMap } from 'rxjs';\nimport { LuEstablishmentGroupingComponent } from './establishment-grouping.component';\nimport { EstablishmentGroupingService } from './establishment-grouping.service';\nimport { LuCoreSelectEstablishment } from './models';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\" / \"lu-multi-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[establishments],lu-multi-select[establishments]',\n\tstandalone: true,\n\texportAs: 'luEstablishments',\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectEstablishmentsDirective),\n\t\t},\n\t],\n})\nexport class LuCoreSelectEstablishmentsDirective<T extends LuCoreSelectEstablishment = LuCoreSelectEstablishment>\n\textends ALuCoreSelectApiDirective<T>\n\timplements OnInit, CoreSelectApiTotalCountProvider\n{\n\t#groupingService = inject(EstablishmentGroupingService);\n\t#destroyRef = inject(DestroyRef);\n\n\tprotected httpClient = inject(HttpClient);\n\n\turl = input<string>('/organization/structure/api/establishments');\n\tfilters = input<Record<string, string | number | boolean> | null>(null);\n\toperationIds = input<readonly number[] | null>(null);\n\tuniqueOperationIds = input<readonly number[] | null>(null);\n\tappInstanceId = input<number | null>(null);\n\tsearchDelimiter = input<string>(' ');\n\n\tprotected clue = toSignal(this.clue$);\n\n\tpublic override ngOnInit(): void {\n\t\tsuper.ngOnInit();\n\t\tthis.initGrouping();\n\t}\n\n\tprotected initGrouping() {\n\t\tthis.#groupingService.useGrouping$.pipe(filter(Boolean), takeUntilDestroyed(this.#destroyRef)).subscribe(() => {\n\t\t\tthis.select.groupingSignal.set({\n\t\t\t\tselector: (option) => option.legalUnitId,\n\t\t\t\tcontent: LuEstablishmentGroupingComponent,\n\t\t\t});\n\t\t});\n\t}\n\n\tprotected override getOptions(params: Record<string, string | number | boolean> | null, page: number): Observable<T[]> {\n\t\tconst options$ = this.httpClient\n\t\t\t.get<T[] | { items: T[] }>(this.url(), {\n\t\t\t\tparams: {\n\t\t\t\t\t...params,\n\t\t\t\t\tpage: page + 1,\n\t\t\t\t\tlimit: this.pageSize,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.pipe(map((res) => (Array.isArray(res) ? res : res?.items) ?? []));\n\n\t\treturn this.#groupingService.useGrouping$.pipe(switchMap(() => options$));\n\t}\n\n\tprotected override params$: Observable<Record<string, string | number | boolean>> = toObservable(\n\t\tcomputed(() => {\n\t\t\tconst operationIds = this.operationIds();\n\t\t\tconst uniqueOperationIds = this.uniqueOperationIds();\n\t\t\tconst appInstanceId = this.appInstanceId();\n\t\t\tconst clue = this.clue();\n\t\t\tconst searchDelimiter = this.searchDelimiter();\n\t\t\treturn {\n\t\t\t\t...this.filters(),\n\t\t\t\t...(clue\n\t\t\t\t\t? // When the clue is not empty, sort establishments by name\n\t\t\t\t\t\t{ search: applySearchDelimiter(clue, searchDelimiter), sort: 'name' }\n\t\t\t\t\t: // When the clue is empty, establishments are grouped by legal unit, so sort them by legal unit name and then by name\n\t\t\t\t\t\t{ sort: 'legalunit.name,name' }),\n\t\t\t\t...(operationIds ? { operations: operationIds.join(',') } : {}),\n\t\t\t\t...(uniqueOperationIds ? { uniqueOperations: uniqueOperationIds.join(',') } : {}),\n\t\t\t\t...(appInstanceId ? { appInstanceId } : {}),\n\t\t\t};\n\t\t}),\n\t);\n\n\tpublic totalCount$ = toObservable(computed(() => ({ url: this.url(), filters: this.filters() }))).pipe(\n\t\tdebounceTime(250),\n\t\tswitchMap(({ url, filters }) =>\n\t\t\tthis.httpClient.get<{ count: number }>(url, {\n\t\t\t\tparams: {\n\t\t\t\t\t...filters,\n\t\t\t\t\t['fields.root']: 'count',\n\t\t\t\t},\n\t\t\t}),\n\t\t),\n\t\tmap((res) => res?.count ?? 0),\n\t);\n\n\tprotected override optionKey = (option: T) => option.id;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAKa,4BAA4B,CAAA;AADzC,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;QACzB,IAAA,CAAA,iBAAiB,GAAG,4CAA4C;QAChE,IAAA,CAAA,aAAa,GAAG,yCAAyC;AAEzD,QAAA,IAAA,CAAA,WAAW,GAAe,IAAI,UAAU,EAAE,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;AACtF,QAAA,IAAA,CAAA,oBAAoB,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAoB,IAAI,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;AAC3I,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAoB,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;AAEtI,QAAA,IAAA,CAAA,YAAY,GAAG,aAAa,CAAC,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAC3F,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,kBAAkB,CAAC,KAAK,OAAO,GAAG,CAAC,IAAI,kBAAkB,GAAG,CAAC,IAAI,OAAO,KAA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D,iBAAA;;;ACtBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-core-select-establishment.mjs","sources":["../../../packages/ng/core-select/establishment/establishment-grouping.service.ts","../../../packages/ng/core-select/establishment/establishment-grouping.component.ts","../../../packages/ng/core-select/establishment/establishments.directive.ts","../../../packages/ng/core-select/establishment/lucca-front-ng-core-select-establishment.ts"],"sourcesContent":["import { HttpClient, HttpParams } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { combineLatest, map, shareReplay } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class EstablishmentGroupingService {\n\tprotected http = inject(HttpClient);\n\tprotected establishmentsUrl = '/organization/structure/api/establishments';\n\tprotected legalUnitsUrl = '/organization/structure/api/legal-units';\n\n\tprotected countParams: HttpParams = new HttpParams().set('fields.root', 'count').set('limit', 0);\n\tprotected establishmentsCount$ = this.http.get<{ count: number }>(this.establishmentsUrl, { params: this.countParams }).pipe(map((res) => res.count));\n\tprotected legalUnitsCount$ = this.http.get<{ count: number }>(this.legalUnitsUrl, { params: this.countParams }).pipe(map((res) => res.count));\n\n\tpublic useGrouping$ = combineLatest([this.legalUnitsCount$, this.establishmentsCount$]).pipe(\n\t\tmap(([luCount, establishmentCount]) => luCount > 1 && establishmentCount > 1 && luCount !== establishmentCount),\n\t\tshareReplay(),\n\t);\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { PORTAL_CONTEXT } from '@lucca-front/ng/core';\nimport { LuOptionGroupByContext } from '@lucca-front/ng/core-select';\nimport { LuCoreSelectEstablishment } from './models';\n\n@Component({\n\tselector: 'lu-establishment-grouping',\n\ttemplate: `{{ group.options[0].legalUnit.name }}`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LuEstablishmentGroupingComponent {\n\tgroup = inject<LuOptionGroupByContext<LuCoreSelectEstablishment, number>>(PORTAL_CONTEXT).$implicit;\n}\n","import { HttpClient } from '@angular/common/http';\nimport { DestroyRef, Directive, OnInit, computed, forwardRef, inject, input } from '@angular/core';\nimport { takeUntilDestroyed, toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider, applySearchDelimiter } from '@lucca-front/ng/core-select';\nimport { ALuCoreSelectApiDirective } from '@lucca-front/ng/core-select/api';\nimport { Observable, debounceTime, filter, map, switchMap } from 'rxjs';\nimport { LuEstablishmentGroupingComponent } from './establishment-grouping.component';\nimport { EstablishmentGroupingService } from './establishment-grouping.service';\nimport { LuCoreSelectEstablishment } from './models';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\" / \"lu-multi-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[establishments],lu-multi-select[establishments]',\n\texportAs: 'luEstablishments',\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectEstablishmentsDirective),\n\t\t},\n\t],\n})\nexport class LuCoreSelectEstablishmentsDirective<T extends LuCoreSelectEstablishment = LuCoreSelectEstablishment>\n\textends ALuCoreSelectApiDirective<T>\n\timplements OnInit, CoreSelectApiTotalCountProvider\n{\n\t#groupingService = inject(EstablishmentGroupingService);\n\t#destroyRef = inject(DestroyRef);\n\n\tprotected httpClient = inject(HttpClient);\n\n\turl = input<string>('/organization/structure/api/establishments');\n\tfilters = input<Record<string, string | number | boolean> | null>(null);\n\toperationIds = input<readonly number[] | null>(null);\n\tuniqueOperationIds = input<readonly number[] | null>(null);\n\tappInstanceId = input<number | null>(null);\n\tsearchDelimiter = input<string>(' ');\n\n\tprotected clue = toSignal(this.clue$);\n\n\tpublic override ngOnInit(): void {\n\t\tsuper.ngOnInit();\n\t\tthis.initGrouping();\n\t}\n\n\tprotected initGrouping() {\n\t\tthis.#groupingService.useGrouping$.pipe(filter(Boolean), takeUntilDestroyed(this.#destroyRef)).subscribe(() => {\n\t\t\tthis.select.groupingSignal.set({\n\t\t\t\tselector: (option) => option.legalUnitId,\n\t\t\t\tcontent: LuEstablishmentGroupingComponent,\n\t\t\t});\n\t\t});\n\t}\n\n\tprotected override getOptions(params: Record<string, string | number | boolean> | null, page: number): Observable<T[]> {\n\t\tconst options$ = this.httpClient\n\t\t\t.get<T[] | { items: T[] }>(this.url(), {\n\t\t\t\tparams: {\n\t\t\t\t\t...params,\n\t\t\t\t\tpage: page + 1,\n\t\t\t\t\tlimit: this.pageSize,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.pipe(map((res) => (Array.isArray(res) ? res : res?.items) ?? []));\n\n\t\treturn this.#groupingService.useGrouping$.pipe(switchMap(() => options$));\n\t}\n\n\tprotected override params$: Observable<Record<string, string | number | boolean>> = toObservable(\n\t\tcomputed(() => {\n\t\t\tconst operationIds = this.operationIds();\n\t\t\tconst uniqueOperationIds = this.uniqueOperationIds();\n\t\t\tconst appInstanceId = this.appInstanceId();\n\t\t\tconst clue = this.clue();\n\t\t\tconst searchDelimiter = this.searchDelimiter();\n\t\t\treturn {\n\t\t\t\t...this.filters(),\n\t\t\t\t...(clue\n\t\t\t\t\t? // When the clue is not empty, sort establishments by name\n\t\t\t\t\t\t{ search: applySearchDelimiter(clue, searchDelimiter), sort: 'name' }\n\t\t\t\t\t: // When the clue is empty, establishments are grouped by legal unit, so sort them by legal unit name and then by name\n\t\t\t\t\t\t{ sort: 'legalunit.name,name' }),\n\t\t\t\t...(operationIds ? { operations: operationIds.join(',') } : {}),\n\t\t\t\t...(uniqueOperationIds ? { uniqueOperations: uniqueOperationIds.join(',') } : {}),\n\t\t\t\t...(appInstanceId ? { appInstanceId } : {}),\n\t\t\t};\n\t\t}),\n\t);\n\n\tpublic totalCount$ = toObservable(computed(() => ({ url: this.url(), filters: this.filters() }))).pipe(\n\t\tdebounceTime(250),\n\t\tswitchMap(({ url, filters }) =>\n\t\t\tthis.httpClient.get<{ count: number }>(url, {\n\t\t\t\tparams: {\n\t\t\t\t\t...filters,\n\t\t\t\t\t['fields.root']: 'count',\n\t\t\t\t},\n\t\t\t}),\n\t\t),\n\t\tmap((res) => res?.count ?? 0),\n\t);\n\n\tprotected override optionKey = (option: T) => option.id;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAKa,4BAA4B,CAAA;AADzC,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;QACzB,IAAiB,CAAA,iBAAA,GAAG,4CAA4C;QAChE,IAAa,CAAA,aAAA,GAAG,yCAAyC;AAEzD,QAAA,IAAA,CAAA,WAAW,GAAe,IAAI,UAAU,EAAE,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;AACtF,QAAA,IAAA,CAAA,oBAAoB,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAoB,IAAI,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;AAC3I,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAoB,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;AAEtI,QAAA,IAAA,CAAA,YAAY,GAAG,aAAa,CAAC,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAC3F,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,kBAAkB,CAAC,KAAK,OAAO,GAAG,CAAC,IAAI,kBAAkB,GAAG,C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D,iBAAA;;;ACrBD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, Component, input, computed, forwardRef, Directive } from '@angular/core';
|
|
3
|
+
import { inject, ChangeDetectionStrategy, Component, input, computed, forwardRef, Directive } from '@angular/core';
|
|
4
4
|
import { toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
5
5
|
import { applySearchDelimiter, CORE_SELECT_API_TOTAL_COUNT_PROVIDER } from '@lucca-front/ng/core-select';
|
|
6
6
|
import { ALuCoreSelectApiDirective } from '@lucca-front/ng/core-select/api';
|
|
@@ -12,16 +12,16 @@ class LuJobQualificationGroupingComponent {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
this.group = inject(PORTAL_CONTEXT).$implicit;
|
|
14
14
|
}
|
|
15
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
16
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
15
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: LuJobQualificationGroupingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
16
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.2", type: LuJobQualificationGroupingComponent, isStandalone: true, selector: "lu-job-qualification-grouping", ngImport: i0, template: `{{ group.options[0].job.name }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17
17
|
}
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: LuJobQualificationGroupingComponent, decorators: [{
|
|
19
19
|
type: Component,
|
|
20
20
|
args: [{
|
|
21
21
|
selector: 'lu-job-qualification-grouping',
|
|
22
|
-
standalone: true,
|
|
23
22
|
imports: [AsyncPipe],
|
|
24
23
|
template: `{{ group.options[0].job.name }}`,
|
|
24
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
25
25
|
}]
|
|
26
26
|
}] });
|
|
27
27
|
|
|
@@ -29,9 +29,9 @@ class LuCoreSelectJobQualificationsDirective extends ALuCoreSelectApiDirective {
|
|
|
29
29
|
constructor() {
|
|
30
30
|
super();
|
|
31
31
|
this.httpClient = inject(HttpClient);
|
|
32
|
-
this.url = input('/organization/structure/api/job-qualifications'
|
|
33
|
-
this.filters = input(null
|
|
34
|
-
this.searchDelimiter = input(' '
|
|
32
|
+
this.url = input('/organization/structure/api/job-qualifications');
|
|
33
|
+
this.filters = input(null);
|
|
34
|
+
this.searchDelimiter = input(' ');
|
|
35
35
|
this.clue = toSignal(this.clue$);
|
|
36
36
|
this.params$ = toObservable(computed(() => {
|
|
37
37
|
const filters = this.filters();
|
|
@@ -69,21 +69,20 @@ class LuCoreSelectJobQualificationsDirective extends ALuCoreSelectApiDirective {
|
|
|
69
69
|
})
|
|
70
70
|
.pipe(map((res) => (Array.isArray(res) ? res : res?.items) ?? []));
|
|
71
71
|
}
|
|
72
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
73
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
72
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: LuCoreSelectJobQualificationsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
73
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.2", type: LuCoreSelectJobQualificationsDirective, isStandalone: true, selector: "lu-simple-select[jobQualifications],lu-multi-select[jobQualifications]", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, searchDelimiter: { classPropertyName: "searchDelimiter", publicName: "searchDelimiter", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
74
74
|
{
|
|
75
75
|
provide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,
|
|
76
76
|
useExisting: forwardRef(() => LuCoreSelectJobQualificationsDirective),
|
|
77
77
|
},
|
|
78
78
|
], exportAs: ["jobQualifications"], usesInheritance: true, ngImport: i0 }); }
|
|
79
79
|
}
|
|
80
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: LuCoreSelectJobQualificationsDirective, decorators: [{
|
|
81
81
|
type: Directive,
|
|
82
82
|
args: [{
|
|
83
83
|
// The attribute is already prefixed with "lu-simple-select" / "lu-multi-select"
|
|
84
84
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
85
85
|
selector: 'lu-simple-select[jobQualifications],lu-multi-select[jobQualifications]',
|
|
86
|
-
standalone: true,
|
|
87
86
|
exportAs: 'jobQualifications',
|
|
88
87
|
providers: [
|
|
89
88
|
{
|
|
@@ -92,7 +91,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
92
91
|
},
|
|
93
92
|
],
|
|
94
93
|
}]
|
|
95
|
-
}], ctorParameters: () => []
|
|
94
|
+
}], ctorParameters: () => [] });
|
|
96
95
|
|
|
97
96
|
/**
|
|
98
97
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-core-select-job-qualification.mjs","sources":["../../../packages/ng/core-select/job-qualification/job-qualification-grouping.component.ts","../../../packages/ng/core-select/job-qualification/job-qualifications.directive.ts","../../../packages/ng/core-select/job-qualification/lucca-front-ng-core-select-job-qualification.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { Component, inject } from '@angular/core';\nimport { PORTAL_CONTEXT } from '@lucca-front/ng/core';\nimport { LuOptionGroupByContext } from '@lucca-front/ng/core-select';\nimport { LuCoreSelectJobQualification } from './models';\n\n@Component({\n\tselector: 'lu-job-qualification-grouping',\n\
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-core-select-job-qualification.mjs","sources":["../../../packages/ng/core-select/job-qualification/job-qualification-grouping.component.ts","../../../packages/ng/core-select/job-qualification/job-qualifications.directive.ts","../../../packages/ng/core-select/job-qualification/lucca-front-ng-core-select-job-qualification.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { PORTAL_CONTEXT } from '@lucca-front/ng/core';\nimport { LuOptionGroupByContext } from '@lucca-front/ng/core-select';\nimport { LuCoreSelectJobQualification } from './models';\n\n@Component({\n\tselector: 'lu-job-qualification-grouping',\n\timports: [AsyncPipe],\n\ttemplate: `{{ group.options[0].job.name }}`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LuJobQualificationGroupingComponent {\n\tgroup = inject<LuOptionGroupByContext<LuCoreSelectJobQualification, number>>(PORTAL_CONTEXT).$implicit;\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Directive, OnInit, computed, forwardRef, inject, input } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider, applySearchDelimiter } from '@lucca-front/ng/core-select';\nimport { ALuCoreSelectApiDirective } from '@lucca-front/ng/core-select/api';\nimport { Observable, debounceTime, map, switchMap } from 'rxjs';\nimport { LuJobQualificationGroupingComponent } from './job-qualification-grouping.component';\nimport { LuCoreSelectJobQualification } from './models';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\" / \"lu-multi-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[jobQualifications],lu-multi-select[jobQualifications]',\n\texportAs: 'jobQualifications',\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectJobQualificationsDirective),\n\t\t},\n\t],\n})\nexport class LuCoreSelectJobQualificationsDirective<T extends LuCoreSelectJobQualification = LuCoreSelectJobQualification>\n\textends ALuCoreSelectApiDirective<T>\n\timplements OnInit, CoreSelectApiTotalCountProvider\n{\n\tprotected httpClient = inject(HttpClient);\n\n\turl = input<string>('/organization/structure/api/job-qualifications');\n\tfilters = input<Record<string, string | number | boolean> | null>(null);\n\tsearchDelimiter = input<string>(' ');\n\n\tprotected clue = toSignal(this.clue$);\n\n\tpublic constructor() {\n\t\tsuper();\n\n\t\tthis.select.groupingSignal.set({\n\t\t\tselector: (option) => option.job.id,\n\t\t\tcontent: LuJobQualificationGroupingComponent,\n\t\t});\n\t}\n\n\tprotected override getOptions(params: Record<string, string | number | boolean> | null, page: number): Observable<T[]> {\n\t\treturn this.httpClient\n\t\t\t.get<T[] | { items: T[] }>(this.url(), {\n\t\t\t\tparams: {\n\t\t\t\t\t...params,\n\t\t\t\t\tpage: page + 1,\n\t\t\t\t\tlimit: this.pageSize,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.pipe(map((res) => (Array.isArray(res) ? res : res?.items) ?? []));\n\t}\n\n\tprotected override params$: Observable<Record<string, string | number | boolean>> = toObservable(\n\t\tcomputed(() => {\n\t\t\tconst filters = this.filters();\n\t\t\tconst clue = this.clue();\n\t\t\treturn {\n\t\t\t\t...filters,\n\t\t\t\t...(clue\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tsearch: applySearchDelimiter(clue, this.searchDelimiter()),\n\t\t\t\t\t\t\tsort: 'name',\n\t\t\t\t\t\t}\n\t\t\t\t\t: { sort: 'job.name,level.position' }),\n\t\t\t};\n\t\t}),\n\t);\n\n\tpublic totalCount$ = toObservable(computed(() => ({ url: this.url(), filters: this.filters() }))).pipe(\n\t\tdebounceTime(250),\n\t\tswitchMap(({ url, filters }) =>\n\t\t\tthis.httpClient.get<{ count: number }>(url, {\n\t\t\t\tparams: {\n\t\t\t\t\t...filters,\n\t\t\t\t\t['fields.root']: 'count',\n\t\t\t\t},\n\t\t\t}),\n\t\t),\n\t\tmap((res) => res?.count ?? 0),\n\t);\n\n\tprotected override optionKey = (option: T) => option.id;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAYa,mCAAmC,CAAA;AANhD,IAAA,WAAA,GAAA;AAOC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAA+D,cAAc,CAAC,CAAC,SAAS;AACtG;8GAFY,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mCAAmC,yFAHrC,CAAiC,+BAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAG/B,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAN/C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,+BAA+B;oBACzC,OAAO,EAAE,CAAC,SAAS,CAAC;AACpB,oBAAA,QAAQ,EAAE,CAAiC,+BAAA,CAAA;oBAC3C,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,iBAAA;;;ACUK,MAAO,sCACZ,SAAQ,yBAA4B,CAAA;AAWpC,IAAA,WAAA,GAAA;AACC,QAAA,KAAK,EAAE;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AA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,eAAA,EAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EAAA;AACV,YAAA;AACC,gBAAA,OAAO,EAAE,oCAAoC;AAC7C,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,sCAAsC,CAAC;AACrE,aAAA;AACD,SAAA,EAAA,QAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAEW,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBAZlD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;;AAGV,oBAAA,QAAQ,EAAE,wEAAwE;AAClF,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,SAAS,EAAE;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,oCAAoC;AAC7C,4BAAA,WAAW,EAAE,UAAU,CAAC,4CAA4C,CAAC;AACrE,yBAAA;AACD,qBAAA;AACD,iBAAA;;;ACpBD;;AAEG;;;;"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { inject, input, computed, forwardRef, Directive } from '@angular/core';
|
|
4
|
+
import { toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
5
|
+
import { applySearchDelimiter, CORE_SELECT_API_TOTAL_COUNT_PROVIDER } from '@lucca-front/ng/core-select';
|
|
6
|
+
import { ALuCoreSelectApiDirective } from '@lucca-front/ng/core-select/api';
|
|
7
|
+
import { debounceTime, switchMap, map } from 'rxjs';
|
|
8
|
+
|
|
9
|
+
class LuCoreSelectOccupationCategoriesDirective extends ALuCoreSelectApiDirective {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.httpClient = inject(HttpClient);
|
|
13
|
+
this.url = input('/organization/structure/api/occupation-categories');
|
|
14
|
+
this.filters = input(null);
|
|
15
|
+
this.searchDelimiter = input(' ');
|
|
16
|
+
this.clue = toSignal(this.clue$);
|
|
17
|
+
this.params$ = toObservable(computed(() => {
|
|
18
|
+
const filters = this.filters();
|
|
19
|
+
const clue = this.clue();
|
|
20
|
+
return {
|
|
21
|
+
...filters,
|
|
22
|
+
...(clue
|
|
23
|
+
? {
|
|
24
|
+
search: applySearchDelimiter(clue, this.searchDelimiter()),
|
|
25
|
+
sort: 'name',
|
|
26
|
+
}
|
|
27
|
+
: { sort: 'name' }),
|
|
28
|
+
};
|
|
29
|
+
}));
|
|
30
|
+
this.totalCount$ = toObservable(computed(() => ({ url: this.url(), filters: this.filters() }))).pipe(debounceTime(250), switchMap(({ url, filters }) => this.httpClient.get(url, {
|
|
31
|
+
params: {
|
|
32
|
+
...filters,
|
|
33
|
+
['fields.root']: 'count',
|
|
34
|
+
},
|
|
35
|
+
})), map((res) => res?.count ?? 0));
|
|
36
|
+
this.optionKey = (option) => option.id;
|
|
37
|
+
}
|
|
38
|
+
getOptions(params, page) {
|
|
39
|
+
return this.httpClient
|
|
40
|
+
.get(this.url(), {
|
|
41
|
+
params: {
|
|
42
|
+
...params,
|
|
43
|
+
page: page + 1,
|
|
44
|
+
limit: this.pageSize,
|
|
45
|
+
},
|
|
46
|
+
})
|
|
47
|
+
.pipe(map((res) => (Array.isArray(res) ? res : res?.items) ?? []));
|
|
48
|
+
}
|
|
49
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: LuCoreSelectOccupationCategoriesDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
50
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.2", type: LuCoreSelectOccupationCategoriesDirective, isStandalone: true, selector: "lu-simple-select[occupationCategories],lu-multi-select[occupationCategories]", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, searchDelimiter: { classPropertyName: "searchDelimiter", publicName: "searchDelimiter", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
51
|
+
{
|
|
52
|
+
provide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,
|
|
53
|
+
useExisting: forwardRef(() => LuCoreSelectOccupationCategoriesDirective),
|
|
54
|
+
},
|
|
55
|
+
], exportAs: ["occupationCategories"], usesInheritance: true, ngImport: i0 }); }
|
|
56
|
+
}
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: LuCoreSelectOccupationCategoriesDirective, decorators: [{
|
|
58
|
+
type: Directive,
|
|
59
|
+
args: [{
|
|
60
|
+
// The attribute is already prefixed with "lu-simple-select" / "lu-multi-select"
|
|
61
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
62
|
+
selector: 'lu-simple-select[occupationCategories],lu-multi-select[occupationCategories]',
|
|
63
|
+
standalone: true,
|
|
64
|
+
exportAs: 'occupationCategories',
|
|
65
|
+
providers: [
|
|
66
|
+
{
|
|
67
|
+
provide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,
|
|
68
|
+
useExisting: forwardRef(() => LuCoreSelectOccupationCategoriesDirective),
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
}]
|
|
72
|
+
}] });
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Generated bundle index. Do not edit.
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
export { LuCoreSelectOccupationCategoriesDirective };
|
|
79
|
+
//# sourceMappingURL=lucca-front-ng-core-select-occupation-category.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-core-select-occupation-category.mjs","sources":["../../../packages/ng/core-select/occupation-category/occupation-category.directive.ts","../../../packages/ng/core-select/occupation-category/lucca-front-ng-core-select-occupation-category.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport { Directive, OnInit, computed, forwardRef, inject, input } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider, applySearchDelimiter } from '@lucca-front/ng/core-select';\nimport { ALuCoreSelectApiDirective } from '@lucca-front/ng/core-select/api';\nimport { Observable, debounceTime, map, switchMap } from 'rxjs';\nimport { LuCoreSelectOccupationCategory } from './models';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\" / \"lu-multi-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[occupationCategories],lu-multi-select[occupationCategories]',\n\tstandalone: true,\n\texportAs: 'occupationCategories',\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectOccupationCategoriesDirective),\n\t\t},\n\t],\n})\nexport class LuCoreSelectOccupationCategoriesDirective<T extends LuCoreSelectOccupationCategory = LuCoreSelectOccupationCategory>\n\textends ALuCoreSelectApiDirective<T>\n\timplements OnInit, CoreSelectApiTotalCountProvider\n{\n\tprotected httpClient = inject(HttpClient);\n\n\turl = input<string>('/organization/structure/api/occupation-categories');\n\tfilters = input<Record<string, string | number | boolean> | null>(null);\n\tsearchDelimiter = input<string>(' ');\n\n\tprotected clue = toSignal(this.clue$);\n\n\tprotected override getOptions(params: Record<string, string | number | boolean> | null, page: number): Observable<T[]> {\n\t\treturn this.httpClient\n\t\t\t.get<T[] | { items: T[] }>(this.url(), {\n\t\t\t\tparams: {\n\t\t\t\t\t...params,\n\t\t\t\t\tpage: page + 1,\n\t\t\t\t\tlimit: this.pageSize,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.pipe(map((res) => (Array.isArray(res) ? res : res?.items) ?? []));\n\t}\n\n\tprotected override params$: Observable<Record<string, string | number | boolean>> = toObservable(\n\t\tcomputed(() => {\n\t\t\tconst filters = this.filters();\n\t\t\tconst clue = this.clue();\n\t\t\treturn {\n\t\t\t\t...filters,\n\t\t\t\t...(clue\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tsearch: applySearchDelimiter(clue, this.searchDelimiter()),\n\t\t\t\t\t\t\tsort: 'name',\n\t\t\t\t\t\t}\n\t\t\t\t\t: { sort: 'name' }),\n\t\t\t};\n\t\t}),\n\t);\n\n\tpublic totalCount$ = toObservable(computed(() => ({ url: this.url(), filters: this.filters() }))).pipe(\n\t\tdebounceTime(250),\n\t\tswitchMap(({ url, filters }) =>\n\t\t\tthis.httpClient.get<{ count: number }>(url, {\n\t\t\t\tparams: {\n\t\t\t\t\t...filters,\n\t\t\t\t\t['fields.root']: 'count',\n\t\t\t\t},\n\t\t\t}),\n\t\t),\n\t\tmap((res) => res?.count ?? 0),\n\t);\n\n\tprotected override optionKey = (option: T) => option.id;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAqBM,MAAO,yCACZ,SAAQ,yBAA4B,CAAA;AAdrC,IAAA,WAAA,GAAA;;AAiBW,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAEzC,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAS,mDAAmD,CAAC;AACxE,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAmD,IAAI,CAAC;AACvE,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAS,GAAG,CAAC;AAE1B,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;AAclB,QAAA,IAAA,CAAA,OAAO,G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