@famgia/omnify-react-sso 2.2.5 → 2.2.7

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
@@ -1705,13 +1705,178 @@ function OrgBranchSelectorModal({
1705
1705
  );
1706
1706
  }
1707
1707
 
1708
+ // src/ant/components/OrgGate/OrgGate.tsx
1709
+ import { Modal as Modal2, Select as Select2, Spin as Spin2, Typography as Typography3 } from "antd";
1710
+ import { useEffect as useEffect6, useState as useState5 } from "react";
1711
+
1712
+ // src/core/utils/orgSync.ts
1713
+ var _currentOrgId = null;
1714
+ var ORG_ID_STORAGE_KEY = "api_current_org_id";
1715
+ var SSO_SELECTED_ORG_KEY = "sso_selected_org";
1716
+ var BRANCH_GATE_SELECTION_KEY = "omnify_branch_gate_selection";
1717
+ function setOrgIdForApi(orgId) {
1718
+ _currentOrgId = orgId;
1719
+ if (typeof window === "undefined") return;
1720
+ if (orgId) {
1721
+ localStorage.setItem(ORG_ID_STORAGE_KEY, orgId);
1722
+ } else {
1723
+ localStorage.removeItem(ORG_ID_STORAGE_KEY);
1724
+ }
1725
+ }
1726
+ function getOrgIdForApi() {
1727
+ if (_currentOrgId) {
1728
+ return _currentOrgId;
1729
+ }
1730
+ if (typeof window === "undefined") {
1731
+ return null;
1732
+ }
1733
+ const stored = localStorage.getItem(ORG_ID_STORAGE_KEY);
1734
+ if (stored) {
1735
+ _currentOrgId = stored;
1736
+ return stored;
1737
+ }
1738
+ try {
1739
+ const ssoOrg = localStorage.getItem(SSO_SELECTED_ORG_KEY);
1740
+ if (ssoOrg) {
1741
+ const org = JSON.parse(ssoOrg);
1742
+ if (org?.slug) {
1743
+ return org.slug;
1744
+ }
1745
+ }
1746
+ } catch {
1747
+ }
1748
+ try {
1749
+ const branchGate = localStorage.getItem(BRANCH_GATE_SELECTION_KEY);
1750
+ if (branchGate) {
1751
+ const selection = JSON.parse(branchGate);
1752
+ if (selection?.orgId) {
1753
+ return selection.orgId;
1754
+ }
1755
+ }
1756
+ } catch {
1757
+ }
1758
+ return null;
1759
+ }
1760
+ function clearOrgIdForApi() {
1761
+ _currentOrgId = null;
1762
+ if (typeof window !== "undefined") {
1763
+ localStorage.removeItem(ORG_ID_STORAGE_KEY);
1764
+ }
1765
+ }
1766
+ function hasOrgIdForApi() {
1767
+ return getOrgIdForApi() !== null;
1768
+ }
1769
+
1770
+ // src/ant/components/OrgGate/OrgGate.tsx
1771
+ import { Fragment as Fragment3, jsx as jsx7 } from "react/jsx-runtime";
1772
+ var { Text: Text3 } = Typography3;
1773
+ var defaultTranslations = {
1774
+ selectOrgTitle: "\u7D44\u7E54\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",
1775
+ confirmText: "\u9078\u629E",
1776
+ selectPlaceholder: "\u7D44\u7E54\u3092\u9078\u629E",
1777
+ noOrgsMessage: "\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306A\u7D44\u7E54\u304C\u3042\u308A\u307E\u305B\u3093"
1778
+ };
1779
+ function OrgGate({
1780
+ children,
1781
+ translations: customTranslations,
1782
+ loadingComponent,
1783
+ onOrgChange
1784
+ }) {
1785
+ const t = { ...defaultTranslations, ...customTranslations };
1786
+ const { isLoading: ssoLoading, isAuthenticated } = useSso();
1787
+ const { organizations, currentOrg, switchOrg } = useOrganization();
1788
+ const [selectedOrgSlug, setSelectedOrgSlug] = useState5(void 0);
1789
+ useEffect6(() => {
1790
+ if (!ssoLoading && isAuthenticated && organizations.length === 1 && !currentOrg) {
1791
+ switchOrg(organizations[0].slug);
1792
+ }
1793
+ }, [ssoLoading, isAuthenticated, organizations, currentOrg, switchOrg]);
1794
+ if (currentOrg?.slug) {
1795
+ setOrgIdForApi(currentOrg.slug);
1796
+ if (onOrgChange) {
1797
+ onOrgChange(currentOrg.slug);
1798
+ }
1799
+ }
1800
+ if (ssoLoading) {
1801
+ if (loadingComponent) {
1802
+ return /* @__PURE__ */ jsx7(Fragment3, { children: loadingComponent });
1803
+ }
1804
+ return /* @__PURE__ */ jsx7(
1805
+ "div",
1806
+ {
1807
+ style: {
1808
+ display: "flex",
1809
+ justifyContent: "center",
1810
+ alignItems: "center",
1811
+ minHeight: "100vh"
1812
+ },
1813
+ children: /* @__PURE__ */ jsx7(Spin2, { size: "large" })
1814
+ }
1815
+ );
1816
+ }
1817
+ if (!isAuthenticated) {
1818
+ return /* @__PURE__ */ jsx7(Fragment3, { children });
1819
+ }
1820
+ if (organizations.length === 0) {
1821
+ return /* @__PURE__ */ jsx7(
1822
+ "div",
1823
+ {
1824
+ style: {
1825
+ display: "flex",
1826
+ justifyContent: "center",
1827
+ alignItems: "center",
1828
+ minHeight: "100vh",
1829
+ flexDirection: "column",
1830
+ gap: 16
1831
+ },
1832
+ children: /* @__PURE__ */ jsx7(Text3, { type: "secondary", children: t.noOrgsMessage })
1833
+ }
1834
+ );
1835
+ }
1836
+ if (currentOrg) {
1837
+ return /* @__PURE__ */ jsx7(Fragment3, { children });
1838
+ }
1839
+ const handleConfirm = () => {
1840
+ if (selectedOrgSlug) {
1841
+ switchOrg(selectedOrgSlug);
1842
+ }
1843
+ };
1844
+ return /* @__PURE__ */ jsx7(
1845
+ Modal2,
1846
+ {
1847
+ open: true,
1848
+ closable: false,
1849
+ maskClosable: false,
1850
+ title: t.selectOrgTitle,
1851
+ okText: t.confirmText,
1852
+ okButtonProps: { disabled: !selectedOrgSlug },
1853
+ onOk: handleConfirm,
1854
+ cancelButtonProps: { style: { display: "none" } },
1855
+ children: /* @__PURE__ */ jsx7("div", { style: { marginTop: 16 }, children: /* @__PURE__ */ jsx7(
1856
+ Select2,
1857
+ {
1858
+ placeholder: t.selectPlaceholder,
1859
+ style: { width: "100%" },
1860
+ value: selectedOrgSlug,
1861
+ onChange: setSelectedOrgSlug,
1862
+ options: organizations.map((org) => ({
1863
+ value: org.slug,
1864
+ label: org.name
1865
+ })),
1866
+ size: "large"
1867
+ }
1868
+ ) })
1869
+ }
1870
+ );
1871
+ }
1872
+
1708
1873
  // src/ant/components/BranchGate/BranchGate.tsx
1709
- import React7, { useEffect as useEffect6, useState as useState5 } from "react";
1710
- import { Select as Select2, Space as Space3, Typography as Typography3, Badge as Badge3, Spin as Spin2, Button as Button2, Alert as Alert2 } from "antd";
1874
+ import React7, { useEffect as useEffect7, useState as useState6 } from "react";
1875
+ import { Select as Select3, Space as Space3, Typography as Typography4, Badge as Badge3, Spin as Spin3, Button as Button2, Alert as Alert2 } from "antd";
1711
1876
  import { BankOutlined as BankOutlined2, ApartmentOutlined as ApartmentOutlined2, CheckCircleFilled as CheckCircleFilled2 } from "@ant-design/icons";
1712
1877
  import { useQuery as useQuery3 } from "@tanstack/react-query";
1713
- import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
1714
- var { Text: Text3, Title: Title2 } = Typography3;
1878
+ import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
1879
+ var { Text: Text4, Title: Title2 } = Typography4;
1715
1880
  var DEFAULT_STORAGE_KEY2 = "omnify_branch_gate_selection";
1716
1881
  function BranchGate({
1717
1882
  children,
@@ -1723,10 +1888,10 @@ function BranchGate({
1723
1888
  }) {
1724
1889
  const { config, isAuthenticated } = useSsoContext();
1725
1890
  const { organizations, currentOrg, hasMultipleOrgs } = useOrganization();
1726
- const [storedSelection, setStoredSelection] = useState5(null);
1727
- const [isInitialized, setIsInitialized] = useState5(false);
1728
- const [tempOrgId, setTempOrgId] = useState5(null);
1729
- const [tempBranchId, setTempBranchId] = useState5(null);
1891
+ const [storedSelection, setStoredSelection] = useState6(null);
1892
+ const [isInitialized, setIsInitialized] = useState6(false);
1893
+ const [tempOrgId, setTempOrgId] = useState6(null);
1894
+ const [tempBranchId, setTempBranchId] = useState6(null);
1730
1895
  const branchService = React7.useMemo(
1731
1896
  () => createBranchService({ apiUrl: config.apiUrl }),
1732
1897
  [config.apiUrl]
@@ -1744,7 +1909,7 @@ function BranchGate({
1744
1909
  });
1745
1910
  const branches = branchesData?.branches ?? [];
1746
1911
  const hasMultipleBranches = branches.length > 1;
1747
- useEffect6(() => {
1912
+ useEffect7(() => {
1748
1913
  if (typeof window === "undefined") return;
1749
1914
  const saved = localStorage.getItem(storageKey);
1750
1915
  if (saved) {
@@ -1758,13 +1923,13 @@ function BranchGate({
1758
1923
  }
1759
1924
  setIsInitialized(true);
1760
1925
  }, [storageKey, onSelectionChange]);
1761
- useEffect6(() => {
1926
+ useEffect7(() => {
1762
1927
  if (!isAuthenticated || !isInitialized || storedSelection) return;
1763
1928
  if (organizations.length === 1 && !tempOrgId) {
1764
1929
  setTempOrgId(String(organizations[0].id));
1765
1930
  }
1766
1931
  }, [isAuthenticated, isInitialized, organizations, storedSelection, tempOrgId]);
1767
- useEffect6(() => {
1932
+ useEffect7(() => {
1768
1933
  if (!tempOrgId || branchesLoading || storedSelection) return;
1769
1934
  if (branches.length === 1 && !tempBranchId) {
1770
1935
  setTempBranchId(String(branches[0].id));
@@ -1780,7 +1945,7 @@ function BranchGate({
1780
1945
  }
1781
1946
  }
1782
1947
  }, [tempOrgId, branches, branchesLoading, branchesData, storedSelection, tempBranchId]);
1783
- useEffect6(() => {
1948
+ useEffect7(() => {
1784
1949
  if (storedSelection || !isInitialized) return;
1785
1950
  if (!tempOrgId || !tempBranchId || branchesLoading) return;
1786
1951
  if (!hasMultipleOrgs && !hasMultipleBranches) {
@@ -1814,19 +1979,19 @@ function BranchGate({
1814
1979
  const isLoading = !isAuthenticated || !isInitialized || !!activeOrgSlug && branchesLoading && !storedSelection;
1815
1980
  if (isLoading && !needsSelection) {
1816
1981
  if (loadingComponent) {
1817
- return /* @__PURE__ */ jsx7(Fragment3, { children: loadingComponent });
1982
+ return /* @__PURE__ */ jsx8(Fragment4, { children: loadingComponent });
1818
1983
  }
1819
- return /* @__PURE__ */ jsx7("div", { style: {
1984
+ return /* @__PURE__ */ jsx8("div", { style: {
1820
1985
  display: "flex",
1821
1986
  justifyContent: "center",
1822
1987
  alignItems: "center",
1823
1988
  minHeight: "100vh",
1824
1989
  background: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)"
1825
- }, children: /* @__PURE__ */ jsx7(Spin2, { size: "large" }) });
1990
+ }, children: /* @__PURE__ */ jsx8(Spin3, { size: "large" }) });
1826
1991
  }
1827
1992
  if (needsSelection) {
1828
1993
  const canConfirm = tempOrgId && tempBranchId;
1829
- return /* @__PURE__ */ jsx7("div", { style: {
1994
+ return /* @__PURE__ */ jsx8("div", { style: {
1830
1995
  minHeight: "100vh",
1831
1996
  background: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
1832
1997
  display: "flex",
@@ -1842,7 +2007,7 @@ function BranchGate({
1842
2007
  boxShadow: "0 20px 60px rgba(0,0,0,0.3)"
1843
2008
  }, children: [
1844
2009
  /* @__PURE__ */ jsxs5("div", { style: { textAlign: "center", marginBottom: 24 }, children: [
1845
- /* @__PURE__ */ jsx7("div", { style: {
2010
+ /* @__PURE__ */ jsx8("div", { style: {
1846
2011
  width: 64,
1847
2012
  height: 64,
1848
2013
  borderRadius: "50%",
@@ -1851,18 +2016,18 @@ function BranchGate({
1851
2016
  alignItems: "center",
1852
2017
  justifyContent: "center",
1853
2018
  margin: "0 auto 16px"
1854
- }, children: /* @__PURE__ */ jsx7(BankOutlined2, { style: { fontSize: 28, color: "#fff" } }) }),
1855
- /* @__PURE__ */ jsx7(Title2, { level: 3, style: { margin: 0 }, children: title ?? "Select Organization" }),
1856
- /* @__PURE__ */ jsx7(Text3, { type: "secondary", children: description ?? "Please select your organization and branch to continue" })
2019
+ }, children: /* @__PURE__ */ jsx8(BankOutlined2, { style: { fontSize: 28, color: "#fff" } }) }),
2020
+ /* @__PURE__ */ jsx8(Title2, { level: 3, style: { margin: 0 }, children: title ?? "Select Organization" }),
2021
+ /* @__PURE__ */ jsx8(Text4, { type: "secondary", children: description ?? "Please select your organization and branch to continue" })
1857
2022
  ] }),
1858
2023
  /* @__PURE__ */ jsxs5("div", { style: { marginBottom: 20 }, children: [
1859
- /* @__PURE__ */ jsx7(Text3, { strong: true, style: { display: "block", marginBottom: 8 }, children: /* @__PURE__ */ jsxs5(Space3, { children: [
1860
- /* @__PURE__ */ jsx7(BankOutlined2, {}),
1861
- /* @__PURE__ */ jsx7("span", { children: "Organization" }),
1862
- !hasMultipleOrgs && /* @__PURE__ */ jsx7(Badge3, { status: "success", text: "Auto-selected" })
2024
+ /* @__PURE__ */ jsx8(Text4, { strong: true, style: { display: "block", marginBottom: 8 }, children: /* @__PURE__ */ jsxs5(Space3, { children: [
2025
+ /* @__PURE__ */ jsx8(BankOutlined2, {}),
2026
+ /* @__PURE__ */ jsx8("span", { children: "Organization" }),
2027
+ !hasMultipleOrgs && /* @__PURE__ */ jsx8(Badge3, { status: "success", text: "Auto-selected" })
1863
2028
  ] }) }),
1864
- hasMultipleOrgs ? /* @__PURE__ */ jsx7(
1865
- Select2,
2029
+ hasMultipleOrgs ? /* @__PURE__ */ jsx8(
2030
+ Select3,
1866
2031
  {
1867
2032
  value: tempOrgId,
1868
2033
  onChange: (value) => {
@@ -1873,36 +2038,36 @@ function BranchGate({
1873
2038
  size: "large",
1874
2039
  style: { width: "100%" },
1875
2040
  optionLabelProp: "label",
1876
- children: organizations.map((org) => /* @__PURE__ */ jsx7(Select2.Option, { value: String(org.id), label: org.name, children: /* @__PURE__ */ jsx7(Space3, { style: { width: "100%", justifyContent: "space-between" }, children: /* @__PURE__ */ jsxs5("div", { children: [
1877
- /* @__PURE__ */ jsx7(Text3, { strong: true, children: org.name }),
1878
- org.serviceRole && /* @__PURE__ */ jsxs5(Text3, { type: "secondary", style: { marginLeft: 8, fontSize: 12 }, children: [
2041
+ children: organizations.map((org) => /* @__PURE__ */ jsx8(Select3.Option, { value: String(org.id), label: org.name, children: /* @__PURE__ */ jsx8(Space3, { style: { width: "100%", justifyContent: "space-between" }, children: /* @__PURE__ */ jsxs5("div", { children: [
2042
+ /* @__PURE__ */ jsx8(Text4, { strong: true, children: org.name }),
2043
+ org.serviceRole && /* @__PURE__ */ jsxs5(Text4, { type: "secondary", style: { marginLeft: 8, fontSize: 12 }, children: [
1879
2044
  "(",
1880
2045
  org.serviceRole,
1881
2046
  ")"
1882
2047
  ] })
1883
2048
  ] }) }) }, org.id))
1884
2049
  }
1885
- ) : /* @__PURE__ */ jsx7("div", { style: {
2050
+ ) : /* @__PURE__ */ jsx8("div", { style: {
1886
2051
  padding: "8px 12px",
1887
2052
  background: "#f5f5f5",
1888
2053
  borderRadius: 6,
1889
2054
  border: "1px solid #d9d9d9"
1890
2055
  }, children: /* @__PURE__ */ jsxs5(Space3, { children: [
1891
- /* @__PURE__ */ jsx7(BankOutlined2, { style: { color: "#1677ff" } }),
1892
- /* @__PURE__ */ jsx7(Text3, { strong: true, children: organizations[0]?.name })
2056
+ /* @__PURE__ */ jsx8(BankOutlined2, { style: { color: "#1677ff" } }),
2057
+ /* @__PURE__ */ jsx8(Text4, { strong: true, children: organizations[0]?.name })
1893
2058
  ] }) })
1894
2059
  ] }),
1895
2060
  tempOrgId && /* @__PURE__ */ jsxs5("div", { style: { marginBottom: 24 }, children: [
1896
- /* @__PURE__ */ jsx7(Text3, { strong: true, style: { display: "block", marginBottom: 8 }, children: /* @__PURE__ */ jsxs5(Space3, { children: [
1897
- /* @__PURE__ */ jsx7(ApartmentOutlined2, {}),
1898
- /* @__PURE__ */ jsx7("span", { children: "Branch" }),
1899
- !hasMultipleBranches && branches.length === 1 && /* @__PURE__ */ jsx7(Badge3, { status: "success", text: "Auto-selected" })
2061
+ /* @__PURE__ */ jsx8(Text4, { strong: true, style: { display: "block", marginBottom: 8 }, children: /* @__PURE__ */ jsxs5(Space3, { children: [
2062
+ /* @__PURE__ */ jsx8(ApartmentOutlined2, {}),
2063
+ /* @__PURE__ */ jsx8("span", { children: "Branch" }),
2064
+ !hasMultipleBranches && branches.length === 1 && /* @__PURE__ */ jsx8(Badge3, { status: "success", text: "Auto-selected" })
1900
2065
  ] }) }),
1901
2066
  branchesLoading ? /* @__PURE__ */ jsxs5("div", { style: { padding: "12px", textAlign: "center" }, children: [
1902
- /* @__PURE__ */ jsx7(Spin2, { size: "small" }),
1903
- /* @__PURE__ */ jsx7(Text3, { type: "secondary", style: { marginLeft: 8 }, children: "Loading..." })
1904
- ] }) : hasMultipleBranches ? /* @__PURE__ */ jsx7(
1905
- Select2,
2067
+ /* @__PURE__ */ jsx8(Spin3, { size: "small" }),
2068
+ /* @__PURE__ */ jsx8(Text4, { type: "secondary", style: { marginLeft: 8 }, children: "Loading..." })
2069
+ ] }) : hasMultipleBranches ? /* @__PURE__ */ jsx8(
2070
+ Select3,
1906
2071
  {
1907
2072
  value: tempBranchId,
1908
2073
  onChange: (value) => setTempBranchId(String(value)),
@@ -1910,31 +2075,31 @@ function BranchGate({
1910
2075
  size: "large",
1911
2076
  style: { width: "100%" },
1912
2077
  optionLabelProp: "label",
1913
- children: branches.map((branch) => /* @__PURE__ */ jsx7(Select2.Option, { value: String(branch.id), label: branch.name, children: /* @__PURE__ */ jsxs5(Space3, { style: { width: "100%", justifyContent: "space-between" }, children: [
2078
+ children: branches.map((branch) => /* @__PURE__ */ jsx8(Select3.Option, { value: String(branch.id), label: branch.name, children: /* @__PURE__ */ jsxs5(Space3, { style: { width: "100%", justifyContent: "space-between" }, children: [
1914
2079
  /* @__PURE__ */ jsxs5("div", { children: [
1915
- /* @__PURE__ */ jsx7(Text3, { strong: true, children: branch.name }),
1916
- /* @__PURE__ */ jsx7(Text3, { type: "secondary", style: { marginLeft: 8, fontSize: 12 }, children: branch.code })
2080
+ /* @__PURE__ */ jsx8(Text4, { strong: true, children: branch.name }),
2081
+ /* @__PURE__ */ jsx8(Text4, { type: "secondary", style: { marginLeft: 8, fontSize: 12 }, children: branch.code })
1917
2082
  ] }),
1918
2083
  /* @__PURE__ */ jsxs5(Space3, { size: 4, children: [
1919
- branch.is_headquarters && /* @__PURE__ */ jsx7(Badge3, { color: "blue", text: "HQ" }),
1920
- branch.is_primary && /* @__PURE__ */ jsx7(Badge3, { color: "green", text: "Primary" })
2084
+ branch.is_headquarters && /* @__PURE__ */ jsx8(Badge3, { color: "blue", text: "HQ" }),
2085
+ branch.is_primary && /* @__PURE__ */ jsx8(Badge3, { color: "green", text: "Primary" })
1921
2086
  ] })
1922
2087
  ] }) }, branch.id))
1923
2088
  }
1924
- ) : branches.length === 1 ? /* @__PURE__ */ jsx7("div", { style: {
2089
+ ) : branches.length === 1 ? /* @__PURE__ */ jsx8("div", { style: {
1925
2090
  padding: "8px 12px",
1926
2091
  background: "#f5f5f5",
1927
2092
  borderRadius: 6,
1928
2093
  border: "1px solid #d9d9d9"
1929
2094
  }, children: /* @__PURE__ */ jsxs5(Space3, { children: [
1930
- /* @__PURE__ */ jsx7(ApartmentOutlined2, { style: { color: "#1677ff" } }),
1931
- /* @__PURE__ */ jsx7(Text3, { strong: true, children: branches[0].name }),
1932
- /* @__PURE__ */ jsxs5(Text3, { type: "secondary", children: [
2095
+ /* @__PURE__ */ jsx8(ApartmentOutlined2, { style: { color: "#1677ff" } }),
2096
+ /* @__PURE__ */ jsx8(Text4, { strong: true, children: branches[0].name }),
2097
+ /* @__PURE__ */ jsxs5(Text4, { type: "secondary", children: [
1933
2098
  "(",
1934
2099
  branches[0].code,
1935
2100
  ")"
1936
2101
  ] })
1937
- ] }) }) : /* @__PURE__ */ jsx7(
2102
+ ] }) }) : /* @__PURE__ */ jsx8(
1938
2103
  Alert2,
1939
2104
  {
1940
2105
  type: "warning",
@@ -1943,7 +2108,7 @@ function BranchGate({
1943
2108
  }
1944
2109
  )
1945
2110
  ] }),
1946
- /* @__PURE__ */ jsx7(
2111
+ /* @__PURE__ */ jsx8(
1947
2112
  Button2,
1948
2113
  {
1949
2114
  type: "primary",
@@ -1951,7 +2116,7 @@ function BranchGate({
1951
2116
  block: true,
1952
2117
  disabled: !canConfirm,
1953
2118
  onClick: confirmSelection,
1954
- icon: /* @__PURE__ */ jsx7(CheckCircleFilled2, {}),
2119
+ icon: /* @__PURE__ */ jsx8(CheckCircleFilled2, {}),
1955
2120
  style: {
1956
2121
  height: 48,
1957
2122
  fontSize: 16,
@@ -1963,11 +2128,11 @@ function BranchGate({
1963
2128
  )
1964
2129
  ] }) });
1965
2130
  }
1966
- return /* @__PURE__ */ jsx7(Fragment3, { children });
2131
+ return /* @__PURE__ */ jsx8(Fragment4, { children });
1967
2132
  }
1968
2133
  function useBranchGate(storageKey = DEFAULT_STORAGE_KEY2) {
1969
- const [selection, setSelection] = useState5(null);
1970
- useEffect6(() => {
2134
+ const [selection, setSelection] = useState6(null);
2135
+ useEffect7(() => {
1971
2136
  if (typeof window === "undefined") return;
1972
2137
  const saved = localStorage.getItem(storageKey);
1973
2138
  if (saved) {
@@ -2018,7 +2183,7 @@ import {
2018
2183
  Table,
2019
2184
  Form as Form2,
2020
2185
  Input,
2021
- Select as Select3,
2186
+ Select as Select4,
2022
2187
  DatePicker,
2023
2188
  InputNumber,
2024
2189
  Button as Button3,
@@ -2027,13 +2192,13 @@ import {
2027
2192
  Col,
2028
2193
  Tooltip,
2029
2194
  Divider,
2030
- Typography as Typography4,
2195
+ Typography as Typography5,
2031
2196
  Popconfirm,
2032
2197
  theme
2033
2198
  } from "antd";
2034
- import { useState as useState6, useMemo as useMemo7, useCallback as useCallback7 } from "react";
2035
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
2036
- var { Link } = Typography4;
2199
+ import { useState as useState7, useMemo as useMemo7, useCallback as useCallback7 } from "react";
2200
+ import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
2201
+ var { Link } = Typography5;
2037
2202
  var { RangePicker } = DatePicker;
2038
2203
  var InertiaLink = null;
2039
2204
  try {
@@ -2073,8 +2238,8 @@ var DEFAULT_STATUS_CONFIG = {
2073
2238
  function renderSearchField(field, texts) {
2074
2239
  switch (field.type) {
2075
2240
  case "select":
2076
- return /* @__PURE__ */ jsx8(
2077
- Select3,
2241
+ return /* @__PURE__ */ jsx9(
2242
+ Select4,
2078
2243
  {
2079
2244
  allowClear: true,
2080
2245
  placeholder: field.placeholder || texts.selectPlaceholder,
@@ -2083,7 +2248,7 @@ function renderSearchField(field, texts) {
2083
2248
  }
2084
2249
  );
2085
2250
  case "date":
2086
- return /* @__PURE__ */ jsx8(
2251
+ return /* @__PURE__ */ jsx9(
2087
2252
  DatePicker,
2088
2253
  {
2089
2254
  placeholder: field.placeholder,
@@ -2091,7 +2256,7 @@ function renderSearchField(field, texts) {
2091
2256
  }
2092
2257
  );
2093
2258
  case "dateRange":
2094
- return /* @__PURE__ */ jsx8(
2259
+ return /* @__PURE__ */ jsx9(
2095
2260
  RangePicker,
2096
2261
  {
2097
2262
  placeholder: [texts.startDate, texts.endDate],
@@ -2099,7 +2264,7 @@ function renderSearchField(field, texts) {
2099
2264
  }
2100
2265
  );
2101
2266
  case "number":
2102
- return /* @__PURE__ */ jsx8(
2267
+ return /* @__PURE__ */ jsx9(
2103
2268
  InputNumber,
2104
2269
  {
2105
2270
  placeholder: field.placeholder,
@@ -2107,7 +2272,7 @@ function renderSearchField(field, texts) {
2107
2272
  }
2108
2273
  );
2109
2274
  default:
2110
- return /* @__PURE__ */ jsx8(
2275
+ return /* @__PURE__ */ jsx9(
2111
2276
  Input,
2112
2277
  {
2113
2278
  allowClear: true,
@@ -2118,9 +2283,9 @@ function renderSearchField(field, texts) {
2118
2283
  }
2119
2284
  function SmartLink({ href, children }) {
2120
2285
  if (InertiaLink) {
2121
- return /* @__PURE__ */ jsx8(InertiaLink, { href, children });
2286
+ return /* @__PURE__ */ jsx9(InertiaLink, { href, children });
2122
2287
  }
2123
- return /* @__PURE__ */ jsx8("a", { href, children });
2288
+ return /* @__PURE__ */ jsx9("a", { href, children });
2124
2289
  }
2125
2290
  function renderValue(value, valueType, statusConfig) {
2126
2291
  if (value === null || value === void 0) {
@@ -2132,7 +2297,7 @@ function renderValue(value, valueType, statusConfig) {
2132
2297
  const statusValue = String(value);
2133
2298
  const status = config[statusValue] || { color: "#d9d9d9", text: statusValue };
2134
2299
  return /* @__PURE__ */ jsxs6(Space4, { children: [
2135
- /* @__PURE__ */ jsx8(
2300
+ /* @__PURE__ */ jsx9(
2136
2301
  "span",
2137
2302
  {
2138
2303
  style: {
@@ -2207,8 +2372,8 @@ function ProTable({
2207
2372
  const { token } = theme.useToken();
2208
2373
  const texts = { ...DEFAULT_TEXTS, ...customTexts };
2209
2374
  const [searchForm] = Form2.useForm();
2210
- const [expanded, setExpanded] = useState6(false);
2211
- const [queryParams, setQueryParams] = useState6({
2375
+ const [expanded, setExpanded] = useState7(false);
2376
+ const [queryParams, setQueryParams] = useState7({
2212
2377
  page: 1,
2213
2378
  per_page: defaultPageSize,
2214
2379
  ...defaultSearchValues
@@ -2279,13 +2444,13 @@ function ProTable({
2279
2444
  const actions = rowActions(record).filter(
2280
2445
  (a) => !a.hidden?.(record)
2281
2446
  );
2282
- return /* @__PURE__ */ jsx8(Space4, { size: 0, children: actions.map((action, idx) => {
2447
+ return /* @__PURE__ */ jsx9(Space4, { size: 0, children: actions.map((action, idx) => {
2283
2448
  const isLast = idx === actions.length - 1;
2284
2449
  let actionElement;
2285
2450
  if (action.href) {
2286
- actionElement = /* @__PURE__ */ jsx8(SmartLink, { href: action.href, children: /* @__PURE__ */ jsx8(Link, { style: action.danger ? { color: token.colorError } : void 0, children: action.label }) });
2451
+ actionElement = /* @__PURE__ */ jsx9(SmartLink, { href: action.href, children: /* @__PURE__ */ jsx9(Link, { style: action.danger ? { color: token.colorError } : void 0, children: action.label }) });
2287
2452
  } else {
2288
- const linkElement = /* @__PURE__ */ jsx8(
2453
+ const linkElement = /* @__PURE__ */ jsx9(
2289
2454
  Link,
2290
2455
  {
2291
2456
  style: action.danger ? { color: token.colorError } : void 0,
@@ -2294,7 +2459,7 @@ function ProTable({
2294
2459
  }
2295
2460
  );
2296
2461
  if (action.confirm) {
2297
- actionElement = /* @__PURE__ */ jsx8(
2462
+ actionElement = /* @__PURE__ */ jsx9(
2298
2463
  Popconfirm,
2299
2464
  {
2300
2465
  title: typeof action.confirm === "string" ? action.confirm : `${action.label}\u3057\u307E\u3059\u304B\uFF1F`,
@@ -2311,7 +2476,7 @@ function ProTable({
2311
2476
  }
2312
2477
  return /* @__PURE__ */ jsxs6("span", { children: [
2313
2478
  actionElement,
2314
- !isLast && /* @__PURE__ */ jsx8(Divider, { type: "vertical" })
2479
+ !isLast && /* @__PURE__ */ jsx9(Divider, { type: "vertical" })
2315
2480
  ] }, idx);
2316
2481
  }) });
2317
2482
  }
@@ -2331,7 +2496,7 @@ function ProTable({
2331
2496
  };
2332
2497
  }, [pagination, meta, queryParams, texts]);
2333
2498
  return /* @__PURE__ */ jsxs6("div", { className, style, children: [
2334
- searchFields.length > 0 && /* @__PURE__ */ jsx8(Card, { style: { marginBottom: 24, ...cardStyle }, children: /* @__PURE__ */ jsxs6(
2499
+ searchFields.length > 0 && /* @__PURE__ */ jsx9(Card, { style: { marginBottom: 24, ...cardStyle }, children: /* @__PURE__ */ jsxs6(
2335
2500
  Form2,
2336
2501
  {
2337
2502
  form: searchForm,
@@ -2342,10 +2507,10 @@ function ProTable({
2342
2507
  initialValues: defaultSearchValues,
2343
2508
  children: [
2344
2509
  /* @__PURE__ */ jsxs6(Row, { gutter: 24, children: [
2345
- visibleFields.map((field) => /* @__PURE__ */ jsx8(Col, { span: 8, children: /* @__PURE__ */ jsx8(Form2.Item, { name: field.name, label: field.label, children: renderSearchField(field, texts) }) }, field.name)),
2346
- /* @__PURE__ */ jsx8(Col, { span: visibleFields.length === 1 ? 16 : 8, style: { textAlign: "right" }, children: /* @__PURE__ */ jsxs6(Space4, { children: [
2347
- /* @__PURE__ */ jsx8(Button3, { onClick: handleReset, children: texts.reset }),
2348
- /* @__PURE__ */ jsx8(Button3, { type: "primary", htmlType: "submit", children: texts.search }),
2510
+ visibleFields.map((field) => /* @__PURE__ */ jsx9(Col, { span: 8, children: /* @__PURE__ */ jsx9(Form2.Item, { name: field.name, label: field.label, children: renderSearchField(field, texts) }) }, field.name)),
2511
+ /* @__PURE__ */ jsx9(Col, { span: visibleFields.length === 1 ? 16 : 8, style: { textAlign: "right" }, children: /* @__PURE__ */ jsxs6(Space4, { children: [
2512
+ /* @__PURE__ */ jsx9(Button3, { onClick: handleReset, children: texts.reset }),
2513
+ /* @__PURE__ */ jsx9(Button3, { type: "primary", htmlType: "submit", children: texts.search }),
2349
2514
  hasHiddenFields && /* @__PURE__ */ jsxs6(
2350
2515
  Button3,
2351
2516
  {
@@ -2353,23 +2518,23 @@ function ProTable({
2353
2518
  onClick: () => setExpanded(!expanded),
2354
2519
  children: [
2355
2520
  expanded ? texts.collapse : texts.expand,
2356
- expanded ? /* @__PURE__ */ jsx8(UpOutlined, {}) : /* @__PURE__ */ jsx8(DownOutlined, {})
2521
+ expanded ? /* @__PURE__ */ jsx9(UpOutlined, {}) : /* @__PURE__ */ jsx9(DownOutlined, {})
2357
2522
  ]
2358
2523
  }
2359
2524
  )
2360
2525
  ] }) })
2361
2526
  ] }),
2362
- expanded && hiddenFields.length > 0 && /* @__PURE__ */ jsx8(Row, { gutter: 24, style: { marginTop: 16 }, children: hiddenFields.map((field) => /* @__PURE__ */ jsx8(Col, { span: 8, children: /* @__PURE__ */ jsx8(Form2.Item, { name: field.name, label: field.label, children: renderSearchField(field, texts) }) }, field.name)) })
2527
+ expanded && hiddenFields.length > 0 && /* @__PURE__ */ jsx9(Row, { gutter: 24, style: { marginTop: 16 }, children: hiddenFields.map((field) => /* @__PURE__ */ jsx9(Col, { span: 8, children: /* @__PURE__ */ jsx9(Form2.Item, { name: field.name, label: field.label, children: renderSearchField(field, texts) }) }, field.name)) })
2363
2528
  ]
2364
2529
  }
2365
2530
  ) }),
2366
- /* @__PURE__ */ jsx8(
2531
+ /* @__PURE__ */ jsx9(
2367
2532
  Card,
2368
2533
  {
2369
2534
  title: /* @__PURE__ */ jsxs6(Space4, { children: [
2370
2535
  icon,
2371
2536
  title,
2372
- subTitle && /* @__PURE__ */ jsx8("span", { style: {
2537
+ subTitle && /* @__PURE__ */ jsx9("span", { style: {
2373
2538
  fontWeight: "normal",
2374
2539
  fontSize: 14,
2375
2540
  color: token.colorTextSecondary
@@ -2377,20 +2542,20 @@ function ProTable({
2377
2542
  ] }),
2378
2543
  extra: /* @__PURE__ */ jsxs6(Space4, { size: "small", children: [
2379
2544
  toolbarExtra,
2380
- addButtonLink && /* @__PURE__ */ jsx8(SmartLink, { href: addButtonLink, children: /* @__PURE__ */ jsx8(Button3, { type: "primary", icon: /* @__PURE__ */ jsx8(PlusOutlined, {}), children: addLabel || texts.add }) }),
2381
- onAdd && !addButtonLink && /* @__PURE__ */ jsx8(Button3, { type: "primary", icon: /* @__PURE__ */ jsx8(PlusOutlined, {}), onClick: onAdd, children: addLabel || texts.add }),
2382
- showRefresh && /* @__PURE__ */ jsx8(Tooltip, { title: texts.refresh, children: /* @__PURE__ */ jsx8(
2545
+ addButtonLink && /* @__PURE__ */ jsx9(SmartLink, { href: addButtonLink, children: /* @__PURE__ */ jsx9(Button3, { type: "primary", icon: /* @__PURE__ */ jsx9(PlusOutlined, {}), children: addLabel || texts.add }) }),
2546
+ onAdd && !addButtonLink && /* @__PURE__ */ jsx9(Button3, { type: "primary", icon: /* @__PURE__ */ jsx9(PlusOutlined, {}), onClick: onAdd, children: addLabel || texts.add }),
2547
+ showRefresh && /* @__PURE__ */ jsx9(Tooltip, { title: texts.refresh, children: /* @__PURE__ */ jsx9(
2383
2548
  Button3,
2384
2549
  {
2385
- icon: /* @__PURE__ */ jsx8(ReloadOutlined, {}),
2550
+ icon: /* @__PURE__ */ jsx9(ReloadOutlined, {}),
2386
2551
  onClick: () => queryResult.refetch?.(),
2387
2552
  loading: queryResult.isFetching
2388
2553
  }
2389
2554
  ) }),
2390
- showColumnSettings && /* @__PURE__ */ jsx8(Tooltip, { title: texts.columnSettings, children: /* @__PURE__ */ jsx8(Button3, { icon: /* @__PURE__ */ jsx8(SettingOutlined, {}) }) })
2555
+ showColumnSettings && /* @__PURE__ */ jsx9(Tooltip, { title: texts.columnSettings, children: /* @__PURE__ */ jsx9(Button3, { icon: /* @__PURE__ */ jsx9(SettingOutlined, {}) }) })
2391
2556
  ] }),
2392
2557
  style: cardStyle,
2393
- children: /* @__PURE__ */ jsx8(
2558
+ children: /* @__PURE__ */ jsx9(
2394
2559
  Table,
2395
2560
  {
2396
2561
  ...tableProps,
@@ -2409,7 +2574,7 @@ function ProTable({
2409
2574
 
2410
2575
  // src/ant/components/PageContainer/PageContainer.tsx
2411
2576
  import { Breadcrumb, theme as theme2 } from "antd";
2412
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
2577
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
2413
2578
  function PageContainer({
2414
2579
  title,
2415
2580
  subTitle,
@@ -2432,7 +2597,7 @@ function PageContainer({
2432
2597
  marginBottom: 24
2433
2598
  },
2434
2599
  children: [
2435
- breadcrumbProps && /* @__PURE__ */ jsx9(
2600
+ breadcrumbProps && /* @__PURE__ */ jsx10(
2436
2601
  Breadcrumb,
2437
2602
  {
2438
2603
  ...breadcrumbProps,
@@ -2466,12 +2631,12 @@ function PageContainer({
2466
2631
  gap: 8
2467
2632
  },
2468
2633
  children: [
2469
- icon && /* @__PURE__ */ jsx9("span", { style: { fontSize: 20 }, children: icon }),
2634
+ icon && /* @__PURE__ */ jsx10("span", { style: { fontSize: 20 }, children: icon }),
2470
2635
  title
2471
2636
  ]
2472
2637
  }
2473
2638
  ),
2474
- subTitle && /* @__PURE__ */ jsx9(
2639
+ subTitle && /* @__PURE__ */ jsx10(
2475
2640
  "div",
2476
2641
  {
2477
2642
  style: {
@@ -2483,7 +2648,7 @@ function PageContainer({
2483
2648
  }
2484
2649
  )
2485
2650
  ] }),
2486
- extra && /* @__PURE__ */ jsx9("div", { style: { flexShrink: 0 }, children: extra })
2651
+ extra && /* @__PURE__ */ jsx10("div", { style: { flexShrink: 0 }, children: extra })
2487
2652
  ]
2488
2653
  }
2489
2654
  )
@@ -2496,14 +2661,14 @@ function PageContainer({
2496
2661
 
2497
2662
  // src/ant/components/LocaleSwitcher/LocaleSwitcher.tsx
2498
2663
  import { GlobalOutlined } from "@ant-design/icons";
2499
- import { Select as Select4 } from "antd";
2664
+ import { Select as Select5 } from "antd";
2500
2665
  import { useTranslation as useTranslation2 } from "react-i18next";
2501
2666
 
2502
2667
  // src/core/i18n/index.tsx
2503
- import { createContext as createContext3, useContext as useContext3, useCallback as useCallback8, useState as useState7, useEffect as useEffect7, useMemo as useMemo8 } from "react";
2668
+ import { createContext as createContext3, useContext as useContext3, useCallback as useCallback8, useState as useState8, useEffect as useEffect8, useMemo as useMemo8 } from "react";
2504
2669
  import { useTranslation, I18nextProvider, initReactI18next } from "react-i18next";
2505
2670
  import i18n from "i18next";
2506
- import { jsx as jsx10 } from "react/jsx-runtime";
2671
+ import { jsx as jsx11 } from "react/jsx-runtime";
2507
2672
  var locales = ["ja", "en", "vi"];
2508
2673
  var localeNames = {
2509
2674
  ja: "\u65E5\u672C\u8A9E",
@@ -2521,7 +2686,7 @@ function initializeI18n(initialLocale, fallbackLocale2, translations) {
2521
2686
  for (const locale of locales) {
2522
2687
  resources[locale] = {
2523
2688
  translation: {
2524
- ...defaultTranslations[locale],
2689
+ ...defaultTranslations2[locale],
2525
2690
  ...translations?.[locale] || {}
2526
2691
  }
2527
2692
  };
@@ -2550,13 +2715,13 @@ function I18nProvider({
2550
2715
  () => initializeI18n(initialLocale, fallbackLocale2, translations),
2551
2716
  [initialLocale, fallbackLocale2, translations]
2552
2717
  );
2553
- return /* @__PURE__ */ jsx10(I18nextProvider, { i18n: i18nInstance, children: /* @__PURE__ */ jsx10(I18nProviderInner, { initialLocale, children }) });
2718
+ return /* @__PURE__ */ jsx11(I18nextProvider, { i18n: i18nInstance, children: /* @__PURE__ */ jsx11(I18nProviderInner, { initialLocale, children }) });
2554
2719
  }
2555
2720
  function I18nProviderInner({
2556
2721
  children,
2557
2722
  initialLocale
2558
2723
  }) {
2559
- const [locale, setLocaleState] = useState7(initialLocale);
2724
+ const [locale, setLocaleState] = useState8(initialLocale);
2560
2725
  const { t: translate, i18n: i18nInstance } = useTranslation();
2561
2726
  const setLocale = useCallback8((newLocale) => {
2562
2727
  setLocaleState(newLocale);
@@ -2568,7 +2733,7 @@ function I18nProviderInner({
2568
2733
  const t = useCallback8((key, options) => {
2569
2734
  return String(translate(key, options));
2570
2735
  }, [translate]);
2571
- useEffect7(() => {
2736
+ useEffect8(() => {
2572
2737
  if (typeof document !== "undefined") {
2573
2738
  const cookieLocale = document.cookie.split("; ").find((row) => row.startsWith("locale="))?.split("=")[1];
2574
2739
  if (cookieLocale && locales.includes(cookieLocale)) {
@@ -2576,7 +2741,7 @@ function I18nProviderInner({
2576
2741
  }
2577
2742
  }
2578
2743
  }, [setLocale]);
2579
- return /* @__PURE__ */ jsx10(I18nContext.Provider, { value: { locale, setLocale, t }, children });
2744
+ return /* @__PURE__ */ jsx11(I18nContext.Provider, { value: { locale, setLocale, t }, children });
2580
2745
  }
2581
2746
  function useLocale() {
2582
2747
  const context = useContext3(I18nContext);
@@ -2609,7 +2774,7 @@ function changeLanguage(locale) {
2609
2774
  }
2610
2775
  }
2611
2776
  var ssoNamespace = "sso";
2612
- var defaultTranslations = {
2777
+ var defaultTranslations2 = {
2613
2778
  ja: {
2614
2779
  login: "\u30ED\u30B0\u30A4\u30F3",
2615
2780
  logout: "\u30ED\u30B0\u30A2\u30A6\u30C8",
@@ -2661,7 +2826,7 @@ var defaultTranslations = {
2661
2826
  };
2662
2827
 
2663
2828
  // src/ant/components/LocaleSwitcher/LocaleSwitcher.tsx
2664
- import { jsx as jsx11 } from "react/jsx-runtime";
2829
+ import { jsx as jsx12 } from "react/jsx-runtime";
2665
2830
  function LocaleSwitcher() {
2666
2831
  const { i18n: i18n2 } = useTranslation2();
2667
2832
  const locale = i18n2.language || "ja";
@@ -2669,14 +2834,14 @@ function LocaleSwitcher() {
2669
2834
  i18n2.changeLanguage(newLocale);
2670
2835
  document.cookie = `locale=${newLocale};path=/;max-age=31536000`;
2671
2836
  };
2672
- return /* @__PURE__ */ jsx11(
2673
- Select4,
2837
+ return /* @__PURE__ */ jsx12(
2838
+ Select5,
2674
2839
  {
2675
2840
  value: locale,
2676
2841
  onChange: handleChange,
2677
2842
  style: { width: 100 },
2678
2843
  size: "small",
2679
- suffixIcon: /* @__PURE__ */ jsx11(GlobalOutlined, {}),
2844
+ suffixIcon: /* @__PURE__ */ jsx12(GlobalOutlined, {}),
2680
2845
  options: locales.map((l) => ({
2681
2846
  value: l,
2682
2847
  label: localeNames[l]
@@ -2691,29 +2856,29 @@ import {
2691
2856
  BankOutlined as BankOutlined4
2692
2857
  } from "@ant-design/icons";
2693
2858
  import {
2694
- Modal as Modal3,
2859
+ Modal as Modal4,
2695
2860
  Form as Form3,
2696
- Select as Select5,
2861
+ Select as Select6,
2697
2862
  Radio,
2698
2863
  Button as Button4,
2699
2864
  Space as Space7,
2700
2865
  Tag as Tag2,
2701
- Typography as Typography5
2866
+ Typography as Typography6
2702
2867
  } from "antd";
2703
- import { useState as useState8 } from "react";
2868
+ import { useState as useState9 } from "react";
2704
2869
 
2705
2870
  // src/ant/components/ScopeUtils/ScopeUtils.tsx
2706
2871
  import { GlobalOutlined as GlobalOutlined2, BankOutlined as BankOutlined3, BranchesOutlined } from "@ant-design/icons";
2707
2872
  import { Tag, Space as Space6 } from "antd";
2708
- import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
2873
+ import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
2709
2874
  function getScopeIcon(scope) {
2710
2875
  switch (scope) {
2711
2876
  case "global":
2712
- return /* @__PURE__ */ jsx12(GlobalOutlined2, {});
2877
+ return /* @__PURE__ */ jsx13(GlobalOutlined2, {});
2713
2878
  case "org-wide":
2714
- return /* @__PURE__ */ jsx12(BankOutlined3, {});
2879
+ return /* @__PURE__ */ jsx13(BankOutlined3, {});
2715
2880
  case "branch":
2716
- return /* @__PURE__ */ jsx12(BranchesOutlined, {});
2881
+ return /* @__PURE__ */ jsx13(BranchesOutlined, {});
2717
2882
  default:
2718
2883
  return null;
2719
2884
  }
@@ -2731,7 +2896,7 @@ function getScopeColor(scope) {
2731
2896
  }
2732
2897
  }
2733
2898
  function ScopeTag({ scope, label, showIcon = true }) {
2734
- return /* @__PURE__ */ jsx12(Tag, { color: getScopeColor(scope), icon: showIcon ? getScopeIcon(scope) : void 0, children: label || scope });
2899
+ return /* @__PURE__ */ jsx13(Tag, { color: getScopeColor(scope), icon: showIcon ? getScopeIcon(scope) : void 0, children: label || scope });
2735
2900
  }
2736
2901
  function ScopeLabel({ scope, label }) {
2737
2902
  return /* @__PURE__ */ jsxs8(Space6, { children: [
@@ -2741,9 +2906,9 @@ function ScopeLabel({ scope, label }) {
2741
2906
  }
2742
2907
 
2743
2908
  // src/ant/components/UserRoleAssignModal/UserRoleAssignModal.tsx
2744
- import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
2745
- var { Text: Text4 } = Typography5;
2746
- var defaultTranslations2 = {
2909
+ import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
2910
+ var { Text: Text5 } = Typography6;
2911
+ var defaultTranslations3 = {
2747
2912
  title: "\u30ED\u30FC\u30EB\u5272\u308A\u5F53\u3066",
2748
2913
  selectRole: "\u30ED\u30FC\u30EB\u3092\u9078\u629E",
2749
2914
  scope: "\u30B9\u30B3\u30FC\u30D7",
@@ -2770,8 +2935,8 @@ function UserRoleAssignModal({
2770
2935
  translations: t = {}
2771
2936
  }) {
2772
2937
  const [form] = Form3.useForm();
2773
- const [isSubmitting, setIsSubmitting] = useState8(false);
2774
- const labels = { ...defaultTranslations2, ...t };
2938
+ const [isSubmitting, setIsSubmitting] = useState9(false);
2939
+ const labels = { ...defaultTranslations3, ...t };
2775
2940
  const handleFinish = async (values) => {
2776
2941
  setIsSubmitting(true);
2777
2942
  try {
@@ -2785,11 +2950,11 @@ function UserRoleAssignModal({
2785
2950
  form.resetFields();
2786
2951
  onCancel();
2787
2952
  };
2788
- return /* @__PURE__ */ jsx13(
2789
- Modal3,
2953
+ return /* @__PURE__ */ jsx14(
2954
+ Modal4,
2790
2955
  {
2791
2956
  title: /* @__PURE__ */ jsxs9(Space7, { children: [
2792
- /* @__PURE__ */ jsx13(SafetyOutlined, {}),
2957
+ /* @__PURE__ */ jsx14(SafetyOutlined, {}),
2793
2958
  labels.title,
2794
2959
  " ",
2795
2960
  userName ? `- ${userName}` : ""
@@ -2806,42 +2971,42 @@ function UserRoleAssignModal({
2806
2971
  onFinish: handleFinish,
2807
2972
  initialValues: { scope: "org-wide", org_id: currentOrgId },
2808
2973
  children: [
2809
- /* @__PURE__ */ jsx13(
2974
+ /* @__PURE__ */ jsx14(
2810
2975
  Form3.Item,
2811
2976
  {
2812
2977
  name: "role_id",
2813
2978
  label: labels.selectRole,
2814
2979
  rules: [{ required: true, message: labels.required }],
2815
- children: /* @__PURE__ */ jsx13(Select5, { placeholder: labels.selectRole, children: roles.map((role) => /* @__PURE__ */ jsx13(Select5.Option, { value: role.id, children: role.name }, role.id)) })
2980
+ children: /* @__PURE__ */ jsx14(Select6, { placeholder: labels.selectRole, children: roles.map((role) => /* @__PURE__ */ jsx14(Select6.Option, { value: role.id, children: role.name }, role.id)) })
2816
2981
  }
2817
2982
  ),
2818
- /* @__PURE__ */ jsx13(Form3.Item, { name: "scope", label: labels.scope, children: /* @__PURE__ */ jsxs9(Radio.Group, { children: [
2819
- /* @__PURE__ */ jsx13(Radio, { value: "global", children: /* @__PURE__ */ jsx13(ScopeLabel, { scope: "global", label: labels.global }) }),
2820
- /* @__PURE__ */ jsx13(Radio, { value: "org-wide", children: /* @__PURE__ */ jsx13(ScopeLabel, { scope: "org-wide", label: labels.orgWide }) }),
2821
- /* @__PURE__ */ jsx13(Radio, { value: "branch", children: /* @__PURE__ */ jsx13(ScopeLabel, { scope: "branch", label: labels.branchSpecific }) })
2983
+ /* @__PURE__ */ jsx14(Form3.Item, { name: "scope", label: labels.scope, children: /* @__PURE__ */ jsxs9(Radio.Group, { children: [
2984
+ /* @__PURE__ */ jsx14(Radio, { value: "global", children: /* @__PURE__ */ jsx14(ScopeLabel, { scope: "global", label: labels.global }) }),
2985
+ /* @__PURE__ */ jsx14(Radio, { value: "org-wide", children: /* @__PURE__ */ jsx14(ScopeLabel, { scope: "org-wide", label: labels.orgWide }) }),
2986
+ /* @__PURE__ */ jsx14(Radio, { value: "branch", children: /* @__PURE__ */ jsx14(ScopeLabel, { scope: "branch", label: labels.branchSpecific }) })
2822
2987
  ] }) }),
2823
- /* @__PURE__ */ jsx13(Form3.Item, { noStyle: true, shouldUpdate: (prev, curr) => prev.scope !== curr.scope, children: ({ getFieldValue }) => (getFieldValue("scope") === "org-wide" || getFieldValue("scope") === "branch") && /* @__PURE__ */ jsx13(
2988
+ /* @__PURE__ */ jsx14(Form3.Item, { noStyle: true, shouldUpdate: (prev, curr) => prev.scope !== curr.scope, children: ({ getFieldValue }) => (getFieldValue("scope") === "org-wide" || getFieldValue("scope") === "branch") && /* @__PURE__ */ jsx14(
2824
2989
  Form3.Item,
2825
2990
  {
2826
2991
  name: "org_id",
2827
2992
  label: labels.organization,
2828
2993
  rules: [{ required: true, message: labels.required }],
2829
- children: /* @__PURE__ */ jsx13(Select5, { placeholder: labels.organization, children: organizations.map((org) => /* @__PURE__ */ jsx13(Select5.Option, { value: String(org.id), children: /* @__PURE__ */ jsxs9(Space7, { children: [
2830
- /* @__PURE__ */ jsx13(BankOutlined4, {}),
2994
+ children: /* @__PURE__ */ jsx14(Select6, { placeholder: labels.organization, children: organizations.map((org) => /* @__PURE__ */ jsx14(Select6.Option, { value: String(org.id), children: /* @__PURE__ */ jsxs9(Space7, { children: [
2995
+ /* @__PURE__ */ jsx14(BankOutlined4, {}),
2831
2996
  org.name
2832
2997
  ] }) }, org.id)) })
2833
2998
  }
2834
2999
  ) }),
2835
- /* @__PURE__ */ jsx13(Form3.Item, { noStyle: true, shouldUpdate: (prev, curr) => prev.scope !== curr.scope, children: ({ getFieldValue }) => getFieldValue("scope") === "branch" && /* @__PURE__ */ jsx13(
3000
+ /* @__PURE__ */ jsx14(Form3.Item, { noStyle: true, shouldUpdate: (prev, curr) => prev.scope !== curr.scope, children: ({ getFieldValue }) => getFieldValue("scope") === "branch" && /* @__PURE__ */ jsx14(
2836
3001
  Form3.Item,
2837
3002
  {
2838
3003
  name: "branch_ids",
2839
3004
  label: labels.selectBranches,
2840
3005
  rules: [{ required: true, message: labels.required }],
2841
- children: /* @__PURE__ */ jsx13(Select5, { mode: "multiple", placeholder: labels.selectBranches, children: branches?.map((branch) => /* @__PURE__ */ jsx13(Select5.Option, { value: String(branch.id), children: branch.name }, branch.id)) })
3006
+ children: /* @__PURE__ */ jsx14(Select6, { mode: "multiple", placeholder: labels.selectBranches, children: branches?.map((branch) => /* @__PURE__ */ jsx14(Select6.Option, { value: String(branch.id), children: branch.name }, branch.id)) })
2842
3007
  }
2843
3008
  ) }),
2844
- /* @__PURE__ */ jsx13(Form3.Item, { noStyle: true, shouldUpdate: true, children: ({ getFieldValue }) => {
3009
+ /* @__PURE__ */ jsx14(Form3.Item, { noStyle: true, shouldUpdate: true, children: ({ getFieldValue }) => {
2845
3010
  const scope = getFieldValue("scope");
2846
3011
  const selectedOrgId = getFieldValue("org_id");
2847
3012
  const selectedBranchIds = getFieldValue("branch_ids") || [];
@@ -2857,7 +3022,7 @@ function UserRoleAssignModal({
2857
3022
  } else if (scope === "branch" && selectedBranches.length > 0) {
2858
3023
  scopeText = selectedBranches.map((b) => b.name).join(", ");
2859
3024
  }
2860
- return scopeText ? /* @__PURE__ */ jsx13(
3025
+ return scopeText ? /* @__PURE__ */ jsx14(
2861
3026
  "div",
2862
3027
  {
2863
3028
  style: {
@@ -2866,19 +3031,19 @@ function UserRoleAssignModal({
2866
3031
  borderRadius: 4,
2867
3032
  marginBottom: 16
2868
3033
  },
2869
- children: /* @__PURE__ */ jsxs9(Text4, { type: "secondary", children: [
3034
+ children: /* @__PURE__ */ jsxs9(Text5, { type: "secondary", children: [
2870
3035
  labels.assignRole,
2871
3036
  ": ",
2872
- /* @__PURE__ */ jsx13(Text4, { strong: true, children: selectedRole.name }),
3037
+ /* @__PURE__ */ jsx14(Text5, { strong: true, children: selectedRole.name }),
2873
3038
  " \u2192 ",
2874
- /* @__PURE__ */ jsx13(Tag2, { color: getScopeColor(scope), children: scopeText })
3039
+ /* @__PURE__ */ jsx14(Tag2, { color: getScopeColor(scope), children: scopeText })
2875
3040
  ] })
2876
3041
  }
2877
3042
  ) : null;
2878
3043
  } }),
2879
- /* @__PURE__ */ jsx13(Form3.Item, { children: /* @__PURE__ */ jsxs9(Space7, { children: [
2880
- /* @__PURE__ */ jsx13(Button4, { type: "primary", htmlType: "submit", loading: loading || isSubmitting, children: labels.assign }),
2881
- /* @__PURE__ */ jsx13(Button4, { onClick: handleCancel, children: labels.cancel })
3044
+ /* @__PURE__ */ jsx14(Form3.Item, { children: /* @__PURE__ */ jsxs9(Space7, { children: [
3045
+ /* @__PURE__ */ jsx14(Button4, { type: "primary", htmlType: "submit", loading: loading || isSubmitting, children: labels.assign }),
3046
+ /* @__PURE__ */ jsx14(Button4, { onClick: handleCancel, children: labels.cancel })
2882
3047
  ] }) })
2883
3048
  ]
2884
3049
  }
@@ -2899,20 +3064,20 @@ import {
2899
3064
  DeleteOutlined
2900
3065
  } from "@ant-design/icons";
2901
3066
  import {
2902
- Modal as Modal4,
3067
+ Modal as Modal5,
2903
3068
  Card as Card2,
2904
3069
  Tag as Tag3,
2905
3070
  Space as Space8,
2906
3071
  Collapse,
2907
3072
  Empty,
2908
- Spin as Spin3,
3073
+ Spin as Spin4,
2909
3074
  Button as Button5,
2910
3075
  Popconfirm as Popconfirm2,
2911
- Typography as Typography6
3076
+ Typography as Typography7
2912
3077
  } from "antd";
2913
- import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
2914
- var { Text: Text5 } = Typography6;
2915
- var defaultTranslations3 = {
3078
+ import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
3079
+ var { Text: Text6 } = Typography7;
3080
+ var defaultTranslations4 = {
2916
3081
  permissionBreakdown: "\u6A29\u9650\u30D6\u30EC\u30FC\u30AF\u30C0\u30A6\u30F3",
2917
3082
  userInfo: "\u30E6\u30FC\u30B6\u30FC\u60C5\u5831",
2918
3083
  email: "\u30E1\u30FC\u30EB",
@@ -2947,17 +3112,17 @@ function UserPermissionsModal({
2947
3112
  onRemoveRole,
2948
3113
  translations: t = {}
2949
3114
  }) {
2950
- const labels = { ...defaultTranslations3, ...t };
3115
+ const labels = { ...defaultTranslations4, ...t };
2951
3116
  const getBranchName = (branchId) => {
2952
3117
  if (!branchId || !branches) return "";
2953
3118
  const branch = branches.find((b) => String(b.id) === branchId);
2954
3119
  return branch?.name || branchId;
2955
3120
  };
2956
- return /* @__PURE__ */ jsx14(
2957
- Modal4,
3121
+ return /* @__PURE__ */ jsx15(
3122
+ Modal5,
2958
3123
  {
2959
3124
  title: /* @__PURE__ */ jsxs10(Space8, { children: [
2960
- /* @__PURE__ */ jsx14(UserOutlined, {}),
3125
+ /* @__PURE__ */ jsx15(UserOutlined, {}),
2961
3126
  userName,
2962
3127
  " - ",
2963
3128
  labels.permissionBreakdown
@@ -2967,53 +3132,53 @@ function UserPermissionsModal({
2967
3132
  footer: null,
2968
3133
  width: 800,
2969
3134
  destroyOnHidden: true,
2970
- children: loading ? /* @__PURE__ */ jsx14("div", { style: { textAlign: "center", padding: 40 }, children: /* @__PURE__ */ jsx14(Spin3, { size: "large" }) }) : permissions ? /* @__PURE__ */ jsxs10("div", { style: { display: "flex", flexDirection: "column", gap: 16 }, children: [
2971
- /* @__PURE__ */ jsx14(Card2, { size: "small", title: labels.userInfo, children: /* @__PURE__ */ jsxs10("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
3135
+ children: loading ? /* @__PURE__ */ jsx15("div", { style: { textAlign: "center", padding: 40 }, children: /* @__PURE__ */ jsx15(Spin4, { size: "large" }) }) : permissions ? /* @__PURE__ */ jsxs10("div", { style: { display: "flex", flexDirection: "column", gap: 16 }, children: [
3136
+ /* @__PURE__ */ jsx15(Card2, { size: "small", title: labels.userInfo, children: /* @__PURE__ */ jsxs10("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
2972
3137
  /* @__PURE__ */ jsxs10("div", { children: [
2973
- /* @__PURE__ */ jsxs10(Text5, { type: "secondary", children: [
3138
+ /* @__PURE__ */ jsxs10(Text6, { type: "secondary", children: [
2974
3139
  labels.email,
2975
3140
  ": "
2976
3141
  ] }),
2977
- /* @__PURE__ */ jsx14(Text5, { children: permissions.user?.email })
3142
+ /* @__PURE__ */ jsx15(Text6, { children: permissions.user?.email })
2978
3143
  ] }),
2979
3144
  /* @__PURE__ */ jsxs10("div", { children: [
2980
- /* @__PURE__ */ jsxs10(Text5, { type: "secondary", children: [
3145
+ /* @__PURE__ */ jsxs10(Text6, { type: "secondary", children: [
2981
3146
  labels.primaryOrganization,
2982
3147
  ": "
2983
3148
  ] }),
2984
- permissions.user?.organization ? /* @__PURE__ */ jsx14(Tag3, { icon: /* @__PURE__ */ jsx14(BankOutlined5, {}), color: "blue", children: permissions.user.organization.name }) : /* @__PURE__ */ jsx14(Tag3, { icon: /* @__PURE__ */ jsx14(GlobalOutlined4, {}), color: "purple", children: labels.global })
3149
+ permissions.user?.organization ? /* @__PURE__ */ jsx15(Tag3, { icon: /* @__PURE__ */ jsx15(BankOutlined5, {}), color: "blue", children: permissions.user.organization.name }) : /* @__PURE__ */ jsx15(Tag3, { icon: /* @__PURE__ */ jsx15(GlobalOutlined4, {}), color: "purple", children: labels.global })
2985
3150
  ] })
2986
3151
  ] }) }),
2987
- /* @__PURE__ */ jsx14(Card2, { size: "small", title: labels.currentContext, children: /* @__PURE__ */ jsxs10(Space8, { wrap: true, children: [
2988
- currentOrg && /* @__PURE__ */ jsx14(Tag3, { icon: /* @__PURE__ */ jsx14(BankOutlined5, {}), color: "blue", children: currentOrg.name }),
2989
- currentBranch && /* @__PURE__ */ jsx14(Tag3, { icon: /* @__PURE__ */ jsx14(BranchesOutlined3, {}), color: "green", children: currentBranch.name })
3152
+ /* @__PURE__ */ jsx15(Card2, { size: "small", title: labels.currentContext, children: /* @__PURE__ */ jsxs10(Space8, { wrap: true, children: [
3153
+ currentOrg && /* @__PURE__ */ jsx15(Tag3, { icon: /* @__PURE__ */ jsx15(BankOutlined5, {}), color: "blue", children: currentOrg.name }),
3154
+ currentBranch && /* @__PURE__ */ jsx15(Tag3, { icon: /* @__PURE__ */ jsx15(BranchesOutlined3, {}), color: "green", children: currentBranch.name })
2990
3155
  ] }) }),
2991
- /* @__PURE__ */ jsx14(
3156
+ /* @__PURE__ */ jsx15(
2992
3157
  Card2,
2993
3158
  {
2994
3159
  size: "small",
2995
3160
  title: /* @__PURE__ */ jsxs10(Space8, { children: [
2996
- /* @__PURE__ */ jsx14(SafetyOutlined2, {}),
3161
+ /* @__PURE__ */ jsx15(SafetyOutlined2, {}),
2997
3162
  labels.roleAssignments,
2998
3163
  " (",
2999
3164
  permissions.role_assignments.length,
3000
3165
  ")"
3001
3166
  ] }),
3002
- extra: onAddRole && /* @__PURE__ */ jsx14(Button5, { type: "primary", size: "small", icon: /* @__PURE__ */ jsx14(PlusOutlined2, {}), onClick: onAddRole, children: labels.add }),
3003
- children: permissions.role_assignments.length === 0 ? /* @__PURE__ */ jsx14(Empty, { description: labels.noRolesAssigned }) : /* @__PURE__ */ jsx14(Collapse, { ghost: true, children: permissions.role_assignments.map((assignment, index) => /* @__PURE__ */ jsx14(
3167
+ extra: onAddRole && /* @__PURE__ */ jsx15(Button5, { type: "primary", size: "small", icon: /* @__PURE__ */ jsx15(PlusOutlined2, {}), onClick: onAddRole, children: labels.add }),
3168
+ children: permissions.role_assignments.length === 0 ? /* @__PURE__ */ jsx15(Empty, { description: labels.noRolesAssigned }) : /* @__PURE__ */ jsx15(Collapse, { ghost: true, children: permissions.role_assignments.map((assignment, index) => /* @__PURE__ */ jsx15(
3004
3169
  Collapse.Panel,
3005
3170
  {
3006
3171
  header: /* @__PURE__ */ jsxs10(Space8, { wrap: true, children: [
3007
3172
  getScopeIcon(assignment.scope),
3008
- /* @__PURE__ */ jsx14(Text5, { strong: true, children: assignment.role.name }),
3009
- /* @__PURE__ */ jsx14(Tag3, { color: getScopeColor(assignment.scope), children: assignment.scope === "global" ? labels.global : assignment.scope === "org-wide" ? assignment.org_name || labels.orgWide : assignment.branch_name || getBranchName(assignment.console_branch_id) }),
3010
- assignment.scope === "branch" && assignment.org_name && /* @__PURE__ */ jsx14(Tag3, { color: "blue", icon: /* @__PURE__ */ jsx14(BankOutlined5, {}), children: assignment.org_name }),
3173
+ /* @__PURE__ */ jsx15(Text6, { strong: true, children: assignment.role.name }),
3174
+ /* @__PURE__ */ jsx15(Tag3, { color: getScopeColor(assignment.scope), children: assignment.scope === "global" ? labels.global : assignment.scope === "org-wide" ? assignment.org_name || labels.orgWide : assignment.branch_name || getBranchName(assignment.console_branch_id) }),
3175
+ assignment.scope === "branch" && assignment.org_name && /* @__PURE__ */ jsx15(Tag3, { color: "blue", icon: /* @__PURE__ */ jsx15(BankOutlined5, {}), children: assignment.org_name }),
3011
3176
  /* @__PURE__ */ jsxs10(Tag3, { children: [
3012
3177
  assignment.permissions.length,
3013
3178
  " ",
3014
3179
  labels.permissions
3015
3180
  ] }),
3016
- onRemoveRole && /* @__PURE__ */ jsx14(
3181
+ onRemoveRole && /* @__PURE__ */ jsx15(
3017
3182
  Popconfirm2,
3018
3183
  {
3019
3184
  title: labels.confirmRemoveRole,
@@ -3024,12 +3189,12 @@ function UserPermissionsModal({
3024
3189
  assignment.console_branch_id
3025
3190
  );
3026
3191
  },
3027
- children: /* @__PURE__ */ jsx14(
3192
+ children: /* @__PURE__ */ jsx15(
3028
3193
  Button5,
3029
3194
  {
3030
3195
  size: "small",
3031
3196
  danger: true,
3032
- icon: /* @__PURE__ */ jsx14(DeleteOutlined, {}),
3197
+ icon: /* @__PURE__ */ jsx15(DeleteOutlined, {}),
3033
3198
  onClick: (e) => e.stopPropagation()
3034
3199
  }
3035
3200
  )
@@ -3047,33 +3212,33 @@ function UserPermissionsModal({
3047
3212
  {}
3048
3213
  )
3049
3214
  ).map(([group, perms]) => /* @__PURE__ */ jsxs10("div", { style: { marginBottom: 8 }, children: [
3050
- /* @__PURE__ */ jsx14(Text5, { type: "secondary", style: { fontSize: 12 }, children: group }),
3051
- /* @__PURE__ */ jsx14("div", { style: { display: "flex", flexWrap: "wrap", gap: 4, marginTop: 4 }, children: perms.map((perm) => /* @__PURE__ */ jsx14(Tag3, { color: "blue", children: perm.name }, perm.slug)) })
3215
+ /* @__PURE__ */ jsx15(Text6, { type: "secondary", style: { fontSize: 12 }, children: group }),
3216
+ /* @__PURE__ */ jsx15("div", { style: { display: "flex", flexWrap: "wrap", gap: 4, marginTop: 4 }, children: perms.map((perm) => /* @__PURE__ */ jsx15(Tag3, { color: "blue", children: perm.name }, perm.slug)) })
3052
3217
  ] }, group))
3053
3218
  },
3054
3219
  index
3055
3220
  )) })
3056
3221
  }
3057
3222
  ),
3058
- /* @__PURE__ */ jsx14(
3223
+ /* @__PURE__ */ jsx15(
3059
3224
  Card2,
3060
3225
  {
3061
3226
  size: "small",
3062
3227
  title: /* @__PURE__ */ jsxs10(Space8, { children: [
3063
- /* @__PURE__ */ jsx14(TeamOutlined, {}),
3228
+ /* @__PURE__ */ jsx15(TeamOutlined, {}),
3064
3229
  labels.teamMemberships,
3065
3230
  " (",
3066
3231
  permissions.team_memberships.length,
3067
3232
  ")"
3068
3233
  ] }),
3069
- extra: onAddTeam && /* @__PURE__ */ jsx14(Button5, { size: "small", icon: /* @__PURE__ */ jsx14(PlusOutlined2, {}), onClick: onAddTeam, children: labels.add }),
3070
- children: permissions.team_memberships.length === 0 ? /* @__PURE__ */ jsx14(Empty, { description: labels.noTeamMemberships }) : /* @__PURE__ */ jsx14(Collapse, { ghost: true, children: permissions.team_memberships.map((membership, index) => /* @__PURE__ */ jsx14(
3234
+ extra: onAddTeam && /* @__PURE__ */ jsx15(Button5, { size: "small", icon: /* @__PURE__ */ jsx15(PlusOutlined2, {}), onClick: onAddTeam, children: labels.add }),
3235
+ children: permissions.team_memberships.length === 0 ? /* @__PURE__ */ jsx15(Empty, { description: labels.noTeamMemberships }) : /* @__PURE__ */ jsx15(Collapse, { ghost: true, children: permissions.team_memberships.map((membership, index) => /* @__PURE__ */ jsx15(
3071
3236
  Collapse.Panel,
3072
3237
  {
3073
3238
  header: /* @__PURE__ */ jsxs10(Space8, { children: [
3074
- /* @__PURE__ */ jsx14(TeamOutlined, {}),
3075
- /* @__PURE__ */ jsx14(Text5, { strong: true, children: membership.team.name }),
3076
- membership.is_leader && /* @__PURE__ */ jsx14(Tag3, { color: "gold", children: labels.teamLeader }),
3239
+ /* @__PURE__ */ jsx15(TeamOutlined, {}),
3240
+ /* @__PURE__ */ jsx15(Text6, { strong: true, children: membership.team.name }),
3241
+ membership.is_leader && /* @__PURE__ */ jsx15(Tag3, { color: "gold", children: labels.teamLeader }),
3077
3242
  /* @__PURE__ */ jsxs10(Tag3, { children: [
3078
3243
  membership.permissions.length,
3079
3244
  " ",
@@ -3091,26 +3256,26 @@ function UserPermissionsModal({
3091
3256
  {}
3092
3257
  )
3093
3258
  ).map(([group, perms]) => /* @__PURE__ */ jsxs10("div", { style: { marginBottom: 8 }, children: [
3094
- /* @__PURE__ */ jsx14(Text5, { type: "secondary", style: { fontSize: 12 }, children: group }),
3095
- /* @__PURE__ */ jsx14("div", { style: { display: "flex", flexWrap: "wrap", gap: 4, marginTop: 4 }, children: perms.map((perm) => /* @__PURE__ */ jsx14(Tag3, { color: "cyan", children: perm.name }, perm.slug)) })
3259
+ /* @__PURE__ */ jsx15(Text6, { type: "secondary", style: { fontSize: 12 }, children: group }),
3260
+ /* @__PURE__ */ jsx15("div", { style: { display: "flex", flexWrap: "wrap", gap: 4, marginTop: 4 }, children: perms.map((perm) => /* @__PURE__ */ jsx15(Tag3, { color: "cyan", children: perm.name }, perm.slug)) })
3096
3261
  ] }, group))
3097
3262
  },
3098
3263
  index
3099
3264
  )) })
3100
3265
  }
3101
3266
  ),
3102
- /* @__PURE__ */ jsx14(
3267
+ /* @__PURE__ */ jsx15(
3103
3268
  Card2,
3104
3269
  {
3105
3270
  size: "small",
3106
3271
  title: /* @__PURE__ */ jsxs10(Space8, { children: [
3107
- /* @__PURE__ */ jsx14(SafetyOutlined2, {}),
3272
+ /* @__PURE__ */ jsx15(SafetyOutlined2, {}),
3108
3273
  labels.aggregatedPermissions,
3109
3274
  " (",
3110
3275
  permissions.aggregated_permissions.length,
3111
3276
  ")"
3112
3277
  ] }),
3113
- children: permissions.aggregated_permissions.length === 0 ? /* @__PURE__ */ jsx14(Empty, { description: labels.noData }) : /* @__PURE__ */ jsx14(Collapse, { ghost: true, children: Object.entries(
3278
+ children: permissions.aggregated_permissions.length === 0 ? /* @__PURE__ */ jsx15(Empty, { description: labels.noData }) : /* @__PURE__ */ jsx15(Collapse, { ghost: true, children: Object.entries(
3114
3279
  permissions.aggregated_permissions.reduce(
3115
3280
  (groups, perm) => {
3116
3281
  const parts = perm.split(".");
@@ -3121,15 +3286,15 @@ function UserPermissionsModal({
3121
3286
  },
3122
3287
  {}
3123
3288
  )
3124
- ).map(([group, perms]) => /* @__PURE__ */ jsx14(
3289
+ ).map(([group, perms]) => /* @__PURE__ */ jsx15(
3125
3290
  Collapse.Panel,
3126
3291
  {
3127
3292
  header: /* @__PURE__ */ jsxs10(Space8, { children: [
3128
- /* @__PURE__ */ jsx14(SafetyOutlined2, {}),
3129
- /* @__PURE__ */ jsx14(Text5, { strong: true, children: group }),
3130
- /* @__PURE__ */ jsx14(Tag3, { color: "green", children: perms.length })
3293
+ /* @__PURE__ */ jsx15(SafetyOutlined2, {}),
3294
+ /* @__PURE__ */ jsx15(Text6, { strong: true, children: group }),
3295
+ /* @__PURE__ */ jsx15(Tag3, { color: "green", children: perms.length })
3131
3296
  ] }),
3132
- children: /* @__PURE__ */ jsx14("div", { style: { display: "flex", flexWrap: "wrap", gap: 4 }, children: perms.map((perm) => /* @__PURE__ */ jsx14(Tag3, { color: "green", children: perm.split(".").pop() }, perm)) })
3297
+ children: /* @__PURE__ */ jsx15("div", { style: { display: "flex", flexWrap: "wrap", gap: 4 }, children: perms.map((perm) => /* @__PURE__ */ jsx15(Tag3, { color: "green", children: perm.split(".").pop() }, perm)) })
3133
3298
  },
3134
3299
  group
3135
3300
  )) })
@@ -3154,21 +3319,21 @@ import {
3154
3319
  } from "@ant-design/icons";
3155
3320
  import {
3156
3321
  Card as Card3,
3157
- Typography as Typography7,
3322
+ Typography as Typography8,
3158
3323
  Button as Button6,
3159
3324
  Space as Space9,
3160
3325
  Tag as Tag4,
3161
3326
  Table as Table2,
3162
3327
  Tabs,
3163
3328
  Input as Input2,
3164
- Select as Select6,
3329
+ Select as Select7,
3165
3330
  Popconfirm as Popconfirm3,
3166
3331
  Empty as Empty2
3167
3332
  } from "antd";
3168
- import { useState as useState9, useMemo as useMemo9 } from "react";
3169
- import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
3170
- var { Title: Title3, Text: Text6, Link: AntLink } = Typography7;
3171
- var defaultTranslations4 = {
3333
+ import { useState as useState10, useMemo as useMemo9 } from "react";
3334
+ import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
3335
+ var { Title: Title3, Text: Text7, Link: AntLink } = Typography8;
3336
+ var defaultTranslations5 = {
3172
3337
  email: "\u30E1\u30FC\u30EB",
3173
3338
  primaryOrganization: "\u6240\u5C5E\u7D44\u7E54",
3174
3339
  currentContext: "\u73FE\u5728\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8",
@@ -3215,9 +3380,9 @@ function UserDetailCard({
3215
3380
  removeLoading = false,
3216
3381
  translations: t = {}
3217
3382
  }) {
3218
- const labels = { ...defaultTranslations4, ...t };
3219
- const [permissionSearch, setPermissionSearch] = useState9("");
3220
- const [permissionTypeFilter, setPermissionTypeFilter] = useState9("all");
3383
+ const labels = { ...defaultTranslations5, ...t };
3384
+ const [permissionSearch, setPermissionSearch] = useState10("");
3385
+ const [permissionTypeFilter, setPermissionTypeFilter] = useState10("all");
3221
3386
  const getScopeLabel2 = (assignment) => {
3222
3387
  if (assignment.scope === "global") return labels.global;
3223
3388
  if (assignment.scope === "org-wide") return assignment.org_name || labels.global;
@@ -3267,7 +3432,7 @@ function UserDetailCard({
3267
3432
  {
3268
3433
  key: "permissions",
3269
3434
  label: /* @__PURE__ */ jsxs11("span", { children: [
3270
- /* @__PURE__ */ jsx15(KeyOutlined, {}),
3435
+ /* @__PURE__ */ jsx16(KeyOutlined, {}),
3271
3436
  " ",
3272
3437
  labels.permissions
3273
3438
  ] }),
@@ -3289,29 +3454,29 @@ function UserDetailCard({
3289
3454
  allPermissionsData.length,
3290
3455
  ")"
3291
3456
  ] }),
3292
- /* @__PURE__ */ jsx15(Text6, { type: "secondary", style: { fontSize: 12 }, children: labels.permissionsDescription })
3457
+ /* @__PURE__ */ jsx16(Text7, { type: "secondary", style: { fontSize: 12 }, children: labels.permissionsDescription })
3293
3458
  ] }),
3294
3459
  /* @__PURE__ */ jsxs11(Space9, { children: [
3295
- onRefresh && /* @__PURE__ */ jsx15(Button6, { icon: /* @__PURE__ */ jsx15(ReloadOutlined2, {}), onClick: onRefresh }),
3296
- /* @__PURE__ */ jsx15(Button6, { type: "default", children: labels.remove }),
3297
- /* @__PURE__ */ jsx15(Button6, { type: "primary", icon: /* @__PURE__ */ jsx15(PlusOutlined3, {}), children: labels.addPermissions })
3460
+ onRefresh && /* @__PURE__ */ jsx16(Button6, { icon: /* @__PURE__ */ jsx16(ReloadOutlined2, {}), onClick: onRefresh }),
3461
+ /* @__PURE__ */ jsx16(Button6, { type: "default", children: labels.remove }),
3462
+ /* @__PURE__ */ jsx16(Button6, { type: "primary", icon: /* @__PURE__ */ jsx16(PlusOutlined3, {}), children: labels.addPermissions })
3298
3463
  ] })
3299
3464
  ]
3300
3465
  }
3301
3466
  ),
3302
3467
  /* @__PURE__ */ jsxs11("div", { style: { display: "flex", gap: 16, marginBottom: 16 }, children: [
3303
- /* @__PURE__ */ jsx15(
3468
+ /* @__PURE__ */ jsx16(
3304
3469
  Input2,
3305
3470
  {
3306
3471
  placeholder: labels.searchPermissions,
3307
- prefix: /* @__PURE__ */ jsx15(KeyOutlined, {}),
3472
+ prefix: /* @__PURE__ */ jsx16(KeyOutlined, {}),
3308
3473
  value: permissionSearch,
3309
3474
  onChange: (e) => setPermissionSearch(e.target.value),
3310
3475
  style: { width: 300 }
3311
3476
  }
3312
3477
  ),
3313
- /* @__PURE__ */ jsx15(
3314
- Select6,
3478
+ /* @__PURE__ */ jsx16(
3479
+ Select7,
3315
3480
  {
3316
3481
  value: permissionTypeFilter,
3317
3482
  onChange: setPermissionTypeFilter,
@@ -3324,7 +3489,7 @@ function UserDetailCard({
3324
3489
  }
3325
3490
  )
3326
3491
  ] }),
3327
- /* @__PURE__ */ jsx15(
3492
+ /* @__PURE__ */ jsx16(
3328
3493
  Table2,
3329
3494
  {
3330
3495
  dataSource: filteredPermissions,
@@ -3335,8 +3500,8 @@ function UserDetailCard({
3335
3500
  dataIndex: "permission",
3336
3501
  key: "permission",
3337
3502
  render: (perm) => /* @__PURE__ */ jsxs11(Space9, { children: [
3338
- /* @__PURE__ */ jsx15(KeyOutlined, { style: { color: "#faad14" } }),
3339
- /* @__PURE__ */ jsx15(AntLink, { children: perm })
3503
+ /* @__PURE__ */ jsx16(KeyOutlined, { style: { color: "#faad14" } }),
3504
+ /* @__PURE__ */ jsx16(AntLink, { children: perm })
3340
3505
  ] })
3341
3506
  },
3342
3507
  {
@@ -3344,7 +3509,7 @@ function UserDetailCard({
3344
3509
  dataIndex: "type",
3345
3510
  key: "type",
3346
3511
  width: 150,
3347
- render: (type) => /* @__PURE__ */ jsx15(Tag4, { color: type === "role" ? "blue" : "green", children: type === "role" ? labels.viaRole : labels.viaTeam })
3512
+ render: (type) => /* @__PURE__ */ jsx16(Tag4, { color: type === "role" ? "blue" : "green", children: type === "role" ? labels.viaRole : labels.viaTeam })
3348
3513
  },
3349
3514
  {
3350
3515
  title: labels.attachedVia,
@@ -3352,9 +3517,9 @@ function UserDetailCard({
3352
3517
  key: "attachedVia",
3353
3518
  width: 200,
3354
3519
  render: (via, record) => /* @__PURE__ */ jsxs11(Space9, { children: [
3355
- record.type === "role" ? /* @__PURE__ */ jsx15(SafetyOutlined3, {}) : /* @__PURE__ */ jsx15(TeamOutlined2, {}),
3356
- /* @__PURE__ */ jsx15(Text6, { children: via }),
3357
- record.scope && record.scope !== "team" && /* @__PURE__ */ jsx15(Tag4, { color: getScopeColor(record.scope), style: { fontSize: 12 }, children: record.scope })
3520
+ record.type === "role" ? /* @__PURE__ */ jsx16(SafetyOutlined3, {}) : /* @__PURE__ */ jsx16(TeamOutlined2, {}),
3521
+ /* @__PURE__ */ jsx16(Text7, { children: via }),
3522
+ record.scope && record.scope !== "team" && /* @__PURE__ */ jsx16(Tag4, { color: getScopeColor(record.scope), style: { fontSize: 12 }, children: record.scope })
3358
3523
  ] })
3359
3524
  }
3360
3525
  ]
@@ -3365,7 +3530,7 @@ function UserDetailCard({
3365
3530
  {
3366
3531
  key: "roles",
3367
3532
  label: /* @__PURE__ */ jsxs11("span", { children: [
3368
- /* @__PURE__ */ jsx15(SafetyOutlined3, {}),
3533
+ /* @__PURE__ */ jsx16(SafetyOutlined3, {}),
3369
3534
  " ",
3370
3535
  labels.roles,
3371
3536
  " (",
@@ -3383,12 +3548,12 @@ function UserDetailCard({
3383
3548
  marginBottom: 16
3384
3549
  },
3385
3550
  children: [
3386
- /* @__PURE__ */ jsx15(Title3, { level: 5, style: { margin: 0 }, children: labels.roleAssignments }),
3387
- onAssignRole && /* @__PURE__ */ jsx15(Button6, { type: "primary", icon: /* @__PURE__ */ jsx15(PlusOutlined3, {}), onClick: onAssignRole, children: labels.assignRole })
3551
+ /* @__PURE__ */ jsx16(Title3, { level: 5, style: { margin: 0 }, children: labels.roleAssignments }),
3552
+ onAssignRole && /* @__PURE__ */ jsx16(Button6, { type: "primary", icon: /* @__PURE__ */ jsx16(PlusOutlined3, {}), onClick: onAssignRole, children: labels.assignRole })
3388
3553
  ]
3389
3554
  }
3390
3555
  ),
3391
- roleAssignments.length === 0 ? /* @__PURE__ */ jsx15(Empty2, { description: labels.noRolesAssigned }) : /* @__PURE__ */ jsx15(
3556
+ roleAssignments.length === 0 ? /* @__PURE__ */ jsx16(Empty2, { description: labels.noRolesAssigned }) : /* @__PURE__ */ jsx16(
3392
3557
  Table2,
3393
3558
  {
3394
3559
  dataSource: roleAssignments,
@@ -3398,9 +3563,9 @@ function UserDetailCard({
3398
3563
  title: labels.roles,
3399
3564
  key: "role",
3400
3565
  render: (_, record) => /* @__PURE__ */ jsxs11(Space9, { children: [
3401
- /* @__PURE__ */ jsx15(SafetyOutlined3, { style: { color: "#1890ff" } }),
3402
- /* @__PURE__ */ jsx15(
3403
- Text6,
3566
+ /* @__PURE__ */ jsx16(SafetyOutlined3, { style: { color: "#1890ff" } }),
3567
+ /* @__PURE__ */ jsx16(
3568
+ Text7,
3404
3569
  {
3405
3570
  strong: true,
3406
3571
  style: { color: "#1890ff", cursor: onRoleClick ? "pointer" : "default" },
@@ -3408,14 +3573,14 @@ function UserDetailCard({
3408
3573
  children: record.role.name
3409
3574
  }
3410
3575
  ),
3411
- /* @__PURE__ */ jsx15(Tag4, { color: "default", children: record.role.slug })
3576
+ /* @__PURE__ */ jsx16(Tag4, { color: "default", children: record.role.slug })
3412
3577
  ] })
3413
3578
  },
3414
3579
  {
3415
3580
  title: labels.global,
3416
3581
  key: "scope",
3417
3582
  width: 200,
3418
- render: (_, record) => /* @__PURE__ */ jsx15(Tag4, { color: getScopeColor(record.scope), children: getScopeLabel2(record) })
3583
+ render: (_, record) => /* @__PURE__ */ jsx16(Tag4, { color: getScopeColor(record.scope), children: getScopeLabel2(record) })
3419
3584
  },
3420
3585
  {
3421
3586
  title: labels.level,
@@ -3427,7 +3592,7 @@ function UserDetailCard({
3427
3592
  title: labels.permissions,
3428
3593
  key: "permissions",
3429
3594
  width: 150,
3430
- render: (_, record) => /* @__PURE__ */ jsxs11(Text6, { children: [
3595
+ render: (_, record) => /* @__PURE__ */ jsxs11(Text7, { children: [
3431
3596
  record.permissions.length,
3432
3597
  " ",
3433
3598
  labels.permissions.toLowerCase()
@@ -3437,7 +3602,7 @@ function UserDetailCard({
3437
3602
  title: labels.actions,
3438
3603
  key: "actions",
3439
3604
  width: 100,
3440
- render: (_, record) => onRemoveRole && /* @__PURE__ */ jsx15(
3605
+ render: (_, record) => onRemoveRole && /* @__PURE__ */ jsx16(
3441
3606
  Popconfirm3,
3442
3607
  {
3443
3608
  title: labels.confirmRemoveRole,
@@ -3446,12 +3611,12 @@ function UserDetailCard({
3446
3611
  record.console_org_id,
3447
3612
  record.console_branch_id
3448
3613
  ),
3449
- children: /* @__PURE__ */ jsx15(
3614
+ children: /* @__PURE__ */ jsx16(
3450
3615
  Button6,
3451
3616
  {
3452
3617
  type: "text",
3453
3618
  danger: true,
3454
- icon: /* @__PURE__ */ jsx15(DeleteOutlined2, {}),
3619
+ icon: /* @__PURE__ */ jsx16(DeleteOutlined2, {}),
3455
3620
  loading: removeLoading
3456
3621
  }
3457
3622
  )
@@ -3466,7 +3631,7 @@ function UserDetailCard({
3466
3631
  {
3467
3632
  key: "teams",
3468
3633
  label: /* @__PURE__ */ jsxs11("span", { children: [
3469
- /* @__PURE__ */ jsx15(TeamOutlined2, {}),
3634
+ /* @__PURE__ */ jsx16(TeamOutlined2, {}),
3470
3635
  " ",
3471
3636
  labels.teams,
3472
3637
  " (",
@@ -3474,8 +3639,8 @@ function UserDetailCard({
3474
3639
  ")"
3475
3640
  ] }),
3476
3641
  children: /* @__PURE__ */ jsxs11("div", { children: [
3477
- /* @__PURE__ */ jsx15(Title3, { level: 5, style: { marginBottom: 16 }, children: labels.teamMemberships }),
3478
- teamMemberships.length === 0 ? /* @__PURE__ */ jsx15(Empty2, { description: labels.noTeamMemberships }) : /* @__PURE__ */ jsx15(
3642
+ /* @__PURE__ */ jsx16(Title3, { level: 5, style: { marginBottom: 16 }, children: labels.teamMemberships }),
3643
+ teamMemberships.length === 0 ? /* @__PURE__ */ jsx16(Empty2, { description: labels.noTeamMemberships }) : /* @__PURE__ */ jsx16(
3479
3644
  Table2,
3480
3645
  {
3481
3646
  dataSource: teamMemberships,
@@ -3485,9 +3650,9 @@ function UserDetailCard({
3485
3650
  title: labels.teams,
3486
3651
  key: "team",
3487
3652
  render: (_, record) => /* @__PURE__ */ jsxs11(Space9, { children: [
3488
- /* @__PURE__ */ jsx15(TeamOutlined2, { style: { color: "#52c41a" } }),
3489
- /* @__PURE__ */ jsx15(Text6, { strong: true, children: record.team.name }),
3490
- record.team.path && /* @__PURE__ */ jsxs11(Text6, { type: "secondary", children: [
3653
+ /* @__PURE__ */ jsx16(TeamOutlined2, { style: { color: "#52c41a" } }),
3654
+ /* @__PURE__ */ jsx16(Text7, { strong: true, children: record.team.name }),
3655
+ record.team.path && /* @__PURE__ */ jsxs11(Text7, { type: "secondary", children: [
3491
3656
  "(",
3492
3657
  record.team.path,
3493
3658
  ")"
@@ -3498,13 +3663,13 @@ function UserDetailCard({
3498
3663
  title: labels.teamLeader,
3499
3664
  key: "leader",
3500
3665
  width: 150,
3501
- render: (_, record) => record.is_leader ? /* @__PURE__ */ jsx15(Tag4, { color: "gold", children: labels.teamLeader }) : /* @__PURE__ */ jsx15(Text6, { type: "secondary", children: "-" })
3666
+ render: (_, record) => record.is_leader ? /* @__PURE__ */ jsx16(Tag4, { color: "gold", children: labels.teamLeader }) : /* @__PURE__ */ jsx16(Text7, { type: "secondary", children: "-" })
3502
3667
  },
3503
3668
  {
3504
3669
  title: labels.permissions,
3505
3670
  key: "permissions",
3506
3671
  width: 150,
3507
- render: (_, record) => /* @__PURE__ */ jsxs11(Text6, { children: [
3672
+ render: (_, record) => /* @__PURE__ */ jsxs11(Text7, { children: [
3508
3673
  record.permissions.length,
3509
3674
  " ",
3510
3675
  labels.permissions.toLowerCase()
@@ -3518,7 +3683,7 @@ function UserDetailCard({
3518
3683
  {
3519
3684
  key: "aggregated",
3520
3685
  label: /* @__PURE__ */ jsxs11("span", { children: [
3521
- /* @__PURE__ */ jsx15(SafetyOutlined3, {}),
3686
+ /* @__PURE__ */ jsx16(SafetyOutlined3, {}),
3522
3687
  " ",
3523
3688
  labels.aggregatedPermissions,
3524
3689
  " (",
@@ -3526,9 +3691,9 @@ function UserDetailCard({
3526
3691
  ")"
3527
3692
  ] }),
3528
3693
  children: /* @__PURE__ */ jsxs11("div", { children: [
3529
- /* @__PURE__ */ jsx15(Title3, { level: 5, style: { marginBottom: 16 }, children: labels.aggregatedPermissions }),
3530
- /* @__PURE__ */ jsx15(Text6, { type: "secondary", style: { display: "block", marginBottom: 16 }, children: "\u3059\u3079\u3066\u306E\u30ED\u30FC\u30EB\u3068\u30C1\u30FC\u30E0\u304B\u3089\u96C6\u7D04\u3055\u308C\u305F\u6A29\u9650\u306E\u4E00\u89A7\u3067\u3059\u3002" }),
3531
- aggregatedPermissions.length === 0 ? /* @__PURE__ */ jsx15(Empty2, { description: labels.noPermissions }) : /* @__PURE__ */ jsx15(
3694
+ /* @__PURE__ */ jsx16(Title3, { level: 5, style: { marginBottom: 16 }, children: labels.aggregatedPermissions }),
3695
+ /* @__PURE__ */ jsx16(Text7, { type: "secondary", style: { display: "block", marginBottom: 16 }, children: "\u3059\u3079\u3066\u306E\u30ED\u30FC\u30EB\u3068\u30C1\u30FC\u30E0\u304B\u3089\u96C6\u7D04\u3055\u308C\u305F\u6A29\u9650\u306E\u4E00\u89A7\u3067\u3059\u3002" }),
3696
+ aggregatedPermissions.length === 0 ? /* @__PURE__ */ jsx16(Empty2, { description: labels.noPermissions }) : /* @__PURE__ */ jsx16(
3532
3697
  Table2,
3533
3698
  {
3534
3699
  dataSource: aggregatedPermissions.map((perm) => ({
@@ -3550,15 +3715,15 @@ function UserDetailCard({
3550
3715
  value: g
3551
3716
  })),
3552
3717
  onFilter: (value, record) => record.group === value,
3553
- render: (group) => /* @__PURE__ */ jsx15(Tag4, { icon: /* @__PURE__ */ jsx15(SafetyOutlined3, {}), color: "blue", children: group })
3718
+ render: (group) => /* @__PURE__ */ jsx16(Tag4, { icon: /* @__PURE__ */ jsx16(SafetyOutlined3, {}), color: "blue", children: group })
3554
3719
  },
3555
3720
  {
3556
3721
  title: labels.permissions,
3557
3722
  dataIndex: "permission",
3558
3723
  key: "permission",
3559
3724
  render: (perm) => /* @__PURE__ */ jsxs11(Space9, { children: [
3560
- /* @__PURE__ */ jsx15(KeyOutlined, { style: { color: "#faad14" } }),
3561
- /* @__PURE__ */ jsx15(Text6, { children: perm })
3725
+ /* @__PURE__ */ jsx16(KeyOutlined, { style: { color: "#faad14" } }),
3726
+ /* @__PURE__ */ jsx16(Text7, { children: perm })
3562
3727
  ] })
3563
3728
  },
3564
3729
  {
@@ -3566,7 +3731,7 @@ function UserDetailCard({
3566
3731
  dataIndex: "action",
3567
3732
  key: "action",
3568
3733
  width: 150,
3569
- render: (action) => /* @__PURE__ */ jsx15(Tag4, { color: "green", children: action })
3734
+ render: (action) => /* @__PURE__ */ jsx16(Tag4, { color: "green", children: action })
3570
3735
  }
3571
3736
  ]
3572
3737
  }
@@ -3575,7 +3740,7 @@ function UserDetailCard({
3575
3740
  }
3576
3741
  ];
3577
3742
  return /* @__PURE__ */ jsxs11("div", { children: [
3578
- /* @__PURE__ */ jsx15(Card3, { size: "small", style: { marginBottom: 24 }, styles: { body: { padding: "16px 24px" } }, children: /* @__PURE__ */ jsxs11(
3743
+ /* @__PURE__ */ jsx16(Card3, { size: "small", style: { marginBottom: 24 }, styles: { body: { padding: "16px 24px" } }, children: /* @__PURE__ */ jsxs11(
3579
3744
  "div",
3580
3745
  {
3581
3746
  style: {
@@ -3585,44 +3750,44 @@ function UserDetailCard({
3585
3750
  },
3586
3751
  children: [
3587
3752
  /* @__PURE__ */ jsxs11("div", { children: [
3588
- /* @__PURE__ */ jsx15(Text6, { type: "secondary", style: { fontSize: 12, display: "block", marginBottom: 4 }, children: labels.email }),
3589
- /* @__PURE__ */ jsx15(Text6, { copyable: true, style: { fontSize: 14 }, children: user?.email || "-" })
3753
+ /* @__PURE__ */ jsx16(Text7, { type: "secondary", style: { fontSize: 12, display: "block", marginBottom: 4 }, children: labels.email }),
3754
+ /* @__PURE__ */ jsx16(Text7, { copyable: true, style: { fontSize: 14 }, children: user?.email || "-" })
3590
3755
  ] }),
3591
3756
  /* @__PURE__ */ jsxs11("div", { children: [
3592
- /* @__PURE__ */ jsx15(Text6, { type: "secondary", style: { fontSize: 12, display: "block", marginBottom: 4 }, children: labels.primaryOrganization }),
3757
+ /* @__PURE__ */ jsx16(Text7, { type: "secondary", style: { fontSize: 12, display: "block", marginBottom: 4 }, children: labels.primaryOrganization }),
3593
3758
  user?.organization ? /* @__PURE__ */ jsxs11(Space9, { size: 4, children: [
3594
- /* @__PURE__ */ jsx15(BankOutlined6, { style: { color: "#1890ff" } }),
3595
- /* @__PURE__ */ jsx15(Text6, { style: { fontSize: 14 }, children: user.organization.name })
3759
+ /* @__PURE__ */ jsx16(BankOutlined6, { style: { color: "#1890ff" } }),
3760
+ /* @__PURE__ */ jsx16(Text7, { style: { fontSize: 14 }, children: user.organization.name })
3596
3761
  ] }) : /* @__PURE__ */ jsxs11(Space9, { size: 4, children: [
3597
- /* @__PURE__ */ jsx15(GlobalOutlined5, { style: { color: "#722ed1" } }),
3598
- /* @__PURE__ */ jsx15(Text6, { style: { fontSize: 14 }, children: labels.global })
3762
+ /* @__PURE__ */ jsx16(GlobalOutlined5, { style: { color: "#722ed1" } }),
3763
+ /* @__PURE__ */ jsx16(Text7, { style: { fontSize: 14 }, children: labels.global })
3599
3764
  ] })
3600
3765
  ] }),
3601
3766
  /* @__PURE__ */ jsxs11("div", { children: [
3602
- /* @__PURE__ */ jsx15(Text6, { type: "secondary", style: { fontSize: 12, display: "block", marginBottom: 4 }, children: labels.currentContext }),
3767
+ /* @__PURE__ */ jsx16(Text7, { type: "secondary", style: { fontSize: 12, display: "block", marginBottom: 4 }, children: labels.currentContext }),
3603
3768
  /* @__PURE__ */ jsxs11(Space9, { size: 16, wrap: true, children: [
3604
3769
  currentOrg && /* @__PURE__ */ jsxs11(Space9, { size: 4, children: [
3605
- /* @__PURE__ */ jsx15(BankOutlined6, { style: { color: "#1890ff" } }),
3606
- /* @__PURE__ */ jsx15(Text6, { style: { fontSize: 14 }, children: currentOrg.name })
3770
+ /* @__PURE__ */ jsx16(BankOutlined6, { style: { color: "#1890ff" } }),
3771
+ /* @__PURE__ */ jsx16(Text7, { style: { fontSize: 14 }, children: currentOrg.name })
3607
3772
  ] }),
3608
3773
  currentBranch && /* @__PURE__ */ jsxs11(Space9, { size: 4, children: [
3609
- /* @__PURE__ */ jsx15(BranchesOutlined4, { style: { color: "#52c41a" } }),
3610
- /* @__PURE__ */ jsx15(Text6, { style: { fontSize: 14 }, children: currentBranch.name })
3774
+ /* @__PURE__ */ jsx16(BranchesOutlined4, { style: { color: "#52c41a" } }),
3775
+ /* @__PURE__ */ jsx16(Text7, { style: { fontSize: 14 }, children: currentBranch.name })
3611
3776
  ] })
3612
3777
  ] })
3613
3778
  ] }),
3614
3779
  /* @__PURE__ */ jsxs11("div", { children: [
3615
- /* @__PURE__ */ jsx15(Text6, { type: "secondary", style: { fontSize: 12, display: "block", marginBottom: 4 }, children: labels.created }),
3616
- /* @__PURE__ */ jsx15(Text6, { style: { fontSize: 14 }, children: user?.created_at ? new Date(user.created_at).toLocaleDateString() : "-" })
3780
+ /* @__PURE__ */ jsx16(Text7, { type: "secondary", style: { fontSize: 12, display: "block", marginBottom: 4 }, children: labels.created }),
3781
+ /* @__PURE__ */ jsx16(Text7, { style: { fontSize: 14 }, children: user?.created_at ? new Date(user.created_at).toLocaleDateString() : "-" })
3617
3782
  ] }),
3618
3783
  /* @__PURE__ */ jsxs11("div", { children: [
3619
- /* @__PURE__ */ jsx15(Text6, { type: "secondary", style: { fontSize: 12, display: "block", marginBottom: 4 }, children: labels.lastSignIn }),
3620
- /* @__PURE__ */ jsx15(Text6, { style: { fontSize: 14 }, children: "-" })
3784
+ /* @__PURE__ */ jsx16(Text7, { type: "secondary", style: { fontSize: 12, display: "block", marginBottom: 4 }, children: labels.lastSignIn }),
3785
+ /* @__PURE__ */ jsx16(Text7, { style: { fontSize: 14 }, children: "-" })
3621
3786
  ] }),
3622
3787
  /* @__PURE__ */ jsxs11("div", { children: [
3623
- /* @__PURE__ */ jsx15(Text6, { type: "secondary", style: { fontSize: 12, display: "block", marginBottom: 4 }, children: labels.roleAssignments }),
3624
- /* @__PURE__ */ jsxs11(Text6, { style: { fontSize: 14 }, children: [
3625
- /* @__PURE__ */ jsx15(Text6, { strong: true, children: roleAssignments.length }),
3788
+ /* @__PURE__ */ jsx16(Text7, { type: "secondary", style: { fontSize: 12, display: "block", marginBottom: 4 }, children: labels.roleAssignments }),
3789
+ /* @__PURE__ */ jsxs11(Text7, { style: { fontSize: 14 }, children: [
3790
+ /* @__PURE__ */ jsx16(Text7, { strong: true, children: roleAssignments.length }),
3626
3791
  " ",
3627
3792
  labels.roles.toLowerCase()
3628
3793
  ] })
@@ -3630,15 +3795,15 @@ function UserDetailCard({
3630
3795
  ]
3631
3796
  }
3632
3797
  ) }),
3633
- /* @__PURE__ */ jsx15(Card3, { children: /* @__PURE__ */ jsx15(Tabs, { defaultActiveKey: "permissions", items: tabItems }) })
3798
+ /* @__PURE__ */ jsx16(Card3, { children: /* @__PURE__ */ jsx16(Tabs, { defaultActiveKey: "permissions", items: tabItems }) })
3634
3799
  ] });
3635
3800
  }
3636
3801
 
3637
3802
  // src/ant/components/RoleCreateModal/RoleCreateModal.tsx
3638
3803
  import { PlusOutlined as PlusOutlined4, GlobalOutlined as GlobalOutlined6, BankOutlined as BankOutlined7 } from "@ant-design/icons";
3639
- import { Modal as Modal5, Form as Form4, Input as Input3, InputNumber as InputNumber2, Select as Select7, Radio as Radio2, Button as Button7, Space as Space10 } from "antd";
3640
- import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
3641
- var defaultTranslations5 = {
3804
+ import { Modal as Modal6, Form as Form4, Input as Input3, InputNumber as InputNumber2, Select as Select8, Radio as Radio2, Button as Button7, Space as Space10 } from "antd";
3805
+ import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
3806
+ var defaultTranslations6 = {
3642
3807
  title: "\u30ED\u30FC\u30EB\u4F5C\u6210",
3643
3808
  name: "\u540D\u524D",
3644
3809
  slug: "\u30B9\u30E9\u30C3\u30B0",
@@ -3662,7 +3827,7 @@ function RoleCreateModal({
3662
3827
  translations: t = {}
3663
3828
  }) {
3664
3829
  const [form] = Form4.useForm();
3665
- const labels = { ...defaultTranslations5, ...t };
3830
+ const labels = { ...defaultTranslations6, ...t };
3666
3831
  const handleFinish = async (values) => {
3667
3832
  await onSubmit(values);
3668
3833
  form.resetFields();
@@ -3671,11 +3836,11 @@ function RoleCreateModal({
3671
3836
  form.resetFields();
3672
3837
  onCancel();
3673
3838
  };
3674
- return /* @__PURE__ */ jsx16(
3675
- Modal5,
3839
+ return /* @__PURE__ */ jsx17(
3840
+ Modal6,
3676
3841
  {
3677
3842
  title: /* @__PURE__ */ jsxs12(Space10, { children: [
3678
- /* @__PURE__ */ jsx16(PlusOutlined4, {}),
3843
+ /* @__PURE__ */ jsx17(PlusOutlined4, {}),
3679
3844
  labels.title
3680
3845
  ] }),
3681
3846
  open,
@@ -3690,67 +3855,67 @@ function RoleCreateModal({
3690
3855
  onFinish: handleFinish,
3691
3856
  initialValues: { level: 50, scope: "org", org_id: currentOrgId },
3692
3857
  children: [
3693
- /* @__PURE__ */ jsx16(
3858
+ /* @__PURE__ */ jsx17(
3694
3859
  Form4.Item,
3695
3860
  {
3696
3861
  name: "scope",
3697
3862
  label: labels.scope,
3698
3863
  rules: [{ required: true, message: labels.required }],
3699
3864
  children: /* @__PURE__ */ jsxs12(Radio2.Group, { children: [
3700
- /* @__PURE__ */ jsx16(Radio2, { value: "global", children: /* @__PURE__ */ jsxs12(Space10, { children: [
3701
- /* @__PURE__ */ jsx16(GlobalOutlined6, {}),
3865
+ /* @__PURE__ */ jsx17(Radio2, { value: "global", children: /* @__PURE__ */ jsxs12(Space10, { children: [
3866
+ /* @__PURE__ */ jsx17(GlobalOutlined6, {}),
3702
3867
  labels.global
3703
3868
  ] }) }),
3704
- /* @__PURE__ */ jsx16(Radio2, { value: "org", children: /* @__PURE__ */ jsxs12(Space10, { children: [
3705
- /* @__PURE__ */ jsx16(BankOutlined7, {}),
3869
+ /* @__PURE__ */ jsx17(Radio2, { value: "org", children: /* @__PURE__ */ jsxs12(Space10, { children: [
3870
+ /* @__PURE__ */ jsx17(BankOutlined7, {}),
3706
3871
  labels.orgRole
3707
3872
  ] }) })
3708
3873
  ] })
3709
3874
  }
3710
3875
  ),
3711
- /* @__PURE__ */ jsx16(Form4.Item, { noStyle: true, shouldUpdate: (prev, curr) => prev.scope !== curr.scope, children: ({ getFieldValue }) => getFieldValue("scope") === "org" && /* @__PURE__ */ jsx16(
3876
+ /* @__PURE__ */ jsx17(Form4.Item, { noStyle: true, shouldUpdate: (prev, curr) => prev.scope !== curr.scope, children: ({ getFieldValue }) => getFieldValue("scope") === "org" && /* @__PURE__ */ jsx17(
3712
3877
  Form4.Item,
3713
3878
  {
3714
3879
  name: "org_id",
3715
3880
  label: labels.organization,
3716
3881
  rules: [{ required: true, message: labels.required }],
3717
- children: /* @__PURE__ */ jsx16(Select7, { placeholder: labels.organization, children: organizations.map((org) => /* @__PURE__ */ jsx16(Select7.Option, { value: String(org.id), children: /* @__PURE__ */ jsxs12(Space10, { children: [
3718
- /* @__PURE__ */ jsx16(BankOutlined7, {}),
3882
+ children: /* @__PURE__ */ jsx17(Select8, { placeholder: labels.organization, children: organizations.map((org) => /* @__PURE__ */ jsx17(Select8.Option, { value: String(org.id), children: /* @__PURE__ */ jsxs12(Space10, { children: [
3883
+ /* @__PURE__ */ jsx17(BankOutlined7, {}),
3719
3884
  org.name
3720
3885
  ] }) }, org.id)) })
3721
3886
  }
3722
3887
  ) }),
3723
- /* @__PURE__ */ jsx16(
3888
+ /* @__PURE__ */ jsx17(
3724
3889
  Form4.Item,
3725
3890
  {
3726
3891
  name: "name",
3727
3892
  label: labels.name,
3728
3893
  rules: [{ required: true, message: labels.required }],
3729
- children: /* @__PURE__ */ jsx16(Input3, {})
3894
+ children: /* @__PURE__ */ jsx17(Input3, {})
3730
3895
  }
3731
3896
  ),
3732
- /* @__PURE__ */ jsx16(
3897
+ /* @__PURE__ */ jsx17(
3733
3898
  Form4.Item,
3734
3899
  {
3735
3900
  name: "slug",
3736
3901
  label: labels.slug,
3737
3902
  rules: [{ required: true, message: labels.required }],
3738
- children: /* @__PURE__ */ jsx16(Input3, {})
3903
+ children: /* @__PURE__ */ jsx17(Input3, {})
3739
3904
  }
3740
3905
  ),
3741
- /* @__PURE__ */ jsx16(Form4.Item, { name: "description", label: labels.description, children: /* @__PURE__ */ jsx16(Input3.TextArea, { rows: 3 }) }),
3742
- /* @__PURE__ */ jsx16(
3906
+ /* @__PURE__ */ jsx17(Form4.Item, { name: "description", label: labels.description, children: /* @__PURE__ */ jsx17(Input3.TextArea, { rows: 3 }) }),
3907
+ /* @__PURE__ */ jsx17(
3743
3908
  Form4.Item,
3744
3909
  {
3745
3910
  name: "level",
3746
3911
  label: labels.level,
3747
3912
  rules: [{ required: true, message: labels.required }],
3748
- children: /* @__PURE__ */ jsx16(InputNumber2, { min: 1, max: 100, style: { width: "100%" } })
3913
+ children: /* @__PURE__ */ jsx17(InputNumber2, { min: 1, max: 100, style: { width: "100%" } })
3749
3914
  }
3750
3915
  ),
3751
- /* @__PURE__ */ jsx16(Form4.Item, { children: /* @__PURE__ */ jsxs12(Space10, { children: [
3752
- /* @__PURE__ */ jsx16(Button7, { type: "primary", htmlType: "submit", loading, children: labels.create }),
3753
- /* @__PURE__ */ jsx16(Button7, { onClick: handleCancel, children: labels.cancel })
3916
+ /* @__PURE__ */ jsx17(Form4.Item, { children: /* @__PURE__ */ jsxs12(Space10, { children: [
3917
+ /* @__PURE__ */ jsx17(Button7, { type: "primary", htmlType: "submit", loading, children: labels.create }),
3918
+ /* @__PURE__ */ jsx17(Button7, { onClick: handleCancel, children: labels.cancel })
3754
3919
  ] }) })
3755
3920
  ]
3756
3921
  }
@@ -3768,10 +3933,10 @@ import {
3768
3933
  GlobalOutlined as GlobalOutlined7,
3769
3934
  BankOutlined as BankOutlined8
3770
3935
  } from "@ant-design/icons";
3771
- import { Card as Card4, Typography as Typography8, Button as Button8, Space as Space11, Tag as Tag5, Select as Select8, Table as Table3, Popconfirm as Popconfirm4 } from "antd";
3772
- import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
3773
- var { Text: Text7 } = Typography8;
3774
- var defaultTranslations6 = {
3936
+ import { Card as Card4, Typography as Typography9, Button as Button8, Space as Space11, Tag as Tag5, Select as Select9, Table as Table3, Popconfirm as Popconfirm4 } from "antd";
3937
+ import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
3938
+ var { Text: Text8 } = Typography9;
3939
+ var defaultTranslations7 = {
3775
3940
  name: "\u540D\u524D",
3776
3941
  scope: "\u30B9\u30B3\u30FC\u30D7",
3777
3942
  level: "\u30EC\u30D9\u30EB",
@@ -3793,16 +3958,16 @@ function RolesListCard({
3793
3958
  onDeleteClick,
3794
3959
  translations: t = {}
3795
3960
  }) {
3796
- const labels = { ...defaultTranslations6, ...t };
3961
+ const labels = { ...defaultTranslations7, ...t };
3797
3962
  const columns = [
3798
3963
  {
3799
3964
  title: labels.name,
3800
3965
  dataIndex: "name",
3801
3966
  key: "name",
3802
3967
  render: (name, record) => /* @__PURE__ */ jsxs13(Space11, { children: [
3803
- /* @__PURE__ */ jsx17(SafetyOutlined4, { style: { color: "#1890ff" } }),
3804
- /* @__PURE__ */ jsx17(Text7, { strong: true, children: name }),
3805
- /* @__PURE__ */ jsx17(Tag5, { children: record.slug })
3968
+ /* @__PURE__ */ jsx18(SafetyOutlined4, { style: { color: "#1890ff" } }),
3969
+ /* @__PURE__ */ jsx18(Text8, { strong: true, children: name }),
3970
+ /* @__PURE__ */ jsx18(Tag5, { children: record.slug })
3806
3971
  ] })
3807
3972
  },
3808
3973
  {
@@ -3810,14 +3975,14 @@ function RolesListCard({
3810
3975
  dataIndex: "console_org_id",
3811
3976
  key: "scope",
3812
3977
  width: 180,
3813
- render: (_, record) => record.console_org_id ? /* @__PURE__ */ jsx17(Tag5, { icon: /* @__PURE__ */ jsx17(BankOutlined8, {}), color: "blue", children: record.organization?.name || record.console_org_id }) : /* @__PURE__ */ jsx17(Tag5, { icon: /* @__PURE__ */ jsx17(GlobalOutlined7, {}), color: "purple", children: labels.global })
3978
+ render: (_, record) => record.console_org_id ? /* @__PURE__ */ jsx18(Tag5, { icon: /* @__PURE__ */ jsx18(BankOutlined8, {}), color: "blue", children: record.organization?.name || record.console_org_id }) : /* @__PURE__ */ jsx18(Tag5, { icon: /* @__PURE__ */ jsx18(GlobalOutlined7, {}), color: "purple", children: labels.global })
3814
3979
  },
3815
3980
  {
3816
3981
  title: labels.level,
3817
3982
  dataIndex: "level",
3818
3983
  key: "level",
3819
3984
  width: 100,
3820
- render: (level) => /* @__PURE__ */ jsx17(Tag5, { color: "blue", children: level })
3985
+ render: (level) => /* @__PURE__ */ jsx18(Tag5, { color: "blue", children: level })
3821
3986
  },
3822
3987
  {
3823
3988
  title: labels.description,
@@ -3830,8 +3995,8 @@ function RolesListCard({
3830
3995
  key: "actions",
3831
3996
  width: 180,
3832
3997
  render: (_, record) => /* @__PURE__ */ jsxs13(Space11, { children: [
3833
- /* @__PURE__ */ jsx17(Button8, { size: "small", icon: /* @__PURE__ */ jsx17(EyeOutlined, {}), onClick: () => onViewClick(record), children: labels.detail }),
3834
- /* @__PURE__ */ jsx17(Popconfirm4, { title: labels.confirmDeleteRole, onConfirm: () => onDeleteClick(record), children: /* @__PURE__ */ jsx17(Button8, { size: "small", danger: true, icon: /* @__PURE__ */ jsx17(DeleteOutlined3, {}) }) })
3998
+ /* @__PURE__ */ jsx18(Button8, { size: "small", icon: /* @__PURE__ */ jsx18(EyeOutlined, {}), onClick: () => onViewClick(record), children: labels.detail }),
3999
+ /* @__PURE__ */ jsx18(Popconfirm4, { title: labels.confirmDeleteRole, onConfirm: () => onDeleteClick(record), children: /* @__PURE__ */ jsx18(Button8, { size: "small", danger: true, icon: /* @__PURE__ */ jsx18(DeleteOutlined3, {}) }) })
3835
4000
  ] })
3836
4001
  }
3837
4002
  ];
@@ -3839,34 +4004,34 @@ function RolesListCard({
3839
4004
  Card4,
3840
4005
  {
3841
4006
  title: /* @__PURE__ */ jsxs13(Space11, { children: [
3842
- /* @__PURE__ */ jsx17(SafetyOutlined4, {}),
4007
+ /* @__PURE__ */ jsx18(SafetyOutlined4, {}),
3843
4008
  "Roles"
3844
4009
  ] }),
3845
- extra: /* @__PURE__ */ jsx17(Button8, { type: "primary", icon: /* @__PURE__ */ jsx17(PlusOutlined5, {}), onClick: onCreateClick, children: "Create" }),
4010
+ extra: /* @__PURE__ */ jsx18(Button8, { type: "primary", icon: /* @__PURE__ */ jsx18(PlusOutlined5, {}), onClick: onCreateClick, children: "Create" }),
3846
4011
  children: [
3847
- /* @__PURE__ */ jsx17("div", { style: { marginBottom: 16, display: "flex", gap: 16 }, children: /* @__PURE__ */ jsxs13(
3848
- Select8,
4012
+ /* @__PURE__ */ jsx18("div", { style: { marginBottom: 16, display: "flex", gap: 16 }, children: /* @__PURE__ */ jsxs13(
4013
+ Select9,
3849
4014
  {
3850
4015
  value: scopeFilter,
3851
4016
  onChange: onScopeFilterChange,
3852
4017
  style: { minWidth: 200 },
3853
4018
  children: [
3854
- /* @__PURE__ */ jsx17(Select8.Option, { value: "all", children: /* @__PURE__ */ jsxs13(Space11, { children: [
3855
- /* @__PURE__ */ jsx17(SafetyOutlined4, {}),
4019
+ /* @__PURE__ */ jsx18(Select9.Option, { value: "all", children: /* @__PURE__ */ jsxs13(Space11, { children: [
4020
+ /* @__PURE__ */ jsx18(SafetyOutlined4, {}),
3856
4021
  labels.all
3857
4022
  ] }) }),
3858
- /* @__PURE__ */ jsx17(Select8.Option, { value: "global", children: /* @__PURE__ */ jsxs13(Space11, { children: [
3859
- /* @__PURE__ */ jsx17(GlobalOutlined7, {}),
4023
+ /* @__PURE__ */ jsx18(Select9.Option, { value: "global", children: /* @__PURE__ */ jsxs13(Space11, { children: [
4024
+ /* @__PURE__ */ jsx18(GlobalOutlined7, {}),
3860
4025
  labels.global
3861
4026
  ] }) }),
3862
- /* @__PURE__ */ jsx17(Select8.Option, { value: "org", children: /* @__PURE__ */ jsxs13(Space11, { children: [
3863
- /* @__PURE__ */ jsx17(BankOutlined8, {}),
4027
+ /* @__PURE__ */ jsx18(Select9.Option, { value: "org", children: /* @__PURE__ */ jsxs13(Space11, { children: [
4028
+ /* @__PURE__ */ jsx18(BankOutlined8, {}),
3864
4029
  labels.orgRole
3865
4030
  ] }) })
3866
4031
  ]
3867
4032
  }
3868
4033
  ) }),
3869
- /* @__PURE__ */ jsx17(
4034
+ /* @__PURE__ */ jsx18(
3870
4035
  Table3,
3871
4036
  {
3872
4037
  columns,
@@ -3883,11 +4048,11 @@ function RolesListCard({
3883
4048
 
3884
4049
  // src/ant/components/PermissionsListCard/PermissionsListCard.tsx
3885
4050
  import { KeyOutlined as KeyOutlined2, AppstoreOutlined } from "@ant-design/icons";
3886
- import { Card as Card5, Typography as Typography9, Tag as Tag6, Table as Table4, Input as Input4, Space as Space12, Collapse as Collapse2 } from "antd";
3887
- import { useState as useState10, useMemo as useMemo10 } from "react";
3888
- import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
3889
- var { Text: Text8 } = Typography9;
3890
- var defaultTranslations7 = {
4051
+ import { Card as Card5, Typography as Typography10, Tag as Tag6, Table as Table4, Input as Input4, Space as Space12, Collapse as Collapse2 } from "antd";
4052
+ import { useState as useState11, useMemo as useMemo10 } from "react";
4053
+ import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
4054
+ var { Text: Text9 } = Typography10;
4055
+ var defaultTranslations8 = {
3891
4056
  searchPermissions: "\u6A29\u9650\u3092\u691C\u7D22",
3892
4057
  name: "\u540D\u524D",
3893
4058
  slug: "\u30B9\u30E9\u30C3\u30B0",
@@ -3901,8 +4066,8 @@ function PermissionsListCard({
3901
4066
  translations: t = {},
3902
4067
  onGroupLabelRender
3903
4068
  }) {
3904
- const [search, setSearch] = useState10("");
3905
- const labels = { ...defaultTranslations7, ...t };
4069
+ const [search, setSearch] = useState11("");
4070
+ const labels = { ...defaultTranslations8, ...t };
3906
4071
  const filteredPermissions = useMemo10(() => {
3907
4072
  if (!search) return permissions;
3908
4073
  const lowerSearch = search.toLowerCase();
@@ -3929,25 +4094,25 @@ function PermissionsListCard({
3929
4094
  dataIndex: "name",
3930
4095
  key: "name",
3931
4096
  render: (name) => /* @__PURE__ */ jsxs14(Space12, { children: [
3932
- /* @__PURE__ */ jsx18(KeyOutlined2, { style: { color: "#52c41a" } }),
3933
- /* @__PURE__ */ jsx18(Text8, { strong: true, children: name })
4097
+ /* @__PURE__ */ jsx19(KeyOutlined2, { style: { color: "#52c41a" } }),
4098
+ /* @__PURE__ */ jsx19(Text9, { strong: true, children: name })
3934
4099
  ] })
3935
4100
  },
3936
4101
  {
3937
4102
  title: labels.slug,
3938
4103
  dataIndex: "slug",
3939
4104
  key: "slug",
3940
- render: (slug) => /* @__PURE__ */ jsx18(Tag6, { color: "blue", children: slug })
4105
+ render: (slug) => /* @__PURE__ */ jsx19(Tag6, { color: "blue", children: slug })
3941
4106
  },
3942
4107
  {
3943
4108
  title: labels.group,
3944
4109
  dataIndex: "group",
3945
4110
  key: "group",
3946
- render: (group) => /* @__PURE__ */ jsx18(Tag6, { icon: /* @__PURE__ */ jsx18(AppstoreOutlined, {}), color: "purple", children: getGroupLabel(group || "other") })
4111
+ render: (group) => /* @__PURE__ */ jsx19(Tag6, { icon: /* @__PURE__ */ jsx19(AppstoreOutlined, {}), color: "purple", children: getGroupLabel(group || "other") })
3947
4112
  }
3948
4113
  ];
3949
4114
  return /* @__PURE__ */ jsxs14(Card5, { children: [
3950
- /* @__PURE__ */ jsx18("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ jsx18(
4115
+ /* @__PURE__ */ jsx19("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ jsx19(
3951
4116
  Input4.Search,
3952
4117
  {
3953
4118
  placeholder: labels.searchPermissions,
@@ -3957,15 +4122,15 @@ function PermissionsListCard({
3957
4122
  style: { maxWidth: 300 }
3958
4123
  }
3959
4124
  ) }),
3960
- /* @__PURE__ */ jsx18(Collapse2, { defaultActiveKey: groups, ghost: true, children: Object.entries(groupedPermissions).map(([group, perms]) => /* @__PURE__ */ jsx18(
4125
+ /* @__PURE__ */ jsx19(Collapse2, { defaultActiveKey: groups, ghost: true, children: Object.entries(groupedPermissions).map(([group, perms]) => /* @__PURE__ */ jsx19(
3961
4126
  Collapse2.Panel,
3962
4127
  {
3963
4128
  header: /* @__PURE__ */ jsxs14(Space12, { children: [
3964
- /* @__PURE__ */ jsx18(AppstoreOutlined, { style: { color: "#722ed1" } }),
3965
- /* @__PURE__ */ jsx18(Text8, { strong: true, children: getGroupLabel(group) }),
3966
- /* @__PURE__ */ jsx18(Tag6, { children: perms.length })
4129
+ /* @__PURE__ */ jsx19(AppstoreOutlined, { style: { color: "#722ed1" } }),
4130
+ /* @__PURE__ */ jsx19(Text9, { strong: true, children: getGroupLabel(group) }),
4131
+ /* @__PURE__ */ jsx19(Tag6, { children: perms.length })
3967
4132
  ] }),
3968
- children: /* @__PURE__ */ jsx18(
4133
+ children: /* @__PURE__ */ jsx19(
3969
4134
  Table4,
3970
4135
  {
3971
4136
  columns,
@@ -3979,16 +4144,16 @@ function PermissionsListCard({
3979
4144
  },
3980
4145
  group
3981
4146
  )) }),
3982
- filteredPermissions.length === 0 && !loading && /* @__PURE__ */ jsx18("div", { style: { textAlign: "center", padding: 40 }, children: /* @__PURE__ */ jsx18(Text8, { type: "secondary", children: labels.noData }) })
4147
+ filteredPermissions.length === 0 && !loading && /* @__PURE__ */ jsx19("div", { style: { textAlign: "center", padding: 40 }, children: /* @__PURE__ */ jsx19(Text9, { type: "secondary", children: labels.noData }) })
3983
4148
  ] });
3984
4149
  }
3985
4150
 
3986
4151
  // src/ant/components/TeamsListCard/TeamsListCard.tsx
3987
4152
  import { TeamOutlined as TeamOutlined3, KeyOutlined as KeyOutlined3, UserOutlined as UserOutlined2 } from "@ant-design/icons";
3988
- import { Card as Card6, Typography as Typography10, Tag as Tag7, Table as Table5, Empty as Empty3 } from "antd";
3989
- import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
3990
- var { Text: Text9 } = Typography10;
3991
- var defaultTranslations8 = {
4153
+ import { Card as Card6, Typography as Typography11, Tag as Tag7, Table as Table5, Empty as Empty3 } from "antd";
4154
+ import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
4155
+ var { Text: Text10 } = Typography11;
4156
+ var defaultTranslations9 = {
3992
4157
  name: "\u540D\u524D",
3993
4158
  memberCount: "\u30E1\u30F3\u30D0\u30FC\u6570",
3994
4159
  permissions: "\u6A29\u9650",
@@ -4002,15 +4167,15 @@ function TeamsListCard({
4002
4167
  loading = false,
4003
4168
  translations: t = {}
4004
4169
  }) {
4005
- const labels = { ...defaultTranslations8, ...t };
4170
+ const labels = { ...defaultTranslations9, ...t };
4006
4171
  const columns = [
4007
4172
  {
4008
4173
  title: labels.name,
4009
4174
  dataIndex: "name",
4010
4175
  key: "name",
4011
4176
  render: (name) => /* @__PURE__ */ jsxs15("span", { children: [
4012
- /* @__PURE__ */ jsx19(TeamOutlined3, { style: { marginRight: 8, color: "#1890ff" } }),
4013
- /* @__PURE__ */ jsx19(Text9, { strong: true, children: name })
4177
+ /* @__PURE__ */ jsx20(TeamOutlined3, { style: { marginRight: 8, color: "#1890ff" } }),
4178
+ /* @__PURE__ */ jsx20(Text10, { strong: true, children: name })
4014
4179
  ] })
4015
4180
  },
4016
4181
  {
@@ -4018,13 +4183,13 @@ function TeamsListCard({
4018
4183
  dataIndex: "member_count",
4019
4184
  key: "member_count",
4020
4185
  width: 120,
4021
- render: (count) => /* @__PURE__ */ jsx19(Tag7, { icon: /* @__PURE__ */ jsx19(UserOutlined2, {}), children: count })
4186
+ render: (count) => /* @__PURE__ */ jsx20(Tag7, { icon: /* @__PURE__ */ jsx20(UserOutlined2, {}), children: count })
4022
4187
  },
4023
4188
  {
4024
4189
  title: labels.permissions,
4025
4190
  dataIndex: "permissions",
4026
4191
  key: "permissions",
4027
- render: (permissions) => /* @__PURE__ */ jsx19("span", { children: permissions.length > 0 ? /* @__PURE__ */ jsxs15(Tag7, { color: "blue", children: [
4192
+ render: (permissions) => /* @__PURE__ */ jsx20("span", { children: permissions.length > 0 ? /* @__PURE__ */ jsxs15(Tag7, { color: "blue", children: [
4028
4193
  permissions.length,
4029
4194
  " ",
4030
4195
  labels.permissions
@@ -4034,16 +4199,16 @@ function TeamsListCard({
4034
4199
  ] }) })
4035
4200
  }
4036
4201
  ];
4037
- return /* @__PURE__ */ jsx19(Card6, { children: teams.length === 0 ? /* @__PURE__ */ jsx19(
4202
+ return /* @__PURE__ */ jsx20(Card6, { children: teams.length === 0 ? /* @__PURE__ */ jsx20(
4038
4203
  Empty3,
4039
4204
  {
4040
4205
  description: /* @__PURE__ */ jsxs15("span", { children: [
4041
4206
  labels.noTeams,
4042
- /* @__PURE__ */ jsx19("br", {}),
4043
- /* @__PURE__ */ jsx19(Text9, { type: "secondary", style: { fontSize: 12 }, children: labels.teamsFromConsole })
4207
+ /* @__PURE__ */ jsx20("br", {}),
4208
+ /* @__PURE__ */ jsx20(Text10, { type: "secondary", style: { fontSize: 12 }, children: labels.teamsFromConsole })
4044
4209
  ] })
4045
4210
  }
4046
- ) : /* @__PURE__ */ jsx19(
4211
+ ) : /* @__PURE__ */ jsx20(
4047
4212
  Table5,
4048
4213
  {
4049
4214
  columns,
@@ -4053,12 +4218,12 @@ function TeamsListCard({
4053
4218
  pagination: { pageSize: 10 },
4054
4219
  expandable: {
4055
4220
  expandedRowRender: (record) => /* @__PURE__ */ jsxs15("div", { style: { padding: "8px 0" }, children: [
4056
- /* @__PURE__ */ jsxs15(Text9, { strong: true, style: { marginBottom: 8, display: "block" }, children: [
4057
- /* @__PURE__ */ jsx19(KeyOutlined3, { style: { marginRight: 4 } }),
4221
+ /* @__PURE__ */ jsxs15(Text10, { strong: true, style: { marginBottom: 8, display: "block" }, children: [
4222
+ /* @__PURE__ */ jsx20(KeyOutlined3, { style: { marginRight: 4 } }),
4058
4223
  labels.teamPermissions,
4059
4224
  ":"
4060
4225
  ] }),
4061
- record.permissions.length === 0 ? /* @__PURE__ */ jsx19(Text9, { type: "secondary", children: labels.noData }) : /* @__PURE__ */ jsx19("div", { style: { display: "flex", flexWrap: "wrap", gap: 4 }, children: record.permissions.map((perm) => /* @__PURE__ */ jsx19(Tag7, { color: "cyan", children: perm }, perm)) })
4226
+ record.permissions.length === 0 ? /* @__PURE__ */ jsx20(Text10, { type: "secondary", children: labels.noData }) : /* @__PURE__ */ jsx20("div", { style: { display: "flex", flexWrap: "wrap", gap: 4 }, children: record.permissions.map((perm) => /* @__PURE__ */ jsx20(Tag7, { color: "cyan", children: perm }, perm)) })
4062
4227
  ] })
4063
4228
  }
4064
4229
  }
@@ -4070,8 +4235,8 @@ import { App, ConfigProvider, theme as theme3 } from "antd";
4070
4235
  import enUS from "antd/locale/en_US";
4071
4236
  import jaJP from "antd/locale/ja_JP";
4072
4237
  import viVN from "antd/locale/vi_VN";
4073
- import { useEffect as useEffect8 } from "react";
4074
- import { jsx as jsx20 } from "react/jsx-runtime";
4238
+ import { useEffect as useEffect9 } from "react";
4239
+ import { jsx as jsx21 } from "react/jsx-runtime";
4075
4240
  var antdLocales = {
4076
4241
  ja: jaJP,
4077
4242
  en: enUS,
@@ -4110,10 +4275,10 @@ function AntdThemeProvider({ children, variant = "dashboard", setDayjsLocale })
4110
4275
  const antdLocale = antdLocales[locale] ?? jaJP;
4111
4276
  const fontFamily = fontFamilies[locale] ?? fontFamilies.ja;
4112
4277
  const colors = themeColors[variant];
4113
- useEffect8(() => {
4278
+ useEffect9(() => {
4114
4279
  setDayjsLocale?.(locale);
4115
4280
  }, [locale, setDayjsLocale]);
4116
- return /* @__PURE__ */ jsx20(
4281
+ return /* @__PURE__ */ jsx21(
4117
4282
  ConfigProvider,
4118
4283
  {
4119
4284
  locale: antdLocale,
@@ -4242,7 +4407,7 @@ function AntdThemeProvider({ children, variant = "dashboard", setDayjsLocale })
4242
4407
  }
4243
4408
  }
4244
4409
  },
4245
- children: /* @__PURE__ */ jsx20(App, { children })
4410
+ children: /* @__PURE__ */ jsx21(App, { children })
4246
4411
  }
4247
4412
  );
4248
4413
  }
@@ -5186,6 +5351,7 @@ export {
5186
5351
  I18nProvider,
5187
5352
  LocaleSwitcher,
5188
5353
  OrgBranchSelectorModal,
5354
+ OrgGate,
5189
5355
  OrganizationSwitcher,
5190
5356
  DEFAULT_TEXTS as PROTABLE_DEFAULT_TEXTS,
5191
5357
  PageContainer,
@@ -5208,6 +5374,7 @@ export {
5208
5374
  branchCacheSchemas,
5209
5375
  branchCacheUpdateSchema,
5210
5376
  changeLanguage,
5377
+ clearOrgIdForApi,
5211
5378
  createAuthService,
5212
5379
  createBranchHeaderSetter,
5213
5380
  createBranchService,
@@ -5219,7 +5386,7 @@ export {
5219
5386
  createUserRoleService,
5220
5387
  createUserService,
5221
5388
  defaultLocale2 as defaultLocale,
5222
- defaultTranslations,
5389
+ defaultTranslations2 as defaultTranslations,
5223
5390
  fallbackLocale,
5224
5391
  getBranchCacheFieldLabel,
5225
5392
  getBranchCacheFieldPlaceholder,
@@ -5228,6 +5395,7 @@ export {
5228
5395
  getEffectivePermissions,
5229
5396
  getMessage,
5230
5397
  getMessages,
5398
+ getOrgIdForApi,
5231
5399
  getOrganizationCacheFieldLabel,
5232
5400
  getOrganizationCacheFieldPlaceholder,
5233
5401
  getOrganizationCacheLabel,
@@ -5252,6 +5420,7 @@ export {
5252
5420
  getUserCacheFieldLabel,
5253
5421
  getUserCacheFieldPlaceholder,
5254
5422
  getUserCacheLabel,
5423
+ hasOrgIdForApi,
5255
5424
  localeNames,
5256
5425
  locales,
5257
5426
  organizationCacheCreateSchema,
@@ -5271,6 +5440,7 @@ export {
5271
5440
  roleSchemas,
5272
5441
  roleUpdateSchema,
5273
5442
  setBranchHeaders,
5443
+ setOrgIdForApi,
5274
5444
  ssoNamespace,
5275
5445
  ssoQueryKeys,
5276
5446
  supportedLocales,