@next-core/brick-kit 2.157.0 → 2.157.2
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 +112 -49
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +113 -50
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/Kernel.d.ts.map +1 -1
- package/dist/types/core/StoryboardContext.d.ts +2 -1
- package/dist/types/core/StoryboardContext.d.ts.map +1 -1
- package/dist/types/core/standaloneBootstrap.d.ts +2 -0
- package/dist/types/core/standaloneBootstrap.d.ts.map +1 -1
- package/dist/types/internal/bindListeners.d.ts.map +1 -1
- package/dist/types/internal/getStandaloneInstalledApps.d.ts +0 -1
- package/dist/types/internal/getStandaloneInstalledApps.d.ts.map +1 -1
- package/dist/types/internal/listenOnTrackingContext.d.ts +1 -0
- package/dist/types/internal/listenOnTrackingContext.d.ts.map +1 -1
- package/dist/types/internal/setProperties.d.ts.map +1 -1
- package/dist/types/transformProperties.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/index.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
4
4
|
import _asyncToGenerator$3 from '@babel/runtime/helpers/asyncToGenerator';
|
|
5
5
|
import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
|
|
6
6
|
import React, { useState, useEffect, useRef, useCallback, useMemo, forwardRef, useImperativeHandle, useContext, createContext, useReducer } from 'react';
|
|
7
|
-
import { JsonStorage, toPath, computeRealRoutePath, hasOwnProperty, isObject, isEvaluable, transformAndInject, transform, trackContext, trackState, scanPermissionActionsInStoryboard, precookFunction, cook, resolveContextConcurrently, syncResolveContextConcurrently, trackUsedState, trackUsedContext, shouldAllowRecursiveEvaluations, preevaluate, inject, matchPath, deepFreeze, createProviderClass, removeDeadConditionsInTpl, getTemplateDepsOfStoryboard, getDllAndDepsOfStoryboard, asyncProcessStoryboard, getDllAndDepsByResource, scanRouteAliasInStoryboard, prefetchScript, scanBricksInBrickConf, scanProcessorsInAny, loadScript, scanAppGetMenuInAny, asyncProcessBrick, scanInstalledAppsInStoryboard, removeDeadConditions, restoreDynamicTemplates, scanStoryboard, mapCustomApisToNameAndNamespace } from '@next-core/brick-utils';
|
|
7
|
+
import { JsonStorage, toPath, computeRealRoutePath, hasOwnProperty, isObject, isEvaluable, transformAndInject, transform, trackContext, trackState, trackFormState, scanPermissionActionsInStoryboard, precookFunction, cook, resolveContextConcurrently, syncResolveContextConcurrently, trackUsedState, trackUsedContext, shouldAllowRecursiveEvaluations, preevaluate, inject, matchPath, deepFreeze, createProviderClass, removeDeadConditionsInTpl, getTemplateDepsOfStoryboard, getDllAndDepsOfStoryboard, asyncProcessStoryboard, getDllAndDepsByResource, scanRouteAliasInStoryboard, prefetchScript, scanBricksInBrickConf, scanProcessorsInAny, loadScript, scanAppGetMenuInAny, asyncProcessBrick, scanInstalledAppsInStoryboard, removeDeadConditions, restoreDynamicTemplates, scanStoryboard, mapCustomApisToNameAndNamespace } from '@next-core/brick-utils';
|
|
8
8
|
import _, { set, get, difference, identity, uniqueId, cloneDeep, clamp, isNil, isEmpty, sortBy, orderBy, merge, isObject as isObject$1, uniq, pick, omit, findLastIndex, noop, isString as isString$1 } from 'lodash';
|
|
9
9
|
import { http, HttpResponseError, HttpAbortError, HttpFetchError } from '@next-core/brick-http';
|
|
10
10
|
import moment from 'moment';
|
|
@@ -870,10 +870,12 @@ function doTransform(data, to, options) {
|
|
|
870
870
|
}
|
|
871
871
|
var contextNames = trackContext(raw);
|
|
872
872
|
var stateNames = trackState(raw);
|
|
873
|
-
|
|
873
|
+
var formStateNames = trackFormState(raw);
|
|
874
|
+
if (contextNames || stateNames || formStateNames) {
|
|
874
875
|
options.trackingContextList.push({
|
|
875
876
|
contextNames,
|
|
876
877
|
stateNames,
|
|
878
|
+
formStateNames,
|
|
877
879
|
propName: k,
|
|
878
880
|
propValue: v
|
|
879
881
|
});
|
|
@@ -1718,10 +1720,12 @@ function _checkIf(rawIf, ctx, fn) {
|
|
|
1718
1720
|
}
|
|
1719
1721
|
|
|
1720
1722
|
class StoryboardContextWrapper {
|
|
1721
|
-
constructor(tplContextId) {
|
|
1723
|
+
constructor(tplContextId, formContextId) {
|
|
1722
1724
|
_defineProperty$1(this, "data", new Map());
|
|
1723
1725
|
_defineProperty$1(this, "tplContextId", void 0);
|
|
1726
|
+
_defineProperty$1(this, "formContextId", void 0);
|
|
1724
1727
|
this.tplContextId = tplContextId;
|
|
1728
|
+
this.formContextId = formContextId;
|
|
1725
1729
|
}
|
|
1726
1730
|
set(name, item) {
|
|
1727
1731
|
if (this.data.has(name)) {
|
|
@@ -1782,7 +1786,7 @@ class StoryboardContextWrapper {
|
|
|
1782
1786
|
var _item$eventTarget;
|
|
1783
1787
|
item.loaded = true;
|
|
1784
1788
|
item.value = val;
|
|
1785
|
-
(_item$eventTarget = item.eventTarget) === null || _item$eventTarget === void 0 ? void 0 : _item$eventTarget.dispatchEvent(new CustomEvent(this.tplContextId ? "state.change" : "context.change", {
|
|
1789
|
+
(_item$eventTarget = item.eventTarget) === null || _item$eventTarget === void 0 ? void 0 : _item$eventTarget.dispatchEvent(new CustomEvent(this.formContextId ? "formstate.change" : this.tplContextId ? "state.change" : "context.change", {
|
|
1786
1790
|
detail: item.value
|
|
1787
1791
|
}));
|
|
1788
1792
|
}, err => {
|
|
@@ -1817,7 +1821,7 @@ class StoryboardContextWrapper {
|
|
|
1817
1821
|
item.value = value;
|
|
1818
1822
|
}
|
|
1819
1823
|
}
|
|
1820
|
-
(_item$eventTarget2 = item.eventTarget) === null || _item$eventTarget2 === void 0 ? void 0 : _item$eventTarget2.dispatchEvent(new CustomEvent(this.tplContextId ? "state.change" : "context.change", {
|
|
1824
|
+
(_item$eventTarget2 = item.eventTarget) === null || _item$eventTarget2 === void 0 ? void 0 : _item$eventTarget2.dispatchEvent(new CustomEvent(this.formContextId ? "formstate.change" : this.tplContextId ? "state.change" : "context.change", {
|
|
1821
1825
|
detail: item.value
|
|
1822
1826
|
}));
|
|
1823
1827
|
}
|
|
@@ -1953,7 +1957,7 @@ function resolveFreeVariableValue(value, contextConf, mergedContext, storyboardC
|
|
|
1953
1957
|
};
|
|
1954
1958
|
if (contextConf.onChange) {
|
|
1955
1959
|
for (var handler of [].concat(contextConf.onChange)) {
|
|
1956
|
-
newContext.eventTarget.addEventListener(storyboardContextWrapper.tplContextId ? "state.change" : "context.change", listenerFactory(handler, mergedContext, brick));
|
|
1960
|
+
newContext.eventTarget.addEventListener(storyboardContextWrapper.formContextId ? "formstate.change" : storyboardContextWrapper.tplContextId ? "state.change" : "context.change", listenerFactory(handler, mergedContext, brick));
|
|
1957
1961
|
}
|
|
1958
1962
|
}
|
|
1959
1963
|
if (contextConf.track) {
|
|
@@ -1963,7 +1967,7 @@ function resolveFreeVariableValue(value, contextConf, mergedContext, storyboardC
|
|
|
1963
1967
|
for (var dep of deps) {
|
|
1964
1968
|
var _eventTarget;
|
|
1965
1969
|
var ctx = storyboardContextWrapper.get().get(dep);
|
|
1966
|
-
ctx === null || ctx === void 0 ? void 0 : (_eventTarget = ctx.eventTarget) === null || _eventTarget === void 0 ? void 0 : _eventTarget.addEventListener(isTemplateState ? "state.change" : "context.change", () => {
|
|
1970
|
+
ctx === null || ctx === void 0 ? void 0 : (_eventTarget = ctx.eventTarget) === null || _eventTarget === void 0 ? void 0 : _eventTarget.addEventListener(storyboardContextWrapper.formContextId ? "formstate.change" : isTemplateState ? "state.change" : "context.change", () => {
|
|
1967
1971
|
if (load) {
|
|
1968
1972
|
storyboardContextWrapper.updateValue(contextConf.name, {
|
|
1969
1973
|
cache: "default"
|
|
@@ -2058,7 +2062,7 @@ class CustomFormContext {
|
|
|
2058
2062
|
_defineProperty$1(this, "formState", void 0);
|
|
2059
2063
|
_defineProperty$1(this, "id", uniqueId("form-ctx-"));
|
|
2060
2064
|
FormContextMap.set(this.id, this);
|
|
2061
|
-
this.formState = new StoryboardContextWrapper();
|
|
2065
|
+
this.formState = new StoryboardContextWrapper("", this.id);
|
|
2062
2066
|
}
|
|
2063
2067
|
}
|
|
2064
2068
|
function getCustomFormContext(formContextId) {
|
|
@@ -2678,10 +2682,12 @@ function computeRealProperties(properties, context, injectDeep, trackingContextL
|
|
|
2678
2682
|
var raw = typeof propValue === "string" ? propValue : getPreEvaluatedRaw(propValue);
|
|
2679
2683
|
var contextNames = trackContext(raw);
|
|
2680
2684
|
var stateNames = trackState(raw);
|
|
2681
|
-
|
|
2685
|
+
var formStateNames = trackFormState(raw);
|
|
2686
|
+
if (contextNames || stateNames || formStateNames) {
|
|
2682
2687
|
trackingContextList.push({
|
|
2683
2688
|
contextNames,
|
|
2684
2689
|
stateNames,
|
|
2690
|
+
formStateNames,
|
|
2685
2691
|
propName,
|
|
2686
2692
|
propValue
|
|
2687
2693
|
});
|
|
@@ -5684,6 +5690,8 @@ function listenerFactory(handler, context, runtimeBrick) {
|
|
|
5684
5690
|
case "state.refresh":
|
|
5685
5691
|
case "state.load":
|
|
5686
5692
|
return builtinStateListenerFactory(method, handler.args, handler, handler.callback, context);
|
|
5693
|
+
case "formstate.update":
|
|
5694
|
+
return builtinFormStateListenerFactory(method, handler.args, handler, handler.callback, context);
|
|
5687
5695
|
case "tpl.dispatchEvent":
|
|
5688
5696
|
return builtinTplDispatchEventFactory(handler.args, handler, context);
|
|
5689
5697
|
case "message.subscribe":
|
|
@@ -5776,6 +5784,13 @@ function getTplContext(tplContextId) {
|
|
|
5776
5784
|
}
|
|
5777
5785
|
return getCustomTemplateContext(tplContextId);
|
|
5778
5786
|
}
|
|
5787
|
+
function getFormContext(formContextId) {
|
|
5788
|
+
// istanbul ignore if
|
|
5789
|
+
if (!formContextId) {
|
|
5790
|
+
throw new Error("Calling tpl but no formContextId was found in context!");
|
|
5791
|
+
}
|
|
5792
|
+
return getCustomFormContext(formContextId);
|
|
5793
|
+
}
|
|
5779
5794
|
function builtinTplDispatchEventFactory(args, ifContainer, context) {
|
|
5780
5795
|
return function (event) {
|
|
5781
5796
|
if (!looseCheckIf(ifContainer, _objectSpread(_objectSpread({}, context), {}, {
|
|
@@ -5812,6 +5827,18 @@ function builtinStateListenerFactory(method, args, ifContainer, callback, contex
|
|
|
5812
5827
|
tplContext.state.updateValue(name, value, method === "update" ? "replace" : method, callback);
|
|
5813
5828
|
};
|
|
5814
5829
|
}
|
|
5830
|
+
function builtinFormStateListenerFactory(method, args, ifContainer, callback, context) {
|
|
5831
|
+
return function (event) {
|
|
5832
|
+
if (!looseCheckIf(ifContainer, _objectSpread(_objectSpread({}, context), {}, {
|
|
5833
|
+
event
|
|
5834
|
+
}))) {
|
|
5835
|
+
return;
|
|
5836
|
+
}
|
|
5837
|
+
var formContext = getFormContext(context.formContextId);
|
|
5838
|
+
var [name, value] = argsFactory(args, context, event);
|
|
5839
|
+
formContext.formState.updateValue(name, value, method === "update" ? "replace" : method, callback);
|
|
5840
|
+
};
|
|
5841
|
+
}
|
|
5815
5842
|
function builtinLocationListenerFactory(method, args, ifContainer, context) {
|
|
5816
5843
|
return function (event) {
|
|
5817
5844
|
if (!looseCheckIf(ifContainer, _objectSpread(_objectSpread({}, context), {}, {
|
|
@@ -6348,36 +6375,6 @@ var UserAdminApi_searchAllUsersInfo = /*#__PURE__*/function () {
|
|
|
6348
6375
|
};
|
|
6349
6376
|
}();
|
|
6350
6377
|
|
|
6351
|
-
/**
|
|
6352
|
-
* @description 独立小产品Runtime接口
|
|
6353
|
-
* @endpoint GET /api/v1/micro_app_standalone/runtime/:appId
|
|
6354
|
-
*/
|
|
6355
|
-
var RuntimeApi_runtimeMicroAppStandalone = /*#__PURE__*/function () {
|
|
6356
|
-
var _ref = _asyncToGenerator$3(function* (appId, options) {
|
|
6357
|
-
return (/**! @contract easyops.api.micro_app_standalone.runtime.RuntimeMicroAppStandalone@1.0.1 */
|
|
6358
|
-
(yield http.get("api/gateway/micro_app_standalone.runtime.RuntimeMicroAppStandalone/api/v1/micro_app_standalone/runtime/".concat(appId), options)).data
|
|
6359
|
-
);
|
|
6360
|
-
});
|
|
6361
|
-
return function RuntimeApi_runtimeMicroAppStandalone(_x, _x2) {
|
|
6362
|
-
return _ref.apply(this, arguments);
|
|
6363
|
-
};
|
|
6364
|
-
}();
|
|
6365
|
-
|
|
6366
|
-
/**
|
|
6367
|
-
* @description 查询独立部署小产品
|
|
6368
|
-
* @endpoint POST /api/v1/micro_app_standalone/search
|
|
6369
|
-
*/
|
|
6370
|
-
var RuntimeApi_searchMicroAppStandalone = /*#__PURE__*/function () {
|
|
6371
|
-
var _ref = _asyncToGenerator$3(function* (data, options) {
|
|
6372
|
-
return (/**! @contract easyops.api.micro_app_standalone.runtime.SearchMicroAppStandalone@1.0.1 */
|
|
6373
|
-
(yield http.post("api/gateway/micro_app_standalone.runtime.SearchMicroAppStandalone/api/v1/micro_app_standalone/search", data, options)).data
|
|
6374
|
-
);
|
|
6375
|
-
});
|
|
6376
|
-
return function RuntimeApi_searchMicroAppStandalone(_x, _x2) {
|
|
6377
|
-
return _ref.apply(this, arguments);
|
|
6378
|
-
};
|
|
6379
|
-
}();
|
|
6380
|
-
|
|
6381
6378
|
/**
|
|
6382
6379
|
* Merge `app.defaultConfig` and `app.userConfig` to `app.config`.
|
|
6383
6380
|
*
|
|
@@ -6559,6 +6556,36 @@ function initAnalytics() {
|
|
|
6559
6556
|
}
|
|
6560
6557
|
}
|
|
6561
6558
|
|
|
6559
|
+
/**
|
|
6560
|
+
* @description 独立小产品Runtime接口
|
|
6561
|
+
* @endpoint GET /api/v1/micro_app_standalone/runtime/:appId
|
|
6562
|
+
*/
|
|
6563
|
+
var RuntimeApi_runtimeMicroAppStandalone = /*#__PURE__*/function () {
|
|
6564
|
+
var _ref = _asyncToGenerator$3(function* (appId, options) {
|
|
6565
|
+
return (/**! @contract easyops.api.micro_app_standalone.runtime.RuntimeMicroAppStandalone@1.0.1 */
|
|
6566
|
+
(yield http.get("api/gateway/micro_app_standalone.runtime.RuntimeMicroAppStandalone/api/v1/micro_app_standalone/runtime/".concat(appId), options)).data
|
|
6567
|
+
);
|
|
6568
|
+
});
|
|
6569
|
+
return function RuntimeApi_runtimeMicroAppStandalone(_x, _x2) {
|
|
6570
|
+
return _ref.apply(this, arguments);
|
|
6571
|
+
};
|
|
6572
|
+
}();
|
|
6573
|
+
|
|
6574
|
+
/**
|
|
6575
|
+
* @description 查询独立部署小产品
|
|
6576
|
+
* @endpoint POST /api/v1/micro_app_standalone/search
|
|
6577
|
+
*/
|
|
6578
|
+
var RuntimeApi_searchMicroAppStandalone = /*#__PURE__*/function () {
|
|
6579
|
+
var _ref = _asyncToGenerator$3(function* (data, options) {
|
|
6580
|
+
return (/**! @contract easyops.api.micro_app_standalone.runtime.SearchMicroAppStandalone@1.0.1 */
|
|
6581
|
+
(yield http.post("api/gateway/micro_app_standalone.runtime.SearchMicroAppStandalone/api/v1/micro_app_standalone/search", data, options)).data
|
|
6582
|
+
);
|
|
6583
|
+
});
|
|
6584
|
+
return function RuntimeApi_searchMicroAppStandalone(_x, _x2) {
|
|
6585
|
+
return _ref.apply(this, arguments);
|
|
6586
|
+
};
|
|
6587
|
+
}();
|
|
6588
|
+
|
|
6562
6589
|
var _excluded$4 = ["feature_flags"],
|
|
6563
6590
|
_excluded2$1 = ["featureFlags", "misc"];
|
|
6564
6591
|
function standaloneBootstrap() {
|
|
@@ -6566,14 +6593,23 @@ function standaloneBootstrap() {
|
|
|
6566
6593
|
}
|
|
6567
6594
|
function _standaloneBootstrap() {
|
|
6568
6595
|
_standaloneBootstrap = _asyncToGenerator$3(function* () {
|
|
6569
|
-
var
|
|
6596
|
+
var requests = [http.get(window.BOOTSTRAP_FILE), http.get("".concat(window.APP_ROOT, "conf.yaml"), {
|
|
6570
6597
|
responseType: "text"
|
|
6571
|
-
}),
|
|
6598
|
+
}), BootstrapStandaloneApi_runtimeStandalone().catch(function (error) {
|
|
6572
6599
|
// make it not crash when the backend service is not updated.
|
|
6573
6600
|
// eslint-disable-next-line no-console
|
|
6574
6601
|
console.warn("request runtime api from api-gateway failed: ", error, ", something might went wrong running standalone micro app");
|
|
6575
|
-
return
|
|
6576
|
-
})]
|
|
6602
|
+
return;
|
|
6603
|
+
})];
|
|
6604
|
+
if (!window.NO_AUTH_GUARD) {
|
|
6605
|
+
var matches;
|
|
6606
|
+
var appId = window.APP_ID || (window.APP_ROOT && (matches = window.APP_ROOT.match(/^(?:\/next)?\/sa-static\/([^/]+)\/versions\//)) ? matches[1] : null);
|
|
6607
|
+
if (appId) {
|
|
6608
|
+
// No need to wait.
|
|
6609
|
+
safeGetRuntimeMicroAppStandalone(appId);
|
|
6610
|
+
}
|
|
6611
|
+
}
|
|
6612
|
+
var [bootstrapResult, confString, runtimeData] = yield Promise.all(requests);
|
|
6577
6613
|
var conf;
|
|
6578
6614
|
try {
|
|
6579
6615
|
conf = confString ? yaml.safeLoad(confString, {
|
|
@@ -6614,16 +6650,16 @@ function _standaloneBootstrap() {
|
|
|
6614
6650
|
}
|
|
6615
6651
|
}
|
|
6616
6652
|
if (runtimeData) {
|
|
6617
|
-
var
|
|
6618
|
-
if (!isEmpty(
|
|
6653
|
+
var runtimeSettings = runtimeData.settings;
|
|
6654
|
+
if (!isEmpty(runtimeSettings)) {
|
|
6619
6655
|
// Merge Feature Flags
|
|
6620
6656
|
if (!settings) {
|
|
6621
|
-
settings =
|
|
6657
|
+
settings = runtimeSettings;
|
|
6622
6658
|
} else {
|
|
6623
6659
|
// Merge Feature Flags & Misc
|
|
6624
|
-
var rest = _objectWithoutProperties(
|
|
6625
|
-
settings.featureFlags = _objectSpread(_objectSpread({}, settings.featureFlags),
|
|
6626
|
-
settings.misc = _objectSpread(_objectSpread({}, settings.misc),
|
|
6660
|
+
var rest = _objectWithoutProperties(runtimeSettings, _excluded2$1);
|
|
6661
|
+
settings.featureFlags = _objectSpread(_objectSpread({}, settings.featureFlags), runtimeSettings.featureFlags);
|
|
6662
|
+
settings.misc = _objectSpread(_objectSpread({}, settings.misc), runtimeSettings.misc);
|
|
6627
6663
|
settings = Object.assign(settings, rest);
|
|
6628
6664
|
}
|
|
6629
6665
|
}
|
|
@@ -6634,6 +6670,24 @@ function _standaloneBootstrap() {
|
|
|
6634
6670
|
});
|
|
6635
6671
|
return _standaloneBootstrap.apply(this, arguments);
|
|
6636
6672
|
}
|
|
6673
|
+
var appRuntimeDataMap = new Map();
|
|
6674
|
+
function safeGetRuntimeMicroAppStandalone(_x) {
|
|
6675
|
+
return _safeGetRuntimeMicroAppStandalone.apply(this, arguments);
|
|
6676
|
+
}
|
|
6677
|
+
function _safeGetRuntimeMicroAppStandalone() {
|
|
6678
|
+
_safeGetRuntimeMicroAppStandalone = _asyncToGenerator$3(function* (appId) {
|
|
6679
|
+
if (appRuntimeDataMap.has(appId)) {
|
|
6680
|
+
return appRuntimeDataMap.get(appId);
|
|
6681
|
+
}
|
|
6682
|
+
var promise = RuntimeApi_runtimeMicroAppStandalone(appId).catch(function (error) {
|
|
6683
|
+
// make it not crash when the backend service is not updated.
|
|
6684
|
+
// eslint-disable-next-line no-console
|
|
6685
|
+
console.warn("request standalone runtime api from micro-app-standalone failed: ", error, ", something might went wrong running standalone micro app");
|
|
6686
|
+
});
|
|
6687
|
+
appRuntimeDataMap.set(appId, promise);
|
|
6688
|
+
});
|
|
6689
|
+
return _safeGetRuntimeMicroAppStandalone.apply(this, arguments);
|
|
6690
|
+
}
|
|
6637
6691
|
|
|
6638
6692
|
/**
|
|
6639
6693
|
* Take input from [0, n] and return it as [0, 1]
|
|
@@ -8235,7 +8289,8 @@ class Kernel {
|
|
|
8235
8289
|
if (!window.NO_AUTH_GUARD) {
|
|
8236
8290
|
var appRuntimeData;
|
|
8237
8291
|
try {
|
|
8238
|
-
|
|
8292
|
+
// Note: the request maybe have fired already during bootstrap.
|
|
8293
|
+
appRuntimeData = yield safeGetRuntimeMicroAppStandalone(storyboard.app.id);
|
|
8239
8294
|
} catch (error) {
|
|
8240
8295
|
// make it not crash when the backend service is not updated.
|
|
8241
8296
|
// eslint-disable-next-line no-console
|
|
@@ -8982,6 +9037,14 @@ function listenOnTrackingContext(brick, trackingContextList, context) {
|
|
|
8982
9037
|
_ctx === null || _ctx === void 0 ? void 0 : (_eventTarget2 = _ctx.eventTarget) === null || _eventTarget2 === void 0 ? void 0 : _eventTarget2.addEventListener("state.change", listener);
|
|
8983
9038
|
}
|
|
8984
9039
|
}
|
|
9040
|
+
if (track.formStateNames) {
|
|
9041
|
+
var formContext = getCustomFormContext(context.formContextId);
|
|
9042
|
+
for (var _stateName of track.formStateNames) {
|
|
9043
|
+
var _eventTarget3;
|
|
9044
|
+
var _ctx2 = formContext.formState.get().get(_stateName);
|
|
9045
|
+
_ctx2 === null || _ctx2 === void 0 ? void 0 : (_eventTarget3 = _ctx2.eventTarget) === null || _eventTarget3 === void 0 ? void 0 : _eventTarget3.addEventListener("formstate.change", listener);
|
|
9046
|
+
}
|
|
9047
|
+
}
|
|
8985
9048
|
};
|
|
8986
9049
|
for (var track of trackingContextList) {
|
|
8987
9050
|
_loop(track);
|