@silver-formily/element-plus 3.0.2 → 4.0.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/README.en-US.md +3 -1
- package/README.md +3 -1
- package/esm/__builtins__/configs/index.mjs +6 -5
- package/esm/__builtins__/configs/index.mjs.map +1 -1
- package/esm/__builtins__/shared/load-config-provider.mjs +19 -11
- package/esm/__builtins__/shared/load-config-provider.mjs.map +1 -1
- package/esm/__builtins__/shared/loading.mjs +50 -46
- package/esm/__builtins__/shared/loading.mjs.map +1 -1
- package/esm/__builtins__/shared/simple-version-compare.mjs +16 -15
- package/esm/__builtins__/shared/simple-version-compare.mjs.map +1 -1
- package/esm/__builtins__/shared/transform-component.mjs +30 -31
- package/esm/__builtins__/shared/transform-component.mjs.map +1 -1
- package/esm/__builtins__/shared/use-enter-submit.mjs +74 -62
- package/esm/__builtins__/shared/use-enter-submit.mjs.map +1 -1
- package/esm/__builtins__/shared/utils.mjs +44 -32
- package/esm/__builtins__/shared/utils.mjs.map +1 -1
- package/esm/_virtual/_/plugin-vue/export-helper.mjs +8 -0
- package/esm/array-base/array-base-addition.mjs +53 -0
- package/esm/array-base/array-base-addition.mjs.map +1 -0
- package/esm/array-base/array-base-index.mjs +17 -0
- package/esm/array-base/array-base-index.mjs.map +1 -0
- package/esm/array-base/array-base-inner.mjs +30 -0
- package/esm/array-base/array-base-inner.mjs.map +1 -0
- package/esm/array-base/array-base-item.mjs +21 -0
- package/esm/array-base/array-base-item.mjs.map +1 -0
- package/esm/array-base/array-base-move-down.mjs +45 -0
- package/esm/array-base/array-base-move-down.mjs.map +1 -0
- package/esm/array-base/array-base-move-up.mjs +45 -0
- package/esm/array-base/array-base-move-up.mjs.map +1 -0
- package/esm/array-base/array-base-remove.mjs +45 -0
- package/esm/array-base/array-base-remove.mjs.map +1 -0
- package/esm/array-base/array-base-sort-handle.mjs +33 -0
- package/esm/array-base/array-base-sort-handle.mjs.map +1 -0
- package/esm/array-base/index.mjs +28 -208
- package/esm/array-base/index.mjs.map +1 -1
- package/esm/array-base/style.css +36 -0
- package/esm/array-base/symbols.mjs +7 -6
- package/esm/array-base/symbols.mjs.map +1 -1
- package/esm/array-base/types.d.ts +23 -24
- package/esm/array-base/utils.d.ts +11 -17
- package/esm/array-base/utils.mjs +58 -60
- package/esm/array-base/utils.mjs.map +1 -1
- package/esm/array-cards/array-cards.mjs +109 -0
- package/esm/array-cards/array-cards.mjs.map +1 -0
- package/esm/array-cards/index.d.ts +120 -113
- package/esm/array-cards/index.mjs +19 -118
- package/esm/array-cards/index.mjs.map +1 -1
- package/esm/array-cards/style.css +20 -0
- package/esm/array-collapse/array-collapse-item.mjs +74 -0
- package/esm/array-collapse/array-collapse-item.mjs.map +1 -0
- package/esm/array-collapse/array-collapse.mjs +117 -0
- package/esm/array-collapse/array-collapse.mjs.map +1 -0
- package/esm/array-collapse/index.d.ts +137 -129
- package/esm/array-collapse/index.mjs +21 -174
- package/esm/array-collapse/index.mjs.map +1 -1
- package/esm/array-collapse/style.css +20 -0
- package/esm/array-collapse/utils.mjs +7 -12
- package/esm/array-collapse/utils.mjs.map +1 -1
- package/esm/array-items/array-items-item.mjs +22 -0
- package/esm/array-items/array-items-item.mjs.map +1 -0
- package/esm/array-items/array-items.mjs +88 -0
- package/esm/array-items/array-items.mjs.map +1 -0
- package/esm/array-items/index.d.ts +132 -125
- package/esm/array-items/index.mjs +21 -107
- package/esm/array-items/index.mjs.map +1 -1
- package/esm/array-items/style.css +22 -0
- package/esm/array-list-tabs/array-list-tabs.mjs +191 -0
- package/esm/array-list-tabs/array-list-tabs.mjs.map +1 -0
- package/esm/array-list-tabs/index.d.ts +80 -74
- package/esm/array-list-tabs/index.mjs +12 -186
- package/esm/array-list-tabs/index.mjs.map +1 -1
- package/esm/array-list-tabs/style.css +90 -0
- package/esm/array-list-tabs/utils.mjs +11 -15
- package/esm/array-list-tabs/utils.mjs.map +1 -1
- package/esm/array-table/array-table.mjs +236 -0
- package/esm/array-table/array-table.mjs.map +1 -0
- package/esm/array-table/index.d.ts +106 -1597
- package/esm/array-table/index.mjs +24 -223
- package/esm/array-table/index.mjs.map +1 -1
- package/esm/array-table/style.css +23 -0
- package/esm/array-table/types.d.ts +11 -6
- package/esm/array-table/utils.mjs +14 -22
- package/esm/array-table/utils.mjs.map +1 -1
- package/esm/array-tabs/array-tabs.mjs +92 -0
- package/esm/array-tabs/array-tabs.mjs.map +1 -0
- package/esm/array-tabs/index.d.ts +7 -2
- package/esm/array-tabs/index.mjs +8 -84
- package/esm/array-tabs/index.mjs.map +1 -1
- package/esm/array-tabs/style.css +7 -0
- package/esm/autocomplete/autocomplete.mjs +99 -0
- package/esm/autocomplete/autocomplete.mjs.map +1 -0
- package/esm/autocomplete/index.d.ts +44 -638
- package/esm/autocomplete/index.mjs +14 -113
- package/esm/autocomplete/index.mjs.map +1 -1
- package/esm/cascader/cascader.mjs +32 -0
- package/esm/cascader/cascader.mjs.map +1 -0
- package/esm/cascader/index.d.ts +34 -27
- package/esm/cascader/index.mjs +13 -50
- package/esm/cascader/index.mjs.map +1 -1
- package/esm/checkbox/checkbox-group.mjs +64 -0
- package/esm/checkbox/checkbox-group.mjs.map +1 -0
- package/esm/checkbox/index.d.ts +772 -766
- package/esm/checkbox/index.mjs +16 -69
- package/esm/checkbox/index.mjs.map +1 -1
- package/esm/color-picker/index.d.ts +214 -207
- package/esm/color-picker/index.mjs +13 -17
- package/esm/color-picker/index.mjs.map +1 -1
- package/esm/color-picker-panel/index.d.ts +118 -110
- package/esm/color-picker-panel/index.mjs +16 -25
- package/esm/color-picker-panel/index.mjs.map +1 -1
- package/esm/date-picker/index.d.ts +449 -441
- package/esm/date-picker/index.mjs +21 -29
- package/esm/date-picker/index.mjs.map +1 -1
- package/esm/date-picker/utils.mjs +21 -26
- package/esm/date-picker/utils.mjs.map +1 -1
- package/esm/date-picker-panel/index.d.ts +149 -141
- package/esm/date-picker-panel/index.mjs +23 -30
- package/esm/date-picker-panel/index.mjs.map +1 -1
- package/esm/editable/editable-popover.mjs +95 -0
- package/esm/editable/editable-popover.mjs.map +1 -0
- package/esm/editable/editable.mjs +113 -0
- package/esm/editable/editable.mjs.map +1 -0
- package/esm/editable/index.d.ts +60 -141
- package/esm/editable/index.mjs +17 -219
- package/esm/editable/index.mjs.map +1 -1
- package/esm/editable/style.css +29 -0
- package/esm/form/form.mjs +50 -70
- package/esm/form/form.mjs.map +1 -1
- package/esm/form/form.vue.d.ts +48 -0
- package/esm/form/index.d.ts +1 -1
- package/esm/form-button-group/form-button-group-sticky.mjs +37 -0
- package/esm/form-button-group/form-button-group-sticky.mjs.map +1 -0
- package/esm/form-button-group/form-button-group.mjs +71 -0
- package/esm/form-button-group/form-button-group.mjs.map +1 -0
- package/esm/form-button-group/index.d.ts +94 -87
- package/esm/form-button-group/index.mjs +10 -96
- package/esm/form-button-group/index.mjs.map +1 -1
- package/esm/form-button-group/style.css +281 -0
- package/esm/form-button-group/utils.mjs +7 -12
- package/esm/form-button-group/utils.mjs.map +1 -1
- package/esm/form-collapse/form-collapse.mjs +74 -0
- package/esm/form-collapse/form-collapse.mjs.map +1 -0
- package/esm/form-collapse/index.d.ts +43 -39
- package/esm/form-collapse/index.mjs +20 -86
- package/esm/form-collapse/index.mjs.map +1 -1
- package/esm/form-collapse/style.css +7 -0
- package/esm/form-collapse/utils.d.ts +21 -27
- package/esm/form-collapse/utils.mjs +48 -46
- package/esm/form-collapse/utils.mjs.map +1 -1
- package/esm/form-dialog/dialog-content.mjs +118 -0
- package/esm/form-dialog/dialog-content.mjs.map +1 -0
- package/esm/form-dialog/index.d.ts +8 -4
- package/esm/form-dialog/index.mjs +142 -211
- package/esm/form-dialog/index.mjs.map +1 -1
- package/esm/form-dialog/types.d.ts +38 -32
- package/esm/form-drawer/drawer-content.mjs +118 -0
- package/esm/form-drawer/drawer-content.mjs.map +1 -0
- package/esm/form-drawer/index.d.ts +8 -4
- package/esm/form-drawer/index.mjs +142 -204
- package/esm/form-drawer/index.mjs.map +1 -1
- package/esm/form-drawer/types.d.ts +38 -32
- package/esm/form-grid/form-grid-column.mjs +28 -0
- package/esm/form-grid/form-grid-column.mjs.map +1 -0
- package/esm/form-grid/form-grid.mjs +69 -0
- package/esm/form-grid/form-grid.mjs.map +1 -0
- package/esm/form-grid/hooks.mjs +7 -7
- package/esm/form-grid/hooks.mjs.map +1 -1
- package/esm/form-grid/index.d.ts +5 -2
- package/esm/form-grid/index.mjs +10 -109
- package/esm/form-grid/index.mjs.map +1 -1
- package/esm/form-grid/style.css +128 -0
- package/esm/form-item/form-item.mjs +308 -0
- package/esm/form-item/form-item.mjs.map +1 -0
- package/esm/form-item/form-item.vue.d.ts +29 -0
- package/esm/form-item/index.d.ts +81 -67
- package/esm/form-item/index.mjs +28 -332
- package/esm/form-item/index.mjs.map +1 -1
- package/esm/form-item/style.css +263 -0
- package/esm/form-item/types.d.ts +34 -29
- package/esm/form-item/utils.mjs +15 -15
- package/esm/form-item/utils.mjs.map +1 -1
- package/esm/form-layout/form-layout.mjs +103 -83
- package/esm/form-layout/form-layout.mjs.map +1 -1
- package/esm/form-layout/form-layout.vue.d.ts +28 -0
- package/esm/form-layout/index.d.ts +1 -1
- package/esm/form-layout/types.d.ts +24 -40
- package/esm/form-layout/utils.mjs +73 -99
- package/esm/form-layout/utils.mjs.map +1 -1
- package/esm/form-step/form-step-pane.mjs +15 -0
- package/esm/form-step/form-step-pane.mjs.map +1 -0
- package/esm/form-step/form-step.mjs +63 -0
- package/esm/form-step/form-step.mjs.map +1 -0
- package/esm/form-step/index.d.ts +29 -23
- package/esm/form-step/index.mjs +12 -93
- package/esm/form-step/index.mjs.map +1 -1
- package/esm/form-step/types.d.ts +19 -19
- package/esm/form-step/utils.d.ts +14 -10
- package/esm/form-step/utils.mjs +75 -59
- package/esm/form-step/utils.mjs.map +1 -1
- package/esm/form-tab/form-tab.mjs +79 -0
- package/esm/form-tab/form-tab.mjs.map +1 -0
- package/esm/form-tab/hooks.mjs +18 -16
- package/esm/form-tab/hooks.mjs.map +1 -1
- package/esm/form-tab/index.d.ts +5 -3
- package/esm/form-tab/index.mjs +10 -76
- package/esm/form-tab/index.mjs.map +1 -1
- package/esm/form-tab/style.css +4 -0
- package/esm/form-tab/utils.mjs +14 -13
- package/esm/form-tab/utils.mjs.map +1 -1
- package/esm/index.d.ts +55 -48
- package/esm/index.mjs +51 -103
- package/esm/input/index.d.ts +41 -46
- package/esm/input/index.mjs +16 -68
- package/esm/input/index.mjs.map +1 -1
- package/esm/input/input.mjs +41 -0
- package/esm/input/input.mjs.map +1 -0
- package/esm/input-number/index.d.ts +281 -275
- package/esm/input-number/index.mjs +12 -24
- package/esm/input-number/index.mjs.map +1 -1
- package/esm/input-tag/index.d.ts +29 -31
- package/esm/input-tag/index.mjs +13 -49
- package/esm/input-tag/index.mjs.map +1 -1
- package/esm/input-tag/input-tag.mjs +41 -0
- package/esm/input-tag/input-tag.mjs.map +1 -0
- package/esm/mention/index.d.ts +39 -49
- package/esm/mention/index.mjs +15 -96
- package/esm/mention/index.mjs.map +1 -1
- package/esm/mention/mention.mjs +77 -0
- package/esm/mention/mention.mjs.map +1 -0
- package/esm/pagination/components/jumper.mjs +11 -12
- package/esm/pagination/components/jumper.mjs.map +1 -1
- package/esm/pagination/components/jumper2.mjs +59 -0
- package/esm/pagination/components/jumper2.mjs.map +1 -0
- package/esm/pagination/components/next.mjs +18 -22
- package/esm/pagination/components/next.mjs.map +1 -1
- package/esm/pagination/components/next2.mjs +38 -0
- package/esm/pagination/components/next2.mjs.map +1 -0
- package/esm/pagination/components/pager.mjs +21 -22
- package/esm/pagination/components/pager.mjs.map +1 -1
- package/esm/pagination/components/pager2.mjs +229 -0
- package/esm/pagination/components/pager2.mjs.map +1 -0
- package/esm/pagination/components/prev.mjs +16 -22
- package/esm/pagination/components/prev.mjs.map +1 -1
- package/esm/pagination/components/prev2.mjs +38 -0
- package/esm/pagination/components/prev2.mjs.map +1 -0
- package/esm/pagination/components/sizes.mjs +32 -7
- package/esm/pagination/components/sizes.mjs.map +1 -1
- package/esm/pagination/components/sizes2.mjs +66 -0
- package/esm/pagination/components/sizes2.mjs.map +1 -0
- package/esm/pagination/components/total.mjs +10 -11
- package/esm/pagination/components/total.mjs.map +1 -1
- package/esm/pagination/components/total2.mjs +26 -0
- package/esm/pagination/components/total2.mjs.map +1 -0
- package/esm/pagination/pagination.mjs +271 -626
- package/esm/pagination/pagination.mjs.map +1 -1
- package/esm/password/index.d.ts +43 -48
- package/esm/password/index.mjs +11 -14
- package/esm/password/index.mjs.map +1 -1
- package/esm/picker-select/index.d.ts +47 -0
- package/esm/picker-select/index.mjs +14 -0
- package/esm/picker-select/index.mjs.map +1 -0
- package/esm/picker-select/picker-select.mjs +186 -0
- package/esm/picker-select/picker-select.mjs.map +1 -0
- package/esm/picker-select/types.d.ts +23 -0
- package/esm/preview-text/cascader.mjs +51 -0
- package/esm/preview-text/cascader.mjs.map +1 -0
- package/esm/preview-text/color-picker.mjs +37 -0
- package/esm/preview-text/color-picker.mjs.map +1 -0
- package/esm/preview-text/date-picker.mjs +61 -0
- package/esm/preview-text/date-picker.mjs.map +1 -0
- package/esm/preview-text/index.d.ts +107 -106
- package/esm/preview-text/index.mjs +25 -363
- package/esm/preview-text/index.mjs.map +1 -1
- package/esm/preview-text/input.mjs +39 -0
- package/esm/preview-text/input.mjs.map +1 -0
- package/esm/preview-text/preview.mjs +30 -0
- package/esm/preview-text/preview.mjs.map +1 -0
- package/esm/preview-text/rate.mjs +32 -0
- package/esm/preview-text/rate.mjs.map +1 -0
- package/esm/preview-text/select.mjs +42 -0
- package/esm/preview-text/select.mjs.map +1 -0
- package/esm/preview-text/style.css +16 -0
- package/esm/preview-text/time-picker.mjs +39 -0
- package/esm/preview-text/time-picker.mjs.map +1 -0
- package/esm/preview-text/tree.mjs +73 -0
- package/esm/preview-text/tree.mjs.map +1 -0
- package/esm/preview-text/utils.d.ts +10 -13
- package/esm/preview-text/utils.mjs +15 -15
- package/esm/preview-text/utils.mjs.map +1 -1
- package/esm/query-form/default-components.mjs +45 -45
- package/esm/query-form/default-components.mjs.map +1 -1
- package/esm/query-form/hooks.mjs +31 -26
- package/esm/query-form/hooks.mjs.map +1 -1
- package/esm/query-form/index.d.ts +115 -105
- package/esm/query-form/index.mjs +10 -333
- package/esm/query-form/index.mjs.map +1 -1
- package/esm/query-form/query-form-light.mjs +86 -0
- package/esm/query-form/query-form-light.mjs.map +1 -0
- package/esm/query-form/query-form.mjs +263 -0
- package/esm/query-form/query-form.mjs.map +1 -0
- package/esm/query-form/style.css +27 -0
- package/esm/query-form/types.d.ts +42 -41
- package/esm/query-form-item/index.d.ts +138 -131
- package/esm/query-form-item/index.mjs +15 -183
- package/esm/query-form-item/index.mjs.map +1 -1
- package/esm/query-form-item/query-form-item.mjs +195 -0
- package/esm/query-form-item/query-form-item.mjs.map +1 -0
- package/esm/query-form-item/style.css +12 -0
- package/esm/query-form-item/types.d.ts +42 -38
- package/esm/radio/index.d.ts +482 -472
- package/esm/radio/index.mjs +15 -68
- package/esm/radio/index.mjs.map +1 -1
- package/esm/radio/radio-group.mjs +70 -0
- package/esm/radio/radio-group.mjs.map +1 -0
- package/esm/{styles/radio/index.css → radio/style.css} +3 -1
- package/esm/rate/index.d.ts +190 -184
- package/esm/rate/index.mjs +13 -17
- package/esm/rate/index.mjs.map +1 -1
- package/esm/reset/index.d.ts +5 -2
- package/esm/reset/index.mjs +8 -44
- package/esm/reset/index.mjs.map +1 -1
- package/esm/reset/reset.mjs +42 -0
- package/esm/reset/reset.mjs.map +1 -0
- package/esm/segmented/index.d.ts +31 -25
- package/esm/segmented/index.mjs +13 -40
- package/esm/segmented/index.mjs.map +1 -1
- package/esm/segmented/segmented.mjs +26 -0
- package/esm/segmented/segmented.mjs.map +1 -0
- package/esm/select/index.d.ts +108 -121
- package/esm/select/index.mjs +14 -127
- package/esm/select/index.mjs.map +1 -1
- package/esm/select/select.mjs +95 -0
- package/esm/select/select.mjs.map +1 -0
- package/esm/select-table/index.d.ts +53 -1546
- package/esm/select-table/index.mjs +12 -204
- package/esm/select-table/index.mjs.map +1 -1
- package/esm/select-table/select-table.mjs +202 -0
- package/esm/select-table/select-table.mjs.map +1 -0
- package/esm/select-table/style.css +14 -0
- package/esm/select-table/types.d.ts +21 -16
- package/esm/shared/overlay-elements.mjs +15 -16
- package/esm/shared/overlay-elements.mjs.map +1 -1
- package/esm/shared/url-change-listener.mjs +50 -0
- package/esm/shared/url-change-listener.mjs.map +1 -0
- package/esm/slider/index.d.ts +182 -174
- package/esm/slider/index.mjs +13 -17
- package/esm/slider/index.mjs.map +1 -1
- package/esm/space/index.d.ts +2 -1
- package/esm/space/index.mjs +2 -6
- package/esm/submit/index.d.ts +5 -2
- package/esm/submit/index.mjs +8 -40
- package/esm/submit/index.mjs.map +1 -1
- package/esm/submit/submit.mjs +41 -0
- package/esm/submit/submit.mjs.map +1 -0
- package/esm/switch/index.d.ts +255 -249
- package/esm/switch/index.mjs +8 -13
- package/esm/switch/index.mjs.map +1 -1
- package/esm/time-picker/index.d.ts +451 -443
- package/esm/time-picker/index.mjs +10 -17
- package/esm/time-picker/index.mjs.map +1 -1
- package/esm/time-select/index.d.ts +189 -182
- package/esm/time-select/index.mjs +13 -17
- package/esm/time-select/index.mjs.map +1 -1
- package/esm/transfer/index.d.ts +246 -238
- package/esm/transfer/index.mjs +8 -11
- package/esm/transfer/index.mjs.map +1 -1
- package/esm/tree/index.d.ts +40 -33
- package/esm/tree/index.mjs +14 -104
- package/esm/tree/index.mjs.map +1 -1
- package/esm/tree/tree.mjs +127 -0
- package/esm/tree/tree.mjs.map +1 -0
- package/esm/tree/types.d.ts +17 -12
- package/esm/tree/utils.mjs +157 -149
- package/esm/tree/utils.mjs.map +1 -1
- package/esm/tree-select/index.d.ts +22 -15
- package/esm/tree-select/index.mjs +13 -40
- package/esm/tree-select/index.mjs.map +1 -1
- package/esm/tree-select/tree-select.mjs +38 -0
- package/esm/tree-select/tree-select.mjs.map +1 -0
- package/esm/upload/index.d.ts +117 -696
- package/esm/upload/index.mjs +11 -172
- package/esm/upload/index.mjs.map +1 -1
- package/esm/upload/upload.mjs +176 -0
- package/esm/upload/upload.mjs.map +1 -0
- package/package.json +24 -25
- package/esm/__builtins__/configs/index.d.ts +0 -1
- package/esm/__builtins__/index.d.ts +0 -2
- package/esm/__builtins__/index.mjs +0 -23
- package/esm/__builtins__/index.mjs.map +0 -1
- package/esm/__builtins__/shared/index.d.ts +0 -6
- package/esm/__builtins__/shared/index.mjs +0 -21
- package/esm/__builtins__/shared/index.mjs.map +0 -1
- package/esm/__builtins__/shared/load-config-provider.d.ts +0 -2
- package/esm/__builtins__/shared/loading.d.ts +0 -12
- package/esm/__builtins__/shared/simple-version-compare.d.ts +0 -2
- package/esm/__builtins__/shared/transform-component.d.ts +0 -3
- 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/use-enter-submit.d.ts +0 -9
- package/esm/__builtins__/shared/utils.d.ts +0 -9
- 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/symbols.d.ts +0 -4
- package/esm/array-base/types.mjs +0 -2
- package/esm/array-base/types.mjs.map +0 -1
- package/esm/array-cards/array-cards.d.ts +0 -13
- 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/utils.d.ts +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-list-tabs/array-list-tabs.d.ts +0 -31
- package/esm/array-list-tabs/utils.d.ts +0 -3
- package/esm/array-table/array-table.d.ts +0 -1505
- 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-tabs/array-tabs.d.ts +0 -2
- package/esm/autocomplete/autocomplete.d.ts +0 -1222
- package/esm/cascader/cascader.d.ts +0 -25
- package/esm/checkbox/checkbox-group.d.ts +0 -42
- package/esm/date-picker/utils.d.ts +0 -4
- package/esm/editable/editable-popover.d.ts +0 -25
- package/esm/editable/editable.d.ts +0 -193
- package/esm/env.d.d.ts +0 -1
- package/esm/env.d.mjs +0 -2
- package/esm/env.d.mjs.map +0 -1
- package/esm/form/form.d.ts +0 -46
- 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 -57
- package/esm/form-button-group/utils.d.ts +0 -1
- package/esm/form-collapse/form-collapse.d.ts +0 -18
- package/esm/form-dialog/dialog-content.d.ts +0 -846
- 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 -976
- 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-item/form-item.d.ts +0 -19
- 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-layout/form-layout.d.ts +0 -31
- package/esm/form-layout/index.mjs +0 -6
- package/esm/form-layout/index.mjs.map +0 -1
- 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-step/form-step-pane.d.ts +0 -2
- package/esm/form-step/form-step.d.ts +0 -5
- package/esm/form-step/types.mjs +0 -2
- package/esm/form-step/types.mjs.map +0 -1
- package/esm/form-tab/form-tab.d.ts +0 -7
- package/esm/form-tab/hooks.d.ts +0 -8
- 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/index.mjs.map +0 -1
- package/esm/input/input.d.ts +0 -25
- package/esm/input-tag/input-tag.d.ts +0 -32
- package/esm/mention/mention.d.ts +0 -51
- package/esm/pagination/components/jumper.d.ts +0 -16
- package/esm/pagination/components/next.d.ts +0 -42
- package/esm/pagination/components/pager.d.ts +0 -42
- package/esm/pagination/components/prev.d.ts +0 -39
- package/esm/pagination/components/sizes.d.ts +0 -56
- package/esm/pagination/components/total.d.ts +0 -8
- package/esm/pagination/pagination.d.ts +0 -128
- package/esm/preview-text/cascader.d.ts +0 -5
- package/esm/preview-text/color-picker.d.ts +0 -5
- package/esm/preview-text/date-picker.d.ts +0 -5
- package/esm/preview-text/input.d.ts +0 -28
- package/esm/preview-text/preview.d.ts +0 -18
- package/esm/preview-text/rate.d.ts +0 -5
- 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/query-form/default-components.d.ts +0 -5
- package/esm/query-form/hooks.d.ts +0 -25
- package/esm/query-form/query-form-light.d.ts +0 -27
- package/esm/query-form/query-form.d.ts +0 -52
- package/esm/query-form/types.mjs +0 -2
- package/esm/query-form/types.mjs.map +0 -1
- package/esm/query-form-item/query-form-item.d.ts +0 -96
- package/esm/query-form-item/types.mjs +0 -2
- package/esm/query-form-item/types.mjs.map +0 -1
- package/esm/radio/radio-group.d.ts +0 -33
- package/esm/reset/reset.d.ts +0 -45
- package/esm/segmented/segmented.d.ts +0 -25
- package/esm/select/select.d.ts +0 -45
- package/esm/select-table/select-table.d.ts +0 -3030
- package/esm/select-table/types.mjs +0 -2
- package/esm/select-table/types.mjs.map +0 -1
- package/esm/shared/overlay-elements.d.ts +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/query-form/index.css +0 -1
- package/esm/styles/query-form-item/index.css +0 -1
- package/esm/styles/select-table/index.css +0 -1
- package/esm/submit/submit.d.ts +0 -36
- package/esm/tree/tree.d.ts +0 -20
- 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-select/tree-select.d.ts +0 -10
- package/esm/upload/upload.d.ts +0 -1259
- package/esm/vendor/icon.mjs +0 -11
- package/esm/vendor/icon.mjs.map +0 -1
- package/esm/vendor/lodash.mjs +0 -1506
- package/esm/vendor/lodash.mjs.map +0 -1
- package/esm/vendor/runtime.mjs +0 -34
- package/esm/vendor/runtime.mjs.map +0 -1
- package/esm/vendor/shared.esm-bundler.mjs +0 -9
- 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
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { compatibleUnderlineProp, useCleanAttrs } from "../__builtins__/shared/utils.mjs";
|
|
2
|
+
import { stylePrefix } from "../__builtins__/configs/index.mjs";
|
|
3
|
+
import _sfc_main$1 from "../form/form.mjs";
|
|
4
|
+
import { FormButtonGroup } from "../form-button-group/index.mjs";
|
|
5
|
+
import FormGrid from "../form-grid/index.mjs";
|
|
6
|
+
import { useQueryFormForm, useQueryFormSchemaField } from "./hooks.mjs";
|
|
7
|
+
import Reset from "../reset/index.mjs";
|
|
8
|
+
import Submit from "../submit/index.mjs";
|
|
9
|
+
import { ElIcon, ElLink } from "element-plus";
|
|
10
|
+
import { autorunEffect } from "@silver-formily/reactive-vue";
|
|
11
|
+
import { computed, createBlock, createCommentVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeProps, normalizeStyle, openBlock, ref, renderSlot, resolveDynamicComponent, toDisplayString, unref, useSlots, withCtx } from "vue";
|
|
12
|
+
import { useFieldSchema, useForm } from "@silver-formily/vue";
|
|
13
|
+
import { ArrowDown, ArrowUp } from "@element-plus/icons-vue";
|
|
14
|
+
import { createGrid } from "@silver-formily/grid";
|
|
15
|
+
import { Schema } from "@formily/json-schema";
|
|
16
|
+
//#region src/query-form/query-form.vue
|
|
17
|
+
const COLLAPSED_ROWS = 1;
|
|
18
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
|
+
name: "FQueryForm",
|
|
20
|
+
inheritAttrs: false,
|
|
21
|
+
__name: "query-form",
|
|
22
|
+
props: {
|
|
23
|
+
schema: {},
|
|
24
|
+
schemaField: {},
|
|
25
|
+
components: { default: () => ({}) },
|
|
26
|
+
scope: {},
|
|
27
|
+
gridProps: { default: () => ({}) },
|
|
28
|
+
defaultExpanded: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
32
|
+
showToggle: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: true
|
|
35
|
+
},
|
|
36
|
+
actionsAtRowEnd: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false
|
|
39
|
+
},
|
|
40
|
+
visibleWhen: {},
|
|
41
|
+
submitText: { default: "查询" },
|
|
42
|
+
resetText: { default: "重置" },
|
|
43
|
+
expandText: { default: "展开" },
|
|
44
|
+
collapseText: { default: "收起" },
|
|
45
|
+
showSubmit: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: true
|
|
48
|
+
},
|
|
49
|
+
showReset: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: true
|
|
52
|
+
},
|
|
53
|
+
submitProps: {},
|
|
54
|
+
resetProps: {}
|
|
55
|
+
},
|
|
56
|
+
setup(__props) {
|
|
57
|
+
const props = __props;
|
|
58
|
+
const { props: formProps } = useCleanAttrs(["modelValue", "onUpdate:modelValue"]);
|
|
59
|
+
const slots = useSlots();
|
|
60
|
+
const prefixCls = `${stylePrefix}-query-form`;
|
|
61
|
+
const FormGridColumn = FormGrid.GridColumn;
|
|
62
|
+
const fieldSchemaRef = useFieldSchema();
|
|
63
|
+
const { externalForm, activeForm } = useQueryFormForm({
|
|
64
|
+
formProps,
|
|
65
|
+
fallbackForm: useForm()
|
|
66
|
+
});
|
|
67
|
+
const innerFormProps = computed(() => ({
|
|
68
|
+
fullness: true,
|
|
69
|
+
...formProps.value,
|
|
70
|
+
form: externalForm.value
|
|
71
|
+
}));
|
|
72
|
+
const schemaList = computed(() => {
|
|
73
|
+
const rawSchema = props.schema ?? fieldSchemaRef.value;
|
|
74
|
+
/* istanbul ignore next -- @preserve defensive: schema can be temporarily absent in external field-schema lifecycle */
|
|
75
|
+
if (!rawSchema) return [];
|
|
76
|
+
return (rawSchema instanceof Schema ? rawSchema : new Schema(rawSchema)).mapProperties((childSchema, name) => ({
|
|
77
|
+
name,
|
|
78
|
+
schema: childSchema
|
|
79
|
+
}));
|
|
80
|
+
});
|
|
81
|
+
function resolveField(name) {
|
|
82
|
+
return activeForm.value?.query(name).take();
|
|
83
|
+
}
|
|
84
|
+
function createVisibleContext(node, grid, collapsedOverride) {
|
|
85
|
+
const index = node.index ?? 0;
|
|
86
|
+
const entry = schemaList.value[index];
|
|
87
|
+
const schema = entry?.schema;
|
|
88
|
+
return {
|
|
89
|
+
field: resolveField(entry?.name ?? schema?.name),
|
|
90
|
+
schema,
|
|
91
|
+
index,
|
|
92
|
+
node,
|
|
93
|
+
grid,
|
|
94
|
+
collapsed: collapsedOverride ?? grid.maxRows !== Infinity,
|
|
95
|
+
breakpoint: grid.breakpoint
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function defaultVisibleWhen(context) {
|
|
99
|
+
if (!context.collapsed) return true;
|
|
100
|
+
const shadowRow = context.node.shadowRow ?? 0;
|
|
101
|
+
if (!(shadowRow < COLLAPSED_ROWS + 1)) return false;
|
|
102
|
+
if (!(getFieldRowCount(context.grid) > COLLAPSED_ROWS)) return true;
|
|
103
|
+
const endColumn = (context.node.shadowColumn ?? 1) + (context.node.span ?? 1) - 1;
|
|
104
|
+
if (shadowRow === COLLAPSED_ROWS && endColumn === context.grid.columns) return false;
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
function resolveVisibleWhen(context) {
|
|
108
|
+
return (props.visibleWhen ? props.visibleWhen(context) : defaultVisibleWhen(context)) !== false;
|
|
109
|
+
}
|
|
110
|
+
function isActionsNode(node, grid) {
|
|
111
|
+
if ("element" in node && node.element) return node.element.dataset.queryFormActions !== void 0;
|
|
112
|
+
return node.index === grid.childSize - 1;
|
|
113
|
+
}
|
|
114
|
+
function getFieldRowCount(grid) {
|
|
115
|
+
const rows = (grid.children ?? []).filter((node) => !isActionsNode(node, grid)).map((node) => node.shadowRow ?? 0);
|
|
116
|
+
return new Set(rows).size;
|
|
117
|
+
}
|
|
118
|
+
const defaultShouldVisible = (node, grid) => {
|
|
119
|
+
if (isActionsNode(node, grid)) return true;
|
|
120
|
+
return resolveVisibleWhen(createVisibleContext(node, grid));
|
|
121
|
+
};
|
|
122
|
+
const restGridProps = props.gridProps ?? {};
|
|
123
|
+
const grid = createGrid({
|
|
124
|
+
...restGridProps.minColumns === void 0 && restGridProps.maxColumns === void 0 ? { maxColumns: 4 } : {},
|
|
125
|
+
...restGridProps,
|
|
126
|
+
maxRows: props.defaultExpanded || !props.showToggle ? Infinity : COLLAPSED_ROWS,
|
|
127
|
+
shouldVisible: defaultShouldVisible
|
|
128
|
+
});
|
|
129
|
+
const expanded = ref(grid.maxRows === Infinity);
|
|
130
|
+
const gridType = ref("complete-wrap");
|
|
131
|
+
function updateType() {
|
|
132
|
+
if (!props.showToggle) {
|
|
133
|
+
gridType.value = "incomplete-wrap";
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
if (!props.visibleWhen) {
|
|
137
|
+
gridType.value = getFieldRowCount(grid) > COLLAPSED_ROWS ? "collapsible" : "incomplete-wrap";
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
/* istanbul ignore next -- @preserve layout branch depends on runtime grid measurement in browser */
|
|
141
|
+
if ((grid.children ?? []).some((node) => {
|
|
142
|
+
if (isActionsNode(node, grid)) return false;
|
|
143
|
+
return !resolveVisibleWhen(createVisibleContext(node, grid, true));
|
|
144
|
+
})) {
|
|
145
|
+
gridType.value = "collapsible";
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
gridType.value = grid.shadowRows < COLLAPSED_ROWS + 1 ? "incomplete-wrap" : "complete-wrap";
|
|
149
|
+
}
|
|
150
|
+
autorunEffect(() => {
|
|
151
|
+
expanded.value = grid.maxRows === Infinity;
|
|
152
|
+
updateType();
|
|
153
|
+
});
|
|
154
|
+
function toggle() {
|
|
155
|
+
if (!props.showToggle) return;
|
|
156
|
+
grid.maxRows = grid.maxRows === Infinity ? COLLAPSED_ROWS : Infinity;
|
|
157
|
+
}
|
|
158
|
+
const { hasDefaultSlot, schemaField } = useQueryFormSchemaField({
|
|
159
|
+
slots,
|
|
160
|
+
schema: computed(() => props.schema),
|
|
161
|
+
schemaField: computed(() => props.schemaField),
|
|
162
|
+
components: computed(() => props.components),
|
|
163
|
+
scope: computed(() => props.scope)
|
|
164
|
+
});
|
|
165
|
+
return (_ctx, _cache) => {
|
|
166
|
+
return openBlock(), createBlock(unref(_sfc_main$1), mergeProps(innerFormProps.value, { class: prefixCls }), {
|
|
167
|
+
default: withCtx(() => [createVNode(unref(FormGrid), { grid: unref(grid) }, {
|
|
168
|
+
default: withCtx(() => [unref(hasDefaultSlot) ? renderSlot(_ctx.$slots, "default", { key: 0 }) : unref(schemaField) ? (openBlock(), createBlock(resolveDynamicComponent(unref(schemaField)), {
|
|
169
|
+
key: 1,
|
|
170
|
+
schema: props.schema
|
|
171
|
+
}, null, 8, ["schema"])) : createCommentVNode("v-if", true), createVNode(unref(FormGridColumn), {
|
|
172
|
+
"grid-span": -1,
|
|
173
|
+
"data-query-form-actions": "",
|
|
174
|
+
class: normalizeClass([`${prefixCls}__actions`, props.actionsAtRowEnd && `${prefixCls}__actions--row-end`])
|
|
175
|
+
}, {
|
|
176
|
+
default: withCtx(() => [gridType.value === "incomplete-wrap" ? (openBlock(), createBlock(unref(FormButtonGroup), {
|
|
177
|
+
key: 0,
|
|
178
|
+
align: props.actionsAtRowEnd ? "right" : "left",
|
|
179
|
+
"align-form-item": "",
|
|
180
|
+
inline: "",
|
|
181
|
+
style: normalizeStyle(props.actionsAtRowEnd && { width: "100%" })
|
|
182
|
+
}, {
|
|
183
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "actions", {
|
|
184
|
+
expanded: expanded.value,
|
|
185
|
+
toggle,
|
|
186
|
+
type: gridType.value
|
|
187
|
+
}, () => [props.showSubmit ? (openBlock(), createBlock(unref(Submit), normalizeProps(mergeProps({ key: 0 }, props.submitProps)), {
|
|
188
|
+
default: withCtx(() => [createTextVNode(toDisplayString(props.submitText), 1)]),
|
|
189
|
+
_: 1
|
|
190
|
+
}, 16)) : createCommentVNode("v-if", true), props.showReset ? (openBlock(), createBlock(unref(Reset), normalizeProps(mergeProps({ key: 1 }, props.resetProps)), {
|
|
191
|
+
default: withCtx(() => [createTextVNode(toDisplayString(props.resetText), 1)]),
|
|
192
|
+
_: 1
|
|
193
|
+
}, 16)) : createCommentVNode("v-if", true)])]),
|
|
194
|
+
_: 3
|
|
195
|
+
}, 8, ["align", "style"])) : gridType.value === "collapsible" && props.showToggle ? (openBlock(), createBlock(unref(FormButtonGroup), {
|
|
196
|
+
key: 1,
|
|
197
|
+
align: props.actionsAtRowEnd ? "right" : "left",
|
|
198
|
+
"align-form-item": "",
|
|
199
|
+
inline: "",
|
|
200
|
+
style: normalizeStyle(props.actionsAtRowEnd && { width: "100%" })
|
|
201
|
+
}, {
|
|
202
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "actions", {
|
|
203
|
+
expanded: expanded.value,
|
|
204
|
+
toggle,
|
|
205
|
+
type: gridType.value
|
|
206
|
+
}, () => [props.showSubmit ? (openBlock(), createBlock(unref(Submit), normalizeProps(mergeProps({ key: 0 }, props.submitProps)), {
|
|
207
|
+
default: withCtx(() => [createTextVNode(toDisplayString(props.submitText), 1)]),
|
|
208
|
+
_: 1
|
|
209
|
+
}, 16)) : createCommentVNode("v-if", true), props.showReset ? (openBlock(), createBlock(unref(Reset), normalizeProps(mergeProps({ key: 1 }, props.resetProps)), {
|
|
210
|
+
default: withCtx(() => [createTextVNode(toDisplayString(props.resetText), 1)]),
|
|
211
|
+
_: 1
|
|
212
|
+
}, 16)) : createCommentVNode("v-if", true)]), renderSlot(_ctx.$slots, "collapse", {
|
|
213
|
+
expanded: expanded.value,
|
|
214
|
+
toggle,
|
|
215
|
+
type: gridType.value
|
|
216
|
+
}, () => [createVNode(unref(ElLink), {
|
|
217
|
+
type: "primary",
|
|
218
|
+
underline: unref(compatibleUnderlineProp)(),
|
|
219
|
+
class: normalizeClass(`${prefixCls}__collapse-link`),
|
|
220
|
+
onClick: toggle
|
|
221
|
+
}, {
|
|
222
|
+
default: withCtx(() => [createTextVNode(toDisplayString(expanded.value ? props.collapseText : props.expandText) + " ", 1), createVNode(unref(ElIcon), { class: normalizeClass(`${prefixCls}__collapse-icon`) }, {
|
|
223
|
+
default: withCtx(() => [expanded.value ? (openBlock(), createBlock(unref(ArrowUp), { key: 0 })) : (openBlock(), createBlock(unref(ArrowDown), { key: 1 }))]),
|
|
224
|
+
_: 1
|
|
225
|
+
}, 8, ["class"])]),
|
|
226
|
+
_: 1
|
|
227
|
+
}, 8, ["underline", "class"])])]),
|
|
228
|
+
_: 3
|
|
229
|
+
}, 8, ["align", "style"])) : (openBlock(), createBlock(unref(FormButtonGroup), {
|
|
230
|
+
key: 2,
|
|
231
|
+
align: "right",
|
|
232
|
+
inline: "",
|
|
233
|
+
style: {
|
|
234
|
+
"display": "flex",
|
|
235
|
+
"width": "100%"
|
|
236
|
+
}
|
|
237
|
+
}, {
|
|
238
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "actions", {
|
|
239
|
+
expanded: expanded.value,
|
|
240
|
+
toggle,
|
|
241
|
+
type: gridType.value
|
|
242
|
+
}, () => [props.showSubmit ? (openBlock(), createBlock(unref(Submit), normalizeProps(mergeProps({ key: 0 }, props.submitProps)), {
|
|
243
|
+
default: withCtx(() => [createTextVNode(toDisplayString(props.submitText), 1)]),
|
|
244
|
+
_: 1
|
|
245
|
+
}, 16)) : createCommentVNode("v-if", true), props.showReset ? (openBlock(), createBlock(unref(Reset), normalizeProps(mergeProps({ key: 1 }, props.resetProps)), {
|
|
246
|
+
default: withCtx(() => [createTextVNode(toDisplayString(props.resetText), 1)]),
|
|
247
|
+
_: 1
|
|
248
|
+
}, 16)) : createCommentVNode("v-if", true)])]),
|
|
249
|
+
_: 3
|
|
250
|
+
}))]),
|
|
251
|
+
_: 3
|
|
252
|
+
}, 8, ["class"])]),
|
|
253
|
+
_: 3
|
|
254
|
+
}, 8, ["grid"])]),
|
|
255
|
+
_: 3
|
|
256
|
+
}, 16);
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
//#endregion
|
|
261
|
+
export { _sfc_main as default };
|
|
262
|
+
|
|
263
|
+
//# sourceMappingURL=query-form.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-form.mjs","names":[],"sources":["../../src/query-form/query-form.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ISchema } from '@formily/json-schema'\nimport type { Grid, GridNode, IGridOptions } from '@silver-formily/grid'\nimport type { IQueryFormProps, SchemaEntry } from './types'\nimport { ArrowDown, ArrowUp } from '@element-plus/icons-vue'\nimport { Schema } from '@formily/json-schema'\nimport { createGrid } from '@silver-formily/grid'\nimport { autorunEffect } from '@silver-formily/reactive-vue'\nimport { useFieldSchema, useForm } from '@silver-formily/vue'\nimport { ElIcon, ElLink } from 'element-plus'\nimport { computed, ref, useSlots } from 'vue'\nimport { compatibleUnderlineProp, stylePrefix, useCleanAttrs } from '../__builtins__'\nimport { Form } from '../form'\nimport { FormButtonGroup } from '../form-button-group'\nimport { FormGrid } from '../form-grid'\nimport { Reset } from '../reset'\nimport { Submit } from '../submit'\nimport { useQueryFormForm, useQueryFormSchemaField } from './hooks'\n\ndefineOptions({\n name: 'FQueryForm',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<IQueryFormProps>(), {\n components: () => ({}),\n gridProps: () => ({}),\n defaultExpanded: false,\n showToggle: true,\n actionsAtRowEnd: false,\n submitText: '查询',\n resetText: '重置',\n expandText: '展开',\n collapseText: '收起',\n showSubmit: true,\n showReset: true,\n})\n\nconst { props: formProps } = useCleanAttrs(['modelValue', 'onUpdate:modelValue'])\nconst slots = useSlots()\nconst prefixCls = `${stylePrefix}-query-form`\nconst FormGridColumn = FormGrid.GridColumn\n\nconst COLLAPSED_ROWS = 1\nconst fieldSchemaRef = useFieldSchema()\nconst formRef = useForm()\nconst { externalForm, activeForm } = useQueryFormForm({\n formProps,\n fallbackForm: formRef,\n})\nconst innerFormProps = computed(() => ({\n fullness: true,\n ...formProps.value,\n form: externalForm.value,\n}))\n\nconst schemaList = computed<SchemaEntry[]>(() => {\n const rawSchema = props.schema ?? fieldSchemaRef.value\n /* istanbul ignore next -- @preserve defensive: schema can be temporarily absent in external field-schema lifecycle */\n if (!rawSchema)\n return []\n const schema = rawSchema instanceof Schema ? rawSchema : new Schema(rawSchema)\n return schema.mapProperties((childSchema: ISchema, name: string | number) => ({\n name,\n schema: childSchema,\n }))\n})\n\nfunction resolveField(name?: string | number) {\n return activeForm.value?.query(name).take()\n}\n\nfunction createVisibleContext(\n node: GridNode,\n grid: Grid<HTMLElement>,\n collapsedOverride?: boolean,\n) {\n const index = node.index ?? 0\n const entry = schemaList.value[index]\n const schema = entry?.schema\n const name = entry?.name ?? schema?.name\n return {\n field: resolveField(name),\n schema,\n index,\n node,\n grid,\n collapsed: collapsedOverride ?? grid.maxRows !== Infinity,\n breakpoint: grid.breakpoint,\n }\n}\n\nfunction defaultVisibleWhen(context: ReturnType<typeof createVisibleContext>) {\n if (!context.collapsed)\n return true\n\n const shadowRow = context.node.shadowRow ?? 0\n const withinRows = shadowRow < COLLAPSED_ROWS + 1\n if (!withinRows)\n return false\n\n const isCollapsible = getFieldRowCount(context.grid) > COLLAPSED_ROWS\n if (!isCollapsible)\n return true\n const shadowColumn = context.node.shadowColumn ?? 1\n const span = context.node.span ?? 1\n const endColumn = shadowColumn + span - 1\n if (shadowRow === COLLAPSED_ROWS && endColumn === context.grid.columns)\n return false\n\n return true\n}\n\nfunction resolveVisibleWhen(context: ReturnType<typeof createVisibleContext>) {\n const visible = props.visibleWhen\n ? props.visibleWhen(context)\n : defaultVisibleWhen(context)\n return visible !== false\n}\n\nfunction isActionsNode(node: GridNode, grid: Grid<HTMLElement>) {\n if ('element' in node && node.element) {\n return node.element.dataset.queryFormActions !== undefined\n }\n return node.index === grid.childSize - 1\n}\n\nfunction getFieldRowCount(grid: Grid<HTMLElement>) {\n const rows = (grid.children ?? [])\n .filter(node => !isActionsNode(node, grid))\n .map(node => node.shadowRow ?? 0)\n return new Set(rows).size\n}\n\nconst defaultShouldVisible: IGridOptions['shouldVisible'] = (node, grid) => {\n if (isActionsNode(node, grid))\n return true\n return resolveVisibleWhen(createVisibleContext(node, grid))\n}\n\nconst restGridProps = props.gridProps ?? {}\nconst defaultGridProps: Partial<IGridOptions> = restGridProps.minColumns === undefined && restGridProps.maxColumns === undefined\n ? { maxColumns: 4 }\n : {}\n\nconst gridOptions: IGridOptions = {\n ...defaultGridProps,\n ...restGridProps,\n maxRows: (props.defaultExpanded || !props.showToggle) ? Infinity : COLLAPSED_ROWS,\n shouldVisible: defaultShouldVisible,\n}\n\nconst grid = createGrid(gridOptions)\n\nconst expanded = ref(grid.maxRows === Infinity)\nconst gridType = ref<'incomplete-wrap' | 'collapsible' | 'complete-wrap'>('complete-wrap')\n\nfunction updateType() {\n if (!props.showToggle) {\n gridType.value = 'incomplete-wrap'\n return\n }\n\n if (!props.visibleWhen) {\n gridType.value = getFieldRowCount(grid) > COLLAPSED_ROWS\n ? 'collapsible'\n : 'incomplete-wrap'\n return\n }\n\n const nodes = grid.children ?? []\n const hasHiddenInCollapsed = nodes.some((node) => {\n if (isActionsNode(node, grid))\n return false\n return !resolveVisibleWhen(createVisibleContext(node, grid, true))\n })\n /* istanbul ignore next -- @preserve layout branch depends on runtime grid measurement in browser */\n if (hasHiddenInCollapsed) {\n gridType.value = 'collapsible'\n return\n }\n const realRows = grid.shadowRows\n gridType.value = realRows < COLLAPSED_ROWS + 1 ? 'incomplete-wrap' : 'complete-wrap'\n}\n\nautorunEffect(() => {\n expanded.value = grid.maxRows === Infinity\n updateType()\n})\n\nfunction toggle() {\n if (!props.showToggle)\n return\n grid.maxRows = grid.maxRows === Infinity ? COLLAPSED_ROWS : Infinity\n}\n\nconst { hasDefaultSlot, schemaField } = useQueryFormSchemaField({\n slots,\n schema: computed(() => props.schema),\n schemaField: computed(() => props.schemaField),\n components: computed(() => props.components),\n scope: computed(() => props.scope),\n})\n</script>\n\n<template>\n <Form v-bind=\"innerFormProps\" :class=\"prefixCls\">\n <FormGrid :grid=\"grid\">\n <slot v-if=\"hasDefaultSlot\" />\n <component\n :is=\"schemaField\"\n v-else-if=\"schemaField\"\n :schema=\"props.schema\"\n />\n <FormGridColumn\n :grid-span=\"-1\"\n data-query-form-actions\n :class=\"[\n `${prefixCls}__actions`,\n props.actionsAtRowEnd && `${prefixCls}__actions--row-end`,\n ]\"\n >\n <template v-if=\"gridType === 'incomplete-wrap'\">\n <FormButtonGroup\n :align=\"props.actionsAtRowEnd ? 'right' : 'left'\"\n align-form-item\n inline\n :style=\"props.actionsAtRowEnd && { width: '100%' }\"\n >\n <slot\n name=\"actions\"\n :expanded=\"expanded\"\n :toggle=\"toggle\"\n :type=\"gridType\"\n >\n <Submit v-if=\"props.showSubmit\" v-bind=\"props.submitProps\">\n {{ props.submitText }}\n </Submit>\n <Reset v-if=\"props.showReset\" v-bind=\"props.resetProps\">\n {{ props.resetText }}\n </Reset>\n </slot>\n </FormButtonGroup>\n </template>\n <template v-else-if=\"gridType === 'collapsible' && props.showToggle\">\n <FormButtonGroup\n :align=\"props.actionsAtRowEnd ? 'right' : 'left'\"\n align-form-item\n inline\n :style=\"props.actionsAtRowEnd && { width: '100%' }\"\n >\n <slot\n name=\"actions\"\n :expanded=\"expanded\"\n :toggle=\"toggle\"\n :type=\"gridType\"\n >\n <Submit v-if=\"props.showSubmit\" v-bind=\"props.submitProps\">\n {{ props.submitText }}\n </Submit>\n <Reset v-if=\"props.showReset\" v-bind=\"props.resetProps\">\n {{ props.resetText }}\n </Reset>\n </slot>\n <slot\n name=\"collapse\"\n :expanded=\"expanded\"\n :toggle=\"toggle\"\n :type=\"gridType\"\n >\n <ElLink\n type=\"primary\"\n :underline=\"compatibleUnderlineProp()\"\n :class=\"`${prefixCls}__collapse-link`\"\n @click=\"toggle\"\n >\n {{ expanded ? props.collapseText : props.expandText }}\n <ElIcon :class=\"`${prefixCls}__collapse-icon`\">\n <ArrowUp v-if=\"expanded\" />\n <ArrowDown v-else />\n </ElIcon>\n </ElLink>\n </slot>\n </FormButtonGroup>\n </template>\n <template v-else>\n <FormButtonGroup\n align=\"right\"\n inline\n style=\"display: flex; width: 100%;\"\n >\n <slot\n name=\"actions\"\n :expanded=\"expanded\"\n :toggle=\"toggle\"\n :type=\"gridType\"\n >\n <Submit v-if=\"props.showSubmit\" v-bind=\"props.submitProps\">\n {{ props.submitText }}\n </Submit>\n <Reset v-if=\"props.showReset\" v-bind=\"props.resetProps\">\n {{ props.resetText }}\n </Reset>\n </slot>\n </FormButtonGroup>\n </template>\n </FormGridColumn>\n </FormGrid>\n </Form>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;AA2CA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAnBvB,MAAM,QAAQ;EAcd,MAAM,EAAE,OAAO,cAAc,cAAc,CAAC,cAAc,sBAAsB,CAAA;EAChF,MAAM,QAAQ,UAAS;EACvB,MAAM,YAAY,GAAG,YAAY;EACjC,MAAM,iBAAiB,SAAS;EAGhC,MAAM,iBAAiB,gBAAe;EAEtC,MAAM,EAAE,cAAc,eAAe,iBAAiB;GACpD;GACA,cAHc,SAAQ;GAIvB,CAAA;EACD,MAAM,iBAAiB,gBAAgB;GACrC,UAAU;GACV,GAAG,UAAU;GACb,MAAM,aAAa;GACpB,EAAC;EAEF,MAAM,aAAa,eAA8B;GAC/C,MAAM,YAAY,MAAM,UAAU,eAAe;;AAEjD,OAAI,CAAC,UACH,QAAO,EAAC;AAEV,WADe,qBAAqB,SAAS,YAAY,IAAI,OAAO,UAAS,EAC/D,eAAe,aAAsB,UAA2B;IAC5E;IACA,QAAQ;IACT,EAAC;IACH;EAED,SAAS,aAAa,MAAwB;AAC5C,UAAO,WAAW,OAAO,MAAM,KAAK,CAAC,MAAK;;EAG5C,SAAS,qBACP,MACA,MACA,mBACA;GACA,MAAM,QAAQ,KAAK,SAAS;GAC5B,MAAM,QAAQ,WAAW,MAAM;GAC/B,MAAM,SAAS,OAAO;AAEtB,UAAO;IACL,OAAO,aAFI,OAAO,QAAQ,QAAQ,KAET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AA,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.formily-element-plus-query-form__actions {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
width: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.formily-element-plus-query-form__actions--row-end {
|
|
8
|
+
justify-content: flex-end;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.formily-element-plus-query-form__collapse-link .el-link__inner {
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: 4px;
|
|
15
|
+
margin: 0 8px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.formily-element-plus-query-form__collapse-icon {
|
|
19
|
+
font-size: 12px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.formily-element-plus-query-form-light__content {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-wrap: wrap;
|
|
25
|
+
align-items: flex-start;
|
|
26
|
+
gap: 8px 12px;
|
|
27
|
+
}
|
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Grid, GridNode, IGridOptions } from
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { Component } from "vue";
|
|
2
|
+
import { GeneralField } from "@formily/core";
|
|
3
|
+
import { Grid, GridNode, IGridOptions } from "@silver-formily/grid";
|
|
4
|
+
import { ISchema } from "@formily/json-schema";
|
|
5
|
+
|
|
6
|
+
//#region src/query-form/types.d.ts
|
|
7
|
+
interface QueryFormVisibleContext {
|
|
8
|
+
field?: GeneralField;
|
|
9
|
+
schema?: ISchema;
|
|
10
|
+
index: number;
|
|
11
|
+
node: GridNode;
|
|
12
|
+
grid: Grid<HTMLElement>;
|
|
13
|
+
collapsed: boolean;
|
|
14
|
+
breakpoint: number;
|
|
13
15
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
16
|
+
type QueryFormVisible = (context: QueryFormVisibleContext) => boolean;
|
|
17
|
+
interface IQueryFormProps {
|
|
18
|
+
schema?: ISchema;
|
|
19
|
+
schemaField?: Component;
|
|
20
|
+
components?: Record<string, Component>;
|
|
21
|
+
scope?: Record<string, any>;
|
|
22
|
+
gridProps?: Omit<IGridOptions, 'shouldVisible' | 'maxRows'>;
|
|
23
|
+
defaultExpanded?: boolean;
|
|
24
|
+
showToggle?: boolean;
|
|
25
|
+
actionsAtRowEnd?: boolean;
|
|
26
|
+
visibleWhen?: QueryFormVisible;
|
|
27
|
+
submitText?: string;
|
|
28
|
+
resetText?: string;
|
|
29
|
+
expandText?: string;
|
|
30
|
+
collapseText?: string;
|
|
31
|
+
showSubmit?: boolean;
|
|
32
|
+
showReset?: boolean;
|
|
33
|
+
submitProps?: Record<string, any>;
|
|
34
|
+
resetProps?: Record<string, any>;
|
|
33
35
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
export interface SchemaEntry {
|
|
42
|
-
name?: string | number;
|
|
43
|
-
schema: ISchema;
|
|
36
|
+
interface IQueryFormLightProps {
|
|
37
|
+
schema?: ISchema;
|
|
38
|
+
schemaField?: Component;
|
|
39
|
+
components?: Record<string, Component>;
|
|
40
|
+
scope?: Record<string, any>;
|
|
41
|
+
throttleWait?: number;
|
|
44
42
|
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { IQueryFormLightProps, IQueryFormProps, QueryFormVisible, QueryFormVisibleContext };
|
|
45
|
+
//# sourceMappingURL=types.d.ts.map
|