@done-coding/admin-core 0.3.0 → 0.4.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 (106) hide show
  1. package/es/bridge/index.mjs +87 -47
  2. package/es/components/app-layout/AppBody.vue.mjs +7 -0
  3. package/es/components/app-layout/AppBody.vue2.mjs +89 -0
  4. package/es/components/app-layout/AppBreadcrumb.vue.mjs +7 -0
  5. package/es/components/app-layout/AppBreadcrumb.vue2.mjs +58 -0
  6. package/es/components/app-layout/AppFooter.vue.mjs +7 -0
  7. package/es/components/app-layout/AppFooter.vue2.mjs +17 -0
  8. package/es/components/app-layout/AppHeader.vue.mjs +7 -0
  9. package/es/components/app-layout/AppHeader.vue2.mjs +99 -0
  10. package/es/components/app-layout/AppLayout.vue.mjs +7 -0
  11. package/es/components/app-layout/AppLayout.vue2.mjs +130 -0
  12. package/es/components/app-layout/AppPage.vue.mjs +7 -0
  13. package/es/components/app-layout/AppPage.vue2.mjs +39 -0
  14. package/es/components/app-layout/AppSidebar.vue.mjs +7 -0
  15. package/es/components/app-layout/AppSidebar.vue2.mjs +97 -0
  16. package/es/components/app-layout/index.mjs +32 -0
  17. package/es/components/display/ActionBtnGroup.vue.mjs +61 -0
  18. package/es/components/display/ActionBtnGroup.vue2.mjs +4 -0
  19. package/es/components/display/HeightProvider.vue.mjs +26 -26
  20. package/es/components/display/TabsHeader.vue.mjs +7 -0
  21. package/es/components/display/TabsHeader.vue2.mjs +76 -0
  22. package/es/components/display/TabsMain.vue.mjs +100 -5
  23. package/es/components/display/TabsMain.vue2.mjs +2 -95
  24. package/es/components/display/TabsNaturalFlow.vue.mjs +17 -0
  25. package/es/components/display/TabsNaturalFlow.vue2.mjs +4 -0
  26. package/es/components/display/TabsRefineFlow.vue.mjs +62 -0
  27. package/es/components/display/TabsRefineFlow.vue2.mjs +4 -0
  28. package/es/components/display/index.mjs +10 -8
  29. package/es/components/form/FormSearch.vue.mjs +2 -2
  30. package/es/components/form/FormSearch.vue2.mjs +107 -63
  31. package/es/components/form/form-search-utils.mjs +25 -0
  32. package/es/components/list-page/ListPage.vue.mjs +2 -2
  33. package/es/components/list-page/ListPage.vue2.mjs +82 -76
  34. package/es/components/misc/ActionBtn.vue.mjs +84 -65
  35. package/es/components/misc/ActionConfirm.vue.mjs +1 -1
  36. package/es/components/misc/ActionConfirm.vue2.mjs +77 -71
  37. package/es/components/misc/SelectModule.vue.mjs +55 -0
  38. package/es/components/misc/SelectModule.vue2.mjs +4 -0
  39. package/es/components/modal/ConfirmModal.vue.mjs +1 -1
  40. package/es/components/modal/ConfirmModal.vue2.mjs +13 -12
  41. package/es/components/modal/modal-shelf-hierarchy.mjs +4 -6
  42. package/es/components/table/TableMain.vue.mjs +3 -3
  43. package/es/components/table/TableMain.vue2.mjs +103 -102
  44. package/es/components/table/ToolbarButtons.vue.mjs +10 -40
  45. package/es/hooks/use-breakpoint.mjs +40 -0
  46. package/es/hooks/use-channel-viewport-height.mjs +18 -0
  47. package/es/index.mjs +165 -128
  48. package/es/inject/key.mjs +18 -8
  49. package/es/router/guard/index.mjs +31 -0
  50. package/es/router/guard/login.mjs +4 -0
  51. package/es/router/guard/permission.mjs +4 -0
  52. package/es/store/app.mjs +103 -0
  53. package/es/store/router-permission.mjs +65 -0
  54. package/es/store/user.mjs +52 -52
  55. package/es/style.css +1 -1
  56. package/package.json +3 -2
  57. package/types/bridge/index.d.ts +193 -89
  58. package/types/components/app-layout/AppBody.vue.d.ts +45 -0
  59. package/types/components/app-layout/AppBreadcrumb.vue.d.ts +25 -0
  60. package/types/components/app-layout/AppFooter.vue.d.ts +2 -0
  61. package/types/components/app-layout/AppHeader.vue.d.ts +55 -0
  62. package/types/components/app-layout/AppLayout.vue.d.ts +76 -0
  63. package/types/components/app-layout/AppPage.vue.d.ts +54 -0
  64. package/types/components/app-layout/AppSidebar.vue.d.ts +51 -0
  65. package/types/components/app-layout/index.d.ts +27 -0
  66. package/types/components/app-layout/types.d.ts +43 -0
  67. package/types/components/display/ActionBtnGroup.vue.d.ts +16 -0
  68. package/types/components/display/HeightProvider.vue.d.ts +10 -6
  69. package/types/components/display/TabsHeader.vue.d.ts +42 -0
  70. package/types/components/display/TabsMain.vue.d.ts +49 -7
  71. package/types/components/display/TabsNaturalFlow.vue.d.ts +16 -0
  72. package/types/components/display/TabsRefineFlow.vue.d.ts +53 -0
  73. package/types/components/display/index.d.ts +16 -13
  74. package/types/components/display/types.d.ts +85 -29
  75. package/types/components/form/form-search-utils.d.ts +24 -0
  76. package/types/components/form/types.d.ts +7 -1
  77. package/types/components/list-page/types.d.ts +1 -1
  78. package/types/components/misc/ActionBtn.vue.d.ts +17 -23
  79. package/types/components/misc/ActionConfirm.vue.d.ts +56 -27
  80. package/types/components/misc/SelectModule.vue.d.ts +2 -0
  81. package/types/components/misc/index.d.ts +11 -1
  82. package/types/components/misc/types.d.ts +35 -26
  83. package/types/components/modal/ConfirmModal.vue.d.ts +17 -0
  84. package/types/components/modal/modal-shelf-hierarchy.d.ts +1 -1
  85. package/types/components/table/types.d.ts +14 -12
  86. package/types/helpers/index.d.ts +10 -3
  87. package/types/hooks/index.d.ts +2 -0
  88. package/types/hooks/use-breakpoint.d.ts +4 -0
  89. package/types/hooks/use-channel-viewport-height.d.ts +28 -0
  90. package/types/index.d.ts +4 -1
  91. package/types/inject/key.d.ts +35 -10
  92. package/types/router/guard/index.d.ts +21 -0
  93. package/types/router/guard/login.d.ts +5 -0
  94. package/types/router/guard/permission.d.ts +5 -0
  95. package/types/router/guard/types.d.ts +15 -0
  96. package/types/router/index.d.ts +1 -0
  97. package/types/store/app.d.ts +149 -0
  98. package/types/store/index.d.ts +2 -0
  99. package/types/store/router-permission.d.ts +80 -0
  100. package/types/store/user.d.ts +11 -9
  101. /package/es/{helpers → bridge}/route.mjs +0 -0
  102. /package/es/{helpers → bridge}/state.mjs +0 -0
  103. /package/es/{helpers → bridge}/storage.mjs +0 -0
  104. /package/types/{helpers → bridge}/route.d.ts +0 -0
  105. /package/types/{helpers → bridge}/state.d.ts +0 -0
  106. /package/types/{helpers → bridge}/storage.d.ts +0 -0
package/es/index.mjs CHANGED
@@ -2,144 +2,181 @@ import { formInstall as t } from "./components/form/index.mjs";
2
2
  import { menuInstall as o } from "./components/menu/index.mjs";
3
3
  import { displayInstall as r } from "./components/display/index.mjs";
4
4
  import { miscInstall as a } from "./components/misc/index.mjs";
5
- import { modalInstall as m } from "./components/modal/index.mjs";
6
- import { tableInstall as f } from "./components/table/index.mjs";
5
+ import { modalInstall as f } from "./components/modal/index.mjs";
6
+ import { tableInstall as m } from "./components/table/index.mjs";
7
7
  import { listPageInstall as s } from "./components/list-page/index.mjs";
8
8
  import { panelInstall as l } from "./components/panel/index.mjs";
9
- import { createAdminBridge as A } from "./bridge/index.mjs";
10
- import { default as C } from "./components/misc/ActionBtn.vue.mjs";
11
- import { default as T } from "./components/misc/ActionButton.vue.mjs";
12
- import { default as L } from "./components/misc/ActionButtonDanger.vue.mjs";
13
- import { default as R } from "./components/misc/ActionButtonWarn.vue.mjs";
14
- import { default as h } from "./components/modal/DetailModal.vue.mjs";
15
- import { default as N } from "./components/form/FormMain.vue.mjs";
16
- import { default as b } from "./components/form/FormRadioGroup.vue.mjs";
17
- import { default as v } from "./components/form/FormSelect.vue.mjs";
18
- import { default as B } from "./components/form/FormTree.vue.mjs";
19
- import { default as U } from "./components/form/FormVerifyCode.vue.mjs";
20
- import { default as K } from "./components/display/HeightProvider.vue.mjs";
21
- import { default as k } from "./components/menu/MenuItemSub.vue.mjs";
22
- import { default as X } from "./components/menu/MenuTree.vue.mjs";
23
- import { default as j } from "./components/modal/ModalPorter.vue.mjs";
24
- import { default as q } from "./components/modal/ModalShelf.vue.mjs";
25
- import { default as Z } from "./components/panel/PanelItem.vue.mjs";
26
- import { default as ee } from "./components/panel/PanelMain.vue.mjs";
27
- import { default as oe } from "./components/misc/TriggerAutoImport.vue.mjs";
28
- import { default as ae } from "./components/display/WatchSize.vue.mjs";
29
- import { APP_API_LIST_MODEL_KEY_CONFIG as fe } from "./config/list-model.mjs";
30
- import { default as le } from "./components/misc/ActionConfirm.vue.mjs";
31
- import { default as ie } from "./components/misc/AutoRefresh.vue.mjs";
32
- import { BODY_CONTENT_VIEWPORT_HEIGHT as pe, FULLSCREEN_HEIGHT_CHANNEL as xe, getModalShelfInjectionKey as de } from "./inject/key.mjs";
33
- import { default as Ie } from "./components/modal/ConfirmModal.vue.mjs";
34
- import { EXPORT_MAX_LIMIT as ge, OPERATE_COLUMN_PROP as Me, exportCSV as Ae, pickExportColumns as _e } from "./utils/export.mjs";
35
- import { FORM_CONFIG_SELECT_ALL_VALUE as Se, getConfirmPasswordRule as Te, passwordRule as Fe, setFormComponentType as Le } from "./helpers/form.mjs";
36
- import { FORM_ITEM_CHANGE_LOADING as Re, generateFormData as Oe, getBlurSubmit as he, getChangeSubmit as De, getDatePickerShortcuts as Ne, getEnterSubmit as ye, getPlaceholder as be, getVModelSugar as Ge, parseFormData as ve, resolveFormLayout as we, setInputComponent as Be, setSelectComponent as He, stringifyFormData as Ue, swiftFormItemConfig as Ve } from "./components/form/utils.mjs";
37
- import { default as We } from "./components/form/FormSearch.vue.mjs";
38
- import { default as ze } from "./components/form/FormVerifyImage.vue.mjs";
39
- import { default as Ye } from "./components/list-page/ListPage.vue.mjs";
40
- import { default as Qe } from "./components/panel/PanelEditSwitch.vue.mjs";
41
- import { ROUTE_MODULE_LEVEL as Je, TabsMainReplaceQueryKey as Ze } from "./config/route.mjs";
42
- import { default as et } from "./components/table/TableMain.vue.mjs";
43
- import { default as ot } from "./components/display/TabsMain.vue.mjs";
44
- import { countAll as at, createListApi as mt, fetchListAll as ft } from "./helpers/list-helper.mjs";
45
- import { createGenerateRouteMetaRawTree as lt } from "./helpers/route.mjs";
46
- import { createStorageWithNamespace as it } from "./helpers/storage.mjs";
47
- import { createUseState as pt } from "./helpers/state.mjs";
48
- import { createUserStore as dt } from "./store/user.mjs";
49
- import { flatRouteMetaResolveRaw as It, getRoutePermissionKey as Et } from "./utils/router.mjs";
50
- import { getId as Mt } from "./utils/id.mjs";
51
- import { timeCountDown as _t } from "./utils/time.mjs";
52
- import { useActivated as St, useActivatedEvent as Tt, useActivatedExec as Ft } from "./hooks/activated.mjs";
53
- import { useFeelSize as Pt } from "./hooks/feel-size.mjs";
54
- import { useMenusDataDispatch as Ot } from "./hooks/menus-dispatch.mjs";
55
- import { useTimeout as Dt } from "./hooks/timeout.mjs";
56
- const E = {
9
+ import { appLayoutInstall as p } from "./components/app-layout/index.mjs";
10
+ import { createAdminBridge as g } from "./bridge/index.mjs";
11
+ import { default as T } from "./components/misc/ActionBtn.vue.mjs";
12
+ import { default as R } from "./components/display/ActionBtnGroup.vue.mjs";
13
+ import { default as O } from "./components/misc/ActionButton.vue.mjs";
14
+ import { default as h } from "./components/misc/ActionButtonDanger.vue.mjs";
15
+ import { default as y } from "./components/misc/ActionButtonWarn.vue.mjs";
16
+ import { default as U } from "./components/modal/DetailModal.vue.mjs";
17
+ import { default as G } from "./components/form/FormMain.vue.mjs";
18
+ import { default as N } from "./components/form/FormRadioGroup.vue.mjs";
19
+ import { default as Y } from "./components/form/FormSelect.vue.mjs";
20
+ import { default as K } from "./components/form/FormTree.vue.mjs";
21
+ import { default as k } from "./components/form/FormVerifyCode.vue.mjs";
22
+ import { default as z } from "./components/display/HeightProvider.vue.mjs";
23
+ import { default as j } from "./components/menu/MenuItemSub.vue.mjs";
24
+ import { default as q } from "./components/menu/MenuTree.vue.mjs";
25
+ import { default as Z } from "./components/modal/ModalPorter.vue.mjs";
26
+ import { default as ee } from "./components/modal/ModalShelf.vue.mjs";
27
+ import { default as oe } from "./components/panel/PanelItem.vue.mjs";
28
+ import { default as ae } from "./components/panel/PanelMain.vue.mjs";
29
+ import { default as me } from "./components/misc/SelectModule.vue.mjs";
30
+ import { default as le } from "./components/display/TabsMain.vue.mjs";
31
+ import { default as ue } from "./components/misc/TriggerAutoImport.vue.mjs";
32
+ import { default as ne } from "./components/display/WatchSize.vue.mjs";
33
+ import { APP_API_LIST_MODEL_KEY_CONFIG as de } from "./config/list-model.mjs";
34
+ import { APP_LAYOUT_APP_STORE_KEY as Ae, APP_LAYOUT_BRIDGE_KEY as _e, APP_LAYOUT_USER_STORE_KEY as Ee, BODY_CONTENT_VIEWPORT_HEIGHT as Ie, TABS_MAIN_VISUAL_LEVEL as Pe, getModalShelfInjectionKey as Se } from "./inject/key.mjs";
35
+ import { default as Me } from "./components/misc/ActionConfirm.vue.mjs";
36
+ import { default as Le } from "./components/app-layout/AppBody.vue.mjs";
37
+ import { default as Ce } from "./components/app-layout/AppBreadcrumb.vue.mjs";
38
+ import { default as Fe } from "./components/app-layout/AppFooter.vue.mjs";
39
+ import { default as De } from "./components/app-layout/AppHeader.vue.mjs";
40
+ import { default as Be } from "./components/app-layout/AppLayout.vue.mjs";
41
+ import { default as be } from "./components/app-layout/AppPage.vue.mjs";
42
+ import { default as Ve } from "./components/app-layout/AppSidebar.vue.mjs";
43
+ import { default as we } from "./components/misc/AutoRefresh.vue.mjs";
44
+ import { default as ve } from "./components/modal/ConfirmModal.vue.mjs";
45
+ import { EXPORT_MAX_LIMIT as He, OPERATE_COLUMN_PROP as ke, exportCSV as We, pickExportColumns as ze } from "./utils/export.mjs";
46
+ import { FORM_CONFIG_SELECT_ALL_VALUE as je, getConfirmPasswordRule as Qe, passwordRule as qe, setFormComponentType as Je } from "./helpers/form.mjs";
47
+ import { FORM_ITEM_CHANGE_LOADING as $e, generateFormData as et, getBlurSubmit as tt, getChangeSubmit as ot, getDatePickerShortcuts as rt, getEnterSubmit as at, getPlaceholder as ft, getVModelSugar as mt, parseFormData as st, resolveFormLayout as lt, setInputComponent as pt, setSelectComponent as ut, stringifyFormData as it, swiftFormItemConfig as nt } from "./components/form/utils.mjs";
48
+ import { default as dt } from "./components/form/FormSearch.vue.mjs";
49
+ import { default as At } from "./components/form/FormVerifyImage.vue.mjs";
50
+ import { default as Et } from "./components/list-page/ListPage.vue.mjs";
51
+ import { default as Pt } from "./components/panel/PanelEditSwitch.vue.mjs";
52
+ import { ROUTE_MODULE_LEVEL as gt, TabsMainReplaceQueryKey as Mt } from "./config/route.mjs";
53
+ import { default as Lt } from "./components/table/TableMain.vue.mjs";
54
+ import { checkLogin as Ct } from "./router/guard/login.mjs";
55
+ import { checkPermission as Ft } from "./router/guard/permission.mjs";
56
+ import { countAll as Dt, createListApi as yt, fetchListAll as Bt } from "./helpers/list-helper.mjs";
57
+ import { createAppStore as bt } from "./store/app.mjs";
58
+ import { createGenerateRouteMetaRawTree as Vt } from "./bridge/route.mjs";
59
+ import { createGuard as wt } from "./router/guard/index.mjs";
60
+ import { createRoutePermissionStore as vt } from "./store/router-permission.mjs";
61
+ import { createStorageWithNamespace as Ht } from "./bridge/storage.mjs";
62
+ import { createUseState as Wt } from "./bridge/state.mjs";
63
+ import { createUserStore as Xt } from "./store/user.mjs";
64
+ import { flatRouteMetaResolveRaw as Qt, getRoutePermissionKey as qt } from "./utils/router.mjs";
65
+ import { getId as Zt } from "./utils/id.mjs";
66
+ import { timeCountDown as eo } from "./utils/time.mjs";
67
+ import { useActivated as oo, useActivatedEvent as ro, useActivatedExec as ao } from "./hooks/activated.mjs";
68
+ import { useBreakpoint as mo } from "./hooks/use-breakpoint.mjs";
69
+ import { useChannelViewportHeight as lo } from "./hooks/use-channel-viewport-height.mjs";
70
+ import { useFeelSize as uo } from "./hooks/feel-size.mjs";
71
+ import { useMenusDataDispatch as no } from "./hooks/menus-dispatch.mjs";
72
+ import { useTimeout as co } from "./hooks/timeout.mjs";
73
+ const I = {
57
74
  install(e) {
58
- e.use(t), e.use(o), e.use(r), e.use(a), e.use(m), e.use(f), e.use(s), e.use(l);
75
+ e.use(t), e.use(o), e.use(r), e.use(a), e.use(f), e.use(m), e.use(s), e.use(l), e.use(p);
59
76
  }
60
77
  };
61
78
  export {
62
- fe as APP_API_LIST_MODEL_KEY_CONFIG,
63
- C as ActionBtn,
64
- T as ActionButton,
65
- L as ActionButtonDanger,
66
- R as ActionButtonWarn,
67
- le as ActionConfirm,
68
- ie as AutoRefresh,
69
- pe as BODY_CONTENT_VIEWPORT_HEIGHT,
70
- Ie as ConfirmModal,
71
- h as DetailModal,
72
- ge as EXPORT_MAX_LIMIT,
73
- Se as FORM_CONFIG_SELECT_ALL_VALUE,
74
- Re as FORM_ITEM_CHANGE_LOADING,
75
- xe as FULLSCREEN_HEIGHT_CHANNEL,
76
- N as FormMain,
77
- b as FormRadioGroup,
78
- We as FormSearch,
79
- v as FormSelect,
80
- B as FormTree,
81
- U as FormVerifyCode,
82
- ze as FormVerifyImage,
83
- K as HeightProvider,
84
- Ye as ListPage,
85
- k as MenuItemSub,
86
- X as MenuTree,
87
- j as ModalPorter,
88
- q as ModalShelf,
89
- Me as OPERATE_COLUMN_PROP,
90
- Qe as PanelEditSwitch,
91
- Z as PanelItem,
92
- ee as PanelMain,
93
- Je as ROUTE_MODULE_LEVEL,
94
- et as TableMain,
95
- ot as TabsMain,
96
- Ze as TabsMainReplaceQueryKey,
97
- oe as TriggerAutoImport,
98
- ae as WatchSize,
99
- at as countAll,
100
- A as createAdminBridge,
101
- lt as createGenerateRouteMetaRawTree,
102
- mt as createListApi,
103
- it as createStorageWithNamespace,
104
- pt as createUseState,
105
- dt as createUserStore,
79
+ de as APP_API_LIST_MODEL_KEY_CONFIG,
80
+ Ae as APP_LAYOUT_APP_STORE_KEY,
81
+ _e as APP_LAYOUT_BRIDGE_KEY,
82
+ Ee as APP_LAYOUT_USER_STORE_KEY,
83
+ T as ActionBtn,
84
+ R as ActionBtnGroup,
85
+ O as ActionButton,
86
+ h as ActionButtonDanger,
87
+ y as ActionButtonWarn,
88
+ Me as ActionConfirm,
89
+ Le as AppBody,
90
+ Ce as AppBreadcrumb,
91
+ Fe as AppFooter,
92
+ De as AppHeader,
93
+ Be as AppLayout,
94
+ be as AppPage,
95
+ Ve as AppSidebar,
96
+ we as AutoRefresh,
97
+ Ie as BODY_CONTENT_VIEWPORT_HEIGHT,
98
+ ve as ConfirmModal,
99
+ U as DetailModal,
100
+ He as EXPORT_MAX_LIMIT,
101
+ je as FORM_CONFIG_SELECT_ALL_VALUE,
102
+ $e as FORM_ITEM_CHANGE_LOADING,
103
+ G as FormMain,
104
+ N as FormRadioGroup,
105
+ dt as FormSearch,
106
+ Y as FormSelect,
107
+ K as FormTree,
108
+ k as FormVerifyCode,
109
+ At as FormVerifyImage,
110
+ z as HeightProvider,
111
+ Et as ListPage,
112
+ j as MenuItemSub,
113
+ q as MenuTree,
114
+ Z as ModalPorter,
115
+ ee as ModalShelf,
116
+ ke as OPERATE_COLUMN_PROP,
117
+ Pt as PanelEditSwitch,
118
+ oe as PanelItem,
119
+ ae as PanelMain,
120
+ gt as ROUTE_MODULE_LEVEL,
121
+ me as SelectModule,
122
+ Pe as TABS_MAIN_VISUAL_LEVEL,
123
+ Lt as TableMain,
124
+ le as TabsMain,
125
+ Mt as TabsMainReplaceQueryKey,
126
+ ue as TriggerAutoImport,
127
+ ne as WatchSize,
128
+ p as appLayoutInstall,
129
+ Ct as checkLogin,
130
+ Ft as checkPermission,
131
+ Dt as countAll,
132
+ g as createAdminBridge,
133
+ bt as createAppStore,
134
+ Vt as createGenerateRouteMetaRawTree,
135
+ wt as createGuard,
136
+ yt as createListApi,
137
+ vt as createRoutePermissionStore,
138
+ Ht as createStorageWithNamespace,
139
+ Wt as createUseState,
140
+ Xt as createUserStore,
106
141
  r as displayInstall,
107
- Ae as exportCSV,
108
- ft as fetchListAll,
109
- It as flatRouteMetaResolveRaw,
142
+ We as exportCSV,
143
+ Bt as fetchListAll,
144
+ Qt as flatRouteMetaResolveRaw,
110
145
  t as formInstall,
111
- Oe as generateFormData,
112
- he as getBlurSubmit,
113
- De as getChangeSubmit,
114
- Te as getConfirmPasswordRule,
115
- Ne as getDatePickerShortcuts,
116
- ye as getEnterSubmit,
117
- Mt as getId,
118
- de as getModalShelfInjectionKey,
119
- be as getPlaceholder,
120
- Et as getRoutePermissionKey,
121
- Ge as getVModelSugar,
122
- E as installComponents,
146
+ et as generateFormData,
147
+ tt as getBlurSubmit,
148
+ ot as getChangeSubmit,
149
+ Qe as getConfirmPasswordRule,
150
+ rt as getDatePickerShortcuts,
151
+ at as getEnterSubmit,
152
+ Zt as getId,
153
+ Se as getModalShelfInjectionKey,
154
+ ft as getPlaceholder,
155
+ qt as getRoutePermissionKey,
156
+ mt as getVModelSugar,
157
+ I as installComponents,
123
158
  s as listPageInstall,
124
159
  o as menuInstall,
125
160
  a as miscInstall,
126
- m as modalInstall,
161
+ f as modalInstall,
127
162
  l as panelInstall,
128
- ve as parseFormData,
129
- Fe as passwordRule,
130
- _e as pickExportColumns,
131
- we as resolveFormLayout,
132
- Le as setFormComponentType,
133
- Be as setInputComponent,
134
- He as setSelectComponent,
135
- Ue as stringifyFormData,
136
- Ve as swiftFormItemConfig,
137
- f as tableInstall,
138
- _t as timeCountDown,
139
- St as useActivated,
140
- Tt as useActivatedEvent,
141
- Ft as useActivatedExec,
142
- Pt as useFeelSize,
143
- Ot as useMenusDataDispatch,
144
- Dt as useTimeout
163
+ st as parseFormData,
164
+ qe as passwordRule,
165
+ ze as pickExportColumns,
166
+ lt as resolveFormLayout,
167
+ Je as setFormComponentType,
168
+ pt as setInputComponent,
169
+ ut as setSelectComponent,
170
+ it as stringifyFormData,
171
+ nt as swiftFormItemConfig,
172
+ m as tableInstall,
173
+ eo as timeCountDown,
174
+ oo as useActivated,
175
+ ro as useActivatedEvent,
176
+ ao as useActivatedExec,
177
+ mo as useBreakpoint,
178
+ lo as useChannelViewportHeight,
179
+ uo as useFeelSize,
180
+ no as useMenusDataDispatch,
181
+ co as useTimeout
145
182
  };
package/es/inject/key.mjs CHANGED
@@ -1,13 +1,23 @@
1
- const o = Symbol.for(
1
+ const E = Symbol.for(
2
2
  "BODY_CONTENT_VIEWPORT_HEIGHT"
3
- ), _ = Symbol.for(
4
- "FULLSCREEN_HEIGHT_CHANNEL"
5
3
  );
6
- function H(E) {
7
- return Symbol.for(`MODAL_SHELF_${E}`);
4
+ function o(_) {
5
+ return Symbol.for(`MODAL_SHELF_${_}`);
8
6
  }
7
+ const A = Symbol.for(
8
+ "TABS_MAIN_VISUAL_LEVEL"
9
+ ), T = Symbol.for(
10
+ "APP_LAYOUT_APP_STORE_KEY"
11
+ ), P = Symbol.for(
12
+ "APP_LAYOUT_USER_STORE_KEY"
13
+ ), S = Symbol.for(
14
+ "APP_LAYOUT_BRIDGE_KEY"
15
+ );
9
16
  export {
10
- o as BODY_CONTENT_VIEWPORT_HEIGHT,
11
- _ as FULLSCREEN_HEIGHT_CHANNEL,
12
- H as getModalShelfInjectionKey
17
+ T as APP_LAYOUT_APP_STORE_KEY,
18
+ S as APP_LAYOUT_BRIDGE_KEY,
19
+ P as APP_LAYOUT_USER_STORE_KEY,
20
+ E as BODY_CONTENT_VIEWPORT_HEIGHT,
21
+ A as TABS_MAIN_VISUAL_LEVEL,
22
+ o as getModalShelfInjectionKey
13
23
  };
@@ -0,0 +1,31 @@
1
+ import { checkLogin as P } from "./login.mjs";
2
+ import { checkPermission as c } from "./permission.mjs";
3
+ const p = (s, r) => {
4
+ const { bridge: t, useRoutePermission: a } = r;
5
+ s.beforeEach(async (e, n, o) => {
6
+ const i = a();
7
+ if (!await P(e, i))
8
+ return o({
9
+ path: t.APP_ROUTER_PATHS_CONFIG.loginPath,
10
+ query: {
11
+ from: encodeURIComponent(e.fullPath)
12
+ }
13
+ });
14
+ if (!await c(e, i))
15
+ return o({
16
+ path: t.APP_ROUTER_PATHS_CONFIG.noPermissionPath,
17
+ query: {
18
+ target: encodeURIComponent(e.fullPath)
19
+ }
20
+ });
21
+ o();
22
+ }), s.beforeResolve((e) => {
23
+ const n = e.meta;
24
+ document.title = n.title;
25
+ });
26
+ };
27
+ export {
28
+ P as checkLogin,
29
+ c as checkPermission,
30
+ p as createGuard
31
+ };
@@ -0,0 +1,4 @@
1
+ const o = async (e, c) => !c.checkNeedGoToLoginPage(e);
2
+ export {
3
+ o as checkLogin
4
+ };
@@ -0,0 +1,4 @@
1
+ const o = async (e, c) => !c.checkNeedGoToAuthPage(e);
2
+ export {
3
+ o as checkPermission
4
+ };
@@ -0,0 +1,103 @@
1
+ import { defineStore as k } from "pinia";
2
+ import { useRoute as R } from "vue-router";
3
+ import { ref as n, computed as t, watch as U } from "vue";
4
+ function M(b) {
5
+ const { bridge: o } = b;
6
+ return k("APP", () => {
7
+ const a = o.APP_LAYOUT_HEADER_CONFIG.height, d = o.APP_LAYOUT_FOOTER_CONFIG.height, P = n(o.APP_BASE_INFO.name), s = n(!1), T = n(!1), c = n(!1), i = n(!1), S = t(() => c.value ? o.APP_LAYOUT_SIDEBAR_CONFIG.collapseWidth : o.APP_LAYOUT_SIDEBAR_CONFIG.width), C = R(), r = t(
8
+ () => s.value ? o.APP_THEME_CONFIG.dark : o.APP_THEME_CONFIG.light
9
+ ), h = t(() => C.meta), l = t(() => h.value.layout), E = t(() => h.value.keepAlive), m = t(
10
+ () => {
11
+ var e;
12
+ return ((e = l.value) == null ? void 0 : e.header) ?? o.APP_ROUTER_META_DEFAULT_CONFIG.showHeader;
13
+ }
14
+ ), g = t(
15
+ () => {
16
+ var e;
17
+ return ((e = l.value) == null ? void 0 : e.footer) ?? o.APP_ROUTER_META_DEFAULT_CONFIG.showFooter;
18
+ }
19
+ ), v = t(
20
+ () => {
21
+ var e;
22
+ return (((e = l.value) == null ? void 0 : e.sidebar) ?? o.APP_ROUTER_META_DEFAULT_CONFIG.showSidebar) && i.value;
23
+ }
24
+ ), O = t(
25
+ () => {
26
+ var e;
27
+ return ((e = l.value) == null ? void 0 : e.breadcrumb) ?? o.APP_ROUTER_META_DEFAULT_CONFIG.showBreadcrumb;
28
+ }
29
+ ), _ = t(
30
+ () => {
31
+ var e;
32
+ return ((e = l.value) == null ? void 0 : e.bodyShimPadding) ?? o.APP_LAYOUT_BODY_CONFIG.shimPadding;
33
+ }
34
+ ), u = t(() => ({
35
+ height: `${m.value ? a : 0}px`,
36
+ backgroundColor: r.value.bodyColor,
37
+ color: r.value.baseColor
38
+ })), p = t(() => ({
39
+ height: `${g.value ? d : 0}px`,
40
+ backgroundColor: r.value.bodyColor
41
+ })), A = t(() => ({
42
+ width: `${v.value ? S.value : 0}px`,
43
+ paddingTop: u.value.height,
44
+ backgroundColor: r.value.bodyColor,
45
+ color: r.value.baseColor
46
+ })), I = t(() => ({
47
+ paddingLeft: A.value.width,
48
+ paddingTop: u.value.height,
49
+ backgroundColor: r.value.bodyColor
50
+ })), F = t(() => ({
51
+ minHeight: `calc(100vh - ${u.value.height} - ${p.value.height})`,
52
+ padding: `${_.value}px`
53
+ })), f = (e) => {
54
+ c.value = e;
55
+ }, y = (e) => {
56
+ i.value = e;
57
+ }, N = (e) => {
58
+ s.value = e;
59
+ };
60
+ return U(
61
+ s,
62
+ () => {
63
+ const e = document.documentElement.className;
64
+ s.value ? document.documentElement.className = `${e} dark`.trim() : document.documentElement.className = e.replace(/\bdark\b/g, "").trim();
65
+ },
66
+ {
67
+ immediate: !0
68
+ }
69
+ ), {
70
+ name: P,
71
+ isDarkTheme: t(() => s.value),
72
+ theme: r,
73
+ extractLevel1ToHeader: T,
74
+ showHeader: m,
75
+ showFooter: g,
76
+ showSidebar: v,
77
+ showBreadcrumb: O,
78
+ keepAlive: E,
79
+ headerStyle: u,
80
+ footerStyle: p,
81
+ sidebarStyle: A,
82
+ bodyStyle: I,
83
+ bodyShimPadding: _,
84
+ bodyShimStyle: F,
85
+ sidebarIsCollapse: t(() => c.value),
86
+ changeSidebarCollapseStatus: f,
87
+ changeSidebarHasMenusStatus: y,
88
+ changeIsDarkTheme: N
89
+ };
90
+ }, {
91
+ persist: {
92
+ storage: {
93
+ getItem: (a) => o.getStorage().getItem(a),
94
+ setItem: (a, d) => o.getStorage().setItem(a, d),
95
+ removeItem: (a) => o.getStorage().removeItem(a)
96
+ },
97
+ pick: ["isDarkTheme"]
98
+ }
99
+ });
100
+ }
101
+ export {
102
+ M as createAppStore
103
+ };
@@ -0,0 +1,65 @@
1
+ import { defineStore as T } from "pinia";
2
+ import { computed as a, watch as p } from "vue";
3
+ import { useRoute as U, useRouter as C } from "vue-router";
4
+ import { getRoutePermissionKey as N } from "../utils/router.mjs";
5
+ function F(h) {
6
+ const { bridge: u, useUserStore: l, paths: o } = h;
7
+ return T("ROUTE_PERMISSION", () => {
8
+ const t = U(), i = C(), s = l(), c = a(() => s.isLogin), f = (e) => {
9
+ var r;
10
+ if (o.loginNoCheck.includes(e.path))
11
+ return !1;
12
+ const n = e.meta;
13
+ return !!N({
14
+ path: e.path,
15
+ permission: n.permission
16
+ }) || (((r = n.permission) == null ? void 0 : r.login) ?? u.APP_ROUTER_META_DEFAULT_CONFIG.needLogin);
17
+ }, m = (e) => f(e) && !c.value, P = a(() => m(t)), g = (e) => o.authNoCheck.includes(e.path) ? !1 : !s.havePermissionByPath(e.path), d = a(() => c.value && g(t)), R = (e = t, n = "replace") => {
18
+ s.noApiLogout();
19
+ const { fullPath: r, path: L } = e;
20
+ L !== o.login && t.path !== o.login && i[n]({
21
+ path: o.login,
22
+ query: {
23
+ from: encodeURIComponent(r)
24
+ }
25
+ });
26
+ };
27
+ return u.register({ goToLogin: R }), p(
28
+ P,
29
+ (e) => {
30
+ e && i.replace({
31
+ path: o.login,
32
+ query: {
33
+ from: encodeURIComponent(t.fullPath)
34
+ }
35
+ });
36
+ },
37
+ {
38
+ immediate: !0
39
+ }
40
+ ), p(
41
+ d,
42
+ (e) => {
43
+ if (e) {
44
+ const n = t.meta;
45
+ i.replace({
46
+ path: o.noPermission,
47
+ query: {
48
+ target: encodeURIComponent(t.fullPath),
49
+ title: encodeURIComponent(n.title || "")
50
+ }
51
+ });
52
+ }
53
+ },
54
+ {
55
+ immediate: !0
56
+ }
57
+ ), {
58
+ checkNeedGoToAuthPage: g,
59
+ checkNeedGoToLoginPage: m
60
+ };
61
+ });
62
+ }
63
+ export {
64
+ F as createRoutePermissionStore
65
+ };