@next-core/brick-kit 2.164.3 → 2.164.4
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
CHANGED
|
@@ -4,7 +4,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
4
4
|
import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
|
|
5
5
|
import _asyncToGenerator$3 from '@babel/runtime/helpers/asyncToGenerator';
|
|
6
6
|
import _, { set, get, difference, identity, uniqueId, cloneDeep, clamp, isNil, isEmpty, merge, sortBy, orderBy, isObject as isObject$1, uniq, pick, omit, findLastIndex, noop, isString as isString$1 } from 'lodash';
|
|
7
|
-
import { JsonStorage, toPath, computeRealRoutePath, hasOwnProperty, isObject, isEvaluable, transformAndInject, transform, trackContext, trackState, trackFormState, scanPermissionActionsInStoryboard, precookFunction, cook, collectContextUsage, deferResolveContextConcurrently, resolveContextConcurrently, syncResolveContextConcurrently, trackUsedState, trackUsedContext, shouldAllowRecursiveEvaluations, preevaluate, inject, scanPermissionActionsInAny, deepFreeze, matchPath, asyncProcessBrick, createProviderClass, removeDeadConditionsInTpl, getTemplateDepsOfStoryboard, getDllAndDepsOfStoryboard, asyncProcessStoryboard, getDllAndDepsByResource, scanRouteAliasInStoryboard, prefetchScript, scanBricksInBrickConf, scanProcessorsInAny, loadScript, scanAppGetMenuInAny, 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, collectContextUsage, deferResolveContextConcurrently, resolveContextConcurrently, syncResolveContextConcurrently, trackUsedFormState, trackUsedState, trackUsedContext, shouldAllowRecursiveEvaluations, preevaluate, inject, scanPermissionActionsInAny, deepFreeze, matchPath, asyncProcessBrick, createProviderClass, removeDeadConditionsInTpl, getTemplateDepsOfStoryboard, getDllAndDepsOfStoryboard, asyncProcessStoryboard, getDllAndDepsByResource, scanRouteAliasInStoryboard, prefetchScript, scanBricksInBrickConf, scanProcessorsInAny, loadScript, scanAppGetMenuInAny, scanInstalledAppsInStoryboard, removeDeadConditions, restoreDynamicTemplates, scanStoryboard, mapCustomApisToNameAndNamespace } from '@next-core/brick-utils';
|
|
8
8
|
import React, { useState, useEffect, useRef, useMemo, useCallback, forwardRef, useImperativeHandle, useContext, createContext, useReducer } from 'react';
|
|
9
9
|
import { http, HttpResponseError, HttpAbortError, HttpFetchError } from '@next-core/brick-http';
|
|
10
10
|
import { Modal, message, Empty, ConfigProvider } from 'antd';
|
|
@@ -1900,7 +1900,12 @@ class StoryboardContextWrapper {
|
|
|
1900
1900
|
}
|
|
1901
1901
|
}
|
|
1902
1902
|
getResolveOptions(coreContext) {
|
|
1903
|
-
return this.
|
|
1903
|
+
return this.formContextId ? {
|
|
1904
|
+
mergedContext: _objectSpread(_objectSpread({}, coreContext), {}, {
|
|
1905
|
+
formContextId: this.formContextId
|
|
1906
|
+
}),
|
|
1907
|
+
keyword: "FORM_STATE"
|
|
1908
|
+
} : this.tplContextId ? {
|
|
1904
1909
|
mergedContext: _objectSpread(_objectSpread({}, coreContext), {}, {
|
|
1905
1910
|
tplContextId: this.tplContextId
|
|
1906
1911
|
}),
|
|
@@ -2018,8 +2023,9 @@ function resolveFreeVariableValue(value, contextConf, mergedContext, storyboardC
|
|
|
2018
2023
|
}
|
|
2019
2024
|
if (contextConf.track) {
|
|
2020
2025
|
var isTemplateState = !!storyboardContextWrapper.tplContextId;
|
|
2026
|
+
var isFormState = !!storyboardContextWrapper.formContextId;
|
|
2021
2027
|
// Track its dependencies and auto update when each of them changed.
|
|
2022
|
-
var deps = (isTemplateState ? trackUsedState : trackUsedContext)(load ? contextConf.resolve : contextConf.value);
|
|
2028
|
+
var deps = (isFormState ? trackUsedFormState : isTemplateState ? trackUsedState : trackUsedContext)(load ? contextConf.resolve : contextConf.value);
|
|
2023
2029
|
for (var dep of deps) {
|
|
2024
2030
|
var _eventTarget;
|
|
2025
2031
|
var ctx = storyboardContextWrapper.get().get(dep);
|