piral-core 0.15.10 → 0.15.11-beta.5506
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/esm/modules/element.js +26 -14
- package/esm/modules/element.js.map +1 -1
- package/lib/modules/element.js +25 -13
- package/lib/modules/element.js.map +1 -1
- package/package.json +4 -4
- package/src/modules/element.ts +26 -13
package/esm/modules/element.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExtensionSlot } from '../components';
|
|
2
|
-
import { tryParseJson, noop, reactifyContent, renderInDom, changeDomPortal, portalName, extensionName, slotName, } from '../utils';
|
|
2
|
+
import { tryParseJson, noop, reactifyContent, renderInDom, changeDomPortal, portalName, extensionName, slotName, isSame, } from '../utils';
|
|
3
3
|
if (typeof window !== 'undefined' && 'customElements' in window) {
|
|
4
4
|
/**
|
|
5
5
|
* This is a nice abstraction allowing anyone to actually use the extension system
|
|
@@ -30,43 +30,55 @@ if (typeof window !== 'undefined' && 'customElements' in window) {
|
|
|
30
30
|
return this.props.params;
|
|
31
31
|
}
|
|
32
32
|
set params(value) {
|
|
33
|
-
this.props.params
|
|
34
|
-
|
|
33
|
+
if (!isSame(this.props.params, value)) {
|
|
34
|
+
this.props.params = value;
|
|
35
|
+
this.update(this.props);
|
|
36
|
+
}
|
|
35
37
|
}
|
|
36
38
|
get name() {
|
|
37
39
|
return this.props.name;
|
|
38
40
|
}
|
|
39
41
|
set name(value) {
|
|
40
|
-
this.props.name
|
|
41
|
-
|
|
42
|
+
if (this.props.name !== value) {
|
|
43
|
+
this.props.name = value;
|
|
44
|
+
this.update(this.props);
|
|
45
|
+
}
|
|
42
46
|
}
|
|
43
47
|
get order() {
|
|
44
48
|
return this.props.order;
|
|
45
49
|
}
|
|
46
50
|
set order(value) {
|
|
47
|
-
this.props.order
|
|
48
|
-
|
|
51
|
+
if (this.props.order !== value) {
|
|
52
|
+
this.props.order = value;
|
|
53
|
+
this.update(this.props);
|
|
54
|
+
}
|
|
49
55
|
}
|
|
50
56
|
get render() {
|
|
51
57
|
return this.props.render;
|
|
52
58
|
}
|
|
53
59
|
set render(value) {
|
|
54
|
-
this.props.render
|
|
55
|
-
|
|
60
|
+
if (this.props.render !== value) {
|
|
61
|
+
this.props.render = value;
|
|
62
|
+
this.update(this.props);
|
|
63
|
+
}
|
|
56
64
|
}
|
|
57
65
|
get empty() {
|
|
58
66
|
return this.props.empty;
|
|
59
67
|
}
|
|
60
68
|
set empty(value) {
|
|
61
|
-
this.props.empty
|
|
62
|
-
|
|
69
|
+
if (this.props.empty !== value) {
|
|
70
|
+
this.props.empty = value;
|
|
71
|
+
this.update(this.props);
|
|
72
|
+
}
|
|
63
73
|
}
|
|
64
74
|
get emptySkipsRender() {
|
|
65
75
|
return this.props.emptySkipsRender;
|
|
66
76
|
}
|
|
67
77
|
set emptySkipsRender(value) {
|
|
68
|
-
this.props.emptySkipsRender
|
|
69
|
-
|
|
78
|
+
if (this.props.emptySkipsRender !== value) {
|
|
79
|
+
this.props.emptySkipsRender = value;
|
|
80
|
+
this.update(this.props);
|
|
81
|
+
}
|
|
70
82
|
}
|
|
71
83
|
connectedCallback() {
|
|
72
84
|
this.style.display = 'contents';
|
|
@@ -94,7 +106,7 @@ if (typeof window !== 'undefined' && 'customElements' in window) {
|
|
|
94
106
|
this.params = tryParseJson(newValue);
|
|
95
107
|
break;
|
|
96
108
|
case 'empty-skips-render':
|
|
97
|
-
this.
|
|
109
|
+
this.emptySkipsRender = typeof newValue === 'string';
|
|
98
110
|
break;
|
|
99
111
|
}
|
|
100
112
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.js","sourceRoot":"","sources":["../../src/modules/element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,eAAe,EACf,WAAW,EACX,eAAe,EACf,UAAU,EACV,aAAa,EACb,QAAQ,
|
|
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AAI,EAAE,IAAI,CAAC,CAAC;AACtB,CAAC"}
|
package/lib/modules/element.js
CHANGED
|
@@ -33,43 +33,55 @@ if (typeof window !== 'undefined' && 'customElements' in window) {
|
|
|
33
33
|
return this.props.params;
|
|
34
34
|
}
|
|
35
35
|
set params(value) {
|
|
36
|
-
this.props.params
|
|
37
|
-
|
|
36
|
+
if (!(0, utils_1.isSame)(this.props.params, value)) {
|
|
37
|
+
this.props.params = value;
|
|
38
|
+
this.update(this.props);
|
|
39
|
+
}
|
|
38
40
|
}
|
|
39
41
|
get name() {
|
|
40
42
|
return this.props.name;
|
|
41
43
|
}
|
|
42
44
|
set name(value) {
|
|
43
|
-
this.props.name
|
|
44
|
-
|
|
45
|
+
if (this.props.name !== value) {
|
|
46
|
+
this.props.name = value;
|
|
47
|
+
this.update(this.props);
|
|
48
|
+
}
|
|
45
49
|
}
|
|
46
50
|
get order() {
|
|
47
51
|
return this.props.order;
|
|
48
52
|
}
|
|
49
53
|
set order(value) {
|
|
50
|
-
this.props.order
|
|
51
|
-
|
|
54
|
+
if (this.props.order !== value) {
|
|
55
|
+
this.props.order = value;
|
|
56
|
+
this.update(this.props);
|
|
57
|
+
}
|
|
52
58
|
}
|
|
53
59
|
get render() {
|
|
54
60
|
return this.props.render;
|
|
55
61
|
}
|
|
56
62
|
set render(value) {
|
|
57
|
-
this.props.render
|
|
58
|
-
|
|
63
|
+
if (this.props.render !== value) {
|
|
64
|
+
this.props.render = value;
|
|
65
|
+
this.update(this.props);
|
|
66
|
+
}
|
|
59
67
|
}
|
|
60
68
|
get empty() {
|
|
61
69
|
return this.props.empty;
|
|
62
70
|
}
|
|
63
71
|
set empty(value) {
|
|
64
|
-
this.props.empty
|
|
65
|
-
|
|
72
|
+
if (this.props.empty !== value) {
|
|
73
|
+
this.props.empty = value;
|
|
74
|
+
this.update(this.props);
|
|
75
|
+
}
|
|
66
76
|
}
|
|
67
77
|
get emptySkipsRender() {
|
|
68
78
|
return this.props.emptySkipsRender;
|
|
69
79
|
}
|
|
70
80
|
set emptySkipsRender(value) {
|
|
71
|
-
this.props.emptySkipsRender
|
|
72
|
-
|
|
81
|
+
if (this.props.emptySkipsRender !== value) {
|
|
82
|
+
this.props.emptySkipsRender = value;
|
|
83
|
+
this.update(this.props);
|
|
84
|
+
}
|
|
73
85
|
}
|
|
74
86
|
connectedCallback() {
|
|
75
87
|
this.style.display = 'contents';
|
|
@@ -97,7 +109,7 @@ if (typeof window !== 'undefined' && 'customElements' in window) {
|
|
|
97
109
|
this.params = (0, utils_1.tryParseJson)(newValue);
|
|
98
110
|
break;
|
|
99
111
|
case 'empty-skips-render':
|
|
100
|
-
this.
|
|
112
|
+
this.emptySkipsRender = typeof newValue === 'string';
|
|
101
113
|
break;
|
|
102
114
|
}
|
|
103
115
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.js","sourceRoot":"","sources":["../../src/modules/element.ts"],"names":[],"mappings":";;;AAAA,8CAA8C;AAE9C,
|
|
1
|
+
{"version":3,"file":"element.js","sourceRoot":"","sources":["../../src/modules/element.ts"],"names":[],"mappings":";;;AAAA,8CAA8C;AAE9C,oCAUkB;AAMlB,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,gBAAgB,IAAI,MAAM,EAAE;IAC/D;;;;;;;;;OASG;IACH,MAAM,cAAe,SAAQ,WAAW;QAAxC;;YACE,YAAO,GAAe,YAAI,CAAC;YAC3B,WAAM,GAAc,YAAI,CAAC;YAEzB,UAAK,GAAG;gBACN,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;gBAC/B,gBAAgB,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC,KAAK,QAAQ;gBAC7E,MAAM,EAAE,IAAA,oBAAY,EAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;gBACjD,KAAK,EAAE,SAAS;gBAChB,KAAK,EAAE,SAAS;gBAChB,MAAM,EAAE,SAAS;gBACjB,QAAQ,E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e,GAAG,EAAE;YAC/B,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;YAC/B,OAAO,CAAC,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/C,CAAC,CAAC;QACF,MAAM,MAAM,GAAc,CAAC,QAAQ,EAAE,EAAE;YACrC,CAAC,EAAE,EAAE,MAAM,CAAC,GAAG,IAAA,uBAAe,EAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,0BAAa,EAAE,QAAQ,CAAC,CAAC;QACxF,CAAC,CAAC;QACF,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC1C,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;KAC1B;IAED,OAAO,CAAC,YAAI,EAAE,YAAI,CAAC,CAAC;AACtB,CAAC;AArBD,sCAqBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "piral-core",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.11-beta.5506",
|
|
4
4
|
"description": "The core library for creating a Piral instance.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"portal",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"piral-base": "
|
|
76
|
-
"piral-debug-utils": "
|
|
75
|
+
"piral-base": "0.15.11-beta.5506",
|
|
76
|
+
"piral-debug-utils": "0.15.11-beta.5506",
|
|
77
77
|
"zustand": "^3.0.0"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"react-router-dom",
|
|
100
100
|
"tslib"
|
|
101
101
|
],
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "1a604e1dc6d75849d65f91debd27b5c0518140e8"
|
|
103
103
|
}
|
package/src/modules/element.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
portalName,
|
|
10
10
|
extensionName,
|
|
11
11
|
slotName,
|
|
12
|
+
isSame,
|
|
12
13
|
} from '../utils';
|
|
13
14
|
|
|
14
15
|
export interface Updatable {
|
|
@@ -45,8 +46,10 @@ if (typeof window !== 'undefined' && 'customElements' in window) {
|
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
set params(value) {
|
|
48
|
-
this.props.params
|
|
49
|
-
|
|
49
|
+
if (!isSame(this.props.params, value)) {
|
|
50
|
+
this.props.params = value;
|
|
51
|
+
this.update(this.props);
|
|
52
|
+
}
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
get name() {
|
|
@@ -54,8 +57,10 @@ if (typeof window !== 'undefined' && 'customElements' in window) {
|
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
set name(value) {
|
|
57
|
-
this.props.name
|
|
58
|
-
|
|
60
|
+
if (this.props.name !== value) {
|
|
61
|
+
this.props.name = value;
|
|
62
|
+
this.update(this.props);
|
|
63
|
+
}
|
|
59
64
|
}
|
|
60
65
|
|
|
61
66
|
get order() {
|
|
@@ -63,8 +68,10 @@ if (typeof window !== 'undefined' && 'customElements' in window) {
|
|
|
63
68
|
}
|
|
64
69
|
|
|
65
70
|
set order(value) {
|
|
66
|
-
this.props.order
|
|
67
|
-
|
|
71
|
+
if (this.props.order !== value) {
|
|
72
|
+
this.props.order = value;
|
|
73
|
+
this.update(this.props);
|
|
74
|
+
}
|
|
68
75
|
}
|
|
69
76
|
|
|
70
77
|
get render() {
|
|
@@ -72,8 +79,10 @@ if (typeof window !== 'undefined' && 'customElements' in window) {
|
|
|
72
79
|
}
|
|
73
80
|
|
|
74
81
|
set render(value) {
|
|
75
|
-
this.props.render
|
|
76
|
-
|
|
82
|
+
if (this.props.render !== value) {
|
|
83
|
+
this.props.render = value;
|
|
84
|
+
this.update(this.props);
|
|
85
|
+
}
|
|
77
86
|
}
|
|
78
87
|
|
|
79
88
|
get empty() {
|
|
@@ -81,8 +90,10 @@ if (typeof window !== 'undefined' && 'customElements' in window) {
|
|
|
81
90
|
}
|
|
82
91
|
|
|
83
92
|
set empty(value) {
|
|
84
|
-
this.props.empty
|
|
85
|
-
|
|
93
|
+
if (this.props.empty !== value) {
|
|
94
|
+
this.props.empty = value;
|
|
95
|
+
this.update(this.props);
|
|
96
|
+
}
|
|
86
97
|
}
|
|
87
98
|
|
|
88
99
|
get emptySkipsRender() {
|
|
@@ -90,8 +101,10 @@ if (typeof window !== 'undefined' && 'customElements' in window) {
|
|
|
90
101
|
}
|
|
91
102
|
|
|
92
103
|
set emptySkipsRender(value) {
|
|
93
|
-
this.props.emptySkipsRender
|
|
94
|
-
|
|
104
|
+
if (this.props.emptySkipsRender !== value) {
|
|
105
|
+
this.props.emptySkipsRender = value;
|
|
106
|
+
this.update(this.props);
|
|
107
|
+
}
|
|
95
108
|
}
|
|
96
109
|
|
|
97
110
|
connectedCallback() {
|
|
@@ -125,7 +138,7 @@ if (typeof window !== 'undefined' && 'customElements' in window) {
|
|
|
125
138
|
this.params = tryParseJson(newValue);
|
|
126
139
|
break;
|
|
127
140
|
case 'empty-skips-render':
|
|
128
|
-
this.
|
|
141
|
+
this.emptySkipsRender = typeof newValue === 'string';
|
|
129
142
|
break;
|
|
130
143
|
}
|
|
131
144
|
}
|