@cpsoft13/z-agent-ui 0.1.0 → 0.2.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.
- package/README.md +16 -0
- package/README.zh-CN.md +16 -0
- package/bin/check-guards.mjs +2 -0
- package/bin/lines-baseline.json +1 -1
- package/bin/text-baseline.json +39 -0
- package/bin/text-guard.mjs +211 -0
- package/dist/app/app-nav/AppNav.js +34 -32
- package/dist/app/app-nav/AppNav.js.map +1 -1
- package/dist/app/app-shell/AppShell.js +17 -14
- package/dist/app/app-shell/AppShell.js.map +1 -1
- package/dist/app/app-switcher/AppSwitcher.js +14 -12
- package/dist/app/app-switcher/AppSwitcher.js.map +1 -1
- package/dist/app/detail-form/DetailForm.js +8 -5
- package/dist/app/detail-form/DetailForm.js.map +1 -1
- package/dist/app/login/Login.js +26 -23
- package/dist/app/login/Login.js.map +1 -1
- package/dist/app/print/Print.js +19 -16
- package/dist/app/print/Print.js.map +1 -1
- package/dist/app/print/snapshot.js +4 -2
- package/dist/app/print/snapshot.js.map +1 -1
- package/dist/build-info.json +3 -3
- package/dist/components/accordion/Accordion.js +17 -14
- package/dist/components/accordion/Accordion.js.map +1 -1
- package/dist/components/accordion-item/AccordionItem.js +17 -14
- package/dist/components/accordion-item/AccordionItem.js.map +1 -1
- package/dist/components/alert/Alert.js +13 -11
- package/dist/components/alert/Alert.js.map +1 -1
- package/dist/components/anchor/Anchor.js +8 -5
- package/dist/components/anchor/Anchor.js.map +1 -1
- package/dist/components/avatar/Avatar.js +15 -12
- package/dist/components/avatar/Avatar.js.map +1 -1
- package/dist/components/badge/Badge.js +16 -13
- package/dist/components/badge/Badge.js.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.js +18 -15
- package/dist/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/button/Button.js +42 -39
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/calendar/Calendar.js +34 -32
- package/dist/components/calendar/Calendar.js.map +1 -1
- package/dist/components/card/Card.js +8 -5
- package/dist/components/card/Card.js.map +1 -1
- package/dist/components/checkbox/Checkbox.js +15 -12
- package/dist/components/checkbox/Checkbox.js.map +1 -1
- package/dist/components/command/Command.js +45 -42
- package/dist/components/command/Command.js.map +1 -1
- package/dist/components/context-menu/ContextMenu.js +22 -19
- package/dist/components/context-menu/ContextMenu.js.map +1 -1
- package/dist/components/date-range/DateRange.js +17 -15
- package/dist/components/date-range/DateRange.js.map +1 -1
- package/dist/components/datepicker/Datepicker.js +57 -55
- package/dist/components/datepicker/Datepicker.js.map +1 -1
- package/dist/components/datepicker/calendar.js +6 -4
- package/dist/components/datepicker/calendar.js.map +1 -1
- package/dist/components/datepicker/time-row.js +17 -15
- package/dist/components/datepicker/time-row.js.map +1 -1
- package/dist/components/descriptions/Descriptions.js +18 -15
- package/dist/components/descriptions/Descriptions.js.map +1 -1
- package/dist/components/descriptions/DescriptionsItem.js +14 -11
- package/dist/components/descriptions/DescriptionsItem.js.map +1 -1
- package/dist/components/divider/Divider.js +22 -19
- package/dist/components/divider/Divider.js.map +1 -1
- package/dist/components/drawer/Drawer.js +37 -35
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/embed/Embed.js +40 -36
- package/dist/components/embed/Embed.js.map +1 -1
- package/dist/components/empty/Empty.js +11 -8
- package/dist/components/empty/Empty.js.map +1 -1
- package/dist/components/flex/Flex.js +6 -3
- package/dist/components/flex/Flex.js.map +1 -1
- package/dist/components/form/Form.js +17 -14
- package/dist/components/form/Form.js.map +1 -1
- package/dist/components/form-item/FormItem.js +11 -8
- package/dist/components/form-item/FormItem.js.map +1 -1
- package/dist/components/grid/Grid.js +20 -17
- package/dist/components/grid/Grid.js.map +1 -1
- package/dist/components/grid/GridCol.js +21 -18
- package/dist/components/grid/GridCol.js.map +1 -1
- package/dist/components/image/Image.js +12 -9
- package/dist/components/image/Image.js.map +1 -1
- package/dist/components/input/Input.js +7 -5
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/m-action-bar/MActionBar.js +8 -5
- package/dist/components/m-action-bar/MActionBar.js.map +1 -1
- package/dist/components/m-action-sheet/MActionSheet.js +26 -23
- package/dist/components/m-action-sheet/MActionSheet.js.map +1 -1
- package/dist/components/m-card/MCard.js +15 -12
- package/dist/components/m-card/MCard.js.map +1 -1
- package/dist/components/m-cell/MCell.js +14 -11
- package/dist/components/m-cell/MCell.js.map +1 -1
- package/dist/components/m-cell-group/MCellGroup.js +17 -14
- package/dist/components/m-cell-group/MCellGroup.js.map +1 -1
- package/dist/components/m-checkbox/MCheckbox.js +10 -7
- package/dist/components/m-checkbox/MCheckbox.js.map +1 -1
- package/dist/components/m-checkout-bar/MCheckoutBar.js +23 -20
- package/dist/components/m-checkout-bar/MCheckoutBar.js.map +1 -1
- package/dist/components/m-chip/MChip.js +15 -12
- package/dist/components/m-chip/MChip.js.map +1 -1
- package/dist/components/m-collapse/MCollapse.js +24 -21
- package/dist/components/m-collapse/MCollapse.js.map +1 -1
- package/dist/components/m-countdown/MCountdown.js +17 -14
- package/dist/components/m-countdown/MCountdown.js.map +1 -1
- package/dist/components/m-coupon/MCoupon.js +56 -53
- package/dist/components/m-coupon/MCoupon.js.map +1 -1
- package/dist/components/m-empty/MEmpty.js +13 -10
- package/dist/components/m-empty/MEmpty.js.map +1 -1
- package/dist/components/m-floating-button/MFloatingButton.js +17 -14
- package/dist/components/m-floating-button/MFloatingButton.js.map +1 -1
- package/dist/components/m-goods-card/MGoodsCard.js +28 -25
- package/dist/components/m-goods-card/MGoodsCard.js.map +1 -1
- package/dist/components/m-grid/MGrid.js +20 -17
- package/dist/components/m-grid/MGrid.js.map +1 -1
- package/dist/components/m-grid-item/MGridItem.js +21 -18
- package/dist/components/m-grid-item/MGridItem.js.map +1 -1
- package/dist/components/m-image-preview/MImagePreview.js +24 -22
- package/dist/components/m-image-preview/MImagePreview.js.map +1 -1
- package/dist/components/m-index-bar/MIndexBar.js +21 -18
- package/dist/components/m-index-bar/MIndexBar.js.map +1 -1
- package/dist/components/m-list/MList.js +33 -30
- package/dist/components/m-list/MList.js.map +1 -1
- package/dist/components/m-navbar/MNavbar.js +23 -20
- package/dist/components/m-navbar/MNavbar.js.map +1 -1
- package/dist/components/m-notice-bar/MNoticeBar.js +14 -12
- package/dist/components/m-notice-bar/MNoticeBar.js.map +1 -1
- package/dist/components/m-number-keyboard/MNumberKeyboard.js +18 -16
- package/dist/components/m-number-keyboard/MNumberKeyboard.js.map +1 -1
- package/dist/components/m-picker/MPicker.js +7 -5
- package/dist/components/m-picker/MPicker.js.map +1 -1
- package/dist/components/m-price/MPrice.js +8 -5
- package/dist/components/m-price/MPrice.js.map +1 -1
- package/dist/components/m-pull-refresh/MPullRefresh.js +25 -22
- package/dist/components/m-pull-refresh/MPullRefresh.js.map +1 -1
- package/dist/components/m-radio/MRadio.js +12 -9
- package/dist/components/m-radio/MRadio.js.map +1 -1
- package/dist/components/m-radio/MRadioGroup.js +12 -9
- package/dist/components/m-radio/MRadioGroup.js.map +1 -1
- package/dist/components/m-search/MSearch.js +26 -23
- package/dist/components/m-search/MSearch.js.map +1 -1
- package/dist/components/m-sku-picker/MSkuPicker.js +37 -35
- package/dist/components/m-sku-picker/MSkuPicker.js.map +1 -1
- package/dist/components/m-stepper/MStepper.js +23 -20
- package/dist/components/m-stepper/MStepper.js.map +1 -1
- package/dist/components/m-swipe-cell/MSwipeCell.js +7 -5
- package/dist/components/m-swipe-cell/MSwipeCell.js.map +1 -1
- package/dist/components/m-swiper/MSwiper.js +44 -41
- package/dist/components/m-swiper/MSwiper.js.map +1 -1
- package/dist/components/m-tabbar/MTabbar.js +12 -9
- package/dist/components/m-tabbar/MTabbar.js.map +1 -1
- package/dist/components/m-tabs/MTabs.js +33 -30
- package/dist/components/m-tabs/MTabs.js.map +1 -1
- package/dist/components/m-uploader/MUploader.js +23 -20
- package/dist/components/m-uploader/MUploader.js.map +1 -1
- package/dist/components/menu/Menu.js +35 -32
- package/dist/components/menu/Menu.js.map +1 -1
- package/dist/components/menu/menu-panel.js +10 -8
- package/dist/components/menu/menu-panel.js.map +1 -1
- package/dist/components/menu-item/MenuItem.js +16 -13
- package/dist/components/menu-item/MenuItem.js.map +1 -1
- package/dist/components/modal/Modal.js +14 -12
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/number-input/NumberInput.js +11 -9
- package/dist/components/number-input/NumberInput.js.map +1 -1
- package/dist/components/option/Option.js +15 -12
- package/dist/components/option/Option.js.map +1 -1
- package/dist/components/pagination/Pagination.js +43 -41
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/popconfirm/Popconfirm.js +16 -14
- package/dist/components/popconfirm/Popconfirm.js.map +1 -1
- package/dist/components/popover/Popover.js +20 -17
- package/dist/components/popover/Popover.js.map +1 -1
- package/dist/components/progress/Progress.js +17 -14
- package/dist/components/progress/Progress.js.map +1 -1
- package/dist/components/radio/Radio.js +8 -5
- package/dist/components/radio/Radio.js.map +1 -1
- package/dist/components/radio-group/RadioGroup.js +19 -16
- package/dist/components/radio-group/RadioGroup.js.map +1 -1
- package/dist/components/rate/Rate.js +16 -13
- package/dist/components/rate/Rate.js.map +1 -1
- package/dist/components/result/Result.js +18 -15
- package/dist/components/result/Result.js.map +1 -1
- package/dist/components/search-bar/SearchBar.js +13 -11
- package/dist/components/search-bar/SearchBar.js.map +1 -1
- package/dist/components/segmented/Segmented.js +21 -18
- package/dist/components/segmented/Segmented.js.map +1 -1
- package/dist/components/select/Select.js +44 -42
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/sidebar/Sidebar.js +20 -17
- package/dist/components/sidebar/Sidebar.js.map +1 -1
- package/dist/components/skeleton/Skeleton.js +17 -14
- package/dist/components/skeleton/Skeleton.js.map +1 -1
- package/dist/components/slider/Slider.js +30 -27
- package/dist/components/slider/Slider.js.map +1 -1
- package/dist/components/space/Space.js +8 -5
- package/dist/components/space/Space.js.map +1 -1
- package/dist/components/spinner/Spinner.js +15 -12
- package/dist/components/spinner/Spinner.js.map +1 -1
- package/dist/components/statistic/Statistic.js +16 -13
- package/dist/components/statistic/Statistic.js.map +1 -1
- package/dist/components/steps/Steps.js +10 -7
- package/dist/components/steps/Steps.js.map +1 -1
- package/dist/components/sticky/Sticky.js +20 -17
- package/dist/components/sticky/Sticky.js.map +1 -1
- package/dist/components/switch/Switch.js +15 -12
- package/dist/components/switch/Switch.js.map +1 -1
- package/dist/components/tab-panel/TabPanel.js +14 -11
- package/dist/components/tab-panel/TabPanel.js.map +1 -1
- package/dist/components/table/Table.js +12 -10
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/tabs/Tabs.js +44 -41
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/tag/Tag.js +26 -24
- package/dist/components/tag/Tag.js.map +1 -1
- package/dist/components/textarea/Textarea.js +11 -8
- package/dist/components/textarea/Textarea.js.map +1 -1
- package/dist/components/time-picker/TimePicker.js +47 -44
- package/dist/components/time-picker/TimePicker.js.map +1 -1
- package/dist/components/timeline/Timeline.js +20 -17
- package/dist/components/timeline/Timeline.js.map +1 -1
- package/dist/components/toast/Toast.js +2 -0
- package/dist/components/toast/Toast.js.map +1 -1
- package/dist/components/tooltip/Tooltip.js +18 -15
- package/dist/components/tooltip/Tooltip.js.map +1 -1
- package/dist/components/tree/Tree.js +9 -7
- package/dist/components/tree/Tree.js.map +1 -1
- package/dist/components/tree-node/TreeNode.js +16 -13
- package/dist/components/tree-node/TreeNode.js.map +1 -1
- package/dist/components/typography/Typography.js +49 -46
- package/dist/components/typography/Typography.js.map +1 -1
- package/dist/components/upload/Upload.js +8 -5
- package/dist/components/upload/Upload.js.map +1 -1
- package/dist/components/virtual-list/VirtualList.js +13 -11
- package/dist/components/virtual-list/VirtualList.js.map +1 -1
- package/dist/components/watermark/Watermark.js +10 -7
- package/dist/components/watermark/Watermark.js.map +1 -1
- package/dist/content/code-editor/CodeEditor.js +28 -26
- package/dist/content/code-editor/CodeEditor.js.map +1 -1
- package/dist/content/code-editor/highlight.js +8 -6
- package/dist/content/code-editor/highlight.js.map +1 -1
- package/dist/content/json-viewer/JsonViewer.js +40 -37
- package/dist/content/json-viewer/JsonViewer.js.map +1 -1
- package/dist/content/markdown/Markdown.js +22 -20
- package/dist/content/markdown/Markdown.js.map +1 -1
- package/dist/content/rich-text/RichText.js +66 -60
- package/dist/content/rich-text/RichText.js.map +1 -1
- package/dist/core/BaseElement.js +82 -27
- package/dist/core/BaseElement.js.map +1 -1
- package/dist/core/copy.js +14 -196
- package/dist/core/copy.js.map +1 -1
- package/dist/core/decorators.js +84 -68
- package/dist/core/decorators.js.map +1 -1
- package/dist/core/define.js +7 -0
- package/dist/core/define.js.map +1 -0
- package/dist/core/format.js +26 -0
- package/dist/core/format.js.map +1 -0
- package/dist/core/i18n.js +139 -0
- package/dist/core/i18n.js.map +1 -0
- package/dist/core/locales/en-US.js +274 -0
- package/dist/core/locales/en-US.js.map +1 -0
- package/dist/core/locales/zh-CN.js +318 -0
- package/dist/core/locales/zh-CN.js.map +1 -0
- package/dist/core/morph.js +72 -0
- package/dist/core/morph.js.map +1 -0
- package/dist/core/public.js +30 -16
- package/dist/core/public.js.map +1 -1
- package/dist/core/template.js +31 -8
- package/dist/core/template.js.map +1 -1
- package/dist/core.js +87 -69
- package/dist/core.js.map +1 -1
- package/dist/doc/doc-template-editor-core.js +46 -45
- package/dist/doc/doc-template-editor-core.js.map +1 -1
- package/dist/doc/editor-html.js +44 -42
- package/dist/doc/editor-html.js.map +1 -1
- package/dist/doc/editor-page-layout.js +8 -6
- package/dist/doc/editor-page-layout.js.map +1 -1
- package/dist/doc/editor.js +46 -42
- package/dist/doc/editor.js.map +1 -1
- package/dist/doc/manager.js +38 -36
- package/dist/doc/manager.js.map +1 -1
- package/dist/doc/preview.js +61 -59
- package/dist/doc/preview.js.map +1 -1
- package/dist/doc/render.js +48 -46
- package/dist/doc/render.js.map +1 -1
- package/dist/flow/Flow.js +48 -45
- package/dist/flow/Flow.js.map +1 -1
- package/dist/flow/FlowControls.js +20 -17
- package/dist/flow/FlowControls.js.map +1 -1
- package/dist/flow/FlowHandle.js +26 -23
- package/dist/flow/FlowHandle.js.map +1 -1
- package/dist/flow/FlowMinimap.js +27 -24
- package/dist/flow/FlowMinimap.js.map +1 -1
- package/dist/flow/FlowNode.js +29 -26
- package/dist/flow/FlowNode.js.map +1 -1
- package/dist/flow/flow-geometry.js +34 -32
- package/dist/flow/flow-geometry.js.map +1 -1
- package/dist/primitives/portal/Portal.js +14 -11
- package/dist/primitives/portal/Portal.js.map +1 -1
- package/dist/primitives/position/Position.js +10 -7
- package/dist/primitives/position/Position.js.map +1 -1
- package/dist/property/group/PropertyGroup.js +14 -11
- package/dist/property/group/PropertyGroup.js.map +1 -1
- package/dist/property/panel/PropertyPanel.js +10 -7
- package/dist/property/panel/PropertyPanel.js.map +1 -1
- package/dist/property/row/PropertyRow.js +27 -24
- package/dist/property/row/PropertyRow.js.map +1 -1
- package/dist/react.js +15 -13
- package/dist/react.js.map +1 -1
- package/dist/report/cell/base-cell.js +8 -6
- package/dist/report/cell/base-cell.js.map +1 -1
- package/dist/report/chart/Chart.js +75 -73
- package/dist/report/chart/Chart.js.map +1 -1
- package/dist/report/chart/ChartAxis.js +9 -6
- package/dist/report/chart/ChartAxis.js.map +1 -1
- package/dist/report/chart/ChartSeries.js +6 -3
- package/dist/report/chart/ChartSeries.js.map +1 -1
- package/dist/report/chart/interaction/tooltip.js +10 -8
- package/dist/report/chart/interaction/tooltip.js.map +1 -1
- package/dist/report/chart/renderer/svg.js +10 -8
- package/dist/report/chart/renderer/svg.js.map +1 -1
- package/dist/report/column-selector/ColumnSelector.js +116 -72
- package/dist/report/column-selector/ColumnSelector.js.map +1 -1
- package/dist/report/column-selector/column-selector.css.js +4 -4
- package/dist/report/column-selector/column-selector.css.js.map +1 -1
- package/dist/report/core/report-columns.js +43 -39
- package/dist/report/core/report-columns.js.map +1 -1
- package/dist/report/core/report-group.js +4 -2
- package/dist/report/core/report-group.js.map +1 -1
- package/dist/report/core/report-kpi.js +42 -37
- package/dist/report/core/report-kpi.js.map +1 -1
- package/dist/report/data-list/DataList.js +12 -10
- package/dist/report/data-list/DataList.js.map +1 -1
- package/dist/report/data-list/data-list-render.js +11 -9
- package/dist/report/data-list/data-list-render.js.map +1 -1
- package/dist/report/elements/card-render.js +76 -64
- package/dist/report/elements/card-render.js.map +1 -1
- package/dist/report/elements/report-card.js +45 -43
- package/dist/report/elements/report-card.js.map +1 -1
- package/dist/report/elements/report-group-table.js +31 -29
- package/dist/report/elements/report-group-table.js.map +1 -1
- package/dist/report/gantt/Gantt.js +42 -40
- package/dist/report/gantt/Gantt.js.map +1 -1
- package/dist/report/gantt/chart-render.js +6 -4
- package/dist/report/gantt/chart-render.js.map +1 -1
- package/dist/report/gantt/gantt-view.js +3 -2
- package/dist/report/gantt/gantt-view.js.map +1 -1
- package/dist/report/gantt/left-list.js +14 -12
- package/dist/report/gantt/left-list.js.map +1 -1
- package/dist/report/table/ReportTable.js +102 -86
- package/dist/report/table/ReportTable.js.map +1 -1
- package/dist/report/table/cell-semantic.css.js +17 -0
- package/dist/report/table/cell-semantic.css.js.map +1 -1
- package/dist/report/table/column-config-panel.js +12 -10
- package/dist/report/table/column-config-panel.js.map +1 -1
- package/dist/report/table/report-table-pager.js +7 -5
- package/dist/report/table/report-table-pager.js.map +1 -1
- package/dist/report/table/report-table-tools.js +13 -0
- package/dist/report/table/report-table-tools.js.map +1 -0
- package/dist/report/table/report-table-types.js +8 -6
- package/dist/report/table/report-table-types.js.map +1 -1
- package/dist/report/table/table-render.js +30 -28
- package/dist/report/table/table-render.js.map +1 -1
- package/dist/report/table/table-virtual.js +38 -0
- package/dist/report/table/table-virtual.js.map +1 -0
- package/dist/types/core/BaseElement.d.ts +24 -2
- package/dist/types/core/copy.d.ts +4 -206
- package/dist/types/core/define.d.ts +1 -0
- package/dist/types/core/format.d.ts +10 -0
- package/dist/types/core/i18n.d.ts +50 -0
- package/dist/types/core/index.d.ts +2 -0
- package/dist/types/core/locales/en-US.d.ts +3 -0
- package/dist/types/core/locales/zh-CN.d.ts +299 -0
- package/dist/types/core/morph.d.ts +2 -0
- package/dist/types/core/public.d.ts +4 -1
- package/dist/types/core/template.d.ts +18 -0
- package/dist/types/react/index.d.ts +6 -0
- package/dist/types/report/column-selector/ColumnSelector.d.ts +34 -17
- package/dist/types/report/elements/card-render.d.ts +1 -1
- package/dist/types/report/table/ReportTable.d.ts +6 -0
- package/dist/types/report/table/report-table-tools.d.ts +17 -0
- package/dist/types/report/table/report-table-types.d.ts +14 -0
- package/dist/types/report/table/table-virtual.d.ts +24 -0
- package/dist/z-agent-ui.js +30 -16
- package/dist/z-agent-ui.js.map +1 -1
- package/package.json +15 -2
- package/registry/component-manifest.json +26 -4
- package/src/components/accordion/Accordion.ts +2 -2
- package/src/components/accordion-item/AccordionItem.ts +2 -2
- package/src/components/alert/Alert.ts +2 -2
- package/src/components/anchor/Anchor.ts +2 -2
- package/src/components/avatar/Avatar.ts +2 -2
- package/src/components/badge/Badge.ts +2 -2
- package/src/components/breadcrumb/Breadcrumb.ts +2 -2
- package/src/components/button/Button.ts +2 -2
- package/src/components/calendar/Calendar.ts +2 -2
- package/src/components/card/Card.ts +2 -2
- package/src/components/checkbox/Checkbox.ts +2 -2
- package/src/components/command/Command.ts +7 -7
- package/src/components/context-menu/ContextMenu.ts +2 -2
- package/src/components/date-range/DateRange.ts +3 -3
- package/src/components/datepicker/Datepicker.ts +5 -5
- package/src/components/datepicker/time-row.ts +7 -7
- package/src/components/descriptions/Descriptions.ts +2 -2
- package/src/components/descriptions/DescriptionsItem.ts +2 -2
- package/src/components/divider/Divider.ts +2 -2
- package/src/components/drawer/Drawer.ts +2 -2
- package/src/components/embed/Embed.ts +9 -9
- package/src/components/empty/Empty.ts +2 -2
- package/src/components/flex/Flex.ts +2 -2
- package/src/components/form/Form.ts +2 -2
- package/src/components/form-item/FormItem.ts +2 -2
- package/src/components/grid/Grid.ts +2 -2
- package/src/components/grid/GridCol.ts +2 -2
- package/src/components/image/Image.ts +2 -2
- package/src/components/input/Input.ts +2 -2
- package/src/components/m-action-bar/MActionBar.ts +2 -2
- package/src/components/m-action-sheet/MActionSheet.ts +3 -3
- package/src/components/m-card/MCard.ts +2 -2
- package/src/components/m-cell/MCell.ts +2 -2
- package/src/components/m-cell-group/MCellGroup.ts +2 -2
- package/src/components/m-checkbox/MCheckbox.ts +2 -2
- package/src/components/m-checkout-bar/MCheckoutBar.ts +7 -7
- package/src/components/m-chip/MChip.ts +2 -2
- package/src/components/m-collapse/MCollapse.ts +2 -2
- package/src/components/m-countdown/MCountdown.ts +3 -3
- package/src/components/m-coupon/MCoupon.ts +13 -9
- package/src/components/m-empty/MEmpty.ts +2 -2
- package/src/components/m-floating-button/MFloatingButton.ts +2 -2
- package/src/components/m-goods-card/MGoodsCard.ts +4 -4
- package/src/components/m-grid/MGrid.ts +2 -2
- package/src/components/m-grid-item/MGridItem.ts +2 -2
- package/src/components/m-image-preview/MImagePreview.ts +3 -3
- package/src/components/m-index-bar/MIndexBar.ts +3 -3
- package/src/components/m-list/MList.ts +5 -5
- package/src/components/m-navbar/MNavbar.ts +3 -3
- package/src/components/m-notice-bar/MNoticeBar.ts +2 -2
- package/src/components/m-number-keyboard/MNumberKeyboard.ts +2 -2
- package/src/components/m-picker/MPicker.ts +2 -2
- package/src/components/m-price/MPrice.ts +2 -2
- package/src/components/m-pull-refresh/MPullRefresh.ts +5 -5
- package/src/components/m-radio/MRadio.ts +2 -2
- package/src/components/m-radio/MRadioGroup.ts +2 -2
- package/src/components/m-search/MSearch.ts +6 -6
- package/src/components/m-sku-picker/MSkuPicker.ts +9 -9
- package/src/components/m-stepper/MStepper.ts +4 -4
- package/src/components/m-swipe-cell/MSwipeCell.ts +2 -2
- package/src/components/m-swiper/MSwiper.ts +5 -5
- package/src/components/m-tabbar/MTabbar.ts +2 -2
- package/src/components/m-tabs/MTabs.ts +2 -2
- package/src/components/m-uploader/MUploader.ts +8 -8
- package/src/components/menu/Menu.ts +2 -2
- package/src/components/menu-item/MenuItem.ts +2 -2
- package/src/components/modal/Modal.ts +2 -2
- package/src/components/number-input/NumberInput.ts +2 -2
- package/src/components/option/Option.ts +2 -2
- package/src/components/pagination/Pagination.ts +2 -2
- package/src/components/popconfirm/Popconfirm.ts +3 -3
- package/src/components/popover/Popover.ts +2 -2
- package/src/components/progress/Progress.ts +2 -2
- package/src/components/radio/Radio.ts +2 -2
- package/src/components/radio-group/RadioGroup.ts +2 -2
- package/src/components/rate/Rate.ts +2 -2
- package/src/components/result/Result.ts +2 -2
- package/src/components/search-bar/SearchBar.ts +3 -3
- package/src/components/segmented/Segmented.ts +2 -2
- package/src/components/select/Select.ts +6 -6
- package/src/components/sidebar/Sidebar.ts +2 -2
- package/src/components/skeleton/Skeleton.ts +2 -2
- package/src/components/slider/Slider.ts +2 -2
- package/src/components/space/Space.ts +2 -2
- package/src/components/spinner/Spinner.ts +2 -2
- package/src/components/statistic/Statistic.ts +2 -2
- package/src/components/steps/Steps.ts +2 -2
- package/src/components/sticky/Sticky.ts +2 -2
- package/src/components/switch/Switch.ts +2 -2
- package/src/components/tab-panel/TabPanel.ts +2 -2
- package/src/components/table/Table.ts +2 -2
- package/src/components/tabs/Tabs.ts +2 -2
- package/src/components/tag/Tag.ts +2 -2
- package/src/components/textarea/Textarea.ts +2 -2
- package/src/components/time-picker/TimePicker.ts +2 -2
- package/src/components/timeline/Timeline.ts +2 -2
- package/src/components/tooltip/Tooltip.ts +2 -2
- package/src/components/tree/Tree.ts +2 -2
- package/src/components/tree-node/TreeNode.ts +2 -2
- package/src/components/typography/Typography.ts +3 -3
- package/src/components/upload/Upload.ts +2 -2
- package/src/components/virtual-list/VirtualList.ts +2 -2
- package/src/components/watermark/Watermark.ts +2 -2
|
@@ -8,5 +8,7 @@ export { observeLegacyAttribute, syncAlias } from "./legacyAttr.js";
|
|
|
8
8
|
export { resolveTone } from "./vocabulary.js";
|
|
9
9
|
export { COPY, COPY_EXEMPT } from "./copy.js";
|
|
10
10
|
export type { CopyKey } from "./copy.js";
|
|
11
|
+
export { defineElement } from "./define.js";
|
|
12
|
+
export { morphChildren } from "./morph.js";
|
|
11
13
|
export { FIELD_PART_SELECTOR, NAME_MARK, TRIGGER_MARK, ariaBool, composedContains, deepActiveElement, focusableOf, isEditableElement, bindTriggerAria, setContentCollapsed, bindFieldName, slottedControl, fieldOf, hasOwnAccessibleName, syncFieldName, clearFieldName, } from "./a11y.js";
|
|
12
14
|
export type { FieldNameBinder, TriggerAriaBinder, TriggerAriaState } from "./a11y.js";
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
export declare const zhCN: {
|
|
2
|
+
/** 列表/表格/树没有数据。 */
|
|
3
|
+
empty: string;
|
|
4
|
+
/** 正在加载。用单个省略号字符 `…` 而不是三个点 —— 三个点在等宽字体下会被拆行。 */
|
|
5
|
+
loading: string;
|
|
6
|
+
confirm: string;
|
|
7
|
+
cancel: string;
|
|
8
|
+
close: string;
|
|
9
|
+
/** 清除已选值(日期、下拉)。 */
|
|
10
|
+
clear: string;
|
|
11
|
+
/** 输入框的清除按钮:比 `clear` 多一层宾语,因为输入框周围可能还有别的"清除"。 */
|
|
12
|
+
clearInput: string;
|
|
13
|
+
reset: string;
|
|
14
|
+
remove: string;
|
|
15
|
+
/** 关闭一条提示条(aria)。比 `close` 具体,读屏时能听出关的是什么东西。 */
|
|
16
|
+
closeAlert: string;
|
|
17
|
+
/**
|
|
18
|
+
* 列表行左滑露出的那组操作(`m-swipe-cell` 的操作区名称)。
|
|
19
|
+
* 读屏进到操作区会念「分组,<名字>」;没有名字时用户分不清是行操作还是整页工具栏。
|
|
20
|
+
*/
|
|
21
|
+
rowActions: string;
|
|
22
|
+
/**
|
|
23
|
+
* 数字键盘上的退格键(图标按钮的可访问名称)。
|
|
24
|
+
* 不能沿用 `remove` / `clear`:退格只删一个字符,与「清空整个值」后果相差一个数量级。
|
|
25
|
+
*/
|
|
26
|
+
backspace: string;
|
|
27
|
+
all: string;
|
|
28
|
+
yes: string;
|
|
29
|
+
no: string;
|
|
30
|
+
/** 分页导航区的 aria 名称(`<nav aria-label>`)。 */
|
|
31
|
+
pagination: string;
|
|
32
|
+
prevPage: string;
|
|
33
|
+
nextPage: string;
|
|
34
|
+
/** 每页条数后缀,拼成「10 条/页」。 */
|
|
35
|
+
pageSizeSuffix: string;
|
|
36
|
+
prevMonth: string;
|
|
37
|
+
nextMonth: string;
|
|
38
|
+
/** 列选择入口的按钮文案。 */
|
|
39
|
+
columns: string;
|
|
40
|
+
columnSettings: string;
|
|
41
|
+
requiredField: string;
|
|
42
|
+
/** 列选择器里拖拽手柄的提示(悬停可见):说明这个把手能把列挪位。 */
|
|
43
|
+
reorderColumn: string;
|
|
44
|
+
alignLeft: string;
|
|
45
|
+
alignCenter: string;
|
|
46
|
+
alignRight: string;
|
|
47
|
+
pinNone: string;
|
|
48
|
+
pinLeft: string;
|
|
49
|
+
pinRight: string;
|
|
50
|
+
/** 合计行的行首标签。 */
|
|
51
|
+
total: string;
|
|
52
|
+
/**
|
|
53
|
+
* Markdown 表格外层横向滚动容器的名称(`role="region"` 的名字)。
|
|
54
|
+
* 可滚动容器会进 Tab 序,没有名字时键盘用户 Tab 到一个「什么都不说」的东西上。
|
|
55
|
+
*/
|
|
56
|
+
tableRegion: string;
|
|
57
|
+
/** 图表键盘导航的提示语:读屏用户得先知道「这里能用方向键」才会去试。 */
|
|
58
|
+
chartKeyboardHint: string;
|
|
59
|
+
/** 缩放条三个可聚焦部件的可读名:三个同名滑块等于没有标签。 */
|
|
60
|
+
chartZoomStart: string;
|
|
61
|
+
chartZoomEnd: string;
|
|
62
|
+
chartZoomWindow: string;
|
|
63
|
+
/** 甘特图键盘导航的提示语。 */
|
|
64
|
+
ganttKeyboardHint: string;
|
|
65
|
+
/** 甘特图的编辑键位(仅在可编辑时拼进提示;只读的甘特不该念编辑键位)。 */
|
|
66
|
+
ganttEditHint: string;
|
|
67
|
+
/**
|
|
68
|
+
* 连线待定的播报(`Alt + Enter` 之后立刻念一次)。中间那一步界面上没有任何变化,
|
|
69
|
+
* 不播报的话用户不知道自己在「连线模式」里。占位符 `{task}` / `{from}` / `{to}` 由 Gantt 填充。
|
|
70
|
+
*/
|
|
71
|
+
ganttLinkArmed: string;
|
|
72
|
+
ganttLinkDone: string;
|
|
73
|
+
ganttLinkCancelled: string;
|
|
74
|
+
/** 拒绝原因要念出来:静默失败和「产品没实现」在用户那里是同一件事。 */
|
|
75
|
+
ganttLinkRejectedSelf: string;
|
|
76
|
+
ganttLinkRejectedDuplicate: string;
|
|
77
|
+
ganttLinkNoSelection: string;
|
|
78
|
+
/** 甘特图的区域名称。 */
|
|
79
|
+
gantt: string;
|
|
80
|
+
increment: string;
|
|
81
|
+
decrement: string;
|
|
82
|
+
/**
|
|
83
|
+
* 富文本工具条的 aria 名称(`role="toolbar"` 的名字)。不叫「格式」:报表表格里
|
|
84
|
+
* 「格式」指数字/日期格式,两个概念撞同一个字面量会被 `copy-guard` C4 拦下。
|
|
85
|
+
*/
|
|
86
|
+
formatToolbar: string;
|
|
87
|
+
/** 缩放按钮的名字:按钮文本是 `−` / `+`,没有名字时读屏念「减号 按钮」。 */
|
|
88
|
+
zoomOut: string;
|
|
89
|
+
zoomIn: string;
|
|
90
|
+
/** 把视图缩放重置回 100%。名字说动作而不是结果(按钮上显示的是当前缩放)。 */
|
|
91
|
+
zoomReset: string;
|
|
92
|
+
/** 数字键盘上的小数点键:只有 `.` 时读屏念「句点」。 */
|
|
93
|
+
decimalPoint: string;
|
|
94
|
+
/** 应用切换面板的名字(`role="menu"` 的 `aria-label`)。 */
|
|
95
|
+
switchApp: string;
|
|
96
|
+
/** 标记「当前所在的应用」:同时是视觉徽标文字与可访问名的一部分。 */
|
|
97
|
+
currentApp: string;
|
|
98
|
+
/** 侧栏导航的 `<nav>` 名称:页面上通常有两个 navigation 地标,靠名字区分。 */
|
|
99
|
+
mainNav: string;
|
|
100
|
+
/** 代码编辑器补全列表的 aria 名称(`role="listbox"` 的名字)。 */
|
|
101
|
+
suggestions: string;
|
|
102
|
+
search: string;
|
|
103
|
+
copy: string;
|
|
104
|
+
clearAll: string;
|
|
105
|
+
removeItem: string;
|
|
106
|
+
selectedCount: string;
|
|
107
|
+
noneSelected: string;
|
|
108
|
+
commandPlaceholder: string;
|
|
109
|
+
commandPalette: string;
|
|
110
|
+
commandSearch: string;
|
|
111
|
+
commandResults: string;
|
|
112
|
+
noMatches: string;
|
|
113
|
+
dateRangePicker: string;
|
|
114
|
+
dateOutOfRange: string;
|
|
115
|
+
quickRanges: string;
|
|
116
|
+
timeLabel: string;
|
|
117
|
+
timeStart: string;
|
|
118
|
+
timeEnd: string;
|
|
119
|
+
timeHour: string;
|
|
120
|
+
timeMinute: string;
|
|
121
|
+
confirmAction: string;
|
|
122
|
+
username: string;
|
|
123
|
+
password: string;
|
|
124
|
+
rememberMe: string;
|
|
125
|
+
forgotPassword: string;
|
|
126
|
+
signIn: string;
|
|
127
|
+
signUp: string;
|
|
128
|
+
loginRequired: string;
|
|
129
|
+
back: string;
|
|
130
|
+
viewFullImage: string;
|
|
131
|
+
quickJump: string;
|
|
132
|
+
retryLoad: string;
|
|
133
|
+
loadingDots: string;
|
|
134
|
+
noMore: string;
|
|
135
|
+
refreshing: string;
|
|
136
|
+
releaseToRefresh: string;
|
|
137
|
+
pullToRefresh: string;
|
|
138
|
+
soldOut: string;
|
|
139
|
+
addToCart: string;
|
|
140
|
+
daysUnit: string;
|
|
141
|
+
checkout: string;
|
|
142
|
+
selectAll: string;
|
|
143
|
+
checkoutBar: string;
|
|
144
|
+
itemCount: string;
|
|
145
|
+
imageCarousel: string;
|
|
146
|
+
slideNumber: string;
|
|
147
|
+
carouselRole: string;
|
|
148
|
+
embedLazy: string;
|
|
149
|
+
embedTitle: string;
|
|
150
|
+
embedTimeout: string;
|
|
151
|
+
embedLoading: string;
|
|
152
|
+
retry: string;
|
|
153
|
+
embedNoSource: string;
|
|
154
|
+
couponUsed: string;
|
|
155
|
+
couponExpired: string;
|
|
156
|
+
freeShipping: string;
|
|
157
|
+
discountUnit: string;
|
|
158
|
+
noThreshold: string;
|
|
159
|
+
couponCondition: string;
|
|
160
|
+
couponLabel: string;
|
|
161
|
+
couponDiscountText: string;
|
|
162
|
+
couponAmountText: string;
|
|
163
|
+
upload: string;
|
|
164
|
+
selectedFallback: string;
|
|
165
|
+
videoPrefix: string;
|
|
166
|
+
deleteItem: string;
|
|
167
|
+
recordVideo: string;
|
|
168
|
+
takePhoto: string;
|
|
169
|
+
album: string;
|
|
170
|
+
selectSpecs: string;
|
|
171
|
+
pleaseSelect: string;
|
|
172
|
+
selectedValue: string;
|
|
173
|
+
stockCount: string;
|
|
174
|
+
quantity: string;
|
|
175
|
+
selectSpecsPrompt: string;
|
|
176
|
+
rootNode: string;
|
|
177
|
+
expand: string;
|
|
178
|
+
collapse: string;
|
|
179
|
+
itemsShort: string;
|
|
180
|
+
copyPath: string;
|
|
181
|
+
flowChart: string;
|
|
182
|
+
flowNodes: string;
|
|
183
|
+
fitView: string;
|
|
184
|
+
chartPointsSelected: string;
|
|
185
|
+
chartNoPointsSelected: string;
|
|
186
|
+
chartKeyboardBrush: string;
|
|
187
|
+
exportAction: string;
|
|
188
|
+
refreshAction: string;
|
|
189
|
+
viewDetail: string;
|
|
190
|
+
editAction: string;
|
|
191
|
+
noChart: string;
|
|
192
|
+
waitingConfig: string;
|
|
193
|
+
updating: string;
|
|
194
|
+
queryDone: string;
|
|
195
|
+
updateFailedFallback: string;
|
|
196
|
+
updateFailed: string;
|
|
197
|
+
collapsePanel: string;
|
|
198
|
+
queryFailed: string;
|
|
199
|
+
formatLabel: string;
|
|
200
|
+
numberFormat: string;
|
|
201
|
+
percentFormat: string;
|
|
202
|
+
decimalPlaces: string;
|
|
203
|
+
thousandsSep: string;
|
|
204
|
+
autoOption: string;
|
|
205
|
+
pagerTotal: string;
|
|
206
|
+
pagerPage: string;
|
|
207
|
+
pagerSize: string;
|
|
208
|
+
pagerSizeLabel: string;
|
|
209
|
+
bold: string;
|
|
210
|
+
italic: string;
|
|
211
|
+
underline: string;
|
|
212
|
+
bulletListLabel: string;
|
|
213
|
+
unorderedList: string;
|
|
214
|
+
numberedListLabel: string;
|
|
215
|
+
orderedList: string;
|
|
216
|
+
quoteLabel: string;
|
|
217
|
+
blockquote: string;
|
|
218
|
+
clearFormatting: string;
|
|
219
|
+
inputPlaceholder: string;
|
|
220
|
+
docPreview: string;
|
|
221
|
+
printAction: string;
|
|
222
|
+
exportDocx: string;
|
|
223
|
+
generateDoc: string;
|
|
224
|
+
emptyContent: string;
|
|
225
|
+
exporting: string;
|
|
226
|
+
exportFailed: string;
|
|
227
|
+
noExportAdapter: string;
|
|
228
|
+
docPageInfo: string;
|
|
229
|
+
docTemplates: string;
|
|
230
|
+
searchTemplatePlaceholder: string;
|
|
231
|
+
newTemplate: string;
|
|
232
|
+
allCategories: string;
|
|
233
|
+
templateName: string;
|
|
234
|
+
category: string;
|
|
235
|
+
description: string;
|
|
236
|
+
updatedAt: string;
|
|
237
|
+
defaultBadge: string;
|
|
238
|
+
actionsColumn: string;
|
|
239
|
+
emptyTemplates: string;
|
|
240
|
+
totalCount: string;
|
|
241
|
+
confirmDeleteTemplate: string;
|
|
242
|
+
columnN: string;
|
|
243
|
+
partyASignature: string;
|
|
244
|
+
partyBSignature: string;
|
|
245
|
+
docHeading: string;
|
|
246
|
+
docParagraph: string;
|
|
247
|
+
docList: string;
|
|
248
|
+
docSignature: string;
|
|
249
|
+
moveUp: string;
|
|
250
|
+
moveDown: string;
|
|
251
|
+
multiSelect: string;
|
|
252
|
+
propertiesTab: string;
|
|
253
|
+
placeholdersTab: string;
|
|
254
|
+
typographyTab: string;
|
|
255
|
+
insertAction: string;
|
|
256
|
+
noPlaceholderDef: string;
|
|
257
|
+
emptyDocCanvas: string;
|
|
258
|
+
alignLabel: string;
|
|
259
|
+
alignLeftShort: string;
|
|
260
|
+
alignCenterShort: string;
|
|
261
|
+
alignRightShort: string;
|
|
262
|
+
fontFamily: string;
|
|
263
|
+
fontSize: string;
|
|
264
|
+
colorLabel: string;
|
|
265
|
+
boldAction: string;
|
|
266
|
+
firstLineIndent: string;
|
|
267
|
+
removeIndent: string;
|
|
268
|
+
columnWidthPt: string;
|
|
269
|
+
tableConfig: string;
|
|
270
|
+
dataKeyLabel: string;
|
|
271
|
+
dataKeyHint: string;
|
|
272
|
+
fieldColumn: string;
|
|
273
|
+
headerColumn: string;
|
|
274
|
+
addColumn: string;
|
|
275
|
+
removeColumn: string;
|
|
276
|
+
undefinedField: string;
|
|
277
|
+
noTableFieldDef: string;
|
|
278
|
+
staticRows: string;
|
|
279
|
+
addRow: string;
|
|
280
|
+
removeLastRow: string;
|
|
281
|
+
bodyFont: string;
|
|
282
|
+
headingFont: string;
|
|
283
|
+
bodySize: string;
|
|
284
|
+
headingSize: string;
|
|
285
|
+
lineHeight: string;
|
|
286
|
+
paraSpacingPt: string;
|
|
287
|
+
firstIndentDetail: string;
|
|
288
|
+
pageMarginMm: string;
|
|
289
|
+
pageHeader: string;
|
|
290
|
+
pageFooter: string;
|
|
291
|
+
pageBreakLabel: string;
|
|
292
|
+
marginTopShort: string;
|
|
293
|
+
marginBottomShort: string;
|
|
294
|
+
headerPlaceholder: string;
|
|
295
|
+
footerPlaceholder: string;
|
|
296
|
+
};
|
|
297
|
+
/** 语言包的键(所有语言包必须给出同一组键,由 `locale-pack-guard` 守住)。 */
|
|
298
|
+
export type MessageKey = keyof typeof zhCN;
|
|
299
|
+
export default zhCN;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export { BaseElement, type UpdateContext } from "./BaseElement.js";
|
|
2
2
|
export { property } from "./decorators.js";
|
|
3
|
-
export { html, escapeHtml, escapeAttr } from "./template.js";
|
|
3
|
+
export { html, safeHtml, unsafeHTML, escapeHtml, escapeAttr, type RawHtml } from "./template.js";
|
|
4
4
|
export { sanitizeHtml, type SanitizeOptions } from "./sanitize.js";
|
|
5
5
|
export { TONES, APPEARANCES, SIZES, TONE_ALIASES, governedDimension, type Tone, type Appearance, type Size, } from "./vocabulary.js";
|
|
6
6
|
export { css } from "./css.js";
|
|
7
7
|
export { injectGlobalStyles } from "./styleInjection.js";
|
|
8
|
+
export { DEFAULT_LOCALE, getLocale, hasMessage, onLocaleChange, registerMessages, setLocale, t, type MessageParams, type Messages, } from "./i18n.js";
|
|
9
|
+
export type { MessageKey } from "./locales/zh-CN.js";
|
|
10
|
+
export { fmt, getDateTimeFormat, getNumberFormat } from "./format.js";
|
|
@@ -1,3 +1,21 @@
|
|
|
1
1
|
export declare function escapeHtml(s: string): string;
|
|
2
2
|
export declare function escapeAttr(s: unknown): string;
|
|
3
3
|
export declare function html(strings: TemplateStringsArray, ...values: unknown[]): string;
|
|
4
|
+
declare const RAW_HTML: unique symbol;
|
|
5
|
+
/** 已信任的 HTML 片段标记:由 `safeHtml` 或显式 `unsafeHTML()` 产出,嵌套时不再二次转义。 */
|
|
6
|
+
export interface RawHtml {
|
|
7
|
+
readonly [RAW_HTML]: true;
|
|
8
|
+
readonly value: string;
|
|
9
|
+
toString(): string;
|
|
10
|
+
}
|
|
11
|
+
/** 显式声明一段已净化或静态受控的 HTML,供 `safeHtml` 原样输出。 */
|
|
12
|
+
export declare function unsafeHTML(value: string): RawHtml;
|
|
13
|
+
/**
|
|
14
|
+
* 默认自动转义全部插值的模板标签(防 XSS)。
|
|
15
|
+
*
|
|
16
|
+
* - 普通字符串/数字/数组元素默认按 `escapeAttr` 转义(文本与属性位置均安全);
|
|
17
|
+
* - 嵌套的 `safeHtml` 与显式 `unsafeHTML(...)` 保持原样,不会二次转义;
|
|
18
|
+
* - 可直接作为 `BaseElement.render()` 的返回值,也可经 `String(...)` 转为普通字符串。
|
|
19
|
+
*/
|
|
20
|
+
export declare function safeHtml(strings: TemplateStringsArray, ...values: unknown[]): RawHtml;
|
|
21
|
+
export {};
|
|
@@ -407,3 +407,9 @@ export declare const ZPrintReact: import("react").ForwardRefExoticComponent<Reco
|
|
|
407
407
|
export declare const ZAppNavReact: import("react").ForwardRefExoticComponent<Record<string, unknown> & {
|
|
408
408
|
children?: import("react").ReactNode | undefined;
|
|
409
409
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
410
|
+
export declare const ZPortalReact: import("react").ForwardRefExoticComponent<Record<string, unknown> & {
|
|
411
|
+
children?: import("react").ReactNode | undefined;
|
|
412
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
413
|
+
export declare const ZPositionReact: import("react").ForwardRefExoticComponent<Record<string, unknown> & {
|
|
414
|
+
children?: import("react").ReactNode | undefined;
|
|
415
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -9,25 +9,14 @@ export declare class ZColumnSelector extends BaseElement {
|
|
|
9
9
|
for: string;
|
|
10
10
|
target: Element | null;
|
|
11
11
|
private _eventsBound;
|
|
12
|
-
/**
|
|
13
|
-
* 刚被勾选的列 key —— 重渲染后要把焦点放回同一个复选框。
|
|
14
|
-
*
|
|
15
|
-
* [WHY 必须自己记、自己恢复] 勾选会调 `source.toggleColumn()`,宿主表格随即
|
|
16
|
-
* `requestUpdate`,本组件也跟着整体重建 shadow(BaseElement 换 innerHTML)——
|
|
17
|
-
* **焦点所在的 `<input>` 被换成新节点,焦点掉到 `<body>`**。
|
|
18
|
-
* 2026-11-16 真机实测:`shadowRoot.activeElement` 由 checkbox 变成 null,
|
|
19
|
-
* `document.activeElement` 变成 BODY。鼠标用户看不出(手还在原位),
|
|
20
|
-
* 键盘用户勾一列就要重新 Tab 回选择器 —— 而「连续勾几列」正是它的主要用法。
|
|
21
|
-
* 作者此前注意到这个现象(`_onDocKeydown` 的注释写了「勾选触发重渲染后 focus
|
|
22
|
-
* 落回 body」),但只把 Escape 改成了 document 级监听,没管焦点本身。
|
|
23
|
-
*/
|
|
24
|
-
private _pendingFocusKey;
|
|
25
12
|
/**
|
|
26
13
|
* Escape 关闭后要把焦点交还触发器。
|
|
27
14
|
*
|
|
28
|
-
* [WHY
|
|
29
|
-
* **还开着**时有意义;这个是「关掉面板」,面板已经没了,唯一的去处是打开它的按钮。
|
|
15
|
+
* [WHY 需要单独记] 关闭会整体重建 shadow,焦点所在的复选框被换掉,焦点掉到 body。
|
|
30
16
|
* 2026-11-16 实测:焦点停在复选框上按 Escape,`deepActiveElement()` 变成 `body`。
|
|
17
|
+
*
|
|
18
|
+
* [注] 勾选路径不再需要「勾完把焦点放回同一个复选框」—— 勾选已经不重渲染了
|
|
19
|
+
* (2026-11-25,见 `_onShadowChange`),节点没被换掉,焦点本来就在原处。
|
|
31
20
|
*/
|
|
32
21
|
private _pendingReturnFocus;
|
|
33
22
|
private _uid;
|
|
@@ -36,6 +25,8 @@ export declare class ZColumnSelector extends BaseElement {
|
|
|
36
25
|
/** 当前被拖动的列行(`.z-colsel__row`)。null = 没有进行中的拖拽。 */
|
|
37
26
|
private _dragRow;
|
|
38
27
|
private _dragSession;
|
|
28
|
+
/** 下拉的定位器。下拉是 fixed 定位,位置由它按触发器实时算。 */
|
|
29
|
+
private _dropPos;
|
|
39
30
|
connectedCallback(): void;
|
|
40
31
|
disconnectedCallback(): void;
|
|
41
32
|
private _targetElement;
|
|
@@ -49,13 +40,39 @@ export declare class ZColumnSelector extends BaseElement {
|
|
|
49
40
|
private _focusWithin;
|
|
50
41
|
render(): string;
|
|
51
42
|
updated(): void;
|
|
43
|
+
/**
|
|
44
|
+
* 下拉改为 **fixed 定位**,位置交给 FloatingPosition 按触发器实时算。
|
|
45
|
+
*
|
|
46
|
+
* [WHY] 原来是 `position: absolute` 挂在表头末格里。表格容器 `.z-rpt__wrapper` 是
|
|
47
|
+
* `overflow-x: auto` —— 按 CSS 规范另一个方向也会被算成 auto,于是下拉一旦超出容器
|
|
48
|
+
* 高度就被裁掉(2026-11-25 实测:只露出第一行「物料编码」)。`fixed` 的包含块是视口,
|
|
49
|
+
* 不参与祖先的裁剪,这是唯一不改 DOM 位置就能跳出裁切的办法。
|
|
50
|
+
*
|
|
51
|
+
* [WHY 每次 updated 都重建] BaseElement 整块换 shadow innerHTML,下拉是**新节点**;
|
|
52
|
+
* 旧定位器还挂在已脱离的节点上,滚一次就会把旧节点的坐标写进空气。
|
|
53
|
+
* 滚动跟随由 FloatingPosition 自己监听(window + 逐层 shadowRoot),不在这里做。
|
|
54
|
+
*/
|
|
55
|
+
private _syncDropdownPosition;
|
|
52
56
|
/** Escape 关掉面板后把焦点交还触发器。 */
|
|
53
57
|
private _returnFocusToTrigger;
|
|
54
|
-
/**
|
|
55
|
-
|
|
58
|
+
/**
|
|
59
|
+
* 触发器被外部挪了位置后(宿主重绘、列增删)重算一次下拉位置。
|
|
60
|
+
*
|
|
61
|
+
* [WHY 需要外部调] 下拉的跟随只覆盖滚动与窗口 resize —— 表格重绘不产生这两个事件,
|
|
62
|
+
* 而它确实会改变表头的列集合。宿主在 `updated()` 里喊一声最省事。
|
|
63
|
+
*/
|
|
64
|
+
reposition(): void;
|
|
56
65
|
private _bindEvents;
|
|
57
66
|
private _onShadowClick;
|
|
58
67
|
private _onShadowChange;
|
|
68
|
+
/**
|
|
69
|
+
* 外部改了列的显隐后,同步面板里的勾选态 —— **只改属性,不重建 DOM**。
|
|
70
|
+
*
|
|
71
|
+
* [WHY 需要这个入口] 去掉勾选后的整块重渲染之后,面板不再"顺带"刷新。
|
|
72
|
+
* 宿主用脚本隐藏一列、或换了个配置快照,面板里的勾必须跟上,否则用户看到的是
|
|
73
|
+
* 「表格已经变了,勾还停在原处」。这里逐项赋值,滚动位置与动画都不受影响。
|
|
74
|
+
*/
|
|
75
|
+
syncColumnState(): void;
|
|
59
76
|
private _canReorder;
|
|
60
77
|
/**
|
|
61
78
|
* 派发列序变更。
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CardAction } from "../core/report-card.js";
|
|
2
2
|
import type { ChartQueryData } from "../core/data-source.js";
|
|
3
3
|
import type { CardKind, ReportChart } from "../core/types.js";
|
|
4
|
-
/**
|
|
4
|
+
/** 各动作的按钮文案(动态读当前语言包)。 */
|
|
5
5
|
export declare const ACTION_LABEL: Record<CardAction, string>;
|
|
6
6
|
/** 渲染一帧所需的全部输入(元素侧从自身属性/内部状态快照出来)。 */
|
|
7
7
|
export interface CardRenderCtx {
|
|
@@ -43,6 +43,8 @@ export declare class ZReportTable extends BaseElement {
|
|
|
43
43
|
showFooter: boolean;
|
|
44
44
|
striped: boolean;
|
|
45
45
|
bordered: boolean;
|
|
46
|
+
virtual: boolean;
|
|
47
|
+
rowHeight: number;
|
|
46
48
|
/**
|
|
47
49
|
* 三线表:顶线 / 表头下 / 底线加粗,无竖线(中文报表习惯,见 [[2026-08-10-rpt-business-polish]])。
|
|
48
50
|
*
|
|
@@ -123,6 +125,7 @@ export declare class ZReportTable extends BaseElement {
|
|
|
123
125
|
pagerSizeLabel: string;
|
|
124
126
|
/** 已折叠的组 key。折叠是**纯 UI 态**,不写回配置(刷新后恢复全展开)。 */
|
|
125
127
|
private _collapsed;
|
|
128
|
+
private _vState;
|
|
126
129
|
/**
|
|
127
130
|
* 单元格游标:重渲染后把 roving 停靠点放回这里。
|
|
128
131
|
*
|
|
@@ -206,6 +209,9 @@ export declare class ZReportTable extends BaseElement {
|
|
|
206
209
|
get variant(): string;
|
|
207
210
|
set variant(value: string);
|
|
208
211
|
render(): string;
|
|
212
|
+
private _selectorEl;
|
|
213
|
+
private _ensureSelectorEl;
|
|
214
|
+
private _syncSelectorProps;
|
|
209
215
|
updated(): void;
|
|
210
216
|
getConfig(): TableConfig;
|
|
211
217
|
applyConfig(cfg: TableConfig): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ZColumnSelector } from "../column-selector/ColumnSelector.js";
|
|
2
|
+
/** 从表格读、往选择器写的那几个字段。 */
|
|
3
|
+
export interface ToolsSelectorHost {
|
|
4
|
+
columnsText: string;
|
|
5
|
+
requiredColumnText: string;
|
|
6
|
+
reorderColumnText: string;
|
|
7
|
+
columnSelectorOpen: boolean;
|
|
8
|
+
showColumnSelector: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 取回(或首次创建)工具栏选择器,并挂到宿主自己的 light DOM 上。
|
|
12
|
+
*
|
|
13
|
+
* @param onOpen 开合事件回调(宿主用它把 `open` 镜像到 `columnSelectorOpen`)
|
|
14
|
+
*/
|
|
15
|
+
export declare function ensureToolsSelector(host: HTMLElement & ToolsSelectorHost, current: ZColumnSelector | null, onOpen: (e: Event) => void): ZColumnSelector;
|
|
16
|
+
/** 文案与开合状态同步(属性 setter 同值即返回,重复调用无成本)。 */
|
|
17
|
+
export declare function syncToolsSelector(el: ZColumnSelector | null, host: ToolsSelectorHost): void;
|
|
@@ -50,6 +50,20 @@ export interface ReportColumn extends CellSpec {
|
|
|
50
50
|
numeric?: boolean;
|
|
51
51
|
render?: (value: unknown, row: Record<string, unknown>, index: number) => string;
|
|
52
52
|
footer?: string | ((data: Record<string, unknown>[]) => string);
|
|
53
|
+
/**
|
|
54
|
+
* 合计行的自定义渲染(返回 HTML),与列的 `render` 对称。
|
|
55
|
+
*
|
|
56
|
+
* [WHY 需要它] `footer` 只出纯文本且一律转义 —— 数据行能靠 `render` 里的
|
|
57
|
+
* `<span class="is-danger">` 标红,合计行却只能是一段灰字:「超预算的合计」
|
|
58
|
+
* 与「没超预算的合计」长得一样(2026-11-25 反馈)。
|
|
59
|
+
* 语义色类(`is-danger` / `is-up` / `is-badge` …)由 `cell-semantic.css` 提供,
|
|
60
|
+
* 合计行那一份选择器也补在同一个文件里。
|
|
61
|
+
*
|
|
62
|
+
* [安全口径] 这里不转义,因为模板是**列定义作者**写的(与 `render` 同一可信级别);
|
|
63
|
+
* 数据仍必须由作者自己 `escapeAttr` / 转义 —— 直接把行数据拼进 HTML 与 `render`
|
|
64
|
+
* 里的风险完全一样。
|
|
65
|
+
*/
|
|
66
|
+
footerRender?: (data: Record<string, unknown>[]) => string;
|
|
53
67
|
}
|
|
54
68
|
export interface ReportColFormat {
|
|
55
69
|
/** 小数位 0-4;undefined = 保持原始值 */
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ViewRow } from "./table-view-rows.js";
|
|
2
|
+
import { type RowRenderContext } from "./table-render.js";
|
|
3
|
+
export interface VirtualWindow {
|
|
4
|
+
start: number;
|
|
5
|
+
end: number;
|
|
6
|
+
topHeight: number;
|
|
7
|
+
bottomHeight: number;
|
|
8
|
+
}
|
|
9
|
+
/** 计算当前滚动位置对应的可见行区间与上下占位高度。 */
|
|
10
|
+
export declare function computeVirtualWindow(total: number, scrollTop: number, viewportHeight: number, rowHeight: number, overscan?: number): VirtualWindow;
|
|
11
|
+
/** 渲染虚拟滚动表体:顶部占位行 + 可见区间行 + 底部占位行。 */
|
|
12
|
+
export declare function renderVirtualBodyRows(rows: ViewRow[], rowCtx: RowRenderContext, totalCols: number, win: VirtualWindow): string;
|
|
13
|
+
/** 从 maxHeight 字符串(如 "400px")解析兜底视口高度,用于首帧或无布局引擎(happy-dom)时。 */
|
|
14
|
+
export declare function parseViewportFallback(maxHeight: string): number;
|
|
15
|
+
export interface VirtualState {
|
|
16
|
+
scrollTop: number;
|
|
17
|
+
viewportH: number;
|
|
18
|
+
start: number;
|
|
19
|
+
end: number;
|
|
20
|
+
}
|
|
21
|
+
/** 根据当前滚动状态渲染完整表体或虚拟切片,并记录最新窗口边界。 */
|
|
22
|
+
export declare function renderTableBody(rows: ViewRow[], rowCtx: RowRenderContext, totalCols: number, virtual: boolean, rowHeight: number, maxHeight: string, state: VirtualState): string;
|
|
23
|
+
/** 滚动时检测虚拟窗口是否变化;若变化则更新 state 并返回 true 触发重绘。 */
|
|
24
|
+
export declare function handleVirtualScroll(wrapper: HTMLElement, totalRows: number, rowHeight: number, maxHeight: string, state: VirtualState): boolean;
|
package/dist/z-agent-ui.js
CHANGED
|
@@ -1,23 +1,37 @@
|
|
|
1
|
-
import { BaseElement as
|
|
1
|
+
import { BaseElement as o } from "./core/BaseElement.js";
|
|
2
2
|
import { property as m } from "./core/decorators.js";
|
|
3
|
-
import { escapeAttr as
|
|
3
|
+
import { escapeAttr as a, escapeHtml as p, html as f, safeHtml as l, unsafeHTML as n } from "./core/template.js";
|
|
4
4
|
import { sanitizeHtml as E } from "./core/sanitize.js";
|
|
5
|
-
import { APPEARANCES as
|
|
6
|
-
import { css as
|
|
7
|
-
import { injectGlobalStyles as
|
|
5
|
+
import { APPEARANCES as A, SIZES as L, TONES as c, TONE_ALIASES as i, governedDimension as S } from "./core/vocabulary.js";
|
|
6
|
+
import { css as H } from "./core/css.js";
|
|
7
|
+
import { injectGlobalStyles as h } from "./core/styleInjection.js";
|
|
8
|
+
import { DEFAULT_LOCALE as D, getLocale as F, hasMessage as M, onLocaleChange as O, registerMessages as b, setLocale as u, t as y } from "./core/i18n.js";
|
|
9
|
+
import { fmt as P, getDateTimeFormat as _, getNumberFormat as d } from "./core/format.js";
|
|
8
10
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
A as APPEARANCES,
|
|
12
|
+
o as BaseElement,
|
|
13
|
+
D as DEFAULT_LOCALE,
|
|
14
|
+
L as SIZES,
|
|
15
|
+
c as TONES,
|
|
13
16
|
i as TONE_ALIASES,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
H as css,
|
|
18
|
+
a as escapeAttr,
|
|
19
|
+
p as escapeHtml,
|
|
20
|
+
P as fmt,
|
|
21
|
+
_ as getDateTimeFormat,
|
|
22
|
+
F as getLocale,
|
|
23
|
+
d as getNumberFormat,
|
|
24
|
+
S as governedDimension,
|
|
25
|
+
M as hasMessage,
|
|
26
|
+
f as html,
|
|
27
|
+
h as injectGlobalStyles,
|
|
28
|
+
O as onLocaleChange,
|
|
20
29
|
m as property,
|
|
21
|
-
|
|
30
|
+
b as registerMessages,
|
|
31
|
+
l as safeHtml,
|
|
32
|
+
E as sanitizeHtml,
|
|
33
|
+
u as setLocale,
|
|
34
|
+
y as t,
|
|
35
|
+
n as unsafeHTML
|
|
22
36
|
};
|
|
23
37
|
//# sourceMappingURL=z-agent-ui.js.map
|
package/dist/z-agent-ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"z-agent-ui.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"z-agent-ui.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cpsoft13/z-agent-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Framework-agnostic Web Components for business UIs — form, table, chart, flow, doc. No runtime dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/z-agent-ui.js",
|
|
@@ -95,6 +95,18 @@
|
|
|
95
95
|
"types": "./dist/types/core/*.d.ts",
|
|
96
96
|
"import": "./dist/core/*.js"
|
|
97
97
|
},
|
|
98
|
+
"./locales/zh-CN": {
|
|
99
|
+
"types": "./dist/types/core/locales/zh-CN.d.ts",
|
|
100
|
+
"import": "./dist/core/locales/zh-CN.js"
|
|
101
|
+
},
|
|
102
|
+
"./locales/en-US": {
|
|
103
|
+
"types": "./dist/types/core/locales/en-US.d.ts",
|
|
104
|
+
"import": "./dist/core/locales/en-US.js"
|
|
105
|
+
},
|
|
106
|
+
"./locales/*": {
|
|
107
|
+
"types": "./dist/types/core/locales/*.d.ts",
|
|
108
|
+
"import": "./dist/core/locales/*.js"
|
|
109
|
+
},
|
|
98
110
|
"./z-agent-ui.css": "./dist/z-agent-ui.css",
|
|
99
111
|
"./app": {
|
|
100
112
|
"types": "./dist/types/app/index.d.ts",
|
|
@@ -169,7 +181,8 @@
|
|
|
169
181
|
"motion:check": "node bin/motion-check.mjs",
|
|
170
182
|
"layer:check": "node bin/layer-guard.mjs",
|
|
171
183
|
"lines:check": "node bin/lines-guard.mjs",
|
|
172
|
-
"check": "
|
|
184
|
+
"text:check": "node bin/text-guard.mjs",
|
|
185
|
+
"check": "npm run exports:check && npm run manifest:check && npm run motion:check && npm run layer:check && npm run lines:check && npm run text:check",
|
|
173
186
|
"check:guards": "node bin/check-guards.mjs",
|
|
174
187
|
"hooks:install": "node bin/install-hooks.mjs",
|
|
175
188
|
"prepare": "node bin/install-hooks.mjs",
|