@rdeam/qui 2.0.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 +59 -0
- package/es/_virtual/_@oxc-project_runtime@0.127.0/helpers/defineProperty.mjs +12 -0
- package/es/_virtual/_@oxc-project_runtime@0.127.0/helpers/toPrimitive.mjs +14 -0
- package/es/_virtual/_@oxc-project_runtime@0.127.0/helpers/toPropertyKey.mjs +9 -0
- package/es/_virtual/_@oxc-project_runtime@0.127.0/helpers/typeof.mjs +11 -0
- package/es/component.d.ts +3 -0
- package/es/component.mjs +39 -0
- package/es/component.mjs.map +1 -0
- package/es/components/date-picker/index.d.ts +6 -0
- package/es/components/date-picker/index.mjs +9 -0
- package/es/components/date-picker/index.mjs.map +1 -0
- package/es/components/date-picker/src/date-picker.d.ts +19 -0
- package/es/components/date-picker/src/date-picker.mjs +28 -0
- package/es/components/date-picker/src/date-picker.mjs.map +1 -0
- package/es/components/date-picker/src/date-picker.vue.d.ts +33 -0
- package/es/components/date-picker/src/date-picker.vue.mjs +7 -0
- package/es/components/date-picker/src/date-picker.vue.mjs.map +1 -0
- package/es/components/date-picker/src/date-picker.vue_vue_type_script_setup_true_lang.mjs +42 -0
- package/es/components/date-picker/src/date-picker.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/date-picker/src/instance.d.ts +2 -0
- package/es/components/date-picker/src/instance.mjs +0 -0
- package/es/components/date-picker/style/index.d.ts +1 -0
- package/es/components/descriptions/index.d.ts +6 -0
- package/es/components/descriptions/index.mjs +9 -0
- package/es/components/descriptions/index.mjs.map +1 -0
- package/es/components/descriptions/src/descriptions.d.ts +42 -0
- package/es/components/descriptions/src/descriptions.mjs +86 -0
- package/es/components/descriptions/src/descriptions.mjs.map +1 -0
- package/es/components/descriptions/src/idescriptions.d.ts +72 -0
- package/es/components/descriptions/src/idescriptions.mjs +55 -0
- package/es/components/descriptions/src/idescriptions.mjs.map +1 -0
- package/es/components/descriptions/src/instance.d.ts +2 -0
- package/es/components/descriptions/src/instance.mjs +0 -0
- package/es/components/descriptions/style/index.d.ts +1 -0
- package/es/components/ellipsis-tag/index.d.ts +6 -0
- package/es/components/ellipsis-tag/index.mjs +9 -0
- package/es/components/ellipsis-tag/index.mjs.map +1 -0
- package/es/components/ellipsis-tag/src/ellipsis-tag.d.ts +20 -0
- package/es/components/ellipsis-tag/src/ellipsis-tag.mjs +19 -0
- package/es/components/ellipsis-tag/src/ellipsis-tag.mjs.map +1 -0
- package/es/components/ellipsis-tag/src/ellipsis-tag.vue.d.ts +51 -0
- package/es/components/ellipsis-tag/src/ellipsis-tag.vue.mjs +7 -0
- package/es/components/ellipsis-tag/src/ellipsis-tag.vue.mjs.map +1 -0
- package/es/components/ellipsis-tag/src/ellipsis-tag.vue_vue_type_script_setup_true_lang.mjs +74 -0
- package/es/components/ellipsis-tag/src/ellipsis-tag.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/ellipsis-tag/src/instance.d.ts +2 -0
- package/es/components/ellipsis-tag/src/instance.mjs +0 -0
- package/es/components/ellipsis-tag/style/index.d.ts +1 -0
- package/es/components/empty/index.d.ts +6 -0
- package/es/components/empty/index.mjs +9 -0
- package/es/components/empty/index.mjs.map +1 -0
- package/es/components/empty/src/empty.d.ts +86 -0
- package/es/components/empty/src/empty.mjs +158 -0
- package/es/components/empty/src/empty.mjs.map +1 -0
- package/es/components/empty/src/iempty.d.ts +41 -0
- package/es/components/empty/src/iempty.mjs +44 -0
- package/es/components/empty/src/iempty.mjs.map +1 -0
- package/es/components/empty/src/instance.d.ts +2 -0
- package/es/components/empty/src/instance.mjs +0 -0
- package/es/components/empty/style/index.d.ts +1 -0
- package/es/components/index.d.ts +16 -0
- package/es/components/index.mjs +33 -0
- package/es/components/jdata-viewer/index.d.ts +6 -0
- package/es/components/jdata-viewer/index.mjs +9 -0
- package/es/components/jdata-viewer/index.mjs.map +1 -0
- package/es/components/jdata-viewer/src/ijdata-viewer.d.ts +40 -0
- package/es/components/jdata-viewer/src/ijdata-viewer.mjs +43 -0
- package/es/components/jdata-viewer/src/ijdata-viewer.mjs.map +1 -0
- package/es/components/jdata-viewer/src/instance.d.ts +2 -0
- package/es/components/jdata-viewer/src/instance.mjs +0 -0
- package/es/components/jdata-viewer/src/jdata-viewer.d.ts +87 -0
- package/es/components/jdata-viewer/src/jdata-viewer.mjs +125 -0
- package/es/components/jdata-viewer/src/jdata-viewer.mjs.map +1 -0
- package/es/components/jdata-viewer/src/use-view.d.ts +7 -0
- package/es/components/jdata-viewer/src/use-view.mjs +98 -0
- package/es/components/jdata-viewer/src/use-view.mjs.map +1 -0
- package/es/components/jdata-viewer/style/index.d.ts +1 -0
- package/es/components/radio/index.d.ts +6 -0
- package/es/components/radio/index.mjs +9 -0
- package/es/components/radio/index.mjs.map +1 -0
- package/es/components/radio/src/instance.d.ts +2 -0
- package/es/components/radio/src/instance.mjs +0 -0
- package/es/components/radio/src/radio.d.ts +16 -0
- package/es/components/radio/src/radio.mjs +37 -0
- package/es/components/radio/src/radio.mjs.map +1 -0
- package/es/components/radio/src/radio.vue.d.ts +25 -0
- package/es/components/radio/src/radio.vue.mjs +7 -0
- package/es/components/radio/src/radio.vue.mjs.map +1 -0
- package/es/components/radio/src/radio.vue_vue_type_script_setup_true_lang.mjs +44 -0
- package/es/components/radio/src/radio.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/radio/style/index.d.ts +1 -0
- package/es/components/remote-search/index.d.ts +6 -0
- package/es/components/remote-search/index.mjs +9 -0
- package/es/components/remote-search/index.mjs.map +1 -0
- package/es/components/remote-search/src/instance.d.ts +2 -0
- package/es/components/remote-search/src/instance.mjs +0 -0
- package/es/components/remote-search/src/iremote-search.d.ts +26 -0
- package/es/components/remote-search/src/iremote-search.mjs +94 -0
- package/es/components/remote-search/src/iremote-search.mjs.map +1 -0
- package/es/components/remote-search/src/remote-search.d.ts +72 -0
- package/es/components/remote-search/src/remote-search.mjs +191 -0
- package/es/components/remote-search/src/remote-search.mjs.map +1 -0
- package/es/components/remote-search/style/index.d.ts +1 -0
- package/es/components/search-form/index.d.ts +6 -0
- package/es/components/search-form/index.mjs +9 -0
- package/es/components/search-form/index.mjs.map +1 -0
- package/es/components/search-form/src/components/Grid/components/GridItem.vue.d.ts +33 -0
- package/es/components/search-form/src/components/Grid/components/GridItem.vue.mjs +7 -0
- package/es/components/search-form/src/components/Grid/components/GridItem.vue.mjs.map +1 -0
- package/es/components/search-form/src/components/Grid/components/GridItem.vue_vue_type_script_setup_true_lang.mjs +54 -0
- package/es/components/search-form/src/components/Grid/components/GridItem.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/search-form/src/components/Grid/index.vue.d.ts +28 -0
- package/es/components/search-form/src/components/Grid/index.vue.mjs +7 -0
- package/es/components/search-form/src/components/Grid/index.vue.mjs.map +1 -0
- package/es/components/search-form/src/components/Grid/index.vue_vue_type_script_setup_true_lang.mjs +62 -0
- package/es/components/search-form/src/components/Grid/index.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/search-form/src/components/Grid/interface/index.d.ts +5 -0
- package/es/components/search-form/src/components/Grid/interface/index.mjs +0 -0
- package/es/components/search-form/src/components/SearchFormItem.vue.d.ts +36 -0
- package/es/components/search-form/src/components/SearchFormItem.vue.mjs +7 -0
- package/es/components/search-form/src/components/SearchFormItem.vue.mjs.map +1 -0
- package/es/components/search-form/src/components/SearchFormItem.vue_vue_type_script_lang.mjs +103 -0
- package/es/components/search-form/src/components/SearchFormItem.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/search-form/src/instance.d.ts +2 -0
- package/es/components/search-form/src/instance.mjs +0 -0
- package/es/components/search-form/src/isearch-form.d.ts +76 -0
- package/es/components/search-form/src/isearch-form.mjs +63 -0
- package/es/components/search-form/src/isearch-form.mjs.map +1 -0
- package/es/components/search-form/src/search-form.d.ts +55 -0
- package/es/components/search-form/src/search-form.mjs +319 -0
- package/es/components/search-form/src/search-form.mjs.map +1 -0
- package/es/components/search-form/style/index.d.ts +1 -0
- package/es/components/sticky-container/index.d.ts +6 -0
- package/es/components/sticky-container/index.mjs +9 -0
- package/es/components/sticky-container/index.mjs.map +1 -0
- package/es/components/sticky-container/src/instance.d.ts +2 -0
- package/es/components/sticky-container/src/instance.mjs +0 -0
- package/es/components/sticky-container/src/isticky-container.d.ts +4 -0
- package/es/components/sticky-container/src/isticky-container.mjs +8 -0
- package/es/components/sticky-container/src/isticky-container.mjs.map +1 -0
- package/es/components/sticky-container/src/sticky-container.d.ts +2 -0
- package/es/components/sticky-container/src/sticky-container.mjs +32 -0
- package/es/components/sticky-container/src/sticky-container.mjs.map +1 -0
- package/es/components/sticky-container/style/index.d.ts +1 -0
- package/es/components/table/index.d.ts +6 -0
- package/es/components/table/index.mjs +9 -0
- package/es/components/table/index.mjs.map +1 -0
- package/es/components/table/src/components/Setting.vue.d.ts +30 -0
- package/es/components/table/src/components/Setting.vue.mjs +7 -0
- package/es/components/table/src/components/Setting.vue.mjs.map +1 -0
- package/es/components/table/src/components/Setting.vue_vue_type_script_setup_true_lang.mjs +67 -0
- package/es/components/table/src/components/Setting.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/table/src/components/TableColumn.vue.d.ts +15 -0
- package/es/components/table/src/components/TableColumn.vue.mjs +7 -0
- package/es/components/table/src/components/TableColumn.vue.mjs.map +1 -0
- package/es/components/table/src/components/TableColumn.vue_vue_type_script_setup_true_lang.mjs +132 -0
- package/es/components/table/src/components/TableColumn.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/table/src/instance.d.ts +2 -0
- package/es/components/table/src/instance.mjs +0 -0
- package/es/components/table/src/table.d.ts +84 -0
- package/es/components/table/src/table.mjs +139 -0
- package/es/components/table/src/table.mjs.map +1 -0
- package/es/components/table/src/table.vue.d.ts +384 -0
- package/es/components/table/src/table.vue.mjs +7 -0
- package/es/components/table/src/table.vue.mjs.map +1 -0
- package/es/components/table/src/table.vue_vue_type_script_setup_true_lang.mjs +143 -0
- package/es/components/table/src/table.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/table/src/use-controller.d.ts +10 -0
- package/es/components/table/src/use-controller.mjs +117 -0
- package/es/components/table/src/use-controller.mjs.map +1 -0
- package/es/components/table/src/use-table.d.ts +26 -0
- package/es/components/table/src/use-table.mjs +188 -0
- package/es/components/table/src/use-table.mjs.map +1 -0
- package/es/components/table/style/index.d.ts +1 -0
- package/es/components/table-editor/index.d.ts +6 -0
- package/es/components/table-editor/index.mjs +9 -0
- package/es/components/table-editor/index.mjs.map +1 -0
- package/es/components/table-editor/src/components/BaseItem.vue.d.ts +15 -0
- package/es/components/table-editor/src/components/BaseItem.vue.mjs +7 -0
- package/es/components/table-editor/src/components/BaseItem.vue.mjs.map +1 -0
- package/es/components/table-editor/src/components/BaseItem.vue_vue_type_script_lang.mjs +37 -0
- package/es/components/table-editor/src/components/BaseItem.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/table-editor/src/instance.d.ts +2 -0
- package/es/components/table-editor/src/instance.mjs +0 -0
- package/es/components/table-editor/src/table-editor.d.ts +45 -0
- package/es/components/table-editor/src/table-editor.mjs +24 -0
- package/es/components/table-editor/src/table-editor.mjs.map +1 -0
- package/es/components/table-editor/src/table-editor.vue.d.ts +82 -0
- package/es/components/table-editor/src/table-editor.vue.mjs +7 -0
- package/es/components/table-editor/src/table-editor.vue.mjs.map +1 -0
- package/es/components/table-editor/src/table-editor.vue_vue_type_script_setup_true_lang.mjs +75 -0
- package/es/components/table-editor/src/table-editor.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/table-editor/style/index.d.ts +1 -0
- package/es/components/tabs/index.d.ts +6 -0
- package/es/components/tabs/index.mjs +9 -0
- package/es/components/tabs/index.mjs.map +1 -0
- package/es/components/tabs/src/instance.d.ts +2 -0
- package/es/components/tabs/src/instance.mjs +0 -0
- package/es/components/tabs/src/itabs.d.ts +31 -0
- package/es/components/tabs/src/itabs.mjs +33 -0
- package/es/components/tabs/src/itabs.mjs.map +1 -0
- package/es/components/tabs/src/tabs.d.ts +55 -0
- package/es/components/tabs/src/tabs.mjs +58 -0
- package/es/components/tabs/src/tabs.mjs.map +1 -0
- package/es/components/tabs/style/index.d.ts +1 -0
- package/es/components/tarea-tag/index.d.ts +6 -0
- package/es/components/tarea-tag/index.mjs +9 -0
- package/es/components/tarea-tag/index.mjs.map +1 -0
- package/es/components/tarea-tag/src/instance.d.ts +2 -0
- package/es/components/tarea-tag/src/instance.mjs +0 -0
- package/es/components/tarea-tag/src/tarea-tag.d.ts +10 -0
- package/es/components/tarea-tag/src/tarea-tag.mjs +29 -0
- package/es/components/tarea-tag/src/tarea-tag.mjs.map +1 -0
- package/es/components/tarea-tag/src/tarea-tag.vue.d.ts +23 -0
- package/es/components/tarea-tag/src/tarea-tag.vue.mjs +7 -0
- package/es/components/tarea-tag/src/tarea-tag.vue.mjs.map +1 -0
- package/es/components/tarea-tag/src/tarea-tag.vue_vue_type_script_setup_true_lang.mjs +149 -0
- package/es/components/tarea-tag/src/tarea-tag.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/tarea-tag/style/index.d.ts +1 -0
- package/es/components/text-ellipsis/index.d.ts +5 -0
- package/es/components/text-ellipsis/index.mjs +9 -0
- package/es/components/text-ellipsis/index.mjs.map +1 -0
- package/es/components/text-ellipsis/src/instance.d.ts +2 -0
- package/es/components/text-ellipsis/src/instance.mjs +0 -0
- package/es/components/text-ellipsis/src/itext-ellipsis.d.ts +11 -0
- package/es/components/text-ellipsis/src/itext-ellipsis.mjs +16 -0
- package/es/components/text-ellipsis/src/itext-ellipsis.mjs.map +1 -0
- package/es/components/text-ellipsis/src/text-ellipsis.d.ts +25 -0
- package/es/components/text-ellipsis/src/text-ellipsis.mjs +115 -0
- package/es/components/text-ellipsis/src/text-ellipsis.mjs.map +1 -0
- package/es/components/text-ellipsis/src/use-window-size.d.ts +5 -0
- package/es/components/text-ellipsis/src/use-window-size.mjs +28 -0
- package/es/components/text-ellipsis/src/use-window-size.mjs.map +1 -0
- package/es/components/text-ellipsis/src/utils.d.ts +22 -0
- package/es/components/text-ellipsis/src/utils.mjs +26 -0
- package/es/components/text-ellipsis/src/utils.mjs.map +1 -0
- package/es/components/text-ellipsis/style/index.d.ts +1 -0
- package/es/components/time-line/index.d.ts +6 -0
- package/es/components/time-line/index.mjs +9 -0
- package/es/components/time-line/index.mjs.map +1 -0
- package/es/components/time-line/src/instance.d.ts +2 -0
- package/es/components/time-line/src/instance.mjs +0 -0
- package/es/components/time-line/src/time-line.d.ts +28 -0
- package/es/components/time-line/src/time-line.mjs +25 -0
- package/es/components/time-line/src/time-line.mjs.map +1 -0
- package/es/components/time-line/src/time-line.vue.d.ts +81 -0
- package/es/components/time-line/src/time-line.vue.mjs +7 -0
- package/es/components/time-line/src/time-line.vue.mjs.map +1 -0
- package/es/components/time-line/src/time-line.vue_vue_type_script_setup_true_lang.mjs +37 -0
- package/es/components/time-line/src/time-line.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/time-line/style/index.d.ts +1 -0
- package/es/components/uploader/index.d.ts +6 -0
- package/es/components/uploader/index.mjs +9 -0
- package/es/components/uploader/index.mjs.map +1 -0
- package/es/components/uploader/src/UploadInfo.vue.d.ts +30 -0
- package/es/components/uploader/src/UploadInfo.vue.mjs +7 -0
- package/es/components/uploader/src/UploadInfo.vue.mjs.map +1 -0
- package/es/components/uploader/src/UploadInfo.vue_vue_type_script_setup_true_lang.mjs +167 -0
- package/es/components/uploader/src/UploadInfo.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/uploader/src/instance.d.ts +2 -0
- package/es/components/uploader/src/instance.mjs +0 -0
- package/es/components/uploader/src/toast.d.ts +1 -0
- package/es/components/uploader/src/toast.mjs +37 -0
- package/es/components/uploader/src/toast.mjs.map +1 -0
- package/es/components/uploader/src/uploader.d.ts +32 -0
- package/es/components/uploader/src/uploader.mjs +104 -0
- package/es/components/uploader/src/uploader.mjs.map +1 -0
- package/es/components/uploader/src/uploader.vue.d.ts +98 -0
- package/es/components/uploader/src/uploader.vue.mjs +7 -0
- package/es/components/uploader/src/uploader.vue.mjs.map +1 -0
- package/es/components/uploader/src/uploader.vue_vue_type_script_setup_true_lang.mjs +48 -0
- package/es/components/uploader/src/uploader.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/uploader/src/use-uploader.d.ts +20 -0
- package/es/components/uploader/src/use-uploader.mjs +263 -0
- package/es/components/uploader/src/use-uploader.mjs.map +1 -0
- package/es/components/uploader/style/index.d.ts +1 -0
- package/es/defaults.d.ts +5 -0
- package/es/defaults.mjs +8 -0
- package/es/defaults.mjs.map +1 -0
- package/es/directives/copy/index.d.ts +3 -0
- package/es/directives/copy/index.mjs +31 -0
- package/es/directives/copy/index.mjs.map +1 -0
- package/es/directives/draggable/index.d.ts +3 -0
- package/es/directives/draggable/index.mjs +28 -0
- package/es/directives/draggable/index.mjs.map +1 -0
- package/es/directives/index.d.ts +4 -0
- package/es/directives/index.mjs +5 -0
- package/es/directives/longpress/index.d.ts +7 -0
- package/es/directives/longpress/index.mjs +32 -0
- package/es/directives/longpress/index.mjs.map +1 -0
- package/es/directives/resize-element/index.d.ts +3 -0
- package/es/directives/resize-element/index.mjs +30 -0
- package/es/directives/resize-element/index.mjs.map +1 -0
- package/es/directives/show-tip/index.d.ts +3 -0
- package/es/directives/show-tip/index.mjs +19 -0
- package/es/directives/show-tip/index.mjs.map +1 -0
- package/es/hooks/_configurable.d.ts +27 -0
- package/es/hooks/_configurable.mjs +10 -0
- package/es/hooks/_configurable.mjs.map +1 -0
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +2 -0
- package/es/hooks/toRef/index.d.ts +14 -0
- package/es/hooks/toRef/index.mjs +19 -0
- package/es/hooks/toRef/index.mjs.map +1 -0
- package/es/hooks/tryOnScopeDispose/index.d.ts +7 -0
- package/es/hooks/tryOnScopeDispose/index.mjs +18 -0
- package/es/hooks/tryOnScopeDispose/index.mjs.map +1 -0
- package/es/hooks/unrefElement/index.d.ts +12 -0
- package/es/hooks/unrefElement/index.mjs +16 -0
- package/es/hooks/unrefElement/index.mjs.map +1 -0
- package/es/hooks/use-full-screen/index.d.ts +1 -0
- package/es/hooks/use-full-screen/index.mjs +32 -0
- package/es/hooks/use-full-screen/index.mjs.map +1 -0
- package/es/hooks/useEventListener/index.d.ts +83 -0
- package/es/hooks/useEventListener/index.mjs +47 -0
- package/es/hooks/useEventListener/index.mjs.map +1 -0
- package/es/hooks/useFullscreen/index.d.ts +25 -0
- package/es/hooks/useFullscreen/index.mjs +121 -0
- package/es/hooks/useFullscreen/index.mjs.map +1 -0
- package/es/hooks/useMounted/index.d.ts +6 -0
- package/es/hooks/useMounted/index.mjs +19 -0
- package/es/hooks/useMounted/index.mjs.map +1 -0
- package/es/hooks/useSupported/index.d.ts +2 -0
- package/es/hooks/useSupported/index.mjs +14 -0
- package/es/hooks/useSupported/index.mjs.map +1 -0
- package/es/hooks/utils/filters.d.ts +84 -0
- package/es/hooks/utils/filters.mjs +141 -0
- package/es/hooks/utils/filters.mjs.map +1 -0
- package/es/hooks/utils/general.d.ts +49 -0
- package/es/hooks/utils/general.mjs +85 -0
- package/es/hooks/utils/general.mjs.map +1 -0
- package/es/hooks/utils/index.d.ts +6 -0
- package/es/hooks/utils/index.mjs +6 -0
- package/es/hooks/utils/is.d.ts +13 -0
- package/es/hooks/utils/is.mjs +29 -0
- package/es/hooks/utils/is.mjs.map +1 -0
- package/es/hooks/utils/port.d.ts +2 -0
- package/es/hooks/utils/port.mjs +17 -0
- package/es/hooks/utils/port.mjs.map +1 -0
- package/es/hooks/utils/types.d.ts +117 -0
- package/es/hooks/utils/types.mjs +0 -0
- package/es/hooks/utils/vue.d.ts +1 -0
- package/es/hooks/utils/vue.mjs +9 -0
- package/es/hooks/utils/vue.mjs.map +1 -0
- package/es/hooks/watchImmediate/index.d.ts +5 -0
- package/es/hooks/watchImmediate/index.mjs +17 -0
- package/es/hooks/watchImmediate/index.mjs.map +1 -0
- package/es/index.d.ts +8 -0
- package/es/index.mjs +47 -0
- package/es/index.mjs.map +1 -0
- package/es/make-installer.d.ts +5 -0
- package/es/make-installer.mjs +15 -0
- package/es/make-installer.mjs.map +1 -0
- package/es/share/dist/index.d.ts +60 -0
- package/es/share/dist/index.mjs +16 -0
- package/es/share/dist/index.mjs.map +1 -0
- package/es/utils/browser.d.ts +3 -0
- package/es/utils/browser.mjs +9 -0
- package/es/utils/browser.mjs.map +1 -0
- package/es/utils/console-log/index.d.ts +3 -0
- package/es/utils/console-log/index.mjs +23 -0
- package/es/utils/console-log/index.mjs.map +1 -0
- package/es/utils/create/index.d.ts +21 -0
- package/es/utils/create/index.mjs +43 -0
- package/es/utils/create/index.mjs.map +1 -0
- package/es/utils/dom/index.d.ts +2 -0
- package/es/utils/dom/index.mjs +3 -0
- package/es/utils/dom/scroll.d.ts +11 -0
- package/es/utils/dom/scroll.mjs +107 -0
- package/es/utils/dom/scroll.mjs.map +1 -0
- package/es/utils/dom/style.d.ts +5 -0
- package/es/utils/dom/style.mjs +35 -0
- package/es/utils/dom/style.mjs.map +1 -0
- package/es/utils/easings.d.ts +1 -0
- package/es/utils/easings.mjs +11 -0
- package/es/utils/easings.mjs.map +1 -0
- package/es/utils/index.d.ts +11 -0
- package/es/utils/index.mjs +14 -0
- package/es/utils/objects.d.ts +8 -0
- package/es/utils/objects.mjs +19 -0
- package/es/utils/objects.mjs.map +1 -0
- package/es/utils/raf.d.ts +2 -0
- package/es/utils/raf.mjs +8 -0
- package/es/utils/raf.mjs.map +1 -0
- package/es/utils/request/index.d.ts +25 -0
- package/es/utils/request/index.mjs +49 -0
- package/es/utils/request/index.mjs.map +1 -0
- package/es/utils/types.d.ts +10 -0
- package/es/utils/types.mjs +22 -0
- package/es/utils/types.mjs.map +1 -0
- package/es/utils/typescript.d.ts +12 -0
- package/es/utils/typescript.mjs +6 -0
- package/es/utils/typescript.mjs.map +1 -0
- package/es/utils/vue/index.d.ts +3 -0
- package/es/utils/vue/index.mjs +3 -0
- package/es/utils/vue/install.d.ts +50 -0
- package/es/utils/vue/install.mjs +74 -0
- package/es/utils/vue/install.mjs.map +1 -0
- package/es/utils/vue/props/index.d.ts +3 -0
- package/es/utils/vue/props/index.mjs +2 -0
- package/es/utils/vue/props/runtime.d.ts +29 -0
- package/es/utils/vue/props/runtime.mjs +59 -0
- package/es/utils/vue/props/runtime.mjs.map +1 -0
- package/es/utils/vue/props/types.d.ts +120 -0
- package/es/utils/vue/props/types.mjs +0 -0
- package/es/utils/vue/props/util.d.ts +8 -0
- package/es/utils/vue/props/util.mjs +0 -0
- package/es/utils/vue/typescript.d.ts +6 -0
- package/es/utils/vue/typescript.mjs +0 -0
- package/es/version.d.ts +1 -0
- package/es/version.mjs +6 -0
- package/es/version.mjs.map +1 -0
- package/global.d.ts +1 -0
- package/package.json +80 -0
- package/resolvers/index.d.mts +19 -0
- package/resolvers/index.d.ts +19 -0
- package/resolvers/index.mjs +32 -0
- package/theme-chalk/hd-date-picker.css +1 -0
- package/theme-chalk/hd-descriptions.css +1 -0
- package/theme-chalk/hd-ellipsis-tag.css +1 -0
- package/theme-chalk/hd-empty.css +2 -0
- package/theme-chalk/hd-jdata-viewer.css +1 -0
- package/theme-chalk/hd-radio.css +1 -0
- package/theme-chalk/hd-remote-search.css +1 -0
- package/theme-chalk/hd-search-form.css +1 -0
- package/theme-chalk/hd-sticky-container.css +1 -0
- package/theme-chalk/hd-table-editor.css +1 -0
- package/theme-chalk/hd-table.css +1 -0
- package/theme-chalk/hd-tabs.css +1 -0
- package/theme-chalk/hd-tarea-tag.css +1 -0
- package/theme-chalk/hd-text-ellipsis.css +1 -0
- package/theme-chalk/hd-time-line.css +1 -0
- package/theme-chalk/hd-uploader.css +1 -0
- package/theme-chalk/index.css +1 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { withInstall } from "../../utils/vue/install.mjs";
|
|
2
|
+
import { textEllipsisEmits, textEllipsisProps } from "./src/itext-ellipsis.mjs";
|
|
3
|
+
import text_ellipsis_default from "./src/text-ellipsis.mjs";
|
|
4
|
+
//#region packages/components/text-ellipsis/index.ts
|
|
5
|
+
var HdTextEllipsis = withInstall(text_ellipsis_default);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { HdTextEllipsis, HdTextEllipsis as default, textEllipsisEmits, textEllipsisProps };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../packages/components/text-ellipsis/index.ts"],"sourcesContent":["import { withInstall } from '@hd-custom/utils'\n\nimport TextEllipsis from './src/text-ellipsis'\nimport type { SFCWithInstall } from '@hd-custom/utils'\n\nexport const HdTextEllipsis: SFCWithInstall<typeof TextEllipsis> = withInstall(TextEllipsis)\nexport default HdTextEllipsis\n\nexport * from './src/itext-ellipsis'\n"],"mappings":";;;;AAKA,IAAa,iBAAsD,YAAY,sBAAa"}
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
export declare const textEllipsisProps: {
|
|
3
|
+
rows: import("../../../utils/index.js").EpPropFinalized<(NumberConstructor | StringConstructor)[], unknown, unknown, number, boolean>;
|
|
4
|
+
dots: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | (((new (...args: any[]) => string) | (() => string)) | null)[], unknown, unknown, string, boolean>;
|
|
5
|
+
content: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | (((new (...args: any[]) => string) | (() => string)) | null)[], unknown, unknown, string, boolean>;
|
|
6
|
+
expandText: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | (((new (...args: any[]) => string) | (() => string)) | null)[], unknown, unknown, string, boolean>;
|
|
7
|
+
collapseText: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | (((new (...args: any[]) => string) | (() => string)) | null)[], unknown, unknown, string, boolean>;
|
|
8
|
+
position: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | (((new (...args: any[]) => string) | (() => string)) | null)[], unknown, unknown, string, boolean>;
|
|
9
|
+
};
|
|
10
|
+
export declare const textEllipsisEmits: string[];
|
|
11
|
+
export type TextEllipsisProps = ExtractPropTypes<typeof textEllipsisProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { buildProps } from "../../../utils/vue/props/runtime.mjs";
|
|
2
|
+
import { makeNumericProp, makeStringProp } from "./utils.mjs";
|
|
3
|
+
//#region packages/components/text-ellipsis/src/itext-ellipsis.ts
|
|
4
|
+
var textEllipsisProps = buildProps({
|
|
5
|
+
rows: makeNumericProp(1),
|
|
6
|
+
dots: makeStringProp("..."),
|
|
7
|
+
content: makeStringProp(""),
|
|
8
|
+
expandText: makeStringProp(""),
|
|
9
|
+
collapseText: makeStringProp(""),
|
|
10
|
+
position: makeStringProp("end")
|
|
11
|
+
});
|
|
12
|
+
var textEllipsisEmits = ["clickAction"];
|
|
13
|
+
//#endregion
|
|
14
|
+
export { textEllipsisEmits, textEllipsisProps };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=itext-ellipsis.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"itext-ellipsis.mjs","names":[],"sources":["../../../../../../packages/components/text-ellipsis/src/itext-ellipsis.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\nimport { buildProps } from '@hd-custom/utils'\nimport { makeNumericProp, makeStringProp } from './utils'\n\nexport const textEllipsisProps = buildProps({\n rows: makeNumericProp(1),\n dots: makeStringProp('...'),\n content: makeStringProp(''),\n expandText: makeStringProp(''),\n collapseText: makeStringProp(''),\n position: makeStringProp('end'),\n})\n\nexport const textEllipsisEmits = ['clickAction']\n\nexport type TextEllipsisProps = ExtractPropTypes<typeof textEllipsisProps>\n"],"mappings":";;;AAIA,IAAa,oBAAoB,WAAW;CAC1C,MAAM,gBAAgB,EAAE;CACxB,MAAM,eAAe,MAAM;CAC3B,SAAS,eAAe,GAAG;CAC3B,YAAY,eAAe,GAAG;CAC9B,cAAc,eAAe,GAAG;CAChC,UAAU,eAAe,MAAM;CAChC,CAAC;AAEF,IAAa,oBAAoB,CAAC,cAAc"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
rows: import("../../../utils/index.js").EpPropFinalized<(NumberConstructor | StringConstructor)[], unknown, unknown, number, boolean>;
|
|
3
|
+
dots: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | (((new (...args: any[]) => string) | (() => string)) | null)[], unknown, unknown, string, boolean>;
|
|
4
|
+
content: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | (((new (...args: any[]) => string) | (() => string)) | null)[], unknown, unknown, string, boolean>;
|
|
5
|
+
expandText: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | (((new (...args: any[]) => string) | (() => string)) | null)[], unknown, unknown, string, boolean>;
|
|
6
|
+
collapseText: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | (((new (...args: any[]) => string) | (() => string)) | null)[], unknown, unknown, string, boolean>;
|
|
7
|
+
position: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | (((new (...args: any[]) => string) | (() => string)) | null)[], unknown, unknown, string, boolean>;
|
|
8
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
rows: import("../../../utils/index.js").EpPropFinalized<(NumberConstructor | StringConstructor)[], unknown, unknown, number, boolean>;
|
|
10
|
+
dots: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | (((new (...args: any[]) => string) | (() => string)) | null)[], unknown, unknown, string, boolean>;
|
|
11
|
+
content: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | (((new (...args: any[]) => string) | (() => string)) | null)[], unknown, unknown, string, boolean>;
|
|
12
|
+
expandText: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | (((new (...args: any[]) => string) | (() => string)) | null)[], unknown, unknown, string, boolean>;
|
|
13
|
+
collapseText: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | (((new (...args: any[]) => string) | (() => string)) | null)[], unknown, unknown, string, boolean>;
|
|
14
|
+
position: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | (((new (...args: any[]) => string) | (() => string)) | null)[], unknown, unknown, string, boolean>;
|
|
15
|
+
}>> & Readonly<{
|
|
16
|
+
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
content: string;
|
|
19
|
+
rows: import("../../../utils/index.js").EpPropMergeType<(NumberConstructor | StringConstructor)[], unknown, unknown>;
|
|
20
|
+
dots: string;
|
|
21
|
+
expandText: string;
|
|
22
|
+
collapseText: string;
|
|
23
|
+
position: string;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { useExpose, windowWidth } from "./utils.mjs";
|
|
2
|
+
import { textEllipsisEmits, textEllipsisProps } from "./itext-ellipsis.mjs";
|
|
3
|
+
import { computed, createVNode, defineComponent, onMounted, ref, watch } from "vue";
|
|
4
|
+
//#region packages/components/text-ellipsis/src/text-ellipsis.tsx
|
|
5
|
+
var text_ellipsis_default = /* @__PURE__ */ defineComponent({
|
|
6
|
+
name: "TextEllipsis",
|
|
7
|
+
props: textEllipsisProps,
|
|
8
|
+
emits: textEllipsisEmits,
|
|
9
|
+
setup(props, { emit, slots }) {
|
|
10
|
+
const text = ref("");
|
|
11
|
+
const expanded = ref(false);
|
|
12
|
+
const hasAction = ref(false);
|
|
13
|
+
const root = ref();
|
|
14
|
+
const actionText = computed(() => expanded.value ? props.collapseText : props.expandText);
|
|
15
|
+
const pxToNum = (value) => {
|
|
16
|
+
if (!value) return 0;
|
|
17
|
+
const match = value.match(/^\d*(\.\d*)?/);
|
|
18
|
+
return match ? Number(match[0]) : 0;
|
|
19
|
+
};
|
|
20
|
+
const calcEllipsised = () => {
|
|
21
|
+
const cloneContainer = () => {
|
|
22
|
+
if (!root.value) return;
|
|
23
|
+
const originStyle = window.getComputedStyle(root.value);
|
|
24
|
+
const container = document.createElement("div");
|
|
25
|
+
Array.prototype.slice.apply(originStyle).forEach((name) => {
|
|
26
|
+
container.style.setProperty(name, originStyle.getPropertyValue(name));
|
|
27
|
+
});
|
|
28
|
+
container.style.position = "fixed";
|
|
29
|
+
container.style.zIndex = "-9999";
|
|
30
|
+
container.style.top = "-9999px";
|
|
31
|
+
container.style.height = "auto";
|
|
32
|
+
container.style.minHeight = "auto";
|
|
33
|
+
container.style.maxHeight = "auto";
|
|
34
|
+
container.innerText = props.content;
|
|
35
|
+
document.body.appendChild(container);
|
|
36
|
+
return container;
|
|
37
|
+
};
|
|
38
|
+
const calcEllipsisText = (container, maxHeight) => {
|
|
39
|
+
const { content, position, dots } = props;
|
|
40
|
+
const end = content.length;
|
|
41
|
+
const calcEllipse = () => {
|
|
42
|
+
const tail = (left, right) => {
|
|
43
|
+
if (right - left <= 1) {
|
|
44
|
+
if (position === "end") return content.slice(0, left) + dots;
|
|
45
|
+
return dots + content.slice(right, end);
|
|
46
|
+
}
|
|
47
|
+
const middle = Math.round((left + right) / 2);
|
|
48
|
+
if (position === "end") container.innerText = content.slice(0, middle) + dots + actionText.value;
|
|
49
|
+
else container.innerText = dots + content.slice(middle, end) + actionText.value;
|
|
50
|
+
if (container.offsetHeight > maxHeight) {
|
|
51
|
+
if (position === "end") return tail(left, middle);
|
|
52
|
+
return tail(middle, right);
|
|
53
|
+
}
|
|
54
|
+
if (position === "end") return tail(middle, right);
|
|
55
|
+
return tail(left, middle);
|
|
56
|
+
};
|
|
57
|
+
container.innerText = tail(0, end);
|
|
58
|
+
};
|
|
59
|
+
const middleTail = (leftPart, rightPart) => {
|
|
60
|
+
if (leftPart[1] - leftPart[0] <= 1 && rightPart[1] - rightPart[0] <= 1) return content.slice(0, leftPart[0]) + dots + content.slice(rightPart[1], end);
|
|
61
|
+
const leftMiddle = Math.floor((leftPart[0] + leftPart[1]) / 2);
|
|
62
|
+
const rightMiddle = Math.ceil((rightPart[0] + rightPart[1]) / 2);
|
|
63
|
+
container.innerText = props.content.slice(0, leftMiddle) + props.dots + props.content.slice(rightMiddle, end) + props.expandText;
|
|
64
|
+
if (container.offsetHeight >= maxHeight) return middleTail([leftPart[0], leftMiddle], [rightMiddle, rightPart[1]]);
|
|
65
|
+
return middleTail([leftMiddle, leftPart[1]], [rightPart[0], rightMiddle]);
|
|
66
|
+
};
|
|
67
|
+
const middle = 0 + end >> 1;
|
|
68
|
+
if (props.position === "middle") container.innerText = middleTail([0, middle], [middle, end]);
|
|
69
|
+
else calcEllipse();
|
|
70
|
+
return container.innerText;
|
|
71
|
+
};
|
|
72
|
+
const container = cloneContainer();
|
|
73
|
+
if (!container) return;
|
|
74
|
+
const { paddingBottom, paddingTop, lineHeight } = container.style;
|
|
75
|
+
const maxHeight = Math.ceil((Number(props.rows) + .5) * pxToNum(lineHeight) + pxToNum(paddingTop) + pxToNum(paddingBottom));
|
|
76
|
+
if (maxHeight < container.offsetHeight) {
|
|
77
|
+
hasAction.value = true;
|
|
78
|
+
text.value = calcEllipsisText(container, maxHeight);
|
|
79
|
+
} else {
|
|
80
|
+
hasAction.value = false;
|
|
81
|
+
text.value = props.content;
|
|
82
|
+
}
|
|
83
|
+
document.body.removeChild(container);
|
|
84
|
+
};
|
|
85
|
+
const toggle = (isExpanded = !expanded.value) => {
|
|
86
|
+
expanded.value = isExpanded;
|
|
87
|
+
};
|
|
88
|
+
const onClickAction = (event) => {
|
|
89
|
+
toggle();
|
|
90
|
+
emit("clickAction", event);
|
|
91
|
+
};
|
|
92
|
+
const renderAction = () => {
|
|
93
|
+
const action = slots.action ? slots.action({ expanded: expanded.value }) : actionText.value;
|
|
94
|
+
return createVNode("span", {
|
|
95
|
+
"class": "text-ellipsis__action",
|
|
96
|
+
"onClick": onClickAction
|
|
97
|
+
}, [action]);
|
|
98
|
+
};
|
|
99
|
+
onMounted(calcEllipsised);
|
|
100
|
+
watch([windowWidth, () => [
|
|
101
|
+
props.content,
|
|
102
|
+
props.rows,
|
|
103
|
+
props.position
|
|
104
|
+
]], calcEllipsised);
|
|
105
|
+
useExpose({ toggle });
|
|
106
|
+
return () => createVNode("div", {
|
|
107
|
+
"ref": root,
|
|
108
|
+
"class": "hd-text-ellipsis text-ellipsis"
|
|
109
|
+
}, [expanded.value ? props.content : text.value, hasAction.value ? renderAction() : null]);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
//#endregion
|
|
113
|
+
export { text_ellipsis_default as default };
|
|
114
|
+
|
|
115
|
+
//# sourceMappingURL=text-ellipsis.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-ellipsis.mjs","names":["ref","watch","computed","onMounted","defineComponent","createVNode","_createVNode","textEllipsisProps","textEllipsisEmits","windowWidth","useExpose","name","props","emits","setup","emit","slots","text","expanded","hasAction","root","actionText","value","collapseText","expandText","pxToNum","match","Number","calcEllipsised","cloneContainer","originStyle","window","getComputedStyle","container","document","createElement","styleNames","Array","prototype","slice","apply","forEach","style","setProperty","getPropertyValue","position","zIndex","top","height","minHeight","maxHeight","innerText","content","body","appendChild","calcEllipsisText","dots","end","length","calcEllipse","tail","left","right","middle","Math","round","offsetHeight","middleTail","leftPart","rightPart","leftMiddle","floor","rightMiddle","ceil","isMiddle","paddingBottom","paddingTop","lineHeight","rows","removeChild","toggle","isExpanded","onClickAction","event","renderAction","action"],"sources":["../../../../../../packages/components/text-ellipsis/src/text-ellipsis.tsx"],"sourcesContent":["import { ref, watch, computed, onMounted, defineComponent } from 'vue'\n\nimport { textEllipsisProps, textEllipsisEmits } from './itext-ellipsis'\nimport { windowWidth, useExpose } from './utils'\n\nexport default defineComponent({\n name: 'TextEllipsis',\n props: textEllipsisProps,\n emits: textEllipsisEmits,\n setup(props, { emit, slots }) {\n const text = ref('')\n const expanded = ref(false)\n const hasAction = ref(false)\n const root = ref<HTMLElement>()\n\n const actionText = computed(() => (expanded.value ? props.collapseText : props.expandText))\n\n const pxToNum = (value: string | null) => {\n if (!value) return 0\n const match = value.match(/^\\d*(\\.\\d*)?/)\n return match ? Number(match[0]) : 0\n }\n\n const calcEllipsised = () => {\n const cloneContainer = () => {\n if (!root.value) return\n\n const originStyle = window.getComputedStyle(root.value)\n const container = document.createElement('div')\n const styleNames: string[] = Array.prototype.slice.apply(originStyle)\n styleNames.forEach((name) => {\n container.style.setProperty(name, originStyle.getPropertyValue(name))\n })\n\n container.style.position = 'fixed'\n container.style.zIndex = '-9999'\n container.style.top = '-9999px'\n container.style.height = 'auto'\n container.style.minHeight = 'auto'\n container.style.maxHeight = 'auto'\n\n container.innerText = props.content\n document.body.appendChild(container)\n return container\n }\n\n const calcEllipsisText = (container: HTMLDivElement, maxHeight: number) => {\n const { content, position, dots } = props\n const end = content.length\n\n const calcEllipse = () => {\n // calculate the former or later content\n const tail = (left: number, right: number): string => {\n if (right - left <= 1) {\n if (position === 'end') {\n return content.slice(0, left) + dots\n }\n return dots + content.slice(right, end)\n }\n\n const middle = Math.round((left + right) / 2)\n\n // Set the interception location\n if (position === 'end') {\n container.innerText = content.slice(0, middle) + dots + actionText.value\n } else {\n container.innerText = dots + content.slice(middle, end) + actionText.value\n }\n\n // The height after interception still does not match the rquired height\n if (container.offsetHeight > maxHeight) {\n if (position === 'end') {\n return tail(left, middle)\n }\n return tail(middle, right)\n }\n\n if (position === 'end') {\n return tail(middle, right)\n }\n\n return tail(left, middle)\n }\n\n container.innerText = tail(0, end)\n }\n\n const middleTail = (leftPart: [number, number], rightPart: [number, number]): string => {\n if (leftPart[1] - leftPart[0] <= 1 && rightPart[1] - rightPart[0] <= 1) {\n return content.slice(0, leftPart[0]) + dots + content.slice(rightPart[1], end)\n }\n\n const leftMiddle = Math.floor((leftPart[0] + leftPart[1]) / 2)\n const rightMiddle = Math.ceil((rightPart[0] + rightPart[1]) / 2)\n\n container.innerText =\n props.content.slice(0, leftMiddle) + props.dots + props.content.slice(rightMiddle, end) + props.expandText\n\n if (container.offsetHeight >= maxHeight) {\n return middleTail([leftPart[0], leftMiddle], [rightMiddle, rightPart[1]])\n }\n\n return middleTail([leftMiddle, leftPart[1]], [rightPart[0], rightMiddle])\n }\n\n const middle = (0 + end) >> 1\n const isMiddle = props.position === 'middle'\n if (isMiddle) {\n container.innerText = middleTail([0, middle], [middle, end])\n } else {\n calcEllipse()\n }\n // props.position === 'middle' ? (container.innerText = middleTail([0, middle], [middle, end])) : calcEllipse()\n return container.innerText\n }\n\n // Calculate the interceptional text\n const container = cloneContainer()\n if (!container) return\n const { paddingBottom, paddingTop, lineHeight } = container.style\n const maxHeight = Math.ceil(\n (Number(props.rows) + 0.5) * pxToNum(lineHeight) + pxToNum(paddingTop) + pxToNum(paddingBottom),\n )\n\n if (maxHeight < container.offsetHeight) {\n hasAction.value = true\n text.value = calcEllipsisText(container, maxHeight)\n } else {\n hasAction.value = false\n text.value = props.content\n }\n\n document.body.removeChild(container)\n }\n\n const toggle = (isExpanded = !expanded.value) => {\n expanded.value = isExpanded\n }\n\n const onClickAction = (event: MouseEvent) => {\n toggle()\n emit('clickAction', event)\n }\n\n const renderAction = () => {\n const action = slots.action ? slots.action({ expanded: expanded.value }) : actionText.value\n return (\n <span class=\"text-ellipsis__action\" onClick={onClickAction}>\n {action}\n </span>\n )\n }\n\n onMounted(calcEllipsised)\n\n watch([windowWidth, () => [props.content, props.rows, props.position]], calcEllipsised)\n\n useExpose({ toggle })\n\n return () => (\n <div ref={root} class=\"hd-text-ellipsis text-ellipsis\">\n {expanded.value ? props.content : text.value}\n {hasAction.value ? renderAction() : null}\n </div>\n )\n },\n})\n"],"mappings":"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"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
2
|
+
//#region packages/components/text-ellipsis/src/use-window-size.ts
|
|
3
|
+
var inBrowser = typeof window !== "undefined";
|
|
4
|
+
var width;
|
|
5
|
+
var height;
|
|
6
|
+
function useWindowSize() {
|
|
7
|
+
if (!width) {
|
|
8
|
+
width = ref(0);
|
|
9
|
+
height = ref(0);
|
|
10
|
+
if (inBrowser) {
|
|
11
|
+
const update = () => {
|
|
12
|
+
width.value = window.innerWidth;
|
|
13
|
+
height.value = window.innerHeight;
|
|
14
|
+
};
|
|
15
|
+
update();
|
|
16
|
+
window.addEventListener("resize", update, { passive: true });
|
|
17
|
+
window.addEventListener("orientationchange", update, { passive: true });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
width,
|
|
22
|
+
height
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { inBrowser, useWindowSize };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=use-window-size.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-window-size.mjs","names":[],"sources":["../../../../../../packages/components/text-ellipsis/src/use-window-size.ts"],"sourcesContent":["import { ref, Ref } from 'vue'\n\nexport const inBrowser = typeof window !== 'undefined'\n\nlet width: Ref<number>\nlet height: Ref<number>\n\nexport function useWindowSize() {\n if (!width) {\n width = ref(0)\n height = ref(0)\n\n if (inBrowser) {\n const update = () => {\n width.value = window.innerWidth\n height.value = window.innerHeight\n }\n\n update()\n window.addEventListener('resize', update, { passive: true })\n window.addEventListener('orientationchange', update, { passive: true })\n }\n }\n\n return { width, height }\n}\n"],"mappings":";;AAEA,IAAa,YAAY,OAAO,WAAW;AAE3C,IAAI;AACJ,IAAI;AAEJ,SAAgB,gBAAgB;AAC9B,KAAI,CAAC,OAAO;AACV,UAAQ,IAAI,EAAE;AACd,WAAS,IAAI,EAAE;AAEf,MAAI,WAAW;GACb,MAAM,eAAe;AACnB,UAAM,QAAQ,OAAO;AACrB,WAAO,QAAQ,OAAO;;AAGxB,WAAQ;AACR,UAAO,iBAAiB,UAAU,QAAQ,EAAE,SAAS,MAAM,CAAC;AAC5D,UAAO,iBAAiB,qBAAqB,QAAQ,EAAE,SAAS,MAAM,CAAC;;;AAI3E,QAAO;EAAE;EAAO;EAAQ"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
export declare const numericProp: (NumberConstructor | StringConstructor)[];
|
|
3
|
+
export declare const makeNumberProp: <T>(defaultVal: T) => {
|
|
4
|
+
type: NumberConstructor;
|
|
5
|
+
default: T;
|
|
6
|
+
};
|
|
7
|
+
export declare const makeNumericProp: <T>(defaultVal: T) => {
|
|
8
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
9
|
+
default: T;
|
|
10
|
+
};
|
|
11
|
+
export declare const makeStringProp: <T>(defaultVal: T) => {
|
|
12
|
+
type: PropType<T>;
|
|
13
|
+
default: T;
|
|
14
|
+
};
|
|
15
|
+
export declare const windowWidth: Ref<number>, windowHeight: Ref<number>;
|
|
16
|
+
export declare const extend: {
|
|
17
|
+
<T extends {}, U>(target: T, source: U): T & U;
|
|
18
|
+
<T extends {}, U, V>(target: T, source1: U, source2: V): T & U & V;
|
|
19
|
+
<T extends {}, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
|
|
20
|
+
(target: object, ...sources: any[]): any;
|
|
21
|
+
};
|
|
22
|
+
export declare function useExpose<T = Record<string, any>>(apis: T): void;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { useWindowSize } from "./use-window-size.mjs";
|
|
2
|
+
import { getCurrentInstance } from "vue";
|
|
3
|
+
//#region packages/components/text-ellipsis/src/utils.ts
|
|
4
|
+
var numericProp = [Number, String];
|
|
5
|
+
var makeNumberProp = (defaultVal) => ({
|
|
6
|
+
type: Number,
|
|
7
|
+
default: defaultVal
|
|
8
|
+
});
|
|
9
|
+
var makeNumericProp = (defaultVal) => ({
|
|
10
|
+
type: numericProp,
|
|
11
|
+
default: defaultVal
|
|
12
|
+
});
|
|
13
|
+
var makeStringProp = (defaultVal) => ({
|
|
14
|
+
type: String,
|
|
15
|
+
default: defaultVal
|
|
16
|
+
});
|
|
17
|
+
var { width: windowWidth, height: windowHeight } = useWindowSize();
|
|
18
|
+
var extend = Object.assign;
|
|
19
|
+
function useExpose(apis) {
|
|
20
|
+
const instance = getCurrentInstance();
|
|
21
|
+
if (instance) extend(instance.proxy, apis);
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { extend, makeNumberProp, makeNumericProp, makeStringProp, numericProp, useExpose, windowHeight, windowWidth };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.mjs","names":[],"sources":["../../../../../../packages/components/text-ellipsis/src/utils.ts"],"sourcesContent":["import { getCurrentInstance, PropType } from 'vue'\nimport { useWindowSize } from './use-window-size'\nexport const numericProp = [Number, String]\nexport const makeNumberProp = <T>(defaultVal: T) => ({\n type: Number,\n default: defaultVal,\n})\n\nexport const makeNumericProp = <T>(defaultVal: T) => ({\n type: numericProp,\n default: defaultVal,\n})\n\nexport const makeStringProp = <T>(defaultVal: T) => ({\n type: String as unknown as PropType<T>,\n default: defaultVal,\n})\n\nexport const { width: windowWidth, height: windowHeight } = useWindowSize()\n\nexport const extend = Object.assign\nexport function useExpose<T = Record<string, any>>(apis: T) {\n const instance = getCurrentInstance()\n if (instance) {\n extend(instance.proxy as object, apis)\n }\n}\n"],"mappings":";;;AAEA,IAAa,cAAc,CAAC,QAAQ,OAAO;AAC3C,IAAa,kBAAqB,gBAAmB;CACnD,MAAM;CACN,SAAS;CACV;AAED,IAAa,mBAAsB,gBAAmB;CACpD,MAAM;CACN,SAAS;CACV;AAED,IAAa,kBAAqB,gBAAmB;CACnD,MAAM;CACN,SAAS;CACV;AAED,IAAa,EAAE,OAAO,aAAa,QAAQ,iBAAiB,eAAe;AAE3E,IAAa,SAAS,OAAO;AAC7B,SAAgB,UAAmC,MAAS;CAC1D,MAAM,WAAW,oBAAoB;AACrC,KAAI,SACF,QAAO,SAAS,OAAiB,KAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../src/text-ellipsis.scss';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import TimeLine from './src/time-line.vue.js';
|
|
2
|
+
import type { SFCWithInstall } from '../../utils/index.js';
|
|
3
|
+
export declare const HdTimeLine: SFCWithInstall<typeof TimeLine>;
|
|
4
|
+
export default HdTimeLine;
|
|
5
|
+
export * from './src/time-line.js';
|
|
6
|
+
export type { TimeLineInstance } from './src/instance.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { withInstall } from "../../utils/vue/install.mjs";
|
|
2
|
+
import { timeLineEmits, timeLineProps } from "./src/time-line.mjs";
|
|
3
|
+
import time_line_default from "./src/time-line.vue.mjs";
|
|
4
|
+
//#region packages/components/time-line/index.ts
|
|
5
|
+
var HdTimeLine = withInstall(time_line_default);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { HdTimeLine, HdTimeLine as default, timeLineEmits, timeLineProps };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../packages/components/time-line/index.ts"],"sourcesContent":["import { withInstall } from '@hd-custom/utils'\n\nimport TimeLine from './src/time-line.vue'\nimport type { SFCWithInstall } from '@hd-custom/utils'\n\nexport const HdTimeLine: SFCWithInstall<typeof TimeLine> = withInstall(TimeLine)\nexport default HdTimeLine\n\nexport * from './src/time-line'\nexport type { TimeLineInstance } from './src/instance'\n"],"mappings":";;;;AAKA,IAAa,aAA8C,YAAY,kBAAS"}
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
export declare const timeLineProps: {
|
|
3
|
+
timeData: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}[]) | (() => {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}[]) | (((new (...args: any[]) => {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}[]) | (() => {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}[])) | null)[], unknown, unknown, () => never[], boolean>;
|
|
12
|
+
prependWidth: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
13
|
+
propsConfig: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}) | (() => {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}) | (((new (...args: any[]) => {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}) | (() => {
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
})) | null)[], unknown, unknown, () => {
|
|
22
|
+
status: string;
|
|
23
|
+
timestamp: string;
|
|
24
|
+
content: string;
|
|
25
|
+
}, boolean>;
|
|
26
|
+
};
|
|
27
|
+
export declare const timeLineEmits: never[];
|
|
28
|
+
export type TimeLineProps = ExtractPropTypes<typeof timeLineProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { buildProps } from "../../../utils/vue/props/runtime.mjs";
|
|
2
|
+
//#region packages/components/time-line/src/time-line.ts
|
|
3
|
+
var timeLineProps = buildProps({
|
|
4
|
+
timeData: {
|
|
5
|
+
type: Array,
|
|
6
|
+
default: () => []
|
|
7
|
+
},
|
|
8
|
+
prependWidth: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: "88px"
|
|
11
|
+
},
|
|
12
|
+
propsConfig: {
|
|
13
|
+
type: Object,
|
|
14
|
+
default: () => ({
|
|
15
|
+
status: "status",
|
|
16
|
+
timestamp: "timestamp",
|
|
17
|
+
content: "content"
|
|
18
|
+
})
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
var timeLineEmits = [];
|
|
22
|
+
//#endregion
|
|
23
|
+
export { timeLineEmits, timeLineProps };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=time-line.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-line.mjs","names":[],"sources":["../../../../../../packages/components/time-line/src/time-line.ts"],"sourcesContent":["import type { ExtractPropTypes, PropType } from 'vue'\nimport { buildProps } from '@hd-custom/utils'\n\nexport const timeLineProps = buildProps({\n timeData: {\n type: Array as PropType<{ [key: string]: any }[]>,\n default: () => [],\n },\n prependWidth: {\n type: String,\n default: '88px',\n },\n propsConfig: {\n type: Object as PropType<{ [key: string]: any }>,\n default: () => ({ status: 'status', timestamp: 'timestamp', content: 'content' }),\n },\n})\n\nexport const timeLineEmits = []\n\nexport type TimeLineProps = ExtractPropTypes<typeof timeLineProps>\n"],"mappings":";;AAGA,IAAa,gBAAgB,WAAW;CACtC,UAAU;EACR,MAAM;EACN,eAAe,EAAE;EAClB;CACD,cAAc;EACZ,MAAM;EACN,SAAS;EACV;CACD,aAAa;EACX,MAAM;EACN,gBAAgB;GAAE,QAAQ;GAAU,WAAW;GAAa,SAAS;GAAW;EACjF;CACF,CAAC;AAEF,IAAa,gBAAgB,EAAE"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
declare var __VLS_1: {
|
|
2
|
+
item: {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
};
|
|
5
|
+
}, __VLS_3: {
|
|
6
|
+
item: {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
}, __VLS_5: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
prepend?: (props: typeof __VLS_1) => any;
|
|
12
|
+
} & {
|
|
13
|
+
default?: (props: typeof __VLS_3) => any;
|
|
14
|
+
} & {
|
|
15
|
+
dot?: (props: typeof __VLS_5) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
18
|
+
timeData: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}[]) | (() => {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}[]) | (((new (...args: any[]) => {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}[]) | (() => {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}[])) | null)[], unknown, unknown, () => never[], boolean>;
|
|
27
|
+
prependWidth: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
28
|
+
propsConfig: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => {
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}) | (() => {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
}) | (((new (...args: any[]) => {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}) | (() => {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
})) | null)[], unknown, unknown, () => {
|
|
37
|
+
status: string;
|
|
38
|
+
timestamp: string;
|
|
39
|
+
content: string;
|
|
40
|
+
}, boolean>;
|
|
41
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
42
|
+
timeData: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => {
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
}[]) | (() => {
|
|
45
|
+
[key: string]: any;
|
|
46
|
+
}[]) | (((new (...args: any[]) => {
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
}[]) | (() => {
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
}[])) | null)[], unknown, unknown, () => never[], boolean>;
|
|
51
|
+
prependWidth: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
52
|
+
propsConfig: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => {
|
|
53
|
+
[key: string]: any;
|
|
54
|
+
}) | (() => {
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
}) | (((new (...args: any[]) => {
|
|
57
|
+
[key: string]: any;
|
|
58
|
+
}) | (() => {
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
})) | null)[], unknown, unknown, () => {
|
|
61
|
+
status: string;
|
|
62
|
+
timestamp: string;
|
|
63
|
+
content: string;
|
|
64
|
+
}, boolean>;
|
|
65
|
+
}>> & Readonly<{}>, {
|
|
66
|
+
timeData: {
|
|
67
|
+
[key: string]: any;
|
|
68
|
+
}[];
|
|
69
|
+
prependWidth: string;
|
|
70
|
+
propsConfig: {
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
};
|
|
73
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
74
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
75
|
+
declare const _default: typeof __VLS_export;
|
|
76
|
+
export default _default;
|
|
77
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
78
|
+
new (): {
|
|
79
|
+
$slots: S;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import time_line_vue_vue_type_script_setup_true_lang_default from "./time-line.vue_vue_type_script_setup_true_lang.mjs";
|
|
2
|
+
//#region packages/components/time-line/src/time-line.vue
|
|
3
|
+
var time_line_default = time_line_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { time_line_default as default };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=time-line.vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-line.vue.mjs","names":[],"sources":["../../../../../../packages/components/time-line/src/time-line.vue"],"sourcesContent":["<template>\n <div class=\"hd-time-line w-full time-line\">\n <div v-for=\"(item, index) in props.timeData\" :key=\"'timer' + index\" class=\"flex w-full time-line-item\">\n <slot name=\"prepend\" :item=\"item\">\n <div\n v-if=\"getItemValue(item, 'status')\"\n :style=\"`width: ${props.prependWidth}`\"\n class=\"relative -top-1 flex justify-end\"\n >\n <div class=\"time-line-status\">{{ getItemValue(item, 'status') }}</div>\n </div>\n </slot>\n <div class=\"relative ml-4 flex-1 border-l-1 time-border cus-line\">\n <div class=\"min-h-[32px] px-4 relative -top-1\">\n <slot :item=\"item\">\n <div v-if=\"getItemValue(item, 'timestamp')\" class=\"mb-2\">\n {{ getItemValue(item, 'timestamp') }}\n </div>\n <div v-if=\"getItemValue(item, 'content')\" class=\"time-line-item-content\">\n {{ getItemValue(item, 'content') }}\n </div>\n </slot>\n </div>\n <div class=\"dot\">\n <slot name=\"dot\">\n <div class=\"w-[16px] h-[16px] dot-con rounded-full flex items-center justify-center\">\n <div class=\"w-[8px] h-[8px] rounded-full\"></div>\n </div>\n </slot>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { timeLineProps, timeLineEmits } from './time-line'\n\ndefineOptions({\n name: 'TimeLine',\n})\n\nconst props = defineProps(timeLineProps)\ndefineEmits(timeLineEmits)\n\n// 安全地获取item的�?\nconst getItemValue = (item: any, key: string) => {\n const configKey = props.propsConfig[key] || key\n return item[configKey]\n}\n</script>\n"],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { timeLineEmits, timeLineProps } from "./time-line.mjs";
|
|
2
|
+
import { Fragment, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeStyle, openBlock, renderList, renderSlot, toDisplayString } from "vue";
|
|
3
|
+
//#region packages/components/time-line/src/time-line.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var time_line_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
5
|
+
name: "TimeLine",
|
|
6
|
+
__name: "time-line",
|
|
7
|
+
props: timeLineProps,
|
|
8
|
+
emits: timeLineEmits,
|
|
9
|
+
setup(__props) {
|
|
10
|
+
const props = __props;
|
|
11
|
+
const getItemValue = (item, key) => {
|
|
12
|
+
return item[props.propsConfig[key] || key];
|
|
13
|
+
};
|
|
14
|
+
return (_ctx, _cache) => {
|
|
15
|
+
return openBlock(), createElementBlock("div", { class: "hd-time-line w-full time-line" }, [(openBlock(true), createElementBlock(Fragment, null, renderList(props.timeData, (item, index) => {
|
|
16
|
+
return openBlock(), createElementBlock("div", {
|
|
17
|
+
key: "timer" + index,
|
|
18
|
+
class: "flex w-full time-line-item"
|
|
19
|
+
}, [renderSlot(_ctx.$slots, "prepend", { item }, () => [getItemValue(item, "status") ? (openBlock(), createElementBlock("div", {
|
|
20
|
+
key: 0,
|
|
21
|
+
style: normalizeStyle(`width: ${props.prependWidth}`),
|
|
22
|
+
class: "relative -top-1 flex justify-end"
|
|
23
|
+
}, [createElementVNode("div", { class: "time-line-status" }, toDisplayString(getItemValue(item, "status")), 1)], 4)) : createCommentVNode("", true)]), createElementVNode("div", { class: "relative ml-4 flex-1 border-l-1 time-border cus-line" }, [createElementVNode("div", { class: "min-h-[32px] px-4 relative -top-1" }, [renderSlot(_ctx.$slots, "default", { item }, () => [getItemValue(item, "timestamp") ? (openBlock(), createElementBlock("div", {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "mb-2"
|
|
26
|
+
}, toDisplayString(getItemValue(item, "timestamp")), 1)) : createCommentVNode("", true), getItemValue(item, "content") ? (openBlock(), createElementBlock("div", {
|
|
27
|
+
key: 1,
|
|
28
|
+
class: "time-line-item-content"
|
|
29
|
+
}, toDisplayString(getItemValue(item, "content")), 1)) : createCommentVNode("", true)])]), createElementVNode("div", { class: "dot" }, [renderSlot(_ctx.$slots, "dot", {}, () => [createElementVNode("div", { class: "w-[16px] h-[16px] dot-con rounded-full flex items-center justify-center" }, [createElementVNode("div", { class: "w-[8px] h-[8px] rounded-full" })])])])])]);
|
|
30
|
+
}), 128))]);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
35
|
+
export { time_line_vue_vue_type_script_setup_true_lang_default as default };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=time-line.vue_vue_type_script_setup_true_lang.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-line.vue_vue_type_script_setup_true_lang.mjs","names":[],"sources":["../../../../../../packages/components/time-line/src/time-line.vue"],"sourcesContent":["<template>\n <div class=\"hd-time-line w-full time-line\">\n <div v-for=\"(item, index) in props.timeData\" :key=\"'timer' + index\" class=\"flex w-full time-line-item\">\n <slot name=\"prepend\" :item=\"item\">\n <div\n v-if=\"getItemValue(item, 'status')\"\n :style=\"`width: ${props.prependWidth}`\"\n class=\"relative -top-1 flex justify-end\"\n >\n <div class=\"time-line-status\">{{ getItemValue(item, 'status') }}</div>\n </div>\n </slot>\n <div class=\"relative ml-4 flex-1 border-l-1 time-border cus-line\">\n <div class=\"min-h-[32px] px-4 relative -top-1\">\n <slot :item=\"item\">\n <div v-if=\"getItemValue(item, 'timestamp')\" class=\"mb-2\">\n {{ getItemValue(item, 'timestamp') }}\n </div>\n <div v-if=\"getItemValue(item, 'content')\" class=\"time-line-item-content\">\n {{ getItemValue(item, 'content') }}\n </div>\n </slot>\n </div>\n <div class=\"dot\">\n <slot name=\"dot\">\n <div class=\"w-[16px] h-[16px] dot-con rounded-full flex items-center justify-center\">\n <div class=\"w-[8px] h-[8px] rounded-full\"></div>\n </div>\n </slot>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { timeLineProps, timeLineEmits } from './time-line'\n\ndefineOptions({\n name: 'TimeLine',\n})\n\nconst props = defineProps(timeLineProps)\ndefineEmits(timeLineEmits)\n\n// 安全地获取item的�?\nconst getItemValue = (item: any, key: string) => {\n const configKey = props.propsConfig[key] || key\n return item[configKey]\n}\n</script>\n"],"mappings":";;;;;;;;;EAyCA,MAAM,QAAQ;EAId,MAAM,gBAAgB,MAAW,QAAgB;AAE/C,UAAO,KADW,MAAM,YAAY,QAAQ;;;uBA7C5C,mBA+BM,OAAA,EA/BD,OAAM,iCAA+B,EAAA,EAAA,UAAA,KAAA,EACxC,mBA6BM,UAAA,MAAA,WA7BuB,MAAM,WAAtB,MAAM,UAAK;wBAAxB,mBA6BM,OAAA;KA7BwC,KAAG,UAAY;KAAO,OAAM;QACxE,WAQO,KAAA,QAAA,WAAA,EARqB,MAAI,QAQzB,CANG,aAAa,MAAI,SAAA,IAAA,WAAA,EADzB,mBAMM,OAAA;;KAJH,OAAK,eAAA,UAAY,MAAM,eAAY;KACpC,OAAM;QAEN,mBAAsE,OAAA,EAAjE,OAAM,oBAAkB,EAAA,gBAAI,aAAa,MAAI,SAAA,CAAA,EAAA,EAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA,EAGtD,mBAkBM,OAAA,EAlBD,OAAM,wDAAsD,EAAA,CAC/D,mBASM,OAAA,EATD,OAAM,qCAAmC,EAAA,CAC5C,WAOO,KAAA,QAAA,WAAA,EAPM,MAAI,QAOV,CANM,aAAa,MAAI,YAAA,IAAA,WAAA,EAA5B,mBAEM,OAAA;;KAFsC,OAAM;uBAC7C,aAAa,MAAI,YAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,EAEX,aAAa,MAAI,UAAA,IAAA,WAAA,EAA5B,mBAEM,OAAA;;KAFoC,OAAM;uBAC3C,aAAa,MAAI,UAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA,CAAA,CAAA,EAI1B,mBAMM,OAAA,EAND,OAAM,OAAK,EAAA,CACd,WAIO,KAAA,QAAA,OAAA,EAAA,QAAA,CAHL,mBAEM,OAAA,EAFD,OAAM,2EAAyE,EAAA,CAClF,mBAAgD,OAAA,EAA3C,OAAM,gCAA8B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../src/time-line.scss';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import Uploader from './src/uploader.vue.js';
|
|
2
|
+
import type { SFCWithInstall } from '../../utils/index.js';
|
|
3
|
+
export declare const HdUploader: SFCWithInstall<typeof Uploader>;
|
|
4
|
+
export default HdUploader;
|
|
5
|
+
export * from './src/uploader.js';
|
|
6
|
+
export type { UploaderInstance } from './src/instance.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { withInstall } from "../../utils/vue/install.mjs";
|
|
2
|
+
import { uploaderEmits, uploaderProps } from "./src/uploader.mjs";
|
|
3
|
+
import uploader_default from "./src/uploader.vue.mjs";
|
|
4
|
+
//#region packages/components/uploader/index.ts
|
|
5
|
+
var HdUploader = withInstall(uploader_default);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { HdUploader, HdUploader as default, uploaderEmits, uploaderProps };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../packages/components/uploader/index.ts"],"sourcesContent":["import { withInstall } from '@hd-custom/utils'\n\nimport Uploader from './src/uploader.vue'\nimport type { SFCWithInstall } from '@hd-custom/utils'\n\nexport const HdUploader: SFCWithInstall<typeof Uploader> = withInstall(Uploader)\nexport default HdUploader\n\nexport * from './src/uploader'\nexport type { UploaderInstance } from './src/instance'\n"],"mappings":";;;;AAKA,IAAa,aAA8C,YAAY,iBAAS"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
declare var __VLS_1: {
|
|
2
|
+
progress: any;
|
|
3
|
+
status: any;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
9
|
+
file: {
|
|
10
|
+
type: ObjectConstructor;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
}>, {
|
|
14
|
+
setStatus: (value: string) => void;
|
|
15
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
file: {
|
|
17
|
+
type: ObjectConstructor;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
}>> & Readonly<{}>, {
|
|
21
|
+
file: Record<string, any>;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|