@done-coding/admin-core 0.3.1-alpha.0 → 0.5.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 (81) hide show
  1. package/es/bridge/index.mjs +83 -27
  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/index.mjs +13 -11
  20. package/es/components/misc/ActionBtn.vue.mjs +84 -65
  21. package/es/components/misc/ActionConfirm.vue.mjs +1 -1
  22. package/es/components/misc/ActionConfirm.vue2.mjs +77 -71
  23. package/es/components/misc/SelectModule.vue.mjs +55 -0
  24. package/es/components/misc/SelectModule.vue2.mjs +4 -0
  25. package/es/components/modal/ConfirmModal.vue.mjs +1 -1
  26. package/es/components/modal/ConfirmModal.vue2.mjs +13 -12
  27. package/es/components/modal/modal-shelf-hierarchy.mjs +4 -6
  28. package/es/components/table/ToolbarButtons.vue.mjs +10 -40
  29. package/es/index.mjs +165 -132
  30. package/es/inject/key.mjs +15 -6
  31. package/es/router/guard/index.mjs +31 -0
  32. package/es/router/guard/login.mjs +4 -0
  33. package/es/router/guard/permission.mjs +4 -0
  34. package/es/store/app.mjs +103 -0
  35. package/es/store/router-permission.mjs +65 -0
  36. package/es/store/user.mjs +52 -52
  37. package/es/style.css +1 -1
  38. package/package.json +2 -2
  39. package/types/bridge/index.d.ts +180 -76
  40. package/types/components/app-layout/AppBody.vue.d.ts +45 -0
  41. package/types/components/app-layout/AppBreadcrumb.vue.d.ts +25 -0
  42. package/types/components/app-layout/AppFooter.vue.d.ts +2 -0
  43. package/types/components/app-layout/AppHeader.vue.d.ts +55 -0
  44. package/types/components/app-layout/AppLayout.vue.d.ts +76 -0
  45. package/types/components/app-layout/AppPage.vue.d.ts +54 -0
  46. package/types/components/app-layout/AppSidebar.vue.d.ts +51 -0
  47. package/types/components/app-layout/index.d.ts +27 -0
  48. package/types/components/app-layout/types.d.ts +43 -0
  49. package/types/components/display/ActionBtnGroup.vue.d.ts +16 -0
  50. package/types/components/display/TabsHeader.vue.d.ts +8 -8
  51. package/types/components/display/index.d.ts +10 -1
  52. package/types/components/display/types.d.ts +42 -1
  53. package/types/components/form/types.d.ts +2 -2
  54. package/types/components/misc/ActionBtn.vue.d.ts +17 -23
  55. package/types/components/misc/ActionConfirm.vue.d.ts +56 -27
  56. package/types/components/misc/SelectModule.vue.d.ts +2 -0
  57. package/types/components/misc/index.d.ts +2 -1
  58. package/types/components/misc/types.d.ts +35 -26
  59. package/types/components/modal/ConfirmModal.vue.d.ts +19 -2
  60. package/types/components/modal/modal-shelf-hierarchy.d.ts +1 -1
  61. package/types/components/table/TableToolbar.vue.d.ts +8 -8
  62. package/types/components/table/types.d.ts +10 -12
  63. package/types/config/list-model.d.ts +2 -0
  64. package/types/helpers/index.d.ts +10 -3
  65. package/types/index.d.ts +4 -1
  66. package/types/inject/key.d.ts +25 -0
  67. package/types/router/guard/index.d.ts +21 -0
  68. package/types/router/guard/login.d.ts +5 -0
  69. package/types/router/guard/permission.d.ts +5 -0
  70. package/types/router/guard/types.d.ts +15 -0
  71. package/types/router/index.d.ts +1 -0
  72. package/types/store/app.d.ts +149 -0
  73. package/types/store/index.d.ts +2 -0
  74. package/types/store/router-permission.d.ts +80 -0
  75. package/types/store/user.d.ts +11 -9
  76. /package/es/{helpers → bridge}/route.mjs +0 -0
  77. /package/es/{helpers → bridge}/state.mjs +0 -0
  78. /package/es/{helpers → bridge}/storage.mjs +0 -0
  79. /package/types/{helpers → bridge}/route.d.ts +0 -0
  80. /package/types/{helpers → bridge}/state.d.ts +0 -0
  81. /package/types/{helpers → bridge}/storage.d.ts +0 -0
@@ -2,7 +2,7 @@ import o from "./ConfirmModal.vue2.mjs";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import r from "../../_virtual/_plugin-vue_export-helper.mjs";
5
- const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2f0c870e"]]);
5
+ const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-dfc2f447"]]);
6
6
  export {
7
7
  a as default
8
8
  };
@@ -3,7 +3,7 @@ import "element-plus/es/components/base/style/css";
3
3
  import "element-plus/es/components/dialog/style/css";
4
4
  import "element-plus/es/components/icon/style/css";
5
5
  import "element-plus/es/components/button/style/css";
6
- import { defineComponent as V, ref as $, computed as F, openBlock as l, createBlock as i, withCtx as r, createElementVNode as c, renderSlot as u, resolveDynamicComponent as w, createElementBlock as m, Fragment as B, createTextVNode as d, toDisplayString as f, unref as y, createCommentVNode as x, createVNode as C } from "vue";
6
+ import { defineComponent as V, ref as $, computed as F, openBlock as l, createBlock as i, withCtx as d, createElementVNode as c, renderSlot as u, resolveDynamicComponent as w, createElementBlock as m, Fragment as B, createTextVNode as r, toDisplayString as f, unref as y, createCommentVNode as x, createVNode as C } from "vue";
7
7
  import { Close as L } from "@element-plus/icons-vue";
8
8
  const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z = { class: "content" }, A = ["reverse"], W = /* @__PURE__ */ V({
9
9
  inheritAttrs: !1,
@@ -23,7 +23,8 @@ const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z =
23
23
  reverse: { type: Boolean, default: !1 },
24
24
  closeOnPressEscape: { type: Boolean, default: !0 },
25
25
  closeOnClickModal: { type: Boolean, default: !0 },
26
- useLoading: { type: Boolean }
26
+ useLoading: { type: Boolean },
27
+ type: { default: "primary" }
27
28
  },
28
29
  emits: ["update:show"],
29
30
  setup(e, { emit: E }) {
@@ -66,20 +67,20 @@ const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z =
66
67
  "close-on-press-escape": e.closeOnPressEscape,
67
68
  onClose: b
68
69
  }, {
69
- default: r(() => [
70
+ default: d(() => [
70
71
  c("div", M, [
71
72
  c("div", I, [
72
73
  c("div", P, [
73
74
  u(n.$slots, "title", {}, () => [
74
75
  typeof e.title == "function" ? (l(), i(w(e.title), { key: 0 })) : (l(), m(B, { key: 1 }, [
75
- d(f(e.title), 1)
76
+ r(f(e.title), 1)
76
77
  ], 64))
77
78
  ], !0)
78
79
  ]),
79
80
  c("div", z, [
80
81
  u(n.$slots, "default", {}, () => [
81
82
  typeof e.content == "function" ? (l(), i(w(e.content), { key: 0 })) : (l(), m(B, { key: 1 }, [
82
- d(f(e.content), 1)
83
+ r(f(e.content), 1)
83
84
  ], 64))
84
85
  ], !0)
85
86
  ]),
@@ -98,22 +99,22 @@ const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z =
98
99
  btnHover: "",
99
100
  onClick: g
100
101
  }, {
101
- default: r(() => [
102
- d(f(typeof e.cancelText == "function" ? e.cancelText() : e.cancelText), 1)
102
+ default: d(() => [
103
+ r(f(typeof e.cancelText == "function" ? e.cancelText() : e.cancelText), 1)
103
104
  ]),
104
105
  _: 1
105
106
  })),
106
107
  C(k, {
107
- type: "primary",
108
+ type: e.type,
108
109
  class: "btn confirm-btn",
109
110
  loading: y(h),
110
111
  onClick: v
111
112
  }, {
112
- default: r(() => [
113
- d(f(typeof e.confirmText == "function" ? e.confirmText() : e.confirmText), 1)
113
+ default: d(() => [
114
+ r(f(typeof e.confirmText == "function" ? e.confirmText() : e.confirmText), 1)
114
115
  ]),
115
116
  _: 1
116
- }, 8, ["loading"])
117
+ }, 8, ["type", "loading"])
117
118
  ], !0)
118
119
  ], 8, A)
119
120
  ]),
@@ -123,7 +124,7 @@ const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z =
123
124
  onClick: t[0] || (t[0] = (j) => s())
124
125
  }, [
125
126
  C(H, { size: 22 }, {
126
- default: r(() => [
127
+ default: d(() => [
127
128
  C(y(L))
128
129
  ]),
129
130
  _: 1
@@ -1,4 +1,4 @@
1
- function l(o, e) {
1
+ function i(o, e) {
2
2
  if (o === "app" && e.length > 0) {
3
3
  console.error(
4
4
  `[ModalShelf] level="app" 必须最顶层,但其上存在: ${e.join(
@@ -8,14 +8,12 @@ function l(o, e) {
8
8
  return;
9
9
  }
10
10
  if (o === "page") {
11
- const r = e.filter((a) => a === "page" || a === "custom");
11
+ const r = e.filter((l) => l === "custom");
12
12
  r.length > 0 && console.error(
13
- `[ModalShelf] level="page" 之上不得套 page/custom,发现: ${r.join(
14
- ", "
15
- )}`
13
+ `[ModalShelf] level="page" 之上不得套 custom,发现: ${r.join(", ")}`
16
14
  );
17
15
  }
18
16
  }
19
17
  export {
20
- l as assertLevelHierarchy
18
+ i as assertLevelHierarchy
21
19
  };
@@ -1,49 +1,19 @@
1
- import { ElButton as p } from "element-plus/es";
2
- import "element-plus/es/components/base/style/css";
3
- import "element-plus/es/components/button/style/css";
4
- import { defineComponent as y, openBlock as t, createElementBlock as r, Fragment as n, renderList as d, createBlock as c, resolveDynamicComponent as u, unref as x, mergeProps as l, withCtx as m, createTextVNode as i, toDisplayString as f } from "vue";
5
- import B from "../misc/ActionButton.vue.mjs";
6
- const A = /* @__PURE__ */ y({
1
+ import { defineComponent as o, openBlock as n, createBlock as e, unref as c } from "vue";
2
+ import r from "../display/ActionBtnGroup.vue.mjs";
3
+ const l = /* @__PURE__ */ o({
7
4
  __name: "ToolbarButtons",
8
5
  props: {
9
6
  buttons: {},
10
7
  ctx: {}
11
8
  },
12
- setup(o) {
13
- const s = B;
14
- return (_, R) => {
15
- const k = p;
16
- return t(!0), r(n, null, d(o.buttons, (e) => {
17
- var a;
18
- return t(), r(n, {
19
- key: e.key
20
- }, [
21
- e.actionButtonProps ? (t(), c(u(x(s)), l({
22
- key: 0,
23
- ref_for: !0
24
- }, e.actionButtonProps(o.ctx)), {
25
- default: m(() => [
26
- e.btnRender ? (t(), c(u(() => e.btnRender(o.ctx)), { key: 0 })) : (t(), r(n, { key: 1 }, [
27
- i(f(e.label), 1)
28
- ], 64))
29
- ]),
30
- _: 2
31
- }, 1040)) : (t(), c(k, l({
32
- key: 1,
33
- ref_for: !0
34
- }, (a = e.props) == null ? void 0 : a.call(e, o.ctx)), {
35
- default: m(() => [
36
- e.btnRender ? (t(), c(u(() => e.btnRender(o.ctx)), { key: 0 })) : (t(), r(n, { key: 1 }, [
37
- i(f(e.label), 1)
38
- ], 64))
39
- ]),
40
- _: 2
41
- }, 1040))
42
- ], 64);
43
- }), 128);
44
- };
9
+ setup(t) {
10
+ return (s, a) => (n(), e(c(r), {
11
+ configs: t.buttons,
12
+ ctx: t.ctx,
13
+ "default-size": "small"
14
+ }, null, 8, ["configs", "ctx"]));
45
15
  }
46
16
  });
47
17
  export {
48
- A as default
18
+ l as default
49
19
  };
package/es/index.mjs CHANGED
@@ -2,148 +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 E } from "./bridge/index.mjs";
10
- import { default as S } from "./components/misc/ActionBtn.vue.mjs";
11
- import { default as C } from "./components/misc/ActionButton.vue.mjs";
12
- import { default as P } from "./components/misc/ActionButtonDanger.vue.mjs";
13
- import { default as R } from "./components/misc/ActionButtonWarn.vue.mjs";
14
- import { default as O } from "./components/modal/DetailModal.vue.mjs";
15
- import { default as y } from "./components/form/FormMain.vue.mjs";
16
- import { default as B } from "./components/form/FormRadioGroup.vue.mjs";
17
- import { default as b } from "./components/form/FormSelect.vue.mjs";
18
- import { default as v } 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/display/TabsMain.vue.mjs";
28
- import { default as ae } from "./components/misc/TriggerAutoImport.vue.mjs";
29
- import { default as fe } from "./components/display/WatchSize.vue.mjs";
30
- import { APP_API_LIST_MODEL_KEY_CONFIG as le } from "./config/list-model.mjs";
31
- import { default as ie } from "./components/misc/ActionConfirm.vue.mjs";
32
- import { default as pe } from "./components/misc/AutoRefresh.vue.mjs";
33
- import { BODY_CONTENT_VIEWPORT_HEIGHT as de, TABS_MAIN_VISUAL_LEVEL as ce, getModalShelfInjectionKey as Ie } from "./inject/key.mjs";
34
- import { default as Ae } from "./components/modal/ConfirmModal.vue.mjs";
35
- import { EXPORT_MAX_LIMIT as Ee, OPERATE_COLUMN_PROP as _e, exportCSV as Se, pickExportColumns as Te } from "./utils/export.mjs";
36
- import { FORM_CONFIG_SELECT_ALL_VALUE as Le, getConfirmPasswordRule as Pe, passwordRule as Fe, setFormComponentType as Re } from "./helpers/form.mjs";
37
- import { FORM_ITEM_CHANGE_LOADING as Oe, generateFormData as De, getBlurSubmit as ye, getChangeSubmit as Ve, getDatePickerShortcuts as Be, getEnterSubmit as Ne, getPlaceholder as be, getVModelSugar as we, parseFormData as ve, resolveFormLayout as Ge, setInputComponent as Ue, setSelectComponent as He, stringifyFormData as Ke, swiftFormItemConfig as We } from "./components/form/utils.mjs";
38
- import { default as ze } from "./components/form/FormSearch.vue.mjs";
39
- import { default as Ye } from "./components/form/FormVerifyImage.vue.mjs";
40
- import { default as Qe } from "./components/list-page/ListPage.vue.mjs";
41
- import { default as Je } from "./components/panel/PanelEditSwitch.vue.mjs";
42
- import { ROUTE_MODULE_LEVEL as $e, TabsMainReplaceQueryKey as et } from "./config/route.mjs";
43
- import { default as ot } from "./components/table/TableMain.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 gt } 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 Tt, useActivatedEvent as Ct, useActivatedExec as Lt } from "./hooks/activated.mjs";
53
- import { useBreakpoint as Ft } from "./hooks/use-breakpoint.mjs";
54
- import { useChannelViewportHeight as ht } from "./hooks/use-channel-viewport-height.mjs";
55
- import { useFeelSize as Dt } from "./hooks/feel-size.mjs";
56
- import { useMenusDataDispatch as Vt } from "./hooks/menus-dispatch.mjs";
57
- import { useTimeout as Nt } from "./hooks/timeout.mjs";
58
- const g = {
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 = {
59
74
  install(e) {
60
- 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);
61
76
  }
62
77
  };
63
78
  export {
64
- le as APP_API_LIST_MODEL_KEY_CONFIG,
65
- S as ActionBtn,
66
- C as ActionButton,
67
- P as ActionButtonDanger,
68
- R as ActionButtonWarn,
69
- ie as ActionConfirm,
70
- pe as AutoRefresh,
71
- de as BODY_CONTENT_VIEWPORT_HEIGHT,
72
- Ae as ConfirmModal,
73
- O as DetailModal,
74
- Ee as EXPORT_MAX_LIMIT,
75
- Le as FORM_CONFIG_SELECT_ALL_VALUE,
76
- Oe as FORM_ITEM_CHANGE_LOADING,
77
- y as FormMain,
78
- B as FormRadioGroup,
79
- ze as FormSearch,
80
- b as FormSelect,
81
- v as FormTree,
82
- U as FormVerifyCode,
83
- Ye as FormVerifyImage,
84
- K as HeightProvider,
85
- Qe as ListPage,
86
- k as MenuItemSub,
87
- X as MenuTree,
88
- j as ModalPorter,
89
- q as ModalShelf,
90
- _e as OPERATE_COLUMN_PROP,
91
- Je as PanelEditSwitch,
92
- Z as PanelItem,
93
- ee as PanelMain,
94
- $e as ROUTE_MODULE_LEVEL,
95
- ce as TABS_MAIN_VISUAL_LEVEL,
96
- ot as TableMain,
97
- oe as TabsMain,
98
- et as TabsMainReplaceQueryKey,
99
- ae as TriggerAutoImport,
100
- fe as WatchSize,
101
- at as countAll,
102
- E as createAdminBridge,
103
- lt as createGenerateRouteMetaRawTree,
104
- mt as createListApi,
105
- it as createStorageWithNamespace,
106
- pt as createUseState,
107
- 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,
108
141
  r as displayInstall,
109
- Se as exportCSV,
110
- ft as fetchListAll,
111
- It as flatRouteMetaResolveRaw,
142
+ We as exportCSV,
143
+ Bt as fetchListAll,
144
+ Qt as flatRouteMetaResolveRaw,
112
145
  t as formInstall,
113
- De as generateFormData,
114
- ye as getBlurSubmit,
115
- Ve as getChangeSubmit,
116
- Pe as getConfirmPasswordRule,
117
- Be as getDatePickerShortcuts,
118
- Ne as getEnterSubmit,
119
- Mt as getId,
120
- Ie as getModalShelfInjectionKey,
121
- be as getPlaceholder,
122
- gt as getRoutePermissionKey,
123
- we as getVModelSugar,
124
- g 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,
125
158
  s as listPageInstall,
126
159
  o as menuInstall,
127
160
  a as miscInstall,
128
- m as modalInstall,
161
+ f as modalInstall,
129
162
  l as panelInstall,
130
- ve as parseFormData,
131
- Fe as passwordRule,
132
- Te as pickExportColumns,
133
- Ge as resolveFormLayout,
134
- Re as setFormComponentType,
135
- Ue as setInputComponent,
136
- He as setSelectComponent,
137
- Ke as stringifyFormData,
138
- We as swiftFormItemConfig,
139
- f as tableInstall,
140
- _t as timeCountDown,
141
- Tt as useActivated,
142
- Ct as useActivatedEvent,
143
- Lt as useActivatedExec,
144
- Ft as useBreakpoint,
145
- ht as useChannelViewportHeight,
146
- Dt as useFeelSize,
147
- Vt as useMenusDataDispatch,
148
- Nt 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
149
182
  };
package/es/inject/key.mjs CHANGED
@@ -1,14 +1,23 @@
1
- const o = Symbol.for(
1
+ const E = Symbol.for(
2
2
  "BODY_CONTENT_VIEWPORT_HEIGHT"
3
3
  );
4
- function E(_) {
4
+ function o(_) {
5
5
  return Symbol.for(`MODAL_SHELF_${_}`);
6
6
  }
7
- const T = Symbol.for(
7
+ const A = Symbol.for(
8
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"
9
15
  );
10
16
  export {
11
- o as BODY_CONTENT_VIEWPORT_HEIGHT,
12
- T as TABS_MAIN_VISUAL_LEVEL,
13
- E 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
14
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
+ };