@silver-formily/element-plus 0.0.1-alpha.0 → 0.0.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/esm/__builtins__/configs/index.d.ts +0 -1
- package/esm/__builtins__/configs/index.mjs +0 -5
- package/esm/__builtins__/configs/index.mjs.map +0 -1
- package/esm/__builtins__/index.d.ts +0 -2
- package/esm/__builtins__/index.mjs +0 -27
- package/esm/__builtins__/index.mjs.map +0 -1
- package/esm/__builtins__/shared/hooks.d.ts +0 -7
- package/esm/__builtins__/shared/hooks.mjs +0 -59
- package/esm/__builtins__/shared/hooks.mjs.map +0 -1
- package/esm/__builtins__/shared/index.d.ts +0 -7
- package/esm/__builtins__/shared/index.mjs +0 -25
- package/esm/__builtins__/shared/index.mjs.map +0 -1
- package/esm/__builtins__/shared/load-config-provider.d.ts +0 -2
- package/esm/__builtins__/shared/load-config-provider.mjs +0 -13
- package/esm/__builtins__/shared/load-config-provider.mjs.map +0 -1
- package/esm/__builtins__/shared/loading.d.ts +0 -12
- package/esm/__builtins__/shared/loading.mjs +0 -49
- package/esm/__builtins__/shared/loading.mjs.map +0 -1
- package/esm/__builtins__/shared/simple-version-compare.d.ts +0 -2
- package/esm/__builtins__/shared/simple-version-compare.mjs +0 -18
- package/esm/__builtins__/shared/simple-version-compare.mjs.map +0 -1
- package/esm/__builtins__/shared/transform-component.d.ts +0 -8
- package/esm/__builtins__/shared/transform-component.mjs +0 -50
- package/esm/__builtins__/shared/transform-component.mjs.map +0 -1
- package/esm/__builtins__/shared/types.d.ts +0 -2
- package/esm/__builtins__/shared/types.mjs +0 -2
- package/esm/__builtins__/shared/types.mjs.map +0 -1
- package/esm/__builtins__/shared/utils.d.ts +0 -8
- package/esm/__builtins__/shared/utils.mjs +0 -34
- package/esm/__builtins__/shared/utils.mjs.map +0 -1
- package/esm/array-base/array-base-addition.d.ts +0 -5
- package/esm/array-base/array-base-index.d.ts +0 -19
- package/esm/array-base/array-base-inner.d.ts +0 -18
- package/esm/array-base/array-base-item.d.ts +0 -18
- package/esm/array-base/array-base-move-down.d.ts +0 -18
- package/esm/array-base/array-base-move-up.d.ts +0 -18
- package/esm/array-base/array-base-remove.d.ts +0 -18
- package/esm/array-base/array-base-sort-handle.d.ts +0 -2
- package/esm/array-base/index.d.ts +0 -114
- package/esm/array-base/index.mjs +0 -225
- package/esm/array-base/index.mjs.map +0 -1
- package/esm/array-base/symbols.d.ts +0 -4
- package/esm/array-base/symbols.mjs +0 -6
- package/esm/array-base/symbols.mjs.map +0 -1
- package/esm/array-base/types.d.ts +0 -28
- package/esm/array-base/types.mjs +0 -2
- package/esm/array-base/types.mjs.map +0 -1
- package/esm/array-base/utils.d.ts +0 -18
- package/esm/array-base/utils.mjs +0 -88
- package/esm/array-base/utils.mjs.map +0 -1
- package/esm/array-cards/array-cards.d.ts +0 -13
- package/esm/array-cards/index.d.ts +0 -122
- package/esm/array-cards/index.mjs +0 -119
- package/esm/array-cards/index.mjs.map +0 -1
- package/esm/array-collapse/array-collapse-item.d.ts +0 -18
- package/esm/array-collapse/array-collapse.d.ts +0 -16
- package/esm/array-collapse/index.d.ts +0 -134
- package/esm/array-collapse/index.mjs +0 -180
- package/esm/array-collapse/index.mjs.map +0 -1
- package/esm/array-collapse/utils.d.ts +0 -1
- package/esm/array-collapse/utils.mjs +0 -12
- package/esm/array-collapse/utils.mjs.map +0 -1
- package/esm/array-items/array-items-item.d.ts +0 -30
- package/esm/array-items/array-items.d.ts +0 -2
- package/esm/array-items/index.d.ts +0 -130
- package/esm/array-items/index.mjs +0 -105
- package/esm/array-items/index.mjs.map +0 -1
- package/esm/array-list-tabs/array-list-tabs.d.ts +0 -31
- package/esm/array-list-tabs/index.d.ts +0 -83
- package/esm/array-list-tabs/index.mjs +0 -183
- package/esm/array-list-tabs/index.mjs.map +0 -1
- package/esm/array-list-tabs/utils.d.ts +0 -3
- package/esm/array-list-tabs/utils.mjs +0 -16
- package/esm/array-list-tabs/utils.mjs.map +0 -1
- package/esm/array-table/index.mjs +0 -230
- package/esm/array-table/index.mjs.map +0 -1
- package/esm/array-table/types.d.ts +0 -6
- package/esm/array-table/types.mjs +0 -2
- package/esm/array-table/types.mjs.map +0 -1
- package/esm/array-table/utils.d.ts +0 -5
- package/esm/array-table/utils.mjs +0 -26
- package/esm/array-table/utils.mjs.map +0 -1
- package/esm/array-tabs/array-tabs.d.ts +0 -2
- package/esm/array-tabs/index.d.ts +0 -2
- package/esm/array-tabs/index.mjs +0 -88
- package/esm/array-tabs/index.mjs.map +0 -1
- package/esm/cascader/cascader.d.ts +0 -30
- package/esm/cascader/index.d.ts +0 -41
- package/esm/cascader/index.mjs +0 -54
- package/esm/cascader/index.mjs.map +0 -1
- package/esm/checkbox/checkbox-group.d.ts +0 -58
- package/esm/checkbox/index.d.ts +0 -716
- package/esm/checkbox/index.mjs +0 -86
- package/esm/checkbox/index.mjs.map +0 -1
- package/esm/date-picker/index.d.ts +0 -2
- package/esm/date-picker/index.mjs +0 -57
- package/esm/date-picker/index.mjs.map +0 -1
- package/esm/editable/editable-popover.d.ts +0 -25
- package/esm/editable/editable.d.ts +0 -187
- package/esm/editable/index.d.ts +0 -147
- package/esm/editable/index.mjs +0 -231
- package/esm/editable/index.mjs.map +0 -1
- package/esm/form/form.d.ts +0 -46
- package/esm/form/form.mjs +0 -77
- package/esm/form/form.mjs.map +0 -1
- package/esm/form/index.d.ts +0 -1
- package/esm/form/index.mjs +0 -6
- package/esm/form/index.mjs.map +0 -1
- package/esm/form-button-group/form-button-group-sticky.d.ts +0 -17
- package/esm/form-button-group/form-button-group.d.ts +0 -48
- package/esm/form-button-group/index.d.ts +0 -87
- package/esm/form-button-group/index.mjs +0 -90
- package/esm/form-button-group/index.mjs.map +0 -1
- package/esm/form-button-group/utils.d.ts +0 -1
- package/esm/form-button-group/utils.mjs +0 -12
- package/esm/form-button-group/utils.mjs.map +0 -1
- package/esm/form-collapse/form-collapse.d.ts +0 -18
- package/esm/form-collapse/index.d.ts +0 -45
- package/esm/form-collapse/index.mjs +0 -103
- package/esm/form-collapse/index.mjs.map +0 -1
- package/esm/form-collapse/utils.d.ts +0 -31
- package/esm/form-collapse/utils.mjs +0 -54
- package/esm/form-collapse/utils.mjs.map +0 -1
- package/esm/form-dialog/dialog-content.d.ts +0 -60
- package/esm/form-dialog/index.d.ts +0 -4
- package/esm/form-dialog/index.mjs +0 -209
- package/esm/form-dialog/index.mjs.map +0 -1
- package/esm/form-dialog/types.d.ts +0 -32
- package/esm/form-dialog/types.mjs +0 -2
- package/esm/form-dialog/types.mjs.map +0 -1
- package/esm/form-drawer/drawer-content.d.ts +0 -60
- package/esm/form-drawer/index.d.ts +0 -4
- package/esm/form-drawer/index.mjs +0 -203
- package/esm/form-drawer/index.mjs.map +0 -1
- package/esm/form-drawer/types.d.ts +0 -32
- package/esm/form-drawer/types.mjs +0 -2
- package/esm/form-drawer/types.mjs.map +0 -1
- package/esm/form-grid/form-grid-column.d.ts +0 -29
- package/esm/form-grid/form-grid.d.ts +0 -101
- package/esm/form-grid/hooks.d.ts +0 -4
- package/esm/form-grid/hooks.mjs +0 -7
- package/esm/form-grid/hooks.mjs.map +0 -1
- package/esm/form-grid/index.d.ts +0 -182
- package/esm/form-grid/index.mjs +0 -106
- package/esm/form-grid/index.mjs.map +0 -1
- package/esm/form-item/form-item.d.ts +0 -18
- package/esm/form-item/index.d.ts +0 -70
- package/esm/form-item/index.mjs +0 -346
- package/esm/form-item/index.mjs.map +0 -1
- package/esm/form-item/types.d.ts +0 -25
- package/esm/form-item/types.mjs +0 -2
- package/esm/form-item/types.mjs.map +0 -1
- package/esm/form-item/utils.d.ts +0 -3
- package/esm/form-item/utils.mjs +0 -18
- package/esm/form-item/utils.mjs.map +0 -1
- package/esm/form-layout/form-layout.d.ts +0 -32
- package/esm/form-layout/form-layout.mjs +0 -86
- package/esm/form-layout/form-layout.mjs.map +0 -1
- package/esm/form-layout/index.d.ts +0 -1
- package/esm/form-layout/index.mjs +0 -6
- package/esm/form-layout/index.mjs.map +0 -1
- package/esm/form-layout/types.d.ts +0 -43
- package/esm/form-layout/types.mjs +0 -2
- package/esm/form-layout/types.mjs.map +0 -1
- package/esm/form-layout/utils.d.ts +0 -57
- package/esm/form-layout/utils.mjs +0 -109
- package/esm/form-layout/utils.mjs.map +0 -1
- package/esm/form-step/form-step-pane.d.ts +0 -2
- package/esm/form-step/form-step.d.ts +0 -5
- package/esm/form-step/index.d.ts +0 -24
- package/esm/form-step/index.mjs +0 -96
- package/esm/form-step/index.mjs.map +0 -1
- package/esm/form-step/types.d.ts +0 -21
- package/esm/form-step/types.mjs +0 -2
- package/esm/form-step/types.mjs.map +0 -1
- package/esm/form-step/utils.d.ts +0 -11
- package/esm/form-step/utils.mjs +0 -66
- package/esm/form-step/utils.mjs.map +0 -1
- package/esm/form-tab/form-tab.d.ts +0 -7
- package/esm/form-tab/hooks.d.ts +0 -7
- package/esm/form-tab/hooks.mjs +0 -32
- package/esm/form-tab/hooks.mjs.map +0 -1
- package/esm/form-tab/index.d.ts +0 -28
- package/esm/form-tab/index.mjs +0 -80
- package/esm/form-tab/index.mjs.map +0 -1
- package/esm/form-tab/types.d.ts +0 -12
- package/esm/form-tab/types.mjs +0 -2
- package/esm/form-tab/types.mjs.map +0 -1
- package/esm/form-tab/utils.d.ts +0 -4
- package/esm/form-tab/utils.mjs +0 -14
- package/esm/form-tab/utils.mjs.map +0 -1
- package/esm/index.d.ts +0 -37
- package/esm/index.mjs +0 -81
- package/esm/index.mjs.map +0 -1
- package/esm/input/index.d.ts +0 -84
- package/esm/input/index.mjs +0 -77
- package/esm/input/index.mjs.map +0 -1
- package/esm/input/input.d.ts +0 -32
- package/esm/input-number/index.d.ts +0 -4
- package/esm/input-number/index.mjs +0 -30
- package/esm/input-number/index.mjs.map +0 -1
- package/esm/pagination/components/jumper.d.ts +0 -16
- package/esm/pagination/components/jumper.mjs +0 -12
- package/esm/pagination/components/jumper.mjs.map +0 -1
- package/esm/pagination/components/next.d.ts +0 -42
- package/esm/pagination/components/next.mjs +0 -23
- package/esm/pagination/components/next.mjs.map +0 -1
- package/esm/pagination/components/pager.d.ts +0 -42
- package/esm/pagination/components/pager.mjs +0 -23
- package/esm/pagination/components/pager.mjs.map +0 -1
- package/esm/pagination/components/prev.d.ts +0 -39
- package/esm/pagination/components/prev.mjs +0 -22
- package/esm/pagination/components/prev.mjs.map +0 -1
- package/esm/pagination/components/sizes.d.ts +0 -56
- package/esm/pagination/components/sizes.mjs +0 -7
- package/esm/pagination/components/sizes.mjs.map +0 -1
- package/esm/pagination/components/total.d.ts +0 -8
- package/esm/pagination/components/total.mjs +0 -11
- package/esm/pagination/components/total.mjs.map +0 -1
- package/esm/pagination/pagination.d.ts +0 -128
- package/esm/pagination/pagination.mjs +0 -631
- package/esm/pagination/pagination.mjs.map +0 -1
- package/esm/password/index.d.ts +0 -86
- package/esm/password/index.mjs +0 -14
- package/esm/password/index.mjs.map +0 -1
- package/esm/preview-text/cascader.d.ts +0 -5
- package/esm/preview-text/date-picker.d.ts +0 -5
- package/esm/preview-text/index.d.ts +0 -102
- package/esm/preview-text/index.mjs +0 -321
- package/esm/preview-text/index.mjs.map +0 -1
- package/esm/preview-text/input.d.ts +0 -28
- package/esm/preview-text/preview.d.ts +0 -18
- package/esm/preview-text/select.d.ts +0 -5
- package/esm/preview-text/time-picker.d.ts +0 -5
- package/esm/preview-text/tree.d.ts +0 -22
- package/esm/preview-text/utils.d.ts +0 -14
- package/esm/preview-text/utils.mjs +0 -16
- package/esm/preview-text/utils.mjs.map +0 -1
- package/esm/radio/index.d.ts +0 -634
- package/esm/radio/index.mjs +0 -80
- package/esm/radio/index.mjs.map +0 -1
- package/esm/radio/radio-group.d.ts +0 -44
- package/esm/reset/index.d.ts +0 -63
- package/esm/reset/index.mjs +0 -48
- package/esm/reset/index.mjs.map +0 -1
- package/esm/reset/reset.d.ts +0 -45
- package/esm/select/index.d.ts +0 -142
- package/esm/select/index.mjs +0 -132
- package/esm/select/index.mjs.map +0 -1
- package/esm/select/select.d.ts +0 -50
- package/esm/select-table/index.mjs +0 -204
- package/esm/select-table/index.mjs.map +0 -1
- package/esm/select-table/types.d.ts +0 -14
- package/esm/select-table/types.mjs +0 -2
- package/esm/select-table/types.mjs.map +0 -1
- package/esm/space/index.d.ts +0 -1
- package/esm/space/index.mjs +0 -6
- package/esm/space/index.mjs.map +0 -1
- package/esm/styles/array-base/index.css +0 -1
- package/esm/styles/array-cards/index.css +0 -1
- package/esm/styles/array-collapse/index.css +0 -1
- package/esm/styles/array-items/index.css +0 -1
- package/esm/styles/array-list-tabs/index.css +0 -1
- package/esm/styles/array-table/index.css +0 -1
- package/esm/styles/array-tabs/index.css +0 -1
- package/esm/styles/editable/index.css +0 -1
- package/esm/styles/form-button-group/index.css +0 -1
- package/esm/styles/form-collapse/index.css +0 -1
- package/esm/styles/form-grid/index.css +0 -1
- package/esm/styles/form-item/index.css +0 -1
- package/esm/styles/form-tab/index.css +0 -1
- package/esm/styles/preview-text/index.css +0 -1
- package/esm/styles/radio/index.css +0 -1
- package/esm/styles/select-table/index.css +0 -1
- package/esm/submit/index.d.ts +0 -48
- package/esm/submit/index.mjs +0 -47
- package/esm/submit/index.mjs.map +0 -1
- package/esm/submit/submit.d.ts +0 -36
- package/esm/switch/index.d.ts +0 -4
- package/esm/switch/index.mjs +0 -19
- package/esm/switch/index.mjs.map +0 -1
- package/esm/time-picker/index.d.ts +0 -4
- package/esm/time-picker/index.mjs +0 -21
- package/esm/time-picker/index.mjs.map +0 -1
- package/esm/time-select/index.d.ts +0 -2
- package/esm/time-select/index.mjs +0 -21
- package/esm/time-select/index.mjs.map +0 -1
- package/esm/transfer/index.d.ts +0 -1509
- package/esm/transfer/index.mjs +0 -11
- package/esm/transfer/index.mjs.map +0 -1
- package/esm/tree/index.d.ts +0 -42
- package/esm/tree/index.mjs +0 -105
- package/esm/tree/index.mjs.map +0 -1
- package/esm/tree/tree.d.ts +0 -20
- package/esm/tree/types.d.ts +0 -13
- package/esm/tree/types.mjs +0 -2
- package/esm/tree/types.mjs.map +0 -1
- package/esm/tree/utils.d.ts +0 -45
- package/esm/tree/utils.mjs +0 -161
- package/esm/tree/utils.mjs.map +0 -1
- package/esm/tree-select/index.d.ts +0 -32
- package/esm/tree-select/index.mjs +0 -51
- package/esm/tree-select/index.mjs.map +0 -1
- package/esm/tree-select/tree-select.d.ts +0 -17
- package/esm/upload/index.d.ts +0 -889
- package/esm/upload/index.mjs +0 -185
- package/esm/upload/index.mjs.map +0 -1
- package/esm/upload/upload.d.ts +0 -1613
- package/esm/vendor/icon.mjs +0 -11
- package/esm/vendor/icon.mjs.map +0 -1
- package/esm/vendor/lodash.mjs +0 -1400
- package/esm/vendor/lodash.mjs.map +0 -1
- package/esm/vendor/runtime.mjs +0 -29
- package/esm/vendor/runtime.mjs.map +0 -1
- package/esm/vendor/shared.esm-bundler.mjs +0 -14
- package/esm/vendor/shared.esm-bundler.mjs.map +0 -1
- package/esm/vendor/sizes.mjs +0 -27
- package/esm/vendor/sizes.mjs.map +0 -1
- package/esm/vendor/types.mjs +0 -19
- package/esm/vendor/types.mjs.map +0 -1
package/esm/form-grid/index.mjs
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { observer as s } from "@formily/reactive-vue";
|
|
2
|
-
import { defineComponent as l, createElementBlock as u, openBlock as c, renderSlot as d, ref as y, computed as b, provide as G, watchEffect as _, normalizeStyle as g, normalizeClass as C } from "vue";
|
|
3
|
-
import "element-plus";
|
|
4
|
-
import { markRaw as F } from "@formily/reactive";
|
|
5
|
-
import "@formily/core";
|
|
6
|
-
import "@formily/vue";
|
|
7
|
-
import { composeExport as v } from "../__builtins__/shared/utils.mjs";
|
|
8
|
-
import { Grid as h } from "@formily/grid";
|
|
9
|
-
import { stylePrefix as N } from "../__builtins__/configs/index.mjs";
|
|
10
|
-
import { FormGridSymbol as w } from "./hooks.mjs";
|
|
11
|
-
import '../styles/form-grid/index.css';const x = ["data-grid-span"], A = /* @__PURE__ */ l({
|
|
12
|
-
name: "FFormGridColumn",
|
|
13
|
-
__name: "form-grid-column",
|
|
14
|
-
props: {
|
|
15
|
-
gridSpan: {
|
|
16
|
-
type: Number,
|
|
17
|
-
default: 1
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
setup(m) {
|
|
21
|
-
const r = m;
|
|
22
|
-
return (n, a) => (c(), u("div", {
|
|
23
|
-
"data-grid-span": r.gridSpan
|
|
24
|
-
}, [
|
|
25
|
-
d(n.$slots, "default")
|
|
26
|
-
], 8, x));
|
|
27
|
-
}
|
|
28
|
-
}), k = /* @__PURE__ */ l({
|
|
29
|
-
name: "FFormGrid",
|
|
30
|
-
__name: "form-grid",
|
|
31
|
-
props: {
|
|
32
|
-
columnGap: {
|
|
33
|
-
type: Number
|
|
34
|
-
},
|
|
35
|
-
rowGap: {
|
|
36
|
-
type: Number
|
|
37
|
-
},
|
|
38
|
-
minColumns: {
|
|
39
|
-
type: [Number, Array]
|
|
40
|
-
},
|
|
41
|
-
minWidth: {
|
|
42
|
-
type: [Number, Array]
|
|
43
|
-
},
|
|
44
|
-
maxColumns: {
|
|
45
|
-
type: [Number, Array]
|
|
46
|
-
},
|
|
47
|
-
maxWidth: {
|
|
48
|
-
type: [Number, Array]
|
|
49
|
-
},
|
|
50
|
-
breakpoints: {
|
|
51
|
-
type: Array
|
|
52
|
-
},
|
|
53
|
-
colWrap: {
|
|
54
|
-
type: Boolean,
|
|
55
|
-
default: !0
|
|
56
|
-
},
|
|
57
|
-
strictAutoFit: {
|
|
58
|
-
type: Boolean,
|
|
59
|
-
default: !1
|
|
60
|
-
},
|
|
61
|
-
shouldVisible: {
|
|
62
|
-
type: Function,
|
|
63
|
-
default() {
|
|
64
|
-
return () => !0;
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
grid: {
|
|
68
|
-
type: Object
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
setup(m) {
|
|
72
|
-
const r = m, n = `${N}-form-grid`, a = y(), o = b(() => {
|
|
73
|
-
const { grid: e, ...t } = r, f = {
|
|
74
|
-
columnGap: (r == null ? void 0 : r.columnGap) ?? 8,
|
|
75
|
-
rowGap: r.rowGap ?? 4,
|
|
76
|
-
...Object.fromEntries(
|
|
77
|
-
Object.entries(t).filter(([p, i]) => i !== void 0).map(([p, i]) => [p, i])
|
|
78
|
-
)
|
|
79
|
-
};
|
|
80
|
-
return F(e ?? new h(f));
|
|
81
|
-
});
|
|
82
|
-
return G(w, o), _((e) => {
|
|
83
|
-
const t = o.value.connect(a.value);
|
|
84
|
-
e(() => {
|
|
85
|
-
t();
|
|
86
|
-
});
|
|
87
|
-
}), (e, t) => (c(), u("div", {
|
|
88
|
-
ref_key: "rootRef",
|
|
89
|
-
ref: a,
|
|
90
|
-
class: C(n),
|
|
91
|
-
style: g({
|
|
92
|
-
gridTemplateColumns: o.value.templateColumns,
|
|
93
|
-
gap: o.value.gap
|
|
94
|
-
})
|
|
95
|
-
}, [
|
|
96
|
-
d(e.$slots, "default")
|
|
97
|
-
], 4));
|
|
98
|
-
}
|
|
99
|
-
}), S = s(k), B = s(A), V = v(S, {
|
|
100
|
-
GridColumn: B
|
|
101
|
-
});
|
|
102
|
-
export {
|
|
103
|
-
V as FormGrid,
|
|
104
|
-
V as default
|
|
105
|
-
};
|
|
106
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/form-grid/form-grid-column.vue","../../src/form-grid/form-grid.vue","../../src/form-grid/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\ndefineOptions({\n name: 'FFormGridColumn',\n})\n\nconst props = defineProps({\n gridSpan: {\n type: Number,\n default: 1,\n },\n})\n</script>\n\n<template>\n <!-- @formily/grid 会优先使用这个值,如果没有会自动生成 -->\n <div :data-grid-span=\"props.gridSpan\">\n <slot />\n </div>\n</template>\n","<script lang=\"ts\" setup>\nimport type { IGridOptions } from '@formily/grid'\nimport type { PropType } from 'vue'\nimport { Grid } from '@formily/grid'\nimport { markRaw } from '@formily/reactive'\nimport { computed, provide, ref, watchEffect } from 'vue'\nimport { stylePrefix } from '../__builtins__'\nimport { FormGridSymbol } from './hooks'\n\ndefineOptions({\n name: 'FFormGrid',\n})\n\nconst props = defineProps({\n columnGap: {\n type: Number,\n },\n rowGap: {\n type: Number,\n },\n minColumns: {\n type: [Number, Array],\n },\n minWidth: {\n type: [Number, Array],\n },\n maxColumns: {\n type: [Number, Array],\n },\n maxWidth: {\n type: [Number, Array],\n },\n breakpoints: {\n type: Array as PropType<number[]>,\n },\n colWrap: {\n type: Boolean,\n default: true,\n },\n strictAutoFit: {\n type: Boolean,\n default: false,\n },\n shouldVisible: {\n type: Function as PropType<IGridOptions['shouldVisible']>,\n default() {\n return () => true\n },\n },\n grid: {\n type: Object as PropType<Grid<HTMLElement>>,\n },\n})\n\nconst prefixCls = `${stylePrefix}-form-grid`\nconst rootRef = ref<HTMLElement>()\n\nconst gridInstance = computed(() => {\n const { grid, ...restProps } = props\n const options = {\n columnGap: props?.columnGap ?? 8,\n rowGap: props.rowGap ?? 4,\n ...Object.fromEntries(\n Object.entries(restProps)\n .filter(([_, v]) => v !== undefined)\n .map(([k, v]) => [k, v]),\n ),\n }\n return markRaw(grid ?? new Grid(options))\n})\n\nprovide(FormGridSymbol, gridInstance)\n\nwatchEffect((onInvalidate) => {\n const dispose = gridInstance.value.connect(rootRef.value)\n onInvalidate(() => {\n dispose()\n })\n})\n</script>\n\n<template>\n <div\n ref=\"rootRef\"\n :class=\"prefixCls\"\n :style=\"{\n gridTemplateColumns: gridInstance.templateColumns,\n gap: gridInstance.gap,\n }\"\n >\n <slot />\n </div>\n</template>\n","import { observer } from '@formily/reactive-vue'\nimport { composeExport } from '../__builtins__'\nimport FFormGridColumn from './form-grid-column.vue'\nimport FFormGrid from './form-grid.vue'\nimport './style.scss'\n\nconst FormGridInner = observer(FFormGrid)\n\nconst FormGridColumn = observer(FFormGridColumn)\n\nexport const FormGrid = composeExport(FormGridInner, {\n GridColumn: FormGridColumn,\n})\n\nexport default FormGrid\n"],"names":["props","__props","_createElementBlock","_renderSlot","_ctx","prefixCls","stylePrefix","rootRef","ref","gridInstance","computed","grid","restProps","options","_","v","k","markRaw","Grid","provide","FormGridSymbol","watchEffect","onInvalidate","dispose","_normalizeStyle","FormGridInner","observer","FFormGrid","FormGridColumn","FFormGridColumn","FormGrid","composeExport"],"mappings":";;;;;;;;;;;;;;;;;;;;AAKA,UAAMA,IAAQC;2BAUZC,EAEM,OAAA;AAAA,MAFA,kBAAgBF,EAAM;AAAA,IAAA;MAC1BG,EAAQC,EAAA,QAAA,SAAA;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACHZ,UAAMJ,IAAQC,GAyCRI,IAAY,GAAGC,CAAW,cAC1BC,IAAUC,EAAA,GAEVC,IAAeC,EAAS,MAAM;AAClC,YAAM,EAAE,MAAAC,GAAM,GAAGC,EAAA,IAAcZ,GACzBa,IAAU;AAAA,QACd,YAAWb,KAAA,gBAAAA,EAAO,cAAa;AAAA,QAC/B,QAAQA,EAAM,UAAU;AAAA,QACxB,GAAG,OAAO;AAAA,UACR,OAAO,QAAQY,CAAS,EACrB,OAAO,CAAC,CAACE,GAAGC,CAAC,MAAMA,MAAM,MAAS,EAClC,IAAI,CAAC,CAACC,GAAGD,CAAC,MAAM,CAACC,GAAGD,CAAC,CAAC;AAAA,QAAA;AAAA,MAC3B;AAEF,aAAOE,EAAQN,KAAQ,IAAIO,EAAKL,CAAO,CAAC;AAAA,IAC1C,CAAC;AAED,WAAAM,EAAQC,GAAgBX,CAAY,GAEpCY,EAAY,CAACC,MAAiB;AAC5B,YAAMC,IAAUd,EAAa,MAAM,QAAQF,EAAQ,KAAK;AACxD,MAAAe,EAAa,MAAM;AACjB,QAAAC,EAAA;AAAA,MACF,CAAC;AAAA,IACH,CAAC,mBAICrB,EASM,OAAA;AAAA,eARA;AAAA,MAAJ,KAAIK;AAAA,MACH,SAAOF,CAAS;AAAA,MAChB,OAAKmB,EAAA;AAAA,QAA+B,qBAAAf,EAAA,MAAa;AAAA,QAA4B,KAAAA,EAAA,MAAa;AAAA,MAAA;;MAK3FN,EAAQC,EAAA,QAAA,SAAA;AAAA,IAAA;;ICpFNqB,IAAgBC,EAASC,CAAS,GAElCC,IAAiBF,EAASG,CAAe,GAElCC,IAAWC,EAAcN,GAAe;AAAA,EACnD,YAAYG;AACd,CAAC;"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { TooltipInstance } from 'element-plus';
|
|
2
|
-
import { IFormItemProps } from './types';
|
|
3
|
-
declare function __VLS_template(): any;
|
|
4
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
5
|
-
declare const __VLS_component: import('vue').DefineComponent<IFormItemProps, {
|
|
6
|
-
feedbackTooltipRef: import('vue').Ref<TooltipInstance, TooltipInstance>;
|
|
7
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IFormItemProps> & Readonly<{}>, {
|
|
8
|
-
colon: boolean;
|
|
9
|
-
fullness: boolean;
|
|
10
|
-
feedbackLayout: "loose" | "terse" | "popover";
|
|
11
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, any, any>;
|
|
12
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
13
|
-
export default _default;
|
|
14
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
15
|
-
new (): {
|
|
16
|
-
$slots: S;
|
|
17
|
-
};
|
|
18
|
-
};
|
package/esm/form-item/index.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
export declare function fieldFeedbackMapper(props: any, field: any): any;
|
|
2
|
-
export declare const FormItem: {
|
|
3
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').IFormItemProps> & Readonly<{}>, {
|
|
4
|
-
feedbackTooltipRef: import('vue').Ref<import('element-plus').TooltipInstance, import('element-plus').TooltipInstance>;
|
|
5
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
6
|
-
colon: boolean;
|
|
7
|
-
fullness: boolean;
|
|
8
|
-
feedbackLayout: "loose" | "terse" | "popover";
|
|
9
|
-
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, any, any, import('vue').ComponentProvideOptions, {
|
|
10
|
-
P: {};
|
|
11
|
-
B: {};
|
|
12
|
-
D: {};
|
|
13
|
-
C: {};
|
|
14
|
-
M: {};
|
|
15
|
-
Defaults: {};
|
|
16
|
-
}, Readonly<import('./types').IFormItemProps> & Readonly<{}>, {
|
|
17
|
-
feedbackTooltipRef: import('vue').Ref<import('element-plus').TooltipInstance, import('element-plus').TooltipInstance>;
|
|
18
|
-
}, {}, {}, {}, {
|
|
19
|
-
colon: boolean;
|
|
20
|
-
fullness: boolean;
|
|
21
|
-
feedbackLayout: "loose" | "terse" | "popover";
|
|
22
|
-
}>;
|
|
23
|
-
__isFragment?: never;
|
|
24
|
-
__isTeleport?: never;
|
|
25
|
-
__isSuspense?: never;
|
|
26
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./types').IFormItemProps> & Readonly<{}>, {
|
|
27
|
-
feedbackTooltipRef: import('vue').Ref<import('element-plus').TooltipInstance, import('element-plus').TooltipInstance>;
|
|
28
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
29
|
-
colon: boolean;
|
|
30
|
-
fullness: boolean;
|
|
31
|
-
feedbackLayout: "loose" | "terse" | "popover";
|
|
32
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
33
|
-
$slots: any;
|
|
34
|
-
}) & {
|
|
35
|
-
BaseItem: {
|
|
36
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').IFormItemProps> & Readonly<{}>, {
|
|
37
|
-
feedbackTooltipRef: import('vue').Ref<import('element-plus').TooltipInstance, import('element-plus').TooltipInstance>;
|
|
38
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
39
|
-
colon: boolean;
|
|
40
|
-
fullness: boolean;
|
|
41
|
-
feedbackLayout: "loose" | "terse" | "popover";
|
|
42
|
-
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, any, any, import('vue').ComponentProvideOptions, {
|
|
43
|
-
P: {};
|
|
44
|
-
B: {};
|
|
45
|
-
D: {};
|
|
46
|
-
C: {};
|
|
47
|
-
M: {};
|
|
48
|
-
Defaults: {};
|
|
49
|
-
}, Readonly<import('./types').IFormItemProps> & Readonly<{}>, {
|
|
50
|
-
feedbackTooltipRef: import('vue').Ref<import('element-plus').TooltipInstance, import('element-plus').TooltipInstance>;
|
|
51
|
-
}, {}, {}, {}, {
|
|
52
|
-
colon: boolean;
|
|
53
|
-
fullness: boolean;
|
|
54
|
-
feedbackLayout: "loose" | "terse" | "popover";
|
|
55
|
-
}>;
|
|
56
|
-
__isFragment?: never;
|
|
57
|
-
__isTeleport?: never;
|
|
58
|
-
__isSuspense?: never;
|
|
59
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./types').IFormItemProps> & Readonly<{}>, {
|
|
60
|
-
feedbackTooltipRef: import('vue').Ref<import('element-plus').TooltipInstance, import('element-plus').TooltipInstance>;
|
|
61
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
62
|
-
colon: boolean;
|
|
63
|
-
fullness: boolean;
|
|
64
|
-
feedbackLayout: "loose" | "terse" | "popover";
|
|
65
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
66
|
-
$slots: any;
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
export default FormItem;
|
|
70
|
-
export { default as FormBaseItem } from './form-item';
|
package/esm/form-item/index.mjs
DELETED
|
@@ -1,346 +0,0 @@
|
|
|
1
|
-
import { isVoidField as ce } from "@formily/core";
|
|
2
|
-
import { useField as fe, connect as pe, mapProps as ve } from "@formily/vue";
|
|
3
|
-
import { defineComponent as me, useSlots as be, computed as c, ref as y, reactive as ye, watch as ke, provide as U, createElementBlock as n, openBlock as a, unref as o, normalizeClass as u, createBlock as p, createCommentVNode as f, createElementVNode as _, resolveDynamicComponent as S, normalizeStyle as F, withCtx as b, isVNode as C, createVNode as $, toDisplayString as k, Fragment as I, createTextVNode as E, renderSlot as Y, TransitionGroup as ge } from "vue";
|
|
4
|
-
import { useNamespace as Se, useFormSize as xe, useId as he, formItemContextKey as _e, ElTooltip as P, ElIcon as H } from "element-plus";
|
|
5
|
-
import "@formily/reactive";
|
|
6
|
-
import "@formily/reactive-vue";
|
|
7
|
-
import { composeExport as Ce } from "../__builtins__/shared/utils.mjs";
|
|
8
|
-
import { InfoFilled as $e, CircleClose as Ie, CircleCheck as we, Warning as We } from "@element-plus/icons-vue";
|
|
9
|
-
import { isValid as m, isArr as Fe } from "@formily/shared";
|
|
10
|
-
import { stylePrefix as Ae } from "../__builtins__/configs/index.mjs";
|
|
11
|
-
import { useResizeObserver as Be } from "../__builtins__/shared/hooks.mjs";
|
|
12
|
-
import { FORM_LAYOUT_PROPS_KEYS as Le, useFormLayout as ze, formLayoutShallowContext as Te } from "../form-layout/utils.mjs";
|
|
13
|
-
import { p as Re } from "../vendor/lodash.mjs";
|
|
14
|
-
import { i as Ee, a as Pe, d as Ve } from "../vendor/types.mjs";
|
|
15
|
-
import { a as Ne } from "../vendor/shared.esm-bundler.mjs";
|
|
16
|
-
import { getFeedbackMessage as Oe, determineFeedbackStatus as qe } from "./utils.mjs";
|
|
17
|
-
import '../styles/form-item/index.css';const Me = "utils/dom/style";
|
|
18
|
-
function J(s, v = "px") {
|
|
19
|
-
if (!s)
|
|
20
|
-
return "";
|
|
21
|
-
if (Ee(s) || Pe(s))
|
|
22
|
-
return `${s}${v}`;
|
|
23
|
-
if (Ne(s))
|
|
24
|
-
return s;
|
|
25
|
-
Ve(Me, "binding value must be a string or number");
|
|
26
|
-
}
|
|
27
|
-
const je = ["role", "aria-labelledby"], Q = /* @__PURE__ */ me({
|
|
28
|
-
name: "FFormItem",
|
|
29
|
-
__name: "form-item",
|
|
30
|
-
props: {
|
|
31
|
-
label: null,
|
|
32
|
-
for: null,
|
|
33
|
-
tooltip: null,
|
|
34
|
-
addonBefore: null,
|
|
35
|
-
addonAfter: null,
|
|
36
|
-
extra: null,
|
|
37
|
-
feedbackText: null,
|
|
38
|
-
feedbackStatus: null,
|
|
39
|
-
asterisk: { type: Boolean },
|
|
40
|
-
colon: { type: Boolean, default: !0 },
|
|
41
|
-
labelAlign: null,
|
|
42
|
-
wrapperAlign: null,
|
|
43
|
-
labelWrap: { type: Boolean },
|
|
44
|
-
labelWidth: null,
|
|
45
|
-
wrapperWidth: null,
|
|
46
|
-
wrapperWrap: { type: Boolean },
|
|
47
|
-
labelCol: null,
|
|
48
|
-
wrapperCol: null,
|
|
49
|
-
fullness: { type: Boolean, default: !1 },
|
|
50
|
-
size: null,
|
|
51
|
-
layout: null,
|
|
52
|
-
feedbackLayout: { default: "loose" },
|
|
53
|
-
tooltipLayout: null
|
|
54
|
-
},
|
|
55
|
-
setup(s, { expose: v }) {
|
|
56
|
-
var G, K;
|
|
57
|
-
const e = s, A = be(), r = Se("form-item"), d = `${Ae}-form-item`, X = Object.fromEntries(
|
|
58
|
-
Object.entries(Re(e, Le)).filter(([t, i]) => m(i))
|
|
59
|
-
), Z = ze(), l = c(() => Object.assign({}, Z.value, X)), V = fe(), N = xe(void 0, { formItem: !1 }), B = he().value, g = y([]), O = y(""), q = y(), x = y(), M = y();
|
|
60
|
-
v({
|
|
61
|
-
feedbackTooltipRef: M
|
|
62
|
-
});
|
|
63
|
-
const w = c(
|
|
64
|
-
() => l.value.layout === "vertical" || Fe(l.value.layout) && l.value.layout.includes("vertical") ? "top" : l.value.labelAlign
|
|
65
|
-
), ee = c(() => {
|
|
66
|
-
if (w.value === "top")
|
|
67
|
-
return {};
|
|
68
|
-
const t = J(l.value.labelWidth || "");
|
|
69
|
-
return t ? { width: t } : {};
|
|
70
|
-
}), te = c(() => {
|
|
71
|
-
var i;
|
|
72
|
-
const t = J(((i = l.value) == null ? void 0 : i.wrapperWidth) || "");
|
|
73
|
-
return t ? { width: t, flex: "unset" } : {};
|
|
74
|
-
}), ae = c(() => {
|
|
75
|
-
var t;
|
|
76
|
-
return {
|
|
77
|
-
justifyContent: ((t = l.value) == null ? void 0 : t.wrapperAlign) === "right" && "flex-end"
|
|
78
|
-
};
|
|
79
|
-
}), le = c(
|
|
80
|
-
() => {
|
|
81
|
-
var t;
|
|
82
|
-
return e.asterisk && ((t = V.value) == null ? void 0 : t.pattern) !== "readPretty";
|
|
83
|
-
}
|
|
84
|
-
), oe = c(() => {
|
|
85
|
-
var t, i, h;
|
|
86
|
-
return [
|
|
87
|
-
r.b(),
|
|
88
|
-
// eslint-disable-next-line unicorn/explicit-length-check
|
|
89
|
-
r.m(e.size || N.value || "default"),
|
|
90
|
-
r.is(e.feedbackStatus),
|
|
91
|
-
r.is("validating", O.value === "validating"),
|
|
92
|
-
r.is("success", O.value === "success"),
|
|
93
|
-
r.is("required", le.value || e.asterisk),
|
|
94
|
-
r.is("no-asterisk", (t = l.value) == null ? void 0 : t.hideRequiredAsterisk),
|
|
95
|
-
r.is(l.value.feedbackLayout),
|
|
96
|
-
((i = l.value) == null ? void 0 : i.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
|
|
97
|
-
{
|
|
98
|
-
[r.m("feedback")]: (h = l.value) == null ? void 0 : h.statusIcon,
|
|
99
|
-
[r.m(`label-${w.value}`)]: w.value
|
|
100
|
-
}
|
|
101
|
-
];
|
|
102
|
-
}), j = c(() => [
|
|
103
|
-
`${d}-feedback`,
|
|
104
|
-
r.is(e.feedbackStatus),
|
|
105
|
-
r.is("loose", e.feedbackLayout === "loose")
|
|
106
|
-
]), L = c(() => e.label !== "" && m(e.label) || m(A.label)), z = c(() => e.for || (g.value.length === 1 ? g.value[0] : void 0)), T = c(() => !z.value && L.value);
|
|
107
|
-
async function re() {
|
|
108
|
-
return !0;
|
|
109
|
-
}
|
|
110
|
-
/* istanbul ignore next -- @preserve */
|
|
111
|
-
const se = () => {
|
|
112
|
-
};
|
|
113
|
-
/* istanbul ignore next -- @preserve */
|
|
114
|
-
const ie = async () => {
|
|
115
|
-
}, ne = (t) => {
|
|
116
|
-
/* istanbul ignore else -- @preserve */
|
|
117
|
-
g.value.includes(t) || g.value.push(t);
|
|
118
|
-
}, ue = (t) => {
|
|
119
|
-
g.value = g.value.filter((i) => i !== t);
|
|
120
|
-
}, D = y(!1);
|
|
121
|
-
Be(x, () => {
|
|
122
|
-
var t, i;
|
|
123
|
-
D.value = ((t = x.value) == null ? void 0 : t.scrollWidth) > ((i = x.value) == null ? void 0 : i.clientWidth);
|
|
124
|
-
});
|
|
125
|
-
const R = c(() => D.value && !l.value.labelWrap), de = y(""), W = ye({
|
|
126
|
-
$el: q,
|
|
127
|
-
labelWidth: (G = l.value) == null ? void 0 : G.labelWidth,
|
|
128
|
-
size: N,
|
|
129
|
-
validateState: de.value,
|
|
130
|
-
labelId: B,
|
|
131
|
-
inputIds: g,
|
|
132
|
-
isGroup: T,
|
|
133
|
-
hasLabel: L,
|
|
134
|
-
addInputId: ne,
|
|
135
|
-
removeInputId: ue,
|
|
136
|
-
resetField: ie,
|
|
137
|
-
clearValidate: se,
|
|
138
|
-
validate: re,
|
|
139
|
-
labelPosition: w,
|
|
140
|
-
inlineMessage: !0,
|
|
141
|
-
showMessage: !0,
|
|
142
|
-
fieldValue: (K = V.value) == null ? void 0 : K.value,
|
|
143
|
-
validateMessage: "",
|
|
144
|
-
propString: ""
|
|
145
|
-
});
|
|
146
|
-
return ke(() => e.feedbackStatus, (t) => {
|
|
147
|
-
if (t === "pending") {
|
|
148
|
-
W.validateState = "validating";
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
if (t === "warning") {
|
|
152
|
-
W.validateState = "";
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
W.validateState = t;
|
|
156
|
-
}, {
|
|
157
|
-
immediate: !0
|
|
158
|
-
}), U(Te, y({
|
|
159
|
-
...m(e.size) && { size: e.size },
|
|
160
|
-
...m(e.colon) && { colon: e.colon }
|
|
161
|
-
})), U(_e, W), (t, i) => (a(), n("div", {
|
|
162
|
-
ref_key: "formItemRef",
|
|
163
|
-
ref: q,
|
|
164
|
-
class: u([d, l.value.labelWrap && "is-warp", ...oe.value]),
|
|
165
|
-
role: T.value ? "group" : void 0,
|
|
166
|
-
"aria-labelledby": T.value ? o(B) : void 0
|
|
167
|
-
}, [
|
|
168
|
-
L.value ? (a(), p(S(z.value ? "label" : "div"), {
|
|
169
|
-
key: 0,
|
|
170
|
-
id: o(B),
|
|
171
|
-
for: z.value,
|
|
172
|
-
class: u([o(r).e("label"), o(m)(l.value.labelCol) && `${d}-col-${l.value.labelCol}`]),
|
|
173
|
-
style: F(ee.value)
|
|
174
|
-
}, {
|
|
175
|
-
default: b(() => [
|
|
176
|
-
C(e.label) ? (a(), p(S(e.label), { key: 0 })) : (a(), n("div", {
|
|
177
|
-
key: 1,
|
|
178
|
-
class: u(`${d}-label__wrapper`)
|
|
179
|
-
}, [
|
|
180
|
-
$(o(P), {
|
|
181
|
-
disabled: !R.value && l.value.tooltipLayout !== "text"
|
|
182
|
-
}, {
|
|
183
|
-
content: b(() => {
|
|
184
|
-
var h;
|
|
185
|
-
return [
|
|
186
|
-
C(e.tooltip) ? (a(), p(S(e.tooltip), { key: 0 })) : (a(), n("div", {
|
|
187
|
-
key: 1,
|
|
188
|
-
style: F(`width: ${((h = x.value) == null ? void 0 : h.clientWidth) ?? 0}px;`)
|
|
189
|
-
}, [
|
|
190
|
-
R.value ? (a(), n(I, { key: 0 }, [
|
|
191
|
-
E(k(e.label), 1)
|
|
192
|
-
], 64)) : f("", !0),
|
|
193
|
-
l.value.tooltipLayout === "text" ? (a(), n(I, { key: 1 }, [
|
|
194
|
-
E(k(e.tooltip), 1)
|
|
195
|
-
], 64)) : f("", !0)
|
|
196
|
-
], 4))
|
|
197
|
-
];
|
|
198
|
-
}),
|
|
199
|
-
default: b(() => [
|
|
200
|
-
_("span", {
|
|
201
|
-
class: u({
|
|
202
|
-
[`${d}-label-content`]: !0,
|
|
203
|
-
"is-tooltip": R.value || e.tooltip && l.value.tooltipLayout === "text"
|
|
204
|
-
})
|
|
205
|
-
}, [
|
|
206
|
-
_("span", {
|
|
207
|
-
ref_key: "labelRef",
|
|
208
|
-
ref: x
|
|
209
|
-
}, k(e.label), 513)
|
|
210
|
-
], 2)
|
|
211
|
-
]),
|
|
212
|
-
_: 1
|
|
213
|
-
}, 8, ["disabled"]),
|
|
214
|
-
e.tooltip && l.value.tooltipLayout !== "text" ? (a(), p(o(P), {
|
|
215
|
-
key: 0,
|
|
216
|
-
content: e.tooltip
|
|
217
|
-
}, {
|
|
218
|
-
default: b(() => [
|
|
219
|
-
$(o(H), {
|
|
220
|
-
class: u(`${d}-label-tooltip`)
|
|
221
|
-
}, {
|
|
222
|
-
default: b(() => [
|
|
223
|
-
$(o($e))
|
|
224
|
-
]),
|
|
225
|
-
_: 1
|
|
226
|
-
}, 8, ["class"])
|
|
227
|
-
]),
|
|
228
|
-
_: 1
|
|
229
|
-
}, 8, ["content"])) : f("", !0),
|
|
230
|
-
e.colon ? (a(), n("span", {
|
|
231
|
-
key: 1,
|
|
232
|
-
class: u(`${d}-colon`)
|
|
233
|
-
}, ":", 2)) : f("", !0)
|
|
234
|
-
], 2))
|
|
235
|
-
]),
|
|
236
|
-
_: 1
|
|
237
|
-
}, 8, ["id", "for", "class", "style"])) : f("", !0),
|
|
238
|
-
_("div", {
|
|
239
|
-
class: u([
|
|
240
|
-
`${d}-content__wrapper`,
|
|
241
|
-
o(m)(l.value.wrapperCol) && `${d}-col-${l.value.wrapperCol}`
|
|
242
|
-
]),
|
|
243
|
-
style: F(ae.value)
|
|
244
|
-
}, [
|
|
245
|
-
o(m)(e.addonBefore) ? (a(), n(I, { key: 0 }, [
|
|
246
|
-
C(e.addonBefore) ? (a(), p(S(e.addonBefore), { key: 0 })) : (a(), n("div", {
|
|
247
|
-
key: 1,
|
|
248
|
-
class: u(`${d}-addon-before`)
|
|
249
|
-
}, k(e.addonBefore), 3))
|
|
250
|
-
], 64)) : f("", !0),
|
|
251
|
-
_("div", {
|
|
252
|
-
class: u([
|
|
253
|
-
o(r).e("content"),
|
|
254
|
-
l.value.fullness && "is-fullness",
|
|
255
|
-
o(r).is("addon-after", !!e.addonAfter)
|
|
256
|
-
]),
|
|
257
|
-
style: F(te.value)
|
|
258
|
-
}, [
|
|
259
|
-
e.feedbackLayout === "popover" ? (a(), p(o(P), {
|
|
260
|
-
key: 0,
|
|
261
|
-
ref_key: "feedbackTooltipRef",
|
|
262
|
-
ref: M,
|
|
263
|
-
visible: !!e.feedbackText,
|
|
264
|
-
effect: "light",
|
|
265
|
-
offset: 6
|
|
266
|
-
}, {
|
|
267
|
-
default: b(() => [
|
|
268
|
-
Y(t.$slots, "default")
|
|
269
|
-
]),
|
|
270
|
-
content: b(() => [
|
|
271
|
-
_("div", {
|
|
272
|
-
class: u([...j.value, o(r).is("tooltip")])
|
|
273
|
-
}, [
|
|
274
|
-
$(o(H), null, {
|
|
275
|
-
default: b(() => [
|
|
276
|
-
e.feedbackStatus === "error" ? (a(), p(o(Ie), { key: 0 })) : f("", !0),
|
|
277
|
-
e.feedbackStatus === "success" ? (a(), p(o(we), { key: 1 })) : f("", !0),
|
|
278
|
-
e.feedbackStatus === "warning" ? (a(), p(o(We), { key: 2 })) : f("", !0)
|
|
279
|
-
]),
|
|
280
|
-
_: 1
|
|
281
|
-
}),
|
|
282
|
-
E(" " + k(e.feedbackText), 1)
|
|
283
|
-
], 2)
|
|
284
|
-
]),
|
|
285
|
-
_: 3
|
|
286
|
-
}, 8, ["visible"])) : Y(t.$slots, "default", { key: 1 }),
|
|
287
|
-
$(ge, {
|
|
288
|
-
name: `${o(r).namespace.value}-zoom-in-top`
|
|
289
|
-
}, {
|
|
290
|
-
default: b(() => [
|
|
291
|
-
e.feedbackText && e.feedbackLayout !== "popover" ? (a(), n("div", {
|
|
292
|
-
key: 0,
|
|
293
|
-
class: u(j.value)
|
|
294
|
-
}, k(e.feedbackText), 3)) : f("", !0),
|
|
295
|
-
o(m)(e.extra) ? (a(), n(I, { key: 1 }, [
|
|
296
|
-
C(e.extra) ? (a(), p(S(e.extra), { key: 0 })) : (a(), n("div", {
|
|
297
|
-
key: 1,
|
|
298
|
-
class: u(`${d}-extra`)
|
|
299
|
-
}, k(e.extra), 3))
|
|
300
|
-
], 64)) : f("", !0)
|
|
301
|
-
]),
|
|
302
|
-
_: 1
|
|
303
|
-
}, 8, ["name"])
|
|
304
|
-
], 6),
|
|
305
|
-
o(m)(e.addonAfter) ? (a(), n(I, { key: 1 }, [
|
|
306
|
-
C(e.addonAfter) ? (a(), p(S(e.addonAfter), { key: 0 })) : (a(), n("div", {
|
|
307
|
-
key: 1,
|
|
308
|
-
class: u(`${d}-addon-after`)
|
|
309
|
-
}, k(e.addonAfter), 3))
|
|
310
|
-
], 64)) : f("", !0)
|
|
311
|
-
], 6)
|
|
312
|
-
], 10, je));
|
|
313
|
-
}
|
|
314
|
-
});
|
|
315
|
-
function De(s, v) {
|
|
316
|
-
if (ce(v) || !v)
|
|
317
|
-
return s;
|
|
318
|
-
const e = Oe(v), A = qe(v), r = "asterisk" in s ? s.asterisk : v.required && v.pattern !== "readPretty";
|
|
319
|
-
return {
|
|
320
|
-
...s,
|
|
321
|
-
feedbackText: e,
|
|
322
|
-
feedbackStatus: A,
|
|
323
|
-
asterisk: r
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
const Ge = pe(
|
|
327
|
-
Q,
|
|
328
|
-
ve(
|
|
329
|
-
{
|
|
330
|
-
validateStatus: !0,
|
|
331
|
-
title: "label",
|
|
332
|
-
required: !0,
|
|
333
|
-
description: "extra"
|
|
334
|
-
},
|
|
335
|
-
De
|
|
336
|
-
)
|
|
337
|
-
), nt = Ce(Ge, {
|
|
338
|
-
BaseItem: Q
|
|
339
|
-
});
|
|
340
|
-
export {
|
|
341
|
-
Q as FormBaseItem,
|
|
342
|
-
nt as FormItem,
|
|
343
|
-
nt as default,
|
|
344
|
-
De as fieldFeedbackMapper
|
|
345
|
-
};
|
|
346
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../node_modules/.pnpm/element-plus@2.10.4_vue@3.5.18_typescript@5.8.3_/node_modules/element-plus/es/utils/dom/style.mjs","../../src/form-item/form-item.vue","../../src/form-item/index.ts"],"sourcesContent":["import { isNumber, isStringNumber } from '../types.mjs';\nimport { isClient } from '@vueuse/core';\nimport { camelize, isObject, isString } from '@vue/shared';\nimport { entriesOf, keysOf } from '../objects.mjs';\nimport { debugWarn } from '../error.mjs';\n\nconst SCOPE = \"utils/dom/style\";\nconst classNameToArray = (cls = \"\") => cls.split(\" \").filter((item) => !!item.trim());\nconst hasClass = (el, cls) => {\n if (!el || !cls)\n return false;\n if (cls.includes(\" \"))\n throw new Error(\"className should not contain space.\");\n return el.classList.contains(cls);\n};\nconst addClass = (el, cls) => {\n if (!el || !cls.trim())\n return;\n el.classList.add(...classNameToArray(cls));\n};\nconst removeClass = (el, cls) => {\n if (!el || !cls.trim())\n return;\n el.classList.remove(...classNameToArray(cls));\n};\nconst getStyle = (element, styleName) => {\n var _a;\n if (!isClient || !element || !styleName)\n return \"\";\n let key = camelize(styleName);\n if (key === \"float\")\n key = \"cssFloat\";\n try {\n const style = element.style[key];\n if (style)\n return style;\n const computed = (_a = document.defaultView) == null ? void 0 : _a.getComputedStyle(element, \"\");\n return computed ? computed[key] : \"\";\n } catch (e) {\n return element.style[key];\n }\n};\nconst setStyle = (element, styleName, value) => {\n if (!element || !styleName)\n return;\n if (isObject(styleName)) {\n entriesOf(styleName).forEach(([prop, value2]) => setStyle(element, prop, value2));\n } else {\n const key = camelize(styleName);\n element.style[key] = value;\n }\n};\nconst removeStyle = (element, style) => {\n if (!element || !style)\n return;\n if (isObject(style)) {\n keysOf(style).forEach((prop) => removeStyle(element, prop));\n } else {\n setStyle(element, style, \"\");\n }\n};\nfunction addUnit(value, defaultUnit = \"px\") {\n if (!value)\n return \"\";\n if (isNumber(value) || isStringNumber(value)) {\n return `${value}${defaultUnit}`;\n } else if (isString(value)) {\n return value;\n }\n debugWarn(SCOPE, \"binding value must be a string or number\");\n}\n\nexport { addClass, addUnit, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle };\n//# sourceMappingURL=style.mjs.map\n","<script lang=\"ts\" setup>\nimport type { Field } from '@formily/core'\nimport type {\n FormItemContext,\n FormItemValidateState,\n FormValidationResult,\n TooltipInstance,\n} from 'element-plus'\nimport type { ICalculatedFormLayoutProps } from 'src/form-layout/types'\nimport type { CSSProperties } from 'vue'\nimport type { IFormItemProps } from './types'\nimport { CircleCheck, CircleClose, InfoFilled, Warning } from '@element-plus/icons-vue'\nimport { isArr, isValid } from '@formily/shared'\nimport { useField } from '@formily/vue'\nimport { ElIcon, ElTooltip, formItemContextKey, useFormSize, useId, useNamespace } from 'element-plus'\nimport { addUnit } from 'element-plus/es/utils/index'\nimport { pick } from 'lodash-es'\nimport { computed, isVNode, provide, reactive, ref, useSlots, watch } from 'vue'\nimport { stylePrefix, useResizeObserver } from '../__builtins__'\nimport { FORM_LAYOUT_PROPS_KEYS, formLayoutShallowContext, useFormLayout } from '../form-layout/utils'\n\ndefineOptions({\n name: 'FFormItem',\n})\nconst props = defineProps({\n label: null,\n for: null,\n tooltip: null,\n addonBefore: null,\n addonAfter: null,\n extra: null,\n feedbackText: null,\n feedbackStatus: null,\n asterisk: { type: Boolean },\n colon: { type: Boolean, default: true },\n labelAlign: null,\n wrapperAlign: null,\n labelWrap: { type: Boolean },\n labelWidth: null,\n wrapperWidth: null,\n wrapperWrap: { type: Boolean },\n labelCol: null,\n wrapperCol: null,\n fullness: { type: Boolean, default: false },\n size: null,\n layout: null,\n feedbackLayout: { default: 'loose' },\n tooltipLayout: null\n})\nconst slots = useSlots()\nconst ns = useNamespace('form-item')\nconst prefixCls = `${stylePrefix}-form-item`\nconst formItemConfig: Partial<ICalculatedFormLayoutProps> = Object.fromEntries(\n Object.entries(pick(props, FORM_LAYOUT_PROPS_KEYS))\n .filter(([_, value]) => isValid(value)),\n)\nconst formlayoutConfig = useFormLayout()\nconst formlayout = computed(() => Object.assign({}, formlayoutConfig.value, formItemConfig))\n\nconst field = useField<Field>()\n\nconst _size = useFormSize(undefined, { formItem: false })\n\nconst labelId = useId().value\nconst inputIds = ref<string[]>([])\n\nconst validateState = ref<FormItemValidateState>('')\nconst formItemRef = ref<HTMLDivElement>()\nconst labelRef = ref<HTMLElement>()\nconst feedbackTooltipRef = ref<TooltipInstance>()\ndefineExpose({\n feedbackTooltipRef,\n})\n\nconst labelPosition = computed(\n () => {\n if (formlayout.value.layout === 'vertical' || (isArr(formlayout.value.layout) && formlayout.value.layout.includes('vertical' as any))) {\n return 'top'\n }\n return formlayout.value.labelAlign\n },\n)\n\nconst labelStyle = computed<CSSProperties>(() => {\n if (labelPosition.value === 'top') {\n return {}\n }\n\n const labelWidth = addUnit(formlayout.value.labelWidth || '')\n if (labelWidth)\n return { width: labelWidth }\n return {}\n})\n\nconst contentStyle = computed<CSSProperties>(() => {\n const contentWidth = addUnit(formlayout.value?.wrapperWidth || '')\n if (contentWidth)\n return { width: contentWidth, flex: 'unset' }\n return {}\n})\n\nconst contentWrapperStyle = computed<CSSProperties>(() => {\n return {\n justifyContent: formlayout.value?.wrapperAlign === 'right' && 'flex-end',\n }\n})\n\nconst isRequired = computed(() =>\n props.asterisk && field.value?.pattern !== 'readPretty',\n)\n\nconst formItemClasses = computed(() => [\n ns.b(),\n // eslint-disable-next-line unicorn/explicit-length-check\n ns.m(props.size || _size.value || 'default'),\n ns.is(props.feedbackStatus),\n ns.is('validating', validateState.value === 'validating'),\n ns.is('success', validateState.value === 'success'),\n ns.is('required', isRequired.value || props.asterisk),\n ns.is('no-asterisk', formlayout.value?.hideRequiredAsterisk),\n ns.is(formlayout.value.feedbackLayout),\n formlayout.value?.requireAsteriskPosition === 'right'\n ? 'asterisk-right'\n : 'asterisk-left',\n {\n [ns.m('feedback')]: formlayout.value?.statusIcon,\n [ns.m(`label-${labelPosition.value}`)]: labelPosition.value,\n },\n])\n\nconst validateClasses = computed(() => [\n `${prefixCls}-feedback`,\n ns.is(props.feedbackStatus),\n ns.is('loose', props.feedbackLayout === 'loose'),\n])\n\nconst hasLabel = computed<boolean>(() => {\n return (props.label !== '' && isValid(props.label)) || isValid(slots.label)\n})\n\nconst labelFor = computed<string | undefined>(() => {\n return (\n props.for || (inputIds.value.length === 1 ? inputIds.value[0] : undefined)\n )\n})\n\nconst isGroup = computed<boolean>(() => {\n return !labelFor.value && hasLabel.value\n})\n\nasync function validate(): FormValidationResult {\n return true\n}\n/* istanbul ignore next -- @preserve */\nconst clearValidate: FormItemContext['clearValidate'] = () => {}\n/* istanbul ignore next -- @preserve */\nconst resetField: FormItemContext['resetField'] = async () => {}\n\nconst addInputId: FormItemContext['addInputId'] = (id: string) => {\n /* istanbul ignore else -- @preserve */\n if (!inputIds.value.includes(id)) {\n inputIds.value.push(id)\n }\n}\n\nconst removeInputId: FormItemContext['removeInputId'] = (id: string) => {\n inputIds.value = inputIds.value.filter(listId => listId !== id)\n}\n\nconst isEllipsisActive = ref(false)\nuseResizeObserver(labelRef, () => {\n isEllipsisActive.value = labelRef.value?.scrollWidth > labelRef.value?.clientWidth\n})\nconst isEllipsis = computed(() => {\n return isEllipsisActive.value && !formlayout.value.labelWrap\n})\n\n// HACK computed无法监听到props.feedbackStatus的变化\nconst _validateState = ref<FormItemValidateState>('')\nconst context: FormItemContext = reactive({\n $el: formItemRef,\n labelWidth: formlayout.value?.labelWidth,\n size: _size,\n validateState: _validateState.value,\n labelId,\n inputIds,\n isGroup,\n hasLabel,\n addInputId,\n removeInputId,\n resetField,\n clearValidate,\n validate,\n labelPosition,\n inlineMessage: true,\n showMessage: true,\n fieldValue: field.value?.value,\n validateMessage: '',\n propString: '',\n})\nwatch(() => props.feedbackStatus, (val) => {\n if (val === 'pending') {\n context.validateState = 'validating'\n return\n }\n if (val === 'warning') {\n context.validateState = ''\n return\n }\n context.validateState = val\n}, {\n immediate: true,\n})\n\nprovide(formLayoutShallowContext, ref({\n ...(isValid(props.size) && { size: props.size }),\n ...(isValid(props.colon) && { colon: props.colon }),\n}))\nprovide(formItemContextKey, context)\n</script>\n\n<template>\n <div\n ref=\"formItemRef\" :class=\"[prefixCls, formlayout.labelWrap && 'is-warp', ...formItemClasses]\"\n :role=\"isGroup ? 'group' : undefined\" :aria-labelledby=\"isGroup ? labelId : undefined\"\n >\n <component\n :is=\"labelFor ? 'label' : 'div'\" v-if=\"hasLabel\" :id=\"labelId\" :for=\"labelFor\"\n :class=\"[ns.e('label'), isValid(formlayout.labelCol) && `${prefixCls}-col-${formlayout.labelCol}`]\"\n :style=\"labelStyle\"\n >\n <!-- label -->\n <template v-if=\"isVNode(props.label)\">\n <component :is=\"props.label\" />\n </template>\n <div v-else :class=\"`${prefixCls}-label__wrapper`\">\n <ElTooltip :disabled=\"!isEllipsis && formlayout.tooltipLayout !== 'text'\">\n <span\n :class=\"{\n [`${prefixCls}-label-content`]: true,\n ['is-tooltip']: isEllipsis || (props.tooltip && formlayout.tooltipLayout === 'text'),\n }\"\n >\n <span ref=\"labelRef\">{{ props.label }}</span>\n </span>\n <template #content>\n <template v-if=\"isVNode(props.tooltip)\">\n <component :is=\"props.tooltip\" />\n </template>\n <div v-else :style=\"`width: ${labelRef?.clientWidth ?? 0}px;`\">\n <template v-if=\"isEllipsis\">\n {{ props.label }}\n </template>\n <template v-if=\"formlayout.tooltipLayout === 'text'\">\n {{ props.tooltip }}\n </template>\n </div>\n </template>\n </ElTooltip>\n <ElTooltip v-if=\"props.tooltip && formlayout.tooltipLayout !== 'text'\" :content=\"props.tooltip\">\n <ElIcon :class=\"`${prefixCls}-label-tooltip`\">\n <InfoFilled />\n </ElIcon>\n </ElTooltip>\n <span v-if=\"props.colon\" :class=\"`${prefixCls}-colon`\">:</span>\n </div>\n </component>\n <!-- content -->\n <div\n :class=\"[\n `${prefixCls}-content__wrapper`,\n isValid(formlayout.wrapperCol) && `${prefixCls}-col-${formlayout.wrapperCol}`,\n ]\"\n :style=\"contentWrapperStyle\"\n >\n <template v-if=\"isValid(props.addonBefore)\">\n <template v-if=\"isVNode(props.addonBefore)\">\n <component :is=\"props.addonBefore\" />\n </template>\n <div v-else :class=\"`${prefixCls}-addon-before`\">\n {{ props.addonBefore }}\n </div>\n </template>\n <div\n :class=\"[\n ns.e('content'),\n formlayout.fullness && 'is-fullness',\n ns.is('addon-after', !!props.addonAfter),\n ]\" :style=\"contentStyle\"\n >\n <ElTooltip\n v-if=\"props.feedbackLayout === 'popover'\"\n ref=\"feedbackTooltipRef\"\n :visible=\"!!props.feedbackText\"\n effect=\"light\"\n :offset=\"6\"\n >\n <template #default>\n <slot />\n </template>\n <template #content>\n <div :class=\"[...validateClasses, ns.is('tooltip')]\">\n <ElIcon>\n <CircleClose v-if=\"props.feedbackStatus === 'error'\" />\n <CircleCheck v-if=\"props.feedbackStatus === 'success'\" />\n <Warning v-if=\"props.feedbackStatus === 'warning'\" />\n </ElIcon>\n {{ props.feedbackText }}\n </div>\n </template>\n </ElTooltip>\n <slot v-else />\n <TransitionGroup :name=\"`${ns.namespace.value}-zoom-in-top`\">\n <div v-if=\"props.feedbackText && props.feedbackLayout !== 'popover'\" :class=\"validateClasses\">\n {{ props.feedbackText }}\n </div>\n <template v-if=\"isValid(props.extra)\">\n <template v-if=\"isVNode(props.extra)\">\n <component :is=\"props.extra\" />\n </template>\n <div v-else :class=\"`${prefixCls}-extra`\">\n {{ props.extra }}\n </div>\n </template>\n </TransitionGroup>\n </div>\n <template v-if=\"isValid(props.addonAfter)\">\n <template v-if=\"isVNode(props.addonAfter)\">\n <component :is=\"props.addonAfter\" />\n </template>\n <div v-else :class=\"`${prefixCls}-addon-after`\">\n {{ props.addonAfter }}\n </div>\n </template>\n </div>\n </div>\n</template>\n","import { isVoidField } from '@formily/core'\nimport { connect, mapProps } from '@formily/vue'\nimport { composeExport } from '../__builtins__'\nimport FormBaseItem from './form-item.vue'\nimport { determineFeedbackStatus, getFeedbackMessage } from './utils'\nimport './style.scss'\n\nexport function fieldFeedbackMapper(props, field) {\n if (isVoidField(field) || !field) {\n return props\n }\n\n const feedbackText = getFeedbackMessage(field)\n const feedbackStatus = determineFeedbackStatus(field)\n const asterisk = 'asterisk' in props\n ? props.asterisk\n : field.required && field.pattern !== 'readPretty'\n\n return {\n ...props,\n feedbackText,\n feedbackStatus,\n asterisk,\n }\n}\n\nconst Item = connect(\n FormBaseItem,\n mapProps(\n {\n validateStatus: true,\n title: 'label',\n required: true,\n description: 'extra',\n },\n fieldFeedbackMapper,\n ),\n)\n\nexport const FormItem = composeExport(Item, {\n BaseItem: FormBaseItem,\n})\n\nexport default FormItem\n\nexport { default as FormBaseItem } from './form-item.vue'\n"],"names":["SCOPE","addUnit","value","defaultUnit","isNumber","isStringNumber","isString","debugWarn","props","__props","slots","useSlots","ns","useNamespace","prefixCls","stylePrefix","formItemConfig","pick","FORM_LAYOUT_PROPS_KEYS","_","isValid","formlayoutConfig","useFormLayout","formlayout","computed","field","useField","_size","useFormSize","labelId","useId","inputIds","ref","validateState","formItemRef","labelRef","feedbackTooltipRef","__expose","labelPosition","isArr","labelStyle","labelWidth","contentStyle","contentWidth","_a","contentWrapperStyle","isRequired","formItemClasses","_b","_c","validateClasses","hasLabel","labelFor","isGroup","validate","clearValidate","resetField","addInputId","id","removeInputId","listId","isEllipsisActive","useResizeObserver","isEllipsis","_validateState","context","reactive","watch","val","provide","formLayoutShallowContext","formItemContextKey","_createElementBlock","_unref","_openBlock","_createBlock","_resolveDynamicComponent","_normalizeClass","isVNode","_createVNode","ElTooltip","_normalizeStyle","_Fragment","_createTextVNode","_toDisplayString","_createElementVNode","ElIcon","InfoFilled","_renderSlot","_ctx","CircleClose","CircleCheck","Warning","_TransitionGroup","fieldFeedbackMapper","isVoidField","feedbackText","getFeedbackMessage","feedbackStatus","determineFeedbackStatus","asterisk","Item","connect","FormBaseItem","mapProps","FormItem","composeExport"],"mappings":";;;;;;;;;;;;;;;;AAMA,MAAMA,KAAQ;AAuDd,SAASC,EAAQC,GAAOC,IAAc,MAAM;AAC1C,MAAI,CAACD;AACH,WAAO;AACT,MAAIE,GAASF,CAAK,KAAKG,GAAeH,CAAK;AACzC,WAAO,GAAGA,CAAK,GAAGC,CAAW;AACxB,MAAIG,GAASJ,CAAK;AACvB,WAAOA;AAET,EAAAK,GAAUP,IAAO,0CAA0C;AAC7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC9CA,UAAMQ,IAAQC,GAyBRC,IAAQC,GAAA,GACRC,IAAKC,GAAa,WAAW,GAC7BC,IAAY,GAAGC,EAAW,cAC1BC,IAAsD,OAAO;AAAA,MACjE,OAAO,QAAQC,GAAKT,GAAOU,EAAsB,CAAC,EAC/C,OAAO,CAAC,CAACC,GAAGjB,CAAK,MAAMkB,EAAQlB,CAAK,CAAC;AAAA,IAAA,GAEpCmB,IAAmBC,GAAA,GACnBC,IAAaC,EAAS,MAAM,OAAO,OAAO,CAAA,GAAIH,EAAiB,OAAOL,CAAc,CAAC,GAErFS,IAAQC,GAAA,GAERC,IAAQC,GAAY,QAAW,EAAE,UAAU,IA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GAAmBxE,CAAK,GACvCyE,IAAiBC,GAAwB1E,CAAK,GAC9C2E,IAAW,cAAc5F,IAC3BA,EAAM,WACNiB,EAAM,YAAYA,EAAM,YAAY;AAExC,SAAO;AAAA,IACL,GAAGjB;AAAA,IACH,cAAAwF;AAAA,IACA,gBAAAE;AAAA,IACA,UAAAE;AAAA,EAAA;AAEJ;AAEA,MAAMC,KAAOC;AAAA,EACXC;AAAAA,EACAC;AAAA,IACE;AAAA,MACE,gBAAgB;AAAA,MAChB,OAAO;AAAA,MACP,UAAU;AAAA,MACV,aAAa;AAAA,IAAA;AAAA,IAEfV;AAAA,EAAA;AAEJ,GAEaW,KAAWC,GAAcL,IAAM;AAAA,EAC1C,UAAUE;AACZ,CAAC;","x_google_ignoreList":[0]}
|
package/esm/form-item/types.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export interface IFormItemProps {
|
|
2
|
-
label?: string;
|
|
3
|
-
for?: string;
|
|
4
|
-
tooltip?: string;
|
|
5
|
-
addonBefore?: string;
|
|
6
|
-
addonAfter?: string;
|
|
7
|
-
extra?: string;
|
|
8
|
-
feedbackText?: string;
|
|
9
|
-
feedbackStatus?: 'error' | 'warning' | 'success' | 'pending';
|
|
10
|
-
asterisk?: boolean;
|
|
11
|
-
colon?: boolean;
|
|
12
|
-
labelAlign?: 'right' | 'left';
|
|
13
|
-
wrapperAlign?: 'right' | 'left';
|
|
14
|
-
labelWrap?: boolean;
|
|
15
|
-
labelWidth?: number;
|
|
16
|
-
wrapperWidth?: number;
|
|
17
|
-
wrapperWrap?: boolean;
|
|
18
|
-
labelCol?: number;
|
|
19
|
-
wrapperCol?: number;
|
|
20
|
-
fullness?: boolean;
|
|
21
|
-
size?: 'small' | 'default' | 'large';
|
|
22
|
-
layout?: 'vertical' | 'horizontal' | 'inline' | ('vertical' | 'horizontal' | 'inline')[];
|
|
23
|
-
feedbackLayout?: 'loose' | 'terse' | 'popover';
|
|
24
|
-
tooltipLayout?: 'icon' | 'text';
|
|
25
|
-
}
|
package/esm/form-item/types.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/esm/form-item/utils.d.ts
DELETED