@yklyklpackages/message-card 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/core/LeafWrapper.d.ts.map +1 -1
- package/dist/components/core/templateAdapter.d.ts.map +1 -1
- package/dist/components/layout/{CardLayout.d.ts → JDHCardLayout.d.ts} +3 -3
- package/dist/components/layout/JDHCardLayout.d.ts.map +1 -0
- package/dist/components/message/MessageContainer.d.ts +1 -0
- package/dist/components/message/MessageContainer.d.ts.map +1 -1
- package/dist/components/render/Button/index.d.ts +13 -0
- package/dist/components/render/Button/index.d.ts.map +1 -0
- package/dist/components/render/ButtonJDH.d.ts +2 -2
- package/dist/components/render/ButtonJDH.d.ts.map +1 -1
- package/dist/components/render/ChoiceJDH.d.ts +2 -2
- package/dist/components/render/ChoiceJDH.d.ts.map +1 -1
- package/dist/components/render/Image.d.ts +2 -2
- package/dist/components/render/Image.d.ts.map +1 -1
- package/dist/components/render/InputJDH.d.ts +2 -2
- package/dist/components/render/InputJDH.d.ts.map +1 -1
- package/dist/components/render/Markdown.d.ts +2 -2
- package/dist/components/render/Markdown.d.ts.map +1 -1
- package/dist/components/render/Text.d.ts +2 -2
- package/dist/components/render/Text.d.ts.map +1 -1
- package/dist/components/render/TextareaJDH.d.ts +2 -2
- package/dist/components/render/TextareaJDH.d.ts.map +1 -1
- package/dist/components/theme/ScreenTheme375.d.ts.map +1 -1
- package/dist/components/theme/defaultTheme.d.ts.map +1 -1
- package/dist/components/types/component.d.ts +0 -4
- package/dist/components/types/component.d.ts.map +1 -1
- package/dist/components/utils/styleHelpers.d.ts +17 -18
- package/dist/components/utils/styleHelpers.d.ts.map +1 -1
- package/dist/index.cjs +1293 -617
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1293 -617
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +1293 -617
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +177 -206
- package/package.json +4 -3
- package/dist/components/layout/CardLayout.d.ts.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -6,25 +6,25 @@ var _a;
|
|
|
6
6
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
7
7
|
const jsxRuntime = require("react/jsx-runtime");
|
|
8
8
|
const React = require("react");
|
|
9
|
-
var __defProp$
|
|
10
|
-
var __defProps$
|
|
11
|
-
var __getOwnPropDescs$
|
|
12
|
-
var __getOwnPropSymbols$
|
|
13
|
-
var __hasOwnProp$
|
|
14
|
-
var __propIsEnum$
|
|
15
|
-
var __defNormalProp$
|
|
16
|
-
var __spreadValues$
|
|
9
|
+
var __defProp$A = Object.defineProperty;
|
|
10
|
+
var __defProps$u = Object.defineProperties;
|
|
11
|
+
var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
|
|
12
|
+
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
|
|
13
|
+
var __hasOwnProp$x = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
|
|
15
|
+
var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16
|
+
var __spreadValues$x = (a, b3) => {
|
|
17
17
|
for (var prop in b3 || (b3 = {}))
|
|
18
|
-
if (__hasOwnProp$
|
|
19
|
-
__defNormalProp$
|
|
20
|
-
if (__getOwnPropSymbols$
|
|
21
|
-
for (var prop of __getOwnPropSymbols$
|
|
22
|
-
if (__propIsEnum$
|
|
23
|
-
__defNormalProp$
|
|
18
|
+
if (__hasOwnProp$x.call(b3, prop))
|
|
19
|
+
__defNormalProp$A(a, prop, b3[prop]);
|
|
20
|
+
if (__getOwnPropSymbols$x)
|
|
21
|
+
for (var prop of __getOwnPropSymbols$x(b3)) {
|
|
22
|
+
if (__propIsEnum$x.call(b3, prop))
|
|
23
|
+
__defNormalProp$A(a, prop, b3[prop]);
|
|
24
24
|
}
|
|
25
25
|
return a;
|
|
26
26
|
};
|
|
27
|
-
var __spreadProps$
|
|
27
|
+
var __spreadProps$u = (a, b3) => __defProps$u(a, __getOwnPropDescs$u(b3));
|
|
28
28
|
const postMessage$1 = (name, params) => {
|
|
29
29
|
var _a2;
|
|
30
30
|
(_a2 = window == null ? void 0 : window.parent) == null ? void 0 : _a2.postMessage({ from: "aui-preview", name, params }, "*");
|
|
@@ -69,8 +69,8 @@ const WrapComponent = (props) => {
|
|
|
69
69
|
className: "container-wrap-hoc",
|
|
70
70
|
ref: containerRef,
|
|
71
71
|
onClick,
|
|
72
|
-
children: renderFunction(__spreadProps$
|
|
73
|
-
component: __spreadValues$
|
|
72
|
+
children: renderFunction(__spreadProps$u(__spreadValues$x({}, runtimeProps), {
|
|
73
|
+
component: __spreadValues$x(__spreadValues$x({}, runtimeProps.component), componentFromEditor || {})
|
|
74
74
|
}))
|
|
75
75
|
},
|
|
76
76
|
updateUniqueId
|
|
@@ -94,19 +94,19 @@ const containerComponentEditorModeHOC = (renderFunction) => {
|
|
|
94
94
|
);
|
|
95
95
|
} : renderFunction;
|
|
96
96
|
};
|
|
97
|
-
var __defProp$
|
|
98
|
-
var __getOwnPropSymbols$
|
|
99
|
-
var __hasOwnProp$
|
|
100
|
-
var __propIsEnum$
|
|
101
|
-
var __defNormalProp$
|
|
102
|
-
var __spreadValues$
|
|
97
|
+
var __defProp$z = Object.defineProperty;
|
|
98
|
+
var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
|
|
99
|
+
var __hasOwnProp$w = Object.prototype.hasOwnProperty;
|
|
100
|
+
var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
|
|
101
|
+
var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
102
|
+
var __spreadValues$w = (a, b3) => {
|
|
103
103
|
for (var prop in b3 || (b3 = {}))
|
|
104
|
-
if (__hasOwnProp$
|
|
105
|
-
__defNormalProp$
|
|
106
|
-
if (__getOwnPropSymbols$
|
|
107
|
-
for (var prop of __getOwnPropSymbols$
|
|
108
|
-
if (__propIsEnum$
|
|
109
|
-
__defNormalProp$
|
|
104
|
+
if (__hasOwnProp$w.call(b3, prop))
|
|
105
|
+
__defNormalProp$z(a, prop, b3[prop]);
|
|
106
|
+
if (__getOwnPropSymbols$w)
|
|
107
|
+
for (var prop of __getOwnPropSymbols$w(b3)) {
|
|
108
|
+
if (__propIsEnum$w.call(b3, prop))
|
|
109
|
+
__defNormalProp$z(a, prop, b3[prop]);
|
|
110
110
|
}
|
|
111
111
|
return a;
|
|
112
112
|
};
|
|
@@ -132,7 +132,7 @@ const getImageUrl = ({
|
|
|
132
132
|
if (isWebp) {
|
|
133
133
|
reWebp = ".webp";
|
|
134
134
|
}
|
|
135
|
-
const { width, height } = __spreadValues$
|
|
135
|
+
const { width, height } = __spreadValues$w({}, size);
|
|
136
136
|
let reSize = "";
|
|
137
137
|
if (width && height) {
|
|
138
138
|
reSize = `s${width}x${height}_`;
|
|
@@ -212,7 +212,183 @@ const defaultTheme$2 = {
|
|
|
212
212
|
Radius_JDH_xs: 6
|
|
213
213
|
},
|
|
214
214
|
components: {
|
|
215
|
-
|
|
215
|
+
text: {
|
|
216
|
+
basic: {
|
|
217
|
+
fontSize: "FontSizes_JDH_Text",
|
|
218
|
+
lineHeight: "FontSizes_JDH_Text",
|
|
219
|
+
fontWeight: "FontWeight_JDH_Normal",
|
|
220
|
+
color: "Color_JDH_Gray_Text",
|
|
221
|
+
background: "#FFF",
|
|
222
|
+
margin: 0
|
|
223
|
+
},
|
|
224
|
+
variant: {
|
|
225
|
+
h1: {
|
|
226
|
+
fontSize: "FontSizes_JDH_Headline1",
|
|
227
|
+
lineHeight: "FontSizes_JDH_Headline1",
|
|
228
|
+
color: "Color_JDH_Gray_Headline",
|
|
229
|
+
fontWeight: "FontWeight_JDH_Medium"
|
|
230
|
+
},
|
|
231
|
+
h2: {
|
|
232
|
+
fontSize: "FontSizes_JDH_Headline2",
|
|
233
|
+
lineHeight: "FontSizes_JDH_Headline2",
|
|
234
|
+
color: "Color_JDH_Gray_Headline",
|
|
235
|
+
fontWeight: "FontWeight_JDH_Medium"
|
|
236
|
+
},
|
|
237
|
+
h3: {
|
|
238
|
+
fontSize: "FontSizes_JDH_Title",
|
|
239
|
+
lineHeight: "FontSizes_JDH_Title",
|
|
240
|
+
color: "Color_JDH_Gray_Headline",
|
|
241
|
+
fontWeight: "FontWeight_JDH_Medium"
|
|
242
|
+
},
|
|
243
|
+
h4: {
|
|
244
|
+
fontSize: "FontSizes_JDH_Title",
|
|
245
|
+
lineHeight: "FontSizes_JDH_Title",
|
|
246
|
+
color: "Color_JDH_Gray_Headline",
|
|
247
|
+
fontWeight: "FontWeight_JDH_Medium"
|
|
248
|
+
},
|
|
249
|
+
h5: {
|
|
250
|
+
fontSize: "FontSizes_JDH_Title",
|
|
251
|
+
lineHeight: "FontSizes_JDH_Title",
|
|
252
|
+
color: "Color_JDH_Gray_Headline",
|
|
253
|
+
fontWeight: "FontWeight_JDH_Medium"
|
|
254
|
+
},
|
|
255
|
+
body: {},
|
|
256
|
+
caption: {
|
|
257
|
+
fontSize: "FontSizes_JDH_AccentText",
|
|
258
|
+
lineHeight: "FontSizes_JDH_AccentText",
|
|
259
|
+
color: "Color_JDH_Gray_AccentText"
|
|
260
|
+
},
|
|
261
|
+
tag: {
|
|
262
|
+
fontSize: "FontSizes_JDH_TagText",
|
|
263
|
+
lineHeight: "FontSizes_JDH_TagText",
|
|
264
|
+
color: "Color_JDH_Gray_AccentText"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
button: {
|
|
269
|
+
basicColor: {
|
|
270
|
+
color: "#FFF",
|
|
271
|
+
background: "#000",
|
|
272
|
+
borderColor: "rgb(217, 217, 217)",
|
|
273
|
+
fillBackground: "rgba(0, 0, 0, 0.04)"
|
|
274
|
+
},
|
|
275
|
+
color: {
|
|
276
|
+
default: {},
|
|
277
|
+
primary: {
|
|
278
|
+
color: "#FFF",
|
|
279
|
+
background: "rgb(22, 119, 255)",
|
|
280
|
+
borderColor: "rgb(22, 119, 255)",
|
|
281
|
+
fillBackground: "rgb(230, 244, 255)"
|
|
282
|
+
},
|
|
283
|
+
danger: {
|
|
284
|
+
color: "#FFF",
|
|
285
|
+
background: "rgb(255, 77, 79)",
|
|
286
|
+
borderColor: "rgb(255, 77, 79)",
|
|
287
|
+
fillBackground: "rgb(255, 242, 240)"
|
|
288
|
+
},
|
|
289
|
+
green: {
|
|
290
|
+
color: "#fff",
|
|
291
|
+
background: "rgb(82, 196, 26)",
|
|
292
|
+
borderColor: "rgb(82, 196, 26)",
|
|
293
|
+
fillBackground: "rgb(246, 255, 237)"
|
|
294
|
+
},
|
|
295
|
+
red: {
|
|
296
|
+
background: "rgb(245, 34, 45)",
|
|
297
|
+
borderColor: "rgb(245, 34, 45)",
|
|
298
|
+
fillBackground: "rgb(255, 241, 240)"
|
|
299
|
+
},
|
|
300
|
+
yellow: {
|
|
301
|
+
background: "rgb(250, 219, 20)",
|
|
302
|
+
borderColor: "rgb(250, 219, 20)",
|
|
303
|
+
fillBackground: "rgb(254, 255, 230)"
|
|
304
|
+
},
|
|
305
|
+
blue: {
|
|
306
|
+
color: "#FFF",
|
|
307
|
+
background: "rgb(22, 119, 255)",
|
|
308
|
+
borderColor: "rgb(22, 119, 255)",
|
|
309
|
+
fillBackground: "rgb(230, 244, 255)"
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
disabledColor: {
|
|
313
|
+
color: "rgba(0, 0, 0, 0.25)",
|
|
314
|
+
background: "rgba(0, 0, 0, 0.04)",
|
|
315
|
+
borderColor: "rgb(217, 217, 217)",
|
|
316
|
+
fillBackground: "rgba(0, 0, 0, 0.04)",
|
|
317
|
+
textLinkBackground: "#fff"
|
|
318
|
+
},
|
|
319
|
+
hoverColor: {
|
|
320
|
+
default: {
|
|
321
|
+
solidBackground: "rgba(0,0,0,0.75)",
|
|
322
|
+
outlineDashedTextColor: "#4096ff",
|
|
323
|
+
fillBackground: "rgba(0,0,0,0.06)",
|
|
324
|
+
textBackground: "rgba(0,0,0,0.04)"
|
|
325
|
+
},
|
|
326
|
+
primary: {
|
|
327
|
+
solidBackground: "#4096ff",
|
|
328
|
+
outlineDashedTextColor: "#4096ff",
|
|
329
|
+
fillBackground: "#bae0ff",
|
|
330
|
+
textBackground: "#e6f4ff"
|
|
331
|
+
},
|
|
332
|
+
danger: {
|
|
333
|
+
solidBackground: "#ff7875",
|
|
334
|
+
outlineDashedTextColor: "#ff7875",
|
|
335
|
+
fillBackground: "#ffdfdc",
|
|
336
|
+
textBackground: "#fff2f0"
|
|
337
|
+
},
|
|
338
|
+
green: {
|
|
339
|
+
solidBackground: "#73d13d",
|
|
340
|
+
outlineDashedTextColor: "#73d13d",
|
|
341
|
+
fillBackground: "#d9f7be",
|
|
342
|
+
textBackground: "#f6ffed"
|
|
343
|
+
},
|
|
344
|
+
red: {
|
|
345
|
+
solidBackground: "#ff4d4f",
|
|
346
|
+
outlineDashedTextColor: "#ff4d4f",
|
|
347
|
+
fillBackground: "#ffccc7",
|
|
348
|
+
textBackground: "#fff1f0"
|
|
349
|
+
},
|
|
350
|
+
blue: {
|
|
351
|
+
solidBackground: "#4096ff",
|
|
352
|
+
outlineDashedTextColor: "#4096ff",
|
|
353
|
+
fillBackground: "#bae0ff",
|
|
354
|
+
textBackground: "#e6f4ff"
|
|
355
|
+
},
|
|
356
|
+
yellow: {
|
|
357
|
+
solidBackground: "#ffec3d",
|
|
358
|
+
outlineDashedTextColor: "#ffec3d",
|
|
359
|
+
fillBackground: "#ffffb8",
|
|
360
|
+
textBackground: "#feffe6"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
basicSize: {
|
|
364
|
+
fontSize: 28,
|
|
365
|
+
lineHeight: 44,
|
|
366
|
+
padding: [8, 30],
|
|
367
|
+
borderRadius: 12,
|
|
368
|
+
minWidth: "auto"
|
|
369
|
+
},
|
|
370
|
+
size: {
|
|
371
|
+
small: {
|
|
372
|
+
padding: [0, 14]
|
|
373
|
+
},
|
|
374
|
+
middle: {},
|
|
375
|
+
large: {
|
|
376
|
+
fontSize: 32,
|
|
377
|
+
lineHeight: 50,
|
|
378
|
+
borderRadius: 16,
|
|
379
|
+
padding: [13, 30]
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
icon: {
|
|
383
|
+
borderRadius: 4,
|
|
384
|
+
margin: [0, 16, 0, 0]
|
|
385
|
+
},
|
|
386
|
+
loading: {
|
|
387
|
+
opacity: 0.65
|
|
388
|
+
},
|
|
389
|
+
loadingIcon: ""
|
|
390
|
+
},
|
|
391
|
+
jdhCard: {
|
|
216
392
|
wrap: {
|
|
217
393
|
background: "Color_JDH_Gray_Background",
|
|
218
394
|
padding: "Spacing_JDH_xxl"
|
|
@@ -237,7 +413,7 @@ const defaultTheme$2 = {
|
|
|
237
413
|
borderRadius: "Radius_JDH_xl"
|
|
238
414
|
}
|
|
239
415
|
},
|
|
240
|
-
|
|
416
|
+
jdhChoice: {
|
|
241
417
|
wrap: {
|
|
242
418
|
padding: [13, 32],
|
|
243
419
|
layoutSmallPadding: [11, 20],
|
|
@@ -289,7 +465,7 @@ const defaultTheme$2 = {
|
|
|
289
465
|
},
|
|
290
466
|
disabledOpacity: 0.4
|
|
291
467
|
},
|
|
292
|
-
|
|
468
|
+
jdhButton: {
|
|
293
469
|
colorStyle: {
|
|
294
470
|
solid: {
|
|
295
471
|
primary: {
|
|
@@ -377,7 +553,7 @@ const defaultTheme$2 = {
|
|
|
377
553
|
},
|
|
378
554
|
disabledOpacity: 0.4
|
|
379
555
|
},
|
|
380
|
-
|
|
556
|
+
jdhInput: {
|
|
381
557
|
defaultState: {
|
|
382
558
|
background: "Color_JDH_Gray_Background",
|
|
383
559
|
fontSize: "FontSizes_JDH_Text",
|
|
@@ -423,7 +599,7 @@ const defaultTheme$2 = {
|
|
|
423
599
|
color: "Color_JDH_Gray_AccentText"
|
|
424
600
|
}
|
|
425
601
|
},
|
|
426
|
-
|
|
602
|
+
jdhTextarea: {
|
|
427
603
|
defaultState: {
|
|
428
604
|
background: "Color_JDH_Gray_Background",
|
|
429
605
|
fontSize: "FontSizes_JDH_Text",
|
|
@@ -478,12 +654,12 @@ const defaultTheme$1 = {
|
|
|
478
654
|
FontSizes_JDH_TagText: 10
|
|
479
655
|
},
|
|
480
656
|
lineHeight: {
|
|
481
|
-
FontSizes_JDH_Headline1:
|
|
482
|
-
FontSizes_JDH_Headline2:
|
|
483
|
-
FontSizes_JDH_Title:
|
|
484
|
-
FontSizes_JDH_Text:
|
|
485
|
-
FontSizes_JDH_AccentText:
|
|
486
|
-
FontSizes_JDH_TagText:
|
|
657
|
+
FontSizes_JDH_Headline1: 35,
|
|
658
|
+
FontSizes_JDH_Headline2: 26,
|
|
659
|
+
FontSizes_JDH_Title: 23,
|
|
660
|
+
FontSizes_JDH_Text: 21,
|
|
661
|
+
FontSizes_JDH_AccentText: 18,
|
|
662
|
+
FontSizes_JDH_TagText: 15
|
|
487
663
|
},
|
|
488
664
|
color: {
|
|
489
665
|
Color_JDH_Primary: "#17CB8E",
|
|
@@ -529,7 +705,183 @@ const defaultTheme$1 = {
|
|
|
529
705
|
Radius_JDH_xs: 3
|
|
530
706
|
},
|
|
531
707
|
components: {
|
|
532
|
-
|
|
708
|
+
text: {
|
|
709
|
+
basic: {
|
|
710
|
+
fontSize: "FontSizes_JDH_Text",
|
|
711
|
+
lineHeight: "FontSizes_JDH_Text",
|
|
712
|
+
fontWeight: "FontWeight_JDH_Normal",
|
|
713
|
+
color: "Color_JDH_Gray_Text",
|
|
714
|
+
background: "#FFF",
|
|
715
|
+
margin: 0
|
|
716
|
+
},
|
|
717
|
+
variant: {
|
|
718
|
+
h1: {
|
|
719
|
+
fontSize: "FontSizes_JDH_Headline1",
|
|
720
|
+
lineHeight: "FontSizes_JDH_Headline1",
|
|
721
|
+
color: "Color_JDH_Gray_Headline",
|
|
722
|
+
fontWeight: "FontWeight_JDH_Medium"
|
|
723
|
+
},
|
|
724
|
+
h2: {
|
|
725
|
+
fontSize: "FontSizes_JDH_Headline2",
|
|
726
|
+
lineHeight: "FontSizes_JDH_Headline2",
|
|
727
|
+
color: "Color_JDH_Gray_Headline",
|
|
728
|
+
fontWeight: "FontWeight_JDH_Medium"
|
|
729
|
+
},
|
|
730
|
+
h3: {
|
|
731
|
+
fontSize: "FontSizes_JDH_Title",
|
|
732
|
+
lineHeight: "FontSizes_JDH_Title",
|
|
733
|
+
color: "Color_JDH_Gray_Headline",
|
|
734
|
+
fontWeight: "FontWeight_JDH_Medium"
|
|
735
|
+
},
|
|
736
|
+
h4: {
|
|
737
|
+
fontSize: "FontSizes_JDH_Title",
|
|
738
|
+
lineHeight: "FontSizes_JDH_Title",
|
|
739
|
+
color: "Color_JDH_Gray_Headline",
|
|
740
|
+
fontWeight: "FontWeight_JDH_Medium"
|
|
741
|
+
},
|
|
742
|
+
h5: {
|
|
743
|
+
fontSize: "FontSizes_JDH_Title",
|
|
744
|
+
lineHeight: "FontSizes_JDH_Title",
|
|
745
|
+
color: "Color_JDH_Gray_Headline",
|
|
746
|
+
fontWeight: "FontWeight_JDH_Medium"
|
|
747
|
+
},
|
|
748
|
+
body: {},
|
|
749
|
+
caption: {
|
|
750
|
+
fontSize: "FontSizes_JDH_AccentText",
|
|
751
|
+
lineHeight: "FontSizes_JDH_AccentText",
|
|
752
|
+
color: "Color_JDH_Gray_AccentText"
|
|
753
|
+
},
|
|
754
|
+
tag: {
|
|
755
|
+
fontSize: "FontSizes_JDH_TagText",
|
|
756
|
+
lineHeight: "FontSizes_JDH_TagText",
|
|
757
|
+
color: "Color_JDH_Gray_AccentText"
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
button: {
|
|
762
|
+
basicColor: {
|
|
763
|
+
color: "#FFF",
|
|
764
|
+
background: "#000",
|
|
765
|
+
borderColor: "rgb(217, 217, 217)",
|
|
766
|
+
fillBackground: "rgba(0, 0, 0, 0.04)"
|
|
767
|
+
},
|
|
768
|
+
color: {
|
|
769
|
+
default: {},
|
|
770
|
+
primary: {
|
|
771
|
+
color: "#FFF",
|
|
772
|
+
background: "rgb(22, 119, 255)",
|
|
773
|
+
borderColor: "rgb(22, 119, 255)",
|
|
774
|
+
fillBackground: "rgb(230, 244, 255)"
|
|
775
|
+
},
|
|
776
|
+
danger: {
|
|
777
|
+
color: "#FFF",
|
|
778
|
+
background: "rgb(255, 77, 79)",
|
|
779
|
+
borderColor: "rgb(255, 77, 79)",
|
|
780
|
+
fillBackground: "rgb(255, 242, 240)"
|
|
781
|
+
},
|
|
782
|
+
green: {
|
|
783
|
+
color: "#fff",
|
|
784
|
+
background: "rgb(82, 196, 26)",
|
|
785
|
+
borderColor: "rgb(82, 196, 26)",
|
|
786
|
+
fillBackground: "rgb(246, 255, 237)"
|
|
787
|
+
},
|
|
788
|
+
red: {
|
|
789
|
+
background: "rgb(245, 34, 45)",
|
|
790
|
+
borderColor: "rgb(245, 34, 45)",
|
|
791
|
+
fillBackground: "rgb(255, 241, 240)"
|
|
792
|
+
},
|
|
793
|
+
yellow: {
|
|
794
|
+
background: "rgb(250, 219, 20)",
|
|
795
|
+
borderColor: "rgb(250, 219, 20)",
|
|
796
|
+
fillBackground: "rgb(254, 255, 230)"
|
|
797
|
+
},
|
|
798
|
+
blue: {
|
|
799
|
+
color: "#FFF",
|
|
800
|
+
background: "rgb(22, 119, 255)",
|
|
801
|
+
borderColor: "rgb(22, 119, 255)",
|
|
802
|
+
fillBackground: "rgb(230, 244, 255)"
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
disabledColor: {
|
|
806
|
+
color: "rgba(0, 0, 0, 0.25)",
|
|
807
|
+
background: "rgba(0, 0, 0, 0.04)",
|
|
808
|
+
borderColor: "rgb(217, 217, 217)",
|
|
809
|
+
fillBackground: "rgba(0, 0, 0, 0.04)",
|
|
810
|
+
textLinkBackground: "#fff"
|
|
811
|
+
},
|
|
812
|
+
hoverColor: {
|
|
813
|
+
default: {
|
|
814
|
+
solidBackground: "rgba(0,0,0,0.75)",
|
|
815
|
+
outlineDashedTextColor: "#4096ff",
|
|
816
|
+
fillBackground: "rgba(0,0,0,0.06)",
|
|
817
|
+
textBackground: "rgba(0,0,0,0.04)"
|
|
818
|
+
},
|
|
819
|
+
primary: {
|
|
820
|
+
solidBackground: "#4096ff",
|
|
821
|
+
outlineDashedTextColor: "#4096ff",
|
|
822
|
+
fillBackground: "#bae0ff",
|
|
823
|
+
textBackground: "#e6f4ff"
|
|
824
|
+
},
|
|
825
|
+
danger: {
|
|
826
|
+
solidBackground: "#ff7875",
|
|
827
|
+
outlineDashedTextColor: "#ff7875",
|
|
828
|
+
fillBackground: "#ffdfdc",
|
|
829
|
+
textBackground: "#fff2f0"
|
|
830
|
+
},
|
|
831
|
+
green: {
|
|
832
|
+
solidBackground: "#73d13d",
|
|
833
|
+
outlineDashedTextColor: "#73d13d",
|
|
834
|
+
fillBackground: "#d9f7be",
|
|
835
|
+
textBackground: "#f6ffed"
|
|
836
|
+
},
|
|
837
|
+
red: {
|
|
838
|
+
solidBackground: "#ff4d4f",
|
|
839
|
+
outlineDashedTextColor: "#ff4d4f",
|
|
840
|
+
fillBackground: "#ffccc7",
|
|
841
|
+
textBackground: "#fff1f0"
|
|
842
|
+
},
|
|
843
|
+
blue: {
|
|
844
|
+
solidBackground: "#4096ff",
|
|
845
|
+
outlineDashedTextColor: "#4096ff",
|
|
846
|
+
fillBackground: "#bae0ff",
|
|
847
|
+
textBackground: "#e6f4ff"
|
|
848
|
+
},
|
|
849
|
+
yellow: {
|
|
850
|
+
solidBackground: "#ffec3d",
|
|
851
|
+
outlineDashedTextColor: "#ffec3d",
|
|
852
|
+
fillBackground: "#ffffb8",
|
|
853
|
+
textBackground: "#feffe6"
|
|
854
|
+
}
|
|
855
|
+
},
|
|
856
|
+
basicSize: {
|
|
857
|
+
fontSize: 14,
|
|
858
|
+
lineHeight: 22,
|
|
859
|
+
padding: [4, 15],
|
|
860
|
+
borderRadius: 6,
|
|
861
|
+
minWidth: "auto"
|
|
862
|
+
},
|
|
863
|
+
size: {
|
|
864
|
+
small: {
|
|
865
|
+
padding: [0, 7]
|
|
866
|
+
},
|
|
867
|
+
middle: {},
|
|
868
|
+
large: {
|
|
869
|
+
fontSize: 16,
|
|
870
|
+
lineHeight: 25,
|
|
871
|
+
borderRadius: 8,
|
|
872
|
+
padding: [6.5, 15]
|
|
873
|
+
}
|
|
874
|
+
},
|
|
875
|
+
icon: {
|
|
876
|
+
borderRadius: 2,
|
|
877
|
+
margin: [0, 8, 0, 0]
|
|
878
|
+
},
|
|
879
|
+
loading: {
|
|
880
|
+
opacity: 0.65
|
|
881
|
+
},
|
|
882
|
+
loadingIcon: ""
|
|
883
|
+
},
|
|
884
|
+
jdhCard: {
|
|
533
885
|
wrap: {
|
|
534
886
|
background: "Color_JDH_Gray_Background",
|
|
535
887
|
padding: "Spacing_JDH_xxl"
|
|
@@ -554,7 +906,7 @@ const defaultTheme$1 = {
|
|
|
554
906
|
borderRadius: "Radius_JDH_xl"
|
|
555
907
|
}
|
|
556
908
|
},
|
|
557
|
-
|
|
909
|
+
jdhChoice: {
|
|
558
910
|
wrap: {
|
|
559
911
|
padding: [6.5, 16],
|
|
560
912
|
layoutSmallPadding: [5.5, 10],
|
|
@@ -606,7 +958,7 @@ const defaultTheme$1 = {
|
|
|
606
958
|
},
|
|
607
959
|
disabledOpacity: 0.4
|
|
608
960
|
},
|
|
609
|
-
|
|
961
|
+
jdhButton: {
|
|
610
962
|
colorStyle: {
|
|
611
963
|
solid: {
|
|
612
964
|
primary: {
|
|
@@ -694,7 +1046,7 @@ const defaultTheme$1 = {
|
|
|
694
1046
|
},
|
|
695
1047
|
disabledOpacity: 0.4
|
|
696
1048
|
},
|
|
697
|
-
|
|
1049
|
+
jdhInput: {
|
|
698
1050
|
defaultState: {
|
|
699
1051
|
background: "Color_JDH_Gray_Background",
|
|
700
1052
|
fontSize: "FontSizes_JDH_Text",
|
|
@@ -740,7 +1092,7 @@ const defaultTheme$1 = {
|
|
|
740
1092
|
color: "Color_JDH_Gray_AccentText"
|
|
741
1093
|
}
|
|
742
1094
|
},
|
|
743
|
-
|
|
1095
|
+
jdhTextarea: {
|
|
744
1096
|
defaultState: {
|
|
745
1097
|
background: "Color_JDH_Gray_Background",
|
|
746
1098
|
fontSize: "FontSizes_JDH_Text",
|
|
@@ -786,25 +1138,25 @@ const defaultTheme$1 = {
|
|
|
786
1138
|
}
|
|
787
1139
|
};
|
|
788
1140
|
const DEFAULT_SCALE = 0.5;
|
|
789
|
-
var __defProp$
|
|
790
|
-
var __defProps$
|
|
791
|
-
var __getOwnPropDescs$
|
|
792
|
-
var __getOwnPropSymbols$
|
|
793
|
-
var __hasOwnProp$
|
|
794
|
-
var __propIsEnum$
|
|
795
|
-
var __defNormalProp$
|
|
796
|
-
var __spreadValues$
|
|
1141
|
+
var __defProp$y = Object.defineProperty;
|
|
1142
|
+
var __defProps$t = Object.defineProperties;
|
|
1143
|
+
var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
|
|
1144
|
+
var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
|
|
1145
|
+
var __hasOwnProp$v = Object.prototype.hasOwnProperty;
|
|
1146
|
+
var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
|
|
1147
|
+
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1148
|
+
var __spreadValues$v = (a, b3) => {
|
|
797
1149
|
for (var prop in b3 || (b3 = {}))
|
|
798
|
-
if (__hasOwnProp$
|
|
799
|
-
__defNormalProp$
|
|
800
|
-
if (__getOwnPropSymbols$
|
|
801
|
-
for (var prop of __getOwnPropSymbols$
|
|
802
|
-
if (__propIsEnum$
|
|
803
|
-
__defNormalProp$
|
|
1150
|
+
if (__hasOwnProp$v.call(b3, prop))
|
|
1151
|
+
__defNormalProp$y(a, prop, b3[prop]);
|
|
1152
|
+
if (__getOwnPropSymbols$v)
|
|
1153
|
+
for (var prop of __getOwnPropSymbols$v(b3)) {
|
|
1154
|
+
if (__propIsEnum$v.call(b3, prop))
|
|
1155
|
+
__defNormalProp$y(a, prop, b3[prop]);
|
|
804
1156
|
}
|
|
805
1157
|
return a;
|
|
806
1158
|
};
|
|
807
|
-
var __spreadProps$
|
|
1159
|
+
var __spreadProps$t = (a, b3) => __defProps$t(a, __getOwnPropDescs$t(b3));
|
|
808
1160
|
const ThemeContext = React.createContext(defaultTheme$2);
|
|
809
1161
|
const ThemeProvider = ({
|
|
810
1162
|
scale = DEFAULT_SCALE,
|
|
@@ -813,13 +1165,13 @@ const ThemeProvider = ({
|
|
|
813
1165
|
}) => {
|
|
814
1166
|
const merged = React.useMemo(() => {
|
|
815
1167
|
const base = scale <= DEFAULT_SCALE ? defaultTheme$2 : defaultTheme$1;
|
|
816
|
-
return __spreadProps$
|
|
817
|
-
fontSize: __spreadValues$
|
|
818
|
-
color: __spreadValues$
|
|
819
|
-
backgroundColor: __spreadValues$
|
|
820
|
-
fontWeight: __spreadValues$
|
|
821
|
-
space: __spreadValues$
|
|
822
|
-
borderRadius: __spreadValues$
|
|
1168
|
+
return __spreadProps$t(__spreadValues$v(__spreadValues$v({}, base), theme || {}), {
|
|
1169
|
+
fontSize: __spreadValues$v(__spreadValues$v({}, base.fontSize), (theme == null ? void 0 : theme.fontSize) || {}),
|
|
1170
|
+
color: __spreadValues$v(__spreadValues$v({}, base.color), (theme == null ? void 0 : theme.color) || {}),
|
|
1171
|
+
backgroundColor: __spreadValues$v(__spreadValues$v({}, base.color), (theme == null ? void 0 : theme.color) || {}),
|
|
1172
|
+
fontWeight: __spreadValues$v(__spreadValues$v({}, base.fontWeight), (theme == null ? void 0 : theme.fontWeight) || {}),
|
|
1173
|
+
space: __spreadValues$v(__spreadValues$v({}, base.space), (theme == null ? void 0 : theme.space) || {}),
|
|
1174
|
+
borderRadius: __spreadValues$v(__spreadValues$v({}, base.borderRadius), (theme == null ? void 0 : theme.borderRadius) || {})
|
|
823
1175
|
});
|
|
824
1176
|
}, [theme]);
|
|
825
1177
|
return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: merged, children });
|
|
@@ -2284,7 +2636,9 @@ const compileToTree = (template, data = {}, editorMode2 = false) => {
|
|
|
2284
2636
|
"actions",
|
|
2285
2637
|
"renderActions",
|
|
2286
2638
|
"border",
|
|
2287
|
-
"backgroundImage"
|
|
2639
|
+
"backgroundImage",
|
|
2640
|
+
"backgroundLinearGradient",
|
|
2641
|
+
"boxShadow"
|
|
2288
2642
|
]
|
|
2289
2643
|
},
|
|
2290
2644
|
runtime: {
|
|
@@ -2292,7 +2646,9 @@ const compileToTree = (template, data = {}, editorMode2 = false) => {
|
|
|
2292
2646
|
"actions",
|
|
2293
2647
|
"renderActions",
|
|
2294
2648
|
"border",
|
|
2295
|
-
"backgroundImage"
|
|
2649
|
+
"backgroundImage",
|
|
2650
|
+
"backgroundLinearGradient",
|
|
2651
|
+
"boxShadow"
|
|
2296
2652
|
],
|
|
2297
2653
|
editorMode: editorMode2
|
|
2298
2654
|
}
|
|
@@ -4627,33 +4983,33 @@ var lib = {
|
|
|
4627
4983
|
stringify: stringify2
|
|
4628
4984
|
};
|
|
4629
4985
|
const qs = /* @__PURE__ */ getDefaultExportFromCjs(lib);
|
|
4630
|
-
var __defProp$
|
|
4631
|
-
var __defProps$
|
|
4632
|
-
var __getOwnPropDescs$
|
|
4633
|
-
var __getOwnPropSymbols$
|
|
4634
|
-
var __hasOwnProp$
|
|
4635
|
-
var __propIsEnum$
|
|
4636
|
-
var __defNormalProp$
|
|
4637
|
-
var __spreadValues$
|
|
4986
|
+
var __defProp$x = Object.defineProperty;
|
|
4987
|
+
var __defProps$s = Object.defineProperties;
|
|
4988
|
+
var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
|
|
4989
|
+
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
|
|
4990
|
+
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
|
|
4991
|
+
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
|
|
4992
|
+
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4993
|
+
var __spreadValues$u = (a, b3) => {
|
|
4638
4994
|
for (var prop in b3 || (b3 = {}))
|
|
4639
|
-
if (__hasOwnProp$
|
|
4640
|
-
__defNormalProp$
|
|
4641
|
-
if (__getOwnPropSymbols$
|
|
4642
|
-
for (var prop of __getOwnPropSymbols$
|
|
4643
|
-
if (__propIsEnum$
|
|
4644
|
-
__defNormalProp$
|
|
4995
|
+
if (__hasOwnProp$u.call(b3, prop))
|
|
4996
|
+
__defNormalProp$x(a, prop, b3[prop]);
|
|
4997
|
+
if (__getOwnPropSymbols$u)
|
|
4998
|
+
for (var prop of __getOwnPropSymbols$u(b3)) {
|
|
4999
|
+
if (__propIsEnum$u.call(b3, prop))
|
|
5000
|
+
__defNormalProp$x(a, prop, b3[prop]);
|
|
4645
5001
|
}
|
|
4646
5002
|
return a;
|
|
4647
5003
|
};
|
|
4648
|
-
var __spreadProps$
|
|
4649
|
-
var __objRest
|
|
5004
|
+
var __spreadProps$s = (a, b3) => __defProps$s(a, __getOwnPropDescs$s(b3));
|
|
5005
|
+
var __objRest = (source, exclude) => {
|
|
4650
5006
|
var target = {};
|
|
4651
5007
|
for (var prop in source)
|
|
4652
|
-
if (__hasOwnProp$
|
|
5008
|
+
if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
4653
5009
|
target[prop] = source[prop];
|
|
4654
|
-
if (source != null && __getOwnPropSymbols$
|
|
4655
|
-
for (var prop of __getOwnPropSymbols$
|
|
4656
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
5010
|
+
if (source != null && __getOwnPropSymbols$u)
|
|
5011
|
+
for (var prop of __getOwnPropSymbols$u(source)) {
|
|
5012
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
|
|
4657
5013
|
target[prop] = source[prop];
|
|
4658
5014
|
}
|
|
4659
5015
|
return target;
|
|
@@ -4696,7 +5052,7 @@ const manageAutoScrollDisable = (ctx, timeout = 500) => {
|
|
|
4696
5052
|
return { startDisable, endDisable };
|
|
4697
5053
|
};
|
|
4698
5054
|
const handleNavigateTo = async (config) => {
|
|
4699
|
-
const _a2 = config.params || {}, { url, params, delayH5 } = _a2, restOptions = __objRest
|
|
5055
|
+
const _a2 = config.params || {}, { url, params, delayH5 } = _a2, restOptions = __objRest(_a2, ["url", "params", "delayH5"]);
|
|
4700
5056
|
if (delayH5 > 0) {
|
|
4701
5057
|
setTimeout(() => jumpRouter(url, params, restOptions), delayH5);
|
|
4702
5058
|
} else {
|
|
@@ -4722,12 +5078,12 @@ const jumpRouter = (url, params = {}, opt = {}) => {
|
|
|
4722
5078
|
const handleSendMessage = (config, { ctx, metadata }) => {
|
|
4723
5079
|
var _a2, _c;
|
|
4724
5080
|
if ((_a2 = config.params) == null ? void 0 : _a2.text) {
|
|
4725
|
-
const _b = config.params, { text } = _b, rest = __objRest
|
|
5081
|
+
const _b = config.params, { text } = _b, rest = __objRest(_b, ["text"]);
|
|
4726
5082
|
(_c = ctx == null ? void 0 : ctx.postMessage) == null ? void 0 : _c.call(ctx, {
|
|
4727
5083
|
type: "text",
|
|
4728
5084
|
data: {
|
|
4729
5085
|
text,
|
|
4730
|
-
customJsonData: __spreadValues$
|
|
5086
|
+
customJsonData: __spreadValues$u({
|
|
4731
5087
|
customBiz: metadata == null ? void 0 : metadata.customBiz
|
|
4732
5088
|
}, rest || {})
|
|
4733
5089
|
}
|
|
@@ -4750,16 +5106,16 @@ const handleUpdateLocalData = async (config, { setValues, extra }) => {
|
|
|
4750
5106
|
const oldValue = prev == null ? void 0 : prev[key];
|
|
4751
5107
|
const isOldEmpty = oldValue === void 0 || oldValue === null || oldValue === "" || typeof oldValue === "object" && Object.keys(oldValue).length === 0;
|
|
4752
5108
|
if (isOldEmpty) {
|
|
4753
|
-
return __spreadProps$
|
|
5109
|
+
return __spreadProps$s(__spreadValues$u({}, prev || {}), {
|
|
4754
5110
|
[key]: targetValue
|
|
4755
5111
|
});
|
|
4756
5112
|
}
|
|
4757
5113
|
if (typeof oldValue === "object" && typeof targetValue === "object" && !Array.isArray(oldValue) && !Array.isArray(targetValue) && oldValue !== null && targetValue !== null) {
|
|
4758
|
-
return __spreadProps$
|
|
4759
|
-
[key]: __spreadValues$
|
|
5114
|
+
return __spreadProps$s(__spreadValues$u({}, prev || {}), {
|
|
5115
|
+
[key]: __spreadValues$u(__spreadValues$u({}, oldValue), targetValue)
|
|
4760
5116
|
});
|
|
4761
5117
|
}
|
|
4762
|
-
return __spreadProps$
|
|
5118
|
+
return __spreadProps$s(__spreadValues$u({}, prev || {}), {
|
|
4763
5119
|
[key]: targetValue
|
|
4764
5120
|
});
|
|
4765
5121
|
});
|
|
@@ -4772,7 +5128,7 @@ const handleAddLocalDataToSet = (config, { setValues }) => {
|
|
|
4772
5128
|
if (set.indexOf(value) === -1) {
|
|
4773
5129
|
set.push(value);
|
|
4774
5130
|
}
|
|
4775
|
-
return __spreadProps$
|
|
5131
|
+
return __spreadProps$s(__spreadValues$u({}, prev), { [updateKey]: set });
|
|
4776
5132
|
});
|
|
4777
5133
|
};
|
|
4778
5134
|
const handleRemoveLocalDataToSet = (config, { setValues }) => {
|
|
@@ -4780,7 +5136,7 @@ const handleRemoveLocalDataToSet = (config, { setValues }) => {
|
|
|
4780
5136
|
const { updateKey, value } = config.params;
|
|
4781
5137
|
setValues((prev = {}) => {
|
|
4782
5138
|
const set = Array.isArray(prev[updateKey]) ? [...prev[updateKey].filter((v2) => v2 !== value)] : [];
|
|
4783
|
-
return __spreadProps$
|
|
5139
|
+
return __spreadProps$s(__spreadValues$u({}, prev), { [updateKey]: set });
|
|
4784
5140
|
});
|
|
4785
5141
|
};
|
|
4786
5142
|
const handleToggleLocalDataToSet = (config, { setValues }) => {
|
|
@@ -4794,7 +5150,7 @@ const handleToggleLocalDataToSet = (config, { setValues }) => {
|
|
|
4794
5150
|
} else {
|
|
4795
5151
|
set.splice(valueIndex, 1);
|
|
4796
5152
|
}
|
|
4797
|
-
return __spreadProps$
|
|
5153
|
+
return __spreadProps$s(__spreadValues$u({}, prev), { [updateKey]: set });
|
|
4798
5154
|
});
|
|
4799
5155
|
};
|
|
4800
5156
|
const handleCallApiUpdateData = (config, { onAction, commonPayload }) => {
|
|
@@ -4821,7 +5177,7 @@ const handleShowPopup = (config, { originProps }) => {
|
|
|
4821
5177
|
ctx.getComponent({
|
|
4822
5178
|
code: (_b = config == null ? void 0 : config.params) == null ? void 0 : _b.componentCode
|
|
4823
5179
|
}),
|
|
4824
|
-
__spreadValues$
|
|
5180
|
+
__spreadValues$u(__spreadValues$u({}, originProps), ((_c = config == null ? void 0 : config.params) == null ? void 0 : _c.params) || {}),
|
|
4825
5181
|
{
|
|
4826
5182
|
background: "none",
|
|
4827
5183
|
position: "bottom",
|
|
@@ -4976,27 +5332,45 @@ const RenderActionWrapper = ({
|
|
|
4976
5332
|
}
|
|
4977
5333
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
4978
5334
|
};
|
|
4979
|
-
var __defProp$
|
|
4980
|
-
var __defProps$
|
|
4981
|
-
var __getOwnPropDescs$
|
|
4982
|
-
var __getOwnPropSymbols$
|
|
4983
|
-
var __hasOwnProp$
|
|
4984
|
-
var __propIsEnum$
|
|
4985
|
-
var __defNormalProp$
|
|
4986
|
-
var __spreadValues$
|
|
5335
|
+
var __defProp$w = Object.defineProperty;
|
|
5336
|
+
var __defProps$r = Object.defineProperties;
|
|
5337
|
+
var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
|
|
5338
|
+
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
5339
|
+
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
5340
|
+
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
5341
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5342
|
+
var __spreadValues$t = (a, b3) => {
|
|
4987
5343
|
for (var prop in b3 || (b3 = {}))
|
|
4988
|
-
if (__hasOwnProp$
|
|
4989
|
-
__defNormalProp$
|
|
4990
|
-
if (__getOwnPropSymbols$
|
|
4991
|
-
for (var prop of __getOwnPropSymbols$
|
|
4992
|
-
if (__propIsEnum$
|
|
4993
|
-
__defNormalProp$
|
|
5344
|
+
if (__hasOwnProp$t.call(b3, prop))
|
|
5345
|
+
__defNormalProp$w(a, prop, b3[prop]);
|
|
5346
|
+
if (__getOwnPropSymbols$t)
|
|
5347
|
+
for (var prop of __getOwnPropSymbols$t(b3)) {
|
|
5348
|
+
if (__propIsEnum$t.call(b3, prop))
|
|
5349
|
+
__defNormalProp$w(a, prop, b3[prop]);
|
|
4994
5350
|
}
|
|
4995
5351
|
return a;
|
|
4996
5352
|
};
|
|
4997
|
-
var __spreadProps$
|
|
5353
|
+
var __spreadProps$r = (a, b3) => __defProps$r(a, __getOwnPropDescs$r(b3));
|
|
5354
|
+
function pick(obj, keys) {
|
|
5355
|
+
const result = {};
|
|
5356
|
+
keys.forEach((key) => {
|
|
5357
|
+
if (key in obj) {
|
|
5358
|
+
result[key] = obj[key];
|
|
5359
|
+
}
|
|
5360
|
+
});
|
|
5361
|
+
return result;
|
|
5362
|
+
}
|
|
5363
|
+
function mapToType(obj, callback) {
|
|
5364
|
+
const result = {};
|
|
5365
|
+
for (const key in obj) {
|
|
5366
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
5367
|
+
result[key] = callback(obj[key], key);
|
|
5368
|
+
}
|
|
5369
|
+
}
|
|
5370
|
+
return result;
|
|
5371
|
+
}
|
|
4998
5372
|
const baseContainerStyle = (props, scale = 1) => {
|
|
4999
|
-
const style = __spreadValues$
|
|
5373
|
+
const style = __spreadValues$t({}, (props == null ? void 0 : props.style) || {});
|
|
5000
5374
|
return style;
|
|
5001
5375
|
};
|
|
5002
5376
|
const childGapStyle = (index, count, theme, gap, horizontal, scale = 1, isWrap = false) => {
|
|
@@ -5026,7 +5400,7 @@ const resolveSpace = (val, theme, scale = 1) => {
|
|
|
5026
5400
|
}
|
|
5027
5401
|
return val;
|
|
5028
5402
|
};
|
|
5029
|
-
const
|
|
5403
|
+
const paddingLogogramToStyle = (padding, theme, scale = 1) => {
|
|
5030
5404
|
if (padding == null) return {};
|
|
5031
5405
|
if (typeof padding === "number" || typeof padding === "string") {
|
|
5032
5406
|
return { padding: resolveSpace(padding, theme, scale) };
|
|
@@ -5069,7 +5443,7 @@ const paddingToStyle = (padding, theme, scale = 1) => {
|
|
|
5069
5443
|
}
|
|
5070
5444
|
return {};
|
|
5071
5445
|
};
|
|
5072
|
-
const
|
|
5446
|
+
const marginLogogramToStyle = (margin, theme, scale = 1) => {
|
|
5073
5447
|
if (margin == null) return {};
|
|
5074
5448
|
if (typeof margin === "number" || typeof margin === "string") {
|
|
5075
5449
|
return { margin: resolveSpace(margin, theme, scale) };
|
|
@@ -5106,16 +5480,57 @@ const marginToStyle = (margin, theme, scale = 1) => {
|
|
|
5106
5480
|
}
|
|
5107
5481
|
return {};
|
|
5108
5482
|
};
|
|
5109
|
-
const
|
|
5483
|
+
const marginAndPaddingToStyle = (marginAndPadding, theme, scale = 1) => {
|
|
5484
|
+
const style = {};
|
|
5485
|
+
if (marginAndPadding.margin) {
|
|
5486
|
+
Object.assign(
|
|
5487
|
+
style,
|
|
5488
|
+
marginLogogramToStyle(marginAndPadding.margin, theme, scale)
|
|
5489
|
+
);
|
|
5490
|
+
}
|
|
5491
|
+
if (marginAndPadding.padding) {
|
|
5492
|
+
Object.assign(
|
|
5493
|
+
style,
|
|
5494
|
+
paddingLogogramToStyle(marginAndPadding.padding, theme, scale)
|
|
5495
|
+
);
|
|
5496
|
+
}
|
|
5497
|
+
Object.assign(
|
|
5498
|
+
style,
|
|
5499
|
+
mapToType(
|
|
5500
|
+
pick(marginAndPadding, [
|
|
5501
|
+
"marginBottom",
|
|
5502
|
+
"marginLeft",
|
|
5503
|
+
"marginRight",
|
|
5504
|
+
"marginTop",
|
|
5505
|
+
"paddingBottom",
|
|
5506
|
+
"paddingLeft",
|
|
5507
|
+
"paddingRight",
|
|
5508
|
+
"paddingTop"
|
|
5509
|
+
]),
|
|
5510
|
+
(v2) => resolveSpace(v2, theme, scale)
|
|
5511
|
+
)
|
|
5512
|
+
);
|
|
5513
|
+
return style;
|
|
5514
|
+
};
|
|
5515
|
+
const resolvedLineHeight = (lineHeight, theme, scale = 1, notAddUnit = false) => {
|
|
5110
5516
|
if (typeof lineHeight === "number") {
|
|
5111
|
-
return runStyle(lineHeight, scale);
|
|
5517
|
+
return runStyle(lineHeight, scale, notAddUnit);
|
|
5112
5518
|
}
|
|
5113
5519
|
if (theme.lineHeight[lineHeight]) {
|
|
5114
|
-
return runStyle(theme.lineHeight[lineHeight], scale);
|
|
5520
|
+
return runStyle(theme.lineHeight[lineHeight], scale, notAddUnit);
|
|
5115
5521
|
}
|
|
5116
5522
|
return lineHeight;
|
|
5117
5523
|
};
|
|
5118
|
-
const
|
|
5524
|
+
const resolvedFontSize = (lineHeight, theme, scale = 1, notAddUnit = false) => {
|
|
5525
|
+
if (typeof lineHeight === "number") {
|
|
5526
|
+
return runStyle(lineHeight, scale, notAddUnit);
|
|
5527
|
+
}
|
|
5528
|
+
if (theme.fontSize[lineHeight]) {
|
|
5529
|
+
return runStyle(theme.fontSize[lineHeight], scale, notAddUnit);
|
|
5530
|
+
}
|
|
5531
|
+
return lineHeight;
|
|
5532
|
+
};
|
|
5533
|
+
const textStyleFromTheme = (theme, opts, scale = 1) => {
|
|
5119
5534
|
var _a2, _b, _c, _d, _e2, _f;
|
|
5120
5535
|
const style = {};
|
|
5121
5536
|
if (!opts) return style;
|
|
@@ -5178,6 +5593,52 @@ const backgroundToStyle = (background, theme) => {
|
|
|
5178
5593
|
}
|
|
5179
5594
|
return style;
|
|
5180
5595
|
};
|
|
5596
|
+
const parseLinerGradient = (linerGradient, theme) => {
|
|
5597
|
+
const { colors = [], angle, stops = [] } = linerGradient;
|
|
5598
|
+
const gradientArr = [];
|
|
5599
|
+
if (angle) {
|
|
5600
|
+
gradientArr.push(`${angle}deg`);
|
|
5601
|
+
}
|
|
5602
|
+
if (colors.length !== stops.length) {
|
|
5603
|
+
stops.length = 0;
|
|
5604
|
+
}
|
|
5605
|
+
colors.forEach((v2, i) => {
|
|
5606
|
+
gradientArr.push(
|
|
5607
|
+
`${resolveColor(v2, theme)}${typeof stops[i] === "number" ? " " + String(stops[i] * 100) + "%" : ""}`
|
|
5608
|
+
);
|
|
5609
|
+
});
|
|
5610
|
+
return `linear-gradient(${gradientArr.join(", ")})`;
|
|
5611
|
+
};
|
|
5612
|
+
const backgroundImagePositionPropsMap = {
|
|
5613
|
+
topLeft: "top left",
|
|
5614
|
+
center: "center",
|
|
5615
|
+
topRight: "top right",
|
|
5616
|
+
bottomRight: "bottom right",
|
|
5617
|
+
bottomLeft: "bottom left"
|
|
5618
|
+
};
|
|
5619
|
+
const backgroundImageRepeatPropsMap = {
|
|
5620
|
+
noRepeat: "no-repeat",
|
|
5621
|
+
repeat: "repeat",
|
|
5622
|
+
repeatX: "repeat-x",
|
|
5623
|
+
repeatY: "repeat-y"
|
|
5624
|
+
};
|
|
5625
|
+
const backgroundImageAndLinearGradientToStyle = (theme, backgroundImage, backgroundLinearGradient) => {
|
|
5626
|
+
if (!backgroundImage && !backgroundLinearGradient) return {};
|
|
5627
|
+
const linearGradientString = backgroundLinearGradient ? parseLinerGradient(backgroundLinearGradient, theme) : void 0;
|
|
5628
|
+
const backgroundImageArr = [];
|
|
5629
|
+
if (backgroundImage == null ? void 0 : backgroundImage.url) {
|
|
5630
|
+
backgroundImageArr.push(`url(${backgroundImage.url})`);
|
|
5631
|
+
}
|
|
5632
|
+
if (linearGradientString) {
|
|
5633
|
+
backgroundImageArr.push(linearGradientString);
|
|
5634
|
+
}
|
|
5635
|
+
return {
|
|
5636
|
+
backgroundImage: backgroundImageArr.join(", "),
|
|
5637
|
+
backgroundPosition: (backgroundImage == null ? void 0 : backgroundImage.alignment) && backgroundImagePositionPropsMap[backgroundImage.alignment] ? backgroundImagePositionPropsMap[backgroundImage.alignment] : "center",
|
|
5638
|
+
backgroundSize: typeof (backgroundImage == null ? void 0 : backgroundImage.objectFit) !== "string" ? "auto" : backgroundImage.objectFit === "fill" ? "100% 100%" : backgroundImage.objectFit,
|
|
5639
|
+
backgroundRepeat: (backgroundImage == null ? void 0 : backgroundImage.repeat) && backgroundImageRepeatPropsMap[backgroundImage.repeat] ? backgroundImageRepeatPropsMap[backgroundImage.repeat] : "no-repeat"
|
|
5640
|
+
};
|
|
5641
|
+
};
|
|
5181
5642
|
const borderRadiusToStyle = (borderRadius, theme, scale = 1) => {
|
|
5182
5643
|
const borderRadiusMap = (theme == null ? void 0 : theme.borderRadius) || {};
|
|
5183
5644
|
const style = {};
|
|
@@ -5237,19 +5698,23 @@ const borderToStyle = (border, theme, scale = 1) => {
|
|
|
5237
5698
|
}
|
|
5238
5699
|
return style;
|
|
5239
5700
|
};
|
|
5701
|
+
const resolveBoxShadow = ({ boxShadow }, theme, scale = 1) => {
|
|
5702
|
+
if (!boxShadow) return void 0;
|
|
5703
|
+
const { color: color2, offset = [], blurRadius = 0, spreadRadius = 0 } = boxShadow;
|
|
5704
|
+
const [offsetX = 0, offsetY = 0] = offset;
|
|
5705
|
+
return `${resolveSpace(offsetX, theme, scale)} ${resolveSpace(offsetY, theme, scale)} ${resolveSpace(blurRadius, theme, scale)} ${resolveSpace(spreadRadius, theme, scale)} ${resolveColor(color2, theme)}`;
|
|
5706
|
+
};
|
|
5240
5707
|
const imageStyleFromProps = (props, theme, scale = 1) => {
|
|
5241
|
-
const style = __spreadValues$
|
|
5708
|
+
const style = __spreadValues$t(__spreadValues$t({}, borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale)), marginAndPaddingToStyle(props, theme, scale));
|
|
5242
5709
|
if (props.width != null) style.width = runStyle(props.width, scale) || "100%";
|
|
5243
5710
|
if (props.height != null)
|
|
5244
5711
|
style.height = runStyle(props.height, scale) || "auto";
|
|
5245
5712
|
if (props.fit) style.objectFit = props.fit;
|
|
5246
|
-
style.display = props.display || "flex";
|
|
5247
|
-
Object.assign(style, marginToStyle(props == null ? void 0 : props.margin, theme, scale));
|
|
5248
5713
|
if (props.style) Object.assign(style, props.style);
|
|
5249
5714
|
return style;
|
|
5250
5715
|
};
|
|
5251
5716
|
const imageViewStyleFromProps = (props, theme, scale = 1) => {
|
|
5252
|
-
const style = __spreadValues$
|
|
5717
|
+
const style = __spreadValues$t({
|
|
5253
5718
|
overflow: "hidden"
|
|
5254
5719
|
}, borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale));
|
|
5255
5720
|
return style;
|
|
@@ -5258,9 +5723,7 @@ const fractionWidth = (percent) => ({
|
|
|
5258
5723
|
width: percent
|
|
5259
5724
|
});
|
|
5260
5725
|
const buildItemContainerStyle = (index, count, theme, props, horizontal = false, scale = 1, isWrap = false) => {
|
|
5261
|
-
const style = __spreadValues$
|
|
5262
|
-
width: (props == null ? void 0 : props.flexDirection) === "row" ? "auto" : "100%",
|
|
5263
|
-
flexDirection: props.direction || "column",
|
|
5726
|
+
const style = __spreadValues$t({
|
|
5264
5727
|
minWidth: 0,
|
|
5265
5728
|
height: "auto",
|
|
5266
5729
|
boxSizing: "border-box",
|
|
@@ -5277,21 +5740,24 @@ const buildItemContainerStyle = (index, count, theme, props, horizontal = false,
|
|
|
5277
5740
|
return style;
|
|
5278
5741
|
};
|
|
5279
5742
|
const buildLayoutContainerStyle = (props, direction, theme, scale = 1) => {
|
|
5280
|
-
const style = __spreadValues$
|
|
5743
|
+
const style = __spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t({
|
|
5281
5744
|
display: "flex",
|
|
5282
5745
|
boxSizing: "border-box",
|
|
5283
5746
|
width: runStyle(props == null ? void 0 : props.width, scale) || "100%",
|
|
5284
5747
|
height: runStyle(props == null ? void 0 : props.height, scale) || "auto",
|
|
5285
5748
|
position: "relative",
|
|
5286
5749
|
flexDirection: direction || "column",
|
|
5287
|
-
overflow: props.overflow || "visible"
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5750
|
+
overflow: props.overflow || "visible",
|
|
5751
|
+
boxShadow: resolveBoxShadow(props, theme, scale)
|
|
5752
|
+
}, justifyContentToStyle(props == null ? void 0 : props.alignItems, props == null ? void 0 : props.justifyContent)), backgroundToStyle(props == null ? void 0 : props.background, theme)), borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale)), borderToStyle(props == null ? void 0 : props.border, theme, scale)), baseContainerStyle(props, scale)), marginAndPaddingToStyle(props, theme, scale)), backgroundImageAndLinearGradientToStyle(
|
|
5753
|
+
theme,
|
|
5754
|
+
props.backgroundImage,
|
|
5755
|
+
props.backgroundLinearGradient
|
|
5756
|
+
));
|
|
5291
5757
|
return style;
|
|
5292
5758
|
};
|
|
5293
5759
|
const buildAbsoluteLayoutStyle = (props, direction, theme, scale = 1) => {
|
|
5294
|
-
const style = __spreadProps$
|
|
5760
|
+
const style = __spreadProps$r(__spreadValues$t(__spreadValues$t({}, buildLayoutContainerStyle(props, direction, theme, scale)), borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale)), {
|
|
5295
5761
|
position: "absolute",
|
|
5296
5762
|
zIndex: 1
|
|
5297
5763
|
});
|
|
@@ -5309,17 +5775,17 @@ const buildAbsoluteLayoutStyle = (props, direction, theme, scale = 1) => {
|
|
|
5309
5775
|
return style;
|
|
5310
5776
|
};
|
|
5311
5777
|
const numberTestRegexp = /^-?\d+(\.\d+)?$/;
|
|
5312
|
-
const runStyle = (val, scale = 0.5) => {
|
|
5778
|
+
const runStyle = (val, scale = 0.5, notAddUnit = false) => {
|
|
5313
5779
|
if (val === void 0 || val === null) return "";
|
|
5314
5780
|
const parts = Array.isArray(val) ? val : String(val).trim().split(/\s+/);
|
|
5315
5781
|
const final = parts.map((item) => {
|
|
5316
5782
|
if (item === 0 || item === "0" || item === "0px") return "0";
|
|
5317
5783
|
if (typeof item === "number") {
|
|
5318
|
-
return `${item * scale}px`;
|
|
5784
|
+
return `${item * scale}${notAddUnit ? "" : "px"}`;
|
|
5319
5785
|
}
|
|
5320
5786
|
if (typeof item === "string") {
|
|
5321
5787
|
if (!numberTestRegexp.test(item)) return item;
|
|
5322
|
-
return `${parseFloat(item) * scale}px`;
|
|
5788
|
+
return `${parseFloat(item) * scale}${notAddUnit ? "" : "px"}`;
|
|
5323
5789
|
}
|
|
5324
5790
|
return item;
|
|
5325
5791
|
}).join(" ");
|
|
@@ -5329,10 +5795,10 @@ const runStyle = (val, scale = 0.5) => {
|
|
|
5329
5795
|
const resolveColor = (color2, theme) => {
|
|
5330
5796
|
return theme.color[color2] ? theme.color[color2] : color2;
|
|
5331
5797
|
};
|
|
5332
|
-
const
|
|
5333
|
-
const cardTheme = theme.components.
|
|
5334
|
-
const warpStyle = __spreadValues$
|
|
5335
|
-
const containerStyle = __spreadValues$
|
|
5798
|
+
const buildJDHCardLayoutStyle = (props, theme, scale = 1) => {
|
|
5799
|
+
const cardTheme = theme.components.jdhCard;
|
|
5800
|
+
const warpStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t({}, backgroundToStyle(cardTheme.wrap.background, theme)), paddingLogogramToStyle(cardTheme.wrap.padding, theme, scale)), marginLogogramToStyle(props.margin, theme, scale));
|
|
5801
|
+
const containerStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t({}, paddingLogogramToStyle(cardTheme.container.padding, theme, scale)), borderRadiusToStyle(cardTheme.container.borderRadius, theme, scale)), backgroundToStyle(cardTheme.container.background, theme));
|
|
5336
5802
|
const titleHeight = resolvedLineHeight(
|
|
5337
5803
|
cardTheme.title.lineHeight,
|
|
5338
5804
|
theme,
|
|
@@ -5345,7 +5811,7 @@ const buildCardLayoutStyle = (props, theme, scale = 1) => {
|
|
|
5345
5811
|
height: titleHeight,
|
|
5346
5812
|
overflow: "hidden"
|
|
5347
5813
|
};
|
|
5348
|
-
const titleStyle = __spreadProps$
|
|
5814
|
+
const titleStyle = __spreadProps$r(__spreadValues$t({}, textStyleFromTheme(theme, cardTheme.title, scale)), {
|
|
5349
5815
|
height: titleHeight,
|
|
5350
5816
|
minHeight: 0,
|
|
5351
5817
|
overflow: "hidden",
|
|
@@ -5359,7 +5825,7 @@ const buildCardLayoutStyle = (props, theme, scale = 1) => {
|
|
|
5359
5825
|
flexShrink: 0,
|
|
5360
5826
|
flexGrow: 1
|
|
5361
5827
|
};
|
|
5362
|
-
const subDescriptionStyle = __spreadProps$
|
|
5828
|
+
const subDescriptionStyle = __spreadProps$r(__spreadValues$t({}, textStyleFromTheme(theme, cardTheme.subDescription, scale)), {
|
|
5363
5829
|
height: resolvedLineHeight(
|
|
5364
5830
|
cardTheme.subDescription.lineHeight,
|
|
5365
5831
|
theme,
|
|
@@ -5370,11 +5836,11 @@ const buildCardLayoutStyle = (props, theme, scale = 1) => {
|
|
|
5370
5836
|
whiteSpace: "nowrap",
|
|
5371
5837
|
textOverflow: "ellipsis"
|
|
5372
5838
|
});
|
|
5373
|
-
const contentStyle = __spreadValues$
|
|
5839
|
+
const contentStyle = __spreadValues$t({}, borderRadiusToStyle(cardTheme.content.borderRadius, theme, scale));
|
|
5374
5840
|
if (props.title || props.subDescription) {
|
|
5375
5841
|
Object.assign(
|
|
5376
5842
|
contentStyle,
|
|
5377
|
-
|
|
5843
|
+
marginLogogramToStyle(cardTheme.content.margin, theme, scale)
|
|
5378
5844
|
);
|
|
5379
5845
|
}
|
|
5380
5846
|
return {
|
|
@@ -5388,14 +5854,14 @@ const buildCardLayoutStyle = (props, theme, scale = 1) => {
|
|
|
5388
5854
|
contentStyle
|
|
5389
5855
|
};
|
|
5390
5856
|
};
|
|
5391
|
-
const
|
|
5857
|
+
const buildJDHChoiceRenderStyle = (props, isSelected, theme, scale = 1) => {
|
|
5392
5858
|
const { disabled = false, subDescription, layout = "inline-icon" } = props;
|
|
5393
|
-
const choiceTheme = theme.components.
|
|
5859
|
+
const choiceTheme = theme.components.jdhChoice;
|
|
5394
5860
|
const hasSubDesc = typeof subDescription === "string";
|
|
5395
|
-
const wrapStyle = __spreadValues$
|
|
5861
|
+
const wrapStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t({
|
|
5396
5862
|
width: layout === "image-top" ? runStyle(choiceTheme.wrap.layoutImageTopWidth, scale) : "auto",
|
|
5397
5863
|
opacity: disabled ? choiceTheme.disabledOpacity : 1
|
|
5398
|
-
},
|
|
5864
|
+
}, paddingLogogramToStyle(
|
|
5399
5865
|
layout === "small-inline-icon" ? choiceTheme.wrap.layoutSmallPadding : layout === "image-left" ? choiceTheme.wrap.layoutImageLeftPadding : layout === "image-top" ? choiceTheme.wrap.layoutImageTopPadding : hasSubDesc ? choiceTheme.wrap.withSubDescriptionPadding : choiceTheme.wrap.padding,
|
|
5400
5866
|
theme,
|
|
5401
5867
|
scale
|
|
@@ -5407,11 +5873,11 @@ const buildChoiceRenderStyle = (props, isSelected, theme, scale = 1) => {
|
|
|
5407
5873
|
theme,
|
|
5408
5874
|
scale
|
|
5409
5875
|
));
|
|
5410
|
-
const labelLineStyle = __spreadValues$
|
|
5876
|
+
const labelLineStyle = __spreadValues$t({
|
|
5411
5877
|
display: "flex",
|
|
5412
5878
|
alignItems: "center",
|
|
5413
5879
|
justifyContent: "center"
|
|
5414
|
-
},
|
|
5880
|
+
}, paddingLogogramToStyle(
|
|
5415
5881
|
layout === "image-top" ? choiceTheme.labelLineWrap.layoutImageTopPadding : choiceTheme.labelLineWrap.padding,
|
|
5416
5882
|
theme,
|
|
5417
5883
|
scale
|
|
@@ -5421,7 +5887,7 @@ const buildChoiceRenderStyle = (props, isSelected, theme, scale = 1) => {
|
|
|
5421
5887
|
lineHeight: layout === "small-inline-icon" ? choiceTheme.label.layoutSmallLineHeight : choiceTheme.label.lineHeight,
|
|
5422
5888
|
color: isSelected ? choiceTheme.label.selectedColor : choiceTheme.label.color
|
|
5423
5889
|
};
|
|
5424
|
-
const labelStyle = __spreadValues$
|
|
5890
|
+
const labelStyle = __spreadValues$t(__spreadProps$r(__spreadValues$t({}, textStyleFromTheme(theme, labelTextOptions, scale)), {
|
|
5425
5891
|
overflow: "hidden",
|
|
5426
5892
|
textOverflow: "ellipsis"
|
|
5427
5893
|
}), layout === "image-top" ? {
|
|
@@ -5437,7 +5903,7 @@ const buildChoiceRenderStyle = (props, isSelected, theme, scale = 1) => {
|
|
|
5437
5903
|
whiteSpace: "nowrap",
|
|
5438
5904
|
height: resolvedLineHeight(labelTextOptions.lineHeight, theme, scale)
|
|
5439
5905
|
});
|
|
5440
|
-
const subDescriptionStyle = __spreadValues$
|
|
5906
|
+
const subDescriptionStyle = __spreadValues$t(__spreadValues$t({
|
|
5441
5907
|
textAlign: "center",
|
|
5442
5908
|
whiteSpace: "nowrap",
|
|
5443
5909
|
overflow: "hidden",
|
|
@@ -5449,11 +5915,11 @@ const buildChoiceRenderStyle = (props, isSelected, theme, scale = 1) => {
|
|
|
5449
5915
|
)
|
|
5450
5916
|
}, textStyleFromTheme(
|
|
5451
5917
|
theme,
|
|
5452
|
-
__spreadProps$
|
|
5918
|
+
__spreadProps$r(__spreadValues$t({}, choiceTheme.subDescription), {
|
|
5453
5919
|
color: isSelected ? choiceTheme.subDescription.selectedColor : choiceTheme.subDescription.color
|
|
5454
5920
|
}),
|
|
5455
5921
|
scale
|
|
5456
|
-
)),
|
|
5922
|
+
)), marginLogogramToStyle(choiceTheme.subDescription.margin, theme, scale));
|
|
5457
5923
|
const topImgSize = runStyle(choiceTheme.image.layoutImageTop.size, scale);
|
|
5458
5924
|
const imgTopStyle = layout === "image-top" ? {
|
|
5459
5925
|
display: "block",
|
|
@@ -5488,24 +5954,25 @@ const buildChoiceRenderStyle = (props, isSelected, theme, scale = 1) => {
|
|
|
5488
5954
|
imgLeftStyle
|
|
5489
5955
|
};
|
|
5490
5956
|
};
|
|
5491
|
-
const
|
|
5957
|
+
const buildJDHButtonRenderStyle = (props, theme, scale = 1) => {
|
|
5492
5958
|
const {
|
|
5493
5959
|
color: color2 = "default",
|
|
5494
5960
|
size = "small",
|
|
5495
5961
|
variant = "solid",
|
|
5496
5962
|
disabled = false
|
|
5497
5963
|
} = props;
|
|
5498
|
-
const buttonTheme = theme.components.
|
|
5499
|
-
const wrapStyle = __spreadValues$
|
|
5964
|
+
const buttonTheme = theme.components.jdhButton;
|
|
5965
|
+
const wrapStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t({
|
|
5500
5966
|
display: "flex",
|
|
5501
5967
|
flexDirection: "row",
|
|
5502
5968
|
alignItems: "center",
|
|
5503
5969
|
justifyContent: "center",
|
|
5970
|
+
alignSelf: "center",
|
|
5504
5971
|
opacity: disabled && variant !== "link" ? buttonTheme.disabledOpacity : 1
|
|
5505
5972
|
}, variant !== "link" ? backgroundToStyle(
|
|
5506
5973
|
buttonTheme.colorStyle[variant][color2].background,
|
|
5507
5974
|
theme
|
|
5508
|
-
) : {}),
|
|
5975
|
+
) : {}), paddingLogogramToStyle(
|
|
5509
5976
|
variant === "link" ? 0 : buttonTheme.sizeStyle[size].padding,
|
|
5510
5977
|
theme,
|
|
5511
5978
|
scale
|
|
@@ -5534,7 +6001,7 @@ const buildButtonRenderStyle = (props, theme, scale = 1) => {
|
|
|
5534
6001
|
theme,
|
|
5535
6002
|
scale
|
|
5536
6003
|
);
|
|
5537
|
-
const iconStyle = __spreadValues$
|
|
6004
|
+
const iconStyle = __spreadValues$t({
|
|
5538
6005
|
width: iconSize,
|
|
5539
6006
|
height: iconSize,
|
|
5540
6007
|
marginRight: runStyle(buttonTheme.image.marginRight, scale)
|
|
@@ -5551,7 +6018,7 @@ const buildButtonRenderStyle = (props, theme, scale = 1) => {
|
|
|
5551
6018
|
arrowStyle
|
|
5552
6019
|
};
|
|
5553
6020
|
};
|
|
5554
|
-
const
|
|
6021
|
+
const buildJDHInputRenderStyle = (props, theme, scale = 1) => {
|
|
5555
6022
|
const {
|
|
5556
6023
|
readonly = false,
|
|
5557
6024
|
error = false,
|
|
@@ -5559,17 +6026,17 @@ const buildInputRenderStyle = (props, theme, scale = 1) => {
|
|
|
5559
6026
|
password = false,
|
|
5560
6027
|
disabled = false
|
|
5561
6028
|
} = props;
|
|
5562
|
-
const inputTheme = theme.components.
|
|
5563
|
-
const themeState = __spreadValues$
|
|
5564
|
-
const wrapStyle = __spreadValues$
|
|
6029
|
+
const inputTheme = theme.components.jdhInput;
|
|
6030
|
+
const themeState = __spreadValues$t(__spreadValues$t({}, inputTheme.defaultState), readonly ? inputTheme.readonlyState : disabled ? inputTheme.disabledState : error ? inputTheme.errorState : {});
|
|
6031
|
+
const wrapStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t({
|
|
5565
6032
|
position: "relative",
|
|
5566
6033
|
opacity: themeState.opacity
|
|
5567
|
-
},
|
|
6034
|
+
}, paddingLogogramToStyle(themeState.padding, theme, scale)), borderToStyle(
|
|
5568
6035
|
{ size: "1px", color: themeState.borderColor, style: "solid" },
|
|
5569
6036
|
theme,
|
|
5570
6037
|
scale
|
|
5571
6038
|
)), backgroundToStyle(themeState.background, theme)), borderRadiusToStyle(themeState.borderRadius, theme, scale));
|
|
5572
|
-
const inputStyle = __spreadValues$
|
|
6039
|
+
const inputStyle = __spreadValues$t(__spreadValues$t({
|
|
5573
6040
|
border: "none",
|
|
5574
6041
|
width: "100%",
|
|
5575
6042
|
outline: "none"
|
|
@@ -5583,7 +6050,7 @@ const buildInputRenderStyle = (props, theme, scale = 1) => {
|
|
|
5583
6050
|
scale
|
|
5584
6051
|
));
|
|
5585
6052
|
const clearButtonSize = runStyle(inputTheme.clearButton.size, scale);
|
|
5586
|
-
const clearStyle = __spreadValues$
|
|
6053
|
+
const clearStyle = __spreadValues$t({
|
|
5587
6054
|
width: clearButtonSize,
|
|
5588
6055
|
height: clearButtonSize,
|
|
5589
6056
|
borderRadius: "100px",
|
|
@@ -5603,7 +6070,7 @@ const buildInputRenderStyle = (props, theme, scale = 1) => {
|
|
|
5603
6070
|
transform: "translate(-50%, -50%)"
|
|
5604
6071
|
};
|
|
5605
6072
|
const msgTheme = error && errorMessage ? inputTheme.errorMessage : inputTheme.subDescription;
|
|
5606
|
-
const msgStyle = __spreadValues$
|
|
6073
|
+
const msgStyle = __spreadValues$t(__spreadValues$t({}, textStyleFromTheme(theme, msgTheme, scale)), marginLogogramToStyle(msgTheme.margin, theme, scale));
|
|
5607
6074
|
const passwordIconSize = runStyle(inputTheme.passwordButton.size, scale);
|
|
5608
6075
|
const passwordStyle = password ? {
|
|
5609
6076
|
width: passwordIconSize,
|
|
@@ -5628,7 +6095,7 @@ const buildInputRenderStyle = (props, theme, scale = 1) => {
|
|
|
5628
6095
|
passwordIconStyle
|
|
5629
6096
|
};
|
|
5630
6097
|
};
|
|
5631
|
-
const
|
|
6098
|
+
const buildJDHTextareaRenderStyle = (props, value, theme, scale = 1) => {
|
|
5632
6099
|
const {
|
|
5633
6100
|
readonly = false,
|
|
5634
6101
|
error = false,
|
|
@@ -5636,25 +6103,26 @@ const buildTextareaRenderStyle = (props, value, theme, scale = 1) => {
|
|
|
5636
6103
|
errorMessage,
|
|
5637
6104
|
maxLength
|
|
5638
6105
|
} = props;
|
|
5639
|
-
const textareaTheme = theme.components.
|
|
5640
|
-
const themeState = __spreadValues$
|
|
5641
|
-
const wrapStyle = __spreadValues$
|
|
6106
|
+
const textareaTheme = theme.components.jdhTextarea;
|
|
6107
|
+
const themeState = __spreadValues$t(__spreadValues$t({}, textareaTheme.defaultState), readonly ? textareaTheme.readonlyState : disabled ? textareaTheme.disabledState : error ? textareaTheme.errorState : {});
|
|
6108
|
+
const wrapStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t({
|
|
5642
6109
|
position: "relative",
|
|
5643
6110
|
boxSizing: "border-box",
|
|
5644
6111
|
opacity: themeState.opacity,
|
|
5645
6112
|
height: runStyle(themeState.minHeight, scale),
|
|
5646
6113
|
maxHeight: runStyle(themeState.maxHeight, scale)
|
|
5647
|
-
},
|
|
6114
|
+
}, paddingLogogramToStyle(themeState.padding, theme, scale)), borderToStyle(
|
|
5648
6115
|
{ size: "1px", color: themeState.borderColor, style: "solid" },
|
|
5649
6116
|
theme,
|
|
5650
6117
|
scale
|
|
5651
6118
|
)), backgroundToStyle(themeState.background, theme)), borderRadiusToStyle(themeState.borderRadius, theme, scale));
|
|
5652
|
-
const textareaStyle = __spreadValues$
|
|
6119
|
+
const textareaStyle = __spreadValues$t(__spreadValues$t({
|
|
5653
6120
|
border: "none",
|
|
5654
6121
|
width: "100%",
|
|
5655
6122
|
display: "block",
|
|
5656
6123
|
outline: "none",
|
|
5657
|
-
height: "100%"
|
|
6124
|
+
height: "100%",
|
|
6125
|
+
resize: "none"
|
|
5658
6126
|
}, backgroundToStyle(themeState.background, theme)), textStyleFromTheme(
|
|
5659
6127
|
theme,
|
|
5660
6128
|
{
|
|
@@ -5665,8 +6133,8 @@ const buildTextareaRenderStyle = (props, value, theme, scale = 1) => {
|
|
|
5665
6133
|
scale
|
|
5666
6134
|
));
|
|
5667
6135
|
const msgTheme = error && errorMessage ? textareaTheme.errorMessage : textareaTheme.subDescription;
|
|
5668
|
-
const msgStyle = __spreadValues$
|
|
5669
|
-
const maxLengthTipsStyle = typeof maxLength === "number" ? __spreadValues$
|
|
6136
|
+
const msgStyle = __spreadValues$t(__spreadValues$t({}, textStyleFromTheme(theme, msgTheme, scale)), marginLogogramToStyle(msgTheme.margin, theme, scale));
|
|
6137
|
+
const maxLengthTipsStyle = typeof maxLength === "number" ? __spreadValues$t({
|
|
5670
6138
|
position: "absolute",
|
|
5671
6139
|
bottom: resolveSpace(
|
|
5672
6140
|
textareaTheme.maxLengthTips.bottom,
|
|
@@ -5676,7 +6144,7 @@ const buildTextareaRenderStyle = (props, value, theme, scale = 1) => {
|
|
|
5676
6144
|
right: resolveSpace(textareaTheme.maxLengthTips.right, theme, scale)
|
|
5677
6145
|
}, textStyleFromTheme(
|
|
5678
6146
|
theme,
|
|
5679
|
-
__spreadProps$
|
|
6147
|
+
__spreadProps$r(__spreadValues$t({}, textareaTheme.maxLengthTips), {
|
|
5680
6148
|
color: resolveColor(
|
|
5681
6149
|
value.length > maxLength ? textareaTheme.maxLengthTips.colorBeyond : textareaTheme.maxLengthTips.color,
|
|
5682
6150
|
theme
|
|
@@ -5756,25 +6224,25 @@ const ResponsiveContext = React.createContext({
|
|
|
5756
6224
|
containerWidth: null
|
|
5757
6225
|
});
|
|
5758
6226
|
const useResponsive = () => React.useContext(ResponsiveContext);
|
|
5759
|
-
var __defProp$
|
|
5760
|
-
var __defProps$
|
|
5761
|
-
var __getOwnPropDescs$
|
|
5762
|
-
var __getOwnPropSymbols$
|
|
5763
|
-
var __hasOwnProp$
|
|
5764
|
-
var __propIsEnum$
|
|
5765
|
-
var __defNormalProp$
|
|
5766
|
-
var __spreadValues$
|
|
6227
|
+
var __defProp$v = Object.defineProperty;
|
|
6228
|
+
var __defProps$q = Object.defineProperties;
|
|
6229
|
+
var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
|
|
6230
|
+
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
6231
|
+
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
6232
|
+
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
6233
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6234
|
+
var __spreadValues$s = (a, b3) => {
|
|
5767
6235
|
for (var prop in b3 || (b3 = {}))
|
|
5768
|
-
if (__hasOwnProp$
|
|
5769
|
-
__defNormalProp$
|
|
5770
|
-
if (__getOwnPropSymbols$
|
|
5771
|
-
for (var prop of __getOwnPropSymbols$
|
|
5772
|
-
if (__propIsEnum$
|
|
5773
|
-
__defNormalProp$
|
|
6236
|
+
if (__hasOwnProp$s.call(b3, prop))
|
|
6237
|
+
__defNormalProp$v(a, prop, b3[prop]);
|
|
6238
|
+
if (__getOwnPropSymbols$s)
|
|
6239
|
+
for (var prop of __getOwnPropSymbols$s(b3)) {
|
|
6240
|
+
if (__propIsEnum$s.call(b3, prop))
|
|
6241
|
+
__defNormalProp$v(a, prop, b3[prop]);
|
|
5774
6242
|
}
|
|
5775
6243
|
return a;
|
|
5776
6244
|
};
|
|
5777
|
-
var __spreadProps$
|
|
6245
|
+
var __spreadProps$q = (a, b3) => __defProps$q(a, __getOwnPropDescs$q(b3));
|
|
5778
6246
|
const FullRowLayout = ({
|
|
5779
6247
|
props,
|
|
5780
6248
|
children
|
|
@@ -5799,7 +6267,7 @@ const FullRowLayout = ({
|
|
|
5799
6267
|
};
|
|
5800
6268
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5801
6269
|
"div",
|
|
5802
|
-
__spreadProps$
|
|
6270
|
+
__spreadProps$q(__spreadValues$s({
|
|
5803
6271
|
style: containerStyle,
|
|
5804
6272
|
onClick: handleClick,
|
|
5805
6273
|
ref: ref2
|
|
@@ -5812,7 +6280,7 @@ const FullRowLayout = ({
|
|
|
5812
6280
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5813
6281
|
"div",
|
|
5814
6282
|
{
|
|
5815
|
-
style: __spreadProps$
|
|
6283
|
+
style: __spreadProps$q(__spreadValues$s({}, buildItemContainerStyle(
|
|
5816
6284
|
idx,
|
|
5817
6285
|
count,
|
|
5818
6286
|
theme,
|
|
@@ -5830,25 +6298,25 @@ const FullRowLayout = ({
|
|
|
5830
6298
|
})
|
|
5831
6299
|
);
|
|
5832
6300
|
};
|
|
5833
|
-
var __defProp$
|
|
5834
|
-
var __defProps$
|
|
5835
|
-
var __getOwnPropDescs$
|
|
5836
|
-
var __getOwnPropSymbols$
|
|
5837
|
-
var __hasOwnProp$
|
|
5838
|
-
var __propIsEnum$
|
|
5839
|
-
var __defNormalProp$
|
|
5840
|
-
var __spreadValues$
|
|
6301
|
+
var __defProp$u = Object.defineProperty;
|
|
6302
|
+
var __defProps$p = Object.defineProperties;
|
|
6303
|
+
var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
|
|
6304
|
+
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
6305
|
+
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
6306
|
+
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
6307
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6308
|
+
var __spreadValues$r = (a, b3) => {
|
|
5841
6309
|
for (var prop in b3 || (b3 = {}))
|
|
5842
|
-
if (__hasOwnProp$
|
|
5843
|
-
__defNormalProp$
|
|
5844
|
-
if (__getOwnPropSymbols$
|
|
5845
|
-
for (var prop of __getOwnPropSymbols$
|
|
5846
|
-
if (__propIsEnum$
|
|
5847
|
-
__defNormalProp$
|
|
6310
|
+
if (__hasOwnProp$r.call(b3, prop))
|
|
6311
|
+
__defNormalProp$u(a, prop, b3[prop]);
|
|
6312
|
+
if (__getOwnPropSymbols$r)
|
|
6313
|
+
for (var prop of __getOwnPropSymbols$r(b3)) {
|
|
6314
|
+
if (__propIsEnum$r.call(b3, prop))
|
|
6315
|
+
__defNormalProp$u(a, prop, b3[prop]);
|
|
5848
6316
|
}
|
|
5849
6317
|
return a;
|
|
5850
6318
|
};
|
|
5851
|
-
var __spreadProps$
|
|
6319
|
+
var __spreadProps$p = (a, b3) => __defProps$p(a, __getOwnPropDescs$p(b3));
|
|
5852
6320
|
const MultipleColumnLayout = ({
|
|
5853
6321
|
props,
|
|
5854
6322
|
children
|
|
@@ -5857,11 +6325,11 @@ const MultipleColumnLayout = ({
|
|
|
5857
6325
|
const { executeActions } = useAction();
|
|
5858
6326
|
const theme = useTheme();
|
|
5859
6327
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
5860
|
-
const containerStyle = __spreadProps$
|
|
6328
|
+
const containerStyle = __spreadProps$p(__spreadValues$r({}, buildLayoutContainerStyle(props, "row", theme, scale)), {
|
|
5861
6329
|
flexWrap: (props == null ? void 0 : props.flexWrap) || "nowrap"
|
|
5862
6330
|
});
|
|
5863
6331
|
const itemContainerStyle = (child, idx) => {
|
|
5864
|
-
return __spreadProps$
|
|
6332
|
+
return __spreadProps$p(__spreadValues$r({}, buildItemContainerStyle(idx, count, theme, props, true, scale, true)), {
|
|
5865
6333
|
flexShrink: itemFlexShrink(child),
|
|
5866
6334
|
width: void 0
|
|
5867
6335
|
});
|
|
@@ -5877,7 +6345,7 @@ const MultipleColumnLayout = ({
|
|
|
5877
6345
|
paddingBottom: containerStyle.marginBottom
|
|
5878
6346
|
};
|
|
5879
6347
|
const gapMargin = `-${resolveSpace(props.gap, theme, scale)}`;
|
|
5880
|
-
const containerStyleForGap = __spreadProps$
|
|
6348
|
+
const containerStyleForGap = __spreadProps$p(__spreadValues$r({}, containerStyle), {
|
|
5881
6349
|
margin: void 0,
|
|
5882
6350
|
marginTop: gapMargin,
|
|
5883
6351
|
marginLeft: gapMargin,
|
|
@@ -5904,7 +6372,7 @@ const MultipleColumnLayout = ({
|
|
|
5904
6372
|
// 最外层div使用padding代替原container的margin,以便container使用负margin中和gap实现的效果
|
|
5905
6373
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "for-gap-wrap", style: polyfillContainerMarginStyle, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5906
6374
|
"div",
|
|
5907
|
-
__spreadProps$
|
|
6375
|
+
__spreadProps$p(__spreadValues$r({
|
|
5908
6376
|
className: "for-gap",
|
|
5909
6377
|
style: containerStyleForGap,
|
|
5910
6378
|
onClick: handleClick,
|
|
@@ -5915,6 +6383,68 @@ const MultipleColumnLayout = ({
|
|
|
5915
6383
|
) })
|
|
5916
6384
|
);
|
|
5917
6385
|
};
|
|
6386
|
+
var __defProp$t = Object.defineProperty;
|
|
6387
|
+
var __defProps$o = Object.defineProperties;
|
|
6388
|
+
var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
|
|
6389
|
+
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
6390
|
+
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
6391
|
+
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
6392
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6393
|
+
var __spreadValues$q = (a, b3) => {
|
|
6394
|
+
for (var prop in b3 || (b3 = {}))
|
|
6395
|
+
if (__hasOwnProp$q.call(b3, prop))
|
|
6396
|
+
__defNormalProp$t(a, prop, b3[prop]);
|
|
6397
|
+
if (__getOwnPropSymbols$q)
|
|
6398
|
+
for (var prop of __getOwnPropSymbols$q(b3)) {
|
|
6399
|
+
if (__propIsEnum$q.call(b3, prop))
|
|
6400
|
+
__defNormalProp$t(a, prop, b3[prop]);
|
|
6401
|
+
}
|
|
6402
|
+
return a;
|
|
6403
|
+
};
|
|
6404
|
+
var __spreadProps$o = (a, b3) => __defProps$o(a, __getOwnPropDescs$o(b3));
|
|
6405
|
+
const TwoColumnLayout$2 = ({
|
|
6406
|
+
props,
|
|
6407
|
+
children
|
|
6408
|
+
}) => {
|
|
6409
|
+
const { scale } = useResponsive();
|
|
6410
|
+
const { executeActions } = useAction();
|
|
6411
|
+
const theme = useTheme();
|
|
6412
|
+
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
6413
|
+
const containerStyle = buildLayoutContainerStyle(
|
|
6414
|
+
props,
|
|
6415
|
+
"row",
|
|
6416
|
+
theme,
|
|
6417
|
+
scale
|
|
6418
|
+
);
|
|
6419
|
+
const items = React.Children.toArray(children).slice(0, 2);
|
|
6420
|
+
const count = items.length;
|
|
6421
|
+
const handleClick = (e) => {
|
|
6422
|
+
if (props.actions) {
|
|
6423
|
+
void executeActions(props.actions);
|
|
6424
|
+
}
|
|
6425
|
+
onClick(e);
|
|
6426
|
+
};
|
|
6427
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6428
|
+
"div",
|
|
6429
|
+
__spreadProps$o(__spreadValues$q({
|
|
6430
|
+
style: containerStyle,
|
|
6431
|
+
onClick: handleClick,
|
|
6432
|
+
ref: ref2
|
|
6433
|
+
}, { onMouseEnter, onMouseLeave }), {
|
|
6434
|
+
children: items.map((child, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6435
|
+
"div",
|
|
6436
|
+
{
|
|
6437
|
+
style: __spreadProps$o(__spreadValues$q({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
|
|
6438
|
+
flex: 1
|
|
6439
|
+
// ...fractionWidth('50%'),
|
|
6440
|
+
}),
|
|
6441
|
+
children: child
|
|
6442
|
+
},
|
|
6443
|
+
idx
|
|
6444
|
+
))
|
|
6445
|
+
})
|
|
6446
|
+
);
|
|
6447
|
+
};
|
|
5918
6448
|
var __defProp$s = Object.defineProperty;
|
|
5919
6449
|
var __defProps$n = Object.defineProperties;
|
|
5920
6450
|
var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
|
|
@@ -5934,7 +6464,7 @@ var __spreadValues$p = (a, b3) => {
|
|
|
5934
6464
|
return a;
|
|
5935
6465
|
};
|
|
5936
6466
|
var __spreadProps$n = (a, b3) => __defProps$n(a, __getOwnPropDescs$n(b3));
|
|
5937
|
-
const
|
|
6467
|
+
const ThreeColumnLayout$1 = ({
|
|
5938
6468
|
props,
|
|
5939
6469
|
children
|
|
5940
6470
|
}) => {
|
|
@@ -5948,7 +6478,7 @@ const TwoColumnLayout$2 = ({
|
|
|
5948
6478
|
theme,
|
|
5949
6479
|
scale
|
|
5950
6480
|
);
|
|
5951
|
-
const items = React.Children.toArray(children).slice(0,
|
|
6481
|
+
const items = React.Children.toArray(children).slice(0, 3);
|
|
5952
6482
|
const count = items.length;
|
|
5953
6483
|
const handleClick = (e) => {
|
|
5954
6484
|
if (props.actions) {
|
|
@@ -5968,7 +6498,6 @@ const TwoColumnLayout$2 = ({
|
|
|
5968
6498
|
{
|
|
5969
6499
|
style: __spreadProps$n(__spreadValues$p({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
|
|
5970
6500
|
flex: 1
|
|
5971
|
-
// ...fractionWidth('50%'),
|
|
5972
6501
|
}),
|
|
5973
6502
|
children: child
|
|
5974
6503
|
},
|
|
@@ -5996,7 +6525,7 @@ var __spreadValues$o = (a, b3) => {
|
|
|
5996
6525
|
return a;
|
|
5997
6526
|
};
|
|
5998
6527
|
var __spreadProps$m = (a, b3) => __defProps$m(a, __getOwnPropDescs$m(b3));
|
|
5999
|
-
const
|
|
6528
|
+
const FourColumnLayout = ({
|
|
6000
6529
|
props,
|
|
6001
6530
|
children
|
|
6002
6531
|
}) => {
|
|
@@ -6010,7 +6539,7 @@ const ThreeColumnLayout$1 = ({
|
|
|
6010
6539
|
theme,
|
|
6011
6540
|
scale
|
|
6012
6541
|
);
|
|
6013
|
-
const items = React.Children.toArray(children).slice(0,
|
|
6542
|
+
const items = React.Children.toArray(children).slice(0, 4);
|
|
6014
6543
|
const count = items.length;
|
|
6015
6544
|
const handleClick = (e) => {
|
|
6016
6545
|
if (props.actions) {
|
|
@@ -6028,9 +6557,7 @@ const ThreeColumnLayout$1 = ({
|
|
|
6028
6557
|
children: items.map((child, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6029
6558
|
"div",
|
|
6030
6559
|
{
|
|
6031
|
-
style:
|
|
6032
|
-
flex: 1
|
|
6033
|
-
}),
|
|
6560
|
+
style: __spreadValues$o(__spreadValues$o({}, fractionWidth("25%")), buildItemContainerStyle(idx, count, theme, props, true, scale)),
|
|
6034
6561
|
children: child
|
|
6035
6562
|
},
|
|
6036
6563
|
idx
|
|
@@ -6057,7 +6584,7 @@ var __spreadValues$n = (a, b3) => {
|
|
|
6057
6584
|
return a;
|
|
6058
6585
|
};
|
|
6059
6586
|
var __spreadProps$l = (a, b3) => __defProps$l(a, __getOwnPropDescs$l(b3));
|
|
6060
|
-
const
|
|
6587
|
+
const TwoColumnLayout$1 = ({
|
|
6061
6588
|
props,
|
|
6062
6589
|
children
|
|
6063
6590
|
}) => {
|
|
@@ -6071,7 +6598,7 @@ const FourColumnLayout = ({
|
|
|
6071
6598
|
theme,
|
|
6072
6599
|
scale
|
|
6073
6600
|
);
|
|
6074
|
-
const items = React.Children.toArray(children).slice(0,
|
|
6601
|
+
const items = React.Children.toArray(children).slice(0, 2);
|
|
6075
6602
|
const count = items.length;
|
|
6076
6603
|
const handleClick = (e) => {
|
|
6077
6604
|
if (props.actions) {
|
|
@@ -6082,14 +6609,20 @@ const FourColumnLayout = ({
|
|
|
6082
6609
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6083
6610
|
"div",
|
|
6084
6611
|
__spreadProps$l(__spreadValues$n({
|
|
6085
|
-
style: containerStyle,
|
|
6612
|
+
style: __spreadProps$l(__spreadValues$n({}, containerStyle), {
|
|
6613
|
+
width: "100%"
|
|
6614
|
+
}),
|
|
6086
6615
|
onClick: handleClick,
|
|
6087
6616
|
ref: ref2
|
|
6088
6617
|
}, { onMouseEnter, onMouseLeave }), {
|
|
6089
6618
|
children: items.map((child, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6090
6619
|
"div",
|
|
6091
6620
|
{
|
|
6092
|
-
style:
|
|
6621
|
+
style: __spreadProps$l(__spreadValues$n({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
|
|
6622
|
+
flex: idx === 0 ? 1 : "initial",
|
|
6623
|
+
width: idx === 1 ? runStyle(props.rightWidth, scale) : "auto",
|
|
6624
|
+
flexDirection: "row"
|
|
6625
|
+
}),
|
|
6093
6626
|
children: child
|
|
6094
6627
|
},
|
|
6095
6628
|
idx
|
|
@@ -6116,7 +6649,7 @@ var __spreadValues$m = (a, b3) => {
|
|
|
6116
6649
|
return a;
|
|
6117
6650
|
};
|
|
6118
6651
|
var __spreadProps$k = (a, b3) => __defProps$k(a, __getOwnPropDescs$k(b3));
|
|
6119
|
-
const TwoColumnLayout
|
|
6652
|
+
const TwoColumnLayout = ({
|
|
6120
6653
|
props,
|
|
6121
6654
|
children
|
|
6122
6655
|
}) => {
|
|
@@ -6141,9 +6674,7 @@ const TwoColumnLayout$1 = ({
|
|
|
6141
6674
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6142
6675
|
"div",
|
|
6143
6676
|
__spreadProps$k(__spreadValues$m({
|
|
6144
|
-
style:
|
|
6145
|
-
width: "100%"
|
|
6146
|
-
}),
|
|
6677
|
+
style: containerStyle,
|
|
6147
6678
|
onClick: handleClick,
|
|
6148
6679
|
ref: ref2
|
|
6149
6680
|
}, { onMouseEnter, onMouseLeave }), {
|
|
@@ -6151,8 +6682,8 @@ const TwoColumnLayout$1 = ({
|
|
|
6151
6682
|
"div",
|
|
6152
6683
|
{
|
|
6153
6684
|
style: __spreadProps$k(__spreadValues$m({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
|
|
6154
|
-
flex: idx ===
|
|
6155
|
-
width: idx ===
|
|
6685
|
+
flex: idx === 1 ? 1 : "initial",
|
|
6686
|
+
width: idx === 0 ? runStyle(props == null ? void 0 : props.leftWidth) : "auto",
|
|
6156
6687
|
flexDirection: "row"
|
|
6157
6688
|
}),
|
|
6158
6689
|
children: child
|
|
@@ -6181,7 +6712,7 @@ var __spreadValues$l = (a, b3) => {
|
|
|
6181
6712
|
return a;
|
|
6182
6713
|
};
|
|
6183
6714
|
var __spreadProps$j = (a, b3) => __defProps$j(a, __getOwnPropDescs$j(b3));
|
|
6184
|
-
const
|
|
6715
|
+
const ThreeColumnLayout = ({
|
|
6185
6716
|
props,
|
|
6186
6717
|
children
|
|
6187
6718
|
}) => {
|
|
@@ -6195,7 +6726,7 @@ const TwoColumnLayout = ({
|
|
|
6195
6726
|
theme,
|
|
6196
6727
|
scale
|
|
6197
6728
|
);
|
|
6198
|
-
const items = React.Children.toArray(children).slice(0,
|
|
6729
|
+
const items = React.Children.toArray(children).slice(0, 3);
|
|
6199
6730
|
const count = items.length;
|
|
6200
6731
|
const handleClick = (e) => {
|
|
6201
6732
|
if (props.actions) {
|
|
@@ -6215,7 +6746,6 @@ const TwoColumnLayout = ({
|
|
|
6215
6746
|
{
|
|
6216
6747
|
style: __spreadProps$j(__spreadValues$l({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
|
|
6217
6748
|
flex: idx === 1 ? 1 : "initial",
|
|
6218
|
-
width: idx === 0 ? runStyle(props == null ? void 0 : props.leftWidth) : "auto",
|
|
6219
6749
|
flexDirection: "row"
|
|
6220
6750
|
}),
|
|
6221
6751
|
children: child
|
|
@@ -6244,42 +6774,46 @@ var __spreadValues$k = (a, b3) => {
|
|
|
6244
6774
|
return a;
|
|
6245
6775
|
};
|
|
6246
6776
|
var __spreadProps$i = (a, b3) => __defProps$i(a, __getOwnPropDescs$i(b3));
|
|
6247
|
-
const
|
|
6777
|
+
const AbsoluteViewLayout = ({
|
|
6248
6778
|
props,
|
|
6249
6779
|
children
|
|
6250
6780
|
}) => {
|
|
6251
6781
|
const { scale } = useResponsive();
|
|
6252
6782
|
const { executeActions } = useAction();
|
|
6783
|
+
const handleClick = (e) => {
|
|
6784
|
+
if (props.actions) {
|
|
6785
|
+
void executeActions(props.actions);
|
|
6786
|
+
}
|
|
6787
|
+
onClick(e);
|
|
6788
|
+
};
|
|
6253
6789
|
const theme = useTheme();
|
|
6254
6790
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
6255
|
-
const
|
|
6791
|
+
const absoluteContainerStyle = buildAbsoluteLayoutStyle(
|
|
6256
6792
|
props,
|
|
6257
|
-
"
|
|
6793
|
+
"column",
|
|
6258
6794
|
theme,
|
|
6259
6795
|
scale
|
|
6260
6796
|
);
|
|
6261
|
-
const items = React.Children.toArray(children)
|
|
6797
|
+
const items = React.Children.toArray(children);
|
|
6262
6798
|
const count = items.length;
|
|
6263
|
-
const handleClick = (e) => {
|
|
6264
|
-
if (props.actions) {
|
|
6265
|
-
void executeActions(props.actions);
|
|
6266
|
-
}
|
|
6267
|
-
onClick(e);
|
|
6268
|
-
};
|
|
6269
6799
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6270
6800
|
"div",
|
|
6271
6801
|
__spreadProps$i(__spreadValues$k({
|
|
6272
|
-
style:
|
|
6802
|
+
style: absoluteContainerStyle,
|
|
6273
6803
|
onClick: handleClick,
|
|
6274
6804
|
ref: ref2
|
|
6275
6805
|
}, { onMouseEnter, onMouseLeave }), {
|
|
6276
6806
|
children: items.map((child, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6277
6807
|
"div",
|
|
6278
6808
|
{
|
|
6279
|
-
style:
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6809
|
+
style: buildItemContainerStyle(
|
|
6810
|
+
idx,
|
|
6811
|
+
count,
|
|
6812
|
+
theme,
|
|
6813
|
+
props,
|
|
6814
|
+
false,
|
|
6815
|
+
scale
|
|
6816
|
+
),
|
|
6283
6817
|
children: child
|
|
6284
6818
|
},
|
|
6285
6819
|
idx
|
|
@@ -6306,7 +6840,7 @@ var __spreadValues$j = (a, b3) => {
|
|
|
6306
6840
|
return a;
|
|
6307
6841
|
};
|
|
6308
6842
|
var __spreadProps$h = (a, b3) => __defProps$h(a, __getOwnPropDescs$h(b3));
|
|
6309
|
-
const
|
|
6843
|
+
const AnimationLayout = ({
|
|
6310
6844
|
props,
|
|
6311
6845
|
children
|
|
6312
6846
|
}) => {
|
|
@@ -6320,7 +6854,7 @@ const AbsoluteViewLayout = ({
|
|
|
6320
6854
|
};
|
|
6321
6855
|
const theme = useTheme();
|
|
6322
6856
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
6323
|
-
const
|
|
6857
|
+
const containerStyle = buildLayoutContainerStyle(
|
|
6324
6858
|
props,
|
|
6325
6859
|
"column",
|
|
6326
6860
|
theme,
|
|
@@ -6331,7 +6865,7 @@ const AbsoluteViewLayout = ({
|
|
|
6331
6865
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6332
6866
|
"div",
|
|
6333
6867
|
__spreadProps$h(__spreadValues$j({
|
|
6334
|
-
style:
|
|
6868
|
+
style: containerStyle,
|
|
6335
6869
|
onClick: handleClick,
|
|
6336
6870
|
ref: ref2
|
|
6337
6871
|
}, { onMouseEnter, onMouseLeave }), {
|
|
@@ -6372,108 +6906,42 @@ var __spreadValues$i = (a, b3) => {
|
|
|
6372
6906
|
return a;
|
|
6373
6907
|
};
|
|
6374
6908
|
var __spreadProps$g = (a, b3) => __defProps$g(a, __getOwnPropDescs$g(b3));
|
|
6375
|
-
const
|
|
6909
|
+
const ScrollViewLayout = ({
|
|
6376
6910
|
props,
|
|
6377
6911
|
children
|
|
6378
6912
|
}) => {
|
|
6379
|
-
const { scale } = useResponsive();
|
|
6380
6913
|
const { executeActions } = useAction();
|
|
6381
|
-
const handleClick = (e) => {
|
|
6382
|
-
if (props.actions) {
|
|
6383
|
-
void executeActions(props.actions);
|
|
6384
|
-
}
|
|
6385
|
-
onClick(e);
|
|
6386
|
-
};
|
|
6387
6914
|
const theme = useTheme();
|
|
6388
6915
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
6916
|
+
const customProps = props;
|
|
6917
|
+
const scrollX = (customProps == null ? void 0 : customProps.direction) === "horizontal";
|
|
6918
|
+
const scrollY = (customProps == null ? void 0 : customProps.direction) === "vertical" || !(customProps == null ? void 0 : customProps.direction);
|
|
6389
6919
|
const containerStyle = buildLayoutContainerStyle(
|
|
6390
6920
|
props,
|
|
6391
|
-
"column",
|
|
6392
|
-
theme
|
|
6393
|
-
scale
|
|
6921
|
+
scrollX ? "row" : "column",
|
|
6922
|
+
theme
|
|
6394
6923
|
);
|
|
6395
6924
|
const items = React.Children.toArray(children);
|
|
6396
|
-
|
|
6925
|
+
items.length;
|
|
6926
|
+
const handleClick = (e) => {
|
|
6927
|
+
if (props == null ? void 0 : props.actions) void executeActions(props.actions);
|
|
6928
|
+
onClick(e);
|
|
6929
|
+
};
|
|
6397
6930
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6398
6931
|
"div",
|
|
6399
|
-
|
|
6400
|
-
style: containerStyle,
|
|
6932
|
+
{
|
|
6933
|
+
style: __spreadProps$g(__spreadValues$i({}, containerStyle), {
|
|
6934
|
+
width: (customProps == null ? void 0 : customProps.width) || "100%",
|
|
6935
|
+
height: (customProps == null ? void 0 : customProps.height) || "auto",
|
|
6936
|
+
whiteSpace: scrollX ? "nowrap" : "normal",
|
|
6937
|
+
// 横向滚动时防止换行
|
|
6938
|
+
overflowX: scrollX ? "auto" : "hidden",
|
|
6939
|
+
overflowY: scrollY ? "auto" : "hidden"
|
|
6940
|
+
}),
|
|
6401
6941
|
onClick: handleClick,
|
|
6402
|
-
|
|
6403
|
-
}, { onMouseEnter, onMouseLeave }), {
|
|
6404
|
-
children: items.map((child, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6942
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6405
6943
|
"div",
|
|
6406
|
-
{
|
|
6407
|
-
style: buildItemContainerStyle(
|
|
6408
|
-
idx,
|
|
6409
|
-
count,
|
|
6410
|
-
theme,
|
|
6411
|
-
props,
|
|
6412
|
-
false,
|
|
6413
|
-
scale
|
|
6414
|
-
),
|
|
6415
|
-
children: child
|
|
6416
|
-
},
|
|
6417
|
-
idx
|
|
6418
|
-
))
|
|
6419
|
-
})
|
|
6420
|
-
);
|
|
6421
|
-
};
|
|
6422
|
-
var __defProp$k = Object.defineProperty;
|
|
6423
|
-
var __defProps$f = Object.defineProperties;
|
|
6424
|
-
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
6425
|
-
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
6426
|
-
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
6427
|
-
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
6428
|
-
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6429
|
-
var __spreadValues$h = (a, b3) => {
|
|
6430
|
-
for (var prop in b3 || (b3 = {}))
|
|
6431
|
-
if (__hasOwnProp$h.call(b3, prop))
|
|
6432
|
-
__defNormalProp$k(a, prop, b3[prop]);
|
|
6433
|
-
if (__getOwnPropSymbols$h)
|
|
6434
|
-
for (var prop of __getOwnPropSymbols$h(b3)) {
|
|
6435
|
-
if (__propIsEnum$h.call(b3, prop))
|
|
6436
|
-
__defNormalProp$k(a, prop, b3[prop]);
|
|
6437
|
-
}
|
|
6438
|
-
return a;
|
|
6439
|
-
};
|
|
6440
|
-
var __spreadProps$f = (a, b3) => __defProps$f(a, __getOwnPropDescs$f(b3));
|
|
6441
|
-
const ScrollViewLayout = ({
|
|
6442
|
-
props,
|
|
6443
|
-
children
|
|
6444
|
-
}) => {
|
|
6445
|
-
const { executeActions } = useAction();
|
|
6446
|
-
const theme = useTheme();
|
|
6447
|
-
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
6448
|
-
const customProps = props;
|
|
6449
|
-
const scrollX = (customProps == null ? void 0 : customProps.direction) === "horizontal";
|
|
6450
|
-
const scrollY = (customProps == null ? void 0 : customProps.direction) === "vertical" || !(customProps == null ? void 0 : customProps.direction);
|
|
6451
|
-
const containerStyle = buildLayoutContainerStyle(
|
|
6452
|
-
props,
|
|
6453
|
-
scrollX ? "row" : "column",
|
|
6454
|
-
theme
|
|
6455
|
-
);
|
|
6456
|
-
const items = React.Children.toArray(children);
|
|
6457
|
-
items.length;
|
|
6458
|
-
const handleClick = (e) => {
|
|
6459
|
-
if (props == null ? void 0 : props.actions) void executeActions(props.actions);
|
|
6460
|
-
onClick(e);
|
|
6461
|
-
};
|
|
6462
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6463
|
-
"div",
|
|
6464
|
-
{
|
|
6465
|
-
style: __spreadProps$f(__spreadValues$h({}, containerStyle), {
|
|
6466
|
-
width: (customProps == null ? void 0 : customProps.width) || "100%",
|
|
6467
|
-
height: (customProps == null ? void 0 : customProps.height) || "auto",
|
|
6468
|
-
whiteSpace: scrollX ? "nowrap" : "normal",
|
|
6469
|
-
// 横向滚动时防止换行
|
|
6470
|
-
overflowX: scrollX ? "auto" : "hidden",
|
|
6471
|
-
overflowY: scrollY ? "auto" : "hidden"
|
|
6472
|
-
}),
|
|
6473
|
-
onClick: handleClick,
|
|
6474
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6475
|
-
"div",
|
|
6476
|
-
__spreadProps$f(__spreadValues$h({
|
|
6944
|
+
__spreadProps$g(__spreadValues$i({
|
|
6477
6945
|
style: {
|
|
6478
6946
|
display: "flex",
|
|
6479
6947
|
flexDirection: scrollX ? "row" : "column",
|
|
@@ -6542,26 +7010,26 @@ const CustomLayout = ({
|
|
|
6542
7010
|
}
|
|
6543
7011
|
);
|
|
6544
7012
|
};
|
|
6545
|
-
var __defProp$
|
|
6546
|
-
var __defProps$
|
|
6547
|
-
var __getOwnPropDescs$
|
|
6548
|
-
var __getOwnPropSymbols$
|
|
6549
|
-
var __hasOwnProp$
|
|
6550
|
-
var __propIsEnum$
|
|
6551
|
-
var __defNormalProp$
|
|
6552
|
-
var __spreadValues$
|
|
7013
|
+
var __defProp$k = Object.defineProperty;
|
|
7014
|
+
var __defProps$f = Object.defineProperties;
|
|
7015
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
7016
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
7017
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
7018
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
7019
|
+
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7020
|
+
var __spreadValues$h = (a, b3) => {
|
|
6553
7021
|
for (var prop in b3 || (b3 = {}))
|
|
6554
|
-
if (__hasOwnProp$
|
|
6555
|
-
__defNormalProp$
|
|
6556
|
-
if (__getOwnPropSymbols$
|
|
6557
|
-
for (var prop of __getOwnPropSymbols$
|
|
6558
|
-
if (__propIsEnum$
|
|
6559
|
-
__defNormalProp$
|
|
7022
|
+
if (__hasOwnProp$h.call(b3, prop))
|
|
7023
|
+
__defNormalProp$k(a, prop, b3[prop]);
|
|
7024
|
+
if (__getOwnPropSymbols$h)
|
|
7025
|
+
for (var prop of __getOwnPropSymbols$h(b3)) {
|
|
7026
|
+
if (__propIsEnum$h.call(b3, prop))
|
|
7027
|
+
__defNormalProp$k(a, prop, b3[prop]);
|
|
6560
7028
|
}
|
|
6561
7029
|
return a;
|
|
6562
7030
|
};
|
|
6563
|
-
var __spreadProps$
|
|
6564
|
-
const
|
|
7031
|
+
var __spreadProps$f = (a, b3) => __defProps$f(a, __getOwnPropDescs$f(b3));
|
|
7032
|
+
const JDHCardLayout = ({
|
|
6565
7033
|
props,
|
|
6566
7034
|
children,
|
|
6567
7035
|
slot = {}
|
|
@@ -6571,13 +7039,13 @@ const CardLayout = ({
|
|
|
6571
7039
|
const { scale } = useResponsive();
|
|
6572
7040
|
const theme = useTheme();
|
|
6573
7041
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
6574
|
-
const cardStyle =
|
|
7042
|
+
const cardStyle = buildJDHCardLayoutStyle(props, theme, scale);
|
|
6575
7043
|
const handleClick = (e) => {
|
|
6576
7044
|
onClick(e);
|
|
6577
7045
|
};
|
|
6578
7046
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6579
7047
|
"div",
|
|
6580
|
-
__spreadProps$
|
|
7048
|
+
__spreadProps$f(__spreadValues$h({
|
|
6581
7049
|
style: cardStyle.warpStyle,
|
|
6582
7050
|
className: "card-wrap",
|
|
6583
7051
|
onClick: handleClick,
|
|
@@ -6649,25 +7117,25 @@ const ResponsiveTwoColumnLayout = ({ props, children }) => {
|
|
|
6649
7117
|
const useTwoColumn = containerWidth === null || containerWidth > minWidthFowTwoColumn * scale;
|
|
6650
7118
|
return useTwoColumn ? /* @__PURE__ */ jsxRuntime.jsx(TwoColumnLayout$2, { props, children }) : /* @__PURE__ */ jsxRuntime.jsx(FullRowLayout, { props, children });
|
|
6651
7119
|
};
|
|
6652
|
-
var __defProp$
|
|
6653
|
-
var __defProps$
|
|
6654
|
-
var __getOwnPropDescs$
|
|
6655
|
-
var __getOwnPropSymbols$
|
|
6656
|
-
var __hasOwnProp$
|
|
6657
|
-
var __propIsEnum$
|
|
6658
|
-
var __defNormalProp$
|
|
6659
|
-
var __spreadValues$
|
|
7120
|
+
var __defProp$j = Object.defineProperty;
|
|
7121
|
+
var __defProps$e = Object.defineProperties;
|
|
7122
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
7123
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
7124
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
7125
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
7126
|
+
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7127
|
+
var __spreadValues$g = (a, b3) => {
|
|
6660
7128
|
for (var prop in b3 || (b3 = {}))
|
|
6661
|
-
if (__hasOwnProp$
|
|
6662
|
-
__defNormalProp$
|
|
6663
|
-
if (__getOwnPropSymbols$
|
|
6664
|
-
for (var prop of __getOwnPropSymbols$
|
|
6665
|
-
if (__propIsEnum$
|
|
6666
|
-
__defNormalProp$
|
|
7129
|
+
if (__hasOwnProp$g.call(b3, prop))
|
|
7130
|
+
__defNormalProp$j(a, prop, b3[prop]);
|
|
7131
|
+
if (__getOwnPropSymbols$g)
|
|
7132
|
+
for (var prop of __getOwnPropSymbols$g(b3)) {
|
|
7133
|
+
if (__propIsEnum$g.call(b3, prop))
|
|
7134
|
+
__defNormalProp$j(a, prop, b3[prop]);
|
|
6667
7135
|
}
|
|
6668
7136
|
return a;
|
|
6669
7137
|
};
|
|
6670
|
-
var __spreadProps$
|
|
7138
|
+
var __spreadProps$e = (a, b3) => __defProps$e(a, __getOwnPropDescs$e(b3));
|
|
6671
7139
|
const LayoutWrapper = ({
|
|
6672
7140
|
node,
|
|
6673
7141
|
originProps,
|
|
@@ -6692,7 +7160,7 @@ const LayoutWrapper = ({
|
|
|
6692
7160
|
case "full-row":
|
|
6693
7161
|
return /* @__PURE__ */ jsxRuntime.jsx(FullRowLayout, { props: layoutProps, children });
|
|
6694
7162
|
case "multiple-column":
|
|
6695
|
-
return /* @__PURE__ */ jsxRuntime.jsx(MultipleColumnLayout, __spreadProps$
|
|
7163
|
+
return /* @__PURE__ */ jsxRuntime.jsx(MultipleColumnLayout, __spreadProps$e(__spreadValues$g({ props: layoutProps }, { originProps }), { children }));
|
|
6696
7164
|
case "two-column":
|
|
6697
7165
|
return /* @__PURE__ */ jsxRuntime.jsx(TwoColumnLayout$2, { props: layoutProps, children });
|
|
6698
7166
|
case "three-column":
|
|
@@ -6710,9 +7178,9 @@ const LayoutWrapper = ({
|
|
|
6710
7178
|
case "animation-layout":
|
|
6711
7179
|
return /* @__PURE__ */ jsxRuntime.jsx(AnimationLayout, { props: layoutProps, children });
|
|
6712
7180
|
case "scroll-view":
|
|
6713
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ScrollViewLayout, __spreadProps$
|
|
6714
|
-
case "card":
|
|
6715
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7181
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ScrollViewLayout, __spreadProps$e(__spreadValues$g({}, node), { children }));
|
|
7182
|
+
case "jdh-card":
|
|
7183
|
+
return /* @__PURE__ */ jsxRuntime.jsx(JDHCardLayout, { props: layoutProps, slot, children });
|
|
6716
7184
|
case "responsive-two-column":
|
|
6717
7185
|
return /* @__PURE__ */ jsxRuntime.jsx(ResponsiveTwoColumnLayout, { props: layoutProps, children });
|
|
6718
7186
|
default:
|
|
@@ -6742,31 +7210,42 @@ const makeOnChange = (name, onChange) => (eOrValue) => {
|
|
|
6742
7210
|
const value = normalizeEventValue(eOrValue);
|
|
6743
7211
|
onChange({ name, value });
|
|
6744
7212
|
};
|
|
6745
|
-
var __defProp$
|
|
6746
|
-
var __defProps$
|
|
6747
|
-
var __getOwnPropDescs$
|
|
6748
|
-
var __getOwnPropSymbols$
|
|
6749
|
-
var __hasOwnProp$
|
|
6750
|
-
var __propIsEnum$
|
|
6751
|
-
var __defNormalProp$
|
|
6752
|
-
var __spreadValues$
|
|
7213
|
+
var __defProp$i = Object.defineProperty;
|
|
7214
|
+
var __defProps$d = Object.defineProperties;
|
|
7215
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
7216
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
7217
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
7218
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
7219
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7220
|
+
var __spreadValues$f = (a, b3) => {
|
|
6753
7221
|
for (var prop in b3 || (b3 = {}))
|
|
6754
|
-
if (__hasOwnProp$
|
|
6755
|
-
__defNormalProp$
|
|
6756
|
-
if (__getOwnPropSymbols$
|
|
6757
|
-
for (var prop of __getOwnPropSymbols$
|
|
6758
|
-
if (__propIsEnum$
|
|
6759
|
-
__defNormalProp$
|
|
7222
|
+
if (__hasOwnProp$f.call(b3, prop))
|
|
7223
|
+
__defNormalProp$i(a, prop, b3[prop]);
|
|
7224
|
+
if (__getOwnPropSymbols$f)
|
|
7225
|
+
for (var prop of __getOwnPropSymbols$f(b3)) {
|
|
7226
|
+
if (__propIsEnum$f.call(b3, prop))
|
|
7227
|
+
__defNormalProp$i(a, prop, b3[prop]);
|
|
6760
7228
|
}
|
|
6761
7229
|
return a;
|
|
6762
7230
|
};
|
|
6763
|
-
var __spreadProps$
|
|
7231
|
+
var __spreadProps$d = (a, b3) => __defProps$d(a, __getOwnPropDescs$d(b3));
|
|
6764
7232
|
const TextRender = (props) => {
|
|
6765
7233
|
const theme = useTheme();
|
|
7234
|
+
const { variant = "body" } = props;
|
|
6766
7235
|
const { scale } = useResponsive();
|
|
6767
7236
|
const { executeActions } = useAction();
|
|
6768
7237
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
6769
|
-
const
|
|
7238
|
+
const textTheme = theme.components.text;
|
|
7239
|
+
const textProps = __spreadValues$f(__spreadValues$f(__spreadValues$f({}, textTheme.basic), textTheme.variant[variant]), props);
|
|
7240
|
+
const style = __spreadValues$f(__spreadValues$f(__spreadValues$f({}, textStyleFromTheme(theme, textProps, scale)), marginAndPaddingToStyle(props, theme, scale)), typeof props.numberOfLines === "number" ? {
|
|
7241
|
+
display: "-webkit-box",
|
|
7242
|
+
webkitBoxOrient: "vertical",
|
|
7243
|
+
webkitLineClamp: props.numberOfLines.toString(),
|
|
7244
|
+
// 控制显示行数
|
|
7245
|
+
overflow: "hidden",
|
|
7246
|
+
textOverflow: "ellipsis",
|
|
7247
|
+
whiteSpace: "normal"
|
|
7248
|
+
} : {});
|
|
6770
7249
|
const handleClick = (e) => {
|
|
6771
7250
|
if (props.actions) {
|
|
6772
7251
|
void executeActions(props.actions);
|
|
@@ -6775,7 +7254,7 @@ const TextRender = (props) => {
|
|
|
6775
7254
|
};
|
|
6776
7255
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6777
7256
|
"span",
|
|
6778
|
-
__spreadProps$
|
|
7257
|
+
__spreadProps$d(__spreadValues$f({
|
|
6779
7258
|
style,
|
|
6780
7259
|
onClick: handleClick,
|
|
6781
7260
|
ref: ref2
|
|
@@ -8086,6 +8565,24 @@ const chineseEmphasisTokenizer = {
|
|
|
8086
8565
|
return Math.min(starIndex, underIndex);
|
|
8087
8566
|
},
|
|
8088
8567
|
tokenizer(src) {
|
|
8568
|
+
if (/^\*(?=[\d])/.test(src)) {
|
|
8569
|
+
const token = {
|
|
8570
|
+
type: "text",
|
|
8571
|
+
raw: "*",
|
|
8572
|
+
text: "*",
|
|
8573
|
+
escaped: false
|
|
8574
|
+
};
|
|
8575
|
+
return token;
|
|
8576
|
+
}
|
|
8577
|
+
if (/^\*[^*\n\r]+(?=\*\*)/.test(src)) {
|
|
8578
|
+
const token = {
|
|
8579
|
+
type: "text",
|
|
8580
|
+
raw: "*",
|
|
8581
|
+
text: "*",
|
|
8582
|
+
escaped: false
|
|
8583
|
+
};
|
|
8584
|
+
return token;
|
|
8585
|
+
}
|
|
8089
8586
|
const match = src.match(/^(\*|_)([^\*_\n\r]+?)\1(?!\1)/);
|
|
8090
8587
|
if (match) {
|
|
8091
8588
|
const [raw, delimiter, text] = match;
|
|
@@ -8179,7 +8676,7 @@ const STREAM_INCOMPLETE_REGEX = {
|
|
|
8179
8676
|
/^(\*{2,3}|_{1,3})(?!\s)(?!.*\S\1$)[^\r\n]{0,1000}$/
|
|
8180
8677
|
],
|
|
8181
8678
|
list: [
|
|
8182
|
-
/^[-+*]\s{
|
|
8679
|
+
/^[-+*]\s{1,3}$/,
|
|
8183
8680
|
/^[-+*]\s{1,3}(\*{1,3}|_{1,3})(?!\s)(?!.*\S\1$)[^\r\n]{0,1000}$/,
|
|
8184
8681
|
/^[-+*]\s{1,3}\[[^\]\r\n]{0,1000}$/,
|
|
8185
8682
|
/^[-+*]\s{1,3}\[[^\r\n]{0,1000}\](\([^)\r\n]{0,1000})?$/
|
|
@@ -8220,7 +8717,7 @@ const tokenRecognizerMap = {
|
|
|
8220
8717
|
},
|
|
8221
8718
|
[inteface_StreamCacheTokenType.List]: {
|
|
8222
8719
|
tokenType: inteface_StreamCacheTokenType.List,
|
|
8223
|
-
isStartOfToken: (markdown) => /^[-+*]/.test(markdown),
|
|
8720
|
+
isStartOfToken: (markdown) => /^[-+*]\s/.test(markdown),
|
|
8224
8721
|
isStreamingValid: (markdown) => STREAM_INCOMPLETE_REGEX.list.some((re2) => re2.test(markdown))
|
|
8225
8722
|
},
|
|
8226
8723
|
[inteface_StreamCacheTokenType.Table]: {
|
|
@@ -8234,8 +8731,19 @@ const recognize = (cache, tokenType) => {
|
|
|
8234
8731
|
if (!recognizer) return;
|
|
8235
8732
|
const { token, pending } = cache;
|
|
8236
8733
|
if (token === inteface_StreamCacheTokenType.Text && recognizer.isStartOfToken(pending)) {
|
|
8237
|
-
|
|
8238
|
-
|
|
8734
|
+
if (tokenType === inteface_StreamCacheTokenType.List) {
|
|
8735
|
+
const cm = cache.completeMarkdown;
|
|
8736
|
+
const lastLF = cm.lastIndexOf("\n");
|
|
8737
|
+
const lineStart = lastLF >= 0 ? lastLF + 1 : 0;
|
|
8738
|
+
const before = cm.slice(lineStart);
|
|
8739
|
+
if (/^ {0,3}$/.test(before)) {
|
|
8740
|
+
cache.token = tokenType;
|
|
8741
|
+
return;
|
|
8742
|
+
}
|
|
8743
|
+
} else {
|
|
8744
|
+
cache.token = tokenType;
|
|
8745
|
+
return;
|
|
8746
|
+
}
|
|
8239
8747
|
}
|
|
8240
8748
|
if (token === tokenType && !recognizer.isStreamingValid(pending)) {
|
|
8241
8749
|
commitCache(cache);
|
|
@@ -8747,9 +9255,14 @@ const ListRenderer = ({ node, prevNode, nextNode, parent }) => {
|
|
|
8747
9255
|
const { renderers } = useMarkdownContext();
|
|
8748
9256
|
const { ListItemRenderer: ListItemRenderer2 } = renderers;
|
|
8749
9257
|
const isOrdered = "ordered" in node ? node.ordered : false;
|
|
9258
|
+
const forceIndent = (prevNode == null ? void 0 : prevNode.type) === "list" && !parent && node.type === "list" && !node.ordered ? true : false;
|
|
9259
|
+
if (forceIndent) {
|
|
9260
|
+
node.indent = true;
|
|
9261
|
+
}
|
|
8750
9262
|
const className = shared_clsx("xmd-list", {
|
|
8751
9263
|
"xmd-ordered-list": isOrdered,
|
|
8752
|
-
"xmd-bullet-list": !isOrdered
|
|
9264
|
+
"xmd-bullet-list": !isOrdered,
|
|
9265
|
+
"xmd-bullet-indent": forceIndent
|
|
8753
9266
|
});
|
|
8754
9267
|
const ListTag = isOrdered ? "ol" : "ul";
|
|
8755
9268
|
const isNested = (parent == null ? void 0 : parent.type) === "list_item";
|
|
@@ -8779,7 +9292,7 @@ const ListItemRenderer = ({ node, index, parent }) => {
|
|
|
8779
9292
|
const list = parent;
|
|
8780
9293
|
const displayIndex = ((list == null ? void 0 : list.start) || 0) + (index || 0);
|
|
8781
9294
|
const depth = (parent == null ? void 0 : parent._depth) || 1;
|
|
8782
|
-
const isTopLevelBullet = !isOrdered && depth === 1;
|
|
9295
|
+
const isTopLevelBullet = !isOrdered && depth === 1 && !parent.indent;
|
|
8783
9296
|
node._depth = depth;
|
|
8784
9297
|
const className = shared_clsx("xmd-list-item", {
|
|
8785
9298
|
"xmd-ordered-list-item": isOrdered,
|
|
@@ -8811,59 +9324,20 @@ const ListItemRenderer = ({ node, index, parent }) => {
|
|
|
8811
9324
|
]
|
|
8812
9325
|
});
|
|
8813
9326
|
};
|
|
8814
|
-
var __defProp$g = Object.defineProperty;
|
|
8815
|
-
var __defProps$b = Object.defineProperties;
|
|
8816
|
-
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
8817
|
-
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
8818
|
-
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
8819
|
-
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
8820
|
-
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8821
|
-
var __spreadValues$d = (a, b3) => {
|
|
8822
|
-
for (var prop in b3 || (b3 = {}))
|
|
8823
|
-
if (__hasOwnProp$d.call(b3, prop))
|
|
8824
|
-
__defNormalProp$g(a, prop, b3[prop]);
|
|
8825
|
-
if (__getOwnPropSymbols$d)
|
|
8826
|
-
for (var prop of __getOwnPropSymbols$d(b3)) {
|
|
8827
|
-
if (__propIsEnum$d.call(b3, prop))
|
|
8828
|
-
__defNormalProp$g(a, prop, b3[prop]);
|
|
8829
|
-
}
|
|
8830
|
-
return a;
|
|
8831
|
-
};
|
|
8832
|
-
var __spreadProps$b = (a, b3) => __defProps$b(a, __getOwnPropDescs$b(b3));
|
|
8833
|
-
var __objRest = (source, exclude) => {
|
|
8834
|
-
var target = {};
|
|
8835
|
-
for (var prop in source)
|
|
8836
|
-
if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
8837
|
-
target[prop] = source[prop];
|
|
8838
|
-
if (source != null && __getOwnPropSymbols$d)
|
|
8839
|
-
for (var prop of __getOwnPropSymbols$d(source)) {
|
|
8840
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
|
|
8841
|
-
target[prop] = source[prop];
|
|
8842
|
-
}
|
|
8843
|
-
return target;
|
|
8844
|
-
};
|
|
8845
|
-
const View = (_a2) => {
|
|
8846
|
-
var _b = _a2, { children } = _b, props = __objRest(_b, ["children"]);
|
|
8847
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps$b(__spreadValues$d({}, props), { children }));
|
|
8848
|
-
};
|
|
8849
|
-
const Text = (_c) => {
|
|
8850
|
-
var _d = _c, { children } = _d, props = __objRest(_d, ["children"]);
|
|
8851
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", __spreadProps$b(__spreadValues$d({}, props), { children }));
|
|
8852
|
-
};
|
|
8853
9327
|
const CodeRenderer = ({ node }) => {
|
|
8854
|
-
return jsxRuntime.jsxs(
|
|
9328
|
+
return jsxRuntime.jsxs("div", {
|
|
8855
9329
|
className: "xmd-code-container",
|
|
8856
9330
|
children: [
|
|
8857
|
-
node.lang && jsxRuntime.jsx(
|
|
9331
|
+
node.lang && jsxRuntime.jsx("div", {
|
|
8858
9332
|
className: "xmd-code-header",
|
|
8859
|
-
children: jsxRuntime.jsx(
|
|
9333
|
+
children: jsxRuntime.jsx("span", {
|
|
8860
9334
|
className: "xmd-code-lang",
|
|
8861
9335
|
children: node.lang
|
|
8862
9336
|
})
|
|
8863
9337
|
}),
|
|
8864
|
-
jsxRuntime.jsx(
|
|
9338
|
+
jsxRuntime.jsx("div", {
|
|
8865
9339
|
className: "xmd-code-content",
|
|
8866
|
-
children: jsxRuntime.jsx(
|
|
9340
|
+
children: jsxRuntime.jsx("span", {
|
|
8867
9341
|
className: "xmd-code-text",
|
|
8868
9342
|
children: node.text
|
|
8869
9343
|
})
|
|
@@ -8871,6 +9345,9 @@ const CodeRenderer = ({ node }) => {
|
|
|
8871
9345
|
]
|
|
8872
9346
|
});
|
|
8873
9347
|
};
|
|
9348
|
+
const checkURL = (url) => {
|
|
9349
|
+
return /^(https?:|cmd:)\/\/|^#\S+/.test(url);
|
|
9350
|
+
};
|
|
8874
9351
|
const Icon = React.memo((props) => {
|
|
8875
9352
|
const { name = "", size, color: color2 } = props;
|
|
8876
9353
|
const classNames = shared_clsx("xmdfont", `xmd-icon-${name}`);
|
|
@@ -8888,14 +9365,16 @@ const LinkRenderer = ({ node }) => {
|
|
|
8888
9365
|
const { renderers, showLinkIcon, onLinkPress } = useMarkdownContext();
|
|
8889
9366
|
const { PhrasingContentResolver: PhrasingContentResolver2 } = renderers;
|
|
8890
9367
|
const { href: url } = node;
|
|
9368
|
+
const isURL = checkURL(url);
|
|
8891
9369
|
const onPress = React.useCallback((e) => {
|
|
8892
9370
|
e.preventDefault();
|
|
8893
|
-
if (
|
|
9371
|
+
if (isURL) {
|
|
8894
9372
|
onLinkPress == null ? void 0 : onLinkPress(url);
|
|
8895
9373
|
}
|
|
8896
9374
|
}, [
|
|
8897
9375
|
url,
|
|
8898
|
-
onLinkPress
|
|
9376
|
+
onLinkPress,
|
|
9377
|
+
isURL
|
|
8899
9378
|
]);
|
|
8900
9379
|
return jsxRuntime.jsxs("a", {
|
|
8901
9380
|
className: "xmd-link",
|
|
@@ -8909,7 +9388,7 @@ const LinkRenderer = ({ node }) => {
|
|
|
8909
9388
|
prevNode: index > 0 ? array[index - 1] : void 0,
|
|
8910
9389
|
nextNode: index < array.length - 1 ? array[index + 1] : void 0
|
|
8911
9390
|
}, index)),
|
|
8912
|
-
showLinkIcon && jsxRuntime.jsx("span", {
|
|
9391
|
+
showLinkIcon && isURL && jsxRuntime.jsx("span", {
|
|
8913
9392
|
className: "xmd-link-search",
|
|
8914
9393
|
children: jsxRuntime.jsx(Icon, {
|
|
8915
9394
|
name: "search",
|
|
@@ -9058,7 +9537,7 @@ const ImageRenderer = ({ node }) => {
|
|
|
9058
9537
|
});
|
|
9059
9538
|
};
|
|
9060
9539
|
const CodespanRenderer = ({ node }) => {
|
|
9061
|
-
return jsxRuntime.jsx(
|
|
9540
|
+
return jsxRuntime.jsx("span", {
|
|
9062
9541
|
className: "xmd-codespan",
|
|
9063
9542
|
children: node.text
|
|
9064
9543
|
});
|
|
@@ -9408,7 +9887,7 @@ const defaultRenderers = {
|
|
|
9408
9887
|
...defaultRenderers
|
|
9409
9888
|
});
|
|
9410
9889
|
const pxTransform = (value) => {
|
|
9411
|
-
return value / 2
|
|
9890
|
+
return `${value / 2}px`;
|
|
9412
9891
|
};
|
|
9413
9892
|
const shared_pxTransform = pxTransform;
|
|
9414
9893
|
const defaultTheme = {
|
|
@@ -9771,52 +10250,79 @@ const MarkdownFC = ({ content, theme, tableToolbar, styles: customStyles, showLi
|
|
|
9771
10250
|
});
|
|
9772
10251
|
};
|
|
9773
10252
|
const Markdown = attachStaticMethods(MarkdownFC);
|
|
9774
|
-
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
Markdown,
|
|
9783
|
-
{
|
|
9784
|
-
content,
|
|
9785
|
-
theme: {
|
|
9786
|
-
line_height: 5,
|
|
9787
|
-
text_size: 16
|
|
9788
|
-
}
|
|
9789
|
-
}
|
|
9790
|
-
);
|
|
9791
|
-
};
|
|
9792
|
-
var __defProp$f = Object.defineProperty;
|
|
9793
|
-
var __defProps$a = Object.defineProperties;
|
|
9794
|
-
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
9795
|
-
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
9796
|
-
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
9797
|
-
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
9798
|
-
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9799
|
-
var __spreadValues$c = (a, b3) => {
|
|
10253
|
+
var __defProp$h = Object.defineProperty;
|
|
10254
|
+
var __defProps$c = Object.defineProperties;
|
|
10255
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
10256
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
10257
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
10258
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
10259
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10260
|
+
var __spreadValues$e = (a, b3) => {
|
|
9800
10261
|
for (var prop in b3 || (b3 = {}))
|
|
9801
|
-
if (__hasOwnProp$
|
|
9802
|
-
__defNormalProp$
|
|
9803
|
-
if (__getOwnPropSymbols$
|
|
9804
|
-
for (var prop of __getOwnPropSymbols$
|
|
9805
|
-
if (__propIsEnum$
|
|
9806
|
-
__defNormalProp$
|
|
10262
|
+
if (__hasOwnProp$e.call(b3, prop))
|
|
10263
|
+
__defNormalProp$h(a, prop, b3[prop]);
|
|
10264
|
+
if (__getOwnPropSymbols$e)
|
|
10265
|
+
for (var prop of __getOwnPropSymbols$e(b3)) {
|
|
10266
|
+
if (__propIsEnum$e.call(b3, prop))
|
|
10267
|
+
__defNormalProp$h(a, prop, b3[prop]);
|
|
9807
10268
|
}
|
|
9808
10269
|
return a;
|
|
9809
10270
|
};
|
|
9810
|
-
var __spreadProps$
|
|
9811
|
-
const
|
|
10271
|
+
var __spreadProps$c = (a, b3) => __defProps$c(a, __getOwnPropDescs$c(b3));
|
|
10272
|
+
const MarkdownRender = (props) => {
|
|
9812
10273
|
const theme = useTheme();
|
|
9813
|
-
const { scale } = useResponsive();
|
|
9814
10274
|
const { executeActions } = useAction();
|
|
9815
|
-
const {
|
|
9816
|
-
const
|
|
9817
|
-
const
|
|
9818
|
-
|
|
9819
|
-
|
|
10275
|
+
const { scale } = useResponsive();
|
|
10276
|
+
const { onClick } = useForEditor(props);
|
|
10277
|
+
const content = props.content || "";
|
|
10278
|
+
const style = __spreadProps$c(__spreadValues$e({}, marginAndPaddingToStyle(props, theme, scale)), {
|
|
10279
|
+
textAlign: props.textAlign
|
|
10280
|
+
});
|
|
10281
|
+
const markdownTheme = {
|
|
10282
|
+
line_height: typeof props.lineHeight === "number" ? parseFloat(
|
|
10283
|
+
resolvedLineHeight(props.lineHeight, theme, scale, true).toString()
|
|
10284
|
+
) * 2 : void 0,
|
|
10285
|
+
text_size: typeof props.fontSize === "number" ? parseFloat(
|
|
10286
|
+
resolvedFontSize(props.fontSize, theme, scale, true).toString()
|
|
10287
|
+
) * 2 : void 0,
|
|
10288
|
+
text_color: typeof props.color === "string" ? resolveColor(props.color, theme) : void 0
|
|
10289
|
+
};
|
|
10290
|
+
const handleClick = (e) => {
|
|
10291
|
+
if (props == null ? void 0 : props.actions) {
|
|
10292
|
+
void executeActions(props.actions);
|
|
10293
|
+
}
|
|
10294
|
+
onClick(e);
|
|
10295
|
+
};
|
|
10296
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: handleClick, className: "aui-markdown-wrap", style, children: /* @__PURE__ */ jsxRuntime.jsx(Markdown, { content, theme: markdownTheme }) });
|
|
10297
|
+
};
|
|
10298
|
+
var __defProp$g = Object.defineProperty;
|
|
10299
|
+
var __defProps$b = Object.defineProperties;
|
|
10300
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
10301
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
10302
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
10303
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
10304
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10305
|
+
var __spreadValues$d = (a, b3) => {
|
|
10306
|
+
for (var prop in b3 || (b3 = {}))
|
|
10307
|
+
if (__hasOwnProp$d.call(b3, prop))
|
|
10308
|
+
__defNormalProp$g(a, prop, b3[prop]);
|
|
10309
|
+
if (__getOwnPropSymbols$d)
|
|
10310
|
+
for (var prop of __getOwnPropSymbols$d(b3)) {
|
|
10311
|
+
if (__propIsEnum$d.call(b3, prop))
|
|
10312
|
+
__defNormalProp$g(a, prop, b3[prop]);
|
|
10313
|
+
}
|
|
10314
|
+
return a;
|
|
10315
|
+
};
|
|
10316
|
+
var __spreadProps$b = (a, b3) => __defProps$b(a, __getOwnPropDescs$b(b3));
|
|
10317
|
+
const ImageRender = (props) => {
|
|
10318
|
+
const theme = useTheme();
|
|
10319
|
+
const { scale } = useResponsive();
|
|
10320
|
+
const { executeActions } = useAction();
|
|
10321
|
+
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
10322
|
+
const viewStyle = imageViewStyleFromProps(props, theme, scale);
|
|
10323
|
+
const getObjectFit = (fit) => {
|
|
10324
|
+
switch (fit) {
|
|
10325
|
+
case "contain":
|
|
9820
10326
|
return "contain";
|
|
9821
10327
|
case "cover":
|
|
9822
10328
|
return "cover";
|
|
@@ -9831,7 +10337,7 @@ const ImageRender = (props) => {
|
|
|
9831
10337
|
}
|
|
9832
10338
|
};
|
|
9833
10339
|
const style = imageStyleFromProps(
|
|
9834
|
-
__spreadValues$
|
|
10340
|
+
__spreadValues$d({
|
|
9835
10341
|
width: props.width,
|
|
9836
10342
|
height: props.height,
|
|
9837
10343
|
fit: getObjectFit(props.fit)
|
|
@@ -9839,7 +10345,7 @@ const ImageRender = (props) => {
|
|
|
9839
10345
|
theme,
|
|
9840
10346
|
scale
|
|
9841
10347
|
);
|
|
9842
|
-
const imgUrl = getImageUrl(__spreadValues$
|
|
10348
|
+
const imgUrl = getImageUrl(__spreadValues$d({ url: props.src }, props));
|
|
9843
10349
|
const handleClick = (e) => {
|
|
9844
10350
|
if (props == null ? void 0 : props.actions) {
|
|
9845
10351
|
void executeActions(props.actions);
|
|
@@ -9848,7 +10354,7 @@ const ImageRender = (props) => {
|
|
|
9848
10354
|
};
|
|
9849
10355
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9850
10356
|
"div",
|
|
9851
|
-
__spreadProps$
|
|
10357
|
+
__spreadProps$b(__spreadValues$d({
|
|
9852
10358
|
onClick: props.actions ? handleClick : void 0,
|
|
9853
10359
|
style: viewStyle,
|
|
9854
10360
|
ref: ref2
|
|
@@ -9857,25 +10363,25 @@ const ImageRender = (props) => {
|
|
|
9857
10363
|
})
|
|
9858
10364
|
);
|
|
9859
10365
|
};
|
|
9860
|
-
var __defProp$
|
|
9861
|
-
var __defProps$
|
|
9862
|
-
var __getOwnPropDescs$
|
|
9863
|
-
var __getOwnPropSymbols$
|
|
9864
|
-
var __hasOwnProp$
|
|
9865
|
-
var __propIsEnum$
|
|
9866
|
-
var __defNormalProp$
|
|
9867
|
-
var __spreadValues$
|
|
10366
|
+
var __defProp$f = Object.defineProperty;
|
|
10367
|
+
var __defProps$a = Object.defineProperties;
|
|
10368
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
10369
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
10370
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
10371
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
10372
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10373
|
+
var __spreadValues$c = (a, b3) => {
|
|
9868
10374
|
for (var prop in b3 || (b3 = {}))
|
|
9869
|
-
if (__hasOwnProp$
|
|
9870
|
-
__defNormalProp$
|
|
9871
|
-
if (__getOwnPropSymbols$
|
|
9872
|
-
for (var prop of __getOwnPropSymbols$
|
|
9873
|
-
if (__propIsEnum$
|
|
9874
|
-
__defNormalProp$
|
|
10375
|
+
if (__hasOwnProp$c.call(b3, prop))
|
|
10376
|
+
__defNormalProp$f(a, prop, b3[prop]);
|
|
10377
|
+
if (__getOwnPropSymbols$c)
|
|
10378
|
+
for (var prop of __getOwnPropSymbols$c(b3)) {
|
|
10379
|
+
if (__propIsEnum$c.call(b3, prop))
|
|
10380
|
+
__defNormalProp$f(a, prop, b3[prop]);
|
|
9875
10381
|
}
|
|
9876
10382
|
return a;
|
|
9877
10383
|
};
|
|
9878
|
-
var __spreadProps$
|
|
10384
|
+
var __spreadProps$a = (a, b3) => __defProps$a(a, __getOwnPropDescs$a(b3));
|
|
9879
10385
|
const TextListRender = (props) => {
|
|
9880
10386
|
const theme = useTheme();
|
|
9881
10387
|
const { scale } = useResponsive();
|
|
@@ -9897,7 +10403,7 @@ const TextListRender = (props) => {
|
|
|
9897
10403
|
};
|
|
9898
10404
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9899
10405
|
"div",
|
|
9900
|
-
__spreadProps$
|
|
10406
|
+
__spreadProps$a(__spreadValues$c({
|
|
9901
10407
|
style,
|
|
9902
10408
|
onClick: handleContainerClick,
|
|
9903
10409
|
ref: ref2
|
|
@@ -9951,25 +10457,25 @@ const TextListRender = (props) => {
|
|
|
9951
10457
|
})
|
|
9952
10458
|
);
|
|
9953
10459
|
};
|
|
9954
|
-
var __defProp$
|
|
9955
|
-
var __defProps$
|
|
9956
|
-
var __getOwnPropDescs$
|
|
9957
|
-
var __getOwnPropSymbols$
|
|
9958
|
-
var __hasOwnProp$
|
|
9959
|
-
var __propIsEnum$
|
|
9960
|
-
var __defNormalProp$
|
|
9961
|
-
var __spreadValues$
|
|
10460
|
+
var __defProp$e = Object.defineProperty;
|
|
10461
|
+
var __defProps$9 = Object.defineProperties;
|
|
10462
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
10463
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
10464
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
10465
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
10466
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10467
|
+
var __spreadValues$b = (a, b3) => {
|
|
9962
10468
|
for (var prop in b3 || (b3 = {}))
|
|
9963
|
-
if (__hasOwnProp$
|
|
9964
|
-
__defNormalProp$
|
|
9965
|
-
if (__getOwnPropSymbols$
|
|
9966
|
-
for (var prop of __getOwnPropSymbols$
|
|
9967
|
-
if (__propIsEnum$
|
|
9968
|
-
__defNormalProp$
|
|
10469
|
+
if (__hasOwnProp$b.call(b3, prop))
|
|
10470
|
+
__defNormalProp$e(a, prop, b3[prop]);
|
|
10471
|
+
if (__getOwnPropSymbols$b)
|
|
10472
|
+
for (var prop of __getOwnPropSymbols$b(b3)) {
|
|
10473
|
+
if (__propIsEnum$b.call(b3, prop))
|
|
10474
|
+
__defNormalProp$e(a, prop, b3[prop]);
|
|
9969
10475
|
}
|
|
9970
10476
|
return a;
|
|
9971
10477
|
};
|
|
9972
|
-
var __spreadProps$
|
|
10478
|
+
var __spreadProps$9 = (a, b3) => __defProps$9(a, __getOwnPropDescs$9(b3));
|
|
9973
10479
|
const CustomRenderFromIM = (props) => {
|
|
9974
10480
|
const { executeActions, getLocalData } = useAction();
|
|
9975
10481
|
const { originProps } = props;
|
|
@@ -10002,32 +10508,32 @@ const CustomRenderFromIM = (props) => {
|
|
|
10002
10508
|
},
|
|
10003
10509
|
{}
|
|
10004
10510
|
);
|
|
10005
|
-
return __spreadProps$
|
|
10511
|
+
return __spreadProps$9(__spreadValues$b({}, actions), {
|
|
10006
10512
|
getLocalData
|
|
10007
10513
|
});
|
|
10008
10514
|
}, [executeActions, getLocalData]);
|
|
10009
10515
|
if (!CustomComp)
|
|
10010
10516
|
return /* @__PURE__ */ jsxRuntime.jsx(UnknownRenderer, { type: props == null ? void 0 : props.customCode, prefix: "渲染类型错误" });
|
|
10011
10517
|
if (React.isValidElement(CustomComp)) {
|
|
10012
|
-
return React.cloneElement(CustomComp, __spreadProps$
|
|
10518
|
+
return React.cloneElement(CustomComp, __spreadProps$9(__spreadValues$b(__spreadValues$b(__spreadValues$b({}, (CustomComp == null ? void 0 : CustomComp.props) || {}), originProps), props), {
|
|
10013
10519
|
AUIActions
|
|
10014
10520
|
}));
|
|
10015
10521
|
}
|
|
10016
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CustomComp, __spreadProps$
|
|
10522
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CustomComp, __spreadProps$9(__spreadValues$b(__spreadValues$b({}, originProps), props), { AUIActions }));
|
|
10017
10523
|
};
|
|
10018
|
-
var __defProp$
|
|
10019
|
-
var __getOwnPropSymbols$
|
|
10020
|
-
var __hasOwnProp$
|
|
10021
|
-
var __propIsEnum$
|
|
10022
|
-
var __defNormalProp$
|
|
10023
|
-
var __spreadValues$
|
|
10524
|
+
var __defProp$d = Object.defineProperty;
|
|
10525
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
10526
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
10527
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
10528
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10529
|
+
var __spreadValues$a = (a, b3) => {
|
|
10024
10530
|
for (var prop in b3 || (b3 = {}))
|
|
10025
|
-
if (__hasOwnProp$
|
|
10026
|
-
__defNormalProp$
|
|
10027
|
-
if (__getOwnPropSymbols$
|
|
10028
|
-
for (var prop of __getOwnPropSymbols$
|
|
10029
|
-
if (__propIsEnum$
|
|
10030
|
-
__defNormalProp$
|
|
10531
|
+
if (__hasOwnProp$a.call(b3, prop))
|
|
10532
|
+
__defNormalProp$d(a, prop, b3[prop]);
|
|
10533
|
+
if (__getOwnPropSymbols$a)
|
|
10534
|
+
for (var prop of __getOwnPropSymbols$a(b3)) {
|
|
10535
|
+
if (__propIsEnum$a.call(b3, prop))
|
|
10536
|
+
__defNormalProp$d(a, prop, b3[prop]);
|
|
10031
10537
|
}
|
|
10032
10538
|
return a;
|
|
10033
10539
|
};
|
|
@@ -10041,7 +10547,7 @@ const DividerRender = (props) => {
|
|
|
10041
10547
|
void executeActions(props.actions);
|
|
10042
10548
|
}
|
|
10043
10549
|
};
|
|
10044
|
-
const style = __spreadValues$
|
|
10550
|
+
const style = __spreadValues$a({
|
|
10045
10551
|
width: "100%",
|
|
10046
10552
|
height: props.height ? runStyle(props.height, scale) : "1px",
|
|
10047
10553
|
backgroundColor: props.color ? ((_a2 = theme.color) == null ? void 0 : _a2[props.color]) || props.color : "#eeeeee",
|
|
@@ -10073,25 +10579,25 @@ const CustomRenderFromProps = ({ props, component }) => {
|
|
|
10073
10579
|
}
|
|
10074
10580
|
);
|
|
10075
10581
|
};
|
|
10076
|
-
var __defProp$
|
|
10077
|
-
var __defProps$
|
|
10078
|
-
var __getOwnPropDescs$
|
|
10079
|
-
var __getOwnPropSymbols$
|
|
10080
|
-
var __hasOwnProp$
|
|
10081
|
-
var __propIsEnum$
|
|
10082
|
-
var __defNormalProp$
|
|
10083
|
-
var __spreadValues$
|
|
10582
|
+
var __defProp$c = Object.defineProperty;
|
|
10583
|
+
var __defProps$8 = Object.defineProperties;
|
|
10584
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
10585
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
10586
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
10587
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
10588
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10589
|
+
var __spreadValues$9 = (a, b3) => {
|
|
10084
10590
|
for (var prop in b3 || (b3 = {}))
|
|
10085
|
-
if (__hasOwnProp$
|
|
10086
|
-
__defNormalProp$
|
|
10087
|
-
if (__getOwnPropSymbols$
|
|
10088
|
-
for (var prop of __getOwnPropSymbols$
|
|
10089
|
-
if (__propIsEnum$
|
|
10090
|
-
__defNormalProp$
|
|
10591
|
+
if (__hasOwnProp$9.call(b3, prop))
|
|
10592
|
+
__defNormalProp$c(a, prop, b3[prop]);
|
|
10593
|
+
if (__getOwnPropSymbols$9)
|
|
10594
|
+
for (var prop of __getOwnPropSymbols$9(b3)) {
|
|
10595
|
+
if (__propIsEnum$9.call(b3, prop))
|
|
10596
|
+
__defNormalProp$c(a, prop, b3[prop]);
|
|
10091
10597
|
}
|
|
10092
10598
|
return a;
|
|
10093
10599
|
};
|
|
10094
|
-
var __spreadProps$
|
|
10600
|
+
var __spreadProps$8 = (a, b3) => __defProps$8(a, __getOwnPropDescs$8(b3));
|
|
10095
10601
|
const ChoiceJDHRender = ({ props, values }) => {
|
|
10096
10602
|
const {
|
|
10097
10603
|
updateKey,
|
|
@@ -10110,7 +10616,7 @@ const ChoiceJDHRender = ({ props, values }) => {
|
|
|
10110
10616
|
const { scale } = useResponsive();
|
|
10111
10617
|
const { executeActions } = useAction();
|
|
10112
10618
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
10113
|
-
const style =
|
|
10619
|
+
const style = buildJDHChoiceRenderStyle(props, isSelected, theme, scale);
|
|
10114
10620
|
const actions = [
|
|
10115
10621
|
{
|
|
10116
10622
|
type: !multi ? "updateLocalData" : "toggleLocalDataToSet",
|
|
@@ -10127,7 +10633,7 @@ const ChoiceJDHRender = ({ props, values }) => {
|
|
|
10127
10633
|
};
|
|
10128
10634
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10129
10635
|
"div",
|
|
10130
|
-
__spreadProps$
|
|
10636
|
+
__spreadProps$8(__spreadValues$9({
|
|
10131
10637
|
className: "choice-wrap",
|
|
10132
10638
|
style: style.wrapStyle,
|
|
10133
10639
|
onClick: handleClick,
|
|
@@ -10174,25 +10680,25 @@ const ChoiceJDHRender = ({ props, values }) => {
|
|
|
10174
10680
|
})
|
|
10175
10681
|
);
|
|
10176
10682
|
};
|
|
10177
|
-
var __defProp$
|
|
10178
|
-
var __defProps$
|
|
10179
|
-
var __getOwnPropDescs$
|
|
10180
|
-
var __getOwnPropSymbols$
|
|
10181
|
-
var __hasOwnProp$
|
|
10182
|
-
var __propIsEnum$
|
|
10183
|
-
var __defNormalProp$
|
|
10184
|
-
var __spreadValues$
|
|
10683
|
+
var __defProp$b = Object.defineProperty;
|
|
10684
|
+
var __defProps$7 = Object.defineProperties;
|
|
10685
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
10686
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
10687
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
10688
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
10689
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10690
|
+
var __spreadValues$8 = (a, b3) => {
|
|
10185
10691
|
for (var prop in b3 || (b3 = {}))
|
|
10186
|
-
if (__hasOwnProp$
|
|
10187
|
-
__defNormalProp$
|
|
10188
|
-
if (__getOwnPropSymbols$
|
|
10189
|
-
for (var prop of __getOwnPropSymbols$
|
|
10190
|
-
if (__propIsEnum$
|
|
10191
|
-
__defNormalProp$
|
|
10692
|
+
if (__hasOwnProp$8.call(b3, prop))
|
|
10693
|
+
__defNormalProp$b(a, prop, b3[prop]);
|
|
10694
|
+
if (__getOwnPropSymbols$8)
|
|
10695
|
+
for (var prop of __getOwnPropSymbols$8(b3)) {
|
|
10696
|
+
if (__propIsEnum$8.call(b3, prop))
|
|
10697
|
+
__defNormalProp$b(a, prop, b3[prop]);
|
|
10192
10698
|
}
|
|
10193
10699
|
return a;
|
|
10194
10700
|
};
|
|
10195
|
-
var __spreadProps$
|
|
10701
|
+
var __spreadProps$7 = (a, b3) => __defProps$7(a, __getOwnPropDescs$7(b3));
|
|
10196
10702
|
const ButtonJDHRender = ({ props }) => {
|
|
10197
10703
|
const {
|
|
10198
10704
|
text,
|
|
@@ -10206,7 +10712,7 @@ const ButtonJDHRender = ({ props }) => {
|
|
|
10206
10712
|
const { scale } = useResponsive();
|
|
10207
10713
|
const { executeActions } = useAction();
|
|
10208
10714
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
10209
|
-
const style =
|
|
10715
|
+
const style = buildJDHButtonRenderStyle(props, theme, scale);
|
|
10210
10716
|
const handleClick = (e) => {
|
|
10211
10717
|
if (!disabled) {
|
|
10212
10718
|
executeActions(actions);
|
|
@@ -10215,7 +10721,7 @@ const ButtonJDHRender = ({ props }) => {
|
|
|
10215
10721
|
};
|
|
10216
10722
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10217
10723
|
"div",
|
|
10218
|
-
__spreadProps$
|
|
10724
|
+
__spreadProps$7(__spreadValues$8({
|
|
10219
10725
|
className: "button-wrap",
|
|
10220
10726
|
style: style.wrapStyle,
|
|
10221
10727
|
onClick: handleClick,
|
|
@@ -10237,25 +10743,25 @@ const ButtonJDHRender = ({ props }) => {
|
|
|
10237
10743
|
})
|
|
10238
10744
|
);
|
|
10239
10745
|
};
|
|
10240
|
-
var __defProp$
|
|
10241
|
-
var __defProps$
|
|
10242
|
-
var __getOwnPropDescs$
|
|
10243
|
-
var __getOwnPropSymbols$
|
|
10244
|
-
var __hasOwnProp$
|
|
10245
|
-
var __propIsEnum$
|
|
10246
|
-
var __defNormalProp$
|
|
10247
|
-
var __spreadValues$
|
|
10746
|
+
var __defProp$a = Object.defineProperty;
|
|
10747
|
+
var __defProps$6 = Object.defineProperties;
|
|
10748
|
+
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
10749
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
10750
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
10751
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
10752
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10753
|
+
var __spreadValues$7 = (a, b3) => {
|
|
10248
10754
|
for (var prop in b3 || (b3 = {}))
|
|
10249
|
-
if (__hasOwnProp$
|
|
10250
|
-
__defNormalProp$
|
|
10251
|
-
if (__getOwnPropSymbols$
|
|
10252
|
-
for (var prop of __getOwnPropSymbols$
|
|
10253
|
-
if (__propIsEnum$
|
|
10254
|
-
__defNormalProp$
|
|
10755
|
+
if (__hasOwnProp$7.call(b3, prop))
|
|
10756
|
+
__defNormalProp$a(a, prop, b3[prop]);
|
|
10757
|
+
if (__getOwnPropSymbols$7)
|
|
10758
|
+
for (var prop of __getOwnPropSymbols$7(b3)) {
|
|
10759
|
+
if (__propIsEnum$7.call(b3, prop))
|
|
10760
|
+
__defNormalProp$a(a, prop, b3[prop]);
|
|
10255
10761
|
}
|
|
10256
10762
|
return a;
|
|
10257
10763
|
};
|
|
10258
|
-
var __spreadProps$
|
|
10764
|
+
var __spreadProps$6 = (a, b3) => __defProps$6(a, __getOwnPropDescs$6(b3));
|
|
10259
10765
|
const InputJDHRender = ({ props, value = "", onChange }) => {
|
|
10260
10766
|
const {
|
|
10261
10767
|
placeholder,
|
|
@@ -10270,7 +10776,7 @@ const InputJDHRender = ({ props, value = "", onChange }) => {
|
|
|
10270
10776
|
const { scale } = useResponsive();
|
|
10271
10777
|
const { executeActions } = useAction();
|
|
10272
10778
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
10273
|
-
const style =
|
|
10779
|
+
const style = buildJDHInputRenderStyle(props, theme, scale);
|
|
10274
10780
|
const [targetValue, setTargetValue] = React.useState(value);
|
|
10275
10781
|
const [passwordShow, setPasswordShow] = React.useState(false);
|
|
10276
10782
|
const handleClick = React.useCallback((e) => {
|
|
@@ -10299,7 +10805,7 @@ const InputJDHRender = ({ props, value = "", onChange }) => {
|
|
|
10299
10805
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: "100%" }, children: [
|
|
10300
10806
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10301
10807
|
"div",
|
|
10302
|
-
__spreadProps$
|
|
10808
|
+
__spreadProps$6(__spreadValues$7({
|
|
10303
10809
|
className: "aui-input-wrap",
|
|
10304
10810
|
style: style.wrapStyle,
|
|
10305
10811
|
onClick: handleClick,
|
|
@@ -10425,25 +10931,25 @@ const InputJDHRender = ({ props, value = "", onChange }) => {
|
|
|
10425
10931
|
(error && !!errorMessage || !!subDescription) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "input-msg", style: style.msgStyle, children: error && !!errorMessage ? errorMessage : subDescription }, "msg")
|
|
10426
10932
|
] });
|
|
10427
10933
|
};
|
|
10428
|
-
var __defProp$
|
|
10429
|
-
var __defProps$
|
|
10430
|
-
var __getOwnPropDescs$
|
|
10431
|
-
var __getOwnPropSymbols$
|
|
10432
|
-
var __hasOwnProp$
|
|
10433
|
-
var __propIsEnum$
|
|
10434
|
-
var __defNormalProp$
|
|
10435
|
-
var __spreadValues$
|
|
10934
|
+
var __defProp$9 = Object.defineProperty;
|
|
10935
|
+
var __defProps$5 = Object.defineProperties;
|
|
10936
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
10937
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
10938
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
10939
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
10940
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10941
|
+
var __spreadValues$6 = (a, b3) => {
|
|
10436
10942
|
for (var prop in b3 || (b3 = {}))
|
|
10437
|
-
if (__hasOwnProp$
|
|
10438
|
-
__defNormalProp$
|
|
10439
|
-
if (__getOwnPropSymbols$
|
|
10440
|
-
for (var prop of __getOwnPropSymbols$
|
|
10441
|
-
if (__propIsEnum$
|
|
10442
|
-
__defNormalProp$
|
|
10943
|
+
if (__hasOwnProp$6.call(b3, prop))
|
|
10944
|
+
__defNormalProp$9(a, prop, b3[prop]);
|
|
10945
|
+
if (__getOwnPropSymbols$6)
|
|
10946
|
+
for (var prop of __getOwnPropSymbols$6(b3)) {
|
|
10947
|
+
if (__propIsEnum$6.call(b3, prop))
|
|
10948
|
+
__defNormalProp$9(a, prop, b3[prop]);
|
|
10443
10949
|
}
|
|
10444
10950
|
return a;
|
|
10445
10951
|
};
|
|
10446
|
-
var __spreadProps$
|
|
10952
|
+
var __spreadProps$5 = (a, b3) => __defProps$5(a, __getOwnPropDescs$5(b3));
|
|
10447
10953
|
const TextareaJDHRender = ({ props, value = "", onChange }) => {
|
|
10448
10954
|
const {
|
|
10449
10955
|
placeholder,
|
|
@@ -10458,7 +10964,7 @@ const TextareaJDHRender = ({ props, value = "", onChange }) => {
|
|
|
10458
10964
|
const { scale } = useResponsive();
|
|
10459
10965
|
const { executeActions } = useAction();
|
|
10460
10966
|
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
10461
|
-
const style =
|
|
10967
|
+
const style = buildJDHTextareaRenderStyle(props, value, theme, scale);
|
|
10462
10968
|
const [targetValue, setTargetValue] = React.useState(value);
|
|
10463
10969
|
const [passwordShow, setPasswordShow] = React.useState(false);
|
|
10464
10970
|
const handleClick = React.useCallback((e) => {
|
|
@@ -10476,7 +10982,7 @@ const TextareaJDHRender = ({ props, value = "", onChange }) => {
|
|
|
10476
10982
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
10477
10983
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10478
10984
|
"div",
|
|
10479
|
-
__spreadProps$
|
|
10985
|
+
__spreadProps$5(__spreadValues$6({
|
|
10480
10986
|
className: "aui-textarea-wrap",
|
|
10481
10987
|
style: style.wrapStyle,
|
|
10482
10988
|
onClick: handleClick,
|
|
@@ -10515,6 +11021,166 @@ const TextareaJDHRender = ({ props, value = "", onChange }) => {
|
|
|
10515
11021
|
(error && !!errorMessage || !!subDescription) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "textarea-msg", style: style.msgStyle, children: error && !!errorMessage ? errorMessage : subDescription }, "msg")
|
|
10516
11022
|
] });
|
|
10517
11023
|
};
|
|
11024
|
+
var __defProp$8 = Object.defineProperty;
|
|
11025
|
+
var __defProps$4 = Object.defineProperties;
|
|
11026
|
+
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
11027
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
11028
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
11029
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
11030
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11031
|
+
var __spreadValues$5 = (a, b3) => {
|
|
11032
|
+
for (var prop in b3 || (b3 = {}))
|
|
11033
|
+
if (__hasOwnProp$5.call(b3, prop))
|
|
11034
|
+
__defNormalProp$8(a, prop, b3[prop]);
|
|
11035
|
+
if (__getOwnPropSymbols$5)
|
|
11036
|
+
for (var prop of __getOwnPropSymbols$5(b3)) {
|
|
11037
|
+
if (__propIsEnum$5.call(b3, prop))
|
|
11038
|
+
__defNormalProp$8(a, prop, b3[prop]);
|
|
11039
|
+
}
|
|
11040
|
+
return a;
|
|
11041
|
+
};
|
|
11042
|
+
var __spreadProps$4 = (a, b3) => __defProps$4(a, __getOwnPropDescs$4(b3));
|
|
11043
|
+
const buildColorStyle = (variant, colorType, disabled, hover, theme) => {
|
|
11044
|
+
const { basicColor, color: color2, disabledColor, hoverColor } = theme.components.button;
|
|
11045
|
+
if (disabled) {
|
|
11046
|
+
return {
|
|
11047
|
+
fontColor: disabledColor.color,
|
|
11048
|
+
backgroundColor: variant === "text" || variant === "link" ? disabledColor.textLinkBackground : variant === "filled" ? disabledColor.fillBackground : disabledColor.background,
|
|
11049
|
+
borderColor: variant === "text" || variant === "link" ? disabledColor.textLinkBackground : disabledColor.borderColor
|
|
11050
|
+
};
|
|
11051
|
+
}
|
|
11052
|
+
const colorTheme = __spreadValues$5(__spreadValues$5({}, basicColor), color2[colorType]);
|
|
11053
|
+
const fontColor = variant === "solid" ? colorTheme.color : colorTheme.background;
|
|
11054
|
+
const backgroundColor = variant === "solid" ? colorTheme.background : variant === "filled" ? colorTheme.fillBackground : colorTheme.color;
|
|
11055
|
+
const borderColor = variant === "dashed" || variant === "outlined" ? colorTheme.borderColor : variant === "solid" ? colorTheme.background : colorTheme.color;
|
|
11056
|
+
const result = { fontColor, backgroundColor, borderColor };
|
|
11057
|
+
if (hover) {
|
|
11058
|
+
const hoverTheme = hoverColor[colorType];
|
|
11059
|
+
if (variant === "solid") {
|
|
11060
|
+
result.backgroundColor = hoverTheme.solidBackground;
|
|
11061
|
+
} else if (variant === "outlined" || variant === "dashed") {
|
|
11062
|
+
result.fontColor = hoverTheme.outlineDashedTextColor;
|
|
11063
|
+
result.borderColor = hoverTheme.outlineDashedTextColor;
|
|
11064
|
+
} else if (variant === "link") {
|
|
11065
|
+
result.fontColor = hoverTheme.outlineDashedTextColor;
|
|
11066
|
+
} else if (variant === "text") {
|
|
11067
|
+
result.backgroundColor = hoverTheme.textBackground;
|
|
11068
|
+
} else if (variant === "filled") {
|
|
11069
|
+
result.backgroundColor = hoverTheme.fillBackground;
|
|
11070
|
+
}
|
|
11071
|
+
}
|
|
11072
|
+
return result;
|
|
11073
|
+
};
|
|
11074
|
+
const ButtonRender = ({ props }) => {
|
|
11075
|
+
const {
|
|
11076
|
+
text,
|
|
11077
|
+
iconSrc,
|
|
11078
|
+
loading = false,
|
|
11079
|
+
color: color2 = "default",
|
|
11080
|
+
size = "middle",
|
|
11081
|
+
actions,
|
|
11082
|
+
variant = "solid",
|
|
11083
|
+
disabled = false,
|
|
11084
|
+
block = false
|
|
11085
|
+
} = props;
|
|
11086
|
+
const theme = useTheme();
|
|
11087
|
+
const [onHover, setOnHover] = React.useState(false);
|
|
11088
|
+
const buttonTheme = theme.components.button;
|
|
11089
|
+
const { fontColor, backgroundColor, borderColor } = buildColorStyle(
|
|
11090
|
+
variant,
|
|
11091
|
+
color2,
|
|
11092
|
+
disabled,
|
|
11093
|
+
onHover,
|
|
11094
|
+
theme
|
|
11095
|
+
);
|
|
11096
|
+
const sizeTheme = __spreadValues$5(__spreadValues$5({}, buttonTheme.basicSize), buttonTheme.size[size]);
|
|
11097
|
+
const imageSrc = loading ? buttonTheme.loadingIcon : iconSrc;
|
|
11098
|
+
const { scale } = useResponsive();
|
|
11099
|
+
const { executeActions } = useAction();
|
|
11100
|
+
const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
|
|
11101
|
+
const wrapStyle = __spreadProps$4(__spreadValues$5(__spreadValues$5(__spreadValues$5({}, textStyleFromTheme(
|
|
11102
|
+
theme,
|
|
11103
|
+
{
|
|
11104
|
+
fontSize: props.fontSize ? props.fontSize : sizeTheme.fontSize,
|
|
11105
|
+
lineHeight: props.lineHeight ? props.lineHeight : sizeTheme.lineHeight,
|
|
11106
|
+
fontWeight: props.fontWeight,
|
|
11107
|
+
color: fontColor
|
|
11108
|
+
},
|
|
11109
|
+
scale
|
|
11110
|
+
)), borderRadiusToStyle(sizeTheme.borderRadius, theme, scale)), marginAndPaddingToStyle(__spreadValues$5(__spreadValues$5({}, sizeTheme), props), theme, scale)), {
|
|
11111
|
+
background: resolveColor(backgroundColor, theme),
|
|
11112
|
+
borderWidth: 1,
|
|
11113
|
+
borderStyle: variant === "dashed" ? "dashed" : "solid",
|
|
11114
|
+
borderColor: resolveColor(borderColor, theme),
|
|
11115
|
+
opacity: loading ? buttonTheme.loading.opacity : 1,
|
|
11116
|
+
cursor: disabled ? "not-allowed" : loading ? void 0 : "pointer",
|
|
11117
|
+
flex: block ? 1 : "initial",
|
|
11118
|
+
textAlign: props.textAlign || "center"
|
|
11119
|
+
});
|
|
11120
|
+
const iconSize = wrapStyle.fontSize;
|
|
11121
|
+
const iconStyle = __spreadValues$5(__spreadValues$5({
|
|
11122
|
+
width: iconSize,
|
|
11123
|
+
height: iconSize
|
|
11124
|
+
}, borderRadiusToStyle(buttonTheme.icon.borderRadius, theme, scale)), marginLogogramToStyle(buttonTheme.icon.margin, theme, scale));
|
|
11125
|
+
const handleClick = (e) => {
|
|
11126
|
+
if (!disabled || !loading) {
|
|
11127
|
+
executeActions(actions);
|
|
11128
|
+
}
|
|
11129
|
+
onClick(e);
|
|
11130
|
+
};
|
|
11131
|
+
const handleMouseEnter = React.useCallback(
|
|
11132
|
+
(e) => {
|
|
11133
|
+
setOnHover(true);
|
|
11134
|
+
onMouseEnter(e);
|
|
11135
|
+
},
|
|
11136
|
+
[onMouseEnter]
|
|
11137
|
+
);
|
|
11138
|
+
const handleMouseLeave = React.useCallback(
|
|
11139
|
+
(e) => {
|
|
11140
|
+
setOnHover(false);
|
|
11141
|
+
onMouseLeave(e);
|
|
11142
|
+
},
|
|
11143
|
+
[onMouseLeave]
|
|
11144
|
+
);
|
|
11145
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11146
|
+
"div",
|
|
11147
|
+
{
|
|
11148
|
+
className: "button-wrap",
|
|
11149
|
+
style: wrapStyle,
|
|
11150
|
+
onClick: handleClick,
|
|
11151
|
+
ref: ref2,
|
|
11152
|
+
onMouseEnter: handleMouseEnter,
|
|
11153
|
+
onMouseLeave: handleMouseLeave,
|
|
11154
|
+
children: [
|
|
11155
|
+
imageSrc && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11156
|
+
"img",
|
|
11157
|
+
{
|
|
11158
|
+
style: iconStyle,
|
|
11159
|
+
className: `button-icon ${loading ? "aui-button-loading" : ""}`,
|
|
11160
|
+
src: imageSrc
|
|
11161
|
+
}
|
|
11162
|
+
),
|
|
11163
|
+
!imageSrc && loading && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11164
|
+
"svg",
|
|
11165
|
+
{
|
|
11166
|
+
viewBox: "0 0 1024 1024",
|
|
11167
|
+
focusable: "false",
|
|
11168
|
+
"data-icon": "loading",
|
|
11169
|
+
style: __spreadProps$4(__spreadValues$5({}, marginLogogramToStyle(buttonTheme.icon.margin, theme, scale)), {
|
|
11170
|
+
width: iconSize,
|
|
11171
|
+
height: iconSize,
|
|
11172
|
+
fill: wrapStyle.color
|
|
11173
|
+
}),
|
|
11174
|
+
className: "aui-button-loading",
|
|
11175
|
+
"aria-hidden": "true",
|
|
11176
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" })
|
|
11177
|
+
}
|
|
11178
|
+
),
|
|
11179
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "button-text", children: text })
|
|
11180
|
+
]
|
|
11181
|
+
}
|
|
11182
|
+
);
|
|
11183
|
+
};
|
|
10518
11184
|
var __defProp$7 = Object.defineProperty;
|
|
10519
11185
|
var __defProps$3 = Object.defineProperties;
|
|
10520
11186
|
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
@@ -10568,7 +11234,7 @@ const LeafWrapper = ({
|
|
|
10568
11234
|
return /* @__PURE__ */ jsxRuntime.jsx(ImageRender, __spreadValues$4({}, props));
|
|
10569
11235
|
case "text-list":
|
|
10570
11236
|
return /* @__PURE__ */ jsxRuntime.jsx(TextListRender, __spreadProps$3(__spreadValues$4({}, props), { children }));
|
|
10571
|
-
case "input": {
|
|
11237
|
+
case "jdh-input": {
|
|
10572
11238
|
const p = props;
|
|
10573
11239
|
const value = p.updateKey ? values == null ? void 0 : values[p.updateKey] : "";
|
|
10574
11240
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10580,7 +11246,7 @@ const LeafWrapper = ({
|
|
|
10580
11246
|
}
|
|
10581
11247
|
);
|
|
10582
11248
|
}
|
|
10583
|
-
case "textarea": {
|
|
11249
|
+
case "jdh-textarea": {
|
|
10584
11250
|
const p = props;
|
|
10585
11251
|
const value = p.updateKey ? values == null ? void 0 : values[p.updateKey] : "";
|
|
10586
11252
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10592,6 +11258,9 @@ const LeafWrapper = ({
|
|
|
10592
11258
|
}
|
|
10593
11259
|
);
|
|
10594
11260
|
}
|
|
11261
|
+
case "button": {
|
|
11262
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ButtonRender, { props });
|
|
11263
|
+
}
|
|
10595
11264
|
case "divider": {
|
|
10596
11265
|
return /* @__PURE__ */ jsxRuntime.jsx(DividerRender, __spreadValues$4({}, props));
|
|
10597
11266
|
}
|
|
@@ -10601,14 +11270,20 @@ const LeafWrapper = ({
|
|
|
10601
11270
|
case "custom-render": {
|
|
10602
11271
|
return /* @__PURE__ */ jsxRuntime.jsx(CustomRenderFromIM, __spreadProps$3(__spreadValues$4({}, props), { originProps }));
|
|
10603
11272
|
}
|
|
10604
|
-
case "choice": {
|
|
11273
|
+
case "jdh-choice": {
|
|
10605
11274
|
return /* @__PURE__ */ jsxRuntime.jsx(ChoiceJDHRender, { props, values });
|
|
10606
11275
|
}
|
|
10607
|
-
case "button": {
|
|
11276
|
+
case "jdh-button": {
|
|
10608
11277
|
return /* @__PURE__ */ jsxRuntime.jsx(ButtonJDHRender, { props });
|
|
10609
11278
|
}
|
|
10610
11279
|
default:
|
|
10611
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11280
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11281
|
+
UnknownRenderer,
|
|
11282
|
+
{
|
|
11283
|
+
type: String(renderType),
|
|
11284
|
+
prefix: `未知渲染类型: ${subType}`
|
|
11285
|
+
}
|
|
11286
|
+
);
|
|
10612
11287
|
}
|
|
10613
11288
|
};
|
|
10614
11289
|
const ComponentRenderer = ({
|
|
@@ -10712,7 +11387,8 @@ const MessageContainer = (props) => {
|
|
|
10712
11387
|
template,
|
|
10713
11388
|
referenceComponentList,
|
|
10714
11389
|
data,
|
|
10715
|
-
initLocalData = {}
|
|
11390
|
+
initLocalData = {},
|
|
11391
|
+
devicePixelRatio: componentDevicePixelRatio
|
|
10716
11392
|
} = component;
|
|
10717
11393
|
const [containerWidth, setContainerWidth] = React.useState(
|
|
10718
11394
|
typeof containerWidthFromProps === "number" ? containerWidthFromProps : null
|
|
@@ -10721,7 +11397,7 @@ const MessageContainer = (props) => {
|
|
|
10721
11397
|
const { editorMode: editorMode2 } = useForEditor({});
|
|
10722
11398
|
const responsiveValue = React.useMemo(() => {
|
|
10723
11399
|
return {
|
|
10724
|
-
scale: props.devicePixelRatio ? 1 / props.devicePixelRatio : DEFAULT_SCALE,
|
|
11400
|
+
scale: typeof componentDevicePixelRatio === "number" ? 1 / componentDevicePixelRatio : props.devicePixelRatio ? 1 / props.devicePixelRatio : DEFAULT_SCALE,
|
|
10725
11401
|
containerWidth
|
|
10726
11402
|
};
|
|
10727
11403
|
}, [props.devicePixelRatio, containerWidth]);
|