@questpie/admin 3.0.5 → 3.0.6
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/README.md +99 -1
- package/dist/client/builder/types/field-types.d.mts +11 -0
- package/dist/client/components/brand-logo.d.mts +25 -0
- package/dist/client/components/brand-logo.mjs +174 -0
- package/dist/client/create-admin-client.d.mts +7 -0
- package/dist/client/create-admin-client.mjs +25 -0
- package/dist/client/hooks/use-brand.d.mts +22 -0
- package/dist/client/hooks/use-brand.mjs +52 -0
- package/dist/client/runtime/index.mjs +1 -1
- package/dist/client/runtime/provider.d.mts +4 -0
- package/dist/client/runtime/provider.mjs +38 -8
- package/dist/client/styles/base.css +4 -0
- package/dist/client/types/admin-config.d.mts +24 -0
- package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
- package/dist/client/views/auth/auth-layout.d.mts +8 -3
- package/dist/client/views/auth/auth-layout.mjs +116 -102
- package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
- package/dist/client/views/auth/login-form.d.mts +2 -2
- package/dist/client/views/auth/reset-password-form.d.mts +2 -2
- package/dist/client/views/auth/setup-form.d.mts +2 -2
- package/dist/client/views/collection/auto-form-fields.mjs +2 -0
- package/dist/client/views/collection/field-renderer.mjs +3 -2
- package/dist/client/views/globals/global-form-view.mjs +908 -863
- package/dist/client/views/layout/admin-sidebar.mjs +153 -141
- package/dist/client/views/pages/accept-invite-page.mjs +122 -144
- package/dist/client/views/pages/forgot-password-page.mjs +22 -30
- package/dist/client/views/pages/invite-page.mjs +24 -33
- package/dist/client/views/pages/login-page.d.mts +2 -2
- package/dist/client/views/pages/login-page.mjs +24 -32
- package/dist/client/views/pages/reset-password-page.d.mts +2 -2
- package/dist/client/views/pages/reset-password-page.mjs +77 -92
- package/dist/client/views/pages/setup-page.mjs +31 -39
- package/dist/client.d.mts +6 -2
- package/dist/client.mjs +5 -2
- package/dist/index.d.mts +6 -2
- package/dist/index.mjs +5 -2
- package/dist/server/augmentation/dashboard.d.mts +23 -5
- package/dist/server/augmentation/form-layout.d.mts +10 -0
- package/dist/server/augmentation/index.d.mts +1 -1
- package/dist/server/augmentation.d.mts +1 -1
- package/dist/server/modules/admin/collections/account.d.mts +46 -46
- package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
- package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
- package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
- package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
- package/dist/server/modules/admin/collections/assets.d.mts +20 -20
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +32 -32
- package/dist/server/modules/admin/collections/verification.d.mts +32 -32
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +19 -1
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/preview.d.mts +11 -11
- package/dist/server/modules/admin/routes/preview.mjs +1 -1
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/translations.d.mts +4 -4
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +27 -27
- package/dist/server.d.mts +4 -4
- package/dist/shared/preview-utils.d.mts +34 -1
- package/dist/shared/preview-utils.mjs +79 -1
- package/dist/shared.d.mts +2 -2
- package/dist/shared.mjs +2 -2
- package/package.json +3 -3
|
@@ -20,6 +20,7 @@ import { useGlobalServerValidation } from "../../hooks/use-server-validation.mjs
|
|
|
20
20
|
import { useSidebarSearchParam } from "../../hooks/use-sidebar-search-param.mjs";
|
|
21
21
|
import { useReactiveFields } from "../../hooks/use-reactive-fields.mjs";
|
|
22
22
|
import { useTransitionStage } from "../../hooks/use-transition-stage.mjs";
|
|
23
|
+
import { detectManyToManyRelations, hasManyToManyRelations } from "../../utils/detect-relations.mjs";
|
|
23
24
|
import { shouldHandleAdminShortcut } from "../../utils/keyboard-shortcuts.mjs";
|
|
24
25
|
import { AdminViewHeader } from "../layout/admin-view-layout.mjs";
|
|
25
26
|
import { useGlobalAuditHistory } from "../../hooks/use-audit-history.mjs";
|
|
@@ -127,196 +128,237 @@ function GlobalFormViewSkeleton() {
|
|
|
127
128
|
* GlobalFormView - Default form-based edit view for globals
|
|
128
129
|
*/
|
|
129
130
|
function GlobalFormView(t0) {
|
|
130
|
-
const $ = c(
|
|
131
|
+
const $ = c(310);
|
|
131
132
|
const { global: globalName, config, viewConfig, registry, showMeta: t1, headerActions, onSuccess, onError } = t0;
|
|
132
133
|
const showMeta = t1 === void 0 ? true : t1;
|
|
133
134
|
const { t } = useTranslation();
|
|
134
135
|
const resolveText = useResolveText();
|
|
135
|
-
const { data: globalData, isLoading: dataLoading, error: dataError } = useGlobal(globalName);
|
|
136
136
|
const { fields: schemaFields, schema: globalSchema } = useGlobalFields(globalName);
|
|
137
|
+
config?.fields;
|
|
138
|
+
const t2 = config?.fields;
|
|
139
|
+
const t3 = globalSchema;
|
|
140
|
+
let t4;
|
|
141
|
+
if ($[0] !== t2 || $[1] !== t3) {
|
|
142
|
+
t4 = detectManyToManyRelations({
|
|
143
|
+
fields: t2,
|
|
144
|
+
schema: t3
|
|
145
|
+
});
|
|
146
|
+
$[0] = t2;
|
|
147
|
+
$[1] = t3;
|
|
148
|
+
$[2] = t4;
|
|
149
|
+
} else t4 = $[2];
|
|
150
|
+
const withRelations = t4;
|
|
151
|
+
let t5;
|
|
152
|
+
if ($[3] !== withRelations) {
|
|
153
|
+
t5 = hasManyToManyRelations(withRelations) ? { with: withRelations } : void 0;
|
|
154
|
+
$[3] = withRelations;
|
|
155
|
+
$[4] = t5;
|
|
156
|
+
} else t5 = $[4];
|
|
157
|
+
const { data: globalDataRaw, isLoading: dataLoading, error: dataError } = useGlobal(globalName, t5);
|
|
158
|
+
let t6;
|
|
159
|
+
bb0: {
|
|
160
|
+
if (!globalDataRaw || !hasManyToManyRelations(withRelations)) {
|
|
161
|
+
t6 = globalDataRaw;
|
|
162
|
+
break bb0;
|
|
163
|
+
}
|
|
164
|
+
const t7$1 = globalDataRaw;
|
|
165
|
+
let result;
|
|
166
|
+
if ($[5] !== t7$1 || $[6] !== withRelations) {
|
|
167
|
+
result = { ...t7$1 };
|
|
168
|
+
for (const key of Object.keys(withRelations)) {
|
|
169
|
+
const value = result[key];
|
|
170
|
+
if (Array.isArray(value) && value.length > 0 && typeof value[0] === "object" && value[0]?.id) result[key] = value.map(_temp);
|
|
171
|
+
}
|
|
172
|
+
$[5] = t7$1;
|
|
173
|
+
$[6] = withRelations;
|
|
174
|
+
$[7] = result;
|
|
175
|
+
} else result = $[7];
|
|
176
|
+
t6 = result;
|
|
177
|
+
}
|
|
178
|
+
const globalData = t6;
|
|
137
179
|
const { locale: contentLocale, setLocale: setContentLocale } = useScopedLocale();
|
|
138
180
|
const contentLocales = useSafeContentLocales();
|
|
139
|
-
let
|
|
140
|
-
if ($[
|
|
141
|
-
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
} else
|
|
145
|
-
const localeOptions =
|
|
146
|
-
let
|
|
147
|
-
if ($[
|
|
148
|
-
|
|
181
|
+
let t7;
|
|
182
|
+
if ($[8] !== contentLocales?.locales) {
|
|
183
|
+
t7 = contentLocales?.locales ?? [];
|
|
184
|
+
$[8] = contentLocales?.locales;
|
|
185
|
+
$[9] = t7;
|
|
186
|
+
} else t7 = $[9];
|
|
187
|
+
const localeOptions = t7;
|
|
188
|
+
let t8;
|
|
189
|
+
if ($[10] !== onSuccess || $[11] !== t) {
|
|
190
|
+
t8 = (data) => {
|
|
149
191
|
toast.success(t("toast.saveSuccess"));
|
|
150
192
|
onSuccess?.(data);
|
|
151
193
|
};
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
$[
|
|
155
|
-
} else
|
|
156
|
-
let
|
|
157
|
-
if ($[
|
|
158
|
-
|
|
194
|
+
$[10] = onSuccess;
|
|
195
|
+
$[11] = t;
|
|
196
|
+
$[12] = t8;
|
|
197
|
+
} else t8 = $[12];
|
|
198
|
+
let t9;
|
|
199
|
+
if ($[13] !== onError) {
|
|
200
|
+
t9 = (error) => {
|
|
159
201
|
onError?.(error);
|
|
160
202
|
};
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
163
|
-
} else
|
|
164
|
-
let
|
|
165
|
-
if ($[
|
|
166
|
-
|
|
167
|
-
onSuccess:
|
|
168
|
-
onError:
|
|
203
|
+
$[13] = onError;
|
|
204
|
+
$[14] = t9;
|
|
205
|
+
} else t9 = $[14];
|
|
206
|
+
let t10;
|
|
207
|
+
if ($[15] !== t8 || $[16] !== t9) {
|
|
208
|
+
t10 = {
|
|
209
|
+
onSuccess: t8,
|
|
210
|
+
onError: t9
|
|
169
211
|
};
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
} else
|
|
174
|
-
const updateMutation = useGlobalUpdate(globalName,
|
|
212
|
+
$[15] = t8;
|
|
213
|
+
$[16] = t9;
|
|
214
|
+
$[17] = t10;
|
|
215
|
+
} else t10 = $[17];
|
|
216
|
+
const updateMutation = useGlobalUpdate(globalName, t10);
|
|
175
217
|
const revertVersionMutation = useGlobalRevertVersion(globalName);
|
|
176
|
-
let
|
|
177
|
-
if ($[
|
|
178
|
-
|
|
179
|
-
$[
|
|
180
|
-
} else
|
|
181
|
-
const [isHistoryOpen, setIsHistoryOpen] = useSidebarSearchParam("history",
|
|
218
|
+
let t11;
|
|
219
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
220
|
+
t11 = { legacyKey: "history" };
|
|
221
|
+
$[18] = t11;
|
|
222
|
+
} else t11 = $[18];
|
|
223
|
+
const [isHistoryOpen, setIsHistoryOpen] = useSidebarSearchParam("history", t11);
|
|
182
224
|
const [pendingRevertVersion, setPendingRevertVersion] = React.useState(null);
|
|
183
|
-
const
|
|
184
|
-
let
|
|
185
|
-
if ($[
|
|
186
|
-
|
|
187
|
-
id:
|
|
225
|
+
const t12 = globalData?.id;
|
|
226
|
+
let t13;
|
|
227
|
+
if ($[19] !== t12) {
|
|
228
|
+
t13 = {
|
|
229
|
+
id: t12,
|
|
188
230
|
limit: 50
|
|
189
231
|
};
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
} else
|
|
193
|
-
const
|
|
194
|
-
let
|
|
195
|
-
if ($[
|
|
196
|
-
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
199
|
-
} else
|
|
200
|
-
const { data: versionsData, isLoading: versionsLoading } = useGlobalVersions(globalName,
|
|
201
|
-
let
|
|
202
|
-
if ($[
|
|
203
|
-
|
|
204
|
-
$[
|
|
205
|
-
} else
|
|
206
|
-
let
|
|
207
|
-
if ($[
|
|
208
|
-
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
} else
|
|
212
|
-
const { data: auditData, isLoading: auditLoading } = useGlobalAuditHistory(globalName,
|
|
232
|
+
$[19] = t12;
|
|
233
|
+
$[20] = t13;
|
|
234
|
+
} else t13 = $[20];
|
|
235
|
+
const t14 = isHistoryOpen && !!globalSchema?.options?.versioning;
|
|
236
|
+
let t15;
|
|
237
|
+
if ($[21] !== t14) {
|
|
238
|
+
t15 = { enabled: t14 };
|
|
239
|
+
$[21] = t14;
|
|
240
|
+
$[22] = t15;
|
|
241
|
+
} else t15 = $[22];
|
|
242
|
+
const { data: versionsData, isLoading: versionsLoading } = useGlobalVersions(globalName, t13, t15);
|
|
243
|
+
let t16;
|
|
244
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
245
|
+
t16 = { limit: 50 };
|
|
246
|
+
$[23] = t16;
|
|
247
|
+
} else t16 = $[23];
|
|
248
|
+
let t17;
|
|
249
|
+
if ($[24] !== isHistoryOpen) {
|
|
250
|
+
t17 = { enabled: isHistoryOpen };
|
|
251
|
+
$[24] = isHistoryOpen;
|
|
252
|
+
$[25] = t17;
|
|
253
|
+
} else t17 = $[25];
|
|
254
|
+
const { data: auditData, isLoading: auditLoading } = useGlobalAuditHistory(globalName, t16, t17);
|
|
213
255
|
const workflowConfig = globalSchema?.options?.workflow;
|
|
214
256
|
const workflowEnabled = !!workflowConfig?.enabled;
|
|
215
|
-
const
|
|
216
|
-
let
|
|
217
|
-
if ($[
|
|
218
|
-
|
|
219
|
-
id:
|
|
257
|
+
const t18 = globalData?.id;
|
|
258
|
+
let t19;
|
|
259
|
+
if ($[26] !== t18) {
|
|
260
|
+
t19 = {
|
|
261
|
+
id: t18,
|
|
220
262
|
limit: 1
|
|
221
263
|
};
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
} else
|
|
225
|
-
const
|
|
226
|
-
let
|
|
227
|
-
if ($[
|
|
228
|
-
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
} else
|
|
232
|
-
const { data: latestVersionData } = useGlobalVersions(globalName,
|
|
264
|
+
$[26] = t18;
|
|
265
|
+
$[27] = t19;
|
|
266
|
+
} else t19 = $[27];
|
|
267
|
+
const t20 = workflowEnabled && !!globalData?.id;
|
|
268
|
+
let t21;
|
|
269
|
+
if ($[28] !== t20) {
|
|
270
|
+
t21 = { enabled: t20 };
|
|
271
|
+
$[28] = t20;
|
|
272
|
+
$[29] = t21;
|
|
273
|
+
} else t21 = $[29];
|
|
274
|
+
const { data: latestVersionData } = useGlobalVersions(globalName, t19, t21);
|
|
233
275
|
const currentStage = latestVersionData?.[0]?.versionStage ?? workflowConfig?.initialStage ?? null;
|
|
234
276
|
workflowConfig?.stages;
|
|
235
|
-
let
|
|
236
|
-
if ($[
|
|
237
|
-
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
$[
|
|
241
|
-
} else
|
|
242
|
-
const currentStageConfig =
|
|
277
|
+
let t22;
|
|
278
|
+
if ($[30] !== currentStage || $[31] !== workflowConfig?.stages) {
|
|
279
|
+
t22 = workflowConfig?.stages?.find((s) => s.name === currentStage) ?? null;
|
|
280
|
+
$[30] = currentStage;
|
|
281
|
+
$[31] = workflowConfig?.stages;
|
|
282
|
+
$[32] = t22;
|
|
283
|
+
} else t22 = $[32];
|
|
284
|
+
const currentStageConfig = t22;
|
|
243
285
|
const currentStageLabel = currentStageConfig?.label ?? currentStage ?? "";
|
|
244
|
-
let
|
|
245
|
-
|
|
286
|
+
let t23;
|
|
287
|
+
bb1: {
|
|
246
288
|
if (!workflowConfig?.stages || !currentStage) {
|
|
247
|
-
let
|
|
248
|
-
if ($[
|
|
249
|
-
|
|
250
|
-
$[
|
|
251
|
-
} else
|
|
252
|
-
|
|
253
|
-
break
|
|
289
|
+
let t24$2;
|
|
290
|
+
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
291
|
+
t24$2 = [];
|
|
292
|
+
$[33] = t24$2;
|
|
293
|
+
} else t24$2 = $[33];
|
|
294
|
+
t23 = t24$2;
|
|
295
|
+
break bb1;
|
|
254
296
|
}
|
|
255
297
|
const stageNames = currentStageConfig?.transitions;
|
|
256
298
|
if (stageNames && stageNames.length > 0) {
|
|
257
|
-
let
|
|
258
|
-
if ($[
|
|
259
|
-
let
|
|
260
|
-
if ($[
|
|
261
|
-
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
} else
|
|
265
|
-
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
$[
|
|
269
|
-
} else
|
|
270
|
-
|
|
271
|
-
break
|
|
299
|
+
let t24$2;
|
|
300
|
+
if ($[34] !== stageNames || $[35] !== workflowConfig) {
|
|
301
|
+
let t25$1;
|
|
302
|
+
if ($[37] !== workflowConfig) {
|
|
303
|
+
t25$1 = (name) => workflowConfig.stages.find((s_0) => s_0.name === name);
|
|
304
|
+
$[37] = workflowConfig;
|
|
305
|
+
$[38] = t25$1;
|
|
306
|
+
} else t25$1 = $[38];
|
|
307
|
+
t24$2 = stageNames.map(t25$1).filter(Boolean);
|
|
308
|
+
$[34] = stageNames;
|
|
309
|
+
$[35] = workflowConfig;
|
|
310
|
+
$[36] = t24$2;
|
|
311
|
+
} else t24$2 = $[36];
|
|
312
|
+
t23 = t24$2;
|
|
313
|
+
break bb1;
|
|
272
314
|
}
|
|
273
|
-
let
|
|
274
|
-
if ($[
|
|
275
|
-
let
|
|
276
|
-
if ($[
|
|
277
|
-
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
} else
|
|
281
|
-
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
284
|
-
$[
|
|
285
|
-
} else
|
|
286
|
-
|
|
315
|
+
let t24$1;
|
|
316
|
+
if ($[39] !== currentStage || $[40] !== workflowConfig.stages) {
|
|
317
|
+
let t25$1;
|
|
318
|
+
if ($[42] !== currentStage) {
|
|
319
|
+
t25$1 = (s_1) => s_1.name !== currentStage;
|
|
320
|
+
$[42] = currentStage;
|
|
321
|
+
$[43] = t25$1;
|
|
322
|
+
} else t25$1 = $[43];
|
|
323
|
+
t24$1 = workflowConfig.stages.filter(t25$1);
|
|
324
|
+
$[39] = currentStage;
|
|
325
|
+
$[40] = workflowConfig.stages;
|
|
326
|
+
$[41] = t24$1;
|
|
327
|
+
} else t24$1 = $[41];
|
|
328
|
+
t23 = t24$1;
|
|
287
329
|
}
|
|
288
|
-
const allowedTransitions =
|
|
289
|
-
let
|
|
290
|
-
if ($[
|
|
291
|
-
|
|
292
|
-
$[
|
|
293
|
-
} else
|
|
294
|
-
const transitionMutation = useTransitionStage(globalName,
|
|
330
|
+
const allowedTransitions = t23;
|
|
331
|
+
let t24;
|
|
332
|
+
if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
|
|
333
|
+
t24 = { mode: "global" };
|
|
334
|
+
$[44] = t24;
|
|
335
|
+
} else t24 = $[44];
|
|
336
|
+
const transitionMutation = useTransitionStage(globalName, t24);
|
|
295
337
|
const [transitionTarget, setTransitionTarget] = React.useState(null);
|
|
296
338
|
const [transitionSchedule, setTransitionSchedule] = React.useState(false);
|
|
297
339
|
const [transitionScheduledAt, setTransitionScheduledAt] = React.useState(null);
|
|
298
340
|
const { resolver } = useGlobalServerValidation(globalName);
|
|
299
|
-
let
|
|
300
|
-
if ($[
|
|
301
|
-
|
|
302
|
-
$[
|
|
303
|
-
$[
|
|
304
|
-
} else
|
|
305
|
-
const
|
|
306
|
-
let
|
|
307
|
-
if ($[
|
|
308
|
-
|
|
309
|
-
defaultValues:
|
|
341
|
+
let t25;
|
|
342
|
+
if ($[45] !== globalData) {
|
|
343
|
+
t25 = globalData ?? {};
|
|
344
|
+
$[45] = globalData;
|
|
345
|
+
$[46] = t25;
|
|
346
|
+
} else t25 = $[46];
|
|
347
|
+
const t26 = t25;
|
|
348
|
+
let t27;
|
|
349
|
+
if ($[47] !== resolver || $[48] !== t26) {
|
|
350
|
+
t27 = {
|
|
351
|
+
defaultValues: t26,
|
|
310
352
|
resolver
|
|
311
353
|
};
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
$[
|
|
315
|
-
} else
|
|
316
|
-
const form = useForm(
|
|
317
|
-
let
|
|
318
|
-
if ($[
|
|
319
|
-
|
|
354
|
+
$[47] = resolver;
|
|
355
|
+
$[48] = t26;
|
|
356
|
+
$[49] = t27;
|
|
357
|
+
} else t27 = $[49];
|
|
358
|
+
const form = useForm(t27);
|
|
359
|
+
let t28;
|
|
360
|
+
if ($[50] !== form || $[51] !== t || $[52] !== transitionMutation || $[53] !== transitionSchedule || $[54] !== transitionScheduledAt || $[55] !== transitionTarget) {
|
|
361
|
+
t28 = () => {
|
|
320
362
|
if (!transitionTarget) return;
|
|
321
363
|
const params = { stage: transitionTarget.name };
|
|
322
364
|
if (transitionSchedule) {
|
|
@@ -328,9 +370,9 @@ function GlobalFormView(t0) {
|
|
|
328
370
|
setTransitionSchedule(false);
|
|
329
371
|
setTransitionScheduledAt(null);
|
|
330
372
|
};
|
|
331
|
-
transitionMutation.mutateAsync(params).then((
|
|
332
|
-
if (
|
|
333
|
-
if (typeof
|
|
373
|
+
transitionMutation.mutateAsync(params).then((result_0) => {
|
|
374
|
+
if (result_0) {
|
|
375
|
+
if (typeof result_0 === "object") form.reset(result_0);
|
|
334
376
|
}
|
|
335
377
|
if (transitionSchedule) if (transitionScheduledAt) toast.success(t("workflow.scheduledSuccess", {
|
|
336
378
|
stage: stageLabel,
|
|
@@ -347,31 +389,31 @@ function GlobalFormView(t0) {
|
|
|
347
389
|
resetTransitionState();
|
|
348
390
|
});
|
|
349
391
|
};
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
$[
|
|
353
|
-
$[
|
|
354
|
-
$[
|
|
355
|
-
$[
|
|
356
|
-
$[
|
|
357
|
-
} else
|
|
358
|
-
const confirmTransition =
|
|
392
|
+
$[50] = form;
|
|
393
|
+
$[51] = t;
|
|
394
|
+
$[52] = transitionMutation;
|
|
395
|
+
$[53] = transitionSchedule;
|
|
396
|
+
$[54] = transitionScheduledAt;
|
|
397
|
+
$[55] = transitionTarget;
|
|
398
|
+
$[56] = t28;
|
|
399
|
+
} else t28 = $[56];
|
|
400
|
+
const confirmTransition = t28;
|
|
359
401
|
const prevLocaleRef = React.useRef(contentLocale);
|
|
360
402
|
const skipResetRef = React.useRef(false);
|
|
361
403
|
const localeSnapshotRef = React.useRef(null);
|
|
362
|
-
let
|
|
363
|
-
if ($[
|
|
364
|
-
|
|
404
|
+
let t29;
|
|
405
|
+
if ($[57] === Symbol.for("react.memo_cache_sentinel")) {
|
|
406
|
+
t29 = {
|
|
365
407
|
open: false,
|
|
366
408
|
pendingLocale: null
|
|
367
409
|
};
|
|
368
|
-
$[
|
|
369
|
-
} else
|
|
370
|
-
const [localeChangeDialog, setLocaleChangeDialog] = React.useState(
|
|
371
|
-
let
|
|
372
|
-
let
|
|
373
|
-
if ($[
|
|
374
|
-
|
|
410
|
+
$[57] = t29;
|
|
411
|
+
} else t29 = $[57];
|
|
412
|
+
const [localeChangeDialog, setLocaleChangeDialog] = React.useState(t29);
|
|
413
|
+
let t30;
|
|
414
|
+
let t31;
|
|
415
|
+
if ($[58] !== contentLocale || $[59] !== form || $[60] !== localeChangeDialog.open || $[61] !== setContentLocale) {
|
|
416
|
+
t30 = () => {
|
|
375
417
|
if (prevLocaleRef.current !== contentLocale) if (form.formState.isDirty && !localeChangeDialog.open) {
|
|
376
418
|
skipResetRef.current = true;
|
|
377
419
|
localeSnapshotRef.current = form.getValues();
|
|
@@ -385,27 +427,27 @@ function GlobalFormView(t0) {
|
|
|
385
427
|
skipResetRef.current = false;
|
|
386
428
|
}
|
|
387
429
|
};
|
|
388
|
-
|
|
430
|
+
t31 = [
|
|
389
431
|
contentLocale,
|
|
390
432
|
form.formState.isDirty,
|
|
391
433
|
localeChangeDialog.open,
|
|
392
434
|
setContentLocale,
|
|
393
435
|
form
|
|
394
436
|
];
|
|
395
|
-
$[
|
|
396
|
-
$[
|
|
397
|
-
$[
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
437
|
+
$[58] = contentLocale;
|
|
438
|
+
$[59] = form;
|
|
439
|
+
$[60] = localeChangeDialog.open;
|
|
440
|
+
$[61] = setContentLocale;
|
|
441
|
+
$[62] = t30;
|
|
442
|
+
$[63] = t31;
|
|
401
443
|
} else {
|
|
402
|
-
|
|
403
|
-
|
|
444
|
+
t30 = $[62];
|
|
445
|
+
t31 = $[63];
|
|
404
446
|
}
|
|
405
|
-
React.useEffect(
|
|
406
|
-
let
|
|
407
|
-
if ($[
|
|
408
|
-
|
|
447
|
+
React.useEffect(t30, t31);
|
|
448
|
+
let t32;
|
|
449
|
+
if ($[64] !== localeChangeDialog.pendingLocale || $[65] !== setContentLocale) {
|
|
450
|
+
t32 = () => {
|
|
409
451
|
skipResetRef.current = false;
|
|
410
452
|
localeSnapshotRef.current = null;
|
|
411
453
|
if (localeChangeDialog.pendingLocale) {
|
|
@@ -417,14 +459,14 @@ function GlobalFormView(t0) {
|
|
|
417
459
|
pendingLocale: null
|
|
418
460
|
});
|
|
419
461
|
};
|
|
420
|
-
$[
|
|
421
|
-
$[
|
|
422
|
-
$[
|
|
423
|
-
} else
|
|
424
|
-
const handleLocaleChangeConfirm =
|
|
425
|
-
let
|
|
426
|
-
if ($[
|
|
427
|
-
|
|
462
|
+
$[64] = localeChangeDialog.pendingLocale;
|
|
463
|
+
$[65] = setContentLocale;
|
|
464
|
+
$[66] = t32;
|
|
465
|
+
} else t32 = $[66];
|
|
466
|
+
const handleLocaleChangeConfirm = t32;
|
|
467
|
+
let t33;
|
|
468
|
+
if ($[67] !== form) {
|
|
469
|
+
t33 = () => {
|
|
428
470
|
skipResetRef.current = false;
|
|
429
471
|
if (localeSnapshotRef.current) form.reset(localeSnapshotRef.current, {
|
|
430
472
|
keepDirty: true,
|
|
@@ -438,91 +480,91 @@ function GlobalFormView(t0) {
|
|
|
438
480
|
pendingLocale: null
|
|
439
481
|
});
|
|
440
482
|
};
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
443
|
-
} else
|
|
444
|
-
const handleLocaleChangeCancel =
|
|
445
|
-
let
|
|
446
|
-
let
|
|
447
|
-
if ($[
|
|
448
|
-
|
|
483
|
+
$[67] = form;
|
|
484
|
+
$[68] = t33;
|
|
485
|
+
} else t33 = $[68];
|
|
486
|
+
const handleLocaleChangeCancel = t33;
|
|
487
|
+
let t34;
|
|
488
|
+
let t35;
|
|
489
|
+
if ($[69] !== form || $[70] !== globalData) {
|
|
490
|
+
t34 = () => {
|
|
449
491
|
if (skipResetRef.current) return;
|
|
450
492
|
if (globalData) form.reset(globalData);
|
|
451
493
|
};
|
|
452
|
-
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
455
|
-
$[
|
|
456
|
-
$[
|
|
494
|
+
t35 = [form, globalData];
|
|
495
|
+
$[69] = form;
|
|
496
|
+
$[70] = globalData;
|
|
497
|
+
$[71] = t34;
|
|
498
|
+
$[72] = t35;
|
|
457
499
|
} else {
|
|
458
|
-
|
|
459
|
-
|
|
500
|
+
t34 = $[71];
|
|
501
|
+
t35 = $[72];
|
|
460
502
|
}
|
|
461
|
-
React.useEffect(
|
|
462
|
-
let
|
|
463
|
-
if ($[
|
|
464
|
-
|
|
465
|
-
$[
|
|
466
|
-
$[
|
|
467
|
-
} else
|
|
468
|
-
const reactiveConfigs =
|
|
469
|
-
let
|
|
470
|
-
if ($[
|
|
471
|
-
|
|
472
|
-
$[
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
475
|
-
} else
|
|
476
|
-
let
|
|
477
|
-
if ($[
|
|
478
|
-
|
|
503
|
+
React.useEffect(t34, t35);
|
|
504
|
+
let t36;
|
|
505
|
+
if ($[73] !== globalSchema) {
|
|
506
|
+
t36 = extractReactiveConfigs(globalSchema);
|
|
507
|
+
$[73] = globalSchema;
|
|
508
|
+
$[74] = t36;
|
|
509
|
+
} else t36 = $[74];
|
|
510
|
+
const reactiveConfigs = t36;
|
|
511
|
+
let t37;
|
|
512
|
+
if ($[75] !== dataLoading || $[76] !== reactiveConfigs) {
|
|
513
|
+
t37 = !dataLoading && Object.keys(reactiveConfigs).length > 0;
|
|
514
|
+
$[75] = dataLoading;
|
|
515
|
+
$[76] = reactiveConfigs;
|
|
516
|
+
$[77] = t37;
|
|
517
|
+
} else t37 = $[77];
|
|
518
|
+
let t38;
|
|
519
|
+
if ($[78] !== form || $[79] !== globalName || $[80] !== reactiveConfigs || $[81] !== t37) {
|
|
520
|
+
t38 = {
|
|
479
521
|
collection: globalName,
|
|
480
522
|
mode: "global",
|
|
481
523
|
reactiveConfigs,
|
|
482
|
-
enabled:
|
|
524
|
+
enabled: t37,
|
|
483
525
|
debounce: 300,
|
|
484
526
|
form
|
|
485
527
|
};
|
|
486
|
-
$[
|
|
487
|
-
$[
|
|
488
|
-
$[
|
|
489
|
-
$[
|
|
490
|
-
$[
|
|
491
|
-
} else
|
|
492
|
-
useReactiveFields(
|
|
493
|
-
let
|
|
494
|
-
|
|
528
|
+
$[78] = form;
|
|
529
|
+
$[79] = globalName;
|
|
530
|
+
$[80] = reactiveConfigs;
|
|
531
|
+
$[81] = t37;
|
|
532
|
+
$[82] = t38;
|
|
533
|
+
} else t38 = $[82];
|
|
534
|
+
useReactiveFields(t38);
|
|
535
|
+
let t39;
|
|
536
|
+
bb2: {
|
|
495
537
|
if (!viewConfig) {
|
|
496
|
-
|
|
497
|
-
break
|
|
538
|
+
t39 = config;
|
|
539
|
+
break bb2;
|
|
498
540
|
}
|
|
499
|
-
let
|
|
500
|
-
if ($[
|
|
501
|
-
|
|
502
|
-
$[
|
|
503
|
-
$[
|
|
504
|
-
} else
|
|
505
|
-
let
|
|
506
|
-
if ($[
|
|
507
|
-
|
|
508
|
-
...
|
|
541
|
+
let t40$1;
|
|
542
|
+
if ($[83] !== config) {
|
|
543
|
+
t40$1 = config ?? {};
|
|
544
|
+
$[83] = config;
|
|
545
|
+
$[84] = t40$1;
|
|
546
|
+
} else t40$1 = $[84];
|
|
547
|
+
let t41$1;
|
|
548
|
+
if ($[85] !== t40$1 || $[86] !== viewConfig) {
|
|
549
|
+
t41$1 = {
|
|
550
|
+
...t40$1,
|
|
509
551
|
form: viewConfig
|
|
510
552
|
};
|
|
511
|
-
$[
|
|
512
|
-
$[
|
|
513
|
-
$[
|
|
514
|
-
} else
|
|
515
|
-
|
|
553
|
+
$[85] = t40$1;
|
|
554
|
+
$[86] = viewConfig;
|
|
555
|
+
$[87] = t41$1;
|
|
556
|
+
} else t41$1 = $[87];
|
|
557
|
+
t39 = t41$1;
|
|
516
558
|
}
|
|
517
|
-
const resolvedConfig =
|
|
518
|
-
let
|
|
519
|
-
if ($[
|
|
520
|
-
|
|
559
|
+
const resolvedConfig = t39;
|
|
560
|
+
let t40;
|
|
561
|
+
if ($[88] !== form || $[89] !== t || $[90] !== updateMutation) {
|
|
562
|
+
t40 = async (data_0) => {
|
|
521
563
|
try {
|
|
522
|
-
const
|
|
523
|
-
if (
|
|
524
|
-
} catch (
|
|
525
|
-
const error_0 =
|
|
564
|
+
const result_1 = await updateMutation.mutateAsync({ data: data_0 });
|
|
565
|
+
if (result_1) form.reset(result_1);
|
|
566
|
+
} catch (t41$1) {
|
|
567
|
+
const error_0 = t41$1;
|
|
526
568
|
if (error_0 instanceof QuestpieClientError && error_0.fieldErrors && error_0.fieldErrors.length > 0) {
|
|
527
569
|
for (const fieldError of error_0.fieldErrors) form.setError(fieldError.path, {
|
|
528
570
|
type: "server",
|
|
@@ -535,16 +577,16 @@ function GlobalFormView(t0) {
|
|
|
535
577
|
toast.error(t("toast.settingsSaveFailed") || "Failed to save settings", { description: message });
|
|
536
578
|
}
|
|
537
579
|
};
|
|
538
|
-
$[
|
|
539
|
-
$[
|
|
540
|
-
$[
|
|
541
|
-
$[
|
|
542
|
-
} else
|
|
543
|
-
const onSubmit =
|
|
544
|
-
let
|
|
545
|
-
let
|
|
546
|
-
if ($[
|
|
547
|
-
|
|
580
|
+
$[88] = form;
|
|
581
|
+
$[89] = t;
|
|
582
|
+
$[90] = updateMutation;
|
|
583
|
+
$[91] = t40;
|
|
584
|
+
} else t40 = $[91];
|
|
585
|
+
const onSubmit = t40;
|
|
586
|
+
let t41;
|
|
587
|
+
let t42;
|
|
588
|
+
if ($[92] !== form || $[93] !== onSubmit) {
|
|
589
|
+
t41 = () => {
|
|
548
590
|
const handleKeyDown = (e) => {
|
|
549
591
|
if (shouldHandleAdminShortcut(e, {
|
|
550
592
|
allowEditableTarget: true,
|
|
@@ -557,130 +599,130 @@ function GlobalFormView(t0) {
|
|
|
557
599
|
document.addEventListener("keydown", handleKeyDown);
|
|
558
600
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
559
601
|
};
|
|
560
|
-
|
|
561
|
-
$[
|
|
562
|
-
$[
|
|
563
|
-
$[
|
|
564
|
-
$[
|
|
602
|
+
t42 = [form, onSubmit];
|
|
603
|
+
$[92] = form;
|
|
604
|
+
$[93] = onSubmit;
|
|
605
|
+
$[94] = t41;
|
|
606
|
+
$[95] = t42;
|
|
565
607
|
} else {
|
|
566
|
-
|
|
567
|
-
|
|
608
|
+
t41 = $[94];
|
|
609
|
+
t42 = $[95];
|
|
568
610
|
}
|
|
569
|
-
React.useEffect(
|
|
611
|
+
React.useEffect(t41, t42);
|
|
570
612
|
const isSubmitting = updateMutation.isPending || form.formState.isSubmitting;
|
|
571
|
-
let
|
|
572
|
-
if ($[
|
|
573
|
-
|
|
613
|
+
let t43;
|
|
614
|
+
if ($[96] !== form || $[97] !== globalData || $[98] !== pendingRevertVersion || $[99] !== revertVersionMutation || $[100] !== t) {
|
|
615
|
+
t43 = async () => {
|
|
574
616
|
if (!pendingRevertVersion) return;
|
|
575
617
|
const payload = {};
|
|
576
618
|
if (typeof globalData?.id === "string") payload.id = globalData.id;
|
|
577
619
|
if (typeof pendingRevertVersion.versionId === "string") payload.versionId = pendingRevertVersion.versionId;
|
|
578
620
|
else if (typeof pendingRevertVersion.versionNumber === "number") payload.version = pendingRevertVersion.versionNumber;
|
|
579
|
-
const
|
|
580
|
-
form.reset(
|
|
621
|
+
const result_2 = await revertVersionMutation.mutateAsync(payload);
|
|
622
|
+
form.reset(result_2);
|
|
581
623
|
toast.success(t("version.revertSuccess"));
|
|
582
624
|
setPendingRevertVersion(null);
|
|
583
625
|
};
|
|
584
|
-
$[
|
|
585
|
-
$[
|
|
586
|
-
$[
|
|
587
|
-
$[
|
|
588
|
-
$[
|
|
589
|
-
$[
|
|
590
|
-
} else
|
|
591
|
-
const confirmRevertVersion =
|
|
592
|
-
const formatDate =
|
|
626
|
+
$[96] = form;
|
|
627
|
+
$[97] = globalData;
|
|
628
|
+
$[98] = pendingRevertVersion;
|
|
629
|
+
$[99] = revertVersionMutation;
|
|
630
|
+
$[100] = t;
|
|
631
|
+
$[101] = t43;
|
|
632
|
+
} else t43 = $[101];
|
|
633
|
+
const confirmRevertVersion = t43;
|
|
634
|
+
const formatDate = _temp2;
|
|
593
635
|
if (dataError) {
|
|
594
|
-
let
|
|
595
|
-
if ($[
|
|
596
|
-
|
|
597
|
-
$[
|
|
598
|
-
$[
|
|
599
|
-
} else
|
|
600
|
-
const
|
|
601
|
-
let
|
|
602
|
-
if ($[
|
|
603
|
-
|
|
636
|
+
let t44$1;
|
|
637
|
+
if ($[102] !== t) {
|
|
638
|
+
t44$1 = t("error.failedToLoad");
|
|
639
|
+
$[102] = t;
|
|
640
|
+
$[103] = t44$1;
|
|
641
|
+
} else t44$1 = $[103];
|
|
642
|
+
const t45$1 = dataError instanceof Error ? dataError.message : void 0;
|
|
643
|
+
let t46$1;
|
|
644
|
+
if ($[104] === Symbol.for("react.memo_cache_sentinel")) {
|
|
645
|
+
t46$1 = /* @__PURE__ */ jsx(Icon, {
|
|
604
646
|
icon: "ph:arrow-clockwise",
|
|
605
647
|
className: "size-3.5"
|
|
606
648
|
});
|
|
607
|
-
$[
|
|
608
|
-
} else
|
|
609
|
-
let
|
|
610
|
-
if ($[
|
|
611
|
-
|
|
612
|
-
$[
|
|
613
|
-
$[
|
|
614
|
-
} else
|
|
615
|
-
let
|
|
616
|
-
if ($[
|
|
617
|
-
|
|
649
|
+
$[104] = t46$1;
|
|
650
|
+
} else t46$1 = $[104];
|
|
651
|
+
let t47$1;
|
|
652
|
+
if ($[105] !== t) {
|
|
653
|
+
t47$1 = t("common.retry");
|
|
654
|
+
$[105] = t;
|
|
655
|
+
$[106] = t47$1;
|
|
656
|
+
} else t47$1 = $[106];
|
|
657
|
+
let t48$1;
|
|
658
|
+
if ($[107] !== t47$1) {
|
|
659
|
+
t48$1 = /* @__PURE__ */ jsxs(Button, {
|
|
618
660
|
variant: "outline",
|
|
619
661
|
size: "sm",
|
|
620
662
|
className: "gap-2",
|
|
621
|
-
onClick:
|
|
622
|
-
children: [
|
|
663
|
+
onClick: _temp3,
|
|
664
|
+
children: [t46$1, t47$1]
|
|
623
665
|
});
|
|
624
|
-
$[
|
|
625
|
-
$[
|
|
626
|
-
} else
|
|
627
|
-
let
|
|
628
|
-
if ($[
|
|
629
|
-
|
|
666
|
+
$[107] = t47$1;
|
|
667
|
+
$[108] = t48$1;
|
|
668
|
+
} else t48$1 = $[108];
|
|
669
|
+
let t49$1;
|
|
670
|
+
if ($[109] !== t44$1 || $[110] !== t45$1 || $[111] !== t48$1) {
|
|
671
|
+
t49$1 = /* @__PURE__ */ jsx(EmptyState, {
|
|
630
672
|
variant: "error",
|
|
631
673
|
iconName: "ph:warning-circle",
|
|
632
|
-
title:
|
|
633
|
-
description:
|
|
674
|
+
title: t44$1,
|
|
675
|
+
description: t45$1,
|
|
634
676
|
height: "h-64",
|
|
635
|
-
action:
|
|
677
|
+
action: t48$1
|
|
636
678
|
});
|
|
637
|
-
$[
|
|
638
|
-
$[
|
|
639
|
-
$[
|
|
640
|
-
$[
|
|
641
|
-
} else
|
|
642
|
-
return
|
|
679
|
+
$[109] = t44$1;
|
|
680
|
+
$[110] = t45$1;
|
|
681
|
+
$[111] = t48$1;
|
|
682
|
+
$[112] = t49$1;
|
|
683
|
+
} else t49$1 = $[112];
|
|
684
|
+
return t49$1;
|
|
643
685
|
}
|
|
644
686
|
if (dataLoading) {
|
|
645
|
-
let
|
|
646
|
-
if ($[
|
|
647
|
-
|
|
648
|
-
$[
|
|
649
|
-
} else
|
|
650
|
-
return
|
|
687
|
+
let t44$1;
|
|
688
|
+
if ($[113] === Symbol.for("react.memo_cache_sentinel")) {
|
|
689
|
+
t44$1 = /* @__PURE__ */ jsx(GlobalFormViewSkeleton, {});
|
|
690
|
+
$[113] = t44$1;
|
|
691
|
+
} else t44$1 = $[113];
|
|
692
|
+
return t44$1;
|
|
651
693
|
}
|
|
652
|
-
const
|
|
653
|
-
let
|
|
654
|
-
if ($[
|
|
655
|
-
|
|
656
|
-
$[
|
|
657
|
-
$[
|
|
658
|
-
$[
|
|
659
|
-
$[
|
|
660
|
-
} else
|
|
661
|
-
const globalLabel =
|
|
662
|
-
let
|
|
663
|
-
if ($[
|
|
664
|
-
|
|
665
|
-
$[
|
|
666
|
-
$[
|
|
667
|
-
$[
|
|
668
|
-
} else
|
|
669
|
-
let
|
|
670
|
-
if ($[
|
|
671
|
-
|
|
694
|
+
const t44 = resolvedConfig?.label ?? schemaFields?._globalLabel;
|
|
695
|
+
let t45;
|
|
696
|
+
if ($[114] !== globalName || $[115] !== resolveText || $[116] !== t44) {
|
|
697
|
+
t45 = resolveText(t44, globalName);
|
|
698
|
+
$[114] = globalName;
|
|
699
|
+
$[115] = resolveText;
|
|
700
|
+
$[116] = t44;
|
|
701
|
+
$[117] = t45;
|
|
702
|
+
} else t45 = $[117];
|
|
703
|
+
const globalLabel = t45;
|
|
704
|
+
let t46;
|
|
705
|
+
if ($[118] !== form || $[119] !== onSubmit) {
|
|
706
|
+
t46 = form.handleSubmit(onSubmit);
|
|
707
|
+
$[118] = form;
|
|
708
|
+
$[119] = onSubmit;
|
|
709
|
+
$[120] = t46;
|
|
710
|
+
} else t46 = $[120];
|
|
711
|
+
let t47;
|
|
712
|
+
if ($[121] !== contentLocale || $[122] !== localeOptions || $[123] !== setContentLocale) {
|
|
713
|
+
t47 = localeOptions.length > 0 && /* @__PURE__ */ jsx(LocaleSwitcher, {
|
|
672
714
|
locales: localeOptions,
|
|
673
715
|
value: contentLocale,
|
|
674
716
|
onChange: setContentLocale
|
|
675
717
|
});
|
|
676
|
-
$[
|
|
677
|
-
$[
|
|
678
|
-
$[
|
|
679
|
-
$[
|
|
680
|
-
} else
|
|
681
|
-
let
|
|
682
|
-
if ($[
|
|
683
|
-
|
|
718
|
+
$[121] = contentLocale;
|
|
719
|
+
$[122] = localeOptions;
|
|
720
|
+
$[123] = setContentLocale;
|
|
721
|
+
$[124] = t47;
|
|
722
|
+
} else t47 = $[124];
|
|
723
|
+
let t48;
|
|
724
|
+
if ($[125] !== currentStage || $[126] !== currentStageLabel || $[127] !== workflowEnabled) {
|
|
725
|
+
t48 = workflowEnabled && currentStage && /* @__PURE__ */ jsxs(Badge, {
|
|
684
726
|
variant: "outline",
|
|
685
727
|
className: "gap-1.5",
|
|
686
728
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
@@ -688,33 +730,33 @@ function GlobalFormView(t0) {
|
|
|
688
730
|
className: "size-3"
|
|
689
731
|
}), currentStageLabel]
|
|
690
732
|
});
|
|
691
|
-
$[
|
|
692
|
-
$[
|
|
693
|
-
$[
|
|
694
|
-
$[
|
|
695
|
-
} else
|
|
696
|
-
let
|
|
697
|
-
if ($[
|
|
698
|
-
|
|
699
|
-
$[
|
|
700
|
-
$[
|
|
701
|
-
$[
|
|
702
|
-
} else
|
|
703
|
-
let
|
|
704
|
-
if ($[
|
|
705
|
-
|
|
733
|
+
$[125] = currentStage;
|
|
734
|
+
$[126] = currentStageLabel;
|
|
735
|
+
$[127] = workflowEnabled;
|
|
736
|
+
$[128] = t48;
|
|
737
|
+
} else t48 = $[128];
|
|
738
|
+
let t49;
|
|
739
|
+
if ($[129] !== t47 || $[130] !== t48) {
|
|
740
|
+
t49 = /* @__PURE__ */ jsxs(Fragment, { children: [t47, t48] });
|
|
741
|
+
$[129] = t47;
|
|
742
|
+
$[130] = t48;
|
|
743
|
+
$[131] = t49;
|
|
744
|
+
} else t49 = $[131];
|
|
745
|
+
let t50;
|
|
746
|
+
if ($[132] !== globalData || $[133] !== showMeta || $[134] !== t) {
|
|
747
|
+
t50 = showMeta && globalData?.updatedAt ? /* @__PURE__ */ jsxs("span", { children: [
|
|
706
748
|
t("form.lastUpdated"),
|
|
707
749
|
": ",
|
|
708
750
|
formatDate(globalData.updatedAt)
|
|
709
751
|
] }) : void 0;
|
|
710
|
-
$[
|
|
711
|
-
$[
|
|
712
|
-
$[
|
|
713
|
-
$[
|
|
714
|
-
} else
|
|
715
|
-
let
|
|
716
|
-
if ($[
|
|
717
|
-
|
|
752
|
+
$[132] = globalData;
|
|
753
|
+
$[133] = showMeta;
|
|
754
|
+
$[134] = t;
|
|
755
|
+
$[135] = t50;
|
|
756
|
+
} else t50 = $[135];
|
|
757
|
+
let t51;
|
|
758
|
+
if ($[136] !== allowedTransitions || $[137] !== t || $[138] !== workflowEnabled) {
|
|
759
|
+
t51 = workflowEnabled && allowedTransitions.length > 0 && /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsxs(DropdownMenuTrigger, {
|
|
718
760
|
render: /* @__PURE__ */ jsx(Button, {
|
|
719
761
|
type: "button",
|
|
720
762
|
variant: "outline",
|
|
@@ -738,64 +780,64 @@ function GlobalFormView(t0) {
|
|
|
738
780
|
}), stage.label || stage.name]
|
|
739
781
|
}, stage.name))
|
|
740
782
|
})] });
|
|
741
|
-
$[
|
|
742
|
-
$[
|
|
743
|
-
$[
|
|
744
|
-
$[
|
|
745
|
-
} else
|
|
746
|
-
let
|
|
747
|
-
if ($[
|
|
748
|
-
|
|
749
|
-
$[
|
|
750
|
-
$[
|
|
751
|
-
} else
|
|
752
|
-
let
|
|
753
|
-
if ($[
|
|
754
|
-
|
|
755
|
-
$[
|
|
756
|
-
$[
|
|
757
|
-
} else
|
|
758
|
-
let
|
|
759
|
-
if ($[
|
|
760
|
-
|
|
783
|
+
$[136] = allowedTransitions;
|
|
784
|
+
$[137] = t;
|
|
785
|
+
$[138] = workflowEnabled;
|
|
786
|
+
$[139] = t51;
|
|
787
|
+
} else t51 = $[139];
|
|
788
|
+
let t52;
|
|
789
|
+
if ($[140] !== setIsHistoryOpen) {
|
|
790
|
+
t52 = () => setIsHistoryOpen(true);
|
|
791
|
+
$[140] = setIsHistoryOpen;
|
|
792
|
+
$[141] = t52;
|
|
793
|
+
} else t52 = $[141];
|
|
794
|
+
let t53;
|
|
795
|
+
if ($[142] !== t) {
|
|
796
|
+
t53 = t("history.title");
|
|
797
|
+
$[142] = t;
|
|
798
|
+
$[143] = t53;
|
|
799
|
+
} else t53 = $[143];
|
|
800
|
+
let t54;
|
|
801
|
+
if ($[144] === Symbol.for("react.memo_cache_sentinel")) {
|
|
802
|
+
t54 = /* @__PURE__ */ jsx(Icon, {
|
|
761
803
|
icon: "ph:clock-counter-clockwise",
|
|
762
804
|
className: "size-3.5"
|
|
763
805
|
});
|
|
764
|
-
$[
|
|
765
|
-
} else
|
|
766
|
-
let
|
|
767
|
-
if ($[
|
|
768
|
-
|
|
769
|
-
$[
|
|
770
|
-
$[
|
|
771
|
-
} else
|
|
772
|
-
let
|
|
773
|
-
if ($[
|
|
774
|
-
|
|
806
|
+
$[144] = t54;
|
|
807
|
+
} else t54 = $[144];
|
|
808
|
+
let t55;
|
|
809
|
+
if ($[145] !== t) {
|
|
810
|
+
t55 = t("history.title");
|
|
811
|
+
$[145] = t;
|
|
812
|
+
$[146] = t55;
|
|
813
|
+
} else t55 = $[146];
|
|
814
|
+
let t56;
|
|
815
|
+
if ($[147] !== t55) {
|
|
816
|
+
t56 = /* @__PURE__ */ jsx("span", {
|
|
775
817
|
className: "sr-only",
|
|
776
|
-
children:
|
|
818
|
+
children: t55
|
|
777
819
|
});
|
|
778
|
-
$[
|
|
779
|
-
$[
|
|
780
|
-
} else
|
|
781
|
-
let
|
|
782
|
-
if ($[
|
|
783
|
-
|
|
820
|
+
$[147] = t55;
|
|
821
|
+
$[148] = t56;
|
|
822
|
+
} else t56 = $[148];
|
|
823
|
+
let t57;
|
|
824
|
+
if ($[149] !== t52 || $[150] !== t53 || $[151] !== t56) {
|
|
825
|
+
t57 = /* @__PURE__ */ jsxs(Button, {
|
|
784
826
|
type: "button",
|
|
785
827
|
variant: "outline",
|
|
786
828
|
size: "icon-sm",
|
|
787
|
-
onClick:
|
|
788
|
-
title:
|
|
789
|
-
children: [
|
|
829
|
+
onClick: t52,
|
|
830
|
+
title: t53,
|
|
831
|
+
children: [t54, t56]
|
|
790
832
|
});
|
|
791
|
-
$[
|
|
792
|
-
$[
|
|
793
|
-
$[
|
|
794
|
-
$[
|
|
795
|
-
} else
|
|
796
|
-
let
|
|
797
|
-
if ($[
|
|
798
|
-
|
|
833
|
+
$[149] = t52;
|
|
834
|
+
$[150] = t53;
|
|
835
|
+
$[151] = t56;
|
|
836
|
+
$[152] = t57;
|
|
837
|
+
} else t57 = $[152];
|
|
838
|
+
let t58;
|
|
839
|
+
if ($[153] !== isSubmitting || $[154] !== t) {
|
|
840
|
+
t58 = isSubmitting ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Icon, {
|
|
799
841
|
icon: "ph:spinner-gap",
|
|
800
842
|
className: "size-4 animate-spin"
|
|
801
843
|
}), t("common.loading")] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Icon, {
|
|
@@ -803,297 +845,297 @@ function GlobalFormView(t0) {
|
|
|
803
845
|
width: 16,
|
|
804
846
|
height: 16
|
|
805
847
|
}), t("common.save")] });
|
|
806
|
-
$[
|
|
807
|
-
$[
|
|
808
|
-
$[
|
|
809
|
-
} else
|
|
810
|
-
let
|
|
811
|
-
if ($[
|
|
812
|
-
|
|
848
|
+
$[153] = isSubmitting;
|
|
849
|
+
$[154] = t;
|
|
850
|
+
$[155] = t58;
|
|
851
|
+
} else t58 = $[155];
|
|
852
|
+
let t59;
|
|
853
|
+
if ($[156] !== isSubmitting || $[157] !== t58) {
|
|
854
|
+
t59 = /* @__PURE__ */ jsx(Button, {
|
|
813
855
|
type: "submit",
|
|
814
856
|
size: "sm",
|
|
815
857
|
disabled: isSubmitting,
|
|
816
858
|
className: "gap-2",
|
|
817
|
-
children:
|
|
859
|
+
children: t58
|
|
818
860
|
});
|
|
819
|
-
$[
|
|
820
|
-
$[
|
|
821
|
-
$[
|
|
822
|
-
} else
|
|
823
|
-
let
|
|
824
|
-
if ($[
|
|
825
|
-
|
|
861
|
+
$[156] = isSubmitting;
|
|
862
|
+
$[157] = t58;
|
|
863
|
+
$[158] = t59;
|
|
864
|
+
} else t59 = $[158];
|
|
865
|
+
let t60;
|
|
866
|
+
if ($[159] !== headerActions || $[160] !== t51 || $[161] !== t57 || $[162] !== t59) {
|
|
867
|
+
t60 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
826
868
|
headerActions,
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
869
|
+
t51,
|
|
870
|
+
t57,
|
|
871
|
+
t59
|
|
830
872
|
] });
|
|
831
|
-
$[
|
|
832
|
-
$[
|
|
833
|
-
$[
|
|
834
|
-
$[
|
|
835
|
-
$[
|
|
836
|
-
} else
|
|
837
|
-
let
|
|
838
|
-
if ($[
|
|
839
|
-
|
|
873
|
+
$[159] = headerActions;
|
|
874
|
+
$[160] = t51;
|
|
875
|
+
$[161] = t57;
|
|
876
|
+
$[162] = t59;
|
|
877
|
+
$[163] = t60;
|
|
878
|
+
} else t60 = $[163];
|
|
879
|
+
let t61;
|
|
880
|
+
if ($[164] !== globalLabel || $[165] !== t49 || $[166] !== t50 || $[167] !== t60) {
|
|
881
|
+
t61 = /* @__PURE__ */ jsx(AdminViewHeader, {
|
|
840
882
|
className: "qa-global-form__header",
|
|
841
883
|
title: globalLabel,
|
|
842
|
-
titleAccessory:
|
|
843
|
-
meta:
|
|
844
|
-
actions:
|
|
884
|
+
titleAccessory: t49,
|
|
885
|
+
meta: t50,
|
|
886
|
+
actions: t60
|
|
845
887
|
});
|
|
846
|
-
$[
|
|
847
|
-
$[
|
|
848
|
-
$[
|
|
849
|
-
$[
|
|
850
|
-
$[
|
|
851
|
-
} else
|
|
852
|
-
let
|
|
853
|
-
if ($[
|
|
854
|
-
|
|
888
|
+
$[164] = globalLabel;
|
|
889
|
+
$[165] = t49;
|
|
890
|
+
$[166] = t50;
|
|
891
|
+
$[167] = t60;
|
|
892
|
+
$[168] = t61;
|
|
893
|
+
} else t61 = $[168];
|
|
894
|
+
let t62;
|
|
895
|
+
if ($[169] !== globalName || $[170] !== registry || $[171] !== resolvedConfig) {
|
|
896
|
+
t62 = /* @__PURE__ */ jsx(AutoFormFields, {
|
|
855
897
|
collection: globalName,
|
|
856
898
|
mode: "global",
|
|
857
899
|
config: resolvedConfig,
|
|
858
900
|
registry
|
|
859
901
|
});
|
|
860
|
-
$[
|
|
861
|
-
$[
|
|
862
|
-
$[
|
|
863
|
-
$[
|
|
864
|
-
} else
|
|
865
|
-
let
|
|
866
|
-
if ($[
|
|
867
|
-
|
|
868
|
-
onSubmit:
|
|
902
|
+
$[169] = globalName;
|
|
903
|
+
$[170] = registry;
|
|
904
|
+
$[171] = resolvedConfig;
|
|
905
|
+
$[172] = t62;
|
|
906
|
+
} else t62 = $[172];
|
|
907
|
+
let t63;
|
|
908
|
+
if ($[173] !== t46 || $[174] !== t61 || $[175] !== t62) {
|
|
909
|
+
t63 = /* @__PURE__ */ jsxs("form", {
|
|
910
|
+
onSubmit: t46,
|
|
869
911
|
className: "qa-global-form w-full space-y-4",
|
|
870
|
-
children: [
|
|
912
|
+
children: [t61, t62]
|
|
871
913
|
});
|
|
872
|
-
$[
|
|
873
|
-
$[
|
|
874
|
-
$[
|
|
875
|
-
$[
|
|
876
|
-
} else
|
|
877
|
-
let
|
|
878
|
-
if ($[
|
|
879
|
-
|
|
880
|
-
$[
|
|
881
|
-
$[
|
|
882
|
-
} else
|
|
883
|
-
let
|
|
884
|
-
if ($[
|
|
885
|
-
|
|
886
|
-
$[
|
|
887
|
-
$[
|
|
888
|
-
} else
|
|
889
|
-
const
|
|
890
|
-
const
|
|
891
|
-
let
|
|
892
|
-
if ($[
|
|
893
|
-
|
|
914
|
+
$[173] = t46;
|
|
915
|
+
$[174] = t61;
|
|
916
|
+
$[175] = t62;
|
|
917
|
+
$[176] = t63;
|
|
918
|
+
} else t63 = $[176];
|
|
919
|
+
let t64;
|
|
920
|
+
if ($[177] !== auditData) {
|
|
921
|
+
t64 = auditData ?? [];
|
|
922
|
+
$[177] = auditData;
|
|
923
|
+
$[178] = t64;
|
|
924
|
+
} else t64 = $[178];
|
|
925
|
+
let t65;
|
|
926
|
+
if ($[179] !== versionsData) {
|
|
927
|
+
t65 = versionsData ?? [];
|
|
928
|
+
$[179] = versionsData;
|
|
929
|
+
$[180] = t65;
|
|
930
|
+
} else t65 = $[180];
|
|
931
|
+
const t66 = t65;
|
|
932
|
+
const t67 = globalSchema?.fields;
|
|
933
|
+
let t68;
|
|
934
|
+
if ($[181] === Symbol.for("react.memo_cache_sentinel")) {
|
|
935
|
+
t68 = async (version) => {
|
|
894
936
|
setPendingRevertVersion(version);
|
|
895
937
|
};
|
|
896
|
-
$[
|
|
897
|
-
} else
|
|
898
|
-
const
|
|
899
|
-
let
|
|
900
|
-
if ($[
|
|
901
|
-
|
|
938
|
+
$[181] = t68;
|
|
939
|
+
} else t68 = $[181];
|
|
940
|
+
const t69 = !!globalSchema?.options?.versioning;
|
|
941
|
+
let t70;
|
|
942
|
+
if ($[182] !== auditLoading || $[183] !== isHistoryOpen || $[184] !== revertVersionMutation.isPending || $[185] !== setIsHistoryOpen || $[186] !== t64 || $[187] !== t66 || $[188] !== t67 || $[189] !== t69 || $[190] !== versionsLoading) {
|
|
943
|
+
t70 = /* @__PURE__ */ jsx(HistorySidebar, {
|
|
902
944
|
open: isHistoryOpen,
|
|
903
945
|
onOpenChange: setIsHistoryOpen,
|
|
904
|
-
auditEntries:
|
|
946
|
+
auditEntries: t64,
|
|
905
947
|
isLoadingAudit: auditLoading,
|
|
906
|
-
versions:
|
|
907
|
-
fields:
|
|
948
|
+
versions: t66,
|
|
949
|
+
fields: t67,
|
|
908
950
|
isLoadingVersions: versionsLoading,
|
|
909
951
|
isReverting: revertVersionMutation.isPending,
|
|
910
|
-
onRevert:
|
|
911
|
-
showVersionsTab:
|
|
952
|
+
onRevert: t68,
|
|
953
|
+
showVersionsTab: t69
|
|
912
954
|
});
|
|
913
|
-
$[
|
|
914
|
-
$[
|
|
915
|
-
$[
|
|
916
|
-
$[
|
|
917
|
-
$[
|
|
918
|
-
$[
|
|
919
|
-
$[
|
|
920
|
-
$[
|
|
921
|
-
$[
|
|
922
|
-
$[
|
|
923
|
-
} else
|
|
924
|
-
const
|
|
925
|
-
let
|
|
926
|
-
if ($[
|
|
927
|
-
|
|
955
|
+
$[182] = auditLoading;
|
|
956
|
+
$[183] = isHistoryOpen;
|
|
957
|
+
$[184] = revertVersionMutation.isPending;
|
|
958
|
+
$[185] = setIsHistoryOpen;
|
|
959
|
+
$[186] = t64;
|
|
960
|
+
$[187] = t66;
|
|
961
|
+
$[188] = t67;
|
|
962
|
+
$[189] = t69;
|
|
963
|
+
$[190] = versionsLoading;
|
|
964
|
+
$[191] = t70;
|
|
965
|
+
} else t70 = $[191];
|
|
966
|
+
const t71 = !!pendingRevertVersion;
|
|
967
|
+
let t72;
|
|
968
|
+
if ($[192] === Symbol.for("react.memo_cache_sentinel")) {
|
|
969
|
+
t72 = (open) => {
|
|
928
970
|
if (!open) setPendingRevertVersion(null);
|
|
929
971
|
};
|
|
930
|
-
$[
|
|
931
|
-
} else
|
|
932
|
-
let t68;
|
|
933
|
-
if ($[185] !== t) {
|
|
934
|
-
t68 = t("version.revertConfirmTitle");
|
|
935
|
-
$[185] = t;
|
|
936
|
-
$[186] = t68;
|
|
937
|
-
} else t68 = $[186];
|
|
938
|
-
const t69 = pendingRevertVersion?.versionNumber ?? pendingRevertVersion?.versionId ?? "-";
|
|
939
|
-
let t70;
|
|
940
|
-
if ($[187] !== t || $[188] !== t69) {
|
|
941
|
-
t70 = t("version.revertConfirmDescription", { number: t69 });
|
|
942
|
-
$[187] = t;
|
|
943
|
-
$[188] = t69;
|
|
944
|
-
$[189] = t70;
|
|
945
|
-
} else t70 = $[189];
|
|
946
|
-
let t71;
|
|
947
|
-
if ($[190] !== t) {
|
|
948
|
-
t71 = t("version.revert");
|
|
949
|
-
$[190] = t;
|
|
950
|
-
$[191] = t71;
|
|
951
|
-
} else t71 = $[191];
|
|
952
|
-
let t72;
|
|
953
|
-
if ($[192] !== t) {
|
|
954
|
-
t72 = t("common.cancel");
|
|
955
|
-
$[192] = t;
|
|
956
|
-
$[193] = t72;
|
|
957
|
-
} else t72 = $[193];
|
|
972
|
+
$[192] = t72;
|
|
973
|
+
} else t72 = $[192];
|
|
958
974
|
let t73;
|
|
959
|
-
if ($[
|
|
960
|
-
t73 =
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
975
|
+
if ($[193] !== t) {
|
|
976
|
+
t73 = t("version.revertConfirmTitle");
|
|
977
|
+
$[193] = t;
|
|
978
|
+
$[194] = t73;
|
|
979
|
+
} else t73 = $[194];
|
|
980
|
+
const t74 = pendingRevertVersion?.versionNumber ?? pendingRevertVersion?.versionId ?? "-";
|
|
981
|
+
let t75;
|
|
982
|
+
if ($[195] !== t || $[196] !== t74) {
|
|
983
|
+
t75 = t("version.revertConfirmDescription", { number: t74 });
|
|
984
|
+
$[195] = t;
|
|
985
|
+
$[196] = t74;
|
|
986
|
+
$[197] = t75;
|
|
987
|
+
} else t75 = $[197];
|
|
988
|
+
let t76;
|
|
989
|
+
if ($[198] !== t) {
|
|
990
|
+
t76 = t("version.revert");
|
|
991
|
+
$[198] = t;
|
|
992
|
+
$[199] = t76;
|
|
993
|
+
} else t76 = $[199];
|
|
994
|
+
let t77;
|
|
995
|
+
if ($[200] !== t) {
|
|
996
|
+
t77 = t("common.cancel");
|
|
997
|
+
$[200] = t;
|
|
998
|
+
$[201] = t77;
|
|
999
|
+
} else t77 = $[201];
|
|
1000
|
+
let t78;
|
|
1001
|
+
if ($[202] !== t73 || $[203] !== t75 || $[204] !== t76 || $[205] !== t77) {
|
|
1002
|
+
t78 = {
|
|
1003
|
+
title: t73,
|
|
1004
|
+
description: t75,
|
|
1005
|
+
confirmLabel: t76,
|
|
1006
|
+
cancelLabel: t77,
|
|
965
1007
|
destructive: false
|
|
966
1008
|
};
|
|
967
|
-
$[
|
|
968
|
-
$[
|
|
969
|
-
$[
|
|
970
|
-
$[
|
|
971
|
-
$[
|
|
972
|
-
} else
|
|
973
|
-
let
|
|
974
|
-
if ($[
|
|
975
|
-
|
|
976
|
-
open:
|
|
977
|
-
onOpenChange:
|
|
978
|
-
config:
|
|
1009
|
+
$[202] = t73;
|
|
1010
|
+
$[203] = t75;
|
|
1011
|
+
$[204] = t76;
|
|
1012
|
+
$[205] = t77;
|
|
1013
|
+
$[206] = t78;
|
|
1014
|
+
} else t78 = $[206];
|
|
1015
|
+
let t79;
|
|
1016
|
+
if ($[207] !== confirmRevertVersion || $[208] !== revertVersionMutation.isPending || $[209] !== t71 || $[210] !== t78) {
|
|
1017
|
+
t79 = /* @__PURE__ */ jsx(ConfirmationDialog, {
|
|
1018
|
+
open: t71,
|
|
1019
|
+
onOpenChange: t72,
|
|
1020
|
+
config: t78,
|
|
979
1021
|
onConfirm: confirmRevertVersion,
|
|
980
1022
|
loading: revertVersionMutation.isPending
|
|
981
1023
|
});
|
|
982
|
-
$[
|
|
983
|
-
$[
|
|
984
|
-
$[
|
|
985
|
-
$[
|
|
986
|
-
$[
|
|
987
|
-
} else
|
|
988
|
-
const
|
|
989
|
-
let
|
|
990
|
-
if ($[
|
|
991
|
-
|
|
1024
|
+
$[207] = confirmRevertVersion;
|
|
1025
|
+
$[208] = revertVersionMutation.isPending;
|
|
1026
|
+
$[209] = t71;
|
|
1027
|
+
$[210] = t78;
|
|
1028
|
+
$[211] = t79;
|
|
1029
|
+
} else t79 = $[211];
|
|
1030
|
+
const t80 = !!transitionTarget;
|
|
1031
|
+
let t81;
|
|
1032
|
+
if ($[212] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1033
|
+
t81 = (open_0) => {
|
|
992
1034
|
if (!open_0) {
|
|
993
1035
|
setTransitionTarget(null);
|
|
994
1036
|
setTransitionSchedule(false);
|
|
995
1037
|
setTransitionScheduledAt(null);
|
|
996
1038
|
}
|
|
997
1039
|
};
|
|
998
|
-
$[
|
|
999
|
-
} else
|
|
1000
|
-
let
|
|
1001
|
-
if ($[
|
|
1002
|
-
|
|
1040
|
+
$[212] = t81;
|
|
1041
|
+
} else t81 = $[212];
|
|
1042
|
+
let t82;
|
|
1043
|
+
if ($[213] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1044
|
+
t82 = /* @__PURE__ */ jsx(Icon, {
|
|
1003
1045
|
icon: "ph:arrows-left-right",
|
|
1004
1046
|
className: "size-5"
|
|
1005
1047
|
});
|
|
1006
|
-
$[
|
|
1007
|
-
} else
|
|
1008
|
-
const
|
|
1009
|
-
let
|
|
1010
|
-
if ($[
|
|
1011
|
-
|
|
1012
|
-
$[
|
|
1013
|
-
$[
|
|
1014
|
-
$[
|
|
1015
|
-
} else
|
|
1016
|
-
let
|
|
1017
|
-
if ($[
|
|
1018
|
-
|
|
1048
|
+
$[213] = t82;
|
|
1049
|
+
} else t82 = $[213];
|
|
1050
|
+
const t83 = transitionTarget?.label ?? transitionTarget?.name ?? "";
|
|
1051
|
+
let t84;
|
|
1052
|
+
if ($[214] !== t || $[215] !== t83) {
|
|
1053
|
+
t84 = t("workflow.transitionTo", { stage: t83 });
|
|
1054
|
+
$[214] = t;
|
|
1055
|
+
$[215] = t83;
|
|
1056
|
+
$[216] = t84;
|
|
1057
|
+
} else t84 = $[216];
|
|
1058
|
+
let t85;
|
|
1059
|
+
if ($[217] !== t84) {
|
|
1060
|
+
t85 = /* @__PURE__ */ jsxs(DialogTitle, {
|
|
1019
1061
|
className: "flex items-center gap-2",
|
|
1020
|
-
children: [
|
|
1062
|
+
children: [t82, t84]
|
|
1021
1063
|
});
|
|
1022
|
-
$[
|
|
1023
|
-
$[
|
|
1024
|
-
} else
|
|
1025
|
-
const
|
|
1026
|
-
let
|
|
1027
|
-
if ($[
|
|
1028
|
-
|
|
1064
|
+
$[217] = t84;
|
|
1065
|
+
$[218] = t85;
|
|
1066
|
+
} else t85 = $[218];
|
|
1067
|
+
const t86 = transitionTarget?.label ?? transitionTarget?.name ?? "";
|
|
1068
|
+
let t87;
|
|
1069
|
+
if ($[219] !== currentStageLabel || $[220] !== t || $[221] !== t86) {
|
|
1070
|
+
t87 = t("workflow.transitionDescription", {
|
|
1029
1071
|
from: currentStageLabel,
|
|
1030
|
-
to:
|
|
1072
|
+
to: t86
|
|
1031
1073
|
});
|
|
1032
|
-
$[
|
|
1033
|
-
$[
|
|
1034
|
-
$[
|
|
1035
|
-
$[
|
|
1036
|
-
} else
|
|
1037
|
-
let
|
|
1038
|
-
if ($[
|
|
1039
|
-
|
|
1040
|
-
$[
|
|
1041
|
-
$[
|
|
1042
|
-
} else
|
|
1043
|
-
let
|
|
1044
|
-
if ($[
|
|
1045
|
-
|
|
1046
|
-
$[
|
|
1047
|
-
$[
|
|
1048
|
-
$[
|
|
1049
|
-
} else
|
|
1050
|
-
let
|
|
1051
|
-
if ($[
|
|
1052
|
-
|
|
1074
|
+
$[219] = currentStageLabel;
|
|
1075
|
+
$[220] = t;
|
|
1076
|
+
$[221] = t86;
|
|
1077
|
+
$[222] = t87;
|
|
1078
|
+
} else t87 = $[222];
|
|
1079
|
+
let t88;
|
|
1080
|
+
if ($[223] !== t87) {
|
|
1081
|
+
t88 = /* @__PURE__ */ jsx(DialogDescription, { children: t87 });
|
|
1082
|
+
$[223] = t87;
|
|
1083
|
+
$[224] = t88;
|
|
1084
|
+
} else t88 = $[224];
|
|
1085
|
+
let t89;
|
|
1086
|
+
if ($[225] !== t85 || $[226] !== t88) {
|
|
1087
|
+
t89 = /* @__PURE__ */ jsxs(DialogHeader, { children: [t85, t88] });
|
|
1088
|
+
$[225] = t85;
|
|
1089
|
+
$[226] = t88;
|
|
1090
|
+
$[227] = t89;
|
|
1091
|
+
} else t89 = $[227];
|
|
1092
|
+
let t90;
|
|
1093
|
+
if ($[228] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1094
|
+
t90 = (val) => {
|
|
1053
1095
|
setTransitionSchedule(!!val);
|
|
1054
1096
|
if (!val) setTransitionScheduledAt(null);
|
|
1055
1097
|
};
|
|
1056
|
-
$[
|
|
1057
|
-
} else
|
|
1058
|
-
let
|
|
1059
|
-
if ($[
|
|
1060
|
-
|
|
1098
|
+
$[228] = t90;
|
|
1099
|
+
} else t90 = $[228];
|
|
1100
|
+
let t91;
|
|
1101
|
+
if ($[229] !== transitionSchedule) {
|
|
1102
|
+
t91 = /* @__PURE__ */ jsx(Checkbox, {
|
|
1061
1103
|
checked: transitionSchedule,
|
|
1062
|
-
onCheckedChange:
|
|
1104
|
+
onCheckedChange: t90,
|
|
1063
1105
|
id: "global-transition-schedule"
|
|
1064
1106
|
});
|
|
1065
|
-
$[
|
|
1066
|
-
$[
|
|
1067
|
-
} else
|
|
1068
|
-
let
|
|
1069
|
-
if ($[
|
|
1070
|
-
|
|
1071
|
-
$[
|
|
1072
|
-
$[
|
|
1073
|
-
} else
|
|
1074
|
-
let
|
|
1075
|
-
if ($[
|
|
1076
|
-
|
|
1107
|
+
$[229] = transitionSchedule;
|
|
1108
|
+
$[230] = t91;
|
|
1109
|
+
} else t91 = $[230];
|
|
1110
|
+
let t92;
|
|
1111
|
+
if ($[231] !== t) {
|
|
1112
|
+
t92 = t("workflow.scheduleLabel");
|
|
1113
|
+
$[231] = t;
|
|
1114
|
+
$[232] = t92;
|
|
1115
|
+
} else t92 = $[232];
|
|
1116
|
+
let t93;
|
|
1117
|
+
if ($[233] !== t92) {
|
|
1118
|
+
t93 = /* @__PURE__ */ jsx(Label, {
|
|
1077
1119
|
htmlFor: "global-transition-schedule",
|
|
1078
1120
|
className: "cursor-pointer text-sm",
|
|
1079
|
-
children:
|
|
1121
|
+
children: t92
|
|
1080
1122
|
});
|
|
1081
|
-
$[
|
|
1082
|
-
$[
|
|
1083
|
-
} else
|
|
1084
|
-
let
|
|
1085
|
-
if ($[
|
|
1086
|
-
|
|
1123
|
+
$[233] = t92;
|
|
1124
|
+
$[234] = t93;
|
|
1125
|
+
} else t93 = $[234];
|
|
1126
|
+
let t94;
|
|
1127
|
+
if ($[235] !== t91 || $[236] !== t93) {
|
|
1128
|
+
t94 = /* @__PURE__ */ jsxs("div", {
|
|
1087
1129
|
className: "flex items-center gap-2",
|
|
1088
|
-
children: [
|
|
1130
|
+
children: [t91, t93]
|
|
1089
1131
|
});
|
|
1090
|
-
$[
|
|
1091
|
-
$[
|
|
1092
|
-
$[
|
|
1093
|
-
} else
|
|
1094
|
-
let
|
|
1095
|
-
if ($[
|
|
1096
|
-
|
|
1132
|
+
$[235] = t91;
|
|
1133
|
+
$[236] = t93;
|
|
1134
|
+
$[237] = t94;
|
|
1135
|
+
} else t94 = $[237];
|
|
1136
|
+
let t95;
|
|
1137
|
+
if ($[238] !== t || $[239] !== transitionSchedule || $[240] !== transitionScheduledAt) {
|
|
1138
|
+
t95 = transitionSchedule && /* @__PURE__ */ jsxs("div", {
|
|
1097
1139
|
className: "space-y-1.5 pl-6",
|
|
1098
1140
|
children: [
|
|
1099
1141
|
/* @__PURE__ */ jsx(Label, {
|
|
@@ -1111,233 +1153,233 @@ function GlobalFormView(t0) {
|
|
|
1111
1153
|
})
|
|
1112
1154
|
]
|
|
1113
1155
|
});
|
|
1114
|
-
$[
|
|
1115
|
-
$[
|
|
1116
|
-
$[
|
|
1117
|
-
$[
|
|
1118
|
-
} else
|
|
1119
|
-
let
|
|
1120
|
-
if ($[
|
|
1121
|
-
|
|
1156
|
+
$[238] = t;
|
|
1157
|
+
$[239] = transitionSchedule;
|
|
1158
|
+
$[240] = transitionScheduledAt;
|
|
1159
|
+
$[241] = t95;
|
|
1160
|
+
} else t95 = $[241];
|
|
1161
|
+
let t96;
|
|
1162
|
+
if ($[242] !== t94 || $[243] !== t95) {
|
|
1163
|
+
t96 = /* @__PURE__ */ jsxs("div", {
|
|
1122
1164
|
className: "space-y-3 py-2",
|
|
1123
|
-
children: [
|
|
1165
|
+
children: [t94, t95]
|
|
1124
1166
|
});
|
|
1125
|
-
$[
|
|
1126
|
-
$[
|
|
1127
|
-
$[
|
|
1128
|
-
} else
|
|
1129
|
-
let
|
|
1130
|
-
if ($[
|
|
1131
|
-
|
|
1167
|
+
$[242] = t94;
|
|
1168
|
+
$[243] = t95;
|
|
1169
|
+
$[244] = t96;
|
|
1170
|
+
} else t96 = $[244];
|
|
1171
|
+
let t97;
|
|
1172
|
+
if ($[245] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1173
|
+
t97 = () => {
|
|
1132
1174
|
setTransitionTarget(null);
|
|
1133
1175
|
setTransitionSchedule(false);
|
|
1134
1176
|
setTransitionScheduledAt(null);
|
|
1135
1177
|
};
|
|
1136
|
-
$[
|
|
1137
|
-
} else
|
|
1138
|
-
let
|
|
1139
|
-
if ($[
|
|
1140
|
-
|
|
1141
|
-
$[
|
|
1142
|
-
$[
|
|
1143
|
-
} else
|
|
1144
|
-
let
|
|
1145
|
-
if ($[
|
|
1146
|
-
|
|
1178
|
+
$[245] = t97;
|
|
1179
|
+
} else t97 = $[245];
|
|
1180
|
+
let t98;
|
|
1181
|
+
if ($[246] !== t) {
|
|
1182
|
+
t98 = t("common.cancel");
|
|
1183
|
+
$[246] = t;
|
|
1184
|
+
$[247] = t98;
|
|
1185
|
+
} else t98 = $[247];
|
|
1186
|
+
let t99;
|
|
1187
|
+
if ($[248] !== t98) {
|
|
1188
|
+
t99 = /* @__PURE__ */ jsx(Button, {
|
|
1147
1189
|
type: "button",
|
|
1148
1190
|
variant: "outline",
|
|
1149
|
-
onClick:
|
|
1150
|
-
children:
|
|
1191
|
+
onClick: t97,
|
|
1192
|
+
children: t98
|
|
1151
1193
|
});
|
|
1152
|
-
$[
|
|
1153
|
-
$[
|
|
1154
|
-
} else
|
|
1155
|
-
const
|
|
1156
|
-
let
|
|
1157
|
-
if ($[
|
|
1158
|
-
|
|
1194
|
+
$[248] = t98;
|
|
1195
|
+
$[249] = t99;
|
|
1196
|
+
} else t99 = $[249];
|
|
1197
|
+
const t100 = transitionMutation.isPending || transitionSchedule && !transitionScheduledAt;
|
|
1198
|
+
let t101;
|
|
1199
|
+
if ($[250] !== transitionMutation.isPending) {
|
|
1200
|
+
t101 = transitionMutation.isPending && /* @__PURE__ */ jsx(Icon, {
|
|
1159
1201
|
icon: "ph:spinner-gap",
|
|
1160
1202
|
className: "size-4 animate-spin"
|
|
1161
1203
|
});
|
|
1162
|
-
$[
|
|
1163
|
-
$[
|
|
1164
|
-
} else
|
|
1165
|
-
let
|
|
1166
|
-
if ($[
|
|
1167
|
-
|
|
1168
|
-
$[
|
|
1169
|
-
$[
|
|
1170
|
-
$[
|
|
1171
|
-
} else
|
|
1172
|
-
let
|
|
1173
|
-
if ($[
|
|
1174
|
-
|
|
1204
|
+
$[250] = transitionMutation.isPending;
|
|
1205
|
+
$[251] = t101;
|
|
1206
|
+
} else t101 = $[251];
|
|
1207
|
+
let t102;
|
|
1208
|
+
if ($[252] !== t || $[253] !== transitionSchedule) {
|
|
1209
|
+
t102 = transitionSchedule ? t("workflow.scheduleLabel") : t("workflow.transition");
|
|
1210
|
+
$[252] = t;
|
|
1211
|
+
$[253] = transitionSchedule;
|
|
1212
|
+
$[254] = t102;
|
|
1213
|
+
} else t102 = $[254];
|
|
1214
|
+
let t103;
|
|
1215
|
+
if ($[255] !== confirmTransition || $[256] !== t100 || $[257] !== t101 || $[258] !== t102) {
|
|
1216
|
+
t103 = /* @__PURE__ */ jsxs(Button, {
|
|
1175
1217
|
type: "button",
|
|
1176
1218
|
onClick: confirmTransition,
|
|
1177
|
-
disabled:
|
|
1219
|
+
disabled: t100,
|
|
1178
1220
|
className: "gap-2",
|
|
1179
|
-
children: [
|
|
1180
|
-
});
|
|
1181
|
-
$[247] = confirmTransition;
|
|
1182
|
-
$[248] = t95;
|
|
1183
|
-
$[249] = t96;
|
|
1184
|
-
$[250] = t97;
|
|
1185
|
-
$[251] = t98;
|
|
1186
|
-
} else t98 = $[251];
|
|
1187
|
-
let t99;
|
|
1188
|
-
if ($[252] !== t94 || $[253] !== t98) {
|
|
1189
|
-
t99 = /* @__PURE__ */ jsxs(DialogFooter, { children: [t94, t98] });
|
|
1190
|
-
$[252] = t94;
|
|
1191
|
-
$[253] = t98;
|
|
1192
|
-
$[254] = t99;
|
|
1193
|
-
} else t99 = $[254];
|
|
1194
|
-
let t100;
|
|
1195
|
-
if ($[255] !== t84 || $[256] !== t91 || $[257] !== t99) {
|
|
1196
|
-
t100 = /* @__PURE__ */ jsxs(DialogContent, { children: [
|
|
1197
|
-
t84,
|
|
1198
|
-
t91,
|
|
1199
|
-
t99
|
|
1200
|
-
] });
|
|
1201
|
-
$[255] = t84;
|
|
1202
|
-
$[256] = t91;
|
|
1203
|
-
$[257] = t99;
|
|
1204
|
-
$[258] = t100;
|
|
1205
|
-
} else t100 = $[258];
|
|
1206
|
-
let t101;
|
|
1207
|
-
if ($[259] !== t100 || $[260] !== t75) {
|
|
1208
|
-
t101 = /* @__PURE__ */ jsx(Dialog, {
|
|
1209
|
-
open: t75,
|
|
1210
|
-
onOpenChange: t76,
|
|
1211
|
-
children: t100
|
|
1221
|
+
children: [t101, t102]
|
|
1212
1222
|
});
|
|
1213
|
-
$[
|
|
1214
|
-
$[
|
|
1215
|
-
$[
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
if ($[262] !== handleLocaleChangeCancel) {
|
|
1220
|
-
t103 = (open_1) => !open_1 && handleLocaleChangeCancel();
|
|
1221
|
-
$[262] = handleLocaleChangeCancel;
|
|
1222
|
-
$[263] = t103;
|
|
1223
|
-
} else t103 = $[263];
|
|
1223
|
+
$[255] = confirmTransition;
|
|
1224
|
+
$[256] = t100;
|
|
1225
|
+
$[257] = t101;
|
|
1226
|
+
$[258] = t102;
|
|
1227
|
+
$[259] = t103;
|
|
1228
|
+
} else t103 = $[259];
|
|
1224
1229
|
let t104;
|
|
1225
|
-
if ($[
|
|
1226
|
-
t104 =
|
|
1227
|
-
$[
|
|
1228
|
-
$[
|
|
1229
|
-
|
|
1230
|
+
if ($[260] !== t103 || $[261] !== t99) {
|
|
1231
|
+
t104 = /* @__PURE__ */ jsxs(DialogFooter, { children: [t99, t103] });
|
|
1232
|
+
$[260] = t103;
|
|
1233
|
+
$[261] = t99;
|
|
1234
|
+
$[262] = t104;
|
|
1235
|
+
} else t104 = $[262];
|
|
1230
1236
|
let t105;
|
|
1231
|
-
if ($[
|
|
1232
|
-
t105 = /* @__PURE__ */
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1237
|
+
if ($[263] !== t104 || $[264] !== t89 || $[265] !== t96) {
|
|
1238
|
+
t105 = /* @__PURE__ */ jsxs(DialogContent, { children: [
|
|
1239
|
+
t89,
|
|
1240
|
+
t96,
|
|
1241
|
+
t104
|
|
1242
|
+
] });
|
|
1243
|
+
$[263] = t104;
|
|
1244
|
+
$[264] = t89;
|
|
1245
|
+
$[265] = t96;
|
|
1246
|
+
$[266] = t105;
|
|
1247
|
+
} else t105 = $[266];
|
|
1236
1248
|
let t106;
|
|
1237
|
-
if ($[268] !==
|
|
1238
|
-
t106 =
|
|
1239
|
-
|
|
1249
|
+
if ($[267] !== t105 || $[268] !== t80) {
|
|
1250
|
+
t106 = /* @__PURE__ */ jsx(Dialog, {
|
|
1251
|
+
open: t80,
|
|
1252
|
+
onOpenChange: t81,
|
|
1253
|
+
children: t105
|
|
1254
|
+
});
|
|
1255
|
+
$[267] = t105;
|
|
1256
|
+
$[268] = t80;
|
|
1240
1257
|
$[269] = t106;
|
|
1241
1258
|
} else t106 = $[269];
|
|
1242
|
-
|
|
1243
|
-
if ($[270] !== t106) {
|
|
1244
|
-
t107 = /* @__PURE__ */ jsx(DialogDescription, { children: t106 });
|
|
1245
|
-
$[270] = t106;
|
|
1246
|
-
$[271] = t107;
|
|
1247
|
-
} else t107 = $[271];
|
|
1259
|
+
const t107 = localeChangeDialog.open;
|
|
1248
1260
|
let t108;
|
|
1249
|
-
if ($[
|
|
1250
|
-
t108 =
|
|
1251
|
-
$[
|
|
1252
|
-
$[
|
|
1253
|
-
|
|
1254
|
-
} else t108 = $[274];
|
|
1261
|
+
if ($[270] !== handleLocaleChangeCancel) {
|
|
1262
|
+
t108 = (open_1) => !open_1 && handleLocaleChangeCancel();
|
|
1263
|
+
$[270] = handleLocaleChangeCancel;
|
|
1264
|
+
$[271] = t108;
|
|
1265
|
+
} else t108 = $[271];
|
|
1255
1266
|
let t109;
|
|
1256
|
-
if ($[
|
|
1257
|
-
t109 = t("
|
|
1258
|
-
$[
|
|
1259
|
-
$[
|
|
1260
|
-
} else t109 = $[
|
|
1267
|
+
if ($[272] !== t) {
|
|
1268
|
+
t109 = t("locale.unsavedChanges");
|
|
1269
|
+
$[272] = t;
|
|
1270
|
+
$[273] = t109;
|
|
1271
|
+
} else t109 = $[273];
|
|
1261
1272
|
let t110;
|
|
1262
|
-
if ($[
|
|
1263
|
-
t110 = /* @__PURE__ */ jsx(
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
});
|
|
1268
|
-
$[277] = handleLocaleChangeCancel;
|
|
1269
|
-
$[278] = t109;
|
|
1270
|
-
$[279] = t110;
|
|
1271
|
-
} else t110 = $[279];
|
|
1273
|
+
if ($[274] !== t109) {
|
|
1274
|
+
t110 = /* @__PURE__ */ jsx(DialogTitle, { children: t109 });
|
|
1275
|
+
$[274] = t109;
|
|
1276
|
+
$[275] = t110;
|
|
1277
|
+
} else t110 = $[275];
|
|
1272
1278
|
let t111;
|
|
1273
|
-
if ($[
|
|
1274
|
-
t111 = t("locale.
|
|
1275
|
-
$[
|
|
1276
|
-
$[
|
|
1277
|
-
} else t111 = $[
|
|
1279
|
+
if ($[276] !== t) {
|
|
1280
|
+
t111 = t("locale.unsavedChangesDescription");
|
|
1281
|
+
$[276] = t;
|
|
1282
|
+
$[277] = t111;
|
|
1283
|
+
} else t111 = $[277];
|
|
1278
1284
|
let t112;
|
|
1279
|
-
if ($[
|
|
1280
|
-
t112 = /* @__PURE__ */ jsx(
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
});
|
|
1285
|
-
$[282] = handleLocaleChangeConfirm;
|
|
1286
|
-
$[283] = t111;
|
|
1287
|
-
$[284] = t112;
|
|
1288
|
-
} else t112 = $[284];
|
|
1285
|
+
if ($[278] !== t111) {
|
|
1286
|
+
t112 = /* @__PURE__ */ jsx(DialogDescription, { children: t111 });
|
|
1287
|
+
$[278] = t111;
|
|
1288
|
+
$[279] = t112;
|
|
1289
|
+
} else t112 = $[279];
|
|
1289
1290
|
let t113;
|
|
1290
|
-
if ($[
|
|
1291
|
-
t113 = /* @__PURE__ */ jsxs(
|
|
1292
|
-
$[
|
|
1293
|
-
$[
|
|
1294
|
-
$[
|
|
1295
|
-
} else t113 = $[
|
|
1291
|
+
if ($[280] !== t110 || $[281] !== t112) {
|
|
1292
|
+
t113 = /* @__PURE__ */ jsxs(DialogHeader, { children: [t110, t112] });
|
|
1293
|
+
$[280] = t110;
|
|
1294
|
+
$[281] = t112;
|
|
1295
|
+
$[282] = t113;
|
|
1296
|
+
} else t113 = $[282];
|
|
1296
1297
|
let t114;
|
|
1297
|
-
if ($[
|
|
1298
|
-
t114 =
|
|
1299
|
-
$[
|
|
1300
|
-
$[
|
|
1301
|
-
|
|
1302
|
-
} else t114 = $[290];
|
|
1298
|
+
if ($[283] !== t) {
|
|
1299
|
+
t114 = t("common.cancel");
|
|
1300
|
+
$[283] = t;
|
|
1301
|
+
$[284] = t114;
|
|
1302
|
+
} else t114 = $[284];
|
|
1303
1303
|
let t115;
|
|
1304
|
-
if ($[
|
|
1305
|
-
t115 = /* @__PURE__ */ jsx(
|
|
1306
|
-
|
|
1307
|
-
|
|
1304
|
+
if ($[285] !== handleLocaleChangeCancel || $[286] !== t114) {
|
|
1305
|
+
t115 = /* @__PURE__ */ jsx(Button, {
|
|
1306
|
+
variant: "outline",
|
|
1307
|
+
onClick: handleLocaleChangeCancel,
|
|
1308
1308
|
children: t114
|
|
1309
1309
|
});
|
|
1310
|
-
$[
|
|
1311
|
-
$[
|
|
1312
|
-
$[
|
|
1313
|
-
|
|
1314
|
-
} else t115 = $[294];
|
|
1310
|
+
$[285] = handleLocaleChangeCancel;
|
|
1311
|
+
$[286] = t114;
|
|
1312
|
+
$[287] = t115;
|
|
1313
|
+
} else t115 = $[287];
|
|
1315
1314
|
let t116;
|
|
1316
|
-
if ($[
|
|
1317
|
-
t116 =
|
|
1315
|
+
if ($[288] !== t) {
|
|
1316
|
+
t116 = t("locale.discardChanges");
|
|
1317
|
+
$[288] = t;
|
|
1318
|
+
$[289] = t116;
|
|
1319
|
+
} else t116 = $[289];
|
|
1320
|
+
let t117;
|
|
1321
|
+
if ($[290] !== handleLocaleChangeConfirm || $[291] !== t116) {
|
|
1322
|
+
t117 = /* @__PURE__ */ jsx(Button, {
|
|
1323
|
+
variant: "default",
|
|
1324
|
+
onClick: handleLocaleChangeConfirm,
|
|
1325
|
+
children: t116
|
|
1326
|
+
});
|
|
1327
|
+
$[290] = handleLocaleChangeConfirm;
|
|
1328
|
+
$[291] = t116;
|
|
1329
|
+
$[292] = t117;
|
|
1330
|
+
} else t117 = $[292];
|
|
1331
|
+
let t118;
|
|
1332
|
+
if ($[293] !== t115 || $[294] !== t117) {
|
|
1333
|
+
t118 = /* @__PURE__ */ jsxs(DialogFooter, { children: [t115, t117] });
|
|
1334
|
+
$[293] = t115;
|
|
1335
|
+
$[294] = t117;
|
|
1336
|
+
$[295] = t118;
|
|
1337
|
+
} else t118 = $[295];
|
|
1338
|
+
let t119;
|
|
1339
|
+
if ($[296] !== t113 || $[297] !== t118) {
|
|
1340
|
+
t119 = /* @__PURE__ */ jsxs(DialogContent, { children: [t113, t118] });
|
|
1341
|
+
$[296] = t113;
|
|
1342
|
+
$[297] = t118;
|
|
1343
|
+
$[298] = t119;
|
|
1344
|
+
} else t119 = $[298];
|
|
1345
|
+
let t120;
|
|
1346
|
+
if ($[299] !== localeChangeDialog.open || $[300] !== t108 || $[301] !== t119) {
|
|
1347
|
+
t120 = /* @__PURE__ */ jsx(Dialog, {
|
|
1348
|
+
open: t107,
|
|
1349
|
+
onOpenChange: t108,
|
|
1350
|
+
children: t119
|
|
1351
|
+
});
|
|
1352
|
+
$[299] = localeChangeDialog.open;
|
|
1353
|
+
$[300] = t108;
|
|
1354
|
+
$[301] = t119;
|
|
1355
|
+
$[302] = t120;
|
|
1356
|
+
} else t120 = $[302];
|
|
1357
|
+
let t121;
|
|
1358
|
+
if ($[303] !== form || $[304] !== t106 || $[305] !== t120 || $[306] !== t63 || $[307] !== t70 || $[308] !== t79) {
|
|
1359
|
+
t121 = /* @__PURE__ */ jsxs(FormProvider, {
|
|
1318
1360
|
...form,
|
|
1319
1361
|
children: [
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1362
|
+
t63,
|
|
1363
|
+
t70,
|
|
1364
|
+
t79,
|
|
1365
|
+
t106,
|
|
1366
|
+
t120
|
|
1325
1367
|
]
|
|
1326
1368
|
});
|
|
1327
|
-
$[
|
|
1328
|
-
$[
|
|
1329
|
-
$[
|
|
1330
|
-
$[
|
|
1331
|
-
$[
|
|
1332
|
-
$[
|
|
1333
|
-
$[
|
|
1334
|
-
} else
|
|
1335
|
-
return
|
|
1369
|
+
$[303] = form;
|
|
1370
|
+
$[304] = t106;
|
|
1371
|
+
$[305] = t120;
|
|
1372
|
+
$[306] = t63;
|
|
1373
|
+
$[307] = t70;
|
|
1374
|
+
$[308] = t79;
|
|
1375
|
+
$[309] = t121;
|
|
1376
|
+
} else t121 = $[309];
|
|
1377
|
+
return t121;
|
|
1336
1378
|
}
|
|
1337
|
-
function
|
|
1379
|
+
function _temp3() {
|
|
1338
1380
|
return window.location.reload();
|
|
1339
1381
|
}
|
|
1340
|
-
function
|
|
1382
|
+
function _temp2(date) {
|
|
1341
1383
|
return new Date(date).toLocaleDateString(void 0, {
|
|
1342
1384
|
year: "numeric",
|
|
1343
1385
|
month: "short",
|
|
@@ -1346,6 +1388,9 @@ function _temp(date) {
|
|
|
1346
1388
|
minute: "2-digit"
|
|
1347
1389
|
});
|
|
1348
1390
|
}
|
|
1391
|
+
function _temp(v) {
|
|
1392
|
+
return v.id;
|
|
1393
|
+
}
|
|
1349
1394
|
|
|
1350
1395
|
//#endregion
|
|
1351
1396
|
export { GlobalFormView as default };
|