@lucca-front/ng 22.1.0 → 22.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/lucca-front-ng-activity-feed.mjs +8 -4
- package/fesm2022/lucca-front-ng-activity-feed.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-approbation-inbox.mjs +46 -25
- package/fesm2022/lucca-front-ng-approbation-inbox.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-department.mjs +2 -0
- package/fesm2022/lucca-front-ng-core-select-department.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-establishment.mjs +2 -0
- package/fesm2022/lucca-front-ng-core-select-establishment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-user.mjs +2 -0
- package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select.mjs +6 -6
- package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date2.mjs +62 -12
- package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dialog.mjs +3 -2
- package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-filter-pills.mjs +4 -4
- package/fesm2022/lucca-front-ng-form-field.mjs +6 -2
- package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs +3 -2
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-highlight-section.mjs +3 -0
- package/fesm2022/lucca-front-ng-highlight-section.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-impersonation.mjs +3 -1
- package/fesm2022/lucca-front-ng-impersonation.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-link.mjs +33 -9
- package/fesm2022/lucca-front-ng-link.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listing.mjs +17 -7
- package/fesm2022/lucca-front-ng-listing.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-multi-select.mjs +6 -6
- package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover2.mjs +2 -2
- package/fesm2022/lucca-front-ng-popover2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-priority-level.mjs +128 -0
- package/fesm2022/lucca-front-ng-priority-level.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs +2 -2
- package/fesm2022/lucca-front-ng-segmented-control.mjs +2 -2
- package/fesm2022/lucca-front-ng-simple-select.mjs +4 -4
- package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tree-select.mjs +2 -2
- package/fesm2022/lucca-front-ng-tree-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user.mjs +11 -4
- package/fesm2022/lucca-front-ng-user.mjs.map +1 -1
- package/package.json +11 -8
- package/schematics/lu-button/migration.js +59 -33
- package/src/components/_sidepanel.scss +2 -2
- package/src/components/cdk/_global.scss +4 -0
- package/src/components/cdk/_overlay.scss +1 -1
- package/types/lucca-front-ng-activity-feed.d.ts +13 -9
- package/types/lucca-front-ng-api.d.ts +28 -28
- package/types/lucca-front-ng-approbation-inbox.d.ts +19 -11
- package/types/lucca-front-ng-bubble-icon.d.ts +1 -1
- package/types/lucca-front-ng-callout.d.ts +17 -17
- package/types/lucca-front-ng-chip.d.ts +6 -6
- package/types/lucca-front-ng-clear.d.ts +1 -1
- package/types/lucca-front-ng-color.d.ts +3 -3
- package/types/lucca-front-ng-comment.d.ts +11 -11
- package/types/lucca-front-ng-container.d.ts +1 -1
- package/types/lucca-front-ng-core-select-api.d.ts +7 -7
- package/types/lucca-front-ng-core-select-department.d.ts +7 -5
- package/types/lucca-front-ng-core-select-establishment.d.ts +7 -5
- package/types/lucca-front-ng-core-select-job-qualification.d.ts +2 -2
- package/types/lucca-front-ng-core-select-legal-units.d.ts +3 -3
- package/types/lucca-front-ng-core-select-occupation-category.d.ts +2 -2
- package/types/lucca-front-ng-core-select-user.d.ts +14 -12
- package/types/lucca-front-ng-core-select.d.ts +39 -39
- package/types/lucca-front-ng-core.d.ts +2 -2
- package/types/lucca-front-ng-data-table.d.ts +33 -33
- package/types/lucca-front-ng-date.d.ts +11 -11
- package/types/lucca-front-ng-date2.d.ts +52 -36
- package/types/lucca-front-ng-dialog.d.ts +8 -8
- package/types/lucca-front-ng-divider.d.ts +2 -2
- package/types/lucca-front-ng-dropdown.d.ts +2 -2
- package/types/lucca-front-ng-empty-state.d.ts +20 -20
- package/types/lucca-front-ng-establishment.d.ts +13 -13
- package/types/lucca-front-ng-fancy-box.d.ts +12 -12
- package/types/lucca-front-ng-file-upload.d.ts +13 -13
- package/types/lucca-front-ng-filter-pills.d.ts +17 -17
- package/types/lucca-front-ng-footer.d.ts +1 -1
- package/types/lucca-front-ng-form-field.d.ts +19 -19
- package/types/lucca-front-ng-form-label.d.ts +4 -4
- package/types/lucca-front-ng-form.d.ts +1 -1
- package/types/lucca-front-ng-forms-phone-number-input.d.ts +11 -11
- package/types/lucca-front-ng-forms-rich-text-input.d.ts +11 -11
- package/types/lucca-front-ng-forms.d.ts +50 -50
- package/types/lucca-front-ng-grid.d.ts +23 -23
- package/types/lucca-front-ng-highlight-data.d.ts +5 -5
- package/types/lucca-front-ng-highlight-section.d.ts +6 -3
- package/types/lucca-front-ng-horizontal-navigation.d.ts +4 -4
- package/types/lucca-front-ng-impersonation.d.ts +8 -6
- package/types/lucca-front-ng-index-table.d.ts +18 -18
- package/types/lucca-front-ng-inline-message.d.ts +2 -2
- package/types/lucca-front-ng-link.d.ts +17 -4
- package/types/lucca-front-ng-listbox.d.ts +9 -9
- package/types/lucca-front-ng-listing.d.ts +14 -3
- package/types/lucca-front-ng-loading.d.ts +4 -4
- package/types/lucca-front-ng-main-layout.d.ts +9 -9
- package/types/lucca-front-ng-modal.d.ts +2 -2
- package/types/lucca-front-ng-multi-select.d.ts +20 -20
- package/types/lucca-front-ng-option.d.ts +3 -3
- package/types/lucca-front-ng-page-header.d.ts +2 -2
- package/types/lucca-front-ng-pagination.d.ts +3 -3
- package/types/lucca-front-ng-popover.d.ts +18 -18
- package/types/lucca-front-ng-popover2.d.ts +8 -8
- package/types/lucca-front-ng-popup.d.ts +2 -2
- package/types/{lucca-front-ng-priority-levels.d.ts → lucca-front-ng-priority-level.d.ts} +11 -11
- package/types/lucca-front-ng-progress-bar.d.ts +1 -1
- package/types/lucca-front-ng-progress-stepper.d.ts +2 -2
- package/types/lucca-front-ng-read-more.d.ts +4 -4
- package/types/lucca-front-ng-resource-card.d.ts +3 -3
- package/types/lucca-front-ng-segmented-control-tabs.d.ts +5 -5
- package/types/lucca-front-ng-segmented-control.d.ts +3 -3
- package/types/lucca-front-ng-select.d.ts +9 -9
- package/types/lucca-front-ng-simple-select.d.ts +8 -8
- package/types/lucca-front-ng-software-icon.d.ts +1 -1
- package/types/lucca-front-ng-sortable-list.d.ts +1 -1
- package/types/lucca-front-ng-status-badge.d.ts +1 -1
- package/types/lucca-front-ng-time.d.ts +19 -19
- package/types/lucca-front-ng-toast.d.ts +1 -1
- package/types/lucca-front-ng-tree-select.d.ts +2 -2
- package/types/lucca-front-ng-user-popover.d.ts +1 -1
- package/types/lucca-front-ng-user.d.ts +24 -18
- package/types/lucca-front-ng-vertical-navigation.d.ts +5 -5
- package/fesm2022/lucca-front-ng-priority-levels.mjs +0 -128
- package/fesm2022/lucca-front-ng-priority-levels.mjs.map +0 -1
|
@@ -27,6 +27,9 @@ const HIGHLIGHT_SECTION_ILLUSTRATION = [
|
|
|
27
27
|
];
|
|
28
28
|
|
|
29
29
|
const ILLUSTRATION_CDN_PATH = 'https://cdn.lucca.fr/transverse/prisme/visuals/highlight-section';
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Will be replaced by `lu-box` in v22.2.
|
|
32
|
+
*/
|
|
30
33
|
class HighlightSectionComponent {
|
|
31
34
|
constructor() {
|
|
32
35
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-highlight-section.mjs","sources":["../../../packages/ng/highlight-section/highlight-section.type.ts","../../../packages/ng/highlight-section/highlight-section.component.ts","../../../packages/ng/highlight-section/highlight-section.component.html","../../../packages/ng/highlight-section/lucca-front-ng-highlight-section.ts"],"sourcesContent":["/**\n * Available HighlightSectionComponent Types\n */\n\nexport const HIGHLIGHT_SECTION_THEME = ['white', 'light', 'dark'] as const;\nexport type HighlightSectionTheme = (typeof HIGHLIGHT_SECTION_THEME)[number];\n\nexport const HIGHLIGHT_SECTION_PALETTE = ['lucca', 'cleemy', 'timmi', 'poplee', 'coreHR', 'pagga', 'cc'] as const;\nexport type HighlightSectionPalette = (typeof HIGHLIGHT_SECTION_PALETTE)[number];\n\nexport const HIGHLIGHT_SECTION_BUBBLE = [1, 2, 3] as const;\nexport type HighlightSectionBubble = (typeof HIGHLIGHT_SECTION_BUBBLE)[number];\n\nexport const HIGHLIGHT_SECTION_ILLUSTRATION = [\n\t'coffee',\n\t'cookie',\n\t'error',\n\t'glasses',\n\t'lock',\n\t'lucca',\n\t'paiement-card',\n\t'party-favor',\n\t'plant-01',\n\t'plant-02',\n\t'plug',\n\t'pola',\n\t'post-its',\n\t'tea',\n] as const;\nexport type HighlightSectionIllustration = (typeof HIGHLIGHT_SECTION_ILLUSTRATION)[number];\n","import { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { LuClass } from '@lucca-front/ng/core';\nimport { LuSafeExternalSvgPipe } from '@lucca-front/ng/safe-content';\nimport { HighlightSectionBubble, HighlightSectionIllustration, HighlightSectionPalette, HighlightSectionTheme } from './highlight-section.type';\n\nconst ILLUSTRATION_CDN_PATH = 'https://cdn.lucca.fr/transverse/prisme/visuals/highlight-section';\n\n@Component({\n\tselector: 'lu-highlight-section',\n\ttemplateUrl: './highlight-section.component.html',\n\tstyleUrl: './highlight-section.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n\tproviders: [LuClass],\n\timports: [LuSafeExternalSvgPipe],\n\thost: {\n\t\tclass: 'highlightSection',\n\t\t'[class.mod-light]': 'this.theme() === \"light\"',\n\t\t'[class.mod-dark]': 'this.theme() === \"dark\"',\n\t\t'[class]': '\"palette-\" + palette()',\n\t},\n})\nexport class HighlightSectionComponent {\n\t/**\n\t * Define a specific theme white light or dark. (White by default)\n\t */\n\treadonly theme = input<HighlightSectionTheme>('white');\n\n\t/**\n\t * Apply product name to ornaments URL and CSS component palette\n\t * This specific palette must be set up on config.scss\n\t */\n\treadonly palette = input<HighlightSectionPalette | string>('lucca');\n\n\t/**\n\t * Define an ornament style based on the CDN image bubble number.\n\t * Ornaments are hidden when this input is not set.\n\t */\n\treadonly bubbleStart = input<HighlightSectionBubble | number>();\n\treadonly bubbleEnd = input<HighlightSectionBubble | number>();\n\n\t/**\n\t * Illustration displayed at the end of the content\n\t * An URL can be apply for custom images\n\t */\n\treadonly illustration = input<HighlightSectionIllustration | string>();\n\n\treadonly bubbleStartSrc = computed(() => `${ILLUSTRATION_CDN_PATH}/bubbles-${this.bubbleStart()}.svg`);\n\treadonly bubbleEndSrc = computed(() => `${ILLUSTRATION_CDN_PATH}/bubbles-${this.bubbleEnd()}.svg`);\n\n\treadonly illustrationSrc = computed(() => {\n\t\tconst illustration = this.illustration() ?? '';\n\t\treturn illustration.includes('/') ? illustration : `${ILLUSTRATION_CDN_PATH}/${illustration}.svg`;\n\t});\n}\n","@if (bubbleStart()) {\n\t<div class=\"highlightSection-bubbleStart\" [innerHtml]=\"bubbleStartSrc() | luSafeExternalSvg\"></div>\n}\n@if (bubbleEnd()) {\n\t<div class=\"highlightSection-bubbleEnd\" [innerHtml]=\"bubbleEndSrc() | luSafeExternalSvg\"></div>\n}\n\n<div class=\"highlightSection-content\">\n\t<div class=\"highlightSection-content-slot\"><ng-content /></div>\n\t@if (illustration()) {\n\t\t<img alt=\"\" class=\"highlightSection-content-illustration\" [attr.src]=\"illustrationSrc()\" />\n\t}\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;AAEG;AAEI,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM;AAGzD,MAAM,yBAAyB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI;AAGhG,MAAM,wBAAwB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAGzC,MAAM,8BAA8B,GAAG;IAC7C,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,SAAS;IACT,MAAM;IACN,OAAO;IACP,eAAe;IACf,aAAa;IACb,UAAU;IACV,UAAU;IACV,MAAM;IACN,MAAM;IACN,UAAU;IACV,KAAK;;;ACtBN,MAAM,qBAAqB,GAAG,kEAAkE;
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-highlight-section.mjs","sources":["../../../packages/ng/highlight-section/highlight-section.type.ts","../../../packages/ng/highlight-section/highlight-section.component.ts","../../../packages/ng/highlight-section/highlight-section.component.html","../../../packages/ng/highlight-section/lucca-front-ng-highlight-section.ts"],"sourcesContent":["/**\n * Available HighlightSectionComponent Types\n */\n\nexport const HIGHLIGHT_SECTION_THEME = ['white', 'light', 'dark'] as const;\nexport type HighlightSectionTheme = (typeof HIGHLIGHT_SECTION_THEME)[number];\n\nexport const HIGHLIGHT_SECTION_PALETTE = ['lucca', 'cleemy', 'timmi', 'poplee', 'coreHR', 'pagga', 'cc'] as const;\nexport type HighlightSectionPalette = (typeof HIGHLIGHT_SECTION_PALETTE)[number];\n\nexport const HIGHLIGHT_SECTION_BUBBLE = [1, 2, 3] as const;\nexport type HighlightSectionBubble = (typeof HIGHLIGHT_SECTION_BUBBLE)[number];\n\nexport const HIGHLIGHT_SECTION_ILLUSTRATION = [\n\t'coffee',\n\t'cookie',\n\t'error',\n\t'glasses',\n\t'lock',\n\t'lucca',\n\t'paiement-card',\n\t'party-favor',\n\t'plant-01',\n\t'plant-02',\n\t'plug',\n\t'pola',\n\t'post-its',\n\t'tea',\n] as const;\nexport type HighlightSectionIllustration = (typeof HIGHLIGHT_SECTION_ILLUSTRATION)[number];\n","import { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { LuClass } from '@lucca-front/ng/core';\nimport { LuSafeExternalSvgPipe } from '@lucca-front/ng/safe-content';\nimport { HighlightSectionBubble, HighlightSectionIllustration, HighlightSectionPalette, HighlightSectionTheme } from './highlight-section.type';\n\nconst ILLUSTRATION_CDN_PATH = 'https://cdn.lucca.fr/transverse/prisme/visuals/highlight-section';\n\n/**\n * @deprecated Will be replaced by `lu-box` in v22.2.\n */\n@Component({\n\tselector: 'lu-highlight-section',\n\ttemplateUrl: './highlight-section.component.html',\n\tstyleUrl: './highlight-section.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n\tproviders: [LuClass],\n\timports: [LuSafeExternalSvgPipe],\n\thost: {\n\t\tclass: 'highlightSection',\n\t\t'[class.mod-light]': 'this.theme() === \"light\"',\n\t\t'[class.mod-dark]': 'this.theme() === \"dark\"',\n\t\t'[class]': '\"palette-\" + palette()',\n\t},\n})\nexport class HighlightSectionComponent {\n\t/**\n\t * Define a specific theme white light or dark. (White by default)\n\t */\n\treadonly theme = input<HighlightSectionTheme>('white');\n\n\t/**\n\t * Apply product name to ornaments URL and CSS component palette\n\t * This specific palette must be set up on config.scss\n\t */\n\treadonly palette = input<HighlightSectionPalette | string>('lucca');\n\n\t/**\n\t * Define an ornament style based on the CDN image bubble number.\n\t * Ornaments are hidden when this input is not set.\n\t */\n\treadonly bubbleStart = input<HighlightSectionBubble | number>();\n\treadonly bubbleEnd = input<HighlightSectionBubble | number>();\n\n\t/**\n\t * Illustration displayed at the end of the content\n\t * An URL can be apply for custom images\n\t */\n\treadonly illustration = input<HighlightSectionIllustration | string>();\n\n\treadonly bubbleStartSrc = computed(() => `${ILLUSTRATION_CDN_PATH}/bubbles-${this.bubbleStart()}.svg`);\n\treadonly bubbleEndSrc = computed(() => `${ILLUSTRATION_CDN_PATH}/bubbles-${this.bubbleEnd()}.svg`);\n\n\treadonly illustrationSrc = computed(() => {\n\t\tconst illustration = this.illustration() ?? '';\n\t\treturn illustration.includes('/') ? illustration : `${ILLUSTRATION_CDN_PATH}/${illustration}.svg`;\n\t});\n}\n","@if (bubbleStart()) {\n\t<div class=\"highlightSection-bubbleStart\" [innerHtml]=\"bubbleStartSrc() | luSafeExternalSvg\"></div>\n}\n@if (bubbleEnd()) {\n\t<div class=\"highlightSection-bubbleEnd\" [innerHtml]=\"bubbleEndSrc() | luSafeExternalSvg\"></div>\n}\n\n<div class=\"highlightSection-content\">\n\t<div class=\"highlightSection-content-slot\"><ng-content /></div>\n\t@if (illustration()) {\n\t\t<img alt=\"\" class=\"highlightSection-content-illustration\" [attr.src]=\"illustrationSrc()\" />\n\t}\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;AAEG;AAEI,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM;AAGzD,MAAM,yBAAyB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI;AAGhG,MAAM,wBAAwB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAGzC,MAAM,8BAA8B,GAAG;IAC7C,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,SAAS;IACT,MAAM;IACN,OAAO;IACP,eAAe;IACf,aAAa;IACb,UAAU;IACV,UAAU;IACV,MAAM;IACN,MAAM;IACN,UAAU;IACV,KAAK;;;ACtBN,MAAM,qBAAqB,GAAG,kEAAkE;AAEhG;;AAEG;M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A,QAAA,EChBrB,qgBAaA,4nEDIW,qBAAqB,EAAA,IAAA,EAAA,mBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAQnB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAfrC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,mBAGf,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,SAAA,EAC1B,CAAC,OAAO,CAAC,EAAA,OAAA,EACX,CAAC,qBAAqB,CAAC,EAAA,IAAA,EAC1B;AACL,wBAAA,KAAK,EAAE,kBAAkB;AACzB,wBAAA,mBAAmB,EAAE,0BAA0B;AAC/C,wBAAA,kBAAkB,EAAE,yBAAyB;AAC7C,wBAAA,SAAS,EAAE,wBAAwB;AACnC,qBAAA,EAAA,QAAA,EAAA,qgBAAA,EAAA,MAAA,EAAA,CAAA,ykEAAA,CAAA,EAAA;;;AEvBF;;AAEG;;"}
|
|
@@ -75,6 +75,7 @@ class ImpersonationComponent {
|
|
|
75
75
|
this.enableFormerEmployees = input(false, { ...(ngDevMode ? { debugName: "enableFormerEmployees" } : /* istanbul ignore next */ {}), transform: luBooleanAttribute });
|
|
76
76
|
/**
|
|
77
77
|
* Restricts the users to the ones reachable through these operations, scoped by `appInstanceId`.
|
|
78
|
+
* @deprecated use `uniqueOperationIds` instead
|
|
78
79
|
*/
|
|
79
80
|
this.operationIds = input(null, /* @ts-ignore */
|
|
80
81
|
...(ngDevMode ? [{ debugName: "operationIds" }] : /* istanbul ignore next */ []));
|
|
@@ -86,6 +87,7 @@ class ImpersonationComponent {
|
|
|
86
87
|
...(ngDevMode ? [{ debugName: "uniqueOperationIds" }] : /* istanbul ignore next */ []));
|
|
87
88
|
/**
|
|
88
89
|
* Application instance the `operationIds` are scoped to. Unused with `uniqueOperationIds`.
|
|
90
|
+
* @deprecated use `uniqueOperationIds` instead
|
|
89
91
|
*/
|
|
90
92
|
this.appInstanceId = input(null, { ...(ngDevMode ? { debugName: "appInstanceId" } : /* istanbul ignore next */ {}), transform: luNullableNumberAttribute });
|
|
91
93
|
this.isNotMe = computed(() => this.selectedUser()?.id !== this.currentUserId, /* @ts-ignore */
|
|
@@ -122,7 +124,7 @@ class ImpersonationComponent {
|
|
|
122
124
|
});
|
|
123
125
|
}
|
|
124
126
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ImpersonationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
125
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: ImpersonationComponent, isStandalone: true, selector: "lu-impersonation", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null }, selectedUser: { classPropertyName: "selectedUser", publicName: "selectedUser", isSignal: true, isRequired: false, transformFunction: null }, enableFormerEmployees: { classPropertyName: "enableFormerEmployees", publicName: "enableFormerEmployees", 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 } }, outputs: { selectedUser: "selectedUserChange", clear: "clear" }, host: { classAttribute: "impersonation" }, viewQueries: [{ propertyName: "inputComponentRef", first: true, predicate: LuSimpleSelectInputComponent, descendants: true, isSignal: true }, { propertyName: "popoverRef", first: true, predicate: PopoverDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<button\n\ttype=\"button\"\n\tclass=\"impersonation-trigger\"\n\t[class.is-active]=\"isNotMe() && selectedUser()\"\n\t[luPopover2]=\"impersonationPopover\"\n\t[luPopoverNoCloseButton]=\"true\"\n\t[customPositions]=\"popoverPositions\"\n\t[luPopoverAnchor]=\"elementRef\"\n\t#popoverRef=\"luPopover2\"\n\t[attr.aria-expanded]=\"popoverRef.opened()\"\n\t(keydown.arrowDown)=\"$event.preventDefault(); popoverRef.openPopover(true)\"\n\t(keydown.arrowUp)=\"$event.preventDefault(); popoverRef.openPopover(true)\"\n>\n\t<span class=\"pr-u-mask\">{{ intl().switchProfile }}</span>\n\n\t@let user = selectedUser();\n\t@if (user) {\n\t\t<lu-user-picture aria-hidden=\"true\" [user]=\"user\" size=\"S\" softRounded />\n\t\t{{ user | luUserDisplay }}\n\t} @else {\n\t\t<lu-user-picture placeholder aria-hidden=\"true\" size=\"S\" softRounded />\n\t\t<div class=\"skeleton is-loading\" style=\"inline-size: 5.5rem\">\n\t\t\t<span class=\"skeleton-item\"></span>\n\t\t</div>\n\t}\n\t<span class=\"pr-u-mask\">{{ intl().a11yNavigationDescription }}</span>\n\t<lu-icon class=\"impersonation-trigger-icon\" icon=\"chevronBottom\" />\n</button>\n<lu-clear class=\"impersonation-clear\" (onClear)=\"clear.emit()\" [intl]=\"{ clear: intl().clear }\" />\n\n<ng-template #impersonationPopover>\n\t<div class=\"impersonation_popover-content popover-contentOptional\">\n\t\t<lu-simple-select\n\t\t\timpersonation\n\t\t\t[(ngModel)]=\"selectedUser\"\n\t\t\tusers\n\t\t\t[enableFormerEmployees]=\"enableFormerEmployees()\"\n\t\t\t[operationIds]=\"operationIds()\"\n\t\t\t[uniqueOperationIds]=\"uniqueOperationIds()\"\n\t\t\t[appInstanceId]=\"appInstanceId()\"\n\t\t\t#selectRef\n\t\t>\n\t\t\t<ng-container *luOption=\"let user; select: selectRef\">\n\t\t\t\t<div class=\"impersonation_popover-content-option\" [class.mod-me]=\"currentUserId === user.id\">\n\t\t\t\t\t<lu-user-picture aria-hidden=\"true\" [user]=\"user\" size=\"XS\" softRounded />\n\t\t\t\t\t<div>\n\t\t\t\t\t\t@if (currentUserId === user.id) {\n\t\t\t\t\t\t\t{{ intl().me }} <span translate=\"no\">{{ user | luUserDisplay }}</span>\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<span translate=\"no\">{{ user | luUserDisplay }}</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t<!-- Handle homonyms -->\n\t\t\t\t\t\t@if (user.additionalInformation) {\n\t\t\t\t\t\t\t<div class=\"option-additional\">\n\t\t\t\t\t\t\t\t{{ user.additionalInformation }}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\t\t</lu-simple-select>\n\t</div>\n</ng-template>\n", styles: ["@layer components{.impersonation{--components-impersonation-trigger-borderColor: var(--palettes-neutral-100);--components-impersonation-trigger-icon-rotate: 0deg;--components-impersonation-trigger-backgroundColor: var(--palettes-neutral-0);--components-impersonation-trigger-fontWeight: var(--pr-t-font-fontWeight-regular);--components-impersonation-trigger-color: var(--pr-t-color-text);--components-impersonation-trigger-icon-color: var(--pr-t-color-text-subtle);--components-impersonation-clear-display: none;--components-impersonation-trigger-icon-marginInlineStart: auto;position:relative;inline-size:fit-content;display:block}.impersonation-trigger{padding:0;border:0;inline-size:100%;background-color:transparent;color:inherit;text-align:start;display:block;font:inherit;cursor:pointer;box-shadow:0 0 0 1px var(--components-impersonation-trigger-borderColor);background-color:var(--components-impersonation-trigger-backgroundColor);border-radius:var(--pr-t-border-radius-200);inline-size:fit-content;display:flex;align-items:center;gap:var(--pr-t-spacings-100);padding:var(--pr-t-spacings-50);padding-inline-end:var(--pr-t-spacings-100);min-block-size:var(--pr-t-spacings-500);font-weight:var(--components-impersonation-trigger-fontWeight);color:var(--components-impersonation-trigger-color);transition-property:box-shadow,border-color;transition-duration:var(--commons-animations-durations-fast)}.impersonation-trigger-icon{color:var(--components-impersonation-trigger-icon-color);rotate:var(--components-impersonation-trigger-icon-rotate);transition-property:rotate;transition-duration:var(--commons-animations-durations-fast);margin-inline-start:var(--components-impersonation-trigger-icon-marginInlineStart)}.impersonation-clear.clear{position:absolute;z-index:1;inset-inline-end:calc(var(--pr-t-spacings-400) + var(--pr-t-spacings-75));inset-block-start:calc(var(--pr-t-spacings-150) + 1px);display:var(--components-impersonation-clear-display);--components-clear-cross-color: var(--palettes-neutral-0);--components-clear-background: var(--palettes-product-800)}.impersonation-clear.clear:hover{--components-clear-background: var(--palettes-product-700)}.impersonation-clear.clear:active{--components-clear-background: var(--palettes-product-900)}.impersonation_popover-content-option{display:flex;color:var(--pr-t-color-text)}.impersonation_popover-content-option.mod-me{font-weight:var(--pr-t-font-fontWeight-semibold)}}@layer mods{.impersonation:has(.impersonation-trigger.is-active){--components-impersonation-trigger-backgroundColor: var(--palettes-product-50);--components-impersonation-trigger-borderColor: var(--palettes-product-200);--components-impersonation-trigger-fontWeight: var(--pr-t-font-fontWeight-semibold);--components-impersonation-trigger-color: var(--palettes-product-800);--components-impersonation-trigger-icon-color: var(--palettes-product-700);--components-impersonation-clear-display: grid;--components-impersonation-trigger-icon-marginInlineStart: var(--pr-t-spacings-250)}.impersonation:has(.impersonation-trigger:hover){--components-impersonation-trigger-borderColor: var(--palettes-product-400);--components-impersonation-trigger-shadow: var(--pr-t-elevation-shadow-button)}.impersonation:has(.impersonation-trigger[aria-expanded=true]){--components-impersonation-trigger-icon-rotate: 180deg}}\n"], dependencies: [{ kind: "directive", type: PopoverDirective, selector: "[luPopover2]", inputs: ["intl", "luPopover2", "luPopoverPosition", "luPopoverMaxBlockSize", "luPopoverMaxInlineSize", "overlayScrollStrategy", "luPopoverDisabled", "luPopoverTrigger", "customPositions", "luPopoverNoCloseButton", "luPopoverAnchor", "luPopoverBackdrop", "luPopoverIgnoredOutsidePointerTargets", "luPopoverOpenDelay", "luPopoverCloseDelay"], outputs: ["luPopoverTriggerChange", "luPopoverClosed", "luPopoverOpened"], exportAs: ["luPopover2"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LuSimpleSelectInputComponent, selector: "lu-simple-select", inputs: ["intl", "autocomplete", "impersonation"] }, { kind: "directive", type: LuCoreSelectUsersDirective, selector: "lu-simple-select[users],lu-multi-select[users]", inputs: ["displayFormat", "filters", "url", "orderBy", "operationIds", "uniqueOperationIds", "appInstanceId", "enableFormerEmployees", "displayMeOption", "customUserOptionTpl", "searchDelimiter"], outputs: ["customUserOptionTplChange"], exportAs: ["luUsers"] }, { kind: "directive", type: LuOptionDirective, selector: "[luOption]", inputs: ["luOptionSelect"] }, { kind: "component", type: LuUserPictureComponent, selector: "lu-user-picture", inputs: ["displayFormat", "user", "AI", "placeholder", "softRounded", "size", "imageLoadingAttribute"] }, { kind: "component", type: IconComponent, selector: "lu-icon, pr-icon", inputs: ["icon", "alt", "size", "color", "AI"] }, { kind: "component", type: ClearComponent, selector: "lu-clear", inputs: ["intl", "size", "disabled", "palette", "inverted"], outputs: ["onClear"], exportAs: ["luClearer"] }, { kind: "pipe", type: LuUserDisplayPipe, name: "luUserDisplay" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
127
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: ImpersonationComponent, isStandalone: true, selector: "lu-impersonation", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null }, selectedUser: { classPropertyName: "selectedUser", publicName: "selectedUser", isSignal: true, isRequired: false, transformFunction: null }, enableFormerEmployees: { classPropertyName: "enableFormerEmployees", publicName: "enableFormerEmployees", 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 } }, outputs: { selectedUser: "selectedUserChange", clear: "clear" }, host: { classAttribute: "impersonation" }, viewQueries: [{ propertyName: "inputComponentRef", first: true, predicate: LuSimpleSelectInputComponent, descendants: true, isSignal: true }, { propertyName: "popoverRef", first: true, predicate: PopoverDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<button\n\ttype=\"button\"\n\tclass=\"impersonation-trigger\"\n\t[class.is-active]=\"isNotMe() && selectedUser()\"\n\t[luPopover2]=\"impersonationPopover\"\n\t[luPopoverNoCloseButton]=\"true\"\n\t[customPositions]=\"popoverPositions\"\n\t[luPopoverAnchor]=\"elementRef\"\n\t#popoverRef=\"luPopover2\"\n\t[attr.aria-expanded]=\"popoverRef.opened()\"\n\t(keydown.arrowDown)=\"$event.preventDefault(); popoverRef.openPopover(true)\"\n\t(keydown.arrowUp)=\"$event.preventDefault(); popoverRef.openPopover(true)\"\n>\n\t<span class=\"pr-u-mask\">{{ intl().switchProfile }}</span>\n\n\t@let user = selectedUser();\n\t@if (user) {\n\t\t<lu-user-picture aria-hidden=\"true\" [user]=\"user\" size=\"S\" softRounded />\n\t\t{{ user | luUserDisplay }}\n\t} @else {\n\t\t<lu-user-picture placeholder aria-hidden=\"true\" size=\"S\" softRounded />\n\t\t<div class=\"skeleton is-loading\" style=\"inline-size: 5.5rem\">\n\t\t\t<span class=\"skeleton-item\"></span>\n\t\t</div>\n\t}\n\t<span class=\"pr-u-mask\">{{ intl().a11yNavigationDescription }}</span>\n\t<lu-icon class=\"impersonation-trigger-icon\" icon=\"chevronBottom\" />\n</button>\n<lu-clear class=\"impersonation-clear\" (onClear)=\"clear.emit()\" [intl]=\"{ clear: intl().clear }\" />\n\n<ng-template #impersonationPopover>\n\t<div class=\"impersonation_popover-content popover-contentOptional\">\n\t\t<lu-simple-select\n\t\t\timpersonation\n\t\t\t[(ngModel)]=\"selectedUser\"\n\t\t\tusers\n\t\t\t[enableFormerEmployees]=\"enableFormerEmployees()\"\n\t\t\t[operationIds]=\"operationIds()\"\n\t\t\t[uniqueOperationIds]=\"uniqueOperationIds()\"\n\t\t\t[appInstanceId]=\"appInstanceId()\"\n\t\t\t#selectRef\n\t\t>\n\t\t\t<ng-container *luOption=\"let user; select: selectRef\">\n\t\t\t\t<div class=\"impersonation_popover-content-option\" [class.mod-me]=\"currentUserId === user.id\">\n\t\t\t\t\t<lu-user-picture aria-hidden=\"true\" [user]=\"user\" size=\"XS\" softRounded />\n\t\t\t\t\t<div>\n\t\t\t\t\t\t@if (currentUserId === user.id) {\n\t\t\t\t\t\t\t{{ intl().me }} <span translate=\"no\">{{ user | luUserDisplay }}</span>\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<span translate=\"no\">{{ user | luUserDisplay }}</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t<!-- Handle homonyms -->\n\t\t\t\t\t\t@if (user.additionalInformation) {\n\t\t\t\t\t\t\t<div class=\"option-additional\">\n\t\t\t\t\t\t\t\t{{ user.additionalInformation }}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\t\t</lu-simple-select>\n\t</div>\n</ng-template>\n", styles: ["@layer components{.impersonation{--components-impersonation-trigger-borderColor: var(--palettes-neutral-100);--components-impersonation-trigger-icon-rotate: 0deg;--components-impersonation-trigger-backgroundColor: var(--palettes-neutral-0);--components-impersonation-trigger-fontWeight: var(--pr-t-font-fontWeight-regular);--components-impersonation-trigger-color: var(--pr-t-color-text);--components-impersonation-trigger-icon-color: var(--pr-t-color-text-subtle);--components-impersonation-clear-display: none;--components-impersonation-trigger-icon-marginInlineStart: auto;position:relative;inline-size:fit-content;display:block}.impersonation-trigger{padding:0;border:0;inline-size:100%;background-color:transparent;color:inherit;text-align:start;display:block;font:inherit;cursor:pointer;box-shadow:0 0 0 1px var(--components-impersonation-trigger-borderColor);background-color:var(--components-impersonation-trigger-backgroundColor);border-radius:var(--pr-t-border-radius-200);inline-size:fit-content;display:flex;align-items:center;gap:var(--pr-t-spacings-100);padding:var(--pr-t-spacings-50);padding-inline-end:var(--pr-t-spacings-100);min-block-size:var(--pr-t-spacings-500);font-weight:var(--components-impersonation-trigger-fontWeight);color:var(--components-impersonation-trigger-color);transition-property:box-shadow,border-color;transition-duration:var(--commons-animations-durations-fast)}.impersonation-trigger-icon{color:var(--components-impersonation-trigger-icon-color);rotate:var(--components-impersonation-trigger-icon-rotate);transition-property:rotate;transition-duration:var(--commons-animations-durations-fast);margin-inline-start:var(--components-impersonation-trigger-icon-marginInlineStart)}.impersonation-clear.clear{position:absolute;z-index:1;inset-inline-end:calc(var(--pr-t-spacings-400) + var(--pr-t-spacings-75));inset-block-start:calc(var(--pr-t-spacings-150) + 1px);display:var(--components-impersonation-clear-display);--components-clear-cross-color: var(--palettes-neutral-0);--components-clear-background: var(--palettes-product-800)}.impersonation-clear.clear:hover{--components-clear-background: var(--palettes-product-700)}.impersonation-clear.clear:active{--components-clear-background: var(--palettes-product-900)}.impersonation_popover-content-option{display:flex;color:var(--pr-t-color-text)}.impersonation_popover-content-option.mod-me{font-weight:var(--pr-t-font-fontWeight-semibold)}}@layer mods{.impersonation:has(.impersonation-trigger.is-active){--components-impersonation-trigger-backgroundColor: var(--palettes-product-50);--components-impersonation-trigger-borderColor: var(--palettes-product-200);--components-impersonation-trigger-fontWeight: var(--pr-t-font-fontWeight-semibold);--components-impersonation-trigger-color: var(--palettes-product-800);--components-impersonation-trigger-icon-color: var(--palettes-product-700);--components-impersonation-clear-display: grid;--components-impersonation-trigger-icon-marginInlineStart: var(--pr-t-spacings-250)}.impersonation:has(.impersonation-trigger:hover){--components-impersonation-trigger-borderColor: var(--palettes-product-400);--components-impersonation-trigger-shadow: var(--pr-t-elevation-shadow-button)}.impersonation:has(.impersonation-trigger[aria-expanded=true]){--components-impersonation-trigger-icon-rotate: 180deg}}\n"], dependencies: [{ kind: "directive", type: PopoverDirective, selector: "[luPopover2]", inputs: ["intl", "luPopover2", "luPopoverPosition", "luPopoverMaxBlockSize", "luPopoverMaxInlineSize", "overlayScrollStrategy", "luPopoverDisabled", "luPopoverTrigger", "customPositions", "luPopoverNoCloseButton", "luPopoverAnchor", "luPopoverBackdrop", "luPopoverIgnoredOutsidePointerTargets", "luPopoverOpenDelay", "luPopoverCloseDelay"], outputs: ["luPopoverTriggerChange", "luPopoverClosed", "luPopoverOpened"], exportAs: ["luPopover2"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LuSimpleSelectInputComponent, selector: "lu-simple-select", inputs: ["intl", "autocomplete", "impersonation"] }, { kind: "directive", type: LuCoreSelectUsersDirective, selector: "lu-simple-select[users],lu-multi-select[users]", inputs: ["displayFormat", "filters", "url", "orderBy", "operationIds", "uniqueOperationIds", "appInstanceId", "enableFormerEmployees", "displayMeOption", "customUserOptionTpl", "searchDelimiter"], outputs: ["customUserOptionTplChange"], exportAs: ["luUsers"] }, { kind: "directive", type: LuOptionDirective, selector: "[luOption]", inputs: ["luOptionSelect"] }, { kind: "component", type: LuUserPictureComponent, selector: "lu-user-picture", inputs: ["displayFormat", "user", "AI", "placeholder", "softRounded", "size", "withAlt", "imageLoadingAttribute"] }, { kind: "component", type: IconComponent, selector: "lu-icon, pr-icon", inputs: ["icon", "alt", "size", "color", "AI"] }, { kind: "component", type: ClearComponent, selector: "lu-clear", inputs: ["intl", "size", "disabled", "palette", "inverted"], outputs: ["onClear"], exportAs: ["luClearer"] }, { kind: "pipe", type: LuUserDisplayPipe, name: "luUserDisplay" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
126
128
|
}
|
|
127
129
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ImpersonationComponent, decorators: [{
|
|
128
130
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-impersonation.mjs","sources":["../../../packages/ng/impersonation/impersonation/translations.ts","../../../packages/ng/impersonation/impersonation/impersonation.translate.ts","../../../packages/ng/impersonation/impersonation/impersonation.component.ts","../../../packages/ng/impersonation/impersonation/impersonation.component.html","../../../packages/ng/impersonation/lucca-front-ng-impersonation.ts"],"sourcesContent":["export const Translations = {\n\t'nl-BE': {\n\t\ta11yNavigationDescription: '– De inhoud van de pagina wordt bijgewerkt zodra dit filter wordt gewijzigd',\n\t\tswitchProfile: 'Profiel wijzigen:',\n\t\tclear: 'Terug naar standaardprofiel',\n\t},\n\tnl: {\n\t\ta11yNavigationDescription: '– De inhoud van de pagina wordt bijgewerkt zodra dit filter wordt gewijzigd',\n\t\tswitchProfile: 'Profiel wijzigen:',\n\t\tclear: 'Terug naar standaardprofiel',\n\t},\n\tit: {\n\t\ta11yNavigationDescription: '– Il contenuto della pagina si aggiorna non appena questo filtro viene modificato',\n\t\tswitchProfile: 'Cambia profilo:',\n\t\tclear: 'Torna al profilo predefinito',\n\t},\n\tfr: {\n\t\ta11yNavigationDescription: '– Le contenu de la page s’actualise dès que ce filtre est modifié',\n\t\tswitchProfile: 'Changer de profil :',\n\t\tclear: 'Revenir au profil par défaut',\n\t},\n\tpt: {\n\t\ta11yNavigationDescription: '– O conteúdo da página é atualizado assim que este filtro é alterado',\n\t\tswitchProfile: 'Alterar perfil:',\n\t\tclear: 'Voltar ao perfil predefinido',\n\t},\n\tes: {\n\t\ta11yNavigationDescription: '– El contenido de la página se actualiza en cuanto se cambia este filtro',\n\t\tswitchProfile: 'Cambiar de perfil:',\n\t\tclear: 'Volver al perfil predeterminado',\n\t},\n\tde: {\n\t\ta11yNavigationDescription: '– Der Seiteninhalt wird aktualisiert, sobald dieser Filter geändert wird',\n\t\tswitchProfile: 'Profil wechseln:',\n\t\tclear: 'Zurück zum Standardprofil',\n\t},\n\ten: {\n\t\ta11yNavigationDescription: '– Page content updates as soon as this filter is changed',\n\t\tswitchProfile: 'Switch profile:',\n\t\tclear: 'Back to default profile',\n\t},\n};\n","import { InjectionToken } from '@angular/core';\nimport { LuTranslation } from '@lucca-front/ng/core';\nimport { Translations } from './translations';\n\nexport const LU_IMPERSONATION_TRANSLATIONS = new InjectionToken('LuImpersonationTranslations', {\n\tfactory: () => luImpersonationTranslations,\n});\n\nexport interface LuImpersonationTranslations {\n\ta11yNavigationDescription: string;\n\tswitchProfile: string;\n\tclear: string;\n}\n\nexport const luImpersonationTranslations: LuTranslation<LuImpersonationTranslations> = Translations;\n","import { ConnectionPositionPair } from '@angular/cdk/overlay';\nimport { ChangeDetectionStrategy, Component, computed, effect, ElementRef, inject, input, model, output, untracked, viewChild, ViewEncapsulation } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ClearComponent } from '@lucca-front/ng/clear';\nimport { LuOptionDirective } from '@lucca-front/ng/core-select';\nimport { LU_CORE_SELECT_USER_TRANSLATIONS, LuCoreSelectUsersDirective, ɵLU_CORE_SELECT_CURRENT_USER_ID } from '@lucca-front/ng/core-select/user';\nimport { PopoverDirective } from '@lucca-front/ng/popover2';\nimport { LuSimpleSelectInputComponent } from '@lucca-front/ng/simple-select';\nimport { ILuUser, LuUserDisplayPipe, LuUserPictureComponent } from '@lucca-front/ng/user';\nimport { IconComponent } from '@lucca/prisme/icon';\nimport { LU_IMPERSONATION_TRANSLATIONS } from './impersonation.translate';\nimport { intlInputOptions, luBooleanAttribute, luNullableNumberAttribute } from '@lucca-front/ng/core';\n\n@Component({\n\tselector: 'lu-impersonation',\n\timports: [PopoverDirective, FormsModule, LuSimpleSelectInputComponent, LuCoreSelectUsersDirective, LuUserDisplayPipe, LuOptionDirective, LuUserPictureComponent, IconComponent, ClearComponent],\n\ttemplateUrl: './impersonation.component.html',\n\tstyleUrl: './impersonation.component.scss',\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\tclass: 'impersonation',\n\t},\n})\nexport class ImpersonationComponent {\n\tprotected readonly elementRef = inject(ElementRef);\n\treadonly intl = input(...intlInputOptions(LU_CORE_SELECT_USER_TRANSLATIONS, LU_IMPERSONATION_TRANSLATIONS));\n\tprotected readonly currentUserId = inject(ɵLU_CORE_SELECT_CURRENT_USER_ID);\n\n\treadonly inputComponentRef = viewChild<LuSimpleSelectInputComponent<ILuUser>>(LuSimpleSelectInputComponent);\n\n\treadonly popoverRef = viewChild(PopoverDirective);\n\n\treadonly selectedUser = model<ILuUser>();\n\n\treadonly enableFormerEmployees = input(false, { transform: luBooleanAttribute });\n\n\t/**\n\t * Restricts the users to the ones reachable through these operations, scoped by `appInstanceId`.\n\t */\n\treadonly operationIds = input<readonly number[] | null>(null);\n\n\t/**\n\t * Restricts the users to the ones reachable through these unique operations.\n\t * Takes precedence over `operationIds` / `appInstanceId`, which the API then ignores.\n\t */\n\treadonly uniqueOperationIds = input<readonly number[] | null>(null);\n\n\t/**\n\t * Application instance the `operationIds` are scoped to. Unused with `uniqueOperationIds`.\n\t */\n\treadonly appInstanceId = input(null, { transform: luNullableNumberAttribute });\n\n\treadonly isNotMe = computed(() => this.selectedUser()?.id !== this.currentUserId);\n\treadonly clear = output<void>();\n\n\treadonly popoverPositions: ConnectionPositionPair[] = [\n\t\tnew ConnectionPositionPair(\n\t\t\t{ originX: 'start', originY: 'bottom' },\n\t\t\t{\n\t\t\t\toverlayX: 'start',\n\t\t\t\toverlayY: 'top',\n\t\t\t},\n\t\t\t-4,\n\t\t\t0,\n\t\t),\n\t\tnew ConnectionPositionPair(\n\t\t\t{ originX: 'start', originY: 'top' },\n\t\t\t{\n\t\t\t\toverlayX: 'start',\n\t\t\t\toverlayY: 'bottom',\n\t\t\t},\n\t\t\t-4,\n\t\t\t0,\n\t\t),\n\t];\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst ref = this.inputComponentRef();\n\t\t\t// Because ref appears only when opening the panel, we're going to call the impersonation opened hook too\n\t\t\tif (ref) {\n\t\t\t\tuntracked(() => {\n\t\t\t\t\tref.enableFilterPillMode?.();\n\t\t\t\t\tref.registerFilterPillClosePopover(this.closePopover);\n\t\t\t\t\tref.registerFilterPillUpdatePosition?.(this.updatePosition);\n\t\t\t\t\tref.onFilterPillOpened?.();\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tclosePopover = () => {\n\t\tthis.popoverRef()?.close();\n\t\tthis.inputComponentRef()?.onFilterPillClosed?.();\n\t};\n\n\tupdatePosition = () => {\n\t\tthis.popoverRef()?.updatePosition();\n\t};\n}\n","<button\n\ttype=\"button\"\n\tclass=\"impersonation-trigger\"\n\t[class.is-active]=\"isNotMe() && selectedUser()\"\n\t[luPopover2]=\"impersonationPopover\"\n\t[luPopoverNoCloseButton]=\"true\"\n\t[customPositions]=\"popoverPositions\"\n\t[luPopoverAnchor]=\"elementRef\"\n\t#popoverRef=\"luPopover2\"\n\t[attr.aria-expanded]=\"popoverRef.opened()\"\n\t(keydown.arrowDown)=\"$event.preventDefault(); popoverRef.openPopover(true)\"\n\t(keydown.arrowUp)=\"$event.preventDefault(); popoverRef.openPopover(true)\"\n>\n\t<span class=\"pr-u-mask\">{{ intl().switchProfile }}</span>\n\n\t@let user = selectedUser();\n\t@if (user) {\n\t\t<lu-user-picture aria-hidden=\"true\" [user]=\"user\" size=\"S\" softRounded />\n\t\t{{ user | luUserDisplay }}\n\t} @else {\n\t\t<lu-user-picture placeholder aria-hidden=\"true\" size=\"S\" softRounded />\n\t\t<div class=\"skeleton is-loading\" style=\"inline-size: 5.5rem\">\n\t\t\t<span class=\"skeleton-item\"></span>\n\t\t</div>\n\t}\n\t<span class=\"pr-u-mask\">{{ intl().a11yNavigationDescription }}</span>\n\t<lu-icon class=\"impersonation-trigger-icon\" icon=\"chevronBottom\" />\n</button>\n<lu-clear class=\"impersonation-clear\" (onClear)=\"clear.emit()\" [intl]=\"{ clear: intl().clear }\" />\n\n<ng-template #impersonationPopover>\n\t<div class=\"impersonation_popover-content popover-contentOptional\">\n\t\t<lu-simple-select\n\t\t\timpersonation\n\t\t\t[(ngModel)]=\"selectedUser\"\n\t\t\tusers\n\t\t\t[enableFormerEmployees]=\"enableFormerEmployees()\"\n\t\t\t[operationIds]=\"operationIds()\"\n\t\t\t[uniqueOperationIds]=\"uniqueOperationIds()\"\n\t\t\t[appInstanceId]=\"appInstanceId()\"\n\t\t\t#selectRef\n\t\t>\n\t\t\t<ng-container *luOption=\"let user; select: selectRef\">\n\t\t\t\t<div class=\"impersonation_popover-content-option\" [class.mod-me]=\"currentUserId === user.id\">\n\t\t\t\t\t<lu-user-picture aria-hidden=\"true\" [user]=\"user\" size=\"XS\" softRounded />\n\t\t\t\t\t<div>\n\t\t\t\t\t\t@if (currentUserId === user.id) {\n\t\t\t\t\t\t\t{{ intl().me }} <span translate=\"no\">{{ user | luUserDisplay }}</span>\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<span translate=\"no\">{{ user | luUserDisplay }}</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t<!-- Handle homonyms -->\n\t\t\t\t\t\t@if (user.additionalInformation) {\n\t\t\t\t\t\t\t<div class=\"option-additional\">\n\t\t\t\t\t\t\t\t{{ user.additionalInformation }}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\t\t</lu-simple-select>\n\t</div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵLU_CORE_SELECT_CURRENT_USER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AA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,eAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE/BjD;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-impersonation.mjs","sources":["../../../packages/ng/impersonation/impersonation/translations.ts","../../../packages/ng/impersonation/impersonation/impersonation.translate.ts","../../../packages/ng/impersonation/impersonation/impersonation.component.ts","../../../packages/ng/impersonation/impersonation/impersonation.component.html","../../../packages/ng/impersonation/lucca-front-ng-impersonation.ts"],"sourcesContent":["export const Translations = {\n\t'nl-BE': {\n\t\ta11yNavigationDescription: '– De inhoud van de pagina wordt bijgewerkt zodra dit filter wordt gewijzigd',\n\t\tswitchProfile: 'Profiel wijzigen:',\n\t\tclear: 'Terug naar standaardprofiel',\n\t},\n\tnl: {\n\t\ta11yNavigationDescription: '– De inhoud van de pagina wordt bijgewerkt zodra dit filter wordt gewijzigd',\n\t\tswitchProfile: 'Profiel wijzigen:',\n\t\tclear: 'Terug naar standaardprofiel',\n\t},\n\tit: {\n\t\ta11yNavigationDescription: '– Il contenuto della pagina si aggiorna non appena questo filtro viene modificato',\n\t\tswitchProfile: 'Cambia profilo:',\n\t\tclear: 'Torna al profilo predefinito',\n\t},\n\tfr: {\n\t\ta11yNavigationDescription: '– Le contenu de la page s’actualise dès que ce filtre est modifié',\n\t\tswitchProfile: 'Changer de profil :',\n\t\tclear: 'Revenir au profil par défaut',\n\t},\n\tpt: {\n\t\ta11yNavigationDescription: '– O conteúdo da página é atualizado assim que este filtro é alterado',\n\t\tswitchProfile: 'Alterar perfil:',\n\t\tclear: 'Voltar ao perfil predefinido',\n\t},\n\tes: {\n\t\ta11yNavigationDescription: '– El contenido de la página se actualiza en cuanto se cambia este filtro',\n\t\tswitchProfile: 'Cambiar de perfil:',\n\t\tclear: 'Volver al perfil predeterminado',\n\t},\n\tde: {\n\t\ta11yNavigationDescription: '– Der Seiteninhalt wird aktualisiert, sobald dieser Filter geändert wird',\n\t\tswitchProfile: 'Profil wechseln:',\n\t\tclear: 'Zurück zum Standardprofil',\n\t},\n\ten: {\n\t\ta11yNavigationDescription: '– Page content updates as soon as this filter is changed',\n\t\tswitchProfile: 'Switch profile:',\n\t\tclear: 'Back to default profile',\n\t},\n};\n","import { InjectionToken } from '@angular/core';\nimport { LuTranslation } from '@lucca-front/ng/core';\nimport { Translations } from './translations';\n\nexport const LU_IMPERSONATION_TRANSLATIONS = new InjectionToken('LuImpersonationTranslations', {\n\tfactory: () => luImpersonationTranslations,\n});\n\nexport interface LuImpersonationTranslations {\n\ta11yNavigationDescription: string;\n\tswitchProfile: string;\n\tclear: string;\n}\n\nexport const luImpersonationTranslations: LuTranslation<LuImpersonationTranslations> = Translations;\n","import { ConnectionPositionPair } from '@angular/cdk/overlay';\nimport { ChangeDetectionStrategy, Component, computed, effect, ElementRef, inject, input, model, output, untracked, viewChild, ViewEncapsulation } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ClearComponent } from '@lucca-front/ng/clear';\nimport { LuOptionDirective } from '@lucca-front/ng/core-select';\nimport { LU_CORE_SELECT_USER_TRANSLATIONS, LuCoreSelectUsersDirective, ɵLU_CORE_SELECT_CURRENT_USER_ID } from '@lucca-front/ng/core-select/user';\nimport { PopoverDirective } from '@lucca-front/ng/popover2';\nimport { LuSimpleSelectInputComponent } from '@lucca-front/ng/simple-select';\nimport { ILuUser, LuUserDisplayPipe, LuUserPictureComponent } from '@lucca-front/ng/user';\nimport { IconComponent } from '@lucca/prisme/icon';\nimport { LU_IMPERSONATION_TRANSLATIONS } from './impersonation.translate';\nimport { intlInputOptions, luBooleanAttribute, luNullableNumberAttribute } from '@lucca-front/ng/core';\n\n@Component({\n\tselector: 'lu-impersonation',\n\timports: [PopoverDirective, FormsModule, LuSimpleSelectInputComponent, LuCoreSelectUsersDirective, LuUserDisplayPipe, LuOptionDirective, LuUserPictureComponent, IconComponent, ClearComponent],\n\ttemplateUrl: './impersonation.component.html',\n\tstyleUrl: './impersonation.component.scss',\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\tclass: 'impersonation',\n\t},\n})\nexport class ImpersonationComponent {\n\tprotected readonly elementRef = inject(ElementRef);\n\treadonly intl = input(...intlInputOptions(LU_CORE_SELECT_USER_TRANSLATIONS, LU_IMPERSONATION_TRANSLATIONS));\n\tprotected readonly currentUserId = inject(ɵLU_CORE_SELECT_CURRENT_USER_ID);\n\n\treadonly inputComponentRef = viewChild<LuSimpleSelectInputComponent<ILuUser>>(LuSimpleSelectInputComponent);\n\n\treadonly popoverRef = viewChild(PopoverDirective);\n\n\treadonly selectedUser = model<ILuUser>();\n\n\treadonly enableFormerEmployees = input(false, { transform: luBooleanAttribute });\n\n\t/**\n\t * Restricts the users to the ones reachable through these operations, scoped by `appInstanceId`.\n\t * @deprecated use `uniqueOperationIds` instead\n\t */\n\treadonly operationIds = input<readonly number[] | null>(null);\n\n\t/**\n\t * Restricts the users to the ones reachable through these unique operations.\n\t * Takes precedence over `operationIds` / `appInstanceId`, which the API then ignores.\n\t */\n\treadonly uniqueOperationIds = input<readonly number[] | null>(null);\n\n\t/**\n\t * Application instance the `operationIds` are scoped to. Unused with `uniqueOperationIds`.\n\t * @deprecated use `uniqueOperationIds` instead\n\t */\n\treadonly appInstanceId = input(null, { transform: luNullableNumberAttribute });\n\n\treadonly isNotMe = computed(() => this.selectedUser()?.id !== this.currentUserId);\n\treadonly clear = output<void>();\n\n\treadonly popoverPositions: ConnectionPositionPair[] = [\n\t\tnew ConnectionPositionPair(\n\t\t\t{ originX: 'start', originY: 'bottom' },\n\t\t\t{\n\t\t\t\toverlayX: 'start',\n\t\t\t\toverlayY: 'top',\n\t\t\t},\n\t\t\t-4,\n\t\t\t0,\n\t\t),\n\t\tnew ConnectionPositionPair(\n\t\t\t{ originX: 'start', originY: 'top' },\n\t\t\t{\n\t\t\t\toverlayX: 'start',\n\t\t\t\toverlayY: 'bottom',\n\t\t\t},\n\t\t\t-4,\n\t\t\t0,\n\t\t),\n\t];\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst ref = this.inputComponentRef();\n\t\t\t// Because ref appears only when opening the panel, we're going to call the impersonation opened hook too\n\t\t\tif (ref) {\n\t\t\t\tuntracked(() => {\n\t\t\t\t\tref.enableFilterPillMode?.();\n\t\t\t\t\tref.registerFilterPillClosePopover(this.closePopover);\n\t\t\t\t\tref.registerFilterPillUpdatePosition?.(this.updatePosition);\n\t\t\t\t\tref.onFilterPillOpened?.();\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tclosePopover = () => {\n\t\tthis.popoverRef()?.close();\n\t\tthis.inputComponentRef()?.onFilterPillClosed?.();\n\t};\n\n\tupdatePosition = () => {\n\t\tthis.popoverRef()?.updatePosition();\n\t};\n}\n","<button\n\ttype=\"button\"\n\tclass=\"impersonation-trigger\"\n\t[class.is-active]=\"isNotMe() && selectedUser()\"\n\t[luPopover2]=\"impersonationPopover\"\n\t[luPopoverNoCloseButton]=\"true\"\n\t[customPositions]=\"popoverPositions\"\n\t[luPopoverAnchor]=\"elementRef\"\n\t#popoverRef=\"luPopover2\"\n\t[attr.aria-expanded]=\"popoverRef.opened()\"\n\t(keydown.arrowDown)=\"$event.preventDefault(); popoverRef.openPopover(true)\"\n\t(keydown.arrowUp)=\"$event.preventDefault(); popoverRef.openPopover(true)\"\n>\n\t<span class=\"pr-u-mask\">{{ intl().switchProfile }}</span>\n\n\t@let user = selectedUser();\n\t@if (user) {\n\t\t<lu-user-picture aria-hidden=\"true\" [user]=\"user\" size=\"S\" softRounded />\n\t\t{{ user | luUserDisplay }}\n\t} @else {\n\t\t<lu-user-picture placeholder aria-hidden=\"true\" size=\"S\" softRounded />\n\t\t<div class=\"skeleton is-loading\" style=\"inline-size: 5.5rem\">\n\t\t\t<span class=\"skeleton-item\"></span>\n\t\t</div>\n\t}\n\t<span class=\"pr-u-mask\">{{ intl().a11yNavigationDescription }}</span>\n\t<lu-icon class=\"impersonation-trigger-icon\" icon=\"chevronBottom\" />\n</button>\n<lu-clear class=\"impersonation-clear\" (onClear)=\"clear.emit()\" [intl]=\"{ clear: intl().clear }\" />\n\n<ng-template #impersonationPopover>\n\t<div class=\"impersonation_popover-content popover-contentOptional\">\n\t\t<lu-simple-select\n\t\t\timpersonation\n\t\t\t[(ngModel)]=\"selectedUser\"\n\t\t\tusers\n\t\t\t[enableFormerEmployees]=\"enableFormerEmployees()\"\n\t\t\t[operationIds]=\"operationIds()\"\n\t\t\t[uniqueOperationIds]=\"uniqueOperationIds()\"\n\t\t\t[appInstanceId]=\"appInstanceId()\"\n\t\t\t#selectRef\n\t\t>\n\t\t\t<ng-container *luOption=\"let user; select: selectRef\">\n\t\t\t\t<div class=\"impersonation_popover-content-option\" [class.mod-me]=\"currentUserId === user.id\">\n\t\t\t\t\t<lu-user-picture aria-hidden=\"true\" [user]=\"user\" size=\"XS\" softRounded />\n\t\t\t\t\t<div>\n\t\t\t\t\t\t@if (currentUserId === user.id) {\n\t\t\t\t\t\t\t{{ intl().me }} <span translate=\"no\">{{ user | luUserDisplay }}</span>\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<span translate=\"no\">{{ user | luUserDisplay }}</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t<!-- Handle homonyms -->\n\t\t\t\t\t\t@if (user.additionalInformation) {\n\t\t\t\t\t\t\t<div class=\"option-additional\">\n\t\t\t\t\t\t\t\t{{ user.additionalInformation }}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\t\t</lu-simple-select>\n\t</div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵLU_CORE_SELECT_CURRENT_USER_ID"],"mappings":";;;;;;;;;;;;;;AAAO,MAAM,YAAY,GAAG;AAC3B,IAAA,OAAO,EAAE;AACR,QAAA,yBAAyB,EAAE,6EAA6E;AACxG,QAAA,aAAa,EAAE,mBAAmB;AAClC,QAAA,KAAK,EAAE,6BAA6B;AACpC,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,yBAAyB,EAAE,6EAA6E;AACxG,QAAA,aAAa,EAAE,mBAAmB;AAClC,QAAA,KAAK,EAAE,6BAA6B;AACpC,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,yBAAyB,EAAE,mFAAmF;AAC9G,QAAA,aAAa,EAAE,iBAAiB;AAChC,QAAA,KAAK,EAAE,8BAA8B;AACrC,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,yBAAyB,EAAE,mEAAmE;AAC9F,QAAA,aAAa,EAAE,qBAAqB;AACpC,QAAA,KAAK,EAAE,8BAA8B;AACrC,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,yBAAyB,EAAE,sEAAsE;AACjG,QAAA,aAAa,EAAE,iBAAiB;AAChC,QAAA,KAAK,EAAE,8BAA8B;AACrC,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,yBAAyB,EAAE,0EAA0E;AACrG,QAAA,aAAa,EAAE,oBAAoB;AACnC,QAAA,KAAK,EAAE,iCAAiC;AACxC,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,yBAAyB,EAAE,0EAA0E;AACrG,QAAA,aAAa,EAAE,kBAAkB;AACjC,QAAA,KAAK,EAAE,2BAA2B;AAClC,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,yBAAyB,EAAE,0DAA0D;AACrF,QAAA,aAAa,EAAE,iBAAiB;AAChC,QAAA,KAAK,EAAE,yBAAyB;AAChC,KAAA;CACD;;MCr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AAA,EAAA,KAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,eAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE/BjD;;AAEG;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i2 from '@angular/common';
|
|
2
2
|
import { Location } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { InjectionToken, Attribute, Directive, input, inject, Injector, ElementRef, effect, afterNextRender, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
4
|
+
import { InjectionToken, signal, linkedSignal, Attribute, Directive, input, inject, Injector, ElementRef, effect, afterNextRender, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
5
5
|
import * as i1 from '@angular/router';
|
|
6
6
|
import { RouterLink, Router, ActivatedRoute, UrlTree } from '@angular/router';
|
|
7
7
|
import { intlInputOptions, luBooleanAttribute } from '@lucca-front/ng/core';
|
|
@@ -38,12 +38,33 @@ const LU_LINK_TRANSLATIONS = new InjectionToken('luLinkTranslations', {
|
|
|
38
38
|
const luLinkTranslations = Translations;
|
|
39
39
|
|
|
40
40
|
class LuRouterLink extends RouterLink {
|
|
41
|
+
// Field initializers run after `super()`, so this still references the router-computed `linkedSignal` of `RouterLink`.
|
|
42
|
+
#routerHref;
|
|
41
43
|
// Workaround for a storybook bug = implement the constructor https://github.com/storybookjs/storybook/issues/23534#issuecomment-2042888436
|
|
42
44
|
constructor(router, route, tabIndexAttribute, renderer, el, locationStrategy) {
|
|
43
45
|
super(router, route, tabIndexAttribute, renderer, el, locationStrategy);
|
|
46
|
+
/**
|
|
47
|
+
* Href forced by `luLink` (raw `href`, external or disabled link). `undefined` lets the router compute it.
|
|
48
|
+
*/
|
|
49
|
+
this.hrefOverride = signal(undefined, /* @ts-ignore */
|
|
50
|
+
...(ngDevMode ? [{ debugName: "hrefOverride" }] : /* istanbul ignore next */ []));
|
|
51
|
+
// Field initializers run after `super()`, so this still references the router-computed `linkedSignal` of `RouterLink`.
|
|
52
|
+
this.#routerHref = this.reactiveHref;
|
|
53
|
+
// Since Angular 22, `reactiveHref` is a `linkedSignal` recomputed on every navigation, which wipes any value written with `set()`.
|
|
54
|
+
// Deriving it from `hrefOverride` keeps the forced href across navigations.
|
|
55
|
+
this.reactiveHref = linkedSignal(() => {
|
|
56
|
+
const hrefOverride = this.hrefOverride();
|
|
57
|
+
return hrefOverride === undefined ? this.#routerHref() : hrefOverride;
|
|
58
|
+
}, /* @ts-ignore */
|
|
59
|
+
...(ngDevMode ? [{ debugName: "reactiveHref" }] : /* istanbul ignore next */ []));
|
|
60
|
+
/**
|
|
61
|
+
* Href bound to the host element: `hrefOverride` when set, the router-computed href otherwise.
|
|
62
|
+
*/
|
|
63
|
+
this.resolvedHref = this.reactiveHref.asReadonly();
|
|
44
64
|
}
|
|
45
|
-
|
|
46
|
-
|
|
65
|
+
/**
|
|
66
|
+
* @deprecated a value written with `set()` is wiped on every navigation, use `hrefOverride` to force the href and `resolvedHref` to read it instead
|
|
67
|
+
*/
|
|
47
68
|
get publicReactiveHref() {
|
|
48
69
|
return this.reactiveHref;
|
|
49
70
|
}
|
|
@@ -107,16 +128,17 @@ class LinkComponent {
|
|
|
107
128
|
effect(() => {
|
|
108
129
|
if (href()) {
|
|
109
130
|
this.hrefBackup = href();
|
|
110
|
-
this.routerLink.
|
|
131
|
+
this.routerLink.hrefOverride.set(this.hrefBackup);
|
|
111
132
|
}
|
|
112
133
|
if (this.disabled()) {
|
|
113
134
|
if (this.routerLinkCommands()) {
|
|
114
135
|
this.routerLink.routerLink = null;
|
|
115
136
|
}
|
|
116
|
-
this.routerLink.
|
|
137
|
+
this.routerLink.hrefOverride.set(null);
|
|
117
138
|
}
|
|
118
139
|
else if (this.routerLinkCommands() && !this.external()) {
|
|
119
140
|
this.routerLink.routerLink = this.routerLinkCommands();
|
|
141
|
+
this.routerLink.hrefOverride.set(undefined);
|
|
120
142
|
// We need to do this in order to have `routerLink` update the value for `href`:
|
|
121
143
|
// See https://github.com/angular/angular/blob/main/packages/router/src/directives/router_link.ts#L281
|
|
122
144
|
this.routerLink.ngOnChanges({});
|
|
@@ -125,10 +147,12 @@ class LinkComponent {
|
|
|
125
147
|
// External router links must not wire up the `RouterLink` directive (it would navigate in-place),
|
|
126
148
|
// but they still need an `href` so the anchor is keyboard-focusable and its destination is previewable.
|
|
127
149
|
// Actual navigation is handled natively by `target="_blank"` (anchors) or by `redirect()` (buttons).
|
|
128
|
-
|
|
150
|
+
// Commands set while the link was internal are cleared, otherwise `RouterLink` keeps intercepting the click.
|
|
151
|
+
this.routerLink.routerLink = null;
|
|
152
|
+
this.routerLink.hrefOverride.set(this.#serializeExternalUrl());
|
|
129
153
|
}
|
|
130
154
|
else if (!href() && this.hrefBackup) {
|
|
131
|
-
this.routerLink.
|
|
155
|
+
this.routerLink.hrefOverride.set(this.hrefBackup);
|
|
132
156
|
}
|
|
133
157
|
});
|
|
134
158
|
}
|
|
@@ -166,13 +190,13 @@ class LinkComponent {
|
|
|
166
190
|
return this.location.prepareExternalUrl(serializedUrl);
|
|
167
191
|
}
|
|
168
192
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: LinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
169
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: LinkComponent, isStandalone: true, selector: "a[luLink], button[luLink]", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null }, luHref: { classPropertyName: "luHref", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, routerLinkCommands: { classPropertyName: "routerLinkCommands", publicName: "luLink", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, decorationHover: { classPropertyName: "decorationHover", publicName: "decorationHover", isSignal: true, isRequired: false, transformFunction: null }, external: { classPropertyName: "external", publicName: "external", isSignal: true, isRequired: false, transformFunction: null }, hiddenIcon: { classPropertyName: "hiddenIcon", publicName: "hiddenIcon", isSignal: true, isRequired: false, transformFunction: null }, neutral: { classPropertyName: "neutral", publicName: "neutral", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "redirect()" }, properties: { "attr.href": "routerLink.
|
|
193
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: LinkComponent, isStandalone: true, selector: "a[luLink], button[luLink]", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null }, luHref: { classPropertyName: "luHref", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, routerLinkCommands: { classPropertyName: "routerLinkCommands", publicName: "luLink", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, decorationHover: { classPropertyName: "decorationHover", publicName: "decorationHover", isSignal: true, isRequired: false, transformFunction: null }, external: { classPropertyName: "external", publicName: "external", isSignal: true, isRequired: false, transformFunction: null }, hiddenIcon: { classPropertyName: "hiddenIcon", publicName: "hiddenIcon", isSignal: true, isRequired: false, transformFunction: null }, neutral: { classPropertyName: "neutral", publicName: "neutral", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "redirect()" }, properties: { "attr.href": "routerLink.resolvedHref()", "class.mod-decorationHover": "decorationHover()", "class.mod-icon": "external()", "class.mod-neutral": "neutral()", "class.mod-hiddenIcon": "hiddenIcon() || (this.insideIndexTable && external()) || (this.insideDataTable && external())", "class.is-disabled": "this.disabled()", "attr.rel": "external() && !disabled() ? \"noopener noreferrer\" : null", "attr.target": "external() && !disabled() ? \"_blank\" : null", "attr.role": "disabled() ? \"presentation\" : null" }, classAttribute: "link" }, hostDirectives: [{ directive: LuRouterLink, inputs: ["preserveFragment", "preserveFragment", "skipLocationChange", "skipLocationChange", "replaceUrl", "replaceUrl", "queryParams", "queryParams", "fragment", "fragment", "queryParamsHandling", "queryParamsHandling", "state", "state", "info", "info", "relativeTo", "relativeTo"] }], ngImport: i0, template: "<span class=\"link-text\"><ng-content /></span>\n@if (external()) {\n\t<span class=\"link-icon\">\n\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-arrowExternal\"></span>\n\t</span>\n\t<span class=\"pr-u-mask\">{{ intl().external }}</span>\n}\n", styles: ["@charset \"UTF-8\";@layer components{.link{--components-link-textDecoration: underline;--components-link-text-textDecoration: underline;--components-link-color: var(--commons-text-link-color);--components-link-color-hover: var(--commons-text-link-hover);--components-link-cursor: pointer;--components-link-icon-marginInlineStart: 0;--components-link-icon-opacity: 1;background-color:transparent;color:var(--components-link-color);cursor:var(--components-link-cursor);font-family:inherit;border:0;margin:0;padding:0;text-decoration:var(--components-link-textDecoration)}.link:not(:disabled,.is-disabled):hover{color:var(--components-link-color-hover)}.link:not(:disabled,.is-disabled):focus-visible{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:2px;border-radius:var(--pr-t-border-radius-small)}.link .lucca-icon{text-decoration:none;font-size:1em;vertical-align:baseline;position:relative;inset-block-start:.075rem;margin-inline-start:var(--components-link-icon-marginInlineStart)}.link .link-text{text-decoration:var(--components-link-text-textDecoration)}.link-icon{white-space:nowrap;opacity:var(--components-link-icon-opacity);transition-property:opacity;transition-duration:var(--commons-animations-durations-fast)}.link-icon:before{content:\"\\a0\"/\"\"}}@layer mods{.link.mod-decorationHover{--components-link-textDecoration: none;--components-link-text-textDecoration: none}.link.mod-decorationHover:hover{--components-link-text-textDecoration: underline}.link.mod-decorationHover:hover:not(:has(.link-text)){--components-link-textDecoration: underline}.link.mod-neutral{--components-link-color: var(--pr-t-color-text);--components-link-color-hover: var(--palettes-neutral-900)}@media not (any-pointer:coarse){.link.mod-hiddenIcon:not(:hover,:focus-visible){--components-link-icon-opacity: 0}}.link:is(:disabled,.is-disabled){--components-link-color: var(--pr-t-color-text-disabled);--components-link-cursor: not-allowed}.link:has(.link-text){--components-link-textDecoration: none}.link:not(:has(.link-icon)){--components-link-icon-marginInlineStart: .2em}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
170
194
|
}
|
|
171
195
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: LinkComponent, decorators: [{
|
|
172
196
|
type: Component,
|
|
173
197
|
args: [{ selector: 'a[luLink], button[luLink]', standalone: true, encapsulation: ViewEncapsulation.None, host: {
|
|
174
198
|
class: 'link',
|
|
175
|
-
'[attr.href]': 'routerLink.
|
|
199
|
+
'[attr.href]': 'routerLink.resolvedHref()',
|
|
176
200
|
'[class.mod-decorationHover]': 'decorationHover()',
|
|
177
201
|
'[class.mod-icon]': 'external()',
|
|
178
202
|
'[class.mod-neutral]': 'neutral()',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-link.mjs","sources":["../../../packages/ng/link/translations.ts","../../../packages/ng/link/link.translate.ts","../../../packages/ng/link/lu-router-link.ts","../../../packages/ng/link/link.component.ts","../../../packages/ng/link/link.component.html","../../../packages/ng/link/link.token.ts","../../../packages/ng/link/lucca-front-ng-link.ts"],"sourcesContent":["export const Translations = {\n\ten: {\n\t\texternal: '(Open in a new window.)',\n\t},\n\tde: {\n\t\texternal: '(In einem neuen Fenster öffnen.)',\n\t},\n\tfr: {\n\t\texternal: '(Ouvrir dans une nouvelle fenêtre.)',\n\t},\n\tit: {\n\t\texternal: '(Aprire in una nuova finestra.)',\n\t},\n\tnl: {\n\t\texternal: '(Open in een nieuw venster.)',\n\t},\n\tes: {\n\t\texternal: '(Abrir en una nueva ventana.)',\n\t},\n\tpt: {\n\t\texternal: '(Abrir numa nova janela.)',\n\t},\n};\n","import { InjectionToken } from '@angular/core';\nimport { LuTranslation } from '@lucca-front/ng/core';\nimport { Translations } from './translations';\n\nexport const LU_LINK_TRANSLATIONS = new InjectionToken('luLinkTranslations', {\n\tfactory: () => luLinkTranslations,\n});\n\nexport interface LinkTranslate {\n\texternal: string;\n}\n\nexport const luLinkTranslations: LuTranslation<LinkTranslate> = Translations;\n","import { LocationStrategy } from '@angular/common';\nimport { Attribute, Directive, ElementRef, Renderer2, WritableSignal } from '@angular/core';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\n\n@Directive({\n\tselector: '[luRouterLink]',\n})\nexport class LuRouterLink extends RouterLink {\n\t// Workaround for a storybook bug = implement the constructor https://github.com/storybookjs/storybook/issues/23534#issuecomment-2042888436\n\tconstructor(router: Router, route: ActivatedRoute, @Attribute('tabindex') tabIndexAttribute: string | null | undefined, renderer: Renderer2, el: ElementRef, locationStrategy?: LocationStrategy) {\n\t\tsuper(router, route, tabIndexAttribute, renderer, el, locationStrategy);\n\t}\n\n\t// With angular 20, RouterLink changed to use an internal, protected, readonly signal that is directly bound to `attr.href`, breaking any possibility to override it\n\t// So we had to do this to expose it to our `luLink` component.\n\tget publicReactiveHref(): WritableSignal<string | null> {\n\t\treturn this.reactiveHref;\n\t}\n}\n","import { Location } from '@angular/common';\nimport { afterNextRender, ChangeDetectionStrategy, Component, effect, ElementRef, inject, Injector, input, ViewEncapsulation } from '@angular/core';\nimport { ActivatedRoute, Router, UrlTree } from '@angular/router';\nimport { intlInputOptions, luBooleanAttribute } from '@lucca-front/ng/core';\nimport { LU_INDEX_TABLE_INSTANCE } from '@lucca-front/ng/index-table';\n\nimport { LU_DATA_TABLE_INSTANCE } from '@lucca-front/ng/data-table';\nimport { LU_LINK_TRANSLATIONS } from './link.translate';\nimport { LuRouterLink } from './lu-router-link';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'a[luLink], button[luLink]',\n\tstandalone: true,\n\ttemplateUrl: './link.component.html',\n\tstyleUrl: './link.component.scss',\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'link',\n\t\t'[attr.href]': 'routerLink.publicReactiveHref()',\n\t\t'[class.mod-decorationHover]': 'decorationHover()',\n\t\t'[class.mod-icon]': 'external()',\n\t\t'[class.mod-neutral]': 'neutral()',\n\t\t'[class.mod-hiddenIcon]': 'hiddenIcon() || (this.insideIndexTable && external()) || (this.insideDataTable && external())',\n\t\t'[class.is-disabled]': 'this.disabled()',\n\t\t'[attr.rel]': 'external() && !disabled() ? \"noopener noreferrer\" : null',\n\t\t'[attr.target]': 'external() && !disabled() ? \"_blank\" : null',\n\t\t'[attr.role]': 'disabled() ? \"presentation\" : null',\n\t\t'(click)': 'redirect()',\n\t},\n\thostDirectives: [\n\t\t{\n\t\t\tdirective: LuRouterLink,\n\t\t\tinputs: ['preserveFragment', 'skipLocationChange', 'replaceUrl', 'queryParams', 'fragment', 'queryParamsHandling', 'state', 'info', 'relativeTo'],\n\t\t},\n\t],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LinkComponent {\n\treadonly intl = input(...intlInputOptions(LU_LINK_TRANSLATIONS));\n\treadonly routerLink = inject(LuRouterLink);\n\t#injector = inject(Injector);\n\t#elementRef = inject(ElementRef);\n\treadonly router = inject(Router);\n\treadonly location = inject(Location);\n\treadonly #activatedRoute = inject(ActivatedRoute, { optional: true });\n\treadonly insideIndexTable = inject(LU_INDEX_TABLE_INSTANCE, { optional: true });\n\treadonly insideDataTable = inject(LU_DATA_TABLE_INSTANCE, { optional: true });\n\n\t/**\n\t * Target page address. Use only for external links or pages not recognized by the router.\n\t */\n\treadonly luHref = input('', { alias: 'href' });\n\n\t/**\n\t * Target page address\n\t */\n\treadonly routerLinkCommands = input<LuRouterLink['routerLink'] | null>(null, { alias: 'luLink' });\n\n\t/**\n\t * Disables the link\n\t */\n\treadonly disabled = input(false, { transform: luBooleanAttribute });\n\n\t/**\n\t * Underlines the link only on hover\n\t */\n\treadonly decorationHover = input(false, { transform: luBooleanAttribute });\n\n\t/**\n\t * Indicates that the link will open in a new tab\n\t */\n\treadonly external = input(false, { transform: luBooleanAttribute });\n\n\t/**\n\t * External icon only visible on hover/focus\n\t */\n\treadonly hiddenIcon = input(false, { transform: luBooleanAttribute });\n\n\t/**\n\t * Renders the link with the default text color instead of the link color\n\t */\n\treadonly neutral = input(false, { transform: luBooleanAttribute });\n\n\threfBackup: string;\n\n\tconstructor() {\n\t\tconst href = this.luHref;\n\n\t\teffect(() => {\n\t\t\tif (href()) {\n\t\t\t\tthis.hrefBackup = href();\n\t\t\t\tthis.routerLink.publicReactiveHref.set(this.hrefBackup);\n\t\t\t}\n\t\t\tif (this.disabled()) {\n\t\t\t\tif (this.routerLinkCommands()) {\n\t\t\t\t\tthis.routerLink.routerLink = null;\n\t\t\t\t}\n\t\t\t\tthis.routerLink.publicReactiveHref.set(null);\n\t\t\t} else if (this.routerLinkCommands() && !this.external()) {\n\t\t\t\tthis.routerLink.routerLink = this.routerLinkCommands();\n\t\t\t\t// We need to do this in order to have `routerLink` update the value for `href`:\n\t\t\t\t// See https://github.com/angular/angular/blob/main/packages/router/src/directives/router_link.ts#L281\n\t\t\t\tthis.routerLink.ngOnChanges({});\n\t\t\t} else if (this.routerLinkCommands() && this.external()) {\n\t\t\t\t// External router links must not wire up the `RouterLink` directive (it would navigate in-place),\n\t\t\t\t// but they still need an `href` so the anchor is keyboard-focusable and its destination is previewable.\n\t\t\t\t// Actual navigation is handled natively by `target=\"_blank\"` (anchors) or by `redirect()` (buttons).\n\t\t\t\tthis.routerLink.publicReactiveHref.set(this.#serializeExternalUrl());\n\t\t\t} else if (!href() && this.hrefBackup) {\n\t\t\t\tthis.routerLink.publicReactiveHref.set(this.hrefBackup);\n\t\t\t}\n\t\t});\n\t}\n\n\tredirect(): void {\n\t\t// Anchors carry an `href` with `target=\"_blank\"`, so the browser opens the new tab natively.\n\t\t// Only non-anchor hosts (e.g. `button[luLink]`) need us to open the window programmatically.\n\t\tif (!this.disabled() && this.routerLinkCommands() && this.external() && !this.#isAnchor()) {\n\t\t\tconst externalUrl = this.#serializeExternalUrl();\n\t\t\tafterNextRender(() => window.open(externalUrl ?? undefined, '_blank'), { injector: this.#injector });\n\t\t}\n\t}\n\n\t#isAnchor(): boolean {\n\t\treturn (this.#elementRef.nativeElement as HTMLElement).tagName === 'A';\n\t}\n\n\t#serializeExternalUrl(): string | null {\n\t\tconst routerLinkCommands = this.routerLinkCommands();\n\t\tif (!routerLinkCommands) {\n\t\t\treturn null;\n\t\t}\n\t\tconst urlTree =\n\t\t\trouterLinkCommands instanceof UrlTree\n\t\t\t\t? routerLinkCommands\n\t\t\t\t: this.router.createUrlTree(Array.isArray(routerLinkCommands) ? routerLinkCommands : [routerLinkCommands], {\n\t\t\t\t\t\t// Resolve relative commands against the current route, like Angular's `RouterLink` does.\n\t\t\t\t\t\t// An explicit `relativeTo` wins, including `null` which means \"resolve from the root\";\n\t\t\t\t\t\t// only `undefined` falls back to the injected `ActivatedRoute`.\n\t\t\t\t\t\trelativeTo: this.routerLink.relativeTo === undefined ? this.#activatedRoute : this.routerLink.relativeTo,\n\t\t\t\t\t\tqueryParams: this.routerLink.queryParams,\n\t\t\t\t\t\tfragment: this.routerLink.fragment,\n\t\t\t\t\t\tqueryParamsHandling: this.routerLink.queryParamsHandling,\n\t\t\t\t\t\tpreserveFragment: this.routerLink.preserveFragment,\n\t\t\t\t\t});\n\t\tconst serializedUrl = this.router.serializeUrl(urlTree);\n\t\t// Apply the app's baseHref regardless of the commands' shape (string, array or `UrlTree`):\n\t\t// they all describe an internal route, so the serialized URL must carry the baseHref.\n\t\treturn this.location.prepareExternalUrl(serializedUrl);\n\t}\n}\n","<span class=\"link-text\"><ng-content /></span>\n@if (external()) {\n\t<span class=\"link-icon\">\n\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-arrowExternal\"></span>\n\t</span>\n\t<span class=\"pr-u-mask\">{{ intl().external }}</span>\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const LU_LINK_INSTANCE = new InjectionToken<boolean>('LU_LINK_INSTANCE');\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAAO,MAAM,YAAY,GAAG;AAC3B,IAAA,EAAE,EAAE;AACH,QAAA,QAAQ,EAAE,yBAAyB;AACnC,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,QAAQ,EAAE,kCAAkC;AAC5C,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,QAAQ,EAAE,qCAAqC;AAC/C,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,QAAQ,EAAE,iCAAiC;AAC3C,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,QAAQ,EAAE,8BAA8B;AACxC,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,QAAQ,EAAE,+BAA+B;AACzC,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,QAAQ,EAAE,2BAA2B;AACrC,KAAA;CACD;;MClBY,oBAAoB,GAAG,IAAI,cAAc,CAAC,oBAAoB,EAAE;AAC5E,IAAA,OAAO,EAAE,MAAM,kBAAkB;AACjC,CAAA;AAMM,MAAM,kBAAkB,GAAiC;;ACL1D,MAAO,YAAa,SAAQ,UAAU,CAAA;;IAE3C,WAAA,CAAY,MAAc,EAAE,KAAqB,EAAyB,iBAA4C,EAAE,QAAmB,EAAE,EAAc,EAAE,gBAAmC,EAAA;AAC/L,QAAA,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,EAAE,EAAE,gBAAgB,CAAC;IACxE;;;AAIA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EAAA,CAAA,0jEAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FD+Ba,aAAa,EAAA,UAAA,EAAA,CAAA;kBA5BzB,SAAS;AAEC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,2BAA2B,cACzB,IAAI,EAAA,aAAA,EAGD,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACL,wBAAA,KAAK,EAAE,MAAM;AACb,wBAAA,aAAa,EAAE,iCAAiC;AAChD,wBAAA,6BAA6B,EAAE,mBAAmB;AAClD,wBAAA,kBAAkB,EAAE,YAAY;AAChC,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,wBAAwB,EAAE,+FAA+F;AACzH,wBAAA,qBAAqB,EAAE,iBAAiB;AACxC,wBAAA,YAAY,EAAE,0DAA0D;AACxE,wBAAA,eAAe,EAAE,6CAA6C;AAC9D,wBAAA,aAAa,EAAE,oCAAoC;AACnD,wBAAA,SAAS,EAAE,YAAY;qBACvB,EAAA,cAAA,EACe;AACf,wBAAA;AACC,4BAAA,SAAS,EAAE,YAAY;AACvB,4BAAA,MAAM,EAAE,CAAC,kBAAkB,EAAE,oBAAoB,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC;AACjJ,yBAAA;qBACD,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6PAAA,EAAA,MAAA,EAAA,CAAA,0jEAAA,CAAA,EAAA;;;MElCnC,gBAAgB,GAAG,IAAI,cAAc,CAAU,kBAAkB;;ACF9E;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-link.mjs","sources":["../../../packages/ng/link/translations.ts","../../../packages/ng/link/link.translate.ts","../../../packages/ng/link/lu-router-link.ts","../../../packages/ng/link/link.component.ts","../../../packages/ng/link/link.component.html","../../../packages/ng/link/link.token.ts","../../../packages/ng/link/lucca-front-ng-link.ts"],"sourcesContent":["export const Translations = {\n\ten: {\n\t\texternal: '(Open in a new window.)',\n\t},\n\tde: {\n\t\texternal: '(In einem neuen Fenster öffnen.)',\n\t},\n\tfr: {\n\t\texternal: '(Ouvrir dans une nouvelle fenêtre.)',\n\t},\n\tit: {\n\t\texternal: '(Aprire in una nuova finestra.)',\n\t},\n\tnl: {\n\t\texternal: '(Open in een nieuw venster.)',\n\t},\n\tes: {\n\t\texternal: '(Abrir en una nueva ventana.)',\n\t},\n\tpt: {\n\t\texternal: '(Abrir numa nova janela.)',\n\t},\n};\n","import { InjectionToken } from '@angular/core';\nimport { LuTranslation } from '@lucca-front/ng/core';\nimport { Translations } from './translations';\n\nexport const LU_LINK_TRANSLATIONS = new InjectionToken('luLinkTranslations', {\n\tfactory: () => luLinkTranslations,\n});\n\nexport interface LinkTranslate {\n\texternal: string;\n}\n\nexport const luLinkTranslations: LuTranslation<LinkTranslate> = Translations;\n","import { LocationStrategy } from '@angular/common';\nimport { Attribute, Directive, ElementRef, linkedSignal, Renderer2, signal, WritableSignal } from '@angular/core';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\n\n@Directive({\n\tselector: '[luRouterLink]',\n})\nexport class LuRouterLink extends RouterLink {\n\t/**\n\t * Href forced by `luLink` (raw `href`, external or disabled link). `undefined` lets the router compute it.\n\t */\n\treadonly hrefOverride = signal<string | null | undefined>(undefined);\n\n\t// Field initializers run after `super()`, so this still references the router-computed `linkedSignal` of `RouterLink`.\n\treadonly #routerHref: WritableSignal<string | null> = this.reactiveHref;\n\n\t// Since Angular 22, `reactiveHref` is a `linkedSignal` recomputed on every navigation, which wipes any value written with `set()`.\n\t// Deriving it from `hrefOverride` keeps the forced href across navigations.\n\tprotected override readonly reactiveHref = linkedSignal<string | null>(() => {\n\t\tconst hrefOverride = this.hrefOverride();\n\t\treturn hrefOverride === undefined ? this.#routerHref() : hrefOverride;\n\t});\n\n\t/**\n\t * Href bound to the host element: `hrefOverride` when set, the router-computed href otherwise.\n\t */\n\treadonly resolvedHref = this.reactiveHref.asReadonly();\n\n\t// Workaround for a storybook bug = implement the constructor https://github.com/storybookjs/storybook/issues/23534#issuecomment-2042888436\n\tconstructor(router: Router, route: ActivatedRoute, @Attribute('tabindex') tabIndexAttribute: string | null | undefined, renderer: Renderer2, el: ElementRef, locationStrategy?: LocationStrategy) {\n\t\tsuper(router, route, tabIndexAttribute, renderer, el, locationStrategy);\n\t}\n\n\t/**\n\t * @deprecated a value written with `set()` is wiped on every navigation, use `hrefOverride` to force the href and `resolvedHref` to read it instead\n\t */\n\tget publicReactiveHref(): WritableSignal<string | null> {\n\t\treturn this.reactiveHref;\n\t}\n}\n","import { Location } from '@angular/common';\nimport { afterNextRender, ChangeDetectionStrategy, Component, effect, ElementRef, inject, Injector, input, ViewEncapsulation } from '@angular/core';\nimport { ActivatedRoute, Router, UrlTree } from '@angular/router';\nimport { intlInputOptions, luBooleanAttribute } from '@lucca-front/ng/core';\nimport { LU_INDEX_TABLE_INSTANCE } from '@lucca-front/ng/index-table';\n\nimport { LU_DATA_TABLE_INSTANCE } from '@lucca-front/ng/data-table';\nimport { LU_LINK_TRANSLATIONS } from './link.translate';\nimport { LuRouterLink } from './lu-router-link';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'a[luLink], button[luLink]',\n\tstandalone: true,\n\ttemplateUrl: './link.component.html',\n\tstyleUrl: './link.component.scss',\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'link',\n\t\t'[attr.href]': 'routerLink.resolvedHref()',\n\t\t'[class.mod-decorationHover]': 'decorationHover()',\n\t\t'[class.mod-icon]': 'external()',\n\t\t'[class.mod-neutral]': 'neutral()',\n\t\t'[class.mod-hiddenIcon]': 'hiddenIcon() || (this.insideIndexTable && external()) || (this.insideDataTable && external())',\n\t\t'[class.is-disabled]': 'this.disabled()',\n\t\t'[attr.rel]': 'external() && !disabled() ? \"noopener noreferrer\" : null',\n\t\t'[attr.target]': 'external() && !disabled() ? \"_blank\" : null',\n\t\t'[attr.role]': 'disabled() ? \"presentation\" : null',\n\t\t'(click)': 'redirect()',\n\t},\n\thostDirectives: [\n\t\t{\n\t\t\tdirective: LuRouterLink,\n\t\t\tinputs: ['preserveFragment', 'skipLocationChange', 'replaceUrl', 'queryParams', 'fragment', 'queryParamsHandling', 'state', 'info', 'relativeTo'],\n\t\t},\n\t],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LinkComponent {\n\treadonly intl = input(...intlInputOptions(LU_LINK_TRANSLATIONS));\n\treadonly routerLink = inject(LuRouterLink);\n\t#injector = inject(Injector);\n\t#elementRef = inject(ElementRef);\n\treadonly router = inject(Router);\n\treadonly location = inject(Location);\n\treadonly #activatedRoute = inject(ActivatedRoute, { optional: true });\n\treadonly insideIndexTable = inject(LU_INDEX_TABLE_INSTANCE, { optional: true });\n\treadonly insideDataTable = inject(LU_DATA_TABLE_INSTANCE, { optional: true });\n\n\t/**\n\t * Target page address. Use only for external links or pages not recognized by the router.\n\t */\n\treadonly luHref = input('', { alias: 'href' });\n\n\t/**\n\t * Target page address\n\t */\n\treadonly routerLinkCommands = input<LuRouterLink['routerLink'] | null>(null, { alias: 'luLink' });\n\n\t/**\n\t * Disables the link\n\t */\n\treadonly disabled = input(false, { transform: luBooleanAttribute });\n\n\t/**\n\t * Underlines the link only on hover\n\t */\n\treadonly decorationHover = input(false, { transform: luBooleanAttribute });\n\n\t/**\n\t * Indicates that the link will open in a new tab\n\t */\n\treadonly external = input(false, { transform: luBooleanAttribute });\n\n\t/**\n\t * External icon only visible on hover/focus\n\t */\n\treadonly hiddenIcon = input(false, { transform: luBooleanAttribute });\n\n\t/**\n\t * Renders the link with the default text color instead of the link color\n\t */\n\treadonly neutral = input(false, { transform: luBooleanAttribute });\n\n\threfBackup: string;\n\n\tconstructor() {\n\t\tconst href = this.luHref;\n\n\t\teffect(() => {\n\t\t\tif (href()) {\n\t\t\t\tthis.hrefBackup = href();\n\t\t\t\tthis.routerLink.hrefOverride.set(this.hrefBackup);\n\t\t\t}\n\t\t\tif (this.disabled()) {\n\t\t\t\tif (this.routerLinkCommands()) {\n\t\t\t\t\tthis.routerLink.routerLink = null;\n\t\t\t\t}\n\t\t\t\tthis.routerLink.hrefOverride.set(null);\n\t\t\t} else if (this.routerLinkCommands() && !this.external()) {\n\t\t\t\tthis.routerLink.routerLink = this.routerLinkCommands();\n\t\t\t\tthis.routerLink.hrefOverride.set(undefined);\n\t\t\t\t// We need to do this in order to have `routerLink` update the value for `href`:\n\t\t\t\t// See https://github.com/angular/angular/blob/main/packages/router/src/directives/router_link.ts#L281\n\t\t\t\tthis.routerLink.ngOnChanges({});\n\t\t\t} else if (this.routerLinkCommands() && this.external()) {\n\t\t\t\t// External router links must not wire up the `RouterLink` directive (it would navigate in-place),\n\t\t\t\t// but they still need an `href` so the anchor is keyboard-focusable and its destination is previewable.\n\t\t\t\t// Actual navigation is handled natively by `target=\"_blank\"` (anchors) or by `redirect()` (buttons).\n\t\t\t\t// Commands set while the link was internal are cleared, otherwise `RouterLink` keeps intercepting the click.\n\t\t\t\tthis.routerLink.routerLink = null;\n\t\t\t\tthis.routerLink.hrefOverride.set(this.#serializeExternalUrl());\n\t\t\t} else if (!href() && this.hrefBackup) {\n\t\t\t\tthis.routerLink.hrefOverride.set(this.hrefBackup);\n\t\t\t}\n\t\t});\n\t}\n\n\tredirect(): void {\n\t\t// Anchors carry an `href` with `target=\"_blank\"`, so the browser opens the new tab natively.\n\t\t// Only non-anchor hosts (e.g. `button[luLink]`) need us to open the window programmatically.\n\t\tif (!this.disabled() && this.routerLinkCommands() && this.external() && !this.#isAnchor()) {\n\t\t\tconst externalUrl = this.#serializeExternalUrl();\n\t\t\tafterNextRender(() => window.open(externalUrl ?? undefined, '_blank'), { injector: this.#injector });\n\t\t}\n\t}\n\n\t#isAnchor(): boolean {\n\t\treturn (this.#elementRef.nativeElement as HTMLElement).tagName === 'A';\n\t}\n\n\t#serializeExternalUrl(): string | null {\n\t\tconst routerLinkCommands = this.routerLinkCommands();\n\t\tif (!routerLinkCommands) {\n\t\t\treturn null;\n\t\t}\n\t\tconst urlTree =\n\t\t\trouterLinkCommands instanceof UrlTree\n\t\t\t\t? routerLinkCommands\n\t\t\t\t: this.router.createUrlTree(Array.isArray(routerLinkCommands) ? routerLinkCommands : [routerLinkCommands], {\n\t\t\t\t\t\t// Resolve relative commands against the current route, like Angular's `RouterLink` does.\n\t\t\t\t\t\t// An explicit `relativeTo` wins, including `null` which means \"resolve from the root\";\n\t\t\t\t\t\t// only `undefined` falls back to the injected `ActivatedRoute`.\n\t\t\t\t\t\trelativeTo: this.routerLink.relativeTo === undefined ? this.#activatedRoute : this.routerLink.relativeTo,\n\t\t\t\t\t\tqueryParams: this.routerLink.queryParams,\n\t\t\t\t\t\tfragment: this.routerLink.fragment,\n\t\t\t\t\t\tqueryParamsHandling: this.routerLink.queryParamsHandling,\n\t\t\t\t\t\tpreserveFragment: this.routerLink.preserveFragment,\n\t\t\t\t\t});\n\t\tconst serializedUrl = this.router.serializeUrl(urlTree);\n\t\t// Apply the app's baseHref regardless of the commands' shape (string, array or `UrlTree`):\n\t\t// they all describe an internal route, so the serialized URL must carry the baseHref.\n\t\treturn this.location.prepareExternalUrl(serializedUrl);\n\t}\n}\n","<span class=\"link-text\"><ng-content /></span>\n@if (external()) {\n\t<span class=\"link-icon\">\n\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-arrowExternal\"></span>\n\t</span>\n\t<span class=\"pr-u-mask\">{{ intl().external }}</span>\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const LU_LINK_INSTANCE = new InjectionToken<boolean>('LU_LINK_INSTANCE');\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAAO,MAAM,YAAY,GAAG;AAC3B,IAAA,EAA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EAAA;;;MElCnC,gBAAgB,GAAG,IAAI,cAAc,CAAU,kBAAkB;;ACF9E;;AAEG;;"}
|
|
@@ -17,14 +17,14 @@ class ListingItemComponent {
|
|
|
17
17
|
this.critical = input(false, { ...(ngDevMode ? { debugName: "critical" } : /* istanbul ignore next */ {}), transform: luBooleanAttribute });
|
|
18
18
|
}
|
|
19
19
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ListingItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
20
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: ListingItemComponent, isStandalone: true, selector: "lu-listing-item", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, critical: { classPropertyName: "critical", publicName: "critical", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "listitem" }, classAttribute: "listing-item" }, ngImport: i0, template: "@if (listingRef.orderedFancy()) {\n\t<div class=\"listing-item-number\" aria-hidden=\"true\"></div>\n}\n@if (listingRef.checklist() || listingRef.icons()) {\n\t@if (critical()) {\n\t\t<lu-icon class=\"listing-item-icon palette-critical\"
|
|
20
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: ListingItemComponent, isStandalone: true, selector: "lu-listing-item", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, critical: { classPropertyName: "critical", publicName: "critical", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "listitem" }, classAttribute: "listing-item" }, ngImport: i0, template: "@if (listingRef.orderedFancy()) {\n\t<div class=\"listing-item-number\" aria-hidden=\"true\"></div>\n}\n@if (listingRef.checklist() || listingRef.icons()) {\n\t@if (critical()) {\n\t\t<lu-icon class=\"listing-item-icon palette-critical\" icon=\"signClose\" />\n\t} @else {\n\t\t<lu-icon class=\"listing-item-icon\" [icon]=\"icon() || listingRef.defaultIcon()\" />\n\t}\n}\n<div class=\"listing-item-content\">\n\t<ng-content />\n</div>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "lu-icon, pr-icon", inputs: ["icon", "alt", "size", "color", "AI"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
21
21
|
}
|
|
22
22
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ListingItemComponent, decorators: [{
|
|
23
23
|
type: Component,
|
|
24
24
|
args: [{ selector: 'lu-listing-item', imports: [IconComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
25
25
|
class: 'listing-item',
|
|
26
26
|
role: 'listitem',
|
|
27
|
-
}, template: "@if (listingRef.orderedFancy()) {\n\t<div class=\"listing-item-number\" aria-hidden=\"true\"></div>\n}\n@if (listingRef.checklist() || listingRef.icons()) {\n\t@if (critical()) {\n\t\t<lu-icon class=\"listing-item-icon palette-critical\"
|
|
27
|
+
}, template: "@if (listingRef.orderedFancy()) {\n\t<div class=\"listing-item-number\" aria-hidden=\"true\"></div>\n}\n@if (listingRef.checklist() || listingRef.icons()) {\n\t@if (critical()) {\n\t\t<lu-icon class=\"listing-item-icon palette-critical\" icon=\"signClose\" />\n\t} @else {\n\t\t<lu-icon class=\"listing-item-icon\" [icon]=\"icon() || listingRef.defaultIcon()\" />\n\t}\n}\n<div class=\"listing-item-content\">\n\t<ng-content />\n</div>\n" }]
|
|
28
28
|
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], critical: [{ type: i0.Input, args: [{ isSignal: true, alias: "critical", required: false }] }] } });
|
|
29
29
|
|
|
30
30
|
class ListingComponent {
|
|
@@ -72,18 +72,23 @@ class ListingComponent {
|
|
|
72
72
|
* Reversed the listing
|
|
73
73
|
*/
|
|
74
74
|
this.reversed = input(false, { ...(ngDevMode ? { debugName: "reversed" } : /* istanbul ignore next */ {}), transform: luBooleanAttribute });
|
|
75
|
+
/**
|
|
76
|
+
* Modifies the size of the listing
|
|
77
|
+
*/
|
|
78
|
+
this.size = input(null, /* @ts-ignore */
|
|
79
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
75
80
|
this.paletteClass = computed(() => ({
|
|
76
81
|
[`palette-${this.palette()}`]: !!this.palette(),
|
|
77
82
|
}), /* @ts-ignore */
|
|
78
83
|
...(ngDevMode ? [{ debugName: "paletteClass" }] : /* istanbul ignore next */ []));
|
|
79
84
|
}
|
|
80
85
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ListingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
81
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: ListingComponent, isStandalone: true, selector: "lu-listing", inputs: { ordered: { classPropertyName: "ordered", publicName: "ordered", isSignal: true, isRequired: false, transformFunction: null }, orderedFancy: { classPropertyName: "orderedFancy", publicName: "orderedFancy", isSignal: true, isRequired: false, transformFunction: null }, checklist: { classPropertyName: "checklist", publicName: "checklist", isSignal: true, isRequired: false, transformFunction: null }, icons: { classPropertyName: "icons", publicName: "icons", isSignal: true, isRequired: false, transformFunction: null }, defaultIcon: { classPropertyName: "defaultIcon", publicName: "defaultIcon", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, start: { classPropertyName: "start", publicName: "start", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, divider: { classPropertyName: "divider", publicName: "divider", isSignal: true, isRequired: false, transformFunction: null }, reversed: { classPropertyName: "reversed", publicName: "reversed", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
86
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: ListingComponent, isStandalone: true, selector: "lu-listing", inputs: { ordered: { classPropertyName: "ordered", publicName: "ordered", isSignal: true, isRequired: false, transformFunction: null }, orderedFancy: { classPropertyName: "orderedFancy", publicName: "orderedFancy", isSignal: true, isRequired: false, transformFunction: null }, checklist: { classPropertyName: "checklist", publicName: "checklist", isSignal: true, isRequired: false, transformFunction: null }, icons: { classPropertyName: "icons", publicName: "icons", isSignal: true, isRequired: false, transformFunction: null }, defaultIcon: { classPropertyName: "defaultIcon", publicName: "defaultIcon", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, start: { classPropertyName: "start", publicName: "start", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, divider: { classPropertyName: "divider", publicName: "divider", isSignal: true, isRequired: false, transformFunction: null }, reversed: { classPropertyName: "reversed", publicName: "reversed", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
82
87
|
{
|
|
83
88
|
provide: LU_LISTING_INSTANCE,
|
|
84
89
|
useExisting: forwardRef(() => ListingComponent),
|
|
85
90
|
},
|
|
86
|
-
], ngImport: i0, template: "@if (ordered() || orderedFancy()) {\n\t<ol\n\t\tclass=\"listing\"\n\t\t[class.mod-icons]=\"icons()\"\n\t\t[class.mod-checklist]=\"checklist()\"\n\t\t[class.mod-fancy]=\"orderedFancy()\"\n\t\t[class]=\"paletteClass()\"\n\t\t[attr.start]=\"start() !== 1 ? start() : null\"\n\t\t[attr.reversed]=\"reversed() ? 'reversed' : null\"\n\t>\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ol>\n} @else {\n\t<ul\n\t\tclass=\"listing\"\n\t\t[class.mod-icons]=\"icons()\"\n\t\t[class.mod-checklist]=\"checklist()\"\n\t\t[class.mod-inline]=\"inline()\"\n\t\t[class.mod-divider]=\"divider()\"\n\t\t[class]=\"paletteClass()\"\n\t>\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ul>\n}\n\n<ng-template #content><ng-content /></ng-template>\n", styles: ["@charset \"UTF-8\";@layer components{.listing{--components-listing-marginInlineStart: 0;--components-listing-inlineFirst: 0;--components-listing-flexDirection: column;--components-listing-flexWrap: nowrap;--components-listing-paddingInlineStart: var(--components-listing-inlineStart);--components-listing-inlineStart: calc(var(--pr-t-spacings-300) + var(--pr-t-spacings-50));--components-listing-clipPath: none;--components-listing-listStyleType: disc;--components-listing-item-display: list-item;--components-listing-item-icon-before-content: none;--components-listing-item-before-content: unset;--components-listing-item-content-display: block;--components-listing-item-content-flexWrap: nowrap;--components-listing-item-content-rowGap: 0;--components-listing-item-content-columnGap: 0;--components-listing-item-number-display: none;--components-listing-item-counterIncrement: listing;--components-listing-item-icon-backgroundColor: transparent;padding:0;margin:0;padding-inline-start:var(--components-listing-paddingInlineStart);margin-inline-start:var(--components-listing-marginInlineStart);display:flex;flex-direction:var(--components-listing-flexDirection);flex-wrap:var(--components-listing-flexWrap);row-gap:var(--pr-t-spacings-50);column-gap:var(--pr-t-spacings-100);list-style-type:var(--components-listing-listStyleType);clip-path:var(--components-listing-clipPath)}.listing-item{display:var(--components-listing-item-display);align-items:flex-start;gap:var(--pr-t-spacings-100);margin-inline-start:0;position:relative;counter-increment:var(--components-listing-item-counterIncrement)}.listing-item::marker{line-height:1}.listing-item:before{content:var(--components-listing-item-before-content);border-inline-start:var(--commons-divider-border);block-size:.75lh;align-self:center}.listing-item-number{font:var(--
|
|
91
|
+
], ngImport: i0, template: "@if (ordered() || orderedFancy()) {\n\t<ol\n\t\tclass=\"listing\"\n\t\t[class.mod-icons]=\"icons()\"\n\t\t[class.mod-checklist]=\"checklist()\"\n\t\t[class.mod-fancy]=\"orderedFancy()\"\n\t\t[class.mod-S]=\"size() === 'S'\"\n\t\t[class]=\"paletteClass()\"\n\t\t[attr.start]=\"start() !== 1 ? start() : null\"\n\t\t[attr.reversed]=\"reversed() ? 'reversed' : null\"\n\t>\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ol>\n} @else {\n\t<ul\n\t\tclass=\"listing\"\n\t\t[class.mod-icons]=\"icons()\"\n\t\t[class.mod-checklist]=\"checklist()\"\n\t\t[class.mod-inline]=\"inline()\"\n\t\t[class.mod-divider]=\"divider()\"\n\t\t[class.mod-S]=\"size() === 'S'\"\n\t\t[class]=\"paletteClass()\"\n\t>\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ul>\n}\n\n<ng-template #content><ng-content /></ng-template>\n", styles: ["@charset \"UTF-8\";@layer components{.listing{--components-listing-marginInlineStart: 0;--components-listing-inlineFirst: 0;--components-listing-flexDirection: column;--components-listing-flexWrap: nowrap;--components-listing-paddingInlineStart: var(--components-listing-inlineStart);--components-listing-inlineStart: calc(var(--pr-t-spacings-300) + var(--pr-t-spacings-50));--components-listing-clipPath: none;--components-listing-listStyleType: disc;--components-listing-item-display: list-item;--components-listing-item-icon-before-content: none;--components-listing-item-before-content: unset;--components-listing-item-content-display: block;--components-listing-item-content-flexWrap: nowrap;--components-listing-item-content-rowGap: 0;--components-listing-item-content-columnGap: 0;--components-listing-item-number-display: none;--components-listing-item-number-font: var(--pr-t-font-body-S);--components-listing-item-number-size: var(--pr-t-spacings-250);--components-listing-item-counterIncrement: listing;--components-listing-item-icon-backgroundColor: transparent;--components-listing-item-icon-size: var(--pr-t-spacings-250);padding:0;margin:0;padding-inline-start:var(--components-listing-paddingInlineStart);margin-inline-start:var(--components-listing-marginInlineStart);display:flex;flex-direction:var(--components-listing-flexDirection);flex-wrap:var(--components-listing-flexWrap);row-gap:var(--pr-t-spacings-50);column-gap:var(--pr-t-spacings-100);list-style-type:var(--components-listing-listStyleType);clip-path:var(--components-listing-clipPath)}.listing-item{font:var(--components-listing-item-font);display:var(--components-listing-item-display);align-items:flex-start;gap:var(--pr-t-spacings-100);margin-inline-start:0;position:relative;counter-increment:var(--components-listing-item-counterIncrement)}.listing-item::marker{line-height:1}.listing-item:before{content:var(--components-listing-item-before-content);border-inline-start:var(--commons-divider-border);block-size:.75lh;align-self:center}.listing-item-number{font:var(--components-listing-item-number-font);font-weight:var(--pr-t-font-fontWeight-semibold);display:var(--components-listing-item-number-display);position:absolute;inset-inline-end:100%;padding:0 var(--pr-t-spacings-25);min-inline-size:var(--components-listing-item-number-size);block-size:var(--components-listing-item-number-size);place-items:center;background-color:var(--palettes-100, var(--palettes-product-100));color:var(--palettes-700, var(--palettes-product-700));border-radius:var(--pr-t-border-radius-small);margin-inline-end:var(--pr-t-spacings-100);margin-block-start:calc(var(--pr-t-spacings-25) / 2)}.listing-item-number:before{content:counter(listing)/\"\"}.listing-item-icon{inline-size:var(--components-listing-item-icon-size);aspect-ratio:1;margin-block-start:var(--pr-t-spacings-25);background-color:var(--components-listing-item-icon-backgroundColor);color:var(--palettes-700, var(--palettes-neutral-700));border-radius:var(--pr-t-border-radius-full);display:inline-flex!important;--icon-size: 1.25rem}.listing-item-content{display:var(--components-listing-item-content-display);gap:var(--components-listing-item-content-rowGap) var(--components-listing-item-content-columnGap);flex-wrap:var(--components-listing-item-content-flexWrap)}}@layer mods{.listing.mod-ordered,.listing:is(ol){--components-listing-listStyleType: decimal}.listing.mod-ordered.mod-fancy,.listing:is(ol).mod-fancy{counter-reset:listing;--components-listing-listStyleType: \"\" !important;--components-listing-item-number-display: grid}.listing.mod-inline{--components-listing-paddingInlineStart: 0;--components-listing-flexDirection: row;--components-listing-item-display: flex;--components-listing-flexWrap: wrap;--components-listing-item-content-flexWrap: wrap;--components-listing-item-content-rowGap: var(--pr-t-spacings-50);--components-listing-marginInlineStart: calc(var(--components-listing-inlineFirst) * -1);--components-listing-clipPath: inset( calc(var(--pr-t-spacings-50) * -1) calc(var(--pr-t-spacings-50) * -1) calc(var(--pr-t-spacings-50) * -1) calc(var(--components-listing-inlineFirst) - var(--pr-t-spacings-50)) )}.listing.mod-inline:has(.listing) .listing{--components-listing-clipPath: 0;--components-listing-paddingInlineStart: 0;--components-listing-flexDirection: row;--components-listing-item-display: flex;--components-listing-flexWrap: wrap;--components-listing-item-content-flexWrap: wrap;--components-listing-item-content-rowGap: var(--pr-t-spacings-50)}.listing.mod-inline:has(.listing) .listing-item{--components-listing-item-content-display: flex;--components-listing-item-content-columnGap: var(--pr-t-spacings-100)}.listing.mod-inline.mod-divider:has(.listing) .listing{--components-listing-marginInlineStart: calc(var(--components-listing-inlineFirst) * -1);--components-listing-item-before-content: \"\";--components-listing-inlineFirst: calc(var(--pr-t-spacings-100) + var(--pr-t-spacings-25) - var(--commons-divider-width))}.listing.mod-inline.mod-divider:has(.listing) .listing-item-content{--components-listing-item-content-columnGap: var(--pr-t-spacings-200)}.listing.mod-inline.mod-divider{--components-listing-item-before-content: \"\";--components-listing-inlineFirst: calc(var(--pr-t-spacings-100) + var(--pr-t-spacings-25) - var(--commons-divider-width))}.listing .listing{--components-listing-listStyleType: circle}.listing .listing.mod-ordered,.listing .listing:is(ol){--components-listing-listStyleType: lower-alpha}.listing .listing .listing{--components-listing-listStyleType: square}.listing .listing .listing.mod-ordered,.listing .listing .listing:is(ol){--components-listing-listStyleType: lower-roman}.listing.mod-icons{--components-listing-paddingInlineStart: 0;--components-listing-item-display: flex}.listing.mod-icons .listing-item-icon:not([class*=icon-]):before{--icon-content: var(--components-listing-item-icon-before-content)}.listing.mod-checklist{--components-listing-paddingInlineStart: 0;--components-listing-item-display: flex}.listing.mod-checklist .listing-item-icon{--components-listing-item-icon-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.listing.mod-checklist .listing-item-icon:not(.icon-signClose){--icon-content: \"\\e97d\";font-weight:var(--pr-t-font-fontWeight-regular);display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:var(--icon-fontFamily);content:var(--icon-content)/\"\";-webkit-font-smoothing:antialiased;text-transform:none}.listing.mod-S,.listing.mod-S .listing{--components-listing-inlineStart: var(--pr-t-spacings-300);--components-listing-item-font: var(--pr-t-font-body-S);--components-listing-item-number-font: var(--pr-t-font-body-XS);--components-listing-item-number-size: var(--pr-t-spacings-200);--components-listing-item-icon-size: var(--pr-t-spacings-200)}.listing.mod-S .listing-item-icon,.listing.mod-S .listing .listing-item-icon{--icon-size: 1rem}}@layer base{lu-listing{display:contents}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
87
92
|
}
|
|
88
93
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ListingComponent, decorators: [{
|
|
89
94
|
type: Component,
|
|
@@ -92,12 +97,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
92
97
|
provide: LU_LISTING_INSTANCE,
|
|
93
98
|
useExisting: forwardRef(() => ListingComponent),
|
|
94
99
|
},
|
|
95
|
-
], template: "@if (ordered() || orderedFancy()) {\n\t<ol\n\t\tclass=\"listing\"\n\t\t[class.mod-icons]=\"icons()\"\n\t\t[class.mod-checklist]=\"checklist()\"\n\t\t[class.mod-fancy]=\"orderedFancy()\"\n\t\t[class]=\"paletteClass()\"\n\t\t[attr.start]=\"start() !== 1 ? start() : null\"\n\t\t[attr.reversed]=\"reversed() ? 'reversed' : null\"\n\t>\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ol>\n} @else {\n\t<ul\n\t\tclass=\"listing\"\n\t\t[class.mod-icons]=\"icons()\"\n\t\t[class.mod-checklist]=\"checklist()\"\n\t\t[class.mod-inline]=\"inline()\"\n\t\t[class.mod-divider]=\"divider()\"\n\t\t[class]=\"paletteClass()\"\n\t>\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ul>\n}\n\n<ng-template #content><ng-content /></ng-template>\n", styles: ["@charset \"UTF-8\";@layer components{.listing{--components-listing-marginInlineStart: 0;--components-listing-inlineFirst: 0;--components-listing-flexDirection: column;--components-listing-flexWrap: nowrap;--components-listing-paddingInlineStart: var(--components-listing-inlineStart);--components-listing-inlineStart: calc(var(--pr-t-spacings-300) + var(--pr-t-spacings-50));--components-listing-clipPath: none;--components-listing-listStyleType: disc;--components-listing-item-display: list-item;--components-listing-item-icon-before-content: none;--components-listing-item-before-content: unset;--components-listing-item-content-display: block;--components-listing-item-content-flexWrap: nowrap;--components-listing-item-content-rowGap: 0;--components-listing-item-content-columnGap: 0;--components-listing-item-number-display: none;--components-listing-item-counterIncrement: listing;--components-listing-item-icon-backgroundColor: transparent;padding:0;margin:0;padding-inline-start:var(--components-listing-paddingInlineStart);margin-inline-start:var(--components-listing-marginInlineStart);display:flex;flex-direction:var(--components-listing-flexDirection);flex-wrap:var(--components-listing-flexWrap);row-gap:var(--pr-t-spacings-50);column-gap:var(--pr-t-spacings-100);list-style-type:var(--components-listing-listStyleType);clip-path:var(--components-listing-clipPath)}.listing-item{display:var(--components-listing-item-display);align-items:flex-start;gap:var(--pr-t-spacings-100);margin-inline-start:0;position:relative;counter-increment:var(--components-listing-item-counterIncrement)}.listing-item::marker{line-height:1}.listing-item:before{content:var(--components-listing-item-before-content);border-inline-start:var(--commons-divider-border);block-size:.75lh;align-self:center}.listing-item-number{font:var(--
|
|
96
|
-
}], propDecorators: { ordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "ordered", required: false }] }], orderedFancy: [{ type: i0.Input, args: [{ isSignal: true, alias: "orderedFancy", required: false }] }], checklist: [{ type: i0.Input, args: [{ isSignal: true, alias: "checklist", required: false }] }], icons: [{ type: i0.Input, args: [{ isSignal: true, alias: "icons", required: false }] }], defaultIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultIcon", required: false }] }], palette: [{ type: i0.Input, args: [{ isSignal: true, alias: "palette", required: false }] }], start: [{ type: i0.Input, args: [{ isSignal: true, alias: "start", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], divider: [{ type: i0.Input, args: [{ isSignal: true, alias: "divider", required: false }] }], reversed: [{ type: i0.Input, args: [{ isSignal: true, alias: "reversed", required: false }] }] } });
|
|
100
|
+
], template: "@if (ordered() || orderedFancy()) {\n\t<ol\n\t\tclass=\"listing\"\n\t\t[class.mod-icons]=\"icons()\"\n\t\t[class.mod-checklist]=\"checklist()\"\n\t\t[class.mod-fancy]=\"orderedFancy()\"\n\t\t[class.mod-S]=\"size() === 'S'\"\n\t\t[class]=\"paletteClass()\"\n\t\t[attr.start]=\"start() !== 1 ? start() : null\"\n\t\t[attr.reversed]=\"reversed() ? 'reversed' : null\"\n\t>\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ol>\n} @else {\n\t<ul\n\t\tclass=\"listing\"\n\t\t[class.mod-icons]=\"icons()\"\n\t\t[class.mod-checklist]=\"checklist()\"\n\t\t[class.mod-inline]=\"inline()\"\n\t\t[class.mod-divider]=\"divider()\"\n\t\t[class.mod-S]=\"size() === 'S'\"\n\t\t[class]=\"paletteClass()\"\n\t>\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ul>\n}\n\n<ng-template #content><ng-content /></ng-template>\n", styles: ["@charset \"UTF-8\";@layer components{.listing{--components-listing-marginInlineStart: 0;--components-listing-inlineFirst: 0;--components-listing-flexDirection: column;--components-listing-flexWrap: nowrap;--components-listing-paddingInlineStart: var(--components-listing-inlineStart);--components-listing-inlineStart: calc(var(--pr-t-spacings-300) + var(--pr-t-spacings-50));--components-listing-clipPath: none;--components-listing-listStyleType: disc;--components-listing-item-display: list-item;--components-listing-item-icon-before-content: none;--components-listing-item-before-content: unset;--components-listing-item-content-display: block;--components-listing-item-content-flexWrap: nowrap;--components-listing-item-content-rowGap: 0;--components-listing-item-content-columnGap: 0;--components-listing-item-number-display: none;--components-listing-item-number-font: var(--pr-t-font-body-S);--components-listing-item-number-size: var(--pr-t-spacings-250);--components-listing-item-counterIncrement: listing;--components-listing-item-icon-backgroundColor: transparent;--components-listing-item-icon-size: var(--pr-t-spacings-250);padding:0;margin:0;padding-inline-start:var(--components-listing-paddingInlineStart);margin-inline-start:var(--components-listing-marginInlineStart);display:flex;flex-direction:var(--components-listing-flexDirection);flex-wrap:var(--components-listing-flexWrap);row-gap:var(--pr-t-spacings-50);column-gap:var(--pr-t-spacings-100);list-style-type:var(--components-listing-listStyleType);clip-path:var(--components-listing-clipPath)}.listing-item{font:var(--components-listing-item-font);display:var(--components-listing-item-display);align-items:flex-start;gap:var(--pr-t-spacings-100);margin-inline-start:0;position:relative;counter-increment:var(--components-listing-item-counterIncrement)}.listing-item::marker{line-height:1}.listing-item:before{content:var(--components-listing-item-before-content);border-inline-start:var(--commons-divider-border);block-size:.75lh;align-self:center}.listing-item-number{font:var(--components-listing-item-number-font);font-weight:var(--pr-t-font-fontWeight-semibold);display:var(--components-listing-item-number-display);position:absolute;inset-inline-end:100%;padding:0 var(--pr-t-spacings-25);min-inline-size:var(--components-listing-item-number-size);block-size:var(--components-listing-item-number-size);place-items:center;background-color:var(--palettes-100, var(--palettes-product-100));color:var(--palettes-700, var(--palettes-product-700));border-radius:var(--pr-t-border-radius-small);margin-inline-end:var(--pr-t-spacings-100);margin-block-start:calc(var(--pr-t-spacings-25) / 2)}.listing-item-number:before{content:counter(listing)/\"\"}.listing-item-icon{inline-size:var(--components-listing-item-icon-size);aspect-ratio:1;margin-block-start:var(--pr-t-spacings-25);background-color:var(--components-listing-item-icon-backgroundColor);color:var(--palettes-700, var(--palettes-neutral-700));border-radius:var(--pr-t-border-radius-full);display:inline-flex!important;--icon-size: 1.25rem}.listing-item-content{display:var(--components-listing-item-content-display);gap:var(--components-listing-item-content-rowGap) var(--components-listing-item-content-columnGap);flex-wrap:var(--components-listing-item-content-flexWrap)}}@layer mods{.listing.mod-ordered,.listing:is(ol){--components-listing-listStyleType: decimal}.listing.mod-ordered.mod-fancy,.listing:is(ol).mod-fancy{counter-reset:listing;--components-listing-listStyleType: \"\" !important;--components-listing-item-number-display: grid}.listing.mod-inline{--components-listing-paddingInlineStart: 0;--components-listing-flexDirection: row;--components-listing-item-display: flex;--components-listing-flexWrap: wrap;--components-listing-item-content-flexWrap: wrap;--components-listing-item-content-rowGap: var(--pr-t-spacings-50);--components-listing-marginInlineStart: calc(var(--components-listing-inlineFirst) * -1);--components-listing-clipPath: inset( calc(var(--pr-t-spacings-50) * -1) calc(var(--pr-t-spacings-50) * -1) calc(var(--pr-t-spacings-50) * -1) calc(var(--components-listing-inlineFirst) - var(--pr-t-spacings-50)) )}.listing.mod-inline:has(.listing) .listing{--components-listing-clipPath: 0;--components-listing-paddingInlineStart: 0;--components-listing-flexDirection: row;--components-listing-item-display: flex;--components-listing-flexWrap: wrap;--components-listing-item-content-flexWrap: wrap;--components-listing-item-content-rowGap: var(--pr-t-spacings-50)}.listing.mod-inline:has(.listing) .listing-item{--components-listing-item-content-display: flex;--components-listing-item-content-columnGap: var(--pr-t-spacings-100)}.listing.mod-inline.mod-divider:has(.listing) .listing{--components-listing-marginInlineStart: calc(var(--components-listing-inlineFirst) * -1);--components-listing-item-before-content: \"\";--components-listing-inlineFirst: calc(var(--pr-t-spacings-100) + var(--pr-t-spacings-25) - var(--commons-divider-width))}.listing.mod-inline.mod-divider:has(.listing) .listing-item-content{--components-listing-item-content-columnGap: var(--pr-t-spacings-200)}.listing.mod-inline.mod-divider{--components-listing-item-before-content: \"\";--components-listing-inlineFirst: calc(var(--pr-t-spacings-100) + var(--pr-t-spacings-25) - var(--commons-divider-width))}.listing .listing{--components-listing-listStyleType: circle}.listing .listing.mod-ordered,.listing .listing:is(ol){--components-listing-listStyleType: lower-alpha}.listing .listing .listing{--components-listing-listStyleType: square}.listing .listing .listing.mod-ordered,.listing .listing .listing:is(ol){--components-listing-listStyleType: lower-roman}.listing.mod-icons{--components-listing-paddingInlineStart: 0;--components-listing-item-display: flex}.listing.mod-icons .listing-item-icon:not([class*=icon-]):before{--icon-content: var(--components-listing-item-icon-before-content)}.listing.mod-checklist{--components-listing-paddingInlineStart: 0;--components-listing-item-display: flex}.listing.mod-checklist .listing-item-icon{--components-listing-item-icon-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.listing.mod-checklist .listing-item-icon:not(.icon-signClose){--icon-content: \"\\e97d\";font-weight:var(--pr-t-font-fontWeight-regular);display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:var(--icon-fontFamily);content:var(--icon-content)/\"\";-webkit-font-smoothing:antialiased;text-transform:none}.listing.mod-S,.listing.mod-S .listing{--components-listing-inlineStart: var(--pr-t-spacings-300);--components-listing-item-font: var(--pr-t-font-body-S);--components-listing-item-number-font: var(--pr-t-font-body-XS);--components-listing-item-number-size: var(--pr-t-spacings-200);--components-listing-item-icon-size: var(--pr-t-spacings-200)}.listing.mod-S .listing-item-icon,.listing.mod-S .listing .listing-item-icon{--icon-size: 1rem}}@layer base{lu-listing{display:contents}}\n"] }]
|
|
101
|
+
}], propDecorators: { ordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "ordered", required: false }] }], orderedFancy: [{ type: i0.Input, args: [{ isSignal: true, alias: "orderedFancy", required: false }] }], checklist: [{ type: i0.Input, args: [{ isSignal: true, alias: "checklist", required: false }] }], icons: [{ type: i0.Input, args: [{ isSignal: true, alias: "icons", required: false }] }], defaultIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultIcon", required: false }] }], palette: [{ type: i0.Input, args: [{ isSignal: true, alias: "palette", required: false }] }], start: [{ type: i0.Input, args: [{ isSignal: true, alias: "start", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], divider: [{ type: i0.Input, args: [{ isSignal: true, alias: "divider", required: false }] }], reversed: [{ type: i0.Input, args: [{ isSignal: true, alias: "reversed", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Available ListingComponent sizes
|
|
105
|
+
*/
|
|
106
|
+
const LISTING_SIZE = ['S'];
|
|
97
107
|
|
|
98
108
|
/**
|
|
99
109
|
* Generated bundle index. Do not edit.
|
|
100
110
|
*/
|
|
101
111
|
|
|
102
|
-
export { ListingComponent, ListingItemComponent };
|
|
112
|
+
export { LISTING_SIZE, ListingComponent, ListingItemComponent };
|
|
103
113
|
//# sourceMappingURL=lucca-front-ng-listing.mjs.map
|