@silver-formily/element-plus 0.0.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +31 -0
- package/esm/__builtins__/configs/index.d.ts +1 -0
- package/esm/__builtins__/configs/index.mjs +5 -0
- package/esm/__builtins__/configs/index.mjs.map +1 -0
- package/esm/__builtins__/index.d.ts +2 -0
- package/esm/__builtins__/index.mjs +27 -0
- package/esm/__builtins__/index.mjs.map +1 -0
- package/esm/__builtins__/shared/hooks.d.ts +7 -0
- package/esm/__builtins__/shared/hooks.mjs +59 -0
- package/esm/__builtins__/shared/hooks.mjs.map +1 -0
- package/esm/__builtins__/shared/index.d.ts +7 -0
- package/esm/__builtins__/shared/index.mjs +25 -0
- package/esm/__builtins__/shared/index.mjs.map +1 -0
- package/esm/__builtins__/shared/load-config-provider.d.ts +2 -0
- package/esm/__builtins__/shared/load-config-provider.mjs +13 -0
- package/esm/__builtins__/shared/load-config-provider.mjs.map +1 -0
- package/esm/__builtins__/shared/loading.d.ts +12 -0
- package/esm/__builtins__/shared/loading.mjs +49 -0
- package/esm/__builtins__/shared/loading.mjs.map +1 -0
- package/esm/__builtins__/shared/simple-version-compare.d.ts +2 -0
- package/esm/__builtins__/shared/simple-version-compare.mjs +18 -0
- package/esm/__builtins__/shared/simple-version-compare.mjs.map +1 -0
- package/esm/__builtins__/shared/transform-component.d.ts +8 -0
- package/esm/__builtins__/shared/transform-component.mjs +50 -0
- package/esm/__builtins__/shared/transform-component.mjs.map +1 -0
- package/esm/__builtins__/shared/types.d.ts +2 -0
- package/esm/__builtins__/shared/types.mjs +2 -0
- package/esm/__builtins__/shared/types.mjs.map +1 -0
- package/esm/__builtins__/shared/utils.d.ts +8 -0
- package/esm/__builtins__/shared/utils.mjs +34 -0
- package/esm/__builtins__/shared/utils.mjs.map +1 -0
- package/esm/array-base/array-base-addition.d.ts +5 -0
- package/esm/array-base/array-base-index.d.ts +19 -0
- package/esm/array-base/array-base-inner.d.ts +18 -0
- package/esm/array-base/array-base-item.d.ts +18 -0
- package/esm/array-base/array-base-move-down.d.ts +18 -0
- package/esm/array-base/array-base-move-up.d.ts +18 -0
- package/esm/array-base/array-base-remove.d.ts +18 -0
- package/esm/array-base/array-base-sort-handle.d.ts +2 -0
- package/esm/array-base/index.d.ts +114 -0
- package/esm/array-base/index.mjs +225 -0
- package/esm/array-base/index.mjs.map +1 -0
- package/esm/array-base/symbols.d.ts +4 -0
- package/esm/array-base/symbols.mjs +6 -0
- package/esm/array-base/symbols.mjs.map +1 -0
- package/esm/array-base/types.d.ts +28 -0
- package/esm/array-base/types.mjs +2 -0
- package/esm/array-base/types.mjs.map +1 -0
- package/esm/array-base/utils.d.ts +18 -0
- package/esm/array-base/utils.mjs +88 -0
- package/esm/array-base/utils.mjs.map +1 -0
- package/esm/array-cards/array-cards.d.ts +13 -0
- package/esm/array-cards/index.d.ts +122 -0
- package/esm/array-cards/index.mjs +119 -0
- package/esm/array-cards/index.mjs.map +1 -0
- package/esm/array-collapse/array-collapse-item.d.ts +18 -0
- package/esm/array-collapse/array-collapse.d.ts +16 -0
- package/esm/array-collapse/index.d.ts +134 -0
- package/esm/array-collapse/index.mjs +180 -0
- package/esm/array-collapse/index.mjs.map +1 -0
- package/esm/array-collapse/utils.d.ts +1 -0
- package/esm/array-collapse/utils.mjs +12 -0
- package/esm/array-collapse/utils.mjs.map +1 -0
- package/esm/array-items/array-items-item.d.ts +30 -0
- package/esm/array-items/array-items.d.ts +2 -0
- package/esm/array-items/index.d.ts +130 -0
- package/esm/array-items/index.mjs +105 -0
- package/esm/array-items/index.mjs.map +1 -0
- package/esm/array-list-tabs/array-list-tabs.d.ts +31 -0
- package/esm/array-list-tabs/index.d.ts +83 -0
- package/esm/array-list-tabs/index.mjs +183 -0
- package/esm/array-list-tabs/index.mjs.map +1 -0
- package/esm/array-list-tabs/utils.d.ts +3 -0
- package/esm/array-list-tabs/utils.mjs +16 -0
- package/esm/array-list-tabs/utils.mjs.map +1 -0
- package/esm/array-table/index.mjs +230 -0
- package/esm/array-table/index.mjs.map +1 -0
- package/esm/array-table/types.d.ts +6 -0
- package/esm/array-table/types.mjs +2 -0
- package/esm/array-table/types.mjs.map +1 -0
- package/esm/array-table/utils.d.ts +5 -0
- package/esm/array-table/utils.mjs +26 -0
- package/esm/array-table/utils.mjs.map +1 -0
- package/esm/array-tabs/array-tabs.d.ts +2 -0
- package/esm/array-tabs/index.d.ts +2 -0
- package/esm/array-tabs/index.mjs +88 -0
- package/esm/array-tabs/index.mjs.map +1 -0
- package/esm/cascader/cascader.d.ts +30 -0
- package/esm/cascader/index.d.ts +41 -0
- package/esm/cascader/index.mjs +54 -0
- package/esm/cascader/index.mjs.map +1 -0
- package/esm/checkbox/checkbox-group.d.ts +58 -0
- package/esm/checkbox/index.d.ts +716 -0
- package/esm/checkbox/index.mjs +86 -0
- package/esm/checkbox/index.mjs.map +1 -0
- package/esm/date-picker/index.d.ts +2 -0
- package/esm/date-picker/index.mjs +57 -0
- package/esm/date-picker/index.mjs.map +1 -0
- package/esm/editable/editable-popover.d.ts +25 -0
- package/esm/editable/editable.d.ts +187 -0
- package/esm/editable/index.d.ts +147 -0
- package/esm/editable/index.mjs +231 -0
- package/esm/editable/index.mjs.map +1 -0
- package/esm/form/form.d.ts +46 -0
- package/esm/form/form.mjs +77 -0
- package/esm/form/form.mjs.map +1 -0
- package/esm/form/index.d.ts +1 -0
- package/esm/form/index.mjs +6 -0
- package/esm/form/index.mjs.map +1 -0
- package/esm/form-button-group/form-button-group-sticky.d.ts +17 -0
- package/esm/form-button-group/form-button-group.d.ts +48 -0
- package/esm/form-button-group/index.d.ts +87 -0
- package/esm/form-button-group/index.mjs +90 -0
- package/esm/form-button-group/index.mjs.map +1 -0
- package/esm/form-button-group/utils.d.ts +1 -0
- package/esm/form-button-group/utils.mjs +12 -0
- package/esm/form-button-group/utils.mjs.map +1 -0
- package/esm/form-collapse/form-collapse.d.ts +18 -0
- package/esm/form-collapse/index.d.ts +45 -0
- package/esm/form-collapse/index.mjs +103 -0
- package/esm/form-collapse/index.mjs.map +1 -0
- package/esm/form-collapse/utils.d.ts +31 -0
- package/esm/form-collapse/utils.mjs +54 -0
- package/esm/form-collapse/utils.mjs.map +1 -0
- package/esm/form-dialog/dialog-content.d.ts +60 -0
- package/esm/form-dialog/index.d.ts +4 -0
- package/esm/form-dialog/index.mjs +209 -0
- package/esm/form-dialog/index.mjs.map +1 -0
- package/esm/form-dialog/types.d.ts +32 -0
- package/esm/form-dialog/types.mjs +2 -0
- package/esm/form-dialog/types.mjs.map +1 -0
- package/esm/form-drawer/drawer-content.d.ts +60 -0
- package/esm/form-drawer/index.d.ts +4 -0
- package/esm/form-drawer/index.mjs +203 -0
- package/esm/form-drawer/index.mjs.map +1 -0
- package/esm/form-drawer/types.d.ts +32 -0
- package/esm/form-drawer/types.mjs +2 -0
- package/esm/form-drawer/types.mjs.map +1 -0
- package/esm/form-grid/form-grid-column.d.ts +29 -0
- package/esm/form-grid/form-grid.d.ts +101 -0
- package/esm/form-grid/hooks.d.ts +4 -0
- package/esm/form-grid/hooks.mjs +7 -0
- package/esm/form-grid/hooks.mjs.map +1 -0
- package/esm/form-grid/index.d.ts +182 -0
- package/esm/form-grid/index.mjs +106 -0
- package/esm/form-grid/index.mjs.map +1 -0
- package/esm/form-item/form-item.d.ts +18 -0
- package/esm/form-item/index.d.ts +70 -0
- package/esm/form-item/index.mjs +346 -0
- package/esm/form-item/index.mjs.map +1 -0
- package/esm/form-item/types.d.ts +25 -0
- package/esm/form-item/types.mjs +2 -0
- package/esm/form-item/types.mjs.map +1 -0
- package/esm/form-item/utils.d.ts +3 -0
- package/esm/form-item/utils.mjs +18 -0
- package/esm/form-item/utils.mjs.map +1 -0
- package/esm/form-layout/form-layout.d.ts +32 -0
- package/esm/form-layout/form-layout.mjs +86 -0
- package/esm/form-layout/form-layout.mjs.map +1 -0
- package/esm/form-layout/index.d.ts +1 -0
- package/esm/form-layout/index.mjs +6 -0
- package/esm/form-layout/index.mjs.map +1 -0
- package/esm/form-layout/types.d.ts +43 -0
- package/esm/form-layout/types.mjs +2 -0
- package/esm/form-layout/types.mjs.map +1 -0
- package/esm/form-layout/utils.d.ts +57 -0
- package/esm/form-layout/utils.mjs +109 -0
- package/esm/form-layout/utils.mjs.map +1 -0
- package/esm/form-step/form-step-pane.d.ts +2 -0
- package/esm/form-step/form-step.d.ts +5 -0
- package/esm/form-step/index.d.ts +24 -0
- package/esm/form-step/index.mjs +96 -0
- package/esm/form-step/index.mjs.map +1 -0
- package/esm/form-step/types.d.ts +21 -0
- package/esm/form-step/types.mjs +2 -0
- package/esm/form-step/types.mjs.map +1 -0
- package/esm/form-step/utils.d.ts +11 -0
- package/esm/form-step/utils.mjs +66 -0
- package/esm/form-step/utils.mjs.map +1 -0
- package/esm/form-tab/form-tab.d.ts +7 -0
- package/esm/form-tab/hooks.d.ts +7 -0
- package/esm/form-tab/hooks.mjs +32 -0
- package/esm/form-tab/hooks.mjs.map +1 -0
- package/esm/form-tab/index.d.ts +28 -0
- package/esm/form-tab/index.mjs +80 -0
- package/esm/form-tab/index.mjs.map +1 -0
- package/esm/form-tab/types.d.ts +12 -0
- package/esm/form-tab/types.mjs +2 -0
- package/esm/form-tab/types.mjs.map +1 -0
- package/esm/form-tab/utils.d.ts +4 -0
- package/esm/form-tab/utils.mjs +14 -0
- package/esm/form-tab/utils.mjs.map +1 -0
- package/esm/index.d.ts +37 -0
- package/esm/index.mjs +81 -0
- package/esm/index.mjs.map +1 -0
- package/esm/input/index.d.ts +84 -0
- package/esm/input/index.mjs +77 -0
- package/esm/input/index.mjs.map +1 -0
- package/esm/input/input.d.ts +32 -0
- package/esm/input-number/index.d.ts +4 -0
- package/esm/input-number/index.mjs +30 -0
- package/esm/input-number/index.mjs.map +1 -0
- package/esm/pagination/components/jumper.d.ts +16 -0
- package/esm/pagination/components/jumper.mjs +12 -0
- package/esm/pagination/components/jumper.mjs.map +1 -0
- package/esm/pagination/components/next.d.ts +42 -0
- package/esm/pagination/components/next.mjs +23 -0
- package/esm/pagination/components/next.mjs.map +1 -0
- package/esm/pagination/components/pager.d.ts +42 -0
- package/esm/pagination/components/pager.mjs +23 -0
- package/esm/pagination/components/pager.mjs.map +1 -0
- package/esm/pagination/components/prev.d.ts +39 -0
- package/esm/pagination/components/prev.mjs +22 -0
- package/esm/pagination/components/prev.mjs.map +1 -0
- package/esm/pagination/components/sizes.d.ts +56 -0
- package/esm/pagination/components/sizes.mjs +7 -0
- package/esm/pagination/components/sizes.mjs.map +1 -0
- package/esm/pagination/components/total.d.ts +8 -0
- package/esm/pagination/components/total.mjs +11 -0
- package/esm/pagination/components/total.mjs.map +1 -0
- package/esm/pagination/pagination.d.ts +128 -0
- package/esm/pagination/pagination.mjs +631 -0
- package/esm/pagination/pagination.mjs.map +1 -0
- package/esm/password/index.d.ts +86 -0
- package/esm/password/index.mjs +14 -0
- package/esm/password/index.mjs.map +1 -0
- package/esm/preview-text/cascader.d.ts +5 -0
- package/esm/preview-text/date-picker.d.ts +5 -0
- package/esm/preview-text/index.d.ts +102 -0
- package/esm/preview-text/index.mjs +321 -0
- package/esm/preview-text/index.mjs.map +1 -0
- package/esm/preview-text/input.d.ts +28 -0
- package/esm/preview-text/preview.d.ts +18 -0
- package/esm/preview-text/select.d.ts +5 -0
- package/esm/preview-text/time-picker.d.ts +5 -0
- package/esm/preview-text/tree.d.ts +22 -0
- package/esm/preview-text/utils.d.ts +14 -0
- package/esm/preview-text/utils.mjs +16 -0
- package/esm/preview-text/utils.mjs.map +1 -0
- package/esm/radio/index.d.ts +634 -0
- package/esm/radio/index.mjs +80 -0
- package/esm/radio/index.mjs.map +1 -0
- package/esm/radio/radio-group.d.ts +44 -0
- package/esm/reset/index.d.ts +63 -0
- package/esm/reset/index.mjs +48 -0
- package/esm/reset/index.mjs.map +1 -0
- package/esm/reset/reset.d.ts +45 -0
- package/esm/select/index.d.ts +142 -0
- package/esm/select/index.mjs +132 -0
- package/esm/select/index.mjs.map +1 -0
- package/esm/select/select.d.ts +50 -0
- package/esm/select-table/index.mjs +204 -0
- package/esm/select-table/index.mjs.map +1 -0
- package/esm/select-table/types.d.ts +14 -0
- package/esm/select-table/types.mjs +2 -0
- package/esm/select-table/types.mjs.map +1 -0
- package/esm/space/index.d.ts +1 -0
- package/esm/space/index.mjs +6 -0
- package/esm/space/index.mjs.map +1 -0
- package/esm/styles/array-base/index.css +1 -0
- package/esm/styles/array-cards/index.css +1 -0
- package/esm/styles/array-collapse/index.css +1 -0
- package/esm/styles/array-items/index.css +1 -0
- package/esm/styles/array-list-tabs/index.css +1 -0
- package/esm/styles/array-table/index.css +1 -0
- package/esm/styles/array-tabs/index.css +1 -0
- package/esm/styles/editable/index.css +1 -0
- package/esm/styles/form-button-group/index.css +1 -0
- package/esm/styles/form-collapse/index.css +1 -0
- package/esm/styles/form-grid/index.css +1 -0
- package/esm/styles/form-item/index.css +1 -0
- package/esm/styles/form-tab/index.css +1 -0
- package/esm/styles/preview-text/index.css +1 -0
- package/esm/styles/radio/index.css +1 -0
- package/esm/styles/select-table/index.css +1 -0
- package/esm/submit/index.d.ts +48 -0
- package/esm/submit/index.mjs +47 -0
- package/esm/submit/index.mjs.map +1 -0
- package/esm/submit/submit.d.ts +36 -0
- package/esm/switch/index.d.ts +4 -0
- package/esm/switch/index.mjs +19 -0
- package/esm/switch/index.mjs.map +1 -0
- package/esm/time-picker/index.d.ts +4 -0
- package/esm/time-picker/index.mjs +21 -0
- package/esm/time-picker/index.mjs.map +1 -0
- package/esm/time-select/index.d.ts +2 -0
- package/esm/time-select/index.mjs +21 -0
- package/esm/time-select/index.mjs.map +1 -0
- package/esm/transfer/index.d.ts +1509 -0
- package/esm/transfer/index.mjs +11 -0
- package/esm/transfer/index.mjs.map +1 -0
- package/esm/tree/index.d.ts +42 -0
- package/esm/tree/index.mjs +105 -0
- package/esm/tree/index.mjs.map +1 -0
- package/esm/tree/tree.d.ts +20 -0
- package/esm/tree/types.d.ts +13 -0
- package/esm/tree/types.mjs +2 -0
- package/esm/tree/types.mjs.map +1 -0
- package/esm/tree/utils.d.ts +45 -0
- package/esm/tree/utils.mjs +161 -0
- package/esm/tree/utils.mjs.map +1 -0
- package/esm/tree-select/index.d.ts +32 -0
- package/esm/tree-select/index.mjs +51 -0
- package/esm/tree-select/index.mjs.map +1 -0
- package/esm/tree-select/tree-select.d.ts +17 -0
- package/esm/upload/index.d.ts +889 -0
- package/esm/upload/index.mjs +185 -0
- package/esm/upload/index.mjs.map +1 -0
- package/esm/upload/upload.d.ts +1613 -0
- package/esm/vendor/icon.mjs +11 -0
- package/esm/vendor/icon.mjs.map +1 -0
- package/esm/vendor/lodash.mjs +1400 -0
- package/esm/vendor/lodash.mjs.map +1 -0
- package/esm/vendor/runtime.mjs +29 -0
- package/esm/vendor/runtime.mjs.map +1 -0
- package/esm/vendor/shared.esm-bundler.mjs +14 -0
- package/esm/vendor/shared.esm-bundler.mjs.map +1 -0
- package/esm/vendor/sizes.mjs +27 -0
- package/esm/vendor/sizes.mjs.map +1 -0
- package/esm/vendor/types.mjs +19 -0
- package/esm/vendor/types.mjs.map +1 -0
- package/package.json +109 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { useArray, useIndex, useKey, useRecord } from './utils';
|
|
2
|
+
export declare const ArrayBase: {
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').IArrayBaseProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
4
|
+
P: {};
|
|
5
|
+
B: {};
|
|
6
|
+
D: {};
|
|
7
|
+
C: {};
|
|
8
|
+
M: {};
|
|
9
|
+
Defaults: {};
|
|
10
|
+
}, Readonly<import('./types').IArrayBaseProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
11
|
+
__isFragment?: never;
|
|
12
|
+
__isTeleport?: never;
|
|
13
|
+
__isSuspense?: never;
|
|
14
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./types').IArrayBaseProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
15
|
+
$slots: {
|
|
16
|
+
default?(_: {}): any;
|
|
17
|
+
};
|
|
18
|
+
}) & {
|
|
19
|
+
Index: {
|
|
20
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLSpanElement, import('vue').ComponentProvideOptions, {
|
|
21
|
+
P: {};
|
|
22
|
+
B: {};
|
|
23
|
+
D: {};
|
|
24
|
+
C: {};
|
|
25
|
+
M: {};
|
|
26
|
+
Defaults: {};
|
|
27
|
+
}, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
28
|
+
__isFragment?: never;
|
|
29
|
+
__isTeleport?: never;
|
|
30
|
+
__isSuspense?: never;
|
|
31
|
+
} & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
32
|
+
$slots: {
|
|
33
|
+
default?(_: {
|
|
34
|
+
index: number;
|
|
35
|
+
}): any;
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
Item: {
|
|
39
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').IArrayBaseItemProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
40
|
+
P: {};
|
|
41
|
+
B: {};
|
|
42
|
+
D: {};
|
|
43
|
+
C: {};
|
|
44
|
+
M: {};
|
|
45
|
+
Defaults: {};
|
|
46
|
+
}, Readonly<import('./types').IArrayBaseItemProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
47
|
+
__isFragment?: never;
|
|
48
|
+
__isTeleport?: never;
|
|
49
|
+
__isSuspense?: never;
|
|
50
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./types').IArrayBaseItemProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
51
|
+
$slots: {
|
|
52
|
+
default?(_: {}): any;
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
SortHandle: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
56
|
+
Addition: import('vue').DefineComponent<import('./types').IArrayBaseAdditionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('./types').IArrayBaseAdditionProps> & Readonly<{}>, {
|
|
57
|
+
method: "push" | "unshift";
|
|
58
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
59
|
+
Remove: {
|
|
60
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').IArrayBaseOperationProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
61
|
+
P: {};
|
|
62
|
+
B: {};
|
|
63
|
+
D: {};
|
|
64
|
+
C: {};
|
|
65
|
+
M: {};
|
|
66
|
+
Defaults: {};
|
|
67
|
+
}, Readonly<import('./types').IArrayBaseOperationProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
68
|
+
__isFragment?: never;
|
|
69
|
+
__isTeleport?: never;
|
|
70
|
+
__isSuspense?: never;
|
|
71
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./types').IArrayBaseOperationProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
72
|
+
$slots: {
|
|
73
|
+
default?(_: {}): any;
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
MoveDown: {
|
|
77
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').IArrayBaseOperationProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
78
|
+
P: {};
|
|
79
|
+
B: {};
|
|
80
|
+
D: {};
|
|
81
|
+
C: {};
|
|
82
|
+
M: {};
|
|
83
|
+
Defaults: {};
|
|
84
|
+
}, Readonly<import('./types').IArrayBaseOperationProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
85
|
+
__isFragment?: never;
|
|
86
|
+
__isTeleport?: never;
|
|
87
|
+
__isSuspense?: never;
|
|
88
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./types').IArrayBaseOperationProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
89
|
+
$slots: {
|
|
90
|
+
default?(_: {}): any;
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
MoveUp: {
|
|
94
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').IArrayBaseOperationProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
95
|
+
P: {};
|
|
96
|
+
B: {};
|
|
97
|
+
D: {};
|
|
98
|
+
C: {};
|
|
99
|
+
M: {};
|
|
100
|
+
Defaults: {};
|
|
101
|
+
}, Readonly<import('./types').IArrayBaseOperationProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
102
|
+
__isFragment?: never;
|
|
103
|
+
__isTeleport?: never;
|
|
104
|
+
__isSuspense?: never;
|
|
105
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./types').IArrayBaseOperationProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
106
|
+
$slots: {
|
|
107
|
+
default?(_: {}): any;
|
|
108
|
+
};
|
|
109
|
+
});
|
|
110
|
+
useArray: typeof useArray;
|
|
111
|
+
useIndex: typeof useIndex;
|
|
112
|
+
useKey: typeof useKey;
|
|
113
|
+
useRecord: typeof useRecord;
|
|
114
|
+
};
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { defineComponent as u, createBlock as _, createCommentVNode as v, unref as t, openBlock as c, normalizeClass as p, withCtx as M, createTextVNode as y, toDisplayString as k, createElementBlock as b, renderSlot as d, provide as V, useAttrs as g, withModifiers as B } from "vue";
|
|
2
|
+
import { ElLink as h } from "element-plus";
|
|
3
|
+
import "@formily/reactive";
|
|
4
|
+
import "@formily/core";
|
|
5
|
+
import "@formily/reactive-vue";
|
|
6
|
+
import { useField as z, useFieldSchema as E } from "@formily/vue";
|
|
7
|
+
import { composeExport as F } from "../__builtins__/shared/utils.mjs";
|
|
8
|
+
import { Plus as H, ArrowDown as N, ArrowUp as P, Delete as K, Rank as L } from "@element-plus/icons-vue";
|
|
9
|
+
import { useArray as m, compatibleUnderlineProp as A, prefixCls as f, getDefaultValue as T, useIndex as $, useRecord as j, useKey as q } from "./utils.mjs";
|
|
10
|
+
import { ArrayBaseSymbol as G, ItemSymbol as J } from "./symbols.mjs";
|
|
11
|
+
import { isArr as C } from "@formily/shared";
|
|
12
|
+
import '../styles/array-base/index.css';const O = /* @__PURE__ */ u({
|
|
13
|
+
name: "ArrayBaseAddition",
|
|
14
|
+
__name: "array-base-addition",
|
|
15
|
+
props: {
|
|
16
|
+
method: { default: "push" },
|
|
17
|
+
defaultValue: null,
|
|
18
|
+
title: null
|
|
19
|
+
},
|
|
20
|
+
setup(s) {
|
|
21
|
+
const r = s, n = z(), e = m();
|
|
22
|
+
function i() {
|
|
23
|
+
var l, o, w, D, x, I, R, S, U;
|
|
24
|
+
const a = T(r.defaultValue, e == null ? void 0 : e.schema.value);
|
|
25
|
+
r.method === "unshift" ? ((l = e == null ? void 0 : e.field) == null || l.value.unshift(a), (w = (o = e.attrs) == null ? void 0 : o.add) == null || w.call(o, 0)) : ((D = e == null ? void 0 : e.field) == null || D.value.push(a), (U = (x = e.attrs) == null ? void 0 : x.add) == null || U.call(x, ((S = (R = (I = e == null ? void 0 : e.field) == null ? void 0 : I.value) == null ? void 0 : R.value) == null ? void 0 : S.length) - 1));
|
|
26
|
+
}
|
|
27
|
+
return (a, l) => t(e).field.value.pattern === "editable" ? (c(), _(t(h), {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: p(`${t(f)}-addition`),
|
|
30
|
+
icon: t(H),
|
|
31
|
+
underline: t(A)(),
|
|
32
|
+
role: "button",
|
|
33
|
+
"aria-label": "添加条目",
|
|
34
|
+
onClick: i
|
|
35
|
+
}, {
|
|
36
|
+
default: M(() => [
|
|
37
|
+
y(k(t(n).title || r.title), 1)
|
|
38
|
+
]),
|
|
39
|
+
_: 1
|
|
40
|
+
}, 8, ["class", "icon", "underline"])) : v("", !0);
|
|
41
|
+
}
|
|
42
|
+
}), Q = /* @__PURE__ */ u({
|
|
43
|
+
name: "ArrayBaseIndex",
|
|
44
|
+
__name: "array-base-index",
|
|
45
|
+
setup(s) {
|
|
46
|
+
const r = $();
|
|
47
|
+
return (n, e) => (c(), b("span", {
|
|
48
|
+
class: p(`${t(f)}-index`)
|
|
49
|
+
}, [
|
|
50
|
+
d(n.$slots, "default", { index: t(r) }, () => [
|
|
51
|
+
y(" #" + k(t(r) + 1) + ". ", 1)
|
|
52
|
+
])
|
|
53
|
+
], 2));
|
|
54
|
+
}
|
|
55
|
+
}), W = /* @__PURE__ */ u({
|
|
56
|
+
name: "ArrayBaseInner",
|
|
57
|
+
inheritAttrs: !1,
|
|
58
|
+
__name: "array-base-inner",
|
|
59
|
+
props: {
|
|
60
|
+
disabled: { type: Boolean },
|
|
61
|
+
keyMap: null
|
|
62
|
+
},
|
|
63
|
+
setup(s) {
|
|
64
|
+
const r = s, n = z(), e = E();
|
|
65
|
+
return V(G, {
|
|
66
|
+
field: n,
|
|
67
|
+
schema: e,
|
|
68
|
+
props: r,
|
|
69
|
+
attrs: g(),
|
|
70
|
+
keyMap: r.keyMap
|
|
71
|
+
}), (i, a) => d(i.$slots, "default");
|
|
72
|
+
}
|
|
73
|
+
}), X = /* @__PURE__ */ u({
|
|
74
|
+
name: "ArrayBaseItem",
|
|
75
|
+
__name: "array-base-item",
|
|
76
|
+
props: {
|
|
77
|
+
index: null,
|
|
78
|
+
record: null
|
|
79
|
+
},
|
|
80
|
+
setup(s) {
|
|
81
|
+
return V(J, s), (n, e) => d(n.$slots, "default");
|
|
82
|
+
}
|
|
83
|
+
}), Y = /* @__PURE__ */ u({
|
|
84
|
+
name: "ArrayBaseMoveDown",
|
|
85
|
+
__name: "array-base-move-down",
|
|
86
|
+
props: {
|
|
87
|
+
title: null
|
|
88
|
+
},
|
|
89
|
+
setup(s) {
|
|
90
|
+
const r = s, n = $(), e = m();
|
|
91
|
+
function i() {
|
|
92
|
+
var a, l;
|
|
93
|
+
C(e == null ? void 0 : e.keyMap) && e.keyMap.splice(
|
|
94
|
+
n.value + 1,
|
|
95
|
+
0,
|
|
96
|
+
e.keyMap.splice(n.value, 1)[0]
|
|
97
|
+
), e == null || e.field.value.moveDown(n.value), (l = (a = e == null ? void 0 : e.attrs) == null ? void 0 : a.moveDown) == null || l.call(a, n.value);
|
|
98
|
+
}
|
|
99
|
+
return (a, l) => {
|
|
100
|
+
var o;
|
|
101
|
+
return ((o = t(e)) == null ? void 0 : o.field.value.pattern) === "editable" ? (c(), _(t(h), {
|
|
102
|
+
key: 0,
|
|
103
|
+
class: p(`${t(f)}-move-down`),
|
|
104
|
+
size: "small",
|
|
105
|
+
icon: t(N),
|
|
106
|
+
underline: t(A)(),
|
|
107
|
+
role: "button",
|
|
108
|
+
"aria-label": "下移条目",
|
|
109
|
+
onClick: B(i, ["stop"])
|
|
110
|
+
}, {
|
|
111
|
+
default: M(() => [
|
|
112
|
+
d(a.$slots, "default", {}, () => [
|
|
113
|
+
y(k(r.title), 1)
|
|
114
|
+
])
|
|
115
|
+
]),
|
|
116
|
+
_: 3
|
|
117
|
+
}, 8, ["class", "icon", "underline"])) : v("", !0);
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}), Z = /* @__PURE__ */ u({
|
|
121
|
+
name: "ArrayBaseMoveUp",
|
|
122
|
+
__name: "array-base-move-up",
|
|
123
|
+
props: {
|
|
124
|
+
title: null
|
|
125
|
+
},
|
|
126
|
+
setup(s) {
|
|
127
|
+
const r = s, n = $(), e = m();
|
|
128
|
+
function i() {
|
|
129
|
+
var a, l;
|
|
130
|
+
C(e == null ? void 0 : e.keyMap) && e.keyMap.splice(
|
|
131
|
+
n.value - 1,
|
|
132
|
+
0,
|
|
133
|
+
e.keyMap.splice(n.value, 1)[0]
|
|
134
|
+
), e == null || e.field.value.moveUp(n.value), (l = (a = e == null ? void 0 : e.attrs) == null ? void 0 : a.moveUp) == null || l.call(a, n.value);
|
|
135
|
+
}
|
|
136
|
+
return (a, l) => {
|
|
137
|
+
var o;
|
|
138
|
+
return ((o = t(e)) == null ? void 0 : o.field.value.pattern) === "editable" ? (c(), _(t(h), {
|
|
139
|
+
key: 0,
|
|
140
|
+
class: p(`${t(f)}-move-up`),
|
|
141
|
+
size: "small",
|
|
142
|
+
icon: t(P),
|
|
143
|
+
underline: t(A)(),
|
|
144
|
+
role: "button",
|
|
145
|
+
"aria-label": "上移条目",
|
|
146
|
+
onClick: B(i, ["stop"])
|
|
147
|
+
}, {
|
|
148
|
+
default: M(() => [
|
|
149
|
+
d(a.$slots, "default", {}, () => [
|
|
150
|
+
y(k(r.title), 1)
|
|
151
|
+
])
|
|
152
|
+
]),
|
|
153
|
+
_: 3
|
|
154
|
+
}, 8, ["class", "icon", "underline"])) : v("", !0);
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
}), ee = /* @__PURE__ */ u({
|
|
158
|
+
name: "ArrayBaseRemove",
|
|
159
|
+
__name: "array-base-remove",
|
|
160
|
+
props: {
|
|
161
|
+
title: null
|
|
162
|
+
},
|
|
163
|
+
setup(s) {
|
|
164
|
+
const r = s, n = $(), e = m();
|
|
165
|
+
function i() {
|
|
166
|
+
var a, l, o;
|
|
167
|
+
C(e == null ? void 0 : e.keyMap) && ((a = e == null ? void 0 : e.keyMap) == null || a.splice(n.value, 1)), e == null || e.field.value.remove(n.value), (o = (l = e == null ? void 0 : e.attrs) == null ? void 0 : l.remove) == null || o.call(l, n.value);
|
|
168
|
+
}
|
|
169
|
+
return (a, l) => {
|
|
170
|
+
var o;
|
|
171
|
+
return ((o = t(e)) == null ? void 0 : o.field.value.pattern) === "editable" ? (c(), _(t(h), {
|
|
172
|
+
key: 0,
|
|
173
|
+
class: p(`${t(f)}-remove`),
|
|
174
|
+
size: "small",
|
|
175
|
+
icon: t(K),
|
|
176
|
+
underline: t(A)(),
|
|
177
|
+
role: "button",
|
|
178
|
+
"aria-label": "移除条目",
|
|
179
|
+
onClick: B(i, ["stop"])
|
|
180
|
+
}, {
|
|
181
|
+
default: M(() => [
|
|
182
|
+
d(a.$slots, "default", {}, () => [
|
|
183
|
+
y(k(r.title), 1)
|
|
184
|
+
])
|
|
185
|
+
]),
|
|
186
|
+
_: 3
|
|
187
|
+
}, 8, ["class", "icon", "underline"])) : v("", !0);
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
}), te = /* @__PURE__ */ u({
|
|
191
|
+
name: "ArrayBaseSortHandle",
|
|
192
|
+
__name: "array-base-sort-handle",
|
|
193
|
+
setup(s) {
|
|
194
|
+
const r = m();
|
|
195
|
+
return (n, e) => {
|
|
196
|
+
var i;
|
|
197
|
+
return ((i = t(r).field.value) == null ? void 0 : i.pattern) === "editable" ? (c(), _(t(h), {
|
|
198
|
+
key: 0,
|
|
199
|
+
class: p(`${t(f)}-sort-handle`),
|
|
200
|
+
size: "small",
|
|
201
|
+
icon: t(L),
|
|
202
|
+
underline: t(A)(),
|
|
203
|
+
role: "button",
|
|
204
|
+
"aria-label": "拖拽排序",
|
|
205
|
+
"aria-dropeffect": "move"
|
|
206
|
+
}, null, 8, ["class", "icon", "underline"])) : v("", !0);
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
}), me = F(W, {
|
|
210
|
+
Index: Q,
|
|
211
|
+
Item: X,
|
|
212
|
+
SortHandle: te,
|
|
213
|
+
Addition: O,
|
|
214
|
+
Remove: ee,
|
|
215
|
+
MoveDown: Y,
|
|
216
|
+
MoveUp: Z,
|
|
217
|
+
useArray: m,
|
|
218
|
+
useIndex: $,
|
|
219
|
+
useKey: q,
|
|
220
|
+
useRecord: j
|
|
221
|
+
});
|
|
222
|
+
export {
|
|
223
|
+
me as ArrayBase
|
|
224
|
+
};
|
|
225
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/array-base/array-base-addition.vue","../../src/array-base/array-base-index.vue","../../src/array-base/array-base-inner.vue","../../src/array-base/array-base-item.vue","../../src/array-base/array-base-move-down.vue","../../src/array-base/array-base-move-up.vue","../../src/array-base/array-base-remove.vue","../../src/array-base/array-base-sort-handle.vue","../../src/array-base/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { IArrayBaseAdditionProps } from './types'\nimport { Plus } from '@element-plus/icons-vue'\nimport { useField } from '@formily/vue'\nimport { ElLink } from 'element-plus'\nimport { compatibleUnderlineProp, getDefaultValue, prefixCls, useArray } from './utils'\n\ndefineOptions({\n name: 'ArrayBaseAddition',\n})\n\nconst props = defineProps({\n method: { default: 'push' },\n defaultValue: null,\n title: null\n})\n\nconst self = useField()\nconst base = useArray()\n\nfunction onAddItemClick() {\n const defaultValue = getDefaultValue(props.defaultValue, base?.schema.value)\n if (props.method === 'unshift') {\n base?.field?.value.unshift(defaultValue)\n base.attrs?.add?.(0)\n }\n else {\n base?.field?.value.push(defaultValue)\n base.attrs?.add?.(base?.field?.value?.value?.length - 1)\n }\n}\n</script>\n\n<template>\n <ElLink\n v-if=\"base.field.value.pattern === 'editable'\"\n :class=\"`${prefixCls}-addition`\"\n :icon=\"Plus\"\n :underline=\"compatibleUnderlineProp()\"\n role=\"button\"\n aria-label=\"添加条目\"\n @click=\"onAddItemClick\"\n >\n {{ self.title || props.title }}\n </ElLink>\n</template>\n","<script lang=\"ts\" setup>\nimport { prefixCls, useIndex } from './utils'\n\ndefineOptions({\n name: 'ArrayBaseIndex',\n})\n\nconst index = useIndex()\n</script>\n\n<template>\n <span :class=\"`${prefixCls}-index`\">\n <slot :index=\"index\">\n #{{ index + 1 }}.\n </slot>\n </span>\n</template>\n","<script lang=\"ts\" setup>\nimport type { ArrayField } from '@formily/core'\nimport type { IArrayBaseProps } from './types'\nimport { useField, useFieldSchema } from '@formily/vue'\nimport { provide, useAttrs } from 'vue'\nimport { ArrayBaseSymbol } from './symbols'\n\ndefineOptions({\n name: 'ArrayBaseInner',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n disabled: { type: Boolean },\n keyMap: null\n})\n\nconst field = useField<ArrayField>()\nconst schema = useFieldSchema()\n\nprovide(ArrayBaseSymbol, {\n field,\n schema,\n props,\n attrs: useAttrs(),\n keyMap: props.keyMap,\n})\n</script>\n\n<template>\n <slot />\n</template>\n","<script lang=\"ts\" setup>\nimport type { IArrayBaseItemProps } from './types'\nimport { provide } from 'vue'\nimport { ItemSymbol } from './symbols'\n\ndefineOptions({\n name: 'ArrayBaseItem',\n})\n\nconst props = defineProps({\n index: null,\n record: null\n})\n\nprovide(ItemSymbol, props)\n</script>\n\n<template>\n <slot />\n</template>\n","<script lang=\"ts\" setup>\nimport type { IArrayBaseOperationProps } from './types'\nimport { ArrowDown } from '@element-plus/icons-vue'\nimport { isArr } from '@formily/shared'\nimport { ElLink } from 'element-plus'\nimport { compatibleUnderlineProp, prefixCls, useArray, useIndex } from './utils'\n\ndefineOptions({\n name: 'ArrayBaseMoveDown',\n})\n\nconst props = defineProps({\n title: null\n})\n\nconst indexRef = useIndex()\nconst base = useArray()\n\nfunction handleClick() {\n if (isArr(base?.keyMap)) {\n base.keyMap.splice(\n indexRef.value + 1,\n 0,\n base.keyMap.splice(indexRef.value, 1)[0],\n )\n }\n base?.field.value.moveDown(indexRef.value as number)\n base?.attrs?.moveDown?.(indexRef.value as number)\n}\n</script>\n\n<template>\n <ElLink\n v-if=\"base?.field.value.pattern === 'editable'\"\n :class=\"`${prefixCls}-move-down`\"\n size=\"small\"\n :icon=\"ArrowDown\"\n :underline=\"compatibleUnderlineProp()\"\n role=\"button\"\n aria-label=\"下移条目\"\n @click.stop=\"handleClick\"\n >\n <slot>\n {{ props.title }}\n </slot>\n </ElLink>\n</template>\n","<script lang=\"ts\" setup>\nimport type { IArrayBaseOperationProps } from './types'\nimport { ArrowUp } from '@element-plus/icons-vue'\nimport { isArr } from '@formily/shared'\nimport { ElLink } from 'element-plus'\nimport { compatibleUnderlineProp, prefixCls, useArray, useIndex } from './utils'\n\ndefineOptions({\n name: 'ArrayBaseMoveUp',\n})\n\nconst props = defineProps({\n title: null\n})\n\nconst indexRef = useIndex()\nconst base = useArray()\n\nfunction handleClick() {\n if (isArr(base?.keyMap)) {\n base.keyMap.splice(\n indexRef.value - 1,\n 0,\n base.keyMap.splice(indexRef.value, 1)[0],\n )\n }\n base?.field.value.moveUp(indexRef.value as number)\n base?.attrs?.moveUp?.(indexRef.value as number)\n}\n</script>\n\n<template>\n <ElLink\n v-if=\"base?.field.value.pattern === 'editable'\"\n :class=\"`${prefixCls}-move-up`\"\n size=\"small\"\n :icon=\"ArrowUp\"\n :underline=\"compatibleUnderlineProp()\"\n role=\"button\"\n aria-label=\"上移条目\"\n @click.stop=\"handleClick\"\n >\n <slot>\n {{ props.title }}\n </slot>\n </ElLink>\n</template>\n","<script lang=\"ts\" setup>\nimport type { IArrayBaseOperationProps } from './types'\nimport { Delete } from '@element-plus/icons-vue'\nimport { isArr } from '@formily/shared'\nimport { ElLink } from 'element-plus'\nimport { compatibleUnderlineProp, prefixCls, useArray, useIndex } from './utils'\n\ndefineOptions({\n name: 'ArrayBaseRemove',\n})\n\nconst props = defineProps({\n title: null\n})\n\nconst indexRef = useIndex()\nconst base = useArray()\n\nfunction handleClick() {\n if (isArr(base?.keyMap)) {\n base?.keyMap?.splice(indexRef.value, 1)\n }\n\n base?.field.value.remove(indexRef.value as number)\n base?.attrs?.remove?.(indexRef.value as number)\n}\n</script>\n\n<template>\n <ElLink\n v-if=\"base?.field.value.pattern === 'editable'\"\n :class=\"`${prefixCls}-remove`\"\n size=\"small\"\n :icon=\"Delete\"\n :underline=\"compatibleUnderlineProp()\"\n role=\"button\"\n aria-label=\"移除条目\"\n @click.stop=\"handleClick\"\n >\n <slot>\n {{ props.title }}\n </slot>\n </ElLink>\n</template>\n","<script lang=\"ts\" setup>\nimport { Rank } from '@element-plus/icons-vue'\nimport { ElLink } from 'element-plus'\nimport { compatibleUnderlineProp, prefixCls, useArray } from './utils'\n\ndefineOptions({\n name: 'ArrayBaseSortHandle',\n})\n\nconst array = useArray()\n</script>\n\n<template>\n <ElLink\n v-if=\"array.field.value?.pattern === 'editable'\"\n :class=\"`${prefixCls}-sort-handle`\"\n size=\"small\"\n :icon=\"Rank\"\n :underline=\"compatibleUnderlineProp()\"\n role=\"button\"\n aria-label=\"拖拽排序\"\n aria-dropeffect=\"move\"\n />\n</template>\n","import { composeExport } from '../__builtins__/shared'\nimport ArrayBaseAddition from './array-base-addition.vue'\nimport ArrayBaseIndex from './array-base-index.vue'\nimport ArrayBaseInner from './array-base-inner.vue'\nimport ArrayBaseItem from './array-base-item.vue'\nimport ArrayBaseMoveDown from './array-base-move-down.vue'\nimport ArrayBaseMoveUp from './array-base-move-up.vue'\nimport ArrayBaseRemove from './array-base-remove.vue'\nimport ArrayBaseSortHandle from './array-base-sort-handle.vue'\nimport { useArray, useIndex, useKey, useRecord } from './utils'\nimport './style.scss'\n\nexport const ArrayBase = composeExport(ArrayBaseInner, {\n Index: ArrayBaseIndex,\n Item: ArrayBaseItem,\n SortHandle: ArrayBaseSortHandle,\n Addition: ArrayBaseAddition,\n Remove: ArrayBaseRemove,\n MoveDown: ArrayBaseMoveDown,\n MoveUp: ArrayBaseMoveUp,\n useArray,\n useIndex,\n useKey,\n useRecord,\n})\n"],"names":["props","__props","self","useField","base","useArray","onAddItemClick","defaultValue","getDefaultValue","_a","_c","_b","_d","_i","_e","_h","_g","_f","_unref","_createBlock","ElLink","prefixCls","Plus","compatibleUnderlineProp","_createTextVNode","_toDisplayString","index","useIndex","_createElementBlock","_renderSlot","_ctx","field","schema","useFieldSchema","provide","ArrayBaseSymbol","useAttrs","ItemSymbol","indexRef","handleClick","isArr","ArrowDown","ArrowUp","Delete","array","Rank","ArrayBase","composeExport","ArrayBaseInner","ArrayBaseIndex","ArrayBaseItem","ArrayBaseSortHandle","ArrayBaseAddition","ArrayBaseRemove","ArrayBaseMoveDown","ArrayBaseMoveUp","useKey","useRecord"],"mappings":";;;;;;;;;;;;;;;;;;;;AAWA,UAAMA,IAAQC,GAMRC,IAAOC,EAAA,GACPC,IAAOC,EAAA;AAEb,aAASC,IAAiB;;AACxB,YAAMC,IAAeC,EAAgBR,EAAM,cAAcI,KAAA,gBAAAA,EAAM,OAAO,KAAK;AAC3E,MAAIJ,EAAM,WAAW,cACnBS,IAAAL,KAAA,gBAAAA,EAAM,UAAN,QAAAK,EAAa,MAAM,QAAQF,KAC3BG,KAAAC,IAAAP,EAAK,UAAL,gBAAAO,EAAY,QAAZ,QAAAD,EAAA,KAAAC,GAAkB,QAGlBC,IAAAR,KAAA,gBAAAA,EAAM,UAAN,QAAAQ,EAAa,MAAM,KAAKL,KACxBM,KAAAC,IAAAV,EAAK,UAAL,gBAAAU,EAAY,QAAZ,QAAAD,EAAA,KAAAC,KAAkBC,KAAAC,KAAAC,IAAAb,KAAA,gBAAAA,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K,GAAA,CAAA;AAAA,UAAA;;;;;;;;;;AC/BpB,UAAM4C,IAAQvC,EAAA;;;AAKJ,eAAAa,IAAAA,EAAA0B,CAAA,EAAM,MAAM,UAAZ1B,gBAAAA,EAAmB,aAAO,mBADlCC,EASED,EAAAE,CAAA,GAAA;AAAA;QAPC,YAAUF,EAAAG,CAAA,CAAS,cAAA;AAAA,QACpB,MAAK;AAAA,QACJ,MAAMH,EAAA2B,CAAA;AAAA,QACN,WAAW3B,EAAAK,CAAA,EAAA;AAAA,QACZ,MAAK;AAAA,QACL,cAAW;AAAA,QACX,mBAAgB;AAAA,MAAA;;;ICTPuB,KAAYC,EAAcC,GAAgB;AAAA,EACrD,OAAOC;AAAAA,EACP,MAAMC;AAAAA,EACN,YAAYC;AAAAA,EACZ,UAAUC;AAAAA,EACV,QAAQC;AAAAA,EACR,UAAUC;AAAAA,EACV,QAAQC;AAAAA,EACR,UAAAlD;AAAA,EACA,UAAAsB;AAAA,EACA,QAAA6B;AAAA,EACA,WAAAC;AACF,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbols.mjs","sources":["../../src/array-base/symbols.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\nimport type { IArrayBaseContext, IArrayBaseItemProps } from './types'\n\nexport const ArrayBaseSymbol: InjectionKey<IArrayBaseContext> = Symbol('ArrayBaseContext')\nexport const ItemSymbol: InjectionKey<IArrayBaseItemProps> = Symbol('ItemContext')\n"],"names":["ArrayBaseSymbol","ItemSymbol"],"mappings":"AAGO,MAAMA,IAAmD,OAAO,kBAAkB,GAC5EC,IAAgD,OAAO,aAAa;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ArrayField } from '@formily/core';
|
|
2
|
+
import { Schema } from '@formily/json-schema';
|
|
3
|
+
import { Ref } from 'vue';
|
|
4
|
+
export interface IArrayBaseAdditionProps {
|
|
5
|
+
method?: 'push' | 'unshift';
|
|
6
|
+
defaultValue?: any;
|
|
7
|
+
title?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface IArrayBaseOperationProps {
|
|
10
|
+
title?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IArrayBaseProps {
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
keyMap?: WeakMap<Record<string, unknown>, string> | string[];
|
|
15
|
+
}
|
|
16
|
+
export interface IArrayBaseItemProps {
|
|
17
|
+
index: number;
|
|
18
|
+
record: any;
|
|
19
|
+
}
|
|
20
|
+
export interface IArrayBaseContext {
|
|
21
|
+
field: Ref<ArrayField>;
|
|
22
|
+
schema: Ref<Schema>;
|
|
23
|
+
props: IArrayBaseProps;
|
|
24
|
+
attrs: {
|
|
25
|
+
[key in string]?: any;
|
|
26
|
+
};
|
|
27
|
+
keyMap?: WeakMap<Record<string, unknown>, string> | string[] | null;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ISchema, Schema } from '@formily/json-schema';
|
|
2
|
+
export declare const prefixCls = "formily-element-plus-array-base";
|
|
3
|
+
export declare function compatibleUnderlineProp(): false | "never";
|
|
4
|
+
export declare function useArray(): import('./types').IArrayBaseContext;
|
|
5
|
+
export declare function useIndex(): import('vue').Ref<number, number>;
|
|
6
|
+
export declare function useRecord(): import('vue').Ref<any, any>;
|
|
7
|
+
export declare function useKey(schema: Schema): {
|
|
8
|
+
keyMap: string[] | WeakMap<Record<string, unknown>, string>;
|
|
9
|
+
getKey: (record: any, index?: number) => string;
|
|
10
|
+
};
|
|
11
|
+
export declare function getDefaultValue(defaultValue: any, schema: Schema): any;
|
|
12
|
+
export declare function getArrayItemSchema(schema: ISchema, index: number): ISchema;
|
|
13
|
+
export declare function isAdditionComponent(schema: ISchema): boolean;
|
|
14
|
+
export declare function isIndexComponent(schema: ISchema): boolean;
|
|
15
|
+
export declare function isRemoveComponent(schema: ISchema): boolean;
|
|
16
|
+
export declare function isMoveUpComponent(schema: ISchema): boolean;
|
|
17
|
+
export declare function isMoveDownComponent(schema: ISchema): boolean;
|
|
18
|
+
export declare function isOperationComponent(schema: ISchema): boolean;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { isArr as l, uid as u, isValid as x, clone as m } from "@formily/shared";
|
|
2
|
+
import { version as d } from "element-plus";
|
|
3
|
+
import { toRefs as f, inject as i } from "vue";
|
|
4
|
+
import { stylePrefix as s } from "../__builtins__/configs/index.mjs";
|
|
5
|
+
import "@formily/reactive";
|
|
6
|
+
import { lt as A } from "../__builtins__/shared/simple-version-compare.mjs";
|
|
7
|
+
import "@formily/core";
|
|
8
|
+
import "@formily/reactive-vue";
|
|
9
|
+
import "@formily/vue";
|
|
10
|
+
import { ItemSymbol as p, ArrayBaseSymbol as b } from "./symbols.mjs";
|
|
11
|
+
const K = `${s}-array-base`;
|
|
12
|
+
function P() {
|
|
13
|
+
/* istanbul ignore next -- @preserve */
|
|
14
|
+
return A(d, "2.9.9") ? !1 : "never";
|
|
15
|
+
}
|
|
16
|
+
function W() {
|
|
17
|
+
return i(b, null);
|
|
18
|
+
}
|
|
19
|
+
function B() {
|
|
20
|
+
const { index: n } = f(i(p));
|
|
21
|
+
return n;
|
|
22
|
+
}
|
|
23
|
+
/* istanbul ignore next -- @preserve */
|
|
24
|
+
function V() {
|
|
25
|
+
const { record: n } = f(
|
|
26
|
+
i(p)
|
|
27
|
+
);
|
|
28
|
+
return n;
|
|
29
|
+
}
|
|
30
|
+
const y = (n) => {
|
|
31
|
+
var t, r;
|
|
32
|
+
return Array.isArray(n == null ? void 0 : n.items) ? y(n.items[0]) : ((t = n == null ? void 0 : n.items) == null ? void 0 : t.type) === "array" || ((r = n == null ? void 0 : n.items) == null ? void 0 : r.type) === "object";
|
|
33
|
+
};
|
|
34
|
+
function q(n) {
|
|
35
|
+
const t = y(n);
|
|
36
|
+
let r = null;
|
|
37
|
+
return r = t ? /* @__PURE__ */ new WeakMap() : [], {
|
|
38
|
+
keyMap: r,
|
|
39
|
+
getKey: (o, e) => r instanceof WeakMap ? (r.has(o) || r.set(o, u()), `${r.get(o)}`) : (r && !r[e] && (r[e] = u()), `${r[e]}`)
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function v(n, t) {
|
|
43
|
+
var r;
|
|
44
|
+
return x(n) ? m(n) : Array.isArray(t == null ? void 0 : t.items) ? v(n, t.items[0]) : ((r = t == null ? void 0 : t.items) == null ? void 0 : r.type) === "object" ? {} : null;
|
|
45
|
+
}
|
|
46
|
+
function z(n, t) {
|
|
47
|
+
return l(n.items) ? n.items[t] ?? n.items[0] : n.items;
|
|
48
|
+
}
|
|
49
|
+
function O(n) {
|
|
50
|
+
var t;
|
|
51
|
+
return ((t = n["x-component"]) == null ? void 0 : t.indexOf("Addition")) > -1;
|
|
52
|
+
}
|
|
53
|
+
function E(n) {
|
|
54
|
+
var t;
|
|
55
|
+
return ((t = n["x-component"]) == null ? void 0 : t.indexOf("Index")) > -1;
|
|
56
|
+
}
|
|
57
|
+
function C(n) {
|
|
58
|
+
var t;
|
|
59
|
+
return ((t = n["x-component"]) == null ? void 0 : t.indexOf("Remove")) > -1;
|
|
60
|
+
}
|
|
61
|
+
function M(n) {
|
|
62
|
+
var t;
|
|
63
|
+
return ((t = n["x-component"]) == null ? void 0 : t.indexOf("MoveUp")) > -1;
|
|
64
|
+
}
|
|
65
|
+
function R(n) {
|
|
66
|
+
var t;
|
|
67
|
+
return ((t = n["x-component"]) == null ? void 0 : t.indexOf("MoveDown")) > -1;
|
|
68
|
+
}
|
|
69
|
+
function F(n) {
|
|
70
|
+
return O(n) || C(n) || R(n) || M(n);
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
P as compatibleUnderlineProp,
|
|
74
|
+
z as getArrayItemSchema,
|
|
75
|
+
v as getDefaultValue,
|
|
76
|
+
O as isAdditionComponent,
|
|
77
|
+
E as isIndexComponent,
|
|
78
|
+
R as isMoveDownComponent,
|
|
79
|
+
M as isMoveUpComponent,
|
|
80
|
+
F as isOperationComponent,
|
|
81
|
+
C as isRemoveComponent,
|
|
82
|
+
K as prefixCls,
|
|
83
|
+
W as useArray,
|
|
84
|
+
B as useIndex,
|
|
85
|
+
q as useKey,
|
|
86
|
+
V as useRecord
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.mjs","sources":["../../src/array-base/utils.ts"],"sourcesContent":["import type { ISchema, Schema } from '@formily/json-schema'\nimport type { IArrayBaseItemProps } from './types'\nimport { clone, isArr, isValid, uid } from '@formily/shared'\nimport { version } from 'element-plus'\nimport { inject, toRefs } from 'vue'\nimport { lt, stylePrefix } from '../__builtins__'\nimport { ArrayBaseSymbol, ItemSymbol } from './symbols'\n\nexport const prefixCls = `${stylePrefix}-array-base`\n\nexport function compatibleUnderlineProp() {\n /* istanbul ignore next -- @preserve */\n return lt(version, '2.9.9') ? false : 'never'\n}\n\nexport function useArray() {\n return inject(ArrayBaseSymbol, null)\n}\n\nexport function useIndex() {\n const { index: indexRef } = toRefs(inject(ItemSymbol) as IArrayBaseItemProps)\n return indexRef\n}\n\n/* istanbul ignore next -- @preserve */\nexport function useRecord() {\n const { record: recordRef } = toRefs(\n inject(ItemSymbol) as IArrayBaseItemProps,\n )\n return recordRef\n}\n\nconst isObjectValue: (schema: Schema) => boolean = (schema: Schema) => {\n if (Array.isArray(schema?.items))\n return isObjectValue(schema.items[0])\n\n if (schema?.items?.type === 'array' || schema?.items?.type === 'object') {\n return true\n }\n return false\n}\n\nexport function useKey(schema: Schema) {\n const isObject = isObjectValue(schema)\n let keyMap: WeakMap<Record<string, unknown>, string> | string[] | null = null\n\n keyMap = isObject ? new WeakMap() : []\n\n return {\n keyMap,\n getKey: (record: any, index?: number) => {\n if (keyMap instanceof WeakMap) {\n if (!keyMap.has(record)) {\n keyMap.set(record, uid())\n }\n return `${keyMap.get(record)}`\n }\n\n if (keyMap && !keyMap[index]) {\n keyMap[index] = uid()\n }\n return `${keyMap[index]}`\n },\n }\n}\n\nexport function getDefaultValue(defaultValue: any, schema: Schema): any {\n if (isValid(defaultValue))\n return clone(defaultValue)\n if (Array.isArray(schema?.items))\n return getDefaultValue(defaultValue, schema.items[0])\n if (schema?.items?.type === 'object')\n return {}\n return null\n}\n\nexport function getArrayItemSchema(schema: ISchema, index: number): ISchema {\n return isArr(schema.items) ? schema.items[index] ?? schema.items[0] : schema.items\n}\n\nexport function isAdditionComponent(schema: ISchema) {\n return schema['x-component']?.indexOf('Addition') > -1\n}\n\nexport function isIndexComponent(schema: ISchema) {\n return schema['x-component']?.indexOf('Index') > -1\n}\n\nexport function isRemoveComponent(schema: ISchema) {\n return schema['x-component']?.indexOf('Remove') > -1\n}\n\nexport function isMoveUpComponent(schema: ISchema) {\n return schema['x-component']?.indexOf('MoveUp') > -1\n}\n\nexport function isMoveDownComponent(schema: ISchema) {\n return schema['x-component']?.indexOf('MoveDown') > -1\n}\n\nexport function isOperationComponent(schema: ISchema) {\n return (\n isAdditionComponent(schema)\n || isRemoveComponent(schema)\n || isMoveDownComponent(schema)\n || isMoveUpComponent(schema)\n )\n}\n"],"names":["prefixCls","stylePrefix","compatibleUnderlineProp","lt","version","useArray","inject","ArrayBaseSymbol","useIndex","indexRef","toRefs","ItemSymbol","useRecord","recordRef","isObjectValue","schema","_a","_b","useKey","isObject","keyMap","record","index","uid","getDefaultValue","defaultValue","isValid","clone","getArrayItemSchema","isArr","isAdditionComponent","isIndexComponent","isRemoveComponent","isMoveUpComponent","isMoveDownComponent","isOperationComponent"],"mappings":";;;;;;;;;;AAQO,MAAMA,IAAY,GAAGC,CAAW;AAEhC,SAASC,IAA0B;AAAA,EAAA;AAExC,SAAOC,EAAGC,GAAS,OAAO,IAAI,KAAQ;AACxC;AAEO,SAASC,IAAW;AACzB,SAAOC,EAAOC,GAAiB,IAAI;AACrC;AAEO,SAASC,IAAW;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,MAAMO,CAAK,KAAKP,EAAO,MAAM,CAAC,IAAIA,EAAO;AAC/E;AAEO,SAASe,EAAoBf,GAAiB;;AACnD,WAAOC,IAAAD,EAAO,aAAa,MAApB,gBAAAC,EAAuB,QAAQ,eAAc;AACtD;AAEO,SAASe,EAAiBhB,GAAiB;;AAChD,WAAOC,IAAAD,EAAO,aAAa,MAApB,gBAAAC,EAAuB,QAAQ,YAAW;AACnD;AAEO,SAASgB,EAAkBjB,GAAiB;;AACjD,WAAOC,IAAAD,EAAO,aAAa,MAApB,gBAAAC,EAAuB,QAAQ,aAAY;AACpD;AAEO,SAASiB,EAAkBlB,GAAiB;;AACjD,WAAOC,IAAAD,EAAO,aAAa,MAApB,gBAAAC,EAAuB,QAAQ,aAAY;AACpD;AAEO,SAASkB,EAAoBnB,GAAiB;;AACnD,WAAOC,IAAAD,EAAO,aAAa,MAApB,gBAAAC,EAAuB,QAAQ,eAAc;AACtD;AAEO,SAASmB,EAAqBpB,GAAiB;AACpD,SACEe,EAAoBf,CAAM,KACvBiB,EAAkBjB,CAAM,KACxBmB,EAAoBnB,CAAM,KAC1BkB,EAAkBlB,CAAM;AAE/B;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title?: string;
|
|
3
|
+
header?: string;
|
|
4
|
+
footer?: string;
|
|
5
|
+
bodyStyle?: Record<string, string>;
|
|
6
|
+
bodyClass?: string;
|
|
7
|
+
shadow?: 'always' | 'hover' | 'never';
|
|
8
|
+
value: any;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
shadow: "always" | "hover" | "never";
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
13
|
+
export default _default;
|