Skip to content

Commit

Permalink
add raw content element part builder
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Fabel authored and Oliver Fabel committed Jan 5, 2023
1 parent 1d468dd commit f837af1
Show file tree
Hide file tree
Showing 11 changed files with 317 additions and 87 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.12.0] - 05.01.2023

### Fixed

* Updated dependencies to the latest versions.

### Added

* Own builder class for raw parts (can be used for custom element parts).

## [1.11.0] - 30.12.2022

### Fixed
Expand Down Expand Up @@ -489,7 +499,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
* Custom JS module support
* Basic setup to publish project as NPM package

[Unreleased]: https://github.com/bsi-software/bsi-cx-design-build/compare/1.11.0...HEAD
[Unreleased]: https://github.com/bsi-software/bsi-cx-design-build/compare/1.12.0...HEAD

[1.12.0]: https://github.com/bsi-software/bsi-cx-design-build/compare/1.11.0...1.12.0

[1.11.0]: https://github.com/bsi-software/bsi-cx-design-build/compare/1.10.4...1.11.0

Expand Down
81 changes: 81 additions & 0 deletions dist/browser.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/browser.js.map

Large diffs are not rendered by default.

55 changes: 54 additions & 1 deletion dist/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5992,6 +5992,50 @@ declare module "src/content-element/part/url-provider-part" {
}
import AbstractPart from "src/content-element/part/abstract-part";
}
declare module "src/content-element/part/raw" {
/**
* @since Studio 1.0
*/
export default class RawPart extends AbstractPart {
/**
* @param {string} partId
*/
constructor(partId: string);
/**
* @type {Record<string,*>}
* @private
*/
private _properties;
/**
* @returns {Record<string, *>}
*/
get properties(): Record<string, any>;
/**
* Set a property for this raw part.
*
* @example
* let element = new ContentElement()
* .withElementId('element')
* .withParts(
* new RawPart('chart')
* .withLabel('Chart')
* .withProperty('type','pie'))
* @param {string} name
* @param {string|array|number|boolean|Record|null} value
* @returns {RawPart}
*/
withProperty(name: string, value: string | any[] | number | boolean | Record | null): RawPart;
/**
* Clone the configuration.
*
* @param {boolean} [shallow=true] - Create a shallow clone.
* @returns {RawPart}
*/
clone(shallow?: boolean): RawPart;
_buildInternal(): Record<string, any>;
}
import AbstractPart from "src/content-element/part/abstract-part";
}
declare module "src/website/abstract-include" {
/** @typedef {import('../dropzone/dropzone').default} Dropzone */
/**
Expand Down Expand Up @@ -6291,6 +6335,13 @@ declare module "src/content-element/part/part-factory" {
* @returns {VideoPart}
*/
get video(): VideoPart;
/**
* Create a raw element part builder instance. Can be used for custom element parts.
*
* @param {string} partId
* @returns {RawPart}
*/
raw(partId: string): RawPart;
}
import BackgroundImagePart from "src/content-element/part/background-image-part";
import FormCheckboxPart from "src/content-element/part/form-checkbox-part";
Expand All @@ -6311,6 +6362,7 @@ declare module "src/content-element/part/part-factory" {
import TablePart from "src/content-element/part/table-part";
import UrlProviderPart from "src/content-element/part/url-provider-part";
import VideoPart from "src/content-element/part/video-part";
import RawPart from "src/content-element/part/raw";
}
declare module "src/design/design-helper" {
/** @typedef {import('./design-factory').default} DesignFactory */
Expand Down Expand Up @@ -6730,6 +6782,7 @@ declare module "export/browser" {
import SocialFollowPart from "src/content-element/part/social-follow-part";
import SocialSharePart from "src/content-element/part/social-share-part";
import UrlProviderPart from "src/content-element/part/url-provider-part";
import RawPart from "src/content-element/part/raw";
import Website from "src/website/website";
import PageInclude from "src/website/page-include";
import Include from "src/website/include";
Expand All @@ -6743,7 +6796,7 @@ declare module "export/browser" {
export const cx: DesignFactory;
import bsiProperty from "src/bsi-property";
import DesignFactory from "src/design/design-factory";
export { DesignJsonProperty, AbstractBuilder, AbstractConstant, BuilderObjectNormalizer, ObjectCloner, RawValue, AbstractPart, Locale, SchemaVersion, Design, ContentElementGroup, Dropzone, Version, DesignType, Feature, EnterMode, FontSizeUnit, Format, HtmlEditorConfig, Style, CssClass, Icon, ContentElement, Part, PlainTextPart, FormattedTextPart, HtmlPart, VideoPart, ImagePart, BackgroundImagePart, TablePart, IteratorPart, NewsSnippetsPart, FormPart, FormFieldPart, FormCheckboxPart, FormTextareaPart, FormSelectPart, FormRadioPart, LinkPart, SocialFollowPart, SocialSharePart, UrlProviderPart, Website, PageInclude, Include, NLS, Translation, bsiProperty };
export { DesignJsonProperty, AbstractBuilder, AbstractConstant, BuilderObjectNormalizer, ObjectCloner, RawValue, AbstractPart, Locale, SchemaVersion, Design, ContentElementGroup, Dropzone, Version, DesignType, Feature, EnterMode, FontSizeUnit, Format, HtmlEditorConfig, Style, CssClass, Icon, ContentElement, Part, PlainTextPart, FormattedTextPart, HtmlPart, VideoPart, ImagePart, BackgroundImagePart, TablePart, IteratorPart, NewsSnippetsPart, FormPart, FormFieldPart, FormCheckboxPart, FormTextareaPart, FormSelectPart, FormRadioPart, LinkPart, SocialFollowPart, SocialSharePart, UrlProviderPart, RawPart, Website, PageInclude, Include, NLS, Translation, bsiProperty };
}
declare module "@bsi-cx/design-build" {
export * from "export/main";
Expand Down
2 changes: 1 addition & 1 deletion dist/types.d.ts.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions export/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import LinkPart from '../src/content-element/part/link-part';
import SocialFollowPart from '../src/content-element/part/social-follow-part';
import SocialSharePart from '../src/content-element/part/social-share-part';
import UrlProviderPart from '../src/content-element/part/url-provider-part';
import RawPart from '../src/content-element/part/raw';
import Website from '../src/website/website';
import PageInclude from '../src/website/page-include';
import Include from '../src/website/include';
Expand Down Expand Up @@ -100,6 +101,7 @@ export {
SocialFollowPart,
SocialSharePart,
UrlProviderPart,
RawPart,
Website,
PageInclude,
Include,
Expand Down
Loading

0 comments on commit f837af1

Please sign in to comment.