@praxisui/table-rule-builder 8.0.0-beta.2 → 8.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/fesm2022/praxisui-table-rule-builder.mjs +444 -18
- package/index.d.ts +4 -1
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -31,6 +31,44 @@ Peers (Angular v20): `@angular/core`, `@angular/common`, `@angular/forms`, `@ang
|
|
|
31
31
|
- Contrato runtime atual: animação é suportada em `rowConditionalRenderers` e `columns[].conditionalRenderers` (com precedência `rule.animation > rule.renderer.animation` e first-match por efeito real).
|
|
32
32
|
- Tipos: `RuleEffectDefinition`, `RuleScope`
|
|
33
33
|
|
|
34
|
+
## Conditional effects alignment
|
|
35
|
+
|
|
36
|
+
`RuleEffectsPanelComponent` edits one aggregate `RuleEffectDefinition` because a visual rule can combine style, layout, icon, background, animation and tooltip in a single authoring surface.
|
|
37
|
+
|
|
38
|
+
When the panel is embedded by `@praxisui/table`, the table rule entry stores the visual payload as `effects: RuleEffectDefinition[]`. That keeps the persisted rule aligned with the platform shape `PraxisRuntimeConditionalEffectRule<RuleEffectDefinition>` while preserving `@praxisui/table` as the owner of table placement into `rowConditionalRenderers`, `columns[].conditionalRenderers` and conditional style surfaces.
|
|
39
|
+
|
|
40
|
+
Existing singular `effects: RuleEffectDefinition` payloads are accepted on load and normalized back to the canonical array on apply.
|
|
41
|
+
|
|
34
42
|
## Testes
|
|
35
43
|
|
|
36
44
|
- Target oficial no workspace: `ng test praxis-table-rule-builder --watch=false --browsers=ChromeHeadless`
|
|
45
|
+
|
|
46
|
+
## Agentic Authoring Contract
|
|
47
|
+
|
|
48
|
+
`PRAXIS_TABLE_RULE_BUILDER_AUTHORING_MANIFEST` is the governed AI contract for this package and is exported from the public API.
|
|
49
|
+
|
|
50
|
+
The manifest owns only table rule visual effects:
|
|
51
|
+
|
|
52
|
+
- rule identity and condition/effect attachment
|
|
53
|
+
- supported effect categories from `EffectRegistryService`
|
|
54
|
+
- built-in `DEFAULT_EFFECT_PRESETS`
|
|
55
|
+
- semantic animation presets and aliases
|
|
56
|
+
- fail-closed conversion through `toCellClassAndStyle(...)`
|
|
57
|
+
|
|
58
|
+
It does not own table column, datasource, renderer placement or `TableConfigV2` semantics. Those changes must delegate to the `praxis-table` authoring manifest.
|
|
59
|
+
Operations that mutate the effect panel write canonical runtime surfaces: `RuleEffectDefinition`, `RuleEffectDefinition.animation`, `RuleEffectsPanelComponent.effectsForm`, `valueChange` and explicit `delegatedAuthoringOperations`.
|
|
60
|
+
The contract does not persist a local `ruleEffects.rules` tree.
|
|
61
|
+
|
|
62
|
+
Governed operation families:
|
|
63
|
+
|
|
64
|
+
- `rule.add`
|
|
65
|
+
- `rule.remove`
|
|
66
|
+
- `condition.set`
|
|
67
|
+
- `effect.add`
|
|
68
|
+
- `effect.update`
|
|
69
|
+
- `effect.remove`
|
|
70
|
+
- `preset.apply`
|
|
71
|
+
- `animation.set`
|
|
72
|
+
- `tableIntegration.delegate`
|
|
73
|
+
|
|
74
|
+
Stable identities are `ruleId`, `effectId` and `presetKey`; array indexes are not canonical identities. Destructive rule/effect removal requires explicit confirmation.
|
|
@@ -22,6 +22,7 @@ import * as i4 from '@angular/material/button-toggle';
|
|
|
22
22
|
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
23
23
|
import * as i6 from '@angular/material/slider';
|
|
24
24
|
import { MatSliderModule } from '@angular/material/slider';
|
|
25
|
+
import { PdxColorPickerComponent } from '@praxisui/dynamic-fields';
|
|
25
26
|
|
|
26
27
|
const RULE_ANIMATION_TYPE_SET = new Set([
|
|
27
28
|
'pulse',
|
|
@@ -240,15 +241,27 @@ class EstiloEditorComponent {
|
|
|
240
241
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EstiloEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
241
242
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: EstiloEditorComponent, isStandalone: true, selector: "praxis-effects-estilo-editor", inputs: { group: "group" }, ngImport: i0, template: `
|
|
242
243
|
<div class="estilo-grid" role="group" aria-label="Editor de estilo" [formGroup]="group">
|
|
243
|
-
<
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
244
|
+
<pdx-color-picker
|
|
245
|
+
label="Cor do texto"
|
|
246
|
+
formControlName="color"
|
|
247
|
+
[format]="'hex'"
|
|
248
|
+
[preview]="true"
|
|
249
|
+
[views]="['gradient', 'palette']"
|
|
250
|
+
[paletteSettings]="{ preset: 'material', columns: 8 }"
|
|
251
|
+
[gradientSettings]="{ showOpacity: false, channel: 'hsv' }"
|
|
252
|
+
[popupSettings]="{ width: 340 }"
|
|
253
|
+
></pdx-color-picker>
|
|
247
254
|
|
|
248
|
-
<
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
255
|
+
<pdx-color-picker
|
|
256
|
+
label="Cor de fundo do texto"
|
|
257
|
+
formControlName="bgColor"
|
|
258
|
+
[format]="'hex'"
|
|
259
|
+
[preview]="true"
|
|
260
|
+
[views]="['gradient', 'palette']"
|
|
261
|
+
[paletteSettings]="{ preset: 'material', columns: 8 }"
|
|
262
|
+
[gradientSettings]="{ showOpacity: false, channel: 'hsv' }"
|
|
263
|
+
[popupSettings]="{ width: 340 }"
|
|
264
|
+
></pdx-color-picker>
|
|
252
265
|
|
|
253
266
|
<div class="toggles">
|
|
254
267
|
<mat-button-toggle-group multiple>
|
|
@@ -289,7 +302,7 @@ class EstiloEditorComponent {
|
|
|
289
302
|
</label>
|
|
290
303
|
</div>
|
|
291
304
|
</div>
|
|
292
|
-
`, isInline: true, styles: [".estilo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}.toggles{display:flex;align-items:center;gap:8px}.sliders{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.slider{display:flex;flex-direction:column;gap:6px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.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: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i4.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i4.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSliderModule }, { kind: "component", type: i6.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i6.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
305
|
+
`, isInline: true, styles: [".estilo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}.toggles{display:flex;align-items:center;gap:8px}.sliders{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.slider{display:flex;flex-direction:column;gap:6px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.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: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i4.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i4.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSliderModule }, { kind: "component", type: i6.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i6.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }, { kind: "component", type: PdxColorPickerComponent, selector: "pdx-color-picker", inputs: ["actionsLayout", "activeView", "adaptiveMode", "adaptiveTitle", "adaptiveSubtitle", "clearButton", "disabledMode", "readonlyMode", "visible", "presentationMode", "fillMode", "format", "gradientSettings", "icon", "iconClass", "svgIcon", "paletteSettings", "popupSettings", "preview", "rounded", "size", "tabindex", "views", "maxRecent", "showRecent"], outputs: ["valueChange", "open", "close", "cancel", "activeViewChange", "activeColorClick", "focusEvent", "blurEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
293
306
|
}
|
|
294
307
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EstiloEditorComponent, decorators: [{
|
|
295
308
|
type: Component,
|
|
@@ -301,17 +314,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
301
314
|
MatButtonToggleModule,
|
|
302
315
|
MatIconModule,
|
|
303
316
|
MatSliderModule,
|
|
317
|
+
PdxColorPickerComponent,
|
|
304
318
|
], template: `
|
|
305
319
|
<div class="estilo-grid" role="group" aria-label="Editor de estilo" [formGroup]="group">
|
|
306
|
-
<
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
320
|
+
<pdx-color-picker
|
|
321
|
+
label="Cor do texto"
|
|
322
|
+
formControlName="color"
|
|
323
|
+
[format]="'hex'"
|
|
324
|
+
[preview]="true"
|
|
325
|
+
[views]="['gradient', 'palette']"
|
|
326
|
+
[paletteSettings]="{ preset: 'material', columns: 8 }"
|
|
327
|
+
[gradientSettings]="{ showOpacity: false, channel: 'hsv' }"
|
|
328
|
+
[popupSettings]="{ width: 340 }"
|
|
329
|
+
></pdx-color-picker>
|
|
310
330
|
|
|
311
|
-
<
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
331
|
+
<pdx-color-picker
|
|
332
|
+
label="Cor de fundo do texto"
|
|
333
|
+
formControlName="bgColor"
|
|
334
|
+
[format]="'hex'"
|
|
335
|
+
[preview]="true"
|
|
336
|
+
[views]="['gradient', 'palette']"
|
|
337
|
+
[paletteSettings]="{ preset: 'material', columns: 8 }"
|
|
338
|
+
[gradientSettings]="{ showOpacity: false, channel: 'hsv' }"
|
|
339
|
+
[popupSettings]="{ width: 340 }"
|
|
340
|
+
></pdx-color-picker>
|
|
315
341
|
|
|
316
342
|
<div class="toggles">
|
|
317
343
|
<mat-button-toggle-group multiple>
|
|
@@ -1306,8 +1332,408 @@ function toCellClassAndStyle(effect, options) {
|
|
|
1306
1332
|
return { classList, style };
|
|
1307
1333
|
}
|
|
1308
1334
|
|
|
1335
|
+
const ruleAddSchema = {
|
|
1336
|
+
type: 'object',
|
|
1337
|
+
required: ['ruleId', 'scope'],
|
|
1338
|
+
properties: {
|
|
1339
|
+
ruleId: { type: 'string' },
|
|
1340
|
+
scope: { enum: ['cell', 'row', 'column', 'table'] },
|
|
1341
|
+
columnKey: { type: 'string' },
|
|
1342
|
+
condition: { type: 'object' },
|
|
1343
|
+
effect: { type: 'object' },
|
|
1344
|
+
insertAfterRuleId: { type: 'string' },
|
|
1345
|
+
},
|
|
1346
|
+
};
|
|
1347
|
+
const ruleRemoveSchema = {
|
|
1348
|
+
type: 'object',
|
|
1349
|
+
required: ['ruleId'],
|
|
1350
|
+
properties: {
|
|
1351
|
+
ruleId: { type: 'string' },
|
|
1352
|
+
removeEffects: { type: 'boolean' },
|
|
1353
|
+
preserveCondition: { type: 'boolean' },
|
|
1354
|
+
},
|
|
1355
|
+
};
|
|
1356
|
+
const conditionSetSchema = {
|
|
1357
|
+
type: 'object',
|
|
1358
|
+
required: ['ruleId', 'condition'],
|
|
1359
|
+
properties: {
|
|
1360
|
+
ruleId: { type: 'string' },
|
|
1361
|
+
condition: { type: 'object' },
|
|
1362
|
+
scope: { enum: ['cell', 'row', 'column', 'table'] },
|
|
1363
|
+
columnKey: { type: 'string' },
|
|
1364
|
+
mode: { enum: ['replace', 'merge'] },
|
|
1365
|
+
},
|
|
1366
|
+
};
|
|
1367
|
+
const effectAddSchema = {
|
|
1368
|
+
type: 'object',
|
|
1369
|
+
required: ['ruleId', 'effectId', 'effectType'],
|
|
1370
|
+
properties: {
|
|
1371
|
+
ruleId: { type: 'string' },
|
|
1372
|
+
effectId: { type: 'string' },
|
|
1373
|
+
effectType: {
|
|
1374
|
+
enum: ['estilo', 'layout', 'icone', 'fundo', 'animacao', 'tooltip'],
|
|
1375
|
+
},
|
|
1376
|
+
payload: { type: 'object' },
|
|
1377
|
+
},
|
|
1378
|
+
};
|
|
1379
|
+
const effectUpdateSchema = {
|
|
1380
|
+
type: 'object',
|
|
1381
|
+
required: ['ruleId', 'effectId', 'payload'],
|
|
1382
|
+
properties: {
|
|
1383
|
+
ruleId: { type: 'string' },
|
|
1384
|
+
effectId: { type: 'string' },
|
|
1385
|
+
payload: { type: 'object' },
|
|
1386
|
+
mode: { enum: ['replace', 'merge'] },
|
|
1387
|
+
},
|
|
1388
|
+
};
|
|
1389
|
+
const effectRemoveSchema = {
|
|
1390
|
+
type: 'object',
|
|
1391
|
+
required: ['ruleId', 'effectId'],
|
|
1392
|
+
properties: {
|
|
1393
|
+
ruleId: { type: 'string' },
|
|
1394
|
+
effectId: { type: 'string' },
|
|
1395
|
+
removeEmptyRule: { type: 'boolean' },
|
|
1396
|
+
},
|
|
1397
|
+
};
|
|
1398
|
+
const presetApplySchema = {
|
|
1399
|
+
type: 'object',
|
|
1400
|
+
required: ['ruleId', 'presetKey'],
|
|
1401
|
+
properties: {
|
|
1402
|
+
ruleId: { type: 'string' },
|
|
1403
|
+
presetKey: { enum: ['aprovado', 'alerta', 'erro', 'info'] },
|
|
1404
|
+
scope: { enum: ['cell', 'row', 'column', 'table'] },
|
|
1405
|
+
mergeWithExisting: { type: 'boolean' },
|
|
1406
|
+
},
|
|
1407
|
+
};
|
|
1408
|
+
const animationSetSchema = {
|
|
1409
|
+
type: 'object',
|
|
1410
|
+
required: ['ruleId', 'animation'],
|
|
1411
|
+
properties: {
|
|
1412
|
+
ruleId: { type: 'string' },
|
|
1413
|
+
effectId: { type: 'string' },
|
|
1414
|
+
animation: {
|
|
1415
|
+
type: 'object',
|
|
1416
|
+
properties: {
|
|
1417
|
+
enabled: { type: 'boolean' },
|
|
1418
|
+
preset: {
|
|
1419
|
+
enum: [
|
|
1420
|
+
'info-soft',
|
|
1421
|
+
'success-confirm',
|
|
1422
|
+
'warning-attention',
|
|
1423
|
+
'critical-alert',
|
|
1424
|
+
'audit-review',
|
|
1425
|
+
'sync-pending',
|
|
1426
|
+
'sla-warning',
|
|
1427
|
+
'sla-breach',
|
|
1428
|
+
'risk-elevated',
|
|
1429
|
+
'risk-critical',
|
|
1430
|
+
'audit-warning',
|
|
1431
|
+
'sync-warning',
|
|
1432
|
+
],
|
|
1433
|
+
},
|
|
1434
|
+
type: { enum: ['pulse', 'blink', 'grow', 'fade', 'slide-in', 'border-pulse'] },
|
|
1435
|
+
trigger: {
|
|
1436
|
+
enum: [
|
|
1437
|
+
'onChange',
|
|
1438
|
+
'onAppear',
|
|
1439
|
+
'onHover',
|
|
1440
|
+
'onConditionEnter',
|
|
1441
|
+
'onConditionExit',
|
|
1442
|
+
'onDataRefresh',
|
|
1443
|
+
],
|
|
1444
|
+
},
|
|
1445
|
+
repeat: {},
|
|
1446
|
+
durationMs: { type: 'number' },
|
|
1447
|
+
delayMs: { type: 'number' },
|
|
1448
|
+
intensity: { enum: ['subtle', 'normal', 'strong'] },
|
|
1449
|
+
},
|
|
1450
|
+
},
|
|
1451
|
+
},
|
|
1452
|
+
};
|
|
1453
|
+
const tableDelegateSchema = {
|
|
1454
|
+
type: 'object',
|
|
1455
|
+
required: ['tableOperationId', 'reason'],
|
|
1456
|
+
properties: {
|
|
1457
|
+
tableOperationId: { type: 'string' },
|
|
1458
|
+
reason: { type: 'string' },
|
|
1459
|
+
tableTarget: { type: 'object' },
|
|
1460
|
+
tableParams: { type: 'object' },
|
|
1461
|
+
},
|
|
1462
|
+
};
|
|
1463
|
+
const PRAXIS_TABLE_RULE_BUILDER_AUTHORING_MANIFEST = {
|
|
1464
|
+
schemaVersion: '1.0.0',
|
|
1465
|
+
componentId: 'praxis-table-rule-builder',
|
|
1466
|
+
ownerPackage: '@praxisui/table-rule-builder',
|
|
1467
|
+
configSchemaId: 'RuleEffectDefinition',
|
|
1468
|
+
manifestVersion: '1.0.0',
|
|
1469
|
+
runtimeInputs: [
|
|
1470
|
+
{ name: 'scope', type: 'RuleScope', description: 'Effect scope: cell, row, column or table.' },
|
|
1471
|
+
{ name: 'value', type: 'RuleEffectDefinition | undefined', description: 'Initial effect definition hydrated into the panel form.' },
|
|
1472
|
+
{ name: 'valueChange', type: 'RuleEffectDefinition', description: 'Debounced normalized effect payload emitted by the editor.' },
|
|
1473
|
+
{ name: 'apply', type: 'void', description: 'Emitted when the user applies the current effect payload.' },
|
|
1474
|
+
{ name: 'reset', type: 'void', description: 'Emitted when the user resets the panel form.' },
|
|
1475
|
+
],
|
|
1476
|
+
editableTargets: [
|
|
1477
|
+
{ kind: 'rule', resolver: 'table-rule-by-stable-id', description: 'Table conditional rule entry keyed by stable rule id before it is passed to praxis-table.' },
|
|
1478
|
+
{ kind: 'condition', resolver: 'table-rule-condition-by-rule-id', description: 'Structured condition payload evaluated against table row/column context.' },
|
|
1479
|
+
{ kind: 'effect', resolver: 'rule-effect-by-rule-and-effect-id', description: 'Visual effect payload inside a rule, mapped to RuleEffectDefinition.' },
|
|
1480
|
+
{ kind: 'preset', resolver: 'default-effect-preset-by-key', description: 'Built-in semantic effect preset from DEFAULT_EFFECT_PRESETS.' },
|
|
1481
|
+
{ kind: 'animation', resolver: 'rule-animation-by-rule-and-effect-id', description: 'Animation preset, alias or override resolved through animation-presets.' },
|
|
1482
|
+
{ kind: 'tableDelegation', resolver: 'praxis-table-authoring-operation', description: 'Explicit delegation boundary for table-owned configuration changes.' },
|
|
1483
|
+
],
|
|
1484
|
+
operations: [
|
|
1485
|
+
{
|
|
1486
|
+
operationId: 'rule.add',
|
|
1487
|
+
title: 'Add table visual rule',
|
|
1488
|
+
scope: 'rule',
|
|
1489
|
+
targetKind: 'rule',
|
|
1490
|
+
target: { kind: 'rule', resolver: 'table-rule-by-stable-id', ambiguityPolicy: 'fail', required: true },
|
|
1491
|
+
inputSchema: ruleAddSchema,
|
|
1492
|
+
effects: [{ kind: 'compile-domain-patch', handler: 'table-rule-builder-rule-add', handlerContract: {
|
|
1493
|
+
reads: ['RuleEffectsPanelComponent.scope', 'RuleEffectDefinition', 'praxis-table rowConditionalRenderers', 'praxis-table columns[].conditionalRenderers'],
|
|
1494
|
+
writes: ['delegatedAuthoringOperations', 'RuleEffectDefinition'],
|
|
1495
|
+
identityKeys: ['ruleId'],
|
|
1496
|
+
inputSchema: ruleAddSchema,
|
|
1497
|
+
failureModes: ['duplicate-rule-id', 'unsupported-scope', 'column-not-found', 'condition-invalid', 'effect-registry-miss'],
|
|
1498
|
+
description: 'Creates a stable table visual rule and keeps table-owned renderer placement delegated to praxis-table.',
|
|
1499
|
+
} }],
|
|
1500
|
+
validators: ['rule-id-unique', 'scope-supported', 'condition-table-context-valid', 'effect-registry-supported', 'table-owned-config-delegated'],
|
|
1501
|
+
affectedPaths: ['delegatedAuthoringOperations', 'RuleEffectDefinition'],
|
|
1502
|
+
submissionImpact: 'config-only',
|
|
1503
|
+
preconditions: ['rule-effects-panel-loaded', 'table-authoring-context-known'],
|
|
1504
|
+
destructive: false,
|
|
1505
|
+
requiresConfirmation: false,
|
|
1506
|
+
},
|
|
1507
|
+
{
|
|
1508
|
+
operationId: 'rule.remove',
|
|
1509
|
+
title: 'Remove table visual rule',
|
|
1510
|
+
scope: 'rule',
|
|
1511
|
+
targetKind: 'rule',
|
|
1512
|
+
target: { kind: 'rule', resolver: 'table-rule-by-stable-id', ambiguityPolicy: 'fail', required: true },
|
|
1513
|
+
inputSchema: ruleRemoveSchema,
|
|
1514
|
+
effects: [{ kind: 'compile-domain-patch', handler: 'table-rule-builder-rule-remove', handlerContract: {
|
|
1515
|
+
reads: ['ruleEffects.rules', 'ruleEffects.rules[].effect', 'ruleEffects.rules[].condition'],
|
|
1516
|
+
writes: ['delegatedAuthoringOperations'],
|
|
1517
|
+
identityKeys: ['ruleId'],
|
|
1518
|
+
inputSchema: ruleRemoveSchema,
|
|
1519
|
+
failureModes: ['rule-not-found', 'destructive-removal-not-confirmed', 'orphaned-table-renderer', 'condition-preserve-not-supported'],
|
|
1520
|
+
description: 'Removes a governed visual rule by id with confirmation because conditions and effects can be lost.',
|
|
1521
|
+
} }],
|
|
1522
|
+
destructive: true,
|
|
1523
|
+
requiresConfirmation: true,
|
|
1524
|
+
validators: ['rule-exists', 'destructive-removal-confirmed', 'table-renderer-references-clean', 'table-owned-config-delegated'],
|
|
1525
|
+
affectedPaths: ['delegatedAuthoringOperations'],
|
|
1526
|
+
submissionImpact: 'config-only',
|
|
1527
|
+
preconditions: ['rule-effects-panel-loaded', 'explicit-confirmation-provided'],
|
|
1528
|
+
},
|
|
1529
|
+
{
|
|
1530
|
+
operationId: 'condition.set',
|
|
1531
|
+
title: 'Set table rule condition',
|
|
1532
|
+
scope: 'rule',
|
|
1533
|
+
targetKind: 'condition',
|
|
1534
|
+
target: { kind: 'condition', resolver: 'table-rule-condition-by-rule-id', ambiguityPolicy: 'fail', required: true },
|
|
1535
|
+
inputSchema: conditionSetSchema,
|
|
1536
|
+
effects: [{ kind: 'compile-domain-patch', handler: 'table-rule-builder-condition-set', handlerContract: {
|
|
1537
|
+
reads: ['ruleEffects.rules', 'praxis-table dataSource fields', 'praxis-table columns'],
|
|
1538
|
+
writes: ['delegatedAuthoringOperations'],
|
|
1539
|
+
identityKeys: ['ruleId'],
|
|
1540
|
+
inputSchema: conditionSetSchema,
|
|
1541
|
+
failureModes: ['rule-not-found', 'condition-invalid', 'field-not-in-table-context', 'column-not-found'],
|
|
1542
|
+
description: 'Applies a structured table row/column condition without creating a parallel table DSL.',
|
|
1543
|
+
} }],
|
|
1544
|
+
validators: ['rule-exists', 'condition-table-context-valid', 'condition-fields-known', 'condition-operators-supported'],
|
|
1545
|
+
affectedPaths: ['delegatedAuthoringOperations'],
|
|
1546
|
+
submissionImpact: 'config-only',
|
|
1547
|
+
preconditions: ['rule-effects-panel-loaded', 'table-authoring-context-known'],
|
|
1548
|
+
destructive: false,
|
|
1549
|
+
requiresConfirmation: false,
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
operationId: 'effect.add',
|
|
1553
|
+
title: 'Add visual effect to rule',
|
|
1554
|
+
scope: 'skin',
|
|
1555
|
+
targetKind: 'effect',
|
|
1556
|
+
target: { kind: 'effect', resolver: 'rule-effect-by-rule-and-effect-id', ambiguityPolicy: 'fail', required: true },
|
|
1557
|
+
inputSchema: effectAddSchema,
|
|
1558
|
+
effects: [{ kind: 'compile-domain-patch', handler: 'table-rule-builder-effect-add', handlerContract: {
|
|
1559
|
+
reads: ['EffectRegistryService.list', 'RuleEffectDefinition', 'toCellClassAndStyle'],
|
|
1560
|
+
writes: ['RuleEffectDefinition'],
|
|
1561
|
+
identityKeys: ['ruleId', 'effectId'],
|
|
1562
|
+
inputSchema: effectAddSchema,
|
|
1563
|
+
failureModes: ['rule-not-found', 'duplicate-effect-id', 'unsupported-effect-type', 'unsafe-style-value'],
|
|
1564
|
+
description: 'Adds a governed visual effect whose type is backed by the effect registry and RuleEffectDefinition.',
|
|
1565
|
+
} }],
|
|
1566
|
+
validators: ['rule-exists', 'effect-id-unique', 'effect-registry-supported', 'style-values-safe', 'preview-class-not-persisted'],
|
|
1567
|
+
affectedPaths: ['RuleEffectDefinition'],
|
|
1568
|
+
submissionImpact: 'visual-only',
|
|
1569
|
+
preconditions: ['rule-effects-panel-loaded', 'effect-registry-initialized'],
|
|
1570
|
+
destructive: false,
|
|
1571
|
+
requiresConfirmation: false,
|
|
1572
|
+
},
|
|
1573
|
+
{
|
|
1574
|
+
operationId: 'effect.update',
|
|
1575
|
+
title: 'Update visual effect payload',
|
|
1576
|
+
scope: 'skin',
|
|
1577
|
+
targetKind: 'effect',
|
|
1578
|
+
target: { kind: 'effect', resolver: 'rule-effect-by-rule-and-effect-id', ambiguityPolicy: 'fail', required: true },
|
|
1579
|
+
inputSchema: effectUpdateSchema,
|
|
1580
|
+
effects: [{ kind: 'compile-domain-patch', handler: 'table-rule-builder-effect-update', handlerContract: {
|
|
1581
|
+
reads: ['ruleEffects.rules[].effect', 'EffectRegistryService.list', 'toCellClassAndStyle'],
|
|
1582
|
+
writes: ['RuleEffectDefinition'],
|
|
1583
|
+
identityKeys: ['ruleId', 'effectId'],
|
|
1584
|
+
inputSchema: effectUpdateSchema,
|
|
1585
|
+
failureModes: ['rule-not-found', 'effect-not-found', 'unsupported-effect-type', 'unsafe-style-value'],
|
|
1586
|
+
description: 'Updates a visual effect payload while preserving its stable effect id and registry-backed type.',
|
|
1587
|
+
} }],
|
|
1588
|
+
validators: ['rule-exists', 'effect-exists', 'effect-registry-supported', 'style-values-safe', 'runtime-effect-compilable'],
|
|
1589
|
+
affectedPaths: ['RuleEffectDefinition'],
|
|
1590
|
+
submissionImpact: 'visual-only',
|
|
1591
|
+
preconditions: ['rule-effects-panel-loaded', 'effect-registry-initialized'],
|
|
1592
|
+
destructive: false,
|
|
1593
|
+
requiresConfirmation: false,
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
operationId: 'effect.remove',
|
|
1597
|
+
title: 'Remove visual effect from rule',
|
|
1598
|
+
scope: 'skin',
|
|
1599
|
+
targetKind: 'effect',
|
|
1600
|
+
target: { kind: 'effect', resolver: 'rule-effect-by-rule-and-effect-id', ambiguityPolicy: 'fail', required: true },
|
|
1601
|
+
inputSchema: effectRemoveSchema,
|
|
1602
|
+
effects: [{ kind: 'compile-domain-patch', handler: 'table-rule-builder-effect-remove', handlerContract: {
|
|
1603
|
+
reads: ['ruleEffects.rules', 'ruleEffects.rules[].effect'],
|
|
1604
|
+
writes: ['RuleEffectDefinition', 'delegatedAuthoringOperations'],
|
|
1605
|
+
identityKeys: ['ruleId', 'effectId'],
|
|
1606
|
+
inputSchema: effectRemoveSchema,
|
|
1607
|
+
failureModes: ['rule-not-found', 'effect-not-found', 'destructive-removal-not-confirmed', 'empty-rule-created'],
|
|
1608
|
+
description: 'Removes one visual effect and optionally removes the empty rule, requiring confirmation for destructive cleanup.',
|
|
1609
|
+
} }],
|
|
1610
|
+
destructive: true,
|
|
1611
|
+
requiresConfirmation: true,
|
|
1612
|
+
validators: ['rule-exists', 'effect-exists', 'destructive-removal-confirmed', 'empty-rule-policy-valid'],
|
|
1613
|
+
affectedPaths: ['RuleEffectDefinition', 'delegatedAuthoringOperations'],
|
|
1614
|
+
submissionImpact: 'visual-only',
|
|
1615
|
+
preconditions: ['rule-effects-panel-loaded', 'explicit-confirmation-provided'],
|
|
1616
|
+
},
|
|
1617
|
+
{
|
|
1618
|
+
operationId: 'preset.apply',
|
|
1619
|
+
title: 'Apply semantic effect preset',
|
|
1620
|
+
scope: 'skin',
|
|
1621
|
+
targetKind: 'preset',
|
|
1622
|
+
target: { kind: 'preset', resolver: 'default-effect-preset-by-key', ambiguityPolicy: 'fail', required: true },
|
|
1623
|
+
inputSchema: presetApplySchema,
|
|
1624
|
+
effects: [{ kind: 'compile-domain-patch', handler: 'table-rule-builder-preset-apply', handlerContract: {
|
|
1625
|
+
reads: ['DEFAULT_EFFECT_PRESETS', 'RuleEffectsPanelComponent.applyPreset', 'RuleEffectDefinition'],
|
|
1626
|
+
writes: ['RuleEffectDefinition', 'RuleEffectsPanelComponent.effectsForm', 'valueChange'],
|
|
1627
|
+
identityKeys: ['ruleId', 'presetKey'],
|
|
1628
|
+
inputSchema: presetApplySchema,
|
|
1629
|
+
failureModes: ['rule-not-found', 'preset-not-found', 'scope-override-invalid', 'preset-effect-not-compilable'],
|
|
1630
|
+
description: 'Applies a built-in semantic preset and normalizes its scope through the rule effects panel.',
|
|
1631
|
+
} }],
|
|
1632
|
+
validators: ['rule-exists', 'preset-key-known', 'preset-effect-compilable', 'scope-supported'],
|
|
1633
|
+
affectedPaths: ['RuleEffectDefinition', 'RuleEffectsPanelComponent.effectsForm', 'valueChange'],
|
|
1634
|
+
submissionImpact: 'visual-only',
|
|
1635
|
+
preconditions: ['rule-effects-panel-loaded', 'default-presets-loaded'],
|
|
1636
|
+
destructive: false,
|
|
1637
|
+
requiresConfirmation: false,
|
|
1638
|
+
},
|
|
1639
|
+
{
|
|
1640
|
+
operationId: 'animation.set',
|
|
1641
|
+
title: 'Set rule animation',
|
|
1642
|
+
scope: 'skin',
|
|
1643
|
+
targetKind: 'animation',
|
|
1644
|
+
target: { kind: 'animation', resolver: 'rule-animation-by-rule-and-effect-id', ambiguityPolicy: 'fail', required: true },
|
|
1645
|
+
inputSchema: animationSetSchema,
|
|
1646
|
+
effects: [{ kind: 'compile-domain-patch', handler: 'table-rule-builder-animation-set', handlerContract: {
|
|
1647
|
+
reads: ['RULE_ANIMATION_PRESETS', 'RULE_ANIMATION_PRESET_ALIASES', 'resolveRuleAnimationConfig', 'RuleEffectDefinition.animation'],
|
|
1648
|
+
writes: ['RuleEffectDefinition.animation', 'RuleEffectsPanelComponent.effectsForm.animation', 'valueChange'],
|
|
1649
|
+
identityKeys: ['ruleId', 'effectId'],
|
|
1650
|
+
inputSchema: animationSetSchema,
|
|
1651
|
+
failureModes: ['rule-not-found', 'effect-not-found', 'animation-preset-unknown', 'animation-override-invalid', 'reduced-motion-policy-violated'],
|
|
1652
|
+
description: 'Sets a semantic animation preset or override that resolves fail-closed through the animation preset catalog.',
|
|
1653
|
+
} }],
|
|
1654
|
+
validators: ['rule-exists', 'animation-preset-known', 'animation-alias-known', 'animation-override-valid', 'animation-runtime-supported'],
|
|
1655
|
+
affectedPaths: ['RuleEffectDefinition.animation', 'RuleEffectsPanelComponent.effectsForm.animation', 'valueChange'],
|
|
1656
|
+
submissionImpact: 'visual-only',
|
|
1657
|
+
preconditions: ['rule-effects-panel-loaded', 'animation-presets-loaded'],
|
|
1658
|
+
destructive: false,
|
|
1659
|
+
requiresConfirmation: false,
|
|
1660
|
+
},
|
|
1661
|
+
{
|
|
1662
|
+
operationId: 'tableIntegration.delegate',
|
|
1663
|
+
title: 'Delegate table-owned configuration',
|
|
1664
|
+
scope: 'global',
|
|
1665
|
+
targetKind: 'tableDelegation',
|
|
1666
|
+
target: { kind: 'tableDelegation', resolver: 'praxis-table-authoring-operation', ambiguityPolicy: 'fail', required: false },
|
|
1667
|
+
inputSchema: tableDelegateSchema,
|
|
1668
|
+
effects: [{ kind: 'compile-domain-patch', handler: 'table-rule-builder-table-delegate', handlerContract: {
|
|
1669
|
+
reads: ['PRAXIS_TABLE_AUTHORING_MANIFEST', 'TableConfigV2', 'tableOperationId'],
|
|
1670
|
+
writes: ['delegatedAuthoringOperations'],
|
|
1671
|
+
identityKeys: ['tableOperationId'],
|
|
1672
|
+
inputSchema: tableDelegateSchema,
|
|
1673
|
+
failureModes: ['table-operation-not-found', 'table-target-invalid', 'attempted-local-table-config-write'],
|
|
1674
|
+
description: 'Records that table-owned config such as renderer placement, columns, ordering or data binding must route through praxis-table.',
|
|
1675
|
+
} }],
|
|
1676
|
+
validators: ['table-manifest-operation-known', 'table-target-valid', 'no-local-table-config-write', 'table-owned-config-delegated'],
|
|
1677
|
+
affectedPaths: ['delegatedAuthoringOperations'],
|
|
1678
|
+
submissionImpact: 'none',
|
|
1679
|
+
preconditions: ['praxis-table-manifest-available'],
|
|
1680
|
+
destructive: false,
|
|
1681
|
+
requiresConfirmation: false,
|
|
1682
|
+
},
|
|
1683
|
+
],
|
|
1684
|
+
validators: [
|
|
1685
|
+
{ validatorId: 'rule-id-unique', level: 'error', code: 'TABLE_RULE_ID_UNIQUE', description: 'Rule ids must be unique and stable.' },
|
|
1686
|
+
{ validatorId: 'scope-supported', level: 'error', code: 'TABLE_RULE_SCOPE_SUPPORTED', description: 'Rule scope must be one of cell, row, column or table.' },
|
|
1687
|
+
{ validatorId: 'condition-table-context-valid', level: 'error', code: 'TABLE_RULE_CONDITION_CONTEXT_VALID', description: 'Conditions must reference valid table row or column context.' },
|
|
1688
|
+
{ validatorId: 'effect-registry-supported', level: 'error', code: 'TABLE_RULE_EFFECT_REGISTRY_SUPPORTED', description: 'Effects must be backed by EffectRegistryService editor categories.' },
|
|
1689
|
+
{ validatorId: 'table-owned-config-delegated', level: 'error', code: 'TABLE_RULE_TABLE_CONFIG_DELEGATED', description: 'Table-owned configuration changes must delegate to praxis-table.' },
|
|
1690
|
+
{ validatorId: 'rule-exists', level: 'error', code: 'TABLE_RULE_EXISTS', description: 'The targeted rule must exist.' },
|
|
1691
|
+
{ validatorId: 'destructive-removal-confirmed', level: 'error', code: 'TABLE_RULE_DESTRUCTIVE_CONFIRMED', description: 'Destructive rule or effect removal requires explicit confirmation.' },
|
|
1692
|
+
{ validatorId: 'table-renderer-references-clean', level: 'error', code: 'TABLE_RULE_RENDERER_REFERENCES_CLEAN', description: 'Removing a rule must not leave stale table renderer references.' },
|
|
1693
|
+
{ validatorId: 'condition-fields-known', level: 'error', code: 'TABLE_RULE_CONDITION_FIELDS_KNOWN', description: 'Condition fields must exist in table row data or column metadata.' },
|
|
1694
|
+
{ validatorId: 'condition-operators-supported', level: 'error', code: 'TABLE_RULE_CONDITION_OPERATORS_SUPPORTED', description: 'Condition operators must be supported by table rule semantics.' },
|
|
1695
|
+
{ validatorId: 'effect-id-unique', level: 'error', code: 'TABLE_RULE_EFFECT_ID_UNIQUE', description: 'Effect ids must be unique within a rule.' },
|
|
1696
|
+
{ validatorId: 'style-values-safe', level: 'error', code: 'TABLE_RULE_STYLE_VALUES_SAFE', description: 'CSS class and style values must be safe for runtime rendering.' },
|
|
1697
|
+
{ validatorId: 'preview-class-not-persisted', level: 'error', code: 'TABLE_RULE_PREVIEW_CLASS_NOT_PERSISTED', description: 'Preview-only animation classes must not leak into persisted payload mapping.' },
|
|
1698
|
+
{ validatorId: 'effect-exists', level: 'error', code: 'TABLE_RULE_EFFECT_EXISTS', description: 'The targeted effect must exist.' },
|
|
1699
|
+
{ validatorId: 'runtime-effect-compilable', level: 'error', code: 'TABLE_RULE_RUNTIME_EFFECT_COMPILABLE', description: 'Effect payload must compile through toCellClassAndStyle or table renderer semantics.' },
|
|
1700
|
+
{ validatorId: 'empty-rule-policy-valid', level: 'warning', code: 'TABLE_RULE_EMPTY_RULE_POLICY_VALID', description: 'Removing the last effect must follow the requested empty-rule policy.' },
|
|
1701
|
+
{ validatorId: 'preset-key-known', level: 'error', code: 'TABLE_RULE_PRESET_KEY_KNOWN', description: 'Preset key must exist in DEFAULT_EFFECT_PRESETS.' },
|
|
1702
|
+
{ validatorId: 'preset-effect-compilable', level: 'error', code: 'TABLE_RULE_PRESET_EFFECT_COMPILABLE', description: 'Preset payload must compile to RuleEffectDefinition.' },
|
|
1703
|
+
{ validatorId: 'animation-preset-known', level: 'error', code: 'TABLE_RULE_ANIMATION_PRESET_KNOWN', description: 'Animation preset must be canonical or explicitly aliased.' },
|
|
1704
|
+
{ validatorId: 'animation-alias-known', level: 'error', code: 'TABLE_RULE_ANIMATION_ALIAS_KNOWN', description: 'Animation aliases must resolve to canonical presets.' },
|
|
1705
|
+
{ validatorId: 'animation-override-valid', level: 'error', code: 'TABLE_RULE_ANIMATION_OVERRIDE_VALID', description: 'Animation overrides must normalize to supported type, trigger, repeat and intensity values.' },
|
|
1706
|
+
{ validatorId: 'animation-runtime-supported', level: 'error', code: 'TABLE_RULE_ANIMATION_RUNTIME_SUPPORTED', description: 'Animation payload must be supported by row and column conditional renderers.' },
|
|
1707
|
+
{ validatorId: 'table-manifest-operation-known', level: 'error', code: 'TABLE_RULE_TABLE_OPERATION_KNOWN', description: 'Delegated table operation must exist in the praxis-table authoring manifest.' },
|
|
1708
|
+
{ validatorId: 'table-target-valid', level: 'error', code: 'TABLE_RULE_TABLE_TARGET_VALID', description: 'Delegated table target must be resolvable by praxis-table.' },
|
|
1709
|
+
{ validatorId: 'no-local-table-config-write', level: 'error', code: 'TABLE_RULE_NO_LOCAL_TABLE_CONFIG_WRITE', description: 'Rule builder operations must not write TableConfig directly.' },
|
|
1710
|
+
],
|
|
1711
|
+
roundTripRequirements: [
|
|
1712
|
+
'RuleEffectDefinition is the local source of truth for the effects panel.',
|
|
1713
|
+
'Rules that affect rowConditionalRenderers or columns[].conditionalRenderers must delegate table-owned placement to praxis-table.',
|
|
1714
|
+
'Rule and effect identity must use stable ruleId/effectId keys; array indexes are not canonical identities.',
|
|
1715
|
+
'Animation presets and aliases must resolve through RULE_ANIMATION_PRESETS and RULE_ANIMATION_PRESET_ALIASES before persistence.',
|
|
1716
|
+
'Preview-only animation classes must be omitted from persisted table payload mapping by using includeAnimationPreview: false.',
|
|
1717
|
+
'Preset application must preserve the selected scope and emit a normalized RuleEffectDefinition through valueChange.',
|
|
1718
|
+
],
|
|
1719
|
+
examples: [
|
|
1720
|
+
{ id: 'table-rule-add-row-warning', request: 'Add a row warning rule for overdue invoices.', operationId: 'rule.add', target: 'rule:overdue-warning', params: { ruleId: 'overdue-warning', scope: 'row', condition: { field: 'dueDate', operator: 'beforeToday' }, effect: { background: { color: 'rgba(255,193,7,0.12)' } } }, isPositive: true },
|
|
1721
|
+
{ id: 'table-rule-remove-obsolete', request: 'Remove the obsolete archived row rule.', operationId: 'rule.remove', target: 'rule:archived-obsolete', params: { ruleId: 'archived-obsolete', removeEffects: true }, isPositive: true },
|
|
1722
|
+
{ id: 'table-rule-condition-status-error', request: 'Make the rule apply when status is error.', operationId: 'condition.set', target: 'condition:status-error', params: { ruleId: 'status-error', condition: { field: 'status', operator: 'equals', value: 'error' } }, isPositive: true },
|
|
1723
|
+
{ id: 'table-rule-add-badge-effect', request: 'Add a warning badge to the status rule.', operationId: 'effect.add', target: 'effect:status-warning/badge', params: { ruleId: 'status-warning', effectId: 'badge', effectType: 'icone', payload: { icon: 'warning', badgeText: 'Attention' } }, isPositive: true },
|
|
1724
|
+
{ id: 'table-rule-update-background', request: 'Change the risk rule background color.', operationId: 'effect.update', target: 'effect:risk/background', params: { ruleId: 'risk', effectId: 'background', payload: { background: { color: 'rgba(239,83,80,0.10)' } }, mode: 'merge' }, isPositive: true },
|
|
1725
|
+
{ id: 'table-rule-remove-tooltip', request: 'Remove the tooltip effect from the audit rule.', operationId: 'effect.remove', target: 'effect:audit/tooltip', params: { ruleId: 'audit', effectId: 'tooltip' }, isPositive: true },
|
|
1726
|
+
{ id: 'table-rule-apply-alerta', request: 'Use the alerta preset on the SLA rule.', operationId: 'preset.apply', target: 'preset:alerta', params: { ruleId: 'sla', presetKey: 'alerta', scope: 'row', mergeWithExisting: true }, isPositive: true },
|
|
1727
|
+
{ id: 'table-rule-animation-critical', request: 'Make the SLA breach animation critical.', operationId: 'animation.set', target: 'animation:sla-breach', params: { ruleId: 'sla-breach', effectId: 'animation', animation: { preset: 'critical-alert' } }, isPositive: true },
|
|
1728
|
+
{ id: 'table-rule-delegate-column-renderer', request: 'Move this effect to the status column renderer.', operationId: 'tableIntegration.delegate', target: 'praxis-table:column-renderer', params: { tableOperationId: 'column.conditionalRenderer.set', reason: 'column renderer placement is owned by praxis-table', tableTarget: { columnKey: 'status' } }, isPositive: true },
|
|
1729
|
+
{ id: 'table-rule-reject-direct-table-column', request: 'Add a new table column from the rule builder.', operationId: 'tableIntegration.delegate', target: 'praxis-table:column.add', params: { tableOperationId: 'column.add', reason: 'column authoring belongs to praxis-table' }, isPositive: false },
|
|
1730
|
+
{ id: 'table-rule-reject-unknown-effect', request: 'Add a sparkle shader effect to rows.', operationId: 'effect.add', target: 'effect:sparkle', params: { ruleId: 'risk', effectId: 'sparkle', effectType: 'shader', payload: {} }, isPositive: false },
|
|
1731
|
+
{ id: 'table-rule-reject-unknown-animation', request: 'Use the earthquake animation preset.', operationId: 'animation.set', target: 'animation:earthquake', params: { ruleId: 'risk', effectId: 'animation', animation: { preset: 'earthquake' } }, isPositive: false },
|
|
1732
|
+
],
|
|
1733
|
+
};
|
|
1734
|
+
|
|
1309
1735
|
/**
|
|
1310
1736
|
* Generated bundle index. Do not edit.
|
|
1311
1737
|
*/
|
|
1312
1738
|
|
|
1313
|
-
export { AnimacaoEditorComponent, DEFAULT_EFFECT_PRESETS, EffectRegistryService, EstiloEditorComponent, FundoEditorComponent, IconeBadgeEditorComponent, LayoutEditorComponent, RuleEffectsPanelComponent, TooltipEditorComponent, toCellClassAndStyle };
|
|
1739
|
+
export { AnimacaoEditorComponent, DEFAULT_EFFECT_PRESETS, EffectRegistryService, EstiloEditorComponent, FundoEditorComponent, IconeBadgeEditorComponent, LayoutEditorComponent, PRAXIS_TABLE_RULE_BUILDER_AUTHORING_MANIFEST, RuleEffectsPanelComponent, TooltipEditorComponent, toCellClassAndStyle };
|
package/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { OnInit, OnDestroy, EventEmitter } from '@angular/core';
|
|
3
3
|
import { FormGroup, FormBuilder } from '@angular/forms';
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
|
+
import { ComponentAuthoringManifest } from '@praxisui/core';
|
|
5
6
|
|
|
6
7
|
type RuleScope = 'cell' | 'row' | 'column' | 'table';
|
|
7
8
|
type RuleAnimationPreset = 'info-soft' | 'success-confirm' | 'warning-attention' | 'critical-alert' | 'audit-review' | 'sync-pending' | 'sla-warning' | 'sla-breach' | 'risk-elevated' | 'risk-critical' | 'audit-warning' | 'sync-warning';
|
|
@@ -175,5 +176,7 @@ declare class TooltipEditorComponent {
|
|
|
175
176
|
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipEditorComponent, "praxis-effects-tooltip-editor", never, { "group": { "alias": "group"; "required": false; }; }, {}, never, never, true, never>;
|
|
176
177
|
}
|
|
177
178
|
|
|
178
|
-
|
|
179
|
+
declare const PRAXIS_TABLE_RULE_BUILDER_AUTHORING_MANIFEST: ComponentAuthoringManifest;
|
|
180
|
+
|
|
181
|
+
export { AnimacaoEditorComponent, DEFAULT_EFFECT_PRESETS, EffectRegistryService, EstiloEditorComponent, FundoEditorComponent, IconeBadgeEditorComponent, LayoutEditorComponent, PRAXIS_TABLE_RULE_BUILDER_AUTHORING_MANIFEST, RuleEffectsPanelComponent, TooltipEditorComponent, toCellClassAndStyle };
|
|
179
182
|
export type { EffectEditorPlugin, RuleAnimationIntensity, RuleAnimationPreset, RuleAnimationRepeat, RuleAnimationTrigger, RuleAnimationType, RuleEffectDefinition, RuleScope };
|
package/package.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/table-rule-builder",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.21",
|
|
4
4
|
"description": "Praxis Table Rule Builder: UI components and engine utils for table rules",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^20.0.0",
|
|
7
7
|
"@angular/core": "^20.0.0",
|
|
8
8
|
"@angular/forms": "^20.0.0",
|
|
9
|
-
"@angular/material": "^20.0.0"
|
|
9
|
+
"@angular/material": "^20.0.0",
|
|
10
|
+
"@praxisui/ai": "^8.0.0-beta.21",
|
|
11
|
+
"@praxisui/core": "^8.0.0-beta.21",
|
|
12
|
+
"@praxisui/dynamic-fields": "^8.0.0-beta.21",
|
|
13
|
+
"rxjs": "~7.8.0"
|
|
10
14
|
},
|
|
11
15
|
"dependencies": {
|
|
12
16
|
"tslib": "^2.3.0"
|