@blocklet/pages-kit-inner-components 0.4.85 → 0.4.86
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/lib/cjs/chunks/home-O1tb16Jn.js +542 -0
- package/lib/cjs/chunks/{publish-button-BT-w5Okt.js → publish-button-DEx0XGBW.js} +1 -1
- package/lib/cjs/chunks/site-state-C1M4mrHD.js +57 -0
- package/lib/cjs/components.js +1 -1
- package/lib/cjs/home.js +1 -1
- package/lib/cjs/locales.js +1 -1
- package/lib/cjs/project-html.js +2 -2
- package/lib/cjs/resources.js +1 -1
- package/lib/cjs/setting.js +4 -4
- package/lib/cjs/site-state.js +1 -1
- package/lib/es/chunks/{home-BX1L-H5W.js → home-Y2IIftcZ.js} +542 -536
- package/lib/es/chunks/{publish-button-DUkACr5d.js → publish-button-BTed0K41.js} +1 -1
- package/lib/es/chunks/{site-state-D5tVTSMt.js → site-state-eOo5A_KN.js} +146 -140
- package/lib/es/components.js +1 -1
- package/lib/es/home.js +9 -8
- package/lib/es/locales.js +174 -0
- package/lib/es/project-html.js +27 -27
- package/lib/es/resources.js +3 -2
- package/lib/es/setting.js +805 -776
- package/lib/es/site-state.js +19 -13
- package/package.json +9 -9
- package/lib/cjs/chunks/home-D0r5jd24.js +0 -542
- package/lib/cjs/chunks/site-state-CxabeXSX.js +0 -57
package/lib/es/setting.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { jsx as t, jsxs as S, Fragment as H } from "react/jsx-runtime";
|
|
2
|
-
import { t as
|
|
2
|
+
import { t as ge, g as oe, i as Fe, b as Je, h as de, E as yt, n as Me, j as xe } from "./chunks/state-DqChB5ys.js";
|
|
3
3
|
import Z from "@arcblock/ux/lib/Empty";
|
|
4
|
-
import { useLocaleContext as
|
|
4
|
+
import { useLocaleContext as D } from "@arcblock/ux/lib/Locale/context";
|
|
5
5
|
import { CodeEditor as we } from "@blocklet/code-editor";
|
|
6
6
|
import vt from "@mui/icons-material/AddRounded";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import gt from "@mui/icons-material/ArrowDownward";
|
|
8
|
+
import xt from "@mui/icons-material/ArrowUpward";
|
|
9
9
|
import wt from "@mui/icons-material/DeleteOutline";
|
|
10
|
-
import { Typography as
|
|
10
|
+
import { Typography as F, TextField as C, Stack as j, FormLabel as le, Box as R, TableContainer as kt, Paper as ee, Table as He, TableHead as Ye, TableRow as ne, TableCell as se, TableBody as Ge, Button as T, IconButton as ue, FormControlLabel as Le, Switch as qe, InputAdornment as pe, Dialog as ke, DialogTitle as Qe, DialogContent as Xe, DialogActions as Ze, alpha as Pt, Tooltip as X, buttonClasses as It, Autocomplete as et, MenuItem as me, Collapse as St, Divider as Ot, Popper as Rt } from "@mui/material";
|
|
11
11
|
import V from "lodash/sortBy";
|
|
12
|
-
import { useCallback as A, useMemo as ce, forwardRef as tt, useState as
|
|
13
|
-
import { useUpdate as it, useDebounce as
|
|
14
|
-
import { styled as
|
|
12
|
+
import { useCallback as A, useMemo as ce, forwardRef as tt, useState as J, useEffect as M, useImperativeHandle as rt, lazy as jt, Suspense as zt, useRef as $, useId as Nt } from "react";
|
|
13
|
+
import { useUpdate as it, useDebounce as Ct } from "react-use";
|
|
14
|
+
import { styled as Dt } from "@arcblock/ux/lib/Theme";
|
|
15
15
|
import { cx as At } from "@emotion/css";
|
|
16
16
|
import { useReactive as Tt, useBoolean as Vt, useUpdate as Et } from "ahooks";
|
|
17
17
|
import We from "gradient-parser";
|
|
18
18
|
import "lodash/without";
|
|
19
19
|
import Ut from "tinycolor2";
|
|
20
|
-
import { red as Wt, pink as Bt, purple as Kt, indigo as
|
|
20
|
+
import { red as Wt, pink as Bt, purple as Kt, indigo as $t, blue as _t, cyan as Ft, teal as Jt, green as Mt, lime as Ht, yellow as Yt, amber as Gt, orange as Lt, brown as qt, grey as Qt, blueGrey as Xt } from "@mui/material/colors";
|
|
21
21
|
import { getImageSize as fe, getVideoSize as he, UploaderButton as Pe, UploaderProvider as Ie, useUploader as Zt } from "./uploader.js";
|
|
22
22
|
import { Icon as er } from "@iconify-icon/react";
|
|
23
23
|
import ot from "lodash/isEmpty";
|
|
24
|
-
import
|
|
24
|
+
import lt from "lodash/set";
|
|
25
25
|
import * as be from "yaml";
|
|
26
|
-
import
|
|
26
|
+
import tr from "lodash/cloneDeep";
|
|
27
27
|
import Be from "@arcblock/ux/lib/Toast";
|
|
28
|
-
import { CustomComponentRenderer as
|
|
29
|
-
import { unstable_useNumberInput as or, ClickAwayListener as
|
|
30
|
-
import { VisibilityOffRounded as
|
|
28
|
+
import { CustomComponentRenderer as nt, transpileAndLoadScript as rr, getPropertiesFromCode as ir } from "@blocklet/pages-kit/components";
|
|
29
|
+
import { unstable_useNumberInput as or, ClickAwayListener as lr } from "@mui/base";
|
|
30
|
+
import { VisibilityOffRounded as nr, VisibilityRounded as sr, DeleteOutlineRounded as cr, DragIndicatorRounded as ar, TranslateRounded as st, AddRounded as ct, InfoRounded as at, StarRounded as dr, SettingsRounded as dt } from "@mui/icons-material";
|
|
31
31
|
import { alpha as Ke } from "@mui/material/styles";
|
|
32
32
|
import { getYjsValue as te } from "@syncedstore/core";
|
|
33
33
|
import ur from "lodash/assign";
|
|
34
34
|
import pr from "lodash/has";
|
|
35
|
-
import
|
|
35
|
+
import ae from "lodash/isNil";
|
|
36
36
|
import mr from "lodash/isObject";
|
|
37
37
|
import fr from "lodash/keyBy";
|
|
38
38
|
import hr from "lodash/omit";
|
|
39
39
|
import br from "lodash/pick";
|
|
40
40
|
import yr from "lodash/reduce";
|
|
41
41
|
import { usePopupState as Se, bindTrigger as Oe, bindDialog as ut, bindPopper as vr } from "material-ui-popup-state/hooks";
|
|
42
|
-
import { ErrorBoundary as
|
|
43
|
-
import { useDrop as pt, useDrag as
|
|
42
|
+
import { ErrorBoundary as gr } from "react-error-boundary";
|
|
43
|
+
import { useDrop as pt, useDrag as xr } from "react-dnd";
|
|
44
44
|
function wr({
|
|
45
45
|
onClick: e,
|
|
46
46
|
disabled: r,
|
|
@@ -55,7 +55,7 @@ function kr({
|
|
|
55
55
|
sx: o,
|
|
56
56
|
...i
|
|
57
57
|
}) {
|
|
58
|
-
return /* @__PURE__ */ t(ue, { size: "small", color: "primary", disabled: r, onClick: e, ...i, children: /* @__PURE__ */ t(
|
|
58
|
+
return /* @__PURE__ */ t(ue, { size: "small", color: "primary", disabled: r, onClick: e, ...i, children: /* @__PURE__ */ t(xt, { fontSize: "small" }) });
|
|
59
59
|
}
|
|
60
60
|
function Pr({
|
|
61
61
|
onClick: e,
|
|
@@ -63,7 +63,7 @@ function Pr({
|
|
|
63
63
|
sx: o,
|
|
64
64
|
...i
|
|
65
65
|
}) {
|
|
66
|
-
return /* @__PURE__ */ t(ue, { size: "small", color: "primary", disabled: r, onClick: e, ...i, children: /* @__PURE__ */ t(
|
|
66
|
+
return /* @__PURE__ */ t(ue, { size: "small", color: "primary", disabled: r, onClick: e, ...i, children: /* @__PURE__ */ t(gt, { fontSize: "small" }) });
|
|
67
67
|
}
|
|
68
68
|
function Ir({
|
|
69
69
|
label: e,
|
|
@@ -71,75 +71,75 @@ function Ir({
|
|
|
71
71
|
onChange: o,
|
|
72
72
|
disabled: i = !1,
|
|
73
73
|
itemLabel: u = "",
|
|
74
|
-
emptyHeight:
|
|
75
|
-
property:
|
|
76
|
-
renderItem:
|
|
77
|
-
...
|
|
74
|
+
emptyHeight: m = 40,
|
|
75
|
+
property: c,
|
|
76
|
+
renderItem: b,
|
|
77
|
+
...g
|
|
78
78
|
}) {
|
|
79
|
-
const { t:
|
|
80
|
-
(
|
|
81
|
-
o(
|
|
79
|
+
const { t: f, locale: w } = D(), p = it(), l = A(
|
|
80
|
+
(h) => {
|
|
81
|
+
o(ge(h, c.type));
|
|
82
82
|
},
|
|
83
|
-
[o,
|
|
84
|
-
), s = ce(() => Array.isArray(r) ? r : [], [r]),
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
}, [s,
|
|
88
|
-
if (!
|
|
89
|
-
return
|
|
90
|
-
const
|
|
91
|
-
V(Object.values(
|
|
83
|
+
[o, c.type]
|
|
84
|
+
), s = ce(() => Array.isArray(r) ? r : [], [r]), n = A(() => {
|
|
85
|
+
const h = [...s, ""];
|
|
86
|
+
l(h), p();
|
|
87
|
+
}, [s, l, p]), d = A(() => {
|
|
88
|
+
if (!c || !c.subProperties)
|
|
89
|
+
return n();
|
|
90
|
+
const h = {};
|
|
91
|
+
V(Object.values(c.subProperties), "index").forEach(({ data: N }) => {
|
|
92
92
|
var U, W;
|
|
93
|
-
if (!
|
|
94
|
-
const E = ((W = (U =
|
|
95
|
-
|
|
93
|
+
if (!N.key) return;
|
|
94
|
+
const E = ((W = (U = N.locales) == null ? void 0 : U[w]) == null ? void 0 : W.defaultValue) ?? "";
|
|
95
|
+
h[N.key] = E;
|
|
96
96
|
});
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
}, [s,
|
|
100
|
-
(
|
|
97
|
+
const z = [...s, h];
|
|
98
|
+
l(z), p();
|
|
99
|
+
}, [s, l, p, c, w, n]), y = A(
|
|
100
|
+
(h) => {
|
|
101
101
|
try {
|
|
102
|
-
const I = JSON.parse(
|
|
103
|
-
Array.isArray(I) ?
|
|
102
|
+
const I = JSON.parse(h);
|
|
103
|
+
Array.isArray(I) ? l(I) : console.error("JSON解析结果不是数组");
|
|
104
104
|
} catch (I) {
|
|
105
105
|
console.error("JSON解析错误:", I);
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
|
-
[
|
|
108
|
+
[l]
|
|
109
109
|
), P = A(
|
|
110
|
-
(
|
|
111
|
-
const I = s.filter((
|
|
112
|
-
|
|
110
|
+
(h) => {
|
|
111
|
+
const I = s.filter((z, N) => N !== h);
|
|
112
|
+
l(I), p();
|
|
113
113
|
},
|
|
114
|
-
[s,
|
|
115
|
-
),
|
|
116
|
-
(
|
|
117
|
-
if (
|
|
118
|
-
const I = [...s],
|
|
119
|
-
I[
|
|
114
|
+
[s, l, p]
|
|
115
|
+
), a = A(
|
|
116
|
+
(h) => {
|
|
117
|
+
if (h <= 0) return;
|
|
118
|
+
const I = [...s], z = I[h];
|
|
119
|
+
I[h] = I[h - 1], I[h - 1] = z, l(I), p();
|
|
120
120
|
},
|
|
121
|
-
[s,
|
|
122
|
-
),
|
|
123
|
-
(
|
|
124
|
-
if (
|
|
125
|
-
const I = [...s],
|
|
126
|
-
I[
|
|
121
|
+
[s, l, p]
|
|
122
|
+
), x = A(
|
|
123
|
+
(h) => {
|
|
124
|
+
if (h >= s.length - 1) return;
|
|
125
|
+
const I = [...s], z = I[h];
|
|
126
|
+
I[h] = I[h + 1], I[h + 1] = z, l(I), p();
|
|
127
127
|
},
|
|
128
|
-
[s,
|
|
129
|
-
),
|
|
130
|
-
(
|
|
131
|
-
const
|
|
132
|
-
|
|
128
|
+
[s, l, p]
|
|
129
|
+
), v = A(
|
|
130
|
+
(h, I) => {
|
|
131
|
+
const z = [...s];
|
|
132
|
+
z[h] = I, l(z);
|
|
133
133
|
},
|
|
134
|
-
[s,
|
|
135
|
-
), k =
|
|
134
|
+
[s, l]
|
|
135
|
+
), k = c && c.subProperties && Object.keys(c.subProperties).length > 0, O = ce(() => [
|
|
136
136
|
{
|
|
137
137
|
field: "index",
|
|
138
138
|
headerName: "#",
|
|
139
139
|
width: 40,
|
|
140
140
|
align: "center",
|
|
141
|
-
renderCell: ({ index:
|
|
142
|
-
|
|
141
|
+
renderCell: ({ index: h }) => /* @__PURE__ */ t(
|
|
142
|
+
F,
|
|
143
143
|
{
|
|
144
144
|
variant: "body1",
|
|
145
145
|
sx: {
|
|
@@ -152,28 +152,28 @@ function Ir({
|
|
|
152
152
|
justifyContent: "center",
|
|
153
153
|
color: "text.secondary"
|
|
154
154
|
},
|
|
155
|
-
children:
|
|
155
|
+
children: h + 1
|
|
156
156
|
}
|
|
157
157
|
)
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
field: "content",
|
|
161
161
|
headerName: "",
|
|
162
|
-
renderCell: ({ row:
|
|
163
|
-
item:
|
|
162
|
+
renderCell: ({ row: h, index: I }) => b && k ? b({
|
|
163
|
+
item: h,
|
|
164
164
|
index: I,
|
|
165
|
-
property:
|
|
166
|
-
onChange: (
|
|
165
|
+
property: c,
|
|
166
|
+
onChange: (z) => v(I, z)
|
|
167
167
|
}) : /* @__PURE__ */ t(
|
|
168
|
-
|
|
168
|
+
C,
|
|
169
169
|
{
|
|
170
170
|
fullWidth: !0,
|
|
171
171
|
size: "small",
|
|
172
172
|
disabled: i,
|
|
173
|
-
value:
|
|
174
|
-
placeholder: u || `${
|
|
175
|
-
onChange: (
|
|
176
|
-
...
|
|
173
|
+
value: h,
|
|
174
|
+
placeholder: u || `${f("item")} ${I + 1}`,
|
|
175
|
+
onChange: (z) => v(I, z.target.value),
|
|
176
|
+
...g
|
|
177
177
|
}
|
|
178
178
|
)
|
|
179
179
|
},
|
|
@@ -183,34 +183,34 @@ function Ir({
|
|
|
183
183
|
width: 30,
|
|
184
184
|
// 增加宽度以容纳更多按钮
|
|
185
185
|
align: "center",
|
|
186
|
-
renderCell: ({ index:
|
|
187
|
-
/* @__PURE__ */ t(kr, { disabled: i ||
|
|
186
|
+
renderCell: ({ index: h }) => /* @__PURE__ */ S(j, { direction: "column", spacing: 0.25, children: [
|
|
187
|
+
/* @__PURE__ */ t(kr, { disabled: i || h === 0, onClick: () => a(h) }),
|
|
188
188
|
/* @__PURE__ */ t(
|
|
189
189
|
Pr,
|
|
190
190
|
{
|
|
191
|
-
disabled: i ||
|
|
192
|
-
onClick: () =>
|
|
191
|
+
disabled: i || h === s.length - 1,
|
|
192
|
+
onClick: () => x(h)
|
|
193
193
|
}
|
|
194
194
|
),
|
|
195
|
-
/* @__PURE__ */ t(wr, { disabled: i, onClick: () => P(
|
|
195
|
+
/* @__PURE__ */ t(wr, { disabled: i, onClick: () => P(h) })
|
|
196
196
|
] })
|
|
197
197
|
}
|
|
198
198
|
], [
|
|
199
|
-
|
|
199
|
+
b,
|
|
200
200
|
k,
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
c,
|
|
202
|
+
v,
|
|
203
203
|
u,
|
|
204
|
-
|
|
204
|
+
f,
|
|
205
205
|
i,
|
|
206
|
-
|
|
206
|
+
g,
|
|
207
207
|
P,
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
a,
|
|
209
|
+
x,
|
|
210
210
|
s.length
|
|
211
211
|
]);
|
|
212
|
-
return k ? /* @__PURE__ */ S(
|
|
213
|
-
e && /* @__PURE__ */ t(
|
|
212
|
+
return k ? /* @__PURE__ */ S(j, { width: "100%", gap: 1, children: [
|
|
213
|
+
e && /* @__PURE__ */ t(le, { children: e }),
|
|
214
214
|
s.length > 0 ? /* @__PURE__ */ t(kt, { component: ee, variant: "outlined", sx: { borderRadius: 1, mb: 1 }, children: /* @__PURE__ */ S(
|
|
215
215
|
He,
|
|
216
216
|
{
|
|
@@ -229,48 +229,48 @@ function Ir({
|
|
|
229
229
|
borderCollapse: "collapse"
|
|
230
230
|
},
|
|
231
231
|
children: [
|
|
232
|
-
/* @__PURE__ */ t(Ye, { sx: { display: "none" }, children: /* @__PURE__ */ t(
|
|
232
|
+
/* @__PURE__ */ t(Ye, { sx: { display: "none" }, children: /* @__PURE__ */ t(ne, { children: O.map((h) => /* @__PURE__ */ t(
|
|
233
233
|
se,
|
|
234
234
|
{
|
|
235
|
-
width:
|
|
236
|
-
align:
|
|
235
|
+
width: h.width,
|
|
236
|
+
align: h.align || "left",
|
|
237
237
|
sx: { fontWeight: "bold" },
|
|
238
|
-
children:
|
|
238
|
+
children: h.renderHeader ? h.renderHeader() : h.headerName
|
|
239
239
|
},
|
|
240
|
-
|
|
240
|
+
h.field
|
|
241
241
|
)) }) }),
|
|
242
|
-
/* @__PURE__ */ t(
|
|
243
|
-
|
|
242
|
+
/* @__PURE__ */ t(Ge, { children: s.map((h, I, z) => /* @__PURE__ */ t(
|
|
243
|
+
ne,
|
|
244
244
|
{
|
|
245
245
|
sx: {
|
|
246
|
-
borderBottom: I <
|
|
246
|
+
borderBottom: I < z.length - 1 ? "1px solid" : "none",
|
|
247
247
|
borderColor: "divider",
|
|
248
248
|
"&:hover": {
|
|
249
249
|
backgroundColor: "action.hover"
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
|
-
children: O.map((
|
|
252
|
+
children: O.map((N) => /* @__PURE__ */ t(
|
|
253
253
|
se,
|
|
254
254
|
{
|
|
255
|
-
width:
|
|
256
|
-
align:
|
|
255
|
+
width: N.width,
|
|
256
|
+
align: N.align || "left",
|
|
257
257
|
sx: {
|
|
258
258
|
borderBottom: "none"
|
|
259
259
|
},
|
|
260
|
-
children:
|
|
261
|
-
row:
|
|
260
|
+
children: N.renderCell({
|
|
261
|
+
row: h,
|
|
262
262
|
index: I,
|
|
263
|
-
onChange: (E) =>
|
|
263
|
+
onChange: (E) => v(I, E)
|
|
264
264
|
})
|
|
265
265
|
},
|
|
266
|
-
`${I}-${
|
|
266
|
+
`${I}-${N.field}`
|
|
267
267
|
))
|
|
268
268
|
},
|
|
269
269
|
I
|
|
270
270
|
)) })
|
|
271
271
|
]
|
|
272
272
|
}
|
|
273
|
-
) }) : /* @__PURE__ */ t(Z, { style: { fontSize: 12, height:
|
|
273
|
+
) }) : /* @__PURE__ */ t(Z, { style: { fontSize: 12, height: m }, children: f("maker.properties.arrayEmpty") }),
|
|
274
274
|
/* @__PURE__ */ t(
|
|
275
275
|
T,
|
|
276
276
|
{
|
|
@@ -279,55 +279,55 @@ function Ir({
|
|
|
279
279
|
variant: "outlined",
|
|
280
280
|
disabled: i,
|
|
281
281
|
startIcon: /* @__PURE__ */ t(vt, {}),
|
|
282
|
-
onClick:
|
|
283
|
-
children:
|
|
282
|
+
onClick: d,
|
|
283
|
+
children: f("maker.properties.addArrayItem")
|
|
284
284
|
}
|
|
285
285
|
)
|
|
286
|
-
] }) : /* @__PURE__ */ S(
|
|
287
|
-
e && /* @__PURE__ */ t(
|
|
288
|
-
/* @__PURE__ */ t(
|
|
286
|
+
] }) : /* @__PURE__ */ S(j, { width: "100%", gap: 1, children: [
|
|
287
|
+
e && /* @__PURE__ */ t(le, { children: e }),
|
|
288
|
+
/* @__PURE__ */ t(R, { sx: { border: 1, borderColor: "divider", borderRadius: 1, minHeight: 150 }, children: /* @__PURE__ */ t(
|
|
289
289
|
we,
|
|
290
290
|
{
|
|
291
|
-
keyId:
|
|
292
|
-
locale:
|
|
291
|
+
keyId: c.id,
|
|
292
|
+
locale: w,
|
|
293
293
|
language: "json",
|
|
294
294
|
value: JSON.stringify(s, null, 2),
|
|
295
|
-
onChange: (
|
|
295
|
+
onChange: (h) => y(h || "")
|
|
296
296
|
},
|
|
297
|
-
|
|
297
|
+
c.id
|
|
298
298
|
) })
|
|
299
299
|
] });
|
|
300
300
|
}
|
|
301
301
|
Wt[300], Bt[300], Kt[300], // deepPurple['300'],
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
Ht[300], Yt[300],
|
|
302
|
+
$t[300], _t[300], // lightBlue['300'],
|
|
303
|
+
Ft[300], Jt[300], Mt[300], // lightGreen['300'],
|
|
304
|
+
Ht[300], Yt[300], Gt[300], Lt[300], // deepOrange['300'],
|
|
305
305
|
qt[300], Qt[300], Xt[300];
|
|
306
|
-
const Sr = tt(function({ showMarkdown: r, markdown: o, onMarkdownChange: i, showUploader: u, value:
|
|
307
|
-
const [
|
|
306
|
+
const Sr = tt(function({ showMarkdown: r, markdown: o, onMarkdownChange: i, showUploader: u, value: m, meta: c, onChange: b, ...g }, f) {
|
|
307
|
+
const [w, p] = J("");
|
|
308
308
|
M(() => {
|
|
309
|
-
|
|
310
|
-
}, [
|
|
311
|
-
const
|
|
312
|
-
if (
|
|
313
|
-
const
|
|
314
|
-
if (!
|
|
315
|
-
|
|
309
|
+
p(m || "");
|
|
310
|
+
}, [m, p]);
|
|
311
|
+
const l = async () => {
|
|
312
|
+
if (w !== m) {
|
|
313
|
+
const n = oe(w);
|
|
314
|
+
if (!n) {
|
|
315
|
+
b(w, void 0);
|
|
316
316
|
return;
|
|
317
317
|
}
|
|
318
|
-
const
|
|
318
|
+
const d = await fe(n).catch(() => he(n)).catch(() => {
|
|
319
319
|
});
|
|
320
|
-
|
|
320
|
+
b(w, { ...d, filename: w });
|
|
321
321
|
}
|
|
322
322
|
};
|
|
323
|
-
|
|
323
|
+
Ct(
|
|
324
324
|
() => {
|
|
325
|
-
|
|
325
|
+
w !== m && b(w);
|
|
326
326
|
},
|
|
327
327
|
300,
|
|
328
|
-
[
|
|
329
|
-
), rt(
|
|
330
|
-
submit:
|
|
328
|
+
[w]
|
|
329
|
+
), rt(f, () => ({
|
|
330
|
+
submit: l
|
|
331
331
|
}));
|
|
332
332
|
const s = {};
|
|
333
333
|
return u && (s.InputProps = {
|
|
@@ -335,81 +335,97 @@ const Sr = tt(function({ showMarkdown: r, markdown: o, onMarkdownChange: i, show
|
|
|
335
335
|
endAdornment: /* @__PURE__ */ t(pe, { position: "end", sx: { mx: 0.5 }, children: /* @__PURE__ */ t(
|
|
336
336
|
Pe,
|
|
337
337
|
{
|
|
338
|
-
onChange: async ({ response:
|
|
339
|
-
var
|
|
340
|
-
const
|
|
338
|
+
onChange: async ({ response: n }) => {
|
|
339
|
+
var a;
|
|
340
|
+
const d = (a = n == null ? void 0 : n.data) == null ? void 0 : a.filename, y = oe(d) || "";
|
|
341
341
|
let P = {};
|
|
342
|
-
|
|
343
|
-
})),
|
|
342
|
+
y && (P = await fe(y).catch(() => he(y)).catch(() => {
|
|
343
|
+
})), b(d, {
|
|
344
344
|
...P,
|
|
345
|
-
filename:
|
|
345
|
+
filename: d
|
|
346
346
|
});
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
) })
|
|
350
350
|
}), /* @__PURE__ */ t(
|
|
351
|
-
|
|
351
|
+
C,
|
|
352
352
|
{
|
|
353
353
|
size: "small",
|
|
354
354
|
fullWidth: !0,
|
|
355
|
-
...
|
|
356
|
-
label: /* @__PURE__ */ S(
|
|
357
|
-
|
|
355
|
+
...g,
|
|
356
|
+
label: /* @__PURE__ */ S(j, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
357
|
+
g.label,
|
|
358
358
|
r && /* @__PURE__ */ S(H, { children: [
|
|
359
359
|
" (",
|
|
360
360
|
/* @__PURE__ */ t(
|
|
361
|
-
|
|
361
|
+
Le,
|
|
362
362
|
{
|
|
363
363
|
checked: o,
|
|
364
|
-
label: /* @__PURE__ */ t(
|
|
364
|
+
label: /* @__PURE__ */ t(R, { component: er, icon: "tabler:markdown", sx: { verticalAlign: "middle" } }),
|
|
365
365
|
labelPlacement: "start",
|
|
366
366
|
control: /* @__PURE__ */ t(qe, { size: "small" }),
|
|
367
367
|
sx: { ml: 0.25, pr: 1 },
|
|
368
|
-
onChange: (
|
|
368
|
+
onChange: (n, d) => i == null ? void 0 : i(d)
|
|
369
369
|
}
|
|
370
370
|
),
|
|
371
371
|
")"
|
|
372
372
|
] })
|
|
373
373
|
] }),
|
|
374
|
-
InputLabelProps: { shrink: !0, ...
|
|
375
|
-
value:
|
|
376
|
-
onChange: (
|
|
374
|
+
InputLabelProps: { shrink: !0, ...g.InputLabelProps },
|
|
375
|
+
value: w,
|
|
376
|
+
onChange: (n) => p(n.target.value),
|
|
377
377
|
...s,
|
|
378
|
-
onKeyDown: (
|
|
379
|
-
|
|
378
|
+
onKeyDown: (n) => {
|
|
379
|
+
n.keyCode !== 229 && n.key === "Enter" && l();
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
);
|
|
383
|
-
}), Or =
|
|
384
|
-
function
|
|
383
|
+
}), Or = jt(() => import("react-best-gradient-color-picker")), Rr = 0, jr = 100;
|
|
384
|
+
function zr(e) {
|
|
385
385
|
try {
|
|
386
386
|
const o = We.parse(e).map((u) => {
|
|
387
|
-
const
|
|
388
|
-
|
|
389
|
-
|
|
387
|
+
const m = u.colorStops.map((c, b) => {
|
|
388
|
+
let { value: g } = c;
|
|
389
|
+
if (typeof g != "string" && !Array.isArray(g))
|
|
390
|
+
throw new Error("Invalid color stop value type");
|
|
391
|
+
let { type: f } = c;
|
|
392
|
+
if (f !== "rgba") {
|
|
393
|
+
const l = Ut(g).toRgb();
|
|
394
|
+
g = [`${l.r}`, `${l.g}`, `${l.b}`, `${l.a}`], f = "rgba";
|
|
395
|
+
}
|
|
396
|
+
if (c.length)
|
|
390
397
|
return {
|
|
391
|
-
...
|
|
392
|
-
value:
|
|
393
|
-
type:
|
|
398
|
+
...c,
|
|
399
|
+
value: g,
|
|
400
|
+
type: f
|
|
394
401
|
};
|
|
395
|
-
|
|
396
|
-
|
|
402
|
+
const w = u.colorStops.length;
|
|
403
|
+
let p;
|
|
404
|
+
return b === 0 ? p = Rr : b === w - 1 ? p = jr : p = b / (w - 1) * 100, {
|
|
405
|
+
...c,
|
|
406
|
+
value: g,
|
|
407
|
+
type: f,
|
|
408
|
+
length: {
|
|
409
|
+
value: `${p}`,
|
|
410
|
+
type: "%"
|
|
411
|
+
}
|
|
412
|
+
};
|
|
397
413
|
});
|
|
398
414
|
return {
|
|
399
415
|
...u,
|
|
400
|
-
colorStops:
|
|
416
|
+
colorStops: m
|
|
401
417
|
};
|
|
402
418
|
});
|
|
403
|
-
return We.stringify(o);
|
|
419
|
+
return We.stringify(o).replace(/NaN/g, "100");
|
|
404
420
|
} catch {
|
|
405
|
-
return
|
|
421
|
+
return Je(e) ? `${e}`.replace(/NaN/g, "100") : "";
|
|
406
422
|
}
|
|
407
423
|
}
|
|
408
|
-
function
|
|
409
|
-
|
|
424
|
+
function Nr({ color: e, sx: r = {}, ...o }) {
|
|
425
|
+
Je(e);
|
|
410
426
|
const i = {};
|
|
411
|
-
return
|
|
412
|
-
|
|
427
|
+
return Fe(e) ? i.backgroundImage = e : i.backgroundColor = e, /* @__PURE__ */ t(
|
|
428
|
+
R,
|
|
413
429
|
{
|
|
414
430
|
sx: {
|
|
415
431
|
...r,
|
|
@@ -428,35 +444,47 @@ function zr({ color: e, sx: r = {}, ...o }) {
|
|
|
428
444
|
}
|
|
429
445
|
);
|
|
430
446
|
}
|
|
431
|
-
const
|
|
447
|
+
const Cr = tt(function({ onSave: r }, o) {
|
|
432
448
|
const i = Tt({
|
|
433
449
|
value: ""
|
|
434
|
-
}), { t: u } =
|
|
435
|
-
i.value ?
|
|
436
|
-
const [
|
|
437
|
-
|
|
438
|
-
}, [
|
|
439
|
-
r({ value: i.value },
|
|
450
|
+
}), { t: u } = D(), m = {};
|
|
451
|
+
i.value ? Fe(i.value) ? m.backgroundImage = i.value : m.backgroundColor = i.value : m.border = "1px solid #ccc";
|
|
452
|
+
const [c, { setFalse: b, setTrue: g }] = Vt(!1), f = A(() => {
|
|
453
|
+
b();
|
|
454
|
+
}, [b]), w = () => {
|
|
455
|
+
r({ value: i.value }, f);
|
|
440
456
|
};
|
|
441
457
|
return rt(o, () => ({
|
|
442
|
-
open({ value:
|
|
443
|
-
i.value =
|
|
458
|
+
open({ value: p } = { value: "" }) {
|
|
459
|
+
i.value = zr(p), g();
|
|
444
460
|
},
|
|
445
461
|
close() {
|
|
446
|
-
|
|
462
|
+
f();
|
|
447
463
|
}
|
|
448
|
-
})), /* @__PURE__ */ S(ke, { open:
|
|
464
|
+
})), /* @__PURE__ */ S(ke, { disableEnforceFocus: !0, open: c, onClose: f, hideBackdrop: !0, children: [
|
|
449
465
|
/* @__PURE__ */ t(Qe, { children: u("maker.configBackground") }),
|
|
450
|
-
/* @__PURE__ */ t(Xe, { sx: { width: 600 }, children: /* @__PURE__ */ S(
|
|
451
|
-
/* @__PURE__ */ t(
|
|
452
|
-
|
|
466
|
+
/* @__PURE__ */ t(Xe, { sx: { width: 600 }, children: /* @__PURE__ */ S(R, { width: "100%", display: "flex", children: [
|
|
467
|
+
/* @__PURE__ */ t(
|
|
468
|
+
R,
|
|
469
|
+
{
|
|
470
|
+
flex: 1,
|
|
471
|
+
mr: 1,
|
|
472
|
+
sx: {
|
|
473
|
+
...m,
|
|
474
|
+
borderRadius: 0.5
|
|
475
|
+
},
|
|
476
|
+
children: !i.value && /* @__PURE__ */ t(Z, { children: u("error.notConfig") })
|
|
477
|
+
}
|
|
478
|
+
),
|
|
479
|
+
/* @__PURE__ */ t(zt, { children: /* @__PURE__ */ t(
|
|
453
480
|
Or,
|
|
454
481
|
{
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
482
|
+
disableDarkMode: !0,
|
|
483
|
+
width: 240,
|
|
484
|
+
height: 240,
|
|
485
|
+
value: i.value,
|
|
486
|
+
onChange: (p) => {
|
|
487
|
+
i.value = p;
|
|
460
488
|
},
|
|
461
489
|
hidePresets: !0,
|
|
462
490
|
hideAdvancedSliders: !0,
|
|
@@ -466,12 +494,12 @@ const Rr = tt(function({ onSave: r }, o) {
|
|
|
466
494
|
) })
|
|
467
495
|
] }) }),
|
|
468
496
|
/* @__PURE__ */ S(Ze, { children: [
|
|
469
|
-
/* @__PURE__ */ t(T, { variant: "outlined", size: "small", onClick:
|
|
470
|
-
/* @__PURE__ */ t(T, { variant: "contained", size: "small", onClick:
|
|
497
|
+
/* @__PURE__ */ t(T, { variant: "outlined", size: "small", onClick: f, children: u("common.cancel") }),
|
|
498
|
+
/* @__PURE__ */ t(T, { variant: "contained", size: "small", onClick: w, children: u("maker.save") })
|
|
471
499
|
] })
|
|
472
500
|
] });
|
|
473
501
|
});
|
|
474
|
-
|
|
502
|
+
Dt(R)`
|
|
475
503
|
.color-item {
|
|
476
504
|
position: relative;
|
|
477
505
|
}
|
|
@@ -492,12 +520,12 @@ Nt(j)`
|
|
|
492
520
|
right: 0;
|
|
493
521
|
}
|
|
494
522
|
`;
|
|
495
|
-
function
|
|
523
|
+
function Dr({
|
|
496
524
|
value: e,
|
|
497
525
|
onChange: r,
|
|
498
526
|
...o
|
|
499
527
|
}) {
|
|
500
|
-
const i =
|
|
528
|
+
const i = $(null);
|
|
501
529
|
return /* @__PURE__ */ S(H, { children: [
|
|
502
530
|
/* @__PURE__ */ t(
|
|
503
531
|
Sr,
|
|
@@ -507,7 +535,7 @@ function Cr({
|
|
|
507
535
|
onChange: r,
|
|
508
536
|
InputProps: {
|
|
509
537
|
endAdornment: /* @__PURE__ */ t(pe, { position: "end", children: /* @__PURE__ */ t(
|
|
510
|
-
|
|
538
|
+
Nr,
|
|
511
539
|
{
|
|
512
540
|
color: e ?? "",
|
|
513
541
|
style: { width: "1.5rem", height: "1.5rem", padding: 0 },
|
|
@@ -521,43 +549,43 @@ function Cr({
|
|
|
521
549
|
}
|
|
522
550
|
),
|
|
523
551
|
/* @__PURE__ */ t(
|
|
524
|
-
|
|
552
|
+
Cr,
|
|
525
553
|
{
|
|
526
554
|
ref: i,
|
|
527
|
-
onSave: ({ value: u },
|
|
528
|
-
r(u),
|
|
555
|
+
onSave: ({ value: u }, m) => {
|
|
556
|
+
r(u), m();
|
|
529
557
|
}
|
|
530
558
|
}
|
|
531
559
|
)
|
|
532
560
|
] });
|
|
533
561
|
}
|
|
534
|
-
function
|
|
562
|
+
function Ar({
|
|
535
563
|
label: e,
|
|
536
564
|
value: r,
|
|
537
565
|
onChange: o,
|
|
538
566
|
property: i,
|
|
539
567
|
component: u,
|
|
540
|
-
defaultLocale:
|
|
541
|
-
allComponents:
|
|
542
|
-
PropertyValueField:
|
|
543
|
-
onUpload:
|
|
568
|
+
defaultLocale: m,
|
|
569
|
+
allComponents: c,
|
|
570
|
+
PropertyValueField: b,
|
|
571
|
+
onUpload: g
|
|
544
572
|
}) {
|
|
545
|
-
const { locale:
|
|
573
|
+
const { locale: f } = D(), w = $(null);
|
|
546
574
|
if (!ot(i.subProperties)) {
|
|
547
|
-
const
|
|
575
|
+
const l = V(Object.values(i.subProperties || {}), "index").filter(
|
|
548
576
|
(s) => s.data.visible !== !1 && s.data.key
|
|
549
577
|
);
|
|
550
|
-
return /* @__PURE__ */ S(
|
|
551
|
-
/* @__PURE__ */ t(
|
|
552
|
-
/* @__PURE__ */ t(
|
|
553
|
-
const { data:
|
|
554
|
-
let
|
|
578
|
+
return /* @__PURE__ */ S(j, { width: "100%", children: [
|
|
579
|
+
/* @__PURE__ */ t(le, { sx: { px: 0.25, py: 0.5 }, children: e }),
|
|
580
|
+
/* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(R, { sx: { position: "relative" }, children: l.map((s, n) => {
|
|
581
|
+
const { data: d } = s, y = d.key ?? d.id, P = n === l.length - 1;
|
|
582
|
+
let a = null;
|
|
555
583
|
try {
|
|
556
|
-
r && typeof r == "object" ?
|
|
584
|
+
r && typeof r == "object" ? a = r[y] : typeof r == "string" && (a = (i.type === "yaml" ? be.parse(r || "") : JSON.parse(r || "{}"))[y]);
|
|
557
585
|
} catch {
|
|
558
586
|
}
|
|
559
|
-
|
|
560
|
-
const
|
|
587
|
+
a == null && (d.locales && f && d.locales[f] ? a = d.locales[f].defaultValue : d.locales && m && d.locales[m] && (a = d.locales[m].defaultValue));
|
|
588
|
+
const x = (k) => {
|
|
561
589
|
try {
|
|
562
590
|
let O = {};
|
|
563
591
|
if (typeof r == "string")
|
|
@@ -566,15 +594,15 @@ function Dr({
|
|
|
566
594
|
} catch {
|
|
567
595
|
}
|
|
568
596
|
else typeof r == "object" && r !== null && (O = { ...r });
|
|
569
|
-
|
|
570
|
-
const
|
|
571
|
-
o == null || o(
|
|
597
|
+
lt(O, y, k);
|
|
598
|
+
const h = ge(O, i.type);
|
|
599
|
+
o == null || o(h);
|
|
572
600
|
} catch (O) {
|
|
573
601
|
console.error("Error updating property:", O);
|
|
574
602
|
}
|
|
575
|
-
},
|
|
603
|
+
}, v = 8;
|
|
576
604
|
return /* @__PURE__ */ S(
|
|
577
|
-
|
|
605
|
+
R,
|
|
578
606
|
{
|
|
579
607
|
sx: {
|
|
580
608
|
mb: P ? 0 : 1,
|
|
@@ -584,7 +612,7 @@ function Dr({
|
|
|
584
612
|
},
|
|
585
613
|
children: [
|
|
586
614
|
/* @__PURE__ */ S(
|
|
587
|
-
|
|
615
|
+
R,
|
|
588
616
|
{
|
|
589
617
|
sx: {
|
|
590
618
|
position: "relative",
|
|
@@ -593,11 +621,11 @@ function Dr({
|
|
|
593
621
|
},
|
|
594
622
|
children: [
|
|
595
623
|
/* @__PURE__ */ t(
|
|
596
|
-
|
|
624
|
+
R,
|
|
597
625
|
{
|
|
598
626
|
sx: {
|
|
599
627
|
position: "absolute",
|
|
600
|
-
left:
|
|
628
|
+
left: v,
|
|
601
629
|
top: 0,
|
|
602
630
|
height: 16,
|
|
603
631
|
// 连接到字段中点的高度
|
|
@@ -608,11 +636,11 @@ function Dr({
|
|
|
608
636
|
}
|
|
609
637
|
),
|
|
610
638
|
/* @__PURE__ */ t(
|
|
611
|
-
|
|
639
|
+
R,
|
|
612
640
|
{
|
|
613
641
|
sx: {
|
|
614
642
|
position: "absolute",
|
|
615
|
-
left:
|
|
643
|
+
left: v,
|
|
616
644
|
top: 16,
|
|
617
645
|
// 连接到字段中点
|
|
618
646
|
width: 12,
|
|
@@ -623,11 +651,11 @@ function Dr({
|
|
|
623
651
|
}
|
|
624
652
|
),
|
|
625
653
|
!P && /* @__PURE__ */ t(
|
|
626
|
-
|
|
654
|
+
R,
|
|
627
655
|
{
|
|
628
656
|
sx: {
|
|
629
657
|
position: "absolute",
|
|
630
|
-
left:
|
|
658
|
+
left: v,
|
|
631
659
|
top: 16,
|
|
632
660
|
// 从当前项中点
|
|
633
661
|
bottom: -8,
|
|
@@ -641,28 +669,28 @@ function Dr({
|
|
|
641
669
|
]
|
|
642
670
|
}
|
|
643
671
|
),
|
|
644
|
-
/* @__PURE__ */ t(
|
|
645
|
-
|
|
672
|
+
/* @__PURE__ */ t(R, { sx: { flexGrow: 1 }, children: /* @__PURE__ */ t(
|
|
673
|
+
b,
|
|
646
674
|
{
|
|
647
675
|
component: u,
|
|
648
|
-
property:
|
|
649
|
-
value:
|
|
650
|
-
onChange:
|
|
676
|
+
property: d,
|
|
677
|
+
value: a,
|
|
678
|
+
onChange: x,
|
|
651
679
|
size: "small",
|
|
652
680
|
fullWidth: !0,
|
|
653
|
-
defaultLocale:
|
|
654
|
-
allComponents:
|
|
681
|
+
defaultLocale: m,
|
|
682
|
+
allComponents: c
|
|
655
683
|
}
|
|
656
684
|
) })
|
|
657
685
|
]
|
|
658
686
|
},
|
|
659
|
-
|
|
687
|
+
d.id
|
|
660
688
|
);
|
|
661
689
|
}) }) })
|
|
662
690
|
] });
|
|
663
691
|
}
|
|
664
|
-
return /* @__PURE__ */ t(
|
|
665
|
-
|
|
692
|
+
return /* @__PURE__ */ t(j, { width: "100%", gap: 2, children: /* @__PURE__ */ S(
|
|
693
|
+
j,
|
|
666
694
|
{
|
|
667
695
|
sx: {
|
|
668
696
|
width: "100%",
|
|
@@ -675,7 +703,7 @@ function Dr({
|
|
|
675
703
|
},
|
|
676
704
|
children: [
|
|
677
705
|
/* @__PURE__ */ t(
|
|
678
|
-
|
|
706
|
+
le,
|
|
679
707
|
{
|
|
680
708
|
sx: {
|
|
681
709
|
position: "absolute",
|
|
@@ -690,20 +718,20 @@ function Dr({
|
|
|
690
718
|
we,
|
|
691
719
|
{
|
|
692
720
|
keyId: i.id,
|
|
693
|
-
locale:
|
|
721
|
+
locale: f,
|
|
694
722
|
language: i.type === "yaml" ? "yaml" : "json",
|
|
695
723
|
value: typeof r == "string" ? r : "",
|
|
696
|
-
onChange: (
|
|
697
|
-
o == null || o(
|
|
724
|
+
onChange: (l) => {
|
|
725
|
+
o == null || o(l);
|
|
698
726
|
},
|
|
699
|
-
onUpload: (
|
|
700
|
-
|
|
727
|
+
onUpload: (l) => {
|
|
728
|
+
w.current = l, g && g(l);
|
|
701
729
|
}
|
|
702
730
|
},
|
|
703
731
|
i.id
|
|
704
732
|
),
|
|
705
733
|
/* @__PURE__ */ t(
|
|
706
|
-
|
|
734
|
+
R,
|
|
707
735
|
{
|
|
708
736
|
component: "fieldset",
|
|
709
737
|
sx: {
|
|
@@ -719,16 +747,16 @@ function Dr({
|
|
|
719
747
|
px: 1,
|
|
720
748
|
py: 0
|
|
721
749
|
},
|
|
722
|
-
children: /* @__PURE__ */ t(
|
|
750
|
+
children: /* @__PURE__ */ t(R, { component: "legend", sx: { fontSize: "0.75em" }, children: /* @__PURE__ */ t(R, { component: "span", sx: { opacity: 0 }, children: e }) })
|
|
723
751
|
}
|
|
724
752
|
)
|
|
725
753
|
]
|
|
726
754
|
}
|
|
727
755
|
) });
|
|
728
756
|
}
|
|
729
|
-
const
|
|
730
|
-
function
|
|
731
|
-
return e.type ? !
|
|
757
|
+
const Tr = ["string", "multiline", "json", "yaml", "url", "component", "custom"];
|
|
758
|
+
function $e(e) {
|
|
759
|
+
return e.type ? !Tr.includes(e.type) : !1;
|
|
732
760
|
}
|
|
733
761
|
function mt({
|
|
734
762
|
disabled: e,
|
|
@@ -736,119 +764,119 @@ function mt({
|
|
|
736
764
|
renderItem: o,
|
|
737
765
|
...i
|
|
738
766
|
}) {
|
|
739
|
-
const u =
|
|
767
|
+
const u = $(null), m = Nt(), c = Et(), b = V(Object.entries(r), (s) => s[1].index).map((s) => s[0]), g = $(b), f = A(
|
|
740
768
|
(s) => {
|
|
741
|
-
|
|
769
|
+
g.current = s, c();
|
|
742
770
|
},
|
|
743
|
-
[
|
|
744
|
-
),
|
|
745
|
-
({ index: s }, { index:
|
|
746
|
-
const
|
|
747
|
-
|
|
771
|
+
[c]
|
|
772
|
+
), w = A(
|
|
773
|
+
({ index: s }, { index: n }) => {
|
|
774
|
+
const d = [...g.current];
|
|
775
|
+
d.splice(n, 0, ...d.splice(s, 1)), f(d);
|
|
748
776
|
},
|
|
749
|
-
[
|
|
777
|
+
[f]
|
|
750
778
|
);
|
|
751
779
|
M(() => {
|
|
752
|
-
|
|
753
|
-
}, [
|
|
754
|
-
const [{ isOver:
|
|
755
|
-
accept:
|
|
780
|
+
f(b);
|
|
781
|
+
}, [b.join("-")]);
|
|
782
|
+
const [{ isOver: p }, l] = pt({
|
|
783
|
+
accept: m,
|
|
756
784
|
collect: (s) => ({
|
|
757
785
|
isOver: s.isOver()
|
|
758
786
|
}),
|
|
759
787
|
canDrop: () => !e,
|
|
760
788
|
drop: () => {
|
|
761
|
-
var
|
|
789
|
+
var d;
|
|
762
790
|
const s = () => {
|
|
763
|
-
|
|
764
|
-
const
|
|
765
|
-
|
|
791
|
+
g.current.forEach((y, P) => {
|
|
792
|
+
const a = r[y];
|
|
793
|
+
a && (a.index = P);
|
|
766
794
|
});
|
|
767
|
-
},
|
|
768
|
-
|
|
795
|
+
}, n = (d = te(r)) == null ? void 0 : d.doc;
|
|
796
|
+
n ? n.transact(() => {
|
|
769
797
|
s();
|
|
770
798
|
}) : s();
|
|
771
799
|
}
|
|
772
800
|
});
|
|
773
801
|
return M(() => {
|
|
774
|
-
|
|
775
|
-
}, [
|
|
776
|
-
|
|
802
|
+
p || f(b);
|
|
803
|
+
}, [p]), l(u), /* @__PURE__ */ t(R, { ...i, ref: u, className: At(p && "isDragging"), children: g.current.map((s, n) => /* @__PURE__ */ t(
|
|
804
|
+
Vr,
|
|
777
805
|
{
|
|
778
|
-
type:
|
|
806
|
+
type: m,
|
|
779
807
|
disabled: e,
|
|
780
808
|
id: s,
|
|
781
|
-
index:
|
|
782
|
-
itemIndex: (
|
|
783
|
-
move:
|
|
784
|
-
children: (
|
|
785
|
-
const
|
|
786
|
-
return
|
|
809
|
+
index: n,
|
|
810
|
+
itemIndex: (d) => g.current.indexOf(d),
|
|
811
|
+
move: w,
|
|
812
|
+
children: (d) => {
|
|
813
|
+
const y = r[s];
|
|
814
|
+
return y ? o(y.data, n, d) : null;
|
|
787
815
|
}
|
|
788
816
|
},
|
|
789
817
|
s
|
|
790
818
|
)) });
|
|
791
819
|
}
|
|
792
|
-
function
|
|
820
|
+
function Vr({
|
|
793
821
|
disabled: e,
|
|
794
822
|
id: r,
|
|
795
823
|
index: o,
|
|
796
824
|
type: i,
|
|
797
825
|
children: u,
|
|
798
|
-
itemIndex:
|
|
799
|
-
move:
|
|
826
|
+
itemIndex: m,
|
|
827
|
+
move: c
|
|
800
828
|
}) {
|
|
801
|
-
const
|
|
829
|
+
const b = $(), [{ isDragging: g }, f, w] = xr({
|
|
802
830
|
type: i,
|
|
803
831
|
item: () => ({ id: r }),
|
|
804
832
|
canDrag: () => !e,
|
|
805
|
-
collect: (
|
|
806
|
-
}), [,
|
|
833
|
+
collect: (l) => ({ isDragging: l.isDragging() })
|
|
834
|
+
}), [, p] = pt({
|
|
807
835
|
accept: i,
|
|
808
836
|
canDrop: () => !e,
|
|
809
|
-
hover(
|
|
810
|
-
var
|
|
811
|
-
if (!
|
|
837
|
+
hover(l, s) {
|
|
838
|
+
var v;
|
|
839
|
+
if (!b.current)
|
|
812
840
|
return;
|
|
813
|
-
const
|
|
814
|
-
if (
|
|
841
|
+
const n = m(l.id), d = o;
|
|
842
|
+
if (n === d)
|
|
815
843
|
return;
|
|
816
|
-
const
|
|
817
|
-
|
|
844
|
+
const y = (v = b.current) == null ? void 0 : v.getBoundingClientRect(), P = (y.bottom - y.top) / 2, x = s.getClientOffset().y - y.top;
|
|
845
|
+
n < d && x < P || n > d && x > P || c({ id: l.id, index: n }, { id: r, index: o });
|
|
818
846
|
}
|
|
819
847
|
});
|
|
820
848
|
return typeof u == "function" ? u({
|
|
821
|
-
isDragging:
|
|
822
|
-
drag:
|
|
823
|
-
drop: (
|
|
824
|
-
preview:
|
|
825
|
-
}) : (
|
|
849
|
+
isDragging: g,
|
|
850
|
+
drag: f,
|
|
851
|
+
drop: (l) => (b.current = l, p(l)),
|
|
852
|
+
preview: w
|
|
853
|
+
}) : (f(p(w(b))), /* @__PURE__ */ t(R, { ref: b, children: u }));
|
|
826
854
|
}
|
|
827
|
-
function
|
|
855
|
+
function Er({
|
|
828
856
|
drop: e,
|
|
829
857
|
preview: r,
|
|
830
858
|
drag: o,
|
|
831
859
|
disabled: i,
|
|
832
860
|
isDragging: u,
|
|
833
|
-
children:
|
|
834
|
-
onDelete:
|
|
835
|
-
onVisibilityChange:
|
|
836
|
-
visible:
|
|
837
|
-
actions:
|
|
838
|
-
alwaysShowActions:
|
|
861
|
+
children: m,
|
|
862
|
+
onDelete: c,
|
|
863
|
+
onVisibilityChange: b,
|
|
864
|
+
visible: g = !0,
|
|
865
|
+
actions: f,
|
|
866
|
+
alwaysShowActions: w = !1
|
|
839
867
|
}) {
|
|
840
|
-
const { t:
|
|
868
|
+
const { t: p } = D();
|
|
841
869
|
return /* @__PURE__ */ t(
|
|
842
|
-
|
|
870
|
+
R,
|
|
843
871
|
{
|
|
844
872
|
ref: e,
|
|
845
873
|
sx: {
|
|
846
874
|
":hover .hover-visible": { maxWidth: "100%" },
|
|
847
|
-
opacity:
|
|
875
|
+
opacity: g ? 1 : 0.5
|
|
848
876
|
},
|
|
849
|
-
children: /* @__PURE__ */ S(
|
|
877
|
+
children: /* @__PURE__ */ S(R, { sx: { position: "relative" }, children: [
|
|
850
878
|
/* @__PURE__ */ t(
|
|
851
|
-
|
|
879
|
+
R,
|
|
852
880
|
{
|
|
853
881
|
ref: r,
|
|
854
882
|
sx: {
|
|
@@ -858,15 +886,15 @@ function Tr({
|
|
|
858
886
|
opacity: 0.9999
|
|
859
887
|
// NOTE: make preview effective
|
|
860
888
|
},
|
|
861
|
-
children:
|
|
889
|
+
children: m
|
|
862
890
|
}
|
|
863
891
|
),
|
|
864
892
|
!i && /* @__PURE__ */ t(
|
|
865
|
-
|
|
893
|
+
R,
|
|
866
894
|
{
|
|
867
|
-
className:
|
|
895
|
+
className: w ? "" : "hover-visible",
|
|
868
896
|
sx: {
|
|
869
|
-
maxWidth:
|
|
897
|
+
maxWidth: w ? "100%" : 0,
|
|
870
898
|
overflow: "hidden",
|
|
871
899
|
position: "absolute",
|
|
872
900
|
right: 2,
|
|
@@ -874,11 +902,11 @@ function Tr({
|
|
|
874
902
|
transition: "max-width 0.3s ease-in-out"
|
|
875
903
|
},
|
|
876
904
|
children: /* @__PURE__ */ S(
|
|
877
|
-
|
|
905
|
+
j,
|
|
878
906
|
{
|
|
879
907
|
direction: "row",
|
|
880
908
|
sx: {
|
|
881
|
-
bgcolor: (
|
|
909
|
+
bgcolor: (l) => Pt(l.palette.grey[200], 0.9),
|
|
882
910
|
borderRadius: 1,
|
|
883
911
|
p: 0.5,
|
|
884
912
|
[`.${It.root}`]: {
|
|
@@ -889,10 +917,10 @@ function Tr({
|
|
|
889
917
|
}
|
|
890
918
|
},
|
|
891
919
|
children: [
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
/* @__PURE__ */ t(X, { title:
|
|
920
|
+
f,
|
|
921
|
+
b && /* @__PURE__ */ t(X, { title: p(g ? "hideParameter" : "showParameter"), disableInteractive: !0, placement: "top", children: /* @__PURE__ */ t(T, { onClick: () => b(!g), children: g ? /* @__PURE__ */ t(nr, { sx: { fontSize: "1.25rem", color: "grey.500" } }) : /* @__PURE__ */ t(sr, { sx: { fontSize: "1.25rem", color: "grey.500" } }) }) }),
|
|
922
|
+
c && /* @__PURE__ */ t(X, { title: p("delete"), disableInteractive: !0, placement: "top", children: /* @__PURE__ */ t(T, { onClick: c, children: /* @__PURE__ */ t(cr, { sx: { fontSize: "1.25rem", color: "grey.500" } }) }) }),
|
|
923
|
+
/* @__PURE__ */ t(X, { title: p("dragSort"), disableInteractive: !0, placement: "top", children: /* @__PURE__ */ t(T, { ref: o, children: /* @__PURE__ */ t(ar, { sx: { color: "grey.500" } }) }) })
|
|
896
924
|
]
|
|
897
925
|
}
|
|
898
926
|
)
|
|
@@ -902,28 +930,28 @@ function Tr({
|
|
|
902
930
|
}
|
|
903
931
|
);
|
|
904
932
|
}
|
|
905
|
-
function
|
|
933
|
+
function Ur({
|
|
906
934
|
label: e,
|
|
907
935
|
value: r,
|
|
908
936
|
onChange: o
|
|
909
937
|
}) {
|
|
910
|
-
const [i, u] =
|
|
911
|
-
return /* @__PURE__ */ S(
|
|
938
|
+
const [i, u] = J(!1);
|
|
939
|
+
return /* @__PURE__ */ S(j, { gap: 1, children: [
|
|
912
940
|
/* @__PURE__ */ t(
|
|
913
|
-
|
|
941
|
+
C,
|
|
914
942
|
{
|
|
915
943
|
label: e,
|
|
916
944
|
size: "small",
|
|
917
945
|
value: r,
|
|
918
|
-
onChange: (
|
|
946
|
+
onChange: (m) => o == null ? void 0 : o(m.target.value),
|
|
919
947
|
InputProps: {
|
|
920
948
|
endAdornment: /* @__PURE__ */ t(
|
|
921
949
|
Pe,
|
|
922
950
|
{
|
|
923
|
-
onChange: ({ response:
|
|
924
|
-
var
|
|
925
|
-
const
|
|
926
|
-
|
|
951
|
+
onChange: ({ response: m }) => {
|
|
952
|
+
var b;
|
|
953
|
+
const c = (b = m == null ? void 0 : m.data) == null ? void 0 : b.filename;
|
|
954
|
+
c && (o == null || o(c));
|
|
927
955
|
}
|
|
928
956
|
}
|
|
929
957
|
)
|
|
@@ -931,7 +959,7 @@ function Vr({
|
|
|
931
959
|
}
|
|
932
960
|
),
|
|
933
961
|
r && /* @__PURE__ */ t(
|
|
934
|
-
|
|
962
|
+
R,
|
|
935
963
|
{
|
|
936
964
|
component: "img",
|
|
937
965
|
sx: { objectFit: "contain", borderRadius: 1, cursor: "pointer" },
|
|
@@ -943,20 +971,20 @@ function Vr({
|
|
|
943
971
|
onClick: () => u(!0)
|
|
944
972
|
}
|
|
945
973
|
),
|
|
946
|
-
/* @__PURE__ */ t(ke, { open: i, onClose: () => u(!1), children: /* @__PURE__ */ t(
|
|
974
|
+
/* @__PURE__ */ t(ke, { open: i, onClose: () => u(!1), children: /* @__PURE__ */ t(R, { component: "img", sx: { objectFit: "contain" }, src: oe(r), alt: e }) })
|
|
947
975
|
] });
|
|
948
976
|
}
|
|
949
977
|
function ye(e, r = "") {
|
|
950
978
|
return yr(
|
|
951
979
|
e,
|
|
952
980
|
(o, i, u) => {
|
|
953
|
-
const
|
|
954
|
-
return mr(i) ? ur(o, ye(i,
|
|
981
|
+
const m = r ? `${r}.${u}` : u;
|
|
982
|
+
return mr(i) ? ur(o, ye(i, m)) : o[m] = i, o;
|
|
955
983
|
},
|
|
956
984
|
{}
|
|
957
985
|
);
|
|
958
986
|
}
|
|
959
|
-
const
|
|
987
|
+
const Wr = [
|
|
960
988
|
{ value: "string", label: "Text" },
|
|
961
989
|
{ value: "multiline", label: "Text (Multiline)" },
|
|
962
990
|
{ value: "number", label: "Number" },
|
|
@@ -977,51 +1005,51 @@ function ve(e, r) {
|
|
|
977
1005
|
var o;
|
|
978
1006
|
return !e || !r ? !1 : ((o = e[r]) == null ? void 0 : o.data.visible) ?? !0;
|
|
979
1007
|
}
|
|
980
|
-
function
|
|
1008
|
+
function Bi({ componentId: e }) {
|
|
981
1009
|
const {
|
|
982
1010
|
state: { components: r }
|
|
983
|
-
} =
|
|
984
|
-
return i ? /* @__PURE__ */ t(
|
|
1011
|
+
} = de(), o = r[e], i = o == null ? void 0 : o.data;
|
|
1012
|
+
return i ? /* @__PURE__ */ t(j, { maxHeight: "100%", overflow: "auto", children: /* @__PURE__ */ t(R, { p: 2, children: /* @__PURE__ */ t(gr, { FallbackComponent: yt, resetKeys: [e], children: /* @__PURE__ */ t(Br, { value: i }) }) }) }) : null;
|
|
985
1013
|
}
|
|
986
|
-
function
|
|
987
|
-
var
|
|
988
|
-
const { t: r } =
|
|
1014
|
+
function Br({ value: e }) {
|
|
1015
|
+
var g, f, w;
|
|
1016
|
+
const { t: r } = D(), {
|
|
989
1017
|
localState: { currentLocale: o, componentDebugProps: i },
|
|
990
1018
|
state: {
|
|
991
1019
|
config: { defaultLocale: u }
|
|
992
1020
|
},
|
|
993
|
-
localActions: { setComponentDebugProps:
|
|
994
|
-
} =
|
|
995
|
-
return /* @__PURE__ */ t(
|
|
996
|
-
/* @__PURE__ */ t(
|
|
1021
|
+
localActions: { setComponentDebugProps: m }
|
|
1022
|
+
} = de(), c = te(e).doc, b = xe();
|
|
1023
|
+
return /* @__PURE__ */ t(j, { height: "100%", children: /* @__PURE__ */ S(j, { gap: 2, children: [
|
|
1024
|
+
/* @__PURE__ */ t(Kr, { config: e }),
|
|
997
1025
|
/* @__PURE__ */ t(
|
|
998
|
-
|
|
1026
|
+
_r,
|
|
999
1027
|
{
|
|
1000
1028
|
config: e,
|
|
1001
1029
|
currentLocale: o,
|
|
1002
1030
|
defaultLocale: u,
|
|
1003
|
-
allComponents:
|
|
1004
|
-
onUpdateConfig: (
|
|
1005
|
-
|
|
1006
|
-
|
|
1031
|
+
allComponents: b,
|
|
1032
|
+
onUpdateConfig: (p) => {
|
|
1033
|
+
c.transact(() => {
|
|
1034
|
+
p(e);
|
|
1007
1035
|
});
|
|
1008
1036
|
}
|
|
1009
1037
|
}
|
|
1010
1038
|
),
|
|
1011
|
-
/* @__PURE__ */ S(
|
|
1012
|
-
/* @__PURE__ */ t(
|
|
1039
|
+
/* @__PURE__ */ S(j, { gap: 2, direction: "row", justifyContent: "space-between", alignItems: "center", children: [
|
|
1040
|
+
/* @__PURE__ */ t(F, { variant: "subtitle1", children: r("renderer") }),
|
|
1013
1041
|
/* @__PURE__ */ S(
|
|
1014
|
-
|
|
1042
|
+
C,
|
|
1015
1043
|
{
|
|
1016
1044
|
hiddenLabel: !0,
|
|
1017
1045
|
size: "small",
|
|
1018
1046
|
select: !0,
|
|
1019
1047
|
SelectProps: { autoWidth: !0 },
|
|
1020
|
-
value: ((
|
|
1021
|
-
onChange: (
|
|
1022
|
-
|
|
1023
|
-
const
|
|
1024
|
-
e.renderer ?? (e.renderer = { type:
|
|
1048
|
+
value: ((g = e.renderer) == null ? void 0 : g.type) || "react-component",
|
|
1049
|
+
onChange: (p) => {
|
|
1050
|
+
c.transact(() => {
|
|
1051
|
+
const l = p.target.value;
|
|
1052
|
+
e.renderer ?? (e.renderer = { type: l }), e.renderer.type = l;
|
|
1025
1053
|
});
|
|
1026
1054
|
},
|
|
1027
1055
|
children: [
|
|
@@ -1031,17 +1059,18 @@ function Ur({ value: e }) {
|
|
|
1031
1059
|
}
|
|
1032
1060
|
)
|
|
1033
1061
|
] }),
|
|
1034
|
-
((
|
|
1062
|
+
((f = e.renderer) == null ? void 0 : f.type) === "component" && /* @__PURE__ */ t(qr, { value: e }),
|
|
1063
|
+
((w = e.renderer) == null ? void 0 : w.type) === "react-component" && /* @__PURE__ */ t(Lr, { value: e }),
|
|
1035
1064
|
/* @__PURE__ */ t(
|
|
1036
1065
|
bt,
|
|
1037
1066
|
{
|
|
1038
1067
|
config: e,
|
|
1039
1068
|
currentLocale: o,
|
|
1040
1069
|
defaultLocale: u,
|
|
1041
|
-
allComponents:
|
|
1042
|
-
onChange: ({ key:
|
|
1043
|
-
|
|
1044
|
-
[
|
|
1070
|
+
allComponents: b,
|
|
1071
|
+
onChange: ({ key: p, value: l }) => {
|
|
1072
|
+
m({
|
|
1073
|
+
[p]: l.value
|
|
1045
1074
|
});
|
|
1046
1075
|
},
|
|
1047
1076
|
props: {
|
|
@@ -1051,12 +1080,12 @@ function Ur({ value: e }) {
|
|
|
1051
1080
|
)
|
|
1052
1081
|
] }) });
|
|
1053
1082
|
}
|
|
1054
|
-
function
|
|
1055
|
-
const { t: r } =
|
|
1056
|
-
return /* @__PURE__ */ t(Ie, { children: /* @__PURE__ */ S(
|
|
1057
|
-
/* @__PURE__ */ t(
|
|
1083
|
+
function Kr({ config: e }) {
|
|
1084
|
+
const { t: r } = D();
|
|
1085
|
+
return /* @__PURE__ */ t(Ie, { children: /* @__PURE__ */ S(j, { gap: 2, children: [
|
|
1086
|
+
/* @__PURE__ */ t(F, { variant: "subtitle1", children: r("basicInfo") }),
|
|
1058
1087
|
/* @__PURE__ */ t(
|
|
1059
|
-
|
|
1088
|
+
C,
|
|
1060
1089
|
{
|
|
1061
1090
|
label: r("name"),
|
|
1062
1091
|
size: "small",
|
|
@@ -1065,7 +1094,7 @@ function Wr({ config: e }) {
|
|
|
1065
1094
|
}
|
|
1066
1095
|
),
|
|
1067
1096
|
/* @__PURE__ */ t(
|
|
1068
|
-
|
|
1097
|
+
C,
|
|
1069
1098
|
{
|
|
1070
1099
|
label: r("description"),
|
|
1071
1100
|
size: "small",
|
|
@@ -1086,11 +1115,11 @@ function Wr({ config: e }) {
|
|
|
1086
1115
|
freeSolo: !0,
|
|
1087
1116
|
value: e.tags ?? [],
|
|
1088
1117
|
onChange: (o, i) => e.tags = i,
|
|
1089
|
-
renderInput: (o) => /* @__PURE__ */ t(
|
|
1118
|
+
renderInput: (o) => /* @__PURE__ */ t(C, { label: r("tags"), ...o })
|
|
1090
1119
|
}
|
|
1091
1120
|
),
|
|
1092
1121
|
/* @__PURE__ */ t(
|
|
1093
|
-
|
|
1122
|
+
Ur,
|
|
1094
1123
|
{
|
|
1095
1124
|
label: r("previewImage"),
|
|
1096
1125
|
value: e.previewImage || "",
|
|
@@ -1105,42 +1134,42 @@ function ft({
|
|
|
1105
1134
|
visible: o,
|
|
1106
1135
|
config: i,
|
|
1107
1136
|
currentLocale: u,
|
|
1108
|
-
defaultLocale:
|
|
1109
|
-
allComponents:
|
|
1110
|
-
onUpdateConfig:
|
|
1137
|
+
defaultLocale: m,
|
|
1138
|
+
allComponents: c,
|
|
1139
|
+
onUpdateConfig: b
|
|
1111
1140
|
}) {
|
|
1112
|
-
var
|
|
1113
|
-
const { t:
|
|
1141
|
+
var w, p, l, s, n, d;
|
|
1142
|
+
const { t: g } = D(), f = ce(() => e.type === "json" || e.type === "yaml" || e.type === "array" ? Mr : _, [e.type]);
|
|
1114
1143
|
return /* @__PURE__ */ t(
|
|
1115
|
-
|
|
1144
|
+
Er,
|
|
1116
1145
|
{
|
|
1117
1146
|
preview: r.preview,
|
|
1118
1147
|
drop: r.drop,
|
|
1119
1148
|
drag: r.drag,
|
|
1120
1149
|
isDragging: r.isDragging,
|
|
1121
1150
|
onDelete: () => {
|
|
1122
|
-
|
|
1123
|
-
if (
|
|
1124
|
-
const
|
|
1125
|
-
delete
|
|
1126
|
-
|
|
1151
|
+
b((y) => {
|
|
1152
|
+
if (y.properties) {
|
|
1153
|
+
const a = Object.entries(y.properties).sort(([, v], [, k]) => v.index - k.index);
|
|
1154
|
+
delete y.properties[e.id], a.filter(([v]) => v !== e.id).forEach(([, v], k) => {
|
|
1155
|
+
v.index = k;
|
|
1127
1156
|
});
|
|
1128
1157
|
}
|
|
1129
1158
|
});
|
|
1130
1159
|
},
|
|
1131
1160
|
visible: o,
|
|
1132
|
-
onVisibilityChange: (
|
|
1133
|
-
|
|
1134
|
-
const
|
|
1135
|
-
|
|
1161
|
+
onVisibilityChange: (y) => {
|
|
1162
|
+
b((P) => {
|
|
1163
|
+
const a = P.properties[e.id].data;
|
|
1164
|
+
a.visible = y;
|
|
1136
1165
|
});
|
|
1137
1166
|
},
|
|
1138
1167
|
alwaysShowActions: !0,
|
|
1139
|
-
children: /* @__PURE__ */ S(
|
|
1168
|
+
children: /* @__PURE__ */ S(j, { direction: "column", gap: 2, children: [
|
|
1140
1169
|
/* @__PURE__ */ t(
|
|
1141
|
-
|
|
1170
|
+
C,
|
|
1142
1171
|
{
|
|
1143
|
-
label:
|
|
1172
|
+
label: g("key"),
|
|
1144
1173
|
size: "small",
|
|
1145
1174
|
required: !0,
|
|
1146
1175
|
sx: {
|
|
@@ -1157,10 +1186,10 @@ function ft({
|
|
|
1157
1186
|
}
|
|
1158
1187
|
},
|
|
1159
1188
|
value: e.key || "",
|
|
1160
|
-
onChange: (
|
|
1161
|
-
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1189
|
+
onChange: (y) => {
|
|
1190
|
+
b((P) => {
|
|
1191
|
+
const a = P.properties[e.id].data;
|
|
1192
|
+
a.key = y.target.value.trim();
|
|
1164
1193
|
});
|
|
1165
1194
|
},
|
|
1166
1195
|
InputProps: {
|
|
@@ -1172,8 +1201,8 @@ function ft({
|
|
|
1172
1201
|
width: 16,
|
|
1173
1202
|
ml: 0
|
|
1174
1203
|
},
|
|
1175
|
-
children: /* @__PURE__ */ t(X, { title: e.key ?
|
|
1176
|
-
|
|
1204
|
+
children: /* @__PURE__ */ t(X, { title: e.key ? g("duplicateKey") : g("requiredKey"), children: /* @__PURE__ */ t(
|
|
1205
|
+
at,
|
|
1177
1206
|
{
|
|
1178
1207
|
sx: {
|
|
1179
1208
|
color: e.key ? "warning.main" : "error.main",
|
|
@@ -1186,115 +1215,115 @@ function ft({
|
|
|
1186
1215
|
}
|
|
1187
1216
|
}
|
|
1188
1217
|
),
|
|
1189
|
-
/* @__PURE__ */ S(
|
|
1218
|
+
/* @__PURE__ */ S(j, { direction: "row", gap: 1, children: [
|
|
1190
1219
|
/* @__PURE__ */ t(
|
|
1191
|
-
|
|
1220
|
+
C,
|
|
1192
1221
|
{
|
|
1193
|
-
label:
|
|
1222
|
+
label: g("label"),
|
|
1194
1223
|
size: "small",
|
|
1195
1224
|
sx: { flex: 1 },
|
|
1196
|
-
value: (((
|
|
1197
|
-
onChange: (
|
|
1198
|
-
|
|
1199
|
-
var
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1225
|
+
value: (((p = (w = e.locales) == null ? void 0 : w[u]) == null ? void 0 : p.name) ?? ((s = (l = e.locales) == null ? void 0 : l[m]) == null ? void 0 : s.name)) || "",
|
|
1226
|
+
onChange: (y) => {
|
|
1227
|
+
b((P) => {
|
|
1228
|
+
var x;
|
|
1229
|
+
const a = P.properties[e.id].data;
|
|
1230
|
+
a.locales ?? (a.locales = {}), (x = a.locales)[u] ?? (x[u] = {}), a.locales[u].name = y.target.value;
|
|
1202
1231
|
});
|
|
1203
1232
|
}
|
|
1204
1233
|
}
|
|
1205
1234
|
),
|
|
1206
1235
|
/* @__PURE__ */ t(
|
|
1207
|
-
|
|
1236
|
+
C,
|
|
1208
1237
|
{
|
|
1209
|
-
label:
|
|
1238
|
+
label: g("type"),
|
|
1210
1239
|
size: "small",
|
|
1211
1240
|
select: !0,
|
|
1212
1241
|
sx: { flex: 1 },
|
|
1213
1242
|
value: e.type === "string" && e.multiline ? "multiline" : e.type || "string",
|
|
1214
|
-
onChange: (
|
|
1215
|
-
|
|
1216
|
-
const
|
|
1217
|
-
if (
|
|
1218
|
-
for (const
|
|
1219
|
-
|
|
1220
|
-
const
|
|
1221
|
-
|
|
1243
|
+
onChange: (y) => {
|
|
1244
|
+
b((P) => {
|
|
1245
|
+
const a = P.properties[e.id].data;
|
|
1246
|
+
if (a.locales)
|
|
1247
|
+
for (const v of Object.keys(a.locales))
|
|
1248
|
+
a.locales[v].defaultValue = void 0;
|
|
1249
|
+
const x = y.target.value;
|
|
1250
|
+
x === "multiline" ? (a.type = "string", a.multiline = !0) : (typeof a.multiline < "u" && delete a.multiline, a.type = x);
|
|
1222
1251
|
});
|
|
1223
1252
|
},
|
|
1224
|
-
children:
|
|
1253
|
+
children: Wr.map((y) => /* @__PURE__ */ t(me, { value: y.value, children: y.label }, y.value))
|
|
1225
1254
|
}
|
|
1226
1255
|
)
|
|
1227
1256
|
] }),
|
|
1228
|
-
/* @__PURE__ */ S(
|
|
1257
|
+
/* @__PURE__ */ S(j, { direction: "row", gap: 1, children: [
|
|
1229
1258
|
/* @__PURE__ */ t(
|
|
1230
|
-
|
|
1259
|
+
f,
|
|
1231
1260
|
{
|
|
1232
|
-
allComponents:
|
|
1233
|
-
defaultLocale:
|
|
1261
|
+
allComponents: c,
|
|
1262
|
+
defaultLocale: m,
|
|
1234
1263
|
component: i,
|
|
1235
1264
|
property: e,
|
|
1236
|
-
label:
|
|
1265
|
+
label: g("defaultValue"),
|
|
1237
1266
|
size: "small",
|
|
1238
1267
|
fullWidth: !0,
|
|
1239
|
-
value: (
|
|
1240
|
-
onChange: (
|
|
1241
|
-
|
|
1242
|
-
var
|
|
1243
|
-
const
|
|
1268
|
+
value: (d = (n = e.locales) == null ? void 0 : n[u]) == null ? void 0 : d.defaultValue,
|
|
1269
|
+
onChange: (y, P) => {
|
|
1270
|
+
b((a) => {
|
|
1271
|
+
var v;
|
|
1272
|
+
const x = a.properties[e.id].data;
|
|
1244
1273
|
if (P != null && P.forceUpdateProperty) {
|
|
1245
|
-
const k = ye(
|
|
1246
|
-
Object.keys(O).forEach((
|
|
1247
|
-
k[
|
|
1274
|
+
const k = ye(x), O = ye(y);
|
|
1275
|
+
Object.keys(O).forEach((h) => {
|
|
1276
|
+
k[h] || lt(x, h, O[h]);
|
|
1248
1277
|
});
|
|
1249
1278
|
} else
|
|
1250
|
-
|
|
1279
|
+
x.locales ?? (x.locales = {}), (v = x.locales)[u] ?? (v[u] = {}), x.locales[u].defaultValue = y;
|
|
1251
1280
|
});
|
|
1252
1281
|
}
|
|
1253
1282
|
}
|
|
1254
1283
|
),
|
|
1255
|
-
e.type === "custom" ? /* @__PURE__ */ t(
|
|
1284
|
+
e.type === "custom" ? /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(Fr, { property: e, allComponents: c }) }) : null
|
|
1256
1285
|
] })
|
|
1257
1286
|
] })
|
|
1258
1287
|
}
|
|
1259
1288
|
);
|
|
1260
1289
|
}
|
|
1261
|
-
function
|
|
1262
|
-
const [o, i] =
|
|
1290
|
+
function $r(e, r) {
|
|
1291
|
+
const [o, i] = J(0);
|
|
1263
1292
|
return M(() => {
|
|
1264
|
-
const
|
|
1293
|
+
const m = setTimeout(() => {
|
|
1265
1294
|
if (e.current) {
|
|
1266
|
-
let
|
|
1267
|
-
for (;
|
|
1268
|
-
|
|
1269
|
-
i(
|
|
1295
|
+
let c = e.current.parentElement, b = 0;
|
|
1296
|
+
for (; c; )
|
|
1297
|
+
c.classList.contains("property-container") && b++, c = c.parentElement;
|
|
1298
|
+
i(b);
|
|
1270
1299
|
}
|
|
1271
1300
|
}, 100);
|
|
1272
|
-
return () => clearTimeout(
|
|
1301
|
+
return () => clearTimeout(m);
|
|
1273
1302
|
}, [e, r]), o;
|
|
1274
1303
|
}
|
|
1275
|
-
function
|
|
1304
|
+
function _r({
|
|
1276
1305
|
config: e,
|
|
1277
1306
|
currentLocale: r,
|
|
1278
1307
|
defaultLocale: o,
|
|
1279
1308
|
allComponents: i,
|
|
1280
1309
|
onUpdateConfig: u,
|
|
1281
|
-
useI18nEditor:
|
|
1310
|
+
useI18nEditor: m = !0
|
|
1282
1311
|
}) {
|
|
1283
|
-
const { t:
|
|
1284
|
-
return /* @__PURE__ */ t(Ie, { children: /* @__PURE__ */ S(
|
|
1285
|
-
/* @__PURE__ */ S(
|
|
1286
|
-
/* @__PURE__ */ t(
|
|
1287
|
-
/* @__PURE__ */ t(
|
|
1288
|
-
|
|
1312
|
+
const { t: c } = D(), b = Se({ variant: "dialog" }), g = e.properties && V(Object.values(e.properties), "index");
|
|
1313
|
+
return /* @__PURE__ */ t(Ie, { children: /* @__PURE__ */ S(j, { gap: 2, children: [
|
|
1314
|
+
/* @__PURE__ */ S(j, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between", children: [
|
|
1315
|
+
/* @__PURE__ */ t(F, { variant: "subtitle1", children: c("properties") }),
|
|
1316
|
+
/* @__PURE__ */ t(R, { flex: 1 }),
|
|
1317
|
+
m && /* @__PURE__ */ t(T, { sx: { minWidth: 32, minHeight: 32, p: 0 }, ...Oe(b), children: /* @__PURE__ */ t(st, { fontSize: "small" }) })
|
|
1289
1318
|
] }),
|
|
1290
1319
|
e.properties && Object.keys(e.properties).length > 0 ? /* @__PURE__ */ t(
|
|
1291
1320
|
mt,
|
|
1292
1321
|
{
|
|
1293
|
-
component:
|
|
1322
|
+
component: j,
|
|
1294
1323
|
gap: 2,
|
|
1295
1324
|
list: e.properties,
|
|
1296
|
-
renderItem: (
|
|
1297
|
-
const
|
|
1325
|
+
renderItem: (f, w, p) => {
|
|
1326
|
+
const l = ve(e.properties, f.id);
|
|
1298
1327
|
return /* @__PURE__ */ t(
|
|
1299
1328
|
ee,
|
|
1300
1329
|
{
|
|
@@ -1303,15 +1332,15 @@ function Kr({
|
|
|
1303
1332
|
sx: {
|
|
1304
1333
|
p: 1.25,
|
|
1305
1334
|
borderRadius: 1,
|
|
1306
|
-
border:
|
|
1335
|
+
border: l ? "1px solid" : "1px dashed",
|
|
1307
1336
|
borderColor: "divider"
|
|
1308
1337
|
},
|
|
1309
|
-
children: /* @__PURE__ */ t(
|
|
1338
|
+
children: /* @__PURE__ */ t(j, { gap: 2, children: /* @__PURE__ */ t(
|
|
1310
1339
|
ft,
|
|
1311
1340
|
{
|
|
1312
|
-
data:
|
|
1313
|
-
params:
|
|
1314
|
-
visible:
|
|
1341
|
+
data: f,
|
|
1342
|
+
params: p,
|
|
1343
|
+
visible: l,
|
|
1315
1344
|
config: e,
|
|
1316
1345
|
currentLocale: r,
|
|
1317
1346
|
defaultLocale: o,
|
|
@@ -1320,11 +1349,11 @@ function Kr({
|
|
|
1320
1349
|
}
|
|
1321
1350
|
) })
|
|
1322
1351
|
},
|
|
1323
|
-
|
|
1352
|
+
f.id
|
|
1324
1353
|
);
|
|
1325
1354
|
}
|
|
1326
1355
|
}
|
|
1327
|
-
) : /* @__PURE__ */ t(Z, { style: { fontSize: 12 }, children:
|
|
1356
|
+
) : /* @__PURE__ */ t(Z, { style: { fontSize: 12 }, children: c("maker.properties.noProperties") }),
|
|
1328
1357
|
/* @__PURE__ */ t(
|
|
1329
1358
|
T,
|
|
1330
1359
|
{
|
|
@@ -1332,17 +1361,17 @@ function Kr({
|
|
|
1332
1361
|
variant: "outlined",
|
|
1333
1362
|
className: "ignore-style-override",
|
|
1334
1363
|
onClick: () => {
|
|
1335
|
-
u((
|
|
1336
|
-
var
|
|
1337
|
-
const
|
|
1338
|
-
|
|
1364
|
+
u((f) => {
|
|
1365
|
+
var p;
|
|
1366
|
+
const w = Me();
|
|
1367
|
+
f.properties ?? (f.properties = {}), (p = f.properties)[w] ?? (p[w] = { index: (g == null ? void 0 : g.length) || 0, data: { id: w } });
|
|
1339
1368
|
});
|
|
1340
1369
|
},
|
|
1341
1370
|
startIcon: /* @__PURE__ */ t(ct, {}),
|
|
1342
|
-
children:
|
|
1371
|
+
children: c("addObject", { object: c("property") })
|
|
1343
1372
|
}
|
|
1344
1373
|
),
|
|
1345
|
-
|
|
1374
|
+
m && /* @__PURE__ */ t(ht, { ...ut(b), component: e })
|
|
1346
1375
|
] }) });
|
|
1347
1376
|
}
|
|
1348
1377
|
function Fr({
|
|
@@ -1351,9 +1380,9 @@ function Fr({
|
|
|
1351
1380
|
}) {
|
|
1352
1381
|
const o = Se({ variant: "popper" });
|
|
1353
1382
|
return /* @__PURE__ */ S(H, { children: [
|
|
1354
|
-
/* @__PURE__ */ t(T, { sx: { minWidth: 0 }, ...Oe(o), children: /* @__PURE__ */ t(
|
|
1355
|
-
/* @__PURE__ */ t(
|
|
1356
|
-
|
|
1383
|
+
/* @__PURE__ */ t(T, { sx: { minWidth: 0 }, ...Oe(o), children: /* @__PURE__ */ t(dt, { fontSize: "small" }) }),
|
|
1384
|
+
/* @__PURE__ */ t(Rt, { ...vr(o), children: /* @__PURE__ */ t(lr, { onClickAway: o.close, children: /* @__PURE__ */ t(ee, { children: /* @__PURE__ */ t(R, { width: 500, p: 2, children: /* @__PURE__ */ t(
|
|
1385
|
+
Re,
|
|
1357
1386
|
{
|
|
1358
1387
|
value: e.componentId,
|
|
1359
1388
|
onChange: (i, u) => e.componentId = u,
|
|
@@ -1362,28 +1391,28 @@ function Fr({
|
|
|
1362
1391
|
) }) }) }) })
|
|
1363
1392
|
] });
|
|
1364
1393
|
}
|
|
1365
|
-
function
|
|
1394
|
+
function Jr({
|
|
1366
1395
|
value: e,
|
|
1367
1396
|
valueImmutable: r,
|
|
1368
1397
|
onChange: o,
|
|
1369
1398
|
defaultLocale: i,
|
|
1370
1399
|
allComponents: u
|
|
1371
1400
|
}) {
|
|
1372
|
-
var
|
|
1373
|
-
const [
|
|
1374
|
-
return
|
|
1401
|
+
var w;
|
|
1402
|
+
const [m, c] = J(!1), { t: b, locale: g } = D(), f = typeof (e == null ? void 0 : e.componentId) == "string" ? (w = u[e.componentId]) == null ? void 0 : w.data : void 0;
|
|
1403
|
+
return f ? /* @__PURE__ */ S(R, { sx: { width: "100%", position: "relative" }, children: [
|
|
1375
1404
|
/* @__PURE__ */ t(
|
|
1376
1405
|
ue,
|
|
1377
1406
|
{
|
|
1378
1407
|
sx: { minWidth: 0 },
|
|
1379
|
-
disabled: !
|
|
1408
|
+
disabled: !f,
|
|
1380
1409
|
size: "small",
|
|
1381
|
-
onClick: () =>
|
|
1382
|
-
color:
|
|
1383
|
-
children: /* @__PURE__ */ t(
|
|
1410
|
+
onClick: () => c(!m),
|
|
1411
|
+
color: m ? "primary" : "default",
|
|
1412
|
+
children: /* @__PURE__ */ t(dt, { fontSize: "small" })
|
|
1384
1413
|
}
|
|
1385
1414
|
),
|
|
1386
|
-
/* @__PURE__ */ t(St, { in:
|
|
1415
|
+
/* @__PURE__ */ t(St, { in: m, timeout: "auto", unmountOnExit: !0, sx: { width: "100%", zIndex: 10 }, children: /* @__PURE__ */ S(
|
|
1387
1416
|
ee,
|
|
1388
1417
|
{
|
|
1389
1418
|
elevation: 1,
|
|
@@ -1396,21 +1425,21 @@ function _r({
|
|
|
1396
1425
|
width: "100%"
|
|
1397
1426
|
},
|
|
1398
1427
|
children: [
|
|
1399
|
-
/* @__PURE__ */ t(
|
|
1428
|
+
/* @__PURE__ */ t(R, { width: "100%", mb: 2, children: /* @__PURE__ */ t(
|
|
1400
1429
|
bt,
|
|
1401
1430
|
{
|
|
1402
|
-
config:
|
|
1403
|
-
currentLocale:
|
|
1431
|
+
config: f,
|
|
1432
|
+
currentLocale: g,
|
|
1404
1433
|
defaultLocale: i,
|
|
1405
1434
|
allComponents: u,
|
|
1406
1435
|
propertiesValue: e == null ? void 0 : e.properties,
|
|
1407
|
-
onChange: ({ id:
|
|
1408
|
-
const s = tr(
|
|
1409
|
-
r ? o == null || o({ ...
|
|
1436
|
+
onChange: ({ id: p, value: l }) => {
|
|
1437
|
+
const s = tr(l.value), n = JSON.parse(JSON.stringify(e));
|
|
1438
|
+
r ? o == null || o({ ...n, properties: { ...n.properties, [p]: { value: s } } }) : (n.properties = n.properties ?? {}, n.properties[p] = { value: s }, o == null || o(n));
|
|
1410
1439
|
}
|
|
1411
1440
|
}
|
|
1412
1441
|
) }),
|
|
1413
|
-
/* @__PURE__ */ t(T, { size: "small", onClick: () =>
|
|
1442
|
+
/* @__PURE__ */ t(T, { size: "small", onClick: () => c(!1), sx: { mt: 1 }, children: b("close") })
|
|
1414
1443
|
]
|
|
1415
1444
|
}
|
|
1416
1445
|
) })
|
|
@@ -1421,97 +1450,97 @@ function ht({
|
|
|
1421
1450
|
component: r,
|
|
1422
1451
|
...o
|
|
1423
1452
|
}) {
|
|
1424
|
-
var
|
|
1425
|
-
const { t: i } =
|
|
1453
|
+
var p, l, s;
|
|
1454
|
+
const { t: i } = D(), {
|
|
1426
1455
|
state: {
|
|
1427
1456
|
components: u,
|
|
1428
|
-
supportedLocales:
|
|
1429
|
-
config: { defaultLocale:
|
|
1457
|
+
supportedLocales: m,
|
|
1458
|
+
config: { defaultLocale: c }
|
|
1430
1459
|
}
|
|
1431
|
-
} =
|
|
1460
|
+
} = de(), b = xe(), g = te(r).doc, f = e === "properties" ? r.properties : e === "parameters" && ((p = r.renderer) == null ? void 0 : p.type) === "component" ? (l = u[r.renderer.componentId]) == null ? void 0 : l.data.properties : void 0, w = ((s = r.renderer) == null ? void 0 : s.type) === "component" ? r : void 0;
|
|
1432
1461
|
return /* @__PURE__ */ S(ke, { ...o, fullWidth: !0, maxWidth: "lg", children: [
|
|
1433
1462
|
/* @__PURE__ */ t(Qe, { children: i("i18nEditorTitle") }),
|
|
1434
|
-
/* @__PURE__ */ t(Xe, { children:
|
|
1435
|
-
/* @__PURE__ */ t(Ye, { children: /* @__PURE__ */ t(
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
] },
|
|
1439
|
-
/* @__PURE__ */ t(
|
|
1440
|
-
var
|
|
1441
|
-
return /* @__PURE__ */ t(se, { children: /* @__PURE__ */ t(
|
|
1463
|
+
/* @__PURE__ */ t(Xe, { children: f && /* @__PURE__ */ t(j, { children: /* @__PURE__ */ S(He, { stickyHeader: !0, sx: { td: { verticalAlign: "top" } }, children: [
|
|
1464
|
+
/* @__PURE__ */ t(Ye, { children: /* @__PURE__ */ t(ne, { children: m.map(({ locale: n, name: d }) => /* @__PURE__ */ S(se, { children: [
|
|
1465
|
+
d,
|
|
1466
|
+
c === n && /* @__PURE__ */ t(dr, { sx: { fontSize: 12, color: "text.secondary" } })
|
|
1467
|
+
] }, n)) }) }),
|
|
1468
|
+
/* @__PURE__ */ t(Ge, { children: V(Object.values(f), "index").map(({ data: n }) => /* @__PURE__ */ t(ne, { children: m.map(({ locale: d }) => {
|
|
1469
|
+
var y, P, a, x, v, k, O, h, I, z, N, E, U, W, re, Y, G, L, q, Q, je, ze, Ne, Ce, De, Ae;
|
|
1470
|
+
return /* @__PURE__ */ t(se, { children: /* @__PURE__ */ t(j, { gap: 1, children: e === "properties" ? /* @__PURE__ */ S(H, { children: [
|
|
1442
1471
|
/* @__PURE__ */ t(
|
|
1443
|
-
|
|
1472
|
+
C,
|
|
1444
1473
|
{
|
|
1445
1474
|
size: "small",
|
|
1446
1475
|
label: "Key",
|
|
1447
|
-
value:
|
|
1476
|
+
value: n.key || "",
|
|
1448
1477
|
onChange: (K) => {
|
|
1449
|
-
|
|
1450
|
-
|
|
1478
|
+
g.transact(() => {
|
|
1479
|
+
n.key = K.target.value.trim();
|
|
1451
1480
|
});
|
|
1452
1481
|
}
|
|
1453
1482
|
}
|
|
1454
1483
|
),
|
|
1455
1484
|
/* @__PURE__ */ t(
|
|
1456
|
-
|
|
1485
|
+
C,
|
|
1457
1486
|
{
|
|
1458
1487
|
size: "small",
|
|
1459
1488
|
label: i("label"),
|
|
1460
|
-
value: (((P = (
|
|
1489
|
+
value: (((P = (y = n.locales) == null ? void 0 : y[d]) == null ? void 0 : P.name) ?? ((x = (a = n.locales) == null ? void 0 : a[c]) == null ? void 0 : x.name)) || "",
|
|
1461
1490
|
onChange: (K) => {
|
|
1462
|
-
|
|
1491
|
+
g.transact(() => {
|
|
1463
1492
|
var B;
|
|
1464
|
-
|
|
1493
|
+
n.locales ?? (n.locales = {}), (B = n.locales)[d] ?? (B[d] = {}), n.locales[d].name = K.target.value;
|
|
1465
1494
|
});
|
|
1466
1495
|
}
|
|
1467
1496
|
}
|
|
1468
1497
|
),
|
|
1469
|
-
/* @__PURE__ */ t(
|
|
1498
|
+
/* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(
|
|
1470
1499
|
_,
|
|
1471
1500
|
{
|
|
1472
|
-
allComponents:
|
|
1473
|
-
defaultLocale:
|
|
1501
|
+
allComponents: b,
|
|
1502
|
+
defaultLocale: c,
|
|
1474
1503
|
component: r,
|
|
1475
|
-
property:
|
|
1504
|
+
property: n,
|
|
1476
1505
|
size: "small",
|
|
1477
1506
|
fullWidth: !0,
|
|
1478
1507
|
label: "Default Value",
|
|
1479
|
-
valueImmutable:
|
|
1480
|
-
value: ((
|
|
1508
|
+
valueImmutable: ae((k = (v = n.locales) == null ? void 0 : v[d]) == null ? void 0 : k.defaultValue),
|
|
1509
|
+
value: ((h = (O = n.locales) == null ? void 0 : O[d]) == null ? void 0 : h.defaultValue) ?? ((z = (I = n.locales) == null ? void 0 : I[c]) == null ? void 0 : z.defaultValue),
|
|
1481
1510
|
onChange: (K) => {
|
|
1482
|
-
|
|
1511
|
+
g.transact(() => {
|
|
1483
1512
|
var B;
|
|
1484
|
-
|
|
1513
|
+
n.locales ?? (n.locales = {}), (B = n.locales)[d] ?? (B[d] = {}), n.locales[d].defaultValue = K;
|
|
1485
1514
|
});
|
|
1486
1515
|
}
|
|
1487
1516
|
}
|
|
1488
1517
|
) })
|
|
1489
|
-
] }) : e === "parameters" &&
|
|
1518
|
+
] }) : e === "parameters" && w ? /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(
|
|
1490
1519
|
_,
|
|
1491
1520
|
{
|
|
1492
|
-
allComponents:
|
|
1493
|
-
defaultLocale:
|
|
1521
|
+
allComponents: b,
|
|
1522
|
+
defaultLocale: c,
|
|
1494
1523
|
component: r,
|
|
1495
|
-
property:
|
|
1524
|
+
property: n,
|
|
1496
1525
|
size: "small",
|
|
1497
1526
|
fullWidth: !0,
|
|
1498
|
-
valueImmutable:
|
|
1499
|
-
(W = (U = (E = (
|
|
1527
|
+
valueImmutable: ae(
|
|
1528
|
+
(W = (U = (E = (N = w.renderer.properties) == null ? void 0 : N[n.id]) == null ? void 0 : E.locales) == null ? void 0 : U[d]) == null ? void 0 : W.value
|
|
1500
1529
|
),
|
|
1501
|
-
value: ((
|
|
1530
|
+
value: ((L = (G = (Y = (re = w.renderer.properties) == null ? void 0 : re[n.id]) == null ? void 0 : Y.locales) == null ? void 0 : G[d]) == null ? void 0 : L.value) ?? ((ze = (je = (Q = (q = w.renderer.properties) == null ? void 0 : q[n.id]) == null ? void 0 : Q.locales) == null ? void 0 : je[c]) == null ? void 0 : ze.value) ?? ((Ce = (Ne = n.locales) == null ? void 0 : Ne[d]) == null ? void 0 : Ce.defaultValue) ?? ((Ae = (De = n.locales) == null ? void 0 : De[c]) == null ? void 0 : Ae.defaultValue),
|
|
1502
1531
|
onChange: (K) => {
|
|
1503
|
-
|
|
1532
|
+
g.transact(() => {
|
|
1504
1533
|
var B, Te, Ve, Ee, Ue;
|
|
1505
|
-
(B =
|
|
1534
|
+
(B = w.renderer).properties ?? (B.properties = {}), (Te = w.renderer.properties)[Ve = n.id] ?? (Te[Ve] = {}), (Ee = w.renderer.properties[n.id]).locales ?? (Ee.locales = {}), (Ue = w.renderer.properties[n.id].locales)[d] ?? (Ue[d] = {}), w.renderer.properties[n.id].locales[d].value = K;
|
|
1506
1535
|
});
|
|
1507
1536
|
}
|
|
1508
1537
|
}
|
|
1509
|
-
) }) : null },
|
|
1510
|
-
}) },
|
|
1538
|
+
) }) : null }, n.id) }, d);
|
|
1539
|
+
}) }, n.id)) })
|
|
1511
1540
|
] }) }) }),
|
|
1512
|
-
/* @__PURE__ */ t(Ze, { children: /* @__PURE__ */ t(T, { onClick: (
|
|
1513
|
-
var
|
|
1514
|
-
return (
|
|
1541
|
+
/* @__PURE__ */ t(Ze, { children: /* @__PURE__ */ t(T, { onClick: (n) => {
|
|
1542
|
+
var d;
|
|
1543
|
+
return (d = o.onClose) == null ? void 0 : d.call(o, n, "escapeKeyDown");
|
|
1515
1544
|
}, children: i("close") }) })
|
|
1516
1545
|
] });
|
|
1517
1546
|
}
|
|
@@ -1522,62 +1551,62 @@ const _e = (e, r) => (o) => {
|
|
|
1522
1551
|
o.palette.secondary.main,
|
|
1523
1552
|
o.palette.success.main,
|
|
1524
1553
|
o.palette.warning.main
|
|
1525
|
-
], u = Math.min(i.length - 1, e),
|
|
1554
|
+
], u = Math.min(i.length - 1, e), m = i[u], c = Ke(m, 0.5), b = Ke(m, 1);
|
|
1526
1555
|
return {
|
|
1527
1556
|
// 保留原有的边框样式
|
|
1528
|
-
borderColor: `${
|
|
1557
|
+
borderColor: `${c} !important`,
|
|
1529
1558
|
borderLeft: "3px solid !important",
|
|
1530
1559
|
// 稍粗的左侧边框
|
|
1531
|
-
borderLeftColor:
|
|
1560
|
+
borderLeftColor: c,
|
|
1532
1561
|
// 使用透明度适应深色/浅色模式
|
|
1533
|
-
color:
|
|
1562
|
+
color: b,
|
|
1534
1563
|
...r
|
|
1535
1564
|
};
|
|
1536
1565
|
};
|
|
1537
|
-
function
|
|
1566
|
+
function Mr({
|
|
1538
1567
|
property: e,
|
|
1539
1568
|
onChange: r,
|
|
1540
1569
|
defaultLocale: o,
|
|
1541
1570
|
allComponents: i
|
|
1542
1571
|
}) {
|
|
1543
|
-
const { t: u, locale:
|
|
1572
|
+
const { t: u, locale: m } = D(), c = $(null), b = $r(c, e), g = A(() => {
|
|
1544
1573
|
if (!(e.type !== "json" && e.type !== "yaml" && e.type !== "array") && e.subProperties)
|
|
1545
1574
|
try {
|
|
1546
|
-
const
|
|
1575
|
+
const f = {};
|
|
1547
1576
|
V(Object.values(e.subProperties), "index").filter(
|
|
1548
|
-
(
|
|
1549
|
-
).forEach(({ data:
|
|
1550
|
-
var
|
|
1551
|
-
if (!
|
|
1552
|
-
let s = ((
|
|
1553
|
-
if (
|
|
1577
|
+
(l) => l.data.visible !== !1 && l.data.key
|
|
1578
|
+
).forEach(({ data: l }) => {
|
|
1579
|
+
var n, d, y, P;
|
|
1580
|
+
if (!l.key) return;
|
|
1581
|
+
let s = ((d = (n = l.locales) == null ? void 0 : n[m]) == null ? void 0 : d.defaultValue) ?? ((P = (y = l.locales) == null ? void 0 : y[o]) == null ? void 0 : P.defaultValue);
|
|
1582
|
+
if (l.type === "number")
|
|
1554
1583
|
s = Number(s);
|
|
1555
|
-
else if (
|
|
1584
|
+
else if (l.type === "boolean")
|
|
1556
1585
|
s = s === !0 || s === "true";
|
|
1557
|
-
else if ((
|
|
1586
|
+
else if ((l.type === "json" || l.type === "yaml") && typeof s == "string")
|
|
1558
1587
|
try {
|
|
1559
|
-
|
|
1560
|
-
} catch (
|
|
1561
|
-
console.error("Error parsing nested value", s,
|
|
1588
|
+
l.type === "json" ? s = JSON.parse(s) : s = be.parse(s);
|
|
1589
|
+
} catch (a) {
|
|
1590
|
+
console.error("Error parsing nested value", s, a), s = {};
|
|
1562
1591
|
}
|
|
1563
|
-
|
|
1592
|
+
f[l.key] = s;
|
|
1564
1593
|
});
|
|
1565
|
-
const
|
|
1566
|
-
r == null || r(
|
|
1567
|
-
} catch (
|
|
1568
|
-
console.error("Error converting structure to text:",
|
|
1594
|
+
const p = ge(f, e.type);
|
|
1595
|
+
r == null || r(p);
|
|
1596
|
+
} catch (f) {
|
|
1597
|
+
console.error("Error converting structure to text:", f);
|
|
1569
1598
|
}
|
|
1570
|
-
}, [e,
|
|
1571
|
-
return e.type !== "json" && e.type !== "yaml" && e.type !== "array" ? null : /* @__PURE__ */ S(
|
|
1572
|
-
/* @__PURE__ */ t(Ot, { sx: { mt: -1 }, children: /* @__PURE__ */ t(
|
|
1599
|
+
}, [e, m, o, r]);
|
|
1600
|
+
return e.type !== "json" && e.type !== "yaml" && e.type !== "array" ? null : /* @__PURE__ */ S(j, { direction: "column", gap: 1.5, sx: { width: "100%" }, ref: c, children: [
|
|
1601
|
+
/* @__PURE__ */ t(Ot, { sx: { mt: -1 }, children: /* @__PURE__ */ t(F, { variant: "caption", color: "text.secondary", children: u("maker.properties.subProperties") }) }),
|
|
1573
1602
|
e.subProperties && Object.keys(e.subProperties).length > 0 ? /* @__PURE__ */ t(
|
|
1574
1603
|
mt,
|
|
1575
1604
|
{
|
|
1576
|
-
component:
|
|
1605
|
+
component: j,
|
|
1577
1606
|
gap: 2,
|
|
1578
1607
|
list: e.subProperties,
|
|
1579
|
-
renderItem: (
|
|
1580
|
-
const
|
|
1608
|
+
renderItem: (f, w, p) => {
|
|
1609
|
+
const l = f.visible !== !1;
|
|
1581
1610
|
return /* @__PURE__ */ t(
|
|
1582
1611
|
ee,
|
|
1583
1612
|
{
|
|
@@ -1586,38 +1615,38 @@ function Jr({
|
|
|
1586
1615
|
sx: {
|
|
1587
1616
|
p: 1.25,
|
|
1588
1617
|
borderRadius: 1,
|
|
1589
|
-
border:
|
|
1590
|
-
"&": _e(
|
|
1618
|
+
border: l ? "1px solid" : "1px dashed",
|
|
1619
|
+
"&": _e(b)
|
|
1591
1620
|
},
|
|
1592
|
-
children: /* @__PURE__ */ t(
|
|
1621
|
+
children: /* @__PURE__ */ t(j, { gap: 2, children: /* @__PURE__ */ t(
|
|
1593
1622
|
ft,
|
|
1594
1623
|
{
|
|
1595
|
-
data:
|
|
1596
|
-
params:
|
|
1597
|
-
visible:
|
|
1624
|
+
data: f,
|
|
1625
|
+
params: p,
|
|
1626
|
+
visible: l,
|
|
1598
1627
|
config: {
|
|
1599
1628
|
properties: e.subProperties
|
|
1600
1629
|
},
|
|
1601
|
-
currentLocale:
|
|
1630
|
+
currentLocale: m,
|
|
1602
1631
|
defaultLocale: o,
|
|
1603
1632
|
allComponents: i,
|
|
1604
1633
|
onUpdateConfig: (s) => {
|
|
1605
1634
|
try {
|
|
1606
|
-
const
|
|
1607
|
-
s(
|
|
1608
|
-
const
|
|
1635
|
+
const n = { properties: e.subProperties || {} };
|
|
1636
|
+
s(n);
|
|
1637
|
+
const d = {
|
|
1609
1638
|
...e,
|
|
1610
|
-
subProperties:
|
|
1639
|
+
subProperties: n.properties
|
|
1611
1640
|
};
|
|
1612
|
-
r == null || r(
|
|
1613
|
-
} catch (
|
|
1614
|
-
console.error("Error updating property:",
|
|
1641
|
+
r == null || r(d, { forceUpdateProperty: !0 }), g();
|
|
1642
|
+
} catch (n) {
|
|
1643
|
+
console.error("Error updating property:", n);
|
|
1615
1644
|
}
|
|
1616
1645
|
}
|
|
1617
1646
|
}
|
|
1618
1647
|
) })
|
|
1619
1648
|
},
|
|
1620
|
-
|
|
1649
|
+
f.id
|
|
1621
1650
|
);
|
|
1622
1651
|
}
|
|
1623
1652
|
}
|
|
@@ -1632,15 +1661,15 @@ function Jr({
|
|
|
1632
1661
|
startIcon: /* @__PURE__ */ t(ct, {}),
|
|
1633
1662
|
onClick: () => {
|
|
1634
1663
|
try {
|
|
1635
|
-
const
|
|
1636
|
-
index: Object.values(
|
|
1664
|
+
const f = e.subProperties || {}, w = Me(), l = {
|
|
1665
|
+
index: Object.values(f).length,
|
|
1637
1666
|
data: {
|
|
1638
|
-
id:
|
|
1667
|
+
id: w,
|
|
1639
1668
|
key: "",
|
|
1640
1669
|
type: "string",
|
|
1641
1670
|
visible: !0,
|
|
1642
1671
|
locales: {
|
|
1643
|
-
[
|
|
1672
|
+
[m]: {
|
|
1644
1673
|
name: "",
|
|
1645
1674
|
defaultValue: ""
|
|
1646
1675
|
}
|
|
@@ -1651,17 +1680,17 @@ function Jr({
|
|
|
1651
1680
|
}, s = {
|
|
1652
1681
|
...e,
|
|
1653
1682
|
subProperties: {
|
|
1654
|
-
...
|
|
1655
|
-
[
|
|
1683
|
+
...f,
|
|
1684
|
+
[w]: l
|
|
1656
1685
|
}
|
|
1657
1686
|
};
|
|
1658
|
-
r == null || r(s, { forceUpdateProperty: !0 }),
|
|
1659
|
-
} catch (
|
|
1660
|
-
console.error("Error adding property:",
|
|
1687
|
+
r == null || r(s, { forceUpdateProperty: !0 }), g();
|
|
1688
|
+
} catch (f) {
|
|
1689
|
+
console.error("Error adding property:", f);
|
|
1661
1690
|
}
|
|
1662
1691
|
},
|
|
1663
1692
|
sx: {
|
|
1664
|
-
"&": _e(
|
|
1693
|
+
"&": _e(b, {
|
|
1665
1694
|
// borderLeft: undefined,
|
|
1666
1695
|
})
|
|
1667
1696
|
},
|
|
@@ -1676,48 +1705,48 @@ function _({
|
|
|
1676
1705
|
value: o,
|
|
1677
1706
|
onChange: i,
|
|
1678
1707
|
valueImmutable: u,
|
|
1679
|
-
defaultLocale:
|
|
1680
|
-
allComponents:
|
|
1681
|
-
...
|
|
1708
|
+
defaultLocale: m,
|
|
1709
|
+
allComponents: c,
|
|
1710
|
+
...b
|
|
1682
1711
|
}) {
|
|
1683
|
-
var s,
|
|
1684
|
-
const { locale:
|
|
1685
|
-
var
|
|
1686
|
-
const
|
|
1687
|
-
|
|
1688
|
-
var O,
|
|
1689
|
-
let k = ((O =
|
|
1690
|
-
k && (k = `mediakit://${k}`, o && !o.includes("mediakit://") && (k += " # please use < import { getMediaKitAbsoluteUrl } from '@blocklet/pages-kit/builtin/utils' > to get the full address")), (
|
|
1712
|
+
var s, n, d, y, P;
|
|
1713
|
+
const { locale: g } = D(), f = Zt(), w = $(null), p = () => {
|
|
1714
|
+
var x;
|
|
1715
|
+
const a = (x = f == null ? void 0 : f.current) == null ? void 0 : x.getUploader();
|
|
1716
|
+
a == null || a.open(), w.current && a.onceUploadSuccess(({ response: v }) => {
|
|
1717
|
+
var O, h;
|
|
1718
|
+
let k = ((O = v == null ? void 0 : v.data) == null ? void 0 : O.filename) || "";
|
|
1719
|
+
k && (k = `mediakit://${k}`, o && !o.includes("mediakit://") && (k += " # please use < import { getMediaKitAbsoluteUrl } from '@blocklet/pages-kit/builtin/utils' > to get the full address")), (h = w.current) == null || h.call(w, k);
|
|
1691
1720
|
});
|
|
1692
|
-
},
|
|
1721
|
+
}, l = b.label ?? (((n = (s = r.locales) == null ? void 0 : s[g]) == null ? void 0 : n.name) || ((y = (d = r.locales) == null ? void 0 : d[m]) == null ? void 0 : y.name) || r.key || r.id);
|
|
1693
1722
|
if (r.type === "number")
|
|
1694
1723
|
return /* @__PURE__ */ t(
|
|
1695
|
-
|
|
1724
|
+
Hr,
|
|
1696
1725
|
{
|
|
1697
|
-
...
|
|
1698
|
-
label:
|
|
1726
|
+
...b,
|
|
1727
|
+
label: l,
|
|
1699
1728
|
NumberProps: {
|
|
1700
1729
|
value: ["number", "string"].includes(typeof o) ? o : null,
|
|
1701
|
-
onChange: (
|
|
1730
|
+
onChange: (a, x) => i == null ? void 0 : i(x)
|
|
1702
1731
|
}
|
|
1703
1732
|
}
|
|
1704
1733
|
);
|
|
1705
1734
|
if (r.type === "decimal")
|
|
1706
1735
|
return /* @__PURE__ */ t(
|
|
1707
|
-
|
|
1736
|
+
C,
|
|
1708
1737
|
{
|
|
1709
|
-
...
|
|
1710
|
-
label:
|
|
1738
|
+
...b,
|
|
1739
|
+
label: l,
|
|
1711
1740
|
type: "text",
|
|
1712
1741
|
value: o ?? "",
|
|
1713
|
-
onChange: (
|
|
1714
|
-
const
|
|
1715
|
-
if (
|
|
1716
|
-
i == null || i(
|
|
1742
|
+
onChange: (a) => {
|
|
1743
|
+
const x = a.target.value;
|
|
1744
|
+
if (x === "" || x === "-") {
|
|
1745
|
+
i == null || i(x);
|
|
1717
1746
|
return;
|
|
1718
1747
|
}
|
|
1719
|
-
if (/^-?(?!.*\..*\.)[0-9]*(\.[0-9]{0,9})?$/.test(
|
|
1720
|
-
let k =
|
|
1748
|
+
if (/^-?(?!.*\..*\.)[0-9]*(\.[0-9]{0,9})?$/.test(x)) {
|
|
1749
|
+
let k = x;
|
|
1721
1750
|
/^-?[1-9]+[0-9]*(\.[0-9]{1,9})?$/.test(k) && (k = Number(k)), i == null || i(k);
|
|
1722
1751
|
}
|
|
1723
1752
|
}
|
|
@@ -1725,96 +1754,96 @@ function _({
|
|
|
1725
1754
|
);
|
|
1726
1755
|
if (r.type === "boolean")
|
|
1727
1756
|
return /* @__PURE__ */ t(
|
|
1728
|
-
|
|
1757
|
+
Le,
|
|
1729
1758
|
{
|
|
1730
|
-
label:
|
|
1759
|
+
label: l,
|
|
1731
1760
|
labelPlacement: "start",
|
|
1732
|
-
control: /* @__PURE__ */ t(qe, { checked: o === !0, onChange: (
|
|
1761
|
+
control: /* @__PURE__ */ t(qe, { checked: o === !0, onChange: (a, x) => i == null ? void 0 : i(x) })
|
|
1733
1762
|
}
|
|
1734
1763
|
);
|
|
1735
1764
|
if (r.type === "color")
|
|
1736
1765
|
return /* @__PURE__ */ t(
|
|
1737
|
-
|
|
1766
|
+
Dr,
|
|
1738
1767
|
{
|
|
1739
|
-
label:
|
|
1768
|
+
label: l,
|
|
1740
1769
|
value: o,
|
|
1741
|
-
onChange: (
|
|
1742
|
-
i == null || i(
|
|
1770
|
+
onChange: (a) => {
|
|
1771
|
+
i == null || i(a);
|
|
1743
1772
|
}
|
|
1744
1773
|
}
|
|
1745
1774
|
);
|
|
1746
1775
|
if (r.type === "json" || r.type === "yaml")
|
|
1747
1776
|
return /* @__PURE__ */ t(
|
|
1748
|
-
|
|
1777
|
+
Ar,
|
|
1749
1778
|
{
|
|
1750
|
-
label:
|
|
1779
|
+
label: l,
|
|
1751
1780
|
value: o,
|
|
1752
|
-
onChange: (
|
|
1753
|
-
i == null || i(
|
|
1781
|
+
onChange: (a) => {
|
|
1782
|
+
i == null || i(a);
|
|
1754
1783
|
},
|
|
1755
1784
|
property: r,
|
|
1756
1785
|
component: e,
|
|
1757
|
-
defaultLocale:
|
|
1758
|
-
allComponents:
|
|
1786
|
+
defaultLocale: m,
|
|
1787
|
+
allComponents: c,
|
|
1759
1788
|
PropertyValueField: _,
|
|
1760
|
-
onUpload: (
|
|
1761
|
-
|
|
1789
|
+
onUpload: (a) => {
|
|
1790
|
+
w.current = a, p();
|
|
1762
1791
|
}
|
|
1763
1792
|
}
|
|
1764
1793
|
);
|
|
1765
1794
|
if (r.type === "custom") {
|
|
1766
|
-
const
|
|
1767
|
-
return
|
|
1768
|
-
|
|
1795
|
+
const a = (P = c[r.componentId]) == null ? void 0 : P.data;
|
|
1796
|
+
return a ? /* @__PURE__ */ t(R, { width: "100%", children: /* @__PURE__ */ t(
|
|
1797
|
+
nt,
|
|
1769
1798
|
{
|
|
1770
|
-
componentId:
|
|
1771
|
-
props: { label:
|
|
1772
|
-
locale:
|
|
1799
|
+
componentId: a.id,
|
|
1800
|
+
props: { label: l, value: o, onChange: i },
|
|
1801
|
+
locale: g,
|
|
1773
1802
|
dev: {
|
|
1774
1803
|
mode: "draft",
|
|
1775
|
-
components:
|
|
1776
|
-
defaultLocale:
|
|
1804
|
+
components: c,
|
|
1805
|
+
defaultLocale: m
|
|
1777
1806
|
}
|
|
1778
1807
|
}
|
|
1779
|
-
) }) : /* @__PURE__ */ t(
|
|
1808
|
+
) }) : /* @__PURE__ */ t(C, { ...b, label: l, disabled: !0, placeholder: "Click right button select a component" });
|
|
1780
1809
|
}
|
|
1781
1810
|
if (r.type === "component")
|
|
1782
|
-
return /* @__PURE__ */ S(
|
|
1811
|
+
return /* @__PURE__ */ S(j, { width: "100%", direction: "column", gap: 1, children: [
|
|
1783
1812
|
/* @__PURE__ */ t(
|
|
1784
|
-
|
|
1813
|
+
Re,
|
|
1785
1814
|
{
|
|
1786
|
-
allComponents:
|
|
1787
|
-
label:
|
|
1815
|
+
allComponents: c,
|
|
1816
|
+
label: l,
|
|
1788
1817
|
value: o == null ? void 0 : o.componentId,
|
|
1789
|
-
onChange: (
|
|
1790
|
-
u || !o ? i == null || i({ ...o && JSON.parse(JSON.stringify(o)), componentId:
|
|
1818
|
+
onChange: (a, x) => {
|
|
1819
|
+
u || !o ? i == null || i({ ...o && JSON.parse(JSON.stringify(o)), componentId: x }) : typeof o == "object" && (o.componentId = x, i == null || i({ ...o && JSON.parse(JSON.stringify(o)), componentId: x }));
|
|
1791
1820
|
}
|
|
1792
1821
|
}
|
|
1793
1822
|
),
|
|
1794
1823
|
(o == null ? void 0 : o.componentId) && /* @__PURE__ */ t(
|
|
1795
|
-
|
|
1824
|
+
Jr,
|
|
1796
1825
|
{
|
|
1797
1826
|
value: o,
|
|
1798
1827
|
valueImmutable: u,
|
|
1799
1828
|
onChange: i,
|
|
1800
|
-
defaultLocale:
|
|
1801
|
-
allComponents:
|
|
1829
|
+
defaultLocale: m,
|
|
1830
|
+
allComponents: c
|
|
1802
1831
|
}
|
|
1803
1832
|
)
|
|
1804
1833
|
] });
|
|
1805
1834
|
if (!r.type || ["string", "url"].includes(r.type)) {
|
|
1806
|
-
const
|
|
1835
|
+
const a = r.type === "string" ? r.multiline : void 0, x = r.type === "url" ? o == null ? void 0 : o.url : o;
|
|
1807
1836
|
return /* @__PURE__ */ t(
|
|
1808
|
-
|
|
1837
|
+
C,
|
|
1809
1838
|
{
|
|
1810
|
-
...
|
|
1811
|
-
label:
|
|
1812
|
-
value: typeof
|
|
1813
|
-
multiline:
|
|
1814
|
-
minRows:
|
|
1815
|
-
maxRows:
|
|
1816
|
-
onChange: (
|
|
1817
|
-
r.type === "url" ? { ...o, url:
|
|
1839
|
+
...b,
|
|
1840
|
+
label: l,
|
|
1841
|
+
value: typeof x == "string" ? x : "",
|
|
1842
|
+
multiline: a,
|
|
1843
|
+
minRows: a ? 2 : void 0,
|
|
1844
|
+
maxRows: a ? 10 : void 0,
|
|
1845
|
+
onChange: (v) => i == null ? void 0 : i(
|
|
1846
|
+
r.type === "url" ? { ...o, url: v.target.value, mediaKitUrl: v.target.value } : v.target.value
|
|
1818
1847
|
),
|
|
1819
1848
|
InputProps: r.type === "url" ? {
|
|
1820
1849
|
sx: { pr: 0 },
|
|
@@ -1822,23 +1851,23 @@ function _({
|
|
|
1822
1851
|
/* @__PURE__ */ t(
|
|
1823
1852
|
Pe,
|
|
1824
1853
|
{
|
|
1825
|
-
onChange: async ({ response:
|
|
1826
|
-
var I,
|
|
1827
|
-
const k = ((I =
|
|
1854
|
+
onChange: async ({ response: v }) => {
|
|
1855
|
+
var I, z, N;
|
|
1856
|
+
const k = ((I = v == null ? void 0 : v.data) == null ? void 0 : I.url) || ((z = v == null ? void 0 : v.data) == null ? void 0 : z.fileUrl);
|
|
1828
1857
|
let O;
|
|
1829
1858
|
k && (O = await fe(k).catch(() => he(k)).catch(() => {
|
|
1830
1859
|
}));
|
|
1831
|
-
let
|
|
1832
|
-
|
|
1860
|
+
let h = ((N = v == null ? void 0 : v.data) == null ? void 0 : N.filename) || "";
|
|
1861
|
+
h && (h = `mediakit://${h}`), i == null || i({
|
|
1833
1862
|
url: k,
|
|
1834
|
-
mediaKitUrl:
|
|
1863
|
+
mediaKitUrl: h,
|
|
1835
1864
|
width: O == null ? void 0 : O.naturalWidth,
|
|
1836
1865
|
height: O == null ? void 0 : O.naturalHeight
|
|
1837
1866
|
});
|
|
1838
1867
|
}
|
|
1839
1868
|
}
|
|
1840
1869
|
),
|
|
1841
|
-
/* @__PURE__ */ t(X, { title: "If you are using the 'mediaKitUrl' property, please use < import { getMediaKitAbsoluteUrl } from '@blocklet/pages-kit/builtin/utils' > to get the full address.", children: /* @__PURE__ */ t(
|
|
1870
|
+
/* @__PURE__ */ t(X, { title: "If you are using the 'mediaKitUrl' property, please use < import { getMediaKitAbsoluteUrl } from '@blocklet/pages-kit/builtin/utils' > to get the full address.", children: /* @__PURE__ */ t(at, { sx: { cursor: "default" }, fontSize: "small" }) })
|
|
1842
1871
|
] })
|
|
1843
1872
|
} : void 0
|
|
1844
1873
|
}
|
|
@@ -1847,38 +1876,38 @@ function _({
|
|
|
1847
1876
|
return r.type === "array" ? /* @__PURE__ */ t(
|
|
1848
1877
|
Ir,
|
|
1849
1878
|
{
|
|
1850
|
-
label:
|
|
1879
|
+
label: l,
|
|
1851
1880
|
value: Array.isArray(o) ? o : [],
|
|
1852
|
-
onChange: (
|
|
1881
|
+
onChange: (a) => i == null ? void 0 : i(a),
|
|
1853
1882
|
property: r,
|
|
1854
|
-
renderItem: ({ item:
|
|
1883
|
+
renderItem: ({ item: a, index: x, onChange: v }) => r.subProperties && Object.keys(r.subProperties).length > 0 ? /* @__PURE__ */ t(j, { gap: 1, width: "100%", children: V(Object.values(r.subProperties), "index").filter((k) => k.data.visible !== !1).map(({ data: k }) => k.key ? /* @__PURE__ */ t(
|
|
1855
1884
|
_,
|
|
1856
1885
|
{
|
|
1857
1886
|
component: e,
|
|
1858
1887
|
property: k,
|
|
1859
|
-
value:
|
|
1888
|
+
value: a[k.key],
|
|
1860
1889
|
onChange: (O) => {
|
|
1861
|
-
const
|
|
1862
|
-
|
|
1890
|
+
const h = { ...a, [k.key]: O };
|
|
1891
|
+
v(h);
|
|
1863
1892
|
},
|
|
1864
1893
|
size: "small",
|
|
1865
1894
|
fullWidth: !0,
|
|
1866
|
-
defaultLocale:
|
|
1867
|
-
allComponents:
|
|
1895
|
+
defaultLocale: m,
|
|
1896
|
+
allComponents: c
|
|
1868
1897
|
},
|
|
1869
1898
|
k.id
|
|
1870
|
-
) : null) },
|
|
1899
|
+
) : null) }, x) : /* @__PURE__ */ t(C, { size: b.size, fullWidth: !0, value: a, onChange: (k) => v(k.target.value) })
|
|
1871
1900
|
}
|
|
1872
1901
|
) : (console.error("Unsupported property type", r.type), null);
|
|
1873
1902
|
}
|
|
1874
|
-
function
|
|
1903
|
+
function Hr({
|
|
1875
1904
|
NumberProps: e,
|
|
1876
1905
|
...r
|
|
1877
1906
|
}) {
|
|
1878
1907
|
const { getInputProps: o } = or(e), i = o();
|
|
1879
|
-
return /* @__PURE__ */ t(
|
|
1908
|
+
return /* @__PURE__ */ t(C, { ...r, inputProps: i });
|
|
1880
1909
|
}
|
|
1881
|
-
const
|
|
1910
|
+
const Yr = `import React from '@blocklet/pages-kit/builtin/react'
|
|
1882
1911
|
import { Box } from '@blocklet/pages-kit/builtin/mui/material'
|
|
1883
1912
|
|
|
1884
1913
|
export default function () {
|
|
@@ -1887,18 +1916,18 @@ export default function () {
|
|
|
1887
1916
|
Hello World
|
|
1888
1917
|
</Box>
|
|
1889
1918
|
)
|
|
1890
|
-
}`,
|
|
1919
|
+
}`, Gr = `console.log('hello')
|
|
1891
1920
|
`;
|
|
1892
|
-
function
|
|
1921
|
+
function Lr({
|
|
1893
1922
|
value: e
|
|
1894
1923
|
}) {
|
|
1895
|
-
const { locale: r } =
|
|
1924
|
+
const { locale: r } = D(), o = it(), i = te(e).doc;
|
|
1896
1925
|
return M(() => {
|
|
1897
1926
|
var u;
|
|
1898
1927
|
(u = e.renderer) != null && u.script || (i.transact(() => {
|
|
1899
|
-
e.renderer.script = e.renderer.type === "react-component" ?
|
|
1928
|
+
e.renderer.script = e.renderer.type === "react-component" ? Yr : Gr;
|
|
1900
1929
|
}), o());
|
|
1901
|
-
}, [e]), /* @__PURE__ */ t(
|
|
1930
|
+
}, [e]), /* @__PURE__ */ t(R, { sx: { border: 1, borderColor: "divider", borderRadius: 1, overflow: "hidden" }, children: /* @__PURE__ */ t(
|
|
1902
1931
|
we,
|
|
1903
1932
|
{
|
|
1904
1933
|
keyId: e.id,
|
|
@@ -1911,88 +1940,88 @@ function Yr({
|
|
|
1911
1940
|
e.id
|
|
1912
1941
|
) });
|
|
1913
1942
|
}
|
|
1914
|
-
function
|
|
1915
|
-
var
|
|
1916
|
-
const { t: r } =
|
|
1943
|
+
function qr({ value: e }) {
|
|
1944
|
+
var w, p, l;
|
|
1945
|
+
const { t: r } = D(), o = te(e).doc, {
|
|
1917
1946
|
state: {
|
|
1918
1947
|
components: i,
|
|
1919
1948
|
config: { defaultLocale: u },
|
|
1920
|
-
resources:
|
|
1949
|
+
resources: m
|
|
1921
1950
|
},
|
|
1922
|
-
localState: { currentLocale:
|
|
1923
|
-
} =
|
|
1924
|
-
return /* @__PURE__ */ S(
|
|
1951
|
+
localState: { currentLocale: c }
|
|
1952
|
+
} = de(), b = xe(), g = ((w = i[e.renderer.componentId]) == null ? void 0 : w.data) ?? ((l = (p = m.components) == null ? void 0 : p[e.renderer.componentId]) == null ? void 0 : l.component), f = Se({ variant: "dialog" });
|
|
1953
|
+
return /* @__PURE__ */ S(j, { gap: 1, children: [
|
|
1925
1954
|
/* @__PURE__ */ t(
|
|
1926
|
-
|
|
1955
|
+
Re,
|
|
1927
1956
|
{
|
|
1928
|
-
allComponents:
|
|
1957
|
+
allComponents: b,
|
|
1929
1958
|
excludes: [e.id],
|
|
1930
1959
|
value: e.renderer.componentId,
|
|
1931
|
-
onChange: (s,
|
|
1960
|
+
onChange: (s, n) => e.renderer.componentId = n
|
|
1932
1961
|
}
|
|
1933
1962
|
),
|
|
1934
|
-
|
|
1935
|
-
/* @__PURE__ */ S(
|
|
1936
|
-
/* @__PURE__ */ t(
|
|
1937
|
-
/* @__PURE__ */ t(T, { sx: { minWidth: 32, minHeight: 32, p: 0 }, ...Oe(
|
|
1963
|
+
g && /* @__PURE__ */ S(H, { children: [
|
|
1964
|
+
/* @__PURE__ */ S(j, { direction: "row", justifyContent: "space-between", alignItems: "center", children: [
|
|
1965
|
+
/* @__PURE__ */ t(F, { variant: "subtitle2", children: r("parameters") }),
|
|
1966
|
+
/* @__PURE__ */ t(T, { sx: { minWidth: 32, minHeight: 32, p: 0 }, ...Oe(f), children: /* @__PURE__ */ t(st, { fontSize: "small" }) })
|
|
1938
1967
|
] }),
|
|
1939
|
-
|
|
1940
|
-
var
|
|
1941
|
-
return /* @__PURE__ */ t(
|
|
1968
|
+
g.properties && V(Object.values(g.properties), "index").map(({ data: s }) => {
|
|
1969
|
+
var n, d, y, P, a, x, v, k, O, h, I, z, N, E, U, W;
|
|
1970
|
+
return /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(
|
|
1942
1971
|
_,
|
|
1943
1972
|
{
|
|
1944
|
-
allComponents:
|
|
1973
|
+
allComponents: b,
|
|
1945
1974
|
defaultLocale: u,
|
|
1946
|
-
component:
|
|
1975
|
+
component: g,
|
|
1947
1976
|
property: s,
|
|
1948
1977
|
fullWidth: !0,
|
|
1949
1978
|
size: "small",
|
|
1950
|
-
valueImmutable:
|
|
1951
|
-
value: ((k = (
|
|
1979
|
+
valueImmutable: ae((P = (y = (d = (n = e.renderer.properties) == null ? void 0 : n[s.id]) == null ? void 0 : d.locales) == null ? void 0 : y[c]) == null ? void 0 : P.value),
|
|
1980
|
+
value: ((k = (v = (x = (a = e.renderer.properties) == null ? void 0 : a[s.id]) == null ? void 0 : x.locales) == null ? void 0 : v[c]) == null ? void 0 : k.value) ?? ((z = (I = (h = (O = e.renderer.properties) == null ? void 0 : O[s.id]) == null ? void 0 : h.locales) == null ? void 0 : I[u]) == null ? void 0 : z.value) ?? ((E = (N = s.locales) == null ? void 0 : N[c]) == null ? void 0 : E.defaultValue) ?? ((W = (U = s.locales) == null ? void 0 : U[u]) == null ? void 0 : W.defaultValue),
|
|
1952
1981
|
onChange: (re) => {
|
|
1953
1982
|
o.transact(() => {
|
|
1954
|
-
var Y,
|
|
1955
|
-
(Y = e.renderer).properties ?? (Y.properties = {}), (
|
|
1983
|
+
var Y, G, L, q, Q;
|
|
1984
|
+
(Y = e.renderer).properties ?? (Y.properties = {}), (G = e.renderer.properties)[L = s.id] ?? (G[L] = {}), (q = e.renderer.properties[s.id]).locales ?? (q.locales = {}), (Q = e.renderer.properties[s.id].locales)[c] ?? (Q[c] = {}), e.renderer.properties[s.id].locales[c].value = re;
|
|
1956
1985
|
});
|
|
1957
1986
|
}
|
|
1958
1987
|
}
|
|
1959
1988
|
) }, s.id);
|
|
1960
1989
|
}),
|
|
1961
|
-
/* @__PURE__ */ t(ht, { ...ut(
|
|
1990
|
+
/* @__PURE__ */ t(ht, { ...ut(f), component: e, type: "parameters" })
|
|
1962
1991
|
] })
|
|
1963
1992
|
] });
|
|
1964
1993
|
}
|
|
1965
|
-
function
|
|
1994
|
+
function Re({
|
|
1966
1995
|
label: e,
|
|
1967
1996
|
options: r,
|
|
1968
1997
|
excludes: o,
|
|
1969
1998
|
value: i,
|
|
1970
1999
|
onChange: u,
|
|
1971
|
-
allComponents:
|
|
1972
|
-
...
|
|
2000
|
+
allComponents: m,
|
|
2001
|
+
...c
|
|
1973
2002
|
}) {
|
|
1974
|
-
var
|
|
1975
|
-
const { t:
|
|
2003
|
+
var w;
|
|
2004
|
+
const { t: b } = D(), g = r ?? V(Object.values(hr(m, ...o ?? [])), "index").map((p) => p.data), f = (typeof i == "string" ? (w = m[i]) == null ? void 0 : w.data : void 0) ?? null;
|
|
1976
2005
|
return /* @__PURE__ */ t(
|
|
1977
2006
|
et,
|
|
1978
2007
|
{
|
|
1979
|
-
...
|
|
2008
|
+
...c,
|
|
1980
2009
|
size: "small",
|
|
1981
|
-
options:
|
|
2010
|
+
options: g,
|
|
1982
2011
|
autoHighlight: !0,
|
|
1983
|
-
isOptionEqualToValue: (
|
|
1984
|
-
getOptionKey: (
|
|
1985
|
-
getOptionLabel: (
|
|
1986
|
-
renderInput: (
|
|
1987
|
-
value:
|
|
1988
|
-
onChange: (
|
|
1989
|
-
var
|
|
2012
|
+
isOptionEqualToValue: (p, l) => p.id === l.id,
|
|
2013
|
+
getOptionKey: (p) => p.id,
|
|
2014
|
+
getOptionLabel: (p) => p.name || p.id,
|
|
2015
|
+
renderInput: (p) => /* @__PURE__ */ t(C, { label: e || b("component"), ...p }),
|
|
2016
|
+
value: f,
|
|
2017
|
+
onChange: (p, l) => {
|
|
2018
|
+
var n, d, y, P, a, x;
|
|
1990
2019
|
let s = {};
|
|
1991
|
-
|
|
1992
|
-
blockletId: (
|
|
1993
|
-
blockletTitle: (
|
|
1994
|
-
componentName: ((P = (
|
|
1995
|
-
}), u == null || u(
|
|
2020
|
+
l && (s = {
|
|
2021
|
+
blockletId: (n = m[l == null ? void 0 : l.id]) == null ? void 0 : n.blockletId,
|
|
2022
|
+
blockletTitle: (d = m[l == null ? void 0 : l.id]) == null ? void 0 : d.blockletTitle,
|
|
2023
|
+
componentName: ((P = (y = m[l == null ? void 0 : l.id]) == null ? void 0 : y.data) == null ? void 0 : P.name) || ((x = (a = m[l == null ? void 0 : l.id]) == null ? void 0 : a.data) == null ? void 0 : x.id)
|
|
2024
|
+
}), u == null || u(p, l == null ? void 0 : l.id, s);
|
|
1996
2025
|
}
|
|
1997
2026
|
}
|
|
1998
2027
|
);
|
|
@@ -2003,51 +2032,51 @@ function bt({
|
|
|
2003
2032
|
defaultLocale: o,
|
|
2004
2033
|
propertiesValue: i,
|
|
2005
2034
|
currentLocale: u,
|
|
2006
|
-
onChange:
|
|
2007
|
-
props:
|
|
2035
|
+
onChange: m,
|
|
2036
|
+
props: c
|
|
2008
2037
|
}) {
|
|
2009
|
-
const { t:
|
|
2038
|
+
const { t: b } = D(), [g, f] = J(e == null ? void 0 : e.properties), [w, p] = J(null);
|
|
2010
2039
|
M(() => {
|
|
2011
2040
|
(() => {
|
|
2012
|
-
var P,
|
|
2013
|
-
((P = e == null ? void 0 : e.renderer) == null ? void 0 : P.type) === "react-component" && ot(e == null ? void 0 : e.properties) ? rr((
|
|
2014
|
-
const
|
|
2015
|
-
|
|
2016
|
-
}) :
|
|
2041
|
+
var P, a;
|
|
2042
|
+
((P = e == null ? void 0 : e.renderer) == null ? void 0 : P.type) === "react-component" && ot(e == null ? void 0 : e.properties) ? rr((a = e == null ? void 0 : e.renderer) == null ? void 0 : a.script).then((x) => {
|
|
2043
|
+
const v = ir(x);
|
|
2044
|
+
f(v);
|
|
2045
|
+
}) : f(e == null ? void 0 : e.properties);
|
|
2017
2046
|
})();
|
|
2018
2047
|
}, [JSON.stringify(e)]);
|
|
2019
|
-
const
|
|
2020
|
-
(
|
|
2021
|
-
var
|
|
2022
|
-
const
|
|
2023
|
-
return
|
|
2024
|
-
key:
|
|
2025
|
-
value: (
|
|
2048
|
+
const l = A(() => !e || !g ? {} : Object.values(g).reduce(
|
|
2049
|
+
(y, { data: P }) => {
|
|
2050
|
+
var x, v, k, O, h;
|
|
2051
|
+
const a = P.key || P.id;
|
|
2052
|
+
return y[P.id] = {
|
|
2053
|
+
key: a,
|
|
2054
|
+
value: (c == null ? void 0 : c[a]) ?? ((x = i == null ? void 0 : i[P.id]) == null ? void 0 : x.value) ?? ((k = (v = P.locales) == null ? void 0 : v[u]) == null ? void 0 : k.defaultValue) ?? ((h = (O = P.locales) == null ? void 0 : O[o]) == null ? void 0 : h.defaultValue),
|
|
2026
2055
|
id: P.id,
|
|
2027
2056
|
type: P.type
|
|
2028
|
-
},
|
|
2057
|
+
}, y;
|
|
2029
2058
|
},
|
|
2030
2059
|
{}
|
|
2031
|
-
), [JSON.stringify(
|
|
2032
|
-
if (!
|
|
2060
|
+
), [JSON.stringify(g), e, i, u, o]), s = ce(() => {
|
|
2061
|
+
if (!g)
|
|
2033
2062
|
return {
|
|
2034
2063
|
canUseProperties: [],
|
|
2035
2064
|
visibleProperties: [],
|
|
2036
2065
|
canUsePropertiesKeys: []
|
|
2037
2066
|
};
|
|
2038
|
-
const
|
|
2067
|
+
const y = V(Object.values(g), "index"), P = y.filter(({ data: v }) => v.key && ve(g, v.id)), a = y.filter(({ data: v }) => v.key && v.type !== "component"), x = a.map(({ data: v }) => v.key);
|
|
2039
2068
|
return {
|
|
2040
|
-
canUseProperties:
|
|
2069
|
+
canUseProperties: a,
|
|
2041
2070
|
visibleProperties: P,
|
|
2042
|
-
canUsePropertiesKeys:
|
|
2071
|
+
canUsePropertiesKeys: x
|
|
2043
2072
|
};
|
|
2044
|
-
}, [JSON.stringify(
|
|
2045
|
-
return /* @__PURE__ */ t(Ie, { children: /* @__PURE__ */ S(
|
|
2046
|
-
/* @__PURE__ */ t(
|
|
2047
|
-
!e || s.canUsePropertiesKeys.length === 0 ? /* @__PURE__ */ t(Z, { style: { fontSize: 12 }, children:
|
|
2048
|
-
/* @__PURE__ */ t(
|
|
2049
|
-
var P,
|
|
2050
|
-
return /* @__PURE__ */ t(
|
|
2073
|
+
}, [JSON.stringify(g)]), n = l(), d = fr(n, "key");
|
|
2074
|
+
return /* @__PURE__ */ t(Ie, { children: /* @__PURE__ */ S(j, { gap: 2, children: [
|
|
2075
|
+
/* @__PURE__ */ t(F, { variant: "subtitle1", children: b("maker.properties.parameters") }),
|
|
2076
|
+
!e || s.canUsePropertiesKeys.length === 0 ? /* @__PURE__ */ t(Z, { style: { fontSize: 12 }, children: b("maker.properties.noParameters") }) : /* @__PURE__ */ S(H, { children: [
|
|
2077
|
+
/* @__PURE__ */ t(j, { gap: 2, children: s.visibleProperties.map(({ data: y }) => {
|
|
2078
|
+
var P, a;
|
|
2079
|
+
return /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(
|
|
2051
2080
|
_,
|
|
2052
2081
|
{
|
|
2053
2082
|
allComponents: r,
|
|
@@ -2055,64 +2084,64 @@ function bt({
|
|
|
2055
2084
|
size: "small",
|
|
2056
2085
|
fullWidth: !0,
|
|
2057
2086
|
component: e,
|
|
2058
|
-
property:
|
|
2059
|
-
valueImmutable:
|
|
2060
|
-
value: (
|
|
2061
|
-
onChange: (
|
|
2062
|
-
|
|
2063
|
-
path: ["properties",
|
|
2064
|
-
id:
|
|
2065
|
-
value: { value:
|
|
2066
|
-
shouldSync:
|
|
2087
|
+
property: y,
|
|
2088
|
+
valueImmutable: ae((P = i == null ? void 0 : i[y.id]) == null ? void 0 : P.value),
|
|
2089
|
+
value: (c == null ? void 0 : c[y.key || y.id]) ?? ((a = n[y.id]) == null ? void 0 : a.value),
|
|
2090
|
+
onChange: (x) => {
|
|
2091
|
+
m({
|
|
2092
|
+
path: ["properties", y.id],
|
|
2093
|
+
id: y.id,
|
|
2094
|
+
value: { value: x },
|
|
2095
|
+
shouldSync: $e(y),
|
|
2067
2096
|
excludeKeys: [],
|
|
2068
|
-
key:
|
|
2097
|
+
key: y.key || y.id
|
|
2069
2098
|
});
|
|
2070
2099
|
}
|
|
2071
2100
|
}
|
|
2072
|
-
) },
|
|
2101
|
+
) }, y.id);
|
|
2073
2102
|
}) }),
|
|
2074
|
-
/* @__PURE__ */ t(
|
|
2075
|
-
|
|
2103
|
+
/* @__PURE__ */ t(j, { gap: 2, sx: { width: "100%" }, children: /* @__PURE__ */ t(
|
|
2104
|
+
nt,
|
|
2076
2105
|
{
|
|
2077
2106
|
componentId: (e == null ? void 0 : e.id) || "",
|
|
2078
2107
|
renderType: "setting",
|
|
2079
2108
|
locale: u,
|
|
2080
|
-
properties:
|
|
2109
|
+
properties: n,
|
|
2081
2110
|
dev: { mode: "draft", components: r, defaultLocale: o },
|
|
2082
2111
|
props: {
|
|
2083
|
-
...br(
|
|
2084
|
-
onChange: (
|
|
2112
|
+
...br(c ?? {}, s.canUsePropertiesKeys),
|
|
2113
|
+
onChange: (y) => {
|
|
2085
2114
|
const { canUsePropertiesKeys: P } = s;
|
|
2086
|
-
Object.keys(
|
|
2087
|
-
var
|
|
2088
|
-
return
|
|
2089
|
-
}).filter((
|
|
2090
|
-
var
|
|
2091
|
-
return !(
|
|
2092
|
-
}).reduce((
|
|
2093
|
-
const k =
|
|
2115
|
+
Object.keys(y).filter((x) => {
|
|
2116
|
+
var v;
|
|
2117
|
+
return y[x] !== ((v = d == null ? void 0 : d[x]) == null ? void 0 : v.value);
|
|
2118
|
+
}).filter((x) => {
|
|
2119
|
+
var v, k, O, h;
|
|
2120
|
+
return !(x === "locale" && !pr(d[x], "locale") || ((v = d[x]) == null ? void 0 : v.type) === "component" || (((k = d[x]) == null ? void 0 : k.type) === "yaml" || ((O = d[x]) == null ? void 0 : O.type) === "json") && ve(g, (h = d[x]) == null ? void 0 : h.id));
|
|
2121
|
+
}).reduce((x, v) => x.then(() => {
|
|
2122
|
+
const k = d[v], O = P.includes(v);
|
|
2094
2123
|
if (k != null && k.id && O)
|
|
2095
|
-
return
|
|
2124
|
+
return m({
|
|
2096
2125
|
path: ["properties", k.id],
|
|
2097
2126
|
id: k.id,
|
|
2098
|
-
value: { value:
|
|
2099
|
-
shouldSync:
|
|
2127
|
+
value: { value: y[v] },
|
|
2128
|
+
shouldSync: $e(k),
|
|
2100
2129
|
excludeKeys: [],
|
|
2101
2130
|
key: k.key || k.id
|
|
2102
2131
|
}), Promise.resolve();
|
|
2103
|
-
const
|
|
2104
|
-
if (
|
|
2132
|
+
const h = `propertyNotFound${v}`;
|
|
2133
|
+
if (w === h)
|
|
2105
2134
|
return Promise.resolve();
|
|
2106
|
-
Be.close(
|
|
2135
|
+
Be.close(w);
|
|
2107
2136
|
const I = Be.warning(
|
|
2108
|
-
|
|
2109
|
-
key:
|
|
2137
|
+
b("maker.properties.propertyNotFound", {
|
|
2138
|
+
key: v
|
|
2110
2139
|
}),
|
|
2111
2140
|
{
|
|
2112
|
-
key:
|
|
2141
|
+
key: h
|
|
2113
2142
|
}
|
|
2114
2143
|
);
|
|
2115
|
-
return
|
|
2144
|
+
return p(I), Promise.resolve();
|
|
2116
2145
|
}), Promise.resolve());
|
|
2117
2146
|
}
|
|
2118
2147
|
}
|
|
@@ -2122,12 +2151,12 @@ function bt({
|
|
|
2122
2151
|
] }) });
|
|
2123
2152
|
}
|
|
2124
2153
|
export {
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2154
|
+
Kr as BasicInfo,
|
|
2155
|
+
Re as CustomComponentAutocomplete,
|
|
2156
|
+
Bi as CustomComponentSettings,
|
|
2157
|
+
Yr as DefaultReactComponentScriptTemplate,
|
|
2158
|
+
Gr as DefaultWebComponentScriptTemplate,
|
|
2130
2159
|
bt as ParametersConfig,
|
|
2131
|
-
|
|
2160
|
+
_r as PropertiesConfig,
|
|
2132
2161
|
_ as PropertyValueField
|
|
2133
2162
|
};
|