be-hive 0.0.50 → 0.0.51
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/be-hive.js +12 -11
- package/be-hive.ts +13 -11
- package/package.json +2 -2
- package/types.d.ts +1 -0
package/be-hive.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CE } from 'trans-render/lib/CE.js';
|
|
2
2
|
export class BeHiveCore extends HTMLElement {
|
|
3
3
|
registeredBehaviors = {};
|
|
4
4
|
intro({}) {
|
|
@@ -37,29 +37,30 @@ export class BeHiveCore extends HTMLElement {
|
|
|
37
37
|
this.latestBehavior = instance;
|
|
38
38
|
return newBehaviorEl;
|
|
39
39
|
}
|
|
40
|
+
onLatestBehavior({ latestBehavior }) {
|
|
41
|
+
this.dispatchEvent(new CustomEvent('latest-behavior-changed', {
|
|
42
|
+
detail: {
|
|
43
|
+
value: latestBehavior,
|
|
44
|
+
}
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
40
47
|
}
|
|
41
48
|
const tagName = 'be-hive';
|
|
42
|
-
const
|
|
49
|
+
const ce = new CE({
|
|
43
50
|
config: {
|
|
44
51
|
tagName,
|
|
45
52
|
propDefaults: {
|
|
46
53
|
overrides: {},
|
|
47
54
|
isC: true,
|
|
48
55
|
},
|
|
49
|
-
propInfo: {
|
|
50
|
-
latestBehavior: {
|
|
51
|
-
notify: {
|
|
52
|
-
dispatch: true,
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
56
|
actions: {
|
|
57
57
|
intro: {
|
|
58
58
|
ifAllOf: ['isC'],
|
|
59
59
|
},
|
|
60
60
|
onOverrides: {
|
|
61
61
|
ifAllOf: ['overrides']
|
|
62
|
-
}
|
|
62
|
+
},
|
|
63
|
+
onLatestBehavior: 'latestBehavior'
|
|
63
64
|
},
|
|
64
65
|
style: {
|
|
65
66
|
display: 'none',
|
|
@@ -67,4 +68,4 @@ const xe = new XE({
|
|
|
67
68
|
},
|
|
68
69
|
superclass: BeHiveCore
|
|
69
70
|
});
|
|
70
|
-
export const BeHive =
|
|
71
|
+
export const BeHive = ce.classDef;
|
package/be-hive.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {CE} from 'trans-render/lib/CE.js';
|
|
2
2
|
import {BeHiveProps, BeHiveActions, BehaviorKeys} from './types';
|
|
3
3
|
|
|
4
4
|
export class BeHiveCore extends HTMLElement implements BeHiveActions{
|
|
@@ -39,33 +39,35 @@ export class BeHiveCore extends HTMLElement implements BeHiveActions{
|
|
|
39
39
|
this.latestBehavior = instance;
|
|
40
40
|
return newBehaviorEl;
|
|
41
41
|
}
|
|
42
|
+
|
|
43
|
+
onLatestBehavior({latestBehavior}: this): void {
|
|
44
|
+
this.dispatchEvent(new CustomEvent('latest-behavior-changed', {
|
|
45
|
+
detail:{
|
|
46
|
+
value: latestBehavior,
|
|
47
|
+
}
|
|
48
|
+
}))
|
|
49
|
+
}
|
|
42
50
|
}
|
|
43
51
|
|
|
44
52
|
export interface BeHiveCore extends BeHiveProps{}
|
|
45
53
|
|
|
46
54
|
const tagName = 'be-hive';
|
|
47
55
|
|
|
48
|
-
const
|
|
56
|
+
const ce = new CE<BeHiveProps, BeHiveActions>({
|
|
49
57
|
config:{
|
|
50
58
|
tagName,
|
|
51
59
|
propDefaults:{
|
|
52
60
|
overrides: {},
|
|
53
61
|
isC: true,
|
|
54
62
|
},
|
|
55
|
-
propInfo:{
|
|
56
|
-
latestBehavior: {
|
|
57
|
-
notify:{
|
|
58
|
-
dispatch: true,
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
63
|
actions:{
|
|
63
64
|
intro:{
|
|
64
65
|
ifAllOf:['isC'],
|
|
65
66
|
},
|
|
66
67
|
onOverrides:{
|
|
67
68
|
ifAllOf:['overrides']
|
|
68
|
-
}
|
|
69
|
+
},
|
|
70
|
+
onLatestBehavior: 'latestBehavior'
|
|
69
71
|
},
|
|
70
72
|
style:{
|
|
71
73
|
display: 'none',
|
|
@@ -74,6 +76,6 @@ const xe = new XE<BeHiveProps, BeHiveActions>({
|
|
|
74
76
|
superclass: BeHiveCore
|
|
75
77
|
});
|
|
76
78
|
|
|
77
|
-
export const BeHive =
|
|
79
|
+
export const BeHive = ce.classDef!;
|
|
78
80
|
|
|
79
81
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "be-hive",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.51",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"web-components",
|
|
6
6
|
"web-component",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"doc": "custom-elements-manifest analyze"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"
|
|
30
|
+
"trans-render": "0.0.562"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@playwright/test": "1.24.2",
|