@zat-design/sisyphus-react 3.7.3-beta.1 → 3.7.3-beta.2
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.
| @@ -5,7 +5,7 @@ interface EnumRes { | |
| 5 5 | 
             
                [key: string]: any;
         | 
| 6 6 | 
             
            }
         | 
| 7 7 | 
             
            export declare function getEnumData(storage: StorageType, cacheKey: string, baseEnumStorage?: any): EnumRes;
         | 
| 8 | 
            -
            export declare function setEnumData(storage: StorageType, cacheKey: string, data:  | 
| 8 | 
            +
            export declare function setEnumData(storage: StorageType, cacheKey: string, data: any): boolean;
         | 
| 9 9 | 
             
            export declare function hasEnumList(storage: StorageType, cacheKey: any, code: string): DataOption[];
         | 
| 10 10 | 
             
            export declare function isObject(obj: any): boolean;
         | 
| 11 11 | 
             
            export declare function mergeCacheData(storage: string, code: string, cacheKey: string, responseData: any): void;
         | 
| @@ -13,6 +13,10 @@ export function getEnumData(storage, cacheKey, baseEnumStorage) { | |
| 13 13 | 
             
              }
         | 
| 14 14 | 
             
            }
         | 
| 15 15 | 
             
            export function setEnumData(storage, cacheKey, data) {
         | 
| 16 | 
            +
              var _Object$keys;
         | 
| 17 | 
            +
              if (!((_Object$keys = Object.keys(data === null || data === void 0 ? void 0 : data.data)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
         | 
| 18 | 
            +
                return false;
         | 
| 19 | 
            +
              }
         | 
| 16 20 | 
             
              if (storage === 'localStorage') {
         | 
| 17 21 | 
             
                window.localStorage.setItem(cacheKey, JSON.stringify(data));
         | 
| 18 22 | 
             
              } else if (storage === 'sessionStorage') {
         | 
| @@ -5,7 +5,7 @@ interface EnumRes { | |
| 5 5 | 
             
                [key: string]: any;
         | 
| 6 6 | 
             
            }
         | 
| 7 7 | 
             
            export declare function getEnumData(storage: StorageType, cacheKey: string, baseEnumStorage?: any): EnumRes;
         | 
| 8 | 
            -
            export declare function setEnumData(storage: StorageType, cacheKey: string, data:  | 
| 8 | 
            +
            export declare function setEnumData(storage: StorageType, cacheKey: string, data: any): boolean;
         | 
| 9 9 | 
             
            export declare function hasEnumList(storage: StorageType, cacheKey: any, code: string): DataOption[];
         | 
| 10 10 | 
             
            export declare function isObject(obj: any): boolean;
         | 
| 11 11 | 
             
            export declare function mergeCacheData(storage: string, code: string, cacheKey: string, responseData: any): void;
         | 
| @@ -26,6 +26,10 @@ function getEnumData(storage, cacheKey, baseEnumStorage) { | |
| 26 26 | 
             
              }
         | 
| 27 27 | 
             
            }
         | 
| 28 28 | 
             
            function setEnumData(storage, cacheKey, data) {
         | 
| 29 | 
            +
              var _Object$keys;
         | 
| 30 | 
            +
              if (!((_Object$keys = Object.keys(data === null || data === void 0 ? void 0 : data.data)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
         | 
| 31 | 
            +
                return false;
         | 
| 32 | 
            +
              }
         | 
| 29 33 | 
             
              if (storage === 'localStorage') {
         | 
| 30 34 | 
             
                window.localStorage.setItem(cacheKey, JSON.stringify(data));
         | 
| 31 35 | 
             
              } else if (storage === 'sessionStorage') {
         | 
    
        package/package.json
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "name": "@zat-design/sisyphus-react",
         | 
| 3 | 
            -
              "version": "3.7.3-beta. | 
| 3 | 
            +
              "version": "3.7.3-beta.2",
         | 
| 4 4 | 
             
              "license": "Apache-2.0",
         | 
| 5 5 | 
             
              "main": "lib/index.js",
         | 
| 6 6 | 
             
              "module": "es/index.js",
         | 
| @@ -102,6 +102,7 @@ | |
| 102 102 | 
             
                "eslint": "7.10.0",
         | 
| 103 103 | 
             
                "eslint-config-za": "2.1.0",
         | 
| 104 104 | 
             
                "eslint-plugin-babel": "5.3.0",
         | 
| 105 | 
            +
                "eslint-plugin-complexity": "^1.0.2",
         | 
| 105 106 | 
             
                "eslint-plugin-import": "^2.22.1",
         | 
| 106 107 | 
             
                "eslint-plugin-jsx-a11y": "6.2.3",
         | 
| 107 108 | 
             
                "eslint-plugin-react": "7.16.0",
         |