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