@stenajs-webui/grid 15.0.2 → 15.2.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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
# v15.1.0 (Fri Feb 25 2022)
|
|
2
|
+
|
|
3
|
+
#### 🚀 Enhancement
|
|
4
|
+
|
|
5
|
+
- Support initial state in reducer factories [#437](https://github.com/StenaIT/stenajs-webui/pull/437) ([@mattias800](https://github.com/mattias800))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Mattias Andersson ([@mattias800](https://github.com/mattias800))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# v15.0.3 (Fri Feb 25 2022)
|
|
14
|
+
|
|
15
|
+
#### 🔩 Dependency Updates
|
|
16
|
+
|
|
17
|
+
- Fix missing peer dependencies [#431](https://github.com/StenaIT/stenajs-webui/pull/431) ([@lindskogen](https://github.com/lindskogen))
|
|
18
|
+
|
|
19
|
+
#### Authors: 1
|
|
20
|
+
|
|
21
|
+
- Johan Lindskogen ([@lindskogen](https://github.com/lindskogen))
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
1
25
|
# v15.0.1 (Thu Feb 17 2022)
|
|
2
26
|
|
|
3
27
|
#### ⚠️ Pushed to `master`
|
|
@@ -12,4 +12,4 @@ export interface StandardTableStateFields {
|
|
|
12
12
|
}
|
|
13
13
|
export declare const createStandardTableInitialState: <TColumnKey extends string>(sortBy?: TColumnKey | undefined, desc?: boolean, selectedIds?: string[], expandedRows?: string[]) => StandardTableState<TColumnKey>;
|
|
14
14
|
export declare type StandardTableReducer<TColumnKey extends string> = Reducer<StandardTableState<TColumnKey>, StandardTableAction<TColumnKey>>;
|
|
15
|
-
export declare const createStandardTableReducer: <TColumnKey extends string>(reducerId: string) => StandardTableReducer<TColumnKey>;
|
|
15
|
+
export declare const createStandardTableReducer: <TColumnKey extends string>(reducerId: string, initialState?: Partial<StandardTableState<TColumnKey>> | undefined) => StandardTableReducer<TColumnKey>;
|
package/dist/index.es.js
CHANGED
|
@@ -756,11 +756,12 @@ var createStandardTableInitialState = function (sortBy, desc, selectedIds, expan
|
|
|
756
756
|
fields: { lastSelectedId: undefined },
|
|
757
757
|
});
|
|
758
758
|
};
|
|
759
|
-
var createStandardTableReducer = function (reducerId) {
|
|
760
|
-
var
|
|
761
|
-
var
|
|
762
|
-
var
|
|
763
|
-
var
|
|
759
|
+
var createStandardTableReducer = function (reducerId, initialState) {
|
|
760
|
+
var _a;
|
|
761
|
+
var sortOrder = reducerIdGate(getReducerIdFor(reducerId, "sortOrder"), createSortOrderReducer(initialState === null || initialState === void 0 ? void 0 : initialState.sortOrder));
|
|
762
|
+
var selectedIds = reducerIdGate(getReducerIdFor(reducerId, "selectedIds"), createSelectedIdsReducer(initialState === null || initialState === void 0 ? void 0 : initialState.selectedIds));
|
|
763
|
+
var expandedRows = reducerIdGate(getReducerIdFor(reducerId, "expandedRows"), createSelectedIdsReducer(initialState === null || initialState === void 0 ? void 0 : initialState.expandedRows));
|
|
764
|
+
var fields = reducerIdGate(getReducerIdFor(reducerId, "fields"), createEntityReducer((_a = initialState === null || initialState === void 0 ? void 0 : initialState.fields) !== null && _a !== void 0 ? _a : {}));
|
|
764
765
|
return combineReducers({
|
|
765
766
|
sortOrder: sortOrder,
|
|
766
767
|
selectedIds: selectedIds,
|