@elliemae/ds-zustand-helpers 3.22.0-next.21 → 3.22.0-next.23
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/withZustand.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable indent */\nimport React from 'react';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { useInternalStoreCreator } from './useInternalStoreCreator.js';\nimport type { ZustandT } from './types.js';\nimport { AutoUpdaterComponent } from './AutoUpdaterComponent.js';\nimport { usePropsStoreCreator } from './usePropsStoreCreator.js';\n\nconst noopish = <T extends object>() => ({} as T
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkDb;AAhDV,8BAA6C;AAC7C,qCAAwC;AAExC,kCAAqC;AACrC,kCAAqC;AAErC,MAAM,UAAU,OAAyB,CAAC;AAEnC,MAAM,cAAc,CAQzB,WACA,WACG;AACH,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable indent */\nimport React from 'react';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { useInternalStoreCreator } from './useInternalStoreCreator.js';\nimport type { ZustandT } from './types.js';\nimport { AutoUpdaterComponent } from './AutoUpdaterComponent.js';\nimport { usePropsStoreCreator } from './usePropsStoreCreator.js';\n\nconst noopish = <T extends object>() => ({}) as T;\n\nexport const withZustand = <\n U extends object,\n P extends object,\n A extends object,\n C extends object,\n S extends object,\n R extends object,\n>(\n Component: React.ComponentType<Record<string, never>>,\n config: ZustandT.Config<P, A, C, S, R>,\n) => {\n const {\n defaultProps,\n internalAtomDefaultValues,\n useAutoCalculated,\n selectors = noopish,\n reducers = noopish,\n subscribers = noopish,\n PropsProvider,\n InternalProvider,\n usePropsStore,\n } = config;\n\n const ComponentWithStore: React.ComponentType<U> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<P>(props, defaultProps);\n\n const autoCalculatedData = useAutoCalculated(propsWithDefault);\n\n const internalStoreCreator = useInternalStoreCreator({\n internalAtomDefaultValues,\n selectors,\n reducers,\n subscribers,\n });\n\n const propsStoreCreator = usePropsStoreCreator(propsWithDefault, autoCalculatedData);\n\n return (\n <PropsProvider createStore={propsStoreCreator}>\n <InternalProvider createStore={internalStoreCreator}>\n <AutoUpdaterComponent\n Component={Component}\n usePropsStore={usePropsStore}\n autoCalculatedData={autoCalculatedData}\n propsWithDefault={propsWithDefault}\n />\n </InternalProvider>\n </PropsProvider>\n );\n };\n return ComponentWithStore;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkDb;AAhDV,8BAA6C;AAC7C,qCAAwC;AAExC,kCAAqC;AACrC,kCAAqC;AAErC,MAAM,UAAU,OAAyB,CAAC;AAEnC,MAAM,cAAc,CAQzB,WACA,WACG;AACH,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,qBAA6C,CAAC,UAAU;AAC5D,UAAM,uBAAmB,sDAAgC,OAAO,YAAY;AAE5E,UAAM,qBAAqB,kBAAkB,gBAAgB;AAE7D,UAAM,2BAAuB,wDAAwB;AAAA,MACnD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAED,UAAM,wBAAoB,kDAAqB,kBAAkB,kBAAkB;AAEnF,WACE,4CAAC,iBAAc,aAAa,mBAC1B,sDAAC,oBAAiB,aAAa,sBAC7B;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF,GACF,GACF;AAAA,EAEJ;AACA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/withZustand.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport React from 'react';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { useInternalStoreCreator } from './useInternalStoreCreator.js';\nimport type { ZustandT } from './types.js';\nimport { AutoUpdaterComponent } from './AutoUpdaterComponent.js';\nimport { usePropsStoreCreator } from './usePropsStoreCreator.js';\n\nconst noopish = <T extends object>() => ({} as T
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACkDb;AAhDV,SAAS,oCAAoC;AAC7C,SAAS,+BAA+B;AAExC,SAAS,4BAA4B;AACrC,SAAS,4BAA4B;AAErC,MAAM,UAAU,OAAyB,CAAC;AAEnC,MAAM,cAAc,CAQzB,WACA,WACG;AACH,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport React from 'react';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { useInternalStoreCreator } from './useInternalStoreCreator.js';\nimport type { ZustandT } from './types.js';\nimport { AutoUpdaterComponent } from './AutoUpdaterComponent.js';\nimport { usePropsStoreCreator } from './usePropsStoreCreator.js';\n\nconst noopish = <T extends object>() => ({}) as T;\n\nexport const withZustand = <\n U extends object,\n P extends object,\n A extends object,\n C extends object,\n S extends object,\n R extends object,\n>(\n Component: React.ComponentType<Record<string, never>>,\n config: ZustandT.Config<P, A, C, S, R>,\n) => {\n const {\n defaultProps,\n internalAtomDefaultValues,\n useAutoCalculated,\n selectors = noopish,\n reducers = noopish,\n subscribers = noopish,\n PropsProvider,\n InternalProvider,\n usePropsStore,\n } = config;\n\n const ComponentWithStore: React.ComponentType<U> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<P>(props, defaultProps);\n\n const autoCalculatedData = useAutoCalculated(propsWithDefault);\n\n const internalStoreCreator = useInternalStoreCreator({\n internalAtomDefaultValues,\n selectors,\n reducers,\n subscribers,\n });\n\n const propsStoreCreator = usePropsStoreCreator(propsWithDefault, autoCalculatedData);\n\n return (\n <PropsProvider createStore={propsStoreCreator}>\n <InternalProvider createStore={internalStoreCreator}>\n <AutoUpdaterComponent\n Component={Component}\n usePropsStore={usePropsStore}\n autoCalculatedData={autoCalculatedData}\n propsWithDefault={propsWithDefault}\n />\n </InternalProvider>\n </PropsProvider>\n );\n };\n return ComponentWithStore;\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACkDb;AAhDV,SAAS,oCAAoC;AAC7C,SAAS,+BAA+B;AAExC,SAAS,4BAA4B;AACrC,SAAS,4BAA4B;AAErC,MAAM,UAAU,OAAyB,CAAC;AAEnC,MAAM,cAAc,CAQzB,WACA,WACG;AACH,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,qBAA6C,CAAC,UAAU;AAC5D,UAAM,mBAAmB,6BAAgC,OAAO,YAAY;AAE5E,UAAM,qBAAqB,kBAAkB,gBAAgB;AAE7D,UAAM,uBAAuB,wBAAwB;AAAA,MACnD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAED,UAAM,oBAAoB,qBAAqB,kBAAkB,kBAAkB;AAEnF,WACE,oBAAC,iBAAc,aAAa,mBAC1B,8BAAC,oBAAiB,aAAa,sBAC7B;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF,GACF,GACF;AAAA,EAEJ;AACA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ZustandT } from './types.js';
|
|
3
|
-
export declare const withZustand: <U extends object, P extends object, A extends object, C extends object, S extends object, R extends object>(Component: React.ComponentType<Record<string, never>>, config: ZustandT.Config<P, A, C, S, R>) =>
|
|
3
|
+
export declare const withZustand: <U extends object, P extends object, A extends object, C extends object, S extends object, R extends object>(Component: React.ComponentType<Record<string, never>>, config: ZustandT.Config<P, A, C, S, R>) => React.FunctionComponent<U>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-zustand-helpers",
|
|
3
|
-
"version": "3.22.0-next.
|
|
3
|
+
"version": "3.22.0-next.23",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Zustand Helpers",
|
|
6
6
|
"files": [
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"immer": "9.0.21",
|
|
43
43
|
"zustand": "4.3.6",
|
|
44
|
-
"@elliemae/ds-props-helpers": "3.22.0-next.
|
|
44
|
+
"@elliemae/ds-props-helpers": "3.22.0-next.23"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@elliemae/pui-cli": "~9.0.0-next.22",
|
|
48
|
-
"@elliemae/ds-monorepo-devops": "3.22.0-next.
|
|
48
|
+
"@elliemae/ds-monorepo-devops": "3.22.0-next.23"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"react": "~17.0.2",
|