@abpjs/theme-shared 3.2.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ __export(index_exports, {
36
36
  Alert: () => Alert,
37
37
  BOOTSTRAP: () => BOOTSTRAP,
38
38
  Button: () => Button3,
39
- ChakraDialog: () => import_react16.Dialog,
39
+ ChakraDialog: () => import_react17.Dialog,
40
40
  ChangePassword: () => ChangePassword,
41
41
  Checkbox: () => Checkbox,
42
42
  Confirmation: () => Confirmation,
@@ -63,6 +63,8 @@ __export(index_exports, {
63
63
  NavItemsService: () => NavItemsService,
64
64
  PASSWORD_SETTING_KEYS: () => PASSWORD_SETTING_KEYS,
65
65
  Profile: () => Profile,
66
+ SUPPRESS_UNSAVED_CHANGES_WARNING: () => SUPPRESS_UNSAVED_CHANGES_WARNING,
67
+ SuppressUnsavedChangesWarningContext: () => SuppressUnsavedChangesWarningContext,
66
68
  THEME_SHARED_APPEND_CONTENT: () => THEME_SHARED_APPEND_CONTENT,
67
69
  THEME_SHARED_ROUTE_PROVIDERS: () => THEME_SHARED_ROUTE_PROVIDERS,
68
70
  THEME_SHARED_STYLES: () => THEME_SHARED_STYLES,
@@ -76,7 +78,7 @@ __export(index_exports, {
76
78
  createErrorInterceptor: () => createErrorInterceptor,
77
79
  createLazyStyleHref: () => createLazyStyleHref,
78
80
  defaultAbpConfig: () => defaultAbpConfig,
79
- defineConfig: () => import_react27.defineConfig,
81
+ defineConfig: () => import_react28.defineConfig,
80
82
  eThemeSharedRouteNames: () => eThemeSharedRouteNames,
81
83
  getLoadedBootstrapDirection: () => getLoadedBootstrapDirection,
82
84
  getNavItemsService: () => getNavItemsService,
@@ -101,6 +103,7 @@ __export(index_exports, {
101
103
  useModalContext: () => useModalContext,
102
104
  useModalState: () => useModalState,
103
105
  useNavItems: () => useNavItems,
106
+ useSuppressUnsavedChangesWarning: () => useSuppressUnsavedChangesWarning,
104
107
  useToaster: () => useToaster,
105
108
  useToasterContext: () => useToasterContext,
106
109
  useToasts: () => useToasts
@@ -139,9 +142,15 @@ var NavItem = class {
139
142
  // src/constants/styles.ts
140
143
  var BOOTSTRAP = "bootstrap-{{dir}}.min.css";
141
144
  var DEFAULT_STYLES = `
145
+ /* Enhanced validation styles - @since 4.0.0 */
142
146
  .is-invalid .form-control {
143
147
  border-color: #dc3545;
144
148
  border-style: solid !important;
149
+ padding-right: calc(1.5em + .75rem);
150
+ background-image: url(data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e);
151
+ background-repeat: no-repeat;
152
+ background-position: right calc(.375em + .1875rem) center;
153
+ background-size: calc(.75em + .375rem) calc(.75em + .375rem);
145
154
  }
146
155
 
147
156
  .is-invalid .invalid-feedback,
@@ -284,6 +293,13 @@ var DEFAULT_STYLES = `
284
293
  .sorting_asc:after {
285
294
  opacity: .3;
286
295
  }
296
+ .ngx-datatable.material {
297
+ box-shadow: none;
298
+ }
299
+ /* Typeahead dropdown styles - @since 4.0.0 */
300
+ .abp-typeahead-window {
301
+ width: 100%;
302
+ }
287
303
 
288
304
  @keyframes fadeInTop {
289
305
  from {
@@ -354,10 +370,18 @@ function useLazyStyles() {
354
370
  }
355
371
  var LAZY_STYLES = DEFAULT_LAZY_STYLES;
356
372
 
357
- // src/contexts/toaster.context.tsx
373
+ // src/tokens/suppress-unsaved-changes-warning.token.ts
358
374
  var import_react4 = require("react");
375
+ var SUPPRESS_UNSAVED_CHANGES_WARNING = "SUPPRESS_UNSAVED_CHANGES_WARNING";
376
+ var SuppressUnsavedChangesWarningContext = (0, import_react4.createContext)(false);
377
+ function useSuppressUnsavedChangesWarning() {
378
+ return (0, import_react4.useContext)(SuppressUnsavedChangesWarningContext);
379
+ }
380
+
381
+ // src/contexts/toaster.context.tsx
382
+ var import_react5 = require("react");
359
383
  var import_jsx_runtime = require("react/jsx-runtime");
360
- var ToasterContext = (0, import_react4.createContext)(null);
384
+ var ToasterContext = (0, import_react5.createContext)(null);
361
385
  var toastCounter = 0;
362
386
  function generateId() {
363
387
  toastCounter += 1;
@@ -365,17 +389,17 @@ function generateId() {
365
389
  }
366
390
  var DEFAULT_LIFE = 5e3;
367
391
  function ToasterProvider({ children }) {
368
- const [toasts, setToasts] = (0, import_react4.useState)([]);
369
- const subscribersRef = (0, import_react4.useRef)(/* @__PURE__ */ new Set());
370
- (0, import_react4.useEffect)(() => {
392
+ const [toasts, setToasts] = (0, import_react5.useState)([]);
393
+ const subscribersRef = (0, import_react5.useRef)(/* @__PURE__ */ new Set());
394
+ (0, import_react5.useEffect)(() => {
371
395
  subscribersRef.current.forEach((subscriber) => {
372
396
  subscriber(toasts);
373
397
  });
374
398
  }, [toasts]);
375
- const remove = (0, import_react4.useCallback)((id) => {
399
+ const remove = (0, import_react5.useCallback)((id) => {
376
400
  setToasts((prev) => prev.filter((t) => t.id !== id));
377
401
  }, []);
378
- const show = (0, import_react4.useCallback)(
402
+ const show = (0, import_react5.useCallback)(
379
403
  (message, title, severity = "info", options) => {
380
404
  const id = typeof options?.id === "number" ? options.id : generateId();
381
405
  const life = options?.sticky ? void 0 : options?.life ?? DEFAULT_LIFE;
@@ -399,38 +423,38 @@ function ToasterProvider({ children }) {
399
423
  },
400
424
  [remove]
401
425
  );
402
- const info = (0, import_react4.useCallback)(
426
+ const info = (0, import_react5.useCallback)(
403
427
  (message, title, options) => show(message, title, "info", options),
404
428
  [show]
405
429
  );
406
- const success = (0, import_react4.useCallback)(
430
+ const success = (0, import_react5.useCallback)(
407
431
  (message, title, options) => show(message, title, "success", options),
408
432
  [show]
409
433
  );
410
- const warn = (0, import_react4.useCallback)(
434
+ const warn = (0, import_react5.useCallback)(
411
435
  (message, title, options) => show(message, title, "warning", options),
412
436
  [show]
413
437
  );
414
- const error = (0, import_react4.useCallback)(
438
+ const error = (0, import_react5.useCallback)(
415
439
  (message, title, options) => show(message, title, "error", options),
416
440
  [show]
417
441
  );
418
- const clear = (0, import_react4.useCallback)((key) => {
442
+ const clear = (0, import_react5.useCallback)((containerKey) => {
419
443
  setToasts((prev) => {
420
- if (key) {
421
- return prev.filter((toast) => toast.options?.containerKey !== key);
444
+ if (containerKey) {
445
+ return prev.filter((toast) => toast.options?.containerKey !== containerKey);
422
446
  }
423
447
  return [];
424
448
  });
425
449
  }, []);
426
- const subscribe = (0, import_react4.useCallback)((subscriber) => {
450
+ const subscribe = (0, import_react5.useCallback)((subscriber) => {
427
451
  subscribersRef.current.add(subscriber);
428
452
  subscriber(toasts);
429
453
  return () => {
430
454
  subscribersRef.current.delete(subscriber);
431
455
  };
432
456
  }, [toasts]);
433
- const service = (0, import_react4.useMemo)(
457
+ const service = (0, import_react5.useMemo)(
434
458
  () => ({
435
459
  info,
436
460
  success,
@@ -443,28 +467,28 @@ function ToasterProvider({ children }) {
443
467
  }),
444
468
  [info, success, warn, error, show, remove, clear, subscribe]
445
469
  );
446
- const value = (0, import_react4.useMemo)(
470
+ const value = (0, import_react5.useMemo)(
447
471
  () => ({ service, toasts }),
448
472
  [service, toasts]
449
473
  );
450
474
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToasterContext.Provider, { value, children });
451
475
  }
452
476
  function useToaster() {
453
- const context = (0, import_react4.useContext)(ToasterContext);
477
+ const context = (0, import_react5.useContext)(ToasterContext);
454
478
  if (!context) {
455
479
  throw new Error("useToaster must be used within a ToasterProvider");
456
480
  }
457
481
  return context.service;
458
482
  }
459
483
  function useToasts() {
460
- const context = (0, import_react4.useContext)(ToasterContext);
484
+ const context = (0, import_react5.useContext)(ToasterContext);
461
485
  if (!context) {
462
486
  throw new Error("useToasts must be used within a ToasterProvider");
463
487
  }
464
488
  return context.toasts;
465
489
  }
466
490
  function useToasterContext() {
467
- const context = (0, import_react4.useContext)(ToasterContext);
491
+ const context = (0, import_react5.useContext)(ToasterContext);
468
492
  if (!context) {
469
493
  throw new Error("useToasterContext must be used within a ToasterProvider");
470
494
  }
@@ -472,30 +496,30 @@ function useToasterContext() {
472
496
  }
473
497
 
474
498
  // src/contexts/confirmation.context.tsx
475
- var import_react5 = require("react");
499
+ var import_react6 = require("react");
476
500
  var import_jsx_runtime2 = require("react/jsx-runtime");
477
- var ConfirmationContext = (0, import_react5.createContext)(null);
501
+ var ConfirmationContext = (0, import_react6.createContext)(null);
478
502
  function generateId2() {
479
503
  return `confirmation-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
480
504
  }
481
505
  function ConfirmationProvider({ children }) {
482
- const [confirmation, setConfirmation] = (0, import_react5.useState)(null);
483
- const resolverRef = (0, import_react5.useRef)(null);
484
- const subscribersRef = (0, import_react5.useRef)(/* @__PURE__ */ new Set());
485
- const escapeListenerRef = (0, import_react5.useRef)(false);
486
- (0, import_react5.useEffect)(() => {
506
+ const [confirmation, setConfirmation] = (0, import_react6.useState)(null);
507
+ const resolverRef = (0, import_react6.useRef)(null);
508
+ const subscribersRef = (0, import_react6.useRef)(/* @__PURE__ */ new Set());
509
+ const escapeListenerRef = (0, import_react6.useRef)(false);
510
+ (0, import_react6.useEffect)(() => {
487
511
  subscribersRef.current.forEach((subscriber) => {
488
512
  subscriber(confirmation);
489
513
  });
490
514
  }, [confirmation]);
491
- const respond = (0, import_react5.useCallback)((status) => {
515
+ const respond = (0, import_react6.useCallback)((status) => {
492
516
  if (resolverRef.current) {
493
517
  resolverRef.current(status);
494
518
  resolverRef.current = null;
495
519
  }
496
520
  setConfirmation(null);
497
521
  }, []);
498
- (0, import_react5.useEffect)(() => {
522
+ (0, import_react6.useEffect)(() => {
499
523
  if (!escapeListenerRef.current) return;
500
524
  const handleEscape = (event) => {
501
525
  if (event.key === "Escape" && confirmation && confirmation.options?.dismissible !== false) {
@@ -507,7 +531,7 @@ function ConfirmationProvider({ children }) {
507
531
  document.removeEventListener("keydown", handleEscape);
508
532
  };
509
533
  }, [confirmation, respond]);
510
- const show = (0, import_react5.useCallback)(
534
+ const show = (0, import_react6.useCallback)(
511
535
  (message, title, severity = "neutral", options = {}) => {
512
536
  if (resolverRef.current) {
513
537
  resolverRef.current(Confirmation.Status.dismiss);
@@ -529,39 +553,39 @@ function ConfirmationProvider({ children }) {
529
553
  },
530
554
  []
531
555
  );
532
- const info = (0, import_react5.useCallback)(
556
+ const info = (0, import_react6.useCallback)(
533
557
  (message, title, options) => show(message, title, "info", options),
534
558
  [show]
535
559
  );
536
- const success = (0, import_react5.useCallback)(
560
+ const success = (0, import_react6.useCallback)(
537
561
  (message, title, options) => show(message, title, "success", options),
538
562
  [show]
539
563
  );
540
- const warn = (0, import_react5.useCallback)(
564
+ const warn = (0, import_react6.useCallback)(
541
565
  (message, title, options) => show(message, title, "warning", options),
542
566
  [show]
543
567
  );
544
- const error = (0, import_react5.useCallback)(
568
+ const error = (0, import_react6.useCallback)(
545
569
  (message, title, options) => show(message, title, "error", options),
546
570
  [show]
547
571
  );
548
- const clear = (0, import_react5.useCallback)(
572
+ const clear = (0, import_react6.useCallback)(
549
573
  (status) => {
550
574
  respond(status ?? Confirmation.Status.dismiss);
551
575
  },
552
576
  [respond]
553
577
  );
554
- const listenToEscape = (0, import_react5.useCallback)(() => {
578
+ const listenToEscape = (0, import_react6.useCallback)(() => {
555
579
  escapeListenerRef.current = true;
556
580
  }, []);
557
- const subscribe = (0, import_react5.useCallback)((subscriber) => {
581
+ const subscribe = (0, import_react6.useCallback)((subscriber) => {
558
582
  subscribersRef.current.add(subscriber);
559
583
  subscriber(confirmation);
560
584
  return () => {
561
585
  subscribersRef.current.delete(subscriber);
562
586
  };
563
587
  }, [confirmation]);
564
- const service = (0, import_react5.useMemo)(
588
+ const service = (0, import_react6.useMemo)(
565
589
  () => ({
566
590
  info,
567
591
  success,
@@ -574,28 +598,28 @@ function ConfirmationProvider({ children }) {
574
598
  }),
575
599
  [info, success, warn, error, show, clear, listenToEscape, subscribe]
576
600
  );
577
- const value = (0, import_react5.useMemo)(
601
+ const value = (0, import_react6.useMemo)(
578
602
  () => ({ service, confirmation, respond }),
579
603
  [service, confirmation, respond]
580
604
  );
581
605
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ConfirmationContext.Provider, { value, children });
582
606
  }
583
607
  function useConfirmation() {
584
- const context = (0, import_react5.useContext)(ConfirmationContext);
608
+ const context = (0, import_react6.useContext)(ConfirmationContext);
585
609
  if (!context) {
586
610
  throw new Error("useConfirmation must be used within a ConfirmationProvider");
587
611
  }
588
612
  return context.service;
589
613
  }
590
614
  function useConfirmationState() {
591
- const context = (0, import_react5.useContext)(ConfirmationContext);
615
+ const context = (0, import_react6.useContext)(ConfirmationContext);
592
616
  if (!context) {
593
617
  throw new Error("useConfirmationState must be used within a ConfirmationProvider");
594
618
  }
595
619
  return { confirmation: context.confirmation, respond: context.respond };
596
620
  }
597
621
  function useConfirmationContext() {
598
- const context = (0, import_react5.useContext)(ConfirmationContext);
622
+ const context = (0, import_react6.useContext)(ConfirmationContext);
599
623
  if (!context) {
600
624
  throw new Error("useConfirmationContext must be used within a ConfirmationProvider");
601
625
  }
@@ -603,26 +627,26 @@ function useConfirmationContext() {
603
627
  }
604
628
 
605
629
  // src/contexts/modal.context.tsx
606
- var import_react6 = require("react");
630
+ var import_react7 = require("react");
607
631
  var import_jsx_runtime3 = require("react/jsx-runtime");
608
- var ModalContext = (0, import_react6.createContext)(null);
632
+ var ModalContext = (0, import_react7.createContext)(null);
609
633
  function ModalProvider({ children }) {
610
- const [modalState, setModalState] = (0, import_react6.useState)(null);
611
- const [, setUpdateCounter] = (0, import_react6.useState)(0);
612
- const containerRef = (0, import_react6.useRef)(null);
613
- const renderTemplate = (0, import_react6.useCallback)((render, context) => {
634
+ const [modalState, setModalState] = (0, import_react7.useState)(null);
635
+ const [, setUpdateCounter] = (0, import_react7.useState)(0);
636
+ const containerRef = (0, import_react7.useRef)(null);
637
+ const renderTemplate = (0, import_react7.useCallback)((render, context) => {
614
638
  setModalState({ render, context });
615
639
  }, []);
616
- const clearModal = (0, import_react6.useCallback)(() => {
640
+ const clearModal = (0, import_react7.useCallback)(() => {
617
641
  setModalState(null);
618
642
  }, []);
619
- const getContainer = (0, import_react6.useCallback)(() => {
643
+ const getContainer = (0, import_react7.useCallback)(() => {
620
644
  return containerRef;
621
645
  }, []);
622
- const detectChanges = (0, import_react6.useCallback)(() => {
646
+ const detectChanges = (0, import_react7.useCallback)(() => {
623
647
  setUpdateCounter((prev) => prev + 1);
624
648
  }, []);
625
- const service = (0, import_react6.useMemo)(
649
+ const service = (0, import_react7.useMemo)(
626
650
  () => ({
627
651
  renderTemplate,
628
652
  clearModal,
@@ -631,7 +655,7 @@ function ModalProvider({ children }) {
631
655
  }),
632
656
  [renderTemplate, clearModal, getContainer, detectChanges]
633
657
  );
634
- const value = (0, import_react6.useMemo)(
658
+ const value = (0, import_react7.useMemo)(
635
659
  () => ({ service, modalState }),
636
660
  [service, modalState]
637
661
  );
@@ -641,21 +665,21 @@ function ModalProvider({ children }) {
641
665
  ] });
642
666
  }
643
667
  function useModal() {
644
- const context = (0, import_react6.useContext)(ModalContext);
668
+ const context = (0, import_react7.useContext)(ModalContext);
645
669
  if (!context) {
646
670
  throw new Error("useModal must be used within a ModalProvider");
647
671
  }
648
672
  return context.service;
649
673
  }
650
674
  function useModalState() {
651
- const context = (0, import_react6.useContext)(ModalContext);
675
+ const context = (0, import_react7.useContext)(ModalContext);
652
676
  if (!context) {
653
677
  throw new Error("useModalState must be used within a ModalProvider");
654
678
  }
655
679
  return context.modalState;
656
680
  }
657
681
  function useModalContext() {
658
- const context = (0, import_react6.useContext)(ModalContext);
682
+ const context = (0, import_react7.useContext)(ModalContext);
659
683
  if (!context) {
660
684
  throw new Error("useModalContext must be used within a ModalProvider");
661
685
  }
@@ -670,7 +694,7 @@ function ModalContainer() {
670
694
  }
671
695
 
672
696
  // src/handlers/error.handler.ts
673
- var import_react7 = require("react");
697
+ var import_react8 = require("react");
674
698
  var DEFAULT_ERROR_MESSAGES = {
675
699
  400: "AbpUi::DefaultErrorMessage400",
676
700
  401: "AbpUi::DefaultErrorMessage401",
@@ -704,22 +728,22 @@ var DEFAULT_ERROR_LOCALIZATIONS = {
704
728
  function useErrorHandler(options = {}) {
705
729
  const { navigate, loginPath = "/account/login" } = options;
706
730
  const confirmation = useConfirmation();
707
- const [errorComponentProps, setErrorComponentProps] = (0, import_react7.useState)(null);
708
- const navigateToLogin = (0, import_react7.useCallback)(() => {
731
+ const [errorComponentProps, setErrorComponentProps] = (0, import_react8.useState)(null);
732
+ const navigateToLogin = (0, import_react8.useCallback)(() => {
709
733
  if (navigate) {
710
734
  navigate(loginPath);
711
735
  }
712
736
  }, [navigate, loginPath]);
713
- const showError = (0, import_react7.useCallback)(
737
+ const showError = (0, import_react8.useCallback)(
714
738
  async (message, title) => {
715
739
  return confirmation.error(message, title || "AbpUi::Error");
716
740
  },
717
741
  [confirmation]
718
742
  );
719
- const clearErrorComponent = (0, import_react7.useCallback)(() => {
743
+ const clearErrorComponent = (0, import_react8.useCallback)(() => {
720
744
  setErrorComponentProps(null);
721
745
  }, []);
722
- const createErrorComponent = (0, import_react7.useCallback)(
746
+ const createErrorComponent = (0, import_react8.useCallback)(
723
747
  (instance) => {
724
748
  const props = {
725
749
  title: instance.title || "Error",
@@ -732,7 +756,7 @@ function useErrorHandler(options = {}) {
732
756
  },
733
757
  [clearErrorComponent]
734
758
  );
735
- const handleError = (0, import_react7.useCallback)(
759
+ const handleError = (0, import_react8.useCallback)(
736
760
  async (error) => {
737
761
  if (error.status === 401) {
738
762
  navigateToLogin();
@@ -774,7 +798,7 @@ function isHttpErrorResponse(error) {
774
798
  }
775
799
 
776
800
  // src/hooks/use-nav-items.ts
777
- var import_react8 = require("react");
801
+ var import_react9 = require("react");
778
802
 
779
803
  // src/services/nav-items.service.ts
780
804
  var _NavItemsService = class _NavItemsService {
@@ -909,8 +933,8 @@ function getNavItemsService() {
909
933
  // src/hooks/use-nav-items.ts
910
934
  function useNavItems(service) {
911
935
  const navItemsService = service || getNavItemsService();
912
- const [items, setItems] = (0, import_react8.useState)(navItemsService.items);
913
- (0, import_react8.useEffect)(() => {
936
+ const [items, setItems] = (0, import_react9.useState)(navItemsService.items);
937
+ (0, import_react9.useEffect)(() => {
914
938
  const unsubscribe = navItemsService.subscribe(setItems);
915
939
  return unsubscribe;
916
940
  }, [navItemsService]);
@@ -918,8 +942,8 @@ function useNavItems(service) {
918
942
  }
919
943
 
920
944
  // src/components/toast/Toast.tsx
921
- var import_react9 = require("react");
922
- var import_react10 = require("@chakra-ui/react");
945
+ var import_react10 = require("react");
946
+ var import_react11 = require("@chakra-ui/react");
923
947
  var import_core = require("@abpjs/core");
924
948
  var import_lucide_react = require("lucide-react");
925
949
  var import_jsx_runtime4 = require("react/jsx-runtime");
@@ -1026,7 +1050,7 @@ function getPlacement(position) {
1026
1050
  var toasterCache = /* @__PURE__ */ new Map();
1027
1051
  function getToaster(placement) {
1028
1052
  if (!toasterCache.has(placement)) {
1029
- toasterCache.set(placement, (0, import_react10.createToaster)({
1053
+ toasterCache.set(placement, (0, import_react11.createToaster)({
1030
1054
  placement,
1031
1055
  pauseOnPageIdle: true
1032
1056
  }));
@@ -1036,14 +1060,14 @@ function getToaster(placement) {
1036
1060
  function ToastContainer({ position = "bottom-right", containerKey }) {
1037
1061
  const { toasts, service } = useToasterContext();
1038
1062
  const { t } = (0, import_core.useLocalization)();
1039
- const displayedToastsRef = (0, import_react9.useRef)(/* @__PURE__ */ new Set());
1040
- const placement = (0, import_react9.useMemo)(() => getPlacement(position), [position]);
1041
- const toaster = (0, import_react9.useMemo)(() => getToaster(placement), [placement]);
1042
- const filteredToasts = (0, import_react9.useMemo)(() => {
1063
+ const displayedToastsRef = (0, import_react10.useRef)(/* @__PURE__ */ new Set());
1064
+ const placement = (0, import_react10.useMemo)(() => getPlacement(position), [position]);
1065
+ const toaster = (0, import_react10.useMemo)(() => getToaster(placement), [placement]);
1066
+ const filteredToasts = (0, import_react10.useMemo)(() => {
1043
1067
  if (!containerKey) return toasts;
1044
1068
  return toasts.filter((toast) => toast.options?.containerKey === containerKey);
1045
1069
  }, [toasts, containerKey]);
1046
- (0, import_react9.useEffect)(() => {
1070
+ (0, import_react10.useEffect)(() => {
1047
1071
  const newToasts = filteredToasts.filter((toast) => !displayedToastsRef.current.has(toast.id));
1048
1072
  newToasts.forEach((toast) => {
1049
1073
  displayedToastsRef.current.add(toast.id);
@@ -1076,11 +1100,11 @@ function ToastContainer({ position = "bottom-right", containerKey }) {
1076
1100
  });
1077
1101
  });
1078
1102
  }, [filteredToasts, t, service, toaster]);
1079
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react10.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react10.Toaster, { toaster, insetInline: { mdDown: "4" }, children: (toast) => {
1103
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react11.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react11.Toaster, { toaster, insetInline: { mdDown: "4" }, children: (toast) => {
1080
1104
  const severity = toast.meta?.severity || "info";
1081
1105
  const closable = toast.meta?.closable !== false;
1082
1106
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1083
- import_react10.Toast.Root,
1107
+ import_react11.Toast.Root,
1084
1108
  {
1085
1109
  bg: getSeverityBg(severity),
1086
1110
  borderWidth: "1px",
@@ -1088,13 +1112,13 @@ function ToastContainer({ position = "bottom-right", containerKey }) {
1088
1112
  borderRadius: "lg",
1089
1113
  boxShadow: "lg",
1090
1114
  width: { md: "sm" },
1091
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react10.Flex, { align: "flex-start", gap: 3, p: 4, children: [
1092
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react10.Box, { flexShrink: 0, pt: "2px", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SeverityIcon, { severity }) }),
1093
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react10.Stack, { gap: 1, flex: 1, children: [
1094
- toast.title && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react10.Toast.Title, { fontWeight: "bold", fontSize: "sm", color: "fg", children: toast.title }),
1095
- toast.description && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react10.Toast.Description, { fontSize: "sm", color: "gray.700", children: toast.description })
1115
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react11.Flex, { align: "flex-start", gap: 3, p: 4, children: [
1116
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react11.Box, { flexShrink: 0, pt: "2px", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SeverityIcon, { severity }) }),
1117
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react11.Stack, { gap: 1, flex: 1, children: [
1118
+ toast.title && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react11.Toast.Title, { fontWeight: "bold", fontSize: "sm", color: "fg", children: toast.title }),
1119
+ toast.description && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react11.Toast.Description, { fontSize: "sm", color: "gray.700", children: toast.description })
1096
1120
  ] }),
1097
- closable && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react10.Toast.CloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react10.CloseButton, { size: "sm" }) })
1121
+ closable && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react11.Toast.CloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react11.CloseButton, { size: "sm" }) })
1098
1122
  ] })
1099
1123
  }
1100
1124
  );
@@ -1102,8 +1126,8 @@ function ToastContainer({ position = "bottom-right", containerKey }) {
1102
1126
  }
1103
1127
 
1104
1128
  // src/components/confirmation/Confirmation.tsx
1105
- var import_react11 = require("react");
1106
- var import_react12 = require("@chakra-ui/react");
1129
+ var import_react12 = require("react");
1130
+ var import_react13 = require("@chakra-ui/react");
1107
1131
  var import_core2 = require("@abpjs/core");
1108
1132
  var import_lucide_react2 = require("lucide-react");
1109
1133
  var import_jsx_runtime5 = require("react/jsx-runtime");
@@ -1151,7 +1175,7 @@ function getSeverityColorPalette2(severity) {
1151
1175
  function ConfirmationDialog({ className }) {
1152
1176
  const { confirmation, respond } = useConfirmationState();
1153
1177
  const { t } = (0, import_core2.useLocalization)();
1154
- const cancelRef = (0, import_react11.useRef)(null);
1178
+ const cancelRef = (0, import_react12.useRef)(null);
1155
1179
  if (!confirmation) {
1156
1180
  return null;
1157
1181
  }
@@ -1182,24 +1206,24 @@ function ConfirmationDialog({ className }) {
1182
1206
  }
1183
1207
  };
1184
1208
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1185
- import_react12.Dialog.Root,
1209
+ import_react13.Dialog.Root,
1186
1210
  {
1187
1211
  open: true,
1188
1212
  onOpenChange: handleOpenChange,
1189
1213
  role: "alertdialog",
1190
1214
  placement: "center",
1191
1215
  initialFocusEl: () => cancelRef.current,
1192
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react12.Portal, { children: [
1193
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react12.Dialog.Backdrop, {}),
1194
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react12.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react12.Dialog.Content, { className, maxWidth: "md", children: [
1195
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react12.Dialog.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react12.Flex, { align: "center", gap: 3, children: [
1216
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react13.Portal, { children: [
1217
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react13.Dialog.Backdrop, {}),
1218
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react13.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react13.Dialog.Content, { className, maxWidth: "md", children: [
1219
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react13.Dialog.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react13.Flex, { align: "center", gap: 3, children: [
1196
1220
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SeverityIcon2, { severity }),
1197
- localizedTitle && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react12.Dialog.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react12.Text, { fontWeight: "bold", fontSize: "lg", children: localizedTitle }) })
1221
+ localizedTitle && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react13.Dialog.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react13.Text, { fontWeight: "bold", fontSize: "lg", children: localizedTitle }) })
1198
1222
  ] }) }),
1199
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react12.Dialog.Body, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react12.Text, { color: "gray.600", children: localizedMessage }) }),
1200
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react12.Dialog.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react12.Flex, { gap: 3, children: [
1223
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react13.Dialog.Body, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react13.Text, { color: "gray.600", children: localizedMessage }) }),
1224
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react13.Dialog.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react13.Flex, { gap: 3, children: [
1201
1225
  !options?.hideCancelBtn && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1202
- import_react12.Button,
1226
+ import_react13.Button,
1203
1227
  {
1204
1228
  ref: cancelRef,
1205
1229
  variant: "ghost",
@@ -1208,7 +1232,7 @@ function ConfirmationDialog({ className }) {
1208
1232
  }
1209
1233
  ),
1210
1234
  !options?.hideYesBtn && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1211
- import_react12.Button,
1235
+ import_react13.Button,
1212
1236
  {
1213
1237
  colorPalette: getSeverityColorPalette2(severity),
1214
1238
  onClick: handleConfirm,
@@ -1223,7 +1247,7 @@ function ConfirmationDialog({ className }) {
1223
1247
  }
1224
1248
 
1225
1249
  // src/components/errors/ErrorComponent.tsx
1226
- var import_react13 = require("@chakra-ui/react");
1250
+ var import_react14 = require("@chakra-ui/react");
1227
1251
  var import_jsx_runtime6 = require("react/jsx-runtime");
1228
1252
  function ErrorComponent({
1229
1253
  title = "Error",
@@ -1235,9 +1259,9 @@ function ErrorComponent({
1235
1259
  onHomeClick,
1236
1260
  homeButtonText = "Go Home"
1237
1261
  }) {
1238
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react13.Container, { maxW: "container.md", py: 20, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react13.VStack, { gap: 6, textAlign: "center", children: [
1262
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react14.Container, { maxW: "container.md", py: 20, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react14.VStack, { gap: 6, textAlign: "center", children: [
1239
1263
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1240
- import_react13.Heading,
1264
+ import_react14.Heading,
1241
1265
  {
1242
1266
  size: "4xl",
1243
1267
  color: "red.500",
@@ -1245,10 +1269,10 @@ function ErrorComponent({
1245
1269
  children: title
1246
1270
  }
1247
1271
  ),
1248
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react13.Text, { fontSize: "lg", color: "gray.600", children: details }),
1249
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react13.Box, { display: "flex", gap: 3, children: [
1272
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react14.Text, { fontSize: "lg", color: "gray.600", children: details }),
1273
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react14.Box, { display: "flex", gap: 3, children: [
1250
1274
  isHomeShow && onHomeClick && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1251
- import_react13.Button,
1275
+ import_react14.Button,
1252
1276
  {
1253
1277
  colorPalette: "green",
1254
1278
  size: "lg",
@@ -1257,7 +1281,7 @@ function ErrorComponent({
1257
1281
  }
1258
1282
  ),
1259
1283
  showCloseButton && onDestroy && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1260
- import_react13.Button,
1284
+ import_react14.Button,
1261
1285
  {
1262
1286
  colorPalette: "blue",
1263
1287
  size: "lg",
@@ -1270,7 +1294,7 @@ function ErrorComponent({
1270
1294
  }
1271
1295
 
1272
1296
  // src/components/loader-bar/LoaderBar.tsx
1273
- var import_react14 = require("react");
1297
+ var import_react15 = require("react");
1274
1298
  var import_core3 = require("@abpjs/core");
1275
1299
  var import_jsx_runtime7 = require("react/jsx-runtime");
1276
1300
  function LoaderBar({
@@ -1281,10 +1305,10 @@ function LoaderBar({
1281
1305
  stopDelay = 400
1282
1306
  }) {
1283
1307
  const { loading } = (0, import_core3.useLoader)();
1284
- const [isLoading, setIsLoading] = (0, import_react14.useState)(false);
1285
- const [progressLevel, setProgressLevel] = (0, import_react14.useState)(0);
1286
- const intervalRef = (0, import_react14.useRef)(null);
1287
- const startLoading = (0, import_react14.useCallback)(() => {
1308
+ const [isLoading, setIsLoading] = (0, import_react15.useState)(false);
1309
+ const [progressLevel, setProgressLevel] = (0, import_react15.useState)(0);
1310
+ const intervalRef = (0, import_react15.useRef)(null);
1311
+ const startLoading = (0, import_react15.useCallback)(() => {
1288
1312
  setIsLoading(true);
1289
1313
  setProgressLevel(0);
1290
1314
  if (intervalRef.current) {
@@ -1303,7 +1327,7 @@ function LoaderBar({
1303
1327
  });
1304
1328
  }, intervalPeriod);
1305
1329
  }, [intervalPeriod]);
1306
- const stopLoading = (0, import_react14.useCallback)(() => {
1330
+ const stopLoading = (0, import_react15.useCallback)(() => {
1307
1331
  setProgressLevel(100);
1308
1332
  if (intervalRef.current) {
1309
1333
  clearInterval(intervalRef.current);
@@ -1314,14 +1338,14 @@ function LoaderBar({
1314
1338
  setProgressLevel(0);
1315
1339
  }, stopDelay);
1316
1340
  }, [stopDelay]);
1317
- (0, import_react14.useEffect)(() => {
1341
+ (0, import_react15.useEffect)(() => {
1318
1342
  if (loading) {
1319
1343
  startLoading();
1320
1344
  } else {
1321
1345
  stopLoading();
1322
1346
  }
1323
1347
  }, [loading, startLoading, stopLoading]);
1324
- (0, import_react14.useEffect)(() => {
1348
+ (0, import_react15.useEffect)(() => {
1325
1349
  return () => {
1326
1350
  if (intervalRef.current) {
1327
1351
  clearInterval(intervalRef.current);
@@ -1362,8 +1386,8 @@ function LoaderBar({
1362
1386
  }
1363
1387
 
1364
1388
  // src/components/modal/Modal.tsx
1365
- var import_react15 = __toESM(require("react"));
1366
- var import_react16 = require("@chakra-ui/react");
1389
+ var import_react16 = __toESM(require("react"));
1390
+ var import_react17 = require("@chakra-ui/react");
1367
1391
  var import_jsx_runtime8 = require("react/jsx-runtime");
1368
1392
  function getSizeWidth(size) {
1369
1393
  switch (size) {
@@ -1402,12 +1426,12 @@ function Modal({
1402
1426
  preventScroll = true,
1403
1427
  onInit
1404
1428
  }) {
1405
- const prevVisibleRef = import_react15.default.useRef(false);
1406
- const onInitRef = import_react15.default.useRef(onInit);
1407
- import_react15.default.useEffect(() => {
1429
+ const prevVisibleRef = import_react16.default.useRef(false);
1430
+ const onInitRef = import_react16.default.useRef(onInit);
1431
+ import_react16.default.useEffect(() => {
1408
1432
  onInitRef.current = onInit;
1409
1433
  }, [onInit]);
1410
- import_react15.default.useEffect(() => {
1434
+ import_react16.default.useEffect(() => {
1411
1435
  if (visible && !prevVisibleRef.current && onInitRef.current) {
1412
1436
  onInitRef.current();
1413
1437
  }
@@ -1420,7 +1444,7 @@ function Modal({
1420
1444
  onVisibleChange?.(details.open);
1421
1445
  };
1422
1446
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1423
- import_react16.Dialog.Root,
1447
+ import_react17.Dialog.Root,
1424
1448
  {
1425
1449
  open: visible,
1426
1450
  onOpenChange: handleOpenChange,
@@ -1431,10 +1455,10 @@ function Modal({
1431
1455
  motionPreset,
1432
1456
  trapFocus,
1433
1457
  preventScroll,
1434
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react16.Portal, { children: [
1435
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Dialog.Backdrop, {}),
1436
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1437
- import_react16.Dialog.Content,
1458
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react17.Portal, { children: [
1459
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react17.Dialog.Backdrop, {}),
1460
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react17.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1461
+ import_react17.Dialog.Content,
1438
1462
  {
1439
1463
  className: modalClass,
1440
1464
  width: getSizeWidth(size),
@@ -1444,16 +1468,16 @@ function Modal({
1444
1468
  minHeight,
1445
1469
  children: [
1446
1470
  (header || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
1447
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Dialog.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react16.Flex, { justify: "space-between", align: "center", width: "100%", children: [
1448
- header && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Dialog.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Text, { fontWeight: "bold", fontSize: "lg", children: header }) }),
1449
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Dialog.CloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.CloseButton, { size: "sm" }) })
1471
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react17.Dialog.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react17.Flex, { justify: "space-between", align: "center", width: "100%", children: [
1472
+ header && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react17.Dialog.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react17.Text, { fontWeight: "bold", fontSize: "lg", children: header }) }),
1473
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react17.Dialog.CloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react17.CloseButton, { size: "sm" }) })
1450
1474
  ] }) }),
1451
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Separator, {})
1475
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react17.Separator, {})
1452
1476
  ] }),
1453
- children && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Dialog.Body, { py: 4, children }),
1477
+ children && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react17.Dialog.Body, { py: 4, children }),
1454
1478
  footer && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
1455
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Separator, {}),
1456
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Dialog.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Flex, { gap: 3, justify: "flex-end", w: "100%", children: footer }) })
1479
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react17.Separator, {}),
1480
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react17.Dialog.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react17.Flex, { gap: 3, justify: "flex-end", w: "100%", children: footer }) })
1457
1481
  ] })
1458
1482
  ]
1459
1483
  }
@@ -1463,17 +1487,17 @@ function Modal({
1463
1487
  );
1464
1488
  }
1465
1489
  function AbpModalHeader({ children, className }) {
1466
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Text, { fontWeight: "bold", fontSize: "lg", className, children });
1490
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react17.Text, { fontWeight: "bold", fontSize: "lg", className, children });
1467
1491
  }
1468
1492
  function AbpModalBody({ children, className }) {
1469
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Box, { color: "gray.600", className, children });
1493
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react17.Box, { color: "gray.600", className, children });
1470
1494
  }
1471
1495
  function AbpModalFooter({ children, className }) {
1472
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Flex, { gap: 3, justify: "flex-end", className, children });
1496
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react17.Flex, { gap: 3, justify: "flex-end", className, children });
1473
1497
  }
1474
1498
 
1475
1499
  // src/components/ui/Alert.tsx
1476
- var import_react17 = require("@chakra-ui/react");
1500
+ var import_react18 = require("@chakra-ui/react");
1477
1501
  var import_jsx_runtime9 = require("react/jsx-runtime");
1478
1502
  function Alert({
1479
1503
  status = "info",
@@ -1486,28 +1510,28 @@ function Alert({
1486
1510
  borderRadius = "md"
1487
1511
  }) {
1488
1512
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1489
- import_react17.Alert.Root,
1513
+ import_react18.Alert.Root,
1490
1514
  {
1491
1515
  status,
1492
1516
  className,
1493
1517
  mb,
1494
1518
  borderRadius,
1495
1519
  children: [
1496
- showIcon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react17.Alert.Indicator, {}),
1520
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react18.Alert.Indicator, {}),
1497
1521
  title ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1498
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react17.Alert.Title, { children: title }),
1499
- (description || children) && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react17.Alert.Description, { children: description || children })
1500
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react17.Alert.Title, { children })
1522
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react18.Alert.Title, { children: title }),
1523
+ (description || children) && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react18.Alert.Description, { children: description || children })
1524
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react18.Alert.Title, { children })
1501
1525
  ]
1502
1526
  }
1503
1527
  );
1504
1528
  }
1505
1529
 
1506
1530
  // src/components/ui/Button.tsx
1507
- var import_react18 = require("react");
1508
- var import_react19 = require("@chakra-ui/react");
1531
+ var import_react19 = require("react");
1532
+ var import_react20 = require("@chakra-ui/react");
1509
1533
  var import_jsx_runtime10 = require("react/jsx-runtime");
1510
- var Button3 = (0, import_react18.forwardRef)(
1534
+ var Button3 = (0, import_react19.forwardRef)(
1511
1535
  function Button4({
1512
1536
  children,
1513
1537
  type = "button",
@@ -1524,7 +1548,7 @@ var Button3 = (0, import_react18.forwardRef)(
1524
1548
  ml
1525
1549
  }, ref) {
1526
1550
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1527
- import_react19.Button,
1551
+ import_react20.Button,
1528
1552
  {
1529
1553
  ref,
1530
1554
  type,
@@ -1546,10 +1570,10 @@ var Button3 = (0, import_react18.forwardRef)(
1546
1570
  );
1547
1571
 
1548
1572
  // src/components/ui/Checkbox.tsx
1549
- var import_react20 = require("react");
1550
- var import_react21 = require("@chakra-ui/react");
1573
+ var import_react21 = require("react");
1574
+ var import_react22 = require("@chakra-ui/react");
1551
1575
  var import_jsx_runtime11 = require("react/jsx-runtime");
1552
- var Checkbox = (0, import_react20.forwardRef)(
1576
+ var Checkbox = (0, import_react21.forwardRef)(
1553
1577
  function Checkbox2({
1554
1578
  children,
1555
1579
  checked,
@@ -1567,7 +1591,7 @@ var Checkbox = (0, import_react20.forwardRef)(
1567
1591
  className
1568
1592
  }, ref) {
1569
1593
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1570
- import_react21.Checkbox.Root,
1594
+ import_react22.Checkbox.Root,
1571
1595
  {
1572
1596
  checked,
1573
1597
  defaultChecked,
@@ -1580,7 +1604,7 @@ var Checkbox = (0, import_react20.forwardRef)(
1580
1604
  className,
1581
1605
  children: [
1582
1606
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1583
- import_react21.Checkbox.HiddenInput,
1607
+ import_react22.Checkbox.HiddenInput,
1584
1608
  {
1585
1609
  ref,
1586
1610
  id,
@@ -1589,8 +1613,8 @@ var Checkbox = (0, import_react20.forwardRef)(
1589
1613
  onChange
1590
1614
  }
1591
1615
  ),
1592
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react21.Checkbox.Control, {}),
1593
- children && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react21.Checkbox.Label, { children })
1616
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react22.Checkbox.Control, {}),
1617
+ children && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react22.Checkbox.Label, { children })
1594
1618
  ]
1595
1619
  }
1596
1620
  );
@@ -1598,7 +1622,7 @@ var Checkbox = (0, import_react20.forwardRef)(
1598
1622
  );
1599
1623
 
1600
1624
  // src/components/ui/FormField.tsx
1601
- var import_react22 = require("@chakra-ui/react");
1625
+ var import_react23 = require("@chakra-ui/react");
1602
1626
  var import_jsx_runtime12 = require("react/jsx-runtime");
1603
1627
  function FormField({
1604
1628
  label,
@@ -1611,20 +1635,20 @@ function FormField({
1611
1635
  htmlFor,
1612
1636
  className
1613
1637
  }) {
1614
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react22.Field.Root, { invalid, disabled, className, children: [
1615
- label && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react22.Field.Label, { htmlFor, children: [
1638
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react23.Field.Root, { invalid, disabled, className, children: [
1639
+ label && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react23.Field.Label, { htmlFor, children: [
1616
1640
  label,
1617
- required && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react22.Field.RequiredIndicator, {})
1641
+ required && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react23.Field.RequiredIndicator, {})
1618
1642
  ] }),
1619
1643
  children,
1620
- helperText && !invalid && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react22.Field.HelperText, { children: helperText }),
1621
- invalid && errorText && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react22.Field.ErrorText, { children: errorText })
1644
+ helperText && !invalid && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react23.Field.HelperText, { children: helperText }),
1645
+ invalid && errorText && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react23.Field.ErrorText, { children: errorText })
1622
1646
  ] });
1623
1647
  }
1624
1648
 
1625
1649
  // src/components/change-password/ChangePassword.tsx
1626
- var import_react23 = require("react");
1627
- var import_react24 = require("@chakra-ui/react");
1650
+ var import_react24 = require("react");
1651
+ var import_react25 = require("@chakra-ui/react");
1628
1652
  var import_react_hook_form = require("react-hook-form");
1629
1653
  var import_core4 = require("@abpjs/core");
1630
1654
  var import_lucide_react3 = require("lucide-react");
@@ -1650,7 +1674,7 @@ function ChangePassword({
1650
1674
  }
1651
1675
  });
1652
1676
  const newPassword = watch("newPassword");
1653
- (0, import_react23.useEffect)(() => {
1677
+ (0, import_react24.useEffect)(() => {
1654
1678
  if (visible) {
1655
1679
  reset();
1656
1680
  }
@@ -1692,9 +1716,9 @@ function ChangePassword({
1692
1716
  }
1693
1717
  };
1694
1718
  const modalFooter = /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1695
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react24.Button, { variant: "ghost", mr: 3, onClick: handleClose, disabled: isSubmitting, children: t("AbpIdentity::Cancel") || "Cancel" }),
1719
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react25.Button, { variant: "ghost", mr: 3, onClick: handleClose, disabled: isSubmitting, children: t("AbpIdentity::Cancel") || "Cancel" }),
1696
1720
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1697
- import_react24.Button,
1721
+ import_react25.Button,
1698
1722
  {
1699
1723
  colorPalette: "blue",
1700
1724
  type: "submit",
@@ -1716,14 +1740,14 @@ function ChangePassword({
1716
1740
  header: t("AbpIdentity::ChangePassword") || "Change Password",
1717
1741
  footer: modalFooter,
1718
1742
  centered: true,
1719
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("form", { id: "change-password-form", onSubmit: handleSubmit(onSubmit), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react24.VStack, { gap: 4, children: [
1720
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react24.Field.Root, { invalid: !!errors.password, children: [
1721
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react24.Field.Label, { children: [
1743
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("form", { id: "change-password-form", onSubmit: handleSubmit(onSubmit), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react25.VStack, { gap: 4, children: [
1744
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react25.Field.Root, { invalid: !!errors.password, children: [
1745
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react25.Field.Label, { children: [
1722
1746
  t("AbpIdentity::DisplayName:CurrentPassword") || "Current Password",
1723
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react24.Field.RequiredIndicator, {})
1747
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react25.Field.RequiredIndicator, {})
1724
1748
  ] }),
1725
1749
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1726
- import_react24.Input,
1750
+ import_react25.Input,
1727
1751
  {
1728
1752
  type: "password",
1729
1753
  ...register("password", {
@@ -1731,29 +1755,29 @@ function ChangePassword({
1731
1755
  })
1732
1756
  }
1733
1757
  ),
1734
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react24.Field.ErrorText, { children: errors.password?.message })
1758
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react25.Field.ErrorText, { children: errors.password?.message })
1735
1759
  ] }),
1736
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react24.Field.Root, { invalid: !!errors.newPassword, children: [
1737
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react24.Field.Label, { children: [
1760
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react25.Field.Root, { invalid: !!errors.newPassword, children: [
1761
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react25.Field.Label, { children: [
1738
1762
  t("AbpIdentity::DisplayName:NewPassword") || "New Password",
1739
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react24.Field.RequiredIndicator, {})
1763
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react25.Field.RequiredIndicator, {})
1740
1764
  ] }),
1741
1765
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1742
- import_react24.Input,
1766
+ import_react25.Input,
1743
1767
  {
1744
1768
  type: "password",
1745
1769
  ...register("newPassword", passwordValidation)
1746
1770
  }
1747
1771
  ),
1748
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react24.Field.ErrorText, { children: errors.newPassword?.message })
1772
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react25.Field.ErrorText, { children: errors.newPassword?.message })
1749
1773
  ] }),
1750
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react24.Field.Root, { invalid: !!errors.repeatNewPassword, children: [
1751
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react24.Field.Label, { children: [
1774
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react25.Field.Root, { invalid: !!errors.repeatNewPassword, children: [
1775
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react25.Field.Label, { children: [
1752
1776
  t("AbpIdentity::DisplayName:NewPasswordConfirm") || "Confirm New Password",
1753
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react24.Field.RequiredIndicator, {})
1777
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react25.Field.RequiredIndicator, {})
1754
1778
  ] }),
1755
1779
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1756
- import_react24.Input,
1780
+ import_react25.Input,
1757
1781
  {
1758
1782
  type: "password",
1759
1783
  ...register("repeatNewPassword", {
@@ -1762,7 +1786,7 @@ function ChangePassword({
1762
1786
  })
1763
1787
  }
1764
1788
  ),
1765
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react24.Field.ErrorText, { children: errors.repeatNewPassword?.message })
1789
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react25.Field.ErrorText, { children: errors.repeatNewPassword?.message })
1766
1790
  ] })
1767
1791
  ] }) })
1768
1792
  }
@@ -1770,8 +1794,8 @@ function ChangePassword({
1770
1794
  }
1771
1795
 
1772
1796
  // src/components/profile/Profile.tsx
1773
- var import_react25 = require("react");
1774
- var import_react26 = require("@chakra-ui/react");
1797
+ var import_react26 = require("react");
1798
+ var import_react27 = require("@chakra-ui/react");
1775
1799
  var import_react_hook_form2 = require("react-hook-form");
1776
1800
  var import_core5 = require("@abpjs/core");
1777
1801
  var import_lucide_react4 = require("lucide-react");
@@ -1798,13 +1822,13 @@ function Profile({
1798
1822
  }
1799
1823
  });
1800
1824
  const modalBusy = isSubmitting || loading;
1801
- (0, import_react25.useEffect)(() => {
1825
+ (0, import_react26.useEffect)(() => {
1802
1826
  if (visible) {
1803
1827
  fetchProfile().then(() => {
1804
1828
  });
1805
1829
  }
1806
1830
  }, [visible, fetchProfile]);
1807
- (0, import_react25.useEffect)(() => {
1831
+ (0, import_react26.useEffect)(() => {
1808
1832
  if (profile) {
1809
1833
  reset({
1810
1834
  userName: profile.userName || "",
@@ -1836,9 +1860,9 @@ function Profile({
1836
1860
  }
1837
1861
  };
1838
1862
  const modalFooter = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1839
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Button, { variant: "ghost", mr: 3, onClick: handleClose, disabled: modalBusy, children: t("AbpIdentity::Cancel") || "Cancel" }),
1863
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react27.Button, { variant: "ghost", mr: 3, onClick: handleClose, disabled: modalBusy, children: t("AbpIdentity::Cancel") || "Cancel" }),
1840
1864
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1841
- import_react26.Button,
1865
+ import_react27.Button,
1842
1866
  {
1843
1867
  colorPalette: "blue",
1844
1868
  type: "submit",
@@ -1861,14 +1885,14 @@ function Profile({
1861
1885
  footer: modalFooter,
1862
1886
  size: "lg",
1863
1887
  centered: true,
1864
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("form", { id: "profile-form", onSubmit: handleSubmit(onSubmit), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.VStack, { gap: 4, children: [
1865
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.Field.Root, { invalid: !!errors.userName, children: [
1866
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.Field.Label, { children: [
1888
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("form", { id: "profile-form", onSubmit: handleSubmit(onSubmit), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react27.VStack, { gap: 4, children: [
1889
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react27.Field.Root, { invalid: !!errors.userName, children: [
1890
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react27.Field.Label, { children: [
1867
1891
  t("AbpIdentity::DisplayName:UserName") || "Username",
1868
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.RequiredIndicator, {})
1892
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react27.Field.RequiredIndicator, {})
1869
1893
  ] }),
1870
1894
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1871
- import_react26.Input,
1895
+ import_react27.Input,
1872
1896
  {
1873
1897
  type: "text",
1874
1898
  ...register("userName", {
@@ -1880,13 +1904,13 @@ function Profile({
1880
1904
  })
1881
1905
  }
1882
1906
  ),
1883
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.ErrorText, { children: errors.userName?.message })
1907
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react27.Field.ErrorText, { children: errors.userName?.message })
1884
1908
  ] }),
1885
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.HStack, { gap: 4, w: "full", children: [
1886
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.Field.Root, { invalid: !!errors.name, flex: 1, children: [
1887
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.Label, { children: t("AbpIdentity::DisplayName:Name") || "Name" }),
1909
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react27.HStack, { gap: 4, w: "full", children: [
1910
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react27.Field.Root, { invalid: !!errors.name, flex: 1, children: [
1911
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react27.Field.Label, { children: t("AbpIdentity::DisplayName:Name") || "Name" }),
1888
1912
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1889
- import_react26.Input,
1913
+ import_react27.Input,
1890
1914
  {
1891
1915
  type: "text",
1892
1916
  ...register("name", {
@@ -1897,12 +1921,12 @@ function Profile({
1897
1921
  })
1898
1922
  }
1899
1923
  ),
1900
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.ErrorText, { children: errors.name?.message })
1924
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react27.Field.ErrorText, { children: errors.name?.message })
1901
1925
  ] }),
1902
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.Field.Root, { invalid: !!errors.surname, flex: 1, children: [
1903
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.Label, { children: t("AbpIdentity::DisplayName:Surname") || "Surname" }),
1926
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react27.Field.Root, { invalid: !!errors.surname, flex: 1, children: [
1927
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react27.Field.Label, { children: t("AbpIdentity::DisplayName:Surname") || "Surname" }),
1904
1928
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1905
- import_react26.Input,
1929
+ import_react27.Input,
1906
1930
  {
1907
1931
  type: "text",
1908
1932
  ...register("surname", {
@@ -1913,16 +1937,16 @@ function Profile({
1913
1937
  })
1914
1938
  }
1915
1939
  ),
1916
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.ErrorText, { children: errors.surname?.message })
1940
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react27.Field.ErrorText, { children: errors.surname?.message })
1917
1941
  ] })
1918
1942
  ] }),
1919
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.Field.Root, { invalid: !!errors.email, children: [
1920
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.Field.Label, { children: [
1943
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react27.Field.Root, { invalid: !!errors.email, children: [
1944
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react27.Field.Label, { children: [
1921
1945
  t("AbpIdentity::DisplayName:EmailAddress") || "Email Address",
1922
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.RequiredIndicator, {})
1946
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react27.Field.RequiredIndicator, {})
1923
1947
  ] }),
1924
1948
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1925
- import_react26.Input,
1949
+ import_react27.Input,
1926
1950
  {
1927
1951
  type: "email",
1928
1952
  ...register("email", {
@@ -1938,12 +1962,12 @@ function Profile({
1938
1962
  })
1939
1963
  }
1940
1964
  ),
1941
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.ErrorText, { children: errors.email?.message })
1965
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react27.Field.ErrorText, { children: errors.email?.message })
1942
1966
  ] }),
1943
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.Field.Root, { invalid: !!errors.phoneNumber, children: [
1944
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.Label, { children: t("AbpIdentity::DisplayName:PhoneNumber") || "Phone Number" }),
1967
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react27.Field.Root, { invalid: !!errors.phoneNumber, children: [
1968
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react27.Field.Label, { children: t("AbpIdentity::DisplayName:PhoneNumber") || "Phone Number" }),
1945
1969
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1946
- import_react26.Input,
1970
+ import_react27.Input,
1947
1971
  {
1948
1972
  type: "tel",
1949
1973
  ...register("phoneNumber", {
@@ -1954,7 +1978,7 @@ function Profile({
1954
1978
  })
1955
1979
  }
1956
1980
  ),
1957
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.ErrorText, { children: errors.phoneNumber?.message })
1981
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react27.Field.ErrorText, { children: errors.phoneNumber?.message })
1958
1982
  ] })
1959
1983
  ] }) })
1960
1984
  }
@@ -1962,10 +1986,10 @@ function Profile({
1962
1986
  }
1963
1987
 
1964
1988
  // src/providers/ThemeSharedProvider.tsx
1965
- var import_react29 = require("@chakra-ui/react");
1989
+ var import_react30 = require("@chakra-ui/react");
1966
1990
 
1967
1991
  // src/theme/index.ts
1968
- var import_react27 = require("@chakra-ui/react");
1992
+ var import_react28 = require("@chakra-ui/react");
1969
1993
  var colors = {
1970
1994
  brand: {
1971
1995
  50: { value: "#e3f2fd" },
@@ -2168,7 +2192,7 @@ var semanticTokens = {
2168
2192
  // },
2169
2193
  // },
2170
2194
  };
2171
- var defaultAbpConfig = (0, import_react27.defineConfig)({
2195
+ var defaultAbpConfig = (0, import_react28.defineConfig)({
2172
2196
  theme: {
2173
2197
  tokens: {
2174
2198
  colors,
@@ -2190,14 +2214,14 @@ var defaultAbpConfig = (0, import_react27.defineConfig)({
2190
2214
  });
2191
2215
  function createAbpSystem(overrides) {
2192
2216
  if (overrides) {
2193
- return (0, import_react27.createSystem)(import_react27.defaultConfig, defaultAbpConfig, overrides);
2217
+ return (0, import_react28.createSystem)(import_react28.defaultConfig, defaultAbpConfig, overrides);
2194
2218
  }
2195
- return (0, import_react27.createSystem)(import_react27.defaultConfig, defaultAbpConfig);
2219
+ return (0, import_react28.createSystem)(import_react28.defaultConfig, defaultAbpConfig);
2196
2220
  }
2197
2221
  var abpSystem = createAbpSystem();
2198
2222
 
2199
2223
  // src/components/ui/color-mode.tsx
2200
- var import_react28 = require("@chakra-ui/react");
2224
+ var import_react29 = require("@chakra-ui/react");
2201
2225
  var import_next_themes = require("next-themes");
2202
2226
  var React11 = __toESM(require("react"));
2203
2227
  var import_lucide_react5 = require("lucide-react");
@@ -2223,8 +2247,8 @@ function ColorModeIcon() {
2223
2247
  }
2224
2248
  var ColorModeButton = React11.forwardRef(function ColorModeButton2(props, ref) {
2225
2249
  const { toggleColorMode } = useColorMode();
2226
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react28.ClientOnly, { fallback: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react28.Skeleton, { boxSize: "9" }), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2227
- import_react28.IconButton,
2250
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react29.ClientOnly, { fallback: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react29.Skeleton, { boxSize: "9" }), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2251
+ import_react29.IconButton,
2228
2252
  {
2229
2253
  onClick: toggleColorMode,
2230
2254
  variant: "ghost",
@@ -2245,7 +2269,7 @@ var ColorModeButton = React11.forwardRef(function ColorModeButton2(props, ref) {
2245
2269
  var LightMode = React11.forwardRef(
2246
2270
  function LightMode2(props, ref) {
2247
2271
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2248
- import_react28.Span,
2272
+ import_react29.Span,
2249
2273
  {
2250
2274
  color: "fg",
2251
2275
  display: "contents",
@@ -2261,7 +2285,7 @@ var LightMode = React11.forwardRef(
2261
2285
  var DarkMode = React11.forwardRef(
2262
2286
  function DarkMode2(props, ref) {
2263
2287
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2264
- import_react28.Span,
2288
+ import_react29.Span,
2265
2289
  {
2266
2290
  color: "fg",
2267
2291
  display: "contents",
@@ -2297,7 +2321,7 @@ function ThemeSharedProvider({
2297
2321
  renderConfirmation && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ConfirmationDialog, {})
2298
2322
  ] }) });
2299
2323
  const colorModeProps = enableColorMode ? { defaultTheme: defaultColorMode } : { forcedTheme: "light" };
2300
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react29.ChakraProvider, { value: system, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react29.LocaleProvider, { locale, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ColorModeProvider, { ...colorModeProps, children: content }) }) });
2324
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react30.ChakraProvider, { value: system, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react30.LocaleProvider, { locale, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ColorModeProvider, { ...colorModeProps, children: content }) }) });
2301
2325
  }
2302
2326
 
2303
2327
  // src/providers/route.provider.ts
@@ -2331,17 +2355,17 @@ function initializeThemeSharedRoutes() {
2331
2355
  }
2332
2356
 
2333
2357
  // src/handlers/lazy-style.handler.ts
2334
- var import_react30 = require("react");
2358
+ var import_react31 = require("react");
2335
2359
  var import_core8 = require("@abpjs/core");
2336
2360
  function createLazyStyleHref(style, dir) {
2337
2361
  return style.replace("{{dir}}", dir);
2338
2362
  }
2339
2363
  function useLazyStyleHandler(options = {}) {
2340
2364
  const { styles = [BOOTSTRAP], initialDirection = "ltr" } = options;
2341
- const [direction, setDirection] = (0, import_react30.useState)(initialDirection);
2342
- const lazyLoadRef = (0, import_react30.useRef)(new import_core8.LazyLoadService());
2343
- const loadedStylesRef = (0, import_react30.useRef)(/* @__PURE__ */ new Map());
2344
- (0, import_react30.useEffect)(() => {
2365
+ const [direction, setDirection] = (0, import_react31.useState)(initialDirection);
2366
+ const lazyLoadRef = (0, import_react31.useRef)(new import_core8.LazyLoadService());
2367
+ const loadedStylesRef = (0, import_react31.useRef)(/* @__PURE__ */ new Map());
2368
+ (0, import_react31.useEffect)(() => {
2345
2369
  document.body.dir = direction;
2346
2370
  const switchCSS = async () => {
2347
2371
  const lazyLoad = lazyLoadRef.current;
@@ -2616,6 +2640,8 @@ function getPasswordValidationRules(store) {
2616
2640
  NavItemsService,
2617
2641
  PASSWORD_SETTING_KEYS,
2618
2642
  Profile,
2643
+ SUPPRESS_UNSAVED_CHANGES_WARNING,
2644
+ SuppressUnsavedChangesWarningContext,
2619
2645
  THEME_SHARED_APPEND_CONTENT,
2620
2646
  THEME_SHARED_ROUTE_PROVIDERS,
2621
2647
  THEME_SHARED_STYLES,
@@ -2654,6 +2680,7 @@ function getPasswordValidationRules(store) {
2654
2680
  useModalContext,
2655
2681
  useModalState,
2656
2682
  useNavItems,
2683
+ useSuppressUnsavedChangesWarning,
2657
2684
  useToaster,
2658
2685
  useToasterContext,
2659
2686
  useToasts