@vtx/components 4.0.0-beta.6 → 4.0.0-beta.7
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/es/index.js +73 -0
- package/es/utils/columnSort.js +23 -0
- package/es/utils/components/DropdownFooter/index.js +53 -0
- package/es/utils/components/DropdownFooter/style.js +25 -0
- package/es/utils/components/ErrorBoundary/index.js +53 -0
- package/es/utils/components/FieldLabel/index.js +144 -0
- package/es/utils/components/FieldLabel/style.js +93 -0
- package/es/utils/components/FilterDropdown/index.js +62 -0
- package/es/utils/components/FilterDropdown/style.js +26 -0
- package/es/utils/components/InlineErrorFormItem/index.js +156 -0
- package/es/utils/components/InlineErrorFormItem/style.js +47 -0
- package/es/utils/components/LabelIconTip/index.js +68 -0
- package/es/utils/components/LabelIconTip/style.js +47 -0
- package/es/utils/components/ProFormContext/index.js +41 -0
- package/es/utils/conversionMomentValue/index.js +163 -0
- package/es/utils/dateArrayFormatter/index.js +36 -0
- package/es/utils/filterSpecialCharacters.js +82 -0
- package/es/utils/genColumnKey.js +6 -0
- package/es/utils/genCopyable/index.js +59 -0
- package/es/utils/getComponentProps.js +7 -0
- package/es/utils/getFieldPropsOrFormItemProps/index.js +16 -0
- package/es/utils/getPlaceholder.js +5 -0
- package/es/utils/getToken.js +6 -0
- package/es/utils/hooks/useDebounceFn/index.js +71 -0
- package/es/utils/hooks/useDebounceValue/index.js +40 -0
- package/es/utils/hooks/useDeepCompareEffect/index.js +24 -0
- package/es/utils/hooks/useDeepCompareMemo/index.js +15 -0
- package/es/utils/hooks/useDocumentTitle/index.js +10 -0
- package/es/utils/hooks/useFetchData/index.js +82 -0
- package/es/utils/hooks/useForceRender/index.js +18 -0
- package/es/utils/hooks/useLatest/index.js +10 -0
- package/es/utils/hooks/usePrevious/index.js +8 -0
- package/es/utils/hooks/useReactiveRef/index.js +7 -0
- package/es/utils/hooks/useRefCallback/index.js +26 -0
- package/es/utils/hooks/useRefFunction/index.js +13 -0
- package/es/utils/index.js +73 -0
- package/es/utils/isBrowser/index.d.ts +9 -0
- package/es/utils/isBrowser/index.js +16 -0
- package/es/utils/isDeepEqualReact/index.js +95 -0
- package/es/utils/isDropdownValueType/index.js +7 -0
- package/es/utils/isFunction.js +3 -0
- package/es/utils/isImg/index.js +4 -0
- package/es/utils/isNil/index.js +3 -0
- package/es/utils/isObject/index.js +3 -0
- package/es/utils/isObject.js +3 -0
- package/es/utils/isUrl/index.js +17 -0
- package/es/utils/merge/index.js +36 -0
- package/es/utils/nanoid/index.js +29 -0
- package/es/utils/omitBoolean/index.js +11 -0
- package/es/utils/omitUndefined/index.js +12 -0
- package/es/utils/omitUndefinedAndEmptyArr/index.js +14 -0
- package/es/utils/parseValueToMoment/index.js +28 -0
- package/es/utils/pickProFormItemProps/index.js +15 -0
- package/es/utils/pickProProps/index.js +15 -0
- package/es/utils/proFieldParsingText/index.js +161 -0
- package/es/utils/runFunction/index.js +10 -0
- package/es/utils/sortByGivenOrder.js +36 -0
- package/es/utils/sortByKeyArrayExtract.js +38 -0
- package/es/utils/stringify/index.js +10 -0
- package/es/utils/transformKeySubmitValue/index.js +330 -0
- package/es/utils/useColSize.js +20 -0
- package/es/utils/useEditableArray/index.js +906 -0
- package/es/utils/useEditableMap/index.js +214 -0
- package/es/utils/useInterval.js +12 -0
- package/es/utils/useMediaQuery/index.js +106 -0
- package/es/utils/useMediaQuery/query.js +30 -0
- package/es/utils/useMountMergeState/index.js +2 -0
- package/es/utils/useSet.js +38 -0
- package/es/version.js +3 -0
- package/es/vtx-color-picker/index.js +70 -0
- package/es/vtx-color-picker/style/index.js +30 -0
- package/es/vtx-combogrid/Combogrid.js +247 -0
- package/es/vtx-combogrid/index.js +121 -0
- package/es/vtx-combogrid/style/index.js +42 -0
- package/es/vtx-datagrid/Alert/index.js +49 -0
- package/es/vtx-datagrid/Alert/style.js +44 -0
- package/es/vtx-datagrid/Store/Provide.js +441 -0
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +526 -0
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +86 -0
- package/es/vtx-datagrid/ToolBar/components/Density/index.js +48 -0
- package/es/vtx-datagrid/ToolBar/components/Fullscreen/index.js +77 -0
- package/es/vtx-datagrid/ToolBar/components/TableStyle/index.js +71 -0
- package/es/vtx-datagrid/ToolBar/index.js +88 -0
- package/es/vtx-datagrid/ToolBar/style.js +59 -0
- package/es/vtx-datagrid/index.js +362 -0
- package/es/vtx-datagrid/renderColumnButtons.js +98 -0
- package/es/vtx-datagrid/style/index.js +80 -0
- package/es/vtx-datagrid/style/index.less +242 -0
- package/es/vtx-date-picker/QdatePicker.js +152 -0
- package/es/vtx-date-picker/generatePicker.js +104 -0
- package/es/vtx-date-picker/index.js +49 -0
- package/es/vtx-date-picker/style/index.js +39 -0
- package/es/vtx-date-picker/style/index.less +39 -0
- package/es/vtx-ellipsis-text/index.js +52 -0
- package/es/vtx-ellipsis-text/style/index.js +29 -0
- package/es/vtx-export/index.js +197 -0
- package/es/vtx-export/style/index.js +24 -0
- package/es/vtx-export-async/ColumnsSelect.js +63 -0
- package/es/vtx-export-async/History.js +256 -0
- package/es/vtx-export-async/index.js +402 -0
- package/es/vtx-export-async/style/index.js +49 -0
- package/es/vtx-export-async/util.js +51 -0
- package/es/vtx-form-layout/Card.js +74 -0
- package/es/vtx-form-layout/Divider.js +22 -0
- package/es/vtx-form-layout/FormItem.js +135 -0
- package/es/vtx-form-layout/Pane.js +41 -0
- package/es/vtx-form-layout/Row.js +19 -0
- package/es/vtx-form-layout/context.js +2 -0
- package/es/vtx-form-layout/index.js +80 -0
- package/es/vtx-form-layout/style/index.js +261 -0
- package/es/vtx-icon/index.js +78 -0
- package/es/vtx-icon/svg/alignRightOutlined.js +29 -0
- package/es/vtx-icon/svg/columnHeightOutlined.js +25 -0
- package/es/vtx-icon/svg/downOutlined.js +24 -0
- package/es/vtx-icon/svg/fullscreen.js +25 -0
- package/es/vtx-icon/svg/redoOutlined.js +29 -0
- package/es/vtx-icon/svg/rightOutlined.js +24 -0
- package/es/vtx-icon/svg/settingOutlined.js +29 -0
- package/es/vtx-image/Image.js +257 -0
- package/es/vtx-image/Preview.js +140 -0
- package/es/vtx-image/PreviewGroup.js +81 -0
- package/es/vtx-image/index.js +4 -0
- package/es/vtx-image/style/index.js +91 -0
- package/es/vtx-import/index.js +416 -0
- package/es/vtx-import/result.js +81 -0
- package/es/vtx-import/style/index.js +19 -0
- package/es/vtx-import2/CheckResult.js +45 -0
- package/es/vtx-import2/Content.js +103 -0
- package/es/vtx-import2/DownloadSvg.js +41 -0
- package/es/vtx-import2/ImportResult.js +57 -0
- package/es/vtx-import2/UploadSvg.js +41 -0
- package/es/vtx-import2/index.js +453 -0
- package/es/vtx-import2/style/index.js +99 -0
- package/es/vtx-input/TextArea/index.js +61 -0
- package/es/vtx-input/TextArea/style.js +30 -0
- package/es/vtx-input/index.js +92 -0
- package/es/vtx-input/style/index.js +24 -0
- package/es/vtx-input/useLength.js +21 -0
- package/es/vtx-modal/Title.js +34 -0
- package/es/vtx-modal/index.js +243 -0
- package/es/vtx-modal/style/index.js +109 -0
- package/es/vtx-page-layout/Basic.js +28 -0
- package/es/vtx-page-layout/Content.js +43 -0
- package/es/vtx-page-layout/Pane.js +40 -0
- package/es/vtx-page-layout/TabLayout.js +65 -0
- package/es/vtx-page-layout/TableLayout.js +163 -0
- package/es/vtx-page-layout/TableWrap.js +36 -0
- package/es/vtx-page-layout/TreeLayout.js +79 -0
- package/es/vtx-page-layout/container.js +68 -0
- package/es/vtx-page-layout/index.js +26 -0
- package/es/vtx-page-layout/style/index.js +129 -0
- package/es/vtx-provider/index.js +315 -0
- package/es/vtx-provider/intl.js +140 -0
- package/es/vtx-provider/locale/ar_EG.js +71 -0
- package/es/vtx-provider/locale/ca_ES.js +71 -0
- package/es/vtx-provider/locale/cs_CZ.js +74 -0
- package/es/vtx-provider/locale/de_DE.js +71 -0
- package/es/vtx-provider/locale/en_GB.js +73 -0
- package/es/vtx-provider/locale/en_US.js +181 -0
- package/es/vtx-provider/locale/es_ES.js +71 -0
- package/es/vtx-provider/locale/fa_IR.js +71 -0
- package/es/vtx-provider/locale/fr_FR.js +71 -0
- package/es/vtx-provider/locale/he_IL.js +74 -0
- package/es/vtx-provider/locale/hr_HR.js +71 -0
- package/es/vtx-provider/locale/id_ID.js +71 -0
- package/es/vtx-provider/locale/it_IT.js +71 -0
- package/es/vtx-provider/locale/ja_JP.js +71 -0
- package/es/vtx-provider/locale/ko_KR.js +71 -0
- package/es/vtx-provider/locale/mn_MN.js +71 -0
- package/es/vtx-provider/locale/ms_MY.js +71 -0
- package/es/vtx-provider/locale/nl_NL.js +74 -0
- package/es/vtx-provider/locale/pl_PL.js +71 -0
- package/es/vtx-provider/locale/pt_BR.js +71 -0
- package/es/vtx-provider/locale/ro_RO.js +74 -0
- package/es/vtx-provider/locale/ru_RU.js +71 -0
- package/es/vtx-provider/locale/sk_SK.js +74 -0
- package/es/vtx-provider/locale/sr_RS.js +71 -0
- package/es/vtx-provider/locale/sv_SE.js +74 -0
- package/es/vtx-provider/locale/th_TH.js +74 -0
- package/es/vtx-provider/locale/tr_TR.js +71 -0
- package/es/vtx-provider/locale/uk_UA.js +74 -0
- package/es/vtx-provider/locale/uz_UZ.js +71 -0
- package/es/vtx-provider/locale/vi_VN.js +71 -0
- package/es/vtx-provider/locale/zh_CN.js +183 -0
- package/es/vtx-provider/locale/zh_HK.js +83 -0
- package/es/vtx-provider/locale/zh_TW.js +74 -0
- package/es/vtx-provider/typing/layoutToken.js +60 -0
- package/es/vtx-provider/useStyle/index.js +106 -0
- package/es/vtx-provider/utils/merge.js +27 -0
- package/es/vtx-rps-frame/index.js +164 -0
- package/es/vtx-rps-frame/style/index.js +26 -0
- package/es/vtx-scrollable-row/index.js +183 -0
- package/es/vtx-scrollable-row/style/index.js +108 -0
- package/es/vtx-search/index.js +350 -0
- package/es/vtx-search/style/index.js +94 -0
- package/es/vtx-select/index.js +252 -0
- package/es/vtx-select/style/index.js +75 -0
- package/es/vtx-signature/index.js +119 -0
- package/es/vtx-signature/style/index.js +47 -0
- package/es/vtx-split-pane/Resizer.js +47 -0
- package/es/vtx-split-pane/SplitPane.js +60 -0
- package/es/vtx-split-pane/index.js +3 -0
- package/es/vtx-split-pane/style/index.js +133 -0
- package/es/vtx-statistics-column/Back.js +27 -0
- package/es/vtx-statistics-column/Item.js +54 -0
- package/es/vtx-statistics-column/Total.js +54 -0
- package/es/vtx-statistics-column/context.js +2 -0
- package/es/vtx-statistics-column/index.js +54 -0
- package/es/vtx-statistics-column/style/index.js +72 -0
- package/es/vtx-time-picker/index.js +37 -0
- package/es/vtx-time-picker/style/index.js +0 -0
- package/es/vtx-tree/index.js +341 -0
- package/es/vtx-tree/style/index.js +50 -0
- package/es/vtx-tree/utils.js +73 -0
- package/es/vtx-tree-select/index.js +290 -0
- package/es/vtx-tree-select/style/index.js +72 -0
- package/es/vtx-upload/FilePreview.js +111 -0
- package/es/vtx-upload/index.js +468 -0
- package/es/vtx-upload/style/index.js +83 -0
- package/es/vtx-wang-editor/index.js +245 -0
- package/es/vtx-wang-editor/style/index.js +33 -0
- package/es/vtx-wang-editor/style/index.less +12 -0
- package/es/vtx-wang-editor/wangEditorUtil.js +226 -0
- package/lib/index.js +363 -0
- package/lib/utils/columnSort.js +29 -0
- package/lib/utils/components/DropdownFooter/index.js +62 -0
- package/lib/utils/components/DropdownFooter/style.js +31 -0
- package/lib/utils/components/ErrorBoundary/index.js +59 -0
- package/lib/utils/components/FieldLabel/index.js +152 -0
- package/lib/utils/components/FieldLabel/style.js +99 -0
- package/lib/utils/components/FilterDropdown/index.js +70 -0
- package/lib/utils/components/FilterDropdown/style.js +32 -0
- package/lib/utils/components/InlineErrorFormItem/index.js +162 -0
- package/lib/utils/components/InlineErrorFormItem/style.js +53 -0
- package/lib/utils/components/LabelIconTip/index.js +73 -0
- package/lib/utils/components/LabelIconTip/style.js +53 -0
- package/lib/utils/components/ProFormContext/index.js +48 -0
- package/lib/utils/conversionMomentValue/index.js +170 -0
- package/lib/utils/dateArrayFormatter/index.js +43 -0
- package/lib/utils/filterSpecialCharacters.js +89 -0
- package/lib/utils/genColumnKey.js +12 -0
- package/lib/utils/genCopyable/index.js +66 -0
- package/lib/utils/getComponentProps.js +13 -0
- package/lib/utils/getFieldPropsOrFormItemProps/index.js +21 -0
- package/lib/utils/getPlaceholder.js +11 -0
- package/lib/utils/getToken.js +12 -0
- package/lib/utils/hooks/useDebounceFn/index.js +77 -0
- package/lib/utils/hooks/useDebounceValue/index.js +45 -0
- package/lib/utils/hooks/useDeepCompareEffect/index.js +33 -0
- package/lib/utils/hooks/useDeepCompareMemo/index.js +21 -0
- package/lib/utils/hooks/useDocumentTitle/index.js +16 -0
- package/lib/utils/hooks/useFetchData/index.js +89 -0
- package/lib/utils/hooks/useForceRender/index.js +24 -0
- package/lib/utils/hooks/useLatest/index.js +15 -0
- package/lib/utils/hooks/usePrevious/index.js +14 -0
- package/lib/utils/hooks/useReactiveRef/index.js +14 -0
- package/lib/utils/hooks/useRefCallback/index.js +31 -0
- package/lib/utils/hooks/useRefFunction/index.js +18 -0
- package/lib/utils/index.js +436 -0
- package/lib/utils/isBrowser/index.d.ts +9 -0
- package/lib/utils/isBrowser/index.js +22 -0
- package/lib/utils/isDeepEqualReact/index.js +101 -0
- package/lib/utils/isDropdownValueType/index.js +13 -0
- package/lib/utils/isFunction.js +9 -0
- package/lib/utils/isImg/index.js +10 -0
- package/lib/utils/isNil/index.js +9 -0
- package/lib/utils/isObject/index.js +9 -0
- package/lib/utils/isObject.js +9 -0
- package/lib/utils/isUrl/index.js +23 -0
- package/lib/utils/merge/index.js +41 -0
- package/lib/utils/nanoid/index.js +35 -0
- package/lib/utils/omitBoolean/index.js +17 -0
- package/lib/utils/omitUndefined/index.js +18 -0
- package/lib/utils/omitUndefinedAndEmptyArr/index.js +20 -0
- package/lib/utils/parseValueToMoment/index.js +35 -0
- package/lib/utils/pickProFormItemProps/index.js +21 -0
- package/lib/utils/pickProProps/index.js +21 -0
- package/lib/utils/proFieldParsingText/index.js +166 -0
- package/lib/utils/runFunction/index.js +16 -0
- package/lib/utils/sortByGivenOrder.js +42 -0
- package/lib/utils/sortByKeyArrayExtract.js +44 -0
- package/lib/utils/stringify/index.js +21 -0
- package/lib/utils/transformKeySubmitValue/index.js +337 -0
- package/lib/utils/useColSize.js +26 -0
- package/lib/utils/useEditableArray/index.js +918 -0
- package/lib/utils/useEditableMap/index.js +219 -0
- package/lib/utils/useInterval.js +18 -0
- package/lib/utils/useMediaQuery/index.js +112 -0
- package/lib/utils/useMediaQuery/query.js +36 -0
- package/lib/utils/useMountMergeState/index.js +12 -0
- package/lib/utils/useSet.js +43 -0
- package/lib/version.js +9 -0
- package/lib/vtx-color-picker/index.js +77 -0
- package/lib/vtx-color-picker/style/index.js +36 -0
- package/lib/vtx-combogrid/Combogrid.js +255 -0
- package/lib/vtx-combogrid/index.js +129 -0
- package/lib/vtx-combogrid/style/index.js +48 -0
- package/lib/vtx-datagrid/Alert/index.js +57 -0
- package/lib/vtx-datagrid/Alert/style.js +50 -0
- package/lib/vtx-datagrid/Store/Provide.js +446 -0
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +531 -0
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +92 -0
- package/lib/vtx-datagrid/ToolBar/components/Density/index.js +54 -0
- package/lib/vtx-datagrid/ToolBar/components/Fullscreen/index.js +83 -0
- package/lib/vtx-datagrid/ToolBar/components/TableStyle/index.js +77 -0
- package/lib/vtx-datagrid/ToolBar/index.js +96 -0
- package/lib/vtx-datagrid/ToolBar/style.js +65 -0
- package/lib/vtx-datagrid/index.js +370 -0
- package/lib/vtx-datagrid/renderColumnButtons.js +104 -0
- package/lib/vtx-datagrid/style/index.js +86 -0
- package/lib/vtx-datagrid/style/index.less +242 -0
- package/lib/vtx-date-picker/QdatePicker.js +157 -0
- package/lib/vtx-date-picker/generatePicker.js +111 -0
- package/lib/vtx-date-picker/index.js +55 -0
- package/lib/vtx-date-picker/style/index.js +45 -0
- package/lib/vtx-date-picker/style/index.less +39 -0
- package/lib/vtx-ellipsis-text/index.js +60 -0
- package/lib/vtx-ellipsis-text/style/index.js +35 -0
- package/lib/vtx-export/index.js +203 -0
- package/lib/vtx-export/style/index.js +30 -0
- package/lib/vtx-export-async/ColumnsSelect.js +69 -0
- package/lib/vtx-export-async/History.js +264 -0
- package/lib/vtx-export-async/index.js +409 -0
- package/lib/vtx-export-async/style/index.js +55 -0
- package/lib/vtx-export-async/util.js +57 -0
- package/lib/vtx-form-layout/Card.js +83 -0
- package/lib/vtx-form-layout/Divider.js +31 -0
- package/lib/vtx-form-layout/FormItem.js +141 -0
- package/lib/vtx-form-layout/Pane.js +50 -0
- package/lib/vtx-form-layout/Row.js +26 -0
- package/lib/vtx-form-layout/context.js +8 -0
- package/lib/vtx-form-layout/index.js +89 -0
- package/lib/vtx-form-layout/style/index.js +267 -0
- package/lib/vtx-icon/index.js +90 -0
- package/lib/vtx-icon/svg/alignRightOutlined.js +34 -0
- package/lib/vtx-icon/svg/columnHeightOutlined.js +31 -0
- package/lib/vtx-icon/svg/downOutlined.js +30 -0
- package/lib/vtx-icon/svg/fullscreen.js +31 -0
- package/lib/vtx-icon/svg/redoOutlined.js +34 -0
- package/lib/vtx-icon/svg/rightOutlined.js +30 -0
- package/lib/vtx-icon/svg/settingOutlined.js +34 -0
- package/lib/vtx-image/Image.js +264 -0
- package/lib/vtx-image/Preview.js +146 -0
- package/lib/vtx-image/PreviewGroup.js +91 -0
- package/lib/vtx-image/index.js +31 -0
- package/lib/vtx-image/style/index.js +97 -0
- package/lib/vtx-import/index.js +424 -0
- package/lib/vtx-import/result.js +88 -0
- package/lib/vtx-import/style/index.js +25 -0
- package/lib/vtx-import2/CheckResult.js +50 -0
- package/lib/vtx-import2/Content.js +112 -0
- package/lib/vtx-import2/DownloadSvg.js +47 -0
- package/lib/vtx-import2/ImportResult.js +62 -0
- package/lib/vtx-import2/UploadSvg.js +47 -0
- package/lib/vtx-import2/index.js +458 -0
- package/lib/vtx-import2/style/index.js +105 -0
- package/lib/vtx-input/TextArea/index.js +70 -0
- package/lib/vtx-input/TextArea/style.js +36 -0
- package/lib/vtx-input/index.js +100 -0
- package/lib/vtx-input/style/index.js +30 -0
- package/lib/vtx-input/useLength.js +27 -0
- package/lib/vtx-modal/Title.js +42 -0
- package/lib/vtx-modal/index.js +249 -0
- package/lib/vtx-modal/style/index.js +115 -0
- package/lib/vtx-page-layout/Basic.js +36 -0
- package/lib/vtx-page-layout/Content.js +50 -0
- package/lib/vtx-page-layout/Pane.js +47 -0
- package/lib/vtx-page-layout/TabLayout.js +70 -0
- package/lib/vtx-page-layout/TableLayout.js +172 -0
- package/lib/vtx-page-layout/TableWrap.js +43 -0
- package/lib/vtx-page-layout/TreeLayout.js +84 -0
- package/lib/vtx-page-layout/container.js +74 -0
- package/lib/vtx-page-layout/index.js +32 -0
- package/lib/vtx-page-layout/style/index.js +136 -0
- package/lib/vtx-provider/index.js +351 -0
- package/lib/vtx-provider/intl.js +145 -0
- package/lib/vtx-provider/locale/ar_EG.js +77 -0
- package/lib/vtx-provider/locale/ca_ES.js +77 -0
- package/lib/vtx-provider/locale/cs_CZ.js +80 -0
- package/lib/vtx-provider/locale/de_DE.js +77 -0
- package/lib/vtx-provider/locale/en_GB.js +79 -0
- package/lib/vtx-provider/locale/en_US.js +187 -0
- package/lib/vtx-provider/locale/es_ES.js +77 -0
- package/lib/vtx-provider/locale/fa_IR.js +77 -0
- package/lib/vtx-provider/locale/fr_FR.js +77 -0
- package/lib/vtx-provider/locale/he_IL.js +80 -0
- package/lib/vtx-provider/locale/hr_HR.js +77 -0
- package/lib/vtx-provider/locale/id_ID.js +77 -0
- package/lib/vtx-provider/locale/it_IT.js +77 -0
- package/lib/vtx-provider/locale/ja_JP.js +77 -0
- package/lib/vtx-provider/locale/ko_KR.js +77 -0
- package/lib/vtx-provider/locale/mn_MN.js +77 -0
- package/lib/vtx-provider/locale/ms_MY.js +77 -0
- package/lib/vtx-provider/locale/nl_NL.js +80 -0
- package/lib/vtx-provider/locale/pl_PL.js +77 -0
- package/lib/vtx-provider/locale/pt_BR.js +77 -0
- package/lib/vtx-provider/locale/ro_RO.js +80 -0
- package/lib/vtx-provider/locale/ru_RU.js +77 -0
- package/lib/vtx-provider/locale/sk_SK.js +80 -0
- package/lib/vtx-provider/locale/sr_RS.js +77 -0
- package/lib/vtx-provider/locale/sv_SE.js +80 -0
- package/lib/vtx-provider/locale/th_TH.js +80 -0
- package/lib/vtx-provider/locale/tr_TR.js +77 -0
- package/lib/vtx-provider/locale/uk_UA.js +80 -0
- package/lib/vtx-provider/locale/uz_UZ.js +77 -0
- package/lib/vtx-provider/locale/vi_VN.js +77 -0
- package/lib/vtx-provider/locale/zh_CN.js +189 -0
- package/lib/vtx-provider/locale/zh_HK.js +89 -0
- package/lib/vtx-provider/locale/zh_TW.js +80 -0
- package/lib/vtx-provider/typing/layoutToken.js +66 -0
- package/lib/vtx-provider/useStyle/index.js +112 -0
- package/lib/vtx-provider/utils/merge.js +33 -0
- package/lib/vtx-rps-frame/index.js +173 -0
- package/lib/vtx-rps-frame/style/index.js +32 -0
- package/lib/vtx-scrollable-row/index.js +193 -0
- package/lib/vtx-scrollable-row/style/index.js +114 -0
- package/lib/vtx-search/index.js +355 -0
- package/lib/vtx-search/style/index.js +101 -0
- package/lib/vtx-select/index.js +259 -0
- package/lib/vtx-select/style/index.js +81 -0
- package/lib/vtx-signature/index.js +127 -0
- package/lib/vtx-signature/style/index.js +53 -0
- package/lib/vtx-split-pane/Resizer.js +52 -0
- package/lib/vtx-split-pane/SplitPane.js +68 -0
- package/lib/vtx-split-pane/index.js +15 -0
- package/lib/vtx-split-pane/style/index.js +139 -0
- package/lib/vtx-statistics-column/Back.js +36 -0
- package/lib/vtx-statistics-column/Item.js +62 -0
- package/lib/vtx-statistics-column/Total.js +62 -0
- package/lib/vtx-statistics-column/context.js +8 -0
- package/lib/vtx-statistics-column/index.js +63 -0
- package/lib/vtx-statistics-column/style/index.js +78 -0
- package/lib/vtx-time-picker/index.js +45 -0
- package/lib/vtx-time-picker/style/index.js +1 -0
- package/lib/vtx-tree/index.js +348 -0
- package/lib/vtx-tree/style/index.js +56 -0
- package/lib/vtx-tree/utils.js +80 -0
- package/lib/vtx-tree-select/index.js +296 -0
- package/lib/vtx-tree-select/style/index.js +78 -0
- package/lib/vtx-upload/FilePreview.js +116 -0
- package/lib/vtx-upload/index.js +474 -0
- package/lib/vtx-upload/style/index.js +89 -0
- package/lib/vtx-wang-editor/index.js +251 -0
- package/lib/vtx-wang-editor/style/index.js +39 -0
- package/lib/vtx-wang-editor/style/index.less +12 -0
- package/lib/vtx-wang-editor/wangEditorUtil.js +236 -0
- package/package.json +1 -2
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
2
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
3
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
4
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
|
+
/* eslint-disable no-restricted-syntax */
|
|
6
|
+
/* eslint-disable no-continue */
|
|
7
|
+
/* eslint-disable no-unused-vars */
|
|
8
|
+
/* eslint-disable no-self-compare */
|
|
9
|
+
/* eslint-disable eqeqeq */
|
|
10
|
+
/* eslint-disable no-plusplus */
|
|
11
|
+
// do not edit .js files directly - edit src/index.jst
|
|
12
|
+
|
|
13
|
+
export function isDeepEqualReact(a, b, ignoreKeys) {
|
|
14
|
+
if (a === b) return true;
|
|
15
|
+
if (a && b && _typeof(a) === 'object' && _typeof(b) === 'object') {
|
|
16
|
+
if (a.constructor !== b.constructor) return false;
|
|
17
|
+
var length, i, keys;
|
|
18
|
+
if (Array.isArray(a)) {
|
|
19
|
+
length = a.length;
|
|
20
|
+
if (length != b.length) return false;
|
|
21
|
+
for (i = length; i-- !== 0;) if (!isDeepEqualReact(a[i], b[i], ignoreKeys)) return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
if (a instanceof Map && b instanceof Map) {
|
|
25
|
+
if (a.size !== b.size) return false;
|
|
26
|
+
var _iterator = _createForOfIteratorHelper(a.entries()),
|
|
27
|
+
_step;
|
|
28
|
+
try {
|
|
29
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
30
|
+
i = _step.value;
|
|
31
|
+
if (!b.has(i[0])) return false;
|
|
32
|
+
}
|
|
33
|
+
} catch (err) {
|
|
34
|
+
_iterator.e(err);
|
|
35
|
+
} finally {
|
|
36
|
+
_iterator.f();
|
|
37
|
+
}
|
|
38
|
+
var _iterator2 = _createForOfIteratorHelper(a.entries()),
|
|
39
|
+
_step2;
|
|
40
|
+
try {
|
|
41
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
42
|
+
i = _step2.value;
|
|
43
|
+
if (!isDeepEqualReact(i[1], b.get(i[0]), ignoreKeys)) return false;
|
|
44
|
+
}
|
|
45
|
+
} catch (err) {
|
|
46
|
+
_iterator2.e(err);
|
|
47
|
+
} finally {
|
|
48
|
+
_iterator2.f();
|
|
49
|
+
}
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
if (a instanceof Set && b instanceof Set) {
|
|
53
|
+
if (a.size !== b.size) return false;
|
|
54
|
+
var _iterator3 = _createForOfIteratorHelper(a.entries()),
|
|
55
|
+
_step3;
|
|
56
|
+
try {
|
|
57
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
58
|
+
i = _step3.value;
|
|
59
|
+
if (!b.has(i[0])) return false;
|
|
60
|
+
}
|
|
61
|
+
} catch (err) {
|
|
62
|
+
_iterator3.e(err);
|
|
63
|
+
} finally {
|
|
64
|
+
_iterator3.f();
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
69
|
+
length = a.length;
|
|
70
|
+
if (length != b.length) return false;
|
|
71
|
+
for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false;
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
75
|
+
if (a.valueOf !== Object.prototype.valueOf && a.valueOf) return a.valueOf() === b.valueOf();
|
|
76
|
+
if (a.toString !== Object.prototype.toString && a.toString) return a.toString() === b.toString();
|
|
77
|
+
keys = Object.keys(a);
|
|
78
|
+
length = keys.length;
|
|
79
|
+
if (length !== Object.keys(b).length) return false;
|
|
80
|
+
for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
81
|
+
for (i = length; i-- !== 0;) {
|
|
82
|
+
var key = keys[i];
|
|
83
|
+
if (ignoreKeys && ignoreKeys.includes(key)) continue;
|
|
84
|
+
if (key === '_owner' && a.$$typeof) {
|
|
85
|
+
// React-specific: avoid traversing React elements' _owner.
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
if (!isDeepEqualReact(a[key], b[key], ignoreKeys)) return false;
|
|
89
|
+
}
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// true if both NaN, false otherwise
|
|
94
|
+
return a !== a && b !== b;
|
|
95
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var isDropdownValueType = function isDropdownValueType(valueType) {
|
|
2
|
+
var isDropdown = false;
|
|
3
|
+
if (typeof valueType === 'string' && valueType.startsWith('date') && !valueType.endsWith('Range') || valueType === 'select' || valueType === 'time') {
|
|
4
|
+
isDropdown = true;
|
|
5
|
+
}
|
|
6
|
+
return isDropdown;
|
|
7
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 判断是不是一个 url
|
|
3
|
+
* @param {string|undefined} path
|
|
4
|
+
* @returns boolean
|
|
5
|
+
*/
|
|
6
|
+
export var isUrl = function isUrl(path) {
|
|
7
|
+
if (!path) return false;
|
|
8
|
+
if (!path.startsWith('http')) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
try {
|
|
12
|
+
var url = new URL(path);
|
|
13
|
+
return !!url;
|
|
14
|
+
} catch (error) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
7
|
+
/* eslint-disable prefer-rest-params */
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 用于合并 n 个对象
|
|
11
|
+
* @param {any[]} ...rest
|
|
12
|
+
* @returns T
|
|
13
|
+
*/
|
|
14
|
+
var merge = function merge() {
|
|
15
|
+
var obj = {};
|
|
16
|
+
for (var _len = arguments.length, rest = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17
|
+
rest[_key] = arguments[_key];
|
|
18
|
+
}
|
|
19
|
+
var il = rest.length;
|
|
20
|
+
var key;
|
|
21
|
+
var i = 0;
|
|
22
|
+
for (; i < il; i += 1) {
|
|
23
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
24
|
+
for (key in rest[i]) {
|
|
25
|
+
if (rest[i].hasOwnProperty(key)) {
|
|
26
|
+
if (_typeof(obj[key]) === 'object' && _typeof(rest[i][key]) === 'object' && obj[key] !== undefined && obj[key] !== null && !Array.isArray(obj[key]) && !Array.isArray(rest[i][key])) {
|
|
27
|
+
obj[key] = _objectSpread(_objectSpread({}, obj[key]), rest[i][key]);
|
|
28
|
+
} else {
|
|
29
|
+
obj[key] = rest[i][key];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return obj;
|
|
35
|
+
};
|
|
36
|
+
export { merge };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* eslint-disable prefer-const */
|
|
2
|
+
|
|
3
|
+
var index = 0;
|
|
4
|
+
var genNanoid = function genNanoid() {
|
|
5
|
+
var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 21;
|
|
6
|
+
if (typeof window === 'undefined') return (index += 1).toFixed(0);
|
|
7
|
+
if (!window.crypto) return (index += 1).toFixed(0);
|
|
8
|
+
var e = '',
|
|
9
|
+
r = crypto.getRandomValues(new Uint8Array(t));
|
|
10
|
+
// eslint-disable-next-line no-param-reassign
|
|
11
|
+
for (; t--;) {
|
|
12
|
+
var n = 63 & r[t];
|
|
13
|
+
e += n < 36 ? n.toString(36) : n < 62 ? (n - 26).toString(36).toUpperCase() : n < 63 ? '_' : '-';
|
|
14
|
+
}
|
|
15
|
+
return e;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 生成uuid,如果不支持 randomUUID,就用 genNanoid
|
|
20
|
+
*
|
|
21
|
+
* @returns string
|
|
22
|
+
*/
|
|
23
|
+
export var nanoid = function nanoid() {
|
|
24
|
+
if (typeof window === 'undefined') return genNanoid();
|
|
25
|
+
if (window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == 'function') {
|
|
26
|
+
return crypto.randomUUID();
|
|
27
|
+
}
|
|
28
|
+
return genNanoid();
|
|
29
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export var omitUndefined = function omitUndefined(obj) {
|
|
2
|
+
var newObj = {};
|
|
3
|
+
Object.keys(obj || {}).forEach(function (key) {
|
|
4
|
+
if (obj[key] !== undefined) {
|
|
5
|
+
newObj[key] = obj[key];
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
if (Object.keys(newObj).length < 1) {
|
|
9
|
+
return undefined;
|
|
10
|
+
}
|
|
11
|
+
return newObj;
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export var omitUndefinedAndEmptyArr = function omitUndefinedAndEmptyArr(obj) {
|
|
2
|
+
var newObj = {};
|
|
3
|
+
Object.keys(obj || {}).forEach(function (key) {
|
|
4
|
+
var _obj$key;
|
|
5
|
+
if (Array.isArray(obj[key]) && ((_obj$key = obj[key]) === null || _obj$key === void 0 ? void 0 : _obj$key.length) === 0) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
if (obj[key] === undefined) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
newObj[key] = obj[key];
|
|
12
|
+
});
|
|
13
|
+
return newObj;
|
|
14
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import customParseFormat from 'dayjs/plugin/customParseFormat';
|
|
3
|
+
import { isNil } from "../isNil";
|
|
4
|
+
dayjs.extend(customParseFormat);
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 一个比较hack的moment判断工具
|
|
8
|
+
* @param value
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
var isMoment = function isMoment(value) {
|
|
12
|
+
return !!(value !== null && value !== void 0 && value._isAMomentObject);
|
|
13
|
+
};
|
|
14
|
+
export var parseValueToDay = function parseValueToDay(value, formatter) {
|
|
15
|
+
if (isNil(value) || dayjs.isDayjs(value) || isMoment(value)) {
|
|
16
|
+
if (isMoment(value)) {
|
|
17
|
+
return dayjs(value);
|
|
18
|
+
}
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
if (Array.isArray(value)) {
|
|
22
|
+
return value.map(function (v) {
|
|
23
|
+
return parseValueToDay(v, formatter);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
if (typeof value === 'number') return dayjs(value);
|
|
27
|
+
return dayjs(value, formatter);
|
|
28
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var antdFormItemPropsList = [
|
|
2
|
+
// https://ant.design/components/form-cn/#Form.Item
|
|
3
|
+
'colon', 'dependencies', 'extra', 'getValueFromEvent', 'getValueProps', 'hasFeedback', 'help', 'htmlFor', 'initialValue', 'noStyle', 'label', 'labelAlign', 'labelCol', 'name', 'preserve', 'normalize', 'required', 'rules', 'shouldUpdate', 'trigger', 'validateFirst', 'validateStatus', 'validateTrigger', 'valuePropName', 'wrapperCol', 'hidden', 'validateDebounce',
|
|
4
|
+
// 我自定义的
|
|
5
|
+
'addonBefore', 'addonAfter', 'addonWarpStyle'];
|
|
6
|
+
export function pickProFormItemProps() {
|
|
7
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
8
|
+
var attrs = {};
|
|
9
|
+
antdFormItemPropsList.forEach(function (key) {
|
|
10
|
+
if (props[key] !== undefined) {
|
|
11
|
+
attrs[key] = props[key];
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
return attrs;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var proFieldProps = "valueType request plain formItemRender render text formItemProps valueEnum";
|
|
2
|
+
var proFormProps = "fieldProps isDefaultDom groupProps contentRender submitterProps submitter";
|
|
3
|
+
export function pickProProps(props) {
|
|
4
|
+
var customValueType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
5
|
+
var propList = "".concat(proFieldProps, " ").concat(proFormProps).split(/[\s\n]+/);
|
|
6
|
+
var attrs = {};
|
|
7
|
+
Object.keys(props || {}).forEach(function (key) {
|
|
8
|
+
//如果是自定义的 valueType,则不需要过滤掉,全部传给使用者
|
|
9
|
+
if (propList.includes(key) && !customValueType) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
attrs[key] = props[key];
|
|
13
|
+
});
|
|
14
|
+
return attrs;
|
|
15
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
import { Badge, Space } from 'antd';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 获取类型的 type
|
|
7
|
+
*
|
|
8
|
+
* @param obj
|
|
9
|
+
*/
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
function getType(obj) {
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
var type = Object.prototype.toString.call(obj).match(/^\[object (.*)\]$/)[1].toLowerCase();
|
|
14
|
+
if (type === 'string' && _typeof(obj) === 'object') return 'object'; // Let "new String('')" return 'object'
|
|
15
|
+
if (obj === null) return 'null'; // PhantomJS has type "DOMWindow" for null
|
|
16
|
+
if (obj === undefined) return 'undefined'; // PhantomJS has type "DOMWindow" for undefined
|
|
17
|
+
return type;
|
|
18
|
+
}
|
|
19
|
+
export var ProFieldBadgeColor = function ProFieldBadgeColor(_ref) {
|
|
20
|
+
var color = _ref.color,
|
|
21
|
+
children = _ref.children;
|
|
22
|
+
return /*#__PURE__*/_jsx(Badge, {
|
|
23
|
+
color: color,
|
|
24
|
+
text: children
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
export var objectToMap = function objectToMap(value) {
|
|
28
|
+
if (getType(value) === 'map') {
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
31
|
+
return new Map(Object.entries(value || {}));
|
|
32
|
+
};
|
|
33
|
+
var TableStatus = {
|
|
34
|
+
Success: function Success(_ref2) {
|
|
35
|
+
var children = _ref2.children;
|
|
36
|
+
return /*#__PURE__*/_jsx(Badge, {
|
|
37
|
+
status: "success",
|
|
38
|
+
text: children
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
Error: function Error(_ref3) {
|
|
42
|
+
var children = _ref3.children;
|
|
43
|
+
return /*#__PURE__*/_jsx(Badge, {
|
|
44
|
+
status: "error",
|
|
45
|
+
text: children
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
Default: function Default(_ref4) {
|
|
49
|
+
var children = _ref4.children;
|
|
50
|
+
return /*#__PURE__*/_jsx(Badge, {
|
|
51
|
+
status: "default",
|
|
52
|
+
text: children
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
Processing: function Processing(_ref5) {
|
|
56
|
+
var children = _ref5.children;
|
|
57
|
+
return /*#__PURE__*/_jsx(Badge, {
|
|
58
|
+
status: "processing",
|
|
59
|
+
text: children
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
Warning: function Warning(_ref6) {
|
|
63
|
+
var children = _ref6.children;
|
|
64
|
+
return /*#__PURE__*/_jsx(Badge, {
|
|
65
|
+
status: "warning",
|
|
66
|
+
text: children
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
success: function success(_ref7) {
|
|
70
|
+
var children = _ref7.children;
|
|
71
|
+
return /*#__PURE__*/_jsx(Badge, {
|
|
72
|
+
status: "success",
|
|
73
|
+
text: children
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
error: function error(_ref8) {
|
|
77
|
+
var children = _ref8.children;
|
|
78
|
+
return /*#__PURE__*/_jsx(Badge, {
|
|
79
|
+
status: "error",
|
|
80
|
+
text: children
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
default: function _default(_ref9) {
|
|
84
|
+
var children = _ref9.children;
|
|
85
|
+
return /*#__PURE__*/_jsx(Badge, {
|
|
86
|
+
status: "default",
|
|
87
|
+
text: children
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
processing: function processing(_ref10) {
|
|
91
|
+
var children = _ref10.children;
|
|
92
|
+
return /*#__PURE__*/_jsx(Badge, {
|
|
93
|
+
status: "processing",
|
|
94
|
+
text: children
|
|
95
|
+
});
|
|
96
|
+
},
|
|
97
|
+
warning: function warning(_ref11) {
|
|
98
|
+
var children = _ref11.children;
|
|
99
|
+
return /*#__PURE__*/_jsx(Badge, {
|
|
100
|
+
status: "warning",
|
|
101
|
+
text: children
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* 转化 text 和 valueEnum 通过 type 来添加 Status
|
|
108
|
+
*
|
|
109
|
+
* @param text
|
|
110
|
+
* @param valueEnum
|
|
111
|
+
* @param pure 纯净模式,不增加 status
|
|
112
|
+
*/
|
|
113
|
+
export var proFieldParsingText = function proFieldParsingText(text, valueEnumParams, key) {
|
|
114
|
+
if (Array.isArray(text)) {
|
|
115
|
+
return /*#__PURE__*/_jsx(Space, {
|
|
116
|
+
split: ",",
|
|
117
|
+
size: 2,
|
|
118
|
+
wrap: true,
|
|
119
|
+
children: text.map(function (value, index) {
|
|
120
|
+
return (
|
|
121
|
+
// @ts-ignore
|
|
122
|
+
proFieldParsingText(value, valueEnumParams, index)
|
|
123
|
+
);
|
|
124
|
+
})
|
|
125
|
+
}, key);
|
|
126
|
+
}
|
|
127
|
+
var valueEnum = objectToMap(valueEnumParams);
|
|
128
|
+
if (!valueEnum.has(text) && !valueEnum.has("".concat(text))) {
|
|
129
|
+
// @ts-ignore
|
|
130
|
+
return (text === null || text === void 0 ? void 0 : text.label) || text;
|
|
131
|
+
}
|
|
132
|
+
var domText = valueEnum.get(text) || valueEnum.get("".concat(text));
|
|
133
|
+
if (!domText) {
|
|
134
|
+
// @ts-ignore
|
|
135
|
+
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
136
|
+
children: (text === null || text === void 0 ? void 0 : text.label) || text
|
|
137
|
+
}, key);
|
|
138
|
+
}
|
|
139
|
+
var status = domText.status,
|
|
140
|
+
color = domText.color;
|
|
141
|
+
var Status = TableStatus[status || 'Init'];
|
|
142
|
+
|
|
143
|
+
// 如果类型存在优先使用类型
|
|
144
|
+
if (Status) {
|
|
145
|
+
return /*#__PURE__*/_jsx(Status, {
|
|
146
|
+
children: domText.text
|
|
147
|
+
}, key);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// 如果不存在使用颜色
|
|
151
|
+
if (color) {
|
|
152
|
+
return /*#__PURE__*/_jsx(ProFieldBadgeColor, {
|
|
153
|
+
color: color,
|
|
154
|
+
children: domText.text
|
|
155
|
+
}, key);
|
|
156
|
+
}
|
|
157
|
+
// 什么都没有使用 text
|
|
158
|
+
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
159
|
+
children: domText.text || domText
|
|
160
|
+
}, key);
|
|
161
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** 如果是个方法执行一下它 */
|
|
2
|
+
export function runFunction(valueEnum) {
|
|
3
|
+
if (typeof valueEnum === 'function') {
|
|
4
|
+
for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
5
|
+
rest[_key - 1] = arguments[_key];
|
|
6
|
+
}
|
|
7
|
+
return valueEnum.apply(void 0, rest);
|
|
8
|
+
}
|
|
9
|
+
return valueEnum;
|
|
10
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export function sortByGivenOrder(originalArray, orderArray) {
|
|
2
|
+
// 创建一个映射,记录orderArray中元素的顺序
|
|
3
|
+
var orderMap = new Map();
|
|
4
|
+
orderArray.forEach(function (item, index) {
|
|
5
|
+
orderMap.set(item, index);
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
// 分离需要排序的元素和不需要排序的元素
|
|
9
|
+
var orderedItems = [];
|
|
10
|
+
var remainingItems = [];
|
|
11
|
+
originalArray.forEach(function (item) {
|
|
12
|
+
if (orderMap.has(item)) {
|
|
13
|
+
orderedItems.push(item);
|
|
14
|
+
} else {
|
|
15
|
+
remainingItems.push(item);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// 对需要排序的元素按照指定顺序排序
|
|
20
|
+
orderedItems.sort(function (a, b) {
|
|
21
|
+
return orderMap.get(a) - orderMap.get(b);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// 重新构建数组,保持原有位置结构
|
|
25
|
+
var result = [];
|
|
26
|
+
var orderedIndex = 0;
|
|
27
|
+
originalArray.forEach(function (item) {
|
|
28
|
+
if (orderMap.has(item)) {
|
|
29
|
+
result.push(orderedItems[orderedIndex]);
|
|
30
|
+
orderedIndex++;
|
|
31
|
+
} else {
|
|
32
|
+
result.push(item);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export function sortByKeyArrayExtract(data, keyArray, columnsMap, keyField) {
|
|
2
|
+
var dataMap = new Map(data.map(function (item) {
|
|
3
|
+
return [item[keyField], item];
|
|
4
|
+
}));
|
|
5
|
+
var result = [];
|
|
6
|
+
// 按照 keyArray 顺序提取数据
|
|
7
|
+
keyArray.forEach(function (key) {
|
|
8
|
+
if (dataMap.has(key)) {
|
|
9
|
+
result.push(dataMap.get(key));
|
|
10
|
+
dataMap.delete(key);
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
// 将剩余的数据添加到末尾
|
|
14
|
+
dataMap.forEach(function (item) {
|
|
15
|
+
return result.push(item);
|
|
16
|
+
});
|
|
17
|
+
return result.sort(function (a, b) {
|
|
18
|
+
var _columnsMap$aKey, _columnsMap$bKey;
|
|
19
|
+
var aFixed = a.fixed,
|
|
20
|
+
aIndex = a.index;
|
|
21
|
+
var bFixed = b.fixed,
|
|
22
|
+
bIndex = b.index;
|
|
23
|
+
if (aFixed === 'left' && bFixed !== 'left' || bFixed === 'right' && aFixed !== 'right') {
|
|
24
|
+
return -2;
|
|
25
|
+
}
|
|
26
|
+
if (bFixed === 'left' && aFixed !== 'left' || aFixed === 'right' && bFixed !== 'right') {
|
|
27
|
+
return 2;
|
|
28
|
+
}
|
|
29
|
+
// 如果没有index,在 dataIndex 或者 key 不存在的时候他会报错
|
|
30
|
+
var aKey = a.key || "".concat(aIndex);
|
|
31
|
+
var bKey = b.key || "".concat(bIndex);
|
|
32
|
+
if ((_columnsMap$aKey = columnsMap[aKey]) !== null && _columnsMap$aKey !== void 0 && _columnsMap$aKey.order || (_columnsMap$bKey = columnsMap[bKey]) !== null && _columnsMap$bKey !== void 0 && _columnsMap$bKey.order) {
|
|
33
|
+
var _columnsMap$aKey2, _columnsMap$bKey2;
|
|
34
|
+
return (((_columnsMap$aKey2 = columnsMap[aKey]) === null || _columnsMap$aKey2 === void 0 ? void 0 : _columnsMap$aKey2.order) || 0) - (((_columnsMap$bKey2 = columnsMap[bKey]) === null || _columnsMap$bKey2 === void 0 ? void 0 : _columnsMap$bKey2.order) || 0);
|
|
35
|
+
}
|
|
36
|
+
return (a.index || 0) - (b.index || 0);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { configure } from 'safe-stable-stringify';
|
|
2
|
+
var stringify = configure({
|
|
3
|
+
bigint: true,
|
|
4
|
+
circularValue: 'Magic circle!',
|
|
5
|
+
deterministic: false,
|
|
6
|
+
maximumDepth: 4
|
|
7
|
+
// maximumBreadth: 4,
|
|
8
|
+
});
|
|
9
|
+
export { configure, stringify };
|
|
10
|
+
export default stringify;
|