@cundi/refine-xaf 1.0.6 → 1.0.8

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
@@ -551,7 +551,7 @@ var parseFilter = (filter) => {
551
551
 
552
552
  // src/dataProvider.ts
553
553
  var dataProvider = (apiUrl) => ({
554
- getList: async ({ resource, pagination, sorters, filters }) => {
554
+ getList: async ({ resource, pagination, sorters, filters, meta }) => {
555
555
  const url = new URL(`${apiUrl}/${resource}`, window.location.origin);
556
556
  if (pagination) {
557
557
  const { current, pageSize } = pagination;
@@ -568,6 +568,12 @@ var dataProvider = (apiUrl) => ({
568
568
  if (filterString) {
569
569
  url.searchParams.append("$filter", filterString);
570
570
  }
571
+ if (meta?.expand) {
572
+ const expand = meta.expand.map((item) => item.field ?? item).join(",");
573
+ if (expand) {
574
+ url.searchParams.append("$expand", expand);
575
+ }
576
+ }
571
577
  url.searchParams.append("$count", "true");
572
578
  const response = await httpClient(url.toString());
573
579
  if (!response) {
@@ -697,6 +703,20 @@ var SecurityPermissionState = /* @__PURE__ */ ((SecurityPermissionState2) => {
697
703
  SecurityPermissionState2["Deny"] = "Deny";
698
704
  return SecurityPermissionState2;
699
705
  })(SecurityPermissionState || {});
706
+ var HttpMethodType = /* @__PURE__ */ ((HttpMethodType2) => {
707
+ HttpMethodType2["Post"] = "Post";
708
+ HttpMethodType2["Get"] = "Get";
709
+ HttpMethodType2["Put"] = "Put";
710
+ HttpMethodType2["Patch"] = "Patch";
711
+ HttpMethodType2["Delete"] = "Delete";
712
+ return HttpMethodType2;
713
+ })(HttpMethodType || {});
714
+ var TriggerEventType = /* @__PURE__ */ ((TriggerEventType2) => {
715
+ TriggerEventType2["Create"] = "Create";
716
+ TriggerEventType2["Update"] = "Update";
717
+ TriggerEventType2["Delete"] = "Delete";
718
+ return TriggerEventType2;
719
+ })(TriggerEventType || {});
700
720
 
701
721
  // src/utils/passwordUtils.ts
702
722
  var generatePassword = (length = 12) => {
@@ -823,7 +843,118 @@ var en = {
823
843
  users: "Users",
824
844
  roles: "Roles",
825
845
  settings: "Settings",
826
- backgroundJobs: "Background Jobs"
846
+ backgroundJobs: "Background Jobs",
847
+ triggerRules: "Trigger Rules",
848
+ triggerLogs: "Trigger Logs",
849
+ mirrorConfigs: "Mirror Configs"
850
+ },
851
+ users: {
852
+ fields: {
853
+ photo: "Photo",
854
+ displayName: "Display Name",
855
+ userName: "User Name",
856
+ email: "Email",
857
+ isActive: "Active",
858
+ accessFailedCount: "Access Failed Count"
859
+ },
860
+ actions: {
861
+ resetPassword: "Reset Password"
862
+ },
863
+ resetPasswordModal: {
864
+ title: "Reset Password for",
865
+ newPassword: "New Password",
866
+ inputPlaceholder: "Enter new password",
867
+ inputRequired: "Please input the new password!",
868
+ generatePassword: "Generate Complex Password"
869
+ }
870
+ },
871
+ roles: {
872
+ fields: {
873
+ name: "Name",
874
+ isAdministrative: "Is Administrative",
875
+ permissionPolicy: "Permission Policy",
876
+ typePermissions: "Type Permissions"
877
+ }
878
+ },
879
+ triggerRules: {
880
+ fields: {
881
+ name: "Name",
882
+ description: "Description",
883
+ targetTypeName: "Target Type Name",
884
+ onCreated: "On Create",
885
+ onModified: "On Modify",
886
+ onRemoved: "On Delete",
887
+ isActive: "Active",
888
+ httpMethod: "HTTP Method",
889
+ webhookUrl: "Webhook URL",
890
+ customHeaders: "Custom Headers (JSON)",
891
+ onlyObjectFitsCriteria: "Only Trigger if Criteria Matches",
892
+ criteria: "Criteria Expression",
893
+ triggerEvents: "Trigger Events"
894
+ },
895
+ tooltips: {
896
+ targetTypeName: "Select the business object type to monitor",
897
+ customHeaders: 'Example: {"X-API-Key": "your-api-key", "X-Custom": "value"}',
898
+ criteria: "Leave empty to trigger for all objects of the target type"
899
+ },
900
+ placeholders: {
901
+ name: "Enter rule name",
902
+ description: "Optional description",
903
+ webhookUrl: "https://example.com/webhook",
904
+ customHeaders: '{"X-API-Key": "your-api-key"}',
905
+ criteria: "e.g., [Status] = 'Active'"
906
+ },
907
+ validation: {
908
+ nameRequired: "Please enter a name",
909
+ webhookUrlRequired: "Please enter webhook URL",
910
+ webhookUrlInvalid: "Please enter a valid URL"
911
+ }
912
+ },
913
+ triggerLogs: {
914
+ fields: {
915
+ executionTime: "Execution Time",
916
+ status: "Status",
917
+ eventType: "Event",
918
+ objectType: "Object Type",
919
+ objectKey: "Object Key",
920
+ httpMethod: "HTTP Method",
921
+ statusCode: "Status Code",
922
+ error: "Error",
923
+ payload: "Payload",
924
+ responseBody: "Response"
925
+ },
926
+ status: {
927
+ success: "Success",
928
+ failed: "Failed"
929
+ },
930
+ drawer: {
931
+ title: "Trigger Log Details"
932
+ }
933
+ },
934
+ mirrorConfigs: {
935
+ fields: {
936
+ sourceTypeName: "Source Type Name",
937
+ localTypeName: "Local Type Name",
938
+ isActive: "Active",
939
+ description: "Description",
940
+ status: "Status"
941
+ },
942
+ tooltips: {
943
+ sourceTypeName: "Full type name from the source system (e.g., 'Sample.Module.BusinessObjects.TriggerDemo')",
944
+ localTypeName: "Select the local mirrored type"
945
+ },
946
+ placeholders: {
947
+ sourceTypeName: "e.g., SourceNamespace.SourceObject",
948
+ description: "Optional description"
949
+ },
950
+ validation: {
951
+ sourceTypeNameRequired: "Please enter source type name",
952
+ localTypeNameRequired: "Please select local type name"
953
+ },
954
+ statusLabels: {
955
+ active: "Active",
956
+ inactive: "Inactive"
957
+ }
827
958
  },
828
959
  backgroundJobs: {
829
960
  title: "Background Jobs",
@@ -973,7 +1104,118 @@ var zhTW = {
973
1104
  users: "\u4F7F\u7528\u8005",
974
1105
  roles: "\u89D2\u8272",
975
1106
  settings: "\u8A2D\u5B9A",
976
- backgroundJobs: "\u80CC\u666F\u6392\u7A0B"
1107
+ backgroundJobs: "\u80CC\u666F\u6392\u7A0B",
1108
+ triggerRules: "\u89F8\u767C\u898F\u5247",
1109
+ triggerLogs: "\u89F8\u767C\u7D00\u9304",
1110
+ mirrorConfigs: "\u93E1\u5C04\u8A2D\u5B9A"
1111
+ },
1112
+ users: {
1113
+ fields: {
1114
+ photo: "\u982D\u50CF",
1115
+ displayName: "\u986F\u793A\u540D\u7A31",
1116
+ userName: "\u4F7F\u7528\u8005\u540D\u7A31",
1117
+ email: "\u96FB\u5B50\u90F5\u4EF6",
1118
+ isActive: "\u555F\u7528",
1119
+ accessFailedCount: "\u767B\u5165\u5931\u6557\u6B21\u6578"
1120
+ },
1121
+ actions: {
1122
+ resetPassword: "\u91CD\u8A2D\u5BC6\u78BC"
1123
+ },
1124
+ resetPasswordModal: {
1125
+ title: "\u91CD\u8A2D\u5BC6\u78BC",
1126
+ newPassword: "\u65B0\u5BC6\u78BC",
1127
+ inputPlaceholder: "\u8ACB\u8F38\u5165\u65B0\u5BC6\u78BC",
1128
+ inputRequired: "\u8ACB\u8F38\u5165\u65B0\u5BC6\u78BC\uFF01",
1129
+ generatePassword: "\u7522\u751F\u8907\u96DC\u5BC6\u78BC"
1130
+ }
1131
+ },
1132
+ roles: {
1133
+ fields: {
1134
+ name: "\u540D\u7A31",
1135
+ isAdministrative: "\u7BA1\u7406\u54E1\u6B0A\u9650",
1136
+ permissionPolicy: "\u6B0A\u9650\u653F\u7B56",
1137
+ typePermissions: "\u985E\u578B\u6B0A\u9650"
1138
+ }
1139
+ },
1140
+ triggerRules: {
1141
+ fields: {
1142
+ name: "\u540D\u7A31",
1143
+ description: "\u63CF\u8FF0",
1144
+ targetTypeName: "\u76EE\u6A19\u985E\u578B\u540D\u7A31",
1145
+ onCreated: "\u65B0\u589E\u6642\u89F8\u767C",
1146
+ onModified: "\u4FEE\u6539\u6642\u89F8\u767C",
1147
+ onRemoved: "\u522A\u9664\u6642\u89F8\u767C",
1148
+ isActive: "\u555F\u7528",
1149
+ httpMethod: "HTTP \u65B9\u6CD5",
1150
+ webhookUrl: "Webhook \u7DB2\u5740",
1151
+ customHeaders: "\u81EA\u8A02\u6A19\u982D (JSON)",
1152
+ onlyObjectFitsCriteria: "\u50C5\u5728\u7B26\u5408\u689D\u4EF6\u6642\u89F8\u767C",
1153
+ criteria: "\u689D\u4EF6\u904B\u7B97\u5F0F",
1154
+ triggerEvents: "\u89F8\u767C\u4E8B\u4EF6"
1155
+ },
1156
+ tooltips: {
1157
+ targetTypeName: "\u9078\u64C7\u8981\u76E3\u63A7\u7684\u696D\u52D9\u7269\u4EF6\u985E\u578B",
1158
+ customHeaders: '\u7BC4\u4F8B: {"X-API-Key": "your-api-key", "X-Custom": "value"}',
1159
+ criteria: "\u7559\u7A7A\u5247\u5C0D\u6240\u6709\u8A72\u985E\u578B\u7684\u7269\u4EF6\u89F8\u767C"
1160
+ },
1161
+ placeholders: {
1162
+ name: "\u8ACB\u8F38\u5165\u898F\u5247\u540D\u7A31",
1163
+ description: "\u9078\u586B\u8AAA\u660E",
1164
+ webhookUrl: "https://example.com/webhook",
1165
+ customHeaders: '{"X-API-Key": "your-api-key"}',
1166
+ criteria: "\u4F8B\u5982\uFF1A[Status] = 'Active'"
1167
+ },
1168
+ validation: {
1169
+ nameRequired: "\u8ACB\u8F38\u5165\u540D\u7A31",
1170
+ webhookUrlRequired: "\u8ACB\u8F38\u5165 Webhook \u7DB2\u5740",
1171
+ webhookUrlInvalid: "\u8ACB\u8F38\u5165\u6709\u6548\u7684\u7DB2\u5740"
1172
+ }
1173
+ },
1174
+ triggerLogs: {
1175
+ fields: {
1176
+ executionTime: "\u57F7\u884C\u6642\u9593",
1177
+ status: "\u72C0\u614B",
1178
+ eventType: "\u4E8B\u4EF6",
1179
+ objectType: "\u7269\u4EF6\u985E\u578B",
1180
+ objectKey: "\u7269\u4EF6\u9375\u503C",
1181
+ httpMethod: "HTTP \u65B9\u6CD5",
1182
+ statusCode: "\u72C0\u614B\u78BC",
1183
+ error: "\u932F\u8AA4",
1184
+ payload: "\u8CC7\u6599\u5167\u5BB9",
1185
+ responseBody: "\u56DE\u61C9"
1186
+ },
1187
+ status: {
1188
+ success: "\u6210\u529F",
1189
+ failed: "\u5931\u6557"
1190
+ },
1191
+ drawer: {
1192
+ title: "\u89F8\u767C\u7D00\u9304\u8A73\u60C5"
1193
+ }
1194
+ },
1195
+ mirrorConfigs: {
1196
+ fields: {
1197
+ sourceTypeName: "\u4F86\u6E90\u985E\u578B\u540D\u7A31",
1198
+ localTypeName: "\u672C\u5730\u985E\u578B\u540D\u7A31",
1199
+ isActive: "\u555F\u7528",
1200
+ description: "\u63CF\u8FF0",
1201
+ status: "\u72C0\u614B"
1202
+ },
1203
+ tooltips: {
1204
+ sourceTypeName: "\u4F86\u6E90\u7CFB\u7D71\u7684\u5B8C\u6574\u985E\u578B\u540D\u7A31\uFF08\u4F8B\u5982\uFF1A'Sample.Module.BusinessObjects.TriggerDemo'\uFF09",
1205
+ localTypeName: "\u9078\u64C7\u672C\u5730\u93E1\u5C04\u985E\u578B"
1206
+ },
1207
+ placeholders: {
1208
+ sourceTypeName: "\u4F8B\u5982\uFF1ASourceNamespace.SourceObject",
1209
+ description: "\u9078\u586B\u8AAA\u660E"
1210
+ },
1211
+ validation: {
1212
+ sourceTypeNameRequired: "\u8ACB\u8F38\u5165\u4F86\u6E90\u985E\u578B\u540D\u7A31",
1213
+ localTypeNameRequired: "\u8ACB\u9078\u64C7\u672C\u5730\u985E\u578B\u540D\u7A31"
1214
+ },
1215
+ statusLabels: {
1216
+ active: "\u555F\u7528",
1217
+ inactive: "\u505C\u7528"
1218
+ }
977
1219
  },
978
1220
  backgroundJobs: {
979
1221
  title: "\u80CC\u666F\u6392\u7A0B",
@@ -1335,12 +1577,14 @@ import { useTranslation as useTranslation3 } from "react-i18next";
1335
1577
  var SmartList = ({
1336
1578
  children,
1337
1579
  resource,
1338
- searchFields
1580
+ searchFields,
1581
+ meta
1339
1582
  }) => {
1340
1583
  const { t } = useTranslation3();
1341
1584
  const { tableProps, searchFormProps, tableQuery, setFilters } = useTable({
1342
1585
  resource,
1343
1586
  syncWithLocation: true,
1587
+ meta,
1344
1588
  onSearch: (params) => {
1345
1589
  const filters = [];
1346
1590
  const { search } = params;
@@ -1357,11 +1601,17 @@ var SmartList = ({
1357
1601
  return filters;
1358
1602
  }
1359
1603
  });
1604
+ const getDataIndexKey = (dataIndex) => {
1605
+ if (Array.isArray(dataIndex)) {
1606
+ return dataIndex.join(".");
1607
+ }
1608
+ return String(dataIndex || "unknown");
1609
+ };
1360
1610
  const columns = useMemo(
1361
1611
  () => React4.Children.toArray(children).map((child) => {
1362
1612
  const props = child.props || {};
1363
1613
  return {
1364
- key: String(props.dataIndex || props.title || "unknown"),
1614
+ key: getDataIndexKey(props.dataIndex) || props.title || "unknown",
1365
1615
  title: props.title,
1366
1616
  dataIndex: props.dataIndex,
1367
1617
  defaultVisible: props.defaultVisible
@@ -1418,11 +1668,11 @@ var SmartList = ({
1418
1668
  col.title || col.dataIndex
1419
1669
  )));
1420
1670
  const filteredChildren = React4.Children.toArray(children).filter((child) => {
1421
- const key = child.props.dataIndex || child.props.title || "unknown";
1671
+ const key = getDataIndexKey(child.props.dataIndex) || child.props.title || "unknown";
1422
1672
  return visibleColumns.includes(key);
1423
1673
  }).map((child) => {
1424
1674
  if (child.props.dataIndex) {
1425
- return React4.cloneElement(child, { key: child.props.dataIndex });
1675
+ return React4.cloneElement(child, { key: getDataIndexKey(child.props.dataIndex) });
1426
1676
  }
1427
1677
  return child;
1428
1678
  });
@@ -19617,7 +19867,7 @@ var AuthCallback = () => {
19617
19867
 
19618
19868
  // src/pages/application-users/list.tsx
19619
19869
  import React11, { useState as useState6 } from "react";
19620
- import { useNotification } from "@refinedev/core";
19870
+ import { useNotification, useTranslate as useTranslate3 } from "@refinedev/core";
19621
19871
  import { EditButton, DeleteButton } from "@refinedev/antd";
19622
19872
  import {
19623
19873
  Table as Table4,
@@ -19631,6 +19881,7 @@ import {
19631
19881
  } from "antd/lib";
19632
19882
  import { KeyOutlined, ThunderboltOutlined as ThunderboltOutlined2 } from "@ant-design/icons";
19633
19883
  var ApplicationUserList = () => {
19884
+ const t = useTranslate3();
19634
19885
  const [isModalOpen, setIsModalOpen] = useState6(false);
19635
19886
  const [selectedUser, setSelectedUser] = useState6(null);
19636
19887
  const [form] = Form5.useForm();
@@ -19674,7 +19925,7 @@ var ApplicationUserList = () => {
19674
19925
  Table4.Column,
19675
19926
  {
19676
19927
  dataIndex: "Photo",
19677
- title: "Photo",
19928
+ title: t("users.fields.photo"),
19678
19929
  render: (value) => value ? /* @__PURE__ */ React11.createElement("img", { src: `data:image/png;base64,${value}`, alt: "User", style: { height: 40, width: 40, objectFit: "cover", borderRadius: "50%" } }) : "-"
19679
19930
  }
19680
19931
  ),
@@ -19682,7 +19933,7 @@ var ApplicationUserList = () => {
19682
19933
  Table4.Column,
19683
19934
  {
19684
19935
  dataIndex: "DisplayName",
19685
- title: "Display Name",
19936
+ title: t("users.fields.displayName"),
19686
19937
  sorter: true,
19687
19938
  defaultSortOrder: "ascend",
19688
19939
  defaultVisible: true
@@ -19692,7 +19943,7 @@ var ApplicationUserList = () => {
19692
19943
  Table4.Column,
19693
19944
  {
19694
19945
  dataIndex: "UserName",
19695
- title: "User Name",
19946
+ title: t("users.fields.userName"),
19696
19947
  sorter: true,
19697
19948
  defaultVisible: true
19698
19949
  }
@@ -19701,7 +19952,7 @@ var ApplicationUserList = () => {
19701
19952
  Table4.Column,
19702
19953
  {
19703
19954
  dataIndex: "Email",
19704
- title: "Email",
19955
+ title: t("users.fields.email"),
19705
19956
  sorter: true
19706
19957
  }
19707
19958
  ),
@@ -19709,7 +19960,7 @@ var ApplicationUserList = () => {
19709
19960
  Table4.Column,
19710
19961
  {
19711
19962
  dataIndex: "IsActive",
19712
- title: "Active",
19963
+ title: t("users.fields.isActive"),
19713
19964
  render: (value) => /* @__PURE__ */ React11.createElement(Checkbox3, { checked: value, disabled: true }),
19714
19965
  sorter: true
19715
19966
  }
@@ -19718,7 +19969,7 @@ var ApplicationUserList = () => {
19718
19969
  Table4.Column,
19719
19970
  {
19720
19971
  dataIndex: "AccessFailedCount",
19721
- title: "Access Failed Count"
19972
+ title: t("users.fields.accessFailedCount")
19722
19973
  }
19723
19974
  ),
19724
19975
  /* @__PURE__ */ React11.createElement(
@@ -19726,7 +19977,7 @@ var ApplicationUserList = () => {
19726
19977
  {
19727
19978
  title: "Actions",
19728
19979
  dataIndex: "actions",
19729
- render: (_, record) => /* @__PURE__ */ React11.createElement(Space6, null, /* @__PURE__ */ React11.createElement(Tooltip, { title: "Reset Password" }, /* @__PURE__ */ React11.createElement(
19980
+ render: (_, record) => /* @__PURE__ */ React11.createElement(Space6, null, /* @__PURE__ */ React11.createElement(Tooltip, { title: t("users.actions.resetPassword") }, /* @__PURE__ */ React11.createElement(
19730
19981
  Button7,
19731
19982
  {
19732
19983
  size: "small",
@@ -19739,7 +19990,7 @@ var ApplicationUserList = () => {
19739
19990
  ), /* @__PURE__ */ React11.createElement(
19740
19991
  Modal3,
19741
19992
  {
19742
- title: `Reset Password for ${selectedUser?.DisplayName || selectedUser?.UserName}`,
19993
+ title: `${t("users.resetPasswordModal.title")} ${selectedUser?.DisplayName || selectedUser?.UserName}`,
19743
19994
  open: isModalOpen,
19744
19995
  onCancel: () => setIsModalOpen(false),
19745
19996
  onOk: () => form.submit(),
@@ -19749,25 +20000,27 @@ var ApplicationUserList = () => {
19749
20000
  Form5.Item,
19750
20001
  {
19751
20002
  name: "password",
19752
- label: "New Password",
20003
+ label: t("users.resetPasswordModal.newPassword"),
19753
20004
  style: { flex: 1, marginBottom: 0 },
19754
- rules: [{ required: true, message: "Please input the new password!" }]
20005
+ rules: [{ required: true, message: t("users.resetPasswordModal.inputRequired") }]
19755
20006
  },
19756
- /* @__PURE__ */ React11.createElement(Input5.Password, { placeholder: "Enter new password" })
19757
- ), /* @__PURE__ */ React11.createElement(Tooltip, { title: "Generate Complex Password" }, /* @__PURE__ */ React11.createElement(Button7, { icon: /* @__PURE__ */ React11.createElement(ThunderboltOutlined2, null), onClick: handleGeneratePassword }))))
20007
+ /* @__PURE__ */ React11.createElement(Input5.Password, { placeholder: t("users.resetPasswordModal.inputPlaceholder") })
20008
+ ), /* @__PURE__ */ React11.createElement(Tooltip, { title: t("users.resetPasswordModal.generatePassword") }, /* @__PURE__ */ React11.createElement(Button7, { icon: /* @__PURE__ */ React11.createElement(ThunderboltOutlined2, null), onClick: handleGeneratePassword }))))
19758
20009
  ));
19759
20010
  };
19760
20011
 
19761
20012
  // src/pages/application-users/create.tsx
19762
20013
  import React12 from "react";
20014
+ import { useTranslate as useTranslate4 } from "@refinedev/core";
19763
20015
  import { Create, useForm } from "@refinedev/antd";
19764
20016
  import { Form as Form6, Input as Input6, Checkbox as Checkbox4 } from "antd/lib";
19765
20017
  var ApplicationUserCreate = () => {
20018
+ const t = useTranslate4();
19766
20019
  const { formProps, saveButtonProps } = useForm();
19767
20020
  return /* @__PURE__ */ React12.createElement(Create, { saveButtonProps }, /* @__PURE__ */ React12.createElement(Form6, { ...formProps, layout: "vertical" }, /* @__PURE__ */ React12.createElement(
19768
20021
  Form6.Item,
19769
20022
  {
19770
- label: "User Name",
20023
+ label: t("users.fields.userName"),
19771
20024
  name: "UserName",
19772
20025
  rules: [
19773
20026
  {
@@ -19779,14 +20032,14 @@ var ApplicationUserCreate = () => {
19779
20032
  ), /* @__PURE__ */ React12.createElement(
19780
20033
  Form6.Item,
19781
20034
  {
19782
- label: "Display Name",
20035
+ label: t("users.fields.displayName"),
19783
20036
  name: "DisplayName"
19784
20037
  },
19785
20038
  /* @__PURE__ */ React12.createElement(Input6, null)
19786
20039
  ), /* @__PURE__ */ React12.createElement(
19787
20040
  Form6.Item,
19788
20041
  {
19789
- label: "Email",
20042
+ label: t("users.fields.email"),
19790
20043
  name: "Email",
19791
20044
  rules: [
19792
20045
  {
@@ -19798,16 +20051,16 @@ var ApplicationUserCreate = () => {
19798
20051
  ), /* @__PURE__ */ React12.createElement(
19799
20052
  Form6.Item,
19800
20053
  {
19801
- label: "Is Active",
20054
+ label: t("users.fields.isActive"),
19802
20055
  name: "IsActive",
19803
20056
  valuePropName: "checked",
19804
20057
  initialValue: true
19805
20058
  },
19806
- /* @__PURE__ */ React12.createElement(Checkbox4, null, "Active")
20059
+ /* @__PURE__ */ React12.createElement(Checkbox4, null, t("users.fields.isActive"))
19807
20060
  ), /* @__PURE__ */ React12.createElement(
19808
20061
  Form6.Item,
19809
20062
  {
19810
- label: "Photo",
20063
+ label: t("users.fields.photo"),
19811
20064
  name: "Photo"
19812
20065
  },
19813
20066
  /* @__PURE__ */ React12.createElement(Base64Upload, null)
@@ -19816,9 +20069,11 @@ var ApplicationUserCreate = () => {
19816
20069
 
19817
20070
  // src/pages/application-users/edit.tsx
19818
20071
  import React13 from "react";
20072
+ import { useTranslate as useTranslate5 } from "@refinedev/core";
19819
20073
  import { Edit, useForm as useForm2, useSelect } from "@refinedev/antd";
19820
20074
  import { Form as Form7, Input as Input7, Checkbox as Checkbox5, Select, App } from "antd/lib";
19821
20075
  var ApplicationUserEdit = () => {
20076
+ const t = useTranslate5();
19822
20077
  const { message: message3 } = App.useApp();
19823
20078
  const { formProps, saveButtonProps, id, form } = useForm2({
19824
20079
  meta: {
@@ -19861,7 +20116,7 @@ var ApplicationUserEdit = () => {
19861
20116
  return /* @__PURE__ */ React13.createElement(Edit, { saveButtonProps }, /* @__PURE__ */ React13.createElement(Form7, { ...formProps, layout: "vertical", onFinish: handleOnFinish }, /* @__PURE__ */ React13.createElement(
19862
20117
  Form7.Item,
19863
20118
  {
19864
- label: "User Name",
20119
+ label: t("users.fields.userName"),
19865
20120
  name: "UserName",
19866
20121
  rules: [
19867
20122
  {
@@ -19873,14 +20128,14 @@ var ApplicationUserEdit = () => {
19873
20128
  ), /* @__PURE__ */ React13.createElement(
19874
20129
  Form7.Item,
19875
20130
  {
19876
- label: "Display Name",
20131
+ label: t("users.fields.displayName"),
19877
20132
  name: "DisplayName"
19878
20133
  },
19879
20134
  /* @__PURE__ */ React13.createElement(Input7, null)
19880
20135
  ), /* @__PURE__ */ React13.createElement(
19881
20136
  Form7.Item,
19882
20137
  {
19883
- label: "Email",
20138
+ label: t("users.fields.email"),
19884
20139
  name: "Email",
19885
20140
  rules: [
19886
20141
  {
@@ -19892,15 +20147,15 @@ var ApplicationUserEdit = () => {
19892
20147
  ), /* @__PURE__ */ React13.createElement(
19893
20148
  Form7.Item,
19894
20149
  {
19895
- label: "Is Active",
20150
+ label: t("users.fields.isActive"),
19896
20151
  name: "IsActive",
19897
20152
  valuePropName: "checked"
19898
20153
  },
19899
- /* @__PURE__ */ React13.createElement(Checkbox5, null, "Active")
20154
+ /* @__PURE__ */ React13.createElement(Checkbox5, null, t("users.fields.isActive"))
19900
20155
  ), /* @__PURE__ */ React13.createElement(
19901
20156
  Form7.Item,
19902
20157
  {
19903
- label: "Roles",
20158
+ label: t("roles.fields.name"),
19904
20159
  name: "Roles",
19905
20160
  getValueProps: (value) => {
19906
20161
  if (Array.isArray(value)) {
@@ -19920,7 +20175,7 @@ var ApplicationUserEdit = () => {
19920
20175
  ), /* @__PURE__ */ React13.createElement(
19921
20176
  Form7.Item,
19922
20177
  {
19923
- label: "Photo",
20178
+ label: t("users.fields.photo"),
19924
20179
  name: "Photo"
19925
20180
  },
19926
20181
  /* @__PURE__ */ React13.createElement(Base64Upload, null)
@@ -19929,23 +20184,25 @@ var ApplicationUserEdit = () => {
19929
20184
 
19930
20185
  // src/pages/roles/list.tsx
19931
20186
  import React14 from "react";
20187
+ import { useTranslate as useTranslate6 } from "@refinedev/core";
19932
20188
  import { useTable as useTable2, List as List2, EditButton as EditButton2, DeleteButton as DeleteButton2 } from "@refinedev/antd";
19933
20189
  import { Table as Table5, Space as Space7, Checkbox as Checkbox6 } from "antd/lib";
19934
20190
  var RoleList = () => {
20191
+ const t = useTranslate6();
19935
20192
  const { tableProps } = useTable2({
19936
20193
  syncWithLocation: true
19937
20194
  });
19938
- 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(
20195
+ return /* @__PURE__ */ React14.createElement(List2, null, /* @__PURE__ */ React14.createElement(Table5, { ...tableProps, rowKey: "Oid" }, /* @__PURE__ */ React14.createElement(Table5.Column, { dataIndex: "Name", title: t("roles.fields.name") }), /* @__PURE__ */ React14.createElement(
19939
20196
  Table5.Column,
19940
20197
  {
19941
20198
  dataIndex: "IsAdministrative",
19942
- title: "Is Administrative",
20199
+ title: t("roles.fields.isAdministrative"),
19943
20200
  render: (value) => /* @__PURE__ */ React14.createElement(Checkbox6, { checked: value, disabled: true })
19944
20201
  }
19945
- ), /* @__PURE__ */ React14.createElement(Table5.Column, { dataIndex: "PermissionPolicy", title: "Permission Policy" }), /* @__PURE__ */ React14.createElement(
20202
+ ), /* @__PURE__ */ React14.createElement(Table5.Column, { dataIndex: "PermissionPolicy", title: t("roles.fields.permissionPolicy") }), /* @__PURE__ */ React14.createElement(
19946
20203
  Table5.Column,
19947
20204
  {
19948
- title: "Actions",
20205
+ title: t("buttons.list"),
19949
20206
  dataIndex: "actions",
19950
20207
  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 }))
19951
20208
  }
@@ -19954,6 +20211,7 @@ var RoleList = () => {
19954
20211
 
19955
20212
  // src/pages/roles/create.tsx
19956
20213
  import React16 from "react";
20214
+ import { useTranslate as useTranslate7 } from "@refinedev/core";
19957
20215
  import { Create as Create2, useForm as useForm3 } from "@refinedev/antd";
19958
20216
  import { Form as Form9, Input as Input8, Checkbox as Checkbox7, Select as Select3 } from "antd/lib";
19959
20217
 
@@ -20072,6 +20330,7 @@ var TypePermissionList = ({ masterId }) => {
20072
20330
 
20073
20331
  // src/pages/roles/create.tsx
20074
20332
  var RoleCreate = () => {
20333
+ const t = useTranslate7();
20075
20334
  const [form] = Form9.useForm();
20076
20335
  const { formProps, saveButtonProps } = useForm3();
20077
20336
  const handleSave = () => {
@@ -20090,7 +20349,7 @@ var RoleCreate = () => {
20090
20349
  /* @__PURE__ */ React16.createElement(
20091
20350
  Form9.Item,
20092
20351
  {
20093
- label: "Name",
20352
+ label: t("roles.fields.name"),
20094
20353
  name: "Name",
20095
20354
  rules: [{ required: true }]
20096
20355
  },
@@ -20099,16 +20358,16 @@ var RoleCreate = () => {
20099
20358
  /* @__PURE__ */ React16.createElement(
20100
20359
  Form9.Item,
20101
20360
  {
20102
- label: "Is Administrative",
20361
+ label: t("roles.fields.isAdministrative"),
20103
20362
  name: "IsAdministrative",
20104
20363
  valuePropName: "checked"
20105
20364
  },
20106
- /* @__PURE__ */ React16.createElement(Checkbox7, null, "Is Administrative")
20365
+ /* @__PURE__ */ React16.createElement(Checkbox7, null, t("roles.fields.isAdministrative"))
20107
20366
  ),
20108
20367
  /* @__PURE__ */ React16.createElement(
20109
20368
  Form9.Item,
20110
20369
  {
20111
- label: "Permission Policy",
20370
+ label: t("roles.fields.permissionPolicy"),
20112
20371
  name: "PermissionPolicy",
20113
20372
  initialValue: "DenyAllByDefault" /* DenyAllByDefault */,
20114
20373
  rules: [{ required: true }]
@@ -20130,9 +20389,11 @@ var RoleCreate = () => {
20130
20389
 
20131
20390
  // src/pages/roles/edit.tsx
20132
20391
  import React17 from "react";
20392
+ import { useTranslate as useTranslate8 } from "@refinedev/core";
20133
20393
  import { Edit as Edit2, useForm as useForm4 } from "@refinedev/antd";
20134
20394
  import { Form as Form10, Input as Input9, Checkbox as Checkbox8, Select as Select4 } from "antd/lib";
20135
20395
  var RoleEdit = () => {
20396
+ const t = useTranslate8();
20136
20397
  const { formProps, saveButtonProps, id } = useForm4();
20137
20398
  const handleSave = () => {
20138
20399
  formProps.form?.submit();
@@ -20150,7 +20411,7 @@ var RoleEdit = () => {
20150
20411
  /* @__PURE__ */ React17.createElement(
20151
20412
  Form10.Item,
20152
20413
  {
20153
- label: "Name",
20414
+ label: t("roles.fields.name"),
20154
20415
  name: "Name",
20155
20416
  rules: [{ required: true }]
20156
20417
  },
@@ -20159,16 +20420,16 @@ var RoleEdit = () => {
20159
20420
  /* @__PURE__ */ React17.createElement(
20160
20421
  Form10.Item,
20161
20422
  {
20162
- label: "Is Administrative",
20423
+ label: t("roles.fields.isAdministrative"),
20163
20424
  name: "IsAdministrative",
20164
20425
  valuePropName: "checked"
20165
20426
  },
20166
- /* @__PURE__ */ React17.createElement(Checkbox8, null, "Is Administrative")
20427
+ /* @__PURE__ */ React17.createElement(Checkbox8, null, t("roles.fields.isAdministrative"))
20167
20428
  ),
20168
20429
  /* @__PURE__ */ React17.createElement(
20169
20430
  Form10.Item,
20170
20431
  {
20171
- label: "Permission Policy",
20432
+ label: t("roles.fields.permissionPolicy"),
20172
20433
  name: "PermissionPolicy",
20173
20434
  rules: [{ required: true }]
20174
20435
  },
@@ -20194,9 +20455,9 @@ var RoleEdit = () => {
20194
20455
 
20195
20456
  // src/pages/background-jobs/list.tsx
20196
20457
  import React18, { useState as useState7, useEffect as useEffect6, useCallback } from "react";
20197
- import { useApiUrl, useTranslate as useTranslate3 } from "@refinedev/core";
20458
+ import { useApiUrl, useTranslate as useTranslate9 } from "@refinedev/core";
20198
20459
  import { List as List3 } from "@refinedev/antd";
20199
- import { Table as Table7, Button as Button8, Space as Space8, Tag, Card as Card3, Statistic, Row, Col, message as message2, Tooltip as Tooltip2, Tabs, Drawer, Descriptions, Timeline, Skeleton } from "antd";
20460
+ import { Table as Table7, Button as Button8, Space as Space8, Tag, Card as Card3, Statistic, Row, Col, message as message2, Tooltip as Tooltip2, Tabs, Drawer, Descriptions, Timeline, Skeleton, theme as theme7 } from "antd";
20200
20461
  import {
20201
20462
  ReloadOutlined as ReloadOutlined2,
20202
20463
  PlayCircleOutlined,
@@ -20210,9 +20471,10 @@ var BackgroundJobList = ({
20210
20471
  title,
20211
20472
  apiUrl: customApiUrl
20212
20473
  }) => {
20213
- const t = useTranslate3();
20474
+ const t = useTranslate9();
20214
20475
  const defaultApiUrl = useApiUrl();
20215
20476
  const apiUrl = customApiUrl || defaultApiUrl?.replace("/odata", "");
20477
+ const { token } = theme7.useToken();
20216
20478
  const [refreshKey, setRefreshKey] = useState7(0);
20217
20479
  const [activeTab, setActiveTab] = useState7("recurring");
20218
20480
  const [loading, setLoading] = useState7(false);
@@ -20225,8 +20487,8 @@ var BackgroundJobList = ({
20225
20487
  const [detailLoading, setDetailLoading] = useState7(false);
20226
20488
  const fetchData = useCallback(async () => {
20227
20489
  setLoading(true);
20228
- const token = localStorage.getItem("refine-auth") || localStorage.getItem("access_token");
20229
- const headers = token ? { "Authorization": `Bearer ${token}` } : {};
20490
+ const token2 = localStorage.getItem("refine-auth") || localStorage.getItem("access_token");
20491
+ const headers = token2 ? { "Authorization": `Bearer ${token2}` } : {};
20230
20492
  try {
20231
20493
  const [recurringRes, succeededRes, failedRes, processingRes] = await Promise.all([
20232
20494
  fetch(`${apiUrl}/hangfire/recurring`, { headers }),
@@ -20261,8 +20523,8 @@ var BackgroundJobList = ({
20261
20523
  };
20262
20524
  const handleTrigger = async (jobId) => {
20263
20525
  try {
20264
- const token = localStorage.getItem("refine-auth") || localStorage.getItem("access_token");
20265
- const headers = token ? { "Authorization": `Bearer ${token}` } : {};
20526
+ const token2 = localStorage.getItem("refine-auth") || localStorage.getItem("access_token");
20527
+ const headers = token2 ? { "Authorization": `Bearer ${token2}` } : {};
20266
20528
  const response = await fetch(`${apiUrl}/hangfire/trigger/${jobId}`, {
20267
20529
  method: "POST",
20268
20530
  headers
@@ -20279,8 +20541,8 @@ var BackgroundJobList = ({
20279
20541
  };
20280
20542
  const handleDelete = async (jobId) => {
20281
20543
  try {
20282
- const token = localStorage.getItem("refine-auth") || localStorage.getItem("access_token");
20283
- const headers = token ? { "Authorization": `Bearer ${token}` } : {};
20544
+ const token2 = localStorage.getItem("refine-auth") || localStorage.getItem("access_token");
20545
+ const headers = token2 ? { "Authorization": `Bearer ${token2}` } : {};
20284
20546
  const response = await fetch(`${apiUrl}/hangfire/recurring/${jobId}`, {
20285
20547
  method: "DELETE",
20286
20548
  headers
@@ -20300,8 +20562,8 @@ var BackgroundJobList = ({
20300
20562
  setDetailLoading(true);
20301
20563
  setJobDetails(null);
20302
20564
  try {
20303
- const token = localStorage.getItem("refine-auth") || localStorage.getItem("access_token");
20304
- const headers = token ? { "Authorization": `Bearer ${token}` } : {};
20565
+ const token2 = localStorage.getItem("refine-auth") || localStorage.getItem("access_token");
20566
+ const headers = token2 ? { "Authorization": `Bearer ${token2}` } : {};
20305
20567
  const res = await fetch(`${apiUrl}/hangfire/jobs/${jobId}`, { headers });
20306
20568
  if (res.ok) {
20307
20569
  const data = await res.json();
@@ -20536,10 +20798,799 @@ var BackgroundJobList = ({
20536
20798
  open: drawerVisible,
20537
20799
  width: 600
20538
20800
  },
20539
- detailLoading ? /* @__PURE__ */ React18.createElement(Skeleton, { active: true }) : jobDetails ? /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(Descriptions, { column: 1, bordered: true, size: "small" }, /* @__PURE__ */ React18.createElement(Descriptions.Item, { label: t("backgroundJobs.drawer.jobName") }, jobDetails.JobName), /* @__PURE__ */ React18.createElement(Descriptions.Item, { label: t("backgroundJobs.drawer.createdAt") }, jobDetails.CreatedAt ? new Date(jobDetails.CreatedAt).toLocaleString() : "-")), /* @__PURE__ */ React18.createElement("div", { style: { marginTop: 24 } }, /* @__PURE__ */ React18.createElement("h3", null, t("backgroundJobs.drawer.history")), /* @__PURE__ */ React18.createElement(Timeline, { mode: "left" }, jobDetails.History.map((h, i) => /* @__PURE__ */ React18.createElement(Timeline.Item, { key: i, color: h.StateName === "Succeeded" ? "green" : h.StateName === "Failed" ? "red" : "blue" }, /* @__PURE__ */ React18.createElement("p", null, /* @__PURE__ */ React18.createElement("strong", null, h.StateName), " - ", new Date(h.CreatedAt).toLocaleString()), h.Reason && /* @__PURE__ */ React18.createElement("p", null, t("backgroundJobs.drawer.reason"), ": ", h.Reason), h.Data && Object.keys(h.Data).length > 0 && /* @__PURE__ */ React18.createElement("div", { style: { background: "#f5f5f5", padding: 8, borderRadius: 4, overflowX: "auto", marginTop: 8 } }, /* @__PURE__ */ React18.createElement("pre", { style: { margin: 0, fontSize: 12 } }, JSON.stringify(h.Data, null, 2)))))))) : /* @__PURE__ */ React18.createElement("div", null, t("backgroundJobs.drawer.noData"))
20801
+ detailLoading ? /* @__PURE__ */ React18.createElement(Skeleton, { active: true }) : jobDetails ? /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(Descriptions, { column: 1, bordered: true, size: "small" }, /* @__PURE__ */ React18.createElement(Descriptions.Item, { label: t("backgroundJobs.drawer.jobName") }, jobDetails.JobName), /* @__PURE__ */ React18.createElement(Descriptions.Item, { label: t("backgroundJobs.drawer.createdAt") }, jobDetails.CreatedAt ? new Date(jobDetails.CreatedAt).toLocaleString() : "-")), /* @__PURE__ */ React18.createElement("div", { style: { marginTop: 24 } }, /* @__PURE__ */ React18.createElement("h3", null, t("backgroundJobs.drawer.history")), /* @__PURE__ */ React18.createElement(Timeline, { mode: "left" }, jobDetails.History.map((h, i) => /* @__PURE__ */ React18.createElement(Timeline.Item, { key: i, color: h.StateName === "Succeeded" ? "green" : h.StateName === "Failed" ? "red" : "blue" }, /* @__PURE__ */ React18.createElement("p", null, /* @__PURE__ */ React18.createElement("strong", null, h.StateName), " - ", new Date(h.CreatedAt).toLocaleString()), h.Reason && /* @__PURE__ */ React18.createElement("p", null, t("backgroundJobs.drawer.reason"), ": ", h.Reason), h.Data && Object.keys(h.Data).length > 0 && /* @__PURE__ */ React18.createElement("div", { style: { background: token.colorFillAlter, padding: 8, borderRadius: 4, overflowX: "auto", marginTop: 8 } }, /* @__PURE__ */ React18.createElement("pre", { style: { margin: 0, fontSize: 12, color: token.colorText } }, JSON.stringify(h.Data, null, 2)))))))) : /* @__PURE__ */ React18.createElement("div", null, t("backgroundJobs.drawer.noData"))
20540
20802
  )
20541
20803
  );
20542
20804
  };
20805
+
20806
+ // src/pages/trigger-rules/list.tsx
20807
+ import React19 from "react";
20808
+ import { useTranslate as useTranslate10 } from "@refinedev/core";
20809
+ import { EditButton as EditButton3, DeleteButton as DeleteButton3 } from "@refinedev/antd";
20810
+ import { Table as Table8, Space as Space9, Tag as Tag2, Checkbox as Checkbox9 } from "antd";
20811
+ var TriggerRuleList = () => {
20812
+ const t = useTranslate10();
20813
+ const getHttpMethodColor = (method) => {
20814
+ switch (method) {
20815
+ case "Post" /* Post */:
20816
+ return "green";
20817
+ case "Get" /* Get */:
20818
+ return "blue";
20819
+ case "Put" /* Put */:
20820
+ return "orange";
20821
+ case "Patch" /* Patch */:
20822
+ return "purple";
20823
+ case "Delete" /* Delete */:
20824
+ return "red";
20825
+ default:
20826
+ return "default";
20827
+ }
20828
+ };
20829
+ return /* @__PURE__ */ React19.createElement(
20830
+ SmartList,
20831
+ {
20832
+ searchFields: ["Name", "Description", "WebhookUrl"]
20833
+ },
20834
+ /* @__PURE__ */ React19.createElement(
20835
+ Table8.Column,
20836
+ {
20837
+ dataIndex: "Name",
20838
+ title: t("triggerRules.fields.name"),
20839
+ sorter: true,
20840
+ defaultVisible: true
20841
+ }
20842
+ ),
20843
+ /* @__PURE__ */ React19.createElement(
20844
+ Table8.Column,
20845
+ {
20846
+ dataIndex: "Description",
20847
+ title: t("triggerRules.fields.description")
20848
+ }
20849
+ ),
20850
+ /* @__PURE__ */ React19.createElement(
20851
+ Table8.Column,
20852
+ {
20853
+ dataIndex: "TargetTypeName",
20854
+ title: t("triggerRules.fields.targetTypeName"),
20855
+ render: (value) => value ? /* @__PURE__ */ React19.createElement("span", { style: { fontFamily: "monospace", fontSize: "0.9em" } }, value) : "-"
20856
+ }
20857
+ ),
20858
+ /* @__PURE__ */ React19.createElement(
20859
+ Table8.Column,
20860
+ {
20861
+ dataIndex: "IsActive",
20862
+ title: t("triggerRules.fields.isActive"),
20863
+ render: (value) => /* @__PURE__ */ React19.createElement(Checkbox9, { checked: value, disabled: true }),
20864
+ sorter: true,
20865
+ defaultVisible: true
20866
+ }
20867
+ ),
20868
+ /* @__PURE__ */ React19.createElement(
20869
+ Table8.Column,
20870
+ {
20871
+ dataIndex: "OnCreated",
20872
+ title: t("triggerRules.fields.onCreated"),
20873
+ render: (value) => /* @__PURE__ */ React19.createElement(Checkbox9, { checked: value, disabled: true })
20874
+ }
20875
+ ),
20876
+ /* @__PURE__ */ React19.createElement(
20877
+ Table8.Column,
20878
+ {
20879
+ dataIndex: "OnModified",
20880
+ title: t("triggerRules.fields.onModified"),
20881
+ render: (value) => /* @__PURE__ */ React19.createElement(Checkbox9, { checked: value, disabled: true })
20882
+ }
20883
+ ),
20884
+ /* @__PURE__ */ React19.createElement(
20885
+ Table8.Column,
20886
+ {
20887
+ dataIndex: "OnRemoved",
20888
+ title: t("triggerRules.fields.onRemoved"),
20889
+ render: (value) => /* @__PURE__ */ React19.createElement(Checkbox9, { checked: value, disabled: true })
20890
+ }
20891
+ ),
20892
+ /* @__PURE__ */ React19.createElement(
20893
+ Table8.Column,
20894
+ {
20895
+ dataIndex: "HttpMethod",
20896
+ title: t("triggerRules.fields.httpMethod"),
20897
+ render: (value) => /* @__PURE__ */ React19.createElement(Tag2, { color: getHttpMethodColor(value) }, value)
20898
+ }
20899
+ ),
20900
+ /* @__PURE__ */ React19.createElement(
20901
+ Table8.Column,
20902
+ {
20903
+ dataIndex: "WebhookUrl",
20904
+ title: t("triggerRules.fields.webhookUrl"),
20905
+ render: (value) => /* @__PURE__ */ React19.createElement("span", { style: { fontFamily: "monospace", fontSize: "0.85em" } }, value?.length > 50 ? `${value.substring(0, 50)}...` : value),
20906
+ defaultVisible: true
20907
+ }
20908
+ ),
20909
+ /* @__PURE__ */ React19.createElement(
20910
+ Table8.Column,
20911
+ {
20912
+ title: t("buttons.list"),
20913
+ dataIndex: "actions",
20914
+ render: (_, record) => /* @__PURE__ */ React19.createElement(Space9, null, /* @__PURE__ */ React19.createElement(EditButton3, { hideText: true, size: "small", recordItemId: record.Oid }), /* @__PURE__ */ React19.createElement(DeleteButton3, { hideText: true, size: "small", recordItemId: record.Oid }))
20915
+ }
20916
+ )
20917
+ );
20918
+ };
20919
+
20920
+ // src/pages/trigger-rules/create.tsx
20921
+ import React20 from "react";
20922
+ import { useTranslate as useTranslate11 } from "@refinedev/core";
20923
+ import { Create as Create3, useForm as useForm5 } from "@refinedev/antd";
20924
+ import { Form as Form11, Input as Input10, Select as Select5, Switch, Spin as Spin3 } from "antd";
20925
+ var TriggerRuleCreate = () => {
20926
+ const t = useTranslate11();
20927
+ const { formProps, saveButtonProps } = useForm5();
20928
+ const { data: modelTypes, isLoading: isLoadingTypes } = useModelTypes();
20929
+ return /* @__PURE__ */ React20.createElement(Create3, { saveButtonProps }, /* @__PURE__ */ React20.createElement(Form11, { ...formProps, layout: "vertical" }, /* @__PURE__ */ React20.createElement(
20930
+ Form11.Item,
20931
+ {
20932
+ label: t("triggerRules.fields.name"),
20933
+ name: "Name",
20934
+ rules: [{ required: true, message: t("triggerRules.validation.nameRequired") }]
20935
+ },
20936
+ /* @__PURE__ */ React20.createElement(Input10, { placeholder: t("triggerRules.placeholders.name") })
20937
+ ), /* @__PURE__ */ React20.createElement(
20938
+ Form11.Item,
20939
+ {
20940
+ label: t("triggerRules.fields.description"),
20941
+ name: "Description"
20942
+ },
20943
+ /* @__PURE__ */ React20.createElement(
20944
+ Input10.TextArea,
20945
+ {
20946
+ rows: 2,
20947
+ placeholder: t("triggerRules.placeholders.description")
20948
+ }
20949
+ )
20950
+ ), /* @__PURE__ */ React20.createElement(
20951
+ Form11.Item,
20952
+ {
20953
+ label: t("triggerRules.fields.targetTypeName"),
20954
+ name: "TargetTypeName",
20955
+ tooltip: t("triggerRules.tooltips.targetTypeName")
20956
+ },
20957
+ /* @__PURE__ */ React20.createElement(
20958
+ Select5,
20959
+ {
20960
+ showSearch: true,
20961
+ placeholder: t("triggerRules.tooltips.targetTypeName"),
20962
+ loading: isLoadingTypes,
20963
+ notFoundContent: isLoadingTypes ? /* @__PURE__ */ React20.createElement(Spin3, { size: "small" }) : null,
20964
+ filterOption: (input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase()),
20965
+ options: modelTypes?.filter((type) => !["TriggerRule", "TriggerLog"].includes(type.Name)).map((type) => ({
20966
+ label: type.Caption || type.Name,
20967
+ value: type.Name
20968
+ }))
20969
+ }
20970
+ )
20971
+ ), /* @__PURE__ */ React20.createElement(
20972
+ Form11.Item,
20973
+ {
20974
+ label: t("triggerRules.fields.onCreated"),
20975
+ name: "OnCreated",
20976
+ valuePropName: "checked"
20977
+ },
20978
+ /* @__PURE__ */ React20.createElement(Switch, null)
20979
+ ), /* @__PURE__ */ React20.createElement(
20980
+ Form11.Item,
20981
+ {
20982
+ label: t("triggerRules.fields.onModified"),
20983
+ name: "OnModified",
20984
+ valuePropName: "checked"
20985
+ },
20986
+ /* @__PURE__ */ React20.createElement(Switch, null)
20987
+ ), /* @__PURE__ */ React20.createElement(
20988
+ Form11.Item,
20989
+ {
20990
+ label: t("triggerRules.fields.onRemoved"),
20991
+ name: "OnRemoved",
20992
+ valuePropName: "checked"
20993
+ },
20994
+ /* @__PURE__ */ React20.createElement(Switch, null)
20995
+ ), /* @__PURE__ */ React20.createElement(
20996
+ Form11.Item,
20997
+ {
20998
+ label: t("triggerRules.fields.httpMethod"),
20999
+ name: "HttpMethod",
21000
+ initialValue: "Post" /* Post */,
21001
+ rules: [{ required: true }]
21002
+ },
21003
+ /* @__PURE__ */ React20.createElement(Select5, null, /* @__PURE__ */ React20.createElement(Select5.Option, { value: "Post" /* Post */ }, "POST"), /* @__PURE__ */ React20.createElement(Select5.Option, { value: "Get" /* Get */ }, "GET"), /* @__PURE__ */ React20.createElement(Select5.Option, { value: "Put" /* Put */ }, "PUT"), /* @__PURE__ */ React20.createElement(Select5.Option, { value: "Patch" /* Patch */ }, "PATCH"), /* @__PURE__ */ React20.createElement(Select5.Option, { value: "Delete" /* Delete */ }, "DELETE"))
21004
+ ), /* @__PURE__ */ React20.createElement(
21005
+ Form11.Item,
21006
+ {
21007
+ label: t("triggerRules.fields.webhookUrl"),
21008
+ name: "WebhookUrl",
21009
+ rules: [
21010
+ { required: true, message: t("triggerRules.validation.webhookUrlRequired") },
21011
+ { type: "url", message: t("triggerRules.validation.webhookUrlInvalid") }
21012
+ ]
21013
+ },
21014
+ /* @__PURE__ */ React20.createElement(Input10, { placeholder: t("triggerRules.placeholders.webhookUrl") })
21015
+ ), /* @__PURE__ */ React20.createElement(
21016
+ Form11.Item,
21017
+ {
21018
+ label: t("triggerRules.fields.customHeaders"),
21019
+ name: "CustomHeaders",
21020
+ tooltip: t("triggerRules.tooltips.customHeaders")
21021
+ },
21022
+ /* @__PURE__ */ React20.createElement(
21023
+ Input10.TextArea,
21024
+ {
21025
+ rows: 3,
21026
+ placeholder: t("triggerRules.placeholders.customHeaders")
21027
+ }
21028
+ )
21029
+ ), /* @__PURE__ */ React20.createElement(
21030
+ Form11.Item,
21031
+ {
21032
+ label: t("triggerRules.fields.isActive"),
21033
+ name: "IsActive",
21034
+ valuePropName: "checked",
21035
+ initialValue: true
21036
+ },
21037
+ /* @__PURE__ */ React20.createElement(Switch, null)
21038
+ ), /* @__PURE__ */ React20.createElement(
21039
+ Form11.Item,
21040
+ {
21041
+ label: t("triggerRules.fields.onlyObjectFitsCriteria"),
21042
+ name: "OnlyObjectFitsCriteria",
21043
+ valuePropName: "checked"
21044
+ },
21045
+ /* @__PURE__ */ React20.createElement(Switch, null)
21046
+ ), /* @__PURE__ */ React20.createElement(
21047
+ Form11.Item,
21048
+ {
21049
+ label: t("triggerRules.fields.criteria"),
21050
+ name: "Criteria",
21051
+ tooltip: t("triggerRules.tooltips.criteria")
21052
+ },
21053
+ /* @__PURE__ */ React20.createElement(
21054
+ Input10.TextArea,
21055
+ {
21056
+ rows: 2,
21057
+ placeholder: t("triggerRules.placeholders.criteria")
21058
+ }
21059
+ )
21060
+ )));
21061
+ };
21062
+
21063
+ // src/pages/trigger-rules/edit.tsx
21064
+ import React21 from "react";
21065
+ import { useTranslate as useTranslate12 } from "@refinedev/core";
21066
+ import { Edit as Edit3, useForm as useForm6 } from "@refinedev/antd";
21067
+ import { Form as Form12, Input as Input11, Select as Select6, Switch as Switch2, Spin as Spin4 } from "antd";
21068
+ var TriggerRuleEdit = () => {
21069
+ const t = useTranslate12();
21070
+ const { formProps, saveButtonProps } = useForm6();
21071
+ const { data: modelTypes, isLoading: isLoadingTypes } = useModelTypes();
21072
+ return /* @__PURE__ */ React21.createElement(Edit3, { saveButtonProps }, /* @__PURE__ */ React21.createElement(Form12, { ...formProps, layout: "vertical" }, /* @__PURE__ */ React21.createElement(
21073
+ Form12.Item,
21074
+ {
21075
+ label: t("triggerRules.fields.name"),
21076
+ name: "Name",
21077
+ rules: [{ required: true, message: t("triggerRules.validation.nameRequired") }]
21078
+ },
21079
+ /* @__PURE__ */ React21.createElement(Input11, { placeholder: t("triggerRules.placeholders.name") })
21080
+ ), /* @__PURE__ */ React21.createElement(
21081
+ Form12.Item,
21082
+ {
21083
+ label: t("triggerRules.fields.description"),
21084
+ name: "Description"
21085
+ },
21086
+ /* @__PURE__ */ React21.createElement(
21087
+ Input11.TextArea,
21088
+ {
21089
+ rows: 2,
21090
+ placeholder: t("triggerRules.placeholders.description")
21091
+ }
21092
+ )
21093
+ ), /* @__PURE__ */ React21.createElement(
21094
+ Form12.Item,
21095
+ {
21096
+ label: t("triggerRules.fields.targetTypeName"),
21097
+ name: "TargetTypeName",
21098
+ tooltip: t("triggerRules.tooltips.targetTypeName")
21099
+ },
21100
+ /* @__PURE__ */ React21.createElement(
21101
+ Select6,
21102
+ {
21103
+ showSearch: true,
21104
+ placeholder: t("triggerRules.tooltips.targetTypeName"),
21105
+ loading: isLoadingTypes,
21106
+ notFoundContent: isLoadingTypes ? /* @__PURE__ */ React21.createElement(Spin4, { size: "small" }) : null,
21107
+ filterOption: (input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase()),
21108
+ options: modelTypes?.filter((type) => !["TriggerRule", "TriggerLog"].includes(type.Name)).map((type) => ({
21109
+ label: type.Caption || type.Name,
21110
+ value: type.Name
21111
+ }))
21112
+ }
21113
+ )
21114
+ ), /* @__PURE__ */ React21.createElement(
21115
+ Form12.Item,
21116
+ {
21117
+ label: t("triggerRules.fields.onCreated"),
21118
+ name: "OnCreated",
21119
+ valuePropName: "checked"
21120
+ },
21121
+ /* @__PURE__ */ React21.createElement(Switch2, null)
21122
+ ), /* @__PURE__ */ React21.createElement(
21123
+ Form12.Item,
21124
+ {
21125
+ label: t("triggerRules.fields.onModified"),
21126
+ name: "OnModified",
21127
+ valuePropName: "checked"
21128
+ },
21129
+ /* @__PURE__ */ React21.createElement(Switch2, null)
21130
+ ), /* @__PURE__ */ React21.createElement(
21131
+ Form12.Item,
21132
+ {
21133
+ label: t("triggerRules.fields.onRemoved"),
21134
+ name: "OnRemoved",
21135
+ valuePropName: "checked"
21136
+ },
21137
+ /* @__PURE__ */ React21.createElement(Switch2, null)
21138
+ ), /* @__PURE__ */ React21.createElement(
21139
+ Form12.Item,
21140
+ {
21141
+ label: t("triggerRules.fields.httpMethod"),
21142
+ name: "HttpMethod",
21143
+ rules: [{ required: true }]
21144
+ },
21145
+ /* @__PURE__ */ React21.createElement(Select6, null, /* @__PURE__ */ React21.createElement(Select6.Option, { value: "Post" /* Post */ }, "POST"), /* @__PURE__ */ React21.createElement(Select6.Option, { value: "Get" /* Get */ }, "GET"), /* @__PURE__ */ React21.createElement(Select6.Option, { value: "Put" /* Put */ }, "PUT"), /* @__PURE__ */ React21.createElement(Select6.Option, { value: "Patch" /* Patch */ }, "PATCH"), /* @__PURE__ */ React21.createElement(Select6.Option, { value: "Delete" /* Delete */ }, "DELETE"))
21146
+ ), /* @__PURE__ */ React21.createElement(
21147
+ Form12.Item,
21148
+ {
21149
+ label: t("triggerRules.fields.webhookUrl"),
21150
+ name: "WebhookUrl",
21151
+ rules: [
21152
+ { required: true, message: t("triggerRules.validation.webhookUrlRequired") },
21153
+ { type: "url", message: t("triggerRules.validation.webhookUrlInvalid") }
21154
+ ]
21155
+ },
21156
+ /* @__PURE__ */ React21.createElement(Input11, { placeholder: t("triggerRules.placeholders.webhookUrl") })
21157
+ ), /* @__PURE__ */ React21.createElement(
21158
+ Form12.Item,
21159
+ {
21160
+ label: t("triggerRules.fields.customHeaders"),
21161
+ name: "CustomHeaders",
21162
+ tooltip: t("triggerRules.tooltips.customHeaders")
21163
+ },
21164
+ /* @__PURE__ */ React21.createElement(
21165
+ Input11.TextArea,
21166
+ {
21167
+ rows: 3,
21168
+ placeholder: t("triggerRules.placeholders.customHeaders")
21169
+ }
21170
+ )
21171
+ ), /* @__PURE__ */ React21.createElement(
21172
+ Form12.Item,
21173
+ {
21174
+ label: t("triggerRules.fields.isActive"),
21175
+ name: "IsActive",
21176
+ valuePropName: "checked"
21177
+ },
21178
+ /* @__PURE__ */ React21.createElement(Switch2, null)
21179
+ ), /* @__PURE__ */ React21.createElement(
21180
+ Form12.Item,
21181
+ {
21182
+ label: t("triggerRules.fields.onlyObjectFitsCriteria"),
21183
+ name: "OnlyObjectFitsCriteria",
21184
+ valuePropName: "checked"
21185
+ },
21186
+ /* @__PURE__ */ React21.createElement(Switch2, null)
21187
+ ), /* @__PURE__ */ React21.createElement(
21188
+ Form12.Item,
21189
+ {
21190
+ label: t("triggerRules.fields.criteria"),
21191
+ name: "Criteria",
21192
+ tooltip: t("triggerRules.tooltips.criteria")
21193
+ },
21194
+ /* @__PURE__ */ React21.createElement(
21195
+ Input11.TextArea,
21196
+ {
21197
+ rows: 2,
21198
+ placeholder: t("triggerRules.placeholders.criteria")
21199
+ }
21200
+ )
21201
+ )));
21202
+ };
21203
+
21204
+ // src/pages/trigger-logs/list.tsx
21205
+ import React22, { useState as useState8 } from "react";
21206
+ import { useTranslate as useTranslate13 } from "@refinedev/core";
21207
+ import { ShowButton } from "@refinedev/antd";
21208
+ import { Table as Table9, Tag as Tag3, Tooltip as Tooltip3, Typography as Typography4, Drawer as Drawer2, Descriptions as Descriptions2, Space as Space12, theme as theme8 } from "antd";
21209
+ import { CheckCircleOutlined as CheckCircleOutlined2, CloseCircleOutlined as CloseCircleOutlined2 } from "@ant-design/icons";
21210
+ var { Text: Text2 } = Typography4;
21211
+ var { useToken: useToken2 } = theme8;
21212
+ var formatJson = (jsonString) => {
21213
+ try {
21214
+ const parsed = JSON.parse(jsonString);
21215
+ return JSON.stringify(parsed, null, 2);
21216
+ } catch {
21217
+ return jsonString;
21218
+ }
21219
+ };
21220
+ var TriggerLogList = () => {
21221
+ const t = useTranslate13();
21222
+ const { token } = useToken2();
21223
+ const [drawerVisible, setDrawerVisible] = useState8(false);
21224
+ const [selectedLog, setSelectedLog] = useState8(null);
21225
+ const getHttpMethodColor = (method) => {
21226
+ switch (method) {
21227
+ case "Post" /* Post */:
21228
+ return "green";
21229
+ case "Get" /* Get */:
21230
+ return "blue";
21231
+ case "Put" /* Put */:
21232
+ return "orange";
21233
+ case "Patch" /* Patch */:
21234
+ return "purple";
21235
+ case "Delete" /* Delete */:
21236
+ return "red";
21237
+ default:
21238
+ return "default";
21239
+ }
21240
+ };
21241
+ const getEventTypeColor = (event) => {
21242
+ switch (event) {
21243
+ case "Create" /* Create */:
21244
+ return "green";
21245
+ case "Update" /* Update */:
21246
+ return "blue";
21247
+ case "Delete" /* Delete */:
21248
+ return "red";
21249
+ default:
21250
+ return "default";
21251
+ }
21252
+ };
21253
+ const handleShowDetail = (record) => {
21254
+ setSelectedLog(record);
21255
+ setDrawerVisible(true);
21256
+ };
21257
+ return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(
21258
+ SmartList,
21259
+ {
21260
+ searchFields: ["ObjectType", "ObjectKey", "ErrorMessage"],
21261
+ meta: {
21262
+ expand: ["TriggerRule"]
21263
+ }
21264
+ },
21265
+ /* @__PURE__ */ React22.createElement(
21266
+ Table9.Column,
21267
+ {
21268
+ dataIndex: ["TriggerRule", "Name"],
21269
+ title: t("triggerRules.fields.name"),
21270
+ render: (value) => value ? /* @__PURE__ */ React22.createElement(Text2, { strong: true }, value) : /* @__PURE__ */ React22.createElement(Text2, { type: "secondary" }, "-"),
21271
+ defaultVisible: true
21272
+ }
21273
+ ),
21274
+ /* @__PURE__ */ React22.createElement(
21275
+ Table9.Column,
21276
+ {
21277
+ dataIndex: "ExecutionTime",
21278
+ title: t("triggerLogs.fields.executionTime"),
21279
+ sorter: true,
21280
+ defaultSortOrder: "descend",
21281
+ render: (value) => new Date(value).toLocaleString(),
21282
+ defaultVisible: true
21283
+ }
21284
+ ),
21285
+ /* @__PURE__ */ React22.createElement(
21286
+ Table9.Column,
21287
+ {
21288
+ dataIndex: "IsSuccess",
21289
+ title: t("triggerLogs.fields.status"),
21290
+ render: (value) => value ? /* @__PURE__ */ React22.createElement(Tag3, { icon: /* @__PURE__ */ React22.createElement(CheckCircleOutlined2, null), color: "success" }, t("triggerLogs.status.success")) : /* @__PURE__ */ React22.createElement(Tag3, { icon: /* @__PURE__ */ React22.createElement(CloseCircleOutlined2, null), color: "error" }, t("triggerLogs.status.failed")),
21291
+ sorter: true,
21292
+ defaultVisible: true
21293
+ }
21294
+ ),
21295
+ /* @__PURE__ */ React22.createElement(
21296
+ Table9.Column,
21297
+ {
21298
+ dataIndex: "EventType",
21299
+ title: t("triggerLogs.fields.eventType"),
21300
+ render: (value) => /* @__PURE__ */ React22.createElement(Tag3, { color: getEventTypeColor(value) }, value)
21301
+ }
21302
+ ),
21303
+ /* @__PURE__ */ React22.createElement(
21304
+ Table9.Column,
21305
+ {
21306
+ dataIndex: "ObjectType",
21307
+ title: t("triggerLogs.fields.objectType"),
21308
+ render: (value) => /* @__PURE__ */ React22.createElement("span", { style: { fontFamily: "monospace", fontSize: "0.85em" } }, value?.split(".").pop() || value)
21309
+ }
21310
+ ),
21311
+ /* @__PURE__ */ React22.createElement(
21312
+ Table9.Column,
21313
+ {
21314
+ dataIndex: "ObjectKey",
21315
+ title: t("triggerLogs.fields.objectKey"),
21316
+ render: (value) => /* @__PURE__ */ React22.createElement(Text2, { code: true }, value)
21317
+ }
21318
+ ),
21319
+ /* @__PURE__ */ React22.createElement(
21320
+ Table9.Column,
21321
+ {
21322
+ dataIndex: "HttpMethod",
21323
+ title: t("triggerLogs.fields.httpMethod"),
21324
+ render: (value) => /* @__PURE__ */ React22.createElement(Tag3, { color: getHttpMethodColor(value) }, value)
21325
+ }
21326
+ ),
21327
+ /* @__PURE__ */ React22.createElement(
21328
+ Table9.Column,
21329
+ {
21330
+ dataIndex: "StatusCode",
21331
+ title: t("triggerLogs.fields.statusCode"),
21332
+ render: (value) => value ? /* @__PURE__ */ React22.createElement(Tag3, { color: value >= 200 && value < 300 ? "success" : "error" }, value) : "-"
21333
+ }
21334
+ ),
21335
+ /* @__PURE__ */ React22.createElement(
21336
+ Table9.Column,
21337
+ {
21338
+ dataIndex: "ErrorMessage",
21339
+ title: t("triggerLogs.fields.error"),
21340
+ render: (value) => value ? /* @__PURE__ */ React22.createElement(Tooltip3, { title: value }, /* @__PURE__ */ React22.createElement(Text2, { type: "danger", ellipsis: true, style: { maxWidth: 200, display: "block" } }, value)) : "-"
21341
+ }
21342
+ ),
21343
+ /* @__PURE__ */ React22.createElement(
21344
+ Table9.Column,
21345
+ {
21346
+ title: t("buttons.list"),
21347
+ dataIndex: "actions",
21348
+ render: (_, record) => /* @__PURE__ */ React22.createElement(Space12, null, /* @__PURE__ */ React22.createElement(
21349
+ ShowButton,
21350
+ {
21351
+ hideText: true,
21352
+ size: "small",
21353
+ recordItemId: record.Oid,
21354
+ onClick: (e) => {
21355
+ e.preventDefault();
21356
+ handleShowDetail(record);
21357
+ }
21358
+ }
21359
+ ))
21360
+ }
21361
+ )
21362
+ ), /* @__PURE__ */ React22.createElement(
21363
+ Drawer2,
21364
+ {
21365
+ title: t("triggerLogs.drawer.title"),
21366
+ placement: "right",
21367
+ width: 720,
21368
+ onClose: () => setDrawerVisible(false),
21369
+ open: drawerVisible
21370
+ },
21371
+ selectedLog && /* @__PURE__ */ React22.createElement(Descriptions2, { bordered: true, column: 1, size: "small" }, /* @__PURE__ */ React22.createElement(Descriptions2.Item, { label: t("triggerRules.fields.name") }, /* @__PURE__ */ React22.createElement(Text2, { strong: true }, selectedLog.TriggerRule?.Name || "-")), /* @__PURE__ */ React22.createElement(Descriptions2.Item, { label: t("triggerLogs.fields.executionTime") }, new Date(selectedLog.ExecutionTime).toLocaleString()), /* @__PURE__ */ React22.createElement(Descriptions2.Item, { label: t("triggerLogs.fields.status") }, selectedLog.IsSuccess ? /* @__PURE__ */ React22.createElement(Tag3, { icon: /* @__PURE__ */ React22.createElement(CheckCircleOutlined2, null), color: "success" }, t("triggerLogs.status.success")) : /* @__PURE__ */ React22.createElement(Tag3, { icon: /* @__PURE__ */ React22.createElement(CloseCircleOutlined2, null), color: "error" }, t("triggerLogs.status.failed"))), /* @__PURE__ */ React22.createElement(Descriptions2.Item, { label: t("triggerLogs.fields.eventType") }, /* @__PURE__ */ React22.createElement(Tag3, { color: getEventTypeColor(selectedLog.EventType) }, selectedLog.EventType)), /* @__PURE__ */ React22.createElement(Descriptions2.Item, { label: t("triggerLogs.fields.objectType") }, /* @__PURE__ */ React22.createElement(Text2, { code: true }, selectedLog.ObjectType)), /* @__PURE__ */ React22.createElement(Descriptions2.Item, { label: t("triggerLogs.fields.objectKey") }, /* @__PURE__ */ React22.createElement(Text2, { code: true }, selectedLog.ObjectKey)), /* @__PURE__ */ React22.createElement(Descriptions2.Item, { label: t("triggerLogs.fields.httpMethod") }, /* @__PURE__ */ React22.createElement(Tag3, { color: getHttpMethodColor(selectedLog.HttpMethod) }, selectedLog.HttpMethod)), /* @__PURE__ */ React22.createElement(Descriptions2.Item, { label: t("triggerLogs.fields.statusCode") }, selectedLog.StatusCode ? /* @__PURE__ */ React22.createElement(Tag3, { color: selectedLog.StatusCode >= 200 && selectedLog.StatusCode < 300 ? "success" : "error" }, selectedLog.StatusCode) : "-"), selectedLog.ErrorMessage && /* @__PURE__ */ React22.createElement(Descriptions2.Item, { label: t("triggerLogs.fields.error") }, /* @__PURE__ */ React22.createElement(Text2, { type: "danger" }, selectedLog.ErrorMessage)), selectedLog.ResponseBody && /* @__PURE__ */ React22.createElement(Descriptions2.Item, { label: t("triggerLogs.fields.responseBody") }, /* @__PURE__ */ React22.createElement("pre", { style: {
21372
+ maxHeight: 300,
21373
+ overflow: "auto",
21374
+ backgroundColor: token.colorBgLayout,
21375
+ color: token.colorText,
21376
+ padding: 12,
21377
+ borderRadius: token.borderRadius,
21378
+ border: `1px solid ${token.colorBorder}`,
21379
+ fontSize: "0.85em",
21380
+ whiteSpace: "pre-wrap",
21381
+ wordBreak: "break-word"
21382
+ } }, formatJson(selectedLog.ResponseBody))), selectedLog.Payload && /* @__PURE__ */ React22.createElement(Descriptions2.Item, { label: t("triggerLogs.fields.payload") }, /* @__PURE__ */ React22.createElement("pre", { style: {
21383
+ maxHeight: 400,
21384
+ overflow: "auto",
21385
+ backgroundColor: token.colorBgLayout,
21386
+ color: token.colorText,
21387
+ padding: 12,
21388
+ borderRadius: token.borderRadius,
21389
+ border: `1px solid ${token.colorBorder}`,
21390
+ fontSize: "0.85em",
21391
+ whiteSpace: "pre-wrap",
21392
+ wordBreak: "break-word"
21393
+ } }, formatJson(selectedLog.Payload))))
21394
+ ));
21395
+ };
21396
+
21397
+ // src/pages/mirror-configs/list.tsx
21398
+ import React23 from "react";
21399
+ import { useTranslate as useTranslate14 } from "@refinedev/core";
21400
+ import { EditButton as EditButton4, DeleteButton as DeleteButton4 } from "@refinedev/antd";
21401
+ import { Table as Table10, Space as Space13, Tag as Tag4 } from "antd";
21402
+ var MirrorTypeMappingConfigList = () => {
21403
+ const t = useTranslate14();
21404
+ return /* @__PURE__ */ React23.createElement(
21405
+ SmartList,
21406
+ {
21407
+ searchFields: ["SourceTypeName", "LocalTypeName", "Description"]
21408
+ },
21409
+ /* @__PURE__ */ React23.createElement(
21410
+ Table10.Column,
21411
+ {
21412
+ dataIndex: "SourceTypeName",
21413
+ title: t("mirrorConfigs.fields.sourceTypeName"),
21414
+ sorter: true,
21415
+ render: (value) => /* @__PURE__ */ React23.createElement("span", { style: { fontFamily: "monospace", fontSize: "0.9em" } }, value),
21416
+ defaultVisible: true
21417
+ }
21418
+ ),
21419
+ /* @__PURE__ */ React23.createElement(
21420
+ Table10.Column,
21421
+ {
21422
+ dataIndex: "LocalTypeName",
21423
+ title: t("mirrorConfigs.fields.localTypeName"),
21424
+ sorter: true,
21425
+ render: (value) => value ? /* @__PURE__ */ React23.createElement("span", { style: { fontFamily: "monospace", fontSize: "0.9em" } }, value) : "-",
21426
+ defaultVisible: true
21427
+ }
21428
+ ),
21429
+ /* @__PURE__ */ React23.createElement(
21430
+ Table10.Column,
21431
+ {
21432
+ dataIndex: "IsActive",
21433
+ title: t("mirrorConfigs.fields.status"),
21434
+ render: (value) => value ? /* @__PURE__ */ React23.createElement(Tag4, { color: "success" }, t("mirrorConfigs.statusLabels.active")) : /* @__PURE__ */ React23.createElement(Tag4, { color: "default" }, t("mirrorConfigs.statusLabels.inactive")),
21435
+ sorter: true,
21436
+ defaultVisible: true
21437
+ }
21438
+ ),
21439
+ /* @__PURE__ */ React23.createElement(
21440
+ Table10.Column,
21441
+ {
21442
+ dataIndex: "Description",
21443
+ title: t("mirrorConfigs.fields.description"),
21444
+ render: (value) => value || "-"
21445
+ }
21446
+ ),
21447
+ /* @__PURE__ */ React23.createElement(
21448
+ Table10.Column,
21449
+ {
21450
+ title: t("buttons.list"),
21451
+ dataIndex: "actions",
21452
+ render: (_, record) => /* @__PURE__ */ React23.createElement(Space13, null, /* @__PURE__ */ React23.createElement(EditButton4, { hideText: true, size: "small", recordItemId: record.Oid }), /* @__PURE__ */ React23.createElement(DeleteButton4, { hideText: true, size: "small", recordItemId: record.Oid }))
21453
+ }
21454
+ )
21455
+ );
21456
+ };
21457
+
21458
+ // src/pages/mirror-configs/create.tsx
21459
+ import React24 from "react";
21460
+ import { useTranslate as useTranslate15 } from "@refinedev/core";
21461
+ import { Create as Create4, useForm as useForm7 } from "@refinedev/antd";
21462
+ import { Form as Form13, Input as Input12, Switch as Switch3, Select as Select7, Spin as Spin5 } from "antd";
21463
+ var MirrorTypeMappingConfigCreate = () => {
21464
+ const t = useTranslate15();
21465
+ const { formProps, saveButtonProps } = useForm7();
21466
+ const { data: modelTypes, isLoading: isLoadingTypes } = useModelTypes();
21467
+ return /* @__PURE__ */ React24.createElement(Create4, { saveButtonProps }, /* @__PURE__ */ React24.createElement(Form13, { ...formProps, layout: "vertical" }, /* @__PURE__ */ React24.createElement(
21468
+ Form13.Item,
21469
+ {
21470
+ label: t("mirrorConfigs.fields.sourceTypeName"),
21471
+ name: "SourceTypeName",
21472
+ rules: [
21473
+ { required: true, message: t("mirrorConfigs.validation.sourceTypeNameRequired") }
21474
+ ],
21475
+ tooltip: t("mirrorConfigs.tooltips.sourceTypeName")
21476
+ },
21477
+ /* @__PURE__ */ React24.createElement(Input12, { placeholder: t("mirrorConfigs.placeholders.sourceTypeName") })
21478
+ ), /* @__PURE__ */ React24.createElement(
21479
+ Form13.Item,
21480
+ {
21481
+ label: t("mirrorConfigs.fields.localTypeName"),
21482
+ name: "LocalTypeName",
21483
+ rules: [
21484
+ { required: true, message: t("mirrorConfigs.validation.localTypeNameRequired") }
21485
+ ],
21486
+ tooltip: t("mirrorConfigs.tooltips.localTypeName")
21487
+ },
21488
+ /* @__PURE__ */ React24.createElement(
21489
+ Select7,
21490
+ {
21491
+ showSearch: true,
21492
+ placeholder: t("mirrorConfigs.tooltips.localTypeName"),
21493
+ loading: isLoadingTypes,
21494
+ notFoundContent: isLoadingTypes ? /* @__PURE__ */ React24.createElement(Spin5, { size: "small" }) : null,
21495
+ filterOption: (input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase()),
21496
+ options: modelTypes?.map((type) => ({
21497
+ label: type.Caption || type.Name,
21498
+ value: type.Name
21499
+ }))
21500
+ }
21501
+ )
21502
+ ), /* @__PURE__ */ React24.createElement(
21503
+ Form13.Item,
21504
+ {
21505
+ label: t("mirrorConfigs.fields.description"),
21506
+ name: "Description"
21507
+ },
21508
+ /* @__PURE__ */ React24.createElement(
21509
+ Input12.TextArea,
21510
+ {
21511
+ rows: 2,
21512
+ placeholder: t("mirrorConfigs.placeholders.description")
21513
+ }
21514
+ )
21515
+ ), /* @__PURE__ */ React24.createElement(
21516
+ Form13.Item,
21517
+ {
21518
+ label: t("mirrorConfigs.fields.isActive"),
21519
+ name: "IsActive",
21520
+ valuePropName: "checked",
21521
+ initialValue: true
21522
+ },
21523
+ /* @__PURE__ */ React24.createElement(Switch3, null)
21524
+ )));
21525
+ };
21526
+
21527
+ // src/pages/mirror-configs/edit.tsx
21528
+ import React25 from "react";
21529
+ import { useTranslate as useTranslate16 } from "@refinedev/core";
21530
+ import { Edit as Edit4, useForm as useForm8 } from "@refinedev/antd";
21531
+ import { Form as Form14, Input as Input13, Switch as Switch4, Select as Select8, Spin as Spin6 } from "antd";
21532
+ var MirrorTypeMappingConfigEdit = () => {
21533
+ const t = useTranslate16();
21534
+ const { formProps, saveButtonProps } = useForm8();
21535
+ const { data: modelTypes, isLoading: isLoadingTypes } = useModelTypes();
21536
+ return /* @__PURE__ */ React25.createElement(Edit4, { saveButtonProps }, /* @__PURE__ */ React25.createElement(Form14, { ...formProps, layout: "vertical" }, /* @__PURE__ */ React25.createElement(
21537
+ Form14.Item,
21538
+ {
21539
+ label: t("mirrorConfigs.fields.sourceTypeName"),
21540
+ name: "SourceTypeName",
21541
+ rules: [
21542
+ { required: true, message: t("mirrorConfigs.validation.sourceTypeNameRequired") }
21543
+ ],
21544
+ tooltip: t("mirrorConfigs.tooltips.sourceTypeName")
21545
+ },
21546
+ /* @__PURE__ */ React25.createElement(Input13, { placeholder: t("mirrorConfigs.placeholders.sourceTypeName") })
21547
+ ), /* @__PURE__ */ React25.createElement(
21548
+ Form14.Item,
21549
+ {
21550
+ label: t("mirrorConfigs.fields.localTypeName"),
21551
+ name: "LocalTypeName",
21552
+ rules: [
21553
+ { required: true, message: t("mirrorConfigs.validation.localTypeNameRequired") }
21554
+ ],
21555
+ tooltip: t("mirrorConfigs.tooltips.localTypeName")
21556
+ },
21557
+ /* @__PURE__ */ React25.createElement(
21558
+ Select8,
21559
+ {
21560
+ showSearch: true,
21561
+ placeholder: t("mirrorConfigs.tooltips.localTypeName"),
21562
+ loading: isLoadingTypes,
21563
+ notFoundContent: isLoadingTypes ? /* @__PURE__ */ React25.createElement(Spin6, { size: "small" }) : null,
21564
+ filterOption: (input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase()),
21565
+ options: modelTypes?.map((type) => ({
21566
+ label: type.Caption || type.Name,
21567
+ value: type.Name
21568
+ }))
21569
+ }
21570
+ )
21571
+ ), /* @__PURE__ */ React25.createElement(
21572
+ Form14.Item,
21573
+ {
21574
+ label: t("mirrorConfigs.fields.description"),
21575
+ name: "Description"
21576
+ },
21577
+ /* @__PURE__ */ React25.createElement(
21578
+ Input13.TextArea,
21579
+ {
21580
+ rows: 2,
21581
+ placeholder: t("mirrorConfigs.placeholders.description")
21582
+ }
21583
+ )
21584
+ ), /* @__PURE__ */ React25.createElement(
21585
+ Form14.Item,
21586
+ {
21587
+ label: t("mirrorConfigs.fields.isActive"),
21588
+ name: "IsActive",
21589
+ valuePropName: "checked"
21590
+ },
21591
+ /* @__PURE__ */ React25.createElement(Switch4, null)
21592
+ )));
21593
+ };
20543
21594
  export {
20544
21595
  ApplicationUserCreate,
20545
21596
  ApplicationUserEdit,
@@ -20552,8 +21603,12 @@ export {
20552
21603
  DrawioEditor,
20553
21604
  Header,
20554
21605
  HttpError,
21606
+ HttpMethodType,
20555
21607
  KeycloakLoginPage,
20556
21608
  LoginPage,
21609
+ MirrorTypeMappingConfigCreate,
21610
+ MirrorTypeMappingConfigEdit,
21611
+ MirrorTypeMappingConfigList,
20557
21612
  RelatedList,
20558
21613
  RoleCreate,
20559
21614
  RoleEdit,
@@ -20563,6 +21618,11 @@ export {
20563
21618
  SmartList,
20564
21619
  TOKEN_KEY,
20565
21620
  TiptapEditor,
21621
+ TriggerEventType,
21622
+ TriggerLogList,
21623
+ TriggerRuleCreate,
21624
+ TriggerRuleEdit,
21625
+ TriggerRuleList,
20566
21626
  authProvider,
20567
21627
  authService,
20568
21628
  dataProvider,