@next-core/brick-kit 2.169.0 → 2.170.0

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
@@ -3377,6 +3377,30 @@ function _dev_only_updateStoryboardBySnippet(appId, newSnippet) {
3377
3377
  kernel._dev_only_updateStoryboardBySnippet(appId, newSnippet);
3378
3378
  }
3379
3379
 
3380
+ /* istanbul ignore next */
3381
+ function _dev_only_getContextValue(name, _ref) {
3382
+ var {
3383
+ tplContextId
3384
+ } = _ref;
3385
+ if (tplContextId) {
3386
+ var tplContext = getCustomTemplateContext(tplContextId);
3387
+ return tplContext.state.getValue(name);
3388
+ }
3389
+ return kernel.router.getStoryboardContextWrapper().getValue(name);
3390
+ }
3391
+
3392
+ /* istanbul ignore next */
3393
+ function _dev_only_getAllContextValues(_ref2) {
3394
+ var {
3395
+ tplContextId
3396
+ } = _ref2;
3397
+ if (tplContextId) {
3398
+ var tplContext = getCustomTemplateContext(tplContextId);
3399
+ return tplContext.state.get();
3400
+ }
3401
+ return kernel.router.getStoryboardContextWrapper().get();
3402
+ }
3403
+
3380
3404
  /* istanbul ignore next */
3381
3405
  function _dev_only_updateFormPreviewSettings(appId, formId, settings) {
3382
3406
  kernel._dev_only_updateFormPreviewSettings(appId, formId, settings);
@@ -6560,6 +6584,9 @@ class BrickNode {
6560
6584
  if (brick.iid) {
6561
6585
  node.dataset.iid = brick.iid;
6562
6586
  }
6587
+ if (brick.tplContextId) {
6588
+ node.dataset.tplContextId = brick.tplContextId;
6589
+ }
6563
6590
  setRealProperties(node, brick.properties);
6564
6591
  bindListeners(node, brick.events, brick.context);
6565
6592
  if (Array.isArray(brick.children)) {
@@ -13953,6 +13980,8 @@ var developHelper = {
13953
13980
  updateTemplatePreviewSettings: _dev_only_updateTemplatePreviewSettings,
13954
13981
  updateSnippetPreviewSettings: _dev_only_updateSnippetPreviewSettings,
13955
13982
  updateFormPreviewSettings: _dev_only_updateFormPreviewSettings,
13983
+ getContextValue: _dev_only_getContextValue,
13984
+ getAllContextValues: _dev_only_getAllContextValues,
13956
13985
  render: _dev_only_render
13957
13986
  };
13958
13987