@brightspace-ui/core 2.189.0 → 3.0.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.
@@ -61,9 +61,15 @@ static get localizeConfig() {
|
|
61
61
|
}
|
62
62
|
```
|
63
63
|
|
64
|
+
### Lifecycle
|
65
|
+
|
66
|
+
The `LocalizeMixin` blocks Lit component updates until the translations are loaded by returning `false` from `shouldUpdate()`. This means that the component is guaranteed to load valid terms [anywhere in the Lit lifecycle from `willUpdate()` onwards](https://lit.dev/docs/components/lifecycle/#reactive-update-cycle).
|
67
|
+
|
68
|
+
Two common patterns for using `localize()` are within `render()` to modify the component's rendering, and within `firstUpdated()` to modify a page's `document.title`.
|
69
|
+
|
64
70
|
### `localize()`
|
65
71
|
|
66
|
-
The `localize()` method is used to localize a piece of text
|
72
|
+
The `localize()` method is used to localize a piece of text.
|
67
73
|
|
68
74
|
If the localized string contains arguments, pass them as a key-value object as the 2nd parameter:
|
69
75
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "
|
3
|
+
"version": "3.0.0",
|
4
4
|
"description": "A collection of accessible, free, open-source web components for building Brightspace applications",
|
5
5
|
"type": "module",
|
6
6
|
"repository": "https://github.com/BrightspaceUI/core.git",
|
@@ -61,7 +61,7 @@
|
|
61
61
|
"rollup": "^4",
|
62
62
|
"rollup-plugin-copy": "^3",
|
63
63
|
"rollup-plugin-delete": "^2",
|
64
|
-
"sinon": "^
|
64
|
+
"sinon": "^18",
|
65
65
|
"stylelint": "^16",
|
66
66
|
"web-component-analyzer": "^2"
|
67
67
|
},
|
@@ -71,7 +71,7 @@
|
|
71
71
|
"@open-wc/dedupe-mixin": "^1",
|
72
72
|
"ifrau": "^0.41",
|
73
73
|
"intl-messageformat": "^10",
|
74
|
-
"lit": "^
|
74
|
+
"lit": "^3",
|
75
75
|
"prismjs": "^1",
|
76
76
|
"resize-observer-polyfill": "^1"
|
77
77
|
}
|