@wavemaker/angular-codegen 11.15.5-rc.259 → 11.15.6-1.647697

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.
@@ -131194,11 +131194,22 @@ function requireConventions$1 () {
131194
131194
  XMLNS: 'http://www.w3.org/2000/xmlns/',
131195
131195
  });
131196
131196
 
131197
+ //[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
131198
+ //[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
131199
+ //[5] Name ::= NameStartChar (NameChar)*
131200
+ var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
131201
+ var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
131202
+ var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
131203
+ //var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
131204
+
131197
131205
  conventions$1.assign = assign;
131198
131206
  conventions$1.find = find;
131199
131207
  conventions$1.freeze = freeze;
131200
131208
  conventions$1.MIME_TYPE = MIME_TYPE;
131201
131209
  conventions$1.NAMESPACE = NAMESPACE;
131210
+ conventions$1.nameStartChar = nameStartChar;
131211
+ conventions$1.nameChar = nameChar;
131212
+ conventions$1.tagNamePattern = tagNamePattern;
131202
131213
  return conventions$1;
131203
131214
  }
131204
131215
 
@@ -131211,6 +131222,7 @@ function requireDom$1 () {
131211
131222
 
131212
131223
  var find = conventions.find;
131213
131224
  var NAMESPACE = conventions.NAMESPACE;
131225
+ var tagNamePattern = conventions.tagNamePattern;
131214
131226
 
131215
131227
  /**
131216
131228
  * A prerequisite for `[].filter`, to drop elements that are empty
@@ -132850,6 +132862,9 @@ function requireDom$1 () {
132850
132862
  * @returns {string}
132851
132863
  * @throws {DOMException}
132852
132864
  * With code `INVALID_STATE_ERR` when `requireWellFormed` is `true` and:
132865
+ * - an Element's qualified name (including any namespace prefix) is not a valid XML QName,
132866
+ * - an attribute's qualified name (including a synthesized `xmlns:` namespace declaration) is
132867
+ * not a valid XML QName,
132853
132868
  * - a CDATASection node's data contains `"]]>"`,
132854
132869
  * - a Comment node's data contains `"-->"` (bare `"--"` does not throw on this branch),
132855
132870
  * - a ProcessingInstruction's data contains `"?>"`,
@@ -132931,7 +132946,10 @@ function requireDom$1 () {
132931
132946
  * @see https://www.w3.org/TR/xml11/#AVNormalize
132932
132947
  * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
132933
132948
  */
132934
- function addSerializedAttribute(buf, qualifiedName, value) {
132949
+ function addSerializedAttribute(buf, qualifiedName, value, requireWellFormed) {
132950
+ if (requireWellFormed && !tagNamePattern.test(qualifiedName)) {
132951
+ throw new DOMException(INVALID_STATE_ERR, 'The attribute name "' + qualifiedName + '" is not a valid XML QName');
132952
+ }
132935
132953
  buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
132936
132954
  }
132937
132955
 
@@ -132997,6 +133015,9 @@ function requireDom$1 () {
132997
133015
  }
132998
133016
  }
132999
133017
 
133018
+ if (requireWellFormed && !tagNamePattern.test(prefixedNodeName)) {
133019
+ throw new DOMException(INVALID_STATE_ERR, 'The element name "' + prefixedNodeName + '" is not a valid XML QName');
133020
+ }
133000
133021
  buf.push('<', prefixedNodeName);
133001
133022
 
133002
133023
  // Build a fresh namespace snapshot for this element's children.
@@ -133016,7 +133037,7 @@ function requireDom$1 () {
133016
133037
  if (needNamespaceDefine(attr, html, childNs)) {
133017
133038
  var attrPrefix = attr.prefix || '';
133018
133039
  var uri = attr.namespaceURI;
133019
- addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri);
133040
+ addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri, requireWellFormed);
133020
133041
  childNs.push({ prefix: attrPrefix, namespace: uri });
133021
133042
  }
133022
133043
  // Apply nodeFilter and serialize the attribute.
@@ -133025,7 +133046,7 @@ function requireDom$1 () {
133025
133046
  if (typeof filteredAttr === 'string') {
133026
133047
  buf.push(filteredAttr);
133027
133048
  } else {
133028
- addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value);
133049
+ addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value, requireWellFormed);
133029
133050
  }
133030
133051
  }
133031
133052
  }
@@ -133034,7 +133055,7 @@ function requireDom$1 () {
133034
133055
  if (nodeName === prefixedNodeName && needNamespaceDefine(n, html, childNs)) {
133035
133056
  var nodePrefix = n.prefix || '';
133036
133057
  var uri = n.namespaceURI;
133037
- addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri);
133058
+ addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri, requireWellFormed);
133038
133059
  childNs.push({ prefix: nodePrefix, namespace: uri });
133039
133060
  }
133040
133061
 
@@ -133067,7 +133088,7 @@ function requireDom$1 () {
133067
133088
  return { ns: ns.slice(), isHTML: html, tag: null };
133068
133089
 
133069
133090
  case ATTRIBUTE_NODE:
133070
- addSerializedAttribute(buf, n.name, n.value);
133091
+ addSerializedAttribute(buf, n.name, n.value, requireWellFormed);
133071
133092
  return null;
133072
133093
 
133073
133094
  case TEXT_NODE:
@@ -135524,14 +135545,8 @@ function requireSax$1 () {
135524
135545
  if (hasRequiredSax$1) return sax$1;
135525
135546
  hasRequiredSax$1 = 1;
135526
135547
  var NAMESPACE = requireConventions$1().NAMESPACE;
135548
+ var tagNamePattern = requireConventions$1().tagNamePattern;
135527
135549
 
135528
- //[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
135529
- //[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
135530
- //[5] Name ::= NameStartChar (NameChar)*
135531
- var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
135532
- var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
135533
- var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
135534
- //var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
135535
135550
  //var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
135536
135551
 
135537
135552
  //S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
@@ -149568,10 +149583,14 @@ const triggerItemAction$1 = (scope, item) => {
149568
149583
  const getDatasourceFromExpr$1 = (expr, scope) => {
149569
149584
  const isBoundToVariable = startsWith$1(expr, 'Variables.');
149570
149585
  const isBoundToWidget = startsWith$1(expr, 'Widgets.');
149586
+ const isBoundToActivePageVar = startsWith$1(expr, 'App.activePage.Variables.');
149571
149587
  const parts = expr.split('.');
149572
149588
  if (isBoundToVariable) {
149573
149589
  return get$2(scope.viewParent.Variables, parts[1]);
149574
149590
  }
149591
+ if (isBoundToActivePageVar) {
149592
+ return get$2(scope.viewParent?.App?.activePage?.Variables, parts[3]);
149593
+ }
149575
149594
  if (isBoundToWidget) {
149576
149595
  const widgetScope = get$2(scope.viewParent.Widgets, parts[1]);
149577
149596
  const widgetDatasetBoundExpr = widgetScope.$attrs.get('datasetboundexpr');
@@ -188242,11 +188261,22 @@ function requireConventions () {
188242
188261
  XMLNS: 'http://www.w3.org/2000/xmlns/',
188243
188262
  });
188244
188263
 
188264
+ //[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
188265
+ //[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
188266
+ //[5] Name ::= NameStartChar (NameChar)*
188267
+ var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
188268
+ var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
188269
+ var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
188270
+ //var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
188271
+
188245
188272
  conventions.assign = assign;
188246
188273
  conventions.find = find;
188247
188274
  conventions.freeze = freeze;
188248
188275
  conventions.MIME_TYPE = MIME_TYPE;
188249
188276
  conventions.NAMESPACE = NAMESPACE;
188277
+ conventions.nameStartChar = nameStartChar;
188278
+ conventions.nameChar = nameChar;
188279
+ conventions.tagNamePattern = tagNamePattern;
188250
188280
  return conventions;
188251
188281
  }
188252
188282
 
@@ -188259,6 +188289,7 @@ function requireDom () {
188259
188289
 
188260
188290
  var find = conventions.find;
188261
188291
  var NAMESPACE = conventions.NAMESPACE;
188292
+ var tagNamePattern = conventions.tagNamePattern;
188262
188293
 
188263
188294
  /**
188264
188295
  * A prerequisite for `[].filter`, to drop elements that are empty
@@ -189898,6 +189929,9 @@ function requireDom () {
189898
189929
  * @returns {string}
189899
189930
  * @throws {DOMException}
189900
189931
  * With code `INVALID_STATE_ERR` when `requireWellFormed` is `true` and:
189932
+ * - an Element's qualified name (including any namespace prefix) is not a valid XML QName,
189933
+ * - an attribute's qualified name (including a synthesized `xmlns:` namespace declaration) is
189934
+ * not a valid XML QName,
189901
189935
  * - a CDATASection node's data contains `"]]>"`,
189902
189936
  * - a Comment node's data contains `"-->"` (bare `"--"` does not throw on this branch),
189903
189937
  * - a ProcessingInstruction's data contains `"?>"`,
@@ -189979,7 +190013,10 @@ function requireDom () {
189979
190013
  * @see https://www.w3.org/TR/xml11/#AVNormalize
189980
190014
  * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
189981
190015
  */
189982
- function addSerializedAttribute(buf, qualifiedName, value) {
190016
+ function addSerializedAttribute(buf, qualifiedName, value, requireWellFormed) {
190017
+ if (requireWellFormed && !tagNamePattern.test(qualifiedName)) {
190018
+ throw new DOMException(INVALID_STATE_ERR, 'The attribute name "' + qualifiedName + '" is not a valid XML QName');
190019
+ }
189983
190020
  buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
189984
190021
  }
189985
190022
 
@@ -190045,6 +190082,9 @@ function requireDom () {
190045
190082
  }
190046
190083
  }
190047
190084
 
190085
+ if (requireWellFormed && !tagNamePattern.test(prefixedNodeName)) {
190086
+ throw new DOMException(INVALID_STATE_ERR, 'The element name "' + prefixedNodeName + '" is not a valid XML QName');
190087
+ }
190048
190088
  buf.push('<', prefixedNodeName);
190049
190089
 
190050
190090
  // Build a fresh namespace snapshot for this element's children.
@@ -190064,7 +190104,7 @@ function requireDom () {
190064
190104
  if (needNamespaceDefine(attr, html, childNs)) {
190065
190105
  var attrPrefix = attr.prefix || '';
190066
190106
  var uri = attr.namespaceURI;
190067
- addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri);
190107
+ addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri, requireWellFormed);
190068
190108
  childNs.push({ prefix: attrPrefix, namespace: uri });
190069
190109
  }
190070
190110
  // Apply nodeFilter and serialize the attribute.
@@ -190073,7 +190113,7 @@ function requireDom () {
190073
190113
  if (typeof filteredAttr === 'string') {
190074
190114
  buf.push(filteredAttr);
190075
190115
  } else {
190076
- addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value);
190116
+ addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value, requireWellFormed);
190077
190117
  }
190078
190118
  }
190079
190119
  }
@@ -190082,7 +190122,7 @@ function requireDom () {
190082
190122
  if (nodeName === prefixedNodeName && needNamespaceDefine(n, html, childNs)) {
190083
190123
  var nodePrefix = n.prefix || '';
190084
190124
  var uri = n.namespaceURI;
190085
- addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri);
190125
+ addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri, requireWellFormed);
190086
190126
  childNs.push({ prefix: nodePrefix, namespace: uri });
190087
190127
  }
190088
190128
 
@@ -190115,7 +190155,7 @@ function requireDom () {
190115
190155
  return { ns: ns.slice(), isHTML: html, tag: null };
190116
190156
 
190117
190157
  case ATTRIBUTE_NODE:
190118
- addSerializedAttribute(buf, n.name, n.value);
190158
+ addSerializedAttribute(buf, n.name, n.value, requireWellFormed);
190119
190159
  return null;
190120
190160
 
190121
190161
  case TEXT_NODE:
@@ -192572,14 +192612,8 @@ function requireSax () {
192572
192612
  if (hasRequiredSax) return sax;
192573
192613
  hasRequiredSax = 1;
192574
192614
  var NAMESPACE = requireConventions().NAMESPACE;
192615
+ var tagNamePattern = requireConventions().tagNamePattern;
192575
192616
 
192576
- //[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
192577
- //[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
192578
- //[5] Name ::= NameStartChar (NameChar)*
192579
- var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
192580
- var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
192581
- var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
192582
- //var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
192583
192617
  //var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
192584
192618
 
192585
192619
  //S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
@@ -205551,10 +205585,14 @@ const triggerItemAction = (scope, item) => {
205551
205585
  const getDatasourceFromExpr = (expr, scope) => {
205552
205586
  const isBoundToVariable = startsWith(expr, 'Variables.');
205553
205587
  const isBoundToWidget = startsWith(expr, 'Widgets.');
205588
+ const isBoundToActivePageVar = startsWith(expr, 'App.activePage.Variables.');
205554
205589
  const parts = expr.split('.');
205555
205590
  if (isBoundToVariable) {
205556
205591
  return get(scope.viewParent.Variables, parts[1]);
205557
205592
  }
205593
+ if (isBoundToActivePageVar) {
205594
+ return get(scope.viewParent?.App?.activePage?.Variables, parts[3]);
205595
+ }
205558
205596
  if (isBoundToWidget) {
205559
205597
  const widgetScope = get(scope.viewParent.Widgets, parts[1]);
205560
205598
  const widgetDatasetBoundExpr = widgetScope.$attrs.get('datasetboundexpr');
@@ -35719,8 +35719,8 @@ const getDataSource = (dataSetExpr) => {
35719
35719
  if (parts[0] === 'Variables' || parts[0] === 'Widgets') {
35720
35720
  return `${parts[0]}.${parts[1]}`;
35721
35721
  }
35722
- if (parts[0] === 'App' && parts[1] === 'activePage' && parts[2]?.includes('Variables') && parts[3]) {
35723
- return `App.activePage.${parts[2]}.${parts[3]}`;
35722
+ if (parts[0] === 'App' && parts[1] === 'activePage' && parts[2] === 'Variables' && parts[3]) {
35723
+ return `App.activePage.Variables.${parts[3]}`;
35724
35724
  }
35725
35725
  };
35726
35726
  const widgetChildAttrs = (() => {
@@ -37722,11 +37722,22 @@ function requireConventions () {
37722
37722
  XMLNS: 'http://www.w3.org/2000/xmlns/',
37723
37723
  });
37724
37724
 
37725
+ //[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
37726
+ //[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
37727
+ //[5] Name ::= NameStartChar (NameChar)*
37728
+ var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
37729
+ var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
37730
+ var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
37731
+ //var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
37732
+
37725
37733
  conventions.assign = assign;
37726
37734
  conventions.find = find;
37727
37735
  conventions.freeze = freeze;
37728
37736
  conventions.MIME_TYPE = MIME_TYPE;
37729
37737
  conventions.NAMESPACE = NAMESPACE;
37738
+ conventions.nameStartChar = nameStartChar;
37739
+ conventions.nameChar = nameChar;
37740
+ conventions.tagNamePattern = tagNamePattern;
37730
37741
  return conventions;
37731
37742
  }
37732
37743
 
@@ -37739,6 +37750,7 @@ function requireDom () {
37739
37750
 
37740
37751
  var find = conventions.find;
37741
37752
  var NAMESPACE = conventions.NAMESPACE;
37753
+ var tagNamePattern = conventions.tagNamePattern;
37742
37754
 
37743
37755
  /**
37744
37756
  * A prerequisite for `[].filter`, to drop elements that are empty
@@ -39378,6 +39390,9 @@ function requireDom () {
39378
39390
  * @returns {string}
39379
39391
  * @throws {DOMException}
39380
39392
  * With code `INVALID_STATE_ERR` when `requireWellFormed` is `true` and:
39393
+ * - an Element's qualified name (including any namespace prefix) is not a valid XML QName,
39394
+ * - an attribute's qualified name (including a synthesized `xmlns:` namespace declaration) is
39395
+ * not a valid XML QName,
39381
39396
  * - a CDATASection node's data contains `"]]>"`,
39382
39397
  * - a Comment node's data contains `"-->"` (bare `"--"` does not throw on this branch),
39383
39398
  * - a ProcessingInstruction's data contains `"?>"`,
@@ -39459,7 +39474,10 @@ function requireDom () {
39459
39474
  * @see https://www.w3.org/TR/xml11/#AVNormalize
39460
39475
  * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
39461
39476
  */
39462
- function addSerializedAttribute(buf, qualifiedName, value) {
39477
+ function addSerializedAttribute(buf, qualifiedName, value, requireWellFormed) {
39478
+ if (requireWellFormed && !tagNamePattern.test(qualifiedName)) {
39479
+ throw new DOMException(INVALID_STATE_ERR, 'The attribute name "' + qualifiedName + '" is not a valid XML QName');
39480
+ }
39463
39481
  buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
39464
39482
  }
39465
39483
 
@@ -39525,6 +39543,9 @@ function requireDom () {
39525
39543
  }
39526
39544
  }
39527
39545
 
39546
+ if (requireWellFormed && !tagNamePattern.test(prefixedNodeName)) {
39547
+ throw new DOMException(INVALID_STATE_ERR, 'The element name "' + prefixedNodeName + '" is not a valid XML QName');
39548
+ }
39528
39549
  buf.push('<', prefixedNodeName);
39529
39550
 
39530
39551
  // Build a fresh namespace snapshot for this element's children.
@@ -39544,7 +39565,7 @@ function requireDom () {
39544
39565
  if (needNamespaceDefine(attr, html, childNs)) {
39545
39566
  var attrPrefix = attr.prefix || '';
39546
39567
  var uri = attr.namespaceURI;
39547
- addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri);
39568
+ addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri, requireWellFormed);
39548
39569
  childNs.push({ prefix: attrPrefix, namespace: uri });
39549
39570
  }
39550
39571
  // Apply nodeFilter and serialize the attribute.
@@ -39553,7 +39574,7 @@ function requireDom () {
39553
39574
  if (typeof filteredAttr === 'string') {
39554
39575
  buf.push(filteredAttr);
39555
39576
  } else {
39556
- addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value);
39577
+ addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value, requireWellFormed);
39557
39578
  }
39558
39579
  }
39559
39580
  }
@@ -39562,7 +39583,7 @@ function requireDom () {
39562
39583
  if (nodeName === prefixedNodeName && needNamespaceDefine(n, html, childNs)) {
39563
39584
  var nodePrefix = n.prefix || '';
39564
39585
  var uri = n.namespaceURI;
39565
- addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri);
39586
+ addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri, requireWellFormed);
39566
39587
  childNs.push({ prefix: nodePrefix, namespace: uri });
39567
39588
  }
39568
39589
 
@@ -39595,7 +39616,7 @@ function requireDom () {
39595
39616
  return { ns: ns.slice(), isHTML: html, tag: null };
39596
39617
 
39597
39618
  case ATTRIBUTE_NODE:
39598
- addSerializedAttribute(buf, n.name, n.value);
39619
+ addSerializedAttribute(buf, n.name, n.value, requireWellFormed);
39599
39620
  return null;
39600
39621
 
39601
39622
  case TEXT_NODE:
@@ -42052,14 +42073,8 @@ function requireSax () {
42052
42073
  if (hasRequiredSax) return sax;
42053
42074
  hasRequiredSax = 1;
42054
42075
  var NAMESPACE = requireConventions().NAMESPACE;
42076
+ var tagNamePattern = requireConventions().tagNamePattern;
42055
42077
 
42056
- //[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
42057
- //[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
42058
- //[5] Name ::= NameStartChar (NameChar)*
42059
- var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
42060
- var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
42061
- var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
42062
- //var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
42063
42078
  //var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
42064
42079
 
42065
42080
  //S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
@@ -101981,10 +101996,14 @@ const triggerItemAction = (scope, item) => {
101981
101996
  const getDatasourceFromExpr = (expr, scope) => {
101982
101997
  const isBoundToVariable = startsWith(expr, 'Variables.');
101983
101998
  const isBoundToWidget = startsWith(expr, 'Widgets.');
101999
+ const isBoundToActivePageVar = startsWith(expr, 'App.activePage.Variables.');
101984
102000
  const parts = expr.split('.');
101985
102001
  if (isBoundToVariable) {
101986
102002
  return get$1(scope.viewParent.Variables, parts[1]);
101987
102003
  }
102004
+ if (isBoundToActivePageVar) {
102005
+ return get$1(scope.viewParent?.App?.activePage?.Variables, parts[3]);
102006
+ }
101988
102007
  if (isBoundToWidget) {
101989
102008
  const widgetScope = get$1(scope.viewParent.Widgets, parts[1]);
101990
102009
  const widgetDatasetBoundExpr = widgetScope.$attrs.get('datasetboundexpr');
@@ -104535,7 +104554,7 @@ const registerFormField = (isFormField) => {
104535
104554
  else {
104536
104555
  setDefaultPlaceholder(attrs, widgetType, 2);
104537
104556
  }
104538
- return `<${tagName$Z} data-role="${dataRole}" [formGroup]="${pCounter}.ngform" wmFormField wmCaptionPosition #${counter}="wmFormField" widgettype="${widgetType}" [hidden]="!${counter}.show" ${getFormMarkupAttr(attrs)}>
104557
+ return `<${tagName$Z} data-role="${dataRole}" [formGroup]="${pCounter}.ngform" wmFormField wmCaptionPosition #${counter}="wmFormField" widgettype="${widgetType}" ${getFormMarkupAttr(attrs)}>
104539
104558
  <div class="live-field form-group app-composite-widget clearfix caption-{{${pCounter}.captionposition}}" widget="${widgetType}">
104540
104559
  <label [hidden]="!${counter}.displayname" class="app-label control-label formfield-label {{${pCounter}._captionClass}}"
104541
104560
  [ngStyle]="{width: ${pCounter}.captionsize}" [ngClass]="{'text-danger': ${counter}._control?.invalid && ${counter}._control?.touched && ${pCounter}.isUpdateMode,