@deephaven/redux 0.75.1-beta.0 → 0.75.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.
|
@@ -3,7 +3,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
4
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
5
5
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
|
-
import deepEqual from 'deep-equal';
|
|
6
|
+
import deepEqual from 'fast-deep-equal';
|
|
7
7
|
/**
|
|
8
8
|
* Setup a replace reducer for a specific action type.
|
|
9
9
|
* Will take the payload passed in and replace the entity at the id with the payload
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replaceByIdReducer.js","names":["deepEqual","replaceByIdReducer","type","initialState","arguments","length","undefined","checkIfChanged","state","action","id","payload","_objectSpread"],"sources":["../../../src/reducers/common/replaceByIdReducer.ts"],"sourcesContent":["import deepEqual from 'deep-equal';\nimport type { Reducer } from 'redux';\n\n/**\n * Setup a replace reducer for a specific action type.\n * Will take the payload passed in and replace the entity at the id with the payload\n * @param type The action type\n */\nexport default function replaceByIdReducer<S extends Record<string, unknown>>(\n type: string,\n initialState: S = {} as never,\n checkIfChanged = true\n): Reducer<S> {\n return (state = initialState, action?) => {\n switch (action.type) {\n case type: {\n const { id, payload } = action;\n if (checkIfChanged && deepEqual({ payload }, { payload: state[id] })) {\n return state;\n }\n return {\n ...state,\n [id]: payload,\n };\n }\n default:\n return state;\n }\n };\n}\n"],"mappings":";;;;;AAAA,OAAOA,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"replaceByIdReducer.js","names":["deepEqual","replaceByIdReducer","type","initialState","arguments","length","undefined","checkIfChanged","state","action","id","payload","_objectSpread"],"sources":["../../../src/reducers/common/replaceByIdReducer.ts"],"sourcesContent":["import deepEqual from 'fast-deep-equal';\nimport type { Reducer } from 'redux';\n\n/**\n * Setup a replace reducer for a specific action type.\n * Will take the payload passed in and replace the entity at the id with the payload\n * @param type The action type\n */\nexport default function replaceByIdReducer<S extends Record<string, unknown>>(\n type: string,\n initialState: S = {} as never,\n checkIfChanged = true\n): Reducer<S> {\n return (state = initialState, action?) => {\n switch (action.type) {\n case type: {\n const { id, payload } = action;\n if (checkIfChanged && deepEqual({ payload }, { payload: state[id] })) {\n return state;\n }\n return {\n ...state,\n [id]: payload,\n };\n }\n default:\n return state;\n }\n };\n}\n"],"mappings":";;;;;AAAA,OAAOA,SAAS,MAAM,iBAAiB;AAGvC;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,kBAAkBA,CACxCC,IAAY,EAGA;EAAA,IAFZC,YAAe,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAAA,IACpBG,cAAc,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAErB,OAAO,YAAmC;IAAA,IAAlCI,KAAK,GAAAJ,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGD,YAAY;IAAA,IAAEM,MAAO,GAAAL,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;IACnC,QAAQG,MAAM,CAACP,IAAI;MACjB,KAAKA,IAAI;QAAE;UACT,IAAM;YAAEQ,EAAE;YAAEC;UAAQ,CAAC,GAAGF,MAAM;UAC9B,IAAIF,cAAc,IAAIP,SAAS,CAAC;YAAEW;UAAQ,CAAC,EAAE;YAAEA,OAAO,EAAEH,KAAK,CAACE,EAAE;UAAE,CAAC,CAAC,EAAE;YACpE,OAAOF,KAAK;UACd;UACA,OAAAI,aAAA,CAAAA,aAAA,KACKJ,KAAK;YACR,CAACE,EAAE,GAAGC;UAAO;QAEjB;MACA;QACE,OAAOH,KAAK;IAChB;EACF,CAAC;AACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/redux",
|
|
3
|
-
"version": "0.75.1
|
|
3
|
+
"version": "0.75.1",
|
|
4
4
|
"description": "Deephaven Redux",
|
|
5
5
|
"author": "Deephaven Data Labs LLC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@deephaven/jsapi-types": "1.0.0-dev0.34.0",
|
|
26
|
-
"@deephaven/jsapi-utils": "^0.75.
|
|
27
|
-
"@deephaven/log": "^0.75.
|
|
28
|
-
"@deephaven/plugin": "^0.75.1
|
|
29
|
-
"deep-equal": "^
|
|
26
|
+
"@deephaven/jsapi-utils": "^0.75.0",
|
|
27
|
+
"@deephaven/log": "^0.75.0",
|
|
28
|
+
"@deephaven/plugin": "^0.75.1",
|
|
29
|
+
"fast-deep-equal": "^3.1.3",
|
|
30
30
|
"redux-thunk": "2.4.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "2d12ea3d13a2c304246bc61cff81c2c23465361f"
|
|
43
43
|
}
|