@schukai/monster 3.47.0 → 3.48.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": "@schukai/monster",
3
- "version": "3.47.0",
3
+ "version": "3.48.0",
4
4
  "description": "Monster is a simple library for creating fast, robust and lightweight websites.",
5
5
  "keywords": [
6
6
  "framework",
@@ -59,7 +59,7 @@ export {
59
59
  ATTRIBUTE_HIDDEN,
60
60
  objectUpdaterLinkSymbol,
61
61
  customElementUpdaterLinkSymbol,
62
- optionCallbackName,
62
+ initControlCallbackName,
63
63
  ATTRIBUTE_SCRIPT_HOST,
64
64
  ATTRIBUTE_OPTION_CALLBACK
65
65
  };
@@ -127,7 +127,7 @@ const ATTRIBUTE_OPTION_CALLBACK = `${ATTRIBUTE_PREFIX}option-callback`;
127
127
  * @since 3.48.0
128
128
  * @type {string}
129
129
  */
130
- const optionCallbackName = `initCustomControlOptionsCallback`;
130
+ const initControlCallbackName = `initCustomControlCallback`;
131
131
 
132
132
  /**
133
133
  * @memberOf Monster.DOM
@@ -27,7 +27,7 @@ import {
27
27
  ATTRIBUTE_OPTIONS_SELECTOR,
28
28
  ATTRIBUTE_SCRIPT_HOST,
29
29
  customElementUpdaterLinkSymbol,
30
- optionCallbackName
30
+ initControlCallbackName
31
31
  } from "./constants.mjs";
32
32
  import {findDocumentTemplate, Template} from "./template.mjs";
33
33
  import {addObjectWithUpdaterToElement} from "./updater.mjs";
@@ -728,7 +728,7 @@ function callControlCallback(callBackFunctionName, ...args) {
728
728
  * This Function is called when the element is attached to the DOM.
729
729
  *
730
730
  * It looks for the attribute `data-monster-option-callback`. Is this attribute is not set, the default callback
731
- * `initCustomControlOptionsCallback` is called.
731
+ * `initCustomControlCallback` is called.
732
732
  *
733
733
  * The callback is searched in this element and in the host element. If the callback is found, it is called with the
734
734
  * element as parameter.
@@ -740,7 +740,7 @@ function callControlCallback(callBackFunctionName, ...args) {
740
740
  function initFromCallbackHost() {
741
741
  const self = this;
742
742
 
743
- let callBackFunctionName = optionCallbackName // default callback
743
+ let callBackFunctionName = initControlCallbackName // default callback
744
744
  if (self.hasAttribute(ATTRIBUTE_OPTION_CALLBACK)) {
745
745
  callBackFunctionName = self.getAttribute(ATTRIBUTE_OPTION_CALLBACK);
746
746
  }
@@ -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.47.0");
145
+ monsterVersion = new Version("3.48.0");
146
146
 
147
147
  return monsterVersion;
148
148
  }
@@ -102,13 +102,13 @@ describe('DOM', function () {
102
102
 
103
103
  });
104
104
 
105
- it('should found callback initCustomControlOptionsCallback', function () {
105
+ it('should found callback initCustomControlCallback', function () {
106
106
 
107
107
  let mocks = document.getElementById('mocks');
108
108
  mocks.innerHTML = `<div id="call-back-host"></div><div id="container"></div>`;
109
109
 
110
110
  const container = document.getElementById('call-back-host');
111
- container.initCustomControlOptionsCallback = function (control) {
111
+ container.initCustomControlCallback = function (control) {
112
112
  control.setOption('test', 1);
113
113
  }
114
114
 
@@ -120,14 +120,14 @@ describe('DOM', function () {
120
120
 
121
121
  });
122
122
 
123
- it('should found callback initCustomControlOptionsCallback from self', function () {
123
+ it('should found callback initCustomControlCallback from self', function () {
124
124
 
125
125
  let mocks = document.getElementById('mocks');
126
126
  mocks.innerHTML = `<div id="call-back-host"></div><div id="container"></div>`;
127
127
 
128
128
  let control = document.createElement(randomTagNumber);
129
129
  expect(control.getOption('test')).is.eql(0);
130
- control.initCustomControlOptionsCallback = function (control) {
130
+ control.initCustomControlCallback = function (control) {
131
131
  control.setOption('test', 2);
132
132
  }
133
133
 
@@ -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.47.0")
10
+ monsterVersion = new Version("3.48.0")
11
11
 
12
12
  let m = getMonsterVersion();
13
13