@schukai/monster 3.21.0 → 3.21.1

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": "@schukai/monster",
3
- "version": "3.21.0",
3
+ "version": "3.21.1",
4
4
  "description": "Monster is a simple library for creating fast, robust and lightweight websites.",
5
5
  "keywords": [
6
6
  "framework",
@@ -514,11 +514,19 @@ function insertElement(change) {
514
514
  }
515
515
  }
516
516
 
517
- function findTemplate(container, key, ref, path) {
518
-
517
+ /**
518
+ * @private
519
+ * @param container
520
+ * @param key
521
+ * @param ref
522
+ * @param path
523
+ * @returns {any}
524
+ */
525
+ function internalTemplateLookUp(container, key, ref, path) {
526
+
519
527
  let templateID = key;
520
528
  let template;
521
-
529
+
522
530
  if (container.hasAttribute(ATTRIBUTE_UPDATER_INSERT_TEMPLATE_ID)) {
523
531
  templateID = container.getAttribute(ATTRIBUTE_UPDATER_INSERT_TEMPLATE_ID);
524
532
  template = findDocumentTemplate(templateID, container);
@@ -526,7 +534,7 @@ function findTemplate(container, key, ref, path) {
526
534
  return template;
527
535
  }
528
536
  }
529
-
537
+
530
538
  if (container.closest(`[${ATTRIBUTE_UPDATER_INSERT_TEMPLATE_ID}]`)) {
531
539
  templateID = container.closest(`[${ATTRIBUTE_UPDATER_INSERT_TEMPLATE_ID}]`).getAttribute(ATTRIBUTE_UPDATER_INSERT_TEMPLATE_ID);
532
540
  template = findDocumentTemplate(templateID, container);
@@ -551,8 +559,8 @@ function findTemplate(container, key, ref, path) {
551
559
  */
552
560
  function appendNewDocumentFragment(container, key, ref, path) {
553
561
 
554
- let template = findTemplate(container, key, ref, path);
555
- console.log(template);
562
+ let template = internalTemplateLookUp(container, key, ref, path);
563
+
556
564
  let nodes = template.createDocumentFragment();
557
565
  for (const [, node] of Object.entries(nodes.childNodes)) {
558
566
  if (node instanceof HTMLElement) {
@@ -142,7 +142,7 @@ function getMonsterVersion() {
142
142
  }
143
143
 
144
144
  /** don't touch, replaced by make with package.json version */
145
- monsterVersion = new Version("3.21.0");
145
+ monsterVersion = new Version("3.21.1");
146
146
 
147
147
  return monsterVersion;
148
148
  }
@@ -7,7 +7,7 @@ describe('Monster', function () {
7
7
  let monsterVersion
8
8
 
9
9
  /** don´t touch, replaced by make with package.json version */
10
- monsterVersion = new Version("3.21.0")
10
+ monsterVersion = new Version("3.21.1")
11
11
 
12
12
  let m = getMonsterVersion();
13
13