@acorex/components 22.1.0-next.31 → 22.1.0-next.32

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 (262) hide show
  1. package/emoji/README.md +3 -0
  2. package/emojipicker/README.md +3 -0
  3. package/fesm2022/acorex-components-accordion.mjs +13 -13
  4. package/fesm2022/acorex-components-accordion.mjs.map +1 -1
  5. package/fesm2022/acorex-components-action-sheet.mjs +13 -13
  6. package/fesm2022/acorex-components-alert.mjs +7 -7
  7. package/fesm2022/acorex-components-aspect-ratio.mjs +3 -3
  8. package/fesm2022/acorex-components-audio-wave.mjs +295 -271
  9. package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
  10. package/fesm2022/acorex-components-autocomplete.mjs +7 -7
  11. package/fesm2022/acorex-components-avatar.mjs +10 -10
  12. package/fesm2022/acorex-components-badge.mjs +7 -7
  13. package/fesm2022/acorex-components-bottom-navigation.mjs +10 -10
  14. package/fesm2022/acorex-components-breadcrumbs.mjs +10 -10
  15. package/fesm2022/acorex-components-bubble.mjs +71 -0
  16. package/fesm2022/acorex-components-bubble.mjs.map +1 -0
  17. package/fesm2022/acorex-components-button-group.mjs +22 -15
  18. package/fesm2022/acorex-components-button-group.mjs.map +1 -1
  19. package/fesm2022/acorex-components-button.mjs +14 -14
  20. package/fesm2022/acorex-components-button.mjs.map +1 -1
  21. package/fesm2022/acorex-components-calendar.mjs +332 -130
  22. package/fesm2022/acorex-components-calendar.mjs.map +1 -1
  23. package/fesm2022/acorex-components-check-box.mjs +7 -7
  24. package/fesm2022/acorex-components-chips.mjs +7 -7
  25. package/fesm2022/acorex-components-circular-progress.mjs +7 -7
  26. package/fesm2022/acorex-components-code-editor.mjs +44 -19
  27. package/fesm2022/acorex-components-code-editor.mjs.map +1 -1
  28. package/fesm2022/acorex-components-color-box.mjs +7 -7
  29. package/fesm2022/acorex-components-color-palette.mjs +28 -28
  30. package/fesm2022/acorex-components-combo-box.mjs +244 -54
  31. package/fesm2022/acorex-components-combo-box.mjs.map +1 -1
  32. package/fesm2022/acorex-components-command.mjs +7 -7
  33. package/fesm2022/acorex-components-comment.mjs +28 -28
  34. package/fesm2022/acorex-components-conversation-acorex-components-conversation-BBWe3tfe.mjs +19099 -0
  35. package/fesm2022/acorex-components-conversation-acorex-components-conversation-BBWe3tfe.mjs.map +1 -0
  36. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-F5fLD_SK.mjs +50 -0
  37. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-F5fLD_SK.mjs.map +1 -0
  38. package/fesm2022/acorex-components-conversation-image-picker-editor-dialog.component-Bk3ixvt2.mjs +87 -0
  39. package/fesm2022/acorex-components-conversation-image-picker-editor-dialog.component-Bk3ixvt2.mjs.map +1 -0
  40. package/fesm2022/acorex-components-conversation-picker-rename-file-dialog.component-OAHRGH_G.mjs +65 -0
  41. package/fesm2022/acorex-components-conversation-picker-rename-file-dialog.component-OAHRGH_G.mjs.map +1 -0
  42. package/fesm2022/acorex-components-conversation.mjs +1 -15470
  43. package/fesm2022/acorex-components-conversation.mjs.map +1 -1
  44. package/fesm2022/acorex-components-cron-job.mjs +47 -47
  45. package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
  46. package/fesm2022/acorex-components-data-list.mjs +3 -3
  47. package/fesm2022/acorex-components-data-pager.mjs +35 -35
  48. package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
  49. package/fesm2022/acorex-components-data-table.mjs +734 -165
  50. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  51. package/fesm2022/acorex-components-datetime-box.mjs +7 -7
  52. package/fesm2022/acorex-components-datetime-input.mjs +7 -7
  53. package/fesm2022/acorex-components-datetime-picker.mjs +8 -8
  54. package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
  55. package/fesm2022/acorex-components-decorators.mjs +60 -30
  56. package/fesm2022/acorex-components-decorators.mjs.map +1 -1
  57. package/fesm2022/acorex-components-dialog.mjs +11 -11
  58. package/fesm2022/acorex-components-dialog.mjs.map +1 -1
  59. package/fesm2022/acorex-components-drawer.mjs +10 -10
  60. package/fesm2022/acorex-components-dropdown-button.mjs +8 -8
  61. package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
  62. package/fesm2022/acorex-components-dropdown.mjs +14 -14
  63. package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
  64. package/fesm2022/acorex-components-editor.mjs +15 -14
  65. package/fesm2022/acorex-components-editor.mjs.map +1 -1
  66. package/fesm2022/acorex-components-emoji.mjs +74 -0
  67. package/fesm2022/acorex-components-emoji.mjs.map +1 -0
  68. package/fesm2022/acorex-components-emojipicker.mjs +425 -0
  69. package/fesm2022/acorex-components-emojipicker.mjs.map +1 -0
  70. package/fesm2022/acorex-components-fab.mjs +6 -6
  71. package/fesm2022/acorex-components-fab.mjs.map +1 -1
  72. package/fesm2022/acorex-components-file-viewer.mjs +372 -122
  73. package/fesm2022/acorex-components-file-viewer.mjs.map +1 -1
  74. package/fesm2022/acorex-components-form.mjs +17 -17
  75. package/fesm2022/acorex-components-form.mjs.map +1 -1
  76. package/fesm2022/acorex-components-grid-layout-builder.mjs +10 -10
  77. package/fesm2022/acorex-components-highlight.mjs +80 -0
  78. package/fesm2022/acorex-components-highlight.mjs.map +1 -0
  79. package/fesm2022/acorex-components-image-editor.mjs +780 -451
  80. package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
  81. package/fesm2022/acorex-components-image.mjs +7 -7
  82. package/fesm2022/acorex-components-inline-reaction.mjs +111 -0
  83. package/fesm2022/acorex-components-inline-reaction.mjs.map +1 -0
  84. package/fesm2022/acorex-components-json-viewer.mjs +7 -7
  85. package/fesm2022/acorex-components-kanban.mjs +3 -3
  86. package/fesm2022/acorex-components-kanban.mjs.map +1 -1
  87. package/fesm2022/acorex-components-kbd.mjs +6 -6
  88. package/fesm2022/acorex-components-label.mjs +7 -7
  89. package/fesm2022/acorex-components-list.mjs +28 -9
  90. package/fesm2022/acorex-components-list.mjs.map +1 -1
  91. package/fesm2022/acorex-components-loading-dialog.mjs +10 -10
  92. package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
  93. package/fesm2022/acorex-components-loading.mjs +16 -16
  94. package/fesm2022/acorex-components-lookup.mjs +764 -156
  95. package/fesm2022/acorex-components-lookup.mjs.map +1 -1
  96. package/fesm2022/acorex-components-map.mjs +20 -13
  97. package/fesm2022/acorex-components-map.mjs.map +1 -1
  98. package/fesm2022/acorex-components-media-viewer.mjs +215 -218
  99. package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
  100. package/fesm2022/acorex-components-menu.mjs +146 -45
  101. package/fesm2022/acorex-components-menu.mjs.map +1 -1
  102. package/fesm2022/acorex-components-message-status.mjs +71 -0
  103. package/fesm2022/acorex-components-message-status.mjs.map +1 -0
  104. package/fesm2022/acorex-components-message-time.mjs +36 -0
  105. package/fesm2022/acorex-components-message-time.mjs.map +1 -0
  106. package/fesm2022/acorex-components-message.mjs +120 -0
  107. package/fesm2022/acorex-components-message.mjs.map +1 -0
  108. package/fesm2022/acorex-components-navbar.mjs +7 -7
  109. package/fesm2022/acorex-components-notification.mjs +11 -11
  110. package/fesm2022/acorex-components-notification.mjs.map +1 -1
  111. package/fesm2022/acorex-components-number-box.mjs +7 -7
  112. package/fesm2022/acorex-components-otp.mjs +7 -7
  113. package/fesm2022/acorex-components-page.mjs +10 -10
  114. package/fesm2022/acorex-components-paint.mjs +25 -25
  115. package/fesm2022/acorex-components-paint.mjs.map +1 -1
  116. package/fesm2022/acorex-components-password-box.mjs +10 -10
  117. package/fesm2022/acorex-components-password-box.mjs.map +1 -1
  118. package/fesm2022/acorex-components-pdf-reader.mjs +7 -7
  119. package/fesm2022/acorex-components-phone-box.mjs +7 -7
  120. package/fesm2022/acorex-components-picker.mjs +13 -13
  121. package/fesm2022/acorex-components-popover.mjs +33 -15
  122. package/fesm2022/acorex-components-popover.mjs.map +1 -1
  123. package/fesm2022/acorex-components-popup.mjs +67 -56
  124. package/fesm2022/acorex-components-popup.mjs.map +1 -1
  125. package/fesm2022/acorex-components-progress-bar.mjs +7 -7
  126. package/fesm2022/acorex-components-qrcode.mjs +7 -7
  127. package/fesm2022/acorex-components-radio.mjs +7 -7
  128. package/fesm2022/acorex-components-rail-navigation.mjs +14 -14
  129. package/fesm2022/acorex-components-rail-navigation.mjs.map +1 -1
  130. package/fesm2022/acorex-components-range-slider.mjs +9 -9
  131. package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
  132. package/fesm2022/acorex-components-rate-picker.mjs +7 -7
  133. package/fesm2022/acorex-components-reaction.mjs +144 -0
  134. package/fesm2022/acorex-components-reaction.mjs.map +1 -0
  135. package/fesm2022/acorex-components-rest-api-generator.mjs +22 -22
  136. package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
  137. package/fesm2022/acorex-components-result.mjs +7 -7
  138. package/fesm2022/acorex-components-routing-progress.mjs +7 -7
  139. package/fesm2022/acorex-components-rrule.mjs +9 -9
  140. package/fesm2022/acorex-components-rrule.mjs.map +1 -1
  141. package/fesm2022/acorex-components-scheduler-picker.mjs +56 -56
  142. package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
  143. package/fesm2022/acorex-components-scheduler.mjs +34 -34
  144. package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
  145. package/fesm2022/acorex-components-search-box.mjs +7 -7
  146. package/fesm2022/acorex-components-select-box.mjs +7 -7
  147. package/fesm2022/acorex-components-selection-list.mjs +7 -8
  148. package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
  149. package/fesm2022/acorex-components-side-menu.mjs +55 -42
  150. package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
  151. package/fesm2022/acorex-components-sidebar.mjs +28 -28
  152. package/fesm2022/acorex-components-skeleton.mjs +7 -7
  153. package/fesm2022/acorex-components-slider.mjs +7 -7
  154. package/fesm2022/acorex-components-sliding-item.mjs +13 -13
  155. package/fesm2022/acorex-components-step-wizard.mjs +16 -18
  156. package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
  157. package/fesm2022/acorex-components-switch.mjs +10 -10
  158. package/fesm2022/acorex-components-tabs.mjs +529 -78
  159. package/fesm2022/acorex-components-tabs.mjs.map +1 -1
  160. package/fesm2022/acorex-components-tag-box.mjs +7 -7
  161. package/fesm2022/acorex-components-tag.mjs +7 -7
  162. package/fesm2022/acorex-components-text-area.mjs +7 -7
  163. package/fesm2022/acorex-components-text-box.mjs +7 -7
  164. package/fesm2022/acorex-components-time-duration.mjs +7 -7
  165. package/fesm2022/acorex-components-time-line.mjs +10 -10
  166. package/fesm2022/acorex-components-toast.mjs +10 -10
  167. package/fesm2022/acorex-components-toolbar.mjs +7 -7
  168. package/fesm2022/acorex-components-tooltip.mjs +10 -10
  169. package/fesm2022/acorex-components-tree-view.mjs +58 -15
  170. package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
  171. package/fesm2022/acorex-components-uploader.mjs +13 -13
  172. package/fesm2022/acorex-components-video-player.mjs +7 -7
  173. package/fesm2022/acorex-components-wysiwyg.mjs +109 -39
  174. package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
  175. package/highlight/README.md +13 -0
  176. package/inline-reaction/README.md +3 -0
  177. package/lookup/README.md +1 -1
  178. package/message/README.md +3 -0
  179. package/message-status/README.md +3 -0
  180. package/message-time/README.md +3 -0
  181. package/package.json +42 -12
  182. package/reaction/README.md +3 -0
  183. package/types/acorex-components-action-sheet.d.ts +1 -1
  184. package/types/acorex-components-audio-wave.d.ts +132 -73
  185. package/types/acorex-components-bubble.d.ts +31 -0
  186. package/types/acorex-components-button-group.d.ts +4 -0
  187. package/types/acorex-components-button.d.ts +1 -1
  188. package/types/acorex-components-calendar.d.ts +43 -12
  189. package/types/acorex-components-check-box.d.ts +1 -1
  190. package/types/acorex-components-code-editor.d.ts +4 -1
  191. package/types/acorex-components-color-box.d.ts +1 -1
  192. package/types/acorex-components-color-palette.d.ts +2 -2
  193. package/types/acorex-components-combo-box.d.ts +34 -4
  194. package/types/acorex-components-command.d.ts +1 -1
  195. package/types/acorex-components-conversation.d.ts +1771 -1342
  196. package/types/acorex-components-cron-job.d.ts +6 -6
  197. package/types/acorex-components-data-pager.d.ts +2 -2
  198. package/types/acorex-components-data-table.d.ts +194 -21
  199. package/types/acorex-components-datetime-box.d.ts +1 -1
  200. package/types/acorex-components-datetime-picker.d.ts +1 -1
  201. package/types/acorex-components-decorators.d.ts +13 -1
  202. package/types/acorex-components-dialog.d.ts +1 -1
  203. package/types/acorex-components-dropdown.d.ts +1 -1
  204. package/types/acorex-components-editor.d.ts +1 -1
  205. package/types/acorex-components-emoji.d.ts +42 -0
  206. package/types/acorex-components-emojipicker.d.ts +146 -0
  207. package/types/acorex-components-file-viewer.d.ts +50 -6
  208. package/types/acorex-components-highlight.d.ts +31 -0
  209. package/types/acorex-components-image-editor.d.ts +72 -50
  210. package/types/acorex-components-inline-reaction.d.ts +52 -0
  211. package/types/acorex-components-list.d.ts +12 -0
  212. package/types/acorex-components-loading-dialog.d.ts +1 -1
  213. package/types/acorex-components-loading.d.ts +1 -1
  214. package/types/acorex-components-lookup.d.ts +213 -82
  215. package/types/acorex-components-map.d.ts +7 -2
  216. package/types/acorex-components-media-viewer.d.ts +4 -3
  217. package/types/acorex-components-menu.d.ts +17 -5
  218. package/types/acorex-components-message-status.d.ts +23 -0
  219. package/types/acorex-components-message-time.d.ts +19 -0
  220. package/types/acorex-components-message.d.ts +59 -0
  221. package/types/acorex-components-notification.d.ts +1 -1
  222. package/types/acorex-components-number-box.d.ts +1 -1
  223. package/types/acorex-components-otp.d.ts +1 -1
  224. package/types/acorex-components-page.d.ts +2 -2
  225. package/types/acorex-components-paint.d.ts +2 -2
  226. package/types/acorex-components-password-box.d.ts +1 -1
  227. package/types/acorex-components-phone-box.d.ts +1 -1
  228. package/types/acorex-components-popover.d.ts +10 -4
  229. package/types/acorex-components-popup.d.ts +20 -10
  230. package/types/acorex-components-rail-navigation.d.ts +1 -1
  231. package/types/acorex-components-range-slider.d.ts +1 -1
  232. package/types/acorex-components-reaction.d.ts +85 -0
  233. package/types/acorex-components-rest-api-generator.d.ts +1 -1
  234. package/types/acorex-components-rrule.d.ts +1 -1
  235. package/types/acorex-components-scheduler-picker.d.ts +1 -1
  236. package/types/acorex-components-scheduler.d.ts +1 -1
  237. package/types/acorex-components-search-box.d.ts +1 -1
  238. package/types/acorex-components-selection-list.d.ts +1 -1
  239. package/types/acorex-components-side-menu.d.ts +6 -8
  240. package/types/acorex-components-slider.d.ts +1 -1
  241. package/types/acorex-components-step-wizard.d.ts +4 -4
  242. package/types/acorex-components-switch.d.ts +1 -1
  243. package/types/acorex-components-tabs.d.ts +150 -19
  244. package/types/acorex-components-tag-box.d.ts +2 -2
  245. package/types/acorex-components-text-area.d.ts +1 -1
  246. package/types/acorex-components-text-box.d.ts +1 -1
  247. package/types/acorex-components-time-duration.d.ts +1 -1
  248. package/types/acorex-components-toast.d.ts +1 -1
  249. package/types/acorex-components-tree-view.d.ts +32 -3
  250. package/types/acorex-components-wysiwyg.d.ts +15 -2
  251. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs +0 -50
  252. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs.map +0 -1
  253. package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-DnSW908R.mjs +0 -210
  254. package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-DnSW908R.mjs.map +0 -1
  255. package/fesm2022/acorex-components-flow-chart.mjs +0 -735
  256. package/fesm2022/acorex-components-flow-chart.mjs.map +0 -1
  257. package/fesm2022/acorex-components-query-builder.mjs +0 -267
  258. package/fesm2022/acorex-components-query-builder.mjs.map +0 -1
  259. package/flow-chart/README.md +0 -3
  260. package/query-builder/README.md +0 -3
  261. package/types/acorex-components-flow-chart.d.ts +0 -187
  262. package/types/acorex-components-query-builder.d.ts +0 -52
@@ -0,0 +1,50 @@
1
+ import { AXComponentCloseEvent, AXClosableComponent } from '@acorex/cdk/common';
2
+ import { AXTranslationService } from '@acorex/core/translation';
3
+ import * as i0 from '@angular/core';
4
+ import { inject, input, computed, EventEmitter, ViewEncapsulation, Component } from '@angular/core';
5
+
6
+ class AXConversationComposerActionChoiceDialogComponent {
7
+ constructor() {
8
+ this.translation = inject(AXTranslationService);
9
+ this.actions = input.required(/* @ts-ignore */
10
+ ...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
11
+ this.fileCount = input(1, /* @ts-ignore */
12
+ ...(ngDevMode ? [{ debugName: "fileCount" }] : /* istanbul ignore next */ []));
13
+ this.composerActionRegistry = input.required(/* @ts-ignore */
14
+ ...(ngDevMode ? [{ debugName: "composerActionRegistry" }] : /* istanbul ignore next */ []));
15
+ this.__popup__ = input(/* @ts-ignore */
16
+ ...(ngDevMode ? [undefined, { debugName: "__popup__" }] : /* istanbul ignore next */ []));
17
+ this.hintText = computed(() => {
18
+ const count = this.fileCount();
19
+ if (count === 1) {
20
+ return this.translation.translateSync('@acorex:chat.dialog.choose-send-option.hint-single');
21
+ }
22
+ return this.translation.translateSync('@acorex:chat.dialog.choose-send-option.hint-multiple', {
23
+ params: { count },
24
+ });
25
+ }, /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "hintText" }] : /* istanbul ignore next */ []));
27
+ this.onClosed = new EventEmitter();
28
+ }
29
+ getActionLabel(action) {
30
+ return this.composerActionRegistry().getActionLabel(action);
31
+ }
32
+ getActionTooltip(action) {
33
+ return this.composerActionRegistry().getActionTooltip(action);
34
+ }
35
+ choose(action) {
36
+ const event = new AXComponentCloseEvent();
37
+ event.component = this;
38
+ event.data = action;
39
+ this.onClosed.emit(event);
40
+ }
41
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXConversationComposerActionChoiceDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
42
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AXConversationComposerActionChoiceDialogComponent, isStandalone: true, selector: "ax-conversation-composer-action-choice-dialog", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: true, transformFunction: null }, fileCount: { classPropertyName: "fileCount", publicName: "fileCount", isSignal: true, isRequired: false, transformFunction: null }, composerActionRegistry: { classPropertyName: "composerActionRegistry", publicName: "composerActionRegistry", isSignal: true, isRequired: true, transformFunction: null }, __popup__: { classPropertyName: "__popup__", publicName: "__popup__", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXClosableComponent, useExisting: AXConversationComposerActionChoiceDialogComponent }], ngImport: i0, template: "<div class=\"composer-action-choice\" role=\"dialog\" aria-modal=\"true\">\n <p class=\"composer-action-choice__hint\">{{ hintText() }}</p>\n <ul class=\"composer-action-choice__list\" role=\"listbox\">\n @for (action of actions(); track action.id) {\n <li role=\"none\">\n <button\n type=\"button\"\n class=\"composer-action-choice__option\"\n role=\"option\"\n [attr.aria-label]=\"getActionLabel(action)\"\n (click)=\"choose(action)\"\n >\n <span class=\"composer-action-choice__icon\" aria-hidden=\"true\">\n <i [class]=\"action.icon\"></i>\n </span>\n <span class=\"composer-action-choice__text\">\n <span class=\"composer-action-choice__title\">{{ getActionLabel(action) }}</span>\n @if (getActionTooltip(action); as tip) {\n <span class=\"composer-action-choice__subtitle\">{{ tip }}</span>\n }\n </span>\n <i class=\"fa-light fa-chevron-right composer-action-choice__chevron\" aria-hidden=\"true\"></i>\n </button>\n </li>\n }\n </ul>\n</div>\n", styles: ["@layer properties;@layer components{ax-conversation-composer-action-choice-dialog{display:block}ax-conversation-composer-action-choice-dialog .composer-action-choice{display:flex;min-width:calc(var(--spacing, .25rem) * 64);flex-direction:column;gap:calc(var(--spacing, .25rem) * 3);padding:calc(var(--spacing, .25rem) * 2)}ax-conversation-composer-action-choice-dialog .composer-action-choice__hint{margin:calc(var(--spacing, .25rem) * 0);font-size:.8125rem;--tw-leading: var(--leading-snug, 1.375);line-height:var(--leading-snug, 1.375);color:rgba(var(--ax-sys-color-on-surface),.7)}ax-conversation-composer-action-choice-dialog .composer-action-choice__list{margin:calc(var(--spacing, .25rem) * 0);display:flex;list-style-type:none;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);padding:calc(var(--spacing, .25rem) * 0)}ax-conversation-composer-action-choice-dialog .composer-action-choice__option{display:flex;width:100%;cursor:pointer;-webkit-appearance:none;appearance:none;align-items:center;gap:calc(var(--spacing, .25rem) * 3);border-radius:var(--ax-sys-border-radius);border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-light-surface));background-color:rgba(var(--ax-sys-color-surface));padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2.5);text-align:start;box-shadow:none;background-image:none;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}ax-conversation-composer-action-choice-dialog .composer-action-choice__option:hover,ax-conversation-composer-action-choice-dialog .composer-action-choice__option:focus-visible{border-color:rgba(var(--ax-sys-color-primary-surface));--tw-outline-style: none;outline-style:none;background:rgba(var(--ax-sys-color-primary-500),.06);box-shadow:0 0 0 1px rgba(var(--ax-sys-color-primary-500),.25)}ax-conversation-composer-action-choice-dialog .composer-action-choice__icon{display:flex;height:calc(var(--spacing, .25rem) * 10);width:calc(var(--spacing, .25rem) * 10);flex-shrink:0;align-items:center;justify-content:center;border-radius:var(--ax-sys-border-radius);font-size:var(--text-lg, 1.125rem);line-height:var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)));color:rgba(var(--ax-sys-color-primary-600));background:rgba(var(--ax-sys-color-primary-500),.1)}ax-conversation-composer-action-choice-dialog .composer-action-choice__text{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;flex-direction:column;gap:calc(var(--spacing, .25rem) * .5)}ax-conversation-composer-action-choice-dialog .composer-action-choice__title{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);color:rgba(var(--ax-sys-color-on-surface))}ax-conversation-composer-action-choice-dialog .composer-action-choice__subtitle{overflow:hidden;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));text-overflow:ellipsis;white-space:nowrap;color:rgba(var(--ax-sys-color-on-surface),.6)}ax-conversation-composer-action-choice-dialog .composer-action-choice__chevron{flex-shrink:0;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));color:rgba(var(--ax-sys-color-on-surface),.45)}ax-conversation-composer-action-choice-dialog .composer-action-choice__chevron:dir(rtl){transform:scaleX(-1)}}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading: initial;--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], encapsulation: i0.ViewEncapsulation.None }); }
43
+ }
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXConversationComposerActionChoiceDialogComponent, decorators: [{
45
+ type: Component,
46
+ args: [{ selector: 'ax-conversation-composer-action-choice-dialog', encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosableComponent, useExisting: AXConversationComposerActionChoiceDialogComponent }], template: "<div class=\"composer-action-choice\" role=\"dialog\" aria-modal=\"true\">\n <p class=\"composer-action-choice__hint\">{{ hintText() }}</p>\n <ul class=\"composer-action-choice__list\" role=\"listbox\">\n @for (action of actions(); track action.id) {\n <li role=\"none\">\n <button\n type=\"button\"\n class=\"composer-action-choice__option\"\n role=\"option\"\n [attr.aria-label]=\"getActionLabel(action)\"\n (click)=\"choose(action)\"\n >\n <span class=\"composer-action-choice__icon\" aria-hidden=\"true\">\n <i [class]=\"action.icon\"></i>\n </span>\n <span class=\"composer-action-choice__text\">\n <span class=\"composer-action-choice__title\">{{ getActionLabel(action) }}</span>\n @if (getActionTooltip(action); as tip) {\n <span class=\"composer-action-choice__subtitle\">{{ tip }}</span>\n }\n </span>\n <i class=\"fa-light fa-chevron-right composer-action-choice__chevron\" aria-hidden=\"true\"></i>\n </button>\n </li>\n }\n </ul>\n</div>\n", styles: ["@layer properties;@layer components{ax-conversation-composer-action-choice-dialog{display:block}ax-conversation-composer-action-choice-dialog .composer-action-choice{display:flex;min-width:calc(var(--spacing, .25rem) * 64);flex-direction:column;gap:calc(var(--spacing, .25rem) * 3);padding:calc(var(--spacing, .25rem) * 2)}ax-conversation-composer-action-choice-dialog .composer-action-choice__hint{margin:calc(var(--spacing, .25rem) * 0);font-size:.8125rem;--tw-leading: var(--leading-snug, 1.375);line-height:var(--leading-snug, 1.375);color:rgba(var(--ax-sys-color-on-surface),.7)}ax-conversation-composer-action-choice-dialog .composer-action-choice__list{margin:calc(var(--spacing, .25rem) * 0);display:flex;list-style-type:none;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);padding:calc(var(--spacing, .25rem) * 0)}ax-conversation-composer-action-choice-dialog .composer-action-choice__option{display:flex;width:100%;cursor:pointer;-webkit-appearance:none;appearance:none;align-items:center;gap:calc(var(--spacing, .25rem) * 3);border-radius:var(--ax-sys-border-radius);border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-light-surface));background-color:rgba(var(--ax-sys-color-surface));padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2.5);text-align:start;box-shadow:none;background-image:none;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}ax-conversation-composer-action-choice-dialog .composer-action-choice__option:hover,ax-conversation-composer-action-choice-dialog .composer-action-choice__option:focus-visible{border-color:rgba(var(--ax-sys-color-primary-surface));--tw-outline-style: none;outline-style:none;background:rgba(var(--ax-sys-color-primary-500),.06);box-shadow:0 0 0 1px rgba(var(--ax-sys-color-primary-500),.25)}ax-conversation-composer-action-choice-dialog .composer-action-choice__icon{display:flex;height:calc(var(--spacing, .25rem) * 10);width:calc(var(--spacing, .25rem) * 10);flex-shrink:0;align-items:center;justify-content:center;border-radius:var(--ax-sys-border-radius);font-size:var(--text-lg, 1.125rem);line-height:var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)));color:rgba(var(--ax-sys-color-primary-600));background:rgba(var(--ax-sys-color-primary-500),.1)}ax-conversation-composer-action-choice-dialog .composer-action-choice__text{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;flex-direction:column;gap:calc(var(--spacing, .25rem) * .5)}ax-conversation-composer-action-choice-dialog .composer-action-choice__title{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);color:rgba(var(--ax-sys-color-on-surface))}ax-conversation-composer-action-choice-dialog .composer-action-choice__subtitle{overflow:hidden;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));text-overflow:ellipsis;white-space:nowrap;color:rgba(var(--ax-sys-color-on-surface),.6)}ax-conversation-composer-action-choice-dialog .composer-action-choice__chevron{flex-shrink:0;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));color:rgba(var(--ax-sys-color-on-surface),.45)}ax-conversation-composer-action-choice-dialog .composer-action-choice__chevron:dir(rtl){transform:scaleX(-1)}}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading: initial;--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
47
+ }], propDecorators: { actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: true }] }], fileCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileCount", required: false }] }], composerActionRegistry: [{ type: i0.Input, args: [{ isSignal: true, alias: "composerActionRegistry", required: true }] }], __popup__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__popup__", required: false }] }] } });
48
+
49
+ export { AXConversationComposerActionChoiceDialogComponent };
50
+ //# sourceMappingURL=acorex-components-conversation-composer-action-choice-dialog.component-F5fLD_SK.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-components-conversation-composer-action-choice-dialog.component-F5fLD_SK.mjs","sources":["../../../../packages/components/conversation/src/lib/components/message-list/composer-action-choice-dialog.component.ts","../../../../packages/components/conversation/src/lib/components/message-list/composer-action-choice-dialog.component.html"],"sourcesContent":["import { AXClosableComponent, AXComponentCloseEvent } from '@acorex/cdk/common';\nimport type { AXPopupRef } from '@acorex/components/popup';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { Component, EventEmitter, ViewEncapsulation, computed, inject, input } from '@angular/core';\nimport type {\n AXConversationComposerAction,\n AXConversationComposerActionRegistry,\n} from '../../registries/composer-action.registry';\n\n@Component({\n selector: 'ax-conversation-composer-action-choice-dialog',\n\n encapsulation: ViewEncapsulation.None,\n templateUrl: './composer-action-choice-dialog.component.html',\n styleUrl: './composer-action-choice-dialog.component.css',\n providers: [{ provide: AXClosableComponent, useExisting: AXConversationComposerActionChoiceDialogComponent }],\n})\nexport class AXConversationComposerActionChoiceDialogComponent {\n private readonly translation = inject(AXTranslationService);\n\n readonly actions = input.required<AXConversationComposerAction[]>();\n readonly fileCount = input(1);\n readonly composerActionRegistry = input.required<AXConversationComposerActionRegistry>();\n readonly __popup__ = input<AXPopupRef | undefined>();\n\n readonly hintText = computed(() => {\n const count = this.fileCount();\n if (count === 1) {\n return this.translation.translateSync('@acorex:chat.dialog.choose-send-option.hint-single');\n }\n return this.translation.translateSync('@acorex:chat.dialog.choose-send-option.hint-multiple', {\n params: { count },\n });\n });\n\n readonly onClosed = new EventEmitter<AXComponentCloseEvent>();\n\n getActionLabel(action: AXConversationComposerAction): string {\n return this.composerActionRegistry().getActionLabel(action);\n }\n\n getActionTooltip(action: AXConversationComposerAction): string | undefined {\n return this.composerActionRegistry().getActionTooltip(action);\n }\n\n choose(action: AXConversationComposerAction): void {\n const event = new AXComponentCloseEvent();\n event.component = this;\n event.data = action;\n this.onClosed.emit(event);\n }\n}\n","<div class=\"composer-action-choice\" role=\"dialog\" aria-modal=\"true\">\n <p class=\"composer-action-choice__hint\">{{ hintText() }}</p>\n <ul class=\"composer-action-choice__list\" role=\"listbox\">\n @for (action of actions(); track action.id) {\n <li role=\"none\">\n <button\n type=\"button\"\n class=\"composer-action-choice__option\"\n role=\"option\"\n [attr.aria-label]=\"getActionLabel(action)\"\n (click)=\"choose(action)\"\n >\n <span class=\"composer-action-choice__icon\" aria-hidden=\"true\">\n <i [class]=\"action.icon\"></i>\n </span>\n <span class=\"composer-action-choice__text\">\n <span class=\"composer-action-choice__title\">{{ getActionLabel(action) }}</span>\n @if (getActionTooltip(action); as tip) {\n <span class=\"composer-action-choice__subtitle\">{{ tip }}</span>\n }\n </span>\n <i class=\"fa-light fa-chevron-right composer-action-choice__chevron\" aria-hidden=\"true\"></i>\n </button>\n </li>\n }\n </ul>\n</div>\n"],"names":[],"mappings":";;;;;MAiBa,iDAAiD,CAAA;AAR9D,IAAA,WAAA,GAAA;AASmB,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,oBAAoB,CAAC;QAElD,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ;oFAAkC;QAC1D,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,CAAC;sFAAC;QACpB,IAAA,CAAA,sBAAsB,GAAG,KAAK,CAAC,QAAQ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ex/cdk/common';
2
+ import { AXButtonComponent } from '@acorex/components/button';
3
+ import * as i1 from '@acorex/components/decorators';
4
+ import { AXDecoratorModule } from '@acorex/components/decorators';
5
+ import { AXImageEditorContainerComponent, AXImageEditorHistoryComponent, AXImageEditorToolSelectorComponent, AXImageEditorViewComponent } from '@acorex/components/image-editor';
6
+ import * as i2 from '@acorex/components/toolbar';
7
+ import { AXToolBarModule } from '@acorex/components/toolbar';
8
+ import * as i3 from '@acorex/core/translation';
9
+ import { AXTranslationModule } from '@acorex/core/translation';
10
+ import { AsyncPipe } from '@angular/common';
11
+ import * as i0 from '@angular/core';
12
+ import { input, viewChild, signal, EventEmitter, ViewEncapsulation, Component } from '@angular/core';
13
+
14
+ function editedImageFile(blob, originalName) {
15
+ const base = originalName.replace(/\.[^.]+$/, '') || 'image';
16
+ const ext = blob.type === 'image/png' ? 'png' : blob.type === 'image/webp' ? 'webp' : 'jpg';
17
+ return new File([blob], `${base}.${ext}`, {
18
+ type: blob.type || 'image/jpeg',
19
+ lastModified: Date.now(),
20
+ });
21
+ }
22
+ class AXConversationImagePickerEditorDialogComponent {
23
+ constructor() {
24
+ this.src = input.required(/* @ts-ignore */
25
+ ...(ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []));
26
+ this.fileName = input('image.jpg', /* @ts-ignore */
27
+ ...(ngDevMode ? [{ debugName: "fileName" }] : /* istanbul ignore next */ []));
28
+ this.aspectRatio = input(['1:1', '16:9', '4:3', '9:16'], /* @ts-ignore */
29
+ ...(ngDevMode ? [{ debugName: "aspectRatio" }] : /* istanbul ignore next */ []));
30
+ this.editor = viewChild(AXImageEditorContainerComponent, /* @ts-ignore */
31
+ ...(ngDevMode ? [{ debugName: "editor" }] : /* istanbul ignore next */ []));
32
+ this.saving = signal(false, /* @ts-ignore */
33
+ ...(ngDevMode ? [{ debugName: "saving" }] : /* istanbul ignore next */ []));
34
+ this.onClosed = new EventEmitter();
35
+ }
36
+ async save() {
37
+ if (this.saving()) {
38
+ return;
39
+ }
40
+ const editor = this.editor();
41
+ if (!editor) {
42
+ return;
43
+ }
44
+ this.saving.set(true);
45
+ try {
46
+ const blobs = await editor.commitChanges();
47
+ const blob = blobs[0];
48
+ if (!blob) {
49
+ return;
50
+ }
51
+ const event = new AXComponentCloseEvent();
52
+ event.component = this;
53
+ event.data = editedImageFile(blob, this.fileName());
54
+ this.onClosed.emit(event);
55
+ }
56
+ catch {
57
+ // Keep the dialog open so the user can retry or cancel.
58
+ }
59
+ finally {
60
+ this.saving.set(false);
61
+ }
62
+ }
63
+ cancel() {
64
+ const event = new AXComponentCloseEvent();
65
+ event.component = this;
66
+ this.onClosed.emit(event);
67
+ }
68
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXConversationImagePickerEditorDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
69
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: AXConversationImagePickerEditorDialogComponent, isStandalone: true, selector: "ax-conversation-image-picker-editor-dialog", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: true, transformFunction: null }, fileName: { classPropertyName: "fileName", publicName: "fileName", isSignal: true, isRequired: false, transformFunction: null }, aspectRatio: { classPropertyName: "aspectRatio", publicName: "aspectRatio", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXClosableComponent, useExisting: AXConversationImagePickerEditorDialogComponent }], viewQueries: [{ propertyName: "editor", first: true, predicate: AXImageEditorContainerComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ax-conversation-image-editor-dialog__body\">\n <ax-image-editor-container>\n <ax-header>\n <ax-toolbar>\n <ax-prefix>\n <ax-image-editor-history></ax-image-editor-history>\n </ax-prefix>\n </ax-toolbar>\n </ax-header>\n\n <ax-image-editor-view [src]=\"src()\" [showGrid]=\"true\"></ax-image-editor-view>\n\n <ax-footer>\n <ax-image-editor-tool-selector [aspectRatio]=\"aspectRatio()\"></ax-image-editor-tool-selector>\n </ax-footer>\n </ax-image-editor-container>\n</div>\n\n<ax-footer>\n <ax-suffix>\n <ax-button\n [text]=\"'@acorex:chat.actions.cancel' | translate | async\"\n look=\"solid\"\n [disabled]=\"saving()\"\n (onClick)=\"cancel()\"\n />\n <ax-button\n [text]=\"'@acorex:chat.actions.save' | translate | async\"\n look=\"solid\"\n color=\"primary\"\n [disabled]=\"saving()\"\n (onClick)=\"save()\"\n />\n </ax-suffix>\n</ax-footer>\n", styles: ["@layer components{.ax-popup-overlay.ax-conversation-composer-picker-popup .ax-popup{max-height:min(36rem,92dvh);width:min(22.5rem,94vw);border-radius:.75rem;overflow:hidden;box-shadow:0 .25rem 1.5rem #0000002e}.ax-popup-overlay.ax-conversation-composer-picker-popup .ax-popup-main-container{min-height:calc(var(--spacing, .25rem) * 0);flex:1;overflow:hidden}.ax-popup-overlay.ax-conversation-composer-picker-popup .ax-popup-body-container{display:flex;min-height:calc(var(--spacing, .25rem) * 0);flex:1;flex-direction:column;overflow:hidden;padding:calc(var(--spacing, .25rem) * 0)}.ax-popup-overlay.ax-conversation-composer-picker-popup .ax-popup-body-container>ng-component{display:flex;height:100%;min-height:calc(var(--spacing, .25rem) * 0);width:100%;flex:1;flex-direction:column;overflow:hidden}@media(max-width:480px){.ax-popup-overlay.ax-conversation-composer-picker-popup .ax-popup{max-height:min(92dvh,92dvh);width:100vw;border-radius:1.25rem 1.25rem 0 0}}.ax-popup-overlay.ax-conversation-composer-picker-popup--voice .ax-popup{max-height:none;width:min(26rem,94vw);border-radius:1.25rem}.ax-popup-overlay.ax-conversation-composer-picker-popup--voice .ax-popup-main-container,.ax-popup-overlay.ax-conversation-composer-picker-popup--voice .ax-popup-body-container,.ax-popup-overlay.ax-conversation-composer-picker-popup--voice .ax-popup-body-container>ng-component{display:flex;height:auto;min-height:calc(var(--spacing, .25rem) * 0);flex-direction:column;overflow:visible;flex:0 0 auto}@media(max-width:480px){.ax-popup-overlay.ax-conversation-composer-picker-popup--voice .ax-popup{width:100vw;border-radius:1.25rem 1.25rem 0 0}}.ax-popup-overlay.ax-conversation-composer-picker-popup--location .ax-popup{max-height:min(40rem,92dvh);width:min(32rem,94vw)}@media(max-width:480px){.ax-popup-overlay.ax-conversation-composer-picker-popup--location .ax-popup{max-height:min(92dvh,92dvh)}}.ax-popup-overlay.ax-conversation-image-editor-popup .ax-popup{max-height:min(48rem,94dvh);width:min(48rem,96vw);overflow:hidden}.ax-popup-overlay.ax-conversation-image-editor-popup .ax-popup-main-container,.ax-popup-overlay.ax-conversation-image-editor-popup .ax-popup-body-container{min-height:calc(var(--spacing, .25rem) * 0);flex:1;overflow:hidden}.ax-popup-overlay.ax-conversation-image-editor-popup .ax-popup-body-container{display:flex;flex-direction:column;padding:calc(var(--spacing, .25rem) * 0)}.ax-popup-overlay.ax-conversation-image-editor-popup .ax-popup-body-container>ng-component{display:flex;height:100%;min-height:calc(var(--spacing, .25rem) * 0);width:100%;flex:1;flex-direction:column;overflow:hidden}@media(max-width:480px){.ax-popup-overlay.ax-conversation-image-editor-popup .ax-popup{max-height:min(94dvh,94dvh);width:100vw}}}@layer components{ax-conversation-image-picker-editor-dialog{display:flex;height:100%;min-height:calc(var(--spacing, .25rem) * 0);width:100%;flex:1;flex-direction:column;overflow:hidden}ax-conversation-image-picker-editor-dialog .ax-conversation-image-editor-dialog__body{min-height:calc(var(--spacing, .25rem) * 0);flex:1;overflow:auto;padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 3)}ax-conversation-image-picker-editor-dialog ax-image-editor-container{width:100%;max-width:100%}ax-conversation-image-picker-editor-dialog ax-image-editor-view{min-height:calc(var(--spacing, .25rem) * 64)}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXImageEditorContainerComponent, selector: "ax-image-editor-container", inputs: ["look", "disabled"], outputs: ["onValueChanged"] }, { kind: "component", type: AXImageEditorHistoryComponent, selector: "ax-image-editor-history" }, { kind: "component", type: AXImageEditorToolSelectorComponent, selector: "ax-image-editor-tool-selector", inputs: ["aspectRatio"] }, { kind: "component", type: AXImageEditorViewComponent, selector: "ax-image-editor-view", inputs: ["showGrid", "cropperSize", "src"] }, { kind: "ngmodule", type: AXToolBarModule }, { kind: "component", type: i2.AXToolBarComponent, selector: "ax-toolbar" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
70
+ }
71
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXConversationImagePickerEditorDialogComponent, decorators: [{
72
+ type: Component,
73
+ args: [{ selector: 'ax-conversation-image-picker-editor-dialog', encapsulation: ViewEncapsulation.None, imports: [
74
+ AsyncPipe,
75
+ AXButtonComponent,
76
+ AXDecoratorModule,
77
+ AXImageEditorContainerComponent,
78
+ AXImageEditorHistoryComponent,
79
+ AXImageEditorToolSelectorComponent,
80
+ AXImageEditorViewComponent,
81
+ AXToolBarModule,
82
+ AXTranslationModule,
83
+ ], providers: [{ provide: AXClosableComponent, useExisting: AXConversationImagePickerEditorDialogComponent }], template: "<div class=\"ax-conversation-image-editor-dialog__body\">\n <ax-image-editor-container>\n <ax-header>\n <ax-toolbar>\n <ax-prefix>\n <ax-image-editor-history></ax-image-editor-history>\n </ax-prefix>\n </ax-toolbar>\n </ax-header>\n\n <ax-image-editor-view [src]=\"src()\" [showGrid]=\"true\"></ax-image-editor-view>\n\n <ax-footer>\n <ax-image-editor-tool-selector [aspectRatio]=\"aspectRatio()\"></ax-image-editor-tool-selector>\n </ax-footer>\n </ax-image-editor-container>\n</div>\n\n<ax-footer>\n <ax-suffix>\n <ax-button\n [text]=\"'@acorex:chat.actions.cancel' | translate | async\"\n look=\"solid\"\n [disabled]=\"saving()\"\n (onClick)=\"cancel()\"\n />\n <ax-button\n [text]=\"'@acorex:chat.actions.save' | translate | async\"\n look=\"solid\"\n color=\"primary\"\n [disabled]=\"saving()\"\n (onClick)=\"save()\"\n />\n </ax-suffix>\n</ax-footer>\n", styles: ["@layer components{.ax-popup-overlay.ax-conversation-composer-picker-popup .ax-popup{max-height:min(36rem,92dvh);width:min(22.5rem,94vw);border-radius:.75rem;overflow:hidden;box-shadow:0 .25rem 1.5rem #0000002e}.ax-popup-overlay.ax-conversation-composer-picker-popup .ax-popup-main-container{min-height:calc(var(--spacing, .25rem) * 0);flex:1;overflow:hidden}.ax-popup-overlay.ax-conversation-composer-picker-popup .ax-popup-body-container{display:flex;min-height:calc(var(--spacing, .25rem) * 0);flex:1;flex-direction:column;overflow:hidden;padding:calc(var(--spacing, .25rem) * 0)}.ax-popup-overlay.ax-conversation-composer-picker-popup .ax-popup-body-container>ng-component{display:flex;height:100%;min-height:calc(var(--spacing, .25rem) * 0);width:100%;flex:1;flex-direction:column;overflow:hidden}@media(max-width:480px){.ax-popup-overlay.ax-conversation-composer-picker-popup .ax-popup{max-height:min(92dvh,92dvh);width:100vw;border-radius:1.25rem 1.25rem 0 0}}.ax-popup-overlay.ax-conversation-composer-picker-popup--voice .ax-popup{max-height:none;width:min(26rem,94vw);border-radius:1.25rem}.ax-popup-overlay.ax-conversation-composer-picker-popup--voice .ax-popup-main-container,.ax-popup-overlay.ax-conversation-composer-picker-popup--voice .ax-popup-body-container,.ax-popup-overlay.ax-conversation-composer-picker-popup--voice .ax-popup-body-container>ng-component{display:flex;height:auto;min-height:calc(var(--spacing, .25rem) * 0);flex-direction:column;overflow:visible;flex:0 0 auto}@media(max-width:480px){.ax-popup-overlay.ax-conversation-composer-picker-popup--voice .ax-popup{width:100vw;border-radius:1.25rem 1.25rem 0 0}}.ax-popup-overlay.ax-conversation-composer-picker-popup--location .ax-popup{max-height:min(40rem,92dvh);width:min(32rem,94vw)}@media(max-width:480px){.ax-popup-overlay.ax-conversation-composer-picker-popup--location .ax-popup{max-height:min(92dvh,92dvh)}}.ax-popup-overlay.ax-conversation-image-editor-popup .ax-popup{max-height:min(48rem,94dvh);width:min(48rem,96vw);overflow:hidden}.ax-popup-overlay.ax-conversation-image-editor-popup .ax-popup-main-container,.ax-popup-overlay.ax-conversation-image-editor-popup .ax-popup-body-container{min-height:calc(var(--spacing, .25rem) * 0);flex:1;overflow:hidden}.ax-popup-overlay.ax-conversation-image-editor-popup .ax-popup-body-container{display:flex;flex-direction:column;padding:calc(var(--spacing, .25rem) * 0)}.ax-popup-overlay.ax-conversation-image-editor-popup .ax-popup-body-container>ng-component{display:flex;height:100%;min-height:calc(var(--spacing, .25rem) * 0);width:100%;flex:1;flex-direction:column;overflow:hidden}@media(max-width:480px){.ax-popup-overlay.ax-conversation-image-editor-popup .ax-popup{max-height:min(94dvh,94dvh);width:100vw}}}@layer components{ax-conversation-image-picker-editor-dialog{display:flex;height:100%;min-height:calc(var(--spacing, .25rem) * 0);width:100%;flex:1;flex-direction:column;overflow:hidden}ax-conversation-image-picker-editor-dialog .ax-conversation-image-editor-dialog__body{min-height:calc(var(--spacing, .25rem) * 0);flex:1;overflow:auto;padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 3)}ax-conversation-image-picker-editor-dialog ax-image-editor-container{width:100%;max-width:100%}ax-conversation-image-picker-editor-dialog ax-image-editor-view{min-height:calc(var(--spacing, .25rem) * 64)}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
84
+ }], propDecorators: { src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: true }] }], fileName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileName", required: false }] }], aspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "aspectRatio", required: false }] }], editor: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXImageEditorContainerComponent), { isSignal: true }] }] } });
85
+
86
+ export { AXConversationImagePickerEditorDialogComponent };
87
+ //# sourceMappingURL=acorex-components-conversation-image-picker-editor-dialog.component-Bk3ixvt2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-components-conversation-image-picker-editor-dialog.component-Bk3ixvt2.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/composer/components/image-picker/image-picker-editor-dialog.component.ts","../../../../packages/components/conversation/src/lib/plugins/composer/components/image-picker/image-picker-editor-dialog.component.html"],"sourcesContent":["import { AXClosableComponent, AXComponentCloseEvent } from '@acorex/cdk/common';\nimport { AXButtonComponent } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport {\n AXImageEditorContainerComponent,\n AXImageEditorHistoryComponent,\n AXImageEditorToolSelectorComponent,\n AXImageEditorViewComponent,\n} from '@acorex/components/image-editor';\nimport { AXToolBarModule } from '@acorex/components/toolbar';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport { Component, EventEmitter, input, signal, viewChild, ViewEncapsulation } from '@angular/core';\n\nfunction editedImageFile(blob: Blob, originalName: string): File {\n const base = originalName.replace(/\\.[^.]+$/, '') || 'image';\n const ext = blob.type === 'image/png' ? 'png' : blob.type === 'image/webp' ? 'webp' : 'jpg';\n return new File([blob], `${base}.${ext}`, {\n type: blob.type || 'image/jpeg',\n lastModified: Date.now(),\n });\n}\n\n@Component({\n selector: 'ax-conversation-image-picker-editor-dialog',\n\n encapsulation: ViewEncapsulation.None,\n imports: [\n AsyncPipe,\n AXButtonComponent,\n AXDecoratorModule,\n AXImageEditorContainerComponent,\n AXImageEditorHistoryComponent,\n AXImageEditorToolSelectorComponent,\n AXImageEditorViewComponent,\n AXToolBarModule,\n AXTranslationModule,\n ],\n providers: [{ provide: AXClosableComponent, useExisting: AXConversationImagePickerEditorDialogComponent }],\n templateUrl: './image-picker-editor-dialog.component.html',\n styleUrl: './image-picker-editor-dialog.component.css',\n})\nexport class AXConversationImagePickerEditorDialogComponent {\n readonly src = input.required<string>();\n readonly fileName = input('image.jpg');\n readonly aspectRatio = input<string[]>(['1:1', '16:9', '4:3', '9:16']);\n\n private readonly editor = viewChild(AXImageEditorContainerComponent);\n protected readonly saving = signal(false);\n\n readonly onClosed = new EventEmitter<AXComponentCloseEvent>();\n\n async save(): Promise<void> {\n if (this.saving()) {\n return;\n }\n\n const editor = this.editor();\n if (!editor) {\n return;\n }\n\n this.saving.set(true);\n try {\n const blobs = await editor.commitChanges();\n const blob = blobs[0];\n if (!blob) {\n return;\n }\n\n const event = new AXComponentCloseEvent();\n event.component = this;\n event.data = editedImageFile(blob, this.fileName());\n this.onClosed.emit(event);\n } catch {\n // Keep the dialog open so the user can retry or cancel.\n } finally {\n this.saving.set(false);\n }\n }\n\n cancel(): void {\n const event = new AXComponentCloseEvent();\n event.component = this;\n this.onClosed.emit(event);\n }\n}\n","<div class=\"ax-conversation-image-editor-dialog__body\">\n <ax-image-editor-container>\n <ax-header>\n <ax-toolbar>\n <ax-prefix>\n <ax-image-editor-history></ax-image-editor-history>\n </ax-prefix>\n </ax-toolbar>\n </ax-header>\n\n <ax-image-editor-view [src]=\"src()\" [showGrid]=\"true\"></ax-image-editor-view>\n\n <ax-footer>\n <ax-image-editor-tool-selector [aspectRatio]=\"aspectRatio()\"></ax-image-editor-tool-selector>\n </ax-footer>\n </ax-image-editor-container>\n</div>\n\n<ax-footer>\n <ax-suffix>\n <ax-button\n [text]=\"'@acorex:chat.actions.cancel' | translate | async\"\n look=\"solid\"\n [disabled]=\"saving()\"\n (onClick)=\"cancel()\"\n />\n <ax-button\n [text]=\"'@acorex:chat.actions.save' | translate | async\"\n look=\"solid\"\n color=\"primary\"\n [disabled]=\"saving()\"\n (onClick)=\"save()\"\n />\n </ax-suffix>\n</ax-footer>\n"],"names":[],"mappings":";;;;;;;;;;;;;AAcA,SAAS,eAAe,CAAC,IAAU,EAAE,YAAoB,EAAA;AACvD,IAAA,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,OAAO;IAC5D,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,KAAK,WAAW,GAAG,KAAK,GAAG,IAAI,CAAC,IAAI,KAAK,YAAY,GAAG,MAAM,GAAG,KAAK;AAC3F,IAAA,OAAO,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAA,EAAG,IAAI,CAAA,CAAA,EAAI,GAAG,CAAA,CAAE,EAAE;AACxC,QAAA,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,YAAY;AAC/B,QAAA,YAAY,EAAE,IAAI,CAAC,GAAG,EAAE;AACzB,KAAA,CAAC;AACJ;MAqBa,8CAA8C,CAAA;AAnB3D,IAAA,WAAA,GAAA;QAoBW,IAAA,CAAA,GAAG,GAAG,KAAK,CAAC,QAAQ;gFAAU;QAC9B,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,WAAW;qFAAC;QAC7B,IAAA,CAAA,WAAW,GAAG,KAAK,CAAW,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC;wFAAC;QAErD,IAAA,CAAA,MAAM,GAAG,SAAS,CAAC,+BAA+B;mFAAC;QACjD,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,KAAK;mFAAC;AAEhC,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,YAAY,EAAyB;AAoC9D,IAAA;AAlCC,IAAA,MAAM,IAAI,GAAA;AACR,QAAA,IAAI,IAAI,CAAC,MAAM,EAAE,E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mB,EAAE,WAAW,EAAA,8CAAgD,EAAE,CAAC,EAAA,QAAA,EAAA,88BAAA,EAAA,MAAA,EAAA,CAAA,i4GAAA,CAAA,EAAA;mXAStE,+BAA+B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
@@ -0,0 +1,65 @@
1
+ import { AXComponentCloseEvent, AXClosableComponent } from '@acorex/cdk/common';
2
+ import { AXButtonComponent } from '@acorex/components/button';
3
+ import { AXDecoratorGenericComponent } from '@acorex/components/decorators';
4
+ import * as i2 from '@acorex/components/text-box';
5
+ import { AXTextBoxModule } from '@acorex/components/text-box';
6
+ import * as i3 from '@acorex/core/translation';
7
+ import { AXTranslationModule } from '@acorex/core/translation';
8
+ import { AsyncPipe } from '@angular/common';
9
+ import * as i0 from '@angular/core';
10
+ import { input, model, EventEmitter, effect, ViewEncapsulation, Component } from '@angular/core';
11
+ import { FormsModule } from '@angular/forms';
12
+ import { i as isValidPickerFileName } from './acorex-components-conversation-acorex-components-conversation-BBWe3tfe.mjs';
13
+
14
+ class AXConversationPickerRenameFileDialogComponent {
15
+ constructor() {
16
+ this.initialName = input.required(/* @ts-ignore */
17
+ ...(ngDevMode ? [{ debugName: "initialName" }] : /* istanbul ignore next */ []));
18
+ this.fileName = model('', /* @ts-ignore */
19
+ ...(ngDevMode ? [{ debugName: "fileName" }] : /* istanbul ignore next */ []));
20
+ this.onClosed = new EventEmitter();
21
+ effect(() => {
22
+ this.fileName.set(this.initialName());
23
+ });
24
+ }
25
+ canSave() {
26
+ const next = this.fileName().trim();
27
+ return isValidPickerFileName(next) && next !== this.initialName().trim();
28
+ }
29
+ save() {
30
+ if (!this.canSave()) {
31
+ return;
32
+ }
33
+ const event = new AXComponentCloseEvent();
34
+ event.component = this;
35
+ event.data = this.fileName().trim();
36
+ this.onClosed.emit(event);
37
+ }
38
+ cancel() {
39
+ const event = new AXComponentCloseEvent();
40
+ event.component = this;
41
+ this.onClosed.emit(event);
42
+ }
43
+ onKeyDown(event) {
44
+ if (event?.nativeEvent?.key === 'Enter') {
45
+ event.nativeEvent.preventDefault();
46
+ this.save();
47
+ }
48
+ }
49
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXConversationPickerRenameFileDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
50
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: AXConversationPickerRenameFileDialogComponent, isStandalone: true, selector: "ax-conversation-picker-rename-file-dialog", inputs: { initialName: { classPropertyName: "initialName", publicName: "initialName", isSignal: true, isRequired: true, transformFunction: null }, fileName: { classPropertyName: "fileName", publicName: "fileName", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fileName: "fileNameChange" }, providers: [{ provide: AXClosableComponent, useExisting: AXConversationPickerRenameFileDialogComponent }], ngImport: i0, template: "<div class=\"ax-conversation-picker-rename-dialog\">\n <div class=\"dialog-content\">\n <ax-text-box\n [(value)]=\"fileName\"\n [look]=\"'outline'\"\n [placeholder]=\"'@acorex:chat.pickers.files.rename-placeholder' | translate | async\"\n (onKeyDown)=\"onKeyDown($event)\"\n />\n </div>\n\n <ax-footer class=\"dialog-footer\">\n <ax-suffix>\n <ax-button\n [text]=\"'@acorex:chat.actions.cancel' | translate | async\"\n [look]=\"'solid'\"\n (onClick)=\"cancel()\"\n />\n <ax-button\n [text]=\"'@acorex:chat.actions.save' | translate | async\"\n [look]=\"'solid'\"\n [color]=\"'primary'\"\n [disabled]=\"!canSave()\"\n (onClick)=\"save()\"\n />\n </ax-suffix>\n </ax-footer>\n</div>\n", styles: ["@layer components{ax-conversation-picker-rename-file-dialog{display:block}ax-conversation-picker-rename-file-dialog .ax-conversation-picker-rename-dialog{display:flex;width:100%;flex-direction:column;overflow:hidden}ax-conversation-picker-rename-file-dialog .dialog-content{padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 4)}ax-conversation-picker-rename-file-dialog .dialog-footer{flex-shrink:0}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i2.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "maskPattern", "customTokens", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onMaskChanged"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
51
+ }
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXConversationPickerRenameFileDialogComponent, decorators: [{
53
+ type: Component,
54
+ args: [{ selector: 'ax-conversation-picker-rename-file-dialog', encapsulation: ViewEncapsulation.None, imports: [
55
+ AsyncPipe,
56
+ FormsModule,
57
+ AXButtonComponent,
58
+ AXDecoratorGenericComponent,
59
+ AXTextBoxModule,
60
+ AXTranslationModule,
61
+ ], providers: [{ provide: AXClosableComponent, useExisting: AXConversationPickerRenameFileDialogComponent }], template: "<div class=\"ax-conversation-picker-rename-dialog\">\n <div class=\"dialog-content\">\n <ax-text-box\n [(value)]=\"fileName\"\n [look]=\"'outline'\"\n [placeholder]=\"'@acorex:chat.pickers.files.rename-placeholder' | translate | async\"\n (onKeyDown)=\"onKeyDown($event)\"\n />\n </div>\n\n <ax-footer class=\"dialog-footer\">\n <ax-suffix>\n <ax-button\n [text]=\"'@acorex:chat.actions.cancel' | translate | async\"\n [look]=\"'solid'\"\n (onClick)=\"cancel()\"\n />\n <ax-button\n [text]=\"'@acorex:chat.actions.save' | translate | async\"\n [look]=\"'solid'\"\n [color]=\"'primary'\"\n [disabled]=\"!canSave()\"\n (onClick)=\"save()\"\n />\n </ax-suffix>\n </ax-footer>\n</div>\n", styles: ["@layer components{ax-conversation-picker-rename-file-dialog{display:block}ax-conversation-picker-rename-file-dialog .ax-conversation-picker-rename-dialog{display:flex;width:100%;flex-direction:column;overflow:hidden}ax-conversation-picker-rename-file-dialog .dialog-content{padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 4)}ax-conversation-picker-rename-file-dialog .dialog-footer{flex-shrink:0}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
62
+ }], ctorParameters: () => [], propDecorators: { initialName: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialName", required: true }] }], fileName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileName", required: false }] }, { type: i0.Output, args: ["fileNameChange"] }] } });
63
+
64
+ export { AXConversationPickerRenameFileDialogComponent };
65
+ //# sourceMappingURL=acorex-components-conversation-picker-rename-file-dialog.component-OAHRGH_G.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-components-conversation-picker-rename-file-dialog.component-OAHRGH_G.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/composer/components/shared/picker-rename-file-dialog.component.ts","../../../../packages/components/conversation/src/lib/plugins/composer/components/shared/picker-rename-file-dialog.component.html"],"sourcesContent":["import { AXClosableComponent, AXComponentCloseEvent } from '@acorex/cdk/common';\nimport { AXButtonComponent } from '@acorex/components/button';\nimport { AXDecoratorGenericComponent } from '@acorex/components/decorators';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport { Component, EventEmitter, ViewEncapsulation, effect, input, model } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { isValidPickerFileName } from './picker-file.utils';\n\n@Component({\n selector: 'ax-conversation-picker-rename-file-dialog',\n encapsulation: ViewEncapsulation.None,\n imports: [\n AsyncPipe,\n FormsModule,\n AXButtonComponent,\n AXDecoratorGenericComponent,\n AXTextBoxModule,\n AXTranslationModule,\n ],\n providers: [{ provide: AXClosableComponent, useExisting: AXConversationPickerRenameFileDialogComponent }],\n templateUrl: './picker-rename-file-dialog.component.html',\n styleUrl: './picker-rename-file-dialog.component.css',\n})\nexport class AXConversationPickerRenameFileDialogComponent {\n readonly initialName = input.required<string>();\n readonly fileName = model('');\n\n constructor() {\n effect(() => {\n this.fileName.set(this.initialName());\n });\n }\n\n canSave(): boolean {\n const next = this.fileName().trim();\n return isValidPickerFileName(next) && next !== this.initialName().trim();\n }\n\n save(): void {\n if (!this.canSave()) {\n return;\n }\n\n const event = new AXComponentCloseEvent();\n event.component = this;\n event.data = this.fileName().trim();\n this.onClosed.emit(event);\n }\n\n cancel(): void {\n const event = new AXComponentCloseEvent();\n event.component = this;\n this.onClosed.emit(event);\n }\n\n onKeyDown(event: { nativeEvent?: KeyboardEvent } | undefined): void {\n if (event?.nativeEvent?.key === 'Enter') {\n event.nativeEvent.preventDefault();\n this.save();\n }\n }\n\n readonly onClosed = new EventEmitter<AXComponentCloseEvent>();\n}\n","<div class=\"ax-conversation-picker-rename-dialog\">\n <div class=\"dialog-content\">\n <ax-text-box\n [(value)]=\"fileName\"\n [look]=\"'outline'\"\n [placeholder]=\"'@acorex:chat.pickers.files.rename-placeholder' | translate | async\"\n (onKeyDown)=\"onKeyDown($event)\"\n />\n </div>\n\n <ax-footer class=\"dialog-footer\">\n <ax-suffix>\n <ax-button\n [text]=\"'@acorex:chat.actions.cancel' | translate | async\"\n [look]=\"'solid'\"\n (onClick)=\"cancel()\"\n />\n <ax-button\n [text]=\"'@acorex:chat.actions.save' | translate | async\"\n [look]=\"'solid'\"\n [color]=\"'primary'\"\n [disabled]=\"!canSave()\"\n (onClick)=\"save()\"\n />\n </ax-suffix>\n </ax-footer>\n</div>\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;MAyBa,6CAA6C,CAAA;AAIxD,IAAA,WAAA,GAAA;QAHS,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,QAAQ;wFAAU;QACtC,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,EAAE;qFAAC;AAqCpB,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,YAAY,EAAyB;QAlC3D,MAAM,CAAC,MAAK;YACV,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;AACvC,QAAA,CAAC,CAAC;IACJ;IAEA,OAAO,GAAA;QACL,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE;AACnC,QAAA,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,IAAI,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE;IAC1E;IAEA,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE;YACnB;QACF;AAEA,QAAA,MAAM,KAAK,GAAG,IAAI,qBAAqB,EAAE;AACzC,QAAA,KAAK,CAAC,SAAS,GAAG,IAAI;QACtB,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE;AACnC,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;IAC3B;IAEA,MAAM,GAAA;AACJ,QAAA,MAAM,KAAK,GAAG,IAAI,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