@abpjs/theme-shared 2.9.0 → 3.1.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,12 +36,14 @@ __export(index_exports, {
36
36
  Alert: () => Alert,
37
37
  BOOTSTRAP: () => BOOTSTRAP,
38
38
  Button: () => Button3,
39
- ChakraDialog: () => import_react15.Dialog,
39
+ ChakraDialog: () => import_react16.Dialog,
40
40
  ChangePassword: () => ChangePassword,
41
41
  Checkbox: () => Checkbox,
42
42
  Confirmation: () => Confirmation,
43
43
  ConfirmationDialog: () => ConfirmationDialog,
44
44
  ConfirmationProvider: () => ConfirmationProvider,
45
+ DEFAULT_ERROR_LOCALIZATIONS: () => DEFAULT_ERROR_LOCALIZATIONS,
46
+ DEFAULT_ERROR_MESSAGES: () => DEFAULT_ERROR_MESSAGES,
45
47
  DEFAULT_LAZY_STYLES: () => DEFAULT_LAZY_STYLES,
46
48
  DEFAULT_STYLES: () => DEFAULT_STYLES,
47
49
  ErrorComponent: () => ErrorComponent,
@@ -57,26 +59,27 @@ __export(index_exports, {
57
59
  ModalFooter: () => AbpModalFooter,
58
60
  ModalHeader: () => AbpModalHeader,
59
61
  ModalProvider: () => ModalProvider,
62
+ NavItem: () => NavItem,
63
+ NavItemsService: () => NavItemsService,
60
64
  PASSWORD_SETTING_KEYS: () => PASSWORD_SETTING_KEYS,
61
65
  Profile: () => Profile,
62
66
  THEME_SHARED_APPEND_CONTENT: () => THEME_SHARED_APPEND_CONTENT,
67
+ THEME_SHARED_ROUTE_PROVIDERS: () => THEME_SHARED_ROUTE_PROVIDERS,
63
68
  THEME_SHARED_STYLES: () => THEME_SHARED_STYLES,
64
69
  ThemeSharedAppendContentContext: () => ThemeSharedAppendContentContext,
65
70
  ThemeSharedProvider: () => ThemeSharedProvider,
66
71
  ToastContainer: () => ToastContainer,
67
- Toaster: () => Toaster,
68
72
  ToasterProvider: () => ToasterProvider,
69
73
  abpSystem: () => abpSystem,
70
- addNavItem: () => addNavItem,
71
- clearNavItems: () => clearNavItems,
74
+ configureRoutes: () => configureRoutes,
72
75
  createAbpSystem: () => createAbpSystem,
73
76
  createErrorInterceptor: () => createErrorInterceptor,
74
77
  createLazyStyleHref: () => createLazyStyleHref,
75
78
  defaultAbpConfig: () => defaultAbpConfig,
76
- defineConfig: () => import_react26.defineConfig,
79
+ defineConfig: () => import_react27.defineConfig,
80
+ eThemeSharedRouteNames: () => eThemeSharedRouteNames,
77
81
  getLoadedBootstrapDirection: () => getLoadedBootstrapDirection,
78
- getNavItems: () => getNavItems,
79
- getNavItemsSync: () => getNavItemsSync,
82
+ getNavItemsService: () => getNavItemsService,
80
83
  getPasswordSettings: () => getPasswordSettings,
81
84
  getPasswordValidationRules: () => getPasswordValidationRules,
82
85
  getPasswordValidators: () => getPasswordValidators,
@@ -85,9 +88,8 @@ __export(index_exports, {
85
88
  getSeverityColorScheme: () => getSeverityColorPalette,
86
89
  httpErrorConfigFactory: () => httpErrorConfigFactory,
87
90
  initLazyStyleHandler: () => initLazyStyleHandler,
91
+ initializeThemeSharedRoutes: () => initializeThemeSharedRoutes,
88
92
  injectThemeSharedStyles: () => injectThemeSharedStyles,
89
- removeNavItem: () => removeNavItem,
90
- subscribeToNavItems: () => subscribeToNavItems,
91
93
  useConfirmation: () => useConfirmation,
92
94
  useConfirmationContext: () => useConfirmationContext,
93
95
  useConfirmationState: () => useConfirmationState,
@@ -98,23 +100,13 @@ __export(index_exports, {
98
100
  useModal: () => useModal,
99
101
  useModalContext: () => useModalContext,
100
102
  useModalState: () => useModalState,
103
+ useNavItems: () => useNavItems,
101
104
  useToaster: () => useToaster,
102
105
  useToasterContext: () => useToasterContext,
103
106
  useToasts: () => useToasts
104
107
  });
105
108
  module.exports = __toCommonJS(index_exports);
106
109
 
107
- // src/models/toaster.ts
108
- var Toaster;
109
- ((Toaster2) => {
110
- let Status;
111
- ((Status2) => {
112
- Status2["confirm"] = "confirm";
113
- Status2["reject"] = "reject";
114
- Status2["dismiss"] = "dismiss";
115
- })(Status = Toaster2.Status || (Toaster2.Status = {}));
116
- })(Toaster || (Toaster = {}));
117
-
118
110
  // src/models/confirmation.ts
119
111
  var Confirmation;
120
112
  ((Confirmation2) => {
@@ -126,6 +118,24 @@ var Confirmation;
126
118
  })(Status = Confirmation2.Status || (Confirmation2.Status = {}));
127
119
  })(Confirmation || (Confirmation = {}));
128
120
 
121
+ // src/models/nav-item.ts
122
+ var NavItem = class {
123
+ /**
124
+ * Create a new NavItem.
125
+ * @param props - Partial properties to initialize the nav item
126
+ * @since 3.1.0
127
+ */
128
+ constructor(props) {
129
+ this.id = props.id ?? "";
130
+ this.component = props.component;
131
+ this.html = props.html;
132
+ this.action = props.action;
133
+ this.order = props.order;
134
+ this.requiredPolicy = props.requiredPolicy;
135
+ this.visible = props.visible;
136
+ }
137
+ };
138
+
129
139
  // src/constants/styles.ts
130
140
  var BOOTSTRAP = "bootstrap-{{dir}}.min.css";
131
141
  var DEFAULT_STYLES = `
@@ -482,7 +492,7 @@ function ConfirmationProvider({ children }) {
482
492
  (0, import_react5.useEffect)(() => {
483
493
  if (!escapeListenerRef.current) return;
484
494
  const handleEscape = (event) => {
485
- if (event.key === "Escape" && confirmation && confirmation.options?.closable !== false) {
495
+ if (event.key === "Escape" && confirmation && confirmation.options?.dismissible !== false) {
486
496
  respond(Confirmation.Status.dismiss);
487
497
  }
488
498
  };
@@ -663,6 +673,28 @@ var DEFAULT_ERROR_MESSAGES = {
663
673
  500: "AbpUi::DefaultErrorMessage500",
664
674
  503: "AbpUi::DefaultErrorMessage503"
665
675
  };
676
+ var DEFAULT_ERROR_LOCALIZATIONS = {
677
+ defaultError: {
678
+ title: "AbpUi::DefaultErrorMessage",
679
+ details: "AbpUi::DefaultErrorMessageDetail"
680
+ },
681
+ defaultError401: {
682
+ title: "AbpUi::DefaultErrorMessage401",
683
+ details: "AbpUi::DefaultErrorMessage401Detail"
684
+ },
685
+ defaultError403: {
686
+ title: "AbpUi::DefaultErrorMessage403",
687
+ details: "AbpUi::DefaultErrorMessage403Detail"
688
+ },
689
+ defaultError404: {
690
+ title: "AbpUi::DefaultErrorMessage404",
691
+ details: "AbpUi::DefaultErrorMessage404Detail"
692
+ },
693
+ defaultError500: {
694
+ title: "AbpUi::DefaultErrorMessage500",
695
+ details: "AbpUi::DefaultErrorMessage500Detail"
696
+ }
697
+ };
666
698
  function useErrorHandler(options = {}) {
667
699
  const { navigate, loginPath = "/account/login" } = options;
668
700
  const confirmation = useConfirmation();
@@ -735,9 +767,153 @@ function isHttpErrorResponse(error) {
735
767
  return typeof error === "object" && error !== null && "status" in error && typeof error.status === "number";
736
768
  }
737
769
 
738
- // src/components/toast/Toast.tsx
770
+ // src/hooks/use-nav-items.ts
739
771
  var import_react8 = require("react");
740
- var import_react9 = require("@chakra-ui/react");
772
+
773
+ // src/services/nav-items.service.ts
774
+ var _NavItemsService = class _NavItemsService {
775
+ constructor() {
776
+ this._items = [];
777
+ this._listeners = /* @__PURE__ */ new Set();
778
+ }
779
+ /**
780
+ * Get singleton instance
781
+ * @since 3.0.0
782
+ */
783
+ static getInstance() {
784
+ if (!_NavItemsService._instance) {
785
+ _NavItemsService._instance = new _NavItemsService();
786
+ }
787
+ return _NavItemsService._instance;
788
+ }
789
+ /**
790
+ * Reset the singleton instance (useful for testing)
791
+ * @internal
792
+ */
793
+ static resetInstance() {
794
+ _NavItemsService._instance = null;
795
+ }
796
+ /**
797
+ * Get current items (sorted by order)
798
+ * @since 3.0.0
799
+ */
800
+ get items() {
801
+ return [...this._items].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
802
+ }
803
+ /**
804
+ * Subscribe to item changes.
805
+ * Returns an unsubscribe function.
806
+ *
807
+ * @param listener - Callback function to receive item updates
808
+ * @returns Unsubscribe function
809
+ * @since 3.0.0
810
+ */
811
+ subscribe(listener) {
812
+ this._listeners.add(listener);
813
+ listener(this.items);
814
+ return () => {
815
+ this._listeners.delete(listener);
816
+ };
817
+ }
818
+ /**
819
+ * Get items as an observable-like interface.
820
+ * Compatible with Angular's Observable pattern.
821
+ *
822
+ * @returns Object with subscribe method
823
+ * @since 3.0.0
824
+ */
825
+ get items$() {
826
+ return {
827
+ subscribe: (callback) => {
828
+ const unsubscribe = this.subscribe(callback);
829
+ return { unsubscribe };
830
+ }
831
+ };
832
+ }
833
+ /**
834
+ * Add one or more items.
835
+ * Items are automatically sorted by order.
836
+ *
837
+ * @param newItems - Array of items to add
838
+ * @since 3.0.0
839
+ * @since 3.1.0 - Renamed parameter from items to newItems
840
+ */
841
+ addItems(newItems) {
842
+ const existingIds = new Set(this._items.map((item) => item.id));
843
+ const itemsToAdd = newItems.filter((item) => !existingIds.has(item.id)).map((item) => item instanceof NavItem ? item : new NavItem(item));
844
+ this._items = [...this._items, ...itemsToAdd];
845
+ this.notify();
846
+ }
847
+ /**
848
+ * Remove an item by id.
849
+ *
850
+ * @param id - The id of the item to remove
851
+ * @since 3.0.0
852
+ */
853
+ removeItem(id) {
854
+ const initialLength = this._items.length;
855
+ this._items = this._items.filter((item) => item.id !== id);
856
+ if (this._items.length !== initialLength) {
857
+ this.notify();
858
+ }
859
+ }
860
+ /**
861
+ * Patch an existing item by id.
862
+ * Updates only the specified properties.
863
+ *
864
+ * @param id - The id of the item to patch
865
+ * @param patch - Partial item data to merge
866
+ * @since 3.0.0
867
+ */
868
+ patchItem(id, patch) {
869
+ const index = this._items.findIndex((item) => item.id === id);
870
+ if (index !== -1) {
871
+ this._items = [
872
+ ...this._items.slice(0, index),
873
+ { ...this._items[index], ...patch },
874
+ ...this._items.slice(index + 1)
875
+ ];
876
+ this.notify();
877
+ }
878
+ }
879
+ /**
880
+ * Clear all items.
881
+ * @since 3.0.0
882
+ */
883
+ clear() {
884
+ if (this._items.length > 0) {
885
+ this._items = [];
886
+ this.notify();
887
+ }
888
+ }
889
+ /**
890
+ * Notify all listeners of changes.
891
+ */
892
+ notify() {
893
+ const currentItems = this.items;
894
+ this._listeners.forEach((listener) => listener(currentItems));
895
+ }
896
+ };
897
+ _NavItemsService._instance = null;
898
+ var NavItemsService = _NavItemsService;
899
+ function getNavItemsService() {
900
+ return NavItemsService.getInstance();
901
+ }
902
+
903
+ // src/hooks/use-nav-items.ts
904
+ function useNavItems(service) {
905
+ const navItemsService = service || getNavItemsService();
906
+ const [items, setItems] = (0, import_react8.useState)(navItemsService.items);
907
+ (0, import_react8.useEffect)(() => {
908
+ const unsubscribe = navItemsService.subscribe(setItems);
909
+ return unsubscribe;
910
+ }, [navItemsService]);
911
+ return items;
912
+ }
913
+
914
+ // src/components/toast/Toast.tsx
915
+ var import_react9 = require("react");
916
+ var import_react10 = require("@chakra-ui/react");
741
917
  var import_core = require("@abpjs/core");
742
918
  var import_lucide_react = require("lucide-react");
743
919
  var import_jsx_runtime4 = require("react/jsx-runtime");
@@ -844,7 +1020,7 @@ function getPlacement(position) {
844
1020
  var toasterCache = /* @__PURE__ */ new Map();
845
1021
  function getToaster(placement) {
846
1022
  if (!toasterCache.has(placement)) {
847
- toasterCache.set(placement, (0, import_react9.createToaster)({
1023
+ toasterCache.set(placement, (0, import_react10.createToaster)({
848
1024
  placement,
849
1025
  pauseOnPageIdle: true
850
1026
  }));
@@ -854,14 +1030,14 @@ function getToaster(placement) {
854
1030
  function ToastContainer({ position = "bottom-right", containerKey }) {
855
1031
  const { toasts, service } = useToasterContext();
856
1032
  const { t } = (0, import_core.useLocalization)();
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)(() => {
1033
+ const displayedToastsRef = (0, import_react9.useRef)(/* @__PURE__ */ new Set());
1034
+ const placement = (0, import_react9.useMemo)(() => getPlacement(position), [position]);
1035
+ const toaster = (0, import_react9.useMemo)(() => getToaster(placement), [placement]);
1036
+ const filteredToasts = (0, import_react9.useMemo)(() => {
861
1037
  if (!containerKey) return toasts;
862
1038
  return toasts.filter((toast) => toast.options?.containerKey === containerKey);
863
1039
  }, [toasts, containerKey]);
864
- (0, import_react8.useEffect)(() => {
1040
+ (0, import_react9.useEffect)(() => {
865
1041
  const newToasts = filteredToasts.filter((toast) => !displayedToastsRef.current.has(toast.id));
866
1042
  newToasts.forEach((toast) => {
867
1043
  displayedToastsRef.current.add(toast.id);
@@ -894,11 +1070,11 @@ function ToastContainer({ position = "bottom-right", containerKey }) {
894
1070
  });
895
1071
  });
896
1072
  }, [filteredToasts, t, service, toaster]);
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) => {
1073
+ 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) => {
898
1074
  const severity = toast.meta?.severity || "info";
899
1075
  const closable = toast.meta?.closable !== false;
900
1076
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
901
- import_react9.Toast.Root,
1077
+ import_react10.Toast.Root,
902
1078
  {
903
1079
  bg: getSeverityBg(severity),
904
1080
  borderWidth: "1px",
@@ -906,13 +1082,13 @@ function ToastContainer({ position = "bottom-right", containerKey }) {
906
1082
  borderRadius: "lg",
907
1083
  boxShadow: "lg",
908
1084
  width: { md: "sm" },
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 })
1085
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react10.Flex, { align: "flex-start", gap: 3, p: 4, children: [
1086
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react10.Box, { flexShrink: 0, pt: "2px", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SeverityIcon, { severity }) }),
1087
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react10.Stack, { gap: 1, flex: 1, children: [
1088
+ toast.title && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react10.Toast.Title, { fontWeight: "bold", fontSize: "sm", color: "fg", children: toast.title }),
1089
+ toast.description && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react10.Toast.Description, { fontSize: "sm", color: "gray.700", children: toast.description })
914
1090
  ] }),
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" }) })
1091
+ 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" }) })
916
1092
  ] })
917
1093
  }
918
1094
  );
@@ -920,8 +1096,8 @@ function ToastContainer({ position = "bottom-right", containerKey }) {
920
1096
  }
921
1097
 
922
1098
  // src/components/confirmation/Confirmation.tsx
923
- var import_react10 = require("react");
924
- var import_react11 = require("@chakra-ui/react");
1099
+ var import_react11 = require("react");
1100
+ var import_react12 = require("@chakra-ui/react");
925
1101
  var import_core2 = require("@abpjs/core");
926
1102
  var import_lucide_react2 = require("lucide-react");
927
1103
  var import_jsx_runtime5 = require("react/jsx-runtime");
@@ -969,7 +1145,7 @@ function getSeverityColorPalette2(severity) {
969
1145
  function ConfirmationDialog({ className }) {
970
1146
  const { confirmation, respond } = useConfirmationState();
971
1147
  const { t } = (0, import_core2.useLocalization)();
972
- const cancelRef = (0, import_react10.useRef)(null);
1148
+ const cancelRef = (0, import_react11.useRef)(null);
973
1149
  if (!confirmation) {
974
1150
  return null;
975
1151
  }
@@ -995,29 +1171,29 @@ function ConfirmationDialog({ className }) {
995
1171
  respond(Confirmation.Status.dismiss);
996
1172
  };
997
1173
  const handleOpenChange = (details) => {
998
- if (!details.open && options?.closable !== false) {
1174
+ if (!details.open && options?.dismissible !== false) {
999
1175
  handleDismiss();
1000
1176
  }
1001
1177
  };
1002
1178
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1003
- import_react11.Dialog.Root,
1179
+ import_react12.Dialog.Root,
1004
1180
  {
1005
1181
  open: true,
1006
1182
  onOpenChange: handleOpenChange,
1007
1183
  role: "alertdialog",
1008
1184
  placement: "center",
1009
1185
  initialFocusEl: () => cancelRef.current,
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: [
1186
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react12.Portal, { children: [
1187
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react12.Dialog.Backdrop, {}),
1188
+ /* @__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: [
1189
+ /* @__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: [
1014
1190
  /* @__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 }) })
1191
+ 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 }) })
1016
1192
  ] }) }),
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: [
1193
+ /* @__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 }) }),
1194
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react12.Dialog.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react12.Flex, { gap: 3, children: [
1019
1195
  !options?.hideCancelBtn && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1020
- import_react11.Button,
1196
+ import_react12.Button,
1021
1197
  {
1022
1198
  ref: cancelRef,
1023
1199
  variant: "ghost",
@@ -1026,7 +1202,7 @@ function ConfirmationDialog({ className }) {
1026
1202
  }
1027
1203
  ),
1028
1204
  !options?.hideYesBtn && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1029
- import_react11.Button,
1205
+ import_react12.Button,
1030
1206
  {
1031
1207
  colorPalette: getSeverityColorPalette2(severity),
1032
1208
  onClick: handleConfirm,
@@ -1041,7 +1217,7 @@ function ConfirmationDialog({ className }) {
1041
1217
  }
1042
1218
 
1043
1219
  // src/components/errors/ErrorComponent.tsx
1044
- var import_react12 = require("@chakra-ui/react");
1220
+ var import_react13 = require("@chakra-ui/react");
1045
1221
  var import_jsx_runtime6 = require("react/jsx-runtime");
1046
1222
  function ErrorComponent({
1047
1223
  title = "Error",
@@ -1053,9 +1229,9 @@ function ErrorComponent({
1053
1229
  onHomeClick,
1054
1230
  homeButtonText = "Go Home"
1055
1231
  }) {
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: [
1232
+ 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: [
1057
1233
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1058
- import_react12.Heading,
1234
+ import_react13.Heading,
1059
1235
  {
1060
1236
  size: "4xl",
1061
1237
  color: "red.500",
@@ -1063,10 +1239,10 @@ function ErrorComponent({
1063
1239
  children: title
1064
1240
  }
1065
1241
  ),
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: [
1242
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react13.Text, { fontSize: "lg", color: "gray.600", children: details }),
1243
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react13.Box, { display: "flex", gap: 3, children: [
1068
1244
  isHomeShow && onHomeClick && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1069
- import_react12.Button,
1245
+ import_react13.Button,
1070
1246
  {
1071
1247
  colorPalette: "green",
1072
1248
  size: "lg",
@@ -1075,7 +1251,7 @@ function ErrorComponent({
1075
1251
  }
1076
1252
  ),
1077
1253
  showCloseButton && onDestroy && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1078
- import_react12.Button,
1254
+ import_react13.Button,
1079
1255
  {
1080
1256
  colorPalette: "blue",
1081
1257
  size: "lg",
@@ -1088,35 +1264,21 @@ function ErrorComponent({
1088
1264
  }
1089
1265
 
1090
1266
  // src/components/loader-bar/LoaderBar.tsx
1091
- var import_react13 = require("react");
1267
+ var import_react14 = require("react");
1092
1268
  var import_core3 = require("@abpjs/core");
1093
1269
  var import_jsx_runtime7 = require("react/jsx-runtime");
1094
1270
  function LoaderBar({
1095
1271
  containerClass = "abp-loader-bar",
1096
1272
  progressClass = "abp-progress",
1097
- filter,
1273
+ filter: _filter,
1098
1274
  intervalPeriod = 300,
1099
1275
  stopDelay = 400
1100
1276
  }) {
1101
1277
  const { loading } = (0, import_core3.useLoader)();
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)(() => {
1106
- if (loading) {
1107
- startLoading();
1108
- } else {
1109
- stopLoading();
1110
- }
1111
- }, [loading]);
1112
- (0, import_react13.useEffect)(() => {
1113
- return () => {
1114
- if (intervalRef.current) {
1115
- clearInterval(intervalRef.current);
1116
- }
1117
- };
1118
- }, []);
1119
- const startLoading = () => {
1278
+ const [isLoading, setIsLoading] = (0, import_react14.useState)(false);
1279
+ const [progressLevel, setProgressLevel] = (0, import_react14.useState)(0);
1280
+ const intervalRef = (0, import_react14.useRef)(null);
1281
+ const startLoading = (0, import_react14.useCallback)(() => {
1120
1282
  setIsLoading(true);
1121
1283
  setProgressLevel(0);
1122
1284
  if (intervalRef.current) {
@@ -1134,8 +1296,8 @@ function LoaderBar({
1134
1296
  return prev + 10;
1135
1297
  });
1136
1298
  }, intervalPeriod);
1137
- };
1138
- const stopLoading = () => {
1299
+ }, [intervalPeriod]);
1300
+ const stopLoading = (0, import_react14.useCallback)(() => {
1139
1301
  setProgressLevel(100);
1140
1302
  if (intervalRef.current) {
1141
1303
  clearInterval(intervalRef.current);
@@ -1145,7 +1307,21 @@ function LoaderBar({
1145
1307
  setIsLoading(false);
1146
1308
  setProgressLevel(0);
1147
1309
  }, stopDelay);
1148
- };
1310
+ }, [stopDelay]);
1311
+ (0, import_react14.useEffect)(() => {
1312
+ if (loading) {
1313
+ startLoading();
1314
+ } else {
1315
+ stopLoading();
1316
+ }
1317
+ }, [loading, startLoading, stopLoading]);
1318
+ (0, import_react14.useEffect)(() => {
1319
+ return () => {
1320
+ if (intervalRef.current) {
1321
+ clearInterval(intervalRef.current);
1322
+ }
1323
+ };
1324
+ }, []);
1149
1325
  if (!isLoading && progressLevel === 0) {
1150
1326
  return null;
1151
1327
  }
@@ -1180,8 +1356,8 @@ function LoaderBar({
1180
1356
  }
1181
1357
 
1182
1358
  // src/components/modal/Modal.tsx
1183
- var import_react14 = __toESM(require("react"));
1184
- var import_react15 = require("@chakra-ui/react");
1359
+ var import_react15 = __toESM(require("react"));
1360
+ var import_react16 = require("@chakra-ui/react");
1185
1361
  var import_jsx_runtime8 = require("react/jsx-runtime");
1186
1362
  function getSizeWidth(size) {
1187
1363
  switch (size) {
@@ -1220,12 +1396,12 @@ function Modal({
1220
1396
  preventScroll = true,
1221
1397
  onInit
1222
1398
  }) {
1223
- const prevVisibleRef = import_react14.default.useRef(false);
1224
- const onInitRef = import_react14.default.useRef(onInit);
1225
- import_react14.default.useEffect(() => {
1399
+ const prevVisibleRef = import_react15.default.useRef(false);
1400
+ const onInitRef = import_react15.default.useRef(onInit);
1401
+ import_react15.default.useEffect(() => {
1226
1402
  onInitRef.current = onInit;
1227
1403
  }, [onInit]);
1228
- import_react14.default.useEffect(() => {
1404
+ import_react15.default.useEffect(() => {
1229
1405
  if (visible && !prevVisibleRef.current && onInitRef.current) {
1230
1406
  onInitRef.current();
1231
1407
  }
@@ -1238,7 +1414,7 @@ function Modal({
1238
1414
  onVisibleChange?.(details.open);
1239
1415
  };
1240
1416
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1241
- import_react15.Dialog.Root,
1417
+ import_react16.Dialog.Root,
1242
1418
  {
1243
1419
  open: visible,
1244
1420
  onOpenChange: handleOpenChange,
@@ -1249,10 +1425,10 @@ function Modal({
1249
1425
  motionPreset,
1250
1426
  trapFocus,
1251
1427
  preventScroll,
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,
1428
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react16.Portal, { children: [
1429
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Dialog.Backdrop, {}),
1430
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1431
+ import_react16.Dialog.Content,
1256
1432
  {
1257
1433
  className: modalClass,
1258
1434
  width: getSizeWidth(size),
@@ -1262,16 +1438,16 @@ function Modal({
1262
1438
  minHeight,
1263
1439
  children: [
1264
1440
  (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" }) })
1441
+ /* @__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: [
1442
+ 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 }) }),
1443
+ 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" }) })
1268
1444
  ] }) }),
1269
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Separator, {})
1445
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Separator, {})
1270
1446
  ] }),
1271
- children && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Dialog.Body, { py: 4, children }),
1447
+ children && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Dialog.Body, { py: 4, children }),
1272
1448
  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 }) })
1449
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Separator, {}),
1450
+ /* @__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 }) })
1275
1451
  ] })
1276
1452
  ]
1277
1453
  }
@@ -1281,17 +1457,17 @@ function Modal({
1281
1457
  );
1282
1458
  }
1283
1459
  function AbpModalHeader({ children, className }) {
1284
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Text, { fontWeight: "bold", fontSize: "lg", className, children });
1460
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Text, { fontWeight: "bold", fontSize: "lg", className, children });
1285
1461
  }
1286
1462
  function AbpModalBody({ children, className }) {
1287
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Box, { color: "gray.600", className, children });
1463
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Box, { color: "gray.600", className, children });
1288
1464
  }
1289
1465
  function AbpModalFooter({ children, className }) {
1290
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react15.Flex, { gap: 3, justify: "flex-end", className, children });
1466
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react16.Flex, { gap: 3, justify: "flex-end", className, children });
1291
1467
  }
1292
1468
 
1293
1469
  // src/components/ui/Alert.tsx
1294
- var import_react16 = require("@chakra-ui/react");
1470
+ var import_react17 = require("@chakra-ui/react");
1295
1471
  var import_jsx_runtime9 = require("react/jsx-runtime");
1296
1472
  function Alert({
1297
1473
  status = "info",
@@ -1304,28 +1480,28 @@ function Alert({
1304
1480
  borderRadius = "md"
1305
1481
  }) {
1306
1482
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1307
- import_react16.Alert.Root,
1483
+ import_react17.Alert.Root,
1308
1484
  {
1309
1485
  status,
1310
1486
  className,
1311
1487
  mb,
1312
1488
  borderRadius,
1313
1489
  children: [
1314
- showIcon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react16.Alert.Indicator, {}),
1490
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react17.Alert.Indicator, {}),
1315
1491
  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 })
1492
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react17.Alert.Title, { children: title }),
1493
+ (description || children) && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react17.Alert.Description, { children: description || children })
1494
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react17.Alert.Title, { children })
1319
1495
  ]
1320
1496
  }
1321
1497
  );
1322
1498
  }
1323
1499
 
1324
1500
  // src/components/ui/Button.tsx
1325
- var import_react17 = require("react");
1326
- var import_react18 = require("@chakra-ui/react");
1501
+ var import_react18 = require("react");
1502
+ var import_react19 = require("@chakra-ui/react");
1327
1503
  var import_jsx_runtime10 = require("react/jsx-runtime");
1328
- var Button3 = (0, import_react17.forwardRef)(
1504
+ var Button3 = (0, import_react18.forwardRef)(
1329
1505
  function Button4({
1330
1506
  children,
1331
1507
  type = "button",
@@ -1342,7 +1518,7 @@ var Button3 = (0, import_react17.forwardRef)(
1342
1518
  ml
1343
1519
  }, ref) {
1344
1520
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1345
- import_react18.Button,
1521
+ import_react19.Button,
1346
1522
  {
1347
1523
  ref,
1348
1524
  type,
@@ -1364,10 +1540,10 @@ var Button3 = (0, import_react17.forwardRef)(
1364
1540
  );
1365
1541
 
1366
1542
  // src/components/ui/Checkbox.tsx
1367
- var import_react19 = require("react");
1368
- var import_react20 = require("@chakra-ui/react");
1543
+ var import_react20 = require("react");
1544
+ var import_react21 = require("@chakra-ui/react");
1369
1545
  var import_jsx_runtime11 = require("react/jsx-runtime");
1370
- var Checkbox = (0, import_react19.forwardRef)(
1546
+ var Checkbox = (0, import_react20.forwardRef)(
1371
1547
  function Checkbox2({
1372
1548
  children,
1373
1549
  checked,
@@ -1385,7 +1561,7 @@ var Checkbox = (0, import_react19.forwardRef)(
1385
1561
  className
1386
1562
  }, ref) {
1387
1563
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1388
- import_react20.Checkbox.Root,
1564
+ import_react21.Checkbox.Root,
1389
1565
  {
1390
1566
  checked,
1391
1567
  defaultChecked,
@@ -1398,7 +1574,7 @@ var Checkbox = (0, import_react19.forwardRef)(
1398
1574
  className,
1399
1575
  children: [
1400
1576
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1401
- import_react20.Checkbox.HiddenInput,
1577
+ import_react21.Checkbox.HiddenInput,
1402
1578
  {
1403
1579
  ref,
1404
1580
  id,
@@ -1407,8 +1583,8 @@ var Checkbox = (0, import_react19.forwardRef)(
1407
1583
  onChange
1408
1584
  }
1409
1585
  ),
1410
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react20.Checkbox.Control, {}),
1411
- children && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react20.Checkbox.Label, { children })
1586
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react21.Checkbox.Control, {}),
1587
+ children && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react21.Checkbox.Label, { children })
1412
1588
  ]
1413
1589
  }
1414
1590
  );
@@ -1416,7 +1592,7 @@ var Checkbox = (0, import_react19.forwardRef)(
1416
1592
  );
1417
1593
 
1418
1594
  // src/components/ui/FormField.tsx
1419
- var import_react21 = require("@chakra-ui/react");
1595
+ var import_react22 = require("@chakra-ui/react");
1420
1596
  var import_jsx_runtime12 = require("react/jsx-runtime");
1421
1597
  function FormField({
1422
1598
  label,
@@ -1429,20 +1605,20 @@ function FormField({
1429
1605
  htmlFor,
1430
1606
  className
1431
1607
  }) {
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: [
1608
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react22.Field.Root, { invalid, disabled, className, children: [
1609
+ label && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react22.Field.Label, { htmlFor, children: [
1434
1610
  label,
1435
- required && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react21.Field.RequiredIndicator, {})
1611
+ required && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react22.Field.RequiredIndicator, {})
1436
1612
  ] }),
1437
1613
  children,
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 })
1614
+ helperText && !invalid && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react22.Field.HelperText, { children: helperText }),
1615
+ invalid && errorText && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react22.Field.ErrorText, { children: errorText })
1440
1616
  ] });
1441
1617
  }
1442
1618
 
1443
1619
  // src/components/change-password/ChangePassword.tsx
1444
- var import_react22 = require("react");
1445
- var import_react23 = require("@chakra-ui/react");
1620
+ var import_react23 = require("react");
1621
+ var import_react24 = require("@chakra-ui/react");
1446
1622
  var import_react_hook_form = require("react-hook-form");
1447
1623
  var import_core4 = require("@abpjs/core");
1448
1624
  var import_lucide_react3 = require("lucide-react");
@@ -1468,7 +1644,7 @@ function ChangePassword({
1468
1644
  }
1469
1645
  });
1470
1646
  const newPassword = watch("newPassword");
1471
- (0, import_react22.useEffect)(() => {
1647
+ (0, import_react23.useEffect)(() => {
1472
1648
  if (visible) {
1473
1649
  reset();
1474
1650
  }
@@ -1510,9 +1686,9 @@ function ChangePassword({
1510
1686
  }
1511
1687
  };
1512
1688
  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" }),
1689
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react24.Button, { variant: "ghost", mr: 3, onClick: handleClose, disabled: isSubmitting, children: t("AbpIdentity::Cancel") || "Cancel" }),
1514
1690
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1515
- import_react23.Button,
1691
+ import_react24.Button,
1516
1692
  {
1517
1693
  colorPalette: "blue",
1518
1694
  type: "submit",
@@ -1534,14 +1710,14 @@ function ChangePassword({
1534
1710
  header: t("AbpIdentity::ChangePassword") || "Change Password",
1535
1711
  footer: modalFooter,
1536
1712
  centered: true,
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: [
1713
+ 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: [
1714
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react24.Field.Root, { invalid: !!errors.password, children: [
1715
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react24.Field.Label, { children: [
1540
1716
  t("AbpIdentity::DisplayName:CurrentPassword") || "Current Password",
1541
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Field.RequiredIndicator, {})
1717
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react24.Field.RequiredIndicator, {})
1542
1718
  ] }),
1543
1719
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1544
- import_react23.Input,
1720
+ import_react24.Input,
1545
1721
  {
1546
1722
  type: "password",
1547
1723
  ...register("password", {
@@ -1549,29 +1725,29 @@ function ChangePassword({
1549
1725
  })
1550
1726
  }
1551
1727
  ),
1552
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Field.ErrorText, { children: errors.password?.message })
1728
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react24.Field.ErrorText, { children: errors.password?.message })
1553
1729
  ] }),
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: [
1730
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react24.Field.Root, { invalid: !!errors.newPassword, children: [
1731
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react24.Field.Label, { children: [
1556
1732
  t("AbpIdentity::DisplayName:NewPassword") || "New Password",
1557
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Field.RequiredIndicator, {})
1733
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react24.Field.RequiredIndicator, {})
1558
1734
  ] }),
1559
1735
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1560
- import_react23.Input,
1736
+ import_react24.Input,
1561
1737
  {
1562
1738
  type: "password",
1563
1739
  ...register("newPassword", passwordValidation)
1564
1740
  }
1565
1741
  ),
1566
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Field.ErrorText, { children: errors.newPassword?.message })
1742
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react24.Field.ErrorText, { children: errors.newPassword?.message })
1567
1743
  ] }),
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: [
1744
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react24.Field.Root, { invalid: !!errors.repeatNewPassword, children: [
1745
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react24.Field.Label, { children: [
1570
1746
  t("AbpIdentity::DisplayName:NewPasswordConfirm") || "Confirm New Password",
1571
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Field.RequiredIndicator, {})
1747
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react24.Field.RequiredIndicator, {})
1572
1748
  ] }),
1573
1749
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1574
- import_react23.Input,
1750
+ import_react24.Input,
1575
1751
  {
1576
1752
  type: "password",
1577
1753
  ...register("repeatNewPassword", {
@@ -1580,7 +1756,7 @@ function ChangePassword({
1580
1756
  })
1581
1757
  }
1582
1758
  ),
1583
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Field.ErrorText, { children: errors.repeatNewPassword?.message })
1759
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react24.Field.ErrorText, { children: errors.repeatNewPassword?.message })
1584
1760
  ] })
1585
1761
  ] }) })
1586
1762
  }
@@ -1588,8 +1764,8 @@ function ChangePassword({
1588
1764
  }
1589
1765
 
1590
1766
  // src/components/profile/Profile.tsx
1591
- var import_react24 = require("react");
1592
- var import_react25 = require("@chakra-ui/react");
1767
+ var import_react25 = require("react");
1768
+ var import_react26 = require("@chakra-ui/react");
1593
1769
  var import_react_hook_form2 = require("react-hook-form");
1594
1770
  var import_core5 = require("@abpjs/core");
1595
1771
  var import_lucide_react4 = require("lucide-react");
@@ -1616,13 +1792,13 @@ function Profile({
1616
1792
  }
1617
1793
  });
1618
1794
  const modalBusy = isSubmitting || loading;
1619
- (0, import_react24.useEffect)(() => {
1795
+ (0, import_react25.useEffect)(() => {
1620
1796
  if (visible) {
1621
1797
  fetchProfile().then(() => {
1622
1798
  });
1623
1799
  }
1624
1800
  }, [visible, fetchProfile]);
1625
- (0, import_react24.useEffect)(() => {
1801
+ (0, import_react25.useEffect)(() => {
1626
1802
  if (profile) {
1627
1803
  reset({
1628
1804
  userName: profile.userName || "",
@@ -1654,9 +1830,9 @@ function Profile({
1654
1830
  }
1655
1831
  };
1656
1832
  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" }),
1833
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Button, { variant: "ghost", mr: 3, onClick: handleClose, disabled: modalBusy, children: t("AbpIdentity::Cancel") || "Cancel" }),
1658
1834
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1659
- import_react25.Button,
1835
+ import_react26.Button,
1660
1836
  {
1661
1837
  colorPalette: "blue",
1662
1838
  type: "submit",
@@ -1679,14 +1855,14 @@ function Profile({
1679
1855
  footer: modalFooter,
1680
1856
  size: "lg",
1681
1857
  centered: true,
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: [
1858
+ 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: [
1859
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.Field.Root, { invalid: !!errors.userName, children: [
1860
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.Field.Label, { children: [
1685
1861
  t("AbpIdentity::DisplayName:UserName") || "Username",
1686
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.RequiredIndicator, {})
1862
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.RequiredIndicator, {})
1687
1863
  ] }),
1688
1864
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1689
- import_react25.Input,
1865
+ import_react26.Input,
1690
1866
  {
1691
1867
  type: "text",
1692
1868
  ...register("userName", {
@@ -1698,13 +1874,13 @@ function Profile({
1698
1874
  })
1699
1875
  }
1700
1876
  ),
1701
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.ErrorText, { children: errors.userName?.message })
1877
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.ErrorText, { children: errors.userName?.message })
1702
1878
  ] }),
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" }),
1879
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.HStack, { gap: 4, w: "full", children: [
1880
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.Field.Root, { invalid: !!errors.name, flex: 1, children: [
1881
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.Label, { children: t("AbpIdentity::DisplayName:Name") || "Name" }),
1706
1882
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1707
- import_react25.Input,
1883
+ import_react26.Input,
1708
1884
  {
1709
1885
  type: "text",
1710
1886
  ...register("name", {
@@ -1715,12 +1891,12 @@ function Profile({
1715
1891
  })
1716
1892
  }
1717
1893
  ),
1718
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.ErrorText, { children: errors.name?.message })
1894
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.ErrorText, { children: errors.name?.message })
1719
1895
  ] }),
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" }),
1896
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.Field.Root, { invalid: !!errors.surname, flex: 1, children: [
1897
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.Label, { children: t("AbpIdentity::DisplayName:Surname") || "Surname" }),
1722
1898
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1723
- import_react25.Input,
1899
+ import_react26.Input,
1724
1900
  {
1725
1901
  type: "text",
1726
1902
  ...register("surname", {
@@ -1731,16 +1907,16 @@ function Profile({
1731
1907
  })
1732
1908
  }
1733
1909
  ),
1734
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.ErrorText, { children: errors.surname?.message })
1910
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.ErrorText, { children: errors.surname?.message })
1735
1911
  ] })
1736
1912
  ] }),
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: [
1913
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.Field.Root, { invalid: !!errors.email, children: [
1914
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.Field.Label, { children: [
1739
1915
  t("AbpIdentity::DisplayName:EmailAddress") || "Email Address",
1740
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.RequiredIndicator, {})
1916
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.RequiredIndicator, {})
1741
1917
  ] }),
1742
1918
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1743
- import_react25.Input,
1919
+ import_react26.Input,
1744
1920
  {
1745
1921
  type: "email",
1746
1922
  ...register("email", {
@@ -1756,12 +1932,12 @@ function Profile({
1756
1932
  })
1757
1933
  }
1758
1934
  ),
1759
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.ErrorText, { children: errors.email?.message })
1935
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.ErrorText, { children: errors.email?.message })
1760
1936
  ] }),
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" }),
1937
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react26.Field.Root, { invalid: !!errors.phoneNumber, children: [
1938
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.Label, { children: t("AbpIdentity::DisplayName:PhoneNumber") || "Phone Number" }),
1763
1939
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1764
- import_react25.Input,
1940
+ import_react26.Input,
1765
1941
  {
1766
1942
  type: "tel",
1767
1943
  ...register("phoneNumber", {
@@ -1772,7 +1948,7 @@ function Profile({
1772
1948
  })
1773
1949
  }
1774
1950
  ),
1775
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react25.Field.ErrorText, { children: errors.phoneNumber?.message })
1951
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react26.Field.ErrorText, { children: errors.phoneNumber?.message })
1776
1952
  ] })
1777
1953
  ] }) })
1778
1954
  }
@@ -1780,10 +1956,10 @@ function Profile({
1780
1956
  }
1781
1957
 
1782
1958
  // src/providers/ThemeSharedProvider.tsx
1783
- var import_react28 = require("@chakra-ui/react");
1959
+ var import_react29 = require("@chakra-ui/react");
1784
1960
 
1785
1961
  // src/theme/index.ts
1786
- var import_react26 = require("@chakra-ui/react");
1962
+ var import_react27 = require("@chakra-ui/react");
1787
1963
  var colors = {
1788
1964
  brand: {
1789
1965
  50: { value: "#e3f2fd" },
@@ -1986,7 +2162,7 @@ var semanticTokens = {
1986
2162
  // },
1987
2163
  // },
1988
2164
  };
1989
- var defaultAbpConfig = (0, import_react26.defineConfig)({
2165
+ var defaultAbpConfig = (0, import_react27.defineConfig)({
1990
2166
  theme: {
1991
2167
  tokens: {
1992
2168
  colors,
@@ -2008,16 +2184,16 @@ var defaultAbpConfig = (0, import_react26.defineConfig)({
2008
2184
  });
2009
2185
  function createAbpSystem(overrides) {
2010
2186
  if (overrides) {
2011
- return (0, import_react26.createSystem)(import_react26.defaultConfig, defaultAbpConfig, overrides);
2187
+ return (0, import_react27.createSystem)(import_react27.defaultConfig, defaultAbpConfig, overrides);
2012
2188
  }
2013
- return (0, import_react26.createSystem)(import_react26.defaultConfig, defaultAbpConfig);
2189
+ return (0, import_react27.createSystem)(import_react27.defaultConfig, defaultAbpConfig);
2014
2190
  }
2015
2191
  var abpSystem = createAbpSystem();
2016
2192
 
2017
2193
  // src/components/ui/color-mode.tsx
2018
- var import_react27 = require("@chakra-ui/react");
2194
+ var import_react28 = require("@chakra-ui/react");
2019
2195
  var import_next_themes = require("next-themes");
2020
- var React12 = __toESM(require("react"));
2196
+ var React11 = __toESM(require("react"));
2021
2197
  var import_lucide_react5 = require("lucide-react");
2022
2198
  var import_jsx_runtime15 = require("react/jsx-runtime");
2023
2199
  function ColorModeProvider(props) {
@@ -2039,10 +2215,10 @@ function ColorModeIcon() {
2039
2215
  const { colorMode } = useColorMode();
2040
2216
  return colorMode === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react5.Moon, {}) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react5.Sun, {});
2041
2217
  }
2042
- var ColorModeButton = React12.forwardRef(function ColorModeButton2(props, ref) {
2218
+ var ColorModeButton = React11.forwardRef(function ColorModeButton2(props, ref) {
2043
2219
  const { toggleColorMode } = useColorMode();
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,
2220
+ 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)(
2221
+ import_react28.IconButton,
2046
2222
  {
2047
2223
  onClick: toggleColorMode,
2048
2224
  variant: "ghost",
@@ -2060,10 +2236,10 @@ var ColorModeButton = React12.forwardRef(function ColorModeButton2(props, ref) {
2060
2236
  }
2061
2237
  ) });
2062
2238
  });
2063
- var LightMode = React12.forwardRef(
2239
+ var LightMode = React11.forwardRef(
2064
2240
  function LightMode2(props, ref) {
2065
2241
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2066
- import_react27.Span,
2242
+ import_react28.Span,
2067
2243
  {
2068
2244
  color: "fg",
2069
2245
  display: "contents",
@@ -2076,10 +2252,10 @@ var LightMode = React12.forwardRef(
2076
2252
  );
2077
2253
  }
2078
2254
  );
2079
- var DarkMode = React12.forwardRef(
2255
+ var DarkMode = React11.forwardRef(
2080
2256
  function DarkMode2(props, ref) {
2081
2257
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2082
- import_react27.Span,
2258
+ import_react28.Span,
2083
2259
  {
2084
2260
  color: "fg",
2085
2261
  display: "contents",
@@ -2101,35 +2277,65 @@ function ThemeSharedProvider({
2101
2277
  renderToasts = true,
2102
2278
  renderConfirmation = true,
2103
2279
  themeOverrides,
2104
- toastPosition = "bottom-right",
2280
+ toastPosition: _toastPosition = "bottom-right",
2105
2281
  enableColorMode = false,
2106
2282
  defaultColorMode = "light",
2107
2283
  locale = "en-US"
2108
2284
  }) {
2109
2285
  const system = themeOverrides ? createAbpSystem(themeOverrides) : abpSystem;
2110
2286
  const { endSide } = (0, import_core6.useDirection)();
2111
- toastPosition = `bottom-${endSide}`;
2287
+ const resolvedToastPosition = endSide === "left" ? "bottom-left" : "bottom-right";
2112
2288
  const content = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ToasterProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(ConfirmationProvider, { children: [
2113
2289
  children,
2114
- renderToasts && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ToastContainer, { position: toastPosition }),
2290
+ renderToasts && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ToastContainer, { position: resolvedToastPosition }),
2115
2291
  renderConfirmation && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ConfirmationDialog, {})
2116
2292
  ] }) });
2117
2293
  const colorModeProps = enableColorMode ? { defaultTheme: defaultColorMode } : { forcedTheme: "light" };
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 }) }) });
2294
+ 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 }) }) });
2119
2295
  }
2120
2296
 
2121
- // src/handlers/lazy-style.handler.ts
2122
- var import_react29 = require("react");
2297
+ // src/providers/route.provider.ts
2123
2298
  var import_core7 = require("@abpjs/core");
2299
+
2300
+ // src/enums/route-names.ts
2301
+ var eThemeSharedRouteNames = /* @__PURE__ */ ((eThemeSharedRouteNames2) => {
2302
+ eThemeSharedRouteNames2["Administration"] = "AbpUiNavigation::Menu:Administration";
2303
+ return eThemeSharedRouteNames2;
2304
+ })(eThemeSharedRouteNames || {});
2305
+
2306
+ // src/providers/route.provider.ts
2307
+ function configureRoutes(routes) {
2308
+ return () => {
2309
+ routes.add([
2310
+ {
2311
+ name: "AbpUiNavigation::Menu:Administration" /* Administration */,
2312
+ path: "",
2313
+ order: 100,
2314
+ iconClass: "fa fa-wrench"
2315
+ }
2316
+ ]);
2317
+ };
2318
+ }
2319
+ var THEME_SHARED_ROUTE_PROVIDERS = {
2320
+ configureRoutes
2321
+ };
2322
+ function initializeThemeSharedRoutes() {
2323
+ const routesService = (0, import_core7.getRoutesService)();
2324
+ configureRoutes(routesService)();
2325
+ }
2326
+
2327
+ // src/handlers/lazy-style.handler.ts
2328
+ var import_react30 = require("react");
2329
+ var import_core8 = require("@abpjs/core");
2124
2330
  function createLazyStyleHref(style, dir) {
2125
2331
  return style.replace("{{dir}}", dir);
2126
2332
  }
2127
2333
  function useLazyStyleHandler(options = {}) {
2128
2334
  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)(() => {
2335
+ const [direction, setDirection] = (0, import_react30.useState)(initialDirection);
2336
+ const lazyLoadRef = (0, import_react30.useRef)(new import_core8.LazyLoadService());
2337
+ const loadedStylesRef = (0, import_react30.useRef)(/* @__PURE__ */ new Map());
2338
+ (0, import_react30.useEffect)(() => {
2133
2339
  document.body.dir = direction;
2134
2340
  const switchCSS = async () => {
2135
2341
  const lazyLoad = lazyLoadRef.current;
@@ -2256,44 +2462,6 @@ function injectThemeSharedStyles() {
2256
2462
  };
2257
2463
  }
2258
2464
 
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
2465
  // src/utils/validation-utils.ts
2298
2466
  var PASSWORD_SETTING_KEYS = {
2299
2467
  requiredLength: "Abp.Identity.Password.RequiredLength",
@@ -2421,6 +2589,8 @@ function getPasswordValidationRules(store) {
2421
2589
  Confirmation,
2422
2590
  ConfirmationDialog,
2423
2591
  ConfirmationProvider,
2592
+ DEFAULT_ERROR_LOCALIZATIONS,
2593
+ DEFAULT_ERROR_MESSAGES,
2424
2594
  DEFAULT_LAZY_STYLES,
2425
2595
  DEFAULT_STYLES,
2426
2596
  ErrorComponent,
@@ -2436,26 +2606,27 @@ function getPasswordValidationRules(store) {
2436
2606
  ModalFooter,
2437
2607
  ModalHeader,
2438
2608
  ModalProvider,
2609
+ NavItem,
2610
+ NavItemsService,
2439
2611
  PASSWORD_SETTING_KEYS,
2440
2612
  Profile,
2441
2613
  THEME_SHARED_APPEND_CONTENT,
2614
+ THEME_SHARED_ROUTE_PROVIDERS,
2442
2615
  THEME_SHARED_STYLES,
2443
2616
  ThemeSharedAppendContentContext,
2444
2617
  ThemeSharedProvider,
2445
2618
  ToastContainer,
2446
- Toaster,
2447
2619
  ToasterProvider,
2448
2620
  abpSystem,
2449
- addNavItem,
2450
- clearNavItems,
2621
+ configureRoutes,
2451
2622
  createAbpSystem,
2452
2623
  createErrorInterceptor,
2453
2624
  createLazyStyleHref,
2454
2625
  defaultAbpConfig,
2455
2626
  defineConfig,
2627
+ eThemeSharedRouteNames,
2456
2628
  getLoadedBootstrapDirection,
2457
- getNavItems,
2458
- getNavItemsSync,
2629
+ getNavItemsService,
2459
2630
  getPasswordSettings,
2460
2631
  getPasswordValidationRules,
2461
2632
  getPasswordValidators,
@@ -2464,9 +2635,8 @@ function getPasswordValidationRules(store) {
2464
2635
  getSeverityColorScheme,
2465
2636
  httpErrorConfigFactory,
2466
2637
  initLazyStyleHandler,
2638
+ initializeThemeSharedRoutes,
2467
2639
  injectThemeSharedStyles,
2468
- removeNavItem,
2469
- subscribeToNavItems,
2470
2640
  useConfirmation,
2471
2641
  useConfirmationContext,
2472
2642
  useConfirmationState,
@@ -2477,6 +2647,7 @@ function getPasswordValidationRules(store) {
2477
2647
  useModal,
2478
2648
  useModalContext,
2479
2649
  useModalState,
2650
+ useNavItems,
2480
2651
  useToaster,
2481
2652
  useToasterContext,
2482
2653
  useToasts