@praxisui/rich-content 9.0.0-beta.6 → 9.0.0-beta.8
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/fesm2022/praxisui-rich-content.mjs +1533 -226
- package/package.json +2 -2
- package/types/praxisui-rich-content.d.ts +29 -2
|
@@ -13,15 +13,32 @@ const PRAXIS_RICH_CONTENT_EN_US = {
|
|
|
13
13
|
'praxis.richContent.editor.subtitle': 'Edit the canonical document consumed by the renderer. The saved payload preserves the remaining widget inputs.',
|
|
14
14
|
'praxis.richContent.editor.valid': 'Valid document',
|
|
15
15
|
'praxis.richContent.editor.invalid': 'Invalid JSON',
|
|
16
|
+
'praxis.richContent.editor.invalidBadge': 'Invalid',
|
|
16
17
|
'praxis.richContent.editor.layout': 'Layout',
|
|
17
18
|
'praxis.richContent.editor.layout.block': 'Block',
|
|
18
19
|
'praxis.richContent.editor.layout.inline': 'Inline',
|
|
19
20
|
'praxis.richContent.editor.rootClass': 'Root class',
|
|
20
21
|
'praxis.richContent.editor.rootClassPlaceholder': 'Example: employee-expansion-rich',
|
|
22
|
+
'praxis.richContent.editor.workbenchTabs': 'Editor sections',
|
|
23
|
+
'praxis.richContent.editor.guidedEditing': 'Guided editing',
|
|
21
24
|
'praxis.richContent.editor.document': 'Advanced JSON',
|
|
25
|
+
'praxis.richContent.editor.documentJson': 'Canonical document JSON',
|
|
22
26
|
'praxis.richContent.editor.documentHelp': 'Edit the canonical RichContentDocument. The inspector validates the shape and renders a preview before apply or save.',
|
|
27
|
+
'praxis.richContent.editor.documentAdvancedHelp': 'Use JSON for diagnostics, migration and advanced fields that are not yet surfaced by guided controls.',
|
|
23
28
|
'praxis.richContent.editor.blocks': 'Blocks',
|
|
24
29
|
'praxis.richContent.editor.blocksHelp': 'Create and edit common top-level rich-content blocks. Use JSON for advanced nested structures.',
|
|
30
|
+
'praxis.richContent.editor.structure': 'Document structure',
|
|
31
|
+
'praxis.richContent.editor.structureHelp': 'Select a block to edit its properties.',
|
|
32
|
+
'praxis.richContent.editor.properties': 'Properties',
|
|
33
|
+
'praxis.richContent.editor.propertiesHelp': 'Edit the selected block without leaving the document structure.',
|
|
34
|
+
'praxis.richContent.editor.intentNavigation': 'Property sections',
|
|
35
|
+
'praxis.richContent.editor.intent.content': 'Content',
|
|
36
|
+
'praxis.richContent.editor.intent.contentHelp': 'Primary block fields',
|
|
37
|
+
'praxis.richContent.editor.intent.presentation': 'Presentation',
|
|
38
|
+
'praxis.richContent.editor.intent.presentationHelp': 'Visual affordances',
|
|
39
|
+
'praxis.richContent.editor.intent.dataRules': 'Data and rules',
|
|
40
|
+
'praxis.richContent.editor.intent.dataRulesHelp': 'Metadata and gates',
|
|
41
|
+
'praxis.richContent.editor.hasIssues': 'Needs attention',
|
|
25
42
|
'praxis.richContent.editor.block': 'Block',
|
|
26
43
|
'praxis.richContent.editor.blockType': 'Block type',
|
|
27
44
|
'praxis.richContent.editor.addBlock': 'Add block',
|
|
@@ -43,6 +60,8 @@ const PRAXIS_RICH_CONTENT_EN_US = {
|
|
|
43
60
|
'praxis.richContent.editor.cardContentHelp': 'Card content is preserved in JSON. Use advanced JSON for nested card nodes.',
|
|
44
61
|
'praxis.richContent.editor.nodeId': 'Stable id',
|
|
45
62
|
'praxis.richContent.editor.nodeIdPlaceholder': 'Example: hero-title',
|
|
63
|
+
'praxis.richContent.editor.advancedDataRules': 'Advanced data and rules',
|
|
64
|
+
'praxis.richContent.editor.advancedDataRulesHelp': 'Metadata, capability gates, visibility and safe style.',
|
|
46
65
|
'praxis.richContent.editor.visibilityRule': 'Visibility rule',
|
|
47
66
|
'praxis.richContent.editor.safeStyle': 'Safe style',
|
|
48
67
|
'praxis.richContent.editor.nodeType.text': 'Text',
|
|
@@ -86,10 +105,12 @@ const PRAXIS_RICH_CONTENT_EN_US = {
|
|
|
86
105
|
'praxis.richContent.editor.field.icon': 'Icon',
|
|
87
106
|
'praxis.richContent.editor.field.ariaLabel': 'Accessible label',
|
|
88
107
|
'praxis.richContent.editor.field.src': 'Image URL',
|
|
108
|
+
'praxis.richContent.editor.field.srcExpr': 'Image URL binding',
|
|
89
109
|
'praxis.richContent.editor.field.href': 'Link URL',
|
|
90
110
|
'praxis.richContent.editor.field.target': 'Target',
|
|
91
111
|
'praxis.richContent.editor.field.rel': 'Rel',
|
|
92
112
|
'praxis.richContent.editor.field.alt': 'Alternative text',
|
|
113
|
+
'praxis.richContent.editor.field.altExpr': 'Alt text binding',
|
|
93
114
|
'praxis.richContent.editor.field.testId': 'Test id',
|
|
94
115
|
'praxis.richContent.editor.field.className': 'CSS class',
|
|
95
116
|
'praxis.richContent.editor.field.visibleWhenPath': 'Context path',
|
|
@@ -99,8 +120,10 @@ const PRAXIS_RICH_CONTENT_EN_US = {
|
|
|
99
120
|
'praxis.richContent.editor.field.valueExpr': 'Value binding',
|
|
100
121
|
'praxis.richContent.editor.field.captionExpr': 'Caption binding',
|
|
101
122
|
'praxis.richContent.editor.field.max': 'Maximum',
|
|
123
|
+
'praxis.richContent.editor.field.showPercent': 'Show percent',
|
|
102
124
|
'praxis.richContent.editor.field.direction': 'Direction',
|
|
103
125
|
'praxis.richContent.editor.field.gap': 'Gap',
|
|
126
|
+
'praxis.richContent.editor.field.wrap': 'Wrap items',
|
|
104
127
|
'praxis.richContent.editor.field.avatarName': 'Avatar name',
|
|
105
128
|
'praxis.richContent.editor.field.avatarImage': 'Avatar image',
|
|
106
129
|
'praxis.richContent.editor.field.nameExpr': 'Name binding',
|
|
@@ -112,6 +135,7 @@ const PRAXIS_RICH_CONTENT_EN_US = {
|
|
|
112
135
|
'praxis.richContent.editor.field.meta': 'Meta',
|
|
113
136
|
'praxis.richContent.editor.field.opposite': 'Opposite content',
|
|
114
137
|
'praxis.richContent.editor.field.badge': 'Badge',
|
|
138
|
+
'praxis.richContent.editor.field.badgeExpr': 'Badge binding',
|
|
115
139
|
'praxis.richContent.editor.field.preset': 'Preset',
|
|
116
140
|
'praxis.richContent.editor.field.title': 'Title',
|
|
117
141
|
'praxis.richContent.editor.field.subtitle': 'Subtitle',
|
|
@@ -168,11 +192,29 @@ const PRAXIS_RICH_CONTENT_EN_US = {
|
|
|
168
192
|
'praxis.richContent.editor.field.ctaLabel': 'CTA label',
|
|
169
193
|
'praxis.richContent.editor.field.ctaIcon': 'CTA icon',
|
|
170
194
|
'praxis.richContent.editor.field.size': 'Size',
|
|
195
|
+
'praxis.richContent.editor.field.density': 'Density',
|
|
196
|
+
'praxis.richContent.editor.field.loading': 'Loading',
|
|
197
|
+
'praxis.richContent.editor.field.loadingExpr': 'Loading binding',
|
|
198
|
+
'praxis.richContent.editor.field.active': 'Active',
|
|
199
|
+
'praxis.richContent.editor.field.activeExpr': 'Active binding',
|
|
171
200
|
'praxis.richContent.editor.field.mediaKind': 'Media',
|
|
172
201
|
'praxis.richContent.editor.field.mediaSrc': 'Media source',
|
|
202
|
+
'praxis.richContent.editor.field.mediaSrcExpr': 'Media source binding',
|
|
173
203
|
'praxis.richContent.editor.field.mediaAlt': 'Media alt text',
|
|
204
|
+
'praxis.richContent.editor.field.mediaAltExpr': 'Media alt binding',
|
|
174
205
|
'praxis.richContent.editor.field.mediaIcon': 'Media icon',
|
|
206
|
+
'praxis.richContent.editor.field.mediaLabel': 'Media label',
|
|
207
|
+
'praxis.richContent.editor.field.mediaLabelExpr': 'Media label binding',
|
|
208
|
+
'praxis.richContent.editor.field.aspectRatio': 'Aspect ratio',
|
|
175
209
|
'praxis.richContent.editor.field.mediaPlacement': 'Media placement',
|
|
210
|
+
'praxis.richContent.editor.field.interactionMode': 'Interaction mode',
|
|
211
|
+
'praxis.richContent.editor.field.selected': 'Selected',
|
|
212
|
+
'praxis.richContent.editor.field.selectedExpr': 'Selected binding',
|
|
213
|
+
'praxis.richContent.editor.field.interactionActionId': 'Interaction action ID',
|
|
214
|
+
'praxis.richContent.editor.field.accessibilityRole': 'Accessibility role',
|
|
215
|
+
'praxis.richContent.editor.field.ariaLabelExpr': 'Accessible label binding',
|
|
216
|
+
'praxis.richContent.editor.field.requiresCapabilities': 'Capabilities',
|
|
217
|
+
'praxis.richContent.editor.field.capabilityMode': 'Capability mode',
|
|
176
218
|
'praxis.richContent.editor.decisionGovernance': 'Decision governance',
|
|
177
219
|
'praxis.richContent.editor.decisionEvidence': 'Evidence',
|
|
178
220
|
'praxis.richContent.editor.decisionPrimaryAction': 'Primary action',
|
|
@@ -210,6 +252,20 @@ const PRAXIS_RICH_CONTENT_EN_US = {
|
|
|
210
252
|
'praxis.richContent.editor.placeholder.supersedesExpr': '${decision.supersedes}',
|
|
211
253
|
'praxis.richContent.editor.placeholder.evidenceLabelExpr': '${evidence.label}',
|
|
212
254
|
'praxis.richContent.editor.placeholder.evidenceSourceExpr': '${evidence.source}',
|
|
255
|
+
'praxis.richContent.editor.placeholder.tabLabelExpr': 'row.tabLabel',
|
|
256
|
+
'praxis.richContent.editor.placeholder.badgeExpr': 'row.badge',
|
|
257
|
+
'praxis.richContent.editor.placeholder.requiresCapabilities': 'form.mode.edit, employee.open',
|
|
258
|
+
'praxis.richContent.editor.placeholder.srcExpr': 'row.imageUrl',
|
|
259
|
+
'praxis.richContent.editor.placeholder.altExpr': 'row.imageAlt',
|
|
260
|
+
'praxis.richContent.editor.placeholder.loadingExpr': 'row.loading',
|
|
261
|
+
'praxis.richContent.editor.placeholder.activeExpr': 'row.active',
|
|
262
|
+
'praxis.richContent.editor.placeholder.mediaSrcExpr': 'row.mediaUrl',
|
|
263
|
+
'praxis.richContent.editor.placeholder.mediaAltExpr': 'row.mediaAlt',
|
|
264
|
+
'praxis.richContent.editor.placeholder.mediaLabelExpr': 'row.mediaLabel',
|
|
265
|
+
'praxis.richContent.editor.placeholder.aspectRatio': '16 / 9',
|
|
266
|
+
'praxis.richContent.editor.placeholder.selectedExpr': 'row.selected',
|
|
267
|
+
'praxis.richContent.editor.placeholder.actionId': 'host.action.open',
|
|
268
|
+
'praxis.richContent.editor.placeholder.ariaLabelExpr': 'row.ariaLabel',
|
|
213
269
|
'praxis.richContent.editor.cardVariant.outlined': 'Outlined',
|
|
214
270
|
'praxis.richContent.editor.cardVariant.elevated': 'Elevated',
|
|
215
271
|
'praxis.richContent.editor.cardVariant.filled': 'Filled',
|
|
@@ -218,8 +274,18 @@ const PRAXIS_RICH_CONTENT_EN_US = {
|
|
|
218
274
|
'praxis.richContent.editor.size.sm': 'Small',
|
|
219
275
|
'praxis.richContent.editor.size.md': 'Medium',
|
|
220
276
|
'praxis.richContent.editor.size.lg': 'Large',
|
|
277
|
+
'praxis.richContent.editor.density.compact': 'Compact',
|
|
278
|
+
'praxis.richContent.editor.density.comfortable': 'Comfortable',
|
|
221
279
|
'praxis.richContent.editor.orientation.vertical': 'Vertical',
|
|
222
280
|
'praxis.richContent.editor.orientation.horizontal': 'Horizontal',
|
|
281
|
+
'praxis.richContent.editor.interaction.none': 'None',
|
|
282
|
+
'praxis.richContent.editor.interaction.action': 'Action',
|
|
283
|
+
'praxis.richContent.editor.interaction.selectable': 'Selectable',
|
|
284
|
+
'praxis.richContent.editor.accessibilityRole.article': 'Article',
|
|
285
|
+
'praxis.richContent.editor.accessibilityRole.group': 'Group',
|
|
286
|
+
'praxis.richContent.editor.accessibilityRole.button': 'Button',
|
|
287
|
+
'praxis.richContent.editor.capabilityMode.all': 'All',
|
|
288
|
+
'praxis.richContent.editor.capabilityMode.any': 'Any',
|
|
223
289
|
'praxis.richContent.editor.mediaKind.image': 'Image',
|
|
224
290
|
'praxis.richContent.editor.mediaKind.video': 'Video',
|
|
225
291
|
'praxis.richContent.editor.mediaKind.icon': 'Icon',
|
|
@@ -366,6 +432,8 @@ const PRAXIS_RICH_CONTENT_EN_US = {
|
|
|
366
432
|
'praxis.richContent.editor.nodeTypes': 'Types',
|
|
367
433
|
'praxis.richContent.editor.none': 'None',
|
|
368
434
|
'praxis.richContent.editor.preview': 'Preview',
|
|
435
|
+
'praxis.richContent.editor.previewHelp': 'Inspect the materialized document without mixing preview with authoring fields.',
|
|
436
|
+
'praxis.richContent.editor.previewUnavailable': 'Preview is unavailable until the document is valid.',
|
|
369
437
|
'praxis.richContent.editor.restore': 'Restore',
|
|
370
438
|
'praxis.richContent.editor.emptyDocument': 'Empty document',
|
|
371
439
|
'praxis.richContent.editor.validation.documentShape': 'The document must be a valid RichContentDocument.',
|
|
@@ -408,15 +476,32 @@ const PRAXIS_RICH_CONTENT_PT_BR = {
|
|
|
408
476
|
'praxis.richContent.editor.subtitle': 'Edite o documento canônico consumido pelo renderer. O payload salvo preserva os demais inputs do widget.',
|
|
409
477
|
'praxis.richContent.editor.valid': 'Documento válido',
|
|
410
478
|
'praxis.richContent.editor.invalid': 'JSON inválido',
|
|
479
|
+
'praxis.richContent.editor.invalidBadge': 'Inválido',
|
|
411
480
|
'praxis.richContent.editor.layout': 'Layout',
|
|
412
481
|
'praxis.richContent.editor.layout.block': 'Bloco',
|
|
413
482
|
'praxis.richContent.editor.layout.inline': 'Inline',
|
|
414
483
|
'praxis.richContent.editor.rootClass': 'Classe raiz',
|
|
415
484
|
'praxis.richContent.editor.rootClassPlaceholder': 'Exemplo: employee-expansion-rich',
|
|
485
|
+
'praxis.richContent.editor.workbenchTabs': 'Seções do editor',
|
|
486
|
+
'praxis.richContent.editor.guidedEditing': 'Edição guiada',
|
|
416
487
|
'praxis.richContent.editor.document': 'JSON avançado',
|
|
488
|
+
'praxis.richContent.editor.documentJson': 'JSON do documento canônico',
|
|
417
489
|
'praxis.richContent.editor.documentHelp': 'Edite o RichContentDocument canônico. O inspetor valida o formato e renderiza uma prévia antes de aplicar ou salvar.',
|
|
490
|
+
'praxis.richContent.editor.documentAdvancedHelp': 'Use JSON para diagnóstico, migração e campos avançados que ainda não estão materializados nos controles guiados.',
|
|
418
491
|
'praxis.richContent.editor.blocks': 'Blocos',
|
|
419
492
|
'praxis.richContent.editor.blocksHelp': 'Crie e edite blocos comuns de nível superior de rich-content. Use JSON para estruturas aninhadas avançadas.',
|
|
493
|
+
'praxis.richContent.editor.structure': 'Estrutura do documento',
|
|
494
|
+
'praxis.richContent.editor.structureHelp': 'Selecione um bloco para editar suas propriedades.',
|
|
495
|
+
'praxis.richContent.editor.properties': 'Propriedades',
|
|
496
|
+
'praxis.richContent.editor.propertiesHelp': 'Edite o bloco selecionado sem sair da estrutura do documento.',
|
|
497
|
+
'praxis.richContent.editor.intentNavigation': 'Seções de propriedades',
|
|
498
|
+
'praxis.richContent.editor.intent.content': 'Conteúdo',
|
|
499
|
+
'praxis.richContent.editor.intent.contentHelp': 'Campos principais do bloco',
|
|
500
|
+
'praxis.richContent.editor.intent.presentation': 'Apresentação',
|
|
501
|
+
'praxis.richContent.editor.intent.presentationHelp': 'Affordances visuais',
|
|
502
|
+
'praxis.richContent.editor.intent.dataRules': 'Dados e regras',
|
|
503
|
+
'praxis.richContent.editor.intent.dataRulesHelp': 'Metadados e gates',
|
|
504
|
+
'praxis.richContent.editor.hasIssues': 'Requer atenção',
|
|
420
505
|
'praxis.richContent.editor.block': 'Bloco',
|
|
421
506
|
'praxis.richContent.editor.blockType': 'Tipo de bloco',
|
|
422
507
|
'praxis.richContent.editor.addBlock': 'Adicionar bloco',
|
|
@@ -438,6 +523,8 @@ const PRAXIS_RICH_CONTENT_PT_BR = {
|
|
|
438
523
|
'praxis.richContent.editor.cardContentHelp': 'O conteúdo do card é preservado no JSON. Use o JSON avançado para nodes aninhados do card.',
|
|
439
524
|
'praxis.richContent.editor.nodeId': 'Id estável',
|
|
440
525
|
'praxis.richContent.editor.nodeIdPlaceholder': 'Exemplo: hero-title',
|
|
526
|
+
'praxis.richContent.editor.advancedDataRules': 'Dados e regras avançados',
|
|
527
|
+
'praxis.richContent.editor.advancedDataRulesHelp': 'Metadados, capability gates, visibilidade e estilo seguro.',
|
|
441
528
|
'praxis.richContent.editor.visibilityRule': 'Regra de visibilidade',
|
|
442
529
|
'praxis.richContent.editor.safeStyle': 'Estilo seguro',
|
|
443
530
|
'praxis.richContent.editor.nodeType.text': 'Texto',
|
|
@@ -460,10 +547,12 @@ const PRAXIS_RICH_CONTENT_PT_BR = {
|
|
|
460
547
|
'praxis.richContent.editor.field.icon': 'Ícone',
|
|
461
548
|
'praxis.richContent.editor.field.ariaLabel': 'Label acessível',
|
|
462
549
|
'praxis.richContent.editor.field.src': 'URL da imagem',
|
|
550
|
+
'praxis.richContent.editor.field.srcExpr': 'Vínculo da URL da imagem',
|
|
463
551
|
'praxis.richContent.editor.field.href': 'URL do link',
|
|
464
552
|
'praxis.richContent.editor.field.target': 'Destino',
|
|
465
553
|
'praxis.richContent.editor.field.rel': 'Rel',
|
|
466
554
|
'praxis.richContent.editor.field.alt': 'Texto alternativo',
|
|
555
|
+
'praxis.richContent.editor.field.altExpr': 'Vínculo do texto alternativo',
|
|
467
556
|
'praxis.richContent.editor.field.testId': 'Id de teste',
|
|
468
557
|
'praxis.richContent.editor.field.className': 'Classe CSS',
|
|
469
558
|
'praxis.richContent.editor.field.visibleWhenPath': 'Path de contexto',
|
|
@@ -473,8 +562,10 @@ const PRAXIS_RICH_CONTENT_PT_BR = {
|
|
|
473
562
|
'praxis.richContent.editor.field.valueExpr': 'Binding do valor',
|
|
474
563
|
'praxis.richContent.editor.field.captionExpr': 'Binding da legenda',
|
|
475
564
|
'praxis.richContent.editor.field.max': 'Máximo',
|
|
565
|
+
'praxis.richContent.editor.field.showPercent': 'Mostrar percentual',
|
|
476
566
|
'praxis.richContent.editor.field.direction': 'Direção',
|
|
477
567
|
'praxis.richContent.editor.field.gap': 'Espaçamento',
|
|
568
|
+
'praxis.richContent.editor.field.wrap': 'Quebrar itens',
|
|
478
569
|
'praxis.richContent.editor.field.avatarName': 'Nome do avatar',
|
|
479
570
|
'praxis.richContent.editor.field.avatarImage': 'Imagem do avatar',
|
|
480
571
|
'praxis.richContent.editor.field.nameExpr': 'Vínculo do nome',
|
|
@@ -486,16 +577,35 @@ const PRAXIS_RICH_CONTENT_PT_BR = {
|
|
|
486
577
|
'praxis.richContent.editor.field.meta': 'Meta',
|
|
487
578
|
'praxis.richContent.editor.field.opposite': 'Conteúdo oposto',
|
|
488
579
|
'praxis.richContent.editor.field.badge': 'Badge',
|
|
580
|
+
'praxis.richContent.editor.field.badgeExpr': 'Vínculo do badge',
|
|
489
581
|
'praxis.richContent.editor.field.preset': 'Preset',
|
|
490
582
|
'praxis.richContent.editor.field.title': 'Título',
|
|
491
583
|
'praxis.richContent.editor.field.subtitle': 'Subtítulo',
|
|
492
584
|
'praxis.richContent.editor.field.size': 'Tamanho',
|
|
585
|
+
'praxis.richContent.editor.field.density': 'Densidade',
|
|
586
|
+
'praxis.richContent.editor.field.loading': 'Carregando',
|
|
587
|
+
'praxis.richContent.editor.field.loadingExpr': 'Vínculo de carregamento',
|
|
588
|
+
'praxis.richContent.editor.field.active': 'Ativo',
|
|
589
|
+
'praxis.richContent.editor.field.activeExpr': 'Vínculo de ativo',
|
|
493
590
|
'praxis.richContent.editor.field.orientation': 'Orientação',
|
|
494
591
|
'praxis.richContent.editor.field.mediaKind': 'Mídia',
|
|
495
592
|
'praxis.richContent.editor.field.mediaSrc': 'Origem da mídia',
|
|
593
|
+
'praxis.richContent.editor.field.mediaSrcExpr': 'Vínculo da origem da mídia',
|
|
496
594
|
'praxis.richContent.editor.field.mediaAlt': 'Texto alternativo da mídia',
|
|
595
|
+
'praxis.richContent.editor.field.mediaAltExpr': 'Vínculo do texto alternativo da mídia',
|
|
497
596
|
'praxis.richContent.editor.field.mediaIcon': 'Ícone da mídia',
|
|
597
|
+
'praxis.richContent.editor.field.mediaLabel': 'Label da mídia',
|
|
598
|
+
'praxis.richContent.editor.field.mediaLabelExpr': 'Vínculo do label da mídia',
|
|
599
|
+
'praxis.richContent.editor.field.aspectRatio': 'Proporção',
|
|
498
600
|
'praxis.richContent.editor.field.mediaPlacement': 'Posição da mídia',
|
|
601
|
+
'praxis.richContent.editor.field.interactionMode': 'Modo de interação',
|
|
602
|
+
'praxis.richContent.editor.field.selected': 'Selecionado',
|
|
603
|
+
'praxis.richContent.editor.field.selectedExpr': 'Vínculo de seleção',
|
|
604
|
+
'praxis.richContent.editor.field.interactionActionId': 'Action ID da interação',
|
|
605
|
+
'praxis.richContent.editor.field.accessibilityRole': 'Papel de acessibilidade',
|
|
606
|
+
'praxis.richContent.editor.field.ariaLabelExpr': 'Vínculo do label acessível',
|
|
607
|
+
'praxis.richContent.editor.field.requiresCapabilities': 'Capabilities',
|
|
608
|
+
'praxis.richContent.editor.field.capabilityMode': 'Modo de capability',
|
|
499
609
|
'praxis.richContent.editor.cardVariant.outlined': 'Com contorno',
|
|
500
610
|
'praxis.richContent.editor.cardVariant.elevated': 'Elevado',
|
|
501
611
|
'praxis.richContent.editor.cardVariant.filled': 'Preenchido',
|
|
@@ -504,8 +614,18 @@ const PRAXIS_RICH_CONTENT_PT_BR = {
|
|
|
504
614
|
'praxis.richContent.editor.size.sm': 'Pequeno',
|
|
505
615
|
'praxis.richContent.editor.size.md': 'Médio',
|
|
506
616
|
'praxis.richContent.editor.size.lg': 'Grande',
|
|
617
|
+
'praxis.richContent.editor.density.compact': 'Compacta',
|
|
618
|
+
'praxis.richContent.editor.density.comfortable': 'Confortável',
|
|
507
619
|
'praxis.richContent.editor.orientation.vertical': 'Vertical',
|
|
508
620
|
'praxis.richContent.editor.orientation.horizontal': 'Horizontal',
|
|
621
|
+
'praxis.richContent.editor.interaction.none': 'Nenhuma',
|
|
622
|
+
'praxis.richContent.editor.interaction.action': 'Ação',
|
|
623
|
+
'praxis.richContent.editor.interaction.selectable': 'Selecionável',
|
|
624
|
+
'praxis.richContent.editor.accessibilityRole.article': 'Artigo',
|
|
625
|
+
'praxis.richContent.editor.accessibilityRole.group': 'Grupo',
|
|
626
|
+
'praxis.richContent.editor.accessibilityRole.button': 'Botão',
|
|
627
|
+
'praxis.richContent.editor.capabilityMode.all': 'Todas',
|
|
628
|
+
'praxis.richContent.editor.capabilityMode.any': 'Qualquer',
|
|
509
629
|
'praxis.richContent.editor.mediaKind.image': 'Imagem',
|
|
510
630
|
'praxis.richContent.editor.mediaKind.video': 'Vídeo',
|
|
511
631
|
'praxis.richContent.editor.mediaKind.icon': 'Ícone',
|
|
@@ -528,6 +648,20 @@ const PRAXIS_RICH_CONTENT_PT_BR = {
|
|
|
528
648
|
'praxis.richContent.editor.placeholder.valueExpr': 'row.total',
|
|
529
649
|
'praxis.richContent.editor.placeholder.captionExpr': 'row.caption',
|
|
530
650
|
'praxis.richContent.editor.placeholder.progressExpr': 'row.progress',
|
|
651
|
+
'praxis.richContent.editor.placeholder.tabLabelExpr': 'row.tabLabel',
|
|
652
|
+
'praxis.richContent.editor.placeholder.badgeExpr': 'row.badge',
|
|
653
|
+
'praxis.richContent.editor.placeholder.requiresCapabilities': 'form.mode.edit, employee.open',
|
|
654
|
+
'praxis.richContent.editor.placeholder.srcExpr': 'row.imageUrl',
|
|
655
|
+
'praxis.richContent.editor.placeholder.altExpr': 'row.imageAlt',
|
|
656
|
+
'praxis.richContent.editor.placeholder.loadingExpr': 'row.loading',
|
|
657
|
+
'praxis.richContent.editor.placeholder.activeExpr': 'row.active',
|
|
658
|
+
'praxis.richContent.editor.placeholder.mediaSrcExpr': 'row.mediaUrl',
|
|
659
|
+
'praxis.richContent.editor.placeholder.mediaAltExpr': 'row.mediaAlt',
|
|
660
|
+
'praxis.richContent.editor.placeholder.mediaLabelExpr': 'row.mediaLabel',
|
|
661
|
+
'praxis.richContent.editor.placeholder.aspectRatio': '16 / 9',
|
|
662
|
+
'praxis.richContent.editor.placeholder.selectedExpr': 'row.selected',
|
|
663
|
+
'praxis.richContent.editor.placeholder.actionId': 'host.action.open',
|
|
664
|
+
'praxis.richContent.editor.placeholder.ariaLabelExpr': 'row.ariaLabel',
|
|
531
665
|
'praxis.richContent.editor.placeholder.nameExpr': 'row.name',
|
|
532
666
|
'praxis.richContent.editor.placeholder.imageSrcExpr': 'row.avatarUrl',
|
|
533
667
|
'praxis.richContent.editor.placeholder.initialsExpr': 'row.initials',
|
|
@@ -554,6 +688,8 @@ const PRAXIS_RICH_CONTENT_PT_BR = {
|
|
|
554
688
|
'praxis.richContent.editor.nodeTypes': 'Tipos',
|
|
555
689
|
'praxis.richContent.editor.none': 'Nenhum',
|
|
556
690
|
'praxis.richContent.editor.preview': 'Prévia',
|
|
691
|
+
'praxis.richContent.editor.previewHelp': 'Inspecione o documento materializado sem misturar prévia com campos de autoria.',
|
|
692
|
+
'praxis.richContent.editor.previewUnavailable': 'A prévia fica indisponível até que o documento seja válido.',
|
|
557
693
|
'praxis.richContent.editor.restore': 'Restaurar',
|
|
558
694
|
'praxis.richContent.editor.emptyDocument': 'Documento vazio',
|
|
559
695
|
'praxis.richContent.editor.validation.documentShape': 'O documento deve ser um RichContentDocument válido.',
|
|
@@ -5763,6 +5899,9 @@ class PraxisRichContentConfigEditor {
|
|
|
5763
5899
|
validationIssues = [];
|
|
5764
5900
|
nodeCount = 0;
|
|
5765
5901
|
nodeTypeSummary = '';
|
|
5902
|
+
selectedNodeIndex = 0;
|
|
5903
|
+
activeEditorPanel = 'guided';
|
|
5904
|
+
advancedRulesOpen = false;
|
|
5766
5905
|
initialInputs = this.normalizeInputs(this.inputs);
|
|
5767
5906
|
pendingRemoval = null;
|
|
5768
5907
|
ngOnChanges(changes) {
|
|
@@ -5815,14 +5954,32 @@ class PraxisRichContentConfigEditor {
|
|
|
5815
5954
|
this.parseDocument();
|
|
5816
5955
|
this.markDirty();
|
|
5817
5956
|
}
|
|
5957
|
+
selectTopLevelNode(index) {
|
|
5958
|
+
this.selectedNodeIndex = index;
|
|
5959
|
+
this.advancedRulesOpen = false;
|
|
5960
|
+
}
|
|
5961
|
+
selectEditorPanel(panel) {
|
|
5962
|
+
this.activeEditorPanel = panel;
|
|
5963
|
+
this.cdr.markForCheck();
|
|
5964
|
+
}
|
|
5965
|
+
openAdvancedRules() {
|
|
5966
|
+
this.advancedRulesOpen = true;
|
|
5967
|
+
this.cdr.markForCheck();
|
|
5968
|
+
}
|
|
5969
|
+
onAdvancedRulesToggle(event) {
|
|
5970
|
+
const target = event.target;
|
|
5971
|
+
this.advancedRulesOpen = target?.open === true;
|
|
5972
|
+
}
|
|
5818
5973
|
addTopLevelNode() {
|
|
5819
5974
|
const document = this.ensureEditableDocument();
|
|
5820
5975
|
document.nodes.push(this.createDefaultNode(this.newNodeType));
|
|
5976
|
+
this.selectedNodeIndex = document.nodes.length - 1;
|
|
5821
5977
|
this.syncStructuredDocumentChange();
|
|
5822
5978
|
}
|
|
5823
5979
|
removeTopLevelNode(index) {
|
|
5824
5980
|
const document = this.ensureEditableDocument();
|
|
5825
5981
|
document.nodes.splice(index, 1);
|
|
5982
|
+
this.reconcileSelectedNodeIndex(document);
|
|
5826
5983
|
this.syncStructuredDocumentChange();
|
|
5827
5984
|
}
|
|
5828
5985
|
moveTopLevelNode(index, delta) {
|
|
@@ -5833,6 +5990,17 @@ class PraxisRichContentConfigEditor {
|
|
|
5833
5990
|
}
|
|
5834
5991
|
const [node] = document.nodes.splice(index, 1);
|
|
5835
5992
|
document.nodes.splice(nextIndex, 0, node);
|
|
5993
|
+
if (this.selectedNodeIndex === index) {
|
|
5994
|
+
this.selectedNodeIndex = nextIndex;
|
|
5995
|
+
}
|
|
5996
|
+
else if (delta < 0 &&
|
|
5997
|
+
this.selectedNodeIndex === nextIndex) {
|
|
5998
|
+
this.selectedNodeIndex = index;
|
|
5999
|
+
}
|
|
6000
|
+
else if (delta > 0 &&
|
|
6001
|
+
this.selectedNodeIndex === nextIndex) {
|
|
6002
|
+
this.selectedNodeIndex = index;
|
|
6003
|
+
}
|
|
5836
6004
|
this.syncStructuredDocumentChange();
|
|
5837
6005
|
}
|
|
5838
6006
|
changeTopLevelNodeType(index, nextType) {
|
|
@@ -5945,6 +6113,93 @@ class PraxisRichContentConfigEditor {
|
|
|
5945
6113
|
}
|
|
5946
6114
|
this.syncStructuredDocumentChange();
|
|
5947
6115
|
}
|
|
6116
|
+
getCardInteractionField(index, field) {
|
|
6117
|
+
const interaction = this.ensureCardNode(index).interaction;
|
|
6118
|
+
const value = interaction?.[field];
|
|
6119
|
+
return typeof value === 'string' ? value : '';
|
|
6120
|
+
}
|
|
6121
|
+
setCardInteractionField(index, field, value) {
|
|
6122
|
+
const card = this.ensureCardNode(index);
|
|
6123
|
+
const normalized = value.trim();
|
|
6124
|
+
if (field === 'mode' && (!normalized || normalized === 'none')) {
|
|
6125
|
+
if (card.interaction) {
|
|
6126
|
+
card.interaction.mode = 'none';
|
|
6127
|
+
}
|
|
6128
|
+
this.pruneEmptyCardInteraction(index);
|
|
6129
|
+
this.syncStructuredDocumentChange();
|
|
6130
|
+
return;
|
|
6131
|
+
}
|
|
6132
|
+
card.interaction ??= { mode: 'none' };
|
|
6133
|
+
const interaction = card.interaction;
|
|
6134
|
+
if (normalized) {
|
|
6135
|
+
interaction[field] = normalized;
|
|
6136
|
+
}
|
|
6137
|
+
else {
|
|
6138
|
+
delete interaction[field];
|
|
6139
|
+
}
|
|
6140
|
+
this.pruneEmptyCardInteraction(index);
|
|
6141
|
+
this.syncStructuredDocumentChange();
|
|
6142
|
+
}
|
|
6143
|
+
getCardInteractionBooleanField(index, field) {
|
|
6144
|
+
const interaction = this.ensureCardNode(index).interaction;
|
|
6145
|
+
return interaction?.[field] === true;
|
|
6146
|
+
}
|
|
6147
|
+
setCardInteractionBooleanField(index, field, value) {
|
|
6148
|
+
const card = this.ensureCardNode(index);
|
|
6149
|
+
card.interaction ??= { mode: 'none' };
|
|
6150
|
+
const interaction = card.interaction;
|
|
6151
|
+
if (value) {
|
|
6152
|
+
interaction[field] = true;
|
|
6153
|
+
}
|
|
6154
|
+
else {
|
|
6155
|
+
delete interaction[field];
|
|
6156
|
+
}
|
|
6157
|
+
this.pruneEmptyCardInteraction(index);
|
|
6158
|
+
this.syncStructuredDocumentChange();
|
|
6159
|
+
}
|
|
6160
|
+
getCardInteractionActionField(index, field) {
|
|
6161
|
+
const action = this.ensureCardNode(index).interaction?.action;
|
|
6162
|
+
return typeof action?.[field] === 'string' ? action[field] : '';
|
|
6163
|
+
}
|
|
6164
|
+
setCardInteractionActionField(index, field, value) {
|
|
6165
|
+
const card = this.ensureCardNode(index);
|
|
6166
|
+
card.interaction ??= { mode: 'action' };
|
|
6167
|
+
card.interaction.action ??= { actionId: '' };
|
|
6168
|
+
const action = card.interaction.action;
|
|
6169
|
+
const normalized = value.trim();
|
|
6170
|
+
if (normalized) {
|
|
6171
|
+
action[field] = value;
|
|
6172
|
+
}
|
|
6173
|
+
else {
|
|
6174
|
+
delete action[field];
|
|
6175
|
+
}
|
|
6176
|
+
if (!card.interaction.action.actionId) {
|
|
6177
|
+
delete card.interaction.action;
|
|
6178
|
+
}
|
|
6179
|
+
this.pruneEmptyCardInteraction(index);
|
|
6180
|
+
this.syncStructuredDocumentChange();
|
|
6181
|
+
}
|
|
6182
|
+
getCardAccessibilityField(index, field) {
|
|
6183
|
+
const accessibility = this.ensureCardNode(index).accessibility;
|
|
6184
|
+
const value = accessibility?.[field];
|
|
6185
|
+
return typeof value === 'string' ? value : '';
|
|
6186
|
+
}
|
|
6187
|
+
setCardAccessibilityField(index, field, value) {
|
|
6188
|
+
const card = this.ensureCardNode(index);
|
|
6189
|
+
const normalized = value.trim();
|
|
6190
|
+
card.accessibility ??= {};
|
|
6191
|
+
const accessibility = card.accessibility;
|
|
6192
|
+
if (normalized) {
|
|
6193
|
+
accessibility[field] = value;
|
|
6194
|
+
}
|
|
6195
|
+
else {
|
|
6196
|
+
delete accessibility[field];
|
|
6197
|
+
}
|
|
6198
|
+
if (!Object.keys(accessibility).length) {
|
|
6199
|
+
delete card.accessibility;
|
|
6200
|
+
}
|
|
6201
|
+
this.syncStructuredDocumentChange();
|
|
6202
|
+
}
|
|
5948
6203
|
addCardSlotNode(index, slot) {
|
|
5949
6204
|
this.ensureCardSlotNodes(index, slot).push(createDefaultPresenterNode('text', this.tx.bind(this)));
|
|
5950
6205
|
this.syncStructuredDocumentChange();
|
|
@@ -6244,6 +6499,65 @@ class PraxisRichContentConfigEditor {
|
|
|
6244
6499
|
};
|
|
6245
6500
|
this.syncStructuredDocumentChange();
|
|
6246
6501
|
}
|
|
6502
|
+
getTabsItemCapabilityList(index, itemIndex) {
|
|
6503
|
+
const item = this.ensureTabsNode(index).items[itemIndex];
|
|
6504
|
+
return Array.isArray(item?.requiresCapabilities)
|
|
6505
|
+
? item.requiresCapabilities.join(', ')
|
|
6506
|
+
: '';
|
|
6507
|
+
}
|
|
6508
|
+
setTabsItemCapabilityList(index, itemIndex, value) {
|
|
6509
|
+
const node = this.ensureTabsNode(index);
|
|
6510
|
+
const current = node.items[itemIndex] ?? { content: [] };
|
|
6511
|
+
const capabilities = value
|
|
6512
|
+
.split(',')
|
|
6513
|
+
.map((item) => item.trim())
|
|
6514
|
+
.filter(Boolean);
|
|
6515
|
+
node.items[itemIndex] = {
|
|
6516
|
+
...current,
|
|
6517
|
+
requiresCapabilities: capabilities.length ? capabilities : undefined,
|
|
6518
|
+
content: Array.isArray(current.content) && current.content.length
|
|
6519
|
+
? current.content
|
|
6520
|
+
: [
|
|
6521
|
+
{
|
|
6522
|
+
type: 'text',
|
|
6523
|
+
text: this.tx('editor.defaultTabText', 'Tab content'),
|
|
6524
|
+
},
|
|
6525
|
+
],
|
|
6526
|
+
};
|
|
6527
|
+
this.syncStructuredDocumentChange();
|
|
6528
|
+
}
|
|
6529
|
+
getTabsItemVisibleWhenPath(index, itemIndex) {
|
|
6530
|
+
const item = this.ensureTabsNode(index).items[itemIndex];
|
|
6531
|
+
return parseSimpleVisibleWhen(item?.visibleWhen)?.path ?? '';
|
|
6532
|
+
}
|
|
6533
|
+
getTabsItemVisibleWhenValue(index, itemIndex) {
|
|
6534
|
+
const item = this.ensureTabsNode(index).items[itemIndex];
|
|
6535
|
+
return parseSimpleVisibleWhen(item?.visibleWhen)?.value ?? '';
|
|
6536
|
+
}
|
|
6537
|
+
setTabsItemVisibleWhenPath(index, itemIndex, path) {
|
|
6538
|
+
const item = this.ensureTabsNode(index).items[itemIndex];
|
|
6539
|
+
if (!item)
|
|
6540
|
+
return;
|
|
6541
|
+
this.setTabsItemSimpleVisibleWhen(item, path, this.getTabsItemVisibleWhenValue(index, itemIndex));
|
|
6542
|
+
this.syncStructuredDocumentChange();
|
|
6543
|
+
}
|
|
6544
|
+
setTabsItemVisibleWhenValue(index, itemIndex, value) {
|
|
6545
|
+
const item = this.ensureTabsNode(index).items[itemIndex];
|
|
6546
|
+
if (!item)
|
|
6547
|
+
return;
|
|
6548
|
+
this.setTabsItemSimpleVisibleWhen(item, this.getTabsItemVisibleWhenPath(index, itemIndex), value);
|
|
6549
|
+
this.syncStructuredDocumentChange();
|
|
6550
|
+
}
|
|
6551
|
+
setTabsItemSimpleVisibleWhen(item, path, value) {
|
|
6552
|
+
const trimmedPath = path.trim();
|
|
6553
|
+
if (!trimmedPath) {
|
|
6554
|
+
delete item.visibleWhen;
|
|
6555
|
+
return;
|
|
6556
|
+
}
|
|
6557
|
+
item.visibleWhen = {
|
|
6558
|
+
'===': [{ var: trimmedPath }, parseScalar(value)],
|
|
6559
|
+
};
|
|
6560
|
+
}
|
|
6247
6561
|
getActionCardSecondaryActions(index) {
|
|
6248
6562
|
return this.ensureActionCardSecondaryActions(index);
|
|
6249
6563
|
}
|
|
@@ -6610,6 +6924,12 @@ class PraxisRichContentConfigEditor {
|
|
|
6610
6924
|
.filter((issue) => issue.path === path || issue.path.startsWith(`${path}.`))
|
|
6611
6925
|
.map((issue) => this.tx(issue.messageKey, issue.fallback));
|
|
6612
6926
|
}
|
|
6927
|
+
getIssueCount(path) {
|
|
6928
|
+
return this.validationIssues.filter((issue) => issue.path === path || issue.path.startsWith(`${path}.`)).length;
|
|
6929
|
+
}
|
|
6930
|
+
getSelectedNodeIssueCount() {
|
|
6931
|
+
return this.getIssueCount(`$.nodes[${this.selectedNodeIndex}]`);
|
|
6932
|
+
}
|
|
6613
6933
|
isEditableNodeType(type) {
|
|
6614
6934
|
return EDITABLE_TOP_LEVEL_NODE_TYPES.includes(type);
|
|
6615
6935
|
}
|
|
@@ -6667,6 +6987,16 @@ class PraxisRichContentConfigEditor {
|
|
|
6667
6987
|
}
|
|
6668
6988
|
return node;
|
|
6669
6989
|
}
|
|
6990
|
+
pruneEmptyCardInteraction(index) {
|
|
6991
|
+
const card = this.ensureCardNode(index);
|
|
6992
|
+
const interaction = card.interaction;
|
|
6993
|
+
if (!interaction)
|
|
6994
|
+
return;
|
|
6995
|
+
const hasOnlyNoneMode = Object.keys(interaction).length === 1 && interaction['mode'] === 'none';
|
|
6996
|
+
if (!Object.keys(interaction).length || hasOnlyNoneMode) {
|
|
6997
|
+
delete card.interaction;
|
|
6998
|
+
}
|
|
6999
|
+
}
|
|
6670
7000
|
ensureCardSlotNodes(index, slot) {
|
|
6671
7001
|
const card = this.ensureCardNode(index);
|
|
6672
7002
|
if (!Array.isArray(card[slot])) {
|
|
@@ -6972,6 +7302,7 @@ class PraxisRichContentConfigEditor {
|
|
|
6972
7302
|
this.errorMessage = '';
|
|
6973
7303
|
this.isValid$.next(true);
|
|
6974
7304
|
this.parsedDocument = document;
|
|
7305
|
+
this.reconcileSelectedNodeIndex(document);
|
|
6975
7306
|
this.updateDocumentOverview(document);
|
|
6976
7307
|
return document;
|
|
6977
7308
|
}
|
|
@@ -6991,6 +7322,20 @@ class PraxisRichContentConfigEditor {
|
|
|
6991
7322
|
this.nodeCount = 0;
|
|
6992
7323
|
this.nodeTypeSummary = '';
|
|
6993
7324
|
}
|
|
7325
|
+
reconcileSelectedNodeIndex(document) {
|
|
7326
|
+
const nodeTotal = document.nodes.length;
|
|
7327
|
+
if (!nodeTotal) {
|
|
7328
|
+
this.selectedNodeIndex = 0;
|
|
7329
|
+
return;
|
|
7330
|
+
}
|
|
7331
|
+
if (this.selectedNodeIndex < 0) {
|
|
7332
|
+
this.selectedNodeIndex = 0;
|
|
7333
|
+
return;
|
|
7334
|
+
}
|
|
7335
|
+
if (this.selectedNodeIndex >= nodeTotal) {
|
|
7336
|
+
this.selectedNodeIndex = nodeTotal - 1;
|
|
7337
|
+
}
|
|
7338
|
+
}
|
|
6994
7339
|
updateDocumentOverview(document) {
|
|
6995
7340
|
const typeCounts = new Map();
|
|
6996
7341
|
let count = 0;
|
|
@@ -7218,6 +7563,13 @@ class PraxisRichContentConfigEditor {
|
|
|
7218
7563
|
(ngModelChange)="setString('src', $event)"
|
|
7219
7564
|
/>
|
|
7220
7565
|
</label>
|
|
7566
|
+
<label>
|
|
7567
|
+
<span>{{ tx('editor.field.srcExpr', 'Image URL binding') }}</span>
|
|
7568
|
+
<input
|
|
7569
|
+
[ngModel]="getStringField(node, 'srcExpr')"
|
|
7570
|
+
(ngModelChange)="setString('srcExpr', $event)"
|
|
7571
|
+
/>
|
|
7572
|
+
</label>
|
|
7221
7573
|
<label>
|
|
7222
7574
|
<span>{{ tx('editor.field.alt', 'Alternative text') }}</span>
|
|
7223
7575
|
<input
|
|
@@ -7225,6 +7577,13 @@ class PraxisRichContentConfigEditor {
|
|
|
7225
7577
|
(ngModelChange)="setString('alt', $event)"
|
|
7226
7578
|
/>
|
|
7227
7579
|
</label>
|
|
7580
|
+
<label>
|
|
7581
|
+
<span>{{ tx('editor.field.altExpr', 'Alt text binding') }}</span>
|
|
7582
|
+
<input
|
|
7583
|
+
[ngModel]="getStringField(node, 'altExpr')"
|
|
7584
|
+
(ngModelChange)="setString('altExpr', $event)"
|
|
7585
|
+
/>
|
|
7586
|
+
</label>
|
|
7228
7587
|
}
|
|
7229
7588
|
@case ('link') {
|
|
7230
7589
|
<label>
|
|
@@ -7234,6 +7593,13 @@ class PraxisRichContentConfigEditor {
|
|
|
7234
7593
|
(ngModelChange)="setString('label', $event)"
|
|
7235
7594
|
/>
|
|
7236
7595
|
</label>
|
|
7596
|
+
<label>
|
|
7597
|
+
<span>{{ tx('editor.field.labelExpr', 'Label binding') }}</span>
|
|
7598
|
+
<input
|
|
7599
|
+
[ngModel]="getStringField(node, 'labelExpr')"
|
|
7600
|
+
(ngModelChange)="setString('labelExpr', $event)"
|
|
7601
|
+
/>
|
|
7602
|
+
</label>
|
|
7237
7603
|
<label>
|
|
7238
7604
|
<span>{{ tx('editor.field.href', 'Link URL') }}</span>
|
|
7239
7605
|
<input
|
|
@@ -7283,6 +7649,20 @@ class PraxisRichContentConfigEditor {
|
|
|
7283
7649
|
(ngModelChange)="setString('label', $event)"
|
|
7284
7650
|
/>
|
|
7285
7651
|
</label>
|
|
7652
|
+
<label>
|
|
7653
|
+
<span>{{ tx('editor.field.labelExpr', 'Label binding') }}</span>
|
|
7654
|
+
<input
|
|
7655
|
+
[ngModel]="getStringField(node, 'labelExpr')"
|
|
7656
|
+
(ngModelChange)="setString('labelExpr', $event)"
|
|
7657
|
+
/>
|
|
7658
|
+
</label>
|
|
7659
|
+
<label>
|
|
7660
|
+
<span>{{ tx('editor.field.valueExpr', 'Value binding') }}</span>
|
|
7661
|
+
<input
|
|
7662
|
+
[ngModel]="getStringField(node, 'valueExpr')"
|
|
7663
|
+
(ngModelChange)="setString('valueExpr', $event)"
|
|
7664
|
+
/>
|
|
7665
|
+
</label>
|
|
7286
7666
|
<label>
|
|
7287
7667
|
<span>{{ tx('editor.field.max', 'Maximum') }}</span>
|
|
7288
7668
|
<input
|
|
@@ -7536,7 +7916,59 @@ class PraxisRichContentConfigEditor {
|
|
|
7536
7916
|
</div>
|
|
7537
7917
|
</ng-template>
|
|
7538
7918
|
|
|
7539
|
-
<
|
|
7919
|
+
<nav
|
|
7920
|
+
class="prx-rich-editor__tabs"
|
|
7921
|
+
[attr.aria-label]="tx('editor.workbenchTabs', 'Editor sections')"
|
|
7922
|
+
role="tablist"
|
|
7923
|
+
>
|
|
7924
|
+
<button
|
|
7925
|
+
type="button"
|
|
7926
|
+
role="tab"
|
|
7927
|
+
class="prx-rich-editor__tab"
|
|
7928
|
+
[class.prx-rich-editor__tab--active]="activeEditorPanel === 'guided'"
|
|
7929
|
+
[attr.aria-selected]="activeEditorPanel === 'guided'"
|
|
7930
|
+
(click)="selectEditorPanel('guided')"
|
|
7931
|
+
data-testid="rich-content-guided-tab"
|
|
7932
|
+
>
|
|
7933
|
+
{{ tx('editor.guidedEditing', 'Guided editing') }}
|
|
7934
|
+
</button>
|
|
7935
|
+
<button
|
|
7936
|
+
type="button"
|
|
7937
|
+
role="tab"
|
|
7938
|
+
class="prx-rich-editor__tab"
|
|
7939
|
+
[class.prx-rich-editor__tab--active]="activeEditorPanel === 'preview'"
|
|
7940
|
+
[attr.aria-selected]="activeEditorPanel === 'preview'"
|
|
7941
|
+
(click)="selectEditorPanel('preview')"
|
|
7942
|
+
data-testid="rich-content-preview-tab"
|
|
7943
|
+
>
|
|
7944
|
+
{{ tx('editor.preview', 'Preview') }}
|
|
7945
|
+
</button>
|
|
7946
|
+
<button
|
|
7947
|
+
type="button"
|
|
7948
|
+
role="tab"
|
|
7949
|
+
class="prx-rich-editor__tab"
|
|
7950
|
+
[class.prx-rich-editor__tab--active]="activeEditorPanel === 'json'"
|
|
7951
|
+
[attr.aria-selected]="activeEditorPanel === 'json'"
|
|
7952
|
+
(click)="selectEditorPanel('json')"
|
|
7953
|
+
data-testid="rich-content-json-tab"
|
|
7954
|
+
>
|
|
7955
|
+
{{ tx('editor.document', 'Advanced JSON') }}
|
|
7956
|
+
@if (!valid || validationIssues.length) {
|
|
7957
|
+
<span class="prx-rich-editor__tab-badge">
|
|
7958
|
+
{{
|
|
7959
|
+
validationIssues.length || tx('editor.invalidBadge', 'Invalid')
|
|
7960
|
+
}}
|
|
7961
|
+
</span>
|
|
7962
|
+
}
|
|
7963
|
+
</button>
|
|
7964
|
+
</nav>
|
|
7965
|
+
|
|
7966
|
+
@if (activeEditorPanel === 'guided') {
|
|
7967
|
+
<section
|
|
7968
|
+
class="prx-rich-editor__blocks"
|
|
7969
|
+
role="tabpanel"
|
|
7970
|
+
[attr.aria-label]="tx('editor.guidedEditing', 'Guided editing')"
|
|
7971
|
+
>
|
|
7540
7972
|
<header class="prx-rich-editor__section-header">
|
|
7541
7973
|
<div>
|
|
7542
7974
|
<h3>{{ tx('editor.blocks', 'Blocks') }}</h3>
|
|
@@ -7573,8 +8005,83 @@ class PraxisRichContentConfigEditor {
|
|
|
7573
8005
|
</header>
|
|
7574
8006
|
|
|
7575
8007
|
@if (parsedDocument?.nodes?.length) {
|
|
8008
|
+
<div class="prx-rich-editor__authoring-shell">
|
|
8009
|
+
<aside
|
|
8010
|
+
class="prx-rich-editor__structure"
|
|
8011
|
+
[attr.aria-label]="tx('editor.structure', 'Document structure')"
|
|
8012
|
+
>
|
|
8013
|
+
<div class="prx-rich-editor__structure-summary">
|
|
8014
|
+
<strong>{{ tx('editor.structure', 'Document structure') }}</strong>
|
|
8015
|
+
<span>
|
|
8016
|
+
{{
|
|
8017
|
+
tx('editor.structureHelp', 'Select a block to edit its properties.')
|
|
8018
|
+
}}
|
|
8019
|
+
</span>
|
|
8020
|
+
</div>
|
|
8021
|
+
<div class="prx-rich-editor__structure-list">
|
|
8022
|
+
@for (node of parsedDocument?.nodes ?? []; track node.id ?? $index; let nodeIndex = $index) {
|
|
8023
|
+
<button
|
|
8024
|
+
type="button"
|
|
8025
|
+
class="prx-rich-editor__structure-item"
|
|
8026
|
+
[class.prx-rich-editor__structure-item--selected]="selectedNodeIndex === nodeIndex"
|
|
8027
|
+
[attr.aria-current]="selectedNodeIndex === nodeIndex ? 'true' : null"
|
|
8028
|
+
(click)="selectTopLevelNode(nodeIndex)"
|
|
8029
|
+
[attr.data-testid]="'rich-content-node-selector-' + nodeIndex"
|
|
8030
|
+
>
|
|
8031
|
+
<span class="prx-rich-editor__node-eyebrow">
|
|
8032
|
+
{{ tx('editor.block', 'Block') }} {{ nodeIndex + 1 }}
|
|
8033
|
+
</span>
|
|
8034
|
+
<strong>{{ tx('editor.nodeType.' + node.type, node.type) }}</strong>
|
|
8035
|
+
@if (getIssueCount('$.nodes[' + nodeIndex + ']'); as issueCount) {
|
|
8036
|
+
<small>
|
|
8037
|
+
{{ tx('editor.hasIssues', 'Needs attention') }}
|
|
8038
|
+
<span class="prx-rich-editor__issue-count">{{ issueCount }}</span>
|
|
8039
|
+
</small>
|
|
8040
|
+
}
|
|
8041
|
+
</button>
|
|
8042
|
+
}
|
|
8043
|
+
</div>
|
|
8044
|
+
</aside>
|
|
8045
|
+
|
|
8046
|
+
<div class="prx-rich-editor__properties">
|
|
8047
|
+
<header class="prx-rich-editor__section-header">
|
|
8048
|
+
<div>
|
|
8049
|
+
<h3>{{ tx('editor.properties', 'Properties') }}</h3>
|
|
8050
|
+
<p>
|
|
8051
|
+
{{
|
|
8052
|
+
tx(
|
|
8053
|
+
'editor.propertiesHelp',
|
|
8054
|
+
'Edit the selected block without leaving the document structure.'
|
|
8055
|
+
)
|
|
8056
|
+
}}
|
|
8057
|
+
</p>
|
|
8058
|
+
</div>
|
|
8059
|
+
</header>
|
|
8060
|
+
<div
|
|
8061
|
+
class="prx-rich-editor__intent-strip"
|
|
8062
|
+
[attr.aria-label]="tx('editor.intentNavigation', 'Property sections')"
|
|
8063
|
+
>
|
|
8064
|
+
<span>
|
|
8065
|
+
<strong>{{ tx('editor.intent.content', 'Content') }}</strong>
|
|
8066
|
+
<small>{{ tx('editor.intent.contentHelp', 'Primary block fields') }}</small>
|
|
8067
|
+
</span>
|
|
8068
|
+
<span>
|
|
8069
|
+
<strong>{{ tx('editor.intent.presentation', 'Presentation') }}</strong>
|
|
8070
|
+
<small>{{ tx('editor.intent.presentationHelp', 'Visual affordances') }}</small>
|
|
8071
|
+
</span>
|
|
8072
|
+
<button type="button" (click)="openAdvancedRules()">
|
|
8073
|
+
<strong>{{ tx('editor.intent.dataRules', 'Data and rules') }}</strong>
|
|
8074
|
+
<small>{{ tx('editor.intent.dataRulesHelp', 'Metadata and gates') }}</small>
|
|
8075
|
+
@if (getSelectedNodeIssueCount(); as selectedIssueCount) {
|
|
8076
|
+
<span class="prx-rich-editor__issue-count">
|
|
8077
|
+
{{ selectedIssueCount }}
|
|
8078
|
+
</span>
|
|
8079
|
+
}
|
|
8080
|
+
</button>
|
|
8081
|
+
</div>
|
|
7576
8082
|
<div class="prx-rich-editor__node-list">
|
|
7577
8083
|
@for (node of parsedDocument?.nodes ?? []; track node.id ?? $index; let nodeIndex = $index) {
|
|
8084
|
+
@if (selectedNodeIndex === nodeIndex) {
|
|
7578
8085
|
<article
|
|
7579
8086
|
class="prx-rich-editor__node-card"
|
|
7580
8087
|
[attr.data-rich-editor-node-type]="node.type"
|
|
@@ -7760,22 +8267,38 @@ class PraxisRichContentConfigEditor {
|
|
|
7760
8267
|
/>
|
|
7761
8268
|
</label>
|
|
7762
8269
|
}
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
8270
|
+
@case ('image') {
|
|
8271
|
+
<label>
|
|
8272
|
+
<span>{{ tx('editor.field.src', 'Image URL') }}</span>
|
|
8273
|
+
<input
|
|
8274
|
+
[ngModel]="getStringField(node, 'src')"
|
|
8275
|
+
(ngModelChange)="setStringField($index, 'src', $event)"
|
|
8276
|
+
/>
|
|
8277
|
+
</label>
|
|
8278
|
+
<label>
|
|
8279
|
+
<span>{{ tx('editor.field.srcExpr', 'Image URL binding') }}</span>
|
|
8280
|
+
<input
|
|
8281
|
+
[ngModel]="getStringField(node, 'srcExpr')"
|
|
8282
|
+
(ngModelChange)="setStringField($index, 'srcExpr', $event)"
|
|
8283
|
+
[placeholder]="tx('editor.placeholder.srcExpr', 'row.imageUrl')"
|
|
8284
|
+
/>
|
|
8285
|
+
</label>
|
|
8286
|
+
<label>
|
|
8287
|
+
<span>{{ tx('editor.field.alt', 'Alternative text') }}</span>
|
|
8288
|
+
<input
|
|
8289
|
+
[ngModel]="getStringField(node, 'alt')"
|
|
8290
|
+
(ngModelChange)="setStringField($index, 'alt', $event)"
|
|
8291
|
+
/>
|
|
8292
|
+
</label>
|
|
8293
|
+
<label>
|
|
8294
|
+
<span>{{ tx('editor.field.altExpr', 'Alt text binding') }}</span>
|
|
8295
|
+
<input
|
|
8296
|
+
[ngModel]="getStringField(node, 'altExpr')"
|
|
8297
|
+
(ngModelChange)="setStringField($index, 'altExpr', $event)"
|
|
8298
|
+
[placeholder]="tx('editor.placeholder.altExpr', 'row.imageAlt')"
|
|
8299
|
+
/>
|
|
8300
|
+
</label>
|
|
8301
|
+
}
|
|
7779
8302
|
@case ('link') {
|
|
7780
8303
|
<label>
|
|
7781
8304
|
<span>{{ tx('editor.field.label', 'Label') }}</span>
|
|
@@ -7826,6 +8349,14 @@ class PraxisRichContentConfigEditor {
|
|
|
7826
8349
|
(ngModelChange)="setStringField($index, 'label', $event)"
|
|
7827
8350
|
/>
|
|
7828
8351
|
</label>
|
|
8352
|
+
<label>
|
|
8353
|
+
<span>{{ tx('editor.field.labelExpr', 'Label binding') }}</span>
|
|
8354
|
+
<input
|
|
8355
|
+
[ngModel]="getStringField(node, 'labelExpr')"
|
|
8356
|
+
(ngModelChange)="setStringField($index, 'labelExpr', $event)"
|
|
8357
|
+
[placeholder]="tx('editor.placeholder.labelExpr', 'row.status')"
|
|
8358
|
+
/>
|
|
8359
|
+
</label>
|
|
7829
8360
|
<label>
|
|
7830
8361
|
<span>{{ tx('editor.field.valueExpr', 'Value binding') }}</span>
|
|
7831
8362
|
<input
|
|
@@ -7867,6 +8398,14 @@ class PraxisRichContentConfigEditor {
|
|
|
7867
8398
|
(ngModelChange)="setNumberField($index, 'max', $event)"
|
|
7868
8399
|
/>
|
|
7869
8400
|
</label>
|
|
8401
|
+
<label class="prx-rich-editor__checkbox-field">
|
|
8402
|
+
<input
|
|
8403
|
+
type="checkbox"
|
|
8404
|
+
[ngModel]="getBooleanField(node, 'showPercent')"
|
|
8405
|
+
(ngModelChange)="setBooleanField($index, 'showPercent', $event)"
|
|
8406
|
+
/>
|
|
8407
|
+
<span>{{ tx('editor.field.showPercent', 'Show percent') }}</span>
|
|
8408
|
+
</label>
|
|
7870
8409
|
}
|
|
7871
8410
|
@case ('actionButton') {
|
|
7872
8411
|
<label>
|
|
@@ -7962,6 +8501,14 @@ class PraxisRichContentConfigEditor {
|
|
|
7962
8501
|
<option value="xl">xl</option>
|
|
7963
8502
|
</select>
|
|
7964
8503
|
</label>
|
|
8504
|
+
<label class="prx-rich-editor__checkbox-field">
|
|
8505
|
+
<input
|
|
8506
|
+
type="checkbox"
|
|
8507
|
+
[ngModel]="getBooleanField(node, 'wrap')"
|
|
8508
|
+
(ngModelChange)="setBooleanField($index, 'wrap', $event)"
|
|
8509
|
+
/>
|
|
8510
|
+
<span>{{ tx('editor.field.wrap', 'Wrap items') }}</span>
|
|
8511
|
+
</label>
|
|
7965
8512
|
<div class="prx-rich-editor__nested-editor">
|
|
7966
8513
|
<header class="prx-rich-editor__nested-header">
|
|
7967
8514
|
<h5>{{ tx('editor.composeItems', 'Compose items') }}</h5>
|
|
@@ -8019,6 +8566,14 @@ class PraxisRichContentConfigEditor {
|
|
|
8019
8566
|
(ngModelChange)="setStringField($index, 'title', $event)"
|
|
8020
8567
|
/>
|
|
8021
8568
|
</label>
|
|
8569
|
+
<label>
|
|
8570
|
+
<span>{{ tx('editor.field.titleExpr', 'Title binding') }}</span>
|
|
8571
|
+
<input
|
|
8572
|
+
[ngModel]="getStringField(node, 'titleExpr')"
|
|
8573
|
+
(ngModelChange)="setStringField($index, 'titleExpr', $event)"
|
|
8574
|
+
[placeholder]="tx('editor.placeholder.titleExpr', '\${decision.title}')"
|
|
8575
|
+
/>
|
|
8576
|
+
</label>
|
|
8022
8577
|
<label>
|
|
8023
8578
|
<span>{{ tx('editor.field.subtitle', 'Subtitle') }}</span>
|
|
8024
8579
|
<input
|
|
@@ -8026,6 +8581,14 @@ class PraxisRichContentConfigEditor {
|
|
|
8026
8581
|
(ngModelChange)="setStringField($index, 'subtitle', $event)"
|
|
8027
8582
|
/>
|
|
8028
8583
|
</label>
|
|
8584
|
+
<label>
|
|
8585
|
+
<span>{{ tx('editor.field.subtitleExpr', 'Subtitle binding') }}</span>
|
|
8586
|
+
<input
|
|
8587
|
+
[ngModel]="getStringField(node, 'subtitleExpr')"
|
|
8588
|
+
(ngModelChange)="setStringField($index, 'subtitleExpr', $event)"
|
|
8589
|
+
[placeholder]="tx('editor.placeholder.subtitleExpr', '\${decision.policySource}')"
|
|
8590
|
+
/>
|
|
8591
|
+
</label>
|
|
8029
8592
|
<label>
|
|
8030
8593
|
<span>{{ tx('editor.field.variant', 'Variant') }}</span>
|
|
8031
8594
|
<select
|
|
@@ -8063,6 +8626,16 @@ class PraxisRichContentConfigEditor {
|
|
|
8063
8626
|
<option value="lg">{{ tx('editor.size.lg', 'Large') }}</option>
|
|
8064
8627
|
</select>
|
|
8065
8628
|
</label>
|
|
8629
|
+
<label>
|
|
8630
|
+
<span>{{ tx('editor.field.density', 'Density') }}</span>
|
|
8631
|
+
<select
|
|
8632
|
+
[ngModel]="getStringField(node, 'density') || 'comfortable'"
|
|
8633
|
+
(ngModelChange)="setStringField($index, 'density', $event)"
|
|
8634
|
+
>
|
|
8635
|
+
<option value="comfortable">{{ tx('editor.density.comfortable', 'Comfortable') }}</option>
|
|
8636
|
+
<option value="compact">{{ tx('editor.density.compact', 'Compact') }}</option>
|
|
8637
|
+
</select>
|
|
8638
|
+
</label>
|
|
8066
8639
|
<label>
|
|
8067
8640
|
<span>{{ tx('editor.field.orientation', 'Orientation') }}</span>
|
|
8068
8641
|
<select
|
|
@@ -8073,6 +8646,38 @@ class PraxisRichContentConfigEditor {
|
|
|
8073
8646
|
<option value="horizontal">{{ tx('editor.orientation.horizontal', 'Horizontal') }}</option>
|
|
8074
8647
|
</select>
|
|
8075
8648
|
</label>
|
|
8649
|
+
<label class="prx-rich-editor__checkbox-field">
|
|
8650
|
+
<input
|
|
8651
|
+
type="checkbox"
|
|
8652
|
+
[ngModel]="getBooleanField(node, 'loading')"
|
|
8653
|
+
(ngModelChange)="setBooleanField($index, 'loading', $event)"
|
|
8654
|
+
/>
|
|
8655
|
+
<span>{{ tx('editor.field.loading', 'Loading') }}</span>
|
|
8656
|
+
</label>
|
|
8657
|
+
<label>
|
|
8658
|
+
<span>{{ tx('editor.field.loadingExpr', 'Loading binding') }}</span>
|
|
8659
|
+
<input
|
|
8660
|
+
[ngModel]="getStringField(node, 'loadingExpr')"
|
|
8661
|
+
(ngModelChange)="setStringField($index, 'loadingExpr', $event)"
|
|
8662
|
+
[placeholder]="tx('editor.placeholder.loadingExpr', 'row.loading')"
|
|
8663
|
+
/>
|
|
8664
|
+
</label>
|
|
8665
|
+
<label class="prx-rich-editor__checkbox-field">
|
|
8666
|
+
<input
|
|
8667
|
+
type="checkbox"
|
|
8668
|
+
[ngModel]="getBooleanField(node, 'active')"
|
|
8669
|
+
(ngModelChange)="setBooleanField($index, 'active', $event)"
|
|
8670
|
+
/>
|
|
8671
|
+
<span>{{ tx('editor.field.active', 'Active') }}</span>
|
|
8672
|
+
</label>
|
|
8673
|
+
<label>
|
|
8674
|
+
<span>{{ tx('editor.field.activeExpr', 'Active binding') }}</span>
|
|
8675
|
+
<input
|
|
8676
|
+
[ngModel]="getStringField(node, 'activeExpr')"
|
|
8677
|
+
(ngModelChange)="setStringField($index, 'activeExpr', $event)"
|
|
8678
|
+
[placeholder]="tx('editor.placeholder.activeExpr', 'row.active')"
|
|
8679
|
+
/>
|
|
8680
|
+
</label>
|
|
8076
8681
|
<label>
|
|
8077
8682
|
<span>{{ tx('editor.field.mediaKind', 'Media') }}</span>
|
|
8078
8683
|
<select
|
|
@@ -8094,6 +8699,14 @@ class PraxisRichContentConfigEditor {
|
|
|
8094
8699
|
(ngModelChange)="setCardMediaField(nodeIndex, 'src', $event)"
|
|
8095
8700
|
/>
|
|
8096
8701
|
</label>
|
|
8702
|
+
<label>
|
|
8703
|
+
<span>{{ tx('editor.field.mediaSrcExpr', 'Media source binding') }}</span>
|
|
8704
|
+
<input
|
|
8705
|
+
[ngModel]="getCardMediaField(nodeIndex, 'srcExpr')"
|
|
8706
|
+
(ngModelChange)="setCardMediaField(nodeIndex, 'srcExpr', $event)"
|
|
8707
|
+
[placeholder]="tx('editor.placeholder.mediaSrcExpr', 'row.mediaUrl')"
|
|
8708
|
+
/>
|
|
8709
|
+
</label>
|
|
8097
8710
|
<label>
|
|
8098
8711
|
<span>{{ tx('editor.field.mediaAlt', 'Media alt text') }}</span>
|
|
8099
8712
|
<input
|
|
@@ -8101,6 +8714,14 @@ class PraxisRichContentConfigEditor {
|
|
|
8101
8714
|
(ngModelChange)="setCardMediaField(nodeIndex, 'alt', $event)"
|
|
8102
8715
|
/>
|
|
8103
8716
|
</label>
|
|
8717
|
+
<label>
|
|
8718
|
+
<span>{{ tx('editor.field.mediaAltExpr', 'Media alt binding') }}</span>
|
|
8719
|
+
<input
|
|
8720
|
+
[ngModel]="getCardMediaField(nodeIndex, 'altExpr')"
|
|
8721
|
+
(ngModelChange)="setCardMediaField(nodeIndex, 'altExpr', $event)"
|
|
8722
|
+
[placeholder]="tx('editor.placeholder.mediaAltExpr', 'row.mediaAlt')"
|
|
8723
|
+
/>
|
|
8724
|
+
</label>
|
|
8104
8725
|
<label>
|
|
8105
8726
|
<span>{{ tx('editor.field.mediaIcon', 'Media icon') }}</span>
|
|
8106
8727
|
<input
|
|
@@ -8108,6 +8729,29 @@ class PraxisRichContentConfigEditor {
|
|
|
8108
8729
|
(ngModelChange)="setCardMediaField(nodeIndex, 'icon', $event)"
|
|
8109
8730
|
/>
|
|
8110
8731
|
</label>
|
|
8732
|
+
<label>
|
|
8733
|
+
<span>{{ tx('editor.field.mediaLabel', 'Media label') }}</span>
|
|
8734
|
+
<input
|
|
8735
|
+
[ngModel]="getCardMediaField(nodeIndex, 'label')"
|
|
8736
|
+
(ngModelChange)="setCardMediaField(nodeIndex, 'label', $event)"
|
|
8737
|
+
/>
|
|
8738
|
+
</label>
|
|
8739
|
+
<label>
|
|
8740
|
+
<span>{{ tx('editor.field.mediaLabelExpr', 'Media label binding') }}</span>
|
|
8741
|
+
<input
|
|
8742
|
+
[ngModel]="getCardMediaField(nodeIndex, 'labelExpr')"
|
|
8743
|
+
(ngModelChange)="setCardMediaField(nodeIndex, 'labelExpr', $event)"
|
|
8744
|
+
[placeholder]="tx('editor.placeholder.mediaLabelExpr', 'row.mediaLabel')"
|
|
8745
|
+
/>
|
|
8746
|
+
</label>
|
|
8747
|
+
<label>
|
|
8748
|
+
<span>{{ tx('editor.field.aspectRatio', 'Aspect ratio') }}</span>
|
|
8749
|
+
<input
|
|
8750
|
+
[ngModel]="getCardMediaField(nodeIndex, 'aspectRatio')"
|
|
8751
|
+
(ngModelChange)="setCardMediaField(nodeIndex, 'aspectRatio', $event)"
|
|
8752
|
+
[placeholder]="tx('editor.placeholder.aspectRatio', '16 / 9')"
|
|
8753
|
+
/>
|
|
8754
|
+
</label>
|
|
8111
8755
|
<label>
|
|
8112
8756
|
<span>{{ tx('editor.field.mediaPlacement', 'Media placement') }}</span>
|
|
8113
8757
|
<select
|
|
@@ -8121,16 +8765,86 @@ class PraxisRichContentConfigEditor {
|
|
|
8121
8765
|
</select>
|
|
8122
8766
|
</label>
|
|
8123
8767
|
}
|
|
8124
|
-
<
|
|
8125
|
-
<
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
<
|
|
8133
|
-
|
|
8768
|
+
<label>
|
|
8769
|
+
<span>{{ tx('editor.field.interactionMode', 'Interaction mode') }}</span>
|
|
8770
|
+
<select
|
|
8771
|
+
[ngModel]="getCardInteractionField(nodeIndex, 'mode') || 'none'"
|
|
8772
|
+
(ngModelChange)="setCardInteractionField(nodeIndex, 'mode', $event)"
|
|
8773
|
+
>
|
|
8774
|
+
<option value="none">{{ tx('editor.interaction.none', 'None') }}</option>
|
|
8775
|
+
<option value="action">{{ tx('editor.interaction.action', 'Action') }}</option>
|
|
8776
|
+
<option value="selectable">{{ tx('editor.interaction.selectable', 'Selectable') }}</option>
|
|
8777
|
+
</select>
|
|
8778
|
+
</label>
|
|
8779
|
+
<label class="prx-rich-editor__checkbox-field">
|
|
8780
|
+
<input
|
|
8781
|
+
type="checkbox"
|
|
8782
|
+
[ngModel]="getCardInteractionBooleanField(nodeIndex, 'selected')"
|
|
8783
|
+
(ngModelChange)="setCardInteractionBooleanField(nodeIndex, 'selected', $event)"
|
|
8784
|
+
/>
|
|
8785
|
+
<span>{{ tx('editor.field.selected', 'Selected') }}</span>
|
|
8786
|
+
</label>
|
|
8787
|
+
<label>
|
|
8788
|
+
<span>{{ tx('editor.field.selectedExpr', 'Selected binding') }}</span>
|
|
8789
|
+
<input
|
|
8790
|
+
[ngModel]="getCardInteractionField(nodeIndex, 'selectedExpr')"
|
|
8791
|
+
(ngModelChange)="setCardInteractionField(nodeIndex, 'selectedExpr', $event)"
|
|
8792
|
+
[placeholder]="tx('editor.placeholder.selectedExpr', 'row.selected')"
|
|
8793
|
+
/>
|
|
8794
|
+
</label>
|
|
8795
|
+
<label>
|
|
8796
|
+
<span>{{ tx('editor.field.interactionActionId', 'Interaction action ID') }}</span>
|
|
8797
|
+
<input
|
|
8798
|
+
[ngModel]="getCardInteractionActionField(nodeIndex, 'actionId')"
|
|
8799
|
+
(ngModelChange)="setCardInteractionActionField(nodeIndex, 'actionId', $event)"
|
|
8800
|
+
[placeholder]="tx('editor.placeholder.actionId', 'host.action.open')"
|
|
8801
|
+
/>
|
|
8802
|
+
</label>
|
|
8803
|
+
<label>
|
|
8804
|
+
<span>{{ tx('editor.field.payloadExpr', 'Payload binding') }}</span>
|
|
8805
|
+
<input
|
|
8806
|
+
[ngModel]="getCardInteractionActionField(nodeIndex, 'payloadExpr')"
|
|
8807
|
+
(ngModelChange)="setCardInteractionActionField(nodeIndex, 'payloadExpr', $event)"
|
|
8808
|
+
[placeholder]="tx('editor.placeholder.payloadExpr', 'row')"
|
|
8809
|
+
/>
|
|
8810
|
+
</label>
|
|
8811
|
+
<label>
|
|
8812
|
+
<span>{{ tx('editor.field.accessibilityRole', 'Accessibility role') }}</span>
|
|
8813
|
+
<select
|
|
8814
|
+
[ngModel]="getCardAccessibilityField(nodeIndex, 'role')"
|
|
8815
|
+
(ngModelChange)="setCardAccessibilityField(nodeIndex, 'role', $event)"
|
|
8816
|
+
>
|
|
8817
|
+
<option value="">{{ tx('editor.none', 'None') }}</option>
|
|
8818
|
+
<option value="article">{{ tx('editor.accessibilityRole.article', 'Article') }}</option>
|
|
8819
|
+
<option value="group">{{ tx('editor.accessibilityRole.group', 'Group') }}</option>
|
|
8820
|
+
<option value="button">{{ tx('editor.accessibilityRole.button', 'Button') }}</option>
|
|
8821
|
+
</select>
|
|
8822
|
+
</label>
|
|
8823
|
+
<label>
|
|
8824
|
+
<span>{{ tx('editor.field.ariaLabel', 'Accessible label') }}</span>
|
|
8825
|
+
<input
|
|
8826
|
+
[ngModel]="getCardAccessibilityField(nodeIndex, 'ariaLabel')"
|
|
8827
|
+
(ngModelChange)="setCardAccessibilityField(nodeIndex, 'ariaLabel', $event)"
|
|
8828
|
+
/>
|
|
8829
|
+
</label>
|
|
8830
|
+
<label>
|
|
8831
|
+
<span>{{ tx('editor.field.ariaLabelExpr', 'Accessible label binding') }}</span>
|
|
8832
|
+
<input
|
|
8833
|
+
[ngModel]="getCardAccessibilityField(nodeIndex, 'ariaLabelExpr')"
|
|
8834
|
+
(ngModelChange)="setCardAccessibilityField(nodeIndex, 'ariaLabelExpr', $event)"
|
|
8835
|
+
[placeholder]="tx('editor.placeholder.ariaLabelExpr', 'row.ariaLabel')"
|
|
8836
|
+
/>
|
|
8837
|
+
</label>
|
|
8838
|
+
<div class="prx-rich-editor__nested-editor">
|
|
8839
|
+
<header class="prx-rich-editor__nested-header">
|
|
8840
|
+
<h5>{{ tx('editor.cardContent', 'Card body') }}</h5>
|
|
8841
|
+
<button type="button" (click)="addCardContentNode($index)">
|
|
8842
|
+
{{ tx('editor.addItem', 'Add item') }}
|
|
8843
|
+
</button>
|
|
8844
|
+
</header>
|
|
8845
|
+
@for (item of getCardContentNodes(nodeIndex); track item.id ?? $index; let itemIndex = $index) {
|
|
8846
|
+
<div class="prx-rich-editor__nested-node">
|
|
8847
|
+
<div class="prx-rich-editor__nested-actions">
|
|
8134
8848
|
<strong>{{ tx('editor.item', 'Item') }} {{ itemIndex + 1 }}</strong>
|
|
8135
8849
|
@if (isRemovalPending('nodes.' + nodeIndex + '.content', itemIndex)) {
|
|
8136
8850
|
<button type="button" (click)="confirmCardContentRemoval(nodeIndex, itemIndex)">
|
|
@@ -8566,6 +9280,14 @@ class PraxisRichContentConfigEditor {
|
|
|
8566
9280
|
(ngModelChange)="setTabsItemField(nodeIndex, $index, 'label', $event)"
|
|
8567
9281
|
/>
|
|
8568
9282
|
</label>
|
|
9283
|
+
<label>
|
|
9284
|
+
<span>{{ tx('editor.field.labelExpr', 'Label binding') }}</span>
|
|
9285
|
+
<input
|
|
9286
|
+
[ngModel]="getTabsItemField(nodeIndex, $index, 'labelExpr')"
|
|
9287
|
+
(ngModelChange)="setTabsItemField(nodeIndex, $index, 'labelExpr', $event)"
|
|
9288
|
+
[placeholder]="tx('editor.placeholder.tabLabelExpr', 'row.tabLabel')"
|
|
9289
|
+
/>
|
|
9290
|
+
</label>
|
|
8569
9291
|
<label>
|
|
8570
9292
|
<span>{{ tx('editor.field.icon', 'Icon') }}</span>
|
|
8571
9293
|
<input
|
|
@@ -8580,6 +9302,48 @@ class PraxisRichContentConfigEditor {
|
|
|
8580
9302
|
(ngModelChange)="setTabsItemField(nodeIndex, $index, 'badge', $event)"
|
|
8581
9303
|
/>
|
|
8582
9304
|
</label>
|
|
9305
|
+
<label>
|
|
9306
|
+
<span>{{ tx('editor.field.badgeExpr', 'Badge binding') }}</span>
|
|
9307
|
+
<input
|
|
9308
|
+
[ngModel]="getTabsItemField(nodeIndex, $index, 'badgeExpr')"
|
|
9309
|
+
(ngModelChange)="setTabsItemField(nodeIndex, $index, 'badgeExpr', $event)"
|
|
9310
|
+
[placeholder]="tx('editor.placeholder.badgeExpr', 'row.badge')"
|
|
9311
|
+
/>
|
|
9312
|
+
</label>
|
|
9313
|
+
<label>
|
|
9314
|
+
<span>{{ tx('editor.field.requiresCapabilities', 'Capabilities') }}</span>
|
|
9315
|
+
<input
|
|
9316
|
+
[ngModel]="getTabsItemCapabilityList(nodeIndex, $index)"
|
|
9317
|
+
(ngModelChange)="setTabsItemCapabilityList(nodeIndex, $index, $event)"
|
|
9318
|
+
[placeholder]="tx('editor.placeholder.requiresCapabilities', 'form.mode.edit, employee.open')"
|
|
9319
|
+
/>
|
|
9320
|
+
</label>
|
|
9321
|
+
<label>
|
|
9322
|
+
<span>{{ tx('editor.field.capabilityMode', 'Capability mode') }}</span>
|
|
9323
|
+
<select
|
|
9324
|
+
[ngModel]="getTabsItemField(nodeIndex, $index, 'capabilityMode') || 'all'"
|
|
9325
|
+
(ngModelChange)="setTabsItemField(nodeIndex, $index, 'capabilityMode', $event)"
|
|
9326
|
+
>
|
|
9327
|
+
<option value="all">{{ tx('editor.capabilityMode.all', 'All') }}</option>
|
|
9328
|
+
<option value="any">{{ tx('editor.capabilityMode.any', 'Any') }}</option>
|
|
9329
|
+
</select>
|
|
9330
|
+
</label>
|
|
9331
|
+
<label>
|
|
9332
|
+
<span>{{ tx('editor.field.visibleWhenPath', 'Context path') }}</span>
|
|
9333
|
+
<input
|
|
9334
|
+
[ngModel]="getTabsItemVisibleWhenPath(nodeIndex, $index)"
|
|
9335
|
+
(ngModelChange)="setTabsItemVisibleWhenPath(nodeIndex, $index, $event)"
|
|
9336
|
+
[placeholder]="tx('editor.placeholder.visibleWhenPath', 'row.active')"
|
|
9337
|
+
/>
|
|
9338
|
+
</label>
|
|
9339
|
+
<label>
|
|
9340
|
+
<span>{{ tx('editor.field.visibleWhenValue', 'Expected value') }}</span>
|
|
9341
|
+
<input
|
|
9342
|
+
[ngModel]="getTabsItemVisibleWhenValue(nodeIndex, $index)"
|
|
9343
|
+
(ngModelChange)="setTabsItemVisibleWhenValue(nodeIndex, $index, $event)"
|
|
9344
|
+
[placeholder]="tx('editor.placeholder.visibleWhenValue', 'true')"
|
|
9345
|
+
/>
|
|
9346
|
+
</label>
|
|
8583
9347
|
</div>
|
|
8584
9348
|
}
|
|
8585
9349
|
</div>
|
|
@@ -9970,97 +10734,169 @@ class PraxisRichContentConfigEditor {
|
|
|
9970
10734
|
</p>
|
|
9971
10735
|
}
|
|
9972
10736
|
}
|
|
9973
|
-
<
|
|
9974
|
-
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
|
|
9979
|
-
|
|
9980
|
-
|
|
9981
|
-
|
|
9982
|
-
|
|
9983
|
-
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
/>
|
|
9990
|
-
</label>
|
|
9991
|
-
<label>
|
|
9992
|
-
<span>{{ tx('editor.field.requiresCapabilities', 'Capabilities') }}</span>
|
|
9993
|
-
<input
|
|
9994
|
-
[ngModel]="getCapabilityList(node)"
|
|
9995
|
-
(ngModelChange)="setCapabilityList($index, $event)"
|
|
9996
|
-
[placeholder]="tx('editor.placeholder.requiresCapabilities', 'form.mode.edit, employee.open')"
|
|
9997
|
-
/>
|
|
9998
|
-
</label>
|
|
9999
|
-
<label>
|
|
10000
|
-
<span>{{ tx('editor.field.capabilityMode', 'Capability mode') }}</span>
|
|
10001
|
-
<select
|
|
10002
|
-
[ngModel]="getStringField(node, 'capabilityMode') || 'all'"
|
|
10003
|
-
(ngModelChange)="setStringField($index, 'capabilityMode', $event)"
|
|
10004
|
-
>
|
|
10005
|
-
<option value="all">{{ tx('editor.capabilityMode.all', 'All') }}</option>
|
|
10006
|
-
<option value="any">{{ tx('editor.capabilityMode.any', 'Any') }}</option>
|
|
10007
|
-
</select>
|
|
10008
|
-
</label>
|
|
10009
|
-
</fieldset>
|
|
10737
|
+
<details
|
|
10738
|
+
class="prx-rich-editor__advanced-group"
|
|
10739
|
+
[open]="advancedRulesOpen"
|
|
10740
|
+
(toggle)="onAdvancedRulesToggle($event)"
|
|
10741
|
+
>
|
|
10742
|
+
<summary>
|
|
10743
|
+
<span>{{ tx('editor.advancedDataRules', 'Advanced data and rules') }}</span>
|
|
10744
|
+
<small>
|
|
10745
|
+
{{
|
|
10746
|
+
tx(
|
|
10747
|
+
'editor.advancedDataRulesHelp',
|
|
10748
|
+
'Metadata, capability gates, visibility and safe style.'
|
|
10749
|
+
)
|
|
10750
|
+
}}
|
|
10751
|
+
</small>
|
|
10752
|
+
</summary>
|
|
10010
10753
|
|
|
10011
|
-
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
10025
|
-
|
|
10026
|
-
|
|
10027
|
-
|
|
10028
|
-
|
|
10029
|
-
|
|
10754
|
+
<fieldset class="prx-rich-editor__field-group">
|
|
10755
|
+
<legend>{{ tx('editor.commonMetadata', 'Common metadata') }}</legend>
|
|
10756
|
+
<label>
|
|
10757
|
+
<span>{{ tx('editor.field.testId', 'Test id') }}</span>
|
|
10758
|
+
<input
|
|
10759
|
+
[ngModel]="getStringField(node, 'testId')"
|
|
10760
|
+
(ngModelChange)="setStringField($index, 'testId', $event)"
|
|
10761
|
+
[placeholder]="tx('editor.placeholder.testId', 'rich-hero-title')"
|
|
10762
|
+
/>
|
|
10763
|
+
</label>
|
|
10764
|
+
<label>
|
|
10765
|
+
<span>{{ tx('editor.field.className', 'CSS class') }}</span>
|
|
10766
|
+
<input
|
|
10767
|
+
[ngModel]="getStringField(node, 'className')"
|
|
10768
|
+
(ngModelChange)="setStringField($index, 'className', $event)"
|
|
10769
|
+
[placeholder]="tx('editor.placeholder.className', 'hero-title')"
|
|
10770
|
+
/>
|
|
10771
|
+
</label>
|
|
10772
|
+
<label>
|
|
10773
|
+
<span>{{ tx('editor.field.requiresCapabilities', 'Capabilities') }}</span>
|
|
10774
|
+
<input
|
|
10775
|
+
[ngModel]="getCapabilityList(node)"
|
|
10776
|
+
(ngModelChange)="setCapabilityList($index, $event)"
|
|
10777
|
+
[placeholder]="tx('editor.placeholder.requiresCapabilities', 'form.mode.edit, employee.open')"
|
|
10778
|
+
/>
|
|
10779
|
+
</label>
|
|
10780
|
+
<label>
|
|
10781
|
+
<span>{{ tx('editor.field.capabilityMode', 'Capability mode') }}</span>
|
|
10782
|
+
<select
|
|
10783
|
+
[ngModel]="getStringField(node, 'capabilityMode') || 'all'"
|
|
10784
|
+
(ngModelChange)="setStringField($index, 'capabilityMode', $event)"
|
|
10785
|
+
>
|
|
10786
|
+
<option value="all">{{ tx('editor.capabilityMode.all', 'All') }}</option>
|
|
10787
|
+
<option value="any">{{ tx('editor.capabilityMode.any', 'Any') }}</option>
|
|
10788
|
+
</select>
|
|
10789
|
+
</label>
|
|
10790
|
+
</fieldset>
|
|
10030
10791
|
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
|
|
10035
|
-
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10792
|
+
<fieldset class="prx-rich-editor__field-group">
|
|
10793
|
+
<legend>{{ tx('editor.visibilityRule', 'Visibility rule') }}</legend>
|
|
10794
|
+
<label>
|
|
10795
|
+
<span>{{ tx('editor.field.visibleWhenPath', 'Context path') }}</span>
|
|
10796
|
+
<input
|
|
10797
|
+
[ngModel]="getVisibleWhenPath(node)"
|
|
10798
|
+
(ngModelChange)="setVisibleWhenPath($index, $event)"
|
|
10799
|
+
[placeholder]="tx('editor.placeholder.visibleWhenPath', 'row.active')"
|
|
10800
|
+
/>
|
|
10801
|
+
</label>
|
|
10802
|
+
<label>
|
|
10803
|
+
<span>{{ tx('editor.field.visibleWhenValue', 'Expected value') }}</span>
|
|
10804
|
+
<input
|
|
10805
|
+
[ngModel]="getVisibleWhenValue(node)"
|
|
10806
|
+
(ngModelChange)="setVisibleWhenValue($index, $event)"
|
|
10807
|
+
[placeholder]="tx('editor.placeholder.visibleWhenValue', 'true')"
|
|
10808
|
+
/>
|
|
10809
|
+
</label>
|
|
10810
|
+
</fieldset>
|
|
10811
|
+
|
|
10812
|
+
<fieldset class="prx-rich-editor__field-group">
|
|
10813
|
+
<legend>{{ tx('editor.safeStyle', 'Safe style') }}</legend>
|
|
10814
|
+
<label>
|
|
10815
|
+
<span>{{ tx('editor.field.styleName', 'CSS property') }}</span>
|
|
10816
|
+
<input
|
|
10817
|
+
[ngModel]="getFirstStyleName(node)"
|
|
10818
|
+
(ngModelChange)="setFirstStyleName($index, $event)"
|
|
10819
|
+
[placeholder]="tx('editor.placeholder.styleName', 'color')"
|
|
10820
|
+
/>
|
|
10821
|
+
</label>
|
|
10822
|
+
<label>
|
|
10823
|
+
<span>{{ tx('editor.field.styleValue', 'CSS value') }}</span>
|
|
10824
|
+
<input
|
|
10825
|
+
[ngModel]="getFirstStyleValue(node)"
|
|
10826
|
+
(ngModelChange)="setFirstStyleValue($index, $event)"
|
|
10827
|
+
[placeholder]="tx('editor.placeholder.styleValue', 'var(--md-sys-color-primary)')"
|
|
10828
|
+
/>
|
|
10829
|
+
</label>
|
|
10830
|
+
</fieldset>
|
|
10831
|
+
</details>
|
|
10050
10832
|
</div>
|
|
10051
10833
|
</article>
|
|
10834
|
+
}
|
|
10052
10835
|
}
|
|
10053
10836
|
</div>
|
|
10837
|
+
</div>
|
|
10838
|
+
</div>
|
|
10054
10839
|
} @else {
|
|
10055
10840
|
<p class="prx-rich-editor__empty">
|
|
10056
10841
|
{{ tx('editor.noBlocks', 'No blocks yet. Add a block to start authoring this document.') }}
|
|
10057
10842
|
</p>
|
|
10058
10843
|
}
|
|
10059
10844
|
</section>
|
|
10845
|
+
}
|
|
10846
|
+
|
|
10847
|
+
@if (activeEditorPanel === 'preview') {
|
|
10848
|
+
<section
|
|
10849
|
+
class="prx-rich-editor__preview-panel"
|
|
10850
|
+
role="tabpanel"
|
|
10851
|
+
[attr.aria-label]="tx('editor.preview', 'Preview')"
|
|
10852
|
+
>
|
|
10853
|
+
<header class="prx-rich-editor__section-header">
|
|
10854
|
+
<div>
|
|
10855
|
+
<h3>{{ tx('editor.preview', 'Preview') }}</h3>
|
|
10856
|
+
<p>
|
|
10857
|
+
{{
|
|
10858
|
+
tx(
|
|
10859
|
+
'editor.previewHelp',
|
|
10860
|
+
'Inspect the materialized document without mixing preview with authoring fields.'
|
|
10861
|
+
)
|
|
10862
|
+
}}
|
|
10863
|
+
</p>
|
|
10864
|
+
</div>
|
|
10865
|
+
</header>
|
|
10866
|
+
@if (parsedDocument) {
|
|
10867
|
+
<div class="prx-rich-editor__preview prx-rich-editor__preview--large">
|
|
10868
|
+
<praxis-rich-content
|
|
10869
|
+
[document]="parsedDocument"
|
|
10870
|
+
[layout]="layout"
|
|
10871
|
+
[rootClassName]="rootClassName"
|
|
10872
|
+
></praxis-rich-content>
|
|
10873
|
+
</div>
|
|
10874
|
+
} @else {
|
|
10875
|
+
<p class="prx-rich-editor__empty">
|
|
10876
|
+
{{ tx('editor.previewUnavailable', 'Preview is unavailable until the document is valid.') }}
|
|
10877
|
+
</p>
|
|
10878
|
+
}
|
|
10879
|
+
</section>
|
|
10880
|
+
}
|
|
10060
10881
|
|
|
10061
|
-
|
|
10062
|
-
|
|
10882
|
+
@if (activeEditorPanel === 'json') {
|
|
10883
|
+
<section class="prx-rich-editor__document-panel">
|
|
10884
|
+
<header class="prx-rich-editor__section-header">
|
|
10885
|
+
<div>
|
|
10886
|
+
<h3>{{ tx('editor.document', 'Advanced JSON') }}</h3>
|
|
10887
|
+
<p>
|
|
10888
|
+
{{
|
|
10889
|
+
tx(
|
|
10890
|
+
'editor.documentAdvancedHelp',
|
|
10891
|
+
'Use JSON for diagnostics, migration and advanced fields that are not yet surfaced by guided controls.'
|
|
10892
|
+
)
|
|
10893
|
+
}}
|
|
10894
|
+
</p>
|
|
10895
|
+
</div>
|
|
10896
|
+
</header>
|
|
10063
10897
|
<div class="prx-rich-editor__workbench">
|
|
10898
|
+
<label class="prx-rich-editor__document">
|
|
10899
|
+
<span>{{ tx('editor.documentJson', 'Canonical document JSON') }}</span>
|
|
10064
10900
|
<textarea
|
|
10065
10901
|
name="rich-content-document"
|
|
10066
10902
|
[(ngModel)]="documentJson"
|
|
@@ -10074,6 +10910,7 @@ class PraxisRichContentConfigEditor {
|
|
|
10074
10910
|
spellcheck="false"
|
|
10075
10911
|
data-testid="rich-content-document-input"
|
|
10076
10912
|
></textarea>
|
|
10913
|
+
</label>
|
|
10077
10914
|
|
|
10078
10915
|
<aside
|
|
10079
10916
|
class="prx-rich-editor__inspector"
|
|
@@ -10093,21 +10930,9 @@ class PraxisRichContentConfigEditor {
|
|
|
10093
10930
|
</dl>
|
|
10094
10931
|
</section>
|
|
10095
10932
|
|
|
10096
|
-
@if (parsedDocument) {
|
|
10097
|
-
<section>
|
|
10098
|
-
<h3>{{ tx('editor.preview', 'Preview') }}</h3>
|
|
10099
|
-
<div class="prx-rich-editor__preview">
|
|
10100
|
-
<praxis-rich-content
|
|
10101
|
-
[document]="parsedDocument"
|
|
10102
|
-
[layout]="layout"
|
|
10103
|
-
[rootClassName]="rootClassName"
|
|
10104
|
-
></praxis-rich-content>
|
|
10105
|
-
</div>
|
|
10106
|
-
</section>
|
|
10107
|
-
}
|
|
10108
10933
|
</aside>
|
|
10109
10934
|
</div>
|
|
10110
|
-
</
|
|
10935
|
+
</section>
|
|
10111
10936
|
|
|
10112
10937
|
@if (errorMessage) {
|
|
10113
10938
|
<div
|
|
@@ -10137,6 +10962,7 @@ class PraxisRichContentConfigEditor {
|
|
|
10137
10962
|
}}
|
|
10138
10963
|
</p>
|
|
10139
10964
|
}
|
|
10965
|
+
}
|
|
10140
10966
|
|
|
10141
10967
|
<div class="prx-rich-editor__actions">
|
|
10142
10968
|
<button type="button" (click)="reset()">
|
|
@@ -10147,7 +10973,7 @@ class PraxisRichContentConfigEditor {
|
|
|
10147
10973
|
</button>
|
|
10148
10974
|
</div>
|
|
10149
10975
|
</section>
|
|
10150
|
-
`, isInline: true, styles: [":host{display:block;min-width:0}.prx-rich-editor{display:grid;gap:18px;color:var(--md-sys-color-on-surface, #1f2937)}.prx-rich-editor__header{display:flex;gap:16px;align-items:flex-start;justify-content:space-between}.prx-rich-editor__header h2{margin:0;font-size:1.25rem}.prx-rich-editor__header p{margin:6px 0 0;color:var(--md-sys-color-on-surface-variant, #5f6673)}.prx-rich-editor__eyebrow{margin:0 0 4px;text-transform:uppercase;letter-spacing:.08em;font-size:.72rem;color:var(--md-sys-color-primary, #3154e7)}.prx-rich-editor__status{flex:0 0 auto;padding:6px 10px;border-radius:999px;background:color-mix(in srgb,#16a34a 12%,transparent);color:#166534;font-size:.78rem;font-weight:700}.prx-rich-editor__status.invalid{background:color-mix(in srgb,#dc2626 12%,transparent);color:#991b1b}.prx-rich-editor__grid{display:grid;gap:14px;grid-template-columns:minmax(0,180px) minmax(0,1fr)}.prx-rich-editor__blocks{display:grid;gap:14px}.prx-rich-editor__section-header,.prx-rich-editor__node-header{display:flex;gap:16px;align-items:flex-start;justify-content:space-between}.prx-rich-editor__section-header h3,.prx-rich-editor__node-header h4{margin:0}.prx-rich-editor__section-header p,.prx-rich-editor__node-note,.prx-rich-editor__empty{margin:6px 0 0;color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.88rem}.prx-rich-editor__add-block,.prx-rich-editor__node-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}.prx-rich-editor__add-block label{min-width:180px}.prx-rich-editor__node-list{display:grid;gap:12px}.prx-rich-editor__node-card{display:grid;gap:14px;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:14px;background:var(--md-sys-color-surface-container-lowest, #fff)}.prx-rich-editor__node-eyebrow{margin:0 0 4px;color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.75rem;font-weight:700;text-transform:uppercase}.prx-rich-editor__node-grid{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}.prx-rich-editor__wide-field,.prx-rich-editor__node-note{grid-column:1 / -1}.prx-rich-editor__field-group,.prx-rich-editor__nested-editor,.prx-rich-editor__nested-node{grid-column:1 / -1;display:grid;gap:12px}.prx-rich-editor__field-group,.prx-rich-editor__nested-node{margin:0;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:12px}.prx-rich-editor__field-group{grid-template-columns:repeat(2,minmax(0,1fr))}.prx-rich-editor__field-group legend{padding:0 4px;font-weight:700}.prx-rich-editor__nested-header,.prx-rich-editor__nested-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}.prx-rich-editor__quick-actions{display:flex;flex-wrap:wrap;gap:8px}.prx-rich-editor__node-grid textarea{min-height:96px;font-family:inherit}label,.prx-rich-editor__document{display:grid;gap:7px;font-weight:700}.prx-rich-editor__checkbox-field{display:flex;gap:10px;align-items:center;align-self:end}.prx-rich-editor__checkbox-field input[type=checkbox]{width:auto}input,select,textarea{box-sizing:border-box;width:100%;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:12px;padding:10px 12px;font:inherit;color:inherit;background:var(--md-sys-color-surface, #fff)}textarea{min-height:360px;resize:vertical;font-family:Cascadia Code,Fira Code,Consolas,monospace;font-size:.86rem;line-height:1.45}.prx-rich-editor__workbench{display:grid;gap:14px;grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr)}.prx-rich-editor__inspector{display:grid;align-content:start;gap:14px;min-width:0;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:12px;background:var(--md-sys-color-surface-container-lowest, #fff)}.prx-rich-editor__inspector h3{margin:0 0 8px;font-size:.95rem}.prx-rich-editor__inspector dl{display:grid;gap:8px;margin:0}.prx-rich-editor__inspector dl div{display:grid;gap:2px}.prx-rich-editor__inspector dt{color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.78rem;font-weight:700}.prx-rich-editor__inspector dd{margin:0;overflow-wrap:anywhere;font-weight:600}.prx-rich-editor__preview{max-height:260px;overflow:auto;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:12px;background:var(--md-sys-color-surface, #fff)}.prx-rich-editor__help{margin:-8px 0 0;color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.85rem}.prx-rich-editor__error{margin:0;padding:10px 12px;border-radius:8px;color:#991b1b;background:color-mix(in srgb,#dc2626 9%,transparent)}.prx-rich-editor__error p{margin:0}.prx-rich-editor__error ul{display:grid;gap:6px;margin:8px 0 0;padding-inline-start:18px}.prx-rich-editor__error code{margin-right:4px;font-family:Cascadia Code,Fira Code,Consolas,monospace}.prx-rich-editor__actions{display:flex;flex-wrap:wrap;gap:10px}button{border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:8px 14px;background:var(--md-sys-color-surface, #fff);color:var(--md-sys-color-primary, #3154e7);font-weight:700;cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}@media(max-width:760px){.prx-rich-editor__header,.prx-rich-editor__section-header,.prx-rich-editor__node-header,.prx-rich-editor__grid,.prx-rich-editor__field-group,.prx-rich-editor__node-grid,.prx-rich-editor__workbench{grid-template-columns:1fr;display:grid}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PraxisRichContent, selector: "praxis-rich-content", inputs: ["document", "nodes", "context", "hostCapabilities", "layout", "rootClassName"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10976
|
+
`, isInline: true, styles: [":host{display:block;min-width:0;width:100%;max-width:100%;box-sizing:border-box}.prx-rich-editor{display:grid;gap:18px;min-width:0;color:var(--md-sys-color-on-surface, #1f2937)}.prx-rich-editor__header{display:flex;gap:16px;align-items:flex-start;justify-content:space-between}.prx-rich-editor__header h2{margin:0;font-size:1.25rem}.prx-rich-editor__header p{margin:6px 0 0;color:var(--md-sys-color-on-surface-variant, #5f6673)}.prx-rich-editor__eyebrow{margin:0 0 4px;text-transform:uppercase;letter-spacing:.08em;font-size:.72rem;color:var(--md-sys-color-primary, #3154e7)}.prx-rich-editor__status{flex:0 0 auto;padding:6px 10px;border-radius:999px;background:color-mix(in srgb,#16a34a 12%,transparent);color:#166534;font-size:.78rem;font-weight:700}.prx-rich-editor__status.invalid{background:color-mix(in srgb,#dc2626 12%,transparent);color:#991b1b}.prx-rich-editor__grid{display:grid;gap:14px;grid-template-columns:minmax(0,180px) minmax(0,1fr)}.prx-rich-editor__tabs{display:flex;flex-wrap:wrap;gap:8px;align-items:center;border-bottom:1px solid var(--md-sys-color-outline-variant, #d7dce5)}.prx-rich-editor__tab{margin-block-end:-1px;border-radius:8px 8px 0 0;border-bottom-color:transparent;color:var(--md-sys-color-on-surface-variant, #5f6673);background:transparent}.prx-rich-editor__tab--active{border-color:var(--md-sys-color-outline-variant, #d7dce5);border-bottom-color:var(--md-sys-color-surface, #fff);color:var(--md-sys-color-primary, #3154e7);background:var(--md-sys-color-surface, #fff)}.prx-rich-editor__tab-badge,.prx-rich-editor__issue-count{display:inline-flex;min-width:1.35em;min-height:1.35em;padding:0 .38em;border-radius:999px;align-items:center;justify-content:center;background:color-mix(in srgb,#dc2626 14%,transparent);color:#991b1b;font-size:.72rem;font-weight:800;line-height:1}.prx-rich-editor__tab-badge{margin-inline-start:6px}.prx-rich-editor__blocks{display:grid;gap:14px}.prx-rich-editor__authoring-shell{display:grid;gap:14px;grid-template-columns:minmax(220px,.34fr) minmax(0,1fr);align-items:start}.prx-rich-editor__structure,.prx-rich-editor__properties,.prx-rich-editor__document-panel,.prx-rich-editor__preview-panel{min-width:0;display:grid;gap:12px}.prx-rich-editor__structure{position:sticky;top:12px;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:12px;background:var(--md-sys-color-surface-container-lowest, #fff)}.prx-rich-editor__structure-summary{display:grid;gap:4px}.prx-rich-editor__structure-summary span{color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.82rem;font-weight:500}.prx-rich-editor__structure-list{display:grid;gap:8px}.prx-rich-editor__structure-item{display:grid;gap:3px;width:100%;padding:10px;text-align:left;color:var(--md-sys-color-on-surface, #1f2937);background:var(--md-sys-color-surface, #fff)}.prx-rich-editor__structure-item--selected{border-color:var(--md-sys-color-primary, #3154e7);background:color-mix(in srgb,var(--md-sys-color-primary, #3154e7) 8%,var(--md-sys-color-surface, #fff))}.prx-rich-editor__structure-item small{color:#991b1b;font-weight:700}.prx-rich-editor__intent-strip{display:grid;gap:8px;grid-template-columns:repeat(3,minmax(0,1fr))}.prx-rich-editor__intent-strip span,.prx-rich-editor__intent-strip button{min-width:0;display:grid;gap:3px;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:10px 12px;text-align:left;color:var(--md-sys-color-on-surface, #1f2937);background:var(--md-sys-color-surface, #fff)}.prx-rich-editor__intent-strip button{position:relative}.prx-rich-editor__intent-strip small{color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.78rem;font-weight:600}.prx-rich-editor__intent-strip .prx-rich-editor__issue-count{position:absolute;inset-block-start:8px;inset-inline-end:8px}.prx-rich-editor__section-header,.prx-rich-editor__node-header{display:flex;gap:16px;align-items:flex-start;justify-content:space-between}.prx-rich-editor__section-header h3,.prx-rich-editor__node-header h4{margin:0}.prx-rich-editor__section-header p,.prx-rich-editor__node-note,.prx-rich-editor__empty{margin:6px 0 0;color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.88rem}.prx-rich-editor__add-block,.prx-rich-editor__node-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}.prx-rich-editor__add-block label{min-width:180px}.prx-rich-editor__node-list{display:grid;gap:12px}.prx-rich-editor__node-card{display:grid;gap:14px;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:14px;background:var(--md-sys-color-surface-container-lowest, #fff)}.prx-rich-editor__node-eyebrow{margin:0 0 4px;color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.75rem;font-weight:700;text-transform:uppercase}.prx-rich-editor__node-grid{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}.prx-rich-editor__wide-field,.prx-rich-editor__node-note{grid-column:1 / -1}.prx-rich-editor__field-group,.prx-rich-editor__nested-editor,.prx-rich-editor__nested-node{grid-column:1 / -1;display:grid;gap:12px}.prx-rich-editor__field-group,.prx-rich-editor__nested-node{margin:0;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:12px}.prx-rich-editor__field-group{grid-template-columns:repeat(2,minmax(0,1fr))}.prx-rich-editor__field-group legend{padding:0 4px;font-weight:700}.prx-rich-editor__advanced-group{grid-column:1 / -1;display:grid;gap:12px;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:12px;background:color-mix(in srgb,var(--md-sys-color-surface-container-lowest, #fff) 88%,var(--md-sys-color-primary, #3154e7) 4%)}.prx-rich-editor__advanced-group summary{display:flex;gap:10px;align-items:center;justify-content:space-between;cursor:pointer;font-weight:800}.prx-rich-editor__advanced-group summary small{color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.78rem;font-weight:600}.prx-rich-editor__advanced-group[open]{padding-block-end:14px}.prx-rich-editor__advanced-group[open] summary{margin-block-end:12px}.prx-rich-editor__advanced-group .prx-rich-editor__field-group+.prx-rich-editor__field-group{margin-block-start:12px}.prx-rich-editor__nested-header,.prx-rich-editor__nested-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}.prx-rich-editor__quick-actions{display:flex;flex-wrap:wrap;gap:8px}.prx-rich-editor__node-grid textarea{min-height:96px;font-family:inherit}label,.prx-rich-editor__document{display:grid;gap:7px;font-weight:700}.prx-rich-editor__checkbox-field{display:flex;gap:10px;align-items:center;align-self:end}.prx-rich-editor__checkbox-field input[type=checkbox]{width:auto}input,select,textarea{box-sizing:border-box;width:100%;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:12px;padding:10px 12px;font:inherit;color:inherit;background:var(--md-sys-color-surface, #fff)}textarea{min-height:360px;resize:vertical;font-family:Cascadia Code,Fira Code,Consolas,monospace;font-size:.86rem;line-height:1.45}.prx-rich-editor__workbench{display:grid;gap:14px;grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr)}.prx-rich-editor__inspector{display:grid;align-content:start;gap:14px;min-width:0;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:12px;background:var(--md-sys-color-surface-container-lowest, #fff)}.prx-rich-editor__inspector h3{margin:0 0 8px;font-size:.95rem}.prx-rich-editor__inspector dl{display:grid;gap:8px;margin:0}.prx-rich-editor__inspector dl div{display:grid;gap:2px}.prx-rich-editor__inspector dt{color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.78rem;font-weight:700}.prx-rich-editor__inspector dd{margin:0;overflow-wrap:anywhere;font-weight:600}.prx-rich-editor__preview{max-height:260px;overflow:auto;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:12px;background:var(--md-sys-color-surface, #fff)}.prx-rich-editor__preview--large{max-height:min(68vh,760px)}.prx-rich-editor__help{margin:-8px 0 0;color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.85rem}.prx-rich-editor__error{margin:0;padding:10px 12px;border-radius:8px;color:#991b1b;background:color-mix(in srgb,#dc2626 9%,transparent)}.prx-rich-editor__error p{margin:0}.prx-rich-editor__error ul{display:grid;gap:6px;margin:8px 0 0;padding-inline-start:18px}.prx-rich-editor__error code{margin-right:4px;font-family:Cascadia Code,Fira Code,Consolas,monospace}.prx-rich-editor__actions{display:flex;flex-wrap:wrap;gap:10px}button{border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:8px 14px;background:var(--md-sys-color-surface, #fff);color:var(--md-sys-color-primary, #3154e7);font-weight:700;cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}@media(max-width:760px){.prx-rich-editor__header,.prx-rich-editor__section-header,.prx-rich-editor__node-header,.prx-rich-editor__authoring-shell,.prx-rich-editor__intent-strip,.prx-rich-editor__grid,.prx-rich-editor__field-group,.prx-rich-editor__node-grid,.prx-rich-editor__workbench{grid-template-columns:1fr;display:grid}.prx-rich-editor__structure{position:static}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PraxisRichContent, selector: "praxis-rich-content", inputs: ["document", "nodes", "context", "hostCapabilities", "layout", "rootClassName"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10151
10977
|
}
|
|
10152
10978
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisRichContentConfigEditor, decorators: [{
|
|
10153
10979
|
type: Component,
|
|
@@ -10300,6 +11126,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
10300
11126
|
(ngModelChange)="setString('src', $event)"
|
|
10301
11127
|
/>
|
|
10302
11128
|
</label>
|
|
11129
|
+
<label>
|
|
11130
|
+
<span>{{ tx('editor.field.srcExpr', 'Image URL binding') }}</span>
|
|
11131
|
+
<input
|
|
11132
|
+
[ngModel]="getStringField(node, 'srcExpr')"
|
|
11133
|
+
(ngModelChange)="setString('srcExpr', $event)"
|
|
11134
|
+
/>
|
|
11135
|
+
</label>
|
|
10303
11136
|
<label>
|
|
10304
11137
|
<span>{{ tx('editor.field.alt', 'Alternative text') }}</span>
|
|
10305
11138
|
<input
|
|
@@ -10307,6 +11140,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
10307
11140
|
(ngModelChange)="setString('alt', $event)"
|
|
10308
11141
|
/>
|
|
10309
11142
|
</label>
|
|
11143
|
+
<label>
|
|
11144
|
+
<span>{{ tx('editor.field.altExpr', 'Alt text binding') }}</span>
|
|
11145
|
+
<input
|
|
11146
|
+
[ngModel]="getStringField(node, 'altExpr')"
|
|
11147
|
+
(ngModelChange)="setString('altExpr', $event)"
|
|
11148
|
+
/>
|
|
11149
|
+
</label>
|
|
10310
11150
|
}
|
|
10311
11151
|
@case ('link') {
|
|
10312
11152
|
<label>
|
|
@@ -10316,6 +11156,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
10316
11156
|
(ngModelChange)="setString('label', $event)"
|
|
10317
11157
|
/>
|
|
10318
11158
|
</label>
|
|
11159
|
+
<label>
|
|
11160
|
+
<span>{{ tx('editor.field.labelExpr', 'Label binding') }}</span>
|
|
11161
|
+
<input
|
|
11162
|
+
[ngModel]="getStringField(node, 'labelExpr')"
|
|
11163
|
+
(ngModelChange)="setString('labelExpr', $event)"
|
|
11164
|
+
/>
|
|
11165
|
+
</label>
|
|
10319
11166
|
<label>
|
|
10320
11167
|
<span>{{ tx('editor.field.href', 'Link URL') }}</span>
|
|
10321
11168
|
<input
|
|
@@ -10365,6 +11212,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
10365
11212
|
(ngModelChange)="setString('label', $event)"
|
|
10366
11213
|
/>
|
|
10367
11214
|
</label>
|
|
11215
|
+
<label>
|
|
11216
|
+
<span>{{ tx('editor.field.labelExpr', 'Label binding') }}</span>
|
|
11217
|
+
<input
|
|
11218
|
+
[ngModel]="getStringField(node, 'labelExpr')"
|
|
11219
|
+
(ngModelChange)="setString('labelExpr', $event)"
|
|
11220
|
+
/>
|
|
11221
|
+
</label>
|
|
11222
|
+
<label>
|
|
11223
|
+
<span>{{ tx('editor.field.valueExpr', 'Value binding') }}</span>
|
|
11224
|
+
<input
|
|
11225
|
+
[ngModel]="getStringField(node, 'valueExpr')"
|
|
11226
|
+
(ngModelChange)="setString('valueExpr', $event)"
|
|
11227
|
+
/>
|
|
11228
|
+
</label>
|
|
10368
11229
|
<label>
|
|
10369
11230
|
<span>{{ tx('editor.field.max', 'Maximum') }}</span>
|
|
10370
11231
|
<input
|
|
@@ -10618,7 +11479,59 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
10618
11479
|
</div>
|
|
10619
11480
|
</ng-template>
|
|
10620
11481
|
|
|
10621
|
-
<
|
|
11482
|
+
<nav
|
|
11483
|
+
class="prx-rich-editor__tabs"
|
|
11484
|
+
[attr.aria-label]="tx('editor.workbenchTabs', 'Editor sections')"
|
|
11485
|
+
role="tablist"
|
|
11486
|
+
>
|
|
11487
|
+
<button
|
|
11488
|
+
type="button"
|
|
11489
|
+
role="tab"
|
|
11490
|
+
class="prx-rich-editor__tab"
|
|
11491
|
+
[class.prx-rich-editor__tab--active]="activeEditorPanel === 'guided'"
|
|
11492
|
+
[attr.aria-selected]="activeEditorPanel === 'guided'"
|
|
11493
|
+
(click)="selectEditorPanel('guided')"
|
|
11494
|
+
data-testid="rich-content-guided-tab"
|
|
11495
|
+
>
|
|
11496
|
+
{{ tx('editor.guidedEditing', 'Guided editing') }}
|
|
11497
|
+
</button>
|
|
11498
|
+
<button
|
|
11499
|
+
type="button"
|
|
11500
|
+
role="tab"
|
|
11501
|
+
class="prx-rich-editor__tab"
|
|
11502
|
+
[class.prx-rich-editor__tab--active]="activeEditorPanel === 'preview'"
|
|
11503
|
+
[attr.aria-selected]="activeEditorPanel === 'preview'"
|
|
11504
|
+
(click)="selectEditorPanel('preview')"
|
|
11505
|
+
data-testid="rich-content-preview-tab"
|
|
11506
|
+
>
|
|
11507
|
+
{{ tx('editor.preview', 'Preview') }}
|
|
11508
|
+
</button>
|
|
11509
|
+
<button
|
|
11510
|
+
type="button"
|
|
11511
|
+
role="tab"
|
|
11512
|
+
class="prx-rich-editor__tab"
|
|
11513
|
+
[class.prx-rich-editor__tab--active]="activeEditorPanel === 'json'"
|
|
11514
|
+
[attr.aria-selected]="activeEditorPanel === 'json'"
|
|
11515
|
+
(click)="selectEditorPanel('json')"
|
|
11516
|
+
data-testid="rich-content-json-tab"
|
|
11517
|
+
>
|
|
11518
|
+
{{ tx('editor.document', 'Advanced JSON') }}
|
|
11519
|
+
@if (!valid || validationIssues.length) {
|
|
11520
|
+
<span class="prx-rich-editor__tab-badge">
|
|
11521
|
+
{{
|
|
11522
|
+
validationIssues.length || tx('editor.invalidBadge', 'Invalid')
|
|
11523
|
+
}}
|
|
11524
|
+
</span>
|
|
11525
|
+
}
|
|
11526
|
+
</button>
|
|
11527
|
+
</nav>
|
|
11528
|
+
|
|
11529
|
+
@if (activeEditorPanel === 'guided') {
|
|
11530
|
+
<section
|
|
11531
|
+
class="prx-rich-editor__blocks"
|
|
11532
|
+
role="tabpanel"
|
|
11533
|
+
[attr.aria-label]="tx('editor.guidedEditing', 'Guided editing')"
|
|
11534
|
+
>
|
|
10622
11535
|
<header class="prx-rich-editor__section-header">
|
|
10623
11536
|
<div>
|
|
10624
11537
|
<h3>{{ tx('editor.blocks', 'Blocks') }}</h3>
|
|
@@ -10655,8 +11568,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
10655
11568
|
</header>
|
|
10656
11569
|
|
|
10657
11570
|
@if (parsedDocument?.nodes?.length) {
|
|
11571
|
+
<div class="prx-rich-editor__authoring-shell">
|
|
11572
|
+
<aside
|
|
11573
|
+
class="prx-rich-editor__structure"
|
|
11574
|
+
[attr.aria-label]="tx('editor.structure', 'Document structure')"
|
|
11575
|
+
>
|
|
11576
|
+
<div class="prx-rich-editor__structure-summary">
|
|
11577
|
+
<strong>{{ tx('editor.structure', 'Document structure') }}</strong>
|
|
11578
|
+
<span>
|
|
11579
|
+
{{
|
|
11580
|
+
tx('editor.structureHelp', 'Select a block to edit its properties.')
|
|
11581
|
+
}}
|
|
11582
|
+
</span>
|
|
11583
|
+
</div>
|
|
11584
|
+
<div class="prx-rich-editor__structure-list">
|
|
11585
|
+
@for (node of parsedDocument?.nodes ?? []; track node.id ?? $index; let nodeIndex = $index) {
|
|
11586
|
+
<button
|
|
11587
|
+
type="button"
|
|
11588
|
+
class="prx-rich-editor__structure-item"
|
|
11589
|
+
[class.prx-rich-editor__structure-item--selected]="selectedNodeIndex === nodeIndex"
|
|
11590
|
+
[attr.aria-current]="selectedNodeIndex === nodeIndex ? 'true' : null"
|
|
11591
|
+
(click)="selectTopLevelNode(nodeIndex)"
|
|
11592
|
+
[attr.data-testid]="'rich-content-node-selector-' + nodeIndex"
|
|
11593
|
+
>
|
|
11594
|
+
<span class="prx-rich-editor__node-eyebrow">
|
|
11595
|
+
{{ tx('editor.block', 'Block') }} {{ nodeIndex + 1 }}
|
|
11596
|
+
</span>
|
|
11597
|
+
<strong>{{ tx('editor.nodeType.' + node.type, node.type) }}</strong>
|
|
11598
|
+
@if (getIssueCount('$.nodes[' + nodeIndex + ']'); as issueCount) {
|
|
11599
|
+
<small>
|
|
11600
|
+
{{ tx('editor.hasIssues', 'Needs attention') }}
|
|
11601
|
+
<span class="prx-rich-editor__issue-count">{{ issueCount }}</span>
|
|
11602
|
+
</small>
|
|
11603
|
+
}
|
|
11604
|
+
</button>
|
|
11605
|
+
}
|
|
11606
|
+
</div>
|
|
11607
|
+
</aside>
|
|
11608
|
+
|
|
11609
|
+
<div class="prx-rich-editor__properties">
|
|
11610
|
+
<header class="prx-rich-editor__section-header">
|
|
11611
|
+
<div>
|
|
11612
|
+
<h3>{{ tx('editor.properties', 'Properties') }}</h3>
|
|
11613
|
+
<p>
|
|
11614
|
+
{{
|
|
11615
|
+
tx(
|
|
11616
|
+
'editor.propertiesHelp',
|
|
11617
|
+
'Edit the selected block without leaving the document structure.'
|
|
11618
|
+
)
|
|
11619
|
+
}}
|
|
11620
|
+
</p>
|
|
11621
|
+
</div>
|
|
11622
|
+
</header>
|
|
11623
|
+
<div
|
|
11624
|
+
class="prx-rich-editor__intent-strip"
|
|
11625
|
+
[attr.aria-label]="tx('editor.intentNavigation', 'Property sections')"
|
|
11626
|
+
>
|
|
11627
|
+
<span>
|
|
11628
|
+
<strong>{{ tx('editor.intent.content', 'Content') }}</strong>
|
|
11629
|
+
<small>{{ tx('editor.intent.contentHelp', 'Primary block fields') }}</small>
|
|
11630
|
+
</span>
|
|
11631
|
+
<span>
|
|
11632
|
+
<strong>{{ tx('editor.intent.presentation', 'Presentation') }}</strong>
|
|
11633
|
+
<small>{{ tx('editor.intent.presentationHelp', 'Visual affordances') }}</small>
|
|
11634
|
+
</span>
|
|
11635
|
+
<button type="button" (click)="openAdvancedRules()">
|
|
11636
|
+
<strong>{{ tx('editor.intent.dataRules', 'Data and rules') }}</strong>
|
|
11637
|
+
<small>{{ tx('editor.intent.dataRulesHelp', 'Metadata and gates') }}</small>
|
|
11638
|
+
@if (getSelectedNodeIssueCount(); as selectedIssueCount) {
|
|
11639
|
+
<span class="prx-rich-editor__issue-count">
|
|
11640
|
+
{{ selectedIssueCount }}
|
|
11641
|
+
</span>
|
|
11642
|
+
}
|
|
11643
|
+
</button>
|
|
11644
|
+
</div>
|
|
10658
11645
|
<div class="prx-rich-editor__node-list">
|
|
10659
11646
|
@for (node of parsedDocument?.nodes ?? []; track node.id ?? $index; let nodeIndex = $index) {
|
|
11647
|
+
@if (selectedNodeIndex === nodeIndex) {
|
|
10660
11648
|
<article
|
|
10661
11649
|
class="prx-rich-editor__node-card"
|
|
10662
11650
|
[attr.data-rich-editor-node-type]="node.type"
|
|
@@ -10842,22 +11830,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
10842
11830
|
/>
|
|
10843
11831
|
</label>
|
|
10844
11832
|
}
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
11833
|
+
@case ('image') {
|
|
11834
|
+
<label>
|
|
11835
|
+
<span>{{ tx('editor.field.src', 'Image URL') }}</span>
|
|
11836
|
+
<input
|
|
11837
|
+
[ngModel]="getStringField(node, 'src')"
|
|
11838
|
+
(ngModelChange)="setStringField($index, 'src', $event)"
|
|
11839
|
+
/>
|
|
11840
|
+
</label>
|
|
11841
|
+
<label>
|
|
11842
|
+
<span>{{ tx('editor.field.srcExpr', 'Image URL binding') }}</span>
|
|
11843
|
+
<input
|
|
11844
|
+
[ngModel]="getStringField(node, 'srcExpr')"
|
|
11845
|
+
(ngModelChange)="setStringField($index, 'srcExpr', $event)"
|
|
11846
|
+
[placeholder]="tx('editor.placeholder.srcExpr', 'row.imageUrl')"
|
|
11847
|
+
/>
|
|
11848
|
+
</label>
|
|
11849
|
+
<label>
|
|
11850
|
+
<span>{{ tx('editor.field.alt', 'Alternative text') }}</span>
|
|
11851
|
+
<input
|
|
11852
|
+
[ngModel]="getStringField(node, 'alt')"
|
|
11853
|
+
(ngModelChange)="setStringField($index, 'alt', $event)"
|
|
11854
|
+
/>
|
|
11855
|
+
</label>
|
|
11856
|
+
<label>
|
|
11857
|
+
<span>{{ tx('editor.field.altExpr', 'Alt text binding') }}</span>
|
|
11858
|
+
<input
|
|
11859
|
+
[ngModel]="getStringField(node, 'altExpr')"
|
|
11860
|
+
(ngModelChange)="setStringField($index, 'altExpr', $event)"
|
|
11861
|
+
[placeholder]="tx('editor.placeholder.altExpr', 'row.imageAlt')"
|
|
11862
|
+
/>
|
|
11863
|
+
</label>
|
|
11864
|
+
}
|
|
10861
11865
|
@case ('link') {
|
|
10862
11866
|
<label>
|
|
10863
11867
|
<span>{{ tx('editor.field.label', 'Label') }}</span>
|
|
@@ -10908,6 +11912,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
10908
11912
|
(ngModelChange)="setStringField($index, 'label', $event)"
|
|
10909
11913
|
/>
|
|
10910
11914
|
</label>
|
|
11915
|
+
<label>
|
|
11916
|
+
<span>{{ tx('editor.field.labelExpr', 'Label binding') }}</span>
|
|
11917
|
+
<input
|
|
11918
|
+
[ngModel]="getStringField(node, 'labelExpr')"
|
|
11919
|
+
(ngModelChange)="setStringField($index, 'labelExpr', $event)"
|
|
11920
|
+
[placeholder]="tx('editor.placeholder.labelExpr', 'row.status')"
|
|
11921
|
+
/>
|
|
11922
|
+
</label>
|
|
10911
11923
|
<label>
|
|
10912
11924
|
<span>{{ tx('editor.field.valueExpr', 'Value binding') }}</span>
|
|
10913
11925
|
<input
|
|
@@ -10949,6 +11961,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
10949
11961
|
(ngModelChange)="setNumberField($index, 'max', $event)"
|
|
10950
11962
|
/>
|
|
10951
11963
|
</label>
|
|
11964
|
+
<label class="prx-rich-editor__checkbox-field">
|
|
11965
|
+
<input
|
|
11966
|
+
type="checkbox"
|
|
11967
|
+
[ngModel]="getBooleanField(node, 'showPercent')"
|
|
11968
|
+
(ngModelChange)="setBooleanField($index, 'showPercent', $event)"
|
|
11969
|
+
/>
|
|
11970
|
+
<span>{{ tx('editor.field.showPercent', 'Show percent') }}</span>
|
|
11971
|
+
</label>
|
|
10952
11972
|
}
|
|
10953
11973
|
@case ('actionButton') {
|
|
10954
11974
|
<label>
|
|
@@ -11044,6 +12064,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
11044
12064
|
<option value="xl">xl</option>
|
|
11045
12065
|
</select>
|
|
11046
12066
|
</label>
|
|
12067
|
+
<label class="prx-rich-editor__checkbox-field">
|
|
12068
|
+
<input
|
|
12069
|
+
type="checkbox"
|
|
12070
|
+
[ngModel]="getBooleanField(node, 'wrap')"
|
|
12071
|
+
(ngModelChange)="setBooleanField($index, 'wrap', $event)"
|
|
12072
|
+
/>
|
|
12073
|
+
<span>{{ tx('editor.field.wrap', 'Wrap items') }}</span>
|
|
12074
|
+
</label>
|
|
11047
12075
|
<div class="prx-rich-editor__nested-editor">
|
|
11048
12076
|
<header class="prx-rich-editor__nested-header">
|
|
11049
12077
|
<h5>{{ tx('editor.composeItems', 'Compose items') }}</h5>
|
|
@@ -11101,6 +12129,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
11101
12129
|
(ngModelChange)="setStringField($index, 'title', $event)"
|
|
11102
12130
|
/>
|
|
11103
12131
|
</label>
|
|
12132
|
+
<label>
|
|
12133
|
+
<span>{{ tx('editor.field.titleExpr', 'Title binding') }}</span>
|
|
12134
|
+
<input
|
|
12135
|
+
[ngModel]="getStringField(node, 'titleExpr')"
|
|
12136
|
+
(ngModelChange)="setStringField($index, 'titleExpr', $event)"
|
|
12137
|
+
[placeholder]="tx('editor.placeholder.titleExpr', '\${decision.title}')"
|
|
12138
|
+
/>
|
|
12139
|
+
</label>
|
|
11104
12140
|
<label>
|
|
11105
12141
|
<span>{{ tx('editor.field.subtitle', 'Subtitle') }}</span>
|
|
11106
12142
|
<input
|
|
@@ -11108,6 +12144,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
11108
12144
|
(ngModelChange)="setStringField($index, 'subtitle', $event)"
|
|
11109
12145
|
/>
|
|
11110
12146
|
</label>
|
|
12147
|
+
<label>
|
|
12148
|
+
<span>{{ tx('editor.field.subtitleExpr', 'Subtitle binding') }}</span>
|
|
12149
|
+
<input
|
|
12150
|
+
[ngModel]="getStringField(node, 'subtitleExpr')"
|
|
12151
|
+
(ngModelChange)="setStringField($index, 'subtitleExpr', $event)"
|
|
12152
|
+
[placeholder]="tx('editor.placeholder.subtitleExpr', '\${decision.policySource}')"
|
|
12153
|
+
/>
|
|
12154
|
+
</label>
|
|
11111
12155
|
<label>
|
|
11112
12156
|
<span>{{ tx('editor.field.variant', 'Variant') }}</span>
|
|
11113
12157
|
<select
|
|
@@ -11145,6 +12189,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
11145
12189
|
<option value="lg">{{ tx('editor.size.lg', 'Large') }}</option>
|
|
11146
12190
|
</select>
|
|
11147
12191
|
</label>
|
|
12192
|
+
<label>
|
|
12193
|
+
<span>{{ tx('editor.field.density', 'Density') }}</span>
|
|
12194
|
+
<select
|
|
12195
|
+
[ngModel]="getStringField(node, 'density') || 'comfortable'"
|
|
12196
|
+
(ngModelChange)="setStringField($index, 'density', $event)"
|
|
12197
|
+
>
|
|
12198
|
+
<option value="comfortable">{{ tx('editor.density.comfortable', 'Comfortable') }}</option>
|
|
12199
|
+
<option value="compact">{{ tx('editor.density.compact', 'Compact') }}</option>
|
|
12200
|
+
</select>
|
|
12201
|
+
</label>
|
|
11148
12202
|
<label>
|
|
11149
12203
|
<span>{{ tx('editor.field.orientation', 'Orientation') }}</span>
|
|
11150
12204
|
<select
|
|
@@ -11155,6 +12209,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
11155
12209
|
<option value="horizontal">{{ tx('editor.orientation.horizontal', 'Horizontal') }}</option>
|
|
11156
12210
|
</select>
|
|
11157
12211
|
</label>
|
|
12212
|
+
<label class="prx-rich-editor__checkbox-field">
|
|
12213
|
+
<input
|
|
12214
|
+
type="checkbox"
|
|
12215
|
+
[ngModel]="getBooleanField(node, 'loading')"
|
|
12216
|
+
(ngModelChange)="setBooleanField($index, 'loading', $event)"
|
|
12217
|
+
/>
|
|
12218
|
+
<span>{{ tx('editor.field.loading', 'Loading') }}</span>
|
|
12219
|
+
</label>
|
|
12220
|
+
<label>
|
|
12221
|
+
<span>{{ tx('editor.field.loadingExpr', 'Loading binding') }}</span>
|
|
12222
|
+
<input
|
|
12223
|
+
[ngModel]="getStringField(node, 'loadingExpr')"
|
|
12224
|
+
(ngModelChange)="setStringField($index, 'loadingExpr', $event)"
|
|
12225
|
+
[placeholder]="tx('editor.placeholder.loadingExpr', 'row.loading')"
|
|
12226
|
+
/>
|
|
12227
|
+
</label>
|
|
12228
|
+
<label class="prx-rich-editor__checkbox-field">
|
|
12229
|
+
<input
|
|
12230
|
+
type="checkbox"
|
|
12231
|
+
[ngModel]="getBooleanField(node, 'active')"
|
|
12232
|
+
(ngModelChange)="setBooleanField($index, 'active', $event)"
|
|
12233
|
+
/>
|
|
12234
|
+
<span>{{ tx('editor.field.active', 'Active') }}</span>
|
|
12235
|
+
</label>
|
|
12236
|
+
<label>
|
|
12237
|
+
<span>{{ tx('editor.field.activeExpr', 'Active binding') }}</span>
|
|
12238
|
+
<input
|
|
12239
|
+
[ngModel]="getStringField(node, 'activeExpr')"
|
|
12240
|
+
(ngModelChange)="setStringField($index, 'activeExpr', $event)"
|
|
12241
|
+
[placeholder]="tx('editor.placeholder.activeExpr', 'row.active')"
|
|
12242
|
+
/>
|
|
12243
|
+
</label>
|
|
11158
12244
|
<label>
|
|
11159
12245
|
<span>{{ tx('editor.field.mediaKind', 'Media') }}</span>
|
|
11160
12246
|
<select
|
|
@@ -11176,6 +12262,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
11176
12262
|
(ngModelChange)="setCardMediaField(nodeIndex, 'src', $event)"
|
|
11177
12263
|
/>
|
|
11178
12264
|
</label>
|
|
12265
|
+
<label>
|
|
12266
|
+
<span>{{ tx('editor.field.mediaSrcExpr', 'Media source binding') }}</span>
|
|
12267
|
+
<input
|
|
12268
|
+
[ngModel]="getCardMediaField(nodeIndex, 'srcExpr')"
|
|
12269
|
+
(ngModelChange)="setCardMediaField(nodeIndex, 'srcExpr', $event)"
|
|
12270
|
+
[placeholder]="tx('editor.placeholder.mediaSrcExpr', 'row.mediaUrl')"
|
|
12271
|
+
/>
|
|
12272
|
+
</label>
|
|
11179
12273
|
<label>
|
|
11180
12274
|
<span>{{ tx('editor.field.mediaAlt', 'Media alt text') }}</span>
|
|
11181
12275
|
<input
|
|
@@ -11183,6 +12277,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
11183
12277
|
(ngModelChange)="setCardMediaField(nodeIndex, 'alt', $event)"
|
|
11184
12278
|
/>
|
|
11185
12279
|
</label>
|
|
12280
|
+
<label>
|
|
12281
|
+
<span>{{ tx('editor.field.mediaAltExpr', 'Media alt binding') }}</span>
|
|
12282
|
+
<input
|
|
12283
|
+
[ngModel]="getCardMediaField(nodeIndex, 'altExpr')"
|
|
12284
|
+
(ngModelChange)="setCardMediaField(nodeIndex, 'altExpr', $event)"
|
|
12285
|
+
[placeholder]="tx('editor.placeholder.mediaAltExpr', 'row.mediaAlt')"
|
|
12286
|
+
/>
|
|
12287
|
+
</label>
|
|
11186
12288
|
<label>
|
|
11187
12289
|
<span>{{ tx('editor.field.mediaIcon', 'Media icon') }}</span>
|
|
11188
12290
|
<input
|
|
@@ -11190,6 +12292,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
11190
12292
|
(ngModelChange)="setCardMediaField(nodeIndex, 'icon', $event)"
|
|
11191
12293
|
/>
|
|
11192
12294
|
</label>
|
|
12295
|
+
<label>
|
|
12296
|
+
<span>{{ tx('editor.field.mediaLabel', 'Media label') }}</span>
|
|
12297
|
+
<input
|
|
12298
|
+
[ngModel]="getCardMediaField(nodeIndex, 'label')"
|
|
12299
|
+
(ngModelChange)="setCardMediaField(nodeIndex, 'label', $event)"
|
|
12300
|
+
/>
|
|
12301
|
+
</label>
|
|
12302
|
+
<label>
|
|
12303
|
+
<span>{{ tx('editor.field.mediaLabelExpr', 'Media label binding') }}</span>
|
|
12304
|
+
<input
|
|
12305
|
+
[ngModel]="getCardMediaField(nodeIndex, 'labelExpr')"
|
|
12306
|
+
(ngModelChange)="setCardMediaField(nodeIndex, 'labelExpr', $event)"
|
|
12307
|
+
[placeholder]="tx('editor.placeholder.mediaLabelExpr', 'row.mediaLabel')"
|
|
12308
|
+
/>
|
|
12309
|
+
</label>
|
|
12310
|
+
<label>
|
|
12311
|
+
<span>{{ tx('editor.field.aspectRatio', 'Aspect ratio') }}</span>
|
|
12312
|
+
<input
|
|
12313
|
+
[ngModel]="getCardMediaField(nodeIndex, 'aspectRatio')"
|
|
12314
|
+
(ngModelChange)="setCardMediaField(nodeIndex, 'aspectRatio', $event)"
|
|
12315
|
+
[placeholder]="tx('editor.placeholder.aspectRatio', '16 / 9')"
|
|
12316
|
+
/>
|
|
12317
|
+
</label>
|
|
11193
12318
|
<label>
|
|
11194
12319
|
<span>{{ tx('editor.field.mediaPlacement', 'Media placement') }}</span>
|
|
11195
12320
|
<select
|
|
@@ -11203,6 +12328,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
11203
12328
|
</select>
|
|
11204
12329
|
</label>
|
|
11205
12330
|
}
|
|
12331
|
+
<label>
|
|
12332
|
+
<span>{{ tx('editor.field.interactionMode', 'Interaction mode') }}</span>
|
|
12333
|
+
<select
|
|
12334
|
+
[ngModel]="getCardInteractionField(nodeIndex, 'mode') || 'none'"
|
|
12335
|
+
(ngModelChange)="setCardInteractionField(nodeIndex, 'mode', $event)"
|
|
12336
|
+
>
|
|
12337
|
+
<option value="none">{{ tx('editor.interaction.none', 'None') }}</option>
|
|
12338
|
+
<option value="action">{{ tx('editor.interaction.action', 'Action') }}</option>
|
|
12339
|
+
<option value="selectable">{{ tx('editor.interaction.selectable', 'Selectable') }}</option>
|
|
12340
|
+
</select>
|
|
12341
|
+
</label>
|
|
12342
|
+
<label class="prx-rich-editor__checkbox-field">
|
|
12343
|
+
<input
|
|
12344
|
+
type="checkbox"
|
|
12345
|
+
[ngModel]="getCardInteractionBooleanField(nodeIndex, 'selected')"
|
|
12346
|
+
(ngModelChange)="setCardInteractionBooleanField(nodeIndex, 'selected', $event)"
|
|
12347
|
+
/>
|
|
12348
|
+
<span>{{ tx('editor.field.selected', 'Selected') }}</span>
|
|
12349
|
+
</label>
|
|
12350
|
+
<label>
|
|
12351
|
+
<span>{{ tx('editor.field.selectedExpr', 'Selected binding') }}</span>
|
|
12352
|
+
<input
|
|
12353
|
+
[ngModel]="getCardInteractionField(nodeIndex, 'selectedExpr')"
|
|
12354
|
+
(ngModelChange)="setCardInteractionField(nodeIndex, 'selectedExpr', $event)"
|
|
12355
|
+
[placeholder]="tx('editor.placeholder.selectedExpr', 'row.selected')"
|
|
12356
|
+
/>
|
|
12357
|
+
</label>
|
|
12358
|
+
<label>
|
|
12359
|
+
<span>{{ tx('editor.field.interactionActionId', 'Interaction action ID') }}</span>
|
|
12360
|
+
<input
|
|
12361
|
+
[ngModel]="getCardInteractionActionField(nodeIndex, 'actionId')"
|
|
12362
|
+
(ngModelChange)="setCardInteractionActionField(nodeIndex, 'actionId', $event)"
|
|
12363
|
+
[placeholder]="tx('editor.placeholder.actionId', 'host.action.open')"
|
|
12364
|
+
/>
|
|
12365
|
+
</label>
|
|
12366
|
+
<label>
|
|
12367
|
+
<span>{{ tx('editor.field.payloadExpr', 'Payload binding') }}</span>
|
|
12368
|
+
<input
|
|
12369
|
+
[ngModel]="getCardInteractionActionField(nodeIndex, 'payloadExpr')"
|
|
12370
|
+
(ngModelChange)="setCardInteractionActionField(nodeIndex, 'payloadExpr', $event)"
|
|
12371
|
+
[placeholder]="tx('editor.placeholder.payloadExpr', 'row')"
|
|
12372
|
+
/>
|
|
12373
|
+
</label>
|
|
12374
|
+
<label>
|
|
12375
|
+
<span>{{ tx('editor.field.accessibilityRole', 'Accessibility role') }}</span>
|
|
12376
|
+
<select
|
|
12377
|
+
[ngModel]="getCardAccessibilityField(nodeIndex, 'role')"
|
|
12378
|
+
(ngModelChange)="setCardAccessibilityField(nodeIndex, 'role', $event)"
|
|
12379
|
+
>
|
|
12380
|
+
<option value="">{{ tx('editor.none', 'None') }}</option>
|
|
12381
|
+
<option value="article">{{ tx('editor.accessibilityRole.article', 'Article') }}</option>
|
|
12382
|
+
<option value="group">{{ tx('editor.accessibilityRole.group', 'Group') }}</option>
|
|
12383
|
+
<option value="button">{{ tx('editor.accessibilityRole.button', 'Button') }}</option>
|
|
12384
|
+
</select>
|
|
12385
|
+
</label>
|
|
12386
|
+
<label>
|
|
12387
|
+
<span>{{ tx('editor.field.ariaLabel', 'Accessible label') }}</span>
|
|
12388
|
+
<input
|
|
12389
|
+
[ngModel]="getCardAccessibilityField(nodeIndex, 'ariaLabel')"
|
|
12390
|
+
(ngModelChange)="setCardAccessibilityField(nodeIndex, 'ariaLabel', $event)"
|
|
12391
|
+
/>
|
|
12392
|
+
</label>
|
|
12393
|
+
<label>
|
|
12394
|
+
<span>{{ tx('editor.field.ariaLabelExpr', 'Accessible label binding') }}</span>
|
|
12395
|
+
<input
|
|
12396
|
+
[ngModel]="getCardAccessibilityField(nodeIndex, 'ariaLabelExpr')"
|
|
12397
|
+
(ngModelChange)="setCardAccessibilityField(nodeIndex, 'ariaLabelExpr', $event)"
|
|
12398
|
+
[placeholder]="tx('editor.placeholder.ariaLabelExpr', 'row.ariaLabel')"
|
|
12399
|
+
/>
|
|
12400
|
+
</label>
|
|
11206
12401
|
<div class="prx-rich-editor__nested-editor">
|
|
11207
12402
|
<header class="prx-rich-editor__nested-header">
|
|
11208
12403
|
<h5>{{ tx('editor.cardContent', 'Card body') }}</h5>
|
|
@@ -11648,6 +12843,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
11648
12843
|
(ngModelChange)="setTabsItemField(nodeIndex, $index, 'label', $event)"
|
|
11649
12844
|
/>
|
|
11650
12845
|
</label>
|
|
12846
|
+
<label>
|
|
12847
|
+
<span>{{ tx('editor.field.labelExpr', 'Label binding') }}</span>
|
|
12848
|
+
<input
|
|
12849
|
+
[ngModel]="getTabsItemField(nodeIndex, $index, 'labelExpr')"
|
|
12850
|
+
(ngModelChange)="setTabsItemField(nodeIndex, $index, 'labelExpr', $event)"
|
|
12851
|
+
[placeholder]="tx('editor.placeholder.tabLabelExpr', 'row.tabLabel')"
|
|
12852
|
+
/>
|
|
12853
|
+
</label>
|
|
11651
12854
|
<label>
|
|
11652
12855
|
<span>{{ tx('editor.field.icon', 'Icon') }}</span>
|
|
11653
12856
|
<input
|
|
@@ -11662,6 +12865,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
11662
12865
|
(ngModelChange)="setTabsItemField(nodeIndex, $index, 'badge', $event)"
|
|
11663
12866
|
/>
|
|
11664
12867
|
</label>
|
|
12868
|
+
<label>
|
|
12869
|
+
<span>{{ tx('editor.field.badgeExpr', 'Badge binding') }}</span>
|
|
12870
|
+
<input
|
|
12871
|
+
[ngModel]="getTabsItemField(nodeIndex, $index, 'badgeExpr')"
|
|
12872
|
+
(ngModelChange)="setTabsItemField(nodeIndex, $index, 'badgeExpr', $event)"
|
|
12873
|
+
[placeholder]="tx('editor.placeholder.badgeExpr', 'row.badge')"
|
|
12874
|
+
/>
|
|
12875
|
+
</label>
|
|
12876
|
+
<label>
|
|
12877
|
+
<span>{{ tx('editor.field.requiresCapabilities', 'Capabilities') }}</span>
|
|
12878
|
+
<input
|
|
12879
|
+
[ngModel]="getTabsItemCapabilityList(nodeIndex, $index)"
|
|
12880
|
+
(ngModelChange)="setTabsItemCapabilityList(nodeIndex, $index, $event)"
|
|
12881
|
+
[placeholder]="tx('editor.placeholder.requiresCapabilities', 'form.mode.edit, employee.open')"
|
|
12882
|
+
/>
|
|
12883
|
+
</label>
|
|
12884
|
+
<label>
|
|
12885
|
+
<span>{{ tx('editor.field.capabilityMode', 'Capability mode') }}</span>
|
|
12886
|
+
<select
|
|
12887
|
+
[ngModel]="getTabsItemField(nodeIndex, $index, 'capabilityMode') || 'all'"
|
|
12888
|
+
(ngModelChange)="setTabsItemField(nodeIndex, $index, 'capabilityMode', $event)"
|
|
12889
|
+
>
|
|
12890
|
+
<option value="all">{{ tx('editor.capabilityMode.all', 'All') }}</option>
|
|
12891
|
+
<option value="any">{{ tx('editor.capabilityMode.any', 'Any') }}</option>
|
|
12892
|
+
</select>
|
|
12893
|
+
</label>
|
|
12894
|
+
<label>
|
|
12895
|
+
<span>{{ tx('editor.field.visibleWhenPath', 'Context path') }}</span>
|
|
12896
|
+
<input
|
|
12897
|
+
[ngModel]="getTabsItemVisibleWhenPath(nodeIndex, $index)"
|
|
12898
|
+
(ngModelChange)="setTabsItemVisibleWhenPath(nodeIndex, $index, $event)"
|
|
12899
|
+
[placeholder]="tx('editor.placeholder.visibleWhenPath', 'row.active')"
|
|
12900
|
+
/>
|
|
12901
|
+
</label>
|
|
12902
|
+
<label>
|
|
12903
|
+
<span>{{ tx('editor.field.visibleWhenValue', 'Expected value') }}</span>
|
|
12904
|
+
<input
|
|
12905
|
+
[ngModel]="getTabsItemVisibleWhenValue(nodeIndex, $index)"
|
|
12906
|
+
(ngModelChange)="setTabsItemVisibleWhenValue(nodeIndex, $index, $event)"
|
|
12907
|
+
[placeholder]="tx('editor.placeholder.visibleWhenValue', 'true')"
|
|
12908
|
+
/>
|
|
12909
|
+
</label>
|
|
11665
12910
|
</div>
|
|
11666
12911
|
}
|
|
11667
12912
|
</div>
|
|
@@ -13052,97 +14297,169 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
13052
14297
|
</p>
|
|
13053
14298
|
}
|
|
13054
14299
|
}
|
|
13055
|
-
<
|
|
13056
|
-
|
|
13057
|
-
|
|
13058
|
-
|
|
13059
|
-
|
|
13060
|
-
|
|
13061
|
-
|
|
13062
|
-
|
|
13063
|
-
|
|
13064
|
-
|
|
13065
|
-
|
|
13066
|
-
|
|
13067
|
-
|
|
13068
|
-
|
|
13069
|
-
|
|
13070
|
-
|
|
13071
|
-
/>
|
|
13072
|
-
</label>
|
|
13073
|
-
<label>
|
|
13074
|
-
<span>{{ tx('editor.field.requiresCapabilities', 'Capabilities') }}</span>
|
|
13075
|
-
<input
|
|
13076
|
-
[ngModel]="getCapabilityList(node)"
|
|
13077
|
-
(ngModelChange)="setCapabilityList($index, $event)"
|
|
13078
|
-
[placeholder]="tx('editor.placeholder.requiresCapabilities', 'form.mode.edit, employee.open')"
|
|
13079
|
-
/>
|
|
13080
|
-
</label>
|
|
13081
|
-
<label>
|
|
13082
|
-
<span>{{ tx('editor.field.capabilityMode', 'Capability mode') }}</span>
|
|
13083
|
-
<select
|
|
13084
|
-
[ngModel]="getStringField(node, 'capabilityMode') || 'all'"
|
|
13085
|
-
(ngModelChange)="setStringField($index, 'capabilityMode', $event)"
|
|
13086
|
-
>
|
|
13087
|
-
<option value="all">{{ tx('editor.capabilityMode.all', 'All') }}</option>
|
|
13088
|
-
<option value="any">{{ tx('editor.capabilityMode.any', 'Any') }}</option>
|
|
13089
|
-
</select>
|
|
13090
|
-
</label>
|
|
13091
|
-
</fieldset>
|
|
14300
|
+
<details
|
|
14301
|
+
class="prx-rich-editor__advanced-group"
|
|
14302
|
+
[open]="advancedRulesOpen"
|
|
14303
|
+
(toggle)="onAdvancedRulesToggle($event)"
|
|
14304
|
+
>
|
|
14305
|
+
<summary>
|
|
14306
|
+
<span>{{ tx('editor.advancedDataRules', 'Advanced data and rules') }}</span>
|
|
14307
|
+
<small>
|
|
14308
|
+
{{
|
|
14309
|
+
tx(
|
|
14310
|
+
'editor.advancedDataRulesHelp',
|
|
14311
|
+
'Metadata, capability gates, visibility and safe style.'
|
|
14312
|
+
)
|
|
14313
|
+
}}
|
|
14314
|
+
</small>
|
|
14315
|
+
</summary>
|
|
13092
14316
|
|
|
13093
|
-
|
|
13094
|
-
|
|
13095
|
-
|
|
13096
|
-
|
|
13097
|
-
|
|
13098
|
-
|
|
13099
|
-
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
|
|
13107
|
-
|
|
13108
|
-
|
|
13109
|
-
|
|
13110
|
-
|
|
13111
|
-
|
|
14317
|
+
<fieldset class="prx-rich-editor__field-group">
|
|
14318
|
+
<legend>{{ tx('editor.commonMetadata', 'Common metadata') }}</legend>
|
|
14319
|
+
<label>
|
|
14320
|
+
<span>{{ tx('editor.field.testId', 'Test id') }}</span>
|
|
14321
|
+
<input
|
|
14322
|
+
[ngModel]="getStringField(node, 'testId')"
|
|
14323
|
+
(ngModelChange)="setStringField($index, 'testId', $event)"
|
|
14324
|
+
[placeholder]="tx('editor.placeholder.testId', 'rich-hero-title')"
|
|
14325
|
+
/>
|
|
14326
|
+
</label>
|
|
14327
|
+
<label>
|
|
14328
|
+
<span>{{ tx('editor.field.className', 'CSS class') }}</span>
|
|
14329
|
+
<input
|
|
14330
|
+
[ngModel]="getStringField(node, 'className')"
|
|
14331
|
+
(ngModelChange)="setStringField($index, 'className', $event)"
|
|
14332
|
+
[placeholder]="tx('editor.placeholder.className', 'hero-title')"
|
|
14333
|
+
/>
|
|
14334
|
+
</label>
|
|
14335
|
+
<label>
|
|
14336
|
+
<span>{{ tx('editor.field.requiresCapabilities', 'Capabilities') }}</span>
|
|
14337
|
+
<input
|
|
14338
|
+
[ngModel]="getCapabilityList(node)"
|
|
14339
|
+
(ngModelChange)="setCapabilityList($index, $event)"
|
|
14340
|
+
[placeholder]="tx('editor.placeholder.requiresCapabilities', 'form.mode.edit, employee.open')"
|
|
14341
|
+
/>
|
|
14342
|
+
</label>
|
|
14343
|
+
<label>
|
|
14344
|
+
<span>{{ tx('editor.field.capabilityMode', 'Capability mode') }}</span>
|
|
14345
|
+
<select
|
|
14346
|
+
[ngModel]="getStringField(node, 'capabilityMode') || 'all'"
|
|
14347
|
+
(ngModelChange)="setStringField($index, 'capabilityMode', $event)"
|
|
14348
|
+
>
|
|
14349
|
+
<option value="all">{{ tx('editor.capabilityMode.all', 'All') }}</option>
|
|
14350
|
+
<option value="any">{{ tx('editor.capabilityMode.any', 'Any') }}</option>
|
|
14351
|
+
</select>
|
|
14352
|
+
</label>
|
|
14353
|
+
</fieldset>
|
|
13112
14354
|
|
|
13113
|
-
|
|
13114
|
-
|
|
13115
|
-
|
|
13116
|
-
|
|
13117
|
-
|
|
13118
|
-
|
|
13119
|
-
|
|
13120
|
-
|
|
13121
|
-
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
14355
|
+
<fieldset class="prx-rich-editor__field-group">
|
|
14356
|
+
<legend>{{ tx('editor.visibilityRule', 'Visibility rule') }}</legend>
|
|
14357
|
+
<label>
|
|
14358
|
+
<span>{{ tx('editor.field.visibleWhenPath', 'Context path') }}</span>
|
|
14359
|
+
<input
|
|
14360
|
+
[ngModel]="getVisibleWhenPath(node)"
|
|
14361
|
+
(ngModelChange)="setVisibleWhenPath($index, $event)"
|
|
14362
|
+
[placeholder]="tx('editor.placeholder.visibleWhenPath', 'row.active')"
|
|
14363
|
+
/>
|
|
14364
|
+
</label>
|
|
14365
|
+
<label>
|
|
14366
|
+
<span>{{ tx('editor.field.visibleWhenValue', 'Expected value') }}</span>
|
|
14367
|
+
<input
|
|
14368
|
+
[ngModel]="getVisibleWhenValue(node)"
|
|
14369
|
+
(ngModelChange)="setVisibleWhenValue($index, $event)"
|
|
14370
|
+
[placeholder]="tx('editor.placeholder.visibleWhenValue', 'true')"
|
|
14371
|
+
/>
|
|
14372
|
+
</label>
|
|
14373
|
+
</fieldset>
|
|
14374
|
+
|
|
14375
|
+
<fieldset class="prx-rich-editor__field-group">
|
|
14376
|
+
<legend>{{ tx('editor.safeStyle', 'Safe style') }}</legend>
|
|
14377
|
+
<label>
|
|
14378
|
+
<span>{{ tx('editor.field.styleName', 'CSS property') }}</span>
|
|
14379
|
+
<input
|
|
14380
|
+
[ngModel]="getFirstStyleName(node)"
|
|
14381
|
+
(ngModelChange)="setFirstStyleName($index, $event)"
|
|
14382
|
+
[placeholder]="tx('editor.placeholder.styleName', 'color')"
|
|
14383
|
+
/>
|
|
14384
|
+
</label>
|
|
14385
|
+
<label>
|
|
14386
|
+
<span>{{ tx('editor.field.styleValue', 'CSS value') }}</span>
|
|
14387
|
+
<input
|
|
14388
|
+
[ngModel]="getFirstStyleValue(node)"
|
|
14389
|
+
(ngModelChange)="setFirstStyleValue($index, $event)"
|
|
14390
|
+
[placeholder]="tx('editor.placeholder.styleValue', 'var(--md-sys-color-primary)')"
|
|
14391
|
+
/>
|
|
14392
|
+
</label>
|
|
14393
|
+
</fieldset>
|
|
14394
|
+
</details>
|
|
13132
14395
|
</div>
|
|
13133
14396
|
</article>
|
|
14397
|
+
}
|
|
13134
14398
|
}
|
|
13135
14399
|
</div>
|
|
14400
|
+
</div>
|
|
14401
|
+
</div>
|
|
13136
14402
|
} @else {
|
|
13137
14403
|
<p class="prx-rich-editor__empty">
|
|
13138
14404
|
{{ tx('editor.noBlocks', 'No blocks yet. Add a block to start authoring this document.') }}
|
|
13139
14405
|
</p>
|
|
13140
14406
|
}
|
|
13141
14407
|
</section>
|
|
14408
|
+
}
|
|
14409
|
+
|
|
14410
|
+
@if (activeEditorPanel === 'preview') {
|
|
14411
|
+
<section
|
|
14412
|
+
class="prx-rich-editor__preview-panel"
|
|
14413
|
+
role="tabpanel"
|
|
14414
|
+
[attr.aria-label]="tx('editor.preview', 'Preview')"
|
|
14415
|
+
>
|
|
14416
|
+
<header class="prx-rich-editor__section-header">
|
|
14417
|
+
<div>
|
|
14418
|
+
<h3>{{ tx('editor.preview', 'Preview') }}</h3>
|
|
14419
|
+
<p>
|
|
14420
|
+
{{
|
|
14421
|
+
tx(
|
|
14422
|
+
'editor.previewHelp',
|
|
14423
|
+
'Inspect the materialized document without mixing preview with authoring fields.'
|
|
14424
|
+
)
|
|
14425
|
+
}}
|
|
14426
|
+
</p>
|
|
14427
|
+
</div>
|
|
14428
|
+
</header>
|
|
14429
|
+
@if (parsedDocument) {
|
|
14430
|
+
<div class="prx-rich-editor__preview prx-rich-editor__preview--large">
|
|
14431
|
+
<praxis-rich-content
|
|
14432
|
+
[document]="parsedDocument"
|
|
14433
|
+
[layout]="layout"
|
|
14434
|
+
[rootClassName]="rootClassName"
|
|
14435
|
+
></praxis-rich-content>
|
|
14436
|
+
</div>
|
|
14437
|
+
} @else {
|
|
14438
|
+
<p class="prx-rich-editor__empty">
|
|
14439
|
+
{{ tx('editor.previewUnavailable', 'Preview is unavailable until the document is valid.') }}
|
|
14440
|
+
</p>
|
|
14441
|
+
}
|
|
14442
|
+
</section>
|
|
14443
|
+
}
|
|
13142
14444
|
|
|
13143
|
-
|
|
13144
|
-
|
|
14445
|
+
@if (activeEditorPanel === 'json') {
|
|
14446
|
+
<section class="prx-rich-editor__document-panel">
|
|
14447
|
+
<header class="prx-rich-editor__section-header">
|
|
14448
|
+
<div>
|
|
14449
|
+
<h3>{{ tx('editor.document', 'Advanced JSON') }}</h3>
|
|
14450
|
+
<p>
|
|
14451
|
+
{{
|
|
14452
|
+
tx(
|
|
14453
|
+
'editor.documentAdvancedHelp',
|
|
14454
|
+
'Use JSON for diagnostics, migration and advanced fields that are not yet surfaced by guided controls.'
|
|
14455
|
+
)
|
|
14456
|
+
}}
|
|
14457
|
+
</p>
|
|
14458
|
+
</div>
|
|
14459
|
+
</header>
|
|
13145
14460
|
<div class="prx-rich-editor__workbench">
|
|
14461
|
+
<label class="prx-rich-editor__document">
|
|
14462
|
+
<span>{{ tx('editor.documentJson', 'Canonical document JSON') }}</span>
|
|
13146
14463
|
<textarea
|
|
13147
14464
|
name="rich-content-document"
|
|
13148
14465
|
[(ngModel)]="documentJson"
|
|
@@ -13156,6 +14473,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
13156
14473
|
spellcheck="false"
|
|
13157
14474
|
data-testid="rich-content-document-input"
|
|
13158
14475
|
></textarea>
|
|
14476
|
+
</label>
|
|
13159
14477
|
|
|
13160
14478
|
<aside
|
|
13161
14479
|
class="prx-rich-editor__inspector"
|
|
@@ -13175,21 +14493,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
13175
14493
|
</dl>
|
|
13176
14494
|
</section>
|
|
13177
14495
|
|
|
13178
|
-
@if (parsedDocument) {
|
|
13179
|
-
<section>
|
|
13180
|
-
<h3>{{ tx('editor.preview', 'Preview') }}</h3>
|
|
13181
|
-
<div class="prx-rich-editor__preview">
|
|
13182
|
-
<praxis-rich-content
|
|
13183
|
-
[document]="parsedDocument"
|
|
13184
|
-
[layout]="layout"
|
|
13185
|
-
[rootClassName]="rootClassName"
|
|
13186
|
-
></praxis-rich-content>
|
|
13187
|
-
</div>
|
|
13188
|
-
</section>
|
|
13189
|
-
}
|
|
13190
14496
|
</aside>
|
|
13191
14497
|
</div>
|
|
13192
|
-
</
|
|
14498
|
+
</section>
|
|
13193
14499
|
|
|
13194
14500
|
@if (errorMessage) {
|
|
13195
14501
|
<div
|
|
@@ -13219,6 +14525,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
13219
14525
|
}}
|
|
13220
14526
|
</p>
|
|
13221
14527
|
}
|
|
14528
|
+
}
|
|
13222
14529
|
|
|
13223
14530
|
<div class="prx-rich-editor__actions">
|
|
13224
14531
|
<button type="button" (click)="reset()">
|
|
@@ -13229,7 +14536,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
13229
14536
|
</button>
|
|
13230
14537
|
</div>
|
|
13231
14538
|
</section>
|
|
13232
|
-
`, styles: [":host{display:block;min-width:0}.prx-rich-editor{display:grid;gap:18px;color:var(--md-sys-color-on-surface, #1f2937)}.prx-rich-editor__header{display:flex;gap:16px;align-items:flex-start;justify-content:space-between}.prx-rich-editor__header h2{margin:0;font-size:1.25rem}.prx-rich-editor__header p{margin:6px 0 0;color:var(--md-sys-color-on-surface-variant, #5f6673)}.prx-rich-editor__eyebrow{margin:0 0 4px;text-transform:uppercase;letter-spacing:.08em;font-size:.72rem;color:var(--md-sys-color-primary, #3154e7)}.prx-rich-editor__status{flex:0 0 auto;padding:6px 10px;border-radius:999px;background:color-mix(in srgb,#16a34a 12%,transparent);color:#166534;font-size:.78rem;font-weight:700}.prx-rich-editor__status.invalid{background:color-mix(in srgb,#dc2626 12%,transparent);color:#991b1b}.prx-rich-editor__grid{display:grid;gap:14px;grid-template-columns:minmax(0,180px) minmax(0,1fr)}.prx-rich-editor__blocks{display:grid;gap:14px}.prx-rich-editor__section-header,.prx-rich-editor__node-header{display:flex;gap:16px;align-items:flex-start;justify-content:space-between}.prx-rich-editor__section-header h3,.prx-rich-editor__node-header h4{margin:0}.prx-rich-editor__section-header p,.prx-rich-editor__node-note,.prx-rich-editor__empty{margin:6px 0 0;color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.88rem}.prx-rich-editor__add-block,.prx-rich-editor__node-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}.prx-rich-editor__add-block label{min-width:180px}.prx-rich-editor__node-list{display:grid;gap:12px}.prx-rich-editor__node-card{display:grid;gap:14px;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:14px;background:var(--md-sys-color-surface-container-lowest, #fff)}.prx-rich-editor__node-eyebrow{margin:0 0 4px;color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.75rem;font-weight:700;text-transform:uppercase}.prx-rich-editor__node-grid{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}.prx-rich-editor__wide-field,.prx-rich-editor__node-note{grid-column:1 / -1}.prx-rich-editor__field-group,.prx-rich-editor__nested-editor,.prx-rich-editor__nested-node{grid-column:1 / -1;display:grid;gap:12px}.prx-rich-editor__field-group,.prx-rich-editor__nested-node{margin:0;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:12px}.prx-rich-editor__field-group{grid-template-columns:repeat(2,minmax(0,1fr))}.prx-rich-editor__field-group legend{padding:0 4px;font-weight:700}.prx-rich-editor__nested-header,.prx-rich-editor__nested-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}.prx-rich-editor__quick-actions{display:flex;flex-wrap:wrap;gap:8px}.prx-rich-editor__node-grid textarea{min-height:96px;font-family:inherit}label,.prx-rich-editor__document{display:grid;gap:7px;font-weight:700}.prx-rich-editor__checkbox-field{display:flex;gap:10px;align-items:center;align-self:end}.prx-rich-editor__checkbox-field input[type=checkbox]{width:auto}input,select,textarea{box-sizing:border-box;width:100%;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:12px;padding:10px 12px;font:inherit;color:inherit;background:var(--md-sys-color-surface, #fff)}textarea{min-height:360px;resize:vertical;font-family:Cascadia Code,Fira Code,Consolas,monospace;font-size:.86rem;line-height:1.45}.prx-rich-editor__workbench{display:grid;gap:14px;grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr)}.prx-rich-editor__inspector{display:grid;align-content:start;gap:14px;min-width:0;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:12px;background:var(--md-sys-color-surface-container-lowest, #fff)}.prx-rich-editor__inspector h3{margin:0 0 8px;font-size:.95rem}.prx-rich-editor__inspector dl{display:grid;gap:8px;margin:0}.prx-rich-editor__inspector dl div{display:grid;gap:2px}.prx-rich-editor__inspector dt{color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.78rem;font-weight:700}.prx-rich-editor__inspector dd{margin:0;overflow-wrap:anywhere;font-weight:600}.prx-rich-editor__preview{max-height:260px;overflow:auto;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:12px;background:var(--md-sys-color-surface, #fff)}.prx-rich-editor__help{margin:-8px 0 0;color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.85rem}.prx-rich-editor__error{margin:0;padding:10px 12px;border-radius:8px;color:#991b1b;background:color-mix(in srgb,#dc2626 9%,transparent)}.prx-rich-editor__error p{margin:0}.prx-rich-editor__error ul{display:grid;gap:6px;margin:8px 0 0;padding-inline-start:18px}.prx-rich-editor__error code{margin-right:4px;font-family:Cascadia Code,Fira Code,Consolas,monospace}.prx-rich-editor__actions{display:flex;flex-wrap:wrap;gap:10px}button{border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:8px 14px;background:var(--md-sys-color-surface, #fff);color:var(--md-sys-color-primary, #3154e7);font-weight:700;cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}@media(max-width:760px){.prx-rich-editor__header,.prx-rich-editor__section-header,.prx-rich-editor__node-header,.prx-rich-editor__grid,.prx-rich-editor__field-group,.prx-rich-editor__node-grid,.prx-rich-editor__workbench{grid-template-columns:1fr;display:grid}}\n"] }]
|
|
14539
|
+
`, styles: [":host{display:block;min-width:0;width:100%;max-width:100%;box-sizing:border-box}.prx-rich-editor{display:grid;gap:18px;min-width:0;color:var(--md-sys-color-on-surface, #1f2937)}.prx-rich-editor__header{display:flex;gap:16px;align-items:flex-start;justify-content:space-between}.prx-rich-editor__header h2{margin:0;font-size:1.25rem}.prx-rich-editor__header p{margin:6px 0 0;color:var(--md-sys-color-on-surface-variant, #5f6673)}.prx-rich-editor__eyebrow{margin:0 0 4px;text-transform:uppercase;letter-spacing:.08em;font-size:.72rem;color:var(--md-sys-color-primary, #3154e7)}.prx-rich-editor__status{flex:0 0 auto;padding:6px 10px;border-radius:999px;background:color-mix(in srgb,#16a34a 12%,transparent);color:#166534;font-size:.78rem;font-weight:700}.prx-rich-editor__status.invalid{background:color-mix(in srgb,#dc2626 12%,transparent);color:#991b1b}.prx-rich-editor__grid{display:grid;gap:14px;grid-template-columns:minmax(0,180px) minmax(0,1fr)}.prx-rich-editor__tabs{display:flex;flex-wrap:wrap;gap:8px;align-items:center;border-bottom:1px solid var(--md-sys-color-outline-variant, #d7dce5)}.prx-rich-editor__tab{margin-block-end:-1px;border-radius:8px 8px 0 0;border-bottom-color:transparent;color:var(--md-sys-color-on-surface-variant, #5f6673);background:transparent}.prx-rich-editor__tab--active{border-color:var(--md-sys-color-outline-variant, #d7dce5);border-bottom-color:var(--md-sys-color-surface, #fff);color:var(--md-sys-color-primary, #3154e7);background:var(--md-sys-color-surface, #fff)}.prx-rich-editor__tab-badge,.prx-rich-editor__issue-count{display:inline-flex;min-width:1.35em;min-height:1.35em;padding:0 .38em;border-radius:999px;align-items:center;justify-content:center;background:color-mix(in srgb,#dc2626 14%,transparent);color:#991b1b;font-size:.72rem;font-weight:800;line-height:1}.prx-rich-editor__tab-badge{margin-inline-start:6px}.prx-rich-editor__blocks{display:grid;gap:14px}.prx-rich-editor__authoring-shell{display:grid;gap:14px;grid-template-columns:minmax(220px,.34fr) minmax(0,1fr);align-items:start}.prx-rich-editor__structure,.prx-rich-editor__properties,.prx-rich-editor__document-panel,.prx-rich-editor__preview-panel{min-width:0;display:grid;gap:12px}.prx-rich-editor__structure{position:sticky;top:12px;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:12px;background:var(--md-sys-color-surface-container-lowest, #fff)}.prx-rich-editor__structure-summary{display:grid;gap:4px}.prx-rich-editor__structure-summary span{color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.82rem;font-weight:500}.prx-rich-editor__structure-list{display:grid;gap:8px}.prx-rich-editor__structure-item{display:grid;gap:3px;width:100%;padding:10px;text-align:left;color:var(--md-sys-color-on-surface, #1f2937);background:var(--md-sys-color-surface, #fff)}.prx-rich-editor__structure-item--selected{border-color:var(--md-sys-color-primary, #3154e7);background:color-mix(in srgb,var(--md-sys-color-primary, #3154e7) 8%,var(--md-sys-color-surface, #fff))}.prx-rich-editor__structure-item small{color:#991b1b;font-weight:700}.prx-rich-editor__intent-strip{display:grid;gap:8px;grid-template-columns:repeat(3,minmax(0,1fr))}.prx-rich-editor__intent-strip span,.prx-rich-editor__intent-strip button{min-width:0;display:grid;gap:3px;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:10px 12px;text-align:left;color:var(--md-sys-color-on-surface, #1f2937);background:var(--md-sys-color-surface, #fff)}.prx-rich-editor__intent-strip button{position:relative}.prx-rich-editor__intent-strip small{color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.78rem;font-weight:600}.prx-rich-editor__intent-strip .prx-rich-editor__issue-count{position:absolute;inset-block-start:8px;inset-inline-end:8px}.prx-rich-editor__section-header,.prx-rich-editor__node-header{display:flex;gap:16px;align-items:flex-start;justify-content:space-between}.prx-rich-editor__section-header h3,.prx-rich-editor__node-header h4{margin:0}.prx-rich-editor__section-header p,.prx-rich-editor__node-note,.prx-rich-editor__empty{margin:6px 0 0;color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.88rem}.prx-rich-editor__add-block,.prx-rich-editor__node-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}.prx-rich-editor__add-block label{min-width:180px}.prx-rich-editor__node-list{display:grid;gap:12px}.prx-rich-editor__node-card{display:grid;gap:14px;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:14px;background:var(--md-sys-color-surface-container-lowest, #fff)}.prx-rich-editor__node-eyebrow{margin:0 0 4px;color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.75rem;font-weight:700;text-transform:uppercase}.prx-rich-editor__node-grid{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}.prx-rich-editor__wide-field,.prx-rich-editor__node-note{grid-column:1 / -1}.prx-rich-editor__field-group,.prx-rich-editor__nested-editor,.prx-rich-editor__nested-node{grid-column:1 / -1;display:grid;gap:12px}.prx-rich-editor__field-group,.prx-rich-editor__nested-node{margin:0;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:12px}.prx-rich-editor__field-group{grid-template-columns:repeat(2,minmax(0,1fr))}.prx-rich-editor__field-group legend{padding:0 4px;font-weight:700}.prx-rich-editor__advanced-group{grid-column:1 / -1;display:grid;gap:12px;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:12px;background:color-mix(in srgb,var(--md-sys-color-surface-container-lowest, #fff) 88%,var(--md-sys-color-primary, #3154e7) 4%)}.prx-rich-editor__advanced-group summary{display:flex;gap:10px;align-items:center;justify-content:space-between;cursor:pointer;font-weight:800}.prx-rich-editor__advanced-group summary small{color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.78rem;font-weight:600}.prx-rich-editor__advanced-group[open]{padding-block-end:14px}.prx-rich-editor__advanced-group[open] summary{margin-block-end:12px}.prx-rich-editor__advanced-group .prx-rich-editor__field-group+.prx-rich-editor__field-group{margin-block-start:12px}.prx-rich-editor__nested-header,.prx-rich-editor__nested-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}.prx-rich-editor__quick-actions{display:flex;flex-wrap:wrap;gap:8px}.prx-rich-editor__node-grid textarea{min-height:96px;font-family:inherit}label,.prx-rich-editor__document{display:grid;gap:7px;font-weight:700}.prx-rich-editor__checkbox-field{display:flex;gap:10px;align-items:center;align-self:end}.prx-rich-editor__checkbox-field input[type=checkbox]{width:auto}input,select,textarea{box-sizing:border-box;width:100%;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:12px;padding:10px 12px;font:inherit;color:inherit;background:var(--md-sys-color-surface, #fff)}textarea{min-height:360px;resize:vertical;font-family:Cascadia Code,Fira Code,Consolas,monospace;font-size:.86rem;line-height:1.45}.prx-rich-editor__workbench{display:grid;gap:14px;grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr)}.prx-rich-editor__inspector{display:grid;align-content:start;gap:14px;min-width:0;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:12px;background:var(--md-sys-color-surface-container-lowest, #fff)}.prx-rich-editor__inspector h3{margin:0 0 8px;font-size:.95rem}.prx-rich-editor__inspector dl{display:grid;gap:8px;margin:0}.prx-rich-editor__inspector dl div{display:grid;gap:2px}.prx-rich-editor__inspector dt{color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.78rem;font-weight:700}.prx-rich-editor__inspector dd{margin:0;overflow-wrap:anywhere;font-weight:600}.prx-rich-editor__preview{max-height:260px;overflow:auto;border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:12px;background:var(--md-sys-color-surface, #fff)}.prx-rich-editor__preview--large{max-height:min(68vh,760px)}.prx-rich-editor__help{margin:-8px 0 0;color:var(--md-sys-color-on-surface-variant, #5f6673);font-size:.85rem}.prx-rich-editor__error{margin:0;padding:10px 12px;border-radius:8px;color:#991b1b;background:color-mix(in srgb,#dc2626 9%,transparent)}.prx-rich-editor__error p{margin:0}.prx-rich-editor__error ul{display:grid;gap:6px;margin:8px 0 0;padding-inline-start:18px}.prx-rich-editor__error code{margin-right:4px;font-family:Cascadia Code,Fira Code,Consolas,monospace}.prx-rich-editor__actions{display:flex;flex-wrap:wrap;gap:10px}button{border:1px solid var(--md-sys-color-outline-variant, #d7dce5);border-radius:8px;padding:8px 14px;background:var(--md-sys-color-surface, #fff);color:var(--md-sys-color-primary, #3154e7);font-weight:700;cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}@media(max-width:760px){.prx-rich-editor__header,.prx-rich-editor__section-header,.prx-rich-editor__node-header,.prx-rich-editor__authoring-shell,.prx-rich-editor__intent-strip,.prx-rich-editor__grid,.prx-rich-editor__field-group,.prx-rich-editor__node-grid,.prx-rich-editor__workbench{grid-template-columns:1fr;display:grid}.prx-rich-editor__structure{position:static}}\n"] }]
|
|
13233
14540
|
}], propDecorators: { inputs: [{
|
|
13234
14541
|
type: Input
|
|
13235
14542
|
}] } });
|