@pubinfo-pr/module-rbac 0.204.4 → 0.220.1

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 (159) 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-Ds-XJRR1.js → breadcrumb_setting-Dx2Li6xt.js} +19 -19
  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/{layout_setting-BUAgQ1Bk.js → layout_setting-79srmFgJ.js} +11 -11
  52. package/dist/layout_setting.css +1 -1
  53. package/dist/{log-vjU7aBPR.js → log-BYris9iT.js} +6 -6
  54. package/dist/{loginHistoryDetail-C7GT2yME.js → loginHistoryDetail-CZnfmbbM.js} +24 -23
  55. package/dist/{login_history-D08W00Qu.js → login_history-BiwaLpxA.js} +33 -33
  56. package/dist/login_history.css +1 -1
  57. package/dist/{menu_setting-5Jet091Q.js → menu_setting-ChueWHs4.js} +42 -42
  58. package/dist/not-data-Bml86wdH.js +3 -0
  59. package/dist/{operateHistoryDetail-BaNJRfwy.js → operateHistoryDetail-HId-EZzy.js} +27 -26
  60. package/dist/{operate_history-kJwIuPg2.js → operate_history-sPd9IHMV.js} +33 -33
  61. package/dist/operate_history.css +1 -1
  62. package/dist/{organization-Cmj3DUXl.js → organization-Dv3FbKke.js} +1438 -1444
  63. package/dist/organization.css +1 -1
  64. package/dist/{other_setting-DQ70WnZK.js → other_setting-BEV_UK0g.js} +86 -86
  65. package/dist/other_setting.css +1 -1
  66. package/dist/{page_animation_setting-Lp6cMuFM.js → page_animation_setting-Cp5OnFpd.js} +33 -33
  67. package/dist/page_animation_setting.css +1 -1
  68. package/dist/{page_w_setting-CD_HtSUv.js → page_w_setting-Q--ct16C.js} +11 -11
  69. package/dist/page_w_setting.css +1 -1
  70. package/dist/{position-CLpbgKGj.js → position-CCZ2MSMP.js} +41 -41
  71. package/dist/{region-Dd9pt_Si.js → region-D3mjqB8H.js} +62 -62
  72. package/dist/{resource-C7dXB0EE.js → resource-DaQ7CvM_.js} +69 -69
  73. package/dist/{role-JGtvRObt.js → role-4UgEw3nH.js} +49 -49
  74. package/dist/{role_group-CKOb_m63.js → role_group-hkRlCnyl.js} +41 -41
  75. package/dist/{safe_setting-G_ZP-jWQ.js → safe_setting-4fv3qNRZ.js} +85 -85
  76. package/dist/{setItem-yKhjmUh0.js → setItem-Vkcwkj-O.js} +33 -32
  77. package/dist/setItem.css +1 -1
  78. package/dist/{tabbar_setting-B3kMhRNm.js → tabbar_setting-kbuTvrLB.js} +36 -36
  79. package/dist/{tenant-BBiCJkU_.js → tenant-lWfGw2u1.js} +48 -48
  80. package/dist/{theme_setting-vhNDLlkc.js → theme_setting-CEb7UYQO.js} +47 -47
  81. package/dist/theme_setting.css +1 -1
  82. package/dist/{toolbar_setting-DNBdxeGP.js → toolbar_setting-BG-k2UFc.js} +32 -32
  83. package/dist/useAppAndResource-B7FmNfKG.js +52 -0
  84. package/dist/{user-DvCyUhZW.js → user-BkUpcQC8.js} +96 -96
  85. package/dist/{vanilla-picker-DcG96G63.js → vanilla-picker-Byb6q187.js} +239 -239
  86. package/dist/views/blackWhiteList/components/drawerBlackWhiteList.vue.d.ts +5 -1
  87. package/dist/views/components/setItem.vue.d.ts +5 -1
  88. package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +5 -1
  89. package/dist/views/dictionary/components/drawerDictionary.vue.d.ts +5 -1
  90. package/dist/views/dictionary/components/drawerDictionaryItem.vue.d.ts +5 -1
  91. package/dist/views/group/components/drawerGroup.vue.d.ts +5 -1
  92. package/dist/views/log_center/components/loginHistoryDetail.vue.d.ts +8 -1
  93. package/dist/views/log_center/components/operateHistoryDetail.vue.d.ts +8 -1
  94. package/dist/views/organization/components/drawerOrganization.vue.d.ts +5 -1
  95. package/dist/views/organization/components/drawerRole.vue.d.ts +5 -1
  96. package/dist/views/other_setting/interface.d.ts +1 -2
  97. package/dist/views/position/components/drawerPosition.vue.d.ts +5 -1
  98. package/dist/views/region/components/drawerRegion.vue.d.ts +5 -1
  99. package/dist/views/resource/components/ImportExport.vue.d.ts +5 -1
  100. package/dist/views/resource/components/ResourceEdit.vue.d.ts +5 -1
  101. package/dist/views/role/components/drawerRole.vue.d.ts +5 -1
  102. package/dist/views/role_group/components/drawerRole.vue.d.ts +5 -1
  103. package/dist/views/tenant/components/TenantEdit.vue.d.ts +5 -1
  104. package/dist/views/user/components/UserAuthorization.vue.d.ts +5 -1
  105. package/dist/views/user/components/UserEdit.vue.d.ts +5 -1
  106. package/dist/{watermark_setting-CXp4Og0Y.js → watermark_setting-Cl2EtPAa.js} +98 -98
  107. package/dist/watermark_setting.css +1 -1
  108. package/package.json +13 -13
  109. package/src/views/other_setting/index.vue +2 -2
  110. package/src/views/other_setting/interface.ts +1 -1
  111. package/dist/ComponentSelect-D0OCk6H1.js +0 -3572
  112. package/dist/ComponentSelect-WO-3S5rH.js +0 -2
  113. package/dist/DynamicRoutesForm-DjZ3eVLW.js +0 -4
  114. package/dist/HCheckList-B5Qk_HBI.js +0 -2
  115. package/dist/HCheckList-DLBewmPw.js +0 -36
  116. package/dist/HoverCard-69ZIOivd.js +0 -2
  117. package/dist/HoverCard-BDFcxxvk.js +0 -43
  118. package/dist/IconSelect-C_Gj5G4I.js +0 -3
  119. package/dist/ImportExport-CL5uPlby.js +0 -342
  120. package/dist/ImportExport-CPy2rvv7.js +0 -4
  121. package/dist/LayoutForm-QFjwakyQ.js +0 -4
  122. package/dist/MetaForm-Bb-um1Zo.js +0 -4
  123. package/dist/OrgAndPosition-DoiGY5xb.js +0 -2
  124. package/dist/ResourceEdit-BTaNdwC_.js +0 -10
  125. package/dist/ResourceRelation-BIOzTOKA.js +0 -2
  126. package/dist/RoleRelation-CyTcqRfZ.js +0 -2
  127. package/dist/TenantEdit-BlMmL6q5.js +0 -2
  128. package/dist/UserAuthorization-qGr1Sdat.js +0 -3
  129. package/dist/UserEdit-CwfyqNWf.js +0 -3
  130. package/dist/animation_item-GzGItm3s.js +0 -2
  131. package/dist/browserType-BXTT4j6i.js +0 -2
  132. package/dist/chunk-Cpsc_9al.js +0 -18
  133. package/dist/cloneDeep-DDAtsK42.js +0 -7
  134. package/dist/createAndEditDataPermission-CChlLDUm.js +0 -5
  135. package/dist/drawerBlackWhiteList-BqIDyn2Q.js +0 -2
  136. package/dist/drawerBlackWhiteList-CkbZ_9PZ.js +0 -119
  137. package/dist/drawerDictionary-D911w7pC.js +0 -2
  138. package/dist/drawerDictionary-dMHs-6Cw.js +0 -125
  139. package/dist/drawerDictionaryItem-CbTa_qL-.js +0 -137
  140. package/dist/drawerDictionaryItem-DLUI5Yuc.js +0 -2
  141. package/dist/drawerGroup-CEEDMBg9.js +0 -3
  142. package/dist/drawerOrganization-CqEMD3gE.js +0 -246
  143. package/dist/drawerOrganization-mks5NMd9.js +0 -2
  144. package/dist/drawerPosition-Bd0s7qze.js +0 -165
  145. package/dist/drawerPosition-DwlTrlGA.js +0 -2
  146. package/dist/drawerRegion-DUbQAZuV.js +0 -182
  147. package/dist/drawerRegion-DwVzsZfT.js +0 -2
  148. package/dist/drawerRole-BNrbcSmr.js +0 -3
  149. package/dist/drawerRole-BxUIekjh.js +0 -3
  150. package/dist/drawerRole-CyA2oFht.js +0 -4
  151. package/dist/drawerRole-D5X7oHB_.js +0 -153
  152. package/dist/isEmpty-BvRqbmpu.js +0 -13
  153. package/dist/loginHistoryDetail-CkH5UUGU.js +0 -3
  154. package/dist/not-data-Cx--tk_h.js +0 -2
  155. package/dist/not-data-tyTawN37.js +0 -2
  156. package/dist/operateHistoryDetail-CeVPJzD6.js +0 -3
  157. package/dist/routeSystem-DXMoWhFo.js +0 -2
  158. package/dist/setItem-Qa7UapHO.js +0 -4
  159. package/dist/useAppAndResource-CPL2VpOJ.js +0 -52
@@ -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-pr";
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 };
@@ -1,2 +0,0 @@
1
- import { t as browserType_default } from "./browserType-Dn_hQtAN.js";
2
- export { browserType_default as default };
@@ -1,18 +0,0 @@
1
- var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __esmMin = (e, n) => () => (e && (n = e(e = 0)), n), __commonJSMin = (e, n) => () => (n || e((n = { exports: {} }).exports, n), n.exports), __export = (e, r) => {
2
- let i = {};
3
- for (var a in e) __defProp(i, a, {
4
- get: e[a],
5
- enumerable: !0
6
- });
7
- return r && __defProp(i, Symbol.toStringTag, { value: "Module" }), i;
8
- }, __copyProps = (e, a, s, c) => {
9
- if (a && typeof a == "object" || typeof a == "function") for (var l = __getOwnPropNames(a), u = 0, d = l.length, f; u < d; u++) f = l[u], !__hasOwnProp.call(e, f) && f !== s && __defProp(e, f, {
10
- get: ((e) => a[e]).bind(null, f),
11
- enumerable: !(c = __getOwnPropDesc(a, f)) || c.enumerable
12
- });
13
- return e;
14
- }, __reExport = (e, n, r) => (__copyProps(e, n, "default"), r && __copyProps(r, n, "default")), __toESM = (r, i, o) => (o = r == null ? {} : __create(__getProtoOf(r)), __copyProps(i || !r || !r.__esModule ? __defProp(o, "default", {
15
- value: r,
16
- enumerable: !0
17
- }) : o, r)), __toCommonJS = (e) => __hasOwnProp.call(e, "module.exports") ? e["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: !0 }), e);
18
- export { __toCommonJS as a, __reExport as i, __esmMin as n, __toESM as o, __export as r, __commonJSMin as t };
@@ -1,7 +0,0 @@
1
- import { Ut as _baseClone_default } from "./index.js";
2
- var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4;
3
- function cloneDeep(i) {
4
- return _baseClone_default(i, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
5
- }
6
- var cloneDeep_default = cloneDeep;
7
- export { cloneDeep_default as t };
@@ -1,5 +0,0 @@
1
- import "./enum-Cr7uWnB2.js";
2
- import { t as createAndEditDataPermission_default } from "./createAndEditDataPermission-CaOBJgoV.js";
3
- import "./useAppAndResource-CPL2VpOJ.js";
4
- import "./enum-3mYayxff.js";
5
- export { createAndEditDataPermission_default as default };
@@ -1,2 +0,0 @@
1
- import { t as drawerBlackWhiteList_default } from "./drawerBlackWhiteList-CkbZ_9PZ.js";
2
- export { drawerBlackWhiteList_default as default };