sproutjs-core 2.0.0 → 2.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sproutjs-core",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "keywords": [],
5
5
  "author": "",
6
6
  "license": "ISC",
package/sprout-core.js CHANGED
@@ -1687,6 +1687,7 @@ var HTML_ELEMENTS_CLASSES_MAP = [{
1687
1687
  }( /*#__PURE__*/_wrapNativeSuper(HTMLElement)),
1688
1688
  element: "code"
1689
1689
  }
1690
+
1690
1691
  // { class: HTMLSlotElement, element: "slot" } Has a different extended class for conditional rendering
1691
1692
  ];
1692
1693
  // For development purposes only,
@@ -1792,9 +1793,10 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
1792
1793
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
1793
1794
  function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
1794
1795
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1795
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); 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) ? _arrayLikeToArray(r, a) : void 0; } }
1796
1796
  function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
1797
1797
  function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
1798
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
1799
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); 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) ? _arrayLikeToArray(r, a) : void 0; } }
1798
1800
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1799
1801
 
1800
1802
 
@@ -1933,6 +1935,7 @@ function resolveNodeActionsMapToDOMActions() {
1933
1935
  var batchActions = [];
1934
1936
  var nodeActionsMap = _consts_js__WEBPACK_IMPORTED_MODULE_0__.NODES_STATE.nodeActionsMap;
1935
1937
  nodeActionsMap.forEach(function (nodeActions, node) {
1938
+ console.log(nodeActions);
1936
1939
  // Attribute change
1937
1940
  if (nodeActions.hasOwnProperty("setAttribute")) {
1938
1941
  var value = nodeActions.setAttribute;
@@ -1984,22 +1987,64 @@ function resolveNodeActionsMapToDOMActions() {
1984
1987
  );
1985
1988
  });
1986
1989
  });
1987
- nodeActions.remove.values().forEach(function (removes) {
1988
- removes.forEach(function (nodeToRemove) {
1989
- if (nodeToRemove.parentNode && nodeToRemove.parentNode === node) {
1990
- batchActions.push(function () {
1991
- return node.removeChild(nodeToRemove);
1992
- });
1990
+ var _iterator = _createForOfIteratorHelper(nodeActions.remove.values()),
1991
+ _step;
1992
+ try {
1993
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
1994
+ var removes = _step.value;
1995
+ var _iterator3 = _createForOfIteratorHelper(removes),
1996
+ _step3;
1997
+ try {
1998
+ var _loop = function _loop() {
1999
+ var nodeToRemove = _step3.value;
2000
+ if (nodeToRemove.parentNode && nodeToRemove.parentNode === node) {
2001
+ batchActions.push(function () {
2002
+ return node.removeChild(nodeToRemove);
2003
+ });
2004
+ }
2005
+ };
2006
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
2007
+ _loop();
2008
+ }
2009
+ } catch (err) {
2010
+ _iterator3.e(err);
2011
+ } finally {
2012
+ _iterator3.f();
1993
2013
  }
1994
- });
1995
- });
1996
- nodeActions.append.values().forEach(function (appends) {
1997
- appends.forEach(function (newChildElement) {
1998
- batchActions.push(function () {
1999
- return node.appendChild(newChildElement);
2000
- });
2001
- });
2002
- });
2014
+ }
2015
+ } catch (err) {
2016
+ _iterator.e(err);
2017
+ } finally {
2018
+ _iterator.f();
2019
+ }
2020
+ var _iterator2 = _createForOfIteratorHelper(nodeActions.append.values()),
2021
+ _step2;
2022
+ try {
2023
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
2024
+ var appends = _step2.value;
2025
+ var _iterator4 = _createForOfIteratorHelper(appends),
2026
+ _step4;
2027
+ try {
2028
+ var _loop2 = function _loop2() {
2029
+ var newChildElement = _step4.value;
2030
+ batchActions.push(function () {
2031
+ return node.appendChild(newChildElement);
2032
+ });
2033
+ };
2034
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
2035
+ _loop2();
2036
+ }
2037
+ } catch (err) {
2038
+ _iterator4.e(err);
2039
+ } finally {
2040
+ _iterator4.f();
2041
+ }
2042
+ }
2043
+ } catch (err) {
2044
+ _iterator2.e(err);
2045
+ } finally {
2046
+ _iterator2.f();
2047
+ }
2003
2048
  }
2004
2049
  });
2005
2050
  return batchActions;