@panneau/app 4.0.38 → 4.0.40-alpha.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/assets/css/packages.css +1 -2
- package/assets/css/styles.css +1 -1
- package/dist/index.js +2395 -1204
- package/package.json +43 -42
- package/assets/css/packages.css.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
-
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
3
1
|
import { useMemoryRouter, createPathToRegexpParser } from '@folklore/routes';
|
|
4
|
-
import {
|
|
5
|
-
import { useLocation, useSearch, Route,
|
|
2
|
+
import { useState, useEffect, Fragment as Fragment$1, useMemo, useCallback } from 'react';
|
|
3
|
+
import { useLocation, useSearch, Route, Redirect, Switch, Router } from 'wouter';
|
|
6
4
|
import ActionsProvider from '@panneau/actions';
|
|
7
5
|
import { useUser, useLogout, useAuth, AuthProvider } from '@panneau/auth';
|
|
8
6
|
import { useUrlGenerator, usePanneauResources, usePanneau, usePanneauColorScheme, ResourceProvider, useActionsComponentsManager, useFormsComponents, useRoutes, usePagesComponentsManager, PanneauProvider, RoutesProvider, ModalProvider, ComponentsProvider } from '@panneau/core/contexts';
|
|
@@ -15,9 +13,7 @@ import { useResourceValues, IntlProvider } from '@panneau/intl';
|
|
|
15
13
|
import ListsProvider from '@panneau/lists';
|
|
16
14
|
import ModalsProvider from '@panneau/modals';
|
|
17
15
|
import { UppyProvider } from '@panneau/uppy';
|
|
18
|
-
import
|
|
19
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
20
|
-
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
16
|
+
import { c } from 'react/compiler-runtime';
|
|
21
17
|
import isObject from 'lodash/isObject';
|
|
22
18
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
23
19
|
import classNames from 'classnames';
|
|
@@ -41,211 +37,349 @@ import { getComponentFromName } from '@panneau/core/utils';
|
|
|
41
37
|
import Filters from '@panneau/filter-filters';
|
|
42
38
|
|
|
43
39
|
function ResourceFormWrapper(props) {
|
|
44
|
-
|
|
40
|
+
const $ = c(2);
|
|
41
|
+
let t0;
|
|
42
|
+
if ($[0] !== props) {
|
|
43
|
+
t0 = /*#__PURE__*/jsx(ResourceForm, {
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
$[0] = props;
|
|
47
|
+
$[1] = t0;
|
|
48
|
+
} else {
|
|
49
|
+
t0 = $[1];
|
|
50
|
+
}
|
|
51
|
+
return t0;
|
|
45
52
|
}
|
|
46
53
|
|
|
47
|
-
function AccountMenu(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
className
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
function AccountMenu(t0) {
|
|
55
|
+
const $ = c(12);
|
|
56
|
+
const {
|
|
57
|
+
withAccountForm: t1,
|
|
58
|
+
className: t2,
|
|
59
|
+
itemClassName: t3,
|
|
60
|
+
linkClassName: t4
|
|
61
|
+
} = t0;
|
|
62
|
+
const withAccountForm = t1 === undefined ? false : t1;
|
|
63
|
+
const className = t2 === undefined ? null : t2;
|
|
64
|
+
const itemClassName = t3 === undefined ? null : t3;
|
|
65
|
+
const linkClassName = t4 === undefined ? null : t4;
|
|
66
|
+
const route = useUrlGenerator();
|
|
67
|
+
const user = useUser();
|
|
68
|
+
const logout = useLogout();
|
|
69
|
+
let t5;
|
|
70
|
+
if ($[0] !== logout) {
|
|
71
|
+
t5 = e => {
|
|
72
|
+
e.preventDefault();
|
|
73
|
+
logout();
|
|
74
|
+
};
|
|
75
|
+
$[0] = logout;
|
|
76
|
+
$[1] = t5;
|
|
77
|
+
} else {
|
|
78
|
+
t5 = $[1];
|
|
79
|
+
}
|
|
80
|
+
const onClickLogout = t5;
|
|
81
|
+
let t6;
|
|
82
|
+
if ($[2] !== onClickLogout || $[3] !== route || $[4] !== user || $[5] !== withAccountForm) {
|
|
83
|
+
t6 = user !== null ? [{
|
|
84
|
+
id: "account",
|
|
66
85
|
label: /*#__PURE__*/jsx(FormattedMessage, {
|
|
67
|
-
id: "IuqEHB"
|
|
68
|
-
defaultMessage: [{
|
|
69
|
-
"type": 0,
|
|
70
|
-
"value": "Account"
|
|
71
|
-
}]
|
|
86
|
+
id: "IuqEHB"
|
|
72
87
|
}),
|
|
73
|
-
href: route(
|
|
74
|
-
dropdown: [
|
|
88
|
+
href: route("account"),
|
|
89
|
+
dropdown: [...(withAccountForm ? [{
|
|
75
90
|
label: /*#__PURE__*/jsx(FormattedMessage, {
|
|
76
|
-
id: "V7Us0a"
|
|
77
|
-
defaultMessage: [{
|
|
78
|
-
"type": 0,
|
|
79
|
-
"value": "Update account"
|
|
80
|
-
}]
|
|
91
|
+
id: "V7Us0a"
|
|
81
92
|
}),
|
|
82
|
-
href: route(
|
|
83
|
-
}] : []),
|
|
93
|
+
href: route("account")
|
|
94
|
+
}] : []), {
|
|
84
95
|
label: /*#__PURE__*/jsx(FormattedMessage, {
|
|
85
|
-
id: "REIcPg"
|
|
86
|
-
defaultMessage: [{
|
|
87
|
-
"type": 0,
|
|
88
|
-
"value": "Logout"
|
|
89
|
-
}]
|
|
96
|
+
id: "REIcPg"
|
|
90
97
|
}),
|
|
91
|
-
href: route(
|
|
98
|
+
href: route("auth.logout"),
|
|
92
99
|
onClick: onClickLogout
|
|
93
|
-
}]
|
|
100
|
+
}]
|
|
94
101
|
}] : [{
|
|
95
102
|
label: /*#__PURE__*/jsx(FormattedMessage, {
|
|
96
|
-
id: "d0g58T"
|
|
97
|
-
defaultMessage: [{
|
|
98
|
-
"type": 0,
|
|
99
|
-
"value": "Login"
|
|
100
|
-
}]
|
|
103
|
+
id: "d0g58T"
|
|
101
104
|
}),
|
|
102
|
-
href: route(
|
|
105
|
+
href: route("auth.login")
|
|
103
106
|
}];
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
107
|
+
$[2] = onClickLogout;
|
|
108
|
+
$[3] = route;
|
|
109
|
+
$[4] = user;
|
|
110
|
+
$[5] = withAccountForm;
|
|
111
|
+
$[6] = t6;
|
|
112
|
+
} else {
|
|
113
|
+
t6 = $[6];
|
|
114
|
+
}
|
|
115
|
+
const items = t6;
|
|
116
|
+
let t7;
|
|
117
|
+
if ($[7] !== className || $[8] !== itemClassName || $[9] !== items || $[10] !== linkClassName) {
|
|
118
|
+
t7 = items !== null ? /*#__PURE__*/jsx(Menu, {
|
|
119
|
+
className: className,
|
|
120
|
+
itemClassName: itemClassName,
|
|
121
|
+
linkClassName: linkClassName,
|
|
122
|
+
items: items,
|
|
123
|
+
dropdownAlign: "end"
|
|
124
|
+
}) : null;
|
|
125
|
+
$[7] = className;
|
|
126
|
+
$[8] = itemClassName;
|
|
127
|
+
$[9] = items;
|
|
128
|
+
$[10] = linkClassName;
|
|
129
|
+
$[11] = t7;
|
|
130
|
+
} else {
|
|
131
|
+
t7 = $[11];
|
|
132
|
+
}
|
|
133
|
+
return t7;
|
|
112
134
|
}
|
|
113
135
|
|
|
114
|
-
function ResourcesMenu(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
itemClassName
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
active: pathname.substr(0, url.length) === url
|
|
136
|
+
function ResourcesMenu(t0) {
|
|
137
|
+
const $ = c(12);
|
|
138
|
+
const {
|
|
139
|
+
className: t1,
|
|
140
|
+
itemClassName: t2,
|
|
141
|
+
linkClassName: t3
|
|
142
|
+
} = t0;
|
|
143
|
+
const className = t1 === undefined ? null : t1;
|
|
144
|
+
const itemClassName = t2 === undefined ? null : t2;
|
|
145
|
+
const linkClassName = t3 === undefined ? null : t3;
|
|
146
|
+
const [pathname] = useLocation();
|
|
147
|
+
const resources = usePanneauResources();
|
|
148
|
+
const resourceRoute = useResourceUrlGenerator();
|
|
149
|
+
let t4;
|
|
150
|
+
if ($[0] !== pathname || $[1] !== resourceRoute || $[2] !== resources) {
|
|
151
|
+
let t5;
|
|
152
|
+
if ($[4] !== pathname || $[5] !== resourceRoute) {
|
|
153
|
+
t5 = it => {
|
|
154
|
+
const url = resourceRoute(it, "index");
|
|
155
|
+
return {
|
|
156
|
+
id: it.id,
|
|
157
|
+
label: it.name,
|
|
158
|
+
href: url,
|
|
159
|
+
active: pathname.substr(0, url.length) === url
|
|
160
|
+
};
|
|
140
161
|
};
|
|
162
|
+
$[4] = pathname;
|
|
163
|
+
$[5] = resourceRoute;
|
|
164
|
+
$[6] = t5;
|
|
165
|
+
} else {
|
|
166
|
+
t5 = $[6];
|
|
167
|
+
}
|
|
168
|
+
t4 = resources.filter(_temp$5).map(t5);
|
|
169
|
+
$[0] = pathname;
|
|
170
|
+
$[1] = resourceRoute;
|
|
171
|
+
$[2] = resources;
|
|
172
|
+
$[3] = t4;
|
|
173
|
+
} else {
|
|
174
|
+
t4 = $[3];
|
|
175
|
+
}
|
|
176
|
+
const items = t4;
|
|
177
|
+
let t5;
|
|
178
|
+
if ($[7] !== className || $[8] !== itemClassName || $[9] !== items || $[10] !== linkClassName) {
|
|
179
|
+
t5 = /*#__PURE__*/jsx(Menu, {
|
|
180
|
+
items: items,
|
|
181
|
+
className: className,
|
|
182
|
+
itemClassName: itemClassName,
|
|
183
|
+
linkClassName: linkClassName
|
|
141
184
|
});
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
185
|
+
$[7] = className;
|
|
186
|
+
$[8] = itemClassName;
|
|
187
|
+
$[9] = items;
|
|
188
|
+
$[10] = linkClassName;
|
|
189
|
+
$[11] = t5;
|
|
190
|
+
} else {
|
|
191
|
+
t5 = $[11];
|
|
192
|
+
}
|
|
193
|
+
return t5;
|
|
194
|
+
}
|
|
195
|
+
function _temp$5(t0) {
|
|
196
|
+
const {
|
|
197
|
+
settings: t1
|
|
198
|
+
} = t0;
|
|
199
|
+
const {
|
|
200
|
+
hideInNavbar: t2
|
|
201
|
+
} = t1 === undefined ? {} : t1;
|
|
202
|
+
const hideInNavbar = t2 === undefined ? false : t2;
|
|
203
|
+
return !hideInNavbar;
|
|
149
204
|
}
|
|
150
205
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
+
function MainNavbar(t0) {
|
|
207
|
+
const $ = c(31);
|
|
208
|
+
let className;
|
|
209
|
+
let props;
|
|
210
|
+
let t1;
|
|
211
|
+
let t2;
|
|
212
|
+
let t3;
|
|
213
|
+
let t4;
|
|
214
|
+
if ($[0] !== t0) {
|
|
215
|
+
({
|
|
216
|
+
loading: t1,
|
|
217
|
+
theme: t2,
|
|
218
|
+
vertical: t3,
|
|
219
|
+
position: t4,
|
|
220
|
+
className,
|
|
221
|
+
...props
|
|
222
|
+
} = t0);
|
|
223
|
+
$[0] = t0;
|
|
224
|
+
$[1] = className;
|
|
225
|
+
$[2] = props;
|
|
226
|
+
$[3] = t1;
|
|
227
|
+
$[4] = t2;
|
|
228
|
+
$[5] = t3;
|
|
229
|
+
$[6] = t4;
|
|
230
|
+
} else {
|
|
231
|
+
className = $[1];
|
|
232
|
+
props = $[2];
|
|
233
|
+
t1 = $[3];
|
|
234
|
+
t2 = $[4];
|
|
235
|
+
t3 = $[5];
|
|
236
|
+
t4 = $[6];
|
|
237
|
+
}
|
|
238
|
+
const loading = t1 === undefined ? false : t1;
|
|
239
|
+
const vertical = t3 === undefined ? false : t3;
|
|
240
|
+
const {
|
|
241
|
+
name,
|
|
242
|
+
menus: t5
|
|
243
|
+
} = usePanneau();
|
|
244
|
+
const menus = t5 === undefined ? null : t5;
|
|
245
|
+
let t6;
|
|
246
|
+
if ($[7] !== menus) {
|
|
247
|
+
t6 = menus || {};
|
|
248
|
+
$[7] = menus;
|
|
249
|
+
$[8] = t6;
|
|
250
|
+
} else {
|
|
251
|
+
t6 = $[8];
|
|
252
|
+
}
|
|
253
|
+
const {
|
|
254
|
+
main: t7,
|
|
255
|
+
guest: t8
|
|
256
|
+
} = t6;
|
|
257
|
+
const main = t7 === undefined ? null : t7;
|
|
258
|
+
const guest = t8 === undefined ? null : t8;
|
|
259
|
+
const {
|
|
260
|
+
background
|
|
261
|
+
} = usePanneauColorScheme();
|
|
262
|
+
const route = useUrlGenerator();
|
|
263
|
+
const user = useUser();
|
|
264
|
+
const navClassNames = vertical ? "navbar-nav d-flex flex-column" : "navbar-nav";
|
|
265
|
+
let t9;
|
|
266
|
+
if ($[9] !== guest || $[10] !== main || $[11] !== navClassNames || $[12] !== user) {
|
|
267
|
+
const menuItems = (user !== null ? main : guest) || [];
|
|
268
|
+
const hasResources = menuItems.indexOf("resources") !== -1;
|
|
269
|
+
const hasAccount = menuItems.indexOf("account") !== -1;
|
|
270
|
+
let t10;
|
|
271
|
+
if ($[14] !== navClassNames) {
|
|
272
|
+
t10 = (currentItems, item, index) => {
|
|
273
|
+
if (item === "resources") {
|
|
274
|
+
return [...currentItems, /*#__PURE__*/jsx(ResourcesMenu, {
|
|
275
|
+
className: navClassNames,
|
|
276
|
+
itemClassName: "nav-item",
|
|
277
|
+
linkClassName: "nav-link"
|
|
278
|
+
}, `menu-item-resource-${index + 1}`)];
|
|
279
|
+
}
|
|
280
|
+
if (item === "account") {
|
|
281
|
+
return [...currentItems, /*#__PURE__*/jsx(AccountMenu, {
|
|
282
|
+
className: navClassNames,
|
|
283
|
+
itemClassName: "nav-item",
|
|
284
|
+
linkClassName: "nav-link"
|
|
285
|
+
}, `menu-item-account-${index + 1}`)];
|
|
286
|
+
}
|
|
287
|
+
if (item === "separator") {
|
|
288
|
+
return [...currentItems, /*#__PURE__*/jsx("span", {
|
|
289
|
+
className: "ms-auto"
|
|
290
|
+
}, `menu-item-spacer-${index + 1}`)];
|
|
291
|
+
}
|
|
292
|
+
const lastItem = currentItems.length > 0 ? currentItems[currentItems.length - 1] : null;
|
|
293
|
+
return isArray(lastItem) ? [...currentItems.slice(0, currentItems.length - 1), [...lastItem, item]] : [...currentItems, [item]];
|
|
294
|
+
};
|
|
295
|
+
$[14] = navClassNames;
|
|
296
|
+
$[15] = t10;
|
|
297
|
+
} else {
|
|
298
|
+
t10 = $[15];
|
|
299
|
+
}
|
|
300
|
+
let t11;
|
|
301
|
+
if ($[16] !== navClassNames) {
|
|
302
|
+
t11 = (it_0, index_0) => isArray(it_0) ? /*#__PURE__*/jsx(Menu, {
|
|
303
|
+
items: it_0,
|
|
206
304
|
className: navClassNames,
|
|
207
305
|
itemClassName: "nav-item",
|
|
208
306
|
linkClassName: "nav-link"
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
307
|
+
}, `submenu-item-${index_0 + 1}`) : it_0;
|
|
308
|
+
$[16] = navClassNames;
|
|
309
|
+
$[17] = t11;
|
|
310
|
+
} else {
|
|
311
|
+
t11 = $[17];
|
|
312
|
+
}
|
|
313
|
+
t9 = [!hasResources && user !== null ? "resources" : null, ...menuItems, !hasAccount && menuItems.indexOf("separator") === -1 ? "separator" : null, !hasAccount ? "account" : null].filter(_temp$4).reduce(t10, []).map(t11);
|
|
314
|
+
$[9] = guest;
|
|
315
|
+
$[10] = main;
|
|
316
|
+
$[11] = navClassNames;
|
|
317
|
+
$[12] = user;
|
|
318
|
+
$[13] = t9;
|
|
319
|
+
} else {
|
|
320
|
+
t9 = $[13];
|
|
321
|
+
}
|
|
322
|
+
const items = t9;
|
|
323
|
+
let t10;
|
|
324
|
+
if ($[18] !== loading || $[19] !== name || $[20] !== route || $[21] !== vertical) {
|
|
325
|
+
t10 = name !== null ? /*#__PURE__*/jsx(Link, {
|
|
326
|
+
href: route("home"),
|
|
220
327
|
className: "navbar-brand",
|
|
221
328
|
children: /*#__PURE__*/jsx("span", {
|
|
222
329
|
className: classNames([{
|
|
223
|
-
|
|
224
|
-
|
|
330
|
+
"text-opacity-75": loading,
|
|
331
|
+
"ms-2": vertical
|
|
225
332
|
}]),
|
|
226
333
|
children: name
|
|
227
334
|
})
|
|
228
|
-
}) : null
|
|
229
|
-
|
|
335
|
+
}) : null;
|
|
336
|
+
$[18] = loading;
|
|
337
|
+
$[19] = name;
|
|
338
|
+
$[20] = route;
|
|
339
|
+
$[21] = vertical;
|
|
340
|
+
$[22] = t10;
|
|
341
|
+
} else {
|
|
342
|
+
t10 = $[22];
|
|
343
|
+
}
|
|
344
|
+
let t11;
|
|
345
|
+
if ($[23] !== background || $[24] !== className || $[25] !== items || $[26] !== loading || $[27] !== props || $[28] !== t10 || $[29] !== vertical) {
|
|
346
|
+
t11 = /*#__PURE__*/jsxs(Navbar, {
|
|
347
|
+
theme: background,
|
|
348
|
+
loading: loading,
|
|
349
|
+
vertical: vertical,
|
|
350
|
+
className: className,
|
|
351
|
+
...props,
|
|
352
|
+
children: [t10, items]
|
|
353
|
+
});
|
|
354
|
+
$[23] = background;
|
|
355
|
+
$[24] = className;
|
|
356
|
+
$[25] = items;
|
|
357
|
+
$[26] = loading;
|
|
358
|
+
$[27] = props;
|
|
359
|
+
$[28] = t10;
|
|
360
|
+
$[29] = vertical;
|
|
361
|
+
$[30] = t11;
|
|
362
|
+
} else {
|
|
363
|
+
t11 = $[30];
|
|
364
|
+
}
|
|
365
|
+
return t11;
|
|
366
|
+
}
|
|
367
|
+
function _temp$4(it) {
|
|
368
|
+
return it !== null;
|
|
230
369
|
}
|
|
231
370
|
|
|
232
|
-
function MainLayout(
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
_usePanneauColorSchem4 = _usePanneauColorSchem.background,
|
|
245
|
-
background = _usePanneauColorSchem4 === void 0 ? null : _usePanneauColorSchem4,
|
|
246
|
-
_usePanneauColorSchem5 = _usePanneauColorSchem.text,
|
|
247
|
-
text = _usePanneauColorSchem5 === void 0 ? null : _usePanneauColorSchem5;
|
|
248
|
-
var vertical = sidebarPosition === 'left' || sidebarPosition === 'right';
|
|
371
|
+
function MainLayout({
|
|
372
|
+
fullscreen = false,
|
|
373
|
+
loading = false,
|
|
374
|
+
children = null
|
|
375
|
+
}) {
|
|
376
|
+
const {
|
|
377
|
+
theme = null,
|
|
378
|
+
sidebarPosition = null,
|
|
379
|
+
background = null,
|
|
380
|
+
text = null
|
|
381
|
+
} = usePanneauColorScheme();
|
|
382
|
+
const vertical = sidebarPosition === 'left' || sidebarPosition === 'right';
|
|
249
383
|
return /*#__PURE__*/jsxs("div", {
|
|
250
384
|
className: classNames(['d-flex', 'min-vh-100', {
|
|
251
385
|
'flex-column': !vertical
|
|
@@ -269,9 +403,11 @@ function MainLayout(_ref) {
|
|
|
269
403
|
loading: loading,
|
|
270
404
|
vertical: vertical
|
|
271
405
|
}), /*#__PURE__*/jsx("div", {
|
|
272
|
-
className: classNames(['flex-grow-1',
|
|
273
|
-
'd-flex flex-column': fullscreen
|
|
274
|
-
|
|
406
|
+
className: classNames(['flex-grow-1', {
|
|
407
|
+
'd-flex flex-column': fullscreen,
|
|
408
|
+
[`bg-${background}`]: background !== null,
|
|
409
|
+
[`text-${text}`]: text !== null
|
|
410
|
+
}]),
|
|
275
411
|
children: children
|
|
276
412
|
}), /*#__PURE__*/jsx(Modals, {
|
|
277
413
|
theme: theme
|
|
@@ -279,23 +415,20 @@ function MainLayout(_ref) {
|
|
|
279
415
|
});
|
|
280
416
|
}
|
|
281
417
|
|
|
282
|
-
function PageHeader(
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
_ref$className = _ref.className,
|
|
290
|
-
className = _ref$className === void 0 ? null : _ref$className,
|
|
291
|
-
_ref$children = _ref.children,
|
|
292
|
-
children = _ref$children === void 0 ? null : _ref$children;
|
|
418
|
+
function PageHeader({
|
|
419
|
+
title = null,
|
|
420
|
+
actions = null,
|
|
421
|
+
small = false,
|
|
422
|
+
className = null,
|
|
423
|
+
children = null
|
|
424
|
+
}) {
|
|
293
425
|
// TODO: fix page header components
|
|
294
426
|
// const { components } = usePanneau();
|
|
295
|
-
|
|
296
|
-
text
|
|
297
|
-
background
|
|
298
|
-
|
|
427
|
+
const {
|
|
428
|
+
text,
|
|
429
|
+
background
|
|
430
|
+
} = usePanneauColorScheme();
|
|
431
|
+
const inner = /*#__PURE__*/jsxs("div", {
|
|
299
432
|
className: "d-flex align-items-center flex-wrap",
|
|
300
433
|
children: [title !== null ? /*#__PURE__*/jsx("h1", {
|
|
301
434
|
className: classNames(['mb-0', 'h2']),
|
|
@@ -308,7 +441,12 @@ function PageHeader(_ref) {
|
|
|
308
441
|
}) : null]
|
|
309
442
|
});
|
|
310
443
|
return /*#__PURE__*/jsxs("div", {
|
|
311
|
-
className: classNames(['py-4',
|
|
444
|
+
className: classNames(['py-4', {
|
|
445
|
+
[`bg-${background}`]: background !== null,
|
|
446
|
+
[`text-${text}`]: text !== null,
|
|
447
|
+
[`border-bottom`]: background || text !== null,
|
|
448
|
+
[className]: className !== null
|
|
449
|
+
}]),
|
|
312
450
|
children: [/*#__PURE__*/jsx("div", {
|
|
313
451
|
className: "container-sm",
|
|
314
452
|
children: small ? /*#__PURE__*/jsx("div", {
|
|
@@ -322,634 +460,1285 @@ function PageHeader(_ref) {
|
|
|
322
460
|
});
|
|
323
461
|
}
|
|
324
462
|
|
|
325
|
-
function ResourceCreatePage(
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
463
|
+
function ResourceCreatePage(t0) {
|
|
464
|
+
const $ = c(20);
|
|
465
|
+
const {
|
|
466
|
+
resource
|
|
467
|
+
} = t0;
|
|
468
|
+
const [, navigate] = useLocation();
|
|
469
|
+
const search = useSearch();
|
|
470
|
+
const resourceRoute = useResourceUrlGenerator(resource);
|
|
471
|
+
let t1;
|
|
472
|
+
if ($[0] !== search) {
|
|
473
|
+
t1 = queryString.parse(search, {
|
|
474
|
+
arrayFormat: "bracket"
|
|
475
|
+
});
|
|
476
|
+
$[0] = search;
|
|
477
|
+
$[1] = t1;
|
|
478
|
+
} else {
|
|
479
|
+
t1 = $[1];
|
|
480
|
+
}
|
|
481
|
+
const {
|
|
482
|
+
type: t2
|
|
483
|
+
} = t1;
|
|
484
|
+
const type = t2 === undefined ? null : t2;
|
|
485
|
+
const resourceValues = useResourceValues(resource);
|
|
486
|
+
const typeName = useResourceTypeName(resource, type);
|
|
487
|
+
let t3;
|
|
488
|
+
if ($[2] !== navigate || $[3] !== resourceRoute) {
|
|
489
|
+
t3 = () => {
|
|
490
|
+
navigate(`${resourceRoute("index")}?created=true`);
|
|
491
|
+
};
|
|
492
|
+
$[2] = navigate;
|
|
493
|
+
$[3] = resourceRoute;
|
|
494
|
+
$[4] = t3;
|
|
495
|
+
} else {
|
|
496
|
+
t3 = $[4];
|
|
497
|
+
}
|
|
498
|
+
const onComplete = t3;
|
|
499
|
+
let t4;
|
|
500
|
+
if ($[5] !== resourceValues) {
|
|
501
|
+
t4 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
502
|
+
id: "6viUpq",
|
|
503
|
+
values: resourceValues
|
|
504
|
+
});
|
|
505
|
+
$[5] = resourceValues;
|
|
506
|
+
$[6] = t4;
|
|
507
|
+
} else {
|
|
508
|
+
t4 = $[6];
|
|
509
|
+
}
|
|
510
|
+
let t5;
|
|
511
|
+
if ($[7] !== typeName) {
|
|
512
|
+
t5 = typeName !== null ? /*#__PURE__*/jsxs("span", {
|
|
513
|
+
className: "text-body-secondary",
|
|
514
|
+
children: [" (", typeName, ")"]
|
|
515
|
+
}) : null;
|
|
516
|
+
$[7] = typeName;
|
|
517
|
+
$[8] = t5;
|
|
518
|
+
} else {
|
|
519
|
+
t5 = $[8];
|
|
520
|
+
}
|
|
521
|
+
let t6;
|
|
522
|
+
if ($[9] !== t4 || $[10] !== t5) {
|
|
523
|
+
t6 = /*#__PURE__*/jsx(PageHeader, {
|
|
524
|
+
title: /*#__PURE__*/jsxs(Fragment, {
|
|
525
|
+
children: [t4, t5]
|
|
526
|
+
}),
|
|
527
|
+
small: true
|
|
528
|
+
});
|
|
529
|
+
$[9] = t4;
|
|
530
|
+
$[10] = t5;
|
|
531
|
+
$[11] = t6;
|
|
532
|
+
} else {
|
|
533
|
+
t6 = $[11];
|
|
534
|
+
}
|
|
535
|
+
let t7;
|
|
536
|
+
if ($[12] !== onComplete || $[13] !== resource || $[14] !== t6 || $[15] !== type) {
|
|
537
|
+
t7 = /*#__PURE__*/jsx(MainLayout, {
|
|
347
538
|
children: /*#__PURE__*/jsx(ResourceFormWrapper, {
|
|
348
539
|
resource: resource,
|
|
349
540
|
type: type,
|
|
350
|
-
|
|
541
|
+
onComplete: onComplete,
|
|
351
542
|
withContainer: true,
|
|
352
|
-
header:
|
|
353
|
-
title: /*#__PURE__*/jsxs(Fragment, {
|
|
354
|
-
children: [/*#__PURE__*/jsx(FormattedMessage, {
|
|
355
|
-
values: resourceValues,
|
|
356
|
-
id: "6viUpq",
|
|
357
|
-
defaultMessage: [{
|
|
358
|
-
"type": 0,
|
|
359
|
-
"value": "Create "
|
|
360
|
-
}, {
|
|
361
|
-
"type": 1,
|
|
362
|
-
"value": "a_singular"
|
|
363
|
-
}]
|
|
364
|
-
}), typeName !== null ? /*#__PURE__*/jsxs("span", {
|
|
365
|
-
className: "text-body-secondary",
|
|
366
|
-
children: [" (", typeName, ")"]
|
|
367
|
-
}) : null]
|
|
368
|
-
}),
|
|
369
|
-
small: true
|
|
370
|
-
})
|
|
543
|
+
header: t6
|
|
371
544
|
})
|
|
372
|
-
})
|
|
373
|
-
|
|
545
|
+
});
|
|
546
|
+
$[12] = onComplete;
|
|
547
|
+
$[13] = resource;
|
|
548
|
+
$[14] = t6;
|
|
549
|
+
$[15] = type;
|
|
550
|
+
$[16] = t7;
|
|
551
|
+
} else {
|
|
552
|
+
t7 = $[16];
|
|
553
|
+
}
|
|
554
|
+
let t8;
|
|
555
|
+
if ($[17] !== resource || $[18] !== t7) {
|
|
556
|
+
t8 = /*#__PURE__*/jsx(ResourceProvider, {
|
|
557
|
+
resource: resource,
|
|
558
|
+
children: t7
|
|
559
|
+
});
|
|
560
|
+
$[17] = resource;
|
|
561
|
+
$[18] = t7;
|
|
562
|
+
$[19] = t8;
|
|
563
|
+
} else {
|
|
564
|
+
t8 = $[19];
|
|
565
|
+
}
|
|
566
|
+
return t8;
|
|
374
567
|
}
|
|
375
568
|
|
|
376
|
-
function ResourceDeletePage(
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
569
|
+
function ResourceDeletePage(t0) {
|
|
570
|
+
const $ = c(22);
|
|
571
|
+
const {
|
|
572
|
+
itemId,
|
|
573
|
+
resource
|
|
574
|
+
} = t0;
|
|
575
|
+
const [, navigate] = useLocation();
|
|
576
|
+
const resourceRoute = useResourceUrlGenerator(resource);
|
|
577
|
+
const {
|
|
578
|
+
item,
|
|
579
|
+
isLoading,
|
|
580
|
+
error
|
|
581
|
+
} = useResourceItem(resource, itemId);
|
|
582
|
+
let t1;
|
|
583
|
+
if ($[0] !== item) {
|
|
584
|
+
t1 = item || {};
|
|
585
|
+
$[0] = item;
|
|
586
|
+
$[1] = t1;
|
|
587
|
+
} else {
|
|
588
|
+
t1 = $[1];
|
|
589
|
+
}
|
|
590
|
+
const {
|
|
591
|
+
type: t2
|
|
592
|
+
} = t1;
|
|
593
|
+
const type = t2 === undefined ? null : t2;
|
|
594
|
+
const resourceValues = useResourceValues(resource);
|
|
595
|
+
const typeName = useResourceTypeName(resource, type);
|
|
596
|
+
let t3;
|
|
597
|
+
if ($[2] !== navigate || $[3] !== resourceRoute) {
|
|
598
|
+
t3 = () => navigate(`${resourceRoute("index")}?deleted=true`);
|
|
599
|
+
$[2] = navigate;
|
|
600
|
+
$[3] = resourceRoute;
|
|
601
|
+
$[4] = t3;
|
|
602
|
+
} else {
|
|
603
|
+
t3 = $[4];
|
|
604
|
+
}
|
|
605
|
+
const onComplete = t3;
|
|
606
|
+
let t4;
|
|
607
|
+
if ($[5] !== item || $[6] !== onComplete || $[7] !== resource || $[8] !== resourceValues || $[9] !== typeName) {
|
|
608
|
+
t4 = item !== null ? /*#__PURE__*/jsx(ResourceFormWrapper, {
|
|
609
|
+
resource: resource,
|
|
610
|
+
item: item,
|
|
611
|
+
onComplete: onComplete,
|
|
612
|
+
isDelete: true,
|
|
613
|
+
withContainer: true,
|
|
614
|
+
header: /*#__PURE__*/jsx(PageHeader, {
|
|
615
|
+
title: /*#__PURE__*/jsxs(Fragment, {
|
|
616
|
+
children: [/*#__PURE__*/jsx(FormattedMessage, {
|
|
617
|
+
id: "zN5N/Q",
|
|
618
|
+
values: resourceValues
|
|
619
|
+
}), typeName !== null ? /*#__PURE__*/jsxs("span", {
|
|
620
|
+
className: "text-body-secondary",
|
|
621
|
+
children: [" ", "(", typeName, ")"]
|
|
622
|
+
}) : null]
|
|
623
|
+
}),
|
|
624
|
+
small: true
|
|
625
|
+
})
|
|
626
|
+
}) : null;
|
|
627
|
+
$[5] = item;
|
|
628
|
+
$[6] = onComplete;
|
|
629
|
+
$[7] = resource;
|
|
630
|
+
$[8] = resourceValues;
|
|
631
|
+
$[9] = typeName;
|
|
632
|
+
$[10] = t4;
|
|
633
|
+
} else {
|
|
634
|
+
t4 = $[10];
|
|
635
|
+
}
|
|
636
|
+
let t5;
|
|
637
|
+
if ($[11] !== error || $[12] !== isLoading || $[13] !== item) {
|
|
638
|
+
t5 = item === null && isLoading && !error ? /*#__PURE__*/jsx(Loading, {
|
|
639
|
+
className: "mw-25 my-4 m-auto",
|
|
640
|
+
withDelay: true,
|
|
641
|
+
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
642
|
+
id: "TV3jir"
|
|
643
|
+
})
|
|
644
|
+
}) : null;
|
|
645
|
+
$[11] = error;
|
|
646
|
+
$[12] = isLoading;
|
|
647
|
+
$[13] = item;
|
|
648
|
+
$[14] = t5;
|
|
649
|
+
} else {
|
|
650
|
+
t5 = $[14];
|
|
651
|
+
}
|
|
652
|
+
let t6;
|
|
653
|
+
if ($[15] !== isLoading || $[16] !== t4 || $[17] !== t5) {
|
|
654
|
+
t6 = /*#__PURE__*/jsxs(MainLayout, {
|
|
655
|
+
loading: isLoading,
|
|
656
|
+
children: [t4, t5]
|
|
657
|
+
});
|
|
658
|
+
$[15] = isLoading;
|
|
659
|
+
$[16] = t4;
|
|
660
|
+
$[17] = t5;
|
|
661
|
+
$[18] = t6;
|
|
662
|
+
} else {
|
|
663
|
+
t6 = $[18];
|
|
664
|
+
}
|
|
665
|
+
let t7;
|
|
666
|
+
if ($[19] !== resource || $[20] !== t6) {
|
|
667
|
+
t7 = /*#__PURE__*/jsx(ResourceProvider, {
|
|
668
|
+
resource: resource,
|
|
669
|
+
children: t6
|
|
670
|
+
});
|
|
671
|
+
$[19] = resource;
|
|
672
|
+
$[20] = t6;
|
|
673
|
+
$[21] = t7;
|
|
674
|
+
} else {
|
|
675
|
+
t7 = $[21];
|
|
676
|
+
}
|
|
677
|
+
return t7;
|
|
437
678
|
}
|
|
438
679
|
|
|
439
|
-
function ResourceEditPage(
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
680
|
+
function ResourceEditPage(t0) {
|
|
681
|
+
const $ = c(23);
|
|
682
|
+
const {
|
|
683
|
+
itemId,
|
|
684
|
+
resource
|
|
685
|
+
} = t0;
|
|
686
|
+
const {
|
|
687
|
+
item,
|
|
688
|
+
isLoading,
|
|
689
|
+
error
|
|
690
|
+
} = useResourceItem(resource, itemId);
|
|
691
|
+
let t1;
|
|
692
|
+
if ($[0] !== item) {
|
|
693
|
+
t1 = item || {};
|
|
694
|
+
$[0] = item;
|
|
695
|
+
$[1] = t1;
|
|
696
|
+
} else {
|
|
697
|
+
t1 = $[1];
|
|
698
|
+
}
|
|
699
|
+
const {
|
|
700
|
+
type: t2
|
|
701
|
+
} = t1;
|
|
702
|
+
const type = t2 === undefined ? null : t2;
|
|
703
|
+
const [editItem, setEditItem] = useState(item);
|
|
704
|
+
const typeName = useResourceTypeName(resource, type);
|
|
705
|
+
let t3;
|
|
706
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
707
|
+
t3 = newItem => setEditItem(newItem);
|
|
708
|
+
$[2] = t3;
|
|
709
|
+
} else {
|
|
710
|
+
t3 = $[2];
|
|
711
|
+
}
|
|
712
|
+
const onComplete = t3;
|
|
713
|
+
let t4;
|
|
714
|
+
let t5;
|
|
715
|
+
if ($[3] !== item) {
|
|
716
|
+
t4 = () => {
|
|
717
|
+
setEditItem(item);
|
|
718
|
+
};
|
|
719
|
+
t5 = [item, setEditItem];
|
|
720
|
+
$[3] = item;
|
|
721
|
+
$[4] = t4;
|
|
722
|
+
$[5] = t5;
|
|
723
|
+
} else {
|
|
724
|
+
t4 = $[4];
|
|
725
|
+
t5 = $[5];
|
|
726
|
+
}
|
|
727
|
+
useEffect(t4, t5);
|
|
728
|
+
const resourceValues = useResourceValues(resource);
|
|
729
|
+
let t6;
|
|
730
|
+
if ($[6] !== editItem || $[7] !== resource || $[8] !== resourceValues || $[9] !== type || $[10] !== typeName) {
|
|
731
|
+
t6 = editItem !== null ? /*#__PURE__*/jsx(ResourceFormWrapper, {
|
|
732
|
+
resource: resource,
|
|
733
|
+
item: editItem,
|
|
734
|
+
type: type,
|
|
735
|
+
onComplete: onComplete,
|
|
736
|
+
withContainer: true,
|
|
737
|
+
header: /*#__PURE__*/jsx(PageHeader, {
|
|
738
|
+
title: /*#__PURE__*/jsxs(Fragment, {
|
|
739
|
+
children: [/*#__PURE__*/jsx(FormattedMessage, {
|
|
740
|
+
id: "mCfzkJ",
|
|
741
|
+
values: resourceValues
|
|
742
|
+
}), typeName !== null ? /*#__PURE__*/jsxs("span", {
|
|
743
|
+
className: "text-body-secondary",
|
|
744
|
+
children: [" ", "(", typeName, ")"]
|
|
745
|
+
}) : null]
|
|
746
|
+
}),
|
|
747
|
+
small: true
|
|
748
|
+
})
|
|
749
|
+
}) : null;
|
|
750
|
+
$[6] = editItem;
|
|
751
|
+
$[7] = resource;
|
|
752
|
+
$[8] = resourceValues;
|
|
753
|
+
$[9] = type;
|
|
754
|
+
$[10] = typeName;
|
|
755
|
+
$[11] = t6;
|
|
756
|
+
} else {
|
|
757
|
+
t6 = $[11];
|
|
758
|
+
}
|
|
759
|
+
let t7;
|
|
760
|
+
if ($[12] !== editItem || $[13] !== error || $[14] !== isLoading) {
|
|
761
|
+
t7 = editItem === null && isLoading && !error ? /*#__PURE__*/jsx(Loading, {
|
|
762
|
+
className: "mw-25 my-4 m-auto",
|
|
763
|
+
withDelay: true,
|
|
764
|
+
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
765
|
+
id: "TV3jir"
|
|
766
|
+
})
|
|
767
|
+
}) : null;
|
|
768
|
+
$[12] = editItem;
|
|
769
|
+
$[13] = error;
|
|
770
|
+
$[14] = isLoading;
|
|
771
|
+
$[15] = t7;
|
|
772
|
+
} else {
|
|
773
|
+
t7 = $[15];
|
|
774
|
+
}
|
|
775
|
+
let t8;
|
|
776
|
+
if ($[16] !== isLoading || $[17] !== t6 || $[18] !== t7) {
|
|
777
|
+
t8 = /*#__PURE__*/jsxs(MainLayout, {
|
|
778
|
+
loading: isLoading,
|
|
779
|
+
children: [t6, t7]
|
|
780
|
+
});
|
|
781
|
+
$[16] = isLoading;
|
|
782
|
+
$[17] = t6;
|
|
783
|
+
$[18] = t7;
|
|
784
|
+
$[19] = t8;
|
|
785
|
+
} else {
|
|
786
|
+
t8 = $[19];
|
|
787
|
+
}
|
|
788
|
+
let t9;
|
|
789
|
+
if ($[20] !== resource || $[21] !== t8) {
|
|
790
|
+
t9 = /*#__PURE__*/jsx(ResourceProvider, {
|
|
791
|
+
resource: resource,
|
|
792
|
+
children: t8
|
|
793
|
+
});
|
|
794
|
+
$[20] = resource;
|
|
795
|
+
$[21] = t8;
|
|
796
|
+
$[22] = t9;
|
|
797
|
+
} else {
|
|
798
|
+
t9 = $[22];
|
|
799
|
+
}
|
|
800
|
+
return t9;
|
|
503
801
|
}
|
|
504
802
|
|
|
505
|
-
function ResourceCreateButton(
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
className
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
803
|
+
function ResourceCreateButton(t0) {
|
|
804
|
+
const $ = c(24);
|
|
805
|
+
const {
|
|
806
|
+
resource,
|
|
807
|
+
size: t1,
|
|
808
|
+
className: t2
|
|
809
|
+
} = t0;
|
|
810
|
+
const size = t1 === undefined ? "lg" : t1;
|
|
811
|
+
const className = t2 === undefined ? null : t2;
|
|
812
|
+
const {
|
|
813
|
+
types: t3
|
|
814
|
+
} = resource;
|
|
815
|
+
const types = t3 === undefined ? null : t3;
|
|
816
|
+
const resourceRoute = useResourceUrlGenerator(resource);
|
|
817
|
+
const resourceValues = useResourceValues(resource);
|
|
818
|
+
const [dropdownOpened, setDropdownOpened] = useState(false);
|
|
819
|
+
let t4;
|
|
820
|
+
if ($[0] !== dropdownOpened) {
|
|
821
|
+
t4 = e => {
|
|
822
|
+
e.preventDefault();
|
|
823
|
+
e.stopPropagation();
|
|
824
|
+
setDropdownOpened(!dropdownOpened);
|
|
825
|
+
};
|
|
826
|
+
$[0] = dropdownOpened;
|
|
827
|
+
$[1] = t4;
|
|
828
|
+
} else {
|
|
829
|
+
t4 = $[1];
|
|
830
|
+
}
|
|
831
|
+
const onClickDropdown = t4;
|
|
832
|
+
let t5;
|
|
833
|
+
if ($[2] !== className || $[3] !== dropdownOpened || $[4] !== onClickDropdown || $[5] !== resourceRoute || $[6] !== resourceValues || $[7] !== size || $[8] !== types) {
|
|
834
|
+
const finalTypes = types !== null ? types.filter(_temp$3) : null;
|
|
835
|
+
const hasMultipleTypes = finalTypes !== null && finalTypes.length > 1;
|
|
836
|
+
let t6;
|
|
837
|
+
if ($[10] !== dropdownOpened) {
|
|
838
|
+
t6 = () => {
|
|
839
|
+
if (dropdownOpened) {
|
|
840
|
+
setDropdownOpened(false);
|
|
841
|
+
}
|
|
842
|
+
};
|
|
843
|
+
$[10] = dropdownOpened;
|
|
844
|
+
$[11] = t6;
|
|
845
|
+
} else {
|
|
846
|
+
t6 = $[11];
|
|
535
847
|
}
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
848
|
+
const onDropdownClickOutside = t6;
|
|
849
|
+
const t7 = !hasMultipleTypes ? `${resourceRoute("create")}${finalTypes !== null && finalTypes.length === 1 ? `?type=${finalTypes[0].id}` : ""}` : "#";
|
|
850
|
+
const t8 = className !== null;
|
|
851
|
+
let t9;
|
|
852
|
+
if ($[12] !== className || $[13] !== hasMultipleTypes || $[14] !== t8) {
|
|
853
|
+
t9 = classNames([{
|
|
854
|
+
"dropdown-toggle": hasMultipleTypes,
|
|
855
|
+
[className]: t8
|
|
856
|
+
}]);
|
|
857
|
+
$[12] = className;
|
|
858
|
+
$[13] = hasMultipleTypes;
|
|
859
|
+
$[14] = t8;
|
|
860
|
+
$[15] = t9;
|
|
861
|
+
} else {
|
|
862
|
+
t9 = $[15];
|
|
863
|
+
}
|
|
864
|
+
const t10 = hasMultipleTypes ? onClickDropdown : null;
|
|
865
|
+
let t11;
|
|
866
|
+
if ($[16] !== resourceValues) {
|
|
867
|
+
t11 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
868
|
+
id: "l+ddDH",
|
|
869
|
+
values: resourceValues
|
|
870
|
+
});
|
|
871
|
+
$[16] = resourceValues;
|
|
872
|
+
$[17] = t11;
|
|
873
|
+
} else {
|
|
874
|
+
t11 = $[17];
|
|
875
|
+
}
|
|
876
|
+
let t12;
|
|
877
|
+
if ($[18] !== size || $[19] !== t10 || $[20] !== t11 || $[21] !== t7 || $[22] !== t9) {
|
|
878
|
+
t12 = /*#__PURE__*/jsx(Button, {
|
|
879
|
+
href: t7,
|
|
880
|
+
size: size,
|
|
881
|
+
theme: "primary",
|
|
882
|
+
className: t9,
|
|
883
|
+
onClick: t10,
|
|
884
|
+
children: t11
|
|
885
|
+
});
|
|
886
|
+
$[18] = size;
|
|
887
|
+
$[19] = t10;
|
|
888
|
+
$[20] = t11;
|
|
889
|
+
$[21] = t7;
|
|
890
|
+
$[22] = t9;
|
|
891
|
+
$[23] = t12;
|
|
892
|
+
} else {
|
|
893
|
+
t12 = $[23];
|
|
894
|
+
}
|
|
895
|
+
const button = t12;
|
|
896
|
+
t5 = hasMultipleTypes ? /*#__PURE__*/jsxs("div", {
|
|
897
|
+
className: classNames(["dropdown", {
|
|
898
|
+
show: dropdownOpened
|
|
899
|
+
}]),
|
|
900
|
+
children: [button, /*#__PURE__*/jsx(Dropdown, {
|
|
901
|
+
items: finalTypes.map(it => ({
|
|
564
902
|
id: it.id,
|
|
565
903
|
label: it.name,
|
|
566
|
-
href:
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
})
|
|
573
|
-
|
|
904
|
+
href: `${resourceRoute("create")}?type=${it.id}`
|
|
905
|
+
})),
|
|
906
|
+
visible: dropdownOpened,
|
|
907
|
+
align: "end",
|
|
908
|
+
onClickOutside: onDropdownClickOutside
|
|
909
|
+
})]
|
|
910
|
+
}) : button;
|
|
911
|
+
$[2] = className;
|
|
912
|
+
$[3] = dropdownOpened;
|
|
913
|
+
$[4] = onClickDropdown;
|
|
914
|
+
$[5] = resourceRoute;
|
|
915
|
+
$[6] = resourceValues;
|
|
916
|
+
$[7] = size;
|
|
917
|
+
$[8] = types;
|
|
918
|
+
$[9] = t5;
|
|
919
|
+
} else {
|
|
920
|
+
t5 = $[9];
|
|
921
|
+
}
|
|
922
|
+
return t5;
|
|
923
|
+
}
|
|
924
|
+
function _temp$3(t0) {
|
|
925
|
+
const {
|
|
926
|
+
settings: t1
|
|
927
|
+
} = t0;
|
|
928
|
+
const {
|
|
929
|
+
canCreate: t2
|
|
930
|
+
} = t1 === undefined ? {} : t1;
|
|
931
|
+
const canCreate = t2 === undefined ? true : t2;
|
|
932
|
+
return canCreate;
|
|
574
933
|
}
|
|
575
934
|
|
|
576
|
-
var _excluded$3 = ["resource"];
|
|
577
935
|
// Kept for backward compatibility with exports
|
|
578
|
-
function ResourceItemsList(
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
936
|
+
function ResourceItemsList(t0) {
|
|
937
|
+
const $ = c(8);
|
|
938
|
+
let props;
|
|
939
|
+
let resource;
|
|
940
|
+
if ($[0] !== t0) {
|
|
941
|
+
({
|
|
942
|
+
resource,
|
|
943
|
+
...props
|
|
944
|
+
} = t0);
|
|
945
|
+
$[0] = t0;
|
|
946
|
+
$[1] = props;
|
|
947
|
+
$[2] = resource;
|
|
948
|
+
} else {
|
|
949
|
+
props = $[1];
|
|
950
|
+
resource = $[2];
|
|
951
|
+
}
|
|
952
|
+
let t1;
|
|
953
|
+
if ($[3] !== resource) {
|
|
954
|
+
t1 = isObject(resource) ? resource : {
|
|
582
955
|
id: resource
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
}
|
|
956
|
+
};
|
|
957
|
+
$[3] = resource;
|
|
958
|
+
$[4] = t1;
|
|
959
|
+
} else {
|
|
960
|
+
t1 = $[4];
|
|
961
|
+
}
|
|
962
|
+
const {
|
|
963
|
+
id: t2
|
|
964
|
+
} = t1;
|
|
965
|
+
const finalResource = t2 === undefined ? null : t2;
|
|
966
|
+
let t3;
|
|
967
|
+
if ($[5] !== finalResource || $[6] !== props) {
|
|
968
|
+
t3 = /*#__PURE__*/jsx(ResourceList, {
|
|
969
|
+
resource: finalResource,
|
|
970
|
+
...props
|
|
971
|
+
});
|
|
972
|
+
$[5] = finalResource;
|
|
973
|
+
$[6] = props;
|
|
974
|
+
$[7] = t3;
|
|
975
|
+
} else {
|
|
976
|
+
t3 = $[7];
|
|
977
|
+
}
|
|
978
|
+
return t3;
|
|
589
979
|
}
|
|
590
980
|
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
defaultActions
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
981
|
+
const DEFAULT_ACTIONS = ['create'];
|
|
982
|
+
function ResourceIndexPage(t0) {
|
|
983
|
+
const $ = c(70);
|
|
984
|
+
const {
|
|
985
|
+
resource,
|
|
986
|
+
defaultActions: t1,
|
|
987
|
+
actionsProps: t2
|
|
988
|
+
} = t0;
|
|
989
|
+
const defaultActions = t1 === undefined ? DEFAULT_ACTIONS : t1;
|
|
990
|
+
const actionsProps = t2 === undefined ? null : t2;
|
|
991
|
+
const {
|
|
992
|
+
theme: t3
|
|
993
|
+
} = usePanneauColorScheme();
|
|
994
|
+
const theme = t3 === undefined ? null : t3;
|
|
995
|
+
const {
|
|
996
|
+
name,
|
|
997
|
+
settings: t4,
|
|
998
|
+
index: t5
|
|
999
|
+
} = resource;
|
|
1000
|
+
let t6;
|
|
1001
|
+
if ($[0] !== t4) {
|
|
1002
|
+
t6 = t4 === undefined ? {} : t4;
|
|
1003
|
+
$[0] = t4;
|
|
1004
|
+
$[1] = t6;
|
|
1005
|
+
} else {
|
|
1006
|
+
t6 = $[1];
|
|
1007
|
+
}
|
|
1008
|
+
const settings = t6;
|
|
1009
|
+
let t7;
|
|
1010
|
+
if ($[2] !== t5) {
|
|
1011
|
+
t7 = t5 === undefined ? {} : t5;
|
|
1012
|
+
$[2] = t5;
|
|
1013
|
+
$[3] = t7;
|
|
1014
|
+
} else {
|
|
1015
|
+
t7 = $[3];
|
|
1016
|
+
}
|
|
1017
|
+
const index = t7;
|
|
1018
|
+
let t8;
|
|
1019
|
+
if ($[4] !== settings) {
|
|
1020
|
+
t8 = settings || {};
|
|
1021
|
+
$[4] = settings;
|
|
1022
|
+
$[5] = t8;
|
|
1023
|
+
} else {
|
|
1024
|
+
t8 = $[5];
|
|
1025
|
+
}
|
|
1026
|
+
const {
|
|
1027
|
+
canCreate: t9,
|
|
1028
|
+
indexIsPaginated: t10
|
|
1029
|
+
} = t8;
|
|
1030
|
+
const canCreate = t9 === undefined ? true : t9;
|
|
1031
|
+
const paginated = t10 === undefined ? false : t10;
|
|
1032
|
+
let t11;
|
|
1033
|
+
if ($[6] !== index) {
|
|
1034
|
+
t11 = index || {};
|
|
1035
|
+
$[6] = index;
|
|
1036
|
+
$[7] = t11;
|
|
1037
|
+
} else {
|
|
1038
|
+
t11 = $[7];
|
|
1039
|
+
}
|
|
1040
|
+
const {
|
|
1041
|
+
actions: t12
|
|
1042
|
+
} = t11;
|
|
1043
|
+
const indexActions = t12 === undefined ? null : t12;
|
|
1044
|
+
let t13;
|
|
1045
|
+
if ($[8] !== canCreate || $[9] !== defaultActions || $[10] !== indexActions) {
|
|
1046
|
+
t13 = indexActions || defaultActions.filter(it => it !== "create" || canCreate);
|
|
1047
|
+
$[8] = canCreate;
|
|
1048
|
+
$[9] = defaultActions;
|
|
1049
|
+
$[10] = indexActions;
|
|
1050
|
+
$[11] = t13;
|
|
1051
|
+
} else {
|
|
1052
|
+
t13 = $[11];
|
|
1053
|
+
}
|
|
1054
|
+
let t14;
|
|
1055
|
+
if ($[12] !== t13) {
|
|
1056
|
+
t14 = t13.map(_temp$2);
|
|
1057
|
+
$[12] = t13;
|
|
1058
|
+
$[13] = t14;
|
|
1059
|
+
} else {
|
|
1060
|
+
t14 = $[13];
|
|
1061
|
+
}
|
|
1062
|
+
const finalActions = t14;
|
|
1063
|
+
const resourceValues = useResourceValues(resource);
|
|
1064
|
+
const actionsComponentsManager = useActionsComponentsManager();
|
|
1065
|
+
const [, navigate] = useLocation();
|
|
1066
|
+
const search = useSearch();
|
|
1067
|
+
let t15;
|
|
1068
|
+
if ($[14] !== search) {
|
|
1069
|
+
t15 = queryString.parse(search, {
|
|
1070
|
+
arrayFormat: "bracket"
|
|
625
1071
|
});
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
1072
|
+
$[14] = search;
|
|
1073
|
+
$[15] = t15;
|
|
1074
|
+
} else {
|
|
1075
|
+
t15 = $[15];
|
|
1076
|
+
}
|
|
1077
|
+
const query = t15;
|
|
1078
|
+
const listQuery = query;
|
|
1079
|
+
let t16;
|
|
1080
|
+
if ($[16] !== query) {
|
|
1081
|
+
t16 = query || {};
|
|
1082
|
+
$[16] = query;
|
|
1083
|
+
$[17] = t16;
|
|
1084
|
+
} else {
|
|
1085
|
+
t16 = $[17];
|
|
1086
|
+
}
|
|
1087
|
+
const {
|
|
1088
|
+
created: t17,
|
|
1089
|
+
deleted: t18
|
|
1090
|
+
} = t16;
|
|
1091
|
+
const created = t17 === undefined ? false : t17;
|
|
1092
|
+
const deleted = t18 === undefined ? false : t18;
|
|
1093
|
+
const resourceRoute = useResourceUrlGenerator(resource);
|
|
1094
|
+
let t19;
|
|
1095
|
+
if ($[18] !== resourceRoute) {
|
|
1096
|
+
t19 = resourceRoute("index");
|
|
1097
|
+
$[18] = resourceRoute;
|
|
1098
|
+
$[19] = t19;
|
|
1099
|
+
} else {
|
|
1100
|
+
t19 = $[19];
|
|
1101
|
+
}
|
|
1102
|
+
const url = t19;
|
|
1103
|
+
let t20;
|
|
1104
|
+
if ($[20] !== navigate || $[21] !== url) {
|
|
1105
|
+
t20 = submitQuery => {
|
|
1106
|
+
const newQuery = submitQuery !== null ? Object.keys(submitQuery).reduce((currentQuery, key) => {
|
|
1107
|
+
const value = submitQuery[key];
|
|
1108
|
+
return value !== null ? {
|
|
1109
|
+
...currentQuery,
|
|
1110
|
+
[key]: value
|
|
1111
|
+
} : currentQuery;
|
|
1112
|
+
}, {}) : null;
|
|
1113
|
+
navigate(`${url}${newQuery !== null ? `?${queryString.stringify(newQuery, {
|
|
1114
|
+
arrayFormat: "bracket"
|
|
1115
|
+
})}` : ""}`);
|
|
1116
|
+
};
|
|
1117
|
+
$[20] = navigate;
|
|
1118
|
+
$[21] = url;
|
|
1119
|
+
$[22] = t20;
|
|
1120
|
+
} else {
|
|
1121
|
+
t20 = $[22];
|
|
1122
|
+
}
|
|
1123
|
+
const onQueryChange = t20;
|
|
1124
|
+
let t21;
|
|
1125
|
+
if ($[23] !== navigate || $[24] !== url) {
|
|
1126
|
+
t21 = () => {
|
|
1127
|
+
const resetQuery = queryString.stringify(null, {
|
|
1128
|
+
arrayFormat: "bracket"
|
|
1129
|
+
});
|
|
1130
|
+
navigate(`${url}?${resetQuery}`);
|
|
1131
|
+
};
|
|
1132
|
+
$[23] = navigate;
|
|
1133
|
+
$[24] = url;
|
|
1134
|
+
$[25] = t21;
|
|
1135
|
+
} else {
|
|
1136
|
+
t21 = $[25];
|
|
1137
|
+
}
|
|
1138
|
+
const onQueryReset = t21;
|
|
1139
|
+
let t22;
|
|
1140
|
+
if ($[26] !== navigate || $[27] !== url) {
|
|
1141
|
+
t22 = () => {
|
|
1142
|
+
navigate(url, {
|
|
1143
|
+
replace: true
|
|
1144
|
+
});
|
|
1145
|
+
};
|
|
1146
|
+
$[26] = navigate;
|
|
1147
|
+
$[27] = url;
|
|
1148
|
+
$[28] = t22;
|
|
1149
|
+
} else {
|
|
1150
|
+
t22 = $[28];
|
|
1151
|
+
}
|
|
1152
|
+
const onClickCloseAlert = t22;
|
|
1153
|
+
let t23;
|
|
1154
|
+
if ($[29] !== actionsComponentsManager || $[30] !== finalActions || $[31] !== onQueryChange || $[32] !== query || $[33] !== resource) {
|
|
1155
|
+
t23 = finalActions.length > 0 ? /*#__PURE__*/jsx("div", {
|
|
1156
|
+
className: "d-flex align-items-center",
|
|
1157
|
+
children: finalActions.map(t24 => {
|
|
1158
|
+
const {
|
|
1159
|
+
id,
|
|
1160
|
+
component: t25,
|
|
1161
|
+
withQuery: t26,
|
|
1162
|
+
href: t27,
|
|
1163
|
+
...otherProps
|
|
1164
|
+
} = t24;
|
|
1165
|
+
const component = t25 === undefined ? Button : t25;
|
|
1166
|
+
const withQuery = t26 === undefined ? false : t26;
|
|
1167
|
+
const href = t27 === undefined ? null : t27;
|
|
1168
|
+
const ActionComponent = isString(component) ? actionsComponentsManager.getComponent(component) : component;
|
|
1169
|
+
const isButton = ActionComponent === Button;
|
|
1170
|
+
let finalHref = href;
|
|
1171
|
+
if (isButton && withQuery && href !== null) {
|
|
1172
|
+
finalHref = `${finalHref}${finalHref.indexOf("?") !== -1 ? "&" : "?"}${queryString.stringify(query, {
|
|
1173
|
+
arrayFormat: "bracket"
|
|
1174
|
+
})}`;
|
|
1175
|
+
}
|
|
1176
|
+
return ActionComponent !== null ? /*#__PURE__*/jsx(ActionComponent, {
|
|
1177
|
+
href: finalHref,
|
|
1178
|
+
...otherProps,
|
|
1179
|
+
...(!isButton ? {
|
|
1180
|
+
resource,
|
|
1181
|
+
query,
|
|
1182
|
+
onQueryChange
|
|
1183
|
+
} : {})
|
|
1184
|
+
}, `action-${id}`) : null;
|
|
1185
|
+
})
|
|
1186
|
+
}) : null;
|
|
1187
|
+
$[29] = actionsComponentsManager;
|
|
1188
|
+
$[30] = finalActions;
|
|
1189
|
+
$[31] = onQueryChange;
|
|
1190
|
+
$[32] = query;
|
|
1191
|
+
$[33] = resource;
|
|
1192
|
+
$[34] = t23;
|
|
1193
|
+
} else {
|
|
1194
|
+
t23 = $[34];
|
|
1195
|
+
}
|
|
1196
|
+
let t24;
|
|
1197
|
+
if ($[35] !== name || $[36] !== t23) {
|
|
1198
|
+
t24 = /*#__PURE__*/jsx(PageHeader, {
|
|
1199
|
+
title: name,
|
|
1200
|
+
actions: t23
|
|
636
1201
|
});
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
1202
|
+
$[35] = name;
|
|
1203
|
+
$[36] = t23;
|
|
1204
|
+
$[37] = t24;
|
|
1205
|
+
} else {
|
|
1206
|
+
t24 = $[37];
|
|
1207
|
+
}
|
|
1208
|
+
let t25;
|
|
1209
|
+
if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1210
|
+
t25 = classNames(["container-sm py-4"]);
|
|
1211
|
+
$[38] = t25;
|
|
1212
|
+
} else {
|
|
1213
|
+
t25 = $[38];
|
|
1214
|
+
}
|
|
1215
|
+
let t26;
|
|
1216
|
+
if ($[39] !== created || $[40] !== onClickCloseAlert || $[41] !== resourceValues) {
|
|
1217
|
+
t26 = created ? /*#__PURE__*/jsx(Alert, {
|
|
1218
|
+
className: "mb-4",
|
|
1219
|
+
onClose: onClickCloseAlert,
|
|
1220
|
+
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
1221
|
+
id: "bfP/d8",
|
|
1222
|
+
values: resourceValues
|
|
1223
|
+
})
|
|
1224
|
+
}) : null;
|
|
1225
|
+
$[39] = created;
|
|
1226
|
+
$[40] = onClickCloseAlert;
|
|
1227
|
+
$[41] = resourceValues;
|
|
1228
|
+
$[42] = t26;
|
|
1229
|
+
} else {
|
|
1230
|
+
t26 = $[42];
|
|
1231
|
+
}
|
|
1232
|
+
let t27;
|
|
1233
|
+
if ($[43] !== deleted || $[44] !== onClickCloseAlert || $[45] !== resourceValues) {
|
|
1234
|
+
t27 = deleted ? /*#__PURE__*/jsx(Alert, {
|
|
1235
|
+
className: "mb-4",
|
|
1236
|
+
onClose: onClickCloseAlert,
|
|
1237
|
+
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
1238
|
+
id: "dkRdks",
|
|
1239
|
+
values: resourceValues
|
|
1240
|
+
})
|
|
1241
|
+
}) : null;
|
|
1242
|
+
$[43] = deleted;
|
|
1243
|
+
$[44] = onClickCloseAlert;
|
|
1244
|
+
$[45] = resourceValues;
|
|
1245
|
+
$[46] = t27;
|
|
1246
|
+
} else {
|
|
1247
|
+
t27 = $[46];
|
|
1248
|
+
}
|
|
1249
|
+
let t28;
|
|
1250
|
+
if ($[47] !== actionsProps) {
|
|
1251
|
+
t28 = actionsProps || {};
|
|
1252
|
+
$[47] = actionsProps;
|
|
1253
|
+
$[48] = t28;
|
|
1254
|
+
} else {
|
|
1255
|
+
t28 = $[48];
|
|
1256
|
+
}
|
|
1257
|
+
let t29;
|
|
1258
|
+
if ($[49] !== t28) {
|
|
1259
|
+
t29 = {
|
|
1260
|
+
size: "sm",
|
|
1261
|
+
...t28
|
|
1262
|
+
};
|
|
1263
|
+
$[49] = t28;
|
|
1264
|
+
$[50] = t29;
|
|
1265
|
+
} else {
|
|
1266
|
+
t29 = $[50];
|
|
1267
|
+
}
|
|
1268
|
+
let t30;
|
|
1269
|
+
if ($[51] !== listQuery || $[52] !== onQueryChange || $[53] !== onQueryReset || $[54] !== paginated || $[55] !== resource || $[56] !== t29 || $[57] !== theme || $[58] !== url) {
|
|
1270
|
+
t30 = /*#__PURE__*/jsx(ResourceItemsList, {
|
|
1271
|
+
resource: resource,
|
|
1272
|
+
baseUrl: url,
|
|
1273
|
+
query: listQuery,
|
|
1274
|
+
paginated: paginated,
|
|
1275
|
+
onQueryChange: onQueryChange,
|
|
1276
|
+
onQueryReset: onQueryReset,
|
|
1277
|
+
theme: theme,
|
|
1278
|
+
actionsProps: t29
|
|
660
1279
|
});
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
1280
|
+
$[51] = listQuery;
|
|
1281
|
+
$[52] = onQueryChange;
|
|
1282
|
+
$[53] = onQueryReset;
|
|
1283
|
+
$[54] = paginated;
|
|
1284
|
+
$[55] = resource;
|
|
1285
|
+
$[56] = t29;
|
|
1286
|
+
$[57] = theme;
|
|
1287
|
+
$[58] = url;
|
|
1288
|
+
$[59] = t30;
|
|
1289
|
+
} else {
|
|
1290
|
+
t30 = $[59];
|
|
1291
|
+
}
|
|
1292
|
+
let t31;
|
|
1293
|
+
if ($[60] !== t26 || $[61] !== t27 || $[62] !== t30) {
|
|
1294
|
+
t31 = /*#__PURE__*/jsxs("div", {
|
|
1295
|
+
className: t25,
|
|
1296
|
+
children: [t26, t27, t30]
|
|
666
1297
|
});
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
707
|
-
values: resourceValues,
|
|
708
|
-
id: "bfP/d8",
|
|
709
|
-
defaultMessage: [{
|
|
710
|
-
"type": 1,
|
|
711
|
-
"value": "The_singular"
|
|
712
|
-
}, {
|
|
713
|
-
"type": 0,
|
|
714
|
-
"value": " has been created."
|
|
715
|
-
}]
|
|
716
|
-
})
|
|
717
|
-
}) : null, deleted ? /*#__PURE__*/jsx(Alert, {
|
|
718
|
-
className: "mb-4",
|
|
719
|
-
onClose: onClickCloseAlert,
|
|
720
|
-
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
721
|
-
values: resourceValues,
|
|
722
|
-
id: "dkRdks",
|
|
723
|
-
defaultMessage: [{
|
|
724
|
-
"type": 1,
|
|
725
|
-
"value": "The_singular"
|
|
726
|
-
}, {
|
|
727
|
-
"type": 0,
|
|
728
|
-
"value": " has been deleted."
|
|
729
|
-
}]
|
|
730
|
-
})
|
|
731
|
-
}) : null, /*#__PURE__*/jsx(ResourceItemsList, {
|
|
732
|
-
resource: resource,
|
|
733
|
-
baseUrl: url,
|
|
734
|
-
query: listQuery,
|
|
735
|
-
paginated: paginated,
|
|
736
|
-
onQueryChange: onQueryChange,
|
|
737
|
-
onQueryReset: onQueryReset,
|
|
738
|
-
theme: theme,
|
|
739
|
-
actionsProps: _objectSpread({
|
|
740
|
-
size: 'sm'
|
|
741
|
-
}, actionsProps || {})
|
|
742
|
-
})]
|
|
743
|
-
})]
|
|
744
|
-
})
|
|
745
|
-
});
|
|
1298
|
+
$[60] = t26;
|
|
1299
|
+
$[61] = t27;
|
|
1300
|
+
$[62] = t30;
|
|
1301
|
+
$[63] = t31;
|
|
1302
|
+
} else {
|
|
1303
|
+
t31 = $[63];
|
|
1304
|
+
}
|
|
1305
|
+
let t32;
|
|
1306
|
+
if ($[64] !== t24 || $[65] !== t31) {
|
|
1307
|
+
t32 = /*#__PURE__*/jsxs(MainLayout, {
|
|
1308
|
+
children: [t24, t31]
|
|
1309
|
+
});
|
|
1310
|
+
$[64] = t24;
|
|
1311
|
+
$[65] = t31;
|
|
1312
|
+
$[66] = t32;
|
|
1313
|
+
} else {
|
|
1314
|
+
t32 = $[66];
|
|
1315
|
+
}
|
|
1316
|
+
let t33;
|
|
1317
|
+
if ($[67] !== resource || $[68] !== t32) {
|
|
1318
|
+
t33 = /*#__PURE__*/jsx(ResourceProvider, {
|
|
1319
|
+
resource: resource,
|
|
1320
|
+
children: t32
|
|
1321
|
+
});
|
|
1322
|
+
$[67] = resource;
|
|
1323
|
+
$[68] = t32;
|
|
1324
|
+
$[69] = t33;
|
|
1325
|
+
} else {
|
|
1326
|
+
t33 = $[69];
|
|
1327
|
+
}
|
|
1328
|
+
return t33;
|
|
1329
|
+
}
|
|
1330
|
+
function _temp$2(it_0) {
|
|
1331
|
+
return it_0 === "create" ? {
|
|
1332
|
+
id: "create",
|
|
1333
|
+
component: ResourceCreateButton,
|
|
1334
|
+
size: "md",
|
|
1335
|
+
theme: "primary"
|
|
1336
|
+
} : it_0;
|
|
746
1337
|
}
|
|
747
1338
|
|
|
748
|
-
function ResourceShowPage(
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
1339
|
+
function ResourceShowPage(t0) {
|
|
1340
|
+
const $ = c(19);
|
|
1341
|
+
const {
|
|
1342
|
+
resource,
|
|
1343
|
+
itemId
|
|
1344
|
+
} = t0;
|
|
1345
|
+
const {
|
|
1346
|
+
name
|
|
1347
|
+
} = resource;
|
|
1348
|
+
const {
|
|
1349
|
+
item,
|
|
1350
|
+
isLoading,
|
|
1351
|
+
error
|
|
1352
|
+
} = useResourceItem(resource, itemId);
|
|
1353
|
+
let t1;
|
|
1354
|
+
if ($[0] !== item) {
|
|
1355
|
+
t1 = item || {};
|
|
1356
|
+
$[0] = item;
|
|
1357
|
+
$[1] = t1;
|
|
1358
|
+
} else {
|
|
1359
|
+
t1 = $[1];
|
|
1360
|
+
}
|
|
1361
|
+
const {
|
|
1362
|
+
type: t2
|
|
1363
|
+
} = t1;
|
|
1364
|
+
const type = t2 === undefined ? null : t2;
|
|
1365
|
+
let t3;
|
|
1366
|
+
if ($[2] !== item || $[3] !== itemId || $[4] !== name || $[5] !== resource || $[6] !== type) {
|
|
1367
|
+
t3 = item !== null ? /*#__PURE__*/jsx(ResourceFormWrapper, {
|
|
1368
|
+
resource: resource,
|
|
1369
|
+
item: item,
|
|
1370
|
+
type: type,
|
|
1371
|
+
disabled: true,
|
|
1372
|
+
header: /*#__PURE__*/jsx(PageHeader, {
|
|
1373
|
+
title: `${name} #${itemId}`,
|
|
1374
|
+
small: true
|
|
1375
|
+
}),
|
|
1376
|
+
withContainer: true
|
|
1377
|
+
}) : null;
|
|
1378
|
+
$[2] = item;
|
|
1379
|
+
$[3] = itemId;
|
|
1380
|
+
$[4] = name;
|
|
1381
|
+
$[5] = resource;
|
|
1382
|
+
$[6] = type;
|
|
1383
|
+
$[7] = t3;
|
|
1384
|
+
} else {
|
|
1385
|
+
t3 = $[7];
|
|
1386
|
+
}
|
|
1387
|
+
let t4;
|
|
1388
|
+
if ($[8] !== error || $[9] !== isLoading || $[10] !== item) {
|
|
1389
|
+
t4 = item === null && isLoading && !error ? /*#__PURE__*/jsx(Loading, {
|
|
1390
|
+
className: "mw-25 my-4 m-auto",
|
|
1391
|
+
withDelay: true,
|
|
1392
|
+
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
1393
|
+
id: "TV3jir"
|
|
1394
|
+
})
|
|
1395
|
+
}) : null;
|
|
1396
|
+
$[8] = error;
|
|
1397
|
+
$[9] = isLoading;
|
|
1398
|
+
$[10] = item;
|
|
1399
|
+
$[11] = t4;
|
|
1400
|
+
} else {
|
|
1401
|
+
t4 = $[11];
|
|
1402
|
+
}
|
|
1403
|
+
let t5;
|
|
1404
|
+
if ($[12] !== isLoading || $[13] !== t3 || $[14] !== t4) {
|
|
1405
|
+
t5 = /*#__PURE__*/jsxs(MainLayout, {
|
|
1406
|
+
loading: isLoading,
|
|
1407
|
+
children: [t3, t4]
|
|
1408
|
+
});
|
|
1409
|
+
$[12] = isLoading;
|
|
1410
|
+
$[13] = t3;
|
|
1411
|
+
$[14] = t4;
|
|
1412
|
+
$[15] = t5;
|
|
1413
|
+
} else {
|
|
1414
|
+
t5 = $[15];
|
|
1415
|
+
}
|
|
1416
|
+
let t6;
|
|
1417
|
+
if ($[16] !== resource || $[17] !== t5) {
|
|
1418
|
+
t6 = /*#__PURE__*/jsx(ResourceProvider, {
|
|
1419
|
+
resource: resource,
|
|
1420
|
+
children: t5
|
|
1421
|
+
});
|
|
1422
|
+
$[16] = resource;
|
|
1423
|
+
$[17] = t5;
|
|
1424
|
+
$[18] = t6;
|
|
1425
|
+
} else {
|
|
1426
|
+
t6 = $[18];
|
|
1427
|
+
}
|
|
1428
|
+
return t6;
|
|
786
1429
|
}
|
|
787
1430
|
|
|
788
|
-
function ResourceDuplicatePage(
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
"
|
|
848
|
-
"
|
|
849
|
-
}]
|
|
850
|
-
})
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
1431
|
+
function ResourceDuplicatePage(t0) {
|
|
1432
|
+
const $ = c(22);
|
|
1433
|
+
const {
|
|
1434
|
+
itemId,
|
|
1435
|
+
resource
|
|
1436
|
+
} = t0;
|
|
1437
|
+
const [, navigate] = useLocation();
|
|
1438
|
+
const resourceRoute = useResourceUrlGenerator(resource);
|
|
1439
|
+
const {
|
|
1440
|
+
item,
|
|
1441
|
+
isLoading,
|
|
1442
|
+
error
|
|
1443
|
+
} = useResourceItem(resource, itemId);
|
|
1444
|
+
let t1;
|
|
1445
|
+
if ($[0] !== item) {
|
|
1446
|
+
t1 = item || {};
|
|
1447
|
+
$[0] = item;
|
|
1448
|
+
$[1] = t1;
|
|
1449
|
+
} else {
|
|
1450
|
+
t1 = $[1];
|
|
1451
|
+
}
|
|
1452
|
+
const {
|
|
1453
|
+
type: t2
|
|
1454
|
+
} = t1;
|
|
1455
|
+
const type = t2 === undefined ? null : t2;
|
|
1456
|
+
const resourceValues = useResourceValues(resource);
|
|
1457
|
+
const typeName = useResourceTypeName(resource, type);
|
|
1458
|
+
let t3;
|
|
1459
|
+
if ($[2] !== navigate || $[3] !== resourceRoute) {
|
|
1460
|
+
t3 = t4 => {
|
|
1461
|
+
const {
|
|
1462
|
+
id: t5
|
|
1463
|
+
} = t4 === undefined ? {} : t4;
|
|
1464
|
+
const id = t5 === undefined ? null : t5;
|
|
1465
|
+
return navigate(`${resourceRoute("edit", {
|
|
1466
|
+
id
|
|
1467
|
+
})}?duplicated=true`);
|
|
1468
|
+
};
|
|
1469
|
+
$[2] = navigate;
|
|
1470
|
+
$[3] = resourceRoute;
|
|
1471
|
+
$[4] = t3;
|
|
1472
|
+
} else {
|
|
1473
|
+
t3 = $[4];
|
|
1474
|
+
}
|
|
1475
|
+
const onComplete = t3;
|
|
1476
|
+
let t4;
|
|
1477
|
+
if ($[5] !== item || $[6] !== onComplete || $[7] !== resource || $[8] !== resourceValues || $[9] !== typeName) {
|
|
1478
|
+
t4 = item !== null ? /*#__PURE__*/jsx(ResourceFormWrapper, {
|
|
1479
|
+
resource: resource,
|
|
1480
|
+
item: item,
|
|
1481
|
+
onComplete: onComplete,
|
|
1482
|
+
isDuplicate: true,
|
|
1483
|
+
withContainer: true,
|
|
1484
|
+
header: /*#__PURE__*/jsx(PageHeader, {
|
|
1485
|
+
title: /*#__PURE__*/jsxs(Fragment, {
|
|
1486
|
+
children: [/*#__PURE__*/jsx(FormattedMessage, {
|
|
1487
|
+
id: "G7M4nI",
|
|
1488
|
+
values: resourceValues
|
|
1489
|
+
}), typeName !== null ? /*#__PURE__*/jsxs("span", {
|
|
1490
|
+
className: "text-body-secondary",
|
|
1491
|
+
children: [" ", "(", typeName, ")"]
|
|
1492
|
+
}) : null]
|
|
1493
|
+
}),
|
|
1494
|
+
small: true
|
|
1495
|
+
})
|
|
1496
|
+
}) : null;
|
|
1497
|
+
$[5] = item;
|
|
1498
|
+
$[6] = onComplete;
|
|
1499
|
+
$[7] = resource;
|
|
1500
|
+
$[8] = resourceValues;
|
|
1501
|
+
$[9] = typeName;
|
|
1502
|
+
$[10] = t4;
|
|
1503
|
+
} else {
|
|
1504
|
+
t4 = $[10];
|
|
1505
|
+
}
|
|
1506
|
+
let t5;
|
|
1507
|
+
if ($[11] !== error || $[12] !== isLoading || $[13] !== item) {
|
|
1508
|
+
t5 = item === null && isLoading && !error ? /*#__PURE__*/jsx(Loading, {
|
|
1509
|
+
className: "mw-25 my-4 m-auto",
|
|
1510
|
+
withDelay: true,
|
|
1511
|
+
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
1512
|
+
id: "TV3jir"
|
|
1513
|
+
})
|
|
1514
|
+
}) : null;
|
|
1515
|
+
$[11] = error;
|
|
1516
|
+
$[12] = isLoading;
|
|
1517
|
+
$[13] = item;
|
|
1518
|
+
$[14] = t5;
|
|
1519
|
+
} else {
|
|
1520
|
+
t5 = $[14];
|
|
1521
|
+
}
|
|
1522
|
+
let t6;
|
|
1523
|
+
if ($[15] !== isLoading || $[16] !== t4 || $[17] !== t5) {
|
|
1524
|
+
t6 = /*#__PURE__*/jsxs(MainLayout, {
|
|
1525
|
+
loading: isLoading,
|
|
1526
|
+
children: [t4, t5]
|
|
1527
|
+
});
|
|
1528
|
+
$[15] = isLoading;
|
|
1529
|
+
$[16] = t4;
|
|
1530
|
+
$[17] = t5;
|
|
1531
|
+
$[18] = t6;
|
|
1532
|
+
} else {
|
|
1533
|
+
t6 = $[18];
|
|
1534
|
+
}
|
|
1535
|
+
let t7;
|
|
1536
|
+
if ($[19] !== resource || $[20] !== t6) {
|
|
1537
|
+
t7 = /*#__PURE__*/jsx(ResourceProvider, {
|
|
1538
|
+
resource: resource,
|
|
1539
|
+
children: t6
|
|
1540
|
+
});
|
|
1541
|
+
$[19] = resource;
|
|
1542
|
+
$[20] = t6;
|
|
1543
|
+
$[21] = t7;
|
|
1544
|
+
} else {
|
|
1545
|
+
t7 = $[21];
|
|
1546
|
+
}
|
|
1547
|
+
return t7;
|
|
854
1548
|
}
|
|
855
1549
|
|
|
856
|
-
function ResourceLink(
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
defaultMessage: [{
|
|
871
|
-
"type": 0,
|
|
872
|
-
"value": "View "
|
|
873
|
-
}, {
|
|
874
|
-
"type": 1,
|
|
875
|
-
"value": "the_plural"
|
|
876
|
-
}]
|
|
877
|
-
})
|
|
1550
|
+
function ResourceLink(t0) {
|
|
1551
|
+
const $ = c(6);
|
|
1552
|
+
const {
|
|
1553
|
+
resource
|
|
1554
|
+
} = t0;
|
|
1555
|
+
const route = useUrlGenerator();
|
|
1556
|
+
const {
|
|
1557
|
+
id: resourceId
|
|
1558
|
+
} = resource || {};
|
|
1559
|
+
const resourceValues = useResourceValues(resource);
|
|
1560
|
+
const T0 = Link;
|
|
1561
|
+
const t1 = "d-block my-2";
|
|
1562
|
+
const t2 = route("resources.index", {
|
|
1563
|
+
resource: resourceId
|
|
878
1564
|
});
|
|
1565
|
+
let t3;
|
|
1566
|
+
if ($[0] !== resourceValues) {
|
|
1567
|
+
t3 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
1568
|
+
id: "FntHPK",
|
|
1569
|
+
values: resourceValues
|
|
1570
|
+
});
|
|
1571
|
+
$[0] = resourceValues;
|
|
1572
|
+
$[1] = t3;
|
|
1573
|
+
} else {
|
|
1574
|
+
t3 = $[1];
|
|
1575
|
+
}
|
|
1576
|
+
let t4;
|
|
1577
|
+
if ($[2] !== T0 || $[3] !== t2 || $[4] !== t3) {
|
|
1578
|
+
t4 = /*#__PURE__*/jsx(T0, {
|
|
1579
|
+
className: t1,
|
|
1580
|
+
href: t2,
|
|
1581
|
+
children: t3
|
|
1582
|
+
});
|
|
1583
|
+
$[2] = T0;
|
|
1584
|
+
$[3] = t2;
|
|
1585
|
+
$[4] = t3;
|
|
1586
|
+
$[5] = t4;
|
|
1587
|
+
} else {
|
|
1588
|
+
t4 = $[5];
|
|
1589
|
+
}
|
|
1590
|
+
return t4;
|
|
879
1591
|
}
|
|
880
1592
|
function HomePage() {
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
1593
|
+
const $ = c(10);
|
|
1594
|
+
const resources = usePanneauResources();
|
|
1595
|
+
let T0;
|
|
1596
|
+
let t0;
|
|
1597
|
+
let t1;
|
|
1598
|
+
if ($[0] !== resources) {
|
|
1599
|
+
const visibleResources = resources.filter(_temp$1);
|
|
1600
|
+
T0 = MainLayout;
|
|
1601
|
+
t0 = "container-sm py-4";
|
|
1602
|
+
t1 = visibleResources.map(_temp2$1);
|
|
1603
|
+
$[0] = resources;
|
|
1604
|
+
$[1] = T0;
|
|
1605
|
+
$[2] = t0;
|
|
1606
|
+
$[3] = t1;
|
|
1607
|
+
} else {
|
|
1608
|
+
T0 = $[1];
|
|
1609
|
+
t0 = $[2];
|
|
1610
|
+
t1 = $[3];
|
|
1611
|
+
}
|
|
1612
|
+
let t2;
|
|
1613
|
+
if ($[4] !== t0 || $[5] !== t1) {
|
|
1614
|
+
t2 = /*#__PURE__*/jsx("div", {
|
|
1615
|
+
className: t0,
|
|
1616
|
+
children: t1
|
|
1617
|
+
});
|
|
1618
|
+
$[4] = t0;
|
|
1619
|
+
$[5] = t1;
|
|
1620
|
+
$[6] = t2;
|
|
1621
|
+
} else {
|
|
1622
|
+
t2 = $[6];
|
|
1623
|
+
}
|
|
1624
|
+
let t3;
|
|
1625
|
+
if ($[7] !== T0 || $[8] !== t2) {
|
|
1626
|
+
t3 = /*#__PURE__*/jsx(T0, {
|
|
1627
|
+
children: t2
|
|
1628
|
+
});
|
|
1629
|
+
$[7] = T0;
|
|
1630
|
+
$[8] = t2;
|
|
1631
|
+
$[9] = t3;
|
|
1632
|
+
} else {
|
|
1633
|
+
t3 = $[9];
|
|
1634
|
+
}
|
|
1635
|
+
return t3;
|
|
1636
|
+
}
|
|
1637
|
+
function _temp2$1(resource) {
|
|
1638
|
+
const {
|
|
1639
|
+
id: resourceId
|
|
1640
|
+
} = resource || {};
|
|
1641
|
+
return /*#__PURE__*/jsx(ResourceLink, {
|
|
1642
|
+
resource: resource
|
|
1643
|
+
}, `resource-link-${resourceId}`);
|
|
1644
|
+
}
|
|
1645
|
+
function _temp$1(t0) {
|
|
1646
|
+
const {
|
|
1647
|
+
settings: t1
|
|
1648
|
+
} = t0;
|
|
1649
|
+
const {
|
|
1650
|
+
hideInNavbar: t2
|
|
1651
|
+
} = t1 === undefined ? {} : t1;
|
|
1652
|
+
const hideInNavbar = t2 === undefined ? false : t2;
|
|
1653
|
+
return !hideInNavbar;
|
|
901
1654
|
}
|
|
902
1655
|
|
|
903
1656
|
function AccountPage() {
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
1657
|
+
const $ = c(1);
|
|
1658
|
+
let t0;
|
|
1659
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1660
|
+
t0 = /*#__PURE__*/jsx(MainLayout, {
|
|
1661
|
+
children: /*#__PURE__*/jsx("div", {
|
|
1662
|
+
className: "container-sm py-4",
|
|
1663
|
+
children: "Account page"
|
|
1664
|
+
})
|
|
1665
|
+
});
|
|
1666
|
+
$[0] = t0;
|
|
1667
|
+
} else {
|
|
1668
|
+
t0 = $[0];
|
|
1669
|
+
}
|
|
1670
|
+
return t0;
|
|
910
1671
|
}
|
|
911
1672
|
|
|
912
|
-
function LoginForm(
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
1673
|
+
function LoginForm(t0) {
|
|
1674
|
+
const $ = c(10);
|
|
1675
|
+
const {
|
|
1676
|
+
className: t1,
|
|
1677
|
+
onComplete: t2
|
|
1678
|
+
} = t0;
|
|
1679
|
+
const className = t1 === undefined ? null : t1;
|
|
1680
|
+
const onComplete = t2 === undefined ? null : t2;
|
|
1681
|
+
const url = useUrlGenerator();
|
|
1682
|
+
const {
|
|
1683
|
+
login
|
|
1684
|
+
} = useAuth();
|
|
1685
|
+
let t3;
|
|
1686
|
+
if ($[0] !== login) {
|
|
1687
|
+
t3 = (action, t4) => {
|
|
1688
|
+
const {
|
|
1689
|
+
email,
|
|
1690
|
+
password
|
|
1691
|
+
} = t4;
|
|
1692
|
+
return login(email, password);
|
|
1693
|
+
};
|
|
1694
|
+
$[0] = login;
|
|
1695
|
+
$[1] = t3;
|
|
1696
|
+
} else {
|
|
1697
|
+
t3 = $[1];
|
|
1698
|
+
}
|
|
1699
|
+
const postForm = t3;
|
|
1700
|
+
const FormComponents = useFormsComponents();
|
|
1701
|
+
let t4;
|
|
1702
|
+
if ($[2] !== FormComponents) {
|
|
1703
|
+
t4 = getComponentFromName("login", FormComponents);
|
|
1704
|
+
$[2] = FormComponents;
|
|
1705
|
+
$[3] = t4;
|
|
1706
|
+
} else {
|
|
1707
|
+
t4 = $[3];
|
|
1708
|
+
}
|
|
1709
|
+
const FormComponent = t4;
|
|
1710
|
+
let t5;
|
|
1711
|
+
if ($[4] !== FormComponent || $[5] !== className || $[6] !== onComplete || $[7] !== postForm || $[8] !== url) {
|
|
1712
|
+
t5 = FormComponent !== null ? /*#__PURE__*/jsx(FormComponent, {
|
|
1713
|
+
action: url("auth.login"),
|
|
1714
|
+
postForm: postForm,
|
|
1715
|
+
onComplete: onComplete,
|
|
1716
|
+
className: className,
|
|
1717
|
+
submitButtonLabel: /*#__PURE__*/jsx(FormattedMessage, {
|
|
1718
|
+
id: "g6qbbX"
|
|
1719
|
+
})
|
|
1720
|
+
}) : null;
|
|
1721
|
+
$[4] = FormComponent;
|
|
1722
|
+
$[5] = className;
|
|
1723
|
+
$[6] = onComplete;
|
|
1724
|
+
$[7] = postForm;
|
|
1725
|
+
$[8] = url;
|
|
1726
|
+
$[9] = t5;
|
|
1727
|
+
} else {
|
|
1728
|
+
t5 = $[9];
|
|
1729
|
+
}
|
|
1730
|
+
return t5;
|
|
940
1731
|
}
|
|
941
1732
|
|
|
942
|
-
function GuestLayout(
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
_usePanneauColorSchem4 = _usePanneauColorSchem.text,
|
|
952
|
-
text = _usePanneauColorSchem4 === void 0 ? null : _usePanneauColorSchem4;
|
|
1733
|
+
function GuestLayout({
|
|
1734
|
+
fullscreen = false,
|
|
1735
|
+
children
|
|
1736
|
+
}) {
|
|
1737
|
+
const {
|
|
1738
|
+
theme = null,
|
|
1739
|
+
background = null,
|
|
1740
|
+
text = null
|
|
1741
|
+
} = usePanneauColorScheme();
|
|
953
1742
|
return /*#__PURE__*/jsxs("div", {
|
|
954
1743
|
className: classNames([{
|
|
955
1744
|
'd-flex flex-column min-vh-100': fullscreen
|
|
@@ -958,9 +1747,11 @@ function GuestLayout(_ref) {
|
|
|
958
1747
|
children: [/*#__PURE__*/jsx(MainNavbar, {
|
|
959
1748
|
className: classNames(['sticky-top', 'px-3'])
|
|
960
1749
|
}), /*#__PURE__*/jsx("div", {
|
|
961
|
-
className: classNames(
|
|
962
|
-
'd-flex flex-column flex-grow-1': fullscreen
|
|
963
|
-
|
|
1750
|
+
className: classNames({
|
|
1751
|
+
'd-flex flex-column flex-grow-1': fullscreen,
|
|
1752
|
+
[`bg-${background}`]: background !== null,
|
|
1753
|
+
[`text-${text}`]: text !== null
|
|
1754
|
+
}),
|
|
964
1755
|
children: /*#__PURE__*/jsx("div", {
|
|
965
1756
|
className: classNames({
|
|
966
1757
|
'w-100 my-auto': fullscreen
|
|
@@ -972,478 +1763,866 @@ function GuestLayout(_ref) {
|
|
|
972
1763
|
}
|
|
973
1764
|
|
|
974
1765
|
function LoginPage() {
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
1766
|
+
const $ = c(5);
|
|
1767
|
+
const route = useUrlGenerator();
|
|
1768
|
+
let t0;
|
|
1769
|
+
if ($[0] !== route) {
|
|
1770
|
+
t0 = () => {
|
|
1771
|
+
window.location.href = route("home");
|
|
1772
|
+
};
|
|
1773
|
+
$[0] = route;
|
|
1774
|
+
$[1] = t0;
|
|
1775
|
+
} else {
|
|
1776
|
+
t0 = $[1];
|
|
1777
|
+
}
|
|
1778
|
+
const onComplete = t0;
|
|
1779
|
+
let t1;
|
|
1780
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1781
|
+
t1 = /*#__PURE__*/jsx("h1", {
|
|
1782
|
+
className: "mb-4",
|
|
1783
|
+
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
1784
|
+
id: "AeOZq+"
|
|
1785
|
+
})
|
|
1786
|
+
});
|
|
1787
|
+
$[2] = t1;
|
|
1788
|
+
} else {
|
|
1789
|
+
t1 = $[2];
|
|
1790
|
+
}
|
|
1791
|
+
let t2;
|
|
1792
|
+
if ($[3] !== onComplete) {
|
|
1793
|
+
t2 = /*#__PURE__*/jsx(GuestLayout, {
|
|
1794
|
+
fullscreen: true,
|
|
985
1795
|
children: /*#__PURE__*/jsx("div", {
|
|
986
|
-
className: "
|
|
987
|
-
children: /*#__PURE__*/
|
|
988
|
-
className: "
|
|
989
|
-
children:
|
|
990
|
-
className: "
|
|
991
|
-
children: /*#__PURE__*/jsx(
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
"value": "Login"
|
|
996
|
-
}]
|
|
997
|
-
})
|
|
998
|
-
}), /*#__PURE__*/jsx(LoginForm, {
|
|
999
|
-
onSuccess: onSuccess
|
|
1000
|
-
})]
|
|
1796
|
+
className: "container-sm py-4",
|
|
1797
|
+
children: /*#__PURE__*/jsx("div", {
|
|
1798
|
+
className: "row justify-content-center",
|
|
1799
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
1800
|
+
className: "col-12 col-sm-8 col-md-6",
|
|
1801
|
+
children: [t1, /*#__PURE__*/jsx(LoginForm, {
|
|
1802
|
+
onComplete: onComplete
|
|
1803
|
+
})]
|
|
1804
|
+
})
|
|
1001
1805
|
})
|
|
1002
1806
|
})
|
|
1003
|
-
})
|
|
1004
|
-
|
|
1807
|
+
});
|
|
1808
|
+
$[3] = onComplete;
|
|
1809
|
+
$[4] = t2;
|
|
1810
|
+
} else {
|
|
1811
|
+
t2 = $[4];
|
|
1812
|
+
}
|
|
1813
|
+
return t2;
|
|
1005
1814
|
}
|
|
1006
1815
|
|
|
1007
|
-
function ErrorPage(
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
"
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
"
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1816
|
+
function ErrorPage(t0) {
|
|
1817
|
+
const $ = c(17);
|
|
1818
|
+
const {
|
|
1819
|
+
statusCode: t1
|
|
1820
|
+
} = t0;
|
|
1821
|
+
const statusCode = t1 === undefined ? null : t1;
|
|
1822
|
+
const code = statusCode || 404;
|
|
1823
|
+
let t2;
|
|
1824
|
+
bb0: switch (code) {
|
|
1825
|
+
case 401:
|
|
1826
|
+
{
|
|
1827
|
+
let t3;
|
|
1828
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1829
|
+
t3 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
1830
|
+
id: "6nwWPR"
|
|
1831
|
+
});
|
|
1832
|
+
$[0] = t3;
|
|
1833
|
+
} else {
|
|
1834
|
+
t3 = $[0];
|
|
1835
|
+
}
|
|
1836
|
+
t2 = t3;
|
|
1837
|
+
break bb0;
|
|
1838
|
+
}
|
|
1839
|
+
case 403:
|
|
1840
|
+
{
|
|
1841
|
+
let t3;
|
|
1842
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1843
|
+
t3 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
1844
|
+
id: "Pih2UO"
|
|
1845
|
+
});
|
|
1846
|
+
$[1] = t3;
|
|
1847
|
+
} else {
|
|
1848
|
+
t3 = $[1];
|
|
1849
|
+
}
|
|
1850
|
+
t2 = t3;
|
|
1851
|
+
break bb0;
|
|
1852
|
+
}
|
|
1853
|
+
case 404:
|
|
1854
|
+
{
|
|
1855
|
+
let t3;
|
|
1856
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1857
|
+
t3 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
1858
|
+
id: "6Ie+vL"
|
|
1859
|
+
});
|
|
1860
|
+
$[2] = t3;
|
|
1861
|
+
} else {
|
|
1862
|
+
t3 = $[2];
|
|
1863
|
+
}
|
|
1864
|
+
t2 = t3;
|
|
1865
|
+
break bb0;
|
|
1866
|
+
}
|
|
1867
|
+
case 500:
|
|
1868
|
+
{
|
|
1869
|
+
let t3;
|
|
1870
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1871
|
+
t3 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
1872
|
+
id: "owrRHV"
|
|
1873
|
+
});
|
|
1874
|
+
$[3] = t3;
|
|
1875
|
+
} else {
|
|
1876
|
+
t3 = $[3];
|
|
1877
|
+
}
|
|
1878
|
+
t2 = t3;
|
|
1879
|
+
break bb0;
|
|
1880
|
+
}
|
|
1881
|
+
default:
|
|
1882
|
+
{
|
|
1883
|
+
let t3;
|
|
1884
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1885
|
+
t3 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
1886
|
+
id: "6Ie+vL"
|
|
1887
|
+
});
|
|
1888
|
+
$[4] = t3;
|
|
1889
|
+
} else {
|
|
1890
|
+
t3 = $[4];
|
|
1891
|
+
}
|
|
1892
|
+
t2 = t3;
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
const title = t2;
|
|
1896
|
+
let t3;
|
|
1897
|
+
bb1: switch (code) {
|
|
1898
|
+
case 401:
|
|
1899
|
+
{
|
|
1900
|
+
let t4;
|
|
1901
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1902
|
+
t4 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
1903
|
+
id: "82P2dS"
|
|
1904
|
+
});
|
|
1905
|
+
$[5] = t4;
|
|
1906
|
+
} else {
|
|
1907
|
+
t4 = $[5];
|
|
1908
|
+
}
|
|
1909
|
+
t3 = t4;
|
|
1910
|
+
break bb1;
|
|
1911
|
+
}
|
|
1912
|
+
case 403:
|
|
1913
|
+
{
|
|
1914
|
+
let t4;
|
|
1915
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1916
|
+
t4 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
1917
|
+
id: "8HFiMs"
|
|
1918
|
+
});
|
|
1919
|
+
$[6] = t4;
|
|
1920
|
+
} else {
|
|
1921
|
+
t4 = $[6];
|
|
1922
|
+
}
|
|
1923
|
+
t3 = t4;
|
|
1924
|
+
break bb1;
|
|
1925
|
+
}
|
|
1926
|
+
case 404:
|
|
1927
|
+
{
|
|
1928
|
+
let t4;
|
|
1929
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1930
|
+
t4 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
1931
|
+
id: "naie2b"
|
|
1932
|
+
});
|
|
1933
|
+
$[7] = t4;
|
|
1934
|
+
} else {
|
|
1935
|
+
t4 = $[7];
|
|
1936
|
+
}
|
|
1937
|
+
t3 = t4;
|
|
1938
|
+
break bb1;
|
|
1939
|
+
}
|
|
1940
|
+
case 500:
|
|
1941
|
+
{
|
|
1942
|
+
let t4;
|
|
1943
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1944
|
+
t4 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
1945
|
+
id: "yALN2p"
|
|
1946
|
+
});
|
|
1947
|
+
$[8] = t4;
|
|
1948
|
+
} else {
|
|
1949
|
+
t4 = $[8];
|
|
1950
|
+
}
|
|
1951
|
+
t3 = t4;
|
|
1952
|
+
break bb1;
|
|
1953
|
+
}
|
|
1954
|
+
default:
|
|
1955
|
+
{
|
|
1956
|
+
let t4;
|
|
1957
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1958
|
+
t4 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
1959
|
+
id: "naie2b"
|
|
1960
|
+
});
|
|
1961
|
+
$[9] = t4;
|
|
1962
|
+
} else {
|
|
1963
|
+
t4 = $[9];
|
|
1964
|
+
}
|
|
1965
|
+
t3 = t4;
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
const description = t3;
|
|
1969
|
+
let t4;
|
|
1970
|
+
if ($[10] !== title) {
|
|
1971
|
+
t4 = /*#__PURE__*/jsx("h1", {
|
|
1972
|
+
children: title
|
|
1973
|
+
});
|
|
1974
|
+
$[10] = title;
|
|
1975
|
+
$[11] = t4;
|
|
1976
|
+
} else {
|
|
1977
|
+
t4 = $[11];
|
|
1978
|
+
}
|
|
1979
|
+
let t5;
|
|
1980
|
+
if ($[12] !== description) {
|
|
1981
|
+
t5 = /*#__PURE__*/jsx("p", {
|
|
1982
|
+
children: description
|
|
1983
|
+
});
|
|
1984
|
+
$[12] = description;
|
|
1985
|
+
$[13] = t5;
|
|
1986
|
+
} else {
|
|
1987
|
+
t5 = $[13];
|
|
1988
|
+
}
|
|
1989
|
+
let t6;
|
|
1990
|
+
if ($[14] !== t4 || $[15] !== t5) {
|
|
1991
|
+
t6 = /*#__PURE__*/jsx(GuestLayout, {
|
|
1992
|
+
fullscreen: true,
|
|
1103
1993
|
children: /*#__PURE__*/jsx("div", {
|
|
1104
|
-
className: "
|
|
1105
|
-
children: /*#__PURE__*/
|
|
1106
|
-
className: "
|
|
1107
|
-
children:
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
})]
|
|
1994
|
+
className: "container-sm py-4",
|
|
1995
|
+
children: /*#__PURE__*/jsx("div", {
|
|
1996
|
+
className: "row justify-content-center",
|
|
1997
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
1998
|
+
className: "col-12 col-sm-8 col-md-6",
|
|
1999
|
+
children: [t4, t5]
|
|
2000
|
+
})
|
|
1112
2001
|
})
|
|
1113
2002
|
})
|
|
1114
|
-
})
|
|
1115
|
-
|
|
2003
|
+
});
|
|
2004
|
+
$[14] = t4;
|
|
2005
|
+
$[15] = t5;
|
|
2006
|
+
$[16] = t6;
|
|
2007
|
+
} else {
|
|
2008
|
+
t6 = $[16];
|
|
2009
|
+
}
|
|
2010
|
+
return t6;
|
|
1116
2011
|
}
|
|
1117
2012
|
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
extraRoutes = _resource$extraRoutes === void 0 ? [] : _resource$extraRoutes;
|
|
2013
|
+
function createResourceRoutes(resource, {
|
|
2014
|
+
route,
|
|
2015
|
+
componentsManager,
|
|
2016
|
+
pages = {}
|
|
2017
|
+
}) {
|
|
2018
|
+
const {
|
|
2019
|
+
id: resourceId,
|
|
2020
|
+
pages: resourcePages = {},
|
|
2021
|
+
extraRoutes = []
|
|
2022
|
+
} = resource;
|
|
1129
2023
|
|
|
1130
2024
|
// Load custom pages from resource
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
_ref3$delete = _ref3["delete"],
|
|
1154
|
-
resourceDeletePage = _ref3$delete === void 0 ? null : _ref3$delete,
|
|
1155
|
-
_ref3$duplicate = _ref3.duplicate,
|
|
1156
|
-
resourceDuplicatePage = _ref3$duplicate === void 0 ? null : _ref3$duplicate;
|
|
1157
|
-
var ResourceIndexComponent = componentsManager.getComponent(resourceIndexPage === null || resourceIndexPage === void 0 ? void 0 : resourceIndexPage.component) || componentsManager.getComponent(indexPage === null || indexPage === void 0 ? void 0 : indexPage.component) || ResourceIndexPage;
|
|
1158
|
-
var ResourceShowComponent = componentsManager.getComponent(resourceShowPage === null || resourceShowPage === void 0 ? void 0 : resourceShowPage.component) || componentsManager.getComponent(showPage === null || showPage === void 0 ? void 0 : showPage.component) || ResourceShowPage;
|
|
1159
|
-
var ResourceCreateComponent = componentsManager.getComponent(resourceCreatePage === null || resourceCreatePage === void 0 ? void 0 : resourceCreatePage.component) || componentsManager.getComponent(createPage === null || createPage === void 0 ? void 0 : createPage.component) || ResourceCreatePage;
|
|
1160
|
-
var ResourceEditComponent = componentsManager.getComponent(resourceEditPage === null || resourceEditPage === void 0 ? void 0 : resourceEditPage.component) || componentsManager.getComponent(editPage === null || editPage === void 0 ? void 0 : editPage.component) || ResourceEditPage;
|
|
1161
|
-
var ResourceDeleteComponent = componentsManager.getComponent(resourceDeletePage === null || resourceDeletePage === void 0 ? void 0 : resourceDeletePage.component) || componentsManager.getComponent(deletePage === null || deletePage === void 0 ? void 0 : deletePage.component) || ResourceDeletePage;
|
|
1162
|
-
var ResourceDuplicateComponent = componentsManager.getComponent(resourceDuplicatePage === null || resourceDuplicatePage === void 0 ? void 0 : resourceDuplicatePage.component) || componentsManager.getComponent(duplicatePage === null || duplicatePage === void 0 ? void 0 : duplicatePage.component) || ResourceDuplicatePage;
|
|
2025
|
+
const {
|
|
2026
|
+
index: indexPage = null,
|
|
2027
|
+
show: showPage = null,
|
|
2028
|
+
create: createPage = null,
|
|
2029
|
+
edit: editPage = null,
|
|
2030
|
+
delete: deletePage = null,
|
|
2031
|
+
duplicate: duplicatePage = null
|
|
2032
|
+
} = pages || {};
|
|
2033
|
+
const {
|
|
2034
|
+
index: resourceIndexPage = null,
|
|
2035
|
+
show: resourceShowPage = null,
|
|
2036
|
+
create: resourceCreatePage = null,
|
|
2037
|
+
edit: resourceEditPage = null,
|
|
2038
|
+
delete: resourceDeletePage = null,
|
|
2039
|
+
duplicate: resourceDuplicatePage = null
|
|
2040
|
+
} = resourcePages || {};
|
|
2041
|
+
const ResourceIndexComponent = componentsManager.getComponent(resourceIndexPage?.component) || componentsManager.getComponent(indexPage?.component) || ResourceIndexPage;
|
|
2042
|
+
const ResourceShowComponent = componentsManager.getComponent(resourceShowPage?.component) || componentsManager.getComponent(showPage?.component) || ResourceShowPage;
|
|
2043
|
+
const ResourceCreateComponent = componentsManager.getComponent(resourceCreatePage?.component) || componentsManager.getComponent(createPage?.component) || ResourceCreatePage;
|
|
2044
|
+
const ResourceEditComponent = componentsManager.getComponent(resourceEditPage?.component) || componentsManager.getComponent(editPage?.component) || ResourceEditPage;
|
|
2045
|
+
const ResourceDeleteComponent = componentsManager.getComponent(resourceDeletePage?.component) || componentsManager.getComponent(deletePage?.component) || ResourceDeletePage;
|
|
2046
|
+
const ResourceDuplicateComponent = componentsManager.getComponent(resourceDuplicatePage?.component) || componentsManager.getComponent(duplicatePage?.component) || ResourceDuplicatePage;
|
|
1163
2047
|
return [/*#__PURE__*/jsx(Route, {
|
|
1164
2048
|
path: route('resources.create', {
|
|
1165
2049
|
resource: resourceId
|
|
1166
2050
|
}),
|
|
1167
2051
|
exact: true,
|
|
1168
|
-
children:
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
}
|
|
1173
|
-
}, "".concat(resourceId, "-create")), /*#__PURE__*/jsx(Route, {
|
|
2052
|
+
children: () => /*#__PURE__*/jsx(ResourceCreateComponent, {
|
|
2053
|
+
resource: resource
|
|
2054
|
+
})
|
|
2055
|
+
}, `${resourceId}-create`), /*#__PURE__*/jsx(Route, {
|
|
1174
2056
|
path: route('resources.show', {
|
|
1175
2057
|
resource: resourceId,
|
|
1176
2058
|
id: ':id'
|
|
1177
2059
|
}),
|
|
1178
|
-
children:
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
}
|
|
1186
|
-
}, "".concat(resourceId, "-show")), /*#__PURE__*/jsx(Route, {
|
|
2060
|
+
children: ({
|
|
2061
|
+
id = null
|
|
2062
|
+
}) => /*#__PURE__*/jsx(ResourceShowComponent, {
|
|
2063
|
+
itemId: id,
|
|
2064
|
+
resource: resource
|
|
2065
|
+
})
|
|
2066
|
+
}, `${resourceId}-show`), /*#__PURE__*/jsx(Route, {
|
|
1187
2067
|
path: route('resources.edit', {
|
|
1188
2068
|
resource: resourceId,
|
|
1189
2069
|
id: ':id'
|
|
1190
2070
|
}),
|
|
1191
|
-
children:
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
}
|
|
1199
|
-
}, "".concat(resourceId, "-edit")), /*#__PURE__*/jsx(Route, {
|
|
2071
|
+
children: ({
|
|
2072
|
+
id = null
|
|
2073
|
+
}) => /*#__PURE__*/jsx(ResourceEditComponent, {
|
|
2074
|
+
itemId: id,
|
|
2075
|
+
resource: resource
|
|
2076
|
+
})
|
|
2077
|
+
}, `${resourceId}-edit`), /*#__PURE__*/jsx(Route, {
|
|
1200
2078
|
path: route('resources.delete', {
|
|
1201
2079
|
resource: resourceId,
|
|
1202
2080
|
id: ':id'
|
|
1203
2081
|
}),
|
|
1204
|
-
children:
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
}
|
|
1212
|
-
}, "".concat(resourceId, "-delete")), /*#__PURE__*/jsx(Route, {
|
|
2082
|
+
children: ({
|
|
2083
|
+
id = null
|
|
2084
|
+
}) => /*#__PURE__*/jsx(ResourceDeleteComponent, {
|
|
2085
|
+
itemId: id,
|
|
2086
|
+
resource: resource
|
|
2087
|
+
})
|
|
2088
|
+
}, `${resourceId}-delete`), /*#__PURE__*/jsx(Route, {
|
|
1213
2089
|
path: route('resources.duplicate', {
|
|
1214
2090
|
resource: resourceId,
|
|
1215
2091
|
id: ':id'
|
|
1216
2092
|
}),
|
|
1217
|
-
children:
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
var RouteComponent = componentsManager.getComponent(component);
|
|
2093
|
+
children: ({
|
|
2094
|
+
id = null
|
|
2095
|
+
}) => /*#__PURE__*/jsx(ResourceDuplicateComponent, {
|
|
2096
|
+
itemId: id,
|
|
2097
|
+
resource: resource
|
|
2098
|
+
})
|
|
2099
|
+
}, `${resourceId}-duplicate`), ...extraRoutes.map(({
|
|
2100
|
+
path,
|
|
2101
|
+
component,
|
|
2102
|
+
...pageProps
|
|
2103
|
+
}) => {
|
|
2104
|
+
const RouteComponent = componentsManager.getComponent(component);
|
|
1230
2105
|
return RouteComponent !== null ? /*#__PURE__*/jsx(Route, {
|
|
1231
2106
|
path: path,
|
|
1232
|
-
children:
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
})), [/*#__PURE__*/jsx(Route, {
|
|
2107
|
+
children: () => /*#__PURE__*/jsx(RouteComponent, {
|
|
2108
|
+
resource: resource,
|
|
2109
|
+
...pageProps
|
|
2110
|
+
})
|
|
2111
|
+
}, `route-${path}`) : null;
|
|
2112
|
+
}), /*#__PURE__*/jsx(Route, {
|
|
1239
2113
|
path: route('resources.index', {
|
|
1240
2114
|
resource: resourceId
|
|
1241
2115
|
}),
|
|
1242
|
-
children:
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
}
|
|
1247
|
-
}, "".concat(resourceId, "-index"))]);
|
|
2116
|
+
children: () => /*#__PURE__*/jsx(ResourceIndexComponent, {
|
|
2117
|
+
resource: resource
|
|
2118
|
+
})
|
|
2119
|
+
}, `${resourceId}-index`)];
|
|
1248
2120
|
}
|
|
1249
2121
|
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
2122
|
+
function PanneauRoutes(t0) {
|
|
2123
|
+
const $ = c(103);
|
|
2124
|
+
const {
|
|
2125
|
+
statusCode: t1
|
|
2126
|
+
} = t0;
|
|
2127
|
+
const initialStatusCode = t1 === undefined ? null : t1;
|
|
2128
|
+
const routes = useRoutes();
|
|
2129
|
+
const [pathname] = useLocation();
|
|
2130
|
+
let t2;
|
|
2131
|
+
if ($[0] !== initialStatusCode || $[1] !== pathname) {
|
|
2132
|
+
t2 = {
|
|
1260
2133
|
statusCode: initialStatusCode,
|
|
1261
|
-
pathname
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
2134
|
+
pathname
|
|
2135
|
+
};
|
|
2136
|
+
$[0] = initialStatusCode;
|
|
2137
|
+
$[1] = pathname;
|
|
2138
|
+
$[2] = t2;
|
|
2139
|
+
} else {
|
|
2140
|
+
t2 = $[2];
|
|
2141
|
+
}
|
|
2142
|
+
const [t3, setInitialRequest] = useState(t2);
|
|
2143
|
+
const {
|
|
2144
|
+
statusCode,
|
|
2145
|
+
pathname: lastPathname
|
|
2146
|
+
} = t3;
|
|
2147
|
+
const user = useUser();
|
|
2148
|
+
const route = useUrlGenerator();
|
|
2149
|
+
const resources = usePanneauResources();
|
|
2150
|
+
const componentsManager = usePagesComponentsManager();
|
|
2151
|
+
let t4;
|
|
2152
|
+
let t5;
|
|
2153
|
+
if ($[3] !== lastPathname || $[4] !== pathname) {
|
|
2154
|
+
t4 = () => {
|
|
2155
|
+
if (pathname !== lastPathname) {
|
|
2156
|
+
setInitialRequest({
|
|
2157
|
+
pathname,
|
|
2158
|
+
statusCode: null
|
|
2159
|
+
});
|
|
2160
|
+
}
|
|
2161
|
+
};
|
|
2162
|
+
t5 = [pathname, lastPathname];
|
|
2163
|
+
$[3] = lastPathname;
|
|
2164
|
+
$[4] = pathname;
|
|
2165
|
+
$[5] = t4;
|
|
2166
|
+
$[6] = t5;
|
|
2167
|
+
} else {
|
|
2168
|
+
t4 = $[5];
|
|
2169
|
+
t5 = $[6];
|
|
2170
|
+
}
|
|
2171
|
+
useEffect(t4, t5);
|
|
2172
|
+
const {
|
|
2173
|
+
pages: t6,
|
|
2174
|
+
routes: routesDefinition
|
|
2175
|
+
} = usePanneau();
|
|
2176
|
+
const pages = t6 === undefined ? null : t6;
|
|
2177
|
+
let t7;
|
|
2178
|
+
if ($[7] !== pages) {
|
|
2179
|
+
t7 = pages || {};
|
|
2180
|
+
$[7] = pages;
|
|
2181
|
+
$[8] = t7;
|
|
2182
|
+
} else {
|
|
2183
|
+
t7 = $[8];
|
|
2184
|
+
}
|
|
2185
|
+
let otherPages;
|
|
2186
|
+
let t10;
|
|
2187
|
+
let t11;
|
|
2188
|
+
let t12;
|
|
2189
|
+
let t13;
|
|
2190
|
+
let t14;
|
|
2191
|
+
let t15;
|
|
2192
|
+
let t16;
|
|
2193
|
+
let t17;
|
|
2194
|
+
let t8;
|
|
2195
|
+
let t9;
|
|
2196
|
+
if ($[9] !== t7) {
|
|
2197
|
+
({
|
|
2198
|
+
home: t8,
|
|
2199
|
+
login: t9,
|
|
2200
|
+
account: t10,
|
|
2201
|
+
error: t11,
|
|
2202
|
+
index: t12,
|
|
2203
|
+
show: t13,
|
|
2204
|
+
create: t14,
|
|
2205
|
+
edit: t15,
|
|
2206
|
+
delete: t16,
|
|
2207
|
+
duplicate: t17,
|
|
2208
|
+
...otherPages
|
|
2209
|
+
} = t7);
|
|
2210
|
+
$[9] = t7;
|
|
2211
|
+
$[10] = otherPages;
|
|
2212
|
+
$[11] = t10;
|
|
2213
|
+
$[12] = t11;
|
|
2214
|
+
$[13] = t12;
|
|
2215
|
+
$[14] = t13;
|
|
2216
|
+
$[15] = t14;
|
|
2217
|
+
$[16] = t15;
|
|
2218
|
+
$[17] = t16;
|
|
2219
|
+
$[18] = t17;
|
|
2220
|
+
$[19] = t8;
|
|
2221
|
+
$[20] = t9;
|
|
2222
|
+
} else {
|
|
2223
|
+
otherPages = $[10];
|
|
2224
|
+
t10 = $[11];
|
|
2225
|
+
t11 = $[12];
|
|
2226
|
+
t12 = $[13];
|
|
2227
|
+
t13 = $[14];
|
|
2228
|
+
t14 = $[15];
|
|
2229
|
+
t15 = $[16];
|
|
2230
|
+
t16 = $[17];
|
|
2231
|
+
t17 = $[18];
|
|
2232
|
+
t8 = $[19];
|
|
2233
|
+
t9 = $[20];
|
|
2234
|
+
}
|
|
2235
|
+
const homePage = t8 === undefined ? null : t8;
|
|
2236
|
+
const loginPage = t9 === undefined ? null : t9;
|
|
2237
|
+
const accountPage = t10 === undefined ? null : t10;
|
|
2238
|
+
const errorPage = t11 === undefined ? null : t11;
|
|
2239
|
+
let t18;
|
|
2240
|
+
if ($[21] !== routesDefinition) {
|
|
2241
|
+
t18 = Object.keys(routesDefinition).filter(_temp);
|
|
2242
|
+
$[21] = routesDefinition;
|
|
2243
|
+
$[22] = t18;
|
|
2244
|
+
} else {
|
|
2245
|
+
t18 = $[22];
|
|
2246
|
+
}
|
|
2247
|
+
let t19;
|
|
2248
|
+
if ($[23] !== routesDefinition || $[24] !== t18) {
|
|
2249
|
+
t19 = t18.filter(key_0 => {
|
|
2250
|
+
const routeDef = routesDefinition[key_0];
|
|
2251
|
+
return isObject(routeDef) && typeof routeDef.component !== "undefined" && typeof routeDef.path !== "undefined";
|
|
2252
|
+
});
|
|
2253
|
+
$[23] = routesDefinition;
|
|
2254
|
+
$[24] = t18;
|
|
2255
|
+
$[25] = t19;
|
|
2256
|
+
} else {
|
|
2257
|
+
t19 = $[25];
|
|
2258
|
+
}
|
|
2259
|
+
let t20;
|
|
2260
|
+
if ($[26] !== routesDefinition || $[27] !== t19) {
|
|
2261
|
+
t20 = t19.map(key_1 => routesDefinition[key_1]);
|
|
2262
|
+
$[26] = routesDefinition;
|
|
2263
|
+
$[27] = t19;
|
|
2264
|
+
$[28] = t20;
|
|
2265
|
+
} else {
|
|
2266
|
+
t20 = $[28];
|
|
2267
|
+
}
|
|
2268
|
+
let t21;
|
|
2269
|
+
if ($[29] !== otherPages) {
|
|
2270
|
+
t21 = Object.keys(otherPages);
|
|
2271
|
+
$[29] = otherPages;
|
|
2272
|
+
$[30] = t21;
|
|
2273
|
+
} else {
|
|
2274
|
+
t21 = $[30];
|
|
2275
|
+
}
|
|
2276
|
+
let t22;
|
|
2277
|
+
if ($[31] !== otherPages || $[32] !== t21) {
|
|
2278
|
+
t22 = t21.map(key_2 => otherPages[key_2]).filter(_temp2);
|
|
2279
|
+
$[31] = otherPages;
|
|
2280
|
+
$[32] = t21;
|
|
2281
|
+
$[33] = t22;
|
|
2282
|
+
} else {
|
|
2283
|
+
t22 = $[33];
|
|
2284
|
+
}
|
|
2285
|
+
let t23;
|
|
2286
|
+
if ($[34] !== t20 || $[35] !== t22) {
|
|
2287
|
+
t23 = [...t20, ...t22];
|
|
2288
|
+
$[34] = t20;
|
|
2289
|
+
$[35] = t22;
|
|
2290
|
+
$[36] = t23;
|
|
2291
|
+
} else {
|
|
2292
|
+
t23 = $[36];
|
|
2293
|
+
}
|
|
2294
|
+
const customRoutes = t23;
|
|
2295
|
+
let t24;
|
|
2296
|
+
if ($[37] !== componentsManager || $[38] !== homePage?.component) {
|
|
2297
|
+
t24 = componentsManager.getComponent(homePage?.component) || HomePage;
|
|
2298
|
+
$[37] = componentsManager;
|
|
2299
|
+
$[38] = homePage?.component;
|
|
2300
|
+
$[39] = t24;
|
|
2301
|
+
} else {
|
|
2302
|
+
t24 = $[39];
|
|
2303
|
+
}
|
|
2304
|
+
const HomeComponent = t24;
|
|
2305
|
+
let t25;
|
|
2306
|
+
if ($[40] !== componentsManager || $[41] !== loginPage?.component) {
|
|
2307
|
+
t25 = componentsManager.getComponent(loginPage?.component) || LoginPage;
|
|
2308
|
+
$[40] = componentsManager;
|
|
2309
|
+
$[41] = loginPage?.component;
|
|
2310
|
+
$[42] = t25;
|
|
2311
|
+
} else {
|
|
2312
|
+
t25 = $[42];
|
|
2313
|
+
}
|
|
2314
|
+
const LoginComponent = t25;
|
|
2315
|
+
let t26;
|
|
2316
|
+
if ($[43] !== accountPage?.component || $[44] !== componentsManager) {
|
|
2317
|
+
t26 = componentsManager.getComponent(accountPage?.component) || AccountPage;
|
|
2318
|
+
$[43] = accountPage?.component;
|
|
2319
|
+
$[44] = componentsManager;
|
|
2320
|
+
$[45] = t26;
|
|
2321
|
+
} else {
|
|
2322
|
+
t26 = $[45];
|
|
2323
|
+
}
|
|
2324
|
+
const AccountComponent = t26;
|
|
2325
|
+
let t27;
|
|
2326
|
+
if ($[46] !== componentsManager || $[47] !== errorPage?.component) {
|
|
2327
|
+
t27 = componentsManager.getComponent(errorPage?.component) || ErrorPage;
|
|
2328
|
+
$[46] = componentsManager;
|
|
2329
|
+
$[47] = errorPage?.component;
|
|
2330
|
+
$[48] = t27;
|
|
2331
|
+
} else {
|
|
2332
|
+
t27 = $[48];
|
|
2333
|
+
}
|
|
2334
|
+
const ErrorComponent = t27;
|
|
2335
|
+
if (statusCode !== null) {
|
|
2336
|
+
let t28;
|
|
2337
|
+
if ($[49] !== ErrorComponent || $[50] !== errorPage || $[51] !== statusCode) {
|
|
2338
|
+
t28 = /*#__PURE__*/jsx(ErrorComponent, {
|
|
2339
|
+
statusCode: statusCode,
|
|
2340
|
+
...errorPage
|
|
1277
2341
|
});
|
|
2342
|
+
$[49] = ErrorComponent;
|
|
2343
|
+
$[50] = errorPage;
|
|
2344
|
+
$[51] = statusCode;
|
|
2345
|
+
$[52] = t28;
|
|
2346
|
+
} else {
|
|
2347
|
+
t28 = $[52];
|
|
1278
2348
|
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
// Custom Pages
|
|
1282
|
-
var _usePanneau = usePanneau(),
|
|
1283
|
-
_usePanneau$pages = _usePanneau.pages,
|
|
1284
|
-
pages = _usePanneau$pages === void 0 ? null : _usePanneau$pages,
|
|
1285
|
-
routesDefinition = _usePanneau.routes;
|
|
1286
|
-
var _ref2 = pages || {},
|
|
1287
|
-
_ref2$home = _ref2.home,
|
|
1288
|
-
homePage = _ref2$home === void 0 ? null : _ref2$home,
|
|
1289
|
-
_ref2$login = _ref2.login,
|
|
1290
|
-
loginPage = _ref2$login === void 0 ? null : _ref2$login,
|
|
1291
|
-
_ref2$account = _ref2.account,
|
|
1292
|
-
accountPage = _ref2$account === void 0 ? null : _ref2$account,
|
|
1293
|
-
_ref2$error = _ref2.error,
|
|
1294
|
-
errorPage = _ref2$error === void 0 ? null : _ref2$error;
|
|
1295
|
-
_ref2.index;
|
|
1296
|
-
_ref2.show;
|
|
1297
|
-
_ref2.create;
|
|
1298
|
-
_ref2.edit;
|
|
1299
|
-
_ref2["delete"];
|
|
1300
|
-
_ref2.duplicate;
|
|
1301
|
-
var otherPages = _objectWithoutProperties(_ref2, _excluded);
|
|
1302
|
-
var customRoutes = useMemo(function () {
|
|
1303
|
-
return [].concat(_toConsumableArray(Object.keys(routesDefinition).filter(function (key) {
|
|
1304
|
-
return key.match(/^(resources\.|auth\.)/) === null && key !== 'home' && key !== 'account';
|
|
1305
|
-
}).filter(function (key) {
|
|
1306
|
-
var routeDef = routesDefinition[key];
|
|
1307
|
-
return isObject(routeDef) && typeof routeDef.component !== 'undefined' && typeof routeDef.path !== 'undefined';
|
|
1308
|
-
}).map(function (key) {
|
|
1309
|
-
return routesDefinition[key];
|
|
1310
|
-
})), _toConsumableArray(Object.keys(otherPages).map(function (key) {
|
|
1311
|
-
return otherPages[key];
|
|
1312
|
-
}).filter(function (_ref3) {
|
|
1313
|
-
var _ref3$path = _ref3.path,
|
|
1314
|
-
path = _ref3$path === void 0 ? null : _ref3$path,
|
|
1315
|
-
_ref3$route = _ref3.route,
|
|
1316
|
-
pageRoute = _ref3$route === void 0 ? null : _ref3$route;
|
|
1317
|
-
return path !== null || pageRoute !== null;
|
|
1318
|
-
})));
|
|
1319
|
-
}, [routesDefinition, otherPages]);
|
|
1320
|
-
var HomeComponent = componentsManager.getComponent(homePage === null || homePage === void 0 ? void 0 : homePage.component) || HomePage;
|
|
1321
|
-
var LoginComponent = componentsManager.getComponent(loginPage === null || loginPage === void 0 ? void 0 : loginPage.component) || LoginPage;
|
|
1322
|
-
var AccountComponent = componentsManager.getComponent(accountPage === null || accountPage === void 0 ? void 0 : accountPage.component) || AccountPage;
|
|
1323
|
-
var ErrorComponent = componentsManager.getComponent(errorPage === null || errorPage === void 0 ? void 0 : errorPage.component) || ErrorPage;
|
|
1324
|
-
|
|
1325
|
-
// If there is an error status code
|
|
1326
|
-
if (statusCode !== null) {
|
|
1327
|
-
return /*#__PURE__*/jsx(ErrorComponent, _objectSpread({
|
|
1328
|
-
statusCode: statusCode
|
|
1329
|
-
}, errorPage));
|
|
2349
|
+
return t28;
|
|
1330
2350
|
}
|
|
1331
|
-
|
|
1332
|
-
// If user is unauthenticated
|
|
1333
2351
|
if (user === null) {
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
2352
|
+
const t28 = routes["auth.login"];
|
|
2353
|
+
let t29;
|
|
2354
|
+
if ($[53] !== LoginComponent || $[54] !== loginPage) {
|
|
2355
|
+
t29 = /*#__PURE__*/jsx(LoginComponent, {
|
|
2356
|
+
...loginPage
|
|
2357
|
+
});
|
|
2358
|
+
$[53] = LoginComponent;
|
|
2359
|
+
$[54] = loginPage;
|
|
2360
|
+
$[55] = t29;
|
|
2361
|
+
} else {
|
|
2362
|
+
t29 = $[55];
|
|
2363
|
+
}
|
|
2364
|
+
let t30;
|
|
2365
|
+
if ($[56] !== t28 || $[57] !== t29) {
|
|
2366
|
+
t30 = /*#__PURE__*/jsx(Route, {
|
|
2367
|
+
path: t28,
|
|
2368
|
+
children: t29
|
|
2369
|
+
});
|
|
2370
|
+
$[56] = t28;
|
|
2371
|
+
$[57] = t29;
|
|
2372
|
+
$[58] = t30;
|
|
2373
|
+
} else {
|
|
2374
|
+
t30 = $[58];
|
|
2375
|
+
}
|
|
2376
|
+
let t31;
|
|
2377
|
+
if ($[59] !== route) {
|
|
2378
|
+
t31 = route("auth.login");
|
|
2379
|
+
$[59] = route;
|
|
2380
|
+
$[60] = t31;
|
|
2381
|
+
} else {
|
|
2382
|
+
t31 = $[60];
|
|
2383
|
+
}
|
|
2384
|
+
const t32 = `${t31}?next=${encodeURIComponent(pathname)}`;
|
|
2385
|
+
let t33;
|
|
2386
|
+
if ($[61] !== t32) {
|
|
2387
|
+
t33 = /*#__PURE__*/jsx(Route, {
|
|
1339
2388
|
children: /*#__PURE__*/jsx(Redirect, {
|
|
1340
|
-
to:
|
|
2389
|
+
to: t32
|
|
1341
2390
|
})
|
|
1342
|
-
})
|
|
1343
|
-
|
|
2391
|
+
});
|
|
2392
|
+
$[61] = t32;
|
|
2393
|
+
$[62] = t33;
|
|
2394
|
+
} else {
|
|
2395
|
+
t33 = $[62];
|
|
2396
|
+
}
|
|
2397
|
+
let t34;
|
|
2398
|
+
if ($[63] !== t30 || $[64] !== t33) {
|
|
2399
|
+
t34 = /*#__PURE__*/jsxs(Switch, {
|
|
2400
|
+
children: [t30, t33]
|
|
2401
|
+
});
|
|
2402
|
+
$[63] = t30;
|
|
2403
|
+
$[64] = t33;
|
|
2404
|
+
$[65] = t34;
|
|
2405
|
+
} else {
|
|
2406
|
+
t34 = $[65];
|
|
2407
|
+
}
|
|
2408
|
+
return t34;
|
|
1344
2409
|
}
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
path: routes['auth.login'],
|
|
2410
|
+
let t28;
|
|
2411
|
+
if ($[66] !== routes || $[67] !== user) {
|
|
2412
|
+
t28 = user !== null ? /*#__PURE__*/jsx(Route, {
|
|
2413
|
+
path: routes["auth.login"],
|
|
1350
2414
|
children: /*#__PURE__*/jsx(Redirect, {
|
|
1351
2415
|
to: routes.home,
|
|
1352
2416
|
replace: true
|
|
1353
2417
|
})
|
|
1354
|
-
}) : null
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
2418
|
+
}) : null;
|
|
2419
|
+
$[66] = routes;
|
|
2420
|
+
$[67] = user;
|
|
2421
|
+
$[68] = t28;
|
|
2422
|
+
} else {
|
|
2423
|
+
t28 = $[68];
|
|
2424
|
+
}
|
|
2425
|
+
let t29;
|
|
2426
|
+
if ($[69] !== componentsManager || $[70] !== pages || $[71] !== resources || $[72] !== route) {
|
|
2427
|
+
let t30;
|
|
2428
|
+
if ($[74] !== componentsManager || $[75] !== pages || $[76] !== route) {
|
|
2429
|
+
t30 = resource => {
|
|
2430
|
+
const {
|
|
2431
|
+
id: resourceId
|
|
2432
|
+
} = resource || {};
|
|
2433
|
+
return /*#__PURE__*/jsx(Fragment$1, {
|
|
2434
|
+
children: createResourceRoutes(resource, {
|
|
2435
|
+
route,
|
|
2436
|
+
componentsManager,
|
|
2437
|
+
pages
|
|
2438
|
+
})
|
|
2439
|
+
}, `resource-${resourceId}`);
|
|
2440
|
+
};
|
|
2441
|
+
$[74] = componentsManager;
|
|
2442
|
+
$[75] = pages;
|
|
2443
|
+
$[76] = route;
|
|
2444
|
+
$[77] = t30;
|
|
2445
|
+
} else {
|
|
2446
|
+
t30 = $[77];
|
|
2447
|
+
}
|
|
2448
|
+
t29 = resources.map(t30);
|
|
2449
|
+
$[69] = componentsManager;
|
|
2450
|
+
$[70] = pages;
|
|
2451
|
+
$[71] = resources;
|
|
2452
|
+
$[72] = route;
|
|
2453
|
+
$[73] = t29;
|
|
2454
|
+
} else {
|
|
2455
|
+
t29 = $[73];
|
|
2456
|
+
}
|
|
2457
|
+
let t30;
|
|
2458
|
+
if ($[78] !== AccountComponent || $[79] !== accountPage) {
|
|
2459
|
+
t30 = /*#__PURE__*/jsx(AccountComponent, {
|
|
2460
|
+
...accountPage
|
|
2461
|
+
});
|
|
2462
|
+
$[78] = AccountComponent;
|
|
2463
|
+
$[79] = accountPage;
|
|
2464
|
+
$[80] = t30;
|
|
2465
|
+
} else {
|
|
2466
|
+
t30 = $[80];
|
|
2467
|
+
}
|
|
2468
|
+
let t31;
|
|
2469
|
+
if ($[81] !== routes.account || $[82] !== t30) {
|
|
2470
|
+
t31 = /*#__PURE__*/jsx(Route, {
|
|
1365
2471
|
path: routes.account,
|
|
1366
|
-
children:
|
|
1367
|
-
})
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
2472
|
+
children: t30
|
|
2473
|
+
});
|
|
2474
|
+
$[81] = routes.account;
|
|
2475
|
+
$[82] = t30;
|
|
2476
|
+
$[83] = t31;
|
|
2477
|
+
} else {
|
|
2478
|
+
t31 = $[83];
|
|
2479
|
+
}
|
|
2480
|
+
let t32;
|
|
2481
|
+
if ($[84] !== componentsManager || $[85] !== customRoutes || $[86] !== routes) {
|
|
2482
|
+
t32 = customRoutes.map(t33 => {
|
|
2483
|
+
const {
|
|
2484
|
+
path: t34,
|
|
2485
|
+
route: t35,
|
|
2486
|
+
component,
|
|
2487
|
+
...props
|
|
2488
|
+
} = t33;
|
|
2489
|
+
const path_0 = t34 === undefined ? null : t34;
|
|
2490
|
+
const pageRoute_0 = t35 === undefined ? null : t35;
|
|
2491
|
+
const PageComponent = componentsManager.getComponent(component);
|
|
2492
|
+
const finalPath = path_0 || routes[pageRoute_0];
|
|
1376
2493
|
return PageComponent !== null ? /*#__PURE__*/jsx(Route, {
|
|
1377
|
-
path:
|
|
1378
|
-
children: /*#__PURE__*/jsx(PageComponent,
|
|
1379
|
-
|
|
1380
|
-
|
|
2494
|
+
path: path_0 || routes[pageRoute_0],
|
|
2495
|
+
children: /*#__PURE__*/jsx(PageComponent, {
|
|
2496
|
+
...props
|
|
2497
|
+
})
|
|
2498
|
+
}, `custom-route-${finalPath}`) : null;
|
|
2499
|
+
});
|
|
2500
|
+
$[84] = componentsManager;
|
|
2501
|
+
$[85] = customRoutes;
|
|
2502
|
+
$[86] = routes;
|
|
2503
|
+
$[87] = t32;
|
|
2504
|
+
} else {
|
|
2505
|
+
t32 = $[87];
|
|
2506
|
+
}
|
|
2507
|
+
let t33;
|
|
2508
|
+
if ($[88] !== HomeComponent || $[89] !== homePage) {
|
|
2509
|
+
t33 = /*#__PURE__*/jsx(HomeComponent, {
|
|
2510
|
+
...homePage
|
|
2511
|
+
});
|
|
2512
|
+
$[88] = HomeComponent;
|
|
2513
|
+
$[89] = homePage;
|
|
2514
|
+
$[90] = t33;
|
|
2515
|
+
} else {
|
|
2516
|
+
t33 = $[90];
|
|
2517
|
+
}
|
|
2518
|
+
let t34;
|
|
2519
|
+
if ($[91] !== routes.home || $[92] !== t33) {
|
|
2520
|
+
t34 = /*#__PURE__*/jsx(Route, {
|
|
1381
2521
|
path: routes.home,
|
|
1382
|
-
children:
|
|
1383
|
-
})
|
|
2522
|
+
children: t33
|
|
2523
|
+
});
|
|
2524
|
+
$[91] = routes.home;
|
|
2525
|
+
$[92] = t33;
|
|
2526
|
+
$[93] = t34;
|
|
2527
|
+
} else {
|
|
2528
|
+
t34 = $[93];
|
|
2529
|
+
}
|
|
2530
|
+
let t35;
|
|
2531
|
+
if ($[94] !== ErrorComponent) {
|
|
2532
|
+
t35 = /*#__PURE__*/jsx(Route, {
|
|
1384
2533
|
children: /*#__PURE__*/jsx(ErrorComponent, {})
|
|
1385
|
-
})
|
|
1386
|
-
|
|
2534
|
+
});
|
|
2535
|
+
$[94] = ErrorComponent;
|
|
2536
|
+
$[95] = t35;
|
|
2537
|
+
} else {
|
|
2538
|
+
t35 = $[95];
|
|
2539
|
+
}
|
|
2540
|
+
let t36;
|
|
2541
|
+
if ($[96] !== t28 || $[97] !== t29 || $[98] !== t31 || $[99] !== t32 || $[100] !== t34 || $[101] !== t35) {
|
|
2542
|
+
t36 = /*#__PURE__*/jsxs(Switch, {
|
|
2543
|
+
children: [t28, t29, t31, t32, t34, t35]
|
|
2544
|
+
});
|
|
2545
|
+
$[96] = t28;
|
|
2546
|
+
$[97] = t29;
|
|
2547
|
+
$[98] = t31;
|
|
2548
|
+
$[99] = t32;
|
|
2549
|
+
$[100] = t34;
|
|
2550
|
+
$[101] = t35;
|
|
2551
|
+
$[102] = t36;
|
|
2552
|
+
} else {
|
|
2553
|
+
t36 = $[102];
|
|
2554
|
+
}
|
|
2555
|
+
return t36;
|
|
2556
|
+
}
|
|
2557
|
+
function _temp2(t0) {
|
|
2558
|
+
const {
|
|
2559
|
+
path: t1,
|
|
2560
|
+
route: t2
|
|
2561
|
+
} = t0;
|
|
2562
|
+
const path = t1 === undefined ? null : t1;
|
|
2563
|
+
const pageRoute = t2 === undefined ? null : t2;
|
|
2564
|
+
return path !== null || pageRoute !== null;
|
|
2565
|
+
}
|
|
2566
|
+
function _temp(key) {
|
|
2567
|
+
return key.match(/^(resources\.|auth\.)/) === null && key !== "home" && key !== "account";
|
|
1387
2568
|
}
|
|
1388
2569
|
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
function Container(
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
return _objectSpread(_objectSpread({}, allResourceMessages), {}, _defineProperty({}, "resources.".concat(id, ".").concat(key), resourceMessages[key]));
|
|
1435
|
-
}, {}));
|
|
1436
|
-
}, {}));
|
|
2570
|
+
const pathToRegexpParser = createPathToRegexpParser();
|
|
2571
|
+
const DEFAULT_ROUTES = {};
|
|
2572
|
+
const DEFAULT_LOCALES = [];
|
|
2573
|
+
function Container({
|
|
2574
|
+
definition,
|
|
2575
|
+
components = null,
|
|
2576
|
+
user = null,
|
|
2577
|
+
memoryRouter = false,
|
|
2578
|
+
baseUrl = null,
|
|
2579
|
+
uppy = null,
|
|
2580
|
+
statusCode = null
|
|
2581
|
+
}) {
|
|
2582
|
+
const {
|
|
2583
|
+
intl: {
|
|
2584
|
+
locale = 'en',
|
|
2585
|
+
locales = DEFAULT_LOCALES
|
|
2586
|
+
} = {},
|
|
2587
|
+
routes = DEFAULT_ROUTES,
|
|
2588
|
+
settings: {
|
|
2589
|
+
memoryRouter: usesMemoryRouter = false
|
|
2590
|
+
} = {}
|
|
2591
|
+
} = definition || {};
|
|
2592
|
+
const isMemoryRouter = memoryRouter || usesMemoryRouter || false;
|
|
2593
|
+
const extraMessages = useMemo(() => {
|
|
2594
|
+
const {
|
|
2595
|
+
intl: {
|
|
2596
|
+
messages = null
|
|
2597
|
+
} = {},
|
|
2598
|
+
resources = []
|
|
2599
|
+
} = definition;
|
|
2600
|
+
return {
|
|
2601
|
+
...messages,
|
|
2602
|
+
...resources.reduce((allMessages, {
|
|
2603
|
+
id,
|
|
2604
|
+
intl: {
|
|
2605
|
+
messages: resourceMessages = {}
|
|
2606
|
+
} = {}
|
|
2607
|
+
}) => ({
|
|
2608
|
+
...allMessages,
|
|
2609
|
+
...Object.keys(resourceMessages).reduce((allResourceMessages, key) => ({
|
|
2610
|
+
...allResourceMessages,
|
|
2611
|
+
[`resources.${id}.${key}`]: resourceMessages[key]
|
|
2612
|
+
}), {})
|
|
2613
|
+
}), {})
|
|
2614
|
+
};
|
|
1437
2615
|
}, [definition]);
|
|
1438
|
-
|
|
2616
|
+
const onUnauthorized = useCallback(() => {
|
|
1439
2617
|
window.location.href = baseUrl || '/';
|
|
1440
2618
|
}, [baseUrl]);
|
|
1441
|
-
|
|
2619
|
+
const onLogout = useCallback(() => {
|
|
1442
2620
|
window.location.reload();
|
|
1443
2621
|
}, []);
|
|
1444
|
-
|
|
1445
|
-
memoryLocationHook
|
|
1446
|
-
memorySearchHook
|
|
2622
|
+
const {
|
|
2623
|
+
hook: memoryLocationHook,
|
|
2624
|
+
searchHook: memorySearchHook
|
|
2625
|
+
} = useMemoryRouter();
|
|
1447
2626
|
return /*#__PURE__*/jsx(Router, {
|
|
1448
2627
|
hook: isMemoryRouter ? memoryLocationHook : undefined,
|
|
1449
2628
|
searchHook: isMemoryRouter ? memorySearchHook : undefined,
|
|
@@ -1454,7 +2633,8 @@ function Container(_ref) {
|
|
|
1454
2633
|
extraMessages: extraMessages,
|
|
1455
2634
|
children: /*#__PURE__*/jsx(PanneauProvider, {
|
|
1456
2635
|
definition: definition,
|
|
1457
|
-
children: /*#__PURE__*/jsx(UppyProvider,
|
|
2636
|
+
children: /*#__PURE__*/jsx(UppyProvider, {
|
|
2637
|
+
...uppy,
|
|
1458
2638
|
children: /*#__PURE__*/jsx(RoutesProvider, {
|
|
1459
2639
|
routes: routes,
|
|
1460
2640
|
children: /*#__PURE__*/jsx(FieldsProvider, {
|
|
@@ -1490,14 +2670,25 @@ function Container(_ref) {
|
|
|
1490
2670
|
})
|
|
1491
2671
|
})
|
|
1492
2672
|
})
|
|
1493
|
-
})
|
|
2673
|
+
})
|
|
1494
2674
|
})
|
|
1495
2675
|
})
|
|
1496
2676
|
});
|
|
1497
2677
|
}
|
|
1498
2678
|
|
|
1499
2679
|
function ResourceFilters(props) {
|
|
1500
|
-
|
|
2680
|
+
const $ = c(2);
|
|
2681
|
+
let t0;
|
|
2682
|
+
if ($[0] !== props) {
|
|
2683
|
+
t0 = /*#__PURE__*/jsx(Filters, {
|
|
2684
|
+
...props
|
|
2685
|
+
});
|
|
2686
|
+
$[0] = props;
|
|
2687
|
+
$[1] = t0;
|
|
2688
|
+
} else {
|
|
2689
|
+
t0 = $[1];
|
|
2690
|
+
}
|
|
2691
|
+
return t0;
|
|
1501
2692
|
}
|
|
1502
2693
|
|
|
1503
2694
|
export { GuestLayout, MainLayout, PageHeader, ResourceFilters, ResourceFormWrapper as ResourceForm, ResourceItemsList, Container as default };
|