@praxisui/table-rule-builder 8.0.0-beta.20 → 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 +8 -0
- package/fesm2022/praxisui-table-rule-builder.mjs +43 -17
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -31,6 +31,14 @@ 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`
|
|
@@ -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>
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
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
9
|
"@angular/material": "^20.0.0",
|
|
10
|
-
"@praxisui/ai": "^8.0.0-beta.
|
|
11
|
-
"@praxisui/core": "^8.0.0-beta.
|
|
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",
|
|
12
13
|
"rxjs": "~7.8.0"
|
|
13
14
|
},
|
|
14
15
|
"dependencies": {
|