@praxisui/table 10.0.0-rc.7 → 10.0.0-rc.71

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.
Files changed (22) hide show
  1. package/README.md +157 -12
  2. package/ai/component-registry.json +4420 -354
  3. package/docs/adr/2026-07-table-rich-cells-governance.md +5 -4
  4. package/docs/column-resize-reorder-implementation-plan.md +3 -3
  5. package/docs/column-resize-reorder-review-prompt.md +1 -1
  6. package/docs/dynamic-filter-host-integration-guide.md +49 -2
  7. package/docs/dynamic-filter-payload-contract.md +29 -6
  8. package/docs/dynamic-filter-range-filters-guide.md +125 -13
  9. package/docs/governed-page-widget-adapter.md +55 -0
  10. package/docs/local-data-mode-precedence.md +21 -0
  11. package/docs/performance-hardening-v2-implementation-plan.md +20 -20
  12. package/docs/table-bottom-detail-progress.md +2 -2
  13. package/fesm2022/praxisui-table-authoring.mjs +848 -161
  14. package/fesm2022/{praxisui-table-filter-form-dialog-host.component-DANYIQs6.mjs → praxisui-table-filter-form-dialog-host.component-CmqK_WBK.mjs} +61 -11
  15. package/fesm2022/{praxisui-table-praxisui-table-BIRFv2S8.mjs → praxisui-table-praxisui-table-BFyjUHDv.mjs} +22144 -2775
  16. package/fesm2022/{praxisui-table-table-agentic-authoring-turn-flow-DtOwXgFW.mjs → praxisui-table-table-agentic-authoring-turn-flow-CxAJUZzG.mjs} +2 -2
  17. package/fesm2022/{praxisui-table-table-ai.adapter-25xtoiWq.mjs → praxisui-table-table-ai.adapter-DG81dbBu.mjs} +13 -7
  18. package/fesm2022/praxisui-table.mjs +1 -1
  19. package/package.json +10 -10
  20. package/src/lib/praxis-table.json-api.md +58 -18
  21. package/types/praxisui-table-authoring.d.ts +30 -2
  22. package/types/praxisui-table.d.ts +1223 -129
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Inject, Component } from '@angular/core';
2
+ import { ViewChild, Inject, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import * as i1 from '@angular/material/dialog';
4
4
  import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
5
5
  import * as i3 from '@angular/material/button';
@@ -8,23 +8,28 @@ import * as i15 from '@angular/material/progress-bar';
8
8
  import { MatProgressBarModule } from '@angular/material/progress-bar';
9
9
  import * as i7 from '@angular/material/icon';
10
10
  import { MatIconModule } from '@angular/material/icon';
11
- import * as i10 from '@angular/material/tooltip';
11
+ import * as i14 from '@angular/material/tooltip';
12
12
  import { MatTooltipModule } from '@angular/material/tooltip';
13
13
  import { PraxisFilterForm } from '@praxisui/dynamic-form';
14
14
  import { PraxisIconButtonComponent } from '@praxisui/core';
15
+ import { ar as projectFilterPayload } from './praxisui-table-praxisui-table-BFyjUHDv.mjs';
15
16
 
16
17
  class FilterFormDialogHostComponent {
17
18
  data;
18
19
  ref;
20
+ cdr;
19
21
  valid = true;
20
22
  ready = false;
21
23
  lastValue = {};
22
24
  formGroup = null;
25
+ filterForm;
26
+ pendingAction = null;
23
27
  canSave = false;
24
28
  saving = false;
25
- constructor(data, ref) {
29
+ constructor(data, ref, cdr) {
26
30
  this.data = data;
27
31
  this.ref = ref;
32
+ this.cdr = cdr;
28
33
  }
29
34
  onReady(ev) {
30
35
  try {
@@ -38,21 +43,52 @@ class FilterFormDialogHostComponent {
38
43
  catch { }
39
44
  this.ready = true;
40
45
  this.updateCanSave();
46
+ this.cdr.markForCheck();
41
47
  }
42
48
  onChange(ev) {
43
49
  this.lastValue = ev?.formData ?? {};
44
50
  this.updateCanSave();
51
+ this.cdr.markForCheck();
45
52
  }
46
53
  onValidity(v) {
47
54
  this.valid = v;
48
55
  this.updateCanSave();
56
+ this.cdr.markForCheck();
49
57
  }
50
58
  apply() {
59
+ this.requestProjectedValue('apply');
60
+ }
61
+ requestProjectedValue(action) {
62
+ if (!this.valid || this.formGroup?.invalid || this.formGroup?.pending)
63
+ return;
64
+ if (this.filterForm) {
65
+ this.pendingAction = action;
66
+ try {
67
+ this.filterForm.onFormSubmit();
68
+ }
69
+ finally {
70
+ this.pendingAction = null;
71
+ }
72
+ return;
73
+ }
74
+ // A host without a rendered form has no schema projection to apply.
75
+ if (this.data?.config)
76
+ return;
51
77
  const formData = this.formGroup?.getRawValue?.() ??
52
78
  this.lastValue ??
53
79
  this.data?.initialDto ??
54
80
  {};
55
- this.ref.close({ formData });
81
+ this.completeAction(action, formData);
82
+ }
83
+ onProjectedSubmit(event) {
84
+ this.completeAction(this.pendingAction ?? 'apply', event.formData);
85
+ }
86
+ completeAction(action, formData) {
87
+ this.lastValue = formData;
88
+ if (action === 'apply')
89
+ this.ref.close({ formData });
90
+ else
91
+ this.saveProjectedShortcut(formData);
56
92
  }
57
93
  close() { this.ref.close(); }
58
94
  clean(obj) {
@@ -68,7 +104,8 @@ class FilterFormDialogHostComponent {
68
104
  const base = this.data?.initialDto || {};
69
105
  const current = this.formGroup?.getRawValue?.() ?? this.lastValue ?? {};
70
106
  const merged = { ...base, ...current };
71
- return this.clean(merged);
107
+ const projected = projectFilterPayload(merged, this.data?.config?.fieldMetadata ?? []);
108
+ return projected === null ? {} : this.clean(projected);
72
109
  }
73
110
  updateCanSave() {
74
111
  this.canSave =
@@ -91,20 +128,28 @@ class FilterFormDialogHostComponent {
91
128
  saveShortcut() {
92
129
  if (!this.canSave || this.saving)
93
130
  return;
94
- const dto = this.buildDtoForSave();
131
+ this.requestProjectedValue('save');
132
+ }
133
+ saveProjectedShortcut(projected) {
134
+ const merged = projectFilterPayload({ ...(this.data?.initialDto || {}), ...projected }, this.data?.config?.fieldMetadata ?? []);
135
+ if (merged === null)
136
+ return;
137
+ const dto = this.clean(merged);
95
138
  if (!Object.keys(dto).length)
96
139
  return;
97
140
  this.saving = true;
141
+ this.cdr.markForCheck();
98
142
  try {
99
143
  this.data?.onSaveShortcut?.(dto);
100
144
  }
101
145
  finally {
102
146
  this.saving = false;
103
147
  this.updateCanSave();
148
+ this.cdr.markForCheck();
104
149
  }
105
150
  }
106
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FilterFormDialogHostComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
107
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: FilterFormDialogHostComponent, isStandalone: true, selector: "praxis-filter-form-dialog-host", ngImport: i0, template: `
151
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FilterFormDialogHostComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
152
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: FilterFormDialogHostComponent, isStandalone: true, selector: "praxis-filter-form-dialog-host", viewQueries: [{ propertyName: "filterForm", first: true, predicate: PraxisFilterForm, descendants: true }], ngImport: i0, template: `
108
153
  <div class="pfx-dialog-title">
109
154
  <h2 mat-dialog-title class="pfx-dialog-title-text">
110
155
  <mat-icon>tune</mat-icon>
@@ -137,6 +182,7 @@ class FilterFormDialogHostComponent {
137
182
  (formReady)="onReady($event)"
138
183
  (valueChange)="onChange($event)"
139
184
  (validityChange)="onValidity($event)"
185
+ (submit)="onProjectedSubmit($event)"
140
186
  ></praxis-filter-form>
141
187
  }
142
188
  @if (!data?.config && !data?.schemaLoading) {
@@ -160,11 +206,11 @@ class FilterFormDialogHostComponent {
160
206
  {{ data.i18n?.apply || 'Aplicar' }}
161
207
  </button>
162
208
  </mat-dialog-actions>
163
- `, isInline: true, styles: [".pfx-dialog-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-right:8px}.pfx-dialog-title-text{display:inline-flex;align-items:center;gap:8px;margin:0;padding:0;font-weight:600;color:var(--mdc-dialog-subhead-color, var(--md-sys-color-on-surface))}.pfx-dialog-close{margin-left:auto}.pfx-filter-dialog-content{display:flex;flex-direction:column;gap:12px;padding-top:8px}.pfx-empty-state{margin:8px 0 0;color:var(--mdc-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant))}.pfx-dialog-loading{display:flex;flex-direction:column;gap:10px;min-height:128px;justify-content:center;color:var(--mdc-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant));font-size:.875rem}.pfx-form-pending{height:0;overflow:hidden;visibility:hidden;pointer-events:none}.pfx-dialog-actions{padding:var(--pdx-dialog-actions-padding, 12px 24px 16px);border-top:1px solid var(--md-sys-color-outline-variant);background:transparent;display:flex;align-items:center;gap:8px}.pfx-save-shortcut-button{margin-right:auto}.pfx-save-shortcut-button mat-icon{margin-right:6px;width:18px;height:18px;font-size:18px}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i15.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: PraxisFilterForm, selector: "praxis-filter-form", inputs: ["config", "formId", "resourcePath", "mode"], outputs: ["formReady", "valueChange", "submit", "requestSearch", "validityChange"] }, { kind: "component", type: PraxisIconButtonComponent, selector: "button[praxisIconButton]", inputs: ["praxisIconButton", "size", "appearance", "presentation", "pressed", "busy"] }] });
209
+ `, isInline: true, styles: [".pfx-dialog-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-right:8px}.pfx-dialog-title-text{display:inline-flex;align-items:center;gap:8px;margin:0;padding:0;font-weight:600;color:var(--mdc-dialog-subhead-color, var(--md-sys-color-on-surface))}.pfx-dialog-close{margin-left:auto}.pfx-filter-dialog-content{display:flex;flex-direction:column;gap:12px;padding-top:8px}.pfx-empty-state{margin:8px 0 0;color:var(--mdc-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant))}.pfx-dialog-loading{display:flex;flex-direction:column;gap:10px;min-height:128px;justify-content:center;color:var(--mdc-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant));font-size:.875rem}.pfx-form-pending{height:0;overflow:hidden;visibility:hidden;pointer-events:none}.pfx-dialog-actions{padding:var(--pdx-dialog-actions-padding, 12px 24px 16px);border-top:1px solid var(--md-sys-color-outline-variant);background:transparent;display:flex;align-items:center;gap:8px}.pfx-save-shortcut-button{margin-right:auto}.pfx-save-shortcut-button mat-icon{margin-right:6px;width:18px;height:18px;font-size:18px}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i15.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i14.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: PraxisFilterForm, selector: "praxis-filter-form", inputs: ["config", "formId", "resourcePath", "endpointKey", "apiUrlEntry", "mode"], outputs: ["formReady", "valueChange", "submit", "requestSearch", "validityChange"] }, { kind: "component", type: PraxisIconButtonComponent, selector: "button[praxisIconButton]", inputs: ["praxisIconButton", "size", "appearance", "presentation", "pressed", "busy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
164
210
  }
165
211
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FilterFormDialogHostComponent, decorators: [{
166
212
  type: Component,
167
- args: [{ selector: 'praxis-filter-form-dialog-host', standalone: true, imports: [MatDialogModule, MatButtonModule, MatProgressBarModule, MatIconModule, MatTooltipModule, PraxisFilterForm, PraxisIconButtonComponent], template: `
213
+ args: [{ selector: 'praxis-filter-form-dialog-host', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatDialogModule, MatButtonModule, MatProgressBarModule, MatIconModule, MatTooltipModule, PraxisFilterForm, PraxisIconButtonComponent], template: `
168
214
  <div class="pfx-dialog-title">
169
215
  <h2 mat-dialog-title class="pfx-dialog-title-text">
170
216
  <mat-icon>tune</mat-icon>
@@ -197,6 +243,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
197
243
  (formReady)="onReady($event)"
198
244
  (valueChange)="onChange($event)"
199
245
  (validityChange)="onValidity($event)"
246
+ (submit)="onProjectedSubmit($event)"
200
247
  ></praxis-filter-form>
201
248
  }
202
249
  @if (!data?.config && !data?.schemaLoading) {
@@ -224,6 +271,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
224
271
  }], ctorParameters: () => [{ type: undefined, decorators: [{
225
272
  type: Inject,
226
273
  args: [MAT_DIALOG_DATA]
227
- }] }, { type: i1.MatDialogRef }] });
274
+ }] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }], propDecorators: { filterForm: [{
275
+ type: ViewChild,
276
+ args: [PraxisFilterForm]
277
+ }] } });
228
278
 
229
279
  export { FilterFormDialogHostComponent };