@lucca-front/ng 21.0.0-rc.4 → 21.0.0-rc.6

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.
Files changed (141) hide show
  1. package/app-layout/index.d.ts +1 -1
  2. package/box/index.d.ts +3 -3
  3. package/breadcrumbs/index.d.ts +3 -3
  4. package/button/index.d.ts +26 -21
  5. package/callout/index.d.ts +65 -57
  6. package/chip/index.d.ts +1 -1
  7. package/code/index.d.ts +1 -1
  8. package/comment/index.d.ts +11 -14
  9. package/core/index.d.ts +10 -7
  10. package/core-select/index.d.ts +6 -4
  11. package/core-select/user/index.d.ts +3 -2
  12. package/data-table/index.d.ts +1 -1
  13. package/dialog/index.d.ts +65 -48
  14. package/empty-state/index.d.ts +23 -26
  15. package/fancy-box/index.d.ts +11 -10
  16. package/fesm2022/lucca-front-ng-app-layout.mjs.map +1 -1
  17. package/fesm2022/lucca-front-ng-box.mjs.map +1 -1
  18. package/fesm2022/lucca-front-ng-breadcrumbs.mjs.map +1 -1
  19. package/fesm2022/lucca-front-ng-button.mjs +59 -90
  20. package/fesm2022/lucca-front-ng-button.mjs.map +1 -1
  21. package/fesm2022/lucca-front-ng-callout.mjs +96 -130
  22. package/fesm2022/lucca-front-ng-callout.mjs.map +1 -1
  23. package/fesm2022/lucca-front-ng-chip.mjs +1 -1
  24. package/fesm2022/lucca-front-ng-chip.mjs.map +1 -1
  25. package/fesm2022/lucca-front-ng-code.mjs.map +1 -1
  26. package/fesm2022/lucca-front-ng-comment.mjs +14 -34
  27. package/fesm2022/lucca-front-ng-comment.mjs.map +1 -1
  28. package/fesm2022/lucca-front-ng-core-select-api.mjs +3 -3
  29. package/fesm2022/lucca-front-ng-core-select-api.mjs.map +1 -1
  30. package/fesm2022/lucca-front-ng-core-select-user.mjs +14 -11
  31. package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
  32. package/fesm2022/lucca-front-ng-core-select.mjs +15 -21
  33. package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
  34. package/fesm2022/lucca-front-ng-core.mjs +6 -4
  35. package/fesm2022/lucca-front-ng-core.mjs.map +1 -1
  36. package/fesm2022/lucca-front-ng-data-table.mjs +15 -15
  37. package/fesm2022/lucca-front-ng-data-table.mjs.map +1 -1
  38. package/fesm2022/lucca-front-ng-date2.mjs +1 -1
  39. package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
  40. package/fesm2022/lucca-front-ng-dialog.mjs +96 -95
  41. package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
  42. package/fesm2022/lucca-front-ng-empty-state.mjs +27 -68
  43. package/fesm2022/lucca-front-ng-empty-state.mjs.map +1 -1
  44. package/fesm2022/lucca-front-ng-establishment.mjs +2 -2
  45. package/fesm2022/lucca-front-ng-establishment.mjs.map +1 -1
  46. package/fesm2022/lucca-front-ng-fancy-box.mjs +14 -28
  47. package/fesm2022/lucca-front-ng-fancy-box.mjs.map +1 -1
  48. package/fesm2022/lucca-front-ng-file-upload.mjs +1 -1
  49. package/fesm2022/lucca-front-ng-file-upload.mjs.map +1 -1
  50. package/fesm2022/lucca-front-ng-filter-pills.mjs +4 -4
  51. package/fesm2022/lucca-front-ng-filter-pills.mjs.map +1 -1
  52. package/fesm2022/lucca-front-ng-form-field.mjs +2 -2
  53. package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
  54. package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs +15 -17
  55. package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs.map +1 -1
  56. package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs +6 -6
  57. package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs.map +1 -1
  58. package/fesm2022/lucca-front-ng-forms.mjs +99 -187
  59. package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
  60. package/fesm2022/lucca-front-ng-icon.mjs +14 -19
  61. package/fesm2022/lucca-front-ng-icon.mjs.map +1 -1
  62. package/fesm2022/lucca-front-ng-index-table.mjs +1 -1
  63. package/fesm2022/lucca-front-ng-index-table.mjs.map +1 -1
  64. package/fesm2022/lucca-front-ng-inline-message.mjs +15 -22
  65. package/fesm2022/lucca-front-ng-inline-message.mjs.map +1 -1
  66. package/fesm2022/lucca-front-ng-link.mjs +27 -61
  67. package/fesm2022/lucca-front-ng-link.mjs.map +1 -1
  68. package/fesm2022/lucca-front-ng-mobile-push.mjs +4 -8
  69. package/fesm2022/lucca-front-ng-mobile-push.mjs.map +1 -1
  70. package/fesm2022/lucca-front-ng-modal.mjs +3 -3
  71. package/fesm2022/lucca-front-ng-modal.mjs.map +1 -1
  72. package/fesm2022/lucca-front-ng-multi-select.mjs +1 -1
  73. package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
  74. package/fesm2022/lucca-front-ng-new-badge.mjs +7 -11
  75. package/fesm2022/lucca-front-ng-new-badge.mjs.map +1 -1
  76. package/fesm2022/lucca-front-ng-numeric-badge.mjs +40 -39
  77. package/fesm2022/lucca-front-ng-numeric-badge.mjs.map +1 -1
  78. package/fesm2022/lucca-front-ng-option.mjs +1 -1
  79. package/fesm2022/lucca-front-ng-option.mjs.map +1 -1
  80. package/fesm2022/lucca-front-ng-plg-push.mjs +8 -17
  81. package/fesm2022/lucca-front-ng-plg-push.mjs.map +1 -1
  82. package/fesm2022/lucca-front-ng-popover2.mjs +2 -2
  83. package/fesm2022/lucca-front-ng-popover2.mjs.map +1 -1
  84. package/fesm2022/lucca-front-ng-scroll-box.mjs +26 -24
  85. package/fesm2022/lucca-front-ng-scroll-box.mjs.map +1 -1
  86. package/fesm2022/lucca-front-ng-scroll.mjs +19 -29
  87. package/fesm2022/lucca-front-ng-scroll.mjs.map +1 -1
  88. package/fesm2022/lucca-front-ng-simple-select.mjs +1 -1
  89. package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
  90. package/fesm2022/lucca-front-ng-skeleton.mjs +24 -40
  91. package/fesm2022/lucca-front-ng-skeleton.mjs.map +1 -1
  92. package/fesm2022/lucca-front-ng-status-badge.mjs +1 -1
  93. package/fesm2022/lucca-front-ng-status-badge.mjs.map +1 -1
  94. package/fesm2022/lucca-front-ng-tag.mjs +31 -42
  95. package/fesm2022/lucca-front-ng-tag.mjs.map +1 -1
  96. package/fesm2022/lucca-front-ng-time.mjs +8 -18
  97. package/fesm2022/lucca-front-ng-time.mjs.map +1 -1
  98. package/fesm2022/lucca-front-ng-toast.mjs +55 -60
  99. package/fesm2022/lucca-front-ng-toast.mjs.map +1 -1
  100. package/fesm2022/lucca-front-ng-tooltip.mjs +85 -108
  101. package/fesm2022/lucca-front-ng-tooltip.mjs.map +1 -1
  102. package/fesm2022/lucca-front-ng-user-popover.mjs +2 -2
  103. package/fesm2022/lucca-front-ng-user-popover.mjs.map +1 -1
  104. package/fesm2022/lucca-front-ng-user.mjs +58 -96
  105. package/fesm2022/lucca-front-ng-user.mjs.map +1 -1
  106. package/fesm2022/lucca-front-ng-vertical-navigation.mjs +6 -6
  107. package/fesm2022/lucca-front-ng-vertical-navigation.mjs.map +1 -1
  108. package/forms/index.d.ts +54 -62
  109. package/forms/phone-number-input/index.d.ts +13 -13
  110. package/icon/index.d.ts +10 -10
  111. package/index-table/index.d.ts +1 -1
  112. package/inline-message/index.d.ts +9 -11
  113. package/link/index.d.ts +12 -17
  114. package/mobile-push/index.d.ts +5 -6
  115. package/new-badge/index.d.ts +2 -3
  116. package/numeric-badge/index.d.ts +14 -11
  117. package/package.json +33 -37
  118. package/plg-push/index.d.ts +6 -8
  119. package/read-more/index.d.ts +1 -1
  120. package/schematics/collection.json +10 -0
  121. package/schematics/color-text/index.js +55 -0
  122. package/schematics/color-text/migration.spec.js +50 -0
  123. package/schematics/color-text/schema.json +23 -0
  124. package/schematics/lib/angular-component-ast.js +29 -0
  125. package/schematics/lu-text-input/index.js +24 -0
  126. package/schematics/lu-text-input/migration.js +116 -0
  127. package/schematics/lu-text-input/migration.spec.js +23 -0
  128. package/schematics/lu-text-input/schema.json +23 -0
  129. package/scroll/index.d.ts +20 -22
  130. package/scroll-box/index.d.ts +6 -5
  131. package/skeleton/index.d.ts +27 -32
  132. package/src/components/cdk/_global.scss +22 -1
  133. package/tag/index.d.ts +17 -15
  134. package/time/index.d.ts +5 -5
  135. package/toast/index.d.ts +23 -25
  136. package/tooltip/index.d.ts +35 -41
  137. package/user/index.d.ts +24 -32
  138. package/vertical-navigation/index.d.ts +16 -16
  139. package/fesm2022/lucca-front-ng-scrollBox.mjs +0 -6
  140. package/fesm2022/lucca-front-ng-scrollBox.mjs.map +0 -1
  141. package/scrollBox/index.d.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"lucca-front-ng-callout.mjs","sources":["../../../packages/ng/callout/callout-actions/callout-actions.component.ts","../../../packages/ng/callout/callout-state.ts","../../../packages/ng/callout/callout.utils.ts","../../../packages/ng/callout/callout-icon.pipe.ts","../../../packages/ng/callout/callout-disclosure/callout-disclosure.component.ts","../../../packages/ng/callout/callout-disclosure/callout-disclosure.component.html","../../../packages/ng/callout/callout-feedback-item/callout-feedback-item.component.ts","../../../packages/ng/callout/callout-feedback-item/callout-feedback-item.component.html","../../../packages/ng/callout/callout-feedback-list/callout-feedback-list.component.ts","../../../packages/ng/callout/callout-popover/callout-popover.component.ts","../../../packages/ng/callout/callout-popover/callout-popover.component.html","../../../packages/ng/callout/translations.ts","../../../packages/ng/callout/callout.translate.ts","../../../packages/ng/callout/callout/callout.component.ts","../../../packages/ng/callout/callout/callout.component.html","../../../packages/ng/callout/lucca-front-ng-callout.ts"],"sourcesContent":["import { booleanAttribute, ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n\tselector: 'lu-callout-actions',\n\ttemplate: '<ng-content />',\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'callout-content-description-actions',\n\t\t'[class.mod-inline]': 'inline()',\n\t},\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CalloutActionsComponent {\n\tinline = input(false, { transform: booleanAttribute });\n}\n","import { LuccaIcon } from '@lucca-front/icons';\nimport { Palette } from '@lucca-front/ng/core';\n\nexport const CalloutStates = ['success', 'warning', 'error'] as const;\n\nexport type CalloutState = (typeof CalloutStates)[number];\n\nexport const CalloutStateMap: Record<CalloutState, { icon: LuccaIcon; palette: Palette }> = {\n\tsuccess: {\n\t\ticon: 'signSuccess',\n\t\tpalette: 'success',\n\t},\n\twarning: {\n\t\ticon: 'signWarning',\n\t\tpalette: 'warning',\n\t},\n\terror: {\n\t\ticon: 'signError',\n\t\tpalette: 'error',\n\t},\n};\n","import { LuccaIcon } from '@lucca-front/icons';\nimport { Palette } from '@lucca-front/ng/core';\nimport { CalloutState, CalloutStateMap } from './callout-state';\n\n/**\n * Get icon for callout\n *\n * If the icon is defined then it takes priority over the callout state icon\n */\nexport function getCalloutIcon(state: CalloutState | undefined, icon: LuccaIcon | undefined): LuccaIcon | undefined {\n\tconst stateMap = CalloutStateMap[state] ?? { icon };\n\treturn icon ?? stateMap.icon;\n}\n\n/**\n * Get palette for callout\n *\n * If the palette is different from \"none\" then it takes priority over the callout state palette\n */\nexport function getCalloutPalette(state: CalloutState | undefined, palette: Palette): string {\n\tconst stateMap = CalloutStateMap[state] ?? { palette };\n\treturn palette !== 'none' ? palette : stateMap.palette;\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { LuccaIcon } from '@lucca-front/icons';\nimport { CalloutState } from './callout-state';\nimport { getCalloutIcon } from './callout.utils';\n\n/**\n * Get icon for callout\n *\n * If the icon is defined then it takes priority over the callout state icon\n */\n@Pipe({\n\tname: 'luCalloutIcon',\n})\nexport class CalloutIconPipe implements PipeTransform {\n\ttransform(state: CalloutState, icon: LuccaIcon): LuccaIcon | undefined {\n\t\treturn getCalloutIcon(state, icon);\n\t}\n}\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation, booleanAttribute } from '@angular/core';\nimport { LuccaIcon } from '@lucca-front/icons';\nimport { Palette, PortalContent, PortalDirective } from '@lucca-front/ng/core';\nimport { IconComponent } from '@lucca-front/ng/icon';\nimport { CalloutIconPipe } from '../callout-icon.pipe';\nimport { CalloutState } from '../callout-state';\nimport { getCalloutPalette } from '../callout.utils';\n\n@Component({\n\tselector: 'lu-callout-disclosure',\n\timports: [IconComponent, PortalDirective, CalloutIconPipe],\n\ttemplateUrl: './callout-disclosure.component.html',\n\tstyleUrl: './callout-disclosure.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutDisclosureComponent {\n\t@Input()\n\ticon: LuccaIcon;\n\n\t@Input({ required: true })\n\theading: PortalContent;\n\n\t@Input()\n\tpalette: Palette = 'none';\n\n\t@Input()\n\tsize: 'M' | 'S' = 'M';\n\n\t@Input()\n\t/**\n\t * State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on\n\t * the provided state.\n\t *\n\t * If one of the icon or palette inputs are filled along with the state input, their values will have the priority over\n\t * state (so setting state to success and palette to warning will make the palette warning)\n\t */\n\tstate: CalloutState;\n\n\t@Input({ transform: booleanAttribute }) open = false;\n\n\t@Output() openChange = new EventEmitter<boolean>();\n\n\tpublic onToggle(event: Event) {\n\t\tif (event.target instanceof HTMLDetailsElement) {\n\t\t\tthis.openChange.emit(event.target.open);\n\t\t}\n\t}\n\n\tget calloutClasses() {\n\t\tconst palette = getCalloutPalette(this.state, this.palette);\n\t\treturn {\n\t\t\t[`mod-${this.size}`]: !!this.size,\n\t\t\t[`palette-${palette}`]: !!palette,\n\t\t};\n\t}\n}\n","@let calloutIcon = state | luCalloutIcon: icon;\n\n<details class=\"calloutDisclosure\" [class]=\"calloutClasses\" [class.mod-iconless]=\"!calloutIcon\" [open]=\"open\" (toggle)=\"onToggle($event)\">\n\t<summary class=\"calloutDisclosure-summary\">\n\t\t@if (calloutIcon) {\n\t\t\t<lu-icon class=\"calloutDisclosure-summary-icon\" [icon]=\"calloutIcon\" />\n\t\t}\n\t\t<span class=\"calloutDisclosure-summary-title\">\n\t\t\t<ng-container *luPortal=\"heading\" />\n\t\t</span>\n\t\t<lu-icon class=\"calloutDisclosure-summary-chevron\" icon=\"arrowChevronBottom\" />\n\t</summary>\n\t<div class=\"calloutDisclosure-details\">\n\t\t<ng-content />\n\t</div>\n</details>\n","import { ChangeDetectionStrategy, Component, Directive, ViewEncapsulation } from '@angular/core';\n\n@Directive({\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-feedback-item-description',\n})\nexport class CalloutFeedbackItemDescriptionDirective {}\n\n@Component({\n\tselector: 'li[lu-callout-feedback-item]',\n\timports: [],\n\ttemplateUrl: './callout-feedback-item.component.html',\n\tstyleUrl: './callout-feedback-item.component.scss',\n\thost: {\n\t\tclass: 'calloutFeedbackList-item',\n\t},\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CalloutFeedbackItemComponent {}\n","<span class=\"calloutFeedbackList-item-description\">\n\t<ng-content select=\"lu-feedback-item-description\" />\n</span>\n<div class=\"calloutFeedbackList-item-actions\">\n\t<ng-content select=\"[lu-feedback-item-action]\" />\n</div>\n","import { ChangeDetectionStrategy, Component, inject, Input, OnChanges, ViewEncapsulation } from '@angular/core';\nimport { LuClass, Palette } from '@lucca-front/ng/core';\n\n@Component({\n\tselector: 'ul[lu-callout-feedback-list]',\n\ttemplate: '<ng-content />',\n\tstyleUrl: './callout-feedback-list.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\tclass: 'calloutFeedbackList',\n\t},\n\tproviders: [LuClass],\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutFeedbackListComponent implements OnChanges {\n\t#luClass = inject(LuClass);\n\n\t@Input()\n\tpalette: Palette;\n\n\t@Input()\n\tsize: 'M' | 'S';\n\n\tngOnChanges(): void {\n\t\tthis.#luClass.setState({ [`palette-${this.palette}`]: !!this.palette, [`mod-${this.size}`]: !!this.size });\n\t}\n}\n","import { booleanAttribute, ChangeDetectionStrategy, Component, computed, contentChildren, input, numberAttribute, ViewEncapsulation } from '@angular/core';\nimport { LuccaIcon } from '@lucca-front/icons';\nimport { Palette, PortalContent, PortalDirective } from '@lucca-front/ng/core';\nimport { IconComponent } from '@lucca-front/ng/icon';\nimport { PopoverDirective } from '@lucca-front/ng/popover2';\nimport { CalloutFeedbackItemComponent } from '../callout-feedback-item/callout-feedback-item.component';\nimport { CalloutIconPipe } from '../callout-icon.pipe';\nimport { CalloutState } from '../callout-state';\nimport { getCalloutPalette } from '../callout.utils';\n\n@Component({\n\tselector: 'lu-callout-popover',\n\timports: [IconComponent, PortalDirective, PopoverDirective, CalloutIconPipe],\n\ttemplateUrl: './callout-popover.component.html',\n\tstyleUrl: './callout-popover.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutPopoverComponent {\n\t/**\n\t * Debounce for the popover to open (mouse will have to be on the element fox openDelay milliseconds for popover to show)\n\t */\n\treadonly openDelay = input(50, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/**\n\t * Debounce for the popover to close (mouse will have to be out of both popover and trigger for closeDelay milliseconds for it to close)\n\t */\n\treadonly closeDelay = input(500, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/**\n\t * Label (visual only) to put inside the button, often used to show just a number\n\t */\n\treadonly buttonLabel = input<string>('');\n\n\t/**\n\t * Alternative for the button\n\t */\n\tbuttonAlt = input<string>('');\n\n\theadingHiddenIfSingleItem = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Palette for both the button and the popover content\n\t */\n\treadonly palette = input<Palette>('none');\n\n\t/**\n\t * Size for both button and popover content\n\t */\n\treadonly size = input<'M' | 'S' | 'XS'>();\n\n\t/**\n\t * Icon shows in button and next to popover's title\n\t */\n\treadonly icon = input<LuccaIcon>();\n\n\t/**\n\t * State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on\n\t * the provided state.\n\t *\n\t * If one of the icon or palette inputs are filled along with the state input, their values will have the priority over\n\t * state (so setting state to success and palette to warning will make the palette warning)\n\t */\n\treadonly state = input<CalloutState>();\n\n\t/**\n\t * Heading for the details popover\n\t */\n\treadonly heading = input<PortalContent>();\n\n\tfeedbackItems = contentChildren(CalloutFeedbackItemComponent, { descendants: true });\n\n\tcontentSize = computed((): 'S' | 'M' | undefined => {\n\t\tconst size = this.size();\n\t\tif (size === 'XS') {\n\t\t\treturn 'S';\n\t\t}\n\t\treturn size;\n\t});\n\n\tcalloutClasses = computed(() => {\n\t\tconst palette = getCalloutPalette(this.state(), this.palette());\n\t\treturn {\n\t\t\t[`mod-${this.size()}`]: !!this.size(),\n\t\t\t[`palette-${palette}`]: !!palette,\n\t\t};\n\t});\n\n\tcalloutOverlayClasses = computed(() => {\n\t\treturn {\n\t\t\t[`mod-${this.contentSize()}`]: !!this.contentSize(),\n\t\t};\n\t});\n\n\tcalloutOverlayHeadClasses = computed(() => {\n\t\tconst palette = getCalloutPalette(this.state(), this.palette());\n\t\treturn {\n\t\t\t[`palette-${palette}`]: !!palette,\n\t\t};\n\t});\n}\n","@let calloutIcon = state() | luCalloutIcon: icon();\n\n<button\n\ttype=\"button\"\n\tclass=\"calloutPopover\"\n\t[class]=\"calloutClasses()\"\n\t[luPopover2]=\"overlayContentRef\"\n\t[luPopoverTrigger]=\"'click+hover'\"\n\t[luPopoverOpenDelay]=\"openDelay()\"\n\t[luPopoverCloseDelay]=\"closeDelay()\"\n\t#overlayOriginRef\n>\n\t@if (calloutIcon) {\n\t\t<lu-icon class=\"calloutPopover-icon\" [icon]=\"calloutIcon\" />\n\t}\n\t<span class=\"calloutPopover-content\" aria-hidden=\"true\">{{ buttonLabel() }}</span>\n\t<span class=\"pr-u-mask\">{{ buttonAlt() || buttonLabel() }}</span>\n</button>\n<ng-template #overlayContentRef>\n\t<div class=\"lu-popover-content calloutPopover-overlay\" [class]=\"calloutOverlayClasses()\">\n\t\t@if (calloutIcon) {\n\t\t\t<div class=\"pr-u-flexShrink0\">\n\t\t\t\t<lu-icon class=\"calloutPopover-overlay-icon\" [class]=\"calloutOverlayHeadClasses()\" [icon]=\"calloutIcon\" />\n\t\t\t</div>\n\t\t}\n\t\t<div class=\"pr-u-flexGrow1\">\n\t\t\t@if (heading()) {\n\t\t\t\t@if (!headingHiddenIfSingleItem() || feedbackItems().length !== 1) {\n\t\t\t\t\t<div class=\"calloutPopover-overlay-head\">\n\t\t\t\t\t\t<strong class=\"calloutPopover-overlay-head-title\">\n\t\t\t\t\t\t\t<ng-container *luPortal=\"heading()\" />\n\t\t\t\t\t\t</strong>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t}\n\t\t\t<div class=\"calloutPopover-overlay-content\">\n\t\t\t\t<ng-content />\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</ng-template>\n","export const Translations = {\n\tpt: {\n\t\tclose: 'Fechar',\n\t},\n\t'nl-BE': {\n\t\tclose: 'Sluiten',\n\t},\n\tnl: {\n\t\tclose: 'Sluiten',\n\t},\n\tit: {\n\t\tclose: 'Chiudere',\n\t},\n\tde: {\n\t\tclose: 'Schließen',\n\t},\n\tfr: {\n\t\tclose: 'Fermer',\n\t},\n\tes: {\n\t\tclose: 'Cerrar',\n\t},\n\ten: {\n\t\tclose: 'Close',\n\t},\n};\n","import { InjectionToken } from '@angular/core';\nimport { LuTranslation } from '@lucca-front/ng/core';\nimport { Translations } from './translations';\n\nexport const LU_CALLOUT_TRANSLATIONS = new InjectionToken('LuCalloutTranslations', {\n\tfactory: () => luCalloutTranslations,\n});\n\nexport interface LuCalloutLabel {\n\tclose: string;\n}\n\nexport const luCalloutTranslations: LuTranslation<LuCalloutLabel> = Translations;\n","import { booleanAttribute, ChangeDetectionStrategy, Component, EventEmitter, HostBinding, input, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { LuccaIcon } from '@lucca-front/icons';\nimport { getIntl, Palette, PortalContent, PortalDirective } from '@lucca-front/ng/core';\nimport { IconComponent } from '@lucca-front/ng/icon';\nimport { CalloutIconPipe } from '../callout-icon.pipe';\nimport { CalloutState } from '../callout-state';\nimport { LU_CALLOUT_TRANSLATIONS } from '../callout.translate';\nimport { getCalloutPalette } from '../callout.utils';\n\n@Component({\n\tselector: 'lu-callout',\n\timports: [PortalDirective, CalloutIconPipe, IconComponent],\n\ttemplateUrl: './callout.component.html',\n\tstyleUrl: './callout.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutComponent {\n\t@Input()\n\t/**\n\t * The title of the callout\n\t */\n\theading: PortalContent;\n\n\t@Input()\n\t/**\n\t * Which palette should be used for the entire callout.\n\t * Defaults to none (inherits parent palette)\n\t */\n\tpalette: Palette = 'none';\n\n\t@Input()\n\t/**\n\t * Which size should the callout be? Defaults to medium\n\t */\n\tsize: 'M' | 'S';\n\n\t@Input({ transform: booleanAttribute })\n\t/**\n\t * Should we display the remove icon?\n\t */\n\tremovable = false;\n\n\t@Input()\n\t/**\n\t * Which icon should we display in the callout if any?\n\t * Defaults to no icon.\n\t */\n\ticon: LuccaIcon;\n\n\t@Input()\n\t/**\n\t * State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on\n\t * the provided state.\n\t *\n\t * If one of the icon or palette inputs are filled along with the state input, their values will have the priority over\n\t * state (so setting state to success and palette to warning will make the palette warning)\n\t */\n\tstate: CalloutState;\n\n\t@Input({ transform: booleanAttribute })\n\t/**\n\t * Is the callout removed? Works with two way binding too.\n\t */\n\tremoved = false;\n\n\t@HostBinding('attr.hidden')\n\tget hiddenAttr(): 'hidden' | null {\n\t\treturn this.removed ? 'hidden' : null;\n\t}\n\n\t@Output()\n\tremovedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n\tAI = input(false, { transform: booleanAttribute });\n\n\ticonAlt = input<string | null>(null);\n\n\tpublic intl = getIntl(LU_CALLOUT_TRANSLATIONS);\n\n\tget calloutClasses() {\n\t\tconst palette = getCalloutPalette(this.state, this.palette);\n\t\treturn {\n\t\t\t[`mod-${this.size}`]: !!this.size,\n\t\t\t[`palette-${palette}`]: !this.AI() && !!palette,\n\t\t};\n\t}\n}\n","@if (!removed) {\n\t<div class=\"callout\" [class]=\"calloutClasses\" [class.mod-AI]=\"AI()\">\n\t\t@if (state | luCalloutIcon: icon; as calloutIcon) {\n\t\t\t<div class=\"callout-icon\">\n\t\t\t\t<lu-icon [icon]=\"calloutIcon\" [alt]=\"iconAlt()\" />\n\t\t\t</div>\n\t\t}\n\t\t<div class=\"callout-content\">\n\t\t\t@if (heading) {\n\t\t\t\t<strong class=\"callout-content-title\">\n\t\t\t\t\t<ng-container *luPortal=\"heading\" />\n\t\t\t\t</strong>\n\t\t\t}\n\t\t\t<div class=\"callout-content-description\">\n\t\t\t\t<ng-content />\n\t\t\t</div>\n\t\t</div>\n\t\t@if (removable) {\n\t\t\t<button type=\"button\" class=\"callout-kill\" (click)=\"removed = true; removedChange.emit(true)\">\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl.close }}</span>\n\t\t\t</button>\n\t\t}\n\t</div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAYa,uBAAuB,CAAA;AAVpC,IAAA,WAAA,GAAA;QAWC,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AACtD;8GAFY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,sUARzB,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA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;AAWD;;AAEG;QACH,OAAO,EAAA,CAAA;sBAJN,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;gBAOlC,UAAU,EAAA,CAAA;sBADb,WAAW;uBAAC,aAAa;gBAM1B,aAAa,EAAA,CAAA;sBADZ;;;AEvEF;;AAEG;;;;"}
1
+ {"version":3,"file":"lucca-front-ng-callout.mjs","sources":["../../../packages/ng/callout/callout-actions/callout-actions.component.ts","../../../packages/ng/callout/callout-state.ts","../../../packages/ng/callout/callout.utils.ts","../../../packages/ng/callout/callout-icon.pipe.ts","../../../packages/ng/callout/callout-disclosure/callout-disclosure.component.ts","../../../packages/ng/callout/callout-disclosure/callout-disclosure.component.html","../../../packages/ng/callout/callout-feedback-item/callout-feedback-item.component.ts","../../../packages/ng/callout/callout-feedback-item/callout-feedback-item.component.html","../../../packages/ng/callout/callout-feedback-list/callout-feedback-list.component.ts","../../../packages/ng/callout/callout-popover/callout-popover.component.ts","../../../packages/ng/callout/callout-popover/callout-popover.component.html","../../../packages/ng/callout/translations.ts","../../../packages/ng/callout/callout.translate.ts","../../../packages/ng/callout/callout/callout.component.ts","../../../packages/ng/callout/callout/callout.component.html","../../../packages/ng/callout/lucca-front-ng-callout.ts"],"sourcesContent":["import { booleanAttribute, ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n\tselector: 'lu-callout-actions',\n\ttemplate: '<ng-content />',\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'callout-content-description-actions',\n\t\t'[class.mod-inline]': 'inline()',\n\t},\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CalloutActionsComponent {\n\treadonly inline = input(false, { transform: booleanAttribute });\n}\n","import { LuccaIcon } from '@lucca-front/icons';\nimport { Palette } from '@lucca-front/ng/core';\n\nexport const CalloutStates = ['success', 'warning', 'error'] as const;\n\nexport type CalloutState = (typeof CalloutStates)[number];\n\nexport const CalloutStateMap: Record<CalloutState, { icon: LuccaIcon; palette: Palette }> = {\n\tsuccess: {\n\t\ticon: 'signSuccess',\n\t\tpalette: 'success',\n\t},\n\twarning: {\n\t\ticon: 'signWarning',\n\t\tpalette: 'warning',\n\t},\n\terror: {\n\t\ticon: 'signError',\n\t\tpalette: 'error',\n\t},\n};\n","import { LuccaIcon } from '@lucca-front/icons';\nimport { Palette } from '@lucca-front/ng/core';\nimport { CalloutState, CalloutStateMap } from './callout-state';\n\n/**\n * Get icon for callout\n *\n * If the icon is defined then it takes priority over the callout state icon\n */\nexport function getCalloutIcon(state: CalloutState | undefined, icon: LuccaIcon | undefined): LuccaIcon | undefined {\n\tconst stateMap = CalloutStateMap[state] ?? { icon };\n\treturn icon ?? stateMap.icon;\n}\n\n/**\n * Get palette for callout\n *\n * If the palette is different from \"none\" then it takes priority over the callout state palette\n */\nexport function getCalloutPalette(state: CalloutState | undefined, palette: Palette): string {\n\tconst stateMap = CalloutStateMap[state] ?? { palette };\n\treturn palette !== 'none' ? palette : stateMap.palette;\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { LuccaIcon } from '@lucca-front/icons';\nimport { CalloutState } from './callout-state';\nimport { getCalloutIcon } from './callout.utils';\n\n/**\n * Get icon for callout\n *\n * If the icon is defined then it takes priority over the callout state icon\n */\n@Pipe({\n\tname: 'luCalloutIcon',\n})\nexport class CalloutIconPipe implements PipeTransform {\n\ttransform(state: CalloutState, icon: LuccaIcon): LuccaIcon | undefined {\n\t\treturn getCalloutIcon(state, icon);\n\t}\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, booleanAttribute, output, input, computed } from '@angular/core';\nimport { LuccaIcon } from '@lucca-front/icons';\nimport { Palette, PortalContent, PortalDirective } from '@lucca-front/ng/core';\nimport { IconComponent } from '@lucca-front/ng/icon';\nimport { CalloutIconPipe } from '../callout-icon.pipe';\nimport { CalloutState } from '../callout-state';\nimport { getCalloutPalette } from '../callout.utils';\n\n@Component({\n\tselector: 'lu-callout-disclosure',\n\timports: [IconComponent, PortalDirective, CalloutIconPipe],\n\ttemplateUrl: './callout-disclosure.component.html',\n\tstyleUrl: './callout-disclosure.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutDisclosureComponent {\n\treadonly heading = input.required<PortalContent>();\n\n\treadonly icon = input<LuccaIcon>();\n\n\treadonly palette = input<Palette>('none');\n\n\treadonly size = input<'M' | 'S'>('M');\n\n\t/**\n\t * State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on\n\t * the provided state.\n\t *\n\t * If one of the icon or palette inputs are filled along with the state input, their values will have the priority over\n\t * state (so setting state to success and palette to warning will make the palette warning)\n\t */\n\treadonly state = input<CalloutState>();\n\n\treadonly open = input(false, { transform: booleanAttribute });\n\n\treadonly calloutPalette = computed<string>(() => {\n\t\treturn getCalloutPalette(this.state(), this.palette());\n\t});\n\n\treadonly calloutClasses = computed(() => {\n\t\tconst palette = this.calloutPalette();\n\t\treturn {\n\t\t\t[`mod-${this.size()}`]: !!this.size(),\n\t\t\t[`palette-${palette}`]: !!palette,\n\t\t};\n\t});\n\n\topenChange = output<boolean>();\n\n\tpublic onToggle(event: Event) {\n\t\tif (event.target instanceof HTMLDetailsElement) {\n\t\t\tthis.openChange.emit(event.target.open);\n\t\t}\n\t}\n}\n","@let calloutIcon = state() | luCalloutIcon: icon();\n\n<details\n\tclass=\"calloutDisclosure\"\n\t[class]=\"calloutClasses()\"\n\t[class.mod-iconless]=\"!calloutIcon\"\n\t[open]=\"open()\"\n\t(toggle)=\"onToggle($event)\"\n>\n\t<summary class=\"calloutDisclosure-summary\">\n\t\t@if (calloutIcon) {\n\t\t\t<lu-icon class=\"calloutDisclosure-summary-icon\" [icon]=\"calloutIcon\" />\n\t\t}\n\t\t<span class=\"calloutDisclosure-summary-title\">\n\t\t\t<ng-container *luPortal=\"heading()\" />\n\t\t</span>\n\t\t<lu-icon class=\"calloutDisclosure-summary-chevron\" icon=\"arrowChevronBottom\" />\n\t</summary>\n\t<div class=\"calloutDisclosure-details\">\n\t\t<ng-content />\n\t</div>\n</details>\n","import { ChangeDetectionStrategy, Component, Directive, ViewEncapsulation } from '@angular/core';\n\n@Directive({\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-feedback-item-description',\n})\nexport class CalloutFeedbackItemDescriptionDirective {}\n\n@Component({\n\tselector: 'li[lu-callout-feedback-item]',\n\timports: [],\n\ttemplateUrl: './callout-feedback-item.component.html',\n\tstyleUrl: './callout-feedback-item.component.scss',\n\thost: {\n\t\tclass: 'calloutFeedbackList-item',\n\t},\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CalloutFeedbackItemComponent {}\n","<span class=\"calloutFeedbackList-item-description\">\n\t<ng-content select=\"lu-feedback-item-description\" />\n</span>\n<div class=\"calloutFeedbackList-item-actions\">\n\t<ng-content select=\"[lu-feedback-item-action]\" />\n</div>\n","import { ChangeDetectionStrategy, Component, inject, input, ViewEncapsulation } from '@angular/core';\nimport { LuClass, Palette, ɵeffectWithDeps } from '@lucca-front/ng/core';\n\n@Component({\n\tselector: 'ul[lu-callout-feedback-list]',\n\ttemplate: '<ng-content />',\n\tstyleUrl: './callout-feedback-list.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\tclass: 'calloutFeedbackList',\n\t},\n\tproviders: [LuClass],\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutFeedbackListComponent {\n\t#luClass = inject(LuClass);\n\n\treadonly palette = input<Palette>();\n\n\treadonly size = input<'M' | 'S'>();\n\n\tconstructor() {\n\t\tɵeffectWithDeps([this.palette, this.size], (palette, size) => {\n\t\t\tthis.#luClass.setState({ [`palette-${palette}`]: !!palette, [`mod-${size}`]: !!size });\n\t\t});\n\t}\n}\n","import { booleanAttribute, ChangeDetectionStrategy, Component, computed, contentChildren, input, numberAttribute, ViewEncapsulation } from '@angular/core';\nimport { LuccaIcon } from '@lucca-front/icons';\nimport { Palette, PortalContent, PortalDirective } from '@lucca-front/ng/core';\nimport { IconComponent } from '@lucca-front/ng/icon';\nimport { PopoverDirective } from '@lucca-front/ng/popover2';\nimport { CalloutFeedbackItemComponent } from '../callout-feedback-item/callout-feedback-item.component';\nimport { CalloutIconPipe } from '../callout-icon.pipe';\nimport { CalloutState } from '../callout-state';\nimport { getCalloutPalette } from '../callout.utils';\n\n@Component({\n\tselector: 'lu-callout-popover',\n\timports: [IconComponent, PortalDirective, PopoverDirective, CalloutIconPipe],\n\ttemplateUrl: './callout-popover.component.html',\n\tstyleUrl: './callout-popover.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutPopoverComponent {\n\t/**\n\t * Debounce for the popover to open (mouse will have to be on the element fox openDelay milliseconds for popover to show)\n\t */\n\treadonly openDelay = input(50, { transform: numberAttribute });\n\n\t/**\n\t * Debounce for the popover to close (mouse will have to be out of both popover and trigger for closeDelay milliseconds for it to close)\n\t */\n\treadonly closeDelay = input(500, { transform: numberAttribute });\n\n\t/**\n\t * Label (visual only) to put inside the button, often used to show just a number\n\t */\n\treadonly buttonLabel = input<string>();\n\n\t/**\n\t * Alternative for the button\n\t */\n\treadonly buttonAlt = input<string>('');\n\n\treadonly headingHiddenIfSingleItem = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Palette for both the button and the popover content\n\t */\n\treadonly palette = input<Palette>('none');\n\n\t/**\n\t * Size for both button and popover content\n\t */\n\treadonly size = input<'M' | 'S' | 'XS'>();\n\n\t/**\n\t * Icon shows in button and next to popover's title\n\t */\n\treadonly icon = input<LuccaIcon>();\n\n\t/**\n\t * State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on\n\t * the provided state.\n\t *\n\t * If one of the icon or palette inputs are filled along with the state input, their values will have the priority over\n\t * state (so setting state to success and palette to warning will make the palette warning)\n\t */\n\treadonly state = input<CalloutState>();\n\n\t/**\n\t * Heading for the details popover\n\t */\n\treadonly heading = input<PortalContent>();\n\n\treadonly feedbackItems = contentChildren(CalloutFeedbackItemComponent, { descendants: true });\n\n\treadonly contentSize = computed<'S' | 'M' | undefined>(() => {\n\t\tconst size = this.size();\n\t\treturn size === 'XS' ? 'S' : size;\n\t});\n\n\treadonly calloutOverlayClasses = computed(() => ({\n\t\t[`mod-${this.contentSize()}`]: !!this.contentSize(),\n\t}));\n\n\treadonly calloutPalette = computed(() => getCalloutPalette(this.state(), this.palette()));\n\n\treadonly calloutClasses = computed(() => {\n\t\tconst palette = this.calloutPalette();\n\t\treturn {\n\t\t\t[`mod-${this.size()}`]: !!this.size(),\n\t\t\t[`palette-${palette}`]: !!palette,\n\t\t};\n\t});\n\n\treadonly calloutOverlayHeadClasses = computed(() => ({\n\t\t[`palette-${this.calloutPalette()}`]: !!this.calloutPalette(),\n\t}));\n}\n","@let calloutIcon = state() | luCalloutIcon: icon();\n\n<button\n\ttype=\"button\"\n\tclass=\"calloutPopover\"\n\t[class]=\"calloutClasses()\"\n\t[luPopover2]=\"overlayContentRef\"\n\t[luPopoverTrigger]=\"'click+hover'\"\n\t[luPopoverOpenDelay]=\"openDelay()\"\n\t[luPopoverCloseDelay]=\"closeDelay()\"\n\t#overlayOriginRef\n>\n\t@if (calloutIcon) {\n\t\t<lu-icon class=\"calloutPopover-icon\" [icon]=\"calloutIcon\" />\n\t}\n\t<span class=\"calloutPopover-content\" aria-hidden=\"true\">{{ buttonLabel() }}</span>\n\t<span class=\"pr-u-mask\">{{ buttonAlt() || buttonLabel() }}</span>\n</button>\n<ng-template #overlayContentRef>\n\t<div class=\"lu-popover-content calloutPopover-overlay\" [class]=\"calloutOverlayClasses()\">\n\t\t@if (calloutIcon) {\n\t\t\t<div class=\"pr-u-flexShrink0\">\n\t\t\t\t<lu-icon class=\"calloutPopover-overlay-icon\" [class]=\"calloutOverlayHeadClasses()\" [icon]=\"calloutIcon\" />\n\t\t\t</div>\n\t\t}\n\t\t<div class=\"pr-u-flexGrow1\">\n\t\t\t@if (heading()) {\n\t\t\t\t@if (!headingHiddenIfSingleItem() || feedbackItems().length !== 1) {\n\t\t\t\t\t<div class=\"calloutPopover-overlay-head\">\n\t\t\t\t\t\t<strong class=\"calloutPopover-overlay-head-title\">\n\t\t\t\t\t\t\t<ng-container *luPortal=\"heading()\" />\n\t\t\t\t\t\t</strong>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t}\n\t\t\t<div class=\"calloutPopover-overlay-content\">\n\t\t\t\t<ng-content />\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</ng-template>\n","export const Translations = {\n\tpt: {\n\t\tclose: 'Fechar',\n\t},\n\t'nl-BE': {\n\t\tclose: 'Sluiten',\n\t},\n\tnl: {\n\t\tclose: 'Sluiten',\n\t},\n\tit: {\n\t\tclose: 'Chiudere',\n\t},\n\tde: {\n\t\tclose: 'Schließen',\n\t},\n\tfr: {\n\t\tclose: 'Fermer',\n\t},\n\tes: {\n\t\tclose: 'Cerrar',\n\t},\n\ten: {\n\t\tclose: 'Close',\n\t},\n};\n","import { InjectionToken } from '@angular/core';\nimport { LuTranslation } from '@lucca-front/ng/core';\nimport { Translations } from './translations';\n\nexport const LU_CALLOUT_TRANSLATIONS = new InjectionToken('LuCalloutTranslations', {\n\tfactory: () => luCalloutTranslations,\n});\n\nexport interface LuCalloutLabel {\n\tclose: string;\n}\n\nexport const luCalloutTranslations: LuTranslation<LuCalloutLabel> = Translations;\n","import { booleanAttribute, ChangeDetectionStrategy, Component, computed, input, linkedSignal, output, ViewEncapsulation } from '@angular/core';\nimport { LuccaIcon } from '@lucca-front/icons';\nimport { getIntl, Palette, PortalContent, PortalDirective } from '@lucca-front/ng/core';\nimport { IconComponent } from '@lucca-front/ng/icon';\nimport { CalloutIconPipe } from '../callout-icon.pipe';\nimport { CalloutState } from '../callout-state';\nimport { LU_CALLOUT_TRANSLATIONS } from '../callout.translate';\nimport { getCalloutPalette } from '../callout.utils';\n\n@Component({\n\tselector: 'lu-callout',\n\timports: [PortalDirective, CalloutIconPipe, IconComponent],\n\ttemplateUrl: './callout.component.html',\n\tstyleUrl: './callout.component.scss',\n\thost: {\n\t\t'[attr.hidden]': 'removed() ? \"hidden\" : null',\n\t},\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutComponent {\n\tpublic intl = getIntl(LU_CALLOUT_TRANSLATIONS);\n\n\t/**\n\t * The title of the callout\n\t */\n\treadonly heading = input<PortalContent>();\n\n\t/**\n\t * Which palette should be used for the entire callout.\n\t * Defaults to none (inherits parent palette)\n\t */\n\treadonly palette = input<Palette>('none');\n\n\t/**\n\t * Which size should the callout be? Defaults to medium\n\t */\n\treadonly size = input<'M' | 'S'>();\n\n\t/**\n\t * State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on\n\t * the provided state.\n\t *\n\t * If one of the icon or palette inputs are filled along with the state input, their values will have the priority over\n\t * state (so setting state to success and palette to warning will make the palette warning)\n\t */\n\treadonly state = input<CalloutState>();\n\n\t/**\n\t * Which icon should we display in the callout if any?\n\t * Defaults to no icon.\n\t */\n\treadonly icon = input<LuccaIcon>();\n\n\t/**\n\t * Should we display the remove icon?\n\t */\n\treadonly removable = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Is the callout removed? Works with two way binding too.\n\t */\n\n\treadonly removed = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Defines the icon’s alt attribute used for accessibility\n\t */\n\treadonly iconAlt = input<string | null>(null);\n\n\t/**\n\t * Displayed in AI mode\n\t */\n\treadonly AI = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Emit event when button removed is click\n\t */\n\treadonly removedChange = output<boolean>();\n\n\treadonly removedRef = linkedSignal(() => this.removed());\n\n\treadonly calloutClasses = computed(() => {\n\t\tconst palette = getCalloutPalette(this.state(), this.palette());\n\t\tconst size = this.size();\n\t\tconst AI = this.AI();\n\t\treturn {\n\t\t\t[`mod-${size}`]: !!size,\n\t\t\t[`palette-${palette}`]: !AI && !!palette,\n\t\t};\n\t});\n}\n","@if (!removedRef()) {\n\t<div class=\"callout\" [class]=\"calloutClasses()\" [class.mod-AI]=\"AI()\">\n\t\t@if (state() | luCalloutIcon: icon(); as calloutIcon) {\n\t\t\t<div class=\"callout-icon\">\n\t\t\t\t<lu-icon [icon]=\"calloutIcon\" [alt]=\"iconAlt()\" />\n\t\t\t</div>\n\t\t}\n\t\t<div class=\"callout-content\">\n\t\t\t@if (heading()) {\n\t\t\t\t<strong class=\"callout-content-title\">\n\t\t\t\t\t<ng-container *luPortal=\"heading()\" />\n\t\t\t\t</strong>\n\t\t\t}\n\t\t\t<div class=\"callout-content-description\">\n\t\t\t\t<ng-content />\n\t\t\t</div>\n\t\t</div>\n\t\t@if (removable()) {\n\t\t\t<button type=\"button\" class=\"callout-kill\" (click)=\"removedRef.set(true); removedChange.emit(true)\">\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl.close }}</span>\n\t\t\t</button>\n\t\t}\n\t</div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵeffectWithDeps"],"mappings":";;;;;;MAYa,uBAAuB,CAAA;AAVpC,IAAA,WAAA,GAAA;QAWU,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAC/D;8GAFY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,sUARzB,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBA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C,MAAM,EAChC,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,+yBAAA,EAAA,MAAA,EAAA,CAAA,uqPAAA,CAAA,EAAA;;;AElBtC;;AAEG;;;;"}
@@ -71,7 +71,7 @@ class ChipComponent {
71
71
  this.displayedIcon = computed(() => (this.isWarning() ? 'signWarning' : this.isCritical() ? 'signError' : this.icon()));
72
72
  }
73
73
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: ChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
74
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.2", type: ChipComponent, isStandalone: true, selector: "lu-chip, button[luChip], a[luChip]", inputs: { withEllipsis: { classPropertyName: "withEllipsis", publicName: "withEllipsis", isSignal: true, isRequired: false, transformFunction: null }, unkillable: { classPropertyName: "unkillable", publicName: "unkillable", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { kill: "kill" }, host: { properties: { "class.is-disabled": "disabled()", "class.palette-product": "palette() === \"product\"", "class.mod-S": "size() === \"S\"", "class.palette-warning": "isWarning()", "class.palette-critical": "isCritical()" }, classAttribute: "chip" }, ngImport: i0, template: "@if (displayedIcon()) {\n\t<lu-icon [icon]=\"displayedIcon()\" [alt]=\"stateAlt()\" />\n}\n\n<ng-template #content><ng-content /></ng-template>\n\n@if (withEllipsis()) {\n\t<span class=\"chip-content pr-u-ellipsis\" luTooltip luTooltipWhenEllipsis><ng-container *ngTemplateOutlet=\"content\" /></span>\n} @else {\n\t<ng-container *ngTemplateOutlet=\"content\" />\n}\n@if (!unkillable() && !disabled()) {\n\t<button type=\"button\" class=\"chip-kill\" (click)=\"kill.emit($event)\">\n\t\t<span class=\"pr-u-mask\">{{ intl.delete }}</span>\n\t</button>\n}\n", styles: ["@layer components{.chip{--components-chip-font: var(--pr-t-font-body-S);--components-chip-backgroundColor: var(--palettes-100, var(--palettes-neutral-100));--components-chip-color: var(--palettes-800, var(--pr-t-color-text));--components-chip-borderRadius: var(--pr-t-border-radius-default);--components-chip-kill-size: .75rem;--components-chip-kill-disk-color: var(--palettes-800, var(--palettes-neutral-800));--components-chip-kill-cross-color: var(--palettes-text, var(--palettes-neutral-text));--components-chip-kill-background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='16' width='16' fill='none'%3E%3Cpath d='M5.80473 4.86192C5.54438 4.60157 5.12227 4.60157 4.86192 4.86192C4.60157 5.12227 4.60157 5.54438 4.86192 5.80473L7.05718 7.99999L4.86192 10.1953C4.60157 10.4556 4.60157 10.8777 4.86192 11.1381C5.12227 11.3984 5.54438 11.3984 5.80473 11.1381L7.99999 8.9428L10.1953 11.1381C10.4556 11.3984 10.8777 11.3984 11.1381 11.1381C11.3984 10.8777 11.3984 10.4556 11.1381 10.1953L8.9428 7.99999L11.1381 5.80473C11.3984 5.54438 11.3984 5.12227 11.1381 4.86192C10.8777 4.60157 10.4556 4.60157 10.1953 4.86192L7.99999 7.05718L5.80473 4.86192Z' fill='currentColor'/%3E%3C/svg%3E\");--components-chip-fontSize: var(--pr-t-font-body-S-fontSize);--components-chip-lineHeight: var(--pr-t-font-body-S-lineHeight);background-color:var(--components-chip-backgroundColor);border:none;border-radius:var(--components-chip-borderRadius);color:var(--components-chip-color);display:inline-flex;align-items:center;position:relative;vertical-align:middle;padding-block:calc(var(--pr-t-spacings-50) / 2);padding-inline:var(--pr-t-spacings-100);font:var(--components-chip-font);max-inline-size:100%}.chip .lucca-icon{--icon-size: 1rem;margin-inline-end:var(--pr-t-spacings-50)}.chip-content{outline:none}.chip-kill{padding:0;border:0;inline-size:100%;background-color:transparent;color:inherit;text-align:start;display:block;font:inherit;display:grid;grid-template-columns:1fr;grid-template-rows:1fr;grid-template-areas:\"main\";place-items:center;inline-size:var(--pr-t-spacings-300);block-size:var(--pr-t-spacings-300);margin:calc(var(--pr-t-spacings-75) * -1);margin-inline-start:var(--pr-t-spacings-25);flex-shrink:0;cursor:pointer}.chip-kill:before,.chip-kill:after{content:\"\";grid-area:main;inline-size:var(--components-chip-kill-size);block-size:var(--components-chip-kill-size)}.chip-kill:before{border-radius:var(--pr-t-border-radius-full);background-color:var(--components-chip-kill-disk-color)}.chip-kill:after{-webkit-mask-image:var(--components-chip-kill-background-image);mask-image:var(--components-chip-kill-background-image);-webkit-mask-size:var(--components-chip-kill-size);mask-size:var(--components-chip-kill-size);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;background-color:var(--components-chip-kill-cross-color)}.chip-kill:hover{--components-chip-kill-disk-color: var(--palettes-700, var(--palettes-neutral-700))}.chip-kill:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:-4px;border-radius:var(--pr-t-border-radius-full)}.chip-kill:active{--components-chip-kill-disk-color: var(--palettes-900, var(--palettes-neutral-900))}}@layer mods{.chip.mod-S{--components-chip-font: var(--pr-t-font-body-XS);--components-chip-borderRadius: var(--pr-t-border-radius-small)}.chip.mod-S .lucca-icon{--icon-size: .75rem}.chip.mod-unkillable .chip-kill{display:none}.chip.mod-clickable{cursor:pointer;text-decoration:none}.chip.is-disabled{--components-chip-backgroundColor: var(--palettes-neutral-200);--components-chip-color: var(--pr-t-color-text-subtle)}.chip.is-disabled .chip-kill{display:none}.chip:has(.chip-content:focus-visible){outline:2px solid var(--palettes-product-700);outline-offset:2px}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: LuTooltipModule }, { kind: "directive", type: i1.LuTooltipTriggerDirective, selector: "[luTooltip]", inputs: ["luTooltip", "luTooltipEnterDelay", "luTooltipLeaveDelay", "luTooltipDisabled", "luTooltipOnlyForDisplay", "luTooltipPosition", "luTooltipWhenEllipsis", "luTooltipAnchor"], exportAs: ["luTooltip"] }, { kind: "component", type: IconComponent, selector: "lu-icon", inputs: ["icon", "alt", "size", "color", "AI"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
74
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.2", type: ChipComponent, isStandalone: true, selector: "lu-chip, button[luChip], a[luChip]", inputs: { withEllipsis: { classPropertyName: "withEllipsis", publicName: "withEllipsis", isSignal: true, isRequired: false, transformFunction: null }, unkillable: { classPropertyName: "unkillable", publicName: "unkillable", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { kill: "kill" }, host: { properties: { "class.is-disabled": "disabled()", "class.palette-product": "palette() === \"product\"", "class.mod-S": "size() === \"S\"", "class.palette-warning": "isWarning()", "class.palette-critical": "isCritical()" }, classAttribute: "chip" }, ngImport: i0, template: "@if (displayedIcon()) {\n\t<lu-icon [icon]=\"displayedIcon()\" [alt]=\"stateAlt()\" />\n}\n\n<ng-template #content><ng-content /></ng-template>\n\n@if (withEllipsis()) {\n\t<span class=\"chip-content pr-u-ellipsis\" luTooltip luTooltipWhenEllipsis><ng-container *ngTemplateOutlet=\"content\" /></span>\n} @else {\n\t<ng-container *ngTemplateOutlet=\"content\" />\n}\n@if (!unkillable() && !disabled()) {\n\t<button type=\"button\" class=\"chip-kill\" (click)=\"kill.emit($event)\">\n\t\t<span class=\"pr-u-mask\">{{ intl.delete }}</span>\n\t</button>\n}\n", styles: ["@layer components{.chip{--components-chip-font: var(--pr-t-font-body-S);--components-chip-backgroundColor: var(--palettes-100, var(--palettes-neutral-100));--components-chip-color: var(--palettes-800, var(--pr-t-color-text));--components-chip-borderRadius: var(--pr-t-border-radius-default);--components-chip-kill-size: .75rem;--components-chip-kill-disk-color: var(--palettes-800, var(--palettes-neutral-800));--components-chip-kill-cross-color: var(--palettes-text, var(--palettes-neutral-text));--components-chip-kill-background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='16' width='16' fill='none'%3E%3Cpath d='M5.80473 4.86192C5.54438 4.60157 5.12227 4.60157 4.86192 4.86192C4.60157 5.12227 4.60157 5.54438 4.86192 5.80473L7.05718 7.99999L4.86192 10.1953C4.60157 10.4556 4.60157 10.8777 4.86192 11.1381C5.12227 11.3984 5.54438 11.3984 5.80473 11.1381L7.99999 8.9428L10.1953 11.1381C10.4556 11.3984 10.8777 11.3984 11.1381 11.1381C11.3984 10.8777 11.3984 10.4556 11.1381 10.1953L8.9428 7.99999L11.1381 5.80473C11.3984 5.54438 11.3984 5.12227 11.1381 4.86192C10.8777 4.60157 10.4556 4.60157 10.1953 4.86192L7.99999 7.05718L5.80473 4.86192Z' fill='currentColor'/%3E%3C/svg%3E\");--components-chip-fontSize: var(--pr-t-font-body-S-fontSize);--components-chip-lineHeight: var(--pr-t-font-body-S-lineHeight);background-color:var(--components-chip-backgroundColor);border:none;border-radius:var(--components-chip-borderRadius);color:var(--components-chip-color);display:inline-flex;align-items:center;position:relative;vertical-align:middle;padding-block:calc(var(--pr-t-spacings-50) / 2);padding-inline:var(--pr-t-spacings-100);font:var(--components-chip-font);max-inline-size:100%}.chip .lucca-icon{--icon-size: 1rem;margin-inline-end:var(--pr-t-spacings-50)}.chip-content{outline:none}.chip-kill{padding:0;border:0;inline-size:100%;background-color:transparent;color:inherit;text-align:start;display:block;font:inherit;display:grid;grid-template-columns:1fr;grid-template-rows:1fr;grid-template-areas:\"main\";place-items:center;inline-size:var(--pr-t-spacings-300);block-size:var(--pr-t-spacings-300);margin:calc(var(--pr-t-spacings-75) * -1);margin-inline-start:var(--pr-t-spacings-25);flex-shrink:0;cursor:pointer}.chip-kill:before,.chip-kill:after{content:\"\";grid-area:main;inline-size:var(--components-chip-kill-size);block-size:var(--components-chip-kill-size)}.chip-kill:before{border-radius:var(--pr-t-border-radius-full);background-color:var(--components-chip-kill-disk-color)}.chip-kill:after{-webkit-mask-image:var(--components-chip-kill-background-image);mask-image:var(--components-chip-kill-background-image);-webkit-mask-size:var(--components-chip-kill-size);mask-size:var(--components-chip-kill-size);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;background-color:var(--components-chip-kill-cross-color)}.chip-kill:hover{--components-chip-kill-disk-color: var(--palettes-700, var(--palettes-neutral-700))}.chip-kill:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:-4px;border-radius:var(--pr-t-border-radius-full)}.chip-kill:active{--components-chip-kill-disk-color: var(--palettes-900, var(--palettes-neutral-900))}}@layer mods{.chip.mod-S{--components-chip-font: var(--pr-t-font-body-XS);--components-chip-borderRadius: var(--pr-t-border-radius-small)}.chip.mod-S .lucca-icon{--icon-size: .75rem}.chip.mod-unkillable .chip-kill{display:none}.chip.mod-clickable{cursor:pointer;text-decoration:none}.chip.is-disabled{--components-chip-backgroundColor: var(--palettes-neutral-200);--components-chip-color: var(--pr-t-color-text-subtle)}.chip.is-disabled .chip-kill{display:none}.chip:has(.chip-content:focus-visible){outline:2px solid var(--palettes-product-700);outline-offset:2px}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: LuTooltipModule }, { kind: "directive", type: i1.LuTooltipTriggerDirective, selector: "[luTooltip]", inputs: ["luTooltip", "luTooltipEnterDelay", "luTooltipLeaveDelay", "luTooltipDisabled", "luTooltipOnlyForDisplay", "luTooltipPosition", "luTooltipWhenEllipsis", "luTooltipAnchor", "id"], exportAs: ["luTooltip"] }, { kind: "component", type: IconComponent, selector: "lu-icon", inputs: ["icon", "alt", "size", "color", "AI"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
75
75
  }
76
76
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: ChipComponent, decorators: [{
77
77
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"lucca-front-ng-chip.mjs","sources":["../../../packages/ng/chip/translations.ts","../../../packages/ng/chip/chip.translate.ts","../../../packages/ng/chip/chip.component.ts","../../../packages/ng/chip/chip.component.html","../../../packages/ng/chip/lucca-front-ng-chip.ts"],"sourcesContent":["export const Translations = {\n\tfr: {\n\t\tdelete: 'Supprimer',\n\t\twarning: 'Alerte',\n\t\terror: 'Erreur',\n\t},\n\tpt: {\n\t\tdelete: 'Eliminar',\n\t\twarning: 'Alerta',\n\t\terror: 'Erro',\n\t},\n\tes: {\n\t\tdelete: 'Eliminar',\n\t\twarning: 'Alerta',\n\t\terror: 'Error',\n\t},\n\t'nl-BE': {\n\t\tdelete: 'Verwijderen',\n\t\twarning: 'Waarschuwing',\n\t\terror: 'Fout',\n\t},\n\tnl: {\n\t\tdelete: 'Verwijderen',\n\t\twarning: 'Waarschuwing',\n\t\terror: 'Fout',\n\t},\n\tit: {\n\t\tdelete: 'Eliminare',\n\t\twarning: 'Avviso',\n\t\terror: 'Errore',\n\t},\n\tde: {\n\t\tdelete: 'Löschen',\n\t\twarning: 'Warnung',\n\t\terror: 'Fehler',\n\t},\n\ten: {\n\t\tdelete: 'Delete',\n\t\twarning: 'Warning',\n\t\terror: 'Error',\n\t},\n};\n","import { InjectionToken } from '@angular/core';\nimport { LuTranslation } from '@lucca-front/ng/core';\nimport { Translations } from './translations';\n\nexport const LU_CHIP_TRANSLATIONS = new InjectionToken('luChipTranslations', {\n\tfactory: () => luChipTranslations,\n});\n\nexport interface ChipTranslate {\n\tdelete: string;\n\terror: string;\n\twarning: string;\n}\n\nexport const luChipTranslations: LuTranslation<ChipTranslate> = Translations;\n","import { NgTemplateOutlet } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, input, output, ViewEncapsulation } from '@angular/core';\nimport { getIntl } from '@lucca-front/ng/core';\n\nimport { LuccaIcon } from '@lucca-front/icons';\nimport { IconComponent } from '@lucca-front/ng/icon';\nimport { LuTooltipModule } from '@lucca-front/ng/tooltip';\nimport { LU_CHIP_TRANSLATIONS } from './chip.translate';\n\n@Component({\n\tselector: 'lu-chip, button[luChip], a[luChip]',\n\ttemplateUrl: './chip.component.html',\n\tstyleUrl: './chip.component.scss',\n\tencapsulation: ViewEncapsulation.None,\n\timports: [NgTemplateOutlet, LuTooltipModule, IconComponent],\n\thost: {\n\t\tclass: 'chip',\n\t\t'[class.is-disabled]': 'disabled()',\n\t\t'[class.palette-product]': 'palette() === \"product\"',\n\t\t'[class.mod-S]': 'size() === \"S\"',\n\t\t'[class.palette-warning]': 'isWarning()',\n\t\t'[class.palette-critical]': 'isCritical()',\n\t},\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChipComponent {\n\tintl = getIntl(LU_CHIP_TRANSLATIONS);\n\n\twithEllipsis = input(false, { transform: booleanAttribute });\n\n\treadonly unkillable = input(false, { transform: booleanAttribute });\n\n\treadonly palette = input<string>();\n\n\treadonly disabled = input(false, { transform: booleanAttribute });\n\n\treadonly size = input<'S' | null>(null);\n\n\treadonly state = input<'warning' | 'critical' | null>(null);\n\n\treadonly stateAlt = computed(() => (this.isWarning() ? this.intl.warning : this.isCritical() ? this.intl.error : ''));\n\n\treadonly icon = input<LuccaIcon | null>(null);\n\n\treadonly kill = output<Event>();\n\n\treadonly isWarning = computed<boolean>(() => this.state() === 'warning');\n\treadonly isCritical = computed<boolean>(() => this.state() === 'critical');\n\treadonly displayedIcon = computed<LuccaIcon | null>(() => (this.isWarning() ? 'signWarning' : this.isCritical() ? 'signError' : this.icon()));\n}\n","@if (displayedIcon()) {\n\t<lu-icon [icon]=\"displayedIcon()\" [alt]=\"stateAlt()\" />\n}\n\n<ng-template #content><ng-content /></ng-template>\n\n@if (withEllipsis()) {\n\t<span class=\"chip-content pr-u-ellipsis\" luTooltip luTooltipWhenEllipsis><ng-container *ngTemplateOutlet=\"content\" /></span>\n} @else {\n\t<ng-container *ngTemplateOutlet=\"content\" />\n}\n@if (!unkillable() && !disabled()) {\n\t<button type=\"button\" class=\"chip-kill\" (click)=\"kill.emit($event)\">\n\t\t<span class=\"pr-u-mask\">{{ intl.delete }}</span>\n\t</button>\n}\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,MAAM,EAAE,WAAW;AACnB,QAAA,OAAO,EAAE,QAAQ;AACjB,QAAA,KAAK,EAAE,QAAQ;AACf,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,MAAM,EAAE,UAAU;AAClB,QAAA,OAAO,EAAE,QAAQ;AACjB,QAAA,KAAK,EAAE,MAAM;AACb,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,MAAM,EAAE,UAAU;AAClB,QAAA,OAAO,EAAE,QAAQ;AACjB,QAAA,KAAK,EAAE,OAAO;AACd,KAAA;AACD,IAAA,OAAO,EAAE;AACR,QAAA,MAAM,EAAE,aAAa;AACrB,QAAA,OAAO,EAAE,cAAc;AACvB,QAAA,KAAK,EAAE,MAAM;AACb,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,MAAM,EAAE,aAAa;AACrB,QAAA,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A,OAAA,EAAA,IAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAW9C,aAAa,EAAA,UAAA,EAAA,CAAA;kBAhBzB,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oCAAoC,EAG/B,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAC5B,OAAA,EAAA,CAAC,gBAAgB,EAAE,eAAe,EAAE,aAAa,CAAC,EACrD,IAAA,EAAA;AACL,wBAAA,KAAK,EAAE,MAAM;AACb,wBAAA,qBAAqB,EAAE,YAAY;AACnC,wBAAA,yBAAyB,EAAE,yBAAyB;AACpD,wBAAA,eAAe,EAAE,gBAAgB;AACjC,wBAAA,yBAAyB,EAAE,aAAa;AACxC,wBAAA,0BAA0B,EAAE,cAAc;qBAC1C,EACgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6iBAAA,EAAA,MAAA,EAAA,CAAA,isHAAA,CAAA,EAAA;;;AEvBhD;;AAEG;;;;"}
1
+ {"version":3,"file":"lucca-front-ng-chip.mjs","sources":["../../../packages/ng/chip/translations.ts","../../../packages/ng/chip/chip.translate.ts","../../../packages/ng/chip/chip.component.ts","../../../packages/ng/chip/chip.component.html","../../../packages/ng/chip/lucca-front-ng-chip.ts"],"sourcesContent":["export const Translations = {\n\tfr: {\n\t\tdelete: 'Supprimer',\n\t\twarning: 'Alerte',\n\t\terror: 'Erreur',\n\t},\n\tpt: {\n\t\tdelete: 'Eliminar',\n\t\twarning: 'Alerta',\n\t\terror: 'Erro',\n\t},\n\tes: {\n\t\tdelete: 'Eliminar',\n\t\twarning: 'Alerta',\n\t\terror: 'Error',\n\t},\n\t'nl-BE': {\n\t\tdelete: 'Verwijderen',\n\t\twarning: 'Waarschuwing',\n\t\terror: 'Fout',\n\t},\n\tnl: {\n\t\tdelete: 'Verwijderen',\n\t\twarning: 'Waarschuwing',\n\t\terror: 'Fout',\n\t},\n\tit: {\n\t\tdelete: 'Eliminare',\n\t\twarning: 'Avviso',\n\t\terror: 'Errore',\n\t},\n\tde: {\n\t\tdelete: 'Löschen',\n\t\twarning: 'Warnung',\n\t\terror: 'Fehler',\n\t},\n\ten: {\n\t\tdelete: 'Delete',\n\t\twarning: 'Warning',\n\t\terror: 'Error',\n\t},\n};\n","import { InjectionToken } from '@angular/core';\nimport { LuTranslation } from '@lucca-front/ng/core';\nimport { Translations } from './translations';\n\nexport const LU_CHIP_TRANSLATIONS = new InjectionToken('luChipTranslations', {\n\tfactory: () => luChipTranslations,\n});\n\nexport interface ChipTranslate {\n\tdelete: string;\n\terror: string;\n\twarning: string;\n}\n\nexport const luChipTranslations: LuTranslation<ChipTranslate> = Translations;\n","import { NgTemplateOutlet } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, input, output, ViewEncapsulation } from '@angular/core';\nimport { getIntl } from '@lucca-front/ng/core';\n\nimport { LuccaIcon } from '@lucca-front/icons';\nimport { IconComponent } from '@lucca-front/ng/icon';\nimport { LuTooltipModule } from '@lucca-front/ng/tooltip';\nimport { LU_CHIP_TRANSLATIONS } from './chip.translate';\n\n@Component({\n\tselector: 'lu-chip, button[luChip], a[luChip]',\n\ttemplateUrl: './chip.component.html',\n\tstyleUrl: './chip.component.scss',\n\tencapsulation: ViewEncapsulation.None,\n\timports: [NgTemplateOutlet, LuTooltipModule, IconComponent],\n\thost: {\n\t\tclass: 'chip',\n\t\t'[class.is-disabled]': 'disabled()',\n\t\t'[class.palette-product]': 'palette() === \"product\"',\n\t\t'[class.mod-S]': 'size() === \"S\"',\n\t\t'[class.palette-warning]': 'isWarning()',\n\t\t'[class.palette-critical]': 'isCritical()',\n\t},\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChipComponent {\n\tintl = getIntl(LU_CHIP_TRANSLATIONS);\n\n\treadonly withEllipsis = input(false, { transform: booleanAttribute });\n\n\treadonly unkillable = input(false, { transform: booleanAttribute });\n\n\treadonly palette = input<string>();\n\n\treadonly disabled = input(false, { transform: booleanAttribute });\n\n\treadonly size = input<'S' | null>(null);\n\n\treadonly state = input<'warning' | 'critical' | null>(null);\n\n\treadonly stateAlt = computed(() => (this.isWarning() ? this.intl.warning : this.isCritical() ? this.intl.error : ''));\n\n\treadonly icon = input<LuccaIcon | null>(null);\n\n\treadonly kill = output<Event>();\n\n\treadonly isWarning = computed<boolean>(() => this.state() === 'warning');\n\treadonly isCritical = computed<boolean>(() => this.state() === 'critical');\n\treadonly displayedIcon = computed<LuccaIcon | null>(() => (this.isWarning() ? 'signWarning' : this.isCritical() ? 'signError' : this.icon()));\n}\n","@if (displayedIcon()) {\n\t<lu-icon [icon]=\"displayedIcon()\" [alt]=\"stateAlt()\" />\n}\n\n<ng-template #content><ng-content /></ng-template>\n\n@if (withEllipsis()) {\n\t<span class=\"chip-content pr-u-ellipsis\" luTooltip luTooltipWhenEllipsis><ng-container *ngTemplateOutlet=\"content\" /></span>\n} @else {\n\t<ng-container *ngTemplateOutlet=\"content\" />\n}\n@if (!unkillable() && !disabled()) {\n\t<button type=\"button\" class=\"chip-kill\" (click)=\"kill.emit($event)\">\n\t\t<span class=\"pr-u-mask\">{{ intl.delete }}</span>\n\t</button>\n}\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,MAAM,EAAE,WAAW;AACnB,QAAA,OAAO,EAAE,QAAQ;AACjB,QAAA,KAAK,EAAE,QAAQ;AACf,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,MAAM,EAAE,UAAU;AAClB,QAAA,OAAO,EAAE,QAAQ;AACjB,QAAA,KAAK,EAAE,MAAM;AACb,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,MAAM,EAAE,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IAAA,EDFW,gBAAgB,EAAE,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,eAAe,wUAAE,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,KAAA,EAAA,MAAA,EAAA,OAAA,EAAA,IAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAW9C,aAAa,EAAA,UAAA,EAAA,CAAA;kBAhBzB,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oCAAoC,EAG/B,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAC5B,OAAA,EAAA,CAAC,gBAAgB,EAAE,eAAe,EAAE,aAAa,CAAC,EACrD,IAAA,EAAA;AACL,wBAAA,KAAK,EAAE,MAAM;AACb,wBAAA,qBAAqB,EAAE,YAAY;AACnC,wBAAA,yBAAyB,EAAE,yBAAyB;AACpD,wBAAA,eAAe,EAAE,gBAAgB;AACjC,wBAAA,yBAAyB,EAAE,aAAa;AACxC,wBAAA,0BAA0B,EAAE,cAAc;qBAC1C,EACgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6iBAAA,EAAA,MAAA,EAAA,CAAA,isHAAA,CAAA,EAAA;;;AEvBhD;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"lucca-front-ng-code.mjs","sources":["../../../packages/ng/code/code.component.ts","../../../packages/ng/code/code.component.html","../../../packages/ng/code/lucca-front-ng-code.ts"],"sourcesContent":["import { booleanAttribute, ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n\tselector: 'lu-code',\n\ttemplateUrl: './code.component.html',\n\tstyleUrl: './code.component.scss',\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CodeComponent {\n\tblock = input(false, { transform: booleanAttribute });\n}\n","<code class=\"code\" [class.mod-block]=\"block()\">\n\t<ng-content />\n</code>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MASa,aAAa,CAAA;AAP1B,IAAA,WAAA,GAAA;QAQC,IAAK,CAAA,KAAA,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AACrD;8GAFY,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,uMCT1B,kFAGA,EAAA,MAAA,EAAA,CAAA,kZAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FDMa,aAAa,EAAA,UAAA,EAAA,CAAA;kBAPzB,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,SAAS,iBAGJ,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,kFAAA,EAAA,MAAA,EAAA,CAAA,kZAAA,CAAA,EAAA;;;AEPhD;;AAEG;;;;"}
1
+ {"version":3,"file":"lucca-front-ng-code.mjs","sources":["../../../packages/ng/code/code.component.ts","../../../packages/ng/code/code.component.html","../../../packages/ng/code/lucca-front-ng-code.ts"],"sourcesContent":["import { booleanAttribute, ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n\tselector: 'lu-code',\n\ttemplateUrl: './code.component.html',\n\tstyleUrl: './code.component.scss',\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CodeComponent {\n\treadonly block = input(false, { transform: booleanAttribute });\n}\n","<code class=\"code\" [class.mod-block]=\"block()\">\n\t<ng-content />\n</code>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MASa,aAAa,CAAA;AAP1B,IAAA,WAAA,GAAA;QAQU,IAAK,CAAA,KAAA,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAC9D;8GAFY,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,uMCT1B,kFAGA,EAAA,MAAA,EAAA,CAAA,kZAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FDMa,aAAa,EAAA,UAAA,EAAA,CAAA;kBAPzB,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,SAAS,iBAGJ,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,kFAAA,EAAA,MAAA,EAAA,CAAA,kZAAA,CAAA,EAAA;;;AEPhD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { DatePipe, NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { InjectionToken, inject, LOCALE_ID, computed, input, HostBinding, ChangeDetectionStrategy, ViewEncapsulation, Component, contentChildren, forwardRef, booleanAttribute, Input } from '@angular/core';
3
+ import { InjectionToken, inject, LOCALE_ID, computed, input, HostBinding, ChangeDetectionStrategy, ViewEncapsulation, Component, contentChildren, booleanAttribute, forwardRef } from '@angular/core';
4
4
  import { PortalDirective } from '@lucca-front/ng/core';
5
5
  import { LuUserPictureModule } from '@lucca-front/ng/user';
6
6
 
@@ -63,58 +63,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImpor
63
63
 
64
64
  class CommentBlockComponent {
65
65
  constructor() {
66
- this.compact = false;
67
- this.small = false;
68
- this.chatAnswer = false;
66
+ this.#chatBlock = inject(COMMENT_CHAT_INSTANCE, { optional: true });
69
67
  this.comments = contentChildren(CommentComponent, { read: CommentComponent, descendants: true });
68
+ this.compact = input(false, { transform: booleanAttribute });
69
+ this.small = input(false, { transform: booleanAttribute });
70
+ this.chatAnswer = input(false, { transform: booleanAttribute });
70
71
  this.authorName = input();
71
72
  this.avatar = input();
72
73
  this.size = input();
73
- this.noAvatar = computed(() => {
74
- return !this.avatar();
75
- });
76
- this.isSingleComment = computed(() => {
77
- return this.comments().length === 1;
78
- });
79
- this.#chatBlock = inject(COMMENT_CHAT_INSTANCE, { optional: true });
74
+ this.noAvatar = computed(() => !this.avatar());
75
+ this.isSingleComment = computed(() => this.comments().length === 1);
80
76
  this.role = this.#chatBlock ? 'listitem' : null;
81
77
  }
82
78
  #chatBlock;
83
79
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CommentBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
84
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.2", type: CommentBlockComponent, isStandalone: true, selector: "lu-comment-block", inputs: { compact: { classPropertyName: "compact", publicName: "compact", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, small: { classPropertyName: "small", publicName: "small", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, chatAnswer: { classPropertyName: "chatAnswer", publicName: "chatAnswer", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, authorName: { classPropertyName: "authorName", publicName: "authorName", isSignal: true, isRequired: false, transformFunction: null }, avatar: { classPropertyName: "avatar", publicName: "avatar", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.role": "this.role" } }, providers: [
80
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.2", type: CommentBlockComponent, isStandalone: true, selector: "lu-comment-block", inputs: { compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, small: { classPropertyName: "small", publicName: "small", isSignal: true, isRequired: false, transformFunction: null }, chatAnswer: { classPropertyName: "chatAnswer", publicName: "chatAnswer", isSignal: true, isRequired: false, transformFunction: null }, authorName: { classPropertyName: "authorName", publicName: "authorName", isSignal: true, isRequired: false, transformFunction: null }, avatar: { classPropertyName: "avatar", publicName: "avatar", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.role": "role" } }, providers: [
85
81
  {
86
82
  provide: COMMENT_BLOCK_INSTANCE,
87
83
  useExisting: forwardRef(() => CommentBlockComponent),
88
84
  },
89
- ], queries: [{ propertyName: "comments", predicate: CommentComponent, descendants: true, read: CommentComponent, isSignal: true }], ngImport: i0, template: "<ng-template #content><ng-content /></ng-template>\n\n@if (isSingleComment()) {\n\t<div class=\"commentWrapper\" [class.mod-S]=\"small\" [class.mod-compact]=\"compact\" [class.mod-chatAnswer]=\"chatAnswer\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</div>\n} @else {\n\t<ol class=\"commentWrapper\" [class.mod-S]=\"small\" [class.mod-compact]=\"compact\" [class.mod-chatAnswer]=\"chatAnswer\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ol>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
85
+ ], queries: [{ propertyName: "comments", predicate: CommentComponent, descendants: true, read: CommentComponent, isSignal: true }], ngImport: i0, template: "<ng-template #content><ng-content /></ng-template>\n\n@if (isSingleComment()) {\n\t<div class=\"commentWrapper\" [class.mod-S]=\"small()\" [class.mod-compact]=\"compact()\" [class.mod-chatAnswer]=\"chatAnswer()\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</div>\n} @else {\n\t<ol class=\"commentWrapper\" [class.mod-S]=\"small()\" [class.mod-compact]=\"compact()\" [class.mod-chatAnswer]=\"chatAnswer()\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ol>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
90
86
  }
91
87
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CommentBlockComponent, decorators: [{
92
88
  type: Component,
93
- args: [{ selector: 'lu-comment-block', imports: [NgTemplateOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
89
+ args: [{ selector: 'lu-comment-block', imports: [NgTemplateOutlet], host: {
90
+ '[attr.role]': 'role',
91
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
94
92
  {
95
93
  provide: COMMENT_BLOCK_INSTANCE,
96
94
  useExisting: forwardRef(() => CommentBlockComponent),
97
95
  },
98
- ], template: "<ng-template #content><ng-content /></ng-template>\n\n@if (isSingleComment()) {\n\t<div class=\"commentWrapper\" [class.mod-S]=\"small\" [class.mod-compact]=\"compact\" [class.mod-chatAnswer]=\"chatAnswer\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</div>\n} @else {\n\t<ol class=\"commentWrapper\" [class.mod-S]=\"small\" [class.mod-compact]=\"compact\" [class.mod-chatAnswer]=\"chatAnswer\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ol>\n}\n" }]
99
- }], propDecorators: { compact: [{
100
- type: Input,
101
- args: [{
102
- transform: booleanAttribute,
103
- }]
104
- }], small: [{
105
- type: Input,
106
- args: [{
107
- transform: booleanAttribute,
108
- }]
109
- }], chatAnswer: [{
110
- type: Input,
111
- args: [{
112
- transform: booleanAttribute,
113
- }]
114
- }], role: [{
115
- type: HostBinding,
116
- args: ['attr.role']
117
- }] } });
96
+ ], template: "<ng-template #content><ng-content /></ng-template>\n\n@if (isSingleComment()) {\n\t<div class=\"commentWrapper\" [class.mod-S]=\"small()\" [class.mod-compact]=\"compact()\" [class.mod-chatAnswer]=\"chatAnswer()\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</div>\n} @else {\n\t<ol class=\"commentWrapper\" [class.mod-S]=\"small()\" [class.mod-compact]=\"compact()\" [class.mod-chatAnswer]=\"chatAnswer()\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ol>\n}\n" }]
97
+ }] });
118
98
 
119
99
  class CommentChatComponent {
120
100
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CommentChatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -1 +1 @@
1
- {"version":3,"file":"lucca-front-ng-comment.mjs","sources":["../../../packages/ng/comment/token.ts","../../../packages/ng/comment/comment/comment.component.ts","../../../packages/ng/comment/comment/comment.component.html","../../../packages/ng/comment/comment-block/comment-block.component.ts","../../../packages/ng/comment/comment-block/comment-block.component.html","../../../packages/ng/comment/comment-chat/comment-chat.component.ts","../../../packages/ng/comment/comment-chat/comment-chat.component.html","../../../packages/ng/comment/lucca-front-ng-comment.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { CommentBlockComponent } from './comment-block/comment-block.component';\nimport { CommentChatComponent } from './comment-chat/comment-chat.component';\n\nexport const COMMENT_BLOCK_INSTANCE = new InjectionToken<CommentBlockComponent>('COMMENT_BLOCK_INSTANCE');\nexport const COMMENT_CHAT_INSTANCE = new InjectionToken<CommentChatComponent>('COMMENT_CHAT_INSTANCE');\n","import { DatePipe, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, HostBinding, inject, input, LOCALE_ID, ViewEncapsulation } from '@angular/core';\nimport { PortalDirective } from '@lucca-front/ng/core';\nimport { LuUserPictureModule } from '@lucca-front/ng/user';\nimport { COMMENT_BLOCK_INSTANCE } from '../token';\n\n@Component({\n\tselector: 'lu-comment',\n\timports: [PortalDirective, DatePipe, LuUserPictureModule, NgTemplateOutlet],\n\ttemplateUrl: './comment.component.html',\n\tstyleUrl: './comment.component.scss',\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\tclass: 'commentWrapper-item',\n\t},\n})\nexport class CommentComponent {\n\t#locale = inject(LOCALE_ID);\n\t#intlDateTimeFormat = new Intl.DateTimeFormat(this.#locale, {\n\t\tweekday: 'long',\n\t\tyear: 'numeric',\n\t\tmonth: 'short',\n\t\tday: 'numeric',\n\t\thour: 'numeric',\n\t\tminute: 'numeric',\n\t});\n\n\t#parentBlock = inject(COMMENT_BLOCK_INSTANCE);\n\n\tnoAvatar = computed(() => this.#parentBlock.noAvatar());\n\n\tavatar = computed(() => this.#parentBlock.avatar());\n\n\tauthorName = computed(() => this.#parentBlock.authorName());\n\n\tsize = computed(() => this.#parentBlock.size());\n\n\tdate = input<Date>();\n\n\t/**\n\t * format given to the date pipe for display.\n\t *\n\t * See https://angular.dev/api/common/DatePipe#custom-format-options\n\t */\n\tdatePipeFormat = input<string | undefined>(undefined);\n\n\tcontent = input<string>();\n\n\tcontentIsHTML = computed(() => {\n\t\treturn /<\\/?[a-z][\\s\\S]*>/i.test(this.content());\n\t});\n\n\tdateDisplay = computed(() => {\n\t\tconst formatted = this.#intlDateTimeFormat.format(this.date());\n\t\treturn `${formatted[0].toUpperCase()}${formatted.slice(1)}`;\n\t});\n\n\trole = computed(() => {\n\t\treturn this.#parentBlock.isSingleComment() ? null : 'listitem';\n\t});\n\n\t@HostBinding('attr.role')\n\tget roleAttr(): string {\n\t\treturn this.role();\n\t}\n}\n","<div class=\"comment\" [class.mod-noAvatar]=\"noAvatar()\" [class.mod-S]=\"size() === 'S'\">\n\t<div class=\"comment-infos\">\n\t\t@if (!noAvatar()) {\n\t\t\t<div class=\"pr-u-displayContents\" aria-hidden=\"true\">\n\t\t\t\t<ng-container *ngTemplateOutlet=\"avatar()\" />\n\t\t\t</div>\n\t\t}\n\t\t<div class=\"comment-infos-content\">\n\t\t\t<span class=\"comment-infos-name\"><ng-container *luPortal=\"authorName()\" /></span>&ngsp;\n\t\t\t<time class=\"comment-infos-date\" [attr.datetime]=\"date().toISOString()\">\n\t\t\t\t@if (datePipeFormat()) {\n\t\t\t\t\t{{ date() | date: datePipeFormat() }}\n\t\t\t\t} @else if (dateDisplay()) {\n\t\t\t\t\t<ng-container *luPortal=\"dateDisplay()\" />\n\t\t\t\t} @else {\n\t\t\t\t\t{{ date() | date }}\n\t\t\t\t}\n\t\t\t</time>\n\t\t</div>\n\t</div>\n\t<blockquote class=\"comment-content\">\n\t\t@if (contentIsHTML()) {\n\t\t\t<div class=\"comment-content-textContainerOptional\" [innerHTML]=\"content()\"></div>\n\t\t} @else {\n\t\t\t<p class=\"comment-content-text\" [innerHTML]=\"content()\"></p>\n\t\t}\n\t</blockquote>\n</div>\n\n<ng-template #contentTpl>\n\t<ng-content />\n</ng-template>\n","import { NgTemplateOutlet } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, contentChildren, forwardRef, HostBinding, inject, Input, input, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { PortalContent } from '@lucca-front/ng/core';\nimport { CommentComponent } from '../comment/comment.component';\nimport { COMMENT_BLOCK_INSTANCE, COMMENT_CHAT_INSTANCE } from '../token';\n\n@Component({\n\tselector: 'lu-comment-block',\n\timports: [NgTemplateOutlet],\n\ttemplateUrl: './comment-block.component.html',\n\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\n\tproviders: [\n\t\t{\n\t\t\tprovide: COMMENT_BLOCK_INSTANCE,\n\t\t\tuseExisting: forwardRef(() => CommentBlockComponent),\n\t\t},\n\t],\n})\nexport class CommentBlockComponent {\n\t@Input({\n\t\ttransform: booleanAttribute,\n\t})\n\tcompact = false;\n\n\t@Input({\n\t\ttransform: booleanAttribute,\n\t})\n\tsmall = false;\n\n\t@Input({\n\t\ttransform: booleanAttribute,\n\t})\n\tchatAnswer = false;\n\n\tcomments = contentChildren(CommentComponent, { read: CommentComponent, descendants: true });\n\n\tauthorName = input<PortalContent>();\n\n\tavatar = input<TemplateRef<unknown>>();\n\n\tsize = input<'S' | 'M'>();\n\n\tnoAvatar = computed(() => {\n\t\treturn !this.avatar();\n\t});\n\n\tisSingleComment = computed(() => {\n\t\treturn this.comments().length === 1;\n\t});\n\n\t#chatBlock = inject(COMMENT_CHAT_INSTANCE, { optional: true });\n\n\t@HostBinding('attr.role')\n\tpublic role = this.#chatBlock ? 'listitem' : null;\n}\n","<ng-template #content><ng-content /></ng-template>\n\n@if (isSingleComment()) {\n\t<div class=\"commentWrapper\" [class.mod-S]=\"small\" [class.mod-compact]=\"compact\" [class.mod-chatAnswer]=\"chatAnswer\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</div>\n} @else {\n\t<ol class=\"commentWrapper\" [class.mod-S]=\"small\" [class.mod-compact]=\"compact\" [class.mod-chatAnswer]=\"chatAnswer\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ol>\n}\n","import { ChangeDetectionStrategy, Component, forwardRef, ViewEncapsulation } from '@angular/core';\nimport { COMMENT_CHAT_INSTANCE } from '../token';\n\n@Component({\n\tselector: 'lu-comment-chat',\n\timports: [],\n\ttemplateUrl: './comment-chat.component.html',\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\n\tproviders: [\n\t\t{\n\t\t\tprovide: COMMENT_CHAT_INSTANCE,\n\t\t\tuseExisting: forwardRef(() => CommentChatComponent),\n\t\t},\n\t],\n})\nexport class CommentChatComponent {}\n","<ol class=\"commentWrapperChat\">\n\t<ng-content />\n</ol>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIO,MAAM,sBAAsB,GAAG,IAAI,cAAc,CAAwB,wBAAwB,CAAC;AAClG,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAuB,uBAAuB,CAAC;;MCYzF,gBAAgB,CAAA;AAX7B,IAAA,WAAA,GAAA;AAYC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC;QAC3B,IAAmB,CAAA,mBAAA,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE;AAC3D,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,GAAG,EAAE,SAAS;AACd,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,MAAM,EAAE,SAAS;AACjB,SAAA,CAAC;AAEF,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAE7C,QAAA,IAAA,CAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,I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AAA;sBAHT,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA;AACN,wBAAA,SAAS,EAAE,gBAAgB;AAC3B,qBAAA;gBAsBM,IAAI,EAAA,CAAA;sBADV,WAAW;uBAAC,WAAW;;;MEtCZ,oBAAoB,CAAA;8GAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,EAPrB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,SAAA,EAAA;AACV,YAAA;AACC,gBAAA,OAAO,EAAE,qBAAqB;AAC9B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,oBAAoB,CAAC;AACnD,aAAA;AACD,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECfF,8DAGA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FDca,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAdhC,SAAS;+BACC,iBAAiB,EAAA,OAAA,EAClB,EAAE,EAAA,aAAA,EAEI,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAEpC,SAAA,EAAA;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,qBAAqB;AAC9B,4BAAA,WAAW,EAAE,UAAU,CAAC,0BAA0B,CAAC;AACnD,yBAAA;AACD,qBAAA,EAAA,QAAA,EAAA,8DAAA,EAAA;;;AEfF;;AAEG;;;;"}
1
+ {"version":3,"file":"lucca-front-ng-comment.mjs","sources":["../../../packages/ng/comment/token.ts","../../../packages/ng/comment/comment/comment.component.ts","../../../packages/ng/comment/comment/comment.component.html","../../../packages/ng/comment/comment-block/comment-block.component.ts","../../../packages/ng/comment/comment-block/comment-block.component.html","../../../packages/ng/comment/comment-chat/comment-chat.component.ts","../../../packages/ng/comment/comment-chat/comment-chat.component.html","../../../packages/ng/comment/lucca-front-ng-comment.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { CommentBlockComponent } from './comment-block/comment-block.component';\nimport { CommentChatComponent } from './comment-chat/comment-chat.component';\n\nexport const COMMENT_BLOCK_INSTANCE = new InjectionToken<CommentBlockComponent>('COMMENT_BLOCK_INSTANCE');\nexport const COMMENT_CHAT_INSTANCE = new InjectionToken<CommentChatComponent>('COMMENT_CHAT_INSTANCE');\n","import { DatePipe, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, HostBinding, inject, input, LOCALE_ID, ViewEncapsulation } from '@angular/core';\nimport { PortalDirective } from '@lucca-front/ng/core';\nimport { LuUserPictureModule } from '@lucca-front/ng/user';\nimport { COMMENT_BLOCK_INSTANCE } from '../token';\n\n@Component({\n\tselector: 'lu-comment',\n\timports: [PortalDirective, DatePipe, LuUserPictureModule, NgTemplateOutlet],\n\ttemplateUrl: './comment.component.html',\n\tstyleUrl: './comment.component.scss',\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\tclass: 'commentWrapper-item',\n\t},\n})\nexport class CommentComponent {\n\t#locale = inject(LOCALE_ID);\n\t#intlDateTimeFormat = new Intl.DateTimeFormat(this.#locale, {\n\t\tweekday: 'long',\n\t\tyear: 'numeric',\n\t\tmonth: 'short',\n\t\tday: 'numeric',\n\t\thour: 'numeric',\n\t\tminute: 'numeric',\n\t});\n\n\t#parentBlock = inject(COMMENT_BLOCK_INSTANCE);\n\n\tnoAvatar = computed(() => this.#parentBlock.noAvatar());\n\n\tavatar = computed(() => this.#parentBlock.avatar());\n\n\tauthorName = computed(() => this.#parentBlock.authorName());\n\n\tsize = computed(() => this.#parentBlock.size());\n\n\tdate = input<Date>();\n\n\t/**\n\t * format given to the date pipe for display.\n\t *\n\t * See https://angular.dev/api/common/DatePipe#custom-format-options\n\t */\n\tdatePipeFormat = input<string | undefined>(undefined);\n\n\tcontent = input<string>();\n\n\tcontentIsHTML = computed(() => {\n\t\treturn /<\\/?[a-z][\\s\\S]*>/i.test(this.content());\n\t});\n\n\tdateDisplay = computed(() => {\n\t\tconst formatted = this.#intlDateTimeFormat.format(this.date());\n\t\treturn `${formatted[0].toUpperCase()}${formatted.slice(1)}`;\n\t});\n\n\trole = computed(() => {\n\t\treturn this.#parentBlock.isSingleComment() ? null : 'listitem';\n\t});\n\n\t@HostBinding('attr.role')\n\tget roleAttr(): string {\n\t\treturn this.role();\n\t}\n}\n","<div class=\"comment\" [class.mod-noAvatar]=\"noAvatar()\" [class.mod-S]=\"size() === 'S'\">\n\t<div class=\"comment-infos\">\n\t\t@if (!noAvatar()) {\n\t\t\t<div class=\"pr-u-displayContents\" aria-hidden=\"true\">\n\t\t\t\t<ng-container *ngTemplateOutlet=\"avatar()\" />\n\t\t\t</div>\n\t\t}\n\t\t<div class=\"comment-infos-content\">\n\t\t\t<span class=\"comment-infos-name\"><ng-container *luPortal=\"authorName()\" /></span>&ngsp;\n\t\t\t<time class=\"comment-infos-date\" [attr.datetime]=\"date().toISOString()\">\n\t\t\t\t@if (datePipeFormat()) {\n\t\t\t\t\t{{ date() | date: datePipeFormat() }}\n\t\t\t\t} @else if (dateDisplay()) {\n\t\t\t\t\t<ng-container *luPortal=\"dateDisplay()\" />\n\t\t\t\t} @else {\n\t\t\t\t\t{{ date() | date }}\n\t\t\t\t}\n\t\t\t</time>\n\t\t</div>\n\t</div>\n\t<blockquote class=\"comment-content\">\n\t\t@if (contentIsHTML()) {\n\t\t\t<div class=\"comment-content-textContainerOptional\" [innerHTML]=\"content()\"></div>\n\t\t} @else {\n\t\t\t<p class=\"comment-content-text\" [innerHTML]=\"content()\"></p>\n\t\t}\n\t</blockquote>\n</div>\n\n<ng-template #contentTpl>\n\t<ng-content />\n</ng-template>\n","import { NgTemplateOutlet } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, contentChildren, forwardRef, inject, input, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { PortalContent } from '@lucca-front/ng/core';\nimport { CommentComponent } from '../comment/comment.component';\nimport { COMMENT_BLOCK_INSTANCE, COMMENT_CHAT_INSTANCE } from '../token';\n\n@Component({\n\tselector: 'lu-comment-block',\n\timports: [NgTemplateOutlet],\n\ttemplateUrl: './comment-block.component.html',\n\thost: {\n\t\t'[attr.role]': 'role',\n\t},\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tproviders: [\n\t\t{\n\t\t\tprovide: COMMENT_BLOCK_INSTANCE,\n\t\t\tuseExisting: forwardRef(() => CommentBlockComponent),\n\t\t},\n\t],\n})\nexport class CommentBlockComponent {\n\t#chatBlock = inject(COMMENT_CHAT_INSTANCE, { optional: true });\n\n\treadonly comments = contentChildren(CommentComponent, { read: CommentComponent, descendants: true });\n\n\treadonly compact = input(false, { transform: booleanAttribute });\n\n\treadonly small = input(false, { transform: booleanAttribute });\n\n\treadonly chatAnswer = input(false, { transform: booleanAttribute });\n\n\treadonly authorName = input<PortalContent>();\n\n\treadonly avatar = input<TemplateRef<unknown>>();\n\n\treadonly size = input<'S' | 'M'>();\n\n\treadonly noAvatar = computed(() => !this.avatar());\n\treadonly isSingleComment = computed(() => this.comments().length === 1);\n\treadonly role = this.#chatBlock ? 'listitem' : null;\n}\n","<ng-template #content><ng-content /></ng-template>\n\n@if (isSingleComment()) {\n\t<div class=\"commentWrapper\" [class.mod-S]=\"small()\" [class.mod-compact]=\"compact()\" [class.mod-chatAnswer]=\"chatAnswer()\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</div>\n} @else {\n\t<ol class=\"commentWrapper\" [class.mod-S]=\"small()\" [class.mod-compact]=\"compact()\" [class.mod-chatAnswer]=\"chatAnswer()\">\n\t\t<ng-container *ngTemplateOutlet=\"content\" />\n\t</ol>\n}\n","import { ChangeDetectionStrategy, Component, forwardRef, ViewEncapsulation } from '@angular/core';\nimport { COMMENT_CHAT_INSTANCE } from '../token';\n\n@Component({\n\tselector: 'lu-comment-chat',\n\timports: [],\n\ttemplateUrl: './comment-chat.component.html',\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\n\tproviders: [\n\t\t{\n\t\t\tprovide: COMMENT_CHAT_INSTANCE,\n\t\t\tuseExisting: forwardRef(() => CommentChatComponent),\n\t\t},\n\t],\n})\nexport class CommentChatComponent {}\n","<ol class=\"commentWrapperChat\">\n\t<ng-content />\n</ol>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIO,MAAM,sBAAsB,GAAG,IAAI,cAAc,CAAwB,wBAAwB,CAAC;AAClG,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAuB,uBAAuB,CAAC;;MCYzF,gBAAgB,CAAA;AAX7B,IAAA,WAAA,GAAA;AAYC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC;QAC3B,IAAmB,CAAA,mBAAA,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE;AAC3D,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,GAAG,EAAE,SAAS;AACd,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,MAAM,EAAE,SAAS;AACjB,SAAA,CAAC;AAEF,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAE7C,QAAA,IAAA,CAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;AAEvD,QA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ACD,qBAAA,EAAA,QAAA,EAAA,ueAAA,EAAA;;;MEHW,oBAAoB,CAAA;8GAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,EAPrB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,SAAA,EAAA;AACV,YAAA;AACC,gBAAA,OAAO,EAAE,qBAAqB;AAC9B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,oBAAoB,CAAC;AACnD,aAAA;AACD,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECfF,8DAGA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FDca,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAdhC,SAAS;+BACC,iBAAiB,EAAA,OAAA,EAClB,EAAE,EAAA,aAAA,EAEI,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAEpC,SAAA,EAAA;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,qBAAqB;AAC9B,4BAAA,WAAW,EAAE,UAAU,CAAC,0BAA0B,CAAC;AACnD,yBAAA;AACD,qBAAA,EAAA,QAAA,EAAA,8DAAA,EAAA;;;AEfF;;AAEG;;;;"}
@@ -13,8 +13,8 @@ class ALuCoreSelectApiDirective {
13
13
  this.pageSize = LU_SELECT_MAGIC_PAGE_SIZE;
14
14
  this.debounceDuration = MAGIC_DEBOUNCE_DURATION;
15
15
  this.select = inject(ALuSelectInputComponent);
16
- this.page$ = this.select.nextPage.pipe(scan((page) => page + 1, 0), startWith(0));
17
- this.clue$ = this.select.clueChange.pipe(debounceTime(this.debounceDuration), startWith(''));
16
+ this.page$ = this.select.nextPage$.pipe(scan((page) => page + 1, 0), startWith(0));
17
+ this.clue$ = this.select.clueChange$.pipe(debounceTime(this.debounceDuration), startWith(''));
18
18
  /**
19
19
  * Compare two options to know if they are the same. For example, compare by id or by JSON
20
20
  */
@@ -33,7 +33,7 @@ class ALuCoreSelectApiDirective {
33
33
  }
34
34
  buildOptions() {
35
35
  // Prevent a double call to getOptions when the clue is changed while the panel is closed
36
- const clueIsPendingDebounce$ = merge(this.select.clueChange.pipe(map(() => true)), this.clue$.pipe(map(() => false))).pipe(distinctUntilChanged());
36
+ const clueIsPendingDebounce$ = merge(this.select.clueChange$.pipe(map(() => true)), this.clue$.pipe(map(() => false))).pipe(distinctUntilChanged());
37
37
  const isOpen$ = combineLatest([this.select.isPanelOpen$, clueIsPendingDebounce$]).pipe(debounceTime(0), startWith([false, false]), pairwise(), tap(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => {
38
38
  // Start the loader as soon as the panel is opened to avoid a short display of the "no result" message
39
39
  if (!wasOpen && isOpen && clueIsPendingDebounce) {
@@ -1 +1 @@
1
- {"version":3,"file":"lucca-front-ng-core-select-api.mjs","sources":["../../../packages/ng/core-select/api/api.directive.ts","../../../packages/ng/core-select/api/api-v3.directive.ts","../../../packages/ng/core-select/api/api-v4.directive.ts","../../../packages/ng/core-select/api/lucca-front-ng-core-select-api.ts"],"sourcesContent":["import { Directive, inject, OnDestroy, OnInit } from '@angular/core';\nimport { ALuSelectInputComponent, coreSelectDefaultOptionComparer, coreSelectDefaultOptionKey, LuOptionComparer } from '@lucca-front/ng/core-select';\nimport { catchError, combineLatest, concatMap, debounceTime, distinctUntilChanged, map, merge, Observable, of, pairwise, scan, startWith, Subject, switchMap, takeUntil, tap } from 'rxjs';\n\nexport const LU_SELECT_MAGIC_PAGE_SIZE = 20;\nexport const MAGIC_DEBOUNCE_DURATION = 250;\n\n@Directive()\nexport abstract class ALuCoreSelectApiDirective<TOption, TParams = Record<string, string | number | boolean>> implements OnDestroy, OnInit {\n\tprotected destroy$ = new Subject<void>();\n\tprotected pageSize = LU_SELECT_MAGIC_PAGE_SIZE;\n\tprotected debounceDuration = MAGIC_DEBOUNCE_DURATION;\n\n\tpublic select = inject<ALuSelectInputComponent<TOption, unknown>>(ALuSelectInputComponent);\n\n\tprotected page$ = this.select.nextPage.pipe(\n\t\tscan((page) => page + 1, 0),\n\t\tstartWith(0),\n\t);\n\n\tprotected clue$ = this.select.clueChange.pipe(debounceTime(this.debounceDuration), startWith(''));\n\n\t/**\n\t * Create an object that will be used as params for the api call\n\t */\n\tprotected abstract params$: Observable<TParams>;\n\n\t/**\n\t * Compare two options to know if they are the same. For example, compare by id or by JSON\n\t */\n\tprotected optionComparer: LuOptionComparer<TOption> = (a, b) => this.optionKey(a) === this.optionKey(b);\n\n\t/**\n\t * Return a unique key to identify the option in for-of loops\n\t */\n\tprotected abstract optionKey: (option: TOption) => unknown;\n\n\t/**\n\t * Return the options for the given params and page\n\t */\n\tprotected abstract getOptions(params: TParams, page: number): Observable<TOption[]>;\n\n\tpublic ngOnInit(): void {\n\t\tif (this.select.optionComparer === coreSelectDefaultOptionComparer) {\n\t\t\tthis.select.optionComparer = this.optionComparer;\n\t\t}\n\n\t\tif (this.select.optionKey === coreSelectDefaultOptionKey) {\n\t\t\tthis.select.optionKey = this.optionKey;\n\t\t}\n\n\t\tthis.buildOptions()\n\t\t\t.pipe(takeUntil(this.destroy$))\n\t\t\t.subscribe((options) => (this.select.options = options));\n\t}\n\n\tprotected buildOptions(): Observable<TOption[]> {\n\t\t// Prevent a double call to getOptions when the clue is changed while the panel is closed\n\t\tconst clueIsPendingDebounce$ = merge(this.select.clueChange.pipe(map(() => true)), this.clue$.pipe(map(() => false))).pipe(distinctUntilChanged());\n\t\tconst isOpen$ = combineLatest([this.select.isPanelOpen$, clueIsPendingDebounce$]).pipe(\n\t\t\tdebounceTime(0),\n\t\t\tstartWith([false, false]),\n\t\t\tpairwise(),\n\t\t\ttap(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => {\n\t\t\t\t// Start the loader as soon as the panel is opened to avoid a short display of the \"no result\" message\n\t\t\t\tif (!wasOpen && isOpen && clueIsPendingDebounce) {\n\t\t\t\t\tthis.select.loading = true;\n\t\t\t\t}\n\t\t\t}),\n\t\t\tmap(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => (isOpen && !wasOpen ? !clueIsPendingDebounce : isOpen)),\n\t\t\tdistinctUntilChanged(),\n\t\t);\n\n\t\treturn combineLatest([this.params$, isOpen$]).pipe(\n\t\t\tswitchMap(([params, isOpened]) => {\n\t\t\t\tconst hasNextPage$ = new Subject<void>();\n\n\t\t\t\treturn isOpened\n\t\t\t\t\t? this.page$.pipe(\n\t\t\t\t\t\t\ttakeUntil(hasNextPage$),\n\t\t\t\t\t\t\tconcatMap((page) => this.getOptionsPage(params, page).pipe(map(({ items, isLastPage }) => ({ items, isLastPage, page })))),\n\t\t\t\t\t\t\ttap(({ isLastPage }) => {\n\t\t\t\t\t\t\t\tif (isLastPage) {\n\t\t\t\t\t\t\t\t\t// `getOptionsPage` can emit multiple times (for example, when adding homonyms additional information),\n\t\t\t\t\t\t\t\t\t// so we cannot use takeWhile here.\n\t\t\t\t\t\t\t\t\thasNextPage$.next();\n\t\t\t\t\t\t\t\t\thasNextPage$.complete();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tscan(\n\t\t\t\t\t\t\t\t(acc, { items, page }) => {\n\t\t\t\t\t\t\t\t\tacc[page] = items;\n\t\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{} as Record<number, TOption[]>,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tmap((pages) => Object.values(pages).flat()),\n\t\t\t\t\t\t)\n\t\t\t\t\t: of([] as TOption[]);\n\t\t\t}),\n\t\t);\n\t}\n\n\tprotected getOptionsPage(params: TParams, page: number): Observable<{ items: TOption[]; isLastPage: boolean }> {\n\t\tthis.select.loading = true;\n\n\t\treturn this.getOptions(params, page).pipe(\n\t\t\tcatchError(() => of([] as TOption[])),\n\t\t\ttap(() => (this.select.loading = false)),\n\t\t\tmap((items) => ({ items, isLastPage: items.length < this.pageSize })),\n\t\t);\n\t}\n\n\tpublic ngOnDestroy(): void {\n\t\tthis.destroy$.next();\n\t\tthis.destroy$.complete();\n\t}\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Directive, forwardRef, inject, Input } from '@angular/core';\nimport { ILuApiCollectionResponse, ILuApiItem } from '@lucca-front/ng/api';\nimport { CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider } from '@lucca-front/ng/core-select';\nimport { BehaviorSubject, combineLatest, debounceTime, map, Observable, ReplaySubject, switchMap, take } from 'rxjs';\nimport { ALuCoreSelectApiDirective } from './api.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[apiV3],lu-multi-select[apiV3]',\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectApiV3Directive),\n\t\t},\n\t],\n})\nexport class LuCoreSelectApiV3Directive<T extends ILuApiItem> extends ALuCoreSelectApiDirective<T> implements CoreSelectApiTotalCountProvider {\n\t@Input()\n\tpublic set apiV3(value: string) {\n\t\tthis.url$.next(value);\n\t}\n\n\t@Input()\n\tpublic set fields(value: string) {\n\t\tthis.fields$.next(value);\n\t}\n\n\t@Input()\n\tpublic set orderBy(value: string | null) {\n\t\tthis.orderBy$.next(value);\n\t}\n\n\t@Input()\n\tpublic set filters(value: Record<string, string | number | boolean>) {\n\t\tthis.filters$.next(value);\n\t}\n\n\tprotected url$ = new ReplaySubject<string>(1);\n\tprotected fields$ = new BehaviorSubject<string>('id,name');\n\tprotected orderBy$ = new BehaviorSubject<string | null>('name,asc');\n\tprotected filters$ = new BehaviorSubject<Record<string, string | number | boolean>>({});\n\n\tprotected httpClient = inject(HttpClient);\n\n\tprotected override params$ = combineLatest([this.fields$, this.filters$, this.orderBy$, this.clue$]).pipe(\n\t\tmap(([fields, filters, orderBy, clue]) => ({\n\t\t\t...filters,\n\t\t\t...(fields ? { fields } : {}),\n\t\t\t...(orderBy ? { orderBy } : {}),\n\t\t\t...(clue ? { name: `like,${clue}` } : {}),\n\t\t})),\n\t);\n\n\tpublic totalCount$ = combineLatest([this.url$, this.filters$]).pipe(\n\t\tdebounceTime(250),\n\t\tswitchMap(([url, params]) =>\n\t\t\tthis.httpClient.get<{ data: { count: number } }>(url, {\n\t\t\t\tparams: {\n\t\t\t\t\t...params,\n\t\t\t\t\tfields: 'collection.count',\n\t\t\t\t},\n\t\t\t}),\n\t\t),\n\t\tmap((res) => res.data?.count ?? 0),\n\t);\n\n\tprotected override getOptions(params: Record<string, string | number | boolean>, page: number): Observable<T[]> {\n\t\treturn this.url$.pipe(\n\t\t\ttake(1),\n\t\t\tswitchMap((url) =>\n\t\t\t\tthis.httpClient.get<ILuApiCollectionResponse<T>>(url, {\n\t\t\t\t\tparams: {\n\t\t\t\t\t\t...params,\n\t\t\t\t\t\tpaging: `${page * this.pageSize},${this.pageSize}`,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t\tmap((res) => res.data.items),\n\t\t);\n\t}\n\n\tprotected override optionKey = (option: T) => option.id;\n}\n","import { HttpClient } from '@angular/common/http';\nimport { computed, Directive, forwardRef, inject, input, model } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { ILuApiItem } from '@lucca-front/ng/api';\nimport { applySearchDelimiter, CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider } from '@lucca-front/ng/core-select';\nimport { debounceTime, map, Observable, switchMap } from 'rxjs';\nimport { ALuCoreSelectApiDirective } from './api.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[apiV4],lu-multi-select[apiV4]',\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectApiV4Directive),\n\t\t},\n\t],\n})\nexport class LuCoreSelectApiV4Directive<T extends ILuApiItem> extends ALuCoreSelectApiDirective<T> implements CoreSelectApiTotalCountProvider {\n\tapiV4 = model.required<string>();\n\tsort = input<string | null>('+name');\n\tfilters = input<Record<string, string | number | boolean>>({});\n\tsearchDelimiter = input<string>(' ');\n\n\tprotected httpClient = inject(HttpClient);\n\n\tprotected clue = toSignal(this.clue$);\n\n\tprotected override params$: Observable<Record<string, string | number | boolean>> = toObservable(\n\t\tcomputed(() => {\n\t\t\tconst sort = this.sort();\n\t\t\tconst clue = this.clue();\n\t\t\tconst searchDelimiter = this.searchDelimiter();\n\t\t\treturn {\n\t\t\t\t...this.filters(),\n\t\t\t\t...(sort ? { sort } : {}),\n\t\t\t\t...(clue ? { search: applySearchDelimiter(clue, searchDelimiter) } : {}),\n\t\t\t};\n\t\t}),\n\t);\n\n\tpublic totalCount$ = toObservable(computed(() => ({ url: this.apiV4(), filters: this.filters() }))).pipe(\n\t\tdebounceTime(250),\n\t\tswitchMap(({ url, filters }) =>\n\t\t\tthis.httpClient.get<{ count: number }>(url, {\n\t\t\t\tparams: {\n\t\t\t\t\t...filters,\n\t\t\t\t\t['fields.root']: 'count',\n\t\t\t\t},\n\t\t\t}),\n\t\t),\n\t\tmap((res) => res?.count ?? 0),\n\t);\n\n\tprotected override getOptions(params: Record<string, string | number | boolean>, page: number): Observable<T[]> {\n\t\treturn this.httpClient\n\t\t\t.get<T[] | { items: T[] }>(this.apiV4(), {\n\t\t\t\tparams: {\n\t\t\t\t\t...params,\n\t\t\t\t\tpage: page + 1,\n\t\t\t\t\tlimit: this.pageSize,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.pipe(map((res) => (Array.isArray(res) ? res : res?.items) ?? []));\n\t}\n\n\tprotected override optionKey = (option: T) => option.id;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAIO,MAAM,yBAAyB,GAAG;AAClC,MAAM,uBAAuB,GAAG,GAAG;MAGpB,yBAAyB,CAAA;AAD/C,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,OAAO,EAAQ;QAC9B,IAAQ,CAAA,QAAA,GAAG,yBAAyB;QACpC,IAAgB,CAAA,gBAAA,GAAG,uBAAuB;AAE7C,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAA4C,uBAAuB,CAAC;AAEhF,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAC1C,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,EAC3B,SAAS,CAAC,CAAC,CAAC,CACZ;QAES,IAAK,CAAA,KAAA,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;AAOjG;;AAEG;QACO,IAAc,CAAA,cAAA,GAA8B,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;AAuFvG;IA3EO,QAAQ,GAAA;QACd,IAAI,IAAI,CAAC,MAAM,CAAC,cAAc,KAAK,+BAA+B,EAAE;YACnE,IAAI,CAAC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc;;QAGjD,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,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api.directive.ts","../../../packages/ng/core-select/api/api-v3.directive.ts","../../../packages/ng/core-select/api/api-v4.directive.ts","../../../packages/ng/core-select/api/lucca-front-ng-core-select-api.ts"],"sourcesContent":["import { Directive, inject, OnDestroy, OnInit } from '@angular/core';\nimport { ALuSelectInputComponent, coreSelectDefaultOptionComparer, coreSelectDefaultOptionKey, LuOptionComparer } from '@lucca-front/ng/core-select';\nimport { catchError, combineLatest, concatMap, debounceTime, distinctUntilChanged, map, merge, Observable, of, pairwise, scan, startWith, Subject, switchMap, takeUntil, tap } from 'rxjs';\n\nexport const LU_SELECT_MAGIC_PAGE_SIZE = 20;\nexport const MAGIC_DEBOUNCE_DURATION = 250;\n\n@Directive()\nexport abstract class ALuCoreSelectApiDirective<TOption, TParams = Record<string, string | number | boolean>> implements OnDestroy, OnInit {\n\tprotected destroy$ = new Subject<void>();\n\tprotected pageSize = LU_SELECT_MAGIC_PAGE_SIZE;\n\tprotected debounceDuration = MAGIC_DEBOUNCE_DURATION;\n\n\tpublic select = inject<ALuSelectInputComponent<TOption, unknown>>(ALuSelectInputComponent);\n\n\tprotected page$ = this.select.nextPage$.pipe(\n\t\tscan((page) => page + 1, 0),\n\t\tstartWith(0),\n\t);\n\n\tprotected clue$ = this.select.clueChange$.pipe(debounceTime(this.debounceDuration), startWith(''));\n\n\t/**\n\t * Create an object that will be used as params for the api call\n\t */\n\tprotected abstract params$: Observable<TParams>;\n\n\t/**\n\t * Compare two options to know if they are the same. For example, compare by id or by JSON\n\t */\n\tprotected optionComparer: LuOptionComparer<TOption> = (a, b) => this.optionKey(a) === this.optionKey(b);\n\n\t/**\n\t * Return a unique key to identify the option in for-of loops\n\t */\n\tprotected abstract optionKey: (option: TOption) => unknown;\n\n\t/**\n\t * Return the options for the given params and page\n\t */\n\tprotected abstract getOptions(params: TParams, page: number): Observable<TOption[]>;\n\n\tpublic ngOnInit(): void {\n\t\tif (this.select.optionComparer === coreSelectDefaultOptionComparer) {\n\t\t\tthis.select.optionComparer = this.optionComparer;\n\t\t}\n\n\t\tif (this.select.optionKey === coreSelectDefaultOptionKey) {\n\t\t\tthis.select.optionKey = this.optionKey;\n\t\t}\n\n\t\tthis.buildOptions()\n\t\t\t.pipe(takeUntil(this.destroy$))\n\t\t\t.subscribe((options) => (this.select.options = options));\n\t}\n\n\tprotected buildOptions(): Observable<TOption[]> {\n\t\t// Prevent a double call to getOptions when the clue is changed while the panel is closed\n\t\tconst clueIsPendingDebounce$ = merge(this.select.clueChange$.pipe(map(() => true)), this.clue$.pipe(map(() => false))).pipe(distinctUntilChanged());\n\t\tconst isOpen$ = combineLatest([this.select.isPanelOpen$, clueIsPendingDebounce$]).pipe(\n\t\t\tdebounceTime(0),\n\t\t\tstartWith([false, false]),\n\t\t\tpairwise(),\n\t\t\ttap(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => {\n\t\t\t\t// Start the loader as soon as the panel is opened to avoid a short display of the \"no result\" message\n\t\t\t\tif (!wasOpen && isOpen && clueIsPendingDebounce) {\n\t\t\t\t\tthis.select.loading = true;\n\t\t\t\t}\n\t\t\t}),\n\t\t\tmap(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => (isOpen && !wasOpen ? !clueIsPendingDebounce : isOpen)),\n\t\t\tdistinctUntilChanged(),\n\t\t);\n\n\t\treturn combineLatest([this.params$, isOpen$]).pipe(\n\t\t\tswitchMap(([params, isOpened]) => {\n\t\t\t\tconst hasNextPage$ = new Subject<void>();\n\n\t\t\t\treturn isOpened\n\t\t\t\t\t? this.page$.pipe(\n\t\t\t\t\t\t\ttakeUntil(hasNextPage$),\n\t\t\t\t\t\t\tconcatMap((page) => this.getOptionsPage(params, page).pipe(map(({ items, isLastPage }) => ({ items, isLastPage, page })))),\n\t\t\t\t\t\t\ttap(({ isLastPage }) => {\n\t\t\t\t\t\t\t\tif (isLastPage) {\n\t\t\t\t\t\t\t\t\t// `getOptionsPage` can emit multiple times (for example, when adding homonyms additional information),\n\t\t\t\t\t\t\t\t\t// so we cannot use takeWhile here.\n\t\t\t\t\t\t\t\t\thasNextPage$.next();\n\t\t\t\t\t\t\t\t\thasNextPage$.complete();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tscan(\n\t\t\t\t\t\t\t\t(acc, { items, page }) => {\n\t\t\t\t\t\t\t\t\tacc[page] = items;\n\t\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{} as Record<number, TOption[]>,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tmap((pages) => Object.values(pages).flat()),\n\t\t\t\t\t\t)\n\t\t\t\t\t: of([] as TOption[]);\n\t\t\t}),\n\t\t);\n\t}\n\n\tprotected getOptionsPage(params: TParams, page: number): Observable<{ items: TOption[]; isLastPage: boolean }> {\n\t\tthis.select.loading = true;\n\n\t\treturn this.getOptions(params, page).pipe(\n\t\t\tcatchError(() => of([] as TOption[])),\n\t\t\ttap(() => (this.select.loading = false)),\n\t\t\tmap((items) => ({ items, isLastPage: items.length < this.pageSize })),\n\t\t);\n\t}\n\n\tpublic ngOnDestroy(): void {\n\t\tthis.destroy$.next();\n\t\tthis.destroy$.complete();\n\t}\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Directive, forwardRef, inject, Input } from '@angular/core';\nimport { ILuApiCollectionResponse, ILuApiItem } from '@lucca-front/ng/api';\nimport { CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider } from '@lucca-front/ng/core-select';\nimport { BehaviorSubject, combineLatest, debounceTime, map, Observable, ReplaySubject, switchMap, take } from 'rxjs';\nimport { ALuCoreSelectApiDirective } from './api.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[apiV3],lu-multi-select[apiV3]',\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectApiV3Directive),\n\t\t},\n\t],\n})\nexport class LuCoreSelectApiV3Directive<T extends ILuApiItem> extends ALuCoreSelectApiDirective<T> implements CoreSelectApiTotalCountProvider {\n\t@Input()\n\tpublic set apiV3(value: string) {\n\t\tthis.url$.next(value);\n\t}\n\n\t@Input()\n\tpublic set fields(value: string) {\n\t\tthis.fields$.next(value);\n\t}\n\n\t@Input()\n\tpublic set orderBy(value: string | null) {\n\t\tthis.orderBy$.next(value);\n\t}\n\n\t@Input()\n\tpublic set filters(value: Record<string, string | number | boolean>) {\n\t\tthis.filters$.next(value);\n\t}\n\n\tprotected url$ = new ReplaySubject<string>(1);\n\tprotected fields$ = new BehaviorSubject<string>('id,name');\n\tprotected orderBy$ = new BehaviorSubject<string | null>('name,asc');\n\tprotected filters$ = new BehaviorSubject<Record<string, string | number | boolean>>({});\n\n\tprotected httpClient = inject(HttpClient);\n\n\tprotected override params$ = combineLatest([this.fields$, this.filters$, this.orderBy$, this.clue$]).pipe(\n\t\tmap(([fields, filters, orderBy, clue]) => ({\n\t\t\t...filters,\n\t\t\t...(fields ? { fields } : {}),\n\t\t\t...(orderBy ? { orderBy } : {}),\n\t\t\t...(clue ? { name: `like,${clue}` } : {}),\n\t\t})),\n\t);\n\n\tpublic totalCount$ = combineLatest([this.url$, this.filters$]).pipe(\n\t\tdebounceTime(250),\n\t\tswitchMap(([url, params]) =>\n\t\t\tthis.httpClient.get<{ data: { count: number } }>(url, {\n\t\t\t\tparams: {\n\t\t\t\t\t...params,\n\t\t\t\t\tfields: 'collection.count',\n\t\t\t\t},\n\t\t\t}),\n\t\t),\n\t\tmap((res) => res.data?.count ?? 0),\n\t);\n\n\tprotected override getOptions(params: Record<string, string | number | boolean>, page: number): Observable<T[]> {\n\t\treturn this.url$.pipe(\n\t\t\ttake(1),\n\t\t\tswitchMap((url) =>\n\t\t\t\tthis.httpClient.get<ILuApiCollectionResponse<T>>(url, {\n\t\t\t\t\tparams: {\n\t\t\t\t\t\t...params,\n\t\t\t\t\t\tpaging: `${page * this.pageSize},${this.pageSize}`,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t\tmap((res) => res.data.items),\n\t\t);\n\t}\n\n\tprotected override optionKey = (option: T) => option.id;\n}\n","import { HttpClient } from '@angular/common/http';\nimport { computed, Directive, forwardRef, inject, input, model } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { ILuApiItem } from '@lucca-front/ng/api';\nimport { applySearchDelimiter, CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider } from '@lucca-front/ng/core-select';\nimport { debounceTime, map, Observable, switchMap } from 'rxjs';\nimport { ALuCoreSelectApiDirective } from './api.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[apiV4],lu-multi-select[apiV4]',\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectApiV4Directive),\n\t\t},\n\t],\n})\nexport class LuCoreSelectApiV4Directive<T extends ILuApiItem> extends ALuCoreSelectApiDirective<T> implements CoreSelectApiTotalCountProvider {\n\tapiV4 = model.required<string>();\n\tsort = input<string | null>('+name');\n\tfilters = input<Record<string, string | number | boolean>>({});\n\tsearchDelimiter = input<string>(' ');\n\n\tprotected httpClient = inject(HttpClient);\n\n\tprotected clue = toSignal(this.clue$);\n\n\tprotected override params$: Observable<Record<string, string | number | boolean>> = toObservable(\n\t\tcomputed(() => {\n\t\t\tconst sort = this.sort();\n\t\t\tconst clue = this.clue();\n\t\t\tconst searchDelimiter = this.searchDelimiter();\n\t\t\treturn {\n\t\t\t\t...this.filters(),\n\t\t\t\t...(sort ? { sort } : {}),\n\t\t\t\t...(clue ? { search: applySearchDelimiter(clue, searchDelimiter) } : {}),\n\t\t\t};\n\t\t}),\n\t);\n\n\tpublic totalCount$ = toObservable(computed(() => ({ url: this.apiV4(), filters: this.filters() }))).pipe(\n\t\tdebounceTime(250),\n\t\tswitchMap(({ url, filters }) =>\n\t\t\tthis.httpClient.get<{ count: number }>(url, {\n\t\t\t\tparams: {\n\t\t\t\t\t...filters,\n\t\t\t\t\t['fields.root']: 'count',\n\t\t\t\t},\n\t\t\t}),\n\t\t),\n\t\tmap((res) => res?.count ?? 0),\n\t);\n\n\tprotected override getOptions(params: Record<string, string | number | boolean>, page: number): Observable<T[]> {\n\t\treturn this.httpClient\n\t\t\t.get<T[] | { items: T[] }>(this.apiV4(), {\n\t\t\t\tparams: {\n\t\t\t\t\t...params,\n\t\t\t\t\tpage: page + 1,\n\t\t\t\t\tlimit: this.pageSize,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.pipe(map((res) => (Array.isArray(res) ? res : res?.items) ?? []));\n\t}\n\n\tprotected override optionKey = (option: T) => option.id;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAIO,MAAM,yBAAyB,GAAG;AAClC,MAAM,uBAAuB,GAAG,GAAG;MAGpB,yBAAyB,CAAA;AAD/C,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,OAAO,EAAQ;QAC9B,IAAQ,CAAA,QAAA,GAAG,yBAAyB;QACpC,IAAgB,CAAA,gBAAA,GAAG,uBAAuB;AAE7C,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAA4C,uBAAuB,CAAC;AAEhF,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAC3C,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,EAC3B,SAAS,CAAC,CAAC,CAAC,CACZ;QAES,IAAK,CAAA,KAAA,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI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