@vtx/components 4.0.0-beta.5 → 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,337 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isPlainObj = isPlainObj;
|
|
7
|
+
exports.transformKeySubmitValue = void 0;
|
|
8
|
+
var _util = require("@rc-component/util");
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _isNil = require("../isNil");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
13
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
15
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
16
|
+
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; } } }; }
|
|
17
|
+
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); }
|
|
18
|
+
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; }
|
|
19
|
+
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); }
|
|
20
|
+
/**
|
|
21
|
+
* 判断一个值是否为普通对象(可以被遍历的对象)
|
|
22
|
+
* 暂时还不支持 Set 和 Map 结构
|
|
23
|
+
*
|
|
24
|
+
* @param itemValue - 要检查的值
|
|
25
|
+
* @returns 如果是普通对象返回 true,否则返回 false
|
|
26
|
+
*/
|
|
27
|
+
function isPlainObj(itemValue) {
|
|
28
|
+
// 如果不是对象类型,直接返回 false
|
|
29
|
+
if (_typeof(itemValue) !== 'object') {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Null 也要处理,不然 omit 空值会失效
|
|
34
|
+
if (itemValue === null) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// 排除各种特殊对象类型
|
|
39
|
+
if ( /*#__PURE__*/_react.default.isValidElement(itemValue)) return false;
|
|
40
|
+
if (itemValue.constructor === RegExp) return false;
|
|
41
|
+
if (itemValue instanceof Map) return false;
|
|
42
|
+
if (itemValue instanceof Set) return false;
|
|
43
|
+
if (itemValue instanceof HTMLElement) return false;
|
|
44
|
+
if (itemValue instanceof Blob) return false;
|
|
45
|
+
if (itemValue instanceof File) return false;
|
|
46
|
+
if (Array.isArray(itemValue)) return false;
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 将点号路径字符串转换为路径数组
|
|
52
|
+
* 例如: 'users.0.name' => ['users', 0, 'name']
|
|
53
|
+
*
|
|
54
|
+
* @param dotPath - 点号分隔的路径字符串
|
|
55
|
+
* @returns 路径数组,数字会被转换为数字类型
|
|
56
|
+
*/
|
|
57
|
+
function parseDotPath(dotPath) {
|
|
58
|
+
return dotPath.split('.').map(function (segment) {
|
|
59
|
+
// 如果是纯数字,转换为数字类型用于数组索引
|
|
60
|
+
return /^\d+$/.test(segment) ? parseInt(segment, 10) : segment;
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* 过滤掉空值的转换配置
|
|
66
|
+
*
|
|
67
|
+
* @param dataFormatMapRaw - 原始转换配置
|
|
68
|
+
* @returns 过滤后的转换配置
|
|
69
|
+
*/
|
|
70
|
+
function filterNilTransforms(dataFormatMapRaw) {
|
|
71
|
+
var filtered = {};
|
|
72
|
+
for (var key in dataFormatMapRaw) {
|
|
73
|
+
var value = dataFormatMapRaw[key];
|
|
74
|
+
if (!(0, _isNil.isNil)(value)) {
|
|
75
|
+
filtered[key] = value;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return filtered;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* 将转换配置分为点号路径格式和传统嵌套对象格式
|
|
83
|
+
*
|
|
84
|
+
* @param dataFormatMapRaw - 原始转换配置
|
|
85
|
+
* @returns 包含两种格式转换配置的对象
|
|
86
|
+
*/
|
|
87
|
+
function separateTransformFormats(dataFormatMapRaw) {
|
|
88
|
+
var dotPathTransforms = {};
|
|
89
|
+
var objectTransforms = {};
|
|
90
|
+
for (var key in dataFormatMapRaw) {
|
|
91
|
+
var value = dataFormatMapRaw[key];
|
|
92
|
+
if ((0, _isNil.isNil)(value)) continue;
|
|
93
|
+
if (key.includes('.')) {
|
|
94
|
+
dotPathTransforms[key] = value;
|
|
95
|
+
} else {
|
|
96
|
+
objectTransforms[key] = value;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
dotPathTransforms: dotPathTransforms,
|
|
101
|
+
objectTransforms: objectTransforms
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 处理点号路径格式的转换
|
|
107
|
+
* 例如: 'users.0.name' => 转换 users[0].name 的值
|
|
108
|
+
*
|
|
109
|
+
* @param result - 要转换的数据对象
|
|
110
|
+
* @param dotPathTransforms - 点号路径转换配置
|
|
111
|
+
*/
|
|
112
|
+
function processDotPathTransforms(result, dotPathTransforms) {
|
|
113
|
+
for (var dotPath in dotPathTransforms) {
|
|
114
|
+
var transform = dotPathTransforms[dotPath];
|
|
115
|
+
if (typeof transform !== 'function') continue;
|
|
116
|
+
|
|
117
|
+
// 将点号路径转换为数组路径
|
|
118
|
+
var pathArray = parseDotPath(dotPath);
|
|
119
|
+
|
|
120
|
+
// 获取要转换的值
|
|
121
|
+
var currentValue = (0, _util.get)(result, pathArray);
|
|
122
|
+
if (currentValue === undefined) continue;
|
|
123
|
+
|
|
124
|
+
// 执行转换
|
|
125
|
+
var transformed = transform(currentValue, pathArray.map(String), result);
|
|
126
|
+
if (_typeof(transformed) === 'object' && transformed !== null && !Array.isArray(transformed)) {
|
|
127
|
+
// 如果返回对象,删除原键并将对象的键值对合并到父级
|
|
128
|
+
var parentPath = pathArray.slice(0, -1);
|
|
129
|
+
var parentObj = parentPath.length > 0 ? (0, _util.get)(result, parentPath) : result;
|
|
130
|
+
if (parentObj && _typeof(parentObj) === 'object') {
|
|
131
|
+
var keyToDelete = pathArray[pathArray.length - 1];
|
|
132
|
+
delete parentObj[keyToDelete];
|
|
133
|
+
Object.assign(parentObj, transformed);
|
|
134
|
+
}
|
|
135
|
+
} else {
|
|
136
|
+
// 如果返回原始值,直接替换
|
|
137
|
+
// 手动设置嵌套路径的值,确保数组索引正确处理
|
|
138
|
+
var current = result;
|
|
139
|
+
for (var i = 0; i < pathArray.length - 1; i++) {
|
|
140
|
+
var key = pathArray[i];
|
|
141
|
+
if (current[key] === undefined) {
|
|
142
|
+
// 如果下一个键是数字,创建数组,否则创建对象
|
|
143
|
+
var nextKey = pathArray[i + 1];
|
|
144
|
+
current[key] = typeof nextKey === 'number' ? [] : {};
|
|
145
|
+
}
|
|
146
|
+
current = current[key];
|
|
147
|
+
}
|
|
148
|
+
current[pathArray[pathArray.length - 1]] = transformed;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* 在嵌套转换配置中查找转换函数
|
|
155
|
+
*
|
|
156
|
+
* @param currentTransforms - 当前转换配置
|
|
157
|
+
* @param parentsKey - 父级路径
|
|
158
|
+
* @param entityKey - 当前实体键
|
|
159
|
+
* @returns 找到的转换函数或 undefined
|
|
160
|
+
*/
|
|
161
|
+
function findNestedTransformFunction(currentTransforms, parentsKey, entityKey) {
|
|
162
|
+
var nestedTransforms = currentTransforms;
|
|
163
|
+
var _iterator = _createForOfIteratorHelper(parentsKey),
|
|
164
|
+
_step;
|
|
165
|
+
try {
|
|
166
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
167
|
+
var parentKey = _step.value;
|
|
168
|
+
var parentKeyStr = String(parentKey);
|
|
169
|
+
if (nestedTransforms && _typeof(nestedTransforms[parentKeyStr]) === 'object') {
|
|
170
|
+
nestedTransforms = nestedTransforms[parentKeyStr];
|
|
171
|
+
} else {
|
|
172
|
+
nestedTransforms = null;
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
} catch (err) {
|
|
177
|
+
_iterator.e(err);
|
|
178
|
+
} finally {
|
|
179
|
+
_iterator.f();
|
|
180
|
+
}
|
|
181
|
+
if (nestedTransforms && typeof nestedTransforms[entityKey] === 'function') {
|
|
182
|
+
return nestedTransforms[entityKey];
|
|
183
|
+
}
|
|
184
|
+
return undefined;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* 检查路径是否包含数组索引
|
|
189
|
+
*
|
|
190
|
+
* @param parentsKey - 父级路径数组
|
|
191
|
+
* @returns 如果包含数组索引返回 true
|
|
192
|
+
*/
|
|
193
|
+
function isInArrayPath(parentsKey) {
|
|
194
|
+
return parentsKey.some(function (key) {
|
|
195
|
+
return !isNaN(Number(key));
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* 递归处理嵌套对象转换(传统格式)
|
|
201
|
+
*
|
|
202
|
+
* @param tempValues - 要处理的值
|
|
203
|
+
* @param parentsKey - 父级路径
|
|
204
|
+
* @param currentTransforms - 当前转换配置
|
|
205
|
+
* @param rootMergeObjects - 存储需要在根级别合并的对象
|
|
206
|
+
* @returns 处理后的结果
|
|
207
|
+
*/
|
|
208
|
+
function processNestedObjectTransforms(tempValues, parentsKey, currentTransforms, rootMergeObjects) {
|
|
209
|
+
var isArrayValues = Array.isArray(tempValues);
|
|
210
|
+
var tempResult = isArrayValues ? [] : {};
|
|
211
|
+
if (tempValues == null || tempValues === undefined) {
|
|
212
|
+
return tempResult;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// 确定要处理的键
|
|
216
|
+
var keysToProcess = isArrayValues ? tempValues.map(function (_, index) {
|
|
217
|
+
return index.toString();
|
|
218
|
+
}) : Object.keys(tempValues);
|
|
219
|
+
var _iterator2 = _createForOfIteratorHelper(keysToProcess),
|
|
220
|
+
_step2;
|
|
221
|
+
try {
|
|
222
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
223
|
+
var entityKey = _step2.value;
|
|
224
|
+
var key = parentsKey ? [].concat(_toConsumableArray(parentsKey), [entityKey]) : [entityKey];
|
|
225
|
+
var itemValue = tempValues[entityKey];
|
|
226
|
+
|
|
227
|
+
// 查找转换函数
|
|
228
|
+
var transformFunction = currentTransforms[entityKey];
|
|
229
|
+
|
|
230
|
+
// 如果没找到并且是嵌套路径,尝试在嵌套对象中查找
|
|
231
|
+
if (!transformFunction && parentsKey) {
|
|
232
|
+
transformFunction = findNestedTransformFunction(currentTransforms, parentsKey, entityKey);
|
|
233
|
+
}
|
|
234
|
+
if (transformFunction && typeof transformFunction === 'function') {
|
|
235
|
+
// 执行转换
|
|
236
|
+
var transformed = transformFunction(itemValue, entityKey, tempValues);
|
|
237
|
+
if (_typeof(transformed) === 'object' && transformed !== null && !Array.isArray(transformed)) {
|
|
238
|
+
// 检查当前项是否在数组中
|
|
239
|
+
var isInArray = parentsKey ? isInArrayPath(parentsKey) : false;
|
|
240
|
+
if (isInArray) {
|
|
241
|
+
// 如果是数组元素内的转换,直接合并到当前结果
|
|
242
|
+
Object.assign(tempResult, transformed);
|
|
243
|
+
} else {
|
|
244
|
+
// 如果不是数组元素,将其存储到 rootMergeObjects 以便在根级别合并
|
|
245
|
+
rootMergeObjects.push(transformed);
|
|
246
|
+
}
|
|
247
|
+
} else {
|
|
248
|
+
// 如果返回原始值,用新键替换
|
|
249
|
+
tempResult[entityKey] = transformed;
|
|
250
|
+
}
|
|
251
|
+
} else if (isPlainObj(itemValue) && !(0, _isNil.isNil)(itemValue)) {
|
|
252
|
+
// 递归处理嵌套对象(但跳过 null 值)
|
|
253
|
+
var nestedTransforms = currentTransforms[entityKey];
|
|
254
|
+
if (nestedTransforms && _typeof(nestedTransforms) === 'object') {
|
|
255
|
+
// 如果当前键有嵌套转换配置,传递嵌套配置
|
|
256
|
+
var nested = processNestedObjectTransforms(itemValue, key, nestedTransforms, rootMergeObjects);
|
|
257
|
+
// 检查是否有任何子属性被转换为对象(会被添加到 rootMergeObjects)
|
|
258
|
+
// 如果 nested 为空或只包含被转换的属性,我们不保留这个对象
|
|
259
|
+
var hasRemainingContent = Object.keys(nested).length > 0;
|
|
260
|
+
if (hasRemainingContent) {
|
|
261
|
+
tempResult[entityKey] = nested;
|
|
262
|
+
}
|
|
263
|
+
} else {
|
|
264
|
+
// 否则继续使用当前转换配置递归
|
|
265
|
+
var _nested = processNestedObjectTransforms(itemValue, key, currentTransforms, rootMergeObjects);
|
|
266
|
+
tempResult[entityKey] = _nested;
|
|
267
|
+
}
|
|
268
|
+
} else if (!(0, _isNil.isNil)(itemValue)) {
|
|
269
|
+
// 保留非 null/undefined 原始值
|
|
270
|
+
tempResult[entityKey] = itemValue;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
} catch (err) {
|
|
274
|
+
_iterator2.e(err);
|
|
275
|
+
} finally {
|
|
276
|
+
_iterator2.f();
|
|
277
|
+
}
|
|
278
|
+
return tempResult;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* 转换提交值中的键名
|
|
283
|
+
* 支持两种格式的转换配置:
|
|
284
|
+
* 1. 点号路径格式:'users.0.name' => 转换嵌套路径的值
|
|
285
|
+
* 2. 传统嵌套对象格式:{ users: { 0: { name: transformFn } } }
|
|
286
|
+
*
|
|
287
|
+
* @param values - 要转换的值对象
|
|
288
|
+
* @param dataFormatMapRaw - 转换配置映射
|
|
289
|
+
* @returns 转换后的值对象
|
|
290
|
+
*/
|
|
291
|
+
var transformKeySubmitValue = exports.transformKeySubmitValue = function transformKeySubmitValue(values, dataFormatMapRaw) {
|
|
292
|
+
// 过滤掉空值的转换配置
|
|
293
|
+
var dataFormatMap = filterNilTransforms(dataFormatMapRaw);
|
|
294
|
+
|
|
295
|
+
// 如果没有有效的转换配置,直接返回原值
|
|
296
|
+
if (Object.keys(dataFormatMap).length < 1) {
|
|
297
|
+
return values;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// 在服务端环境下直接返回原值
|
|
301
|
+
if (typeof window === 'undefined') {
|
|
302
|
+
return values;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// 如果 value 是 string | null | Array | Blob 类型其中之一,直接返回
|
|
306
|
+
// 形如 {key: [File, File]} 的表单字段当进行第二次递归时会导致其直接越过 typeof value !== 'object' 这一判断
|
|
307
|
+
// https://github.com/ant-design/pro-components/issues/2071
|
|
308
|
+
if (_typeof(values) !== 'object' || (0, _isNil.isNil)(values) || values instanceof Blob) {
|
|
309
|
+
return values;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// 创建一个深拷贝来避免修改原始数据
|
|
313
|
+
var result = JSON.parse(JSON.stringify(values));
|
|
314
|
+
|
|
315
|
+
// 分别处理不同格式的转换配置
|
|
316
|
+
var _separateTransformFor = separateTransformFormats(dataFormatMapRaw),
|
|
317
|
+
dotPathTransforms = _separateTransformFor.dotPathTransforms,
|
|
318
|
+
objectTransforms = _separateTransformFor.objectTransforms;
|
|
319
|
+
|
|
320
|
+
// 处理点号路径格式的转换(如 'users.0.name')
|
|
321
|
+
processDotPathTransforms(result, dotPathTransforms);
|
|
322
|
+
|
|
323
|
+
// 存储需要在根级别合并的对象
|
|
324
|
+
var rootMergeObjects = [];
|
|
325
|
+
|
|
326
|
+
// 处理传统的嵌套对象格式转换(向后兼容)
|
|
327
|
+
if (Object.keys(objectTransforms).length > 0) {
|
|
328
|
+
result = processNestedObjectTransforms(result, undefined, objectTransforms, rootMergeObjects);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
// 将所有根级别合并对象合并到最终结果
|
|
332
|
+
for (var _i = 0, _rootMergeObjects = rootMergeObjects; _i < _rootMergeObjects.length; _i++) {
|
|
333
|
+
var obj = _rootMergeObjects[_i];
|
|
334
|
+
Object.assign(result, obj);
|
|
335
|
+
}
|
|
336
|
+
return result;
|
|
337
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _ahooks = require("ahooks");
|
|
8
|
+
var COL_SIZE = {
|
|
9
|
+
lg: 'lg',
|
|
10
|
+
md: 'md',
|
|
11
|
+
sm: 'sm'
|
|
12
|
+
};
|
|
13
|
+
var _default = exports.default = function _default(ref) {
|
|
14
|
+
var dom = (ref === null || ref === void 0 ? void 0 : ref.current) || document.querySelector('body');
|
|
15
|
+
var _ref = (0, _ahooks.useSize)(dom) || {},
|
|
16
|
+
width = _ref.width;
|
|
17
|
+
var size = COL_SIZE.lg;
|
|
18
|
+
if (width >= 1370) {
|
|
19
|
+
size = COL_SIZE.lg;
|
|
20
|
+
} else if (width >= 992) {
|
|
21
|
+
size = COL_SIZE.md;
|
|
22
|
+
} else {
|
|
23
|
+
size = COL_SIZE.sm;
|
|
24
|
+
}
|
|
25
|
+
return size;
|
|
26
|
+
};
|