@club-employes/utopia 4.372.0 → 4.373.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.
|
@@ -7,8 +7,11 @@ declare const _default: DefineComponent<MyUserGroupsProps, {}, {}, {}, {}, Compo
|
|
|
7
7
|
onDelete?: (() => any) | undefined;
|
|
8
8
|
onEdit?: (() => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
|
+
showMoreLabel: string;
|
|
10
11
|
peopleLabel: string;
|
|
11
12
|
criteria: UserGroupCriterion[];
|
|
12
13
|
criteriaLabel: string;
|
|
14
|
+
maxVisibleCriteria: number;
|
|
15
|
+
showLessLabel: string;
|
|
13
16
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
14
17
|
export default _default;
|
package/dist/index.js
CHANGED
|
@@ -48867,12 +48867,20 @@ const IN = /* @__PURE__ */ re(L3, [["__scopeId", "data-v-4d16284f"]]), SF = "dat
|
|
|
48867
48867
|
peopleCount: {},
|
|
48868
48868
|
peopleLabel: { default: "personne(s)" },
|
|
48869
48869
|
criteria: { default: () => [] },
|
|
48870
|
-
criteriaLabel: { default: "CRITÈRES DE CIBLAGE" }
|
|
48870
|
+
criteriaLabel: { default: "CRITÈRES DE CIBLAGE" },
|
|
48871
|
+
maxVisibleCriteria: { default: 4 },
|
|
48872
|
+
showMoreLabel: { default: "Voir plus ({count})" },
|
|
48873
|
+
showLessLabel: { default: "Voir moins" }
|
|
48871
48874
|
},
|
|
48872
48875
|
emits: ["edit", "delete"],
|
|
48873
48876
|
setup(e, { emit: t }) {
|
|
48874
|
-
const n = t
|
|
48875
|
-
|
|
48877
|
+
const n = e, o = t, l = H(!1), a = M(() => (n.criteria?.length ?? 0) > n.maxVisibleCriteria), s = M(
|
|
48878
|
+
() => l.value || !a.value ? n.criteria ?? [] : (n.criteria ?? []).slice(0, n.maxVisibleCriteria)
|
|
48879
|
+
), c = M(() => {
|
|
48880
|
+
const r = (n.criteria?.length ?? 0) - n.maxVisibleCriteria;
|
|
48881
|
+
return n.showMoreLabel.replace("{count}", String(r));
|
|
48882
|
+
});
|
|
48883
|
+
return (r, u) => (i(), B(h(il), {
|
|
48876
48884
|
variant: "elevated",
|
|
48877
48885
|
interactive: !1,
|
|
48878
48886
|
class: "utopia-my-user-groups"
|
|
@@ -48919,7 +48927,7 @@ const IN = /* @__PURE__ */ re(L3, [["__scopeId", "data-v-4d16284f"]]), SF = "dat
|
|
|
48919
48927
|
type: "button",
|
|
48920
48928
|
class: "utopia-my-user-groups__edit-btn",
|
|
48921
48929
|
"aria-label": `Modifier le groupe ${e.title}`,
|
|
48922
|
-
onClick:
|
|
48930
|
+
onClick: u[0] || (u[0] = (A) => o("edit"))
|
|
48923
48931
|
}, [
|
|
48924
48932
|
w(h(W), {
|
|
48925
48933
|
name: "Pencil",
|
|
@@ -48931,7 +48939,7 @@ const IN = /* @__PURE__ */ re(L3, [["__scopeId", "data-v-4d16284f"]]), SF = "dat
|
|
|
48931
48939
|
type: "button",
|
|
48932
48940
|
class: "utopia-my-user-groups__delete-btn",
|
|
48933
48941
|
"aria-label": `Supprimer le groupe ${e.title}`,
|
|
48934
|
-
onClick:
|
|
48942
|
+
onClick: u[1] || (u[1] = (A) => o("delete"))
|
|
48935
48943
|
}, [
|
|
48936
48944
|
w(h(W), {
|
|
48937
48945
|
name: "Trash-2",
|
|
@@ -48956,19 +48964,19 @@ const IN = /* @__PURE__ */ re(L3, [["__scopeId", "data-v-4d16284f"]]), SF = "dat
|
|
|
48956
48964
|
_: 1
|
|
48957
48965
|
}),
|
|
48958
48966
|
e.criteria && e.criteria.length ? (i(), d("div", LI, [
|
|
48959
|
-
(i(!0), d(X, null, de(
|
|
48960
|
-
key:
|
|
48961
|
-
variant:
|
|
48967
|
+
(i(!0), d(X, null, de(s.value, (A) => (i(), B(h(Gt), {
|
|
48968
|
+
key: A.label,
|
|
48969
|
+
variant: A.variant ?? "secondary",
|
|
48962
48970
|
size: "small",
|
|
48963
|
-
ghost:
|
|
48964
|
-
"left-icon":
|
|
48971
|
+
ghost: A.ghost !== !1,
|
|
48972
|
+
"left-icon": A.icon
|
|
48965
48973
|
}, {
|
|
48966
48974
|
default: O(() => [
|
|
48967
|
-
|
|
48968
|
-
S(C(
|
|
48969
|
-
v("strong", null, C(
|
|
48975
|
+
A.label.includes(": ") ? (i(), d(X, { key: 0 }, [
|
|
48976
|
+
S(C(A.label.split(": ")[0]) + ": ", 1),
|
|
48977
|
+
v("strong", null, C(A.label.split(": ").slice(1).join(": ")), 1)
|
|
48970
48978
|
], 64)) : (i(), d(X, { key: 1 }, [
|
|
48971
|
-
S(C(
|
|
48979
|
+
S(C(A.label), 1)
|
|
48972
48980
|
], 64))
|
|
48973
48981
|
]),
|
|
48974
48982
|
_: 2
|
|
@@ -48979,11 +48987,23 @@ const IN = /* @__PURE__ */ re(L3, [["__scopeId", "data-v-4d16284f"]]), SF = "dat
|
|
|
48979
48987
|
size: "xs",
|
|
48980
48988
|
color: "brand-secondary-200"
|
|
48981
48989
|
}, {
|
|
48982
|
-
default: O(() => [...
|
|
48990
|
+
default: O(() => [...u[3] || (u[3] = [
|
|
48983
48991
|
S("Aucun critère", -1)
|
|
48984
48992
|
])]),
|
|
48985
48993
|
_: 1
|
|
48986
|
-
}))
|
|
48994
|
+
})),
|
|
48995
|
+
a.value ? (i(), d("button", {
|
|
48996
|
+
key: 2,
|
|
48997
|
+
type: "button",
|
|
48998
|
+
class: "utopia-my-user-groups__show-more-btn",
|
|
48999
|
+
onClick: u[2] || (u[2] = (A) => l.value = !l.value)
|
|
49000
|
+
}, [
|
|
49001
|
+
v("span", null, C(l.value ? e.showLessLabel : c.value), 1),
|
|
49002
|
+
w(h(W), {
|
|
49003
|
+
name: l.value ? "Chevron-up" : "Chevron-down",
|
|
49004
|
+
size: "small"
|
|
49005
|
+
}, null, 8, ["name"])
|
|
49006
|
+
])) : P("", !0)
|
|
48987
49007
|
])
|
|
48988
49008
|
]),
|
|
48989
49009
|
_: 1
|
|
@@ -48991,7 +49011,7 @@ const IN = /* @__PURE__ */ re(L3, [["__scopeId", "data-v-4d16284f"]]), SF = "dat
|
|
|
48991
49011
|
}
|
|
48992
49012
|
}), zd = {};
|
|
48993
49013
|
typeof zd == "function" && zd(S3);
|
|
48994
|
-
const JN = /* @__PURE__ */ re(S3, [["__scopeId", "data-v-
|
|
49014
|
+
const JN = /* @__PURE__ */ re(S3, [["__scopeId", "data-v-5a29b7af"]]), j3 = /* @__PURE__ */ Symbol("utopia-tree-context"), SI = {
|
|
48995
49015
|
key: 1,
|
|
48996
49016
|
class: "utopia-tree-node__toggle-placeholder"
|
|
48997
49017
|
}, jI = {
|