@done-coding/admin-core 0.10.0 → 0.11.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.
Files changed (46) hide show
  1. package/es/bridge/config-hook.mjs +32 -26
  2. package/es/bridge/index.mjs +129 -83
  3. package/es/bridge/theme/index.mjs +103 -0
  4. package/es/bridge/theme/persist.mjs +14 -0
  5. package/es/bridge/theme/system-dark.mjs +11 -0
  6. package/es/components/app-layout/AppAside.vue.mjs +7 -0
  7. package/es/components/app-layout/AppAside.vue2.mjs +22 -0
  8. package/es/components/app-layout/AppFooter.vue.mjs +2 -2
  9. package/es/components/app-layout/AppHeader.vue.mjs +2 -2
  10. package/es/components/app-layout/AppHeader.vue2.mjs +35 -41
  11. package/es/components/app-layout/AppLayout.vue.mjs +2 -2
  12. package/es/components/app-layout/AppLayout.vue2.mjs +106 -88
  13. package/es/components/app-layout/AppShell.vue.mjs +60 -0
  14. package/es/components/app-layout/AppShell.vue2.mjs +4 -0
  15. package/es/components/app-layout/AppSidebar.vue.mjs +2 -2
  16. package/es/components/app-layout/AppSidebar.vue2.mjs +44 -47
  17. package/es/components/app-layout/AppTheme.vue.mjs +2 -2
  18. package/es/components/app-layout/AppTheme.vue2.mjs +55 -25
  19. package/es/components/app-layout/viewport.mjs +5 -0
  20. package/es/components/form/FormItemNestForm.vue.mjs +1 -1
  21. package/es/components/form/FormItemNestFormList.vue.mjs +1 -1
  22. package/es/components/form/FormSearch.vue.mjs +2 -2
  23. package/es/components/form/FormSearch.vue2.mjs +1 -1
  24. package/es/hooks/use-admin-theme-apply.mjs +16 -15
  25. package/es/hooks/use-admin-viewport-apply.mjs +29 -17
  26. package/es/index.mjs +182 -175
  27. package/es/store/app.mjs +133 -77
  28. package/es/style.css +1 -1
  29. package/package.json +2 -2
  30. package/types/bridge/config-hook.d.ts +10 -2
  31. package/types/bridge/index.d.ts +105 -5
  32. package/types/bridge/theme/index.d.ts +10 -0
  33. package/types/bridge/theme/persist.d.ts +23 -0
  34. package/types/bridge/theme/system-dark.d.ts +14 -0
  35. package/types/bridge/theme/types.d.ts +258 -0
  36. package/types/components/app-layout/AppAside.vue.d.ts +21 -0
  37. package/types/components/app-layout/AppLayout.vue.d.ts +2 -7
  38. package/types/components/app-layout/AppShell.vue.d.ts +27 -0
  39. package/types/components/app-layout/index.d.ts +4 -1
  40. package/types/components/app-layout/types.d.ts +117 -1
  41. package/types/components/app-layout/viewport.d.ts +30 -0
  42. package/types/hooks/use-admin-viewport-apply.d.ts +6 -1
  43. package/types/store/app.d.ts +24 -83
  44. package/types/types/route.d.ts +2 -0
  45. package/es/bridge/theme.mjs +0 -65
  46. package/types/bridge/theme.d.ts +0 -85
package/es/index.mjs CHANGED
@@ -1,197 +1,204 @@
1
- import { createAdminBridge as t } from "./bridge/index.mjs";
1
+ import { createAdminBridge as r } from "./bridge/index.mjs";
2
2
  import { default as a } from "./components/display/ActionBtn.vue.mjs";
3
3
  import { default as f } from "./components/display/ActionBtnGroup.vue.mjs";
4
4
  import { default as s } from "./components/display/BooleanTag.vue.mjs";
5
5
  import { default as l } from "./components/modal/DetailModal.vue.mjs";
6
6
  import { default as d } from "./components/form/FormRadioGroup.vue.mjs";
7
7
  import { default as n } from "./components/form/FormSelect.vue.mjs";
8
- import { default as _ } from "./components/form/FormSubmitBtn.vue.mjs";
9
- import { default as E } from "./components/form/FormTree.vue.mjs";
8
+ import { default as A } from "./components/form/FormSubmitBtn.vue.mjs";
9
+ import { default as c } from "./components/form/FormTree.vue.mjs";
10
10
  import { default as T } from "./components/form/FormVerifyCode.vue.mjs";
11
- import { default as F } from "./components/display/HeightProvider.vue.mjs";
12
- import { default as L } from "./components/menu/MenuItemSub.vue.mjs";
13
- import { default as R } from "./components/menu/MenuTree.vue.mjs";
14
- import { default as O } from "./components/modal/ModalPorter.vue.mjs";
15
- import { default as N } from "./components/modal/ModalShelf.vue.mjs";
11
+ import { default as P } from "./components/display/HeightProvider.vue.mjs";
12
+ import { default as F } from "./components/menu/MenuItemSub.vue.mjs";
13
+ import { default as M } from "./components/menu/MenuTree.vue.mjs";
14
+ import { default as g } from "./components/modal/ModalPorter.vue.mjs";
15
+ import { default as C } from "./components/modal/ModalShelf.vue.mjs";
16
16
  import { default as D } from "./components/panel/PanelItem.vue.mjs";
17
- import { default as Y } from "./components/panel/PanelItemNestPanel.vue.mjs";
18
- import { default as G } from "./components/misc/SelectModule.vue.mjs";
19
- import { default as b } from "./components/display/TabsMain.vue.mjs";
17
+ import { default as B } from "./components/panel/PanelItemNestPanel.vue.mjs";
18
+ import { default as Y } from "./components/misc/SelectModule.vue.mjs";
19
+ import { default as U } from "./components/display/TabsMain.vue.mjs";
20
20
  import { default as K } from "./components/misc/TriggerAutoImport.vue.mjs";
21
21
  import { default as w } from "./components/display/WatchSize.vue.mjs";
22
- import { ADMIN_BRIDGE_KEY as k, APP_LAYOUT_APP_STORE_KEY as W, APP_LAYOUT_BRIDGE_KEY as z, APP_LAYOUT_USER_STORE_KEY as X, BODY_CONTENT_VIEWPORT_HEIGHT as j, FORM_NEST_REGISTRY_KEY as Q, NEST_LAYOUT_SCALE_KEY as q, TABS_MAIN_VISUAL_LEVEL as J, getModalShelfInjectionKey as Z } from "./inject/key.mjs";
23
- import { APP_API_LIST_MODEL_KEY_CONFIG as ee } from "./config/list-model.mjs";
24
- import { default as te } from "./components/display/ActionConfirm.vue.mjs";
25
- import { default as ae } from "./components/app-layout/AppBody.vue.mjs";
26
- import { default as fe } from "./components/app-layout/AppBreadcrumb.vue.mjs";
27
- import { default as se } from "./components/app-layout/AppFooter.vue.mjs";
28
- import { default as le } from "./components/app-layout/AppHeader.vue.mjs";
29
- import { default as de } from "./components/app-layout/AppLayout.vue.mjs";
30
- import { default as ne } from "./components/app-layout/AppPage.vue.mjs";
31
- import { default as _e } from "./components/app-layout/AppSidebar.vue.mjs";
32
- import { default as Ee } from "./components/misc/AutoRefresh.vue.mjs";
33
- import { default as Te } from "./components/misc/AutoRefreshGroup.vue.mjs";
34
- import { default as Fe } from "./components/modal/ConfirmModal.vue.mjs";
35
- import { EXPORT_MAX_LIMIT as Le, OPERATE_COLUMN_PROP as Me, exportCSV as Re, pickExportColumns as ge } from "./utils/export.mjs";
36
- import { FORM_CONFIG_SELECT_ALL_VALUE as he, getConfirmPasswordRule as Ne, passwordRule as Ce, setFormComponentType as De } from "./helpers/form.mjs";
37
- import { FORM_ITEM_CHANGE_LOADING as Ye, NEST_LAYOUT_TIERS as Be, ceilToTier as Ge, generateFormData as Ue, getBlurSubmit as be, getChangeSubmit as Ve, getDatePickerShortcuts as Ke, getEnterSubmit as ve, getPlaceholder as we, getVModelSugar as He, parseFormData as ke, resolveFormLayout as We, resolveLayoutSpan as ze, setInputComponent as Xe, setSelectComponent as je, stringifyFormData as Qe, swiftFormItemConfig as qe } from "./components/form/utils.mjs";
38
- import { default as Ze } from "./components/form/FormItemNestForm.vue.mjs";
39
- import { default as eo } from "./components/form/FormItemNestFormList.vue.mjs";
40
- import { default as to } from "./components/form/FormMain.vue.mjs";
41
- import { default as ao } from "./components/form/FormSearch.vue.mjs";
42
- import { default as fo } from "./components/form/FormSubmitPanel.vue.mjs";
43
- import { default as so } from "./components/form/FormVerifyImage.vue.mjs";
44
- import { default as lo } from "./components/list-page/ListPage.vue.mjs";
45
- import { default as io } from "./components/panel/PanelEditSwitch.vue.mjs";
46
- import { default as Ao } from "./components/panel/PanelItemNestForm.vue.mjs";
47
- import { default as co } from "./components/panel/PanelMain.vue.mjs";
48
- import { ROUTE_MODULE_LEVEL as So, TabsMainReplaceQueryKey as To } from "./config/route.mjs";
49
- import { default as Fo } from "./components/table/TableMain.vue.mjs";
50
- import { checkLogin as Lo } from "./router/guard/login.mjs";
51
- import { checkPermission as Ro } from "./router/guard/permission.mjs";
52
- import { countAll as Oo, createListApi as ho, fetchListAll as No } from "./helpers/list-helper.mjs";
53
- import { createAppStore as Do } from "./store/app.mjs";
54
- import { createGenerateRouteMetaRawTree as Yo } from "./bridge/route.mjs";
55
- import { createGuard as Go } from "./router/guard/index.mjs";
56
- import { createNestFormExposeMap as bo } from "./components/form/nest-registry.mjs";
57
- import { createRoutePermissionStore as Ko } from "./store/router-permission.mjs";
58
- import { createStorageWithNamespace as wo } from "./bridge/storage.mjs";
59
- import { createUseState as ko } from "./bridge/state.mjs";
60
- import { createUserStore as zo } from "./store/user.mjs";
61
- import { flatRouteMetaResolveRaw as jo, getRoutePermissionKey as Qo } from "./utils/router.mjs";
62
- import { getId as Jo } from "./utils/id.mjs";
63
- import { nestFormItem as $o } from "./components/form/nest-form-item.mjs";
64
- import { nestFormItemList as ot } from "./components/form/nest-form-item-list.mjs";
65
- import { nestPanelForm as rt } from "./components/panel/nest-panel-form.mjs";
66
- import { nestPanelItem as mt } from "./components/panel/nest-panel-item.mjs";
67
- import { themeScaleDerive as pt, themeScaleMix as st } from "./utils/theme-scale.mjs";
68
- import { timeCountDown as lt } from "./utils/time.mjs";
69
- import { useActivated as dt, useActivatedEvent as it, useActivatedExec as nt } from "./hooks/activated.mjs";
70
- import { useAdminThemeApply as _t } from "./hooks/use-admin-theme-apply.mjs";
71
- import { useAdminViewportApply as Et } from "./hooks/use-admin-viewport-apply.mjs";
72
- import { useBreakpoint as Tt } from "./hooks/use-breakpoint.mjs";
73
- import { useChannelViewportHeight as Ft } from "./hooks/use-channel-viewport-height.mjs";
74
- import { useFeelSize as Lt } from "./hooks/feel-size.mjs";
75
- import { useMenusDataDispatch as Rt } from "./hooks/menus-dispatch.mjs";
76
- import { useNestForm as Ot } from "./components/form/use-nest-form.mjs";
77
- import { useNestFormList as Nt } from "./components/form/use-nest-form-list.mjs";
78
- import { useNestLayoutScale as Dt } from "./components/form/use-nest-layout-scale.mjs";
79
- import { useTimeout as Yt } from "./hooks/timeout.mjs";
22
+ import { ADMIN_BRIDGE_KEY as W, APP_LAYOUT_APP_STORE_KEY as k, APP_LAYOUT_BRIDGE_KEY as X, APP_LAYOUT_USER_STORE_KEY as z, BODY_CONTENT_VIEWPORT_HEIGHT as Z, FORM_NEST_REGISTRY_KEY as j, NEST_LAYOUT_SCALE_KEY as Q, TABS_MAIN_VISUAL_LEVEL as q, getModalShelfInjectionKey as J } from "./inject/key.mjs";
23
+ import { ADMIN_CORE_VIEWPORT_DECOR_ZINDEX_ABOVE as ee, ADMIN_CORE_VIEWPORT_DECOR_ZINDEX_BELOW as oe } from "./components/app-layout/viewport.mjs";
24
+ import { APP_API_LIST_MODEL_KEY_CONFIG as te } from "./config/list-model.mjs";
25
+ import { default as me } from "./components/display/ActionConfirm.vue.mjs";
26
+ import { default as pe } from "./components/app-layout/AppAside.vue.mjs";
27
+ import { default as ue } from "./components/app-layout/AppBody.vue.mjs";
28
+ import { default as xe } from "./components/app-layout/AppBreadcrumb.vue.mjs";
29
+ import { default as ie } from "./components/app-layout/AppFooter.vue.mjs";
30
+ import { default as _e } from "./components/app-layout/AppHeader.vue.mjs";
31
+ import { default as Ee } from "./components/app-layout/AppLayout.vue.mjs";
32
+ import { default as Se } from "./components/app-layout/AppPage.vue.mjs";
33
+ import { default as Ie } from "./components/app-layout/AppSidebar.vue.mjs";
34
+ import { default as Re } from "./components/app-layout/AppTheme.vue.mjs";
35
+ import { default as Le } from "./components/misc/AutoRefresh.vue.mjs";
36
+ import { default as Oe } from "./components/misc/AutoRefreshGroup.vue.mjs";
37
+ import { default as Ne } from "./components/modal/ConfirmModal.vue.mjs";
38
+ import { EXPORT_MAX_LIMIT as he, OPERATE_COLUMN_PROP as De, exportCSV as ye, pickExportColumns as Be } from "./utils/export.mjs";
39
+ import { FORM_CONFIG_SELECT_ALL_VALUE as Ye, getConfirmPasswordRule as Ge, passwordRule as Ue, setFormComponentType as be } from "./helpers/form.mjs";
40
+ import { FORM_ITEM_CHANGE_LOADING as ve, NEST_LAYOUT_TIERS as we, ceilToTier as He, generateFormData as We, getBlurSubmit as ke, getChangeSubmit as Xe, getDatePickerShortcuts as ze, getEnterSubmit as Ze, getPlaceholder as je, getVModelSugar as Qe, parseFormData as qe, resolveFormLayout as Je, resolveLayoutSpan as $e, setInputComponent as eo, setSelectComponent as oo, stringifyFormData as ro, swiftFormItemConfig as to } from "./components/form/utils.mjs";
41
+ import { default as mo } from "./components/form/FormItemNestForm.vue.mjs";
42
+ import { default as po } from "./components/form/FormItemNestFormList.vue.mjs";
43
+ import { default as uo } from "./components/form/FormMain.vue.mjs";
44
+ import { default as xo } from "./components/form/FormSearch.vue.mjs";
45
+ import { default as no } from "./components/form/FormSubmitPanel.vue.mjs";
46
+ import { default as Ao } from "./components/form/FormVerifyImage.vue.mjs";
47
+ import { default as co } from "./components/list-page/ListPage.vue.mjs";
48
+ import { default as To } from "./components/panel/PanelEditSwitch.vue.mjs";
49
+ import { default as Po } from "./components/panel/PanelItemNestForm.vue.mjs";
50
+ import { default as Fo } from "./components/panel/PanelMain.vue.mjs";
51
+ import { ROUTE_MODULE_LEVEL as Mo, TabsMainReplaceQueryKey as Oo } from "./config/route.mjs";
52
+ import { default as No } from "./components/table/TableMain.vue.mjs";
53
+ import { checkLogin as ho } from "./router/guard/login.mjs";
54
+ import { checkPermission as yo } from "./router/guard/permission.mjs";
55
+ import { countAll as Vo, createListApi as Yo, fetchListAll as Go } from "./helpers/list-helper.mjs";
56
+ import { createAppStore as bo } from "./store/app.mjs";
57
+ import { createGenerateRouteMetaRawTree as vo } from "./bridge/route.mjs";
58
+ import { createGuard as Ho } from "./router/guard/index.mjs";
59
+ import { createNestFormExposeMap as ko } from "./components/form/nest-registry.mjs";
60
+ import { createRoutePermissionStore as zo } from "./store/router-permission.mjs";
61
+ import { createStorageWithNamespace as jo } from "./bridge/storage.mjs";
62
+ import { createUseState as qo } from "./bridge/state.mjs";
63
+ import { createUserStore as $o } from "./store/user.mjs";
64
+ import { flatRouteMetaResolveRaw as or, getRoutePermissionKey as rr } from "./utils/router.mjs";
65
+ import { getId as ar } from "./utils/id.mjs";
66
+ import { nestFormItem as fr } from "./components/form/nest-form-item.mjs";
67
+ import { nestFormItemList as sr } from "./components/form/nest-form-item-list.mjs";
68
+ import { nestPanelForm as lr } from "./components/panel/nest-panel-form.mjs";
69
+ import { nestPanelItem as dr } from "./components/panel/nest-panel-item.mjs";
70
+ import { themeScaleDerive as nr, themeScaleMix as _r } from "./utils/theme-scale.mjs";
71
+ import { timeCountDown as Er } from "./utils/time.mjs";
72
+ import { useActivated as Sr, useActivatedEvent as Tr, useActivatedExec as Ir } from "./hooks/activated.mjs";
73
+ import { useAdminThemeApply as Rr } from "./hooks/use-admin-theme-apply.mjs";
74
+ import { useAdminViewportApply as Lr } from "./hooks/use-admin-viewport-apply.mjs";
75
+ import { useBreakpoint as Or } from "./hooks/use-breakpoint.mjs";
76
+ import { useChannelViewportHeight as Nr } from "./hooks/use-channel-viewport-height.mjs";
77
+ import { useFeelSize as hr } from "./hooks/feel-size.mjs";
78
+ import { useMenusDataDispatch as yr } from "./hooks/menus-dispatch.mjs";
79
+ import { useNestForm as Vr } from "./components/form/use-nest-form.mjs";
80
+ import { useNestFormList as Gr } from "./components/form/use-nest-form-list.mjs";
81
+ import { useNestLayoutScale as br } from "./components/form/use-nest-layout-scale.mjs";
82
+ import { useTimeout as vr } from "./hooks/timeout.mjs";
80
83
  export {
81
- k as ADMIN_BRIDGE_KEY,
82
- ee as APP_API_LIST_MODEL_KEY_CONFIG,
83
- W as APP_LAYOUT_APP_STORE_KEY,
84
- z as APP_LAYOUT_BRIDGE_KEY,
85
- X as APP_LAYOUT_USER_STORE_KEY,
84
+ W as ADMIN_BRIDGE_KEY,
85
+ ee as ADMIN_CORE_VIEWPORT_DECOR_ZINDEX_ABOVE,
86
+ oe as ADMIN_CORE_VIEWPORT_DECOR_ZINDEX_BELOW,
87
+ te as APP_API_LIST_MODEL_KEY_CONFIG,
88
+ k as APP_LAYOUT_APP_STORE_KEY,
89
+ X as APP_LAYOUT_BRIDGE_KEY,
90
+ z as APP_LAYOUT_USER_STORE_KEY,
86
91
  a as ActionBtn,
87
92
  f as ActionBtnGroup,
88
- te as ActionConfirm,
89
- ae as AppBody,
90
- fe as AppBreadcrumb,
91
- se as AppFooter,
92
- le as AppHeader,
93
- de as AppLayout,
94
- ne as AppPage,
95
- _e as AppSidebar,
96
- Ee as AutoRefresh,
97
- Te as AutoRefreshGroup,
98
- j as BODY_CONTENT_VIEWPORT_HEIGHT,
93
+ me as ActionConfirm,
94
+ pe as AppAside,
95
+ ue as AppBody,
96
+ xe as AppBreadcrumb,
97
+ ie as AppFooter,
98
+ _e as AppHeader,
99
+ Ee as AppLayout,
100
+ Se as AppPage,
101
+ Ie as AppSidebar,
102
+ Re as AppTheme,
103
+ Le as AutoRefresh,
104
+ Oe as AutoRefreshGroup,
105
+ Z as BODY_CONTENT_VIEWPORT_HEIGHT,
99
106
  s as BooleanTag,
100
- Fe as ConfirmModal,
107
+ Ne as ConfirmModal,
101
108
  l as DetailModal,
102
- Le as EXPORT_MAX_LIMIT,
103
- he as FORM_CONFIG_SELECT_ALL_VALUE,
104
- Ye as FORM_ITEM_CHANGE_LOADING,
105
- Q as FORM_NEST_REGISTRY_KEY,
106
- Ze as FormItemNestForm,
107
- eo as FormItemNestFormList,
108
- to as FormMain,
109
+ he as EXPORT_MAX_LIMIT,
110
+ Ye as FORM_CONFIG_SELECT_ALL_VALUE,
111
+ ve as FORM_ITEM_CHANGE_LOADING,
112
+ j as FORM_NEST_REGISTRY_KEY,
113
+ mo as FormItemNestForm,
114
+ po as FormItemNestFormList,
115
+ uo as FormMain,
109
116
  d as FormRadioGroup,
110
- ao as FormSearch,
117
+ xo as FormSearch,
111
118
  n as FormSelect,
112
- _ as FormSubmitBtn,
113
- fo as FormSubmitPanel,
114
- E as FormTree,
119
+ A as FormSubmitBtn,
120
+ no as FormSubmitPanel,
121
+ c as FormTree,
115
122
  T as FormVerifyCode,
116
- so as FormVerifyImage,
117
- F as HeightProvider,
118
- lo as ListPage,
119
- L as MenuItemSub,
120
- R as MenuTree,
121
- O as ModalPorter,
122
- N as ModalShelf,
123
- q as NEST_LAYOUT_SCALE_KEY,
124
- Be as NEST_LAYOUT_TIERS,
125
- Me as OPERATE_COLUMN_PROP,
126
- io as PanelEditSwitch,
123
+ Ao as FormVerifyImage,
124
+ P as HeightProvider,
125
+ co as ListPage,
126
+ F as MenuItemSub,
127
+ M as MenuTree,
128
+ g as ModalPorter,
129
+ C as ModalShelf,
130
+ Q as NEST_LAYOUT_SCALE_KEY,
131
+ we as NEST_LAYOUT_TIERS,
132
+ De as OPERATE_COLUMN_PROP,
133
+ To as PanelEditSwitch,
127
134
  D as PanelItem,
128
- Ao as PanelItemNestForm,
129
- Y as PanelItemNestPanel,
130
- co as PanelMain,
131
- So as ROUTE_MODULE_LEVEL,
132
- G as SelectModule,
133
- J as TABS_MAIN_VISUAL_LEVEL,
134
- Fo as TableMain,
135
- b as TabsMain,
136
- To as TabsMainReplaceQueryKey,
135
+ Po as PanelItemNestForm,
136
+ B as PanelItemNestPanel,
137
+ Fo as PanelMain,
138
+ Mo as ROUTE_MODULE_LEVEL,
139
+ Y as SelectModule,
140
+ q as TABS_MAIN_VISUAL_LEVEL,
141
+ No as TableMain,
142
+ U as TabsMain,
143
+ Oo as TabsMainReplaceQueryKey,
137
144
  K as TriggerAutoImport,
138
145
  w as WatchSize,
139
- Ge as ceilToTier,
140
- Lo as checkLogin,
141
- Ro as checkPermission,
142
- Oo as countAll,
143
- t as createAdminBridge,
144
- Do as createAppStore,
145
- Yo as createGenerateRouteMetaRawTree,
146
- Go as createGuard,
147
- ho as createListApi,
148
- bo as createNestFormExposeMap,
149
- Ko as createRoutePermissionStore,
150
- wo as createStorageWithNamespace,
151
- ko as createUseState,
152
- zo as createUserStore,
153
- Re as exportCSV,
154
- No as fetchListAll,
155
- jo as flatRouteMetaResolveRaw,
156
- Ue as generateFormData,
157
- be as getBlurSubmit,
158
- Ve as getChangeSubmit,
159
- Ne as getConfirmPasswordRule,
160
- Ke as getDatePickerShortcuts,
161
- ve as getEnterSubmit,
162
- Jo as getId,
163
- Z as getModalShelfInjectionKey,
164
- we as getPlaceholder,
165
- Qo as getRoutePermissionKey,
166
- He as getVModelSugar,
167
- $o as nestFormItem,
168
- ot as nestFormItemList,
169
- rt as nestPanelForm,
170
- mt as nestPanelItem,
171
- ke as parseFormData,
172
- Ce as passwordRule,
173
- ge as pickExportColumns,
174
- We as resolveFormLayout,
175
- ze as resolveLayoutSpan,
176
- De as setFormComponentType,
177
- Xe as setInputComponent,
178
- je as setSelectComponent,
179
- Qe as stringifyFormData,
180
- qe as swiftFormItemConfig,
181
- pt as themeScaleDerive,
182
- st as themeScaleMix,
183
- lt as timeCountDown,
184
- dt as useActivated,
185
- it as useActivatedEvent,
186
- nt as useActivatedExec,
187
- _t as useAdminThemeApply,
188
- Et as useAdminViewportApply,
189
- Tt as useBreakpoint,
190
- Ft as useChannelViewportHeight,
191
- Lt as useFeelSize,
192
- Rt as useMenusDataDispatch,
193
- Ot as useNestForm,
194
- Nt as useNestFormList,
195
- Dt as useNestLayoutScale,
196
- Yt as useTimeout
146
+ He as ceilToTier,
147
+ ho as checkLogin,
148
+ yo as checkPermission,
149
+ Vo as countAll,
150
+ r as createAdminBridge,
151
+ bo as createAppStore,
152
+ vo as createGenerateRouteMetaRawTree,
153
+ Ho as createGuard,
154
+ Yo as createListApi,
155
+ ko as createNestFormExposeMap,
156
+ zo as createRoutePermissionStore,
157
+ jo as createStorageWithNamespace,
158
+ qo as createUseState,
159
+ $o as createUserStore,
160
+ ye as exportCSV,
161
+ Go as fetchListAll,
162
+ or as flatRouteMetaResolveRaw,
163
+ We as generateFormData,
164
+ ke as getBlurSubmit,
165
+ Xe as getChangeSubmit,
166
+ Ge as getConfirmPasswordRule,
167
+ ze as getDatePickerShortcuts,
168
+ Ze as getEnterSubmit,
169
+ ar as getId,
170
+ J as getModalShelfInjectionKey,
171
+ je as getPlaceholder,
172
+ rr as getRoutePermissionKey,
173
+ Qe as getVModelSugar,
174
+ fr as nestFormItem,
175
+ sr as nestFormItemList,
176
+ lr as nestPanelForm,
177
+ dr as nestPanelItem,
178
+ qe as parseFormData,
179
+ Ue as passwordRule,
180
+ Be as pickExportColumns,
181
+ Je as resolveFormLayout,
182
+ $e as resolveLayoutSpan,
183
+ be as setFormComponentType,
184
+ eo as setInputComponent,
185
+ oo as setSelectComponent,
186
+ ro as stringifyFormData,
187
+ to as swiftFormItemConfig,
188
+ nr as themeScaleDerive,
189
+ _r as themeScaleMix,
190
+ Er as timeCountDown,
191
+ Sr as useActivated,
192
+ Tr as useActivatedEvent,
193
+ Ir as useActivatedExec,
194
+ Rr as useAdminThemeApply,
195
+ Lr as useAdminViewportApply,
196
+ Or as useBreakpoint,
197
+ Nr as useChannelViewportHeight,
198
+ hr as useFeelSize,
199
+ yr as useMenusDataDispatch,
200
+ Vr as useNestForm,
201
+ Gr as useNestFormList,
202
+ br as useNestLayoutScale,
203
+ vr as useTimeout
197
204
  };
package/es/store/app.mjs CHANGED
@@ -1,94 +1,150 @@
1
- import { defineStore as f } from "pinia";
2
- import { useRoute as $ } from "vue-router";
3
- import { computed as e, ref as u } from "vue";
4
- function D(g) {
5
- const { bridge: t } = g;
6
- return f("APP", () => {
7
- const P = e(() => t.APP_LAYOUT_HEADER_CONFIG.height), O = e(() => t.APP_LAYOUT_FOOTER_CONFIG.height), b = e(() => t.APP_BASE_INFO.name), T = u(!1), d = u(!1), n = u(!1), m = e(() => d.value ? t.APP_LAYOUT_SIDEBAR_CONFIG.collapseWidth : t.APP_LAYOUT_SIDEBAR_CONFIG.width), C = $(), a = e(() => t.themeColors.value), i = e(() => C.meta), l = e(() => i.value.layout), I = e(() => i.value.keepAlive), h = e(
1
+ import { defineStore as D } from "pinia";
2
+ import { useRoute as k } from "vue-router";
3
+ import { computed as o, ref as I } from "vue";
4
+ function W(E) {
5
+ const { bridge: a } = E;
6
+ return D("APP", () => {
7
+ const _ = o(() => a.APP_LAYOUT_HEADER_CONFIG.height), p = o(() => a.APP_LAYOUT_FOOTER_CONFIG.height), F = o(() => a.APP_BASE_INFO.name), r = I(!1), A = I(!1), f = o(() => r.value ? a.APP_LAYOUT_SIDEBAR_CONFIG.collapseWidth : a.APP_LAYOUT_SIDEBAR_CONFIG.width), C = k(), u = o(() => a.themeColors.value), g = o(() => C.meta), c = o(() => g.value.layout), S = o(() => g.value.keepAlive), s = o(
8
8
  () => {
9
- var o;
10
- return ((o = l.value) == null ? void 0 : o.header) ?? t.APP_ROUTER_META_DEFAULT_CONFIG.showHeader;
9
+ var e;
10
+ return ((e = c.value) == null ? void 0 : e.header) ?? a.APP_ROUTER_META_DEFAULT_CONFIG.showHeader;
11
11
  }
12
- ), c = e(
12
+ ), n = o(
13
13
  () => {
14
- var o;
15
- return ((o = l.value) == null ? void 0 : o.footer) ?? t.APP_ROUTER_META_DEFAULT_CONFIG.showFooter;
14
+ var e;
15
+ return ((e = c.value) == null ? void 0 : e.footer) ?? a.APP_ROUTER_META_DEFAULT_CONFIG.showFooter;
16
16
  }
17
- ), _ = e(
17
+ ), $ = o(
18
+ () => s.value && _.value > 0
19
+ ), P = o(
20
+ () => n.value && p.value > 0
21
+ ), v = o(
18
22
  () => {
19
- var o;
20
- return (((o = l.value) == null ? void 0 : o.sidebar) ?? t.APP_ROUTER_META_DEFAULT_CONFIG.showSidebar) && n.value;
23
+ var e;
24
+ return (((e = c.value) == null ? void 0 : e.sidebar) ?? a.APP_ROUTER_META_DEFAULT_CONFIG.showSidebar) && A.value;
21
25
  }
22
- ), E = e(
26
+ ), d = o(
23
27
  () => {
24
- var o;
25
- return ((o = l.value) == null ? void 0 : o.breadcrumb) ?? t.APP_ROUTER_META_DEFAULT_CONFIG.showBreadcrumb;
28
+ var e;
29
+ return ((e = c.value) == null ? void 0 : e.aside) ?? a.APP_ROUTER_META_DEFAULT_CONFIG.showAside ?? !1;
26
30
  }
27
- ), v = e(
31
+ ), R = o(
28
32
  () => {
29
- var o;
30
- return ((o = l.value) == null ? void 0 : o.bodyShimPadding) ?? t.APP_LAYOUT_BODY_CONFIG.shimPadding;
33
+ var e;
34
+ return ((e = c.value) == null ? void 0 : e.breadcrumb) ?? a.APP_ROUTER_META_DEFAULT_CONFIG.showBreadcrumb;
31
35
  }
32
- ), r = e(() => ({
33
- top: `${t.APP_LAYOUT_VIEWPORT_CONFIG.paddingTop}px`,
34
- right: `${t.APP_LAYOUT_VIEWPORT_CONFIG.paddingRight}px`,
35
- bottom: `${t.APP_LAYOUT_VIEWPORT_CONFIG.paddingBottom}px`,
36
- left: `${t.APP_LAYOUT_VIEWPORT_CONFIG.paddingLeft}px`
37
- })), s = e(() => ({
38
- height: `${h.value ? P.value : 0}px`,
39
- backgroundColor: a.value.bodyColor,
40
- color: a.value.baseColor
41
- })), p = e(() => ({
42
- height: `${c.value ? O.value : 0}px`,
43
- backgroundColor: a.value.bodyColor
44
- })), A = e(() => ({
45
- width: `${_.value ? m.value : 0}px`,
46
- paddingTop: s.value.height,
47
- backgroundColor: a.value.bodyColor,
48
- color: a.value.baseColor
49
- })), F = e(() => ({
50
- // viewport 边框:原扣 sidebar 宽 / header 高基础上,经 calc 再叠加左 / 上 viewport
51
- // 边距;右 / 下原无 padding,本期新增直取 viewport 右 / 下边距,给 footer + 内容右下留白。
52
- paddingLeft: `calc(${A.value.width} + ${r.value.left})`,
53
- paddingTop: `calc(${s.value.height} + ${r.value.top})`,
54
- paddingRight: r.value.right,
55
- paddingBottom: r.value.bottom,
56
- backgroundColor: a.value.bodyColor
57
- })), S = e(() => ({
58
- // 视口可用高再减去上 / 下 viewport 边框边距(套框后内容区相应变矮)。
59
- minHeight: `calc(100vh - ${s.value.height} - ${p.value.height} - ${r.value.top} - ${r.value.bottom})`,
60
- padding: `${v.value}px`
61
- })), R = (o) => {
62
- d.value = o;
63
- }, L = (o) => {
64
- n.value = o;
65
- }, U = (o) => {
66
- t.theme.setDark(o);
36
+ ), O = o(
37
+ () => {
38
+ var e;
39
+ return ((e = c.value) == null ? void 0 : e.bodyShimPadding) ?? a.APP_LAYOUT_BODY_CONFIG.shimPadding;
40
+ }
41
+ ), l = o(() => ({
42
+ top: `${a.APP_LAYOUT_VIEWPORT_CONFIG.paddingTop}px`,
43
+ right: `${a.APP_LAYOUT_VIEWPORT_CONFIG.paddingRight}px`,
44
+ bottom: `${a.APP_LAYOUT_VIEWPORT_CONFIG.paddingBottom}px`,
45
+ left: `${a.APP_LAYOUT_VIEWPORT_CONFIG.paddingLeft}px`
46
+ })), U = o(() => a.APP_LAYOUT_GAP_CONFIG.size), t = o(() => `${U.value}px`), i = o(() => {
47
+ const e = a.APP_LAYOUT_HEADER_CONFIG;
48
+ return {
49
+ ...e.style,
50
+ position: "fixed",
51
+ // 通栏悬浮:三外边各让外缝 gap(底边朝内容,由下方模块 top 让内缝)。
52
+ top: `calc(${l.value.top} + ${t.value})`,
53
+ left: `calc(${l.value.left} + ${t.value})`,
54
+ right: `calc(${l.value.right} + ${t.value})`,
55
+ height: `${s.value ? _.value : 0}px`,
56
+ background: e.background ?? u.value.bodyColor,
57
+ ...e.color ? { color: e.color } : {}
58
+ };
59
+ }), h = o(
60
+ () => $.value ? `calc(${l.value.top} + ${t.value} + ${i.value.height} + ${t.value})` : `calc(${l.value.top} + ${t.value})`
61
+ ), T = o(() => {
62
+ const e = a.APP_LAYOUT_FOOTER_CONFIG;
63
+ return {
64
+ ...e.style,
65
+ height: `${n.value ? p.value : 0}px`,
66
+ // footer 在 body 流内:marginTop 与内容 shim 隔内缝;底边悬浮由 body paddingBottom 承担。
67
+ // hasFooter:footer 收起到 0 高时不留死内缝 gap(对称 hasHeader)。
68
+ marginTop: P.value ? t.value : "0px",
69
+ background: e.background ?? u.value.bodyColor,
70
+ ...e.color ? { color: e.color } : {}
71
+ };
72
+ }), b = o(() => {
73
+ const e = a.APP_LAYOUT_SIDEBAR_CONFIG;
74
+ return {
75
+ ...e.style,
76
+ position: "fixed",
77
+ width: `${v.value ? f.value : 0}px`,
78
+ // 悬浮:左/下各让外缝 gap;顶 = 内容行顶(外缝 + header 高 + 内缝);paddingTop 归 0(让位已由 top 承担)。
79
+ top: h.value,
80
+ left: `calc(${l.value.left} + ${t.value})`,
81
+ bottom: `calc(${l.value.bottom} + ${t.value})`,
82
+ paddingTop: "0px",
83
+ background: e.background ?? u.value.bodyColor,
84
+ ...e.color ? { color: e.color } : {}
85
+ };
86
+ }), m = o(() => {
87
+ const e = a.APP_LAYOUT_ASIDE_CONFIG;
88
+ return {
89
+ ...e.style,
90
+ position: "fixed",
91
+ width: `${d.value ? e.width : 0}px`,
92
+ // 对称 sidebar:右/下各让外缝 gap;顶 = 内容行顶。
93
+ top: h.value,
94
+ right: `calc(${l.value.right} + ${t.value})`,
95
+ bottom: `calc(${l.value.bottom} + ${t.value})`,
96
+ paddingTop: "0px",
97
+ background: e.background ?? u.value.bodyColor,
98
+ ...e.color ? { color: e.color } : {}
99
+ };
100
+ }), L = o(() => ({
101
+ // 内容左让位:外框左 + 外缝;有 sidebar 再加 sidebar 宽 + 内缝。
102
+ paddingLeft: v.value ? `calc(${l.value.left} + ${t.value} + ${b.value.width} + ${t.value})` : `calc(${l.value.left} + ${t.value})`,
103
+ // 顶让位 = 内容行顶(与 sidebar/aside 同行)。
104
+ paddingTop: h.value,
105
+ // 右让位(对称左):外框右 + 外缝;有 aside 再加 aside 宽 + 内缝。
106
+ paddingRight: d.value ? `calc(${l.value.right} + ${t.value} + ${m.value.width} + ${t.value})` : `calc(${l.value.right} + ${t.value})`,
107
+ // 底让位:外框下 + 外缝(footer 在流内,其底悬浮由此承担)。
108
+ paddingBottom: `calc(${l.value.bottom} + ${t.value})`,
109
+ backgroundColor: u.value.bodyColor
110
+ })), y = o(() => {
111
+ const e = $.value ? ` - ${i.value.height} - ${t.value}` : "", x = P.value ? ` - ${T.value.height} - ${t.value}` : "";
112
+ return {
113
+ minHeight: `calc(100vh - ${l.value.top} - ${l.value.bottom} - ${t.value} - ${t.value}${e}${x})`,
114
+ padding: `${O.value}px`
115
+ };
116
+ }), G = (e) => {
117
+ r.value = e;
118
+ }, N = (e) => {
119
+ A.value = e;
120
+ }, w = (e) => {
121
+ a.theme.setDark(e);
67
122
  };
68
123
  return {
69
- name: b,
70
- isDarkTheme: e(() => t.themeIsDark.value),
71
- theme: a,
72
- extractLevel1ToHeader: T,
73
- showHeader: h,
74
- showFooter: c,
75
- showSidebar: _,
76
- showBreadcrumb: E,
77
- keepAlive: I,
78
- headerStyle: s,
79
- footerStyle: p,
80
- sidebarStyle: A,
81
- bodyStyle: F,
82
- bodyShimPadding: v,
83
- bodyShimStyle: S,
84
- viewportPadding: r,
85
- sidebarIsCollapse: e(() => d.value),
86
- changeSidebarCollapseStatus: R,
87
- changeSidebarHasMenusStatus: L,
88
- changeIsDarkTheme: U
124
+ name: F,
125
+ isDarkTheme: o(() => a.themeIsDark.value),
126
+ theme: u,
127
+ showHeader: s,
128
+ showFooter: n,
129
+ showSidebar: v,
130
+ showAside: d,
131
+ showBreadcrumb: R,
132
+ keepAlive: S,
133
+ headerStyle: i,
134
+ footerStyle: T,
135
+ sidebarStyle: b,
136
+ asideStyle: m,
137
+ bodyStyle: L,
138
+ bodyShimPadding: O,
139
+ bodyShimStyle: y,
140
+ viewportPadding: l,
141
+ sidebarIsCollapse: o(() => r.value),
142
+ changeSidebarCollapseStatus: G,
143
+ changeSidebarHasMenusStatus: N,
144
+ changeIsDarkTheme: w
89
145
  };
90
146
  });
91
147
  }
92
148
  export {
93
- D as createAppStore
149
+ W as createAppStore
94
150
  };