@next-core/brick-utils 2.50.1 → 2.50.3

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
@@ -17501,7 +17501,7 @@ function shouldAllowRecursiveEvaluations(raw) {
17501
17501
  return /^\s*<%~\s/.test(raw);
17502
17502
  }
17503
17503
  function isSnippetEvaluation(raw) {
17504
- return /^\s*<%[!@]\s/.test(raw) && /\s%>\s*$/.test(raw);
17504
+ return /^\s*<%[!@]=?\s/.test(raw) && /\s%>\s*$/.test(raw);
17505
17505
  }
17506
17506
  function isTrackAll(raw) {
17507
17507
  return /^\s*<%=\s/.test(raw) && /\s%>\s*$/.test(raw);
@@ -20557,7 +20557,8 @@ function computeRealSnippetConf(value, context) {
20557
20557
  try {
20558
20558
  var raw = value;
20559
20559
  var ctxOrState = context.rootType === "template" ? "STATE" : "CTX";
20560
- if (/^\s*<%@\s/.test(value)) {
20560
+ var ctxOrStateUpdate = context.rootType === "template" ? "state.update" : "context.replace";
20561
+ if (/^\s*<%@=?\s*/.test(value)) {
20561
20562
  var replacements = [{
20562
20563
  search: "<%@",
20563
20564
  replace: "<%"
@@ -20581,6 +20582,14 @@ function computeRealSnippetConf(value, context) {
20581
20582
  if (attemptVisitSnippetParams) {
20582
20583
  globalVariables.SNIPPET_PARAMS = context.inputParams;
20583
20584
  }
20585
+ var attemptVisitSnippetRootType = attemptToVisitGlobals.has("SNIPPET_ROOT_TYPE");
20586
+ if (attemptVisitSnippetRootType) {
20587
+ globalVariables.SNIPPET_ROOT_TYPE = context.rootType;
20588
+ }
20589
+ var attemptVisitSnippetDataUpdateMethod = attemptToVisitGlobals.has("DATA_UPDATE_METHOD");
20590
+ if (attemptVisitSnippetDataUpdateMethod) {
20591
+ globalVariables.DATA_UPDATE_METHOD = ctxOrStateUpdate;
20592
+ }
20584
20593
  var result = cook(expression, source, {
20585
20594
  globalVariables: supply(attemptToVisitGlobals, globalVariables)
20586
20595
  });
@@ -20588,7 +20597,7 @@ function computeRealSnippetConf(value, context) {
20588
20597
  } catch (error) {
20589
20598
  /* istanbul ignore next */
20590
20599
  // eslint-disable-next-line no-console
20591
- console.error("Parse storyboard expression failed:", error);
20600
+ throw new Error("Parse storyboard expression failed: ".concat(error));
20592
20601
  }
20593
20602
  }
20594
20603
  if (!isObject$1(value)) {