@sheinx/base 3.8.0-beta.8 → 3.8.0
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/absolute-list/absolute-list.js +2 -2
- package/cjs/absolute-list/use-container.d.ts +1 -0
- package/cjs/absolute-list/use-container.d.ts.map +1 -1
- package/cjs/absolute-list/use-container.js +3 -0
- package/cjs/alert/alert.d.ts.map +1 -1
- package/cjs/alert/alert.js +1 -1
- package/cjs/avatar/avatar.type.d.ts +5 -0
- package/cjs/avatar/avatar.type.d.ts.map +1 -1
- package/cjs/avatar/group.js +1 -1
- package/cjs/breadcrumb/breadcrumb-item.d.ts +11 -0
- package/cjs/breadcrumb/breadcrumb-item.d.ts.map +1 -0
- package/cjs/breadcrumb/breadcrumb-item.js +83 -0
- package/cjs/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/cjs/breadcrumb/breadcrumb.js +34 -32
- package/cjs/breadcrumb/breadcrumb.type.d.ts +4 -0
- package/cjs/breadcrumb/breadcrumb.type.d.ts.map +1 -1
- package/cjs/button/button.type.d.ts +1 -1
- package/cjs/button/button.type.d.ts.map +1 -1
- package/cjs/cascader/cascader.d.ts.map +1 -1
- package/cjs/cascader/cascader.js +3 -5
- package/cjs/cascader/cascader.type.d.ts +8 -0
- package/cjs/cascader/cascader.type.d.ts.map +1 -1
- package/cjs/cascader/node.d.ts.map +1 -1
- package/cjs/cascader/node.js +7 -3
- package/cjs/config/index.d.ts +23 -0
- package/cjs/config/index.d.ts.map +1 -1
- package/cjs/config/index.js +7 -0
- package/cjs/config/locale/en_US.d.ts +3 -0
- package/cjs/config/locale/en_US.d.ts.map +1 -1
- package/cjs/config/locale/en_US.js +3 -0
- package/cjs/config/locale/zh-CN.d.ts +3 -0
- package/cjs/config/locale/zh-CN.d.ts.map +1 -1
- package/cjs/config/locale/zh-CN.js +3 -0
- package/cjs/date-picker/date-picker.js +1 -1
- package/cjs/date-picker/date-picker.type.d.ts +1 -1
- package/cjs/date-picker/date-picker.type.d.ts.map +1 -1
- package/cjs/date-picker/day.d.ts.map +1 -1
- package/cjs/date-picker/time.d.ts.map +1 -1
- package/cjs/date-picker/time.js +6 -2
- package/cjs/dropdown/Item.d.ts.map +1 -1
- package/cjs/dropdown/Item.js +3 -1
- package/cjs/empty/empty.d.ts.map +1 -1
- package/cjs/empty/empty.js +10 -5
- package/cjs/empty/empty.type.d.ts +4 -4
- package/cjs/form/form-field.d.ts.map +1 -1
- package/cjs/form/form-field.js +25 -2
- package/cjs/form/form-field.type.d.ts +12 -21
- package/cjs/form/form-field.type.d.ts.map +1 -1
- package/cjs/form/form-fieldset.d.ts.map +1 -1
- package/cjs/form/form-fieldset.js +55 -3
- package/cjs/form/form-fieldset.type.d.ts +35 -23
- package/cjs/form/form-fieldset.type.d.ts.map +1 -1
- package/cjs/form/form-flow.type.d.ts +11 -7
- package/cjs/form/form-flow.type.d.ts.map +1 -1
- package/cjs/form/form-item.d.ts.map +1 -1
- package/cjs/form/form-item.js +41 -16
- package/cjs/form/form-item.type.d.ts +1 -0
- package/cjs/form/form-item.type.d.ts.map +1 -1
- package/cjs/form/form.d.ts.map +1 -1
- package/cjs/form/form.js +2 -1
- package/cjs/form/form.type.d.ts +34 -24
- package/cjs/form/form.type.d.ts.map +1 -1
- package/cjs/form/form.type.js +4 -0
- package/cjs/form/index.d.ts +1 -1
- package/cjs/form/index.d.ts.map +1 -1
- package/cjs/icons/config.d.ts +3 -0
- package/cjs/icons/config.d.ts.map +1 -1
- package/cjs/icons/config.js +3 -0
- package/cjs/icons/icons.d.ts +1 -0
- package/cjs/icons/icons.d.ts.map +1 -1
- package/cjs/icons/icons.js +150 -1
- package/cjs/input/input-number.d.ts.map +1 -1
- package/cjs/input/input-number.js +4 -2
- package/cjs/input/use-input-common.d.ts +1 -1
- package/cjs/list/list.d.ts.map +1 -1
- package/cjs/list/list.js +54 -22
- package/cjs/list/list.type.d.ts +8 -1
- package/cjs/list/list.type.d.ts.map +1 -1
- package/cjs/modal/modal-content.d.ts.map +1 -1
- package/cjs/modal/modal-content.js +51 -14
- package/cjs/modal/modal.d.ts.map +1 -1
- package/cjs/modal/modal.js +2 -1
- package/cjs/modal/modal.type.d.ts +8 -2
- package/cjs/modal/modal.type.d.ts.map +1 -1
- package/cjs/pagination/pagination-size-list.d.ts.map +1 -1
- package/cjs/pagination/pagination-size-list.js +10 -9
- package/cjs/pagination/pagination-size-list.type.d.ts +1 -1
- package/cjs/pagination/pagination-size-list.type.d.ts.map +1 -1
- package/cjs/pagination/pagination.d.ts.map +1 -1
- package/cjs/pagination/pagination.js +10 -2
- package/cjs/pagination/pagination.type.d.ts +11 -11
- package/cjs/pagination/pagination.type.d.ts.map +1 -1
- package/cjs/popover/popover.d.ts.map +1 -1
- package/cjs/popover/popover.js +11 -2
- package/cjs/radio/group-context.d.ts.map +1 -1
- package/cjs/radio/group-context.js +1 -0
- package/cjs/radio/radio-group.d.ts.map +1 -1
- package/cjs/radio/radio-group.js +5 -1
- package/cjs/radio/radio.d.ts.map +1 -1
- package/cjs/radio/radio.js +9 -0
- package/cjs/radio/radio.type.d.ts +7 -1
- package/cjs/radio/radio.type.d.ts.map +1 -1
- package/cjs/radio/simple-radio.d.ts.map +1 -1
- package/cjs/radio/simple-radio.js +2 -1
- package/cjs/select/list-columns.d.ts.map +1 -1
- package/cjs/select/list-columns.js +6 -2
- package/cjs/select/list.d.ts.map +1 -1
- package/cjs/select/list.js +2 -0
- package/cjs/select/result-more.d.ts.map +1 -1
- package/cjs/select/result-more.js +5 -15
- package/cjs/select/result-more.type.d.ts +0 -1
- package/cjs/select/result-more.type.d.ts.map +1 -1
- package/cjs/select/result.d.ts.map +1 -1
- package/cjs/select/result.js +24 -8
- package/cjs/select/result.type.d.ts +1 -0
- package/cjs/select/result.type.d.ts.map +1 -1
- package/cjs/select/select.d.ts.map +1 -1
- package/cjs/select/select.js +25 -10
- package/cjs/select/select.type.d.ts +206 -127
- package/cjs/select/select.type.d.ts.map +1 -1
- package/cjs/sticky/sticky.d.ts.map +1 -1
- package/cjs/sticky/sticky.js +105 -22
- package/cjs/sticky/sticky.type.d.ts +6 -0
- package/cjs/sticky/sticky.type.d.ts.map +1 -1
- package/cjs/table/table.d.ts.map +1 -1
- package/cjs/table/table.js +45 -22
- package/cjs/table/table.type.d.ts +81 -82
- package/cjs/table/table.type.d.ts.map +1 -1
- package/cjs/table/tbody.d.ts.map +1 -1
- package/cjs/table/tbody.js +13 -1
- package/cjs/table/tbody.type.d.ts +5 -0
- package/cjs/table/tbody.type.d.ts.map +1 -1
- package/cjs/table/td.d.ts.map +1 -1
- package/cjs/table/td.js +5 -23
- package/cjs/table/tfoot.d.ts.map +1 -1
- package/cjs/table/tfoot.js +6 -2
- package/cjs/table/tfoot.type.d.ts +1 -0
- package/cjs/table/tfoot.type.d.ts.map +1 -1
- package/cjs/table/thead-filter.d.ts.map +1 -1
- package/cjs/table/thead-filter.js +17 -7
- package/cjs/table/tr.d.ts +1 -0
- package/cjs/table/tr.d.ts.map +1 -1
- package/cjs/table/tr.js +5 -4
- package/cjs/tabs/tabs-header.d.ts.map +1 -1
- package/cjs/tabs/tabs-header.js +41 -11
- package/cjs/textarea/simple-textarea.d.ts.map +1 -1
- package/cjs/textarea/simple-textarea.js +4 -1
- package/cjs/tooltip/tooltip.js +2 -1
- package/cjs/tree/tree-content.d.ts.map +1 -1
- package/cjs/tree/tree-content.js +2 -0
- package/cjs/tree/tree-content.type.d.ts +1 -0
- package/cjs/tree/tree-content.type.d.ts.map +1 -1
- package/cjs/tree/tree-node.type.d.ts +1 -0
- package/cjs/tree/tree-node.type.d.ts.map +1 -1
- package/cjs/tree/tree-simple-node.d.ts.map +1 -1
- package/cjs/tree/tree-simple-node.js +3 -1
- package/cjs/tree/tree-virtual-node.d.ts.map +1 -1
- package/cjs/tree/tree-virtual-node.js +15 -2
- package/cjs/tree/tree-virtual.d.ts.map +1 -1
- package/cjs/tree/tree-virtual.js +2 -1
- package/cjs/tree/tree.type.d.ts +2 -1
- package/cjs/tree/tree.type.d.ts.map +1 -1
- package/cjs/tree-select/tree-select.d.ts.map +1 -1
- package/cjs/tree-select/tree-select.js +1 -0
- package/cjs/tree-select/tree-select.type.d.ts +8 -0
- package/cjs/tree-select/tree-select.type.d.ts.map +1 -1
- package/cjs/upload/result.d.ts.map +1 -1
- package/cjs/upload/result.js +19 -5
- package/cjs/upload/useInputClick.d.ts +1 -0
- package/cjs/upload/useInputClick.d.ts.map +1 -1
- package/cjs/upload/useInputClick.js +4 -0
- package/cjs/virtual-scroll/scroll-table.d.ts.map +1 -1
- package/cjs/virtual-scroll/scroll-table.js +6 -2
- package/cjs/virtual-scroll/virtual-scroll-list.d.ts.map +1 -1
- package/cjs/virtual-scroll/virtual-scroll-list.js +8 -2
- package/cjs/virtual-scroll/virtual-scroll-list.type.d.ts +1 -0
- package/cjs/virtual-scroll/virtual-scroll-list.type.d.ts.map +1 -1
- package/esm/absolute-list/absolute-list.js +2 -2
- package/esm/absolute-list/use-container.d.ts +1 -0
- package/esm/absolute-list/use-container.d.ts.map +1 -1
- package/esm/absolute-list/use-container.js +3 -0
- package/esm/alert/alert.d.ts.map +1 -1
- package/esm/alert/alert.js +1 -1
- package/esm/avatar/avatar.type.d.ts +5 -0
- package/esm/avatar/avatar.type.d.ts.map +1 -1
- package/esm/avatar/group.js +1 -1
- package/esm/breadcrumb/breadcrumb-item.d.ts +11 -0
- package/esm/breadcrumb/breadcrumb-item.d.ts.map +1 -0
- package/esm/breadcrumb/breadcrumb-item.js +76 -0
- package/esm/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/esm/breadcrumb/breadcrumb.js +34 -33
- package/esm/breadcrumb/breadcrumb.type.d.ts +4 -0
- package/esm/breadcrumb/breadcrumb.type.d.ts.map +1 -1
- package/esm/button/button.type.d.ts +1 -1
- package/esm/button/button.type.d.ts.map +1 -1
- package/esm/cascader/cascader.d.ts.map +1 -1
- package/esm/cascader/cascader.js +3 -5
- package/esm/cascader/cascader.type.d.ts +8 -0
- package/esm/cascader/cascader.type.d.ts.map +1 -1
- package/esm/cascader/node.d.ts.map +1 -1
- package/esm/cascader/node.js +7 -3
- package/esm/config/index.d.ts +23 -0
- package/esm/config/index.d.ts.map +1 -1
- package/esm/config/index.js +8 -0
- package/esm/config/locale/en_US.d.ts +3 -0
- package/esm/config/locale/en_US.d.ts.map +1 -1
- package/esm/config/locale/en_US.js +3 -0
- package/esm/config/locale/zh-CN.d.ts +3 -0
- package/esm/config/locale/zh-CN.d.ts.map +1 -1
- package/esm/config/locale/zh-CN.js +3 -0
- package/esm/date-picker/date-picker.js +1 -1
- package/esm/date-picker/date-picker.type.d.ts +1 -1
- package/esm/date-picker/date-picker.type.d.ts.map +1 -1
- package/esm/date-picker/day.d.ts.map +1 -1
- package/esm/date-picker/time.d.ts.map +1 -1
- package/esm/date-picker/time.js +6 -2
- package/esm/dropdown/Item.d.ts.map +1 -1
- package/esm/dropdown/Item.js +3 -1
- package/esm/empty/empty.d.ts.map +1 -1
- package/esm/empty/empty.js +10 -5
- package/esm/empty/empty.type.d.ts +4 -4
- package/esm/form/form-field.d.ts.map +1 -1
- package/esm/form/form-field.js +26 -3
- package/esm/form/form-field.type.d.ts +12 -21
- package/esm/form/form-field.type.d.ts.map +1 -1
- package/esm/form/form-fieldset.d.ts.map +1 -1
- package/esm/form/form-fieldset.js +55 -3
- package/esm/form/form-fieldset.type.d.ts +35 -23
- package/esm/form/form-fieldset.type.d.ts.map +1 -1
- package/esm/form/form-flow.type.d.ts +11 -7
- package/esm/form/form-flow.type.d.ts.map +1 -1
- package/esm/form/form-item.d.ts.map +1 -1
- package/esm/form/form-item.js +39 -16
- package/esm/form/form-item.type.d.ts +1 -0
- package/esm/form/form-item.type.d.ts.map +1 -1
- package/esm/form/form.d.ts.map +1 -1
- package/esm/form/form.js +2 -1
- package/esm/form/form.type.d.ts +34 -24
- package/esm/form/form.type.d.ts.map +1 -1
- package/esm/form/form.type.js +5 -0
- package/esm/form/index.d.ts +1 -1
- package/esm/form/index.d.ts.map +1 -1
- package/esm/icons/config.d.ts +3 -0
- package/esm/icons/config.d.ts.map +1 -1
- package/esm/icons/config.js +3 -0
- package/esm/icons/icons.d.ts +1 -0
- package/esm/icons/icons.d.ts.map +1 -1
- package/esm/icons/icons.js +150 -1
- package/esm/input/input-number.d.ts.map +1 -1
- package/esm/input/input-number.js +4 -2
- package/esm/input/use-input-common.d.ts +1 -1
- package/esm/list/list.d.ts.map +1 -1
- package/esm/list/list.js +55 -23
- package/esm/list/list.type.d.ts +8 -1
- package/esm/list/list.type.d.ts.map +1 -1
- package/esm/modal/modal-content.d.ts.map +1 -1
- package/esm/modal/modal-content.js +52 -15
- package/esm/modal/modal.d.ts.map +1 -1
- package/esm/modal/modal.js +2 -1
- package/esm/modal/modal.type.d.ts +8 -2
- package/esm/modal/modal.type.d.ts.map +1 -1
- package/esm/pagination/pagination-size-list.d.ts.map +1 -1
- package/esm/pagination/pagination-size-list.js +10 -9
- package/esm/pagination/pagination-size-list.type.d.ts +1 -1
- package/esm/pagination/pagination-size-list.type.d.ts.map +1 -1
- package/esm/pagination/pagination.d.ts.map +1 -1
- package/esm/pagination/pagination.js +11 -3
- package/esm/pagination/pagination.type.d.ts +11 -11
- package/esm/pagination/pagination.type.d.ts.map +1 -1
- package/esm/popover/popover.d.ts.map +1 -1
- package/esm/popover/popover.js +11 -2
- package/esm/radio/group-context.d.ts.map +1 -1
- package/esm/radio/group-context.js +1 -0
- package/esm/radio/radio-group.d.ts.map +1 -1
- package/esm/radio/radio-group.js +5 -2
- package/esm/radio/radio.d.ts.map +1 -1
- package/esm/radio/radio.js +9 -0
- package/esm/radio/radio.type.d.ts +7 -1
- package/esm/radio/radio.type.d.ts.map +1 -1
- package/esm/radio/simple-radio.d.ts.map +1 -1
- package/esm/radio/simple-radio.js +2 -1
- package/esm/select/list-columns.d.ts.map +1 -1
- package/esm/select/list-columns.js +6 -2
- package/esm/select/list.d.ts.map +1 -1
- package/esm/select/list.js +2 -0
- package/esm/select/result-more.d.ts.map +1 -1
- package/esm/select/result-more.js +5 -15
- package/esm/select/result-more.type.d.ts +0 -1
- package/esm/select/result-more.type.d.ts.map +1 -1
- package/esm/select/result.d.ts.map +1 -1
- package/esm/select/result.js +24 -8
- package/esm/select/result.type.d.ts +1 -0
- package/esm/select/result.type.d.ts.map +1 -1
- package/esm/select/select.d.ts.map +1 -1
- package/esm/select/select.js +25 -10
- package/esm/select/select.type.d.ts +206 -127
- package/esm/select/select.type.d.ts.map +1 -1
- package/esm/sticky/sticky.d.ts.map +1 -1
- package/esm/sticky/sticky.js +105 -22
- package/esm/sticky/sticky.type.d.ts +6 -0
- package/esm/sticky/sticky.type.d.ts.map +1 -1
- package/esm/table/table.d.ts.map +1 -1
- package/esm/table/table.js +46 -23
- package/esm/table/table.type.d.ts +81 -82
- package/esm/table/table.type.d.ts.map +1 -1
- package/esm/table/tbody.d.ts.map +1 -1
- package/esm/table/tbody.js +13 -1
- package/esm/table/tbody.type.d.ts +5 -0
- package/esm/table/tbody.type.d.ts.map +1 -1
- package/esm/table/td.d.ts.map +1 -1
- package/esm/table/td.js +4 -20
- package/esm/table/tfoot.d.ts.map +1 -1
- package/esm/table/tfoot.js +6 -2
- package/esm/table/tfoot.type.d.ts +1 -0
- package/esm/table/tfoot.type.d.ts.map +1 -1
- package/esm/table/thead-filter.d.ts.map +1 -1
- package/esm/table/thead-filter.js +17 -7
- package/esm/table/tr.d.ts +1 -0
- package/esm/table/tr.d.ts.map +1 -1
- package/esm/table/tr.js +5 -4
- package/esm/tabs/tabs-header.d.ts.map +1 -1
- package/esm/tabs/tabs-header.js +41 -11
- package/esm/textarea/simple-textarea.d.ts.map +1 -1
- package/esm/textarea/simple-textarea.js +4 -1
- package/esm/tooltip/tooltip.js +2 -1
- package/esm/tree/tree-content.d.ts.map +1 -1
- package/esm/tree/tree-content.js +2 -0
- package/esm/tree/tree-content.type.d.ts +1 -0
- package/esm/tree/tree-content.type.d.ts.map +1 -1
- package/esm/tree/tree-node.type.d.ts +1 -0
- package/esm/tree/tree-node.type.d.ts.map +1 -1
- package/esm/tree/tree-simple-node.d.ts.map +1 -1
- package/esm/tree/tree-simple-node.js +3 -1
- package/esm/tree/tree-virtual-node.d.ts.map +1 -1
- package/esm/tree/tree-virtual-node.js +15 -2
- package/esm/tree/tree-virtual.d.ts.map +1 -1
- package/esm/tree/tree-virtual.js +2 -1
- package/esm/tree/tree.type.d.ts +2 -1
- package/esm/tree/tree.type.d.ts.map +1 -1
- package/esm/tree-select/tree-select.d.ts.map +1 -1
- package/esm/tree-select/tree-select.js +1 -0
- package/esm/tree-select/tree-select.type.d.ts +8 -0
- package/esm/tree-select/tree-select.type.d.ts.map +1 -1
- package/esm/upload/result.d.ts.map +1 -1
- package/esm/upload/result.js +20 -6
- package/esm/upload/useInputClick.d.ts +1 -0
- package/esm/upload/useInputClick.d.ts.map +1 -1
- package/esm/upload/useInputClick.js +4 -0
- package/esm/virtual-scroll/scroll-table.d.ts.map +1 -1
- package/esm/virtual-scroll/scroll-table.js +6 -2
- package/esm/virtual-scroll/virtual-scroll-list.d.ts.map +1 -1
- package/esm/virtual-scroll/virtual-scroll-list.js +8 -2
- package/esm/virtual-scroll/virtual-scroll-list.type.d.ts +1 -0
- package/esm/virtual-scroll/virtual-scroll-list.type.d.ts.map +1 -1
- package/package.json +3 -3
- package/cjs/empty/empty-image.d.ts +0 -2
- package/cjs/empty/empty-image.d.ts.map +0 -1
- package/cjs/empty/empty-image.js +0 -157
- package/esm/empty/empty-image.d.ts +0 -2
- package/esm/empty/empty-image.d.ts.map +0 -1
- package/esm/empty/empty-image.js +0 -152
package/cjs/form/form-item.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _hooks = require("@sheinx/hooks");
|
|
9
9
|
var _shineoutStyle = require("@sheinx/shineout-style");
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -14,6 +14,8 @@ var _icons = _interopRequireDefault(require("../icons"));
|
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
var _excluded = ["children", "jssStyle", "className", "style", "label", "tip", "required"];
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
19
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
18
20
|
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; }
|
|
19
21
|
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; }
|
|
@@ -23,7 +25,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
23
25
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
24
26
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
25
27
|
var FormItem = function FormItem(props) {
|
|
26
|
-
var _jssStyle$formItem;
|
|
28
|
+
var _jssStyle$formItem, _labelRef$current, _labelTipRef$current;
|
|
27
29
|
var children = props.children,
|
|
28
30
|
jssStyle = props.jssStyle,
|
|
29
31
|
className = props.className,
|
|
@@ -34,7 +36,7 @@ var FormItem = function FormItem(props) {
|
|
|
34
36
|
rest = _objectWithoutProperties(props, _excluded);
|
|
35
37
|
var formItemClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$formItem = jssStyle.formItem) === null || _jssStyle$formItem === void 0 ? void 0 : _jssStyle$formItem.call(jssStyle);
|
|
36
38
|
var _useFormItem = (0, _hooks.useFormItem)(),
|
|
37
|
-
|
|
39
|
+
FormItemContextProvider = _useFormItem.Provider,
|
|
38
40
|
ProviderValue = _useFormItem.ProviderValue,
|
|
39
41
|
labelConfig = _useFormItem.labelConfig,
|
|
40
42
|
errors = _useFormItem.errors,
|
|
@@ -94,11 +96,40 @@ var FormItem = function FormItem(props) {
|
|
|
94
96
|
children: label
|
|
95
97
|
});
|
|
96
98
|
};
|
|
99
|
+
var labelRef = (0, _react.useRef)(null);
|
|
100
|
+
var labelTipRef = (0, _react.useRef)(null);
|
|
101
|
+
var labelText = (_labelRef$current = labelRef.current) === null || _labelRef$current === void 0 ? void 0 : _labelRef$current.textContent;
|
|
102
|
+
if ((_labelTipRef$current = labelTipRef.current) !== null && _labelTipRef$current !== void 0 && _labelTipRef$current.textContent) {
|
|
103
|
+
var _labelTipRef$current2;
|
|
104
|
+
labelText += " (tip: ".concat((_labelTipRef$current2 = labelTipRef.current) === null || _labelTipRef$current2 === void 0 ? void 0 : _labelTipRef$current2.textContent, ")");
|
|
105
|
+
}
|
|
106
|
+
var renderError = function renderError() {
|
|
107
|
+
if (!showError) return null;
|
|
108
|
+
var uniqueErrors = errors;
|
|
109
|
+
if (errors.length > 1) {
|
|
110
|
+
uniqueErrors = errors.filter(function (error, index, self) {
|
|
111
|
+
return index === self.findIndex(function (t) {
|
|
112
|
+
return t.message === error.message;
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
117
|
+
className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.error,
|
|
118
|
+
children: uniqueErrors.map(function (error, index) {
|
|
119
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
120
|
+
children: error && /*#__PURE__*/(0, _jsxRuntime.jsx)(_errorTrans.default, {
|
|
121
|
+
error: error
|
|
122
|
+
})
|
|
123
|
+
}, index);
|
|
124
|
+
})
|
|
125
|
+
});
|
|
126
|
+
};
|
|
97
127
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", _objectSpread(_objectSpread({
|
|
98
|
-
className: (0, _classnames.default)(className, formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapper, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperLabelTop, labelAlign === 'top'), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperLabelVerticalMiddle, labelAlign !== 'top' && labelVerticalAlign === 'middle'), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperLabelVerticalBottom, labelAlign !== 'top' && labelVerticalAlign === 'bottom'), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperInline, inline), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperKeepHeight, keepErrorHeight), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperRequired, required), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperTip, showError || tip))
|
|
128
|
+
className: (0, _classnames.default)(className, formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapper, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperLabelTop, labelAlign === 'top'), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperLabelVerticalMiddle, labelAlign !== 'top' && labelVerticalAlign === 'middle'), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperLabelVerticalBottom, labelAlign !== 'top' && labelVerticalAlign === 'bottom'), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperInline, inline), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperKeepHeight, keepErrorHeight), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperRequired, required), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperHideRequired, required === false), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperTip, showError || tip))
|
|
99
129
|
}, attributes), {}, {
|
|
100
130
|
style: style,
|
|
101
131
|
children: [label !== undefined ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
132
|
+
ref: labelRef,
|
|
102
133
|
className: (0, _classnames.default)(formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.label, _defineProperty(_defineProperty(_defineProperty({}, formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.labelLeft, labelAlign === 'left'), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.labelWithColon, colon), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.labelWithTooltip, label && _typeof(label) === 'object' && 'tooltip' in label)),
|
|
103
134
|
style: labelAlign !== 'top' || inline ? {
|
|
104
135
|
width: labelWidth
|
|
@@ -109,22 +140,16 @@ var FormItem = function FormItem(props) {
|
|
|
109
140
|
}, _hooks.util.getDataAttribute({
|
|
110
141
|
role: 'form-control'
|
|
111
142
|
})), {}, {
|
|
112
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
113
|
-
value: ProviderValue,
|
|
143
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(FormItemContextProvider, {
|
|
144
|
+
value: _objectSpread(_objectSpread({}, ProviderValue), {}, {
|
|
145
|
+
label: labelText
|
|
146
|
+
}),
|
|
114
147
|
children: children
|
|
115
148
|
}), !!tip && (!showError || keepErrorBelow) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
149
|
+
ref: labelTipRef,
|
|
116
150
|
className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.tip,
|
|
117
151
|
children: tip
|
|
118
|
-
}),
|
|
119
|
-
className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.error,
|
|
120
|
-
children: errors.map(function (error, index) {
|
|
121
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
122
|
-
children: error && /*#__PURE__*/(0, _jsxRuntime.jsx)(_errorTrans.default, {
|
|
123
|
-
error: error
|
|
124
|
-
})
|
|
125
|
-
}, index);
|
|
126
|
-
})
|
|
127
|
-
})]
|
|
152
|
+
}), renderError()]
|
|
128
153
|
}))]
|
|
129
154
|
}));
|
|
130
155
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-item.type.d.ts","sourceRoot":"","sources":["form-item.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,0BAA0B,EAAE,MAAM,CAAC;IACnC,0BAA0B,EAAE,MAAM,CAAC;IACnC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,KAAK,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,KAAK,GAAG,UAAU,CAAC,GAAG;IAC3D,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;CACvB,CAAA;AACD,UAAU,WAAW;IACnB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,OAAO,CAAC,EAAE,KAAK,CAAC,SA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MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,KAAK,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,KAAK,GAAG,UAAU,CAAC,GAAG;IAC3D,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;CACvB,CAAA;AACD,UAAU,WAAW;IACnB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC;CAC1C;AAED,MAAM,WAAW,aAAc,SAAQ,eAAe,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO,CAAC;IAC7F;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,WAAW,CAAC;IACtC;;;OAGG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE;QACT,QAAQ,CAAC,EAAE,MAAM,eAAe,CAAC;KAClC,CAAC;CACH"}
|
package/cjs/form/form.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["form.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,QAAA,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["form.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,QAAA,MAAM,IAAI,wFA8HT,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/cjs/form/form.js
CHANGED
|
@@ -75,7 +75,8 @@ var Form = function Form(props) {
|
|
|
75
75
|
validateFieldsWithValue: validateFieldsWithValue,
|
|
76
76
|
validateFieldsWithError: formFunc.validateFields,
|
|
77
77
|
set: formFunc.setValue,
|
|
78
|
-
scrollToField: formFunc.scrollToField
|
|
78
|
+
scrollToField: formFunc.scrollToField,
|
|
79
|
+
getFormSchema: formFunc.getFormSchema
|
|
79
80
|
});
|
|
80
81
|
_react.default.useEffect(function () {
|
|
81
82
|
if (formRef) {
|
package/cjs/form/form.type.d.ts
CHANGED
|
@@ -14,50 +14,54 @@ export interface FormValidateFn<FormValue> {
|
|
|
14
14
|
*/
|
|
15
15
|
(fields?: string | string[]): Promise<FormValue>;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* FormValue 泛型表示表单数据的类型,通常是一个对象类型
|
|
19
|
+
* 例如:{ name: string, age: number, address: { city: string } }
|
|
20
|
+
*/
|
|
17
21
|
export interface FormRef<FormValue> {
|
|
18
22
|
/**
|
|
19
|
-
* @en
|
|
20
|
-
* @cn
|
|
23
|
+
* @en Get form data. Returns the entire form data object (FormValue type) when no parameter is passed, returns the value of the specified field when a field path is passed. Field paths support dot notation and array indexes, such as 'user.name' (get nested object), 'list[0].id' (get array element). Commonly used to get form data for other operations
|
|
24
|
+
* @cn 获取表单数据。不传参数时返回整个表单的数据对象(FormValue 类型),传入字段路径时返回指定字段的值。字段路径支持点表示法和数组索引,如 'user.name'(获取嵌套对象)、'list[0].id'(获取数组元素)。常用于获取表单数据进行其他操作
|
|
21
25
|
*/
|
|
22
26
|
getValue: (name?: string) => any | FormValue;
|
|
23
27
|
/**
|
|
24
|
-
* @en Validate form
|
|
25
|
-
* @cn
|
|
28
|
+
* @en Validate all fields in the entire form. Returns a Promise that resolves with the entire form data object (FormValue type) on successful validation, and rejects with error information on failure. Usually called before form submission to ensure all data validity
|
|
29
|
+
* @cn 校验整个表单的所有字段。返回一个 Promise,校验成功时 resolve 整个表单的数据对象(FormValue 类型),失败时 reject 错误信息。通常在提交表单前调用以确保所有数据的有效性
|
|
26
30
|
*/
|
|
27
31
|
validate: () => Promise<any>;
|
|
28
32
|
/**
|
|
29
|
-
* @en
|
|
30
|
-
* @cn
|
|
33
|
+
* @en Validate specified form fields. The fields parameter is a field path, which can be a single path string or an array of paths. Field paths support: 'name' (top-level field), 'user.email' (nested object), 'list[0].name' (array element). Returns a Promise that resolves with the specified field data on success, and rejects with the first error encountered on failure. Suitable for step-by-step forms or partial validation scenarios
|
|
34
|
+
* @cn 校验指定的表单字段。fields 参数为字段路径,可以是单个路径字符串或路径数组。字段路径支持:'name'(顶层字段)、'user.email'(嵌套对象)、'list[0].name'(数组元素)。返回 Promise,成功时 resolve 指定字段的数据,失败时 reject 第一个遇到的错误。适用于分步表单或部分校验场景
|
|
31
35
|
*/
|
|
32
36
|
validateFields: (fields: string | string[]) => Promise<any>;
|
|
33
37
|
/**
|
|
34
|
-
* @en
|
|
35
|
-
* @cn
|
|
38
|
+
* @en Validate specified fields and always return form data. The fields parameter is a field path, validates all fields when not passed. Resolves with specified field data on success, rejects with a ValidationError object on failure, containing: values (form data) and errorFields (array containing name and errors information for each error field). Suitable for scenarios that need to get both form data and detailed error information
|
|
39
|
+
* @cn 校验指定字段并始终返回表单数据。fields 参数为字段路径,不传时校验所有字段。成功时 resolve 指定字段的数据,失败时 reject 一个 ValidationError 对象,包含:values(表单数据)和 errorFields(数组,包含每个错误字段的 name 和 errors 信息)。适用于需要同时获取表单数据和详细错误信息的场景
|
|
36
40
|
*/
|
|
37
41
|
validateFieldsWithValue: (fields?: (string | keyof FormValue) | (string | keyof FormValue)[]) => Promise<any>;
|
|
38
42
|
/**
|
|
39
|
-
* @en The
|
|
40
|
-
* @cn
|
|
43
|
+
* @en Validate specified fields and return the first error encountered. The fields parameter is a field path. Same functionality as validateFields, but the name more clearly indicates that it will return error information. Rejects with a FormError object (containing only the first error) on failure. Suitable for scenarios that only care about the first error
|
|
44
|
+
* @cn 校验指定字段并返回第一个遇到的错误。fields 参数为字段路径。与 validateFields 功能相同,但名称更明确地表示会返回错误信息。失败时 reject 一个 FormError 对象(仅包含第一个错误)。适用于只关心第一个错误的场景
|
|
41
45
|
*/
|
|
42
46
|
validateFieldsWithError: (fields: string | string[]) => Promise<any>;
|
|
43
47
|
/**
|
|
44
|
-
* @en Clear
|
|
45
|
-
* @cn
|
|
48
|
+
* @en Clear validation error information for specified fields. The names parameter is an array of field paths, clears errors for all fields when not passed. Field paths support formats like 'name', 'user.email', 'list[0].id'. Commonly used for resetting form state, clearing specific field errors, etc.
|
|
49
|
+
* @cn 清除指定字段的校验错误信息。names 参数为字段路径数组,不传时清除所有字段的错误。字段路径支持 'name'、'user.email'、'list[0].id' 等格式。常用于重置表单状态、清除特定字段错误等场景
|
|
46
50
|
*/
|
|
47
51
|
clearValidate: (names?: string[]) => void;
|
|
48
52
|
/**
|
|
49
|
-
* @en
|
|
50
|
-
* @cn
|
|
53
|
+
* @en Manually trigger form submission. The withValidate parameter controls whether to validate before submission, default is true. After validation passes, it will call the Form's onSubmit callback with the entire form data object (FormValue type). Usually used for custom submit buttons or programmatic submission
|
|
54
|
+
* @cn 手动触发表单提交。withValidate 参数控制是否在提交前进行校验,默认为 true。校验通过后会调用 Form 的 onSubmit 回调,传入整个表单的数据对象(FormValue 类型)。通常用于自定义提交按钮或程序化提交
|
|
51
55
|
*/
|
|
52
56
|
submit: (withValidate?: boolean) => void;
|
|
53
57
|
/**
|
|
54
|
-
* @en
|
|
55
|
-
* @cn
|
|
58
|
+
* @en Reset the form to its initial state. Restores form data to defaultValue (uncontrolled) or empty object (controlled), and clears all validation errors. Will trigger the Form's onReset callback
|
|
59
|
+
* @cn 重置表单到初始状态。将表单数据恢复为 defaultValue(非受控)或空对象(受控),并清除所有校验错误。会触发 Form 的 onReset 回调
|
|
56
60
|
*/
|
|
57
61
|
reset: () => void;
|
|
58
62
|
/**
|
|
59
|
-
* @en set field
|
|
60
|
-
* @cn
|
|
63
|
+
* @en Batch set form field values. Pass in an object where key is the field path and value is the value to set. Field paths support: dot notation ('user.name') to access nested objects, array indexes ('list[0].id') to access array elements. Options parameters: validate controls whether to trigger validation (default false), forceUpdate controls whether to force update (default false). Suitable for dynamically setting form values, linked updates, etc.
|
|
64
|
+
* @cn 批量设置表单字段值。传入一个对象,key 为字段路径,value 为要设置的值。字段路径支持:点表示法('user.name')访问嵌套对象,数组索引('list[0].id')访问数组元素。options 参数:validate 控制是否触发校验(默认 false),forceUpdate 控制是否强制更新(默认 false)。适用于动态设置表单值、联动更新等场景
|
|
61
65
|
*/
|
|
62
66
|
set: (value: {
|
|
63
67
|
[key: string]: any;
|
|
@@ -66,10 +70,16 @@ export interface FormRef<FormValue> {
|
|
|
66
70
|
forceUpdate?: boolean;
|
|
67
71
|
}) => void;
|
|
68
72
|
/**
|
|
69
|
-
* @en Scroll to the position of the specified field
|
|
70
|
-
* @cn
|
|
73
|
+
* @en Scroll the page to the position of the specified form field. The name parameter is a field path, supporting formats like 'name', 'user.email', 'list[0].id'. Requires the Form to set the name property to work properly. The scrollIntoViewOptions parameter conforms to the standard ScrollIntoViewOptions interface, which can control scrolling behavior, position, etc. Commonly used for error positioning, step-by-step form navigation, etc.
|
|
74
|
+
* @cn 滚动页面到指定表单字段的位置。name 参数为字段路径,支持 'name'、'user.email'、'list[0].id' 等格式。需要 Form 设置 name 属性才能正常工作。scrollIntoViewOptions 参数符合标准 ScrollIntoViewOptions 接口,可以控制滚动行为、位置等。常用于错误定位、分步表单导航等
|
|
71
75
|
*/
|
|
72
76
|
scrollToField: (name: string, scrollIntoViewOptions?: ScrollIntoViewOptions) => void;
|
|
77
|
+
/**
|
|
78
|
+
* @en Get the JSON Schema of the form structure. Returns a standard JSON Schema object that describes the form's structure, field types, validation rules, and constraints. Useful for form documentation, validation, and integration with JSON Schema-based tools
|
|
79
|
+
* @cn 获取表单结构的 JSON Schema。返回一个标准的 JSON Schema 对象,描述表单的结构、字段类型、验证规则和约束。用于表单文档化、验证以及与基于 JSON Schema 的工具集成
|
|
80
|
+
* @version 3.8.0
|
|
81
|
+
*/
|
|
82
|
+
getFormSchema: () => any;
|
|
73
83
|
}
|
|
74
84
|
export interface FormProps<V extends ObjectType> extends Partial<BaseFormProps<V>>, Pick<CommonType, 'className' | 'style'> {
|
|
75
85
|
jssStyle: {
|
|
@@ -87,16 +97,16 @@ export interface FormProps<V extends ObjectType> extends Partial<BaseFormProps<V
|
|
|
87
97
|
*/
|
|
88
98
|
scrollToError?: boolean | number;
|
|
89
99
|
/**
|
|
90
|
-
* @en
|
|
91
|
-
* @cn
|
|
100
|
+
* @en Get a reference to the form instance. Supports both function callback and ref object methods. Through formRef, you can call various form methods, such as manually triggering validation (validate, validateFields), submission (submit), reset (reset), getting/setting values (getValue, set), etc. The generic V in FormRef<V> represents the type of form data
|
|
101
|
+
* @cn 获取表单实例的引用。支持函数回调和 ref 对象两种方式。通过 formRef 可以调用表单的各种方法,如手动触发校验(validate、validateFields)、提交(submit)、重置(reset)、获取/设置值(getValue、set)等。FormRef<V> 中的泛型 V 表示表单数据的类型
|
|
92
102
|
* @override
|
|
93
103
|
*/
|
|
94
104
|
formRef?: ((form: FormRef<V>) => void) | {
|
|
95
105
|
current?: FormRef<V>;
|
|
96
106
|
};
|
|
97
107
|
/**
|
|
98
|
-
* @en
|
|
99
|
-
* @cn hooks
|
|
108
|
+
* @en Callback function for setting form reference when using Form.useForm() hooks. Usually doesn't need to be set manually, the Form component will handle it automatically. But may be needed in some special scenarios (such as cross-component communication)
|
|
109
|
+
* @cn 在使用 Form.useForm() hooks 时,用于设置表单引用的回调函数。通常不需要手动设置,Form 组件会自动处理。但在某些特殊场景(如跨组件通信)可能需要使用
|
|
100
110
|
*/
|
|
101
111
|
setForm?: (form: FormRef<V>) => void;
|
|
102
112
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file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AC;IACF;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,GAAG;QAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;KAAE,CAAC;IAElE;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;;AACD,wBAAkB"}
|
package/cjs/form/form.type.js
CHANGED
package/cjs/form/index.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ export type { FormProps, FormRef, FormClasses } from './form.type';
|
|
|
8
8
|
export type { FormItemProps, FormItemClasses } from './form-item.type';
|
|
9
9
|
export type { FormFieldProps, FormFieldChildrenFunc } from './form-field.type';
|
|
10
10
|
export type { FormFieldSetProps, FormFieldSetChildrenFunc } from './form-fieldset.type';
|
|
11
|
-
export type { FormFlowProps } from './form-flow.type';
|
|
11
|
+
export type { FormFlowProps, FormDatum } from './form-flow.type';
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
package/cjs/form/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;A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s/icons/config.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["config.tsx"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["config.tsx"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6JX,CAAC;AAEF,KAAK,WAAW,CAAC,CAAC,IAAI;KACnB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/B,CAAC;AACF,KAAK,cAAc,GAAG,WAAW,CAAC,OAAO,MAAM,CAAC,CAAC;AAGjD,eAAO,MAAM,QAAQ,cAAe,cAAc,SAYjD,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/cjs/icons/config.js
CHANGED
package/cjs/icons/icons.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ declare const Icons: {
|
|
|
39
39
|
StarFill: import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
Link: import("react/jsx-runtime").JSX.Element;
|
|
41
41
|
Loading: import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
EmptyNoData: import("react/jsx-runtime").JSX.Element;
|
|
42
43
|
};
|
|
43
44
|
export default Icons;
|
|
44
45
|
//# sourceMappingURL=icons.d.ts.map
|
package/cjs/icons/icons.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["icons.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["icons.tsx"],"names":[],"mappings":"AAyaA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsDV,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
package/cjs/icons/icons.js
CHANGED
|
@@ -224,6 +224,154 @@ var link = ['M8.83231 20.7322C7.27024 22.2943 4.73759 22.2943 3.17546 20.7322C1.
|
|
|
224
224
|
var filter = /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
225
225
|
d: "M19.9653 2.10633C20.5175 2.10633 20.9652 2.55404 20.9652 3.10633C20.9652 3.65861 20.5175 4.10633 19.9653 4.10633H19.6834L14.9666 11.3709V19.8936C14.9666 20.9981 14.0712 21.8936 12.9666 21.8936H10.9666C9.86204 21.8936 8.96662 20.9981 8.96662 19.8936V11.3709L4.35408 4.10632L4.03906 4.10632C3.48677 4.10632 3.03906 3.65861 3.03906 3.10632C3.03906 2.55404 3.48677 2.10632 4.03906 2.10632L19.9653 2.10633ZM6.75776 4.10632L10.8119 10.5206C10.913 10.6804 10.9666 10.8657 10.9666 11.0548V18.8312C10.9666 19.3835 11.4143 19.8312 11.9666 19.8312C12.5189 19.8312 12.9666 19.3835 12.9666 18.8312V11.0609C12.9666 10.868 13.0224 10.6792 13.1273 10.5172L17.2797 4.10633L6.75776 4.10632Z"
|
|
226
226
|
});
|
|
227
|
+
var emptyNoData = /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
228
|
+
width: "100",
|
|
229
|
+
height: "75",
|
|
230
|
+
viewBox: "0 0 100 75",
|
|
231
|
+
fill: "none",
|
|
232
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
233
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
234
|
+
clipPath: "url(#clip0_4044_10434)",
|
|
235
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
236
|
+
d: "M100 75C100 63.3607 77.6144 53.9257 50 53.9257C22.3857 53.9257 0 63.3607 0 75H100Z",
|
|
237
|
+
fill: "url(#paint0_linear_4044_10434)"
|
|
238
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
239
|
+
opacity: "0.3",
|
|
240
|
+
filter: "url(#filter0_f_4044_10434)",
|
|
241
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
242
|
+
d: "M50.3087 70.0413C69.5706 70.0413 85.185 68.2375 85.185 66.0125C85.185 63.7875 69.5706 61.9835 50.3087 61.9835C31.0469 61.9835 15.4321 63.7875 15.4321 66.0125C15.4321 68.2375 31.0469 70.0413 50.3087 70.0413Z",
|
|
243
|
+
fill: "#979EB0"
|
|
244
|
+
})
|
|
245
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
246
|
+
d: "M22.6082 23.6395C22.782 23.2127 23.1957 22.9338 23.6548 22.9338H75.7168C76.1718 22.9338 76.5818 23.2071 76.7593 23.6275L82.9493 38.3482H16.6184L22.6082 23.6395Z",
|
|
247
|
+
fill: "#CCCFD7"
|
|
248
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
249
|
+
d: "M75.9819 23.9172V37.2382H81.2882L75.9819 23.9172Z",
|
|
250
|
+
fill: "#999DA8"
|
|
251
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
252
|
+
d: "M18.877 37.0161H81.0701C82.6314 37.0161 83.897 38.2871 83.897 39.8547V61.7805C83.897 64.2888 81.872 66.3225 79.3739 66.3225H20.5732C18.0752 66.3225 16.05 64.2888 16.05 61.7805V39.8547C16.05 38.2871 17.3157 37.0161 18.877 37.0161Z",
|
|
253
|
+
fill: "#E8EBF0"
|
|
254
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
255
|
+
filter: "url(#filter1_d_4044_10434)",
|
|
256
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
257
|
+
d: "M16.0493 42.3192C16.0493 39.8108 16.0019 37.715 20.573 37.7774H79.3737C83.5612 37.7774 83.8968 39.8108 83.8968 42.3192V61.3998C83.8968 63.9087 81.8718 65.9419 79.3737 65.9419H20.573C18.075 65.9419 16.0493 63.9087 16.0493 61.3998V42.3192Z",
|
|
258
|
+
fill: "black"
|
|
259
|
+
})
|
|
260
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
261
|
+
d: "M16.0493 42.3192C16.0493 39.8108 16.0019 37.715 20.573 37.7774H79.3737C83.5612 37.7774 83.8968 39.8108 83.8968 42.3192V61.3998C83.8968 63.9087 81.8718 65.9419 79.3737 65.9419H20.573C18.075 65.9419 16.0493 63.9087 16.0493 61.3998V42.3192Z",
|
|
262
|
+
fill: "#F4F5F8"
|
|
263
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
264
|
+
d: "M23.4412 23.8855V37.0162H18.3242L23.4412 23.8855Z",
|
|
265
|
+
fill: "#999DA8"
|
|
266
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
267
|
+
d: "M60.3971 50.7178H39.5502C38.0849 50.7178 36.897 51.9106 36.897 53.382C36.897 54.8534 38.0849 56.0462 39.5502 56.0462H60.3971C61.8625 56.0462 63.0501 54.8534 63.0501 53.382C63.0501 51.9106 61.8625 50.7178 60.3971 50.7178Z",
|
|
268
|
+
fill: "#666C7C"
|
|
269
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
270
|
+
d: "M60.3971 49.9565H39.5502C38.0849 49.9565 36.897 51.1494 36.897 52.6208C36.897 54.0922 38.0849 55.285 39.5502 55.285H60.3971C61.8625 55.285 63.0501 54.0922 63.0501 52.6208C63.0501 51.1494 61.8625 49.9565 60.3971 49.9565Z",
|
|
271
|
+
fill: "#999DA8"
|
|
272
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
273
|
+
fillRule: "evenodd",
|
|
274
|
+
clipRule: "evenodd",
|
|
275
|
+
d: "M46.041 3.14062C42.6319 3.14062 39.8682 5.91575 39.8682 9.33899V11.4859C39.8682 14.9092 42.6319 17.6842 46.041 17.6842H54.8002C58.2093 17.6842 60.9731 14.9092 60.9731 11.4859V9.33899C60.9731 5.91575 58.2093 3.14062 54.8002 3.14062H46.041ZM47.3169 21.0086L49.386 17.6842H45.2478L47.3169 21.0086Z",
|
|
276
|
+
fill: "#E8EBF0"
|
|
277
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
278
|
+
d: "M45.6834 8.54285L47.4941 11.6922H43.8726L45.6834 8.54285Z",
|
|
279
|
+
fill: "#999DA8"
|
|
280
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
281
|
+
d: "M52.304 8.54285H49.1677V11.6921H52.304V8.54285Z",
|
|
282
|
+
fill: "#999DA8"
|
|
283
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
284
|
+
d: "M55.6802 11.6919C56.5463 11.6919 57.2484 10.9869 57.2484 10.1172C57.2484 9.2476 56.5463 8.5426 55.6802 8.5426C54.8142 8.5426 54.1121 9.2476 54.1121 10.1172C54.1121 10.9869 54.8142 11.6919 55.6802 11.6919Z",
|
|
285
|
+
fill: "#999DA8"
|
|
286
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
287
|
+
d: "M67.7256 5.8507C66.5081 6.69694 63.5181 6.751 62.3457 7.09731L63.5875 5.64293C64.415 4.6041 64.6631 4.10547 65.6562 2.11091C66.6493 0.116362 69.3118 -0.105256 70.415 0.0332553C69.7943 1.27985 70.415 3.98081 67.7256 5.8507Z",
|
|
288
|
+
fill: "#E8EBF0"
|
|
289
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
290
|
+
d: "M46.257 34.8904C45.3444 35.1307 43.5421 34.5087 42.7649 34.4595L43.824 33.8603C44.5451 33.4193 44.802 33.175 45.8298 32.198C46.8574 31.221 48.4998 31.6709 49.1305 31.9953C48.4883 32.606 48.2737 34.3593 46.257 34.8904Z",
|
|
291
|
+
fill: "#E8EBF0"
|
|
292
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
293
|
+
d: "M37.262 32.7723C37.13 32.5427 37.2462 32.2485 37.4982 32.1696C39.7646 31.4593 49.3015 28.2658 55.6537 22.9713C62.0347 17.653 67.6725 11.576 69.1256 9.9791C69.3069 9.77991 69.6263 9.81841 69.76 10.0521C69.845 10.1989 69.8294 10.3803 69.7169 10.507C68.6225 11.7406 62.8044 18.1953 56.0675 23.6911C48.7371 29.6708 39.4667 32.4671 37.7105 32.9602C37.5349 33.0096 37.3532 32.9308 37.262 32.7723Z",
|
|
294
|
+
fill: "#E8EBF0"
|
|
295
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
296
|
+
d: "M26.0283 27.1925C25.977 26.9505 26.1514 26.7154 26.396 26.6852C27.3291 26.5701 29.6586 26.1971 33.309 25.0577C37.011 23.9021 40.6908 21.2137 41.9723 20.2199C42.1914 20.05 42.5167 20.1675 42.5743 20.4394C42.6023 20.572 42.5585 20.7071 42.454 20.793C41.598 21.497 37.5626 24.6932 33.4811 25.8705C29.5763 26.9969 27.2876 27.3842 26.4592 27.5011C26.2561 27.5298 26.0709 27.394 26.0283 27.1925Z",
|
|
297
|
+
fill: "#E8EBF0"
|
|
298
|
+
})]
|
|
299
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("defs", {
|
|
300
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("filter", {
|
|
301
|
+
id: "filter0_f_4044_10434",
|
|
302
|
+
x: "9.43213",
|
|
303
|
+
y: "55.9835",
|
|
304
|
+
width: "81.7529",
|
|
305
|
+
height: "20.0577",
|
|
306
|
+
filterUnits: "userSpaceOnUse",
|
|
307
|
+
colorInterpolationFilters: "sRGB",
|
|
308
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("feFlood", {
|
|
309
|
+
floodOpacity: "0",
|
|
310
|
+
result: "BackgroundImageFix"
|
|
311
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("feBlend", {
|
|
312
|
+
mode: "normal",
|
|
313
|
+
in: "SourceGraphic",
|
|
314
|
+
in2: "BackgroundImageFix",
|
|
315
|
+
result: "shape"
|
|
316
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("feGaussianBlur", {
|
|
317
|
+
stdDeviation: "3",
|
|
318
|
+
result: "effect1_foregroundBlur_4044_10434"
|
|
319
|
+
})]
|
|
320
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("filter", {
|
|
321
|
+
id: "filter1_d_4044_10434",
|
|
322
|
+
x: "16.0493",
|
|
323
|
+
y: "37.776",
|
|
324
|
+
width: "67.8474",
|
|
325
|
+
height: "30.1659",
|
|
326
|
+
filterUnits: "userSpaceOnUse",
|
|
327
|
+
colorInterpolationFilters: "sRGB",
|
|
328
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("feFlood", {
|
|
329
|
+
floodOpacity: "0",
|
|
330
|
+
result: "BackgroundImageFix"
|
|
331
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("feColorMatrix", {
|
|
332
|
+
in: "SourceAlpha",
|
|
333
|
+
type: "matrix",
|
|
334
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
|
|
335
|
+
result: "hardAlpha"
|
|
336
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("feOffset", {
|
|
337
|
+
dy: "2"
|
|
338
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("feColorMatrix", {
|
|
339
|
+
type: "matrix",
|
|
340
|
+
values: "0 0 0 0 0.803922 0 0 0 0 0.811765 0 0 0 0 0.843137 0 0 0 1 0"
|
|
341
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("feBlend", {
|
|
342
|
+
mode: "normal",
|
|
343
|
+
in2: "BackgroundImageFix",
|
|
344
|
+
result: "effect1_dropShadow_4044_10434"
|
|
345
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("feBlend", {
|
|
346
|
+
mode: "normal",
|
|
347
|
+
in: "SourceGraphic",
|
|
348
|
+
in2: "effect1_dropShadow_4044_10434",
|
|
349
|
+
result: "shape"
|
|
350
|
+
})]
|
|
351
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("linearGradient", {
|
|
352
|
+
id: "paint0_linear_4044_10434",
|
|
353
|
+
x1: "50",
|
|
354
|
+
y1: "53.9257",
|
|
355
|
+
x2: "50",
|
|
356
|
+
y2: "75",
|
|
357
|
+
gradientUnits: "userSpaceOnUse",
|
|
358
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("stop", {
|
|
359
|
+
stopColor: "#E9EBEF"
|
|
360
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("stop", {
|
|
361
|
+
offset: "1",
|
|
362
|
+
stopColor: "#E9EBEF",
|
|
363
|
+
stopOpacity: "0"
|
|
364
|
+
})]
|
|
365
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("clipPath", {
|
|
366
|
+
id: "clip0_4044_10434",
|
|
367
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
|
|
368
|
+
width: "100",
|
|
369
|
+
height: "75",
|
|
370
|
+
fill: "white"
|
|
371
|
+
})
|
|
372
|
+
})]
|
|
373
|
+
})]
|
|
374
|
+
});
|
|
227
375
|
var Icons = {
|
|
228
376
|
SortAsc: SortAsc,
|
|
229
377
|
SortDesc: SortDesc,
|
|
@@ -264,6 +412,7 @@ var Icons = {
|
|
|
264
412
|
RecoverCircle: icon(recoverCircle),
|
|
265
413
|
StarFill: icon(pcStarFill),
|
|
266
414
|
Link: icon(link),
|
|
267
|
-
Loading: icon(loading)
|
|
415
|
+
Loading: icon(loading),
|
|
416
|
+
EmptyNoData: emptyNoData
|
|
268
417
|
};
|
|
269
418
|
var _default = exports.default = Icons;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-number.d.ts","sourceRoot":"","sources":["input-number.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;;
|
|
1
|
+
{"version":3,"file":"input-number.d.ts","sourceRoot":"","sources":["input-number.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;;AA8FvD,wBAAuC"}
|
|
@@ -12,7 +12,7 @@ var _hooks = require("@sheinx/hooks");
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
var _useInputCommon = _interopRequireDefault(require("./use-input-common"));
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
var _excluded = ["jssStyle", "hideArrow", "numType", "integerLimit", "digits", "min", "max", "step", "allowNull"],
|
|
15
|
+
var _excluded = ["jssStyle", "hideArrow", "numType", "integerLimit", "digits", "min", "max", "step", "allowNull", "coin"],
|
|
16
16
|
_excluded2 = ["onMinus", "onPlus"];
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
18
|
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; }
|
|
@@ -34,6 +34,7 @@ var InputNumber = function InputNumber(props) {
|
|
|
34
34
|
max = commonProps.max,
|
|
35
35
|
step = commonProps.step,
|
|
36
36
|
allowNull = commonProps.allowNull,
|
|
37
|
+
coin = commonProps.coin,
|
|
37
38
|
restProps = _objectWithoutProperties(commonProps, _excluded);
|
|
38
39
|
var inputStyle = jssStyle === null || jssStyle === void 0 || (_jssStyle$input = jssStyle.input) === null || _jssStyle$input === void 0 ? void 0 : _jssStyle$input.call(jssStyle);
|
|
39
40
|
var numberFormatParams = {
|
|
@@ -45,7 +46,8 @@ var InputNumber = function InputNumber(props) {
|
|
|
45
46
|
min: min,
|
|
46
47
|
max: max,
|
|
47
48
|
step: step,
|
|
48
|
-
allowNull: allowNull
|
|
49
|
+
allowNull: allowNull,
|
|
50
|
+
coin: coin
|
|
49
51
|
};
|
|
50
52
|
var _useInputNumber = (0, _hooks.useInputNumber)(_objectSpread({
|
|
51
53
|
value: commonProps.value,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InputCommonProps } from './input.type';
|
|
3
|
-
declare const useInputCommon: <Value, Props extends InputCommonProps<Value>>(props0: Props) => Omit<Props, "error" | "info" | "style" | "status" | "size" | "innerTitle" | "placeTitle" | "tip" | "value" | "onChange" | "disabled" | "width" | "defaultValue" | "popover" | "delay" | "beforeChange" | "popoverProps" | "onBlur" | "clearable" | "
|
|
3
|
+
declare const useInputCommon: <Value, Props extends InputCommonProps<Value>>(props0: Props) => Omit<Props, "error" | "info" | "style" | "status" | "size" | "innerTitle" | "placeTitle" | "tip" | "value" | "onChange" | "disabled" | "width" | "defaultValue" | "popover" | "delay" | "beforeChange" | "popoverProps" | "onBlur" | "clearable" | "clearToUndefined" | "forwardedRef" | "suffix" | "forwardRef" | "htmlName"> & {
|
|
4
4
|
name: string | undefined;
|
|
5
5
|
style: React.CSSProperties;
|
|
6
6
|
suffix: import("react/jsx-runtime").JSX.Element;
|
package/cjs/list/list.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["list.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AASxC,QAAA,MAAM,IAAI,+
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["list.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AASxC,QAAA,MAAM,IAAI,+GAiQT,CAAC;AAEF,eAAe,IAAI,CAAC"}
|