@pubinfo/module-rbac 2.1.10-beta.2 → 2.1.11

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 (226) hide show
  1. package/dist/ComponentSelect-A7uGTuHW.js +3498 -0
  2. package/dist/{DynamicRoutesForm-DP_sq_Uu.js → DynamicRoutesForm-DSzy_bh5.js} +43 -42
  3. package/dist/HCheckList-ODQHidN8.js +37 -0
  4. package/dist/HoverCard-CmJCoa2b.js +44 -0
  5. package/dist/{IconSelect-CiLpc63Z.js → IconSelect-DouEg3xY.js} +89 -88
  6. package/dist/ImportExport-DisdLoY8.js +342 -0
  7. package/dist/{LayoutForm-Cp4bBrYl.js → LayoutForm-Bdfs5WeK.js} +35 -34
  8. package/dist/{MetaForm-CVSgktB_.js → MetaForm-CcDwS8vh.js} +6128 -6143
  9. package/dist/{OrgAndPosition-ClASobEv.js → OrgAndPosition-jDX7m0HD.js} +61 -60
  10. package/dist/{ResourceEdit-w8qh1MFO.js → ResourceEdit-0BYZRye_.js} +128 -127
  11. package/dist/{ResourceRelation-ChEwIbWM.js → ResourceRelation-CU-QpUhP.js} +25 -25
  12. package/dist/{ResourceRelation-D_j898zp.js → ResourceRelation-roz0a8Td.js} +35 -34
  13. package/dist/{RoleRelation-DzyVn5dk.js → RoleRelation-BQQFaum0.js} +28 -27
  14. package/dist/{RoleSelector-Cd6_RUsc.js → RoleSelector-gkar_UGG.js} +89 -89
  15. package/dist/{TenantEdit-BOvXk7BZ.js → TenantEdit-BsahDUlf.js} +94 -93
  16. package/dist/{UserAuthorization-DLeivbs7.js → UserAuthorization-2Fl4IGw7.js} +81 -80
  17. package/dist/{UserEdit-YKS1FVW_.js → UserEdit-CX3Qau8T.js} +102 -101
  18. package/dist/{animation_item-BU-LInxP.js → animation_item-DBOz2rcX.js} +20 -22
  19. package/dist/{blackWhiteList-CNQltBqC.js → blackWhiteList-DbG7JH8n.js} +69 -69
  20. package/dist/blackWhiteList.css +1 -1
  21. package/dist/breadcrumb_setting-DTR6CPZQ.js +108 -0
  22. package/dist/{browserType-Dn_hQtAN.js → browserType-B8A1Osvk.js} +11 -10
  23. package/dist/chunk-DiMWNkAf.js +18 -0
  24. package/dist/cloneDeep-CSOSavu3.js +6 -0
  25. package/dist/components/GroupSelector/index.vue.d.ts +7 -1
  26. package/dist/components/ResourceIcones/Select.vue.d.ts +2 -1
  27. package/dist/components/ResourceSelector/index.vue.d.ts +7 -1
  28. package/dist/components/RoleSelector/RoleSearch.vue.d.ts +9 -1
  29. package/dist/components/RoleSelector/RoleSelector.vue.d.ts +7 -1
  30. package/dist/{createAndEditDataPermission-CaOBJgoV.js → createAndEditDataPermission-8_KNLzJT.js} +49 -48
  31. package/dist/createAndEditDataPermission.css +1 -1
  32. package/dist/{data-permission-ZRQ-Aoib.js → data-permission-LpuDLDm0.js} +41 -41
  33. package/dist/{dayjs.min-sGDSMYRj.js → dayjs.min-Cb7gQFd4.js} +1 -1
  34. package/dist/{dictionary-CtGgtPfc.js → dictionary-CEaxjqZe.js} +46 -46
  35. package/dist/drawerBlackWhiteList-DXLdWurZ.js +120 -0
  36. package/dist/drawerDictionary-DYJTAZr6.js +126 -0
  37. package/dist/drawerDictionaryItem-BChXD2-q.js +138 -0
  38. package/dist/{drawerGroup-DEuiiDPP.js → drawerGroup-CdnZkZxi.js} +67 -66
  39. package/dist/drawerOrganization-CwtSFUj0.js +247 -0
  40. package/dist/drawerPosition-CfyfeQCN.js +166 -0
  41. package/dist/drawerRegion-DAwY_29K.js +183 -0
  42. package/dist/drawerRole-B7uCfHk-.js +154 -0
  43. package/dist/{drawerRole-Dv61PBZR.js → drawerRole-DK6DrinO.js} +77 -76
  44. package/dist/{drawerRole-DNDyOvXw.js → drawerRole-DrzMHL0O.js} +69 -68
  45. package/dist/{group-BbkZjv5e.js → group-CaOhkh72.js} +48 -48
  46. package/dist/group.css +1 -1
  47. package/dist/index.css +1 -1
  48. package/dist/index.js +613 -689
  49. package/dist/isEmpty-BjEzPyCa.js +12 -0
  50. package/dist/{itemlist-By-FV6pN.js → itemlist-CFwRUV2Y.js} +44 -44
  51. package/dist/json-asset-03f0a035.json +1 -0
  52. package/dist/json-asset-0ee63e7f.json +1 -0
  53. package/dist/json-asset-10eef4fe.json +1 -0
  54. package/dist/json-asset-13f452f1.json +1 -0
  55. package/dist/json-asset-14b7b290.json +1 -0
  56. package/dist/json-asset-15b8cef1.json +1 -0
  57. package/dist/json-asset-15f77960.json +1 -0
  58. package/dist/json-asset-1ae9b726.json +1 -0
  59. package/dist/json-asset-1b02359f.json +1 -0
  60. package/dist/json-asset-1ef286cd.json +1 -0
  61. package/dist/json-asset-23cfd18c.json +1 -0
  62. package/dist/json-asset-265a0a5d.json +1 -0
  63. package/dist/json-asset-28d57c49.json +1 -0
  64. package/dist/json-asset-2b54ed10.json +1 -0
  65. package/dist/json-asset-2bb6f642.json +1 -0
  66. package/dist/json-asset-2cdc07bd.json +1 -0
  67. package/dist/json-asset-31c58607.json +1 -0
  68. package/dist/json-asset-32884f23.json +1 -0
  69. package/dist/json-asset-32fca43a.json +1 -0
  70. package/dist/json-asset-3a75445b.json +1 -0
  71. package/dist/json-asset-3f27d67c.json +1 -0
  72. package/dist/json-asset-4189453f.json +1 -0
  73. package/dist/json-asset-4702b37c.json +1 -0
  74. package/dist/json-asset-520a5c68.json +1 -0
  75. package/dist/json-asset-56bea508.json +1 -0
  76. package/dist/json-asset-57c732a3.json +1 -0
  77. package/dist/json-asset-5be4a28f.json +1 -0
  78. package/dist/json-asset-5e6d7cfa.json +1 -0
  79. package/dist/json-asset-64e176c9.json +1 -0
  80. package/dist/json-asset-6583dca6.json +1 -0
  81. package/dist/json-asset-66c640c6.json +1 -0
  82. package/dist/json-asset-68393156.json +1 -0
  83. package/dist/json-asset-688465aa.json +1 -0
  84. package/dist/json-asset-6bf334f4.json +1 -0
  85. package/dist/json-asset-7b4f72ce.json +1 -0
  86. package/dist/json-asset-837ec087.json +1 -0
  87. package/dist/json-asset-838ac1ba.json +1 -0
  88. package/dist/json-asset-8465c2cf.json +1 -0
  89. package/dist/json-asset-9e9f04a4.json +1 -0
  90. package/dist/json-asset-a13964cb.json +1 -0
  91. package/dist/json-asset-ab93a057.json +1 -0
  92. package/dist/json-asset-abe308fc.json +1 -0
  93. package/dist/json-asset-b24f2cd3.json +1 -0
  94. package/dist/json-asset-bf00eaed.json +1 -0
  95. package/dist/json-asset-cb22efd7.json +1 -0
  96. package/dist/json-asset-cb953f20.json +1 -0
  97. package/dist/json-asset-cc209e34.json +1 -0
  98. package/dist/json-asset-cfdffceb.json +1 -0
  99. package/dist/json-asset-d33c0299.json +1 -0
  100. package/dist/json-asset-d430c8ca.json +1 -0
  101. package/dist/json-asset-d8cfa560.json +1 -0
  102. package/dist/json-asset-da91beb6.json +1 -0
  103. package/dist/json-asset-e2bdf85c.json +1 -0
  104. package/dist/json-asset-e34ad826.json +1 -0
  105. package/dist/json-asset-e80720aa.json +1 -0
  106. package/dist/json-asset-e894bc92.json +1 -0
  107. package/dist/json-asset-f28020f2.json +1 -0
  108. package/dist/json-asset-f71ebbf4.json +1 -0
  109. package/dist/json-asset-fb1f4917.json +1 -0
  110. package/dist/json-asset-ff2e97c4.json +1 -0
  111. package/dist/{layout_setting-BUAgQ1Bk.js → layout_setting-79srmFgJ.js} +11 -11
  112. package/dist/layout_setting.css +1 -1
  113. package/dist/{log-vjU7aBPR.js → log-BYris9iT.js} +6 -6
  114. package/dist/{loginHistoryDetail-C7GT2yME.js → loginHistoryDetail-CZnfmbbM.js} +24 -23
  115. package/dist/{login_history-D08W00Qu.js → login_history-BiwaLpxA.js} +33 -33
  116. package/dist/login_history.css +1 -1
  117. package/dist/menu_setting-C2GciMXz.js +155 -0
  118. package/dist/not-data-Bml86wdH.js +3 -0
  119. package/dist/{operateHistoryDetail-BaNJRfwy.js → operateHistoryDetail-HId-EZzy.js} +27 -26
  120. package/dist/{operate_history-kJwIuPg2.js → operate_history-sPd9IHMV.js} +33 -33
  121. package/dist/operate_history.css +1 -1
  122. package/dist/{organization-Cmj3DUXl.js → organization-Dv3FbKke.js} +1438 -1444
  123. package/dist/organization.css +1 -1
  124. package/dist/other_setting-oVuhA70c.js +213 -0
  125. package/dist/other_setting.css +1 -1
  126. package/dist/page_animation_setting-D0CtzyOZ.js +108 -0
  127. package/dist/page_animation_setting.css +1 -1
  128. package/dist/{page_w_setting-CD_HtSUv.js → page_w_setting-Q--ct16C.js} +11 -11
  129. package/dist/page_w_setting.css +1 -1
  130. package/dist/{position-CLpbgKGj.js → position-CCZ2MSMP.js} +41 -41
  131. package/dist/{region-Dd9pt_Si.js → region-D3mjqB8H.js} +62 -62
  132. package/dist/{resource-C7dXB0EE.js → resource-DaQ7CvM_.js} +69 -69
  133. package/dist/{role-JGtvRObt.js → role-4UgEw3nH.js} +49 -49
  134. package/dist/{role_group-CKOb_m63.js → role_group-hkRlCnyl.js} +41 -41
  135. package/dist/{safe_setting-G_ZP-jWQ.js → safe_setting-4fv3qNRZ.js} +85 -85
  136. package/dist/{setItem-yKhjmUh0.js → setItem-Vkcwkj-O.js} +33 -32
  137. package/dist/setItem.css +1 -1
  138. package/dist/tabbar_setting-DhrW4Jj5.js +139 -0
  139. package/dist/{tenant-BBiCJkU_.js → tenant-lWfGw2u1.js} +48 -48
  140. package/dist/{theme_setting-vhNDLlkc.js → theme_setting-CEb7UYQO.js} +47 -47
  141. package/dist/theme_setting.css +1 -1
  142. package/dist/toolbar_setting-znESrYgi.js +140 -0
  143. package/dist/useAppAndResource-B7FmNfKG.js +52 -0
  144. package/dist/{user-DvCyUhZW.js → user-BkUpcQC8.js} +96 -96
  145. package/dist/{vanilla-picker-DcG96G63.js → vanilla-picker-Byb6q187.js} +239 -239
  146. package/dist/views/blackWhiteList/components/drawerBlackWhiteList.vue.d.ts +5 -1
  147. package/dist/views/components/setItem.vue.d.ts +5 -1
  148. package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +5 -1
  149. package/dist/views/dictionary/components/drawerDictionary.vue.d.ts +5 -1
  150. package/dist/views/dictionary/components/drawerDictionaryItem.vue.d.ts +5 -1
  151. package/dist/views/group/components/drawerGroup.vue.d.ts +5 -1
  152. package/dist/views/log_center/components/loginHistoryDetail.vue.d.ts +8 -1
  153. package/dist/views/log_center/components/operateHistoryDetail.vue.d.ts +8 -1
  154. package/dist/views/organization/components/drawerOrganization.vue.d.ts +5 -1
  155. package/dist/views/organization/components/drawerRole.vue.d.ts +5 -1
  156. package/dist/views/other_setting/interface.d.ts +1 -2
  157. package/dist/views/position/components/drawerPosition.vue.d.ts +5 -1
  158. package/dist/views/region/components/drawerRegion.vue.d.ts +5 -1
  159. package/dist/views/resource/components/ImportExport.vue.d.ts +5 -1
  160. package/dist/views/resource/components/ResourceEdit.vue.d.ts +5 -1
  161. package/dist/views/role/components/drawerRole.vue.d.ts +5 -1
  162. package/dist/views/role_group/components/drawerRole.vue.d.ts +5 -1
  163. package/dist/views/tenant/components/TenantEdit.vue.d.ts +5 -1
  164. package/dist/views/user/components/UserAuthorization.vue.d.ts +5 -1
  165. package/dist/views/user/components/UserEdit.vue.d.ts +5 -1
  166. package/dist/watermark_setting-DYirSIAn.js +191 -0
  167. package/dist/watermark_setting.css +1 -1
  168. package/package.json +13 -13
  169. package/src/views/other_setting/index.vue +2 -2
  170. package/src/views/other_setting/interface.ts +1 -1
  171. package/dist/ComponentSelect-D0OCk6H1.js +0 -3572
  172. package/dist/ComponentSelect-WO-3S5rH.js +0 -2
  173. package/dist/DynamicRoutesForm-DjZ3eVLW.js +0 -4
  174. package/dist/HCheckList-B5Qk_HBI.js +0 -2
  175. package/dist/HCheckList-DLBewmPw.js +0 -36
  176. package/dist/HoverCard-69ZIOivd.js +0 -2
  177. package/dist/HoverCard-BDFcxxvk.js +0 -43
  178. package/dist/IconSelect-C_Gj5G4I.js +0 -3
  179. package/dist/ImportExport-CL5uPlby.js +0 -342
  180. package/dist/ImportExport-CPy2rvv7.js +0 -4
  181. package/dist/LayoutForm-QFjwakyQ.js +0 -4
  182. package/dist/MetaForm-Bb-um1Zo.js +0 -4
  183. package/dist/OrgAndPosition-DoiGY5xb.js +0 -2
  184. package/dist/ResourceEdit-BTaNdwC_.js +0 -10
  185. package/dist/ResourceRelation-BIOzTOKA.js +0 -2
  186. package/dist/RoleRelation-CyTcqRfZ.js +0 -2
  187. package/dist/TenantEdit-BlMmL6q5.js +0 -2
  188. package/dist/UserAuthorization-qGr1Sdat.js +0 -3
  189. package/dist/UserEdit-CwfyqNWf.js +0 -3
  190. package/dist/animation_item-GzGItm3s.js +0 -2
  191. package/dist/breadcrumb_setting-Ds-XJRR1.js +0 -108
  192. package/dist/browserType-BXTT4j6i.js +0 -2
  193. package/dist/chunk-Cpsc_9al.js +0 -18
  194. package/dist/cloneDeep-DDAtsK42.js +0 -7
  195. package/dist/createAndEditDataPermission-CChlLDUm.js +0 -5
  196. package/dist/drawerBlackWhiteList-BqIDyn2Q.js +0 -2
  197. package/dist/drawerBlackWhiteList-CkbZ_9PZ.js +0 -119
  198. package/dist/drawerDictionary-D911w7pC.js +0 -2
  199. package/dist/drawerDictionary-dMHs-6Cw.js +0 -125
  200. package/dist/drawerDictionaryItem-CbTa_qL-.js +0 -137
  201. package/dist/drawerDictionaryItem-DLUI5Yuc.js +0 -2
  202. package/dist/drawerGroup-CEEDMBg9.js +0 -3
  203. package/dist/drawerOrganization-CqEMD3gE.js +0 -246
  204. package/dist/drawerOrganization-mks5NMd9.js +0 -2
  205. package/dist/drawerPosition-Bd0s7qze.js +0 -165
  206. package/dist/drawerPosition-DwlTrlGA.js +0 -2
  207. package/dist/drawerRegion-DUbQAZuV.js +0 -182
  208. package/dist/drawerRegion-DwVzsZfT.js +0 -2
  209. package/dist/drawerRole-BNrbcSmr.js +0 -3
  210. package/dist/drawerRole-BxUIekjh.js +0 -3
  211. package/dist/drawerRole-CyA2oFht.js +0 -4
  212. package/dist/drawerRole-D5X7oHB_.js +0 -153
  213. package/dist/isEmpty-BvRqbmpu.js +0 -13
  214. package/dist/loginHistoryDetail-CkH5UUGU.js +0 -3
  215. package/dist/menu_setting-5Jet091Q.js +0 -155
  216. package/dist/not-data-Cx--tk_h.js +0 -2
  217. package/dist/not-data-tyTawN37.js +0 -2
  218. package/dist/operateHistoryDetail-CeVPJzD6.js +0 -3
  219. package/dist/other_setting-DQ70WnZK.js +0 -213
  220. package/dist/page_animation_setting-Lp6cMuFM.js +0 -108
  221. package/dist/routeSystem-DXMoWhFo.js +0 -2
  222. package/dist/setItem-Qa7UapHO.js +0 -4
  223. package/dist/tabbar_setting-B3kMhRNm.js +0 -139
  224. package/dist/toolbar_setting-DNBdxeGP.js +0 -140
  225. package/dist/useAppAndResource-CPL2VpOJ.js +0 -52
  226. package/dist/watermark_setting-CXp4Og0Y.js +0 -191
@@ -1,2 +0,0 @@
1
- import { t as ComponentSelect_default } from "./ComponentSelect-D0OCk6H1.js";
2
- export { ComponentSelect_default as default };
@@ -1,4 +0,0 @@
1
- import "./ComponentSelect-D0OCk6H1.js";
2
- import "./enum-3E_sUqRF.js";
3
- import { t as DynamicRoutesForm_default } from "./DynamicRoutesForm-DP_sq_Uu.js";
4
- export { DynamicRoutesForm_default as default };
@@ -1,2 +0,0 @@
1
- import { t as HCheckList_default } from "./HCheckList-DLBewmPw.js";
2
- export { HCheckList_default as default };
@@ -1,36 +0,0 @@
1
- import { PubinfoIcon } from "pubinfo";
2
- import { Fragment, createBlock, createElementBlock, createTextVNode, defineComponent, normalizeClass, openBlock, renderList, resolveComponent, toDisplayString, watch } from "vue";
3
- var _hoisted_1 = { class: "inline-flex select-none items-center justify-center of-hidden rounded-md bg-stone-3 dark:bg-stone-7" }, _hoisted_2 = ["disabled", "onClick"], HCheckList_default = /* @__PURE__ */ defineComponent({
4
- __name: "HCheckList",
5
- props: {
6
- modelValue: {},
7
- options: {},
8
- disabled: {
9
- type: Boolean,
10
- default: !1
11
- }
12
- },
13
- emits: ["update:modelValue", "change"],
14
- setup(d, { emit: f }) {
15
- let m = d, h = f;
16
- watch(() => m.modelValue, (e) => {
17
- h("change", e);
18
- });
19
- function g(e) {
20
- h("update:modelValue", e);
21
- }
22
- return (f, p) => {
23
- let m = PubinfoIcon;
24
- return openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(!0), createElementBlock(Fragment, null, renderList(d.options, (e) => (openBlock(), createElementBlock("button", {
25
- key: e.value,
26
- disabled: d.disabled || e.disabled,
27
- class: normalizeClass(["flex cursor-pointer items-center truncate border-size-0 bg-inherit px-2 py-1.5 text-sm disabled:cursor-not-allowed disabled:opacity-50 hover:not-disabled:(bg-ui-primary text-ui-text)", { "text-ui-text bg-ui-primary": d.modelValue === e.value }]),
28
- onClick: (u) => g(e.value)
29
- }, [e.icon ? (openBlock(), createBlock(m, {
30
- key: 0,
31
- name: e.icon
32
- }, null, 8, ["name"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(e.label), 1)], 64))], 10, _hoisted_2))), 128))]);
33
- };
34
- }
35
- });
36
- export { HCheckList_default as t };
@@ -1,2 +0,0 @@
1
- import { t as HoverCard_default } from "./HoverCard-BDFcxxvk.js";
2
- export { HoverCard_default as default };
@@ -1,43 +0,0 @@
1
- import { Lt as useToggle } from "./index.js";
2
- import { Fragment, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderSlot, unref } from "vue";
3
- import { DoubleRightOutlined } from "@ant-design/icons-vue";
4
- import { theme } from "ant-design-vue";
5
- var HoverCard_default = /* @__PURE__ */ defineComponent({
6
- name: "HoverCard",
7
- __name: "HoverCard",
8
- props: { more: { type: Boolean } },
9
- setup(f) {
10
- let { token: m } = theme.useToken(), [h, g] = useToggle(), [_, v] = useToggle();
11
- return (e, p) => (openBlock(), createElementBlock("div", {
12
- class: normalizeClass(["relative rounded-t-lg h-[72px] px-5 border border-solid", [unref(_) && f.more ? "rounded-b-none" : "rounded-b-lg"]]),
13
- style: normalizeStyle({
14
- borderColor: unref(h) ? unref(m).colorPrimary : unref(m).colorBorder,
15
- boxShadow: unref(h) ? unref(m).boxShadow : "none"
16
- }),
17
- onMouseenter: p[2] ||= (e) => unref(g)(!0),
18
- onMouseleave: p[3] ||= (e) => unref(g)(!1)
19
- }, [renderSlot(e.$slots, "default"), f.more ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [unref(_) ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", {
20
- key: 0,
21
- class: "absolute bottom-1 left-0 w-full text-center text-xs space-x-1 cursor-pointer",
22
- onClick: p[0] ||= (e) => unref(v)(!0)
23
- }, [p[4] ||= createElementVNode("span", null, "更多", -1), createVNode(unref(DoubleRightOutlined), {
24
- rotate: 90,
25
- class: "animate-bounce"
26
- })])), unref(_) ? (openBlock(), createElementBlock("div", {
27
- key: 1,
28
- class: "absolute top-[70px] -left-px z-50 w-[calc(100%+2px)] pt-5 px-5 border border-solid rounded-b-lg",
29
- style: normalizeStyle({
30
- borderColor: unref(h) ? unref(m).colorPrimary : unref(m).colorBorder,
31
- backgroundColor: unref(m).colorBgElevated,
32
- boxShadow: unref(m).boxShadow
33
- })
34
- }, [renderSlot(e.$slots, "more"), createElementVNode("div", {
35
- class: "mt-5 pb-1 w-full text-center text-xs space-x-1 cursor-pointer",
36
- onClick: p[1] ||= (e) => unref(v)(!1)
37
- }, [p[5] ||= createElementVNode("span", null, "收起", -1), createVNode(unref(DoubleRightOutlined), {
38
- rotate: 270,
39
- class: "animate-bounce"
40
- })])], 4)) : createCommentVNode("", !0)], 64)) : createCommentVNode("", !0)], 38));
41
- }
42
- });
43
- export { HoverCard_default as t };
@@ -1,3 +0,0 @@
1
- import "./enum-3E_sUqRF.js";
2
- import { t as IconSelect_default } from "./IconSelect-CiLpc63Z.js";
3
- export { IconSelect_default as default };
@@ -1,342 +0,0 @@
1
- import { o as __toESM, t as __commonJSMin } from "./chunk-Cpsc_9al.js";
2
- import { G as postRbacResourceBackupExportResourceData, H as getRbacResourceBackupDetail, K as postRbacResourceBackupImportResourceData, Lt as useToggle, U as getRbacResourceBackupList, V as deleteRbacResourceBackupDeleteResourceBackup, W as getRbacResourceBackupRestore } from "./index.js";
3
- import { i as resourceOptions, n as RESOURCE_COLOR } from "./enum-3E_sUqRF.js";
4
- import { t as require_dayjs_min } from "./dayjs.min-sGDSMYRj.js";
5
- import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, isRef, normalizeStyle, openBlock, reactive, ref, renderList, resolveComponent, toDisplayString, unref, vShow, withCtx, withDirectives } from "vue";
6
- import { ClockCircleOutlined, CloudDownloadOutlined, CloudUploadOutlined, DeleteOutlined, UndoOutlined } from "@ant-design/icons-vue";
7
- import { Upload, message, theme } from "ant-design-vue";
8
- import { Button, Card as Card$1, Col, Empty as Empty$1, Modal as Modal$1, Popconfirm, Row, Space as Space$1, Spin as Spin$1, Tag as Tag$1, Tree as Tree$1, Upload as Upload$1 } from "ant-design-vue/es";
9
- var require_FileSaver_min = /* @__PURE__ */ __commonJSMin(((e, d) => {
10
- (function(d, f) {
11
- typeof define == "function" && define.amd ? define([], f) : e === void 0 ? (f(), d.FileSaver = { exports: {} }.exports) : f();
12
- })(e, function() {
13
- function e(e, d) {
14
- return d === void 0 ? d = { autoBom: !1 } : typeof d != "object" && (console.warn("Deprecated: Expected third argument to be a object"), d = { autoBom: !d }), d.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["", e], { type: e.type }) : e;
15
- }
16
- function f(e, d, f) {
17
- var p = new XMLHttpRequest();
18
- p.open("GET", e), p.responseType = "blob", p.onload = function() {
19
- _(p.response, d, f);
20
- }, p.onerror = function() {
21
- console.error("could not download file");
22
- }, p.send();
23
- }
24
- function p(e) {
25
- var d = new XMLHttpRequest();
26
- d.open("HEAD", e, !1);
27
- try {
28
- d.send();
29
- } catch {}
30
- return 200 <= d.status && 299 >= d.status;
31
- }
32
- function m(e) {
33
- try {
34
- e.dispatchEvent(new MouseEvent("click"));
35
- } catch {
36
- var d = document.createEvent("MouseEvents");
37
- d.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(d);
38
- }
39
- }
40
- var h = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : void 0, g = h.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), _ = h.saveAs || (typeof window != "object" || window !== h ? function() {} : "download" in HTMLAnchorElement.prototype && !g ? function(e, d, g) {
41
- var _ = h.URL || h.webkitURL, v = document.createElement("a");
42
- d = d || e.name || "download", v.download = d, v.rel = "noopener", typeof e == "string" ? (v.href = e, v.origin === location.origin ? m(v) : p(v.href) ? f(e, d, g) : m(v, v.target = "_blank")) : (v.href = _.createObjectURL(e), setTimeout(function() {
43
- _.revokeObjectURL(v.href);
44
- }, 4e4), setTimeout(function() {
45
- m(v);
46
- }, 0));
47
- } : "msSaveOrOpenBlob" in navigator ? function(d, h, g) {
48
- if (h = h || d.name || "download", typeof d != "string") navigator.msSaveOrOpenBlob(e(d, g), h);
49
- else if (p(d)) f(d, h, g);
50
- else {
51
- var _ = document.createElement("a");
52
- _.href = d, _.target = "_blank", setTimeout(function() {
53
- m(_);
54
- });
55
- }
56
- } : function(e, d, p, m) {
57
- if (m ||= open("", "_blank"), m && (m.document.title = m.document.body.innerText = "downloading..."), typeof e == "string") return f(e, d, p);
58
- var _ = e.type === "application/octet-stream", v = /constructor/i.test(h.HTMLElement) || h.safari, y = /CriOS\/[\d]+/.test(navigator.userAgent);
59
- if ((y || _ && v || g) && typeof FileReader < "u") {
60
- var b = new FileReader();
61
- b.onloadend = function() {
62
- var e = b.result;
63
- e = y ? e : e.replace(/^data:[^;]*;/, "data:attachment/file;"), m ? m.location.href = e : location = e, m = null;
64
- }, b.readAsDataURL(e);
65
- } else {
66
- var x = h.URL || h.webkitURL, S = x.createObjectURL(e);
67
- m ? m.location = S : location.href = S, m = null, setTimeout(function() {
68
- x.revokeObjectURL(S);
69
- }, 4e4);
70
- }
71
- });
72
- h.saveAs = _.saveAs = _, d !== void 0 && (d.exports = _);
73
- });
74
- })), import_dayjs_min = /* @__PURE__ */ __toESM(require_dayjs_min(), 1), import_FileSaver_min = require_FileSaver_min(), _hoisted_1 = { class: "h-[70vh]" }, _hoisted_2 = { class: "size-full" }, _hoisted_3 = {
75
- key: 0,
76
- class: "flex flex-col items-center justify-center size-full"
77
- }, _hoisted_4 = {
78
- key: 1,
79
- class: "flex flex-col items-center justify-center size-full"
80
- }, _hoisted_5 = ["onClick"], _hoisted_6 = { class: "space-x-1" }, _hoisted_7 = { class: "text-sm truncate" }, ImportExport_default = /* @__PURE__ */ defineComponent({
81
- name: "ImportExport",
82
- __name: "ImportExport",
83
- props: { dataSource: {} },
84
- emits: ["submit"],
85
- setup(e, { expose: d, emit: x }) {
86
- let w = e, D = x, { token: O } = theme.useToken(), [k, A] = useToggle(!1), [j, M] = useToggle(!1), N = reactive({
87
- selectedId: "",
88
- list: [],
89
- treeData: []
90
- }), P = computed(() => N.selectedId ? [{
91
- key: "current",
92
- tab: "当前资源"
93
- }, {
94
- key: "history",
95
- tab: "历史记录"
96
- }] : [{
97
- key: "current",
98
- tab: "当前资源"
99
- }]), F = ref([]), I = computed(() => w.dataSource), L = reactive({
100
- list: P,
101
- key: "current",
102
- onTabChange(e) {
103
- L.key = e;
104
- }
105
- });
106
- function R() {
107
- A(!0), L.key = "current", F.value = [], N.selectedId = "", V();
108
- }
109
- let [z, B] = useToggle(!1);
110
- async function V() {
111
- try {
112
- B(!0);
113
- let e = await getRbacResourceBackupList({ type: "0" });
114
- e.success && (N.list = e?.data ?? []);
115
- } finally {
116
- B(!1);
117
- }
118
- }
119
- let [H, U] = useToggle(!1);
120
- async function W(e) {
121
- if (N.selectedId === e) {
122
- N.selectedId = "", L.key = "current";
123
- return;
124
- }
125
- N.selectedId = e, L.key = "history";
126
- try {
127
- U(!0);
128
- let d = await getRbacResourceBackupDetail({ id: e });
129
- d.success && (N.treeData = d.data?.content ?? []);
130
- } finally {
131
- U(!1);
132
- }
133
- }
134
- async function G() {
135
- if (F.value.length === 0) {
136
- message.info("请选中你要导出的资源节点。");
137
- return;
138
- }
139
- try {
140
- M(!0);
141
- let e = await postRbacResourceBackupExportResourceData(F.value);
142
- e.success && (q(e.data), message.success("导出成功!"));
143
- } finally {
144
- M(!1);
145
- }
146
- }
147
- async function K(e) {
148
- try {
149
- return M(!0), (await postRbacResourceBackupImportResourceData({ parentId: F.value[0] ?? "0" }, {}, e)).success && (message.success("导入成功!"), V()), Upload.LIST_IGNORE;
150
- } catch {
151
- return Upload.LIST_IGNORE;
152
- } finally {
153
- M(!1), D("submit");
154
- }
155
- }
156
- function q(e, d = `资源数据_${(0, import_dayjs_min.default)().format("YYYYMMDDHHmmss")}.json`) {
157
- let f = JSON.stringify(e, null, 2);
158
- (0, import_FileSaver_min.saveAs)(new Blob([f], { type: "application/json;charset=utf-8" }), d);
159
- }
160
- let [J, Y] = useToggle(!1);
161
- async function X() {
162
- try {
163
- Y(!0), (await getRbacResourceBackupRestore({ id: N.selectedId })).success && (message.success("恢复备份成功!"), V(), D("submit"));
164
- } finally {
165
- Y(!1);
166
- }
167
- }
168
- let [Z, Q] = useToggle(!1);
169
- async function $() {
170
- try {
171
- Q(!0), (await deleteRbacResourceBackupDeleteResourceBackup({ id: N.selectedId })).success && (message.success("删除备份成功!"), V(), L.key = "current", N.selectedId = "");
172
- } finally {
173
- Q(!1);
174
- }
175
- }
176
- return d({ open: R }), (e, d) => {
177
- let f = Button, p = Upload$1, m = Space$1, h = Popconfirm, g = Tag$1, _ = Tree$1, v = Spin$1, x = Card$1, C = Col, w = Empty$1, T = Row, E = Modal$1;
178
- return openBlock(), createBlock(E, {
179
- open: unref(k),
180
- "onUpdate:open": d[5] ||= (e) => isRef(k) ? k.value = e : null,
181
- title: "导入 / 导出",
182
- centered: "",
183
- width: 1e3,
184
- "destroy-on-close": "",
185
- "mask-closable": !1,
186
- footer: null
187
- }, {
188
- default: withCtx(() => [createElementVNode("div", _hoisted_1, [createVNode(T, {
189
- gutter: 8,
190
- class: "h-full"
191
- }, {
192
- default: withCtx(() => [createVNode(C, {
193
- span: "16",
194
- class: "h-full"
195
- }, {
196
- default: withCtx(() => [createVNode(x, {
197
- "head-style": {
198
- marginBottom: 0,
199
- padding: "0 12px"
200
- },
201
- "body-style": {
202
- padding: "12px",
203
- height: "calc(100% - 56px)",
204
- overflow: "auto"
205
- },
206
- "tab-list": unref(L).list,
207
- "active-tab-key": unref(L).key,
208
- class: "h-full",
209
- onTabChange: d[4] ||= (e) => unref(L).onTabChange(e)
210
- }, {
211
- tabBarExtraContent: withCtx(() => [unref(L).key === "current" ? (openBlock(), createBlock(m, { key: 0 }, {
212
- default: withCtx(() => [createVNode(p, { "before-upload": K }, {
213
- default: withCtx(() => [createVNode(f, {
214
- type: "primary",
215
- loading: unref(j)
216
- }, {
217
- default: withCtx(() => [createVNode(unref(CloudUploadOutlined)), d[6] ||= createTextVNode(" 导入 ", -1)]),
218
- _: 1
219
- }, 8, ["loading"])]),
220
- _: 1
221
- }), createVNode(f, {
222
- disabled: unref(F).length === 0,
223
- loading: unref(j),
224
- onClick: d[0] ||= (e) => G()
225
- }, {
226
- default: withCtx(() => [createVNode(unref(CloudDownloadOutlined)), d[7] ||= createTextVNode(" 导出 ", -1)]),
227
- _: 1
228
- }, 8, ["disabled", "loading"])]),
229
- _: 1
230
- })) : createCommentVNode("", !0), unref(L).key === "history" ? (openBlock(), createBlock(m, { key: 1 }, {
231
- default: withCtx(() => [createVNode(h, {
232
- title: "是否使用该历史数据覆盖当前数据?",
233
- onConfirm: d[1] ||= (e) => X()
234
- }, {
235
- default: withCtx(() => [createVNode(f, { loading: unref(J) }, {
236
- default: withCtx(() => [createVNode(unref(UndoOutlined)), d[8] ||= createTextVNode(" 恢复备份 ", -1)]),
237
- _: 1
238
- }, 8, ["loading"])]),
239
- _: 1
240
- }), createVNode(h, {
241
- title: "是否删除该历史数据备份?",
242
- onConfirm: d[2] ||= (e) => $()
243
- }, {
244
- default: withCtx(() => [createVNode(f, {
245
- loading: unref(Z),
246
- danger: ""
247
- }, {
248
- default: withCtx(() => [createVNode(unref(DeleteOutlined)), d[9] ||= createTextVNode(" 删除备份 ", -1)]),
249
- _: 1
250
- }, 8, ["loading"])]),
251
- _: 1
252
- })]),
253
- _: 1
254
- })) : createCommentVNode("", !0)]),
255
- default: withCtx(() => [withDirectives(createElementVNode("div", null, [createVNode(_, {
256
- key: "current",
257
- "selected-keys": unref(F),
258
- "onUpdate:selectedKeys": d[3] ||= (e) => isRef(F) ? F.value = e : null,
259
- "field-names": {
260
- children: "children",
261
- title: "name",
262
- key: "id"
263
- },
264
- "tree-data": unref(I),
265
- "block-node": ""
266
- }, {
267
- title: withCtx((e) => [createVNode(g, {
268
- color: unref(RESOURCE_COLOR)[e.type],
269
- bordered: !1
270
- }, {
271
- default: withCtx(() => [createTextVNode(toDisplayString(unref(resourceOptions).find((d) => d.value === e.type)?.label), 1)]),
272
- _: 2
273
- }, 1032, ["color"]), createElementVNode("span", null, toDisplayString(e.name), 1)]),
274
- _: 1
275
- }, 8, ["selected-keys", "tree-data"])], 512), [[vShow, unref(L).key === "current"]]), withDirectives(createElementVNode("div", _hoisted_2, [createVNode(v, { spinning: unref(H) }, {
276
- default: withCtx(() => [createVNode(_, {
277
- key: "history",
278
- "field-names": {
279
- children: "children",
280
- title: "name",
281
- key: "id"
282
- },
283
- "tree-data": unref(N).treeData,
284
- selectable: !1,
285
- class: "size-full"
286
- }, {
287
- title: withCtx((e) => [createVNode(g, {
288
- color: unref(RESOURCE_COLOR)[e.type],
289
- bordered: !1
290
- }, {
291
- default: withCtx(() => [createTextVNode(toDisplayString(unref(resourceOptions).find((d) => d.value === e.type)?.label), 1)]),
292
- _: 2
293
- }, 1032, ["color"]), createElementVNode("span", null, toDisplayString(e.name), 1)]),
294
- _: 1
295
- }, 8, ["tree-data"])]),
296
- _: 1
297
- }, 8, ["spinning"])], 512), [[vShow, unref(L).key === "history"]])]),
298
- _: 1
299
- }, 8, ["tab-list", "active-tab-key"])]),
300
- _: 1
301
- }), createVNode(C, {
302
- span: "8",
303
- class: "h-full"
304
- }, {
305
- default: withCtx(() => [createVNode(x, {
306
- title: "历史记录",
307
- "head-style": {
308
- marginBottom: 0,
309
- padding: "0 12px"
310
- },
311
- "body-style": {
312
- padding: "8px",
313
- height: "calc(100% - 56px)",
314
- overflowY: "auto"
315
- },
316
- class: "h-full"
317
- }, {
318
- default: withCtx(() => [
319
- unref(z) ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(v)])) : createCommentVNode("", !0),
320
- unref(N).list.length === 0 && !unref(z) ? (openBlock(), createElementBlock("div", _hoisted_4, [createVNode(w)])) : createCommentVNode("", !0),
321
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(N).list, (e) => (openBlock(), createElementBlock("div", {
322
- key: e.id,
323
- class: "flex justify-between items-center space-x-2 cursor-pointer hover:bg-gray-50 py-1 px-2 rounded",
324
- style: normalizeStyle({ backgroundColor: unref(N).selectedId === e.id ? unref(O).colorPrimaryBg : "" }),
325
- onClick: (d) => W(e.id)
326
- }, [createElementVNode("div", _hoisted_6, [createVNode(unref(ClockCircleOutlined)), createElementVNode("span", _hoisted_7, toDisplayString(e.createTime), 1)]), createElementVNode("span", {
327
- class: "text-xs shrink-0",
328
- style: normalizeStyle({ color: unref(O).colorTextTertiary })
329
- }, toDisplayString(e.createUserName), 5)], 12, _hoisted_5))), 128))
330
- ]),
331
- _: 1
332
- })]),
333
- _: 1
334
- })]),
335
- _: 1
336
- })])]),
337
- _: 1
338
- }, 8, ["open"]);
339
- };
340
- }
341
- });
342
- export { ImportExport_default as t };
@@ -1,4 +0,0 @@
1
- import "./enum-3E_sUqRF.js";
2
- import "./dayjs.min-sGDSMYRj.js";
3
- import { t as ImportExport_default } from "./ImportExport-CL5uPlby.js";
4
- export { ImportExport_default as default };
@@ -1,4 +0,0 @@
1
- import "./enum-3E_sUqRF.js";
2
- import "./HoverCard-BDFcxxvk.js";
3
- import { t as LayoutForm_default } from "./LayoutForm-Cp4bBrYl.js";
4
- export { LayoutForm_default as default };
@@ -1,4 +0,0 @@
1
- import { t as MetaForm_default } from "./MetaForm-CVSgktB_.js";
2
- import "./enum-3E_sUqRF.js";
3
- import "./HoverCard-BDFcxxvk.js";
4
- export { MetaForm_default as default };
@@ -1,2 +0,0 @@
1
- import { t as OrgAndPosition_default } from "./OrgAndPosition-ClASobEv.js";
2
- export { OrgAndPosition_default as default };
@@ -1,10 +0,0 @@
1
- import "./MetaForm-CVSgktB_.js";
2
- import "./ComponentSelect-D0OCk6H1.js";
3
- import "./enum-3mYayxff.js";
4
- import "./enum-3E_sUqRF.js";
5
- import "./DynamicRoutesForm-DP_sq_Uu.js";
6
- import "./HoverCard-BDFcxxvk.js";
7
- import "./IconSelect-CiLpc63Z.js";
8
- import "./LayoutForm-Cp4bBrYl.js";
9
- import { t as ResourceEdit_default } from "./ResourceEdit-w8qh1MFO.js";
10
- export { ResourceEdit_default as default };
@@ -1,2 +0,0 @@
1
- import { t as ResourceRelation_default } from "./ResourceRelation-D_j898zp.js";
2
- export { ResourceRelation_default as default };
@@ -1,2 +0,0 @@
1
- import { t as RoleRelation_default } from "./RoleRelation-DzyVn5dk.js";
2
- export { RoleRelation_default as default };
@@ -1,2 +0,0 @@
1
- import { t as TenantEdit_default } from "./TenantEdit-BOvXk7BZ.js";
2
- export { TenantEdit_default as default };
@@ -1,3 +0,0 @@
1
- import "./RoleSelector-Cd6_RUsc.js";
2
- import { t as UserAuthorization_default } from "./UserAuthorization-DLeivbs7.js";
3
- export { UserAuthorization_default as default };
@@ -1,3 +0,0 @@
1
- import "./OrgAndPosition-ClASobEv.js";
2
- import { t as UserEdit_default } from "./UserEdit-YKS1FVW_.js";
3
- export { UserEdit_default as default };
@@ -1,2 +0,0 @@
1
- import { t as animation_item_default } from "./animation_item-BU-LInxP.js";
2
- export { animation_item_default as default };