@sheinx/hooks 3.0.0-rc.1 → 3.0.0-rc.10
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/cjs/common/type.d.ts +15 -15
- package/cjs/common/type.d.ts.map +1 -1
- package/cjs/common/use-click-away/index.d.ts +2 -2
- package/cjs/common/use-click-away/index.d.ts.map +1 -1
- package/cjs/common/use-click-away/index.js +2 -3
- package/cjs/common/use-default-value/index.js +2 -2
- package/cjs/common/use-default-value/use-default-value.js +9 -5
- package/cjs/common/use-drag-mock/index.js +2 -2
- package/cjs/common/use-drag-mock/use-drag-mock.js +11 -8
- package/cjs/common/use-drag-mock/use-drag-move.js +15 -11
- package/cjs/common/use-drag-mock/use-drag-resize.js +9 -5
- package/cjs/common/use-filter/index.js +2 -2
- package/cjs/common/use-filter/use-filter.js +17 -13
- package/cjs/common/use-fork-ref/index.js +5 -10
- package/cjs/common/use-func-change/index.js +2 -2
- package/cjs/common/use-func-change/use-func-change.d.ts +1 -1
- package/cjs/common/use-func-change/use-func-change.js +2 -3
- package/cjs/common/use-input-able/index.js +2 -2
- package/cjs/common/use-input-able/use-Input-able.js +8 -4
- package/cjs/common/use-input-able/use-Input-able.type.d.ts +1 -1
- package/cjs/common/use-input-able/use-Input-able.type.d.ts.map +1 -1
- package/cjs/common/use-key-event/index.js +6 -8
- package/cjs/common/use-latest-obj/index.js +1 -3
- package/cjs/common/use-list-select/index.js +2 -2
- package/cjs/common/use-list-select/use-list-select-multiple.js +26 -39
- package/cjs/common/use-list-select/use-list-select-single.js +9 -11
- package/cjs/common/use-list-select/use-list-select.js +10 -12
- package/cjs/common/use-pagination-list/index.js +17 -15
- package/cjs/common/use-persist-fn/index.js +1 -2
- package/cjs/common/use-position-style/get-position-style.js +10 -7
- package/cjs/common/use-position-style/index.d.ts +3 -3
- package/cjs/common/use-position-style/index.d.ts.map +1 -1
- package/cjs/common/use-position-style/index.js +16 -22
- package/cjs/common/use-previous/index.js +1 -2
- package/cjs/common/use-render/index.js +8 -5
- package/cjs/common/use-resize/index.js +11 -9
- package/cjs/common/use-safe-state/index.js +8 -5
- package/cjs/common/use-style/index.js +0 -2
- package/cjs/common/use-toggle/index.d.ts +1 -1
- package/cjs/common/use-toggle/index.d.ts.map +1 -1
- package/cjs/common/use-toggle/index.js +7 -3
- package/cjs/common/use-transform/index.js +2 -2
- package/cjs/common/use-transform/use-transform.js +13 -11
- package/cjs/common/use-unmounted-ref/index.js +1 -2
- package/cjs/components/use-button/index.js +2 -2
- package/cjs/components/use-button/use-button.d.ts +5 -6
- package/cjs/components/use-button/use-button.d.ts.map +1 -1
- package/cjs/components/use-button/use-button.js +15 -32
- package/cjs/components/use-button/use-button.type.d.ts +3 -8
- package/cjs/components/use-button/use-button.type.d.ts.map +1 -1
- package/cjs/components/use-carousel/index.js +2 -2
- package/cjs/components/use-carousel/use-carousel.d.ts +1 -1
- package/cjs/components/use-carousel/use-carousel.d.ts.map +1 -1
- package/cjs/components/use-carousel/use-carousel.js +9 -5
- package/cjs/components/use-cascader/index.js +2 -2
- package/cjs/components/use-cascader/use-cascader.js +2 -3
- package/cjs/components/use-check/index.js +2 -2
- package/cjs/components/use-check/use-check.d.ts +3 -3
- package/cjs/components/use-check/use-check.js +24 -17
- package/cjs/components/use-collapse/index.js +2 -2
- package/cjs/components/use-collapse/use-collapse-item.d.ts +4 -4
- package/cjs/components/use-collapse/use-collapse-item.js +7 -10
- package/cjs/components/use-collapse/use-collapse-item.type.d.ts +1 -1
- package/cjs/components/use-collapse/use-collapse-item.type.d.ts.map +1 -1
- package/cjs/components/use-collapse/use-collapse.js +14 -13
- package/cjs/components/use-datepicker/index.js +2 -2
- package/cjs/components/use-datepicker/use-date.js +13 -11
- package/cjs/components/use-datepicker/use-datepicker-format.js +26 -21
- package/cjs/components/use-datepicker/use-datepicker-format.type.d.ts +4 -4
- package/cjs/components/use-datepicker/use-datepicker-format.type.d.ts.map +1 -1
- package/cjs/components/use-datepicker/use-datepicker-range.js +10 -7
- package/cjs/components/use-datepicker/use-datepicker-range.type.d.ts +1 -1
- package/cjs/components/use-datepicker/use-datepicker-range.type.d.ts.map +1 -1
- package/cjs/components/use-datepicker/use-month.js +13 -11
- package/cjs/components/use-datepicker/use-quarter.js +13 -12
- package/cjs/components/use-datepicker/use-time.js +3 -8
- package/cjs/components/use-datepicker/use-year.js +13 -11
- package/cjs/components/use-datepicker/util.d.ts +3 -3
- package/cjs/components/use-datepicker/util.d.ts.map +1 -1
- package/cjs/components/use-datepicker/util.js +13 -20
- package/cjs/components/use-descriptions/index.js +2 -2
- package/cjs/components/use-descriptions/use-descriptions.js +14 -11
- package/cjs/components/use-form/Provider.js +6 -10
- package/cjs/components/use-form/form-bind-context.js +6 -11
- package/cjs/components/use-form/form-config-context.js +6 -11
- package/cjs/components/use-form/form-func-context.js +6 -11
- package/cjs/components/use-form/index.js +2 -3
- package/cjs/components/use-form/use-form-control/index.js +2 -2
- package/cjs/components/use-form/use-form-control/use-form-control.js +23 -23
- package/cjs/components/use-form/use-form-fieldset/fieldset-context.js +10 -19
- package/cjs/components/use-form/use-form-fieldset/index.js +2 -2
- package/cjs/components/use-form/use-form-fieldset/use-form-fieldset.js +3 -5
- package/cjs/components/use-form/use-form-flow/index.js +2 -2
- package/cjs/components/use-form/use-form-flow/use-form-datum.js +1 -2
- package/cjs/components/use-form/use-form-flow/use-form-flow.js +2 -3
- package/cjs/components/use-form/use-form-item/form-item-context.js +5 -9
- package/cjs/components/use-form/use-form-item/index.js +2 -2
- package/cjs/components/use-form/use-form-item/use-form-item.js +12 -13
- package/cjs/components/use-form/use-form.d.ts +2 -2
- package/cjs/components/use-form/use-form.js +28 -37
- package/cjs/components/use-form/use-form.type.d.ts +4 -4
- package/cjs/components/use-form/use-form.type.d.ts.map +1 -1
- package/cjs/components/use-image/index.js +2 -2
- package/cjs/components/use-image/use-image-gallery.d.ts +4 -4
- package/cjs/components/use-image/use-image-gallery.d.ts.map +1 -1
- package/cjs/components/use-image/use-image-gallery.js +18 -15
- package/cjs/components/use-image/use-image-gallery.type.d.ts +1 -1
- package/cjs/components/use-image/use-image-gallery.type.d.ts.map +1 -1
- package/cjs/components/use-image/use-image-group.d.ts +2 -2
- package/cjs/components/use-image/use-image-group.d.ts.map +1 -1
- package/cjs/components/use-image/use-image-group.js +9 -12
- package/cjs/components/use-image/use-image-magnify.js +13 -13
- package/cjs/components/use-image/use-image.d.ts +3 -3
- package/cjs/components/use-image/use-image.d.ts.map +1 -1
- package/cjs/components/use-image/use-image.js +17 -23
- package/cjs/components/use-image/use-image.type.d.ts +4 -4
- package/cjs/components/use-image/use-image.type.d.ts.map +1 -1
- package/cjs/components/use-input/index.js +2 -2
- package/cjs/components/use-input/use-input-format.d.ts +1 -1
- package/cjs/components/use-input/use-input-format.js +13 -15
- package/cjs/components/use-input/use-input-format.type.d.ts +1 -1
- package/cjs/components/use-input/use-input-format.type.d.ts.map +1 -1
- package/cjs/components/use-input/use-input-number.d.ts +1 -1
- package/cjs/components/use-input/use-input-number.js +15 -16
- package/cjs/components/use-input/use-input-number.type.d.ts +1 -1
- package/cjs/components/use-input/use-input-number.type.d.ts.map +1 -1
- package/cjs/components/use-input/use-input-password.js +11 -9
- package/cjs/components/use-input/use-input-password.type.d.ts +1 -1
- package/cjs/components/use-input/use-input-password.type.d.ts.map +1 -1
- package/cjs/components/use-input/use-input.d.ts +3 -3
- package/cjs/components/use-input/use-input.js +30 -29
- package/cjs/components/use-input/use-input.type.d.ts +5 -5
- package/cjs/components/use-input/use-input.type.d.ts.map +1 -1
- package/cjs/components/use-menu/index.js +2 -2
- package/cjs/components/use-menu/use-menu-item.d.ts +1 -1
- package/cjs/components/use-menu/use-menu-item.d.ts.map +1 -1
- package/cjs/components/use-menu/use-menu-item.js +11 -12
- package/cjs/components/use-menu/use-menu.js +2 -8
- package/cjs/components/use-menu/use-menu.type.d.ts +1 -1
- package/cjs/components/use-menu/use-menu.type.d.ts.map +1 -1
- package/cjs/components/use-pagination/index.js +2 -2
- package/cjs/components/use-pagination/use-pagination.d.ts +1 -1
- package/cjs/components/use-pagination/use-pagination.d.ts.map +1 -1
- package/cjs/components/use-pagination/use-pagination.js +19 -13
- package/cjs/components/use-popup/index.js +2 -2
- package/cjs/components/use-popup/popup-context.js +1 -2
- package/cjs/components/use-popup/use-popup.js +14 -11
- package/cjs/components/use-popup/use-popup.type.d.ts +1 -1
- package/cjs/components/use-popup/use-popup.type.d.ts.map +1 -1
- package/cjs/components/use-select/index.js +2 -2
- package/cjs/components/use-select/use-select-group.js +13 -10
- package/cjs/components/use-select/use-select.js +1 -2
- package/cjs/components/use-select/use-select.type.d.ts +1 -1
- package/cjs/components/use-select/use-select.type.d.ts.map +1 -1
- package/cjs/components/use-slider/index.js +2 -2
- package/cjs/components/use-slider/use-slider.js +15 -10
- package/cjs/components/use-table/index.js +2 -2
- package/cjs/components/use-table/use-table-columns.d.ts +1 -1
- package/cjs/components/use-table/use-table-columns.d.ts.map +1 -1
- package/cjs/components/use-table/use-table-columns.js +4 -8
- package/cjs/components/use-table/use-table-expand.js +19 -20
- package/cjs/components/use-table/use-table-group.js +1 -7
- package/cjs/components/use-table/use-table-layout.d.ts.map +1 -1
- package/cjs/components/use-table/use-table-layout.js +36 -34
- package/cjs/components/use-table/use-table-row.js +8 -9
- package/cjs/components/use-table/use-table-sort.d.ts +1 -1
- package/cjs/components/use-table/use-table-sort.d.ts.map +1 -1
- package/cjs/components/use-table/use-table-sort.js +21 -22
- package/cjs/components/use-table/use-table-tree.d.ts +1 -1
- package/cjs/components/use-table/use-table-tree.d.ts.map +1 -1
- package/cjs/components/use-table/use-table-tree.js +48 -57
- package/cjs/components/use-table/use-table-virtual.js +17 -13
- package/cjs/components/use-table/use-table.type.d.ts +4 -4
- package/cjs/components/use-table/use-table.type.d.ts.map +1 -1
- package/cjs/components/use-tabs/context.js +7 -13
- package/cjs/components/use-tabs/index.js +2 -2
- package/cjs/components/use-tabs/use-tabs.js +9 -6
- package/cjs/components/use-tabs/use-tabs.type.d.ts +1 -1
- package/cjs/components/use-tabs/use-tabs.type.d.ts.map +1 -1
- package/cjs/components/use-textarea/index.js +2 -2
- package/cjs/components/use-textarea/use-textarea-format.js +5 -7
- package/cjs/components/use-textarea/use-textarea-format.type.d.ts +1 -1
- package/cjs/components/use-textarea/use-textarea-format.type.d.ts.map +1 -1
- package/cjs/components/use-textarea/use-textarea.d.ts +2 -2
- package/cjs/components/use-textarea/use-textarea.js +23 -18
- package/cjs/components/use-textarea/use-textarea.type.d.ts +3 -3
- package/cjs/components/use-textarea/use-textarea.type.d.ts.map +1 -1
- package/cjs/components/use-transfer/index.js +2 -2
- package/cjs/components/use-transfer/use-transfer.js +20 -19
- package/cjs/components/use-transfer/use-transfer.type.d.ts +1 -1
- package/cjs/components/use-transfer/use-transfer.type.d.ts.map +1 -1
- package/cjs/components/use-tree/index.js +2 -2
- package/cjs/components/use-tree/use-tree-node.js +11 -7
- package/cjs/components/use-tree/use-tree-node.type.d.ts +2 -2
- package/cjs/components/use-tree/use-tree-node.type.d.ts.map +1 -1
- package/cjs/components/use-tree/use-tree.js +11 -16
- package/cjs/components/use-tree/use-tree.type.d.ts +3 -3
- package/cjs/components/use-tree/use-tree.type.d.ts.map +1 -1
- package/cjs/components/use-treeselect/index.js +2 -2
- package/cjs/components/use-treeselect/use-tiled.js +13 -9
- package/cjs/components/use-treeselect/use-tiled.type.d.ts +1 -1
- package/cjs/components/use-treeselect/use-tiled.type.d.ts.map +1 -1
- package/cjs/components/use-treeselect/use-treeselect.js +1 -2
- package/cjs/components/use-upload/index.js +2 -2
- package/cjs/components/use-upload/use-upload.js +36 -34
- package/cjs/components/use-upload/xhr.js +0 -1
- package/cjs/components/use-validate/index.js +2 -2
- package/cjs/components/use-validate/use-validate.js +9 -5
- package/cjs/index.js +4 -9
- package/cjs/utils/accept.d.ts +1 -1
- package/cjs/utils/accept.d.ts.map +1 -1
- package/cjs/utils/accept.js +0 -4
- package/cjs/utils/array.js +2 -4
- package/cjs/utils/attribute.js +3 -5
- package/cjs/utils/clone.js +11 -20
- package/cjs/utils/document.js +2 -4
- package/cjs/utils/dom/element.js +11 -11
- package/cjs/utils/dom/index.js +2 -3
- package/cjs/utils/dom/responsiveObserve.js +10 -15
- package/cjs/utils/dom/responsiveObserve.type.d.ts +4 -4
- package/cjs/utils/dom/responsiveObserve.type.d.ts.map +1 -1
- package/cjs/utils/dom/scroll-behavior.js +2 -3
- package/cjs/utils/extract-event-handlers.js +0 -6
- package/cjs/utils/func.js +3 -5
- package/cjs/utils/immer.d.ts +1 -8
- package/cjs/utils/immer.d.ts.map +1 -1
- package/cjs/utils/immer.js +11 -8
- package/cjs/utils/index.js +2 -3
- package/cjs/utils/is.d.ts +1 -1
- package/cjs/utils/is.d.ts.map +1 -1
- package/cjs/utils/is.js +30 -55
- package/cjs/utils/lazyload.d.ts +1 -1
- package/cjs/utils/lazyload.d.ts.map +1 -1
- package/cjs/utils/lazyload.js +0 -1
- package/cjs/utils/number.js +0 -7
- package/cjs/utils/object.d.ts +4 -4
- package/cjs/utils/object.d.ts.map +1 -1
- package/cjs/utils/object.js +18 -37
- package/cjs/utils/position.js +4 -3
- package/cjs/utils/react-render.d.ts +1 -1
- package/cjs/utils/react-render.d.ts.map +1 -1
- package/cjs/utils/react-render.js +17 -24
- package/cjs/utils/render.d.ts +1 -1
- package/cjs/utils/render.d.ts.map +1 -1
- package/cjs/utils/render.js +3 -5
- package/cjs/utils/rule/index.js +2 -2
- package/cjs/utils/rule/length.d.ts +1 -1
- package/cjs/utils/rule/length.js +9 -11
- package/cjs/utils/rule/regexp.d.ts +1 -1
- package/cjs/utils/rule/regexp.js +4 -9
- package/cjs/utils/rule/required.d.ts +1 -1
- package/cjs/utils/rule/required.js +3 -5
- package/cjs/utils/rule/rule.js +4 -9
- package/cjs/utils/rule/rule.type.d.ts +8 -8
- package/cjs/utils/rule/rule.type.d.ts.map +1 -1
- package/cjs/utils/rule/type.d.ts +1 -1
- package/cjs/utils/rule/type.js +3 -5
- package/cjs/utils/shallow-equal.js +4 -9
- package/cjs/utils/string.js +0 -7
- package/cjs/utils/style-unit.js +0 -2
- package/cjs/utils/tree.d.ts +1 -1
- package/cjs/utils/tree.d.ts.map +1 -1
- package/cjs/utils/tree.js +19 -21
- package/cjs/utils/uid.js +0 -11
- package/cjs/utils/validate/error.js +22 -18
- package/cjs/utils/validate/get-rule.js +1 -4
- package/cjs/utils/validate/index.d.ts +1 -1
- package/cjs/utils/validate/index.d.ts.map +1 -1
- package/cjs/utils/validate/index.js +13 -13
- package/cjs/utils/validate/isJson.js +2 -5
- package/cjs/utils/validate/nullable.js +2 -3
- package/cjs/utils/validate/type.d.ts +1 -1
- package/cjs/utils/validate/type.d.ts.map +1 -1
- package/cjs/utils/validate/type.js +4 -9
- package/esm/common/type.d.ts +15 -15
- package/esm/common/type.d.ts.map +1 -1
- package/esm/common/type.js +1 -5
- package/esm/common/use-click-away/index.d.ts +2 -2
- package/esm/common/use-click-away/index.d.ts.map +1 -1
- package/esm/common/use-click-away/index.js +8 -17
- package/esm/common/use-default-value/index.js +2 -26
- package/esm/common/use-default-value/use-default-value.js +16 -19
- package/esm/common/use-default-value/use-previous.js +4 -10
- package/esm/common/use-drag-mock/index.js +3 -33
- package/esm/common/use-drag-mock/use-drag-mock.js +17 -20
- package/esm/common/use-drag-mock/use-drag-move.js +25 -28
- package/esm/common/use-drag-mock/use-drag-resize.js +19 -22
- package/esm/common/use-filter/index.js +1 -19
- package/esm/common/use-filter/use-filter.js +34 -36
- package/esm/common/use-filter/use-filter.type.js +1 -5
- package/esm/common/use-fork-ref/index.js +5 -20
- package/esm/common/use-fork-ref/setRef.js +1 -7
- package/esm/common/use-func-change/index.js +1 -19
- package/esm/common/use-func-change/use-func-change.d.ts +1 -1
- package/esm/common/use-func-change/use-func-change.js +8 -16
- package/esm/common/use-input-able/index.js +1 -19
- package/esm/common/use-input-able/use-Input-able.js +25 -28
- package/esm/common/use-input-able/use-Input-able.type.d.ts +1 -1
- package/esm/common/use-input-able/use-Input-able.type.d.ts.map +1 -1
- package/esm/common/use-input-able/use-Input-able.type.js +1 -5
- package/esm/common/use-key-event/index.js +7 -15
- package/esm/common/use-latest-obj/index.js +4 -12
- package/esm/common/use-list-select/index.js +3 -33
- package/esm/common/use-list-select/use-list-select-multiple.js +41 -64
- package/esm/common/use-list-select/use-list-select-single.js +17 -26
- package/esm/common/use-list-select/use-list-select.js +16 -25
- package/esm/common/use-list-select/use-list.type.js +1 -5
- package/esm/common/use-pagination-list/index.js +22 -26
- package/esm/common/use-persist-fn/index.js +5 -11
- package/esm/common/use-position-style/get-position-style.js +10 -13
- package/esm/common/use-position-style/index.d.ts +3 -3
- package/esm/common/use-position-style/index.d.ts.map +1 -1
- package/esm/common/use-position-style/index.js +25 -41
- package/esm/common/use-previous/index.js +5 -13
- package/esm/common/use-render/index.js +15 -19
- package/esm/common/use-resize/index.js +17 -21
- package/esm/common/use-safe-state/index.js +15 -19
- package/esm/common/use-style/index.js +3 -11
- package/esm/common/use-toggle/index.d.ts +1 -1
- package/esm/common/use-toggle/index.d.ts.map +1 -1
- package/esm/common/use-toggle/index.js +12 -14
- package/esm/common/use-transform/index.js +1 -19
- package/esm/common/use-transform/use-transform.js +23 -27
- package/esm/common/use-transform/use-transform.type.js +1 -5
- package/esm/common/use-unmounted-ref/index.js +5 -13
- package/esm/components/use-button/index.js +1 -19
- package/esm/components/use-button/use-button-group.type.js +1 -5
- package/esm/components/use-button/use-button.d.ts +5 -6
- package/esm/components/use-button/use-button.d.ts.map +1 -1
- package/esm/components/use-button/use-button.js +20 -43
- package/esm/components/use-button/use-button.type.d.ts +3 -8
- package/esm/components/use-button/use-button.type.d.ts.map +1 -1
- package/esm/components/use-button/use-button.type.js +1 -5
- package/esm/components/use-carousel/index.js +1 -19
- package/esm/components/use-carousel/use-carousel.d.ts +1 -1
- package/esm/components/use-carousel/use-carousel.d.ts.map +1 -1
- package/esm/components/use-carousel/use-carousel.js +21 -24
- package/esm/components/use-cascader/index.js +1 -19
- package/esm/components/use-cascader/use-cascader.js +5 -13
- package/esm/components/use-cascader/use-cascader.type.js +1 -5
- package/esm/components/use-check/index.js +1 -19
- package/esm/components/use-check/use-check.d.ts +3 -3
- package/esm/components/use-check/use-check.js +32 -31
- package/esm/components/use-check/use-check.type.js +1 -5
- package/esm/components/use-collapse/index.js +2 -26
- package/esm/components/use-collapse/use-collapse-item.d.ts +4 -4
- package/esm/components/use-collapse/use-collapse-item.js +9 -18
- package/esm/components/use-collapse/use-collapse-item.type.d.ts +1 -1
- package/esm/components/use-collapse/use-collapse-item.type.d.ts.map +1 -1
- package/esm/components/use-collapse/use-collapse-item.type.js +1 -5
- package/esm/components/use-collapse/use-collapse.js +17 -22
- package/esm/components/use-collapse/use-collapse.type.js +1 -5
- package/esm/components/use-datepicker/index.js +8 -62
- package/esm/components/use-datepicker/use-date.js +53 -57
- package/esm/components/use-datepicker/use-date.type.js +1 -5
- package/esm/components/use-datepicker/use-datepicker-format.js +54 -56
- package/esm/components/use-datepicker/use-datepicker-format.type.d.ts +4 -4
- package/esm/components/use-datepicker/use-datepicker-format.type.d.ts.map +1 -1
- package/esm/components/use-datepicker/use-datepicker-format.type.js +1 -5
- package/esm/components/use-datepicker/use-datepicker-range.js +43 -47
- package/esm/components/use-datepicker/use-datepicker-range.type.d.ts +1 -1
- package/esm/components/use-datepicker/use-datepicker-range.type.d.ts.map +1 -1
- package/esm/components/use-datepicker/use-datepicker-range.type.js +1 -5
- package/esm/components/use-datepicker/use-month.js +37 -41
- package/esm/components/use-datepicker/use-month.type.js +1 -5
- package/esm/components/use-datepicker/use-quarter.js +36 -41
- package/esm/components/use-datepicker/use-quarter.type.js +1 -5
- package/esm/components/use-datepicker/use-time.js +23 -35
- package/esm/components/use-datepicker/use-time.type.js +1 -5
- package/esm/components/use-datepicker/use-year.js +37 -41
- package/esm/components/use-datepicker/use-year.type.js +1 -5
- package/esm/components/use-datepicker/util.d.ts +3 -3
- package/esm/components/use-datepicker/util.d.ts.map +1 -1
- package/esm/components/use-datepicker/util.js +67 -80
- package/esm/components/use-descriptions/index.js +1 -19
- package/esm/components/use-descriptions/use-descriptions.js +24 -27
- package/esm/components/use-descriptions/use-descriptions.type.js +1 -5
- package/esm/components/use-form/Provider.js +12 -26
- package/esm/components/use-form/form-bind-context.js +4 -17
- package/esm/components/use-form/form-config-context.js +4 -17
- package/esm/components/use-form/form-func-context.js +4 -17
- package/esm/components/use-form/index.js +7 -87
- package/esm/components/use-form/use-form-control/index.js +1 -19
- package/esm/components/use-form/use-form-control/use-form-control.js +57 -66
- package/esm/components/use-form/use-form-control/use-form-control.type.js +1 -5
- package/esm/components/use-form/use-form-fieldset/fieldset-context.js +13 -29
- package/esm/components/use-form/use-form-fieldset/index.js +2 -26
- package/esm/components/use-form/use-form-fieldset/use-form-fieldset.js +6 -15
- package/esm/components/use-form/use-form-fieldset/use-form-fieldset.type.js +1 -5
- package/esm/components/use-form/use-form-flow/index.js +2 -26
- package/esm/components/use-form/use-form-flow/use-form-datum.js +4 -11
- package/esm/components/use-form/use-form-flow/use-form-flow.js +9 -17
- package/esm/components/use-form/use-form-flow/use-form-flow.type.js +1 -5
- package/esm/components/use-form/use-form-item/form-item-context.js +3 -15
- package/esm/components/use-form/use-form-item/index.js +1 -19
- package/esm/components/use-form/use-form-item/use-form-item.js +21 -32
- package/esm/components/use-form/use-form.d.ts +2 -2
- package/esm/components/use-form/use-form.js +65 -83
- package/esm/components/use-form/use-form.type.d.ts +4 -4
- package/esm/components/use-form/use-form.type.d.ts.map +1 -1
- package/esm/components/use-form/use-form.type.js +1 -5
- package/esm/components/use-image/index.js +4 -40
- package/esm/components/use-image/use-image-gallery.d.ts +4 -4
- package/esm/components/use-image/use-image-gallery.d.ts.map +1 -1
- package/esm/components/use-image/use-image-gallery.js +34 -37
- package/esm/components/use-image/use-image-gallery.type.d.ts +1 -1
- package/esm/components/use-image/use-image-gallery.type.d.ts.map +1 -1
- package/esm/components/use-image/use-image-gallery.type.js +1 -5
- package/esm/components/use-image/use-image-group.d.ts +2 -2
- package/esm/components/use-image/use-image-group.d.ts.map +1 -1
- package/esm/components/use-image/use-image-group.js +15 -24
- package/esm/components/use-image/use-image-group.type.js +1 -5
- package/esm/components/use-image/use-image-magnify.js +17 -26
- package/esm/components/use-image/use-image-magnify.type.js +1 -5
- package/esm/components/use-image/use-image.d.ts +3 -3
- package/esm/components/use-image/use-image.d.ts.map +1 -1
- package/esm/components/use-image/use-image.js +28 -41
- package/esm/components/use-image/use-image.type.d.ts +4 -4
- package/esm/components/use-image/use-image.type.d.ts.map +1 -1
- package/esm/components/use-image/use-image.type.js +1 -5
- package/esm/components/use-input/index.js +4 -40
- package/esm/components/use-input/use-input-format.d.ts +1 -1
- package/esm/components/use-input/use-input-format.js +18 -27
- package/esm/components/use-input/use-input-format.type.d.ts +1 -1
- package/esm/components/use-input/use-input-format.type.d.ts.map +1 -1
- package/esm/components/use-input/use-input-format.type.js +1 -5
- package/esm/components/use-input/use-input-number.d.ts +1 -1
- package/esm/components/use-input/use-input-number.js +23 -31
- package/esm/components/use-input/use-input-number.type.d.ts +1 -1
- package/esm/components/use-input/use-input-number.type.d.ts.map +1 -1
- package/esm/components/use-input/use-input-number.type.js +1 -5
- package/esm/components/use-input/use-input-password.js +16 -21
- package/esm/components/use-input/use-input-password.type.d.ts +1 -1
- package/esm/components/use-input/use-input-password.type.d.ts.map +1 -1
- package/esm/components/use-input/use-input-password.type.js +1 -5
- package/esm/components/use-input/use-input.d.ts +3 -3
- package/esm/components/use-input/use-input.js +34 -42
- package/esm/components/use-input/use-input.type.d.ts +5 -5
- package/esm/components/use-input/use-input.type.d.ts.map +1 -1
- package/esm/components/use-input/use-input.type.js +1 -5
- package/esm/components/use-menu/index.js +2 -20
- package/esm/components/use-menu/use-menu-item.d.ts +1 -1
- package/esm/components/use-menu/use-menu-item.d.ts.map +1 -1
- package/esm/components/use-menu/use-menu-item.js +23 -31
- package/esm/components/use-menu/use-menu.js +15 -28
- package/esm/components/use-menu/use-menu.type.d.ts +1 -1
- package/esm/components/use-menu/use-menu.type.d.ts.map +1 -1
- package/esm/components/use-menu/use-menu.type.js +1 -5
- package/esm/components/use-pagination/index.js +1 -19
- package/esm/components/use-pagination/use-pagination.d.ts +1 -1
- package/esm/components/use-pagination/use-pagination.d.ts.map +1 -1
- package/esm/components/use-pagination/use-pagination.js +25 -25
- package/esm/components/use-pagination/use-pagination.type.js +1 -5
- package/esm/components/use-popup/index.js +1 -19
- package/esm/components/use-popup/popup-context.js +3 -9
- package/esm/components/use-popup/use-popup.js +35 -39
- package/esm/components/use-popup/use-popup.type.d.ts +1 -1
- package/esm/components/use-popup/use-popup.type.d.ts.map +1 -1
- package/esm/components/use-popup/use-popup.type.js +1 -5
- package/esm/components/use-select/index.js +2 -26
- package/esm/components/use-select/use-select-group.js +19 -22
- package/esm/components/use-select/use-select-group.type.js +1 -5
- package/esm/components/use-select/use-select.js +5 -12
- package/esm/components/use-select/use-select.type.d.ts +1 -1
- package/esm/components/use-select/use-select.type.d.ts.map +1 -1
- package/esm/components/use-select/use-select.type.js +1 -5
- package/esm/components/use-slider/index.js +1 -19
- package/esm/components/use-slider/use-slider.js +30 -32
- package/esm/components/use-slider/use-slider.type.js +1 -5
- package/esm/components/use-table/index.js +8 -68
- package/esm/components/use-table/use-table-columns.d.ts +1 -1
- package/esm/components/use-table/use-table-columns.d.ts.map +1 -1
- package/esm/components/use-table/use-table-columns.js +9 -20
- package/esm/components/use-table/use-table-expand.js +24 -35
- package/esm/components/use-table/use-table-group.js +5 -17
- package/esm/components/use-table/use-table-layout.d.ts.map +1 -1
- package/esm/components/use-table/use-table-layout.js +68 -75
- package/esm/components/use-table/use-table-row.js +18 -25
- package/esm/components/use-table/use-table-sort.d.ts +1 -1
- package/esm/components/use-table/use-table-sort.d.ts.map +1 -1
- package/esm/components/use-table/use-table-sort.js +34 -41
- package/esm/components/use-table/use-table-tree.d.ts +1 -1
- package/esm/components/use-table/use-table-tree.d.ts.map +1 -1
- package/esm/components/use-table/use-table-tree.js +61 -76
- package/esm/components/use-table/use-table-virtual.js +34 -36
- package/esm/components/use-table/use-table.type.d.ts +4 -4
- package/esm/components/use-table/use-table.type.d.ts.map +1 -1
- package/esm/components/use-table/use-table.type.js +1 -5
- package/esm/components/use-tabs/context.js +7 -21
- package/esm/components/use-tabs/context.type.js +1 -5
- package/esm/components/use-tabs/index.js +2 -26
- package/esm/components/use-tabs/use-tabs.js +13 -16
- package/esm/components/use-tabs/use-tabs.type.d.ts +1 -1
- package/esm/components/use-tabs/use-tabs.type.d.ts.map +1 -1
- package/esm/components/use-tabs/use-tabs.type.js +1 -5
- package/esm/components/use-textarea/index.js +2 -26
- package/esm/components/use-textarea/use-textarea-format.js +6 -15
- package/esm/components/use-textarea/use-textarea-format.type.d.ts +1 -1
- package/esm/components/use-textarea/use-textarea-format.type.d.ts.map +1 -1
- package/esm/components/use-textarea/use-textarea-format.type.js +1 -5
- package/esm/components/use-textarea/use-textarea.d.ts +2 -2
- package/esm/components/use-textarea/use-textarea.js +31 -32
- package/esm/components/use-textarea/use-textarea.type.d.ts +3 -3
- package/esm/components/use-textarea/use-textarea.type.d.ts.map +1 -1
- package/esm/components/use-textarea/use-textarea.type.js +1 -5
- package/esm/components/use-transfer/index.js +1 -19
- package/esm/components/use-transfer/use-transfer.js +33 -38
- package/esm/components/use-transfer/use-transfer.type.d.ts +1 -1
- package/esm/components/use-transfer/use-transfer.type.d.ts.map +1 -1
- package/esm/components/use-transfer/use-transfer.type.js +1 -5
- package/esm/components/use-tree/index.js +2 -26
- package/esm/components/use-tree/use-tree-node.js +17 -20
- package/esm/components/use-tree/use-tree-node.type.d.ts +2 -2
- package/esm/components/use-tree/use-tree-node.type.d.ts.map +1 -1
- package/esm/components/use-tree/use-tree-node.type.js +1 -5
- package/esm/components/use-tree/use-tree.js +25 -37
- package/esm/components/use-tree/use-tree.type.d.ts +3 -3
- package/esm/components/use-tree/use-tree.type.d.ts.map +1 -1
- package/esm/components/use-tree/use-tree.type.js +1 -5
- package/esm/components/use-treeselect/index.js +2 -26
- package/esm/components/use-treeselect/use-tiled.js +22 -24
- package/esm/components/use-treeselect/use-tiled.type.d.ts +1 -1
- package/esm/components/use-treeselect/use-tiled.type.d.ts.map +1 -1
- package/esm/components/use-treeselect/use-tiled.type.js +1 -5
- package/esm/components/use-treeselect/use-treeselect.js +3 -10
- package/esm/components/use-treeselect/use-treeselect.type.js +1 -5
- package/esm/components/use-upload/index.js +1 -19
- package/esm/components/use-upload/use-upload.js +57 -62
- package/esm/components/use-upload/use-upload.type.js +1 -5
- package/esm/components/use-upload/xhr.js +1 -8
- package/esm/components/use-validate/index.js +1 -19
- package/esm/components/use-validate/use-validate.js +16 -19
- package/esm/components/use-validate/use-validate.type.js +1 -5
- package/esm/index.js +48 -547
- package/esm/utils/accept.d.ts +1 -1
- package/esm/utils/accept.d.ts.map +1 -1
- package/esm/utils/accept.js +1 -11
- package/esm/utils/array.js +2 -10
- package/esm/utils/attribute.js +3 -11
- package/esm/utils/clone.js +19 -34
- package/esm/utils/document.js +11 -20
- package/esm/utils/dom/element.js +23 -33
- package/esm/utils/dom/index.js +5 -69
- package/esm/utils/dom/normalize-wheel.js +1 -7
- package/esm/utils/dom/normalize-wheel.type.js +1 -5
- package/esm/utils/dom/ready.js +3 -9
- package/esm/utils/dom/responsiveObserve.js +10 -21
- package/esm/utils/dom/responsiveObserve.type.d.ts +4 -4
- package/esm/utils/dom/responsiveObserve.type.d.ts.map +1 -1
- package/esm/utils/dom/responsiveObserve.type.js +1 -5
- package/esm/utils/dom/scroll-behavior.js +2 -9
- package/esm/utils/extract-event-handlers.js +1 -13
- package/esm/utils/func.js +3 -11
- package/esm/utils/immer.d.ts +1 -8
- package/esm/utils/immer.d.ts.map +1 -1
- package/esm/utils/immer.js +12 -20
- package/esm/utils/index.js +22 -269
- package/esm/utils/is.d.ts +1 -1
- package/esm/utils/is.d.ts.map +1 -1
- package/esm/utils/is.js +33 -69
- package/esm/utils/lazyload.d.ts +1 -1
- package/esm/utils/lazyload.d.ts.map +1 -1
- package/esm/utils/lazyload.js +6 -15
- package/esm/utils/number.js +6 -24
- package/esm/utils/object.d.ts +4 -4
- package/esm/utils/object.d.ts.map +1 -1
- package/esm/utils/object.js +30 -59
- package/esm/utils/position.js +8 -13
- package/esm/utils/react-render.d.ts +1 -1
- package/esm/utils/react-render.d.ts.map +1 -1
- package/esm/utils/react-render.js +16 -31
- package/esm/utils/render.d.ts +1 -1
- package/esm/utils/render.d.ts.map +1 -1
- package/esm/utils/render.js +4 -13
- package/esm/utils/rule/index.js +1 -19
- package/esm/utils/rule/length.d.ts +1 -1
- package/esm/utils/rule/length.js +11 -19
- package/esm/utils/rule/regexp.d.ts +1 -1
- package/esm/utils/rule/regexp.js +7 -18
- package/esm/utils/rule/required.d.ts +1 -1
- package/esm/utils/rule/required.js +6 -14
- package/esm/utils/rule/rule.js +20 -33
- package/esm/utils/rule/rule.type.d.ts +8 -8
- package/esm/utils/rule/rule.type.d.ts.map +1 -1
- package/esm/utils/rule/rule.type.js +1 -5
- package/esm/utils/rule/type.d.ts +1 -1
- package/esm/utils/rule/type.js +6 -14
- package/esm/utils/shallow-equal.js +7 -21
- package/esm/utils/string.js +2 -16
- package/esm/utils/style-unit.js +3 -11
- package/esm/utils/tree.d.ts +1 -1
- package/esm/utils/tree.d.ts.map +1 -1
- package/esm/utils/tree.js +24 -32
- package/esm/utils/uid.js +2 -20
- package/esm/utils/validate/error.js +23 -26
- package/esm/utils/validate/get-rule.js +16 -26
- package/esm/utils/validate/index.d.ts +1 -1
- package/esm/utils/validate/index.d.ts.map +1 -1
- package/esm/utils/validate/index.js +20 -40
- package/esm/utils/validate/isJson.js +3 -12
- package/esm/utils/validate/nullable.js +2 -9
- package/esm/utils/validate/type.d.ts +1 -1
- package/esm/utils/validate/type.d.ts.map +1 -1
- package/esm/utils/validate/type.js +8 -19
- package/package.json +3 -2
@@ -1,88 +1,8 @@
|
|
1
|
-
"use strict";
|
2
1
|
"use client";
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
}
|
9
|
-
|
10
|
-
useForm: true,
|
11
|
-
useFormConfig: true,
|
12
|
-
useFormFunc: true
|
13
|
-
};
|
14
|
-
Object.defineProperty(exports, "default", {
|
15
|
-
enumerable: true,
|
16
|
-
get: function get() {
|
17
|
-
return _useForm.default;
|
18
|
-
}
|
19
|
-
});
|
20
|
-
Object.defineProperty(exports, "useForm", {
|
21
|
-
enumerable: true,
|
22
|
-
get: function get() {
|
23
|
-
return _useForm.default;
|
24
|
-
}
|
25
|
-
});
|
26
|
-
Object.defineProperty(exports, "useFormConfig", {
|
27
|
-
enumerable: true,
|
28
|
-
get: function get() {
|
29
|
-
return _formConfigContext.useFormConfig;
|
30
|
-
}
|
31
|
-
});
|
32
|
-
Object.defineProperty(exports, "useFormFunc", {
|
33
|
-
enumerable: true,
|
34
|
-
get: function get() {
|
35
|
-
return _formFuncContext.useFormFunc;
|
36
|
-
}
|
37
|
-
});
|
38
|
-
var _useFormControl = require("./use-form-control");
|
39
|
-
Object.keys(_useFormControl).forEach(function (key) {
|
40
|
-
if (key === "default" || key === "__esModule") return;
|
41
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
42
|
-
if (key in exports && exports[key] === _useFormControl[key]) return;
|
43
|
-
Object.defineProperty(exports, key, {
|
44
|
-
enumerable: true,
|
45
|
-
get: function get() {
|
46
|
-
return _useFormControl[key];
|
47
|
-
}
|
48
|
-
});
|
49
|
-
});
|
50
|
-
var _useFormItem = require("./use-form-item");
|
51
|
-
Object.keys(_useFormItem).forEach(function (key) {
|
52
|
-
if (key === "default" || key === "__esModule") return;
|
53
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
54
|
-
if (key in exports && exports[key] === _useFormItem[key]) return;
|
55
|
-
Object.defineProperty(exports, key, {
|
56
|
-
enumerable: true,
|
57
|
-
get: function get() {
|
58
|
-
return _useFormItem[key];
|
59
|
-
}
|
60
|
-
});
|
61
|
-
});
|
62
|
-
var _useFormFieldset = require("./use-form-fieldset");
|
63
|
-
Object.keys(_useFormFieldset).forEach(function (key) {
|
64
|
-
if (key === "default" || key === "__esModule") return;
|
65
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
66
|
-
if (key in exports && exports[key] === _useFormFieldset[key]) return;
|
67
|
-
Object.defineProperty(exports, key, {
|
68
|
-
enumerable: true,
|
69
|
-
get: function get() {
|
70
|
-
return _useFormFieldset[key];
|
71
|
-
}
|
72
|
-
});
|
73
|
-
});
|
74
|
-
var _useFormFlow = require("./use-form-flow");
|
75
|
-
Object.keys(_useFormFlow).forEach(function (key) {
|
76
|
-
if (key === "default" || key === "__esModule") return;
|
77
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
78
|
-
if (key in exports && exports[key] === _useFormFlow[key]) return;
|
79
|
-
Object.defineProperty(exports, key, {
|
80
|
-
enumerable: true,
|
81
|
-
get: function get() {
|
82
|
-
return _useFormFlow[key];
|
83
|
-
}
|
84
|
-
});
|
85
|
-
});
|
86
|
-
var _useForm = _interopRequireDefault(require("./use-form"));
|
87
|
-
var _formConfigContext = require("./form-config-context");
|
88
|
-
var _formFuncContext = require("./form-func-context");
|
2
|
+
export * from "./use-form-control";
|
3
|
+
export * from "./use-form-item";
|
4
|
+
export * from "./use-form-fieldset";
|
5
|
+
export * from "./use-form-flow";
|
6
|
+
export { default, default as useForm } from "./use-form";
|
7
|
+
export { useFormConfig } from "./form-config-context";
|
8
|
+
export { useFormFunc } from "./form-func-context";
|
@@ -1,20 +1,2 @@
|
|
1
|
-
"use strict";
|
2
1
|
"use client";
|
3
|
-
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
6
|
-
value: true
|
7
|
-
});
|
8
|
-
Object.defineProperty(exports, "default", {
|
9
|
-
enumerable: true,
|
10
|
-
get: function get() {
|
11
|
-
return _useFormControl.default;
|
12
|
-
}
|
13
|
-
});
|
14
|
-
Object.defineProperty(exports, "useFormControl", {
|
15
|
-
enumerable: true,
|
16
|
-
get: function get() {
|
17
|
-
return _useFormControl.default;
|
18
|
-
}
|
19
|
-
});
|
20
|
-
var _useFormControl = _interopRequireDefault(require("./use-form-control"));
|
2
|
+
export { default, default as useFormControl } from "./use-form-control";
|
@@ -1,44 +1,35 @@
|
|
1
|
-
"
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
var
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
var _formItemContext = require("../use-form-item/form-item-context");
|
22
|
-
var _fieldsetContext = require("../use-form-fieldset/fieldset-context");
|
23
|
-
var _is = require("../../../utils/is");
|
24
|
-
var _validate = require("../../../utils/validate");
|
25
|
-
var _object = require("../../../utils/object");
|
26
|
-
var _shallowEqual = require("../../../utils/shallow-equal");
|
27
|
-
var _usePersistFn = _interopRequireDefault(require("../../../common/use-persist-fn"));
|
28
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
29
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
11
|
+
import React, { useEffect } from 'react';
|
12
|
+
import { useFormFunc } from "../form-func-context";
|
13
|
+
import { useFormBind } from "../form-bind-context";
|
14
|
+
import { FormItemContext } from "../use-form-item/form-item-context";
|
15
|
+
import { useFieldSetConsumer } from "../use-form-fieldset/fieldset-context";
|
16
|
+
import { isArray } from "../../../utils/is";
|
17
|
+
import { validate } from "../../../utils/validate";
|
18
|
+
import { deepGet } from "../../../utils/object";
|
19
|
+
import { shallowEqual } from "../../../utils/shallow-equal";
|
20
|
+
import usePersistFn from "../../../common/use-persist-fn";
|
30
21
|
var getValue = function getValue(name, formValue) {
|
31
22
|
if (!name) return undefined;
|
32
|
-
if (
|
23
|
+
if (isArray(name)) {
|
33
24
|
return name.map(function (n) {
|
34
|
-
return
|
25
|
+
return deepGet(formValue, n);
|
35
26
|
});
|
36
27
|
}
|
37
|
-
return
|
28
|
+
return deepGet(formValue, name);
|
38
29
|
};
|
39
30
|
var getError = function getError(name, errors, serverErrors) {
|
40
31
|
if (!name) return undefined;
|
41
|
-
if (
|
32
|
+
if (isArray(name)) {
|
42
33
|
for (var i = 0; i < name.length; i++) {
|
43
34
|
var err = (errors !== null && errors !== void 0 ? errors : {})[name[i]] || (serverErrors !== null && serverErrors !== void 0 ? serverErrors : {})[name[i]];
|
44
35
|
if (err) return err;
|
@@ -48,47 +39,47 @@ var getError = function getError(name, errors, serverErrors) {
|
|
48
39
|
return (errors !== null && errors !== void 0 ? errors : {})[name] || (serverErrors !== null && serverErrors !== void 0 ? serverErrors : {})[name];
|
49
40
|
}
|
50
41
|
};
|
51
|
-
function useFormControl(props) {
|
42
|
+
export default function useFormControl(props) {
|
52
43
|
var onChangePo = props.onChange,
|
53
44
|
reserveAble = props.reserveAble,
|
54
45
|
defaultValue = props.defaultValue,
|
55
46
|
rules = props.rules,
|
56
47
|
onError = props.onError,
|
57
48
|
getValidateProps = props.getValidateProps;
|
58
|
-
var _useFieldSetConsumer =
|
49
|
+
var _useFieldSetConsumer = useFieldSetConsumer({
|
59
50
|
name: props.name,
|
60
51
|
bind: props.bind
|
61
52
|
}),
|
62
53
|
name = _useFieldSetConsumer.name,
|
63
54
|
bind = _useFieldSetConsumer.bind;
|
64
|
-
var _React$useState =
|
65
|
-
_React$useState2 = (
|
55
|
+
var _React$useState = React.useState(undefined),
|
56
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
66
57
|
errorState = _React$useState2[0],
|
67
58
|
setErrorState = _React$useState2[1];
|
68
59
|
var value;
|
69
60
|
var error = errorState;
|
70
61
|
var inForm = false;
|
71
|
-
var _useFormBind =
|
62
|
+
var _useFormBind = useFormBind(),
|
72
63
|
controlFunc = _useFormBind.func,
|
73
64
|
disabled = _useFormBind.disabled;
|
74
|
-
var formFunc =
|
75
|
-
var _React$useContext =
|
65
|
+
var formFunc = useFormFunc();
|
66
|
+
var _React$useContext = React.useContext(FormItemContext),
|
76
67
|
updateError = _React$useContext.updateError;
|
77
68
|
var formValue = name && formFunc ? Array.isArray(name) ? name.map(function (n) {
|
78
69
|
return formFunc.getValue(n);
|
79
70
|
}) : formFunc.getValue(name) : undefined;
|
80
|
-
var _React$useState3 =
|
81
|
-
_React$useState4 = (
|
71
|
+
var _React$useState3 = React.useState(formValue),
|
72
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
82
73
|
valueState = _React$useState4[0],
|
83
74
|
setValueState = _React$useState4[1];
|
84
75
|
if (name && formFunc) {
|
85
76
|
inForm = true;
|
86
77
|
value = valueState;
|
87
|
-
if (
|
78
|
+
if (isArray(name) && !isArray(value)) {
|
88
79
|
value = [];
|
89
80
|
}
|
90
81
|
}
|
91
|
-
var update = (
|
82
|
+
var update = usePersistFn(function () {
|
92
83
|
var formValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
93
84
|
var errors = arguments.length > 1 ? arguments[1] : undefined;
|
94
85
|
var severErrors = arguments.length > 2 ? arguments[2] : undefined;
|
@@ -98,51 +89,51 @@ function useFormControl(props) {
|
|
98
89
|
if (error !== errorState) {
|
99
90
|
setErrorState(error);
|
100
91
|
}
|
101
|
-
if (!
|
92
|
+
if (!shallowEqual(value, valueState)) {
|
102
93
|
setValueState(value);
|
103
94
|
}
|
104
95
|
});
|
105
|
-
var validateFiled = (
|
96
|
+
var validateFiled = usePersistFn(function (name, v, formV) {
|
106
97
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
107
98
|
var validateProps = (getValidateProps === null || getValidateProps === void 0 ? void 0 : getValidateProps()) || {};
|
108
99
|
if (inForm) {
|
109
100
|
var bindValidate = function bindValidate() {
|
110
|
-
if (!config.ignoreBind &&
|
111
|
-
formFunc === null || formFunc === void 0
|
101
|
+
if (!config.ignoreBind && isArray(bind)) {
|
102
|
+
formFunc === null || formFunc === void 0 || formFunc.validateFields(bind, {
|
112
103
|
ignoreBind: true
|
113
104
|
}).catch(function () {});
|
114
105
|
}
|
115
106
|
};
|
116
107
|
var fullRules = (controlFunc === null || controlFunc === void 0 ? void 0 : controlFunc.combineRules(name, rules || [])) || [];
|
117
|
-
return
|
108
|
+
return validate(v, formV, fullRules, validateProps).then(function (res) {
|
118
109
|
var err = res === true ? undefined : res;
|
119
|
-
formFunc === null || formFunc === void 0
|
120
|
-
onError === null || onError === void 0
|
110
|
+
formFunc === null || formFunc === void 0 || formFunc.setError(name, err);
|
111
|
+
onError === null || onError === void 0 || onError(err);
|
121
112
|
bindValidate();
|
122
113
|
return res;
|
123
114
|
}).catch(function (e) {
|
124
|
-
formFunc === null || formFunc === void 0
|
125
|
-
onError === null || onError === void 0
|
115
|
+
formFunc === null || formFunc === void 0 || formFunc.setError(name, e);
|
116
|
+
onError === null || onError === void 0 || onError(e);
|
126
117
|
bindValidate();
|
127
118
|
return e;
|
128
119
|
});
|
129
120
|
} else {
|
130
|
-
return
|
121
|
+
return validate(v, {}, rules || [], {}).then(function (res) {
|
131
122
|
var err = res === true ? undefined : res;
|
132
123
|
setErrorState(err);
|
133
|
-
onError === null || onError === void 0
|
124
|
+
onError === null || onError === void 0 || onError(err);
|
134
125
|
return res;
|
135
126
|
}).catch(function (e) {
|
136
127
|
setErrorState(e);
|
137
|
-
onError === null || onError === void 0
|
128
|
+
onError === null || onError === void 0 || onError(e);
|
138
129
|
return e;
|
139
130
|
});
|
140
131
|
}
|
141
132
|
});
|
142
|
-
var onChange = (
|
133
|
+
var onChange = usePersistFn(function (v) {
|
143
134
|
if (inForm && formFunc) {
|
144
|
-
if (
|
145
|
-
var arrV =
|
135
|
+
if (isArray(name)) {
|
136
|
+
var arrV = isArray(v) ? v : [];
|
146
137
|
var objetcV = name.reduce(function (result, name, index) {
|
147
138
|
result[name] = arrV[index];
|
148
139
|
return result;
|
@@ -151,7 +142,7 @@ function useFormControl(props) {
|
|
151
142
|
validate: true
|
152
143
|
});
|
153
144
|
} else {
|
154
|
-
formFunc.setValue((
|
145
|
+
formFunc.setValue(_defineProperty({}, name, v), {
|
155
146
|
validate: true
|
156
147
|
});
|
157
148
|
}
|
@@ -163,10 +154,10 @@ function useFormControl(props) {
|
|
163
154
|
}
|
164
155
|
if (onChangePo) onChangePo.apply(void 0, [v].concat(other));
|
165
156
|
});
|
166
|
-
|
157
|
+
useEffect(function () {
|
167
158
|
if (inForm && controlFunc) {
|
168
|
-
if (
|
169
|
-
var dv =
|
159
|
+
if (isArray(name)) {
|
160
|
+
var dv = isArray(defaultValue) ? defaultValue : [];
|
170
161
|
name.forEach(function (n, index) {
|
171
162
|
controlFunc.bind(n, dv[index], validateFiled, update);
|
172
163
|
});
|
@@ -176,7 +167,7 @@ function useFormControl(props) {
|
|
176
167
|
}
|
177
168
|
return function () {
|
178
169
|
if (inForm && controlFunc) {
|
179
|
-
if (
|
170
|
+
if (isArray(name)) {
|
180
171
|
name.forEach(function (n) {
|
181
172
|
controlFunc.unbind(n, reserveAble);
|
182
173
|
});
|
@@ -186,8 +177,8 @@ function useFormControl(props) {
|
|
186
177
|
}
|
187
178
|
};
|
188
179
|
}, [name]);
|
189
|
-
|
190
|
-
updateError(
|
180
|
+
useEffect(function () {
|
181
|
+
updateError(isArray(name) ? name.join('|') : name, error);
|
191
182
|
}, [error]);
|
192
183
|
return {
|
193
184
|
value: value,
|
@@ -1,27 +1,13 @@
|
|
1
|
-
"use strict";
|
2
1
|
'use client';
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
var
|
12
|
-
Object.defineProperty(exports, "__esModule", {
|
13
|
-
value: true
|
14
|
-
});
|
15
|
-
exports.useFieldSetConsumer = exports.default = void 0;
|
16
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
17
|
-
require("core-js/modules/es.array.map.js");
|
18
|
-
require("core-js/modules/es.array.concat.js");
|
19
|
-
var _react = _interopRequireWildcard(require("react"));
|
20
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
21
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
22
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
23
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
24
|
-
var FieldsetContext = /*#__PURE__*/(0, _react.createContext)({
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
6
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
9
|
+
import React, { createContext } from 'react';
|
10
|
+
var FieldsetContext = /*#__PURE__*/createContext({
|
25
11
|
path: ''
|
26
12
|
});
|
27
13
|
function extendName() {
|
@@ -36,13 +22,13 @@ function extendName() {
|
|
36
22
|
}
|
37
23
|
return "".concat(path).concat(path.length > 0 ? '.' : '').concat(name);
|
38
24
|
}
|
39
|
-
var useFieldSetConsumer = function useFieldSetConsumer(props) {
|
40
|
-
var _React$useContext =
|
25
|
+
export var useFieldSetConsumer = function useFieldSetConsumer(props) {
|
26
|
+
var _React$useContext = React.useContext(FieldsetContext),
|
41
27
|
path = _React$useContext.path;
|
42
|
-
var bind =
|
28
|
+
var bind = React.useMemo(function () {
|
43
29
|
return path ? (props.bind || []).concat(path) : props.bind;
|
44
30
|
}, [path, props.bind]);
|
45
|
-
var name =
|
31
|
+
var name = React.useMemo(function () {
|
46
32
|
return extendName(path, props.name);
|
47
33
|
}, [path, props.name]);
|
48
34
|
return _objectSpread(_objectSpread({}, props), {}, {
|
@@ -50,6 +36,4 @@ var useFieldSetConsumer = function useFieldSetConsumer(props) {
|
|
50
36
|
bind: bind
|
51
37
|
});
|
52
38
|
};
|
53
|
-
|
54
|
-
var _default = FieldsetContext;
|
55
|
-
exports.default = _default;
|
39
|
+
export default FieldsetContext;
|
@@ -1,27 +1,3 @@
|
|
1
|
-
"use strict";
|
2
1
|
"use client";
|
3
|
-
|
4
|
-
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
6
|
-
value: true
|
7
|
-
});
|
8
|
-
Object.defineProperty(exports, "default", {
|
9
|
-
enumerable: true,
|
10
|
-
get: function get() {
|
11
|
-
return _useFormFieldset.default;
|
12
|
-
}
|
13
|
-
});
|
14
|
-
Object.defineProperty(exports, "useFieldSetConsumer", {
|
15
|
-
enumerable: true,
|
16
|
-
get: function get() {
|
17
|
-
return _fieldsetContext.useFieldSetConsumer;
|
18
|
-
}
|
19
|
-
});
|
20
|
-
Object.defineProperty(exports, "useFormFieldSet", {
|
21
|
-
enumerable: true,
|
22
|
-
get: function get() {
|
23
|
-
return _useFormFieldset.default;
|
24
|
-
}
|
25
|
-
});
|
26
|
-
var _useFormFieldset = _interopRequireDefault(require("./use-form-fieldset"));
|
27
|
-
var _fieldsetContext = require("./fieldset-context");
|
2
|
+
export { default as useFormFieldSet, default } from "./use-form-fieldset";
|
3
|
+
export { useFieldSetConsumer } from "./fieldset-context";
|
@@ -1,16 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports.useFormFieldSet = exports.default = void 0;
|
8
|
-
var _fieldsetContext = _interopRequireDefault(require("./fieldset-context"));
|
9
|
-
var _useFormControl2 = require("../use-form-control");
|
1
|
+
import FieldsetContext from "./fieldset-context";
|
2
|
+
import { useFormControl } from "../use-form-control";
|
10
3
|
var emptyFunc = function emptyFunc() {};
|
11
4
|
var emptyArr = [];
|
12
|
-
var useFormFieldSet = function useFormFieldSet(props) {
|
13
|
-
var _useFormControl =
|
5
|
+
export var useFormFieldSet = function useFormFieldSet(props) {
|
6
|
+
var _useFormControl = useFormControl({
|
14
7
|
name: props.name,
|
15
8
|
defaultValue: props.defaultValue,
|
16
9
|
reserveAble: props.reserveAble,
|
@@ -32,13 +25,11 @@ var useFormFieldSet = function useFormFieldSet(props) {
|
|
32
25
|
path: name
|
33
26
|
};
|
34
27
|
return {
|
35
|
-
Provider:
|
28
|
+
Provider: FieldsetContext.Provider,
|
36
29
|
ProviderValue: ProviderValue,
|
37
30
|
error: error,
|
38
31
|
value: value,
|
39
32
|
onChange: onChange
|
40
33
|
};
|
41
34
|
};
|
42
|
-
|
43
|
-
var _default = useFormFieldSet;
|
44
|
-
exports.default = _default;
|
35
|
+
export default useFormFieldSet;
|
@@ -1,27 +1,3 @@
|
|
1
|
-
"use strict";
|
2
1
|
"use client";
|
3
|
-
|
4
|
-
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
6
|
-
value: true
|
7
|
-
});
|
8
|
-
Object.defineProperty(exports, "default", {
|
9
|
-
enumerable: true,
|
10
|
-
get: function get() {
|
11
|
-
return _useFormFlow.default;
|
12
|
-
}
|
13
|
-
});
|
14
|
-
Object.defineProperty(exports, "useFormDatum", {
|
15
|
-
enumerable: true,
|
16
|
-
get: function get() {
|
17
|
-
return _useFormDatum.default;
|
18
|
-
}
|
19
|
-
});
|
20
|
-
Object.defineProperty(exports, "useFormFlow", {
|
21
|
-
enumerable: true,
|
22
|
-
get: function get() {
|
23
|
-
return _useFormFlow.default;
|
24
|
-
}
|
25
|
-
});
|
26
|
-
var _useFormFlow = _interopRequireDefault(require("./use-form-flow"));
|
27
|
-
var _useFormDatum = _interopRequireDefault(require("./use-form-datum"));
|
2
|
+
export { default, default as useFormFlow } from "./use-form-flow";
|
3
|
+
export { default as useFormDatum } from "./use-form-datum";
|
@@ -1,18 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
var _ = require("../../..");
|
1
|
+
import { useFormFunc, useLatestObj } from "../../..";
|
8
2
|
var useFormDatum = function useFormDatum() {
|
9
|
-
var formFunc =
|
10
|
-
var func =
|
3
|
+
var formFunc = useFormFunc();
|
4
|
+
var func = useLatestObj({
|
11
5
|
set: formFunc === null || formFunc === void 0 ? void 0 : formFunc.setValue,
|
12
6
|
get: formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue
|
13
7
|
});
|
14
8
|
var datum = formFunc ? func : undefined;
|
15
9
|
return datum;
|
16
10
|
};
|
17
|
-
|
18
|
-
exports.default = _default;
|
11
|
+
export default useFormDatum;
|
@@ -1,20 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports.default = void 0;
|
8
|
-
var _react = require("react");
|
9
|
-
var _formBindContext = require("../form-bind-context");
|
10
|
-
var _useRender = _interopRequireDefault(require("../../../common/use-render"));
|
11
|
-
var _useFormDatum = _interopRequireDefault(require("./use-form-datum"));
|
1
|
+
import { useEffect } from 'react';
|
2
|
+
import { useFormBind } from "../form-bind-context";
|
3
|
+
import useRender from "../../../common/use-render";
|
4
|
+
import useFormDatum from "./use-form-datum";
|
12
5
|
var UseFormItem = function UseFormItem(props) {
|
13
6
|
var names = props.names;
|
14
|
-
var formBind =
|
15
|
-
var update = (
|
16
|
-
var formDatum = (
|
17
|
-
|
7
|
+
var formBind = useFormBind();
|
8
|
+
var update = useRender();
|
9
|
+
var formDatum = useFormDatum();
|
10
|
+
useEffect(function () {
|
18
11
|
if (formBind && formBind.func) {
|
19
12
|
formBind.func.watch(names, update);
|
20
13
|
}
|
@@ -26,5 +19,4 @@ var UseFormItem = function UseFormItem(props) {
|
|
26
19
|
}, [names]);
|
27
20
|
return formDatum;
|
28
21
|
};
|
29
|
-
|
30
|
-
exports.default = _default;
|
22
|
+
export default UseFormItem;
|
@@ -1,18 +1,6 @@
|
|
1
|
-
"use strict";
|
2
1
|
"use client";
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
7
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
8
|
-
Object.defineProperty(exports, "__esModule", {
|
9
|
-
value: true
|
10
|
-
});
|
11
|
-
exports.FormItemContext = void 0;
|
12
|
-
var React = _interopRequireWildcard(require("react"));
|
13
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
14
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
15
|
-
var FormItemContext = /*#__PURE__*/React.createContext({
|
3
|
+
import * as React from 'react';
|
4
|
+
export var FormItemContext = /*#__PURE__*/React.createContext({
|
16
5
|
updateError: function updateError() {}
|
17
|
-
});
|
18
|
-
exports.FormItemContext = FormItemContext;
|
6
|
+
});
|