@wibetter/json-utils 5.2.9 → 5.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.min.js +23 -23
- package/dist/index.js +32 -32
- package/dist/index.js.LICENSE.txt +2 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1466,15 +1466,15 @@ var initSohuSourceData = {
|
|
|
1466
1466
|
options: [
|
|
1467
1467
|
{
|
|
1468
1468
|
label: 'channel',
|
|
1469
|
-
value:
|
|
1469
|
+
value: 13,
|
|
1470
1470
|
},
|
|
1471
1471
|
{
|
|
1472
1472
|
label: 'topic',
|
|
1473
|
-
value:
|
|
1473
|
+
value: 15,
|
|
1474
1474
|
},
|
|
1475
1475
|
{
|
|
1476
1476
|
label: 'block',
|
|
1477
|
-
value:
|
|
1477
|
+
value: 14,
|
|
1478
1478
|
},
|
|
1479
1479
|
],
|
|
1480
1480
|
description: '',
|
package/dist/index.esm.min.js
CHANGED
|
@@ -834,9 +834,9 @@ var i,
|
|
|
834
834
|
type: 'select',
|
|
835
835
|
title: '数据源类型',
|
|
836
836
|
options: [
|
|
837
|
-
{ label: 'channel', value:
|
|
838
|
-
{ label: 'topic', value:
|
|
839
|
-
{ label: 'block', value:
|
|
837
|
+
{ label: 'channel', value: 13 },
|
|
838
|
+
{ label: 'topic', value: 15 },
|
|
839
|
+
{ label: 'block', value: 14 },
|
|
840
840
|
],
|
|
841
841
|
description: '',
|
|
842
842
|
onShow: 'type === "RuntimeDataSelfDefine"',
|
|
@@ -1477,7 +1477,7 @@ function V(e, t) {
|
|
|
1477
1477
|
}
|
|
1478
1478
|
return i;
|
|
1479
1479
|
}
|
|
1480
|
-
function
|
|
1480
|
+
function R(e, t, r) {
|
|
1481
1481
|
var n = t;
|
|
1482
1482
|
if ((r && (n = x(t)), e))
|
|
1483
1483
|
for (var i = e.split('-'), o = 0, a = i.length; o < a; o++) {
|
|
@@ -1486,7 +1486,7 @@ function k(e, t, r) {
|
|
|
1486
1486
|
}
|
|
1487
1487
|
return n;
|
|
1488
1488
|
}
|
|
1489
|
-
function
|
|
1489
|
+
function k(e, t, r) {
|
|
1490
1490
|
var n = t;
|
|
1491
1491
|
if ((r && (n = x(t)), e))
|
|
1492
1492
|
for (var i = e.split('-'), o = 0, a = i.length; o < a; o++) {
|
|
@@ -1884,7 +1884,7 @@ function pe(e, t, r) {
|
|
|
1884
1884
|
void 0 === t && (t = $), void 0 === r && (r = $);
|
|
1885
1885
|
var n,
|
|
1886
1886
|
i = new le(e);
|
|
1887
|
-
return t !== $ && Pt('onBecomeObserved', i, t, n), r !== $ &&
|
|
1887
|
+
return t !== $ && Pt('onBecomeObserved', i, t, n), r !== $ && kt(i, r), i;
|
|
1888
1888
|
}
|
|
1889
1889
|
var ce = {
|
|
1890
1890
|
identity: function (e, t) {
|
|
@@ -2143,12 +2143,12 @@ var Ae = Se(_e),
|
|
|
2143
2143
|
);
|
|
2144
2144
|
}),
|
|
2145
2145
|
Ve = Se(je),
|
|
2146
|
-
|
|
2146
|
+
Re = Se(function (e, t, r) {
|
|
2147
2147
|
if ('production' !== process.env.NODE_ENV && qt(e))
|
|
2148
2148
|
throw 'observable.struct should not be used with observable values';
|
|
2149
2149
|
return _r(e, t) ? t : e;
|
|
2150
2150
|
});
|
|
2151
|
-
function
|
|
2151
|
+
function ke(e) {
|
|
2152
2152
|
return e.defaultDecorator
|
|
2153
2153
|
? e.defaultDecorator.enhancer
|
|
2154
2154
|
: !1 === e.deep
|
|
@@ -2159,7 +2159,7 @@ var Pe = {
|
|
|
2159
2159
|
box: function (e, t) {
|
|
2160
2160
|
arguments.length > 2 && Me('box');
|
|
2161
2161
|
var r = De(t);
|
|
2162
|
-
return new at(e,
|
|
2162
|
+
return new at(e, ke(r), r.name, !0, r.equals);
|
|
2163
2163
|
},
|
|
2164
2164
|
array: function (e, t) {
|
|
2165
2165
|
arguments.length > 2 && Me('array');
|
|
@@ -2184,17 +2184,17 @@ var Pe = {
|
|
|
2184
2184
|
i.spliceWithArray(0, 0, e), ot(u);
|
|
2185
2185
|
}
|
|
2186
2186
|
return l;
|
|
2187
|
-
})(e,
|
|
2187
|
+
})(e, ke(r), r.name);
|
|
2188
2188
|
},
|
|
2189
2189
|
map: function (e, t) {
|
|
2190
2190
|
arguments.length > 2 && Me('map');
|
|
2191
2191
|
var r = De(t);
|
|
2192
|
-
return new sr(e,
|
|
2192
|
+
return new sr(e, ke(r), r.name);
|
|
2193
2193
|
},
|
|
2194
2194
|
set: function (e, t) {
|
|
2195
2195
|
arguments.length > 2 && Me('set');
|
|
2196
2196
|
var r = De(t);
|
|
2197
|
-
return new pr(e,
|
|
2197
|
+
return new pr(e, ke(r), r.name);
|
|
2198
2198
|
},
|
|
2199
2199
|
object: function (e, t, r) {
|
|
2200
2200
|
'string' == typeof arguments[1] && Me('object');
|
|
@@ -2210,7 +2210,7 @@ var Pe = {
|
|
|
2210
2210
|
ref: Ve,
|
|
2211
2211
|
shallow: Te,
|
|
2212
2212
|
deep: Ae,
|
|
2213
|
-
struct:
|
|
2213
|
+
struct: Re,
|
|
2214
2214
|
},
|
|
2215
2215
|
Ie = function (e, t, r) {
|
|
2216
2216
|
if ('string' == typeof arguments[1] || 'symbol' == typeof arguments[1])
|
|
@@ -2750,7 +2750,7 @@ var st = (function () {
|
|
|
2750
2750
|
? function (t) {
|
|
2751
2751
|
return setTimeout(t, e.delay);
|
|
2752
2752
|
}
|
|
2753
|
-
:
|
|
2753
|
+
: Rt;
|
|
2754
2754
|
})(t),
|
|
2755
2755
|
a = !1;
|
|
2756
2756
|
n = new Et(
|
|
@@ -3141,10 +3141,10 @@ function Vt(e) {
|
|
|
3141
3141
|
'production' !== process.env.NODE_ENV &&
|
|
3142
3142
|
Dt(e ? fe(fe({}, e), { spyReportEnd: !0 }) : Tt);
|
|
3143
3143
|
}
|
|
3144
|
-
var
|
|
3144
|
+
var Rt = function (e) {
|
|
3145
3145
|
return e();
|
|
3146
3146
|
};
|
|
3147
|
-
function
|
|
3147
|
+
function kt(e, t, r) {
|
|
3148
3148
|
return Pt('onBecomeUnobserved', e, t, r);
|
|
3149
3149
|
}
|
|
3150
3150
|
function Pt(e, t, r, n) {
|
|
@@ -3835,7 +3835,7 @@ var or,
|
|
|
3835
3835
|
!1,
|
|
3836
3836
|
));
|
|
3837
3837
|
this._hasMap.set(e, n),
|
|
3838
|
-
|
|
3838
|
+
kt(n, function () {
|
|
3839
3839
|
return t._hasMap.delete(e);
|
|
3840
3840
|
});
|
|
3841
3841
|
}
|
|
@@ -4918,12 +4918,12 @@ var Tr =
|
|
|
4918
4918
|
function Vr(e) {
|
|
4919
4919
|
return Tr[e] || e;
|
|
4920
4920
|
}
|
|
4921
|
-
function
|
|
4921
|
+
function Rr(e, t) {
|
|
4922
4922
|
Tr[e]
|
|
4923
4923
|
? console.warn('当前已经存在' + e + '(' + Tr[e] + '),暂时不支持覆盖。')
|
|
4924
4924
|
: (Tr[e] = t);
|
|
4925
4925
|
}
|
|
4926
|
-
function
|
|
4926
|
+
function kr(e) {
|
|
4927
4927
|
var t = !0;
|
|
4928
4928
|
if (!e) return t;
|
|
4929
4929
|
var r = e.type;
|
|
@@ -5297,13 +5297,13 @@ export {
|
|
|
5297
5297
|
Lr as getCurPosition,
|
|
5298
5298
|
zr as getDefaultOptionVal,
|
|
5299
5299
|
Vr as getExpectType,
|
|
5300
|
-
|
|
5300
|
+
R as getJsonDataByKeyRoute,
|
|
5301
5301
|
qr as getNextIndexRoute,
|
|
5302
5302
|
Ur as getParentIndexRoute,
|
|
5303
5303
|
Fr as getParentIndexRoute_CurIndex,
|
|
5304
5304
|
tn as getParentKeyRoute,
|
|
5305
5305
|
rn as getParentKeyRoute_CurKey,
|
|
5306
|
-
|
|
5306
|
+
k as getSchemaByIndexRoute,
|
|
5307
5307
|
P as getSchemaByKeyRoute,
|
|
5308
5308
|
A as hasProperties,
|
|
5309
5309
|
I as indexRoute2keyRoute,
|
|
@@ -5313,7 +5313,7 @@ export {
|
|
|
5313
5313
|
Ir as isContainerSchema,
|
|
5314
5314
|
h as isDateStr,
|
|
5315
5315
|
b as isDateTimeStr,
|
|
5316
|
-
|
|
5316
|
+
kr as isEmptySchema,
|
|
5317
5317
|
C as isEqual,
|
|
5318
5318
|
D as isEqualByIdT,
|
|
5319
5319
|
_ as isFunction,
|
|
@@ -5336,7 +5336,7 @@ export {
|
|
|
5336
5336
|
x as objClone,
|
|
5337
5337
|
F as oldSchemaToNewSchema,
|
|
5338
5338
|
q as oldSchemaToNewSchemaV1,
|
|
5339
|
-
|
|
5339
|
+
Rr as registerExpectType,
|
|
5340
5340
|
en as schema2conditionValue,
|
|
5341
5341
|
$r as schema2json,
|
|
5342
5342
|
Xr as schemaMetaList,
|
package/dist/index.js
CHANGED
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
return d;
|
|
46
46
|
},
|
|
47
47
|
EventTypeDataList: function () {
|
|
48
|
-
return
|
|
48
|
+
return c;
|
|
49
49
|
},
|
|
50
50
|
KeyWordList: function () {
|
|
51
51
|
return ve;
|
|
52
52
|
},
|
|
53
53
|
TypeDataList: function () {
|
|
54
|
-
return
|
|
54
|
+
return s;
|
|
55
55
|
},
|
|
56
56
|
dataRoute2dataPath: function () {
|
|
57
57
|
return de;
|
|
58
58
|
},
|
|
59
59
|
dynamicDataAnalyzer: function () {
|
|
60
|
-
return
|
|
60
|
+
return ce;
|
|
61
61
|
},
|
|
62
62
|
evalExpression: function () {
|
|
63
63
|
return F;
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
return ue;
|
|
199
199
|
},
|
|
200
200
|
schemaMetaList: function () {
|
|
201
|
-
return
|
|
201
|
+
return se;
|
|
202
202
|
},
|
|
203
203
|
truncate: function () {
|
|
204
204
|
return k;
|
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
data: '{}',
|
|
315
315
|
localFilter: 'return data;',
|
|
316
316
|
},
|
|
317
|
-
|
|
317
|
+
s = {
|
|
318
318
|
jsonschema: {
|
|
319
319
|
type: 'object',
|
|
320
320
|
title: 'jsonSchemaObject',
|
|
@@ -1069,9 +1069,9 @@
|
|
|
1069
1069
|
type: 'select',
|
|
1070
1070
|
title: '数据源类型',
|
|
1071
1071
|
options: [
|
|
1072
|
-
{ label: 'channel', value:
|
|
1073
|
-
{ label: 'topic', value:
|
|
1074
|
-
{ label: 'block', value:
|
|
1072
|
+
{ label: 'channel', value: 13 },
|
|
1073
|
+
{ label: 'topic', value: 15 },
|
|
1074
|
+
{ label: 'block', value: 14 },
|
|
1075
1075
|
],
|
|
1076
1076
|
description: '',
|
|
1077
1077
|
onShow: 'type === "RuntimeDataSelfDefine"',
|
|
@@ -1562,7 +1562,7 @@
|
|
|
1562
1562
|
propertyOrder: ['type', 'value', 'range'],
|
|
1563
1563
|
},
|
|
1564
1564
|
},
|
|
1565
|
-
|
|
1565
|
+
c = {
|
|
1566
1566
|
on: {
|
|
1567
1567
|
type: 'event',
|
|
1568
1568
|
title: '事件',
|
|
@@ -1644,7 +1644,7 @@
|
|
|
1644
1644
|
}
|
|
1645
1645
|
function S(e) {
|
|
1646
1646
|
var t = !1;
|
|
1647
|
-
return
|
|
1647
|
+
return s.quantity.properties.quantity.enum.indexOf(e) >= 0 && (t = !0), t;
|
|
1648
1648
|
}
|
|
1649
1649
|
function x(e) {
|
|
1650
1650
|
return /^#[0-9a-f]{6}$/.test(e) || /^#[0-9a-f]{3}$/.test(e);
|
|
@@ -1823,12 +1823,12 @@
|
|
|
1823
1823
|
e.data && e.filter && 2 === r.length
|
|
1824
1824
|
? (t = C(e.data) || O(e.data) ? N(d.local) : N(d.remote))
|
|
1825
1825
|
: e.trigger && e.eventData && 2 === r.length
|
|
1826
|
-
? (t = N(
|
|
1826
|
+
? (t = N(c.emit))
|
|
1827
1827
|
: e.register && e.actionFunc && 2 === r.length
|
|
1828
|
-
? (t = N(
|
|
1828
|
+
? (t = N(c.on))
|
|
1829
1829
|
: e.quantity && S(e.quantity) && 2 === r.length
|
|
1830
|
-
? (t = N(
|
|
1831
|
-
: ((t = N(
|
|
1830
|
+
? (t = N(s.quantity))
|
|
1831
|
+
: ((t = N(s['empty-object'])),
|
|
1832
1832
|
Object.keys(e).map(function (r) {
|
|
1833
1833
|
var i = e[r];
|
|
1834
1834
|
t.properties[r] = B(i);
|
|
@@ -1841,14 +1841,14 @@
|
|
|
1841
1841
|
var t;
|
|
1842
1842
|
if (e && C(e))
|
|
1843
1843
|
if (j(e)) {
|
|
1844
|
-
(t = N(
|
|
1844
|
+
(t = N(s.select)).items.enum = e;
|
|
1845
1845
|
var r = t.items.enumextra.length,
|
|
1846
1846
|
i = e.length;
|
|
1847
1847
|
if (i > r)
|
|
1848
1848
|
for (var a = r, l = i; a < l; a++)
|
|
1849
1849
|
t.items.enumextra.push('选项' + e(a));
|
|
1850
1850
|
} else {
|
|
1851
|
-
t = N(
|
|
1851
|
+
t = N(s['empty-array']);
|
|
1852
1852
|
var n = B(e[0]);
|
|
1853
1853
|
t.items.properties = n.properties;
|
|
1854
1854
|
}
|
|
@@ -1856,18 +1856,18 @@
|
|
|
1856
1856
|
})(e)
|
|
1857
1857
|
: (function (e) {
|
|
1858
1858
|
var t = '';
|
|
1859
|
-
if (m(e)) t = N(
|
|
1860
|
-
else if (b(e)) t = N(
|
|
1861
|
-
else if (y(e)) t = N(
|
|
1862
|
-
else if (v(e)) t = N(
|
|
1863
|
-
else if (h(e)) t = N(
|
|
1864
|
-
else if (g(e)) t = N(
|
|
1865
|
-
else if (x(e)) t = N(
|
|
1859
|
+
if (m(e)) t = N(s.boolean);
|
|
1860
|
+
else if (b(e)) t = N(s.number);
|
|
1861
|
+
else if (y(e)) t = N(s.url);
|
|
1862
|
+
else if (v(e)) t = N(s.date);
|
|
1863
|
+
else if (h(e)) t = N(s['date-time']);
|
|
1864
|
+
else if (g(e)) t = N(s.time);
|
|
1865
|
+
else if (x(e)) t = N(s.color);
|
|
1866
1866
|
else
|
|
1867
1867
|
try {
|
|
1868
|
-
t = b(JSON.parse(e)) ? N(
|
|
1868
|
+
t = b(JSON.parse(e)) ? N(s.input) : N(s.json);
|
|
1869
1869
|
} catch (r) {
|
|
1870
|
-
t = e && e.length > 30 ? N(
|
|
1870
|
+
t = e && e.length > 30 ? N(s.textarea) : N(s.input);
|
|
1871
1871
|
}
|
|
1872
1872
|
return t;
|
|
1873
1873
|
})(e)),
|
|
@@ -1932,7 +1932,7 @@
|
|
|
1932
1932
|
'quantity' === t.type)
|
|
1933
1933
|
) {
|
|
1934
1934
|
var r = t.properties,
|
|
1935
|
-
i = N(
|
|
1935
|
+
i = N(s.quantity);
|
|
1936
1936
|
if (r.quantity && O(r.quantity) && r.quantity.default) {
|
|
1937
1937
|
var a = r.quantity.default;
|
|
1938
1938
|
i.properties.quantity.default = 'percent' === a ? '%' : a;
|
|
@@ -1956,13 +1956,13 @@
|
|
|
1956
1956
|
y = u.type && u.type.default;
|
|
1957
1957
|
if ('in' === y || 'on' === y) {
|
|
1958
1958
|
var f = (u.filter && u.filter.default) || '() => {}';
|
|
1959
|
-
(t = N(
|
|
1959
|
+
(t = N(c.on)),
|
|
1960
1960
|
u.actionFunc &&
|
|
1961
1961
|
O(u.actionFunc) &&
|
|
1962
1962
|
(t.properties.actionFunc.default = u.actionFunc.default || N(f));
|
|
1963
1963
|
} else {
|
|
1964
1964
|
var b = (u.filter && u.filter.default) || '{}';
|
|
1965
|
-
(t = N(
|
|
1965
|
+
(t = N(c.emit)),
|
|
1966
1966
|
u.eventData &&
|
|
1967
1967
|
O(u.eventData) &&
|
|
1968
1968
|
(t.properties.eventData.default = u.eventData.default || N(b));
|
|
@@ -2308,8 +2308,8 @@
|
|
|
2308
2308
|
? pe(e, t)
|
|
2309
2309
|
: ne(e, t);
|
|
2310
2310
|
}
|
|
2311
|
-
var
|
|
2312
|
-
function
|
|
2311
|
+
var se = s;
|
|
2312
|
+
function ce(e, t) {
|
|
2313
2313
|
var r = t || [];
|
|
2314
2314
|
if (e && '{}' !== JSON.stringify(e))
|
|
2315
2315
|
if (O(e))
|
|
@@ -2332,12 +2332,12 @@
|
|
|
2332
2332
|
r.push({ id: e.config.id, dataName: e.config.dataName, body: i });
|
|
2333
2333
|
} else
|
|
2334
2334
|
Object.keys(e).map(function (t) {
|
|
2335
|
-
|
|
2335
|
+
ce(e[t], r);
|
|
2336
2336
|
});
|
|
2337
2337
|
else
|
|
2338
2338
|
C(e) &&
|
|
2339
2339
|
e.map(function (e) {
|
|
2340
|
-
|
|
2340
|
+
ce(e, r);
|
|
2341
2341
|
});
|
|
2342
2342
|
return r;
|
|
2343
2343
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @wibetter/json-utils v5.
|
|
2
|
+
* @wibetter/json-utils v5.3.1
|
|
3
3
|
* author: wibetter
|
|
4
4
|
* build tool: AKFun
|
|
5
|
-
* build time:
|
|
5
|
+
* build time: Fri Apr 18 2025 10:37:42 GMT+0800 (中国标准时间)
|
|
6
6
|
* build tool info: https://github.com/wibetter/akfun
|
|
7
7
|
*/
|