@descope/web-components-ui 1.0.266 → 1.0.267
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/package.json
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "name": "@descope/web-components-ui",
         | 
| 3 | 
            -
              "version": "1.0. | 
| 3 | 
            +
              "version": "1.0.267",
         | 
| 4 4 | 
             
              "description": "",
         | 
| 5 5 | 
             
              "main": "dist/cjs/index.cjs.js",
         | 
| 6 6 | 
             
              "module": "dist/index.esm.js",
         | 
| @@ -94,8 +94,7 @@ | |
| 94 94 | 
             
                "color": "^4.2.3",
         | 
| 95 95 | 
             
                "element-internals-polyfill": "^1.3.9",
         | 
| 96 96 | 
             
                "lint-staged": "^15.0.0",
         | 
| 97 | 
            -
                "lodash.merge": "4.6.2" | 
| 98 | 
            -
                "lodash.set": "4.3.2"
         | 
| 97 | 
            +
                "lodash.merge": "4.6.2"
         | 
| 99 98 | 
             
              },
         | 
| 100 99 | 
             
              "vaadin": {
         | 
| 101 100 | 
             
                "disableUsageStatistics": true
         | 
| @@ -1,11 +1,23 @@ | |
| 1 1 | 
             
            import merge from 'lodash.merge';
         | 
| 2 | 
            -
            import set from 'lodash.set';
         | 
| 3 2 | 
             
            import { BASE_THEME_SECTION, DESCOPE_PREFIX, PORTAL_THEME_PREFIX } from '../../constants';
         | 
| 4 3 | 
             
            import { isUrl, kebabCase } from '..';
         | 
| 5 4 | 
             
            import { getComponentName, getCssVarName } from '../componentHelpers';
         | 
| 6 5 |  | 
| 7 6 | 
             
            const getVarName = (path) => getCssVarName(DESCOPE_PREFIX, ...path);
         | 
| 8 7 |  | 
| 8 | 
            +
            // lodash.set alternative
         | 
| 9 | 
            +
            const set = (obj, path, value) => {
         | 
| 10 | 
            +
              const pathArray = Array.isArray(path) ? path : path.match(/([^[.\]])+/g);
         | 
| 11 | 
            +
             | 
| 12 | 
            +
              pathArray.reduce((acc, key, i) => {
         | 
| 13 | 
            +
                if (acc[key] === undefined) acc[key] = {};
         | 
| 14 | 
            +
                if (i === pathArray.length - 1) acc[key] = value;
         | 
| 15 | 
            +
                return acc[key];
         | 
| 16 | 
            +
              }, obj);
         | 
| 17 | 
            +
             | 
| 18 | 
            +
              return obj;
         | 
| 19 | 
            +
            };
         | 
| 20 | 
            +
             | 
| 9 21 | 
             
            const transformTheme = (theme, path, getTransformation) => {
         | 
| 10 22 | 
             
              return Object.entries(theme).reduce((acc, [key, val]) => {
         | 
| 11 23 | 
             
                if (val?.constructor !== Object) {
         |