@abpjs/theme-shared 2.4.0 → 2.9.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
@@ -34,21 +34,30 @@ __export(index_exports, {
34
34
  AbpModalFooter: () => AbpModalFooter,
35
35
  AbpModalHeader: () => AbpModalHeader,
36
36
  Alert: () => Alert,
37
+ BOOTSTRAP: () => BOOTSTRAP,
37
38
  Button: () => Button3,
38
- ChakraDialog: () => import_react12.Dialog,
39
+ ChakraDialog: () => import_react15.Dialog,
39
40
  ChangePassword: () => ChangePassword,
40
41
  Checkbox: () => Checkbox,
41
42
  Confirmation: () => Confirmation,
42
43
  ConfirmationDialog: () => ConfirmationDialog,
43
44
  ConfirmationProvider: () => ConfirmationProvider,
45
+ DEFAULT_LAZY_STYLES: () => DEFAULT_LAZY_STYLES,
44
46
  DEFAULT_STYLES: () => DEFAULT_STYLES,
45
47
  ErrorComponent: () => ErrorComponent,
46
48
  FormField: () => FormField,
49
+ HTTP_ERROR_CONFIG: () => HTTP_ERROR_CONFIG,
50
+ HttpErrorConfigContext: () => HttpErrorConfigContext,
51
+ LAZY_STYLES: () => LAZY_STYLES,
52
+ LazyStylesContext: () => LazyStylesContext,
47
53
  LoaderBar: () => LoaderBar,
48
54
  Modal: () => Modal,
49
55
  ModalBody: () => AbpModalBody,
56
+ ModalContainer: () => ModalContainer,
50
57
  ModalFooter: () => AbpModalFooter,
51
58
  ModalHeader: () => AbpModalHeader,
59
+ ModalProvider: () => ModalProvider,
60
+ PASSWORD_SETTING_KEYS: () => PASSWORD_SETTING_KEYS,
52
61
  Profile: () => Profile,
53
62
  THEME_SHARED_APPEND_CONTENT: () => THEME_SHARED_APPEND_CONTENT,
54
63
  THEME_SHARED_STYLES: () => THEME_SHARED_STYLES,
@@ -58,18 +67,37 @@ __export(index_exports, {
58
67
  Toaster: () => Toaster,
59
68
  ToasterProvider: () => ToasterProvider,
60
69
  abpSystem: () => abpSystem,
70
+ addNavItem: () => addNavItem,
71
+ clearNavItems: () => clearNavItems,
61
72
  createAbpSystem: () => createAbpSystem,
62
73
  createErrorInterceptor: () => createErrorInterceptor,
74
+ createLazyStyleHref: () => createLazyStyleHref,
63
75
  defaultAbpConfig: () => defaultAbpConfig,
64
- defineConfig: () => import_react23.defineConfig,
76
+ defineConfig: () => import_react26.defineConfig,
77
+ getLoadedBootstrapDirection: () => getLoadedBootstrapDirection,
78
+ getNavItems: () => getNavItems,
79
+ getNavItemsSync: () => getNavItemsSync,
80
+ getPasswordSettings: () => getPasswordSettings,
81
+ getPasswordValidationRules: () => getPasswordValidationRules,
82
+ getPasswordValidators: () => getPasswordValidators,
65
83
  getSeverityBg: () => getSeverityBg,
66
84
  getSeverityBorderColor: () => getSeverityBorderColor,
67
85
  getSeverityColorScheme: () => getSeverityColorPalette,
86
+ httpErrorConfigFactory: () => httpErrorConfigFactory,
87
+ initLazyStyleHandler: () => initLazyStyleHandler,
68
88
  injectThemeSharedStyles: () => injectThemeSharedStyles,
89
+ removeNavItem: () => removeNavItem,
90
+ subscribeToNavItems: () => subscribeToNavItems,
69
91
  useConfirmation: () => useConfirmation,
70
92
  useConfirmationContext: () => useConfirmationContext,
71
93
  useConfirmationState: () => useConfirmationState,
72
94
  useErrorHandler: () => useErrorHandler,
95
+ useHttpErrorConfig: () => useHttpErrorConfig,
96
+ useLazyStyleHandler: () => useLazyStyleHandler,
97
+ useLazyStyles: () => useLazyStyles,
98
+ useModal: () => useModal,
99
+ useModalContext: () => useModalContext,
100
+ useModalState: () => useModalState,
73
101
  useToaster: () => useToaster,
74
102
  useToasterContext: () => useToasterContext,
75
103
  useToasts: () => useToasts
@@ -99,6 +127,7 @@ var Confirmation;
99
127
  })(Confirmation || (Confirmation = {}));
100
128
 
101
129
  // src/constants/styles.ts
130
+ var BOOTSTRAP = "bootstrap-{{dir}}.min.css";
102
131
  var DEFAULT_STYLES = `
103
132
  .is-invalid .form-control {
104
133
  border-color: #dc3545;
@@ -114,6 +143,11 @@ var DEFAULT_STYLES = `
114
143
  text-align: right;
115
144
  }
116
145
 
146
+ /* RTL support - @since 2.9.0 */
147
+ [dir=rtl] .data-tables-filter {
148
+ text-align: left;
149
+ }
150
+
117
151
  .pointer {
118
152
  cursor: pointer;
119
153
  }
@@ -280,10 +314,34 @@ var import_react = require("react");
280
314
  var ThemeSharedAppendContentContext = (0, import_react.createContext)(void 0);
281
315
  var THEME_SHARED_APPEND_CONTENT = "THEME_SHARED_APPEND_CONTENT";
282
316
 
283
- // src/contexts/toaster.context.tsx
317
+ // src/tokens/http-error.token.ts
284
318
  var import_react2 = require("react");
319
+ var HTTP_ERROR_CONFIG = "HTTP_ERROR_CONFIG";
320
+ var HttpErrorConfigContext = (0, import_react2.createContext)(void 0);
321
+ function httpErrorConfigFactory() {
322
+ return {
323
+ skipHandledErrorCodes: [],
324
+ errorScreen: void 0
325
+ };
326
+ }
327
+ function useHttpErrorConfig() {
328
+ const context = (0, import_react2.useContext)(HttpErrorConfigContext);
329
+ return context ?? httpErrorConfigFactory();
330
+ }
331
+
332
+ // src/tokens/lazy-styles.token.ts
333
+ var import_react3 = require("react");
334
+ var DEFAULT_LAZY_STYLES = [BOOTSTRAP];
335
+ var LazyStylesContext = (0, import_react3.createContext)(DEFAULT_LAZY_STYLES);
336
+ function useLazyStyles() {
337
+ return (0, import_react3.useContext)(LazyStylesContext);
338
+ }
339
+ var LAZY_STYLES = DEFAULT_LAZY_STYLES;
340
+
341
+ // src/contexts/toaster.context.tsx
342
+ var import_react4 = require("react");
285
343
  var import_jsx_runtime = require("react/jsx-runtime");
286
- var ToasterContext = (0, import_react2.createContext)(null);
344
+ var ToasterContext = (0, import_react4.createContext)(null);
287
345
  var toastCounter = 0;
288
346
  function generateId() {
289
347
  toastCounter += 1;
@@ -291,17 +349,17 @@ function generateId() {
291
349
  }
292
350
  var DEFAULT_LIFE = 5e3;
293
351
  function ToasterProvider({ children }) {
294
- const [toasts, setToasts] = (0, import_react2.useState)([]);
295
- const subscribersRef = (0, import_react2.useRef)(/* @__PURE__ */ new Set());
296
- (0, import_react2.useEffect)(() => {
352
+ const [toasts, setToasts] = (0, import_react4.useState)([]);
353
+ const subscribersRef = (0, import_react4.useRef)(/* @__PURE__ */ new Set());
354
+ (0, import_react4.useEffect)(() => {
297
355
  subscribersRef.current.forEach((subscriber) => {
298
356
  subscriber(toasts);
299
357
  });
300
358
  }, [toasts]);
301
- const remove = (0, import_react2.useCallback)((id) => {
359
+ const remove = (0, import_react4.useCallback)((id) => {
302
360
  setToasts((prev) => prev.filter((t) => t.id !== id));
303
361
  }, []);
304
- const show = (0, import_react2.useCallback)(
362
+ const show = (0, import_react4.useCallback)(
305
363
  (message, title, severity = "info", options) => {
306
364
  const id = typeof options?.id === "number" ? options.id : generateId();
307
365
  const life = options?.sticky ? void 0 : options?.life ?? DEFAULT_LIFE;
@@ -325,23 +383,23 @@ function ToasterProvider({ children }) {
325
383
  },
326
384
  [remove]
327
385
  );
328
- const info = (0, import_react2.useCallback)(
386
+ const info = (0, import_react4.useCallback)(
329
387
  (message, title, options) => show(message, title, "info", options),
330
388
  [show]
331
389
  );
332
- const success = (0, import_react2.useCallback)(
390
+ const success = (0, import_react4.useCallback)(
333
391
  (message, title, options) => show(message, title, "success", options),
334
392
  [show]
335
393
  );
336
- const warn = (0, import_react2.useCallback)(
394
+ const warn = (0, import_react4.useCallback)(
337
395
  (message, title, options) => show(message, title, "warning", options),
338
396
  [show]
339
397
  );
340
- const error = (0, import_react2.useCallback)(
398
+ const error = (0, import_react4.useCallback)(
341
399
  (message, title, options) => show(message, title, "error", options),
342
400
  [show]
343
401
  );
344
- const clear = (0, import_react2.useCallback)((key) => {
402
+ const clear = (0, import_react4.useCallback)((key) => {
345
403
  setToasts((prev) => {
346
404
  if (key) {
347
405
  return prev.filter((toast) => toast.options?.containerKey !== key);
@@ -349,14 +407,14 @@ function ToasterProvider({ children }) {
349
407
  return [];
350
408
  });
351
409
  }, []);
352
- const subscribe = (0, import_react2.useCallback)((subscriber) => {
410
+ const subscribe = (0, import_react4.useCallback)((subscriber) => {
353
411
  subscribersRef.current.add(subscriber);
354
412
  subscriber(toasts);
355
413
  return () => {
356
414
  subscribersRef.current.delete(subscriber);
357
415
  };
358
416
  }, [toasts]);
359
- const service = (0, import_react2.useMemo)(
417
+ const service = (0, import_react4.useMemo)(
360
418
  () => ({
361
419
  info,
362
420
  success,
@@ -369,28 +427,28 @@ function ToasterProvider({ children }) {
369
427
  }),
370
428
  [info, success, warn, error, show, remove, clear, subscribe]
371
429
  );
372
- const value = (0, import_react2.useMemo)(
430
+ const value = (0, import_react4.useMemo)(
373
431
  () => ({ service, toasts }),
374
432
  [service, toasts]
375
433
  );
376
434
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToasterContext.Provider, { value, children });
377
435
  }
378
436
  function useToaster() {
379
- const context = (0, import_react2.useContext)(ToasterContext);
437
+ const context = (0, import_react4.useContext)(ToasterContext);
380
438
  if (!context) {
381
439
  throw new Error("useToaster must be used within a ToasterProvider");
382
440
  }
383
441
  return context.service;
384
442
  }
385
443
  function useToasts() {
386
- const context = (0, import_react2.useContext)(ToasterContext);
444
+ const context = (0, import_react4.useContext)(ToasterContext);
387
445
  if (!context) {
388
446
  throw new Error("useToasts must be used within a ToasterProvider");
389
447
  }
390
448
  return context.toasts;
391
449
  }
392
450
  function useToasterContext() {
393
- const context = (0, import_react2.useContext)(ToasterContext);
451
+ const context = (0, import_react4.useContext)(ToasterContext);
394
452
  if (!context) {
395
453
  throw new Error("useToasterContext must be used within a ToasterProvider");
396
454
  }
@@ -398,30 +456,30 @@ function useToasterContext() {
398
456
  }
399
457
 
400
458
  // src/contexts/confirmation.context.tsx
401
- var import_react3 = require("react");
459
+ var import_react5 = require("react");
402
460
  var import_jsx_runtime2 = require("react/jsx-runtime");
403
- var ConfirmationContext = (0, import_react3.createContext)(null);
461
+ var ConfirmationContext = (0, import_react5.createContext)(null);
404
462
  function generateId2() {
405
463
  return `confirmation-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
406
464
  }
407
465
  function ConfirmationProvider({ children }) {
408
- const [confirmation, setConfirmation] = (0, import_react3.useState)(null);
409
- const resolverRef = (0, import_react3.useRef)(null);
410
- const subscribersRef = (0, import_react3.useRef)(/* @__PURE__ */ new Set());
411
- const escapeListenerRef = (0, import_react3.useRef)(false);
412
- (0, import_react3.useEffect)(() => {
466
+ const [confirmation, setConfirmation] = (0, import_react5.useState)(null);
467
+ const resolverRef = (0, import_react5.useRef)(null);
468
+ const subscribersRef = (0, import_react5.useRef)(/* @__PURE__ */ new Set());
469
+ const escapeListenerRef = (0, import_react5.useRef)(false);
470
+ (0, import_react5.useEffect)(() => {
413
471
  subscribersRef.current.forEach((subscriber) => {
414
472
  subscriber(confirmation);
415
473
  });
416
474
  }, [confirmation]);
417
- const respond = (0, import_react3.useCallback)((status) => {
475
+ const respond = (0, import_react5.useCallback)((status) => {
418
476
  if (resolverRef.current) {
419
477
  resolverRef.current(status);
420
478
  resolverRef.current = null;
421
479
  }
422
480
  setConfirmation(null);
423
481
  }, []);
424
- (0, import_react3.useEffect)(() => {
482
+ (0, import_react5.useEffect)(() => {
425
483
  if (!escapeListenerRef.current) return;
426
484
  const handleEscape = (event) => {
427
485
  if (event.key === "Escape" && confirmation && confirmation.options?.closable !== false) {
@@ -433,7 +491,7 @@ function ConfirmationProvider({ children }) {
433
491
  document.removeEventListener("keydown", handleEscape);
434
492
  };
435
493
  }, [confirmation, respond]);
436
- const show = (0, import_react3.useCallback)(
494
+ const show = (0, import_react5.useCallback)(
437
495
  (message, title, severity = "neutral", options = {}) => {
438
496
  if (resolverRef.current) {
439
497
  resolverRef.current(Confirmation.Status.dismiss);
@@ -455,39 +513,39 @@ function ConfirmationProvider({ children }) {
455
513
  },
456
514
  []
457
515
  );
458
- const info = (0, import_react3.useCallback)(
516
+ const info = (0, import_react5.useCallback)(
459
517
  (message, title, options) => show(message, title, "info", options),
460
518
  [show]
461
519
  );
462
- const success = (0, import_react3.useCallback)(
520
+ const success = (0, import_react5.useCallback)(
463
521
  (message, title, options) => show(message, title, "success", options),
464
522
  [show]
465
523
  );
466
- const warn = (0, import_react3.useCallback)(
524
+ const warn = (0, import_react5.useCallback)(
467
525
  (message, title, options) => show(message, title, "warning", options),
468
526
  [show]
469
527
  );
470
- const error = (0, import_react3.useCallback)(
528
+ const error = (0, import_react5.useCallback)(
471
529
  (message, title, options) => show(message, title, "error", options),
472
530
  [show]
473
531
  );
474
- const clear = (0, import_react3.useCallback)(
532
+ const clear = (0, import_react5.useCallback)(
475
533
  (status) => {
476
534
  respond(status ?? Confirmation.Status.dismiss);
477
535
  },
478
536
  [respond]
479
537
  );
480
- const listenToEscape = (0, import_react3.useCallback)(() => {
538
+ const listenToEscape = (0, import_react5.useCallback)(() => {
481
539
  escapeListenerRef.current = true;
482
540
  }, []);
483
- const subscribe = (0, import_react3.useCallback)((subscriber) => {
541
+ const subscribe = (0, import_react5.useCallback)((subscriber) => {
484
542
  subscribersRef.current.add(subscriber);
485
543
  subscriber(confirmation);
486
544
  return () => {
487
545
  subscribersRef.current.delete(subscriber);
488
546
  };
489
547
  }, [confirmation]);
490
- const service = (0, import_react3.useMemo)(
548
+ const service = (0, import_react5.useMemo)(
491
549
  () => ({
492
550
  info,
493
551
  success,
@@ -500,36 +558,103 @@ function ConfirmationProvider({ children }) {
500
558
  }),
501
559
  [info, success, warn, error, show, clear, listenToEscape, subscribe]
502
560
  );
503
- const value = (0, import_react3.useMemo)(
561
+ const value = (0, import_react5.useMemo)(
504
562
  () => ({ service, confirmation, respond }),
505
563
  [service, confirmation, respond]
506
564
  );
507
565
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ConfirmationContext.Provider, { value, children });
508
566
  }
509
567
  function useConfirmation() {
510
- const context = (0, import_react3.useContext)(ConfirmationContext);
568
+ const context = (0, import_react5.useContext)(ConfirmationContext);
511
569
  if (!context) {
512
570
  throw new Error("useConfirmation must be used within a ConfirmationProvider");
513
571
  }
514
572
  return context.service;
515
573
  }
516
574
  function useConfirmationState() {
517
- const context = (0, import_react3.useContext)(ConfirmationContext);
575
+ const context = (0, import_react5.useContext)(ConfirmationContext);
518
576
  if (!context) {
519
577
  throw new Error("useConfirmationState must be used within a ConfirmationProvider");
520
578
  }
521
579
  return { confirmation: context.confirmation, respond: context.respond };
522
580
  }
523
581
  function useConfirmationContext() {
524
- const context = (0, import_react3.useContext)(ConfirmationContext);
582
+ const context = (0, import_react5.useContext)(ConfirmationContext);
525
583
  if (!context) {
526
584
  throw new Error("useConfirmationContext must be used within a ConfirmationProvider");
527
585
  }
528
586
  return context;
529
587
  }
530
588
 
589
+ // src/contexts/modal.context.tsx
590
+ var import_react6 = require("react");
591
+ var import_jsx_runtime3 = require("react/jsx-runtime");
592
+ var ModalContext = (0, import_react6.createContext)(null);
593
+ function ModalProvider({ children }) {
594
+ const [modalState, setModalState] = (0, import_react6.useState)(null);
595
+ const [, setUpdateCounter] = (0, import_react6.useState)(0);
596
+ const containerRef = (0, import_react6.useRef)(null);
597
+ const renderTemplate = (0, import_react6.useCallback)((render, context) => {
598
+ setModalState({ render, context });
599
+ }, []);
600
+ const clearModal = (0, import_react6.useCallback)(() => {
601
+ setModalState(null);
602
+ }, []);
603
+ const getContainer = (0, import_react6.useCallback)(() => {
604
+ return containerRef;
605
+ }, []);
606
+ const detectChanges = (0, import_react6.useCallback)(() => {
607
+ setUpdateCounter((prev) => prev + 1);
608
+ }, []);
609
+ const service = (0, import_react6.useMemo)(
610
+ () => ({
611
+ renderTemplate,
612
+ clearModal,
613
+ getContainer,
614
+ detectChanges
615
+ }),
616
+ [renderTemplate, clearModal, getContainer, detectChanges]
617
+ );
618
+ const value = (0, import_react6.useMemo)(
619
+ () => ({ service, modalState }),
620
+ [service, modalState]
621
+ );
622
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(ModalContext.Provider, { value, children: [
623
+ children,
624
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ref: containerRef, id: "modal-container" })
625
+ ] });
626
+ }
627
+ function useModal() {
628
+ const context = (0, import_react6.useContext)(ModalContext);
629
+ if (!context) {
630
+ throw new Error("useModal must be used within a ModalProvider");
631
+ }
632
+ return context.service;
633
+ }
634
+ function useModalState() {
635
+ const context = (0, import_react6.useContext)(ModalContext);
636
+ if (!context) {
637
+ throw new Error("useModalState must be used within a ModalProvider");
638
+ }
639
+ return context.modalState;
640
+ }
641
+ function useModalContext() {
642
+ const context = (0, import_react6.useContext)(ModalContext);
643
+ if (!context) {
644
+ throw new Error("useModalContext must be used within a ModalProvider");
645
+ }
646
+ return context;
647
+ }
648
+ function ModalContainer() {
649
+ const modalState = useModalState();
650
+ if (!modalState) {
651
+ return null;
652
+ }
653
+ return modalState.render(modalState.context);
654
+ }
655
+
531
656
  // src/handlers/error.handler.ts
532
- var import_react4 = require("react");
657
+ var import_react7 = require("react");
533
658
  var DEFAULT_ERROR_MESSAGES = {
534
659
  400: "AbpUi::DefaultErrorMessage400",
535
660
  401: "AbpUi::DefaultErrorMessage401",
@@ -541,22 +666,22 @@ var DEFAULT_ERROR_MESSAGES = {
541
666
  function useErrorHandler(options = {}) {
542
667
  const { navigate, loginPath = "/account/login" } = options;
543
668
  const confirmation = useConfirmation();
544
- const [errorComponentProps, setErrorComponentProps] = (0, import_react4.useState)(null);
545
- const navigateToLogin = (0, import_react4.useCallback)(() => {
669
+ const [errorComponentProps, setErrorComponentProps] = (0, import_react7.useState)(null);
670
+ const navigateToLogin = (0, import_react7.useCallback)(() => {
546
671
  if (navigate) {
547
672
  navigate(loginPath);
548
673
  }
549
674
  }, [navigate, loginPath]);
550
- const showError = (0, import_react4.useCallback)(
675
+ const showError = (0, import_react7.useCallback)(
551
676
  async (message, title) => {
552
677
  return confirmation.error(message, title || "AbpUi::Error");
553
678
  },
554
679
  [confirmation]
555
680
  );
556
- const clearErrorComponent = (0, import_react4.useCallback)(() => {
681
+ const clearErrorComponent = (0, import_react7.useCallback)(() => {
557
682
  setErrorComponentProps(null);
558
683
  }, []);
559
- const createErrorComponent = (0, import_react4.useCallback)(
684
+ const createErrorComponent = (0, import_react7.useCallback)(
560
685
  (instance) => {
561
686
  const props = {
562
687
  title: instance.title || "Error",
@@ -569,7 +694,7 @@ function useErrorHandler(options = {}) {
569
694
  },
570
695
  [clearErrorComponent]
571
696
  );
572
- const handleError = (0, import_react4.useCallback)(
697
+ const handleError = (0, import_react7.useCallback)(
573
698
  async (error) => {
574
699
  if (error.status === 401) {
575
700
  navigateToLogin();
@@ -611,11 +736,11 @@ function isHttpErrorResponse(error) {
611
736
  }
612
737
 
613
738
  // src/components/toast/Toast.tsx
614
- var import_react5 = require("react");
615
- var import_react6 = require("@chakra-ui/react");
739
+ var import_react8 = require("react");
740
+ var import_react9 = require("@chakra-ui/react");
616
741
  var import_core = require("@abpjs/core");
617
742
  var import_lucide_react = require("lucide-react");
618
- var import_jsx_runtime3 = require("react/jsx-runtime");
743
+ var import_jsx_runtime4 = require("react/jsx-runtime");
619
744
  function resolveLocalizationParam(param) {
620
745
  if (param === void 0) return void 0;
621
746
  if (typeof param === "string") return param;
@@ -625,16 +750,16 @@ function SeverityIcon({ severity }) {
625
750
  const iconProps = { size: 20 };
626
751
  switch (severity) {
627
752
  case "success":
628
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.CheckCircle, { ...iconProps, color: "var(--chakra-colors-green-500)" });
753
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.CheckCircle, { ...iconProps, color: "var(--chakra-colors-green-500)" });
629
754
  case "info":
630
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Info, { ...iconProps, color: "var(--chakra-colors-blue-500)" });
755
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.Info, { ...iconProps, color: "var(--chakra-colors-blue-500)" });
631
756
  case "warning":
632
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.AlertTriangle, { ...iconProps, color: "var(--chakra-colors-yellow-500)" });
757
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.AlertTriangle, { ...iconProps, color: "var(--chakra-colors-yellow-500)" });
633
758
  case "error":
634
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.XCircle, { ...iconProps, color: "var(--chakra-colors-red-500)" });
759
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.XCircle, { ...iconProps, color: "var(--chakra-colors-red-500)" });
635
760
  case "neutral":
636
761
  default:
637
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Circle, { ...iconProps, color: "var(--chakra-colors-gray-500)" });
762
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.Circle, { ...iconProps, color: "var(--chakra-colors-gray-500)" });
638
763
  }
639
764
  }
640
765
  function getSeverityColorPalette(severity) {
@@ -719,7 +844,7 @@ function getPlacement(position) {
719
844
  var toasterCache = /* @__PURE__ */ new Map();
720
845
  function getToaster(placement) {
721
846
  if (!toasterCache.has(placement)) {
722
- toasterCache.set(placement, (0, import_react6.createToaster)({
847
+ toasterCache.set(placement, (0, import_react9.createToaster)({
723
848
  placement,
724
849
  pauseOnPageIdle: true
725
850
  }));
@@ -729,14 +854,14 @@ function getToaster(placement) {
729
854
  function ToastContainer({ position = "bottom-right", containerKey }) {
730
855
  const { toasts, service } = useToasterContext();
731
856
  const { t } = (0, import_core.useLocalization)();
732
- const displayedToastsRef = (0, import_react5.useRef)(/* @__PURE__ */ new Set());
733
- const placement = (0, import_react5.useMemo)(() => getPlacement(position), [position]);
734
- const toaster = (0, import_react5.useMemo)(() => getToaster(placement), [placement]);
735
- const filteredToasts = (0, import_react5.useMemo)(() => {
857
+ const displayedToastsRef = (0, import_react8.useRef)(/* @__PURE__ */ new Set());
858
+ const placement = (0, import_react8.useMemo)(() => getPlacement(position), [position]);
859
+ const toaster = (0, import_react8.useMemo)(() => getToaster(placement), [placement]);
860
+ const filteredToasts = (0, import_react8.useMemo)(() => {
736
861
  if (!containerKey) return toasts;
737
862
  return toasts.filter((toast) => toast.options?.containerKey === containerKey);
738
863
  }, [toasts, containerKey]);
739
- (0, import_react5.useEffect)(() => {
864
+ (0, import_react8.useEffect)(() => {
740
865
  const newToasts = filteredToasts.filter((toast) => !displayedToastsRef.current.has(toast.id));
741
866
  newToasts.forEach((toast) => {
742
867
  displayedToastsRef.current.add(toast.id);
@@ -769,11 +894,11 @@ function ToastContainer({ position = "bottom-right", containerKey }) {
769
894
  });
770
895
  });
771
896
  }, [filteredToasts, t, service, toaster]);
772
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Toaster, { toaster, insetInline: { mdDown: "4" }, children: (toast) => {
897
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react9.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react9.Toaster, { toaster, insetInline: { mdDown: "4" }, children: (toast) => {
773
898
  const severity = toast.meta?.severity || "info";
774
899
  const closable = toast.meta?.closable !== false;
775
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
776
- import_react6.Toast.Root,
900
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
901
+ import_react9.Toast.Root,
777
902
  {
778
903
  bg: getSeverityBg(severity),
779
904
  borderWidth: "1px",
@@ -781,13 +906,13 @@ function ToastContainer({ position = "bottom-right", containerKey }) {
781
906
  borderRadius: "lg",
782
907
  boxShadow: "lg",
783
908
  width: { md: "sm" },
784
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react6.Flex, { align: "flex-start", gap: 3, p: 4, children: [
785
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Box, { flexShrink: 0, pt: "2px", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SeverityIcon, { severity }) }),
786
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react6.Stack, { gap: 1, flex: 1, children: [
787
- toast.title && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Toast.Title, { fontWeight: "bold", fontSize: "sm", color: "fg", children: toast.title }),
788
- toast.description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Toast.Description, { fontSize: "sm", color: "gray.700", children: toast.description })
909
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react9.Flex, { align: "flex-start", gap: 3, p: 4, children: [
910
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react9.Box, { flexShrink: 0, pt: "2px", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SeverityIcon, { severity }) }),
911
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react9.Stack, { gap: 1, flex: 1, children: [
912
+ toast.title && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react9.Toast.Title, { fontWeight: "bold", fontSize: "sm", color: "fg", children: toast.title }),
913
+ toast.description && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react9.Toast.Description, { fontSize: "sm", color: "gray.700", children: toast.description })
789
914
  ] }),
790
- closable && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Toast.CloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.CloseButton, { size: "sm" }) })
915
+ closable && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react9.Toast.CloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react9.CloseButton, { size: "sm" }) })
791
916
  ] })
792
917
  }
793
918
  );
@@ -795,11 +920,11 @@ function ToastContainer({ position = "bottom-right", containerKey }) {
795
920
  }
796
921
 
797
922
  // src/components/confirmation/Confirmation.tsx
798
- var import_react7 = require("react");
799
- var import_react8 = require("@chakra-ui/react");
923
+ var import_react10 = require("react");
924
+ var import_react11 = require("@chakra-ui/react");
800
925
  var import_core2 = require("@abpjs/core");
801
926
  var import_lucide_react2 = require("lucide-react");
802
- var import_jsx_runtime4 = require("react/jsx-runtime");
927
+ var import_jsx_runtime5 = require("react/jsx-runtime");
803
928
  function resolveLocalizationParam2(param) {
804
929
  if (param === void 0) return void 0;
805
930
  if (typeof param === "string") return param;
@@ -814,16 +939,16 @@ function SeverityIcon2({ severity }) {
814
939
  const iconProps = { size: 24 };
815
940
  switch (severity) {
816
941
  case "success":
817
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react2.CheckCircle, { ...iconProps, color: "var(--chakra-colors-green-500)" });
942
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.CheckCircle, { ...iconProps, color: "var(--chakra-colors-green-500)" });
818
943
  case "info":
819
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react2.Info, { ...iconProps, color: "var(--chakra-colors-blue-500)" });
944
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.Info, { ...iconProps, color: "var(--chakra-colors-blue-500)" });
820
945
  case "warning":
821
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react2.AlertTriangle, { ...iconProps, color: "var(--chakra-colors-yellow-500)" });
946
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.AlertTriangle, { ...iconProps, color: "var(--chakra-colors-yellow-500)" });
822
947
  case "error":
823
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react2.XCircle, { ...iconProps, color: "var(--chakra-colors-red-500)" });
948
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.XCircle, { ...iconProps, color: "var(--chakra-colors-red-500)" });
824
949
  case "neutral":
825
950
  default:
826
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react2.Circle, { ...iconProps, color: "var(--chakra-colors-gray-500)" });
951
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.Circle, { ...iconProps, color: "var(--chakra-colors-gray-500)" });
827
952
  }
828
953
  }
829
954
  function getSeverityColorPalette2(severity) {
@@ -844,7 +969,7 @@ function getSeverityColorPalette2(severity) {
844
969
  function ConfirmationDialog({ className }) {
845
970
  const { confirmation, respond } = useConfirmationState();
846
971
  const { t } = (0, import_core2.useLocalization)();
847
- const cancelRef = (0, import_react7.useRef)(null);
972
+ const cancelRef = (0, import_react10.useRef)(null);
848
973
  if (!confirmation) {
849
974
  return null;
850
975
  }
@@ -874,25 +999,25 @@ function ConfirmationDialog({ className }) {
874
999
  handleDismiss();
875
1000
  }
876
1001
  };
877
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
878
- import_react8.Dialog.Root,
1002
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1003
+ import_react11.Dialog.Root,
879
1004
  {
880
1005
  open: true,
881
1006
  onOpenChange: handleOpenChange,
882
1007
  role: "alertdialog",
883
1008
  placement: "center",
884
1009
  initialFocusEl: () => cancelRef.current,
885
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react8.Portal, { children: [
886
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.Dialog.Backdrop, {}),
887
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react8.Dialog.Content, { className, maxWidth: "md", children: [
888
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.Dialog.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react8.Flex, { align: "center", gap: 3, children: [
889
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SeverityIcon2, { severity }),
890
- localizedTitle && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.Dialog.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.Text, { fontWeight: "bold", fontSize: "lg", children: localizedTitle }) })
1010
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react11.Portal, { children: [
1011
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react11.Dialog.Backdrop, {}),
1012
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react11.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react11.Dialog.Content, { className, maxWidth: "md", children: [
1013
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react11.Dialog.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react11.Flex, { align: "center", gap: 3, children: [
1014
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SeverityIcon2, { severity }),
1015
+ localizedTitle && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react11.Dialog.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react11.Text, { fontWeight: "bold", fontSize: "lg", children: localizedTitle }) })
891
1016
  ] }) }),
892
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.Dialog.Body, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.Text, { color: "gray.600", children: localizedMessage }) }),
893
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.Dialog.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react8.Flex, { gap: 3, children: [
894
- !options?.hideCancelBtn && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
895
- import_react8.Button,
1017
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react11.Dialog.Body, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react11.Text, { color: "gray.600", children: localizedMessage }) }),
1018
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react11.Dialog.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react11.Flex, { gap: 3, children: [
1019
+ !options?.hideCancelBtn && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1020
+ import_react11.Button,
896
1021
  {
897
1022
  ref: cancelRef,
898
1023
  variant: "ghost",
@@ -900,8 +1025,8 @@ function ConfirmationDialog({ className }) {
900
1025
  children: cancelCopy
901
1026
  }
902
1027
  ),
903
- !options?.hideYesBtn && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
904
- import_react8.Button,
1028
+ !options?.hideYesBtn && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1029
+ import_react11.Button,
905
1030
  {
906
1031
  colorPalette: getSeverityColorPalette2(severity),
907
1032
  onClick: handleConfirm,
@@ -916,18 +1041,21 @@ function ConfirmationDialog({ className }) {
916
1041
  }
917
1042
 
918
1043
  // src/components/errors/ErrorComponent.tsx
919
- var import_react9 = require("@chakra-ui/react");
920
- var import_jsx_runtime5 = require("react/jsx-runtime");
1044
+ var import_react12 = require("@chakra-ui/react");
1045
+ var import_jsx_runtime6 = require("react/jsx-runtime");
921
1046
  function ErrorComponent({
922
1047
  title = "Error",
923
1048
  details = "An error has occurred.",
924
1049
  onDestroy,
925
1050
  showCloseButton = true,
926
- closeButtonText = "Go Back"
1051
+ closeButtonText = "Go Back",
1052
+ isHomeShow = false,
1053
+ onHomeClick,
1054
+ homeButtonText = "Go Home"
927
1055
  }) {
928
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react9.Container, { maxW: "container.md", py: 20, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react9.VStack, { gap: 6, textAlign: "center", children: [
929
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
930
- import_react9.Heading,
1056
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react12.Container, { maxW: "container.md", py: 20, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react12.VStack, { gap: 6, textAlign: "center", children: [
1057
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1058
+ import_react12.Heading,
931
1059
  {
932
1060
  size: "4xl",
933
1061
  color: "red.500",
@@ -935,23 +1063,34 @@ function ErrorComponent({
935
1063
  children: title
936
1064
  }
937
1065
  ),
938
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react9.Text, { fontSize: "lg", color: "gray.600", children: details }),
939
- showCloseButton && onDestroy && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
940
- import_react9.Button,
941
- {
942
- colorPalette: "blue",
943
- size: "lg",
944
- onClick: onDestroy,
945
- children: closeButtonText
946
- }
947
- )
1066
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react12.Text, { fontSize: "lg", color: "gray.600", children: details }),
1067
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react12.Box, { display: "flex", gap: 3, children: [
1068
+ isHomeShow && onHomeClick && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1069
+ import_react12.Button,
1070
+ {
1071
+ colorPalette: "green",
1072
+ size: "lg",
1073
+ onClick: onHomeClick,
1074
+ children: homeButtonText
1075
+ }
1076
+ ),
1077
+ showCloseButton && onDestroy && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1078
+ import_react12.Button,
1079
+ {
1080
+ colorPalette: "blue",
1081
+ size: "lg",
1082
+ onClick: onDestroy,
1083
+ children: closeButtonText
1084
+ }
1085
+ )
1086
+ ] })
948
1087
  ] }) });
949
1088
  }
950
1089
 
951
1090
  // src/components/loader-bar/LoaderBar.tsx
952
- var import_react10 = require("react");
1091
+ var import_react13 = require("react");
953
1092
  var import_core3 = require("@abpjs/core");
954
- var import_jsx_runtime6 = require("react/jsx-runtime");
1093
+ var import_jsx_runtime7 = require("react/jsx-runtime");
955
1094
  function LoaderBar({
956
1095
  containerClass = "abp-loader-bar",
957
1096
  progressClass = "abp-progress",
@@ -960,17 +1099,17 @@ function LoaderBar({
960
1099
  stopDelay = 400
961
1100
  }) {
962
1101
  const { loading } = (0, import_core3.useLoader)();
963
- const [isLoading, setIsLoading] = (0, import_react10.useState)(false);
964
- const [progressLevel, setProgressLevel] = (0, import_react10.useState)(0);
965
- const intervalRef = (0, import_react10.useRef)(null);
966
- (0, import_react10.useEffect)(() => {
1102
+ const [isLoading, setIsLoading] = (0, import_react13.useState)(false);
1103
+ const [progressLevel, setProgressLevel] = (0, import_react13.useState)(0);
1104
+ const intervalRef = (0, import_react13.useRef)(null);
1105
+ (0, import_react13.useEffect)(() => {
967
1106
  if (loading) {
968
1107
  startLoading();
969
1108
  } else {
970
1109
  stopLoading();
971
1110
  }
972
1111
  }, [loading]);
973
- (0, import_react10.useEffect)(() => {
1112
+ (0, import_react13.useEffect)(() => {
974
1113
  return () => {
975
1114
  if (intervalRef.current) {
976
1115
  clearInterval(intervalRef.current);
@@ -1010,7 +1149,7 @@ function LoaderBar({
1010
1149
  if (!isLoading && progressLevel === 0) {
1011
1150
  return null;
1012
1151
  }
1013
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1152
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1014
1153
  "div",
1015
1154
  {
1016
1155
  className: containerClass,
@@ -1024,7 +1163,7 @@ function LoaderBar({
1024
1163
  backgroundColor: "rgba(0, 0, 0, 0.1)",
1025
1164
  overflow: "hidden"
1026
1165
  },
1027
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1166
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1028
1167
  "div",
1029
1168
  {
1030
1169
  className: progressClass,
@@ -1041,9 +1180,9 @@ function LoaderBar({
1041
1180
  }
1042
1181
 
1043
1182
  // src/components/modal/Modal.tsx
1044
- var import_react11 = __toESM(require("react"));
1045
- var import_react12 = require("@chakra-ui/react");
1046
- var import_jsx_runtime7 = require("react/jsx-runtime");
1183
+ var import_react14 = __toESM(require("react"));
1184
+ var import_react15 = require("@chakra-ui/react");
1185
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1047
1186
  function getSizeWidth(size) {
1048
1187
  switch (size) {
1049
1188
  case "sm":
@@ -1081,12 +1220,12 @@ function Modal({
1081
1220
  preventScroll = true,
1082
1221
  onInit
1083
1222
  }) {
1084
- const prevVisibleRef = import_react11.default.useRef(false);
1085
- const onInitRef = import_react11.default.useRef(onInit);
1086
- import_react11.default.useEffect(() => {
1223
+ const prevVisibleRef = import_react14.default.useRef(false);
1224
+ const onInitRef = import_react14.default.useRef(onInit);
1225
+ import_react14.default.useEffect(() => {
1087
1226
  onInitRef.current = onInit;
1088
1227
  }, [onInit]);
1089
- import_react11.default.useEffect(() => {
1228
+ import_react14.default.useEffect(() => {
1090
1229
  if (visible && !prevVisibleRef.current && onInitRef.current) {
1091
1230
  onInitRef.current();
1092
1231
  }
@@ -1098,8 +1237,8 @@ function Modal({
1098
1237
  }
1099
1238
  onVisibleChange?.(details.open);
1100
1239
  };
1101
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1102
- import_react12.Dialog.Root,
1240
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1241
+ import_react15.Dialog.Root,
1103
1242
  {
1104
1243
  open: visible,
1105
1244
  onOpenChange: handleOpenChange,
@@ -1110,10 +1249,10 @@ function Modal({
1110
1249
  motionPreset,
1111
1250
  trapFocus,
1112
1251
  preventScroll,
1113
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react12.Portal, { children: [
1114
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react12.Dialog.Backdrop, {}),
1115
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react12.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1116
- import_react12.Dialog.Content,
1252
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react15.Portal, { children: [
1253
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Dialog.Backdrop, {}),
1254
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1255
+ import_react15.Dialog.Content,
1117
1256
  {
1118
1257
  className: modalClass,
1119
1258
  width: getSizeWidth(size),
@@ -1122,17 +1261,17 @@ function Modal({
1122
1261
  height,
1123
1262
  minHeight,
1124
1263
  children: [
1125
- (header || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
1126
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react12.Dialog.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react12.Flex, { justify: "space-between", align: "center", width: "100%", children: [
1127
- header && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react12.Dialog.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react12.Text, { fontWeight: "bold", fontSize: "lg", children: header }) }),
1128
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react12.Dialog.CloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react12.CloseButton, { size: "sm" }) })
1264
+ (header || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
1265
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Dialog.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react15.Flex, { justify: "space-between", align: "center", width: "100%", children: [
1266
+ header && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Dialog.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Text, { fontWeight: "bold", fontSize: "lg", children: header }) }),
1267
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Dialog.CloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.CloseButton, { size: "sm" }) })
1129
1268
  ] }) }),
1130
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react12.Separator, {})
1269
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Separator, {})
1131
1270
  ] }),
1132
- children && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react12.Dialog.Body, { py: 4, children }),
1133
- footer && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
1134
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react12.Separator, {}),
1135
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react12.Dialog.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react12.Flex, { gap: 3, justify: "flex-end", w: "100%", children: footer }) })
1271
+ children && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Dialog.Body, { py: 4, children }),
1272
+ footer && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
1273
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Separator, {}),
1274
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Dialog.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Flex, { gap: 3, justify: "flex-end", w: "100%", children: footer }) })
1136
1275
  ] })
1137
1276
  ]
1138
1277
  }
@@ -1142,18 +1281,18 @@ function Modal({
1142
1281
  );
1143
1282
  }
1144
1283
  function AbpModalHeader({ children, className }) {
1145
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react12.Text, { fontWeight: "bold", fontSize: "lg", className, children });
1284
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Text, { fontWeight: "bold", fontSize: "lg", className, children });
1146
1285
  }
1147
1286
  function AbpModalBody({ children, className }) {
1148
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react12.Box, { color: "gray.600", className, children });
1287
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Box, { color: "gray.600", className, children });
1149
1288
  }
1150
1289
  function AbpModalFooter({ children, className }) {
1151
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react12.Flex, { gap: 3, justify: "flex-end", className, children });
1290
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Flex, { gap: 3, justify: "flex-end", className, children });
1152
1291
  }
1153
1292
 
1154
1293
  // src/components/ui/Alert.tsx
1155
- var import_react13 = require("@chakra-ui/react");
1156
- var import_jsx_runtime8 = require("react/jsx-runtime");
1294
+ var import_react16 = require("@chakra-ui/react");
1295
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1157
1296
  function Alert({
1158
1297
  status = "info",
1159
1298
  children,
@@ -1164,29 +1303,29 @@ function Alert({
1164
1303
  mb,
1165
1304
  borderRadius = "md"
1166
1305
  }) {
1167
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1168
- import_react13.Alert.Root,
1306
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1307
+ import_react16.Alert.Root,
1169
1308
  {
1170
1309
  status,
1171
1310
  className,
1172
1311
  mb,
1173
1312
  borderRadius,
1174
1313
  children: [
1175
- showIcon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react13.Alert.Indicator, {}),
1176
- title ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
1177
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react13.Alert.Title, { children: title }),
1178
- (description || children) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react13.Alert.Description, { children: description || children })
1179
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react13.Alert.Title, { children })
1314
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react16.Alert.Indicator, {}),
1315
+ title ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1316
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react16.Alert.Title, { children: title }),
1317
+ (description || children) && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react16.Alert.Description, { children: description || children })
1318
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react16.Alert.Title, { children })
1180
1319
  ]
1181
1320
  }
1182
1321
  );
1183
1322
  }
1184
1323
 
1185
1324
  // src/components/ui/Button.tsx
1186
- var import_react14 = require("react");
1187
- var import_react15 = require("@chakra-ui/react");
1188
- var import_jsx_runtime9 = require("react/jsx-runtime");
1189
- var Button3 = (0, import_react14.forwardRef)(
1325
+ var import_react17 = require("react");
1326
+ var import_react18 = require("@chakra-ui/react");
1327
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1328
+ var Button3 = (0, import_react17.forwardRef)(
1190
1329
  function Button4({
1191
1330
  children,
1192
1331
  type = "button",
@@ -1202,8 +1341,8 @@ var Button3 = (0, import_react14.forwardRef)(
1202
1341
  mr,
1203
1342
  ml
1204
1343
  }, ref) {
1205
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1206
- import_react15.Button,
1344
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1345
+ import_react18.Button,
1207
1346
  {
1208
1347
  ref,
1209
1348
  type,
@@ -1225,10 +1364,10 @@ var Button3 = (0, import_react14.forwardRef)(
1225
1364
  );
1226
1365
 
1227
1366
  // src/components/ui/Checkbox.tsx
1228
- var import_react16 = require("react");
1229
- var import_react17 = require("@chakra-ui/react");
1230
- var import_jsx_runtime10 = require("react/jsx-runtime");
1231
- var Checkbox = (0, import_react16.forwardRef)(
1367
+ var import_react19 = require("react");
1368
+ var import_react20 = require("@chakra-ui/react");
1369
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1370
+ var Checkbox = (0, import_react19.forwardRef)(
1232
1371
  function Checkbox2({
1233
1372
  children,
1234
1373
  checked,
@@ -1245,8 +1384,8 @@ var Checkbox = (0, import_react16.forwardRef)(
1245
1384
  onChange,
1246
1385
  className
1247
1386
  }, ref) {
1248
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1249
- import_react17.Checkbox.Root,
1387
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1388
+ import_react20.Checkbox.Root,
1250
1389
  {
1251
1390
  checked,
1252
1391
  defaultChecked,
@@ -1258,8 +1397,8 @@ var Checkbox = (0, import_react16.forwardRef)(
1258
1397
  size,
1259
1398
  className,
1260
1399
  children: [
1261
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1262
- import_react17.Checkbox.HiddenInput,
1400
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1401
+ import_react20.Checkbox.HiddenInput,
1263
1402
  {
1264
1403
  ref,
1265
1404
  id,
@@ -1268,8 +1407,8 @@ var Checkbox = (0, import_react16.forwardRef)(
1268
1407
  onChange
1269
1408
  }
1270
1409
  ),
1271
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react17.Checkbox.Control, {}),
1272
- children && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react17.Checkbox.Label, { children })
1410
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react20.Checkbox.Control, {}),
1411
+ children && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react20.Checkbox.Label, { children })
1273
1412
  ]
1274
1413
  }
1275
1414
  );
@@ -1277,8 +1416,8 @@ var Checkbox = (0, import_react16.forwardRef)(
1277
1416
  );
1278
1417
 
1279
1418
  // src/components/ui/FormField.tsx
1280
- var import_react18 = require("@chakra-ui/react");
1281
- var import_jsx_runtime11 = require("react/jsx-runtime");
1419
+ var import_react21 = require("@chakra-ui/react");
1420
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1282
1421
  function FormField({
1283
1422
  label,
1284
1423
  invalid = false,
@@ -1290,24 +1429,24 @@ function FormField({
1290
1429
  htmlFor,
1291
1430
  className
1292
1431
  }) {
1293
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react18.Field.Root, { invalid, disabled, className, children: [
1294
- label && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react18.Field.Label, { htmlFor, children: [
1432
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react21.Field.Root, { invalid, disabled, className, children: [
1433
+ label && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react21.Field.Label, { htmlFor, children: [
1295
1434
  label,
1296
- required && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react18.Field.RequiredIndicator, {})
1435
+ required && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react21.Field.RequiredIndicator, {})
1297
1436
  ] }),
1298
1437
  children,
1299
- helperText && !invalid && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react18.Field.HelperText, { children: helperText }),
1300
- invalid && errorText && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react18.Field.ErrorText, { children: errorText })
1438
+ helperText && !invalid && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react21.Field.HelperText, { children: helperText }),
1439
+ invalid && errorText && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react21.Field.ErrorText, { children: errorText })
1301
1440
  ] });
1302
1441
  }
1303
1442
 
1304
1443
  // src/components/change-password/ChangePassword.tsx
1305
- var import_react19 = require("react");
1306
- var import_react20 = require("@chakra-ui/react");
1444
+ var import_react22 = require("react");
1445
+ var import_react23 = require("@chakra-ui/react");
1307
1446
  var import_react_hook_form = require("react-hook-form");
1308
1447
  var import_core4 = require("@abpjs/core");
1309
1448
  var import_lucide_react3 = require("lucide-react");
1310
- var import_jsx_runtime12 = require("react/jsx-runtime");
1449
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1311
1450
  function ChangePassword({
1312
1451
  visible,
1313
1452
  onVisibleChange
@@ -1329,7 +1468,7 @@ function ChangePassword({
1329
1468
  }
1330
1469
  });
1331
1470
  const newPassword = watch("newPassword");
1332
- (0, import_react19.useEffect)(() => {
1471
+ (0, import_react22.useEffect)(() => {
1333
1472
  if (visible) {
1334
1473
  reset();
1335
1474
  }
@@ -1370,23 +1509,23 @@ function ChangePassword({
1370
1509
  hasSpecial: (value) => /[!@#$%^&*(),.?":{}|<>]/.test(value) || t("AbpIdentity::PasswordRequiresNonAlphanumeric") || "Password must contain a special character"
1371
1510
  }
1372
1511
  };
1373
- const modalFooter = /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1374
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react20.Button, { variant: "ghost", mr: 3, onClick: handleClose, disabled: isSubmitting, children: t("AbpIdentity::Cancel") || "Cancel" }),
1375
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1376
- import_react20.Button,
1512
+ const modalFooter = /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1513
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Button, { variant: "ghost", mr: 3, onClick: handleClose, disabled: isSubmitting, children: t("AbpIdentity::Cancel") || "Cancel" }),
1514
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1515
+ import_react23.Button,
1377
1516
  {
1378
1517
  colorPalette: "blue",
1379
1518
  type: "submit",
1380
1519
  loading: isSubmitting,
1381
1520
  form: "change-password-form",
1382
1521
  children: [
1383
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react3.Check, { size: 16 }),
1522
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react3.Check, { size: 16 }),
1384
1523
  t("AbpIdentity::Save") || "Save"
1385
1524
  ]
1386
1525
  }
1387
1526
  )
1388
1527
  ] });
1389
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1528
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1390
1529
  Modal,
1391
1530
  {
1392
1531
  visible,
@@ -1395,14 +1534,14 @@ function ChangePassword({
1395
1534
  header: t("AbpIdentity::ChangePassword") || "Change Password",
1396
1535
  footer: modalFooter,
1397
1536
  centered: true,
1398
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("form", { id: "change-password-form", onSubmit: handleSubmit(onSubmit), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react20.VStack, { gap: 4, children: [
1399
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react20.Field.Root, { invalid: !!errors.password, children: [
1400
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react20.Field.Label, { children: [
1537
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("form", { id: "change-password-form", onSubmit: handleSubmit(onSubmit), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.VStack, { gap: 4, children: [
1538
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Field.Root, { invalid: !!errors.password, children: [
1539
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Field.Label, { children: [
1401
1540
  t("AbpIdentity::DisplayName:CurrentPassword") || "Current Password",
1402
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react20.Field.RequiredIndicator, {})
1541
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Field.RequiredIndicator, {})
1403
1542
  ] }),
1404
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1405
- import_react20.Input,
1543
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1544
+ import_react23.Input,
1406
1545
  {
1407
1546
  type: "password",
1408
1547
  ...register("password", {
@@ -1410,29 +1549,29 @@ function ChangePassword({
1410
1549
  })
1411
1550
  }
1412
1551
  ),
1413
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react20.Field.ErrorText, { children: errors.password?.message })
1552
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Field.ErrorText, { children: errors.password?.message })
1414
1553
  ] }),
1415
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react20.Field.Root, { invalid: !!errors.newPassword, children: [
1416
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react20.Field.Label, { children: [
1554
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Field.Root, { invalid: !!errors.newPassword, children: [
1555
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Field.Label, { children: [
1417
1556
  t("AbpIdentity::DisplayName:NewPassword") || "New Password",
1418
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react20.Field.RequiredIndicator, {})
1557
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Field.RequiredIndicator, {})
1419
1558
  ] }),
1420
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1421
- import_react20.Input,
1559
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1560
+ import_react23.Input,
1422
1561
  {
1423
1562
  type: "password",
1424
1563
  ...register("newPassword", passwordValidation)
1425
1564
  }
1426
1565
  ),
1427
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react20.Field.ErrorText, { children: errors.newPassword?.message })
1566
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Field.ErrorText, { children: errors.newPassword?.message })
1428
1567
  ] }),
1429
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react20.Field.Root, { invalid: !!errors.repeatNewPassword, children: [
1430
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react20.Field.Label, { children: [
1568
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Field.Root, { invalid: !!errors.repeatNewPassword, children: [
1569
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Field.Label, { children: [
1431
1570
  t("AbpIdentity::DisplayName:NewPasswordConfirm") || "Confirm New Password",
1432
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react20.Field.RequiredIndicator, {})
1571
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Field.RequiredIndicator, {})
1433
1572
  ] }),
1434
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1435
- import_react20.Input,
1573
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1574
+ import_react23.Input,
1436
1575
  {
1437
1576
  type: "password",
1438
1577
  ...register("repeatNewPassword", {
@@ -1441,7 +1580,7 @@ function ChangePassword({
1441
1580
  })
1442
1581
  }
1443
1582
  ),
1444
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react20.Field.ErrorText, { children: errors.repeatNewPassword?.message })
1583
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Field.ErrorText, { children: errors.repeatNewPassword?.message })
1445
1584
  ] })
1446
1585
  ] }) })
1447
1586
  }
@@ -1449,12 +1588,12 @@ function ChangePassword({
1449
1588
  }
1450
1589
 
1451
1590
  // src/components/profile/Profile.tsx
1452
- var import_react21 = require("react");
1453
- var import_react22 = require("@chakra-ui/react");
1591
+ var import_react24 = require("react");
1592
+ var import_react25 = require("@chakra-ui/react");
1454
1593
  var import_react_hook_form2 = require("react-hook-form");
1455
1594
  var import_core5 = require("@abpjs/core");
1456
1595
  var import_lucide_react4 = require("lucide-react");
1457
- var import_jsx_runtime13 = require("react/jsx-runtime");
1596
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1458
1597
  function Profile({
1459
1598
  visible,
1460
1599
  onVisibleChange
@@ -1477,13 +1616,13 @@ function Profile({
1477
1616
  }
1478
1617
  });
1479
1618
  const modalBusy = isSubmitting || loading;
1480
- (0, import_react21.useEffect)(() => {
1619
+ (0, import_react24.useEffect)(() => {
1481
1620
  if (visible) {
1482
1621
  fetchProfile().then(() => {
1483
1622
  });
1484
1623
  }
1485
1624
  }, [visible, fetchProfile]);
1486
- (0, import_react21.useEffect)(() => {
1625
+ (0, import_react24.useEffect)(() => {
1487
1626
  if (profile) {
1488
1627
  reset({
1489
1628
  userName: profile.userName || "",
@@ -1514,23 +1653,23 @@ function Profile({
1514
1653
  onVisibleChange(false);
1515
1654
  }
1516
1655
  };
1517
- const modalFooter = /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1518
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Button, { variant: "ghost", mr: 3, onClick: handleClose, disabled: modalBusy, children: t("AbpIdentity::Cancel") || "Cancel" }),
1519
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1520
- import_react22.Button,
1656
+ const modalFooter = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1657
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Button, { variant: "ghost", mr: 3, onClick: handleClose, disabled: modalBusy, children: t("AbpIdentity::Cancel") || "Cancel" }),
1658
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1659
+ import_react25.Button,
1521
1660
  {
1522
1661
  colorPalette: "blue",
1523
1662
  type: "submit",
1524
1663
  loading: modalBusy,
1525
1664
  form: "profile-form",
1526
1665
  children: [
1527
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react4.Check, { size: 16 }),
1666
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Check, { size: 16 }),
1528
1667
  t("AbpIdentity::Save") || "Save"
1529
1668
  ]
1530
1669
  }
1531
1670
  )
1532
1671
  ] });
1533
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1672
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1534
1673
  Modal,
1535
1674
  {
1536
1675
  visible,
@@ -1540,14 +1679,14 @@ function Profile({
1540
1679
  footer: modalFooter,
1541
1680
  size: "lg",
1542
1681
  centered: true,
1543
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("form", { id: "profile-form", onSubmit: handleSubmit(onSubmit), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.VStack, { gap: 4, children: [
1544
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Field.Root, { invalid: !!errors.userName, children: [
1545
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Field.Label, { children: [
1682
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("form", { id: "profile-form", onSubmit: handleSubmit(onSubmit), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react25.VStack, { gap: 4, children: [
1683
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react25.Field.Root, { invalid: !!errors.userName, children: [
1684
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react25.Field.Label, { children: [
1546
1685
  t("AbpIdentity::DisplayName:UserName") || "Username",
1547
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Field.RequiredIndicator, {})
1686
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.RequiredIndicator, {})
1548
1687
  ] }),
1549
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1550
- import_react22.Input,
1688
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1689
+ import_react25.Input,
1551
1690
  {
1552
1691
  type: "text",
1553
1692
  ...register("userName", {
@@ -1559,13 +1698,13 @@ function Profile({
1559
1698
  })
1560
1699
  }
1561
1700
  ),
1562
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Field.ErrorText, { children: errors.userName?.message })
1701
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.ErrorText, { children: errors.userName?.message })
1563
1702
  ] }),
1564
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.HStack, { gap: 4, w: "full", children: [
1565
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Field.Root, { invalid: !!errors.name, flex: 1, children: [
1566
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Field.Label, { children: t("AbpIdentity::DisplayName:Name") || "Name" }),
1567
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1568
- import_react22.Input,
1703
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react25.HStack, { gap: 4, w: "full", children: [
1704
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react25.Field.Root, { invalid: !!errors.name, flex: 1, children: [
1705
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.Label, { children: t("AbpIdentity::DisplayName:Name") || "Name" }),
1706
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1707
+ import_react25.Input,
1569
1708
  {
1570
1709
  type: "text",
1571
1710
  ...register("name", {
@@ -1576,12 +1715,12 @@ function Profile({
1576
1715
  })
1577
1716
  }
1578
1717
  ),
1579
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Field.ErrorText, { children: errors.name?.message })
1718
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.ErrorText, { children: errors.name?.message })
1580
1719
  ] }),
1581
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Field.Root, { invalid: !!errors.surname, flex: 1, children: [
1582
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Field.Label, { children: t("AbpIdentity::DisplayName:Surname") || "Surname" }),
1583
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1584
- import_react22.Input,
1720
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react25.Field.Root, { invalid: !!errors.surname, flex: 1, children: [
1721
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.Label, { children: t("AbpIdentity::DisplayName:Surname") || "Surname" }),
1722
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1723
+ import_react25.Input,
1585
1724
  {
1586
1725
  type: "text",
1587
1726
  ...register("surname", {
@@ -1592,16 +1731,16 @@ function Profile({
1592
1731
  })
1593
1732
  }
1594
1733
  ),
1595
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Field.ErrorText, { children: errors.surname?.message })
1734
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.ErrorText, { children: errors.surname?.message })
1596
1735
  ] })
1597
1736
  ] }),
1598
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Field.Root, { invalid: !!errors.email, children: [
1599
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Field.Label, { children: [
1737
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react25.Field.Root, { invalid: !!errors.email, children: [
1738
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react25.Field.Label, { children: [
1600
1739
  t("AbpIdentity::DisplayName:EmailAddress") || "Email Address",
1601
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Field.RequiredIndicator, {})
1740
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.RequiredIndicator, {})
1602
1741
  ] }),
1603
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1604
- import_react22.Input,
1742
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1743
+ import_react25.Input,
1605
1744
  {
1606
1745
  type: "email",
1607
1746
  ...register("email", {
@@ -1617,12 +1756,12 @@ function Profile({
1617
1756
  })
1618
1757
  }
1619
1758
  ),
1620
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Field.ErrorText, { children: errors.email?.message })
1759
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.ErrorText, { children: errors.email?.message })
1621
1760
  ] }),
1622
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Field.Root, { invalid: !!errors.phoneNumber, children: [
1623
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Field.Label, { children: t("AbpIdentity::DisplayName:PhoneNumber") || "Phone Number" }),
1624
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1625
- import_react22.Input,
1761
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react25.Field.Root, { invalid: !!errors.phoneNumber, children: [
1762
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.Label, { children: t("AbpIdentity::DisplayName:PhoneNumber") || "Phone Number" }),
1763
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1764
+ import_react25.Input,
1626
1765
  {
1627
1766
  type: "tel",
1628
1767
  ...register("phoneNumber", {
@@ -1633,7 +1772,7 @@ function Profile({
1633
1772
  })
1634
1773
  }
1635
1774
  ),
1636
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Field.ErrorText, { children: errors.phoneNumber?.message })
1775
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.ErrorText, { children: errors.phoneNumber?.message })
1637
1776
  ] })
1638
1777
  ] }) })
1639
1778
  }
@@ -1641,10 +1780,10 @@ function Profile({
1641
1780
  }
1642
1781
 
1643
1782
  // src/providers/ThemeSharedProvider.tsx
1644
- var import_react25 = require("@chakra-ui/react");
1783
+ var import_react28 = require("@chakra-ui/react");
1645
1784
 
1646
1785
  // src/theme/index.ts
1647
- var import_react23 = require("@chakra-ui/react");
1786
+ var import_react26 = require("@chakra-ui/react");
1648
1787
  var colors = {
1649
1788
  brand: {
1650
1789
  50: { value: "#e3f2fd" },
@@ -1847,7 +1986,7 @@ var semanticTokens = {
1847
1986
  // },
1848
1987
  // },
1849
1988
  };
1850
- var defaultAbpConfig = (0, import_react23.defineConfig)({
1989
+ var defaultAbpConfig = (0, import_react26.defineConfig)({
1851
1990
  theme: {
1852
1991
  tokens: {
1853
1992
  colors,
@@ -1869,20 +2008,20 @@ var defaultAbpConfig = (0, import_react23.defineConfig)({
1869
2008
  });
1870
2009
  function createAbpSystem(overrides) {
1871
2010
  if (overrides) {
1872
- return (0, import_react23.createSystem)(import_react23.defaultConfig, defaultAbpConfig, overrides);
2011
+ return (0, import_react26.createSystem)(import_react26.defaultConfig, defaultAbpConfig, overrides);
1873
2012
  }
1874
- return (0, import_react23.createSystem)(import_react23.defaultConfig, defaultAbpConfig);
2013
+ return (0, import_react26.createSystem)(import_react26.defaultConfig, defaultAbpConfig);
1875
2014
  }
1876
2015
  var abpSystem = createAbpSystem();
1877
2016
 
1878
2017
  // src/components/ui/color-mode.tsx
1879
- var import_react24 = require("@chakra-ui/react");
2018
+ var import_react27 = require("@chakra-ui/react");
1880
2019
  var import_next_themes = require("next-themes");
1881
- var React11 = __toESM(require("react"));
2020
+ var React12 = __toESM(require("react"));
1882
2021
  var import_lucide_react5 = require("lucide-react");
1883
- var import_jsx_runtime14 = require("react/jsx-runtime");
2022
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1884
2023
  function ColorModeProvider(props) {
1885
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_next_themes.ThemeProvider, { attribute: "class", disableTransitionOnChange: true, ...props });
2024
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_next_themes.ThemeProvider, { attribute: "class", disableTransitionOnChange: true, ...props });
1886
2025
  }
1887
2026
  function useColorMode() {
1888
2027
  const { resolvedTheme, setTheme, forcedTheme } = (0, import_next_themes.useTheme)();
@@ -1898,12 +2037,12 @@ function useColorMode() {
1898
2037
  }
1899
2038
  function ColorModeIcon() {
1900
2039
  const { colorMode } = useColorMode();
1901
- return colorMode === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react5.Moon, {}) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react5.Sun, {});
2040
+ return colorMode === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react5.Moon, {}) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react5.Sun, {});
1902
2041
  }
1903
- var ColorModeButton = React11.forwardRef(function ColorModeButton2(props, ref) {
2042
+ var ColorModeButton = React12.forwardRef(function ColorModeButton2(props, ref) {
1904
2043
  const { toggleColorMode } = useColorMode();
1905
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react24.ClientOnly, { fallback: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react24.Skeleton, { boxSize: "9" }), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1906
- import_react24.IconButton,
2044
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react27.ClientOnly, { fallback: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react27.Skeleton, { boxSize: "9" }), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2045
+ import_react27.IconButton,
1907
2046
  {
1908
2047
  onClick: toggleColorMode,
1909
2048
  variant: "ghost",
@@ -1917,14 +2056,14 @@ var ColorModeButton = React11.forwardRef(function ColorModeButton2(props, ref) {
1917
2056
  height: "5"
1918
2057
  }
1919
2058
  },
1920
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ColorModeIcon, {})
2059
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ColorModeIcon, {})
1921
2060
  }
1922
2061
  ) });
1923
2062
  });
1924
- var LightMode = React11.forwardRef(
2063
+ var LightMode = React12.forwardRef(
1925
2064
  function LightMode2(props, ref) {
1926
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1927
- import_react24.Span,
2065
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2066
+ import_react27.Span,
1928
2067
  {
1929
2068
  color: "fg",
1930
2069
  display: "contents",
@@ -1937,10 +2076,10 @@ var LightMode = React11.forwardRef(
1937
2076
  );
1938
2077
  }
1939
2078
  );
1940
- var DarkMode = React11.forwardRef(
2079
+ var DarkMode = React12.forwardRef(
1941
2080
  function DarkMode2(props, ref) {
1942
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1943
- import_react24.Span,
2081
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2082
+ import_react27.Span,
1944
2083
  {
1945
2084
  color: "fg",
1946
2085
  display: "contents",
@@ -1956,7 +2095,7 @@ var DarkMode = React11.forwardRef(
1956
2095
 
1957
2096
  // src/providers/ThemeSharedProvider.tsx
1958
2097
  var import_core6 = require("@abpjs/core");
1959
- var import_jsx_runtime15 = require("react/jsx-runtime");
2098
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1960
2099
  function ThemeSharedProvider({
1961
2100
  children,
1962
2101
  renderToasts = true,
@@ -1970,13 +2109,80 @@ function ThemeSharedProvider({
1970
2109
  const system = themeOverrides ? createAbpSystem(themeOverrides) : abpSystem;
1971
2110
  const { endSide } = (0, import_core6.useDirection)();
1972
2111
  toastPosition = `bottom-${endSide}`;
1973
- const content = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ToasterProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(ConfirmationProvider, { children: [
2112
+ const content = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ToasterProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(ConfirmationProvider, { children: [
1974
2113
  children,
1975
- renderToasts && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ToastContainer, { position: toastPosition }),
1976
- renderConfirmation && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ConfirmationDialog, {})
2114
+ renderToasts && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ToastContainer, { position: toastPosition }),
2115
+ renderConfirmation && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ConfirmationDialog, {})
1977
2116
  ] }) });
1978
2117
  const colorModeProps = enableColorMode ? { defaultTheme: defaultColorMode } : { forcedTheme: "light" };
1979
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react25.ChakraProvider, { value: system, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react25.LocaleProvider, { locale, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ColorModeProvider, { ...colorModeProps, children: content }) }) });
2118
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react28.ChakraProvider, { value: system, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react28.LocaleProvider, { locale, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ColorModeProvider, { ...colorModeProps, children: content }) }) });
2119
+ }
2120
+
2121
+ // src/handlers/lazy-style.handler.ts
2122
+ var import_react29 = require("react");
2123
+ var import_core7 = require("@abpjs/core");
2124
+ function createLazyStyleHref(style, dir) {
2125
+ return style.replace("{{dir}}", dir);
2126
+ }
2127
+ function useLazyStyleHandler(options = {}) {
2128
+ const { styles = [BOOTSTRAP], initialDirection = "ltr" } = options;
2129
+ const [direction, setDirection] = (0, import_react29.useState)(initialDirection);
2130
+ const lazyLoadRef = (0, import_react29.useRef)(new import_core7.LazyLoadService());
2131
+ const loadedStylesRef = (0, import_react29.useRef)(/* @__PURE__ */ new Map());
2132
+ (0, import_react29.useEffect)(() => {
2133
+ document.body.dir = direction;
2134
+ const switchCSS = async () => {
2135
+ const lazyLoad = lazyLoadRef.current;
2136
+ for (const style of styles) {
2137
+ const href = createLazyStyleHref(style, direction);
2138
+ if (lazyLoad.isLoaded(href)) {
2139
+ continue;
2140
+ }
2141
+ const oldDir = direction === "ltr" ? "rtl" : "ltr";
2142
+ const oldHref = createLazyStyleHref(style, oldDir);
2143
+ const oldLink = loadedStylesRef.current.get(oldHref);
2144
+ if (oldLink && oldLink.parentNode) {
2145
+ oldLink.parentNode.removeChild(oldLink);
2146
+ lazyLoad.remove(oldHref);
2147
+ loadedStylesRef.current.delete(oldHref);
2148
+ }
2149
+ try {
2150
+ const link = document.createElement("link");
2151
+ link.rel = "stylesheet";
2152
+ link.href = href;
2153
+ document.head.appendChild(link);
2154
+ loadedStylesRef.current.set(href, link);
2155
+ } catch (error) {
2156
+ console.warn(`Failed to load style: ${href}`, error);
2157
+ }
2158
+ }
2159
+ };
2160
+ switchCSS();
2161
+ }, [direction, styles]);
2162
+ return {
2163
+ direction,
2164
+ setDirection
2165
+ };
2166
+ }
2167
+ function getLoadedBootstrapDirection(styles = [BOOTSTRAP]) {
2168
+ for (const style of styles) {
2169
+ const ltrHref = createLazyStyleHref(style, "ltr");
2170
+ const rtlHref = createLazyStyleHref(style, "rtl");
2171
+ const links = document.querySelectorAll('link[rel="stylesheet"]');
2172
+ for (const link of links) {
2173
+ const href = link.href;
2174
+ if (href.includes(ltrHref)) return "ltr";
2175
+ if (href.includes(rtlHref)) return "rtl";
2176
+ }
2177
+ }
2178
+ return void 0;
2179
+ }
2180
+ function initLazyStyleHandler(options = {}) {
2181
+ return () => {
2182
+ const { initialDirection = "ltr" } = options;
2183
+ document.body.dir = initialDirection;
2184
+ return { direction: initialDirection };
2185
+ };
1980
2186
  }
1981
2187
 
1982
2188
  // src/utils/styles.ts
@@ -2049,12 +2255,165 @@ function injectThemeSharedStyles() {
2049
2255
  }
2050
2256
  };
2051
2257
  }
2258
+
2259
+ // src/utils/nav-items.ts
2260
+ var navItems = [];
2261
+ var subscribers = /* @__PURE__ */ new Set();
2262
+ function addNavItem(item) {
2263
+ navItems = [...navItems, item].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
2264
+ notifySubscribers();
2265
+ }
2266
+ function removeNavItem(item) {
2267
+ navItems = navItems.filter((i) => i !== item);
2268
+ notifySubscribers();
2269
+ }
2270
+ function clearNavItems() {
2271
+ navItems = [];
2272
+ notifySubscribers();
2273
+ }
2274
+ function getNavItemsSync() {
2275
+ return [...navItems];
2276
+ }
2277
+ function subscribeToNavItems(callback) {
2278
+ subscribers.add(callback);
2279
+ callback([...navItems]);
2280
+ return () => {
2281
+ subscribers.delete(callback);
2282
+ };
2283
+ }
2284
+ function notifySubscribers() {
2285
+ const currentItems = [...navItems];
2286
+ subscribers.forEach((callback) => callback(currentItems));
2287
+ }
2288
+ function getNavItems() {
2289
+ return {
2290
+ subscribe: (callback) => {
2291
+ const unsubscribe = subscribeToNavItems(callback);
2292
+ return { unsubscribe };
2293
+ }
2294
+ };
2295
+ }
2296
+
2297
+ // src/utils/validation-utils.ts
2298
+ var PASSWORD_SETTING_KEYS = {
2299
+ requiredLength: "Abp.Identity.Password.RequiredLength",
2300
+ maxLength: "Abp.Identity.Password.MaxLength",
2301
+ requireDigit: "Abp.Identity.Password.RequireDigit",
2302
+ requireLowercase: "Abp.Identity.Password.RequireLowercase",
2303
+ requireUppercase: "Abp.Identity.Password.RequireUppercase",
2304
+ requireNonAlphanumeric: "Abp.Identity.Password.RequireNonAlphanumeric",
2305
+ requiredUniqueChars: "Abp.Identity.Password.RequiredUniqueChars"
2306
+ };
2307
+ function parseBooleanSetting(value) {
2308
+ if (value === void 0) return void 0;
2309
+ return value.toLowerCase() === "true";
2310
+ }
2311
+ function parseIntegerSetting(value) {
2312
+ if (value === void 0) return void 0;
2313
+ const num = parseInt(value, 10);
2314
+ return isNaN(num) ? void 0 : num;
2315
+ }
2316
+ function getPasswordSettings(store) {
2317
+ return {
2318
+ requiredLength: parseIntegerSetting(store.getSetting(PASSWORD_SETTING_KEYS.requiredLength)),
2319
+ maxLength: parseIntegerSetting(store.getSetting(PASSWORD_SETTING_KEYS.maxLength)),
2320
+ requireDigit: parseBooleanSetting(store.getSetting(PASSWORD_SETTING_KEYS.requireDigit)),
2321
+ requireLowercase: parseBooleanSetting(store.getSetting(PASSWORD_SETTING_KEYS.requireLowercase)),
2322
+ requireUppercase: parseBooleanSetting(store.getSetting(PASSWORD_SETTING_KEYS.requireUppercase)),
2323
+ requireNonAlphanumeric: parseBooleanSetting(store.getSetting(PASSWORD_SETTING_KEYS.requireNonAlphanumeric)),
2324
+ requiredUniqueChars: parseIntegerSetting(store.getSetting(PASSWORD_SETTING_KEYS.requiredUniqueChars))
2325
+ };
2326
+ }
2327
+ function getPasswordValidators(store) {
2328
+ const settings = getPasswordSettings(store);
2329
+ const validators = [];
2330
+ if (settings.requiredLength && settings.requiredLength > 0) {
2331
+ validators.push((value) => {
2332
+ if (!value || value.length < settings.requiredLength) {
2333
+ return `Password must be at least ${settings.requiredLength} characters`;
2334
+ }
2335
+ return true;
2336
+ });
2337
+ }
2338
+ if (settings.maxLength && settings.maxLength > 0) {
2339
+ validators.push((value) => {
2340
+ if (value && value.length > settings.maxLength) {
2341
+ return `Password must be at most ${settings.maxLength} characters`;
2342
+ }
2343
+ return true;
2344
+ });
2345
+ }
2346
+ if (settings.requireDigit) {
2347
+ validators.push((value) => {
2348
+ if (!value || !/\d/.test(value)) {
2349
+ return "Password must contain at least one digit";
2350
+ }
2351
+ return true;
2352
+ });
2353
+ }
2354
+ if (settings.requireLowercase) {
2355
+ validators.push((value) => {
2356
+ if (!value || !/[a-z]/.test(value)) {
2357
+ return "Password must contain at least one lowercase letter";
2358
+ }
2359
+ return true;
2360
+ });
2361
+ }
2362
+ if (settings.requireUppercase) {
2363
+ validators.push((value) => {
2364
+ if (!value || !/[A-Z]/.test(value)) {
2365
+ return "Password must contain at least one uppercase letter";
2366
+ }
2367
+ return true;
2368
+ });
2369
+ }
2370
+ if (settings.requireNonAlphanumeric) {
2371
+ validators.push((value) => {
2372
+ if (!value || !/[^a-zA-Z0-9]/.test(value)) {
2373
+ return "Password must contain at least one special character";
2374
+ }
2375
+ return true;
2376
+ });
2377
+ }
2378
+ if (settings.requiredUniqueChars && settings.requiredUniqueChars > 0) {
2379
+ validators.push((value) => {
2380
+ if (!value) return true;
2381
+ const uniqueChars = new Set(value).size;
2382
+ if (uniqueChars < settings.requiredUniqueChars) {
2383
+ return `Password must contain at least ${settings.requiredUniqueChars} unique characters`;
2384
+ }
2385
+ return true;
2386
+ });
2387
+ }
2388
+ return validators;
2389
+ }
2390
+ function getPasswordValidationRules(store) {
2391
+ const validators = getPasswordValidators(store);
2392
+ const settings = getPasswordSettings(store);
2393
+ const validate = {};
2394
+ validators.forEach((validator, index) => {
2395
+ validate[`passwordRule${index}`] = validator;
2396
+ });
2397
+ return {
2398
+ required: "Password is required",
2399
+ minLength: settings.requiredLength ? {
2400
+ value: settings.requiredLength,
2401
+ message: `Password must be at least ${settings.requiredLength} characters`
2402
+ } : void 0,
2403
+ maxLength: settings.maxLength ? {
2404
+ value: settings.maxLength,
2405
+ message: `Password must be at most ${settings.maxLength} characters`
2406
+ } : void 0,
2407
+ validate
2408
+ };
2409
+ }
2052
2410
  // Annotate the CommonJS export names for ESM import in node:
2053
2411
  0 && (module.exports = {
2054
2412
  AbpModalBody,
2055
2413
  AbpModalFooter,
2056
2414
  AbpModalHeader,
2057
2415
  Alert,
2416
+ BOOTSTRAP,
2058
2417
  Button,
2059
2418
  ChakraDialog,
2060
2419
  ChangePassword,
@@ -2062,14 +2421,22 @@ function injectThemeSharedStyles() {
2062
2421
  Confirmation,
2063
2422
  ConfirmationDialog,
2064
2423
  ConfirmationProvider,
2424
+ DEFAULT_LAZY_STYLES,
2065
2425
  DEFAULT_STYLES,
2066
2426
  ErrorComponent,
2067
2427
  FormField,
2428
+ HTTP_ERROR_CONFIG,
2429
+ HttpErrorConfigContext,
2430
+ LAZY_STYLES,
2431
+ LazyStylesContext,
2068
2432
  LoaderBar,
2069
2433
  Modal,
2070
2434
  ModalBody,
2435
+ ModalContainer,
2071
2436
  ModalFooter,
2072
2437
  ModalHeader,
2438
+ ModalProvider,
2439
+ PASSWORD_SETTING_KEYS,
2073
2440
  Profile,
2074
2441
  THEME_SHARED_APPEND_CONTENT,
2075
2442
  THEME_SHARED_STYLES,
@@ -2079,18 +2446,37 @@ function injectThemeSharedStyles() {
2079
2446
  Toaster,
2080
2447
  ToasterProvider,
2081
2448
  abpSystem,
2449
+ addNavItem,
2450
+ clearNavItems,
2082
2451
  createAbpSystem,
2083
2452
  createErrorInterceptor,
2453
+ createLazyStyleHref,
2084
2454
  defaultAbpConfig,
2085
2455
  defineConfig,
2456
+ getLoadedBootstrapDirection,
2457
+ getNavItems,
2458
+ getNavItemsSync,
2459
+ getPasswordSettings,
2460
+ getPasswordValidationRules,
2461
+ getPasswordValidators,
2086
2462
  getSeverityBg,
2087
2463
  getSeverityBorderColor,
2088
2464
  getSeverityColorScheme,
2465
+ httpErrorConfigFactory,
2466
+ initLazyStyleHandler,
2089
2467
  injectThemeSharedStyles,
2468
+ removeNavItem,
2469
+ subscribeToNavItems,
2090
2470
  useConfirmation,
2091
2471
  useConfirmationContext,
2092
2472
  useConfirmationState,
2093
2473
  useErrorHandler,
2474
+ useHttpErrorConfig,
2475
+ useLazyStyleHandler,
2476
+ useLazyStyles,
2477
+ useModal,
2478
+ useModalContext,
2479
+ useModalState,
2094
2480
  useToaster,
2095
2481
  useToasterContext,
2096
2482
  useToasts