@ws-ui/roles-editor 1.14.2 → 1.14.4-dev.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.
- package/dist/Standalone/index.d.ts +2 -1
- package/dist/Standalone/style.css +4 -4
- package/dist/common.cjs.js.map +1 -1
- package/dist/common.es.js.map +1 -1
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +50 -36
- package/dist/index.es.js.map +1 -1
- package/dist/json-schema.json +127 -127
- package/dist/json-schema.json.d.ts +127 -127
- package/dist/roles-editor.css +1 -1
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
|
@@ -33800,32 +33800,37 @@ const Dle = ({ item: e, depth: t }) => {
|
|
|
33800
33800
|
}
|
|
33801
33801
|
const y = async (_) => {
|
|
33802
33802
|
_.stopPropagation();
|
|
33803
|
-
const
|
|
33804
|
-
|
|
33805
|
-
type: Ao.CONFIRM,
|
|
33806
|
-
color: fl.DANGER,
|
|
33807
|
-
message: "Are you sure you want to remove this Privilege?",
|
|
33808
|
-
icon: "FdWarningDanger"
|
|
33809
|
-
});
|
|
33810
|
-
if (S) {
|
|
33811
|
-
const O = oH(t.id, a);
|
|
33803
|
+
const S = () => {
|
|
33804
|
+
const R = oH(t.id, a);
|
|
33812
33805
|
if ((r == null ? void 0 : r.id) !== t.id) {
|
|
33813
|
-
o.actions.updatePrivileges(
|
|
33806
|
+
o.actions.updatePrivileges(R);
|
|
33814
33807
|
return;
|
|
33815
33808
|
}
|
|
33816
|
-
const
|
|
33817
|
-
(
|
|
33809
|
+
const N = Object.keys(R).filter(
|
|
33810
|
+
(P) => R[P].privilege !== "guest"
|
|
33818
33811
|
);
|
|
33819
|
-
if (
|
|
33812
|
+
if (N.length === 0)
|
|
33820
33813
|
n(null);
|
|
33821
33814
|
else {
|
|
33822
|
-
const
|
|
33823
|
-
(
|
|
33824
|
-
),
|
|
33825
|
-
|
|
33815
|
+
const P = Object.keys(a).filter(
|
|
33816
|
+
(W) => a[W].privilege !== "guest"
|
|
33817
|
+
), z = P.indexOf(t.id), D = Math.max(0, z - 1), H = P[D];
|
|
33818
|
+
z === 0 ? n(R[N[0]]) : R[H] ? n(R[H]) : n(R[N[0]]);
|
|
33826
33819
|
}
|
|
33827
|
-
o.actions.updatePrivileges(
|
|
33820
|
+
o.actions.updatePrivileges(R);
|
|
33821
|
+
};
|
|
33822
|
+
if (o.getHost() === "vscode") {
|
|
33823
|
+
S();
|
|
33824
|
+
return;
|
|
33828
33825
|
}
|
|
33826
|
+
const { confirmed: O } = await o.actions.openModal({
|
|
33827
|
+
title: "Delete Privilege",
|
|
33828
|
+
type: Ao.CONFIRM,
|
|
33829
|
+
color: fl.DANGER,
|
|
33830
|
+
message: "Are you sure you want to remove this Privilege?",
|
|
33831
|
+
icon: "FdWarningDanger"
|
|
33832
|
+
});
|
|
33833
|
+
O && S();
|
|
33829
33834
|
}, E = Re(() => t.resources.some((_) => _.exists === !1), [t]);
|
|
33830
33835
|
return /* @__PURE__ */ I(
|
|
33831
33836
|
Xr,
|
|
@@ -33851,7 +33856,7 @@ const Dle = ({ item: e, depth: t }) => {
|
|
|
33851
33856
|
ref: w,
|
|
33852
33857
|
children: [
|
|
33853
33858
|
/* @__PURE__ */ ue("div", { className: "flex items-center justify-between", children: [
|
|
33854
|
-
/* @__PURE__ */ ue("div", { className: "flex flex-1 items-center", children: [
|
|
33859
|
+
/* @__PURE__ */ ue("div", { className: "flex min-w-0 flex-1 items-center", children: [
|
|
33855
33860
|
/* @__PURE__ */ I("span", { className: "mr-4", children: i ? /* @__PURE__ */ I(YH, { className: "h-6 w-6" }) : /* @__PURE__ */ I(Ad, { className: "h-6 w-6" }) }),
|
|
33856
33861
|
c ? /* @__PURE__ */ ue(
|
|
33857
33862
|
It.Root,
|
|
@@ -33874,7 +33879,14 @@ const Dle = ({ item: e, depth: t }) => {
|
|
|
33874
33879
|
p && /* @__PURE__ */ I(It.Message, { children: p })
|
|
33875
33880
|
]
|
|
33876
33881
|
}
|
|
33877
|
-
) : /* @__PURE__ */ I(
|
|
33882
|
+
) : /* @__PURE__ */ I(
|
|
33883
|
+
"span",
|
|
33884
|
+
{
|
|
33885
|
+
title: u,
|
|
33886
|
+
className: "inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",
|
|
33887
|
+
children: u
|
|
33888
|
+
}
|
|
33889
|
+
)
|
|
33878
33890
|
] }),
|
|
33879
33891
|
i ? /* @__PURE__ */ I("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ I(
|
|
33880
33892
|
Xr,
|
|
@@ -33884,7 +33896,7 @@ const Dle = ({ item: e, depth: t }) => {
|
|
|
33884
33896
|
usePortal: !0,
|
|
33885
33897
|
children: /* @__PURE__ */ I(mn, { className: "h-4 w-4" })
|
|
33886
33898
|
}
|
|
33887
|
-
) }) : /* @__PURE__ */ I("div", { className: "flex items-center gap-x-2", children: c ? /* @__PURE__ */ ue(Ht, { children: [
|
|
33899
|
+
) }) : /* @__PURE__ */ I("div", { className: "flex shrink-0 items-center gap-x-2", children: c ? /* @__PURE__ */ ue(Ht, { children: [
|
|
33888
33900
|
/* @__PURE__ */ I(
|
|
33889
33901
|
ar,
|
|
33890
33902
|
{
|
|
@@ -38522,7 +38534,7 @@ const Lue = ({
|
|
|
38522
38534
|
/* @__PURE__ */ I("div", { children: /* @__PURE__ */ I(
|
|
38523
38535
|
Xr,
|
|
38524
38536
|
{
|
|
38525
|
-
label: `Resetting the privilege will remove all configured
|
|
38537
|
+
label: `Resetting the privilege will remove all configured\r
|
|
38526
38538
|
ressources`,
|
|
38527
38539
|
container: Zr(),
|
|
38528
38540
|
children: /* @__PURE__ */ I(
|
|
@@ -38579,7 +38591,7 @@ const Lue = ({
|
|
|
38579
38591
|
return /* @__PURE__ */ ue(
|
|
38580
38592
|
"tr",
|
|
38581
38593
|
{
|
|
38582
|
-
className: bn("group even:bg-
|
|
38594
|
+
className: bn("group even:bg-body/5 hover:bg-input-bg", {
|
|
38583
38595
|
"opacity-60": Z.exists === !1
|
|
38584
38596
|
}),
|
|
38585
38597
|
children: [
|
|
@@ -39024,7 +39036,7 @@ const Lue = ({
|
|
|
39024
39036
|
},
|
|
39025
39037
|
ref: g,
|
|
39026
39038
|
children: [
|
|
39027
|
-
/* @__PURE__ */ I("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ ue("div", { className: "flex flex-1 items-center", children: [
|
|
39039
|
+
/* @__PURE__ */ I("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ ue("div", { className: "flex min-w-0 flex-1 items-center", children: [
|
|
39028
39040
|
/* @__PURE__ */ I("span", { className: "mr-4", children: /* @__PURE__ */ I(Ad, { className: "h-6 w-6" }) }),
|
|
39029
39041
|
v ? /* @__PURE__ */ ue(
|
|
39030
39042
|
It.Root,
|
|
@@ -39063,7 +39075,7 @@ const Lue = ({
|
|
|
39063
39075
|
"div",
|
|
39064
39076
|
{
|
|
39065
39077
|
className: bn(
|
|
39066
|
-
"justify-between ml-auto flex w-fit items-center gap-x-2"
|
|
39078
|
+
"justify-between ml-auto flex w-fit shrink-0 items-center gap-x-2"
|
|
39067
39079
|
),
|
|
39068
39080
|
children: v ? /* @__PURE__ */ ue(Ht, { children: [
|
|
39069
39081
|
/* @__PURE__ */ I(ar, { color: "white", variant: "ghost", onClick: x, children: /* @__PURE__ */ I(JH, { className: "h-4 w-4" }) }),
|
|
@@ -39298,7 +39310,7 @@ const Lue = ({
|
|
|
39298
39310
|
e.rolePrivs,
|
|
39299
39311
|
d
|
|
39300
39312
|
), [h, e, t, d]);
|
|
39301
|
-
return /* @__PURE__ */ ue("tr", { className: bn("group even:bg-
|
|
39313
|
+
return /* @__PURE__ */ ue("tr", { className: bn("group even:bg-body/5 hover:bg-input-bg", o), children: [
|
|
39302
39314
|
/* @__PURE__ */ ue(
|
|
39303
39315
|
"td",
|
|
39304
39316
|
{
|
|
@@ -39310,7 +39322,7 @@ const Lue = ({
|
|
|
39310
39322
|
Array(n).fill("").map((g, m) => /* @__PURE__ */ I(
|
|
39311
39323
|
"div",
|
|
39312
39324
|
{
|
|
39313
|
-
className: bn("ml-1.5 mr-1 w-
|
|
39325
|
+
className: bn("ml-1.5 mr-1 w-0.5 bg-muted", {
|
|
39314
39326
|
"mr-0.5": i
|
|
39315
39327
|
})
|
|
39316
39328
|
},
|
|
@@ -39347,7 +39359,7 @@ const Lue = ({
|
|
|
39347
39359
|
container: Zr(),
|
|
39348
39360
|
delay: 100,
|
|
39349
39361
|
label: /* @__PURE__ */ I("div", { className: "space-y-1 p-1", children: w.read.from.length ? /* @__PURE__ */ ue("div", { className: "flex items-start", children: [
|
|
39350
|
-
/* @__PURE__ */ I(Mi, { className: "mr-2 mt-0.5 h-4 w-4
|
|
39362
|
+
/* @__PURE__ */ I(Mi, { className: "mr-2 mt-0.5 h-4 w-4 shrink-0" }),
|
|
39351
39363
|
/* @__PURE__ */ ue("p", { className: "flex flex-col gap-y-2", children: [
|
|
39352
39364
|
/* @__PURE__ */ I("span", { className: "mr-1", children: "Permission inherited from:" }),
|
|
39353
39365
|
/* @__PURE__ */ I("ul", { children: w.read.from.map((g, m) => /* @__PURE__ */ I(
|
|
@@ -39389,7 +39401,7 @@ const Lue = ({
|
|
|
39389
39401
|
container: Zr(),
|
|
39390
39402
|
delay: 100,
|
|
39391
39403
|
label: /* @__PURE__ */ I("div", { className: "space-y-1 p-1", children: w.read.from.length ? /* @__PURE__ */ ue("div", { className: "flex items-start", children: [
|
|
39392
|
-
/* @__PURE__ */ I(Mi, { className: "mr-2 mt-0.5 h-4 w-4
|
|
39404
|
+
/* @__PURE__ */ I(Mi, { className: "mr-2 mt-0.5 h-4 w-4 shrink-0" }),
|
|
39393
39405
|
/* @__PURE__ */ ue("p", { className: "flex flex-col gap-y-2", children: [
|
|
39394
39406
|
/* @__PURE__ */ I("span", { className: "mr-1", children: "Permission inherited from:" }),
|
|
39395
39407
|
/* @__PURE__ */ I("ul", { children: w.read.from.map((g, m) => /* @__PURE__ */ I(
|
|
@@ -39431,7 +39443,7 @@ const Lue = ({
|
|
|
39431
39443
|
container: Zr(),
|
|
39432
39444
|
delay: 100,
|
|
39433
39445
|
label: /* @__PURE__ */ I("div", { className: "space-y-1 p-1", children: w.update.from.length ? /* @__PURE__ */ ue("div", { className: "flex items-start", children: [
|
|
39434
|
-
/* @__PURE__ */ I(Mi, { className: "mr-2 mt-0.5 h-4 w-4
|
|
39446
|
+
/* @__PURE__ */ I(Mi, { className: "mr-2 mt-0.5 h-4 w-4 shrink-0" }),
|
|
39435
39447
|
/* @__PURE__ */ ue("p", { className: "flex flex-col gap-y-2", children: [
|
|
39436
39448
|
/* @__PURE__ */ I("span", { className: "mr-1", children: "Permission inherited from:" }),
|
|
39437
39449
|
/* @__PURE__ */ I("ul", { children: w.update.from.map((g, m) => /* @__PURE__ */ I(
|
|
@@ -39473,7 +39485,7 @@ const Lue = ({
|
|
|
39473
39485
|
container: Zr(),
|
|
39474
39486
|
delay: 100,
|
|
39475
39487
|
label: /* @__PURE__ */ I("div", { className: "space-y-1 p-1", children: w.drop.from.length ? /* @__PURE__ */ ue("div", { className: "flex items-start", children: [
|
|
39476
|
-
/* @__PURE__ */ I(Mi, { className: "mr-2 mt-0.5 h-4 w-4
|
|
39488
|
+
/* @__PURE__ */ I(Mi, { className: "mr-2 mt-0.5 h-4 w-4 shrink-0" }),
|
|
39477
39489
|
/* @__PURE__ */ ue("p", { className: "flex flex-col gap-y-2", children: [
|
|
39478
39490
|
/* @__PURE__ */ I("span", { className: "mr-1", children: "Permission inherited from:" }),
|
|
39479
39491
|
/* @__PURE__ */ I("ul", { children: w.drop.from.map((g, m) => /* @__PURE__ */ I(
|
|
@@ -39511,7 +39523,7 @@ const Lue = ({
|
|
|
39511
39523
|
container: Zr(),
|
|
39512
39524
|
delay: 100,
|
|
39513
39525
|
label: /* @__PURE__ */ I("div", { className: "space-y-1 p-1", children: w.execute.from.length ? /* @__PURE__ */ ue("div", { className: "flex items-start", children: [
|
|
39514
|
-
/* @__PURE__ */ I(Mi, { className: "mr-2 mt-0.5 h-4 w-4
|
|
39526
|
+
/* @__PURE__ */ I(Mi, { className: "mr-2 mt-0.5 h-4 w-4 shrink-0" }),
|
|
39515
39527
|
/* @__PURE__ */ ue("p", { className: "flex flex-col gap-y-2", children: [
|
|
39516
39528
|
/* @__PURE__ */ I("span", { className: "mr-1", children: "Permission inherited from:" }),
|
|
39517
39529
|
/* @__PURE__ */ I("ul", { children: w.execute.from.map((g, m) => /* @__PURE__ */ I(
|
|
@@ -40259,9 +40271,10 @@ const Kue = ({ selectedRole: e }) => {
|
|
|
40259
40271
|
onSelectRole: a,
|
|
40260
40272
|
selectedPrivilege: s,
|
|
40261
40273
|
onSelectPrivilege: c,
|
|
40262
|
-
|
|
40274
|
+
host: d = "vscode",
|
|
40275
|
+
...u
|
|
40263
40276
|
}) => {
|
|
40264
|
-
const
|
|
40277
|
+
const h = Re(
|
|
40265
40278
|
() => ({
|
|
40266
40279
|
...Mo(G7(e)),
|
|
40267
40280
|
flags: { touched: !1 }
|
|
@@ -40271,8 +40284,9 @@ const Kue = ({ selectedRole: e }) => {
|
|
|
40271
40284
|
return /* @__PURE__ */ I(
|
|
40272
40285
|
QZ,
|
|
40273
40286
|
{
|
|
40274
|
-
initialState:
|
|
40287
|
+
initialState: h,
|
|
40275
40288
|
catalog: t,
|
|
40289
|
+
host: d,
|
|
40276
40290
|
history: r,
|
|
40277
40291
|
selectedTab: n,
|
|
40278
40292
|
onTabChange: i,
|
|
@@ -40280,7 +40294,7 @@ const Kue = ({ selectedRole: e }) => {
|
|
|
40280
40294
|
onSelectRole: a,
|
|
40281
40295
|
selectedPrivilege: s,
|
|
40282
40296
|
onSelectPrivilege: c,
|
|
40283
|
-
children: /* @__PURE__ */ I(ide, { initialValue: e, ...
|
|
40297
|
+
children: /* @__PURE__ */ I(ide, { initialValue: e, ...u })
|
|
40284
40298
|
}
|
|
40285
40299
|
);
|
|
40286
40300
|
};
|