@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,202 @@
|
|
|
1
|
+
import { t as e } from "./Resolve-Cq2BDFwo.js";
|
|
2
|
+
import { computed as t, markRaw as n, readonly as r, ref as i, shallowReadonly as a, shallowRef as o } from "vue";
|
|
3
|
+
import { NavigationFailureType as s, createRouterMatcher as c, isNavigationFailure as l } from "vue-router";
|
|
4
|
+
//#region src/application/navigation/Navigation.ts
|
|
5
|
+
function u(u) {
|
|
6
|
+
let { router: p } = u, m = o([]), h = i([]), g = i(""), _ = i(!1), v = i(0), y = i(""), b = i([]), x = `asam-navigation-${++d}:`, S = 0, C = 0, w = 0, T = !1, E = u.scope ?? "", D, O = [], k = [], A = u.maxCache ?? 10;
|
|
7
|
+
if (!Number.isInteger(A) || A < 1) throw Error("maxCache 必须为正整数");
|
|
8
|
+
let j = (e) => x + e, M = (e) => m.value.find((t) => e.name === j(t.id)), N = (e) => (g.value = e, !1);
|
|
9
|
+
async function P(e) {
|
|
10
|
+
try {
|
|
11
|
+
return await u.confirm?.(e, p.currentRoute.value) !== !1;
|
|
12
|
+
} catch {
|
|
13
|
+
return N("app.navigation.confirmFailed");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function F(e) {
|
|
17
|
+
if (T) return;
|
|
18
|
+
let t = M(e);
|
|
19
|
+
if (!t) {
|
|
20
|
+
y.value = "";
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
let n = e.fullPath, r;
|
|
24
|
+
try {
|
|
25
|
+
r = u.cacheKey ? u.cacheKey(e, t) : e.fullPath;
|
|
26
|
+
} catch {
|
|
27
|
+
N("app.navigation.cacheFailed");
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (typeof r != "string" || !r) {
|
|
31
|
+
N("app.navigation.cacheInvalid");
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
let i = h.value.find((e) => e.id === n);
|
|
35
|
+
i || (i = {
|
|
36
|
+
id: n,
|
|
37
|
+
routeId: t.id,
|
|
38
|
+
fullPath: e.fullPath,
|
|
39
|
+
title: t.title,
|
|
40
|
+
cacheKey: JSON.stringify([t.id, r]),
|
|
41
|
+
cache: t.cache !== !1,
|
|
42
|
+
pinned: !!t.pinned,
|
|
43
|
+
epoch: 0
|
|
44
|
+
}, h.value.push(i)), y.value = n, i.cache && (b.value = [...b.value.filter((e) => e !== i.cacheKey), i.cacheKey].slice(-A));
|
|
45
|
+
}
|
|
46
|
+
let I = p.beforeEach(async (e, t) => {
|
|
47
|
+
if (T || e.fullPath === t.fullPath) return !0;
|
|
48
|
+
let n = M(e);
|
|
49
|
+
if (n) try {
|
|
50
|
+
let t = u.cacheKey ? u.cacheKey(e, n) : e.fullPath;
|
|
51
|
+
if (typeof t != "string" || !t) return N("app.navigation.cacheInvalid");
|
|
52
|
+
} catch {
|
|
53
|
+
return N("app.navigation.cacheFailed");
|
|
54
|
+
}
|
|
55
|
+
let r = ++C, i = await P("navigate");
|
|
56
|
+
return !T && r === C && i;
|
|
57
|
+
}), L = p.afterEach((e, t, n) => {
|
|
58
|
+
n || F(e);
|
|
59
|
+
});
|
|
60
|
+
async function R(e, t = !1) {
|
|
61
|
+
if (T) return !1;
|
|
62
|
+
g.value = "";
|
|
63
|
+
try {
|
|
64
|
+
let n = p.resolve(e);
|
|
65
|
+
if (!n.matched.length) return N("app.navigation.unmatched");
|
|
66
|
+
let r = await (t ? p.replace(e) : p.push(e));
|
|
67
|
+
return l(r) ? l(r, s.duplicated) && p.currentRoute.value.fullPath === n.fullPath : !T;
|
|
68
|
+
} catch {
|
|
69
|
+
return N("app.navigation.failed");
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function z(e) {
|
|
73
|
+
if (!Array.isArray(e)) throw Error("菜单必须为数组");
|
|
74
|
+
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = e.map((e) => {
|
|
75
|
+
if (!e || typeof e.id != "string" || !e.id.trim() || t.has(e.id)) throw Error("非法或重复菜单 id");
|
|
76
|
+
if (typeof e.path != "string" || !e.path.startsWith("/") || n.has(f(e.path))) throw Error("非法或冲突路径");
|
|
77
|
+
if (typeof e.title != "string" || !e.title.trim()) throw Error("缺少菜单标题");
|
|
78
|
+
if (!Object.hasOwn(u.components, e.resource)) throw Error("未知页面资源");
|
|
79
|
+
if (p.hasRoute(j(e.id)) && !k.some((t) => t.name === j(e.id))) throw Error("命名路由与宿主冲突");
|
|
80
|
+
if (p.getRoutes().some((t) => f(t.path) === f(e.path) && !k.some((e) => e.name === t.name))) throw Error("路径与宿主冲突");
|
|
81
|
+
return t.add(e.id), n.add(f(e.path)), Object.freeze({ ...e });
|
|
82
|
+
});
|
|
83
|
+
for (let e of r) {
|
|
84
|
+
let t = new Set([e.id]), n = e.parentId;
|
|
85
|
+
for (; n;) {
|
|
86
|
+
if (t.has(n)) throw Error("菜单父子循环");
|
|
87
|
+
t.add(n);
|
|
88
|
+
let e = r.find((e) => e.id === n);
|
|
89
|
+
if (!e) throw Error("菜单父级不存在");
|
|
90
|
+
n = e.parentId;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return r;
|
|
94
|
+
}
|
|
95
|
+
async function B(e = E) {
|
|
96
|
+
if (T) return !1;
|
|
97
|
+
let t = ++S;
|
|
98
|
+
D?.abort(), D = new AbortController(), E = e, _.value = !0, g.value = "";
|
|
99
|
+
try {
|
|
100
|
+
let e = z(await u.load({
|
|
101
|
+
signal: D.signal,
|
|
102
|
+
scope: E
|
|
103
|
+
}));
|
|
104
|
+
if (T || t !== S) return !1;
|
|
105
|
+
let r = e.map((e) => ({
|
|
106
|
+
path: e.path,
|
|
107
|
+
name: j(e.id),
|
|
108
|
+
component: n(u.components[e.resource]),
|
|
109
|
+
props: !0,
|
|
110
|
+
meta: {
|
|
111
|
+
navigationId: e.id,
|
|
112
|
+
iframe: e.iframe
|
|
113
|
+
}
|
|
114
|
+
}));
|
|
115
|
+
c(r, p.options);
|
|
116
|
+
let i = M(p.currentRoute.value), a = i && !e.some((e) => e.id === i.id && e.path === i.path && e.resource === i.resource);
|
|
117
|
+
if (a && !await P("update") || T || t !== S || a && !await R(u.fallback, !0) || T || t !== S) return !1;
|
|
118
|
+
O.forEach((e) => e());
|
|
119
|
+
let o = [];
|
|
120
|
+
try {
|
|
121
|
+
for (let e of r) o.push(p.addRoute(e));
|
|
122
|
+
} catch (e) {
|
|
123
|
+
throw o.forEach((e) => e()), O = k.map((e) => p.addRoute(e)), e;
|
|
124
|
+
}
|
|
125
|
+
O = o, k = r, w++;
|
|
126
|
+
let s = new Set(m.value.filter((t) => !e.some((e) => e.id === t.id && e.path === t.path && e.resource === t.resource)).map((e) => e.id));
|
|
127
|
+
h.value = h.value.filter((e) => !s.has(e.routeId)), m.value = e;
|
|
128
|
+
for (let t of h.value) {
|
|
129
|
+
let n = e.find((e) => e.id === t.routeId);
|
|
130
|
+
t.title = n.title, t.pinned = !!n.pinned, t.cache = n.cache !== !1;
|
|
131
|
+
}
|
|
132
|
+
return V(), v.value++, await R(p.currentRoute.value.fullPath, !0), F(p.currentRoute.value), !0;
|
|
133
|
+
} catch {
|
|
134
|
+
return !T && t === S && N("app.navigation.menuFailed"), !1;
|
|
135
|
+
} finally {
|
|
136
|
+
!T && t === S && (_.value = !1);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function V() {
|
|
140
|
+
b.value = b.value.filter((e) => h.value.some((t) => t.cache && t.cacheKey === e));
|
|
141
|
+
}
|
|
142
|
+
async function H(e) {
|
|
143
|
+
if (T) return !1;
|
|
144
|
+
let t = h.value.filter((t) => e.includes(t.id) && !t.pinned);
|
|
145
|
+
if (!t.length) return !0;
|
|
146
|
+
let n = ++w;
|
|
147
|
+
return !await P("close") || T || n !== w || t.some((e) => e.id === y.value) && !await R(h.value.find((e) => !t.some((t) => t.id === e.id))?.fullPath ?? u.fallback) || T || n !== w ? !1 : (h.value = h.value.filter((e) => !t.some((t) => t.id === e.id)), V(), !0);
|
|
148
|
+
}
|
|
149
|
+
async function U(e = y.value) {
|
|
150
|
+
let t = ++w;
|
|
151
|
+
if (!await P("refresh") || T || t !== w) return !1;
|
|
152
|
+
let n = h.value.find((t) => t.id === e);
|
|
153
|
+
if (!n) return !1;
|
|
154
|
+
for (let e of h.value) e.cacheKey === n.cacheKey && e.epoch++;
|
|
155
|
+
return !0;
|
|
156
|
+
}
|
|
157
|
+
function W(e, t) {
|
|
158
|
+
if (T) return;
|
|
159
|
+
let n = h.value.findIndex((t) => t.id === e && !t.pinned), r = h.value.findIndex((e) => e.id === t && !e.pinned);
|
|
160
|
+
if (n < 0 || r < 0 || n === r) return;
|
|
161
|
+
let [i] = h.value.splice(n, 1);
|
|
162
|
+
h.value.splice(r, 0, i);
|
|
163
|
+
}
|
|
164
|
+
let G = t(() => {
|
|
165
|
+
let e = /* @__PURE__ */ new Map();
|
|
166
|
+
for (let t of h.value) (t.cache && b.value.includes(t.cacheKey) || t.id === y.value) && e.set(t.cacheKey, t);
|
|
167
|
+
let t = h.value.find((e) => e.id === y.value);
|
|
168
|
+
return t && e.set(t.cacheKey, t), [...e.values()];
|
|
169
|
+
});
|
|
170
|
+
function K() {
|
|
171
|
+
T || (T = !0, S++, C++, w++, D?.abort(), I(), L(), O.forEach((e) => e()), h.value = [], m.value = [], b.value = [], _.value = !1);
|
|
172
|
+
}
|
|
173
|
+
return {
|
|
174
|
+
menu: a(m),
|
|
175
|
+
tabs: r(h),
|
|
176
|
+
pages: G,
|
|
177
|
+
active: r(y),
|
|
178
|
+
error: t(() => g.value ? e(u.i18n, g.value) : ""),
|
|
179
|
+
errorDiagnostic: t(() => g.value ? e(void 0, g.value) : ""),
|
|
180
|
+
errorCode: r(g),
|
|
181
|
+
loading: r(_),
|
|
182
|
+
revision: r(v),
|
|
183
|
+
router: p,
|
|
184
|
+
visibleMenu: t(() => m.value.filter((e) => !e.hidden && (u.visible?.(e) ?? !0))),
|
|
185
|
+
navigate: R,
|
|
186
|
+
reload: B,
|
|
187
|
+
close: H,
|
|
188
|
+
refresh: U,
|
|
189
|
+
move: W,
|
|
190
|
+
dispose: K,
|
|
191
|
+
closeOthers: () => H(h.value.filter((e) => e.id !== y.value).map((e) => e.id)),
|
|
192
|
+
closeAll: () => H(h.value.map((e) => e.id)),
|
|
193
|
+
component: (e) => u.components[m.value.find((t) => t.id === e)?.resource ?? ""],
|
|
194
|
+
location: (e) => ({ name: j(e) })
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
var d = 0;
|
|
198
|
+
function f(e) {
|
|
199
|
+
return e.replace(/:[A-Za-z0-9_]+/g, ":param").replace(/\/+$/, "").toLowerCase();
|
|
200
|
+
}
|
|
201
|
+
//#endregion
|
|
202
|
+
export { u as t };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './use-rect/index.js';
|
|
2
|
+
export * from './use-toggle/index.js';
|
|
3
|
+
export * from './use-relation/index.js';
|
|
4
|
+
export * from './use-count-down/index.js';
|
|
5
|
+
export * from './use-click-away/index.js';
|
|
6
|
+
export * from './use-window-size/index.js';
|
|
7
|
+
export * from './use-scroll-parent/index.js';
|
|
8
|
+
export * from './use-event-listener/index.js';
|
|
9
|
+
export * from './use-page-visibility/index.js';
|
|
10
|
+
export * from './use-custom-field-value/index.js';
|
|
11
|
+
export * from './use-raf/index.js';
|
|
12
|
+
export * from './on-mounted-or-activated/index.js';
|
|
13
|
+
export * from './raf/index.js';
|
|
14
|
+
export * from './environment/index.js';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { t as e } from "../../chunk-DmhlhrBa.js";
|
|
2
|
+
import { useRect as t } from "./use-rect/index.js";
|
|
3
|
+
import { useToggle as n } from "./use-toggle/index.js";
|
|
4
|
+
import { useChildren as r, useParent as i } from "./use-relation/index.js";
|
|
5
|
+
import { useCountDown as a } from "./use-count-down/index.js";
|
|
6
|
+
import { useClickAway as o } from "./use-click-away/index.js";
|
|
7
|
+
import { useWindowSize as s } from "./use-window-size/index.js";
|
|
8
|
+
import { getScrollParent as c, useScrollParent as l } from "./use-scroll-parent/index.js";
|
|
9
|
+
import { useEventListener as u } from "./use-event-listener/index.js";
|
|
10
|
+
import { usePageVisibility as d } from "./use-page-visibility/index.js";
|
|
11
|
+
import { n as f, r as p, t as m } from "../../use-custom-field-value-DgA3wo05.js";
|
|
12
|
+
import { useRaf as h } from "./use-raf/index.js";
|
|
13
|
+
import { onMountedOrActivated as g } from "./on-mounted-or-activated/index.js";
|
|
14
|
+
import { cancelRaf as _, doubleRaf as v, raf as y } from "./raf/index.js";
|
|
15
|
+
import { inBrowser as b } from "./environment/index.js";
|
|
16
|
+
//#region src/application/composables/index.ts
|
|
17
|
+
var x = /* @__PURE__ */ e({
|
|
18
|
+
AsamCustomField: () => p,
|
|
19
|
+
CUSTOM_FIELD_INJECTION_KEY: () => m,
|
|
20
|
+
cancelRaf: () => _,
|
|
21
|
+
doubleRaf: () => v,
|
|
22
|
+
getScrollParent: () => c,
|
|
23
|
+
inBrowser: () => b,
|
|
24
|
+
onMountedOrActivated: () => g,
|
|
25
|
+
raf: () => y,
|
|
26
|
+
useChildren: () => r,
|
|
27
|
+
useClickAway: () => o,
|
|
28
|
+
useCountDown: () => a,
|
|
29
|
+
useCustomFieldValue: () => f,
|
|
30
|
+
useEventListener: () => u,
|
|
31
|
+
usePageVisibility: () => d,
|
|
32
|
+
useParent: () => i,
|
|
33
|
+
useRaf: () => h,
|
|
34
|
+
useRect: () => t,
|
|
35
|
+
useScrollParent: () => l,
|
|
36
|
+
useToggle: () => n,
|
|
37
|
+
useWindowSize: () => s
|
|
38
|
+
});
|
|
39
|
+
//#endregion
|
|
40
|
+
export { p as AsamCustomField, m as CUSTOM_FIELD_INJECTION_KEY, _ as cancelRaf, v as doubleRaf, c as getScrollParent, b as inBrowser, g as onMountedOrActivated, y as raf, x as t, r as useChildren, o as useClickAway, a as useCountDown, f as useCustomFieldValue, u as useEventListener, d as usePageVisibility, i as useParent, h as useRaf, t as useRect, l as useScrollParent, n as useToggle, s as useWindowSize };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { AsamControlSize } from '@asam-ui/ui';
|
|
3
|
+
import type { AsamCustomFieldSlots } from './Types.js';
|
|
4
|
+
type __VLS_Slots = AsamCustomFieldSlots;
|
|
5
|
+
declare function clearValidate(): void;
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: PropType<unknown>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
help: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: undefined;
|
|
14
|
+
};
|
|
15
|
+
size: {
|
|
16
|
+
type: PropType<AsamControlSize>;
|
|
17
|
+
default: undefined;
|
|
18
|
+
};
|
|
19
|
+
label: StringConstructor;
|
|
20
|
+
labelWidth: {
|
|
21
|
+
readonly type: PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
22
|
+
readonly required: false;
|
|
23
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
24
|
+
__epPropKey: true;
|
|
25
|
+
};
|
|
26
|
+
labelPosition: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<StringConstructor, "" | "left" | "right" | "top", unknown, "", boolean>;
|
|
27
|
+
prop: {
|
|
28
|
+
readonly type: PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | (((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp)) | null)[], unknown, unknown>>;
|
|
29
|
+
readonly required: false;
|
|
30
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
31
|
+
__epPropKey: true;
|
|
32
|
+
};
|
|
33
|
+
required: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
34
|
+
rules: {
|
|
35
|
+
readonly type: PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>) | (((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>)) | null)[], unknown, unknown>>;
|
|
36
|
+
readonly required: false;
|
|
37
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
38
|
+
__epPropKey: true;
|
|
39
|
+
};
|
|
40
|
+
error: StringConstructor;
|
|
41
|
+
validateStatus: {
|
|
42
|
+
readonly type: PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
|
|
43
|
+
readonly required: false;
|
|
44
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
45
|
+
__epPropKey: true;
|
|
46
|
+
};
|
|
47
|
+
for: StringConstructor;
|
|
48
|
+
inlineMessage: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
49
|
+
showMessage: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
50
|
+
}>, {
|
|
51
|
+
getValue: () => unknown;
|
|
52
|
+
validate: (trigger?: string | undefined) => Promise<boolean>;
|
|
53
|
+
clearValidate: typeof clearValidate;
|
|
54
|
+
resetField: () => void;
|
|
55
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
56
|
+
"update:modelValue": (value: unknown) => any;
|
|
57
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
58
|
+
modelValue: {
|
|
59
|
+
type: PropType<unknown>;
|
|
60
|
+
required: true;
|
|
61
|
+
};
|
|
62
|
+
help: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: undefined;
|
|
65
|
+
};
|
|
66
|
+
size: {
|
|
67
|
+
type: PropType<AsamControlSize>;
|
|
68
|
+
default: undefined;
|
|
69
|
+
};
|
|
70
|
+
label: StringConstructor;
|
|
71
|
+
labelWidth: {
|
|
72
|
+
readonly type: PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
73
|
+
readonly required: false;
|
|
74
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
75
|
+
__epPropKey: true;
|
|
76
|
+
};
|
|
77
|
+
labelPosition: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<StringConstructor, "" | "left" | "right" | "top", unknown, "", boolean>;
|
|
78
|
+
prop: {
|
|
79
|
+
readonly type: PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | (((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp)) | null)[], unknown, unknown>>;
|
|
80
|
+
readonly required: false;
|
|
81
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
82
|
+
__epPropKey: true;
|
|
83
|
+
};
|
|
84
|
+
required: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
85
|
+
rules: {
|
|
86
|
+
readonly type: PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>) | (((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>)) | null)[], unknown, unknown>>;
|
|
87
|
+
readonly required: false;
|
|
88
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
89
|
+
__epPropKey: true;
|
|
90
|
+
};
|
|
91
|
+
error: StringConstructor;
|
|
92
|
+
validateStatus: {
|
|
93
|
+
readonly type: PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
|
|
94
|
+
readonly required: false;
|
|
95
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
96
|
+
__epPropKey: true;
|
|
97
|
+
};
|
|
98
|
+
for: StringConstructor;
|
|
99
|
+
inlineMessage: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
100
|
+
showMessage: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
101
|
+
}>> & Readonly<{
|
|
102
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
103
|
+
}>, {
|
|
104
|
+
size: AsamControlSize;
|
|
105
|
+
required: import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
106
|
+
labelPosition: import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<StringConstructor, "" | "left" | "right" | "top", unknown>;
|
|
107
|
+
inlineMessage: import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
108
|
+
showMessage: import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
109
|
+
help: string;
|
|
110
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
111
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
112
|
+
declare const _default: typeof __VLS_export;
|
|
113
|
+
export default _default;
|
|
114
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
115
|
+
new (): {
|
|
116
|
+
$slots: S;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { VNode } from 'vue';
|
|
2
|
+
import type { AsamFormItemExpose, AsamFormItemProps } from '@asam-ui/ui';
|
|
3
|
+
/** prop、rules、label 等 FormItem 参数透传给 ASAM 公开组件。 */
|
|
4
|
+
export interface AsamCustomFieldProps extends AsamFormItemProps {
|
|
5
|
+
modelValue: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface AsamCustomFieldSlots {
|
|
8
|
+
/** 内部 ASAM/EP 控件应设 validate-event=false,由本桥接统一触发校验。 */
|
|
9
|
+
default?: (scope: {
|
|
10
|
+
value: unknown;
|
|
11
|
+
update: (value: unknown) => void;
|
|
12
|
+
blur: () => void;
|
|
13
|
+
}) => VNode[];
|
|
14
|
+
label?: (scope: {
|
|
15
|
+
label: string;
|
|
16
|
+
}) => VNode[];
|
|
17
|
+
error?: (scope: {
|
|
18
|
+
error: string;
|
|
19
|
+
}) => VNode[];
|
|
20
|
+
help?: () => VNode[];
|
|
21
|
+
}
|
|
22
|
+
export interface AsamCustomFieldExpose {
|
|
23
|
+
getValue(): unknown;
|
|
24
|
+
validate(trigger?: string): ReturnType<AsamFormItemExpose['validate']>;
|
|
25
|
+
clearValidate(): void;
|
|
26
|
+
resetField(): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { CUSTOM_FIELD_INJECTION_KEY } from '@vant/use';
|
|
2
|
+
/** 复用上游登记与观察,只补充登记者作用域结束时的所有权释放。 */
|
|
3
|
+
export declare function useCustomFieldValue(customValue: () => unknown): void;
|
|
4
|
+
export type { CustomFieldInjectionValue } from '@vant/use';
|
|
5
|
+
export { default as AsamCustomField } from './AsamCustomField.vue';
|
|
6
|
+
export type * from './Types.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { UseEventListenerOptions } from '@vant/use';
|
|
2
|
+
/** 非浏览器环境补齐已声明的停止函数,不改变上游事件监听算法。 */
|
|
3
|
+
export declare function useEventListener<K extends keyof DocumentEventMap>(type: K, listener: (event: DocumentEventMap[K]) => void, options?: UseEventListenerOptions): () => void;
|
|
4
|
+
export declare function useEventListener(type: string, listener: EventListener, options?: UseEventListenerOptions): () => void;
|
|
5
|
+
export type { UseEventListenerOptions } from '@vant/use';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentPublicInstance, InjectionKey } from 'vue';
|
|
2
|
+
export { useParent } from '@vant/use';
|
|
3
|
+
/**
|
|
4
|
+
* 上游只在子项首次关联时排序。复用其公开排序实现,在父组件更新后同步既有实例的索引。
|
|
5
|
+
* 这是 Vue 实例关联能力的版本适配,不对外导出 sortChildren/flattenVNodes。
|
|
6
|
+
*/
|
|
7
|
+
export declare function useChildren<Child extends ComponentPublicInstance = ComponentPublicInstance, ProvideValue = never>(key: InjectionKey<ProvideValue>): {
|
|
8
|
+
children: Child[];
|
|
9
|
+
linkChildren: (value?: ProvideValue | undefined) => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getCurrentInstance as e, onUpdated as t } from "vue";
|
|
2
|
+
import { sortChildren as n, useChildren as r, useParent as i } from "@vant/use";
|
|
3
|
+
//#region src/application/composables/use-relation/index.ts
|
|
4
|
+
function a(i) {
|
|
5
|
+
let a = e(), o = r(i);
|
|
6
|
+
return t(() => {
|
|
7
|
+
if (!a) return;
|
|
8
|
+
let e = Reflect.get(a, "provides");
|
|
9
|
+
if (!e || typeof e != "object") return;
|
|
10
|
+
let t = Reflect.get(e, i);
|
|
11
|
+
if (!t || typeof t != "object") return;
|
|
12
|
+
let r = Reflect.get(t, "internalChildren");
|
|
13
|
+
Reflect.get(t, "children") === o.children && Array.isArray(r) && n(a, o.children, r);
|
|
14
|
+
}), o;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { a as useChildren, i as useParent };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { t as e } from "../chunk-DmhlhrBa.js";
|
|
2
|
+
import { t } from "../navigation-BVLFymx7.js";
|
|
3
|
+
import { t as n } from "../security-B_pdVCWk.js";
|
|
4
|
+
import { t as r } from "../preferences-DgHizA2w.js";
|
|
5
|
+
import { t as i } from "../transport-Cky1a5c-.js";
|
|
6
|
+
import { t as a } from "./composables/index.js";
|
|
7
|
+
//#region src/application/index.ts
|
|
8
|
+
var o = /* @__PURE__ */ e({
|
|
9
|
+
composables: () => a,
|
|
10
|
+
navigation: () => t,
|
|
11
|
+
preferences: () => r,
|
|
12
|
+
security: () => n,
|
|
13
|
+
transport: () => i
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { a as composables, t as navigation, r as preferences, n as security, o as t, i as transport };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { EmbedPolicy } from './Types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
src: string;
|
|
4
|
+
policy: EmbedPolicy;
|
|
5
|
+
title?: string;
|
|
6
|
+
};
|
|
7
|
+
declare function open(input: string): void;
|
|
8
|
+
declare function toggleFullscreen(): Promise<void>;
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
10
|
+
open: typeof open;
|
|
11
|
+
toggleFullscreen: typeof toggleFullscreen;
|
|
12
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
+
status: (status: string) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
onStatus?: ((status: string) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|