@ant-design/pro-components 3.1.0-0 → 3.1.1-1
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.es-PR.md +1 -3
- package/README.md +8 -10
- package/README.zh-CN.md +11 -11
- package/dist/pro-components.min.js +1 -1
- package/es/card/ProCard.js +8 -10
- package/es/card/components/Actions/index.js +25 -25
- package/es/card/components/Actions/style.js +79 -71
- package/es/card/components/Card/index.js +157 -142
- package/es/card/components/Card/style.js +249 -192
- package/es/card/components/CheckCard/Group.js +94 -115
- package/es/card/components/CheckCard/index.js +85 -79
- package/es/card/components/CheckCard/style.js +184 -168
- package/es/card/components/Divider/index.js +19 -15
- package/es/card/components/Divider/style.js +32 -29
- package/es/card/components/Loading/index.js +19 -16
- package/es/card/components/Loading/style.js +34 -31
- package/es/card/components/Operation/index.js +16 -13
- package/es/card/components/Operation/style.js +19 -18
- package/es/card/components/Statistic/index.js +46 -41
- package/es/card/components/Statistic/style.js +89 -70
- package/es/card/components/StatisticCard/index.js +46 -41
- package/es/card/components/StatisticCard/style.js +37 -35
- package/es/descriptions/index.js +214 -225
- package/es/descriptions/useFetchData.js +53 -91
- package/es/field/AllProField.js +265 -216
- package/es/field/FieldHOC/index.js +9 -14
- package/es/field/PureProField.js +82 -80
- package/es/field/ValueTypeToComponent.js +517 -618
- package/es/field/components/Cascader/index.d.ts +3 -3
- package/es/field/components/Cascader/index.js +66 -84
- package/es/field/components/Checkbox/index.d.ts +2 -2
- package/es/field/components/Checkbox/index.js +75 -72
- package/es/field/components/Code/index.js +40 -39
- package/es/field/components/ColorPicker/index.d.ts +2 -2
- package/es/field/components/ColorPicker/index.js +38 -32
- package/es/field/components/DatePicker/index.d.ts +2 -2
- package/es/field/components/DatePicker/index.js +49 -53
- package/es/field/components/Digit/index.js +41 -42
- package/es/field/components/DigitRange/index.js +71 -77
- package/es/field/components/FromNow/index.js +27 -25
- package/es/field/components/Image/index.js +28 -24
- package/es/field/components/IndexColumn/index.js +22 -16
- package/es/field/components/Money/index.js +107 -116
- package/es/field/components/Options/index.js +34 -33
- package/es/field/components/Password/index.js +35 -38
- package/es/field/components/Percent/index.js +40 -44
- package/es/field/components/Percent/util.js +3 -5
- package/es/field/components/Progress/index.js +29 -27
- package/es/field/components/Radio/index.d.ts +1 -1
- package/es/field/components/Radio/index.js +61 -62
- package/es/field/components/RangePicker/index.d.ts +2 -2
- package/es/field/components/RangePicker/index.js +52 -63
- package/es/field/components/Rate/index.js +24 -21
- package/es/field/components/Second/index.js +36 -33
- package/es/field/components/Segmented/index.d.ts +1 -1
- package/es/field/components/Segmented/index.js +37 -46
- package/es/field/components/Select/LightSelect/index.d.ts +1 -1
- package/es/field/components/Select/LightSelect/index.js +102 -109
- package/es/field/components/Select/SearchSelect/index.js +129 -155
- package/es/field/components/Select/index.d.ts +2 -2
- package/es/field/components/Select/index.js +193 -219
- package/es/field/components/Slider/index.js +25 -22
- package/es/field/components/Status/index.js +67 -78
- package/es/field/components/Switch/index.d.ts +1 -1
- package/es/field/components/Switch/index.js +32 -30
- package/es/field/components/Text/index.js +34 -37
- package/es/field/components/TextArea/index.js +26 -21
- package/es/field/components/TextArea/readonly.js +24 -21
- package/es/field/components/TimePicker/index.js +96 -105
- package/es/field/components/TreeSelect/index.d.ts +3 -3
- package/es/field/components/TreeSelect/index.js +107 -125
- package/es/form/BaseForm/BaseForm.js +416 -502
- package/es/form/BaseForm/EditOrReadOnlyContext.js +1 -1
- package/es/form/BaseForm/LightWrapper/index.js +56 -65
- package/es/form/BaseForm/LightWrapper/style.js +17 -13
- package/es/form/BaseForm/Submitter/index.js +44 -43
- package/es/form/FieldContext.js +1 -1
- package/es/form/components/Captcha/index.js +74 -134
- package/es/form/components/Cascader/index.d.ts +1 -1
- package/es/form/components/Cascader/index.js +26 -28
- package/es/form/components/Checkbox/index.js +60 -61
- package/es/form/components/ColorPicker/index.d.ts +1 -1
- package/es/form/components/ColorPicker/index.js +24 -26
- package/es/form/components/DatePicker/BaseDatePicker.js +32 -30
- package/es/form/components/DatePicker/DatePicker.js +14 -13
- package/es/form/components/DatePicker/DateTimePicker.js +11 -12
- package/es/form/components/DatePicker/MonthPicker.js +14 -13
- package/es/form/components/DatePicker/QuarterPicker.js +14 -13
- package/es/form/components/DatePicker/TimePicker.js +26 -27
- package/es/form/components/DatePicker/WeekPicker.js +14 -13
- package/es/form/components/DatePicker/YearPicker.js +14 -13
- package/es/form/components/DatePicker/index.js +1 -1
- package/es/form/components/DateRangePicker/BaseDateRanger.js +34 -34
- package/es/form/components/DateRangePicker/DateMonthRangePicker.js +15 -16
- package/es/form/components/DateRangePicker/DateQuarterRangePicker.js +15 -16
- package/es/form/components/DateRangePicker/DateTimeRangePicker.js +15 -16
- package/es/form/components/DateRangePicker/DateWeekRangePicker.js +15 -16
- package/es/form/components/DateRangePicker/DateYearRangePicker.js +15 -16
- package/es/form/components/DateRangePicker/TimeRangePicker.js +26 -29
- package/es/form/components/DateRangePicker/index.js +15 -16
- package/es/form/components/Dependency/index.js +31 -34
- package/es/form/components/Digit/DigitRange.d.ts +2 -2
- package/es/form/components/Digit/DigitRange.js +23 -24
- package/es/form/components/Digit/index.d.ts +1 -1
- package/es/form/components/Digit/index.js +27 -29
- package/es/form/components/Field/index.js +55 -63
- package/es/form/components/FieldSet/index.js +68 -76
- package/es/form/components/FormItem/FormItemRender/index.js +58 -48
- package/es/form/components/FormItem/Group/index.js +95 -95
- package/es/form/components/FormItem/Group/style.js +46 -40
- package/es/form/components/FormItem/index.js +135 -141
- package/es/form/components/FormItem/warpField.js +165 -149
- package/es/form/components/List/ListContainer.js +98 -189
- package/es/form/components/List/ListItem.js +151 -198
- package/es/form/components/List/index.js +97 -107
- package/es/form/components/List/style.js +71 -47
- package/es/form/components/Money/index.d.ts +1 -1
- package/es/form/components/Money/index.js +28 -30
- package/es/form/components/Radio/index.d.ts +2 -2
- package/es/form/components/Radio/index.js +45 -49
- package/es/form/components/Rate/index.d.ts +1 -1
- package/es/form/components/Rate/index.js +17 -20
- package/es/form/components/SchemaForm/index.js +58 -72
- package/es/form/components/SchemaForm/layoutType/Embed.js +5 -6
- package/es/form/components/SchemaForm/layoutType/StepsForm.js +22 -26
- package/es/form/components/SchemaForm/valueType/dependency.js +11 -11
- package/es/form/components/SchemaForm/valueType/divider.js +4 -5
- package/es/form/components/SchemaForm/valueType/field.js +45 -44
- package/es/form/components/SchemaForm/valueType/formList.js +8 -7
- package/es/form/components/SchemaForm/valueType/formSet.js +8 -7
- package/es/form/components/SchemaForm/valueType/group.js +7 -8
- package/es/form/components/SchemaForm/valueType/ignore.js +2 -2
- package/es/form/components/SchemaForm/valueType/index.js +5 -5
- package/es/form/components/Segmented/index.js +20 -23
- package/es/form/components/Select/index.js +69 -73
- package/es/form/components/Slider/index.d.ts +1 -1
- package/es/form/components/Slider/index.js +33 -35
- package/es/form/components/Switch/index.js +24 -26
- package/es/form/components/Text/index.js +75 -86
- package/es/form/components/TextArea/index.d.ts +1 -1
- package/es/form/components/TextArea/index.js +17 -20
- package/es/form/components/TreeSelect/index.js +20 -23
- package/es/form/components/UploadButton/index.js +56 -103
- package/es/form/components/UploadDragger/index.js +37 -44
- package/es/form/helpers/grid.js +65 -67
- package/es/form/layouts/DrawerForm/index.js +150 -241
- package/es/form/layouts/DrawerForm/style.js +26 -25
- package/es/form/layouts/LightFilter/index.d.ts +12 -1
- package/es/form/layouts/LightFilter/index.js +158 -140
- package/es/form/layouts/LightFilter/style.js +52 -48
- package/es/form/layouts/LoginForm/index.js +44 -47
- package/es/form/layouts/LoginForm/style.js +71 -67
- package/es/form/layouts/LoginFormPage/index.js +45 -48
- package/es/form/layouts/LoginFormPage/style.js +136 -126
- package/es/form/layouts/ModalForm/index.js +119 -203
- package/es/form/layouts/ProForm/index.d.ts +2 -2
- package/es/form/layouts/ProForm/index.js +5 -5
- package/es/form/layouts/QueryFilter/Actions.js +23 -22
- package/es/form/layouts/QueryFilter/index.js +178 -203
- package/es/form/layouts/QueryFilter/style.js +45 -37
- package/es/form/layouts/StepsForm/StepForm.d.ts +2 -3
- package/es/form/layouts/StepsForm/StepForm.js +50 -71
- package/es/form/layouts/StepsForm/index.js +175 -217
- package/es/form/layouts/StepsForm/style.js +30 -28
- package/es/form/layouts/index.js +1 -1
- package/es/layout/ProLayout.js +281 -292
- package/es/layout/WrapContent.js +16 -12
- package/es/layout/assert/Logo.js +95 -97
- package/es/layout/components/AppsLogoComponents/AppsLogo.js +10 -12
- package/es/layout/components/AppsLogoComponents/DefaultContent.js +17 -16
- package/es/layout/components/AppsLogoComponents/SimpleContent.js +19 -18
- package/es/layout/components/AppsLogoComponents/index.js +33 -38
- package/es/layout/components/AppsLogoComponents/style/default.js +2 -2
- package/es/layout/components/AppsLogoComponents/style/index.js +52 -50
- package/es/layout/components/AppsLogoComponents/style/simple.js +1 -1
- package/es/layout/components/CollapsedIcon/index.js +18 -15
- package/es/layout/components/CollapsedIcon/style.js +40 -40
- package/es/layout/components/Footer.js +22 -21
- package/es/layout/components/FooterToolbar/index.js +58 -52
- package/es/layout/components/FooterToolbar/style/index.js +38 -37
- package/es/layout/components/FooterToolbar/style/stylish.js +11 -9
- package/es/layout/components/GlobalFooter/index.js +25 -25
- package/es/layout/components/GlobalFooter/style.js +31 -30
- package/es/layout/components/GlobalHeader/ActionsContent.js +62 -78
- package/es/layout/components/GlobalHeader/index.js +59 -47
- package/es/layout/components/GlobalHeader/rightContentStyle.js +49 -49
- package/es/layout/components/GlobalHeader/style.js +58 -54
- package/es/layout/components/GridContent/index.js +24 -19
- package/es/layout/components/GridContent/style.js +14 -13
- package/es/layout/components/Header/index.js +63 -57
- package/es/layout/components/Header/style/header.js +49 -47
- package/es/layout/components/Header/style/stylish.js +15 -11
- package/es/layout/components/Help/AsyncContentPanel.js +13 -18
- package/es/layout/components/Help/HelpProvide.js +1 -1
- package/es/layout/components/Help/ProHelpContentPanel.js +64 -83
- package/es/layout/components/Help/ProHelpDrawer.js +25 -31
- package/es/layout/components/Help/ProHelpModal.d.ts +1 -1
- package/es/layout/components/Help/ProHelpModal.js +24 -27
- package/es/layout/components/Help/ProHelpPanel.js +86 -94
- package/es/layout/components/Help/ProHelpPopover.js +18 -16
- package/es/layout/components/Help/RenderContentPanel.js +34 -24
- package/es/layout/components/Help/Search.js +52 -78
- package/es/layout/components/Help/index.js +9 -11
- package/es/layout/components/Help/style.js +82 -75
- package/es/layout/components/PageContainer/index.js +168 -149
- package/es/layout/components/PageContainer/style/index.js +95 -78
- package/es/layout/components/PageContainer/style/stylish.js +11 -9
- package/es/layout/components/PageHeader/index.js +96 -97
- package/es/layout/components/PageHeader/style/index.js +142 -122
- package/es/layout/components/PageLoading/index.js +17 -20
- package/es/layout/components/SettingDrawer/BlockCheckbox.js +29 -32
- package/es/layout/components/SettingDrawer/LayoutChange.js +22 -22
- package/es/layout/components/SettingDrawer/RegionalChange.js +14 -15
- package/es/layout/components/SettingDrawer/ThemeColor.js +32 -35
- package/es/layout/components/SettingDrawer/index.js +137 -168
- package/es/layout/components/SettingDrawer/style/index.js +141 -137
- package/es/layout/components/SiderMenu/BaseMenu.js +235 -221
- package/es/layout/components/SiderMenu/SiderMenu.js +125 -115
- package/es/layout/components/SiderMenu/index.js +47 -42
- package/es/layout/components/SiderMenu/style/index.js +179 -161
- package/es/layout/components/SiderMenu/style/menu.js +148 -110
- package/es/layout/components/SiderMenu/style/stylish.js +15 -11
- package/es/layout/components/TopNavHeader/index.js +71 -60
- package/es/layout/components/TopNavHeader/style.js +64 -63
- package/es/layout/context/RouteContext.js +1 -1
- package/es/layout/defaultSettings.js +1 -1
- package/es/layout/getPageTitle.js +23 -24
- package/es/layout/locales/en-US.js +3 -2
- package/es/layout/locales/index.js +5 -5
- package/es/layout/locales/it-IT.js +3 -2
- package/es/layout/locales/ko-KR.js +3 -2
- package/es/layout/locales/zh-CN.js +3 -2
- package/es/layout/locales/zh-TW.js +3 -2
- package/es/layout/style/index.js +48 -42
- package/es/layout/utils/getBreadcrumbProps.js +60 -60
- package/es/layout/utils/getMenuData.js +7 -11
- package/es/layout/utils/pathTools.js +2 -6
- package/es/layout/utils/useCurrentMenuLayoutProps.js +4 -9
- package/es/layout/utils/utils.js +15 -17
- package/es/list/Item.js +157 -137
- package/es/list/ListView.js +106 -115
- package/es/list/constants.js +2 -2
- package/es/list/index.js +72 -70
- package/es/list/style/index.js +281 -213
- package/es/provider/index.js +122 -115
- package/es/provider/intl.js +53 -55
- package/es/provider/typing/layoutToken.js +26 -23
- package/es/provider/useStyle/index.js +51 -59
- package/es/provider/utils/merge.js +10 -12
- package/es/skeleton/components/Descriptions/index.js +211 -229
- package/es/skeleton/components/List/index.js +208 -223
- package/es/skeleton/components/Result/index.js +45 -47
- package/es/skeleton/index.js +13 -10
- package/es/table/Store/Provide.d.ts +4 -4
- package/es/table/Store/Provide.js +102 -117
- package/es/table/Table.d.ts +5 -2
- package/es/table/Table.js +526 -691
- package/es/table/TableSearch.d.ts +24 -0
- package/es/table/TableSearch.js +54 -0
- package/es/table/TableToolbar.d.ts +22 -0
- package/es/table/TableToolbar.js +47 -0
- package/es/table/components/Alert/index.js +41 -40
- package/es/table/components/Alert/style.js +28 -27
- package/es/table/components/ColumnSetting/index.js +228 -223
- package/es/table/components/ColumnSetting/style.js +86 -71
- package/es/table/components/DragSortTable/index.js +65 -79
- package/es/table/components/DragSortTable/style.js +20 -19
- package/es/table/components/Dropdown/index.js +42 -47
- package/es/table/components/EditableTable/CellEditorTable.js +24 -32
- package/es/table/components/EditableTable/RowEditorTable.js +23 -28
- package/es/table/components/EditableTable/index.js +295 -329
- package/es/table/components/Form/FormRender.js +99 -103
- package/es/table/components/Form/index.d.ts +4 -19
- package/es/table/components/Form/index.js +112 -159
- package/es/table/components/ListToolBar/HeaderMenu.js +44 -52
- package/es/table/components/ListToolBar/index.js +122 -147
- package/es/table/components/ListToolBar/style.js +127 -117
- package/es/table/components/ToolBar/DensityIcon.js +10 -9
- package/es/table/components/ToolBar/FullscreenIcon.js +5 -9
- package/es/table/components/ToolBar/index.d.ts +2 -8
- package/es/table/components/ToolBar/index.js +155 -195
- package/es/table/style/index.js +144 -112
- package/es/table/typing.d.ts +4 -0
- package/es/table/useFetchData.js +199 -338
- package/es/table/utils/cellRenderToFromItem.js +105 -119
- package/es/table/utils/columnRender.js +63 -54
- package/es/table/utils/columnSort.js +22 -22
- package/es/table/utils/genProColumnToColumn.d.ts +13 -9
- package/es/table/utils/genProColumnToColumn.js +121 -98
- package/es/table/utils/index.d.ts +10 -0
- package/es/table/utils/index.js +112 -178
- package/es/table/utils/useDragSort.d.ts +1 -1
- package/es/table/utils/useDragSort.js +99 -92
- package/es/table/utils/usePageInfo.d.ts +6 -0
- package/es/table/utils/usePageInfo.js +55 -0
- package/es/utils/components/DropdownFooter/index.js +23 -21
- package/es/utils/components/DropdownFooter/style.js +16 -15
- package/es/utils/components/ErrorBoundary/index.js +27 -50
- package/es/utils/components/FieldLabel/index.js +70 -70
- package/es/utils/components/FieldLabel/style.js +104 -81
- package/es/utils/components/FilterDropdown/index.d.ts +11 -0
- package/es/utils/components/FilterDropdown/index.js +43 -32
- package/es/utils/components/FilterDropdown/style.js +19 -16
- package/es/utils/components/InlineErrorFormItem/index.js +78 -78
- package/es/utils/components/InlineErrorFormItem/style.js +56 -49
- package/es/utils/components/LabelIconTip/index.js +30 -31
- package/es/utils/components/LabelIconTip/style.js +36 -35
- package/es/utils/components/ProFormContext/index.js +1 -1
- package/es/utils/conversionMomentValue/index.js +19 -22
- package/es/utils/dateArrayFormatter/index.js +9 -14
- package/es/utils/genCopyable/index.js +74 -32
- package/es/utils/getFieldPropsOrFormItemProps/index.js +1 -1
- package/es/utils/hooks/useDebounceFn/index.js +18 -51
- package/es/utils/hooks/useDebounceValue/index.js +7 -16
- package/es/utils/hooks/useDeepCompareEffect/index.js +6 -18
- package/es/utils/hooks/useDocumentTitle/index.js +2 -2
- package/es/utils/hooks/useFetchData/index.js +36 -65
- package/es/utils/hooks/useForceRender/index.js +2 -9
- package/es/utils/hooks/useLatest/index.js +2 -2
- package/es/utils/hooks/usePrevious/index.js +3 -3
- package/es/utils/hooks/useReactiveRef/index.js +2 -2
- package/es/utils/hooks/useRefCallback/index.js +3 -3
- package/es/utils/hooks/useRefFunction/index.js +4 -9
- package/es/utils/index.d.ts +1 -2
- package/es/utils/index.js +1 -2
- package/es/utils/isBrowser/index.js +2 -2
- package/es/utils/isDeepEqualReact/index.js +9 -44
- package/es/utils/isDropdownValueType/index.js +2 -2
- package/es/utils/isNil/index.js +1 -3
- package/es/utils/isUrl/index.js +2 -2
- package/es/utils/merge/index.js +10 -12
- package/es/utils/nanoid/index.js +5 -6
- package/es/utils/omitBoolean/index.js +1 -1
- package/es/utils/omitUndefined/index.js +3 -3
- package/es/utils/omitUndefinedAndEmptyArr/index.js +4 -5
- package/es/utils/parseValueToMoment/index.js +3 -7
- package/es/utils/pickProFormItemProps/index.js +3 -3
- package/es/utils/pickProProps/index.js +6 -7
- package/es/utils/proFieldParsingText/index.js +85 -98
- package/es/utils/runFunction/index.js +2 -5
- package/es/utils/stringify/index.js +1 -1
- package/es/utils/transformKeySubmitValue/index.js +99 -116
- package/es/utils/useEditableArray/index.d.ts +6 -1
- package/es/utils/useEditableArray/index.js +579 -735
- package/es/utils/useEditableMap/index.d.ts +1 -1
- package/es/utils/useEditableMap/index.js +89 -135
- package/es/utils/useMediaQuery/index.d.ts +2 -2
- package/es/utils/useMediaQuery/index.js +37 -34
- package/es/utils/useMediaQuery/query.js +7 -17
- package/es/version.js +1 -1
- package/guidelines/Guidelines.md +33 -0
- package/guidelines/components/drawer-form.md +90 -0
- package/guidelines/components/editable-pro-table.md +150 -0
- package/guidelines/components/modal-form.md +88 -0
- package/guidelines/components/pro-card.md +90 -0
- package/guidelines/components/pro-form.md +96 -0
- package/guidelines/components/pro-layout.md +84 -0
- package/guidelines/components/pro-table.md +142 -0
- package/guidelines/components/steps-form.md +105 -0
- package/guidelines/design-tokens/colors.md +58 -0
- package/guidelines/design-tokens/layout.md +53 -0
- package/guidelines/design-tokens/typography.md +49 -0
- package/guidelines/overview-components.md +55 -0
- package/guidelines/overview-icons.md +23 -0
- package/lib/card/ProCard.js +8 -10
- package/lib/card/components/Actions/index.js +25 -25
- package/lib/card/components/Actions/style.js +79 -72
- package/lib/card/components/Card/index.js +154 -139
- package/lib/card/components/Card/style.js +249 -193
- package/lib/card/components/CheckCard/Group.js +97 -115
- package/lib/card/components/CheckCard/index.js +85 -78
- package/lib/card/components/CheckCard/style.js +184 -169
- package/lib/card/components/Divider/index.js +20 -16
- package/lib/card/components/Divider/style.js +32 -30
- package/lib/card/components/Loading/index.js +19 -16
- package/lib/card/components/Loading/style.js +34 -32
- package/lib/card/components/Operation/index.js +16 -14
- package/lib/card/components/Operation/style.js +19 -19
- package/lib/card/components/Statistic/index.js +46 -42
- package/lib/card/components/Statistic/style.js +89 -71
- package/lib/card/components/StatisticCard/index.js +46 -41
- package/lib/card/components/StatisticCard/style.js +37 -36
- package/lib/card/index.js +4 -4
- package/lib/descriptions/index.js +219 -225
- package/lib/descriptions/useFetchData.js +51 -90
- package/lib/field/AllProField.js +267 -217
- package/lib/field/FieldHOC/index.js +9 -15
- package/lib/field/PureProField.js +84 -82
- package/lib/field/ValueTypeToComponent.js +517 -618
- package/lib/field/components/Cascader/index.d.ts +2 -2
- package/lib/field/components/Cascader/index.js +66 -85
- package/lib/field/components/Checkbox/index.d.ts +1 -1
- package/lib/field/components/Checkbox/index.js +75 -73
- package/lib/field/components/Code/index.js +40 -39
- package/lib/field/components/ColorPicker/index.js +38 -33
- package/lib/field/components/DatePicker/index.d.ts +1 -1
- package/lib/field/components/DatePicker/index.js +49 -53
- package/lib/field/components/Digit/index.js +41 -43
- package/lib/field/components/DigitRange/index.js +69 -76
- package/lib/field/components/FromNow/index.js +27 -25
- package/lib/field/components/Image/index.js +28 -24
- package/lib/field/components/IndexColumn/index.js +22 -17
- package/lib/field/components/Money/index.js +106 -116
- package/lib/field/components/Options/index.js +34 -34
- package/lib/field/components/Password/index.js +35 -38
- package/lib/field/components/Percent/index.js +40 -45
- package/lib/field/components/Percent/util.js +3 -6
- package/lib/field/components/Progress/index.js +29 -28
- package/lib/field/components/Radio/index.d.ts +1 -1
- package/lib/field/components/Radio/index.js +61 -63
- package/lib/field/components/RangePicker/index.d.ts +1 -1
- package/lib/field/components/RangePicker/index.js +52 -63
- package/lib/field/components/Rate/index.js +24 -21
- package/lib/field/components/Second/index.js +36 -33
- package/lib/field/components/Segmented/index.d.ts +1 -1
- package/lib/field/components/Segmented/index.js +37 -48
- package/lib/field/components/Select/LightSelect/index.d.ts +1 -1
- package/lib/field/components/Select/LightSelect/index.js +103 -110
- package/lib/field/components/Select/SearchSelect/index.js +133 -156
- package/lib/field/components/Select/index.d.ts +1 -1
- package/lib/field/components/Select/index.js +194 -218
- package/lib/field/components/Slider/index.js +25 -22
- package/lib/field/components/Status/index.js +69 -79
- package/lib/field/components/Switch/index.d.ts +1 -1
- package/lib/field/components/Switch/index.js +32 -31
- package/lib/field/components/Text/index.js +34 -38
- package/lib/field/components/TextArea/index.js +26 -21
- package/lib/field/components/TextArea/readonly.js +24 -22
- package/lib/field/components/TimePicker/index.js +96 -105
- package/lib/field/components/TreeSelect/index.d.ts +2 -2
- package/lib/field/components/TreeSelect/index.js +105 -124
- package/lib/field/index.js +34 -34
- package/lib/form/BaseForm/BaseForm.js +413 -499
- package/lib/form/BaseForm/EditOrReadOnlyContext.js +1 -1
- package/lib/form/BaseForm/LightWrapper/index.js +57 -66
- package/lib/form/BaseForm/LightWrapper/style.js +17 -14
- package/lib/form/BaseForm/Submitter/index.js +44 -44
- package/lib/form/BaseForm/index.js +3 -3
- package/lib/form/FieldContext.js +1 -1
- package/lib/form/components/Captcha/index.js +74 -135
- package/lib/form/components/Cascader/index.js +26 -29
- package/lib/form/components/Checkbox/index.js +60 -61
- package/lib/form/components/ColorPicker/index.js +24 -26
- package/lib/form/components/DatePicker/BaseDatePicker.js +32 -30
- package/lib/form/components/DatePicker/DatePicker.js +14 -13
- package/lib/form/components/DatePicker/DateTimePicker.js +11 -12
- package/lib/form/components/DatePicker/MonthPicker.js +14 -13
- package/lib/form/components/DatePicker/QuarterPicker.js +14 -13
- package/lib/form/components/DatePicker/TimePicker.js +26 -27
- package/lib/form/components/DatePicker/WeekPicker.js +14 -13
- package/lib/form/components/DatePicker/YearPicker.js +14 -13
- package/lib/form/components/DatePicker/index.js +1 -1
- package/lib/form/components/DateRangePicker/BaseDateRanger.js +34 -34
- package/lib/form/components/DateRangePicker/DateMonthRangePicker.js +15 -16
- package/lib/form/components/DateRangePicker/DateQuarterRangePicker.js +15 -16
- package/lib/form/components/DateRangePicker/DateTimeRangePicker.js +15 -16
- package/lib/form/components/DateRangePicker/DateWeekRangePicker.js +15 -16
- package/lib/form/components/DateRangePicker/DateYearRangePicker.js +15 -16
- package/lib/form/components/DateRangePicker/TimeRangePicker.js +26 -29
- package/lib/form/components/DateRangePicker/index.js +15 -16
- package/lib/form/components/Dependency/index.js +31 -35
- package/lib/form/components/Digit/DigitRange.js +23 -24
- package/lib/form/components/Digit/index.js +27 -29
- package/lib/form/components/Field/index.js +55 -63
- package/lib/form/components/FieldSet/index.js +68 -76
- package/lib/form/components/FormItem/FormItemRender/index.js +58 -48
- package/lib/form/components/FormItem/Group/index.js +95 -95
- package/lib/form/components/FormItem/Group/style.js +46 -41
- package/lib/form/components/FormItem/index.js +135 -141
- package/lib/form/components/FormItem/warpField.js +165 -149
- package/lib/form/components/List/ListContainer.js +100 -191
- package/lib/form/components/List/ListItem.js +153 -200
- package/lib/form/components/List/index.js +97 -107
- package/lib/form/components/List/style.js +71 -48
- package/lib/form/components/Money/index.js +28 -30
- package/lib/form/components/Radio/index.js +45 -49
- package/lib/form/components/Rate/index.js +17 -21
- package/lib/form/components/SchemaForm/index.js +54 -68
- package/lib/form/components/SchemaForm/layoutType/Embed.js +5 -6
- package/lib/form/components/SchemaForm/layoutType/StepsForm.js +22 -26
- package/lib/form/components/SchemaForm/layoutType/index.js +2 -2
- package/lib/form/components/SchemaForm/valueType/dependency.js +13 -12
- package/lib/form/components/SchemaForm/valueType/divider.js +6 -7
- package/lib/form/components/SchemaForm/valueType/field.js +47 -45
- package/lib/form/components/SchemaForm/valueType/formList.js +10 -9
- package/lib/form/components/SchemaForm/valueType/formSet.js +10 -8
- package/lib/form/components/SchemaForm/valueType/group.js +9 -10
- package/lib/form/components/SchemaForm/valueType/ignore.js +4 -3
- package/lib/form/components/SchemaForm/valueType/index.js +7 -6
- package/lib/form/components/Segmented/index.js +20 -24
- package/lib/form/components/Select/index.js +69 -73
- package/lib/form/components/Slider/index.js +33 -35
- package/lib/form/components/Switch/index.js +24 -26
- package/lib/form/components/Text/index.js +73 -84
- package/lib/form/components/TextArea/index.js +17 -21
- package/lib/form/components/TreeSelect/index.js +20 -23
- package/lib/form/components/UploadButton/index.js +56 -103
- package/lib/form/components/UploadDragger/index.js +37 -44
- package/lib/form/components/index.js +42 -42
- package/lib/form/helpers/grid.js +68 -69
- package/lib/form/helpers/index.js +1 -1
- package/lib/form/index.js +8 -8
- package/lib/form/layouts/DrawerForm/index.js +149 -241
- package/lib/form/layouts/DrawerForm/style.js +26 -26
- package/lib/form/layouts/LightFilter/index.d.ts +12 -1
- package/lib/form/layouts/LightFilter/index.js +158 -141
- package/lib/form/layouts/LightFilter/style.js +52 -49
- package/lib/form/layouts/LoginForm/index.js +44 -48
- package/lib/form/layouts/LoginForm/style.js +71 -68
- package/lib/form/layouts/LoginFormPage/index.js +45 -49
- package/lib/form/layouts/LoginFormPage/style.js +136 -127
- package/lib/form/layouts/ModalForm/index.js +118 -203
- package/lib/form/layouts/ProForm/index.d.ts +1 -1
- package/lib/form/layouts/ProForm/index.js +5 -5
- package/lib/form/layouts/QueryFilter/Actions.js +23 -22
- package/lib/form/layouts/QueryFilter/index.js +177 -202
- package/lib/form/layouts/QueryFilter/style.js +45 -38
- package/lib/form/layouts/StepsForm/StepForm.d.ts +2 -3
- package/lib/form/layouts/StepsForm/StepForm.js +50 -72
- package/lib/form/layouts/StepsForm/index.js +174 -216
- package/lib/form/layouts/StepsForm/style.js +30 -29
- package/lib/form/layouts/index.js +9 -9
- package/lib/index.js +11 -11
- package/lib/layout/ProLayout.js +281 -292
- package/lib/layout/WrapContent.js +18 -14
- package/lib/layout/assert/Logo.js +96 -97
- package/lib/layout/components/AppsLogoComponents/AppsLogo.js +11 -12
- package/lib/layout/components/AppsLogoComponents/DefaultContent.js +19 -17
- package/lib/layout/components/AppsLogoComponents/SimpleContent.js +22 -19
- package/lib/layout/components/AppsLogoComponents/index.js +36 -40
- package/lib/layout/components/AppsLogoComponents/style/default.js +4 -3
- package/lib/layout/components/AppsLogoComponents/style/index.js +52 -51
- package/lib/layout/components/AppsLogoComponents/style/simple.js +3 -2
- package/lib/layout/components/CollapsedIcon/index.js +20 -17
- package/lib/layout/components/CollapsedIcon/style.js +40 -41
- package/lib/layout/components/Footer.js +23 -22
- package/lib/layout/components/FooterToolbar/index.js +59 -53
- package/lib/layout/components/FooterToolbar/style/index.js +38 -38
- package/lib/layout/components/FooterToolbar/style/stylish.js +11 -10
- package/lib/layout/components/GlobalFooter/index.js +27 -27
- package/lib/layout/components/GlobalFooter/style.js +31 -31
- package/lib/layout/components/GlobalHeader/ActionsContent.js +65 -81
- package/lib/layout/components/GlobalHeader/index.js +61 -49
- package/lib/layout/components/GlobalHeader/rightContentStyle.js +49 -50
- package/lib/layout/components/GlobalHeader/style.js +58 -55
- package/lib/layout/components/GridContent/index.js +26 -21
- package/lib/layout/components/GridContent/style.js +14 -14
- package/lib/layout/components/Header/index.js +65 -59
- package/lib/layout/components/Header/style/header.js +49 -48
- package/lib/layout/components/Header/style/stylish.js +15 -12
- package/lib/layout/components/Help/AsyncContentPanel.js +15 -20
- package/lib/layout/components/Help/HelpProvide.js +1 -1
- package/lib/layout/components/Help/ProHelpContentPanel.js +66 -85
- package/lib/layout/components/Help/ProHelpDrawer.js +27 -32
- package/lib/layout/components/Help/ProHelpModal.d.ts +1 -1
- package/lib/layout/components/Help/ProHelpModal.js +26 -28
- package/lib/layout/components/Help/ProHelpPanel.js +86 -94
- package/lib/layout/components/Help/ProHelpPopover.js +20 -18
- package/lib/layout/components/Help/RenderContentPanel.js +36 -26
- package/lib/layout/components/Help/Search.js +55 -80
- package/lib/layout/components/Help/index.js +19 -20
- package/lib/layout/components/Help/style.js +82 -76
- package/lib/layout/components/PageContainer/index.js +172 -151
- package/lib/layout/components/PageContainer/style/index.js +95 -79
- package/lib/layout/components/PageContainer/style/stylish.js +11 -10
- package/lib/layout/components/PageHeader/index.js +99 -99
- package/lib/layout/components/PageHeader/style/index.js +142 -123
- package/lib/layout/components/PageLoading/index.js +18 -20
- package/lib/layout/components/SettingDrawer/BlockCheckbox.js +31 -34
- package/lib/layout/components/SettingDrawer/LayoutChange.js +25 -23
- package/lib/layout/components/SettingDrawer/RegionalChange.js +16 -16
- package/lib/layout/components/SettingDrawer/ThemeColor.js +34 -36
- package/lib/layout/components/SettingDrawer/index.js +138 -168
- package/lib/layout/components/SettingDrawer/style/index.js +141 -138
- package/lib/layout/components/SiderMenu/BaseMenu.js +235 -221
- package/lib/layout/components/SiderMenu/SiderMenu.js +128 -117
- package/lib/layout/components/SiderMenu/index.js +49 -44
- package/lib/layout/components/SiderMenu/style/index.js +179 -162
- package/lib/layout/components/SiderMenu/style/menu.js +148 -111
- package/lib/layout/components/SiderMenu/style/stylish.js +15 -12
- package/lib/layout/components/TopNavHeader/index.js +73 -62
- package/lib/layout/components/TopNavHeader/style.js +64 -64
- package/lib/layout/context/RouteContext.js +1 -1
- package/lib/layout/defaultSettings.js +1 -1
- package/lib/layout/getPageTitle.js +27 -26
- package/lib/layout/index.js +16 -16
- package/lib/layout/locales/en-US.js +3 -2
- package/lib/layout/locales/index.js +8 -6
- package/lib/layout/locales/it-IT.js +3 -2
- package/lib/layout/locales/ko-KR.js +3 -2
- package/lib/layout/locales/zh-CN.js +3 -2
- package/lib/layout/locales/zh-TW.js +3 -2
- package/lib/layout/style/index.js +48 -43
- package/lib/layout/utils/getBreadcrumbProps.js +65 -62
- package/lib/layout/utils/getMenuData.js +9 -13
- package/lib/layout/utils/pathTools.js +2 -6
- package/lib/layout/utils/useCurrentMenuLayoutProps.js +6 -11
- package/lib/layout/utils/utils.js +16 -18
- package/lib/list/Item.js +155 -136
- package/lib/list/ListView.js +110 -119
- package/lib/list/constants.js +2 -2
- package/lib/list/index.js +72 -70
- package/lib/list/style/index.js +281 -214
- package/lib/provider/index.js +128 -118
- package/lib/provider/intl.js +56 -56
- package/lib/provider/typing/layoutToken.js +28 -25
- package/lib/provider/useStyle/index.js +55 -60
- package/lib/provider/utils/merge.js +12 -14
- package/lib/skeleton/components/Descriptions/index.js +213 -229
- package/lib/skeleton/components/List/index.js +211 -221
- package/lib/skeleton/components/Result/index.js +45 -47
- package/lib/skeleton/index.js +23 -19
- package/lib/table/Store/Provide.d.ts +4 -4
- package/lib/table/Store/Provide.js +103 -117
- package/lib/table/Table.d.ts +5 -2
- package/lib/table/Table.js +524 -689
- package/lib/table/TableSearch.d.ts +24 -0
- package/lib/table/TableSearch.js +61 -0
- package/lib/table/TableToolbar.d.ts +22 -0
- package/lib/table/TableToolbar.js +55 -0
- package/lib/table/components/Alert/index.js +41 -40
- package/lib/table/components/Alert/style.js +28 -28
- package/lib/table/components/ColumnSetting/index.js +228 -224
- package/lib/table/components/ColumnSetting/style.js +86 -72
- package/lib/table/components/DragSortTable/index.js +64 -78
- package/lib/table/components/DragSortTable/style.js +20 -20
- package/lib/table/components/Dropdown/index.js +42 -48
- package/lib/table/components/EditableTable/CellEditorTable.js +24 -32
- package/lib/table/components/EditableTable/RowEditorTable.js +23 -28
- package/lib/table/components/EditableTable/index.js +293 -327
- package/lib/table/components/Form/FormRender.js +99 -104
- package/lib/table/components/Form/index.d.ts +4 -19
- package/lib/table/components/Form/index.js +113 -159
- package/lib/table/components/ListToolBar/HeaderMenu.js +42 -51
- package/lib/table/components/ListToolBar/index.js +123 -148
- package/lib/table/components/ListToolBar/style.js +127 -118
- package/lib/table/components/ToolBar/DensityIcon.js +10 -9
- package/lib/table/components/ToolBar/FullscreenIcon.js +5 -10
- package/lib/table/components/ToolBar/index.d.ts +2 -8
- package/lib/table/components/ToolBar/index.js +154 -194
- package/lib/table/index.js +27 -27
- package/lib/table/style/index.js +144 -113
- package/lib/table/typing.d.ts +4 -0
- package/lib/table/useFetchData.js +197 -337
- package/lib/table/utils/cellRenderToFromItem.js +106 -120
- package/lib/table/utils/columnRender.js +65 -54
- package/lib/table/utils/columnSort.js +24 -23
- package/lib/table/utils/genProColumnToColumn.d.ts +13 -9
- package/lib/table/utils/genProColumnToColumn.js +121 -99
- package/lib/table/utils/index.d.ts +10 -0
- package/lib/table/utils/index.js +127 -181
- package/lib/table/utils/useDragSort.d.ts +1 -1
- package/lib/table/utils/useDragSort.js +99 -93
- package/lib/table/utils/usePageInfo.d.ts +6 -0
- package/lib/table/utils/usePageInfo.js +61 -0
- package/lib/utils/components/DropdownFooter/index.js +25 -23
- package/lib/utils/components/DropdownFooter/style.js +16 -16
- package/lib/utils/components/ErrorBoundary/index.js +28 -50
- package/lib/utils/components/FieldLabel/index.js +70 -71
- package/lib/utils/components/FieldLabel/style.js +104 -82
- package/lib/utils/components/FilterDropdown/index.d.ts +11 -0
- package/lib/utils/components/FilterDropdown/index.js +44 -33
- package/lib/utils/components/FilterDropdown/style.js +19 -17
- package/lib/utils/components/InlineErrorFormItem/index.js +80 -80
- package/lib/utils/components/InlineErrorFormItem/style.js +56 -50
- package/lib/utils/components/LabelIconTip/index.js +30 -32
- package/lib/utils/components/LabelIconTip/style.js +36 -36
- package/lib/utils/components/ProFormContext/index.js +1 -1
- package/lib/utils/conversionMomentValue/index.js +22 -23
- package/lib/utils/dateArrayFormatter/index.js +11 -15
- package/lib/utils/genCopyable/index.js +75 -33
- package/lib/utils/getFieldPropsOrFormItemProps/index.js +3 -2
- package/lib/utils/hooks/useDebounceFn/index.js +18 -52
- package/lib/utils/hooks/useDebounceValue/index.js +7 -17
- package/lib/utils/hooks/useDeepCompareEffect/index.js +7 -19
- package/lib/utils/hooks/useDocumentTitle/index.js +2 -2
- package/lib/utils/hooks/useFetchData/index.js +36 -65
- package/lib/utils/hooks/useForceRender/index.js +2 -10
- package/lib/utils/hooks/useLatest/index.js +4 -3
- package/lib/utils/hooks/usePrevious/index.js +5 -4
- package/lib/utils/hooks/useReactiveRef/index.js +2 -2
- package/lib/utils/hooks/useRefCallback/index.js +3 -3
- package/lib/utils/hooks/useRefFunction/index.js +6 -11
- package/lib/utils/index.d.ts +1 -2
- package/lib/utils/index.js +57 -65
- package/lib/utils/isBrowser/index.js +4 -3
- package/lib/utils/isDeepEqualReact/index.js +9 -45
- package/lib/utils/isDropdownValueType/index.js +4 -3
- package/lib/utils/isNil/index.js +2 -3
- package/lib/utils/isUrl/index.js +4 -3
- package/lib/utils/merge/index.js +12 -14
- package/lib/utils/nanoid/index.js +7 -7
- package/lib/utils/omitBoolean/index.js +3 -2
- package/lib/utils/omitUndefined/index.js +5 -4
- package/lib/utils/omitUndefinedAndEmptyArr/index.js +6 -6
- package/lib/utils/parseValueToMoment/index.js +5 -8
- package/lib/utils/pickProFormItemProps/index.js +3 -3
- package/lib/utils/pickProProps/index.js +6 -7
- package/lib/utils/proFieldParsingText/index.js +89 -99
- package/lib/utils/runFunction/index.js +2 -5
- package/lib/utils/stringify/index.js +2 -2
- package/lib/utils/transformKeySubmitValue/index.js +101 -117
- package/lib/utils/useEditableArray/index.d.ts +6 -1
- package/lib/utils/useEditableArray/index.js +582 -735
- package/lib/utils/useEditableMap/index.d.ts +1 -1
- package/lib/utils/useEditableMap/index.js +88 -135
- package/lib/utils/useMediaQuery/index.js +40 -35
- package/lib/utils/useMediaQuery/query.js +7 -18
- package/lib/version.js +1 -1
- package/package.json +20 -31
- package/es/utils/useMountMergeState/index.d.ts +0 -2
- package/es/utils/useMountMergeState/index.js +0 -2
- package/lib/utils/useMountMergeState/index.d.ts +0 -2
- package/lib/utils/useMountMergeState/index.js +0 -12
|
@@ -8,8 +8,9 @@ var _react = require("react");
|
|
|
8
8
|
/**
|
|
9
9
|
* @see https://github.com/streamich/react-use/blob/master/docs/useLatest.md
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const useLatest = value => {
|
|
12
|
+
const ref = (0, _react.useRef)(value);
|
|
13
13
|
ref.current = value;
|
|
14
14
|
return ref;
|
|
15
|
-
};
|
|
15
|
+
};
|
|
16
|
+
exports.useLatest = useLatest;
|
|
@@ -5,10 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.usePrevious = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
(0, _react.useEffect)(
|
|
8
|
+
const usePrevious = state => {
|
|
9
|
+
const ref = (0, _react.useRef)();
|
|
10
|
+
(0, _react.useEffect)(() => {
|
|
11
11
|
ref.current = state;
|
|
12
12
|
});
|
|
13
13
|
return ref.current;
|
|
14
|
-
};
|
|
14
|
+
};
|
|
15
|
+
exports.usePrevious = usePrevious;
|
|
@@ -8,7 +8,7 @@ exports.useReactiveRef = useReactiveRef;
|
|
|
8
8
|
var _useForceRender = _interopRequireDefault(require("../useForceRender"));
|
|
9
9
|
var _useRefCallback = require("../useRefCallback");
|
|
10
10
|
function useReactiveRef(initialValue) {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const forceRender = (0, _useForceRender.default)();
|
|
12
|
+
const ref = (0, _useRefCallback.useRefCallback)(forceRender, initialValue);
|
|
13
13
|
return ref;
|
|
14
14
|
}
|
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useRefCallback = useRefCallback;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
function useRefCallback(callback, initialValue) {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
const ref = (0, _react.useMemo)(() => {
|
|
10
|
+
const defaultValue = {
|
|
11
11
|
current: initialValue
|
|
12
12
|
};
|
|
13
13
|
return new Proxy(defaultValue, {
|
|
14
|
-
set
|
|
14
|
+
set(target, prop, newValue) {
|
|
15
15
|
if (!Object.is(target[prop], newValue)) {
|
|
16
16
|
target[prop] = newValue;
|
|
17
17
|
callback(ref);
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.useRefFunction = void 0;
|
|
8
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
7
|
var _react = require("react");
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
const useRefFunction = reFunction => {
|
|
9
|
+
const ref = (0, _react.useRef)(null);
|
|
12
10
|
ref.current = reFunction;
|
|
13
|
-
return (0, _react.useCallback)(
|
|
14
|
-
|
|
15
|
-
for (var _len = arguments.length, rest = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
16
|
-
rest[_key] = arguments[_key];
|
|
17
|
-
}
|
|
18
|
-
return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.call.apply(_ref$current, [ref].concat((0, _toConsumableArray2.default)(rest)));
|
|
11
|
+
return (0, _react.useCallback)((...rest) => {
|
|
12
|
+
return ref.current?.(...rest);
|
|
19
13
|
}, []);
|
|
20
|
-
};
|
|
14
|
+
};
|
|
15
|
+
exports.useRefFunction = useRefFunction;
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -46,7 +46,6 @@ import { editableRowByKey, recordKeyToString, useEditableArray } from './useEdit
|
|
|
46
46
|
import type { UseEditableMapType, UseEditableMapUtilType } from './useEditableMap';
|
|
47
47
|
import { useEditableMap } from './useEditableMap';
|
|
48
48
|
import { useBreakpoint } from './useMediaQuery';
|
|
49
|
-
import { useMountMergeState } from './useMountMergeState';
|
|
50
49
|
export * from './typing';
|
|
51
|
-
export { conversionMomentValue, conversionMomentValue as conversionSubmitValue, convertMoment, dateArrayFormatter, dateFormatterMap, DropdownFooter, editableRowByKey, ErrorBoundary, FieldLabel, FilterDropdown, genCopyable, getFieldPropsOrFormItemProps, InlineErrorFormItem, isBrowser, isDeepEqualReact, isDropdownValueType, isImg, isNil, isUrl, LabelIconTip, lighten, merge, nanoid, objectToMap, omitBoolean, omitUndefined, omitUndefinedAndEmptyArr, operationUnit, parseValueToDay, pickProFormItemProps, pickProProps, proFieldParsingText, ProFormContext, recordKeyToString, resetComponent, runFunction, setAlpha, stringify, transformKeySubmitValue, useBreakpoint, useDebounceFn, useDebounceValue, useDeepCompareEffect, useDeepCompareEffectDebounce, useDeepCompareMemo, useDocumentTitle, useEditableArray, useEditableMap, useFetchData, useLatest,
|
|
50
|
+
export { conversionMomentValue, conversionMomentValue as conversionSubmitValue, convertMoment, dateArrayFormatter, dateFormatterMap, DropdownFooter, editableRowByKey, ErrorBoundary, FieldLabel, FilterDropdown, genCopyable, getFieldPropsOrFormItemProps, InlineErrorFormItem, isBrowser, isDeepEqualReact, isDropdownValueType, isImg, isNil, isUrl, LabelIconTip, lighten, merge, nanoid, objectToMap, omitBoolean, omitUndefined, omitUndefinedAndEmptyArr, operationUnit, parseValueToDay, pickProFormItemProps, pickProProps, proFieldParsingText, ProFormContext, recordKeyToString, resetComponent, runFunction, setAlpha, stringify, transformKeySubmitValue, useBreakpoint, useDebounceFn, useDebounceValue, useDeepCompareEffect, useDeepCompareEffectDebounce, useDeepCompareMemo, useDocumentTitle, useEditableArray, useEditableMap, useFetchData, useLatest, usePrevious, useReactiveRef, useRefCallback, useRefFunction, useStyle, };
|
|
52
51
|
export type { ProFormInstanceType, ProRequestData, RowEditableConfig, RowEditableType, UseEditableMapType, UseEditableMapUtilType, UseEditableType, UseEditableUtilType, };
|
package/lib/utils/index.js
CHANGED
|
@@ -59,342 +59,335 @@ var _exportNames = {
|
|
|
59
59
|
recordKeyToString: true,
|
|
60
60
|
useEditableArray: true,
|
|
61
61
|
useEditableMap: true,
|
|
62
|
-
useBreakpoint: true
|
|
63
|
-
useMountMergeState: true
|
|
62
|
+
useBreakpoint: true
|
|
64
63
|
};
|
|
65
64
|
Object.defineProperty(exports, "DropdownFooter", {
|
|
66
65
|
enumerable: true,
|
|
67
|
-
get: function
|
|
66
|
+
get: function () {
|
|
68
67
|
return _DropdownFooter.DropdownFooter;
|
|
69
68
|
}
|
|
70
69
|
});
|
|
71
70
|
Object.defineProperty(exports, "ErrorBoundary", {
|
|
72
71
|
enumerable: true,
|
|
73
|
-
get: function
|
|
72
|
+
get: function () {
|
|
74
73
|
return _ErrorBoundary.ErrorBoundary;
|
|
75
74
|
}
|
|
76
75
|
});
|
|
77
76
|
Object.defineProperty(exports, "FieldLabel", {
|
|
78
77
|
enumerable: true,
|
|
79
|
-
get: function
|
|
78
|
+
get: function () {
|
|
80
79
|
return _FieldLabel.FieldLabel;
|
|
81
80
|
}
|
|
82
81
|
});
|
|
83
82
|
Object.defineProperty(exports, "FilterDropdown", {
|
|
84
83
|
enumerable: true,
|
|
85
|
-
get: function
|
|
84
|
+
get: function () {
|
|
86
85
|
return _FilterDropdown.FilterDropdown;
|
|
87
86
|
}
|
|
88
87
|
});
|
|
89
88
|
Object.defineProperty(exports, "InlineErrorFormItem", {
|
|
90
89
|
enumerable: true,
|
|
91
|
-
get: function
|
|
90
|
+
get: function () {
|
|
92
91
|
return _InlineErrorFormItem.InlineErrorFormItem;
|
|
93
92
|
}
|
|
94
93
|
});
|
|
95
94
|
Object.defineProperty(exports, "LabelIconTip", {
|
|
96
95
|
enumerable: true,
|
|
97
|
-
get: function
|
|
96
|
+
get: function () {
|
|
98
97
|
return _LabelIconTip.LabelIconTip;
|
|
99
98
|
}
|
|
100
99
|
});
|
|
101
100
|
Object.defineProperty(exports, "ProFormContext", {
|
|
102
101
|
enumerable: true,
|
|
103
|
-
get: function
|
|
102
|
+
get: function () {
|
|
104
103
|
return _ProFormContext.ProFormContext;
|
|
105
104
|
}
|
|
106
105
|
});
|
|
107
106
|
Object.defineProperty(exports, "conversionMomentValue", {
|
|
108
107
|
enumerable: true,
|
|
109
|
-
get: function
|
|
108
|
+
get: function () {
|
|
110
109
|
return _conversionMomentValue.conversionMomentValue;
|
|
111
110
|
}
|
|
112
111
|
});
|
|
113
112
|
Object.defineProperty(exports, "conversionSubmitValue", {
|
|
114
113
|
enumerable: true,
|
|
115
|
-
get: function
|
|
114
|
+
get: function () {
|
|
116
115
|
return _conversionMomentValue.conversionMomentValue;
|
|
117
116
|
}
|
|
118
117
|
});
|
|
119
118
|
Object.defineProperty(exports, "convertMoment", {
|
|
120
119
|
enumerable: true,
|
|
121
|
-
get: function
|
|
120
|
+
get: function () {
|
|
122
121
|
return _conversionMomentValue.convertMoment;
|
|
123
122
|
}
|
|
124
123
|
});
|
|
125
124
|
Object.defineProperty(exports, "dateArrayFormatter", {
|
|
126
125
|
enumerable: true,
|
|
127
|
-
get: function
|
|
126
|
+
get: function () {
|
|
128
127
|
return _dateArrayFormatter.dateArrayFormatter;
|
|
129
128
|
}
|
|
130
129
|
});
|
|
131
130
|
Object.defineProperty(exports, "dateFormatterMap", {
|
|
132
131
|
enumerable: true,
|
|
133
|
-
get: function
|
|
132
|
+
get: function () {
|
|
134
133
|
return _conversionMomentValue.dateFormatterMap;
|
|
135
134
|
}
|
|
136
135
|
});
|
|
137
136
|
Object.defineProperty(exports, "editableRowByKey", {
|
|
138
137
|
enumerable: true,
|
|
139
|
-
get: function
|
|
138
|
+
get: function () {
|
|
140
139
|
return _useEditableArray.editableRowByKey;
|
|
141
140
|
}
|
|
142
141
|
});
|
|
143
142
|
Object.defineProperty(exports, "genCopyable", {
|
|
144
143
|
enumerable: true,
|
|
145
|
-
get: function
|
|
144
|
+
get: function () {
|
|
146
145
|
return _genCopyable.genCopyable;
|
|
147
146
|
}
|
|
148
147
|
});
|
|
149
148
|
Object.defineProperty(exports, "getFieldPropsOrFormItemProps", {
|
|
150
149
|
enumerable: true,
|
|
151
|
-
get: function
|
|
150
|
+
get: function () {
|
|
152
151
|
return _getFieldPropsOrFormItemProps.getFieldPropsOrFormItemProps;
|
|
153
152
|
}
|
|
154
153
|
});
|
|
155
154
|
Object.defineProperty(exports, "isBrowser", {
|
|
156
155
|
enumerable: true,
|
|
157
|
-
get: function
|
|
156
|
+
get: function () {
|
|
158
157
|
return _isBrowser.isBrowser;
|
|
159
158
|
}
|
|
160
159
|
});
|
|
161
160
|
Object.defineProperty(exports, "isDeepEqualReact", {
|
|
162
161
|
enumerable: true,
|
|
163
|
-
get: function
|
|
162
|
+
get: function () {
|
|
164
163
|
return _isDeepEqualReact.isDeepEqualReact;
|
|
165
164
|
}
|
|
166
165
|
});
|
|
167
166
|
Object.defineProperty(exports, "isDropdownValueType", {
|
|
168
167
|
enumerable: true,
|
|
169
|
-
get: function
|
|
168
|
+
get: function () {
|
|
170
169
|
return _isDropdownValueType.isDropdownValueType;
|
|
171
170
|
}
|
|
172
171
|
});
|
|
173
172
|
Object.defineProperty(exports, "isImg", {
|
|
174
173
|
enumerable: true,
|
|
175
|
-
get: function
|
|
174
|
+
get: function () {
|
|
176
175
|
return _isImg.isImg;
|
|
177
176
|
}
|
|
178
177
|
});
|
|
179
178
|
Object.defineProperty(exports, "isNil", {
|
|
180
179
|
enumerable: true,
|
|
181
|
-
get: function
|
|
180
|
+
get: function () {
|
|
182
181
|
return _isNil.isNil;
|
|
183
182
|
}
|
|
184
183
|
});
|
|
185
184
|
Object.defineProperty(exports, "isUrl", {
|
|
186
185
|
enumerable: true,
|
|
187
|
-
get: function
|
|
186
|
+
get: function () {
|
|
188
187
|
return _isUrl.isUrl;
|
|
189
188
|
}
|
|
190
189
|
});
|
|
191
190
|
Object.defineProperty(exports, "lighten", {
|
|
192
191
|
enumerable: true,
|
|
193
|
-
get: function
|
|
192
|
+
get: function () {
|
|
194
193
|
return _provider.lighten;
|
|
195
194
|
}
|
|
196
195
|
});
|
|
197
196
|
Object.defineProperty(exports, "merge", {
|
|
198
197
|
enumerable: true,
|
|
199
|
-
get: function
|
|
198
|
+
get: function () {
|
|
200
199
|
return _merge.merge;
|
|
201
200
|
}
|
|
202
201
|
});
|
|
203
202
|
Object.defineProperty(exports, "nanoid", {
|
|
204
203
|
enumerable: true,
|
|
205
|
-
get: function
|
|
204
|
+
get: function () {
|
|
206
205
|
return _nanoid.nanoid;
|
|
207
206
|
}
|
|
208
207
|
});
|
|
209
208
|
Object.defineProperty(exports, "objectToMap", {
|
|
210
209
|
enumerable: true,
|
|
211
|
-
get: function
|
|
210
|
+
get: function () {
|
|
212
211
|
return _proFieldParsingText.objectToMap;
|
|
213
212
|
}
|
|
214
213
|
});
|
|
215
214
|
Object.defineProperty(exports, "omitBoolean", {
|
|
216
215
|
enumerable: true,
|
|
217
|
-
get: function
|
|
216
|
+
get: function () {
|
|
218
217
|
return _omitBoolean.omitBoolean;
|
|
219
218
|
}
|
|
220
219
|
});
|
|
221
220
|
Object.defineProperty(exports, "omitUndefined", {
|
|
222
221
|
enumerable: true,
|
|
223
|
-
get: function
|
|
222
|
+
get: function () {
|
|
224
223
|
return _omitUndefined.omitUndefined;
|
|
225
224
|
}
|
|
226
225
|
});
|
|
227
226
|
Object.defineProperty(exports, "omitUndefinedAndEmptyArr", {
|
|
228
227
|
enumerable: true,
|
|
229
|
-
get: function
|
|
228
|
+
get: function () {
|
|
230
229
|
return _omitUndefinedAndEmptyArr.omitUndefinedAndEmptyArr;
|
|
231
230
|
}
|
|
232
231
|
});
|
|
233
232
|
Object.defineProperty(exports, "operationUnit", {
|
|
234
233
|
enumerable: true,
|
|
235
|
-
get: function
|
|
234
|
+
get: function () {
|
|
236
235
|
return _provider.operationUnit;
|
|
237
236
|
}
|
|
238
237
|
});
|
|
239
238
|
Object.defineProperty(exports, "parseValueToDay", {
|
|
240
239
|
enumerable: true,
|
|
241
|
-
get: function
|
|
240
|
+
get: function () {
|
|
242
241
|
return _parseValueToMoment.parseValueToDay;
|
|
243
242
|
}
|
|
244
243
|
});
|
|
245
244
|
Object.defineProperty(exports, "pickProFormItemProps", {
|
|
246
245
|
enumerable: true,
|
|
247
|
-
get: function
|
|
246
|
+
get: function () {
|
|
248
247
|
return _pickProFormItemProps.pickProFormItemProps;
|
|
249
248
|
}
|
|
250
249
|
});
|
|
251
250
|
Object.defineProperty(exports, "pickProProps", {
|
|
252
251
|
enumerable: true,
|
|
253
|
-
get: function
|
|
252
|
+
get: function () {
|
|
254
253
|
return _pickProProps.pickProProps;
|
|
255
254
|
}
|
|
256
255
|
});
|
|
257
256
|
Object.defineProperty(exports, "proFieldParsingText", {
|
|
258
257
|
enumerable: true,
|
|
259
|
-
get: function
|
|
258
|
+
get: function () {
|
|
260
259
|
return _proFieldParsingText.proFieldParsingText;
|
|
261
260
|
}
|
|
262
261
|
});
|
|
263
262
|
Object.defineProperty(exports, "recordKeyToString", {
|
|
264
263
|
enumerable: true,
|
|
265
|
-
get: function
|
|
264
|
+
get: function () {
|
|
266
265
|
return _useEditableArray.recordKeyToString;
|
|
267
266
|
}
|
|
268
267
|
});
|
|
269
268
|
Object.defineProperty(exports, "resetComponent", {
|
|
270
269
|
enumerable: true,
|
|
271
|
-
get: function
|
|
270
|
+
get: function () {
|
|
272
271
|
return _provider.resetComponent;
|
|
273
272
|
}
|
|
274
273
|
});
|
|
275
274
|
Object.defineProperty(exports, "runFunction", {
|
|
276
275
|
enumerable: true,
|
|
277
|
-
get: function
|
|
276
|
+
get: function () {
|
|
278
277
|
return _runFunction.runFunction;
|
|
279
278
|
}
|
|
280
279
|
});
|
|
281
280
|
Object.defineProperty(exports, "setAlpha", {
|
|
282
281
|
enumerable: true,
|
|
283
|
-
get: function
|
|
282
|
+
get: function () {
|
|
284
283
|
return _provider.setAlpha;
|
|
285
284
|
}
|
|
286
285
|
});
|
|
287
286
|
Object.defineProperty(exports, "stringify", {
|
|
288
287
|
enumerable: true,
|
|
289
|
-
get: function
|
|
288
|
+
get: function () {
|
|
290
289
|
return _stringify.default;
|
|
291
290
|
}
|
|
292
291
|
});
|
|
293
292
|
Object.defineProperty(exports, "transformKeySubmitValue", {
|
|
294
293
|
enumerable: true,
|
|
295
|
-
get: function
|
|
294
|
+
get: function () {
|
|
296
295
|
return _transformKeySubmitValue.transformKeySubmitValue;
|
|
297
296
|
}
|
|
298
297
|
});
|
|
299
298
|
Object.defineProperty(exports, "useBreakpoint", {
|
|
300
299
|
enumerable: true,
|
|
301
|
-
get: function
|
|
300
|
+
get: function () {
|
|
302
301
|
return _useMediaQuery.useBreakpoint;
|
|
303
302
|
}
|
|
304
303
|
});
|
|
305
304
|
Object.defineProperty(exports, "useDebounceFn", {
|
|
306
305
|
enumerable: true,
|
|
307
|
-
get: function
|
|
306
|
+
get: function () {
|
|
308
307
|
return _useDebounceFn.useDebounceFn;
|
|
309
308
|
}
|
|
310
309
|
});
|
|
311
310
|
Object.defineProperty(exports, "useDebounceValue", {
|
|
312
311
|
enumerable: true,
|
|
313
|
-
get: function
|
|
312
|
+
get: function () {
|
|
314
313
|
return _useDebounceValue.useDebounceValue;
|
|
315
314
|
}
|
|
316
315
|
});
|
|
317
316
|
Object.defineProperty(exports, "useDeepCompareEffect", {
|
|
318
317
|
enumerable: true,
|
|
319
|
-
get: function
|
|
318
|
+
get: function () {
|
|
320
319
|
return _useDeepCompareEffect.useDeepCompareEffect;
|
|
321
320
|
}
|
|
322
321
|
});
|
|
323
322
|
Object.defineProperty(exports, "useDeepCompareEffectDebounce", {
|
|
324
323
|
enumerable: true,
|
|
325
|
-
get: function
|
|
324
|
+
get: function () {
|
|
326
325
|
return _useDeepCompareEffect.useDeepCompareEffectDebounce;
|
|
327
326
|
}
|
|
328
327
|
});
|
|
329
328
|
Object.defineProperty(exports, "useDeepCompareMemo", {
|
|
330
329
|
enumerable: true,
|
|
331
|
-
get: function
|
|
330
|
+
get: function () {
|
|
332
331
|
return _useDeepCompareMemo.default;
|
|
333
332
|
}
|
|
334
333
|
});
|
|
335
334
|
Object.defineProperty(exports, "useDocumentTitle", {
|
|
336
335
|
enumerable: true,
|
|
337
|
-
get: function
|
|
336
|
+
get: function () {
|
|
338
337
|
return _useDocumentTitle.useDocumentTitle;
|
|
339
338
|
}
|
|
340
339
|
});
|
|
341
340
|
Object.defineProperty(exports, "useEditableArray", {
|
|
342
341
|
enumerable: true,
|
|
343
|
-
get: function
|
|
342
|
+
get: function () {
|
|
344
343
|
return _useEditableArray.useEditableArray;
|
|
345
344
|
}
|
|
346
345
|
});
|
|
347
346
|
Object.defineProperty(exports, "useEditableMap", {
|
|
348
347
|
enumerable: true,
|
|
349
|
-
get: function
|
|
348
|
+
get: function () {
|
|
350
349
|
return _useEditableMap.useEditableMap;
|
|
351
350
|
}
|
|
352
351
|
});
|
|
353
352
|
Object.defineProperty(exports, "useFetchData", {
|
|
354
353
|
enumerable: true,
|
|
355
|
-
get: function
|
|
354
|
+
get: function () {
|
|
356
355
|
return _useFetchData.useFetchData;
|
|
357
356
|
}
|
|
358
357
|
});
|
|
359
358
|
Object.defineProperty(exports, "useLatest", {
|
|
360
359
|
enumerable: true,
|
|
361
|
-
get: function
|
|
360
|
+
get: function () {
|
|
362
361
|
return _useLatest.useLatest;
|
|
363
362
|
}
|
|
364
363
|
});
|
|
365
|
-
Object.defineProperty(exports, "useMountMergeState", {
|
|
366
|
-
enumerable: true,
|
|
367
|
-
get: function get() {
|
|
368
|
-
return _useMountMergeState.useMountMergeState;
|
|
369
|
-
}
|
|
370
|
-
});
|
|
371
364
|
Object.defineProperty(exports, "usePrevious", {
|
|
372
365
|
enumerable: true,
|
|
373
|
-
get: function
|
|
366
|
+
get: function () {
|
|
374
367
|
return _usePrevious.usePrevious;
|
|
375
368
|
}
|
|
376
369
|
});
|
|
377
370
|
Object.defineProperty(exports, "useReactiveRef", {
|
|
378
371
|
enumerable: true,
|
|
379
|
-
get: function
|
|
372
|
+
get: function () {
|
|
380
373
|
return _useReactiveRef.useReactiveRef;
|
|
381
374
|
}
|
|
382
375
|
});
|
|
383
376
|
Object.defineProperty(exports, "useRefCallback", {
|
|
384
377
|
enumerable: true,
|
|
385
|
-
get: function
|
|
378
|
+
get: function () {
|
|
386
379
|
return _useRefCallback.useRefCallback;
|
|
387
380
|
}
|
|
388
381
|
});
|
|
389
382
|
Object.defineProperty(exports, "useRefFunction", {
|
|
390
383
|
enumerable: true,
|
|
391
|
-
get: function
|
|
384
|
+
get: function () {
|
|
392
385
|
return _useRefFunction.useRefFunction;
|
|
393
386
|
}
|
|
394
387
|
});
|
|
395
388
|
Object.defineProperty(exports, "useStyle", {
|
|
396
389
|
enumerable: true,
|
|
397
|
-
get: function
|
|
390
|
+
get: function () {
|
|
398
391
|
return _provider.useStyle;
|
|
399
392
|
}
|
|
400
393
|
});
|
|
@@ -442,7 +435,6 @@ var _transformKeySubmitValue = require("./transformKeySubmitValue");
|
|
|
442
435
|
var _useEditableArray = require("./useEditableArray");
|
|
443
436
|
var _useEditableMap = require("./useEditableMap");
|
|
444
437
|
var _useMediaQuery = require("./useMediaQuery");
|
|
445
|
-
var _useMountMergeState = require("./useMountMergeState");
|
|
446
438
|
var _typing = require("./typing");
|
|
447
439
|
Object.keys(_typing).forEach(function (key) {
|
|
448
440
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -450,7 +442,7 @@ Object.keys(_typing).forEach(function (key) {
|
|
|
450
442
|
if (key in exports && exports[key] === _typing[key]) return;
|
|
451
443
|
Object.defineProperty(exports, key, {
|
|
452
444
|
enumerable: true,
|
|
453
|
-
get: function
|
|
445
|
+
get: function () {
|
|
454
446
|
return _typing[key];
|
|
455
447
|
}
|
|
456
448
|
});
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isBrowser = void 0;
|
|
7
|
-
|
|
7
|
+
const isNode = typeof process !== 'undefined' && process.versions != null && process.versions.node != null;
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* 用于判断当前是否在浏览器环境中。
|
|
@@ -14,9 +14,10 @@ var isNode = typeof process !== 'undefined' && process.versions != null && proce
|
|
|
14
14
|
* 如果都符合,则返回 true 表示当前处于浏览器环境中。
|
|
15
15
|
* @returns boolean
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
const isBrowser = () => {
|
|
18
18
|
if (typeof process !== 'undefined' && process.env.NODE_ENV === 'TEST') {
|
|
19
19
|
return true;
|
|
20
20
|
}
|
|
21
21
|
return typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.matchMedia !== 'undefined' && !isNode;
|
|
22
|
-
};
|
|
22
|
+
};
|
|
23
|
+
exports.isBrowser = isBrowser;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.isDeepEqualReact = isDeepEqualReact;
|
|
8
|
-
var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
|
|
9
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
10
7
|
/* eslint-disable no-restricted-syntax */
|
|
11
8
|
/* eslint-disable no-continue */
|
|
12
9
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
@@ -17,11 +14,11 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
|
17
14
|
|
|
18
15
|
function isDeepEqualReact(a, b, ignoreKeys) {
|
|
19
16
|
if (a === b) return true;
|
|
20
|
-
if (a && b &&
|
|
17
|
+
if (a && b && typeof a === 'object' && typeof b === 'object') {
|
|
21
18
|
if (a.constructor !== b.constructor) return false;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
let length;
|
|
20
|
+
let i;
|
|
21
|
+
let keys;
|
|
25
22
|
if (Array.isArray(a)) {
|
|
26
23
|
length = a.length;
|
|
27
24
|
if (length != b.length) return false;
|
|
@@ -30,46 +27,13 @@ function isDeepEqualReact(a, b, ignoreKeys) {
|
|
|
30
27
|
}
|
|
31
28
|
if (a instanceof Map && b instanceof Map) {
|
|
32
29
|
if (a.size !== b.size) return false;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
try {
|
|
36
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
37
|
-
i = _step.value;
|
|
38
|
-
if (!b.has(i[0])) return false;
|
|
39
|
-
}
|
|
40
|
-
} catch (err) {
|
|
41
|
-
_iterator.e(err);
|
|
42
|
-
} finally {
|
|
43
|
-
_iterator.f();
|
|
44
|
-
}
|
|
45
|
-
var _iterator2 = (0, _createForOfIteratorHelper2.default)(a.entries()),
|
|
46
|
-
_step2;
|
|
47
|
-
try {
|
|
48
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
49
|
-
i = _step2.value;
|
|
50
|
-
if (!isDeepEqualReact(i[1], b.get(i[0]), ignoreKeys)) return false;
|
|
51
|
-
}
|
|
52
|
-
} catch (err) {
|
|
53
|
-
_iterator2.e(err);
|
|
54
|
-
} finally {
|
|
55
|
-
_iterator2.f();
|
|
56
|
-
}
|
|
30
|
+
for (i of a.entries()) if (!b.has(i[0])) return false;
|
|
31
|
+
for (i of a.entries()) if (!isDeepEqualReact(i[1], b.get(i[0]), ignoreKeys)) return false;
|
|
57
32
|
return true;
|
|
58
33
|
}
|
|
59
34
|
if (a instanceof Set && b instanceof Set) {
|
|
60
35
|
if (a.size !== b.size) return false;
|
|
61
|
-
|
|
62
|
-
_step3;
|
|
63
|
-
try {
|
|
64
|
-
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
65
|
-
i = _step3.value;
|
|
66
|
-
if (!b.has(i[0])) return false;
|
|
67
|
-
}
|
|
68
|
-
} catch (err) {
|
|
69
|
-
_iterator3.e(err);
|
|
70
|
-
} finally {
|
|
71
|
-
_iterator3.f();
|
|
72
|
-
}
|
|
36
|
+
for (i of a.entries()) if (!b.has(i[0])) return false;
|
|
73
37
|
return true;
|
|
74
38
|
}
|
|
75
39
|
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
@@ -91,8 +55,8 @@ function isDeepEqualReact(a, b, ignoreKeys) {
|
|
|
91
55
|
if (length !== Object.keys(b).length) return false;
|
|
92
56
|
for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
93
57
|
for (i = length; i-- !== 0;) {
|
|
94
|
-
|
|
95
|
-
if (ignoreKeys
|
|
58
|
+
const key = keys[i];
|
|
59
|
+
if (ignoreKeys?.includes(key)) continue;
|
|
96
60
|
if (key === '_owner' && a.$$typeof) {
|
|
97
61
|
// React-specific: avoid traversing React elements' _owner.
|
|
98
62
|
// _owner contains circular references
|
|
@@ -4,10 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isDropdownValueType = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const isDropdownValueType = valueType => {
|
|
8
|
+
let isDropdown = false;
|
|
9
9
|
if (typeof valueType === 'string' && valueType.startsWith('date') && !valueType.endsWith('Range') || valueType === 'select' || valueType === 'time') {
|
|
10
10
|
isDropdown = true;
|
|
11
11
|
}
|
|
12
12
|
return isDropdown;
|
|
13
|
-
};
|
|
13
|
+
};
|
|
14
|
+
exports.isDropdownValueType = isDropdownValueType;
|
package/lib/utils/isNil/index.js
CHANGED
|
@@ -4,6 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isNil = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
7
|
+
const isNil = value => value === null || value === undefined;
|
|
8
|
+
exports.isNil = isNil;
|
package/lib/utils/isUrl/index.js
CHANGED
|
@@ -9,15 +9,16 @@ exports.isUrl = void 0;
|
|
|
9
9
|
* @param {string|undefined} path
|
|
10
10
|
* @returns boolean
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
const isUrl = path => {
|
|
13
13
|
if (!path) return false;
|
|
14
14
|
if (!path.startsWith('http')) {
|
|
15
15
|
return false;
|
|
16
16
|
}
|
|
17
17
|
try {
|
|
18
|
-
|
|
18
|
+
const url = new URL(path);
|
|
19
19
|
return !!url;
|
|
20
20
|
} catch (error) {
|
|
21
21
|
return false;
|
|
22
22
|
}
|
|
23
|
-
};
|
|
23
|
+
};
|
|
24
|
+
exports.isUrl = isUrl;
|