@ticatec/uniface-element 5.0.4 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (411) hide show
  1. package/README.md +14 -13
  2. package/README_CN.md +17 -15
  3. package/dist/app_layout/ColumnsLayout.svelte +14 -10
  4. package/dist/app_layout/ColumnsLayout.svelte.d.ts +8 -4
  5. package/dist/app_layout/README.md +14 -12
  6. package/dist/app_layout/README_CN.md +14 -12
  7. package/dist/app_layout/RowsLayout.svelte +14 -10
  8. package/dist/app_layout/RowsLayout.svelte.d.ts +8 -4
  9. package/dist/base-calendar/CalendarBase.svelte +4 -10
  10. package/dist/base-calendar/CalendarBase.svelte.d.ts +0 -4
  11. package/dist/base-calendar/DateContext.d.ts +1 -0
  12. package/dist/base-calendar/DateContext.js +5 -8
  13. package/dist/base-calendar/MonthlyCalendar.svelte +11 -3
  14. package/dist/base-calendar/MonthlyCalendar.svelte.d.ts +1 -2
  15. package/dist/base-calendar/YearPickupPanel.svelte +5 -5
  16. package/dist/base-calendar/YearPickupPanel.svelte.d.ts +2 -2
  17. package/dist/base-calendar/dateUtils.js +9 -5
  18. package/dist/composite/pagination_panel/PaginationPanel.svelte +19 -13
  19. package/dist/composite/pagination_panel/PaginationPanel.svelte.d.ts +8 -5
  20. package/dist/composite/pagination_panel/README.md +3 -1
  21. package/dist/composite/pagination_panel/README_CN.md +3 -1
  22. package/dist/composite/transfer/Transfer.svelte +30 -16
  23. package/dist/composite/transfer/Transfer.svelte.d.ts +11 -4
  24. package/dist/composite/transfer/index.d.ts +2 -2
  25. package/dist/data_display/accordion/Accordion.svelte +10 -9
  26. package/dist/data_display/accordion/Accordion.svelte.d.ts +2 -1
  27. package/dist/data_display/accordion/AccordionItemView.svelte +6 -6
  28. package/dist/data_display/accordion/AccordionItemView.svelte.d.ts +1 -1
  29. package/dist/data_display/accordion/README.md +6 -4
  30. package/dist/data_display/accordion/README_CN.md +6 -4
  31. package/dist/data_display/card/Card.svelte +13 -11
  32. package/dist/data_display/card/Card.svelte.d.ts +5 -3
  33. package/dist/data_display/card/CardAction.d.ts +7 -2
  34. package/dist/data_display/card/CommonCardActionBar.svelte +2 -2
  35. package/dist/data_display/card/README.md +11 -9
  36. package/dist/data_display/card/README_CN.md +11 -9
  37. package/dist/data_display/card/index.d.ts +2 -1
  38. package/dist/data_display/concise_data_table/Column.d.ts +0 -6
  39. package/dist/data_display/concise_data_table/ConciseListTable.svelte +6 -5
  40. package/dist/data_display/concise_data_table/ConciseListTable.svelte.d.ts +4 -3
  41. package/dist/data_display/concise_data_table/DataCell.svelte +1 -1
  42. package/dist/data_display/concise_data_table/README.md +7 -5
  43. package/dist/data_display/concise_data_table/README_CN.md +7 -5
  44. package/dist/data_display/concise_data_table/TableOptions.d.ts +1 -1
  45. package/dist/data_display/list_box/ListBox.svelte +11 -15
  46. package/dist/data_display/list_box/ListBox.svelte.d.ts +6 -9
  47. package/dist/data_display/list_box/README.md +10 -8
  48. package/dist/data_display/list_box/README_CN.md +10 -8
  49. package/dist/data_display/list_box/index.d.ts +2 -3
  50. package/dist/data_display/tree_view/README.md +4 -2
  51. package/dist/data_display/tree_view/README_CN.md +4 -2
  52. package/dist/data_display/tree_view/TreeNodeView.svelte +15 -16
  53. package/dist/data_display/tree_view/TreeNodeView.svelte.d.ts +4 -5
  54. package/dist/data_display/tree_view/TreeView.svelte +27 -19
  55. package/dist/data_display/tree_view/TreeView.svelte.d.ts +12 -4
  56. package/dist/data_display/tree_view/index.d.ts +2 -3
  57. package/dist/data_table/DataTable.svelte +46 -15
  58. package/dist/data_table/DataTable.svelte.d.ts +9 -1
  59. package/dist/data_table/README.md +10 -8
  60. package/dist/data_table/README_CN.md +10 -8
  61. package/dist/data_table/UniDataTable.d.ts +4 -4
  62. package/dist/data_table/UniDataTable.js +2 -2
  63. package/dist/data_table/index.d.ts +5 -5
  64. package/dist/data_table/lib/CellAction.d.ts +9 -0
  65. package/dist/data_table/lib/CommonHeaderCell.d.ts +2 -2
  66. package/dist/data_table/lib/CompareFn.d.ts +3 -0
  67. package/dist/data_table/lib/DataColumn.d.ts +7 -12
  68. package/dist/data_table/lib/FormatCellFn.d.ts +2 -0
  69. package/dist/data_table/lib/HrefLink.d.ts +3 -3
  70. package/dist/data_table/lib/IndicatorColumn.d.ts +2 -1
  71. package/dist/data_table/lib/RowAction.d.ts +14 -20
  72. package/dist/data_table/lib/virtualWindow.d.ts +37 -0
  73. package/dist/data_table/lib/virtualWindow.js +41 -0
  74. package/dist/data_table/parts/ActionCell.svelte +3 -3
  75. package/dist/data_table/parts/ActionCell.svelte.d.ts +1 -1
  76. package/dist/data_table/parts/ActionsPanel.svelte +17 -2
  77. package/dist/data_table/parts/ActionsPanel.svelte.d.ts +3 -0
  78. package/dist/data_table/parts/ActionsRow.svelte +7 -5
  79. package/dist/data_table/parts/ContentPanel.svelte +40 -15
  80. package/dist/data_table/parts/ContentPanel.svelte.d.ts +11 -6
  81. package/dist/data_table/parts/FixedColumnsPanel.svelte +32 -16
  82. package/dist/data_table/parts/FixedColumnsPanel.svelte.d.ts +8 -5
  83. package/dist/data_table/parts/FixedHeaderPanel.svelte +14 -15
  84. package/dist/data_table/parts/FixedHeaderPanel.svelte.d.ts +4 -4
  85. package/dist/data_table/parts/FixedRow.svelte +9 -9
  86. package/dist/data_table/parts/FixedRow.svelte.d.ts +3 -3
  87. package/dist/data_table/parts/HrefCell.svelte +1 -1
  88. package/dist/data_table/parts/PopupMenu.svelte +3 -3
  89. package/dist/data_table/parts/PopupMenu.svelte.d.ts +1 -1
  90. package/dist/data_table/parts/TableHeaderPanel.svelte +14 -14
  91. package/dist/data_table/parts/TableHeaderPanel.svelte.d.ts +4 -4
  92. package/dist/data_table/parts/TextCell.svelte +1 -1
  93. package/dist/feedback/progress-bar/ProgressBar.svelte +13 -10
  94. package/dist/feedback/progress-bar/ProgressBar.svelte.d.ts +6 -3
  95. package/dist/form/FormEditor.svelte +2 -2
  96. package/dist/form/FormEditor.svelte.d.ts +1 -1
  97. package/dist/form/attachment_files/AttachmentEditor.svelte +407 -92
  98. package/dist/form/attachment_files/AttachmentEditor.svelte.d.ts +71 -15
  99. package/dist/form/attachment_files/AttachmentFile.d.ts +35 -8
  100. package/dist/form/attachment_files/AttachmentFile.js +54 -29
  101. package/dist/form/attachment_files/AttachmentListItem.svelte +208 -0
  102. package/dist/form/attachment_files/AttachmentListItem.svelte.d.ts +25 -0
  103. package/dist/form/attachment_files/AttachmentTile.svelte +296 -0
  104. package/dist/form/attachment_files/AttachmentTile.svelte.d.ts +25 -0
  105. package/dist/form/attachment_files/FileUpload.d.ts +2 -2
  106. package/dist/form/attachment_files/README.md +71 -452
  107. package/dist/form/attachment_files/README_CN.md +68 -449
  108. package/dist/form/attachment_files/UploadTask.d.ts +27 -0
  109. package/dist/form/attachment_files/index.d.ts +8 -5
  110. package/dist/form/attachment_files/index.js +4 -2
  111. package/dist/form/cascade_options_select/CascadeOptionSelect.svelte +16 -15
  112. package/dist/form/cascade_options_select/CascadeOptionSelect.svelte.d.ts +6 -5
  113. package/dist/form/cascade_options_select/IsLeaf.d.ts +4 -0
  114. package/dist/form/cascade_options_select/IsLeaf.js +1 -0
  115. package/dist/form/cascade_options_select/OptionsBox.svelte +4 -4
  116. package/dist/form/cascade_options_select/OptionsBox.svelte.d.ts +2 -2
  117. package/dist/form/color_picker/ColorPicker.svelte +3 -3
  118. package/dist/form/color_picker/ColorPickerPanel.svelte +1 -1
  119. package/dist/form/common_editor/BasePicker.svelte +7 -7
  120. package/dist/form/common_editor/BasePicker.svelte.d.ts +3 -3
  121. package/dist/form/common_editor/CommonEditor.svelte +8 -8
  122. package/dist/form/common_editor/CommonEditor.svelte.d.ts +2 -2
  123. package/dist/form/common_editor/CommonPicker.svelte +43 -31
  124. package/dist/form/common_editor/CommonPicker.svelte.d.ts +6 -6
  125. package/dist/form/common_editor/CommonPickerProps.d.ts +2 -2
  126. package/dist/form/common_editor/CommonPopupEditor.svelte +13 -13
  127. package/dist/form/common_editor/CommonPopupEditor.svelte.d.ts +3 -4
  128. package/dist/form/common_editor/NumberInput.svelte +10 -2
  129. package/dist/form/common_editor/NumberInput.svelte.d.ts +1 -1
  130. package/dist/form/common_range_editor/CommonRangeEditor.svelte +17 -17
  131. package/dist/form/common_range_editor/CommonRangeEditor.svelte.d.ts +5 -5
  132. package/dist/form/date_picker/DatePicker.svelte +5 -5
  133. package/dist/form/date_picker/DatePicker.svelte.d.ts +1 -1
  134. package/dist/form/date_picker/DateTimePicker.svelte +16 -6
  135. package/dist/form/date_picker/README.md +7 -5
  136. package/dist/form/date_picker/README_CN.md +7 -5
  137. package/dist/form/date_picker/ScrollBar.svelte +21 -20
  138. package/dist/form/date_picker/ScrollBar.svelte.d.ts +3 -3
  139. package/dist/form/date_range/DateRangeEditor.svelte +6 -6
  140. package/dist/form/events.d.ts +70 -0
  141. package/dist/form/events.js +6 -0
  142. package/dist/form/group_box/group-check-box/GroupCheckBox.svelte +9 -7
  143. package/dist/form/group_box/group-check-box/GroupCheckBox.svelte.d.ts +4 -3
  144. package/dist/form/group_box/group-check-box/README.md +5 -3
  145. package/dist/form/group_box/group-check-box/README_CN.md +5 -3
  146. package/dist/form/group_box/group-radio-box/GroupRadioBox.svelte +9 -7
  147. package/dist/form/group_box/group-radio-box/GroupRadioBox.svelte.d.ts +4 -3
  148. package/dist/form/group_box/group-radio-box/README.md +3 -1
  149. package/dist/form/group_box/group-radio-box/README_CN.md +3 -1
  150. package/dist/form/image_editor/ImageEditor.svelte +118 -0
  151. package/dist/form/image_editor/ImageEditor.svelte.d.ts +52 -0
  152. package/dist/form/image_editor/ImageFile.d.ts +11 -0
  153. package/dist/form/image_editor/ImageFile.js +1 -0
  154. package/dist/form/{image-files → image_editor}/ImagePreview.svelte +10 -2
  155. package/dist/form/image_editor/README.md +89 -0
  156. package/dist/form/image_editor/README_CN.md +89 -0
  157. package/dist/form/image_editor/index.d.ts +11 -0
  158. package/dist/form/image_editor/index.js +4 -0
  159. package/dist/form/input_options_select/InputOptionsSelect.svelte +11 -8
  160. package/dist/form/input_options_select/InputOptionsSelect.svelte.d.ts +2 -1
  161. package/dist/form/input_options_select/README.md +44 -218
  162. package/dist/form/input_options_select/README_CN.md +38 -211
  163. package/dist/form/lookup_editor/LookupEditor.svelte +7 -10
  164. package/dist/form/lookup_editor/LookupEditor.svelte.d.ts +2 -1
  165. package/dist/form/memo_editor/MemoEditor.svelte +2 -2
  166. package/dist/form/memo_editor/MemoEditor.svelte.d.ts +1 -1
  167. package/dist/form/number_editor/NumberEditor.svelte +13 -1
  168. package/dist/form/number_editor/NumberEditor.svelte.d.ts +1 -1
  169. package/dist/form/number_range/NumberRange.svelte +5 -5
  170. package/dist/form/options_multi_select/OptionsMultiSelect.svelte +13 -13
  171. package/dist/form/options_multi_select/OptionsMultiSelect.svelte.d.ts +3 -2
  172. package/dist/form/options_multi_select/README.md +5 -3
  173. package/dist/form/options_multi_select/README_CN.md +5 -3
  174. package/dist/form/options_select/OptionsSelect.svelte +19 -15
  175. package/dist/form/options_select/OptionsSelect.svelte.d.ts +2 -1
  176. package/dist/form/options_select/README.md +9 -7
  177. package/dist/form/options_select/README_CN.md +8 -6
  178. package/dist/form/prompts_text_editor/PromptsTextEditor.svelte +6 -5
  179. package/dist/form/prompts_text_editor/PromptsTextEditor.svelte.d.ts +2 -1
  180. package/dist/form/prompts_text_editor/README.md +16 -14
  181. package/dist/form/prompts_text_editor/README_CN.md +16 -14
  182. package/dist/form/search_box/SearchBox.svelte +3 -2
  183. package/dist/form/search_box/SearchBox.svelte.d.ts +1 -1
  184. package/dist/form/switch/README.md +7 -5
  185. package/dist/form/switch/README_CN.md +7 -5
  186. package/dist/form/switch/Switch.svelte +7 -5
  187. package/dist/form/switch/Switch.svelte.d.ts +4 -2
  188. package/dist/form/text_editor/PasswordEditor.svelte +2 -2
  189. package/dist/form/text_editor/PasswordEditor.svelte.d.ts +1 -1
  190. package/dist/form/text_editor/TextEditor.svelte +6 -4
  191. package/dist/form/text_editor/TextEditor.svelte.d.ts +1 -1
  192. package/dist/form/time_editor/README.md +4 -2
  193. package/dist/form/time_editor/README_CN.md +4 -2
  194. package/dist/form/time_editor/TimeEditor.svelte +10 -7
  195. package/dist/form/time_editor/TimeEditor.svelte.d.ts +2 -1
  196. package/dist/form/types.d.ts +5 -42
  197. package/dist/form/unit-number-editor/README.md +21 -19
  198. package/dist/form/unit-number-editor/README_CN.md +21 -19
  199. package/dist/form/unit-number-editor/UnitNumberEditor.svelte +12 -11
  200. package/dist/form/unit-number-editor/UnitNumberEditor.svelte.d.ts +4 -3
  201. package/dist/general/button/Button.svelte +4 -1
  202. package/dist/general/button/Button.svelte.d.ts +3 -1
  203. package/dist/general/button/IconButton.svelte +11 -5
  204. package/dist/general/button/IconButton.svelte.d.ts +5 -2
  205. package/dist/general/button/IconButton_README.md +9 -6
  206. package/dist/general/button/IconButton_README_CN.md +9 -6
  207. package/dist/general/button/TextButton.svelte +15 -5
  208. package/dist/general/button/TextButton.svelte.d.ts +6 -2
  209. package/dist/general/button/TextButton_README.md +10 -6
  210. package/dist/general/button/TextButton_README_CN.md +10 -6
  211. package/dist/general/icon/Icon.svelte +6 -4
  212. package/dist/general/icon/Icon.svelte.d.ts +3 -2
  213. package/dist/general/tag/Tag.svelte +8 -4
  214. package/dist/general/tag/Tag.svelte.d.ts +3 -1
  215. package/dist/i18nRes/i18nRes.d.ts +45 -2
  216. package/dist/i18nRes/i18nRes.js +7 -2
  217. package/dist/layouts/action_bar/ActionBar.svelte +5 -4
  218. package/dist/layouts/action_bar/ActionBar.svelte.d.ts +2 -1
  219. package/dist/layouts/action_bar/ButtonAction.d.ts +1 -23
  220. package/dist/layouts/action_bar/README.md +20 -18
  221. package/dist/layouts/action_bar/README_CN.md +19 -17
  222. package/dist/layouts/box/Box.svelte +4 -3
  223. package/dist/layouts/box/Box.svelte.d.ts +2 -1
  224. package/dist/layouts/box/README.md +13 -11
  225. package/dist/layouts/box/README_CN.md +13 -11
  226. package/dist/layouts/form_field/FormField.svelte +5 -4
  227. package/dist/layouts/form_field/FormField.svelte.d.ts +3 -2
  228. package/dist/layouts/form_field/README.md +11 -9
  229. package/dist/layouts/form_field/README_CN.md +9 -7
  230. package/dist/layouts/form_panel/flex_row_form/Cell.svelte +3 -1
  231. package/dist/layouts/form_panel/flex_row_form/Cell.svelte.d.ts +3 -1
  232. package/dist/layouts/form_panel/flex_row_form/Row.svelte +3 -1
  233. package/dist/layouts/form_panel/flex_row_form/Row.svelte.d.ts +3 -1
  234. package/dist/layouts/form_panel/grid_form/GridField.svelte +8 -4
  235. package/dist/layouts/form_panel/grid_form/GridField.svelte.d.ts +6 -2
  236. package/dist/layouts/form_panel/grid_form/GridForm.svelte +3 -1
  237. package/dist/layouts/form_panel/grid_form/GridForm.svelte.d.ts +3 -1
  238. package/dist/layouts/form_panel/grid_form/README.md +6 -4
  239. package/dist/layouts/form_panel/grid_form/README_CN.md +6 -4
  240. package/dist/layouts/page/Page.svelte +7 -7
  241. package/dist/layouts/page/Page.svelte.d.ts +2 -2
  242. package/dist/layouts/page/PageHeader.svelte +4 -4
  243. package/dist/layouts/page/PageHeader.svelte.d.ts +1 -1
  244. package/dist/layouts/page/README.md +18 -18
  245. package/dist/layouts/page/README_CN.md +18 -18
  246. package/dist/navigation/nav_menu/MenuItem.d.ts +1 -1
  247. package/dist/navigation/nav_menu/NavigatorMenu.svelte +16 -14
  248. package/dist/navigation/nav_menu/NavigatorMenu.svelte.d.ts +7 -5
  249. package/dist/navigation/nav_menu/NavigatorMenuItem.svelte +2 -2
  250. package/dist/navigation/nav_menu/NavigatorMenuItem.svelte.d.ts +2 -2
  251. package/dist/navigation/nav_menu/README.md +8 -6
  252. package/dist/navigation/nav_menu/README_CN.md +8 -6
  253. package/dist/navigation/nav_menu/index.d.ts +2 -2
  254. package/dist/navigation/navigator/Navigator.svelte +5 -4
  255. package/dist/navigation/navigator/Navigator.svelte.d.ts +3 -2
  256. package/dist/navigation/navigator/README.md +12 -10
  257. package/dist/navigation/navigator/README_CN.md +12 -10
  258. package/dist/navigation/pagination/Pagination.svelte +23 -15
  259. package/dist/navigation/pagination/Pagination.svelte.d.ts +6 -4
  260. package/dist/navigation/progress_step_bar/ProgressStep.d.ts +2 -1
  261. package/dist/navigation/progress_step_bar/ProgressStepBar.svelte +5 -4
  262. package/dist/navigation/progress_step_bar/ProgressStepBar.svelte.d.ts +2 -1
  263. package/dist/navigation/progress_step_bar/ProgressStepBlock.svelte +3 -3
  264. package/dist/navigation/progress_step_bar/ProgressStepBlock.svelte.d.ts +1 -1
  265. package/dist/navigation/progress_step_bar/README.md +37 -35
  266. package/dist/navigation/progress_step_bar/README_CN.md +36 -34
  267. package/dist/navigation/tabs/Tabs.svelte +14 -5
  268. package/dist/navigation/tabs/Tabs.svelte.d.ts +11 -4
  269. package/dist/navigation/tabs/index.d.ts +2 -2
  270. package/dist/overlay/common/ModalPopover.svelte +5 -4
  271. package/dist/overlay/common/ModalPopover.svelte.d.ts +2 -1
  272. package/dist/overlay/common/Popover.svelte +4 -3
  273. package/dist/overlay/common/Popover.svelte.d.ts +2 -1
  274. package/dist/overlay/context-menu/ContextMenuItem.d.ts +3 -3
  275. package/dist/overlay/context-menu/ContextMenuPanel.svelte +4 -4
  276. package/dist/overlay/context-menu/index.d.ts +2 -2
  277. package/dist/overlay/dialog/CommonDialog.svelte +17 -13
  278. package/dist/overlay/dialog/CommonDialog.svelte.d.ts +9 -5
  279. package/dist/overlay/dialog/Dialog.svelte +25 -19
  280. package/dist/overlay/dialog/Dialog.svelte.d.ts +11 -5
  281. package/dist/overlay/dialog/DialogActions.d.ts +1 -1
  282. package/dist/overlay/dialog/DialogCloseConfirm.d.ts +4 -1
  283. package/dist/overlay/dialog/DialogCloseConfirm.js +1 -1
  284. package/dist/overlay/dialog/DialogManager.svelte.js +2 -1
  285. package/dist/overlay/dialog/README.md +19 -17
  286. package/dist/overlay/dialog/README_CN.md +19 -17
  287. package/dist/overlay/dialog/index.d.ts +2 -2
  288. package/dist/overlay/message-box/IMessageBox.d.ts +4 -4
  289. package/dist/overlay/message-box/MessageBox.svelte.js +3 -3
  290. package/dist/ticatec-uniface-web.css +38 -12
  291. package/dist/types.d.ts +38 -46
  292. package/dist/unifaceContext.d.ts +2 -2
  293. package/dist/utils/prefixFilter.js +0 -1
  294. package/docs/NAMING.md +362 -0
  295. package/docs/NAMING_CN.md +362 -0
  296. package/docs/components/README.md +16 -14
  297. package/docs/components/accordion/README.md +13 -2
  298. package/docs/components/accordion/example.svelte +1 -0
  299. package/docs/components/action-bar/README.md +4 -4
  300. package/docs/components/attachment-editor/README.md +224 -0
  301. package/docs/components/attachment-editor/example.svelte +22 -0
  302. package/docs/components/box/README.md +1 -1
  303. package/docs/components/button/README.md +8 -1
  304. package/docs/components/button/example.svelte +1 -0
  305. package/docs/components/card/README.md +19 -5
  306. package/docs/components/cascade-options-select/README.md +11 -5
  307. package/docs/components/columns-layout/README.md +8 -4
  308. package/docs/components/columns-layout/example.svelte +4 -0
  309. package/docs/components/common-dialog/README.md +19 -10
  310. package/docs/components/common-dialog/example.svelte +2 -1
  311. package/docs/components/concise-data-table/README.md +18 -29
  312. package/docs/components/concise-data-table/example.svelte +1 -1
  313. package/docs/components/context-menu/README.md +5 -5
  314. package/docs/components/context-menu/example.svelte +1 -1
  315. package/docs/components/criteria-field/README.md +1 -0
  316. package/docs/components/criteria-field/example.svelte +1 -0
  317. package/docs/components/data-table/README.md +63 -40
  318. package/docs/components/data-table/example.svelte +2 -2
  319. package/docs/components/date-picker/README.md +1 -1
  320. package/docs/components/date-time-picker/README.md +1 -1
  321. package/docs/components/dialog/README.md +21 -14
  322. package/docs/components/dialog/example.svelte +1 -1
  323. package/docs/components/form-field/README.md +3 -3
  324. package/docs/components/grid-form/README.md +15 -5
  325. package/docs/components/grid-form/example.svelte +1 -1
  326. package/docs/components/group-check-box/README.md +3 -3
  327. package/docs/components/group-radio-box/README.md +3 -3
  328. package/docs/components/icon/README.md +6 -5
  329. package/docs/components/icon-button/README.md +10 -1
  330. package/docs/components/icon-button/example.svelte +1 -0
  331. package/docs/components/image-editor/README.md +262 -0
  332. package/docs/components/{image-files → image-editor}/example.svelte +5 -3
  333. package/docs/components/input-options-select/README.md +2 -2
  334. package/docs/components/list-box/README.md +12 -13
  335. package/docs/components/list-box/example.svelte +3 -3
  336. package/docs/components/lookup-editor/README.md +1 -1
  337. package/docs/components/navigator/README.md +2 -1
  338. package/docs/components/navigator/example.svelte +1 -0
  339. package/docs/components/navigator-menu/README.md +24 -21
  340. package/docs/components/navigator-menu/example.svelte +4 -2
  341. package/docs/components/options-multi-select/README.md +2 -2
  342. package/docs/components/options-select/README.md +4 -4
  343. package/docs/components/page/README.md +2 -2
  344. package/docs/components/page-stack/README.md +67 -0
  345. package/docs/components/page-stack/example.svelte +7 -0
  346. package/docs/components/pagination/README.md +24 -7
  347. package/docs/components/pagination/example.svelte +5 -2
  348. package/docs/components/pagination-panel/README.md +25 -10
  349. package/docs/components/pagination-panel/example.svelte +5 -4
  350. package/docs/components/password-editor/README.md +128 -0
  351. package/docs/components/{attachment-files → password-editor}/example.svelte +5 -5
  352. package/docs/components/progress-bar/README.md +14 -4
  353. package/docs/components/progress-bar/example.svelte +1 -1
  354. package/docs/components/progress-step-bar/README.md +16 -7
  355. package/docs/components/progress-step-bar/example.svelte +5 -1
  356. package/docs/components/prompts-text-editor/README.md +8 -6
  357. package/docs/components/prompts-text-editor/example.svelte +0 -1
  358. package/docs/components/rows-layout/README.md +8 -4
  359. package/docs/components/rows-layout/example.svelte +4 -0
  360. package/docs/components/switch/README.md +2 -2
  361. package/docs/components/tabs/README.md +24 -9
  362. package/docs/components/tag/README.md +13 -2
  363. package/docs/components/tag/example.svelte +1 -0
  364. package/docs/components/text-button/README.md +20 -1
  365. package/docs/components/text-button/example.svelte +2 -0
  366. package/docs/components/time-editor/README.md +1 -1
  367. package/docs/components/transfer/README.md +16 -9
  368. package/docs/components/tree-view/README.md +29 -13
  369. package/docs/components/tree-view/example.svelte +2 -1
  370. package/docs/components/unit-number-editor/README.md +11 -8
  371. package/docs/components/unit-number-editor/example.svelte +0 -1
  372. package/package.json +13 -7
  373. package/dist/data_table/lib/CompareFunction.d.ts +0 -3
  374. package/dist/data_table/lib/FormatCell.d.ts +0 -2
  375. package/dist/form/attachment_files/FileRender.svelte +0 -125
  376. package/dist/form/attachment_files/FileRender.svelte.d.ts +0 -9
  377. package/dist/form/attachment_files/FileUploadBar.svelte +0 -66
  378. package/dist/form/attachment_files/FileUploadBar.svelte.d.ts +0 -8
  379. package/dist/form/attachment_files/FileUploadPanel.svelte +0 -161
  380. package/dist/form/attachment_files/FileUploadPanel.svelte.d.ts +0 -14
  381. package/dist/form/attachment_files/UploadFile.d.ts +0 -43
  382. package/dist/form/attachment_files/UploadFile.js +0 -80
  383. package/dist/form/cascade_options_select/CascadePanel.svelte +0 -52
  384. package/dist/form/cascade_options_select/CascadePanel.svelte.d.ts +0 -26
  385. package/dist/form/cascade_options_select/isLeafDetermine.d.ts +0 -4
  386. package/dist/form/common_editor/EditorEvents.d.ts +0 -14
  387. package/dist/form/common_editor/EditorEvents.js +0 -2
  388. package/dist/form/image-files/ImageFile.d.ts +0 -12
  389. package/dist/form/image-files/ImageFilesField.svelte +0 -128
  390. package/dist/form/image-files/ImageFilesField.svelte.d.ts +0 -18
  391. package/dist/form/image-files/ImageRender.svelte +0 -95
  392. package/dist/form/image-files/ImageRender.svelte.d.ts +0 -10
  393. package/dist/form/image-files/README.md +0 -468
  394. package/dist/form/image-files/README_CN.md +0 -468
  395. package/dist/form/image-files/index.d.ts +0 -10
  396. package/dist/form/image-files/index.js +0 -2
  397. package/dist/layout/flex/FlexBlock.svelte +0 -17
  398. package/dist/layout/flex/FlexBlock.svelte.d.ts +0 -38
  399. package/dist/layout/flex/README.md +0 -148
  400. package/dist/layout/flex/README_CN.md +0 -148
  401. package/dist/layout/flex/index.d.ts +0 -2
  402. package/dist/layout/flex/index.js +0 -2
  403. package/dist/layout/index.d.ts +0 -0
  404. package/dist/layout/index.js +0 -1
  405. package/docs/components/attachment-files/README.md +0 -332
  406. package/docs/components/image-files/README.md +0 -174
  407. /package/dist/data_table/lib/{FormatCell.js → CellAction.js} +0 -0
  408. /package/dist/data_table/lib/{CompareFunction.js → CompareFn.js} +0 -0
  409. /package/dist/{form/cascade_options_select/isLeafDetermine.js → data_table/lib/FormatCellFn.js} +0 -0
  410. /package/dist/form/{image-files/ImageFile.js → attachment_files/UploadTask.js} +0 -0
  411. /package/dist/form/{image-files → image_editor}/ImagePreview.svelte.d.ts +0 -0
package/README.md CHANGED
@@ -26,6 +26,7 @@ npm install @ticatec/uniface-element
26
26
  ## 📚 Documentation
27
27
 
28
28
  - **[Generated Component Reference](./docs/components/README.md)** - Source-derived API tables and a standalone Svelte example for every public component
29
+ - **[API Naming Guide](./docs/NAMING.md)** - Naming conventions for props, callbacks, methods and types, with the 5.0.x → 5.1.0 rename table
29
30
  - **[AI Coding Prompts Index](./assets/ai-coding/README.md)** - Category guides and a full component API matrix, meant to be handed to an AI coding assistant
30
31
  - **[中文文档](./README_CN.md)** - Chinese documentation
31
32
 
@@ -92,7 +93,7 @@ import '@ticatec/uniface-element/ticatec-uniface-web.css';
92
93
 
93
94
  ### Advanced Components
94
95
  - **Editors**: `InlineCellEditor`, `PropertyEditor`, `PromptsTextEditor`
95
- - **File Upload**: `AttachmentFiles`, `ImageFiles`
96
+ - **File Upload**: `AttachmentEditor`, `ImageEditor`
96
97
  - **Data Transfer**: `Transfer`
97
98
  - **Search**: `SearchBox`, `CriteriaField`
98
99
 
@@ -185,9 +186,9 @@ The library uses CSS custom properties for theming. You can customize the appear
185
186
 
186
187
  The library includes built-in internationalization support:
187
188
 
188
- default language is english. to load other languages:
189
+ The default language is English. Other languages are loaded dynamically at runtime, so adding a new language never requires a code change.
189
190
 
190
- create a language resource json file in the static web directory, example: `/assets/uniface_zh-CN.json`
191
+ Create a language resource json file in the static web directory, example: `/assets/uniface_zh-CN.json` (this is the complete key list):
191
192
  ```json
192
193
  {
193
194
  "uniface": {
@@ -195,7 +196,9 @@ create a language resource json file in the static web directory, example: `/ass
195
196
  "btnClose": "关闭",
196
197
  "btnCancel": "取消",
197
198
  "btnConfirm": "确定",
198
- "textMore": "加载更多"
199
+ "textMore": "加载更多",
200
+ "filterPlaceholder": "搜索...",
201
+ "noResultsText": "无匹配结果..."
199
202
  },
200
203
  "colorPicker": "选择颜色",
201
204
  "calendar": {
@@ -218,14 +221,12 @@ create a language resource json file in the static web directory, example: `/ass
218
221
  "btnRemove": "删除",
219
222
  "btnPickup": "选择文件"
220
223
  },
221
- "propertyEditor": {
222
- "colName": "属性",
223
- "colValue": "值"
224
- },
225
224
  "dataTable": {
226
225
  "rowNo": "#",
227
226
  "actions": "操作",
228
- "emptyDataSet": "暂无数据"
227
+ "emptyDataSet": "暂无数据",
228
+ "totalInfo": "共 <b>{{total}}</b> 条",
229
+ "rowsPerPage": "行/页"
229
230
  },
230
231
  "transfer": {
231
232
  "selectIndicator": "已选择: {{selected}}/{{total}}"
@@ -234,14 +235,14 @@ create a language resource json file in the static web directory, example: `/ass
234
235
  }
235
236
  ```
236
237
 
237
- You can load the resource file in the `+page.svelte` or other startup page.
238
+ Load the resource file in `+page.svelte` or another startup page:
238
239
 
239
240
  ```typescript
240
241
  import i18n, {i18nUtils} from "@ticatec/i18n";
241
242
 
242
243
  // 设置语言
243
244
  i18n.setLanguage('zh-CN'); // 或 'en'
244
- i18nUtils.loadResources('/assets/uniface.json'); //the language code will insert before .json
245
+ i18nUtils.loadResources('/assets/uniface.json'); // the language code will insert before .json => /assets/uniface_zh-CN.json
245
246
  ```
246
247
 
247
248
  ## Available Imports
@@ -252,8 +253,8 @@ i18nUtils.loadResources('/assets/uniface.json'); //the language code will insert
252
253
  import Button from '@ticatec/uniface-element/Button';
253
254
  import DataTable from '@ticatec/uniface-element/DataTable';
254
255
  import SidebarLayout from '@ticatec/uniface-element/app-layout/SidebarLayout';
255
- import AttachmentFiles from '@ticatec/uniface-element/AttachmentFiles';
256
- import ImageFiles from '@ticatec/uniface-element/ImageFiles';
256
+ import AttachmentEditor from '@ticatec/uniface-element/AttachmentEditor';
257
+ import ImageEditor from '@ticatec/uniface-element/ImageEditor';
257
258
  import MemoEditor from '@ticatec/uniface-element/MemoEditor';
258
259
 
259
260
  // Utility imports
package/README_CN.md CHANGED
@@ -26,6 +26,7 @@ npm install @ticatec/uniface-element
26
26
  ## 组件文档
27
27
 
28
28
  - **[自动生成的组件参考](./docs/components/README.md)**:覆盖全部公开组件的源码派生属性表和独立 Svelte 示例
29
+ - **[API 命名规范](./docs/NAMING_CN.md)**:属性、回调、方法、类型的命名约定,以及 5.0.x → 5.1.0 的新旧对照表
29
30
 
30
31
  ## 快速开始
31
32
 
@@ -89,7 +90,7 @@ import '@ticatec/uniface-element/ticatec-uniface-web.css';
89
90
 
90
91
  ### 高级组件
91
92
  - **编辑器**: `InlineCellEditor`、`PropertyEditor`、`PromptsTextEditor`
92
- - **文件上传**: `AttachmentFiles`、`ImageFiles`
93
+ - **文件上传**: `AttachmentEditor`、`ImageEditor`
93
94
  - **数据传输**: `Transfer`
94
95
  - **搜索组件**: `SearchBox`、`CriteriaField`
95
96
 
@@ -261,10 +262,11 @@ await messageBox.showInfo("操作完成", { title: "提示" });
261
262
 
262
263
  ## 国际化
263
264
 
264
- 组件库内置国际化支持:
265
+ 组件库内置国际化支持:
265
266
 
266
- 中文资源文件:
267
- 可以将文件放置在静态网站的目录下,比如`/assets/uniface_zh-CN.json`
267
+ 默认语言为英文。其他语言在运行时动态加载,未来新增语言无需修改代码。
268
+
269
+ 在静态资源目录下创建语言资源 json 文件,例如 `/assets/uniface_zh-CN.json`(以下为完整键列表):
268
270
  ```json
269
271
  {
270
272
  "uniface": {
@@ -272,7 +274,9 @@ await messageBox.showInfo("操作完成", { title: "提示" });
272
274
  "btnClose": "关闭",
273
275
  "btnCancel": "取消",
274
276
  "btnConfirm": "确定",
275
- "textMore": "加载更多"
277
+ "textMore": "加载更多",
278
+ "filterPlaceholder": "搜索...",
279
+ "noResultsText": "无匹配结果..."
276
280
  },
277
281
  "colorPicker": "选择颜色",
278
282
  "calendar": {
@@ -295,14 +299,12 @@ await messageBox.showInfo("操作完成", { title: "提示" });
295
299
  "btnRemove": "删除",
296
300
  "btnPickup": "选择文件"
297
301
  },
298
- "propertyEditor": {
299
- "colName": "属性",
300
- "colValue": "值"
301
- },
302
302
  "dataTable": {
303
303
  "rowNo": "#",
304
304
  "actions": "操作",
305
- "emptyDataSet": "暂无数据"
305
+ "emptyDataSet": "暂无数据",
306
+ "totalInfo": "共 <b>{{total}}</b> 条",
307
+ "rowsPerPage": "行/页"
306
308
  },
307
309
  "transfer": {
308
310
  "selectIndicator": "已选择: {{selected}}/{{total}}"
@@ -311,16 +313,16 @@ await messageBox.showInfo("操作完成", { title: "提示" });
311
313
  }
312
314
  ```
313
315
 
316
+ 在 `+page.svelte` 或其他启动页加载资源文件:
317
+
314
318
  ```typescript
315
319
  import i18n, {i18nUtils} from "@ticatec/i18n";
316
320
 
317
321
  // 设置语言
318
322
  i18n.setLanguage('zh-CN'); // 或 'en'
319
- i18nUtils.loadResources('/assets/uniface.json');
323
+ i18nUtils.loadResources('/assets/uniface.json'); // 语言代码会插入到 .json 之前 => /assets/uniface_zh-CN.json
320
324
  ```
321
325
 
322
-
323
-
324
326
  ## 可用导入
325
327
 
326
328
  ### 模块化导入
@@ -329,8 +331,8 @@ i18nUtils.loadResources('/assets/uniface.json');
329
331
  import Button from '@ticatec/uniface-element/Button';
330
332
  import DataTable from '@ticatec/uniface-element/DataTable';
331
333
  import SidebarLayout from '@ticatec/uniface-element/app-layout/SidebarLayout';
332
- import AttachmentFilesField from '@ticatec/uniface-element/AttachmentFiles';
333
- import ImageFilesField from '@ticatec/uniface-element/ImageFiles';
334
+ import AttachmentEditor from '@ticatec/uniface-element/AttachmentEditor';
335
+ import ImageEditor from '@ticatec/uniface-element/ImageEditor';
334
336
  import MemoEditor from '@ticatec/uniface-element/MemoEditor';
335
337
 
336
338
  // 工具导入
@@ -7,10 +7,14 @@
7
7
  height?: string;
8
8
  leftWidth?: string | null;
9
9
  rightWidth?: string | null;
10
- leftMin?: string | null;
11
- leftMax?: string | null;
12
- rightMin?: string | null;
13
- rightMax?: string | null;
10
+ /** 左栏最小宽度(CSS 长度) */
11
+ leftMinWidth?: string | null;
12
+ /** 左栏最大宽度(CSS 长度) */
13
+ leftMaxWidth?: string | null;
14
+ /** 右栏最小宽度(CSS 长度) */
15
+ rightMinWidth?: string | null;
16
+ /** 右栏最大宽度(CSS 长度) */
17
+ rightMaxWidth?: string | null;
14
18
  leftResize?: boolean;
15
19
  rightResize?: boolean;
16
20
  left?: Snippet;
@@ -23,10 +27,10 @@
23
27
  height = '100%',
24
28
  leftWidth = null,
25
29
  rightWidth = null,
26
- leftMin = null,
27
- leftMax = null,
28
- rightMin = null,
29
- rightMax = null,
30
+ leftMinWidth = null,
31
+ leftMaxWidth = null,
32
+ rightMinWidth = null,
33
+ rightMaxWidth = null,
30
34
  leftResize = false,
31
35
  rightResize = false,
32
36
  left,
@@ -43,8 +47,8 @@
43
47
  return v ? `${attr}: ${v};` : ''
44
48
  }
45
49
 
46
- let leftStyle = $derived(`${generateStyle('min-width', leftMin)} ${generateStyle('max-width', leftMax)} ${generateStyle('width', leftWidth ?? colWidth)}`);
47
- let rightStyle = $derived(`${generateStyle('min-width', rightMin)} ${generateStyle('max-width', rightMax)} ${generateStyle('width', rightWidth ?? colWidth)}`);
50
+ let leftStyle = $derived(`${generateStyle('min-width', leftMinWidth)} ${generateStyle('max-width', leftMaxWidth)} ${generateStyle('width', leftWidth ?? colWidth)}`);
51
+ let rightStyle = $derived(`${generateStyle('min-width', rightMinWidth)} ${generateStyle('max-width', rightMaxWidth)} ${generateStyle('width', rightWidth ?? colWidth)}`);
48
52
  </script>
49
53
 
50
54
  <div class="uniface-columns-layout" style="width: {width}; height: {height}">
@@ -4,10 +4,14 @@ interface Props {
4
4
  height?: string;
5
5
  leftWidth?: string | null;
6
6
  rightWidth?: string | null;
7
- leftMin?: string | null;
8
- leftMax?: string | null;
9
- rightMin?: string | null;
10
- rightMax?: string | null;
7
+ /** 左栏最小宽度(CSS 长度) */
8
+ leftMinWidth?: string | null;
9
+ /** 左栏最大宽度(CSS 长度) */
10
+ leftMaxWidth?: string | null;
11
+ /** 右栏最小宽度(CSS 长度) */
12
+ rightMinWidth?: string | null;
13
+ /** 右栏最大宽度(CSS 长度) */
14
+ rightMaxWidth?: string | null;
11
15
  leftResize?: boolean;
12
16
  rightResize?: boolean;
13
17
  left?: Snippet;
@@ -1,5 +1,7 @@
1
1
  # App Layout Components
2
2
 
3
+ > **Renamed in 5.1.0**: this document uses the names from the [API Naming Guide](../../docs/NAMING.md); the old names `bottomMax`, `bottomMin`, `leftMax`, `leftMin`, `rightMax`, `rightMin`, `topMax`, `topMin` were removed in 5.1.0 (no compatibility aliases are kept).
4
+
3
5
  A collection of flexible layout components for building application interfaces with headers, sidebars, and resizable panels.
4
6
 
5
7
  All components target **Svelte 5** and use the snippet API (`{#snippet ...}` / `{@render ...}`). Default content is passed as `children` (the implicit body of the component).
@@ -199,10 +201,10 @@ Three-column horizontal layout: left + center + right. Center fills remaining sp
199
201
  | `height` | `string` | `'100%'` | Total layout height |
200
202
  | `leftWidth` | `string \| null` | `null` | Left column width (falls back to `25%` / `50%`) |
201
203
  | `rightWidth` | `string \| null` | `null` | Right column width (falls back to `25%` / `50%`) |
202
- | `leftMin` | `string \| null` | `null` | Left column min-width |
203
- | `leftMax` | `string \| null` | `null` | Left column max-width |
204
- | `rightMin` | `string \| null` | `null` | Right column min-width |
205
- | `rightMax` | `string \| null` | `null` | Right column max-width |
204
+ | `leftMinWidth` | `string \| null` | `null` | Left column min-width |
205
+ | `leftMaxWidth` | `string \| null` | `null` | Left column max-width |
206
+ | `rightMinWidth` | `string \| null` | `null` | Right column min-width |
207
+ | `rightMaxWidth` | `string \| null` | `null` | Right column max-width |
206
208
  | `leftResize` | `boolean` | `false` | Enable left column resizing |
207
209
  | `rightResize` | `boolean` | `false` | Enable right column resizing |
208
210
 
@@ -222,8 +224,8 @@ Three-column horizontal layout: left + center + right. Center fills remaining sp
222
224
  rightResize={true}
223
225
  leftWidth="200px"
224
226
  rightWidth="300px"
225
- leftMin="150px"
226
- rightMin="250px"
227
+ leftMinWidth="150px"
228
+ rightMinWidth="250px"
227
229
  >
228
230
  {#snippet left()}
229
231
  <!-- Left panel -->
@@ -252,10 +254,10 @@ Three-row vertical layout: top + center + bottom. Center fills remaining space;
252
254
  | `height` | `string` | `'100%'` | Total layout height |
253
255
  | `topHeight` | `string \| null` | `null` | Top row height (falls back to `25%` / `50%`) |
254
256
  | `bottomHeight` | `string \| null` | `null` | Bottom row height (falls back to `25%` / `50%`) |
255
- | `topMin` | `string \| null` | `null` | Top row min-height |
256
- | `topMax` | `string \| null` | `null` | Top row max-height |
257
- | `bottomMin` | `string \| null` | `null` | Bottom row min-height |
258
- | `bottomMax` | `string \| null` | `null` | Bottom row max-height |
257
+ | `topMinHeight` | `string \| null` | `null` | Top row min-height |
258
+ | `topMaxHeight` | `string \| null` | `null` | Top row max-height |
259
+ | `bottomMinHeight` | `string \| null` | `null` | Bottom row min-height |
260
+ | `bottomMaxHeight` | `string \| null` | `null` | Bottom row max-height |
259
261
  | `topResize` | `boolean` | `false` | Enable top row resizing |
260
262
  | `bottomResize` | `boolean` | `false` | Enable bottom row resizing |
261
263
 
@@ -275,8 +277,8 @@ Three-row vertical layout: top + center + bottom. Center fills remaining space;
275
277
  bottomResize={true}
276
278
  topHeight="150px"
277
279
  bottomHeight="100px"
278
- topMin="100px"
279
- bottomMin="80px"
280
+ topMinHeight="100px"
281
+ bottomMinHeight="80px"
280
282
  >
281
283
  {#snippet top()}
282
284
  <!-- Top panel -->
@@ -1,5 +1,7 @@
1
1
  # 应用布局组件
2
2
 
3
+ > **5.1.0 重命名**:本文使用 [API 命名规范](../../docs/NAMING_CN.md) 中的名字;旧名 `bottomMax`, `bottomMin`, `leftMax`, `leftMin`, `rightMax`, `rightMin`, `topMax`, `topMin` 已在 5.1.0 移除(5.1.0 不保留兼容别名)。
4
+
3
5
  一套灵活的布局组件,用于构建带有标题栏、侧边栏和可调整面板的应用程序界面。
4
6
 
5
7
  所有组件基于 **Svelte 5**,使用 snippet API(`{#snippet ...}` / `{@render ...}`)。默认内容通过 `children` snippet 传入(即组件标签内直接写的内容)。
@@ -199,10 +201,10 @@ npm install @ticatec/uniface-element
199
201
  | `height` | `string` | `"100%"` | 布局总高度 |
200
202
  | `leftWidth` | `string \| null` | `null` | 左列宽度(缺省回退到 `25%` / `50%`) |
201
203
  | `rightWidth` | `string \| null` | `null` | 右列宽度(缺省回退到 `25%` / `50%`) |
202
- | `leftMin` | `string \| null` | `null` | 左列最小宽度 |
203
- | `leftMax` | `string \| null` | `null` | 左列最大宽度 |
204
- | `rightMin` | `string \| null` | `null` | 右列最小宽度 |
205
- | `rightMax` | `string \| null` | `null` | 右列最大宽度 |
204
+ | `leftMinWidth` | `string \| null` | `null` | 左列最小宽度 |
205
+ | `leftMaxWidth` | `string \| null` | `null` | 左列最大宽度 |
206
+ | `rightMinWidth` | `string \| null` | `null` | 右列最小宽度 |
207
+ | `rightMaxWidth` | `string \| null` | `null` | 右列最大宽度 |
206
208
  | `leftResize` | `boolean` | `false` | 启用左列调整大小 |
207
209
  | `rightResize` | `boolean` | `false` | 启用右列调整大小 |
208
210
 
@@ -222,8 +224,8 @@ npm install @ticatec/uniface-element
222
224
  rightResize={true}
223
225
  leftWidth="200px"
224
226
  rightWidth="300px"
225
- leftMin="150px"
226
- rightMin="250px"
227
+ leftMinWidth="150px"
228
+ rightMinWidth="250px"
227
229
  >
228
230
  {#snippet left()}
229
231
  <!-- 左面板 -->
@@ -252,10 +254,10 @@ npm install @ticatec/uniface-element
252
254
  | `height` | `string` | `"100%"` | 布局总高度 |
253
255
  | `topHeight` | `string \| null` | `null` | 顶部行高度(缺省回退到 `25%` / `50%`) |
254
256
  | `bottomHeight` | `string \| null` | `null` | 底部行高度(缺省回退到 `25%` / `50%`) |
255
- | `topMin` | `string \| null` | `null` | 顶部行最小高度 |
256
- | `topMax` | `string \| null` | `null` | 顶部行最大高度 |
257
- | `bottomMin` | `string \| null` | `null` | 底部行最小高度 |
258
- | `bottomMax` | `string \| null` | `null` | 底部行最大高度 |
257
+ | `topMinHeight` | `string \| null` | `null` | 顶部行最小高度 |
258
+ | `topMaxHeight` | `string \| null` | `null` | 顶部行最大高度 |
259
+ | `bottomMinHeight` | `string \| null` | `null` | 底部行最小高度 |
260
+ | `bottomMaxHeight` | `string \| null` | `null` | 底部行最大高度 |
259
261
  | `topResize` | `boolean` | `false` | 启用顶部行调整大小 |
260
262
  | `bottomResize` | `boolean` | `false` | 启用底部行调整大小 |
261
263
 
@@ -275,8 +277,8 @@ npm install @ticatec/uniface-element
275
277
  bottomResize={true}
276
278
  topHeight="150px"
277
279
  bottomHeight="100px"
278
- topMin="100px"
279
- bottomMin="80px"
280
+ topMinHeight="100px"
281
+ bottomMinHeight="80px"
280
282
  >
281
283
  {#snippet top()}
282
284
  <!-- 顶部面板 -->
@@ -7,10 +7,14 @@
7
7
  height?: string;
8
8
  topHeight?: string | null;
9
9
  bottomHeight?: string | null;
10
- topMin?: string | null;
11
- topMax?: string | null;
12
- bottomMin?: string | null;
13
- bottomMax?: string | null;
10
+ /** 上栏最小高度(CSS 长度) */
11
+ topMinHeight?: string | null;
12
+ /** 上栏最大高度(CSS 长度) */
13
+ topMaxHeight?: string | null;
14
+ /** 下栏最小高度(CSS 长度) */
15
+ bottomMinHeight?: string | null;
16
+ /** 下栏最大高度(CSS 长度) */
17
+ bottomMaxHeight?: string | null;
14
18
  topResize?: boolean;
15
19
  bottomResize?: boolean;
16
20
  top?: Snippet;
@@ -23,10 +27,10 @@
23
27
  height = '100%',
24
28
  topHeight = null,
25
29
  bottomHeight = null,
26
- topMin = null,
27
- topMax = null,
28
- bottomMin = null,
29
- bottomMax = null,
30
+ topMinHeight = null,
31
+ topMaxHeight = null,
32
+ bottomMinHeight = null,
33
+ bottomMaxHeight = null,
30
34
  topResize = false,
31
35
  bottomResize = false,
32
36
  top,
@@ -43,8 +47,8 @@
43
47
  return v ? `${attr}: ${v};` : ''
44
48
  }
45
49
 
46
- let topStyle = $derived(`${generateStyle('min-height', topMin)} ${generateStyle('max-height', topMax)} ${generateStyle('height', topHeight ?? rowHeight)}`);
47
- let bottomStyle = $derived(`${generateStyle('min-height', bottomMin)} ${generateStyle('max-height', bottomMax)} ${generateStyle('height', bottomHeight ?? rowHeight)}`);
50
+ let topStyle = $derived(`${generateStyle('min-height', topMinHeight)} ${generateStyle('max-height', topMaxHeight)} ${generateStyle('height', topHeight ?? rowHeight)}`);
51
+ let bottomStyle = $derived(`${generateStyle('min-height', bottomMinHeight)} ${generateStyle('max-height', bottomMaxHeight)} ${generateStyle('height', bottomHeight ?? rowHeight)}`);
48
52
  </script>
49
53
 
50
54
  <div class="uniface-rows-layout" style="width: {width}; height: {height}">
@@ -4,10 +4,14 @@ interface Props {
4
4
  height?: string;
5
5
  topHeight?: string | null;
6
6
  bottomHeight?: string | null;
7
- topMin?: string | null;
8
- topMax?: string | null;
9
- bottomMin?: string | null;
10
- bottomMax?: string | null;
7
+ /** 上栏最小高度(CSS 长度) */
8
+ topMinHeight?: string | null;
9
+ /** 上栏最大高度(CSS 长度) */
10
+ topMaxHeight?: string | null;
11
+ /** 下栏最小高度(CSS 长度) */
12
+ bottomMinHeight?: string | null;
13
+ /** 下栏最大高度(CSS 长度) */
14
+ bottomMaxHeight?: string | null;
11
15
  topResize?: boolean;
12
16
  bottomResize?: boolean;
13
17
  top?: Snippet;
@@ -15,10 +15,6 @@
15
15
  cellHeight?: number;
16
16
  border?: boolean;
17
17
  onchange?: (value: dayjs.Dayjs) => void;
18
- /**
19
- * @deprecated 请使用 onchange;仍受支持以兼容旧调用。
20
- */
21
- onselect?: (value: dayjs.Dayjs) => void;
22
18
  }
23
19
 
24
20
  let {
@@ -29,8 +25,7 @@
29
25
  cellWidth = 32,
30
26
  cellHeight = 32,
31
27
  border = false,
32
- onchange,
33
- onselect
28
+ onchange
34
29
  }: Props = $props();
35
30
 
36
31
  const dateCtx = DateContext.getInstance();
@@ -60,7 +55,6 @@
60
55
 
61
56
  const onSelectDate = (d: dayjs.Dayjs) => {
62
57
  onchange?.(d);
63
- onselect?.(d);
64
58
  };
65
59
 
66
60
  const pickupMonth = () => {
@@ -113,15 +107,15 @@
113
107
  weekTitle={dateCtx.weekTitleAbbr}
114
108
  {cellWidth} {cellHeight} {border}
115
109
  min={minDate} max={maxDate}
116
- value={dv} {year} {month} {date}
110
+ value={dv} {year} {month}
117
111
  onselect={onSelectDate}/>
118
112
  {#if showMonths}
119
113
  <MonthPickupPanel bind:value={month} months={dateCtx.months}
120
114
  onclick={() => { showMonths = false; }}/>
121
115
  {:else if showYears}
122
116
  <YearPickupPanel bind:year
123
- maxYear={maxDate == null ? null : maxDate.year()}
124
- minYear={minDate == null ? null : minDate.year()}
117
+ max={maxDate == null ? null : maxDate.year()}
118
+ min={minDate == null ? null : minDate.year()}
125
119
  onclick={() => { showYears = false; }}/>
126
120
  {/if}
127
121
  </div>
@@ -9,10 +9,6 @@ interface Props {
9
9
  cellHeight?: number;
10
10
  border?: boolean;
11
11
  onchange?: (value: dayjs.Dayjs) => void;
12
- /**
13
- * @deprecated 请使用 onchange;仍受支持以兼容旧调用。
14
- */
15
- onselect?: (value: dayjs.Dayjs) => void;
16
12
  }
17
13
  declare const CalendarBase: import("svelte").Component<Props, {}, "">;
18
14
  type CalendarBase = ReturnType<typeof CalendarBase>;
@@ -1,3 +1,4 @@
1
+ import "../i18nRes";
1
2
  export default class DateContext {
2
3
  private _weekBegin;
3
4
  private _dateFmt;
@@ -1,5 +1,5 @@
1
- import i18nRes from "../i18nRes";
2
1
  import i18n from "@ticatec/i18n";
2
+ import "../i18nRes"; // side effect: seeds the uniface namespace defaults used by i18n.get() below
3
3
  export default class DateContext {
4
4
  _weekBegin = 1;
5
5
  _dateFmt = "YYYY-MM-DD";
@@ -14,19 +14,16 @@ export default class DateContext {
14
14
  return DateContext.instance;
15
15
  }
16
16
  get months() {
17
- return i18nRes.calendar.months;
17
+ return i18n.get('uniface.calendar.months');
18
18
  }
19
19
  get monthsAbbr() {
20
- return i18nRes.calendar.monthsAbbr;
21
- ;
20
+ return i18n.get('uniface.calendar.monthsAbbr');
22
21
  }
23
22
  get weekTitle() {
24
- return i18nRes.calendar.weekTitle;
25
- ;
23
+ return i18n.get('uniface.calendar.weekTitle');
26
24
  }
27
25
  get weekTitleAbbr() {
28
- return i18nRes.calendar.weekTitleAbbr;
29
- ;
26
+ return i18n.get('uniface.calendar.weekTitleAbbr');
30
27
  }
31
28
  set weekBegin(value) {
32
29
  if (value < 0 || value > 6) {
@@ -2,7 +2,7 @@
2
2
  import dateUtils, {type UniDate} from "./dateUtils";
3
3
  import DateContext from "./DateContext";
4
4
  import dayjs from "dayjs";
5
- import type {Snippet} from "svelte";
5
+ import {onDestroy, type Snippet} from "svelte";
6
6
  import type {CalendarDay} from "./CalendarDay";
7
7
 
8
8
  interface Props {
@@ -12,7 +12,6 @@
12
12
  weekBegin?: number;
13
13
  year: number;
14
14
  month: number;
15
- date: number;
16
15
  value?: UniDate;
17
16
  cellWidth: number;
18
17
  cellHeight: number;
@@ -83,11 +82,13 @@
83
82
  });
84
83
 
85
84
  let respondClick = true;
85
+ let respondTimer: any;
86
86
 
87
87
  const handleDayClick = (ad: CalendarDay) => () => {
88
88
  if (!ad.disabled && respondClick) {
89
89
  respondClick = false;
90
- setTimeout(() => {
90
+ clearTimeout(respondTimer);
91
+ respondTimer = setTimeout(() => {
91
92
  respondClick = true;
92
93
  }, 200);
93
94
  selected = {year, month, date: ad.d};
@@ -95,6 +96,13 @@
95
96
  }
96
97
  };
97
98
 
99
+ onDestroy(() => {
100
+ if (respondTimer != null) {
101
+ clearTimeout(respondTimer);
102
+ respondTimer = null;
103
+ }
104
+ });
105
+
98
106
  const handleDayKeyDown = (ad: CalendarDay) => (e: KeyboardEvent) => {
99
107
  if (e.key === 'Enter' || e.key === ' ') {
100
108
  e.preventDefault();
@@ -1,6 +1,6 @@
1
1
  import { type UniDate } from "./dateUtils";
2
2
  import dayjs from "dayjs";
3
- import type { Snippet } from "svelte";
3
+ import { type Snippet } from "svelte";
4
4
  import type { CalendarDay } from "./CalendarDay";
5
5
  interface Props {
6
6
  min?: UniDate;
@@ -9,7 +9,6 @@ interface Props {
9
9
  weekBegin?: number;
10
10
  year: number;
11
11
  month: number;
12
- date: number;
13
12
  value?: UniDate;
14
13
  cellWidth: number;
15
14
  cellHeight: number;
@@ -1,15 +1,15 @@
1
1
  <script lang="ts">
2
2
  interface Props {
3
3
  year: number;
4
- maxYear?: number | null;
5
- minYear?: number | null;
4
+ max?: number | null;
5
+ min?: number | null;
6
6
  onclick?: (event: MouseEvent) => void;
7
7
  }
8
8
 
9
9
  let {
10
10
  year = $bindable<number>(),
11
- maxYear = null,
12
- minYear = null,
11
+ max = null,
12
+ min = null,
13
13
  onclick
14
14
  }: Props = $props();
15
15
 
@@ -17,7 +17,7 @@
17
17
  const years = 12;
18
18
 
19
19
  const isDisabled = (y: number) =>
20
- (maxYear != null && y > maxYear) || (minYear != null && y < minYear);
20
+ (max != null && y > max) || (min != null && y < min);
21
21
 
22
22
  const handleYearClick = (idx: number) => (e: MouseEvent) => {
23
23
  const y = year - offset + idx;
@@ -1,7 +1,7 @@
1
1
  interface Props {
2
2
  year: number;
3
- maxYear?: number | null;
4
- minYear?: number | null;
3
+ max?: number | null;
4
+ min?: number | null;
5
5
  onclick?: (event: MouseEvent) => void;
6
6
  }
7
7
  declare const YearPickupPanel: import("svelte").Component<Props, {}, "year">;
@@ -11,24 +11,28 @@ const today = () => {
11
11
  * @param fmt
12
12
  */
13
13
  const formatDate = (d, fmt = 'YYYY-MM-DD') => {
14
- if (d == null) {
14
+ if (d == null || d === '') {
15
15
  return '';
16
16
  }
17
17
  d = dayjs.isDayjs(d) ? d : dayjs(d);
18
- return d.format(fmt);
18
+ return d.isValid() ? d.format(fmt) : '';
19
19
  };
20
20
  const formatISODate = (d) => {
21
- if (d == null) {
21
+ if (d == null || d === '') {
22
22
  return '';
23
23
  }
24
24
  d = dayjs.isDayjs(d) ? d : dayjs(d);
25
- return d.toISOString();
25
+ return d.isValid() ? d.toISOString() : '';
26
26
  };
27
27
  /**
28
28
  * 把日期,字符串转换成dayjs格式
29
29
  * @param d
30
30
  */
31
31
  const toDayjs = (d) => {
32
- return d == null ? null : dayjs.isDayjs(d) ? d : dayjs(d);
32
+ if (d == null || d === '') {
33
+ return null;
34
+ }
35
+ const res = dayjs.isDayjs(d) ? d : dayjs(d);
36
+ return res.isValid() ? res : null;
33
37
  };
34
38
  export default { today, formatDate, formatISODate, toDayjs };