@sheinx/hooks 3.0.0-alpha.9 → 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 +3 -2
- package/cjs/common/use-click-away/index.d.ts.map +1 -1
- package/cjs/common/use-click-away/index.js +8 -6
- package/cjs/common/use-default-value/index.js +3 -2
- package/cjs/common/use-default-value/use-default-value.js +9 -5
- package/cjs/common/use-drag-mock/index.js +3 -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 +3 -2
- package/cjs/common/use-filter/use-filter.d.ts +2 -3
- package/cjs/common/use-filter/use-filter.d.ts.map +1 -1
- package/cjs/common/use-filter/use-filter.js +48 -36
- package/cjs/common/use-filter/use-filter.type.d.ts +2 -1
- package/cjs/common/use-filter/use-filter.type.d.ts.map +1 -1
- package/cjs/common/use-fork-ref/index.js +6 -10
- package/cjs/common/use-func-change/index.js +3 -2
- package/cjs/common/use-func-change/use-func-change.d.ts +1 -1
- package/cjs/common/use-func-change/use-func-change.d.ts.map +1 -1
- package/cjs/common/use-func-change/use-func-change.js +3 -4
- package/cjs/common/use-input-able/index.js +3 -2
- package/cjs/common/use-input-able/use-Input-able.d.ts.map +1 -1
- package/cjs/common/use-input-able/use-Input-able.js +15 -7
- package/cjs/common/use-input-able/use-Input-able.type.d.ts +2 -1
- package/cjs/common/use-input-able/use-Input-able.type.d.ts.map +1 -1
- package/cjs/common/use-key-event/index.js +7 -8
- package/cjs/common/use-latest-obj/index.js +2 -3
- package/cjs/common/use-list-select/index.js +3 -2
- package/cjs/common/use-list-select/use-list-select-multiple.d.ts.map +1 -1
- package/cjs/common/use-list-select/use-list-select-multiple.js +29 -44
- 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.d.ts +2 -1
- package/cjs/common/use-pagination-list/index.d.ts.map +1 -1
- package/cjs/common/use-pagination-list/index.js +20 -16
- package/cjs/common/use-persist-fn/index.js +2 -2
- package/cjs/common/use-position-style/get-position-style.d.ts +1 -0
- package/cjs/common/use-position-style/get-position-style.d.ts.map +1 -1
- package/cjs/common/use-position-style/get-position-style.js +16 -9
- package/cjs/common/use-position-style/index.d.ts +6 -6
- package/cjs/common/use-position-style/index.d.ts.map +1 -1
- package/cjs/common/use-position-style/index.js +61 -46
- package/cjs/common/use-previous/index.js +2 -2
- package/cjs/common/use-render/index.js +9 -5
- package/cjs/common/use-resize/index.js +12 -9
- package/cjs/common/use-safe-state/index.js +9 -5
- package/cjs/common/use-style/index.js +1 -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 +8 -3
- package/cjs/common/use-transform/index.js +3 -2
- package/cjs/common/use-transform/use-transform.d.ts.map +1 -1
- package/cjs/common/use-transform/use-transform.js +19 -20
- package/cjs/common/use-unmounted-ref/index.js +2 -2
- package/cjs/components/use-button/index.js +3 -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 +3 -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 +3 -2
- package/cjs/components/use-cascader/use-cascader.d.ts +4 -0
- package/cjs/components/use-cascader/use-cascader.d.ts.map +1 -1
- package/cjs/components/use-cascader/use-cascader.js +6 -5
- package/cjs/components/use-cascader/use-cascader.type.d.ts +1 -0
- package/cjs/components/use-cascader/use-cascader.type.d.ts.map +1 -1
- package/cjs/components/use-check/index.js +3 -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 +3 -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 +3 -2
- package/cjs/components/use-datepicker/use-date.d.ts +1 -1
- package/cjs/components/use-datepicker/use-date.js +13 -11
- package/cjs/components/use-datepicker/use-datepicker-format.d.ts +1 -1
- package/cjs/components/use-datepicker/use-datepicker-format.d.ts.map +1 -1
- package/cjs/components/use-datepicker/use-datepicker-format.js +30 -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.d.ts.map +1 -1
- package/cjs/components/use-datepicker/use-datepicker-range.js +12 -8
- 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.d.ts +1 -1
- package/cjs/components/use-datepicker/use-month.js +13 -11
- package/cjs/components/use-datepicker/use-quarter.d.ts +1 -1
- 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.d.ts +1 -1
- 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 +3 -2
- package/cjs/components/use-descriptions/use-descriptions.js +14 -11
- package/cjs/components/use-form/Provider.d.ts.map +1 -1
- package/cjs/components/use-form/Provider.js +16 -12
- package/cjs/components/use-form/form-bind-context.d.ts.map +1 -1
- package/cjs/components/use-form/form-bind-context.js +7 -11
- package/cjs/components/use-form/form-config-context.d.ts.map +1 -1
- package/cjs/components/use-form/form-config-context.js +7 -11
- package/cjs/components/use-form/form-func-context.d.ts.map +1 -1
- package/cjs/components/use-form/form-func-context.js +7 -11
- package/cjs/components/use-form/index.js +3 -3
- package/cjs/components/use-form/use-form-control/index.js +3 -2
- package/cjs/components/use-form/use-form-control/use-form-control.d.ts +1 -0
- package/cjs/components/use-form/use-form-control/use-form-control.d.ts.map +1 -1
- package/cjs/components/use-form/use-form-control/use-form-control.js +31 -27
- package/cjs/components/use-form/use-form-fieldset/fieldset-context.d.ts +1 -1
- package/cjs/components/use-form/use-form-fieldset/fieldset-context.d.ts.map +1 -1
- package/cjs/components/use-form/use-form-fieldset/fieldset-context.js +24 -25
- package/cjs/components/use-form/use-form-fieldset/index.js +3 -2
- package/cjs/components/use-form/use-form-fieldset/use-form-fieldset.d.ts +1 -1
- package/cjs/components/use-form/use-form-fieldset/use-form-fieldset.d.ts.map +1 -1
- package/cjs/components/use-form/use-form-fieldset/use-form-fieldset.js +9 -19
- package/cjs/components/use-form/use-form-flow/index.js +3 -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.d.ts.map +1 -1
- package/cjs/components/use-form/use-form-item/form-item-context.js +6 -9
- package/cjs/components/use-form/use-form-item/index.js +3 -2
- package/cjs/components/use-form/use-form-item/use-form-item.js +13 -14
- package/cjs/components/use-form/use-form.d.ts +2 -2
- package/cjs/components/use-form/use-form.d.ts.map +1 -1
- package/cjs/components/use-form/use-form.js +44 -41
- package/cjs/components/use-form/use-form.type.d.ts +8 -5
- package/cjs/components/use-form/use-form.type.d.ts.map +1 -1
- package/cjs/components/use-image/index.js +3 -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 +3 -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.d.ts.map +1 -1
- package/cjs/components/use-input/use-input-number.js +16 -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.d.ts.map +1 -1
- package/cjs/components/use-input/use-input.js +37 -30
- package/cjs/components/use-input/use-input.type.d.ts +6 -5
- package/cjs/components/use-input/use-input.type.d.ts.map +1 -1
- package/cjs/components/use-menu/index.js +3 -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 +3 -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 +3 -2
- package/cjs/components/use-popup/popup-context.d.ts.map +1 -1
- package/cjs/components/use-popup/popup-context.js +2 -2
- package/cjs/components/use-popup/use-popup.d.ts.map +1 -1
- package/cjs/components/use-popup/use-popup.js +20 -13
- 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 +3 -2
- package/cjs/components/use-select/use-select-group.js +13 -10
- package/cjs/components/use-select/use-select.d.ts.map +1 -1
- package/cjs/components/use-select/use-select.js +7 -5
- package/cjs/components/use-select/use-select.type.d.ts +2 -1
- package/cjs/components/use-select/use-select.type.d.ts.map +1 -1
- package/cjs/components/use-slider/index.js +3 -2
- package/cjs/components/use-slider/use-slider.js +15 -10
- package/cjs/components/use-table/index.js +3 -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 +13 -20
- 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 +1 -0
- package/cjs/components/use-table/use-table-layout.d.ts.map +1 -1
- package/cjs/components/use-table/use-table-layout.js +60 -45
- 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.d.ts.map +1 -1
- package/cjs/components/use-table/use-table-virtual.js +23 -15
- 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.d.ts.map +1 -1
- package/cjs/components/use-tabs/context.js +8 -13
- package/cjs/components/use-tabs/index.js +3 -2
- package/cjs/components/use-tabs/use-tabs.js +9 -6
- package/cjs/components/use-tabs/use-tabs.type.d.ts +2 -1
- package/cjs/components/use-tabs/use-tabs.type.d.ts.map +1 -1
- package/cjs/components/use-textarea/index.js +3 -2
- package/cjs/components/use-textarea/use-textarea-format.js +5 -7
- package/cjs/components/use-textarea/use-textarea-format.type.d.ts +1 -5
- 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 +3 -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 +3 -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.d.ts +4 -9
- package/cjs/components/use-tree/use-tree.d.ts.map +1 -1
- package/cjs/components/use-tree/use-tree.js +20 -29
- 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 +3 -2
- package/cjs/components/use-treeselect/use-tiled.d.ts +2 -2
- package/cjs/components/use-treeselect/use-tiled.d.ts.map +1 -1
- package/cjs/components/use-treeselect/use-tiled.js +18 -21
- package/cjs/components/use-treeselect/use-tiled.type.d.ts +4 -3
- package/cjs/components/use-treeselect/use-tiled.type.d.ts.map +1 -1
- package/cjs/components/use-treeselect/use-treeselect.d.ts.map +1 -1
- package/cjs/components/use-treeselect/use-treeselect.js +5 -4
- package/cjs/components/use-treeselect/use-treeselect.type.d.ts +1 -0
- package/cjs/components/use-treeselect/use-treeselect.type.d.ts.map +1 -1
- package/cjs/components/use-upload/index.js +3 -2
- package/cjs/components/use-upload/use-upload.js +44 -42
- package/cjs/components/use-upload/use-upload.type.d.ts +5 -1
- package/cjs/components/use-upload/use-upload.type.d.ts.map +1 -1
- package/cjs/components/use-upload/xhr.js +0 -1
- package/cjs/components/use-validate/index.js +3 -2
- package/cjs/components/use-validate/use-validate.js +9 -5
- package/cjs/index.js +5 -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.d.ts +1 -1
- package/cjs/utils/attribute.d.ts.map +1 -1
- package/cjs/utils/attribute.js +6 -6
- package/cjs/utils/clone.js +11 -20
- package/cjs/utils/document.d.ts.map +1 -1
- package/cjs/utils/document.js +10 -5
- package/cjs/utils/dom/element.d.ts.map +1 -1
- package/cjs/utils/dom/element.js +20 -17
- package/cjs/utils/dom/index.js +2 -3
- package/cjs/utils/dom/ready.d.ts.map +1 -1
- package/cjs/utils/dom/ready.js +2 -0
- 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 +3 -0
- package/cjs/utils/immer.d.ts.map +1 -0
- package/cjs/utils/immer.js +24 -0
- package/cjs/utils/index.d.ts +1 -0
- package/cjs/utils/index.d.ts.map +1 -1
- package/cjs/utils/index.js +14 -3
- package/cjs/utils/is.d.ts +2 -1
- package/cjs/utils/is.d.ts.map +1 -1
- package/cjs/utils/is.js +37 -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 +2 -2
- package/cjs/utils/tree.d.ts.map +1 -1
- package/cjs/utils/tree.js +20 -22
- package/cjs/utils/uid.js +2 -13
- 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 +3 -2
- package/esm/common/use-click-away/index.d.ts.map +1 -1
- package/esm/common/use-click-away/index.js +14 -20
- package/esm/common/use-default-value/index.js +3 -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 +4 -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 +2 -19
- package/esm/common/use-filter/use-filter.d.ts +2 -3
- package/esm/common/use-filter/use-filter.d.ts.map +1 -1
- package/esm/common/use-filter/use-filter.js +62 -56
- package/esm/common/use-filter/use-filter.type.d.ts +2 -1
- package/esm/common/use-filter/use-filter.type.d.ts.map +1 -1
- package/esm/common/use-filter/use-filter.type.js +1 -5
- package/esm/common/use-fork-ref/index.js +6 -20
- package/esm/common/use-fork-ref/setRef.js +1 -7
- package/esm/common/use-func-change/index.js +2 -19
- package/esm/common/use-func-change/use-func-change.d.ts +1 -1
- package/esm/common/use-func-change/use-func-change.d.ts.map +1 -1
- package/esm/common/use-func-change/use-func-change.js +8 -16
- package/esm/common/use-input-able/index.js +2 -19
- package/esm/common/use-input-able/use-Input-able.d.ts.map +1 -1
- package/esm/common/use-input-able/use-Input-able.js +27 -26
- package/esm/common/use-input-able/use-Input-able.type.d.ts +2 -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 +8 -15
- package/esm/common/use-latest-obj/index.js +5 -12
- package/esm/common/use-list-select/index.js +4 -33
- package/esm/common/use-list-select/use-list-select-multiple.d.ts.map +1 -1
- package/esm/common/use-list-select/use-list-select-multiple.js +44 -69
- 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.d.ts +2 -1
- package/esm/common/use-pagination-list/index.d.ts.map +1 -1
- package/esm/common/use-pagination-list/index.js +25 -27
- package/esm/common/use-persist-fn/index.js +6 -11
- package/esm/common/use-position-style/get-position-style.d.ts +1 -0
- package/esm/common/use-position-style/get-position-style.d.ts.map +1 -1
- package/esm/common/use-position-style/get-position-style.js +16 -15
- package/esm/common/use-position-style/index.d.ts +6 -6
- package/esm/common/use-position-style/index.d.ts.map +1 -1
- package/esm/common/use-position-style/index.js +67 -62
- package/esm/common/use-previous/index.js +6 -13
- package/esm/common/use-render/index.js +16 -19
- package/esm/common/use-resize/index.js +18 -21
- package/esm/common/use-safe-state/index.js +16 -19
- package/esm/common/use-style/index.js +4 -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 +13 -14
- package/esm/common/use-transform/index.js +2 -19
- package/esm/common/use-transform/use-transform.d.ts.map +1 -1
- package/esm/common/use-transform/use-transform.js +29 -36
- package/esm/common/use-transform/use-transform.type.js +1 -5
- package/esm/common/use-unmounted-ref/index.js +6 -13
- package/esm/components/use-button/index.js +2 -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 +2 -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 +2 -19
- package/esm/components/use-cascader/use-cascader.d.ts +4 -0
- package/esm/components/use-cascader/use-cascader.d.ts.map +1 -1
- package/esm/components/use-cascader/use-cascader.js +9 -15
- package/esm/components/use-cascader/use-cascader.type.d.ts +1 -0
- package/esm/components/use-cascader/use-cascader.type.d.ts.map +1 -1
- package/esm/components/use-cascader/use-cascader.type.js +1 -5
- package/esm/components/use-check/index.js +2 -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 +3 -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 +9 -62
- package/esm/components/use-datepicker/use-date.d.ts +1 -1
- 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.d.ts +1 -1
- package/esm/components/use-datepicker/use-datepicker-format.d.ts.map +1 -1
- package/esm/components/use-datepicker/use-datepicker-format.js +58 -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.d.ts.map +1 -1
- package/esm/components/use-datepicker/use-datepicker-range.js +44 -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.d.ts +1 -1
- 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.d.ts +1 -1
- 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.d.ts +1 -1
- 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 +2 -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.d.ts.map +1 -1
- package/esm/components/use-form/Provider.js +19 -25
- package/esm/components/use-form/form-bind-context.d.ts.map +1 -1
- package/esm/components/use-form/form-bind-context.js +5 -17
- package/esm/components/use-form/form-config-context.d.ts.map +1 -1
- package/esm/components/use-form/form-config-context.js +5 -17
- package/esm/components/use-form/form-func-context.d.ts.map +1 -1
- package/esm/components/use-form/form-func-context.js +5 -17
- package/esm/components/use-form/index.js +8 -87
- package/esm/components/use-form/use-form-control/index.js +2 -19
- package/esm/components/use-form/use-form-control/use-form-control.d.ts +1 -0
- package/esm/components/use-form/use-form-control/use-form-control.d.ts.map +1 -1
- package/esm/components/use-form/use-form-control/use-form-control.js +64 -69
- 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.d.ts +1 -1
- package/esm/components/use-form/use-form-fieldset/fieldset-context.d.ts.map +1 -1
- package/esm/components/use-form/use-form-fieldset/fieldset-context.js +27 -35
- package/esm/components/use-form/use-form-fieldset/index.js +3 -26
- package/esm/components/use-form/use-form-fieldset/use-form-fieldset.d.ts +1 -1
- package/esm/components/use-form/use-form-fieldset/use-form-fieldset.d.ts.map +1 -1
- package/esm/components/use-form/use-form-fieldset/use-form-fieldset.js +11 -28
- 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 +3 -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.d.ts.map +1 -1
- package/esm/components/use-form/use-form-item/form-item-context.js +4 -15
- package/esm/components/use-form/use-form-item/index.js +2 -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.d.ts.map +1 -1
- package/esm/components/use-form/use-form.js +80 -86
- package/esm/components/use-form/use-form.type.d.ts +8 -5
- 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 +5 -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 +5 -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.d.ts.map +1 -1
- package/esm/components/use-input/use-input-number.js +24 -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.d.ts.map +1 -1
- package/esm/components/use-input/use-input.js +41 -43
- package/esm/components/use-input/use-input.type.d.ts +6 -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 +3 -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 +2 -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 +2 -19
- package/esm/components/use-popup/popup-context.d.ts.map +1 -1
- package/esm/components/use-popup/popup-context.js +4 -9
- package/esm/components/use-popup/use-popup.d.ts.map +1 -1
- package/esm/components/use-popup/use-popup.js +40 -40
- 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 +3 -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.d.ts.map +1 -1
- package/esm/components/use-select/use-select.js +11 -15
- package/esm/components/use-select/use-select.type.d.ts +2 -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 +2 -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 +9 -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 +17 -31
- 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 +1 -0
- package/esm/components/use-table/use-table-layout.d.ts.map +1 -1
- package/esm/components/use-table/use-table-layout.js +89 -83
- 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.d.ts.map +1 -1
- package/esm/components/use-table/use-table-virtual.js +40 -38
- 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.d.ts.map +1 -1
- package/esm/components/use-tabs/context.js +8 -21
- package/esm/components/use-tabs/context.type.js +1 -5
- package/esm/components/use-tabs/index.js +3 -26
- package/esm/components/use-tabs/use-tabs.js +13 -16
- package/esm/components/use-tabs/use-tabs.type.d.ts +2 -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 +3 -26
- package/esm/components/use-textarea/use-textarea-format.js +6 -15
- package/esm/components/use-textarea/use-textarea-format.type.d.ts +1 -5
- 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 +2 -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 +3 -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.d.ts +4 -9
- package/esm/components/use-tree/use-tree.d.ts.map +1 -1
- package/esm/components/use-tree/use-tree.js +33 -49
- 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 +3 -26
- package/esm/components/use-treeselect/use-tiled.d.ts +2 -2
- package/esm/components/use-treeselect/use-tiled.d.ts.map +1 -1
- package/esm/components/use-treeselect/use-tiled.js +27 -36
- package/esm/components/use-treeselect/use-tiled.type.d.ts +4 -3
- 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.d.ts.map +1 -1
- package/esm/components/use-treeselect/use-treeselect.js +7 -12
- package/esm/components/use-treeselect/use-treeselect.type.d.ts +1 -0
- package/esm/components/use-treeselect/use-treeselect.type.d.ts.map +1 -1
- package/esm/components/use-treeselect/use-treeselect.type.js +1 -5
- package/esm/components/use-upload/index.js +2 -19
- package/esm/components/use-upload/use-upload.js +62 -67
- package/esm/components/use-upload/use-upload.type.d.ts +5 -1
- package/esm/components/use-upload/use-upload.type.d.ts.map +1 -1
- 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 +2 -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 +49 -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.d.ts +1 -1
- package/esm/utils/attribute.d.ts.map +1 -1
- package/esm/utils/attribute.js +6 -12
- package/esm/utils/clone.js +19 -34
- package/esm/utils/document.d.ts.map +1 -1
- package/esm/utils/document.js +11 -13
- package/esm/utils/dom/element.d.ts.map +1 -1
- package/esm/utils/dom/element.js +30 -37
- 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.d.ts.map +1 -1
- package/esm/utils/dom/ready.js +3 -7
- 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 +3 -0
- package/esm/utils/immer.d.ts.map +1 -0
- package/esm/utils/immer.js +13 -0
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/index.d.ts.map +1 -1
- package/esm/utils/index.js +22 -257
- package/esm/utils/is.d.ts +2 -1
- package/esm/utils/is.d.ts.map +1 -1
- package/esm/utils/is.js +36 -65
- 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 +2 -2
- package/esm/utils/tree.d.ts.map +1 -1
- package/esm/utils/tree.js +24 -32
- package/esm/utils/uid.js +4 -22
- 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 +5 -3
package/cjs/utils/dom/element.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
5
4
|
value: true
|
6
5
|
});
|
@@ -9,12 +8,9 @@ exports.cssSupport = cssSupport;
|
|
9
8
|
exports.getParent = getParent;
|
10
9
|
exports.parsePxToNumber = void 0;
|
11
10
|
exports.wrapSpan = wrapSpan;
|
12
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
13
|
-
require("core-js/modules/es.regexp.exec.js");
|
14
|
-
require("core-js/modules/es.array.map.js");
|
15
|
-
require("core-js/modules/es.string.replace.js");
|
16
11
|
var _react = _interopRequireDefault(require("react"));
|
17
12
|
var _func = require("../func");
|
13
|
+
var _is = require("../is");
|
18
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
19
15
|
var _this = void 0;
|
20
16
|
/**
|
@@ -23,6 +19,13 @@ var _this = void 0;
|
|
23
19
|
* @param str 文本内容
|
24
20
|
* @returns boolean
|
25
21
|
*/
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
23
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
24
|
+
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."); }
|
25
|
+
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); }
|
26
|
+
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; }
|
27
|
+
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; } }
|
28
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
26
29
|
var isTwoCNChar = function isTwoCNChar(str) {
|
27
30
|
return /^[\u4e00-\u9fa5]{2}$/.test(str);
|
28
31
|
};
|
@@ -52,12 +55,12 @@ function wrapSpan(children) {
|
|
52
55
|
return item;
|
53
56
|
});
|
54
57
|
}
|
55
|
-
var addResizeObserver = function addResizeObserver(el, handler) {
|
58
|
+
var addResizeObserver = exports.addResizeObserver = function addResizeObserver(el, handler) {
|
56
59
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
57
60
|
var direction = options.direction,
|
58
61
|
timer = options.timer;
|
59
62
|
var _debounce = (0, _func.debounce)(handler, timer),
|
60
|
-
_debounce2 = (
|
63
|
+
_debounce2 = _slicedToArray(_debounce, 2),
|
61
64
|
debounceHandler = _debounce2[0],
|
62
65
|
cleanTimer = _debounce2[1];
|
63
66
|
var h = debounceHandler;
|
@@ -105,7 +108,6 @@ var addResizeObserver = function addResizeObserver(el, handler) {
|
|
105
108
|
cleanTimer();
|
106
109
|
};
|
107
110
|
};
|
108
|
-
exports.addResizeObserver = addResizeObserver;
|
109
111
|
function getParent(el, target) {
|
110
112
|
if (!target) {
|
111
113
|
return null;
|
@@ -124,17 +126,18 @@ function getParent(el, target) {
|
|
124
126
|
return null;
|
125
127
|
}
|
126
128
|
function cssSupport(attr, value) {
|
127
|
-
|
128
|
-
|
129
|
-
if (attr
|
130
|
-
|
131
|
-
|
129
|
+
if ((0, _is.isBrowser)()) {
|
130
|
+
var element = document.createElement('div');
|
131
|
+
if (attr in element.style) {
|
132
|
+
if (attr !== 'length' && attr !== 'parentRule') {
|
133
|
+
var attrs = element.style[attr];
|
134
|
+
element.style[attr] = value;
|
135
|
+
}
|
136
|
+
return element.style[attr] === value;
|
132
137
|
}
|
133
|
-
return element.style[attr] === value;
|
134
138
|
}
|
135
139
|
return false;
|
136
140
|
}
|
137
|
-
var parsePxToNumber = function parsePxToNumber(str) {
|
141
|
+
var parsePxToNumber = exports.parsePxToNumber = function parsePxToNumber(str) {
|
138
142
|
return Number(str.replace(/\s+|px/gi, ''));
|
139
|
-
};
|
140
|
-
exports.parsePxToNumber = parsePxToNumber;
|
143
|
+
};
|
package/cjs/utils/dom/index.js
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
6
4
|
value: true
|
7
5
|
});
|
@@ -66,4 +64,5 @@ Object.keys(_ready).forEach(function (key) {
|
|
66
64
|
}
|
67
65
|
});
|
68
66
|
});
|
69
|
-
var _responsiveObserve = _interopRequireDefault(require("./responsiveObserve"));
|
67
|
+
var _responsiveObserve = _interopRequireDefault(require("./responsiveObserve"));
|
68
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ready.d.ts","sourceRoot":"","sources":["ready.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"ready.d.ts","sourceRoot":"","sources":["ready.ts"],"names":[],"mappings":"AACA,wBAAgB,KAAK,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,IAAI,QAOrD"}
|
package/cjs/utils/dom/ready.js
CHANGED
@@ -4,8 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.ready = ready;
|
7
|
+
var _is = require("../is");
|
7
8
|
function ready(callback) {
|
8
9
|
if (!callback) return;
|
10
|
+
if (!(0, _is.isBrowser)()) return;
|
9
11
|
if (document.readyState !== 'loading') callback();else {
|
10
12
|
document.addEventListener('DOMContentLoaded', callback);
|
11
13
|
}
|
@@ -1,20 +1,17 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
6
4
|
value: true
|
7
5
|
});
|
8
6
|
exports.responsiveMap = exports.responsiveArray = exports.default = void 0;
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
function
|
14
|
-
function
|
15
|
-
var responsiveArray = ['xxxl', 'xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
|
16
|
-
exports.
|
17
|
-
var responsiveMap = {
|
7
|
+
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); }
|
8
|
+
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; }
|
9
|
+
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; }
|
10
|
+
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; }
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
12
|
+
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); }
|
13
|
+
var responsiveArray = exports.responsiveArray = ['xxxl', 'xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
|
14
|
+
var responsiveMap = exports.responsiveMap = {
|
18
15
|
xs: '(max-width: 575px)',
|
19
16
|
sm: '(min-width: 576px)',
|
20
17
|
md: '(min-width: 768px)',
|
@@ -23,7 +20,6 @@ var responsiveMap = {
|
|
23
20
|
xxl: '(min-width: 1600px)',
|
24
21
|
xxxl: '(min-width: 2000px)'
|
25
22
|
};
|
26
|
-
exports.responsiveMap = responsiveMap;
|
27
23
|
var subscribers = [];
|
28
24
|
var subUid = -1;
|
29
25
|
var screens = {};
|
@@ -42,7 +38,7 @@ var responsiveObserve = {
|
|
42
38
|
var listener = function listener(screen) {
|
43
39
|
return function (_ref) {
|
44
40
|
var matches = _ref.matches;
|
45
|
-
return _this.dispatch(_objectSpread(_objectSpread({}, screens), {}, (
|
41
|
+
return _this.dispatch(_objectSpread(_objectSpread({}, screens), {}, _defineProperty({}, screen, matches)), screen);
|
46
42
|
};
|
47
43
|
};
|
48
44
|
Object.keys(responsiveMap).forEach(function (screen) {
|
@@ -85,5 +81,4 @@ var responsiveObserve = {
|
|
85
81
|
if (subscribers.length === 0) this.unregister();
|
86
82
|
}
|
87
83
|
};
|
88
|
-
var _default = responsiveObserve;
|
89
|
-
exports.default = _default;
|
84
|
+
var _default = exports.default = responsiveObserve;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export
|
2
|
-
export
|
3
|
-
export
|
4
|
-
export
|
1
|
+
export type Breakpoint = 'xxxl' | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
2
|
+
export type BreakpointMap = Partial<Record<Breakpoint, string>>;
|
3
|
+
export type ScreenMap = Partial<Record<Breakpoint, boolean>>;
|
4
|
+
export type SubscribeFunc = (screens: ScreenMap, breakpointChecked?: Breakpoint) => void;
|
5
5
|
//# sourceMappingURL=responsiveObserve.type.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"responsiveObserve.type.d.ts","sourceRoot":"","sources":["responsiveObserve.type.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"responsiveObserve.type.d.ts","sourceRoot":"","sources":["responsiveObserve.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC3E,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;AAChE,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;AAE7D,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,iBAAiB,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC"}
|
@@ -19,12 +19,11 @@ var resetScrollBehavior = function resetScrollBehavior() {
|
|
19
19
|
htmlDom.style.overscrollBehaviorX = lastStyle;
|
20
20
|
lastStyle = null;
|
21
21
|
};
|
22
|
-
var banOverScrollx = function banOverScrollx(el) {
|
22
|
+
var banOverScrollx = exports.banOverScrollx = function banOverScrollx(el) {
|
23
23
|
el.addEventListener('mouseenter', setScrollBehavior);
|
24
24
|
el.addEventListener('mouseleave', resetScrollBehavior);
|
25
25
|
return function () {
|
26
26
|
el.removeEventListener('mouseenter', setScrollBehavior);
|
27
27
|
el.removeEventListener('mouseleave', resetScrollBehavior);
|
28
28
|
};
|
29
|
-
};
|
30
|
-
exports.banOverScrollx = banOverScrollx;
|
29
|
+
};
|
@@ -4,12 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.default = extractEventHandlers;
|
7
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
8
|
-
require("core-js/modules/es.array.filter.js");
|
9
|
-
require("core-js/modules/es.regexp.exec.js");
|
10
|
-
require("core-js/modules/es.string.match.js");
|
11
|
-
require("core-js/modules/es.array.includes.js");
|
12
|
-
require("core-js/modules/es.string.includes.js");
|
13
7
|
/**
|
14
8
|
* Extracts event handlers from a given object.
|
15
9
|
* A prop is considered an event handler if it is a function and its name starts with `on`.
|
package/cjs/utils/func.js
CHANGED
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.throttle = exports.debounce = void 0;
|
7
7
|
// 节流函数
|
8
|
-
var throttle = function throttle(func, wait) {
|
8
|
+
var throttle = exports.throttle = function throttle(func, wait) {
|
9
9
|
var that = {
|
10
10
|
lock: false
|
11
11
|
};
|
@@ -20,8 +20,7 @@ var throttle = function throttle(func, wait) {
|
|
20
20
|
};
|
21
21
|
|
22
22
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
23
|
-
exports.
|
24
|
-
var debounce = function debounce(func, delay) {
|
23
|
+
var debounce = exports.debounce = function debounce(func, delay) {
|
25
24
|
var that = {};
|
26
25
|
var cleanTimer = function cleanTimer() {
|
27
26
|
if (that.timer) {
|
@@ -39,5 +38,4 @@ var debounce = function debounce(func, delay) {
|
|
39
38
|
func.apply(void 0, args);
|
40
39
|
}, delay);
|
41
40
|
}, cleanTimer];
|
42
|
-
};
|
43
|
-
exports.debounce = debounce;
|
41
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"immer.d.ts","sourceRoot":"","sources":["immer.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,eAAO,MAAM,OAAO,kCAAmC,IAAI,MAE1D,CAAC"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
Object.defineProperty(exports, "current", {
|
7
|
+
enumerable: true,
|
8
|
+
get: function get() {
|
9
|
+
return _immer.current;
|
10
|
+
}
|
11
|
+
});
|
12
|
+
exports.produce = void 0;
|
13
|
+
var _immer = require("immer");
|
14
|
+
// import { produce as produce2, getSnapshot } from '@shined/reactive/vanilla';
|
15
|
+
|
16
|
+
// export const produce = ((...args: any) => {
|
17
|
+
// return produce2.apply(null, args);
|
18
|
+
// }) as typeof produce2;
|
19
|
+
|
20
|
+
// export const current = getSnapshot;
|
21
|
+
|
22
|
+
var produce = exports.produce = function produce(value, cb) {
|
23
|
+
return (0, _immer.produce)(value, cb);
|
24
|
+
};
|
package/cjs/utils/index.d.ts
CHANGED
package/cjs/utils/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
package/cjs/utils/index.js
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
6
4
|
value: true
|
7
5
|
});
|
@@ -254,4 +252,17 @@ Object.keys(_tree).forEach(function (key) {
|
|
254
252
|
return _tree[key];
|
255
253
|
}
|
256
254
|
});
|
257
|
-
});
|
255
|
+
});
|
256
|
+
var _immer = require("./immer");
|
257
|
+
Object.keys(_immer).forEach(function (key) {
|
258
|
+
if (key === "default" || key === "__esModule") return;
|
259
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
260
|
+
if (key in exports && exports[key] === _immer[key]) return;
|
261
|
+
Object.defineProperty(exports, key, {
|
262
|
+
enumerable: true,
|
263
|
+
get: function get() {
|
264
|
+
return _immer[key];
|
265
|
+
}
|
266
|
+
});
|
267
|
+
});
|
268
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/cjs/utils/is.d.ts
CHANGED
@@ -3,7 +3,7 @@ import { UnMatchedData } from '../common/use-list-select/use-list.type';
|
|
3
3
|
import React from 'react';
|
4
4
|
export declare function isBrowser(): boolean;
|
5
5
|
export declare const isArray: (arg: any) => arg is any[];
|
6
|
-
export declare const isObject: (val: unknown) => val is ObjectType
|
6
|
+
export declare const isObject: (val: unknown) => val is ObjectType;
|
7
7
|
export declare const isDate: (val: unknown) => val is Date;
|
8
8
|
export declare const isBoolean: (val: unknown) => val is boolean;
|
9
9
|
export declare const isError: (val: unknown) => boolean;
|
@@ -23,4 +23,5 @@ export declare const isEmpty: (val: unknown) => boolean;
|
|
23
23
|
export declare const isLink: (el: unknown) => el is React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
24
24
|
export declare const isMacOS: () => boolean;
|
25
25
|
export declare const isFirefox: () => boolean;
|
26
|
+
export declare function isDomElement(element: any): element is HTMLElement;
|
26
27
|
//# sourceMappingURL=is.d.ts.map
|
package/cjs/utils/is.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"is.d.ts","sourceRoot":"","sources":["is.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wBAAgB,SAAS,YAExB;AASD,eAAO,MAAM,OAAO,4BAAgB,CAAC;AACrC,eAAO,MAAM,QAAQ,QAAS,OAAO,
|
1
|
+
{"version":3,"file":"is.d.ts","sourceRoot":"","sources":["is.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wBAAgB,SAAS,YAExB;AASD,eAAO,MAAM,OAAO,4BAAgB,CAAC;AACrC,eAAO,MAAM,QAAQ,QAAS,OAAO,sBACc,CAAC;AACpD,eAAO,MAAM,MAAM,QAAS,OAAO,gBAAqC,CAAC;AACzE,eAAO,MAAM,SAAS,QAAS,OAAO,mBAA2C,CAAC;AAClF,eAAO,MAAM,OAAO,QAAS,OAAO,KAAG,OAA+B,CAAC;AACvE,eAAO,MAAM,QAAQ,MAAO,OAAO,gBAAuC,CAAC;AAC3E,eAAO,MAAM,QAAQ,QAAS,OAAO,KAAG,OAAgC,CAAC;AACzE,eAAO,MAAM,QAAQ,MAAO,OAAO,gBAAuC,CAAC;AAC3E,eAAO,MAAM,WAAW,QAAS,GAAG,qBAAwC,CAAC;AAC7E,eAAO,MAAM,KAAK,QAjBsB,OAAO,mBAiBb,CAAC;AACnC,eAAO,MAAM,KAAK,QAlBsB,OAAO,mBAkBb,CAAC;AACnC,eAAO,MAAM,QAAQ,QAAS,OAAO,KAAG,OAUvC,CAAC;AACF,eAAO,MAAM,eAAe,QAAS,OAAO,yBAE3C,CAAC;AACF,eAAO,MAAM,WAAW,QAAS,OAAO,KAAG,OAS1C,CAAC;AAEF,eAAO,MAAM,MAAM,MAAO,OAAO,kBAA2C,CAAC;AAE7E,eAAO,MAAM,SAAS,MAAO,OAAO,YACiC,CAAC;AAGtE,eAAO,MAAM,KAAK,MAAO,OAAO,KAAG,OAAkB,CAAC;AAEtD,eAAO,MAAM,OAAO,QAAS,OAAO,KAAG,OActC,CAAC;AAEF,eAAO,MAAM,MAAM,OAAQ,OAAO,6EASjC,CAAC;AAEF,eAAO,MAAM,OAAO,QAAO,OACqC,CAAC;AAEjE,eAAO,MAAM,SAAS,QAAO,OAG5B,CAAC;AAEF,wBAAgB,YAAY,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,WAAW,CAQjE"}
|
package/cjs/utils/is.js
CHANGED
@@ -1,79 +1,64 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
5
4
|
value: true
|
6
5
|
});
|
7
6
|
exports.isBoolean = exports.isArray = void 0;
|
8
7
|
exports.isBrowser = isBrowser;
|
9
|
-
exports.
|
10
|
-
|
11
|
-
|
12
|
-
require("core-js/modules/es.regexp.to-string.js");
|
13
|
-
require("core-js/modules/es.array.index-of.js");
|
14
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
8
|
+
exports.isDate = exports.isBuffer = void 0;
|
9
|
+
exports.isDomElement = isDomElement;
|
10
|
+
exports.isUndefined = exports.isUnMatchedData = exports.isString = exports.isSet = exports.isRegexp = exports.isPromise = exports.isObject = exports.isNumber = exports.isNan = exports.isMergeable = exports.isMap = exports.isMacOS = exports.isLink = exports.isFunc = exports.isFirefox = exports.isError = exports.isEmpty = void 0;
|
15
11
|
var _react = _interopRequireDefault(require("react"));
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
|
+
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); }
|
16
14
|
function isBrowser() {
|
17
15
|
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
18
16
|
}
|
19
17
|
var nameIs = function nameIs(name) {
|
20
18
|
return function (val) {
|
21
|
-
if ((
|
19
|
+
if (_typeof(val) === 'object') {
|
22
20
|
return val && val.constructor && val.constructor.name === name;
|
23
21
|
}
|
24
22
|
return false;
|
25
23
|
};
|
26
24
|
};
|
27
|
-
var isArray = Array.isArray;
|
28
|
-
exports.
|
29
|
-
|
30
|
-
return !!val && (0, _typeof2.default)(val) === 'object' && !isArray(val);
|
25
|
+
var isArray = exports.isArray = Array.isArray;
|
26
|
+
var isObject = exports.isObject = function isObject(val) {
|
27
|
+
return !!val && _typeof(val) === 'object' && !isArray(val);
|
31
28
|
};
|
32
|
-
exports.
|
33
|
-
var isDate = function isDate(val) {
|
29
|
+
var isDate = exports.isDate = function isDate(val) {
|
34
30
|
return val instanceof Date;
|
35
31
|
};
|
36
|
-
exports.
|
37
|
-
var isBoolean = function isBoolean(val) {
|
32
|
+
var isBoolean = exports.isBoolean = function isBoolean(val) {
|
38
33
|
return val instanceof Boolean;
|
39
34
|
};
|
40
|
-
exports.
|
41
|
-
var isError = function isError(val) {
|
35
|
+
var isError = exports.isError = function isError(val) {
|
42
36
|
return val instanceof Error;
|
43
37
|
};
|
44
|
-
exports.
|
45
|
-
var isNumber = function isNumber(n) {
|
38
|
+
var isNumber = exports.isNumber = function isNumber(n) {
|
46
39
|
return typeof n === 'number';
|
47
40
|
};
|
48
|
-
exports.
|
49
|
-
var isRegexp = function isRegexp(val) {
|
41
|
+
var isRegexp = exports.isRegexp = function isRegexp(val) {
|
50
42
|
return val instanceof RegExp;
|
51
43
|
};
|
52
|
-
exports.
|
53
|
-
var isString = function isString(s) {
|
44
|
+
var isString = exports.isString = function isString(s) {
|
54
45
|
return typeof s === 'string';
|
55
46
|
};
|
56
|
-
exports.
|
57
|
-
var isUndefined = function isUndefined(obj) {
|
47
|
+
var isUndefined = exports.isUndefined = function isUndefined(obj) {
|
58
48
|
return obj === undefined;
|
59
49
|
};
|
60
|
-
exports.
|
61
|
-
var
|
62
|
-
exports.
|
63
|
-
|
64
|
-
exports.isSet = isSet;
|
65
|
-
var isBuffer = function isBuffer(val) {
|
66
|
-
if (val && (0, _typeof2.default)(val) === 'object' && val.constructor && typeof val.constructor.isBuffer === 'function') {
|
50
|
+
var isMap = exports.isMap = nameIs('Map');
|
51
|
+
var isSet = exports.isSet = nameIs('Set');
|
52
|
+
var isBuffer = exports.isBuffer = function isBuffer(val) {
|
53
|
+
if (val && _typeof(val) === 'object' && val.constructor && typeof val.constructor.isBuffer === 'function') {
|
67
54
|
return val.constructor.isBuffer(val);
|
68
55
|
}
|
69
56
|
return false;
|
70
57
|
};
|
71
|
-
exports.
|
72
|
-
var isUnMatchedData = function isUnMatchedData(val) {
|
58
|
+
var isUnMatchedData = exports.isUnMatchedData = function isUnMatchedData(val) {
|
73
59
|
return isObject(val) && val.IS_NOT_MATCHED_VALUE;
|
74
60
|
};
|
75
|
-
exports.
|
76
|
-
var isMergeable = function isMergeable(val) {
|
61
|
+
var isMergeable = exports.isMergeable = function isMergeable(val) {
|
77
62
|
if (!isObject(val)) return false;
|
78
63
|
var fns = [isDate, isError, isRegexp, isMap, isSet, isBuffer];
|
79
64
|
for (var i = 0; i < fns.length; i++) {
|
@@ -82,33 +67,28 @@ var isMergeable = function isMergeable(val) {
|
|
82
67
|
return true;
|
83
68
|
};
|
84
69
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
85
|
-
exports.
|
86
|
-
var isFunc = function isFunc(f) {
|
70
|
+
var isFunc = exports.isFunc = function isFunc(f) {
|
87
71
|
return typeof f === 'function';
|
88
72
|
};
|
89
|
-
exports.
|
90
|
-
var isPromise = function isPromise(p) {
|
73
|
+
var isPromise = exports.isPromise = function isPromise(p) {
|
91
74
|
return p && (nameIs('Promise')(p) || isFunc(p.then));
|
92
75
|
};
|
93
76
|
|
94
77
|
// eslint-disable-next-line no-self-compare
|
95
|
-
exports.
|
96
|
-
var isNan = function isNan(a) {
|
78
|
+
var isNan = exports.isNan = function isNan(a) {
|
97
79
|
return a !== a;
|
98
80
|
};
|
99
|
-
exports.
|
100
|
-
var isEmpty = function isEmpty(val) {
|
81
|
+
var isEmpty = exports.isEmpty = function isEmpty(val) {
|
101
82
|
// eslint-disable-next-line eqeqeq
|
102
83
|
if (val == null) return true;
|
103
84
|
if (isNan(val)) return true;
|
104
85
|
if (val.length !== undefined) return val.length === 0;
|
105
86
|
if (val instanceof Date) return false;
|
106
|
-
if ((
|
87
|
+
if (_typeof(val) === 'object') return Object.keys(val).length === 0;
|
107
88
|
return false;
|
108
89
|
};
|
109
|
-
exports.
|
110
|
-
|
111
|
-
if ((0, _typeof2.default)(el) === 'object') {
|
90
|
+
var isLink = exports.isLink = function isLink(el) {
|
91
|
+
if (_typeof(el) === 'object') {
|
112
92
|
if (! /*#__PURE__*/_react.default.isValidElement(el)) return false;
|
113
93
|
if (!el.type) return false;
|
114
94
|
if (el.type === 'a') return true;
|
@@ -116,12 +96,14 @@ var isLink = function isLink(el) {
|
|
116
96
|
}
|
117
97
|
return false;
|
118
98
|
};
|
119
|
-
exports.
|
120
|
-
|
121
|
-
return /macintosh|mac os x/i.test(navigator.userAgent);
|
99
|
+
var isMacOS = exports.isMacOS = function isMacOS() {
|
100
|
+
return isBrowser() && /macintosh|mac os x/i.test(navigator.userAgent);
|
122
101
|
};
|
123
|
-
exports.
|
124
|
-
|
102
|
+
var isFirefox = exports.isFirefox = function isFirefox() {
|
103
|
+
if (!isBrowser()) return false;
|
125
104
|
return navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
126
105
|
};
|
127
|
-
|
106
|
+
function isDomElement(element) {
|
107
|
+
return (typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement)) === 'object' ? element instanceof HTMLElement // DOM2
|
108
|
+
: element && _typeof(element) === 'object' && element !== null && element.nodeType === 1 && typeof element.nodeName === 'string';
|
109
|
+
}
|
package/cjs/utils/lazyload.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lazyload.d.ts","sourceRoot":"","sources":["lazyload.ts"],"names":[],"mappings":"AAIA,
|
1
|
+
{"version":3,"file":"lazyload.d.ts","sourceRoot":"","sources":["lazyload.ts"],"names":[],"mappings":"AAIA,KAAK,UAAU,GAAG;IAChB,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACjC,CAAC;AAoBF,wBAAgB,QAAQ,SAgBvB;AAWD,wBAAgB,WAAW,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,QAUvE;AAsBD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,UAAU,iBA4BvC"}
|
package/cjs/utils/lazyload.js
CHANGED
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.addStack = addStack;
|
7
7
|
exports.dispatch = dispatch;
|
8
8
|
exports.removeStack = removeStack;
|
9
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
10
9
|
var _utils = require("../utils");
|
11
10
|
var throttle = 80;
|
12
11
|
var components = {};
|
package/cjs/utils/number.js
CHANGED
@@ -9,13 +9,6 @@ exports.range = range;
|
|
9
9
|
exports.sub = sub;
|
10
10
|
exports.toPrecision = toPrecision;
|
11
11
|
exports.validateNumber = validateNumber;
|
12
|
-
require("core-js/modules/es.array.from.js");
|
13
|
-
require("core-js/modules/es.regexp.exec.js");
|
14
|
-
require("core-js/modules/es.array.includes.js");
|
15
|
-
require("core-js/modules/es.string.includes.js");
|
16
|
-
require("core-js/modules/es.array.slice.js");
|
17
|
-
require("core-js/modules/es.array.index-of.js");
|
18
|
-
require("core-js/modules/es.string.match.js");
|
19
12
|
function range(end) {
|
20
13
|
var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
21
14
|
var delta = end - start;
|
package/cjs/utils/object.d.ts
CHANGED
@@ -9,18 +9,18 @@ interface deepOptions {
|
|
9
9
|
removeUndefined?: boolean;
|
10
10
|
}
|
11
11
|
export declare const objectValues: (obj: ObjectType) => any[];
|
12
|
-
export declare const deepMerge: (target: ObjectType
|
12
|
+
export declare const deepMerge: (target: ObjectType | undefined, source: ObjectType, options?: deepOptions) => ObjectType;
|
13
13
|
export declare function pathGenerator(raw: string): [string | number, string | undefined, string | undefined][];
|
14
14
|
interface DeepSetOptions {
|
15
15
|
removeUndefined?: boolean;
|
16
16
|
skipUndefined?: boolean;
|
17
17
|
forceSet?: boolean;
|
18
18
|
}
|
19
|
-
export declare const deepSet: (target: ObjectType, path: string, value: any, options?: DeepSetOptions) => ObjectType
|
19
|
+
export declare const deepSet: (target: ObjectType, path: string, value: any, options?: DeepSetOptions) => ObjectType;
|
20
20
|
export declare const deepGet: (target: ObjectType, path: string, options?: deepOptions) => unknown;
|
21
|
-
export declare const deepRemove: (target: ObjectType, path: string) => ObjectType
|
21
|
+
export declare const deepRemove: (target: ObjectType, path: string) => ObjectType;
|
22
22
|
export declare const deepHas: (target: ObjectType, path: string) => boolean;
|
23
23
|
export declare const entries: (obj: ObjectType) => any[][];
|
24
|
-
export declare const removeProps: <T extends ObjectType
|
24
|
+
export declare const removeProps: <T extends ObjectType, K extends ObjectType>(target: T, remove: K) => Omit<T, keyof K>;
|
25
25
|
export {};
|
26
26
|
//# sourceMappingURL=object.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["object.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,UAGvC;AASD,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAGD,eAAO,MAAM,YAAY,QAAS,UAAU,UAG3C,CAAC;AAGF,eAAO,MAAM,SAAS,
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["object.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,UAGvC;AASD,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAGD,eAAO,MAAM,YAAY,QAAS,UAAU,UAG3C,CAAC;AAGF,eAAO,MAAM,SAAS,2CAEZ,UAAU,YACT,WAAW,eAwBrB,CAAC;AAEF,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,+DA4BxC;AAED,UAAU,cAAc;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,OAAO,WACV,UAAU,QACZ,MAAM,SACL,GAAG,YACD,cAAc,eAiDxB,CAAC;AAEF,eAAO,MAAM,OAAO,WAAY,UAAU,QAAQ,MAAM,YAAW,WAAW,YAyB7E,CAAC;AAEF,eAAO,MAAM,UAAU,WAAY,UAAU,QAAQ,MAAM,eA0B1D,CAAC;AAEF,eAAO,MAAM,OAAO,WAAY,UAAU,QAAQ,MAAM,YAavD,CAAC;AAEF,eAAO,MAAM,OAAO,QAAS,UAAU,YAItC,CAAC;AAEF,eAAO,MAAM,WAAW,wFAQvB,CAAC"}
|