@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,22 @@
|
|
|
1
|
+
import { isArray, isArray as isArray$1, isDate, isFunction, isObject, isObject as isObject$1, isPlainObject, isPromise, isString, isString as isString$1, isSymbol } from "@vue/shared";
|
|
2
|
+
import { isNil } from "lodash-unified";
|
|
3
|
+
import { isVNode } from "vue";
|
|
4
|
+
//#region packages/utils/types.ts
|
|
5
|
+
var isUndefined = (val) => val === void 0;
|
|
6
|
+
var isBoolean = (val) => typeof val === "boolean";
|
|
7
|
+
var isNumber = (val) => typeof val === "number";
|
|
8
|
+
var isEmpty = (val) => !val && val !== 0 || isArray$1(val) && val.length === 0 || isObject$1(val) && !Object.keys(val).length;
|
|
9
|
+
var isElement = (e) => {
|
|
10
|
+
if (typeof Element === "undefined") return false;
|
|
11
|
+
return e instanceof Element;
|
|
12
|
+
};
|
|
13
|
+
var isPropAbsent = (prop) => isNil(prop);
|
|
14
|
+
var isStringNumber = (val) => {
|
|
15
|
+
if (!isString$1(val)) return false;
|
|
16
|
+
return !Number.isNaN(Number(val));
|
|
17
|
+
};
|
|
18
|
+
var isWindow = (val) => val === window;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { isArray, isBoolean, isDate, isElement, isEmpty, isFunction, isNumber, isObject, isPlainObject, isPromise, isPropAbsent, isString, isStringNumber, isSymbol, isUndefined, isVNode, isWindow };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.mjs","names":[],"sources":["../../../../packages/utils/types.ts"],"sourcesContent":["import { isArray, isObject, isString } from '@vue/shared'\r\nimport { isNil } from 'lodash-unified'\r\n\r\nexport {\r\n isArray,\r\n isFunction,\r\n isObject,\r\n isString,\r\n isDate,\r\n isPromise,\r\n isSymbol,\r\n isPlainObject,\r\n} from '@vue/shared'\r\nexport { isVNode } from 'vue'\r\n\r\nexport const isUndefined = (val: any): val is undefined => val === undefined\r\nexport const isBoolean = (val: any): val is boolean => typeof val === 'boolean'\r\nexport const isNumber = (val: any): val is number => typeof val === 'number'\r\n\r\nexport const isEmpty = (val: unknown) =>\r\n (!val && val !== 0) ||\r\n (isArray(val) && val.length === 0) ||\r\n (isObject(val) && !Object.keys(val).length)\r\n\r\nexport const isElement = (e: unknown): e is Element => {\r\n if (typeof Element === 'undefined') return false\r\n return e instanceof Element\r\n}\r\n\r\nexport const isPropAbsent = (prop: unknown): prop is null | undefined =>\r\n isNil(prop)\r\n\r\nexport const isStringNumber = (val: string): boolean => {\r\n if (!isString(val)) {\r\n return false\r\n }\r\n return !Number.isNaN(Number(val))\r\n}\r\n\r\nexport const isWindow = (val: unknown): val is Window => val === window\r\n"],"mappings":";;;;AAeA,IAAa,eAAe,QAA+B,QAAQ,KAAA;AACnE,IAAa,aAAa,QAA6B,OAAO,QAAQ;AACtE,IAAa,YAAY,QAA4B,OAAO,QAAQ;AAEpE,IAAa,WAAW,QACrB,CAAC,OAAO,QAAQ,KAChB,UAAQ,IAAI,IAAI,IAAI,WAAW,KAC/B,WAAS,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC;AAEtC,IAAa,aAAa,MAA6B;AACrD,KAAI,OAAO,YAAY,YAAa,QAAO;AAC3C,QAAO,aAAa;;AAGtB,IAAa,gBAAgB,SAC3B,MAAM,KAAK;AAEb,IAAa,kBAAkB,QAAyB;AACtD,KAAI,CAAC,WAAS,IAAI,CAChB,QAAO;AAET,QAAO,CAAC,OAAO,MAAM,OAAO,IAAI,CAAC;;AAGnC,IAAa,YAAY,QAAgC,QAAQ"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const mutable: <T extends readonly any[] | Record<string, unknown>>(val: T) => Mutable<typeof val>;
|
|
2
|
+
export type Mutable<T> = {
|
|
3
|
+
-readonly [P in keyof T]: T[P];
|
|
4
|
+
};
|
|
5
|
+
export type HTMLElementCustomized<T> = HTMLElement & T;
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated stop to use null
|
|
8
|
+
* @see {@link https://github.com/sindresorhus/meta/discussions/7}
|
|
9
|
+
*/
|
|
10
|
+
export type Nullable<T> = T | null;
|
|
11
|
+
export type Arrayable<T> = T | T[];
|
|
12
|
+
export type Awaitable<T> = Promise<T> | T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript.mjs","names":[],"sources":["../../../../packages/utils/typescript.ts"],"sourcesContent":["export const mutable = <T extends readonly any[] | Record<string, unknown>>(\r\n val: T\r\n) => val as Mutable<typeof val>\r\nexport type Mutable<T> = { -readonly [P in keyof T]: T[P] }\r\n\r\nexport type HTMLElementCustomized<T> = HTMLElement & T\r\n\r\n/**\r\n * @deprecated stop to use null\r\n * @see {@link https://github.com/sindresorhus/meta/discussions/7}\r\n */\r\nexport type Nullable<T> = T | null\r\n\r\nexport type Arrayable<T> = T | T[]\r\nexport type Awaitable<T> = Promise<T> | T\r\n"],"mappings":";AAAA,IAAa,WACX,QACG"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { withInstall, withInstallDirective, withInstallFunction, withNoopInstall } from "./install.mjs";
|
|
2
|
+
import { buildProp, buildProps, definePropType, hdPropKey, isHdProp } from "./props/runtime.mjs";
|
|
3
|
+
export { buildProp, buildProps, definePropType, hdPropKey, isHdProp, withInstall, withInstallDirective, withInstallFunction, withNoopInstall };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Directive } from 'vue';
|
|
2
|
+
import type { SFCInstallWithContext, SFCWithInstall } from './typescript.js';
|
|
3
|
+
/**
|
|
4
|
+
* 为组件添加安装方法的高阶函数
|
|
5
|
+
* @param main 主组件
|
|
6
|
+
* @param extra 额外的组件对象(可选)
|
|
7
|
+
* @returns 带有install方法的组件
|
|
8
|
+
*
|
|
9
|
+
* 功能:
|
|
10
|
+
* 1. 为组件添加 install 方法,使其可以通过 app.use() 进行安装
|
|
11
|
+
* 2. 自动注册主组件和额外组件到 Vue 应用中
|
|
12
|
+
* 3. 组件名称会自动添加统一组件前缀,例如 Hd
|
|
13
|
+
*/
|
|
14
|
+
export declare const withInstall: <T, E extends Record<string, any>>(main: T, extra?: E) => SFCWithInstall<T> & E;
|
|
15
|
+
/**
|
|
16
|
+
* 为函数式组件添加安装方法的高阶函数
|
|
17
|
+
* @param fn 待处理的函数组件
|
|
18
|
+
* @param name 组件名称
|
|
19
|
+
* @returns 带有install方法和上下文的函数组件
|
|
20
|
+
*
|
|
21
|
+
* 功能:
|
|
22
|
+
* 1. 为函数式组件添加 install 方法
|
|
23
|
+
* 2. 将函数挂载到 Vue 实例的全局属性上
|
|
24
|
+
* 3. 保存应用上下文到组件的 _context 属性
|
|
25
|
+
*/
|
|
26
|
+
export declare const withInstallFunction: <T>(fn: T, name: string) => SFCInstallWithContext<T>;
|
|
27
|
+
/**
|
|
28
|
+
* 为指令添加安装方法的高阶函数
|
|
29
|
+
* @param directive 待处理的指令
|
|
30
|
+
* @param name 指令名称
|
|
31
|
+
* @returns 带有install方法的指令
|
|
32
|
+
*
|
|
33
|
+
* 功能:
|
|
34
|
+
* 1. 为自定义指令添加 install 方法
|
|
35
|
+
* 2. 通过 app.directive() 注册指令到 Vue 应用
|
|
36
|
+
*/
|
|
37
|
+
export declare const withInstallDirective: <T extends Directive>(directive: T, name: string) => SFCWithInstall<T>;
|
|
38
|
+
/**
|
|
39
|
+
* 为组件添加空操作的安装方法
|
|
40
|
+
* @param component 待处理的组件
|
|
41
|
+
* @returns 带有空install方法的组件
|
|
42
|
+
*
|
|
43
|
+
* 功能:
|
|
44
|
+
* 1. 为组件添加一个不执行任何操作的 install 方法
|
|
45
|
+
* 2. 用于需要满足组件接口但不需要实际安装逻辑的场景
|
|
46
|
+
*
|
|
47
|
+
* 注意:这里需要导入或定义 NOOP 常量,建议添加:
|
|
48
|
+
* const NOOP = () => {}
|
|
49
|
+
*/
|
|
50
|
+
export declare const withNoopInstall: <T>(component: T) => SFCWithInstall<T>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { NOOP } from "@vue/shared";
|
|
2
|
+
//#region packages/utils/vue/install.ts
|
|
3
|
+
/**
|
|
4
|
+
* 为组件添加安装方法的高阶函数
|
|
5
|
+
* @param main 主组件
|
|
6
|
+
* @param extra 额外的组件对象(可选)
|
|
7
|
+
* @returns 带有install方法的组件
|
|
8
|
+
*
|
|
9
|
+
* 功能:
|
|
10
|
+
* 1. 为组件添加 install 方法,使其可以通过 app.use() 进行安装
|
|
11
|
+
* 2. 自动注册主组件和额外组件到 Vue 应用中
|
|
12
|
+
* 3. 组件名称会自动添加统一组件前缀,例如 Hd
|
|
13
|
+
*/
|
|
14
|
+
var withInstall = (main, extra) => {
|
|
15
|
+
main.install = (app) => {
|
|
16
|
+
for (const comp of [main, ...Object.values(extra !== null && extra !== void 0 ? extra : {})]) app.component(`Hd${comp.name}`, comp);
|
|
17
|
+
};
|
|
18
|
+
if (extra) for (const [key, comp] of Object.entries(extra)) main[key] = comp;
|
|
19
|
+
return main;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* 为函数式组件添加安装方法的高阶函数
|
|
23
|
+
* @param fn 待处理的函数组件
|
|
24
|
+
* @param name 组件名称
|
|
25
|
+
* @returns 带有install方法和上下文的函数组件
|
|
26
|
+
*
|
|
27
|
+
* 功能:
|
|
28
|
+
* 1. 为函数式组件添加 install 方法
|
|
29
|
+
* 2. 将函数挂载到 Vue 实例的全局属性上
|
|
30
|
+
* 3. 保存应用上下文到组件的 _context 属性
|
|
31
|
+
*/
|
|
32
|
+
var withInstallFunction = (fn, name) => {
|
|
33
|
+
fn.install = (app) => {
|
|
34
|
+
fn._context = app._context;
|
|
35
|
+
app.config.globalProperties[name] = fn;
|
|
36
|
+
};
|
|
37
|
+
return fn;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* 为指令添加安装方法的高阶函数
|
|
41
|
+
* @param directive 待处理的指令
|
|
42
|
+
* @param name 指令名称
|
|
43
|
+
* @returns 带有install方法的指令
|
|
44
|
+
*
|
|
45
|
+
* 功能:
|
|
46
|
+
* 1. 为自定义指令添加 install 方法
|
|
47
|
+
* 2. 通过 app.directive() 注册指令到 Vue 应用
|
|
48
|
+
*/
|
|
49
|
+
var withInstallDirective = (directive, name) => {
|
|
50
|
+
directive.install = (app) => {
|
|
51
|
+
app.directive(name, directive);
|
|
52
|
+
};
|
|
53
|
+
return directive;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* 为组件添加空操作的安装方法
|
|
57
|
+
* @param component 待处理的组件
|
|
58
|
+
* @returns 带有空install方法的组件
|
|
59
|
+
*
|
|
60
|
+
* 功能:
|
|
61
|
+
* 1. 为组件添加一个不执行任何操作的 install 方法
|
|
62
|
+
* 2. 用于需要满足组件接口但不需要实际安装逻辑的场景
|
|
63
|
+
*
|
|
64
|
+
* 注意:这里需要导入或定义 NOOP 常量,建议添加:
|
|
65
|
+
* const NOOP = () => {}
|
|
66
|
+
*/
|
|
67
|
+
var withNoopInstall = (component) => {
|
|
68
|
+
component.install = NOOP;
|
|
69
|
+
return component;
|
|
70
|
+
};
|
|
71
|
+
//#endregion
|
|
72
|
+
export { withInstall, withInstallDirective, withInstallFunction, withNoopInstall };
|
|
73
|
+
|
|
74
|
+
//# sourceMappingURL=install.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.mjs","names":[],"sources":["../../../../../packages/utils/vue/install.ts"],"sourcesContent":["import type { App, Directive } from 'vue'\nimport type { SFCInstallWithContext, SFCWithInstall } from './typescript'\nimport { NOOP } from '@vue/shared'\nimport { COMPONENT_EXPORT_PREFIX } from '@hd-custom/build-constants'\n\n/**\n * 为组件添加安装方法的高阶函数\n * @param main 主组件\n * @param extra 额外的组件对象(可选)\n * @returns 带有install方法的组件\n *\n * 功能:\n * 1. 为组件添加 install 方法,使其可以通过 app.use() 进行安装\n * 2. 自动注册主组件和额外组件到 Vue 应用中\n * 3. 组件名称会自动添加统一组件前缀,例如 Hd\n */\nexport const withInstall = <T, E extends Record<string, any>>(main: T, extra?: E) => {\n ;(main as SFCWithInstall<T>).install = (app): void => {\n for (const comp of [main, ...Object.values(extra ?? {})]) {\n app.component(`${COMPONENT_EXPORT_PREFIX}${comp.name}`, comp)\n }\n }\n\n if (extra) {\n for (const [key, comp] of Object.entries(extra)) {\n ;(main as any)[key] = comp\n }\n }\n return main as SFCWithInstall<T> & E\n}\n\n/**\n * 为函数式组件添加安装方法的高阶函数\n * @param fn 待处理的函数组件\n * @param name 组件名称\n * @returns 带有install方法和上下文的函数组件\n *\n * 功能:\n * 1. 为函数式组件添加 install 方法\n * 2. 将函数挂载到 Vue 实例的全局属性上\n * 3. 保存应用上下文到组件的 _context 属性\n */\nexport const withInstallFunction = <T>(fn: T, name: string) => {\n ;(fn as SFCWithInstall<T>).install = (app: App) => {\n ;(fn as SFCInstallWithContext<T>)._context = app._context\n app.config.globalProperties[name] = fn\n }\n\n return fn as SFCInstallWithContext<T>\n}\n\n/**\n * 为指令添加安装方法的高阶函数\n * @param directive 待处理的指令\n * @param name 指令名称\n * @returns 带有install方法的指令\n *\n * 功能:\n * 1. 为自定义指令添加 install 方法\n * 2. 通过 app.directive() 注册指令到 Vue 应用\n */\nexport const withInstallDirective = <T extends Directive>(directive: T, name: string) => {\n ;(directive as SFCWithInstall<T>).install = (app: App): void => {\n app.directive(name, directive)\n }\n\n return directive as SFCWithInstall<T>\n}\n\n/**\n * 为组件添加空操作的安装方法\n * @param component 待处理的组件\n * @returns 带有空install方法的组件\n *\n * 功能:\n * 1. 为组件添加一个不执行任何操作的 install 方法\n * 2. 用于需要满足组件接口但不需要实际安装逻辑的场景\n *\n * 注意:这里需要导入或定义 NOOP 常量,建议添加:\n * const NOOP = () => {}\n */\nexport const withNoopInstall = <T>(component: T) => {\n ;(component as SFCWithInstall<T>).install = NOOP\n\n return component as SFCWithInstall<T>\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,IAAa,eAAiD,MAAS,UAAc;AACjF,MAA2B,WAAW,QAAc;AACpD,OAAK,MAAM,QAAQ,CAAC,MAAM,GAAG,OAAO,OAAO,UAAA,QAAA,UAAA,KAAA,IAAA,QAAS,EAAE,CAAC,CAAC,CACtD,KAAI,UAAU,KAA6B,KAAK,QAAQ,KAAK;;AAIjE,KAAI,MACF,MAAK,MAAM,CAAC,KAAK,SAAS,OAAO,QAAQ,MAAM,CAC3C,MAAa,OAAO;AAG1B,QAAO;;;;;;;;;;;;;AAcT,IAAa,uBAA0B,IAAO,SAAiB;AAC3D,IAAyB,WAAW,QAAa;AAC/C,KAAgC,WAAW,IAAI;AACjD,MAAI,OAAO,iBAAiB,QAAQ;;AAGtC,QAAO;;;;;;;;;;;;AAaT,IAAa,wBAA6C,WAAc,SAAiB;AACrF,WAAgC,WAAW,QAAmB;AAC9D,MAAI,UAAU,MAAM,UAAU;;AAGhC,QAAO;;;;;;;;;;;;;;AAeT,IAAa,mBAAsB,cAAiB;AAChD,WAAgC,UAAU;AAE5C,QAAO"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { EpProp, EpPropConvert, EpPropFinalized, EpPropInput, EpPropMergeType, IfEpProp, IfNativePropType, NativePropType } from './types.js';
|
|
3
|
+
export declare const hdPropKey = "__hdPropKey";
|
|
4
|
+
export declare const definePropType: <T>(val: any) => PropType<T>;
|
|
5
|
+
export declare const isHdProp: (val: unknown) => val is EpProp<any, any, any>;
|
|
6
|
+
/**
|
|
7
|
+
* @description Build prop. It can better optimize prop types
|
|
8
|
+
* @description 生成 prop,能更好地优化类型
|
|
9
|
+
* @example
|
|
10
|
+
// limited options
|
|
11
|
+
// the type will be PropType<'light' | 'dark'>
|
|
12
|
+
buildProp({
|
|
13
|
+
type: String,
|
|
14
|
+
values: ['light', 'dark'],
|
|
15
|
+
} as const)
|
|
16
|
+
* @example
|
|
17
|
+
// limited options and other types
|
|
18
|
+
// the type will be PropType<'small' | 'large' | number>
|
|
19
|
+
buildProp({
|
|
20
|
+
type: [String, Number],
|
|
21
|
+
values: ['small', 'large'],
|
|
22
|
+
validator: (val: unknown): val is number => typeof val === 'number',
|
|
23
|
+
} as const)
|
|
24
|
+
@link see more: https://github.com/element-plus/element-plus/pull/3341
|
|
25
|
+
*/
|
|
26
|
+
export declare const buildProp: <Type = never, Value = never, Validator = never, Default extends EpPropMergeType<Type, Value, Validator> = never, Required extends boolean = false>(prop: EpPropInput<Type, Value, Validator, Default, Required>, key?: string) => EpPropFinalized<Type, Value, Validator, Default, Required>;
|
|
27
|
+
export declare const buildProps: <Props extends Record<string, {
|
|
28
|
+
[hdPropKey]: true;
|
|
29
|
+
} | NativePropType | EpPropInput<any, any, any, any, any>>>(props: Props) => { [K in keyof Props]: IfEpProp<Props[K], Props[K], IfNativePropType<Props[K], Props[K], EpPropConvert<Props[K]>>>; };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { isObject } from "../../types.mjs";
|
|
2
|
+
import { hasOwn } from "../../objects.mjs";
|
|
3
|
+
import { fromPairs } from "lodash-unified";
|
|
4
|
+
import { warn } from "vue";
|
|
5
|
+
//#region packages/utils/vue/props/runtime.ts
|
|
6
|
+
var hdPropKey = "__hdPropKey";
|
|
7
|
+
var definePropType = (val) => val;
|
|
8
|
+
var isHdProp = (val) => isObject(val) && !!val["__hdPropKey"];
|
|
9
|
+
/**
|
|
10
|
+
* @description Build prop. It can better optimize prop types
|
|
11
|
+
* @description 生成 prop,能更好地优化类型
|
|
12
|
+
* @example
|
|
13
|
+
// limited options
|
|
14
|
+
// the type will be PropType<'light' | 'dark'>
|
|
15
|
+
buildProp({
|
|
16
|
+
type: String,
|
|
17
|
+
values: ['light', 'dark'],
|
|
18
|
+
} as const)
|
|
19
|
+
* @example
|
|
20
|
+
// limited options and other types
|
|
21
|
+
// the type will be PropType<'small' | 'large' | number>
|
|
22
|
+
buildProp({
|
|
23
|
+
type: [String, Number],
|
|
24
|
+
values: ['small', 'large'],
|
|
25
|
+
validator: (val: unknown): val is number => typeof val === 'number',
|
|
26
|
+
} as const)
|
|
27
|
+
@link see more: https://github.com/element-plus/element-plus/pull/3341
|
|
28
|
+
*/
|
|
29
|
+
var buildProp = (prop, key) => {
|
|
30
|
+
if (!isObject(prop) || isHdProp(prop)) return prop;
|
|
31
|
+
const { values, required, default: defaultValue, type, validator } = prop;
|
|
32
|
+
const epProp = {
|
|
33
|
+
type,
|
|
34
|
+
required: !!required,
|
|
35
|
+
validator: values || validator ? (val) => {
|
|
36
|
+
let valid = false;
|
|
37
|
+
let allowedValues = [];
|
|
38
|
+
if (values) {
|
|
39
|
+
allowedValues = Array.from(values);
|
|
40
|
+
if (hasOwn(prop, "default")) allowedValues.push(defaultValue);
|
|
41
|
+
valid || (valid = allowedValues.includes(val));
|
|
42
|
+
}
|
|
43
|
+
if (validator) valid || (valid = validator(val));
|
|
44
|
+
if (!valid && allowedValues.length > 0) {
|
|
45
|
+
const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
|
|
46
|
+
warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
|
|
47
|
+
}
|
|
48
|
+
return valid;
|
|
49
|
+
} : void 0,
|
|
50
|
+
[hdPropKey]: true
|
|
51
|
+
};
|
|
52
|
+
if (hasOwn(prop, "default")) epProp.default = defaultValue;
|
|
53
|
+
return epProp;
|
|
54
|
+
};
|
|
55
|
+
var buildProps = (props) => fromPairs(Object.entries(props).map(([key, option]) => [key, buildProp(option, key)]));
|
|
56
|
+
//#endregion
|
|
57
|
+
export { buildProp, buildProps, definePropType, hdPropKey, isHdProp };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=runtime.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.mjs","names":[],"sources":["../../../../../../packages/utils/vue/props/runtime.ts"],"sourcesContent":["import { warn } from 'vue'\nimport { fromPairs } from 'lodash-unified'\nimport { isObject } from '../../types'\nimport { hasOwn } from '../../objects'\n\nimport type { PropType } from 'vue'\nimport type {\n EpProp,\n EpPropConvert,\n EpPropFinalized,\n EpPropInput,\n EpPropMergeType,\n IfEpProp,\n IfNativePropType,\n NativePropType,\n} from './types'\n\nexport const hdPropKey = '__hdPropKey'\n\nexport const definePropType = <T>(val: any): PropType<T> => val\n\nexport const isHdProp = (val: unknown): val is EpProp<any, any, any> => isObject(val) && !!(val as any)[hdPropKey]\n\n/**\n * @description Build prop. It can better optimize prop types\n * @description 生成 prop,能更好地优化类型\n * @example\n // limited options\n // the type will be PropType<'light' | 'dark'>\n buildProp({\n type: String,\n values: ['light', 'dark'],\n } as const)\n * @example\n // limited options and other types\n // the type will be PropType<'small' | 'large' | number>\n buildProp({\n type: [String, Number],\n values: ['small', 'large'],\n validator: (val: unknown): val is number => typeof val === 'number',\n } as const)\n @link see more: https://github.com/element-plus/element-plus/pull/3341\n */\nexport const buildProp = <\n Type = never,\n Value = never,\n Validator = never,\n Default extends EpPropMergeType<Type, Value, Validator> = never,\n Required extends boolean = false,\n>(\n prop: EpPropInput<Type, Value, Validator, Default, Required>,\n key?: string,\n): EpPropFinalized<Type, Value, Validator, Default, Required> => {\n // filter native prop type and nested prop, e.g `null`, `undefined` (from `buildProps`)\n if (!isObject(prop) || isHdProp(prop)) return prop as any\n\n const { values, required, default: defaultValue, type, validator } = prop\n\n const _validator =\n values || validator\n ? (val: unknown) => {\n let valid = false\n let allowedValues: unknown[] = []\n\n if (values) {\n allowedValues = Array.from(values)\n if (hasOwn(prop, 'default')) {\n allowedValues.push(defaultValue)\n }\n valid ||= allowedValues.includes(val)\n }\n if (validator) valid ||= validator(val)\n\n if (!valid && allowedValues.length > 0) {\n const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(', ')\n warn(\n `Invalid prop: validation failed${\n key ? ` for prop \"${key}\"` : ''\n }. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`,\n )\n }\n return valid\n }\n : undefined\n\n const epProp: any = {\n type,\n required: !!required,\n validator: _validator,\n [hdPropKey]: true,\n }\n if (hasOwn(prop, 'default')) epProp.default = defaultValue\n return epProp\n}\n\nexport const buildProps = <\n Props extends Record<string, { [hdPropKey]: true } | NativePropType | EpPropInput<any, any, any, any, any>>,\n>(\n props: Props,\n): {\n [K in keyof Props]: IfEpProp<Props[K], Props[K], IfNativePropType<Props[K], Props[K], EpPropConvert<Props[K]>>>\n} => fromPairs(Object.entries(props).map(([key, option]) => [key, buildProp(option as any, key)])) as any\n"],"mappings":";;;;;AAiBA,IAAa,YAAY;AAEzB,IAAa,kBAAqB,QAA0B;AAE5D,IAAa,YAAY,QAA+C,SAAS,IAAI,IAAI,CAAC,CAAE,IAAA;;;;;;;;;;;;;;;;;;;;;AAsB5F,IAAa,aAOX,MACA,QAC+D;AAE/D,KAAI,CAAC,SAAS,KAAK,IAAI,SAAS,KAAK,CAAE,QAAO;CAE9C,MAAM,EAAE,QAAQ,UAAU,SAAS,cAAc,MAAM,cAAc;CA6BrE,MAAM,SAAc;EAClB;EACA,UAAU,CAAC,CAAC;EACZ,WA7BA,UAAU,aACL,QAAiB;GAChB,IAAI,QAAQ;GACZ,IAAI,gBAA2B,EAAE;AAEjC,OAAI,QAAQ;AACV,oBAAgB,MAAM,KAAK,OAAO;AAClC,QAAI,OAAO,MAAM,UAAU,CACzB,eAAc,KAAK,aAAa;AAElC,cAAA,QAAU,cAAc,SAAS,IAAI;;AAEvC,OAAI,UAAW,WAAA,QAAU,UAAU,IAAI;AAEvC,OAAI,CAAC,SAAS,cAAc,SAAS,GAAG;IACtC,MAAM,kBAAkB,CAAC,GAAG,IAAI,IAAI,cAAc,CAAC,CAAC,KAAK,UAAU,KAAK,UAAU,MAAM,CAAC,CAAC,KAAK,KAAK;AACpG,SACE,kCACE,MAAM,cAAc,IAAI,KAAK,GAC9B,qBAAqB,gBAAgB,eAAe,KAAK,UAAU,IAAI,CAAC,GAC1E;;AAEH,UAAO;MAET,KAAA;GAMH,YAAY;EACd;AACD,KAAI,OAAO,MAAM,UAAU,CAAE,QAAO,UAAU;AAC9C,QAAO;;AAGT,IAAa,cAGX,UAGG,UAAU,OAAO,QAAQ,MAAM,CAAC,KAAK,CAAC,KAAK,YAAY,CAAC,KAAK,UAAU,QAAe,IAAI,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { hdPropKey } from './runtime.js';
|
|
2
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
import type { IfNever, UnknownToNever, WritableArray } from './util.js';
|
|
4
|
+
type Value<T> = T[keyof T];
|
|
5
|
+
/**
|
|
6
|
+
* Extract the type of a single prop
|
|
7
|
+
*
|
|
8
|
+
* 提取单个 prop 的参数类型
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ExtractPropType<{ type: StringConstructor }> => string | undefined
|
|
12
|
+
* ExtractPropType<{ type: StringConstructor, required: true }> => string
|
|
13
|
+
* ExtractPropType<{ type: BooleanConstructor }> => boolean
|
|
14
|
+
*/
|
|
15
|
+
export type ExtractPropType<T extends object> = Value<ExtractPropTypes<{
|
|
16
|
+
key: T;
|
|
17
|
+
}>>;
|
|
18
|
+
/**
|
|
19
|
+
* Extracts types via `ExtractPropTypes`, accepting `PropType<T>`, `XXXConstructor`, `never`...
|
|
20
|
+
*
|
|
21
|
+
* 通过 `ExtractPropTypes` 提取类型,接受 `PropType<T>`、`XXXConstructor`、`never`...
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ResolvePropType<BooleanConstructor> => boolean
|
|
25
|
+
* ResolvePropType<PropType<T>> => T
|
|
26
|
+
**/
|
|
27
|
+
export type ResolvePropType<T> = IfNever<T, never, ExtractPropType<{
|
|
28
|
+
type: WritableArray<T>;
|
|
29
|
+
required: true;
|
|
30
|
+
}>>;
|
|
31
|
+
/**
|
|
32
|
+
* Merge Type, Value, Validator types
|
|
33
|
+
* 合并 Type、Value、Validator 的类型
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* EpPropMergeType<StringConstructor, '1', 1> => 1 | "1" // ignores StringConstructor
|
|
37
|
+
* EpPropMergeType<StringConstructor, never, number> => string | number
|
|
38
|
+
*/
|
|
39
|
+
export type EpPropMergeType<Type, Value, Validator> = IfNever<UnknownToNever<Value>, ResolvePropType<Type>, never> | UnknownToNever<Value> | UnknownToNever<Validator>;
|
|
40
|
+
/**
|
|
41
|
+
* Handling default values for input (constraints)
|
|
42
|
+
*
|
|
43
|
+
* 处理输入参数的默认值(约束)
|
|
44
|
+
*/
|
|
45
|
+
export type EpPropInputDefault<Required extends boolean, Default> = Required extends true ? never : Default extends Record<string, unknown> | Array<any> ? () => Default : (() => Default) | Default;
|
|
46
|
+
/**
|
|
47
|
+
* Native prop types, e.g: `BooleanConstructor`, `StringConstructor`, `null`, `undefined`, etc.
|
|
48
|
+
*
|
|
49
|
+
* 原生 prop `类型,BooleanConstructor`、`StringConstructor`、`null`、`undefined` 等
|
|
50
|
+
*/
|
|
51
|
+
export type NativePropType = ((...args: any) => any) | {
|
|
52
|
+
new (...args: any): any;
|
|
53
|
+
} | undefined | null;
|
|
54
|
+
export type IfNativePropType<T, Y, N> = [T] extends [NativePropType] ? Y : N;
|
|
55
|
+
/**
|
|
56
|
+
* input prop `buildProp` or `buildProps` (constraints)
|
|
57
|
+
*
|
|
58
|
+
* prop 输入参数(约束)
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* EpPropInput<StringConstructor, 'a', never, never, true>
|
|
62
|
+
* ⬇️
|
|
63
|
+
* {
|
|
64
|
+
type?: StringConstructor | undefined;
|
|
65
|
+
required?: true | undefined;
|
|
66
|
+
values?: readonly "a"[] | undefined;
|
|
67
|
+
validator?: ((val: any) => boolean) | ((val: any) => val is never) | undefined;
|
|
68
|
+
default?: undefined;
|
|
69
|
+
}
|
|
70
|
+
*/
|
|
71
|
+
export type EpPropInput<Type, Value, Validator, Default extends EpPropMergeType<Type, Value, Validator>, Required extends boolean> = {
|
|
72
|
+
type?: Type;
|
|
73
|
+
required?: Required;
|
|
74
|
+
values?: readonly Value[];
|
|
75
|
+
validator?: ((val: any) => val is Validator) | ((val: any) => boolean);
|
|
76
|
+
default?: EpPropInputDefault<Required, Default>;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* output prop `buildProp` or `buildProps`.
|
|
80
|
+
*
|
|
81
|
+
* prop 输出参数。
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* EpProp<'a', 'b', true>
|
|
85
|
+
* ⬇️
|
|
86
|
+
* {
|
|
87
|
+
readonly type: PropType<"a">;
|
|
88
|
+
readonly required: true;
|
|
89
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
90
|
+
readonly default: "b";
|
|
91
|
+
__epPropKey: true;
|
|
92
|
+
}
|
|
93
|
+
*/
|
|
94
|
+
export type EpProp<Type, Default, Required> = {
|
|
95
|
+
readonly type: PropType<Type>;
|
|
96
|
+
readonly required: [Required] extends [true] ? true : false;
|
|
97
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
98
|
+
[hdPropKey]: true;
|
|
99
|
+
} & IfNever<Default, unknown, {
|
|
100
|
+
readonly default: Default;
|
|
101
|
+
}>;
|
|
102
|
+
/**
|
|
103
|
+
* Determine if it is `EpProp`
|
|
104
|
+
*/
|
|
105
|
+
export type IfEpProp<T, Y, N> = T extends {
|
|
106
|
+
[hdPropKey]: true;
|
|
107
|
+
} ? Y : N;
|
|
108
|
+
/**
|
|
109
|
+
* Converting input to output.
|
|
110
|
+
*
|
|
111
|
+
* 将输入转换为输出
|
|
112
|
+
*/
|
|
113
|
+
export type EpPropConvert<Input> = Input extends EpPropInput<infer Type, infer Value, infer Validator, any, infer Required> ? EpPropFinalized<Type, Value, Validator, Input['default'], Required> : never;
|
|
114
|
+
/**
|
|
115
|
+
* Finalized conversion output
|
|
116
|
+
*
|
|
117
|
+
* 最终转换 EpProp
|
|
118
|
+
*/
|
|
119
|
+
export type EpPropFinalized<Type, Value, Validator, Default, Required> = EpProp<EpPropMergeType<Type, Value, Validator>, UnknownToNever<Default>, Required>;
|
|
120
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type Writable<T> = {
|
|
2
|
+
-readonly [P in keyof T]: T[P];
|
|
3
|
+
};
|
|
4
|
+
export type WritableArray<T> = T extends readonly any[] ? Writable<T> : T;
|
|
5
|
+
export type IfNever<T, Y = true, N = false> = [T] extends [never] ? Y : N;
|
|
6
|
+
export type IfUnknown<T, Y, N> = [unknown] extends [T] ? Y : N;
|
|
7
|
+
export type UnknownToNever<T> = IfUnknown<T, never, T>;
|
|
8
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AppContext, EmitsOptions, Plugin, SetupContext } from 'vue';
|
|
2
|
+
export type SFCWithInstall<T> = T & Plugin;
|
|
3
|
+
export type SFCInstallWithContext<T> = SFCWithInstall<T> & {
|
|
4
|
+
_context: AppContext | null;
|
|
5
|
+
};
|
|
6
|
+
export type EmitFn<E extends EmitsOptions> = SetupContext<E>['emit'];
|
|
File without changes
|
package/es/version.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const version = "0.0.0-dev.1";
|
package/es/version.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.mjs","names":[],"sources":["../../../packages/hd-custom/version.ts"],"sourcesContent":["export const version = '0.0.0-dev.1'\n"],"mappings":";AAAA,IAAa,UAAU"}
|
package/global.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rdeam/qui",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"module": "es/index.mjs",
|
|
6
|
+
"types": "es/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./es/index.d.ts",
|
|
10
|
+
"import": "./es/index.mjs"
|
|
11
|
+
},
|
|
12
|
+
"./global": {
|
|
13
|
+
"types": "./global.d.ts",
|
|
14
|
+
"import": "./global.d.ts",
|
|
15
|
+
"default": "./global.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./es": {
|
|
18
|
+
"types": "./es/index.d.ts",
|
|
19
|
+
"import": "./es/index.mjs"
|
|
20
|
+
},
|
|
21
|
+
"./resolvers": {
|
|
22
|
+
"types": "./resolvers/index.d.ts",
|
|
23
|
+
"import": "./resolvers/index.mjs"
|
|
24
|
+
},
|
|
25
|
+
"./share": {
|
|
26
|
+
"types": "./es/share/dist/index.d.ts",
|
|
27
|
+
"import": "./es/share/dist/index.mjs"
|
|
28
|
+
},
|
|
29
|
+
"./es/*.mjs": {
|
|
30
|
+
"types": "./es/*.d.ts",
|
|
31
|
+
"import": "./es/*.mjs"
|
|
32
|
+
},
|
|
33
|
+
"./es/*": {
|
|
34
|
+
"types": [
|
|
35
|
+
"./es/*.d.ts",
|
|
36
|
+
"./es/*/index.d.ts"
|
|
37
|
+
],
|
|
38
|
+
"import": "./es/*.mjs"
|
|
39
|
+
},
|
|
40
|
+
"./*": "./*"
|
|
41
|
+
},
|
|
42
|
+
"style": "theme-chalk/index.css",
|
|
43
|
+
"sideEffects": [
|
|
44
|
+
"theme-chalk/*.css"
|
|
45
|
+
],
|
|
46
|
+
"author": {
|
|
47
|
+
"name": "Your Name",
|
|
48
|
+
"email": "your.email@example.com"
|
|
49
|
+
},
|
|
50
|
+
"bugs": {
|
|
51
|
+
"url": "https://github.com/your-name/hd-ui/issues"
|
|
52
|
+
},
|
|
53
|
+
"homepage": "https://github.com/your-name/hd-ui",
|
|
54
|
+
"repository": "https://github.com/your-name/hd-ui",
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public",
|
|
57
|
+
"directory": "dist",
|
|
58
|
+
"registry": "https://registry.npmjs.org/"
|
|
59
|
+
},
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"lodash-unified": "^1.0.3",
|
|
62
|
+
"simple-uploader.js": "^0.6.0",
|
|
63
|
+
"spark-md5": "^3.0.2"
|
|
64
|
+
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"@element-plus/icons-vue": "^2.1.0",
|
|
67
|
+
"axios": "^1.3.5",
|
|
68
|
+
"echarts": "^5.4.2",
|
|
69
|
+
"element-plus": "^2.6.1",
|
|
70
|
+
"immutable": "^4.3.4",
|
|
71
|
+
"vue": "*",
|
|
72
|
+
"vue-router": "*"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@element-plus/icons-vue": "^2.3.2",
|
|
76
|
+
"axios": "^1.15.2",
|
|
77
|
+
"element-plus": "^2.13.7",
|
|
78
|
+
"immutable": "^5.1.5"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface HdCustomResolverOptions {
|
|
2
|
+
/**
|
|
3
|
+
* 是否自动导入组件样式文件。
|
|
4
|
+
*
|
|
5
|
+
* @default true
|
|
6
|
+
*/
|
|
7
|
+
importStyle?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const HdCustomResolver: (options?: HdCustomResolverOptions) => {
|
|
10
|
+
type: "component";
|
|
11
|
+
resolve: (name: string) => {
|
|
12
|
+
name: string;
|
|
13
|
+
from: string;
|
|
14
|
+
sideEffects: string[] | undefined;
|
|
15
|
+
} | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { HdCustomResolver };
|
|
19
|
+
export type { HdCustomResolverOptions };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface HdCustomResolverOptions {
|
|
2
|
+
/**
|
|
3
|
+
* 是否自动导入组件样式文件。
|
|
4
|
+
*
|
|
5
|
+
* @default true
|
|
6
|
+
*/
|
|
7
|
+
importStyle?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const HdCustomResolver: (options?: HdCustomResolverOptions) => {
|
|
10
|
+
type: "component";
|
|
11
|
+
resolve: (name: string) => {
|
|
12
|
+
name: string;
|
|
13
|
+
from: string;
|
|
14
|
+
sideEffects: string[] | undefined;
|
|
15
|
+
} | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { HdCustomResolver };
|
|
19
|
+
export type { HdCustomResolverOptions };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const COMPONENT_EXPORT_PREFIX = "Hd";
|
|
2
|
+
const COMPONENT_STYLE_PREFIX = "hd";
|
|
3
|
+
function getComponentStyleName(componentName) {
|
|
4
|
+
return `${COMPONENT_STYLE_PREFIX}-${componentName}`;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function getSideEffects(componentName, importStyle) {
|
|
8
|
+
if (!importStyle) return;
|
|
9
|
+
return [`@rdeam/qui/theme-chalk/${getComponentStyleName(componentName)}.css`];
|
|
10
|
+
}
|
|
11
|
+
const HdCustomResolver = (options = {}) => {
|
|
12
|
+
const resolvedOptions = {
|
|
13
|
+
importStyle: true,
|
|
14
|
+
...options
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
type: "component",
|
|
18
|
+
resolve: (name) => {
|
|
19
|
+
if (name.startsWith(COMPONENT_EXPORT_PREFIX)) {
|
|
20
|
+
const componentName = name.slice(COMPONENT_EXPORT_PREFIX.length);
|
|
21
|
+
const jsname = componentName.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
22
|
+
return {
|
|
23
|
+
name,
|
|
24
|
+
from: `@rdeam/qui/es/components/${jsname}/index.mjs`,
|
|
25
|
+
sideEffects: getSideEffects(jsname, resolvedOptions.importStyle)
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { HdCustomResolver };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.hd-c-date-picker input:first-of-type{text-align:left!important;padding-left:8px!important}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.text-opc0{opacity:0}.descriptions-border{border:0;border-top:1px solid #0505050f;border-left:1px solid #0505050f}.descriptions-border .desc-label{word-break:break-all;background:#00000005;border:1px solid #0505050f;border-top:0;border-left:0;padding:8px}.descriptions-border .desc-prop{border:1px solid #0505050f;border-top:0;border-left:0;padding:8px}.h-\[100px\]{height:100px}.w-0{width:0}.w-full{width:100%}.flex{display:flex}.flex-1{flex:1}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.overflow-x-hidden{overflow-x:hidden}.break-all{word-break:break-all}.text-\[14px\]{font-size:14px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ellipsis-tag .tag-box{white-space:nowrap;flex-wrap:nowrap;gap:4px;width:fit-content;display:flex}.ellipsis-tag .ellipsis{cursor:pointer;--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity)) ;color:#7f7f7f;border:1px solid #0000000f;border-radius:2px;align-items:center;padding-left:8px;padding-right:8px;transition:all .3s;display:flex}.ellipsis-tag .ellipsis:hover{background-color:var(--el-color-primary-light-9);border-color:var(--el-color-primary-light-7);color:var(--el-color-primary)}.el-popover.ellipsis-tag-popover{padding:.75rem}.el-popover.ellipsis-tag-popover .tag-box{flex-wrap:wrap;gap:4px;display:flex}.el-popover.ellipsis-tag-popover .tag{white-space:nowrap;background-color:#fff;border:1px solid #00000026;border-radius:2px;margin:0;padding:4px 8px}.flex{display:flex}.w-full{width:100%}.flex,[flex=""]{display:flex}.flex-1{flex:1}.overflow-hidden{overflow:hidden}
|