@edifice.io/collect-frontend 0.2.2-develop-pedago.3.20260513153621 → 0.2.2-develop-pedago.3.20260513155143
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/lib/{AppHeaderCollection-BwJiRj0f.js → AppHeaderCollection-NDVqkPAk.js} +36 -34
- package/lib/{CXEL7IU7-BiZ2A3Dg.js → CXEL7IU7-BYb7Uvsv.js} +2 -2
- package/lib/{Collection-nMX5Wzlf.js → Collection-vh4G8nOA.js} +5 -5
- package/lib/CollectionsLayout-C1zhEfmW.js +41 -0
- package/lib/{CollectionsList-DRhnts8C.js → CollectionsList-gwaqCG2y.js} +55 -41
- package/lib/{DeleteCollectionModal-CdX_aZMd.js → DeleteCollectionModal-DRL-08Rg.js} +2 -2
- package/lib/{DropdownActionTable-BDj1h63V.js → DropdownActionTable-CkM3P5s9.js} +1 -1
- package/lib/{FormEdit-CY3w6hQR.js → FormEdit-DLe4gaVE.js} +23 -23
- package/lib/{HASRA6WW-3i3cuFII.js → HASRA6WW-CXOTmwiT.js} +120 -120
- package/lib/{I3HPI4QX-CtbExNwM.js → I3HPI4QX-qJ3DXGBH.js} +2 -2
- package/lib/{MembersEdit-P1zmWiS5.js → MembersEdit-2VX6_6m-.js} +23 -23
- package/lib/{Root-B8O_s49l.js → Root-m8erA56L.js} +1 -1
- package/lib/{Submission-C4htcgQz.js → Submission-IVgPZn9u.js} +4 -4
- package/lib/{SubmissionList-B1EmeYVS.js → SubmissionList-BrTnzZMD.js} +1 -1
- package/lib/components/AppActionHeader.d.ts +1 -1
- package/lib/components/AppActionHeaderContext.d.ts +11 -0
- package/lib/components/CollectAppActionHeader.d.ts +4 -0
- package/lib/features/creation-wizard/sharing.utils.d.ts +4 -0
- package/lib/features/menu/components/DesktopMenu.d.ts +1 -1
- package/lib/{index-DKvcfKPu.js → index-D1A8ZvCs.js} +1232 -1160
- package/lib/index.d.ts +6 -5
- package/lib/index.js +18 -13
- package/lib/{submission.queries-BUQBqMC9.js → submission.queries-XI_GKzo9.js} +1 -1
- package/package.json +1 -1
- package/lib/CollectionsLayout-6FCgKH15.js +0 -71
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsxs as c, jsx as
|
|
2
|
-
import { useEdificeClient as m, Flex as r, Button as u, IconButton as I, useBreakpoint as f, useDate as
|
|
1
|
+
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
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-
|
|
5
|
+
import { u as b, D as w } from "./DropdownActionTable-CkM3P5s9.js";
|
|
6
6
|
import { ContribSubmissionStatus as x } from "@edifice.io/collect-client-rest";
|
|
7
7
|
import { create as A } from "zustand";
|
|
8
|
-
import { c as H } from "./index-
|
|
8
|
+
import { c as H } from "./index-D1A8ZvCs.js";
|
|
9
9
|
const D = ({
|
|
10
|
-
collection:
|
|
10
|
+
collection: o
|
|
11
11
|
}) => {
|
|
12
12
|
const { appCode: t } = m(), { t: i } = p(t), e = b.use.onOpenInstructionModal();
|
|
13
13
|
return /* @__PURE__ */ c(r, { gap: "16", justify: "end", children: [
|
|
14
|
-
/* @__PURE__ */
|
|
14
|
+
/* @__PURE__ */ n(
|
|
15
15
|
u,
|
|
16
16
|
{
|
|
17
17
|
"data-testid": "collect-collection-actions-button-instruction",
|
|
18
18
|
variant: "outline",
|
|
19
19
|
color: "primary",
|
|
20
|
-
leftIcon: /* @__PURE__ */
|
|
20
|
+
leftIcon: /* @__PURE__ */ n(O, {}),
|
|
21
21
|
onClick: e,
|
|
22
22
|
children: i("collection.appHeaderCollection.collection.button.instruction")
|
|
23
23
|
}
|
|
24
24
|
),
|
|
25
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ n(w, { collectionId: o.id, isCollection: !0, children: (l) => /* @__PURE__ */ n(
|
|
26
26
|
I,
|
|
27
27
|
{
|
|
28
28
|
...l,
|
|
@@ -32,28 +32,28 @@ const D = ({
|
|
|
32
32
|
"data-testid": "collect-collection-actions-button-options",
|
|
33
33
|
color: "primary",
|
|
34
34
|
variant: "outline",
|
|
35
|
-
icon: /* @__PURE__ */
|
|
35
|
+
icon: /* @__PURE__ */ n(y, {})
|
|
36
36
|
}
|
|
37
37
|
) })
|
|
38
38
|
] });
|
|
39
|
-
}, k = A((
|
|
39
|
+
}, k = A((o) => ({
|
|
40
40
|
submissionId: null,
|
|
41
41
|
submissionContent: "",
|
|
42
42
|
isUpdateSubmissionModalOpen: !1,
|
|
43
43
|
submissionHasContent: !1,
|
|
44
44
|
submissionIsLoading: !1,
|
|
45
|
-
onOpenUpdateSubmissionModal: () =>
|
|
46
|
-
onCloseUpdateSubmissionModal: () =>
|
|
47
|
-
setSubmissionData: (t, i) =>
|
|
48
|
-
setSubmissionIsLoading: (t) =>
|
|
49
|
-
hydrateSubmissionContent: (t) =>
|
|
45
|
+
onOpenUpdateSubmissionModal: () => o({ isUpdateSubmissionModalOpen: !0 }),
|
|
46
|
+
onCloseUpdateSubmissionModal: () => o({ isUpdateSubmissionModalOpen: !1 }),
|
|
47
|
+
setSubmissionData: (t, i) => o({ submissionContent: t, submissionHasContent: i }),
|
|
48
|
+
setSubmissionIsLoading: (t) => o({ submissionIsLoading: t }),
|
|
49
|
+
hydrateSubmissionContent: (t) => o((i) => i.submissionId === t.id ? i : {
|
|
50
50
|
submissionId: t.id,
|
|
51
51
|
submissionContent: t.content || ""
|
|
52
52
|
})
|
|
53
53
|
})), B = H(
|
|
54
54
|
k
|
|
55
55
|
), T = ({
|
|
56
|
-
handleUpdateSubmission:
|
|
56
|
+
handleUpdateSubmission: o
|
|
57
57
|
}) => {
|
|
58
58
|
const { appCode: t } = m(), { t: i } = p(t), e = b.use.isPastDeadline(), {
|
|
59
59
|
submissionHasContent: l,
|
|
@@ -65,28 +65,28 @@ const D = ({
|
|
|
65
65
|
submissionIsLoading: s.submissionIsLoading
|
|
66
66
|
}));
|
|
67
67
|
return /* @__PURE__ */ c(r, { gap: "16", justify: "end", children: [
|
|
68
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ n(
|
|
69
69
|
u,
|
|
70
70
|
{
|
|
71
71
|
"data-testid": "collect-submission-app-header-actions-draft-button",
|
|
72
72
|
variant: "outline",
|
|
73
73
|
color: "primary",
|
|
74
|
-
leftIcon: /* @__PURE__ */
|
|
74
|
+
leftIcon: /* @__PURE__ */ n(L, {}),
|
|
75
75
|
disabled: e,
|
|
76
76
|
isLoading: d,
|
|
77
|
-
onClick: () =>
|
|
77
|
+
onClick: () => o == null ? void 0 : o({
|
|
78
78
|
status: x.DRAFT
|
|
79
79
|
}),
|
|
80
80
|
children: i("collection.appHeaderSubmission.submission.button.draft")
|
|
81
81
|
}
|
|
82
82
|
),
|
|
83
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ n(
|
|
84
84
|
u,
|
|
85
85
|
{
|
|
86
86
|
"data-testid": "collect-submission-app-header-actions-send-button",
|
|
87
87
|
variant: "filled",
|
|
88
88
|
color: "primary",
|
|
89
|
-
leftIcon: /* @__PURE__ */
|
|
89
|
+
leftIcon: /* @__PURE__ */ n(v, {}),
|
|
90
90
|
disabled: e || !l,
|
|
91
91
|
onClick: () => a(),
|
|
92
92
|
children: i("collection.appHeaderSubmission.submission.button.send")
|
|
@@ -94,22 +94,22 @@ const D = ({
|
|
|
94
94
|
)
|
|
95
95
|
] });
|
|
96
96
|
};
|
|
97
|
-
var
|
|
97
|
+
var h = /* @__PURE__ */ ((o) => (o.COLLECTION = "COLLECTION", o.SUBMISSION = "SUBMISSION", o))(h || {});
|
|
98
98
|
const W = ({
|
|
99
|
-
collection:
|
|
99
|
+
collection: o,
|
|
100
100
|
onClickBack: t,
|
|
101
101
|
context: i,
|
|
102
102
|
handleUpdateSubmission: e
|
|
103
103
|
}) => {
|
|
104
|
-
const { appCode: l } = m(), { t: d } = p(l), { lg: a, md: s } = f(), { formatDate:
|
|
104
|
+
const { appCode: l } = m(), { t: d } = p(l), { lg: a, md: s } = f(), { formatDate: C } = g();
|
|
105
105
|
return /* @__PURE__ */ c("div", { className: `py-16 border-bottom bg-white ${s ? "px-48" : "px-16"}`, children: [
|
|
106
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ n(r, { align: "center", gap: "8", children: /* @__PURE__ */ n(
|
|
107
107
|
u,
|
|
108
108
|
{
|
|
109
109
|
"data-testid": "collect-submission-app-header-button-back",
|
|
110
110
|
className: "text-gray-700",
|
|
111
111
|
color: "tertiary",
|
|
112
|
-
leftIcon: /* @__PURE__ */
|
|
112
|
+
leftIcon: /* @__PURE__ */ n(M, { width: 20, height: 20 }),
|
|
113
113
|
type: "button",
|
|
114
114
|
variant: "ghost",
|
|
115
115
|
size: "sm",
|
|
@@ -132,16 +132,18 @@ const W = ({
|
|
|
132
132
|
className: `${s && "d-flex"} ${!a && "w-100"}`,
|
|
133
133
|
style: { maxWidth: a ? "70%" : "100%" },
|
|
134
134
|
children: [
|
|
135
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ n(
|
|
136
136
|
"h2",
|
|
137
137
|
{
|
|
138
|
+
"data-testid": "collect-submission-app-header-title",
|
|
138
139
|
className: `text-truncate ${s ? "me-12" : "mb-12 text-truncate-2"}`,
|
|
139
|
-
children:
|
|
140
|
+
children: o.name
|
|
140
141
|
}
|
|
141
142
|
),
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
|
|
143
|
+
/* @__PURE__ */ n(
|
|
144
|
+
S,
|
|
144
145
|
{
|
|
146
|
+
"data-testid": "collect-submission-app-header-badge-deadline",
|
|
145
147
|
className: "lh-base",
|
|
146
148
|
style: { height: "3rem" },
|
|
147
149
|
variant: {
|
|
@@ -149,15 +151,15 @@ const W = ({
|
|
|
149
151
|
type: "notification"
|
|
150
152
|
},
|
|
151
153
|
children: /* @__PURE__ */ c(r, { align: "center", gap: "8", children: [
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
`${d("collection.appHeaderCollection.deadline")} ${
|
|
154
|
+
/* @__PURE__ */ n(N, { height: 20, width: 20 }),
|
|
155
|
+
`${d("collection.appHeaderCollection.deadline")} ${C(o.deadline)}`
|
|
154
156
|
] })
|
|
155
157
|
}
|
|
156
158
|
)
|
|
157
159
|
]
|
|
158
160
|
}
|
|
159
161
|
),
|
|
160
|
-
i ===
|
|
162
|
+
i === h.COLLECTION ? /* @__PURE__ */ n(D, { collection: o }) : /* @__PURE__ */ n(T, { handleUpdateSubmission: e })
|
|
161
163
|
]
|
|
162
164
|
}
|
|
163
165
|
)
|
|
@@ -165,6 +167,6 @@ const W = ({
|
|
|
165
167
|
};
|
|
166
168
|
export {
|
|
167
169
|
W as A,
|
|
168
|
-
C,
|
|
170
|
+
h as C,
|
|
169
171
|
B as u
|
|
170
172
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import { n as v, o as C, p as e } from "./index-
|
|
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-CXOTmwiT.js";
|
|
2
|
+
import { n as v, o as C, p as e } from "./index-D1A8ZvCs.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -3,15 +3,15 @@ import { SubmissionStatus as f, ManagerSubmissionStatus as M, WORKFLOW_RIGHTS as
|
|
|
3
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-
|
|
6
|
+
import { A as Z, C as q } from "./AppHeaderCollection-NDVqkPAk.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 { u as ie, a as oe, s as ae } from "./submission.queries-
|
|
9
|
+
import { u as ie, a as oe, s as ae } from "./submission.queries-XI_GKzo9.js";
|
|
10
10
|
import { create as ce } from "zustand";
|
|
11
|
-
import { c as le, f as re, P as de, g as ue } from "./index-
|
|
11
|
+
import { c as le, f as re, P as de, g as ue } from "./index-D1A8ZvCs.js";
|
|
12
12
|
import { u as F } from "./useGetStatusSubmission-DxHmLPxr.js";
|
|
13
|
-
import { u as E } from "./DropdownActionTable-
|
|
14
|
-
import { D as me } from "./DeleteCollectionModal-
|
|
13
|
+
import { u as E } from "./DropdownActionTable-CkM3P5s9.js";
|
|
14
|
+
import { D as me } from "./DeleteCollectionModal-DRL-08Rg.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) => {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { WORKFLOW_RIGHTS as u } from "@edifice.io/collect-client-rest";
|
|
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
|
+
import { Suspense as N } from "react";
|
|
5
|
+
import { useLocation as I, Navigate as O, Outlet as A } from "react-router-dom";
|
|
6
|
+
import { u as E, M as l, A as T, C as w } from "./index-D1A8ZvCs.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
|
+
/* @__PURE__ */ t(r, { className: "flex-grow-1", children: [
|
|
12
|
+
o && /* @__PURE__ */ e(
|
|
13
|
+
r.Col,
|
|
14
|
+
{
|
|
15
|
+
sm: "3",
|
|
16
|
+
md: "3",
|
|
17
|
+
lg: "2",
|
|
18
|
+
xl: "3",
|
|
19
|
+
className: "d-none d-lg-block",
|
|
20
|
+
as: "aside",
|
|
21
|
+
children: /* @__PURE__ */ e(w, {})
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
/* @__PURE__ */ e(
|
|
25
|
+
r.Col,
|
|
26
|
+
{
|
|
27
|
+
sm: "4",
|
|
28
|
+
md: "8",
|
|
29
|
+
lg: o ? "6" : "12",
|
|
30
|
+
xl: o ? "9" : "12",
|
|
31
|
+
className: `${o && m ? "cancel-gap" : ""}`,
|
|
32
|
+
children: /* @__PURE__ */ e(N, { fallback: /* @__PURE__ */ e(x, {}), children: /* @__PURE__ */ e(A, {}) })
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
] })
|
|
36
|
+
] });
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
F as Component,
|
|
40
|
+
B as loader
|
|
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 { c as F, a as M, W as O, b as R } from "./index-
|
|
4
|
+
import { c as F, a as M, W as O, b as R } from "./index-D1A8ZvCs.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-
|
|
9
|
-
import { SortDirection as
|
|
8
|
+
import { D as W } from "./DeleteCollectionModal-DRL-08Rg.js";
|
|
9
|
+
import { SortDirection as C, CollectionSortField as y } from "@edifice.io/collect-client-rest";
|
|
10
10
|
import { create as _ } from "zustand";
|
|
11
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-
|
|
14
|
+
import { D as V } from "./DropdownActionTable-CkM3P5s9.js";
|
|
15
15
|
const X = {
|
|
16
16
|
search: "",
|
|
17
17
|
sortBy: y.DEADLINE,
|
|
18
|
-
sortDirection:
|
|
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
|
|
33
|
-
const h = (
|
|
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((
|
|
38
|
+
return r.pages.find((b) => {
|
|
39
39
|
var p;
|
|
40
|
-
return ((p =
|
|
40
|
+
return ((p = b.meta) == null ? void 0 : p.currentPage) === t;
|
|
41
41
|
}) ?? r.pages[t - 1];
|
|
42
42
|
}, [r, t]);
|
|
43
43
|
return {
|
|
@@ -108,40 +108,54 @@ const X = {
|
|
|
108
108
|
) }) }),
|
|
109
109
|
/* @__PURE__ */ e(m.Td, { className: c, children: /* @__PURE__ */ e("em", { className: "text-gray-700", children: o(t.createdAt) }) }),
|
|
110
110
|
/* @__PURE__ */ e(m.Td, { className: c, children: a(t.deadline, "short") }),
|
|
111
|
-
/* @__PURE__ */ e(
|
|
112
|
-
|
|
111
|
+
/* @__PURE__ */ e(
|
|
112
|
+
m.Td,
|
|
113
113
|
{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
114
|
+
className: c,
|
|
115
|
+
"data-testid": "collect-collection-list-row-badge",
|
|
116
|
+
children: /* @__PURE__ */ u(
|
|
117
|
+
k,
|
|
118
|
+
{
|
|
119
|
+
variant: {
|
|
120
|
+
type: "notification",
|
|
121
|
+
level: g(
|
|
122
|
+
t.contribCount,
|
|
123
|
+
t.submissionCount
|
|
124
|
+
)
|
|
125
|
+
},
|
|
126
|
+
className: "fw-normal",
|
|
127
|
+
children: [
|
|
128
|
+
t.contribCount,
|
|
129
|
+
" / ",
|
|
130
|
+
t.submissionCount
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
)
|
|
127
134
|
}
|
|
128
|
-
)
|
|
129
|
-
/* @__PURE__ */ e(
|
|
130
|
-
|
|
135
|
+
),
|
|
136
|
+
/* @__PURE__ */ e(
|
|
137
|
+
m.Td,
|
|
131
138
|
{
|
|
132
|
-
|
|
139
|
+
className: c,
|
|
133
140
|
"data-testid": "collect-collection-list-row-actions",
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
children: /* @__PURE__ */ e(V, { collectionId: t.id, children: (f) => /* @__PURE__ */ e(
|
|
142
|
+
S,
|
|
143
|
+
{
|
|
144
|
+
...f,
|
|
145
|
+
"data-testid": "collect-collection-list-row-action-button",
|
|
146
|
+
className: "icon-button-hover-no-transition bg-white",
|
|
147
|
+
type: "button",
|
|
148
|
+
"aria-label": q("collection.table.th.action"),
|
|
149
|
+
color: "tertiary",
|
|
150
|
+
variant: "filled",
|
|
151
|
+
icon: /* @__PURE__ */ e(H, {}),
|
|
152
|
+
style: {
|
|
153
|
+
visibility: d(t) ? "visible" : "hidden"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
) })
|
|
143
157
|
}
|
|
144
|
-
)
|
|
158
|
+
)
|
|
145
159
|
]
|
|
146
160
|
},
|
|
147
161
|
`${t == null ? void 0 : t.id}-${l}`
|
|
@@ -209,11 +223,11 @@ const X = {
|
|
|
209
223
|
}
|
|
210
224
|
], i = (l) => l.sortField && l.sortField === a, g = (l) => {
|
|
211
225
|
let c = /* @__PURE__ */ e(U, { width: 16, height: 16 });
|
|
212
|
-
return i(l) && (r ===
|
|
226
|
+
return i(l) && (r === C.ASC ? c = /* @__PURE__ */ e(Y, {}) : c = /* @__PURE__ */ e(Z, {})), c;
|
|
213
227
|
}, t = B(
|
|
214
228
|
(l) => {
|
|
215
|
-
let c =
|
|
216
|
-
a === l && r ===
|
|
229
|
+
let c = C.ASC;
|
|
230
|
+
a === l && r === C.ASC && (c = C.DESC), d(l, c);
|
|
217
231
|
},
|
|
218
232
|
[a, r, d]
|
|
219
233
|
);
|
|
@@ -2,8 +2,8 @@ import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEdificeClient as m, useToast as h, Modal as d, Button as C } from "@edifice.io/react";
|
|
3
3
|
import { IconDelete as f } from "@edifice.io/react/icons";
|
|
4
4
|
import { useTranslation as p } from "react-i18next";
|
|
5
|
-
import { h as M } from "./index-
|
|
6
|
-
import { u as D } from "./DropdownActionTable-
|
|
5
|
+
import { h as M } from "./index-D1A8ZvCs.js";
|
|
6
|
+
import { u as D } from "./DropdownActionTable-CkM3P5s9.js";
|
|
7
7
|
const y = () => {
|
|
8
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,
|
|
@@ -6,7 +6,7 @@ import { IconExternalLink as I, IconEdit as h, IconShare as O, 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 { c as M } from "./index-
|
|
9
|
+
import { c as M } from "./index-D1A8ZvCs.js";
|
|
10
10
|
const T = b((e) => ({
|
|
11
11
|
isDeleteModalOpen: !1,
|
|
12
12
|
deleteCollectionId: null,
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsx as t, jsxs as g
|
|
2
|
-
import { WORKFLOW_RIGHTS as
|
|
3
|
-
import { useEdificeClient as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { useParams as
|
|
7
|
-
import { m as
|
|
8
|
-
import { s as
|
|
9
|
-
const
|
|
1
|
+
import { jsx as t, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { WORKFLOW_RIGHTS as b, MediaType as v } from "@edifice.io/collect-client-rest";
|
|
3
|
+
import { useEdificeClient as x, useBreakpoint as I, useToast as w, useHasWorkflow as E, LoadingScreen as F, Grid as h, Flex as y, 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 k } from "react-router-dom";
|
|
7
|
+
import { m as A, f as Q, P as R, F as W, g as j } from "./index-D1A8ZvCs.js";
|
|
8
|
+
import { s as H } from "./submission.queries-XI_GKzo9.js";
|
|
9
|
+
const K = (s) => async ({ params: i }) => {
|
|
10
10
|
const a = Number(i.collectionId);
|
|
11
|
-
return await s.ensureQueryData(
|
|
12
|
-
|
|
11
|
+
return await s.ensureQueryData(j(a)), await s.prefetchInfiniteQuery(
|
|
12
|
+
H(a)
|
|
13
13
|
), null;
|
|
14
|
-
},
|
|
15
|
-
const { appCode: s } =
|
|
14
|
+
}, J = () => {
|
|
15
|
+
const { appCode: s } = x(), { t: i } = O(s), { lg: a } = I(), d = P(), m = k(), u = w(), f = E(b.COLLECTION_CREATE), p = A(), [e, N] = L(void 0), { data: o, isLoading: l } = Q(
|
|
16
16
|
Number(d.collectionId)
|
|
17
17
|
);
|
|
18
18
|
if (l)
|
|
19
|
-
return /* @__PURE__ */ t(
|
|
20
|
-
if (!f || !o) return /* @__PURE__ */ t(
|
|
21
|
-
const
|
|
19
|
+
return /* @__PURE__ */ t(F, {});
|
|
20
|
+
if (!f || !o) return /* @__PURE__ */ t(R, {});
|
|
21
|
+
const T = async () => {
|
|
22
22
|
const r = Number(d.collectionId);
|
|
23
23
|
if (!r) return;
|
|
24
24
|
const c = {
|
|
@@ -37,7 +37,7 @@ const J = (s) => async ({ params: i }) => {
|
|
|
37
37
|
deadline: c.deadline ?? /* @__PURE__ */ new Date(),
|
|
38
38
|
attachments: c.attachments.map((n) => ({
|
|
39
39
|
name: n.name,
|
|
40
|
-
type:
|
|
40
|
+
type: v.ATTACHMENT,
|
|
41
41
|
uri: n.filename,
|
|
42
42
|
mimeType: n.contentType
|
|
43
43
|
}))
|
|
@@ -53,7 +53,7 @@ const J = (s) => async ({ params: i }) => {
|
|
|
53
53
|
}), console.log(n);
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
return /* @__PURE__ */ g(
|
|
56
|
+
return /* @__PURE__ */ g("div", { className: "w-100", children: [
|
|
57
57
|
/* @__PURE__ */ t(h, { className: "flex-grow-1 gap-64 px-md-8 px-lg-48 position-relative", children: /* @__PURE__ */ t(h.Col, { sm: "4", md: "8", xl: "12", className: `${a && "ms-64"}`, children: /* @__PURE__ */ t(
|
|
58
58
|
y,
|
|
59
59
|
{
|
|
@@ -61,10 +61,10 @@ const J = (s) => async ({ params: i }) => {
|
|
|
61
61
|
gap: "16",
|
|
62
62
|
className: "h-100 py-24 pb-lg-48 pt-lg-32",
|
|
63
63
|
children: /* @__PURE__ */ t(
|
|
64
|
-
|
|
64
|
+
W,
|
|
65
65
|
{
|
|
66
66
|
collection: o,
|
|
67
|
-
updateWizardData:
|
|
67
|
+
updateWizardData: N
|
|
68
68
|
}
|
|
69
69
|
)
|
|
70
70
|
}
|
|
@@ -88,7 +88,7 @@ const J = (s) => async ({ params: i }) => {
|
|
|
88
88
|
color: "primary",
|
|
89
89
|
isLoading: l || p.isPending,
|
|
90
90
|
loadingPosition: "right",
|
|
91
|
-
onClick:
|
|
91
|
+
onClick: T,
|
|
92
92
|
"data-testid": "collect-save-sharings-button",
|
|
93
93
|
children: i("collection.form.edit.save")
|
|
94
94
|
}
|
|
@@ -97,6 +97,6 @@ const J = (s) => async ({ params: i }) => {
|
|
|
97
97
|
] });
|
|
98
98
|
};
|
|
99
99
|
export {
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
J as FormEdit,
|
|
101
|
+
K as loader
|
|
102
102
|
};
|