ag-studio-angular 0.0.1 → 1.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.html +15979 -0
- package/README.md +183 -0
- package/esm2022/ag-studio-angular.mjs +5 -0
- package/esm2022/lib/ag-studio.component.mjs +321 -0
- package/esm2022/lib/ag-studio.module.mjs +16 -0
- package/esm2022/lib/angularFrameworkOverrides.mjs +67 -0
- package/esm2022/public-api.mjs +4 -0
- package/fesm2022/ag-studio-angular.mjs +402 -0
- package/fesm2022/ag-studio-angular.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/ag-studio.component.d.ts +154 -0
- package/lib/ag-studio.module.d.ts +7 -0
- package/lib/angularFrameworkOverrides.d.ts +28 -0
- package/package.json +29 -17
- package/public-api.d.ts +3 -0
- package/index.js +0 -1
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy } from '@angular/core';
|
|
2
|
+
import type { AgStudioApi, AgStudioModule, AgStudioProperties } from 'ag-studio';
|
|
3
|
+
import type { AgAiAssistant, AgDataEngine, AgDataSourcesDefinition, AgPageLayoutState, AgPanelConfig, AgReportState, AgStudioApiReadyEvent, AgStudioErrorRaisedEvent, AgStudioGetLocaleTextParams, AgStudioLocaleText, AgStudioMode, AgStudioOverrides, AgStudioReadyEvent, AgStudioStateUpdatedEvent, AgStudioTheme } from 'ag-studio';
|
|
4
|
+
import { AngularFrameworkOverrides } from './angularFrameworkOverrides';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class AgStudio implements AfterViewInit, OnChanges, OnDestroy {
|
|
7
|
+
private readonly _angularFrameworkOverrides;
|
|
8
|
+
private readonly _nativeElement;
|
|
9
|
+
private _initialised;
|
|
10
|
+
private _destroyed;
|
|
11
|
+
private _holdEvents;
|
|
12
|
+
private _resolveFullyReady;
|
|
13
|
+
private readonly _fullyReady;
|
|
14
|
+
/** Dash Api available after onApiReady event has fired. */
|
|
15
|
+
api: AgStudioApi;
|
|
16
|
+
constructor(elementDef: ElementRef, _angularFrameworkOverrides: AngularFrameworkOverrides);
|
|
17
|
+
ngAfterViewInit(): void;
|
|
18
|
+
ngOnChanges(changes: any): void;
|
|
19
|
+
ngOnDestroy(): void;
|
|
20
|
+
protected isEmitterUsed(eventType: string): boolean;
|
|
21
|
+
private globalListener;
|
|
22
|
+
/** Provided an initial studioProperties configuration to the component. If a property is specified in both studioProperties and via component binding the component binding takes precedence. */
|
|
23
|
+
studioProperties: AgStudioProperties | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Used to register AG Studio Modules directly with this instance of Studio.
|
|
26
|
+
*/
|
|
27
|
+
modules: AgStudioModule[] | undefined;
|
|
28
|
+
/** Change this value to set the tabIndex order of Studio within your application.
|
|
29
|
+
* @default 0
|
|
30
|
+
* @initial
|
|
31
|
+
*/
|
|
32
|
+
tabIndex: number | undefined;
|
|
33
|
+
/** Set to `true` to operate Studio in RTL (Right to Left) mode.
|
|
34
|
+
* @default false
|
|
35
|
+
* @initial
|
|
36
|
+
*/
|
|
37
|
+
enableRtl: boolean | undefined;
|
|
38
|
+
/** DOM element to use as the popup parent for Studio popups (context menus, etc.).
|
|
39
|
+
*/
|
|
40
|
+
popupParent: HTMLElement | null | undefined;
|
|
41
|
+
/** Theme to apply to Studio.
|
|
42
|
+
*
|
|
43
|
+
* @default studioTheme
|
|
44
|
+
*/
|
|
45
|
+
theme: AgStudioTheme | undefined;
|
|
46
|
+
/** If your theme uses a font that is available on Google Fonts, pass true to load it from Google's CDN.
|
|
47
|
+
*/
|
|
48
|
+
loadThemeGoogleFonts: boolean | undefined;
|
|
49
|
+
/** The CSS layer that this theme should be rendered onto. When specified,
|
|
50
|
+
* Studio CSS will be wrapped in a `@layer ${themeCssLayer} { ... }` block.
|
|
51
|
+
*
|
|
52
|
+
* NOTE: when specifying `themeCssLayer` we recommend setting
|
|
53
|
+
* `themeStyleContainer` to `document.body` to ensure that Studio CSS
|
|
54
|
+
* comes after your application CSS, allowing your application to set the
|
|
55
|
+
* order of layers.
|
|
56
|
+
*
|
|
57
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@layer
|
|
58
|
+
*/
|
|
59
|
+
themeCssLayer: string | undefined;
|
|
60
|
+
/** The nonce attribute to set on style elements added to the document by
|
|
61
|
+
* themes. If "foo" is passed to this property, Studio can use the Content
|
|
62
|
+
* Security Policy `style-src 'nonce-foo'`, instead of the less secure
|
|
63
|
+
* `style-src 'unsafe-inline'`.
|
|
64
|
+
*
|
|
65
|
+
* Note: CSP nonces are global to a page, where a page has multiple Studio components,
|
|
66
|
+
* every one must have the same styleNonce set.
|
|
67
|
+
*/
|
|
68
|
+
styleNonce: string | undefined;
|
|
69
|
+
/** An element to insert style elements into when injecting styles into the
|
|
70
|
+
* Studio. Styles are inserted at the start of the element.
|
|
71
|
+
*
|
|
72
|
+
* If undefined, styles will be added to the document head for Studio components
|
|
73
|
+
* rendered in the main document fragment, or to Studio wrapper element
|
|
74
|
+
* for other Studio components (e.g. those rendered in a shadow DOM or detached from the
|
|
75
|
+
* document).
|
|
76
|
+
*
|
|
77
|
+
* @initial
|
|
78
|
+
*/
|
|
79
|
+
themeStyleContainer: (HTMLElement | (() => HTMLElement | void)) | undefined;
|
|
80
|
+
/** Allows overriding what `document` is used.
|
|
81
|
+
* Use this when you want Studio to use a different `document` than the one available on the global scope.
|
|
82
|
+
* This can happen if docking out components (something which Electron supports).
|
|
83
|
+
*/
|
|
84
|
+
getDocument: (() => Document) | undefined;
|
|
85
|
+
/** Disables touch support (but does not remove the browser's efforts to simulate mouse events on touch).
|
|
86
|
+
* @default false
|
|
87
|
+
* @initial
|
|
88
|
+
*/
|
|
89
|
+
suppressTouch: boolean | undefined;
|
|
90
|
+
/** A map of key->value pairs for localising text within Studio.
|
|
91
|
+
* @initial
|
|
92
|
+
*/
|
|
93
|
+
localeText: AgStudioLocaleText | undefined;
|
|
94
|
+
/** A callback for localising text within Studio.
|
|
95
|
+
* @initial
|
|
96
|
+
*/
|
|
97
|
+
getLocaleText: ((params: AgStudioGetLocaleTextParams) => string) | undefined;
|
|
98
|
+
/** Provide a custom `studioId` for this instance of Studio. Value will be set on the root DOM node using the attribute `studio-id` as well as being accessible via the `api.getStudioId()` method.
|
|
99
|
+
* @initial
|
|
100
|
+
*/
|
|
101
|
+
studioId: string | undefined;
|
|
102
|
+
/** Provides a context object that is provided to different callbacks Studio uses. Used for passing additional information to the callbacks used by your application.
|
|
103
|
+
* @initial
|
|
104
|
+
*/
|
|
105
|
+
context: any;
|
|
106
|
+
/** Initial state for Studio. Only read once on initialization. Can be used in conjunction with `api.getState()` to save and restore Studio state.
|
|
107
|
+
* @initial
|
|
108
|
+
*/
|
|
109
|
+
initialState: AgReportState | undefined;
|
|
110
|
+
/** Defines the data sources used by Studio.
|
|
111
|
+
*
|
|
112
|
+
* If updated after initially being set, only changes to synchronous data will be processed.
|
|
113
|
+
* Any other changes will be ignored (e.g. adding/removing data sources, updating fields, etc.)
|
|
114
|
+
*/
|
|
115
|
+
data: AgDataSourcesDefinition | AgDataEngine | undefined;
|
|
116
|
+
/** Which mode Studio is in.
|
|
117
|
+
* @default 'view'
|
|
118
|
+
*/
|
|
119
|
+
mode: AgStudioMode | undefined;
|
|
120
|
+
/** Default layout styling.
|
|
121
|
+
*/
|
|
122
|
+
layout: Partial<AgPageLayoutState> | undefined;
|
|
123
|
+
/** AI Assistant configuration.
|
|
124
|
+
*
|
|
125
|
+
* NOTE: The **AI Assistant** is an experimental feature. Behaviour will be
|
|
126
|
+
* slightly different depending on the LLM being used, and results can vary across queries.
|
|
127
|
+
*
|
|
128
|
+
* @initial
|
|
129
|
+
*/
|
|
130
|
+
ai: AgAiAssistant | undefined;
|
|
131
|
+
/** Overrides for the layout and widget configs.
|
|
132
|
+
*/
|
|
133
|
+
overrides: AgStudioOverrides | undefined;
|
|
134
|
+
/** Configure which panels are displayed and on which side.
|
|
135
|
+
*/
|
|
136
|
+
panels: AgPanelConfig | undefined;
|
|
137
|
+
/** State has been updated.
|
|
138
|
+
*/
|
|
139
|
+
stateUpdated: EventEmitter<AgStudioStateUpdatedEvent>;
|
|
140
|
+
/** The API has been initialised and is ready for most calls. The data engine has not been initialised yet, and the UI is not ready.
|
|
141
|
+
*/
|
|
142
|
+
apiReady: EventEmitter<AgStudioApiReadyEvent>;
|
|
143
|
+
/** The data engine has been initialised, and the UI has been created, but may not be fully rendered yet.
|
|
144
|
+
*/
|
|
145
|
+
studioReady: EventEmitter<AgStudioReadyEvent>;
|
|
146
|
+
/** An error has occurred within Studio.
|
|
147
|
+
*/
|
|
148
|
+
errorRaised: EventEmitter<AgStudioErrorRaisedEvent>;
|
|
149
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AgStudio, never>;
|
|
150
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AgStudio, "ag-studio", never, { "studioProperties": { "alias": "studioProperties"; "required": false; }; "modules": { "alias": "modules"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "enableRtl": { "alias": "enableRtl"; "required": false; }; "popupParent": { "alias": "popupParent"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "loadThemeGoogleFonts": { "alias": "loadThemeGoogleFonts"; "required": false; }; "themeCssLayer": { "alias": "themeCssLayer"; "required": false; }; "styleNonce": { "alias": "styleNonce"; "required": false; }; "themeStyleContainer": { "alias": "themeStyleContainer"; "required": false; }; "getDocument": { "alias": "getDocument"; "required": false; }; "suppressTouch": { "alias": "suppressTouch"; "required": false; }; "localeText": { "alias": "localeText"; "required": false; }; "getLocaleText": { "alias": "getLocaleText"; "required": false; }; "studioId": { "alias": "studioId"; "required": false; }; "context": { "alias": "context"; "required": false; }; "initialState": { "alias": "initialState"; "required": false; }; "data": { "alias": "data"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "ai": { "alias": "ai"; "required": false; }; "overrides": { "alias": "overrides"; "required": false; }; "panels": { "alias": "panels"; "required": false; }; }, { "stateUpdated": "stateUpdated"; "apiReady": "apiReady"; "studioReady": "studioReady"; "errorRaised": "errorRaised"; }, never, never, true, never>;
|
|
151
|
+
static ngAcceptInputType_enableRtl: unknown;
|
|
152
|
+
static ngAcceptInputType_loadThemeGoogleFonts: unknown;
|
|
153
|
+
static ngAcceptInputType_suppressTouch: unknown;
|
|
154
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./ag-studio.component";
|
|
3
|
+
export declare class AgStudioModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AgStudioModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AgStudioModule, never, [typeof i1.AgStudio], [typeof i1.AgStudio]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AgStudioModule>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { NgZone } from '@angular/core';
|
|
2
|
+
import { _VanillaFrameworkOverrides } from 'ag-studio';
|
|
3
|
+
import type { FrameworkOverridesIncomingSource } from 'ag-grid-enterprise';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class AngularFrameworkOverrides extends _VanillaFrameworkOverrides {
|
|
6
|
+
private readonly _ngZone;
|
|
7
|
+
readonly batchFrameworkComps: boolean;
|
|
8
|
+
private readonly isRunningWithinTestZone;
|
|
9
|
+
private readonly runOutside;
|
|
10
|
+
constructor(_ngZone: NgZone);
|
|
11
|
+
wrapIncoming: <T>(callback: () => T, source?: FrameworkOverridesIncomingSource) => T;
|
|
12
|
+
/**
|
|
13
|
+
* The shouldWrapOutgoing property is used to determine if events should be run outside of Angular or not.
|
|
14
|
+
* If an event handler is registered outside of Angular then we should not wrap the event handler
|
|
15
|
+
* with runInsideAngular() as the user may not have wanted this.
|
|
16
|
+
* This is also used to not wrap internal event listeners that are registered with RowNodes and Columns.
|
|
17
|
+
*/
|
|
18
|
+
get shouldWrapOutgoing(): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Make sure that any code that is executed outside of AG Studio is running within the Angular zone.
|
|
21
|
+
* This means users can update templates and use binding without having to do anything extra.
|
|
22
|
+
*/
|
|
23
|
+
wrapOutgoing: <T>(callback: () => T) => T;
|
|
24
|
+
runInsideAngular<T>(callback: () => T): T;
|
|
25
|
+
runOutsideAngular<T>(callback: () => T, source?: FrameworkOverridesIncomingSource): T;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularFrameworkOverrides, never>;
|
|
27
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AngularFrameworkOverrides>;
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ag-studio-angular",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"scripts": {
|
|
6
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
7
|
-
},
|
|
8
|
-
"keywords": [],
|
|
9
|
-
"author": "Sean Landsman <sean@thelandsmans.com>",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "AG Studio Angular Component",
|
|
10
5
|
"license": "Commercial",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
6
|
+
"peerDependencies": {
|
|
7
|
+
"@angular/common": ">= 18.0.0",
|
|
8
|
+
"@angular/core": ">= 18.0.0"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"ag-studio": "1.0.1",
|
|
12
|
+
"tslib": "^2.3.0"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://ag-grid.zendesk.com/"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://www.ag-grid.com/studio/",
|
|
18
|
+
"module": "fesm2022/ag-studio-angular.mjs",
|
|
19
|
+
"typings": "index.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
"./package.json": {
|
|
22
|
+
"default": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./index.d.ts",
|
|
26
|
+
"esm2022": "./esm2022/ag-studio-angular.mjs",
|
|
27
|
+
"esm": "./esm2022/ag-studio-angular.mjs",
|
|
28
|
+
"default": "./fesm2022/ag-studio-angular.mjs"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"sideEffects": false
|
|
32
|
+
}
|
package/public-api.d.ts
ADDED
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
console.log("Hello World");
|