@cundi/refine-xaf 1.0.3 → 1.0.5

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.mjs CHANGED
@@ -719,11 +719,215 @@ var validatePasswordStrength = (password) => {
719
719
  return { isValid: true, message: "Password is strong" };
720
720
  };
721
721
 
722
+ // src/i18n/index.ts
723
+ var en = {
724
+ pages: {
725
+ login: {
726
+ title: "Sign in to your account",
727
+ buttons: {
728
+ submit: "Sign in"
729
+ }
730
+ }
731
+ },
732
+ buttons: {
733
+ create: "Create",
734
+ edit: "Edit",
735
+ delete: "Delete",
736
+ save: "Save",
737
+ cancel: "Cancel",
738
+ refresh: "Refresh",
739
+ list: "List",
740
+ logout: "Logout"
741
+ },
742
+ actions: {
743
+ create: "Create",
744
+ edit: "Edit",
745
+ show: "Show",
746
+ list: "List",
747
+ delete: "Delete"
748
+ },
749
+ components: {
750
+ header: {
751
+ theme: {
752
+ light: "Light Mode",
753
+ dark: "Dark Mode"
754
+ },
755
+ language: {
756
+ en: "English",
757
+ "zh-TW": "Traditional Chinese"
758
+ },
759
+ menu: {
760
+ changePhoto: "Change Photo",
761
+ manageAccount: "Manage Account in Keycloak",
762
+ changePassword: "Change Password",
763
+ logout: "Logout"
764
+ }
765
+ },
766
+ base64Upload: {
767
+ upload: "Upload"
768
+ },
769
+ relatedList: {
770
+ addDetail: "Add Detail",
771
+ actions: "Actions",
772
+ manageDetail: "Manage Detail",
773
+ deleteConfirm: "Are you sure you want to delete this detail?"
774
+ },
775
+ smartList: {
776
+ search: "Search...",
777
+ refresh: "Refresh",
778
+ columns: "Columns",
779
+ selectColumns: "Select Columns",
780
+ reset: "Reset"
781
+ },
782
+ tiptapEditor: {
783
+ placeholder: "Write something...",
784
+ textColor: "Text Color",
785
+ highlight: "Highlight",
786
+ insertTable: "Insert Table",
787
+ deleteTable: "Delete Table",
788
+ emoji: "Emoji",
789
+ addRowBefore: "Add Row Before",
790
+ addRowAfter: "Add Row After",
791
+ deleteRow: "Delete Row",
792
+ addColumnBefore: "Add Column Before",
793
+ addColumnAfter: "Add Column After",
794
+ deleteColumn: "Delete Column",
795
+ math: "Math (LaTeX)",
796
+ youtube: "YouTube",
797
+ enterYoutubeUrl: "Enter YouTube URL"
798
+ },
799
+ drawioEditor: {
800
+ loading: "Loading diagram editor..."
801
+ }
802
+ },
803
+ common: {
804
+ actions: {
805
+ create: "Create",
806
+ edit: "Edit",
807
+ delete: "Delete",
808
+ save: "Save",
809
+ cancel: "Cancel"
810
+ }
811
+ },
812
+ sider: {
813
+ dashboard: "Dashboard",
814
+ dataTypeExamples: "Data Type Examples",
815
+ tiptapExamples: "Tiptap Examples",
816
+ drawioExamples: "Drawio Examples",
817
+ users: "Users",
818
+ roles: "Roles",
819
+ settings: "Settings"
820
+ }
821
+ };
822
+ var zhTW = {
823
+ pages: {
824
+ login: {
825
+ title: "\u767B\u5165\u60A8\u7684\u5E33\u6236",
826
+ buttons: {
827
+ submit: "\u767B\u5165"
828
+ }
829
+ }
830
+ },
831
+ buttons: {
832
+ create: "\u65B0\u589E",
833
+ edit: "\u7DE8\u8F2F",
834
+ delete: "\u522A\u9664",
835
+ save: "\u5132\u5B58",
836
+ cancel: "\u53D6\u6D88",
837
+ refresh: "\u91CD\u65B0\u6574\u7406",
838
+ list: "\u5217\u8868",
839
+ logout: "\u767B\u51FA"
840
+ },
841
+ actions: {
842
+ create: "\u65B0\u589E",
843
+ edit: "\u7DE8\u8F2F",
844
+ show: "\u986F\u793A",
845
+ list: "\u5217\u8868",
846
+ delete: "\u522A\u9664"
847
+ },
848
+ components: {
849
+ header: {
850
+ theme: {
851
+ light: "\u5207\u63DB\u70BA\u4EAE\u8272\u6A21\u5F0F",
852
+ dark: "\u5207\u63DB\u70BA\u6697\u8272\u6A21\u5F0F"
853
+ },
854
+ language: {
855
+ en: "English",
856
+ "zh-TW": "\u7E41\u9AD4\u4E2D\u6587"
857
+ },
858
+ menu: {
859
+ changePhoto: "\u66F4\u63DB\u982D\u50CF",
860
+ manageAccount: "\u5728 Keycloak \u7BA1\u7406\u5E33\u865F",
861
+ changePassword: "\u8B8A\u66F4\u5BC6\u78BC",
862
+ logout: "\u767B\u51FA"
863
+ }
864
+ },
865
+ base64Upload: {
866
+ upload: "\u4E0A\u50B3"
867
+ },
868
+ relatedList: {
869
+ addDetail: "\u65B0\u589E\u660E\u7D30",
870
+ actions: "\u64CD\u4F5C",
871
+ manageDetail: "\u7BA1\u7406\u660E\u7D30",
872
+ deleteConfirm: "\u60A8\u78BA\u5B9A\u8981\u522A\u9664\u6B64\u9805\u76EE\u55CE\uFF1F"
873
+ },
874
+ smartList: {
875
+ search: "\u641C\u5C0B...",
876
+ refresh: "\u91CD\u65B0\u6574\u7406",
877
+ columns: "\u6B04\u4F4D",
878
+ selectColumns: "\u9078\u64C7\u6B04\u4F4D",
879
+ reset: "\u91CD\u7F6E"
880
+ },
881
+ tiptapEditor: {
882
+ placeholder: "\u8F38\u5165\u5167\u5BB9...",
883
+ textColor: "\u6587\u5B57\u984F\u8272",
884
+ highlight: "\u87A2\u5149\u7B46",
885
+ insertTable: "\u63D2\u5165\u8868\u683C",
886
+ deleteTable: "\u522A\u9664\u8868\u683C",
887
+ emoji: "\u8868\u60C5\u7B26\u865F",
888
+ addRowBefore: "\u5728\u4E0A\u65B9\u63D2\u5165\u5217",
889
+ addRowAfter: "\u5728\u4E0B\u65B9\u63D2\u5165\u5217",
890
+ deleteRow: "\u522A\u9664\u5217",
891
+ addColumnBefore: "\u5728\u5DE6\u65B9\u63D2\u5165\u6B04",
892
+ addColumnAfter: "\u5728\u53F3\u65B9\u63D2\u5165\u6B04",
893
+ deleteColumn: "\u522A\u9664\u6B04",
894
+ math: "\u6578\u5B78\u516C\u5F0F (LaTeX)",
895
+ youtube: "YouTube \u5F71\u7247",
896
+ enterYoutubeUrl: "\u8F38\u5165 YouTube \u7DB2\u5740"
897
+ },
898
+ drawioEditor: {
899
+ loading: "\u8F09\u5165\u5716\u8868\u7DE8\u8F2F\u5668\u4E2D..."
900
+ }
901
+ },
902
+ common: {
903
+ actions: {
904
+ create: "\u65B0\u589E",
905
+ edit: "\u7DE8\u8F2F",
906
+ delete: "\u522A\u9664",
907
+ save: "\u5132\u5B58",
908
+ cancel: "\u53D6\u6D88"
909
+ }
910
+ },
911
+ sider: {
912
+ dashboard: "\u5100\u8868\u677F",
913
+ dataTypeExamples: "\u8CC7\u6599\u985E\u578B\u7BC4\u4F8B",
914
+ tiptapExamples: "Tiptap \u7BC4\u4F8B",
915
+ drawioExamples: "Drawio \u7BC4\u4F8B",
916
+ users: "\u4F7F\u7528\u8005",
917
+ roles: "\u89D2\u8272",
918
+ settings: "\u8A2D\u5B9A"
919
+ }
920
+ };
921
+ var refineXafTranslations = {
922
+ en,
923
+ "zh-TW": zhTW
924
+ };
925
+
722
926
  // src/components/Header.tsx
723
927
  import React3, { useState as useState2, useEffect as useEffect2 } from "react";
724
928
  import { useLogout, useGetIdentity, useInvalidate, useUpdatePassword } from "@refinedev/core";
725
929
  import { Layout, Button, Space, Typography, Avatar, theme as theme2, Dropdown, Modal, Form, Input, message } from "antd/lib";
726
- import { LogoutOutlined, UserOutlined, DownOutlined, SunOutlined, MoonOutlined, CameraOutlined, LockOutlined, ThunderboltOutlined } from "@ant-design/icons";
930
+ import { LogoutOutlined, UserOutlined, DownOutlined, SunOutlined, MoonOutlined, CameraOutlined, LockOutlined, ThunderboltOutlined, GlobalOutlined } from "@ant-design/icons";
727
931
 
728
932
  // src/contexts/color-mode.tsx
729
933
  import React, {
@@ -790,7 +994,9 @@ var useColorMode = () => {
790
994
  // src/components/Base64Upload.tsx
791
995
  import React2 from "react";
792
996
  import { Upload } from "antd/lib";
997
+ import { useTranslation } from "react-i18next";
793
998
  var Base64Upload = ({ value, onChange }) => {
999
+ const { t } = useTranslation();
794
1000
  return /* @__PURE__ */ React2.createElement(
795
1001
  Upload,
796
1002
  {
@@ -808,11 +1014,12 @@ var Base64Upload = ({ value, onChange }) => {
808
1014
  return false;
809
1015
  }
810
1016
  },
811
- value ? /* @__PURE__ */ React2.createElement("img", { src: `data:image/png;base64,${value}`, alt: "avatar", style: { width: "100%" } }) : /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement("div", { style: { marginTop: 8 } }, "Upload"))
1017
+ value ? /* @__PURE__ */ React2.createElement("img", { src: `data:image/png;base64,${value}`, alt: "avatar", style: { width: "100%" } }) : /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement("div", { style: { marginTop: 8 } }, t("components.base64Upload.upload", "Upload")))
812
1018
  );
813
1019
  };
814
1020
 
815
1021
  // src/components/Header.tsx
1022
+ import { useTranslation as useTranslation2 } from "react-i18next";
816
1023
  var { Text } = Typography;
817
1024
  var { useToken } = theme2;
818
1025
  var Header = () => {
@@ -822,6 +1029,11 @@ var Header = () => {
822
1029
  const { mode, setMode } = useColorMode();
823
1030
  const { token } = useToken();
824
1031
  const invalidate = useInvalidate();
1032
+ const { t: translate, i18n } = useTranslation2();
1033
+ const currentLocale = i18n.language;
1034
+ const handleLanguageChange = (lang) => {
1035
+ i18n.changeLanguage(lang);
1036
+ };
825
1037
  const [authProvider2, setAuthProvider] = useState2(null);
826
1038
  useEffect2(() => {
827
1039
  if (user) {
@@ -892,7 +1104,7 @@ var Header = () => {
892
1104
  },
893
1105
  {
894
1106
  key: "change-photo",
895
- label: "Change Photo",
1107
+ label: translate("components.header.menu.changePhoto", "Change Photo"),
896
1108
  icon: /* @__PURE__ */ React3.createElement(CameraOutlined, null),
897
1109
  onClick: () => {
898
1110
  photoForm.setFieldsValue({ Photo: user?.avatar?.replace("data:image/png;base64,", "") });
@@ -901,7 +1113,7 @@ var Header = () => {
901
1113
  },
902
1114
  {
903
1115
  key: "change-password",
904
- label: authProvider2 === "keycloak" ? "Manage Account in Keycloak" : "Change Password",
1116
+ label: authProvider2 === "keycloak" ? translate("components.header.menu.manageAccount", "Manage Account in Keycloak") : translate("components.header.menu.changePassword", "Change Password"),
905
1117
  icon: /* @__PURE__ */ React3.createElement(LockOutlined, null),
906
1118
  onClick: () => {
907
1119
  if (authProvider2 === "keycloak") {
@@ -920,13 +1132,13 @@ var Header = () => {
920
1132
  },
921
1133
  {
922
1134
  key: "theme",
923
- label: mode === "light" ? "Dark Theme" : "Light Theme",
1135
+ label: mode === "light" ? translate("components.header.theme.dark", "Dark Theme") : translate("components.header.theme.light", "Light Theme"),
924
1136
  icon: mode === "light" ? /* @__PURE__ */ React3.createElement(MoonOutlined, null) : /* @__PURE__ */ React3.createElement(SunOutlined, null),
925
1137
  onClick: () => setMode(mode === "light" ? "dark" : "light")
926
1138
  },
927
1139
  {
928
1140
  key: "logout",
929
- label: "Logout",
1141
+ label: translate("components.header.menu.logout", "Logout"),
930
1142
  icon: /* @__PURE__ */ React3.createElement(LogoutOutlined, null),
931
1143
  onClick: () => logout()
932
1144
  }
@@ -946,7 +1158,29 @@ var Header = () => {
946
1158
  zIndex: 1
947
1159
  }
948
1160
  },
949
- /* @__PURE__ */ React3.createElement(Space, null, /* @__PURE__ */ React3.createElement(Dropdown, { menu: { items: menuItems }, trigger: ["click"] }, /* @__PURE__ */ React3.createElement(Button, { type: "text", style: { height: 48 } }, /* @__PURE__ */ React3.createElement(Space, null, /* @__PURE__ */ React3.createElement(Avatar, { src: user?.avatar, alt: user?.name, icon: /* @__PURE__ */ React3.createElement(UserOutlined, null) }), /* @__PURE__ */ React3.createElement(Text, null, user?.name), /* @__PURE__ */ React3.createElement(DownOutlined, { style: { fontSize: 12 } }))))),
1161
+ /* @__PURE__ */ React3.createElement(Space, null, /* @__PURE__ */ React3.createElement(
1162
+ Dropdown,
1163
+ {
1164
+ menu: {
1165
+ items: [
1166
+ {
1167
+ key: "en",
1168
+ label: translate("components.header.language.en", "English"),
1169
+ onClick: () => handleLanguageChange("en"),
1170
+ disabled: currentLocale === "en"
1171
+ },
1172
+ {
1173
+ key: "zh-TW",
1174
+ label: translate("components.header.language.zh-TW", "\u7E41\u9AD4\u4E2D\u6587"),
1175
+ onClick: () => handleLanguageChange("zh-TW"),
1176
+ disabled: currentLocale === "zh-TW"
1177
+ }
1178
+ ]
1179
+ },
1180
+ trigger: ["click"]
1181
+ },
1182
+ /* @__PURE__ */ React3.createElement(Button, { type: "text", icon: /* @__PURE__ */ React3.createElement(GlobalOutlined, null) }, currentLocale === "zh-TW" ? "\u7E41\u9AD4\u4E2D\u6587" : "English", " ", /* @__PURE__ */ React3.createElement(DownOutlined, null))
1183
+ ), /* @__PURE__ */ React3.createElement(Dropdown, { menu: { items: menuItems }, trigger: ["click"] }, /* @__PURE__ */ React3.createElement(Button, { type: "text", style: { height: 48 } }, /* @__PURE__ */ React3.createElement(Space, null, /* @__PURE__ */ React3.createElement(Avatar, { src: user?.avatar, alt: user?.name, icon: /* @__PURE__ */ React3.createElement(UserOutlined, null) }), /* @__PURE__ */ React3.createElement(Text, null, user?.name), /* @__PURE__ */ React3.createElement(DownOutlined, { style: { fontSize: 12 } }))))),
950
1184
  /* @__PURE__ */ React3.createElement(
951
1185
  Modal,
952
1186
  {
@@ -989,11 +1223,13 @@ import {
989
1223
  } from "@refinedev/antd";
990
1224
  import { Table, Form as Form2, Input as Input2, Popover, Checkbox, Button as Button2, Space as Space2 } from "antd/lib";
991
1225
  import { SettingOutlined, ReloadOutlined, SearchOutlined } from "@ant-design/icons";
1226
+ import { useTranslation as useTranslation3 } from "react-i18next";
992
1227
  var SmartList = ({
993
1228
  children,
994
1229
  resource,
995
1230
  searchFields
996
1231
  }) => {
1232
+ const { t } = useTranslation3();
997
1233
  const { tableProps, searchFormProps, tableQuery, setFilters } = useTable({
998
1234
  resource,
999
1235
  syncWithLocation: true,
@@ -1064,7 +1300,7 @@ var SmartList = ({
1064
1300
  setVisibleColumns(defaultVisible);
1065
1301
  localStorage.removeItem(`table-columns-${resource}`);
1066
1302
  };
1067
- const content = /* @__PURE__ */ React4.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "8px" } }, /* @__PURE__ */ React4.createElement("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "4px" } }, /* @__PURE__ */ React4.createElement("span", { style: { fontWeight: 500 } }, "Select Columns"), /* @__PURE__ */ React4.createElement(Button2, { size: "small", type: "link", onClick: handleResetColumns, style: { padding: 0 } }, "Reset")), columns.filter((col) => col.dataIndex !== "actions").map((col) => /* @__PURE__ */ React4.createElement(
1303
+ const content = /* @__PURE__ */ React4.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "8px" } }, /* @__PURE__ */ React4.createElement("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "4px" } }, /* @__PURE__ */ React4.createElement("span", { style: { fontWeight: 500 } }, t("components.smartList.selectColumns", "Select Columns")), /* @__PURE__ */ React4.createElement(Button2, { size: "small", type: "link", onClick: handleResetColumns, style: { padding: 0 } }, t("components.smartList.reset", "Reset"))), columns.filter((col) => col.dataIndex !== "actions").map((col) => /* @__PURE__ */ React4.createElement(
1068
1304
  Checkbox,
1069
1305
  {
1070
1306
  key: col.key,
@@ -1085,7 +1321,7 @@ var SmartList = ({
1085
1321
  return /* @__PURE__ */ React4.createElement(List, null, /* @__PURE__ */ React4.createElement("div", { style: { display: "flex", justifyContent: "space-between", marginBottom: 20 } }, /* @__PURE__ */ React4.createElement(Form2, { ...searchFormProps, layout: "inline" }, /* @__PURE__ */ React4.createElement(Form2.Item, { name: "search" }, /* @__PURE__ */ React4.createElement(
1086
1322
  Input2,
1087
1323
  {
1088
- placeholder: "Search...",
1324
+ placeholder: t("components.smartList.search", "Search..."),
1089
1325
  style: { width: 300 },
1090
1326
  allowClear: true,
1091
1327
  suffix: /* @__PURE__ */ React4.createElement(
@@ -1114,7 +1350,7 @@ var SmartList = ({
1114
1350
  }
1115
1351
  }
1116
1352
  }
1117
- ))), /* @__PURE__ */ React4.createElement(Space2, null, /* @__PURE__ */ React4.createElement(Button2, { icon: /* @__PURE__ */ React4.createElement(ReloadOutlined, null), onClick: () => tableQuery?.refetch() }, "Refresh"), /* @__PURE__ */ React4.createElement(Popover, { content, title: "Columns", trigger: "click", placement: "bottomRight" }, /* @__PURE__ */ React4.createElement(Button2, { icon: /* @__PURE__ */ React4.createElement(SettingOutlined, null) }, "Columns")))), /* @__PURE__ */ React4.createElement(Table, { ...tableProps, rowKey: "Oid" }, filteredChildren));
1353
+ ))), /* @__PURE__ */ React4.createElement(Space2, null, /* @__PURE__ */ React4.createElement(Button2, { icon: /* @__PURE__ */ React4.createElement(ReloadOutlined, null), onClick: () => tableQuery?.refetch() }, t("components.smartList.refresh", "Refresh")), /* @__PURE__ */ React4.createElement(Popover, { content, title: t("components.smartList.columns", "Columns"), trigger: "click", placement: "bottomRight" }, /* @__PURE__ */ React4.createElement(Button2, { icon: /* @__PURE__ */ React4.createElement(SettingOutlined, null) }, t("components.smartList.columns", "Columns"))))), /* @__PURE__ */ React4.createElement(Table, { ...tableProps, rowKey: "Oid" }, filteredChildren));
1118
1354
  };
1119
1355
 
1120
1356
  // src/components/RelatedList.tsx
@@ -1123,6 +1359,7 @@ import { Table as Table2, Button as Button3, Space as Space3, Modal as Modal2, F
1123
1359
  import { EditOutlined, DeleteOutlined, PlusOutlined } from "@ant-design/icons";
1124
1360
  import { useModalForm } from "@refinedev/antd";
1125
1361
  import { useDelete } from "@refinedev/core";
1362
+ import { useTranslation as useTranslation4 } from "react-i18next";
1126
1363
  var DetailModal = ({
1127
1364
  modalForm,
1128
1365
  mode,
@@ -1168,9 +1405,12 @@ var RelatedList = ({
1168
1405
  dataSource,
1169
1406
  onMutationSuccess,
1170
1407
  FormFields,
1171
- modalTitle = "Manage Detail",
1408
+ modalTitle,
1172
1409
  children
1173
1410
  }) => {
1411
+ const { t } = useTranslation4();
1412
+ const defaultTitle = t("components.relatedList.manageDetail", "Manage Detail");
1413
+ const finalModalTitle = modalTitle || defaultTitle;
1174
1414
  const createModalForm = useModalForm({
1175
1415
  resource,
1176
1416
  action: "create",
@@ -1185,7 +1425,7 @@ var RelatedList = ({
1185
1425
  });
1186
1426
  const { mutate: deleteMutate } = useDelete();
1187
1427
  const handleDelete = (id) => {
1188
- if (confirm("Are you sure you want to delete this detail?")) {
1428
+ if (confirm(t("components.relatedList.deleteConfirm", "Are you sure you want to delete this detail?"))) {
1189
1429
  deleteMutate({
1190
1430
  resource,
1191
1431
  id,
@@ -1204,7 +1444,7 @@ var RelatedList = ({
1204
1444
  disabled: !masterId,
1205
1445
  "data-testid": "add-detail-btn"
1206
1446
  },
1207
- "Add Detail"
1447
+ t("components.relatedList.addDetail", "Add Detail")
1208
1448
  )), /* @__PURE__ */ React5.createElement(
1209
1449
  Table2,
1210
1450
  {
@@ -1218,7 +1458,7 @@ var RelatedList = ({
1218
1458
  /* @__PURE__ */ React5.createElement(
1219
1459
  Table2.Column,
1220
1460
  {
1221
- title: "Actions",
1461
+ title: t("components.relatedList.actions", "Actions"),
1222
1462
  key: "actions",
1223
1463
  width: 120,
1224
1464
  render: (_, record) => /* @__PURE__ */ React5.createElement(Space3, null, /* @__PURE__ */ React5.createElement(
@@ -1244,7 +1484,7 @@ var RelatedList = ({
1244
1484
  {
1245
1485
  modalForm: createModalForm,
1246
1486
  mode: "create",
1247
- modalTitle,
1487
+ modalTitle: finalModalTitle,
1248
1488
  FormFields,
1249
1489
  masterField,
1250
1490
  masterId
@@ -1254,7 +1494,7 @@ var RelatedList = ({
1254
1494
  {
1255
1495
  modalForm: editModalForm,
1256
1496
  mode: "edit",
1257
- modalTitle,
1497
+ modalTitle: finalModalTitle,
1258
1498
  FormFields,
1259
1499
  masterField,
1260
1500
  masterId
@@ -1264,6 +1504,7 @@ var RelatedList = ({
1264
1504
 
1265
1505
  // src/components/TiptapEditor.tsx
1266
1506
  import React6, { useEffect as useEffect4 } from "react";
1507
+ import { useTranslation as useTranslation5 } from "react-i18next";
1267
1508
  import { useEditor, EditorContent } from "@tiptap/react";
1268
1509
  import StarterKit from "@tiptap/starter-kit";
1269
1510
  import Image from "@tiptap/extension-image";
@@ -18510,6 +18751,7 @@ import {
18510
18751
  } from "@ant-design/icons";
18511
18752
  var TiptapEditor = ({ value, onChange, disabled }) => {
18512
18753
  const { token } = theme3.useToken();
18754
+ const { t } = useTranslation5();
18513
18755
  const editor = useEditor({
18514
18756
  extensions: [
18515
18757
  StarterKit,
@@ -18540,7 +18782,7 @@ var TiptapEditor = ({ value, onChange, disabled }) => {
18540
18782
  TextStyle,
18541
18783
  Color,
18542
18784
  index_default.configure({
18543
- placeholder: "Write something..."
18785
+ placeholder: t("components.tiptapEditor.placeholder", "Write something...")
18544
18786
  })
18545
18787
  ],
18546
18788
  content: value,
@@ -18625,7 +18867,7 @@ var TiptapEditor = ({ value, onChange, disabled }) => {
18625
18867
  onClick: () => editor.chain().focus().toggleHighlight().run(),
18626
18868
  disabled,
18627
18869
  size: "small",
18628
- title: "Highlight"
18870
+ title: t("components.tiptapEditor.highlight", "Highlight")
18629
18871
  }
18630
18872
  ), /* @__PURE__ */ React6.createElement(
18631
18873
  ColorPicker,
@@ -18643,7 +18885,7 @@ var TiptapEditor = ({ value, onChange, disabled }) => {
18643
18885
  icon: /* @__PURE__ */ React6.createElement(FontColorsOutlined, { style: { color: editor.getAttributes("textStyle").color } }),
18644
18886
  disabled,
18645
18887
  size: "small",
18646
- title: "Text Color"
18888
+ title: t("components.tiptapEditor.textColor", "Text Color")
18647
18889
  }
18648
18890
  )
18649
18891
  ), /* @__PURE__ */ React6.createElement(
@@ -18708,7 +18950,7 @@ var TiptapEditor = ({ value, onChange, disabled }) => {
18708
18950
  onClick: () => editor.chain().focus().toggleMath().run(),
18709
18951
  disabled,
18710
18952
  size: "small",
18711
- title: "Math (LaTeX)"
18953
+ title: t("components.tiptapEditor.math", "Math (LaTeX)")
18712
18954
  }
18713
18955
  ), /* @__PURE__ */ React6.createElement(
18714
18956
  Button4,
@@ -18716,14 +18958,14 @@ var TiptapEditor = ({ value, onChange, disabled }) => {
18716
18958
  type: editor.isActive("youtube") ? "primary" : "text",
18717
18959
  icon: /* @__PURE__ */ React6.createElement(YoutubeOutlined, null),
18718
18960
  onClick: () => {
18719
- const url = window.prompt("Enter YouTube URL");
18961
+ const url = window.prompt(t("components.tiptapEditor.enterYoutubeUrl", "Enter YouTube URL"));
18720
18962
  if (url) {
18721
18963
  editor.commands.setYoutubeVideo({ src: url });
18722
18964
  }
18723
18965
  },
18724
18966
  disabled,
18725
18967
  size: "small",
18726
- title: "YouTube"
18968
+ title: t("components.tiptapEditor.youtube", "YouTube")
18727
18969
  }
18728
18970
  ), /* @__PURE__ */ React6.createElement(
18729
18971
  Button4,
@@ -18733,7 +18975,7 @@ var TiptapEditor = ({ value, onChange, disabled }) => {
18733
18975
  onClick: () => editor.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run(),
18734
18976
  disabled,
18735
18977
  size: "small",
18736
- title: "Insert Table"
18978
+ title: t("components.tiptapEditor.insertTable", "Insert Table")
18737
18979
  }
18738
18980
  ), /* @__PURE__ */ React6.createElement(
18739
18981
  Button4,
@@ -18743,7 +18985,7 @@ var TiptapEditor = ({ value, onChange, disabled }) => {
18743
18985
  onClick: () => editor.chain().focus().deleteTable().run(),
18744
18986
  disabled: !editor.can().deleteTable() || disabled,
18745
18987
  size: "small",
18746
- title: "Delete Table"
18988
+ title: t("components.tiptapEditor.deleteTable", "Delete Table")
18747
18989
  }
18748
18990
  ), /* @__PURE__ */ React6.createElement(
18749
18991
  Popover2,
@@ -18768,7 +19010,7 @@ var TiptapEditor = ({ value, onChange, disabled }) => {
18768
19010
  icon: /* @__PURE__ */ React6.createElement(SmileOutlined, null),
18769
19011
  disabled,
18770
19012
  size: "small",
18771
- title: "Emoji"
19013
+ title: t("components.tiptapEditor.emoji", "Emoji")
18772
19014
  }
18773
19015
  )
18774
19016
  ), editor.isActive("table") && /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
@@ -18779,7 +19021,7 @@ var TiptapEditor = ({ value, onChange, disabled }) => {
18779
19021
  onClick: () => editor.chain().focus().addRowBefore().run(),
18780
19022
  disabled,
18781
19023
  size: "small",
18782
- title: "Add Row Before"
19024
+ title: t("components.tiptapEditor.addRowBefore", "Add Row Before")
18783
19025
  }
18784
19026
  ), /* @__PURE__ */ React6.createElement(
18785
19027
  Button4,
@@ -18789,7 +19031,7 @@ var TiptapEditor = ({ value, onChange, disabled }) => {
18789
19031
  onClick: () => editor.chain().focus().addRowAfter().run(),
18790
19032
  disabled,
18791
19033
  size: "small",
18792
- title: "Add Row After"
19034
+ title: t("components.tiptapEditor.addRowAfter", "Add Row After")
18793
19035
  }
18794
19036
  ), /* @__PURE__ */ React6.createElement(
18795
19037
  Button4,
@@ -18799,7 +19041,7 @@ var TiptapEditor = ({ value, onChange, disabled }) => {
18799
19041
  onClick: () => editor.chain().focus().deleteRow().run(),
18800
19042
  disabled: !editor.can().deleteRow() || disabled,
18801
19043
  size: "small",
18802
- title: "Delete Row"
19044
+ title: t("components.tiptapEditor.deleteRow", "Delete Row")
18803
19045
  }
18804
19046
  ), /* @__PURE__ */ React6.createElement(
18805
19047
  Button4,
@@ -18809,7 +19051,7 @@ var TiptapEditor = ({ value, onChange, disabled }) => {
18809
19051
  onClick: () => editor.chain().focus().addColumnBefore().run(),
18810
19052
  disabled,
18811
19053
  size: "small",
18812
- title: "Add Column Before"
19054
+ title: t("components.tiptapEditor.addColumnBefore", "Add Column Before")
18813
19055
  }
18814
19056
  ), /* @__PURE__ */ React6.createElement(
18815
19057
  Button4,
@@ -18819,7 +19061,7 @@ var TiptapEditor = ({ value, onChange, disabled }) => {
18819
19061
  onClick: () => editor.chain().focus().addColumnAfter().run(),
18820
19062
  disabled,
18821
19063
  size: "small",
18822
- title: "Add Column After"
19064
+ title: t("components.tiptapEditor.addColumnAfter", "Add Column After")
18823
19065
  }
18824
19066
  ), /* @__PURE__ */ React6.createElement(
18825
19067
  Button4,
@@ -18829,7 +19071,7 @@ var TiptapEditor = ({ value, onChange, disabled }) => {
18829
19071
  onClick: () => editor.chain().focus().deleteColumn().run(),
18830
19072
  disabled: !editor.can().deleteColumn() || disabled,
18831
19073
  size: "small",
18832
- title: "Delete Column"
19074
+ title: t("components.tiptapEditor.deleteColumn", "Delete Column")
18833
19075
  }
18834
19076
  ))), /* @__PURE__ */ React6.createElement(Space4, { style: { marginLeft: "auto" } }, /* @__PURE__ */ React6.createElement(
18835
19077
  Button4,
@@ -18868,10 +19110,109 @@ var TiptapEditor = ({ value, onChange, disabled }) => {
18868
19110
  );
18869
19111
  };
18870
19112
 
19113
+ // src/components/DrawioEditor.tsx
19114
+ import React7, { useRef, useState as useState4, useMemo as useMemo2 } from "react";
19115
+ import { useTranslation as useTranslation6 } from "react-i18next";
19116
+ import { DrawIoEmbed } from "react-drawio";
19117
+ import { theme as theme4, Spin } from "antd/lib";
19118
+ var mapLanguageToDrawio = (lang) => {
19119
+ const langMap = {
19120
+ "zh-TW": "zh-tw",
19121
+ "zh-CN": "zh",
19122
+ "zh": "zh",
19123
+ "en": "en",
19124
+ "ja": "ja",
19125
+ "ko": "ko",
19126
+ "de": "de",
19127
+ "fr": "fr",
19128
+ "es": "es",
19129
+ "pt": "pt",
19130
+ "ru": "ru"
19131
+ };
19132
+ return langMap[lang] || lang.toLowerCase();
19133
+ };
19134
+ var DrawioEditor = ({
19135
+ value,
19136
+ onChange,
19137
+ disabled = false,
19138
+ height = 500,
19139
+ autosave = true
19140
+ }) => {
19141
+ const { token } = theme4.useToken();
19142
+ const { t, i18n } = useTranslation6();
19143
+ const drawioRef = useRef(null);
19144
+ const [isLoading, setIsLoading] = useState4(true);
19145
+ const drawioLang = useMemo2(() => mapLanguageToDrawio(i18n.language), [i18n.language]);
19146
+ const handleSave = (data) => {
19147
+ if (onChange && data.xml) {
19148
+ onChange(data.xml);
19149
+ }
19150
+ };
19151
+ const handleAutoSave = (data) => {
19152
+ if (onChange && data.xml) {
19153
+ onChange(data.xml);
19154
+ }
19155
+ };
19156
+ const handleLoad = () => {
19157
+ setIsLoading(false);
19158
+ };
19159
+ return /* @__PURE__ */ React7.createElement(
19160
+ "div",
19161
+ {
19162
+ style: {
19163
+ border: `1px solid ${token.colorBorder}`,
19164
+ borderRadius: token.borderRadiusLG,
19165
+ overflow: "hidden",
19166
+ backgroundColor: token.colorBgContainer,
19167
+ position: "relative",
19168
+ height: typeof height === "number" ? `${height}px` : height
19169
+ }
19170
+ },
19171
+ isLoading && /* @__PURE__ */ React7.createElement(
19172
+ "div",
19173
+ {
19174
+ style: {
19175
+ position: "absolute",
19176
+ top: 0,
19177
+ left: 0,
19178
+ right: 0,
19179
+ bottom: 0,
19180
+ display: "flex",
19181
+ alignItems: "center",
19182
+ justifyContent: "center",
19183
+ backgroundColor: token.colorBgContainer,
19184
+ zIndex: 10
19185
+ }
19186
+ },
19187
+ /* @__PURE__ */ React7.createElement(Spin, { tip: t("components.drawioEditor.loading", "Loading diagram editor...") })
19188
+ ),
19189
+ /* @__PURE__ */ React7.createElement(
19190
+ DrawIoEmbed,
19191
+ {
19192
+ ref: drawioRef,
19193
+ xml: value,
19194
+ autosave: autosave && !disabled,
19195
+ urlParameters: {
19196
+ ui: "kennedy",
19197
+ spin: true,
19198
+ libraries: true,
19199
+ saveAndExit: false,
19200
+ noSaveBtn: disabled,
19201
+ noExitBtn: true,
19202
+ lang: drawioLang
19203
+ },
19204
+ onLoad: handleLoad,
19205
+ onSave: handleSave,
19206
+ onAutoSave: handleAutoSave
19207
+ }
19208
+ )
19209
+ );
19210
+ };
19211
+
18871
19212
  // src/pages/login/index.tsx
18872
- import React7 from "react";
19213
+ import React8 from "react";
18873
19214
  import { useLogin, useTranslate } from "@refinedev/core";
18874
- import { Button as Button5, Form as Form4, Input as Input4, Card, Typography as Typography2, Layout as Layout2, theme as theme4, Checkbox as Checkbox2, Divider } from "antd/lib";
19215
+ import { Button as Button5, Form as Form4, Input as Input4, Card, Typography as Typography2, Layout as Layout2, theme as theme5, Checkbox as Checkbox2, Divider } from "antd/lib";
18875
19216
  import { ThemedTitle } from "@refinedev/antd";
18876
19217
  import { useNavigate } from "react-router";
18877
19218
  var { Title, Link } = Typography2;
@@ -18880,12 +19221,12 @@ var LoginPage = () => {
18880
19221
  const { mutate: login, isPending } = useLogin();
18881
19222
  const isLoading = isPending;
18882
19223
  const translate = useTranslate();
18883
- const { token } = theme4.useToken();
19224
+ const { token } = theme5.useToken();
18884
19225
  const navigate = useNavigate();
18885
19226
  const onFinish = async (values) => {
18886
19227
  login(values);
18887
19228
  };
18888
- return /* @__PURE__ */ React7.createElement(
19229
+ return /* @__PURE__ */ React8.createElement(
18889
19230
  Layout2,
18890
19231
  {
18891
19232
  style: {
@@ -18895,14 +19236,14 @@ var LoginPage = () => {
18895
19236
  backgroundColor: token.colorBgContainer
18896
19237
  }
18897
19238
  },
18898
- /* @__PURE__ */ React7.createElement("div", { style: { marginBottom: "24px" } }, /* @__PURE__ */ React7.createElement(
19239
+ /* @__PURE__ */ React8.createElement("div", { style: { marginBottom: "24px" } }, /* @__PURE__ */ React8.createElement(
18899
19240
  ThemedTitle,
18900
19241
  {
18901
19242
  collapsed: false,
18902
19243
  wrapperStyles: { fontSize: "22px", justifyContent: "center" }
18903
19244
  }
18904
19245
  )),
18905
- /* @__PURE__ */ React7.createElement(
19246
+ /* @__PURE__ */ React8.createElement(
18906
19247
  Card,
18907
19248
  {
18908
19249
  style: {
@@ -18912,8 +19253,8 @@ var LoginPage = () => {
18912
19253
  boxShadow: "0 4px 24px -4px rgba(0, 0, 0, 0.1)"
18913
19254
  }
18914
19255
  },
18915
- /* @__PURE__ */ React7.createElement("div", { style: { textAlign: "center", marginBottom: "32px" } }, /* @__PURE__ */ React7.createElement(Title, { level: 3, style: { color: token.colorPrimary, margin: 0 } }, translate("pages.login.title", "Sign in to your account")), /* @__PURE__ */ React7.createElement(Typography2.Text, { type: "secondary", style: { fontSize: "14px", marginTop: "8px", display: "block" } }, "Log in using a local account")),
18916
- /* @__PURE__ */ React7.createElement(
19256
+ /* @__PURE__ */ React8.createElement("div", { style: { textAlign: "center", marginBottom: "32px" } }, /* @__PURE__ */ React8.createElement(Title, { level: 3, style: { color: token.colorPrimary, margin: 0 } }, translate("pages.login.title", "Sign in to your account")), /* @__PURE__ */ React8.createElement(Typography2.Text, { type: "secondary", style: { fontSize: "14px", marginTop: "8px", display: "block" } }, "Log in using a local account")),
19257
+ /* @__PURE__ */ React8.createElement(
18917
19258
  Form4,
18918
19259
  {
18919
19260
  layout: "vertical",
@@ -18923,7 +19264,7 @@ var LoginPage = () => {
18923
19264
  remember: false
18924
19265
  }
18925
19266
  },
18926
- /* @__PURE__ */ React7.createElement(
19267
+ /* @__PURE__ */ React8.createElement(
18927
19268
  Form4.Item,
18928
19269
  {
18929
19270
  label: translate("pages.login.fields.username", "Username"),
@@ -18938,9 +19279,9 @@ var LoginPage = () => {
18938
19279
  }
18939
19280
  ]
18940
19281
  },
18941
- /* @__PURE__ */ React7.createElement(Input4, { size: "large", placeholder: "Username" })
19282
+ /* @__PURE__ */ React8.createElement(Input4, { size: "large", placeholder: "Username" })
18942
19283
  ),
18943
- /* @__PURE__ */ React7.createElement(
19284
+ /* @__PURE__ */ React8.createElement(
18944
19285
  Form4.Item,
18945
19286
  {
18946
19287
  label: translate("pages.login.fields.password", "Password"),
@@ -18955,9 +19296,9 @@ var LoginPage = () => {
18955
19296
  }
18956
19297
  ]
18957
19298
  },
18958
- /* @__PURE__ */ React7.createElement(Input4.Password, { size: "large", placeholder: "Password" })
19299
+ /* @__PURE__ */ React8.createElement(Input4.Password, { size: "large", placeholder: "Password" })
18959
19300
  ),
18960
- /* @__PURE__ */ React7.createElement(
19301
+ /* @__PURE__ */ React8.createElement(
18961
19302
  "div",
18962
19303
  {
18963
19304
  style: {
@@ -18966,8 +19307,8 @@ var LoginPage = () => {
18966
19307
  marginBottom: "24px"
18967
19308
  }
18968
19309
  },
18969
- /* @__PURE__ */ React7.createElement(Form4.Item, { name: "remember", valuePropName: "checked", noStyle: true }, /* @__PURE__ */ React7.createElement(Checkbox2, null, translate("pages.login.buttons.rememberMe", "Remember me"))),
18970
- /* @__PURE__ */ React7.createElement(
19310
+ /* @__PURE__ */ React8.createElement(Form4.Item, { name: "remember", valuePropName: "checked", noStyle: true }, /* @__PURE__ */ React8.createElement(Checkbox2, null, translate("pages.login.buttons.rememberMe", "Remember me"))),
19311
+ /* @__PURE__ */ React8.createElement(
18971
19312
  Link,
18972
19313
  {
18973
19314
  onClick: () => {
@@ -18977,7 +19318,7 @@ var LoginPage = () => {
18977
19318
  translate("pages.login.buttons.forgotPassword", "Forgot password?")
18978
19319
  )
18979
19320
  ),
18980
- /* @__PURE__ */ React7.createElement(Form4.Item, null, /* @__PURE__ */ React7.createElement(
19321
+ /* @__PURE__ */ React8.createElement(Form4.Item, null, /* @__PURE__ */ React8.createElement(
18981
19322
  Button5,
18982
19323
  {
18983
19324
  type: "primary",
@@ -18988,8 +19329,8 @@ var LoginPage = () => {
18988
19329
  },
18989
19330
  translate("pages.login.signin", "Sign in")
18990
19331
  )),
18991
- /* @__PURE__ */ React7.createElement(Divider, { plain: true }, "or"),
18992
- /* @__PURE__ */ React7.createElement(
19332
+ /* @__PURE__ */ React8.createElement(Divider, { plain: true }, "or"),
19333
+ /* @__PURE__ */ React8.createElement(
18993
19334
  Button5,
18994
19335
  {
18995
19336
  block: true,
@@ -19004,9 +19345,9 @@ var LoginPage = () => {
19004
19345
  };
19005
19346
 
19006
19347
  // src/pages/login/keycloak.tsx
19007
- import React8 from "react";
19348
+ import React9 from "react";
19008
19349
  import { useLogin as useLogin2, useTranslate as useTranslate2 } from "@refinedev/core";
19009
- import { Button as Button6, Card as Card2, Typography as Typography3, Layout as Layout3, theme as theme5, Divider as Divider2 } from "antd/lib";
19350
+ import { Button as Button6, Card as Card2, Typography as Typography3, Layout as Layout3, theme as theme6, Divider as Divider2 } from "antd/lib";
19010
19351
  import { ThemedTitle as ThemedTitle2 } from "@refinedev/antd";
19011
19352
  import { useNavigate as useNavigate2 } from "react-router";
19012
19353
  var { Title: Title2 } = Typography3;
@@ -19014,12 +19355,12 @@ var KeycloakLoginPage = () => {
19014
19355
  const { mutate: login, isPending } = useLogin2();
19015
19356
  const isLoading = isPending;
19016
19357
  const translate = useTranslate2();
19017
- const { token } = theme5.useToken();
19358
+ const { token } = theme6.useToken();
19018
19359
  const navigate = useNavigate2();
19019
19360
  const handleKeycloakLogin = () => {
19020
19361
  login({ provider: "keycloak" });
19021
19362
  };
19022
- return /* @__PURE__ */ React8.createElement(
19363
+ return /* @__PURE__ */ React9.createElement(
19023
19364
  Layout3,
19024
19365
  {
19025
19366
  style: {
@@ -19029,14 +19370,14 @@ var KeycloakLoginPage = () => {
19029
19370
  backgroundColor: token.colorBgContainer
19030
19371
  }
19031
19372
  },
19032
- /* @__PURE__ */ React8.createElement("div", { style: { marginBottom: "24px" } }, /* @__PURE__ */ React8.createElement(
19373
+ /* @__PURE__ */ React9.createElement("div", { style: { marginBottom: "24px" } }, /* @__PURE__ */ React9.createElement(
19033
19374
  ThemedTitle2,
19034
19375
  {
19035
19376
  collapsed: false,
19036
19377
  wrapperStyles: { fontSize: "22px", justifyContent: "center" }
19037
19378
  }
19038
19379
  )),
19039
- /* @__PURE__ */ React8.createElement(
19380
+ /* @__PURE__ */ React9.createElement(
19040
19381
  Card2,
19041
19382
  {
19042
19383
  style: {
@@ -19046,8 +19387,8 @@ var KeycloakLoginPage = () => {
19046
19387
  boxShadow: "0 4px 24px -4px rgba(0, 0, 0, 0.1)"
19047
19388
  }
19048
19389
  },
19049
- /* @__PURE__ */ React8.createElement("div", { style: { textAlign: "center", marginBottom: "32px" } }, /* @__PURE__ */ React8.createElement(Title2, { level: 3, style: { color: token.colorPrimary, margin: 0 } }, translate("pages.login.title", "Sign in to your account")), /* @__PURE__ */ React8.createElement(Typography3.Text, { type: "secondary", style: { fontSize: "14px", marginTop: "8px", display: "block" } }, "Choose your authentication method")),
19050
- /* @__PURE__ */ React8.createElement(
19390
+ /* @__PURE__ */ React9.createElement("div", { style: { textAlign: "center", marginBottom: "32px" } }, /* @__PURE__ */ React9.createElement(Title2, { level: 3, style: { color: token.colorPrimary, margin: 0 } }, translate("pages.login.title", "Sign in to your account")), /* @__PURE__ */ React9.createElement(Typography3.Text, { type: "secondary", style: { fontSize: "14px", marginTop: "8px", display: "block" } }, "Choose your authentication method")),
19391
+ /* @__PURE__ */ React9.createElement(
19051
19392
  Button6,
19052
19393
  {
19053
19394
  type: "primary",
@@ -19059,8 +19400,8 @@ var KeycloakLoginPage = () => {
19059
19400
  },
19060
19401
  "Sign in with Keycloak"
19061
19402
  ),
19062
- /* @__PURE__ */ React8.createElement(Divider2, { plain: true }, "or"),
19063
- /* @__PURE__ */ React8.createElement(
19403
+ /* @__PURE__ */ React9.createElement(Divider2, { plain: true }, "or"),
19404
+ /* @__PURE__ */ React9.createElement(
19064
19405
  Button6,
19065
19406
  {
19066
19407
  block: true,
@@ -19074,14 +19415,14 @@ var KeycloakLoginPage = () => {
19074
19415
  };
19075
19416
 
19076
19417
  // src/pages/auth/AuthCallback.tsx
19077
- import React9, { useEffect as useEffect5, useState as useState4, useRef } from "react";
19418
+ import React10, { useEffect as useEffect5, useState as useState5, useRef as useRef2 } from "react";
19078
19419
  import { useLogin as useLogin3 } from "@refinedev/core";
19079
- import { Spin, Result } from "antd";
19420
+ import { Spin as Spin2, Result } from "antd";
19080
19421
  var AuthCallback = () => {
19081
19422
  const { mutate: login } = useLogin3();
19082
- const [error, setError] = useState4(null);
19083
- const [processing, setProcessing] = useState4(false);
19084
- const hasProcessed = useRef(false);
19423
+ const [error, setError] = useState5(null);
19424
+ const [processing, setProcessing] = useState5(false);
19425
+ const hasProcessed = useRef2(false);
19085
19426
  useEffect5(() => {
19086
19427
  if (hasProcessed.current || processing) {
19087
19428
  return;
@@ -19125,13 +19466,13 @@ var AuthCallback = () => {
19125
19466
  handleCallback();
19126
19467
  }, [login, processing]);
19127
19468
  if (error) {
19128
- return /* @__PURE__ */ React9.createElement(
19469
+ return /* @__PURE__ */ React10.createElement(
19129
19470
  Result,
19130
19471
  {
19131
19472
  status: "error",
19132
19473
  title: "Authentication Failed",
19133
19474
  subTitle: error,
19134
- extra: /* @__PURE__ */ React9.createElement(
19475
+ extra: /* @__PURE__ */ React10.createElement(
19135
19476
  "button",
19136
19477
  {
19137
19478
  onClick: () => window.location.href = "/login",
@@ -19149,7 +19490,7 @@ var AuthCallback = () => {
19149
19490
  }
19150
19491
  );
19151
19492
  }
19152
- return /* @__PURE__ */ React9.createElement(
19493
+ return /* @__PURE__ */ React10.createElement(
19153
19494
  "div",
19154
19495
  {
19155
19496
  style: {
@@ -19161,13 +19502,13 @@ var AuthCallback = () => {
19161
19502
  gap: "16px"
19162
19503
  }
19163
19504
  },
19164
- /* @__PURE__ */ React9.createElement(Spin, { size: "large" }),
19165
- /* @__PURE__ */ React9.createElement("p", null, "Completing authentication...")
19505
+ /* @__PURE__ */ React10.createElement(Spin2, { size: "large" }),
19506
+ /* @__PURE__ */ React10.createElement("p", null, "Completing authentication...")
19166
19507
  );
19167
19508
  };
19168
19509
 
19169
19510
  // src/pages/application-users/list.tsx
19170
- import React10, { useState as useState5 } from "react";
19511
+ import React11, { useState as useState6 } from "react";
19171
19512
  import { useNotification } from "@refinedev/core";
19172
19513
  import { EditButton, DeleteButton } from "@refinedev/antd";
19173
19514
  import {
@@ -19182,11 +19523,11 @@ import {
19182
19523
  } from "antd/lib";
19183
19524
  import { KeyOutlined, ThunderboltOutlined as ThunderboltOutlined2 } from "@ant-design/icons";
19184
19525
  var ApplicationUserList = () => {
19185
- const [isModalOpen, setIsModalOpen] = useState5(false);
19186
- const [selectedUser, setSelectedUser] = useState5(null);
19526
+ const [isModalOpen, setIsModalOpen] = useState6(false);
19527
+ const [selectedUser, setSelectedUser] = useState6(null);
19187
19528
  const [form] = Form5.useForm();
19188
19529
  const { open } = useNotification();
19189
- const [isLoading, setIsLoading] = useState5(false);
19530
+ const [isLoading, setIsLoading] = useState6(false);
19190
19531
  const handleResetPasswordClick = (user) => {
19191
19532
  setSelectedUser(user);
19192
19533
  setIsModalOpen(true);
@@ -19216,20 +19557,20 @@ var ApplicationUserList = () => {
19216
19557
  setIsLoading(false);
19217
19558
  }
19218
19559
  };
19219
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(
19560
+ return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(
19220
19561
  SmartList,
19221
19562
  {
19222
19563
  searchFields: ["UserName", "DisplayName", "Email"]
19223
19564
  },
19224
- /* @__PURE__ */ React10.createElement(
19565
+ /* @__PURE__ */ React11.createElement(
19225
19566
  Table4.Column,
19226
19567
  {
19227
19568
  dataIndex: "Photo",
19228
19569
  title: "Photo",
19229
- render: (value) => value ? /* @__PURE__ */ React10.createElement("img", { src: `data:image/png;base64,${value}`, alt: "User", style: { height: 40, width: 40, objectFit: "cover", borderRadius: "50%" } }) : "-"
19570
+ render: (value) => value ? /* @__PURE__ */ React11.createElement("img", { src: `data:image/png;base64,${value}`, alt: "User", style: { height: 40, width: 40, objectFit: "cover", borderRadius: "50%" } }) : "-"
19230
19571
  }
19231
19572
  ),
19232
- /* @__PURE__ */ React10.createElement(
19573
+ /* @__PURE__ */ React11.createElement(
19233
19574
  Table4.Column,
19234
19575
  {
19235
19576
  dataIndex: "DisplayName",
@@ -19239,7 +19580,7 @@ var ApplicationUserList = () => {
19239
19580
  defaultVisible: true
19240
19581
  }
19241
19582
  ),
19242
- /* @__PURE__ */ React10.createElement(
19583
+ /* @__PURE__ */ React11.createElement(
19243
19584
  Table4.Column,
19244
19585
  {
19245
19586
  dataIndex: "UserName",
@@ -19248,7 +19589,7 @@ var ApplicationUserList = () => {
19248
19589
  defaultVisible: true
19249
19590
  }
19250
19591
  ),
19251
- /* @__PURE__ */ React10.createElement(
19592
+ /* @__PURE__ */ React11.createElement(
19252
19593
  Table4.Column,
19253
19594
  {
19254
19595
  dataIndex: "Email",
@@ -19256,38 +19597,38 @@ var ApplicationUserList = () => {
19256
19597
  sorter: true
19257
19598
  }
19258
19599
  ),
19259
- /* @__PURE__ */ React10.createElement(
19600
+ /* @__PURE__ */ React11.createElement(
19260
19601
  Table4.Column,
19261
19602
  {
19262
19603
  dataIndex: "IsActive",
19263
19604
  title: "Active",
19264
- render: (value) => /* @__PURE__ */ React10.createElement(Checkbox3, { checked: value, disabled: true }),
19605
+ render: (value) => /* @__PURE__ */ React11.createElement(Checkbox3, { checked: value, disabled: true }),
19265
19606
  sorter: true
19266
19607
  }
19267
19608
  ),
19268
- /* @__PURE__ */ React10.createElement(
19609
+ /* @__PURE__ */ React11.createElement(
19269
19610
  Table4.Column,
19270
19611
  {
19271
19612
  dataIndex: "AccessFailedCount",
19272
19613
  title: "Access Failed Count"
19273
19614
  }
19274
19615
  ),
19275
- /* @__PURE__ */ React10.createElement(
19616
+ /* @__PURE__ */ React11.createElement(
19276
19617
  Table4.Column,
19277
19618
  {
19278
19619
  title: "Actions",
19279
19620
  dataIndex: "actions",
19280
- render: (_, record) => /* @__PURE__ */ React10.createElement(Space6, null, /* @__PURE__ */ React10.createElement(Tooltip, { title: "Reset Password" }, /* @__PURE__ */ React10.createElement(
19621
+ render: (_, record) => /* @__PURE__ */ React11.createElement(Space6, null, /* @__PURE__ */ React11.createElement(Tooltip, { title: "Reset Password" }, /* @__PURE__ */ React11.createElement(
19281
19622
  Button7,
19282
19623
  {
19283
19624
  size: "small",
19284
- icon: /* @__PURE__ */ React10.createElement(KeyOutlined, null),
19625
+ icon: /* @__PURE__ */ React11.createElement(KeyOutlined, null),
19285
19626
  onClick: () => handleResetPasswordClick(record)
19286
19627
  }
19287
- )), /* @__PURE__ */ React10.createElement(EditButton, { hideText: true, size: "small", recordItemId: record.Oid }), /* @__PURE__ */ React10.createElement(DeleteButton, { hideText: true, size: "small", recordItemId: record.Oid }))
19628
+ )), /* @__PURE__ */ React11.createElement(EditButton, { hideText: true, size: "small", recordItemId: record.Oid }), /* @__PURE__ */ React11.createElement(DeleteButton, { hideText: true, size: "small", recordItemId: record.Oid }))
19288
19629
  }
19289
19630
  )
19290
- ), /* @__PURE__ */ React10.createElement(
19631
+ ), /* @__PURE__ */ React11.createElement(
19291
19632
  Modal3,
19292
19633
  {
19293
19634
  title: `Reset Password for ${selectedUser?.DisplayName || selectedUser?.UserName}`,
@@ -19296,7 +19637,7 @@ var ApplicationUserList = () => {
19296
19637
  onOk: () => form.submit(),
19297
19638
  confirmLoading: isLoading
19298
19639
  },
19299
- /* @__PURE__ */ React10.createElement(Form5, { form, onFinish: handleResetPasswordSubmit, layout: "vertical" }, /* @__PURE__ */ React10.createElement("div", { style: { display: "flex", gap: 8, alignItems: "flex-end" } }, /* @__PURE__ */ React10.createElement(
19640
+ /* @__PURE__ */ React11.createElement(Form5, { form, onFinish: handleResetPasswordSubmit, layout: "vertical" }, /* @__PURE__ */ React11.createElement("div", { style: { display: "flex", gap: 8, alignItems: "flex-end" } }, /* @__PURE__ */ React11.createElement(
19300
19641
  Form5.Item,
19301
19642
  {
19302
19643
  name: "password",
@@ -19304,18 +19645,18 @@ var ApplicationUserList = () => {
19304
19645
  style: { flex: 1, marginBottom: 0 },
19305
19646
  rules: [{ required: true, message: "Please input the new password!" }]
19306
19647
  },
19307
- /* @__PURE__ */ React10.createElement(Input5.Password, { placeholder: "Enter new password" })
19308
- ), /* @__PURE__ */ React10.createElement(Tooltip, { title: "Generate Complex Password" }, /* @__PURE__ */ React10.createElement(Button7, { icon: /* @__PURE__ */ React10.createElement(ThunderboltOutlined2, null), onClick: handleGeneratePassword }))))
19648
+ /* @__PURE__ */ React11.createElement(Input5.Password, { placeholder: "Enter new password" })
19649
+ ), /* @__PURE__ */ React11.createElement(Tooltip, { title: "Generate Complex Password" }, /* @__PURE__ */ React11.createElement(Button7, { icon: /* @__PURE__ */ React11.createElement(ThunderboltOutlined2, null), onClick: handleGeneratePassword }))))
19309
19650
  ));
19310
19651
  };
19311
19652
 
19312
19653
  // src/pages/application-users/create.tsx
19313
- import React11 from "react";
19654
+ import React12 from "react";
19314
19655
  import { Create, useForm } from "@refinedev/antd";
19315
19656
  import { Form as Form6, Input as Input6, Checkbox as Checkbox4 } from "antd/lib";
19316
19657
  var ApplicationUserCreate = () => {
19317
19658
  const { formProps, saveButtonProps } = useForm();
19318
- return /* @__PURE__ */ React11.createElement(Create, { saveButtonProps }, /* @__PURE__ */ React11.createElement(Form6, { ...formProps, layout: "vertical" }, /* @__PURE__ */ React11.createElement(
19659
+ return /* @__PURE__ */ React12.createElement(Create, { saveButtonProps }, /* @__PURE__ */ React12.createElement(Form6, { ...formProps, layout: "vertical" }, /* @__PURE__ */ React12.createElement(
19319
19660
  Form6.Item,
19320
19661
  {
19321
19662
  label: "User Name",
@@ -19326,15 +19667,15 @@ var ApplicationUserCreate = () => {
19326
19667
  }
19327
19668
  ]
19328
19669
  },
19329
- /* @__PURE__ */ React11.createElement(Input6, null)
19330
- ), /* @__PURE__ */ React11.createElement(
19670
+ /* @__PURE__ */ React12.createElement(Input6, null)
19671
+ ), /* @__PURE__ */ React12.createElement(
19331
19672
  Form6.Item,
19332
19673
  {
19333
19674
  label: "Display Name",
19334
19675
  name: "DisplayName"
19335
19676
  },
19336
- /* @__PURE__ */ React11.createElement(Input6, null)
19337
- ), /* @__PURE__ */ React11.createElement(
19677
+ /* @__PURE__ */ React12.createElement(Input6, null)
19678
+ ), /* @__PURE__ */ React12.createElement(
19338
19679
  Form6.Item,
19339
19680
  {
19340
19681
  label: "Email",
@@ -19345,8 +19686,8 @@ var ApplicationUserCreate = () => {
19345
19686
  }
19346
19687
  ]
19347
19688
  },
19348
- /* @__PURE__ */ React11.createElement(Input6, null)
19349
- ), /* @__PURE__ */ React11.createElement(
19689
+ /* @__PURE__ */ React12.createElement(Input6, null)
19690
+ ), /* @__PURE__ */ React12.createElement(
19350
19691
  Form6.Item,
19351
19692
  {
19352
19693
  label: "Is Active",
@@ -19354,19 +19695,19 @@ var ApplicationUserCreate = () => {
19354
19695
  valuePropName: "checked",
19355
19696
  initialValue: true
19356
19697
  },
19357
- /* @__PURE__ */ React11.createElement(Checkbox4, null, "Active")
19358
- ), /* @__PURE__ */ React11.createElement(
19698
+ /* @__PURE__ */ React12.createElement(Checkbox4, null, "Active")
19699
+ ), /* @__PURE__ */ React12.createElement(
19359
19700
  Form6.Item,
19360
19701
  {
19361
19702
  label: "Photo",
19362
19703
  name: "Photo"
19363
19704
  },
19364
- /* @__PURE__ */ React11.createElement(Base64Upload, null)
19705
+ /* @__PURE__ */ React12.createElement(Base64Upload, null)
19365
19706
  )));
19366
19707
  };
19367
19708
 
19368
19709
  // src/pages/application-users/edit.tsx
19369
- import React12 from "react";
19710
+ import React13 from "react";
19370
19711
  import { Edit, useForm as useForm2, useSelect } from "@refinedev/antd";
19371
19712
  import { Form as Form7, Input as Input7, Checkbox as Checkbox5, Select, App } from "antd/lib";
19372
19713
  var ApplicationUserEdit = () => {
@@ -19409,7 +19750,7 @@ var ApplicationUserEdit = () => {
19409
19750
  const { Roles, ...userValues } = values;
19410
19751
  formProps.onFinish?.(userValues);
19411
19752
  };
19412
- return /* @__PURE__ */ React12.createElement(Edit, { saveButtonProps }, /* @__PURE__ */ React12.createElement(Form7, { ...formProps, layout: "vertical", onFinish: handleOnFinish }, /* @__PURE__ */ React12.createElement(
19753
+ return /* @__PURE__ */ React13.createElement(Edit, { saveButtonProps }, /* @__PURE__ */ React13.createElement(Form7, { ...formProps, layout: "vertical", onFinish: handleOnFinish }, /* @__PURE__ */ React13.createElement(
19413
19754
  Form7.Item,
19414
19755
  {
19415
19756
  label: "User Name",
@@ -19420,15 +19761,15 @@ var ApplicationUserEdit = () => {
19420
19761
  }
19421
19762
  ]
19422
19763
  },
19423
- /* @__PURE__ */ React12.createElement(Input7, null)
19424
- ), /* @__PURE__ */ React12.createElement(
19764
+ /* @__PURE__ */ React13.createElement(Input7, null)
19765
+ ), /* @__PURE__ */ React13.createElement(
19425
19766
  Form7.Item,
19426
19767
  {
19427
19768
  label: "Display Name",
19428
19769
  name: "DisplayName"
19429
19770
  },
19430
- /* @__PURE__ */ React12.createElement(Input7, null)
19431
- ), /* @__PURE__ */ React12.createElement(
19771
+ /* @__PURE__ */ React13.createElement(Input7, null)
19772
+ ), /* @__PURE__ */ React13.createElement(
19432
19773
  Form7.Item,
19433
19774
  {
19434
19775
  label: "Email",
@@ -19439,16 +19780,16 @@ var ApplicationUserEdit = () => {
19439
19780
  }
19440
19781
  ]
19441
19782
  },
19442
- /* @__PURE__ */ React12.createElement(Input7, null)
19443
- ), /* @__PURE__ */ React12.createElement(
19783
+ /* @__PURE__ */ React13.createElement(Input7, null)
19784
+ ), /* @__PURE__ */ React13.createElement(
19444
19785
  Form7.Item,
19445
19786
  {
19446
19787
  label: "Is Active",
19447
19788
  name: "IsActive",
19448
19789
  valuePropName: "checked"
19449
19790
  },
19450
- /* @__PURE__ */ React12.createElement(Checkbox5, null, "Active")
19451
- ), /* @__PURE__ */ React12.createElement(
19791
+ /* @__PURE__ */ React13.createElement(Checkbox5, null, "Active")
19792
+ ), /* @__PURE__ */ React13.createElement(
19452
19793
  Form7.Item,
19453
19794
  {
19454
19795
  label: "Roles",
@@ -19467,49 +19808,49 @@ var ApplicationUserEdit = () => {
19467
19808
  return { value: [] };
19468
19809
  }
19469
19810
  },
19470
- /* @__PURE__ */ React12.createElement(Select, { ...roleSelectProps, mode: "multiple" })
19471
- ), /* @__PURE__ */ React12.createElement(
19811
+ /* @__PURE__ */ React13.createElement(Select, { ...roleSelectProps, mode: "multiple" })
19812
+ ), /* @__PURE__ */ React13.createElement(
19472
19813
  Form7.Item,
19473
19814
  {
19474
19815
  label: "Photo",
19475
19816
  name: "Photo"
19476
19817
  },
19477
- /* @__PURE__ */ React12.createElement(Base64Upload, null)
19818
+ /* @__PURE__ */ React13.createElement(Base64Upload, null)
19478
19819
  )));
19479
19820
  };
19480
19821
 
19481
19822
  // src/pages/roles/list.tsx
19482
- import React13 from "react";
19823
+ import React14 from "react";
19483
19824
  import { useTable as useTable2, List as List2, EditButton as EditButton2, DeleteButton as DeleteButton2 } from "@refinedev/antd";
19484
19825
  import { Table as Table5, Space as Space7, Checkbox as Checkbox6 } from "antd/lib";
19485
19826
  var RoleList = () => {
19486
19827
  const { tableProps } = useTable2({
19487
19828
  syncWithLocation: true
19488
19829
  });
19489
- return /* @__PURE__ */ React13.createElement(List2, null, /* @__PURE__ */ React13.createElement(Table5, { ...tableProps, rowKey: "Oid" }, /* @__PURE__ */ React13.createElement(Table5.Column, { dataIndex: "Name", title: "Name" }), /* @__PURE__ */ React13.createElement(
19830
+ return /* @__PURE__ */ React14.createElement(List2, null, /* @__PURE__ */ React14.createElement(Table5, { ...tableProps, rowKey: "Oid" }, /* @__PURE__ */ React14.createElement(Table5.Column, { dataIndex: "Name", title: "Name" }), /* @__PURE__ */ React14.createElement(
19490
19831
  Table5.Column,
19491
19832
  {
19492
19833
  dataIndex: "IsAdministrative",
19493
19834
  title: "Is Administrative",
19494
- render: (value) => /* @__PURE__ */ React13.createElement(Checkbox6, { checked: value, disabled: true })
19835
+ render: (value) => /* @__PURE__ */ React14.createElement(Checkbox6, { checked: value, disabled: true })
19495
19836
  }
19496
- ), /* @__PURE__ */ React13.createElement(Table5.Column, { dataIndex: "PermissionPolicy", title: "Permission Policy" }), /* @__PURE__ */ React13.createElement(
19837
+ ), /* @__PURE__ */ React14.createElement(Table5.Column, { dataIndex: "PermissionPolicy", title: "Permission Policy" }), /* @__PURE__ */ React14.createElement(
19497
19838
  Table5.Column,
19498
19839
  {
19499
19840
  title: "Actions",
19500
19841
  dataIndex: "actions",
19501
- render: (_, record) => /* @__PURE__ */ React13.createElement(Space7, null, /* @__PURE__ */ React13.createElement(EditButton2, { hideText: true, size: "small", recordItemId: record.Oid }), /* @__PURE__ */ React13.createElement(DeleteButton2, { hideText: true, size: "small", recordItemId: record.Oid }))
19842
+ render: (_, record) => /* @__PURE__ */ React14.createElement(Space7, null, /* @__PURE__ */ React14.createElement(EditButton2, { hideText: true, size: "small", recordItemId: record.Oid }), /* @__PURE__ */ React14.createElement(DeleteButton2, { hideText: true, size: "small", recordItemId: record.Oid }))
19502
19843
  }
19503
19844
  )));
19504
19845
  };
19505
19846
 
19506
19847
  // src/pages/roles/create.tsx
19507
- import React15 from "react";
19848
+ import React16 from "react";
19508
19849
  import { Create as Create2, useForm as useForm3 } from "@refinedev/antd";
19509
19850
  import { Form as Form9, Input as Input8, Checkbox as Checkbox7, Select as Select3 } from "antd/lib";
19510
19851
 
19511
19852
  // src/pages/roles/TypePermissionList.tsx
19512
- import React14 from "react";
19853
+ import React15 from "react";
19513
19854
  import { Form as Form8, Select as Select2, Table as Table6 } from "antd/lib";
19514
19855
  import { useTable as useTable3 } from "@refinedev/antd";
19515
19856
 
@@ -19538,7 +19879,7 @@ var useModelTypes = () => {
19538
19879
  };
19539
19880
 
19540
19881
  // src/pages/roles/TypePermissionList.tsx
19541
- var PermissionSelect = (props) => /* @__PURE__ */ React14.createElement(
19882
+ var PermissionSelect = (props) => /* @__PURE__ */ React15.createElement(
19542
19883
  Select2,
19543
19884
  {
19544
19885
  ...props,
@@ -19550,14 +19891,14 @@ var PermissionSelect = (props) => /* @__PURE__ */ React14.createElement(
19550
19891
  }
19551
19892
  );
19552
19893
  var TypePermissionFormFields = ({ typeOptions }) => {
19553
- return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(
19894
+ return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
19554
19895
  Form8.Item,
19555
19896
  {
19556
19897
  label: "Target Type",
19557
19898
  name: "TargetTypeFullName",
19558
19899
  rules: [{ required: true }]
19559
19900
  },
19560
- /* @__PURE__ */ React14.createElement(
19901
+ /* @__PURE__ */ React15.createElement(
19561
19902
  Select2,
19562
19903
  {
19563
19904
  showSearch: true,
@@ -19565,7 +19906,7 @@ var TypePermissionFormFields = ({ typeOptions }) => {
19565
19906
  filterOption: (input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase())
19566
19907
  }
19567
19908
  )
19568
- ), /* @__PURE__ */ React14.createElement(Form8.Item, { label: "Read State", name: "ReadState" }, /* @__PURE__ */ React14.createElement(PermissionSelect, null)), /* @__PURE__ */ React14.createElement(Form8.Item, { label: "Write State", name: "WriteState" }, /* @__PURE__ */ React14.createElement(PermissionSelect, null)), /* @__PURE__ */ React14.createElement(Form8.Item, { label: "Create State", name: "CreateState" }, /* @__PURE__ */ React14.createElement(PermissionSelect, null)), /* @__PURE__ */ React14.createElement(Form8.Item, { label: "Delete State", name: "DeleteState" }, /* @__PURE__ */ React14.createElement(PermissionSelect, null)));
19909
+ ), /* @__PURE__ */ React15.createElement(Form8.Item, { label: "Read State", name: "ReadState" }, /* @__PURE__ */ React15.createElement(PermissionSelect, null)), /* @__PURE__ */ React15.createElement(Form8.Item, { label: "Write State", name: "WriteState" }, /* @__PURE__ */ React15.createElement(PermissionSelect, null)), /* @__PURE__ */ React15.createElement(Form8.Item, { label: "Create State", name: "CreateState" }, /* @__PURE__ */ React15.createElement(PermissionSelect, null)), /* @__PURE__ */ React15.createElement(Form8.Item, { label: "Delete State", name: "DeleteState" }, /* @__PURE__ */ React15.createElement(PermissionSelect, null)));
19569
19910
  };
19570
19911
  var TypePermissionList = ({ masterId }) => {
19571
19912
  const { data: modelTypes } = useModelTypes();
@@ -19585,17 +19926,17 @@ var TypePermissionList = ({ masterId }) => {
19585
19926
  mode: "off"
19586
19927
  }
19587
19928
  });
19588
- const typeOptions = React14.useMemo(() => modelTypes?.filter((t) => t.IsCreatable && !t.IsDeprecated).map((t) => ({ label: t.Caption, value: t.Name })) || [], [modelTypes]);
19589
- const FormFieldsWrapper = React14.useMemo(() => {
19590
- return ({ mode }) => /* @__PURE__ */ React14.createElement(TypePermissionFormFields, { typeOptions });
19929
+ const typeOptions = React15.useMemo(() => modelTypes?.filter((t) => t.IsCreatable && !t.IsDeprecated).map((t) => ({ label: t.Caption, value: t.Name })) || [], [modelTypes]);
19930
+ const FormFieldsWrapper = React15.useMemo(() => {
19931
+ return ({ mode }) => /* @__PURE__ */ React15.createElement(TypePermissionFormFields, { typeOptions });
19591
19932
  }, [typeOptions]);
19592
- const dataSource = React14.useMemo(() => {
19933
+ const dataSource = React15.useMemo(() => {
19593
19934
  return (tableProps.dataSource || []).map((p) => ({
19594
19935
  ...p,
19595
19936
  TargetType: p.TargetType || p.TargetTypeFullName || ""
19596
19937
  }));
19597
19938
  }, [tableProps.dataSource]);
19598
- return /* @__PURE__ */ React14.createElement(
19939
+ return /* @__PURE__ */ React15.createElement(
19599
19940
  RelatedList,
19600
19941
  {
19601
19942
  resource: "PermissionPolicyTypePermissionObject",
@@ -19606,7 +19947,7 @@ var TypePermissionList = ({ masterId }) => {
19606
19947
  modalTitle: "Type Permission",
19607
19948
  FormFields: FormFieldsWrapper
19608
19949
  },
19609
- /* @__PURE__ */ React14.createElement(
19950
+ /* @__PURE__ */ React15.createElement(
19610
19951
  Table6.Column,
19611
19952
  {
19612
19953
  dataIndex: "TargetType",
@@ -19614,10 +19955,10 @@ var TypePermissionList = ({ masterId }) => {
19614
19955
  render: (value) => typeOptions.find((t) => t.value === value)?.label || value
19615
19956
  }
19616
19957
  ),
19617
- /* @__PURE__ */ React14.createElement(Table6.Column, { dataIndex: "ReadState", title: "Read" }),
19618
- /* @__PURE__ */ React14.createElement(Table6.Column, { dataIndex: "WriteState", title: "Write" }),
19619
- /* @__PURE__ */ React14.createElement(Table6.Column, { dataIndex: "CreateState", title: "Create" }),
19620
- /* @__PURE__ */ React14.createElement(Table6.Column, { dataIndex: "DeleteState", title: "Delete" })
19958
+ /* @__PURE__ */ React15.createElement(Table6.Column, { dataIndex: "ReadState", title: "Read" }),
19959
+ /* @__PURE__ */ React15.createElement(Table6.Column, { dataIndex: "WriteState", title: "Write" }),
19960
+ /* @__PURE__ */ React15.createElement(Table6.Column, { dataIndex: "CreateState", title: "Create" }),
19961
+ /* @__PURE__ */ React15.createElement(Table6.Column, { dataIndex: "DeleteState", title: "Delete" })
19621
19962
  );
19622
19963
  };
19623
19964
 
@@ -19628,7 +19969,7 @@ var RoleCreate = () => {
19628
19969
  const handleSave = () => {
19629
19970
  form.submit();
19630
19971
  };
19631
- return /* @__PURE__ */ React15.createElement(Create2, { saveButtonProps: { ...saveButtonProps, onClick: handleSave } }, /* @__PURE__ */ React15.createElement(
19972
+ return /* @__PURE__ */ React16.createElement(Create2, { saveButtonProps: { ...saveButtonProps, onClick: handleSave } }, /* @__PURE__ */ React16.createElement(
19632
19973
  Form9,
19633
19974
  {
19634
19975
  ...formProps,
@@ -19638,25 +19979,25 @@ var RoleCreate = () => {
19638
19979
  return formProps.onFinish && formProps.onFinish(values);
19639
19980
  }
19640
19981
  },
19641
- /* @__PURE__ */ React15.createElement(
19982
+ /* @__PURE__ */ React16.createElement(
19642
19983
  Form9.Item,
19643
19984
  {
19644
19985
  label: "Name",
19645
19986
  name: "Name",
19646
19987
  rules: [{ required: true }]
19647
19988
  },
19648
- /* @__PURE__ */ React15.createElement(Input8, null)
19989
+ /* @__PURE__ */ React16.createElement(Input8, null)
19649
19990
  ),
19650
- /* @__PURE__ */ React15.createElement(
19991
+ /* @__PURE__ */ React16.createElement(
19651
19992
  Form9.Item,
19652
19993
  {
19653
19994
  label: "Is Administrative",
19654
19995
  name: "IsAdministrative",
19655
19996
  valuePropName: "checked"
19656
19997
  },
19657
- /* @__PURE__ */ React15.createElement(Checkbox7, null, "Is Administrative")
19998
+ /* @__PURE__ */ React16.createElement(Checkbox7, null, "Is Administrative")
19658
19999
  ),
19659
- /* @__PURE__ */ React15.createElement(
20000
+ /* @__PURE__ */ React16.createElement(
19660
20001
  Form9.Item,
19661
20002
  {
19662
20003
  label: "Permission Policy",
@@ -19664,7 +20005,7 @@ var RoleCreate = () => {
19664
20005
  initialValue: "DenyAllByDefault" /* DenyAllByDefault */,
19665
20006
  rules: [{ required: true }]
19666
20007
  },
19667
- /* @__PURE__ */ React15.createElement(
20008
+ /* @__PURE__ */ React16.createElement(
19668
20009
  Select3,
19669
20010
  {
19670
20011
  options: [
@@ -19675,12 +20016,12 @@ var RoleCreate = () => {
19675
20016
  }
19676
20017
  )
19677
20018
  ),
19678
- /* @__PURE__ */ React15.createElement(TypePermissionList, null)
20019
+ /* @__PURE__ */ React16.createElement(TypePermissionList, null)
19679
20020
  ));
19680
20021
  };
19681
20022
 
19682
20023
  // src/pages/roles/edit.tsx
19683
- import React16 from "react";
20024
+ import React17 from "react";
19684
20025
  import { Edit as Edit2, useForm as useForm4 } from "@refinedev/antd";
19685
20026
  import { Form as Form10, Input as Input9, Checkbox as Checkbox8, Select as Select4 } from "antd/lib";
19686
20027
  var RoleEdit = () => {
@@ -19688,7 +20029,7 @@ var RoleEdit = () => {
19688
20029
  const handleSave = () => {
19689
20030
  formProps.form?.submit();
19690
20031
  };
19691
- return /* @__PURE__ */ React16.createElement(Edit2, { saveButtonProps: { ...saveButtonProps, onClick: handleSave } }, /* @__PURE__ */ React16.createElement(
20032
+ return /* @__PURE__ */ React17.createElement(Edit2, { saveButtonProps: { ...saveButtonProps, onClick: handleSave } }, /* @__PURE__ */ React17.createElement(
19692
20033
  Form10,
19693
20034
  {
19694
20035
  ...formProps,
@@ -19698,32 +20039,32 @@ var RoleEdit = () => {
19698
20039
  return formProps.onFinish && formProps.onFinish(rest);
19699
20040
  }
19700
20041
  },
19701
- /* @__PURE__ */ React16.createElement(
20042
+ /* @__PURE__ */ React17.createElement(
19702
20043
  Form10.Item,
19703
20044
  {
19704
20045
  label: "Name",
19705
20046
  name: "Name",
19706
20047
  rules: [{ required: true }]
19707
20048
  },
19708
- /* @__PURE__ */ React16.createElement(Input9, null)
20049
+ /* @__PURE__ */ React17.createElement(Input9, null)
19709
20050
  ),
19710
- /* @__PURE__ */ React16.createElement(
20051
+ /* @__PURE__ */ React17.createElement(
19711
20052
  Form10.Item,
19712
20053
  {
19713
20054
  label: "Is Administrative",
19714
20055
  name: "IsAdministrative",
19715
20056
  valuePropName: "checked"
19716
20057
  },
19717
- /* @__PURE__ */ React16.createElement(Checkbox8, null, "Is Administrative")
20058
+ /* @__PURE__ */ React17.createElement(Checkbox8, null, "Is Administrative")
19718
20059
  ),
19719
- /* @__PURE__ */ React16.createElement(
20060
+ /* @__PURE__ */ React17.createElement(
19720
20061
  Form10.Item,
19721
20062
  {
19722
20063
  label: "Permission Policy",
19723
20064
  name: "PermissionPolicy",
19724
20065
  rules: [{ required: true }]
19725
20066
  },
19726
- /* @__PURE__ */ React16.createElement(
20067
+ /* @__PURE__ */ React17.createElement(
19727
20068
  Select4,
19728
20069
  {
19729
20070
  options: [
@@ -19734,7 +20075,7 @@ var RoleEdit = () => {
19734
20075
  }
19735
20076
  )
19736
20077
  ),
19737
- /* @__PURE__ */ React16.createElement(
20078
+ /* @__PURE__ */ React17.createElement(
19738
20079
  TypePermissionList,
19739
20080
  {
19740
20081
  masterId: id?.toString()
@@ -19750,6 +20091,7 @@ export {
19750
20091
  Base64Upload,
19751
20092
  ColorModeContext,
19752
20093
  ColorModeContextProvider,
20094
+ DrawioEditor,
19753
20095
  Header,
19754
20096
  HttpError,
19755
20097
  KeycloakLoginPage,
@@ -19771,6 +20113,7 @@ export {
19771
20113
  httpClient,
19772
20114
  keycloakService,
19773
20115
  parseJwt,
20116
+ refineXafTranslations,
19774
20117
  useColorMode,
19775
20118
  useModelTypes,
19776
20119
  validatePasswordStrength