/** * This file is part of the jps-like-websites lib * URL: https://git.labos.goip.de/chris/jpc-like-websites * @copyright by its creator Christian Martin */ /** * Defines an extension that can be added to the jpclw-framework */ class CompelExtension { /** * @type {string} */ name; /** * @type {string} */ diplayTitle; /** * @type {Array} */ stylings; /** * @type {Array} */ functions; /** * Predefined components. Usually of a higher (constructed) kind. * @type {Object} */ components; /** * Extensions for/to the Page or the framework in general. * @type {Object} */ frameworkControls; /** * Additional elements for the builder (likely referencing components) * @type {Object} */ builderElements; /** * defines how jpc-like-websites is to be extended and executes that extension */ install() { builder.extensions = Object.assign(builder.extensions, this.builderElements); for (const key of Object.keys(this.stylings)) { Page.registerStyling(key, this.stylings[key]); } } }