@evlop/commons 1.0.258 → 1.0.259
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 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/reducers/pages/index.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/reducers/pages/index.tsx"],"names":[],"mappings":"AAiBA,QAAA,MAAM,KAAK;yBAA2C,GAAG;;CAwLxD,CAAC;AAIF,eAAe,KAAK,CAAC"}
|
@@ -16,6 +16,7 @@ const REST_QUERY_PAGE_FAILED = "REST_QUERY_PAGE_FAILED";
|
|
16
16
|
const PAGE_BLOCKS_UPDATED = "PAGE_BLOCKS_UPDATED";
|
17
17
|
const PAGE_DATA_UPDATED = "PAGE_DATA_UPDATED";
|
18
18
|
const PAGE_CREATED = "PAGE_CREATED";
|
19
|
+
const PAGES_UPDATED = "PAGES_UPDATED";
|
19
20
|
const initialState = initialState_1.default;
|
20
21
|
const pages = function (state = initialState, action) {
|
21
22
|
switch (action.type) {
|
@@ -66,6 +67,29 @@ const pages = function (state = initialState, action) {
|
|
66
67
|
isLoading: state.isLoading - 1,
|
67
68
|
};
|
68
69
|
}
|
70
|
+
case PAGES_UPDATED: {
|
71
|
+
const { collection: existingCollection = {}, records: existingRecords = {} } = state;
|
72
|
+
const pagesById = lodash_1.keyBy(existingRecords?.data, 'id');
|
73
|
+
lodash_1.forEach(action.pages, (page) => {
|
74
|
+
if (pagesById[page.id]) {
|
75
|
+
pagesById[page.id] = lodash_1.assign({}, pagesById[page.id], page);
|
76
|
+
}
|
77
|
+
else {
|
78
|
+
pagesById[page.id] = page;
|
79
|
+
}
|
80
|
+
});
|
81
|
+
return {
|
82
|
+
...state,
|
83
|
+
collection: {
|
84
|
+
...existingCollection,
|
85
|
+
...pagesById,
|
86
|
+
},
|
87
|
+
records: {
|
88
|
+
...existingRecords,
|
89
|
+
data: lodash_1.values(pagesById),
|
90
|
+
},
|
91
|
+
};
|
92
|
+
}
|
69
93
|
case REST_DELETE_PAGE_SUCCESS: {
|
70
94
|
const { [action.identifier]: oldRecordState = {}, collection = {} } = state;
|
71
95
|
const { data: oldData = [] } = oldRecordState;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/reducers/pages/index.tsx"],"names":[],"mappings":";;;;;AAAA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/reducers/pages/index.tsx"],"names":[],"mappings":";;;;;AAAA,mCAAwD;AACxD,kEAA+C;AAE/C,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAC1D,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AACxD,MAAM,yBAAyB,GAAG,2BAA2B,CAAC;AAC9D,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAC1D,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AACxD,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAClD,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAC9C,MAAM,YAAY,GAAG,cAAc,CAAC;AACpC,MAAM,aAAa,GAAG,eAAe,CAAC;AAEtC,MAAM,YAAY,GAAO,sBAAiB,CAAA;AAC1C,MAAM,KAAK,GAAG,UAAU,KAAK,GAAG,YAAY,EAAE,MAAW;IACjD,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,sBAAsB,CAAC;QAC5B,KAAK,uBAAuB,CAAC,CAAC;YAC1B,MAAM,EAAC,IAAI,EAAE,GAAG,QAAQ,EAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;YAC5C,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CA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