@questpie/admin 3.2.3 → 3.2.4

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