@gen-epix/ui-client-common 4.5.1 → 4.6.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/dist/@types/mui.d.ts +13 -11
- package/dist/_chunks/ApplicationFooter.js +32 -23
- package/dist/_chunks/ApplicationFooter.js.map +1 -1
- package/dist/_chunks/Breadcrumbs.js +1 -2
- package/dist/_chunks/CrudPage.js +221 -226
- package/dist/_chunks/CrudPage.js.map +1 -1
- package/dist/_chunks/GeoFilter.js +1 -2
- package/dist/_chunks/GeoFilter.js.map +1 -1
- package/dist/_chunks/Notifications.js +1 -2
- package/dist/_chunks/OutageList.js +1 -2
- package/dist/_chunks/OutageList.js.map +1 -1
- package/dist/_chunks/OutageUtil.js +3 -6
- package/dist/_chunks/OutageUtil.js.map +1 -1
- package/dist/_chunks/QueryClientProvider.js +1 -2
- package/dist/_chunks/QueryClientProvider.js.map +1 -1
- package/dist/_chunks/QueryClientService.js +6 -8
- package/dist/_chunks/QueryClientService.js.map +1 -1
- package/dist/_chunks/Reflect.js +1 -2
- package/dist/_chunks/Table.js +5 -10
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/TableUtil.js +2 -4
- package/dist/_chunks/TableUtil.js.map +1 -1
- package/dist/_chunks/TextFilter.js +4 -8
- package/dist/_chunks/TextFilter.js.map +1 -1
- package/dist/_chunks/UserInvitationsAdminPage.js +1 -2
- package/dist/_chunks/UserManagerUtil.js +2 -4
- package/dist/_chunks/UserManagerUtil.js.map +1 -1
- package/dist/_chunks/_baseAssignValue.js +1 -2
- package/dist/_chunks/_baseFlatten.js +1 -2
- package/dist/_chunks/_baseGet.js +1 -2
- package/dist/_chunks/_baseIteratee.js +1 -2
- package/dist/_chunks/_baseUnset.js +1 -2
- package/dist/_chunks/_cacheHas.js +1 -2
- package/dist/_chunks/_setToString.js +1 -2
- package/dist/_chunks/decorate.js +1 -2
- package/dist/_chunks/decorateParam.js +1 -2
- package/dist/_chunks/format.js +27 -54
- package/dist/_chunks/format.js.map +1 -1
- package/dist/_chunks/isArrayLike.js +1 -2
- package/dist/_chunks/isObject.js +1 -2
- package/dist/_chunks/isSymbol.js +1 -2
- package/dist/_chunks/last.js +1 -2
- package/dist/_chunks/middleware.js +2 -3
- package/dist/_chunks/middleware.js.map +1 -1
- package/dist/_chunks/omit.js +1 -2
- package/dist/_chunks/query.js +8 -15
- package/dist/_chunks/query.js.map +1 -1
- package/dist/_chunks/react.js +2 -3
- package/dist/_chunks/react.js.map +1 -1
- package/dist/_chunks/rolldown-runtime.js +2 -3
- package/dist/_chunks/tableStore.js +171 -171
- package/dist/_chunks/tableStore.js.map +1 -1
- package/dist/_chunks/toDate.js +8 -14
- package/dist/_chunks/toDate.js.map +1 -1
- package/dist/_chunks/uniq.js +1 -2
- package/dist/_chunks/useColumnsMenu.js +3 -6
- package/dist/_chunks/useColumnsMenu.js.map +1 -1
- package/dist/_chunks/useMutation.js +2 -4
- package/dist/_chunks/useMutation.js.map +1 -1
- package/dist/_chunks/useQueryMemo.js +8 -14
- package/dist/_chunks/useQueryMemo.js.map +1 -1
- package/dist/_chunks/vanilla.js +1 -2
- package/dist/_chunks/vanilla.js.map +1 -1
- package/dist/_chunks/yup.js +2 -4
- package/dist/_chunks/yup.js.map +1 -1
- package/dist/classes/TableEventBus/index.js +1 -2
- package/dist/classes/abstracts/FilterAbstract/index.js +1 -2
- package/dist/classes/abstracts/FilterAbstract/index.js.map +1 -1
- package/dist/classes/services/AuthenticationService/index.js +0 -1
- package/dist/classes/services/AuthenticationService/index.js.map +1 -1
- package/dist/classes/services/AuthorizationService/index.js +1 -2
- package/dist/classes/services/BackendVersionService/index.js +1 -2
- package/dist/classes/services/BreadcrumbService/index.js +1 -2
- package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
- package/dist/classes/services/EmotionCacheService/index.js +1 -2
- package/dist/classes/services/FeatureFlagsService/index.js +1 -2
- package/dist/classes/services/I18nService/index.js +1 -2
- package/dist/classes/services/InactivityService/index.js +1 -2
- package/dist/classes/services/InactivityService/index.js.map +1 -1
- package/dist/classes/services/LogService/index.js +1 -2
- package/dist/classes/services/NavigationHistoryService/index.js +1 -2
- package/dist/classes/services/NotificationService/index.js +1 -2
- package/dist/classes/services/PageEventBusService/index.js +1 -2
- package/dist/classes/services/RouterService/index.js +1 -2
- package/dist/classes/services/UserSettingsService/index.js +1 -2
- package/dist/components/app/App/index.js +1 -2
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +1 -2
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +1 -2
- package/dist/components/app/AuthenticationWrapper/index.js +1 -2
- package/dist/components/app/AuthorizationWrapper/index.js +1 -2
- package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
- package/dist/components/app/RouterRoot/index.js +1 -2
- package/dist/components/epi/EpiContactDetailsDialog/index.js +1 -2
- package/dist/components/filters/BooleanFilterField/index.js +1 -2
- package/dist/components/filters/DateFilterField/index.js +1 -2
- package/dist/components/filters/GeoFilterField/index.js +1 -2
- package/dist/components/filters/MultiSelectFilterField/index.js +1 -2
- package/dist/components/filters/NumberRangeFilterField/index.js +1 -2
- package/dist/components/filters/TextFilterField/index.js +1 -2
- package/dist/components/ui/ApplicationBar/ApplicationBar.d.ts +4 -0
- package/dist/components/ui/ApplicationBar/ApplicationBarActions.d.ts +5 -0
- package/dist/components/ui/ApplicationBar/ApplicationBarNavigationMenu.d.ts +6 -0
- package/dist/components/ui/ApplicationBar/index.js +109 -95
- package/dist/components/ui/ApplicationBar/index.js.map +1 -1
- package/dist/components/ui/ApplicationFooter/ApplicationFooter.d.ts +3 -0
- package/dist/components/ui/ApplicationFooter/ApplicationFooterLink.d.ts +3 -0
- package/dist/components/ui/ApplicationFooter/ApplicationFooterLinkSection.d.ts +4 -0
- package/dist/components/ui/ConsentDialog/index.js +1 -2
- package/dist/components/ui/GenericErrorMessage/index.js +1 -2
- package/dist/components/ui/LicensesDialog/index.js +1 -2
- package/dist/components/ui/MyPermissionsDialog/index.js +1 -2
- package/dist/components/ui/NavLink/index.js +1 -2
- package/dist/components/ui/OrganizationSwitcherDialog/index.js +1 -2
- package/dist/components/ui/OutagesDialog/index.js +1 -2
- package/dist/components/ui/PageContainer/index.js +1 -2
- package/dist/components/ui/ResponseHandler/index.js +1 -2
- package/dist/components/ui/Sidebar/index.js +1 -2
- package/dist/components/ui/UserFeedbackDialog/index.js +1 -2
- package/dist/components/ui/UserInactivityConfirmation/index.js +1 -2
- package/dist/constants/api.constants.js +1 -2
- package/dist/constants/config.constants.js +1 -2
- package/dist/constants/query.constants.js +1 -2
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +1 -2
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js +1 -2
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +1 -2
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +1 -2
- package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js +1 -2
- package/dist/dataHooks/useOrganizationsQuery/index.js +1 -2
- package/dist/dataHooks/useUsersQuery/index.js +1 -2
- package/dist/hoc/withPermissions/index.js +1 -2
- package/dist/hooks/useConfig/index.js +1 -2
- package/dist/hooks/useCreateMutation/index.js +1 -2
- package/dist/hooks/useDeleteMutation/index.js +1 -2
- package/dist/hooks/useEditMutation/index.js +37 -42
- package/dist/hooks/useEditMutation/index.js.map +1 -1
- package/dist/hooks/useEditMutation/useEditMutation.d.ts +1 -2
- package/dist/hooks/useInitializeTableStore/index.js +1 -2
- package/dist/hooks/useItemQuery/index.js +1 -2
- package/dist/hooks/useUpdateBreadcrumb/index.js +1 -2
- package/dist/hooks/useUpdateDocumentTitle/index.js +1 -2
- package/dist/models/admin.models.js +1 -2
- package/dist/models/admin.models.js.map +1 -1
- package/dist/models/table.models.js +1 -2
- package/dist/models/table.models.js.map +1 -1
- package/dist/pages/AcceptInvitationPage/index.js +1 -2
- package/dist/pages/AdminPage/index.js +1 -2
- package/dist/pages/ChooseIdentityProviderPage/index.js +1 -2
- package/dist/pages/ErrorPage/index.js +1 -2
- package/dist/pages/IdentifierIssuersAdminPage/index.js +1 -2
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +1 -2
- package/dist/pages/OrganizationContactsAdminPage/index.js +1 -2
- package/dist/pages/OrganizationSitesAdminPage/index.js +1 -2
- package/dist/pages/OrganizationsAdminPage/index.js +1 -2
- package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
- package/dist/pages/OutagesAdminPage/index.js +1 -2
- package/dist/pages/PostLoginPage/index.js +2 -3
- package/dist/pages/PostLoginPage/index.js.map +1 -1
- package/dist/pages/PostLogoutPage/index.js +1 -2
- package/dist/pages/RouterErrorPage/index.js +1 -2
- package/dist/pages/UsersAdminPage/index.js +1 -2
- package/dist/routes/index.js +1 -2
- package/dist/setup/setup.js +1 -2
- package/dist/stores/oidcStore/index.js +1 -2
- package/dist/stores/outagesStore/index.js +1 -2
- package/dist/theme/demoTheme/index.js +16 -9
- package/dist/theme/demoTheme/index.js.map +1 -1
- package/dist/utils/AxiosUtil/index.js +1 -2
- package/dist/utils/DataHookUtil/index.js +1 -2
- package/dist/utils/DependencyContainerUtil/index.js +0 -1
- package/dist/utils/LoadableUtil/index.js +1 -2
- package/dist/utils/MenuDataUtil/index.js +1 -2
- package/dist/utils/NotificationUtil/index.js +1 -2
- package/dist/utils/StandardConfigUtil/index.js +1 -2
- package/dist/utils/TimeUtil/index.js +1 -2
- package/dist/utils/UserUtil/index.js +1 -2
- package/package.json +25 -29
- package/dist/models/theme.models.d.ts +0 -20
- package/dist/models/theme.models.js +0 -0
package/dist/_chunks/CrudPage.js
CHANGED
|
@@ -32,7 +32,7 @@ import { withDialog as M } from "@gen-epix/ui-core-components/hoc/withDialog";
|
|
|
32
32
|
import N from "@mui/icons-material/Save";
|
|
33
33
|
import { GenericForm as me } from "@gen-epix/ui-core-form/components/helpers/GenericForm";
|
|
34
34
|
import { FormUtil as he } from "@gen-epix/ui-core-form/utils/FormUtil";
|
|
35
|
-
|
|
35
|
+
// src/pages/CrudPage/CrudPageEditDialog.tsx
|
|
36
36
|
var ge = /* @__PURE__ */ e(n(), 1), _e = M(({ createItemDialogTitle: e, defaultNewItem: t, formFieldDefinitions: n, getFormValuesFromItem: r, getName: i, onActionsChange: a, onChange: o, onClose: s, onSave: c, onTitleChange: l, openProps: u, schema: ee }) => {
|
|
37
37
|
let { t: f } = le(), p = T(), te = E(() => typeof n == "function" ? n(u.item) : n, [n, u.item]), [m, ne] = D(te);
|
|
38
38
|
w(() => {
|
|
@@ -168,54 +168,54 @@ var ge = /* @__PURE__ */ e(n(), 1), _e = M(({ createItemDialogTitle: e, defaultN
|
|
|
168
168
|
fullWidth: !0,
|
|
169
169
|
maxWidth: "lg",
|
|
170
170
|
testId: "CrudPageDeleteDialog"
|
|
171
|
-
}),
|
|
172
|
-
let { t:
|
|
171
|
+
}), P = ({ associationQueryKeys: e, canEditItem: n, contentActions: d, contentHeader: ae, convertToTableData: T, createItemButtonText: D, createItemDialogTitle: A, createOne: j, crudCommandType: M, customOnRowClick: N, defaultNewItem: me, defaultSortByField: he, defaultSortDirection: P, deleteOne: F, editDialogExtraActionsFactory: I, extraActionsFactory: ye, extraCreateOnePermissions: be, extraDeleteOnePermissions: xe, extraUpdateOnePermissions: Se, fetchAll: Ce, fetchAllSelect: we, formFieldDefinitions: Te, getFormValuesFromItem: Ee, getName: L, getOptimisticUpdateIntermediateItem: De, itemName: R, loadables: z, onCreateError: Oe, onCreateSuccess: ke, onDeleteError: Ae, onDeleteSuccess: je, onEditError: Me, onEditSuccess: Ne, onFormChange: Pe, onRowsChange: Fe, onShowItem: B, resourceQueryKeyBase: V, schema: Ie, showIdColumn: Le = !1, subPages: H, tableColumns: Re, tableStoreStorageNamePostFix: ze, tableStoreStorageVersion: Be, testIdAttributes: Ve, title: U, updateOne: He }) => {
|
|
172
|
+
let { t: W } = le(), Ue = se(), We = c(), Ge = ce(null), G = ce(null), K = E(() => _.resolve(o), []), q = E(() => [V], [V]), Ke = E(() => i({
|
|
173
173
|
defaultSortByField: he,
|
|
174
|
-
defaultSortDirection:
|
|
174
|
+
defaultSortDirection: P,
|
|
175
175
|
idSelectorCallback: (e) => e.id,
|
|
176
176
|
navigatorFunction: _.resolve(s).router.navigate,
|
|
177
|
-
storageNamePostFix:
|
|
178
|
-
storageVersion:
|
|
177
|
+
storageNamePostFix: ze ? `CRUDPage-${V}-${ze}` : `CRUDPage-${V}`,
|
|
178
|
+
storageVersion: Be ?? 1
|
|
179
179
|
}), [
|
|
180
180
|
he,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
]),
|
|
186
|
-
enabled: !
|
|
187
|
-
queryFn: async ({ signal: e }) =>
|
|
188
|
-
queryKey:
|
|
189
|
-
select:
|
|
181
|
+
P,
|
|
182
|
+
V,
|
|
183
|
+
ze,
|
|
184
|
+
Be
|
|
185
|
+
]), qe = E(() => (0, ge.default)(z) ? r.isSomeLoading(z) : !1, [z]), { data: J, error: Je, isLoading: Ye } = m({
|
|
186
|
+
enabled: !qe,
|
|
187
|
+
queryFn: async ({ signal: e }) => Ce(e),
|
|
188
|
+
queryKey: q,
|
|
189
|
+
select: we
|
|
190
190
|
});
|
|
191
191
|
w(() => {
|
|
192
|
-
|
|
193
|
-
}, [
|
|
194
|
-
let
|
|
192
|
+
Fe && J && Fe(J);
|
|
193
|
+
}, [Fe, J]);
|
|
194
|
+
let Y = E(() => Ye ? !0 : qe, [Ye, qe]), Xe = E(() => Je || ((0, ge.default)(z) ? z.find((e) => e.error)?.error : null), [Je, z]), X = C((e) => ({
|
|
195
195
|
command_name: M,
|
|
196
196
|
permission_type: e
|
|
197
|
-
}), [M]),
|
|
198
|
-
|
|
199
|
-
|
|
197
|
+
}), [M]), Ze = E(() => He ? K.doesUserHavePermission([...M ? [X(v.UPDATE)] : [], ...Se ?? []]) : !1, [
|
|
198
|
+
K,
|
|
199
|
+
X,
|
|
200
200
|
M,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
]),
|
|
204
|
-
|
|
205
|
-
|
|
201
|
+
Se,
|
|
202
|
+
He
|
|
203
|
+
]), Qe = E(() => F ? K.doesUserHavePermission([...M ? [X(v.DELETE)] : [], ...xe ?? []]) : !1, [
|
|
204
|
+
K,
|
|
205
|
+
X,
|
|
206
206
|
M,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
]),
|
|
210
|
-
|
|
207
|
+
F,
|
|
208
|
+
xe
|
|
209
|
+
]), Z = E(() => !j || Xe ? !1 : K.doesUserHavePermission([...M ? [X(v.CREATE)] : [], ...be ?? []]), [
|
|
210
|
+
K,
|
|
211
211
|
j,
|
|
212
|
-
|
|
212
|
+
X,
|
|
213
213
|
M,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
]),
|
|
214
|
+
Xe,
|
|
215
|
+
be
|
|
216
|
+
]), $e = C((e) => {
|
|
217
217
|
let t = [];
|
|
218
|
-
return
|
|
218
|
+
return I && t.push(...I(e)), H?.forEach((n) => {
|
|
219
219
|
t.push({
|
|
220
220
|
color: "primary",
|
|
221
221
|
label: n.label,
|
|
@@ -223,271 +223,267 @@ var ge = /* @__PURE__ */ e(n(), 1), _e = M(({ createItemDialogTitle: e, defaultN
|
|
|
223
223
|
variant: "outlined"
|
|
224
224
|
});
|
|
225
225
|
}), t;
|
|
226
|
-
}, [
|
|
227
|
-
|
|
228
|
-
canSave:
|
|
229
|
-
extraActionsFactory:
|
|
226
|
+
}, [I, H]), Q = C((e) => {
|
|
227
|
+
G.current.open({
|
|
228
|
+
canSave: Ze && (!e || n ? n(e) : !0),
|
|
229
|
+
extraActionsFactory: $e,
|
|
230
230
|
item: e
|
|
231
231
|
});
|
|
232
232
|
}, [
|
|
233
233
|
n,
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
]),
|
|
234
|
+
$e,
|
|
235
|
+
Ze
|
|
236
|
+
]), $ = C((e) => {
|
|
237
237
|
let t;
|
|
238
238
|
try {
|
|
239
|
-
t =
|
|
239
|
+
t = L(e);
|
|
240
240
|
} catch {
|
|
241
241
|
t = void 0;
|
|
242
242
|
}
|
|
243
243
|
return t;
|
|
244
|
-
}, [
|
|
245
|
-
let t =
|
|
246
|
-
return t ?
|
|
247
|
-
itemName:
|
|
244
|
+
}, [L]), et = C((e) => {
|
|
245
|
+
let t = $(e);
|
|
246
|
+
return t ? W("{{itemName}} \"{{name}}\" is being saved...", {
|
|
247
|
+
itemName: R,
|
|
248
248
|
name: t
|
|
249
|
-
}) :
|
|
249
|
+
}) : W("{{itemName}} is being saved...", { itemName: R });
|
|
250
250
|
}, [
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
251
|
+
W,
|
|
252
|
+
$,
|
|
253
|
+
R
|
|
254
|
+
]), tt = C((e) => {
|
|
255
|
+
let t = $(e);
|
|
256
|
+
return t ? W("{{itemName}} \"{{name}}\" is being saved...", {
|
|
257
|
+
itemName: R,
|
|
258
|
+
name: t
|
|
259
|
+
}) : W("{{itemName}} is being saved...", { itemName: R });
|
|
260
|
+
}, [
|
|
261
|
+
W,
|
|
262
|
+
$,
|
|
263
|
+
R
|
|
264
|
+
]), nt = C((e) => {
|
|
265
|
+
let t = $(e);
|
|
266
|
+
return t ? W("{{itemName}} \"{{name}}\" is being deleted...", {
|
|
267
|
+
itemName: R,
|
|
268
|
+
name: t
|
|
269
|
+
}) : W("{{itemName}} is being deleted...", { itemName: R });
|
|
270
|
+
}, [
|
|
271
|
+
W,
|
|
272
|
+
$,
|
|
273
|
+
R
|
|
254
274
|
]), rt = C((e) => {
|
|
255
|
-
let t =
|
|
256
|
-
return t ?
|
|
257
|
-
itemName:
|
|
275
|
+
let t = $(e);
|
|
276
|
+
return t ? W("{{itemName}} \"{{name}}\" has been saved.", {
|
|
277
|
+
itemName: R,
|
|
258
278
|
name: t
|
|
259
|
-
}) :
|
|
279
|
+
}) : W("{{itemName}} has been saved.", { itemName: R });
|
|
260
280
|
}, [
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
281
|
+
W,
|
|
282
|
+
$,
|
|
283
|
+
R
|
|
264
284
|
]), it = C((e) => {
|
|
265
|
-
let t =
|
|
266
|
-
return t ?
|
|
267
|
-
itemName:
|
|
285
|
+
let t = $(e);
|
|
286
|
+
return t ? W("{{itemName}} \"{{name}}\" has been created.", {
|
|
287
|
+
itemName: R,
|
|
268
288
|
name: t
|
|
269
|
-
}) :
|
|
289
|
+
}) : W("{{itemName}} has been created.", { itemName: R });
|
|
270
290
|
}, [
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
291
|
+
W,
|
|
292
|
+
$,
|
|
293
|
+
R
|
|
274
294
|
]), at = C((e) => {
|
|
275
|
-
let t =
|
|
276
|
-
return t ?
|
|
277
|
-
itemName:
|
|
295
|
+
let t = $(e);
|
|
296
|
+
return t ? W("{{itemName}} \"{{name}}\" has been deleted.", {
|
|
297
|
+
itemName: R,
|
|
278
298
|
name: t
|
|
279
|
-
}) :
|
|
299
|
+
}) : W("{{itemName}} has been deleted.", { itemName: R });
|
|
280
300
|
}, [
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
301
|
+
W,
|
|
302
|
+
$,
|
|
303
|
+
R
|
|
284
304
|
]), ot = C((e) => {
|
|
285
|
-
let t =
|
|
286
|
-
return t ?
|
|
287
|
-
itemName:
|
|
305
|
+
let t = $(e);
|
|
306
|
+
return t ? W("{{itemName}} \"{{name}}\" could not be saved.", {
|
|
307
|
+
itemName: R,
|
|
288
308
|
name: t
|
|
289
|
-
}) :
|
|
309
|
+
}) : W("{{itemName}} could not be saved.", { itemName: R });
|
|
290
310
|
}, [
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
311
|
+
W,
|
|
312
|
+
$,
|
|
313
|
+
R
|
|
294
314
|
]), st = C((e) => {
|
|
295
|
-
let t =
|
|
296
|
-
return t ?
|
|
297
|
-
itemName:
|
|
315
|
+
let t = $(e);
|
|
316
|
+
return t ? W("{{itemName}} \"{{name}}\" could not be created.", {
|
|
317
|
+
itemName: R,
|
|
298
318
|
name: t
|
|
299
|
-
}) :
|
|
319
|
+
}) : W("{{itemName}} could not be created.", { itemName: R });
|
|
300
320
|
}, [
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
321
|
+
W,
|
|
322
|
+
$,
|
|
323
|
+
R
|
|
304
324
|
]), ct = C((e) => {
|
|
305
|
-
let t =
|
|
306
|
-
return t ?
|
|
307
|
-
itemName:
|
|
325
|
+
let t = $(e);
|
|
326
|
+
return t ? W("{{itemName}} \"{{name}}\" could not be deleted.", {
|
|
327
|
+
itemName: R,
|
|
308
328
|
name: t
|
|
309
|
-
}) :
|
|
329
|
+
}) : W("{{itemName}} could not be deleted.", { itemName: R });
|
|
310
330
|
}, [
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
]), lt =
|
|
315
|
-
let t = Z(e);
|
|
316
|
-
return t ? H("{{itemName}} \"{{name}}\" could not be created.", {
|
|
317
|
-
itemName: F,
|
|
318
|
-
name: t
|
|
319
|
-
}) : H("{{itemName}} could not be created.", { itemName: F });
|
|
320
|
-
}, [
|
|
321
|
-
H,
|
|
322
|
-
Z,
|
|
323
|
-
F
|
|
324
|
-
]), ut = C((e) => {
|
|
325
|
-
let t = Z(e);
|
|
326
|
-
return t ? H("{{itemName}} \"{{name}}\" could not be deleted.", {
|
|
327
|
-
itemName: F,
|
|
328
|
-
name: t
|
|
329
|
-
}) : H("{{itemName}} could not be deleted.", { itemName: F });
|
|
330
|
-
}, [
|
|
331
|
-
H,
|
|
332
|
-
Z,
|
|
333
|
-
F
|
|
334
|
-
]), Q = E(() => {
|
|
331
|
+
W,
|
|
332
|
+
$,
|
|
333
|
+
R
|
|
334
|
+
]), lt = E(() => {
|
|
335
335
|
let t = e ?? [];
|
|
336
|
-
return _.resolve(ne).getQueryKeyDependencies([
|
|
336
|
+
return _.resolve(ne).getQueryKeyDependencies([V]).forEach((e) => {
|
|
337
337
|
t.push(e);
|
|
338
338
|
}), t;
|
|
339
|
-
}, [e,
|
|
340
|
-
associationQueryKeys:
|
|
339
|
+
}, [e, V]), { mutate: ut } = g({
|
|
340
|
+
associationQueryKeys: lt,
|
|
341
|
+
getErrorNotificationMessage: ot,
|
|
342
|
+
getIntermediateItem: De,
|
|
343
|
+
getProgressNotificationMessage: et,
|
|
344
|
+
getSuccessNotificationMessage: rt,
|
|
345
|
+
onError: Me,
|
|
346
|
+
onSuccess: Ne,
|
|
347
|
+
queryFn: He,
|
|
348
|
+
resourceQueryKey: q
|
|
349
|
+
}), { isMutating: dt, mutate: ft } = re({
|
|
350
|
+
associationQueryKeys: lt,
|
|
351
|
+
getErrorNotificationMessage: st,
|
|
352
|
+
getProgressNotificationMessage: tt,
|
|
353
|
+
getSuccessNotificationMessage: it,
|
|
354
|
+
onError: Oe,
|
|
355
|
+
onSuccess: ke,
|
|
356
|
+
queryFn: j,
|
|
357
|
+
resourceQueryKey: q
|
|
358
|
+
}), { mutate: pt } = h({
|
|
359
|
+
associationQueryKeys: lt,
|
|
341
360
|
getErrorNotificationMessage: ct,
|
|
342
|
-
getIntermediateItem: Ae,
|
|
343
361
|
getProgressNotificationMessage: nt,
|
|
344
362
|
getSuccessNotificationMessage: at,
|
|
345
|
-
onError:
|
|
346
|
-
onSuccess:
|
|
347
|
-
queryFn:
|
|
348
|
-
resourceQueryKey:
|
|
349
|
-
}),
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
onSuccess: Me,
|
|
356
|
-
queryFn: j,
|
|
357
|
-
resourceQueryKey: G
|
|
358
|
-
}), { mutate: mt } = h({
|
|
359
|
-
associationQueryKeys: Q,
|
|
360
|
-
getErrorNotificationMessage: ut,
|
|
361
|
-
getProgressNotificationMessage: it,
|
|
362
|
-
getSuccessNotificationMessage: st,
|
|
363
|
-
onError: Ne,
|
|
364
|
-
onSuccess: Pe,
|
|
365
|
-
queryFn: be,
|
|
366
|
-
resourceQueryKey: G
|
|
367
|
-
}), ht = C((e, t) => {
|
|
368
|
-
t?.id ? (ft(t), dt(e)) : pt(e);
|
|
369
|
-
}, [
|
|
370
|
-
pt,
|
|
371
|
-
dt,
|
|
372
|
-
ft
|
|
373
|
-
]), gt = C((e) => {
|
|
374
|
-
X(e.row);
|
|
375
|
-
}, [X]), _t = C((e) => {
|
|
376
|
-
N ? N(e) : R ? R(e) : X(e.row);
|
|
363
|
+
onError: Ae,
|
|
364
|
+
onSuccess: je,
|
|
365
|
+
queryFn: F,
|
|
366
|
+
resourceQueryKey: q
|
|
367
|
+
}), mt = C((e, t) => {
|
|
368
|
+
t?.id ? ut(e, t) : ft(e);
|
|
369
|
+
}, [ft, ut]), ht = C((e) => {
|
|
370
|
+
Q(e.row);
|
|
371
|
+
}, [Q]), gt = C((e) => {
|
|
372
|
+
N ? N(e) : B ? B(e) : Q(e.row);
|
|
377
373
|
}, [
|
|
378
374
|
N,
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
]),
|
|
382
|
-
|
|
383
|
-
}, [
|
|
384
|
-
let t = [], n =
|
|
385
|
-
return n?.length > 0 && t.push(...n),
|
|
375
|
+
B,
|
|
376
|
+
Q
|
|
377
|
+
]), _t = C((e) => {
|
|
378
|
+
pt(e);
|
|
379
|
+
}, [pt]), vt = C((e) => {
|
|
380
|
+
let t = [], n = ye ? ye(e) : [];
|
|
381
|
+
return n?.length > 0 && t.push(...n), H?.forEach((n) => {
|
|
386
382
|
t.push(/* @__PURE__ */ k(S, {
|
|
387
383
|
onClick: async () => await _.resolve(s).router.navigate({ pathname: n.getPathName(e.row) }),
|
|
388
384
|
children: [/* @__PURE__ */ O(b, { children: n.icon ? n.icon : /* @__PURE__ */ O(fe, {}) }), /* @__PURE__ */ O(x, { children: n.label })]
|
|
389
385
|
}, n.label));
|
|
390
|
-
}),
|
|
391
|
-
onClick: () =>
|
|
386
|
+
}), Z && t.push(/* @__PURE__ */ k(S, {
|
|
387
|
+
onClick: () => G.current.open({
|
|
392
388
|
canSave: !0,
|
|
393
389
|
item: {
|
|
394
390
|
...e.row,
|
|
395
391
|
id: null
|
|
396
392
|
}
|
|
397
393
|
}),
|
|
398
|
-
children: [/* @__PURE__ */ O(b, { children: /* @__PURE__ */ O(pe, {}) }), /* @__PURE__ */ O(x, { children:
|
|
394
|
+
children: [/* @__PURE__ */ O(b, { children: /* @__PURE__ */ O(pe, {}) }), /* @__PURE__ */ O(x, { children: W`Clone` })]
|
|
399
395
|
}, "clone")), t;
|
|
400
396
|
}, [
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
]),
|
|
397
|
+
ye,
|
|
398
|
+
H,
|
|
399
|
+
Z,
|
|
400
|
+
W
|
|
401
|
+
]), yt = E(() => {
|
|
406
402
|
let e = [t.createReadableIndexColumn()];
|
|
407
|
-
return
|
|
408
|
-
headerName:
|
|
403
|
+
return Le && e.push({
|
|
404
|
+
headerName: W`Id`,
|
|
409
405
|
id: "id",
|
|
410
406
|
isInitiallyVisible: !0,
|
|
411
407
|
type: "text",
|
|
412
408
|
widthPx: 300
|
|
413
|
-
}), e.push(...
|
|
409
|
+
}), e.push(...Re), e.push(t.createActionsColumn({
|
|
414
410
|
getActions: (e) => {
|
|
415
411
|
let t = [];
|
|
416
|
-
|
|
417
|
-
onClick: () =>
|
|
418
|
-
children: [/* @__PURE__ */ O(b, { children: /* @__PURE__ */ O(fe, {}) }), /* @__PURE__ */ O(x, { children:
|
|
412
|
+
B && t.push(/* @__PURE__ */ k(S, {
|
|
413
|
+
onClick: () => B(e),
|
|
414
|
+
children: [/* @__PURE__ */ O(b, { children: /* @__PURE__ */ O(fe, {}) }), /* @__PURE__ */ O(x, { children: W`Show` })]
|
|
419
415
|
}, "actions1")), t.push(/* @__PURE__ */ k(S, {
|
|
420
|
-
onClick: () =>
|
|
421
|
-
children: [/* @__PURE__ */ O(b, { children: /* @__PURE__ */ O(ue, {}) }), /* @__PURE__ */ O(x, { children:
|
|
422
|
-
}, "actions2")),
|
|
423
|
-
onClick: () =>
|
|
424
|
-
children: [/* @__PURE__ */ O(b, { children: /* @__PURE__ */ O(de, {}) }), /* @__PURE__ */ O(x, { children:
|
|
416
|
+
onClick: () => ht(e),
|
|
417
|
+
children: [/* @__PURE__ */ O(b, { children: /* @__PURE__ */ O(ue, {}) }), /* @__PURE__ */ O(x, { children: W`Edit` })]
|
|
418
|
+
}, "actions2")), Qe && t.push(/* @__PURE__ */ k(S, {
|
|
419
|
+
onClick: () => Ge.current.open({ item: e.row }),
|
|
420
|
+
children: [/* @__PURE__ */ O(b, { children: /* @__PURE__ */ O(de, {}) }), /* @__PURE__ */ O(x, { children: W`Delete` })]
|
|
425
421
|
}, "actions3"));
|
|
426
|
-
let n =
|
|
422
|
+
let n = vt(e) ?? [];
|
|
427
423
|
return n?.length > 0 && t.length > 0 && t.push(...n), t;
|
|
428
424
|
},
|
|
429
|
-
t:
|
|
425
|
+
t: W
|
|
430
426
|
})), e;
|
|
431
427
|
}, [
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
]),
|
|
428
|
+
vt,
|
|
429
|
+
ht,
|
|
430
|
+
B,
|
|
431
|
+
Le,
|
|
432
|
+
W,
|
|
433
|
+
Re,
|
|
434
|
+
Qe
|
|
435
|
+
]), bt = E(() => T ? T(J) : J, [T, J]);
|
|
440
436
|
ie({
|
|
441
|
-
columns:
|
|
437
|
+
columns: yt,
|
|
442
438
|
context: null,
|
|
443
439
|
createFiltersFromColumns: !0,
|
|
444
|
-
rows:
|
|
445
|
-
store:
|
|
440
|
+
rows: bt,
|
|
441
|
+
store: Ke
|
|
446
442
|
});
|
|
447
|
-
let
|
|
448
|
-
|
|
449
|
-
}, []),
|
|
443
|
+
let xt = C(() => {
|
|
444
|
+
G.current.open({ canSave: !0 });
|
|
445
|
+
}, []), St = E(() => !d && !Z ? /* @__PURE__ */ O(f, {}) : /* @__PURE__ */ k(y, {
|
|
450
446
|
sx: {
|
|
451
447
|
alignItems: "center",
|
|
452
448
|
display: "flex",
|
|
453
|
-
gap:
|
|
449
|
+
gap: Ue.spacing(1)
|
|
454
450
|
},
|
|
455
451
|
children: [
|
|
456
452
|
/* @__PURE__ */ O(f, {}),
|
|
457
|
-
|
|
453
|
+
Z && /* @__PURE__ */ O(oe, {
|
|
458
454
|
color: "secondary",
|
|
459
|
-
disabled:
|
|
460
|
-
loading:
|
|
461
|
-
onClick:
|
|
455
|
+
disabled: Y || dt,
|
|
456
|
+
loading: Y || dt,
|
|
457
|
+
onClick: xt,
|
|
462
458
|
size: "small",
|
|
463
459
|
variant: "contained",
|
|
464
|
-
children: D ??
|
|
460
|
+
children: D ?? W`Create item`
|
|
465
461
|
}),
|
|
466
462
|
d
|
|
467
463
|
]
|
|
468
464
|
}), [
|
|
469
465
|
d,
|
|
466
|
+
Z,
|
|
470
467
|
Y,
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
St,
|
|
468
|
+
dt,
|
|
469
|
+
xt,
|
|
474
470
|
D,
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
]),
|
|
471
|
+
W,
|
|
472
|
+
Ue
|
|
473
|
+
]), Ct = E(() => (0, ge.default)(U) ? U.join(" -> ") : U, [U]);
|
|
478
474
|
return /* @__PURE__ */ O(a, {
|
|
479
|
-
store:
|
|
475
|
+
store: Ke,
|
|
480
476
|
children: /* @__PURE__ */ k(l, {
|
|
481
|
-
contentActions:
|
|
477
|
+
contentActions: St,
|
|
482
478
|
contentHeader: /* @__PURE__ */ O(p, {
|
|
483
|
-
caption: ae ??
|
|
479
|
+
caption: ae ?? Ct,
|
|
484
480
|
component: "h2",
|
|
485
481
|
variant: "h2"
|
|
486
482
|
}),
|
|
487
483
|
fullWidth: !0,
|
|
488
484
|
showBreadcrumbs: !0,
|
|
489
|
-
testIdAttributes:
|
|
490
|
-
title:
|
|
485
|
+
testIdAttributes: Ve,
|
|
486
|
+
title: Ct,
|
|
491
487
|
children: [
|
|
492
488
|
/* @__PURE__ */ O(y, {
|
|
493
489
|
sx: {
|
|
@@ -495,17 +491,17 @@ var ge = /* @__PURE__ */ e(n(), 1), _e = M(({ createItemDialogTitle: e, defaultN
|
|
|
495
491
|
position: "relative"
|
|
496
492
|
},
|
|
497
493
|
children: /* @__PURE__ */ k(u, {
|
|
498
|
-
error:
|
|
499
|
-
isLoading:
|
|
494
|
+
error: Xe,
|
|
495
|
+
isLoading: Y,
|
|
500
496
|
children: [/* @__PURE__ */ O(te, {}), /* @__PURE__ */ O(y, {
|
|
501
497
|
sx: {
|
|
502
498
|
height: "100%",
|
|
503
|
-
paddingLeft:
|
|
499
|
+
paddingLeft: Ue.spacing(We.layout.SIDEBAR_MENU_WIDTH + 1),
|
|
504
500
|
width: "100%"
|
|
505
501
|
},
|
|
506
502
|
children: /* @__PURE__ */ O(ee, {
|
|
507
|
-
getRowName:
|
|
508
|
-
onRowClick:
|
|
503
|
+
getRowName: L,
|
|
504
|
+
onRowClick: gt
|
|
509
505
|
})
|
|
510
506
|
})]
|
|
511
507
|
})
|
|
@@ -513,24 +509,23 @@ var ge = /* @__PURE__ */ e(n(), 1), _e = M(({ createItemDialogTitle: e, defaultN
|
|
|
513
509
|
/* @__PURE__ */ O(_e, {
|
|
514
510
|
createItemDialogTitle: A,
|
|
515
511
|
defaultNewItem: me,
|
|
516
|
-
formFieldDefinitions:
|
|
517
|
-
getFormValuesFromItem:
|
|
518
|
-
getName:
|
|
519
|
-
onChange:
|
|
520
|
-
onSave:
|
|
521
|
-
ref:
|
|
522
|
-
schema:
|
|
512
|
+
formFieldDefinitions: Te,
|
|
513
|
+
getFormValuesFromItem: Ee,
|
|
514
|
+
getName: L,
|
|
515
|
+
onChange: Pe,
|
|
516
|
+
onSave: mt,
|
|
517
|
+
ref: G,
|
|
518
|
+
schema: Ie
|
|
523
519
|
}),
|
|
524
520
|
/* @__PURE__ */ O(ve, {
|
|
525
|
-
getName:
|
|
526
|
-
onConfirm:
|
|
527
|
-
ref:
|
|
521
|
+
getName: L,
|
|
522
|
+
onConfirm: _t,
|
|
523
|
+
ref: Ge
|
|
528
524
|
})
|
|
529
525
|
]
|
|
530
526
|
})
|
|
531
527
|
});
|
|
532
528
|
};
|
|
533
|
-
|
|
534
|
-
export { ye as t };
|
|
529
|
+
export { P as t };
|
|
535
530
|
|
|
536
531
|
//# sourceMappingURL=CrudPage.js.map
|