@vtx/components 4.0.0-beta.85 → 4.0.0-beta.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -19
- package/es/utils/components/LabelIconTip/index.js +7 -7
- package/es/utils/conversionMomentValue/index.js +25 -25
- package/es/utils/filterSpecialCharacters.js +6 -6
- package/es/utils/genCopyable/index.js +6 -6
- package/es/utils/getFieldPropsOrFormItemProps/index.js +7 -7
- package/es/utils/hooks/useDebounceFn/index.js +4 -4
- package/es/utils/hooks/useDebounceValue/index.js +6 -6
- package/es/utils/hooks/useDeepCompareMemo/index.js +7 -7
- package/es/utils/hooks/useLatest/index.js +2 -2
- package/es/utils/hooks/useRefCallback/index.js +5 -5
- package/es/utils/isBrowser/index.js +7 -7
- package/es/utils/isUrl/index.js +4 -4
- package/es/utils/merge/index.js +4 -4
- package/es/utils/nanoid/index.js +4 -4
- package/es/utils/omitBoolean/index.js +4 -4
- package/es/utils/parseValueToMoment/index.js +4 -4
- package/es/utils/proFieldParsingText/index.js +10 -10
- package/es/utils/transformKeySubmitValue/index.js +57 -57
- package/es/utils/useEditableArray/index.js +46 -46
- package/es/utils/useEditableMap/index.js +22 -22
- package/es/utils/useMediaQuery/index.js +5 -5
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +4 -4
- package/es/vtx-datagrid/style/index.less +242 -242
- package/es/vtx-date-picker/style/index.less +39 -39
- package/es/vtx-export/index.js +8 -8
- package/es/vtx-icon/index.js1 +90 -90
- package/es/vtx-modal/index.js +2 -2
- package/es/vtx-page-layout/Basic.js +2 -2
- package/es/vtx-page-layout/TabLayout.js +6 -6
- package/es/vtx-page-layout/TableLayout.js +10 -10
- package/es/vtx-page-layout/TreeLayout.js +6 -6
- package/es/vtx-page-layout/container.js +2 -2
- package/es/vtx-provider/index.js +30 -30
- package/es/vtx-provider/intl.js +9 -9
- package/es/vtx-provider/useStyle/index.js +17 -17
- package/es/vtx-select/index.js +30 -12
- package/es/vtx-wang-editor/style/index.less +12 -12
- package/lib/utils/components/LabelIconTip/index.js +7 -7
- package/lib/utils/conversionMomentValue/index.js +25 -25
- package/lib/utils/filterSpecialCharacters.js +6 -6
- package/lib/utils/genCopyable/index.js +6 -6
- package/lib/utils/getFieldPropsOrFormItemProps/index.js +7 -7
- package/lib/utils/hooks/useDebounceFn/index.js +4 -4
- package/lib/utils/hooks/useDebounceValue/index.js +6 -6
- package/lib/utils/hooks/useDeepCompareMemo/index.js +7 -7
- package/lib/utils/hooks/useLatest/index.js +2 -2
- package/lib/utils/hooks/useRefCallback/index.js +5 -5
- package/lib/utils/isBrowser/index.js +7 -7
- package/lib/utils/isUrl/index.js +4 -4
- package/lib/utils/merge/index.js +4 -4
- package/lib/utils/nanoid/index.js +4 -4
- package/lib/utils/omitBoolean/index.js +4 -4
- package/lib/utils/parseValueToMoment/index.js +4 -4
- package/lib/utils/proFieldParsingText/index.js +10 -10
- package/lib/utils/transformKeySubmitValue/index.js +57 -57
- package/lib/utils/useEditableArray/index.js +46 -46
- package/lib/utils/useEditableMap/index.js +22 -22
- package/lib/utils/useMediaQuery/index.js +5 -5
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +4 -4
- package/lib/vtx-datagrid/style/index.less +242 -242
- package/lib/vtx-date-picker/style/index.less +39 -39
- package/lib/vtx-export/index.js +8 -8
- package/lib/vtx-icon/index.js1 +90 -90
- package/lib/vtx-modal/index.js +2 -2
- package/lib/vtx-page-layout/Basic.js +2 -2
- package/lib/vtx-page-layout/TabLayout.js +6 -6
- package/lib/vtx-page-layout/TableLayout.js +10 -10
- package/lib/vtx-page-layout/TreeLayout.js +6 -6
- package/lib/vtx-page-layout/container.js +2 -2
- package/lib/vtx-provider/index.js +30 -30
- package/lib/vtx-provider/intl.js +9 -9
- package/lib/vtx-provider/useStyle/index.js +17 -17
- package/lib/vtx-select/index.js +30 -12
- package/lib/vtx-wang-editor/style/index.less +12 -12
- package/package.json +239 -240
- package/dist/27.7e3a5587.async.js +0 -11
- package/dist/404.html +0 -17
- package/dist/4217.9f9c8f33.async.js +0 -1
- package/dist/4571.1f5588f5.async.js +0 -5
- package/dist/8238.a223befe.async.js +0 -688
- package/dist/8552.83c22540.async.js +0 -1265
- package/dist/9260.21c26210.async.js +0 -137
- package/dist/VtxColorPicker__demos.c3e03ab4.async.js +0 -1
- package/dist/VtxCombogrid__demos.81dd3d19.async.js +0 -1
- package/dist/VtxDatagrid__demos.bb6d2937.async.js +0 -1
- package/dist/VtxDescriptions__demos.c1d10744.async.js +0 -1
- package/dist/VtxEllipsisText__demos.f56d2a6b.async.js +0 -1
- package/dist/VtxExportAsync__demos.8bd5e7fc.async.js +0 -1
- package/dist/VtxExport__demos.f0c12996.async.js +0 -1
- package/dist/VtxFormLayout__demos.cbc5ebda.async.js +0 -1
- package/dist/VtxImage__demos.1c568ce3.async.js +0 -1
- package/dist/VtxImport2__demos.dd7cfbcf.async.js +0 -1
- package/dist/VtxImport__demos.1403a7a8.async.js +0 -1
- package/dist/VtxInput__demos.d1aeb2ca.async.js +0 -1
- package/dist/VtxModal__demos.c18d608e.async.js +0 -1
- package/dist/VtxPageLayout__demos.d223bf3b.async.js +0 -1
- package/dist/VtxRpsFrame__demos.3f951d24.async.js +0 -1
- package/dist/VtxScrollableRow__demos.a4859102.async.js +0 -1
- package/dist/VtxSearch__demos.7faa294b.async.js +0 -1
- package/dist/VtxSelect__demos.d6eb6d2b.async.js +0 -1
- package/dist/VtxSignature__demos.6abe7992.async.js +0 -1
- package/dist/VtxSplitPane__demos.2d21bf24.async.js +0 -1
- package/dist/VtxStatisticsColumn__demos.c466441f.async.js +0 -1
- package/dist/VtxTimePicker__demos.51ecd5f0.async.js +0 -1
- package/dist/VtxTransferSelect__demos.1e97ae79.async.js +0 -1
- package/dist/VtxTransfer__demos.18ba60b0.async.js +0 -1
- package/dist/VtxTreeSelect__demos.8ae23eb7.async.js +0 -1
- package/dist/VtxTree__demos.1ae9263d.async.js +0 -1
- package/dist/VtxUpload__demos.f8ac6088.async.js +0 -1
- package/dist/VtxWangEditor__demos.4c7f9743.async.js +0 -1
- package/dist/changelog/index.html +0 -17
- package/dist/components/index.html +0 -17
- package/dist/components/vtx-color-picker/index.html +0 -17
- package/dist/components/vtx-combogrid/index.html +0 -17
- package/dist/components/vtx-datagrid/index.html +0 -17
- package/dist/components/vtx-date-picker/index.html +0 -17
- package/dist/components/vtx-descriptions/index.html +0 -17
- package/dist/components/vtx-ellipsis-text/index.html +0 -17
- package/dist/components/vtx-export/index.html +0 -17
- package/dist/components/vtx-export-async/index.html +0 -17
- package/dist/components/vtx-form-layout/index.html +0 -17
- package/dist/components/vtx-image/index.html +0 -17
- package/dist/components/vtx-import/index.html +0 -17
- package/dist/components/vtx-import2/index.html +0 -17
- package/dist/components/vtx-input/index.html +0 -17
- package/dist/components/vtx-modal/index.html +0 -17
- package/dist/components/vtx-page-layout/index.html +0 -17
- package/dist/components/vtx-rps-frame/index.html +0 -17
- package/dist/components/vtx-scrollable-row/index.html +0 -17
- package/dist/components/vtx-search/index.html +0 -17
- package/dist/components/vtx-select/index.html +0 -17
- package/dist/components/vtx-signature/index.html +0 -17
- package/dist/components/vtx-split-pane/index.html +0 -17
- package/dist/components/vtx-statistics-column/index.html +0 -17
- package/dist/components/vtx-time-picker/index.html +0 -17
- package/dist/components/vtx-transfer/index.html +0 -17
- package/dist/components/vtx-transfer-select/index.html +0 -17
- package/dist/components/vtx-tree/index.html +0 -17
- package/dist/components/vtx-tree-select/index.html +0 -17
- package/dist/components/vtx-upload/index.html +0 -17
- package/dist/components/vtx-wang-editor/index.html +0 -17
- package/dist/demos.d31d47d3.async.js +0 -1
- package/dist/docs/api-changes/index.html +0 -17
- package/dist/docs/index.html +0 -17
- package/dist/docs/migration-guide/index.html +0 -17
- package/dist/dumi__tmp-production__dumi__theme__ContextWrapper.9bd1f529.async.js +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/icon.png +0 -0
- package/dist/index.html +0 -17
- package/dist/meta__site.77f4ce5c.async.js +0 -24576
- package/dist/meta__site.cb4ba864.chunk.css +0 -9
- package/dist/meta__vtx-search.1cffc39e.async.js +0 -5
- package/dist/nm__dumi-theme-vortex-style__dist__layouts__DemoLayout__index.d38bb511.async.js +0 -1
- package/dist/nm__dumi-theme-vortex-style__dist__layouts__DocLayout__index.eec80432.chunk.css +0 -1
- package/dist/nm__dumi__dist__client__pages__404.02c0a12e.async.js +0 -1
- package/dist/nm__dumi__dist__client__pages__404.8b85f2d9.chunk.css +0 -1
- package/dist/nm__dumi__dist__client__pages__Demo__index.578aa5c0.chunk.css +0 -1
- package/dist/nm__dumi__dist__client__pages__Demo__index.ce4c974c.async.js +0 -1
- package/dist/preload_helper.91c86d97.js +0 -1
- package/dist/site__changelog.md.2004f9af.async.js +0 -1
- package/dist/site__changelog.md.33be0665.chunk.css +0 -1
- package/dist/site__components__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__index.md.4b208bce.async.js +0 -1
- package/dist/site__components__vtx-color-picker__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-color-picker__index.md.8cde38ad.async.js +0 -1
- package/dist/site__components__vtx-combogrid__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-combogrid__index.md.3a276575.async.js +0 -19
- package/dist/site__components__vtx-datagrid__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-datagrid__index.md.6b8af1e9.async.js +0 -58
- package/dist/site__components__vtx-date-picker__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-date-picker__index.md.79fe2a74.async.js +0 -1
- package/dist/site__components__vtx-descriptions__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-descriptions__index.md.581f585c.async.js +0 -1
- package/dist/site__components__vtx-ellipsis-text__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-ellipsis-text__index.md.d6064e54.async.js +0 -1
- package/dist/site__components__vtx-export-async__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-export-async__index.md.c235ace9.async.js +0 -50
- package/dist/site__components__vtx-export__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-export__index.md.54504e6f.async.js +0 -6
- package/dist/site__components__vtx-form-layout__index.md.1f1785cf.async.js +0 -1
- package/dist/site__components__vtx-form-layout__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-image__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-image__index.md.68cd709b.async.js +0 -7
- package/dist/site__components__vtx-import2__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-import2__index.md.533d4e74.async.js +0 -22
- package/dist/site__components__vtx-import__index.md.2cb1513e.async.js +0 -17
- package/dist/site__components__vtx-import__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-input__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-input__index.md.5403e1e4.async.js +0 -1
- package/dist/site__components__vtx-modal__index.md.0f8af11e.async.js +0 -9
- package/dist/site__components__vtx-modal__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-page-layout__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-page-layout__index.md.e4956ee7.async.js +0 -1
- package/dist/site__components__vtx-rps-frame__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-rps-frame__index.md.c80279df.async.js +0 -1
- package/dist/site__components__vtx-scrollable-row__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-scrollable-row__index.md.df93edc6.async.js +0 -1
- package/dist/site__components__vtx-search__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-search__index.md.d011bdaa.async.js +0 -17
- package/dist/site__components__vtx-select__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-select__index.md.de66c747.async.js +0 -6
- package/dist/site__components__vtx-signature__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-signature__index.md.b8b1093d.async.js +0 -1
- package/dist/site__components__vtx-split-pane__index.md.2163de9a.async.js +0 -1
- package/dist/site__components__vtx-split-pane__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-statistics-column__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-statistics-column__index.md.543d917f.async.js +0 -1
- package/dist/site__components__vtx-time-picker__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-time-picker__index.md.a1ef3b11.async.js +0 -1
- package/dist/site__components__vtx-transfer-select__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-transfer-select__index.md.df61e6d2.async.js +0 -1
- package/dist/site__components__vtx-transfer__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-transfer__index.md.e17f6962.async.js +0 -1
- package/dist/site__components__vtx-tree-select__index.md.2ee8c02c.async.js +0 -1
- package/dist/site__components__vtx-tree-select__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-tree__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-tree__index.md.9bd6ff74.async.js +0 -1
- package/dist/site__components__vtx-upload__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-upload__index.md.5a7d3eda.async.js +0 -6
- package/dist/site__components__vtx-wang-editor__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-wang-editor__index.md.9eb84586.async.js +0 -7
- package/dist/site__docs__api-changes.md.33be0665.chunk.css +0 -1
- package/dist/site__docs__api-changes.md.42dee6c8.async.js +0 -6
- package/dist/site__docs__index.md.33be0665.chunk.css +0 -1
- package/dist/site__docs__index.md.8e7c64da.async.js +0 -53
- package/dist/site__docs__migration-guide.md.33be0665.chunk.css +0 -1
- package/dist/site__docs__migration-guide.md.fe82d57e.async.js +0 -194
- package/dist/site__index.md.33be0665.chunk.css +0 -1
- package/dist/site__index.md.54cae2e4.async.js +0 -1
- package/dist/sitemap.xml +0 -1
- package/dist/umi.4db41586.css +0 -1
- package/dist/umi.e0925664.js +0 -879
- package/dist/vtx-search__index.md.33be0665.chunk.css +0 -1
- package/dist/vtx-search__index.md.a29f26ea.async.js +0 -5
- package/dist/~demos/site-components-vtx-date-picker-demo-demo1/index.html +0 -17
- package/dist/~demos/site-components-vtx-date-picker-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxcolorpicker-demo-base/index.html +0 -17
- package/dist/~demos/vtxcolorpicker-demo-base-form/index.html +0 -17
- package/dist/~demos/vtxcombogrid-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxcombogrid-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxcombogrid-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxcombogrid-demo-demo4/index.html +0 -17
- package/dist/~demos/vtxcombogrid-demo-demo5/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo10/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo4/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo5/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo6/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo7/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo8/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo9/index.html +0 -17
- package/dist/~demos/vtxdescriptions-demo-base/index.html +0 -17
- package/dist/~demos/vtxdescriptions-demo-border/index.html +0 -17
- package/dist/~demos/vtxellipsistext-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxexport-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxexportasync-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo10/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo4/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo5/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo6/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo7/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo8/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo9/index.html +0 -17
- package/dist/~demos/vtximage-demo-demo1/index.html +0 -17
- package/dist/~demos/vtximage-demo-demo2/index.html +0 -17
- package/dist/~demos/vtximage-demo-demo3/index.html +0 -17
- package/dist/~demos/vtximage-demo-demo4/index.html +0 -17
- package/dist/~demos/vtximport-demo-base/index.html +0 -17
- package/dist/~demos/vtximport2-demo-base/index.html +0 -17
- package/dist/~demos/vtxinput-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxinput-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxinput-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxmodal-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxmodal-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxmodal-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxpagelayout-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxpagelayout-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxpagelayout-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxpagelayout-demo-demo4/index.html +0 -17
- package/dist/~demos/vtxpagelayout-demo-demo5/index.html +0 -17
- package/dist/~demos/vtxrpsframe-demo-base/index.html +0 -17
- package/dist/~demos/vtxscrollablerow-demo-demo/index.html +0 -17
- package/dist/~demos/vtxsearch-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxsearch-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxsearch-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxsearch-demo-demo4/index.html +0 -17
- package/dist/~demos/vtxselect-demo-base/index.html +0 -17
- package/dist/~demos/vtxselect-demo-base-multiple/index.html +0 -17
- package/dist/~demos/vtxsignature-demo-demo/index.html +0 -17
- package/dist/~demos/vtxsignature-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxsplitpane-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxsplitpane-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxsplitpane-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxsplitpane-demo-demo4/index.html +0 -17
- package/dist/~demos/vtxstatisticscolumn-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxstatisticscolumn-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxstatisticscolumn-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxtimepicker-demo-base/index.html +0 -17
- package/dist/~demos/vtxtransfer-demo-base/index.html +0 -17
- package/dist/~demos/vtxtransferselect-demo-base/index.html +0 -17
- package/dist/~demos/vtxtree-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxtree-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxtree-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxtreeselect-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxtreeselect-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxtreeselect-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxtreeselect-demo-demo4/index.html +0 -17
- package/dist/~demos/vtxupload-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxupload-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxupload-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxupload-demo-demo4/index.html +0 -17
- package/dist/~demos/vtxwangeditor-demo-demo1/index.html +0 -17
|
@@ -25,19 +25,19 @@ var dateFormatterMap = exports.dateFormatterMap = {
|
|
|
25
25
|
dateTimeRange: 'YYYY-MM-DD HH:mm:ss'
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
/**
|
|
29
|
-
* 判断是不是一个 object
|
|
30
|
-
* @param {any} o
|
|
31
|
-
* @returns boolean
|
|
28
|
+
/**
|
|
29
|
+
* 判断是不是一个 object
|
|
30
|
+
* @param {any} o
|
|
31
|
+
* @returns boolean
|
|
32
32
|
*/
|
|
33
33
|
function isObject(o) {
|
|
34
34
|
return Object.prototype.toString.call(o) === '[object Object]';
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
/**
|
|
38
|
-
* 判断是否是一个的简单的 object
|
|
39
|
-
* @param {{constructor:any}} o
|
|
40
|
-
* @returns boolean
|
|
37
|
+
/**
|
|
38
|
+
* 判断是否是一个的简单的 object
|
|
39
|
+
* @param {{constructor:any}} o
|
|
40
|
+
* @returns boolean
|
|
41
41
|
*/
|
|
42
42
|
function isPlainObject(o) {
|
|
43
43
|
if (isObject(o) === false) return false;
|
|
@@ -59,20 +59,20 @@ function isPlainObject(o) {
|
|
|
59
59
|
return true;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
/**
|
|
63
|
-
* 一个比较hack的moment判断工具
|
|
64
|
-
* @param {any} value
|
|
65
|
-
* @returns boolean
|
|
62
|
+
/**
|
|
63
|
+
* 一个比较hack的moment判断工具
|
|
64
|
+
* @param {any} value
|
|
65
|
+
* @returns boolean
|
|
66
66
|
*/
|
|
67
67
|
var isMoment = function isMoment(value) {
|
|
68
68
|
return !!(value !== null && value !== void 0 && value._isAMomentObject);
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
/**
|
|
72
|
-
* 根据不同的格式转化 dayjs
|
|
73
|
-
* @param {dayjs.Dayjs} value
|
|
74
|
-
* @param {string|((value:dayjs.Dayjs} dateFormatter
|
|
75
|
-
* @param {string} valueType
|
|
71
|
+
/**
|
|
72
|
+
* 根据不同的格式转化 dayjs
|
|
73
|
+
* @param {dayjs.Dayjs} value
|
|
74
|
+
* @param {string|((value:dayjs.Dayjs} dateFormatter
|
|
75
|
+
* @param {string} valueType
|
|
76
76
|
*/
|
|
77
77
|
var convertMoment = exports.convertMoment = function convertMoment(value, dateFormatter, valueType) {
|
|
78
78
|
if (!dateFormatter) {
|
|
@@ -95,14 +95,14 @@ var convertMoment = exports.convertMoment = function convertMoment(value, dateFo
|
|
|
95
95
|
return value;
|
|
96
96
|
};
|
|
97
97
|
|
|
98
|
-
/**
|
|
99
|
-
* 这里主要是来转化一下数据 将 dayjs 转化为 string 将 all 默认删除
|
|
100
|
-
* @param {T} value
|
|
101
|
-
* @param {DateFormatter} dateFormatter
|
|
102
|
-
* @param {Record<string} valueTypeMap
|
|
103
|
-
* @param {ProFieldValueType;dateFormat:string;}|any>} |{valueType
|
|
104
|
-
* @param {boolean} omitNil?
|
|
105
|
-
* @param {NamePath} parentKey?
|
|
98
|
+
/**
|
|
99
|
+
* 这里主要是来转化一下数据 将 dayjs 转化为 string 将 all 默认删除
|
|
100
|
+
* @param {T} value
|
|
101
|
+
* @param {DateFormatter} dateFormatter
|
|
102
|
+
* @param {Record<string} valueTypeMap
|
|
103
|
+
* @param {ProFieldValueType;dateFormat:string;}|any>} |{valueType
|
|
104
|
+
* @param {boolean} omitNil?
|
|
105
|
+
* @param {NamePath} parentKey?
|
|
106
106
|
*/
|
|
107
107
|
var conversionMomentValue = exports.conversionMomentValue = function conversionMomentValue(value, dateFormatter, valueTypeMap, omitNil, parentKey) {
|
|
108
108
|
var tmpValue = {};
|
|
@@ -63,12 +63,12 @@ var SpecialCharacters = exports.SpecialCharacters = [
|
|
|
63
63
|
'%', '%',
|
|
64
64
|
// 其它
|
|
65
65
|
'@', '#', '`', '~', '*', '^', '……', '|', '&'];
|
|
66
|
-
/**
|
|
67
|
-
* 过滤特殊字符
|
|
68
|
-
* @param {String} value 值
|
|
69
|
-
* @param {Object} option
|
|
70
|
-
* @param {Array} [option.include] 新增
|
|
71
|
-
* @param {Array} [option.exclude] 排除
|
|
66
|
+
/**
|
|
67
|
+
* 过滤特殊字符
|
|
68
|
+
* @param {String} value 值
|
|
69
|
+
* @param {Object} option
|
|
70
|
+
* @param {Array} [option.include] 新增
|
|
71
|
+
* @param {Array} [option.exclude] 排除
|
|
72
72
|
*/
|
|
73
73
|
function filterSpecialCharacters(value) {
|
|
74
74
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
@@ -26,12 +26,12 @@ var getEllipsis = function getEllipsis(item) {
|
|
|
26
26
|
return item.ellipsis;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
/**
|
|
30
|
-
* 生成 Copyable 或 Ellipsis 的 dom
|
|
31
|
-
*
|
|
32
|
-
* @param dom
|
|
33
|
-
* @param item
|
|
34
|
-
* @param text
|
|
29
|
+
/**
|
|
30
|
+
* 生成 Copyable 或 Ellipsis 的 dom
|
|
31
|
+
*
|
|
32
|
+
* @param dom
|
|
33
|
+
* @param item
|
|
34
|
+
* @param text
|
|
35
35
|
*/
|
|
36
36
|
var genCopyable = exports.genCopyable = function genCopyable(dom, item, text) {
|
|
37
37
|
if (item.copyable || item.ellipsis) {
|
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getFieldPropsOrFormItemProps = void 0;
|
|
7
7
|
var _runFunction = require("../runFunction");
|
|
8
|
-
/**
|
|
9
|
-
* 因为 fieldProps 支持了 function 所以新增了这个方法
|
|
10
|
-
*
|
|
11
|
-
* @param {any} fieldProps
|
|
12
|
-
* @param {any} [form]
|
|
13
|
-
* @param {any} [extraProps]
|
|
14
|
-
* @returns {Record<string, any> & { onChange: any, colSize: number }}
|
|
8
|
+
/**
|
|
9
|
+
* 因为 fieldProps 支持了 function 所以新增了这个方法
|
|
10
|
+
*
|
|
11
|
+
* @param {any} fieldProps
|
|
12
|
+
* @param {any} [form]
|
|
13
|
+
* @param {any} [extraProps]
|
|
14
|
+
* @returns {Record<string, any> & { onChange: any, colSize: number }}
|
|
15
15
|
*/
|
|
16
16
|
var getFieldPropsOrFormItemProps = exports.getFieldPropsOrFormItemProps = function getFieldPropsOrFormItemProps(fieldProps, form, extraProps) {
|
|
17
17
|
if (form === undefined) {
|
|
@@ -10,10 +10,10 @@ var _useRefFunction = require("../useRefFunction");
|
|
|
10
10
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
11
11
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
12
12
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
13
|
-
/**
|
|
14
|
-
* 一个去抖的 hook,传入一个 function,返回一个去抖后的 function
|
|
15
|
-
* @param {(...args:T) => Promise<any>} fn
|
|
16
|
-
* @param {number} wait?
|
|
13
|
+
/**
|
|
14
|
+
* 一个去抖的 hook,传入一个 function,返回一个去抖后的 function
|
|
15
|
+
* @param {(...args:T) => Promise<any>} fn
|
|
16
|
+
* @param {number} wait?
|
|
17
17
|
*/
|
|
18
18
|
function useDebounceFn(fn, wait) {
|
|
19
19
|
var callback = (0, _useRefFunction.useRefFunction)(fn);
|
|
@@ -16,12 +16,12 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
16
16
|
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; }
|
|
17
17
|
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; } }
|
|
18
18
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
19
|
-
/**
|
|
20
|
-
* 一个去抖的setState,减少更新的频率
|
|
21
|
-
* @param {any} value
|
|
22
|
-
* @param {number} [delay=100]
|
|
23
|
-
* @param {any[]} deps
|
|
24
|
-
* @returns {any}
|
|
19
|
+
/**
|
|
20
|
+
* 一个去抖的setState,减少更新的频率
|
|
21
|
+
* @param {any} value
|
|
22
|
+
* @param {number} [delay=100]
|
|
23
|
+
* @param {any[]} deps
|
|
24
|
+
* @returns {any}
|
|
25
25
|
*/
|
|
26
26
|
function useDebounceValue(value) {
|
|
27
27
|
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
|
|
@@ -7,13 +7,13 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _useDeepCompareEffect = require("../useDeepCompareEffect");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
/**
|
|
11
|
-
* `useDeepCompareMemo` will only recompute the memoized value when one of the
|
|
12
|
-
* `deps` has changed.
|
|
13
|
-
*
|
|
14
|
-
* Usage note: only use this if `deps` are objects or arrays that contain
|
|
15
|
-
* objects. Otherwise you should just use React.useMemo.
|
|
16
|
-
*
|
|
10
|
+
/**
|
|
11
|
+
* `useDeepCompareMemo` will only recompute the memoized value when one of the
|
|
12
|
+
* `deps` has changed.
|
|
13
|
+
*
|
|
14
|
+
* Usage note: only use this if `deps` are objects or arrays that contain
|
|
15
|
+
* objects. Otherwise you should just use React.useMemo.
|
|
16
|
+
*
|
|
17
17
|
*/
|
|
18
18
|
function useDeepCompareMemo(factory, dependencies) {
|
|
19
19
|
return _react.default.useMemo(factory, (0, _useDeepCompareEffect.useDeepCompareMemoize)(dependencies));
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useLatest = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
/**
|
|
9
|
-
* @see https://github.com/streamich/react-use/blob/master/docs/useLatest.md
|
|
8
|
+
/**
|
|
9
|
+
* @see https://github.com/streamich/react-use/blob/master/docs/useLatest.md
|
|
10
10
|
*/
|
|
11
11
|
var useLatest = exports.useLatest = function useLatest(value) {
|
|
12
12
|
var ref = (0, _react.useRef)(value);
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useRefCallback = useRefCallback;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
/**
|
|
9
|
-
* useRefCallback
|
|
10
|
-
* @param {Function} callback ref.current 变化时触发
|
|
11
|
-
* @param {any} [initialValue] 初始值
|
|
12
|
-
* @returns {Object} 代理后的 ref 对象
|
|
8
|
+
/**
|
|
9
|
+
* useRefCallback
|
|
10
|
+
* @param {Function} callback ref.current 变化时触发
|
|
11
|
+
* @param {any} [initialValue] 初始值
|
|
12
|
+
* @returns {Object} 代理后的 ref 对象
|
|
13
13
|
*/
|
|
14
14
|
function useRefCallback(callback, initialValue) {
|
|
15
15
|
var ref = (0, _react.useMemo)(function () {
|
|
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.isBrowser = void 0;
|
|
7
7
|
var isNode = typeof process !== 'undefined' && process.versions != null && process.versions.node != null;
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* 用于判断当前是否在浏览器环境中。
|
|
11
|
-
* 首先会判断当前是否处于测试环境中(通过 process.env.NODE_ENV === 'TEST' 判断),
|
|
12
|
-
* 如果是,则返回 true。否则,会进一步判断是否存在 window 对象、document 对象以及 matchMedia 方法
|
|
13
|
-
* 同时通过 !isNode 判断当前不是在服务器(Node.js)环境下执行,
|
|
14
|
-
* 如果都符合,则返回 true 表示当前处于浏览器环境中。
|
|
15
|
-
* @returns boolean
|
|
9
|
+
/**
|
|
10
|
+
* 用于判断当前是否在浏览器环境中。
|
|
11
|
+
* 首先会判断当前是否处于测试环境中(通过 process.env.NODE_ENV === 'TEST' 判断),
|
|
12
|
+
* 如果是,则返回 true。否则,会进一步判断是否存在 window 对象、document 对象以及 matchMedia 方法
|
|
13
|
+
* 同时通过 !isNode 判断当前不是在服务器(Node.js)环境下执行,
|
|
14
|
+
* 如果都符合,则返回 true 表示当前处于浏览器环境中。
|
|
15
|
+
* @returns boolean
|
|
16
16
|
*/
|
|
17
17
|
var isBrowser = exports.isBrowser = function isBrowser() {
|
|
18
18
|
if (typeof process !== 'undefined' && process.env.NODE_ENV === 'TEST') {
|
package/lib/utils/isUrl/index.js
CHANGED
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isUrl = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* 判断是不是一个 url
|
|
9
|
-
* @param {string|undefined} path
|
|
10
|
-
* @returns boolean
|
|
7
|
+
/**
|
|
8
|
+
* 判断是不是一个 url
|
|
9
|
+
* @param {string|undefined} path
|
|
10
|
+
* @returns boolean
|
|
11
11
|
*/
|
|
12
12
|
var isUrl = exports.isUrl = function isUrl(path) {
|
|
13
13
|
if (!path) return false;
|
package/lib/utils/merge/index.js
CHANGED
|
@@ -12,10 +12,10 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
12
12
|
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); }
|
|
13
13
|
/* eslint-disable prefer-rest-params */
|
|
14
14
|
|
|
15
|
-
/**
|
|
16
|
-
* 用于合并 n 个对象
|
|
17
|
-
* @param {any[]} ...rest
|
|
18
|
-
* @returns T
|
|
15
|
+
/**
|
|
16
|
+
* 用于合并 n 个对象
|
|
17
|
+
* @param {any[]} ...rest
|
|
18
|
+
* @returns T
|
|
19
19
|
*/
|
|
20
20
|
var merge = exports.merge = function merge() {
|
|
21
21
|
var obj = {};
|
|
@@ -21,10 +21,10 @@ var genNanoid = function genNanoid() {
|
|
|
21
21
|
return e;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* 生成uuid,如果不支持 randomUUID,就用 genNanoid
|
|
26
|
-
*
|
|
27
|
-
* @returns string
|
|
24
|
+
/**
|
|
25
|
+
* 生成uuid,如果不支持 randomUUID,就用 genNanoid
|
|
26
|
+
*
|
|
27
|
+
* @returns string
|
|
28
28
|
*/
|
|
29
29
|
var nanoid = exports.nanoid = function nanoid() {
|
|
30
30
|
if (typeof window === 'undefined') return genNanoid();
|
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.omitBoolean = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* 剔除 boolean 值
|
|
9
|
-
* @param {boolean|T} obj
|
|
10
|
-
* @returns T
|
|
7
|
+
/**
|
|
8
|
+
* 剔除 boolean 值
|
|
9
|
+
* @param {boolean|T} obj
|
|
10
|
+
* @returns T
|
|
11
11
|
*/
|
|
12
12
|
var omitBoolean = exports.omitBoolean = function omitBoolean(obj) {
|
|
13
13
|
if (obj && obj !== true) {
|
|
@@ -10,10 +10,10 @@ var _isNil = require("../isNil");
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
_dayjs.default.extend(_customParseFormat.default);
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* 一个比较hack的moment判断工具
|
|
15
|
-
* @param value
|
|
16
|
-
* @returns
|
|
13
|
+
/**
|
|
14
|
+
* 一个比较hack的moment判断工具
|
|
15
|
+
* @param value
|
|
16
|
+
* @returns
|
|
17
17
|
*/
|
|
18
18
|
var isMoment = function isMoment(value) {
|
|
19
19
|
return !!(value !== null && value !== void 0 && value._isAMomentObject);
|
|
@@ -8,10 +8,10 @@ var _antd = require("antd");
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
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); } /**
|
|
12
|
-
* 获取类型的 type
|
|
13
|
-
*
|
|
14
|
-
* @param obj
|
|
11
|
+
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); } /**
|
|
12
|
+
* 获取类型的 type
|
|
13
|
+
*
|
|
14
|
+
* @param obj
|
|
15
15
|
*/
|
|
16
16
|
function getType(obj) {
|
|
17
17
|
// @ts-ignore
|
|
@@ -108,12 +108,12 @@ var TableStatus = {
|
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
/**
|
|
112
|
-
* 转化 text 和 valueEnum 通过 type 来添加 Status
|
|
113
|
-
*
|
|
114
|
-
* @param text
|
|
115
|
-
* @param valueEnum
|
|
116
|
-
* @param pure 纯净模式,不增加 status
|
|
111
|
+
/**
|
|
112
|
+
* 转化 text 和 valueEnum 通过 type 来添加 Status
|
|
113
|
+
*
|
|
114
|
+
* @param text
|
|
115
|
+
* @param valueEnum
|
|
116
|
+
* @param pure 纯净模式,不增加 status
|
|
117
117
|
*/
|
|
118
118
|
var proFieldParsingText = exports.proFieldParsingText = function proFieldParsingText(text, valueEnumParams, key) {
|
|
119
119
|
if (Array.isArray(text)) {
|
|
@@ -17,12 +17,12 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
|
|
|
17
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
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
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
|
|
20
|
+
/**
|
|
21
|
+
* 判断一个值是否为普通对象(可以被遍历的对象)
|
|
22
|
+
* 暂时还不支持 Set 和 Map 结构
|
|
23
|
+
*
|
|
24
|
+
* @param itemValue - 要检查的值
|
|
25
|
+
* @returns 如果是普通对象返回 true,否则返回 false
|
|
26
26
|
*/
|
|
27
27
|
function isPlainObj(itemValue) {
|
|
28
28
|
// 如果不是对象类型,直接返回 false
|
|
@@ -47,12 +47,12 @@ function isPlainObj(itemValue) {
|
|
|
47
47
|
return true;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
/**
|
|
51
|
-
* 将点号路径字符串转换为路径数组
|
|
52
|
-
* 例如: 'users.0.name' => ['users', 0, 'name']
|
|
53
|
-
*
|
|
54
|
-
* @param dotPath - 点号分隔的路径字符串
|
|
55
|
-
* @returns 路径数组,数字会被转换为数字类型
|
|
50
|
+
/**
|
|
51
|
+
* 将点号路径字符串转换为路径数组
|
|
52
|
+
* 例如: 'users.0.name' => ['users', 0, 'name']
|
|
53
|
+
*
|
|
54
|
+
* @param dotPath - 点号分隔的路径字符串
|
|
55
|
+
* @returns 路径数组,数字会被转换为数字类型
|
|
56
56
|
*/
|
|
57
57
|
function parseDotPath(dotPath) {
|
|
58
58
|
return dotPath.split('.').map(function (segment) {
|
|
@@ -61,11 +61,11 @@ function parseDotPath(dotPath) {
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
/**
|
|
65
|
-
* 过滤掉空值的转换配置
|
|
66
|
-
*
|
|
67
|
-
* @param dataFormatMapRaw - 原始转换配置
|
|
68
|
-
* @returns 过滤后的转换配置
|
|
64
|
+
/**
|
|
65
|
+
* 过滤掉空值的转换配置
|
|
66
|
+
*
|
|
67
|
+
* @param dataFormatMapRaw - 原始转换配置
|
|
68
|
+
* @returns 过滤后的转换配置
|
|
69
69
|
*/
|
|
70
70
|
function filterNilTransforms(dataFormatMapRaw) {
|
|
71
71
|
var filtered = {};
|
|
@@ -78,11 +78,11 @@ function filterNilTransforms(dataFormatMapRaw) {
|
|
|
78
78
|
return filtered;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
/**
|
|
82
|
-
* 将转换配置分为点号路径格式和传统嵌套对象格式
|
|
83
|
-
*
|
|
84
|
-
* @param dataFormatMapRaw - 原始转换配置
|
|
85
|
-
* @returns 包含两种格式转换配置的对象
|
|
81
|
+
/**
|
|
82
|
+
* 将转换配置分为点号路径格式和传统嵌套对象格式
|
|
83
|
+
*
|
|
84
|
+
* @param dataFormatMapRaw - 原始转换配置
|
|
85
|
+
* @returns 包含两种格式转换配置的对象
|
|
86
86
|
*/
|
|
87
87
|
function separateTransformFormats(dataFormatMapRaw) {
|
|
88
88
|
var dotPathTransforms = {};
|
|
@@ -102,12 +102,12 @@ function separateTransformFormats(dataFormatMapRaw) {
|
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
/**
|
|
106
|
-
* 处理点号路径格式的转换
|
|
107
|
-
* 例如: 'users.0.name' => 转换 users[0].name 的值
|
|
108
|
-
*
|
|
109
|
-
* @param result - 要转换的数据对象
|
|
110
|
-
* @param dotPathTransforms - 点号路径转换配置
|
|
105
|
+
/**
|
|
106
|
+
* 处理点号路径格式的转换
|
|
107
|
+
* 例如: 'users.0.name' => 转换 users[0].name 的值
|
|
108
|
+
*
|
|
109
|
+
* @param result - 要转换的数据对象
|
|
110
|
+
* @param dotPathTransforms - 点号路径转换配置
|
|
111
111
|
*/
|
|
112
112
|
function processDotPathTransforms(result, dotPathTransforms) {
|
|
113
113
|
for (var dotPath in dotPathTransforms) {
|
|
@@ -150,13 +150,13 @@ function processDotPathTransforms(result, dotPathTransforms) {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
/**
|
|
154
|
-
* 在嵌套转换配置中查找转换函数
|
|
155
|
-
*
|
|
156
|
-
* @param currentTransforms - 当前转换配置
|
|
157
|
-
* @param parentsKey - 父级路径
|
|
158
|
-
* @param entityKey - 当前实体键
|
|
159
|
-
* @returns 找到的转换函数或 undefined
|
|
153
|
+
/**
|
|
154
|
+
* 在嵌套转换配置中查找转换函数
|
|
155
|
+
*
|
|
156
|
+
* @param currentTransforms - 当前转换配置
|
|
157
|
+
* @param parentsKey - 父级路径
|
|
158
|
+
* @param entityKey - 当前实体键
|
|
159
|
+
* @returns 找到的转换函数或 undefined
|
|
160
160
|
*/
|
|
161
161
|
function findNestedTransformFunction(currentTransforms, parentsKey, entityKey) {
|
|
162
162
|
var nestedTransforms = currentTransforms;
|
|
@@ -184,11 +184,11 @@ function findNestedTransformFunction(currentTransforms, parentsKey, entityKey) {
|
|
|
184
184
|
return undefined;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
/**
|
|
188
|
-
* 检查路径是否包含数组索引
|
|
189
|
-
*
|
|
190
|
-
* @param parentsKey - 父级路径数组
|
|
191
|
-
* @returns 如果包含数组索引返回 true
|
|
187
|
+
/**
|
|
188
|
+
* 检查路径是否包含数组索引
|
|
189
|
+
*
|
|
190
|
+
* @param parentsKey - 父级路径数组
|
|
191
|
+
* @returns 如果包含数组索引返回 true
|
|
192
192
|
*/
|
|
193
193
|
function isInArrayPath(parentsKey) {
|
|
194
194
|
return parentsKey.some(function (key) {
|
|
@@ -196,14 +196,14 @@ function isInArrayPath(parentsKey) {
|
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
/**
|
|
200
|
-
* 递归处理嵌套对象转换(传统格式)
|
|
201
|
-
*
|
|
202
|
-
* @param tempValues - 要处理的值
|
|
203
|
-
* @param parentsKey - 父级路径
|
|
204
|
-
* @param currentTransforms - 当前转换配置
|
|
205
|
-
* @param rootMergeObjects - 存储需要在根级别合并的对象
|
|
206
|
-
* @returns 处理后的结果
|
|
199
|
+
/**
|
|
200
|
+
* 递归处理嵌套对象转换(传统格式)
|
|
201
|
+
*
|
|
202
|
+
* @param tempValues - 要处理的值
|
|
203
|
+
* @param parentsKey - 父级路径
|
|
204
|
+
* @param currentTransforms - 当前转换配置
|
|
205
|
+
* @param rootMergeObjects - 存储需要在根级别合并的对象
|
|
206
|
+
* @returns 处理后的结果
|
|
207
207
|
*/
|
|
208
208
|
function processNestedObjectTransforms(tempValues, parentsKey, currentTransforms, rootMergeObjects) {
|
|
209
209
|
var isArrayValues = Array.isArray(tempValues);
|
|
@@ -278,15 +278,15 @@ function processNestedObjectTransforms(tempValues, parentsKey, currentTransforms
|
|
|
278
278
|
return tempResult;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
/**
|
|
282
|
-
* 转换提交值中的键名
|
|
283
|
-
* 支持两种格式的转换配置:
|
|
284
|
-
* 1. 点号路径格式:'users.0.name' => 转换嵌套路径的值
|
|
285
|
-
* 2. 传统嵌套对象格式:{ users: { 0: { name: transformFn } } }
|
|
286
|
-
*
|
|
287
|
-
* @param values - 要转换的值对象
|
|
288
|
-
* @param dataFormatMapRaw - 转换配置映射
|
|
289
|
-
* @returns 转换后的值对象
|
|
281
|
+
/**
|
|
282
|
+
* 转换提交值中的键名
|
|
283
|
+
* 支持两种格式的转换配置:
|
|
284
|
+
* 1. 点号路径格式:'users.0.name' => 转换嵌套路径的值
|
|
285
|
+
* 2. 传统嵌套对象格式:{ users: { 0: { name: transformFn } } }
|
|
286
|
+
*
|
|
287
|
+
* @param values - 要转换的值对象
|
|
288
|
+
* @param dataFormatMapRaw - 转换配置映射
|
|
289
|
+
* @returns 转换后的值对象
|
|
290
290
|
*/
|
|
291
291
|
var transformKeySubmitValue = exports.transformKeySubmitValue = function transformKeySubmitValue(values, dataFormatMapRaw) {
|
|
292
292
|
// 过滤掉空值的转换配置
|