@next-core/brick-kit 2.202.0 → 2.203.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.bundle.js +54 -32
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +54 -32
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/CustomForms/registerFormRenderer.d.ts.map +1 -1
- package/dist/types/core/StoryboardFunctionRegistryFactory.d.ts +3 -2
- package/dist/types/core/StoryboardFunctionRegistryFactory.d.ts.map +1 -1
- package/dist/types/internal/getGeneralGlobals.d.ts +1 -1
- package/dist/types/internal/getGeneralGlobals.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/index.esm.js
CHANGED
|
@@ -1448,11 +1448,22 @@ function StoryboardFunctionRegistryFactory() {
|
|
|
1448
1448
|
for (var fn of functions) {
|
|
1449
1449
|
registeredFunctions.set(fn.name, {
|
|
1450
1450
|
source: fn.source,
|
|
1451
|
-
typescript: fn.typescript
|
|
1451
|
+
typescript: fn.typescript,
|
|
1452
|
+
transformed: fn.transformed
|
|
1452
1453
|
});
|
|
1453
1454
|
}
|
|
1454
1455
|
}
|
|
1455
1456
|
}
|
|
1457
|
+
function getGlobalVariables(globals) {
|
|
1458
|
+
return supply(globals, getGeneralGlobals(globals, {
|
|
1459
|
+
collectCoverage,
|
|
1460
|
+
widgetId,
|
|
1461
|
+
widgetVersion,
|
|
1462
|
+
app: currentApp,
|
|
1463
|
+
storyboardFunctions,
|
|
1464
|
+
isStoryboardFunction: true
|
|
1465
|
+
}), !!collectCoverage);
|
|
1466
|
+
}
|
|
1456
1467
|
function getStoryboardFunction(name) {
|
|
1457
1468
|
var fn = registeredFunctions.get(name);
|
|
1458
1469
|
if (!fn) {
|
|
@@ -1465,35 +1476,39 @@ function StoryboardFunctionRegistryFactory() {
|
|
|
1465
1476
|
if (collectCoverage) {
|
|
1466
1477
|
collector = collectCoverage.createCollector(name);
|
|
1467
1478
|
}
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1479
|
+
|
|
1480
|
+
// Do not use transformed functions when collecting coverage.
|
|
1481
|
+
var transformed = !collector && fn.transformed;
|
|
1482
|
+
if (transformed) {
|
|
1483
|
+
var globalVariables = getGlobalVariables(transformed.globals);
|
|
1484
|
+
// Spread globals as params to prevent accessing forbidden globals.
|
|
1485
|
+
// NOTE: in native mode, forbidden globals are declared as `undefined`,
|
|
1486
|
+
// thus accessing them will not throw a ReferenceError.
|
|
1487
|
+
fn.cooked = new Function(...transformed.globals, "\"use strict\";return (".concat(transformed.source, ")"))(...transformed.globals.map(key => hasOwnProperty(globalVariables, key) ? globalVariables[key] : undefined));
|
|
1488
|
+
} else {
|
|
1489
|
+
var precooked = precookFunction(fn.source, {
|
|
1490
|
+
cacheKey: fn,
|
|
1491
|
+
typescript: fn.typescript,
|
|
1492
|
+
hooks: collector && {
|
|
1493
|
+
beforeVisit: collector.beforeVisit
|
|
1494
|
+
}
|
|
1495
|
+
});
|
|
1496
|
+
fn.cooked = cook(precooked.function, fn.source, {
|
|
1497
|
+
rules: {
|
|
1498
|
+
noVar: true
|
|
1499
|
+
},
|
|
1500
|
+
globalVariables: getGlobalVariables(precooked.attemptToVisitGlobals),
|
|
1501
|
+
hooks: _objectSpread({
|
|
1502
|
+
perfCall: needPerf ? duration => {
|
|
1503
|
+
perf(name, fn.source, duration);
|
|
1504
|
+
} : undefined
|
|
1505
|
+
}, collector ? {
|
|
1506
|
+
beforeEvaluate: collector.beforeEvaluate,
|
|
1507
|
+
beforeCall: collector.beforeCall,
|
|
1508
|
+
beforeBranch: collector.beforeBranch
|
|
1509
|
+
} : null)
|
|
1510
|
+
});
|
|
1511
|
+
}
|
|
1497
1512
|
fn.processed = true;
|
|
1498
1513
|
return fn.cooked;
|
|
1499
1514
|
}
|
|
@@ -1503,7 +1518,8 @@ function StoryboardFunctionRegistryFactory() {
|
|
|
1503
1518
|
updateStoryboardFunction(name, data) {
|
|
1504
1519
|
registeredFunctions.set(name, {
|
|
1505
1520
|
source: data.source,
|
|
1506
|
-
typescript: data.typescript
|
|
1521
|
+
typescript: data.typescript,
|
|
1522
|
+
transformed: data.transformed
|
|
1507
1523
|
});
|
|
1508
1524
|
}
|
|
1509
1525
|
};
|
|
@@ -11795,6 +11811,12 @@ class FormElement extends HTMLElement {
|
|
|
11795
11811
|
}
|
|
11796
11812
|
_classPrivateMethodGet(this, _proxyFormMethod, _proxyFormMethod2).call(this, "resetFields", args);
|
|
11797
11813
|
}
|
|
11814
|
+
getFieldsValue() {
|
|
11815
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
11816
|
+
args[_key3] = arguments[_key3];
|
|
11817
|
+
}
|
|
11818
|
+
return _classPrivateMethodGet(this, _proxyFormMethod, _proxyFormMethod2).call(this, "getFieldsValue", args);
|
|
11819
|
+
}
|
|
11798
11820
|
}
|
|
11799
11821
|
function _proxyFormMethod2(method) {
|
|
11800
11822
|
var _this$firstElementChi, _containerElement$tag;
|
|
@@ -11802,7 +11824,7 @@ function _proxyFormMethod2(method) {
|
|
|
11802
11824
|
var containerElement = this.renderRoot !== false ? (_this$firstElementChi = this.firstElementChild) === null || _this$firstElementChi === void 0 ? void 0 : _this$firstElementChi.firstElementChild : this.firstElementChild;
|
|
11803
11825
|
var tagName = containerElement === null || containerElement === void 0 ? void 0 : (_containerElement$tag = containerElement.tagName) === null || _containerElement$tag === void 0 ? void 0 : _containerElement$tag.toLowerCase();
|
|
11804
11826
|
if (formContainers.includes(tagName)) {
|
|
11805
|
-
containerElement[method](...args);
|
|
11827
|
+
return containerElement[method](...args);
|
|
11806
11828
|
} else {
|
|
11807
11829
|
// eslint-disable-next-line no-console
|
|
11808
11830
|
console.error("no ".concat(method, " method in the container element"), {
|