@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-item/utils.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { isArr as r } from "@formily/shared";
|
|
2
|
-
function a(s) {
|
|
3
|
-
const e = {
|
|
4
|
-
errors: s.selfErrors.join(", "),
|
|
5
|
-
warnings: s.selfWarnings.join(", "),
|
|
6
|
-
successes: s.selfSuccesses.join(", ")
|
|
7
|
-
};
|
|
8
|
-
return e.errors || e.warnings || e.successes;
|
|
9
|
-
}
|
|
10
|
-
function n(s) {
|
|
11
|
-
var e;
|
|
12
|
-
return r(s.decorator) ? ((e = s.decorator[1]) == null ? void 0 : e.feedbackStatus) ?? s.validateStatus : s.validateStatus;
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
n as determineFeedbackStatus,
|
|
16
|
-
a as getFeedbackMessage
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=utils.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","sources":["../../src/form-item/utils.ts"],"sourcesContent":["import type { Field } from '@formily/core'\nimport { isArr } from '@formily/shared'\n\nexport function getFeedbackMessage(field: Field) {\n const messages = {\n errors: field.selfErrors.join(', '),\n warnings: field.selfWarnings.join(', '),\n successes: field.selfSuccesses.join(', '),\n }\n\n return messages.errors || messages.warnings || messages.successes\n}\n\nexport function determineFeedbackStatus(field: Field) {\n return isArr(field.decorator)\n ? (field.decorator[1]?.feedbackStatus ?? field.validateStatus)\n : field.validateStatus\n}\n"],"names":["getFeedbackMessage","field","messages","determineFeedbackStatus","isArr","_a"],"mappings":";AAGO,SAASA,EAAmBC,GAAc;AAC/C,QAAMC,IAAW;AAAA,IACf,QAAQD,EAAM,WAAW,KAAK,IAAI;AAAA,IAClC,UAAUA,EAAM,aAAa,KAAK,IAAI;AAAA,IACtC,WAAWA,EAAM,cAAc,KAAK,IAAI;AAAA,EAAA;AAG1C,SAAOC,EAAS,UAAUA,EAAS,YAAYA,EAAS;AAC1D;AAEO,SAASC,EAAwBF,GAAc;;AACpD,SAAOG,EAAMH,EAAM,SAAS,MACvBI,IAAAJ,EAAM,UAAU,CAAC,MAAjB,gBAAAI,EAAoB,mBAAkBJ,EAAM,iBAC7CA,EAAM;AACZ;"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { IFormLayoutProps } from './types';
|
|
2
|
-
declare function __VLS_template(): {
|
|
3
|
-
attrs: Partial<{}>;
|
|
4
|
-
slots: {
|
|
5
|
-
default?(_: {}): any;
|
|
6
|
-
};
|
|
7
|
-
refs: {
|
|
8
|
-
rootHTMLRef: unknown;
|
|
9
|
-
};
|
|
10
|
-
rootEl: any;
|
|
11
|
-
};
|
|
12
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
-
declare const __VLS_component: import('vue').DefineComponent<IFormLayoutProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IFormLayoutProps> & Readonly<{}>, {
|
|
14
|
-
size: "small" | "default" | "large";
|
|
15
|
-
tag: string;
|
|
16
|
-
layout: "vertical" | "horizontal" | "inline" | ("vertical" | "horizontal" | "inline")[];
|
|
17
|
-
colon: boolean;
|
|
18
|
-
labelWrap: boolean;
|
|
19
|
-
wrapperWrap: boolean;
|
|
20
|
-
fullness: boolean;
|
|
21
|
-
shallow: boolean;
|
|
22
|
-
statusIcon: boolean;
|
|
23
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
24
|
-
rootHTMLRef: unknown;
|
|
25
|
-
}, any>;
|
|
26
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
27
|
-
export default _default;
|
|
28
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
29
|
-
new (): {
|
|
30
|
-
$slots: S;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { defineComponent as C, ref as l, provide as s, watch as v, createBlock as A, openBlock as B, resolveDynamicComponent as P, mergeProps as b, unref as a, withModifiers as x, withCtx as F, renderSlot as R } from "vue";
|
|
2
|
-
import { isValid as d, isEmpty as _ } from "@formily/shared";
|
|
3
|
-
import { useForm as g } from "@formily/vue";
|
|
4
|
-
import { formContextKey as q } from "element-plus";
|
|
5
|
-
import { stylePrefix as z } from "../__builtins__/configs/index.mjs";
|
|
6
|
-
import { useThrottleFn as D } from "../__builtins__/shared/hooks.mjs";
|
|
7
|
-
import "@formily/reactive";
|
|
8
|
-
import "@formily/core";
|
|
9
|
-
import "@formily/reactive-vue";
|
|
10
|
-
import { useCleanAttrs as W } from "../__builtins__/shared/utils.mjs";
|
|
11
|
-
import { useFormDeepLayout as I, useResponsiveFormLayout as M, filterValidFormLayoutProps as o, formLayoutDeepContext as S, formLayoutShallowContext as T } from "./utils.mjs";
|
|
12
|
-
const U = /* @__PURE__ */ C({
|
|
13
|
-
name: "FFormLayout",
|
|
14
|
-
inheritAttrs: !1,
|
|
15
|
-
__name: "form-layout",
|
|
16
|
-
props: {
|
|
17
|
-
tag: { default: "form" },
|
|
18
|
-
colon: { type: Boolean, default: !0 },
|
|
19
|
-
labelAlign: null,
|
|
20
|
-
wrapperAlign: null,
|
|
21
|
-
labelWrap: { type: Boolean, default: !0 },
|
|
22
|
-
labelWidth: null,
|
|
23
|
-
wrapperWidth: null,
|
|
24
|
-
wrapperWrap: { type: Boolean, default: !1 },
|
|
25
|
-
labelCol: null,
|
|
26
|
-
wrapperCol: null,
|
|
27
|
-
fullness: { type: Boolean, default: !1 },
|
|
28
|
-
size: { default: "default" },
|
|
29
|
-
layout: { default: "horizontal" },
|
|
30
|
-
feedbackLayout: null,
|
|
31
|
-
tooltipLayout: null,
|
|
32
|
-
breakpoints: null,
|
|
33
|
-
shallow: { type: Boolean, default: !0 },
|
|
34
|
-
hideRequiredAsterisk: { type: Boolean },
|
|
35
|
-
statusIcon: { type: Boolean, default: !0 },
|
|
36
|
-
requireAsteriskPosition: null
|
|
37
|
-
},
|
|
38
|
-
setup(y) {
|
|
39
|
-
const e = y, c = `${z}-form`, { props: h } = W(), i = l(), L = I(), { props: t } = M(e, i), w = l({
|
|
40
|
-
...L.value,
|
|
41
|
-
...e.shallow ? {
|
|
42
|
-
...d(e.size) && { size: e.size },
|
|
43
|
-
...d(e.colon) && { colon: e.colon }
|
|
44
|
-
} : o(e)
|
|
45
|
-
});
|
|
46
|
-
s(S, w);
|
|
47
|
-
const n = l(e.shallow ? o(e) : {});
|
|
48
|
-
s(T, n);
|
|
49
|
-
const k = D(() => {
|
|
50
|
-
if (!_(t.value)) {
|
|
51
|
-
const r = o(t.value);
|
|
52
|
-
n.value = o({ ...e, ...r });
|
|
53
|
-
}
|
|
54
|
-
}, 200, !0);
|
|
55
|
-
v(() => [e, t], k, {
|
|
56
|
-
deep: !0,
|
|
57
|
-
immediate: !0
|
|
58
|
-
}), s(q, {
|
|
59
|
-
statusIcon: e.statusIcon,
|
|
60
|
-
hideRequiredAsterisk: e.hideRequiredAsterisk,
|
|
61
|
-
requireAsteriskPosition: e.requireAsteriskPosition
|
|
62
|
-
});
|
|
63
|
-
const u = g();
|
|
64
|
-
return (r, p) => {
|
|
65
|
-
var f, m;
|
|
66
|
-
return B(), A(P(e.tag), b({
|
|
67
|
-
id: ((f = a(u)) == null ? void 0 : f.id) && `formily-${(m = a(u)) == null ? void 0 : m.id}`,
|
|
68
|
-
ref_key: "rootHTMLRef",
|
|
69
|
-
ref: i,
|
|
70
|
-
class: c
|
|
71
|
-
}, a(h), {
|
|
72
|
-
onSubmit: p[0] || (p[0] = x(() => {
|
|
73
|
-
}, ["prevent", "stop"]))
|
|
74
|
-
}), {
|
|
75
|
-
default: F(() => [
|
|
76
|
-
R(r.$slots, "default")
|
|
77
|
-
]),
|
|
78
|
-
_: 3
|
|
79
|
-
}, 16, ["id"]);
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
export {
|
|
84
|
-
U as _
|
|
85
|
-
};
|
|
86
|
-
//# sourceMappingURL=form-layout.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-layout.mjs","sources":["../../src/form-layout/form-layout.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { FormContext } from 'element-plus'\nimport type { IFormLayoutProps } from './types'\nimport { isEmpty, isValid } from '@formily/shared'\nimport { useForm } from '@formily/vue'\nimport { formContextKey } from 'element-plus'\nimport { provide, ref, watch } from 'vue'\nimport { stylePrefix, useCleanAttrs, useThrottleFn } from '../__builtins__'\nimport { filterValidFormLayoutProps, formLayoutDeepContext, formLayoutShallowContext, useFormDeepLayout, useResponsiveFormLayout } from './utils'\n\ndefineOptions({\n name: 'FFormLayout',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n tag: { default: 'form' },\n colon: { type: Boolean, default: true },\n labelAlign: null,\n wrapperAlign: null,\n labelWrap: { type: Boolean, default: true },\n labelWidth: null,\n wrapperWidth: null,\n wrapperWrap: { type: Boolean, default: false },\n labelCol: null,\n wrapperCol: null,\n fullness: { type: Boolean, default: false },\n size: { default: 'default' },\n layout: { default: 'horizontal' },\n feedbackLayout: null,\n tooltipLayout: null,\n breakpoints: null,\n shallow: { type: Boolean, default: true },\n hideRequiredAsterisk: { type: Boolean },\n statusIcon: { type: Boolean, default: true },\n requireAsteriskPosition: null\n})\nconst formPrefixCls = `${stylePrefix}-form`\nconst { props: attrs } = useCleanAttrs()\nconst rootHTMLRef = ref<HTMLElement>()\n\nconst formLayoutDeepConfig = useFormDeepLayout()\nconst { props: responsiveProps } = useResponsiveFormLayout(props, rootHTMLRef)\n\nconst deepLayout = ref({\n ...formLayoutDeepConfig.value,\n ...(props.shallow\n ? {\n ...(isValid(props.size) && { size: props.size }),\n ...(isValid(props.colon) && { colon: props.colon }),\n }\n : filterValidFormLayoutProps(props)),\n})\nprovide(formLayoutDeepContext, deepLayout)\n\nconst shallowLayout = ref(props.shallow ? filterValidFormLayoutProps(props) : {})\nprovide(formLayoutShallowContext, shallowLayout)\n\nconst updateLayout = useThrottleFn(() => {\n if (!isEmpty(responsiveProps.value)) {\n const _responsiveProps = filterValidFormLayoutProps(responsiveProps.value)\n shallowLayout.value = filterValidFormLayoutProps({ ...props, ..._responsiveProps })\n }\n}, 200, true)\n\nwatch(() => [props, responsiveProps], updateLayout, {\n deep: true,\n immediate: true,\n})\n\nprovide(formContextKey, {\n statusIcon: props.statusIcon,\n hideRequiredAsterisk: props.hideRequiredAsterisk,\n requireAsteriskPosition: props.requireAsteriskPosition,\n} as FormContext)\n\nconst formRef = useForm()\n</script>\n\n<template>\n <component\n :is=\"props.tag\"\n :id=\"formRef?.id && `formily-${formRef?.id}`\"\n ref=\"rootHTMLRef\"\n :class=\"formPrefixCls\"\n v-bind=\"attrs\"\n @submit.prevent.stop\n >\n <slot />\n </component>\n</template>\n"],"names":["props","__props","formPrefixCls","stylePrefix","attrs","useCleanAttrs","rootHTMLRef","ref","formLayoutDeepConfig","useFormDeepLayout","responsiveProps","useResponsiveFormLayout","deepLayout","isValid","filterValidFormLayoutProps","provide","formLayoutDeepContext","shallowLayout","formLayoutShallowContext","updateLayout","useThrottleFn","isEmpty","_responsiveProps","watch","formContextKey","formRef","useForm","_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_unref","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,UAAMA,IAAQC,GAsBRC,IAAgB,GAAGC,CAAW,SAC9B,EAAE,OAAOC,EAAA,IAAUC,EAAA,GACnBC,IAAcC,EAAA,GAEdC,IAAuBC,EAAA,GACvB,EAAE,OAAOC,EAAA,IAAoBC,EAAwBX,GAAOM,CAAW,GAEvEM,IAAaL,EAAI;AAAA,MACrB,GAAGC,EAAqB;AAAA,MACxB,GAAIR,EAAM,UACN;AAAA,QACE,GAAIa,EAAQb,EAAM,IAAI,KAAK,EAAE,MAAMA,EAAM,KAAA;AAAA,QACzC,GAAIa,EAAQb,EAAM,KAAK,KAAK,EAAE,OAAOA,EAAM,MAAA;AAAA,MAAM,IAEnDc,EAA2Bd,CAAK;AAAA,IAAA,CACrC;AACD,IAAAe,EAAQC,GAAuBJ,CAAU;AAEzC,UAAMK,IAAgBV,EAAIP,EAAM,UAAUc,EAA2Bd,CAAK,IAAI,EAAE;AAChF,IAAAe,EAAQG,GAA0BD,CAAa;AAE/C,UAAME,IAAeC,EAAc,MAAM;AACvC,UAAI,CAACC,EAAQX,EAAgB,KAAK,GAAG;AACnC,cAAMY,IAAmBR,EAA2BJ,EAAgB,KAAK;AACzE,QAAAO,EAAc,QAAQH,EAA2B,EAAE,GAAGd,GAAO,GAAGsB,GAAkB;AAAA,MACpF;AAAA,IACF,GAAG,KAAK,EAAI;AAEZ,IAAAC,EAAM,MAAM,CAACvB,GAAOU,CAAe,GAAGS,GAAc;AAAA,MAClD,MAAM;AAAA,MACN,WAAW;AAAA,IAAA,CACZ,GAEDJ,EAAQS,GAAgB;AAAA,MACtB,YAAYxB,EAAM;AAAA,MAClB,sBAAsBA,EAAM;AAAA,MAC5B,yBAAyBA,EAAM;AAAA,IAAA,CACjB;AAEhB,UAAMyB,IAAUC,EAAA;;;AAId,aAAAC,KAAAC,EASYC,EARL7B,EAAM,GAAG,GADhB8B,EASY;AAAA,QAPT,MAAIC,IAAAA,EAAAN,CAAA,MAAAM,gBAAAA,EAAS,OAAE,YAAeA,IAAAA,EAAAN,CAAA,MAAAM,gBAAAA,EAAS,EAAE;AAAA,iBACtC;AAAA,QAAJ,KAAIzB;AAAA,QACH,OAAOJ;AAAA,MAAA,GACA6B,EAAA3B,CAAA,GAAK;AAAA,QACZ,4BAAD,MAAA;AAAA,QAAA,GAAoB,CAAA,WAAA,MAAA,CAAA;AAAA,MAAA;mBAEpB,MAAQ;AAAA,UAAR4B,EAAQC,EAAA,QAAA,SAAA;AAAA,QAAA;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default, default as FormLayout } from './form-layout';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export interface IFormLayoutProps {
|
|
2
|
-
tag?: string;
|
|
3
|
-
colon?: boolean;
|
|
4
|
-
labelAlign?: 'right' | 'left' | ('right' | 'left')[];
|
|
5
|
-
wrapperAlign?: 'right' | 'left' | ('right' | 'left')[];
|
|
6
|
-
labelWrap?: boolean;
|
|
7
|
-
labelWidth?: number;
|
|
8
|
-
wrapperWidth?: number;
|
|
9
|
-
wrapperWrap?: boolean;
|
|
10
|
-
labelCol?: number | number[];
|
|
11
|
-
wrapperCol?: number | number[];
|
|
12
|
-
fullness?: boolean;
|
|
13
|
-
size?: 'small' | 'default' | 'large';
|
|
14
|
-
layout?: 'vertical' | 'horizontal' | 'inline' | ('vertical' | 'horizontal' | 'inline')[];
|
|
15
|
-
feedbackLayout?: 'loose' | 'terse' | 'popover';
|
|
16
|
-
tooltipLayout?: 'icon' | 'text';
|
|
17
|
-
breakpoints?: number[];
|
|
18
|
-
shallow?: boolean;
|
|
19
|
-
hideRequiredAsterisk?: boolean;
|
|
20
|
-
statusIcon?: boolean;
|
|
21
|
-
requireAsteriskPosition?: 'left' | 'right';
|
|
22
|
-
}
|
|
23
|
-
export interface ICalculatedFormLayoutProps {
|
|
24
|
-
colon?: boolean;
|
|
25
|
-
labelAlign?: 'right' | 'left';
|
|
26
|
-
wrapperAlign?: 'right' | 'left';
|
|
27
|
-
labelWrap?: boolean;
|
|
28
|
-
labelWidth?: number | string;
|
|
29
|
-
wrapperWidth?: number | string;
|
|
30
|
-
wrapperWrap?: boolean;
|
|
31
|
-
labelCol?: number;
|
|
32
|
-
wrapperCol?: number;
|
|
33
|
-
fullness?: boolean;
|
|
34
|
-
size?: 'small' | 'default' | 'large';
|
|
35
|
-
layout?: 'vertical' | 'horizontal' | 'inline';
|
|
36
|
-
feedbackLayout?: 'loose' | 'terse' | 'popover';
|
|
37
|
-
tooltipLayout?: 'icon' | 'text';
|
|
38
|
-
breakpoints?: number[];
|
|
39
|
-
shallow?: boolean;
|
|
40
|
-
hideRequiredAsterisk?: boolean;
|
|
41
|
-
statusIcon?: boolean;
|
|
42
|
-
requireAsteriskPosition?: 'left' | 'right';
|
|
43
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { InjectionKey, Ref } from 'vue';
|
|
2
|
-
import { IFormLayoutProps } from './types';
|
|
3
|
-
export declare function calcBreakpointIndex(breakpoints: number[], width: number): number;
|
|
4
|
-
export declare function calcFactor<T>(value: T | readonly T[], breakpointIndex: number): T;
|
|
5
|
-
export declare function factor<T>(value: T | T[], breakpointIndex: number): T;
|
|
6
|
-
export declare function calculateProps(target: Element, props: IFormLayoutProps): IFormLayoutProps;
|
|
7
|
-
export declare function useResponsiveFormLayout(props: IFormLayoutProps, root: Ref<HTMLElement | null>): {
|
|
8
|
-
props: Ref<{
|
|
9
|
-
tag?: string;
|
|
10
|
-
colon?: boolean;
|
|
11
|
-
labelAlign?: "right" | "left" | ("right" | "left")[];
|
|
12
|
-
wrapperAlign?: "right" | "left" | ("right" | "left")[];
|
|
13
|
-
labelWrap?: boolean;
|
|
14
|
-
labelWidth?: number;
|
|
15
|
-
wrapperWidth?: number;
|
|
16
|
-
wrapperWrap?: boolean;
|
|
17
|
-
labelCol?: number | number[];
|
|
18
|
-
wrapperCol?: number | number[];
|
|
19
|
-
fullness?: boolean;
|
|
20
|
-
size?: "small" | "default" | "large";
|
|
21
|
-
layout?: "vertical" | "horizontal" | "inline" | ("vertical" | "horizontal" | "inline")[];
|
|
22
|
-
feedbackLayout?: "loose" | "terse" | "popover";
|
|
23
|
-
tooltipLayout?: "icon" | "text";
|
|
24
|
-
breakpoints?: number[];
|
|
25
|
-
shallow?: boolean;
|
|
26
|
-
hideRequiredAsterisk?: boolean;
|
|
27
|
-
statusIcon?: boolean;
|
|
28
|
-
requireAsteriskPosition?: "left" | "right";
|
|
29
|
-
}, IFormLayoutProps | {
|
|
30
|
-
tag?: string;
|
|
31
|
-
colon?: boolean;
|
|
32
|
-
labelAlign?: "right" | "left" | ("right" | "left")[];
|
|
33
|
-
wrapperAlign?: "right" | "left" | ("right" | "left")[];
|
|
34
|
-
labelWrap?: boolean;
|
|
35
|
-
labelWidth?: number;
|
|
36
|
-
wrapperWidth?: number;
|
|
37
|
-
wrapperWrap?: boolean;
|
|
38
|
-
labelCol?: number | number[];
|
|
39
|
-
wrapperCol?: number | number[];
|
|
40
|
-
fullness?: boolean;
|
|
41
|
-
size?: "small" | "default" | "large";
|
|
42
|
-
layout?: "vertical" | "horizontal" | "inline" | ("vertical" | "horizontal" | "inline")[];
|
|
43
|
-
feedbackLayout?: "loose" | "terse" | "popover";
|
|
44
|
-
tooltipLayout?: "icon" | "text";
|
|
45
|
-
breakpoints?: number[];
|
|
46
|
-
shallow?: boolean;
|
|
47
|
-
hideRequiredAsterisk?: boolean;
|
|
48
|
-
statusIcon?: boolean;
|
|
49
|
-
requireAsteriskPosition?: "left" | "right";
|
|
50
|
-
}>;
|
|
51
|
-
};
|
|
52
|
-
export declare const formLayoutDeepContext: InjectionKey<Ref<IFormLayoutProps>>;
|
|
53
|
-
export declare const formLayoutShallowContext: InjectionKey<Ref<IFormLayoutProps>>;
|
|
54
|
-
export declare function useFormDeepLayout(): Ref<IFormLayoutProps>;
|
|
55
|
-
export declare function useFormLayout(): Ref<IFormLayoutProps>;
|
|
56
|
-
export declare const FORM_LAYOUT_PROPS_KEYS: ReadonlyArray<keyof IFormLayoutProps>;
|
|
57
|
-
export declare function filterValidFormLayoutProps(props: IFormLayoutProps): IFormLayoutProps;
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { isArr as L, isValid as u } from "@formily/shared";
|
|
2
|
-
import { inject as l, ref as i, computed as d } from "vue";
|
|
3
|
-
import { useResizeObserver as h } from "../__builtins__/shared/hooks.mjs";
|
|
4
|
-
import "element-plus";
|
|
5
|
-
import "@formily/reactive";
|
|
6
|
-
import "@formily/core";
|
|
7
|
-
import "@formily/reactive-vue";
|
|
8
|
-
import "@formily/vue";
|
|
9
|
-
function w(t, o) {
|
|
10
|
-
for (const [r, e] of t.entries())
|
|
11
|
-
if (o <= e)
|
|
12
|
-
return r;
|
|
13
|
-
return -1;
|
|
14
|
-
}
|
|
15
|
-
function A(t, o) {
|
|
16
|
-
if (!Array.isArray(t) || t.length === 0)
|
|
17
|
-
return t;
|
|
18
|
-
const r = Math.max(-1, Math.min(o, t.length - 1));
|
|
19
|
-
return t.at(r);
|
|
20
|
-
}
|
|
21
|
-
function a(t, o) {
|
|
22
|
-
return u(t) ? A(t, o) : t;
|
|
23
|
-
}
|
|
24
|
-
function C(t, o) {
|
|
25
|
-
const { clientWidth: r } = t, {
|
|
26
|
-
breakpoints: e,
|
|
27
|
-
layout: s,
|
|
28
|
-
labelAlign: c,
|
|
29
|
-
wrapperAlign: f,
|
|
30
|
-
labelCol: m,
|
|
31
|
-
wrapperCol: y,
|
|
32
|
-
...b
|
|
33
|
-
} = o, n = w(
|
|
34
|
-
e,
|
|
35
|
-
r
|
|
36
|
-
);
|
|
37
|
-
return {
|
|
38
|
-
layout: a(s, n),
|
|
39
|
-
labelAlign: a(c, n),
|
|
40
|
-
wrapperAlign: a(f, n),
|
|
41
|
-
labelCol: a(m, n),
|
|
42
|
-
wrapperCol: a(y, n),
|
|
43
|
-
...b
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function I(t, o) {
|
|
47
|
-
const { breakpoints: r } = t;
|
|
48
|
-
if (!L(r))
|
|
49
|
-
return {
|
|
50
|
-
props: i(t)
|
|
51
|
-
};
|
|
52
|
-
const e = i({});
|
|
53
|
-
return h(o, () => {
|
|
54
|
-
e.value = C(o.value, t);
|
|
55
|
-
}), {
|
|
56
|
-
props: e
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
const p = Symbol(
|
|
60
|
-
"formLayoutDeepContext"
|
|
61
|
-
), x = Symbol("formLayoutShallowContext");
|
|
62
|
-
function _() {
|
|
63
|
-
return l(p, i({}));
|
|
64
|
-
}
|
|
65
|
-
function j() {
|
|
66
|
-
const t = l(x, i({})), o = l(p, i({}));
|
|
67
|
-
return d(() => ({
|
|
68
|
-
...o.value,
|
|
69
|
-
...t.value
|
|
70
|
-
}));
|
|
71
|
-
}
|
|
72
|
-
const D = [
|
|
73
|
-
"colon",
|
|
74
|
-
"labelAlign",
|
|
75
|
-
"wrapperAlign",
|
|
76
|
-
"labelWrap",
|
|
77
|
-
"labelWidth",
|
|
78
|
-
"wrapperWidth",
|
|
79
|
-
"wrapperWrap",
|
|
80
|
-
"labelCol",
|
|
81
|
-
"wrapperCol",
|
|
82
|
-
"fullness",
|
|
83
|
-
"size",
|
|
84
|
-
"layout",
|
|
85
|
-
"feedbackLayout",
|
|
86
|
-
"tooltipLayout",
|
|
87
|
-
"breakpoints",
|
|
88
|
-
"hideRequiredAsterisk",
|
|
89
|
-
"statusIcon"
|
|
90
|
-
];
|
|
91
|
-
function M(t) {
|
|
92
|
-
return Object.fromEntries(
|
|
93
|
-
Object.entries(t).filter(([o, r]) => u(r))
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
export {
|
|
97
|
-
D as FORM_LAYOUT_PROPS_KEYS,
|
|
98
|
-
w as calcBreakpointIndex,
|
|
99
|
-
A as calcFactor,
|
|
100
|
-
C as calculateProps,
|
|
101
|
-
a as factor,
|
|
102
|
-
M as filterValidFormLayoutProps,
|
|
103
|
-
p as formLayoutDeepContext,
|
|
104
|
-
x as formLayoutShallowContext,
|
|
105
|
-
_ as useFormDeepLayout,
|
|
106
|
-
j as useFormLayout,
|
|
107
|
-
I as useResponsiveFormLayout
|
|
108
|
-
};
|
|
109
|
-
//# sourceMappingURL=utils.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","sources":["../../src/form-layout/utils.ts"],"sourcesContent":["import type { InjectionKey, Ref } from 'vue'\nimport type { IFormLayoutProps } from './types'\nimport { isArr, isValid } from '@formily/shared'\nimport { computed, inject, ref } from 'vue'\nimport { useResizeObserver } from '../__builtins__'\n\nexport function calcBreakpointIndex(breakpoints: number[], width: number): number {\n for (const [i, breakpoint] of breakpoints.entries()) {\n if (width <= breakpoint) {\n return i\n }\n }\n return -1\n}\n\nexport function calcFactor<T>(value: T | readonly T[], breakpointIndex: number): T {\n if (!Array.isArray(value) || value.length === 0) {\n return value as T\n }\n const safeIndex = Math.max(-1, Math.min(breakpointIndex, value.length - 1))\n return value.at(safeIndex)\n}\n\nexport function factor<T>(value: T | T[], breakpointIndex: number): T {\n return isValid(value) ? calcFactor<T>(value, breakpointIndex) : value as T\n}\n\nexport function calculateProps(target: Element, props: IFormLayoutProps): IFormLayoutProps {\n const { clientWidth } = target\n const {\n breakpoints,\n layout,\n labelAlign,\n wrapperAlign,\n labelCol,\n wrapperCol,\n ...otherProps\n } = props\n const breakpointIndex = calcBreakpointIndex(\n breakpoints as number[],\n clientWidth,\n )\n\n return {\n layout: factor(layout, breakpointIndex),\n labelAlign: factor(labelAlign, breakpointIndex),\n wrapperAlign: factor(wrapperAlign, breakpointIndex),\n labelCol: factor(labelCol, breakpointIndex),\n wrapperCol: factor(wrapperCol, breakpointIndex),\n ...otherProps,\n }\n}\n\nexport function useResponsiveFormLayout(props: IFormLayoutProps, root: Ref<HTMLElement | null>) {\n const { breakpoints } = props\n if (!isArr(breakpoints)) {\n return {\n props: ref(props),\n }\n }\n\n const layoutProps = ref<IFormLayoutProps>({})\n\n useResizeObserver(root, () => {\n layoutProps.value = calculateProps(root.value, props)\n })\n\n return {\n props: layoutProps,\n }\n}\n\nexport const formLayoutDeepContext: InjectionKey<Ref<IFormLayoutProps>> = Symbol(\n 'formLayoutDeepContext',\n)\n\nexport const formLayoutShallowContext: InjectionKey<Ref<IFormLayoutProps>>\n = Symbol('formLayoutShallowContext')\n\nexport function useFormDeepLayout(): Ref<IFormLayoutProps> {\n return inject(formLayoutDeepContext, ref({}))\n}\n\nexport function useFormLayout(): Ref<IFormLayoutProps> {\n const shallowLayout = inject(formLayoutShallowContext, ref({}))\n const deepLayout = inject(formLayoutDeepContext, ref({}))\n\n const formLayout = computed(() => {\n return {\n ...deepLayout.value,\n ...shallowLayout.value,\n }\n })\n\n return formLayout\n}\n\nexport const FORM_LAYOUT_PROPS_KEYS: ReadonlyArray<keyof IFormLayoutProps> = [\n 'colon',\n 'labelAlign',\n 'wrapperAlign',\n 'labelWrap',\n 'labelWidth',\n 'wrapperWidth',\n 'wrapperWrap',\n 'labelCol',\n 'wrapperCol',\n 'fullness',\n 'size',\n 'layout',\n 'feedbackLayout',\n 'tooltipLayout',\n 'breakpoints',\n 'hideRequiredAsterisk',\n 'statusIcon',\n] as const\n\nexport function filterValidFormLayoutProps(props: IFormLayoutProps): IFormLayoutProps {\n return Object.fromEntries(\n Object.entries(props)\n .filter(([_, value]) => isValid(value)),\n )\n}\n"],"names":["calcBreakpointIndex","breakpoints","width","i","breakpoint","calcFactor","value","breakpointIndex","safeIndex","factor","isValid","calculateProps","target","props","clientWidth","layout","labelAlign","wrapperAlign","labelCol","wrapperCol","otherProps","useResponsiveFormLayout","root","isArr","ref","layoutProps","useResizeObserver","formLayoutDeepContext","formLayoutShallowContext","useFormDeepLayout","inject","useFormLayout","shallowLayout","deepLayout","computed","FORM_LAYOUT_PROPS_KEYS","filterValidFormLayoutProps","_"],"mappings":";;;;;;;;AAMO,SAASA,EAAoBC,GAAuBC,GAAuB;AAChF,aAAW,CAACC,GAAGC,CAAU,KAAKH,EAAY;AACxC,QAAIC,KAASE;AACX,aAAOD;AAGX,SAAO;AACT;AAEO,SAASE,EAAcC,GAAyBC,GAA4B;AACjF,MAAI,CAAC,MAAM,QAAQD,CAAK,KAAKA,EAAM,WAAW;AAC5C,WAAOA;AAET,QAAME,IAAY,KAAK,IAAI,IAAI,KAAK,IAAID,GAAiBD,EAAM,SAAS,CAAC,CAAC;AAC1E,SAAOA,EAAM,GAAGE,CAAS;AAC3B;AAEO,SAASC,EAAUH,GAAgBC,GAA4B;AACpE,SAAOG,EAAQJ,CAAK,IAAID,EAAcC,GAAOC,CAAe,IAAID;AAClE;AAEO,SAASK,EAAeC,GAAiBC,GAA2C;AACzF,QAAM,EAAE,aAAAC,MAAgBF,GAClB;AAAA,IACJ,aAAAX;AAAA,IACA,QAAAc;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDP,GACEN,IAAkBP;AAAA,IACtBC;AAAA,IACAa;AAAA,EAAA;AAGF,SAAO;AAAA,IACL,QAAQL,EAAOM,GAAQR,CAAe;AAAA,IACtC,YAAYE,EAAOO,GAAYT,CAAe;AAAA,IAC9C,cAAcE,EAAOQ,GAAcV,CAAe;AAAA,IAClD,UAAUE,EAAOS,GAAUX,CAAe;AAAA,IAC1C,YAAYE,EAAOU,GAAYZ,CAAe;AAAA,IAC9C,GAAGa;AAAA,EAAA;AAEP;AAEO,SAASC,EAAwBR,GAAyBS,GAA+B;AAC9F,QAAM,EAAE,aAAArB,MAAgBY;AACxB,MAAI,CAACU,EAAMtB,CAAW;AACpB,WAAO;AAAA,MACL,OAAOuB,EAAIX,CAAK;AAAA,IAAA;AAIpB,QAAMY,IAAcD,EAAsB,EAAE;AAE5C,SAAAE,EAAkBJ,GAAM,MAAM;AAC5B,IAAAG,EAAY,QAAQd,EAAeW,EAAK,OAAOT,CAAK;AAAA,EACtD,CAAC,GAEM;AAAA,IACL,OAAOY;AAAA,EAAA;AAEX;AAEO,MAAME,IAA6D;AAAA,EACxE;AACF,GAEaC,IACT,OAAO,0BAA0B;AAE9B,SAASC,IAA2C;AACzD,SAAOC,EAAOH,GAAuBH,EAAI,CAAA,CAAE,CAAC;AAC9C;AAEO,SAASO,IAAuC;AACrD,QAAMC,IAAgBF,EAAOF,GAA0BJ,EAAI,CAAA,CAAE,CAAC,GACxDS,IAAaH,EAAOH,GAAuBH,EAAI,CAAA,CAAE,CAAC;AASxD,SAPmBU,EAAS,OACnB;AAAA,IACL,GAAGD,EAAW;AAAA,IACd,GAAGD,EAAc;AAAA,EAAA,EAEpB;AAGH;AAEO,MAAMG,IAAgE;AAAA,EAC3E;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,SAASC,EAA2BvB,GAA2C;AACpF,SAAO,OAAO;AAAA,IACZ,OAAO,QAAQA,CAAK,EACjB,OAAO,CAAC,CAACwB,GAAG/B,CAAK,MAAMI,EAAQJ,CAAK,CAAC;AAAA,EAAA;AAE5C;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { IFormStepProps } from './types';
|
|
2
|
-
declare const _default: import('vue').DefineComponent<IFormStepProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IFormStepProps> & Readonly<{}>, {
|
|
3
|
-
formStep: import('./types').IFormStep;
|
|
4
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
5
|
-
export default _default;
|
package/esm/form-step/index.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { createFormStep } from './utils';
|
|
2
|
-
export declare const FormStep: {
|
|
3
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').IFormStepProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
4
|
-
formStep: import('./types').IFormStep;
|
|
5
|
-
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
6
|
-
P: {};
|
|
7
|
-
B: {};
|
|
8
|
-
D: {};
|
|
9
|
-
C: {};
|
|
10
|
-
M: {};
|
|
11
|
-
Defaults: {};
|
|
12
|
-
}, Readonly<import('./types').IFormStepProps> & Readonly<{}>, {}, {}, {}, {}, {
|
|
13
|
-
formStep: import('./types').IFormStep;
|
|
14
|
-
}>;
|
|
15
|
-
__isFragment?: never;
|
|
16
|
-
__isTeleport?: never;
|
|
17
|
-
__isSuspense?: never;
|
|
18
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./types').IFormStepProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
19
|
-
formStep: import('./types').IFormStep;
|
|
20
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
|
|
21
|
-
StepPane: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
22
|
-
createFormStep: typeof createFormStep;
|
|
23
|
-
};
|
|
24
|
-
export default FormStep;
|
package/esm/form-step/index.mjs
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { observer as E } from "@formily/reactive-vue";
|
|
2
|
-
import { defineComponent as P, renderSlot as N, computed as V, createElementBlock as t, openBlock as r, normalizeClass as b, createVNode as A, unref as n, mergeProps as C, withCtx as s, Fragment as c, renderList as g, createBlock as a, createSlots as D, resolveDynamicComponent as v, createTextVNode as y, toDisplayString as k, createCommentVNode as O } from "vue";
|
|
3
|
-
import { ElSteps as R, ElStep as j } from "element-plus";
|
|
4
|
-
import "@formily/reactive";
|
|
5
|
-
import "@formily/core";
|
|
6
|
-
import { useField as w, useFieldSchema as z, RecursionField as I } from "@formily/vue";
|
|
7
|
-
import { composeExport as L } from "../__builtins__/shared/utils.mjs";
|
|
8
|
-
import { isObj as F } from "@formily/shared";
|
|
9
|
-
import { stylePrefix as T } from "../__builtins__/configs/index.mjs";
|
|
10
|
-
import { createFormStep as B, parseSteps as q } from "./utils.mjs";
|
|
11
|
-
const G = P({
|
|
12
|
-
name: "FFormStepPane",
|
|
13
|
-
inheritAttrs: !1
|
|
14
|
-
}), H = (o, i) => {
|
|
15
|
-
const m = o.__vccOpts || o;
|
|
16
|
-
for (const [f, p] of i)
|
|
17
|
-
m[f] = p;
|
|
18
|
-
return m;
|
|
19
|
-
};
|
|
20
|
-
function J(o, i, m, f, p, u) {
|
|
21
|
-
return N(o.$slots, "default");
|
|
22
|
-
}
|
|
23
|
-
const K = /* @__PURE__ */ H(G, [["render", J]]), M = /* @__PURE__ */ P({
|
|
24
|
-
name: "FFormStep",
|
|
25
|
-
inheritAttrs: !1,
|
|
26
|
-
__name: "form-step",
|
|
27
|
-
props: {
|
|
28
|
-
formStep: { default: () => B() },
|
|
29
|
-
active: null
|
|
30
|
-
},
|
|
31
|
-
setup(o) {
|
|
32
|
-
var x, $;
|
|
33
|
-
const i = o, m = w().value, f = `${T}-form-step`, p = z(), u = q(p.value);
|
|
34
|
-
($ = (x = i.formStep).connect) == null || $.call(x, u, m);
|
|
35
|
-
const h = V(() => {
|
|
36
|
-
var d;
|
|
37
|
-
return i.active ?? ((d = i.formStep) == null ? void 0 : d.current) ?? 0;
|
|
38
|
-
});
|
|
39
|
-
return (d, U) => (r(), t("div", {
|
|
40
|
-
class: b(f)
|
|
41
|
-
}, [
|
|
42
|
-
A(n(R), C(d.$attrs, {
|
|
43
|
-
active: h.value,
|
|
44
|
-
style: [{ marginBottom: "10px" }]
|
|
45
|
-
}), {
|
|
46
|
-
default: s(() => [
|
|
47
|
-
(r(!0), t(c, null, g(n(u), ({ props: l, slots: e }, _) => (r(), a(n(j), C({ key: _ }, { ref_for: !0 }, l), D({ _: 2 }, [
|
|
48
|
-
e != null && e.title ? {
|
|
49
|
-
name: "title",
|
|
50
|
-
fn: s(() => [
|
|
51
|
-
n(F)(e.title) ? (r(), a(v(e.title), { key: 0 })) : (r(), t(c, { key: 1 }, [
|
|
52
|
-
y(k(e.title), 1)
|
|
53
|
-
], 64))
|
|
54
|
-
]),
|
|
55
|
-
key: "0"
|
|
56
|
-
} : void 0,
|
|
57
|
-
e != null && e.icon ? {
|
|
58
|
-
name: "icon",
|
|
59
|
-
fn: s(() => [
|
|
60
|
-
n(F)(e.icon) ? (r(), a(v(e.icon), { key: 0 })) : (r(), t(c, { key: 1 }, [
|
|
61
|
-
y(k(e.icon), 1)
|
|
62
|
-
], 64))
|
|
63
|
-
]),
|
|
64
|
-
key: "1"
|
|
65
|
-
} : void 0,
|
|
66
|
-
e != null && e.description ? {
|
|
67
|
-
name: "description",
|
|
68
|
-
fn: s(() => [
|
|
69
|
-
n(F)(e.description) ? (r(), a(v(e.description), { key: 0 })) : (r(), t(c, { key: 1 }, [
|
|
70
|
-
y(k(e.description), 1)
|
|
71
|
-
], 64))
|
|
72
|
-
]),
|
|
73
|
-
key: "2"
|
|
74
|
-
} : void 0
|
|
75
|
-
]), 1040))), 128))
|
|
76
|
-
]),
|
|
77
|
-
_: 1
|
|
78
|
-
}, 16, ["active"]),
|
|
79
|
-
(r(!0), t(c, null, g(n(u), ({ name: l, schema: e }, _) => (r(), t(c, { key: l }, [
|
|
80
|
-
_ === h.value ? (r(), a(n(I), {
|
|
81
|
-
key: 0,
|
|
82
|
-
name: l,
|
|
83
|
-
schema: e
|
|
84
|
-
}, null, 8, ["name", "schema"])) : O("", !0)
|
|
85
|
-
], 64))), 128))
|
|
86
|
-
]));
|
|
87
|
-
}
|
|
88
|
-
}), Q = E(M), ie = L(Q, {
|
|
89
|
-
StepPane: K,
|
|
90
|
-
createFormStep: B
|
|
91
|
-
});
|
|
92
|
-
export {
|
|
93
|
-
ie as FormStep,
|
|
94
|
-
ie as default
|
|
95
|
-
};
|
|
96
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/form-step/form-step-pane.vue","../../src/form-step/form-step.vue","../../src/form-step/index.ts"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n name: 'FFormStepPane',\n inheritAttrs: false,\n})\n</script>\n\n<template>\n <slot />\n</template>\n","<script setup lang=\"ts\">\nimport type { VoidField } from '@formily/core'\nimport type { IFormStepProps } from './types'\nimport { isObj } from '@formily/shared'\nimport { RecursionField, useField, useFieldSchema } from '@formily/vue'\nimport { ElStep, ElSteps } from 'element-plus'\nimport { computed } from 'vue'\nimport { stylePrefix } from '../__builtins__'\nimport { createFormStep, parseSteps } from './utils'\n\ndefineOptions({\n name: 'FFormStep',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n formStep: { default: () => createFormStep() },\n active: null\n})\n\nconst field = useField<VoidField>().value\nconst prefixCls = `${stylePrefix}-form-step`\nconst fieldSchemaRef = useFieldSchema()\n\nconst steps = parseSteps(fieldSchemaRef.value)\n\nprops.formStep.connect?.(steps, field)\n\nconst current = computed(() => props.active ?? props.formStep?.current ?? 0)\n</script>\n\n<template>\n <div :class=\"prefixCls\">\n <ElSteps\n v-bind=\"$attrs\"\n :active=\"current\"\n :style=\"[{ marginBottom: '10px' }]\"\n >\n <ElStep\n v-for=\"({ props: stepProps, slots: stepSlots }, key) of steps\"\n :key=\"key\"\n v-bind=\"stepProps\"\n >\n <template v-if=\"stepSlots?.title\" #title>\n <template v-if=\"isObj(stepSlots.title)\">\n <component :is=\"stepSlots.title\" />\n </template>\n <template v-else>\n {{ stepSlots.title }}\n </template>\n </template>\n <template v-if=\"stepSlots?.icon\" #icon>\n <template v-if=\"isObj(stepSlots.icon)\">\n <component :is=\"stepSlots.icon\" />\n </template>\n <template v-else>\n {{ stepSlots.icon }}\n </template>\n </template>\n <template v-if=\"stepSlots?.description\" #description>\n <template v-if=\"isObj(stepSlots.description)\">\n <component :is=\"stepSlots.description\" />\n </template>\n <template v-else>\n {{ stepSlots.description }}\n </template>\n </template>\n </ElStep>\n </ElSteps>\n\n <template v-for=\"({ name, schema }, key) of steps\" :key=\"name\">\n <RecursionField\n v-if=\"key === current\"\n :name=\"name\"\n :schema=\"schema\"\n />\n </template>\n </div>\n</template>\n","import { observer } from '@formily/reactive-vue'\nimport { composeExport } from '../__builtins__'\nimport FFormStepPane from './form-step-pane.vue'\nimport FFormStep from './form-step.vue'\nimport { createFormStep } from './utils'\n\nconst FormStepInner = observer(FFormStep)\n\nexport const FormStep = composeExport(FormStepInner, {\n StepPane: FFormStepPane,\n createFormStep,\n})\n\nexport default FormStep\n"],"names":["_sfc_main$1","defineComponent","_renderSlot","_ctx","props","__props","field","useField","prefixCls","stylePrefix","fieldSchemaRef","useFieldSchema","steps","parseSteps","_b","_a","current","computed","_createElementBlock","_createVNode","_unref","ElSteps","_mergeProps","_openBlock","_Fragment","stepProps","stepSlots","key","_createBlock","_createSlots","isObj","_resolveDynamicComponent","_createTextVNode","_toDisplayString","name","schema","RecursionField","FormStepInner","observer","FFormStep","FormStep","composeExport","FFormStepPane","createFormStep"],"mappings":";;;;;;;;;;AAGA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;;;;;;;SAICC,EAAQC,EAAA,QAAA,SAAA;;;;;;;;;;;;ACKV,UAAMC,IAAQC,GAKRC,IAAQC,IAAsB,OAC9BC,IAAY,GAAGC,CAAW,cAC1BC,IAAiBC,EAAA,GAEjBC,IAAQC,EAAWH,EAAe,KAAK;AAE7C,KAAAI,KAAAC,IAAAX,EAAM,UAAS,YAAf,QAAAU,EAAA,KAAAC,GAAyBH,GAAON;AAEhC,UAAMU,IAAUC,EAAS;;AAAM,aAAAb,EAAM,YAAUW,IAAAX,EAAM,aAAN,gBAAAW,EAAgB,YAAW;AAAA,KAAC;2BAIzEG,EA6CM,OAAA;AAAA,MA7CA,SAAOV,CAAS;AAAA,IAAA;MACpBW,EAmCUC,EAAAC,CAAA,GAnCVC,EAmCUnB,EAAA,QAlCM;AAAA,QACb,QAAQa,EAAA;AAAA,QACR,OAAO,CAAA,EAAA,cAAA,QAAA;AAAA,MAAA;mBAGN,MAA8D;AAAA,WADhEO,EAAA,EAAA,GAAAL,EA6BSM,WA5BiDJ,EAAAR,CAAA,GAAK,CAAA,EAAA,OAA5Ca,GAAS,OAASC,EAAA,GAAaC,OADlDJ,EAAA,GAAAK,EA6BSR,MA7BTE,EA6BS,EA3BN,KAAAK,EAAA,oBACOF,CAAS,GAAAI,EAAA,EAAA,GAAA,KAAA;AAAA,YAEDH,KAAA,QAAAA,EAAW;oBAAQ;AAAA,oBAArC,MAEW;AAAA,gBADSN,EAAAU,CAAA,EAAMJ,EAAU,KAAK,UACnCE,EAAmCG,EAAnBL,EAAU,KAAK,GAAA,EAAA,KAAA,EAAA,CAAA,WAEjCR,EAEWM,GAAA,EAAA,KAAA,KAAA;AAAA,kBADNQ,EAAAC,EAAAP,EAAU,KAAK,GAAA,CAAA;AAAA,gBAAA;;;;YAGNA,KAAA,QAAAA,EAAW;oBAAO;AAAA,oBAApC,MAEW;AAAA,gBADSN,EAAAU,CAAA,EAAMJ,EAAU,IAAI,UAClCE,EAAkCG,EAAlBL,EAAU,IAAI,GAAA,EAAA,KAAA,EAAA,CAAA,WAEhCR,EAEWM,GAAA,EAAA,KAAA,KAAA;AAAA,kBADNQ,EAAAC,EAAAP,EAAU,IAAI,GAAA,CAAA;AAAA,gBAAA;;;;YAGLA,KAAA,QAAAA,EAAW;oBAAc;AAAA,oBAA3C,MAEW;AAAA,gBADSN,EAAAU,CAAA,EAAMJ,EAAU,WAAW,UACzCE,EAAyCG,EAAzBL,EAAU,WAAW,GAAA,EAAA,KAAA,EAAA,CAAA,WAEvCR,EAEWM,GAAA,EAAA,KAAA,KAAA;AAAA,kBADNQ,EAAAC,EAAAP,EAAU,WAAW,GAAA,CAAA;AAAA,gBAAA;;;;;;;;OAMhCH,EAAA,EAAA,GAAAL,EAMWM,WANiCJ,EAAAR,CAAA,GAAK,CAAA,EAA7B,MAAAsB,GAAM,QAAAC,EAAA,GAAUR,wBAAqBO,KAAI;AAAA,QAEnDP,MAAQX,EAAA,cADhBY,EAIER,EAAAgB,CAAA,GAAA;AAAA;UAFC,MAAAF;AAAA,UACA,QAAAC;AAAA,QAAA;;;;ICpEHE,IAAgBC,EAASC,CAAS,GAE3BC,KAAWC,EAAcJ,GAAe;AAAA,EACnD,UAAUK;AAAA,EACV,gBAAAC;AACF,CAAC;"}
|
package/esm/form-step/types.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Form, VoidField } from '@formily/core';
|
|
2
|
-
import { SchemaStep } from './utils';
|
|
3
|
-
export interface IFormStep {
|
|
4
|
-
connect: (steps: SchemaStep[], field: VoidField) => void;
|
|
5
|
-
current: number;
|
|
6
|
-
allowNext: boolean;
|
|
7
|
-
allowBack: boolean;
|
|
8
|
-
setCurrent: (key: number) => void;
|
|
9
|
-
submit: Form['submit'];
|
|
10
|
-
next: () => void;
|
|
11
|
-
back: () => void;
|
|
12
|
-
}
|
|
13
|
-
export interface IFormStepProps {
|
|
14
|
-
formStep?: IFormStep;
|
|
15
|
-
active?: number;
|
|
16
|
-
}
|
|
17
|
-
export interface FormStepEnv {
|
|
18
|
-
form: Form;
|
|
19
|
-
field: VoidField;
|
|
20
|
-
steps: SchemaStep[];
|
|
21
|
-
}
|
package/esm/form-step/types.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/esm/form-step/utils.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Schema, SchemaKey } from '@formily/json-schema';
|
|
2
|
-
import { Slots } from 'vue';
|
|
3
|
-
import { IFormStep } from './types';
|
|
4
|
-
export interface SchemaStep {
|
|
5
|
-
name: SchemaKey;
|
|
6
|
-
props: any;
|
|
7
|
-
schema: Schema;
|
|
8
|
-
slots: Slots;
|
|
9
|
-
}
|
|
10
|
-
export declare function createFormStep(defaultCurrent?: number): IFormStep;
|
|
11
|
-
export declare function parseSteps(schema: Schema): SchemaStep[];
|