diff --git a/blocks/section-metadata/section-metadata.js b/blocks/section-metadata/section-metadata.js index 8ef75367..18994efc 100644 --- a/blocks/section-metadata/section-metadata.js +++ b/blocks/section-metadata/section-metadata.js @@ -1,4 +1,3 @@ -// import { collectAttributes } from '../../scripts/libs.js'; import ComponentBase from '../../scripts/component-base.js'; import { stringToArray } from '../../scripts/libs.js'; diff --git a/scripts/component-base.js b/scripts/component-base.js index d344b299..fe575a1f 100644 --- a/scripts/component-base.js +++ b/scripts/component-base.js @@ -114,8 +114,7 @@ export default class ComponentBase extends HTMLElement { configByClasses, this.Handler.observedAttributes, ); - // this.componentName ??= componentName; - this.webComponentName ??= this.initOptions.webComponentName; + this.mergeConfigs(); this.setAttributesClassesAndProps(); this.addDefaultsToNestedConfig(); diff --git a/scripts/component-loader.js b/scripts/component-loader.js index 19de52ac..6dbbb16e 100644 --- a/scripts/component-loader.js +++ b/scripts/component-loader.js @@ -5,7 +5,7 @@ export default class ComponentLoader { componentName, targets = [], loaderConfig, - configByClasses, // To be replaced with `attributesValues` + configByClasses, attributesValues, externalConfigName, componentConfig, diff --git a/scripts/libs.js b/scripts/libs.js index 3f43d4ae..2265173f 100644 --- a/scripts/libs.js +++ b/scripts/libs.js @@ -326,7 +326,6 @@ export const configFromClasses = { if (isBreakpoint) value = value.slice(classBreakpoint.length + 1); - // this should be done outside and run through the methods const componentName = nestedComponentsNames.find((prefix) => value.startsWith(prefix)); if (componentName) { acc[componentName] ??= { componentName, active: true };