sproutjs-core 2.8.0 → 2.9.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.
@@ -128,7 +128,7 @@
128
128
  throw Error("Can't use ".concat(methodName, " in ReadonlySet"));
129
129
  }
130
130
  } ]);
131
- }(_wrapNativeSuper(Set)), OBSERVED_ATTRIBUTES = [ "ref", "hidden" ], BOOLEAN_ATTRIBUTES = new ReadonlySet([ "hidden", "checked", "disabled", "required", "selected" ]), AUTO_ATTRIBUTES_TO_PROPS = new ReadonlySet([ "checked", "disabled", "selected", "src" ]), SUPPORTED_ATTRIBUTES_FOR_BINDING = new ReadonlySet([ "value", "checked" ]), BUILT_IN_STATE_PROPS = new ReadonlySet([ "_global", "_gettingDependenciesFor", "_localStateManager", "_stateManager", "_binding", "_populate", "_isActive", "_isStateManager", "_isStatefulArray", "hasOwnProperty" ]), GLOBAL_STATE_NOT_SET_YET = "Global State Not Set Yet", HTML_ELEMENT_CLASSES_MAP = (Object.freeze({
131
+ }(_wrapNativeSuper(Set)), OBSERVED_ATTRIBUTES = [ "ref", "hidden" ], BOOLEAN_ATTRIBUTES = new ReadonlySet([ "hidden", "checked", "disabled", "required", "selected" ]), AUTO_ATTRIBUTES_TO_PROPS = new ReadonlySet([ "checked", "disabled", "selected", "src" ]), SUPPORTED_ATTRIBUTES_FOR_BINDING = new ReadonlySet([ "value", "checked" ]), BUILT_IN_STATE_PROPS = new ReadonlySet([ "$host", "_global", "_stateManager", "_isActive", "_isStateManager", "populate", "hasOwnProperty" ]), GLOBAL_STATE_NOT_SET_YET = "Global State Not Set Yet", HTML_ELEMENT_CLASSES_MAP = (Object.freeze({
132
132
  NO_DEPENDENCIES_ARRAY_IN_SET_HOOK: function NO_DEPENDENCIES_ARRAY_IN_SET_HOOK(stateProp) {
133
133
  return "State set hook, must include a dependencies array! None was found for ".concat(stateProp);
134
134
  }
@@ -327,6 +327,7 @@
327
327
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
328
328
  return n;
329
329
  }
330
+ new CustomElementRegistry;
330
331
  var pendingPaintNodeManagers = NODES_STATE.pendingPaintNodeManagers, rafIds = new Map;
331
332
  function queueAnimationFrame(functionsToRun, type, afterRunFn) {
332
333
  var rafId;
@@ -715,21 +716,42 @@
715
716
  host.propAttributes.has(propName) || host.propAttributes.set(propName, new Set),
716
717
  host.propAttributes.get(propName).add(attrNode);
717
718
  }
719
+ function parse_utils_arrayLikeToArray(r, a) {
720
+ (null == a || a > r.length) && (a = r.length);
721
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
722
+ return n;
723
+ }
718
724
  function parseStateExpression(expression) {
719
725
  if (0 === expression.indexOf("@")) return [ "property", [ expression.substring(1) ] ];
720
726
  if (0 === expression.indexOf("!")) return [ "negation", [ expression.substring(1) ] ];
721
727
  for (var _char, charIndex = 0, parsed = expression[charIndex]; charIndex++ < expression.length; ) {
722
728
  if (_char = expression[charIndex], 3 == charIndex && "is_" == parsed) return [ "equality", expression.substring(3).split(":") ];
723
- if ("?" === _char) return [ "ternary", parsed, expression.substring(charIndex + 1).split(":") ];
729
+ if ("?" === _char) return [ "ternary", [ parsed ].concat((r = expression.substring(charIndex + 1).split(":"),
730
+ function parse_utils_arrayWithoutHoles(r) {
731
+ if (Array.isArray(r)) return parse_utils_arrayLikeToArray(r);
732
+ }(r) || function parse_utils_iterableToArray(r) {
733
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
734
+ }(r) || function parse_utils_unsupportedIterableToArray(r, a) {
735
+ if (r) {
736
+ if ("string" == typeof r) return parse_utils_arrayLikeToArray(r, a);
737
+ var t = {}.toString.call(r).slice(8, -1);
738
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? parse_utils_arrayLikeToArray(r, a) : void 0;
739
+ }
740
+ }(r) || function parse_utils_nonIterableSpread() {
741
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
742
+ }())) ];
724
743
  parsed += _char;
725
744
  }
745
+ var r;
726
746
  return [ "literal", [ expression ] ];
727
747
  }
728
748
  function fromAttributeValue(value) {
729
749
  return "" === value || null !== value && value;
730
750
  }
731
751
  function state_utils_slicedToArray(r, e) {
732
- return state_utils_arrayWithHoles(r) || function state_utils_iterableToArrayLimit(r, l) {
752
+ return function state_utils_arrayWithHoles(r) {
753
+ if (Array.isArray(r)) return r;
754
+ }(r) || function state_utils_iterableToArrayLimit(r, l) {
733
755
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
734
756
  if (null != t) {
735
757
  var e, n, i, u, a = [], f = !0, o = !1;
@@ -749,31 +771,21 @@
749
771
  }
750
772
  return a;
751
773
  }
752
- }(r, e) || state_utils_unsupportedIterableToArray(r, e) || state_utils_nonIterableRest();
753
- }
754
- function _toArray(r) {
755
- return state_utils_arrayWithHoles(r) || function state_utils_iterableToArray(r) {
756
- if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
757
- }(r) || state_utils_unsupportedIterableToArray(r) || state_utils_nonIterableRest();
758
- }
759
- function state_utils_nonIterableRest() {
760
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
761
- }
762
- function state_utils_unsupportedIterableToArray(r, a) {
763
- if (r) {
764
- if ("string" == typeof r) return state_utils_arrayLikeToArray(r, a);
765
- var t = {}.toString.call(r).slice(8, -1);
766
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? state_utils_arrayLikeToArray(r, a) : void 0;
767
- }
774
+ }(r, e) || function state_utils_unsupportedIterableToArray(r, a) {
775
+ if (r) {
776
+ if ("string" == typeof r) return state_utils_arrayLikeToArray(r, a);
777
+ var t = {}.toString.call(r).slice(8, -1);
778
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? state_utils_arrayLikeToArray(r, a) : void 0;
779
+ }
780
+ }(r, e) || function state_utils_nonIterableRest() {
781
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
782
+ }();
768
783
  }
769
784
  function state_utils_arrayLikeToArray(r, a) {
770
785
  (null == a || a > r.length) && (a = r.length);
771
786
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
772
787
  return n;
773
788
  }
774
- function state_utils_arrayWithHoles(r) {
775
- if (Array.isArray(r)) return r;
776
- }
777
789
  "undefined" != typeof window && (window.SproutWaitIdle = function waitForIdle() {
778
790
  return new Promise((function(resolve) {
779
791
  requestAnimationFrame((function check() {
@@ -791,7 +803,7 @@
791
803
  return BOOLEAN_ATTRIBUTES.has(attributeName);
792
804
  }(attrName) ? elementSetAttribute.call(this, attrName, attrValue) : "false" === attrValue ? this.removeAttribute(attrName) : elementSetAttribute.call(this, attrName, "");
793
805
  }, setStateAttribute = function setStateAttribute(attrName, statePropExpression) {
794
- var _parseStateExpression2 = _toArray(parseStateExpression(statePropExpression)), type = _parseStateExpression2[0], args = _parseStateExpression2.slice(1), stateProp = args[0], _this$getState2 = state_utils_slicedToArray(this.getState(stateProp, !0), 2), stateVal = _this$getState2[0], theState = _this$getState2[1], stateManager = theState._stateManager, valueToSet = "literal" === type ? stateVal : stateManager.bindStatePropExpression(statePropExpression, type, args);
806
+ var _parseStateExpression2 = state_utils_slicedToArray(parseStateExpression(statePropExpression), 2), type = _parseStateExpression2[0], args = _parseStateExpression2[1], stateProp = args[0], _this$getState2 = state_utils_slicedToArray(this.getState(stateProp, !0), 2), stateVal = _this$getState2[0], theState = _this$getState2[1], stateManager = theState._stateManager, valueToSet = "literal" === type ? stateVal : stateManager.bindStatePropExpression(statePropExpression, type, args);
795
807
  this.removeAttribute(attrName);
796
808
  var stateAttrNode = document.createAttribute(attrName);
797
809
  stateAttrNode.nodeValue = valueToSet, setHiddenProperty(stateAttrNode, "isStateAttribute", !0),
@@ -803,7 +815,7 @@
803
815
  once: !0
804
816
  });
805
817
  }, setStateText = function setStateText(statePropExpression) {
806
- var _parseStateExpression4 = _toArray(parseStateExpression(statePropExpression)), type = _parseStateExpression4[0], args = _parseStateExpression4.slice(1), stateProp = args[0], _this$getState4 = state_utils_slicedToArray(this.getState(stateProp, !0), 2), stateVal = _this$getState4[0], theState = _this$getState4[1], stateManager = theState._stateManager, valueToSet = "literal" === type ? stateVal : stateManager.bindStatePropExpression(statePropExpression, type, args), textNode = document.createTextNode(valueToSet);
818
+ var _parseStateExpression4 = state_utils_slicedToArray(parseStateExpression(statePropExpression), 2), type = _parseStateExpression4[0], args = _parseStateExpression4[1], stateProp = args[0], _this$getState4 = state_utils_slicedToArray(this.getState(stateProp, !0), 2), stateVal = _this$getState4[0], theState = _this$getState4[1], stateManager = theState._stateManager, valueToSet = "literal" === type ? stateVal : stateManager.bindStatePropExpression(statePropExpression, type, args), textNode = document.createTextNode(valueToSet);
807
819
  setHiddenProperty(textNode, "isStateAttribute", !0), theState._stateManager.addStateNode(statePropExpression, textNode),
808
820
  this.appendChild(textNode), this.addEventListener("disconnected", (function() {
809
821
  theState._stateManager.removeStateNode(statePropExpression, textNode);
@@ -826,7 +838,7 @@
826
838
  }));
827
839
  }
828
840
  function handleStateChange(stateManager, stateProp, changedValue) {
829
- var _descrp$get;
841
+ var _descrp$get, _stateManager$stateHo, _stateManager$stateHo2;
830
842
  if (!isBuiltInStateProp(stateProp)) {
831
843
  var newValue = null != changedValue ? changedValue : stateManager.state[stateProp], descrp = Object.getOwnPropertyDescriptor(stateManager.state, stateProp);
832
844
  null == descrp || null === (_descrp$get = descrp.get) || void 0 === _descrp$get || _descrp$get.isStateGetter,
@@ -841,11 +853,16 @@
841
853
  });
842
854
  state.dispatchEvent(stateChangeEvent);
843
855
  }(stateManager.state, stateProp, newValue), generateStateNodeActions(stateManager, stateProp, newValue),
844
- stateProp.startsWith("!") || generateStateNodeActions(stateManager, "!".concat(stateProp), !newValue);
856
+ stateProp.startsWith("!") || generateStateNodeActions(stateManager, "!".concat(stateProp), !newValue),
857
+ null === (_stateManager$stateHo = stateManager.stateHooks.get(stateProp)) || void 0 === _stateManager$stateHo || _stateManager$stateHo.forEach((function(hookFn) {
858
+ hookFn(stateProp, newValue);
859
+ })), null === (_stateManager$stateHo2 = stateManager.stateHooks.get("$$ALL")) || void 0 === _stateManager$stateHo2 || _stateManager$stateHo2.forEach((function(hookFn) {
860
+ hookFn(stateProp, newValue);
861
+ }));
845
862
  }
846
863
  }
847
864
  function isBuiltInStateProp(stateProp) {
848
- return BUILT_IN_STATE_PROPS.has(stateProp);
865
+ return "string" == typeof stateProp && (0 === stateProp.indexOf("$$") || BUILT_IN_STATE_PROPS.has(stateProp));
849
866
  }
850
867
  function isSetterHook(stateProp) {
851
868
  return 0 === stateProp.indexOf("set_");
@@ -1741,11 +1758,10 @@
1741
1758
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
1742
1759
  }, StateManager_typeof(o);
1743
1760
  }
1744
- function StateManager_iterableToArray(r) {
1745
- if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
1746
- }
1747
1761
  function StateManager_slicedToArray(r, e) {
1748
- return StateManager_arrayWithHoles(r) || function StateManager_iterableToArrayLimit(r, l) {
1762
+ return function StateManager_arrayWithHoles(r) {
1763
+ if (Array.isArray(r)) return r;
1764
+ }(r) || function StateManager_iterableToArrayLimit(r, l) {
1749
1765
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
1750
1766
  if (null != t) {
1751
1767
  var e, n, i, u, a = [], f = !0, o = !1;
@@ -1765,10 +1781,9 @@
1765
1781
  }
1766
1782
  return a;
1767
1783
  }
1768
- }(r, e) || StateManager_unsupportedIterableToArray(r, e) || StateManager_nonIterableRest();
1769
- }
1770
- function StateManager_nonIterableRest() {
1771
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1784
+ }(r, e) || StateManager_unsupportedIterableToArray(r, e) || function StateManager_nonIterableRest() {
1785
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1786
+ }();
1772
1787
  }
1773
1788
  function StateManager_unsupportedIterableToArray(r, a) {
1774
1789
  if (r) {
@@ -1782,9 +1797,6 @@
1782
1797
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
1783
1798
  return n;
1784
1799
  }
1785
- function StateManager_arrayWithHoles(r) {
1786
- if (Array.isArray(r)) return r;
1787
- }
1788
1800
  function StateManager_defineProperties(e, r) {
1789
1801
  for (var t = 0; t < r.length; t++) {
1790
1802
  var o = r[t];
@@ -1833,7 +1845,8 @@
1833
1845
  StateManager_defineProperty(this, "privateState", {}), StateManager_defineProperty(this, "state", new EventTarget),
1834
1846
  StateManager_defineProperty(this, "stateDependencies", new Map), StateManager_defineProperty(this, "parentStateProp", void 0),
1835
1847
  StateManager_defineProperty(this, "parentStateManager", void 0), StateManager_defineProperty(this, "dirtyProps", new Set),
1836
- StateManager_defineProperty(this, "nodeManager", new NodeManager), function StateManager_classPrivateFieldInitSpec(e, t, a) {
1848
+ StateManager_defineProperty(this, "nodeManager", new NodeManager), StateManager_defineProperty(this, "stateHooks", new Map),
1849
+ function StateManager_classPrivateFieldInitSpec(e, t, a) {
1837
1850
  (function StateManager_checkPrivateRedeclaration(e, t) {
1838
1851
  if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
1839
1852
  })(e, t), t.set(e, a);
@@ -1841,7 +1854,10 @@
1841
1854
  this.parentStateManager = parentStateManager, this.handleStateChange = handleStateFunction,
1842
1855
  this.appScope = appScope, setHiddenProperty(this.state, "_stateManager", this, !0),
1843
1856
  this.state.$$isInitializing = !0, this.state.populate = function(populateObject) {
1844
- for (var property in populateObject) this.hasOwnProperty(property) && (this[property] = populateObject[property]);
1857
+ for (var property in populateObject) if (this.hasOwnProperty(property)) {
1858
+ if (isBuiltInStateProp(property)) continue;
1859
+ this[property] = populateObject[property];
1860
+ }
1845
1861
  }, parentStateProp && parentStateManager && (this.state = function makeReactive(stateObject) {
1846
1862
  var appScope = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : window;
1847
1863
  return new Proxy(stateObject, function StateObjectValueHandler(rootStateObj, objPropertyName) {
@@ -1926,7 +1942,7 @@
1926
1942
  set: function set(value) {
1927
1943
  value !== stateManager.privateState[stateProp] && (value = statifyValue(value, stateProp, stateManager, appScope),
1928
1944
  stateManager.privateState[stateProp] = value, stateManager.setDirtyProp(stateProp),
1929
- stateManager.setDirtyProp("".concat(stateProp, ".length")));
1945
+ Array.isArray(value) && stateManager.setDirtyProp("".concat(stateProp, ".length")));
1930
1946
  },
1931
1947
  get: function get() {
1932
1948
  return stateManager.privateState[stateProp];
@@ -1991,7 +2007,9 @@
1991
2007
  return function StateManager_toConsumableArray(r) {
1992
2008
  return function StateManager_arrayWithoutHoles(r) {
1993
2009
  if (Array.isArray(r)) return StateManager_arrayLikeToArray(r);
1994
- }(r) || StateManager_iterableToArray(r) || StateManager_unsupportedIterableToArray(r) || function StateManager_nonIterableSpread() {
2010
+ }(r) || function StateManager_iterableToArray(r) {
2011
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
2012
+ }(r) || StateManager_unsupportedIterableToArray(r) || function StateManager_nonIterableSpread() {
1995
2013
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1996
2014
  }();
1997
2015
  }(stateProps).toSorted((function(a, b) {
@@ -2054,13 +2072,11 @@
2054
2072
  }, {
2055
2073
  key: "bindStatePropExpression",
2056
2074
  value: function bindStatePropExpression(statePropExpression, type, args) {
2075
+ var contextStateProp = args[0];
2057
2076
  if (!type || !args) {
2058
- var _parseStateExpression2 = function StateManager_toArray(r) {
2059
- return StateManager_arrayWithHoles(r) || StateManager_iterableToArray(r) || StateManager_unsupportedIterableToArray(r) || StateManager_nonIterableRest();
2060
- }(parseStateExpression(statePropExpression));
2061
- type = _parseStateExpression2[0], args = _parseStateExpression2.slice(1);
2077
+ var _parseStateExpression2 = StateManager_slicedToArray(parseStateExpression(statePropExpression), 2);
2078
+ type = _parseStateExpression2[0], args = _parseStateExpression2[1], contextStateProp = args[0];
2062
2079
  }
2063
- var contextStateProp = args[0];
2064
2080
  if (!contextStateProp) throw Error("Must specify state property name for State expression: ".concat(statePropExpression));
2065
2081
  var stateObj = this.state, descriptor = Object.getOwnPropertyDescriptor(stateObj, contextStateProp);
2066
2082
  if (descriptor || (stateObj = stateObj._global, descriptor = Object.getOwnPropertyDescriptor(stateObj, contextStateProp)),
@@ -2111,6 +2127,17 @@
2111
2127
  value: function isUsing(pluginName) {
2112
2128
  return StateManager_classPrivateFieldGet(_plugins, this).has(pluginName);
2113
2129
  }
2130
+ }, {
2131
+ key: "addStateHook",
2132
+ value: function addStateHook(hookFunction) {
2133
+ var _this$stateHooks$get, _this5 = this, stateProps = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [];
2134
+ stateProps.length ? stateProps.forEach((function(stateProp) {
2135
+ var _this5$stateHooks$get;
2136
+ (null !== (_this5$stateHooks$get = _this5.stateHooks.get(stateProp)) && void 0 !== _this5$stateHooks$get ? _this5$stateHooks$get : (_this5.stateHooks.set(stateProp, new Set),
2137
+ _this5.stateHooks.get(stateProp))).add(hookFunction);
2138
+ })) : (null !== (_this$stateHooks$get = this.stateHooks.get("$$ALL")) && void 0 !== _this$stateHooks$get ? _this$stateHooks$get : (this.stateHooks.set("$$ALL", new Set),
2139
+ this.stateHooks.get("$$ALL"))).add(hookFunction);
2140
+ }
2114
2141
  } ]);
2115
2142
  }();
2116
2143
  const Cougar_StateManager = StateManager;
@@ -2263,9 +2290,10 @@
2263
2290
  this.bindAttributeToState(attributeName, statePropName);
2264
2291
  },
2265
2292
  bindprop: function bindprop(commandValue) {
2266
- var _commandValue$split6 = commands_slicedToArray(commandValue.split(":"), 2), statePropName = _commandValue$split6[0], elementPropName = _commandValue$split6[1], _this$getState2 = commands_slicedToArray(this.getState(statePropName, !0), 2), stateObject = (_this$getState2[0],
2267
- _this$getState2[1]);
2268
- this[elementPropName] = stateObject[statePropName];
2293
+ var _this = this, _commandValue$split6 = commands_slicedToArray(commandValue.split(":"), 2), statePropName = _commandValue$split6[0], elementPropName = _commandValue$split6[1], _this$getState2 = commands_slicedToArray(this.getState(statePropName, !0), 2), stateValue = _this$getState2[0], stateObject = _this$getState2[1];
2294
+ this[elementPropName] = stateValue, stateObject._stateManager.addStateHook((function(_, newValue) {
2295
+ _this[elementPropName] = newValue;
2296
+ }), [ statePropName ]);
2269
2297
  }
2270
2298
  };
2271
2299
  function ReactiveElement_typeof(o) {
@@ -2400,10 +2428,16 @@
2400
2428
  ReactiveElement_checkPrivateRedeclaration(e, a), a.add(e);
2401
2429
  }(_this = ReactiveElement_callSuper(this, ReactiveElement), _ReactiveElement_brand),
2402
2430
  ReactiveElement_defineProperty(_this, "host", null), ReactiveElement_classPrivateFieldInitSpec(_this, _wasMounted, !1),
2403
- ReactiveElement_defineProperty(_this, "refName", void 0), ReactiveElement_classPrivateFieldInitSpec(_this, _pendingAttributeChanges, []),
2431
+ ReactiveElement_defineProperty(_this, "refName", void 0), ReactiveElement_defineProperty(_this, "boundStateToProperties", new Map),
2432
+ ReactiveElement_classPrivateFieldInitSpec(_this, _pendingAttributeChanges, []),
2404
2433
  _this.isReactiveElement = !0, _this.isNativeElement = !0, _this;
2405
2434
  }
2406
2435
  return ReactiveElement_inherits(ReactiveElement, _elementClass), ReactiveElement_createClass(ReactiveElement, [ {
2436
+ key: "bindStateToProperty",
2437
+ value: function bindStateToProperty(statePropName, elementProprtyName) {
2438
+ this.boundStateToProperties.set(statePropName, elementProprtyName);
2439
+ }
2440
+ }, {
2407
2441
  key: "activate",
2408
2442
  value: function activate() {
2409
2443
  var _step, _this2 = this, commands = [], _iterator = function ReactiveElement_createForOfIteratorHelper(r, e) {
@@ -2505,6 +2539,9 @@
2505
2539
  var _this$host, host = null !== (_this$host = this.host) && void 0 !== _this$host ? _this$host : this;
2506
2540
  host.ref && delete host.ref[this.refName];
2507
2541
  }
2542
+ }, {
2543
+ key: "connectedMoveCallback",
2544
+ value: function connectedMoveCallback() {}
2508
2545
  }, {
2509
2546
  key: "attributeChangedCallback",
2510
2547
  value: function attributeChangedCallback(attributeName, oldValue, newValue) {
@@ -2547,13 +2584,13 @@
2547
2584
  }(attributeName), valueToSet = attributeValue;
2548
2585
  if (isStateAttr) {
2549
2586
  var stateProp = attributeValue, attrName = attributeName.substring(1);
2550
- "textContent" === attrName ? this.initialSetText(stateProp) : setStateAttribute.call(this, attrName, stateProp);
2587
+ "textcontent" === attrName ? this.initialSetText(stateProp) : setStateAttribute.call(this, attrName, stateProp);
2551
2588
  } else {
2552
2589
  if (isPropAttr) {
2553
2590
  var host = this.getHost(), propName = attributeValue.substring(1);
2554
2591
  valueToSet = host.getAttribute(propName);
2555
2592
  }
2556
- "textContent" === attributeName ? this.initialSetText(valueToSet) : setAttribute.call(this, attributeName, valueToSet);
2593
+ "textcontent" === attributeName ? this.textContent = valueToSet : setAttribute.call(this, attributeName, valueToSet);
2557
2594
  }
2558
2595
  }
2559
2596
  }, {
@@ -3638,11 +3675,8 @@
3638
3675
  }
3639
3676
  return ReactiveCustomElement;
3640
3677
  }(appScope), function build(appScope, appName) {
3641
- function defineCustomElementFromTemplate(_x3, _x4, _x5) {
3642
- return _defineCustomElementFromTemplate.apply(this, arguments);
3643
- }
3644
3678
  function _defineCustomElementFromTemplate() {
3645
- return (_defineCustomElementFromTemplate = function _asyncToGenerator(n) {
3679
+ return _defineCustomElementFromTemplate = function _asyncToGenerator(n) {
3646
3680
  return function() {
3647
3681
  var t = this, e = arguments;
3648
3682
  return new Promise((function(r, o) {
@@ -3656,49 +3690,45 @@
3656
3690
  _next(void 0);
3657
3691
  }));
3658
3692
  };
3659
- }(_regeneratorRuntime().mark((function _callee2(template, elemName, globalStylesheet) {
3693
+ }(_regeneratorRuntime().mark((function _callee(template, elemName, globalStylesheet) {
3660
3694
  var templateContent, style, runtime, runtimeScript, runtimeCode;
3661
- return _regeneratorRuntime().wrap((function _callee2$(_context2) {
3662
- for (;;) switch (_context2.prev = _context2.next) {
3695
+ return _regeneratorRuntime().wrap((function _callee$(_context) {
3696
+ for (;;) switch (_context.prev = _context.next) {
3663
3697
  case 0:
3664
3698
  if (templateContent = template.content, (style = templateContent.querySelector("style")) && templateContent.removeChild(style),
3665
3699
  (runtimeScript = templateContent.querySelector("script")) && (runtimeCode = runtimeScript.textContent,
3666
3700
  templateContent.removeChild(runtimeScript), runtimeCode && 0 !== runtimeCode.trim().length)) try {
3667
3701
  runtime = Function(runtimeCode)();
3668
3702
  } catch (e) {}
3669
- customElements.define(elemName, function(_appScope$ReactiveCus3) {
3670
- function _class3() {
3703
+ customElements.define(elemName, function(_appScope$ReactiveCus) {
3704
+ function _class() {
3671
3705
  var _style;
3672
- return build_classCallCheck(this, _class3), build_callSuper(this, _class3, [ templateContent, runtime, null === (_style = style) || void 0 === _style ? void 0 : _style.textContent, globalStylesheet ]);
3706
+ return build_classCallCheck(this, _class), build_callSuper(this, _class, [ templateContent, runtime, null === (_style = style) || void 0 === _style ? void 0 : _style.textContent, globalStylesheet ]);
3673
3707
  }
3674
- return build_inherits(_class3, _appScope$ReactiveCus3), build_createClass(_class3);
3675
- }(appScope.ReactiveCustomElement)), customElements.define("".concat(elemName, "-dsd"), function(_appScope$ReactiveCus4) {
3676
- function _class4() {
3677
- return build_classCallCheck(this, _class4), build_callSuper(this, _class4, [ templateContent, runtime, null, globalStylesheet, !0 ]);
3708
+ return build_inherits(_class, _appScope$ReactiveCus), build_createClass(_class);
3709
+ }(appScope.ReactiveCustomElement)), customElements.define("".concat(elemName, "-dsd"), function(_appScope$ReactiveCus2) {
3710
+ function _class2() {
3711
+ return build_classCallCheck(this, _class2), build_callSuper(this, _class2, [ templateContent, runtime, null, globalStylesheet, !0 ]);
3678
3712
  }
3679
- return build_inherits(_class4, _appScope$ReactiveCus4), build_createClass(_class4);
3713
+ return build_inherits(_class2, _appScope$ReactiveCus2), build_createClass(_class2);
3680
3714
  }(appScope.ReactiveCustomElement));
3681
3715
 
3682
3716
  case 7:
3683
3717
  case "end":
3684
- return _context2.stop();
3718
+ return _context.stop();
3685
3719
  }
3686
- }), _callee2);
3687
- })))).apply(this, arguments);
3720
+ }), _callee);
3721
+ }))), _defineCustomElementFromTemplate.apply(this, arguments);
3688
3722
  }
3689
- !function build() {
3690
- var _globalThis$SPROUT_CO2, globalStylesheet = new CSSStyleSheet, globalStyle = document.querySelector('head > style[app="'.concat(appName, '"]'));
3691
- if (globalStyle) globalStylesheet.replaceSync(globalStyle.textContent); else {
3692
- var _globalThis$SPROUT_CO, compiledStyle = null === (_globalThis$SPROUT_CO = globalThis.SPROUT_COMPILED_STYLES) || void 0 === _globalThis$SPROUT_CO ? void 0 : _globalThis$SPROUT_CO[appName];
3693
- globalStylesheet.replaceSync(compiledStyle || "");
3694
- }
3695
- globalStylesheet.insertRule(SPROUT_FROZEN_CLASS_CSS), "function" == typeof globalThis["".concat(appName, "_runtime")] && globalThis["".concat(appName, "_runtime")].call(appScope);
3696
- var compiledTemplates = null === (_globalThis$SPROUT_CO2 = globalThis.SPROUT_COMPILED_TEMPLATES) || void 0 === _globalThis$SPROUT_CO2 ? void 0 : _globalThis$SPROUT_CO2[appName];
3697
- compiledTemplates && "function" == typeof compiledTemplates.forEach ? compiledTemplates.forEach((function(templateEl, componentName) {
3698
- componentName && templateEl && defineCustomElementFromTemplate(templateEl, componentName, globalStylesheet);
3699
- })) : Array.prototype.forEach.call(document.querySelectorAll('template[app="'.concat(appName, '"]')), (function(template) {
3723
+ appScope.scopedCustomElementRegistry, function build() {
3724
+ var globalStylesheet = new CSSStyleSheet, globalStyle = document.querySelector('head > style[app="'.concat(appName, '"]'));
3725
+ globalStyle ? globalStylesheet.replaceSync(globalStyle.textContent) : globalStylesheet.replaceSync(""),
3726
+ globalStylesheet.insertRule(SPROUT_FROZEN_CLASS_CSS), "function" == typeof globalThis["".concat(appName, "_runtime")] && globalThis["".concat(appName, "_runtime")].call(appScope),
3727
+ Array.prototype.forEach.call(document.querySelectorAll('template[app="'.concat(appName, '"]')), (function(template) {
3700
3728
  var componentName = template.getAttribute("for");
3701
- componentName && defineCustomElementFromTemplate(template, componentName, globalStylesheet);
3729
+ componentName && function defineCustomElementFromTemplate(_x, _x2, _x3) {
3730
+ _defineCustomElementFromTemplate.apply(this, arguments);
3731
+ }(template, componentName, globalStylesheet);
3702
3732
  }));
3703
3733
  }();
3704
3734
  }(appScope, config.appName), HTML_ELEMENT_CLASSES_MAP.forEach((function(itemDefinition) {