@praxisui/crud 8.0.0-beta.25 → 8.0.0-beta.27

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.
@@ -3308,6 +3308,8 @@ class PraxisCrudComponent {
3308
3308
  afterSave = new EventEmitter();
3309
3309
  afterDelete = new EventEmitter();
3310
3310
  error = new EventEmitter();
3311
+ rowClick = new EventEmitter();
3312
+ selectionChange = new EventEmitter();
3311
3313
  tableRuntimeConfigChange = new EventEmitter();
3312
3314
  crudAuthoringDocumentApplied = new EventEmitter();
3313
3315
  crudAuthoringDocumentSaved = new EventEmitter();
@@ -3372,6 +3374,12 @@ class PraxisCrudComponent {
3372
3374
  }
3373
3375
  catch { }
3374
3376
  }
3377
+ onTableRowClick(event) {
3378
+ this.rowClick.emit(event);
3379
+ }
3380
+ onTableSelectionChange(event) {
3381
+ this.selectionChange.emit(event);
3382
+ }
3375
3383
  ngOnChanges(changes) {
3376
3384
  if (!changes['metadata'] && !changes['context']) {
3377
3385
  return;
@@ -3591,6 +3599,7 @@ class PraxisCrudComponent {
3591
3599
  }
3592
3600
  onConfigureRequested() {
3593
3601
  this.configureRequested.emit();
3602
+ this.openCrudAuthoringFromTable();
3594
3603
  }
3595
3604
  async tryHandleCanonicalDeleteAction(action, row) {
3596
3605
  const normalizedAction = String(action.action || '').trim().toLowerCase();
@@ -4408,7 +4417,7 @@ class PraxisCrudComponent {
4408
4417
  }
4409
4418
  }
4410
4419
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: PraxisCrudComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4411
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.17", type: PraxisCrudComponent, isStandalone: true, selector: "praxis-crud", inputs: { metadata: "metadata", crudId: "crudId", componentInstanceId: "componentInstanceId", context: "context", enableCustomization: "enableCustomization" }, outputs: { configureRequested: "configureRequested", afterOpen: "afterOpen", afterClose: "afterClose", afterSave: "afterSave", afterDelete: "afterDelete", error: "error", tableRuntimeConfigChange: "tableRuntimeConfigChange", crudAuthoringDocumentApplied: "crudAuthoringDocumentApplied", crudAuthoringDocumentSaved: "crudAuthoringDocumentSaved" }, providers: [
4420
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.17", type: PraxisCrudComponent, isStandalone: true, selector: "praxis-crud", inputs: { metadata: "metadata", crudId: "crudId", componentInstanceId: "componentInstanceId", context: "context", enableCustomization: "enableCustomization" }, outputs: { configureRequested: "configureRequested", afterOpen: "afterOpen", afterClose: "afterClose", afterSave: "afterSave", afterDelete: "afterDelete", error: "error", rowClick: "rowClick", selectionChange: "selectionChange", tableRuntimeConfigChange: "tableRuntimeConfigChange", crudAuthoringDocumentApplied: "crudAuthoringDocumentApplied", crudAuthoringDocumentSaved: "crudAuthoringDocumentSaved" }, providers: [
4412
4421
  providePraxisI18nConfig(RESOURCE_DISCOVERY_I18N_CONFIG),
4413
4422
  providePraxisI18nConfig(PRAXIS_CRUD_RUNTIME_I18N_CONFIG),
4414
4423
  ], viewQueries: [{ propertyName: "table", first: true, predicate: PraxisTable, descendants: true }], usesOnChanges: true, ngImport: i0, template: `
@@ -4422,6 +4431,8 @@ class PraxisCrudComponent {
4422
4431
  [tableId]="crudId || 'default'"
4423
4432
  [crudContext]="tableCrudContext"
4424
4433
  [enableCustomization]="enableCustomization"
4434
+ (rowClick)="onTableRowClick($event)"
4435
+ (selectionChange)="onTableSelectionChange($event)"
4425
4436
  (rowAction)="onAction($event.action, $event.row, $event)"
4426
4437
  (toolbarAction)="onAction($event.action)"
4427
4438
  (collectionLinksChange)="onCollectionLinksChange($event)"
@@ -4457,6 +4468,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
4457
4468
  [tableId]="crudId || 'default'"
4458
4469
  [crudContext]="tableCrudContext"
4459
4470
  [enableCustomization]="enableCustomization"
4471
+ (rowClick)="onTableRowClick($event)"
4472
+ (selectionChange)="onTableSelectionChange($event)"
4460
4473
  (rowAction)="onAction($event.action, $event.row, $event)"
4461
4474
  (toolbarAction)="onAction($event.action)"
4462
4475
  (collectionLinksChange)="onCollectionLinksChange($event)"
@@ -4499,6 +4512,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
4499
4512
  type: Output
4500
4513
  }], error: [{
4501
4514
  type: Output
4515
+ }], rowClick: [{
4516
+ type: Output
4517
+ }], selectionChange: [{
4518
+ type: Output
4502
4519
  }], tableRuntimeConfigChange: [{
4503
4520
  type: Output
4504
4521
  }], crudAuthoringDocumentApplied: [{
@@ -4857,7 +4874,7 @@ class DynamicFormDialogHostComponent {
4857
4874
  (formCancel)="onCancel()"
4858
4875
  ></praxis-dynamic-form>
4859
4876
  </mat-dialog-content>
4860
- `, isInline: true, styles: [":host{--dlg-header-h: 56px;--dlg-footer-h: 56px;--dlg-pad: 16px;display:flex;flex-direction:column;height:100%;overflow:hidden}:host([data-density=\"compact\"]){--dlg-header-h: 44px;--dlg-footer-h: 44px;--dlg-pad: 12px}.dialog-header{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:var(--dlg-pad);padding:0 var(--dlg-pad);height:var(--dlg-header-h);margin:0;background:var(--md-sys-color-surface-container-high);border-bottom:1px solid var(--md-sys-color-outline-variant);color:var(--md-sys-color-on-surface)}.dialog-title{margin:0;font:inherit;font-weight:600;color:var(--md-sys-color-on-surface)}.spacer{flex:1}.dialog-content{overflow:auto;padding:var(--dlg-pad);max-height:calc(100svh - var(--dlg-header-h) - 32px)}.dialog-header button.mat-icon-button{color:var(--md-sys-color-on-surface-variant)}.dialog-header button.mat-icon-button:hover{color:var(--md-sys-color-primary);background:var(--md-sys-color-primary-container)}.dialog-footer{position:sticky;bottom:0;z-index:1;padding:var(--dlg-pad)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }, { kind: "component", type: PraxisDynamicForm, selector: "praxis-dynamic-form", inputs: ["resourcePath", "resourceId", "initialValue", "editorialContext", "mode", "config", "actions", "schemaSource", "schemaUrl", "submitUrl", "submitMethod", "responseSchemaUrl", "apiEndpointKey", "apiUrlEntry", "enableCustomization", "formId", "componentInstanceId", "layout", "backConfig", "hooks", "removeEmptyContainersOnSave", "reactiveValidation", "reactiveValidationDebounceMs", "notifyIfOutdated", "snoozeMs", "autoOpenSettingsOnOutdated", "readonlyModeGlobal", "disabledModeGlobal", "presentationModeGlobal", "visibleGlobal", "domainRules", "customEndpoints"], outputs: ["formSubmit", "formCancel", "formReset", "configChange", "formReady", "valueChange", "syncCompleted", "initializationError", "loadingStateChange", "enableCustomizationChange", "customAction", "actionConfirmation", "schemaStatusChange", "fieldRenderError", "ruleDiagnosticsChange"] }] });
4877
+ `, isInline: true, styles: [":host{--dlg-header-h: 56px;--dlg-footer-h: 56px;--dlg-pad: 16px;display:flex;flex-direction:column;height:100%;overflow:hidden}:host([data-density=\"compact\"]){--dlg-header-h: 44px;--dlg-footer-h: 44px;--dlg-pad: 12px}.dialog-header{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:var(--dlg-pad);padding:0 var(--dlg-pad);height:var(--dlg-header-h);margin:0;background:var(--md-sys-color-surface-container-high);border-bottom:1px solid var(--md-sys-color-outline-variant);color:var(--md-sys-color-on-surface)}.dialog-title{margin:0;font:inherit;font-weight:600;color:var(--md-sys-color-on-surface)}.spacer{flex:1}.dialog-content{overflow:auto;padding:var(--dlg-pad);max-height:calc(100svh - var(--dlg-header-h) - 32px)}.dialog-header button.mat-icon-button{color:var(--md-sys-color-on-surface-variant)}.dialog-header button.mat-icon-button:hover{color:var(--md-sys-color-primary);background:var(--md-sys-color-primary-container)}.dialog-footer{position:sticky;bottom:0;z-index:1;padding:var(--dlg-pad)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }, { kind: "component", type: PraxisDynamicForm, selector: "praxis-dynamic-form", inputs: ["resourcePath", "resourceId", "initialValue", "editorialContext", "mode", "config", "actions", "schemaSource", "schemaUrl", "submitUrl", "submitMethod", "responseSchemaUrl", "apiEndpointKey", "apiUrlEntry", "enableCustomization", "formId", "componentInstanceId", "configPersistenceStrategy", "layout", "backConfig", "hooks", "removeEmptyContainersOnSave", "reactiveValidation", "reactiveValidationDebounceMs", "notifyIfOutdated", "snoozeMs", "autoOpenSettingsOnOutdated", "readonlyModeGlobal", "disabledModeGlobal", "presentationModeGlobal", "visibleGlobal", "domainRules", "customEndpoints"], outputs: ["formSubmit", "formCancel", "formReset", "configChange", "configPatchChange", "formReady", "valueChange", "syncCompleted", "initializationError", "loadingStateChange", "enableCustomizationChange", "customAction", "actionConfirmation", "schemaStatusChange", "fieldRenderError", "ruleDiagnosticsChange"] }] });
4861
4878
  }
4862
4879
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: DynamicFormDialogHostComponent, decorators: [{
4863
4880
  type: Component,
@@ -5139,6 +5156,16 @@ const PRAXIS_CRUD_COMPONENT_METADATA = {
5139
5156
  type: '{ id: string | number }',
5140
5157
  description: 'Emitido ao deletar.',
5141
5158
  },
5159
+ {
5160
+ name: 'rowClick',
5161
+ type: '{ row: unknown; index: number }',
5162
+ description: 'Encaminha o clique de linha da tabela interna para composição master-detail e seleção local.',
5163
+ },
5164
+ {
5165
+ name: 'selectionChange',
5166
+ type: 'unknown',
5167
+ description: 'Encaminha a mudança de seleção da tabela interna quando o CRUD é usado como widget composto.',
5168
+ },
5142
5169
  {
5143
5170
  name: 'error',
5144
5171
  type: 'unknown',
@@ -5245,6 +5272,23 @@ const PRAXIS_CRUD_COMPONENT_METADATA = {
5245
5272
  },
5246
5273
  scope: 'shell',
5247
5274
  },
5275
+ {
5276
+ id: 'row-click',
5277
+ label: 'Clique em linha',
5278
+ icon: 'ads_click',
5279
+ description: 'Emite evento ao clicar em uma linha da tabela interna do CRUD.',
5280
+ emit: 'rowClick',
5281
+ payloadSchema: {
5282
+ type: 'object',
5283
+ properties: {
5284
+ row: { type: 'object', description: 'Registro clicado.' },
5285
+ index: { type: 'number', description: 'Índice da linha.' },
5286
+ },
5287
+ required: ['row'],
5288
+ example: { row: {}, index: 0 },
5289
+ },
5290
+ scope: 'context',
5291
+ },
5248
5292
  {
5249
5293
  id: 'close',
5250
5294
  label: 'Fechar',
package/index.d.ts CHANGED
@@ -162,6 +162,8 @@ declare class PraxisCrudComponent implements OnChanges {
162
162
  id: string | number;
163
163
  }>;
164
164
  error: EventEmitter<unknown>;
165
+ rowClick: EventEmitter<unknown>;
166
+ selectionChange: EventEmitter<unknown>;
165
167
  tableRuntimeConfigChange: EventEmitter<_praxisui_core.TableConfigModern>;
166
168
  crudAuthoringDocumentApplied: EventEmitter<CrudAuthoringWidgetPersistenceEvent>;
167
169
  crudAuthoringDocumentSaved: EventEmitter<CrudAuthoringWidgetPersistenceEvent>;
@@ -200,6 +202,8 @@ declare class PraxisCrudComponent implements OnChanges {
200
202
  private collectionCapabilitiesRequestSeq;
201
203
  private currentAuthoringDocument?;
202
204
  onResetPreferences(): void;
205
+ onTableRowClick(event: unknown): void;
206
+ onTableSelectionChange(event: unknown): void;
203
207
  ngOnChanges(changes: SimpleChanges): void;
204
208
  onAction(action: string, row?: Record<string, unknown>, runtimeEvent?: CrudActionRuntimeEvent): Promise<void>;
205
209
  getCurrentTableConfigSnapshot(): TableConfig | null;
@@ -266,7 +270,7 @@ declare class PraxisCrudComponent implements OnChanges {
266
270
  private getCrudActionLabel;
267
271
  private tx;
268
272
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisCrudComponent, never>;
269
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<PraxisCrudComponent, "praxis-crud", never, { "metadata": { "alias": "metadata"; "required": true; }; "crudId": { "alias": "crudId"; "required": true; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "context": { "alias": "context"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; }, { "configureRequested": "configureRequested"; "afterOpen": "afterOpen"; "afterClose": "afterClose"; "afterSave": "afterSave"; "afterDelete": "afterDelete"; "error": "error"; "tableRuntimeConfigChange": "tableRuntimeConfigChange"; "crudAuthoringDocumentApplied": "crudAuthoringDocumentApplied"; "crudAuthoringDocumentSaved": "crudAuthoringDocumentSaved"; }, never, never, true, never>;
273
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PraxisCrudComponent, "praxis-crud", never, { "metadata": { "alias": "metadata"; "required": true; }; "crudId": { "alias": "crudId"; "required": true; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "context": { "alias": "context"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; }, { "configureRequested": "configureRequested"; "afterOpen": "afterOpen"; "afterClose": "afterClose"; "afterSave": "afterSave"; "afterDelete": "afterDelete"; "error": "error"; "rowClick": "rowClick"; "selectionChange": "selectionChange"; "tableRuntimeConfigChange": "tableRuntimeConfigChange"; "crudAuthoringDocumentApplied": "crudAuthoringDocumentApplied"; "crudAuthoringDocumentSaved": "crudAuthoringDocumentSaved"; }, never, never, true, never>;
270
274
  }
271
275
 
272
276
  type CrudDrawerResultType = 'save' | 'delete' | 'close';
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@praxisui/crud",
3
- "version": "8.0.0-beta.25",
3
+ "version": "8.0.0-beta.27",
4
4
  "description": "CRUD building blocks for Praxis UI: integrates dynamic forms and tables with unified configuration and services.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^20.1.0",
7
7
  "@angular/core": "^20.1.0",
8
- "@praxisui/dynamic-form": "^8.0.0-beta.25",
9
- "@praxisui/table": "^8.0.0-beta.25",
10
- "@praxisui/core": "^8.0.0-beta.25",
11
- "@praxisui/dynamic-fields": "^8.0.0-beta.25",
12
- "@praxisui/settings-panel": "^8.0.0-beta.25",
8
+ "@praxisui/dynamic-form": "^8.0.0-beta.27",
9
+ "@praxisui/table": "^8.0.0-beta.27",
10
+ "@praxisui/core": "^8.0.0-beta.27",
11
+ "@praxisui/dynamic-fields": "^8.0.0-beta.27",
12
+ "@praxisui/settings-panel": "^8.0.0-beta.27",
13
13
  "@angular/cdk": "^20.1.0",
14
14
  "@angular/forms": "^20.1.0",
15
15
  "@angular/material": "^20.1.0",
16
16
  "@angular/router": "^20.1.0",
17
- "@praxisui/ai": "^8.0.0-beta.25",
17
+ "@praxisui/ai": "^8.0.0-beta.27",
18
18
  "rxjs": "~7.8.0"
19
19
  },
20
20
  "dependencies": {