@servicetitan/docs-anvil-uikit-contrib 28.2.0 → 28.3.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.
- package/docs/culture.mdx +1 -21
- package/package.json +2 -2
package/docs/culture.mdx
CHANGED
|
@@ -41,22 +41,6 @@ const DisplayCulture: React.FC = () => {
|
|
|
41
41
|
};
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
## Automatic provide
|
|
45
|
-
|
|
46
|
-
Could be used in MFEs to automatically fetch culture settings. Uses CultureStore from `@servicetitan/application-data/culture` package
|
|
47
|
-
|
|
48
|
-
```tsx
|
|
49
|
-
import React from 'react';
|
|
50
|
-
import { useDependencies } from '@servicetitan/react-ioc';
|
|
51
|
-
import { CULTURE_TOKEN, provideWithCulture } from '@servicetitan/culture';
|
|
52
|
-
|
|
53
|
-
const App: React.FC = provideWithCulture()(() => {
|
|
54
|
-
const [culture] = useDependencies(CULTURE_TOKEN);
|
|
55
|
-
|
|
56
|
-
return <span>{culture.Name}</span>;
|
|
57
|
-
});
|
|
58
|
-
```
|
|
59
|
-
|
|
60
44
|
## Package contents
|
|
61
45
|
|
|
62
46
|
### CultureProvider
|
|
@@ -71,11 +55,7 @@ React Component that passes culture settings to `@servicetitan/react-ioc` contai
|
|
|
71
55
|
|
|
72
56
|
### Culture
|
|
73
57
|
|
|
74
|
-
TS interface of culture settings.
|
|
75
|
-
|
|
76
|
-
### provideWithCulture
|
|
77
|
-
|
|
78
|
-
Helper for automatic culture initialization. It adds CultureStore, initialize it and wraps content by CultureProvider. Has the same interface as `provide` from `@servicetitan/react-ioc`.
|
|
58
|
+
TS interface of culture settings.
|
|
79
59
|
|
|
80
60
|
### CULTURE_TOKEN
|
|
81
61
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/docs-anvil-uikit-contrib",
|
|
3
|
-
"version": "28.
|
|
3
|
+
"version": "28.3.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"cli": {
|
|
17
17
|
"webpack": false
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "dc2d7e7f275d0188136d2dc0036bf831f8a71809"
|
|
20
20
|
}
|