ods-component-lib 1.21.2 → 1.21.3
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/dist/components/antd/currencyInput/CurrencySelect.js +16 -11
- package/dist/components/antd/currencyInput/CurrencySelect.js.map +1 -1
- package/dist/components/devextreme/OdsBasicDataGrid/OdsBasicDataGrid.js +32 -43
- package/dist/components/devextreme/OdsBasicDataGrid/OdsBasicDataGrid.js.map +1 -1
- package/dist/components/devextreme/OdsDataGrid.Legacy.js +4 -4
- package/dist/components/devextreme/OdsRemoteDataGrid.js +1 -1
- package/dist/index.js +10 -10
- package/dist/node_modules/@ant-design/cssinjs/es/StyleContext.js +6 -6
- package/dist/node_modules/@ant-design/cssinjs/es/StyleContext.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js +20 -20
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useGlobalCache.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js +101 -98
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/linters/utils.js +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/util/index.js +29 -27
- package/dist/node_modules/@ant-design/cssinjs/es/util/index.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs-utils/es/util/getComponentToken.js +1 -1
- package/dist/node_modules/@ant-design/fast-color/es/FastColor.js +66 -45
- package/dist/node_modules/@ant-design/fast-color/es/FastColor.js.map +1 -1
- package/dist/node_modules/@ant-design/icons/es/icons/FrownOutlined.js +5 -8
- package/dist/node_modules/@ant-design/icons/es/icons/HeartOutlined.js +3 -6
- package/dist/node_modules/@ant-design/icons/es/icons/MehOutlined.js +12 -15
- package/dist/node_modules/@ant-design/icons/es/icons/SmileOutlined.js +8 -11
- package/dist/node_modules/@ant-design/icons/es/utils.js +2 -9
- package/dist/node_modules/@ant-design/icons/es/utils.js.map +1 -1
- package/dist/node_modules/@emotion/stylis/dist/stylis.browser.esm.js +1 -9
- package/dist/node_modules/@emotion/stylis/dist/stylis.browser.esm.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/index.js +20 -20
- package/dist/node_modules/@rc-component/async-validator/es/index.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/messages.js +1 -0
- package/dist/node_modules/@rc-component/async-validator/es/messages.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/rule/type.js +18 -8
- package/dist/node_modules/@rc-component/async-validator/es/rule/type.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/util.js +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/util.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/validator/index.js +1 -0
- package/dist/node_modules/@rc-component/async-validator/es/validator/index.js.map +1 -1
- package/dist/node_modules/@rc-component/collapse/es/Collapse.js +1 -1
- package/dist/node_modules/@rc-component/collapse/es/hooks/useItems.js +88 -68
- package/dist/node_modules/@rc-component/collapse/es/hooks/useItems.js.map +1 -1
- package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/Panel.js +75 -96
- package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/Panel.js.map +1 -1
- package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/index.js +22 -20
- package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/index.js.map +1 -1
- package/dist/node_modules/@rc-component/dialog/es/Dialog/index.js +92 -100
- package/dist/node_modules/@rc-component/dialog/es/Dialog/index.js.map +1 -1
- package/dist/node_modules/@rc-component/dialog/es/DialogWrap.js +40 -29
- package/dist/node_modules/@rc-component/dialog/es/DialogWrap.js.map +1 -1
- package/dist/node_modules/@rc-component/dropdown/es/Dropdown.js +2 -2
- package/dist/node_modules/@rc-component/form/es/Field.js +9 -9
- package/dist/node_modules/@rc-component/form/es/FieldContext.js +2 -3
- package/dist/node_modules/@rc-component/form/es/FieldContext.js.map +1 -1
- package/dist/node_modules/@rc-component/form/es/Form.js +78 -92
- package/dist/node_modules/@rc-component/form/es/Form.js.map +1 -1
- package/dist/node_modules/@rc-component/form/es/List.js +1 -1
- package/dist/node_modules/@rc-component/form/es/{useForm.js → hooks/useForm.js} +136 -143
- package/dist/node_modules/@rc-component/form/es/hooks/useForm.js.map +1 -0
- package/dist/node_modules/@rc-component/form/es/hooks/useNotifyWatch.js +43 -0
- package/dist/node_modules/@rc-component/form/es/hooks/useNotifyWatch.js.map +1 -0
- package/dist/node_modules/@rc-component/form/es/{useWatch.js → hooks/useWatch.js} +7 -7
- package/dist/node_modules/@rc-component/form/es/hooks/useWatch.js.map +1 -0
- package/dist/node_modules/@rc-component/form/es/index.js +2 -2
- package/dist/node_modules/@rc-component/form/es/index.js.map +1 -1
- package/dist/node_modules/@rc-component/form/es/utils/NameMap.js +28 -22
- package/dist/node_modules/@rc-component/form/es/utils/NameMap.js.map +1 -1
- package/dist/node_modules/@rc-component/form/es/utils/messages.js +1 -0
- package/dist/node_modules/@rc-component/form/es/utils/messages.js.map +1 -1
- package/dist/node_modules/@rc-component/form/es/utils/validateUtil.js +1 -1
- package/dist/node_modules/@rc-component/form/es/utils/valueUtil.js.map +1 -1
- package/dist/node_modules/@rc-component/image/es/Preview/index.js +111 -105
- package/dist/node_modules/@rc-component/image/es/Preview/index.js.map +1 -1
- package/dist/node_modules/@rc-component/input-number/es/hooks/useCursor.js +1 -1
- package/dist/node_modules/@rc-component/menu/es/Menu.js +1 -1
- package/dist/node_modules/@rc-component/menu/es/MenuItem.js +1 -1
- package/dist/node_modules/@rc-component/menu/es/SubMenu/index.js +1 -1
- package/dist/node_modules/@rc-component/menu/es/hooks/useKeyRecords.js +1 -1
- package/dist/node_modules/@rc-component/menu/es/placements.js +0 -1
- package/dist/node_modules/@rc-component/menu/es/utils/warnUtil.js +1 -1
- package/dist/node_modules/@rc-component/pagination/es/Pagination.js +1 -1
- package/dist/node_modules/@rc-component/picker/es/PickerInput/RangePicker.js +1 -1
- package/dist/node_modules/@rc-component/picker/es/PickerInput/Selector/hooks/useClearIcon.js +1 -1
- package/dist/node_modules/@rc-component/picker/es/PickerInput/Selector/hooks/useInputProps.js +1 -1
- package/dist/node_modules/@rc-component/picker/es/PickerInput/hooks/useCellRender.js +1 -1
- package/dist/node_modules/@rc-component/picker/es/PickerInput/hooks/useFilledProps.js +1 -1
- package/dist/node_modules/@rc-component/picker/es/PickerInput/hooks/usePresets.js +1 -1
- package/dist/node_modules/@rc-component/picker/es/PickerPanel/index.js +1 -1
- package/dist/node_modules/@rc-component/picker/es/hooks/useTimeInfo.js +1 -1
- package/dist/node_modules/@rc-component/portal/es/Portal.js +41 -35
- package/dist/node_modules/@rc-component/portal/es/Portal.js.map +1 -1
- package/dist/node_modules/@rc-component/portal/es/useEscKeyDown.js +48 -0
- package/dist/node_modules/@rc-component/portal/es/useEscKeyDown.js.map +1 -0
- package/dist/node_modules/@rc-component/resize-observer/es/SingleObserver/index.js +18 -54
- package/dist/node_modules/@rc-component/resize-observer/es/SingleObserver/index.js.map +1 -1
- package/dist/node_modules/@rc-component/resize-observer/es/index.js.map +1 -1
- package/dist/node_modules/@rc-component/resize-observer/es/useResizeObserver.js +50 -0
- package/dist/node_modules/@rc-component/resize-observer/es/useResizeObserver.js.map +1 -0
- package/dist/node_modules/@rc-component/select/es/BaseSelect/index.js +141 -140
- package/dist/node_modules/@rc-component/select/es/BaseSelect/index.js.map +1 -1
- package/dist/node_modules/@rc-component/select/es/OptionList.js +92 -91
- package/dist/node_modules/@rc-component/select/es/OptionList.js.map +1 -1
- package/dist/node_modules/@rc-component/select/es/Select.js +5 -5
- package/dist/node_modules/@rc-component/select/es/SelectInput/Content/MultipleContent.js +50 -50
- package/dist/node_modules/@rc-component/select/es/SelectInput/Content/MultipleContent.js.map +1 -1
- package/dist/node_modules/@rc-component/select/es/SelectInput/Content/SingleContent.js +41 -47
- package/dist/node_modules/@rc-component/select/es/SelectInput/Content/SingleContent.js.map +1 -1
- package/dist/node_modules/@rc-component/select/es/SelectInput/index.js +85 -80
- package/dist/node_modules/@rc-component/select/es/SelectInput/index.js.map +1 -1
- package/dist/node_modules/@rc-component/select/es/hooks/useOpen.js +27 -26
- package/dist/node_modules/@rc-component/select/es/hooks/useOpen.js.map +1 -1
- package/dist/node_modules/@rc-component/select/es/utils/valueUtil.js +1 -1
- package/dist/node_modules/@rc-component/select/es/utils/warningPropsUtil.js +6 -6
- package/dist/node_modules/@rc-component/table/es/Cell/useCellRender.js +1 -1
- package/dist/node_modules/@rc-component/table/es/Table.js +1 -1
- package/dist/node_modules/@rc-component/table/es/VirtualTable/BodyGrid.js +85 -80
- package/dist/node_modules/@rc-component/table/es/VirtualTable/BodyGrid.js.map +1 -1
- package/dist/node_modules/@rc-component/table/es/VirtualTable/index.js +1 -1
- package/dist/node_modules/@rc-component/table/es/hooks/useColumns/index.js +1 -1
- package/dist/node_modules/@rc-component/table/es/hooks/useExpand.js +1 -1
- package/dist/node_modules/@rc-component/table/es/utils/legacyUtil.js +1 -1
- package/dist/node_modules/@rc-component/tabs/es/hooks/useAnimateConfig.js +1 -1
- package/dist/node_modules/@rc-component/tooltip/es/placements.js +0 -1
- package/dist/node_modules/@rc-component/tree/es/Tree.js +1 -1
- package/dist/node_modules/@rc-component/tree/es/util.js +1 -1
- package/dist/node_modules/@rc-component/tree/es/utils/conductUtil.js +1 -1
- package/dist/node_modules/@rc-component/tree/es/utils/treeUtil.js +1 -1
- package/dist/node_modules/@rc-component/tree-select/es/TreeSelect.js +1 -1
- package/dist/node_modules/@rc-component/tree-select/es/hooks/useDataEntities.js +1 -1
- package/dist/node_modules/@rc-component/tree-select/es/utils/legacyUtil.js +1 -1
- package/dist/node_modules/@rc-component/tree-select/es/utils/warningPropsUtil.js +1 -1
- package/dist/node_modules/@rc-component/trigger/es/Popup/index.js +74 -72
- package/dist/node_modules/@rc-component/trigger/es/Popup/index.js.map +1 -1
- package/dist/node_modules/@rc-component/trigger/es/UniqueProvider/index.js +10 -9
- package/dist/node_modules/@rc-component/trigger/es/UniqueProvider/index.js.map +1 -1
- package/dist/node_modules/@rc-component/trigger/es/hooks/useAlign.js +126 -123
- package/dist/node_modules/@rc-component/trigger/es/hooks/useAlign.js.map +1 -1
- package/dist/node_modules/@rc-component/trigger/es/index.js +150 -140
- package/dist/node_modules/@rc-component/trigger/es/index.js.map +1 -1
- package/dist/node_modules/@rc-component/trigger/es/util.js +35 -34
- package/dist/node_modules/@rc-component/trigger/es/util.js.map +1 -1
- package/dist/node_modules/@rc-component/upload/es/attr-accept.js +1 -1
- package/dist/node_modules/@rc-component/util/es/Dom/focus.js +65 -20
- package/dist/node_modules/@rc-component/util/es/Dom/focus.js.map +1 -1
- package/dist/node_modules/@rc-component/util/es/KeyCode.js.map +1 -1
- package/dist/node_modules/@rc-component/util/es/hooks/useId.js.map +1 -1
- package/dist/node_modules/@rc-component/util/es/hooks/useState.js +6 -6
- package/dist/node_modules/@rc-component/util/es/hooks/useState.js.map +1 -1
- package/dist/node_modules/@rc-component/util/es/hooks/useSyncState.js.map +1 -1
- package/dist/node_modules/@rc-component/util/es/isEqual.js +1 -1
- package/dist/node_modules/@rc-component/util/es/utils/set.js +21 -21
- package/dist/node_modules/@rc-component/util/es/utils/set.js.map +1 -1
- package/dist/node_modules/@rc-component/virtual-list/es/hooks/useScrollTo.js +1 -1
- package/dist/node_modules/antd/es/_util/warning.js +1 -1
- package/dist/node_modules/antd/es/_util/wave/WaveEffect.js +53 -48
- package/dist/node_modules/antd/es/_util/wave/WaveEffect.js.map +1 -1
- package/dist/node_modules/antd/es/_util/wave/index.js +1 -1
- package/dist/node_modules/antd/es/_util/wave/index.js.map +1 -1
- package/dist/node_modules/antd/es/_util/wave/style.js +8 -7
- package/dist/node_modules/antd/es/_util/wave/style.js.map +1 -1
- package/dist/node_modules/antd/es/alert/Alert.js +133 -128
- package/dist/node_modules/antd/es/alert/Alert.js.map +1 -1
- package/dist/node_modules/antd/es/badge/Badge.js +29 -28
- package/dist/node_modules/antd/es/badge/Badge.js.map +1 -1
- package/dist/node_modules/antd/es/badge/style/index.js +1 -1
- package/dist/node_modules/antd/es/badge/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/button/buttonHelpers.js +47 -41
- package/dist/node_modules/antd/es/button/buttonHelpers.js.map +1 -1
- package/dist/node_modules/antd/es/button/style/compact.js +45 -36
- package/dist/node_modules/antd/es/button/style/compact.js.map +1 -1
- package/dist/node_modules/antd/es/button/style/variant.js +100 -90
- package/dist/node_modules/antd/es/button/style/variant.js.map +1 -1
- package/dist/node_modules/antd/es/calendar/generateCalendar.js +55 -57
- package/dist/node_modules/antd/es/calendar/generateCalendar.js.map +1 -1
- package/dist/node_modules/antd/es/calendar/style/index.js +18 -18
- package/dist/node_modules/antd/es/calendar/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/card/CardGrid.js.map +1 -1
- package/dist/node_modules/antd/es/card/style/index.js +23 -11
- package/dist/node_modules/antd/es/card/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/checkbox/Group.js +32 -30
- package/dist/node_modules/antd/es/checkbox/Group.js.map +1 -1
- package/dist/node_modules/antd/es/collapse/Collapse.js +61 -61
- package/dist/node_modules/antd/es/collapse/Collapse.js.map +1 -1
- package/dist/node_modules/antd/es/color-picker/color.js +9 -9
- package/dist/node_modules/antd/es/color-picker/color.js.map +1 -1
- package/dist/node_modules/antd/es/config-provider/index.js +76 -71
- package/dist/node_modules/antd/es/config-provider/index.js.map +1 -1
- package/dist/node_modules/antd/es/date-picker/generatePicker/generateRangePicker.js +29 -31
- package/dist/node_modules/antd/es/date-picker/generatePicker/generateRangePicker.js.map +1 -1
- package/dist/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js +7 -9
- package/dist/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js.map +1 -1
- package/dist/node_modules/antd/es/date-picker/generatePicker/{SuffixIcon.js → useSuffixIcon.js} +4 -4
- package/dist/node_modules/antd/es/date-picker/generatePicker/useSuffixIcon.js.map +1 -0
- package/dist/node_modules/antd/es/date-picker/style/panel.js +4 -4
- package/dist/node_modules/antd/es/date-picker/style/panel.js.map +1 -1
- package/dist/node_modules/antd/es/drawer/useFocusable.js +14 -0
- package/dist/node_modules/antd/es/drawer/useFocusable.js.map +1 -0
- package/dist/node_modules/antd/es/empty/empty.js +27 -32
- package/dist/node_modules/antd/es/empty/empty.js.map +1 -1
- package/dist/node_modules/antd/es/empty/simple.js +2 -2
- package/dist/node_modules/antd/es/empty/simple.js.map +1 -1
- package/dist/node_modules/antd/es/form/hooks/useForm.js +2 -2
- package/dist/node_modules/antd/es/form/index.js +1 -1
- package/dist/node_modules/antd/es/form/style/index.js +24 -24
- package/dist/node_modules/antd/es/form/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/grid/col.js +56 -54
- package/dist/node_modules/antd/es/grid/col.js.map +1 -1
- package/dist/node_modules/antd/es/grid/style/index.js +50 -50
- package/dist/node_modules/antd/es/grid/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/input/TextArea.js +16 -15
- package/dist/node_modules/antd/es/input/TextArea.js.map +1 -1
- package/dist/node_modules/antd/es/input/style/index.js +1 -0
- package/dist/node_modules/antd/es/input/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/input-number/index.js +91 -91
- package/dist/node_modules/antd/es/input-number/index.js.map +1 -1
- package/dist/node_modules/antd/es/input-number/style/index.js +80 -79
- package/dist/node_modules/antd/es/input-number/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/layout/Sider.js +1 -2
- package/dist/node_modules/antd/es/layout/style/sider.js +9 -9
- package/dist/node_modules/antd/es/layout/style/sider.js.map +1 -1
- package/dist/node_modules/antd/es/menu/MenuItem.js +6 -6
- package/dist/node_modules/antd/es/menu/MenuItem.js.map +1 -1
- package/dist/node_modules/antd/es/menu/SubMenu.js +8 -8
- package/dist/node_modules/antd/es/menu/SubMenu.js.map +1 -1
- package/dist/node_modules/antd/es/menu/style/horizontal.js +1 -1
- package/dist/node_modules/antd/es/menu/style/horizontal.js.map +1 -1
- package/dist/node_modules/antd/es/menu/style/index.js +58 -58
- package/dist/node_modules/antd/es/menu/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/menu/style/vertical.js +1 -1
- package/dist/node_modules/antd/es/menu/style/vertical.js.map +1 -1
- package/dist/node_modules/antd/es/message/index.js +1 -1
- package/dist/node_modules/antd/es/modal/ConfirmDialog.js +117 -112
- package/dist/node_modules/antd/es/modal/ConfirmDialog.js.map +1 -1
- package/dist/node_modules/antd/es/modal/Modal.js +115 -109
- package/dist/node_modules/antd/es/modal/Modal.js.map +1 -1
- package/dist/node_modules/antd/es/modal/confirm.js +3 -3
- package/dist/node_modules/antd/es/modal/style/index.js +83 -80
- package/dist/node_modules/antd/es/modal/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/pagination/Pagination.js +85 -81
- package/dist/node_modules/antd/es/pagination/Pagination.js.map +1 -1
- package/dist/node_modules/antd/es/pagination/style/bordered.js +2 -2
- package/dist/node_modules/antd/es/pagination/style/bordered.js.map +1 -1
- package/dist/node_modules/antd/es/pagination/style/index.js +100 -133
- package/dist/node_modules/antd/es/pagination/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/popover/index.js +77 -82
- package/dist/node_modules/antd/es/popover/index.js.map +1 -1
- package/dist/node_modules/antd/es/popover/style/index.js +65 -63
- package/dist/node_modules/antd/es/popover/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/progress/progress.js +4 -4
- package/dist/node_modules/antd/es/radio/context.js +3 -3
- package/dist/node_modules/antd/es/radio/context.js.map +1 -1
- package/dist/node_modules/antd/es/radio/group.js +31 -29
- package/dist/node_modules/antd/es/radio/group.js.map +1 -1
- package/dist/node_modules/antd/es/radio/style/index.js +1 -1
- package/dist/node_modules/antd/es/radio/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/select/style/dropdown.js +1 -1
- package/dist/node_modules/antd/es/select/style/dropdown.js.map +1 -1
- package/dist/node_modules/antd/es/select/style/select-input-multiple.js +71 -69
- package/dist/node_modules/antd/es/select/style/select-input-multiple.js.map +1 -1
- package/dist/node_modules/antd/es/select/style/select-input.js +113 -98
- package/dist/node_modules/antd/es/select/style/select-input.js.map +1 -1
- package/dist/node_modules/antd/es/skeleton/Image.js +9 -9
- package/dist/node_modules/antd/es/skeleton/Image.js.map +1 -1
- package/dist/node_modules/antd/es/space/Item.js +2 -2
- package/dist/node_modules/antd/es/space/Item.js.map +1 -1
- package/dist/node_modules/antd/es/space/index.js +4 -4
- package/dist/node_modules/antd/es/space/index.js.map +1 -1
- package/dist/node_modules/antd/es/space/style/addon.js +47 -46
- package/dist/node_modules/antd/es/space/style/addon.js.map +1 -1
- package/dist/node_modules/antd/es/steps/PanelArrow.js +2 -2
- package/dist/node_modules/antd/es/steps/PanelArrow.js.map +1 -1
- package/dist/node_modules/antd/es/steps/ProgressIcon.js +12 -10
- package/dist/node_modules/antd/es/steps/ProgressIcon.js.map +1 -1
- package/dist/node_modules/antd/es/steps/index.js +108 -106
- package/dist/node_modules/antd/es/steps/index.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/horizontal.js +13 -11
- package/dist/node_modules/antd/es/steps/style/horizontal.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/icon.js +23 -18
- package/dist/node_modules/antd/es/steps/style/icon.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/index.js +41 -41
- package/dist/node_modules/antd/es/steps/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/inline.js +28 -23
- package/dist/node_modules/antd/es/steps/style/inline.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/label-placement.js +44 -39
- package/dist/node_modules/antd/es/steps/style/label-placement.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/nav.js +29 -27
- package/dist/node_modules/antd/es/steps/style/nav.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/panel.js +61 -56
- package/dist/node_modules/antd/es/steps/style/panel.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/progress-dot.js +28 -26
- package/dist/node_modules/antd/es/steps/style/progress-dot.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/progress.js +24 -57
- package/dist/node_modules/antd/es/steps/style/progress.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/rtl.js +10 -8
- package/dist/node_modules/antd/es/steps/style/rtl.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/small.js +21 -16
- package/dist/node_modules/antd/es/steps/style/small.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/status.js +187 -176
- package/dist/node_modules/antd/es/steps/style/status.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/util.js +18 -16
- package/dist/node_modules/antd/es/steps/style/util.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/vertical.js +21 -16
- package/dist/node_modules/antd/es/steps/style/vertical.js.map +1 -1
- package/dist/node_modules/antd/es/style/placementArrow.js +31 -29
- package/dist/node_modules/antd/es/style/placementArrow.js.map +1 -1
- package/dist/node_modules/antd/es/table/InternalTable.js +65 -62
- package/dist/node_modules/antd/es/table/InternalTable.js.map +1 -1
- package/dist/node_modules/antd/es/table/TableMeasureRowContext.js +6 -0
- package/dist/node_modules/antd/es/table/TableMeasureRowContext.js.map +1 -0
- package/dist/node_modules/antd/es/table/hooks/useFilter/FilterDropdown.js +145 -137
- package/dist/node_modules/antd/es/table/hooks/useFilter/FilterDropdown.js.map +1 -1
- package/dist/node_modules/antd/es/table/style/index.js +3 -3
- package/dist/node_modules/antd/es/table/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/table/style/radius.js +10 -0
- package/dist/node_modules/antd/es/table/style/radius.js.map +1 -1
- package/dist/node_modules/antd/es/table/style/virtual.js +5 -5
- package/dist/node_modules/antd/es/table/style/virtual.js.map +1 -1
- package/dist/node_modules/antd/es/tag/style/index.js +5 -5
- package/dist/node_modules/antd/es/tag/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/theme/util/genStyleUtils.js +29 -32
- package/dist/node_modules/antd/es/theme/util/genStyleUtils.js.map +1 -1
- package/dist/node_modules/antd/es/timeline/Timeline.js +76 -74
- package/dist/node_modules/antd/es/timeline/Timeline.js.map +1 -1
- package/dist/node_modules/antd/es/timeline/style/horizontal.js +21 -18
- package/dist/node_modules/antd/es/timeline/style/horizontal.js.map +1 -1
- package/dist/node_modules/antd/es/timeline/style/index.js +85 -70
- package/dist/node_modules/antd/es/timeline/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/timeline/useItems.js +38 -37
- package/dist/node_modules/antd/es/timeline/useItems.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/PurePanel.js +27 -27
- package/dist/node_modules/antd/es/tooltip/PurePanel.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/UniqueProvider/MotionContent.js +17 -22
- package/dist/node_modules/antd/es/tooltip/UniqueProvider/MotionContent.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/UniqueProvider/index.js +27 -26
- package/dist/node_modules/antd/es/tooltip/UniqueProvider/index.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/index.js +52 -51
- package/dist/node_modules/antd/es/tooltip/index.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/style/index.js +55 -52
- package/dist/node_modules/antd/es/tooltip/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/util.js +13 -12
- package/dist/node_modules/antd/es/tooltip/util.js.map +1 -1
- package/dist/node_modules/antd/es/transfer/ListBody.js +16 -16
- package/dist/node_modules/antd/es/transfer/ListBody.js.map +1 -1
- package/dist/node_modules/antd/es/transfer/ListItem.js +43 -43
- package/dist/node_modules/antd/es/transfer/ListItem.js.map +1 -1
- package/dist/node_modules/antd/es/transfer/style/index.js +1 -1
- package/dist/node_modules/antd/es/tree/DirectoryTree.js +42 -41
- package/dist/node_modules/antd/es/tree/DirectoryTree.js.map +1 -1
- package/dist/node_modules/antd/es/typography/Base/index.js +43 -42
- package/dist/node_modules/antd/es/typography/Base/index.js.map +1 -1
- package/dist/node_modules/antd/es/typography/style/index.js +43 -43
- package/dist/node_modules/antd/es/typography/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/typography/style/mixins.js +1 -1
- package/dist/node_modules/antd/es/typography/style/mixins.js.map +1 -1
- package/dist/node_modules/antd/es/version/version.js +1 -1
- package/dist/node_modules/antd/es/version/version.js.map +1 -1
- package/dist/node_modules/antd/es/watermark/context.js +5 -6
- package/dist/node_modules/antd/es/watermark/context.js.map +1 -1
- package/dist/node_modules/antd-style/node_modules/@ant-design/cssinjs/es/StyleContext.js +1 -2
- package/dist/node_modules/antd-style/node_modules/@ant-design/cssinjs/es/StyleContext.js.map +1 -1
- package/dist/node_modules/exceljs/dist/exceljs.min.js +91 -508
- package/dist/node_modules/exceljs/dist/exceljs.min.js.map +1 -1
- package/dist/node_modules/html2canvas/dist/html2canvas.esm.js +5 -55
- package/dist/node_modules/html2canvas/dist/html2canvas.esm.js.map +1 -1
- package/dist/node_modules/jspdf/dist/jspdf.es.min.js +8 -53
- package/dist/node_modules/jspdf/dist/jspdf.es.min.js.map +1 -1
- package/dist/node_modules/lodash/lodash.js +295 -278
- package/dist/node_modules/lodash/lodash.js.map +1 -1
- package/dist/node_modules/moment/dist/moment.js +2 -8
- package/dist/node_modules/moment/dist/moment.js.map +1 -1
- package/dist/node_modules/rc-util/es/isEqual.js +1 -1
- package/package.json +1 -1
- package/dist/node_modules/@rc-component/form/es/BatchUpdate.js +0 -21
- package/dist/node_modules/@rc-component/form/es/BatchUpdate.js.map +0 -1
- package/dist/node_modules/@rc-component/form/es/useForm.js.map +0 -1
- package/dist/node_modules/@rc-component/form/es/useWatch.js.map +0 -1
- package/dist/node_modules/antd/es/date-picker/generatePicker/SuffixIcon.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useForm.js","sources":["../../../../../../node_modules/@rc-component/form/es/hooks/useForm.js"],"sourcesContent":["import { merge } from \"@rc-component/util/es/utils/set\";\nimport { mergeWith } from '@rc-component/util';\nimport warning from \"@rc-component/util/es/warning\";\nimport * as React from 'react';\nimport { HOOK_MARK } from \"../FieldContext\";\nimport { allPromiseFinish } from \"../utils/asyncUtil\";\nimport { defaultValidateMessages } from \"../utils/messages\";\nimport NameMap from \"../utils/NameMap\";\nimport { cloneByNamePathList, containsNamePath, getNamePath, getValue, matchNamePath, setValue } from \"../utils/valueUtil\";\nimport WatcherCenter from \"./useNotifyWatch\";\nexport class FormStore {\n formHooked = false;\n forceRootUpdate;\n subscribable = true;\n store = {};\n fieldEntities = [];\n initialValues = {};\n callbacks = {};\n validateMessages = null;\n preserve = null;\n lastValidatePromise = null;\n watcherCenter = new WatcherCenter(this);\n constructor(forceRootUpdate) {\n this.forceRootUpdate = forceRootUpdate;\n }\n getForm = () => ({\n getFieldValue: this.getFieldValue,\n getFieldsValue: this.getFieldsValue,\n getFieldError: this.getFieldError,\n getFieldWarning: this.getFieldWarning,\n getFieldsError: this.getFieldsError,\n isFieldsTouched: this.isFieldsTouched,\n isFieldTouched: this.isFieldTouched,\n isFieldValidating: this.isFieldValidating,\n isFieldsValidating: this.isFieldsValidating,\n resetFields: this.resetFields,\n setFields: this.setFields,\n setFieldValue: this.setFieldValue,\n setFieldsValue: this.setFieldsValue,\n validateFields: this.validateFields,\n submit: this.submit,\n _init: true,\n getInternalHooks: this.getInternalHooks\n });\n\n // ======================== Internal Hooks ========================\n getInternalHooks = key => {\n if (key === HOOK_MARK) {\n this.formHooked = true;\n return {\n dispatch: this.dispatch,\n initEntityValue: this.initEntityValue,\n registerField: this.registerField,\n useSubscribe: this.useSubscribe,\n setInitialValues: this.setInitialValues,\n destroyForm: this.destroyForm,\n setCallbacks: this.setCallbacks,\n setValidateMessages: this.setValidateMessages,\n getFields: this.getFields,\n setPreserve: this.setPreserve,\n getInitialValue: this.getInitialValue,\n registerWatch: this.registerWatch\n };\n }\n warning(false, '`getInternalHooks` is internal usage. Should not call directly.');\n return null;\n };\n useSubscribe = subscribable => {\n this.subscribable = subscribable;\n };\n\n /**\n * Record prev Form unmount fieldEntities which config preserve false.\n * This need to be refill with initialValues instead of store value.\n */\n prevWithoutPreserves = null;\n\n /**\n * First time `setInitialValues` should update store with initial value\n */\n setInitialValues = (initialValues, init) => {\n this.initialValues = initialValues || {};\n if (init) {\n let nextStore = merge(initialValues, this.store);\n\n // We will take consider prev form unmount fields.\n // When the field is not `preserve`, we need fill this with initialValues instead of store.\n // eslint-disable-next-line array-callback-return\n this.prevWithoutPreserves?.map(({\n key: namePath\n }) => {\n nextStore = setValue(nextStore, namePath, getValue(initialValues, namePath));\n });\n this.prevWithoutPreserves = null;\n this.updateStore(nextStore);\n }\n };\n destroyForm = clearOnDestroy => {\n if (clearOnDestroy) {\n // destroy form reset store\n this.updateStore({});\n } else {\n // Fill preserve fields\n const prevWithoutPreserves = new NameMap();\n this.getFieldEntities(true).forEach(entity => {\n if (!this.isMergedPreserve(entity.isPreserve())) {\n prevWithoutPreserves.set(entity.getNamePath(), true);\n }\n });\n this.prevWithoutPreserves = prevWithoutPreserves;\n }\n };\n getInitialValue = namePath => {\n const initValue = getValue(this.initialValues, namePath);\n\n // Not cloneDeep when without `namePath`\n return namePath.length ? merge(initValue) : initValue;\n };\n setCallbacks = callbacks => {\n this.callbacks = callbacks;\n };\n setValidateMessages = validateMessages => {\n this.validateMessages = validateMessages;\n };\n setPreserve = preserve => {\n this.preserve = preserve;\n };\n\n // ============================= Watch ============================\n registerWatch = callback => {\n return this.watcherCenter.register(callback);\n };\n notifyWatch = (namePath = []) => {\n this.watcherCenter.notify(namePath);\n };\n\n // ========================== Dev Warning =========================\n timeoutId = null;\n warningUnhooked = () => {\n if (process.env.NODE_ENV !== 'production' && !this.timeoutId && typeof window !== 'undefined') {\n this.timeoutId = setTimeout(() => {\n this.timeoutId = null;\n if (!this.formHooked) {\n warning(false, 'Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?');\n }\n });\n }\n };\n\n // ============================ Store =============================\n updateStore = nextStore => {\n this.store = nextStore;\n };\n\n // ============================ Fields ============================\n /**\n * Get registered field entities.\n * @param pure Only return field which has a `name`. Default: false\n */\n getFieldEntities = (pure = false) => {\n if (!pure) {\n return this.fieldEntities;\n }\n return this.fieldEntities.filter(field => field.getNamePath().length);\n };\n\n /**\n * Get a map of registered field entities with their name path as the key.\n * @param pure Only include fields which have a `name`. Default: false\n * @returns A NameMap containing field entities indexed by their name paths\n */\n getFieldsMap = (pure = false) => {\n const cache = new NameMap();\n this.getFieldEntities(pure).forEach(field => {\n const namePath = field.getNamePath();\n cache.set(namePath, field);\n });\n return cache;\n };\n\n /**\n * Get field entities based on a list of name paths.\n * @param nameList - Array of name paths to search for. If not provided, returns all field entities with names.\n * @param includesSubNamePath - Whether to include fields that have the given name path as a prefix.\n */\n getFieldEntitiesForNamePathList = (nameList, includesSubNamePath = false) => {\n if (!nameList) {\n return this.getFieldEntities(true);\n }\n const cache = this.getFieldsMap(true);\n if (!includesSubNamePath) {\n return nameList.map(name => {\n const namePath = getNamePath(name);\n return cache.get(namePath) || {\n INVALIDATE_NAME_PATH: getNamePath(name)\n };\n });\n }\n return nameList.flatMap(name => {\n const namePath = getNamePath(name);\n const fields = cache.getAsPrefix(namePath);\n if (fields.length) {\n return fields;\n }\n return [{\n INVALIDATE_NAME_PATH: namePath\n }];\n });\n };\n getFieldsValue = (nameList, filterFunc) => {\n this.warningUnhooked();\n\n // Fill args\n let mergedNameList;\n let mergedFilterFunc;\n if (nameList === true || Array.isArray(nameList)) {\n mergedNameList = nameList;\n mergedFilterFunc = filterFunc;\n } else if (nameList && typeof nameList === 'object') {\n mergedFilterFunc = nameList.filter;\n }\n if (mergedNameList === true && !mergedFilterFunc) {\n return this.store;\n }\n const fieldEntities = this.getFieldEntitiesForNamePathList(Array.isArray(mergedNameList) ? mergedNameList : null, true);\n const filteredNameList = [];\n const listNamePaths = [];\n fieldEntities.forEach(entity => {\n const namePath = entity.INVALIDATE_NAME_PATH || entity.getNamePath();\n\n // Ignore when it's a list item and not specific the namePath,\n // since parent field is already take in count\n if (entity.isList?.()) {\n listNamePaths.push(namePath);\n return;\n }\n if (!mergedFilterFunc) {\n filteredNameList.push(namePath);\n } else {\n const meta = 'getMeta' in entity ? entity.getMeta() : null;\n if (mergedFilterFunc(meta)) {\n filteredNameList.push(namePath);\n }\n }\n });\n let mergedValues = cloneByNamePathList(this.store, filteredNameList.map(getNamePath));\n\n // We need fill the list as [] if Form.List is empty\n listNamePaths.forEach(namePath => {\n if (!getValue(mergedValues, namePath)) {\n mergedValues = setValue(mergedValues, namePath, []);\n }\n });\n return mergedValues;\n };\n getFieldValue = name => {\n this.warningUnhooked();\n const namePath = getNamePath(name);\n return getValue(this.store, namePath);\n };\n getFieldsError = nameList => {\n this.warningUnhooked();\n const fieldEntities = this.getFieldEntitiesForNamePathList(nameList);\n return fieldEntities.map((entity, index) => {\n if (entity && !entity.INVALIDATE_NAME_PATH) {\n return {\n name: entity.getNamePath(),\n errors: entity.getErrors(),\n warnings: entity.getWarnings()\n };\n }\n return {\n name: getNamePath(nameList[index]),\n errors: [],\n warnings: []\n };\n });\n };\n getFieldError = name => {\n this.warningUnhooked();\n const namePath = getNamePath(name);\n const fieldError = this.getFieldsError([namePath])[0];\n return fieldError.errors;\n };\n getFieldWarning = name => {\n this.warningUnhooked();\n const namePath = getNamePath(name);\n const fieldError = this.getFieldsError([namePath])[0];\n return fieldError.warnings;\n };\n isFieldsTouched = (...args) => {\n this.warningUnhooked();\n const [arg0, arg1] = args;\n let namePathList;\n let isAllFieldsTouched = false;\n if (args.length === 0) {\n namePathList = null;\n } else if (args.length === 1) {\n if (Array.isArray(arg0)) {\n namePathList = arg0.map(getNamePath);\n isAllFieldsTouched = false;\n } else {\n namePathList = null;\n isAllFieldsTouched = arg0;\n }\n } else {\n namePathList = arg0.map(getNamePath);\n isAllFieldsTouched = arg1;\n }\n const fieldEntities = this.getFieldEntities(true);\n const isFieldTouched = field => field.isFieldTouched();\n\n // ===== Will get fully compare when not config namePathList =====\n if (!namePathList) {\n return isAllFieldsTouched ? fieldEntities.every(entity => isFieldTouched(entity) || entity.isList()) : fieldEntities.some(isFieldTouched);\n }\n\n // Generate a nest tree for validate\n const map = new NameMap();\n namePathList.forEach(shortNamePath => {\n map.set(shortNamePath, []);\n });\n fieldEntities.forEach(field => {\n const fieldNamePath = field.getNamePath();\n\n // Find matched entity and put into list\n namePathList.forEach(shortNamePath => {\n if (shortNamePath.every((nameUnit, i) => fieldNamePath[i] === nameUnit)) {\n map.update(shortNamePath, list => [...list, field]);\n }\n });\n });\n\n // Check if NameMap value is touched\n const isNamePathListTouched = entities => entities.some(isFieldTouched);\n const namePathListEntities = map.map(({\n value\n }) => value);\n return isAllFieldsTouched ? namePathListEntities.every(isNamePathListTouched) : namePathListEntities.some(isNamePathListTouched);\n };\n isFieldTouched = name => {\n this.warningUnhooked();\n return this.isFieldsTouched([name]);\n };\n isFieldsValidating = nameList => {\n this.warningUnhooked();\n const fieldEntities = this.getFieldEntities();\n if (!nameList) {\n return fieldEntities.some(testField => testField.isFieldValidating());\n }\n const namePathList = nameList.map(getNamePath);\n return fieldEntities.some(testField => {\n const fieldNamePath = testField.getNamePath();\n return containsNamePath(namePathList, fieldNamePath) && testField.isFieldValidating();\n });\n };\n isFieldValidating = name => {\n this.warningUnhooked();\n return this.isFieldsValidating([name]);\n };\n\n /**\n * Reset Field with field `initialValue` prop.\n * Can pass `entities` or `namePathList` or just nothing.\n */\n resetWithFieldInitialValue = (info = {}) => {\n // Create cache\n const cache = new NameMap();\n const fieldEntities = this.getFieldEntities(true);\n fieldEntities.forEach(field => {\n const {\n initialValue\n } = field.props;\n const namePath = field.getNamePath();\n\n // Record only if has `initialValue`\n if (initialValue !== undefined) {\n const records = cache.get(namePath) || new Set();\n records.add({\n entity: field,\n value: initialValue\n });\n cache.set(namePath, records);\n }\n });\n\n // Reset\n const resetWithFields = entities => {\n entities.forEach(field => {\n const {\n initialValue\n } = field.props;\n if (initialValue !== undefined) {\n const namePath = field.getNamePath();\n const formInitialValue = this.getInitialValue(namePath);\n if (formInitialValue !== undefined) {\n // Warning if conflict with form initialValues and do not modify value\n warning(false, `Form already set 'initialValues' with path '${namePath.join('.')}'. Field can not overwrite it.`);\n } else {\n const records = cache.get(namePath);\n if (records && records.size > 1) {\n // Warning if multiple field set `initialValue`and do not modify value\n warning(false, `Multiple Field with path '${namePath.join('.')}' set 'initialValue'. Can not decide which one to pick.`);\n } else if (records) {\n const originValue = this.getFieldValue(namePath);\n const isListField = field.isListField();\n\n // Set `initialValue`\n if (!isListField && (!info.skipExist || originValue === undefined)) {\n this.updateStore(setValue(this.store, namePath, [...records][0].value));\n }\n }\n }\n }\n });\n };\n let requiredFieldEntities;\n if (info.entities) {\n requiredFieldEntities = info.entities;\n } else if (info.namePathList) {\n requiredFieldEntities = [];\n info.namePathList.forEach(namePath => {\n const records = cache.get(namePath);\n if (records) {\n requiredFieldEntities.push(...[...records].map(r => r.entity));\n }\n });\n } else {\n requiredFieldEntities = fieldEntities;\n }\n resetWithFields(requiredFieldEntities);\n };\n resetFields = nameList => {\n this.warningUnhooked();\n const prevStore = this.store;\n if (!nameList) {\n this.updateStore(merge(this.initialValues));\n this.resetWithFieldInitialValue();\n this.notifyObservers(prevStore, null, {\n type: 'reset'\n });\n this.notifyWatch();\n return;\n }\n\n // Reset by `nameList`\n const namePathList = nameList.map(getNamePath);\n namePathList.forEach(namePath => {\n const initialValue = this.getInitialValue(namePath);\n this.updateStore(setValue(this.store, namePath, initialValue));\n });\n this.resetWithFieldInitialValue({\n namePathList\n });\n this.notifyObservers(prevStore, namePathList, {\n type: 'reset'\n });\n this.notifyWatch(namePathList);\n };\n setFields = fields => {\n this.warningUnhooked();\n const prevStore = this.store;\n const namePathList = [];\n fields.forEach(fieldData => {\n const {\n name,\n ...data\n } = fieldData;\n const namePath = getNamePath(name);\n namePathList.push(namePath);\n\n // Value\n if ('value' in data) {\n this.updateStore(setValue(this.store, namePath, data.value));\n }\n this.notifyObservers(prevStore, [namePath], {\n type: 'setField',\n data: fieldData\n });\n });\n this.notifyWatch(namePathList);\n };\n getFields = () => {\n const entities = this.getFieldEntities(true);\n const fields = entities.map(field => {\n const namePath = field.getNamePath();\n const meta = field.getMeta();\n const fieldData = {\n ...meta,\n name: namePath,\n value: this.getFieldValue(namePath)\n };\n Object.defineProperty(fieldData, 'originRCField', {\n value: true\n });\n return fieldData;\n });\n return fields;\n };\n\n // =========================== Observer ===========================\n /**\n * This only trigger when a field is on constructor to avoid we get initialValue too late\n */\n initEntityValue = entity => {\n const {\n initialValue\n } = entity.props;\n if (initialValue !== undefined) {\n const namePath = entity.getNamePath();\n const prevValue = getValue(this.store, namePath);\n if (prevValue === undefined) {\n this.updateStore(setValue(this.store, namePath, initialValue));\n }\n }\n };\n isMergedPreserve = fieldPreserve => {\n const mergedPreserve = fieldPreserve !== undefined ? fieldPreserve : this.preserve;\n return mergedPreserve ?? true;\n };\n registerField = entity => {\n this.fieldEntities.push(entity);\n const namePath = entity.getNamePath();\n this.notifyWatch([namePath]);\n\n // Set initial values\n if (entity.props.initialValue !== undefined) {\n const prevStore = this.store;\n this.resetWithFieldInitialValue({\n entities: [entity],\n skipExist: true\n });\n this.notifyObservers(prevStore, [entity.getNamePath()], {\n type: 'valueUpdate',\n source: 'internal'\n });\n }\n\n // un-register field callback\n return (isListField, preserve, subNamePath = []) => {\n this.fieldEntities = this.fieldEntities.filter(item => item !== entity);\n\n // Clean up store value if not preserve\n if (!this.isMergedPreserve(preserve) && (!isListField || subNamePath.length > 1)) {\n const defaultValue = isListField ? undefined : this.getInitialValue(namePath);\n if (namePath.length && this.getFieldValue(namePath) !== defaultValue && this.fieldEntities.every(field =>\n // Only reset when no namePath exist\n !matchNamePath(field.getNamePath(), namePath))) {\n const prevStore = this.store;\n this.updateStore(setValue(prevStore, namePath, defaultValue, true));\n\n // Notify that field is unmount\n this.notifyObservers(prevStore, [namePath], {\n type: 'remove'\n });\n\n // Dependencies update\n this.triggerDependenciesUpdate(prevStore, namePath);\n }\n }\n this.notifyWatch([namePath]);\n };\n };\n dispatch = action => {\n switch (action.type) {\n case 'updateValue':\n {\n const {\n namePath,\n value\n } = action;\n this.updateValue(namePath, value);\n break;\n }\n case 'validateField':\n {\n const {\n namePath,\n triggerName\n } = action;\n this.validateFields([namePath], {\n triggerName\n });\n break;\n }\n default:\n // Currently we don't have other action. Do nothing.\n }\n };\n notifyObservers = (prevStore, namePathList, info) => {\n if (this.subscribable) {\n const mergedInfo = {\n ...info,\n store: this.getFieldsValue(true)\n };\n this.getFieldEntities().forEach(({\n onStoreChange\n }) => {\n onStoreChange(prevStore, namePathList, mergedInfo);\n });\n } else {\n this.forceRootUpdate();\n }\n };\n\n /**\n * Notify dependencies children with parent update\n * We need delay to trigger validate in case Field is under render props\n */\n triggerDependenciesUpdate = (prevStore, namePath) => {\n const childrenFields = this.getDependencyChildrenFields(namePath);\n if (childrenFields.length) {\n this.validateFields(childrenFields);\n }\n this.notifyObservers(prevStore, childrenFields, {\n type: 'dependenciesUpdate',\n relatedFields: [namePath, ...childrenFields]\n });\n return childrenFields;\n };\n updateValue = (name, value) => {\n const namePath = getNamePath(name);\n const prevStore = this.store;\n this.updateStore(setValue(this.store, namePath, value));\n this.notifyObservers(prevStore, [namePath], {\n type: 'valueUpdate',\n source: 'internal'\n });\n this.notifyWatch([namePath]);\n\n // Dependencies update\n const childrenFields = this.triggerDependenciesUpdate(prevStore, namePath);\n\n // trigger callback function\n const {\n onValuesChange\n } = this.callbacks;\n if (onValuesChange) {\n const fieldEntity = this.getFieldsMap(true).get(namePath);\n const changedValues = cloneByNamePathList(this.store, [namePath]);\n const allValues = this.getFieldsValue();\n // Merge changedValues into allValues to ensure allValues contains the latest changes\n const mergedAllValues = mergeWith([allValues, changedValues], {\n // When value is array, it means trigger by Form.List which should replace directly\n prepareArray: current => fieldEntity?.isList() ? [] : [...(current || [])]\n });\n onValuesChange(changedValues, mergedAllValues);\n }\n this.triggerOnFieldsChange([namePath, ...childrenFields]);\n };\n\n // Let all child Field get update.\n setFieldsValue = store => {\n this.warningUnhooked();\n const prevStore = this.store;\n if (store) {\n const nextStore = merge(this.store, store);\n this.updateStore(nextStore);\n }\n this.notifyObservers(prevStore, null, {\n type: 'valueUpdate',\n source: 'external'\n });\n this.notifyWatch();\n };\n setFieldValue = (name, value) => {\n this.setFields([{\n name,\n value,\n errors: [],\n warnings: [],\n touched: true\n }]);\n };\n getDependencyChildrenFields = rootNamePath => {\n const children = new Set();\n const childrenFields = [];\n const dependencies2fields = new NameMap();\n\n /**\n * Generate maps\n * Can use cache to save perf if user report performance issue with this\n */\n this.getFieldEntities().forEach(field => {\n const {\n dependencies\n } = field.props;\n (dependencies || []).forEach(dependency => {\n const dependencyNamePath = getNamePath(dependency);\n dependencies2fields.update(dependencyNamePath, (fields = new Set()) => {\n fields.add(field);\n return fields;\n });\n });\n });\n const fillChildren = namePath => {\n const fields = dependencies2fields.get(namePath) || new Set();\n fields.forEach(field => {\n if (!children.has(field)) {\n children.add(field);\n const fieldNamePath = field.getNamePath();\n if (field.isFieldDirty() && fieldNamePath.length) {\n childrenFields.push(fieldNamePath);\n fillChildren(fieldNamePath);\n }\n }\n });\n };\n fillChildren(rootNamePath);\n return childrenFields;\n };\n triggerOnFieldsChange = (namePathList, filedErrors) => {\n const {\n onFieldsChange\n } = this.callbacks;\n if (onFieldsChange) {\n const fields = this.getFields();\n\n /**\n * Fill errors since `fields` may be replaced by controlled fields\n */\n if (filedErrors) {\n const cache = new NameMap();\n filedErrors.forEach(({\n name,\n errors\n }) => {\n cache.set(name, errors);\n });\n fields.forEach(field => {\n // eslint-disable-next-line no-param-reassign\n field.errors = cache.get(field.name) || field.errors;\n });\n }\n const changedFields = fields.filter(({\n name: fieldName\n }) => containsNamePath(namePathList, fieldName));\n if (changedFields.length) {\n onFieldsChange(changedFields, fields);\n }\n }\n };\n\n // =========================== Validate ===========================\n validateFields = (arg1, arg2) => {\n this.warningUnhooked();\n let nameList;\n let options;\n if (Array.isArray(arg1) || typeof arg1 === 'string' || typeof arg2 === 'string') {\n nameList = arg1;\n options = arg2;\n } else {\n options = arg1;\n }\n const provideNameList = !!nameList;\n const namePathList = provideNameList ? nameList.map(getNamePath) : [];\n // Same namePathList, but does not include Form.List name\n const finalValueNamePathList = [...namePathList];\n\n // Collect result in promise list\n const promiseList = [];\n\n // We temp save the path which need trigger for `onFieldsChange`\n const TMP_SPLIT = String(Date.now());\n const validateNamePathList = new Set();\n const {\n recursive,\n dirty\n } = options || {};\n this.getFieldEntities(true).forEach(field => {\n const fieldNamePath = field.getNamePath();\n\n // Add field if not provide `nameList`\n if (!provideNameList) {\n if (\n // If is field, pass directly\n !field.isList() ||\n // If is list, do not add if already exist sub field in the namePathList\n !namePathList.some(name => matchNamePath(name, fieldNamePath, true))) {\n finalValueNamePathList.push(fieldNamePath);\n }\n namePathList.push(fieldNamePath);\n }\n\n // Skip if without rule\n if (!field.props.rules || !field.props.rules.length) {\n return;\n }\n\n // Skip if only validate dirty field\n if (dirty && !field.isFieldDirty()) {\n return;\n }\n validateNamePathList.add(fieldNamePath.join(TMP_SPLIT));\n\n // Add field validate rule in to promise list\n if (!provideNameList || containsNamePath(namePathList, fieldNamePath, recursive)) {\n const promise = field.validateRules({\n validateMessages: {\n ...defaultValidateMessages,\n ...this.validateMessages\n },\n ...options\n });\n\n // Wrap promise with field\n promiseList.push(promise.then(() => ({\n name: fieldNamePath,\n errors: [],\n warnings: []\n })).catch(ruleErrors => {\n const mergedErrors = [];\n const mergedWarnings = [];\n ruleErrors.forEach?.(({\n rule: {\n warningOnly\n },\n errors\n }) => {\n if (warningOnly) {\n mergedWarnings.push(...errors);\n } else {\n mergedErrors.push(...errors);\n }\n });\n if (mergedErrors.length) {\n return Promise.reject({\n name: fieldNamePath,\n errors: mergedErrors,\n warnings: mergedWarnings\n });\n }\n return {\n name: fieldNamePath,\n errors: mergedErrors,\n warnings: mergedWarnings\n };\n }));\n }\n });\n const summaryPromise = allPromiseFinish(promiseList);\n this.lastValidatePromise = summaryPromise;\n\n // Notify fields with rule that validate has finished and need update\n summaryPromise.catch(results => results).then(results => {\n const resultNamePathList = results.map(({\n name\n }) => name);\n this.notifyObservers(this.store, resultNamePathList, {\n type: 'validateFinish'\n });\n this.triggerOnFieldsChange(resultNamePathList, results);\n });\n const returnPromise = summaryPromise.then(() => {\n if (this.lastValidatePromise === summaryPromise) {\n return Promise.resolve(this.getFieldsValue(finalValueNamePathList));\n }\n return Promise.reject([]);\n }).catch(results => {\n const errorList = results.filter(result => result && result.errors.length);\n const errorMessage = errorList[0]?.errors?.[0];\n return Promise.reject({\n message: errorMessage,\n values: this.getFieldsValue(namePathList),\n errorFields: errorList,\n outOfDate: this.lastValidatePromise !== summaryPromise\n });\n });\n\n // Do not throw in console\n returnPromise.catch(e => e);\n\n // `validating` changed. Trigger `onFieldsChange`\n const triggerNamePathList = namePathList.filter(namePath => validateNamePathList.has(namePath.join(TMP_SPLIT)));\n this.triggerOnFieldsChange(triggerNamePathList);\n return returnPromise;\n };\n\n // ============================ Submit ============================\n submit = () => {\n this.warningUnhooked();\n this.validateFields().then(values => {\n const {\n onFinish\n } = this.callbacks;\n if (onFinish) {\n try {\n onFinish(values);\n } catch (err) {\n // Should print error if user `onFinish` callback failed\n console.error(err);\n }\n }\n }).catch(e => {\n const {\n onFinishFailed\n } = this.callbacks;\n if (onFinishFailed) {\n onFinishFailed(e);\n }\n });\n };\n}\nfunction useForm(form) {\n const formRef = React.useRef(null);\n const [, forceUpdate] = React.useState({});\n\n // Create singleton FormStore\n if (!formRef.current) {\n if (form) {\n formRef.current = form;\n } else {\n // Create a new FormStore if not provided\n const forceReRender = () => {\n forceUpdate({});\n };\n const formStore = new FormStore(forceReRender);\n formRef.current = formStore.getForm();\n }\n }\n return [formRef.current];\n}\nexport default useForm;"],"names":["FormStore","forceRootUpdate","__publicField","WatcherCenter","key","HOOK_MARK","warning","subscribable","initialValues","init","nextStore","merge","namePath","setValue","getValue","clearOnDestroy","prevWithoutPreserves","NameMap","entity","initValue","callbacks","validateMessages","preserve","callback","process","pure","field","cache","nameList","includesSubNamePath","name","getNamePath","fields","filterFunc","mergedNameList","mergedFilterFunc","fieldEntities","filteredNameList","listNamePaths","meta","mergedValues","cloneByNamePathList","index","args","arg0","arg1","namePathList","isAllFieldsTouched","isFieldTouched","map","shortNamePath","fieldNamePath","nameUnit","i","list","isNamePathListTouched","entities","namePathListEntities","value","testField","containsNamePath","info","initialValue","records","resetWithFields","originValue","requiredFieldEntities","r","prevStore","fieldData","data","fieldPreserve","isListField","subNamePath","item","defaultValue","matchNamePath","action","triggerName","mergedInfo","onStoreChange","childrenFields","onValuesChange","fieldEntity","changedValues","allValues","mergedAllValues","mergeWith","current","store","rootNamePath","children","dependencies2fields","dependencies","dependency","dependencyNamePath","fillChildren","filedErrors","onFieldsChange","errors","changedFields","fieldName","arg2","options","provideNameList","finalValueNamePathList","promiseList","TMP_SPLIT","validateNamePathList","recursive","dirty","promise","defaultValidateMessages","ruleErrors","mergedErrors","mergedWarnings","warningOnly","summaryPromise","allPromiseFinish","results","resultNamePathList","returnPromise","errorList","result","errorMessage","e","triggerNamePathList","values","onFinish","onFinishFailed","useForm","form","formRef","React","forceUpdate","forceReRender","formStore"],"mappings":";;;;;;;;;;;;;;AAUO,MAAMA,EAAU;AAAA,EAYrB,YAAYC,GAAiB;AAX7B,IAAAC,EAAA,oBAAa;AACb,IAAAA,EAAA;AACA,IAAAA,EAAA,sBAAe;AACf,IAAAA,EAAA,eAAQ,CAAA;AACR,IAAAA,EAAA,uBAAgB,CAAA;AAChB,IAAAA,EAAA,uBAAgB,CAAA;AAChB,IAAAA,EAAA,mBAAY,CAAA;AACZ,IAAAA,EAAA,0BAAmB;AACnB,IAAAA,EAAA,kBAAW;AACX,IAAAA,EAAA,6BAAsB;AACtB,IAAAA,EAAA,uBAAgB,IAAIC,EAAc,IAAI;AAItC,IAAAD,EAAA,iBAAU,OAAO;AAAA,MACf,eAAe,KAAK;AAAA,MACpB,gBAAgB,KAAK;AAAA,MACrB,e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AAsBhF,EAAa,OAAO,CAAAlC,MAAYgG,EAAqB,IAAIhG,EAAS,KAAK+F,CAAS,CAAC,CAAC;AAC9G,kBAAK,sBAAsBmB,CAAmB,GACvCL;AAAA,IACT;AAGA;AAAA,IAAAvH,EAAA,gBAAS,MAAM;AACb,WAAK,gBAAe,GACpB,KAAK,eAAc,EAAG,KAAK,CAAA6H,MAAU;AACnC,cAAM;AAAA,UACJ,UAAAC;AAAA,QACR,IAAU,KAAK;AACT,YAAIA;AACF,cAAI;AACF,YAAAA,EAASD,CAAM;AAAA,UACjB,QAAc;AAAA,UAGd;AAAA,MAEJ,CAAC,EAAE,MAAM,OAAK;AACZ,cAAM;AAAA,UACJ,gBAAAE;AAAA,QACR,IAAU,KAAK;AACT,QAAIA,KACFA,EAAe,CAAC;AAAA,MAEpB,CAAC;AAAA,IACH;AA92BE,SAAK,kBAAkBhI;AAAA,EACzB;AA82BF;AACA,SAASiI,GAAQC,GAAM;AACrB,QAAMC,IAAUC,EAAM,OAAO,IAAI,GAC3B,CAAA,EAAGC,CAAW,IAAID,EAAM,SAAS,CAAA,CAAE;AAGzC,MAAI,CAACD,EAAQ;AACX,QAAID;AACF,MAAAC,EAAQ,UAAUD;AAAA,SACb;AAEL,YAAMI,IAAgB,MAAM;AAC1B,QAAAD,EAAY,CAAA,CAAE;AAAA,MAChB,GACME,IAAY,IAAIxI,EAAUuI,CAAa;AAC7C,MAAAH,EAAQ,UAAUI,EAAU,QAAO;AAAA,IACrC;AAEF,SAAO,CAACJ,EAAQ,OAAO;AACzB;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var o = Object.defineProperty;
|
|
2
|
+
var n = (e, t, s) => t in e ? o(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
+
var a = (e, t, s) => n(e, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
+
import { matchNamePath as c } from "../utils/valueUtil.js";
|
|
5
|
+
const m = (e) => {
|
|
6
|
+
const t = new MessageChannel();
|
|
7
|
+
t.port1.onmessage = e, t.port2.postMessage(null);
|
|
8
|
+
};
|
|
9
|
+
class f {
|
|
10
|
+
constructor(t) {
|
|
11
|
+
a(this, "namePathList", []);
|
|
12
|
+
a(this, "taskId", 0);
|
|
13
|
+
a(this, "watcherList", /* @__PURE__ */ new Set());
|
|
14
|
+
a(this, "form");
|
|
15
|
+
this.form = t;
|
|
16
|
+
}
|
|
17
|
+
register(t) {
|
|
18
|
+
return this.watcherList.add(t), () => {
|
|
19
|
+
this.watcherList.delete(t);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
notify(t) {
|
|
23
|
+
t.forEach((s) => {
|
|
24
|
+
this.namePathList.every((h) => !c(h, s)) && this.namePathList.push(s);
|
|
25
|
+
}), this.doBatch();
|
|
26
|
+
}
|
|
27
|
+
doBatch() {
|
|
28
|
+
this.taskId += 1;
|
|
29
|
+
const t = this.taskId;
|
|
30
|
+
m(() => {
|
|
31
|
+
if (t === this.taskId && this.watcherList.size) {
|
|
32
|
+
const s = this.form.getForm(), h = s.getFieldsValue(), i = s.getFieldsValue(!0);
|
|
33
|
+
this.watcherList.forEach((r) => {
|
|
34
|
+
r(h, i, this.namePathList);
|
|
35
|
+
}), this.namePathList = [];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
f as default
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=useNotifyWatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNotifyWatch.js","sources":["../../../../../../node_modules/@rc-component/form/es/hooks/useNotifyWatch.js"],"sourcesContent":["import { matchNamePath } from \"../utils/valueUtil\";\n/**\n * Call action with delay in macro task.\n */\nconst macroTask = fn => {\n const channel = new MessageChannel();\n channel.port1.onmessage = fn;\n channel.port2.postMessage(null);\n};\nexport default class WatcherCenter {\n namePathList = [];\n taskId = 0;\n watcherList = new Set();\n form;\n constructor(form) {\n this.form = form;\n }\n register(callback) {\n this.watcherList.add(callback);\n return () => {\n this.watcherList.delete(callback);\n };\n }\n notify(namePath) {\n // Insert with deduplication\n namePath.forEach(path => {\n if (this.namePathList.every(exist => !matchNamePath(exist, path))) {\n this.namePathList.push(path);\n }\n });\n this.doBatch();\n }\n doBatch() {\n this.taskId += 1;\n const currentId = this.taskId;\n macroTask(() => {\n if (currentId === this.taskId && this.watcherList.size) {\n const formInst = this.form.getForm();\n const values = formInst.getFieldsValue();\n const allValues = formInst.getFieldsValue(true);\n this.watcherList.forEach(callback => {\n callback(values, allValues, this.namePathList);\n });\n this.namePathList = [];\n }\n });\n }\n}"],"names":["macroTask","fn","channel","WatcherCenter","form","__publicField","callback","namePath","path","exist","matchNamePath","currentId","formInst","values","allValues"],"mappings":";;;;AAIA,MAAMA,IAAY,CAAAC,MAAM;AACtB,QAAMC,IAAU,IAAI,eAAc;AAClC,EAAAA,EAAQ,MAAM,YAAYD,GAC1BC,EAAQ,MAAM,YAAY,IAAI;AAChC;AACe,MAAMC,EAAc;AAAA,EAKjC,YAAYC,GAAM;AAJlB,IAAAC,EAAA,sBAAe,CAAA;AACf,IAAAA,EAAA,gBAAS;AACT,IAAAA,EAAA,qBAAc,oBAAI,IAAG;AACrB,IAAAA,EAAA;AAEE,SAAK,OAAOD;AAAA,EACd;AAAA,EACA,SAASE,GAAU;AACjB,gBAAK,YAAY,IAAIA,CAAQ,GACtB,MAAM;AACX,WAAK,YAAY,OAAOA,CAAQ;AAAA,IAClC;AAAA,EACF;AAAA,EACA,OAAOC,GAAU;AAEf,IAAAA,EAAS,QAAQ,CAAAC,MAAQ;AACvB,MAAI,KAAK,aAAa,MAAM,CAAAC,MAAS,CAACC,EAAcD,GAAOD,CAAI,CAAC,KAC9D,KAAK,aAAa,KAAKA,CAAI;AAAA,IAE/B,CAAC,GACD,KAAK,QAAO;AAAA,EACd;AAAA,EACA,UAAU;AACR,SAAK,UAAU;AACf,UAAMG,IAAY,KAAK;AACvB,IAAAX,EAAU,MAAM;AACd,UAAIW,MAAc,KAAK,UAAU,KAAK,YAAY,MAAM;AACtD,cAAMC,IAAW,KAAK,KAAK,QAAO,GAC5BC,IAASD,EAAS,eAAc,GAChCE,IAAYF,EAAS,eAAe,EAAI;AAC9C,aAAK,YAAY,QAAQ,CAAAN,MAAY;AACnC,UAAAA,EAASO,GAAQC,GAAW,KAAK,YAAY;AAAA,QAC/C,CAAC,GACD,KAAK,eAAe,CAAA;AAAA,MACtB;AAAA,IACF,CAAC;AAAA,EACH;AACF;","x_google_ignoreList":[0]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import R from "
|
|
2
|
-
import
|
|
1
|
+
import R from "../../../../vite-plugin-node-polyfills/shims/process/dist/index.js";
|
|
2
|
+
import S from "../../../util/es/warning.js";
|
|
3
3
|
import { useState as E, useMemo as _, useRef as C, useContext as F, useEffect as h } from "react";
|
|
4
|
-
import I, { HOOK_MARK as M } from "
|
|
5
|
-
import { isFormInstance as W } from "
|
|
6
|
-
import { getNamePath as w } from "
|
|
7
|
-
import D from "
|
|
8
|
-
import H from "
|
|
4
|
+
import I, { HOOK_MARK as M } from "../FieldContext.js";
|
|
5
|
+
import { isFormInstance as W } from "../utils/typeUtil.js";
|
|
6
|
+
import { getNamePath as w } from "../utils/valueUtil.js";
|
|
7
|
+
import D from "../../../util/es/hooks/useEvent.js";
|
|
8
|
+
import H from "../../../util/es/utils/get.js";
|
|
9
9
|
function f(n) {
|
|
10
10
|
try {
|
|
11
11
|
return JSON.stringify(n);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWatch.js","sources":["../../../../../../node_modules/@rc-component/form/es/hooks/useWatch.js"],"sourcesContent":["import warning from \"@rc-component/util/es/warning\";\nimport { useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport FieldContext, { HOOK_MARK } from \"../FieldContext\";\nimport { isFormInstance } from \"../utils/typeUtil\";\nimport { getNamePath, getValue } from \"../utils/valueUtil\";\nimport { useEvent } from '@rc-component/util';\nexport function stringify(value) {\n try {\n return JSON.stringify(value);\n } catch {\n return Math.random();\n }\n}\n\n// ------- selector type -------\n\n// ------- selector type end -------\n\nfunction useWatch(...args) {\n const [dependencies, _form = {}] = args;\n const options = isFormInstance(_form) ? {\n form: _form\n } : _form;\n const form = options.form;\n const [value, setValue] = useState(() => typeof dependencies === 'function' ? dependencies({}) : undefined);\n const valueStr = useMemo(() => stringify(value), [value]);\n const valueStrRef = useRef(valueStr);\n valueStrRef.current = valueStr;\n const fieldContext = useContext(FieldContext);\n const formInstance = form || fieldContext;\n const isValidForm = formInstance && formInstance._init;\n\n // Warning if not exist form instance\n if (process.env.NODE_ENV !== 'production') {\n warning(args.length === 2 ? form ? isValidForm : true : isValidForm, 'useWatch requires a form instance since it can not auto detect from context.');\n }\n\n // ============================== Form ==============================\n const {\n getFieldsValue,\n getInternalHooks\n } = formInstance;\n const {\n registerWatch\n } = getInternalHooks(HOOK_MARK);\n\n // ============================= Update =============================\n const triggerUpdate = useEvent((values, allValues) => {\n const watchValue = options.preserve ? allValues ?? getFieldsValue(true) : values ?? getFieldsValue();\n const nextValue = typeof dependencies === 'function' ? dependencies(watchValue) : getValue(watchValue, getNamePath(dependencies));\n if (stringify(value) !== stringify(nextValue)) {\n setValue(nextValue);\n }\n });\n\n // ============================= Effect =============================\n const flattenDeps = typeof dependencies === 'function' ? dependencies : JSON.stringify(dependencies);\n\n // Deps changed\n useEffect(() => {\n // Skip if not exist form instance\n if (!isValidForm) {\n return;\n }\n triggerUpdate();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isValidForm, flattenDeps]);\n\n // Value changed\n useEffect(() => {\n // Skip if not exist form instance\n if (!isValidForm) {\n return;\n }\n const cancelRegister = registerWatch((values, allValues) => {\n triggerUpdate(values, allValues);\n });\n return cancelRegister;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isValidForm]);\n return value;\n}\nexport default useWatch;"],"names":["stringify","value","useWatch","args","dependencies","_form","options","isFormInstance","form","setValue","useState","valueStr","useMemo","valueStrRef","useRef","fieldContext","useContext","FieldContext","formInstance","isValidForm","process","warning","getFieldsValue","getInternalHooks","registerWatch","HOOK_MARK","triggerUpdate","useEvent","values","allValues","watchValue","nextValue","getValue","getNamePath","flattenDeps","useEffect"],"mappings":";;;;;;;;AAMO,SAASA,EAAUC,GAAO;AAC/B,MAAI;AACF,WAAO,KAAK,UAAUA,CAAK;AAAA,EAC7B,QAAQ;AACN,WAAO,KAAK,OAAM;AAAA,EACpB;AACF;AAMA,SAASC,KAAYC,GAAM;AACzB,QAAM,CAACC,GAAcC,IAAQ,CAAA,CAAE,IAAIF,GAC7BG,IAAUC,EAAeF,CAAK,IAAI;AAAA,IACtC,MAAMA;AAAA,EACV,IAAMA,GACEG,IAAOF,EAAQ,MACf,CAACL,GAAOQ,CAAQ,IAAIC,EAAS,MAAM,OAAON,KAAiB,aAAaA,EAAa,CAAA,CAAE,IAAI,MAAS,GACpGO,IAAWC,EAAQ,MAAMZ,EAAUC,CAAK,GAAG,CAACA,CAAK,CAAC,GAClDY,IAAcC,EAAOH,CAAQ;AACnC,EAAAE,EAAY,UAAUF;AACtB,QAAMI,IAAeC,EAAWC,CAAY,GACtCC,IAAeV,KAAQO,GACvBI,IAAcD,KAAgBA,EAAa;AAGjD,EAAIE,EAAQ,IAAI,aAAa,gBAC3BC,EAAQlB,EAAK,WAAW,IAAIK,IAAOW,IAAc,KAAOA,GAAa,8EAA8E;AAIrJ,QAAM;AAAA,IACJ,gBAAAG;AAAA,IACA,kBAAAC;AAAA,EACJ,IAAML,GACE;AAAA,IACJ,eAAAM;AAAA,EACJ,IAAMD,EAAiBE,CAAS,GAGxBC,IAAgBC,EAAS,CAACC,GAAQC,MAAc;AACpD,UAAMC,IAAaxB,EAAQ,WAAWuB,KAAaP,EAAe,EAAI,IAAIM,KAAUN,EAAc,GAC5FS,IAAY,OAAO3B,KAAiB,aAAaA,EAAa0B,CAAU,IAAIE,EAASF,GAAYG,EAAY7B,CAAY,CAAC;AAChI,IAAIJ,EAAUC,CAAK,MAAMD,EAAU+B,CAAS,KAC1CtB,EAASsB,CAAS;AAAA,EAEtB,CAAC,GAGKG,IAAc,OAAO9B,KAAiB,aAAaA,IAAe,KAAK,UAAUA,CAAY;AAGnG,SAAA+B,EAAU,MAAM;AAEd,IAAKhB,KAGLO,EAAa;AAAA,EAGf,GAAG,CAACP,GAAae,CAAW,CAAC,GAG7BC,EAAU,MAEHhB,IAGkBK,EAAc,CAACI,GAAQC,MAAc;AAC1D,IAAAH,EAAcE,GAAQC,CAAS;AAAA,EACjC,CAAC,IAJC,QAQD,CAACV,CAAW,CAAC,GACTlB;AACT;","x_google_ignoreList":[0]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as o from "react";
|
|
2
2
|
import m from "./Field.js";
|
|
3
3
|
import t from "./List.js";
|
|
4
|
-
import e from "./useForm.js";
|
|
4
|
+
import e from "./hooks/useForm.js";
|
|
5
5
|
import i from "./Form.js";
|
|
6
6
|
import { FormProvider as f } from "./FormContext.js";
|
|
7
|
-
import s from "./useWatch.js";
|
|
7
|
+
import s from "./hooks/useWatch.js";
|
|
8
8
|
const a = /* @__PURE__ */ o.forwardRef(i), r = a;
|
|
9
9
|
r.FormProvider = f;
|
|
10
10
|
r.Field = m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@rc-component/form/es/index.js"],"sourcesContent":["import * as React from 'react';\nimport Field from \"./Field\";\nimport List from \"./List\";\nimport useForm from \"./useForm\";\nimport FieldForm from \"./Form\";\nimport { FormProvider } from \"./FormContext\";\nimport FieldContext from \"./FieldContext\";\nimport ListContext from \"./ListContext\";\nimport useWatch from \"./useWatch\";\nconst InternalForm = /*#__PURE__*/React.forwardRef(FieldForm);\nconst RefForm = InternalForm;\nRefForm.FormProvider = FormProvider;\nRefForm.Field = Field;\nRefForm.List = List;\nRefForm.useForm = useForm;\nRefForm.useWatch = useWatch;\nexport { Field, List, useForm, FormProvider, FieldContext, ListContext, useWatch };\nexport default RefForm;"],"names":["InternalForm","React","FieldForm","RefForm","FormProvider","Field","List","useForm","useWatch"],"mappings":";;;;;;;AASA,MAAMA,IAA4B,gBAAAC,EAAM,WAAWC,CAAS,GACtDC,IAAUH;AAChBG,EAAQ,eAAeC;AACvBD,EAAQ,QAAQE;AAChBF,EAAQ,OAAOG;AACfH,EAAQ,UAAUI;AAClBJ,EAAQ,WAAWK;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@rc-component/form/es/index.js"],"sourcesContent":["import * as React from 'react';\nimport Field from \"./Field\";\nimport List from \"./List\";\nimport useForm from \"./hooks/useForm\";\nimport FieldForm from \"./Form\";\nimport { FormProvider } from \"./FormContext\";\nimport FieldContext from \"./FieldContext\";\nimport ListContext from \"./ListContext\";\nimport useWatch from \"./hooks/useWatch\";\nconst InternalForm = /*#__PURE__*/React.forwardRef(FieldForm);\nconst RefForm = InternalForm;\nRefForm.FormProvider = FormProvider;\nRefForm.Field = Field;\nRefForm.List = List;\nRefForm.useForm = useForm;\nRefForm.useWatch = useWatch;\nexport { Field, List, useForm, FormProvider, FieldContext, ListContext, useWatch };\nexport default RefForm;"],"names":["InternalForm","React","FieldForm","RefForm","FormProvider","Field","List","useForm","useWatch"],"mappings":";;;;;;;AASA,MAAMA,IAA4B,gBAAAC,EAAM,WAAWC,CAAS,GACtDC,IAAUH;AAChBG,EAAQ,eAAeC;AACvBD,EAAQ,QAAQE;AAChBF,EAAQ,OAAOG;AACfH,EAAQ,UAAUI;AAClBJ,EAAQ,WAAWK;","x_google_ignoreList":[0]}
|
|
@@ -1,37 +1,43 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
return s.map((t) => `${typeof t}:${t}`).join(
|
|
1
|
+
var l = Object.defineProperty;
|
|
2
|
+
var p = (s, t, e) => t in s ? l(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
+
var h = (s, t, e) => p(s, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
const c = "__@field_split__";
|
|
5
|
+
function u(s) {
|
|
6
|
+
return s.map((t) => `${typeof t}:${t}`).join(c);
|
|
7
7
|
}
|
|
8
|
-
class
|
|
8
|
+
class f {
|
|
9
9
|
constructor() {
|
|
10
|
-
|
|
10
|
+
h(this, "kvs", /* @__PURE__ */ new Map());
|
|
11
11
|
}
|
|
12
12
|
set(t, e) {
|
|
13
|
-
this.kvs.set(
|
|
13
|
+
this.kvs.set(u(t), e);
|
|
14
14
|
}
|
|
15
15
|
get(t) {
|
|
16
|
-
return this.kvs.get(
|
|
16
|
+
return this.kvs.get(u(t));
|
|
17
|
+
}
|
|
18
|
+
getAsPrefix(t) {
|
|
19
|
+
const e = u(t), r = e + c, n = [], i = this.kvs.get(e);
|
|
20
|
+
return i !== void 0 && n.push(i), this.kvs.forEach((a, o) => {
|
|
21
|
+
o.startsWith(r) && n.push(a);
|
|
22
|
+
}), n;
|
|
17
23
|
}
|
|
18
24
|
update(t, e) {
|
|
19
|
-
const
|
|
20
|
-
|
|
25
|
+
const r = this.get(t), n = e(r);
|
|
26
|
+
n ? this.set(t, n) : this.delete(t);
|
|
21
27
|
}
|
|
22
28
|
delete(t) {
|
|
23
|
-
this.kvs.delete(
|
|
29
|
+
this.kvs.delete(u(t));
|
|
24
30
|
}
|
|
25
31
|
// Since we only use this in test, let simply realize this
|
|
26
32
|
map(t) {
|
|
27
|
-
return [...this.kvs.entries()].map(([e,
|
|
28
|
-
const
|
|
33
|
+
return [...this.kvs.entries()].map(([e, r]) => {
|
|
34
|
+
const n = e.split(c);
|
|
29
35
|
return t({
|
|
30
|
-
key:
|
|
31
|
-
const [,
|
|
32
|
-
return
|
|
36
|
+
key: n.map((i) => {
|
|
37
|
+
const [, a, o] = i.match(/^([^:]*):(.*)$/);
|
|
38
|
+
return a === "number" ? Number(o) : o;
|
|
33
39
|
}),
|
|
34
|
-
value:
|
|
40
|
+
value: r
|
|
35
41
|
});
|
|
36
42
|
});
|
|
37
43
|
}
|
|
@@ -39,11 +45,11 @@ class d {
|
|
|
39
45
|
const t = {};
|
|
40
46
|
return this.map(({
|
|
41
47
|
key: e,
|
|
42
|
-
value:
|
|
43
|
-
}) => (t[e.join(".")] =
|
|
48
|
+
value: r
|
|
49
|
+
}) => (t[e.join(".")] = r, null)), t;
|
|
44
50
|
}
|
|
45
51
|
}
|
|
46
52
|
export {
|
|
47
|
-
|
|
53
|
+
f as default
|
|
48
54
|
};
|
|
49
55
|
//# sourceMappingURL=NameMap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NameMap.js","sources":["../../../../../../node_modules/@rc-component/form/es/utils/NameMap.js"],"sourcesContent":["const SPLIT = '__@field_split__';\n\n/**\n * Convert name path into string to fast the fetch speed of Map.\n */\nfunction normalize(namePath) {\n return namePath.map(cell => `${typeof cell}:${cell}`)\n // Magic split\n .join(SPLIT);\n}\n\n/**\n * NameMap like a `Map` but accepts `string[]` as key.\n */\nclass NameMap {\n kvs = new Map();\n set(key, value) {\n this.kvs.set(normalize(key), value);\n }\n get(key) {\n return this.kvs.get(normalize(key));\n }\n update(key, updater) {\n const origin = this.get(key);\n const next = updater(origin);\n if (!next) {\n this.delete(key);\n } else {\n this.set(key, next);\n }\n }\n delete(key) {\n this.kvs.delete(normalize(key));\n }\n\n // Since we only use this in test, let simply realize this\n map(callback) {\n return [...this.kvs.entries()].map(([key, value]) => {\n const cells = key.split(SPLIT);\n return callback({\n key: cells.map(cell => {\n const [, type, unit] = cell.match(/^([^:]*):(.*)$/);\n return type === 'number' ? Number(unit) : unit;\n }),\n value\n });\n });\n }\n toJSON() {\n const json = {};\n this.map(({\n key,\n value\n }) => {\n json[key.join('.')] = value;\n return null;\n });\n return json;\n }\n}\nexport default NameMap;"],"names":["SPLIT","normalize","namePath","cell","NameMap","__publicField","key","value","updater","origin","next","callback","cells","type","unit","json"],"mappings":";;;AAAA,MAAMA,IAAQ;AAKd,SAASC,EAAUC,GAAU;AAC3B,SAAOA,EAAS,IAAI,CAAAC,MAAQ,GAAG,OAAOA,CAAI,IAAIA,CAAI,EAAE,EAEnD,KAAKH,CAAK;AACb;AAKA,MAAMI,EAAQ;AAAA,EAAd;AACE,IAAAC,EAAA,aAAM,oBAAI,IAAG;AAAA;AAAA,EACb,IAAIC,GAAKC,GAAO;AACd,SAAK,IAAI,IAAIN,EAAUK,CAAG,GAAGC,CAAK;AAAA,EACpC;AAAA,EACA,IAAID,GAAK;AACP,WAAO,KAAK,IAAI,IAAIL,EAAUK,CAAG,CAAC;AAAA,EACpC;AAAA,EACA,
|
|
1
|
+
{"version":3,"file":"NameMap.js","sources":["../../../../../../node_modules/@rc-component/form/es/utils/NameMap.js"],"sourcesContent":["const SPLIT = '__@field_split__';\n\n/**\n * Convert name path into string to fast the fetch speed of Map.\n */\nfunction normalize(namePath) {\n return namePath.map(cell => `${typeof cell}:${cell}`)\n // Magic split\n .join(SPLIT);\n}\n\n/**\n * NameMap like a `Map` but accepts `string[]` as key.\n */\nclass NameMap {\n kvs = new Map();\n set(key, value) {\n this.kvs.set(normalize(key), value);\n }\n get(key) {\n return this.kvs.get(normalize(key));\n }\n getAsPrefix(key) {\n const normalizedKey = normalize(key);\n const normalizedPrefix = normalizedKey + SPLIT;\n const results = [];\n const current = this.kvs.get(normalizedKey);\n if (current !== undefined) {\n results.push(current);\n }\n this.kvs.forEach((value, itemNormalizedKey) => {\n if (itemNormalizedKey.startsWith(normalizedPrefix)) {\n results.push(value);\n }\n });\n return results;\n }\n update(key, updater) {\n const origin = this.get(key);\n const next = updater(origin);\n if (!next) {\n this.delete(key);\n } else {\n this.set(key, next);\n }\n }\n delete(key) {\n this.kvs.delete(normalize(key));\n }\n\n // Since we only use this in test, let simply realize this\n map(callback) {\n return [...this.kvs.entries()].map(([key, value]) => {\n const cells = key.split(SPLIT);\n return callback({\n key: cells.map(cell => {\n const [, type, unit] = cell.match(/^([^:]*):(.*)$/);\n return type === 'number' ? Number(unit) : unit;\n }),\n value\n });\n });\n }\n toJSON() {\n const json = {};\n this.map(({\n key,\n value\n }) => {\n json[key.join('.')] = value;\n return null;\n });\n return json;\n }\n}\nexport default NameMap;"],"names":["SPLIT","normalize","namePath","cell","NameMap","__publicField","key","value","normalizedKey","normalizedPrefix","results","current","itemNormalizedKey","updater","origin","next","callback","cells","type","unit","json"],"mappings":";;;AAAA,MAAMA,IAAQ;AAKd,SAASC,EAAUC,GAAU;AAC3B,SAAOA,EAAS,IAAI,CAAAC,MAAQ,GAAG,OAAOA,CAAI,IAAIA,CAAI,EAAE,EAEnD,KAAKH,CAAK;AACb;AAKA,MAAMI,EAAQ;AAAA,EAAd;AACE,IAAAC,EAAA,aAAM,oBAAI,IAAG;AAAA;AAAA,EACb,IAAIC,GAAKC,GAAO;AACd,SAAK,IAAI,IAAIN,EAAUK,CAAG,GAAGC,CAAK;AAAA,EACpC;AAAA,EACA,IAAID,GAAK;AACP,WAAO,KAAK,IAAI,IAAIL,EAAUK,CAAG,CAAC;AAAA,EACpC;AAAA,EACA,YAAYA,GAAK;AACf,UAAME,IAAgBP,EAAUK,CAAG,GAC7BG,IAAmBD,IAAgBR,GACnCU,IAAU,CAAA,GACVC,IAAU,KAAK,IAAI,IAAIH,CAAa;AAC1C,WAAIG,MAAY,UACdD,EAAQ,KAAKC,CAAO,GAEtB,KAAK,IAAI,QAAQ,CAACJ,GAAOK,MAAsB;AAC7C,MAAIA,EAAkB,WAAWH,CAAgB,KAC/CC,EAAQ,KAAKH,CAAK;AAAA,IAEtB,CAAC,GACMG;AAAA,EACT;AAAA,EACA,OAAOJ,GAAKO,GAAS;AACnB,UAAMC,IAAS,KAAK,IAAIR,CAAG,GACrBS,IAAOF,EAAQC,CAAM;AAC3B,IAAKC,IAGH,KAAK,IAAIT,GAAKS,CAAI,IAFlB,KAAK,OAAOT,CAAG;AAAA,EAInB;AAAA,EACA,OAAOA,GAAK;AACV,SAAK,IAAI,OAAOL,EAAUK,CAAG,CAAC;AAAA,EAChC;AAAA;AAAA,EAGA,IAAIU,GAAU;AACZ,WAAO,CAAC,GAAG,KAAK,IAAI,QAAO,CAAE,EAAE,IAAI,CAAC,CAACV,GAAKC,CAAK,MAAM;AACnD,YAAMU,IAAQX,EAAI,MAAMN,CAAK;AAC7B,aAAOgB,EAAS;AAAA,QACd,KAAKC,EAAM,IAAI,CAAAd,MAAQ;AACrB,gBAAM,CAAA,EAAGe,GAAMC,CAAI,IAAIhB,EAAK,MAAM,gBAAgB;AAClD,iBAAOe,MAAS,WAAW,OAAOC,CAAI,IAAIA;AAAA,QAC5C,CAAC;AAAA,QACD,OAAAZ;AAAA,MACR,CAAO;AAAA,IACH,CAAC;AAAA,EACH;AAAA,EACA,SAAS;AACP,UAAMa,IAAO,CAAA;AACb,gBAAK,IAAI,CAAC;AAAA,MACR,KAAAd;AAAA,MACA,OAAAC;AAAA,IACN,OACMa,EAAKd,EAAI,KAAK,GAAG,CAAC,IAAIC,GACf,KACR,GACMa;AAAA,EACT;AACF;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sources":["../../../../../../node_modules/@rc-component/form/es/utils/messages.js"],"sourcesContent":["const typeTemplate = \"'${name}' is not a valid ${type}\";\nexport const defaultValidateMessages = {\n default: \"Validation error on field '${name}'\",\n required: \"'${name}' is required\",\n enum: \"'${name}' must be one of [${enum}]\",\n whitespace: \"'${name}' cannot be empty\",\n date: {\n format: \"'${name}' is invalid for format date\",\n parse: \"'${name}' could not be parsed as date\",\n invalid: \"'${name}' is invalid date\"\n },\n types: {\n string: typeTemplate,\n method: typeTemplate,\n array: typeTemplate,\n object: typeTemplate,\n number: typeTemplate,\n date: typeTemplate,\n boolean: typeTemplate,\n integer: typeTemplate,\n float: typeTemplate,\n regexp: typeTemplate,\n email: typeTemplate,\n url: typeTemplate,\n hex: typeTemplate\n },\n string: {\n len: \"'${name}' must be exactly ${len} characters\",\n min: \"'${name}' must be at least ${min} characters\",\n max: \"'${name}' cannot be longer than ${max} characters\",\n range: \"'${name}' must be between ${min} and ${max} characters\"\n },\n number: {\n len: \"'${name}' must equal ${len}\",\n min: \"'${name}' cannot be less than ${min}\",\n max: \"'${name}' cannot be greater than ${max}\",\n range: \"'${name}' must be between ${min} and ${max}\"\n },\n array: {\n len: \"'${name}' must be exactly ${len} in length\",\n min: \"'${name}' cannot be less than ${min} in length\",\n max: \"'${name}' cannot be greater than ${max} in length\",\n range: \"'${name}' must be between ${min} and ${max} in length\"\n },\n pattern: {\n mismatch: \"'${name}' does not match pattern ${pattern}\"\n }\n};"],"names":["typeTemplate","defaultValidateMessages"],"mappings":"AAAA,MAAMA,IAAe,oCACRC,IAA0B;AAAA,EACrC,SAAS;AAAA,EACT,UAAU;AAAA,EACV,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,SAAS;AAAA,EACb;AAAA,EACE,OAAO;AAAA,IACL,QAAQD;AAAA,IACR,QAAQA;AAAA,IACR,OAAOA;AAAA,IACP,QAAQA;AAAA,IACR,QAAQA;AAAA,IACR,MAAMA;AAAA,IACN,SAASA;AAAA,IACT,SAASA;AAAA,IACT,OAAOA;AAAA,IACP,QAAQA;AAAA,IACR,OAAOA;AAAA,IACP,KAAKA;AAAA,IACL,KAAKA;AAAA,EACT;AAAA,EACE,QAAQ;AAAA,IACN,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EACE,QAAQ;AAAA,IACN,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EACE,OAAO;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EACE,SAAS;AAAA,IACP,UAAU;AAAA,EACd;AACA;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"messages.js","sources":["../../../../../../node_modules/@rc-component/form/es/utils/messages.js"],"sourcesContent":["const typeTemplate = \"'${name}' is not a valid ${type}\";\nexport const defaultValidateMessages = {\n default: \"Validation error on field '${name}'\",\n required: \"'${name}' is required\",\n enum: \"'${name}' must be one of [${enum}]\",\n whitespace: \"'${name}' cannot be empty\",\n date: {\n format: \"'${name}' is invalid for format date\",\n parse: \"'${name}' could not be parsed as date\",\n invalid: \"'${name}' is invalid date\"\n },\n types: {\n string: typeTemplate,\n method: typeTemplate,\n array: typeTemplate,\n object: typeTemplate,\n number: typeTemplate,\n date: typeTemplate,\n boolean: typeTemplate,\n integer: typeTemplate,\n float: typeTemplate,\n regexp: typeTemplate,\n email: typeTemplate,\n tel: typeTemplate,\n url: typeTemplate,\n hex: typeTemplate\n },\n string: {\n len: \"'${name}' must be exactly ${len} characters\",\n min: \"'${name}' must be at least ${min} characters\",\n max: \"'${name}' cannot be longer than ${max} characters\",\n range: \"'${name}' must be between ${min} and ${max} characters\"\n },\n number: {\n len: \"'${name}' must equal ${len}\",\n min: \"'${name}' cannot be less than ${min}\",\n max: \"'${name}' cannot be greater than ${max}\",\n range: \"'${name}' must be between ${min} and ${max}\"\n },\n array: {\n len: \"'${name}' must be exactly ${len} in length\",\n min: \"'${name}' cannot be less than ${min} in length\",\n max: \"'${name}' cannot be greater than ${max} in length\",\n range: \"'${name}' must be between ${min} and ${max} in length\"\n },\n pattern: {\n mismatch: \"'${name}' does not match pattern ${pattern}\"\n }\n};"],"names":["typeTemplate","defaultValidateMessages"],"mappings":"AAAA,MAAMA,IAAe,oCACRC,IAA0B;AAAA,EACrC,SAAS;AAAA,EACT,UAAU;AAAA,EACV,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,SAAS;AAAA,EACb;AAAA,EACE,OAAO;AAAA,IACL,QAAQD;AAAA,IACR,QAAQA;AAAA,IACR,OAAOA;AAAA,IACP,QAAQA;AAAA,IACR,QAAQA;AAAA,IACR,MAAMA;AAAA,IACN,SAASA;AAAA,IACT,SAASA;AAAA,IACT,OAAOA;AAAA,IACP,QAAQA;AAAA,IACR,OAAOA;AAAA,IACP,KAAKA;AAAA,IACL,KAAKA;AAAA,IACL,KAAKA;AAAA,EACT;AAAA,EACE,QAAQ;AAAA,IACN,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EACE,QAAQ;AAAA,IACN,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EACE,OAAO;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EACE,SAAS;AAAA,IACP,UAAU;AAAA,EACd;AACA;","x_google_ignoreList":[0]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import F from "../../../async-validator/es/index.js";
|
|
2
2
|
import * as O from "react";
|
|
3
|
-
import
|
|
3
|
+
import P from "../../../util/es/warning.js";
|
|
4
4
|
import { defaultValidateMessages as C } from "./messages.js";
|
|
5
5
|
import { merge as E } from "../../../util/es/utils/set.js";
|
|
6
6
|
const v = F;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valueUtil.js","sources":["../../../../../../node_modules/@rc-component/form/es/utils/valueUtil.js"],"sourcesContent":["import getValue from \"@rc-component/util/es/utils/get\";\nimport setValue from \"@rc-component/util/es/utils/set\";\nimport { toArray } from \"./typeUtil\";\nexport { getValue, setValue };\n\n/**\n * Convert name to internal supported format.\n * This function should keep since we still thinking if need support like `a.b.c` format.\n * 'a' => ['a']\n * 123 => [123]\n * ['a', 123] => ['a', 123]\n */\nexport function getNamePath(path) {\n return toArray(path);\n}\n\n/**\n * Create a new store object that contains only the values referenced by\n * the provided list of name paths.\n */\nexport function cloneByNamePathList(store, namePathList) {\n let newStore = {};\n namePathList.forEach(namePath => {\n const value = getValue(store, namePath);\n newStore = setValue(newStore, namePath, value);\n });\n return newStore;\n}\n\n/**\n * Check if `namePathList` includes `namePath`.\n * @param namePathList A list of `InternalNamePath[]`\n * @param namePath Compare `InternalNamePath`\n * @param partialMatch True will make `[a, b]` match `[a, b, c]`\n */\nexport function containsNamePath(namePathList, namePath, partialMatch = false) {\n return namePathList && namePathList.some(path => matchNamePath(namePath, path, partialMatch));\n}\n\n/**\n * Check if `namePath` is super set or equal of `subNamePath`.\n * @param namePath A list of `InternalNamePath[]`\n * @param subNamePath Compare `InternalNamePath`\n * @param partialMatch True will make `[a, b]` match `[a, b, c]`\n */\nexport function matchNamePath(namePath, subNamePath, partialMatch = false) {\n if (!namePath || !subNamePath) {\n return false;\n }\n if (!partialMatch && namePath.length !== subNamePath.length) {\n return false;\n }\n return subNamePath.every((nameUnit, i) => namePath[i] === nameUnit);\n}\n\n// Like `shallowEqual`, but we not check the data which may cause re-render\n\nexport function isSimilar(source, target) {\n if (source === target) {\n return true;\n }\n if (!source && target || source && !target) {\n return false;\n }\n if (!source || !target || typeof source !== 'object' || typeof target !== 'object') {\n return false;\n }\n const sourceKeys = Object.keys(source);\n const targetKeys = Object.keys(target);\n const keys = new Set([...sourceKeys, ...targetKeys]);\n return [...keys].every(key => {\n const sourceValue = source[key];\n const targetValue = target[key];\n if (typeof sourceValue === 'function' && typeof targetValue === 'function') {\n return true;\n }\n return sourceValue === targetValue;\n });\n}\nexport function defaultGetValueFromEvent(valuePropName, ...args) {\n const event = args[0];\n if (event && event.target && typeof event.target === 'object' && valuePropName in event.target) {\n return event.target[valuePropName];\n }\n return event;\n}\n\n/**\n * Moves an array item from one position in an array to another.\n *\n * Note: This is a pure function so a new array will be returned, instead\n * of altering the array argument.\n *\n * @param array Array in which to move an item. (required)\n * @param moveIndex The index of the item to move. (required)\n * @param toIndex The index to move item at moveIndex to. (required)\n */\nexport function move(array, moveIndex, toIndex) {\n const {\n length\n } = array;\n if (moveIndex < 0 || moveIndex >= length || toIndex < 0 || toIndex >= length) {\n return array;\n }\n const item = array[moveIndex];\n const diff = moveIndex - toIndex;\n if (diff > 0) {\n // move left\n return [...array.slice(0, toIndex), item, ...array.slice(toIndex, moveIndex), ...array.slice(moveIndex + 1, length)];\n }\n if (diff < 0) {\n // move right\n return [...array.slice(0, moveIndex), ...array.slice(moveIndex + 1, toIndex + 1), item, ...array.slice(toIndex + 1, length)];\n }\n return array;\n}"],"names":["getNamePath","path","toArray","cloneByNamePathList","store","namePathList","newStore","namePath","value","getValue","setValue","containsNamePath","partialMatch","matchNamePath","subNamePath","nameUnit","isSimilar","source","target","sourceKeys","targetKeys","key","sourceValue","targetValue","defaultGetValueFromEvent","valuePropName","args","event","move","array","moveIndex","toIndex","length","item","diff"],"mappings":";;;AAYO,SAASA,EAAYC,GAAM;AAChC,SAAOC,EAAQD,CAAI;AACrB;AAMO,SAASE,EAAoBC,GAAOC,GAAc;AACvD,MAAIC,IAAW,CAAA;AACf,SAAAD,EAAa,QAAQ,CAAAE,MAAY;AAC/B,UAAMC,IAAQC,EAASL,GAAOG,CAAQ;AACtC,IAAAD,IAAWI,EAASJ,GAAUC,GAAUC,CAAK;AAAA,EAC/C,CAAC,GACMF;AACT;AAQO,SAASK,EAAiBN,GAAcE,GAAUK,IAAe,IAAO;AAC7E,SAAOP,KAAgBA,EAAa,KAAK,CAAAJ,MAAQY,EAAcN,GAAUN,GAAMW,CAAY,CAAC;AAC9F;AAQO,SAASC,EAAcN,GAAUO,GAAaF,IAAe,IAAO;AAIzE,SAHI,CAACL,KAAY,CAACO,KAGd,CAACF,KAAgBL,EAAS,WAAWO,EAAY,SAC5C,KAEFA,EAAY,MAAM,CAACC,GAAU,MAAMR,EAAS,CAAC,MAAMQ,CAAQ;AACpE;AAIO,SAASC,EAAUC,GAAQC,GAAQ;AACxC,MAAID,MAA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
|
|
1
|
+
{"version":3,"file":"valueUtil.js","sources":["../../../../../../node_modules/@rc-component/form/es/utils/valueUtil.js"],"sourcesContent":["import getValue from \"@rc-component/util/es/utils/get\";\nimport setValue from \"@rc-component/util/es/utils/set\";\nimport { toArray } from \"./typeUtil\";\nexport { getValue, setValue };\n\n/**\n * Convert name to internal supported format.\n * This function should keep since we still thinking if need support like `a.b.c` format.\n * 'a' => ['a']\n * 123 => [123]\n * ['a', 123] => ['a', 123]\n */\nexport function getNamePath(path) {\n return toArray(path);\n}\n\n/**\n * Create a new store object that contains only the values referenced by\n * the provided list of name paths.\n */\nexport function cloneByNamePathList(store, namePathList) {\n let newStore = {};\n namePathList.forEach(namePath => {\n const value = getValue(store, namePath);\n newStore = setValue(newStore, namePath, value);\n });\n return newStore;\n}\n\n/**\n * Check if `namePathList` includes `namePath`.\n * @param namePathList A list of `InternalNamePath[]`\n * @param namePath Compare `InternalNamePath`\n * @param partialMatch True will make `[a, b]` match `[a, b, c]`\n */\nexport function containsNamePath(namePathList, namePath, partialMatch = false) {\n return namePathList && namePathList.some(path => matchNamePath(namePath, path, partialMatch));\n}\n\n/**\n * Check if `namePath` is super set or equal of `subNamePath`.\n * @param namePath A list of `InternalNamePath[]`\n * @param subNamePath Compare `InternalNamePath`\n * @param partialMatch Default false. True will make `[a, b]` match `[a, b, c]`\n */\nexport function matchNamePath(namePath, subNamePath, partialMatch = false) {\n if (!namePath || !subNamePath) {\n return false;\n }\n if (!partialMatch && namePath.length !== subNamePath.length) {\n return false;\n }\n return subNamePath.every((nameUnit, i) => namePath[i] === nameUnit);\n}\n\n// Like `shallowEqual`, but we not check the data which may cause re-render\n\nexport function isSimilar(source, target) {\n if (source === target) {\n return true;\n }\n if (!source && target || source && !target) {\n return false;\n }\n if (!source || !target || typeof source !== 'object' || typeof target !== 'object') {\n return false;\n }\n const sourceKeys = Object.keys(source);\n const targetKeys = Object.keys(target);\n const keys = new Set([...sourceKeys, ...targetKeys]);\n return [...keys].every(key => {\n const sourceValue = source[key];\n const targetValue = target[key];\n if (typeof sourceValue === 'function' && typeof targetValue === 'function') {\n return true;\n }\n return sourceValue === targetValue;\n });\n}\nexport function defaultGetValueFromEvent(valuePropName, ...args) {\n const event = args[0];\n if (event && event.target && typeof event.target === 'object' && valuePropName in event.target) {\n return event.target[valuePropName];\n }\n return event;\n}\n\n/**\n * Moves an array item from one position in an array to another.\n *\n * Note: This is a pure function so a new array will be returned, instead\n * of altering the array argument.\n *\n * @param array Array in which to move an item. (required)\n * @param moveIndex The index of the item to move. (required)\n * @param toIndex The index to move item at moveIndex to. (required)\n */\nexport function move(array, moveIndex, toIndex) {\n const {\n length\n } = array;\n if (moveIndex < 0 || moveIndex >= length || toIndex < 0 || toIndex >= length) {\n return array;\n }\n const item = array[moveIndex];\n const diff = moveIndex - toIndex;\n if (diff > 0) {\n // move left\n return [...array.slice(0, toIndex), item, ...array.slice(toIndex, moveIndex), ...array.slice(moveIndex + 1, length)];\n }\n if (diff < 0) {\n // move right\n return [...array.slice(0, moveIndex), ...array.slice(moveIndex + 1, toIndex + 1), item, ...array.slice(toIndex + 1, length)];\n }\n return array;\n}"],"names":["getNamePath","path","toArray","cloneByNamePathList","store","namePathList","newStore","namePath","value","getValue","setValue","containsNamePath","partialMatch","matchNamePath","subNamePath","nameUnit","isSimilar","source","target","sourceKeys","targetKeys","key","sourceValue","targetValue","defaultGetValueFromEvent","valuePropName","args","event","move","array","moveIndex","toIndex","length","item","diff"],"mappings":";;;AAYO,SAASA,EAAYC,GAAM;AAChC,SAAOC,EAAQD,CAAI;AACrB;AAMO,SAASE,EAAoBC,GAAOC,GAAc;AACvD,MAAIC,IAAW,CAAA;AACf,SAAAD,EAAa,QAAQ,CAAAE,MAAY;AAC/B,UAAMC,IAAQC,EAASL,GAAOG,CAAQ;AACtC,IAAAD,IAAWI,EAASJ,GAAUC,GAAUC,CAAK;AAAA,EAC/C,CAAC,GACMF;AACT;AAQO,SAASK,EAAiBN,GAAcE,GAAUK,IAAe,I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