@praxisui/table 0.0.1
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/LICENSE +6 -0
- package/README.md +1084 -0
- package/fesm2022/praxisui-table-filter-form-dialog-host.component-DI8aWSSJ.mjs +85 -0
- package/fesm2022/praxisui-table-filter-form-dialog-host.component-DI8aWSSJ.mjs.map +1 -0
- package/fesm2022/praxisui-table.mjs +19350 -0
- package/fesm2022/praxisui-table.mjs.map +1 -0
- package/index.d.ts +1771 -0
- package/package.json +39 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Inject, Component } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1 from '@angular/material/dialog';
|
|
6
|
+
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
7
|
+
import * as i3 from '@angular/material/button';
|
|
8
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
9
|
+
import * as i14 from '@angular/material/progress-bar';
|
|
10
|
+
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
11
|
+
import { PraxisFilterForm } from '@praxisui/dynamic-form';
|
|
12
|
+
|
|
13
|
+
class FilterFormDialogHostComponent {
|
|
14
|
+
data;
|
|
15
|
+
ref;
|
|
16
|
+
valid = true;
|
|
17
|
+
lastValue = {};
|
|
18
|
+
constructor(data, ref) {
|
|
19
|
+
this.data = data;
|
|
20
|
+
this.ref = ref;
|
|
21
|
+
}
|
|
22
|
+
onReady(_ev) { }
|
|
23
|
+
onChange(ev) {
|
|
24
|
+
this.lastValue = ev?.formData ?? {};
|
|
25
|
+
}
|
|
26
|
+
onValidity(v) { this.valid = v; }
|
|
27
|
+
apply() { this.ref.close({ formData: this.lastValue }); }
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterFormDialogHostComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: FilterFormDialogHostComponent, isStandalone: true, selector: "praxis-filter-form-dialog-host", ngImport: i0, template: `
|
|
30
|
+
<h2 mat-dialog-title id="filterDialogTitle">{{ data.title || 'Filtro Avançado' }}</h2>
|
|
31
|
+
<mat-dialog-content class="pfx-filter-dialog-content" aria-labelledby="filterDialogTitle">
|
|
32
|
+
<mat-progress-bar *ngIf="data?.schemaLoading" mode="indeterminate"></mat-progress-bar>
|
|
33
|
+
<praxis-filter-form
|
|
34
|
+
*ngIf="data?.config"
|
|
35
|
+
[formId]="data.formId"
|
|
36
|
+
[resourcePath]="data.resourcePath"
|
|
37
|
+
[mode]="'edit'"
|
|
38
|
+
[config]="data.config"
|
|
39
|
+
(formReady)="onReady($event)"
|
|
40
|
+
(valueChange)="onChange($event)"
|
|
41
|
+
(validityChange)="onValidity($event)"
|
|
42
|
+
></praxis-filter-form>
|
|
43
|
+
<p *ngIf="!data?.config && !data?.schemaLoading">Nenhum dado</p>
|
|
44
|
+
</mat-dialog-content>
|
|
45
|
+
<mat-dialog-actions align="end">
|
|
46
|
+
<button mat-stroked-button mat-dialog-close>Cancelar</button>
|
|
47
|
+
<button mat-flat-button color="primary" (click)="apply()" [disabled]="!valid">Aplicar</button>
|
|
48
|
+
</mat-dialog-actions>
|
|
49
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { 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: i14.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: PraxisFilterForm, selector: "praxis-filter-form", inputs: ["config", "formId", "resourcePath", "mode"], outputs: ["formReady", "valueChange", "submit", "validityChange"] }] });
|
|
50
|
+
}
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterFormDialogHostComponent, decorators: [{
|
|
52
|
+
type: Component,
|
|
53
|
+
args: [{
|
|
54
|
+
selector: 'praxis-filter-form-dialog-host',
|
|
55
|
+
standalone: true,
|
|
56
|
+
imports: [CommonModule, MatDialogModule, MatButtonModule, MatProgressBarModule, PraxisFilterForm],
|
|
57
|
+
template: `
|
|
58
|
+
<h2 mat-dialog-title id="filterDialogTitle">{{ data.title || 'Filtro Avançado' }}</h2>
|
|
59
|
+
<mat-dialog-content class="pfx-filter-dialog-content" aria-labelledby="filterDialogTitle">
|
|
60
|
+
<mat-progress-bar *ngIf="data?.schemaLoading" mode="indeterminate"></mat-progress-bar>
|
|
61
|
+
<praxis-filter-form
|
|
62
|
+
*ngIf="data?.config"
|
|
63
|
+
[formId]="data.formId"
|
|
64
|
+
[resourcePath]="data.resourcePath"
|
|
65
|
+
[mode]="'edit'"
|
|
66
|
+
[config]="data.config"
|
|
67
|
+
(formReady)="onReady($event)"
|
|
68
|
+
(valueChange)="onChange($event)"
|
|
69
|
+
(validityChange)="onValidity($event)"
|
|
70
|
+
></praxis-filter-form>
|
|
71
|
+
<p *ngIf="!data?.config && !data?.schemaLoading">Nenhum dado</p>
|
|
72
|
+
</mat-dialog-content>
|
|
73
|
+
<mat-dialog-actions align="end">
|
|
74
|
+
<button mat-stroked-button mat-dialog-close>Cancelar</button>
|
|
75
|
+
<button mat-flat-button color="primary" (click)="apply()" [disabled]="!valid">Aplicar</button>
|
|
76
|
+
</mat-dialog-actions>
|
|
77
|
+
`,
|
|
78
|
+
}]
|
|
79
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
80
|
+
type: Inject,
|
|
81
|
+
args: [MAT_DIALOG_DATA]
|
|
82
|
+
}] }, { type: i1.MatDialogRef }] });
|
|
83
|
+
|
|
84
|
+
export { FilterFormDialogHostComponent };
|
|
85
|
+
//# sourceMappingURL=praxisui-table-filter-form-dialog-host.component-DI8aWSSJ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"praxisui-table-filter-form-dialog-host.component-DI8aWSSJ.mjs","sources":["../../../projects/praxis-table/src/lib/components/praxis-filter/filter-form-dialog-host.component.ts"],"sourcesContent":["import { Component, Inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { PraxisFilterForm } from '@praxisui/dynamic-form';\n\n@Component({\n selector: 'praxis-filter-form-dialog-host',\n standalone: true,\n imports: [CommonModule, MatDialogModule, MatButtonModule, MatProgressBarModule, PraxisFilterForm],\n template: `\n <h2 mat-dialog-title id=\"filterDialogTitle\">{{ data.title || 'Filtro Avançado' }}</h2>\n <mat-dialog-content class=\"pfx-filter-dialog-content\" aria-labelledby=\"filterDialogTitle\">\n <mat-progress-bar *ngIf=\"data?.schemaLoading\" mode=\"indeterminate\"></mat-progress-bar>\n <praxis-filter-form\n *ngIf=\"data?.config\"\n [formId]=\"data.formId\"\n [resourcePath]=\"data.resourcePath\"\n [mode]=\"'edit'\"\n [config]=\"data.config\"\n (formReady)=\"onReady($event)\"\n (valueChange)=\"onChange($event)\"\n (validityChange)=\"onValidity($event)\"\n ></praxis-filter-form>\n <p *ngIf=\"!data?.config && !data?.schemaLoading\">Nenhum dado</p>\n </mat-dialog-content>\n <mat-dialog-actions align=\"end\">\n <button mat-stroked-button mat-dialog-close>Cancelar</button>\n <button mat-flat-button color=\"primary\" (click)=\"apply()\" [disabled]=\"!valid\">Aplicar</button>\n </mat-dialog-actions>\n `,\n})\nexport class FilterFormDialogHostComponent {\n valid = true;\n private lastValue: any = {};\n constructor(\n @Inject(MAT_DIALOG_DATA)\n public data: {\n formId: string;\n resourcePath: string;\n config: any;\n title?: string;\n schemaLoading?: boolean;\n },\n private ref: MatDialogRef<FilterFormDialogHostComponent>,\n ) {}\n\n onReady(_ev: any): void {}\n onChange(ev: { formData: Record<string, any> }): void {\n this.lastValue = ev?.formData ?? {};\n }\n onValidity(v: boolean): void { this.valid = v; }\n apply(): void { this.ref.close({ formData: this.lastValue }); }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;MAiCa,6BAA6B,CAAA;AAK/B,IAAA,IAAA;AAOC,IAAA,GAAA;IAXV,KAAK,GAAG,IAAI;IACJ,SAAS,GAAQ,EAAE;IAC3B,WAAA,CAES,IAMN,EACO,GAAgD,EAAA;QAPjD,IAAA,CAAA,IAAI,GAAJ,IAAI;QAOH,IAAA,CAAA,GAAG,GAAH,GAAG;;IAGb,OAAO,CAAC,GAAQ,EAAA;AAChB,IAAA,QAAQ,CAAC,EAAqC,EAAA;QAC5C,IAAI,CAAC,SAAS,GAAG,EAAE,EAAE,QAAQ,IAA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