@knotx/decorators 0.2.8 → 0.2.10

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/dist/index.cjs CHANGED
@@ -36,8 +36,8 @@ function getPropertyBehaviorSubjectKey(key) {
36
36
  function mergePluginHookFunction(...[key, newFunction]) {
37
37
  const original = this[key];
38
38
  this[key] = (...args) => {
39
- original == null ? void 0 : original.apply(this, args);
40
39
  newFunction.apply(this, args);
40
+ original == null ? void 0 : original.apply(this, args);
41
41
  };
42
42
  }
43
43
 
@@ -84,7 +84,7 @@ function edgeType(type) {
84
84
  }
85
85
  context.addInitializer(function() {
86
86
  subscribeEngine.call(this, (engine) => {
87
- pushSubscription.call(this, engine.registerEdgeRenderer(type, this[context.name].bind(this)));
87
+ pushSubscription.call(this, engine.registerEdgeRenderer(type, "bind" in this[context.name] ? this[context.name].bind(this) : this[context.name]));
88
88
  });
89
89
  });
90
90
  };
@@ -541,7 +541,7 @@ function nodeType(type) {
541
541
  }
542
542
  context.addInitializer(function() {
543
543
  subscribeEngine.call(this, (engine) => {
544
- pushSubscription.call(this, engine.registerNodeRenderer(type, this[context.name].bind(this)));
544
+ pushSubscription.call(this, engine.registerNodeRenderer(type, "bind" in this[context.name] ? this[context.name].bind(this) : this[context.name]));
545
545
  });
546
546
  });
547
547
  };
package/dist/index.js CHANGED
@@ -34,8 +34,8 @@ function getPropertyBehaviorSubjectKey(key) {
34
34
  function mergePluginHookFunction(...[key, newFunction]) {
35
35
  const original = this[key];
36
36
  this[key] = (...args) => {
37
- original == null ? void 0 : original.apply(this, args);
38
37
  newFunction.apply(this, args);
38
+ original == null ? void 0 : original.apply(this, args);
39
39
  };
40
40
  }
41
41
 
@@ -82,7 +82,7 @@ function edgeType(type) {
82
82
  }
83
83
  context.addInitializer(function() {
84
84
  subscribeEngine.call(this, (engine) => {
85
- pushSubscription.call(this, engine.registerEdgeRenderer(type, this[context.name].bind(this)));
85
+ pushSubscription.call(this, engine.registerEdgeRenderer(type, "bind" in this[context.name] ? this[context.name].bind(this) : this[context.name]));
86
86
  });
87
87
  });
88
88
  };
@@ -539,7 +539,7 @@ function nodeType(type) {
539
539
  }
540
540
  context.addInitializer(function() {
541
541
  subscribeEngine.call(this, (engine) => {
542
- pushSubscription.call(this, engine.registerNodeRenderer(type, this[context.name].bind(this)));
542
+ pushSubscription.call(this, engine.registerNodeRenderer(type, "bind" in this[context.name] ? this[context.name].bind(this) : this[context.name]));
543
543
  });
544
544
  });
545
545
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knotx/decorators",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "description": "Decorators for Knotx",
5
5
  "author": "boenfu",
6
6
  "license": "MIT",
@@ -28,20 +28,20 @@
28
28
  "dist"
29
29
  ],
30
30
  "peerDependencies": {
31
- "@knotx/jsx": "0.2.8"
31
+ "@knotx/jsx": "0.2.9"
32
32
  },
33
33
  "dependencies": {
34
34
  "jsonschema": "^1.5.0",
35
35
  "lodash-es": "^4.17.21",
36
36
  "rxjs": "^7.8.1",
37
- "@knotx/core": "0.2.8"
37
+ "@knotx/core": "0.2.9"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/lodash-es": "^4.14.12",
41
- "@knotx/build-config": "0.2.8",
42
- "@knotx/eslint-config": "0.2.8",
43
- "@knotx/jsx": "0.2.8",
44
- "@knotx/typescript-config": "0.2.8"
41
+ "@knotx/build-config": "0.2.9",
42
+ "@knotx/eslint-config": "0.2.9",
43
+ "@knotx/jsx": "0.2.9",
44
+ "@knotx/typescript-config": "0.2.9"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "unbuild",