@aplus-frontend/ui 7.5.0 → 7.7.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/es/index.mjs +200 -198
- package/es/src/ag-grid/editable/form-item.vue.mjs +14 -14
- package/es/src/ag-grid/editable/index.vue.mjs +20 -20
- package/es/src/ag-grid/hooks/use-columns-def.mjs +32 -31
- package/es/src/ag-grid/hooks/use-editable-api.mjs +9 -8
- package/es/src/ag-grid/hooks/use-editable-columns.mjs +26 -25
- package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +11 -10
- package/es/src/ag-grid/index.vue.mjs +37 -36
- package/es/src/ag-grid/renderer/number.mjs +7 -7
- package/es/src/ag-grid/style/custom-header.mjs +3 -3
- package/es/src/ag-grid/style/index.mjs +1 -1
- package/es/src/ap-action/style/index.mjs +1 -1
- package/es/src/ap-drawer/style/index.mjs +12 -12
- package/es/src/ap-field/date/index.vue.mjs +14 -14
- package/es/src/ap-field/date/read.vue2.mjs +3 -3
- package/es/src/ap-field/date-range/index.vue.mjs +8 -8
- package/es/src/ap-field/date-range/read.vue2.mjs +3 -3
- package/es/src/ap-field/hooks/use-default-placeholder.mjs +5 -4
- package/es/src/ap-field/number/helper.mjs +1 -1
- package/es/src/ap-field/number/index.vue.mjs +9 -9
- package/es/src/ap-field/number/read.vue2.mjs +5 -5
- package/es/src/ap-field/style/checkbox.d.ts +2 -2
- package/es/src/ap-field/style/number.d.ts +2 -2
- package/es/src/ap-field/style/radio.d.ts +2 -2
- package/es/src/ap-field/style/textarea.d.ts +2 -2
- package/es/src/ap-field/switch/index.vue.mjs +4 -3
- package/es/src/ap-form/ap-form.vue2.mjs +18 -17
- package/es/src/ap-form/item/index.vue.mjs +6 -6
- package/es/src/ap-form/item-group/helper.mjs +8 -7
- package/es/src/ap-form/item-group/index.vue.mjs +15 -14
- package/es/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/select/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/es/src/ap-form/search-form/components/popover-filter.vue.d.ts +1 -1
- package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +24 -22
- package/es/src/ap-form/search-form/components/popover-sorter/index.vue2.mjs +4 -1
- package/es/src/ap-form/search-form/hooks/use-sorter.mjs +9 -8
- package/es/src/ap-form/search-form/index.vue.mjs +12 -11
- package/es/src/ap-form/set/index.vue.mjs +1 -1
- package/es/src/ap-form/style/item.mjs +15 -15
- package/es/src/ap-form/style/modal-form.mjs +2 -1
- package/es/src/ap-form/style/search-form-sorter.mjs +1 -1
- package/es/src/ap-form/style/search-form.d.ts +7 -1
- package/es/src/ap-form/style/search-form.mjs +37 -34
- package/es/src/ap-grid/editable/form-item.vue.mjs +11 -10
- package/es/src/ap-grid/editable/index.vue.mjs +42 -41
- package/es/src/ap-grid/index.vue.mjs +14 -13
- package/es/src/ap-grid/style/editable.mjs +7 -7
- package/es/src/ap-grid/style/index.mjs +11 -11
- package/es/src/ap-grid/utils/table.mjs +14 -13
- package/es/src/ap-list/hooks/use-offline-list.d.ts +2 -2
- package/es/src/ap-list/hooks/use-offline-list.mjs +13 -12
- package/es/src/ap-list/style/index.mjs +1 -1
- package/es/src/ap-pro-card/style/divider.mjs +2 -2
- package/es/src/ap-pro-card/style/index.mjs +14 -14
- package/es/src/ap-pro-card/style/operation.mjs +1 -2
- package/es/src/ap-pro-card/style/statistic.mjs +12 -12
- package/es/src/ap-pro-card/style/statistics-card.mjs +13 -13
- package/es/src/ap-pro-card/style/title.mjs +13 -33
- package/es/src/ap-table/ap-table.vue2.mjs +4 -3
- package/es/src/ap-table/constants.d.ts +5 -5
- package/es/src/ap-table/hooks/use-table-column-state.mjs +23 -22
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +2 -2
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +4 -3
- package/es/src/ap-table/style/index-comp.d.ts +2 -1
- package/es/src/ap-table/style/index-comp.mjs +15 -12
- package/es/src/ap-table/style/index.d.ts +3 -0
- package/es/src/ap-table/style/index.mjs +14 -11
- package/es/src/ap-table/style/setting.d.ts +2 -1
- package/es/src/ap-table/style/setting.mjs +73 -61
- package/es/src/ap-table/utils.mjs +61 -62
- package/es/src/business/ag-grid-modal/modal-layout/index.vue2.mjs +15 -15
- package/es/src/business/ag-grid-modal/style/index.d.ts +3 -0
- package/es/src/business/ag-grid-modal/style/index.mjs +24 -20
- package/es/src/business/ag-grid-modal/style/selected-items.mjs +8 -8
- package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +26 -27
- package/es/src/business/ap-appendix/style/index.mjs +20 -21
- package/es/src/business/ap-attachment/style/index.d.ts +6 -0
- package/es/src/business/ap-attachment/style/index.mjs +28 -25
- package/es/src/business/ap-batch-action/style/index.d.ts +2 -2
- package/es/src/business/ap-batch-action/style/index.mjs +18 -18
- package/es/src/business/ap-card/style/index.d.ts +2 -2
- package/es/src/business/ap-card/style/index.mjs +8 -8
- package/es/src/business/ap-copy/style/index.mjs +16 -22
- package/es/src/business/ap-descriptions/formatter/index.mjs +1 -1
- package/es/src/business/ap-descriptions/style/index.mjs +8 -6
- package/es/src/business/ap-download/style/index.mjs +4 -4
- package/es/src/business/ap-draggable-grid/style/index.mjs +7 -7
- package/es/src/business/ap-expand-alert/style/index.mjs +30 -26
- package/es/src/business/ap-image/style/index.d.ts +2 -2
- package/es/src/business/ap-image/style/index.mjs +8 -7
- package/es/src/business/ap-input-radio/style/index.mjs +1 -1
- package/es/src/business/ap-label/style/index.d.ts +14 -0
- package/es/src/business/ap-label/style/index.mjs +29 -19
- package/es/src/business/ap-ladder/style/index.mjs +7 -6
- package/es/src/business/ap-product-info/style/index.d.ts +10 -0
- package/es/src/business/ap-product-info/style/index.mjs +35 -28
- package/es/src/business/ap-radio-group/style/index.mjs +3 -3
- package/es/src/business/ap-select-layout/select-layout.vue2.mjs +6 -6
- package/es/src/business/ap-select-layout/style/index.d.ts +6 -0
- package/es/src/business/ap-select-layout/style/index.mjs +59 -53
- package/es/src/business/ap-size-input/style/index.mjs +3 -3
- package/es/src/business/ap-status/style/index.mjs +1 -1
- package/es/src/business/ap-summary/style/index.d.ts +10 -0
- package/es/src/business/ap-summary/style/index.mjs +18 -11
- package/es/src/business/ap-table-modal/style/index.d.ts +11 -1
- package/es/src/business/ap-table-modal/style/index.mjs +17 -12
- package/es/src/business/ap-tag/ap-tag-group.vue.mjs +2 -2
- package/es/src/business/ap-tag/style/index.mjs +33 -31
- package/es/src/business/ap-title/style/index.d.ts +2 -1
- package/es/src/business/ap-title/style/index.mjs +41 -49
- package/es/src/business/ap-upload/style/index.mjs +10 -5
- package/es/src/business/ap-upload/style/multiple-file.d.ts +2 -2
- package/es/src/business/ap-upload/style/multiple-file.mjs +8 -7
- package/es/src/business/ap-upload/style/picture.d.ts +3 -2
- package/es/src/business/ap-upload/style/picture.mjs +26 -26
- package/es/src/business/ap-upload/style/single-file.d.ts +3 -2
- package/es/src/business/ap-upload/style/single-file.mjs +30 -29
- package/es/src/business/ap-upload/style/token.d.ts +19 -0
- package/es/src/business/ap-upload/style/token.mjs +9 -0
- package/es/src/business/ap-upload-file/ap-upload-single/style/index.d.ts +24 -2
- package/es/src/business/ap-upload-file/ap-upload-single/style/index.mjs +51 -42
- package/es/src/business/ap-upload-file/icon/delete-icon.vue.mjs +2 -2
- package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +2 -2
- package/es/src/business/ap-value-select-card/style/index.mjs +45 -43
- package/es/src/business/ap-view/components/main-button-content.vue2.mjs +14 -14
- package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +35 -34
- package/es/src/business/ap-view/icons/line-delete.vue.mjs +2 -2
- package/es/src/business/ap-view/icons/line-down.vue.mjs +2 -2
- package/es/src/business/ap-view/icons/line-eye.vue.mjs +2 -2
- package/es/src/business/ap-view/style/index.d.ts +6 -2
- package/es/src/business/ap-view/style/index.mjs +43 -35
- package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/es/src/business/batch-input-group/index.vue.mjs +23 -22
- package/es/src/business/batch-input-group/style/index.mjs +2 -2
- package/es/src/check-card/style/index.mjs +17 -17
- package/es/src/design-token/constants.mjs +9 -1
- package/es/src/design-token/interface.d.ts +139 -12
- package/es/src/editable-table/form-item.vue.mjs +4 -3
- package/es/src/editable-table/index.vue.mjs +4 -3
- package/es/src/editable-table/style/index.mjs +11 -11
- package/es/src/editable-table/utils.d.ts +1 -1
- package/es/src/editable-table/utils.mjs +27 -26
- package/es/src/highlight/index.d.ts +3 -0
- package/es/src/highlight/index.mjs +2 -0
- package/es/src/highlight/index.vue.d.ts +31 -0
- package/es/src/highlight/index.vue.mjs +49 -0
- package/es/src/highlight/index.vue2.mjs +4 -0
- package/es/src/highlight/interface.d.ts +14 -0
- package/es/src/highlight/interface.mjs +1 -0
- package/es/src/highlight/style/index.d.ts +8 -0
- package/es/src/highlight/style/index.mjs +23 -0
- package/es/src/hooks/useMessage.mjs +4 -4
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +296 -293
- package/es/src/loading-bar/index.vue2.mjs +4 -3
- package/es/src/loading-bar/style/index.mjs +10 -10
- package/es/src/scroll-view/hooks/use-scroll-smooth.mjs +10 -9
- package/es/src/scroll-view/index.vue.mjs +4 -3
- package/es/src/splitter/style/index.mjs +11 -11
- package/es/src/text/index.vue.mjs +8 -7
- package/es/src/time-ago/index.vue.mjs +17 -16
- package/es/src/time-ago/useTimeAgo.mjs +31 -30
- package/es/src/utils/cssinjs/TokenUtil.d.ts +1 -0
- package/es/src/utils/cssinjs/TokenUtil.mjs +3 -0
- package/es/src/utils/decimal.d.ts +36 -0
- package/es/src/utils/decimal.mjs +45 -0
- package/es/src/utils/format.d.ts +21 -0
- package/es/src/utils/format.mjs +32 -0
- package/es/src/utils/index.d.ts +2 -1
- package/es/src/utils/index.mjs +20 -22
- package/es/src/utils/is.d.ts +54 -0
- package/es/src/utils/is.mjs +26 -0
- package/es/src/utils/slot.mjs +1 -2
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
- package/lib/src/ag-grid/hooks/use-editable-api.js +1 -1
- package/lib/src/ag-grid/hooks/use-editable-columns.js +1 -1
- package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/renderer/number.js +1 -1
- package/lib/src/ag-grid/style/custom-header.js +1 -1
- package/lib/src/ag-grid/style/index.js +1 -1
- package/lib/src/ap-action/style/index.js +1 -1
- package/lib/src/ap-drawer/style/index.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date/read.vue2.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/read.vue2.js +1 -1
- package/lib/src/ap-field/hooks/use-default-placeholder.js +1 -1
- package/lib/src/ap-field/number/helper.js +1 -1
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/number/read.vue2.js +1 -1
- package/lib/src/ap-field/style/checkbox.d.ts +2 -2
- package/lib/src/ap-field/style/number.d.ts +2 -2
- package/lib/src/ap-field/style/radio.d.ts +2 -2
- package/lib/src/ap-field/style/textarea.d.ts +2 -2
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/item-group/helper.js +1 -1
- package/lib/src/ap-form/item-group/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/select/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/lib/src/ap-form/search-form/components/popover-filter.vue.d.ts +1 -1
- package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-sorter/index.vue2.js +1 -1
- package/lib/src/ap-form/search-form/hooks/use-sorter.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-form/set/index.vue.js +1 -1
- package/lib/src/ap-form/style/item.js +1 -1
- package/lib/src/ap-form/style/modal-form.js +1 -1
- package/lib/src/ap-form/style/search-form-sorter.js +1 -1
- package/lib/src/ap-form/style/search-form.d.ts +7 -1
- package/lib/src/ap-form/style/search-form.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/style/editable.js +1 -1
- package/lib/src/ap-grid/style/index.js +1 -1
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-list/hooks/use-offline-list.d.ts +2 -2
- package/lib/src/ap-list/hooks/use-offline-list.js +1 -1
- package/lib/src/ap-list/style/index.js +1 -1
- package/lib/src/ap-pro-card/style/divider.js +1 -1
- package/lib/src/ap-pro-card/style/index.js +1 -1
- package/lib/src/ap-pro-card/style/operation.js +1 -1
- package/lib/src/ap-pro-card/style/statistic.js +1 -1
- package/lib/src/ap-pro-card/style/statistics-card.js +1 -1
- package/lib/src/ap-pro-card/style/title.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +5 -5
- package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +2 -2
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-table/style/index-comp.d.ts +2 -1
- package/lib/src/ap-table/style/index-comp.js +1 -1
- package/lib/src/ap-table/style/index.d.ts +3 -0
- package/lib/src/ap-table/style/index.js +1 -1
- package/lib/src/ap-table/style/setting.d.ts +2 -1
- package/lib/src/ap-table/style/setting.js +1 -1
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ag-grid-modal/modal-layout/index.vue2.js +1 -1
- package/lib/src/business/ag-grid-modal/style/index.d.ts +3 -0
- package/lib/src/business/ag-grid-modal/style/index.js +1 -1
- package/lib/src/business/ag-grid-modal/style/selected-items.js +1 -1
- package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
- package/lib/src/business/ap-appendix/style/index.js +1 -1
- package/lib/src/business/ap-attachment/style/index.d.ts +6 -0
- package/lib/src/business/ap-attachment/style/index.js +1 -1
- package/lib/src/business/ap-batch-action/style/index.d.ts +2 -2
- package/lib/src/business/ap-batch-action/style/index.js +1 -1
- package/lib/src/business/ap-card/style/index.d.ts +2 -2
- package/lib/src/business/ap-card/style/index.js +1 -1
- package/lib/src/business/ap-copy/style/index.js +1 -1
- package/lib/src/business/ap-descriptions/formatter/index.js +1 -1
- package/lib/src/business/ap-descriptions/style/index.js +1 -1
- package/lib/src/business/ap-download/style/index.js +1 -1
- package/lib/src/business/ap-draggable-grid/style/index.js +1 -1
- package/lib/src/business/ap-expand-alert/style/index.js +1 -1
- package/lib/src/business/ap-image/style/index.d.ts +2 -2
- package/lib/src/business/ap-image/style/index.js +1 -1
- package/lib/src/business/ap-input-radio/style/index.js +1 -1
- package/lib/src/business/ap-label/style/index.d.ts +14 -0
- package/lib/src/business/ap-label/style/index.js +1 -1
- package/lib/src/business/ap-ladder/style/index.js +1 -1
- package/lib/src/business/ap-product-info/style/index.d.ts +10 -0
- package/lib/src/business/ap-product-info/style/index.js +1 -1
- package/lib/src/business/ap-radio-group/style/index.js +1 -1
- package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -1
- package/lib/src/business/ap-select-layout/style/index.d.ts +6 -0
- package/lib/src/business/ap-select-layout/style/index.js +1 -1
- package/lib/src/business/ap-size-input/style/index.js +1 -1
- package/lib/src/business/ap-status/style/index.js +1 -1
- package/lib/src/business/ap-summary/style/index.d.ts +10 -0
- package/lib/src/business/ap-summary/style/index.js +1 -1
- package/lib/src/business/ap-table-modal/style/index.d.ts +11 -1
- package/lib/src/business/ap-table-modal/style/index.js +1 -1
- package/lib/src/business/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/business/ap-tag/style/index.js +1 -1
- package/lib/src/business/ap-title/style/index.d.ts +2 -1
- package/lib/src/business/ap-title/style/index.js +1 -1
- package/lib/src/business/ap-upload/style/index.js +1 -1
- package/lib/src/business/ap-upload/style/multiple-file.d.ts +2 -2
- package/lib/src/business/ap-upload/style/multiple-file.js +1 -1
- package/lib/src/business/ap-upload/style/picture.d.ts +3 -2
- package/lib/src/business/ap-upload/style/picture.js +1 -1
- package/lib/src/business/ap-upload/style/single-file.d.ts +3 -2
- package/lib/src/business/ap-upload/style/single-file.js +1 -1
- package/lib/src/business/ap-upload/style/token.d.ts +19 -0
- package/lib/src/business/ap-upload/style/token.js +1 -0
- package/lib/src/business/ap-upload-file/ap-upload-single/style/index.d.ts +24 -2
- package/lib/src/business/ap-upload-file/ap-upload-single/style/index.js +1 -1
- package/lib/src/business/ap-upload-file/icon/delete-icon.vue.js +1 -1
- package/lib/src/business/ap-upload-file/icon/file-icon.vue.js +1 -1
- package/lib/src/business/ap-value-select-card/style/index.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue2.js +1 -1
- package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
- package/lib/src/business/ap-view/icons/line-delete.vue.js +1 -1
- package/lib/src/business/ap-view/icons/line-down.vue.js +1 -1
- package/lib/src/business/ap-view/icons/line-eye.vue.js +1 -1
- package/lib/src/business/ap-view/style/index.d.ts +6 -2
- package/lib/src/business/ap-view/style/index.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/business/batch-input-group/style/index.js +1 -1
- package/lib/src/check-card/style/index.js +1 -1
- package/lib/src/design-token/constants.js +1 -1
- package/lib/src/design-token/interface.d.ts +139 -12
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/editable-table/style/index.js +1 -1
- package/lib/src/editable-table/utils.d.ts +1 -1
- package/lib/src/editable-table/utils.js +1 -1
- package/lib/src/highlight/index.d.ts +3 -0
- package/lib/src/highlight/index.js +1 -0
- package/lib/src/highlight/index.vue.d.ts +31 -0
- package/lib/src/highlight/index.vue.js +1 -0
- package/lib/src/highlight/index.vue2.js +1 -0
- package/lib/src/highlight/interface.d.ts +14 -0
- package/lib/src/highlight/interface.js +1 -0
- package/lib/src/highlight/style/index.d.ts +8 -0
- package/lib/src/highlight/style/index.js +1 -0
- package/lib/src/hooks/useMessage.js +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/loading-bar/index.vue2.js +1 -1
- package/lib/src/loading-bar/style/index.js +3 -3
- package/lib/src/scroll-view/hooks/use-scroll-smooth.js +1 -1
- package/lib/src/scroll-view/index.vue.js +1 -1
- package/lib/src/splitter/style/index.js +1 -1
- package/lib/src/text/index.vue.js +1 -1
- package/lib/src/time-ago/index.vue.js +1 -1
- package/lib/src/time-ago/useTimeAgo.js +1 -1
- package/lib/src/utils/cssinjs/TokenUtil.d.ts +1 -0
- package/lib/src/utils/cssinjs/TokenUtil.js +1 -1
- package/lib/src/utils/decimal.d.ts +36 -0
- package/lib/src/utils/decimal.js +1 -0
- package/lib/src/utils/format.d.ts +21 -0
- package/lib/src/utils/format.js +1 -0
- package/lib/src/utils/index.d.ts +2 -1
- package/lib/src/utils/index.js +1 -1
- package/lib/src/utils/is.d.ts +54 -0
- package/lib/src/utils/is.js +1 -0
- package/lib/src/utils/slot.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +6 -6
- package/es/src/business/ap-appendix/icons/file-icon.vue.d.ts +0 -3
- package/es/src/business/ap-appendix/icons/file-icon.vue.mjs +0 -18
- package/es/src/utils/copy-text-to-clipboard.d.ts +0 -1
- package/es/src/utils/tree.d.ts +0 -38
- package/es/src/utils/uuid.d.ts +0 -2
- package/lib/src/business/ap-appendix/icons/file-icon.vue.d.ts +0 -3
- package/lib/src/business/ap-appendix/icons/file-icon.vue.js +0 -1
- package/lib/src/utils/copy-text-to-clipboard.d.ts +0 -1
- package/lib/src/utils/tree.d.ts +0 -38
- package/lib/src/utils/uuid.d.ts +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as G, useSlots as U, ref as y, watch as W, unref as n, createBlock as M, openBlock as $, withCtx as d, createVNode as w, mergeProps as q, createSlots as J, renderList as Q, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
|
|
2
2
|
import { ApForm as u } from "../../ap-form/index.mjs";
|
|
3
3
|
import { isEqual as ee, isArray as g, omit as oe } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
@@ -12,7 +12,7 @@ import { useNamespace as le } from "../../config-provider/hooks/use-namespace.mj
|
|
|
12
12
|
import { useControllableValue as re } from "../../hooks/useControllableValue.mjs";
|
|
13
13
|
import { useGlobalConfig as se } from "../../config-provider/hooks/use-global-config.mjs";
|
|
14
14
|
import ie from "../index.vue.mjs";
|
|
15
|
-
const xe = /* @__PURE__ */
|
|
15
|
+
const xe = /* @__PURE__ */ G({
|
|
16
16
|
name: "EditableGrid",
|
|
17
17
|
__name: "index",
|
|
18
18
|
props: {
|
|
@@ -68,7 +68,7 @@ const xe = /* @__PURE__ */ O({
|
|
|
68
68
|
rowExpandable: {},
|
|
69
69
|
transformCellText: {},
|
|
70
70
|
rowSelection: {
|
|
71
|
-
type: Boolean
|
|
71
|
+
type: [Boolean, Object]
|
|
72
72
|
},
|
|
73
73
|
onLoadingChange: {},
|
|
74
74
|
onShownColumnsChange: {},
|
|
@@ -129,12 +129,12 @@ const xe = /* @__PURE__ */ O({
|
|
|
129
129
|
},
|
|
130
130
|
emits: ["update:value"],
|
|
131
131
|
setup(h, {
|
|
132
|
-
expose:
|
|
133
|
-
emit:
|
|
132
|
+
expose: b,
|
|
133
|
+
emit: C
|
|
134
134
|
}) {
|
|
135
|
-
const
|
|
135
|
+
const R = U(), o = h, {
|
|
136
136
|
b: v
|
|
137
|
-
} = le("editable-aggrid"), x = ne("editable-aggrid"), B =
|
|
137
|
+
} = le("editable-aggrid"), x = ne("editable-aggrid"), B = C, s = y(), {
|
|
138
138
|
value: r,
|
|
139
139
|
updateValue: m
|
|
140
140
|
} = re(o, B), l = y(), S = u.useWatch(o.name, l);
|
|
@@ -150,12 +150,12 @@ const xe = /* @__PURE__ */ O({
|
|
|
150
150
|
remove: N,
|
|
151
151
|
removeByKey: A,
|
|
152
152
|
getRowData: V,
|
|
153
|
-
getRowsData:
|
|
154
|
-
setRowData:
|
|
155
|
-
clear:
|
|
153
|
+
getRowsData: j,
|
|
154
|
+
setRowData: k,
|
|
155
|
+
clear: D,
|
|
156
156
|
refreshRowIds: i
|
|
157
157
|
} = te(o, l, r, m);
|
|
158
|
-
function
|
|
158
|
+
function K() {
|
|
159
159
|
const e = s.value?._internalGridApi;
|
|
160
160
|
if (!i.value?.length || !e)
|
|
161
161
|
return;
|
|
@@ -183,10 +183,10 @@ const xe = /* @__PURE__ */ O({
|
|
|
183
183
|
const t = e === "end" ? r.value.length - 1 : e;
|
|
184
184
|
s.value?.scrollToRow(t, a);
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function O(e, a) {
|
|
187
187
|
s.value?.scrollToColumn(e, a);
|
|
188
188
|
}
|
|
189
|
-
return
|
|
189
|
+
return b({
|
|
190
190
|
resetFields: I,
|
|
191
191
|
validateFields: H,
|
|
192
192
|
add: F,
|
|
@@ -194,13 +194,13 @@ const xe = /* @__PURE__ */ O({
|
|
|
194
194
|
remove: N,
|
|
195
195
|
removeByKey: A,
|
|
196
196
|
getRowData: V,
|
|
197
|
-
getRowsData:
|
|
198
|
-
setRowData:
|
|
199
|
-
clear:
|
|
197
|
+
getRowsData: j,
|
|
198
|
+
setRowData: k,
|
|
199
|
+
clear: D,
|
|
200
200
|
setTableData: L,
|
|
201
201
|
scrollTo: c,
|
|
202
202
|
scrollToRow: c,
|
|
203
|
-
scrollToColumn:
|
|
203
|
+
scrollToColumn: O
|
|
204
204
|
}), (e, a) => ($(), M(n(u), {
|
|
205
205
|
ref_key: "formRef",
|
|
206
206
|
ref: l,
|
|
@@ -223,12 +223,12 @@ const xe = /* @__PURE__ */ O({
|
|
|
223
223
|
columns: n(_),
|
|
224
224
|
"data-source": n(r),
|
|
225
225
|
"search-form": !1,
|
|
226
|
-
onUpdate:
|
|
226
|
+
onUpdate: K
|
|
227
227
|
}), J({
|
|
228
228
|
_: 2
|
|
229
|
-
}, [Q(
|
|
229
|
+
}, [Q(R, (t, f) => ({
|
|
230
230
|
name: f,
|
|
231
|
-
fn: d((
|
|
231
|
+
fn: d((P) => [X(e.$slots, f, Y(Z(P || {})))])
|
|
232
232
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
233
233
|
_: 3
|
|
234
234
|
}, 8, ["name"])]),
|
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
import { getTableRenderProps as c, objectToString as S } from "../../ap-table/utils.mjs";
|
|
2
2
|
import { rendererMap as x } from "../renderer/index.mjs";
|
|
3
|
-
import { isNumber as u, isFunction as
|
|
3
|
+
import { isNumber as u, isFunction as m } from "lodash-unified";
|
|
4
4
|
import { ref as D, unref as v, computed as y } from "vue";
|
|
5
5
|
import "../components/body-cell/index.vue.mjs";
|
|
6
6
|
import "../components/header-cell/index.vue.mjs";
|
|
7
7
|
import "../components/tooltip/index.vue.mjs";
|
|
8
8
|
import "../../config-provider/index.mjs";
|
|
9
9
|
import { dataIndexToField as P } from "../../ap-grid/utils/col.mjs";
|
|
10
|
-
import
|
|
11
|
-
import { useGlobalConfig as
|
|
12
|
-
import { useNamespace as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
10
|
+
import "../../utils/index.mjs";
|
|
11
|
+
import { useGlobalConfig as I } from "../../config-provider/hooks/use-global-config.mjs";
|
|
12
|
+
import { useNamespace as _ } from "../../config-provider/hooks/use-namespace.mjs";
|
|
13
|
+
import G from "../components/body-cell/index.vue2.mjs";
|
|
14
|
+
import W from "../components/tooltip/index.vue2.mjs";
|
|
15
|
+
import { isDef as z } from "../../utils/is.mjs";
|
|
15
16
|
import h from "../components/header-cell/index.vue2.mjs";
|
|
16
17
|
function F(t) {
|
|
17
18
|
return u(t) && t > 1;
|
|
18
19
|
}
|
|
19
|
-
function M(t,
|
|
20
|
-
if (
|
|
21
|
-
return
|
|
22
|
-
if (
|
|
23
|
-
return
|
|
20
|
+
function M(t, i) {
|
|
21
|
+
if (i.bodyCellTooltip)
|
|
22
|
+
return m(i.bodyCellTooltip) ? i.bodyCellTooltip(t.value, t.data) : i.bodyCellTooltip;
|
|
23
|
+
if (i.renderText)
|
|
24
|
+
return i.renderText({
|
|
24
25
|
value: t.value,
|
|
25
26
|
record: t.data,
|
|
26
|
-
column:
|
|
27
|
+
column: i,
|
|
27
28
|
text: t.value
|
|
28
29
|
});
|
|
29
|
-
const d =
|
|
30
|
+
const d = i.valueType || "text", p = x[d];
|
|
30
31
|
if (p) {
|
|
31
32
|
const f = c(
|
|
32
|
-
{ ...
|
|
33
|
+
{ ...i, valueType: d },
|
|
33
34
|
{
|
|
34
35
|
value: t.value,
|
|
35
36
|
text: t.value,
|
|
@@ -43,18 +44,18 @@ function M(t, a) {
|
|
|
43
44
|
}
|
|
44
45
|
return S(t.value);
|
|
45
46
|
}
|
|
46
|
-
const
|
|
47
|
-
const p =
|
|
48
|
-
const
|
|
49
|
-
cellRenderer:
|
|
47
|
+
const Y = (t, i, d) => {
|
|
48
|
+
const p = I("valueTypeMap"), C = D(), { em: f } = _("ag-grid"), b = (r) => {
|
|
49
|
+
const a = {
|
|
50
|
+
cellRenderer: G,
|
|
50
51
|
cellRendererParams: {
|
|
51
52
|
column: r,
|
|
52
53
|
extraValueType: v(p),
|
|
53
|
-
rowKey:
|
|
54
|
+
rowKey: i.rowKey
|
|
54
55
|
}
|
|
55
56
|
};
|
|
56
57
|
if (r.customRender)
|
|
57
|
-
return
|
|
58
|
+
return a;
|
|
58
59
|
if (r.renderText)
|
|
59
60
|
return {
|
|
60
61
|
valueFormatter: (o) => r.renderText({
|
|
@@ -80,22 +81,22 @@ const X = (t, a, d) => {
|
|
|
80
81
|
);
|
|
81
82
|
return e(s);
|
|
82
83
|
}
|
|
83
|
-
} :
|
|
84
|
+
} : a;
|
|
84
85
|
}, w = (r) => {
|
|
85
|
-
const
|
|
86
|
+
const a = r.valueType || "text", l = x[a], e = {}, o = r.bodyCellTooltip || !r.customRender && l && (r.ellipsis === !0 || r.ellipsis === "tooltip" || u(r.ellipsis)), s = u(r.ellipsis) && r.ellipsis > 1, n = u(r.ellipsis) ? r.ellipsis : 1;
|
|
86
87
|
return e.tooltipValueGetter = o ? (T) => M(T, r) : void 0, e.wrapText = !r.ellipsis || s, e.cellStyle = {
|
|
87
88
|
"--ag-grid-line-clamp": n
|
|
88
|
-
}, e.tooltipComponent =
|
|
89
|
+
}, e.tooltipComponent = W, e.tooltipComponentParams = {
|
|
89
90
|
lineClamp: n,
|
|
90
91
|
gridWrapperRef: C
|
|
91
92
|
}, e;
|
|
92
93
|
}, g = y(() => {
|
|
93
94
|
const r = v(t);
|
|
94
|
-
function
|
|
95
|
+
function a(l) {
|
|
95
96
|
return l.map((e) => {
|
|
96
97
|
const o = {
|
|
97
98
|
field: P(e.dataIndex),
|
|
98
|
-
colId:
|
|
99
|
+
colId: z(e.key) ? String(e.key) : void 0,
|
|
99
100
|
sortable: !!e.sorter,
|
|
100
101
|
comparator: e.sorter === !0 ? () => 0 : e.sorter,
|
|
101
102
|
headerComponentParams: {
|
|
@@ -112,7 +113,7 @@ const X = (t, a, d) => {
|
|
|
112
113
|
colSpan: e.colSpan,
|
|
113
114
|
spanRows: e.spanRows,
|
|
114
115
|
cellClass: d((s) => {
|
|
115
|
-
const n = e.cellClass || "", T =
|
|
116
|
+
const n = e.cellClass || "", T = m(n) ? n(s.data, s.node) : n;
|
|
116
117
|
return [
|
|
117
118
|
`${f("cell", e.align || "left")}`,
|
|
118
119
|
F(e.ellipsis) ? f("cell", "multiline") : null,
|
|
@@ -125,7 +126,7 @@ const X = (t, a, d) => {
|
|
|
125
126
|
autoHeight: !0,
|
|
126
127
|
// 设置自动计算高度以自适应多行换行的场景
|
|
127
128
|
...w(e),
|
|
128
|
-
...
|
|
129
|
+
...b(e)
|
|
129
130
|
};
|
|
130
131
|
return e.children?.length ? {
|
|
131
132
|
...o,
|
|
@@ -133,15 +134,15 @@ const X = (t, a, d) => {
|
|
|
133
134
|
headerGroupComponentParams: {
|
|
134
135
|
column: e
|
|
135
136
|
},
|
|
136
|
-
children:
|
|
137
|
+
children: a(e.children)
|
|
137
138
|
} : o;
|
|
138
139
|
});
|
|
139
140
|
}
|
|
140
|
-
return
|
|
141
|
+
return a(r);
|
|
141
142
|
}), R = y(
|
|
142
143
|
() => ({
|
|
143
144
|
headerComponent: h,
|
|
144
|
-
resizable:
|
|
145
|
+
resizable: i.columnResizable,
|
|
145
146
|
suppressMovable: !0,
|
|
146
147
|
cellDataType: !1
|
|
147
148
|
})
|
|
@@ -153,5 +154,5 @@ const X = (t, a, d) => {
|
|
|
153
154
|
};
|
|
154
155
|
};
|
|
155
156
|
export {
|
|
156
|
-
|
|
157
|
+
Y as useColumnsDef
|
|
157
158
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { shallowRef as _, computed as S, unref as d, isRef as z } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import { isFunction as
|
|
2
|
+
import "../../utils/index.mjs";
|
|
3
|
+
import { isFunction as h, isUndefined as A, isNumber as K, cloneDeep as E, isArray as x, isString as N } from "lodash-unified";
|
|
4
4
|
import { arrayToObject as U } from "../editable/utils.mjs";
|
|
5
|
+
import { isDef as I } from "../../utils/is.mjs";
|
|
5
6
|
let $ = 0;
|
|
6
7
|
function R() {
|
|
7
8
|
return `_ag_grid${$++}`;
|
|
8
9
|
}
|
|
9
|
-
const
|
|
10
|
+
const P = (n, m, i, g) => {
|
|
10
11
|
const w = _([]), y = S(() => z(m) ? d(m) : m);
|
|
11
12
|
function F(u, r) {
|
|
12
13
|
const l = d(i)?.length || 0;
|
|
13
|
-
if (
|
|
14
|
+
if (I(n.maxLength) && l >= n.maxLength || !u && h(n.rowKey))
|
|
14
15
|
return;
|
|
15
16
|
const f = {
|
|
16
17
|
...u || { [n.rowKey]: R() }
|
|
@@ -33,7 +34,7 @@ const J = (n, m, i, g) => {
|
|
|
33
34
|
}
|
|
34
35
|
function j(u, r = "suffix") {
|
|
35
36
|
const l = d(i)?.length || 0, f = K(u) ? u : u.length;
|
|
36
|
-
if (
|
|
37
|
+
if (I(n.maxLength) && l + f > n.maxLength || K(u) && h(n.rowKey))
|
|
37
38
|
return;
|
|
38
39
|
const o = K(u) ? new Array(u).fill(0).map(() => ({ [n.rowKey]: R() })) : E(u), s = U(o, n.rowKey);
|
|
39
40
|
y.value?.setFieldValue?.(
|
|
@@ -52,7 +53,7 @@ const J = (n, m, i, g) => {
|
|
|
52
53
|
);
|
|
53
54
|
}
|
|
54
55
|
function k(u) {
|
|
55
|
-
const r =
|
|
56
|
+
const r = x(u) ? u : [u];
|
|
56
57
|
y.value?.setFieldValue?.(
|
|
57
58
|
n.name,
|
|
58
59
|
void 0,
|
|
@@ -78,7 +79,7 @@ const J = (n, m, i, g) => {
|
|
|
78
79
|
return N(l) ? u[l] : l(u, r);
|
|
79
80
|
}
|
|
80
81
|
function L(u) {
|
|
81
|
-
const r = new Set(
|
|
82
|
+
const r = new Set(x(u) ? u : [u]);
|
|
82
83
|
r.size !== 0 && y.value?.setFieldValue?.(
|
|
83
84
|
n.name,
|
|
84
85
|
void 0,
|
|
@@ -146,5 +147,5 @@ const J = (n, m, i, g) => {
|
|
|
146
147
|
};
|
|
147
148
|
};
|
|
148
149
|
export {
|
|
149
|
-
|
|
150
|
+
P as useEditableApi
|
|
150
151
|
};
|
|
@@ -3,30 +3,31 @@ import { isArray as m, isFunction as E } from "lodash-unified";
|
|
|
3
3
|
import { mergeClass as F, getColumnIsRequired as v } from "../../editable-table/utils.mjs";
|
|
4
4
|
import { updateFormProps as y, getFieldProps as q } from "../../ap-table/utils.mjs";
|
|
5
5
|
import { getFinalEditableNode as A } from "../../ap-grid/utils/editable.mjs";
|
|
6
|
-
import
|
|
7
|
-
import { getRowKey as
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
import "../../utils/index.mjs";
|
|
7
|
+
import { getRowKey as K } from "../editable/utils.mjs";
|
|
8
|
+
import { isDef as M } from "../../utils/is.mjs";
|
|
9
|
+
function b(t, n, i) {
|
|
10
|
+
t.__skipNextRefresh ? t.__skipNextRefresh[n] = i : t.__skipNextRefresh = { [n]: i };
|
|
10
11
|
}
|
|
11
|
-
function S(t,
|
|
12
|
-
t.__prevEditable ? t.__prevEditable[
|
|
12
|
+
function S(t, n, i) {
|
|
13
|
+
t.__prevEditable ? t.__prevEditable[n] = i : t.__prevEditable = { [n]: i };
|
|
13
14
|
}
|
|
14
|
-
const
|
|
15
|
+
const L = (t, n, i) => {
|
|
15
16
|
function I(e) {
|
|
16
|
-
const s = e.editable, o =
|
|
17
|
+
const s = e.editable, o = i ? [i] : m(t.name) ? t.name : [t.name];
|
|
17
18
|
return !s || e.children?.length ? {
|
|
18
19
|
_path: [...o]
|
|
19
20
|
} : {
|
|
20
|
-
customRender({ value: d, originalNode: C, params: a, ...
|
|
21
|
+
customRender({ value: d, originalNode: C, params: a, ...r }) {
|
|
21
22
|
const c = E(e.editable) ? e.editable(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
r.text,
|
|
24
|
+
r.record,
|
|
25
|
+
r.rowIndex
|
|
25
26
|
) : !!e.editable;
|
|
26
27
|
let u = C;
|
|
27
|
-
const R = m(e.dataIndex) ? e.dataIndex : [e.dataIndex], x =
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
const R = m(e.dataIndex) ? e.dataIndex : [e.dataIndex], x = K(
|
|
29
|
+
r.record,
|
|
30
|
+
r.rowIndex,
|
|
30
31
|
t.rowKey
|
|
31
32
|
);
|
|
32
33
|
if (c) {
|
|
@@ -34,11 +35,11 @@ const J = (t, i, r) => {
|
|
|
34
35
|
e,
|
|
35
36
|
q(e.fieldProps, {
|
|
36
37
|
value: d,
|
|
37
|
-
...
|
|
38
|
+
...r
|
|
38
39
|
})
|
|
39
40
|
), h = {};
|
|
40
41
|
t.onFieldChange && (h[`onUpdate:${_.valuePropName || "value"}`] = (N) => t.onFieldChange?.(
|
|
41
|
-
|
|
42
|
+
r.rowIndex,
|
|
42
43
|
e.dataIndex,
|
|
43
44
|
N
|
|
44
45
|
));
|
|
@@ -55,21 +56,21 @@ const J = (t, i, r) => {
|
|
|
55
56
|
u = A(
|
|
56
57
|
e,
|
|
57
58
|
p,
|
|
58
|
-
|
|
59
|
-
k(
|
|
59
|
+
r.record,
|
|
60
|
+
k(n)
|
|
60
61
|
);
|
|
61
62
|
}
|
|
62
63
|
e.customRender && (u = e.customRender({
|
|
63
64
|
value: d,
|
|
64
|
-
...
|
|
65
|
+
...r,
|
|
65
66
|
editable: c,
|
|
66
67
|
originalNode: u,
|
|
67
|
-
index:
|
|
68
|
-
renderIndex:
|
|
68
|
+
index: r.rowIndex,
|
|
69
|
+
renderIndex: r.rowIndex,
|
|
69
70
|
path: [...o, String(x)]
|
|
70
71
|
}));
|
|
71
72
|
const l = a.node, f = a.column.getColId(), g = l.__prevEditable?.[f];
|
|
72
|
-
return !l.__skipNextRefresh?.[f] &&
|
|
73
|
+
return !l.__skipNextRefresh?.[f] && M(g) && g !== c && (b(l, f, !0), setTimeout(() => {
|
|
73
74
|
a?.api.refreshCells({
|
|
74
75
|
rowNodes: [a.node],
|
|
75
76
|
columns: [a.column.getColId()],
|
|
@@ -97,6 +98,6 @@ const J = (t, i, r) => {
|
|
|
97
98
|
});
|
|
98
99
|
};
|
|
99
100
|
export {
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
L as default,
|
|
102
|
+
L as useGetEditableColumns
|
|
102
103
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { shallowRef as E, unref as d } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import { isFunction as
|
|
2
|
+
import "../../utils/index.mjs";
|
|
3
|
+
import { isFunction as F, isUndefined as x, isNumber as h, cloneDeep as S, isArray as V } from "lodash-unified";
|
|
4
4
|
import { getRowKey as y, arrayToObject as U } from "../editable/utils.mjs";
|
|
5
|
+
import { isDef as R } from "../../utils/is.mjs";
|
|
5
6
|
let $ = 0;
|
|
6
7
|
function I() {
|
|
7
8
|
return `_ag_grid${$++}`;
|
|
8
9
|
}
|
|
9
|
-
const
|
|
10
|
+
const P = (l, c, n, w) => {
|
|
10
11
|
const K = E([]);
|
|
11
12
|
function j(f, s) {
|
|
12
13
|
const v = d(n)?.length || 0;
|
|
13
|
-
if (
|
|
14
|
+
if (R(l.maxLength) && v >= l.maxLength || !f && F(l.rowKey))
|
|
14
15
|
return;
|
|
15
16
|
const t = {
|
|
16
17
|
...f || { [l.rowKey]: I() }
|
|
@@ -21,7 +22,7 @@ const J = (l, c, n, w) => {
|
|
|
21
22
|
!1,
|
|
22
23
|
(i, r) => {
|
|
23
24
|
const e = y(t, void 0, l.rowKey);
|
|
24
|
-
i[r] ? i[r][e] = t : i[r] = { [e]: t }, n.value ?
|
|
25
|
+
i[r] ? i[r][e] = t : i[r] = { [e]: t }, n.value ? x(s) ? n.value.push(t) : (K.value = n.value.map(
|
|
25
26
|
(u, o) => o < s ? null : y(u, o, l.rowKey)
|
|
26
27
|
).filter(Boolean), n.value.splice(s, 0, t)) : n.value = [t], c?.setFieldValue(
|
|
27
28
|
l.name,
|
|
@@ -32,7 +33,7 @@ const J = (l, c, n, w) => {
|
|
|
32
33
|
u[o] = [t];
|
|
33
34
|
return;
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
+
x(s) ? u[o].push(t) : u[o].splice(s, 0, t);
|
|
36
37
|
}
|
|
37
38
|
);
|
|
38
39
|
}
|
|
@@ -42,7 +43,7 @@ const J = (l, c, n, w) => {
|
|
|
42
43
|
if (!f)
|
|
43
44
|
return;
|
|
44
45
|
const v = d(n)?.length || 0, t = h(f) ? f : f.length;
|
|
45
|
-
if (
|
|
46
|
+
if (R(l.maxLength) && v + t > l.maxLength || h(f) && F(l.rowKey))
|
|
46
47
|
return;
|
|
47
48
|
const i = h(f) ? new Array(f).fill(0).map(() => ({ [l.rowKey]: I() })) : S(f), r = U(i, l.rowKey);
|
|
48
49
|
c?.setFieldValue(
|
|
@@ -68,7 +69,7 @@ const J = (l, c, n, w) => {
|
|
|
68
69
|
);
|
|
69
70
|
}
|
|
70
71
|
function L(f) {
|
|
71
|
-
const s =
|
|
72
|
+
const s = V(f) ? f : [f];
|
|
72
73
|
c?.setFieldValue(
|
|
73
74
|
w,
|
|
74
75
|
void 0,
|
|
@@ -97,7 +98,7 @@ const J = (l, c, n, w) => {
|
|
|
97
98
|
);
|
|
98
99
|
}
|
|
99
100
|
function O(f) {
|
|
100
|
-
const s = new Set(
|
|
101
|
+
const s = new Set(V(f) ? f : [f]);
|
|
101
102
|
s.size !== 0 && c?.setFieldValue(
|
|
102
103
|
w,
|
|
103
104
|
void 0,
|
|
@@ -172,5 +173,5 @@ const J = (l, c, n, w) => {
|
|
|
172
173
|
};
|
|
173
174
|
};
|
|
174
175
|
export {
|
|
175
|
-
|
|
176
|
+
P as useEditableFormItemApi
|
|
176
177
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as po, useSlots as fo, ref as M, toRef as F, unref as t, computed as n, nextTick as z, watch as G, createElementBlock as
|
|
1
|
+
import { defineComponent as po, useSlots as fo, ref as M, toRef as F, unref as t, computed as n, nextTick as z, watch as G, createElementBlock as O, openBlock as h, normalizeStyle as L, normalizeClass as f, createCommentVNode as se, createElementVNode as B, createVNode as ie, mergeProps as W, createSlots as go, withCtx as ue, Fragment as wo, renderList as So, createBlock as H, resolveDynamicComponent as Co, renderSlot as de, withDirectives as ho, vShow as yo } from "vue";
|
|
2
2
|
import { AgGridVue as Ro } from "ag-grid-vue3";
|
|
3
|
-
import { ModuleRegistry as vo, ValidationModule as bo, ColumnAutoSizeModule as Mo, PinnedRowModule as Fo, RowAutoHeightModule as Bo, RowStyleModule as ko, CellSpanModule as xo, CellStyleModule as Io, TooltipModule as Ao, RowSelectionModule as No, LocaleModule as To, ValueCacheModule as Do, GridStateModule as Eo, ColumnApiModule as Po, RowApiModule as Ko, CellApiModule as Vo, RenderApiModule as zo, EventApiModule as Go, ClientSideRowModelApiModule as
|
|
3
|
+
import { ModuleRegistry as vo, ValidationModule as bo, ColumnAutoSizeModule as Mo, PinnedRowModule as Fo, RowAutoHeightModule as Bo, RowStyleModule as ko, CellSpanModule as xo, CellStyleModule as Io, TooltipModule as Ao, RowSelectionModule as No, LocaleModule as To, ValueCacheModule as Do, GridStateModule as Eo, ColumnApiModule as Po, RowApiModule as Ko, CellApiModule as Vo, RenderApiModule as zo, EventApiModule as Go, ClientSideRowModelApiModule as Oo, ClientSideRowModelModule as Lo } from "ag-grid-community";
|
|
4
4
|
import { mergeProps as Wo } from "./utils.mjs";
|
|
5
5
|
import { Spin as Ho, Pagination as Uo } from "@aplus-frontend/antdv";
|
|
6
6
|
import { isUndefined as k, isFunction as N } from "lodash-unified";
|
|
@@ -16,22 +16,23 @@ import { useToken as Zo } from "@aplus-frontend/antdv/es/theme/internal";
|
|
|
16
16
|
import { useTheme as et } from "./theme.mjs";
|
|
17
17
|
import { useColumns as ot } from "./hooks/use-columns.mjs";
|
|
18
18
|
import { useColumnsDef as tt } from "./hooks/use-columns-def.mjs";
|
|
19
|
-
import
|
|
20
|
-
import { getValidVNodeList as
|
|
21
|
-
import { useSearchForm as
|
|
19
|
+
import "../utils/index.mjs";
|
|
20
|
+
import { getValidVNodeList as rt } from "../utils/slot.mjs";
|
|
21
|
+
import { useSearchForm as lt } from "./hooks/use-search-form.mjs";
|
|
22
22
|
import "./components/empty/index.vue.mjs";
|
|
23
|
-
import
|
|
24
|
-
import { usePinnedRow as
|
|
25
|
-
import
|
|
23
|
+
import at from "./hooks/use-virtual-config.mjs";
|
|
24
|
+
import { usePinnedRow as nt } from "./hooks/use-pinned-row.mjs";
|
|
25
|
+
import st from "./hooks/use-selection-col-def.mjs";
|
|
26
26
|
import "./components/row/index.vue.mjs";
|
|
27
|
-
import
|
|
28
|
-
import { AG_GRID_LOCALE_EN as
|
|
29
|
-
import { useNamespace as
|
|
30
|
-
import { useLocale as
|
|
31
|
-
import { useGlobalConfig as
|
|
27
|
+
import it from "./style/index.mjs";
|
|
28
|
+
import { AG_GRID_LOCALE_EN as ut, AG_GRID_LOCALE_CN as dt } from "@ag-grid-community/locale";
|
|
29
|
+
import { useNamespace as ct } from "../config-provider/hooks/use-namespace.mjs";
|
|
30
|
+
import { useLocale as mt } from "../config-provider/hooks/use-locale.mjs";
|
|
31
|
+
import { useGlobalConfig as pt } from "../config-provider/hooks/use-global-config.mjs";
|
|
32
|
+
import { isDef as ft } from "../utils/is.mjs";
|
|
32
33
|
import gt from "./components/row/index.vue2.mjs";
|
|
33
34
|
import wt from "./components/empty/index.vue2.mjs";
|
|
34
|
-
const
|
|
35
|
+
const Xt = /* @__PURE__ */ po({
|
|
35
36
|
name: "AgGrid",
|
|
36
37
|
__name: "index",
|
|
37
38
|
props: {
|
|
@@ -71,7 +72,7 @@ const Qt = /* @__PURE__ */ po({
|
|
|
71
72
|
rowExpandable: {},
|
|
72
73
|
transformCellText: {},
|
|
73
74
|
columns: {},
|
|
74
|
-
rowSelection: { type: Boolean },
|
|
75
|
+
rowSelection: { type: [Boolean, Object] },
|
|
75
76
|
card: { type: Boolean },
|
|
76
77
|
params: {},
|
|
77
78
|
request: {},
|
|
@@ -108,8 +109,8 @@ const Qt = /* @__PURE__ */ po({
|
|
|
108
109
|
},
|
|
109
110
|
setup(me, { expose: pe }) {
|
|
110
111
|
const fe = {
|
|
111
|
-
"zh-cn":
|
|
112
|
-
en:
|
|
112
|
+
"zh-cn": dt,
|
|
113
|
+
en: ut
|
|
113
114
|
};
|
|
114
115
|
vo.registerModules([
|
|
115
116
|
bo,
|
|
@@ -129,18 +130,18 @@ const Qt = /* @__PURE__ */ po({
|
|
|
129
130
|
Vo,
|
|
130
131
|
zo,
|
|
131
132
|
Go,
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
Oo,
|
|
134
|
+
Lo
|
|
134
135
|
]);
|
|
135
|
-
const o = me, U = fo(), { e: x, b: d, be: ge } =
|
|
136
|
+
const o = me, U = fo(), { e: x, b: d, be: ge } = ct("ag-grid"), { lang: _ } = mt(), we = it("ag-grid"), y = M(o.size), Se = et(
|
|
136
137
|
y,
|
|
137
138
|
F(o, "rowHeight"),
|
|
138
139
|
F(o, "theme")
|
|
139
|
-
), Ce =
|
|
140
|
+
), Ce = at(F(o, "virtual")), { rowPinnedGridConfig: j, getRowPinnedCellClass: he } = nt(
|
|
140
141
|
F(o, "summary")
|
|
141
|
-
), ye =
|
|
142
|
+
), ye = pt("apGrid"), s = M(), [, Re] = Zo();
|
|
142
143
|
let R = !!o.dataSource;
|
|
143
|
-
const $ =
|
|
144
|
+
const $ = lt(o), { shownColumns: g, columns: q, columnKeys: ve, getTargetColumnByKey: be } = ot(o), { defaultColDef: Me, columnDefs: Fe, gridWrapperRef: Be } = tt(q, o, he), I = M({});
|
|
144
145
|
Jo({
|
|
145
146
|
sorter: I,
|
|
146
147
|
setSorter(e) {
|
|
@@ -178,7 +179,7 @@ const Qt = /* @__PURE__ */ po({
|
|
|
178
179
|
return;
|
|
179
180
|
const r = e.getColumnState()?.map((l) => ({ ...l, sort: null }));
|
|
180
181
|
e.applyColumnState({ state: r });
|
|
181
|
-
}, T = M(!0), Ne = n(() =>
|
|
182
|
+
}, T = M(!0), Ne = n(() => ft(o.manual) ? o.manual : rt(U.searchFormExtra?.() || []).some((r) => r.type?.name === "ApView")), {
|
|
182
183
|
formRef: w,
|
|
183
184
|
submit: D,
|
|
184
185
|
reset: E,
|
|
@@ -221,15 +222,15 @@ const Qt = /* @__PURE__ */ po({
|
|
|
221
222
|
...ce,
|
|
222
223
|
...e
|
|
223
224
|
};
|
|
224
|
-
}), Pe =
|
|
225
|
+
}), Pe = st(o, g), Ke = n(
|
|
225
226
|
() => k(o.dataSource) ? S.records : o.dataSource
|
|
226
227
|
), {
|
|
227
228
|
select: Ve,
|
|
228
229
|
unSelect: ze,
|
|
229
230
|
selectedRows: P,
|
|
230
231
|
selectedRowKeys: Ge,
|
|
231
|
-
clearAll:
|
|
232
|
-
selectMultiByKeys:
|
|
232
|
+
clearAll: Oe,
|
|
233
|
+
selectMultiByKeys: Le,
|
|
233
234
|
selectMulti: We,
|
|
234
235
|
unSelectMulti: He
|
|
235
236
|
} = qo({
|
|
@@ -277,10 +278,10 @@ const Qt = /* @__PURE__ */ po({
|
|
|
277
278
|
}, $e = () => {
|
|
278
279
|
R = !0;
|
|
279
280
|
}, V = () => {
|
|
280
|
-
|
|
281
|
+
Oe(), s.value?.deselectAll();
|
|
281
282
|
};
|
|
282
283
|
function qe(e) {
|
|
283
|
-
|
|
284
|
+
Le(e), z(() => {
|
|
284
285
|
A({});
|
|
285
286
|
});
|
|
286
287
|
}
|
|
@@ -463,14 +464,14 @@ const Qt = /* @__PURE__ */ po({
|
|
|
463
464
|
refreshCells: io,
|
|
464
465
|
redrawRows: uo,
|
|
465
466
|
_internalGridApi: n(() => s.value)
|
|
466
|
-
}), (e, r) => (h(),
|
|
467
|
+
}), (e, r) => (h(), O("div", {
|
|
467
468
|
class: f(eo.value),
|
|
468
|
-
style:
|
|
469
|
+
style: L(e.wrapperStyle)
|
|
469
470
|
}, [
|
|
470
|
-
t(k)(e.dataSource) && e.searchForm !== !1 && t($).length > 0 ? (h(),
|
|
471
|
+
t(k)(e.dataSource) && e.searchForm !== !1 && t($).length > 0 ? (h(), O("div", {
|
|
471
472
|
key: 0,
|
|
472
473
|
class: f(e.card ? t(x)("search-wrapper") : null),
|
|
473
|
-
style:
|
|
474
|
+
style: L(e.searchFormWrapperStyle)
|
|
474
475
|
}, [
|
|
475
476
|
ie(t(_o).SearchForm, W(e.searchForm || {}, {
|
|
476
477
|
ref_key: "formRef",
|
|
@@ -481,7 +482,7 @@ const Qt = /* @__PURE__ */ po({
|
|
|
481
482
|
onReset: t(E)
|
|
482
483
|
}), go({
|
|
483
484
|
default: ue(() => [
|
|
484
|
-
(h(!0),
|
|
485
|
+
(h(!0), O(wo, null, So(t($), (l) => (h(), H(Co(l.renderNode), {
|
|
485
486
|
key: l.dataIndex
|
|
486
487
|
}))), 128))
|
|
487
488
|
]),
|
|
@@ -498,7 +499,7 @@ const Qt = /* @__PURE__ */ po({
|
|
|
498
499
|
], 6)) : se("", !0),
|
|
499
500
|
B("div", {
|
|
500
501
|
class: f([t(x)("table-wrapper"), e.card ? t(x)("table-wrapper-card") : null]),
|
|
501
|
-
style:
|
|
502
|
+
style: L(e.tableWrapperStyle)
|
|
502
503
|
}, [
|
|
503
504
|
B("div", {
|
|
504
505
|
class: f(t(d)("header-wrapper"))
|
|
@@ -569,5 +570,5 @@ const Qt = /* @__PURE__ */ po({
|
|
|
569
570
|
}
|
|
570
571
|
});
|
|
571
572
|
export {
|
|
572
|
-
|
|
573
|
+
Xt as default
|
|
573
574
|
};
|