@servicetitan/culture 31.2.0 → 32.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.
- package/dist/culture.js +2 -1
- package/dist/culture.js.map +1 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/culture.js
CHANGED
package/dist/culture.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../src/culture.ts"],"sourcesContent":["export interface NumberFormatInfoData {\n CurrencyPositivePattern: string;\n CurrencyNegativePattern: string;\n CurrencySymbol: string;\n CurrencyDecimalSeparator: string;\n CurrencyGroupSeparator: string;\n CurrencyDecimalDigits: number;\n NumberDecimalSeparator: string;\n NumberGroupSeparator: string;\n NumberDecimalDigits: number;\n}\n\nexport interface DateTimeFormatInfoData {\n ShortDatePattern: string;\n LongDatePattern: string;\n ShortTimePattern: string;\n DateSeparator: string;\n}\n\nexport interface Culture {\n Name: string;\n NumberFormat: NumberFormatInfoData;\n DateTimeFormat: DateTimeFormatInfoData;\n}\n"],"names":[],"mappings":"AAmBA,WAIC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Provider, symbolToken } from '@servicetitan/react-ioc';
|
|
3
|
+
import { Culture } from './culture';
|
|
3
4
|
export const CULTURE_TOKEN = symbolToken('CULTURE_TOKEN');
|
|
4
|
-
export
|
|
5
|
-
|
|
5
|
+
export { Culture };
|
|
6
|
+
export const CultureProvider = ({ value, children })=>{
|
|
7
|
+
return /*#__PURE__*/ _jsx(Provider, {
|
|
8
|
+
singletons: value ? [
|
|
9
|
+
{
|
|
10
|
+
provide: CULTURE_TOKEN,
|
|
11
|
+
useValue: value
|
|
12
|
+
}
|
|
13
|
+
] : undefined,
|
|
14
|
+
children: children
|
|
15
|
+
});
|
|
6
16
|
};
|
|
17
|
+
|
|
7
18
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../src/index.tsx"],"sourcesContent":["import { FC, ReactNode } from 'react';\n\nimport { Provider, symbolToken } from '@servicetitan/react-ioc';\nimport { Culture } from './culture';\n\nexport const CULTURE_TOKEN = symbolToken<Culture>('CULTURE_TOKEN');\n\ninterface CultureProviderProps {\n children?: ReactNode;\n value?: Culture;\n}\n\nexport { Culture };\n\nexport const CultureProvider: FC<CultureProviderProps> = ({ value, children }) => {\n return (\n <Provider singletons={value ? [{ provide: CULTURE_TOKEN, useValue: value }] : undefined}>\n {children}\n </Provider>\n );\n};\n"],"names":["Provider","symbolToken","Culture","CULTURE_TOKEN","CultureProvider","value","children","singletons","provide","useValue","undefined"],"mappings":";AAEA,SAASA,QAAQ,EAAEC,WAAW,QAAQ,0BAA0B;AAChE,SAASC,OAAO,QAAQ,YAAY;AAEpC,OAAO,MAAMC,gBAAgBF,YAAqB,iBAAiB;AAOnE,SAASC,OAAO,GAAG;AAEnB,OAAO,MAAME,kBAA4C,CAAC,EAAEC,KAAK,EAAEC,QAAQ,EAAE;IACzE,qBACI,KAACN;QAASO,YAAYF,QAAQ;YAAC;gBAAEG,SAASL;gBAAeM,UAAUJ;YAAM;SAAE,GAAGK;kBACzEJ;;AAGb,EAAE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/culture",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "32.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://docs.st.dev/docs/frontend/culture",
|
|
6
6
|
"repository": {
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"src"
|
|
17
17
|
],
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@servicetitan/react-ioc": "^
|
|
19
|
+
"@servicetitan/react-ioc": "^31.3.2",
|
|
20
20
|
"@types/react": "~18.2.55",
|
|
21
|
-
"react": "
|
|
21
|
+
"react": "^18.2.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@servicetitan/react-ioc": ">21.0.0",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"cli": {
|
|
31
31
|
"webpack": false
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "511315cbee77cc7c60f20d0d86d24f69779c85ed"
|
|
34
34
|
}
|