@parqui/angular 1.1.2
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.
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, NgZone, ViewChild, Input, Component } from '@angular/core';
|
|
3
|
+
import { createElement } from 'react';
|
|
4
|
+
import { createRoot } from 'react-dom/client';
|
|
5
|
+
import { ParquetViewer, ParquetExplorer } from '@parqui/react';
|
|
6
|
+
|
|
7
|
+
class ParquetViewerComponent {
|
|
8
|
+
source;
|
|
9
|
+
columns;
|
|
10
|
+
onMetadataLoad;
|
|
11
|
+
hostRef;
|
|
12
|
+
root = null;
|
|
13
|
+
zone = inject(NgZone);
|
|
14
|
+
ngAfterViewInit() {
|
|
15
|
+
this.renderReact();
|
|
16
|
+
}
|
|
17
|
+
ngOnChanges() {
|
|
18
|
+
this.renderReact();
|
|
19
|
+
}
|
|
20
|
+
ngOnDestroy() {
|
|
21
|
+
this.root?.unmount();
|
|
22
|
+
this.root = null;
|
|
23
|
+
}
|
|
24
|
+
renderReact() {
|
|
25
|
+
if (!this.hostRef?.nativeElement)
|
|
26
|
+
return;
|
|
27
|
+
this.zone.runOutsideAngular(() => {
|
|
28
|
+
if (!this.root) {
|
|
29
|
+
this.root = createRoot(this.hostRef.nativeElement);
|
|
30
|
+
}
|
|
31
|
+
this.root.render(createElement(ParquetViewer, {
|
|
32
|
+
source: this.source,
|
|
33
|
+
columns: this.columns,
|
|
34
|
+
onMetadataLoad: this.onMetadataLoad,
|
|
35
|
+
style: { height: "100%", width: "100%" },
|
|
36
|
+
}));
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ParquetViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
40
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: ParquetViewerComponent, isStandalone: true, selector: "parqui-viewer", inputs: { source: "source", columns: "columns", onMetadataLoad: "onMetadataLoad" }, host: { styleAttribute: "display: block; width: 100%; height: 100%; min-height: 200px;" }, viewQueries: [{ propertyName: "hostRef", first: true, predicate: ["host"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `<div #host style="display: block; width: 100%; height: 100%;"></div>`, isInline: true });
|
|
41
|
+
}
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ParquetViewerComponent, decorators: [{
|
|
43
|
+
type: Component,
|
|
44
|
+
args: [{
|
|
45
|
+
selector: "parqui-viewer",
|
|
46
|
+
standalone: true,
|
|
47
|
+
host: {
|
|
48
|
+
style: "display: block; width: 100%; height: 100%; min-height: 200px;",
|
|
49
|
+
},
|
|
50
|
+
template: `<div #host style="display: block; width: 100%; height: 100%;"></div>`,
|
|
51
|
+
}]
|
|
52
|
+
}], propDecorators: { source: [{
|
|
53
|
+
type: Input
|
|
54
|
+
}], columns: [{
|
|
55
|
+
type: Input
|
|
56
|
+
}], onMetadataLoad: [{
|
|
57
|
+
type: Input
|
|
58
|
+
}], hostRef: [{
|
|
59
|
+
type: ViewChild,
|
|
60
|
+
args: ["host", { static: true }]
|
|
61
|
+
}] } });
|
|
62
|
+
|
|
63
|
+
class ParquetExplorerComponent {
|
|
64
|
+
source;
|
|
65
|
+
columns;
|
|
66
|
+
onRequestOpen;
|
|
67
|
+
hostRef;
|
|
68
|
+
root = null;
|
|
69
|
+
zone = inject(NgZone);
|
|
70
|
+
ngAfterViewInit() {
|
|
71
|
+
this.renderReact();
|
|
72
|
+
}
|
|
73
|
+
ngOnChanges() {
|
|
74
|
+
this.renderReact();
|
|
75
|
+
}
|
|
76
|
+
ngOnDestroy() {
|
|
77
|
+
this.root?.unmount();
|
|
78
|
+
this.root = null;
|
|
79
|
+
}
|
|
80
|
+
renderReact() {
|
|
81
|
+
if (!this.hostRef?.nativeElement)
|
|
82
|
+
return;
|
|
83
|
+
this.zone.runOutsideAngular(() => {
|
|
84
|
+
if (!this.root) {
|
|
85
|
+
this.root = createRoot(this.hostRef.nativeElement);
|
|
86
|
+
}
|
|
87
|
+
this.root.render(createElement(ParquetExplorer, {
|
|
88
|
+
source: this.source,
|
|
89
|
+
columns: this.columns,
|
|
90
|
+
onRequestOpen: this.onRequestOpen,
|
|
91
|
+
style: { height: "100%", width: "100%" },
|
|
92
|
+
}));
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ParquetExplorerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
96
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: ParquetExplorerComponent, isStandalone: true, selector: "parquet-explorer", inputs: { source: "source", columns: "columns", onRequestOpen: "onRequestOpen" }, host: { styleAttribute: "display: block; width: 100%; height: 100%; min-height: 200px;" }, viewQueries: [{ propertyName: "hostRef", first: true, predicate: ["host"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `<div #host style="display: block; width: 100%; height: 100%;"></div>`, isInline: true });
|
|
97
|
+
}
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ParquetExplorerComponent, decorators: [{
|
|
99
|
+
type: Component,
|
|
100
|
+
args: [{
|
|
101
|
+
selector: "parquet-explorer",
|
|
102
|
+
standalone: true,
|
|
103
|
+
host: {
|
|
104
|
+
style: "display: block; width: 100%; height: 100%; min-height: 200px;",
|
|
105
|
+
},
|
|
106
|
+
template: `<div #host style="display: block; width: 100%; height: 100%;"></div>`,
|
|
107
|
+
}]
|
|
108
|
+
}], propDecorators: { source: [{
|
|
109
|
+
type: Input
|
|
110
|
+
}], columns: [{
|
|
111
|
+
type: Input
|
|
112
|
+
}], onRequestOpen: [{
|
|
113
|
+
type: Input
|
|
114
|
+
}], hostRef: [{
|
|
115
|
+
type: ViewChild,
|
|
116
|
+
args: ["host", { static: true }]
|
|
117
|
+
}] } });
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Generated bundle index. Do not edit.
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
export { ParquetExplorerComponent, ParquetViewerComponent };
|
|
124
|
+
//# sourceMappingURL=parqui-angular.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parqui-angular.mjs","sources":["../../src/parquet-viewer.component.ts","../../src/parquet-explorer.component.ts","../../src/parqui-angular.ts"],"sourcesContent":["import {\n AfterViewInit,\n Component,\n ElementRef,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n ViewChild,\n inject,\n} from \"@angular/core\";\nimport { createElement } from \"react\";\nimport { createRoot, type Root } from \"react-dom/client\";\nimport { ParquetViewer as ReactParquetViewer } from \"@parqui/react\";\nimport type { ParquetInputSource, ParquetMetadata } from \"@parqui/react\";\n\n@Component({\n selector: \"parqui-viewer\",\n standalone: true,\n host: {\n style: \"display: block; width: 100%; height: 100%; min-height: 200px;\",\n },\n template: `<div #host style=\"display: block; width: 100%; height: 100%;\"></div>`,\n})\nexport class ParquetViewerComponent implements AfterViewInit, OnChanges, OnDestroy {\n @Input() source?: ParquetInputSource;\n @Input() columns?: string[];\n @Input() onMetadataLoad?: (metadata: ParquetMetadata) => void;\n\n @ViewChild(\"host\", { static: true })\n private hostRef!: ElementRef<HTMLDivElement>;\n\n private root: Root | null = null;\n private readonly zone = inject(NgZone);\n\n ngAfterViewInit() {\n this.renderReact();\n }\n\n ngOnChanges() {\n this.renderReact();\n }\n\n ngOnDestroy() {\n this.root?.unmount();\n this.root = null;\n }\n\n private renderReact() {\n if (!this.hostRef?.nativeElement) return;\n this.zone.runOutsideAngular(() => {\n if (!this.root) {\n this.root = createRoot(this.hostRef.nativeElement);\n }\n\n this.root.render(\n createElement(ReactParquetViewer, {\n source: this.source,\n columns: this.columns,\n onMetadataLoad: this.onMetadataLoad,\n style: { height: \"100%\", width: \"100%\" },\n }),\n );\n });\n }\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n ViewChild,\n inject,\n} from \"@angular/core\";\nimport { createElement } from \"react\";\nimport { createRoot, type Root } from \"react-dom/client\";\nimport { ParquetExplorer as ReactParquetExplorer } from \"@parqui/react\";\nimport type { ParquetInputSource, ParquetSource } from \"@parqui/react\";\n\n@Component({\n selector: \"parquet-explorer\",\n standalone: true,\n host: {\n style: \"display: block; width: 100%; height: 100%; min-height: 200px;\",\n },\n template: `<div #host style=\"display: block; width: 100%; height: 100%;\"></div>`,\n})\nexport class ParquetExplorerComponent implements AfterViewInit, OnChanges, OnDestroy {\n @Input() source?: ParquetInputSource;\n @Input() columns?: string[];\n @Input() onRequestOpen?: () => Promise<{ source: ParquetSource; name: string } | null>;\n\n @ViewChild(\"host\", { static: true })\n private hostRef!: ElementRef<HTMLDivElement>;\n\n private root: Root | null = null;\n private readonly zone = inject(NgZone);\n\n ngAfterViewInit() {\n this.renderReact();\n }\n\n ngOnChanges() {\n this.renderReact();\n }\n\n ngOnDestroy() {\n this.root?.unmount();\n this.root = null;\n }\n\n private renderReact() {\n if (!this.hostRef?.nativeElement) return;\n this.zone.runOutsideAngular(() => {\n if (!this.root) {\n this.root = createRoot(this.hostRef.nativeElement);\n }\n\n this.root.render(\n createElement(ReactParquetExplorer, {\n source: this.source,\n columns: this.columns,\n onRequestOpen: this.onRequestOpen,\n style: { height: \"100%\", width: \"100%\" },\n }),\n );\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ReactParquetViewer","ReactParquetExplorer"],"mappings":";;;;;;MAwBa,sBAAsB,CAAA;AACxB,IAAA,MAAM;AACN,IAAA,OAAO;AACP,IAAA,cAAc;AAGf,IAAA,OAAO;IAEP,IAAI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C,CACH;AACH,QAAA,CAAC,CAAC;IACJ;uGAxCW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,6XAFzB,CAAA,oEAAA,CAAsE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAErE,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBARpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,+DAA+D;AACvE,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,oEAAA,CAAsE;AACjF,iBAAA;;sBAEE;;sBACA;;sBACA;;sBAEA,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;AC7BrC;;AAEG;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@parqui/angular",
|
|
3
|
+
"version": "1.1.2",
|
|
4
|
+
"description": "Angular wrappers around @parqui/react components",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./fesm2022/parqui-angular.mjs",
|
|
7
|
+
"module": "./fesm2022/parqui-angular.mjs",
|
|
8
|
+
"types": "./types/parqui-angular.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./types/parqui-angular.d.ts",
|
|
12
|
+
"import": "./fesm2022/parqui-angular.mjs",
|
|
13
|
+
"default": "./fesm2022/parqui-angular.mjs"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"fesm2022",
|
|
19
|
+
"types"
|
|
20
|
+
],
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@parqui/core": "1.1.2",
|
|
23
|
+
"@parqui/react": "1.1.2",
|
|
24
|
+
"react": "^19.0.0",
|
|
25
|
+
"react-dom": "^19.0.0",
|
|
26
|
+
"tslib": "^2.3.0"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@angular/common": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0",
|
|
30
|
+
"@angular/core": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0"
|
|
31
|
+
},
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"typings": "./types/parqui-angular.d.ts",
|
|
34
|
+
"sideEffects": false
|
|
35
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { AfterViewInit, OnChanges, OnDestroy } from '@angular/core';
|
|
3
|
+
import { ParquetInputSource, ParquetMetadata, ParquetSource } from '@parqui/react';
|
|
4
|
+
export { ParquetColumn, ParquetData, ParquetExplorerProps, ParquetInputSource, ParquetMetadata, ParquetRow, ParquetSource, ParquetViewerProps, ReadOptions } from '@parqui/react';
|
|
5
|
+
|
|
6
|
+
declare class ParquetViewerComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
7
|
+
source?: ParquetInputSource;
|
|
8
|
+
columns?: string[];
|
|
9
|
+
onMetadataLoad?: (metadata: ParquetMetadata) => void;
|
|
10
|
+
private hostRef;
|
|
11
|
+
private root;
|
|
12
|
+
private readonly zone;
|
|
13
|
+
ngAfterViewInit(): void;
|
|
14
|
+
ngOnChanges(): void;
|
|
15
|
+
ngOnDestroy(): void;
|
|
16
|
+
private renderReact;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ParquetViewerComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ParquetViewerComponent, "parqui-viewer", never, { "source": { "alias": "source"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "onMetadataLoad": { "alias": "onMetadataLoad"; "required": false; }; }, {}, never, never, true, never>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare class ParquetExplorerComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
22
|
+
source?: ParquetInputSource;
|
|
23
|
+
columns?: string[];
|
|
24
|
+
onRequestOpen?: () => Promise<{
|
|
25
|
+
source: ParquetSource;
|
|
26
|
+
name: string;
|
|
27
|
+
} | null>;
|
|
28
|
+
private hostRef;
|
|
29
|
+
private root;
|
|
30
|
+
private readonly zone;
|
|
31
|
+
ngAfterViewInit(): void;
|
|
32
|
+
ngOnChanges(): void;
|
|
33
|
+
ngOnDestroy(): void;
|
|
34
|
+
private renderReact;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ParquetExplorerComponent, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ParquetExplorerComponent, "parquet-explorer", never, { "source": { "alias": "source"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "onRequestOpen": { "alias": "onRequestOpen"; "required": false; }; }, {}, never, never, true, never>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { ParquetExplorerComponent, ParquetViewerComponent };
|