@praxisui/rich-content 8.0.0-beta.2 → 8.0.0-beta.21
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.
- package/README.md +183 -0
- package/fesm2022/praxisui-rich-content.mjs +15023 -391
- package/index.d.ts +361 -3
- package/package.json +4 -2
package/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { OnChanges, OnInit, SimpleChanges, InjectionToken, Provider } from '@angular/core';
|
|
3
|
-
import { RichContentDocument, RichPrimitiveNode, RichPresetReferenceNode, JsonLogicDataRecord, RichBlockHostCapabilities, RichBlockNode, RichPresenterNode, RichComposeNode, RichCardNode, RichMediaBlockNode, RichTimelineNode, RichTimelineItem,
|
|
3
|
+
import { RichContentDocument, RichPrimitiveNode, RichPresetReferenceNode, JsonLogicDataRecord, RichBlockHostCapabilities, RichBlockNode, RichPresenterNode, RichComposeNode, RichCardNode, RichCardMedia, RichActionButtonNode, RichCalloutNode, RichCtaGroupNode, RichKeyValueListNode, RichKeyValueItem, RichEmptyStateNode, RichPropertySheetNode, RichPropertySheetItem, RichStatGroupNode, RichStatItem, RichTabsNode, RichTabsItem, RichRecordSummaryNode, RichRecordSummaryField, RichLookupResultNode, RichLookupResultField, RichLookupCardNode, RichRelatedRecordNode, RichActionCardNode, RichCollapsibleCardNode, RichFormLauncherNode, RichDisclosureNode, RichAccordionNode, RichAccordionItem, RichMediaBlockNode, RichTimelineNode, RichTimelineItem, RichTextNode, RichBadgeNode, RichIconNode, RichImageNode, RichLinkNode, RichMetricNode, RichProgressNode, SettingsValueProvider, CorePresetRef, CorePresetDescriptor, ComponentDocMeta, AiCapabilityCategory, AiValueKind, AiCapability, AiCapabilityCatalog, ComponentAuthoringManifest, PraxisI18nDictionary, PraxisI18nConfig, PraxisI18nService } from '@praxisui/core';
|
|
4
|
+
import * as _praxisui_rich_content from '@praxisui/rich-content';
|
|
4
5
|
import { BehaviorSubject } from 'rxjs';
|
|
5
6
|
|
|
6
7
|
type RenderableNode = RichPrimitiveNode | RichPresetReferenceNode;
|
|
@@ -13,6 +14,9 @@ declare class PraxisRichContent {
|
|
|
13
14
|
readonly hostCapabilities: _angular_core.InputSignal<RichBlockHostCapabilities>;
|
|
14
15
|
readonly layout: _angular_core.InputSignal<"block" | "inline">;
|
|
15
16
|
rootClassName: string;
|
|
17
|
+
private readonly tabsSelection;
|
|
18
|
+
private readonly runtimeNodeIds;
|
|
19
|
+
private nextRuntimeNodeId;
|
|
16
20
|
readonly renderableNodes: _angular_core.Signal<RenderableNode[]>;
|
|
17
21
|
isNodeVisible(node: RichBlockNode): boolean;
|
|
18
22
|
resolveNodeClasses(node: RichBlockNode): string[];
|
|
@@ -26,6 +30,12 @@ declare class PraxisRichContent {
|
|
|
26
30
|
resolveImageAlt(node: Extract<RichPresenterNode, {
|
|
27
31
|
type: 'image';
|
|
28
32
|
}>): string;
|
|
33
|
+
resolveLinkLabel(node: Extract<RichPresenterNode, {
|
|
34
|
+
type: 'link';
|
|
35
|
+
}>): string;
|
|
36
|
+
resolveLinkRel(node: Extract<RichPresenterNode, {
|
|
37
|
+
type: 'link';
|
|
38
|
+
}>): string | null;
|
|
29
39
|
resolveBadgeLabel(node: Extract<RichPresenterNode, {
|
|
30
40
|
type: 'badge';
|
|
31
41
|
}>): string;
|
|
@@ -53,6 +63,131 @@ declare class PraxisRichContent {
|
|
|
53
63
|
resolveComposeGap(node: RichComposeNode): string;
|
|
54
64
|
resolveCardTitle(node: RichCardNode): string | null;
|
|
55
65
|
resolveCardSubtitle(node: RichCardNode): string | null;
|
|
66
|
+
resolveCardHeaderNodes(node: RichCardNode): RenderableNode[];
|
|
67
|
+
resolveCardBodyNodes(node: RichCardNode): RenderableNode[];
|
|
68
|
+
resolveCardFooterNodes(node: RichCardNode): RenderableNode[];
|
|
69
|
+
resolveCardAsideNodes(node: RichCardNode): RenderableNode[];
|
|
70
|
+
resolveCardActionNodes(node: RichCardNode): RenderableNode[];
|
|
71
|
+
resolveCardMedia(node: RichCardNode): RichCardMedia | null;
|
|
72
|
+
resolveCardMediaSrc(media: RichCardMedia): string;
|
|
73
|
+
resolveCardMediaAlt(media: RichCardMedia): string;
|
|
74
|
+
resolveCardMediaLabel(media: RichCardMedia): string | null;
|
|
75
|
+
resolveCardMediaFallback(media: RichCardMedia): string;
|
|
76
|
+
isCardLoading(node: RichCardNode): boolean;
|
|
77
|
+
isCardActive(node: RichCardNode): boolean;
|
|
78
|
+
isCardSelected(node: RichCardNode): boolean;
|
|
79
|
+
isCardInteractive(node: RichCardNode): boolean;
|
|
80
|
+
isCardInteractionDisabled(node: RichCardNode): boolean;
|
|
81
|
+
resolveCardRole(node: RichCardNode): string;
|
|
82
|
+
resolveCardTabIndex(node: RichCardNode): number | null;
|
|
83
|
+
resolveCardAriaLabel(node: RichCardNode): string | null;
|
|
84
|
+
onCardSurfaceClick(node: RichCardNode, event: MouseEvent): void;
|
|
85
|
+
onCardSurfaceKeydown(node: RichCardNode, event: KeyboardEvent): void;
|
|
86
|
+
private shouldDispatchCardInteraction;
|
|
87
|
+
private dispatchCardInteraction;
|
|
88
|
+
private resolveActionPayload;
|
|
89
|
+
private dispatchRichAction;
|
|
90
|
+
resolveActionButtonLabel(node: RichActionButtonNode): string;
|
|
91
|
+
isActionButtonDisabled(node: RichActionButtonNode): boolean;
|
|
92
|
+
onActionButtonClick(node: RichActionButtonNode): void;
|
|
93
|
+
resolveCalloutTitle(node: RichCalloutNode): string | null;
|
|
94
|
+
resolveCalloutMessage(node: RichCalloutNode): string | null;
|
|
95
|
+
resolveCtaGroupTitle(node: RichCtaGroupNode): string | null;
|
|
96
|
+
resolveCtaGroupSubtitle(node: RichCtaGroupNode): string | null;
|
|
97
|
+
resolveCtaGroupMessage(node: RichCtaGroupNode): string | null;
|
|
98
|
+
resolveActionNodes(nodes?: RichActionButtonNode[] | null): RenderableNode[];
|
|
99
|
+
resolveKeyValueListTitle(node: RichKeyValueListNode): string | null;
|
|
100
|
+
resolveKeyValueItems(node: RichKeyValueListNode): RichKeyValueItem[];
|
|
101
|
+
resolveKeyValueLabel(item: RichKeyValueItem): string;
|
|
102
|
+
resolveKeyValueValue(item: RichKeyValueItem): string;
|
|
103
|
+
resolveKeyValueBadge(item: RichKeyValueItem): string | null;
|
|
104
|
+
resolveKeyValueIcon(item: RichKeyValueItem): string | null;
|
|
105
|
+
resolveEmptyStateTitle(node: RichEmptyStateNode): string | null;
|
|
106
|
+
resolveEmptyStateMessage(node: RichEmptyStateNode): string | null;
|
|
107
|
+
resolvePropertySheetTitle(node: RichPropertySheetNode): string | null;
|
|
108
|
+
resolvePropertySheetItems(node: RichPropertySheetNode): RichPropertySheetItem[];
|
|
109
|
+
resolvePropertySheetLabel(item: RichPropertySheetItem): string;
|
|
110
|
+
resolvePropertySheetValue(item: RichPropertySheetItem): string;
|
|
111
|
+
resolvePropertySheetHint(item: RichPropertySheetItem): string | null;
|
|
112
|
+
resolveStatGroupTitle(node: RichStatGroupNode): string | null;
|
|
113
|
+
resolveStatGroupSubtitle(node: RichStatGroupNode): string | null;
|
|
114
|
+
resolveStatGroupItems(node: RichStatGroupNode): RichStatItem[];
|
|
115
|
+
resolveStatItemLabel(item: RichStatItem): string;
|
|
116
|
+
resolveStatItemValue(item: RichStatItem): string;
|
|
117
|
+
resolveStatItemCaption(item: RichStatItem): string | null;
|
|
118
|
+
resolveTabsTitle(node: RichTabsNode): string | null;
|
|
119
|
+
resolveTabsSubtitle(node: RichTabsNode): string | null;
|
|
120
|
+
resolveVisibleTabsItems(node: RichTabsNode): RichTabsItem[];
|
|
121
|
+
resolveTabsItemLabel(item: RichTabsItem): string;
|
|
122
|
+
resolveTabsItemBadge(item: RichTabsItem): string | null;
|
|
123
|
+
isTabsItemDisabled(item: RichTabsItem): boolean;
|
|
124
|
+
isTabsItemActive(node: RichTabsNode, item: RichTabsItem, index: number, items: RichTabsItem[]): boolean;
|
|
125
|
+
resolveActiveTabsItem(node: RichTabsNode, items: RichTabsItem[]): RichTabsItem | null;
|
|
126
|
+
onTabsItemClick(node: RichTabsNode, item: RichTabsItem, index: number): void;
|
|
127
|
+
resolveRecordSummaryTitle(node: RichRecordSummaryNode): string | null;
|
|
128
|
+
resolveRecordSummarySubtitle(node: RichRecordSummaryNode): string | null;
|
|
129
|
+
resolveRecordSummaryMeta(node: RichRecordSummaryNode): string | null;
|
|
130
|
+
resolveRecordSummaryFields(node: RichRecordSummaryNode): RichRecordSummaryField[];
|
|
131
|
+
resolveRecordSummaryFieldLabel(field: RichRecordSummaryField): string;
|
|
132
|
+
resolveRecordSummaryFieldValue(field: RichRecordSummaryField): string;
|
|
133
|
+
resolveLookupResultTitle(node: RichLookupResultNode): string | null;
|
|
134
|
+
resolveLookupResultSubtitle(node: RichLookupResultNode): string | null;
|
|
135
|
+
resolveLookupResultStatus(node: RichLookupResultNode): string;
|
|
136
|
+
resolveLookupResultEmptyText(node: RichLookupResultNode): string;
|
|
137
|
+
resolveLookupResultErrorText(node: RichLookupResultNode): string;
|
|
138
|
+
resolveLookupResultMeta(node: RichLookupResultNode): string | null;
|
|
139
|
+
resolveLookupResultFields(node: RichLookupResultNode): RichLookupResultField[];
|
|
140
|
+
resolveLookupResultFieldLabel(field: RichLookupResultField): string;
|
|
141
|
+
resolveLookupResultFieldValue(field: RichLookupResultField): string;
|
|
142
|
+
resolveLookupResultFieldHint(field: RichLookupResultField): string | null;
|
|
143
|
+
resolveLookupCardTitle(node: RichLookupCardNode): string | null;
|
|
144
|
+
resolveLookupCardSubtitle(node: RichLookupCardNode): string | null;
|
|
145
|
+
resolveLookupCardStatus(node: RichLookupCardNode): string;
|
|
146
|
+
resolveLookupCardEmptyText(node: RichLookupCardNode): string;
|
|
147
|
+
resolveLookupCardErrorText(node: RichLookupCardNode): string;
|
|
148
|
+
resolveLookupCardMeta(node: RichLookupCardNode): string | null;
|
|
149
|
+
resolveLookupCardCtaLabel(node: RichLookupCardNode): string;
|
|
150
|
+
resolveLookupCardFields(node: RichLookupCardNode): RichLookupResultField[];
|
|
151
|
+
resolveLookupCardFieldLabel(field: RichLookupResultField): string;
|
|
152
|
+
resolveLookupCardFieldValue(field: RichLookupResultField): string;
|
|
153
|
+
resolveLookupCardFieldHint(field: RichLookupResultField): string | null;
|
|
154
|
+
resolveRelatedRecordTitle(node: RichRelatedRecordNode): string | null;
|
|
155
|
+
resolveRelatedRecordSubtitle(node: RichRelatedRecordNode): string | null;
|
|
156
|
+
resolveRelatedRecordRelationLabel(node: RichRelatedRecordNode): string | null;
|
|
157
|
+
resolveRelatedRecordMeta(node: RichRelatedRecordNode): string | null;
|
|
158
|
+
resolveRelatedRecordCtaLabel(node: RichRelatedRecordNode): string;
|
|
159
|
+
resolveRelatedRecordFields(node: RichRelatedRecordNode): RichLookupResultField[];
|
|
160
|
+
resolveRelatedRecordFieldLabel(field: RichLookupResultField): string;
|
|
161
|
+
resolveRelatedRecordFieldValue(field: RichLookupResultField): string;
|
|
162
|
+
resolveRelatedRecordFieldHint(field: RichLookupResultField): string | null;
|
|
163
|
+
isRelatedRecordDisabled(node: RichRelatedRecordNode): boolean;
|
|
164
|
+
onRelatedRecordClick(node: RichRelatedRecordNode): void;
|
|
165
|
+
isLookupCardDisabled(node: RichLookupCardNode): boolean;
|
|
166
|
+
onLookupCardClick(node: RichLookupCardNode): void;
|
|
167
|
+
resolveActionCardTitle(node: RichActionCardNode): string | null;
|
|
168
|
+
resolveActionCardSubtitle(node: RichActionCardNode): string | null;
|
|
169
|
+
resolveActionCardMessage(node: RichActionCardNode): string | null;
|
|
170
|
+
resolveActionCardMeta(node: RichActionCardNode): string | null;
|
|
171
|
+
resolveActionCardCtaLabel(node: RichActionCardNode): string;
|
|
172
|
+
isActionCardDisabled(node: RichActionCardNode): boolean;
|
|
173
|
+
onActionCardClick(node: RichActionCardNode): void;
|
|
174
|
+
resolveCollapsibleCardTitle(node: RichCollapsibleCardNode): string | null;
|
|
175
|
+
resolveCollapsibleCardSubtitle(node: RichCollapsibleCardNode): string | null;
|
|
176
|
+
resolveCollapsibleCardNodes(node: RichCollapsibleCardNode): RenderableNode[];
|
|
177
|
+
resolveFormLauncherTitle(node: RichFormLauncherNode): string | null;
|
|
178
|
+
resolveFormLauncherSubtitle(node: RichFormLauncherNode): string | null;
|
|
179
|
+
resolveFormLauncherDescription(node: RichFormLauncherNode): string | null;
|
|
180
|
+
resolveFormLauncherCtaLabel(node: RichFormLauncherNode): string;
|
|
181
|
+
isFormLauncherDisabled(node: RichFormLauncherNode): boolean;
|
|
182
|
+
onFormLauncherClick(node: RichFormLauncherNode): void;
|
|
183
|
+
resolveDisclosureTitle(node: RichDisclosureNode): string | null;
|
|
184
|
+
resolveDisclosureSubtitle(node: RichDisclosureNode): string | null;
|
|
185
|
+
resolveDisclosureNodes(node: RichDisclosureNode): RenderableNode[];
|
|
186
|
+
resolveAccordionTitle(node: RichAccordionNode): string | null;
|
|
187
|
+
resolveAccordionItems(node: RichAccordionNode): RichAccordionItem[];
|
|
188
|
+
resolveAccordionItemTitle(item: RichAccordionItem): string | null;
|
|
189
|
+
resolveAccordionItemSubtitle(item: RichAccordionItem): string | null;
|
|
190
|
+
resolveAccordionItemNodes(item: RichAccordionItem): RenderableNode[];
|
|
56
191
|
resolveMediaBlockAvatarNodes(node: RichMediaBlockNode): RenderableNode[];
|
|
57
192
|
resolveMediaBlockTitleNodes(node: RichMediaBlockNode): RenderableNode[];
|
|
58
193
|
resolveMediaBlockSubtitleNodes(node: RichMediaBlockNode): RenderableNode[];
|
|
@@ -60,20 +195,63 @@ declare class PraxisRichContent {
|
|
|
60
195
|
resolveMediaBlockTrailingNodes(node: RichMediaBlockNode): RenderableNode[];
|
|
61
196
|
resolveTimelineTitle(node: RichTimelineNode): string | null;
|
|
62
197
|
resolveTimelineItems(node: RichTimelineNode): RichTimelineItem[];
|
|
198
|
+
resolveTimelineItemNumber(node: RichTimelineNode, item: RichTimelineItem, displayIndex: number): number;
|
|
199
|
+
resolveTimelinePosition(node: RichTimelineNode): string;
|
|
200
|
+
resolveTimelineOrientation(node: RichTimelineNode): string;
|
|
201
|
+
resolveTimelineOrder(node: RichTimelineNode): string;
|
|
202
|
+
resolveTimelineConnectorVariant(node: RichTimelineNode): string;
|
|
203
|
+
resolveTimelineMarkerVariant(node: RichTimelineNode): string;
|
|
204
|
+
resolveTimelineClasses(node: RichTimelineNode): string[];
|
|
205
|
+
resolveTimelineItemClasses(node: RichTimelineNode, item: RichTimelineItem): string[];
|
|
63
206
|
resolveTimelineItemTitle(item: RichTimelineItem): string | null;
|
|
64
207
|
resolveTimelineItemSubtitle(item: RichTimelineItem): string | null;
|
|
65
208
|
resolveTimelineItemMeta(item: RichTimelineItem): string | null;
|
|
209
|
+
resolveTimelineItemOpposite(item: RichTimelineItem): string | null;
|
|
66
210
|
resolveTimelineItemIcon(item: RichTimelineItem): string | null;
|
|
67
211
|
resolveTimelineItemBadge(item: RichTimelineItem): string | null;
|
|
212
|
+
private resolveTimelineColor;
|
|
213
|
+
private resolveTimelineMarkerStyle;
|
|
214
|
+
private resolveTimelineConnectorStyle;
|
|
68
215
|
resolvePresetNodes(node: RichPresetReferenceNode): RenderableNode[] | null;
|
|
216
|
+
private expandPresetReference;
|
|
217
|
+
private resolvePresetDocument;
|
|
218
|
+
private getPresetKey;
|
|
69
219
|
private buildEvaluationContext;
|
|
70
220
|
private resolveValue;
|
|
221
|
+
private resolveStructuredValue;
|
|
222
|
+
private resolveBooleanExpression;
|
|
223
|
+
private supportsRequiredCapabilities;
|
|
224
|
+
private isTabsItemVisible;
|
|
225
|
+
private evaluateRule;
|
|
226
|
+
private supportsItemRequiredCapabilities;
|
|
227
|
+
private resolveActiveTabsItemKey;
|
|
228
|
+
private resolveTabsItemKey;
|
|
229
|
+
private getRuntimeNodeKey;
|
|
71
230
|
private getByPath;
|
|
72
231
|
private resolveInitials;
|
|
73
232
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisRichContent, never>;
|
|
74
233
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PraxisRichContent, "praxis-rich-content", never, { "document": { "alias": "document"; "required": false; "isSignal": true; }; "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; "hostCapabilities": { "alias": "hostCapabilities"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "rootClassName": { "alias": "rootClassName"; "required": false; }; }, {}, never, never, true, never>;
|
|
75
234
|
}
|
|
76
235
|
|
|
236
|
+
interface RichContentValidationIssue {
|
|
237
|
+
path: string;
|
|
238
|
+
messageKey: string;
|
|
239
|
+
fallback: string;
|
|
240
|
+
}
|
|
241
|
+
interface RichContentValidationResult {
|
|
242
|
+
valid: boolean;
|
|
243
|
+
issues: RichContentValidationIssue[];
|
|
244
|
+
}
|
|
245
|
+
declare function validateRichContentDocument(value: unknown): RichContentValidationResult;
|
|
246
|
+
declare function isValidRichContentDocument(value: unknown): value is RichContentDocument;
|
|
247
|
+
|
|
248
|
+
type EditableTopLevelNode = RichTextNode | RichBadgeNode | RichIconNode | RichImageNode | RichLinkNode | RichMetricNode | RichProgressNode | RichActionButtonNode | RichComposeNode | RichCardNode | RichCalloutNode | RichCtaGroupNode | RichKeyValueListNode | RichPropertySheetNode | RichStatGroupNode | RichTabsNode | RichEmptyStateNode | RichRecordSummaryNode | RichLookupResultNode | RichLookupCardNode | RichRelatedRecordNode | RichActionCardNode | RichFormLauncherNode | RichCollapsibleCardNode | RichDisclosureNode | RichAccordionNode | RichMediaBlockNode | RichTimelineNode | RichPresetReferenceNode;
|
|
249
|
+
type EditableTopLevelNodeType = EditableTopLevelNode['type'];
|
|
250
|
+
type EditablePresenterNode = RichPresenterNode;
|
|
251
|
+
type EditablePresenterNodeType = EditablePresenterNode['type'];
|
|
252
|
+
type EditableCardContentNodeType = EditablePresenterNodeType | 'compose';
|
|
253
|
+
|
|
254
|
+
type EditableTimelineItemField = 'title' | 'titleExpr' | 'subtitle' | 'subtitleExpr' | 'meta' | 'metaExpr' | 'opposite' | 'oppositeExpr' | 'icon' | 'iconExpr' | 'badge' | 'badgeExpr' | 'markerColor' | 'markerStyle' | 'connectorColor' | 'connectorVariant';
|
|
77
255
|
interface PraxisRichContentEditorInputs {
|
|
78
256
|
document?: RichContentDocument | null;
|
|
79
257
|
layout?: 'block' | 'inline';
|
|
@@ -86,17 +264,28 @@ interface PraxisRichContentEditorValue {
|
|
|
86
264
|
declare class PraxisRichContentConfigEditor implements SettingsValueProvider, OnChanges, OnInit {
|
|
87
265
|
private readonly cdr;
|
|
88
266
|
private readonly i18n;
|
|
267
|
+
private readonly presetRegistry;
|
|
89
268
|
private readonly injectedData;
|
|
90
269
|
inputs: PraxisRichContentEditorInputs | null;
|
|
91
270
|
readonly isDirty$: BehaviorSubject<boolean>;
|
|
92
271
|
readonly isValid$: BehaviorSubject<boolean>;
|
|
93
272
|
readonly isBusy$: BehaviorSubject<boolean>;
|
|
273
|
+
readonly editableNodeTypes: ("text" | "icon" | "image" | "link" | "badge" | "metric" | "progress" | "actionButton" | "compose" | "card" | "callout" | "ctaGroup" | "keyValueList" | "propertySheet" | "statGroup" | "tabs" | "emptyState" | "recordSummary" | "lookupResult" | "lookupCard" | "relatedRecord" | "actionCard" | "formLauncher" | "collapsibleCard" | "disclosure" | "accordion" | "mediaBlock" | "timeline" | "preset")[];
|
|
274
|
+
readonly presenterNodeTypes: ("text" | "icon" | "image" | "link" | "badge" | "avatar" | "metric" | "progress" | "actionButton")[];
|
|
275
|
+
readonly cardContentNodeTypes: EditableCardContentNodeType[];
|
|
276
|
+
readonly presetOptions: _praxisui_rich_content.RichBlockPresetDefinition[];
|
|
94
277
|
documentJson: string;
|
|
95
278
|
layout: 'block' | 'inline';
|
|
96
279
|
rootClassName: string;
|
|
280
|
+
newNodeType: EditableTopLevelNodeType;
|
|
97
281
|
errorMessage: string;
|
|
98
282
|
valid: boolean;
|
|
283
|
+
parsedDocument: RichContentDocument | null;
|
|
284
|
+
validationIssues: RichContentValidationIssue[];
|
|
285
|
+
nodeCount: number;
|
|
286
|
+
nodeTypeSummary: string;
|
|
99
287
|
private initialInputs;
|
|
288
|
+
private pendingRemoval;
|
|
100
289
|
ngOnChanges(changes: SimpleChanges): void;
|
|
101
290
|
ngOnInit(): void;
|
|
102
291
|
getSettingsValue(): PraxisRichContentEditorValue | null;
|
|
@@ -106,9 +295,175 @@ declare class PraxisRichContentConfigEditor implements SettingsValueProvider, On
|
|
|
106
295
|
onDocumentJsonChange(): void;
|
|
107
296
|
tx(key: string, fallback: string): string;
|
|
108
297
|
useEmptyDocument(): void;
|
|
298
|
+
addTopLevelNode(): void;
|
|
299
|
+
removeTopLevelNode(index: number): void;
|
|
300
|
+
moveTopLevelNode(index: number, delta: number): void;
|
|
301
|
+
changeTopLevelNodeType(index: number, nextType: EditableTopLevelNodeType): void;
|
|
302
|
+
getStringField(node: RichBlockNode, field: string): string;
|
|
303
|
+
setStringField(index: number, field: string, value: string): void;
|
|
304
|
+
getNumberField(node: RichBlockNode, field: string): number | null;
|
|
305
|
+
setNumberField(index: number, field: string, value: number | string | null): void;
|
|
306
|
+
getActionButtonField(index: number, field: 'actionId' | 'payloadExpr' | 'availabilityExpr' | 'confirmMessage'): string;
|
|
307
|
+
setActionButtonField(index: number, field: 'actionId' | 'payloadExpr' | 'availabilityExpr' | 'confirmMessage', value: string): void;
|
|
308
|
+
getObjectStringField(value: unknown, field: string): string;
|
|
309
|
+
getBooleanField(node: RichBlockNode, field: string): boolean;
|
|
310
|
+
setBooleanField(index: number, field: string, value: boolean): void;
|
|
311
|
+
getCapabilityList(node: RichBlockNode): string;
|
|
312
|
+
setCapabilityList(index: number, value: string): void;
|
|
313
|
+
getCardSlotNodes(index: number, slot: 'header' | 'footer' | 'aside'): RichBlockNode[];
|
|
314
|
+
getCardContentNodes(index: number): Array<RichPresenterNode | RichComposeNode>;
|
|
315
|
+
getCardMediaField(index: number, field: string): string;
|
|
316
|
+
setCardMediaField(index: number, field: string, value: string): void;
|
|
317
|
+
addCardSlotNode(index: number, slot: 'header' | 'footer' | 'aside'): void;
|
|
318
|
+
addCardSlotNodeOfType(index: number, slot: 'header' | 'footer' | 'aside', type: EditablePresenterNodeType): void;
|
|
319
|
+
setCardSlotStringField(index: number, slot: 'header' | 'footer' | 'aside', itemIndex: number, field: string, value: string): void;
|
|
320
|
+
setCardSlotNumberField(index: number, slot: 'header' | 'footer' | 'aside', itemIndex: number, field: string, value: number | string | null): void;
|
|
321
|
+
changeCardSlotType(index: number, slot: 'header' | 'footer' | 'aside', itemIndex: number, type: EditablePresenterNodeType): void;
|
|
322
|
+
confirmCardSlotRemoval(index: number, slot: 'header' | 'footer' | 'aside', itemIndex: number): void;
|
|
323
|
+
getCardActions(index: number): RichActionButtonNode[];
|
|
324
|
+
addCardAction(index: number): void;
|
|
325
|
+
addCardActionPreset(index: number, preset: 'primary' | 'secondary'): void;
|
|
326
|
+
setCardActionField(index: number, actionIndex: number, field: string, value: string): void;
|
|
327
|
+
confirmCardActionRemoval(index: number, actionIndex: number): void;
|
|
328
|
+
getNodeActions(index: number): RichActionButtonNode[];
|
|
329
|
+
addNodeAction(index: number): void;
|
|
330
|
+
addNodeActionPreset(index: number, preset: 'primary' | 'secondary'): void;
|
|
331
|
+
setNodeActionField(index: number, actionIndex: number, field: string, value: string): void;
|
|
332
|
+
confirmNodeActionRemoval(index: number, actionIndex: number): void;
|
|
333
|
+
getKeyValueItemField(index: number, itemIndex: number, field: 'label' | 'valueExpr'): string;
|
|
334
|
+
setKeyValueItemField(index: number, itemIndex: number, field: 'label' | 'valueExpr', value: string): void;
|
|
335
|
+
getRecordSummaryField(index: number, itemIndex: number, field: 'label' | 'valueExpr'): string;
|
|
336
|
+
setRecordSummaryField(index: number, itemIndex: number, field: 'label' | 'valueExpr', value: string): void;
|
|
337
|
+
getLookupResultField(index: number, itemIndex: number, field: 'label' | 'valueExpr' | 'hint'): string;
|
|
338
|
+
setLookupResultField(index: number, itemIndex: number, field: 'label' | 'valueExpr' | 'hint', value: string): void;
|
|
339
|
+
getLookupCardField(index: number, itemIndex: number, field: 'label' | 'valueExpr' | 'hint'): string;
|
|
340
|
+
setLookupCardField(index: number, itemIndex: number, field: 'label' | 'valueExpr' | 'hint', value: string): void;
|
|
341
|
+
getLookupCardActionField(index: number, field: 'actionId' | 'payloadExpr' | 'availabilityExpr' | 'confirmMessage'): string;
|
|
342
|
+
setLookupCardActionField(index: number, field: 'actionId' | 'payloadExpr' | 'availabilityExpr' | 'confirmMessage', value: string): void;
|
|
343
|
+
getLookupCardSecondaryActions(index: number): RichActionButtonNode[];
|
|
344
|
+
addLookupCardSecondaryAction(index: number): void;
|
|
345
|
+
addLookupCardSecondaryActionPreset(index: number, preset: 'primary' | 'secondary'): void;
|
|
346
|
+
setLookupCardSecondaryActionField(index: number, actionIndex: number, field: string, value: string): void;
|
|
347
|
+
confirmLookupCardSecondaryActionRemoval(index: number, actionIndex: number): void;
|
|
348
|
+
getRelatedRecordField(index: number, itemIndex: number, field: 'label' | 'valueExpr' | 'hint'): string;
|
|
349
|
+
setRelatedRecordField(index: number, itemIndex: number, field: 'label' | 'valueExpr' | 'hint', value: string): void;
|
|
350
|
+
getRelatedRecordActionField(index: number, field: 'actionId' | 'payloadExpr' | 'availabilityExpr' | 'confirmMessage'): string;
|
|
351
|
+
setRelatedRecordActionField(index: number, field: 'actionId' | 'payloadExpr' | 'availabilityExpr' | 'confirmMessage', value: string): void;
|
|
352
|
+
getRelatedRecordSecondaryActions(index: number): RichActionButtonNode[];
|
|
353
|
+
addRelatedRecordSecondaryAction(index: number): void;
|
|
354
|
+
addRelatedRecordSecondaryActionPreset(index: number, preset: 'primary' | 'secondary'): void;
|
|
355
|
+
setRelatedRecordSecondaryActionField(index: number, actionIndex: number, field: string, value: string): void;
|
|
356
|
+
confirmRelatedRecordSecondaryActionRemoval(index: number, actionIndex: number): void;
|
|
357
|
+
getPropertySheetItemField(index: number, itemIndex: number, field: 'label' | 'valueExpr' | 'hint'): string;
|
|
358
|
+
setPropertySheetItemField(index: number, itemIndex: number, field: 'label' | 'valueExpr' | 'hint', value: string): void;
|
|
359
|
+
getActionCardActionField(index: number, field: 'actionId' | 'payloadExpr' | 'availabilityExpr' | 'confirmMessage'): string;
|
|
360
|
+
setActionCardActionField(index: number, field: 'actionId' | 'payloadExpr' | 'availabilityExpr' | 'confirmMessage', value: string): void;
|
|
361
|
+
getStatGroupItemField(index: number, itemIndex: number, field: 'label' | 'valueExpr' | 'caption' | 'icon' | 'tone'): string;
|
|
362
|
+
setStatGroupItemField(index: number, itemIndex: number, field: 'label' | 'valueExpr' | 'caption' | 'icon' | 'tone', value: string): void;
|
|
363
|
+
getTabsItems(index: number): Array<RichTabsNode['items'][number]>;
|
|
364
|
+
addTabsItem(index: number): void;
|
|
365
|
+
removeTabsItem(index: number, itemIndex: number): void;
|
|
366
|
+
getTabsItemField(index: number, itemIndex: number, field: 'id' | 'label' | 'icon' | 'badge'): string;
|
|
367
|
+
setTabsItemField(index: number, itemIndex: number, field: 'id' | 'label' | 'icon' | 'badge', value: string): void;
|
|
368
|
+
getActionCardSecondaryActions(index: number): RichActionButtonNode[];
|
|
369
|
+
addActionCardSecondaryAction(index: number): void;
|
|
370
|
+
addActionCardSecondaryActionPreset(index: number, preset: 'primary' | 'secondary'): void;
|
|
371
|
+
setActionCardSecondaryActionField(index: number, actionIndex: number, field: string, value: string): void;
|
|
372
|
+
confirmActionCardSecondaryActionRemoval(index: number, actionIndex: number): void;
|
|
373
|
+
getFormLauncherActionField(index: number, field: 'actionId' | 'payloadExpr' | 'availabilityExpr' | 'confirmMessage'): string;
|
|
374
|
+
setFormLauncherActionField(index: number, field: 'actionId' | 'payloadExpr' | 'availabilityExpr' | 'confirmMessage', value: string): void;
|
|
375
|
+
getFormLauncherSecondaryActions(index: number): RichActionButtonNode[];
|
|
376
|
+
addFormLauncherSecondaryAction(index: number): void;
|
|
377
|
+
addFormLauncherSecondaryActionPreset(index: number, preset: 'primary' | 'secondary'): void;
|
|
378
|
+
setFormLauncherSecondaryActionField(index: number, actionIndex: number, field: string, value: string): void;
|
|
379
|
+
confirmFormLauncherSecondaryActionRemoval(index: number, actionIndex: number): void;
|
|
380
|
+
addAccordionItem(index: number): void;
|
|
381
|
+
getAccordionItemField(index: number, itemIndex: number, field: 'title' | 'subtitle' | 'icon'): string;
|
|
382
|
+
setAccordionItemField(index: number, itemIndex: number, field: 'title' | 'subtitle' | 'icon', value: string): void;
|
|
383
|
+
getAccordionItemBooleanField(index: number, itemIndex: number, field: 'defaultExpanded'): boolean;
|
|
384
|
+
setAccordionItemBooleanField(index: number, itemIndex: number, field: 'defaultExpanded', value: boolean): void;
|
|
385
|
+
getAccordionItemActions(index: number, itemIndex: number): RichActionButtonNode[];
|
|
386
|
+
addAccordionItemAction(index: number, itemIndex: number): void;
|
|
387
|
+
addAccordionItemActionPreset(index: number, itemIndex: number, preset: 'primary' | 'secondary'): void;
|
|
388
|
+
setAccordionItemActionField(index: number, itemIndex: number, actionIndex: number, field: string, value: string): void;
|
|
389
|
+
confirmAccordionItemActionRemoval(index: number, itemIndex: number, actionIndex: number): void;
|
|
390
|
+
confirmAccordionItemRemoval(index: number, itemIndex: number): void;
|
|
391
|
+
getVisibleWhenPath(node: RichBlockNode): string;
|
|
392
|
+
getVisibleWhenValue(node: RichBlockNode): string;
|
|
393
|
+
setVisibleWhenPath(index: number, path: string): void;
|
|
394
|
+
setVisibleWhenValue(index: number, value: string): void;
|
|
395
|
+
getFirstStyleName(node: RichBlockNode): string;
|
|
396
|
+
getFirstStyleValue(node: RichBlockNode): string;
|
|
397
|
+
setFirstStyleName(index: number, propertyName: string): void;
|
|
398
|
+
setFirstStyleValue(index: number, propertyValue: string): void;
|
|
399
|
+
requestTopLevelNodeRemoval(index: number): void;
|
|
400
|
+
confirmTopLevelNodeRemoval(index: number): void;
|
|
401
|
+
requestNestedRemoval(scope: string, index: number): void;
|
|
402
|
+
cancelRemoval(): void;
|
|
403
|
+
isRemovalPending(scope: string, index: number): boolean;
|
|
404
|
+
addCardContentNode(cardIndex: number): void;
|
|
405
|
+
setCardContentStringField(cardIndex: number, contentIndex: number, field: string, value: string): void;
|
|
406
|
+
setCardContentNumberField(cardIndex: number, contentIndex: number, field: string, value: number | string | null): void;
|
|
407
|
+
changeCardContentType(cardIndex: number, contentIndex: number, type: EditablePresenterNodeType): void;
|
|
408
|
+
confirmCardContentRemoval(cardIndex: number, contentIndex: number): void;
|
|
409
|
+
addComposeItem(composeIndex: number): void;
|
|
410
|
+
setComposeItemStringField(composeIndex: number, itemIndex: number, field: string, value: string): void;
|
|
411
|
+
setComposeItemNumberField(composeIndex: number, itemIndex: number, field: string, value: number | string | null): void;
|
|
412
|
+
changeComposeItemType(composeIndex: number, itemIndex: number, type: EditablePresenterNodeType): void;
|
|
413
|
+
confirmComposeItemRemoval(composeIndex: number, itemIndex: number): void;
|
|
414
|
+
isPresenterNode(node: RichBlockNode): node is RichPresenterNode;
|
|
415
|
+
isCardContentEditable(type: string): type is EditablePresenterNodeType;
|
|
416
|
+
setMediaBlockAvatarField(index: number, field: string, value: string): void;
|
|
417
|
+
getMediaBlockAvatarField(index: number, field: string): string;
|
|
418
|
+
setMediaBlockTextField(index: number, field: 'title' | 'subtitle', value: string): void;
|
|
419
|
+
getMediaBlockTextField(index: number, field: 'title' | 'subtitle'): string;
|
|
420
|
+
addTimelineItem(index: number): void;
|
|
421
|
+
setTimelineItemField(index: number, itemIndex: number, field: EditableTimelineItemField, value: string): void;
|
|
422
|
+
getTimelineItemField(index: number, itemIndex: number, field: EditableTimelineItemField): string;
|
|
423
|
+
confirmTimelineItemRemoval(index: number, itemIndex: number): void;
|
|
424
|
+
setPresetSelection(index: number, optionValue: string): void;
|
|
425
|
+
getPresetSelection(node: RichBlockNode): string;
|
|
426
|
+
getPresetOptionValue(ref: CorePresetRef): string;
|
|
427
|
+
getIssueMessages(path: string): string[];
|
|
428
|
+
isEditableNodeType(type: string): type is EditableTopLevelNodeType;
|
|
429
|
+
private isPresenterNodeType;
|
|
109
430
|
private load;
|
|
110
431
|
private normalizeInputs;
|
|
432
|
+
private ensureEditableDocument;
|
|
433
|
+
private syncStructuredDocumentChange;
|
|
434
|
+
private createDefaultNode;
|
|
435
|
+
private getDefaultPresetRef;
|
|
436
|
+
private ensureCardNode;
|
|
437
|
+
private ensureCardSlotNodes;
|
|
438
|
+
private ensureCardContentNodes;
|
|
439
|
+
private ensureCardActions;
|
|
440
|
+
private ensureActionButtonNode;
|
|
441
|
+
private ensureComposeNode;
|
|
442
|
+
private ensureMediaBlockNode;
|
|
443
|
+
private ensureKeyValueListNode;
|
|
444
|
+
private ensureMediaBlockAvatar;
|
|
445
|
+
private ensureRecordSummaryNode;
|
|
446
|
+
private ensureLookupResultNode;
|
|
447
|
+
private ensureLookupCardNode;
|
|
448
|
+
private ensureRelatedRecordNode;
|
|
449
|
+
private ensurePropertySheetNode;
|
|
450
|
+
private ensureStatGroupNode;
|
|
451
|
+
private ensureTabsNode;
|
|
452
|
+
private ensureFormLauncherNode;
|
|
453
|
+
private ensureActionCardNode;
|
|
454
|
+
private ensureNodeActions;
|
|
455
|
+
private ensureFormLauncherSecondaryActions;
|
|
456
|
+
private ensureLookupCardSecondaryActions;
|
|
457
|
+
private ensureRelatedRecordSecondaryActions;
|
|
458
|
+
private ensureActionCardSecondaryActions;
|
|
459
|
+
private ensureAccordionNode;
|
|
460
|
+
private ensureAccordionItemActions;
|
|
461
|
+
private setActionNodeField;
|
|
462
|
+
private createActionPreset;
|
|
463
|
+
private ensureTimelineNode;
|
|
111
464
|
private parseDocument;
|
|
465
|
+
private setInvalidState;
|
|
466
|
+
private updateDocumentOverview;
|
|
112
467
|
private matchesInitialState;
|
|
113
468
|
private cloneInputs;
|
|
114
469
|
private cloneValue;
|
|
@@ -131,6 +486,7 @@ declare class RichContentPresetRegistryService {
|
|
|
131
486
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RichContentPresetRegistryService, never>;
|
|
132
487
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<RichContentPresetRegistryService>;
|
|
133
488
|
}
|
|
489
|
+
declare function providePraxisDefaultRichBlockPresets(): Provider;
|
|
134
490
|
|
|
135
491
|
declare const PRAXIS_RICH_CONTENT_COMPONENT_METADATA: ComponentDocMeta;
|
|
136
492
|
declare function providePraxisRichContentMetadata(): Provider;
|
|
@@ -153,6 +509,8 @@ interface RichContentCapabilityCatalog extends AiCapabilityCatalog {
|
|
|
153
509
|
}
|
|
154
510
|
declare const RICH_CONTENT_AI_CAPABILITIES: RichContentCapabilityCatalog;
|
|
155
511
|
|
|
512
|
+
declare const PRAXIS_RICH_CONTENT_AUTHORING_MANIFEST: ComponentAuthoringManifest;
|
|
513
|
+
|
|
156
514
|
interface PraxisRichContentI18nOptions {
|
|
157
515
|
locale?: string;
|
|
158
516
|
fallbackLocale?: string;
|
|
@@ -162,5 +520,5 @@ declare function createPraxisRichContentI18nConfig(options?: PraxisRichContentI1
|
|
|
162
520
|
declare function providePraxisRichContentI18n(options?: PraxisRichContentI18nOptions): _angular_core.Provider[];
|
|
163
521
|
declare function resolvePraxisRichContentText(i18n: PraxisI18nService, key: string, fallback: string): string;
|
|
164
522
|
|
|
165
|
-
export { PRAXIS_RICH_BLOCK_PRESETS, PRAXIS_RICH_CONTENT_COMPONENT_METADATA, PraxisRichContent, PraxisRichContentConfigEditor, RICH_CONTENT_AI_CAPABILITIES, RichContentPresetRegistryService, createPraxisRichContentI18nConfig, providePraxisRichContentI18n, providePraxisRichContentMetadata, resolvePraxisRichContentText };
|
|
166
|
-
export type { PraxisRichContentEditorInputs, PraxisRichContentEditorValue, PraxisRichContentI18nOptions, RichBlockPresetDefinition, RichContentCapability, RichContentCapabilityCatalog, RichContentCapabilityCategory, RichContentValueKind };
|
|
523
|
+
export { PRAXIS_RICH_BLOCK_PRESETS, PRAXIS_RICH_CONTENT_AUTHORING_MANIFEST, PRAXIS_RICH_CONTENT_COMPONENT_METADATA, PraxisRichContent, PraxisRichContentConfigEditor, RICH_CONTENT_AI_CAPABILITIES, RichContentPresetRegistryService, createPraxisRichContentI18nConfig, isValidRichContentDocument, providePraxisDefaultRichBlockPresets, providePraxisRichContentI18n, providePraxisRichContentMetadata, resolvePraxisRichContentText, validateRichContentDocument };
|
|
524
|
+
export type { PraxisRichContentEditorInputs, PraxisRichContentEditorValue, PraxisRichContentI18nOptions, RichBlockPresetDefinition, RichContentCapability, RichContentCapabilityCatalog, RichContentCapabilityCategory, RichContentValidationIssue, RichContentValidationResult, RichContentValueKind };
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/rich-content",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.21",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^20.3.0",
|
|
6
6
|
"@angular/core": "^20.3.0",
|
|
7
|
-
"@praxisui/core": "^8.0.0-beta.
|
|
7
|
+
"@praxisui/core": "^8.0.0-beta.21",
|
|
8
|
+
"@angular/forms": "^20.3.0",
|
|
9
|
+
"rxjs": "~7.8.0"
|
|
8
10
|
},
|
|
9
11
|
"dependencies": {
|
|
10
12
|
"tslib": "^2.3.0"
|