@dotcms/angular 1.5.2-next.28 → 1.5.3-next.2118

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.
@@ -24,6 +24,15 @@ export type CustomRenderer = Record<string, DynamicComponentEntity>;
24
24
  * [customRenderers]="myCustomRenderers">
25
25
  * </dotcms-block-editor-renderer>
26
26
  * ```
27
+ *
28
+ * @deprecated Use {@link DotCMSBlockEditorRendererNativeComponent}
29
+ * (`<dotcms-block-editor-renderer-native>`) for accessible, semantic DOM output.
30
+ * This component wraps every semantic tag in a custom element (e.g. a dispatcher
31
+ * element sits between `<ul>` and its `<li>` children), which breaks the
32
+ * `list → listitem` relationship required by the HTML spec and assistive technology.
33
+ * The native renderer keeps the identical public input API — migration is just
34
+ * swapping the tag and import. This component is retained for backward compatibility
35
+ * and will be removed in a future major version.
27
36
  */
28
37
  export declare class DotCMSBlockEditorRendererComponent {
29
38
  blocks: BlockEditorNode;
@@ -1 +1 @@
1
- {"version":3,"file":"dotcms-block-editor-renderer.component.d.ts","sourceRoot":"","sources":["../../../../../../../libs/sdk/angular/src/lib/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,eAAe,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAM1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;AAEpE;;;;;;;;;;;;;;;GAeG;AACH,qBAMa,kCAAkC;IAClC,MAAM,EAAG,eAAe,CAAC;IACzB,eAAe,EAAE,cAAc,GAAG,SAAS,CAAC;IAC5C,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IAE5D,iBAAiB,2DAA6C;IAC9D,aAAa,kDAAiD;IAE9D,QAAQ;yCATC,kCAAkC;2CAAlC,kCAAkC;CAkB9C"}
1
+ {"version":3,"file":"dotcms-block-editor-renderer.component.d.ts","sourceRoot":"","sources":["../../../../../../../libs/sdk/angular/src/lib/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,eAAe,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAM1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAMa,kCAAkC;IAClC,MAAM,EAAG,eAAe,CAAC;IACzB,eAAe,EAAE,cAAc,GAAG,SAAS,CAAC;IAC5C,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IAE5D,iBAAiB,2DAA6C;IAC9D,aAAa,kDAAiD;IAE9D,QAAQ;yCATC,kCAAkC;2CAAlC,kCAAkC;CAkB9C"}
@@ -0,0 +1,40 @@
1
+ import * as i0 from "@angular/core";
2
+ /**
3
+ * Internal semantic block components for the accessible Block Editor renderer.
4
+ *
5
+ * Each component uses an **attribute selector** so the host element *is* the real
6
+ * semantic tag (`<ul>`, `<ol>`, `<li>`, ...). The template is just `<ng-content />`,
7
+ * so no extra wrapper element is added to the DOM and the
8
+ * `list → listitem` relationship required by the HTML spec and assistive
9
+ * technology is preserved.
10
+ *
11
+ * These are not exported from the SDK; they are an implementation detail of
12
+ * {@link DotCMSBlockEditorRendererNativeComponent}.
13
+ *
14
+ * @internal
15
+ */
16
+ export declare class DotSemanticBulletList {
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<DotSemanticBulletList, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<DotSemanticBulletList, "ul[dotBulletList]", never, {}, {}, never, ["*"], true, never>;
19
+ }
20
+ export declare class DotSemanticOrderedList {
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<DotSemanticOrderedList, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<DotSemanticOrderedList, "ol[dotOrderedList]", never, {}, {}, never, ["*"], true, never>;
23
+ }
24
+ export declare class DotSemanticListItem {
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<DotSemanticListItem, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<DotSemanticListItem, "li[dotListItem]", never, {}, {}, never, ["*"], true, never>;
27
+ }
28
+ export declare class DotSemanticParagraph {
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<DotSemanticParagraph, never>;
30
+ static ɵcmp: i0.ɵɵComponentDeclaration<DotSemanticParagraph, "p[dotParagraph]", never, {}, {}, never, ["*"], true, never>;
31
+ }
32
+ export declare class DotSemanticBlockQuote {
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<DotSemanticBlockQuote, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<DotSemanticBlockQuote, "blockquote[dotBlockQuote]", never, {}, {}, never, ["*"], true, never>;
35
+ }
36
+ export declare class DotSemanticCodeBlock {
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<DotSemanticCodeBlock, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<DotSemanticCodeBlock, "pre[dotCodeBlock]", never, {}, {}, never, ["*"], true, never>;
39
+ }
40
+ //# sourceMappingURL=semantic-blocks.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semantic-blocks.component.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/sdk/angular/src/lib/components/dotcms-block-editor-renderer-semantic/blocks/semantic-blocks.component.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;GAaG;AACH,qBAOa,qBAAqB;yCAArB,qBAAqB;2CAArB,qBAAqB;CAAG;AAErC,qBAOa,sBAAsB;yCAAtB,sBAAsB;2CAAtB,sBAAsB;CAAG;AAEtC,qBAOa,mBAAmB;yCAAnB,mBAAmB;2CAAnB,mBAAmB;CAAG;AAEnC,qBAOa,oBAAoB;yCAApB,oBAAoB;2CAApB,oBAAoB;CAAG;AAEpC,qBAOa,qBAAqB;yCAArB,qBAAqB;2CAArB,qBAAqB;CAAG;AAErC,qBAOa,oBAAoB;yCAApB,oBAAoB;2CAApB,oBAAoB;CAAG"}
@@ -0,0 +1,73 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { BlockEditorNode, BlockEditorMark } from '@dotcms/types';
3
+ import { BlockEditorState, BlockEditorDefaultBlocks } from '@dotcms/types/internal';
4
+ import { CustomRenderer } from '../dotcms-block-editor-renderer/dotcms-block-editor-renderer.component';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * An accessible component that renders content from DotCMS's Block Editor field.
8
+ *
9
+ * This is the semantic-DOM successor to {@link DotCMSBlockEditorRendererComponent}.
10
+ * It emits clean semantic HTML — `<ul><li><p>…</p></li></ul>` — with no custom
11
+ * wrapper elements between semantic tags, so the `list → listitem` relationship
12
+ * required by the HTML spec and assistive technology is preserved. The recursive
13
+ * dispatch is performed with `ng-template` outlets, whose host `<ng-container>`s
14
+ * render as HTML comment nodes (invisible to the accessibility tree).
15
+ *
16
+ * It exposes the **identical public input API** and the same `customRenderers`
17
+ * contract as the deprecated renderer, so migration is just swapping the tag and
18
+ * import.
19
+ *
20
+ * For more information about Block Editor, see {@link https://dev.dotcms.com/docs/block-editor}
21
+ *
22
+ * @example
23
+ * ```html
24
+ * <dotcms-block-editor-renderer-native
25
+ * [blocks]="myBlockEditorContent"
26
+ * [customRenderers]="myCustomRenderers">
27
+ * </dotcms-block-editor-renderer-native>
28
+ * ```
29
+ */
30
+ export declare class DotCMSBlockEditorRendererNativeComponent implements OnInit {
31
+ /** The Block Editor `doc` node to render. */
32
+ readonly blocks: import("@angular/core").InputSignal<BlockEditorNode | undefined>;
33
+ /** Map of `node.type` → component to override the built-in render path. */
34
+ readonly customRenderers: import("@angular/core").InputSignal<CustomRenderer | undefined>;
35
+ /**
36
+ * CSS class on the wrapper element. Aliased as `class` so consumers can
37
+ * pass `[class]="…"` like a normal Angular class binding.
38
+ */
39
+ readonly cssClass: import("@angular/core").InputSignal<string | undefined>;
40
+ /** Inline style on the wrapper element. */
41
+ readonly style: import("@angular/core").InputSignal<string | Record<string, string> | undefined>;
42
+ $blockEditorState: import("@angular/core").WritableSignal<BlockEditorState>;
43
+ $isInEditMode: import("@angular/core").WritableSignal<boolean>;
44
+ protected readonly BLOCKS: typeof BlockEditorDefaultBlocks;
45
+ ngOnInit(): void;
46
+ /**
47
+ * Normalizes a heading `level` attribute (which may be a number such as `6`
48
+ * or a string such as `'6'`) to a string for use in the heading `@switch`.
49
+ * Returns `''` for missing or out-of-range levels so the template falls
50
+ * through to the safe `@default` case (`<h2>`).
51
+ */
52
+ asLevel(level: number | string | undefined): string;
53
+ /** The marks after the current (outermost) one — used to recurse inward. */
54
+ restMarks(marks: BlockEditorMark[] | undefined): BlockEditorMark[];
55
+ /** The attributes of the current (outermost) mark. */
56
+ markAttrs(marks: BlockEditorMark[] | undefined): Record<string, string>;
57
+ /**
58
+ * Wrapper style for a `dotImage` `<figure>`, derived from the node's
59
+ * `textWrap` (float left/right) or `textAlign` attribute.
60
+ */
61
+ imageStyle(attrs: BlockEditorNode['attrs']): Record<string, string>;
62
+ /** Poster URL for a `dotVideo` `<video>` (from `attrs.data.thumbnail`). */
63
+ videoPoster(attrs: BlockEditorNode['attrs']): string | undefined;
64
+ /**
65
+ * The column span (1–12) for a grid column. Falls back to `6` for malformed
66
+ * `columns` attrs or for an out-of-range column index, matching the legacy
67
+ * renderer.
68
+ */
69
+ columnSpan(attrs: BlockEditorNode['attrs'], index: number): number;
70
+ static ɵfac: i0.ɵɵFactoryDeclaration<DotCMSBlockEditorRendererNativeComponent, never>;
71
+ static ɵcmp: i0.ɵɵComponentDeclaration<DotCMSBlockEditorRendererNativeComponent, "dotcms-block-editor-renderer-native", never, { "blocks": { "alias": "blocks"; "required": false; "isSignal": true; }; "customRenderers": { "alias": "customRenderers"; "required": false; "isSignal": true; }; "cssClass": { "alias": "class"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
72
+ }
73
+ //# sourceMappingURL=dotcms-block-editor-renderer-native.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dotcms-block-editor-renderer-native.component.d.ts","sourceRoot":"","sources":["../../../../../../../libs/sdk/angular/src/lib/components/dotcms-block-editor-renderer-semantic/dotcms-block-editor-renderer-native.component.ts"],"names":[],"mappings":"AACA,OAAO,EAA6C,MAAM,EAAU,MAAM,eAAe,CAAC;AAE1F,OAAO,EAAY,eAAe,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAepF,OAAO,EAAE,cAAc,EAAE,MAAM,wEAAwE,CAAC;;AAExG;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAkBa,wCAAyC,YAAW,MAAM;IACnE,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,mEAA4B;IAC3C,2EAA2E;IAC3E,QAAQ,CAAC,eAAe,kEAAgD;IACxE;;;OAGG;IACH,QAAQ,CAAC,QAAQ,0DAA4D;IAC7E,2CAA2C;IAC3C,QAAQ,CAAC,KAAK,mFAAiE;IAE/E,iBAAiB,2DAA6C;IAC9D,aAAa,kDAAiD;IAE9D,SAAS,CAAC,QAAQ,CAAC,MAAM,kCAA4B;IAErD,QAAQ;IAaR;;;;;OAKG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM;IAKnD,4EAA4E;IAC5E,SAAS,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,SAAS,GAAG,eAAe,EAAE;IAIlE,sDAAsD;IACtD,SAAS,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIvE;;;OAGG;IACH,UAAU,CAAC,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAiBnE,2EAA2E;IAC3E,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS;IAIhE;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;yCAnFzD,wCAAwC;2CAAxC,wCAAwC;CA2FpD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotcms/angular",
3
- "version": "1.5.2-next.28",
3
+ "version": "1.5.3-next.2118",
4
4
  "peerDependencies": {
5
5
  "rxjs": ">=7.0.0",
6
6
  "@angular/common": ">=17.0.0",
package/public_api.d.ts CHANGED
@@ -3,6 +3,7 @@ export { provideDotCMSImageLoader } from './lib/providers/dotcms-image-loader/do
3
3
  export { provideDotCMSClient, DotCMSClient } from './lib/providers/dotcms-client/dotcms-client.provider';
4
4
  export { DotCMSEditableTextComponent } from './lib/components/dotcms-editable-text/dotcms-editable-text.component';
5
5
  export { DotCMSBlockEditorRendererComponent } from './lib/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component';
6
+ export { DotCMSBlockEditorRendererNativeComponent } from './lib/components/dotcms-block-editor-renderer-semantic/dotcms-block-editor-renderer-native.component';
6
7
  export { DotCMSLayoutBodyComponent } from './lib/components/dotcms-layout-body/dotcms-layout-body.component';
7
8
  export { DotCMSEditablePageService } from './lib/services/dotcms-editable-page.service';
8
9
  export { DynamicComponentEntity } from './lib/models';
@@ -1 +1 @@
1
- {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../../../../libs/sdk/angular/src/public_api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8DAA8D,CAAC;AAEvG,OAAO,EAAE,wBAAwB,EAAE,MAAM,yDAAyD,CAAC;AAEnG,OAAO,EACH,mBAAmB,EACnB,YAAY,EACf,MAAM,sDAAsD,CAAC;AAE9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,sEAAsE,CAAC;AAEnH,OAAO,EAAE,kCAAkC,EAAE,MAAM,sFAAsF,CAAC;AAE1I,OAAO,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAE7G,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAExF,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../../../../libs/sdk/angular/src/public_api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8DAA8D,CAAC;AAEvG,OAAO,EAAE,wBAAwB,EAAE,MAAM,yDAAyD,CAAC;AAEnG,OAAO,EACH,mBAAmB,EACnB,YAAY,EACf,MAAM,sDAAsD,CAAC;AAE9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,sEAAsE,CAAC;AAEnH,OAAO,EAAE,kCAAkC,EAAE,MAAM,sFAAsF,CAAC;AAE1I,OAAO,EAAE,wCAAwC,EAAE,MAAM,sGAAsG,CAAC;AAEhK,OAAO,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAE7G,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAExF,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC"}