@lucca-front/ng 20.3.4 → 20.4.0
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/fesm2022/lucca-front-ng-a11y.mjs +3 -3
- package/fesm2022/lucca-front-ng-a11y.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-api.mjs +48 -48
- package/fesm2022/lucca-front-ng-api.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-app-layout.mjs +5 -5
- package/fesm2022/lucca-front-ng-app-layout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-box.mjs +6 -6
- package/fesm2022/lucca-front-ng-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs +7 -7
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-button.mjs +4 -4
- package/fesm2022/lucca-front-ng-button.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-callout.mjs +27 -27
- package/fesm2022/lucca-front-ng-callout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-chip.mjs +5 -5
- package/fesm2022/lucca-front-ng-chip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-comment.mjs +10 -10
- package/fesm2022/lucca-front-ng-comment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-container.mjs +5 -5
- package/fesm2022/lucca-front-ng-container.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-api.mjs +9 -9
- package/fesm2022/lucca-front-ng-core-select-api.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-department.mjs +7 -7
- package/fesm2022/lucca-front-ng-core-select-department.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-establishment.mjs +9 -9
- package/fesm2022/lucca-front-ng-core-select-establishment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs +6 -6
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-user.mjs +19 -19
- package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select.mjs +58 -57
- package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core.mjs +15 -15
- package/fesm2022/lucca-front-ng-core.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-data-table.mjs +36 -36
- package/fesm2022/lucca-front-ng-data-table.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date.mjs +48 -48
- package/fesm2022/lucca-front-ng-date.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date2.mjs +43 -50
- package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-department.mjs +28 -28
- package/fesm2022/lucca-front-ng-department.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dialog.mjs +32 -32
- package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-divider.mjs +6 -6
- package/fesm2022/lucca-front-ng-divider.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dropdown.mjs +44 -44
- package/fesm2022/lucca-front-ng-dropdown.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-empty-state.mjs +8 -8
- package/fesm2022/lucca-front-ng-empty-state.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-establishment.mjs +50 -50
- package/fesm2022/lucca-front-ng-establishment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-fancy-box.mjs +4 -4
- package/fesm2022/lucca-front-ng-fancy-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-file-upload.mjs +21 -21
- package/fesm2022/lucca-front-ng-file-upload.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-filter-pills.mjs +23 -23
- package/fesm2022/lucca-front-ng-filter-pills.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-footer.mjs +8 -8
- package/fesm2022/lucca-front-ng-footer.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-field.mjs +20 -22
- package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-formly.mjs +58 -58
- package/fesm2022/lucca-front-ng-formly.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs +7 -7
- 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 +3 -3
- 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 -3
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-markdown.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs +42 -42
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms.mjs +54 -54
- package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-gauge.mjs +10 -10
- package/fesm2022/lucca-front-ng-gauge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-grid.mjs +13 -13
- package/fesm2022/lucca-front-ng-grid.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-highlight-data.mjs +5 -5
- package/fesm2022/lucca-front-ng-highlight-data.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-horizontal-navigation.mjs +9 -9
- package/fesm2022/lucca-front-ng-horizontal-navigation.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-icon.mjs +4 -4
- package/fesm2022/lucca-front-ng-icon.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-inline-message.mjs +3 -3
- package/fesm2022/lucca-front-ng-inline-message.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-input.mjs +21 -21
- package/fesm2022/lucca-front-ng-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-link.mjs +9 -9
- package/fesm2022/lucca-front-ng-link.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listbox.mjs +18 -18
- package/fesm2022/lucca-front-ng-listbox.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listing.mjs +9 -9
- package/fesm2022/lucca-front-ng-listing.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-loading.mjs +5 -5
- package/fesm2022/lucca-front-ng-loading.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-main-layout.mjs +10 -10
- package/fesm2022/lucca-front-ng-main-layout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-mobile-push.mjs +3 -3
- package/fesm2022/lucca-front-ng-mobile-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-modal.mjs +22 -22
- package/fesm2022/lucca-front-ng-modal.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-multi-select.mjs +35 -35
- package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-new-badge.mjs +3 -3
- package/fesm2022/lucca-front-ng-new-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-number-format.mjs +6 -6
- package/fesm2022/lucca-front-ng-number-format.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-number.mjs +7 -7
- package/fesm2022/lucca-front-ng-number.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-numeric-badge.mjs +5 -5
- package/fesm2022/lucca-front-ng-numeric-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-option.mjs +154 -154
- package/fesm2022/lucca-front-ng-option.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-page-header.mjs +5 -5
- package/fesm2022/lucca-front-ng-page-header.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-pagination.mjs +5 -5
- package/fesm2022/lucca-front-ng-pagination.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-plg-push.mjs +3 -3
- package/fesm2022/lucca-front-ng-plg-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover.mjs +25 -25
- package/fesm2022/lucca-front-ng-popover.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover2.mjs +11 -11
- package/fesm2022/lucca-front-ng-popover2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popup.mjs +10 -10
- package/fesm2022/lucca-front-ng-popup.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-read-more.mjs +5 -5
- package/fesm2022/lucca-front-ng-read-more.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-safe-content.mjs +13 -13
- package/fesm2022/lucca-front-ng-safe-content.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-scroll.mjs +7 -7
- package/fesm2022/lucca-front-ng-scroll.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-scrollBox.mjs +3 -3
- package/fesm2022/lucca-front-ng-scrollBox.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmentedControl.mjs +11 -11
- package/fesm2022/lucca-front-ng-segmentedControl.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmentedControlTabs.mjs +10 -10
- package/fesm2022/lucca-front-ng-segmentedControlTabs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-select.mjs +14 -14
- 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 +13 -13
- package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-skeleton.mjs +26 -26
- package/fesm2022/lucca-front-ng-skeleton.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-statusBadge.mjs +4 -4
- package/fesm2022/lucca-front-ng-statusBadge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tag.mjs +6 -6
- package/fesm2022/lucca-front-ng-tag.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-time.mjs +24 -36
- 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 +10 -10
- package/fesm2022/lucca-front-ng-toast.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tooltip.mjs +24 -24
- package/fesm2022/lucca-front-ng-tooltip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tree-select.mjs +9 -9
- package/fesm2022/lucca-front-ng-tree-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user-popover.mjs +18 -18
- package/fesm2022/lucca-front-ng-user-popover.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user.mjs +65 -65
- package/fesm2022/lucca-front-ng-user.mjs.map +1 -1
- package/package.json +92 -92
- package/{a11y/index.d.ts → types/lucca-front-ng-a11y.d.ts} +9 -8
- package/{callout/index.d.ts → types/lucca-front-ng-callout.d.ts} +2 -1
- package/{core-select/index.d.ts → types/lucca-front-ng-core-select.d.ts} +11 -10
- package/{date2/index.d.ts → types/lucca-front-ng-date2.d.ts} +1 -1
- package/{department/index.d.ts → types/lucca-front-ng-department.d.ts} +9 -8
- package/{dialog/index.d.ts → types/lucca-front-ng-dialog.d.ts} +38 -37
- package/{dropdown/index.d.ts → types/lucca-front-ng-dropdown.d.ts} +2 -2
- package/{establishment/index.d.ts → types/lucca-front-ng-establishment.d.ts} +10 -9
- package/{form-field/index.d.ts → types/lucca-front-ng-form-field.d.ts} +10 -10
- package/{forms/phone-number-input/index.d.ts → types/lucca-front-ng-forms-phone-number-input.d.ts} +1 -2
- package/{forms/index.d.ts → types/lucca-front-ng-forms.d.ts} +20 -19
- package/{modal/index.d.ts → types/lucca-front-ng-modal.d.ts} +13 -12
- package/{multi-select/index.d.ts → types/lucca-front-ng-multi-select.d.ts} +30 -29
- package/{option/index.d.ts → types/lucca-front-ng-option.d.ts} +28 -27
- package/{popover2/index.d.ts → types/lucca-front-ng-popover2.d.ts} +22 -21
- package/{popup/index.d.ts → types/lucca-front-ng-popup.d.ts} +2 -1
- package/{select/index.d.ts → types/lucca-front-ng-select.d.ts} +1 -1
- package/{simple-select/index.d.ts → types/lucca-front-ng-simple-select.d.ts} +15 -14
- package/{time/index.d.ts → types/lucca-front-ng-time.d.ts} +16 -15
- package/{toast/index.d.ts → types/lucca-front-ng-toast.d.ts} +11 -10
- package/{user-popover/index.d.ts → types/lucca-front-ng-user-popover.d.ts} +23 -22
- package/{user/index.d.ts → types/lucca-front-ng-user.d.ts} +18 -17
- /package/{animations/index.d.ts → types/lucca-front-ng-animations.d.ts} +0 -0
- /package/{api/index.d.ts → types/lucca-front-ng-api.d.ts} +0 -0
- /package/{app-layout/index.d.ts → types/lucca-front-ng-app-layout.d.ts} +0 -0
- /package/{box/index.d.ts → types/lucca-front-ng-box.d.ts} +0 -0
- /package/{breadcrumbs/index.d.ts → types/lucca-front-ng-breadcrumbs.d.ts} +0 -0
- /package/{button/index.d.ts → types/lucca-front-ng-button.d.ts} +0 -0
- /package/{chip/index.d.ts → types/lucca-front-ng-chip.d.ts} +0 -0
- /package/{comment/index.d.ts → types/lucca-front-ng-comment.d.ts} +0 -0
- /package/{container/index.d.ts → types/lucca-front-ng-container.d.ts} +0 -0
- /package/{core-select/api/index.d.ts → types/lucca-front-ng-core-select-api.d.ts} +0 -0
- /package/{core-select/department/index.d.ts → types/lucca-front-ng-core-select-department.d.ts} +0 -0
- /package/{core-select/establishment/index.d.ts → types/lucca-front-ng-core-select-establishment.d.ts} +0 -0
- /package/{core-select/job-qualification/index.d.ts → types/lucca-front-ng-core-select-job-qualification.d.ts} +0 -0
- /package/{core-select/user/index.d.ts → types/lucca-front-ng-core-select-user.d.ts} +0 -0
- /package/{core/index.d.ts → types/lucca-front-ng-core.d.ts} +0 -0
- /package/{data-table/index.d.ts → types/lucca-front-ng-data-table.d.ts} +0 -0
- /package/{date/index.d.ts → types/lucca-front-ng-date.d.ts} +0 -0
- /package/{dialog/testing/index.d.ts → types/lucca-front-ng-dialog-testing.d.ts} +0 -0
- /package/{divider/index.d.ts → types/lucca-front-ng-divider.d.ts} +0 -0
- /package/{empty-state/index.d.ts → types/lucca-front-ng-empty-state.d.ts} +0 -0
- /package/{fancy-box/index.d.ts → types/lucca-front-ng-fancy-box.d.ts} +0 -0
- /package/{file-upload/index.d.ts → types/lucca-front-ng-file-upload.d.ts} +0 -0
- /package/{filter-pills/index.d.ts → types/lucca-front-ng-filter-pills.d.ts} +0 -0
- /package/{footer/index.d.ts → types/lucca-front-ng-footer.d.ts} +0 -0
- /package/{formly/index.d.ts → types/lucca-front-ng-formly.d.ts} +0 -0
- /package/{forms/rich-text-input/formatters/html/index.d.ts → types/lucca-front-ng-forms-rich-text-input-formatters-html.d.ts} +0 -0
- /package/{forms/rich-text-input/formatters/markdown/index.d.ts → types/lucca-front-ng-forms-rich-text-input-formatters-markdown.d.ts} +0 -0
- /package/{forms/rich-text-input/formatters/plain-text/index.d.ts → types/lucca-front-ng-forms-rich-text-input-formatters-plain-text.d.ts} +0 -0
- /package/{forms/rich-text-input/index.d.ts → types/lucca-front-ng-forms-rich-text-input.d.ts} +0 -0
- /package/{gauge/index.d.ts → types/lucca-front-ng-gauge.d.ts} +0 -0
- /package/{grid/index.d.ts → types/lucca-front-ng-grid.d.ts} +0 -0
- /package/{highlight-data/index.d.ts → types/lucca-front-ng-highlight-data.d.ts} +0 -0
- /package/{horizontal-navigation/index.d.ts → types/lucca-front-ng-horizontal-navigation.d.ts} +0 -0
- /package/{icon/index.d.ts → types/lucca-front-ng-icon.d.ts} +0 -0
- /package/{inline-message/index.d.ts → types/lucca-front-ng-inline-message.d.ts} +0 -0
- /package/{input/index.d.ts → types/lucca-front-ng-input.d.ts} +0 -0
- /package/{link/index.d.ts → types/lucca-front-ng-link.d.ts} +0 -0
- /package/{listbox/index.d.ts → types/lucca-front-ng-listbox.d.ts} +0 -0
- /package/{listing/index.d.ts → types/lucca-front-ng-listing.d.ts} +0 -0
- /package/{loading/index.d.ts → types/lucca-front-ng-loading.d.ts} +0 -0
- /package/{main-layout/index.d.ts → types/lucca-front-ng-main-layout.d.ts} +0 -0
- /package/{mobile-push/index.d.ts → types/lucca-front-ng-mobile-push.d.ts} +0 -0
- /package/{new-badge/index.d.ts → types/lucca-front-ng-new-badge.d.ts} +0 -0
- /package/{number-format/index.d.ts → types/lucca-front-ng-number-format.d.ts} +0 -0
- /package/{number/index.d.ts → types/lucca-front-ng-number.d.ts} +0 -0
- /package/{numeric-badge/index.d.ts → types/lucca-front-ng-numeric-badge.d.ts} +0 -0
- /package/{page-header/index.d.ts → types/lucca-front-ng-page-header.d.ts} +0 -0
- /package/{pagination/index.d.ts → types/lucca-front-ng-pagination.d.ts} +0 -0
- /package/{picker/index.d.ts → types/lucca-front-ng-picker.d.ts} +0 -0
- /package/{plg-push/index.d.ts → types/lucca-front-ng-plg-push.d.ts} +0 -0
- /package/{popover/index.d.ts → types/lucca-front-ng-popover.d.ts} +0 -0
- /package/{read-more/index.d.ts → types/lucca-front-ng-read-more.d.ts} +0 -0
- /package/{safe-content/index.d.ts → types/lucca-front-ng-safe-content.d.ts} +0 -0
- /package/{scroll/index.d.ts → types/lucca-front-ng-scroll.d.ts} +0 -0
- /package/{scrollBox/index.d.ts → types/lucca-front-ng-scrollBox.d.ts} +0 -0
- /package/{segmentedControl/index.d.ts → types/lucca-front-ng-segmentedControl.d.ts} +0 -0
- /package/{segmentedControlTabs/index.d.ts → types/lucca-front-ng-segmentedControlTabs.d.ts} +0 -0
- /package/{sidepanel/index.d.ts → types/lucca-front-ng-sidepanel.d.ts} +0 -0
- /package/{simple-select/api/index.d.ts → types/lucca-front-ng-simple-select-api.d.ts} +0 -0
- /package/{skeleton/index.d.ts → types/lucca-front-ng-skeleton.d.ts} +0 -0
- /package/{statusBadge/index.d.ts → types/lucca-front-ng-statusBadge.d.ts} +0 -0
- /package/{tag/index.d.ts → types/lucca-front-ng-tag.d.ts} +0 -0
- /package/{title/index.d.ts → types/lucca-front-ng-title.d.ts} +0 -0
- /package/{tooltip/index.d.ts → types/lucca-front-ng-tooltip.d.ts} +0 -0
- /package/{tree-select/index.d.ts → types/lucca-front-ng-tree-select.d.ts} +0 -0
- /package/{index.d.ts → types/lucca-front-ng.d.ts} +0 -0
|
@@ -48,10 +48,10 @@ class CommentComponent {
|
|
|
48
48
|
get roleAttr() {
|
|
49
49
|
return this.role();
|
|
50
50
|
}
|
|
51
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
52
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
51
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: CommentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
52
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: CommentComponent, isStandalone: true, selector: "lu-comment", inputs: { date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, datePipeFormat: { classPropertyName: "datePipeFormat", publicName: "datePipeFormat", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.role": "this.roleAttr" }, classAttribute: "commentWrapper-item" }, ngImport: i0, template: "<div class=\"comment\" [class.mod-noAvatar]=\"noAvatar()\" [class.mod-S]=\"size() === 'S'\">\n\t<div class=\"comment-infos\">\n\t\t@if (!noAvatar()) {\n\t\t\t<div class=\"pr-u-displayContents\" aria-hidden=\"true\">\n\t\t\t\t<ng-container *ngTemplateOutlet=\"avatar()\" />\n\t\t\t</div>\n\t\t}\n\t\t<div class=\"comment-infos-content\">\n\t\t\t<span class=\"comment-infos-name\"><ng-container *luPortal=\"authorName()\" /></span>&ngsp;\n\t\t\t<time class=\"comment-infos-date\" [attr.datetime]=\"date().toISOString()\">\n\t\t\t\t@if (datePipeFormat()) {\n\t\t\t\t\t{{ date() | date: datePipeFormat() }}\n\t\t\t\t} @else if (dateDisplay()) {\n\t\t\t\t\t<ng-container *luPortal=\"dateDisplay()\" />\n\t\t\t\t} @else {\n\t\t\t\t\t{{ date() | date }}\n\t\t\t\t}\n\t\t\t</time>\n\t\t</div>\n\t</div>\n\t<blockquote class=\"comment-content\">\n\t\t@if (contentIsHTML()) {\n\t\t\t<div class=\"comment-content-textContainerOptional\" [innerHTML]=\"content()\"></div>\n\t\t} @else {\n\t\t\t<p class=\"comment-content-text\" [innerHTML]=\"content()\"></p>\n\t\t}\n\t</blockquote>\n</div>\n\n<ng-template #contentTpl>\n\t<ng-content />\n</ng-template>\n", styles: ["@charset \"UTF-8\";@layer components{.comment{--components-comment-max-width: 66ch;--components-comment-text-font: var(--pr-t-font-body-M);--components-comment-margin: 0;--components-comment-content-margin: calc(1.5rem + var(--pr-t-spacings-100));--components-comment-info-separator: \"\\2022\";--components-comment-info-content-display: block;--components-comment-info-direction: row;--components-comment-align: start;--components-comment-border-radius: var(--pr-t-border-radius-small) var(--pr-t-border-radius-default) var(--pr-t-border-radius-default);--components-comment-text-fontSize: var(--pr-t-font-body-M-fontSize);--components-comment-text-lineHeight: var(--pr-t-font-body-M-lineHeight);container:comment/inline-size;display:flex;flex-direction:column;gap:var(--pr-t-spacings-50);max-inline-size:var(--components-comment-max-width);align-items:var(--components-comment-align);margin-inline-start:var(--components-comment-margin)}.comment .avatar{--components-avatar-size: 1.5rem;--components-avatar-fontSize: var(--pr-t-font-fontSize-150);--components-avatar-placeholder-size: .75rem;--components-avatar-border: 1px}.commentWrapper{display:flex;flex-direction:column;gap:var(--pr-t-spacings-100);margin:0;padding:0;list-style-type:none}.comment-infos{display:flex;font-style:normal;gap:var(--pr-t-spacings-100);justify-content:flex-start;align-items:flex-start;flex-direction:var(--components-comment-info-direction)}.comment-infos-content{flex-direction:column;display:var(--components-comment-info-content-display);font:var(--pr-t-font-body-S);margin-block:var(--pr-t-spacings-25)}.comment-infos-date{color:var(--pr-t-color-text-subtle)}.comment-infos-name{color:var(--pr-t-color-text)}.comment-infos-name+.comment-infos-date:before{color:var(--palettes-neutral-400);padding-inline:1ch;content:var(--components-comment-info-separator)/\"\"}.comment-content{background-color:var(--components-comment-background-color, var(--palettes-neutral-50));border-radius:var(--components-comment-border-radius);display:flex;flex-direction:column;gap:var(--pr-t-spacings-150);margin-block:0;margin-inline:var(--components-comment-content-margin) 0;max-inline-size:fit-content;padding-block:var(--pr-t-spacings-100);padding-inline:var(--pr-t-spacings-150)}.comment-content-text{margin-block-end:0;overflow-wrap:break-word;font:var(--components-comment-text-font)}.comment-content-textContainerOptional{display:flex;flex-direction:column;gap:var(--pr-t-spacings-100);font:var(--components-comment-text-font)}.comment-content-textContainerOptional>*{margin:0}}@layer mods{.comment.mod-S{--components-comment-text-font: var(--pr-t-font-body-S)}.comment.mod-noAvatar{--components-comment-content-margin: 0}@container comment not (min-width: 25rem){.comment-infos-content{--components-comment-info-content-display: flex}.comment-infos-name+.comment-infos-date:before{--components-comment-info-separator: none}}}@layer components{.commentWrapper{--components-comment-max-width: 66ch;--components-comment-text-font: var(--pr-t-font-body-M);--components-comment-margin: 0;--components-comment-content-margin: calc(1.5rem + var(--pr-t-spacings-100));--components-comment-info-separator: \"\\2022\";--components-comment-info-content-display: block;--components-comment-info-direction: row;--components-comment-align: start;--components-comment-border-radius: var(--pr-t-border-radius-small) var(--pr-t-border-radius-default) var(--pr-t-border-radius-default);--components-comment-text-fontSize: var(--pr-t-font-body-M-fontSize);--components-comment-text-lineHeight: var(--pr-t-font-body-M-lineHeight)}}@layer mods{.commentWrapper.mod-S .comment{--components-comment-text-font: var(--pr-t-font-body-S)}.commentWrapper.mod-compact .commentWrapper-item:not(:first-child) .comment-infos{border:0;clip:rect(1px,1px,1px,1px);margin:-1px;overflow:hidden;padding:0;position:absolute;block-size:1px;inline-size:1px;white-space:nowrap;contain:paint}.commentWrapper.mod-chatAnswer .comment{--components-comment-info-direction: row-reverse;--components-comment-background-color: var(--palettes-product-50);--components-comment-align: end;--components-comment-margin: auto;--components-comment-border-radius: var(--pr-t-border-radius-default) var(--pr-t-border-radius-small) var(--pr-t-border-radius-default) var(--pr-t-border-radius-default)}.commentWrapper.mod-chatAnswer .comment-content{margin-block:0;margin-inline:0 var(--components-comment-content-margin)}}@layer components{.commentWrapperChat{margin:0;padding:0;list-style-type:none;display:flex;flex-direction:column;gap:var(--pr-t-spacings-200)}.commentWrapperChat .comment{--components-comment-max-width: min(66ch, calc(100% - var(--components-comment-content-margin)))}}\n"], dependencies: [{ kind: "directive", type: PortalDirective, selector: "[luPortal]", inputs: ["luPortal", "luPortalContext"] }, { kind: "ngmodule", type: LuUserPictureModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
53
53
|
}
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: CommentComponent, decorators: [{
|
|
55
55
|
type: Component,
|
|
56
56
|
args: [{ selector: 'lu-comment', standalone: true, imports: [PortalDirective, DatePipe, LuUserPictureModule, NgTemplateOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
57
57
|
class: 'commentWrapper-item',
|
|
@@ -66,7 +66,7 @@ class CommentBlockComponent {
|
|
|
66
66
|
this.compact = false;
|
|
67
67
|
this.small = false;
|
|
68
68
|
this.chatAnswer = false;
|
|
69
|
-
this.comments = contentChildren(CommentComponent, ...(ngDevMode ?
|
|
69
|
+
this.comments = contentChildren(CommentComponent, { ...(ngDevMode ? { debugName: "comments" } : {}), read: CommentComponent, descendants: true });
|
|
70
70
|
this.authorName = input(...(ngDevMode ? [undefined, { debugName: "authorName" }] : []));
|
|
71
71
|
this.avatar = input(...(ngDevMode ? [undefined, { debugName: "avatar" }] : []));
|
|
72
72
|
this.size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
@@ -80,15 +80,15 @@ class CommentBlockComponent {
|
|
|
80
80
|
this.role = this.#chatBlock ? 'listitem' : null;
|
|
81
81
|
}
|
|
82
82
|
#chatBlock;
|
|
83
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
84
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
83
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: CommentBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
84
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: CommentBlockComponent, isStandalone: true, selector: "lu-comment-block", inputs: { compact: { classPropertyName: "compact", publicName: "compact", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, small: { classPropertyName: "small", publicName: "small", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, chatAnswer: { classPropertyName: "chatAnswer", publicName: "chatAnswer", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, authorName: { classPropertyName: "authorName", publicName: "authorName", isSignal: true, isRequired: false, transformFunction: null }, avatar: { classPropertyName: "avatar", publicName: "avatar", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.role": "this.role" } }, providers: [
|
|
85
85
|
{
|
|
86
86
|
provide: COMMENT_BLOCK_INSTANCE,
|
|
87
87
|
useExisting: forwardRef(() => CommentBlockComponent),
|
|
88
88
|
},
|
|
89
89
|
], queries: [{ propertyName: "comments", predicate: CommentComponent, descendants: true, read: CommentComponent, isSignal: true }], ngImport: i0, template: "<ng-template #content><ng-content /></ng-template>\n\n@if (isSingleComment()) {\n\t<div class=\"commentWrapper\" [class.mod-S]=\"small\" [class.mod-compact]=\"compact\" [class.mod-chatAnswer]=\"chatAnswer\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</div>\n} @else {\n\t<ol class=\"commentWrapper\" [class.mod-S]=\"small\" [class.mod-compact]=\"compact\" [class.mod-chatAnswer]=\"chatAnswer\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ol>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
90
90
|
}
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: CommentBlockComponent, decorators: [{
|
|
92
92
|
type: Component,
|
|
93
93
|
args: [{ selector: 'lu-comment-block', standalone: true, imports: [NgTemplateOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
94
94
|
{
|
|
@@ -117,15 +117,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
117
117
|
}] } });
|
|
118
118
|
|
|
119
119
|
class CommentChatComponent {
|
|
120
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
121
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
120
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: CommentChatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
121
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.5", type: CommentChatComponent, isStandalone: true, selector: "lu-comment-chat", providers: [
|
|
122
122
|
{
|
|
123
123
|
provide: COMMENT_CHAT_INSTANCE,
|
|
124
124
|
useExisting: forwardRef(() => CommentChatComponent),
|
|
125
125
|
},
|
|
126
126
|
], ngImport: i0, template: "<ol class=\"commentWrapperChat\">\n\t<ng-content />\n</ol>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
127
127
|
}
|
|
128
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: CommentChatComponent, decorators: [{
|
|
129
129
|
type: Component,
|
|
130
130
|
args: [{ selector: 'lu-comment-chat', standalone: true, imports: [], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
131
131
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-comment.mjs","sources":["../../../packages/ng/comment/token.ts","../../../packages/ng/comment/comment/comment.component.ts","../../../packages/ng/comment/comment/comment.component.html","../../../packages/ng/comment/comment-block/comment-block.component.ts","../../../packages/ng/comment/comment-block/comment-block.component.html","../../../packages/ng/comment/comment-chat/comment-chat.component.ts","../../../packages/ng/comment/comment-chat/comment-chat.component.html","../../../packages/ng/comment/lucca-front-ng-comment.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { CommentBlockComponent } from './comment-block/comment-block.component';\nimport { CommentChatComponent } from './comment-chat/comment-chat.component';\n\nexport const COMMENT_BLOCK_INSTANCE = new InjectionToken<CommentBlockComponent>('COMMENT_BLOCK_INSTANCE');\nexport const COMMENT_CHAT_INSTANCE = new InjectionToken<CommentChatComponent>('COMMENT_CHAT_INSTANCE');\n","import { DatePipe, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, HostBinding, inject, input, LOCALE_ID, ViewEncapsulation } from '@angular/core';\nimport { PortalDirective } from '@lucca-front/ng/core';\nimport { LuUserPictureModule } from '@lucca-front/ng/user';\nimport { COMMENT_BLOCK_INSTANCE } from '../token';\n\n@Component({\n\tselector: 'lu-comment',\n\tstandalone: true,\n\timports: [PortalDirective, DatePipe, LuUserPictureModule, NgTemplateOutlet],\n\ttemplateUrl: './comment.component.html',\n\tstyleUrl: './comment.component.scss',\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\tclass: 'commentWrapper-item',\n\t},\n})\nexport class CommentComponent {\n\t#locale = inject(LOCALE_ID);\n\t#intlDateTimeFormat = new Intl.DateTimeFormat(this.#locale, {\n\t\tweekday: 'long',\n\t\tyear: 'numeric',\n\t\tmonth: 'short',\n\t\tday: 'numeric',\n\t\thour: 'numeric',\n\t\tminute: 'numeric',\n\t});\n\n\t#parentBlock = inject(COMMENT_BLOCK_INSTANCE);\n\n\tnoAvatar = computed(() => this.#parentBlock.noAvatar());\n\n\tavatar = computed(() => this.#parentBlock.avatar());\n\n\tauthorName = computed(() => this.#parentBlock.authorName());\n\n\tsize = computed(() => this.#parentBlock.size());\n\n\tdate = input<Date>();\n\n\t/**\n\t * format given to the date pipe for display.\n\t *\n\t * See https://angular.dev/api/common/DatePipe#custom-format-options\n\t */\n\tdatePipeFormat = input<string | undefined>(undefined);\n\n\tcontent = input<string>();\n\n\tcontentIsHTML = computed(() => {\n\t\treturn /<\\/?[a-z][\\s\\S]*>/i.test(this.content());\n\t});\n\n\tdateDisplay = computed(() => {\n\t\tconst formatted = this.#intlDateTimeFormat.format(this.date());\n\t\treturn `${formatted[0].toUpperCase()}${formatted.slice(1)}`;\n\t});\n\n\trole = computed(() => {\n\t\treturn this.#parentBlock.isSingleComment() ? null : 'listitem';\n\t});\n\n\t@HostBinding('attr.role')\n\tget roleAttr(): string {\n\t\treturn this.role();\n\t}\n}\n","<div class=\"comment\" [class.mod-noAvatar]=\"noAvatar()\" [class.mod-S]=\"size() === 'S'\">\n\t<div class=\"comment-infos\">\n\t\t@if (!noAvatar()) {\n\t\t\t<div class=\"pr-u-displayContents\" aria-hidden=\"true\">\n\t\t\t\t<ng-container *ngTemplateOutlet=\"avatar()\" />\n\t\t\t</div>\n\t\t}\n\t\t<div class=\"comment-infos-content\">\n\t\t\t<span class=\"comment-infos-name\"><ng-container *luPortal=\"authorName()\" /></span>&ngsp;\n\t\t\t<time class=\"comment-infos-date\" [attr.datetime]=\"date().toISOString()\">\n\t\t\t\t@if (datePipeFormat()) {\n\t\t\t\t\t{{ date() | date: datePipeFormat() }}\n\t\t\t\t} @else if (dateDisplay()) {\n\t\t\t\t\t<ng-container *luPortal=\"dateDisplay()\" />\n\t\t\t\t} @else {\n\t\t\t\t\t{{ date() | date }}\n\t\t\t\t}\n\t\t\t</time>\n\t\t</div>\n\t</div>\n\t<blockquote class=\"comment-content\">\n\t\t@if (contentIsHTML()) {\n\t\t\t<div class=\"comment-content-textContainerOptional\" [innerHTML]=\"content()\"></div>\n\t\t} @else {\n\t\t\t<p class=\"comment-content-text\" [innerHTML]=\"content()\"></p>\n\t\t}\n\t</blockquote>\n</div>\n\n<ng-template #contentTpl>\n\t<ng-content />\n</ng-template>\n","import { NgTemplateOutlet } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, contentChildren, forwardRef, HostBinding, inject, Input, input, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { PortalContent } from '@lucca-front/ng/core';\nimport { CommentComponent } from '../comment/comment.component';\nimport { COMMENT_BLOCK_INSTANCE, COMMENT_CHAT_INSTANCE } from '../token';\n\n@Component({\n\tselector: 'lu-comment-block',\n\tstandalone: true,\n\timports: [NgTemplateOutlet],\n\ttemplateUrl: './comment-block.component.html',\n\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\n\tproviders: [\n\t\t{\n\t\t\tprovide: COMMENT_BLOCK_INSTANCE,\n\t\t\tuseExisting: forwardRef(() => CommentBlockComponent),\n\t\t},\n\t],\n})\nexport class CommentBlockComponent {\n\t@Input({\n\t\ttransform: booleanAttribute,\n\t})\n\tcompact = false;\n\n\t@Input({\n\t\ttransform: booleanAttribute,\n\t})\n\tsmall = false;\n\n\t@Input({\n\t\ttransform: booleanAttribute,\n\t})\n\tchatAnswer = false;\n\n\tcomments = contentChildren(CommentComponent, { read: CommentComponent, descendants: true });\n\n\tauthorName = input<PortalContent>();\n\n\tavatar = input<TemplateRef<unknown>>();\n\n\tsize = input<'S' | 'M'>();\n\n\tnoAvatar = computed(() => {\n\t\treturn !this.avatar();\n\t});\n\n\tisSingleComment = computed(() => {\n\t\treturn this.comments().length === 1;\n\t});\n\n\t#chatBlock = inject(COMMENT_CHAT_INSTANCE, { optional: true });\n\n\t@HostBinding('attr.role')\n\tpublic role = this.#chatBlock ? 'listitem' : null;\n}\n","<ng-template #content><ng-content /></ng-template>\n\n@if (isSingleComment()) {\n\t<div class=\"commentWrapper\" [class.mod-S]=\"small\" [class.mod-compact]=\"compact\" [class.mod-chatAnswer]=\"chatAnswer\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</div>\n} @else {\n\t<ol class=\"commentWrapper\" [class.mod-S]=\"small\" [class.mod-compact]=\"compact\" [class.mod-chatAnswer]=\"chatAnswer\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ol>\n}\n","import { ChangeDetectionStrategy, Component, forwardRef, ViewEncapsulation } from '@angular/core';\nimport { COMMENT_CHAT_INSTANCE } from '../token';\n\n@Component({\n\tselector: 'lu-comment-chat',\n\tstandalone: true,\n\timports: [],\n\ttemplateUrl: './comment-chat.component.html',\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\n\tproviders: [\n\t\t{\n\t\t\tprovide: COMMENT_CHAT_INSTANCE,\n\t\t\tuseExisting: forwardRef(() => CommentChatComponent),\n\t\t},\n\t],\n})\nexport class CommentChatComponent {}\n","<ol class=\"commentWrapperChat\">\n\t<ng-content />\n</ol>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIO,MAAM,sBAAsB,GAAG,IAAI,cAAc,CAAwB,wBAAwB,CAAC;AAClG,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAuB,uBAAuB,CAAC;;MCazF,gBAAgB,CAAA;AAZ7B,IAAA,WAAA,GAAA;AAaC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC;QAC3B,IAAA,CAAA,mBAAmB,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE;AAC3D,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,GAAG,EAAE,SAAS;AACd,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,MAAM,EAAE,SAAS;AACjB,SAAA,CAAC;AAEF,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAE7C,QAAA,IAAA,CAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,oDAAC;AAEvD,QAAA,IAAA,CAAA,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,kDAAC;AAEnD,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,sDAAC;AAE3D,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,gDAAC;QAE/C,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,C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,SAAA,EAPrB;AACV,YAAA;AACC,gBAAA,OAAO,EAAE,qBAAqB;AAC9B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,oBAAoB,CAAC;AACnD,aAAA;AACD,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChBF,8DAGA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FDea,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAfhC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP,EAAE,EAAA,aAAA,EAEI,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EAEpC;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,qBAAqB;AAC9B,4BAAA,WAAW,EAAE,UAAU,CAAC,0BAA0B,CAAC;AACnD,yBAAA;AACD,qBAAA,EAAA,QAAA,EAAA,8DAAA,EAAA;;;AEhBF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-comment.mjs","sources":["../../../packages/ng/comment/token.ts","../../../packages/ng/comment/comment/comment.component.ts","../../../packages/ng/comment/comment/comment.component.html","../../../packages/ng/comment/comment-block/comment-block.component.ts","../../../packages/ng/comment/comment-block/comment-block.component.html","../../../packages/ng/comment/comment-chat/comment-chat.component.ts","../../../packages/ng/comment/comment-chat/comment-chat.component.html","../../../packages/ng/comment/lucca-front-ng-comment.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { CommentBlockComponent } from './comment-block/comment-block.component';\nimport { CommentChatComponent } from './comment-chat/comment-chat.component';\n\nexport const COMMENT_BLOCK_INSTANCE = new InjectionToken<CommentBlockComponent>('COMMENT_BLOCK_INSTANCE');\nexport const COMMENT_CHAT_INSTANCE = new InjectionToken<CommentChatComponent>('COMMENT_CHAT_INSTANCE');\n","import { DatePipe, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, HostBinding, inject, input, LOCALE_ID, ViewEncapsulation } from '@angular/core';\nimport { PortalDirective } from '@lucca-front/ng/core';\nimport { LuUserPictureModule } from '@lucca-front/ng/user';\nimport { COMMENT_BLOCK_INSTANCE } from '../token';\n\n@Component({\n\tselector: 'lu-comment',\n\tstandalone: true,\n\timports: [PortalDirective, DatePipe, LuUserPictureModule, NgTemplateOutlet],\n\ttemplateUrl: './comment.component.html',\n\tstyleUrl: './comment.component.scss',\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\tclass: 'commentWrapper-item',\n\t},\n})\nexport class CommentComponent {\n\t#locale = inject(LOCALE_ID);\n\t#intlDateTimeFormat = new Intl.DateTimeFormat(this.#locale, {\n\t\tweekday: 'long',\n\t\tyear: 'numeric',\n\t\tmonth: 'short',\n\t\tday: 'numeric',\n\t\thour: 'numeric',\n\t\tminute: 'numeric',\n\t});\n\n\t#parentBlock = inject(COMMENT_BLOCK_INSTANCE);\n\n\tnoAvatar = computed(() => this.#parentBlock.noAvatar());\n\n\tavatar = computed(() => this.#parentBlock.avatar());\n\n\tauthorName = computed(() => this.#parentBlock.authorName());\n\n\tsize = computed(() => this.#parentBlock.size());\n\n\tdate = input<Date>();\n\n\t/**\n\t * format given to the date pipe for display.\n\t *\n\t * See https://angular.dev/api/common/DatePipe#custom-format-options\n\t */\n\tdatePipeFormat = input<string | undefined>(undefined);\n\n\tcontent = input<string>();\n\n\tcontentIsHTML = computed(() => {\n\t\treturn /<\\/?[a-z][\\s\\S]*>/i.test(this.content());\n\t});\n\n\tdateDisplay = computed(() => {\n\t\tconst formatted = this.#intlDateTimeFormat.format(this.date());\n\t\treturn `${formatted[0].toUpperCase()}${formatted.slice(1)}`;\n\t});\n\n\trole = computed(() => {\n\t\treturn this.#parentBlock.isSingleComment() ? null : 'listitem';\n\t});\n\n\t@HostBinding('attr.role')\n\tget roleAttr(): string {\n\t\treturn this.role();\n\t}\n}\n","<div class=\"comment\" [class.mod-noAvatar]=\"noAvatar()\" [class.mod-S]=\"size() === 'S'\">\n\t<div class=\"comment-infos\">\n\t\t@if (!noAvatar()) {\n\t\t\t<div class=\"pr-u-displayContents\" aria-hidden=\"true\">\n\t\t\t\t<ng-container *ngTemplateOutlet=\"avatar()\" />\n\t\t\t</div>\n\t\t}\n\t\t<div class=\"comment-infos-content\">\n\t\t\t<span class=\"comment-infos-name\"><ng-container *luPortal=\"authorName()\" /></span>&ngsp;\n\t\t\t<time class=\"comment-infos-date\" [attr.datetime]=\"date().toISOString()\">\n\t\t\t\t@if (datePipeFormat()) {\n\t\t\t\t\t{{ date() | date: datePipeFormat() }}\n\t\t\t\t} @else if (dateDisplay()) {\n\t\t\t\t\t<ng-container *luPortal=\"dateDisplay()\" />\n\t\t\t\t} @else {\n\t\t\t\t\t{{ date() | date }}\n\t\t\t\t}\n\t\t\t</time>\n\t\t</div>\n\t</div>\n\t<blockquote class=\"comment-content\">\n\t\t@if (contentIsHTML()) {\n\t\t\t<div class=\"comment-content-textContainerOptional\" [innerHTML]=\"content()\"></div>\n\t\t} @else {\n\t\t\t<p class=\"comment-content-text\" [innerHTML]=\"content()\"></p>\n\t\t}\n\t</blockquote>\n</div>\n\n<ng-template #contentTpl>\n\t<ng-content />\n</ng-template>\n","import { NgTemplateOutlet } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, contentChildren, forwardRef, HostBinding, inject, Input, input, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { PortalContent } from '@lucca-front/ng/core';\nimport { CommentComponent } from '../comment/comment.component';\nimport { COMMENT_BLOCK_INSTANCE, COMMENT_CHAT_INSTANCE } from '../token';\n\n@Component({\n\tselector: 'lu-comment-block',\n\tstandalone: true,\n\timports: [NgTemplateOutlet],\n\ttemplateUrl: './comment-block.component.html',\n\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\n\tproviders: [\n\t\t{\n\t\t\tprovide: COMMENT_BLOCK_INSTANCE,\n\t\t\tuseExisting: forwardRef(() => CommentBlockComponent),\n\t\t},\n\t],\n})\nexport class CommentBlockComponent {\n\t@Input({\n\t\ttransform: booleanAttribute,\n\t})\n\tcompact = false;\n\n\t@Input({\n\t\ttransform: booleanAttribute,\n\t})\n\tsmall = false;\n\n\t@Input({\n\t\ttransform: booleanAttribute,\n\t})\n\tchatAnswer = false;\n\n\tcomments = contentChildren(CommentComponent, { read: CommentComponent, descendants: true });\n\n\tauthorName = input<PortalContent>();\n\n\tavatar = input<TemplateRef<unknown>>();\n\n\tsize = input<'S' | 'M'>();\n\n\tnoAvatar = computed(() => {\n\t\treturn !this.avatar();\n\t});\n\n\tisSingleComment = computed(() => {\n\t\treturn this.comments().length === 1;\n\t});\n\n\t#chatBlock = inject(COMMENT_CHAT_INSTANCE, { optional: true });\n\n\t@HostBinding('attr.role')\n\tpublic role = this.#chatBlock ? 'listitem' : null;\n}\n","<ng-template #content><ng-content /></ng-template>\n\n@if (isSingleComment()) {\n\t<div class=\"commentWrapper\" [class.mod-S]=\"small\" [class.mod-compact]=\"compact\" [class.mod-chatAnswer]=\"chatAnswer\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</div>\n} @else {\n\t<ol class=\"commentWrapper\" [class.mod-S]=\"small\" [class.mod-compact]=\"compact\" [class.mod-chatAnswer]=\"chatAnswer\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ol>\n}\n","import { ChangeDetectionStrategy, Component, forwardRef, ViewEncapsulation } from '@angular/core';\nimport { COMMENT_CHAT_INSTANCE } from '../token';\n\n@Component({\n\tselector: 'lu-comment-chat',\n\tstandalone: true,\n\timports: [],\n\ttemplateUrl: './comment-chat.component.html',\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\n\tproviders: [\n\t\t{\n\t\t\tprovide: COMMENT_CHAT_INSTANCE,\n\t\t\tuseExisting: forwardRef(() => CommentChatComponent),\n\t\t},\n\t],\n})\nexport class CommentChatComponent {}\n","<ol class=\"commentWrapperChat\">\n\t<ng-content />\n</ol>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIO,MAAM,sBAAsB,GAAG,IAAI,cAAc,CAAwB,wBAAwB,CAAC;AAClG,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAuB,uBAAuB,CAAC;;MCazF,gBAAgB,CAAA;AAZ7B,IAAA,WAAA,GAAA;AAaC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC;QAC3B,IAAA,CAAA,mBAAmB,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE;AAC3D,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,GAAG,EAAE,SAAS;AACd,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,MAAM,EAAE,SAAS;AACjB,SAAA,CAAC;AAEF,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAE7C,QAAA,IAAA,CAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,oDAAC;AAEvD,QAAA,IAAA,CAAA,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,kDAAC;AAEnD,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,sDAAC;AAE3D,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,gDAAC;QAE/C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,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,SAAA,EAPrB;AACV,YAAA;AACC,gBAAA,OAAO,EAAE,qBAAqB;AAC9B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,oBAAoB,CAAC;AACnD,aAAA;AACD,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChBF,8DAGA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FDea,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAfhC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP,EAAE,EAAA,aAAA,EAEI,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EAEpC;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,qBAAqB;AAC9B,4BAAA,WAAW,EAAE,UAAU,CAAC,0BAA0B,CAAC;AACnD,yBAAA;AACD,qBAAA,EAAA,QAAA,EAAA,8DAAA,EAAA;;;AEhBF;;AAEG;;;;"}
|
|
@@ -3,8 +3,8 @@ import { input, booleanAttribute, ViewEncapsulation, Component } from '@angular/
|
|
|
3
3
|
|
|
4
4
|
class ContainerComponent {
|
|
5
5
|
constructor() {
|
|
6
|
-
this.center = input(false, ...(ngDevMode ?
|
|
7
|
-
this.overflow = input(false, ...(ngDevMode ?
|
|
6
|
+
this.center = input(false, { ...(ngDevMode ? { debugName: "center" } : {}), transform: booleanAttribute });
|
|
7
|
+
this.overflow = input(false, { ...(ngDevMode ? { debugName: "overflow" } : {}), transform: booleanAttribute });
|
|
8
8
|
this.max = input(null, ...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
9
9
|
}
|
|
10
10
|
get classesConfig() {
|
|
@@ -14,10 +14,10 @@ class ContainerComponent {
|
|
|
14
14
|
[`mod-max${this.max()}`]: !!this.max(),
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
18
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: ContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.5", type: ContainerComponent, isStandalone: true, selector: "lu-container", inputs: { center: { classPropertyName: "center", publicName: "center", isSignal: true, isRequired: false, transformFunction: null }, overflow: { classPropertyName: "overflow", publicName: "overflow", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classesConfig" }, classAttribute: "container" }, ngImport: i0, template: '<ng-content />', isInline: true, styles: ["@layer components{.container{--components-container-minInlineSize: 0;--components-container-max-width: var(--commons-container-maxWidth);--components-container-padding: var(--commons-container-padding);padding:var(--commons-container-padding);min-inline-size:var(--components-container-minInlineSize);max-inline-size:var(--commons-container-maxWidth);margin-inline:var(--commons-container-marginInline);position:relative;display:block}}@layer mods{.container.mod-center{--commons-container-marginInline: auto}.container.mod-S{--commons-container-padding: var(--pr-t-spacings-200)}.container.mod-maxM{--commons-container-maxWidth: var(--commons-container-maxWidthM)}.container.mod-maxL{--commons-container-maxWidth: var(--commons-container-maxWidthL)}.container.mod-maxXL{--commons-container-maxWidth: var(--commons-container-maxWidthXL)}.container.mod-maxXXL{--commons-container-maxWidth: var(--commons-container-maxWidthXXL)}.container.mod-maxXXXL{--commons-container-maxWidth: var(--commons-container-maxWidthXXXL)}.container.mod-overflow{--components-container-minInlineSize: fit-content}}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
19
19
|
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: ContainerComponent, decorators: [{
|
|
21
21
|
type: Component,
|
|
22
22
|
args: [{ selector: 'lu-container', standalone: true, template: '<ng-content />', encapsulation: ViewEncapsulation.None, host: {
|
|
23
23
|
class: 'container',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-container.mjs","sources":["../../../packages/ng/container/container.component.ts","../../../packages/ng/container/lucca-front-ng-container.ts"],"sourcesContent":["import { booleanAttribute, Component, input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n\tselector: 'lu-container',\n\tstandalone: true,\n\tstyleUrl: './container.component.scss',\n\ttemplate: '<ng-content />',\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'container',\n\t\t'[class]': 'classesConfig',\n\t},\n})\nexport class ContainerComponent {\n\tcenter = input(false, { transform: booleanAttribute });\n\toverflow = input(false, { transform: booleanAttribute });\n\tmax = input<null | 'M' | 'L' | 'XL' | 'XXL' | 'XXXL'>(null);\n\n\tget classesConfig() {\n\t\treturn {\n\t\t\t['mod-center']: this.center(),\n\t\t\t['mod-overflow']: this.overflow(),\n\t\t\t[`mod-max${this.max()}`]: !!this.max(),\n\t\t};\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAaa,kBAAkB,CAAA;AAX/B,IAAA,WAAA,GAAA;
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-container.mjs","sources":["../../../packages/ng/container/container.component.ts","../../../packages/ng/container/lucca-front-ng-container.ts"],"sourcesContent":["import { booleanAttribute, Component, input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n\tselector: 'lu-container',\n\tstandalone: true,\n\tstyleUrl: './container.component.scss',\n\ttemplate: '<ng-content />',\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'container',\n\t\t'[class]': 'classesConfig',\n\t},\n})\nexport class ContainerComponent {\n\tcenter = input(false, { transform: booleanAttribute });\n\toverflow = input(false, { transform: booleanAttribute });\n\tmax = input<null | 'M' | 'L' | 'XL' | 'XXL' | 'XXXL'>(null);\n\n\tget classesConfig() {\n\t\treturn {\n\t\t\t['mod-center']: this.center(),\n\t\t\t['mod-overflow']: this.overflow(),\n\t\t\t[`mod-max${this.max()}`]: !!this.max(),\n\t\t};\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAaa,kBAAkB,CAAA;AAX/B,IAAA,WAAA,GAAA;QAYC,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,KAAK,mDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;QACtD,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,qDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACxD,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAA2C,IAAI,+CAAC;AAS3D,IAAA;AAPA,IAAA,IAAI,aAAa,GAAA;QAChB,OAAO;AACN,YAAA,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,EAAE;AAC7B,YAAA,CAAC,cAAc,GAAG,IAAI,CAAC,QAAQ,EAAE;AACjC,YAAA,CAAC,CAAA,OAAA,EAAU,IAAI,CAAC,GAAG,EAAE,CAAA,CAAE,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;SACtC;IACF;8GAXY,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,mhBAPpB,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,wkCAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAOd,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAX9B,SAAS;+BACC,cAAc,EAAA,UAAA,EACZ,IAAI,EAAA,QAAA,EAEN,gBAAgB,iBACX,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACL,wBAAA,KAAK,EAAE,WAAW;AAClB,wBAAA,SAAS,EAAE,eAAe;AAC1B,qBAAA,EAAA,MAAA,EAAA,CAAA,wkCAAA,CAAA,EAAA;;;ACXF;;AAEG;;;;"}
|
|
@@ -65,10 +65,10 @@ class ALuCoreSelectApiDirective {
|
|
|
65
65
|
this.destroy$.next();
|
|
66
66
|
this.destroy$.complete();
|
|
67
67
|
}
|
|
68
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
69
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
68
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: ALuCoreSelectApiDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
69
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.5", type: ALuCoreSelectApiDirective, isStandalone: true, ngImport: i0 }); }
|
|
70
70
|
}
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: ALuCoreSelectApiDirective, decorators: [{
|
|
72
72
|
type: Directive
|
|
73
73
|
}] });
|
|
74
74
|
|
|
@@ -114,15 +114,15 @@ class LuCoreSelectApiV3Directive extends ALuCoreSelectApiDirective {
|
|
|
114
114
|
},
|
|
115
115
|
})), map((res) => res.data.items));
|
|
116
116
|
}
|
|
117
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
118
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
117
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: LuCoreSelectApiV3Directive, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
118
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.5", type: LuCoreSelectApiV3Directive, isStandalone: true, selector: "lu-simple-select[apiV3],lu-multi-select[apiV3]", inputs: { apiV3: "apiV3", fields: "fields", orderBy: "orderBy", filters: "filters" }, providers: [
|
|
119
119
|
{
|
|
120
120
|
provide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,
|
|
121
121
|
useExisting: forwardRef(() => LuCoreSelectApiV3Directive),
|
|
122
122
|
},
|
|
123
123
|
], usesInheritance: true, ngImport: i0 }); }
|
|
124
124
|
}
|
|
125
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: LuCoreSelectApiV3Directive, decorators: [{
|
|
126
126
|
type: Directive,
|
|
127
127
|
args: [{
|
|
128
128
|
// The attribute is already prefixed with "lu-simple-select"
|
|
@@ -184,15 +184,15 @@ class LuCoreSelectApiV4Directive extends ALuCoreSelectApiDirective {
|
|
|
184
184
|
})
|
|
185
185
|
.pipe(map((res) => (Array.isArray(res) ? res : res?.items) ?? []));
|
|
186
186
|
}
|
|
187
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
188
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
187
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: LuCoreSelectApiV4Directive, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
188
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.5", type: LuCoreSelectApiV4Directive, isStandalone: true, selector: "lu-simple-select[apiV4],lu-multi-select[apiV4]", inputs: { apiV4: { classPropertyName: "apiV4", publicName: "apiV4", isSignal: true, isRequired: true, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", 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 } }, outputs: { apiV4: "apiV4Change" }, providers: [
|
|
189
189
|
{
|
|
190
190
|
provide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,
|
|
191
191
|
useExisting: forwardRef(() => LuCoreSelectApiV4Directive),
|
|
192
192
|
},
|
|
193
193
|
], usesInheritance: true, ngImport: i0 }); }
|
|
194
194
|
}
|
|
195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: LuCoreSelectApiV4Directive, decorators: [{
|
|
196
196
|
type: Directive,
|
|
197
197
|
args: [{
|
|
198
198
|
// The attribute is already prefixed with "lu-simple-select"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-core-select-api.mjs","sources":["../../../packages/ng/core-select/api/api.directive.ts","../../../packages/ng/core-select/api/api-v3.directive.ts","../../../packages/ng/core-select/api/api-v4.directive.ts","../../../packages/ng/core-select/api/lucca-front-ng-core-select-api.ts"],"sourcesContent":["import { Directive, inject, OnDestroy, OnInit } from '@angular/core';\nimport { ALuSelectInputComponent, coreSelectDefaultOptionComparer, coreSelectDefaultOptionKey, LuOptionComparer } from '@lucca-front/ng/core-select';\nimport { catchError, combineLatest, concatMap, debounceTime, distinctUntilChanged, map, merge, Observable, of, pairwise, scan, startWith, Subject, switchMap, takeUntil, tap } from 'rxjs';\n\nexport const LU_SELECT_MAGIC_PAGE_SIZE = 20;\nexport const MAGIC_DEBOUNCE_DURATION = 250;\n\n@Directive()\nexport abstract class ALuCoreSelectApiDirective<TOption, TParams = Record<string, string | number | boolean>> implements OnDestroy, OnInit {\n\tprotected destroy$ = new Subject<void>();\n\tprotected pageSize = LU_SELECT_MAGIC_PAGE_SIZE;\n\tprotected debounceDuration = MAGIC_DEBOUNCE_DURATION;\n\n\tpublic select = inject<ALuSelectInputComponent<TOption, unknown>>(ALuSelectInputComponent);\n\n\tprotected page$ = this.select.nextPage.pipe(\n\t\tscan((page) => page + 1, 0),\n\t\tstartWith(0),\n\t);\n\n\tprotected clue$ = this.select.clueChange.pipe(debounceTime(this.debounceDuration), startWith(''));\n\n\t/**\n\t * Create an object that will be used as params for the api call\n\t */\n\tprotected abstract params$: Observable<TParams>;\n\n\t/**\n\t * Compare two options to know if they are the same. For example, compare by id or by JSON\n\t */\n\tprotected optionComparer: LuOptionComparer<TOption> = (a, b) => this.optionKey(a) === this.optionKey(b);\n\n\t/**\n\t * Return a unique key to identify the option in for-of loops\n\t */\n\tprotected abstract optionKey: (option: TOption) => unknown;\n\n\t/**\n\t * Return the options for the given params and page\n\t */\n\tprotected abstract getOptions(params: TParams, page: number): Observable<TOption[]>;\n\n\tpublic ngOnInit(): void {\n\t\tif (this.select.optionComparer === coreSelectDefaultOptionComparer) {\n\t\t\tthis.select.optionComparer = this.optionComparer;\n\t\t}\n\n\t\tif (this.select.optionKey === coreSelectDefaultOptionKey) {\n\t\t\tthis.select.optionKey = this.optionKey;\n\t\t}\n\n\t\tthis.buildOptions()\n\t\t\t.pipe(takeUntil(this.destroy$))\n\t\t\t.subscribe((options) => (this.select.options = options));\n\t}\n\n\tprotected buildOptions(): Observable<TOption[]> {\n\t\t// Prevent a double call to getOptions when the clue is changed while the panel is closed\n\t\tconst clueIsPendingDebounce$ = merge(this.select.clueChange.pipe(map(() => true)), this.clue$.pipe(map(() => false))).pipe(distinctUntilChanged());\n\t\tconst isOpen$ = combineLatest([this.select.isPanelOpen$, clueIsPendingDebounce$]).pipe(\n\t\t\tdebounceTime(0),\n\t\t\tstartWith([false, false]),\n\t\t\tpairwise(),\n\t\t\ttap(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => {\n\t\t\t\t// Start the loader as soon as the panel is opened to avoid a short display of the \"no result\" message\n\t\t\t\tif (!wasOpen && isOpen && clueIsPendingDebounce) {\n\t\t\t\t\tthis.select.loading = true;\n\t\t\t\t}\n\t\t\t}),\n\t\t\tmap(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => (isOpen && !wasOpen ? !clueIsPendingDebounce : isOpen)),\n\t\t\tdistinctUntilChanged(),\n\t\t);\n\n\t\treturn combineLatest([this.params$, isOpen$]).pipe(\n\t\t\tswitchMap(([params, isOpened]) => {\n\t\t\t\tconst hasNextPage$ = new Subject<void>();\n\n\t\t\t\treturn isOpened\n\t\t\t\t\t? this.page$.pipe(\n\t\t\t\t\t\t\ttakeUntil(hasNextPage$),\n\t\t\t\t\t\t\tconcatMap((page) => this.getOptionsPage(params, page).pipe(map(({ items, isLastPage }) => ({ items, isLastPage, page })))),\n\t\t\t\t\t\t\ttap(({ isLastPage }) => {\n\t\t\t\t\t\t\t\tif (isLastPage) {\n\t\t\t\t\t\t\t\t\t// `getOptionsPage` can emit multiple times (for example, when adding homonyms additional information),\n\t\t\t\t\t\t\t\t\t// so we cannot use takeWhile here.\n\t\t\t\t\t\t\t\t\thasNextPage$.next();\n\t\t\t\t\t\t\t\t\thasNextPage$.complete();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tscan(\n\t\t\t\t\t\t\t\t(acc, { items, page }) => {\n\t\t\t\t\t\t\t\t\tacc[page] = items;\n\t\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{} as Record<number, TOption[]>,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tmap((pages) => Object.values(pages).flat()),\n\t\t\t\t\t\t)\n\t\t\t\t\t: of([] as TOption[]);\n\t\t\t}),\n\t\t);\n\t}\n\n\tprotected getOptionsPage(params: TParams, page: number): Observable<{ items: TOption[]; isLastPage: boolean }> {\n\t\tthis.select.loading = true;\n\n\t\treturn this.getOptions(params, page).pipe(\n\t\t\tcatchError(() => of([] as TOption[])),\n\t\t\ttap(() => (this.select.loading = false)),\n\t\t\tmap((items) => ({ items, isLastPage: items.length < this.pageSize })),\n\t\t);\n\t}\n\n\tpublic ngOnDestroy(): void {\n\t\tthis.destroy$.next();\n\t\tthis.destroy$.complete();\n\t}\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Directive, forwardRef, inject, Input } from '@angular/core';\nimport { ILuApiCollectionResponse, ILuApiItem } from '@lucca-front/ng/api';\nimport { CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider } from '@lucca-front/ng/core-select';\nimport { BehaviorSubject, combineLatest, debounceTime, map, Observable, ReplaySubject, switchMap, take } from 'rxjs';\nimport { ALuCoreSelectApiDirective } from './api.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[apiV3],lu-multi-select[apiV3]',\n\tstandalone: true,\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectApiV3Directive),\n\t\t},\n\t],\n})\nexport class LuCoreSelectApiV3Directive<T extends ILuApiItem> extends ALuCoreSelectApiDirective<T> implements CoreSelectApiTotalCountProvider {\n\t@Input()\n\tpublic set apiV3(value: string) {\n\t\tthis.url$.next(value);\n\t}\n\n\t@Input()\n\tpublic set fields(value: string) {\n\t\tthis.fields$.next(value);\n\t}\n\n\t@Input()\n\tpublic set orderBy(value: string | null) {\n\t\tthis.orderBy$.next(value);\n\t}\n\n\t@Input()\n\tpublic set filters(value: Record<string, string | number | boolean>) {\n\t\tthis.filters$.next(value);\n\t}\n\n\tprotected url$ = new ReplaySubject<string>(1);\n\tprotected fields$ = new BehaviorSubject<string>('id,name');\n\tprotected orderBy$ = new BehaviorSubject<string | null>('name,asc');\n\tprotected filters$ = new BehaviorSubject<Record<string, string | number | boolean>>({});\n\n\tprotected httpClient = inject(HttpClient);\n\n\tprotected override params$ = combineLatest([this.fields$, this.filters$, this.orderBy$, this.clue$]).pipe(\n\t\tmap(([fields, filters, orderBy, clue]) => ({\n\t\t\t...filters,\n\t\t\t...(fields ? { fields } : {}),\n\t\t\t...(orderBy ? { orderBy } : {}),\n\t\t\t...(clue ? { name: `like,${clue}` } : {}),\n\t\t})),\n\t);\n\n\tpublic totalCount$ = combineLatest([this.url$, this.filters$]).pipe(\n\t\tdebounceTime(250),\n\t\tswitchMap(([url, params]) =>\n\t\t\tthis.httpClient.get<{ data: { count: number } }>(url, {\n\t\t\t\tparams: {\n\t\t\t\t\t...params,\n\t\t\t\t\tfields: 'collection.count',\n\t\t\t\t},\n\t\t\t}),\n\t\t),\n\t\tmap((res) => res.data?.count ?? 0),\n\t);\n\n\tprotected override getOptions(params: Record<string, string | number | boolean>, page: number): Observable<T[]> {\n\t\treturn this.url$.pipe(\n\t\t\ttake(1),\n\t\t\tswitchMap((url) =>\n\t\t\t\tthis.httpClient.get<ILuApiCollectionResponse<T>>(url, {\n\t\t\t\t\tparams: {\n\t\t\t\t\t\t...params,\n\t\t\t\t\t\tpaging: `${page * this.pageSize},${this.pageSize}`,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t\tmap((res) => res.data.items),\n\t\t);\n\t}\n\n\tprotected override optionKey = (option: T) => option.id;\n}\n","import { HttpClient } from '@angular/common/http';\nimport { computed, Directive, forwardRef, inject, input, model } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { ILuApiItem } from '@lucca-front/ng/api';\nimport { applySearchDelimiter, CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider } from '@lucca-front/ng/core-select';\nimport { debounceTime, map, Observable, switchMap } from 'rxjs';\nimport { ALuCoreSelectApiDirective } from './api.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[apiV4],lu-multi-select[apiV4]',\n\tstandalone: true,\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectApiV4Directive),\n\t\t},\n\t],\n})\nexport class LuCoreSelectApiV4Directive<T extends ILuApiItem> extends ALuCoreSelectApiDirective<T> implements CoreSelectApiTotalCountProvider {\n\tapiV4 = model.required<string>();\n\tsort = input<string | null>('+name');\n\tfilters = input<Record<string, string | number | boolean>>({});\n\tsearchDelimiter = input<string>(' ');\n\n\tprotected httpClient = inject(HttpClient);\n\n\tprotected clue = toSignal(this.clue$);\n\n\tprotected override params$: Observable<Record<string, string | number | boolean>> = toObservable(\n\t\tcomputed(() => {\n\t\t\tconst sort = this.sort();\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...(sort ? { sort } : {}),\n\t\t\t\t...(clue ? { search: applySearchDelimiter(clue, searchDelimiter) } : {}),\n\t\t\t};\n\t\t}),\n\t);\n\n\tpublic totalCount$ = toObservable(computed(() => ({ url: this.apiV4(), 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 getOptions(params: Record<string, string | number | boolean>, page: number): Observable<T[]> {\n\t\treturn this.httpClient\n\t\t\t.get<T[] | { items: T[] }>(this.apiV4(), {\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 optionKey = (option: T) => option.id;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAIO,MAAM,yBAAyB,GAAG;AAClC,MAAM,uBAAuB,GAAG,GAAG;MAGpB,yBAAyB,CAAA;AAD/C,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,OAAO,EAAQ;QAC9B,IAAA,CAAA,QAAQ,GAAG,yBAAyB;QACpC,IAAA,CAAA,gBAAgB,GAAG,uBAAuB;AAE7C,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAA4C,uBAAuB,CAAC;AAEhF,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAC1C,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,EAC3B,SAAS,CAAC,CAAC,CAAC,CACZ;QAES,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,SAAS,CAAC,EA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AA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAEW,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAZtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;;AAGV,oBAAA,QAAQ,EAAE,gDAAgD;AAC1D,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,SAAS,EAAE;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,oCAAoC;AAC7C,4BAAA,WAAW,EAAE,UAAU,CAAC,gCAAgC,CAAC;AACzD,yBAAA;AACD,qBAAA;AACD,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-core-select-api.mjs","sources":["../../../packages/ng/core-select/api/api.directive.ts","../../../packages/ng/core-select/api/api-v3.directive.ts","../../../packages/ng/core-select/api/api-v4.directive.ts","../../../packages/ng/core-select/api/lucca-front-ng-core-select-api.ts"],"sourcesContent":["import { Directive, inject, OnDestroy, OnInit } from '@angular/core';\nimport { ALuSelectInputComponent, coreSelectDefaultOptionComparer, coreSelectDefaultOptionKey, LuOptionComparer } from '@lucca-front/ng/core-select';\nimport { catchError, combineLatest, concatMap, debounceTime, distinctUntilChanged, map, merge, Observable, of, pairwise, scan, startWith, Subject, switchMap, takeUntil, tap } from 'rxjs';\n\nexport const LU_SELECT_MAGIC_PAGE_SIZE = 20;\nexport const MAGIC_DEBOUNCE_DURATION = 250;\n\n@Directive()\nexport abstract class ALuCoreSelectApiDirective<TOption, TParams = Record<string, string | number | boolean>> implements OnDestroy, OnInit {\n\tprotected destroy$ = new Subject<void>();\n\tprotected pageSize = LU_SELECT_MAGIC_PAGE_SIZE;\n\tprotected debounceDuration = MAGIC_DEBOUNCE_DURATION;\n\n\tpublic select = inject<ALuSelectInputComponent<TOption, unknown>>(ALuSelectInputComponent);\n\n\tprotected page$ = this.select.nextPage.pipe(\n\t\tscan((page) => page + 1, 0),\n\t\tstartWith(0),\n\t);\n\n\tprotected clue$ = this.select.clueChange.pipe(debounceTime(this.debounceDuration), startWith(''));\n\n\t/**\n\t * Create an object that will be used as params for the api call\n\t */\n\tprotected abstract params$: Observable<TParams>;\n\n\t/**\n\t * Compare two options to know if they are the same. For example, compare by id or by JSON\n\t */\n\tprotected optionComparer: LuOptionComparer<TOption> = (a, b) => this.optionKey(a) === this.optionKey(b);\n\n\t/**\n\t * Return a unique key to identify the option in for-of loops\n\t */\n\tprotected abstract optionKey: (option: TOption) => unknown;\n\n\t/**\n\t * Return the options for the given params and page\n\t */\n\tprotected abstract getOptions(params: TParams, page: number): Observable<TOption[]>;\n\n\tpublic ngOnInit(): void {\n\t\tif (this.select.optionComparer === coreSelectDefaultOptionComparer) {\n\t\t\tthis.select.optionComparer = this.optionComparer;\n\t\t}\n\n\t\tif (this.select.optionKey === coreSelectDefaultOptionKey) {\n\t\t\tthis.select.optionKey = this.optionKey;\n\t\t}\n\n\t\tthis.buildOptions()\n\t\t\t.pipe(takeUntil(this.destroy$))\n\t\t\t.subscribe((options) => (this.select.options = options));\n\t}\n\n\tprotected buildOptions(): Observable<TOption[]> {\n\t\t// Prevent a double call to getOptions when the clue is changed while the panel is closed\n\t\tconst clueIsPendingDebounce$ = merge(this.select.clueChange.pipe(map(() => true)), this.clue$.pipe(map(() => false))).pipe(distinctUntilChanged());\n\t\tconst isOpen$ = combineLatest([this.select.isPanelOpen$, clueIsPendingDebounce$]).pipe(\n\t\t\tdebounceTime(0),\n\t\t\tstartWith([false, false]),\n\t\t\tpairwise(),\n\t\t\ttap(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => {\n\t\t\t\t// Start the loader as soon as the panel is opened to avoid a short display of the \"no result\" message\n\t\t\t\tif (!wasOpen && isOpen && clueIsPendingDebounce) {\n\t\t\t\t\tthis.select.loading = true;\n\t\t\t\t}\n\t\t\t}),\n\t\t\tmap(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => (isOpen && !wasOpen ? !clueIsPendingDebounce : isOpen)),\n\t\t\tdistinctUntilChanged(),\n\t\t);\n\n\t\treturn combineLatest([this.params$, isOpen$]).pipe(\n\t\t\tswitchMap(([params, isOpened]) => {\n\t\t\t\tconst hasNextPage$ = new Subject<void>();\n\n\t\t\t\treturn isOpened\n\t\t\t\t\t? this.page$.pipe(\n\t\t\t\t\t\t\ttakeUntil(hasNextPage$),\n\t\t\t\t\t\t\tconcatMap((page) => this.getOptionsPage(params, page).pipe(map(({ items, isLastPage }) => ({ items, isLastPage, page })))),\n\t\t\t\t\t\t\ttap(({ isLastPage }) => {\n\t\t\t\t\t\t\t\tif (isLastPage) {\n\t\t\t\t\t\t\t\t\t// `getOptionsPage` can emit multiple times (for example, when adding homonyms additional information),\n\t\t\t\t\t\t\t\t\t// so we cannot use takeWhile here.\n\t\t\t\t\t\t\t\t\thasNextPage$.next();\n\t\t\t\t\t\t\t\t\thasNextPage$.complete();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tscan(\n\t\t\t\t\t\t\t\t(acc, { items, page }) => {\n\t\t\t\t\t\t\t\t\tacc[page] = items;\n\t\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{} as Record<number, TOption[]>,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tmap((pages) => Object.values(pages).flat()),\n\t\t\t\t\t\t)\n\t\t\t\t\t: of([] as TOption[]);\n\t\t\t}),\n\t\t);\n\t}\n\n\tprotected getOptionsPage(params: TParams, page: number): Observable<{ items: TOption[]; isLastPage: boolean }> {\n\t\tthis.select.loading = true;\n\n\t\treturn this.getOptions(params, page).pipe(\n\t\t\tcatchError(() => of([] as TOption[])),\n\t\t\ttap(() => (this.select.loading = false)),\n\t\t\tmap((items) => ({ items, isLastPage: items.length < this.pageSize })),\n\t\t);\n\t}\n\n\tpublic ngOnDestroy(): void {\n\t\tthis.destroy$.next();\n\t\tthis.destroy$.complete();\n\t}\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Directive, forwardRef, inject, Input } from '@angular/core';\nimport { ILuApiCollectionResponse, ILuApiItem } from '@lucca-front/ng/api';\nimport { CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider } from '@lucca-front/ng/core-select';\nimport { BehaviorSubject, combineLatest, debounceTime, map, Observable, ReplaySubject, switchMap, take } from 'rxjs';\nimport { ALuCoreSelectApiDirective } from './api.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[apiV3],lu-multi-select[apiV3]',\n\tstandalone: true,\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectApiV3Directive),\n\t\t},\n\t],\n})\nexport class LuCoreSelectApiV3Directive<T extends ILuApiItem> extends ALuCoreSelectApiDirective<T> implements CoreSelectApiTotalCountProvider {\n\t@Input()\n\tpublic set apiV3(value: string) {\n\t\tthis.url$.next(value);\n\t}\n\n\t@Input()\n\tpublic set fields(value: string) {\n\t\tthis.fields$.next(value);\n\t}\n\n\t@Input()\n\tpublic set orderBy(value: string | null) {\n\t\tthis.orderBy$.next(value);\n\t}\n\n\t@Input()\n\tpublic set filters(value: Record<string, string | number | boolean>) {\n\t\tthis.filters$.next(value);\n\t}\n\n\tprotected url$ = new ReplaySubject<string>(1);\n\tprotected fields$ = new BehaviorSubject<string>('id,name');\n\tprotected orderBy$ = new BehaviorSubject<string | null>('name,asc');\n\tprotected filters$ = new BehaviorSubject<Record<string, string | number | boolean>>({});\n\n\tprotected httpClient = inject(HttpClient);\n\n\tprotected override params$ = combineLatest([this.fields$, this.filters$, this.orderBy$, this.clue$]).pipe(\n\t\tmap(([fields, filters, orderBy, clue]) => ({\n\t\t\t...filters,\n\t\t\t...(fields ? { fields } : {}),\n\t\t\t...(orderBy ? { orderBy } : {}),\n\t\t\t...(clue ? { name: `like,${clue}` } : {}),\n\t\t})),\n\t);\n\n\tpublic totalCount$ = combineLatest([this.url$, this.filters$]).pipe(\n\t\tdebounceTime(250),\n\t\tswitchMap(([url, params]) =>\n\t\t\tthis.httpClient.get<{ data: { count: number } }>(url, {\n\t\t\t\tparams: {\n\t\t\t\t\t...params,\n\t\t\t\t\tfields: 'collection.count',\n\t\t\t\t},\n\t\t\t}),\n\t\t),\n\t\tmap((res) => res.data?.count ?? 0),\n\t);\n\n\tprotected override getOptions(params: Record<string, string | number | boolean>, page: number): Observable<T[]> {\n\t\treturn this.url$.pipe(\n\t\t\ttake(1),\n\t\t\tswitchMap((url) =>\n\t\t\t\tthis.httpClient.get<ILuApiCollectionResponse<T>>(url, {\n\t\t\t\t\tparams: {\n\t\t\t\t\t\t...params,\n\t\t\t\t\t\tpaging: `${page * this.pageSize},${this.pageSize}`,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t\tmap((res) => res.data.items),\n\t\t);\n\t}\n\n\tprotected override optionKey = (option: T) => option.id;\n}\n","import { HttpClient } from '@angular/common/http';\nimport { computed, Directive, forwardRef, inject, input, model } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { ILuApiItem } from '@lucca-front/ng/api';\nimport { applySearchDelimiter, CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider } from '@lucca-front/ng/core-select';\nimport { debounceTime, map, Observable, switchMap } from 'rxjs';\nimport { ALuCoreSelectApiDirective } from './api.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[apiV4],lu-multi-select[apiV4]',\n\tstandalone: true,\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectApiV4Directive),\n\t\t},\n\t],\n})\nexport class LuCoreSelectApiV4Directive<T extends ILuApiItem> extends ALuCoreSelectApiDirective<T> implements CoreSelectApiTotalCountProvider {\n\tapiV4 = model.required<string>();\n\tsort = input<string | null>('+name');\n\tfilters = input<Record<string, string | number | boolean>>({});\n\tsearchDelimiter = input<string>(' ');\n\n\tprotected httpClient = inject(HttpClient);\n\n\tprotected clue = toSignal(this.clue$);\n\n\tprotected override params$: Observable<Record<string, string | number | boolean>> = toObservable(\n\t\tcomputed(() => {\n\t\t\tconst sort = this.sort();\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...(sort ? { sort } : {}),\n\t\t\t\t...(clue ? { search: applySearchDelimiter(clue, searchDelimiter) } : {}),\n\t\t\t};\n\t\t}),\n\t);\n\n\tpublic totalCount$ = toObservable(computed(() => ({ url: this.apiV4(), 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 getOptions(params: Record<string, string | number | boolean>, page: number): Observable<T[]> {\n\t\treturn this.httpClient\n\t\t\t.get<T[] | { items: T[] }>(this.apiV4(), {\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 optionKey = (option: T) => option.id;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAIO,MAAM,yBAAyB,GAAG;AAClC,MAAM,uBAAuB,GAAG,GAAG;MAGpB,yBAAyB,CAAA;AAD/C,IAAA,WAA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EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,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,OAAA,EAAA,EAAA,KAAA,EAAA,aAAA,EAAA,EAAA,SAAA,EAP3B;AACV,YAAA;AACC,gBAAA,OAAO,EAAE,oCAAoC;AAC7C,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,0BAA0B,CAAC;AACzD,aAAA;AACD,SAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAEW,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAZtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;;AAGV,oBAAA,QAAQ,EAAE,gDAAgD;AAC1D,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,SAAS,EAAE;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,oCAAoC;AAC7C,4BAAA,WAAW,EAAE,UAAU,CAAC,gCAAgC,CAAC;AACzD,yBAAA;AACD,qBAAA;AACD,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -12,17 +12,17 @@ class NoopTreeSelectDirective {
|
|
|
12
12
|
#select;
|
|
13
13
|
constructor() {
|
|
14
14
|
this.#select = inject(ALuSelectInputComponent);
|
|
15
|
-
this.groupingFnInput = input(() => null, ...(ngDevMode ?
|
|
15
|
+
this.groupingFnInput = input(() => null, { ...(ngDevMode ? { debugName: "groupingFnInput" } : {}), alias: 'noopTreeSelect' });
|
|
16
16
|
this.groupingFn = linkedSignal(() => this.groupingFnInput(), ...(ngDevMode ? [{ debugName: "groupingFn" }] : []));
|
|
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: "
|
|
23
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: NoopTreeSelectDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
23
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.5", 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: "
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: NoopTreeSelectDirective, decorators: [{
|
|
26
26
|
type: Directive,
|
|
27
27
|
args: [{
|
|
28
28
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -100,15 +100,15 @@ class LuCoreSelectDepartmentsDirective extends ALuCoreSelectApiDirective {
|
|
|
100
100
|
}
|
|
101
101
|
return result;
|
|
102
102
|
}
|
|
103
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
104
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
103
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: LuCoreSelectDepartmentsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
104
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.5", 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
105
|
{
|
|
106
106
|
provide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,
|
|
107
107
|
useExisting: forwardRef(() => LuCoreSelectDepartmentsDirective),
|
|
108
108
|
},
|
|
109
109
|
], exportAs: ["luDepartments"], usesInheritance: true, hostDirectives: [{ directive: NoopTreeSelectDirective }], ngImport: i0 }); }
|
|
110
110
|
}
|
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: LuCoreSelectDepartmentsDirective, decorators: [{
|
|
112
112
|
type: Directive,
|
|
113
113
|
args: [{
|
|
114
114
|
// The attribute is already prefixed with "lu-simple-select" / "lu-multi-select"
|
|
@@ -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,IAA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AAA,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,EARjC;AACV,YAAA;AACC,gBAAA,OAAO,EAAE,oCAAoC;AAC7C,gBAAA,WAAW,EAAE,UAAU,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\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,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,GAAA,EAAA,CAAA,EAAI,KAAK,EAAE,gBAAgB,EAAA,CAAG;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;8GAbY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA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,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EARjC;AACV,YAAA;AACC,gBAAA,OAAO,EAAE,oCAAoC;AAC7C,gBAAA,WAAW,EAAE,UAAU,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;;2FAGW,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;;;;"}
|
|
@@ -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: "
|
|
21
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: EstablishmentGroupingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
21
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: EstablishmentGroupingService, providedIn: 'root' }); }
|
|
22
22
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: EstablishmentGroupingService, decorators: [{
|
|
24
24
|
type: Injectable,
|
|
25
25
|
args: [{ providedIn: 'root' }]
|
|
26
26
|
}] });
|
|
@@ -29,10 +29,10 @@ 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: "
|
|
33
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
32
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: LuEstablishmentGroupingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
33
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.5", type: LuEstablishmentGroupingComponent, isStandalone: true, selector: "lu-establishment-grouping", ngImport: i0, template: `{{ group.options[0].legalUnit.name }}`, isInline: true }); }
|
|
34
34
|
}
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: LuEstablishmentGroupingComponent, decorators: [{
|
|
36
36
|
type: Component,
|
|
37
37
|
args: [{
|
|
38
38
|
selector: 'lu-establishment-grouping',
|
|
@@ -106,15 +106,15 @@ 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: "
|
|
110
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
109
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: LuCoreSelectEstablishmentsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
110
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.5", 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: "
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", 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"
|