@wibetter/json-editor 7.0.1 → 7.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/lib/index.css +3 -3
- package/lib/index.js +643 -617
- package/lib/index.js.LICENSE.txt +2 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -344,7 +344,6 @@
|
|
|
344
344
|
}
|
|
345
345
|
},
|
|
346
346
|
3219: function () {},
|
|
347
|
-
3304: function () {},
|
|
348
347
|
3431: function (e, t, n) {
|
|
349
348
|
var a = n(5262);
|
|
350
349
|
(a.__esModule && (a = a.default),
|
|
@@ -701,6 +700,13 @@
|
|
|
701
700
|
'use strict';
|
|
702
701
|
e.exports = require('@wibetter/json-utils');
|
|
703
702
|
},
|
|
703
|
+
5096: function (e, t, n) {
|
|
704
|
+
var a = n(9815);
|
|
705
|
+
(a.__esModule && (a = a.default),
|
|
706
|
+
'string' == typeof a && (a = [[e.id, a, '']]),
|
|
707
|
+
a.locals && (e.exports = a.locals),
|
|
708
|
+
(0, n(611).A)('139d163e', a, !1, { sourceMap: !1 }));
|
|
709
|
+
},
|
|
704
710
|
5262: function () {},
|
|
705
711
|
5584: function (e, t, n) {
|
|
706
712
|
var a = n(3219);
|
|
@@ -749,13 +755,6 @@
|
|
|
749
755
|
},
|
|
750
756
|
});
|
|
751
757
|
},
|
|
752
|
-
5719: function (e, t, n) {
|
|
753
|
-
var a = n(3304);
|
|
754
|
-
(a.__esModule && (a = a.default),
|
|
755
|
-
'string' == typeof a && (a = [[e.id, a, '']]),
|
|
756
|
-
a.locals && (e.exports = a.locals),
|
|
757
|
-
(0, n(611).A)('073b5eef', a, !1, { sourceMap: !1 }));
|
|
758
|
-
},
|
|
759
758
|
5745: function () {},
|
|
760
759
|
5820: function (e) {
|
|
761
760
|
'use strict';
|
|
@@ -906,6 +905,7 @@
|
|
|
906
905
|
a.locals && (e.exports = a.locals),
|
|
907
906
|
(0, n(611).A)('af14a54e', a, !1, { sourceMap: !1 }));
|
|
908
907
|
},
|
|
908
|
+
9815: function () {},
|
|
909
909
|
},
|
|
910
910
|
__webpack_module_cache__ = {};
|
|
911
911
|
function __webpack_require__(e) {
|
|
@@ -950,16 +950,16 @@
|
|
|
950
950
|
(__webpack_require__.r(__webpack_exports__),
|
|
951
951
|
__webpack_require__.d(__webpack_exports__, {
|
|
952
952
|
AddJSONCustomRenderer: function () {
|
|
953
|
-
return
|
|
953
|
+
return Ve;
|
|
954
954
|
},
|
|
955
955
|
Renderer: function () {
|
|
956
956
|
return b.A4;
|
|
957
957
|
},
|
|
958
958
|
default: function () {
|
|
959
|
-
return
|
|
959
|
+
return qe;
|
|
960
960
|
},
|
|
961
961
|
getJSONCustomRenderer: function () {
|
|
962
|
-
return
|
|
962
|
+
return Be;
|
|
963
963
|
},
|
|
964
964
|
loadRenderer: function () {
|
|
965
965
|
return b.Sd;
|
|
@@ -971,7 +971,7 @@
|
|
|
971
971
|
return b.A$;
|
|
972
972
|
},
|
|
973
973
|
withStore: function () {
|
|
974
|
-
return
|
|
974
|
+
return Ie.A;
|
|
975
975
|
},
|
|
976
976
|
}));
|
|
977
977
|
var e = __webpack_require__(6031),
|
|
@@ -1023,7 +1023,7 @@
|
|
|
1023
1023
|
else this.jsonSchema = (0, d.objClone)(y);
|
|
1024
1024
|
var n,
|
|
1025
1025
|
a = this.state.rootJSONStore.JSONEditorStore,
|
|
1026
|
-
o = null == a ? void 0 : a.
|
|
1026
|
+
o = null == a ? void 0 : a.JSONEditorObj;
|
|
1027
1027
|
((n = this.jsonSchema.reset
|
|
1028
1028
|
? (0, d.schema2json)(this.jsonSchema, {})
|
|
1029
1029
|
: (0, d.schema2json)(this.jsonSchema, o)),
|
|
@@ -1197,8 +1197,7 @@
|
|
|
1197
1197
|
? (c[s] = t)
|
|
1198
1198
|
: this.updateFormValueData(i, (((l = {})[s] = t), l));
|
|
1199
1199
|
} else this.jsonData = t;
|
|
1200
|
-
|
|
1201
|
-
n || this.jsonDataChange());
|
|
1200
|
+
n || this.jsonDataChange();
|
|
1202
1201
|
}),
|
|
1203
1202
|
(t.deleteArrayIndex = function (e, t) {
|
|
1204
1203
|
var n = (0, d.getJsonDataByKeyRoute)(e, this.jsonData);
|
|
@@ -1507,7 +1506,7 @@
|
|
|
1507
1506
|
}
|
|
1508
1507
|
__webpack_require__(800);
|
|
1509
1508
|
var j,
|
|
1510
|
-
|
|
1509
|
+
D = function (e) {
|
|
1511
1510
|
return o.createElement(
|
|
1512
1511
|
'svg',
|
|
1513
1512
|
R(
|
|
@@ -1522,9 +1521,9 @@
|
|
|
1522
1521
|
})),
|
|
1523
1522
|
);
|
|
1524
1523
|
};
|
|
1525
|
-
function
|
|
1524
|
+
function T() {
|
|
1526
1525
|
return (
|
|
1527
|
-
(
|
|
1526
|
+
(T = Object.assign
|
|
1528
1527
|
? Object.assign.bind()
|
|
1529
1528
|
: function (e) {
|
|
1530
1529
|
for (var t = 1; t < arguments.length; t++) {
|
|
@@ -1534,14 +1533,14 @@
|
|
|
1534
1533
|
}
|
|
1535
1534
|
return e;
|
|
1536
1535
|
}),
|
|
1537
|
-
|
|
1536
|
+
T.apply(null, arguments)
|
|
1538
1537
|
);
|
|
1539
1538
|
}
|
|
1540
1539
|
var P,
|
|
1541
1540
|
K = function (e) {
|
|
1542
1541
|
return o.createElement(
|
|
1543
1542
|
'svg',
|
|
1544
|
-
|
|
1543
|
+
T(
|
|
1545
1544
|
{ width: 16, height: 16, xmlns: 'http://www.w3.org/2000/svg' },
|
|
1546
1545
|
e,
|
|
1547
1546
|
),
|
|
@@ -1691,7 +1690,7 @@
|
|
|
1691
1690
|
k = x.jsonView,
|
|
1692
1691
|
R = x.isClosed,
|
|
1693
1692
|
j = x.currentActiveArrIndex,
|
|
1694
|
-
|
|
1693
|
+
T = b.type,
|
|
1695
1694
|
P = null === (e = b.showCodeViewBtn) || void 0 === e || e,
|
|
1696
1695
|
J = u(h);
|
|
1697
1696
|
(J && 0 !== J.length && (0, g.cy)(J)) || (J = [{}]);
|
|
@@ -1882,7 +1881,7 @@
|
|
|
1882
1881
|
okText: '确定',
|
|
1883
1882
|
cancelText: '取消',
|
|
1884
1883
|
},
|
|
1885
|
-
o.createElement(
|
|
1884
|
+
o.createElement(D, {
|
|
1886
1885
|
className:
|
|
1887
1886
|
'delete-operate-btn array-operate-btn',
|
|
1888
1887
|
onClick: function (e) {
|
|
@@ -1940,7 +1939,7 @@
|
|
|
1940
1939
|
(I === t ? 'open' : 'closed'),
|
|
1941
1940
|
},
|
|
1942
1941
|
O({
|
|
1943
|
-
parentType:
|
|
1942
|
+
parentType: T,
|
|
1944
1943
|
jsonKey: 'items',
|
|
1945
1944
|
indexRoute: l,
|
|
1946
1945
|
keyRoute: r,
|
|
@@ -2021,7 +2020,7 @@
|
|
|
2021
2020
|
k = x.jsonView,
|
|
2022
2021
|
R = x.isClosed,
|
|
2023
2022
|
j = null === (e = E.showCodeViewBtn) || void 0 === e || e,
|
|
2024
|
-
|
|
2023
|
+
D =
|
|
2025
2024
|
null ===
|
|
2026
2025
|
(n =
|
|
2027
2026
|
null !== (a = this.props.wrapWithPanel) &&
|
|
@@ -2030,9 +2029,9 @@
|
|
|
2030
2029
|
: E.wrapWithPanel) ||
|
|
2031
2030
|
void 0 === n ||
|
|
2032
2031
|
n,
|
|
2033
|
-
|
|
2032
|
+
T = R,
|
|
2034
2033
|
P = (0, C.Gz)(v);
|
|
2035
|
-
void 0 !== P && (
|
|
2034
|
+
void 0 !== P && (T = P);
|
|
2036
2035
|
var K =
|
|
2037
2036
|
null !== (l = E.boxTitle) && void 0 !== l
|
|
2038
2037
|
? l
|
|
@@ -2056,7 +2055,7 @@
|
|
|
2056
2055
|
style: M,
|
|
2057
2056
|
},
|
|
2058
2057
|
!b &&
|
|
2059
|
-
|
|
2058
|
+
D &&
|
|
2060
2059
|
o.createElement(
|
|
2061
2060
|
'div',
|
|
2062
2061
|
{ className: 'element-title', style: B },
|
|
@@ -2097,7 +2096,7 @@
|
|
|
2097
2096
|
style: I,
|
|
2098
2097
|
},
|
|
2099
2098
|
!b &&
|
|
2100
|
-
|
|
2099
|
+
D &&
|
|
2101
2100
|
o.createElement(
|
|
2102
2101
|
'div',
|
|
2103
2102
|
{
|
|
@@ -2110,7 +2109,7 @@
|
|
|
2110
2109
|
K,
|
|
2111
2110
|
' ',
|
|
2112
2111
|
),
|
|
2113
|
-
|
|
2112
|
+
T
|
|
2114
2113
|
? o.createElement(w.RightOutlined, {
|
|
2115
2114
|
className: 'close-operate-btn',
|
|
2116
2115
|
})
|
|
@@ -2144,11 +2143,11 @@
|
|
|
2144
2143
|
{
|
|
2145
2144
|
className:
|
|
2146
2145
|
'content-item ' +
|
|
2147
|
-
(!b &&
|
|
2146
|
+
(!b && D ? 'object-content' : '') +
|
|
2148
2147
|
' ' +
|
|
2149
2148
|
(k ? 'json-view-array' : '') +
|
|
2150
2149
|
' ' +
|
|
2151
|
-
(
|
|
2150
|
+
(T ? 'closed' : ''),
|
|
2152
2151
|
},
|
|
2153
2152
|
!k &&
|
|
2154
2153
|
E.propertyOrder &&
|
|
@@ -2184,7 +2183,24 @@
|
|
|
2184
2183
|
})(o.PureComponent));
|
|
2185
2184
|
(0, b.TS)({ type: 'object', component: B });
|
|
2186
2185
|
var I = S.Select.Option,
|
|
2187
|
-
q =
|
|
2186
|
+
q = function (e, t) {
|
|
2187
|
+
if (
|
|
2188
|
+
(void 0 === t && (t = 'px'), null !== e && 'object' == typeof e)
|
|
2189
|
+
)
|
|
2190
|
+
return {
|
|
2191
|
+
num: void 0 !== e.unit && null !== e.unit ? String(e.unit) : '',
|
|
2192
|
+
unit:
|
|
2193
|
+
void 0 !== e.quantity && null !== e.quantity
|
|
2194
|
+
? String(e.quantity)
|
|
2195
|
+
: t,
|
|
2196
|
+
};
|
|
2197
|
+
if (null == e || '' === e) return { num: '', unit: t };
|
|
2198
|
+
var n = String(e).match(/^(-?\d*\.?\d+)([a-zA-Z%]*)$/);
|
|
2199
|
+
return n
|
|
2200
|
+
? { num: n[1], unit: n[2] || t }
|
|
2201
|
+
: { num: String(e), unit: t };
|
|
2202
|
+
},
|
|
2203
|
+
L = (function (e) {
|
|
2188
2204
|
function t() {
|
|
2189
2205
|
for (
|
|
2190
2206
|
var t, n = arguments.length, a = new Array(n), l = 0;
|
|
@@ -2194,13 +2210,16 @@
|
|
|
2194
2210
|
a[l] = arguments[l];
|
|
2195
2211
|
return (
|
|
2196
2212
|
((t =
|
|
2197
|
-
e.call.apply(e, [this].concat(a)) ||
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2213
|
+
e.call.apply(e, [this].concat(a)) || this).getDefaultUnit =
|
|
2214
|
+
function () {
|
|
2215
|
+
var e = t.props.targetJsonSchema.properties.quantity;
|
|
2216
|
+
return (e && e.default) || 'px';
|
|
2217
|
+
}),
|
|
2218
|
+
(t.getCurQuantityString = function () {
|
|
2219
|
+
var e = t.props,
|
|
2220
|
+
n = e.keyRoute,
|
|
2221
|
+
a = (e.jsonStore || {}).getJSONDataByKeyRoute;
|
|
2222
|
+
return (a && n && a(n)) || '';
|
|
2204
2223
|
}),
|
|
2205
2224
|
(t.handleInputChange = function (e) {
|
|
2206
2225
|
var n = e.target.value;
|
|
@@ -2210,30 +2229,36 @@
|
|
|
2210
2229
|
var n = t.props,
|
|
2211
2230
|
a = n.keyRoute,
|
|
2212
2231
|
o = (n.jsonStore || {}).updateFormValueData,
|
|
2213
|
-
l =
|
|
2214
|
-
|
|
2232
|
+
l =
|
|
2233
|
+
'' +
|
|
2234
|
+
e +
|
|
2235
|
+
q(t.getCurQuantityString(), t.getDefaultUnit()).unit;
|
|
2236
|
+
t.props.onChange ? t.props.onChange(l) : o(a, l);
|
|
2215
2237
|
}),
|
|
2216
2238
|
(t.handleUnitChange = function (e) {
|
|
2217
2239
|
var n = t.props,
|
|
2218
2240
|
a = n.keyRoute,
|
|
2219
2241
|
o = (n.jsonStore || {}).updateFormValueData,
|
|
2220
|
-
l =
|
|
2221
|
-
|
|
2242
|
+
l =
|
|
2243
|
+
'' +
|
|
2244
|
+
q(t.getCurQuantityString(), t.getDefaultUnit()).num +
|
|
2245
|
+
e;
|
|
2246
|
+
t.props.onChange ? t.props.onChange(l) : o(a, l);
|
|
2222
2247
|
}),
|
|
2223
|
-
(t.getUnitSelect = function () {
|
|
2224
|
-
var
|
|
2225
|
-
|
|
2248
|
+
(t.getUnitSelect = function (e) {
|
|
2249
|
+
var n = t.props.targetJsonSchema.properties.quantity,
|
|
2250
|
+
a = [{ label: 'px', value: 'px' }];
|
|
2226
2251
|
return (
|
|
2227
|
-
|
|
2252
|
+
n && n.options && (a = n.options),
|
|
2228
2253
|
o.createElement(
|
|
2229
2254
|
S.Select,
|
|
2230
2255
|
{
|
|
2231
2256
|
className: 'autoComplete-unit-suffix',
|
|
2232
2257
|
style: { display: 'inline-block' },
|
|
2233
|
-
|
|
2258
|
+
value: e,
|
|
2234
2259
|
onChange: t.handleUnitChange,
|
|
2235
2260
|
},
|
|
2236
|
-
|
|
2261
|
+
a.map(function (e) {
|
|
2237
2262
|
return o.createElement(
|
|
2238
2263
|
I,
|
|
2239
2264
|
{ value: e.value, key: e.value },
|
|
@@ -2261,29 +2286,30 @@
|
|
|
2261
2286
|
t = e.schemaStore,
|
|
2262
2287
|
n = e.jsonStore,
|
|
2263
2288
|
a = (t || {}).pageScreen,
|
|
2264
|
-
l = n || {},
|
|
2265
|
-
r =
|
|
2266
|
-
i =
|
|
2267
|
-
s =
|
|
2268
|
-
c =
|
|
2269
|
-
u =
|
|
2270
|
-
p =
|
|
2271
|
-
y =
|
|
2272
|
-
h =
|
|
2273
|
-
g = y
|
|
2274
|
-
f =
|
|
2275
|
-
v =
|
|
2276
|
-
E =
|
|
2277
|
-
b =
|
|
2278
|
-
C =
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
(
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
N =
|
|
2285
|
-
k =
|
|
2286
|
-
|
|
2289
|
+
l = (n || {}).options,
|
|
2290
|
+
r = this.props,
|
|
2291
|
+
i = (r.keyRoute, r.jsonKey),
|
|
2292
|
+
s = r.nodeKey,
|
|
2293
|
+
c = r.targetJsonSchema,
|
|
2294
|
+
u = c.readOnly || !1,
|
|
2295
|
+
p = c.properties.unit,
|
|
2296
|
+
y = this.getDefaultUnit(),
|
|
2297
|
+
h = this.getCurQuantityString(),
|
|
2298
|
+
g = q(h, y),
|
|
2299
|
+
f = g.num,
|
|
2300
|
+
v = g.unit,
|
|
2301
|
+
E = (0, _.y8)(c.type),
|
|
2302
|
+
b = c.autoComplete || !1,
|
|
2303
|
+
C = l || {},
|
|
2304
|
+
O = [];
|
|
2305
|
+
C.GlobalOptions &&
|
|
2306
|
+
(0, d.isArray)(C.GlobalOptions) &&
|
|
2307
|
+
(O = C.GlobalOptions);
|
|
2308
|
+
var x = c.options || O,
|
|
2309
|
+
N = c.style ? (0, _.K8)((0, m.toJS)(c.style)) : {},
|
|
2310
|
+
k = c.titleStyle ? (0, _.K8)((0, m.toJS)(c.titleStyle)) : {},
|
|
2311
|
+
R = c.contentStyle
|
|
2312
|
+
? (0, _.K8)((0, m.toJS)(c.contentStyle))
|
|
2287
2313
|
: {};
|
|
2288
2314
|
return o.createElement(
|
|
2289
2315
|
'div',
|
|
@@ -2292,38 +2318,38 @@
|
|
|
2292
2318
|
'wideScreen' === a
|
|
2293
2319
|
? 'wide-screen-element-warp'
|
|
2294
2320
|
: 'mobile-screen-element-warp ' +
|
|
2295
|
-
(
|
|
2296
|
-
id:
|
|
2297
|
-
style:
|
|
2321
|
+
(E ? 'two-col-element-warp' : ''),
|
|
2322
|
+
id: s,
|
|
2323
|
+
style: N,
|
|
2298
2324
|
},
|
|
2299
2325
|
o.createElement(
|
|
2300
2326
|
'div',
|
|
2301
|
-
{ className: 'element-title', style:
|
|
2327
|
+
{ className: 'element-title', style: k },
|
|
2302
2328
|
o.createElement(
|
|
2303
2329
|
S.Tooltip,
|
|
2304
2330
|
{
|
|
2305
|
-
title: 'wideScreen' === a ?
|
|
2331
|
+
title: 'wideScreen' === a ? c.description : '',
|
|
2306
2332
|
placement: 'top',
|
|
2307
2333
|
},
|
|
2308
2334
|
o.createElement(
|
|
2309
2335
|
'span',
|
|
2310
|
-
{ className: 'title-text', title:
|
|
2311
|
-
|
|
2312
|
-
|
|
2336
|
+
{ className: 'title-text', title: c.title },
|
|
2337
|
+
c.title,
|
|
2338
|
+
c.showKey &&
|
|
2313
2339
|
o.createElement(
|
|
2314
2340
|
'span',
|
|
2315
2341
|
null,
|
|
2316
2342
|
'(',
|
|
2317
|
-
(0, d.truncate)(
|
|
2343
|
+
(0, d.truncate)(i || '', { length: 15 }),
|
|
2318
2344
|
')',
|
|
2319
2345
|
),
|
|
2320
2346
|
),
|
|
2321
2347
|
),
|
|
2322
2348
|
'mobileScreen' === a &&
|
|
2323
|
-
|
|
2349
|
+
c.description &&
|
|
2324
2350
|
o.createElement(
|
|
2325
2351
|
S.Tooltip,
|
|
2326
|
-
{ title:
|
|
2352
|
+
{ title: c.description, placement: 'top' },
|
|
2327
2353
|
o.createElement(w.InfoCircleOutlined, {
|
|
2328
2354
|
className: 'info-icon',
|
|
2329
2355
|
}),
|
|
@@ -2331,41 +2357,41 @@
|
|
|
2331
2357
|
),
|
|
2332
2358
|
o.createElement(
|
|
2333
2359
|
'div',
|
|
2334
|
-
{ className: 'content-item', style:
|
|
2360
|
+
{ className: 'content-item', style: R },
|
|
2335
2361
|
o.createElement(
|
|
2336
2362
|
'div',
|
|
2337
2363
|
{ className: 'form-item-box' },
|
|
2338
|
-
|
|
2364
|
+
b &&
|
|
2339
2365
|
o.createElement(
|
|
2340
2366
|
o.Fragment,
|
|
2341
2367
|
null,
|
|
2342
2368
|
o.createElement(S.AutoComplete, {
|
|
2343
2369
|
className: 'ant-input autoComplete-unit',
|
|
2344
2370
|
style: { display: 'inline-block' },
|
|
2345
|
-
options:
|
|
2346
|
-
disabled:
|
|
2371
|
+
options: x,
|
|
2372
|
+
disabled: u,
|
|
2347
2373
|
allowClear: !0,
|
|
2348
2374
|
placeholder:
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
'请输入' +
|
|
2375
|
+
p.placeholder ||
|
|
2376
|
+
c.placeholder ||
|
|
2377
|
+
'请输入' + p.title ||
|
|
2352
2378
|
0,
|
|
2353
|
-
|
|
2379
|
+
value: f || p.default,
|
|
2354
2380
|
onChange: this.handleValueChange,
|
|
2355
2381
|
}),
|
|
2356
|
-
this.getUnitSelect(),
|
|
2382
|
+
this.getUnitSelect(v),
|
|
2357
2383
|
),
|
|
2358
|
-
!
|
|
2384
|
+
!b &&
|
|
2359
2385
|
o.createElement(S.InputNumber, {
|
|
2360
2386
|
style: { display: 'inline-block', width: '120px' },
|
|
2361
|
-
addonAfter: this.getUnitSelect(),
|
|
2362
|
-
disabled:
|
|
2387
|
+
addonAfter: this.getUnitSelect(v),
|
|
2388
|
+
disabled: u,
|
|
2363
2389
|
placeholder:
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
'请输入' +
|
|
2390
|
+
p.placeholder ||
|
|
2391
|
+
c.placeholder ||
|
|
2392
|
+
'请输入' + p.title ||
|
|
2367
2393
|
0,
|
|
2368
|
-
|
|
2394
|
+
value: '' !== f ? Number(f) : void 0,
|
|
2369
2395
|
onPressEnter: this.handleInputChange,
|
|
2370
2396
|
onBlur: this.handleInputChange,
|
|
2371
2397
|
}),
|
|
@@ -2376,480 +2402,178 @@
|
|
|
2376
2402
|
t
|
|
2377
2403
|
);
|
|
2378
2404
|
})(o.PureComponent);
|
|
2379
|
-
((0, b.TS)({ type: 'quantity', component:
|
|
2380
|
-
__webpack_require__(
|
|
2381
|
-
var
|
|
2382
|
-
function
|
|
2383
|
-
|
|
2405
|
+
((0, b.TS)({ type: 'quantity', component: L }),
|
|
2406
|
+
__webpack_require__(1369));
|
|
2407
|
+
var W = S.Select.Option,
|
|
2408
|
+
F = (function (e) {
|
|
2409
|
+
function t(t) {
|
|
2410
|
+
var n;
|
|
2411
|
+
return (
|
|
2412
|
+
((n = e.call(this, t) || this).boxStyle = {
|
|
2413
|
+
margin: { top: '', right: '', bottom: '', left: '' },
|
|
2414
|
+
padding: { top: '', right: '', bottom: '', left: '' },
|
|
2415
|
+
quantity: 'px',
|
|
2416
|
+
}),
|
|
2417
|
+
(n.initBoxStyle = function () {
|
|
2418
|
+
var e = (n.props.jsonStore || {}).getJSONDataByKeyRoute,
|
|
2419
|
+
t = n.props,
|
|
2420
|
+
a = t.keyRoute,
|
|
2421
|
+
o = t.targetJsonSchema,
|
|
2422
|
+
l = e && a && e(a),
|
|
2423
|
+
r = o.properties.margin,
|
|
2424
|
+
i = o.properties.padding,
|
|
2425
|
+
s = o.properties.quantity,
|
|
2426
|
+
c = l.quantity || s.default,
|
|
2427
|
+
u = l.margin || r.default,
|
|
2428
|
+
p = l.padding || i.default;
|
|
2429
|
+
((u = (0, d.isNumber)(u) ? u.toString() : u || 'auto'),
|
|
2430
|
+
(p = (0, d.isNumber)(p) ? p.toString() : p || 'auto'),
|
|
2431
|
+
(n.boxStyle.quantity = c));
|
|
2432
|
+
var m = u.split(' ');
|
|
2433
|
+
((n.boxStyle.margin.top = n.getStyleValText(m[0])),
|
|
2434
|
+
(n.boxStyle.margin.right = n.getStyleValText(m[1], p)),
|
|
2435
|
+
(n.boxStyle.margin.bottom = n.getStyleValText(
|
|
2436
|
+
m[2] || m[0],
|
|
2437
|
+
)),
|
|
2438
|
+
(n.boxStyle.margin.left = n.getStyleValText(
|
|
2439
|
+
m[3] || m[1],
|
|
2440
|
+
p,
|
|
2441
|
+
)));
|
|
2442
|
+
var y = p.split(' ');
|
|
2443
|
+
((n.boxStyle.padding.top = n.getStyleValText(y[0])),
|
|
2444
|
+
(n.boxStyle.padding.right = n.getStyleValText(y[1], p)),
|
|
2445
|
+
(n.boxStyle.padding.bottom = n.getStyleValText(
|
|
2446
|
+
y[2] || y[0],
|
|
2447
|
+
)),
|
|
2448
|
+
(n.boxStyle.padding.left = n.getStyleValText(
|
|
2449
|
+
y[3] || y[1],
|
|
2450
|
+
p,
|
|
2451
|
+
)));
|
|
2452
|
+
}),
|
|
2453
|
+
(n.getStyleValText = function (e, t) {
|
|
2454
|
+
var n = 'auto';
|
|
2455
|
+
return (
|
|
2456
|
+
'auto' === e ||
|
|
2457
|
+
0 === e ||
|
|
2458
|
+
'' === e ||
|
|
2459
|
+
'0' === e ||
|
|
2460
|
+
/^\$/.test(e)
|
|
2461
|
+
? (n = e)
|
|
2462
|
+
: e
|
|
2463
|
+
? ((n = parseInt(e)),
|
|
2464
|
+
(n = (0, d.isNumber)(n) ? n : 'auto'))
|
|
2465
|
+
: void 0 !== t && (n = t),
|
|
2466
|
+
n
|
|
2467
|
+
);
|
|
2468
|
+
}),
|
|
2469
|
+
(n.getStyleVal = function (e) {
|
|
2470
|
+
var t = '';
|
|
2471
|
+
if ('auto' === e || 0 === e) t = e;
|
|
2472
|
+
else {
|
|
2473
|
+
if (/^\$/.test(e)) return e;
|
|
2474
|
+
'' === e
|
|
2475
|
+
? (t = 'auto')
|
|
2476
|
+
: e &&
|
|
2477
|
+
((t = parseInt(e)),
|
|
2478
|
+
(t = (0, d.isNumber)(t) ? t : 'auto'));
|
|
2479
|
+
}
|
|
2480
|
+
return 'auto' === t || 0 === t
|
|
2481
|
+
? t
|
|
2482
|
+
: '' + t + n.boxStyle.quantity;
|
|
2483
|
+
}),
|
|
2484
|
+
(n.setLayoutBoxStyle = function (e, t, a, o) {
|
|
2485
|
+
if (t) n.linkLayoutBoxStyle(e, a);
|
|
2486
|
+
else {
|
|
2487
|
+
var l = n.getStyleValText(e);
|
|
2488
|
+
((n.boxStyle[a][o] = void 0 !== l ? l : ''),
|
|
2489
|
+
n.updateBoxStyleState());
|
|
2490
|
+
}
|
|
2491
|
+
}),
|
|
2492
|
+
(n.linkLayoutBoxStyle = function (e, t) {
|
|
2493
|
+
var a = n.getStyleValText(e);
|
|
2494
|
+
(void 0 !== a
|
|
2495
|
+
? ((n.boxStyle[t].top = a),
|
|
2496
|
+
(n.boxStyle[t].right = a),
|
|
2497
|
+
(n.boxStyle[t].bottom = a),
|
|
2498
|
+
(n.boxStyle[t].left = a))
|
|
2499
|
+
: ((n.boxStyle[t].top = ''),
|
|
2500
|
+
(n.boxStyle[t].right = ''),
|
|
2501
|
+
(n.boxStyle[t].bottom = ''),
|
|
2502
|
+
(n.boxStyle[t].left = '')),
|
|
2503
|
+
n.updateBoxStyleState());
|
|
2504
|
+
}),
|
|
2505
|
+
(n.updateBoxStyleState = function () {
|
|
2506
|
+
var e = n.props,
|
|
2507
|
+
t = e.keyRoute,
|
|
2508
|
+
a = (e.jsonStore || {}).updateFormValueData,
|
|
2509
|
+
o = n.state.renderAction,
|
|
2510
|
+
l = {
|
|
2511
|
+
margin: n.getMarginValue(),
|
|
2512
|
+
padding: n.getPaddingValue(),
|
|
2513
|
+
quantity: n.boxStyle.quantity,
|
|
2514
|
+
};
|
|
2515
|
+
(a && t && a(t, l), n.setState({ renderAction: !o }));
|
|
2516
|
+
}),
|
|
2517
|
+
(n.getQuantity = function (e) {
|
|
2518
|
+
var t = n.props.targetJsonSchema.properties.quantity;
|
|
2519
|
+
return e.quantity || t.default;
|
|
2520
|
+
}),
|
|
2521
|
+
(n.getSelectAfter = function (e) {
|
|
2522
|
+
return o.createElement('span', null, n.getQuantity(e));
|
|
2523
|
+
}),
|
|
2524
|
+
(n.quantityChange = function (e) {
|
|
2525
|
+
var t = n.props,
|
|
2526
|
+
a = t.keyRoute,
|
|
2527
|
+
o = (t.jsonStore || {}).updateFormValueData,
|
|
2528
|
+
l = {
|
|
2529
|
+
margin: n.getMarginValue(),
|
|
2530
|
+
padding: n.getPaddingValue(),
|
|
2531
|
+
quantity: e,
|
|
2532
|
+
};
|
|
2533
|
+
o && a && o(a, l);
|
|
2534
|
+
}),
|
|
2535
|
+
(n.setType = function (e) {
|
|
2536
|
+
n.setState({ type: e });
|
|
2537
|
+
}),
|
|
2538
|
+
(n.getMarginValue = function () {
|
|
2539
|
+
return (
|
|
2540
|
+
n.getStyleVal(n.boxStyle.margin.top) +
|
|
2541
|
+
' ' +
|
|
2542
|
+
n.getStyleVal(n.boxStyle.margin.right) +
|
|
2543
|
+
' ' +
|
|
2544
|
+
n.getStyleVal(n.boxStyle.margin.bottom) +
|
|
2545
|
+
' ' +
|
|
2546
|
+
n.getStyleVal(n.boxStyle.margin.left)
|
|
2547
|
+
);
|
|
2548
|
+
}),
|
|
2549
|
+
(n.getPaddingValue = function () {
|
|
2550
|
+
return (
|
|
2551
|
+
n.getStyleVal(n.boxStyle.padding.top) +
|
|
2552
|
+
' ' +
|
|
2553
|
+
n.getStyleVal(n.boxStyle.padding.right) +
|
|
2554
|
+
' ' +
|
|
2555
|
+
n.getStyleVal(n.boxStyle.padding.bottom) +
|
|
2556
|
+
' ' +
|
|
2557
|
+
n.getStyleVal(n.boxStyle.padding.left)
|
|
2558
|
+
);
|
|
2559
|
+
}),
|
|
2560
|
+
(n.state = { type: 'all', renderAction: !1 }),
|
|
2561
|
+
(n.updateBoxStyleState = n.updateBoxStyleState.bind(n)),
|
|
2562
|
+
(n.initBoxStyle = n.initBoxStyle.bind(n)),
|
|
2563
|
+
(n.getStyleValText = n.getStyleValText.bind(n)),
|
|
2564
|
+
(n.getSelectAfter = n.getSelectAfter.bind(n)),
|
|
2565
|
+
(n.setLayoutBoxStyle = n.setLayoutBoxStyle.bind(n)),
|
|
2566
|
+
(n.linkLayoutBoxStyle = n.linkLayoutBoxStyle.bind(n)),
|
|
2567
|
+
(n.getSelectAfter = n.getSelectAfter.bind(n)),
|
|
2568
|
+
(n.quantityChange = n.quantityChange.bind(n)),
|
|
2569
|
+
n
|
|
2570
|
+
);
|
|
2571
|
+
}
|
|
2572
|
+
a()(t, e);
|
|
2573
|
+
var n = t.prototype;
|
|
2384
2574
|
return (
|
|
2385
|
-
(
|
|
2386
|
-
|
|
2387
|
-
right: '',
|
|
2388
|
-
bottom: '',
|
|
2389
|
-
left: '',
|
|
2390
|
-
quantity: 'px',
|
|
2391
|
-
}),
|
|
2392
|
-
(n.initBoxStyle = function () {
|
|
2393
|
-
var e = (n.props.jsonStore || {}).getJSONDataByKeyRoute,
|
|
2394
|
-
t = n.props,
|
|
2395
|
-
a = t.keyRoute,
|
|
2396
|
-
o = t.targetJsonSchema,
|
|
2397
|
-
l = e && a && e(a),
|
|
2398
|
-
r = o.properties.unit,
|
|
2399
|
-
i = l.quantity,
|
|
2400
|
-
s = l.unit || r.default;
|
|
2401
|
-
if (
|
|
2402
|
-
((n.layoutStyleObj = {
|
|
2403
|
-
top: '',
|
|
2404
|
-
right: '',
|
|
2405
|
-
bottom: '',
|
|
2406
|
-
left: '',
|
|
2407
|
-
quantity: i,
|
|
2408
|
-
}),
|
|
2409
|
-
s)
|
|
2410
|
-
) {
|
|
2411
|
-
var c = s.split(' ');
|
|
2412
|
-
1 === c.length
|
|
2413
|
-
? c[0] && c[0].indexOf(i) >= 0
|
|
2414
|
-
? ((n.layoutStyleObj.top = c[0]),
|
|
2415
|
-
(n.layoutStyleObj.right = c[0]),
|
|
2416
|
-
(n.layoutStyleObj.bottom = c[0]),
|
|
2417
|
-
(n.layoutStyleObj.left = c[0]))
|
|
2418
|
-
: 'auto' === c[0]
|
|
2419
|
-
? ((n.layoutStyleObj.top = 'auto'),
|
|
2420
|
-
(n.layoutStyleObj.right = 'auto'),
|
|
2421
|
-
(n.layoutStyleObj.bottom = 'auto'),
|
|
2422
|
-
(n.layoutStyleObj.left = 'auto'))
|
|
2423
|
-
: ((n.layoutStyleObj.top = '' + c[0] + i),
|
|
2424
|
-
(n.layoutStyleObj.right = '' + c[0] + i),
|
|
2425
|
-
(n.layoutStyleObj.bottom = '' + c[0] + i),
|
|
2426
|
-
(n.layoutStyleObj.left = '' + c[0] + i))
|
|
2427
|
-
: ((n.layoutStyleObj.top = c[0]),
|
|
2428
|
-
(n.layoutStyleObj.right = c[1]),
|
|
2429
|
-
(n.layoutStyleObj.bottom = c[2] || c[0]),
|
|
2430
|
-
(n.layoutStyleObj.left = c[3] || c[1]));
|
|
2431
|
-
} else
|
|
2432
|
-
0 === s
|
|
2433
|
-
? ((n.layoutStyleObj.top = '' + s + i),
|
|
2434
|
-
(n.layoutStyleObj.right = '' + s + i),
|
|
2435
|
-
(n.layoutStyleObj.bottom = '' + s + i),
|
|
2436
|
-
(n.layoutStyleObj.left = '' + s + i))
|
|
2437
|
-
: ((n.layoutStyleObj.top = 'auto'),
|
|
2438
|
-
(n.layoutStyleObj.right = 'auto'),
|
|
2439
|
-
(n.layoutStyleObj.bottom = 'auto'),
|
|
2440
|
-
(n.layoutStyleObj.left = 'auto'));
|
|
2441
|
-
}),
|
|
2442
|
-
(n.setLayoutBoxStyle = function (e, t, a) {
|
|
2443
|
-
t
|
|
2444
|
-
? n.linkLayoutBoxStyle(e)
|
|
2445
|
-
: ((n.layoutStyleObj[a] =
|
|
2446
|
-
'auto' === e
|
|
2447
|
-
? 'auto'
|
|
2448
|
-
: e
|
|
2449
|
-
? '' + e + n.layoutStyleObj.quantity
|
|
2450
|
-
: 0 === e || '0' === e
|
|
2451
|
-
? '0' + n.layoutStyleObj.quantity
|
|
2452
|
-
: 'auto'),
|
|
2453
|
-
n.updateBoxStyleState());
|
|
2454
|
-
}),
|
|
2455
|
-
(n.linkLayoutBoxStyle = function (e) {
|
|
2456
|
-
var t;
|
|
2457
|
-
((t =
|
|
2458
|
-
'auto' === e
|
|
2459
|
-
? 'auto'
|
|
2460
|
-
: 0 === e
|
|
2461
|
-
? '0' + n.layoutStyleObj.quantity
|
|
2462
|
-
: e
|
|
2463
|
-
? '' + e + n.layoutStyleObj.quantity
|
|
2464
|
-
: 'auto'),
|
|
2465
|
-
(n.layoutStyleObj.top = t),
|
|
2466
|
-
(n.layoutStyleObj.right = t),
|
|
2467
|
-
(n.layoutStyleObj.bottom = t),
|
|
2468
|
-
(n.layoutStyleObj.left = t),
|
|
2469
|
-
n.updateBoxStyleState());
|
|
2470
|
-
}),
|
|
2471
|
-
(n.getStyleValNum = function (e) {
|
|
2472
|
-
if ('auto' === e) return '';
|
|
2473
|
-
if (e === '0' + n.layoutStyleObj.quantity || '0' === e)
|
|
2474
|
-
return 0;
|
|
2475
|
-
if (e) {
|
|
2476
|
-
var t = e.indexOf(n.layoutStyleObj.quantity);
|
|
2477
|
-
return t > -1 ? parseInt(e.substring(0, t)) : parseInt(e);
|
|
2478
|
-
}
|
|
2479
|
-
return 0;
|
|
2480
|
-
}),
|
|
2481
|
-
(n.updateBoxStyleState = function () {
|
|
2482
|
-
var e = n.props,
|
|
2483
|
-
t = e.keyRoute,
|
|
2484
|
-
a = (e.jsonStore || {}).updateFormValueData,
|
|
2485
|
-
o = n.state.renderAction;
|
|
2486
|
-
(a(
|
|
2487
|
-
t ? t + '-unit' : 'unit',
|
|
2488
|
-
n.layoutStyleObj.top +
|
|
2489
|
-
' ' +
|
|
2490
|
-
n.layoutStyleObj.right +
|
|
2491
|
-
' ' +
|
|
2492
|
-
n.layoutStyleObj.bottom +
|
|
2493
|
-
' ' +
|
|
2494
|
-
n.layoutStyleObj.left,
|
|
2495
|
-
),
|
|
2496
|
-
n.setState({ renderAction: !o }));
|
|
2497
|
-
}),
|
|
2498
|
-
(n.state = { layoutStyleLock: !1, renderAction: !1 }),
|
|
2499
|
-
(n.updateBoxStyleState = n.updateBoxStyleState.bind(n)),
|
|
2500
|
-
(n.initBoxStyle = n.initBoxStyle.bind(n)),
|
|
2501
|
-
n
|
|
2502
|
-
);
|
|
2503
|
-
}
|
|
2504
|
-
a()(t, e);
|
|
2505
|
-
var n = t.prototype;
|
|
2506
|
-
return (
|
|
2507
|
-
(n.componentWillMount = function () {
|
|
2508
|
-
this.initBoxStyle();
|
|
2509
|
-
}),
|
|
2510
|
-
(n.componentWillReceiveProps = function (e) {
|
|
2511
|
-
this.initBoxStyle();
|
|
2512
|
-
}),
|
|
2513
|
-
(n.render = function () {
|
|
2514
|
-
var e = this,
|
|
2515
|
-
t = this.props,
|
|
2516
|
-
n = t.nodeKey,
|
|
2517
|
-
a = t.jsonKey,
|
|
2518
|
-
l = t.targetJsonSchema,
|
|
2519
|
-
r = this.props,
|
|
2520
|
-
i = r.schemaStore,
|
|
2521
|
-
s = (r.jsonStore, (i || {}).pageScreen),
|
|
2522
|
-
c = this.state,
|
|
2523
|
-
u = c.renderAction,
|
|
2524
|
-
p = c.layoutStyleLock,
|
|
2525
|
-
y =
|
|
2526
|
-
(l.readOnly, l.style ? (0, _.K8)((0, m.toJS)(l.style)) : {}),
|
|
2527
|
-
h = l.titleStyle ? (0, _.K8)((0, m.toJS)(l.titleStyle)) : {},
|
|
2528
|
-
g = l.contentStyle
|
|
2529
|
-
? (0, _.K8)((0, m.toJS)(l.contentStyle))
|
|
2530
|
-
: {};
|
|
2531
|
-
return o.createElement(
|
|
2532
|
-
'div',
|
|
2533
|
-
{
|
|
2534
|
-
className:
|
|
2535
|
-
('wideScreen' === s
|
|
2536
|
-
? 'wide-screen-element-warp'
|
|
2537
|
-
: 'mobile-screen-element-warp') +
|
|
2538
|
-
' ' +
|
|
2539
|
-
(u ? 'render-mark' : ''),
|
|
2540
|
-
id: n,
|
|
2541
|
-
style: y,
|
|
2542
|
-
},
|
|
2543
|
-
o.createElement(
|
|
2544
|
-
'div',
|
|
2545
|
-
{ className: 'element-title', style: h },
|
|
2546
|
-
o.createElement(
|
|
2547
|
-
S.Tooltip,
|
|
2548
|
-
{
|
|
2549
|
-
title: 'wideScreen' === s ? l.description : '',
|
|
2550
|
-
placement: 'top',
|
|
2551
|
-
},
|
|
2552
|
-
o.createElement(
|
|
2553
|
-
'span',
|
|
2554
|
-
{ className: 'title-text', title: l.title },
|
|
2555
|
-
l.title,
|
|
2556
|
-
l.showKey &&
|
|
2557
|
-
o.createElement(
|
|
2558
|
-
'span',
|
|
2559
|
-
null,
|
|
2560
|
-
'(',
|
|
2561
|
-
(0, d.truncate)(a || '', { length: 15 }),
|
|
2562
|
-
')',
|
|
2563
|
-
),
|
|
2564
|
-
),
|
|
2565
|
-
),
|
|
2566
|
-
'mobileScreen' === s &&
|
|
2567
|
-
l.description &&
|
|
2568
|
-
o.createElement(
|
|
2569
|
-
S.Tooltip,
|
|
2570
|
-
{ title: l.description, placement: 'top' },
|
|
2571
|
-
o.createElement(w.InfoCircleOutlined, {
|
|
2572
|
-
className: 'info-icon',
|
|
2573
|
-
}),
|
|
2574
|
-
),
|
|
2575
|
-
),
|
|
2576
|
-
o.createElement(
|
|
2577
|
-
'div',
|
|
2578
|
-
{
|
|
2579
|
-
className: 'content-item layout-box-style-container',
|
|
2580
|
-
style: g,
|
|
2581
|
-
},
|
|
2582
|
-
o.createElement(
|
|
2583
|
-
'div',
|
|
2584
|
-
{ className: 'center-box' },
|
|
2585
|
-
o.createElement(
|
|
2586
|
-
S.Tooltip,
|
|
2587
|
-
{
|
|
2588
|
-
placement: 'top',
|
|
2589
|
-
title: p ? '点击解锁联动' : '点击联动',
|
|
2590
|
-
},
|
|
2591
|
-
o.createElement('div', {
|
|
2592
|
-
className: p ? 'lock-icon' : 'lock-icon unlock',
|
|
2593
|
-
onClick: function (t) {
|
|
2594
|
-
e.setState({ layoutStyleLock: !p });
|
|
2595
|
-
},
|
|
2596
|
-
}),
|
|
2597
|
-
),
|
|
2598
|
-
),
|
|
2599
|
-
o.createElement(S.InputNumber, {
|
|
2600
|
-
name: 'layoutPaddingTop',
|
|
2601
|
-
className:
|
|
2602
|
-
'layout-input-number layout-item layout-item-top\n ' +
|
|
2603
|
-
('%' === this.layoutStyleObj.quantity
|
|
2604
|
-
? 'percent'
|
|
2605
|
-
: this.layoutStyleObj.quantity) +
|
|
2606
|
-
'-quantity-box',
|
|
2607
|
-
size: 'small',
|
|
2608
|
-
value: this.getStyleValNum(this.layoutStyleObj.top),
|
|
2609
|
-
onPressEnter: function (t) {
|
|
2610
|
-
var n = t.target.value;
|
|
2611
|
-
e.setLayoutBoxStyle(n, p, 'top');
|
|
2612
|
-
},
|
|
2613
|
-
onBlur: function (t) {
|
|
2614
|
-
var n = t.target.value;
|
|
2615
|
-
e.setLayoutBoxStyle(n, p, 'top');
|
|
2616
|
-
},
|
|
2617
|
-
}),
|
|
2618
|
-
o.createElement(S.InputNumber, {
|
|
2619
|
-
name: 'layoutPaddingRight',
|
|
2620
|
-
className:
|
|
2621
|
-
'layout-input-number layout-item layout-item-right\n ' +
|
|
2622
|
-
('%' === this.layoutStyleObj.quantity
|
|
2623
|
-
? 'percent'
|
|
2624
|
-
: this.layoutStyleObj.quantity) +
|
|
2625
|
-
'-quantity-box',
|
|
2626
|
-
size: 'small',
|
|
2627
|
-
value: this.getStyleValNum(this.layoutStyleObj.right),
|
|
2628
|
-
onPressEnter: function (t) {
|
|
2629
|
-
var n = t.target.value;
|
|
2630
|
-
e.setLayoutBoxStyle(n, p, 'right');
|
|
2631
|
-
},
|
|
2632
|
-
onBlur: function (t) {
|
|
2633
|
-
var n = t.target.value;
|
|
2634
|
-
e.setLayoutBoxStyle(n, p, 'right');
|
|
2635
|
-
},
|
|
2636
|
-
}),
|
|
2637
|
-
o.createElement(S.InputNumber, {
|
|
2638
|
-
name: 'layoutPaddingBottom',
|
|
2639
|
-
className:
|
|
2640
|
-
'layout-input-number layout-item layout-item-bottom\n ' +
|
|
2641
|
-
('%' === this.layoutStyleObj.quantity
|
|
2642
|
-
? 'percent'
|
|
2643
|
-
: this.layoutStyleObj.quantity) +
|
|
2644
|
-
'-quantity-box',
|
|
2645
|
-
size: 'small',
|
|
2646
|
-
value: this.getStyleValNum(this.layoutStyleObj.bottom),
|
|
2647
|
-
onPressEnter: function (t) {
|
|
2648
|
-
var n = t.target.value;
|
|
2649
|
-
e.setLayoutBoxStyle(n, p, 'bottom');
|
|
2650
|
-
},
|
|
2651
|
-
onBlur: function (t) {
|
|
2652
|
-
var n = t.target.value;
|
|
2653
|
-
e.setLayoutBoxStyle(n, p, 'bottom');
|
|
2654
|
-
},
|
|
2655
|
-
}),
|
|
2656
|
-
o.createElement(S.InputNumber, {
|
|
2657
|
-
name: 'layoutPaddingLeft',
|
|
2658
|
-
className:
|
|
2659
|
-
'layout-input-number layout-item layout-item-left\n ' +
|
|
2660
|
-
('%' === this.layoutStyleObj.quantity
|
|
2661
|
-
? 'percent'
|
|
2662
|
-
: this.layoutStyleObj.quantity) +
|
|
2663
|
-
'-quantity-box',
|
|
2664
|
-
size: 'small',
|
|
2665
|
-
value: this.getStyleValNum(this.layoutStyleObj.left),
|
|
2666
|
-
onPressEnter: function (t) {
|
|
2667
|
-
var n = t.target.value;
|
|
2668
|
-
e.setLayoutBoxStyle(n, p, 'left');
|
|
2669
|
-
},
|
|
2670
|
-
onBlur: function (t) {
|
|
2671
|
-
var n = t.target.value;
|
|
2672
|
-
e.setLayoutBoxStyle(n, p, 'left');
|
|
2673
|
-
},
|
|
2674
|
-
}),
|
|
2675
|
-
),
|
|
2676
|
-
);
|
|
2677
|
-
}),
|
|
2678
|
-
t
|
|
2679
|
-
);
|
|
2680
|
-
})(o.PureComponent);
|
|
2681
|
-
((0, b.TS)({ type: 'box-style', component: L }),
|
|
2682
|
-
__webpack_require__(1369));
|
|
2683
|
-
var W = S.Select.Option,
|
|
2684
|
-
F = (function (e) {
|
|
2685
|
-
function t(t) {
|
|
2686
|
-
var n;
|
|
2687
|
-
return (
|
|
2688
|
-
((n = e.call(this, t) || this).boxStyle = {
|
|
2689
|
-
margin: { top: '', right: '', bottom: '', left: '' },
|
|
2690
|
-
padding: { top: '', right: '', bottom: '', left: '' },
|
|
2691
|
-
quantity: 'px',
|
|
2692
|
-
}),
|
|
2693
|
-
(n.initBoxStyle = function () {
|
|
2694
|
-
var e = (n.props.jsonStore || {}).getJSONDataByKeyRoute,
|
|
2695
|
-
t = n.props,
|
|
2696
|
-
a = t.keyRoute,
|
|
2697
|
-
o = t.targetJsonSchema,
|
|
2698
|
-
l = e && a && e(a),
|
|
2699
|
-
r = o.properties.margin,
|
|
2700
|
-
i = o.properties.padding,
|
|
2701
|
-
s = o.properties.quantity,
|
|
2702
|
-
c = l.quantity || s.default,
|
|
2703
|
-
u = l.margin || r.default,
|
|
2704
|
-
p = l.padding || i.default;
|
|
2705
|
-
((u = (0, d.isNumber)(u) ? u.toString() : u || 'auto'),
|
|
2706
|
-
(p = (0, d.isNumber)(p) ? p.toString() : p || 'auto'),
|
|
2707
|
-
(n.boxStyle.quantity = c));
|
|
2708
|
-
var m = u.split(' ');
|
|
2709
|
-
((n.boxStyle.margin.top = n.getStyleValText(m[0])),
|
|
2710
|
-
(n.boxStyle.margin.right = n.getStyleValText(m[1], p)),
|
|
2711
|
-
(n.boxStyle.margin.bottom = n.getStyleValText(
|
|
2712
|
-
m[2] || m[0],
|
|
2713
|
-
)),
|
|
2714
|
-
(n.boxStyle.margin.left = n.getStyleValText(
|
|
2715
|
-
m[3] || m[1],
|
|
2716
|
-
p,
|
|
2717
|
-
)));
|
|
2718
|
-
var y = p.split(' ');
|
|
2719
|
-
((n.boxStyle.padding.top = n.getStyleValText(y[0])),
|
|
2720
|
-
(n.boxStyle.padding.right = n.getStyleValText(y[1], p)),
|
|
2721
|
-
(n.boxStyle.padding.bottom = n.getStyleValText(
|
|
2722
|
-
y[2] || y[0],
|
|
2723
|
-
)),
|
|
2724
|
-
(n.boxStyle.padding.left = n.getStyleValText(
|
|
2725
|
-
y[3] || y[1],
|
|
2726
|
-
p,
|
|
2727
|
-
)));
|
|
2728
|
-
}),
|
|
2729
|
-
(n.getStyleValText = function (e, t) {
|
|
2730
|
-
var n = 'auto';
|
|
2731
|
-
return (
|
|
2732
|
-
'auto' === e ||
|
|
2733
|
-
0 === e ||
|
|
2734
|
-
'' === e ||
|
|
2735
|
-
'0' === e ||
|
|
2736
|
-
/^\$/.test(e)
|
|
2737
|
-
? (n = e)
|
|
2738
|
-
: e
|
|
2739
|
-
? ((n = parseInt(e)),
|
|
2740
|
-
(n = (0, d.isNumber)(n) ? n : 'auto'))
|
|
2741
|
-
: void 0 !== t && (n = t),
|
|
2742
|
-
n
|
|
2743
|
-
);
|
|
2744
|
-
}),
|
|
2745
|
-
(n.getStyleVal = function (e) {
|
|
2746
|
-
var t = '';
|
|
2747
|
-
if ('auto' === e || 0 === e) t = e;
|
|
2748
|
-
else {
|
|
2749
|
-
if (/^\$/.test(e)) return e;
|
|
2750
|
-
'' === e
|
|
2751
|
-
? (t = 'auto')
|
|
2752
|
-
: e &&
|
|
2753
|
-
((t = parseInt(e)),
|
|
2754
|
-
(t = (0, d.isNumber)(t) ? t : 'auto'));
|
|
2755
|
-
}
|
|
2756
|
-
return 'auto' === t || 0 === t
|
|
2757
|
-
? t
|
|
2758
|
-
: '' + t + n.boxStyle.quantity;
|
|
2759
|
-
}),
|
|
2760
|
-
(n.setLayoutBoxStyle = function (e, t, a, o) {
|
|
2761
|
-
if (t) n.linkLayoutBoxStyle(e, a);
|
|
2762
|
-
else {
|
|
2763
|
-
var l = n.getStyleValText(e);
|
|
2764
|
-
((n.boxStyle[a][o] = void 0 !== l ? l : ''),
|
|
2765
|
-
n.updateBoxStyleState());
|
|
2766
|
-
}
|
|
2767
|
-
}),
|
|
2768
|
-
(n.linkLayoutBoxStyle = function (e, t) {
|
|
2769
|
-
var a = n.getStyleValText(e);
|
|
2770
|
-
(void 0 !== a
|
|
2771
|
-
? ((n.boxStyle[t].top = a),
|
|
2772
|
-
(n.boxStyle[t].right = a),
|
|
2773
|
-
(n.boxStyle[t].bottom = a),
|
|
2774
|
-
(n.boxStyle[t].left = a))
|
|
2775
|
-
: ((n.boxStyle[t].top = ''),
|
|
2776
|
-
(n.boxStyle[t].right = ''),
|
|
2777
|
-
(n.boxStyle[t].bottom = ''),
|
|
2778
|
-
(n.boxStyle[t].left = '')),
|
|
2779
|
-
n.updateBoxStyleState());
|
|
2780
|
-
}),
|
|
2781
|
-
(n.updateBoxStyleState = function () {
|
|
2782
|
-
var e = n.props,
|
|
2783
|
-
t = e.keyRoute,
|
|
2784
|
-
a = (e.jsonStore || {}).updateFormValueData,
|
|
2785
|
-
o = n.state.renderAction,
|
|
2786
|
-
l = {
|
|
2787
|
-
margin: n.getMarginValue(),
|
|
2788
|
-
padding: n.getPaddingValue(),
|
|
2789
|
-
quantity: n.boxStyle.quantity,
|
|
2790
|
-
};
|
|
2791
|
-
(a && t && a(t, l), n.setState({ renderAction: !o }));
|
|
2792
|
-
}),
|
|
2793
|
-
(n.getQuantity = function (e) {
|
|
2794
|
-
var t = n.props.targetJsonSchema.properties.quantity;
|
|
2795
|
-
return e.quantity || t.default;
|
|
2796
|
-
}),
|
|
2797
|
-
(n.getSelectAfter = function (e) {
|
|
2798
|
-
return o.createElement('span', null, n.getQuantity(e));
|
|
2799
|
-
}),
|
|
2800
|
-
(n.quantityChange = function (e) {
|
|
2801
|
-
var t = n.props,
|
|
2802
|
-
a = t.keyRoute,
|
|
2803
|
-
o = (t.jsonStore || {}).updateFormValueData,
|
|
2804
|
-
l = {
|
|
2805
|
-
margin: n.getMarginValue(),
|
|
2806
|
-
padding: n.getPaddingValue(),
|
|
2807
|
-
quantity: e,
|
|
2808
|
-
};
|
|
2809
|
-
o && a && o(a, l);
|
|
2810
|
-
}),
|
|
2811
|
-
(n.setType = function (e) {
|
|
2812
|
-
n.setState({ type: e });
|
|
2813
|
-
}),
|
|
2814
|
-
(n.getMarginValue = function () {
|
|
2815
|
-
return (
|
|
2816
|
-
n.getStyleVal(n.boxStyle.margin.top) +
|
|
2817
|
-
' ' +
|
|
2818
|
-
n.getStyleVal(n.boxStyle.margin.right) +
|
|
2819
|
-
' ' +
|
|
2820
|
-
n.getStyleVal(n.boxStyle.margin.bottom) +
|
|
2821
|
-
' ' +
|
|
2822
|
-
n.getStyleVal(n.boxStyle.margin.left)
|
|
2823
|
-
);
|
|
2824
|
-
}),
|
|
2825
|
-
(n.getPaddingValue = function () {
|
|
2826
|
-
return (
|
|
2827
|
-
n.getStyleVal(n.boxStyle.padding.top) +
|
|
2828
|
-
' ' +
|
|
2829
|
-
n.getStyleVal(n.boxStyle.padding.right) +
|
|
2830
|
-
' ' +
|
|
2831
|
-
n.getStyleVal(n.boxStyle.padding.bottom) +
|
|
2832
|
-
' ' +
|
|
2833
|
-
n.getStyleVal(n.boxStyle.padding.left)
|
|
2834
|
-
);
|
|
2835
|
-
}),
|
|
2836
|
-
(n.state = { type: 'all', renderAction: !1 }),
|
|
2837
|
-
(n.updateBoxStyleState = n.updateBoxStyleState.bind(n)),
|
|
2838
|
-
(n.initBoxStyle = n.initBoxStyle.bind(n)),
|
|
2839
|
-
(n.getStyleValText = n.getStyleValText.bind(n)),
|
|
2840
|
-
(n.getSelectAfter = n.getSelectAfter.bind(n)),
|
|
2841
|
-
(n.setLayoutBoxStyle = n.setLayoutBoxStyle.bind(n)),
|
|
2842
|
-
(n.linkLayoutBoxStyle = n.linkLayoutBoxStyle.bind(n)),
|
|
2843
|
-
(n.getSelectAfter = n.getSelectAfter.bind(n)),
|
|
2844
|
-
(n.quantityChange = n.quantityChange.bind(n)),
|
|
2845
|
-
n
|
|
2846
|
-
);
|
|
2847
|
-
}
|
|
2848
|
-
a()(t, e);
|
|
2849
|
-
var n = t.prototype;
|
|
2850
|
-
return (
|
|
2851
|
-
(n.componentWillMount = function () {
|
|
2852
|
-
this.initBoxStyle();
|
|
2575
|
+
(n.componentWillMount = function () {
|
|
2576
|
+
this.initBoxStyle();
|
|
2853
2577
|
}),
|
|
2854
2578
|
(n.componentWillReceiveProps = function (e) {
|
|
2855
2579
|
this.initBoxStyle();
|
|
@@ -4076,7 +3800,7 @@
|
|
|
4076
3800
|
(0, b.TS)({ type: 'input', component: G });
|
|
4077
3801
|
var H = G,
|
|
4078
3802
|
$ = S.Input.TextArea,
|
|
4079
|
-
|
|
3803
|
+
Q = (function (e) {
|
|
4080
3804
|
function t(t) {
|
|
4081
3805
|
var n;
|
|
4082
3806
|
return (
|
|
@@ -4188,9 +3912,9 @@
|
|
|
4188
3912
|
t
|
|
4189
3913
|
);
|
|
4190
3914
|
})(o.PureComponent);
|
|
4191
|
-
(0, b.TS)({ type: 'textarea', component:
|
|
4192
|
-
var
|
|
4193
|
-
|
|
3915
|
+
(0, b.TS)({ type: 'textarea', component: Q });
|
|
3916
|
+
var Z = require('braft-editor'),
|
|
3917
|
+
Y = __webpack_require__.n(Z),
|
|
4194
3918
|
X = require('braft-extensions/dist/color-picker'),
|
|
4195
3919
|
ee = __webpack_require__.n(X),
|
|
4196
3920
|
te =
|
|
@@ -4200,8 +3924,8 @@
|
|
|
4200
3924
|
(require('braft-extensions/dist/table.css'),
|
|
4201
3925
|
require('braft-editor/dist/index.css'),
|
|
4202
3926
|
__webpack_require__(1783),
|
|
4203
|
-
|
|
4204
|
-
|
|
3927
|
+
Y().use([ee()({ theme: 'light' })]),
|
|
3928
|
+
Y().use(
|
|
4205
3929
|
ne()({
|
|
4206
3930
|
defaultColumns: 3,
|
|
4207
3931
|
defaultRows: 3,
|
|
@@ -4300,7 +4024,7 @@
|
|
|
4300
4024
|
p = i.targetJsonSchema,
|
|
4301
4025
|
y = this.state.isClosed,
|
|
4302
4026
|
h = r && s && r(s),
|
|
4303
|
-
g =
|
|
4027
|
+
g = Y().createEditorState(h),
|
|
4304
4028
|
f = p.readOnly || !1,
|
|
4305
4029
|
v = p.style ? (0, _.K8)((0, m.toJS)(p.style)) : {},
|
|
4306
4030
|
E = p.titleStyle ? (0, _.K8)((0, m.toJS)(p.titleStyle)) : {},
|
|
@@ -4374,7 +4098,7 @@
|
|
|
4374
4098
|
o.createElement(
|
|
4375
4099
|
'div',
|
|
4376
4100
|
{ className: 'form-item-box' },
|
|
4377
|
-
o.createElement(
|
|
4101
|
+
o.createElement(Y(), {
|
|
4378
4102
|
key: u + '-textEditor',
|
|
4379
4103
|
controls:
|
|
4380
4104
|
'wideScreen' === l
|
|
@@ -6076,8 +5800,8 @@
|
|
|
6076
5800
|
k = b.dataType || {},
|
|
6077
5801
|
R = b.cache || {},
|
|
6078
5802
|
j = b.cacheTime || {},
|
|
6079
|
-
|
|
6080
|
-
|
|
5803
|
+
D = y.style ? (0, _.K8)((0, m.toJS)(y.style)) : {},
|
|
5804
|
+
T = y.titleStyle ? (0, _.K8)((0, m.toJS)(y.titleStyle)) : {},
|
|
6081
5805
|
P = y.contentStyle
|
|
6082
5806
|
? (0, _.K8)((0, m.toJS)(y.contentStyle))
|
|
6083
5807
|
: {},
|
|
@@ -6094,11 +5818,11 @@
|
|
|
6094
5818
|
? 'wide-screen-element-warp'
|
|
6095
5819
|
: 'mobile-screen-element-warp',
|
|
6096
5820
|
id: h,
|
|
6097
|
-
style:
|
|
5821
|
+
style: D,
|
|
6098
5822
|
},
|
|
6099
5823
|
l().createElement(
|
|
6100
5824
|
'div',
|
|
6101
|
-
{ className: 'element-title', style:
|
|
5825
|
+
{ className: 'element-title', style: T },
|
|
6102
5826
|
l().createElement(
|
|
6103
5827
|
'span',
|
|
6104
5828
|
{ className: 'title-text', title: y.title },
|
|
@@ -6536,9 +6260,311 @@
|
|
|
6536
6260
|
}),
|
|
6537
6261
|
n
|
|
6538
6262
|
);
|
|
6539
|
-
})(l().PureComponent);
|
|
6540
|
-
((0, b.TS)({ type: 'api', component: Ne }), __webpack_require__(
|
|
6541
|
-
var ke = (function (e) {
|
|
6263
|
+
})(l().PureComponent);
|
|
6264
|
+
((0, b.TS)({ type: 'api', component: Ne }), __webpack_require__(5096));
|
|
6265
|
+
var ke = (function (e) {
|
|
6266
|
+
function t(t) {
|
|
6267
|
+
var n;
|
|
6268
|
+
return (
|
|
6269
|
+
((n = e.call(this, t) || this).layoutStyleObj = {
|
|
6270
|
+
top: '',
|
|
6271
|
+
right: '',
|
|
6272
|
+
bottom: '',
|
|
6273
|
+
left: '',
|
|
6274
|
+
quantity: 'px',
|
|
6275
|
+
}),
|
|
6276
|
+
(n.initBoxStyle = function () {
|
|
6277
|
+
var e = (n.props.jsonStore || {}).getJSONDataByKeyRoute,
|
|
6278
|
+
t = n.props,
|
|
6279
|
+
a = t.keyRoute,
|
|
6280
|
+
o = t.targetJsonSchema,
|
|
6281
|
+
l = e && a && e(a),
|
|
6282
|
+
r = o.properties.unit,
|
|
6283
|
+
i = l.quantity,
|
|
6284
|
+
s = l.unit || r.default;
|
|
6285
|
+
if (
|
|
6286
|
+
((n.layoutStyleObj = {
|
|
6287
|
+
top: '',
|
|
6288
|
+
right: '',
|
|
6289
|
+
bottom: '',
|
|
6290
|
+
left: '',
|
|
6291
|
+
quantity: i,
|
|
6292
|
+
}),
|
|
6293
|
+
s)
|
|
6294
|
+
) {
|
|
6295
|
+
var c = s.split(' ');
|
|
6296
|
+
1 === c.length
|
|
6297
|
+
? c[0] && c[0].indexOf(i) >= 0
|
|
6298
|
+
? ((n.layoutStyleObj.top = c[0]),
|
|
6299
|
+
(n.layoutStyleObj.right = c[0]),
|
|
6300
|
+
(n.layoutStyleObj.bottom = c[0]),
|
|
6301
|
+
(n.layoutStyleObj.left = c[0]))
|
|
6302
|
+
: 'auto' === c[0]
|
|
6303
|
+
? ((n.layoutStyleObj.top = 'auto'),
|
|
6304
|
+
(n.layoutStyleObj.right = 'auto'),
|
|
6305
|
+
(n.layoutStyleObj.bottom = 'auto'),
|
|
6306
|
+
(n.layoutStyleObj.left = 'auto'))
|
|
6307
|
+
: ((n.layoutStyleObj.top = '' + c[0] + i),
|
|
6308
|
+
(n.layoutStyleObj.right = '' + c[0] + i),
|
|
6309
|
+
(n.layoutStyleObj.bottom = '' + c[0] + i),
|
|
6310
|
+
(n.layoutStyleObj.left = '' + c[0] + i))
|
|
6311
|
+
: ((n.layoutStyleObj.top = c[0]),
|
|
6312
|
+
(n.layoutStyleObj.right = c[1]),
|
|
6313
|
+
(n.layoutStyleObj.bottom = c[2] || c[0]),
|
|
6314
|
+
(n.layoutStyleObj.left = c[3] || c[1]));
|
|
6315
|
+
} else
|
|
6316
|
+
0 === s
|
|
6317
|
+
? ((n.layoutStyleObj.top = '' + s + i),
|
|
6318
|
+
(n.layoutStyleObj.right = '' + s + i),
|
|
6319
|
+
(n.layoutStyleObj.bottom = '' + s + i),
|
|
6320
|
+
(n.layoutStyleObj.left = '' + s + i))
|
|
6321
|
+
: ((n.layoutStyleObj.top = 'auto'),
|
|
6322
|
+
(n.layoutStyleObj.right = 'auto'),
|
|
6323
|
+
(n.layoutStyleObj.bottom = 'auto'),
|
|
6324
|
+
(n.layoutStyleObj.left = 'auto'));
|
|
6325
|
+
}),
|
|
6326
|
+
(n.setLayoutBoxStyle = function (e, t, a) {
|
|
6327
|
+
t
|
|
6328
|
+
? n.linkLayoutBoxStyle(e)
|
|
6329
|
+
: ((n.layoutStyleObj[a] =
|
|
6330
|
+
'auto' === e
|
|
6331
|
+
? 'auto'
|
|
6332
|
+
: e
|
|
6333
|
+
? '' + e + n.layoutStyleObj.quantity
|
|
6334
|
+
: 0 === e || '0' === e
|
|
6335
|
+
? '0' + n.layoutStyleObj.quantity
|
|
6336
|
+
: 'auto'),
|
|
6337
|
+
n.updateBoxStyleState());
|
|
6338
|
+
}),
|
|
6339
|
+
(n.linkLayoutBoxStyle = function (e) {
|
|
6340
|
+
var t;
|
|
6341
|
+
((t =
|
|
6342
|
+
'auto' === e
|
|
6343
|
+
? 'auto'
|
|
6344
|
+
: 0 === e
|
|
6345
|
+
? '0' + n.layoutStyleObj.quantity
|
|
6346
|
+
: e
|
|
6347
|
+
? '' + e + n.layoutStyleObj.quantity
|
|
6348
|
+
: 'auto'),
|
|
6349
|
+
(n.layoutStyleObj.top = t),
|
|
6350
|
+
(n.layoutStyleObj.right = t),
|
|
6351
|
+
(n.layoutStyleObj.bottom = t),
|
|
6352
|
+
(n.layoutStyleObj.left = t),
|
|
6353
|
+
n.updateBoxStyleState());
|
|
6354
|
+
}),
|
|
6355
|
+
(n.getStyleValNum = function (e) {
|
|
6356
|
+
if ('auto' === e) return '';
|
|
6357
|
+
if (e === '0' + n.layoutStyleObj.quantity || '0' === e)
|
|
6358
|
+
return 0;
|
|
6359
|
+
if (e) {
|
|
6360
|
+
var t = e.indexOf(n.layoutStyleObj.quantity);
|
|
6361
|
+
return t > -1 ? parseInt(e.substring(0, t)) : parseInt(e);
|
|
6362
|
+
}
|
|
6363
|
+
return 0;
|
|
6364
|
+
}),
|
|
6365
|
+
(n.updateBoxStyleState = function () {
|
|
6366
|
+
var e = n.props,
|
|
6367
|
+
t = e.keyRoute,
|
|
6368
|
+
a = (e.jsonStore || {}).updateFormValueData,
|
|
6369
|
+
o = n.state.renderAction;
|
|
6370
|
+
(a(
|
|
6371
|
+
t ? t + '-unit' : 'unit',
|
|
6372
|
+
n.layoutStyleObj.top +
|
|
6373
|
+
' ' +
|
|
6374
|
+
n.layoutStyleObj.right +
|
|
6375
|
+
' ' +
|
|
6376
|
+
n.layoutStyleObj.bottom +
|
|
6377
|
+
' ' +
|
|
6378
|
+
n.layoutStyleObj.left,
|
|
6379
|
+
),
|
|
6380
|
+
n.setState({ renderAction: !o }));
|
|
6381
|
+
}),
|
|
6382
|
+
(n.state = { layoutStyleLock: !1, renderAction: !1 }),
|
|
6383
|
+
(n.updateBoxStyleState = n.updateBoxStyleState.bind(n)),
|
|
6384
|
+
(n.initBoxStyle = n.initBoxStyle.bind(n)),
|
|
6385
|
+
n
|
|
6386
|
+
);
|
|
6387
|
+
}
|
|
6388
|
+
a()(t, e);
|
|
6389
|
+
var n = t.prototype;
|
|
6390
|
+
return (
|
|
6391
|
+
(n.componentWillMount = function () {
|
|
6392
|
+
this.initBoxStyle();
|
|
6393
|
+
}),
|
|
6394
|
+
(n.componentWillReceiveProps = function (e) {
|
|
6395
|
+
this.initBoxStyle();
|
|
6396
|
+
}),
|
|
6397
|
+
(n.render = function () {
|
|
6398
|
+
var e = this,
|
|
6399
|
+
t = this.props,
|
|
6400
|
+
n = t.nodeKey,
|
|
6401
|
+
a = t.jsonKey,
|
|
6402
|
+
l = t.targetJsonSchema,
|
|
6403
|
+
r = this.props,
|
|
6404
|
+
i = r.schemaStore,
|
|
6405
|
+
s = (r.jsonStore, (i || {}).pageScreen),
|
|
6406
|
+
c = this.state,
|
|
6407
|
+
u = c.renderAction,
|
|
6408
|
+
p = c.layoutStyleLock,
|
|
6409
|
+
y =
|
|
6410
|
+
(l.readOnly, l.style ? (0, _.K8)((0, m.toJS)(l.style)) : {}),
|
|
6411
|
+
h = l.titleStyle ? (0, _.K8)((0, m.toJS)(l.titleStyle)) : {},
|
|
6412
|
+
g = l.contentStyle
|
|
6413
|
+
? (0, _.K8)((0, m.toJS)(l.contentStyle))
|
|
6414
|
+
: {};
|
|
6415
|
+
return o.createElement(
|
|
6416
|
+
'div',
|
|
6417
|
+
{
|
|
6418
|
+
className:
|
|
6419
|
+
('wideScreen' === s
|
|
6420
|
+
? 'wide-screen-element-warp'
|
|
6421
|
+
: 'mobile-screen-element-warp') +
|
|
6422
|
+
' ' +
|
|
6423
|
+
(u ? 'render-mark' : ''),
|
|
6424
|
+
id: n,
|
|
6425
|
+
style: y,
|
|
6426
|
+
},
|
|
6427
|
+
o.createElement(
|
|
6428
|
+
'div',
|
|
6429
|
+
{ className: 'element-title', style: h },
|
|
6430
|
+
o.createElement(
|
|
6431
|
+
S.Tooltip,
|
|
6432
|
+
{
|
|
6433
|
+
title: 'wideScreen' === s ? l.description : '',
|
|
6434
|
+
placement: 'top',
|
|
6435
|
+
},
|
|
6436
|
+
o.createElement(
|
|
6437
|
+
'span',
|
|
6438
|
+
{ className: 'title-text', title: l.title },
|
|
6439
|
+
l.title,
|
|
6440
|
+
l.showKey &&
|
|
6441
|
+
o.createElement(
|
|
6442
|
+
'span',
|
|
6443
|
+
null,
|
|
6444
|
+
'(',
|
|
6445
|
+
(0, d.truncate)(a || '', { length: 15 }),
|
|
6446
|
+
')',
|
|
6447
|
+
),
|
|
6448
|
+
),
|
|
6449
|
+
),
|
|
6450
|
+
'mobileScreen' === s &&
|
|
6451
|
+
l.description &&
|
|
6452
|
+
o.createElement(
|
|
6453
|
+
S.Tooltip,
|
|
6454
|
+
{ title: l.description, placement: 'top' },
|
|
6455
|
+
o.createElement(w.InfoCircleOutlined, {
|
|
6456
|
+
className: 'info-icon',
|
|
6457
|
+
}),
|
|
6458
|
+
),
|
|
6459
|
+
),
|
|
6460
|
+
o.createElement(
|
|
6461
|
+
'div',
|
|
6462
|
+
{
|
|
6463
|
+
className: 'content-item layout-box-style-container',
|
|
6464
|
+
style: g,
|
|
6465
|
+
},
|
|
6466
|
+
o.createElement(
|
|
6467
|
+
'div',
|
|
6468
|
+
{ className: 'center-box' },
|
|
6469
|
+
o.createElement(
|
|
6470
|
+
S.Tooltip,
|
|
6471
|
+
{
|
|
6472
|
+
placement: 'top',
|
|
6473
|
+
title: p ? '点击解锁联动' : '点击联动',
|
|
6474
|
+
},
|
|
6475
|
+
o.createElement('div', {
|
|
6476
|
+
className: p ? 'lock-icon' : 'lock-icon unlock',
|
|
6477
|
+
onClick: function (t) {
|
|
6478
|
+
e.setState({ layoutStyleLock: !p });
|
|
6479
|
+
},
|
|
6480
|
+
}),
|
|
6481
|
+
),
|
|
6482
|
+
),
|
|
6483
|
+
o.createElement(S.InputNumber, {
|
|
6484
|
+
name: 'layoutPaddingTop',
|
|
6485
|
+
className:
|
|
6486
|
+
'layout-input-number layout-item layout-item-top\n ' +
|
|
6487
|
+
('%' === this.layoutStyleObj.quantity
|
|
6488
|
+
? 'percent'
|
|
6489
|
+
: this.layoutStyleObj.quantity) +
|
|
6490
|
+
'-quantity-box',
|
|
6491
|
+
size: 'small',
|
|
6492
|
+
value: this.getStyleValNum(this.layoutStyleObj.top),
|
|
6493
|
+
onPressEnter: function (t) {
|
|
6494
|
+
var n = t.target.value;
|
|
6495
|
+
e.setLayoutBoxStyle(n, p, 'top');
|
|
6496
|
+
},
|
|
6497
|
+
onBlur: function (t) {
|
|
6498
|
+
var n = t.target.value;
|
|
6499
|
+
e.setLayoutBoxStyle(n, p, 'top');
|
|
6500
|
+
},
|
|
6501
|
+
}),
|
|
6502
|
+
o.createElement(S.InputNumber, {
|
|
6503
|
+
name: 'layoutPaddingRight',
|
|
6504
|
+
className:
|
|
6505
|
+
'layout-input-number layout-item layout-item-right\n ' +
|
|
6506
|
+
('%' === this.layoutStyleObj.quantity
|
|
6507
|
+
? 'percent'
|
|
6508
|
+
: this.layoutStyleObj.quantity) +
|
|
6509
|
+
'-quantity-box',
|
|
6510
|
+
size: 'small',
|
|
6511
|
+
value: this.getStyleValNum(this.layoutStyleObj.right),
|
|
6512
|
+
onPressEnter: function (t) {
|
|
6513
|
+
var n = t.target.value;
|
|
6514
|
+
e.setLayoutBoxStyle(n, p, 'right');
|
|
6515
|
+
},
|
|
6516
|
+
onBlur: function (t) {
|
|
6517
|
+
var n = t.target.value;
|
|
6518
|
+
e.setLayoutBoxStyle(n, p, 'right');
|
|
6519
|
+
},
|
|
6520
|
+
}),
|
|
6521
|
+
o.createElement(S.InputNumber, {
|
|
6522
|
+
name: 'layoutPaddingBottom',
|
|
6523
|
+
className:
|
|
6524
|
+
'layout-input-number layout-item layout-item-bottom\n ' +
|
|
6525
|
+
('%' === this.layoutStyleObj.quantity
|
|
6526
|
+
? 'percent'
|
|
6527
|
+
: this.layoutStyleObj.quantity) +
|
|
6528
|
+
'-quantity-box',
|
|
6529
|
+
size: 'small',
|
|
6530
|
+
value: this.getStyleValNum(this.layoutStyleObj.bottom),
|
|
6531
|
+
onPressEnter: function (t) {
|
|
6532
|
+
var n = t.target.value;
|
|
6533
|
+
e.setLayoutBoxStyle(n, p, 'bottom');
|
|
6534
|
+
},
|
|
6535
|
+
onBlur: function (t) {
|
|
6536
|
+
var n = t.target.value;
|
|
6537
|
+
e.setLayoutBoxStyle(n, p, 'bottom');
|
|
6538
|
+
},
|
|
6539
|
+
}),
|
|
6540
|
+
o.createElement(S.InputNumber, {
|
|
6541
|
+
name: 'layoutPaddingLeft',
|
|
6542
|
+
className:
|
|
6543
|
+
'layout-input-number layout-item layout-item-left\n ' +
|
|
6544
|
+
('%' === this.layoutStyleObj.quantity
|
|
6545
|
+
? 'percent'
|
|
6546
|
+
: this.layoutStyleObj.quantity) +
|
|
6547
|
+
'-quantity-box',
|
|
6548
|
+
size: 'small',
|
|
6549
|
+
value: this.getStyleValNum(this.layoutStyleObj.left),
|
|
6550
|
+
onPressEnter: function (t) {
|
|
6551
|
+
var n = t.target.value;
|
|
6552
|
+
e.setLayoutBoxStyle(n, p, 'left');
|
|
6553
|
+
},
|
|
6554
|
+
onBlur: function (t) {
|
|
6555
|
+
var n = t.target.value;
|
|
6556
|
+
e.setLayoutBoxStyle(n, p, 'left');
|
|
6557
|
+
},
|
|
6558
|
+
}),
|
|
6559
|
+
),
|
|
6560
|
+
);
|
|
6561
|
+
}),
|
|
6562
|
+
t
|
|
6563
|
+
);
|
|
6564
|
+
})(o.PureComponent);
|
|
6565
|
+
((0, b.TS)({ type: 'box-style', component: ke }),
|
|
6566
|
+
__webpack_require__(8678));
|
|
6567
|
+
var Re = (function (e) {
|
|
6542
6568
|
function t(t) {
|
|
6543
6569
|
var n;
|
|
6544
6570
|
return (
|
|
@@ -6765,8 +6791,8 @@
|
|
|
6765
6791
|
t
|
|
6766
6792
|
);
|
|
6767
6793
|
})(o.PureComponent);
|
|
6768
|
-
(0, b.TS)({ type: 'dynamic-data', component:
|
|
6769
|
-
var
|
|
6794
|
+
(0, b.TS)({ type: 'dynamic-data', component: Re });
|
|
6795
|
+
var je = (function (e) {
|
|
6770
6796
|
function n(t) {
|
|
6771
6797
|
var n;
|
|
6772
6798
|
return (
|
|
@@ -6810,8 +6836,8 @@
|
|
|
6810
6836
|
k = y.properties.eventData || {},
|
|
6811
6837
|
R = b.default,
|
|
6812
6838
|
j = null === (e = y.showCodeViewBtn) || void 0 === e || e,
|
|
6813
|
-
|
|
6814
|
-
|
|
6839
|
+
D = y.style ? (0, _.K8)((0, m.toJS)(y.style)) : {},
|
|
6840
|
+
T = y.titleStyle ? (0, _.K8)((0, m.toJS)(y.titleStyle)) : {},
|
|
6815
6841
|
P = y.contentStyle
|
|
6816
6842
|
? (0, _.K8)((0, m.toJS)(y.contentStyle))
|
|
6817
6843
|
: {};
|
|
@@ -6823,11 +6849,11 @@
|
|
|
6823
6849
|
? 'wide-screen-element-warp'
|
|
6824
6850
|
: 'mobile-screen-element-warp',
|
|
6825
6851
|
id: u,
|
|
6826
|
-
style:
|
|
6852
|
+
style: D,
|
|
6827
6853
|
},
|
|
6828
6854
|
o.createElement(
|
|
6829
6855
|
'div',
|
|
6830
|
-
{ className: 'element-title', style:
|
|
6856
|
+
{ className: 'element-title', style: T },
|
|
6831
6857
|
o.createElement(
|
|
6832
6858
|
S.Tooltip,
|
|
6833
6859
|
{
|
|
@@ -6975,9 +7001,9 @@
|
|
|
6975
7001
|
n
|
|
6976
7002
|
);
|
|
6977
7003
|
})(o.PureComponent);
|
|
6978
|
-
((0, b.TS)({ type: 'event', component:
|
|
7004
|
+
((0, b.TS)({ type: 'event', component: je }),
|
|
6979
7005
|
__webpack_require__(5584));
|
|
6980
|
-
var
|
|
7006
|
+
var De = (function (e) {
|
|
6981
7007
|
function n(t) {
|
|
6982
7008
|
var n;
|
|
6983
7009
|
return (
|
|
@@ -7023,8 +7049,8 @@
|
|
|
7023
7049
|
k = C.default,
|
|
7024
7050
|
R = null === (e = h.showCodeViewBtn) || void 0 === e || e,
|
|
7025
7051
|
j = h.style ? (0, _.K8)((0, m.toJS)(h.style)) : {},
|
|
7026
|
-
|
|
7027
|
-
|
|
7052
|
+
D = h.titleStyle ? (0, _.K8)((0, m.toJS)(h.titleStyle)) : {},
|
|
7053
|
+
T = h.contentStyle
|
|
7028
7054
|
? (0, _.K8)((0, m.toJS)(h.contentStyle))
|
|
7029
7055
|
: {};
|
|
7030
7056
|
return o.createElement(
|
|
@@ -7039,7 +7065,7 @@
|
|
|
7039
7065
|
},
|
|
7040
7066
|
o.createElement(
|
|
7041
7067
|
'div',
|
|
7042
|
-
{ className: 'element-title', style:
|
|
7068
|
+
{ className: 'element-title', style: D },
|
|
7043
7069
|
o.createElement(
|
|
7044
7070
|
S.Tooltip,
|
|
7045
7071
|
{
|
|
@@ -7074,7 +7100,7 @@
|
|
|
7074
7100
|
'div',
|
|
7075
7101
|
{
|
|
7076
7102
|
className: 'element-title-card-warp content-item',
|
|
7077
|
-
style:
|
|
7103
|
+
style: T,
|
|
7078
7104
|
},
|
|
7079
7105
|
o.createElement(
|
|
7080
7106
|
'div',
|
|
@@ -7215,7 +7241,7 @@
|
|
|
7215
7241
|
n
|
|
7216
7242
|
);
|
|
7217
7243
|
})(o.PureComponent);
|
|
7218
|
-
(0, b.TS)({ type: 'datasource', component:
|
|
7244
|
+
(0, b.TS)({ type: 'datasource', component: De });
|
|
7219
7245
|
var Te = function (e) {
|
|
7220
7246
|
var n = e.schemaStore,
|
|
7221
7247
|
a = e.jsonStore,
|
|
@@ -7252,10 +7278,10 @@
|
|
|
7252
7278
|
v = b.Jd[S] || H;
|
|
7253
7279
|
return l().createElement(v, t()({}, f));
|
|
7254
7280
|
},
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7281
|
+
Pe = Te,
|
|
7282
|
+
Ke = (__webpack_require__(8104), S.Collapse.Panel),
|
|
7283
|
+
Je = S.Tabs.TabPane,
|
|
7284
|
+
Ae = (function (e) {
|
|
7259
7285
|
function t(t) {
|
|
7260
7286
|
var n, a;
|
|
7261
7287
|
(((a = e.call(this, t) || this).catchViewStyle = function (e) {
|
|
@@ -7394,12 +7420,12 @@
|
|
|
7394
7420
|
return c.propertyOrder &&
|
|
7395
7421
|
c.propertyOrder.length > 0
|
|
7396
7422
|
? o.createElement(
|
|
7397
|
-
|
|
7423
|
+
Ke,
|
|
7398
7424
|
{
|
|
7399
7425
|
header: c.title || e.renderHeader(u),
|
|
7400
7426
|
key: t + '-' + l,
|
|
7401
7427
|
},
|
|
7402
|
-
|
|
7428
|
+
Pe({
|
|
7403
7429
|
parentType: u,
|
|
7404
7430
|
jsonKey: s,
|
|
7405
7431
|
indexRoute: r,
|
|
@@ -7435,14 +7461,14 @@
|
|
|
7435
7461
|
return c.propertyOrder &&
|
|
7436
7462
|
c.propertyOrder.length > 0
|
|
7437
7463
|
? o.createElement(
|
|
7438
|
-
|
|
7464
|
+
Je,
|
|
7439
7465
|
{
|
|
7440
7466
|
tab: c.title || e.renderHeader(u),
|
|
7441
7467
|
key: t + '-' + l,
|
|
7442
7468
|
closable: !1,
|
|
7443
7469
|
className: 'tabs-schema-item',
|
|
7444
7470
|
},
|
|
7445
|
-
|
|
7471
|
+
Pe({
|
|
7446
7472
|
parentType: u,
|
|
7447
7473
|
jsonKey: s,
|
|
7448
7474
|
indexRoute: r,
|
|
@@ -7462,7 +7488,7 @@
|
|
|
7462
7488
|
o.createElement(
|
|
7463
7489
|
o.Fragment,
|
|
7464
7490
|
null,
|
|
7465
|
-
|
|
7491
|
+
Pe({
|
|
7466
7492
|
parentType: '',
|
|
7467
7493
|
jsonKey: '',
|
|
7468
7494
|
indexRoute: '',
|
|
@@ -7487,13 +7513,13 @@
|
|
|
7487
7513
|
t
|
|
7488
7514
|
);
|
|
7489
7515
|
})(o.PureComponent),
|
|
7490
|
-
|
|
7516
|
+
Me = (0, s.inject)(function (e) {
|
|
7491
7517
|
return {
|
|
7492
7518
|
schemaStore: e.JSONSchemaStore,
|
|
7493
7519
|
jsonStore: e.JSONEditorStore,
|
|
7494
7520
|
};
|
|
7495
|
-
})((0, s.observer)(
|
|
7496
|
-
function
|
|
7521
|
+
})((0, s.observer)(Ae));
|
|
7522
|
+
function Ve(e, t) {
|
|
7497
7523
|
if (
|
|
7498
7524
|
(window &&
|
|
7499
7525
|
!window.JSONEditorCustomRenderers &&
|
|
@@ -7506,7 +7532,7 @@
|
|
|
7506
7532
|
'[json-editor]:注册渲染器失败,存在重名渲染器(' + e + ')。',
|
|
7507
7533
|
);
|
|
7508
7534
|
}
|
|
7509
|
-
function
|
|
7535
|
+
function Be(e) {
|
|
7510
7536
|
if (
|
|
7511
7537
|
window &&
|
|
7512
7538
|
window.JSONEditorCustomRenderers &&
|
|
@@ -7551,15 +7577,15 @@
|
|
|
7551
7577
|
);
|
|
7552
7578
|
else {
|
|
7553
7579
|
console.info('[json-editor]: 响应动态注册渲染器事件:', t);
|
|
7554
|
-
var n =
|
|
7580
|
+
var n = Be(t);
|
|
7555
7581
|
n && (0, b.TS)({ type: t, component: n });
|
|
7556
7582
|
}
|
|
7557
7583
|
}
|
|
7558
7584
|
},
|
|
7559
7585
|
!1,
|
|
7560
7586
|
));
|
|
7561
|
-
var
|
|
7562
|
-
|
|
7587
|
+
var Ie = __webpack_require__(8165),
|
|
7588
|
+
qe = (function (e) {
|
|
7563
7589
|
function n(t) {
|
|
7564
7590
|
var n;
|
|
7565
7591
|
return (
|
|
@@ -7580,7 +7606,7 @@
|
|
|
7580
7606
|
JSONSchemaStore: n.JSONSchemaStore,
|
|
7581
7607
|
JSONEditorStore: n.JSONEditorStore,
|
|
7582
7608
|
},
|
|
7583
|
-
o.createElement(
|
|
7609
|
+
o.createElement(Me, t()({}, this.props)),
|
|
7584
7610
|
);
|
|
7585
7611
|
return e ? (i().render(a, e), '') : a;
|
|
7586
7612
|
}),
|