@fluid-topics/ft-wc-utils 1.2.27 → 1.2.29

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.
@@ -32,9 +32,9 @@ export class FtReduxStore extends WithEventBus {
32
32
  return reduxSlice.reducer(state, action);
33
33
  }
34
34
  });
35
- return window.ftReduxStores[options.name] = new FtReduxStore(reduxSlice, reduxStore);
35
+ return window.ftReduxStores[options.name] = new FtReduxStore(reduxSlice, reduxStore, options.eventBus);
36
36
  }
37
- constructor(reduxSlice, reduxStore) {
37
+ constructor(reduxSlice, reduxStore, eventBus) {
38
38
  super();
39
39
  this.reduxSlice = reduxSlice;
40
40
  this.reduxStore = reduxStore;
@@ -60,6 +60,7 @@ export class FtReduxStore extends WithEventBus {
60
60
  }
61
61
  }
62
62
  });
63
+ this.eventBus = eventBus !== null && eventBus !== void 0 ? eventBus : this.eventBus;
63
64
  }
64
65
  clear() {
65
66
  this.reduxStore.dispatch({ type: "CLEAR_FT_REDUX_STORE" });
@@ -33,6 +33,7 @@ export interface FtCreateReduxStoreOptions<State = any, CR extends SliceCaseRedu
33
33
  initialState: State;
34
34
  reducers?: ValidateSliceCaseReducers<State, CR>;
35
35
  extraReducers?: CreateSliceOptions<State>["extraReducers"];
36
+ eventBus?: EventTarget;
36
37
  }
37
38
  export type FtReduxStoreActions<A, State = any> = A | DefaultValueSetterAction<State> | DefaultClearStoreAction;
38
39
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-wc-utils",
3
- "version": "1.2.27",
3
+ "version": "1.2.29",
4
4
  "description": "Internal web components tools",
5
5
  "author": "Fluid Topics <devtopics@antidot.net>",
6
6
  "license": "ISC",
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "@floating-ui/dom": "1.5.3",
17
17
  "@fluid-topics/design-system-variables": "0.1.8",
18
- "@fluid-topics/public-api": "1.0.82",
18
+ "@fluid-topics/public-api": "1.0.87",
19
19
  "@reduxjs/toolkit": "1.9.5",
20
20
  "@types/mark.js": "8.11.12",
21
21
  "@webcomponents/scoped-custom-element-registry": "0.0.9",
@@ -24,5 +24,5 @@
24
24
  "mark.js": "8.11.1",
25
25
  "moment": "2.29.4"
26
26
  },
27
- "gitHead": "69700a881ad4113b340ef0e6c44807e3d7c579ee"
27
+ "gitHead": "245caf9b8a13c25cd1caca091ed037aabc2846ab"
28
28
  }