@webtides/element-js 1.0.0 → 1.1.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/CHANGELOG.md +147 -90
- package/README.md +3 -3
- package/docs/README.md +70 -89
- package/docs/concepts/classes.md +37 -66
- package/docs/concepts/hierarchy.md +29 -31
- package/docs/concepts/lifecycle.md +9 -23
- package/docs/concepts/reactivity.md +1 -3
- package/docs/features/computed-properties.md +13 -16
- package/docs/features/dependency-injection-context-protocol.md +75 -87
- package/docs/features/global-styles.md +1 -1
- package/docs/features/methods.md +14 -15
- package/docs/features/properties.md +21 -33
- package/docs/features/refs.md +23 -31
- package/docs/features/renderless.md +31 -37
- package/docs/features/store.md +63 -78
- package/docs/features/templates.md +4 -1
- package/docs/features/watch.md +28 -35
- package/docs/getting-started/upgrade-to-v1.md +16 -0
- package/docs/guide/guide.md +10 -22
- package/index.js +29 -2
- package/package.json +62 -62
- package/src/BaseElement.js +632 -631
- package/src/StyledElement.js +104 -104
- package/src/TemplateElement.js +53 -53
- package/src/dom-parts/AttributePart.js +116 -116
- package/src/dom-parts/ChildNodePart.js +288 -288
- package/src/dom-parts/NodePart.js +27 -27
- package/src/dom-parts/Part.js +6 -6
- package/src/dom-parts/TemplatePart.js +119 -119
- package/src/dom-parts/TemplateResult.js +270 -270
- package/src/dom-parts/directives.js +105 -48
- package/src/dom-parts/html.js +1 -1
- package/src/dom-parts/render.js +6 -6
- package/src/util/AttributeParser.js +47 -47
- package/src/util/DOMHelper.js +190 -190
- package/src/util/Directive.js +31 -31
- package/src/util/GlobalStylesStore.js +63 -53
- package/src/util/SerializeStateHelper.js +56 -56
- package/src/util/Store.js +175 -174
- package/src/util/crypto.js +13 -0
- package/src/util/defineElement.js +5 -5
- package/src/util/toString.js +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres
|
|
5
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres
|
|
6
|
+
to [Semantic Versioning](http://semver.org/).
|
|
6
7
|
|
|
7
8
|
<!--
|
|
8
9
|
PRs should document their user-visible changes (if any) in the
|
|
@@ -15,305 +16,361 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|
|
15
16
|
<!-- ### Removed -->
|
|
16
17
|
<!-- ### Fixed -->
|
|
17
18
|
|
|
19
|
+
## [1.1.1] - 2024-09-16
|
|
20
|
+
|
|
21
|
+
### FIXED
|
|
22
|
+
|
|
23
|
+
- Fixed base url and css rules order in adopted style sheets.
|
|
24
|
+
- Fixed randomUUID not being available in unsecure hosts (like localhost) by adding a helper function
|
|
25
|
+
|
|
26
|
+
## [1.1.0] - 2024-06-24
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- Added `optionalAttribute` directive to conditionally render attributes (plus value)
|
|
31
|
+
|
|
32
|
+
### FIXED
|
|
33
|
+
|
|
34
|
+
- Fixed `spreadAttributes` to not render "null|undefined|NaN" to the attributes value but removing the entire attribute
|
|
35
|
+
when such values are passed.
|
|
36
|
+
|
|
18
37
|
## [1.0.0] - 2024-05-24
|
|
19
38
|
|
|
20
39
|
### Added
|
|
21
40
|
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
41
|
+
- Added our own versions of directives and template helpers ([#67](https://github.com/webtides/element-js/pull/67))
|
|
42
|
+
- Added JSDocs for everything in the codebase. This will especially be helpful when using constructor options.
|
|
43
|
+
- Added state serialization. This improves hydration from SSR a
|
|
44
|
+
lot. ([#106](https://github.com/webtides/element-js/pull/106))
|
|
45
|
+
- added declarative shadow dom rendering for template elements
|
|
26
46
|
|
|
27
47
|
### Changed
|
|
28
48
|
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
|
|
49
|
+
- _BREAKING_ Uses a new custom renderer for the `TemplateElement`. It replaces the old `lit-html` renderer. The API and
|
|
50
|
+
usage should be exactly the same. The only thing to do/change is the use of the old `lit-html` directives. For
|
|
51
|
+
detailed instructions see the upgrade guide. ([#67](https://github.com/webtides/element-js/pull/67))
|
|
52
|
+
- _BREAKING_ `element-js` will now also trigger the `afterUpdate` hook right after the `connected` hook. This is to
|
|
53
|
+
reduce the cases where you had to do the same things in `connected` and `afterUpdate`. You can now remove those
|
|
54
|
+
duplicate calls from the `connected` hook. ([#60](https://github.com/webtides/element-js/pull/60))
|
|
55
|
+
- _BREAKING_ Changed `package.json` type to `module`. This should hopefully not break anything. `element-js` is either
|
|
56
|
+
used directly from the browser or through a bundler. In both cases the added type: module should not
|
|
57
|
+
matter. ([#64](https://github.com/webtides/element-js/pull/64))
|
|
58
|
+
- _BRAKING_ Changed the default options when using the `dispatch` helper function. `bubbles`, `cancelable`
|
|
59
|
+
and `composed` will now be `true` by default.
|
|
60
|
+
- _BRAKING_ Changed adopting global styles to include ALL global styles. Previously only one inline <style> with the ID
|
|
61
|
+
of '#globalStyles' would be adopted. For more information see the docs.
|
|
34
62
|
|
|
35
63
|
### Removed
|
|
36
64
|
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
65
|
+
- _BREAKING_ Removed the `lit-html` dependency. `element-js` is now officially dependency
|
|
66
|
+
free! ([#67](https://github.com/webtides/element-js/pull/67))
|
|
67
|
+
- _BREAKING_ Removed the deprecated `BaseElement` constructor option `childListUpdate`. Please use the "
|
|
68
|
+
mutationObserverOptions" dictionary instead. See the docs for more
|
|
69
|
+
info. ([#99](https://github.com/webtides/element-js/pull/99))
|
|
70
|
+
- _BREAKING_ Removed the `hooks` map in the `BaseElement`. Using the hooks() map for lifecycle hooks is deprecated!
|
|
71
|
+
Please overwrite the existing lifecycle hook functions. See the docs for more
|
|
72
|
+
info. ([#99](https://github.com/webtides/element-js/pull/99))
|
|
73
|
+
- _BREAKING_ Removed the `computed` map in the `BaseElement`. Using the computed() map for computed properties is
|
|
74
|
+
deprecated! Please use regular JS getters and return the computed value. See the docs for more
|
|
75
|
+
info. ([#99](https://github.com/webtides/element-js/pull/99))
|
|
76
|
+
- _BREAKING_ Removed all occurrences of `ShadyCSS`
|
|
77
|
+
in `StyledElement`. ([#99](https://github.com/webtides/element-js/pull/99))
|
|
78
|
+
- _BRAKING_ Removed the `i18n` helper function. See CHANGELOG how to implement it yourself or use a third party library.
|
|
43
79
|
|
|
44
80
|
## [1.0.0-alpha.13] - 2024-05-08
|
|
45
81
|
|
|
46
82
|
### Fixed
|
|
47
83
|
|
|
48
|
-
-
|
|
84
|
+
- catch security errors when `GlobalStylesStore` tries to read css rules from cross-origin stylesheets.
|
|
49
85
|
|
|
50
86
|
## [1.0.0-alpha.12] - 2024-03-03
|
|
51
87
|
|
|
52
88
|
### Added
|
|
53
89
|
|
|
54
|
-
-
|
|
90
|
+
- added declarative shadow dom rendering for template elements
|
|
55
91
|
|
|
56
92
|
### Fixed
|
|
57
93
|
|
|
58
|
-
-
|
|
94
|
+
- fixed issues with whitespace being returned untrimmed in a template result
|
|
59
95
|
|
|
60
96
|
## [1.0.0-alpha.11] - 2024-03-13
|
|
61
97
|
|
|
62
98
|
### Fixed
|
|
63
99
|
|
|
64
|
-
-
|
|
65
|
-
-
|
|
100
|
+
- fixed missing return type `string` for the `template()` function in `TemplateElement`
|
|
101
|
+
- fixed types for the `propertyOptions` option in `BaseElement`
|
|
66
102
|
|
|
67
103
|
## [1.0.0-alpha.10] - 2024-02-20
|
|
68
104
|
|
|
69
105
|
### Fixed
|
|
70
106
|
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
107
|
+
- fixed unsafeHTML not rendering anything when toString was called
|
|
108
|
+
- fixed using = sign in attribute positions with interpolations
|
|
109
|
+
- fixed rendering null values in node part positions in SSR
|
|
110
|
+
- fixed missing .js file extensions
|
|
75
111
|
|
|
76
112
|
## [1.0.0-alpha.9] - 2024-01-05
|
|
77
113
|
|
|
78
114
|
### Changed
|
|
79
115
|
|
|
80
|
-
-
|
|
116
|
+
- moved DOM methods into connected callbacks to make it safe for the elements to be created in SSR environments
|
|
81
117
|
|
|
82
118
|
## [1.0.0-alpha.8] - 2024-01-04
|
|
83
119
|
|
|
84
120
|
### Fixed
|
|
85
121
|
|
|
86
|
-
-
|
|
122
|
+
- fixed ChildNodePart not replacing dom nodes from unsafeHTML
|
|
87
123
|
|
|
88
124
|
## [1.0.0-alpha.7] - 2023-12-19
|
|
89
125
|
|
|
90
126
|
### Fixed
|
|
91
127
|
|
|
92
|
-
-
|
|
128
|
+
- fixed wrong attribute parts for the same name on different elements
|
|
93
129
|
|
|
94
130
|
## [1.0.0-alpha.6] - 2023-12-18
|
|
95
131
|
|
|
96
132
|
### Fixed
|
|
97
133
|
|
|
98
|
-
-
|
|
134
|
+
- fixed hyphens in attribute names being split in SSR mode
|
|
99
135
|
|
|
100
136
|
## [1.0.0-alpha.5] - 2023-12-07
|
|
101
137
|
|
|
102
138
|
### Added
|
|
103
139
|
|
|
104
|
-
-
|
|
105
|
-
-
|
|
140
|
+
- Added the /docs directory to the files array in package.json
|
|
141
|
+
- Added part instances as \_\_part to comment nodes
|
|
106
142
|
|
|
107
143
|
### Fixed
|
|
108
144
|
|
|
109
|
-
-
|
|
145
|
+
- fixed escaped unsafeHTML in SSR mode
|
|
110
146
|
|
|
111
147
|
## [1.0.0-alpha.4] - 2023-12-01
|
|
112
148
|
|
|
113
149
|
### Fixed
|
|
114
150
|
|
|
115
|
-
-
|
|
116
|
-
-
|
|
151
|
+
- falsy creation of directive parts for non-directive attributes
|
|
152
|
+
- creating parts with wrong comment marker positions
|
|
117
153
|
|
|
118
154
|
## [1.0.0-alpha.3] - 2023-12-01
|
|
119
155
|
|
|
120
156
|
### Added
|
|
121
157
|
|
|
122
|
-
-
|
|
158
|
+
- Added state serialization. This improves hydration from SSR a
|
|
159
|
+
lot. ([#106](https://github.com/webtides/element-js/pull/106))
|
|
123
160
|
|
|
124
161
|
### Changed
|
|
125
162
|
|
|
126
|
-
-
|
|
127
|
-
|
|
163
|
+
- _BRAKING_ Changed the default options when using the `dispatch` helper function. `bubbles`, `cancelable`
|
|
164
|
+
and `composed` will now be `true` by default.
|
|
165
|
+
- _BRAKING_ Changed adopting global styles to include ALL global styles. Previously only one inline <style> with the ID
|
|
166
|
+
of '#globalStyles' would be adopted. For more information see the docs.
|
|
128
167
|
|
|
129
168
|
### Removed
|
|
130
169
|
|
|
131
|
-
-
|
|
170
|
+
- _BRAKING_ Removed `i18n` helper function. See CHANGELOG how to implement it yourself or use a third party library.
|
|
132
171
|
|
|
133
172
|
## [1.0.0-alpha.2] - 2023-08-23
|
|
134
173
|
|
|
135
174
|
### Added
|
|
136
175
|
|
|
137
|
-
-
|
|
176
|
+
- Added JSDocs for everything in the codebase. This will especially be helpful when using constructor options.
|
|
138
177
|
|
|
139
178
|
## [1.0.0-alpha.1] - 2023-08-15
|
|
140
179
|
|
|
141
180
|
### Added
|
|
142
181
|
|
|
143
|
-
-
|
|
182
|
+
- Added our own versions of directives and template helpers ([#67](https://github.com/webtides/element-js/pull/67))
|
|
144
183
|
|
|
145
184
|
### Changed
|
|
146
185
|
|
|
147
|
-
-
|
|
148
|
-
|
|
149
|
-
|
|
186
|
+
- _BRAKING_ Uses a new custom renderer for the `TemplateElement`. It replaces the old `lit-html` renderer. The API and
|
|
187
|
+
usage should be exactly the same. The only thing to do/change is the use of the old `lit-html` directives. For
|
|
188
|
+
detailed instructions see the upgrade guide. ([#67](https://github.com/webtides/element-js/pull/67))
|
|
189
|
+
- _BREAKING_ `element-js` will now also trigger the `afterUpdate` hook right after the `connected` hook. This is to
|
|
190
|
+
reduce the cases where you had to do the same things in `connected` and `afterUpdate`. You can now remove those
|
|
191
|
+
duplicate calls from the `connected` hook. ([#60](https://github.com/webtides/element-js/pull/60))
|
|
192
|
+
- _BREAKING_ Changed `package.json` type to `module`. This should hopefully not break anything. `element-js` is either
|
|
193
|
+
used directly from the browser or through a bundler. In both cases the added type: module should not
|
|
194
|
+
matter. ([#64](https://github.com/webtides/element-js/pull/64))
|
|
150
195
|
|
|
151
196
|
### Removed
|
|
152
197
|
|
|
153
|
-
-
|
|
154
|
-
|
|
155
|
-
-
|
|
156
|
-
|
|
157
|
-
|
|
198
|
+
- _BREAKING_ Removed the `lit-html` dependency. `element-js` is now officially dependency
|
|
199
|
+
free! ([#67](https://github.com/webtides/element-js/pull/67))
|
|
200
|
+
- _BREAKING_ Removed the deprecated `BaseElement` constructor option `childListUpdate`. Please use the "
|
|
201
|
+
mutationObserverOptions" dictionary instead. See the docs for more
|
|
202
|
+
info. ([#99](https://github.com/webtides/element-js/pull/99))
|
|
203
|
+
- _BREAKING_ Removed the `hooks` map in the `BaseElement`. Using the hooks() map for lifecycle hooks is deprecated!
|
|
204
|
+
Please overwrite the existing lifecycle hook functions. See the docs for more
|
|
205
|
+
info. ([#99](https://github.com/webtides/element-js/pull/99))
|
|
206
|
+
- _BREAKING_ Removed the `computed` map in the `BaseElement`. Using the computed() map for computed properties is
|
|
207
|
+
deprecated! Please use regular JS getters and return the computed value. See the docs for more
|
|
208
|
+
info. ([#99](https://github.com/webtides/element-js/pull/99))
|
|
209
|
+
- _BREAKING_ Removed all occurrences of `ShadyCSS`
|
|
210
|
+
in `StyledElement`. ([#99](https://github.com/webtides/element-js/pull/99))
|
|
158
211
|
|
|
159
212
|
## [0.7.4] - 2023-11-24
|
|
160
213
|
|
|
161
214
|
### Added
|
|
162
215
|
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
216
|
+
- storeception (reactive store properties in parent stores)
|
|
217
|
+
- context injection in shadow elements requests travel though shadow roots
|
|
218
|
+
- defer element connection (disables client side code until called manually)
|
|
166
219
|
|
|
167
220
|
### Fixed
|
|
168
221
|
|
|
169
|
-
-
|
|
170
|
-
-
|
|
222
|
+
- late context injection if parent mounts after child (loading order)
|
|
223
|
+
- stores updating elements that want to be updated
|
|
171
224
|
|
|
172
225
|
## [0.7.3] - 2023-03-07
|
|
173
226
|
|
|
174
227
|
### Fixed
|
|
175
228
|
|
|
176
|
-
-
|
|
229
|
+
- last release was tagged wrong
|
|
177
230
|
|
|
178
231
|
## [0.7.2] - 2023-03-03
|
|
179
232
|
|
|
180
233
|
### Fixed
|
|
181
234
|
|
|
182
|
-
-
|
|
235
|
+
- watcher callbacks for injected stores
|
|
183
236
|
|
|
184
237
|
## [0.7.1] - 2023-03-03
|
|
185
238
|
|
|
186
239
|
### Added
|
|
187
240
|
|
|
188
|
-
-
|
|
241
|
+
- Elements are now able to watch Stores
|
|
189
242
|
|
|
190
243
|
### Fixed
|
|
191
244
|
|
|
192
|
-
-
|
|
245
|
+
- Injection of falsy values
|
|
193
246
|
|
|
194
247
|
## [0.7.0] - 2023-02-13
|
|
195
248
|
|
|
196
249
|
### Added
|
|
197
250
|
|
|
198
|
-
-
|
|
199
|
-
-
|
|
200
|
-
-
|
|
251
|
+
- Dependency Injection via Context Protocol 💉
|
|
252
|
+
- Provide reactive Properties or entire Stores via: provideProperties() { return { name : value}}
|
|
253
|
+
- Inject / Request them via injectProperties() { return { name : 'defaultValue'}}
|
|
201
254
|
|
|
202
255
|
### Changed
|
|
203
256
|
|
|
204
|
-
-
|
|
257
|
+
- docs structure
|
|
205
258
|
|
|
206
259
|
### Fixed
|
|
207
260
|
|
|
208
|
-
-
|
|
209
|
-
-
|
|
261
|
+
- Cannot re-render slotted light dom when using the vanilla renderer https://github.com/webtides/element-js/issues/76
|
|
262
|
+
- adds Vanilla Renderer Tests
|
|
210
263
|
|
|
211
264
|
## [0.6.2] - 2022-11-18
|
|
212
265
|
|
|
213
266
|
### FIXED
|
|
214
267
|
|
|
215
|
-
-
|
|
268
|
+
- Store always switching to singleProperty Mode if constructed without any arguments.
|
|
216
269
|
|
|
217
270
|
## [0.6.1] - 2022-11-18
|
|
218
271
|
|
|
219
272
|
### ADDED
|
|
220
273
|
|
|
221
|
-
-
|
|
274
|
+
- Store watch() map to control internal store state scope
|
|
222
275
|
|
|
223
276
|
## [0.6.0] - 2022-11-17
|
|
224
277
|
|
|
225
278
|
### ADDED
|
|
226
279
|
|
|
227
|
-
-
|
|
228
|
-
-
|
|
280
|
+
- StoreProperty for shared application state
|
|
281
|
+
- Directives for Vanilla Renderer
|
|
229
282
|
|
|
230
283
|
## [0.5.0] - 2022-09-13
|
|
231
284
|
|
|
232
285
|
### Changed
|
|
233
286
|
|
|
234
|
-
-
|
|
287
|
+
- improved the performance of the vanilla-renderer
|
|
235
288
|
|
|
236
289
|
### Removed
|
|
237
290
|
|
|
238
|
-
-
|
|
291
|
+
- setting attributes as properties during dom diffing for the vanilla renderer. This is potentially a **breaking**
|
|
292
|
+
change if you used attributes with the "." (dot) notation
|
|
239
293
|
|
|
240
294
|
## [0.4.3] - 2022-07-06
|
|
241
295
|
|
|
242
296
|
### ADDED
|
|
243
297
|
|
|
244
|
-
-
|
|
245
|
-
-
|
|
298
|
+
- parse option to propertyOptions that can be either a boolean OR a function for custom parsing
|
|
299
|
+
- enhance reflect option in propertyOptions that it can also be a function for custom reflection
|
|
246
300
|
|
|
247
301
|
## [0.4.2] - 2022-02-03
|
|
248
302
|
|
|
249
303
|
### Fixed
|
|
250
304
|
|
|
251
|
-
-
|
|
305
|
+
- vanilla-renderer: fixes attribute comparsion
|
|
252
306
|
|
|
253
307
|
## [0.4.1] - 2022-02-01
|
|
254
308
|
|
|
255
309
|
### Fixed
|
|
256
310
|
|
|
257
|
-
-
|
|
311
|
+
- refs="id[]" indexing keys not nodes _rolleyes_
|
|
258
312
|
|
|
259
313
|
### Added
|
|
260
314
|
|
|
261
|
-
-
|
|
315
|
+
- refs="id[]" aka possibbility to refrence a list of nodes to the $refs map.
|
|
262
316
|
|
|
263
317
|
## [0.4.0] - 2022-01-28
|
|
264
318
|
|
|
265
319
|
### Added
|
|
266
320
|
|
|
267
|
-
-
|
|
321
|
+
- a "vanilla" renderer with support for hydration and no dependencies
|
|
268
322
|
|
|
269
323
|
### Changed
|
|
270
324
|
|
|
271
|
-
-
|
|
325
|
+
- uses new @web/test-runner isntead of karma (#27)
|
|
272
326
|
|
|
273
327
|
## [0.3.3] - 2021-09-22
|
|
274
328
|
|
|
275
329
|
### Added
|
|
276
330
|
|
|
277
|
-
-
|
|
278
|
-
-
|
|
279
|
-
-
|
|
280
|
-
-
|
|
331
|
+
- optional complex event callback notation to support addEventListener options (i.E. for passive Event Listeners )
|
|
332
|
+
- Example: {listener: () => {}, options: { passive: true } }
|
|
333
|
+
- docs
|
|
334
|
+
- tests
|
|
281
335
|
|
|
282
336
|
## [0.3.2] - 2021-03-09
|
|
283
337
|
|
|
284
338
|
### Added
|
|
285
339
|
|
|
286
|
-
-
|
|
340
|
+
- bundled version of `element-js` to use from a CDN and be able to prototype in tools like CodePen etc.
|
|
287
341
|
|
|
288
342
|
## [0.3.1] - 2020-12-08
|
|
289
343
|
|
|
290
344
|
### Fixed
|
|
291
345
|
|
|
292
|
-
-
|
|
346
|
+
- i18n fallback values
|
|
293
347
|
|
|
294
348
|
### Added
|
|
295
349
|
|
|
296
|
-
-
|
|
350
|
+
- i18n tests
|
|
297
351
|
|
|
298
352
|
## [0.3.0] - 2020-07-27
|
|
299
353
|
|
|
300
354
|
### Added
|
|
301
355
|
|
|
302
|
-
-
|
|
303
|
-
-
|
|
304
|
-
|
|
356
|
+
- first batch/draft of the documentation
|
|
357
|
+
- property/attribute reflection via constructor options (see the [Documentation](/docs/README.md#propertyoptions) for
|
|
358
|
+
more info)
|
|
359
|
+
- mutationObserverOptions to enable observing subtree mutations (see
|
|
360
|
+
the [Documentation](/docs/README.md#mutationobserveroptions) for more info)
|
|
305
361
|
|
|
306
362
|
### Removed
|
|
307
363
|
|
|
308
|
-
-
|
|
364
|
+
- `childListUpdate` constructor option has been deprecated and will be removed before `1.0`
|
|
309
365
|
|
|
310
366
|
## [0.2.0] - 2020-07-01
|
|
311
367
|
|
|
312
368
|
### Changed
|
|
313
369
|
|
|
314
|
-
-
|
|
315
|
-
|
|
370
|
+
- uses shady-render instead of render from `lit-html` for rendering templates to be compatible with the shady-css
|
|
371
|
+
polyfill
|
|
372
|
+
- refactored and simplified `StyledElement`s handling/loading of style sheets
|
|
316
373
|
|
|
317
374
|
## [0.1.0] - 2020-06-26
|
|
318
375
|
|
|
319
|
-
-
|
|
376
|
+
- initial release
|
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ npm install --save @webtides/element-js
|
|
|
27
27
|
// or when installed via npm
|
|
28
28
|
import { BaseElement, defineElement, Store } from '@webtides/element-js';
|
|
29
29
|
|
|
30
|
-
const sharedDate = new
|
|
30
|
+
const sharedDate = new Store({ date: Date.now() });
|
|
31
31
|
|
|
32
32
|
class ExampleElement extends BaseElement {
|
|
33
33
|
// normal public properties
|
|
@@ -42,8 +42,8 @@ class ExampleElement extends BaseElement {
|
|
|
42
42
|
// reactive attributes/properties
|
|
43
43
|
properties() {
|
|
44
44
|
return {
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
familyName: 'Doe',
|
|
46
|
+
sharedDate
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
|