@servicetitan/culture 25.8.1 → 26.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/index.d.ts CHANGED
@@ -9,8 +9,5 @@ interface CultureProviderProps {
9
9
  export { Culture };
10
10
  export declare const CultureProvider: FC<CultureProviderProps>;
11
11
  export declare const withCultureSingletons: (singletons?: Parameters<typeof provide>[0]['singletons']) => Parameters<typeof provide>[0]['singletons'];
12
- export declare const provideWithCulture: (stores: {
13
- singletons?: import("@servicetitan/react-ioc/dist/provider").ProviderConfigEntry<any>[] | undefined;
14
- instances?: import("@servicetitan/react-ioc/dist/provider").ProviderConfigEntry<any>[] | undefined;
15
- }, fallback?: JSX.Element | undefined) => <T extends import("react").StatelessComponent<any> | import("react").ClassicComponentClass<any> | import("react").ComponentClass<any, any>>(target: T) => T & import("@servicetitan/react-ioc/dist/provide").WrappedComponent<T>;
12
+ export declare const provideWithCulture: import("@servicetitan/react-ioc/dist/provide").ProvideDecorator;
16
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,OAAO,EAA4B,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAAY,OAAO,EAAwC,MAAM,yBAAyB,CAAC;AAElG,eAAO,MAAM,aAAa,wDAAwC,CAAC;AAEnE,UAAU,oBAAoB;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,OAAO,EAAE,OAAO,EAAE,CAAC;AAEnB,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAWpD,CAAC;AAEF,eAAO,MAAM,qBAAqB,gBACjB,WAAW,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,KACzD,WAAW,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAsD,CAAC;AAEpG,eAAO,MAAM,kBAAkB;;;0QAWP,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,OAAO,EAA4B,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAAY,OAAO,EAAwC,MAAM,yBAAyB,CAAC;AAElG,eAAO,MAAM,aAAa,wDAAwC,CAAC;AAEnE,UAAU,oBAAoB;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,OAAO,EAAE,OAAO,EAAE,CAAC;AAEnB,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAWpD,CAAC;AAEF,eAAO,MAAM,qBAAqB,gBACjB,WAAW,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,KACzD,WAAW,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAsD,CAAC;AAEpG,eAAO,MAAM,kBAAkB,iEAWP,CAAC"}
package/dist/index.js CHANGED
@@ -8,5 +8,5 @@ export const CultureProvider = ({ value, children }) => {
8
8
  return (_jsx(Provider, Object.assign({ singletons: culture ? [{ provide: CULTURE_TOKEN, useValue: culture }] : undefined }, { children: children })));
9
9
  };
10
10
  export const withCultureSingletons = (singletons) => [...(singletons !== null && singletons !== void 0 ? singletons : []), CultureApi, CultureStore];
11
- export const provideWithCulture = ((stores, fallback) => (Component) => props => (_jsx(Provider, Object.assign({ singletons: withCultureSingletons(stores === null || stores === void 0 ? void 0 : stores.singletons), instances: stores === null || stores === void 0 ? void 0 : stores.instances, fallback: fallback }, { children: _jsx(CultureProvider, { children: _jsx(Component, Object.assign({}, props)) }) }))));
11
+ export const provideWithCulture = ((stores, options) => (Component) => props => (_jsx(Provider, Object.assign({ singletons: withCultureSingletons(stores === null || stores === void 0 ? void 0 : stores.singletons), instances: stores === null || stores === void 0 ? void 0 : stores.instances }, options, { children: _jsx(CultureProvider, { children: _jsx(Component, Object.assign({}, props)) }) }))));
12
12
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAW,YAAY,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAAE,QAAQ,EAAW,WAAW,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElG,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAU,eAAe,CAAC,CAAC;AASnE,MAAM,CAAC,MAAM,eAAe,GAA6B,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7E,MAAM,CAAC,KAAK,CAAC,GAAG,uBAAuB,CAAC,YAAY,CAAC,CAAC;IACtD,MAAM,OAAO,GAAG,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,CAAC;IAExC,OAAO,CACH,KAAC,QAAQ,kBACL,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,gBAEhF,QAAQ,IACF,CACd,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACjC,UAAwD,EACb,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,EAAE,CAAC,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;AAEpG,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE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E,UAAU,EAAE,YAAY,CAAC,CAAC;AAEpG,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,SAAwB,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAC1F,CACI,KAAC,QAAQ,kBACL,UAAU,EAAE,qBAAqB,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,CAAC,EACrD,SAAS,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,IACxB,OAAO,cAEX,KAAC,eAAe,cACZ,KAAC,SAAS,oBAAK,KAAK,EAAI,GACV,IACX,CACd,CAAmB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/culture",
3
- "version": "25.8.1",
3
+ "version": "26.0.0",
4
4
  "description": "",
5
5
  "homepage": "https://docs.st.dev/docs/frontend/culture",
6
6
  "repository": {
@@ -19,13 +19,13 @@
19
19
  "@servicetitan/application-data": ">1.0.0"
20
20
  },
21
21
  "devDependencies": {
22
- "@servicetitan/react-ioc": "^21.6.0",
23
- "@types/react": "~17.0.38",
24
- "react": "~17.0.2"
22
+ "@servicetitan/react-ioc": "^23.2.1",
23
+ "@types/react": "~18.2.55",
24
+ "react": "~18.2.0"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "@servicetitan/react-ioc": ">21.0.0",
28
- "react": "~17.0.2"
28
+ "react": ">=17.0.2"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"
@@ -33,5 +33,5 @@
33
33
  "cli": {
34
34
  "webpack": false
35
35
  },
36
- "gitHead": "7ff86e7a40bab18082b6d972addbab9f4b2ff88c"
36
+ "gitHead": "2027b0cb3bb4a06b8e381e3e9af8469a30b20f11"
37
37
  }
package/src/index.tsx CHANGED
@@ -29,12 +29,12 @@ export const withCultureSingletons = (
29
29
  singletons?: Parameters<typeof provide>[0]['singletons']
30
30
  ): Parameters<typeof provide>[0]['singletons'] => [...(singletons ?? []), CultureApi, CultureStore];
31
31
 
32
- export const provideWithCulture = ((stores, fallback) => (Component: ComponentType) => props =>
32
+ export const provideWithCulture = ((stores, options) => (Component: ComponentType) => props =>
33
33
  (
34
34
  <Provider
35
35
  singletons={withCultureSingletons(stores?.singletons)}
36
36
  instances={stores?.instances}
37
- fallback={fallback}
37
+ {...options}
38
38
  >
39
39
  <CultureProvider>
40
40
  <Component {...props} />