@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,6 @@
|
|
|
1
|
+
import type { AsamCaptchaFieldOptions, AsamMentionFieldOptions, AsamPasswordFieldOptions, AsamTagFieldOptions, AsamTextFieldDefinition } from './Types.js';
|
|
2
|
+
export declare function normalizeAsamTags(value: readonly string[]): string[];
|
|
3
|
+
export declare function createAsamPasswordField(options: AsamPasswordFieldOptions): AsamTextFieldDefinition;
|
|
4
|
+
export declare function createAsamTagField(options: AsamTagFieldOptions): AsamTextFieldDefinition;
|
|
5
|
+
export declare function createAsamMentionField(options: AsamMentionFieldOptions): AsamTextFieldDefinition;
|
|
6
|
+
export declare function createAsamCaptchaField(options: AsamCaptchaFieldOptions): AsamTextFieldDefinition;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { AsamInputTagProps, AsamMentionProps, AsamPasswordProps } from '@asam-ui/ui';
|
|
2
|
+
import type { AsamI18n } from '@asam-ui/ui/i18n';
|
|
3
|
+
import type { AsamFieldDefinition } from '../Types.js';
|
|
4
|
+
export type AsamTextFieldDefinition = Extract<AsamFieldDefinition, {
|
|
5
|
+
kind: 'custom';
|
|
6
|
+
}>;
|
|
7
|
+
export interface AsamTextOptions<V> {
|
|
8
|
+
readonly key: string;
|
|
9
|
+
readonly label: string;
|
|
10
|
+
readonly defaultValue?: () => V;
|
|
11
|
+
readonly modes?: AsamTextFieldDefinition['modes'];
|
|
12
|
+
}
|
|
13
|
+
export interface AsamPasswordFieldOptions extends AsamTextOptions<string | null> {
|
|
14
|
+
readonly inputProps?: Omit<AsamPasswordProps, 'modelValue' | 'disabled' | 'readonly'>;
|
|
15
|
+
}
|
|
16
|
+
export interface AsamTagCandidate {
|
|
17
|
+
/** 非空、大小写敏感的唯一字符串标识;不会把数字 0 转成字符串。 */
|
|
18
|
+
readonly value: string;
|
|
19
|
+
readonly label: string;
|
|
20
|
+
readonly disabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface AsamTagFieldOptions extends AsamTextOptions<readonly string[]> {
|
|
23
|
+
readonly inputProps?: Omit<AsamInputTagProps, 'modelValue' | 'disabled' | 'readonly'>;
|
|
24
|
+
readonly candidates?: () => readonly AsamTagCandidate[];
|
|
25
|
+
}
|
|
26
|
+
export interface AsamMentionFieldOptions extends AsamTextOptions<string | null> {
|
|
27
|
+
readonly inputProps?: Omit<AsamMentionProps, 'modelValue' | 'options' | 'disabled' | 'readonly'>;
|
|
28
|
+
readonly candidates: () => readonly AsamTagCandidate[];
|
|
29
|
+
}
|
|
30
|
+
export interface AsamCaptchaRequest {
|
|
31
|
+
readonly target: string;
|
|
32
|
+
readonly signal: AbortSignal;
|
|
33
|
+
}
|
|
34
|
+
/** resolve 表示应用已确认发送;reject 表示可重试失败,不传入验证码或账号凭据。 */
|
|
35
|
+
export type AsamCaptchaService = (request: AsamCaptchaRequest) => Promise<void>;
|
|
36
|
+
export interface AsamCaptchaClock {
|
|
37
|
+
/** 返回有限毫秒值;非法值/异常使当前动作进入可重试error。 */
|
|
38
|
+
now(): number;
|
|
39
|
+
/** 异步且仅调用一次callback;返回可交给clear的独立handle。 */
|
|
40
|
+
schedule(callback: () => void, milliseconds: number): unknown;
|
|
41
|
+
/** 幂等取消指定handle且不抛错;实际资源清理由适配器负责。 */
|
|
42
|
+
clear(handle: unknown): void;
|
|
43
|
+
}
|
|
44
|
+
export interface AsamCaptchaState {
|
|
45
|
+
readonly status: 'idle' | 'sending' | 'cooldown' | 'error';
|
|
46
|
+
readonly remaining: number;
|
|
47
|
+
readonly error: string;
|
|
48
|
+
}
|
|
49
|
+
export interface AsamCaptchaOptions {
|
|
50
|
+
readonly target: () => string;
|
|
51
|
+
readonly service: AsamCaptchaService;
|
|
52
|
+
/** 成功后冷却秒数,默认60;0表示不冷却。 */
|
|
53
|
+
readonly cooldownSeconds?: number;
|
|
54
|
+
readonly clock?: AsamCaptchaClock;
|
|
55
|
+
}
|
|
56
|
+
export interface AsamCaptchaFieldOptions extends AsamTextOptions<string | null>, AsamCaptchaOptions {
|
|
57
|
+
}
|
|
58
|
+
export interface AsamCaptchaExpose {
|
|
59
|
+
focus(): void;
|
|
60
|
+
send(): Promise<boolean>;
|
|
61
|
+
cancel(): void;
|
|
62
|
+
}
|
|
63
|
+
export interface AsamCaptchaControlProps {
|
|
64
|
+
readonly modelValue?: string | null;
|
|
65
|
+
readonly disabled?: boolean;
|
|
66
|
+
readonly readonly?: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface AsamCaptchaEmits {
|
|
69
|
+
'update:modelValue': [value: string];
|
|
70
|
+
'state-change': [state: AsamCaptchaState];
|
|
71
|
+
}
|
|
72
|
+
export interface AsamCaptchaController {
|
|
73
|
+
readonly formatError?: (scope: AsamI18n) => string;
|
|
74
|
+
readonly state: AsamCaptchaState;
|
|
75
|
+
send(): Promise<boolean>;
|
|
76
|
+
/** 撤销当前代次、取消请求/timer,再通知idle;idle无资源时幂等。 */
|
|
77
|
+
reset(): void;
|
|
78
|
+
/** 通知前关闭发送入口;销毁中重入send返回false。 */
|
|
79
|
+
dispose(): void;
|
|
80
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { AsamFilterPopoverProps } from './Types.js';
|
|
2
|
+
import type { AsamFieldModel } from '../../fields/Types.js';
|
|
3
|
+
type __VLS_Slots = {
|
|
4
|
+
default?: (scope: {
|
|
5
|
+
model: Readonly<AsamFieldModel>;
|
|
6
|
+
update: typeof update;
|
|
7
|
+
}) => unknown;
|
|
8
|
+
trigger?: (scope: {
|
|
9
|
+
open: typeof open;
|
|
10
|
+
count: number;
|
|
11
|
+
}) => unknown;
|
|
12
|
+
title?: () => unknown;
|
|
13
|
+
actions?: (scope: {
|
|
14
|
+
submit: typeof submit;
|
|
15
|
+
cancel: typeof cancel;
|
|
16
|
+
clear: typeof clear;
|
|
17
|
+
reset: typeof reset;
|
|
18
|
+
}) => unknown;
|
|
19
|
+
};
|
|
20
|
+
declare function open(): Promise<void>;
|
|
21
|
+
declare function cancel(): void;
|
|
22
|
+
declare function update(key: string, value: unknown): void;
|
|
23
|
+
declare function clear(): void;
|
|
24
|
+
declare function reset(): void;
|
|
25
|
+
declare function submit(): Promise<boolean>;
|
|
26
|
+
declare const __VLS_base: import("vue").DefineComponent<AsamFilterPopoverProps, {
|
|
27
|
+
open: typeof open;
|
|
28
|
+
cancel: typeof cancel;
|
|
29
|
+
clear: typeof clear;
|
|
30
|
+
reset: typeof reset;
|
|
31
|
+
submit: typeof submit;
|
|
32
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
|
+
"update:modelValue": (value: AsamFieldModel) => any;
|
|
34
|
+
cancel: () => any;
|
|
35
|
+
apply: (payload: AsamFieldModel, applied: AsamFieldModel) => any;
|
|
36
|
+
}, string, import("vue").PublicProps, Readonly<AsamFilterPopoverProps> & Readonly<{
|
|
37
|
+
"onUpdate:modelValue"?: ((value: AsamFieldModel) => any) | undefined;
|
|
38
|
+
onCancel?: (() => any) | undefined;
|
|
39
|
+
onApply?: ((payload: AsamFieldModel, applied: AsamFieldModel) => any) | undefined;
|
|
40
|
+
}>, {
|
|
41
|
+
title: string;
|
|
42
|
+
size: import("./Types.js").AsamFlowSize;
|
|
43
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
44
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
45
|
+
declare const _default: typeof __VLS_export;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { AsamEditIssue, AsamEditorController } from '../../editor/Types.js';
|
|
2
|
+
import type { AsamFormDrawerProps } from './Types.js';
|
|
3
|
+
type __VLS_Slots = {
|
|
4
|
+
'error-help'?: (scope: {
|
|
5
|
+
issues: readonly AsamEditIssue[];
|
|
6
|
+
}) => unknown;
|
|
7
|
+
'unknown-help'?: () => unknown;
|
|
8
|
+
append?: (scope: {
|
|
9
|
+
status: string;
|
|
10
|
+
}) => unknown;
|
|
11
|
+
};
|
|
12
|
+
declare function focusField(key?: string): Promise<void>;
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<AsamFormDrawerProps, {
|
|
14
|
+
open: (target: Parameters<AsamEditorController["open"]>[0]) => Promise<void>;
|
|
15
|
+
reload: () => Promise<void>;
|
|
16
|
+
submit: () => Promise<void>;
|
|
17
|
+
verify: () => Promise<void>;
|
|
18
|
+
close: () => Promise<boolean>;
|
|
19
|
+
focusField: typeof focusField;
|
|
20
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AsamFormDrawerProps> & Readonly<{}>, {
|
|
21
|
+
title: string;
|
|
22
|
+
size: import("./Types.js").AsamFlowSize;
|
|
23
|
+
columns: 1 | 2 | 3;
|
|
24
|
+
width: string;
|
|
25
|
+
fallbackFocus: () => HTMLElement | null;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { AsamLoginFormProps } from './Types.js';
|
|
2
|
+
import type { AsamFieldModel } from '../../fields/Types.js';
|
|
3
|
+
type __VLS_Slots = {
|
|
4
|
+
title?: () => unknown;
|
|
5
|
+
default?: (scope: {
|
|
6
|
+
model: Readonly<AsamFieldModel>;
|
|
7
|
+
update: typeof update;
|
|
8
|
+
}) => unknown;
|
|
9
|
+
auxiliary?: (scope: {
|
|
10
|
+
cancel: typeof cancel;
|
|
11
|
+
reset: typeof reset;
|
|
12
|
+
}) => unknown;
|
|
13
|
+
};
|
|
14
|
+
declare function update(key: string, value: unknown): void;
|
|
15
|
+
declare function cancel(): void;
|
|
16
|
+
declare function reset(): void;
|
|
17
|
+
declare function submit(): Promise<false>;
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<AsamLoginFormProps, {
|
|
19
|
+
submit: typeof submit;
|
|
20
|
+
cancel: typeof cancel;
|
|
21
|
+
reset: typeof reset;
|
|
22
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
|
+
success: () => any;
|
|
24
|
+
cancel: () => any;
|
|
25
|
+
failure: (message: string) => any;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<AsamLoginFormProps> & Readonly<{
|
|
27
|
+
onSuccess?: (() => any) | undefined;
|
|
28
|
+
onCancel?: (() => any) | undefined;
|
|
29
|
+
onFailure?: ((message: string) => any) | undefined;
|
|
30
|
+
}>, {
|
|
31
|
+
title: string;
|
|
32
|
+
size: import("./Types.js").AsamFlowSize;
|
|
33
|
+
actionButtonType: import("@asam-ui/ui").AsamButtonType;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
36
|
+
declare const _default: typeof __VLS_export;
|
|
37
|
+
export default _default;
|
|
38
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
39
|
+
new (): {
|
|
40
|
+
$slots: S;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
interface LoginCredentials {
|
|
2
|
+
readonly username: string;
|
|
3
|
+
readonly password: string;
|
|
4
|
+
}
|
|
5
|
+
interface LoginContext {
|
|
6
|
+
/** 模板卸载或 cancel 时中止;宿主写会话和导航前必须核对此信号。 */
|
|
7
|
+
readonly signal: AbortSignal;
|
|
8
|
+
}
|
|
9
|
+
type LoginAuthenticate = (credentials: LoginCredentials, context: LoginContext) => Promise<void>;
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
/** 宿主登录回调。未配置时模板保持不可提交。 */
|
|
12
|
+
authenticate?: LoginAuthenticate;
|
|
13
|
+
/** 只返回可公开的提示;不提供时使用固定文案。 */
|
|
14
|
+
formatError?: (error: unknown) => string;
|
|
15
|
+
/** 登录表单控件密度。 */
|
|
16
|
+
size?: 'small' | 'default' | 'large' | 'big';
|
|
17
|
+
/** auto 跟随页面主题,可显式选择明亮或暗黑。 */
|
|
18
|
+
theme?: 'auto' | 'light' | 'dark';
|
|
19
|
+
};
|
|
20
|
+
type __VLS_Slots = {
|
|
21
|
+
brand?: () => unknown;
|
|
22
|
+
title?: () => unknown;
|
|
23
|
+
default?: () => unknown;
|
|
24
|
+
auxiliary?: () => unknown;
|
|
25
|
+
footer?: () => unknown;
|
|
26
|
+
help?: () => unknown;
|
|
27
|
+
verification?: () => unknown;
|
|
28
|
+
};
|
|
29
|
+
declare function focus(): void;
|
|
30
|
+
declare function cancel(): void;
|
|
31
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
32
|
+
focus: typeof focus;
|
|
33
|
+
cancel: typeof cancel;
|
|
34
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
|
+
"pending-change": (pending: boolean) => any;
|
|
36
|
+
authenticated: () => any;
|
|
37
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
38
|
+
"onPending-change"?: ((pending: boolean) => any) | undefined;
|
|
39
|
+
onAuthenticated?: (() => any) | undefined;
|
|
40
|
+
}>, {
|
|
41
|
+
size: "small" | "default" | "large" | "big";
|
|
42
|
+
theme: "auto" | "light" | "dark";
|
|
43
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
44
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
45
|
+
declare const _default: typeof __VLS_export;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { AsamStepsFormProps, AsamFormStep } from './Types.js';
|
|
2
|
+
import type { AsamFieldModel } from '../../fields/Types.js';
|
|
3
|
+
type __VLS_Slots = {
|
|
4
|
+
default?: (scope: {
|
|
5
|
+
step: AsamFormStep;
|
|
6
|
+
model: Readonly<AsamFieldModel>;
|
|
7
|
+
update: typeof update;
|
|
8
|
+
}) => unknown;
|
|
9
|
+
actions?: (scope: {
|
|
10
|
+
next: typeof next;
|
|
11
|
+
back: typeof back;
|
|
12
|
+
submit: typeof submit;
|
|
13
|
+
cancel: typeof cancel;
|
|
14
|
+
}) => unknown;
|
|
15
|
+
};
|
|
16
|
+
declare function update(key: string, value: unknown): void;
|
|
17
|
+
declare function go(id: string): Promise<boolean>;
|
|
18
|
+
declare function next(): Promise<boolean>;
|
|
19
|
+
declare function back(): void;
|
|
20
|
+
declare function submit(): Promise<boolean>;
|
|
21
|
+
declare function cancel(): void;
|
|
22
|
+
declare function reset(): void;
|
|
23
|
+
declare const __VLS_base: import("vue").DefineComponent<AsamStepsFormProps, {
|
|
24
|
+
next: typeof next;
|
|
25
|
+
back: typeof back;
|
|
26
|
+
go: typeof go;
|
|
27
|
+
submit: typeof submit;
|
|
28
|
+
cancel: typeof cancel;
|
|
29
|
+
reset: typeof reset;
|
|
30
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
+
"update:modelValue": (model: AsamFieldModel) => any;
|
|
32
|
+
cancel: () => any;
|
|
33
|
+
finish: (payload: AsamFieldModel) => any;
|
|
34
|
+
"step-change": (id: string) => any;
|
|
35
|
+
}, string, import("vue").PublicProps, Readonly<AsamStepsFormProps> & Readonly<{
|
|
36
|
+
"onUpdate:modelValue"?: ((model: AsamFieldModel) => any) | undefined;
|
|
37
|
+
onCancel?: (() => any) | undefined;
|
|
38
|
+
onFinish?: ((payload: AsamFieldModel) => any) | undefined;
|
|
39
|
+
"onStep-change"?: ((id: string) => any) | undefined;
|
|
40
|
+
}>, {
|
|
41
|
+
size: import("./Types.js").AsamFlowSize;
|
|
42
|
+
active: boolean;
|
|
43
|
+
actionButtonType: import("@asam-ui/ui").AsamButtonType;
|
|
44
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
46
|
+
declare const _default: typeof __VLS_export;
|
|
47
|
+
export default _default;
|
|
48
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { AsamFieldDefinition, AsamFieldModel } from '../../fields/Types.js';
|
|
2
|
+
import type { AsamEditIssue } from '../../editor/Types.js';
|
|
3
|
+
import type { AsamFlowSize } from './Types.js';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
fields: readonly AsamFieldDefinition[];
|
|
6
|
+
fieldLabels?: Readonly<Record<string, string>>;
|
|
7
|
+
model: Readonly<AsamFieldModel>;
|
|
8
|
+
mode?: 'query' | 'edit';
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
active?: boolean;
|
|
12
|
+
size?: AsamFlowSize;
|
|
13
|
+
session?: number;
|
|
14
|
+
issues?: readonly AsamEditIssue[];
|
|
15
|
+
};
|
|
16
|
+
declare function focus(key?: string): boolean;
|
|
17
|
+
declare function validate(): Promise<readonly AsamEditIssue[]>;
|
|
18
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
19
|
+
validate: typeof validate;
|
|
20
|
+
focus: typeof focus;
|
|
21
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
|
+
update: (key: string, value: unknown) => any;
|
|
23
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
24
|
+
onUpdate?: ((key: string, value: unknown) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
size: AsamFlowSize;
|
|
27
|
+
issues: readonly AsamEditIssue[];
|
|
28
|
+
mode: "query" | "edit";
|
|
29
|
+
session: number;
|
|
30
|
+
active: boolean;
|
|
31
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as AsamFilterPopover } from './AsamFilterPopover.vue';
|
|
2
|
+
export { default as AsamFormDrawer } from './AsamFormDrawer.vue';
|
|
3
|
+
export { default as AsamStepsForm } from './AsamStepsForm.vue';
|
|
4
|
+
export { default as AsamLoginForm } from './AsamLoginForm.vue';
|
|
5
|
+
export { default as AsamLoginPage } from './AsamLoginPage.vue';
|
|
6
|
+
export * from './Types.js';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
declare const zh: {
|
|
2
|
+
'pro.loginTemplate.brandDetail': string;
|
|
3
|
+
'pro.loginTemplate.eyebrow': string;
|
|
4
|
+
'pro.loginTemplate.heading': string;
|
|
5
|
+
'pro.loginTemplate.intro': string;
|
|
6
|
+
'pro.loginTemplate.account': string;
|
|
7
|
+
'pro.loginTemplate.password': string;
|
|
8
|
+
'pro.loginTemplate.accountPlaceholder': string;
|
|
9
|
+
'pro.loginTemplate.accountRequired': string;
|
|
10
|
+
'pro.loginTemplate.passwordPlaceholder': string;
|
|
11
|
+
'pro.loginTemplate.pending': string;
|
|
12
|
+
'pro.loginTemplate.submit': string;
|
|
13
|
+
'pro.loginTemplate.help': string;
|
|
14
|
+
'pro.loginTemplate.failure': string;
|
|
15
|
+
'pro.loginTemplate.footerBrand': string;
|
|
16
|
+
'pro.loginTemplate.footerText': string;
|
|
17
|
+
};
|
|
18
|
+
type LoginTemplateParameters = {
|
|
19
|
+
[K in keyof typeof zh]: Record<never, never>;
|
|
20
|
+
};
|
|
21
|
+
declare module '@asam-ui/ui/i18n' {
|
|
22
|
+
interface AsamI18nMessageParameters extends LoginTemplateParameters {
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export declare const loginTemplateMessages: {
|
|
26
|
+
'zh-CN': {
|
|
27
|
+
'pro.loginTemplate.brandDetail': string;
|
|
28
|
+
'pro.loginTemplate.eyebrow': string;
|
|
29
|
+
'pro.loginTemplate.heading': string;
|
|
30
|
+
'pro.loginTemplate.intro': string;
|
|
31
|
+
'pro.loginTemplate.account': string;
|
|
32
|
+
'pro.loginTemplate.password': string;
|
|
33
|
+
'pro.loginTemplate.accountPlaceholder': string;
|
|
34
|
+
'pro.loginTemplate.accountRequired': string;
|
|
35
|
+
'pro.loginTemplate.passwordPlaceholder': string;
|
|
36
|
+
'pro.loginTemplate.pending': string;
|
|
37
|
+
'pro.loginTemplate.submit': string;
|
|
38
|
+
'pro.loginTemplate.help': string;
|
|
39
|
+
'pro.loginTemplate.failure': string;
|
|
40
|
+
'pro.loginTemplate.footerBrand': string;
|
|
41
|
+
'pro.loginTemplate.footerText': string;
|
|
42
|
+
};
|
|
43
|
+
en: Record<"pro.loginTemplate.brandDetail" | "pro.loginTemplate.eyebrow" | "pro.loginTemplate.heading" | "pro.loginTemplate.intro" | "pro.loginTemplate.account" | "pro.loginTemplate.password" | "pro.loginTemplate.accountPlaceholder" | "pro.loginTemplate.accountRequired" | "pro.loginTemplate.passwordPlaceholder" | "pro.loginTemplate.pending" | "pro.loginTemplate.submit" | "pro.loginTemplate.help" | "pro.loginTemplate.failure" | "pro.loginTemplate.footerBrand" | "pro.loginTemplate.footerText", string>;
|
|
44
|
+
};
|
|
45
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useAsamOverlayStyle as useAsamFlowOverlayStyle } from '../../display/shared/OverlayStyle.js';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { AsamFieldDefinition, AsamFieldModel } from '../../fields/Types.js';
|
|
2
|
+
import type { AsamFlowContext, AsamFlowValidator } from './Types.js';
|
|
3
|
+
/** 临时表单会话;不执行远端保存,不承担 editor 写入协调职责。 */
|
|
4
|
+
export declare function createAsamFlowSession(fields: () => readonly AsamFieldDefinition[]): {
|
|
5
|
+
model: Readonly<import("vue").Ref<{
|
|
6
|
+
readonly [x: string]: Readonly<unknown>;
|
|
7
|
+
}, {
|
|
8
|
+
readonly [x: string]: Readonly<unknown>;
|
|
9
|
+
}>>;
|
|
10
|
+
issues: Readonly<import("vue").Ref<readonly {
|
|
11
|
+
readonly key?: string | undefined;
|
|
12
|
+
readonly message: string;
|
|
13
|
+
}[], readonly {
|
|
14
|
+
readonly key?: string | undefined;
|
|
15
|
+
readonly message: string;
|
|
16
|
+
}[]>>;
|
|
17
|
+
pending: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
18
|
+
active: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
19
|
+
revision: Readonly<import("vue").Ref<number, number>>;
|
|
20
|
+
keys: import("vue").ComputedRef<string[]>;
|
|
21
|
+
open: (input: Readonly<AsamFieldModel>) => void;
|
|
22
|
+
cancel: () => void;
|
|
23
|
+
update: (key: string, value: unknown) => void;
|
|
24
|
+
clear: (input?: Readonly<AsamFieldModel>) => void;
|
|
25
|
+
run: (options: {
|
|
26
|
+
keys: readonly string[];
|
|
27
|
+
validate?: AsamFlowValidator;
|
|
28
|
+
stepId?: string;
|
|
29
|
+
target?: "query" | "submit";
|
|
30
|
+
effect?: (payload: Readonly<AsamFieldModel>, context: AsamFlowContext) => Promise<void>;
|
|
31
|
+
}) => Promise<boolean>;
|
|
32
|
+
dispose(): void;
|
|
33
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { AsamButtonType } from '@asam-ui/ui';
|
|
2
|
+
import type { AsamEditIssue, AsamEditorController } from '../../editor/Types.js';
|
|
3
|
+
import type { AsamFieldDefinition, AsamFieldModel } from '../../fields/Types.js';
|
|
4
|
+
export type AsamFlowSize = 'small' | 'default' | 'big' | 'large';
|
|
5
|
+
export interface AsamFlowContext {
|
|
6
|
+
readonly signal: AbortSignal;
|
|
7
|
+
readonly stepId?: string;
|
|
8
|
+
}
|
|
9
|
+
export type AsamFlowValidator = (model: Readonly<AsamFieldModel>, keys: readonly string[], context: AsamFlowContext) => Promise<readonly AsamEditIssue[]>;
|
|
10
|
+
export interface AsamFlowProps {
|
|
11
|
+
fields: readonly AsamFieldDefinition[];
|
|
12
|
+
modelValue: Readonly<AsamFieldModel>;
|
|
13
|
+
validate?: AsamFlowValidator;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
readonly?: boolean;
|
|
16
|
+
size?: AsamFlowSize;
|
|
17
|
+
}
|
|
18
|
+
export interface AsamFilterPopoverProps extends AsamFlowProps {
|
|
19
|
+
title?: string;
|
|
20
|
+
/** 清空只改变草稿;未提供时使用各字段 emptyValue。 */
|
|
21
|
+
clearValue?: Readonly<AsamFieldModel>;
|
|
22
|
+
fallbackFocus?: () => HTMLElement | null;
|
|
23
|
+
}
|
|
24
|
+
export interface AsamFormStep {
|
|
25
|
+
readonly id: string;
|
|
26
|
+
readonly title: string;
|
|
27
|
+
readonly keys: readonly string[];
|
|
28
|
+
}
|
|
29
|
+
export interface AsamStepsFormProps extends AsamFlowProps {
|
|
30
|
+
/** 下一步与提交默认 primary;步骤导航和上一步不受影响。 */
|
|
31
|
+
actionButtonType?: AsamButtonType;
|
|
32
|
+
steps: readonly AsamFormStep[];
|
|
33
|
+
/** 默认只能返回已访问步骤。向前跳转逐步验证所有经过步骤。 */
|
|
34
|
+
allowJump?: boolean;
|
|
35
|
+
active?: boolean;
|
|
36
|
+
submitAction: (payload: Readonly<AsamFieldModel>, context: AsamFlowContext) => Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
export interface AsamLoginResult {
|
|
39
|
+
readonly success: boolean;
|
|
40
|
+
readonly message?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface AsamLoginFormProps extends AsamFlowProps {
|
|
43
|
+
/** Display labels only; changes preserve the fields and current login draft. */
|
|
44
|
+
fieldLabels?: Readonly<Record<string, string>>;
|
|
45
|
+
/** 登录主操作默认 primary;显式值覆盖默认。 */
|
|
46
|
+
actionButtonType?: AsamButtonType;
|
|
47
|
+
title?: string;
|
|
48
|
+
/** 必须由宿主注入;只在显式提交时调用。 */
|
|
49
|
+
authenticate: (credentials: Readonly<AsamFieldModel>, context: AsamFlowContext) => Promise<AsamLoginResult>;
|
|
50
|
+
}
|
|
51
|
+
export interface AsamFormDrawerProps {
|
|
52
|
+
fieldLabels?: Readonly<Record<string, string>>;
|
|
53
|
+
controller: AsamEditorController;
|
|
54
|
+
title?: string;
|
|
55
|
+
columns?: 1 | 2 | 3;
|
|
56
|
+
size?: AsamFlowSize;
|
|
57
|
+
width?: string;
|
|
58
|
+
fallbackFocus?: () => HTMLElement | null;
|
|
59
|
+
}
|
|
60
|
+
export interface AsamFlowExpose {
|
|
61
|
+
cancel(): void;
|
|
62
|
+
submit(): Promise<boolean>;
|
|
63
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import '../shared/TopLabels.css';
|
|
2
|
+
import type { AsamControlSize } from '@asam-ui/ui';
|
|
3
|
+
import type { AsamSchemaNode, AsamSchemaSubmitModel } from './Types.js';
|
|
4
|
+
declare const __VLS_export: <M extends object>(__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<{
|
|
6
|
+
modelValue: M;
|
|
7
|
+
schema: readonly AsamSchemaNode[];
|
|
8
|
+
session?: string | number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
size?: AsamControlSize;
|
|
12
|
+
} & {
|
|
13
|
+
onSubmit?: ((model: AsamSchemaSubmitModel<M>) => any) | undefined;
|
|
14
|
+
"onUpdate:modelValue"?: ((model: M) => any) | undefined;
|
|
15
|
+
onChange?: ((model: M) => any) | undefined;
|
|
16
|
+
}> & (typeof globalThis extends {
|
|
17
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
18
|
+
} ? P : {});
|
|
19
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
20
|
+
controller: import("./Controller.js").AsamSchemaController<M>;
|
|
21
|
+
validate: () => Promise<import("./Types.js").AsamSchemaValidation>;
|
|
22
|
+
submit: () => Promise<import("./Types.js").AsamSchemaValidation>;
|
|
23
|
+
locate: (identity: string) => Promise<void>;
|
|
24
|
+
}>) => void;
|
|
25
|
+
attrs: any;
|
|
26
|
+
slots: {
|
|
27
|
+
actions?: (props: {
|
|
28
|
+
validate: () => Promise<import("./Types.js").AsamSchemaValidation>;
|
|
29
|
+
submit: () => Promise<import("./Types.js").AsamSchemaValidation>;
|
|
30
|
+
}) => any;
|
|
31
|
+
};
|
|
32
|
+
emit: ((evt: "submit", model: AsamSchemaSubmitModel<M>) => void) & ((evt: "update:modelValue", model: M) => void) & ((evt: "change", model: M) => void);
|
|
33
|
+
}>) => import("vue").VNode & {
|
|
34
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
35
|
+
};
|
|
36
|
+
declare const _default: typeof __VLS_export;
|
|
37
|
+
export default _default;
|
|
38
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
39
|
+
[K in keyof T]: T[K];
|
|
40
|
+
} : {
|
|
41
|
+
[K in keyof T as K]: T[K];
|
|
42
|
+
}) & {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { AsamI18n } from '@asam-ui/ui/i18n';
|
|
2
|
+
import type { ShallowRef } from 'vue';
|
|
3
|
+
import type { AsamSchemaInstance, AsamSchemaIssue, AsamSchemaNode, AsamSchemaResult, AsamSchemaRowKey, AsamSchemaSubmitModel, AsamSchemaValidation } from './Types.js';
|
|
4
|
+
export type AsamSchemaNativeValidator = (instance: AsamSchemaInstance, context: {
|
|
5
|
+
readonly signal: AbortSignal;
|
|
6
|
+
}) => Promise<string | {
|
|
7
|
+
readonly message: string;
|
|
8
|
+
} | undefined>;
|
|
9
|
+
export interface AsamSchemaControllerOptions<M extends object> {
|
|
10
|
+
readonly schema: readonly AsamSchemaNode[];
|
|
11
|
+
readonly model: M;
|
|
12
|
+
readonly onUpdate?: (model: M) => void;
|
|
13
|
+
readonly onChange?: (model: M) => void;
|
|
14
|
+
readonly disabled?: boolean;
|
|
15
|
+
readonly readonly?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** 仅本地同步依赖事务;远程 I/O 由控件公开 provider/runtime 负责。 */
|
|
18
|
+
export declare function createAsamSchemaController<M extends object>(options: AsamSchemaControllerOptions<M>): AsamSchemaController<M>;
|
|
19
|
+
/** 明确公开返回类型,声明仅引用 Vue 公共 ShallowRef,不泄漏内部 IfAny。 */
|
|
20
|
+
export interface AsamSchemaController<M extends object = Record<string, unknown>> {
|
|
21
|
+
readonly model: Readonly<ShallowRef<M | undefined>>;
|
|
22
|
+
readonly instances: Readonly<ShallowRef<readonly AsamSchemaInstance[]>>;
|
|
23
|
+
readonly issues: Readonly<ShallowRef<readonly AsamSchemaIssue[]>>;
|
|
24
|
+
readonly configurationError: Readonly<ShallowRef<string | undefined>>;
|
|
25
|
+
readonly formatConfigurationError?: (scope: AsamI18n) => string;
|
|
26
|
+
readonly collapsed: Readonly<ShallowRef<ReadonlySet<string>>>;
|
|
27
|
+
readonly version: Readonly<ShallowRef<number>>;
|
|
28
|
+
update(identity: string, value: unknown): AsamSchemaResult;
|
|
29
|
+
validate(): Promise<AsamSchemaValidation>;
|
|
30
|
+
value(instance: AsamSchemaInstance): unknown;
|
|
31
|
+
add(identity: string, row?: object): AsamSchemaResult;
|
|
32
|
+
remove(identity: string, key: AsamSchemaRowKey): AsamSchemaResult;
|
|
33
|
+
move(identity: string, key: AsamSchemaRowKey, destination: number): AsamSchemaResult;
|
|
34
|
+
replace(model: M): AsamSchemaResult;
|
|
35
|
+
reconfigure(schema: readonly AsamSchemaNode[], model?: M): AsamSchemaResult;
|
|
36
|
+
reopen(model: M): AsamSchemaResult;
|
|
37
|
+
toggle(identity: string, collapsed?: boolean): void;
|
|
38
|
+
reveal(identity: string): boolean;
|
|
39
|
+
setNativeValidator(validator: AsamSchemaNativeValidator | undefined): void;
|
|
40
|
+
invalidate(): void;
|
|
41
|
+
setMode(mode: {
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
readonly?: boolean;
|
|
44
|
+
}): void;
|
|
45
|
+
submit(): AsamSchemaSubmitModel<M>;
|
|
46
|
+
dispose(): void;
|
|
47
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as AsamSchemaForm } from './AsamSchemaForm.vue';
|
|
2
|
+
export { createAsamNestedSchema } from './Schema.js';
|
|
3
|
+
export type { AsamSchemaPathValue } from './Schema.js';
|
|
4
|
+
export { createAsamSchemaController } from './Controller.js';
|
|
5
|
+
export type { AsamSchemaController, AsamSchemaControllerOptions, AsamSchemaNativeValidator } from './Controller.js';
|
|
6
|
+
export type * from './Types.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AsamOwnedFieldMessage } from '../../fields/I18n.js';
|
|
2
|
+
import type { AsamSchemaPath } from './Types.js';
|
|
3
|
+
export declare function schemaError(message: string, descriptor?: AsamOwnedFieldMessage): never;
|
|
4
|
+
export declare function checkPath(path: AsamSchemaPath, empty?: boolean): void;
|
|
5
|
+
export declare function pathKey(path: AsamSchemaPath): string;
|
|
6
|
+
export declare function readPath(model: unknown, path: AsamSchemaPath): unknown;
|
|
7
|
+
export declare function writePath(model: object, path: AsamSchemaPath, value: unknown): void;
|
|
8
|
+
/** 只复制声明模型数据,拒绝脚本、原型污染和循环对象。 */
|
|
9
|
+
export declare function snapshot<T>(value: T, parents?: Set<object>): T;
|
|
10
|
+
export declare function sync<T>(value: T): T;
|