@cundi/refine-xaf 1.0.4 → 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/README.md +41 -1
- package/dist/index.d.mts +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +291 -182
- package/dist/index.mjs +229 -121
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -795,6 +795,9 @@ var en = {
|
|
|
795
795
|
math: "Math (LaTeX)",
|
|
796
796
|
youtube: "YouTube",
|
|
797
797
|
enterYoutubeUrl: "Enter YouTube URL"
|
|
798
|
+
},
|
|
799
|
+
drawioEditor: {
|
|
800
|
+
loading: "Loading diagram editor..."
|
|
798
801
|
}
|
|
799
802
|
},
|
|
800
803
|
common: {
|
|
@@ -810,6 +813,7 @@ var en = {
|
|
|
810
813
|
dashboard: "Dashboard",
|
|
811
814
|
dataTypeExamples: "Data Type Examples",
|
|
812
815
|
tiptapExamples: "Tiptap Examples",
|
|
816
|
+
drawioExamples: "Drawio Examples",
|
|
813
817
|
users: "Users",
|
|
814
818
|
roles: "Roles",
|
|
815
819
|
settings: "Settings"
|
|
@@ -890,6 +894,9 @@ var zhTW = {
|
|
|
890
894
|
math: "\u6578\u5B78\u516C\u5F0F (LaTeX)",
|
|
891
895
|
youtube: "YouTube \u5F71\u7247",
|
|
892
896
|
enterYoutubeUrl: "\u8F38\u5165 YouTube \u7DB2\u5740"
|
|
897
|
+
},
|
|
898
|
+
drawioEditor: {
|
|
899
|
+
loading: "\u8F09\u5165\u5716\u8868\u7DE8\u8F2F\u5668\u4E2D..."
|
|
893
900
|
}
|
|
894
901
|
},
|
|
895
902
|
common: {
|
|
@@ -905,6 +912,7 @@ var zhTW = {
|
|
|
905
912
|
dashboard: "\u5100\u8868\u677F",
|
|
906
913
|
dataTypeExamples: "\u8CC7\u6599\u985E\u578B\u7BC4\u4F8B",
|
|
907
914
|
tiptapExamples: "Tiptap \u7BC4\u4F8B",
|
|
915
|
+
drawioExamples: "Drawio \u7BC4\u4F8B",
|
|
908
916
|
users: "\u4F7F\u7528\u8005",
|
|
909
917
|
roles: "\u89D2\u8272",
|
|
910
918
|
settings: "\u8A2D\u5B9A"
|
|
@@ -19102,10 +19110,109 @@ var TiptapEditor = ({ value, onChange, disabled }) => {
|
|
|
19102
19110
|
);
|
|
19103
19111
|
};
|
|
19104
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
|
+
|
|
19105
19212
|
// src/pages/login/index.tsx
|
|
19106
|
-
import
|
|
19213
|
+
import React8 from "react";
|
|
19107
19214
|
import { useLogin, useTranslate } from "@refinedev/core";
|
|
19108
|
-
import { Button as Button5, Form as Form4, Input as Input4, Card, Typography as Typography2, Layout as Layout2, theme as
|
|
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";
|
|
19109
19216
|
import { ThemedTitle } from "@refinedev/antd";
|
|
19110
19217
|
import { useNavigate } from "react-router";
|
|
19111
19218
|
var { Title, Link } = Typography2;
|
|
@@ -19114,12 +19221,12 @@ var LoginPage = () => {
|
|
|
19114
19221
|
const { mutate: login, isPending } = useLogin();
|
|
19115
19222
|
const isLoading = isPending;
|
|
19116
19223
|
const translate = useTranslate();
|
|
19117
|
-
const { token } =
|
|
19224
|
+
const { token } = theme5.useToken();
|
|
19118
19225
|
const navigate = useNavigate();
|
|
19119
19226
|
const onFinish = async (values) => {
|
|
19120
19227
|
login(values);
|
|
19121
19228
|
};
|
|
19122
|
-
return /* @__PURE__ */
|
|
19229
|
+
return /* @__PURE__ */ React8.createElement(
|
|
19123
19230
|
Layout2,
|
|
19124
19231
|
{
|
|
19125
19232
|
style: {
|
|
@@ -19129,14 +19236,14 @@ var LoginPage = () => {
|
|
|
19129
19236
|
backgroundColor: token.colorBgContainer
|
|
19130
19237
|
}
|
|
19131
19238
|
},
|
|
19132
|
-
/* @__PURE__ */
|
|
19239
|
+
/* @__PURE__ */ React8.createElement("div", { style: { marginBottom: "24px" } }, /* @__PURE__ */ React8.createElement(
|
|
19133
19240
|
ThemedTitle,
|
|
19134
19241
|
{
|
|
19135
19242
|
collapsed: false,
|
|
19136
19243
|
wrapperStyles: { fontSize: "22px", justifyContent: "center" }
|
|
19137
19244
|
}
|
|
19138
19245
|
)),
|
|
19139
|
-
/* @__PURE__ */
|
|
19246
|
+
/* @__PURE__ */ React8.createElement(
|
|
19140
19247
|
Card,
|
|
19141
19248
|
{
|
|
19142
19249
|
style: {
|
|
@@ -19146,8 +19253,8 @@ var LoginPage = () => {
|
|
|
19146
19253
|
boxShadow: "0 4px 24px -4px rgba(0, 0, 0, 0.1)"
|
|
19147
19254
|
}
|
|
19148
19255
|
},
|
|
19149
|
-
/* @__PURE__ */
|
|
19150
|
-
/* @__PURE__ */
|
|
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(
|
|
19151
19258
|
Form4,
|
|
19152
19259
|
{
|
|
19153
19260
|
layout: "vertical",
|
|
@@ -19157,7 +19264,7 @@ var LoginPage = () => {
|
|
|
19157
19264
|
remember: false
|
|
19158
19265
|
}
|
|
19159
19266
|
},
|
|
19160
|
-
/* @__PURE__ */
|
|
19267
|
+
/* @__PURE__ */ React8.createElement(
|
|
19161
19268
|
Form4.Item,
|
|
19162
19269
|
{
|
|
19163
19270
|
label: translate("pages.login.fields.username", "Username"),
|
|
@@ -19172,9 +19279,9 @@ var LoginPage = () => {
|
|
|
19172
19279
|
}
|
|
19173
19280
|
]
|
|
19174
19281
|
},
|
|
19175
|
-
/* @__PURE__ */
|
|
19282
|
+
/* @__PURE__ */ React8.createElement(Input4, { size: "large", placeholder: "Username" })
|
|
19176
19283
|
),
|
|
19177
|
-
/* @__PURE__ */
|
|
19284
|
+
/* @__PURE__ */ React8.createElement(
|
|
19178
19285
|
Form4.Item,
|
|
19179
19286
|
{
|
|
19180
19287
|
label: translate("pages.login.fields.password", "Password"),
|
|
@@ -19189,9 +19296,9 @@ var LoginPage = () => {
|
|
|
19189
19296
|
}
|
|
19190
19297
|
]
|
|
19191
19298
|
},
|
|
19192
|
-
/* @__PURE__ */
|
|
19299
|
+
/* @__PURE__ */ React8.createElement(Input4.Password, { size: "large", placeholder: "Password" })
|
|
19193
19300
|
),
|
|
19194
|
-
/* @__PURE__ */
|
|
19301
|
+
/* @__PURE__ */ React8.createElement(
|
|
19195
19302
|
"div",
|
|
19196
19303
|
{
|
|
19197
19304
|
style: {
|
|
@@ -19200,8 +19307,8 @@ var LoginPage = () => {
|
|
|
19200
19307
|
marginBottom: "24px"
|
|
19201
19308
|
}
|
|
19202
19309
|
},
|
|
19203
|
-
/* @__PURE__ */
|
|
19204
|
-
/* @__PURE__ */
|
|
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(
|
|
19205
19312
|
Link,
|
|
19206
19313
|
{
|
|
19207
19314
|
onClick: () => {
|
|
@@ -19211,7 +19318,7 @@ var LoginPage = () => {
|
|
|
19211
19318
|
translate("pages.login.buttons.forgotPassword", "Forgot password?")
|
|
19212
19319
|
)
|
|
19213
19320
|
),
|
|
19214
|
-
/* @__PURE__ */
|
|
19321
|
+
/* @__PURE__ */ React8.createElement(Form4.Item, null, /* @__PURE__ */ React8.createElement(
|
|
19215
19322
|
Button5,
|
|
19216
19323
|
{
|
|
19217
19324
|
type: "primary",
|
|
@@ -19222,8 +19329,8 @@ var LoginPage = () => {
|
|
|
19222
19329
|
},
|
|
19223
19330
|
translate("pages.login.signin", "Sign in")
|
|
19224
19331
|
)),
|
|
19225
|
-
/* @__PURE__ */
|
|
19226
|
-
/* @__PURE__ */
|
|
19332
|
+
/* @__PURE__ */ React8.createElement(Divider, { plain: true }, "or"),
|
|
19333
|
+
/* @__PURE__ */ React8.createElement(
|
|
19227
19334
|
Button5,
|
|
19228
19335
|
{
|
|
19229
19336
|
block: true,
|
|
@@ -19238,9 +19345,9 @@ var LoginPage = () => {
|
|
|
19238
19345
|
};
|
|
19239
19346
|
|
|
19240
19347
|
// src/pages/login/keycloak.tsx
|
|
19241
|
-
import
|
|
19348
|
+
import React9 from "react";
|
|
19242
19349
|
import { useLogin as useLogin2, useTranslate as useTranslate2 } from "@refinedev/core";
|
|
19243
|
-
import { Button as Button6, Card as Card2, Typography as Typography3, Layout as Layout3, theme as
|
|
19350
|
+
import { Button as Button6, Card as Card2, Typography as Typography3, Layout as Layout3, theme as theme6, Divider as Divider2 } from "antd/lib";
|
|
19244
19351
|
import { ThemedTitle as ThemedTitle2 } from "@refinedev/antd";
|
|
19245
19352
|
import { useNavigate as useNavigate2 } from "react-router";
|
|
19246
19353
|
var { Title: Title2 } = Typography3;
|
|
@@ -19248,12 +19355,12 @@ var KeycloakLoginPage = () => {
|
|
|
19248
19355
|
const { mutate: login, isPending } = useLogin2();
|
|
19249
19356
|
const isLoading = isPending;
|
|
19250
19357
|
const translate = useTranslate2();
|
|
19251
|
-
const { token } =
|
|
19358
|
+
const { token } = theme6.useToken();
|
|
19252
19359
|
const navigate = useNavigate2();
|
|
19253
19360
|
const handleKeycloakLogin = () => {
|
|
19254
19361
|
login({ provider: "keycloak" });
|
|
19255
19362
|
};
|
|
19256
|
-
return /* @__PURE__ */
|
|
19363
|
+
return /* @__PURE__ */ React9.createElement(
|
|
19257
19364
|
Layout3,
|
|
19258
19365
|
{
|
|
19259
19366
|
style: {
|
|
@@ -19263,14 +19370,14 @@ var KeycloakLoginPage = () => {
|
|
|
19263
19370
|
backgroundColor: token.colorBgContainer
|
|
19264
19371
|
}
|
|
19265
19372
|
},
|
|
19266
|
-
/* @__PURE__ */
|
|
19373
|
+
/* @__PURE__ */ React9.createElement("div", { style: { marginBottom: "24px" } }, /* @__PURE__ */ React9.createElement(
|
|
19267
19374
|
ThemedTitle2,
|
|
19268
19375
|
{
|
|
19269
19376
|
collapsed: false,
|
|
19270
19377
|
wrapperStyles: { fontSize: "22px", justifyContent: "center" }
|
|
19271
19378
|
}
|
|
19272
19379
|
)),
|
|
19273
|
-
/* @__PURE__ */
|
|
19380
|
+
/* @__PURE__ */ React9.createElement(
|
|
19274
19381
|
Card2,
|
|
19275
19382
|
{
|
|
19276
19383
|
style: {
|
|
@@ -19280,8 +19387,8 @@ var KeycloakLoginPage = () => {
|
|
|
19280
19387
|
boxShadow: "0 4px 24px -4px rgba(0, 0, 0, 0.1)"
|
|
19281
19388
|
}
|
|
19282
19389
|
},
|
|
19283
|
-
/* @__PURE__ */
|
|
19284
|
-
/* @__PURE__ */
|
|
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(
|
|
19285
19392
|
Button6,
|
|
19286
19393
|
{
|
|
19287
19394
|
type: "primary",
|
|
@@ -19293,8 +19400,8 @@ var KeycloakLoginPage = () => {
|
|
|
19293
19400
|
},
|
|
19294
19401
|
"Sign in with Keycloak"
|
|
19295
19402
|
),
|
|
19296
|
-
/* @__PURE__ */
|
|
19297
|
-
/* @__PURE__ */
|
|
19403
|
+
/* @__PURE__ */ React9.createElement(Divider2, { plain: true }, "or"),
|
|
19404
|
+
/* @__PURE__ */ React9.createElement(
|
|
19298
19405
|
Button6,
|
|
19299
19406
|
{
|
|
19300
19407
|
block: true,
|
|
@@ -19308,14 +19415,14 @@ var KeycloakLoginPage = () => {
|
|
|
19308
19415
|
};
|
|
19309
19416
|
|
|
19310
19417
|
// src/pages/auth/AuthCallback.tsx
|
|
19311
|
-
import
|
|
19418
|
+
import React10, { useEffect as useEffect5, useState as useState5, useRef as useRef2 } from "react";
|
|
19312
19419
|
import { useLogin as useLogin3 } from "@refinedev/core";
|
|
19313
|
-
import { Spin, Result } from "antd";
|
|
19420
|
+
import { Spin as Spin2, Result } from "antd";
|
|
19314
19421
|
var AuthCallback = () => {
|
|
19315
19422
|
const { mutate: login } = useLogin3();
|
|
19316
|
-
const [error, setError] =
|
|
19317
|
-
const [processing, setProcessing] =
|
|
19318
|
-
const hasProcessed =
|
|
19423
|
+
const [error, setError] = useState5(null);
|
|
19424
|
+
const [processing, setProcessing] = useState5(false);
|
|
19425
|
+
const hasProcessed = useRef2(false);
|
|
19319
19426
|
useEffect5(() => {
|
|
19320
19427
|
if (hasProcessed.current || processing) {
|
|
19321
19428
|
return;
|
|
@@ -19359,13 +19466,13 @@ var AuthCallback = () => {
|
|
|
19359
19466
|
handleCallback();
|
|
19360
19467
|
}, [login, processing]);
|
|
19361
19468
|
if (error) {
|
|
19362
|
-
return /* @__PURE__ */
|
|
19469
|
+
return /* @__PURE__ */ React10.createElement(
|
|
19363
19470
|
Result,
|
|
19364
19471
|
{
|
|
19365
19472
|
status: "error",
|
|
19366
19473
|
title: "Authentication Failed",
|
|
19367
19474
|
subTitle: error,
|
|
19368
|
-
extra: /* @__PURE__ */
|
|
19475
|
+
extra: /* @__PURE__ */ React10.createElement(
|
|
19369
19476
|
"button",
|
|
19370
19477
|
{
|
|
19371
19478
|
onClick: () => window.location.href = "/login",
|
|
@@ -19383,7 +19490,7 @@ var AuthCallback = () => {
|
|
|
19383
19490
|
}
|
|
19384
19491
|
);
|
|
19385
19492
|
}
|
|
19386
|
-
return /* @__PURE__ */
|
|
19493
|
+
return /* @__PURE__ */ React10.createElement(
|
|
19387
19494
|
"div",
|
|
19388
19495
|
{
|
|
19389
19496
|
style: {
|
|
@@ -19395,13 +19502,13 @@ var AuthCallback = () => {
|
|
|
19395
19502
|
gap: "16px"
|
|
19396
19503
|
}
|
|
19397
19504
|
},
|
|
19398
|
-
/* @__PURE__ */
|
|
19399
|
-
/* @__PURE__ */
|
|
19505
|
+
/* @__PURE__ */ React10.createElement(Spin2, { size: "large" }),
|
|
19506
|
+
/* @__PURE__ */ React10.createElement("p", null, "Completing authentication...")
|
|
19400
19507
|
);
|
|
19401
19508
|
};
|
|
19402
19509
|
|
|
19403
19510
|
// src/pages/application-users/list.tsx
|
|
19404
|
-
import
|
|
19511
|
+
import React11, { useState as useState6 } from "react";
|
|
19405
19512
|
import { useNotification } from "@refinedev/core";
|
|
19406
19513
|
import { EditButton, DeleteButton } from "@refinedev/antd";
|
|
19407
19514
|
import {
|
|
@@ -19416,11 +19523,11 @@ import {
|
|
|
19416
19523
|
} from "antd/lib";
|
|
19417
19524
|
import { KeyOutlined, ThunderboltOutlined as ThunderboltOutlined2 } from "@ant-design/icons";
|
|
19418
19525
|
var ApplicationUserList = () => {
|
|
19419
|
-
const [isModalOpen, setIsModalOpen] =
|
|
19420
|
-
const [selectedUser, setSelectedUser] =
|
|
19526
|
+
const [isModalOpen, setIsModalOpen] = useState6(false);
|
|
19527
|
+
const [selectedUser, setSelectedUser] = useState6(null);
|
|
19421
19528
|
const [form] = Form5.useForm();
|
|
19422
19529
|
const { open } = useNotification();
|
|
19423
|
-
const [isLoading, setIsLoading] =
|
|
19530
|
+
const [isLoading, setIsLoading] = useState6(false);
|
|
19424
19531
|
const handleResetPasswordClick = (user) => {
|
|
19425
19532
|
setSelectedUser(user);
|
|
19426
19533
|
setIsModalOpen(true);
|
|
@@ -19450,20 +19557,20 @@ var ApplicationUserList = () => {
|
|
|
19450
19557
|
setIsLoading(false);
|
|
19451
19558
|
}
|
|
19452
19559
|
};
|
|
19453
|
-
return /* @__PURE__ */
|
|
19560
|
+
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(
|
|
19454
19561
|
SmartList,
|
|
19455
19562
|
{
|
|
19456
19563
|
searchFields: ["UserName", "DisplayName", "Email"]
|
|
19457
19564
|
},
|
|
19458
|
-
/* @__PURE__ */
|
|
19565
|
+
/* @__PURE__ */ React11.createElement(
|
|
19459
19566
|
Table4.Column,
|
|
19460
19567
|
{
|
|
19461
19568
|
dataIndex: "Photo",
|
|
19462
19569
|
title: "Photo",
|
|
19463
|
-
render: (value) => value ? /* @__PURE__ */
|
|
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%" } }) : "-"
|
|
19464
19571
|
}
|
|
19465
19572
|
),
|
|
19466
|
-
/* @__PURE__ */
|
|
19573
|
+
/* @__PURE__ */ React11.createElement(
|
|
19467
19574
|
Table4.Column,
|
|
19468
19575
|
{
|
|
19469
19576
|
dataIndex: "DisplayName",
|
|
@@ -19473,7 +19580,7 @@ var ApplicationUserList = () => {
|
|
|
19473
19580
|
defaultVisible: true
|
|
19474
19581
|
}
|
|
19475
19582
|
),
|
|
19476
|
-
/* @__PURE__ */
|
|
19583
|
+
/* @__PURE__ */ React11.createElement(
|
|
19477
19584
|
Table4.Column,
|
|
19478
19585
|
{
|
|
19479
19586
|
dataIndex: "UserName",
|
|
@@ -19482,7 +19589,7 @@ var ApplicationUserList = () => {
|
|
|
19482
19589
|
defaultVisible: true
|
|
19483
19590
|
}
|
|
19484
19591
|
),
|
|
19485
|
-
/* @__PURE__ */
|
|
19592
|
+
/* @__PURE__ */ React11.createElement(
|
|
19486
19593
|
Table4.Column,
|
|
19487
19594
|
{
|
|
19488
19595
|
dataIndex: "Email",
|
|
@@ -19490,38 +19597,38 @@ var ApplicationUserList = () => {
|
|
|
19490
19597
|
sorter: true
|
|
19491
19598
|
}
|
|
19492
19599
|
),
|
|
19493
|
-
/* @__PURE__ */
|
|
19600
|
+
/* @__PURE__ */ React11.createElement(
|
|
19494
19601
|
Table4.Column,
|
|
19495
19602
|
{
|
|
19496
19603
|
dataIndex: "IsActive",
|
|
19497
19604
|
title: "Active",
|
|
19498
|
-
render: (value) => /* @__PURE__ */
|
|
19605
|
+
render: (value) => /* @__PURE__ */ React11.createElement(Checkbox3, { checked: value, disabled: true }),
|
|
19499
19606
|
sorter: true
|
|
19500
19607
|
}
|
|
19501
19608
|
),
|
|
19502
|
-
/* @__PURE__ */
|
|
19609
|
+
/* @__PURE__ */ React11.createElement(
|
|
19503
19610
|
Table4.Column,
|
|
19504
19611
|
{
|
|
19505
19612
|
dataIndex: "AccessFailedCount",
|
|
19506
19613
|
title: "Access Failed Count"
|
|
19507
19614
|
}
|
|
19508
19615
|
),
|
|
19509
|
-
/* @__PURE__ */
|
|
19616
|
+
/* @__PURE__ */ React11.createElement(
|
|
19510
19617
|
Table4.Column,
|
|
19511
19618
|
{
|
|
19512
19619
|
title: "Actions",
|
|
19513
19620
|
dataIndex: "actions",
|
|
19514
|
-
render: (_, record) => /* @__PURE__ */
|
|
19621
|
+
render: (_, record) => /* @__PURE__ */ React11.createElement(Space6, null, /* @__PURE__ */ React11.createElement(Tooltip, { title: "Reset Password" }, /* @__PURE__ */ React11.createElement(
|
|
19515
19622
|
Button7,
|
|
19516
19623
|
{
|
|
19517
19624
|
size: "small",
|
|
19518
|
-
icon: /* @__PURE__ */
|
|
19625
|
+
icon: /* @__PURE__ */ React11.createElement(KeyOutlined, null),
|
|
19519
19626
|
onClick: () => handleResetPasswordClick(record)
|
|
19520
19627
|
}
|
|
19521
|
-
)), /* @__PURE__ */
|
|
19628
|
+
)), /* @__PURE__ */ React11.createElement(EditButton, { hideText: true, size: "small", recordItemId: record.Oid }), /* @__PURE__ */ React11.createElement(DeleteButton, { hideText: true, size: "small", recordItemId: record.Oid }))
|
|
19522
19629
|
}
|
|
19523
19630
|
)
|
|
19524
|
-
), /* @__PURE__ */
|
|
19631
|
+
), /* @__PURE__ */ React11.createElement(
|
|
19525
19632
|
Modal3,
|
|
19526
19633
|
{
|
|
19527
19634
|
title: `Reset Password for ${selectedUser?.DisplayName || selectedUser?.UserName}`,
|
|
@@ -19530,7 +19637,7 @@ var ApplicationUserList = () => {
|
|
|
19530
19637
|
onOk: () => form.submit(),
|
|
19531
19638
|
confirmLoading: isLoading
|
|
19532
19639
|
},
|
|
19533
|
-
/* @__PURE__ */
|
|
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(
|
|
19534
19641
|
Form5.Item,
|
|
19535
19642
|
{
|
|
19536
19643
|
name: "password",
|
|
@@ -19538,18 +19645,18 @@ var ApplicationUserList = () => {
|
|
|
19538
19645
|
style: { flex: 1, marginBottom: 0 },
|
|
19539
19646
|
rules: [{ required: true, message: "Please input the new password!" }]
|
|
19540
19647
|
},
|
|
19541
|
-
/* @__PURE__ */
|
|
19542
|
-
), /* @__PURE__ */
|
|
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 }))))
|
|
19543
19650
|
));
|
|
19544
19651
|
};
|
|
19545
19652
|
|
|
19546
19653
|
// src/pages/application-users/create.tsx
|
|
19547
|
-
import
|
|
19654
|
+
import React12 from "react";
|
|
19548
19655
|
import { Create, useForm } from "@refinedev/antd";
|
|
19549
19656
|
import { Form as Form6, Input as Input6, Checkbox as Checkbox4 } from "antd/lib";
|
|
19550
19657
|
var ApplicationUserCreate = () => {
|
|
19551
19658
|
const { formProps, saveButtonProps } = useForm();
|
|
19552
|
-
return /* @__PURE__ */
|
|
19659
|
+
return /* @__PURE__ */ React12.createElement(Create, { saveButtonProps }, /* @__PURE__ */ React12.createElement(Form6, { ...formProps, layout: "vertical" }, /* @__PURE__ */ React12.createElement(
|
|
19553
19660
|
Form6.Item,
|
|
19554
19661
|
{
|
|
19555
19662
|
label: "User Name",
|
|
@@ -19560,15 +19667,15 @@ var ApplicationUserCreate = () => {
|
|
|
19560
19667
|
}
|
|
19561
19668
|
]
|
|
19562
19669
|
},
|
|
19563
|
-
/* @__PURE__ */
|
|
19564
|
-
), /* @__PURE__ */
|
|
19670
|
+
/* @__PURE__ */ React12.createElement(Input6, null)
|
|
19671
|
+
), /* @__PURE__ */ React12.createElement(
|
|
19565
19672
|
Form6.Item,
|
|
19566
19673
|
{
|
|
19567
19674
|
label: "Display Name",
|
|
19568
19675
|
name: "DisplayName"
|
|
19569
19676
|
},
|
|
19570
|
-
/* @__PURE__ */
|
|
19571
|
-
), /* @__PURE__ */
|
|
19677
|
+
/* @__PURE__ */ React12.createElement(Input6, null)
|
|
19678
|
+
), /* @__PURE__ */ React12.createElement(
|
|
19572
19679
|
Form6.Item,
|
|
19573
19680
|
{
|
|
19574
19681
|
label: "Email",
|
|
@@ -19579,8 +19686,8 @@ var ApplicationUserCreate = () => {
|
|
|
19579
19686
|
}
|
|
19580
19687
|
]
|
|
19581
19688
|
},
|
|
19582
|
-
/* @__PURE__ */
|
|
19583
|
-
), /* @__PURE__ */
|
|
19689
|
+
/* @__PURE__ */ React12.createElement(Input6, null)
|
|
19690
|
+
), /* @__PURE__ */ React12.createElement(
|
|
19584
19691
|
Form6.Item,
|
|
19585
19692
|
{
|
|
19586
19693
|
label: "Is Active",
|
|
@@ -19588,19 +19695,19 @@ var ApplicationUserCreate = () => {
|
|
|
19588
19695
|
valuePropName: "checked",
|
|
19589
19696
|
initialValue: true
|
|
19590
19697
|
},
|
|
19591
|
-
/* @__PURE__ */
|
|
19592
|
-
), /* @__PURE__ */
|
|
19698
|
+
/* @__PURE__ */ React12.createElement(Checkbox4, null, "Active")
|
|
19699
|
+
), /* @__PURE__ */ React12.createElement(
|
|
19593
19700
|
Form6.Item,
|
|
19594
19701
|
{
|
|
19595
19702
|
label: "Photo",
|
|
19596
19703
|
name: "Photo"
|
|
19597
19704
|
},
|
|
19598
|
-
/* @__PURE__ */
|
|
19705
|
+
/* @__PURE__ */ React12.createElement(Base64Upload, null)
|
|
19599
19706
|
)));
|
|
19600
19707
|
};
|
|
19601
19708
|
|
|
19602
19709
|
// src/pages/application-users/edit.tsx
|
|
19603
|
-
import
|
|
19710
|
+
import React13 from "react";
|
|
19604
19711
|
import { Edit, useForm as useForm2, useSelect } from "@refinedev/antd";
|
|
19605
19712
|
import { Form as Form7, Input as Input7, Checkbox as Checkbox5, Select, App } from "antd/lib";
|
|
19606
19713
|
var ApplicationUserEdit = () => {
|
|
@@ -19643,7 +19750,7 @@ var ApplicationUserEdit = () => {
|
|
|
19643
19750
|
const { Roles, ...userValues } = values;
|
|
19644
19751
|
formProps.onFinish?.(userValues);
|
|
19645
19752
|
};
|
|
19646
|
-
return /* @__PURE__ */
|
|
19753
|
+
return /* @__PURE__ */ React13.createElement(Edit, { saveButtonProps }, /* @__PURE__ */ React13.createElement(Form7, { ...formProps, layout: "vertical", onFinish: handleOnFinish }, /* @__PURE__ */ React13.createElement(
|
|
19647
19754
|
Form7.Item,
|
|
19648
19755
|
{
|
|
19649
19756
|
label: "User Name",
|
|
@@ -19654,15 +19761,15 @@ var ApplicationUserEdit = () => {
|
|
|
19654
19761
|
}
|
|
19655
19762
|
]
|
|
19656
19763
|
},
|
|
19657
|
-
/* @__PURE__ */
|
|
19658
|
-
), /* @__PURE__ */
|
|
19764
|
+
/* @__PURE__ */ React13.createElement(Input7, null)
|
|
19765
|
+
), /* @__PURE__ */ React13.createElement(
|
|
19659
19766
|
Form7.Item,
|
|
19660
19767
|
{
|
|
19661
19768
|
label: "Display Name",
|
|
19662
19769
|
name: "DisplayName"
|
|
19663
19770
|
},
|
|
19664
|
-
/* @__PURE__ */
|
|
19665
|
-
), /* @__PURE__ */
|
|
19771
|
+
/* @__PURE__ */ React13.createElement(Input7, null)
|
|
19772
|
+
), /* @__PURE__ */ React13.createElement(
|
|
19666
19773
|
Form7.Item,
|
|
19667
19774
|
{
|
|
19668
19775
|
label: "Email",
|
|
@@ -19673,16 +19780,16 @@ var ApplicationUserEdit = () => {
|
|
|
19673
19780
|
}
|
|
19674
19781
|
]
|
|
19675
19782
|
},
|
|
19676
|
-
/* @__PURE__ */
|
|
19677
|
-
), /* @__PURE__ */
|
|
19783
|
+
/* @__PURE__ */ React13.createElement(Input7, null)
|
|
19784
|
+
), /* @__PURE__ */ React13.createElement(
|
|
19678
19785
|
Form7.Item,
|
|
19679
19786
|
{
|
|
19680
19787
|
label: "Is Active",
|
|
19681
19788
|
name: "IsActive",
|
|
19682
19789
|
valuePropName: "checked"
|
|
19683
19790
|
},
|
|
19684
|
-
/* @__PURE__ */
|
|
19685
|
-
), /* @__PURE__ */
|
|
19791
|
+
/* @__PURE__ */ React13.createElement(Checkbox5, null, "Active")
|
|
19792
|
+
), /* @__PURE__ */ React13.createElement(
|
|
19686
19793
|
Form7.Item,
|
|
19687
19794
|
{
|
|
19688
19795
|
label: "Roles",
|
|
@@ -19701,49 +19808,49 @@ var ApplicationUserEdit = () => {
|
|
|
19701
19808
|
return { value: [] };
|
|
19702
19809
|
}
|
|
19703
19810
|
},
|
|
19704
|
-
/* @__PURE__ */
|
|
19705
|
-
), /* @__PURE__ */
|
|
19811
|
+
/* @__PURE__ */ React13.createElement(Select, { ...roleSelectProps, mode: "multiple" })
|
|
19812
|
+
), /* @__PURE__ */ React13.createElement(
|
|
19706
19813
|
Form7.Item,
|
|
19707
19814
|
{
|
|
19708
19815
|
label: "Photo",
|
|
19709
19816
|
name: "Photo"
|
|
19710
19817
|
},
|
|
19711
|
-
/* @__PURE__ */
|
|
19818
|
+
/* @__PURE__ */ React13.createElement(Base64Upload, null)
|
|
19712
19819
|
)));
|
|
19713
19820
|
};
|
|
19714
19821
|
|
|
19715
19822
|
// src/pages/roles/list.tsx
|
|
19716
|
-
import
|
|
19823
|
+
import React14 from "react";
|
|
19717
19824
|
import { useTable as useTable2, List as List2, EditButton as EditButton2, DeleteButton as DeleteButton2 } from "@refinedev/antd";
|
|
19718
19825
|
import { Table as Table5, Space as Space7, Checkbox as Checkbox6 } from "antd/lib";
|
|
19719
19826
|
var RoleList = () => {
|
|
19720
19827
|
const { tableProps } = useTable2({
|
|
19721
19828
|
syncWithLocation: true
|
|
19722
19829
|
});
|
|
19723
|
-
return /* @__PURE__ */
|
|
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(
|
|
19724
19831
|
Table5.Column,
|
|
19725
19832
|
{
|
|
19726
19833
|
dataIndex: "IsAdministrative",
|
|
19727
19834
|
title: "Is Administrative",
|
|
19728
|
-
render: (value) => /* @__PURE__ */
|
|
19835
|
+
render: (value) => /* @__PURE__ */ React14.createElement(Checkbox6, { checked: value, disabled: true })
|
|
19729
19836
|
}
|
|
19730
|
-
), /* @__PURE__ */
|
|
19837
|
+
), /* @__PURE__ */ React14.createElement(Table5.Column, { dataIndex: "PermissionPolicy", title: "Permission Policy" }), /* @__PURE__ */ React14.createElement(
|
|
19731
19838
|
Table5.Column,
|
|
19732
19839
|
{
|
|
19733
19840
|
title: "Actions",
|
|
19734
19841
|
dataIndex: "actions",
|
|
19735
|
-
render: (_, record) => /* @__PURE__ */
|
|
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 }))
|
|
19736
19843
|
}
|
|
19737
19844
|
)));
|
|
19738
19845
|
};
|
|
19739
19846
|
|
|
19740
19847
|
// src/pages/roles/create.tsx
|
|
19741
|
-
import
|
|
19848
|
+
import React16 from "react";
|
|
19742
19849
|
import { Create as Create2, useForm as useForm3 } from "@refinedev/antd";
|
|
19743
19850
|
import { Form as Form9, Input as Input8, Checkbox as Checkbox7, Select as Select3 } from "antd/lib";
|
|
19744
19851
|
|
|
19745
19852
|
// src/pages/roles/TypePermissionList.tsx
|
|
19746
|
-
import
|
|
19853
|
+
import React15 from "react";
|
|
19747
19854
|
import { Form as Form8, Select as Select2, Table as Table6 } from "antd/lib";
|
|
19748
19855
|
import { useTable as useTable3 } from "@refinedev/antd";
|
|
19749
19856
|
|
|
@@ -19772,7 +19879,7 @@ var useModelTypes = () => {
|
|
|
19772
19879
|
};
|
|
19773
19880
|
|
|
19774
19881
|
// src/pages/roles/TypePermissionList.tsx
|
|
19775
|
-
var PermissionSelect = (props) => /* @__PURE__ */
|
|
19882
|
+
var PermissionSelect = (props) => /* @__PURE__ */ React15.createElement(
|
|
19776
19883
|
Select2,
|
|
19777
19884
|
{
|
|
19778
19885
|
...props,
|
|
@@ -19784,14 +19891,14 @@ var PermissionSelect = (props) => /* @__PURE__ */ React14.createElement(
|
|
|
19784
19891
|
}
|
|
19785
19892
|
);
|
|
19786
19893
|
var TypePermissionFormFields = ({ typeOptions }) => {
|
|
19787
|
-
return /* @__PURE__ */
|
|
19894
|
+
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
|
|
19788
19895
|
Form8.Item,
|
|
19789
19896
|
{
|
|
19790
19897
|
label: "Target Type",
|
|
19791
19898
|
name: "TargetTypeFullName",
|
|
19792
19899
|
rules: [{ required: true }]
|
|
19793
19900
|
},
|
|
19794
|
-
/* @__PURE__ */
|
|
19901
|
+
/* @__PURE__ */ React15.createElement(
|
|
19795
19902
|
Select2,
|
|
19796
19903
|
{
|
|
19797
19904
|
showSearch: true,
|
|
@@ -19799,7 +19906,7 @@ var TypePermissionFormFields = ({ typeOptions }) => {
|
|
|
19799
19906
|
filterOption: (input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase())
|
|
19800
19907
|
}
|
|
19801
19908
|
)
|
|
19802
|
-
), /* @__PURE__ */
|
|
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)));
|
|
19803
19910
|
};
|
|
19804
19911
|
var TypePermissionList = ({ masterId }) => {
|
|
19805
19912
|
const { data: modelTypes } = useModelTypes();
|
|
@@ -19819,17 +19926,17 @@ var TypePermissionList = ({ masterId }) => {
|
|
|
19819
19926
|
mode: "off"
|
|
19820
19927
|
}
|
|
19821
19928
|
});
|
|
19822
|
-
const typeOptions =
|
|
19823
|
-
const FormFieldsWrapper =
|
|
19824
|
-
return ({ mode }) => /* @__PURE__ */
|
|
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 });
|
|
19825
19932
|
}, [typeOptions]);
|
|
19826
|
-
const dataSource =
|
|
19933
|
+
const dataSource = React15.useMemo(() => {
|
|
19827
19934
|
return (tableProps.dataSource || []).map((p) => ({
|
|
19828
19935
|
...p,
|
|
19829
19936
|
TargetType: p.TargetType || p.TargetTypeFullName || ""
|
|
19830
19937
|
}));
|
|
19831
19938
|
}, [tableProps.dataSource]);
|
|
19832
|
-
return /* @__PURE__ */
|
|
19939
|
+
return /* @__PURE__ */ React15.createElement(
|
|
19833
19940
|
RelatedList,
|
|
19834
19941
|
{
|
|
19835
19942
|
resource: "PermissionPolicyTypePermissionObject",
|
|
@@ -19840,7 +19947,7 @@ var TypePermissionList = ({ masterId }) => {
|
|
|
19840
19947
|
modalTitle: "Type Permission",
|
|
19841
19948
|
FormFields: FormFieldsWrapper
|
|
19842
19949
|
},
|
|
19843
|
-
/* @__PURE__ */
|
|
19950
|
+
/* @__PURE__ */ React15.createElement(
|
|
19844
19951
|
Table6.Column,
|
|
19845
19952
|
{
|
|
19846
19953
|
dataIndex: "TargetType",
|
|
@@ -19848,10 +19955,10 @@ var TypePermissionList = ({ masterId }) => {
|
|
|
19848
19955
|
render: (value) => typeOptions.find((t) => t.value === value)?.label || value
|
|
19849
19956
|
}
|
|
19850
19957
|
),
|
|
19851
|
-
/* @__PURE__ */
|
|
19852
|
-
/* @__PURE__ */
|
|
19853
|
-
/* @__PURE__ */
|
|
19854
|
-
/* @__PURE__ */
|
|
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" })
|
|
19855
19962
|
);
|
|
19856
19963
|
};
|
|
19857
19964
|
|
|
@@ -19862,7 +19969,7 @@ var RoleCreate = () => {
|
|
|
19862
19969
|
const handleSave = () => {
|
|
19863
19970
|
form.submit();
|
|
19864
19971
|
};
|
|
19865
|
-
return /* @__PURE__ */
|
|
19972
|
+
return /* @__PURE__ */ React16.createElement(Create2, { saveButtonProps: { ...saveButtonProps, onClick: handleSave } }, /* @__PURE__ */ React16.createElement(
|
|
19866
19973
|
Form9,
|
|
19867
19974
|
{
|
|
19868
19975
|
...formProps,
|
|
@@ -19872,25 +19979,25 @@ var RoleCreate = () => {
|
|
|
19872
19979
|
return formProps.onFinish && formProps.onFinish(values);
|
|
19873
19980
|
}
|
|
19874
19981
|
},
|
|
19875
|
-
/* @__PURE__ */
|
|
19982
|
+
/* @__PURE__ */ React16.createElement(
|
|
19876
19983
|
Form9.Item,
|
|
19877
19984
|
{
|
|
19878
19985
|
label: "Name",
|
|
19879
19986
|
name: "Name",
|
|
19880
19987
|
rules: [{ required: true }]
|
|
19881
19988
|
},
|
|
19882
|
-
/* @__PURE__ */
|
|
19989
|
+
/* @__PURE__ */ React16.createElement(Input8, null)
|
|
19883
19990
|
),
|
|
19884
|
-
/* @__PURE__ */
|
|
19991
|
+
/* @__PURE__ */ React16.createElement(
|
|
19885
19992
|
Form9.Item,
|
|
19886
19993
|
{
|
|
19887
19994
|
label: "Is Administrative",
|
|
19888
19995
|
name: "IsAdministrative",
|
|
19889
19996
|
valuePropName: "checked"
|
|
19890
19997
|
},
|
|
19891
|
-
/* @__PURE__ */
|
|
19998
|
+
/* @__PURE__ */ React16.createElement(Checkbox7, null, "Is Administrative")
|
|
19892
19999
|
),
|
|
19893
|
-
/* @__PURE__ */
|
|
20000
|
+
/* @__PURE__ */ React16.createElement(
|
|
19894
20001
|
Form9.Item,
|
|
19895
20002
|
{
|
|
19896
20003
|
label: "Permission Policy",
|
|
@@ -19898,7 +20005,7 @@ var RoleCreate = () => {
|
|
|
19898
20005
|
initialValue: "DenyAllByDefault" /* DenyAllByDefault */,
|
|
19899
20006
|
rules: [{ required: true }]
|
|
19900
20007
|
},
|
|
19901
|
-
/* @__PURE__ */
|
|
20008
|
+
/* @__PURE__ */ React16.createElement(
|
|
19902
20009
|
Select3,
|
|
19903
20010
|
{
|
|
19904
20011
|
options: [
|
|
@@ -19909,12 +20016,12 @@ var RoleCreate = () => {
|
|
|
19909
20016
|
}
|
|
19910
20017
|
)
|
|
19911
20018
|
),
|
|
19912
|
-
/* @__PURE__ */
|
|
20019
|
+
/* @__PURE__ */ React16.createElement(TypePermissionList, null)
|
|
19913
20020
|
));
|
|
19914
20021
|
};
|
|
19915
20022
|
|
|
19916
20023
|
// src/pages/roles/edit.tsx
|
|
19917
|
-
import
|
|
20024
|
+
import React17 from "react";
|
|
19918
20025
|
import { Edit as Edit2, useForm as useForm4 } from "@refinedev/antd";
|
|
19919
20026
|
import { Form as Form10, Input as Input9, Checkbox as Checkbox8, Select as Select4 } from "antd/lib";
|
|
19920
20027
|
var RoleEdit = () => {
|
|
@@ -19922,7 +20029,7 @@ var RoleEdit = () => {
|
|
|
19922
20029
|
const handleSave = () => {
|
|
19923
20030
|
formProps.form?.submit();
|
|
19924
20031
|
};
|
|
19925
|
-
return /* @__PURE__ */
|
|
20032
|
+
return /* @__PURE__ */ React17.createElement(Edit2, { saveButtonProps: { ...saveButtonProps, onClick: handleSave } }, /* @__PURE__ */ React17.createElement(
|
|
19926
20033
|
Form10,
|
|
19927
20034
|
{
|
|
19928
20035
|
...formProps,
|
|
@@ -19932,32 +20039,32 @@ var RoleEdit = () => {
|
|
|
19932
20039
|
return formProps.onFinish && formProps.onFinish(rest);
|
|
19933
20040
|
}
|
|
19934
20041
|
},
|
|
19935
|
-
/* @__PURE__ */
|
|
20042
|
+
/* @__PURE__ */ React17.createElement(
|
|
19936
20043
|
Form10.Item,
|
|
19937
20044
|
{
|
|
19938
20045
|
label: "Name",
|
|
19939
20046
|
name: "Name",
|
|
19940
20047
|
rules: [{ required: true }]
|
|
19941
20048
|
},
|
|
19942
|
-
/* @__PURE__ */
|
|
20049
|
+
/* @__PURE__ */ React17.createElement(Input9, null)
|
|
19943
20050
|
),
|
|
19944
|
-
/* @__PURE__ */
|
|
20051
|
+
/* @__PURE__ */ React17.createElement(
|
|
19945
20052
|
Form10.Item,
|
|
19946
20053
|
{
|
|
19947
20054
|
label: "Is Administrative",
|
|
19948
20055
|
name: "IsAdministrative",
|
|
19949
20056
|
valuePropName: "checked"
|
|
19950
20057
|
},
|
|
19951
|
-
/* @__PURE__ */
|
|
20058
|
+
/* @__PURE__ */ React17.createElement(Checkbox8, null, "Is Administrative")
|
|
19952
20059
|
),
|
|
19953
|
-
/* @__PURE__ */
|
|
20060
|
+
/* @__PURE__ */ React17.createElement(
|
|
19954
20061
|
Form10.Item,
|
|
19955
20062
|
{
|
|
19956
20063
|
label: "Permission Policy",
|
|
19957
20064
|
name: "PermissionPolicy",
|
|
19958
20065
|
rules: [{ required: true }]
|
|
19959
20066
|
},
|
|
19960
|
-
/* @__PURE__ */
|
|
20067
|
+
/* @__PURE__ */ React17.createElement(
|
|
19961
20068
|
Select4,
|
|
19962
20069
|
{
|
|
19963
20070
|
options: [
|
|
@@ -19968,7 +20075,7 @@ var RoleEdit = () => {
|
|
|
19968
20075
|
}
|
|
19969
20076
|
)
|
|
19970
20077
|
),
|
|
19971
|
-
/* @__PURE__ */
|
|
20078
|
+
/* @__PURE__ */ React17.createElement(
|
|
19972
20079
|
TypePermissionList,
|
|
19973
20080
|
{
|
|
19974
20081
|
masterId: id?.toString()
|
|
@@ -19984,6 +20091,7 @@ export {
|
|
|
19984
20091
|
Base64Upload,
|
|
19985
20092
|
ColorModeContext,
|
|
19986
20093
|
ColorModeContextProvider,
|
|
20094
|
+
DrawioEditor,
|
|
19987
20095
|
Header,
|
|
19988
20096
|
HttpError,
|
|
19989
20097
|
KeycloakLoginPage,
|