@asam-ui/pro 0.0.0-stage → 2.0.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/EDITOR_THIRD_PARTY_NOTICES.md +225 -0
- package/LICENSE +68 -0
- package/README.md +250 -2
- package/THIRD_PARTY_NOTICES.md +9 -0
- package/dist/AsamAdminLayout-DMsByuNN.js +205 -0
- package/dist/Controller-DF6lMt-H.js +3817 -0
- package/dist/Index-DpcRToBH.js +1263 -0
- package/dist/Navigation-D9wz-rqJ.js +202 -0
- package/dist/Resolve-Cq2BDFwo.js +7 -0
- package/dist/_plugin-vue_export-helper-C05QHVBA.js +8 -0
- package/dist/application/composables/environment/index.d.ts +2 -0
- package/dist/application/composables/environment/index.js +2 -0
- package/dist/application/composables/index.d.ts +14 -0
- package/dist/application/composables/index.js +40 -0
- package/dist/application/composables/on-mounted-or-activated/index.d.ts +2 -0
- package/dist/application/composables/on-mounted-or-activated/index.js +2 -0
- package/dist/application/composables/raf/index.d.ts +2 -0
- package/dist/application/composables/raf/index.js +2 -0
- package/dist/application/composables/use-click-away/index.d.ts +3 -0
- package/dist/application/composables/use-click-away/index.js +2 -0
- package/dist/application/composables/use-count-down/index.d.ts +3 -0
- package/dist/application/composables/use-count-down/index.js +2 -0
- package/dist/application/composables/use-custom-field-value/AsamCustomField.vue.d.ts +118 -0
- package/dist/application/composables/use-custom-field-value/Types.d.ts +27 -0
- package/dist/application/composables/use-custom-field-value/index.d.ts +6 -0
- package/dist/application/composables/use-custom-field-value/index.js +2 -0
- package/dist/application/composables/use-event-listener/index.d.ts +5 -0
- package/dist/application/composables/use-event-listener/index.js +7 -0
- package/dist/application/composables/use-page-visibility/index.d.ts +2 -0
- package/dist/application/composables/use-page-visibility/index.js +2 -0
- package/dist/application/composables/use-raf/index.d.ts +2 -0
- package/dist/application/composables/use-raf/index.js +2 -0
- package/dist/application/composables/use-rect/index.d.ts +2 -0
- package/dist/application/composables/use-rect/index.js +2 -0
- package/dist/application/composables/use-relation/index.d.ts +10 -0
- package/dist/application/composables/use-relation/index.js +17 -0
- package/dist/application/composables/use-scroll-parent/index.d.ts +2 -0
- package/dist/application/composables/use-scroll-parent/index.js +2 -0
- package/dist/application/composables/use-toggle/index.d.ts +2 -0
- package/dist/application/composables/use-toggle/index.js +2 -0
- package/dist/application/composables/use-window-size/index.d.ts +2 -0
- package/dist/application/composables/use-window-size/index.js +2 -0
- package/dist/application/index.d.ts +5 -0
- package/dist/application/index.js +16 -0
- package/dist/application/navigation/EmbedPage.vue.d.ts +18 -0
- package/dist/application/navigation/Navigation.d.ts +48 -0
- package/dist/application/navigation/NavigationMenuItems.vue.d.ts +8 -0
- package/dist/application/navigation/NavigationPage.vue.d.ts +10 -0
- package/dist/application/navigation/NavigationShell.vue.d.ts +22 -0
- package/dist/application/navigation/NavigationToolbar.vue.d.ts +11 -0
- package/dist/application/navigation/NavigationView.vue.d.ts +8 -0
- package/dist/application/navigation/Types.d.ts +53 -0
- package/dist/application/navigation/index.d.ts +6 -0
- package/dist/application/navigation/index.js +3 -0
- package/dist/application/preferences/Cache.d.ts +25 -0
- package/dist/application/preferences/I18n.d.ts +25 -0
- package/dist/application/preferences/LocaleLoader.d.ts +22 -0
- package/dist/application/preferences/Preferences.d.ts +16 -0
- package/dist/application/preferences/Storage.d.ts +9 -0
- package/dist/application/preferences/Types.d.ts +38 -0
- package/dist/application/preferences/index.d.ts +9 -0
- package/dist/application/preferences/index.js +2 -0
- package/dist/application/security/Navigation.d.ts +107 -0
- package/dist/application/security/Security.d.ts +74 -0
- package/dist/application/security/Types.d.ts +49 -0
- package/dist/application/security/index.d.ts +4 -0
- package/dist/application/security/index.js +2 -0
- package/dist/application/transport/Client.d.ts +17 -0
- package/dist/application/transport/Latest.d.ts +7 -0
- package/dist/application/transport/Provider.d.ts +4 -0
- package/dist/application/transport/Types.d.ts +60 -0
- package/dist/application/transport/index.d.ts +4 -0
- package/dist/application/transport/index.js +2 -0
- package/dist/chunk-DmhlhrBa.js +11 -0
- package/dist/components/index.d.ts +50 -0
- package/dist/components/index.js +4 -0
- package/dist/components-ST0i0Wqf.js +17084 -0
- package/dist/configuration/AsamApplicationProvider.vue.d.ts +13 -0
- package/dist/configuration/AsamPermission.vue.d.ts +13 -0
- package/dist/configuration/Context.d.ts +7 -0
- package/dist/configuration/Index.d.ts +5 -0
- package/dist/configuration/Permission.d.ts +5 -0
- package/dist/configuration/Types.d.ts +65 -0
- package/dist/detail/AsamDetailDialog.vue.d.ts +26 -0
- package/dist/detail/AsamDetailDrawer.vue.d.ts +26 -0
- package/dist/detail/AsamDetailPanel.vue.d.ts +36 -0
- package/dist/detail/Controller.d.ts +2 -0
- package/dist/detail/OverlayTypes.d.ts +61 -0
- package/dist/detail/Types.d.ts +50 -0
- package/dist/display/cards/Animation.d.ts +6 -0
- package/dist/display/cards/AsamCardGroup.vue.d.ts +14 -0
- package/dist/display/cards/AsamCountTo.vue.d.ts +13 -0
- package/dist/display/cards/AsamDisplayCard.vue.d.ts +15 -0
- package/dist/display/cards/AsamNumberDisplay.vue.d.ts +6 -0
- package/dist/display/cards/AsamProAvatarGroup.vue.d.ts +15 -0
- package/dist/display/cards/AsamStatisticCard.vue.d.ts +13 -0
- package/dist/display/cards/AsamTrend.vue.d.ts +6 -0
- package/dist/display/cards/Format.d.ts +5 -0
- package/dist/display/cards/Index.d.ts +9 -0
- package/dist/display/cards/Types.d.ts +106 -0
- package/dist/display/guidance/AsamGuidedTour.vue.d.ts +29 -0
- package/dist/display/guidance/AsamHelpPanel.vue.d.ts +27 -0
- package/dist/display/guidance/AsamNotificationMenu.vue.d.ts +19 -0
- package/dist/display/guidance/AsamNotificationPanel.vue.d.ts +34 -0
- package/dist/display/guidance/Async.d.ts +9 -0
- package/dist/display/guidance/Focus.d.ts +2 -0
- package/dist/display/guidance/Index.d.ts +5 -0
- package/dist/display/guidance/Model.d.ts +7 -0
- package/dist/display/guidance/Types.d.ts +107 -0
- package/dist/display/shared/OverlayStyle.d.ts +6 -0
- package/dist/display/states/AsamErrorBoundary.vue.d.ts +22 -0
- package/dist/display/states/AsamException.vue.d.ts +21 -0
- package/dist/display/states/AsamFieldAnnotation.vue.d.ts +19 -0
- package/dist/display/states/AsamPageSkeleton.vue.d.ts +20 -0
- package/dist/display/states/AsamPageWatermark.vue.d.ts +16 -0
- package/dist/display/states/AsamStatePanel.vue.d.ts +25 -0
- package/dist/display/states/Index.d.ts +8 -0
- package/dist/display/states/Tools.d.ts +29 -0
- package/dist/display/states/Types.d.ts +114 -0
- package/dist/display/text-time/AsamProCalendar.vue.d.ts +17 -0
- package/dist/display/text-time/AsamProCountdown.vue.d.ts +17 -0
- package/dist/display/text-time/AsamRelativeTime.vue.d.ts +11 -0
- package/dist/display/text-time/AsamTextEllipsis.vue.d.ts +10 -0
- package/dist/display/text-time/AsamWordCount.vue.d.ts +11 -0
- package/dist/display/text-time/Clock.d.ts +6 -0
- package/dist/display/text-time/Core.d.ts +10 -0
- package/dist/display/text-time/Index.d.ts +7 -0
- package/dist/display/text-time/Types.d.ts +99 -0
- package/dist/editor/AsamEditorActions.vue.d.ts +17 -0
- package/dist/editor/AsamEditorFields.vue.d.ts +38 -0
- package/dist/editor/AsamEditorForm.vue.d.ts +32 -0
- package/dist/editor/AsamFormDialog.vue.d.ts +28 -0
- package/dist/editor/Controller.d.ts +2 -0
- package/dist/editor/Coordinator.d.ts +3 -0
- package/dist/editor/EditorFormTypes.d.ts +65 -0
- package/dist/editor/Layout.d.ts +10 -0
- package/dist/editor/Snapshot.d.ts +4 -0
- package/dist/editor/Types.d.ts +92 -0
- package/dist/en-CcfyIwWv.js +1023 -0
- package/dist/fields/AsamField.d.ts +36 -0
- package/dist/fields/I18n.d.ts +70 -0
- package/dist/fields/Model.d.ts +13 -0
- package/dist/fields/Options.d.ts +37 -0
- package/dist/fields/Schema.d.ts +8 -0
- package/dist/fields/Types.d.ts +106 -0
- package/dist/fields/choice/AsamChoiceCard.vue.d.ts +74 -0
- package/dist/fields/choice/AsamChoiceGroup.vue.d.ts +25 -0
- package/dist/fields/choice/Color.d.ts +2 -0
- package/dist/fields/choice/Fields.d.ts +8 -0
- package/dist/fields/choice/Index.d.ts +6 -0
- package/dist/fields/choice/Selection.d.ts +5 -0
- package/dist/fields/choice/Types.d.ts +97 -0
- package/dist/fields/editors/AsamContentEditor.vue.d.ts +25 -0
- package/dist/fields/editors/AsamEditorResourceStatus.vue.d.ts +19 -0
- package/dist/fields/editors/Fields.d.ts +13 -0
- package/dist/fields/editors/Index.d.ts +5 -0
- package/dist/fields/editors/Markdown.d.ts +3 -0
- package/dist/fields/editors/Model.d.ts +5 -0
- package/dist/fields/editors/Types.d.ts +52 -0
- package/dist/fields/modes/AsamFieldView.d.ts +37 -0
- package/dist/fields/modes/Binding.d.ts +2 -0
- package/dist/fields/modes/Index.d.ts +5 -0
- package/dist/fields/modes/Read.d.ts +3 -0
- package/dist/fields/modes/Resource.d.ts +4 -0
- package/dist/fields/modes/Transform.d.ts +21 -0
- package/dist/fields/modes/Types.d.ts +72 -0
- package/dist/fields/numeric/Fields.d.ts +6 -0
- package/dist/fields/numeric/Index.d.ts +3 -0
- package/dist/fields/numeric/MoneyInput.d.ts +3 -0
- package/dist/fields/numeric/Types.d.ts +61 -0
- package/dist/fields/numeric/Validation.d.ts +12 -0
- package/dist/fields/options/Fields.d.ts +15 -0
- package/dist/fields/options/Hierarchy.d.ts +13 -0
- package/dist/fields/options/Index.d.ts +5 -0
- package/dist/fields/options/Paged.d.ts +23 -0
- package/dist/fields/options/Region.d.ts +9 -0
- package/dist/fields/options/Types.d.ts +48 -0
- package/dist/fields/resources/AsamResourceField.vue.d.ts +32 -0
- package/dist/fields/resources/Controller.d.ts +46 -0
- package/dist/fields/resources/Fields.d.ts +5 -0
- package/dist/fields/resources/Index.d.ts +5 -0
- package/dist/fields/resources/Model.d.ts +8 -0
- package/dist/fields/resources/Types.d.ts +86 -0
- package/dist/fields/temporal/Core.d.ts +10 -0
- package/dist/fields/temporal/Fields.d.ts +4 -0
- package/dist/fields/temporal/Index.d.ts +3 -0
- package/dist/fields/temporal/Types.d.ts +48 -0
- package/dist/fields/text/Captcha.d.ts +3 -0
- package/dist/fields/text/Fields.d.ts +6 -0
- package/dist/fields/text/Index.d.ts +3 -0
- package/dist/fields/text/Types.d.ts +80 -0
- package/dist/form/flows/AsamFilterPopover.vue.d.ts +51 -0
- package/dist/form/flows/AsamFormDrawer.vue.d.ts +34 -0
- package/dist/form/flows/AsamLoginForm.vue.d.ts +42 -0
- package/dist/form/flows/AsamLoginPage.vue.d.ts +51 -0
- package/dist/form/flows/AsamStepsForm.vue.d.ts +52 -0
- package/dist/form/flows/FlowFields.vue.d.ts +33 -0
- package/dist/form/flows/Focus.d.ts +2 -0
- package/dist/form/flows/Index.d.ts +6 -0
- package/dist/form/flows/LoginTemplateMessages.d.ts +45 -0
- package/dist/form/flows/OverlayStyle.d.ts +1 -0
- package/dist/form/flows/Session.d.ts +33 -0
- package/dist/form/flows/Types.d.ts +63 -0
- package/dist/form/schema/AsamSchemaForm.vue.d.ts +42 -0
- package/dist/form/schema/Controller.d.ts +47 -0
- package/dist/form/schema/Index.d.ts +6 -0
- package/dist/form/schema/Path.d.ts +10 -0
- package/dist/form/schema/Schema.d.ts +31 -0
- package/dist/form/schema/SchemaNodes.d.ts +34 -0
- package/dist/form/schema/Types.d.ts +114 -0
- package/dist/form/shared/ValidationSummary.vue.d.ts +17 -0
- package/dist/i18n/Parameters.d.ts +78 -0
- package/dist/i18n/Types.d.ts +10 -0
- package/dist/i18n/application/Parameters.d.ts +55 -0
- package/dist/i18n/application/Resolve.d.ts +7 -0
- package/dist/i18n/application/en.d.ts +53 -0
- package/dist/i18n/application/zh-CN.d.ts +53 -0
- package/dist/i18n/en.d.ts +1014 -0
- package/dist/i18n/en.js +2 -0
- package/dist/i18n/fields/Parameters.d.ts +467 -0
- package/dist/i18n/fields/en.d.ts +349 -0
- package/dist/i18n/fields/zh-CN.d.ts +349 -0
- package/dist/i18n/index.d.ts +11 -0
- package/dist/i18n/index.js +4 -0
- package/dist/i18n/tables/Parameters.d.ts +687 -0
- package/dist/i18n/tables/en.d.ts +542 -0
- package/dist/i18n/tables/zh-CN.d.ts +542 -0
- package/dist/i18n/zh-CN.d.ts +1008 -0
- package/dist/i18n/zh-CN.js +2 -0
- package/dist/i18n-CJTJI6vg.js +172 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.js +13 -0
- package/dist/layout/AsamActionBar.vue.d.ts +16 -0
- package/dist/layout/AsamAdminLayout.vue.d.ts +25 -0
- package/dist/layout/AsamContentGrid.vue.d.ts +14 -0
- package/dist/layout/AsamFooter.vue.d.ts +11 -0
- package/dist/layout/AsamLayoutSettings.vue.d.ts +31 -0
- package/dist/layout/AsamPageContainer.vue.d.ts +20 -0
- package/dist/layout/Context.d.ts +2 -0
- package/dist/layout/Index.d.ts +8 -0
- package/dist/layout/Settings.d.ts +4 -0
- package/dist/layout/Types.d.ts +118 -0
- package/dist/list/AsamListRowActions.d.ts +23 -0
- package/dist/list/AsamProTable.d.ts +29 -0
- package/dist/list/AsamSearchForm.d.ts +67 -0
- package/dist/list/Controller.d.ts +3 -0
- package/dist/list/QueryBoundary.d.ts +8 -0
- package/dist/list/RowActionAdapter.d.ts +9 -0
- package/dist/list/Types.d.ts +134 -0
- package/dist/lists/AsamCardList.d.ts +15 -0
- package/dist/lists/AsamListCover.vue.d.ts +7 -0
- package/dist/lists/AsamProList.d.ts +9 -0
- package/dist/lists/AsamProTaskCard.vue.d.ts +21 -0
- package/dist/lists/Index.d.ts +4 -0
- package/dist/lists/Types.d.ts +135 -0
- package/dist/navigation-BVLFymx7.js +395 -0
- package/dist/preferences-DgHizA2w.js +335 -0
- package/dist/public-api.d.ts +3662 -0
- package/dist/resolver/index.d.ts +33 -0
- package/dist/resolver/index.js +4447 -0
- package/dist/security-B_pdVCWk.js +299 -0
- package/dist/style.css +2 -0
- package/dist/table/ActionIcon.d.ts +5 -0
- package/dist/table/Appearance.d.ts +37 -0
- package/dist/table/ColumnVisibility.d.ts +71 -0
- package/dist/table/Density.d.ts +3 -0
- package/dist/table/Empty.d.ts +14 -0
- package/dist/table/I18n.d.ts +73 -0
- package/dist/table/RowActionPresentation.d.ts +5 -0
- package/dist/table/RowActions.d.ts +80 -0
- package/dist/table/TableDensity.vue.d.ts +19 -0
- package/dist/table/TablePagination.vue.d.ts +24 -0
- package/dist/table/TableToolbar.vue.d.ts +18 -0
- package/dist/table/TableViewport.vue.d.ts +13 -0
- package/dist/table/editing/AsamEditableTable.d.ts +69 -0
- package/dist/table/editing/AsamEditableTable.vue.d.ts +61 -0
- package/dist/table/editing/AsamSortableTable.vue.d.ts +61 -0
- package/dist/table/editing/AsamTableEditingHost.vue.d.ts +52 -0
- package/dist/table/editing/CellEditor.vue.d.ts +20 -0
- package/dist/table/editing/Controller.d.ts +2 -0
- package/dist/table/editing/ControllerCell.vue.d.ts +18 -0
- package/dist/table/editing/Drag.d.ts +29 -0
- package/dist/table/editing/EntryForm.vue.d.ts +20 -0
- package/dist/table/editing/Host.d.ts +11 -0
- package/dist/table/editing/HostTypes.d.ts +53 -0
- package/dist/table/editing/Index.d.ts +9 -0
- package/dist/table/editing/InlineModel.d.ts +24 -0
- package/dist/table/editing/InlineTypes.d.ts +135 -0
- package/dist/table/editing/LegacyEditableTable.d.ts +66 -0
- package/dist/table/editing/LegacyMotion.d.ts +10 -0
- package/dist/table/editing/Motion.d.ts +19 -0
- package/dist/table/editing/Order.d.ts +7 -0
- package/dist/table/editing/SaveFeedback.d.ts +4 -0
- package/dist/table/editing/Types.d.ts +71 -0
- package/dist/table/operations/Coordinator.d.ts +3 -0
- package/dist/table/operations/Index.d.ts +6 -0
- package/dist/table/operations/Preferences.d.ts +7 -0
- package/dist/table/operations/Selection.d.ts +2 -0
- package/dist/table/operations/Snapshot.d.ts +5 -0
- package/dist/table/operations/Types.d.ts +157 -0
- package/dist/table/operations/View.d.ts +108 -0
- package/dist/table/range/AsamTableRange.vue.d.ts +19 -0
- package/dist/table/range/Controller.d.ts +3 -0
- package/dist/table/range/Index.d.ts +3 -0
- package/dist/table/range/Types.d.ts +127 -0
- package/dist/table/renderTableInViewport.d.ts +6 -0
- package/dist/table/structured/AsamStructuredTable.d.ts +2 -0
- package/dist/table/structured/Controller.d.ts +7 -0
- package/dist/table/structured/Forest.d.ts +4 -0
- package/dist/table/structured/Index.d.ts +6 -0
- package/dist/table/structured/Span.d.ts +5 -0
- package/dist/table/structured/Summary.d.ts +8 -0
- package/dist/table/structured/Types.d.ts +137 -0
- package/dist/table/transfer/AsamTableTransfer.vue.d.ts +11 -0
- package/dist/table/transfer/Controller.d.ts +3 -0
- package/dist/table/transfer/Gate.d.ts +3 -0
- package/dist/table/transfer/Index.d.ts +6 -0
- package/dist/table/transfer/Text.d.ts +25 -0
- package/dist/table/transfer/Types.d.ts +170 -0
- package/dist/table/virtual/AsamProVirtualTable.d.ts +22 -0
- package/dist/table/virtual/Index.d.ts +4 -0
- package/dist/table/virtual/Model.d.ts +16 -0
- package/dist/table/virtual/Styles.d.ts +2 -0
- package/dist/table/virtual/Types.d.ts +68 -0
- package/dist/templates/crud/AsamCrudPage.vue.d.ts +52 -0
- package/dist/templates/crud/Controller.d.ts +3 -0
- package/dist/templates/crud/DetailEntry.d.ts +46 -0
- package/dist/templates/crud/Index.d.ts +4 -0
- package/dist/templates/crud/Index.js +2 -0
- package/dist/templates/crud/Readonly.d.ts +3 -0
- package/dist/templates/crud/Structure.d.ts +8 -0
- package/dist/templates/crud/Types.d.ts +272 -0
- package/dist/templates/index.d.ts +1 -0
- package/dist/templates/index.js +10 -0
- package/dist/transport-Cky1a5c-.js +161 -0
- package/dist/types/application.d.ts +5 -0
- package/dist/types/components.d.ts +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.js +0 -0
- package/dist/types/templates.d.ts +1 -0
- package/dist/use-custom-field-value-DgA3wo05.js +108 -0
- package/dist/zh-CN-B5pAhh4V.js +56 -0
- package/dist/zh-CN-BBWziFEy.js +966 -0
- package/package.json +177 -3
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import type { AsamTableSize, AsamControlSize, AsamRowKey } from '@asam-ui/ui';
|
|
3
|
+
import type { AsamFieldModel } from '../../fields/Types.js';
|
|
4
|
+
import type { AsamTransferConfig, AsamTransferContext, AsamTransferReceipt, AsamTransferColumn } from '../transfer/Types.js';
|
|
5
|
+
import type { AsamTransferFormat } from '../transfer/Text.js';
|
|
6
|
+
export interface AsamRangeCell {
|
|
7
|
+
readonly row: number;
|
|
8
|
+
readonly column: number;
|
|
9
|
+
}
|
|
10
|
+
export interface AsamRangeRect {
|
|
11
|
+
readonly start: AsamRangeCell;
|
|
12
|
+
readonly end: AsamRangeCell;
|
|
13
|
+
}
|
|
14
|
+
export interface AsamRangeTarget extends AsamRangeCell {
|
|
15
|
+
readonly key: AsamRowKey;
|
|
16
|
+
readonly field: string;
|
|
17
|
+
}
|
|
18
|
+
export interface AsamRangeColumn<Row extends object> extends AsamTransferColumn<Row> {
|
|
19
|
+
readonly writable?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface AsamRangeProjection<Row extends object> {
|
|
22
|
+
readonly rows: readonly Row[];
|
|
23
|
+
readonly columns: readonly AsamRangeColumn<Row>[];
|
|
24
|
+
readonly revision: string | number;
|
|
25
|
+
}
|
|
26
|
+
export interface AsamRangeChange extends AsamRangeTarget {
|
|
27
|
+
readonly value: unknown;
|
|
28
|
+
readonly before: {
|
|
29
|
+
readonly present: boolean;
|
|
30
|
+
readonly value: unknown;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface AsamRangeIssue {
|
|
34
|
+
readonly target?: AsamRangeTarget;
|
|
35
|
+
readonly line: number;
|
|
36
|
+
readonly column: number;
|
|
37
|
+
readonly message: string;
|
|
38
|
+
}
|
|
39
|
+
export interface AsamRangeHit extends AsamRangeTarget {
|
|
40
|
+
readonly text: string;
|
|
41
|
+
readonly offset: number;
|
|
42
|
+
}
|
|
43
|
+
export interface AsamRangeFind {
|
|
44
|
+
readonly text: string;
|
|
45
|
+
readonly caseSensitive: boolean;
|
|
46
|
+
readonly scope: 'current' | 'selected';
|
|
47
|
+
}
|
|
48
|
+
export interface AsamRangeOutput {
|
|
49
|
+
readonly blocks: readonly {
|
|
50
|
+
readonly row: number;
|
|
51
|
+
readonly column: number;
|
|
52
|
+
readonly rows: readonly (readonly string[])[];
|
|
53
|
+
}[];
|
|
54
|
+
}
|
|
55
|
+
export interface AsamTableRangeConfig<Row extends object> {
|
|
56
|
+
readonly projection: () => AsamRangeProjection<Row>;
|
|
57
|
+
readonly keyOf: (row: Row) => AsamRowKey;
|
|
58
|
+
readonly scope: () => string;
|
|
59
|
+
readonly identity: () => string;
|
|
60
|
+
readonly disabled?: () => boolean;
|
|
61
|
+
readonly readonly?: () => boolean;
|
|
62
|
+
readonly allowRaw?: boolean;
|
|
63
|
+
/** 新草稿新ID;同草稿重试/核实保持相同。不得碰撞其他实例。 */
|
|
64
|
+
readonly operationId: (draft: number, key: AsamRowKey) => string;
|
|
65
|
+
readonly modes: AsamTransferConfig<Row>['modes'];
|
|
66
|
+
/** 借用022 prepare/dispatch协议。宿主持有应用coordinator,不可在prepare写入。 */
|
|
67
|
+
readonly external: NonNullable<AsamTransferConfig<Row>['external']>;
|
|
68
|
+
readonly editingBusy?: () => boolean;
|
|
69
|
+
readonly convert?: AsamTransferConfig<Row>['convert'];
|
|
70
|
+
readonly validate?: AsamTransferConfig<Row>['validate'];
|
|
71
|
+
readonly refresh: () => Promise<void>;
|
|
72
|
+
}
|
|
73
|
+
export interface AsamTableRangeController<Row extends object> {
|
|
74
|
+
readonly projection: ComputedRef<AsamRangeProjection<Row>>;
|
|
75
|
+
readonly active: Readonly<Ref<AsamRangeCell | null>>;
|
|
76
|
+
readonly ranges: Readonly<Ref<readonly AsamRangeRect[]>>;
|
|
77
|
+
readonly changes: Readonly<Ref<readonly AsamRangeChange[]>>;
|
|
78
|
+
readonly issues: Readonly<Ref<readonly AsamRangeIssue[]>>;
|
|
79
|
+
readonly hits: Readonly<Ref<readonly AsamRangeHit[]>>;
|
|
80
|
+
readonly hitIndex: Readonly<Ref<number>>;
|
|
81
|
+
readonly query: Readonly<Ref<AsamRangeFind>>;
|
|
82
|
+
readonly receipts: ComputedRef<readonly AsamTransferReceipt[]>;
|
|
83
|
+
readonly busy: Readonly<Ref<boolean>>;
|
|
84
|
+
readonly message: Readonly<Ref<string>>;
|
|
85
|
+
readonly readable: ComputedRef<boolean>;
|
|
86
|
+
readonly writable: ComputedRef<boolean>;
|
|
87
|
+
readonly canUndo: ComputedRef<boolean>;
|
|
88
|
+
readonly canRedo: ComputedRef<boolean>;
|
|
89
|
+
readonly ready: ComputedRef<boolean>;
|
|
90
|
+
readonly refreshNeeded: Readonly<Ref<boolean>>;
|
|
91
|
+
select(cell: AsamRangeCell, options?: {
|
|
92
|
+
readonly extend?: boolean;
|
|
93
|
+
readonly additive?: boolean;
|
|
94
|
+
}): boolean;
|
|
95
|
+
move(row: number, column: number, extend?: boolean): void;
|
|
96
|
+
clearSelection(): void;
|
|
97
|
+
isSelected(cell: AsamRangeCell): boolean;
|
|
98
|
+
value(cell: AsamRangeCell): unknown;
|
|
99
|
+
copy(): Promise<AsamRangeOutput | undefined>;
|
|
100
|
+
isOutputCurrent(output: AsamRangeOutput): boolean;
|
|
101
|
+
serialize(output: AsamRangeOutput, raw?: boolean): string;
|
|
102
|
+
copyToClipboard(clipboard: Pick<Clipboard, 'writeText'>): Promise<string | undefined>;
|
|
103
|
+
pasteFromClipboard(clipboard: Pick<Clipboard, 'readText'>): Promise<boolean>;
|
|
104
|
+
preview(text: string, format?: AsamTransferFormat): Promise<boolean>;
|
|
105
|
+
find(query: AsamRangeFind): Promise<void>;
|
|
106
|
+
navigateHit(direction: 'first' | 'last' | 'next' | 'previous'): AsamRangeHit | undefined;
|
|
107
|
+
replace(text: string, all?: boolean): Promise<boolean>;
|
|
108
|
+
undo(): boolean;
|
|
109
|
+
redo(): boolean;
|
|
110
|
+
cancelDraft(): boolean;
|
|
111
|
+
apply(): Promise<void>;
|
|
112
|
+
verify(operationId: string): Promise<void>;
|
|
113
|
+
retryRefresh(): Promise<void>;
|
|
114
|
+
dispose(): void;
|
|
115
|
+
}
|
|
116
|
+
export interface AsamTableRangeProps<Row extends object> {
|
|
117
|
+
readonly controller: AsamTableRangeController<Row>;
|
|
118
|
+
readonly title?: string;
|
|
119
|
+
readonly size?: AsamControlSize;
|
|
120
|
+
/** 表格行高:large 60、default 50、small 42、mini 36;不影响控件尺寸。 */
|
|
121
|
+
readonly tableSize?: AsamTableSize;
|
|
122
|
+
}
|
|
123
|
+
export interface AsamTableRangeExpose {
|
|
124
|
+
focus(cell?: AsamRangeCell): void;
|
|
125
|
+
}
|
|
126
|
+
export type AsamRangeReadContext = AsamTransferContext;
|
|
127
|
+
export type AsamRangePatch = Readonly<AsamFieldModel>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { VNodeChild, VNodeProps } from 'vue';
|
|
2
|
+
import type { AsamTableProps, AsamTableSlots } from '@asam-ui/ui';
|
|
3
|
+
/** Ordinary Pro tables use the same ASAM renderer and viewport. The caller owns columns and data. */
|
|
4
|
+
export declare function renderTableInViewport<Row extends object>(bindings: Partial<AsamTableProps<Row>> & VNodeProps & Record<string, unknown>, slots: AsamTableSlots<Row>, before?: VNodeChild): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AsamStructuredConfig, AsamStructuredController } from './Types.js';
|
|
2
|
+
export declare function useAsamStructuredTable<Row extends object>(config: AsamStructuredConfig<Row> & {
|
|
3
|
+
readonly mode: 'tree';
|
|
4
|
+
}): AsamStructuredController<Row> & {
|
|
5
|
+
readonly mode: 'tree';
|
|
6
|
+
};
|
|
7
|
+
export declare function useAsamStructuredTable<Row extends object>(config: AsamStructuredConfig<Row>): AsamStructuredController<Row>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AsamStructuredConfig, AsamStructuredKey, AsamStructuredNode } from './Types.js';
|
|
2
|
+
export declare function encodeAsamStructuredKey(key: AsamStructuredKey): string;
|
|
3
|
+
/** 整个已物化森林先校验再提交,包含收拢分支。 */
|
|
4
|
+
export declare function inspectAsamStructuredForest<Row extends object>(rows: readonly Row[], config: AsamStructuredConfig<Row>, cache: ReadonlyMap<AsamStructuredKey, readonly Row[]>): AsamStructuredNode<Row>[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { AsamStructuredTable } from './AsamStructuredTable.js';
|
|
2
|
+
export { useAsamStructuredTable } from './Controller.js';
|
|
3
|
+
export { encodeAsamStructuredKey } from './Forest.js';
|
|
4
|
+
export { compileAsamStructuredSpans } from './Span.js';
|
|
5
|
+
export { calculateAsamStructuredSummary } from './Summary.js';
|
|
6
|
+
export type * from './Types.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AsamStructuredKey, AsamStructuredSpanPlan } from './Types.js';
|
|
2
|
+
export declare function compileAsamStructuredSpans(plan: AsamStructuredSpanPlan | undefined, rows: readonly AsamStructuredKey[], columns: readonly string[], mode: string): {
|
|
3
|
+
cells: ReadonlyMap<string, readonly [number, number]>;
|
|
4
|
+
error?: string;
|
|
5
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AsamI18n } from '@asam-ui/ui/i18n';
|
|
2
|
+
import type { AsamStructuredColumn, AsamStructuredController, AsamStructuredSummary } from './Types.js';
|
|
3
|
+
/** Internal display discriminator; leave the public summary data shape unchanged. */
|
|
4
|
+
export declare function isAsamStructuredSummaryFailure(value: object): boolean;
|
|
5
|
+
export declare function calculateAsamStructuredSummary<Row extends object>(controller: AsamStructuredController<Row>, columns: readonly AsamStructuredColumn<Row>[], summary?: AsamStructuredSummary<Row>, scope?: AsamI18n): {
|
|
6
|
+
values: string[];
|
|
7
|
+
error?: string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import type { ComputedRef, MaybeRefOrGetter, Ref, VNode, VNodeChild } from 'vue';
|
|
2
|
+
import type { AsamTableSize, AsamControlSize } from '@asam-ui/ui';
|
|
3
|
+
import type { AsamListColumn } from '../../list/Types.js';
|
|
4
|
+
export type AsamStructuredKey = string | number;
|
|
5
|
+
export type AsamStructuredMode = 'flat' | 'tree' | 'lazy-tree';
|
|
6
|
+
export interface AsamStructuredIssue {
|
|
7
|
+
readonly code: 'forest' | 'load' | 'span' | 'summary';
|
|
8
|
+
readonly message: string;
|
|
9
|
+
readonly key?: AsamStructuredKey;
|
|
10
|
+
}
|
|
11
|
+
export interface AsamStructuredLoadContext {
|
|
12
|
+
readonly scope: string;
|
|
13
|
+
readonly generation: number;
|
|
14
|
+
readonly signal: AbortSignal;
|
|
15
|
+
}
|
|
16
|
+
export interface AsamStructuredConfig<Row extends object> {
|
|
17
|
+
readonly rows: MaybeRefOrGetter<readonly Row[]>;
|
|
18
|
+
readonly scope: MaybeRefOrGetter<string>;
|
|
19
|
+
readonly mode: AsamStructuredMode;
|
|
20
|
+
readonly rowKey: (keyof Row & string) | ((row: Row) => AsamStructuredKey);
|
|
21
|
+
readonly children?: keyof Row & string;
|
|
22
|
+
/** 预加载平铺树的父键;缺失/不在结果中的父键作为根,保持原始 Row 身份。 */
|
|
23
|
+
readonly parentKey?: (keyof Row & string) | ((row: Row) => AsamStructuredKey | null | undefined);
|
|
24
|
+
/** 本地过滤保留命中行的祖先;只过滤已经加载的记录,不隐式读取。 */
|
|
25
|
+
readonly filter?: (row: Row) => boolean;
|
|
26
|
+
/** 同作用域刷新/过滤时保留仍有效的展开键;作用域切换仍清空。 */
|
|
27
|
+
readonly preserveExpandedKeys?: boolean;
|
|
28
|
+
readonly hasChildren?: (row: Row) => boolean;
|
|
29
|
+
readonly loader?: (parent: Row, context: AsamStructuredLoadContext) => Promise<readonly Row[]>;
|
|
30
|
+
readonly initialExpandedKeys?: readonly AsamStructuredKey[];
|
|
31
|
+
readonly maxNodes?: number;
|
|
32
|
+
readonly maxDepth?: number;
|
|
33
|
+
}
|
|
34
|
+
/** 内部引擎投影,业务回调只消费 original;不写入宿主行。 */
|
|
35
|
+
export interface AsamStructuredNode<Row extends object> {
|
|
36
|
+
readonly key: AsamStructuredKey;
|
|
37
|
+
readonly nativeKey: string;
|
|
38
|
+
readonly original: Row;
|
|
39
|
+
readonly children: AsamStructuredNode<Row>[];
|
|
40
|
+
readonly expandable: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface AsamStructuredLoadState {
|
|
43
|
+
readonly status: 'loading' | 'loaded' | 'empty' | 'error';
|
|
44
|
+
readonly error?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface AsamStructuredController<Row extends object> {
|
|
47
|
+
readonly nodes: ComputedRef<AsamStructuredNode<Row>[]>;
|
|
48
|
+
readonly issues: Readonly<Ref<readonly AsamStructuredIssue[]>>;
|
|
49
|
+
readonly expandedKeys: Readonly<Ref<readonly AsamStructuredKey[]>>;
|
|
50
|
+
readonly loads: Readonly<Ref<ReadonlyMap<AsamStructuredKey, AsamStructuredLoadState>>>;
|
|
51
|
+
readonly generation: Readonly<Ref<number>>;
|
|
52
|
+
readonly scope: ComputedRef<string>;
|
|
53
|
+
readonly mode: AsamStructuredMode;
|
|
54
|
+
load(key: AsamStructuredKey): Promise<void>;
|
|
55
|
+
toggle(key: AsamStructuredKey, expanded?: boolean): void;
|
|
56
|
+
setExpandedKeys(keys: readonly AsamStructuredKey[]): void;
|
|
57
|
+
refresh(): void;
|
|
58
|
+
rows(range: 'all-loaded' | 'loaded-leaves' | 'visible'): readonly Row[];
|
|
59
|
+
dispose(): void;
|
|
60
|
+
}
|
|
61
|
+
export interface AsamStructuredColumn<Row extends object> extends Omit<AsamListColumn<Row>, 'sortable'> {
|
|
62
|
+
readonly fixed?: boolean | 'left' | 'right';
|
|
63
|
+
readonly align?: 'left' | 'center' | 'right';
|
|
64
|
+
}
|
|
65
|
+
/** 行列序列必须与当前实际顺序完全一致,否则全部规则回退为不合并。 */
|
|
66
|
+
export interface AsamStructuredSpanPlan {
|
|
67
|
+
readonly rowKeys: readonly AsamStructuredKey[];
|
|
68
|
+
readonly columnKeys: readonly string[];
|
|
69
|
+
readonly regions: readonly {
|
|
70
|
+
readonly row: number;
|
|
71
|
+
readonly column: number;
|
|
72
|
+
readonly rowspan: number;
|
|
73
|
+
readonly colspan: number;
|
|
74
|
+
}[];
|
|
75
|
+
}
|
|
76
|
+
export type AsamStructuredSummary<Row extends object> = {
|
|
77
|
+
readonly label: string;
|
|
78
|
+
readonly calculate: (rows: readonly Row[], column: AsamStructuredColumn<Row>) => number | null;
|
|
79
|
+
readonly format?: (value: number, column: AsamStructuredColumn<Row>) => string;
|
|
80
|
+
} & ({
|
|
81
|
+
readonly kind: 'local';
|
|
82
|
+
readonly range: 'all-loaded' | 'loaded-leaves' | 'visible';
|
|
83
|
+
} | {
|
|
84
|
+
readonly kind: 'full';
|
|
85
|
+
readonly scope: string;
|
|
86
|
+
readonly completeRows: readonly Row[];
|
|
87
|
+
});
|
|
88
|
+
export type AsamStructuredTableProps<Row extends object> = {
|
|
89
|
+
readonly controller: AsamStructuredController<Row>;
|
|
90
|
+
readonly columns: readonly AsamStructuredColumn<Row>[];
|
|
91
|
+
readonly size?: AsamControlSize;
|
|
92
|
+
/** 表格行高:large 60、default 50、small 42、mini 36;不影响控件尺寸。 */
|
|
93
|
+
readonly tableSize?: AsamTableSize;
|
|
94
|
+
readonly height?: number | string;
|
|
95
|
+
/** 阻止本组件的新展开、收拢、重试和刷新意图;不取消宿主在途读取。 */
|
|
96
|
+
readonly disabled?: boolean;
|
|
97
|
+
/** 只读视图仍允许展开、重试与刷新;不提供编辑或选择写入 API。 */
|
|
98
|
+
readonly readonly?: boolean;
|
|
99
|
+
readonly summary?: AsamStructuredSummary<Row>;
|
|
100
|
+
readonly onExpand?: (row: Row, expanded: boolean) => void;
|
|
101
|
+
readonly onIssue?: (issues: readonly AsamStructuredIssue[]) => void;
|
|
102
|
+
} & ({
|
|
103
|
+
readonly mode: 'flat';
|
|
104
|
+
readonly spans?: AsamStructuredSpanPlan;
|
|
105
|
+
} | {
|
|
106
|
+
readonly mode: 'tree' | 'lazy-tree';
|
|
107
|
+
readonly spans?: never;
|
|
108
|
+
});
|
|
109
|
+
export interface AsamStructuredTableSlots<Row extends object> {
|
|
110
|
+
cell?: (context: {
|
|
111
|
+
row: Row;
|
|
112
|
+
column: AsamStructuredColumn<Row>;
|
|
113
|
+
}) => VNodeChild;
|
|
114
|
+
empty?: () => VNodeChild;
|
|
115
|
+
error?: (context: {
|
|
116
|
+
issues: readonly AsamStructuredIssue[];
|
|
117
|
+
}) => VNodeChild;
|
|
118
|
+
}
|
|
119
|
+
export interface AsamStructuredTableExpose {
|
|
120
|
+
expand(key: AsamStructuredKey, expanded?: boolean): void;
|
|
121
|
+
retry(key: AsamStructuredKey): Promise<void>;
|
|
122
|
+
refresh(): void;
|
|
123
|
+
doLayout(): void;
|
|
124
|
+
}
|
|
125
|
+
/** 泛型模板调用保留 Row、插槽和实例方法;与运行时 expose 完全对应。 */
|
|
126
|
+
export type AsamStructuredTableComponent = <Row extends object>(props: AsamStructuredTableProps<Row>, ctx?: {
|
|
127
|
+
slots: AsamStructuredTableSlots<Row>;
|
|
128
|
+
attrs: Record<string, unknown>;
|
|
129
|
+
}, expose?: (value: AsamStructuredTableExpose) => void) => VNode & {
|
|
130
|
+
__ctx?: {
|
|
131
|
+
props: AsamStructuredTableProps<Row>;
|
|
132
|
+
slots: AsamStructuredTableSlots<Row>;
|
|
133
|
+
attrs: Record<string, unknown>;
|
|
134
|
+
emit: Record<string, never>;
|
|
135
|
+
expose: (value: AsamStructuredTableExpose) => void;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AsamTableTransferProps } from './Types.js';
|
|
2
|
+
declare function locate(row: number, column: number): void;
|
|
3
|
+
declare function download(content: string, filename: string): void;
|
|
4
|
+
declare function preview(): Promise<void>;
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<AsamTableTransferProps, {
|
|
6
|
+
focusError: typeof locate;
|
|
7
|
+
download: typeof download;
|
|
8
|
+
preview: typeof preview;
|
|
9
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AsamTableTransferProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as AsamTableTransfer } from './AsamTableTransfer.vue';
|
|
2
|
+
export { useAsamTableTransfer } from './Controller.js';
|
|
3
|
+
export { createAsamTransferEditingGate } from './Gate.js';
|
|
4
|
+
export { parseAsamTransferText, serializeAsamTransferText, readAsamTransferFile, asamTransferDefaultLimits, AsamTransferTextError } from './Text.js';
|
|
5
|
+
export type * from './Text.js';
|
|
6
|
+
export type * from './Types.js';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** CSV/TSV 的物理源坐标从 1 开始;空行保留为单个空单元,终止换行不制造额外行。 */
|
|
2
|
+
export interface AsamTransferCell {
|
|
3
|
+
readonly text: string;
|
|
4
|
+
readonly line: number;
|
|
5
|
+
readonly column: number;
|
|
6
|
+
}
|
|
7
|
+
export interface AsamTransferLimits {
|
|
8
|
+
readonly bytes: number;
|
|
9
|
+
readonly rows: number;
|
|
10
|
+
readonly columns: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const asamTransferDefaultLimits: AsamTransferLimits;
|
|
13
|
+
export declare class AsamTransferTextError extends Error {
|
|
14
|
+
readonly line: number;
|
|
15
|
+
readonly column: number;
|
|
16
|
+
constructor(message: string, line: number, column: number);
|
|
17
|
+
}
|
|
18
|
+
export type AsamTransferFormat = 'csv' | 'tsv';
|
|
19
|
+
export declare function parseAsamTransferText(input: string, format: AsamTransferFormat, header: boolean, limits?: AsamTransferLimits): readonly (readonly AsamTransferCell[])[];
|
|
20
|
+
/** 默认中和公式前缀(含前置空白);仅作用输出,不修改模型。raw 必须由宿主显式授权。 */
|
|
21
|
+
export declare function serializeAsamTransferText(rows: readonly (readonly string[])[], format: AsamTransferFormat, options?: {
|
|
22
|
+
readonly bom?: boolean;
|
|
23
|
+
readonly raw?: boolean;
|
|
24
|
+
}): string;
|
|
25
|
+
export declare function readAsamTransferFile(file: File, signal: AbortSignal, limits?: AsamTransferLimits): Promise<string>;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import type { AsamI18n } from '@asam-ui/ui/i18n';
|
|
2
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
3
|
+
import type { AsamControlSize, AsamRequestContext, AsamRowKey } from '@asam-ui/ui';
|
|
4
|
+
import type { AsamFieldModel } from '../../fields/Types.js';
|
|
5
|
+
import type { createAsamFieldModes } from '../../fields/modes/Transform.js';
|
|
6
|
+
import type { AsamTableEditingController } from '../editing/Types.js';
|
|
7
|
+
import type { AsamTransferCell, AsamTransferFormat, AsamTransferLimits } from './Text.js';
|
|
8
|
+
export interface AsamTransferIssue {
|
|
9
|
+
readonly row: number;
|
|
10
|
+
readonly column: number;
|
|
11
|
+
readonly line: number;
|
|
12
|
+
readonly sourceColumn: number;
|
|
13
|
+
readonly field?: string;
|
|
14
|
+
readonly message: string;
|
|
15
|
+
}
|
|
16
|
+
export interface AsamTransferRow {
|
|
17
|
+
readonly index: number;
|
|
18
|
+
readonly cells: readonly AsamTransferCell[];
|
|
19
|
+
readonly model: Readonly<AsamFieldModel>;
|
|
20
|
+
readonly payload?: Readonly<AsamFieldModel>;
|
|
21
|
+
readonly key?: AsamRowKey;
|
|
22
|
+
}
|
|
23
|
+
export interface AsamTransferInput {
|
|
24
|
+
readonly text: string;
|
|
25
|
+
readonly format: AsamTransferFormat;
|
|
26
|
+
readonly header: boolean;
|
|
27
|
+
/** 每个输入列必须显式映射到字段;不支持隐式丢列。 */
|
|
28
|
+
readonly mapping: readonly string[];
|
|
29
|
+
readonly mode: 'existing' | 'external';
|
|
30
|
+
}
|
|
31
|
+
export interface AsamTransferContext extends AsamRequestContext {
|
|
32
|
+
readonly identity: string;
|
|
33
|
+
/** 最后一次异步宿主适配后、真实服务调用前必须核对。 */
|
|
34
|
+
readonly canCommit: () => boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface AsamTransferOperation {
|
|
37
|
+
readonly operationId: string;
|
|
38
|
+
readonly scope: string;
|
|
39
|
+
readonly identity: string;
|
|
40
|
+
readonly row: AsamTransferRow;
|
|
41
|
+
}
|
|
42
|
+
export type AsamTransferWriteResult = {
|
|
43
|
+
readonly status: 'success';
|
|
44
|
+
readonly message?: string;
|
|
45
|
+
} | {
|
|
46
|
+
readonly status: 'not-applied' | 'unknown';
|
|
47
|
+
readonly message: string;
|
|
48
|
+
};
|
|
49
|
+
export interface AsamTransferReceipt {
|
|
50
|
+
readonly operation: AsamTransferOperation;
|
|
51
|
+
readonly result: AsamTransferWriteResult;
|
|
52
|
+
}
|
|
53
|
+
export interface AsamTransferWriter {
|
|
54
|
+
/** 准备阶段不可写;返回的 dispatch 才能调用服务。 */
|
|
55
|
+
prepare(operation: AsamTransferOperation, context: AsamTransferContext): Promise<() => Promise<AsamTransferWriteResult>>;
|
|
56
|
+
verify?(operation: AsamTransferOperation, context: AsamTransferContext): Promise<AsamTransferWriteResult>;
|
|
57
|
+
}
|
|
58
|
+
export interface AsamTransferEditingGate {
|
|
59
|
+
register(operationId: string, context: AsamTransferContext): () => void;
|
|
60
|
+
/** 018宿主save在最后异步适配之后、服务之前调用。 */
|
|
61
|
+
canCommit(operationId: string): boolean;
|
|
62
|
+
}
|
|
63
|
+
/** 非原生格式/编码由宿主显式提供;声明能力不表示组件已测试该格式。 */
|
|
64
|
+
export interface AsamTransferFileAdapter {
|
|
65
|
+
readonly formats: readonly string[];
|
|
66
|
+
readonly encoding: string;
|
|
67
|
+
readonly license: string;
|
|
68
|
+
readonly maxBytes: number;
|
|
69
|
+
accepts(file: File): boolean;
|
|
70
|
+
read(file: File, context: AsamTransferContext): Promise<{
|
|
71
|
+
readonly text: string;
|
|
72
|
+
readonly format: AsamTransferFormat;
|
|
73
|
+
}>;
|
|
74
|
+
}
|
|
75
|
+
export type AsamTransferRange = 'current' | 'selected' | 'all';
|
|
76
|
+
export interface AsamTransferColumn<Row extends object> {
|
|
77
|
+
readonly field: string;
|
|
78
|
+
readonly label: string;
|
|
79
|
+
readonly sensitive?: boolean;
|
|
80
|
+
readonly allowSensitive?: boolean;
|
|
81
|
+
/** 显式投影提交值或显示文本;不调用写转换,不遍历 Row。 */
|
|
82
|
+
readonly read: (row: Readonly<Row>, projection: 'display' | 'submit', context: AsamTransferContext) => string | Promise<string>;
|
|
83
|
+
}
|
|
84
|
+
export interface AsamTransferExport<Row extends object> {
|
|
85
|
+
readonly current: () => readonly Row[];
|
|
86
|
+
readonly selected: () => readonly AsamRowKey[];
|
|
87
|
+
readonly keyOf: (row: Row) => AsamRowKey;
|
|
88
|
+
readonly resolveSelected?: (keys: readonly AsamRowKey[], context: AsamTransferContext) => Promise<readonly Row[]>;
|
|
89
|
+
readonly all?: (context: AsamTransferContext) => Promise<{
|
|
90
|
+
readonly rows: readonly Row[];
|
|
91
|
+
readonly complete: true;
|
|
92
|
+
readonly scope: string;
|
|
93
|
+
}>;
|
|
94
|
+
readonly columns: readonly AsamTransferColumn<Row>[];
|
|
95
|
+
readonly allowRaw?: boolean;
|
|
96
|
+
}
|
|
97
|
+
export interface AsamTransferConfig<Row extends object> {
|
|
98
|
+
readonly modes: ReturnType<typeof createAsamFieldModes>;
|
|
99
|
+
readonly scope: () => string;
|
|
100
|
+
readonly identity: () => string;
|
|
101
|
+
readonly disabled?: () => boolean;
|
|
102
|
+
readonly readonly?: () => boolean;
|
|
103
|
+
readonly limits?: AsamTransferLimits;
|
|
104
|
+
readonly fileAdapter?: AsamTransferFileAdapter;
|
|
105
|
+
/** 当前行 key 必须由宿主从明确字段解析,数值0与字符串0不能合并。 */
|
|
106
|
+
readonly keyOfInput?: (model: Readonly<AsamFieldModel>, row: number) => AsamRowKey;
|
|
107
|
+
readonly convert?: (field: string, cell: AsamTransferCell, context: AsamTransferContext) => unknown | Promise<unknown>;
|
|
108
|
+
readonly validate?: (row: AsamTransferRow, context: AsamTransferContext) => Promise<readonly {
|
|
109
|
+
readonly field?: string;
|
|
110
|
+
readonly message: string;
|
|
111
|
+
}[]>;
|
|
112
|
+
readonly required?: readonly string[];
|
|
113
|
+
readonly editing?: AsamTableEditingController<Row>;
|
|
114
|
+
readonly editingGate?: AsamTransferEditingGate;
|
|
115
|
+
/** 现有行只提交明确映射的 patch;例如排除用于定位的 key 字段。 */
|
|
116
|
+
readonly existingPatch?: (row: AsamTransferRow) => Readonly<AsamFieldModel>;
|
|
117
|
+
readonly external?: AsamTransferWriter;
|
|
118
|
+
readonly operationId: (row: AsamTransferRow) => string;
|
|
119
|
+
readonly refresh: () => Promise<void>;
|
|
120
|
+
readonly export: AsamTransferExport<Row>;
|
|
121
|
+
}
|
|
122
|
+
export interface AsamTransferOutput {
|
|
123
|
+
readonly range: AsamTransferRange;
|
|
124
|
+
readonly headers: readonly string[];
|
|
125
|
+
readonly rows: readonly (readonly string[])[];
|
|
126
|
+
}
|
|
127
|
+
/** 只读导出也有会话身份;与预检ready和业务写权限相互独立。 */
|
|
128
|
+
export interface AsamTransferSession {
|
|
129
|
+
readonly scope: string;
|
|
130
|
+
readonly identity: string;
|
|
131
|
+
readonly revision: number;
|
|
132
|
+
readonly readable: boolean;
|
|
133
|
+
}
|
|
134
|
+
export interface AsamTableTransferController {
|
|
135
|
+
readonly session: ComputedRef<AsamTransferSession>;
|
|
136
|
+
isOutputCurrent(output: AsamTransferOutput): boolean;
|
|
137
|
+
readonly input: Readonly<Ref<AsamTransferInput>>;
|
|
138
|
+
readonly rows: Readonly<Ref<readonly AsamTransferRow[]>>;
|
|
139
|
+
readonly issues: Readonly<Ref<readonly AsamTransferIssue[]>>;
|
|
140
|
+
readonly receipts: Readonly<Ref<readonly AsamTransferReceipt[]>>;
|
|
141
|
+
readonly busy: Readonly<Ref<boolean>>;
|
|
142
|
+
readonly message: Readonly<Ref<string>>;
|
|
143
|
+
readonly ready: Readonly<Ref<boolean>>;
|
|
144
|
+
readonly refreshNeeded: Readonly<Ref<boolean>>;
|
|
145
|
+
readonly writable: ComputedRef<boolean>;
|
|
146
|
+
readonly canExportAll: boolean;
|
|
147
|
+
setInput(input: AsamTransferInput): void;
|
|
148
|
+
preflight(): Promise<void>;
|
|
149
|
+
loadFile(file: File, header: boolean, mapping: readonly string[], mode: AsamTransferInput['mode']): Promise<void>;
|
|
150
|
+
apply(): Promise<void>;
|
|
151
|
+
verify(operationId: string): Promise<void>;
|
|
152
|
+
retryRefresh(): Promise<void>;
|
|
153
|
+
exportRows(range: AsamTransferRange, projection: 'display' | 'submit'): Promise<AsamTransferOutput | undefined>;
|
|
154
|
+
serialize(output: AsamTransferOutput, format: AsamTransferFormat, bom?: boolean, raw?: boolean): string;
|
|
155
|
+
errorReport(scope?: AsamI18n): string;
|
|
156
|
+
cancel(): void;
|
|
157
|
+
dispose(): void;
|
|
158
|
+
}
|
|
159
|
+
export interface AsamTableTransferProps {
|
|
160
|
+
readonly controller: AsamTableTransferController;
|
|
161
|
+
readonly fields: readonly {
|
|
162
|
+
readonly key: string;
|
|
163
|
+
readonly label: string;
|
|
164
|
+
}[];
|
|
165
|
+
readonly size?: AsamControlSize;
|
|
166
|
+
readonly disabled?: boolean;
|
|
167
|
+
readonly readonly?: boolean;
|
|
168
|
+
readonly title?: string;
|
|
169
|
+
readonly printOrientation?: 'portrait' | 'landscape';
|
|
170
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AsamProVirtualTableProps } from './Types.js';
|
|
2
|
+
import './style.css';
|
|
3
|
+
export declare const AsamProVirtualTable: new <Row extends object>(props: (AsamProVirtualTableProps<Row> & {
|
|
4
|
+
"onSort-change"?: ((...args: any[]) => any) | undefined;
|
|
5
|
+
onRetry?: ((...args: any[]) => any) | undefined;
|
|
6
|
+
"onFocus-change"?: ((...args: any[]) => any) | undefined;
|
|
7
|
+
}) & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps) => import("vue").CreateComponentPublicInstanceWithMixins<AsamProVirtualTableProps<Row> & {
|
|
8
|
+
"onSort-change"?: ((...args: any[]) => any) | undefined;
|
|
9
|
+
onRetry?: ((...args: any[]) => any) | undefined;
|
|
10
|
+
"onFocus-change"?: ((...args: any[]) => any) | undefined;
|
|
11
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("retry" | "sort-change" | "focus-change")[], import("vue").PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
12
|
+
P: {};
|
|
13
|
+
B: {};
|
|
14
|
+
D: {};
|
|
15
|
+
C: {};
|
|
16
|
+
M: {};
|
|
17
|
+
Defaults: {};
|
|
18
|
+
}, {} & (AsamProVirtualTableProps<Row> & {
|
|
19
|
+
"onSort-change"?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
onRetry?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
"onFocus-change"?: ((...args: any[]) => any) | undefined;
|
|
22
|
+
}), {}, {}, {}, {}, {}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AsamI18n } from '@asam-ui/ui/i18n';
|
|
2
|
+
import type { AsamControlSize, AsamRowKey } from '@asam-ui/ui';
|
|
3
|
+
import type { AsamVirtualColumn } from './Types.js';
|
|
4
|
+
/** 对应 ASAM 四档控件高度;允许更长内容在固定行内省略并以 title 阅读。 */
|
|
5
|
+
export declare const asamVirtualRowHeights: Readonly<Record<AsamControlSize, number>>;
|
|
6
|
+
export declare function asamVirtualKey(key: unknown): string;
|
|
7
|
+
export interface VirtualRecord<Row extends object> {
|
|
8
|
+
readonly identity: string;
|
|
9
|
+
readonly key: AsamRowKey;
|
|
10
|
+
readonly row: Row;
|
|
11
|
+
}
|
|
12
|
+
export declare function projectVirtualRows<Row extends object>(rows: readonly Row[], rowKey: string | ((row: Row) => AsamRowKey)): {
|
|
13
|
+
records: VirtualRecord<Row>[];
|
|
14
|
+
indices: Map<string, number>;
|
|
15
|
+
};
|
|
16
|
+
export declare function validateVirtualLayout<Row extends object>(width: number, height: number, columns: readonly AsamVirtualColumn<Row>[], mode: unknown, size: unknown, scope?: AsamI18n): string;
|