@orangelogic/design-system 2.35.0 → 2.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/library/chunks/{file-on-demand.JybCAzD6.js → file-on-demand.Dhx3uvPA.js} +1 -1
  2. package/library/chunks/tab-group.B8-_uSUK.js +3575 -0
  3. package/library/components/atoms.js +1 -1
  4. package/library/components/file-on-demand.js +2 -2
  5. package/library/components/organisms.js +1 -1
  6. package/library/components/tab-group.js +1 -1
  7. package/library/components/tab.js +60 -71
  8. package/library/components/types.js +41117 -43746
  9. package/library/package.json +1 -1
  10. package/library/packages/atoms/src/components/tab/tab.d.ts +2 -0
  11. package/library/packages/atoms/src/components/tab-group/tab-group.d.ts +2 -1
  12. package/library/packages/events/src/cx-tab-group-pagination-change.d.ts +8 -0
  13. package/library/packages/events/src/events.d.ts +1 -0
  14. package/library/packages/molecules/src/timeline/timeline.d.ts +2 -0
  15. package/library/packages/organisms/src/content-builder/configs/accordion.d.ts +1 -0
  16. package/library/packages/organisms/src/content-builder/configs/analytics.d.ts +1 -0
  17. package/library/packages/organisms/src/content-builder/configs/button.d.ts +1 -0
  18. package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +1 -0
  19. package/library/packages/organisms/src/content-builder/configs/color-swatches.d.ts +1 -0
  20. package/library/packages/organisms/src/content-builder/configs/column-group.d.ts +1 -0
  21. package/library/packages/organisms/src/content-builder/configs/column.d.ts +1 -0
  22. package/library/packages/organisms/src/content-builder/configs/divider.d.ts +1 -0
  23. package/library/packages/organisms/src/content-builder/configs/font-kit.d.ts +1 -0
  24. package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +1 -0
  25. package/library/packages/organisms/src/content-builder/configs/header.d.ts +1 -0
  26. package/library/packages/organisms/src/content-builder/configs/image.d.ts +1 -0
  27. package/library/packages/organisms/src/content-builder/configs/rich-text.d.ts +5 -2
  28. package/library/packages/organisms/src/content-builder/configs/search-box.d.ts +1 -0
  29. package/library/packages/organisms/src/content-builder/configs/tab-group.d.ts +1 -0
  30. package/library/packages/organisms/src/content-builder/configs/text.d.ts +1 -0
  31. package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +1 -0
  32. package/library/packages/organisms/src/content-builder/configs/video.d.ts +1 -0
  33. package/library/packages/organisms/src/content-builder/{configsController.d.ts → configs-controller.d.ts} +1 -0
  34. package/library/packages/organisms/src/content-builder/plugins/accordion.d.ts +2 -11
  35. package/library/packages/organisms/src/content-builder/plugins/analytics.d.ts +2 -10
  36. package/library/packages/organisms/src/content-builder/plugins/button.d.ts +2 -11
  37. package/library/packages/organisms/src/content-builder/plugins/carousel.d.ts +2 -11
  38. package/library/packages/organisms/src/content-builder/plugins/color-swatches.d.ts +2 -12
  39. package/library/packages/organisms/src/content-builder/plugins/column-group.d.ts +2 -11
  40. package/library/packages/organisms/src/content-builder/plugins/column.d.ts +3 -12
  41. package/library/packages/organisms/src/content-builder/plugins/divider.d.ts +2 -11
  42. package/library/packages/organisms/src/content-builder/plugins/font-kit.d.ts +2 -11
  43. package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +2 -11
  44. package/library/packages/organisms/src/content-builder/plugins/header.d.ts +2 -11
  45. package/library/packages/organisms/src/content-builder/plugins/image.d.ts +2 -11
  46. package/library/packages/organisms/src/content-builder/plugins/plugin-factory.d.ts +20 -0
  47. package/library/packages/organisms/src/content-builder/plugins/search-box.d.ts +2 -11
  48. package/library/packages/organisms/src/content-builder/plugins/tab-group.d.ts +2 -11
  49. package/library/packages/organisms/src/content-builder/plugins/text.d.ts +2 -11
  50. package/library/packages/organisms/src/content-builder/plugins/timeline.d.ts +2 -11
  51. package/library/packages/organisms/src/content-builder/plugins/utils/details.d.ts +7 -0
  52. package/library/packages/organisms/src/content-builder/plugins/video.d.ts +2 -11
  53. package/library/packages/organisms/src/video-editor/components/video-editor-tracks/video-editor-tracks.d.ts +2 -2
  54. package/library/packages/organisms/src/video-editor/video-editor.d.ts +3 -3
  55. package/library/packages/types/src/tab-group.d.ts +2 -1
  56. package/library/packages/types/src/video-editor.d.ts +1 -0
  57. package/library/react-web-component.d.ts +6 -2
  58. package/package.json +1 -1
  59. package/library/chunks/tab-group.DyzM7DYO.js +0 -1236
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.35.0",
4
+ "version": "2.36.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -43,6 +43,8 @@ export default class CxTab extends CortexElement {
43
43
  first: boolean;
44
44
  /** Whether the timeline item is the last item in the timeline. */
45
45
  last: boolean;
46
+ /** Whether the timeline item is the only item in the pagination page. */
47
+ single: boolean;
46
48
  runFirstUpdated(): void;
47
49
  private handleCloseClick;
48
50
  handleActiveChange(): void;
@@ -171,12 +171,13 @@ export default class CxTabGroup extends CortexElement {
171
171
  private scrollFromStart;
172
172
  updateScrollControls(): void;
173
173
  syncIndicator(): void;
174
- handleVariantChange(): void;
174
+ handleVariantChange(): Promise<void>;
175
175
  handleOverflowVariantChange(): void;
176
176
  handleDropdownLabelChange(): void;
177
177
  handleAbsoluteHeightChange(): void;
178
178
  handleTabAlignmentChange(): void;
179
179
  handleTabsPerPageChange(): Promise<void>;
180
+ handleActivePaginationIndexChange(): void;
180
181
  /**
181
182
  * Setup ResizeObserver for all panels when keepHiddenHeight is enabled
182
183
  */
@@ -0,0 +1,8 @@
1
+ export type CxTabGroupPaginationChangeEvent = CustomEvent<{
2
+ index: number;
3
+ }>;
4
+ declare global {
5
+ interface GlobalEventHandlersEventMap {
6
+ 'cx-tab-group-pagination-change': CxTabGroupPaginationChangeEvent;
7
+ }
8
+ }
@@ -113,6 +113,7 @@ export * from './cx-show';
113
113
  export * from './cx-slide-change';
114
114
  export * from './cx-start';
115
115
  export * from './cx-swatch-add';
116
+ export * from './cx-tab-group-pagination-change';
116
117
  export * from './cx-tab-hide';
117
118
  export * from './cx-tab-show';
118
119
  export * from './cx-table-advanced-search-click';
@@ -34,8 +34,10 @@ export default class CxTimeline extends CortexElement {
34
34
  * The number of tabs per page. This applies when overflow variant is pagination.
35
35
  */
36
36
  tabsPerPage: number;
37
+ private activePaginationIndex;
37
38
  private handlePreviousClick;
38
39
  private handleNextClick;
40
+ private handlePaginationChange;
39
41
  render(): import('lit').TemplateResult<1>;
40
42
  }
41
43
  declare global {
@@ -9,5 +9,6 @@ type Attributes = {
9
9
  declare const _default: {
10
10
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attributes>>;
11
11
  defaultValue: Attributes;
12
+ stylable: string[];
12
13
  };
13
14
  export default _default;
@@ -9,5 +9,6 @@ type Attribute = {
9
9
  declare const _default: {
10
10
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attribute>>;
11
11
  defaultValue: Attribute;
12
+ stylable: string[];
12
13
  };
13
14
  export default _default;
@@ -31,5 +31,6 @@ type Attributes = {
31
31
  declare const _default: {
32
32
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attributes>>;
33
33
  defaultValue: Partial<Attributes>;
34
+ stylable: string[];
34
35
  };
35
36
  export default _default;
@@ -41,5 +41,6 @@ type Attributes = {
41
41
  declare const _default: {
42
42
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attributes>>;
43
43
  defaultValue: Partial<Attributes>;
44
+ stylable: string[];
44
45
  };
45
46
  export default _default;
@@ -12,5 +12,6 @@ type Attribute = {
12
12
  declare const _default: {
13
13
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attribute>>;
14
14
  defaultValue: Attribute;
15
+ stylable: string[];
15
16
  };
16
17
  export default _default;
@@ -9,5 +9,6 @@ type Attributes = {
9
9
  declare const _default: {
10
10
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attributes>>;
11
11
  defaultValue: Attributes;
12
+ stylable: string[];
12
13
  };
13
14
  export default _default;
@@ -11,5 +11,6 @@ type Attributes = {
11
11
  declare const _default: {
12
12
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attributes>>;
13
13
  defaultValue: Partial<Attributes>;
14
+ stylable: string[];
14
15
  };
15
16
  export default _default;
@@ -7,5 +7,6 @@ type Attribute = {
7
7
  declare const _default: {
8
8
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attribute>>;
9
9
  defaultValue: Attribute;
10
+ stylable: string[];
10
11
  };
11
12
  export default _default;
@@ -21,5 +21,6 @@ type Attributes = {
21
21
  declare const _default: {
22
22
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attributes>>;
23
23
  defaultValue: Partial<Attributes>;
24
+ stylable: string[];
24
25
  };
25
26
  export default _default;
@@ -44,5 +44,6 @@ type Attribute = {
44
44
  declare const _default: {
45
45
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attribute>>;
46
46
  defaultValue: Partial<Attribute>;
47
+ stylable: string[];
47
48
  };
48
49
  export default _default;
@@ -14,5 +14,6 @@ type Attribute = {
14
14
  declare const _default: {
15
15
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attribute>>;
16
16
  defaultValue: Attribute;
17
+ stylable: string[];
17
18
  };
18
19
  export default _default;
@@ -48,5 +48,6 @@ type Attribute = {
48
48
  declare const _default: {
49
49
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attribute>>;
50
50
  defaultValue: Attribute;
51
+ stylable: string[];
51
52
  };
52
53
  export default _default;
@@ -1,5 +1,8 @@
1
1
  import { PropertyConfig } from '../../../../types/src/content-builder';
2
2
  import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
3
3
 
4
- declare const configs: (localize: LocalizeController) => PropertyConfig[];
5
- export default configs;
4
+ declare const _default: {
5
+ configs: (localize: LocalizeController) => PropertyConfig[];
6
+ stylable: string[];
7
+ };
8
+ export default _default;
@@ -12,5 +12,6 @@ type Attribute = {
12
12
  declare const _default: {
13
13
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attribute>>;
14
14
  defaultValue: Attribute;
15
+ stylable: string[];
15
16
  };
16
17
  export default _default;
@@ -13,5 +13,6 @@ type Attribute = {
13
13
  declare const _default: {
14
14
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attribute>>;
15
15
  defaultValue: Attribute;
16
+ stylable: string[];
16
17
  };
17
18
  export default _default;
@@ -7,5 +7,6 @@ type Attribute = {
7
7
  declare const _default: {
8
8
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attribute>>;
9
9
  defaultValue: Attribute;
10
+ stylable: string[];
10
11
  };
11
12
  export default _default;
@@ -10,5 +10,6 @@ type Attributes = {
10
10
  declare const _default: {
11
11
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attributes>>;
12
12
  defaultValue: Attributes;
13
+ stylable: string[];
13
14
  };
14
15
  export default _default;
@@ -43,5 +43,6 @@ type Attribute = {
43
43
  declare const _default: {
44
44
  configs: (localize: LocalizeController) => Array<PropertyConfig<Attribute>>;
45
45
  defaultValue: Partial<Attribute>;
46
+ stylable: string[];
46
47
  };
47
48
  export default _default;
@@ -417,4 +417,5 @@ export default class ConfigsController {
417
417
  src: import('./blocks/video/video').default["src"];
418
418
  width: import('./blocks/video/video').default["width"];
419
419
  }>;
420
+ getStylable(type: BlockType): string[];
420
421
  }
@@ -1,14 +1,5 @@
1
- import { default as CxDetailsGroup } from '../../../../molecules/src/details-group/details-group.ts';
2
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
3
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
4
1
  import { Editor } from 'grapesjs';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- type Options = {
7
- id: string;
8
- tagName: CxDetailsGroup['tagName'];
9
- };
10
- declare const AccordionPlugin: (editor: Editor, opts: Partial<Options> & {
11
- localize: LocalizeController;
12
- toolbarConfigs?: ToolbarConfiguration;
13
- }) => void;
4
+ declare const AccordionPlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
14
5
  export default AccordionPlugin;
@@ -1,15 +1,7 @@
1
- import { default as CxDashboardIframe } from '../../../../molecules/src/dashboard-iframe/dashboard-iframe.ts';
2
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
3
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
4
1
  import { Editor } from 'grapesjs';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- type Options = {
7
- id: string;
8
- tagName: CxDashboardIframe['tagName'];
9
- };
10
- declare const AnalyticsPlugin: (editor: Editor, opts: Partial<Options> & {
11
- localize: LocalizeController;
4
+ declare const AnalyticsPlugin: (editor: Editor, editorOptions: EditorPluginOptions & {
12
5
  pageId: string;
13
- toolbarConfigs?: ToolbarConfiguration;
14
6
  }) => void;
15
7
  export default AnalyticsPlugin;
@@ -1,14 +1,5 @@
1
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
2
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
3
1
  import { Editor } from 'grapesjs';
4
- import { default as CxSbButton } from '../blocks/button/button';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- type Options = {
7
- id: string;
8
- tagName: CxSbButton['tagName'];
9
- };
10
- declare const ButtonPlugin: (editor: Editor, opts: Partial<Options> & {
11
- localize: LocalizeController;
12
- toolbarConfigs?: ToolbarConfiguration;
13
- }) => void;
4
+ declare const ButtonPlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
14
5
  export default ButtonPlugin;
@@ -1,14 +1,5 @@
1
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
2
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
3
1
  import { Editor } from 'grapesjs';
4
- import { default as CxGallery } from '../blocks/gallery/gallery';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- type Options = {
7
- id: string;
8
- tagName: CxGallery['tagName'];
9
- };
10
- declare const CarouselPlugin: (editor: Editor, opts: Partial<Options> & {
11
- localize: LocalizeController;
12
- toolbarConfigs?: ToolbarConfiguration;
13
- }) => void;
4
+ declare const CarouselPlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
14
5
  export default CarouselPlugin;
@@ -1,15 +1,5 @@
1
- import { default as CxColorSwatchGroup } from '../../color-swatch-group/color-swatch-group.ts';
2
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
3
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
4
1
  import { Editor } from 'grapesjs';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- export interface Options {
7
- id: string;
8
- tagName: CxColorSwatchGroup['tagName'];
9
- variant?: CxColorSwatchGroup['variant'];
10
- }
11
- declare const ColorSwatchesPlugin: (editor: Editor, opts: Partial<Options> & {
12
- localize: LocalizeController;
13
- toolbarConfigs?: ToolbarConfiguration;
14
- }) => void;
4
+ declare const ColorSwatchesPlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
15
5
  export default ColorSwatchesPlugin;
@@ -1,14 +1,5 @@
1
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
2
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
3
1
  import { Editor } from 'grapesjs';
4
- import { default as CxColumnGroup } from '../blocks/column-group/column-group';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- type Options = {
7
- id: string;
8
- tagName: CxColumnGroup['tagName'];
9
- };
10
- declare const ColumnGroupPlugin: (editor: Editor, opts: Partial<Options> & {
11
- localize: LocalizeController;
12
- toolbarConfigs?: ToolbarConfiguration;
13
- }) => void;
4
+ declare const ColumnGroupPlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
14
5
  export default ColumnGroupPlugin;
@@ -1,14 +1,5 @@
1
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
2
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
3
1
  import { Editor } from 'grapesjs';
4
- import { default as CxColumn } from '../blocks/column/column';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- type Options = {
7
- id: string;
8
- tagName: CxColumn['tagName'];
9
- };
10
- declare const BlockPlugin: (editor: Editor, opts: Partial<Options> & {
11
- localize: LocalizeController;
12
- toolbarConfigs?: ToolbarConfiguration;
13
- }) => void;
14
- export default BlockPlugin;
4
+ declare const ColumnPlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
5
+ export default ColumnPlugin;
@@ -1,14 +1,5 @@
1
- import { default as CxDivider } from '../../../../atoms/src/components/divider/divider.ts';
2
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
3
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
4
1
  import { Editor } from 'grapesjs';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- type Options = {
7
- id: string;
8
- tagName: CxDivider['tagName'];
9
- };
10
- declare const DividerPlugin: (editor: Editor, opts: Partial<Options> & {
11
- localize: LocalizeController;
12
- toolbarConfigs?: ToolbarConfiguration;
13
- }) => void;
4
+ declare const DividerPlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
14
5
  export default DividerPlugin;
@@ -1,14 +1,5 @@
1
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
2
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
3
1
  import { Editor } from 'grapesjs';
4
- import { default as CxFontKit } from '../blocks/font-kit/font-kit';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- type Options = {
7
- id: string;
8
- tagName: CxFontKit['tagName'];
9
- };
10
- declare const FontKitPlugin: (editor: Editor, opts: Partial<Options> & {
11
- localize: LocalizeController;
12
- toolbarConfigs?: ToolbarConfiguration;
13
- }) => void;
4
+ declare const FontKitPlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
14
5
  export default FontKitPlugin;
@@ -1,14 +1,5 @@
1
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
2
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
3
1
  import { Editor } from 'grapesjs';
4
- import { default as CxGallery } from '../blocks/gallery/gallery';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- type Options = {
7
- id: string;
8
- tagName: CxGallery['tagName'];
9
- };
10
- declare const GalleryPlugin: (editor: Editor, opts: Partial<Options> & {
11
- localize: LocalizeController;
12
- toolbarConfigs?: ToolbarConfiguration;
13
- }) => void;
4
+ declare const GalleryPlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
14
5
  export default GalleryPlugin;
@@ -1,14 +1,5 @@
1
- import { default as CxHeader } from '../../../../atoms/src/components/header/header.ts';
2
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
3
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
4
1
  import { Editor } from 'grapesjs';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- type Options = {
7
- id: string;
8
- tagName: CxHeader['tagName'];
9
- };
10
- declare const HeaderPlugin: (editor: Editor, opts: Partial<Options> & {
11
- localize: LocalizeController;
12
- toolbarConfigs?: ToolbarConfiguration;
13
- }) => void;
4
+ declare const HeaderPlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
14
5
  export default HeaderPlugin;
@@ -1,14 +1,5 @@
1
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
2
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
3
1
  import { Editor } from 'grapesjs';
4
- import { default as CxImage } from '../blocks/image/image';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- type Options = {
7
- id: string;
8
- tagName: CxImage['tagName'];
9
- };
10
- declare const ImagePlugin: (editor: Editor, opts: Partial<Options> & {
11
- localize: LocalizeController;
12
- toolbarConfigs?: ToolbarConfiguration;
13
- }) => void;
4
+ declare const ImagePlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
14
5
  export default ImagePlugin;
@@ -0,0 +1,20 @@
1
+ import { default as CortexElement } from '../../../../base/src/cortex-element.ts';
2
+ import { BlockType, ToolbarConfiguration } from '../../../../types/src/content-builder';
3
+ import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
4
+ import { Component, ComponentDefinition, ComponentView, ComponentViewDefinition, Editor } from 'grapesjs';
5
+
6
+ export type EditorPluginOptions = {
7
+ localize: LocalizeController;
8
+ toolbarConfigs?: ToolbarConfiguration;
9
+ };
10
+ type BlockPluginOptions = {
11
+ extend?: string;
12
+ id: BlockType;
13
+ init?: (model: Component) => void;
14
+ isComponent?: (el: Element) => boolean;
15
+ removed?: (model: Component) => void;
16
+ tagName: string;
17
+ view?: (Partial<ComponentViewDefinition> & ThisType<ComponentViewDefinition & ComponentView<Component>>);
18
+ };
19
+ declare const createPlugin: <T extends CortexElement>(editor: Editor, editorOptions: EditorPluginOptions, blockOptions: BlockPluginOptions, extraAttributes?: Record<string, unknown>, overriddenDefaults?: Partial<ComponentDefinition>) => void;
20
+ export default createPlugin;
@@ -1,14 +1,5 @@
1
- import { default as CxSearchBox } from '../../../../molecules/src/search-box/search-box.ts';
2
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
3
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
4
1
  import { Editor } from 'grapesjs';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- type Options = {
7
- id: string;
8
- tagName: CxSearchBox['tagName'];
9
- };
10
- declare const SearchBoxPlugin: (editor: Editor, opts: Partial<Options> & {
11
- localize: LocalizeController;
12
- toolbarConfigs?: ToolbarConfiguration;
13
- }) => void;
4
+ declare const SearchBoxPlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
14
5
  export default SearchBoxPlugin;
@@ -1,14 +1,5 @@
1
- import { default as CxDataTabGroup } from '../../../../molecules/src/data-tab-group/data-tab-group.ts';
2
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
3
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
4
1
  import { Editor } from 'grapesjs';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- export type Options = {
7
- id: string;
8
- tagName: CxDataTabGroup['tagName'];
9
- };
10
- declare const TabsPlugin: (editor: Editor, opts: Partial<Options> & {
11
- localize: LocalizeController;
12
- toolbarConfigs?: ToolbarConfiguration;
13
- }) => void;
4
+ declare const TabsPlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
14
5
  export default TabsPlugin;
@@ -1,14 +1,5 @@
1
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
2
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
3
1
  import { Editor } from 'grapesjs';
4
- import { default as CxText } from '../blocks/text/text';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- export type Options = {
7
- id: string;
8
- tagName: CxText['tagName'];
9
- };
10
- declare const TextPlugin: (editor: Editor, opts: Partial<Options> & {
11
- localize: LocalizeController;
12
- toolbarConfigs?: ToolbarConfiguration;
13
- }) => void;
4
+ declare const TextPlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
14
5
  export default TextPlugin;
@@ -1,14 +1,5 @@
1
- import { default as CxTimeline } from '../../../../molecules/src/timeline/timeline.ts';
2
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
3
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
4
1
  import { Editor } from 'grapesjs';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- export type Options = {
7
- id: string;
8
- tagName: CxTimeline['tagName'];
9
- };
10
- declare const TimelinePlugin: (editor: Editor, opts: Partial<Options> & {
11
- localize: LocalizeController;
12
- toolbarConfigs?: ToolbarConfiguration;
13
- }) => void;
4
+ declare const TimelinePlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
14
5
  export default TimelinePlugin;
@@ -0,0 +1,7 @@
1
+ import { default as CortexElement } from '../../../../../base/src/cortex-element.ts';
2
+ import { Component, StyleProps } from 'grapesjs';
3
+ import { default as _delay } from 'lodash-es/delay';
4
+
5
+ export default function parseDetails<T extends CortexElement>(model: Component, timerId: WeakMap<Component, ReturnType<typeof _delay>>, columnOptions?: {
6
+ style?: StyleProps;
7
+ }): void;
@@ -1,14 +1,5 @@
1
- import { ToolbarConfiguration } from '../../../../types/src/content-builder';
2
- import { LocalizeController } from '../../../../utils/src/custom-element/i18n.ts';
3
1
  import { Editor } from 'grapesjs';
4
- import { default as CxVideo } from '../blocks/video/video';
2
+ import { EditorPluginOptions } from './plugin-factory';
5
3
 
6
- export type Options = {
7
- id: string;
8
- tagName: CxVideo['tagName'];
9
- };
10
- declare const VideoPlugin: (editor: Editor, opts: Partial<Options> & {
11
- localize: LocalizeController;
12
- toolbarConfigs?: ToolbarConfiguration;
13
- }) => void;
4
+ declare const VideoPlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
14
5
  export default VideoPlugin;
@@ -8,10 +8,10 @@ import { default as Sortable } from 'sortablejs';
8
8
  import { default as CxVideoEditorTrack } from '../video-editor-track/video-editor-track';
9
9
 
10
10
  export type CxVideoEditorTracksSelectEvent = CustomEvent<{
11
- recordIDs: string[];
11
+ ids: string[];
12
12
  }>;
13
13
  export type CxVideoEditorTracksTransitionSelectEvent = CustomEvent<{
14
- recordIDs: string[];
14
+ ids: string[];
15
15
  }>;
16
16
  export type CxVideoEditorTracksReorderEvent = CustomEvent<{
17
17
  subClips: Array<Partial<SubClip>>;
@@ -20,7 +20,7 @@ export type CxVideoEditorAction = CustomEvent<{
20
20
  value?: any;
21
21
  }>;
22
22
  export type CxVideoEditorTrackChange = CustomEvent<{
23
- track: Pick<SubClip, 'crop' | 'recordID' | 'rotation' | 'startPosition' | 'stopPosition'>;
23
+ track: Pick<SubClip, 'crop' | 'id' | 'rotation' | 'startPosition' | 'stopPosition'>;
24
24
  }>;
25
25
  declare global {
26
26
  interface GlobalEventHandlersEventMap {
@@ -33,8 +33,8 @@ declare global {
33
33
  *
34
34
  * @event {{ time: number }} cx-time-update - Fired when the user seeks to a new time in the video.
35
35
  * @event {{ action: VideoEditorToolbarActions }} cx-video-editor-action - Fired when a toolbar action is triggered.
36
- * @event {{ recordIDs: string[] }} cx-video-editor-tracks-select - Fired when tracks are selected.
37
- * @event {{ recordID: string }} cx-video-editor-tracks-transitions-select - Fired when a transition is selected.
36
+ * @event {{ ids: string[] }} cx-video-editor-tracks-select - Fired when tracks are selected.
37
+ * @event {{ ids: string[] }} cx-video-editor-tracks-transitions-select - Fired when a transition is selected.
38
38
  *
39
39
  * @typedef VideoEditorToolbarActions - {'crop' | 'delete' | 'export' | 'redo' | 'rotate' | 'save' | 'transition' | 'trim' | 'undo'}
40
40
  */
@@ -15,7 +15,8 @@ export declare enum TabGroupActivation {
15
15
  }
16
16
  export declare enum TabGroupVariant {
17
17
  Button = "button",
18
- Default = "default"
18
+ Default = "default",
19
+ Timeline = "timeline"
19
20
  }
20
21
  export declare enum TabGroupOverflowVariant {
21
22
  Dropdown = "dropdown",
@@ -12,6 +12,7 @@ export type SubClip = {
12
12
  y: number;
13
13
  };
14
14
  frameRate: number;
15
+ id: string;
15
16
  label: string;
16
17
  muted: boolean;
17
18
  playbackSpeed: number;