@descope/web-components-ui 1.0.265 → 1.0.267

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.esm.js CHANGED
@@ -13,7 +13,6 @@ import { GridSelectionColumn } from '@vaadin/grid/vaadin-grid-selection-column';
13
13
  import '@vaadin/multi-select-combo-box';
14
14
  import '@vaadin/dialog';
15
15
  import merge from 'lodash.merge';
16
- import set from 'lodash.set';
17
16
  import Color from 'color';
18
17
 
19
18
  const kebabCase = (str) =>
@@ -8259,6 +8258,19 @@ customElements.define(componentName$2, ModalClass);
8259
8258
 
8260
8259
  const getVarName = (path) => getCssVarName(DESCOPE_PREFIX, ...path);
8261
8260
 
8261
+ // lodash.set alternative
8262
+ const set = (obj, path, value) => {
8263
+ const pathArray = Array.isArray(path) ? path : path.match(/([^[.\]])+/g);
8264
+
8265
+ pathArray.reduce((acc, key, i) => {
8266
+ if (acc[key] === undefined) acc[key] = {};
8267
+ if (i === pathArray.length - 1) acc[key] = value;
8268
+ return acc[key];
8269
+ }, obj);
8270
+
8271
+ return obj;
8272
+ };
8273
+
8262
8274
  const transformTheme = (theme, path, getTransformation) => {
8263
8275
  return Object.entries(theme).reduce((acc, [key, val]) => {
8264
8276
  if (val?.constructor !== Object) {