@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,99 @@
|
|
|
1
|
+
import type { VNode } from 'vue';
|
|
2
|
+
import type { AsamCalendarSlots } from '@asam-ui/ui';
|
|
3
|
+
/** 绝对时间只接受 epoch 毫秒或 Date;不隐式解析有歧义的字符串。 */
|
|
4
|
+
export type AsamTimeValue = number | Date | null;
|
|
5
|
+
export interface AsamTimeProps {
|
|
6
|
+
value?: AsamTimeValue;
|
|
7
|
+
/** 100~60000ms;默认 1000,隐藏页面停止轮询,恢复可见立即校准。 */
|
|
8
|
+
interval?: number;
|
|
9
|
+
/** 显式暂停显示采样;恢复时按绝对时间校准,不延长截止时间。 */
|
|
10
|
+
paused?: boolean;
|
|
11
|
+
/** 默认 Date.now。SSR 首屏可固定 initialNow,水合挂载后开始真实采样。 */
|
|
12
|
+
now?: () => number;
|
|
13
|
+
initialNow?: number;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface AsamProCountdownProps extends AsamTimeProps {
|
|
17
|
+
/** 默认 HH:mm:ss(小时可超过24);可覆盖展示,不改变结束语义。 */
|
|
18
|
+
format?: (remaining: number) => string;
|
|
19
|
+
}
|
|
20
|
+
export interface AsamProCountdownEmits {
|
|
21
|
+
change: [remaining: number];
|
|
22
|
+
/** 每次 value 的数值变化至多一次。回拨后不会重复,同值重挂是新实例。 */
|
|
23
|
+
finish: [];
|
|
24
|
+
}
|
|
25
|
+
export interface AsamTimeExpose {
|
|
26
|
+
/** 立即按当前时钟校准。 */
|
|
27
|
+
refresh: () => void;
|
|
28
|
+
}
|
|
29
|
+
export interface AsamProCountdownSlots {
|
|
30
|
+
default?: (data: {
|
|
31
|
+
remaining: number | null;
|
|
32
|
+
text: string;
|
|
33
|
+
}) => VNode[];
|
|
34
|
+
}
|
|
35
|
+
export interface AsamRelativeTimeProps extends AsamTimeProps {
|
|
36
|
+
locale?: string;
|
|
37
|
+
numeric?: 'always' | 'auto';
|
|
38
|
+
/** 毫秒差是 target-now;默认 Intl.RelativeTimeFormat,locale 非法回退 zh-CN。 */
|
|
39
|
+
format?: (difference: number, locale: string) => string;
|
|
40
|
+
}
|
|
41
|
+
export interface AsamRelativeTimeSlots {
|
|
42
|
+
default?: (data: {
|
|
43
|
+
difference: number | null;
|
|
44
|
+
text: string;
|
|
45
|
+
}) => VNode[];
|
|
46
|
+
}
|
|
47
|
+
export interface AsamTextEllipsisProps {
|
|
48
|
+
text: string;
|
|
49
|
+
/** 正整数1~100,默认1。 */
|
|
50
|
+
lines?: number;
|
|
51
|
+
/** 完整内容是原地展开文本,触屏与键盘均可达,不依赖 hover。 */
|
|
52
|
+
moreLabel?: string;
|
|
53
|
+
lessLabel?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface AsamTextEllipsisExpose {
|
|
56
|
+
refresh: () => void;
|
|
57
|
+
collapse: () => void;
|
|
58
|
+
}
|
|
59
|
+
export interface AsamTextEllipsisEmits {
|
|
60
|
+
'update:expanded': [expanded: boolean];
|
|
61
|
+
truncate: [truncated: boolean];
|
|
62
|
+
}
|
|
63
|
+
export type AsamCountMethod = (text: string) => number;
|
|
64
|
+
export interface AsamWordCountProps {
|
|
65
|
+
text: string;
|
|
66
|
+
/** 默认 Intl.Segmenter grapheme;空白和换行计数,CRLF算一个字素。 */
|
|
67
|
+
count?: AsamCountMethod;
|
|
68
|
+
/** 非负整数,否则无上限。只报告超限,不修改或截断宿主文本。 */
|
|
69
|
+
max?: number;
|
|
70
|
+
label?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface AsamWordCountResult {
|
|
73
|
+
length: number | null;
|
|
74
|
+
max: number | null;
|
|
75
|
+
exceeded: boolean;
|
|
76
|
+
/** Segmenter 缺失或自定义函数失败时明确不可用,不偷换 UTF16 口径。 */
|
|
77
|
+
available: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface AsamWordCountSlots {
|
|
80
|
+
default?: (result: AsamWordCountResult) => VNode[];
|
|
81
|
+
}
|
|
82
|
+
export interface AsamProCalendarProps {
|
|
83
|
+
/** 本地公历日期 Date,非法/空显示 defaultValue 或挂载当天。 */
|
|
84
|
+
modelValue?: Date | null;
|
|
85
|
+
/** SSR 建议固定该值,避免服务端和浏览器日期不同。 */
|
|
86
|
+
defaultValue?: Date;
|
|
87
|
+
disabled?: boolean;
|
|
88
|
+
readonly?: boolean;
|
|
89
|
+
label?: string;
|
|
90
|
+
}
|
|
91
|
+
export interface AsamProCalendarEmits {
|
|
92
|
+
'update:modelValue': [value: Date];
|
|
93
|
+
change: [value: Date];
|
|
94
|
+
}
|
|
95
|
+
export type AsamProCalendarSlots = AsamCalendarSlots;
|
|
96
|
+
export interface AsamProCalendarExpose {
|
|
97
|
+
/** 无效日期、禁用和只读时不改变选择。 */
|
|
98
|
+
select: (value: Date) => void;
|
|
99
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AsamEditorActionProps } from './EditorFormTypes.js';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
'unknown-help'?: () => unknown;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<AsamEditorActionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AsamEditorActionProps> & Readonly<{}>, {
|
|
6
|
+
readonly size: import("@asam-ui/ui").AsamControlSize;
|
|
7
|
+
readonly saveButtonType: import("@asam-ui/ui").AsamButtonType;
|
|
8
|
+
readonly cancelButtonType: import("@asam-ui/ui").AsamButtonType;
|
|
9
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AsamEditorFieldsProps, AsamEditorFormExpose } from './EditorFormTypes.js';
|
|
2
|
+
import '../form/shared/TopLabels.css';
|
|
3
|
+
import type { AsamEditIssue } from './Types.js';
|
|
4
|
+
type __VLS_Slots = {
|
|
5
|
+
'error-help'?: (scope: {
|
|
6
|
+
issues: readonly AsamEditIssue[];
|
|
7
|
+
}) => unknown;
|
|
8
|
+
'unknown-help'?: () => unknown;
|
|
9
|
+
append?: (scope: {
|
|
10
|
+
status: string;
|
|
11
|
+
}) => unknown;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<AsamEditorFieldsProps, AsamEditorFormExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
submit: () => any;
|
|
15
|
+
"update:field": (key: string, value: unknown) => any;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<AsamEditorFieldsProps> & Readonly<{
|
|
17
|
+
onSubmit?: (() => any) | undefined;
|
|
18
|
+
"onUpdate:field"?: ((key: string, value: unknown) => any) | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
readonly status: import("./Types.js").AsamEditorStatus;
|
|
21
|
+
readonly size: import("@asam-ui/ui").AsamControlSize;
|
|
22
|
+
readonly issues: readonly AsamEditIssue[];
|
|
23
|
+
readonly disabled: boolean;
|
|
24
|
+
readonly session: string | number;
|
|
25
|
+
readonly active: boolean;
|
|
26
|
+
readonly columns: 1 | 2 | 3;
|
|
27
|
+
readonly autoFocus: boolean;
|
|
28
|
+
readonly busy: boolean;
|
|
29
|
+
readonly writable: boolean;
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AsamFieldModel } from '../fields/Types.js';
|
|
2
|
+
import type { AsamEditIssue } from './Types.js';
|
|
3
|
+
import type { AsamEditorFormProps, AsamEditorFormExpose } from './EditorFormTypes.js';
|
|
4
|
+
declare const __VLS_export: <Model extends object = AsamFieldModel>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<AsamEditorFormProps<Model> & {
|
|
6
|
+
onSubmit?: (() => any) | undefined;
|
|
7
|
+
"onUpdate:modelValue"?: ((value: Model) => any) | undefined;
|
|
8
|
+
}> & (typeof globalThis extends {
|
|
9
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
10
|
+
} ? P : {});
|
|
11
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<AsamEditorFormExpose>) => void;
|
|
12
|
+
attrs: any;
|
|
13
|
+
slots: {
|
|
14
|
+
'error-help'?: (scope: {
|
|
15
|
+
issues: readonly AsamEditIssue[];
|
|
16
|
+
}) => unknown;
|
|
17
|
+
'unknown-help'?: () => unknown;
|
|
18
|
+
append?: (scope: {
|
|
19
|
+
status: string;
|
|
20
|
+
}) => unknown;
|
|
21
|
+
};
|
|
22
|
+
emit: ((evt: "submit") => void) & ((evt: "update:modelValue", value: Model) => void);
|
|
23
|
+
}>) => import("vue").VNode & {
|
|
24
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
25
|
+
};
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
29
|
+
[K in keyof T]: T[K];
|
|
30
|
+
} : {
|
|
31
|
+
[K in keyof T as K]: T[K];
|
|
32
|
+
}) & {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AsamFormDialogProps } from './EditorFormTypes.js';
|
|
2
|
+
import type { AsamEditIssue } from './Types.js';
|
|
3
|
+
type __VLS_Slots = {
|
|
4
|
+
'error-help'?: (scope: {
|
|
5
|
+
issues: readonly AsamEditIssue[];
|
|
6
|
+
}) => unknown;
|
|
7
|
+
'unknown-help'?: () => unknown;
|
|
8
|
+
'footer-leading'?: () => unknown;
|
|
9
|
+
append?: (scope: {
|
|
10
|
+
status: string;
|
|
11
|
+
}) => unknown;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<AsamFormDialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AsamFormDialogProps> & Readonly<{}>, {
|
|
14
|
+
readonly title: string;
|
|
15
|
+
readonly size: import("@asam-ui/ui").AsamControlSize;
|
|
16
|
+
readonly saveButtonType: import("@asam-ui/ui").AsamButtonType;
|
|
17
|
+
readonly columns: 1 | 2 | 3;
|
|
18
|
+
readonly width: string;
|
|
19
|
+
readonly fallbackFocus: () => HTMLElement | null;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { AsamButtonType, AsamControlSize } from '@asam-ui/ui';
|
|
2
|
+
import type { AsamEditIssue, AsamEditorController, AsamEditorStatus } from './Types.js';
|
|
3
|
+
import type { AsamFieldDefinition, AsamFieldModel } from '../fields/Types.js';
|
|
4
|
+
/** 编辑视图共享的操作呈现;所有写入均经过同一编辑控制器。 */
|
|
5
|
+
export interface AsamEditorActionProps {
|
|
6
|
+
readonly controller: AsamEditorController;
|
|
7
|
+
readonly saveButtonType?: AsamButtonType;
|
|
8
|
+
readonly cancelButtonType?: AsamButtonType;
|
|
9
|
+
readonly cancelButtonPlain?: boolean;
|
|
10
|
+
readonly size?: AsamControlSize;
|
|
11
|
+
readonly disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface AsamEditorFormOptions extends Omit<AsamEditorActionProps, 'controller'> {
|
|
14
|
+
readonly fieldLabels?: Readonly<Record<string, string>>;
|
|
15
|
+
/** 默认双列,按表单自身容器窄屏降为单列;field.layout.span 可跨列。 */
|
|
16
|
+
readonly columns?: 1 | 2 | 3;
|
|
17
|
+
readonly showActions?: boolean;
|
|
18
|
+
/** 加载完成后聚焦首个可编辑字段,默认不抢占页面焦点。 */
|
|
19
|
+
readonly autoFocus?: boolean;
|
|
20
|
+
readonly issues?: readonly AsamEditIssue[];
|
|
21
|
+
readonly readonly?: boolean;
|
|
22
|
+
readonly busy?: boolean;
|
|
23
|
+
readonly active?: boolean;
|
|
24
|
+
readonly session?: string | number;
|
|
25
|
+
}
|
|
26
|
+
/** controller 模式复用现有写协议;受控模式只呈现 fields/model,不拥有写状态或按钮。 */
|
|
27
|
+
export type AsamEditorFormProps<Model extends object = AsamFieldModel> = AsamEditorFormOptions & ({
|
|
28
|
+
readonly controller: AsamEditorController;
|
|
29
|
+
readonly fields?: never;
|
|
30
|
+
readonly modelValue?: never;
|
|
31
|
+
} | {
|
|
32
|
+
readonly controller?: never;
|
|
33
|
+
readonly fields: readonly AsamFieldDefinition[];
|
|
34
|
+
readonly modelValue: Model;
|
|
35
|
+
readonly showActions?: false;
|
|
36
|
+
});
|
|
37
|
+
export interface AsamEditorFormExpose {
|
|
38
|
+
focusInitial(): Promise<void>;
|
|
39
|
+
focusField(key?: string): Promise<void>;
|
|
40
|
+
validate(): Promise<readonly AsamEditIssue[]>;
|
|
41
|
+
}
|
|
42
|
+
export interface AsamFormDialogProps extends AsamEditorActionProps {
|
|
43
|
+
readonly fieldLabels?: Readonly<Record<string, string>>;
|
|
44
|
+
readonly columns?: 1 | 2 | 3;
|
|
45
|
+
readonly title?: string;
|
|
46
|
+
readonly width?: string;
|
|
47
|
+
readonly fallbackFocus?: () => HTMLElement | null;
|
|
48
|
+
}
|
|
49
|
+
/** 内部同源字段视图;不持有编辑、保存或 UNKNOWN 协调状态。 */
|
|
50
|
+
export interface AsamEditorFieldsProps {
|
|
51
|
+
readonly fields: readonly AsamFieldDefinition[];
|
|
52
|
+
readonly modelValue: object;
|
|
53
|
+
readonly issues?: readonly AsamEditIssue[];
|
|
54
|
+
readonly fieldLabels?: Readonly<Record<string, string>>;
|
|
55
|
+
readonly columns?: 1 | 2 | 3;
|
|
56
|
+
readonly size?: AsamControlSize;
|
|
57
|
+
readonly disabled?: boolean;
|
|
58
|
+
readonly writable?: boolean;
|
|
59
|
+
readonly busy?: boolean;
|
|
60
|
+
readonly status?: AsamEditorStatus;
|
|
61
|
+
readonly session?: string | number;
|
|
62
|
+
readonly active?: boolean;
|
|
63
|
+
readonly autoFocus?: boolean;
|
|
64
|
+
}
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AsamI18n } from '@asam-ui/ui/i18n';
|
|
2
|
+
import type { AsamFieldDefinition, AsamFieldMode } from '../fields/Types.js';
|
|
3
|
+
export declare function fieldGroups(fields: readonly AsamFieldDefinition[], mode: AsamFieldMode, i18n?: AsamI18n): {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
fields: AsamFieldDefinition[];
|
|
7
|
+
collapsible: boolean;
|
|
8
|
+
collapsed: boolean;
|
|
9
|
+
}[];
|
|
10
|
+
export declare function editable(field: AsamFieldDefinition): boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AsamFieldDefinition, AsamFieldModel } from '../fields/Types.js';
|
|
2
|
+
/** 保留属性存在性;这里不应用默认值或输入适配。 */
|
|
3
|
+
export declare function copyModel(fields: readonly AsamFieldDefinition[], input: Readonly<AsamFieldModel>): AsamFieldModel;
|
|
4
|
+
export declare function sameValue(a: unknown, b: unknown): boolean;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { AsamDataRuntime, AsamRequestContext } from '@asam-ui/ui';
|
|
2
|
+
import type { AsamI18n } from '@asam-ui/ui/i18n';
|
|
3
|
+
import type { Ref } from 'vue';
|
|
4
|
+
import type { AsamFieldDefinition, AsamFieldModel } from '../fields/Types.js';
|
|
5
|
+
export interface AsamEditTarget {
|
|
6
|
+
readonly mode: 'create' | 'edit';
|
|
7
|
+
readonly id?: string | number;
|
|
8
|
+
/** 应用跨弹窗保留的稳定写操作标识,新增也必须提供。 */
|
|
9
|
+
readonly operationId: string;
|
|
10
|
+
}
|
|
11
|
+
export interface AsamEditIssue {
|
|
12
|
+
readonly key?: string;
|
|
13
|
+
readonly message: string;
|
|
14
|
+
}
|
|
15
|
+
export type AsamSaveResult = {
|
|
16
|
+
readonly status: 'success';
|
|
17
|
+
readonly data?: unknown;
|
|
18
|
+
} | {
|
|
19
|
+
readonly status: 'failure';
|
|
20
|
+
readonly message: string;
|
|
21
|
+
readonly issues?: readonly AsamEditIssue[];
|
|
22
|
+
readonly notified?: boolean;
|
|
23
|
+
} | {
|
|
24
|
+
readonly status: 'unknown';
|
|
25
|
+
readonly message: string;
|
|
26
|
+
};
|
|
27
|
+
export interface AsamWriteOperation {
|
|
28
|
+
readonly target: AsamEditTarget;
|
|
29
|
+
readonly scope: string;
|
|
30
|
+
readonly startedAt: number;
|
|
31
|
+
readonly input: Readonly<AsamFieldModel>;
|
|
32
|
+
readonly payload: Readonly<AsamFieldModel>;
|
|
33
|
+
}
|
|
34
|
+
export interface AsamPendingWrite extends AsamWriteOperation {
|
|
35
|
+
readonly status: 'saving' | 'unknown' | 'success' | 'not-applied';
|
|
36
|
+
readonly result?: unknown;
|
|
37
|
+
}
|
|
38
|
+
export interface AsamWriteCoordinator {
|
|
39
|
+
get(scope: string, operationId: string): AsamPendingWrite | undefined;
|
|
40
|
+
set(operation: AsamPendingWrite): void;
|
|
41
|
+
/** 同一操作的成功结果只交付一次。 */
|
|
42
|
+
claimSuccess(scope: string, operationId: string): boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface AsamSavedEvent extends AsamWriteOperation {
|
|
45
|
+
readonly result: unknown;
|
|
46
|
+
}
|
|
47
|
+
export interface AsamEditorConfig {
|
|
48
|
+
readonly formatError?: (cause: unknown, scope: AsamI18n) => string;
|
|
49
|
+
readonly fields: readonly AsamFieldDefinition[];
|
|
50
|
+
readonly runtime: AsamDataRuntime;
|
|
51
|
+
readonly coordinator: AsamWriteCoordinator;
|
|
52
|
+
readonly canWrite?: () => boolean;
|
|
53
|
+
readonly defaults?: (target: AsamEditTarget, context: AsamRequestContext) => Promise<AsamFieldModel>;
|
|
54
|
+
readonly load: (target: AsamEditTarget, context: AsamRequestContext) => Promise<AsamFieldModel>;
|
|
55
|
+
readonly save: (payload: Readonly<AsamFieldModel>, operation: AsamWriteOperation, context: AsamRequestContext) => Promise<AsamSaveResult>;
|
|
56
|
+
readonly verify?: (operation: AsamPendingWrite, context: AsamRequestContext) => Promise<{
|
|
57
|
+
readonly status: 'success';
|
|
58
|
+
readonly data?: unknown;
|
|
59
|
+
} | {
|
|
60
|
+
readonly status: 'not-applied' | 'unknown';
|
|
61
|
+
}>;
|
|
62
|
+
readonly validatePayload?: (payload: Readonly<AsamFieldModel>) => Promise<readonly AsamEditIssue[]>;
|
|
63
|
+
readonly confirmDiscard: () => Promise<boolean>;
|
|
64
|
+
readonly equals?: Readonly<Record<string, (a: unknown, b: unknown) => boolean>>;
|
|
65
|
+
readonly onSaved?: (event: AsamSavedEvent) => void;
|
|
66
|
+
}
|
|
67
|
+
export type AsamEditorStatus = 'closed' | 'loading' | 'load-error' | 'editing' | 'validating' | 'transforming' | 'saving' | 'unknown' | 'verifying' | 'success';
|
|
68
|
+
export interface AsamEditorController {
|
|
69
|
+
readonly fields: readonly AsamFieldDefinition[];
|
|
70
|
+
readonly model: Readonly<Ref<Readonly<AsamFieldModel>>>;
|
|
71
|
+
readonly status: Readonly<Ref<AsamEditorStatus>>;
|
|
72
|
+
readonly issues: Readonly<Ref<readonly AsamEditIssue[]>>;
|
|
73
|
+
readonly message: Readonly<Ref<string>>;
|
|
74
|
+
/** Resolve library-owned current feedback in the displaying scope; raw message stays diagnostic. */
|
|
75
|
+
readonly formatMessage?: (scope: AsamI18n) => string;
|
|
76
|
+
readonly visible: Readonly<Ref<boolean>>;
|
|
77
|
+
readonly dirty: Readonly<Ref<boolean>>;
|
|
78
|
+
readonly busy: Readonly<Ref<boolean>>;
|
|
79
|
+
readonly writable: Readonly<Ref<boolean>>;
|
|
80
|
+
readonly session: Readonly<Ref<number>>;
|
|
81
|
+
readonly canVerify: boolean;
|
|
82
|
+
open(target: AsamEditTarget): Promise<void>;
|
|
83
|
+
reload(): Promise<void>;
|
|
84
|
+
close(): Promise<boolean>;
|
|
85
|
+
invalidate(): void;
|
|
86
|
+
dispose(): void;
|
|
87
|
+
replace(model: Readonly<AsamFieldModel>): boolean;
|
|
88
|
+
update(key: string, value: unknown): boolean;
|
|
89
|
+
submit(): Promise<void>;
|
|
90
|
+
verify(): Promise<void>;
|
|
91
|
+
setValidator(validator?: () => Promise<readonly AsamEditIssue[]>): void;
|
|
92
|
+
}
|