@gouvfr-lasuite/ui-kit 0.19.2 → 0.19.4
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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +21 -16
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export declare type AccessData<UserType, T> = T & {
|
|
|
42
42
|
can_delete?: boolean;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
export declare const AccessRoleDropdown: ({ roles, onSelect, canUpdate, selectedRole, isOpen, onOpenChange, roleTopMessage, onDelete, }: AccessRoleDropdownProps) => JSX.Element;
|
|
45
|
+
export declare const AccessRoleDropdown: ({ roles, onSelect, canUpdate, selectedRole, isOpen, onOpenChange, roleTopMessage, onDelete, canDelete, }: AccessRoleDropdownProps) => JSX.Element;
|
|
46
46
|
|
|
47
47
|
declare type AccessRoleDropdownProps = {
|
|
48
48
|
selectedRole: string;
|
|
@@ -53,6 +53,7 @@ declare type AccessRoleDropdownProps = {
|
|
|
53
53
|
onOpenChange?: (isOpen: boolean) => void;
|
|
54
54
|
roleTopMessage?: DropdownMenuProps["topMessage"];
|
|
55
55
|
onDelete?: () => void;
|
|
56
|
+
canDelete?: boolean;
|
|
56
57
|
};
|
|
57
58
|
|
|
58
59
|
export declare type AddShareUserListProps<UserType> = {
|
package/dist/index.js
CHANGED
|
@@ -21096,25 +21096,27 @@ const La = ({
|
|
|
21096
21096
|
isOpen: i,
|
|
21097
21097
|
onOpenChange: o,
|
|
21098
21098
|
roleTopMessage: l,
|
|
21099
|
-
onDelete: a
|
|
21099
|
+
onDelete: a,
|
|
21100
|
+
canDelete: s = !0
|
|
21100
21101
|
}) => {
|
|
21101
|
-
const { t:
|
|
21102
|
+
const { t: c } = xe(), u = t.find((h) => h.value === n), d = q(() => [
|
|
21102
21103
|
...t,
|
|
21103
21104
|
{ type: "separator" },
|
|
21104
21105
|
{
|
|
21105
|
-
label:
|
|
21106
|
-
callback: a
|
|
21106
|
+
label: c("components.share.access.delete"),
|
|
21107
|
+
callback: a,
|
|
21108
|
+
isDisabled: !s
|
|
21107
21109
|
}
|
|
21108
|
-
]
|
|
21110
|
+
], [t, a, c, s]);
|
|
21109
21111
|
return r ? /* @__PURE__ */ v.jsx(
|
|
21110
21112
|
di,
|
|
21111
21113
|
{
|
|
21112
21114
|
isOpen: i,
|
|
21113
|
-
shouldCloseOnInteractOutside: (
|
|
21115
|
+
shouldCloseOnInteractOutside: (h) => !h.closest(
|
|
21114
21116
|
".c__access-role-dropdown"
|
|
21115
21117
|
),
|
|
21116
21118
|
onOpenChange: o,
|
|
21117
|
-
options:
|
|
21119
|
+
options: d,
|
|
21118
21120
|
selectedValues: [n],
|
|
21119
21121
|
onSelectValue: e,
|
|
21120
21122
|
topMessage: l,
|
|
@@ -21128,13 +21130,13 @@ const La = ({
|
|
|
21128
21130
|
o == null || o(!i);
|
|
21129
21131
|
},
|
|
21130
21132
|
children: [
|
|
21131
|
-
/* @__PURE__ */ v.jsx("span", { className: "c__access-role-dropdown__role-label", children:
|
|
21133
|
+
/* @__PURE__ */ v.jsx("span", { className: "c__access-role-dropdown__role-label", children: u == null ? void 0 : u.label }),
|
|
21132
21134
|
/* @__PURE__ */ v.jsx("span", { className: "material-icons c__access-role-dropdown__icon", children: i ? "arrow_drop_up" : "arrow_drop_down" })
|
|
21133
21135
|
]
|
|
21134
21136
|
}
|
|
21135
21137
|
)
|
|
21136
21138
|
}
|
|
21137
|
-
) : /* @__PURE__ */ v.jsx("span", { className: "c__access-role-dropdown__role-label-can-not-update", children:
|
|
21139
|
+
) : /* @__PURE__ */ v.jsx("span", { className: "c__access-role-dropdown__role-label-can-not-update", children: u == null ? void 0 : u.label });
|
|
21138
21140
|
}, jm = ({
|
|
21139
21141
|
users: t,
|
|
21140
21142
|
onRemoveUser: e,
|
|
@@ -21265,7 +21267,7 @@ const La = ({
|
|
|
21265
21267
|
canUpdate: o = !0,
|
|
21266
21268
|
roleTopMessage: l
|
|
21267
21269
|
}) => {
|
|
21268
|
-
const a = on();
|
|
21270
|
+
const a = on(), s = t.is_explicit !== !1 && t.can_delete !== !1;
|
|
21269
21271
|
return /* @__PURE__ */ v.jsx("div", { className: "c__share-member-item", children: /* @__PURE__ */ v.jsx(
|
|
21270
21272
|
_a,
|
|
21271
21273
|
{
|
|
@@ -21284,12 +21286,13 @@ const La = ({
|
|
|
21284
21286
|
{
|
|
21285
21287
|
roles: r,
|
|
21286
21288
|
selectedRole: t[e],
|
|
21287
|
-
onSelect: (
|
|
21289
|
+
onSelect: (c) => n == null ? void 0 : n(t, c),
|
|
21288
21290
|
isOpen: a.isOpen,
|
|
21289
21291
|
onOpenChange: a.setIsOpen,
|
|
21290
21292
|
canUpdate: o,
|
|
21291
21293
|
roleTopMessage: l,
|
|
21292
|
-
|
|
21294
|
+
canDelete: s,
|
|
21295
|
+
onDelete: s && i ? () => i(t) : void 0
|
|
21293
21296
|
}
|
|
21294
21297
|
) })
|
|
21295
21298
|
}
|
|
@@ -21383,10 +21386,11 @@ const La = ({
|
|
|
21383
21386
|
})),
|
|
21384
21387
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
21385
21388
|
[o]
|
|
21386
|
-
), x = q(
|
|
21387
|
-
|
|
21388
|
-
[
|
|
21389
|
-
|
|
21389
|
+
), x = q(() => E.find((w) => w.value === y), [E, y]);
|
|
21390
|
+
Y(() => {
|
|
21391
|
+
m([r]);
|
|
21392
|
+
}, [r]);
|
|
21393
|
+
const I = i && o.length > 0, K = () => /* @__PURE__ */ v.jsx("div", { className: "c__share-modal__link-settings__content__select", children: e ? /* @__PURE__ */ v.jsx(
|
|
21390
21394
|
di,
|
|
21391
21395
|
{
|
|
21392
21396
|
onSelectValue: (w) => {
|
|
@@ -22031,6 +22035,7 @@ const ry = 200, ny = ({
|
|
|
22031
22035
|
"a",
|
|
22032
22036
|
{
|
|
22033
22037
|
className: "c__onboarding-modal__footer-link",
|
|
22038
|
+
target: "_blank",
|
|
22034
22039
|
href: l.href,
|
|
22035
22040
|
onClick: (A) => {
|
|
22036
22041
|
l.onClick && (l.href || A.preventDefault(), l.onClick());
|