@4sh/ui-kit 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/README.fr.md +10 -10
  2. package/README.md +10 -10
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
  4. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
  6. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
  8. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  9. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
  10. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
  11. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
  12. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
  13. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
  14. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  15. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -1000
  16. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  17. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
  18. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
  19. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2048
  20. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  21. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
  22. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
  23. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
  24. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
  25. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
  26. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  27. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
  28. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
  31. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
  32. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
  33. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -138
  34. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  35. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -257
  36. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  37. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -312
  38. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  39. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
  40. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  41. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -199
  42. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  43. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
  44. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
  45. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
  46. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
  47. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
  48. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  49. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
  50. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  51. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
  52. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  53. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
  54. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  55. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
  56. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  57. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
  58. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  59. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
  60. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
  61. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -137
  62. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  63. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
  64. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
  65. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
  66. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
  67. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
  68. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  69. package/fesm2022/4sh-ui-kit-forms.mjs +721 -638
  70. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  71. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
  72. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  73. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
  74. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
  75. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
  76. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
  77. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
  78. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
  79. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
  80. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
  82. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  83. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
  84. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
  85. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
  86. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
  87. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
  88. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  89. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
  90. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  91. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
  92. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
  93. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
  94. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
  95. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
  96. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  97. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
  98. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  99. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
  100. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  101. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
  102. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  103. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
  104. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
  105. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
  106. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  107. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
  108. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  109. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
  110. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  111. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
  112. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  113. package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
  114. package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
  115. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
  116. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
  117. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
  118. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  119. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
  120. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  121. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
  122. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  123. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
  124. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  125. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
  126. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  127. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
  128. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  129. package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
  130. package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
  131. package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
  132. package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
  133. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
  134. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  135. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
  136. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  137. package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
  138. package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
  139. package/fesm2022/4sh-ui-kit-types.mjs +0 -12
  140. package/fesm2022/4sh-ui-kit.mjs +3 -15
  141. package/fesm2022/4sh-ui-kit.mjs.map +1 -1
  142. package/mcp/data/component-api.json +299 -2
  143. package/mcp/data/text-search-docs.json +149 -9
  144. package/mcp/data/ui-config.json +378 -1
  145. package/mcp/index.js +8190 -2876
  146. package/mcp/package.json +1 -1
  147. package/package.json +5 -1
  148. package/styles/component-vars.scss +22 -1
  149. package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
  150. package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
  151. package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
  152. package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
  153. package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
  154. package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
  155. package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +573 -376
  156. package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
  157. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
  158. package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
  159. package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
  160. package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
  161. package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
  162. package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
  163. package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
  164. package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -59
  165. package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -96
  166. package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -104
  167. package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
  168. package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -118
  169. package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
  170. package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
  171. package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
  172. package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
  173. package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
  174. package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
  175. package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
  176. package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
  177. package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
  178. package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -56
  179. package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
  180. package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
  181. package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
  182. package/types/4sh-ui-kit-forms.d.ts +275 -194
  183. package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
  184. package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
  185. package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
  186. package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
  187. package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
  188. package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
  189. package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
  190. package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
  191. package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
  192. package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
  193. package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
  194. package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
  195. package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
  196. package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
  197. package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
  198. package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
  199. package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
  200. package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
  201. package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
  202. package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
  203. package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
  204. package/types/4sh-ui-kit-motion.d.ts +117 -67
  205. package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
  206. package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
  207. package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
  208. package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
  209. package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
  210. package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
  211. package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
  212. package/types/4sh-ui-kit-overlay.d.ts +6 -6
  213. package/types/4sh-ui-kit-ripple.d.ts +99 -74
  214. package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
  215. package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
  216. package/types/4sh-ui-kit-theming.d.ts +27 -29
  217. package/types/4sh-ui-kit-types.d.ts +6 -5
  218. package/types/4sh-ui-kit.d.ts +4 -3
  219. package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
@@ -1,221 +1,512 @@
1
- import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, output, contentChild, viewChild, inject, signal, computed, ElementRef, effect, Component } from '@angular/core';
3
- import { DOCUMENT } from '@angular/common';
4
- import * as i1 from '@angular/cdk/overlay';
5
- import { OverlayModule } from '@angular/cdk/overlay';
6
- import { UiMenu } from '@4sh/ui-kit/navigation/ui-menu';
7
- import { UiMotion } from '@4sh/ui-kit/motion';
8
- import { closeOnNavigation } from '@4sh/ui-kit/overlay';
9
-
10
- /**
11
- * ui-context-menu — contextual menu opened with a right-click (or any
12
- * `triggerEvent`), positioned at the pointer.
13
- *
14
- * Attach it to an element with `target` (template reference variable), or to
15
- * the whole document with `global`. The panel is a {@link UiMenu} rendered in
16
- * a CDK overlay anchored on the click coordinates: same declarative
17
- * {@link UiMenuItem} model (nested submenus, `command`, `routerLink` / `url`),
18
- * same keyboard navigation, same `navigation.*` tokens — compact density
19
- * (`size="small"`) by default.
20
- *
21
- * Manual wiring is also possible through the public `show(event)` / `hide()` /
22
- * `toggle(event)` methods.
23
- *
24
- * Customisation: `#item` and `#submenuheader` templates (forwarded to the
25
- * embedded menu), `styleClass`, `level`, `size`.
26
- */
27
- class UiContextMenu {
28
- constructor() {
29
- /** Menu entries (see {@link UiMenuItem}). */
30
- this.items = input([], /* @ts-ignore */
31
- ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
32
- /** Element the context menu is attached to (template reference variable). */
33
- this.target = input(null, /* @ts-ignore */
34
- ...(ngDevMode ? [{ debugName: "target" }] : /* istanbul ignore next */ []));
35
- /** Attach to the whole document instead of a specific `target`. */
36
- this.global = input(false, { ...(ngDevMode ? { debugName: "global" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
37
- /** DOM event opening the menu on the target (right-click by default). */
38
- this.triggerEvent = input('contextmenu', /* @ts-ignore */
39
- ...(ngDevMode ? [{ debugName: "triggerEvent" }] : /* istanbul ignore next */ []));
40
- /** Accessible name of the menu list. */
41
- this.ariaLabel = input(/* @ts-ignore */
42
- ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
43
- /** Extra class(es) applied to the panel (scoped custom styling). */
44
- this.styleClass = input(/* @ts-ignore */
45
- ...(ngDevMode ? [undefined, { debugName: "styleClass" }] : /* istanbul ignore next */ []));
46
- /** Color family: `high` (default) or `low` navigation tokens. */
47
- this.level = input('high', /* @ts-ignore */
48
- ...(ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []));
49
- /** Density — compact by default (contextual action menus). */
50
- this.size = input('small', /* @ts-ignore */
51
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
52
- /** Group rendering — cascading side panels by default (classic context menus). */
53
- this.submenus = input('flyout', /* @ts-ignore */
54
- ...(ngDevMode ? [{ debugName: "submenus" }] : /* istanbul ignore next */ []));
55
- /** Animate the menu entrance (reduced-motion always wins). */
56
- this.motion = input(true, { ...(ngDevMode ? { debugName: "motion" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
57
- /** Ripple Effect */
58
- this.ripple = input(true, { ...(ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
59
- /** Emitted when the menu opens. */
60
- this.opened = output();
61
- /** Emitted when the menu closes. */
62
- this.closed = output();
63
- /** Emitted when a leaf item is clicked / keyboard-activated. */
64
- this.itemClick = output();
65
- /** Custom menuitem content: `<ng-template #item let-item>` (forwarded to the menu). */
66
- this.itemTemplateContent = contentChild('item', /* @ts-ignore */
67
- ...(ngDevMode ? [{ debugName: "itemTemplateContent" }] : /* istanbul ignore next */ []));
68
- /** Custom group-header content: `<ng-template #submenuheader let-item>` (forwarded). */
69
- this.submenuHeaderTemplateContent = contentChild('submenuheader', /* @ts-ignore */
70
- ...(ngDevMode ? [{ debugName: "submenuHeaderTemplateContent" }] : /* istanbul ignore next */ []));
71
- /** @ignore Embedded menu (roving focus entry point). */
72
- this.menu = viewChild('menu', /* @ts-ignore */
73
- ...(ngDevMode ? [{ debugName: "menu" }] : /* istanbul ignore next */ []));
74
- /** @ignore */
75
- this.doc = inject(DOCUMENT);
76
- /** @ignore Menu visibility. */
77
- this.open = signal(false, /* @ts-ignore */
78
- ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
79
- /** @ignore Viewport coordinates the overlay is anchored on (derived from `anchorPage`). */
80
- this.overlayPoint = signal({ x: 0, y: 0 }, /* @ts-ignore */
81
- ...(ngDevMode ? [{ debugName: "overlayPoint" }] : /* istanbul ignore next */ []));
82
- /** @ignore DOCUMENT coordinates of the anchor: the menu belongs to the content,
83
- * not to the screen — it must follow the page when it scrolls. */
84
- this.anchorPage = { x: 0, y: 0 };
85
- /** @ignore Below-right of the pointer, flipping on the viewport edges. */
86
- this.overlayPositions = [
87
- { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'top' },
88
- { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top' },
89
- { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
90
- { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'bottom' },
91
- ];
92
- /** @ignore `_floating` gives the embedded panel its own viewport cap +
93
- * internal scroll (a wrapper overflow would clip the panel's shadow). */
94
- this.menuClasses = computed(() => ['_floating', this.styleClass()].filter(Boolean).join(' '), /* @ts-ignore */
95
- ...(ngDevMode ? [{ debugName: "menuClasses" }] : /* istanbul ignore next */ []));
96
- /** @ignore */
97
- this.resolvedTarget = computed(() => {
98
- const target = this.target();
99
- return target instanceof ElementRef ? target.nativeElement : (target ?? null);
100
- }, /* @ts-ignore */
101
- ...(ngDevMode ? [{ debugName: "resolvedTarget" }] : /* istanbul ignore next */ []));
102
- // The anchor is a point of the page that just left: never carry the menu
103
- // over to the next one (a `global` context menu outlives every view).
104
- closeOnNavigation(() => this.hide());
105
- // Bind the trigger listener on the target (or the document when `global`);
106
- // re-bound whenever target/global/triggerEvent change. Browser only.
107
- effect((onCleanup) => {
108
- const trigger = this.triggerEvent();
109
- const host = this.global() ? this.doc : this.resolvedTarget();
110
- if (!host || typeof window === 'undefined')
111
- return;
112
- const handler = (event) => this.onTrigger(event);
113
- host.addEventListener(trigger, handler);
114
- onCleanup(() => host.removeEventListener(trigger, handler));
115
- });
116
- // While open, follow the page scroll: the anchor is a DOCUMENT point
117
- // (page coordinates captured at open), re-projected into the viewport on
118
- // every scroll — the menu stays where it was opened, like a DOM node.
119
- effect((onCleanup) => {
120
- if (!this.open() || typeof window === 'undefined')
121
- return;
122
- const handler = () => this.overlayPoint.set({
123
- x: this.anchorPage.x - window.scrollX,
124
- y: this.anchorPage.y - window.scrollY,
125
- });
126
- this.doc.addEventListener('scroll', handler, { capture: true, passive: true });
127
- onCleanup(() => this.doc.removeEventListener('scroll', handler, true));
128
- });
129
- // While open, close on the PRESS of any pointer outside the overlays —
130
- // not on release: CDK's outside-click dispatcher attributes the opening
131
- // right-click's own `auxclick` (fired on release) to its pre-open
132
- // `pointerdown` and would close the menu as soon as the button is let go.
133
- effect((onCleanup) => {
134
- if (!this.open() || typeof window === 'undefined')
135
- return;
136
- const handler = (event) => this.onDocumentPointerdown(event);
137
- this.doc.addEventListener('pointerdown', handler, true);
138
- onCleanup(() => this.doc.removeEventListener('pointerdown', handler, true));
139
- });
140
- }
141
- // --- Public API ---------------------------------------------------------
142
- /** Opens the menu at the event's pointer coordinates. */
143
- show(event) {
144
- const scrollX = typeof window === 'undefined' ? 0 : window.scrollX;
145
- const scrollY = typeof window === 'undefined' ? 0 : window.scrollY;
146
- this.anchorPage = { x: event.clientX + scrollX, y: event.clientY + scrollY };
147
- this.overlayPoint.set({ x: event.clientX, y: event.clientY });
148
- if (!this.open()) {
149
- this.open.set(true);
150
- this.opened.emit();
151
- }
152
- this.queueFocusFirst();
153
- }
154
- /** Closes the menu. */
155
- hide() {
156
- if (!this.open())
157
- return;
158
- this.open.set(false);
159
- this.closed.emit();
160
- }
161
- /** Toggles the menu at the event's pointer coordinates. */
162
- toggle(event) {
163
- this.open() ? this.hide() : this.show(event);
164
- }
165
- // --- Interactions ---------------------------------------------------------
166
- /** @ignore Trigger event on the target/document: hijack it and open at the pointer. */
167
- onTrigger(event) {
168
- event.preventDefault();
169
- event.stopPropagation();
170
- this.show(event);
171
- }
172
- /** @ignore A new pointer press outside every overlay closes the menu.
173
- * Presses inside an overlay (menu panel, flyout side panels) are kept;
174
- * a press on the attached zone closes then immediately reopens through
175
- * the trigger handler (native repositioning behavior). */
176
- onDocumentPointerdown(event) {
177
- if (event.target instanceof Element && event.target.closest('.cdk-overlay-container'))
178
- return;
179
- this.hide();
180
- }
181
- /** @ignore */
182
- onEscape(event) {
183
- event.stopPropagation();
184
- this.hide();
185
- this.resolvedTarget()?.focus?.();
186
- }
187
- /** @ignore Activation of a leaf item: re-emit and close. */
188
- onItemClick(event) {
189
- this.itemClick.emit(event);
190
- this.hide();
191
- }
192
- /** @ignore Focus the menu's first entry once the overlay is rendered.
193
- * The overlay attaches after change detection: retry over macrotasks
194
- * (NOT rAF — it never fires in throttled/background tabs). */
195
- queueFocusFirst(attempts = 20) {
196
- setTimeout(() => {
197
- const menu = this.menu();
198
- if (menu)
199
- menu.focusFirst();
200
- else if (attempts > 0)
201
- this.queueFocusFirst(attempts - 1);
202
- });
203
- }
204
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiContextMenu, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
205
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: UiContextMenu, isStandalone: true, selector: "ui-context-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, global: { classPropertyName: "global", publicName: "global", isSignal: true, isRequired: false, transformFunction: null }, triggerEvent: { classPropertyName: "triggerEvent", publicName: "triggerEvent", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, submenus: { classPropertyName: "submenus", publicName: "submenus", isSignal: true, isRequired: false, transformFunction: null }, motion: { classPropertyName: "motion", publicName: "motion", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed", itemClick: "itemClick" }, queries: [{ propertyName: "itemTemplateContent", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "submenuHeaderTemplateContent", first: true, predicate: ["submenuheader"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayPoint()\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n (detach)=\"hide()\"\n>\n <!-- Context menu: Escape handled on the container, focus lives on the\n menu items (roving). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-context-menu\"\n [uiMotion]=\"'zoom'\"\n [motionDisabled]=\"!motion()\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n (keydown.escape)=\"onEscape($event)\"\n >\n <!-- Projected #item / #submenuheader templates are forwarded as inputs:\n the embedded menu outlets them with its own item context. -->\n <ui-menu\n #menu\n [items]=\"items()\"\n [level]=\"level()\"\n [size]=\"size()\"\n [motion]=\"motion()\"\n [ripple]=\"ripple()\"\n [submenus]=\"submenus()\"\n [styleClass]=\"menuClasses()\"\n [ariaLabel]=\"ariaLabel()\"\n [itemTemplate]=\"itemTemplateContent()\"\n [submenuHeaderTemplate]=\"submenuHeaderTemplateContent()\"\n (itemClick)=\"onItemClick($event)\"\n />\n </div>\n</ng-template>\n", styles: [".ui-context-menu{display:block}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: UiMenu, selector: "ui-menu", inputs: ["items", "popup", "expandedKeys", "ariaLabel", "ariaLabelledBy", "styleClass", "level", "size", "submenus", "motion", "ripple", "autoFlip", "tabindex", "itemTemplate", "submenuHeaderTemplate"], outputs: ["expandedKeysChange", "opened", "closed", "itemClick"] }, { kind: "directive", type: UiMotion, selector: "[uiMotion]", inputs: ["uiMotion", "motionDuration", "motionDelay", "motionEasing", "motionEnterEasing", "motionLeaveEasing", "motionDistance", "motionScale", "motionDisabled", "motionOnInsert"], exportAs: ["uiMotion"] }] }); }
206
- }
207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiContextMenu, decorators: [{
208
- type: Component,
209
- args: [{ selector: 'ui-context-menu', imports: [OverlayModule, UiMenu, UiMotion], template: "<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayPoint()\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n (detach)=\"hide()\"\n>\n <!-- Context menu: Escape handled on the container, focus lives on the\n menu items (roving). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-context-menu\"\n [uiMotion]=\"'zoom'\"\n [motionDisabled]=\"!motion()\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n (keydown.escape)=\"onEscape($event)\"\n >\n <!-- Projected #item / #submenuheader templates are forwarded as inputs:\n the embedded menu outlets them with its own item context. -->\n <ui-menu\n #menu\n [items]=\"items()\"\n [level]=\"level()\"\n [size]=\"size()\"\n [motion]=\"motion()\"\n [ripple]=\"ripple()\"\n [submenus]=\"submenus()\"\n [styleClass]=\"menuClasses()\"\n [ariaLabel]=\"ariaLabel()\"\n [itemTemplate]=\"itemTemplateContent()\"\n [submenuHeaderTemplate]=\"submenuHeaderTemplateContent()\"\n (itemClick)=\"onItemClick($event)\"\n />\n </div>\n</ng-template>\n", styles: [".ui-context-menu{display:block}\n"] }]
210
- }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], global: [{ type: i0.Input, args: [{ isSignal: true, alias: "global", required: false }] }], triggerEvent: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerEvent", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], submenus: [{ type: i0.Input, args: [{ isSignal: true, alias: "submenus", required: false }] }], motion: [{ type: i0.Input, args: [{ isSignal: true, alias: "motion", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], itemTemplateContent: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], submenuHeaderTemplateContent: [{ type: i0.ContentChild, args: ['submenuheader', { isSignal: true }] }], menu: [{ type: i0.ViewChild, args: ['menu', { isSignal: true }] }] } });
211
-
212
- /*
213
- * Public API Surface of ui-kit/ui-context-menu
214
- */
215
-
216
- /**
217
- * Generated bundle index. Do not edit.
218
- */
219
-
1
+ import * as i0 from "@angular/core";
2
+ import { Component, ElementRef, booleanAttribute, computed, contentChild, effect, inject, input, output, signal, viewChild } from "@angular/core";
3
+ import { DOCUMENT } from "@angular/common";
4
+ import * as i1 from "@angular/cdk/overlay";
5
+ import { OverlayModule } from "@angular/cdk/overlay";
6
+ import { UiMenu } from "@4sh/ui-kit/navigation/ui-menu";
7
+ import { UiMotion } from "@4sh/ui-kit/motion";
8
+ import { closeOnNavigation } from "@4sh/ui-kit/overlay";
9
+ var UiContextMenu = class UiContextMenu {
10
+ constructor() {
11
+ this.items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
12
+ this.target = input(null, ...ngDevMode ? [{ debugName: "target" }] : /* istanbul ignore next */ []);
13
+ this.global = input(false, {
14
+ ...ngDevMode ? { debugName: "global" } : /* istanbul ignore next */ {},
15
+ transform: booleanAttribute
16
+ });
17
+ this.triggerEvent = input("contextmenu", ...ngDevMode ? [{ debugName: "triggerEvent" }] : /* istanbul ignore next */ []);
18
+ this.ariaLabel = input(...ngDevMode ? [void 0, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
19
+ this.styleClass = input(...ngDevMode ? [void 0, { debugName: "styleClass" }] : /* istanbul ignore next */ []);
20
+ this.level = input("high", ...ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []);
21
+ this.size = input("small", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
22
+ this.submenus = input("flyout", ...ngDevMode ? [{ debugName: "submenus" }] : /* istanbul ignore next */ []);
23
+ this.motion = input(true, {
24
+ ...ngDevMode ? { debugName: "motion" } : /* istanbul ignore next */ {},
25
+ transform: booleanAttribute
26
+ });
27
+ this.ripple = input(true, {
28
+ ...ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {},
29
+ transform: booleanAttribute
30
+ });
31
+ this.opened = output();
32
+ this.closed = output();
33
+ this.itemClick = output();
34
+ this.itemTemplateContent = contentChild("item", ...ngDevMode ? [{ debugName: "itemTemplateContent" }] : /* istanbul ignore next */ []);
35
+ this.submenuHeaderTemplateContent = contentChild("submenuheader", ...ngDevMode ? [{ debugName: "submenuHeaderTemplateContent" }] : /* istanbul ignore next */ []);
36
+ this.menu = viewChild("menu", ...ngDevMode ? [{ debugName: "menu" }] : /* istanbul ignore next */ []);
37
+ this.doc = inject(DOCUMENT);
38
+ this.open = signal(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
39
+ this.overlayPoint = signal({
40
+ x: 0,
41
+ y: 0
42
+ }, ...ngDevMode ? [{ debugName: "overlayPoint" }] : /* istanbul ignore next */ []);
43
+ this.anchorPage = {
44
+ x: 0,
45
+ y: 0
46
+ };
47
+ this.overlayPositions = [
48
+ {
49
+ originX: "start",
50
+ originY: "top",
51
+ overlayX: "start",
52
+ overlayY: "top"
53
+ },
54
+ {
55
+ originX: "start",
56
+ originY: "top",
57
+ overlayX: "end",
58
+ overlayY: "top"
59
+ },
60
+ {
61
+ originX: "start",
62
+ originY: "top",
63
+ overlayX: "start",
64
+ overlayY: "bottom"
65
+ },
66
+ {
67
+ originX: "start",
68
+ originY: "top",
69
+ overlayX: "end",
70
+ overlayY: "bottom"
71
+ }
72
+ ];
73
+ this.menuClasses = computed(() => ["_floating", this.styleClass()].filter(Boolean).join(" "), ...ngDevMode ? [{ debugName: "menuClasses" }] : /* istanbul ignore next */ []);
74
+ this.resolvedTarget = computed(() => {
75
+ const target = this.target();
76
+ return target instanceof ElementRef ? target.nativeElement : target ?? null;
77
+ }, ...ngDevMode ? [{ debugName: "resolvedTarget" }] : /* istanbul ignore next */ []);
78
+ closeOnNavigation(() => this.hide());
79
+ effect((onCleanup) => {
80
+ const trigger = this.triggerEvent();
81
+ const host = this.global() ? this.doc : this.resolvedTarget();
82
+ if (!host || typeof window === "undefined") return;
83
+ const handler = (event) => this.onTrigger(event);
84
+ host.addEventListener(trigger, handler);
85
+ onCleanup(() => host.removeEventListener(trigger, handler));
86
+ });
87
+ effect((onCleanup) => {
88
+ if (!this.open() || typeof window === "undefined") return;
89
+ const handler = () => this.overlayPoint.set({
90
+ x: this.anchorPage.x - window.scrollX,
91
+ y: this.anchorPage.y - window.scrollY
92
+ });
93
+ this.doc.addEventListener("scroll", handler, {
94
+ capture: true,
95
+ passive: true
96
+ });
97
+ onCleanup(() => this.doc.removeEventListener("scroll", handler, true));
98
+ });
99
+ effect((onCleanup) => {
100
+ if (!this.open() || typeof window === "undefined") return;
101
+ const handler = (event) => this.onDocumentPointerdown(event);
102
+ this.doc.addEventListener("pointerdown", handler, true);
103
+ onCleanup(() => this.doc.removeEventListener("pointerdown", handler, true));
104
+ });
105
+ }
106
+ show(event) {
107
+ const scrollX = typeof window === "undefined" ? 0 : window.scrollX;
108
+ const scrollY = typeof window === "undefined" ? 0 : window.scrollY;
109
+ this.anchorPage = {
110
+ x: event.clientX + scrollX,
111
+ y: event.clientY + scrollY
112
+ };
113
+ this.overlayPoint.set({
114
+ x: event.clientX,
115
+ y: event.clientY
116
+ });
117
+ if (!this.open()) {
118
+ this.open.set(true);
119
+ this.opened.emit();
120
+ }
121
+ this.queueFocusFirst();
122
+ }
123
+ hide() {
124
+ if (!this.open()) return;
125
+ this.open.set(false);
126
+ this.closed.emit();
127
+ }
128
+ toggle(event) {
129
+ this.open() ? this.hide() : this.show(event);
130
+ }
131
+ onTrigger(event) {
132
+ event.preventDefault();
133
+ event.stopPropagation();
134
+ this.show(event);
135
+ }
136
+ onDocumentPointerdown(event) {
137
+ if (event.target instanceof Element && event.target.closest(".cdk-overlay-container")) return;
138
+ this.hide();
139
+ }
140
+ onEscape(event) {
141
+ event.stopPropagation();
142
+ this.hide();
143
+ this.resolvedTarget()?.focus?.();
144
+ }
145
+ onItemClick(event) {
146
+ this.itemClick.emit(event);
147
+ this.hide();
148
+ }
149
+ queueFocusFirst(attempts = 20) {
150
+ setTimeout(() => {
151
+ const menu = this.menu();
152
+ if (menu) menu.focusFirst();
153
+ else if (attempts > 0) this.queueFocusFirst(attempts - 1);
154
+ });
155
+ }
156
+ static {
157
+ this.ɵfac = i0.ɵɵngDeclareFactory({
158
+ minVersion: "12.0.0",
159
+ version: "22.3.0",
160
+ ngImport: i0,
161
+ type: UiContextMenu,
162
+ deps: [],
163
+ target: i0.ɵɵFactoryTarget.Component
164
+ });
165
+ }
166
+ static {
167
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
168
+ minVersion: "17.2.0",
169
+ version: "22.3.0",
170
+ type: UiContextMenu,
171
+ isStandalone: true,
172
+ selector: "ui-context-menu",
173
+ inputs: {
174
+ items: {
175
+ classPropertyName: "items",
176
+ publicName: "items",
177
+ isSignal: true,
178
+ isRequired: false,
179
+ transformFunction: null
180
+ },
181
+ target: {
182
+ classPropertyName: "target",
183
+ publicName: "target",
184
+ isSignal: true,
185
+ isRequired: false,
186
+ transformFunction: null
187
+ },
188
+ global: {
189
+ classPropertyName: "global",
190
+ publicName: "global",
191
+ isSignal: true,
192
+ isRequired: false,
193
+ transformFunction: null
194
+ },
195
+ triggerEvent: {
196
+ classPropertyName: "triggerEvent",
197
+ publicName: "triggerEvent",
198
+ isSignal: true,
199
+ isRequired: false,
200
+ transformFunction: null
201
+ },
202
+ ariaLabel: {
203
+ classPropertyName: "ariaLabel",
204
+ publicName: "ariaLabel",
205
+ isSignal: true,
206
+ isRequired: false,
207
+ transformFunction: null
208
+ },
209
+ styleClass: {
210
+ classPropertyName: "styleClass",
211
+ publicName: "styleClass",
212
+ isSignal: true,
213
+ isRequired: false,
214
+ transformFunction: null
215
+ },
216
+ level: {
217
+ classPropertyName: "level",
218
+ publicName: "level",
219
+ isSignal: true,
220
+ isRequired: false,
221
+ transformFunction: null
222
+ },
223
+ size: {
224
+ classPropertyName: "size",
225
+ publicName: "size",
226
+ isSignal: true,
227
+ isRequired: false,
228
+ transformFunction: null
229
+ },
230
+ submenus: {
231
+ classPropertyName: "submenus",
232
+ publicName: "submenus",
233
+ isSignal: true,
234
+ isRequired: false,
235
+ transformFunction: null
236
+ },
237
+ motion: {
238
+ classPropertyName: "motion",
239
+ publicName: "motion",
240
+ isSignal: true,
241
+ isRequired: false,
242
+ transformFunction: null
243
+ },
244
+ ripple: {
245
+ classPropertyName: "ripple",
246
+ publicName: "ripple",
247
+ isSignal: true,
248
+ isRequired: false,
249
+ transformFunction: null
250
+ }
251
+ },
252
+ outputs: {
253
+ opened: "opened",
254
+ closed: "closed",
255
+ itemClick: "itemClick"
256
+ },
257
+ queries: [{
258
+ propertyName: "itemTemplateContent",
259
+ first: true,
260
+ predicate: ["item"],
261
+ descendants: true,
262
+ isSignal: true
263
+ }, {
264
+ propertyName: "submenuHeaderTemplateContent",
265
+ first: true,
266
+ predicate: ["submenuheader"],
267
+ descendants: true,
268
+ isSignal: true
269
+ }],
270
+ viewQueries: [{
271
+ propertyName: "menu",
272
+ first: true,
273
+ predicate: ["menu"],
274
+ descendants: true,
275
+ isSignal: true
276
+ }],
277
+ ngImport: i0,
278
+ template: "<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayPoint()\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n (detach)=\"hide()\"\n>\n <!-- Context menu: Escape handled on the container, focus lives on the\n menu items (roving). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-context-menu\"\n [uiMotion]=\"'zoom'\"\n [motionDisabled]=\"!motion()\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n (keydown.escape)=\"onEscape($event)\"\n >\n <!-- Projected #item / #submenuheader templates are forwarded as inputs:\n the embedded menu outlets them with its own item context. -->\n <ui-menu\n #menu\n [items]=\"items()\"\n [level]=\"level()\"\n [size]=\"size()\"\n [motion]=\"motion()\"\n [ripple]=\"ripple()\"\n [submenus]=\"submenus()\"\n [styleClass]=\"menuClasses()\"\n [ariaLabel]=\"ariaLabel()\"\n [itemTemplate]=\"itemTemplateContent()\"\n [submenuHeaderTemplate]=\"submenuHeaderTemplateContent()\"\n (itemClick)=\"onItemClick($event)\"\n />\n </div>\n</ng-template>\n",
279
+ styles: [".ui-context-menu{display:block}\n"],
280
+ dependencies: [
281
+ {
282
+ kind: "ngmodule",
283
+ type: OverlayModule
284
+ },
285
+ {
286
+ kind: "directive",
287
+ type: i1.CdkConnectedOverlay,
288
+ selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]",
289
+ inputs: [
290
+ "cdkConnectedOverlayOrigin",
291
+ "cdkConnectedOverlayPositions",
292
+ "cdkConnectedOverlayPositionStrategy",
293
+ "cdkConnectedOverlayOffsetX",
294
+ "cdkConnectedOverlayOffsetY",
295
+ "cdkConnectedOverlayWidth",
296
+ "cdkConnectedOverlayHeight",
297
+ "cdkConnectedOverlayMinWidth",
298
+ "cdkConnectedOverlayMinHeight",
299
+ "cdkConnectedOverlayBackdropClass",
300
+ "cdkConnectedOverlayPanelClass",
301
+ "cdkConnectedOverlayViewportMargin",
302
+ "cdkConnectedOverlayScrollStrategy",
303
+ "cdkConnectedOverlayOpen",
304
+ "cdkConnectedOverlayDisableClose",
305
+ "cdkConnectedOverlayTransformOriginOn",
306
+ "cdkConnectedOverlayHasBackdrop",
307
+ "cdkConnectedOverlayLockPosition",
308
+ "cdkConnectedOverlayFlexibleDimensions",
309
+ "cdkConnectedOverlayGrowAfterOpen",
310
+ "cdkConnectedOverlayPush",
311
+ "cdkConnectedOverlayDisposeOnNavigation",
312
+ "cdkConnectedOverlayUsePopover",
313
+ "cdkConnectedOverlayMatchWidth",
314
+ "cdkConnectedOverlay"
315
+ ],
316
+ outputs: [
317
+ "backdropClick",
318
+ "positionChange",
319
+ "attach",
320
+ "detach",
321
+ "overlayKeydown",
322
+ "overlayOutsideClick"
323
+ ],
324
+ exportAs: ["cdkConnectedOverlay"]
325
+ },
326
+ {
327
+ kind: "component",
328
+ type: UiMenu,
329
+ selector: "ui-menu",
330
+ inputs: [
331
+ "items",
332
+ "popup",
333
+ "expandedKeys",
334
+ "ariaLabel",
335
+ "ariaLabelledBy",
336
+ "styleClass",
337
+ "level",
338
+ "size",
339
+ "submenus",
340
+ "motion",
341
+ "ripple",
342
+ "autoFlip",
343
+ "tabindex",
344
+ "itemTemplate",
345
+ "submenuHeaderTemplate"
346
+ ],
347
+ outputs: [
348
+ "expandedKeysChange",
349
+ "opened",
350
+ "closed",
351
+ "itemClick"
352
+ ]
353
+ },
354
+ {
355
+ kind: "directive",
356
+ type: UiMotion,
357
+ selector: "[uiMotion]",
358
+ inputs: [
359
+ "uiMotion",
360
+ "motionDuration",
361
+ "motionDelay",
362
+ "motionEasing",
363
+ "motionEnterEasing",
364
+ "motionLeaveEasing",
365
+ "motionDistance",
366
+ "motionScale",
367
+ "motionDisabled",
368
+ "motionOnInsert"
369
+ ],
370
+ exportAs: ["uiMotion"]
371
+ }
372
+ ]
373
+ });
374
+ }
375
+ };
376
+ i0.ɵɵngDeclareClassMetadata({
377
+ minVersion: "12.0.0",
378
+ version: "22.3.0",
379
+ ngImport: i0,
380
+ type: UiContextMenu,
381
+ decorators: [{
382
+ type: Component,
383
+ args: [{
384
+ selector: "ui-context-menu",
385
+ imports: [
386
+ OverlayModule,
387
+ UiMenu,
388
+ UiMotion
389
+ ],
390
+ template: "<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayPoint()\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n (detach)=\"hide()\"\n>\n <!-- Context menu: Escape handled on the container, focus lives on the\n menu items (roving). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-context-menu\"\n [uiMotion]=\"'zoom'\"\n [motionDisabled]=\"!motion()\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n (keydown.escape)=\"onEscape($event)\"\n >\n <!-- Projected #item / #submenuheader templates are forwarded as inputs:\n the embedded menu outlets them with its own item context. -->\n <ui-menu\n #menu\n [items]=\"items()\"\n [level]=\"level()\"\n [size]=\"size()\"\n [motion]=\"motion()\"\n [ripple]=\"ripple()\"\n [submenus]=\"submenus()\"\n [styleClass]=\"menuClasses()\"\n [ariaLabel]=\"ariaLabel()\"\n [itemTemplate]=\"itemTemplateContent()\"\n [submenuHeaderTemplate]=\"submenuHeaderTemplateContent()\"\n (itemClick)=\"onItemClick($event)\"\n />\n </div>\n</ng-template>\n",
391
+ styles: [".ui-context-menu{display:block}\n"]
392
+ }]
393
+ }],
394
+ ctorParameters: () => [],
395
+ propDecorators: {
396
+ items: [{
397
+ type: i0.Input,
398
+ args: [{
399
+ isSignal: true,
400
+ alias: "items",
401
+ required: false
402
+ }]
403
+ }],
404
+ target: [{
405
+ type: i0.Input,
406
+ args: [{
407
+ isSignal: true,
408
+ alias: "target",
409
+ required: false
410
+ }]
411
+ }],
412
+ global: [{
413
+ type: i0.Input,
414
+ args: [{
415
+ isSignal: true,
416
+ alias: "global",
417
+ required: false
418
+ }]
419
+ }],
420
+ triggerEvent: [{
421
+ type: i0.Input,
422
+ args: [{
423
+ isSignal: true,
424
+ alias: "triggerEvent",
425
+ required: false
426
+ }]
427
+ }],
428
+ ariaLabel: [{
429
+ type: i0.Input,
430
+ args: [{
431
+ isSignal: true,
432
+ alias: "ariaLabel",
433
+ required: false
434
+ }]
435
+ }],
436
+ styleClass: [{
437
+ type: i0.Input,
438
+ args: [{
439
+ isSignal: true,
440
+ alias: "styleClass",
441
+ required: false
442
+ }]
443
+ }],
444
+ level: [{
445
+ type: i0.Input,
446
+ args: [{
447
+ isSignal: true,
448
+ alias: "level",
449
+ required: false
450
+ }]
451
+ }],
452
+ size: [{
453
+ type: i0.Input,
454
+ args: [{
455
+ isSignal: true,
456
+ alias: "size",
457
+ required: false
458
+ }]
459
+ }],
460
+ submenus: [{
461
+ type: i0.Input,
462
+ args: [{
463
+ isSignal: true,
464
+ alias: "submenus",
465
+ required: false
466
+ }]
467
+ }],
468
+ motion: [{
469
+ type: i0.Input,
470
+ args: [{
471
+ isSignal: true,
472
+ alias: "motion",
473
+ required: false
474
+ }]
475
+ }],
476
+ ripple: [{
477
+ type: i0.Input,
478
+ args: [{
479
+ isSignal: true,
480
+ alias: "ripple",
481
+ required: false
482
+ }]
483
+ }],
484
+ opened: [{
485
+ type: i0.Output,
486
+ args: ["opened"]
487
+ }],
488
+ closed: [{
489
+ type: i0.Output,
490
+ args: ["closed"]
491
+ }],
492
+ itemClick: [{
493
+ type: i0.Output,
494
+ args: ["itemClick"]
495
+ }],
496
+ itemTemplateContent: [{
497
+ type: i0.ContentChild,
498
+ args: ["item", { isSignal: true }]
499
+ }],
500
+ submenuHeaderTemplateContent: [{
501
+ type: i0.ContentChild,
502
+ args: ["submenuheader", { isSignal: true }]
503
+ }],
504
+ menu: [{
505
+ type: i0.ViewChild,
506
+ args: ["menu", { isSignal: true }]
507
+ }]
508
+ }
509
+ });
220
510
  export { UiContextMenu };
221
- //# sourceMappingURL=4sh-ui-kit-navigation-ui-context-menu.mjs.map
511
+
512
+ //# sourceMappingURL=4sh-ui-kit-navigation-ui-context-menu.mjs.map