@webority/ui-elements 0.171.3 → 0.172.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/dist/WuiCarousel-CFKmFVzc.js +1 -0
  2. package/dist/{WuiCodeBlock-Du-JZO3A.js → WuiCodeBlock-fBc3Uwsw.js} +1 -1
  3. package/dist/{WuiCommandPalette-BKW0e-ho.js → WuiCommandPalette-BQCy0bon.js} +2 -2
  4. package/dist/WuiCommentThread-jy4rMc9Q.js +1 -0
  5. package/dist/WuiConsentBanner-DlAE3DTf.js +1 -0
  6. package/dist/WuiContextMenu-hLeCs0qw.js +1 -0
  7. package/dist/WuiDataTable-B-JaTsrI.js +1 -0
  8. package/dist/WuiDatePicker-4tdWakGX.js +1 -0
  9. package/dist/WuiDateRange-D7LJuY2F.js +1 -0
  10. package/dist/WuiDateTime-BSJfyZ0q.js +1 -0
  11. package/dist/{WuiDock-d5abaLkL.js → WuiDock-2LGlbEFx.js} +1 -1
  12. package/dist/{WuiDrawer-BMkPnEFz.js → WuiDrawer-D-XfW1kl.js} +1 -1
  13. package/dist/{WuiDropdown-B9WeT-gH.js → WuiDropdown-5-6E5Q9d.js} +1 -1
  14. package/dist/{WuiEntryGrid-Bm5_MizA.js → WuiEntryGrid-DkW0tIDy.js} +1 -1
  15. package/dist/WuiGantt-XMvgsZsn.js +1 -0
  16. package/dist/{WuiHoverCard-D6JBAqdW.js → WuiHoverCard-DhJcIIM1.js} +1 -1
  17. package/dist/WuiImageCrop-CIAjHOGk.js +1 -0
  18. package/dist/WuiInlineEdit-C9FxCWCk.js +1 -0
  19. package/dist/WuiLeadPopup-KyguGV-q.js +345 -0
  20. package/dist/WuiLightbox-CBiqJmGE.js +1 -0
  21. package/dist/WuiMarkdown-DsN4YbiZ.js +4 -0
  22. package/dist/WuiMentionInput-CktKQjQc.js +1 -0
  23. package/dist/{WuiModal-DMGgOCBU.js → WuiModal-DQbVJGUo.js} +1 -1
  24. package/dist/WuiNavigationMenu-KdW7yuLn.js +1 -0
  25. package/dist/{WuiNotificationCenter-DgcJYPV3.js → WuiNotificationCenter-DZariS2K.js} +1 -1
  26. package/dist/WuiOrgTree-CFxoY9Vr.js +1 -0
  27. package/dist/WuiOtp-Cc0formv.js +1 -0
  28. package/dist/{WuiOverflow-MzrZwzud.js → WuiOverflow-CXYk2ubC.js} +1 -1
  29. package/dist/WuiPhone-BI438y4S.js +1 -0
  30. package/dist/{WuiPopover-BYO_H-fk.js → WuiPopover-BvWKRNQY.js} +1 -1
  31. package/dist/{WuiRating-DLVduJZ_.js → WuiRating-DIQfif9x.js} +1 -1
  32. package/dist/{WuiRecordPager-Dye7AfCS.js → WuiRecordPager-DAyoD650.js} +1 -1
  33. package/dist/{WuiRelativeTime-CujAFS_w.js → WuiRelativeTime-CPzs4tjM.js} +1 -1
  34. package/dist/WuiSavedViews-BAqHgVj2.js +1 -0
  35. package/dist/WuiSelect-htggZB0v.js +1 -0
  36. package/dist/{WuiShortcuts-Crj8lFVz.js → WuiShortcuts-DWzmRKEG.js} +1 -1
  37. package/dist/{WuiShowMore-CGhWrlmK.js → WuiShowMore-DyfGnrob.js} +1 -1
  38. package/dist/WuiSlider-LE2wquOo.js +1 -0
  39. package/dist/WuiSortable-DxwYjicc.js +1 -0
  40. package/dist/WuiTimePicker-xrPYytjq.js +1 -0
  41. package/dist/WuiTour-D-H5sMJS.js +1 -0
  42. package/dist/WuiTree-BnlK9fYL.js +1 -0
  43. package/dist/WuiTreePicker-Bx9nvRrC.js +1 -0
  44. package/dist/{WuiWhatsNew-DjnQWqlF.js → WuiWhatsNew-Dm4Yl68x.js} +1 -1
  45. package/dist/WuiWizardStep-n8Ge5GDI.js +1 -0
  46. package/dist/anchorOverlay-daGdh_91.js +1 -0
  47. package/dist/avatarNode-BaEvz5Xr.js +1 -0
  48. package/dist/{calendarMath-DIoh4HjR.js → calendarMath-rI1aBVRd.js} +1 -1
  49. package/dist/chips-DrTvHdbb.js +2 -0
  50. package/dist/{dataTable-oR_YiFJc.js → dataTable-Bz6HxUx0.js} +1 -1
  51. package/dist/dataTable.g-DazoWWps.js +1 -0
  52. package/dist/datePicker.g-sGQE8c3n.js +1 -0
  53. package/dist/dom-DMQu--xV.js +1 -0
  54. package/dist/drawerDiscard-B33Oc_Sv.js +1 -0
  55. package/dist/elements/carousel.js +1 -1
  56. package/dist/elements/code-block.js +1 -1
  57. package/dist/elements/command-palette.js +1 -1
  58. package/dist/elements/comment-thread.js +1 -1
  59. package/dist/elements/consent-banner.js +1 -1
  60. package/dist/elements/context-menu.js +1 -1
  61. package/dist/elements/data-table.js +1 -1
  62. package/dist/elements/date-range.js +1 -1
  63. package/dist/elements/date-time.js +1 -0
  64. package/dist/elements/datepicker.js +1 -1
  65. package/dist/elements/dock.js +1 -1
  66. package/dist/elements/drawer.js +1 -1
  67. package/dist/elements/dropdown.js +1 -1
  68. package/dist/elements/entry-grid.js +1 -1
  69. package/dist/elements/filter-popover.js +1 -1
  70. package/dist/elements/gantt.js +1 -1
  71. package/dist/elements/hover-card.js +1 -1
  72. package/dist/elements/image-crop.js +1 -1
  73. package/dist/elements/inline-edit.js +1 -1
  74. package/dist/elements/kanban.js +1 -1
  75. package/dist/elements/lead-popup.js +1 -1
  76. package/dist/elements/lightbox.js +1 -1
  77. package/dist/elements/markdown.js +1 -1
  78. package/dist/elements/mention-input.js +1 -1
  79. package/dist/elements/modal.js +1 -1
  80. package/dist/elements/navigation-menu.js +1 -1
  81. package/dist/elements/notification-center.js +1 -1
  82. package/dist/elements/org-tree.js +1 -1
  83. package/dist/elements/otp.js +1 -1
  84. package/dist/elements/overflow.js +1 -1
  85. package/dist/elements/phone.js +1 -1
  86. package/dist/elements/popover.js +1 -1
  87. package/dist/elements/rating.js +1 -1
  88. package/dist/elements/record-pager.js +1 -1
  89. package/dist/elements/relative-time.js +1 -1
  90. package/dist/elements/saved-views.js +1 -1
  91. package/dist/elements/select.js +1 -1
  92. package/dist/elements/shortcuts.js +1 -1
  93. package/dist/elements/show-more.js +1 -1
  94. package/dist/elements/slider.js +1 -1
  95. package/dist/elements/sortable.js +1 -1
  96. package/dist/elements/status-icon.js +1 -1
  97. package/dist/elements/timepicker.js +1 -1
  98. package/dist/elements/tour.js +1 -1
  99. package/dist/elements/tree-picker.js +1 -1
  100. package/dist/elements/tree.js +1 -1
  101. package/dist/elements/whats-new.js +1 -1
  102. package/dist/elements/wizard.js +1 -1
  103. package/dist/fileViewer.g-B6N9K2xi.js +1 -0
  104. package/dist/{fileViewerImage-uL9m83k1.js → fileViewerImage-ItX9j9U9.js} +2 -2
  105. package/dist/fileViewerMedia-BCqp2Z96.js +1 -0
  106. package/dist/{fileViewerPdf-BsSc-9fL.js → fileViewerPdf-aaI2R2nB.js} +2 -2
  107. package/dist/{filterPopover-C_oDfQBg.js → filterPopover-D7LGrhnO.js} +1 -1
  108. package/dist/formatters-DikbTYA4.js +1 -0
  109. package/dist/helpers.js +1 -1
  110. package/dist/iconGlyphs.g-P04RJkSE.js +1 -0
  111. package/dist/{inlineEditText-CGaAKZhR.js → inlineEditText-C6g6qhye.js} +1 -1
  112. package/dist/kanban-CX6DyApZ.js +1 -0
  113. package/dist/{kanbanModel-sAwpMCpn.js → kanbanModel-CuMgMnSc.js} +1 -1
  114. package/dist/loader-B3lirubB.js +1 -0
  115. package/dist/{nativeOverlay-DGady-wN.js → nativeOverlay-BHD2QV02.js} +1 -1
  116. package/dist/{notificationDays-DQlrEZ3z.js → notificationDays-grsj1DtM.js} +1 -1
  117. package/dist/optionLabel-CmrOSHbD.js +1 -0
  118. package/dist/{relativeTime-CQuwuwZ-.js → relativeTime-vdCXtfKg.js} +1 -1
  119. package/dist/rtl-g7G8Bsib.js +1 -0
  120. package/dist/{search-w5M6FzD9.js → search-DwboX91o.js} +1 -1
  121. package/dist/server.js +1 -1
  122. package/dist/serverHtml-BC6tAyAl.js +1 -0
  123. package/dist/{shortcutKeys-DmPiY4T7.js → shortcutKeys-6iLc6oDR.js} +1 -1
  124. package/dist/statusIcons-Cd3GJcBR.js +1 -0
  125. package/dist/svgNodes-CyPS2oFH.js +1 -0
  126. package/dist/tableExport-D1OdFVQj.js +2 -0
  127. package/dist/tableSelect.g-Bmd-ExRE.js +1 -0
  128. package/dist/text/en.json +14 -2
  129. package/dist/text.js +1 -1
  130. package/dist/{themeTransition-CA1qzCZk.js → themeTransition-D7HJ4A4m.js} +1 -1
  131. package/dist/ui-calendar.global.js +1 -1
  132. package/dist/ui-calendar.js +1 -1
  133. package/dist/ui-chart.global.js +15 -15
  134. package/dist/ui-chart.js +10 -10
  135. package/dist/ui-consent-banner.global.js +1 -1
  136. package/dist/ui-elements/carousel.global.js +1 -1
  137. package/dist/ui-elements/code-block.global.js +1 -1
  138. package/dist/ui-elements/command-palette.global.js +2 -2
  139. package/dist/ui-elements/comment-thread.global.js +1 -1
  140. package/dist/ui-elements/consent-banner.global.js +1 -1
  141. package/dist/ui-elements/context-menu.global.js +1 -1
  142. package/dist/ui-elements/date-range.global.js +1 -25
  143. package/dist/ui-elements/date-time.global.js +1 -0
  144. package/dist/ui-elements/datepicker.global.js +1 -0
  145. package/dist/ui-elements/drawer.global.js +1 -1
  146. package/dist/ui-elements/dropdown.global.js +1 -1
  147. package/dist/ui-elements/entry-grid.global.js +1 -1
  148. package/dist/ui-elements/gantt.global.js +1 -1
  149. package/dist/ui-elements/glyphs.global.js +1 -1
  150. package/dist/ui-elements/image-crop.global.js +1 -17
  151. package/dist/ui-elements/inline-edit.global.js +1 -1
  152. package/dist/ui-elements/kanban.global.js +1 -1
  153. package/dist/ui-elements/lead-popup.global.js +40 -77
  154. package/dist/ui-elements/lightbox.global.js +1 -1
  155. package/dist/ui-elements/markdown.global.js +3 -3
  156. package/dist/ui-elements/org-tree.global.js +1 -1
  157. package/dist/ui-elements/phone.global.js +1 -16
  158. package/dist/ui-elements/popover.global.js +1 -1
  159. package/dist/ui-elements/saved-views.global.js +1 -1
  160. package/dist/ui-elements/select-chips.global.js +2 -2
  161. package/dist/ui-elements/select-recents.global.js +1 -1
  162. package/dist/ui-elements/select-search.global.js +1 -1
  163. package/dist/ui-elements/select-window.global.js +1 -1
  164. package/dist/ui-elements/slider.global.js +1 -51
  165. package/dist/ui-elements/sortable.global.js +1 -1
  166. package/dist/ui-elements/status-icon.global.js +1 -10
  167. package/dist/ui-elements/table-export.global.js +2 -0
  168. package/dist/ui-elements/timepicker.global.js +1 -9
  169. package/dist/ui-elements/tour.global.js +1 -1
  170. package/dist/ui-elements/tree-picker.global.js +1 -1
  171. package/dist/ui-elements/tree.global.js +1 -1
  172. package/dist/ui-elements/wizard.global.js +1 -1
  173. package/dist/ui-elements.global.js +1 -55
  174. package/dist/ui-elements.js +1 -1
  175. package/dist/ui-file-viewer.global.js +11 -11
  176. package/dist/ui-file-viewer.js +1 -1
  177. package/dist/ui-lead-popup.global.js +1 -1
  178. package/dist/ui-rich-text.global.js +53 -63
  179. package/dist/ui-rich-text.js +53 -63
  180. package/dist/ui-tour.global.js +1 -1
  181. package/dist/wuiHttp-BWf9dDsZ.js +1 -0
  182. package/dist/zone-BR02ZkHF.js +1 -0
  183. package/package.json +10 -6
  184. package/types/WuiCommandPalette.d.ts +0 -60
  185. package/types/WuiDataTable.d.ts +2 -0
  186. package/types/WuiDatePicker.d.ts +6 -4
  187. package/types/WuiDateRange.d.ts +2 -2
  188. package/types/WuiDateTime.d.ts +26 -0
  189. package/types/WuiInlineEdit.d.ts +1 -1
  190. package/types/WuiLeadPopup.d.ts +1 -1
  191. package/types/WuiMarkdown.d.ts +4 -4
  192. package/types/WuiNavigationMenu.d.ts +30 -0
  193. package/types/WuiOrgTree.d.ts +12 -0
  194. package/types/WuiTimePicker.d.ts +1 -1
  195. package/types/WuiTree.d.ts +58 -0
  196. package/types/WuiTreePicker.d.ts +38 -0
  197. package/types/WuiWizard.d.ts +3 -3
  198. package/types/anchorOverlay.d.ts +3 -1
  199. package/types/{avatarHtml.d.ts → avatarNode.d.ts} +3 -3
  200. package/types/chartSpec.d.ts +10 -1
  201. package/types/dom.d.ts +7 -0
  202. package/types/elements/date-time.d.ts +2 -0
  203. package/types/global/core.d.ts +2 -3
  204. package/types/global/glyphs.d.ts +5 -4
  205. package/types/global/parts/table-export.d.ts +1 -0
  206. package/types/global/shared.d.ts +12 -2
  207. package/types/global/tableExport.d.ts +6 -0
  208. package/types/globals.d.ts +3 -1
  209. package/types/helpers.d.ts +3 -2
  210. package/types/iconGlyphs.g.d.ts +5 -4
  211. package/types/iconGlyphsCore.g.d.ts +2 -1
  212. package/types/iconGlyphsLazy.g.d.ts +2 -1
  213. package/types/index.d.ts +2 -1
  214. package/types/optionLabel.d.ts +9 -15
  215. package/types/razor-js/modules/shared.d.ts +1 -1
  216. package/types/razor-js/webority-ui.d.ts +1 -0
  217. package/types/richTextIcons.d.ts +14 -1
  218. package/types/rtl.d.ts +2 -0
  219. package/types/select/list.d.ts +9 -4
  220. package/types/server/index.d.ts +2 -1
  221. package/types/server/serverHtml.d.ts +6 -0
  222. package/types/server/serverTable.d.ts +1 -1
  223. package/types/server/wuiHttp.d.ts +8 -1
  224. package/types/svgNodes.d.ts +7 -0
  225. package/types/tableExport.d.ts +9 -0
  226. package/types/tableExportLoader.d.ts +4 -0
  227. package/types/text/web/chart.g.d.ts +1 -0
  228. package/types/text/web/confirmDialog.g.d.ts +1 -0
  229. package/types/text/web/dataTable.g.d.ts +7 -0
  230. package/types/text/web/datePicker.g.d.ts +2 -0
  231. package/types/text/web/modal.g.d.ts +1 -0
  232. package/types/toastTypes.d.ts +2 -1
  233. package/types/tooltips.d.ts +3 -3
  234. package/dist/WuiCarousel-CRx2-eKV.js +0 -1
  235. package/dist/WuiCommentThread-DZEYOHsk.js +0 -1
  236. package/dist/WuiConsentBanner-CWvXnwBH.js +0 -1
  237. package/dist/WuiContextMenu-DvYwIicr.js +0 -1
  238. package/dist/WuiDataTable-BSMhRQ1i.js +0 -1
  239. package/dist/WuiDatePicker-DxPethoe.js +0 -34
  240. package/dist/WuiDateRange-zPmNewOW.js +0 -25
  241. package/dist/WuiGantt-DaEgtdOU.js +0 -1
  242. package/dist/WuiImageCrop-BTY59Qsm.js +0 -17
  243. package/dist/WuiInlineEdit-BlsGNQSC.js +0 -1
  244. package/dist/WuiLeadPopup-L9UCTVA5.js +0 -382
  245. package/dist/WuiLightbox-BnLEEkj1.js +0 -1
  246. package/dist/WuiMarkdown-B7nfQ6tW.js +0 -4
  247. package/dist/WuiMentionInput-DvKw8MXS.js +0 -1
  248. package/dist/WuiNavigationMenu-CfD0FWvt.js +0 -1
  249. package/dist/WuiOrgTree-5v0vqPVk.js +0 -1
  250. package/dist/WuiOtp-DonxSwVn.js +0 -14
  251. package/dist/WuiPhone-BFb_LjJa.js +0 -16
  252. package/dist/WuiSavedViews-BsAyuOzX.js +0 -1
  253. package/dist/WuiSelect-iE3EVUWK.js +0 -9
  254. package/dist/WuiSlider-J9YPWu9e.js +0 -51
  255. package/dist/WuiSortable-BfOm57Mj.js +0 -1
  256. package/dist/WuiTimePicker-BsnPOYNw.js +0 -9
  257. package/dist/WuiTour-C2CRQvS7.js +0 -1
  258. package/dist/WuiTree-DGZSXgBh.js +0 -1
  259. package/dist/WuiTreePicker-CkTfNUQx.js +0 -1
  260. package/dist/WuiWizardStep-CryQ5BlK.js +0 -1
  261. package/dist/anchorOverlay-DSzkGQPi.js +0 -1
  262. package/dist/avatarHtml-BWlA0cm-.js +0 -1
  263. package/dist/chips-B4ZNRO-h.js +0 -2
  264. package/dist/dataTable.g-BVxhub_d.js +0 -1
  265. package/dist/datePicker.g-VdBlhA2G.js +0 -1
  266. package/dist/dom-Do1pAA12.js +0 -1
  267. package/dist/drawerDiscard-B4OcoR8S.js +0 -1
  268. package/dist/fileViewer.g-D5lbrn8g.js +0 -1
  269. package/dist/fileViewerMedia-cfmycjzl.js +0 -1
  270. package/dist/formatters-CMTSYlW9.js +0 -1
  271. package/dist/iconGlyphs.g-BUF97bUu.js +0 -1
  272. package/dist/kanban-CRRLqNn_.js +0 -1
  273. package/dist/loader-Cf_ozcXz.js +0 -1
  274. package/dist/optionLabel-CWMhBkdO.js +0 -1
  275. package/dist/statusIcons-CRtqA_1C.js +0 -10
  276. package/dist/tableSelect.g-DKZqXQT_.js +0 -1
  277. package/dist/wuiHttp-DGbD7Fra.js +0 -1
@@ -1,3 +1,41 @@
1
+ /**
2
+ * <wui-tree-picker>: a form field that picks leaves of a hierarchy. The tree and its search sit on
3
+ * the left, the Chosen rail on the right. Shared by React AppTreePicker and Razor <app-tree-picker>.
4
+ *
5
+ * The element reads a node list, `{ id, label, children?, disabled? }`, from the `nodes` property
6
+ * (what React writes) or from a child <script type="application/json"> (what the Razor tag helper
7
+ * writes, with a plain list beside it that this element replaces). Ids are strings, unique across
8
+ * the whole tree; a repeated id throws. There is no lazy loading: a node with `hasChildren` and no
9
+ * `children` counts as a leaf for the logic.
10
+ *
11
+ * `values` is the chosen leaf ids in pick order, never a parent id. Ticking a parent picks every
12
+ * enabled leaf under it, or clears them when all are picked. `selection` is `multiple` (default,
13
+ * a tri-state checkbox per row) or `single` (one leaf, replaced on each pick).
14
+ *
15
+ * Keyboard (roving tabindex, one row in the tab order): ArrowDown / ArrowUp / Home / End move,
16
+ * ArrowRight opens a closed parent or enters an open one, ArrowLeft closes it or goes to its
17
+ * parent, Space and Enter pick, a printable key jumps to the next row starting with it. In the
18
+ * search box ArrowDown moves into the tree, and Backspace on an empty box removes the last chip.
19
+ *
20
+ * Event (bubbling, composed), fired only on a user change:
21
+ * wui-tree-picker:change { values, value } `value` is a string in single mode, else the array
22
+ *
23
+ * Form: with a `name`, one hidden input per chosen id; single mode posts the one id, none when empty.
24
+ *
25
+ * The markup comes from treePicker/treePickerView.ts; this file owns state, listeners and events.
26
+ *
27
+ * @property nodes The node list.
28
+ * @property values Chosen leaf ids in pick order.
29
+ * @property selection 'single' | 'multiple'. Default 'multiple'
30
+ * @property name Field name for the form mirror
31
+ * @attr values Initial chosen ids as a JSON array (`["eng","ops"]`), read once on connect unless `values` was set
32
+ * @attr disabled Ignores every action
33
+ * @attr invalid Error state (danger border)
34
+ * @attr aria-label Name of the tree
35
+ * @attr aria-labelledby Id of the visible label that names the tree; aria-label wins when both are set
36
+ * @attr chosen-title, clear-all-label, empty-title, empty-text, no-match-text, remove-label,
37
+ * search-label, search-placeholder, selected-text Each overrides its text in the `treePicker` group
38
+ */
1
39
  import { ElementBase } from "./elementBase.ts";
2
40
  import { treeKeyAction } from "./treePicker/treeKeys.ts";
3
41
  import { type TreePickerViewText } from "./treePicker/treePickerView.ts";
@@ -58,11 +58,11 @@ export declare class WuiWizard extends ElementBase {
58
58
  _onStepsMutated(): void;
59
59
  _syncPanels(steps: HTMLElement[]): void;
60
60
  _stepStatus(step: Element | undefined, i: number): StepStatus;
61
- _headerHtml(steps: HTMLElement[]): string;
62
- _footerHtml(steps: HTMLElement[]): string;
61
+ _headerNodes(steps: HTMLElement[]): Node[];
62
+ _footerNodes(steps: HTMLElement[]): Node[];
63
63
  _wire(): void;
64
64
  /** The wrapper's pre-styled glyph for `name`, else the linear one. */
65
- _glyph(name: string): string;
65
+ _glyph(name: string): Node | null;
66
66
  _watchGlyphs(): void;
67
67
  _renderHeader(): void;
68
68
  _teardown(): void;
@@ -12,7 +12,7 @@ export interface AnchorOptions {
12
12
  alignEnd?: boolean;
13
13
  below?: boolean;
14
14
  beside?: boolean;
15
- /** The side of the trigger the panel sits on. "auto" takes the side with most room. A side that does not fit flips to its opposite. Unset keeps today's below-with-flip. start is left and end is right, as today. */
15
+ /** The side of the trigger the panel sits on. "auto" takes the side with most room. A side that does not fit flips to its opposite. Unset keeps today's below-with-flip. start is the trigger's inline start: the left edge under ltr, the right edge under rtl. */
16
16
  side?: OverlaySide | "auto";
17
17
  /** Along the trigger's edge. Default "start". "center" is for tooltips and popovers. */
18
18
  align?: "start" | "center" | "end";
@@ -56,6 +56,8 @@ export interface AnchorOptions {
56
56
  * `beside` places the panel to the right of the trigger, top-aligned with it, and flips it to the
57
57
  * left when the right side would overflow. It keeps the panel inside the viewport vertically and
58
58
  * sets `data-side` to "end" or "start" for the side it chose. For a submenu opened from its row.
59
+ * Under rtl the default flips: the panel goes to the left of the trigger and flips to the right when
60
+ * the left side would overflow. `data-side` keeps the physical names: "start" is left, "end" is right.
59
61
  *
60
62
  * `flipAlign` moves an aligned panel to the trigger's other edge when its own edge would run past the
61
63
  * viewport, if the other edge fits. Off by default, so a caller that wants today's clamp is unchanged.
@@ -3,8 +3,8 @@
3
3
  * or an inline raster image, may reach `src`. Anything else renders the initials alone.
4
4
  */
5
5
  export declare const safeImageUrl: (url: unknown) => string;
6
- /** The avatar face for an option, or "" when it has neither a usable photo nor initials. */
7
- export declare const avatarHtml: (o: {
6
+ /** The avatar face for an option, or null when it has neither a usable photo nor initials. */
7
+ export declare function avatarNode(o: {
8
8
  avatar?: unknown;
9
9
  initials?: string | null;
10
- }, sizeClass?: string) => string;
10
+ }, sizeClass?: string): HTMLSpanElement | null;
@@ -32,11 +32,14 @@ export type XColumn = {
32
32
  label?: string | undefined;
33
33
  labelFit?: LabelFit | undefined;
34
34
  };
35
+ /** The eight categorical theme colours a series may name. */
36
+ export type ChartSeriesColour = "chart-1" | "chart-2" | "chart-3" | "chart-4" | "chart-5" | "chart-6" | "chart-7" | "chart-8";
35
37
  /** A value column, in the order it takes its colour. */
36
38
  export type SeriesColumn = {
37
39
  key: string;
38
40
  label: string;
39
41
  format?: FormatSpec | undefined;
42
+ colour?: ChartSeriesColour | undefined;
40
43
  };
41
44
  /** A column that names a second dimension (group, to, size). */
42
45
  export type KeyedColumn = {
@@ -105,7 +108,7 @@ export type ChartSpec = {
105
108
  size?: KeyedColumn;
106
109
  /** A scatter or bubble's straight trend line through the visible points. */
107
110
  trend?: boolean;
108
- /** Print each bar's value on it. Column and bar only; ignored on a stacked chart. */
111
+ /** Print each value on its bar or point. Line, column and bar only; ignored on a stacked chart. Default on for a line, off otherwise. */
109
112
  valueLabels?: boolean;
110
113
  /** A zoom slider under a line or area. Default: on above 5,000 rows. */
111
114
  zoom?: boolean;
@@ -124,6 +127,8 @@ export type ChartSpec = {
124
127
  };
125
128
  /** The caption under the total in a donut's centre. Default "Total". Donut only. */
126
129
  centerLabel?: string;
130
+ /** Print each slice's value and share on a donut, at any width. Default on. Donut only. */
131
+ sliceValues?: boolean;
127
132
  /** In px, the axis labels included. Default 320; a gauge 240, a calendar 200, a treemap and a sankey 340, small multiples 100 per chart. */
128
133
  height?: number;
129
134
  /** `loading` after a first render keeps that render on screen, dimmed, until the new data arrives. Default `ready`. */
@@ -175,6 +180,7 @@ export type NormalizedSpec = {
175
180
  label: string;
176
181
  } | null;
177
182
  centerLabel: string;
183
+ sliceValues: boolean;
178
184
  valueLabels: boolean;
179
185
  height: number;
180
186
  state: ChartState;
@@ -244,6 +250,7 @@ export declare const X_KINDS: readonly XKind[];
244
250
  export declare const RENDERERS: readonly Renderer[];
245
251
  export declare const CHART_STATES: readonly ChartState[];
246
252
  export declare const CHART_VIEWS: readonly ChartView[];
253
+ export declare const CHART_SERIES_COLOURS: readonly ChartSeriesColour[];
247
254
  export declare const MAX_SERIES: number;
248
255
  export declare const MAX_SLICES: number;
249
256
  /** Colour groups a scatter or bubble keeps apart: past three, pairs of hues stop being tellable apart. */
@@ -339,6 +346,8 @@ export declare function tooltipModel(spec: NormalizedSpec, index: number, hidden
339
346
  export declare function signed(value: number, format: Parameters<typeof formatValue>[1], suffix?: string): string;
340
347
  /** The colour of a donut slice: its palette slot, or the neutral for the folded Other slice. */
341
348
  export declare function sliceColour(spec: NormalizedSpec, index: number, colours: ChartColours): string | undefined;
349
+ /** The palette slot a series draws in: its chosen theme colour (chart-1 to chart-8), else its place in the series. */
350
+ export declare function seriesSlot(s: SeriesColumn, index: number): number;
342
351
  /** A tooltip's DOM, built with textContent only: no string from the data is ever parsed as HTML. */
343
352
  export declare function renderTooltip(model: TooltipModel): HTMLDivElement;
344
353
  /** The same content as one sentence, for the live region the keyboard drives. */
package/types/dom.d.ts CHANGED
@@ -5,4 +5,11 @@ export declare function must<T>(value: T | null | undefined, message: string): T
5
5
  export declare function elementOf<T extends Element>(value: unknown, type: ElementClass<T>, message: string): T;
6
6
  /** The closest ancestor-or-self of `target` matching `selector`, or null when `target` is not an Element. */
7
7
  export declare function closestOf(target: EventTarget | null, selector: string): Element | null;
8
+ /** An attribute value: a string or number is written as is, `true` writes the empty attribute, and false, null or undefined writes nothing. */
9
+ export type Attrs = Readonly<Record<string, string | number | boolean | null | undefined>>;
10
+ /** A child: a node is appended, a string or number becomes a text node, and false, null or undefined is skipped. */
11
+ export type Child = Node | string | number | false | null | undefined;
12
+ /** An HTML element with its attributes set in key order through setAttribute and its children appended in order. */
13
+ export declare function make<K extends keyof HTMLElementTagNameMap>(tag: K, attrs?: Attrs | null, ...children: Child[]): HTMLElementTagNameMap[K];
14
+ export declare function make(tag: string, attrs?: Attrs | null, ...children: Child[]): HTMLElement;
8
15
  export {};
@@ -0,0 +1,2 @@
1
+ import { WuiDateTime } from "../WuiDateTime.ts";
2
+ export { WuiDateTime };
@@ -1,5 +1,4 @@
1
1
  import { WuiDataTable } from "../WuiDataTable.ts";
2
- import { WuiDatePicker } from "../WuiDatePicker.ts";
3
2
  import { WuiDock } from "../WuiDock.ts";
4
3
  import { WuiHoverCard } from "../WuiHoverCard.ts";
5
4
  import { WuiNavigationMenu } from "../WuiNavigationMenu.ts";
@@ -52,5 +51,5 @@ export { matchSegments } from "../textMatch.ts";
52
51
  export { applyTheme, DEFAULT_THEME_EFFECT, DEFAULT_THEME_STORAGE_KEY, nextTheme, readStoredTheme, resolveTheme, storeTheme, THEME_BOOT_SCRIPT_BODY, THEME_CHANGE_EVENT, THEME_EFFECT_DURATION, THEME_EFFECTS, THEME_MODES, THEME_SWITCHING_CLASS, themeBootScript, themeKeyframes, transitionTheme, watchSystemTheme, } from "../themeTransition.ts";
53
52
  export { WHATS_NEW_READ_EVENT } from "../WuiWhatsNew.ts";
54
53
  export { isTimeZone, todayIn, wallClockOf, zoneOffsetMs, zoneParts } from "../zone.ts";
55
- export { glyphSvg } from "./glyphs.ts";
56
- export { WuiDataTable, WuiDatePicker, WuiDock, WuiHoverCard, WuiNavigationMenu, WuiNotificationCenter, WuiOnboardingChecklist, WuiOtp, WuiOverflow, WuiRating, WuiRecordPager, WuiRelativeTime, WuiSelect, WuiShortcuts, WuiShowMore, WuiTruncate, WuiWhatsNew, whenElementsReady, };
54
+ export { glyphNode } from "./glyphs.ts";
55
+ export { WuiDataTable, WuiDock, WuiHoverCard, WuiNavigationMenu, WuiNotificationCenter, WuiOnboardingChecklist, WuiOtp, WuiOverflow, WuiRating, WuiRecordPager, WuiRelativeTime, WuiSelect, WuiShortcuts, WuiShowMore, WuiTruncate, WuiWhatsNew, whenElementsReady, };
@@ -1,10 +1,11 @@
1
+ import { type SvgNode } from "../svgNodes.ts";
1
2
  export declare const GLYPH_CHUNK = "glyphs";
2
3
  /** Marks an <svg> written before its glyph arrived; the glyphs chunk fills it in place. */
3
4
  export declare const GLYPH_PENDING_ATTRIBUTE = "data-wui-glyph-pending";
4
- /** The library's single icon SVG emitter, identical markup to Razor's IconMarkup.Render. */
5
- export declare function glyphSvg(name: string, { size, className }?: {
5
+ /** The library's single icon emitter: the same element Razor's IconMarkup.Render writes as markup. A glyph-shaped name outside the core set returns an empty pending <svg> that the glyphs chunk fills. */
6
+ export declare function glyphNode(name: string, { size, className }?: {
6
7
  size?: number;
7
8
  className?: string;
8
- }): string;
9
+ }): SVGSVGElement | null;
9
10
  /** Adds the glyphs the chunk carries and fills every glyph written before they arrived. */
10
- export declare function registerGlyphs(glyphs: Readonly<Record<string, string>>): void;
11
+ export declare function registerGlyphs(glyphs: Readonly<Record<string, readonly SvgNode[]>>): void;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  import * as anchorOverlay from "../anchorOverlay.ts";
2
- import * as avatarHtml from "../avatarHtml.ts";
2
+ import * as avatarNode from "../avatarNode.ts";
3
3
  import * as buttonClass from "../buttonClass.ts";
4
4
  import * as calendarMath from "../calendarMath.ts";
5
5
  import * as copyText from "../copyText.ts";
@@ -20,14 +20,18 @@ import * as menuKeyNav from "../menuKeyNav.ts";
20
20
  import * as nativeOverlay from "../nativeOverlay.ts";
21
21
  import * as notificationDays from "../notificationDays.ts";
22
22
  import * as optionLabel from "../optionLabel.ts";
23
+ import * as rtl from "../rtl.ts";
23
24
  import * as selectList from "../select/list.ts";
24
25
  import * as partRegistry from "../select/partRegistry.ts";
25
26
  import * as selectRemote from "../select/remote.ts";
26
27
  import * as selectWindow from "../select/window.ts";
28
+ import * as serverHtml from "../server/serverHtml.ts";
27
29
  import * as wuiHttp from "../server/wuiHttp.ts";
28
30
  import * as stepperHeader from "../stepperHeader.ts";
31
+ import * as svgNodes from "../svgNodes.ts";
29
32
  import * as tableSelect from "../tableSelect.ts";
30
33
  import * as textStore from "../text/textStore.ts";
34
+ import * as datePickerText from "../text/web/datePicker.g.ts";
31
35
  import * as drawerText from "../text/web/drawer.g.ts";
32
36
  import * as selectText from "../text/web/select.g.ts";
33
37
  import * as textMatch from "../textMatch.ts";
@@ -36,13 +40,15 @@ import * as WuiSelect from "../WuiSelect.ts";
36
40
  import * as zone from "../zone.ts";
37
41
  import * as glyphs from "./glyphs.ts";
38
42
  import * as loader from "./loader.ts";
43
+ import * as tableExport from "./tableExport.ts";
39
44
  export declare const SHARED_MODULES: Readonly<{
40
45
  anchorOverlay: typeof anchorOverlay;
41
- avatarHtml: typeof avatarHtml;
46
+ avatarNode: typeof avatarNode;
42
47
  buttonClass: typeof buttonClass;
43
48
  calendarMath: typeof calendarMath;
44
49
  copyText: typeof copyText;
45
50
  dataTable: typeof dataTable;
51
+ datePickerText: typeof datePickerText;
46
52
  defineElement: typeof defineElement;
47
53
  devWarn: typeof devWarn;
48
54
  dom: typeof dom;
@@ -63,11 +69,15 @@ export declare const SHARED_MODULES: Readonly<{
63
69
  notificationDays: typeof notificationDays;
64
70
  optionLabel: typeof optionLabel;
65
71
  partRegistry: typeof partRegistry;
72
+ rtl: typeof rtl;
66
73
  selectList: typeof selectList;
67
74
  selectRemote: typeof selectRemote;
68
75
  selectText: typeof selectText;
69
76
  selectWindow: typeof selectWindow;
77
+ serverHtml: typeof serverHtml;
70
78
  stepperHeader: typeof stepperHeader;
79
+ svgNodes: typeof svgNodes;
80
+ tableExport: typeof tableExport;
71
81
  tableSelect: typeof tableSelect;
72
82
  textMatch: typeof textMatch;
73
83
  textStore: typeof textStore;
@@ -0,0 +1,6 @@
1
+ import type { TableExportWriters } from "../tableExportLoader.ts";
2
+ export declare const TABLE_EXPORT_CHUNK = "table-export";
3
+ /** Resolves to the CSV and Excel writers once the table-export chunk has run; rejects when it fails to load. */
4
+ export declare function loadTableExport(): Promise<TableExportWriters>;
5
+ /** Called once by the table-export chunk with the writers it carries. */
6
+ export declare function registerTableExport(writers: TableExportWriters): void;
@@ -14,6 +14,7 @@ import type { WuiContextMenu } from "./WuiContextMenu.ts";
14
14
  import type { WuiDataTable } from "./WuiDataTable.ts";
15
15
  import type { WuiDatePicker } from "./WuiDatePicker.ts";
16
16
  import type { WuiDateRange } from "./WuiDateRange.ts";
17
+ import type { WuiDateTime } from "./WuiDateTime.ts";
17
18
  import type { WuiDock } from "./WuiDock.ts";
18
19
  import type { WuiDrawer } from "./WuiDrawer.ts";
19
20
  import type { WuiDropdown } from "./WuiDropdown.ts";
@@ -66,6 +67,7 @@ export interface WuiElementTagMap {
66
67
  "wui-data-table": WuiDataTable;
67
68
  "wui-datepicker": WuiDatePicker;
68
69
  "wui-date-range": WuiDateRange;
70
+ "wui-date-time": WuiDateTime;
69
71
  "wui-dock": WuiDock;
70
72
  "wui-drawer": WuiDrawer;
71
73
  "wui-dropdown": WuiDropdown;
@@ -156,7 +158,7 @@ declare global {
156
158
  }
157
159
  interface DocumentEventMap extends WuiEventMap {
158
160
  }
159
- var WeborityUiElements: typeof import("./global/core.ts") & Partial<typeof import("./elements/carousel.ts")> & Partial<typeof import("./elements/code-block.ts")> & Partial<typeof import("./elements/command-palette.ts")> & Partial<typeof import("./elements/comment-thread.ts")> & Partial<typeof import("./elements/consent-banner.ts")> & Partial<typeof import("./elements/context-menu.ts")> & Partial<typeof import("./elements/date-range.ts")> & Partial<typeof import("./elements/drawer.ts")> & Partial<typeof import("./elements/dropdown.ts")> & Partial<typeof import("./elements/gantt.ts")> & Partial<typeof import("./elements/image-crop.ts")> & Partial<typeof import("./elements/inline-edit.ts")> & Partial<typeof import("./elements/kanban.ts")> & Partial<typeof import("./elements/lead-popup.ts")> & Partial<typeof import("./elements/lightbox.ts")> & Partial<typeof import("./elements/org-tree.ts")> & Partial<typeof import("./elements/markdown.ts")> & Partial<typeof import("./elements/modal.ts")> & Partial<typeof import("./elements/phone.ts")> & Partial<typeof import("./elements/popover.ts")> & Partial<typeof import("./global/parts/select-country.ts")> & Partial<typeof import("./elements/saved-views.ts")> & Partial<typeof import("./global/parts/select-chips.ts")> & Partial<typeof import("./global/parts/select-recents.ts")> & Partial<typeof import("./global/parts/select-search.ts")> & Partial<typeof import("./elements/slider.ts")> & Partial<typeof import("./elements/sortable.ts")> & Partial<typeof import("./elements/status-icon.ts")> & Partial<typeof import("./elements/timepicker.ts")> & Partial<typeof import("./elements/tour.ts")> & Partial<typeof import("./elements/tree.ts")> & Partial<typeof import("./elements/tree-picker.ts")> & Partial<typeof import("./elements/wizard.ts")>;
161
+ var WeborityUiElements: typeof import("./global/core.ts") & Partial<typeof import("./elements/carousel.ts")> & Partial<typeof import("./elements/code-block.ts")> & Partial<typeof import("./elements/command-palette.ts")> & Partial<typeof import("./elements/comment-thread.ts")> & Partial<typeof import("./elements/consent-banner.ts")> & Partial<typeof import("./elements/context-menu.ts")> & Partial<typeof import("./elements/date-range.ts")> & Partial<typeof import("./elements/date-time.ts")> & Partial<typeof import("./elements/drawer.ts")> & Partial<typeof import("./elements/dropdown.ts")> & Partial<typeof import("./elements/gantt.ts")> & Partial<typeof import("./elements/image-crop.ts")> & Partial<typeof import("./elements/inline-edit.ts")> & Partial<typeof import("./elements/kanban.ts")> & Partial<typeof import("./elements/lead-popup.ts")> & Partial<typeof import("./elements/lightbox.ts")> & Partial<typeof import("./elements/org-tree.ts")> & Partial<typeof import("./elements/markdown.ts")> & Partial<typeof import("./elements/modal.ts")> & Partial<typeof import("./elements/phone.ts")> & Partial<typeof import("./elements/popover.ts")> & Partial<typeof import("./global/parts/select-country.ts")> & Partial<typeof import("./elements/saved-views.ts")> & Partial<typeof import("./global/parts/select-chips.ts")> & Partial<typeof import("./global/parts/select-recents.ts")> & Partial<typeof import("./global/parts/select-search.ts")> & Partial<typeof import("./elements/slider.ts")> & Partial<typeof import("./elements/sortable.ts")> & Partial<typeof import("./elements/status-icon.ts")> & Partial<typeof import("./elements/timepicker.ts")> & Partial<typeof import("./elements/tour.ts")> & Partial<typeof import("./elements/tree.ts")> & Partial<typeof import("./elements/tree-picker.ts")> & Partial<typeof import("./elements/wizard.ts")>;
160
162
  var WeborityFileViewer: typeof import("./fileViewer.ts") | undefined;
161
163
  var WeborityChart: typeof import("./chart.ts") | undefined;
162
164
  var WeborityCalendar: typeof import("./calendar.ts") | undefined;
@@ -11,7 +11,7 @@ export { acceptLabel, DEFAULT_IMAGE_ACCEPT, DEFAULT_MAX_SIZE_MB, formatFileSize,
11
11
  export { CURRENCIES, DATE_PATTERNS, DURATION_UNITS, emptyValueLabel, FORMAT_STYLES, formatCompact, formatCurrency, formatDate, formatDateTime, formatDuration, formatNumber, formatPercent, formatValue, IST_TIME_ZONE, MONEY_UNITS, timeZoneLabel, toInstant, } from "./formatters.ts";
12
12
  export { GanttError, validateGantt } from "./ganttLayout.ts";
13
13
  export type { GanttFoldChangeDetail, GanttFromChangeDetail, GanttLayout, GanttRow, GanttSelectDetail, GanttSpec, GanttState, GanttStatus, GanttZoom, GanttZoomChangeDetail, } from "./ganttTypes.ts";
14
- export { glyphSvg } from "./iconGlyphs.g.ts";
14
+ export { glyphNode } from "./iconGlyphs.g.ts";
15
15
  export { isImeSafeEnter } from "./imeSafeEnter.ts";
16
16
  export { initialsOf } from "./initials.ts";
17
17
  export { INLINE_EDIT_SAVED_MS, INLINE_EDIT_TYPES, type InlineEditFailedDetail, type InlineEditOption, type InlineEditSavedDetail, type InlineEditTextConfig, type InlineEditTextResult, type InlineEditType, inlineEditText, } from "./inlineEditText.ts";
@@ -31,8 +31,9 @@ export { attachScrollEdges, initScrollEdges, SCROLL_EDGE_SELECTOR } from "./scro
31
31
  export { ariaKeyShortcuts, inShortcutScope, isTypingTarget, listKeys, moveFocus, runShortcut, SHORTCUT_EVENT, SHORTCUT_SCOPE_ATTRIBUTE, SHORTCUTS_OFF_ATTRIBUTE, selectKey, shortcutKey, shortcutName, shortcutsOff, } from "./shortcutKeys.ts";
32
32
  export { deriveStepStatus, stepperHeaderItems } from "./stepperHeader.ts";
33
33
  export { initSubmitOnce, SUBMIT_ONCE_ATTRIBUTE } from "./submitOnce.ts";
34
+ export { downloadTable, type TableExportFormat, tableCsv, tableXlsx } from "./tableExport.ts";
34
35
  export { matchSegments } from "./textMatch.ts";
35
36
  export { applyTheme, DEFAULT_THEME_EFFECT, DEFAULT_THEME_STORAGE_KEY, nextTheme, readStoredTheme, resolveTheme, storeTheme, THEME_CHANGE_EVENT, THEME_EFFECT_DURATION, THEME_EFFECTS, THEME_MODES, THEME_SWITCHING_CLASS, themeBootScript, themeKeyframes, transitionTheme, watchSystemTheme, } from "./themeTransition.ts";
36
- export { showPinnedTooltips, TOOLTIP_ATTRIBUTE, TOOLTIP_CLASS_ATTRIBUTE, TOOLTIP_HTML_ATTRIBUTE, TOOLTIP_ID_ATTRIBUTE, TOOLTIP_OPEN_ATTRIBUTE, TOOLTIP_PLACEMENT_ATTRIBUTE, wireTooltips, } from "./tooltips.ts";
37
+ export { showPinnedTooltips, TOOLTIP_ATTRIBUTE, TOOLTIP_CLASS_ATTRIBUTE, TOOLTIP_ID_ATTRIBUTE, TOOLTIP_OPEN_ATTRIBUTE, TOOLTIP_PLACEMENT_ATTRIBUTE, wireTooltips, } from "./tooltips.ts";
37
38
  export { createLocalSeenStore } from "./tourSeenStore.ts";
38
39
  export { isTimeZone, todayIn, wallClockOf, zoneOffsetMs, zoneParts } from "./zone.ts";
@@ -1,7 +1,8 @@
1
- export declare const GLYPHS: Record<string, string>;
1
+ import { type SvgNode } from "./svgNodes.ts";
2
+ export declare const GLYPHS: Record<string, readonly SvgNode[]>;
2
3
  export declare const iconNames: string[];
3
- /** The library's single icon SVG emitter, with markup identical to Razor's IconMarkup.Render. */
4
- export declare function glyphSvg(name: string, { size, className }?: {
4
+ /** The library's single icon emitter: the same element Razor's IconMarkup.Render writes as markup. Null for a name the table lacks. */
5
+ export declare function glyphNode(name: string, { size, className }?: {
5
6
  size?: number;
6
7
  className?: string;
7
- }): string;
8
+ }): SVGSVGElement | null;
@@ -1 +1,2 @@
1
- export declare const CORE_GLYPHS: Readonly<Record<string, string>>;
1
+ import type { SvgNode } from "./svgNodes.ts";
2
+ export declare const CORE_GLYPHS: Readonly<Record<string, readonly SvgNode[]>>;
@@ -1 +1,2 @@
1
- export declare const LAZY_GLYPHS: Readonly<Record<string, string>>;
1
+ import type { SvgNode } from "./svgNodes.ts";
2
+ export declare const LAZY_GLYPHS: Readonly<Record<string, readonly SvgNode[]>>;
package/types/index.d.ts CHANGED
@@ -9,6 +9,7 @@ import { WuiContextMenu } from "./WuiContextMenu.ts";
9
9
  import { WuiDataTable } from "./WuiDataTable.ts";
10
10
  import { WuiDatePicker } from "./WuiDatePicker.ts";
11
11
  import { WuiDateRange } from "./WuiDateRange.ts";
12
+ import { WuiDateTime } from "./WuiDateTime.ts";
12
13
  import { WuiDock } from "./WuiDock.ts";
13
14
  import { WuiDrawer } from "./WuiDrawer.ts";
14
15
  import { WuiDropdown } from "./WuiDropdown.ts";
@@ -57,4 +58,4 @@ export { SHORTCUT_EVENT } from "./shortcutKeys.ts";
57
58
  export { THEME_CHANGE_EVENT } from "./themeTransition.ts";
58
59
  export type { TreePickerNode } from "./treePicker/treeState.ts";
59
60
  export { WHATS_NEW_READ_EVENT } from "./WuiWhatsNew.ts";
60
- export { WuiCarousel, WuiCodeBlock, WuiCommandPalette, WuiCommentThread, WuiConsentBanner, WuiContextMenu, WuiDataTable, WuiDatePicker, WuiDateRange, WuiDock, WuiDrawer, WuiDropdown, WuiEntryGrid, WuiGantt, WuiHoverCard, WuiImageCrop, WuiInlineEdit, WuiKanban, WuiLeadPopup, WuiLightbox, WuiMarkdown, WuiMentionInput, WuiModal, WuiNavigationMenu, WuiNotificationCenter, WuiOnboardingChecklist, WuiOrgTree, WuiOtp, WuiOverflow, WuiPhone, WuiPopover, WuiRating, WuiRecordPager, WuiRelativeTime, WuiSavedViews, WuiSelect, WuiShortcuts, WuiShowMore, WuiSlider, WuiSortable, WuiStatusIcon, WuiTimePicker, WuiTour, WuiTree, WuiTreePicker, WuiTruncate, WuiWhatsNew, WuiWizard, WuiWizardStep, };
61
+ export { WuiCarousel, WuiCodeBlock, WuiCommandPalette, WuiCommentThread, WuiConsentBanner, WuiContextMenu, WuiDataTable, WuiDatePicker, WuiDateRange, WuiDateTime, WuiDock, WuiDrawer, WuiDropdown, WuiEntryGrid, WuiGantt, WuiHoverCard, WuiImageCrop, WuiInlineEdit, WuiKanban, WuiLeadPopup, WuiLightbox, WuiMarkdown, WuiMentionInput, WuiModal, WuiNavigationMenu, WuiNotificationCenter, WuiOnboardingChecklist, WuiOrgTree, WuiOtp, WuiOverflow, WuiPhone, WuiPopover, WuiRating, WuiRecordPager, WuiRelativeTime, WuiSavedViews, WuiSelect, WuiShortcuts, WuiShowMore, WuiSlider, WuiSortable, WuiStatusIcon, WuiTimePicker, WuiTour, WuiTree, WuiTreePicker, WuiTruncate, WuiWhatsNew, WuiWizard, WuiWizardStep, };
@@ -1,27 +1,21 @@
1
- /** Set by _snapshotDeclared() on options read from author-written <wui-option> children, and by withTrustedLabel(). */
2
- export declare const TRUSTED_HTML: unique symbol;
1
+ /** Set on an option whose label is nodes an author wrote: a <wui-option>'s children, or a wrapper's rendered label. */
2
+ export declare const TRUSTED_LABEL: unique symbol;
3
3
  export interface SelectOptionLabel {
4
4
  label?: unknown;
5
5
  icon?: unknown;
6
6
  flag?: unknown;
7
7
  value?: unknown;
8
- [TRUSTED_HTML]?: boolean;
8
+ [TRUSTED_LABEL]?: DocumentFragment;
9
9
  }
10
- /**
11
- * A copy of the option whose label is markup to render as-is. Only for markup a wrapper
12
- * rendered itself from author code (a React node label); never for option data from a request.
13
- */
14
- export declare const withTrustedLabel: <T extends SelectOptionLabel>(o: T) => T;
15
- declare const escapeHtml: (v: unknown) => string;
16
- /** HTML for an option's label. Author markup passes through; everything else is escaped. */
17
- export declare const optionLabelHtml: (o: SelectOptionLabel | null | undefined) => string;
10
+ /** A copy of the option that draws `label` (cloned on each draw) instead of its text. Only for nodes author code rendered. */
11
+ export declare const withTrustedLabel: <T extends SelectOptionLabel>(o: T, label: Node) => T;
18
12
  /** Drops tags from a plain string. Entities are left as written; use optionText for a trusted label. */
19
13
  export declare const stripTags: (html: unknown) => string;
14
+ /** The nodes for an option's label: the trusted nodes or the label as text, wrapped with a leading flag or glyph. */
15
+ export declare function optionLabelNodes(o: SelectOptionLabel | null | undefined): Node[];
20
16
  /**
21
17
  * The visible text of an option's label: display text after a pick, search matching and
22
- * accessible names. A trusted label is markup, so its entities (&nbsp; &amp;) are decoded
23
- * through an inert template, the way WuiSelect reads textContent; any other label is data
24
- * and keeps the tag strip. Cached per option, since a search runs this on every keystroke.
18
+ * accessible names. A trusted label is nodes, so its text is their textContent; any other
19
+ * label is data and keeps the tag strip.
25
20
  */
26
21
  export declare const optionText: (o: SelectOptionLabel | null | undefined) => string;
27
- export { escapeHtml };
@@ -1,7 +1,7 @@
1
1
  export declare const ready: (fn: () => void) => void;
2
2
  export declare const qsa: <E extends HTMLElement>(root: ParentNode, selector: string, type: abstract new (...args: never[]) => E) => E[];
3
3
  export declare const onTeardown: (node: Element, release: () => void) => void;
4
- export declare const wuiIcon: (name: string, size?: number) => string;
4
+ export declare const wuiIcon: (name: string, size?: number) => SVGSVGElement | null;
5
5
  export declare const fadeOutError: (node: Element) => void;
6
6
  export declare const setFieldError: (host: HTMLElement | null, message: string, { errorClassEl }?: {
7
7
  errorClassEl?: Element;
@@ -1,3 +1,4 @@
1
+ import "../globals.ts";
1
2
  import "./modules/pageListeners.ts";
2
3
  import { dismissAllToasts, toast } from "./modules/toast.ts";
3
4
  import { showErrorSummary } from "./modules/validation.ts";
@@ -1 +1,14 @@
1
- export declare const RICH_TEXT_ICONS: Readonly<Record<string, string>>;
1
+ export declare const RICH_TEXT_ICONS: {
2
+ bold: () => HTMLSpanElement;
3
+ italic: () => HTMLSpanElement;
4
+ heading2: () => HTMLSpanElement;
5
+ heading3: () => HTMLSpanElement;
6
+ code: () => SVGSVGElement;
7
+ codeBlock: () => HTMLSpanElement;
8
+ link: () => SVGSVGElement;
9
+ bulletList: () => SVGSVGElement;
10
+ orderedList: () => SVGSVGElement;
11
+ blockquote: () => SVGSVGElement;
12
+ undo: () => SVGSVGElement;
13
+ redo: () => SVGSVGElement;
14
+ };
package/types/rtl.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare function isRtl(el: Element): boolean;
2
+ export declare function mirrorKey(key: string, rtl: boolean): string;
@@ -17,13 +17,17 @@ export type Pos = {
17
17
  index: number;
18
18
  size: number;
19
19
  };
20
- export declare const posAttrs: (pos: Pos | undefined) => string;
20
+ export declare const posAttrMap: (pos: Pos | undefined) => Record<string, string>;
21
+ /** The string that stands for a list of drawn nodes, so an unchanged list compares equal to the last draw. */
22
+ export declare const nodesSignature: (nodes: readonly Node[]) => string;
21
23
  export type WindowView = {
22
24
  options: SelectOption[];
23
25
  query: string;
24
26
  rows: SelectOption[];
25
- pre: string;
26
- post: string;
27
+ pre: Node[];
28
+ post: Node[];
29
+ preSig: string;
30
+ postSig: string;
27
31
  picked: Set<string>;
28
32
  top: ActionRow[];
29
33
  recent: SelectOption[];
@@ -40,6 +44,7 @@ export type WindowImpl = {
40
44
  clear(listEl: HTMLElement): void;
41
45
  };
42
46
  export declare function registerWindowImpl(impl: WindowImpl | undefined): void;
47
+ export declare function clearOptions(listEl: HTMLElement): void;
43
48
  /**
44
49
  * Draws the listbox. Rows are filtered by `query`; a part that owns filtering passes "" and its own rows.
45
50
  * The empty row shows when no option row or action row is drawn, or when status is "empty"; the loading
@@ -84,5 +89,5 @@ export declare function rowIndexOfValue(listEl: HTMLElement, values: readonly st
84
89
  * The first row of a listbox whose text starts with `prefix` (lower case); -1 for none.
85
90
  */
86
91
  export declare function rowIndexByPrefix(listEl: HTMLElement, prefix: string): number;
87
- export declare function optionRow(o: SelectOption, id: string, sel: boolean, pos?: Pos): string;
92
+ export declare function optionRow(o: SelectOption, id: string, sel: boolean, pos?: Pos): HTMLElement;
88
93
  export {};
@@ -1,9 +1,10 @@
1
1
  export { createDiscardPrompt, DISCARD_EVENT, initDrawerDiscard } from "./drawerDiscard.ts";
2
2
  export { closeRemotePane, initRemoteModals, loadRemoteDrawer, loadRemoteModal, loadRemotePane } from "./remoteModal.ts";
3
3
  export { CONFIRM_DIALOG_ID, CONFIRM_TONES, confirmAction, FLASH_STORAGE_KEY, FLASH_VARIANTS, initServerActions, } from "./serverActions.ts";
4
+ export { parseServerHtml } from "./serverHtml.ts";
4
5
  export { getServerTable, initServerTables } from "./serverTable.ts";
5
6
  export { getShell, initShellParts } from "./shellParts.ts";
6
7
  export { runToastAction, showResultToast, TOAST_ACTION_MS } from "./toastAction.ts";
7
8
  export { parseToastAction, TOAST_ACTION_METHODS } from "./toastHeader.ts";
8
9
  export { formValues, initUnsavedChanges, resetUnsavedChanges } from "./unsavedChanges.ts";
9
- export { CSRF_META_NAME, classifyStatus, configureCsrf, createRequestQueue, DEFAULT_CSRF_HEADER, HTTP_KINDS, readCsrf, WUI_HEADERS, wuiFetch, } from "./wuiHttp.ts";
10
+ export { CSRF_META_NAME, classifyStatus, configureCsrf, createRequestQueue, DEFAULT_CSRF_HEADER, HTTP_KINDS, readCsrf, timeoutFromAttribute, WUI_HEADERS, wuiFetch, } from "./wuiHttp.ts";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Parses a fragment the app's own server rendered (a Razor partial fetched by wuiFetch) into inert nodes:
3
+ * scripts in it do not run and images do not load until a caller adopts the nodes. Never for a value a
4
+ * caller of the library supplied.
5
+ */
6
+ export declare function parseServerHtml(html: string): DocumentFragment;
@@ -10,7 +10,7 @@ export interface SaveRowOptions {
10
10
  method?: string;
11
11
  body?: BodyInit;
12
12
  key?: string | number | null;
13
- row?: HTMLTableRowElement | string;
13
+ row?: HTMLTableRowElement;
14
14
  }
15
15
  export interface ReloadOptions {
16
16
  quiet?: boolean;
@@ -31,8 +31,9 @@ export declare const WUI_HEADERS: Readonly<{
31
31
  * client: any other 4xx. server: 5xx. network: no answer at all. aborted: the caller (or a newer
32
32
  * request on the same queue) cancelled it. stale: answered, but a newer request on the same queue
33
33
  * started meanwhile. session: the sign-in expired and the browser is being sent to sign in.
34
+ * timeout: no answer within the time limit; a caller's or newer request's abort is still aborted.
34
35
  */
35
- export type HttpKind = "ok" | "validation" | "forbidden" | "client" | "server" | "network" | "aborted" | "stale" | "session";
36
+ export type HttpKind = "ok" | "validation" | "forbidden" | "client" | "server" | "network" | "timeout" | "aborted" | "stale" | "session";
36
37
  export declare const HTTP_KINDS: readonly HttpKind[];
37
38
  export interface WuiToastAction {
38
39
  label: string;
@@ -44,6 +45,8 @@ export interface WuiFetchOptions {
44
45
  body?: BodyInit | undefined;
45
46
  headers?: Record<string, string> | undefined;
46
47
  signal?: AbortSignal | undefined;
48
+ /** Milliseconds for the answer and its body. Undefined or 0 means no limit; the named surfaces pass DEFAULT_TIMEOUT_MS. */
49
+ timeoutMs?: number | undefined;
47
50
  /** Replaces the session-expiry navigation (tests, or a host that wants to show a "signed out" notice first). */
48
51
  navigate?: ((url: string) => void) | undefined;
49
52
  }
@@ -74,6 +77,10 @@ export declare function readCsrf(doc?: Document): {
74
77
  } | null;
75
78
  /** Classify a status code. Exported so a caller holding a raw Response applies the same rule. */
76
79
  export declare function classifyStatus(status: number): HttpKind;
80
+ /** The answer time limit the modal, drawer, form, table and post surfaces apply; other callers stay unlimited. */
81
+ export declare const DEFAULT_TIMEOUT_MS = 30000;
82
+ /** The `data-wui-timeout` attribute value (milliseconds); anything that is not a whole number reads as no value. */
83
+ export declare function timeoutFromAttribute(value: string | null): number | undefined;
77
84
  /**
78
85
  * Fetch `url` and settle as a classified result; never rejects for an HTTP or network failure; it rejects with a TypeError when an answer's Wui-Data header is not JSON (a server defect).
79
86
  */
@@ -0,0 +1,7 @@
1
+ import type { Attrs } from "./dom.ts";
2
+ export type SvgTag = "g" | "path" | "rect" | "circle" | "ellipse" | "line" | "polyline" | "polygon" | "defs" | "linearGradient" | "stop" | "text" | "clipPath";
3
+ export type SvgNode = readonly [tag: Exclude<SvgTag, "text">, attrs: Readonly<Record<string, string>>, children?: readonly SvgNode[]] | readonly [tag: "text", attrs: Readonly<Record<string, string>>, content?: string];
4
+ /** The SVG elements for a node list, in the SVG namespace. */
5
+ export declare function svgNodes(nodes: readonly SvgNode[]): SVGElement[];
6
+ /** An <svg> root with `attrs` set in key order and `nodes` as its children. */
7
+ export declare function svgRoot(attrs: Attrs, nodes: readonly SvgNode[]): SVGSVGElement;
@@ -0,0 +1,9 @@
1
+ export type TableExportFormat = "csv" | "xlsx";
2
+ type Cell = string | null | undefined;
3
+ /** CSV with a UTF-8 byte order mark (so Excel reads the text as UTF-8) and CRLF line ends. */
4
+ export declare function tableCsv(head: readonly string[], rows: readonly (readonly Cell[])[]): string;
5
+ /** A .xlsx workbook: one sheet named Sheet1, text cells only, stored in a zip with no compression. */
6
+ export declare function tableXlsx(head: readonly string[], rows: readonly (readonly Cell[])[]): Uint8Array<ArrayBuffer>;
7
+ /** Saves the parts as a file: a link to a blob URL, clicked, then released. */
8
+ export declare function downloadTable(parts: BlobPart[], type: string, name: string): void;
9
+ export {};
@@ -0,0 +1,4 @@
1
+ import type * as TableExport from "./tableExport.ts";
2
+ export type TableExportWriters = typeof TableExport;
3
+ /** Resolves to the CSV and Excel writers. */
4
+ export declare function loadTableExport(): Promise<TableExportWriters>;
@@ -18,6 +18,7 @@ export type ChartText = {
18
18
  readonly columnFallbackLabel: string;
19
19
  readonly columnXLabel: string;
20
20
  readonly constantSpanText: string;
21
+ readonly currencyFormatText: string;
21
22
  readonly dataSuffixLabel: string;
22
23
  readonly dateLabel: string;
23
24
  readonly donutChartLabel: string;
@@ -5,6 +5,7 @@ export type ConfirmDialogText = {
5
5
  readonly failedMessage: string;
6
6
  readonly forbiddenMessage: string;
7
7
  readonly networkMessage: string;
8
+ readonly timeoutMessage: string;
8
9
  readonly typePhraseLabel: string;
9
10
  };
10
11
  export declare const CONFIRM_DIALOG_TEXT: ConfirmDialogText;