@vtx/components 4.0.0-beta.4 → 4.0.0-beta.41
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 +76 -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 +83 -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/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 +72 -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 +175 -0
- package/es/vtx-color-picker/style/index.js +54 -0
- package/es/vtx-combogrid/Combogrid.js +252 -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 +493 -0
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +531 -0
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +88 -0
- package/es/vtx-datagrid/ToolBar/components/Density/index.js +53 -0
- package/es/vtx-datagrid/ToolBar/components/Fullscreen/index.js +77 -0
- package/es/vtx-datagrid/ToolBar/components/TableStyle/index.js +74 -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 +434 -0
- package/es/vtx-datagrid/renderColumnButtons.js +117 -0
- package/es/vtx-datagrid/style/index.js +142 -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-descriptions/Descriptions.js +30 -0
- package/es/vtx-descriptions/index.js +3 -0
- package/es/vtx-descriptions/style/index.js +19 -0
- package/es/vtx-ellipsis-text/index.js +57 -0
- package/es/vtx-ellipsis-text/style/index.js +31 -0
- package/es/vtx-export/index.js +196 -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 +260 -0
- package/es/vtx-export-async/index.js +429 -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 +136 -0
- package/es/vtx-form-layout/Pane.js +52 -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 +115 -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 +145 -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 +460 -0
- package/es/vtx-import/result.js +85 -0
- package/es/vtx-import/style/index.js +29 -0
- package/es/vtx-import2/CheckResult.js +45 -0
- package/es/vtx-import2/Content.js +104 -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 +462 -0
- package/es/vtx-import2/style/index.js +151 -0
- package/es/vtx-input/TextArea/index.js +66 -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 +246 -0
- package/es/vtx-modal/style/index.js +111 -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 +59 -0
- package/es/vtx-page-layout/TableLayout.js +173 -0
- package/es/vtx-page-layout/TableWrap.js +37 -0
- package/es/vtx-page-layout/TreeLayout.js +73 -0
- package/es/vtx-page-layout/container.js +69 -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 +324 -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 +189 -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 +201 -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 +110 -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 +193 -0
- package/es/vtx-scrollable-row/style/index.js +108 -0
- package/es/vtx-search/index.js +354 -0
- package/es/vtx-search/style/index.js +95 -0
- package/es/vtx-select/index.js +264 -0
- package/es/vtx-select/style/index.js +31 -0
- package/es/vtx-signature/index.js +120 -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 +70 -0
- package/es/vtx-split-pane/index.js +3 -0
- package/es/vtx-split-pane/style/index.js +29 -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 +63 -0
- package/es/vtx-time-picker/style/index.js +0 -0
- package/es/vtx-transfer/Transfer.js +30 -0
- package/es/vtx-transfer/index.js +3 -0
- package/es/vtx-transfer/style/index.js +19 -0
- package/es/vtx-transfer-select/TransferSelect.js +143 -0
- package/es/vtx-transfer-select/index.js +3 -0
- package/es/vtx-transfer-select/style/index.js +19 -0
- package/es/vtx-tree/index.js +405 -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 +262 -0
- package/es/vtx-tree-select/style/index.js +79 -0
- package/es/vtx-upload/FilePreview.js +112 -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 +421 -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 +276 -0
- package/lib/index.js +399 -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 +91 -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/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 +429 -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 +182 -0
- package/lib/vtx-color-picker/style/index.js +60 -0
- package/lib/vtx-combogrid/Combogrid.js +260 -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 +499 -0
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +535 -0
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +94 -0
- package/lib/vtx-datagrid/ToolBar/components/Density/index.js +59 -0
- package/lib/vtx-datagrid/ToolBar/components/Fullscreen/index.js +83 -0
- package/lib/vtx-datagrid/ToolBar/components/TableStyle/index.js +80 -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 +443 -0
- package/lib/vtx-datagrid/renderColumnButtons.js +123 -0
- package/lib/vtx-datagrid/style/index.js +148 -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-descriptions/Descriptions.js +39 -0
- package/lib/vtx-descriptions/index.js +15 -0
- package/lib/vtx-descriptions/style/index.js +25 -0
- package/lib/vtx-ellipsis-text/index.js +65 -0
- package/lib/vtx-ellipsis-text/style/index.js +37 -0
- package/lib/vtx-export/index.js +202 -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 +268 -0
- package/lib/vtx-export-async/index.js +436 -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 +142 -0
- package/lib/vtx-form-layout/Pane.js +61 -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 +135 -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 +151 -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 +468 -0
- package/lib/vtx-import/result.js +92 -0
- package/lib/vtx-import/style/index.js +35 -0
- package/lib/vtx-import2/CheckResult.js +50 -0
- package/lib/vtx-import2/Content.js +113 -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 +467 -0
- package/lib/vtx-import2/style/index.js +157 -0
- package/lib/vtx-input/TextArea/index.js +75 -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 +252 -0
- package/lib/vtx-modal/style/index.js +117 -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 +64 -0
- package/lib/vtx-page-layout/TableLayout.js +182 -0
- package/lib/vtx-page-layout/TableWrap.js +44 -0
- package/lib/vtx-page-layout/TreeLayout.js +78 -0
- package/lib/vtx-page-layout/container.js +75 -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 +359 -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 +195 -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 +207 -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 +116 -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 +203 -0
- package/lib/vtx-scrollable-row/style/index.js +114 -0
- package/lib/vtx-search/index.js +359 -0
- package/lib/vtx-search/style/index.js +102 -0
- package/lib/vtx-select/index.js +271 -0
- package/lib/vtx-select/style/index.js +37 -0
- package/lib/vtx-signature/index.js +128 -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 +78 -0
- package/lib/vtx-split-pane/index.js +15 -0
- package/lib/vtx-split-pane/style/index.js +35 -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 +71 -0
- package/lib/vtx-time-picker/style/index.js +1 -0
- package/lib/vtx-transfer/Transfer.js +39 -0
- package/lib/vtx-transfer/index.js +15 -0
- package/lib/vtx-transfer/style/index.js +25 -0
- package/lib/vtx-transfer-select/TransferSelect.js +151 -0
- package/lib/vtx-transfer-select/index.js +15 -0
- package/lib/vtx-transfer-select/style/index.js +25 -0
- package/lib/vtx-tree/index.js +412 -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 +268 -0
- package/lib/vtx-tree-select/style/index.js +85 -0
- package/lib/vtx-upload/FilePreview.js +117 -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 +425 -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 +285 -0
- package/package.json +44 -29
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import classsnames from 'classnames';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { useStyle } from "./style";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
var Left = function Left(props) {
|
|
6
|
+
var className = props.className,
|
|
7
|
+
style = props.style;
|
|
8
|
+
var _useStyle = useStyle('vtx-page'),
|
|
9
|
+
wrapSSR = _useStyle.wrapSSR;
|
|
10
|
+
return wrapSSR( /*#__PURE__*/_jsx("div", {
|
|
11
|
+
style: style,
|
|
12
|
+
className: classsnames('vtx-page-table-left', className),
|
|
13
|
+
children: props.children
|
|
14
|
+
}));
|
|
15
|
+
};
|
|
16
|
+
Left.propTypes = {
|
|
17
|
+
style: PropTypes.object,
|
|
18
|
+
className: PropTypes.string,
|
|
19
|
+
children: PropTypes.node
|
|
20
|
+
};
|
|
21
|
+
var Right = function Right(props) {
|
|
22
|
+
var className = props.className,
|
|
23
|
+
style = props.style;
|
|
24
|
+
var _useStyle2 = useStyle('vtx-page'),
|
|
25
|
+
wrapSSR = _useStyle2.wrapSSR;
|
|
26
|
+
return wrapSSR( /*#__PURE__*/_jsx("div", {
|
|
27
|
+
style: style,
|
|
28
|
+
className: classsnames('vtx-page-table-right', className),
|
|
29
|
+
children: props.children
|
|
30
|
+
}));
|
|
31
|
+
};
|
|
32
|
+
Right.propTypes = {
|
|
33
|
+
style: PropTypes.object,
|
|
34
|
+
className: PropTypes.string,
|
|
35
|
+
children: PropTypes.node
|
|
36
|
+
};
|
|
37
|
+
export default {
|
|
38
|
+
Left: Left,
|
|
39
|
+
Right: Right
|
|
40
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ConfigProvider } from 'antd';
|
|
2
|
+
import classsnames from 'classnames';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { useContext } from 'react';
|
|
5
|
+
import { useStyle } from "./style";
|
|
6
|
+
import { VtxProvider } from "../vtx-provider";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 页面
|
|
10
|
+
* @param {*} props
|
|
11
|
+
*/
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
var Page = function Page(props) {
|
|
14
|
+
var _useContext = useContext(VtxProvider),
|
|
15
|
+
getPrefixCls = _useContext.getPrefixCls;
|
|
16
|
+
var prefix = getPrefixCls('page', props.prefixCls);
|
|
17
|
+
var _useStyle = useStyle(prefix),
|
|
18
|
+
wrapSSR = _useStyle.wrapSSR,
|
|
19
|
+
hashId = _useStyle.hashId;
|
|
20
|
+
return wrapSSR( /*#__PURE__*/_jsx("div", {
|
|
21
|
+
className: classsnames("".concat(prefix, "-tab"), props.className, hashId),
|
|
22
|
+
style: props.style,
|
|
23
|
+
children: props.children
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
Page.propTypes = {
|
|
27
|
+
style: PropTypes.object,
|
|
28
|
+
className: PropTypes.string,
|
|
29
|
+
children: PropTypes.node
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 内容
|
|
34
|
+
* @param {*} props
|
|
35
|
+
*/
|
|
36
|
+
var Content = function Content(props) {
|
|
37
|
+
var className = props.className,
|
|
38
|
+
style = props.style;
|
|
39
|
+
var _useContext2 = useContext(VtxProvider),
|
|
40
|
+
getPrefixCls = _useContext2.getPrefixCls;
|
|
41
|
+
var prefix = getPrefixCls('page', props.prefixCls);
|
|
42
|
+
var _useStyle2 = useStyle(prefix),
|
|
43
|
+
wrapSSR = _useStyle2.wrapSSR,
|
|
44
|
+
hashId = _useStyle2.hashId;
|
|
45
|
+
return wrapSSR( /*#__PURE__*/_jsx("div", {
|
|
46
|
+
className: classsnames("".concat(prefix, "-tab-content"), className, hashId),
|
|
47
|
+
style: style,
|
|
48
|
+
children: props.children
|
|
49
|
+
}));
|
|
50
|
+
};
|
|
51
|
+
Content.propTypes = {
|
|
52
|
+
style: PropTypes.object,
|
|
53
|
+
className: PropTypes.string,
|
|
54
|
+
children: PropTypes.node
|
|
55
|
+
};
|
|
56
|
+
export default {
|
|
57
|
+
Page: Page,
|
|
58
|
+
Content: Content
|
|
59
|
+
};
|
|
@@ -0,0 +1,173 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
import { useEventEmitter } from 'ahooks';
|
|
14
|
+
import classsnames from 'classnames';
|
|
15
|
+
import PropTypes from 'prop-types';
|
|
16
|
+
import React, { createContext, useContext, useEffect, useState } from 'react';
|
|
17
|
+
import Basic from "./Basic";
|
|
18
|
+
import container from "./container";
|
|
19
|
+
import { useStyle } from "./style";
|
|
20
|
+
import { VtxProvider } from "../vtx-provider";
|
|
21
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
+
export var StoreCtx = /*#__PURE__*/createContext({});
|
|
23
|
+
var pagePaddingTop = 20;
|
|
24
|
+
var searchMarginBottom = 20;
|
|
25
|
+
|
|
26
|
+
// eslint-disable-next-line valid-jsdoc
|
|
27
|
+
/**
|
|
28
|
+
* 页面
|
|
29
|
+
* @param {*} props
|
|
30
|
+
*/
|
|
31
|
+
var Page = function Page(props) {
|
|
32
|
+
var _useContext = useContext(VtxProvider),
|
|
33
|
+
getPrefixCls = _useContext.getPrefixCls;
|
|
34
|
+
var prefix = getPrefixCls('page', props.prefixCls);
|
|
35
|
+
var _useStyle = useStyle(prefix),
|
|
36
|
+
wrapSSR = _useStyle.wrapSSR,
|
|
37
|
+
hashId = _useStyle.hashId;
|
|
38
|
+
// 查询区高度
|
|
39
|
+
var _useState = useState(64),
|
|
40
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
41
|
+
searchHeight = _useState2[0],
|
|
42
|
+
setSearchHeight = _useState2[1];
|
|
43
|
+
// 内容区ref 为了全屏
|
|
44
|
+
var _useState3 = useState(null),
|
|
45
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
46
|
+
contentRef = _useState4[0],
|
|
47
|
+
setContentRef = _useState4[1];
|
|
48
|
+
var onSearchCollapse = props.onSearchCollapse;
|
|
49
|
+
var searchCollapseEvent$ = useEventEmitter();
|
|
50
|
+
var store = {
|
|
51
|
+
searchHeight: searchHeight,
|
|
52
|
+
searchCollapseEvent$: searchCollapseEvent$,
|
|
53
|
+
onCollapse: function onCollapse(height) {
|
|
54
|
+
setSearchHeight === null || setSearchHeight === void 0 || setSearchHeight(height);
|
|
55
|
+
onSearchCollapse === null || onSearchCollapse === void 0 || onSearchCollapse(height);
|
|
56
|
+
searchCollapseEvent$.emit();
|
|
57
|
+
},
|
|
58
|
+
contentRef: contentRef,
|
|
59
|
+
setContentRef: setContentRef
|
|
60
|
+
};
|
|
61
|
+
return wrapSSR( /*#__PURE__*/_jsx(StoreCtx.Provider, {
|
|
62
|
+
value: store,
|
|
63
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
64
|
+
className: classsnames("".concat(prefix, "-table"), props.className, hashId),
|
|
65
|
+
style: props.style,
|
|
66
|
+
children: props.children
|
|
67
|
+
})
|
|
68
|
+
}));
|
|
69
|
+
};
|
|
70
|
+
Page.propTypes = {
|
|
71
|
+
style: PropTypes.object,
|
|
72
|
+
className: PropTypes.string,
|
|
73
|
+
children: PropTypes.node,
|
|
74
|
+
onSearchCollapse: PropTypes.func
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* 搜索
|
|
79
|
+
*/
|
|
80
|
+
var Search = container({
|
|
81
|
+
componentClass: 'vtx-page-table-search'
|
|
82
|
+
})(Basic);
|
|
83
|
+
|
|
84
|
+
// eslint-disable-next-line valid-jsdoc
|
|
85
|
+
/**
|
|
86
|
+
* 内容
|
|
87
|
+
* @param {*} props
|
|
88
|
+
*/
|
|
89
|
+
var Content = function Content(props) {
|
|
90
|
+
var className = props.className,
|
|
91
|
+
style = props.style,
|
|
92
|
+
_props$plusTop = props.plusTop,
|
|
93
|
+
plusTop = _props$plusTop === void 0 ? 0 : _props$plusTop;
|
|
94
|
+
var _useContext2 = useContext(StoreCtx),
|
|
95
|
+
searchHeight = _useContext2.searchHeight,
|
|
96
|
+
onCollapse = _useContext2.onCollapse,
|
|
97
|
+
setContentRef = _useContext2.setContentRef;
|
|
98
|
+
useEffect(function () {
|
|
99
|
+
return function () {
|
|
100
|
+
onCollapse(64); // 组件销毁时,高度还原
|
|
101
|
+
};
|
|
102
|
+
}, []);
|
|
103
|
+
return /*#__PURE__*/_jsx("div", {
|
|
104
|
+
className: classsnames('vtx-page-table-content', className),
|
|
105
|
+
style: _objectSpread({
|
|
106
|
+
top: pagePaddingTop + searchMarginBottom + searchHeight + plusTop
|
|
107
|
+
}, style),
|
|
108
|
+
ref: function ref(_ref) {
|
|
109
|
+
setContentRef(_ref);
|
|
110
|
+
},
|
|
111
|
+
children: props.children
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
Content.propTypes = {
|
|
115
|
+
style: PropTypes.object,
|
|
116
|
+
className: PropTypes.string,
|
|
117
|
+
children: PropTypes.node,
|
|
118
|
+
plusTop: PropTypes.number
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
// eslint-disable-next-line valid-jsdoc
|
|
122
|
+
/**
|
|
123
|
+
* 表格布局
|
|
124
|
+
*/
|
|
125
|
+
var Table = function Table(props) {
|
|
126
|
+
var className = props.className,
|
|
127
|
+
style = props.style,
|
|
128
|
+
children = props.children;
|
|
129
|
+
var _useContext3 = useContext(StoreCtx),
|
|
130
|
+
searchCollapseEvent$ = _useContext3.searchCollapseEvent$;
|
|
131
|
+
|
|
132
|
+
// 安全检查:如果不是有效的 React 元素,直接渲染不注入 props
|
|
133
|
+
if (! /*#__PURE__*/React.isValidElement(children)) {
|
|
134
|
+
return /*#__PURE__*/_jsx("div", {
|
|
135
|
+
className: classsnames('vtx-page-table-wrap', className),
|
|
136
|
+
style: style,
|
|
137
|
+
children: children
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
return /*#__PURE__*/_jsx("div", {
|
|
141
|
+
className: classsnames('vtx-page-table-wrap', className),
|
|
142
|
+
style: style,
|
|
143
|
+
children: /*#__PURE__*/React.cloneElement(children, {
|
|
144
|
+
searchCollapseEvent$: searchCollapseEvent$
|
|
145
|
+
})
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
Table.propTypes = {
|
|
149
|
+
style: PropTypes.object,
|
|
150
|
+
className: PropTypes.string,
|
|
151
|
+
children: PropTypes.node
|
|
152
|
+
};
|
|
153
|
+
var Card = function Card(props) {
|
|
154
|
+
var className = props.className,
|
|
155
|
+
style = props.style;
|
|
156
|
+
return /*#__PURE__*/_jsx("div", {
|
|
157
|
+
style: style,
|
|
158
|
+
className: classsnames('vtx-page-table-card', className),
|
|
159
|
+
children: props.children
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
Card.propTypes = {
|
|
163
|
+
style: PropTypes.object,
|
|
164
|
+
className: PropTypes.string,
|
|
165
|
+
children: PropTypes.node
|
|
166
|
+
};
|
|
167
|
+
export default {
|
|
168
|
+
Page: Page,
|
|
169
|
+
Search: Search,
|
|
170
|
+
Content: Content,
|
|
171
|
+
Table: container()(Table),
|
|
172
|
+
Card: Card
|
|
173
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import classnames from 'classnames';
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
function TableWrap(props) {
|
|
12
|
+
var relative = props.relative,
|
|
13
|
+
height = props.height,
|
|
14
|
+
style = props.style,
|
|
15
|
+
className = props.className,
|
|
16
|
+
children = props.children;
|
|
17
|
+
var tableClass = classnames(_defineProperty(_defineProperty({}, 'vtx-table-wrapper-absolute', !relative), 'vtx-table-wrapper-relative', relative), className);
|
|
18
|
+
var newStyle = style;
|
|
19
|
+
if (relative && 'height' in props) {
|
|
20
|
+
newStyle = _objectSpread(_objectSpread({}, style), {}, {
|
|
21
|
+
height: height
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return /*#__PURE__*/_jsx("div", {
|
|
25
|
+
className: tableClass,
|
|
26
|
+
style: newStyle,
|
|
27
|
+
children: children
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export default TableWrap;
|
|
31
|
+
TableWrap.propTypes = {
|
|
32
|
+
style: PropTypes.object,
|
|
33
|
+
className: PropTypes.string,
|
|
34
|
+
relative: PropTypes.bool,
|
|
35
|
+
height: PropTypes.number,
|
|
36
|
+
children: PropTypes.node
|
|
37
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import classsnames from 'classnames';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { useContext } from 'react';
|
|
4
|
+
import { useStyle } from "./style";
|
|
5
|
+
import { VtxProvider } from "../vtx-provider";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 页面
|
|
9
|
+
* @param {*} props
|
|
10
|
+
*/
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
var Page = function Page(props) {
|
|
13
|
+
var _useContext = useContext(VtxProvider),
|
|
14
|
+
getPrefixCls = _useContext.getPrefixCls;
|
|
15
|
+
var prefix = getPrefixCls('page', props.prefixCls);
|
|
16
|
+
var _useStyle = useStyle(prefix),
|
|
17
|
+
wrapSSR = _useStyle.wrapSSR,
|
|
18
|
+
hashId = _useStyle.hashId;
|
|
19
|
+
return wrapSSR( /*#__PURE__*/_jsx("div", {
|
|
20
|
+
className: classsnames("".concat(prefix, "-tree"), props.className, hashId),
|
|
21
|
+
style: props.style,
|
|
22
|
+
children: props.children
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
25
|
+
Page.propTypes = {
|
|
26
|
+
style: PropTypes.object,
|
|
27
|
+
className: PropTypes.string,
|
|
28
|
+
children: PropTypes.node
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 内容
|
|
33
|
+
* @param {*} props
|
|
34
|
+
*/
|
|
35
|
+
var Content = function Content(props) {
|
|
36
|
+
var className = props.className,
|
|
37
|
+
style = props.style;
|
|
38
|
+
var _useContext2 = useContext(VtxProvider),
|
|
39
|
+
getPrefixCls = _useContext2.getPrefixCls;
|
|
40
|
+
var prefix = getPrefixCls('page', props.prefixCls);
|
|
41
|
+
var _useStyle2 = useStyle(prefix),
|
|
42
|
+
wrapSSR = _useStyle2.wrapSSR,
|
|
43
|
+
hashId = _useStyle2.hashId;
|
|
44
|
+
return wrapSSR( /*#__PURE__*/_jsx("div", {
|
|
45
|
+
className: classsnames("".concat(prefix, "-tree-content"), className, hashId),
|
|
46
|
+
style: style,
|
|
47
|
+
children: props.children
|
|
48
|
+
}));
|
|
49
|
+
};
|
|
50
|
+
Content.propTypes = {
|
|
51
|
+
style: PropTypes.object,
|
|
52
|
+
className: PropTypes.string,
|
|
53
|
+
children: PropTypes.node
|
|
54
|
+
};
|
|
55
|
+
var Tree = function Tree(props) {
|
|
56
|
+
var className = props.className,
|
|
57
|
+
style = props.style;
|
|
58
|
+
return /*#__PURE__*/_jsx("div", {
|
|
59
|
+
className: classsnames('vtx-page-tree-wrap', className),
|
|
60
|
+
style: style,
|
|
61
|
+
children: props.children
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
Tree.propTypes = {
|
|
65
|
+
style: PropTypes.object,
|
|
66
|
+
className: PropTypes.string,
|
|
67
|
+
children: PropTypes.node
|
|
68
|
+
};
|
|
69
|
+
export default {
|
|
70
|
+
Page: Page,
|
|
71
|
+
Content: Content,
|
|
72
|
+
Tree: Tree
|
|
73
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
11
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
+
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; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
16
|
+
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); }
|
|
17
|
+
/**
|
|
18
|
+
* 高阶组件
|
|
19
|
+
*/
|
|
20
|
+
import React from 'react';
|
|
21
|
+
import PropTypes from 'prop-types';
|
|
22
|
+
import classnames from 'classnames';
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
function getDisplayName(WrappedComponend) {
|
|
25
|
+
return WrappedComponend.displayName || WrappedComponend.name || 'Component';
|
|
26
|
+
}
|
|
27
|
+
function Container() {
|
|
28
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
29
|
+
var componentClass = params.componentClass;
|
|
30
|
+
return function HOCFactory(WrappedComponend) {
|
|
31
|
+
var _class;
|
|
32
|
+
return _class = /*#__PURE__*/function (_React$Component) {
|
|
33
|
+
_inherits(HOC, _React$Component);
|
|
34
|
+
var _super = _createSuper(HOC);
|
|
35
|
+
function HOC() {
|
|
36
|
+
_classCallCheck(this, HOC);
|
|
37
|
+
return _super.apply(this, arguments);
|
|
38
|
+
}
|
|
39
|
+
_createClass(HOC, [{
|
|
40
|
+
key: "render",
|
|
41
|
+
value: function render() {
|
|
42
|
+
var _this$props = this.props,
|
|
43
|
+
style = _this$props.style,
|
|
44
|
+
className = _this$props.className,
|
|
45
|
+
top = _this$props.top,
|
|
46
|
+
space = _this$props.space;
|
|
47
|
+
var wrapClass = classnames(_defineProperty({}, componentClass, !!componentClass), className);
|
|
48
|
+
var newStyle = _objectSpread(_objectSpread(_objectSpread({}, top !== undefined && {
|
|
49
|
+
top: top
|
|
50
|
+
}), space !== undefined && {
|
|
51
|
+
padding: space
|
|
52
|
+
}), style);
|
|
53
|
+
var newProps = {
|
|
54
|
+
className: wrapClass,
|
|
55
|
+
style: newStyle
|
|
56
|
+
};
|
|
57
|
+
return /*#__PURE__*/_jsx(WrappedComponend, _objectSpread(_objectSpread({}, this.props), newProps));
|
|
58
|
+
}
|
|
59
|
+
}]);
|
|
60
|
+
return HOC;
|
|
61
|
+
}(React.Component), _defineProperty(_class, "displayName", "HOC(".concat(getDisplayName(WrappedComponend), ")")), _defineProperty(_class, "propTypes", {
|
|
62
|
+
top: PropTypes.number,
|
|
63
|
+
space: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
64
|
+
style: PropTypes.object,
|
|
65
|
+
className: PropTypes.string
|
|
66
|
+
}), _class;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export default Container;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import container from "./container";
|
|
2
|
+
import Basic from "./Basic";
|
|
3
|
+
import Content from "./Content";
|
|
4
|
+
import TableWrap from "./TableWrap";
|
|
5
|
+
import TableLayout from "./TableLayout";
|
|
6
|
+
import TreeLayout from "./TreeLayout";
|
|
7
|
+
import TabLayout from "./TabLayout";
|
|
8
|
+
import Pane from "./Pane";
|
|
9
|
+
var Page = container({
|
|
10
|
+
componentClass: 'vtx-page'
|
|
11
|
+
})(Basic);
|
|
12
|
+
var ButtonWrap = container({
|
|
13
|
+
componentClass: 'vtx-page-button-wrap'
|
|
14
|
+
})(Basic);
|
|
15
|
+
var VtxPageLayout = {
|
|
16
|
+
TreeLayout: TreeLayout,
|
|
17
|
+
TableLayout: TableLayout,
|
|
18
|
+
Pane: Pane,
|
|
19
|
+
Page: Page,
|
|
20
|
+
ButtonWrap: ButtonWrap,
|
|
21
|
+
Content: container()(Content),
|
|
22
|
+
TableWrap: container()(TableWrap),
|
|
23
|
+
TabLayout: TabLayout
|
|
24
|
+
};
|
|
25
|
+
export { VtxPageLayout };
|
|
26
|
+
export default VtxPageLayout;
|
|
@@ -0,0 +1,129 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
import { useStyle as useAntdStyle } from "../../vtx-provider";
|
|
8
|
+
export var prefix = 'vtx-page';
|
|
9
|
+
var size = function size(width, height) {
|
|
10
|
+
return {
|
|
11
|
+
width: width,
|
|
12
|
+
height: height
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
var relative = function relative() {
|
|
16
|
+
var height = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '100%';
|
|
17
|
+
var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '100%';
|
|
18
|
+
return _objectSpread({
|
|
19
|
+
position: 'relative'
|
|
20
|
+
}, size(width, height));
|
|
21
|
+
};
|
|
22
|
+
var absolute = function absolute() {
|
|
23
|
+
var top = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
24
|
+
var right = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
25
|
+
var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
26
|
+
var left = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
27
|
+
return {
|
|
28
|
+
position: 'absolute',
|
|
29
|
+
top: top,
|
|
30
|
+
right: right,
|
|
31
|
+
bottom: bottom,
|
|
32
|
+
left: left
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
var overflowY = {
|
|
36
|
+
overflow: 'hidden',
|
|
37
|
+
overflowY: 'auto'
|
|
38
|
+
};
|
|
39
|
+
var fontFamily = {
|
|
40
|
+
fontFamily: '-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", Segoe UI Symbol, "Noto Color Emoji"'
|
|
41
|
+
};
|
|
42
|
+
var genVtxStyle = function genVtxStyle(token) {
|
|
43
|
+
var componentCls = token.componentCls;
|
|
44
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _objectSpread(_objectSpread({}, fontFamily), {}, {
|
|
45
|
+
height: '100%',
|
|
46
|
+
backgroundColor: token.colorBgContainer
|
|
47
|
+
})), "".concat(token.antCls, "-layout"), _objectSpread(_objectSpread({}, fontFamily), {}, {
|
|
48
|
+
backgroundColor: 'transparent !important'
|
|
49
|
+
})), "".concat(componentCls, "-tree"), _objectSpread(_objectSpread(_objectSpread({}, fontFamily), relative()), {}, {
|
|
50
|
+
padding: "".concat(token.tablePagePaddingTop, "px 0px ").concat(token.tablePagePaddingBottom, "px 20px"),
|
|
51
|
+
overflowX: 'hidden',
|
|
52
|
+
fontSize: token.fontSize,
|
|
53
|
+
backgroundColor: token.colorBgLayout,
|
|
54
|
+
boxSizing: 'border-box',
|
|
55
|
+
'&-content': _objectSpread(_objectSpread({
|
|
56
|
+
backgroundColor: token.colorBgLayout
|
|
57
|
+
}, absolute(token.tablePagePaddingTop, 0, token.tablePagePaddingBottom, token.tablePagePaddingLeft)), {}, {
|
|
58
|
+
transitionDuration: '0.3s',
|
|
59
|
+
transitionProperty: 'top'
|
|
60
|
+
}),
|
|
61
|
+
'&-wrap': _objectSpread(_objectSpread({}, absolute()), {}, {
|
|
62
|
+
backgroundColor: token.colorBgContainer,
|
|
63
|
+
borderRadius: token.borderRadiusLG,
|
|
64
|
+
padding: '16px'
|
|
65
|
+
})
|
|
66
|
+
})), "".concat(componentCls, "-tab"), _objectSpread(_objectSpread({}, fontFamily), {}, {
|
|
67
|
+
display: 'flex',
|
|
68
|
+
flexDirection: 'column',
|
|
69
|
+
height: "100%",
|
|
70
|
+
backgroundColor: token.colorBgLayout,
|
|
71
|
+
'.ant-tabs': {
|
|
72
|
+
backgroundColor: token.colorBgContainer,
|
|
73
|
+
'&.ant-tabs-top >.ant-tabs-nav': {
|
|
74
|
+
padding: '0 20px',
|
|
75
|
+
margin: 0
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
'&-content': {
|
|
79
|
+
flex: 1
|
|
80
|
+
}
|
|
81
|
+
})), "".concat(componentCls, "-table"), _objectSpread(_objectSpread(_objectSpread({}, fontFamily), relative()), {}, {
|
|
82
|
+
padding: "".concat(token.tablePagePaddingTop, "px ").concat(token.tablePagePaddingRight, "px ").concat(token.tablePagePaddingBottom, "px ").concat(token.tablePagePaddingLeft, "px"),
|
|
83
|
+
overflowX: 'hidden',
|
|
84
|
+
fontSize: token.fontSize,
|
|
85
|
+
backgroundColor: token.colorBgLayout,
|
|
86
|
+
boxSizing: 'border-box',
|
|
87
|
+
'&-search': {
|
|
88
|
+
marginBottom: 20,
|
|
89
|
+
borderRadius: token.borderRadiusLG,
|
|
90
|
+
backgroundColor: token.colorBgContainer
|
|
91
|
+
},
|
|
92
|
+
'&-content': _objectSpread(_objectSpread({}, absolute(0, token.tablePagePaddingRight, token.tablePagePaddingBottom, token.tablePagePaddingLeft)), {}, {
|
|
93
|
+
transitionDuration: '0.3s',
|
|
94
|
+
transitionProperty: 'top'
|
|
95
|
+
}),
|
|
96
|
+
'&-wrap': _objectSpread(_objectSpread({}, absolute()), {}, {
|
|
97
|
+
backgroundColor: token.colorBgContainer,
|
|
98
|
+
borderRadius: token.borderRadiusLG,
|
|
99
|
+
padding: '0 20px'
|
|
100
|
+
}),
|
|
101
|
+
'&-card': {
|
|
102
|
+
background: token.colorBgContainer,
|
|
103
|
+
borderRadius: token.borderRadiusLG
|
|
104
|
+
},
|
|
105
|
+
'&-left, &-right': {
|
|
106
|
+
height: '100%',
|
|
107
|
+
overflow: 'hidden'
|
|
108
|
+
},
|
|
109
|
+
'&-left': _defineProperty(_defineProperty({}, "".concat(componentCls, "-ztree-search"), {
|
|
110
|
+
right: 0
|
|
111
|
+
}), '.ant-vtx-tree-wraaper', {})
|
|
112
|
+
})), "".concat(componentCls, "-button-wrap"), _defineProperty({}, "button + button", {
|
|
113
|
+
marginLeft: 8
|
|
114
|
+
}));
|
|
115
|
+
};
|
|
116
|
+
export function useStyle() {
|
|
117
|
+
return useAntdStyle(prefix, function (token) {
|
|
118
|
+
var vtxToken = _objectSpread(_objectSpread({}, token), {}, {
|
|
119
|
+
componentCls: ".".concat(prefix),
|
|
120
|
+
spacingBase: 10,
|
|
121
|
+
paddingDefaultBase: 10,
|
|
122
|
+
tablePagePaddingLeft: 20,
|
|
123
|
+
tablePagePaddingRight: 20,
|
|
124
|
+
tablePagePaddingBottom: 20,
|
|
125
|
+
tablePagePaddingTop: 20
|
|
126
|
+
});
|
|
127
|
+
return [genVtxStyle(vtxToken)];
|
|
128
|
+
});
|
|
129
|
+
}
|