@lomray/react-mobx-manager 3.5.0-beta.1 → 3.5.1
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/make-exported.js +1 -1
- package/make-exported.js.map +1 -1
- package/package.json +2 -2
- package/types.d.ts +1 -1
package/make-exported.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e="libExported",
|
|
1
|
+
const e="libExported",o=(o,t,i=!0)=>{o[e]={...i?o?.[e]??{}:{},...t}},t=(o,t)=>"observable"===o?.[e]?.[t],i=(o,t)=>"simple"===o?.[e]?.[t],l=(o,t,i=!1)=>"excluded"===o?.[e]?.[t]||!i&&(e=>e?.libStorageOptions?.isNotExported||!1)(o);export{l as isPropExcludedFromExport,t as isPropObservableExported,i as isPropSimpleExported,o as makeExported};
|
|
2
2
|
//# sourceMappingURL=make-exported.js.map
|
package/make-exported.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"make-exported.js","sources":["../src/make-exported.ts"],"sourcesContent":["import type { TAnyStore } from '@src/types';\n\nconst exportedPropName = 'libExported';\n\n/**\n * Make store props exported for Manager.toJSON\n * @see Manager.toJSON\n */\nconst makeExported = <T extends object>(\n store: T,\n props: {\n [P in Exclude<keyof T, 'toString'>]?: 'observable' | 'simple' | 'excluded';\n },\n shouldExtend = true,\n): void => {\n store[exportedPropName] = { ...(shouldExtend ? store?.[exportedPropName] ?? {} : {}), ...props };\n};\n\n/**\n * Excluded in persistStore level\n * @see IPersistOptions\n */\nconst isPropExcludedInPersist = (store: TAnyStore): boolean => {\n return store?.['libStorageOptions']?.
|
|
1
|
+
{"version":3,"file":"make-exported.js","sources":["../src/make-exported.ts"],"sourcesContent":["import type { TAnyStore } from '@src/types';\n\nconst exportedPropName = 'libExported';\n\n/**\n * Make store props exported for Manager.toJSON\n * @see Manager.toJSON\n */\nconst makeExported = <T extends object>(\n store: T,\n props: {\n [P in Exclude<keyof T, 'toString'>]?: 'observable' | 'simple' | 'excluded';\n },\n shouldExtend = true,\n): void => {\n store[exportedPropName] = { ...(shouldExtend ? store?.[exportedPropName] ?? {} : {}), ...props };\n};\n\n/**\n * Excluded in persistStore level\n * @see IPersistOptions\n */\nconst isPropExcludedInPersist = (store: TAnyStore): boolean => {\n return store?.['libStorageOptions']?.isNotExported || false;\n};\n\n/**\n * Check if store prop is observable exported\n */\nconst isPropObservableExported = (store: TAnyStore, prop: string): boolean =>\n store?.[exportedPropName]?.[prop] === 'observable';\n\n/**\n * Check if store prop is simple exported\n */\nconst isPropSimpleExported = (store: TAnyStore, prop: string): boolean =>\n store?.[exportedPropName]?.[prop] === 'simple';\n\n/**\n * Check if store prop is excluded from export\n */\nconst isPropExcludedFromExport = (\n store: TAnyStore,\n prop: string,\n withNotExported = false,\n): boolean =>\n store?.[exportedPropName]?.[prop] === 'excluded' ||\n (!withNotExported && isPropExcludedInPersist(store));\n\nexport { makeExported, isPropObservableExported, isPropSimpleExported, isPropExcludedFromExport };\n"],"names":["exportedPropName","makeExported","store","props","shouldExtend","isPropObservableExported","prop","isPropSimpleExported","isPropExcludedFromExport","withNotExported","isNotExported","isPropExcludedInPersist"],"mappings":"AAEA,MAAMA,EAAmB,cAMnBC,EAAe,CACnBC,EACAC,EAGAC,GAAe,KAEfF,EAAMF,GAAoB,IAAMI,EAAeF,IAAQF,IAAqB,CAAE,EAAG,MAAQG,EAAO,EAc5FE,EAA2B,CAACH,EAAkBI,IACZ,eAAtCJ,IAAQF,KAAoBM,GAKxBC,EAAuB,CAACL,EAAkBI,IACR,WAAtCJ,IAAQF,KAAoBM,GAKxBE,EAA2B,CAC/BN,EACAI,EACAG,GAAkB,IAEoB,aAAtCP,IAAQF,KAAoBM,KAC1BG,GAzB4B,CAACP,GACxBA,GAA2B,mBAAGQ,gBAAiB,EAwBjCC,CAAwBT"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lomray/react-mobx-manager",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"description": "This package provides Mobx stores manager for react.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/Lomray-Software/react-mobx-manager"
|
|
9
|
+
"url": "git+https://github.com/Lomray-Software/react-mobx-manager.git"
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
12
12
|
"react",
|
package/types.d.ts
CHANGED
|
@@ -127,6 +127,6 @@ interface IPersistOptions {
|
|
|
127
127
|
attributes?: {
|
|
128
128
|
[storageId: string]: string[];
|
|
129
129
|
};
|
|
130
|
-
|
|
130
|
+
isNotExported?: boolean;
|
|
131
131
|
}
|
|
132
132
|
export { IWindowManager, IConstructorParams, IStoreLifecycle, IStore, IStorePersisted, TInitStore, IConstructableStore, IStoreConfig, TStoreDefinition, TMapStores, IManagerParams, TWakeup, IStorage, IManagerOptions, TAnyStore, TStores, ClassReturnType, StoresType, IStoreParams, IWithStoreOptions, IMobxManagerEvents, IGroupedStores, IPersistOptions };
|