@edifice.io/collect-frontend 0.2.2-develop-pedago.3.20260601085629 → 0.2.2-develop-pedago.3.20260601095957

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.
@@ -2,10 +2,10 @@ import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
2
  import { useEdificeClient as m, Flex as r, Button as u, IconButton as I, useBreakpoint as f, useDate as g, Badge as S } from "@edifice.io/react";
3
3
  import { IconPinOn as O, IconOptions as y, IconSave as L, IconSend as v, IconArrowLeft as M, IconCalendarLight as N } from "@edifice.io/react/icons";
4
4
  import { useTranslation as p } from "react-i18next";
5
- import { u as b, D as w } from "./DropdownActionTable-qV7NgrCu.js";
5
+ import { u as b, D as w } from "./DropdownActionTable-ApbXYHJv.js";
6
6
  import { ContribSubmissionStatus as x } from "@edifice.io/collect-client-rest";
7
7
  import { create as A } from "zustand";
8
- import { K as H } from "./index-Dmgx1btS.js";
8
+ import { c as H } from "./index-BitcqCwS.js";
9
9
  const D = ({
10
10
  collection: o
11
11
  }) => {
@@ -95,7 +95,7 @@ const D = ({
95
95
  ] });
96
96
  };
97
97
  var h = /* @__PURE__ */ ((o) => (o.COLLECTION = "COLLECTION", o.SUBMISSION = "SUBMISSION", o))(h || {});
98
- const R = ({
98
+ const W = ({
99
99
  collection: o,
100
100
  onClickBack: t,
101
101
  context: i,
@@ -166,7 +166,7 @@ const R = ({
166
166
  ] });
167
167
  };
168
168
  export {
169
- R as A,
169
+ W as A,
170
170
  h as C,
171
171
  B as u
172
172
  };
@@ -1,5 +1,5 @@
1
- import { c as s, T as c, a as u, b as i, P as m, C as P, Q as d } from "./HASRA6WW-gwsZScxb.js";
2
- import { U as v, G as C, y as e } from "./index-Dmgx1btS.js";
1
+ import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./HASRA6WW-C59A3WAN.js";
2
+ import { o as v, p as C, q as e } from "./index-BitcqCwS.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -36,7 +36,7 @@ var h = (t) => {
36
36
  });
37
37
  }
38
38
  });
39
- }, p = h;
39
+ }, g = h;
40
40
  export {
41
- p as default
41
+ g as default
42
42
  };
@@ -1,17 +1,17 @@
1
1
  import { jsxs as l, jsx as e, Fragment as Q } from "react/jsx-runtime";
2
2
  import { SubmissionStatus as f, ManagerSubmissionStatus as M, WORKFLOW_RIGHTS as z } from "@edifice.io/collect-client-rest";
3
- import { useDirectory as R, Flex as u, Avatar as P, Badge as v, useEdificeClient as w, Heading as O, Table as C, Button as x, LoadingScreen as T, Modal as I, Dropdown as N, useToast as G, useBreakpoint as j, useDate as K, EmptyScreen as _, Checkbox as Y, Grid as L, useHasWorkflow as J } from "@edifice.io/react";
3
+ import { useDirectory as R, Flex as u, Avatar as P, Badge as v, useEdificeClient as w, Heading as O, Table as C, Button as x, LoadingScreen as T, Modal as I, Dropdown as N, useToast as G, useBreakpoint as j, useDate as _, EmptyScreen as K, Checkbox as Y, Grid as L, useHasWorkflow as J } from "@edifice.io/react";
4
4
  import { useNavigate as $, useParams as X } from "react-router-dom";
5
5
  import { useState as A, useEffect as k } from "react";
6
- import { A as Z, C as q } from "./AppHeaderCollection-awI42LPL.js";
6
+ import { A as Z, C as q } from "./AppHeaderCollection-DBI5QHMw.js";
7
7
  import { IconUsers as ee, IconRafterDown as U, IconEdit as te, IconTextPage as se, IconCalendarLight as ne } from "@edifice.io/react/icons";
8
8
  import { useTranslation as D } from "react-i18next";
9
- import { b as ie, d as oe, a as ae } from "./submission.queries-2eGl6UA_.js";
9
+ import { u as ie, a as oe, s as ae } from "./submission.queries-D1INPk9_.js";
10
10
  import { create as ce } from "zustand";
11
- import { K as le, ak as re, P as de, u as ue } from "./index-Dmgx1btS.js";
11
+ import { c as le, f as re, P as de, g as ue } from "./index-BitcqCwS.js";
12
12
  import { u as F } from "./useGetStatusSubmission-DxHmLPxr.js";
13
- import { u as E } from "./DropdownActionTable-qV7NgrCu.js";
14
- import { D as me } from "./DeleteCollectionModal-CLhZ938W.js";
13
+ import { u as E } from "./DropdownActionTable-ApbXYHJv.js";
14
+ import { D as me } from "./DeleteCollectionModal-Bk1Imtj1.js";
15
15
  import { Editor as H } from "@edifice.io/react/editor";
16
16
  import { E as he } from "./emptyscreen-list-collection-CWGxO4Ss.js";
17
17
  const W = (t) => {
@@ -300,7 +300,7 @@ const W = (t) => {
300
300
  }, ye = ({
301
301
  collectionId: t
302
302
  }) => {
303
- const { appCode: o } = w(), { t: s } = D(o), r = G(), { lg: c } = j(), [a, g] = A(!1), { selectedSubmissionListMenu: i, setSelectedSubmissionListMenu: b } = B(), h = (i == null ? void 0 : i.status) === f.VERIFIED, { formatDate: n } = K(), y = oe(), m = async (p) => {
303
+ const { appCode: o } = w(), { t: s } = D(o), r = G(), { lg: c } = j(), [a, g] = A(!1), { selectedSubmissionListMenu: i, setSelectedSubmissionListMenu: b } = B(), h = (i == null ? void 0 : i.status) === f.VERIFIED, { formatDate: n } = _(), y = oe(), m = async (p) => {
304
304
  if (i)
305
305
  try {
306
306
  g(!0), await y.mutateAsync({
@@ -379,7 +379,7 @@ const W = (t) => {
379
379
  }
380
380
  ),
381
381
  i.status === f.EMPTY ? /* @__PURE__ */ e(
382
- _,
382
+ K,
383
383
  {
384
384
  imageSrc: he,
385
385
  title: s("collection.collectionList.emptyScreen.title"),
@@ -3,11 +3,11 @@ import { WORKFLOW_RIGHTS as u } from "@edifice.io/collect-client-rest";
3
3
  import { useEdificeClient as f, useHasWorkflow as C, useBreakpoint as h, Flex as L, AppHeader as S, Breadcrumb as g, Grid as r, LoadingScreen as x } from "@edifice.io/react";
4
4
  import { Suspense as N } from "react";
5
5
  import { useLocation as I, Navigate as O, Outlet as A } from "react-router-dom";
6
- import { aj as E, M as a, A as T, e as w } from "./index-Dmgx1btS.js";
7
- const j = async () => null, B = () => {
8
- const { currentApp: l } = f(), { pathname: s } = I(), n = C(u.COLLECTION_CREATE), { header: c, showMenu: i } = E(), { lg: m } = h(), d = c !== !1, o = i !== !1, p = s === "/" || s === `/${a.LIST_COLLECTIONS}`;
9
- return n !== void 0 && !n && p ? /* @__PURE__ */ e(O, { to: `/${a.LIST_SUBMISSIONS}`, replace: !0 }) : /* @__PURE__ */ t(L, { direction: "column", className: "flex-grow-1", children: [
10
- d && /* @__PURE__ */ e(S, { render: () => /* @__PURE__ */ e(T, {}), children: /* @__PURE__ */ e(g, { app: l }) }),
6
+ import { u as E, M as l, A as T, C as w } from "./index-BitcqCwS.js";
7
+ const B = async () => null, F = () => {
8
+ const { currentApp: a } = f(), { pathname: s } = I(), n = C(u.COLLECTION_CREATE), { header: c, showMenu: i } = E(), { lg: m } = h(), d = c !== !1, o = i !== !1, p = s === "/" || s === `/${l.LIST_COLLECTIONS}`;
9
+ return n !== void 0 && !n && p ? /* @__PURE__ */ e(O, { to: `/${l.LIST_SUBMISSIONS}`, replace: !0 }) : /* @__PURE__ */ t(L, { direction: "column", className: "flex-grow-1", children: [
10
+ d && /* @__PURE__ */ e(S, { render: () => /* @__PURE__ */ e(T, {}), children: /* @__PURE__ */ e(g, { app: a }) }),
11
11
  /* @__PURE__ */ t(r, { className: "flex-grow-1", children: [
12
12
  o && /* @__PURE__ */ e(
13
13
  r.Col,
@@ -36,6 +36,6 @@ const j = async () => null, B = () => {
36
36
  ] });
37
37
  };
38
38
  export {
39
- B as Component,
40
- j as loader
39
+ F as Component,
40
+ B as loader
41
41
  };
@@ -1,21 +1,21 @@
1
1
  import { jsx as e, Fragment as T, jsxs as u } from "react/jsx-runtime";
2
2
  import { useState as D, useMemo as L, useCallback as B, useEffect as E } from "react";
3
3
  import { S as A } from "./SearchBarCollect-DBKaVVDV.js";
4
- import { K as F, al as M, W as O, v as R } from "./index-Dmgx1btS.js";
4
+ import { c as F, a as M, W as O, b as R } from "./index-BitcqCwS.js";
5
5
  import { useDate as $, Table as m, Flex as I, Badge as k, IconButton as S, useEdificeClient as v, EmptyScreen as G, LoadingScreen as j } from "@edifice.io/react";
6
6
  import { useTranslation as N } from "react-i18next";
7
7
  import { E as Q } from "./emptyscreen-list-collection-CWGxO4Ss.js";
8
- import { D as W } from "./DeleteCollectionModal-CLhZ938W.js";
9
- import { SortDirection as b, CollectionSortField as y } from "@edifice.io/collect-client-rest";
8
+ import { D as W } from "./DeleteCollectionModal-Bk1Imtj1.js";
9
+ import { SortDirection as C, CollectionSortField as y } from "@edifice.io/collect-client-rest";
10
10
  import { create as _ } from "zustand";
11
- import { IconOptions as H, IconRafterLeft as K, IconRafterRight as z, IconListOrder as U, IconArrowUp as Y, IconArrowDown as Z } from "@edifice.io/react/icons";
11
+ import { IconOptions as H, IconRafterLeft as z, IconRafterRight as K, IconListOrder as U, IconArrowUp as Y, IconArrowDown as Z } from "@edifice.io/react/icons";
12
12
  import { t as q } from "i18next";
13
13
  import { useNavigate as J } from "react-router-dom";
14
- import { D as V } from "./DropdownActionTable-qV7NgrCu.js";
14
+ import { D as V } from "./DropdownActionTable-ApbXYHJv.js";
15
15
  const X = {
16
16
  search: "",
17
17
  sortBy: y.DEADLINE,
18
- sortDirection: b.DESC
18
+ sortDirection: C.DESC
19
19
  }, x = F(
20
20
  _((n) => ({
21
21
  ...X,
@@ -29,15 +29,15 @@ const X = {
29
29
  sortBy: o,
30
30
  sortDirection: a
31
31
  }), [t, l] = D(1), c = L(() => {
32
- var C, p;
33
- const h = (C = r == null ? void 0 : r.pages) == null ? void 0 : C[r.pages.length - 1];
32
+ var b, p;
33
+ const h = (b = r == null ? void 0 : r.pages) == null ? void 0 : b[r.pages.length - 1];
34
34
  return ((p = h == null ? void 0 : h.meta) == null ? void 0 : p.totalPages) ?? 1;
35
35
  }, [r]), f = L(() => {
36
36
  var h;
37
37
  if ((h = r == null ? void 0 : r.pages) != null && h.length)
38
- return r.pages.find((C) => {
38
+ return r.pages.find((b) => {
39
39
  var p;
40
- return ((p = C.meta) == null ? void 0 : p.currentPage) === t;
40
+ return ((p = b.meta) == null ? void 0 : p.currentPage) === t;
41
41
  }) ?? r.pages[t - 1];
42
42
  }, [r, t]);
43
43
  return {
@@ -176,7 +176,7 @@ const X = {
176
176
  {
177
177
  variant: "ghost",
178
178
  color: "tertiary",
179
- icon: /* @__PURE__ */ e(K, {}),
179
+ icon: /* @__PURE__ */ e(z, {}),
180
180
  disabled: !a || d,
181
181
  onClick: i
182
182
  }
@@ -191,7 +191,7 @@ const X = {
191
191
  {
192
192
  variant: "ghost",
193
193
  color: "tertiary",
194
- icon: /* @__PURE__ */ e(z, {}),
194
+ icon: /* @__PURE__ */ e(K, {}),
195
195
  disabled: !r || d || s,
196
196
  onClick: g
197
197
  }
@@ -223,11 +223,11 @@ const X = {
223
223
  }
224
224
  ], i = (l) => l.sortField && l.sortField === a, g = (l) => {
225
225
  let c = /* @__PURE__ */ e(U, { width: 16, height: 16 });
226
- return i(l) && (r === b.ASC ? c = /* @__PURE__ */ e(Y, {}) : c = /* @__PURE__ */ e(Z, {})), c;
226
+ return i(l) && (r === C.ASC ? c = /* @__PURE__ */ e(Y, {}) : c = /* @__PURE__ */ e(Z, {})), c;
227
227
  }, t = B(
228
228
  (l) => {
229
- let c = b.ASC;
230
- a === l && r === b.ASC && (c = b.DESC), d(l, c);
229
+ let c = C.ASC;
230
+ a === l && r === C.ASC && (c = C.DESC), d(l, c);
231
231
  },
232
232
  [a, r, d]
233
233
  );
@@ -1,11 +1,11 @@
1
1
  import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
- import { useEdificeClient as m, useToast as f, Modal as d, Button as C } from "@edifice.io/react";
3
- import { IconDelete as h } from "@edifice.io/react/icons";
2
+ import { useEdificeClient as m, useToast as h, Modal as d, Button as C } from "@edifice.io/react";
3
+ import { IconDelete as f } from "@edifice.io/react/icons";
4
4
  import { useTranslation as p } from "react-i18next";
5
- import { aq as M } from "./index-Dmgx1btS.js";
6
- import { u as D } from "./DropdownActionTable-qV7NgrCu.js";
5
+ import { h as M } from "./index-BitcqCwS.js";
6
+ import { u as D } from "./DropdownActionTable-ApbXYHJv.js";
7
7
  const y = () => {
8
- const { appCode: r } = m(), { t: n } = p(r), e = f(), a = M(), { isDeleteModalOpen: l, onCloseDeleteModal: c, deleteCollectionId: i } = D((o) => ({
8
+ const { appCode: r } = m(), { t: n } = p(r), e = h(), a = M(), { isDeleteModalOpen: l, onCloseDeleteModal: c, deleteCollectionId: i } = D((o) => ({
9
9
  isDeleteModalOpen: o.isDeleteModalOpen,
10
10
  onCloseDeleteModal: o.onCloseDeleteModal,
11
11
  deleteCollectionId: o.deleteCollectionId
@@ -57,7 +57,7 @@ const y = () => {
57
57
  "data-testid": "collect-collection-delete-modal-button-delete",
58
58
  color: "danger",
59
59
  onClick: i,
60
- leftIcon: /* @__PURE__ */ t(h, {}),
60
+ leftIcon: /* @__PURE__ */ t(f, {}),
61
61
  children: e("collection.delete")
62
62
  }
63
63
  )
@@ -6,7 +6,7 @@ import { IconExternalLink as I, IconEdit as O, IconShare as h, IconDelete as w }
6
6
  import { useTranslation as D } from "react-i18next";
7
7
  import { useNavigate as C } from "react-router-dom";
8
8
  import { create as b } from "zustand";
9
- import { K as M } from "./index-Dmgx1btS.js";
9
+ import { c as M } from "./index-BitcqCwS.js";
10
10
  const T = b((e) => ({
11
11
  isDeleteModalOpen: !1,
12
12
  deleteCollectionId: null,
@@ -1,26 +1,26 @@
1
1
  import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
2
  import { WORKFLOW_RIGHTS as N } from "@edifice.io/collect-client-rest";
3
- import { useEdificeClient as x, useBreakpoint as I, useToast as w, useHasWorkflow as E, LoadingScreen as L, Grid as g, Flex as h, Button as C } from "@edifice.io/react";
4
- import { useState as O } from "react";
5
- import { useTranslation as k } from "react-i18next";
6
- import { useParams as F, useNavigate as P } from "react-router-dom";
7
- import { au as T, ak as Q, P as R, f as W, u as j } from "./index-Dmgx1btS.js";
8
- import { a as S } from "./submission.queries-2eGl6UA_.js";
3
+ import { useEdificeClient as x, useBreakpoint as I, useToast as w, useHasWorkflow as E, LoadingScreen as F, Grid as g, Flex as h, Button as C } from "@edifice.io/react";
4
+ import { useState as L } from "react";
5
+ import { useTranslation as O } from "react-i18next";
6
+ import { useParams as P, useNavigate as T } from "react-router-dom";
7
+ import { n as k, f as Q, P as R, F as W, g as j } from "./index-BitcqCwS.js";
8
+ import { s as S } from "./submission.queries-D1INPk9_.js";
9
9
  const K = (n) => async ({ params: i }) => {
10
10
  const s = Number(i.collectionId);
11
11
  return await n.ensureQueryData(j(s)), await n.prefetchInfiniteQuery(
12
12
  S(s)
13
13
  ), null;
14
14
  }, J = () => {
15
- const { appCode: n } = x(), { t: i } = k(n), { lg: s } = I(), r = F(), d = P(), u = w(), f = E(N.COLLECTION_CREATE), p = T(), [e, y] = O(void 0), { data: o, isLoading: a } = Q(
15
+ const { appCode: n } = x(), { t: i } = O(n), { lg: s } = I(), r = P(), d = T(), u = w(), f = E(N.COLLECTION_CREATE), p = k(), [e, y] = L(void 0), { data: o, isLoading: c } = Q(
16
16
  Number(r.collectionId)
17
17
  );
18
- if (a)
19
- return /* @__PURE__ */ t(L, {});
18
+ if (c)
19
+ return /* @__PURE__ */ t(F, {});
20
20
  if (!f || !o) return /* @__PURE__ */ t(R, {});
21
21
  const b = async () => {
22
- const c = Number(r.collectionId);
23
- if (!c) return;
22
+ const a = Number(r.collectionId);
23
+ if (!a) return;
24
24
  const l = {
25
25
  title: (e == null ? void 0 : e.title) ?? o.name ?? "",
26
26
  description: (e == null ? void 0 : e.description) ?? o.content ?? "",
@@ -30,7 +30,7 @@ const K = (n) => async ({ params: i }) => {
30
30
  };
31
31
  try {
32
32
  await p.mutateAsync({
33
- id: c,
33
+ id: a,
34
34
  data: {
35
35
  name: l.title,
36
36
  content: l.description,
@@ -39,7 +39,7 @@ const K = (n) => async ({ params: i }) => {
39
39
  }), u.success(i("collection.toast.success.collection.update"), {
40
40
  duration: 1e4,
41
41
  isDismissible: !0
42
- }), d(`/list-collections/id/${c}`);
42
+ }), d(`/list-collections/id/${a}`);
43
43
  } catch (v) {
44
44
  u.error(i("collection.toast.error.collection.update"), {
45
45
  duration: 1e4,
@@ -69,7 +69,7 @@ const K = (n) => async ({ params: i }) => {
69
69
  {
70
70
  variant: "outline",
71
71
  color: "primary",
72
- isLoading: a,
72
+ isLoading: c,
73
73
  onClick: () => d(-1),
74
74
  "data-testid": "collect-cancel-sharings-button",
75
75
  children: i("collection.cancel")
@@ -80,7 +80,7 @@ const K = (n) => async ({ params: i }) => {
80
80
  {
81
81
  variant: "filled",
82
82
  color: "primary",
83
- isLoading: a || p.isPending,
83
+ isLoading: c || p.isPending,
84
84
  loadingPosition: "right",
85
85
  onClick: b,
86
86
  "data-testid": "collect-save-sharings-button",