You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.2 KiB
53 lines
1.2 KiB
/**
|
|
* 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<SStoreDefinition>}
|
|
*/
|
|
stylings;
|
|
/**
|
|
* @type {Array<SStoreDefinition>}
|
|
*/
|
|
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]);
|
|
}
|
|
}
|
|
}
|
|
|