@xihan-ui/vue 2.1.0 → 3.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.
- package/CHANGELOG.md +1394 -0
- package/README.md +1 -1
- package/dist/components/accordion/accordion.d.ts +6 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/accordion/accordion.js +4 -2
- package/dist/components/accordion/accordion.js.map +1 -1
- package/dist/components/alert/alert.d.ts +9 -0
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/alert.js +4 -0
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/anchor/anchor.d.ts +2 -2
- package/dist/components/anchor/anchor.d.ts.map +1 -1
- package/dist/components/anchor/anchor.js +2 -2
- package/dist/components/anchor/anchor.js.map +1 -1
- package/dist/components/anchor/use-anchor.d.ts +2 -2
- package/dist/components/anchor/use-anchor.js +3 -3
- package/dist/components/anchor/use-anchor.js.map +1 -1
- package/dist/components/approval/approval.d.ts +8 -1
- package/dist/components/approval/approval.d.ts.map +1 -1
- package/dist/components/approval/approval.js +10 -1
- package/dist/components/approval/approval.js.map +1 -1
- package/dist/components/avatar/avatar.d.ts +8 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.js +3 -1
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/avatar/use-avatar.d.ts.map +1 -1
- package/dist/components/avatar/use-avatar.js +3 -1
- package/dist/components/avatar/use-avatar.js.map +1 -1
- package/dist/components/back-top/use-back-top.d.ts.map +1 -1
- package/dist/components/back-top/use-back-top.js +3 -1
- package/dist/components/back-top/use-back-top.js.map +1 -1
- package/dist/components/badge/badge.d.ts +22 -0
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +11 -2
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts +11 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +28 -9
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/calendar-picker/calendar-picker.d.ts +16 -0
- package/dist/components/calendar-picker/calendar-picker.d.ts.map +1 -1
- package/dist/components/calendar-picker/calendar-picker.js +4 -0
- package/dist/components/calendar-picker/calendar-picker.js.map +1 -1
- package/dist/components/calendar-range-picker/calendar-range-picker.d.ts +16 -0
- package/dist/components/calendar-range-picker/calendar-range-picker.d.ts.map +1 -1
- package/dist/components/calendar-range-picker/calendar-range-picker.js +4 -0
- package/dist/components/calendar-range-picker/calendar-range-picker.js.map +1 -1
- package/dist/components/card/card.d.ts +37 -2
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/card.js +40 -2
- package/dist/components/card/card.js.map +1 -1
- package/dist/components/carousel/carousel.d.ts +7 -1
- package/dist/components/carousel/carousel.d.ts.map +1 -1
- package/dist/components/carousel/carousel.js +1 -0
- package/dist/components/carousel/carousel.js.map +1 -1
- package/dist/components/carousel/use-carousel.d.ts.map +1 -1
- package/dist/components/carousel/use-carousel.js +3 -1
- package/dist/components/carousel/use-carousel.js.map +1 -1
- package/dist/components/cartesian-chart/cartesian-chart.d.ts +262 -0
- package/dist/components/cartesian-chart/cartesian-chart.d.ts.map +1 -0
- package/dist/components/cartesian-chart/cartesian-chart.js +293 -0
- package/dist/components/cartesian-chart/cartesian-chart.js.map +1 -0
- package/dist/components/cartesian-chart/context.js +15 -0
- package/dist/components/cartesian-chart/context.js.map +1 -0
- package/dist/components/cartesian-chart/use-cartesian-chart.d.ts +21 -0
- package/dist/components/cartesian-chart/use-cartesian-chart.d.ts.map +1 -0
- package/dist/components/cartesian-chart/use-cartesian-chart.js +29 -0
- package/dist/components/cartesian-chart/use-cartesian-chart.js.map +1 -0
- package/dist/components/cascader/cascader.d.ts +66 -3
- package/dist/components/cascader/cascader.d.ts.map +1 -1
- package/dist/components/cascader/cascader.js +110 -8
- package/dist/components/cascader/cascader.js.map +1 -1
- package/dist/components/cascader/context.js +10 -1
- package/dist/components/cascader/context.js.map +1 -1
- package/dist/components/cascader/use-cascader.d.ts +2 -1
- package/dist/components/cascader/use-cascader.d.ts.map +1 -1
- package/dist/components/cascader/use-cascader.js +4 -1
- package/dist/components/cascader/use-cascader.js.map +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.d.ts +24 -3
- package/dist/components/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/dist/components/checkbox-group/checkbox-group.js +48 -12
- package/dist/components/checkbox-group/checkbox-group.js.map +1 -1
- package/dist/components/checkbox-group/use-checkbox-group.d.ts +6 -1
- package/dist/components/checkbox-group/use-checkbox-group.d.ts.map +1 -1
- package/dist/components/checkbox-group/use-checkbox-group.js +7 -3
- package/dist/components/checkbox-group/use-checkbox-group.js.map +1 -1
- package/dist/components/citation/citation.d.ts +211 -0
- package/dist/components/citation/citation.d.ts.map +1 -0
- package/dist/components/citation/citation.js +222 -0
- package/dist/components/citation/citation.js.map +1 -0
- package/dist/components/citation/context.d.ts +11 -0
- package/dist/components/citation/context.d.ts.map +1 -0
- package/dist/components/citation/context.js +24 -0
- package/dist/components/citation/context.js.map +1 -0
- package/dist/components/citation/use-citation.d.ts +19 -0
- package/dist/components/citation/use-citation.d.ts.map +1 -0
- package/dist/components/citation/use-citation.js +51 -0
- package/dist/components/citation/use-citation.js.map +1 -0
- package/dist/components/code-view/code-view.d.ts +21 -0
- package/dist/components/code-view/code-view.d.ts.map +1 -1
- package/dist/components/code-view/code-view.js +23 -4
- package/dist/components/code-view/code-view.js.map +1 -1
- package/dist/components/collapsible/collapsible.d.ts +6 -0
- package/dist/components/collapsible/collapsible.d.ts.map +1 -1
- package/dist/components/collapsible/collapsible.js +4 -2
- package/dist/components/collapsible/collapsible.js.map +1 -1
- package/dist/components/color-field/color-field.d.ts +4 -2
- package/dist/components/color-field/color-field.d.ts.map +1 -1
- package/dist/components/color-field/color-field.js +4 -2
- package/dist/components/color-field/color-field.js.map +1 -1
- package/dist/components/color-picker/color-picker.d.ts +115 -10
- package/dist/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/components/color-picker/color-picker.js +119 -9
- package/dist/components/color-picker/color-picker.js.map +1 -1
- package/dist/components/color-picker/context.js +10 -1
- package/dist/components/color-picker/context.js.map +1 -1
- package/dist/components/color-picker/use-color-picker.d.ts +3 -1
- package/dist/components/color-picker/use-color-picker.d.ts.map +1 -1
- package/dist/components/color-picker/use-color-picker.js +20 -4
- package/dist/components/color-picker/use-color-picker.js.map +1 -1
- package/dist/components/color-slider/color-slider.d.ts +2 -2
- package/dist/components/color-slider/color-slider.js +1 -1
- package/dist/components/color-slider/color-slider.js.map +1 -1
- package/dist/components/color-swatch-picker/color-swatch-picker.d.ts.map +1 -1
- package/dist/components/color-swatch-picker/color-swatch-picker.js +21 -4
- package/dist/components/color-swatch-picker/color-swatch-picker.js.map +1 -1
- package/dist/components/color-swatch-picker/use-color-swatch-picker.d.ts +6 -1
- package/dist/components/color-swatch-picker/use-color-swatch-picker.d.ts.map +1 -1
- package/dist/components/color-swatch-picker/use-color-swatch-picker.js +7 -3
- package/dist/components/color-swatch-picker/use-color-swatch-picker.js.map +1 -1
- package/dist/components/combobox/combobox.d.ts +51 -4
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/combobox.js +76 -6
- package/dist/components/combobox/combobox.js.map +1 -1
- package/dist/components/combobox/context.js +10 -1
- package/dist/components/combobox/context.js.map +1 -1
- package/dist/components/command/command.d.ts +3 -3
- package/dist/components/command/command.js +2 -2
- package/dist/components/command/use-command.d.ts.map +1 -1
- package/dist/components/command/use-command.js +9 -30
- package/dist/components/command/use-command.js.map +1 -1
- package/dist/components/context-menu/context-menu.d.ts +58 -18
- package/dist/components/context-menu/context-menu.d.ts.map +1 -1
- package/dist/components/context-menu/context-menu.js +110 -47
- package/dist/components/context-menu/context-menu.js.map +1 -1
- package/dist/components/context-menu/context.js +1 -1
- package/dist/components/context-menu/context.js.map +1 -1
- package/dist/components/context-menu/use-context-menu.d.ts +1 -1
- package/dist/components/context-menu/use-context-menu.d.ts.map +1 -1
- package/dist/components/context-menu/use-context-menu.js +4 -2
- package/dist/components/context-menu/use-context-menu.js.map +1 -1
- package/dist/components/date-field/date-field.d.ts +15 -3
- package/dist/components/date-field/date-field.d.ts.map +1 -1
- package/dist/components/date-field/date-field.js +7 -2
- package/dist/components/date-field/date-field.js.map +1 -1
- package/dist/components/date-picker/context.js +10 -1
- package/dist/components/date-picker/context.js.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +98 -3
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.js +91 -7
- package/dist/components/date-picker/date-picker.js.map +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts +103 -2
- package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +111 -6
- package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
- package/dist/components/date-range-picker/use-date-range-picker.d.ts +1 -1
- package/dist/components/date-range-picker/use-date-range-picker.js.map +1 -1
- package/dist/components/descriptions/descriptions.d.ts +38 -7
- package/dist/components/descriptions/descriptions.d.ts.map +1 -1
- package/dist/components/descriptions/descriptions.js +38 -4
- package/dist/components/descriptions/descriptions.js.map +1 -1
- package/dist/components/dialog/dialog.d.ts +17 -2
- package/dist/components/dialog/dialog.d.ts.map +1 -1
- package/dist/components/dialog/dialog.js +15 -2
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/dialog/use-dialog.d.ts.map +1 -1
- package/dist/components/dialog/use-dialog.js +9 -27
- package/dist/components/dialog/use-dialog.js.map +1 -1
- package/dist/components/diff-view/diff-view.d.ts +22 -2
- package/dist/components/diff-view/diff-view.d.ts.map +1 -1
- package/dist/components/diff-view/diff-view.js +37 -14
- package/dist/components/diff-view/diff-view.js.map +1 -1
- package/dist/components/diff-view/use-diff-view.d.ts +7 -2
- package/dist/components/diff-view/use-diff-view.d.ts.map +1 -1
- package/dist/components/diff-view/use-diff-view.js +12 -5
- package/dist/components/diff-view/use-diff-view.js.map +1 -1
- package/dist/components/drawer/drawer.d.ts +47 -2
- package/dist/components/drawer/drawer.d.ts.map +1 -1
- package/dist/components/drawer/drawer.js +28 -4
- package/dist/components/drawer/drawer.js.map +1 -1
- package/dist/components/drawer/use-drawer.d.ts +1 -1
- package/dist/components/drawer/use-drawer.d.ts.map +1 -1
- package/dist/components/drawer/use-drawer.js +12 -29
- package/dist/components/drawer/use-drawer.js.map +1 -1
- package/dist/components/empty-state/empty-state.js +4 -1
- package/dist/components/empty-state/empty-state.js.map +1 -1
- package/dist/components/empty-state/use-empty-state.js +12 -3
- package/dist/components/empty-state/use-empty-state.js.map +1 -1
- package/dist/components/field/context.d.ts +6 -1
- package/dist/components/field/context.d.ts.map +1 -1
- package/dist/components/field/context.js +10 -1
- package/dist/components/field/context.js.map +1 -1
- package/dist/components/field/field.d.ts +9 -1
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/field.js +14 -2
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/field/use-field-control.d.ts +8 -1
- package/dist/components/field/use-field-control.d.ts.map +1 -1
- package/dist/components/field/use-field-control.js +14 -1
- package/dist/components/field/use-field-control.js.map +1 -1
- package/dist/components/field-array/field-array.d.ts +1 -1
- package/dist/components/field-array/field-array.d.ts.map +1 -1
- package/dist/components/field-array/field-array.js +5 -1
- package/dist/components/field-array/field-array.js.map +1 -1
- package/dist/components/field-array/use-field-array.d.ts +3 -1
- package/dist/components/field-array/use-field-array.d.ts.map +1 -1
- package/dist/components/field-array/use-field-array.js +5 -2
- package/dist/components/field-array/use-field-array.js.map +1 -1
- package/dist/components/file-upload/file-upload.d.ts +26 -1
- package/dist/components/file-upload/file-upload.d.ts.map +1 -1
- package/dist/components/file-upload/file-upload.js +15 -3
- package/dist/components/file-upload/file-upload.js.map +1 -1
- package/dist/components/file-upload/use-file-upload.d.ts +1 -1
- package/dist/components/file-upload/use-file-upload.d.ts.map +1 -1
- package/dist/components/file-upload/use-file-upload.js.map +1 -1
- package/dist/components/flex/flex.d.ts +1 -1
- package/dist/components/flex/flex.d.ts.map +1 -1
- package/dist/components/flex/flex.js +4 -4
- package/dist/components/flex/flex.js.map +1 -1
- package/dist/components/float-button/float-button.d.ts +26 -1
- package/dist/components/float-button/float-button.d.ts.map +1 -1
- package/dist/components/float-button/float-button.js +17 -5
- package/dist/components/float-button/float-button.js.map +1 -1
- package/dist/components/float-button/use-float-button.js +7 -1
- package/dist/components/float-button/use-float-button.js.map +1 -1
- package/dist/components/form/context.js +5 -1
- package/dist/components/form/context.js.map +1 -1
- package/dist/components/form/form.d.ts +18 -4
- package/dist/components/form/form.d.ts.map +1 -1
- package/dist/components/form/form.js +21 -7
- package/dist/components/form/form.js.map +1 -1
- package/dist/components/form/use-form-control.js +1 -1
- package/dist/components/form/use-form.d.ts +6 -0
- package/dist/components/form/use-form.d.ts.map +1 -1
- package/dist/components/form/use-form.js +4 -0
- package/dist/components/form/use-form.js.map +1 -1
- package/dist/components/funnel-chart/context.js +15 -0
- package/dist/components/funnel-chart/context.js.map +1 -0
- package/dist/components/funnel-chart/funnel-chart.d.ts +175 -0
- package/dist/components/funnel-chart/funnel-chart.d.ts.map +1 -0
- package/dist/components/funnel-chart/funnel-chart.js +188 -0
- package/dist/components/funnel-chart/funnel-chart.js.map +1 -0
- package/dist/components/funnel-chart/use-funnel-chart.d.ts +19 -0
- package/dist/components/funnel-chart/use-funnel-chart.d.ts.map +1 -0
- package/dist/components/funnel-chart/use-funnel-chart.js +26 -0
- package/dist/components/funnel-chart/use-funnel-chart.js.map +1 -0
- package/dist/components/graph-chart/context.js +15 -0
- package/dist/components/graph-chart/context.js.map +1 -0
- package/dist/components/graph-chart/graph-chart.d.ts +194 -0
- package/dist/components/graph-chart/graph-chart.d.ts.map +1 -0
- package/dist/components/graph-chart/graph-chart.js +219 -0
- package/dist/components/graph-chart/graph-chart.js.map +1 -0
- package/dist/components/graph-chart/use-graph-chart.d.ts +19 -0
- package/dist/components/graph-chart/use-graph-chart.d.ts.map +1 -0
- package/dist/components/graph-chart/use-graph-chart.js +26 -0
- package/dist/components/graph-chart/use-graph-chart.js.map +1 -0
- package/dist/components/grid/grid.d.ts +7 -0
- package/dist/components/grid/grid.d.ts.map +1 -1
- package/dist/components/grid/grid.js +7 -1
- package/dist/components/grid/grid.js.map +1 -1
- package/dist/components/grid-list/context.d.ts +9 -0
- package/dist/components/grid-list/context.d.ts.map +1 -0
- package/dist/components/grid-list/context.js +24 -0
- package/dist/components/grid-list/context.js.map +1 -0
- package/dist/components/grid-list/grid-list.d.ts +149 -0
- package/dist/components/grid-list/grid-list.d.ts.map +1 -0
- package/dist/components/grid-list/grid-list.js +118 -0
- package/dist/components/grid-list/grid-list.js.map +1 -0
- package/dist/components/grid-list/use-grid-list.d.ts +12 -0
- package/dist/components/grid-list/use-grid-list.d.ts.map +1 -0
- package/dist/components/grid-list/use-grid-list.js +20 -0
- package/dist/components/grid-list/use-grid-list.js.map +1 -0
- package/dist/components/heatmap/heatmap.d.ts +45 -4
- package/dist/components/heatmap/heatmap.d.ts.map +1 -1
- package/dist/components/heatmap/heatmap.js +40 -14
- package/dist/components/heatmap/heatmap.js.map +1 -1
- package/dist/components/heatmap/use-heatmap.d.ts +4 -2
- package/dist/components/heatmap/use-heatmap.d.ts.map +1 -1
- package/dist/components/heatmap/use-heatmap.js +8 -4
- package/dist/components/heatmap/use-heatmap.js.map +1 -1
- package/dist/components/hierarchy-chart/context.js +15 -0
- package/dist/components/hierarchy-chart/context.js.map +1 -0
- package/dist/components/hierarchy-chart/hierarchy-chart.d.ts +201 -0
- package/dist/components/hierarchy-chart/hierarchy-chart.d.ts.map +1 -0
- package/dist/components/hierarchy-chart/hierarchy-chart.js +228 -0
- package/dist/components/hierarchy-chart/hierarchy-chart.js.map +1 -0
- package/dist/components/hierarchy-chart/use-hierarchy-chart.d.ts +19 -0
- package/dist/components/hierarchy-chart/use-hierarchy-chart.d.ts.map +1 -0
- package/dist/components/hierarchy-chart/use-hierarchy-chart.js +26 -0
- package/dist/components/hierarchy-chart/use-hierarchy-chart.js.map +1 -0
- package/dist/components/hover-card/hover-card.js +2 -2
- package/dist/components/icon/icon.d.ts +7 -1
- package/dist/components/icon/icon.d.ts.map +1 -1
- package/dist/components/icon/icon.js +1 -0
- package/dist/components/icon/icon.js.map +1 -1
- package/dist/components/image/use-image.d.ts.map +1 -1
- package/dist/components/image/use-image.js +3 -1
- package/dist/components/image/use-image.js.map +1 -1
- package/dist/components/image-cropper/image-cropper.d.ts +35 -4
- package/dist/components/image-cropper/image-cropper.d.ts.map +1 -1
- package/dist/components/image-cropper/image-cropper.js +34 -5
- package/dist/components/image-cropper/image-cropper.js.map +1 -1
- package/dist/components/image-cropper/use-image-cropper.d.ts +3 -1
- package/dist/components/image-cropper/use-image-cropper.d.ts.map +1 -1
- package/dist/components/image-cropper/use-image-cropper.js +4 -1
- package/dist/components/image-cropper/use-image-cropper.js.map +1 -1
- package/dist/components/image-viewer/image-viewer.js +1 -1
- package/dist/components/image-viewer/use-image-viewer.d.ts.map +1 -1
- package/dist/components/image-viewer/use-image-viewer.js +9 -27
- package/dist/components/image-viewer/use-image-viewer.js.map +1 -1
- package/dist/components/infinite-scroll/infinite-scroll.d.ts +9 -1
- package/dist/components/infinite-scroll/infinite-scroll.d.ts.map +1 -1
- package/dist/components/infinite-scroll/infinite-scroll.js +2 -0
- package/dist/components/infinite-scroll/infinite-scroll.js.map +1 -1
- package/dist/components/json-viewer/json-viewer.d.ts +17 -2
- package/dist/components/json-viewer/json-viewer.d.ts.map +1 -1
- package/dist/components/json-viewer/json-viewer.js +26 -8
- package/dist/components/json-viewer/json-viewer.js.map +1 -1
- package/dist/components/listbox/listbox.d.ts +7 -1
- package/dist/components/listbox/listbox.d.ts.map +1 -1
- package/dist/components/listbox/listbox.js +2 -0
- package/dist/components/listbox/listbox.js.map +1 -1
- package/dist/components/loading-bar/use-loading-bar.d.ts.map +1 -1
- package/dist/components/loading-bar/use-loading-bar.js +3 -1
- package/dist/components/loading-bar/use-loading-bar.js.map +1 -1
- package/dist/components/log/log.d.ts +41 -2
- package/dist/components/log/log.d.ts.map +1 -1
- package/dist/components/log/log.js +25 -3
- package/dist/components/log/log.js.map +1 -1
- package/dist/components/log/use-log.d.ts +1 -1
- package/dist/components/log/use-log.d.ts.map +1 -1
- package/dist/components/log/use-log.js +4 -1
- package/dist/components/log/use-log.js.map +1 -1
- package/dist/components/markdown-stream/markdown-stream.d.ts +21 -1
- package/dist/components/markdown-stream/markdown-stream.d.ts.map +1 -1
- package/dist/components/markdown-stream/markdown-stream.js +43 -4
- package/dist/components/markdown-stream/markdown-stream.js.map +1 -1
- package/dist/components/marquee/marquee.d.ts +68 -12
- package/dist/components/marquee/marquee.d.ts.map +1 -1
- package/dist/components/marquee/marquee.js +52 -7
- package/dist/components/marquee/marquee.js.map +1 -1
- package/dist/components/mention/mention.d.ts +26 -6
- package/dist/components/mention/mention.d.ts.map +1 -1
- package/dist/components/mention/mention.js +14 -4
- package/dist/components/mention/mention.js.map +1 -1
- package/dist/components/menu/context.js +1 -1
- package/dist/components/menu/context.js.map +1 -1
- package/dist/components/menu/menu.d.ts +79 -28
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/menu/menu.js +132 -51
- package/dist/components/menu/menu.js.map +1 -1
- package/dist/components/menu/use-menu.d.ts +1 -1
- package/dist/components/menu/use-menu.d.ts.map +1 -1
- package/dist/components/menu/use-menu.js +8 -6
- package/dist/components/menu/use-menu.js.map +1 -1
- package/dist/components/menubar/context.js +1 -1
- package/dist/components/menubar/context.js.map +1 -1
- package/dist/components/menubar/menubar.d.ts +47 -18
- package/dist/components/menubar/menubar.d.ts.map +1 -1
- package/dist/components/menubar/menubar.js +109 -47
- package/dist/components/menubar/menubar.js.map +1 -1
- package/dist/components/menubar/use-menubar.d.ts +1 -1
- package/dist/components/menubar/use-menubar.d.ts.map +1 -1
- package/dist/components/menubar/use-menubar.js +4 -2
- package/dist/components/menubar/use-menubar.js.map +1 -1
- package/dist/components/message-feed/message-feed.d.ts +13 -1
- package/dist/components/message-feed/message-feed.d.ts.map +1 -1
- package/dist/components/message-feed/message-feed.js +25 -1
- package/dist/components/message-feed/message-feed.js.map +1 -1
- package/dist/components/navigation-menu/navigation-menu.d.ts +58 -1
- package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -1
- package/dist/components/navigation-menu/navigation-menu.js +82 -10
- package/dist/components/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/notification/context.d.ts +5 -1
- package/dist/components/notification/context.d.ts.map +1 -1
- package/dist/components/notification/context.js.map +1 -1
- package/dist/components/notification/notification.d.ts +39 -23
- package/dist/components/notification/notification.d.ts.map +1 -1
- package/dist/components/notification/notification.js +27 -9
- package/dist/components/notification/notification.js.map +1 -1
- package/dist/components/notification/use-item-exit.js +22 -0
- package/dist/components/notification/use-item-exit.js.map +1 -0
- package/dist/components/notification/use-notification.d.ts +3 -3
- package/dist/components/notification/use-notification.d.ts.map +1 -1
- package/dist/components/notification/use-notification.js +20 -5
- package/dist/components/notification/use-notification.js.map +1 -1
- package/dist/components/number-animation/number-animation.d.ts +14 -2
- package/dist/components/number-animation/number-animation.d.ts.map +1 -1
- package/dist/components/number-animation/number-animation.js +5 -1
- package/dist/components/number-animation/number-animation.js.map +1 -1
- package/dist/components/number-field/number-field.d.ts +16 -1
- package/dist/components/number-field/number-field.d.ts.map +1 -1
- package/dist/components/number-field/number-field.js +6 -0
- package/dist/components/number-field/number-field.js.map +1 -1
- package/dist/components/pagination/pagination.d.ts +22 -2
- package/dist/components/pagination/pagination.d.ts.map +1 -1
- package/dist/components/pagination/pagination.js +22 -1
- package/dist/components/pagination/pagination.js.map +1 -1
- package/dist/components/pagination/use-pagination.js +1 -0
- package/dist/components/pagination/use-pagination.js.map +1 -1
- package/dist/components/pie-chart/context.js +15 -0
- package/dist/components/pie-chart/context.js.map +1 -0
- package/dist/components/pie-chart/pie-chart.d.ts +203 -0
- package/dist/components/pie-chart/pie-chart.d.ts.map +1 -0
- package/dist/components/pie-chart/pie-chart.js +236 -0
- package/dist/components/pie-chart/pie-chart.js.map +1 -0
- package/dist/components/pie-chart/use-pie-chart.d.ts +19 -0
- package/dist/components/pie-chart/use-pie-chart.d.ts.map +1 -0
- package/dist/components/pie-chart/use-pie-chart.js +26 -0
- package/dist/components/pie-chart/use-pie-chart.js.map +1 -0
- package/dist/components/pin-input/pin-input.d.ts.map +1 -1
- package/dist/components/pin-input/pin-input.js +7 -1
- package/dist/components/pin-input/pin-input.js.map +1 -1
- package/dist/components/popconfirm/popconfirm.d.ts +20 -1
- package/dist/components/popconfirm/popconfirm.d.ts.map +1 -1
- package/dist/components/popconfirm/popconfirm.js +9 -2
- package/dist/components/popconfirm/popconfirm.js.map +1 -1
- package/dist/components/popconfirm/use-popconfirm.js +2 -0
- package/dist/components/popconfirm/use-popconfirm.js.map +1 -1
- package/dist/components/popover/popover.d.ts +12 -1
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/popover/popover.js +7 -2
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/progress/progress.d.ts +63 -3
- package/dist/components/progress/progress.d.ts.map +1 -1
- package/dist/components/progress/progress.js +55 -3
- package/dist/components/progress/progress.js.map +1 -1
- package/dist/components/question-flow/question-flow.d.ts +40 -1
- package/dist/components/question-flow/question-flow.d.ts.map +1 -1
- package/dist/components/question-flow/question-flow.js +37 -1
- package/dist/components/question-flow/question-flow.js.map +1 -1
- package/dist/components/radar-chart/context.js +15 -0
- package/dist/components/radar-chart/context.js.map +1 -0
- package/dist/components/radar-chart/radar-chart.d.ts +189 -0
- package/dist/components/radar-chart/radar-chart.d.ts.map +1 -0
- package/dist/components/radar-chart/radar-chart.js +220 -0
- package/dist/components/radar-chart/radar-chart.js.map +1 -0
- package/dist/components/radar-chart/use-radar-chart.d.ts +19 -0
- package/dist/components/radar-chart/use-radar-chart.d.ts.map +1 -0
- package/dist/components/radar-chart/use-radar-chart.js +26 -0
- package/dist/components/radar-chart/use-radar-chart.js.map +1 -0
- package/dist/components/radio-group/radio-group.d.ts +37 -2
- package/dist/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group/radio-group.js +74 -9
- package/dist/components/radio-group/radio-group.js.map +1 -1
- package/dist/components/radio-group/use-radio-group.d.ts +8 -1
- package/dist/components/radio-group/use-radio-group.d.ts.map +1 -1
- package/dist/components/radio-group/use-radio-group.js +10 -3
- package/dist/components/radio-group/use-radio-group.js.map +1 -1
- package/dist/components/rating/rating.d.ts.map +1 -1
- package/dist/components/rating/rating.js +7 -1
- package/dist/components/rating/rating.js.map +1 -1
- package/dist/components/reasoning/reasoning.d.ts.map +1 -1
- package/dist/components/reasoning/reasoning.js +1 -0
- package/dist/components/reasoning/reasoning.js.map +1 -1
- package/dist/components/sankey-chart/context.js +15 -0
- package/dist/components/sankey-chart/context.js.map +1 -0
- package/dist/components/sankey-chart/sankey-chart.d.ts +161 -0
- package/dist/components/sankey-chart/sankey-chart.d.ts.map +1 -0
- package/dist/components/sankey-chart/sankey-chart.js +208 -0
- package/dist/components/sankey-chart/sankey-chart.js.map +1 -0
- package/dist/components/sankey-chart/use-sankey-chart.d.ts +19 -0
- package/dist/components/sankey-chart/use-sankey-chart.d.ts.map +1 -0
- package/dist/components/sankey-chart/use-sankey-chart.js +26 -0
- package/dist/components/sankey-chart/use-sankey-chart.js.map +1 -0
- package/dist/components/scroll-area/scroll-area.d.ts +13 -5
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/scroll-area/scroll-area.js +17 -3
- package/dist/components/scroll-area/scroll-area.js.map +1 -1
- package/dist/components/select/select.d.ts +9 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +16 -5
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/select/use-select.js +2 -1
- package/dist/components/select/use-select.js.map +1 -1
- package/dist/components/side-nav/context.js +17 -1
- package/dist/components/side-nav/context.js.map +1 -1
- package/dist/components/side-nav/side-nav.d.ts +51 -7
- package/dist/components/side-nav/side-nav.d.ts.map +1 -1
- package/dist/components/side-nav/side-nav.js +152 -13
- package/dist/components/side-nav/side-nav.js.map +1 -1
- package/dist/components/side-nav/use-side-nav.d.ts +4 -2
- package/dist/components/side-nav/use-side-nav.d.ts.map +1 -1
- package/dist/components/side-nav/use-side-nav.js +5 -3
- package/dist/components/side-nav/use-side-nav.js.map +1 -1
- package/dist/components/signature-pad/signature-pad.d.ts +28 -4
- package/dist/components/signature-pad/signature-pad.d.ts.map +1 -1
- package/dist/components/signature-pad/signature-pad.js +35 -5
- package/dist/components/signature-pad/signature-pad.js.map +1 -1
- package/dist/components/signature-pad/use-signature-pad.d.ts +1 -1
- package/dist/components/signature-pad/use-signature-pad.d.ts.map +1 -1
- package/dist/components/signature-pad/use-signature-pad.js.map +1 -1
- package/dist/components/skeleton/use-skeleton.js +6 -2
- package/dist/components/skeleton/use-skeleton.js.map +1 -1
- package/dist/components/slider/slider.d.ts +27 -0
- package/dist/components/slider/slider.d.ts.map +1 -1
- package/dist/components/slider/slider.js +19 -1
- package/dist/components/slider/slider.js.map +1 -1
- package/dist/components/sortable/sortable.d.ts +18 -0
- package/dist/components/sortable/sortable.d.ts.map +1 -1
- package/dist/components/sortable/sortable.js +7 -2
- package/dist/components/sortable/sortable.js.map +1 -1
- package/dist/components/sortable/use-sortable.d.ts +1 -1
- package/dist/components/sortable/use-sortable.d.ts.map +1 -1
- package/dist/components/sortable/use-sortable.js +2 -1
- package/dist/components/sortable/use-sortable.js.map +1 -1
- package/dist/components/sparkline/sparkline.d.ts +101 -0
- package/dist/components/sparkline/sparkline.d.ts.map +1 -0
- package/dist/components/sparkline/sparkline.js +54 -0
- package/dist/components/sparkline/sparkline.js.map +1 -0
- package/dist/components/sparkline/use-sparkline.d.ts +15 -0
- package/dist/components/sparkline/use-sparkline.d.ts.map +1 -0
- package/dist/components/sparkline/use-sparkline.js +21 -0
- package/dist/components/sparkline/use-sparkline.js.map +1 -0
- package/dist/components/spinner/spinner.d.ts +8 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/spinner/spinner.js +2 -0
- package/dist/components/spinner/spinner.js.map +1 -1
- package/dist/components/spinner/use-spinner.js +4 -2
- package/dist/components/spinner/use-spinner.js.map +1 -1
- package/dist/components/steps/steps.d.ts +28 -1
- package/dist/components/steps/steps.d.ts.map +1 -1
- package/dist/components/steps/steps.js +11 -2
- package/dist/components/steps/steps.js.map +1 -1
- package/dist/components/switch/switch.js +1 -1
- package/dist/components/table/context.js +9 -1
- package/dist/components/table/context.js.map +1 -1
- package/dist/components/table/table.d.ts +52 -3
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +40 -11
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/table/use-table.d.ts +3 -1
- package/dist/components/table/use-table.d.ts.map +1 -1
- package/dist/components/table/use-table.js +5 -2
- package/dist/components/table/use-table.js.map +1 -1
- package/dist/components/tabs/tabs.d.ts +51 -3
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tabs/tabs.js +60 -8
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/components/tag/use-tag.d.ts.map +1 -1
- package/dist/components/tag/use-tag.js +3 -1
- package/dist/components/tag/use-tag.js.map +1 -1
- package/dist/components/tags-input/tags-input.d.ts +12 -2
- package/dist/components/tags-input/tags-input.d.ts.map +1 -1
- package/dist/components/tags-input/tags-input.js +14 -5
- package/dist/components/tags-input/tags-input.js.map +1 -1
- package/dist/components/tags-input/use-tags-input.d.ts +4 -2
- package/dist/components/tags-input/use-tags-input.d.ts.map +1 -1
- package/dist/components/tags-input/use-tags-input.js +5 -2
- package/dist/components/tags-input/use-tags-input.js.map +1 -1
- package/dist/components/text-field/text-field.d.ts +2 -0
- package/dist/components/text-field/text-field.d.ts.map +1 -1
- package/dist/components/text-field/text-field.js +3 -1
- package/dist/components/text-field/text-field.js.map +1 -1
- package/dist/components/time-field/time-field.d.ts +2 -0
- package/dist/components/time-field/time-field.d.ts.map +1 -1
- package/dist/components/time-field/time-field.js +3 -1
- package/dist/components/time-field/time-field.js.map +1 -1
- package/dist/components/time-picker/context.js +10 -1
- package/dist/components/time-picker/context.js.map +1 -1
- package/dist/components/time-picker/time-picker.d.ts +88 -15
- package/dist/components/time-picker/time-picker.d.ts.map +1 -1
- package/dist/components/time-picker/time-picker.js +92 -9
- package/dist/components/time-picker/time-picker.js.map +1 -1
- package/dist/components/time-range-picker/time-range-picker.d.ts +13 -7
- package/dist/components/time-range-picker/time-range-picker.d.ts.map +1 -1
- package/dist/components/time-range-picker/time-range-picker.js +7 -3
- package/dist/components/time-range-picker/time-range-picker.js.map +1 -1
- package/dist/components/timer/timer.d.ts +1 -1
- package/dist/components/timestamp/timestamp.d.ts +20 -1
- package/dist/components/timestamp/timestamp.d.ts.map +1 -1
- package/dist/components/timestamp/timestamp.js +16 -5
- package/dist/components/timestamp/timestamp.js.map +1 -1
- package/dist/components/toggle-group/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group/toggle-group.js +7 -1
- package/dist/components/toggle-group/toggle-group.js.map +1 -1
- package/dist/components/toolbar/toolbar.d.ts +17 -2
- package/dist/components/toolbar/toolbar.d.ts.map +1 -1
- package/dist/components/toolbar/toolbar.js +31 -4
- package/dist/components/toolbar/toolbar.js.map +1 -1
- package/dist/components/toolbar/use-toolbar.d.ts +4 -2
- package/dist/components/toolbar/use-toolbar.d.ts.map +1 -1
- package/dist/components/toolbar/use-toolbar.js +5 -2
- package/dist/components/toolbar/use-toolbar.js.map +1 -1
- package/dist/components/tooltip/context.d.ts +21 -0
- package/dist/components/tooltip/context.d.ts.map +1 -0
- package/dist/components/tooltip/context.js +10 -1
- package/dist/components/tooltip/context.js.map +1 -1
- package/dist/components/tooltip/tooltip.d.ts +53 -1
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.js +34 -3
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/components/tooltip/use-tooltip.d.ts +3 -18
- package/dist/components/tooltip/use-tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/use-tooltip.js +2 -0
- package/dist/components/tooltip/use-tooltip.js.map +1 -1
- package/dist/components/tour/tour.d.ts +8 -0
- package/dist/components/tour/tour.d.ts.map +1 -1
- package/dist/components/tour/tour.js +2 -0
- package/dist/components/tour/tour.js.map +1 -1
- package/dist/components/transfer/transfer.d.ts +21 -1
- package/dist/components/transfer/transfer.d.ts.map +1 -1
- package/dist/components/transfer/transfer.js +10 -2
- package/dist/components/transfer/transfer.js.map +1 -1
- package/dist/components/tree/tree.d.ts +34 -1
- package/dist/components/tree/tree.d.ts.map +1 -1
- package/dist/components/tree/tree.js +11 -0
- package/dist/components/tree/tree.js.map +1 -1
- package/dist/components/tree-select/context.js +10 -1
- package/dist/components/tree-select/context.js.map +1 -1
- package/dist/components/tree-select/tree-select.d.ts +72 -6
- package/dist/components/tree-select/tree-select.d.ts.map +1 -1
- package/dist/components/tree-select/tree-select.js +112 -13
- package/dist/components/tree-select/tree-select.js.map +1 -1
- package/dist/components/tree-select/use-tree-select.d.ts +3 -0
- package/dist/components/tree-select/use-tree-select.d.ts.map +1 -1
- package/dist/components/tree-select/use-tree-select.js +6 -1
- package/dist/components/tree-select/use-tree-select.js.map +1 -1
- package/dist/components/truncate/truncate.d.ts +25 -4
- package/dist/components/truncate/truncate.d.ts.map +1 -1
- package/dist/components/truncate/truncate.js +25 -14
- package/dist/components/truncate/truncate.js.map +1 -1
- package/dist/components/truncate/use-truncate.d.ts.map +1 -1
- package/dist/components/truncate/use-truncate.js +3 -1
- package/dist/components/truncate/use-truncate.js.map +1 -1
- package/dist/components/typography/typography.d.ts +35 -2
- package/dist/components/typography/typography.d.ts.map +1 -1
- package/dist/components/typography/typography.js +21 -3
- package/dist/components/typography/typography.js.map +1 -1
- package/dist/components/virtualizer/virtualizer.d.ts +26 -2
- package/dist/components/virtualizer/virtualizer.d.ts.map +1 -1
- package/dist/components/virtualizer/virtualizer.js +20 -3
- package/dist/components/virtualizer/virtualizer.js.map +1 -1
- package/dist/components/watermark/watermark.d.ts +14 -1
- package/dist/components/watermark/watermark.d.ts.map +1 -1
- package/dist/components/watermark/watermark.js +20 -5
- package/dist/components/watermark/watermark.js.map +1 -1
- package/dist/config/config.d.ts +1 -1
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +2 -1
- package/dist/config/config.js.map +1 -1
- package/dist/index.d.ts +64 -49
- package/dist/index.js +58 -43
- package/dist/package.js +1 -1
- package/dist/runtime/as-child.js +3 -2
- package/dist/runtime/as-child.js.map +1 -1
- package/dist/runtime/hydration.js +14 -0
- package/dist/runtime/hydration.js.map +1 -0
- package/dist/runtime/portal.js +2 -0
- package/dist/runtime/portal.js.map +1 -1
- package/dist/runtime/use-overlay-exit.js +0 -1
- package/dist/runtime/use-overlay-exit.js.map +1 -1
- package/dist/runtime/with-handlers.js +25 -0
- package/dist/runtime/with-handlers.js.map +1 -0
- package/dist/services/notification-service.d.ts +26 -7
- package/dist/services/notification-service.d.ts.map +1 -1
- package/dist/services/notification-service.js +35 -8
- package/dist/services/notification-service.js.map +1 -1
- package/dist/sound.d.ts +6 -7
- package/dist/sound.d.ts.map +1 -1
- package/dist/sound.js +6 -6
- package/dist/sound.js.map +1 -1
- package/package.json +15 -14
- package/dist/components/gradient-text/gradient-text.d.ts +0 -36
- package/dist/components/gradient-text/gradient-text.d.ts.map +0 -1
- package/dist/components/gradient-text/gradient-text.js +0 -20
- package/dist/components/gradient-text/gradient-text.js.map +0 -1
- package/dist/components/icon-wrapper/icon-wrapper.d.ts +0 -29
- package/dist/components/icon-wrapper/icon-wrapper.d.ts.map +0 -1
- package/dist/components/icon-wrapper/icon-wrapper.js +0 -20
- package/dist/components/icon-wrapper/icon-wrapper.js.map +0 -1
- package/dist/components/segmented/context.d.ts +0 -13
- package/dist/components/segmented/context.d.ts.map +0 -1
- package/dist/components/segmented/context.js +0 -24
- package/dist/components/segmented/context.js.map +0 -1
- package/dist/components/segmented/segmented.d.ts +0 -161
- package/dist/components/segmented/segmented.d.ts.map +0 -1
- package/dist/components/segmented/segmented.js +0 -142
- package/dist/components/segmented/segmented.js.map +0 -1
- package/dist/components/segmented/use-segmented.d.ts +0 -15
- package/dist/components/segmented/use-segmented.d.ts.map +0 -1
- package/dist/components/segmented/use-segmented.js +0 -22
- package/dist/components/segmented/use-segmented.js.map +0 -1
- package/dist/components/toast/context.js +0 -15
- package/dist/components/toast/context.js.map +0 -1
- package/dist/components/toast/toast.d.ts +0 -123
- package/dist/components/toast/toast.d.ts.map +0 -1
- package/dist/components/toast/toast.js +0 -112
- package/dist/components/toast/toast.js.map +0 -1
- package/dist/components/toast/use-toast.d.ts +0 -10
- package/dist/components/toast/use-toast.d.ts.map +0 -1
- package/dist/components/toast/use-toast.js +0 -17
- package/dist/components/toast/use-toast.js.map +0 -1
- package/dist/services/toast-service.d.ts +0 -69
- package/dist/services/toast-service.d.ts.map +0 -1
- package/dist/services/toast-service.js +0 -161
- package/dist/services/toast-service.js.map +0 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { withXhConfig } from "../../config/config.js";
|
|
2
|
+
import { provideFunnelChart, useFunnelChartContext } from "./context.js";
|
|
3
|
+
import { useFunnelChart } from "./use-funnel-chart.js";
|
|
4
|
+
import { defineComponent, h } from "vue";
|
|
5
|
+
//#region src/components/funnel-chart/funnel-chart.ts
|
|
6
|
+
/** 一个场景标记画成 SVG 元素;文字标记带文字。 */
|
|
7
|
+
function renderMark(api, mark) {
|
|
8
|
+
const props = {
|
|
9
|
+
...api.getMarkProps(mark),
|
|
10
|
+
key: mark.key
|
|
11
|
+
};
|
|
12
|
+
if (mark.kind === "group") return h("g", props, mark.children.map((child) => renderMark(api, child)));
|
|
13
|
+
if (mark.kind === "text") return h("text", props, mark.text);
|
|
14
|
+
return h("path", props);
|
|
15
|
+
}
|
|
16
|
+
/** 缺省的提示框内容:头部是阶段名,下面是数值与两种转化率。 */
|
|
17
|
+
function renderTooltipContent(api) {
|
|
18
|
+
const tooltip = api.tooltip;
|
|
19
|
+
if (!tooltip) return [];
|
|
20
|
+
return [h("div", api.getTooltipHeaderProps(), tooltip.header), ...tooltip.rows.map((row) => h("div", {
|
|
21
|
+
...api.getTooltipRowProps(row),
|
|
22
|
+
key: row.key
|
|
23
|
+
}, [
|
|
24
|
+
h("span", api.getTooltipSwatchProps(row)),
|
|
25
|
+
h("span", api.getTooltipValueProps(row), row.value),
|
|
26
|
+
h("span", api.getTooltipNameProps(row), row.name)
|
|
27
|
+
]))];
|
|
28
|
+
}
|
|
29
|
+
/** 摘要与数据表:由根自动生成、视觉隐藏,保证无障碍等价物始终存在。 */
|
|
30
|
+
function renderA11y(api) {
|
|
31
|
+
const { columns, rows } = api.table;
|
|
32
|
+
return [h("p", api.getSummaryProps(), api.summary), h("table", api.getTableProps(), [
|
|
33
|
+
h("caption", api.tableCaption),
|
|
34
|
+
h("thead", [h("tr", columns.map((column) => h("th", {
|
|
35
|
+
key: column.id,
|
|
36
|
+
scope: "col"
|
|
37
|
+
}, column.label)))]),
|
|
38
|
+
h("tbody", rows.map((row, i) => h("tr", { key: i }, row.cells.map((cell, c) => c === 0 ? h("th", {
|
|
39
|
+
key: c,
|
|
40
|
+
scope: "row"
|
|
41
|
+
}, cell.text) : h("td", { key: c }, cell.text)))))
|
|
42
|
+
])];
|
|
43
|
+
}
|
|
44
|
+
/** 标题:图表的可及名来源。 */
|
|
45
|
+
const XhFunnelChartCaption = defineComponent({
|
|
46
|
+
name: "XhFunnelChartCaption",
|
|
47
|
+
setup(_, { slots }) {
|
|
48
|
+
const ctx = useFunnelChartContext();
|
|
49
|
+
return () => h("figcaption", ctx.api.value.getCaptionProps(), slots.default?.());
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
/** 视口:尺寸观测的宿主,块尺寸由组件槽决定。 */
|
|
53
|
+
const XhFunnelChartViewport = defineComponent({
|
|
54
|
+
name: "XhFunnelChartViewport",
|
|
55
|
+
setup(_, { slots }) {
|
|
56
|
+
const ctx = useFunnelChartContext();
|
|
57
|
+
return () => h("div", {
|
|
58
|
+
...ctx.api.value.getViewportProps(),
|
|
59
|
+
ref: (el) => {
|
|
60
|
+
ctx.viewportRef.value = el;
|
|
61
|
+
}
|
|
62
|
+
}, slots.default?.());
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
/** 绘图区:阶段在下,阶段标签与转化率在上,焦点环最上。 */
|
|
66
|
+
const XhFunnelChartPlot = defineComponent({
|
|
67
|
+
name: "XhFunnelChartPlot",
|
|
68
|
+
setup() {
|
|
69
|
+
const ctx = useFunnelChartContext();
|
|
70
|
+
return () => {
|
|
71
|
+
const api = ctx.api.value;
|
|
72
|
+
const marks = [
|
|
73
|
+
...api.scene.layers.data,
|
|
74
|
+
...api.scene.layers.front,
|
|
75
|
+
...api.overlay.over
|
|
76
|
+
];
|
|
77
|
+
return h("svg", api.getPlotProps(), marks.map((mark) => renderMark(api, mark)));
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
/** 提示框:缺省内容按激活的阶段生成,作用域插槽可替换。 */
|
|
82
|
+
const XhFunnelChartTooltip = defineComponent({
|
|
83
|
+
name: "XhFunnelChartTooltip",
|
|
84
|
+
slots: Object,
|
|
85
|
+
setup(_, { slots }) {
|
|
86
|
+
const ctx = useFunnelChartContext();
|
|
87
|
+
return () => {
|
|
88
|
+
const api = ctx.api.value;
|
|
89
|
+
return h("div", api.getTooltipProps(), slots.default ? slots.default({
|
|
90
|
+
active: api.active,
|
|
91
|
+
tooltip: api.tooltip
|
|
92
|
+
}) : renderTooltipContent(api));
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
/** 空态:没有可画的数据时显示,缺省文字取文案。 */
|
|
97
|
+
const XhFunnelChartEmpty = defineComponent({
|
|
98
|
+
name: "XhFunnelChartEmpty",
|
|
99
|
+
setup(_, { slots }) {
|
|
100
|
+
const ctx = useFunnelChartContext();
|
|
101
|
+
return () => h("div", ctx.api.value.getEmptyProps(), slots.default?.() ?? ctx.api.value.emptyText);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
/** 根:铺开缺省结构或交给默认插槽,并在末尾追加摘要与数据表。 */
|
|
105
|
+
const XhFunnelChartRoot = defineComponent({
|
|
106
|
+
name: "XhFunnelChartRoot",
|
|
107
|
+
props: {
|
|
108
|
+
data: { type: Array },
|
|
109
|
+
nameField: { type: String },
|
|
110
|
+
valueField: { type: String },
|
|
111
|
+
shape: { type: String },
|
|
112
|
+
align: { type: String },
|
|
113
|
+
direction: { type: String },
|
|
114
|
+
conversion: { type: String },
|
|
115
|
+
labels: { type: String },
|
|
116
|
+
palette: { type: String },
|
|
117
|
+
format: { type: [Object, Function] },
|
|
118
|
+
hiddenSeries: { type: Array },
|
|
119
|
+
defaultHiddenSeries: { type: Array },
|
|
120
|
+
activeKey: { type: [
|
|
121
|
+
String,
|
|
122
|
+
Number,
|
|
123
|
+
Date,
|
|
124
|
+
null
|
|
125
|
+
] },
|
|
126
|
+
pending: {
|
|
127
|
+
type: Boolean,
|
|
128
|
+
default: void 0
|
|
129
|
+
},
|
|
130
|
+
animated: {
|
|
131
|
+
type: Boolean,
|
|
132
|
+
default: void 0
|
|
133
|
+
},
|
|
134
|
+
locale: { type: String },
|
|
135
|
+
translations: { type: Object }
|
|
136
|
+
},
|
|
137
|
+
emits: {
|
|
138
|
+
"hidden-series-change": (_details) => true,
|
|
139
|
+
"update:hiddenSeries": (_hidden) => true,
|
|
140
|
+
"active-key-change": (_details) => true,
|
|
141
|
+
"update:activeKey": (_key) => true,
|
|
142
|
+
"datum-active": (_details) => true,
|
|
143
|
+
"datum-press": (_details) => true
|
|
144
|
+
},
|
|
145
|
+
slots: Object,
|
|
146
|
+
setup(props, { slots, emit }) {
|
|
147
|
+
const ctx = useFunnelChart(withXhConfig("funnel-chart", props), {
|
|
148
|
+
onHiddenSeriesChange: (details) => {
|
|
149
|
+
emit("hidden-series-change", details);
|
|
150
|
+
emit("update:hiddenSeries", details.hiddenSeries);
|
|
151
|
+
},
|
|
152
|
+
onActiveKeyChange: (details) => {
|
|
153
|
+
emit("active-key-change", details);
|
|
154
|
+
emit("update:activeKey", details.activeKey);
|
|
155
|
+
},
|
|
156
|
+
onDatumActive: (details) => emit("datum-active", details),
|
|
157
|
+
onDatumPress: (details) => emit("datum-press", details)
|
|
158
|
+
});
|
|
159
|
+
provideFunnelChart(ctx);
|
|
160
|
+
return () => {
|
|
161
|
+
const api = ctx.api.value;
|
|
162
|
+
const content = slots.default ? slots.default({
|
|
163
|
+
active: api.active,
|
|
164
|
+
tooltip: api.tooltip,
|
|
165
|
+
empty: api.empty,
|
|
166
|
+
table: api.table,
|
|
167
|
+
hiddenSeries: api.hiddenSeries,
|
|
168
|
+
activeKey: api.activeKey,
|
|
169
|
+
toggleSeries: api.toggleSeries,
|
|
170
|
+
setFocusedDatum: api.setFocusedDatum
|
|
171
|
+
}) : [
|
|
172
|
+
...slots.caption ? [h(XhFunnelChartCaption, null, () => slots.caption?.())] : [],
|
|
173
|
+
h(XhFunnelChartViewport, null, () => [h(XhFunnelChartPlot), h(XhFunnelChartEmpty, null, slots.empty ? () => slots.empty?.() : void 0)]),
|
|
174
|
+
h(XhFunnelChartTooltip, null, slots.tooltip ? { default: slots.tooltip } : void 0)
|
|
175
|
+
];
|
|
176
|
+
return h("figure", {
|
|
177
|
+
...api.getRootProps(),
|
|
178
|
+
ref: (el) => {
|
|
179
|
+
ctx.rootRef.value = el;
|
|
180
|
+
}
|
|
181
|
+
}, [...content, ...renderA11y(api)]);
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
//#endregion
|
|
186
|
+
export { XhFunnelChartCaption, XhFunnelChartEmpty, XhFunnelChartPlot, XhFunnelChartRoot, XhFunnelChartTooltip, XhFunnelChartViewport };
|
|
187
|
+
|
|
188
|
+
//# sourceMappingURL=funnel-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"funnel-chart.js","names":[],"sources":["../../../src/components/funnel-chart/funnel-chart.ts"],"sourcesContent":["/*\n * Copyright (c) 2021-Present XiHanFun and contributors.\n * Licensed under the MIT License. See LICENSE in the project root for license information.\n */\n\n// 提供 funnel chart 相关实现。\n\nimport type {\n ChartDatumDetails,\n ChartKey,\n ChartMark,\n ChartPalette,\n ChartRow,\n FunnelAlign,\n FunnelChartApi,\n FunnelChartSchema,\n FunnelChartTranslations,\n FunnelConversion,\n FunnelDirection,\n FunnelLabels,\n FunnelShape,\n FunnelTooltipModel,\n NumberFormatSpec,\n} from '@xihan-ui/headless'\nimport type { PropType, SlotsType, VNode } from 'vue'\nimport type { PayloadOf } from '../../runtime/payload'\nimport { defineComponent, h } from 'vue'\nimport { withXhConfig } from '../../config/config'\nimport { provideFunnelChart, useFunnelChartContext } from './context'\nimport { useFunnelChart } from './use-funnel-chart'\n\ntype FunnelChartProps = FunnelChartSchema['props']\n\n/** 默认插槽的载荷:自行摆放部件时用得上的状态与动作。 */\nexport type FunnelChartRootSlotProps = Pick<FunnelChartApi, 'active' | 'tooltip' | 'empty' | 'hiddenSeries' | 'activeKey' | 'toggleSeries' | 'setFocusedDatum' | 'table'>\n\n/** 提示框插槽的载荷:激活的阶段与缺省的内容模型。 */\nexport interface FunnelChartTooltipSlotProps {\n active: ChartDatumDetails | null\n tooltip: FunnelTooltipModel | null\n}\n\n/** 一个场景标记画成 SVG 元素;文字标记带文字。 */\nfunction renderMark(api: FunnelChartApi, mark: ChartMark): VNode {\n const props = { ...api.getMarkProps(mark) as Record<string, unknown>, key: mark.key }\n if (mark.kind === 'group')\n return h('g', props, mark.children.map(child => renderMark(api, child)))\n if (mark.kind === 'text')\n return h('text', props, mark.text)\n return h('path', props)\n}\n\n/** 缺省的提示框内容:头部是阶段名,下面是数值与两种转化率。 */\nfunction renderTooltipContent(api: FunnelChartApi): VNode[] {\n const tooltip = api.tooltip\n if (!tooltip)\n return []\n return [\n h('div', api.getTooltipHeaderProps() as Record<string, unknown>, tooltip.header),\n ...tooltip.rows.map(row => h('div', { ...api.getTooltipRowProps(row) as Record<string, unknown>, key: row.key }, [\n h('span', api.getTooltipSwatchProps(row) as Record<string, unknown>),\n h('span', api.getTooltipValueProps(row) as Record<string, unknown>, row.value),\n h('span', api.getTooltipNameProps(row) as Record<string, unknown>, row.name),\n ])),\n ]\n}\n\n/** 摘要与数据表:由根自动生成、视觉隐藏,保证无障碍等价物始终存在。 */\nfunction renderA11y(api: FunnelChartApi): VNode[] {\n const { columns, rows } = api.table\n return [\n h('p', api.getSummaryProps() as Record<string, unknown>, api.summary),\n h('table', api.getTableProps() as Record<string, unknown>, [\n h('caption', api.tableCaption),\n h('thead', [h('tr', columns.map(column => h('th', { key: column.id, scope: 'col' }, column.label)))]),\n h('tbody', rows.map((row, i) => h('tr', { key: i }, row.cells.map((cell, c) =>\n c === 0 ? h('th', { key: c, scope: 'row' }, cell.text) : h('td', { key: c }, cell.text))))),\n ]),\n ]\n}\n\n/** 标题:图表的可及名来源。 */\nexport const XhFunnelChartCaption = defineComponent({\n name: 'XhFunnelChartCaption',\n setup(_, { slots }) {\n const ctx = useFunnelChartContext()\n return () => h('figcaption', ctx.api.value.getCaptionProps() as Record<string, unknown>, slots.default?.())\n },\n})\n\n/** 视口:尺寸观测的宿主,块尺寸由组件槽决定。 */\nexport const XhFunnelChartViewport = defineComponent({\n name: 'XhFunnelChartViewport',\n setup(_, { slots }) {\n const ctx = useFunnelChartContext()\n return () => h('div', {\n ...ctx.api.value.getViewportProps() as Record<string, unknown>,\n ref: (el: unknown) => { ctx.viewportRef.value = el as HTMLElement },\n }, slots.default?.())\n },\n})\n\n/** 绘图区:阶段在下,阶段标签与转化率在上,焦点环最上。 */\nexport const XhFunnelChartPlot = defineComponent({\n name: 'XhFunnelChartPlot',\n setup() {\n const ctx = useFunnelChartContext()\n return () => {\n const api = ctx.api.value\n const marks = [...api.scene.layers.data, ...api.scene.layers.front, ...api.overlay.over]\n return h('svg', api.getPlotProps() as Record<string, unknown>, marks.map(mark => renderMark(api, mark)))\n }\n },\n})\n\n/** 提示框:缺省内容按激活的阶段生成,作用域插槽可替换。 */\nexport const XhFunnelChartTooltip = defineComponent({\n name: 'XhFunnelChartTooltip',\n slots: Object as SlotsType<{\n default?: (props: FunnelChartTooltipSlotProps) => VNode[]\n }>,\n setup(_, { slots }) {\n const ctx = useFunnelChartContext()\n return () => {\n const api = ctx.api.value\n return h('div', api.getTooltipProps() as Record<string, unknown>, slots.default\n ? slots.default({ active: api.active, tooltip: api.tooltip })\n : renderTooltipContent(api))\n }\n },\n})\n\n/** 空态:没有可画的数据时显示,缺省文字取文案。 */\nexport const XhFunnelChartEmpty = defineComponent({\n name: 'XhFunnelChartEmpty',\n setup(_, { slots }) {\n const ctx = useFunnelChartContext()\n return () => h('div', ctx.api.value.getEmptyProps() as Record<string, unknown>, slots.default?.() ?? ctx.api.value.emptyText)\n },\n})\n\n/** 根:铺开缺省结构或交给默认插槽,并在末尾追加摘要与数据表。 */\nexport const XhFunnelChartRoot = defineComponent({\n name: 'XhFunnelChartRoot',\n // 缺省值由机器与 connect 决定;普通类型省略 default,Boolean 显式保留 undefined\n props: {\n data: { type: Array as PropType<readonly ChartRow[]> },\n nameField: { type: String },\n valueField: { type: String },\n shape: { type: String as PropType<FunnelShape> },\n align: { type: String as PropType<FunnelAlign> },\n direction: { type: String as PropType<FunnelDirection> },\n conversion: { type: String as PropType<FunnelConversion> },\n labels: { type: String as PropType<FunnelLabels> },\n palette: { type: String as PropType<ChartPalette> },\n format: { type: [Object, Function] as PropType<NumberFormatSpec | ((value: number) => string)> },\n hiddenSeries: { type: Array as PropType<string[]> },\n defaultHiddenSeries: { type: Array as PropType<string[]> },\n activeKey: { type: [String, Number, Date, null] as PropType<ChartKey | null> },\n pending: { type: Boolean, default: undefined },\n animated: { type: Boolean, default: undefined },\n locale: { type: String },\n translations: { type: Object as PropType<Partial<FunnelChartTranslations>> },\n },\n // hidden-series-change / active-key-change 携带 details;update:* 携带裸值,支持 v-model\n emits: {\n 'hidden-series-change': (_details: PayloadOf<FunnelChartProps, 'onHiddenSeriesChange'>) => true,\n 'update:hiddenSeries': (_hidden: PayloadOf<FunnelChartProps, 'onHiddenSeriesChange'>['hiddenSeries']) => true,\n 'active-key-change': (_details: PayloadOf<FunnelChartProps, 'onActiveKeyChange'>) => true,\n 'update:activeKey': (_key: PayloadOf<FunnelChartProps, 'onActiveKeyChange'>['activeKey']) => true,\n 'datum-active': (_details: PayloadOf<FunnelChartProps, 'onDatumActive'>) => true,\n 'datum-press': (_details: PayloadOf<FunnelChartProps, 'onDatumPress'>) => true,\n },\n slots: Object as SlotsType<{\n /** 自行摆放部件;不写时铺开缺省结构:视口(绘图区与空态)、提示框。 */\n default?: (props: FunnelChartRootSlotProps) => VNode[]\n /** 缺省结构里的标题内容。 */\n caption?: () => VNode[]\n /** 缺省结构里的提示框内容。 */\n tooltip?: (props: FunnelChartTooltipSlotProps) => VNode[]\n /** 缺省结构里的空态内容。 */\n empty?: () => VNode[]\n }>,\n setup(props, { slots, emit }) {\n const ctx = useFunnelChart(withXhConfig('funnel-chart', props) as FunnelChartProps, {\n onHiddenSeriesChange: (details) => {\n emit('hidden-series-change', details)\n emit('update:hiddenSeries', details.hiddenSeries)\n },\n onActiveKeyChange: (details) => {\n emit('active-key-change', details)\n emit('update:activeKey', details.activeKey)\n },\n onDatumActive: details => emit('datum-active', details),\n onDatumPress: details => emit('datum-press', details),\n })\n provideFunnelChart(ctx)\n return () => {\n const api = ctx.api.value\n const content = slots.default\n ? slots.default({\n active: api.active,\n tooltip: api.tooltip,\n empty: api.empty,\n table: api.table,\n hiddenSeries: api.hiddenSeries,\n activeKey: api.activeKey,\n toggleSeries: api.toggleSeries,\n setFocusedDatum: api.setFocusedDatum,\n })\n : [\n ...(slots.caption ? [h(XhFunnelChartCaption, null, () => slots.caption?.())] : []),\n // 空态放进视口:叠在绘图区上,标题与图例不被盖住\n h(XhFunnelChartViewport, null, () => [\n h(XhFunnelChartPlot),\n h(XhFunnelChartEmpty, null, slots.empty ? () => slots.empty?.() : undefined),\n ]),\n h(XhFunnelChartTooltip, null, slots.tooltip ? { default: slots.tooltip } : undefined),\n ]\n return h('figure', {\n ...api.getRootProps() as Record<string, unknown>,\n ref: (el: unknown) => { ctx.rootRef.value = el as HTMLElement },\n }, [...content, ...renderA11y(api)])\n }\n },\n})\n"],"mappings":"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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from "vue";
|
|
2
|
+
import { Service } from "@xihan-ui/core";
|
|
3
|
+
import { FunnelChartApi, FunnelChartSchema } from "@xihan-ui/headless";
|
|
4
|
+
//#region src/components/funnel-chart/use-funnel-chart.d.ts
|
|
5
|
+
/** 对外的回调:由外壳(emit)或组合式调用方提供,随 props 一并喂给机器。 */
|
|
6
|
+
type FunnelChartNotifiers = Pick<FunnelChartSchema['props'], 'onHiddenSeriesChange' | 'onActiveKeyChange' | 'onDatumActive' | 'onDatumPress'>;
|
|
7
|
+
interface FunnelChartContext {
|
|
8
|
+
api: ComputedRef<FunnelChartApi>;
|
|
9
|
+
service: Service<FunnelChartSchema>;
|
|
10
|
+
/** 根:机器在它上面读度量私有槽。 */
|
|
11
|
+
rootRef: Ref<HTMLElement | null>;
|
|
12
|
+
/** 视口:尺寸观测的宿主。 */
|
|
13
|
+
viewportRef: Ref<HTMLElement | null>;
|
|
14
|
+
}
|
|
15
|
+
/** 量测、度量与文字度量器都在状态机的效应里做,DOM 取值口经 refs 交入。 */
|
|
16
|
+
declare function useFunnelChart(props: FunnelChartSchema['props'], notify?: FunnelChartNotifiers): FunnelChartContext;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { FunnelChartContext, FunnelChartNotifiers, useFunnelChart };
|
|
19
|
+
//# sourceMappingURL=use-funnel-chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-funnel-chart.d.ts","names":[],"sources":["../../../src/components/funnel-chart/use-funnel-chart.ts"],"mappings":";;;;;KAgBY,uBAAuB,KACjC;UAIe;EACf,KAAK,YAAY;EACjB,SAAS,QAAQ;;EAEjB,SAAS,IAAI;;EAEb,aAAa,IAAI;;;iBAIH,eACd,OAAO,4BACP,SAAS,uBACR"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { vueNormalize } from "../../runtime/normalize-props.js";
|
|
2
|
+
import { useMachine } from "../../runtime/use-machine.js";
|
|
3
|
+
import { computed, ref } from "vue";
|
|
4
|
+
import { connectFunnelChart, funnelChartMachine } from "@xihan-ui/headless";
|
|
5
|
+
//#region src/components/funnel-chart/use-funnel-chart.ts
|
|
6
|
+
/** 量测、度量与文字度量器都在状态机的效应里做,DOM 取值口经 refs 交入。 */
|
|
7
|
+
function useFunnelChart(props, notify) {
|
|
8
|
+
const rootRef = ref(null);
|
|
9
|
+
const viewportRef = ref(null);
|
|
10
|
+
const service = useMachine(funnelChartMachine, () => ({
|
|
11
|
+
...props,
|
|
12
|
+
...notify
|
|
13
|
+
}));
|
|
14
|
+
service.refs.set("getRootEl", () => rootRef.value);
|
|
15
|
+
service.refs.set("getViewportEl", () => viewportRef.value);
|
|
16
|
+
return {
|
|
17
|
+
api: computed(() => connectFunnelChart(service, vueNormalize)),
|
|
18
|
+
service,
|
|
19
|
+
rootRef,
|
|
20
|
+
viewportRef
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { useFunnelChart };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=use-funnel-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-funnel-chart.js","names":[],"sources":["../../../src/components/funnel-chart/use-funnel-chart.ts"],"sourcesContent":["/*\n * Copyright (c) 2021-Present XiHanFun and contributors.\n * Licensed under the MIT License. See LICENSE in the project root for license information.\n */\n\n// 提供 use funnel chart 相关实现。\n\nimport type { Service } from '@xihan-ui/core'\nimport type { FunnelChartApi, FunnelChartSchema } from '@xihan-ui/headless'\nimport type { ComputedRef, Ref } from 'vue'\nimport { connectFunnelChart, funnelChartMachine } from '@xihan-ui/headless'\nimport { computed, ref } from 'vue'\nimport { vueNormalize } from '../../runtime/normalize-props'\nimport { useMachine } from '../../runtime/use-machine'\n\n/** 对外的回调:由外壳(emit)或组合式调用方提供,随 props 一并喂给机器。 */\nexport type FunnelChartNotifiers = Pick<\n FunnelChartSchema['props'],\n 'onHiddenSeriesChange' | 'onActiveKeyChange' | 'onDatumActive' | 'onDatumPress'\n>\n\nexport interface FunnelChartContext {\n api: ComputedRef<FunnelChartApi>\n service: Service<FunnelChartSchema>\n /** 根:机器在它上面读度量私有槽。 */\n rootRef: Ref<HTMLElement | null>\n /** 视口:尺寸观测的宿主。 */\n viewportRef: Ref<HTMLElement | null>\n}\n\n/** 量测、度量与文字度量器都在状态机的效应里做,DOM 取值口经 refs 交入。 */\nexport function useFunnelChart(\n props: FunnelChartSchema['props'],\n notify?: FunnelChartNotifiers,\n): FunnelChartContext {\n const rootRef = ref<HTMLElement | null>(null)\n const viewportRef = ref<HTMLElement | null>(null)\n // 传响应式 props 对象本身而非快照,供机器每次读时重新展开\n const service = useMachine(funnelChartMachine, () => ({ ...props, ...notify }))\n service.refs.set('getRootEl', () => rootRef.value)\n service.refs.set('getViewportEl', () => viewportRef.value)\n const api = computed(() => connectFunnelChart(service, vueNormalize))\n return { api, service, rootRef, viewportRef }\n}\n"],"mappings":";;;;;;AA+BA,SAAgB,eACd,OACA,QACoB;CACpB,MAAM,UAAU,IAAwB,IAAI;CAC5C,MAAM,cAAc,IAAwB,IAAI;CAEhD,MAAM,UAAU,WAAW,2BAA2B;EAAE,GAAG;EAAO,GAAG;CAAO,EAAE;CAC9E,QAAQ,KAAK,IAAI,mBAAmB,QAAQ,KAAK;CACjD,QAAQ,KAAK,IAAI,uBAAuB,YAAY,KAAK;CAEzD,OAAO;EAAE,KADG,eAAe,mBAAmB,SAAS,YAAY,CACxD;EAAG;EAAS;EAAS;CAAY;AAC9C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { inject, provide } from "vue";
|
|
2
|
+
//#region src/components/graph-chart/context.ts
|
|
3
|
+
const KEY = Symbol.for("xh-graph-chart");
|
|
4
|
+
function provideGraphChart(ctx) {
|
|
5
|
+
provide(KEY, ctx);
|
|
6
|
+
}
|
|
7
|
+
function useGraphChartContext() {
|
|
8
|
+
const ctx = inject(KEY, null);
|
|
9
|
+
if (!ctx) throw new Error("[xh] GraphChart 部件必须用在 XhGraphChartRoot 内");
|
|
10
|
+
return ctx;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { provideGraphChart, useGraphChartContext };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","names":[],"sources":["../../../src/components/graph-chart/context.ts"],"sourcesContent":["/*\n * Copyright (c) 2021-Present XiHanFun and contributors.\n * Licensed under the MIT License. See LICENSE in the project root for license information.\n */\n\n// 提供 context 相关实现。\n\nimport type { InjectionKey } from 'vue'\nimport type { GraphChartContext } from './use-graph-chart'\nimport { inject, provide } from 'vue'\n\nconst KEY: InjectionKey<GraphChartContext> = Symbol.for('xh-graph-chart')\n\nexport function provideGraphChart(ctx: GraphChartContext): void {\n provide(KEY, ctx)\n}\n\nexport function useGraphChartContext(): GraphChartContext {\n const ctx = inject(KEY, null)\n if (!ctx)\n throw new Error('[xh] GraphChart 部件必须用在 XhGraphChartRoot 内')\n return ctx\n}\n"],"mappings":";;AAWA,MAAM,MAAuC,OAAO,IAAI,gBAAgB;AAExE,SAAgB,kBAAkB,KAA8B;CAC9D,QAAQ,KAAK,GAAG;AAClB;AAEA,SAAgB,uBAA0C;CACxD,MAAM,MAAM,OAAO,KAAK,IAAI;CAC5B,IAAI,CAAC,KACH,MAAM,IAAI,MAAM,2CAA2C;CAC7D,OAAO;AACT"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { PayloadOf } from "../../runtime/payload.js";
|
|
2
|
+
import { PropType, SlotsType, VNode } from "vue";
|
|
3
|
+
import { ChartDatumDetails, ChartKey, GraphChartApi, GraphChartSchema, GraphChartTranslations, GraphLayout, GraphLinkDatum, GraphNodeDatum, GraphTooltipModel, GraphView, NumberFormatSpec } from "@xihan-ui/headless";
|
|
4
|
+
//#region src/components/graph-chart/graph-chart.d.ts
|
|
5
|
+
type GraphChartProps = GraphChartSchema['props'];
|
|
6
|
+
/** 默认插槽的载荷:自行摆放部件时用得上的状态与动作。 */
|
|
7
|
+
type GraphChartRootSlotProps = Pick<GraphChartApi, 'legendItems' | 'active' | 'tooltip' | 'empty' | 'hiddenSeries' | 'activeKey' | 'view' | 'toggleSeries' | 'zoomBy' | 'resetView' | 'setFocusedDatum' | 'table'>;
|
|
8
|
+
/** 提示框插槽的载荷:激活的节点与缺省的内容模型。 */
|
|
9
|
+
interface GraphChartTooltipSlotProps {
|
|
10
|
+
active: ChartDatumDetails | null;
|
|
11
|
+
tooltip: GraphTooltipModel | null;
|
|
12
|
+
}
|
|
13
|
+
/** 标题:图表的可及名来源。 */
|
|
14
|
+
declare const XhGraphChartCaption: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
/** 图例:项由组件按分组生成;不到两组时整条收起。 */
|
|
18
|
+
declare const XhGraphChartLegend: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
21
|
+
/** 视口:尺寸观测的宿主,块尺寸由组件槽决定。 */
|
|
22
|
+
declare const XhGraphChartViewport: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
25
|
+
/** 绘图区:连线在下,箭头其上,节点再上,节点名与焦点环最上。 */
|
|
26
|
+
declare const XhGraphChartPlot: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
29
|
+
/** 提示框:缺省内容按激活的节点生成,作用域插槽可替换。 */
|
|
30
|
+
declare const XhGraphChartTooltip: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, SlotsType<{
|
|
33
|
+
default?: (props: GraphChartTooltipSlotProps) => VNode[];
|
|
34
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
35
|
+
/** 空态:没有可画的数据时显示,缺省文字取文案。 */
|
|
36
|
+
declare const XhGraphChartEmpty: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
39
|
+
/** 根:铺开缺省结构或交给默认插槽,并在末尾追加摘要与数据表。 */
|
|
40
|
+
declare const XhGraphChartRoot: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
41
|
+
nodes: {
|
|
42
|
+
type: PropType<readonly GraphNodeDatum[]>;
|
|
43
|
+
};
|
|
44
|
+
links: {
|
|
45
|
+
type: PropType<readonly GraphLinkDatum[]>;
|
|
46
|
+
};
|
|
47
|
+
layout: {
|
|
48
|
+
type: PropType<GraphLayout>;
|
|
49
|
+
};
|
|
50
|
+
root: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
};
|
|
53
|
+
directed: {
|
|
54
|
+
type: BooleanConstructor;
|
|
55
|
+
default: undefined;
|
|
56
|
+
};
|
|
57
|
+
draggableNodes: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: undefined;
|
|
60
|
+
};
|
|
61
|
+
zoom: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: undefined;
|
|
64
|
+
};
|
|
65
|
+
/** 画布视图:给了即受控,配合 v-model:view。 */
|
|
66
|
+
view: {
|
|
67
|
+
type: PropType<GraphView>;
|
|
68
|
+
};
|
|
69
|
+
defaultView: {
|
|
70
|
+
type: PropType<GraphView>;
|
|
71
|
+
};
|
|
72
|
+
format: {
|
|
73
|
+
type: PropType<NumberFormatSpec | ((value: number) => string)>;
|
|
74
|
+
};
|
|
75
|
+
hiddenSeries: {
|
|
76
|
+
type: PropType<string[]>;
|
|
77
|
+
};
|
|
78
|
+
defaultHiddenSeries: {
|
|
79
|
+
type: PropType<string[]>;
|
|
80
|
+
};
|
|
81
|
+
activeKey: {
|
|
82
|
+
type: PropType<ChartKey | null>;
|
|
83
|
+
};
|
|
84
|
+
pending: {
|
|
85
|
+
type: BooleanConstructor;
|
|
86
|
+
default: undefined;
|
|
87
|
+
};
|
|
88
|
+
animated: {
|
|
89
|
+
type: BooleanConstructor;
|
|
90
|
+
default: undefined;
|
|
91
|
+
};
|
|
92
|
+
locale: {
|
|
93
|
+
type: StringConstructor;
|
|
94
|
+
};
|
|
95
|
+
translations: {
|
|
96
|
+
type: PropType<Partial<GraphChartTranslations>>;
|
|
97
|
+
};
|
|
98
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
99
|
+
[key: string]: any;
|
|
100
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
101
|
+
'hidden-series-change': (_details: PayloadOf<GraphChartProps, "onHiddenSeriesChange">) => true;
|
|
102
|
+
'update:hiddenSeries': (_hidden: PayloadOf<GraphChartProps, "onHiddenSeriesChange">["hiddenSeries"]) => true;
|
|
103
|
+
'active-key-change': (_details: PayloadOf<GraphChartProps, "onActiveKeyChange">) => true;
|
|
104
|
+
'update:activeKey': (_key: PayloadOf<GraphChartProps, "onActiveKeyChange">["activeKey"]) => true;
|
|
105
|
+
'datum-active': (_details: PayloadOf<GraphChartProps, "onDatumActive">) => true;
|
|
106
|
+
'datum-press': (_details: PayloadOf<GraphChartProps, "onDatumPress">) => true;
|
|
107
|
+
'view-change': (_details: PayloadOf<GraphChartProps, "onViewChange">) => true;
|
|
108
|
+
'update:view': (_view: PayloadOf<GraphChartProps, "onViewChange">["view"]) => true;
|
|
109
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
110
|
+
nodes: {
|
|
111
|
+
type: PropType<readonly GraphNodeDatum[]>;
|
|
112
|
+
};
|
|
113
|
+
links: {
|
|
114
|
+
type: PropType<readonly GraphLinkDatum[]>;
|
|
115
|
+
};
|
|
116
|
+
layout: {
|
|
117
|
+
type: PropType<GraphLayout>;
|
|
118
|
+
};
|
|
119
|
+
root: {
|
|
120
|
+
type: StringConstructor;
|
|
121
|
+
};
|
|
122
|
+
directed: {
|
|
123
|
+
type: BooleanConstructor;
|
|
124
|
+
default: undefined;
|
|
125
|
+
};
|
|
126
|
+
draggableNodes: {
|
|
127
|
+
type: BooleanConstructor;
|
|
128
|
+
default: undefined;
|
|
129
|
+
};
|
|
130
|
+
zoom: {
|
|
131
|
+
type: BooleanConstructor;
|
|
132
|
+
default: undefined;
|
|
133
|
+
};
|
|
134
|
+
/** 画布视图:给了即受控,配合 v-model:view。 */
|
|
135
|
+
view: {
|
|
136
|
+
type: PropType<GraphView>;
|
|
137
|
+
};
|
|
138
|
+
defaultView: {
|
|
139
|
+
type: PropType<GraphView>;
|
|
140
|
+
};
|
|
141
|
+
format: {
|
|
142
|
+
type: PropType<NumberFormatSpec | ((value: number) => string)>;
|
|
143
|
+
};
|
|
144
|
+
hiddenSeries: {
|
|
145
|
+
type: PropType<string[]>;
|
|
146
|
+
};
|
|
147
|
+
defaultHiddenSeries: {
|
|
148
|
+
type: PropType<string[]>;
|
|
149
|
+
};
|
|
150
|
+
activeKey: {
|
|
151
|
+
type: PropType<ChartKey | null>;
|
|
152
|
+
};
|
|
153
|
+
pending: {
|
|
154
|
+
type: BooleanConstructor;
|
|
155
|
+
default: undefined;
|
|
156
|
+
};
|
|
157
|
+
animated: {
|
|
158
|
+
type: BooleanConstructor;
|
|
159
|
+
default: undefined;
|
|
160
|
+
};
|
|
161
|
+
locale: {
|
|
162
|
+
type: StringConstructor;
|
|
163
|
+
};
|
|
164
|
+
translations: {
|
|
165
|
+
type: PropType<Partial<GraphChartTranslations>>;
|
|
166
|
+
};
|
|
167
|
+
}>> & Readonly<{
|
|
168
|
+
"onHidden-series-change"?: ((_details: import("@xihan-ui/headless").ChartHiddenSeriesChangeDetails) => any) | undefined;
|
|
169
|
+
"onUpdate:hiddenSeries"?: ((_hidden: string[]) => any) | undefined;
|
|
170
|
+
"onActive-key-change"?: ((_details: import("@xihan-ui/headless").ChartActiveKeyChangeDetails) => any) | undefined;
|
|
171
|
+
"onUpdate:activeKey"?: ((_key: ChartKey | null) => any) | undefined;
|
|
172
|
+
"onDatum-active"?: ((_details: ChartDatumDetails | null) => any) | undefined;
|
|
173
|
+
"onDatum-press"?: ((_details: ChartDatumDetails) => any) | undefined;
|
|
174
|
+
"onView-change"?: ((_details: import("@xihan-ui/headless").GraphViewChangeDetails) => any) | undefined;
|
|
175
|
+
"onUpdate:view"?: ((_view: GraphView) => any) | undefined;
|
|
176
|
+
}>, {
|
|
177
|
+
pending: boolean;
|
|
178
|
+
zoom: boolean;
|
|
179
|
+
animated: boolean;
|
|
180
|
+
directed: boolean;
|
|
181
|
+
draggableNodes: boolean;
|
|
182
|
+
}, SlotsType<{
|
|
183
|
+
/** 自行摆放部件;不写时铺开缺省结构:图例、视口(绘图区与空态)、提示框。 */
|
|
184
|
+
default?: (props: GraphChartRootSlotProps) => VNode[];
|
|
185
|
+
/** 缺省结构里的标题内容。 */
|
|
186
|
+
caption?: () => VNode[];
|
|
187
|
+
/** 缺省结构里的提示框内容。 */
|
|
188
|
+
tooltip?: (props: GraphChartTooltipSlotProps) => VNode[];
|
|
189
|
+
/** 缺省结构里的空态内容。 */
|
|
190
|
+
empty?: () => VNode[];
|
|
191
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
192
|
+
//#endregion
|
|
193
|
+
export { GraphChartRootSlotProps, GraphChartTooltipSlotProps, XhGraphChartCaption, XhGraphChartEmpty, XhGraphChartLegend, XhGraphChartPlot, XhGraphChartRoot, XhGraphChartTooltip, XhGraphChartViewport };
|
|
194
|
+
//# sourceMappingURL=graph-chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-chart.d.ts","names":[],"sources":["../../../src/components/graph-chart/graph-chart.ts"],"mappings":";;;;KA4BK,kBAAkB;;KAGX,0BAA0B,KAAK;;UAG1B;EACf,QAAQ;EACR,SAAS;;;cA0CE,mCAAmB,0BAAA,oBAAA,4BAAA;;8BAM9B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;;cAGW,kCAAkB,0BAAA,oBAAA,4BAAA;;8BAa7B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;;cAGW,oCAAoB,0BAAA,oBAAA,4BAAA;;8BAS/B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;;cAGW,gCAAgB,0BAAA,oBAAA,4BAAA;;8BAU3B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;;cAGW,mCAAmB,0BAAA,oBAAA,4BAAA;;;EAGlB,WAAC,OAAO,+BAA+B;kCAWnD;;cAGW,iCAAiB,0BAAA,oBAAA,4BAAA;;8BAM5B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;;cAGW,gCAAgB,8BAAA;;IAID,MAAA,kBAAkB;;;IAClB,MAAA,kBAAkB;;;IAChB,MAAA,SAAS;;;;;;;;;;;;;;;;;;;IAMX,MAAA,SAAS;;;IACF,MAAA,SAAS;;;IACF,MAAA,SAAS,qBAAqB;;;IACrC,MAAA;;;IACO,MAAA;;;IACa,MAAA,SAAS;;;;;;;;;;;;;;IAI5B,MAAA,SAAS,QAAQ;;;;;EAId,yBAAA,UAAA,UAAU;EACZ,wBAAA,SAAA,UAAU;EACX,sBAAA,UAAA,UAAU;EACf,qBAAA,MAAA,UAAU;EACV,iBAAA,UAAA,UAAU;EACX,gBAAA,UAAA,UAAU;EACV,gBAAA,UAAA,UAAU;EACb,gBAAA,OAAA,UAAU;;;IA5BT,MAAA,kBAAkB;;;IAClB,MAAA,kBAAkB;;;IAChB,MAAA,SAAS;;;;;;;;;;;;;;;;;;;IAMX,MAAA,SAAS;;;IACF,MAAA,SAAS;;;IACF,MAAA,SAAS,qBAAqB;;;IACrC,MAAA;;;IACO,MAAA;;;IACa,MAAA,SAAS;;;;;;;;;;;;;;IAI5B,MAAA,SAAS,QAAQ;;;;;;;;;;;;;;;;;;;EAevC,WAAC,OAAO,4BAA4B;;EAEpC,gBAAM;;EAEN,WAAC,OAAO,+BAA+B;;EAEzC,cAAM;kCAqDhB"}
|