@push.rocks/smartstate 2.0.14 → 2.0.16
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_bundle/bundle.js +7 -6
- package/dist_bundle/bundle.js.map +2 -2
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/smartstate.classes.smartstate.js +2 -1
- package/dist_ts/smartstate.classes.statepart.d.ts +3 -2
- package/dist_ts/smartstate.classes.statepart.js +7 -7
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/smartstate.classes.smartstate.ts +1 -0
- package/ts/smartstate.classes.statepart.ts +7 -6
- package/dist_ts/smartstate.classes.statecollection.d.ts +0 -8
- package/dist_ts/smartstate.classes.statecollection.js +0 -15
- package/dist_ts/smartstate.classes.stateobservable.d.ts +0 -10
- package/dist_ts/smartstate.classes.stateobservable.js +0 -15
package/dist_bundle/bundle.js
CHANGED
|
@@ -11062,21 +11062,21 @@ var StateAction = class {
|
|
|
11062
11062
|
// ts/smartstate.classes.statepart.ts
|
|
11063
11063
|
var StatePart2 = class {
|
|
11064
11064
|
// Add WebStore instance
|
|
11065
|
-
constructor(nameArg,
|
|
11065
|
+
constructor(nameArg, webStoreOptionsArg) {
|
|
11066
11066
|
this.state = new dist_ts_exports7.rxjs.Subject();
|
|
11067
11067
|
this.cumulativeDeferred = dist_ts_exports6.cumulativeDefer();
|
|
11068
11068
|
this.webStore = null;
|
|
11069
11069
|
this.name = nameArg;
|
|
11070
|
-
if (
|
|
11071
|
-
this.
|
|
11072
|
-
this.initWebStore();
|
|
11070
|
+
if (webStoreOptionsArg) {
|
|
11071
|
+
this.webStoreOptions = webStoreOptionsArg;
|
|
11073
11072
|
}
|
|
11074
11073
|
}
|
|
11075
11074
|
/**
|
|
11076
11075
|
* initializes the webstore
|
|
11077
11076
|
*/
|
|
11078
|
-
async
|
|
11079
|
-
if (this.
|
|
11077
|
+
async init() {
|
|
11078
|
+
if (this.webStoreOptions) {
|
|
11079
|
+
this.webStore = new dist_ts_exports13.WebStore(this.webStoreOptions);
|
|
11080
11080
|
await this.webStore.init();
|
|
11081
11081
|
const storedState = await this.webStore.get(String(this.name));
|
|
11082
11082
|
if (storedState) {
|
|
@@ -11225,6 +11225,7 @@ var Smartstate = class {
|
|
|
11225
11225
|
storeName: statePartName
|
|
11226
11226
|
} : null
|
|
11227
11227
|
);
|
|
11228
|
+
await newState.init();
|
|
11228
11229
|
const currentState = newState.getState();
|
|
11229
11230
|
await newState.setState({
|
|
11230
11231
|
...initialPayloadArg,
|