@royaltics/ui 2.0.0 → 2.0.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.
package/dist/reducers/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
__reset?: boolean |
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
type ReducerDataActions<T> = Partial<T> & {
|
|
2
|
+
__reset?: boolean | Partial<T>;
|
|
3
|
+
};
|
|
5
4
|
export declare const Reducer: <T>(state: T, data: ReducerDataActions<T>) => T;
|
|
6
5
|
export {};
|
|
7
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reducers/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reducers/index.ts"],"names":[],"mappings":"AAAA,KAAK,kBAAkB,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG;IACtC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,kBAAkB,CAAC,CAAC,CAAC,KAAG,CAOlE,CAAC"}
|
package/dist/reducers/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export const Reducer = (state, data) => {
|
|
2
|
+
if (data === undefined)
|
|
3
|
+
return undefined;
|
|
4
|
+
if (data === null)
|
|
5
|
+
return null;
|
|
2
6
|
if (data.__reset) {
|
|
3
|
-
|
|
4
|
-
return typeof data.__reset === 'boolean' ? { __reset: undefined } : { ...data.__reset };
|
|
7
|
+
return typeof data.__reset === 'boolean' ? { __reset: undefined } : data.__reset;
|
|
5
8
|
}
|
|
6
9
|
return { ...state, ...data };
|
|
7
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reducers/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reducers/index.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,OAAO,GAAG,CAAI,KAAQ,EAAE,IAA2B,EAAK,EAAE;IACnE,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,SAAc,CAAC;IAC9C,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAS,CAAC;IACpC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,OAAO,OAAO,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAY,CAAC;IAC/F,CAAC;IACD,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,EAAO,CAAC;AACtC,CAAC,CAAC"}
|