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,67 @@
|
|
|
1
|
+
import { Injectable, NgZone } from '@angular/core';
|
|
2
|
+
import { _VanillaFrameworkOverrides } from 'ag-studio';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class AngularFrameworkOverrides extends _VanillaFrameworkOverrides {
|
|
5
|
+
constructor(_ngZone) {
|
|
6
|
+
super('angular');
|
|
7
|
+
this._ngZone = _ngZone;
|
|
8
|
+
this.batchFrameworkComps = true;
|
|
9
|
+
// Flag used to control Zone behaviour when running tests as many test features rely on Zone.
|
|
10
|
+
this.isRunningWithinTestZone = false;
|
|
11
|
+
// Make all events run outside Angular as they often trigger the setup of event listeners
|
|
12
|
+
// By having the event listeners outside Angular we can avoid triggering change detection
|
|
13
|
+
// This also means that if a user calls an AG Studio API method from within their component
|
|
14
|
+
// the internal side effects will not trigger change detection. Without this the events would
|
|
15
|
+
// run inside Angular and trigger change detection as the source of the event was within the angular zone.
|
|
16
|
+
this.wrapIncoming = (callback, source) => this.runOutside(callback, source);
|
|
17
|
+
/**
|
|
18
|
+
* Make sure that any code that is executed outside of AG Studio is running within the Angular zone.
|
|
19
|
+
* This means users can update templates and use binding without having to do anything extra.
|
|
20
|
+
*/
|
|
21
|
+
this.wrapOutgoing = (callback) => this.runInsideAngular(callback);
|
|
22
|
+
this.isRunningWithinTestZone =
|
|
23
|
+
globalThis?.AG_STUDIO_UNDER_TEST ?? !!globalThis?.Zone?.AsyncTestZoneSpec;
|
|
24
|
+
if (!this._ngZone) {
|
|
25
|
+
this.runOutside = (callback) => callback();
|
|
26
|
+
}
|
|
27
|
+
else if (this.isRunningWithinTestZone) {
|
|
28
|
+
this.runOutside = (callback, source) => {
|
|
29
|
+
if (source === 'resize-observer' || source === 'popupPositioning') {
|
|
30
|
+
// ensure resize observer callbacks are run outside of Angular even under test due to Jest not supporting ResizeObserver
|
|
31
|
+
// which means it just loops continuously with a setTimeout with no way to flush the queue or have fixture.whenStable() resolve.
|
|
32
|
+
return this._ngZone.runOutsideAngular(callback);
|
|
33
|
+
}
|
|
34
|
+
// When under test run inside Angular so that tests can use fixture.whenStable() to wait for async operations to complete.
|
|
35
|
+
return callback();
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
this.runOutside = (callback) => this._ngZone.runOutsideAngular(callback);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The shouldWrapOutgoing property is used to determine if events should be run outside of Angular or not.
|
|
44
|
+
* If an event handler is registered outside of Angular then we should not wrap the event handler
|
|
45
|
+
* with runInsideAngular() as the user may not have wanted this.
|
|
46
|
+
* This is also used to not wrap internal event listeners that are registered with RowNodes and Columns.
|
|
47
|
+
*/
|
|
48
|
+
get shouldWrapOutgoing() {
|
|
49
|
+
return this._ngZone && NgZone.isInAngularZone();
|
|
50
|
+
}
|
|
51
|
+
runInsideAngular(callback) {
|
|
52
|
+
if (!this._ngZone || NgZone.isInAngularZone()) {
|
|
53
|
+
return callback();
|
|
54
|
+
}
|
|
55
|
+
// Check for _ngZone existence as it is not present when Zoneless
|
|
56
|
+
return this._ngZone.run(callback);
|
|
57
|
+
}
|
|
58
|
+
runOutsideAngular(callback, source) {
|
|
59
|
+
return this.runOutside(callback, source);
|
|
60
|
+
}
|
|
61
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AngularFrameworkOverrides, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
62
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AngularFrameworkOverrides }); }
|
|
63
|
+
}
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AngularFrameworkOverrides, decorators: [{
|
|
65
|
+
type: Injectable
|
|
66
|
+
}], ctorParameters: () => [{ type: i0.NgZone }] });
|
|
67
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhckZyYW1ld29ya092ZXJyaWRlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2FnLXN0dWRpby1hbmd1bGFyL3NyYy9saWIvYW5ndWxhckZyYW1ld29ya092ZXJyaWRlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNuRCxPQUFPLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxXQUFXLENBQUM7O0FBS3ZELE1BQU0sT0FBTyx5QkFBMEIsU0FBUSwwQkFBMEI7SUFRckUsWUFBNkIsT0FBZTtRQUN4QyxLQUFLLENBQUMsU0FBUyxDQUFDLENBQUM7UUFEUSxZQUFPLEdBQVAsT0FBTyxDQUFRO1FBUG5CLHdCQUFtQixHQUFZLElBQUksQ0FBQztRQUU3RCw2RkFBNkY7UUFDNUUsNEJBQ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xsYmFjazogKCkgPT4gVCk6IFQge1xuICAgICAgICBpZiAoIXRoaXMuX25nWm9uZSB8fCBOZ1pvbmUuaXNJbkFuZ3VsYXJab25lKCkpIHtcbiAgICAgICAgICAgIHJldHVybiBjYWxsYmFjaygpO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gQ2hlY2sgZm9yIF9uZ1pvbmUgZXhpc3RlbmNlIGFzIGl0IGlzIG5vdCBwcmVzZW50IHdoZW4gWm9uZWxlc3NcbiAgICAgICAgcmV0dXJuIHRoaXMuX25nWm9uZS5ydW4oY2FsbGJhY2spO1xuICAgIH1cblxuICAgIHJ1bk91dHNpZGVBbmd1bGFyPFQ+KGNhbGxiYWNrOiAoKSA9PiBULCBzb3VyY2U/OiBGcmFtZXdvcmtPdmVycmlkZXNJbmNvbWluZ1NvdXJjZSk6IFQge1xuICAgICAgICByZXR1cm4gdGhpcy5ydW5PdXRzaWRlKGNhbGxiYWNrLCBzb3VyY2UpO1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from './lib/ag-studio.component';
|
|
2
|
+
export * from './lib/ag-studio.module';
|
|
3
|
+
export * from './lib/angularFrameworkOverrides';
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2FnLXN0dWRpby1hbmd1bGFyL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsMkJBQTJCLENBQUM7QUFDMUMsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLGlDQUFpQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9saWIvYWctc3R1ZGlvLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9hZy1zdHVkaW8ubW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2FuZ3VsYXJGcmFtZXdvcmtPdmVycmlkZXMnO1xuIl19
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { NgZone, Injectable, EventEmitter, booleanAttribute, Output, Input, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
3
|
+
import { _VanillaFrameworkOverrides, _combineAttributesAndStudioProperties, _createStudio, _processPropertyChanges, _BOOLEAN_MIXED_STUDIO_PROPERTIES } from 'ag-studio';
|
|
4
|
+
|
|
5
|
+
class AngularFrameworkOverrides extends _VanillaFrameworkOverrides {
|
|
6
|
+
constructor(_ngZone) {
|
|
7
|
+
super('angular');
|
|
8
|
+
this._ngZone = _ngZone;
|
|
9
|
+
this.batchFrameworkComps = true;
|
|
10
|
+
// Flag used to control Zone behaviour when running tests as many test features rely on Zone.
|
|
11
|
+
this.isRunningWithinTestZone = false;
|
|
12
|
+
// Make all events run outside Angular as they often trigger the setup of event listeners
|
|
13
|
+
// By having the event listeners outside Angular we can avoid triggering change detection
|
|
14
|
+
// This also means that if a user calls an AG Studio API method from within their component
|
|
15
|
+
// the internal side effects will not trigger change detection. Without this the events would
|
|
16
|
+
// run inside Angular and trigger change detection as the source of the event was within the angular zone.
|
|
17
|
+
this.wrapIncoming = (callback, source) => this.runOutside(callback, source);
|
|
18
|
+
/**
|
|
19
|
+
* Make sure that any code that is executed outside of AG Studio is running within the Angular zone.
|
|
20
|
+
* This means users can update templates and use binding without having to do anything extra.
|
|
21
|
+
*/
|
|
22
|
+
this.wrapOutgoing = (callback) => this.runInsideAngular(callback);
|
|
23
|
+
this.isRunningWithinTestZone =
|
|
24
|
+
globalThis?.AG_STUDIO_UNDER_TEST ?? !!globalThis?.Zone?.AsyncTestZoneSpec;
|
|
25
|
+
if (!this._ngZone) {
|
|
26
|
+
this.runOutside = (callback) => callback();
|
|
27
|
+
}
|
|
28
|
+
else if (this.isRunningWithinTestZone) {
|
|
29
|
+
this.runOutside = (callback, source) => {
|
|
30
|
+
if (source === 'resize-observer' || source === 'popupPositioning') {
|
|
31
|
+
// ensure resize observer callbacks are run outside of Angular even under test due to Jest not supporting ResizeObserver
|
|
32
|
+
// which means it just loops continuously with a setTimeout with no way to flush the queue or have fixture.whenStable() resolve.
|
|
33
|
+
return this._ngZone.runOutsideAngular(callback);
|
|
34
|
+
}
|
|
35
|
+
// When under test run inside Angular so that tests can use fixture.whenStable() to wait for async operations to complete.
|
|
36
|
+
return callback();
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.runOutside = (callback) => this._ngZone.runOutsideAngular(callback);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The shouldWrapOutgoing property is used to determine if events should be run outside of Angular or not.
|
|
45
|
+
* If an event handler is registered outside of Angular then we should not wrap the event handler
|
|
46
|
+
* with runInsideAngular() as the user may not have wanted this.
|
|
47
|
+
* This is also used to not wrap internal event listeners that are registered with RowNodes and Columns.
|
|
48
|
+
*/
|
|
49
|
+
get shouldWrapOutgoing() {
|
|
50
|
+
return this._ngZone && NgZone.isInAngularZone();
|
|
51
|
+
}
|
|
52
|
+
runInsideAngular(callback) {
|
|
53
|
+
if (!this._ngZone || NgZone.isInAngularZone()) {
|
|
54
|
+
return callback();
|
|
55
|
+
}
|
|
56
|
+
// Check for _ngZone existence as it is not present when Zoneless
|
|
57
|
+
return this._ngZone.run(callback);
|
|
58
|
+
}
|
|
59
|
+
runOutsideAngular(callback, source) {
|
|
60
|
+
return this.runOutside(callback, source);
|
|
61
|
+
}
|
|
62
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AngularFrameworkOverrides, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
63
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AngularFrameworkOverrides }); }
|
|
64
|
+
}
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AngularFrameworkOverrides, decorators: [{
|
|
66
|
+
type: Injectable
|
|
67
|
+
}], ctorParameters: () => [{ type: i0.NgZone }] });
|
|
68
|
+
|
|
69
|
+
/* eslint-disable no-duplicate-imports */
|
|
70
|
+
// False positive lint error, ElementRef and co can't be type imports
|
|
71
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
72
|
+
class AgStudio {
|
|
73
|
+
constructor(elementDef, _angularFrameworkOverrides) {
|
|
74
|
+
this._angularFrameworkOverrides = _angularFrameworkOverrides;
|
|
75
|
+
this._initialised = false;
|
|
76
|
+
this._destroyed = false;
|
|
77
|
+
// in order to ensure firing of apiReady is deterministic
|
|
78
|
+
this._holdEvents = true;
|
|
79
|
+
this._fullyReady = new Promise((resolve) => {
|
|
80
|
+
this._resolveFullyReady = resolve;
|
|
81
|
+
});
|
|
82
|
+
// @START@
|
|
83
|
+
/** Change this value to set the tabIndex order of Studio within your application.
|
|
84
|
+
* @default 0
|
|
85
|
+
* @initial
|
|
86
|
+
*/
|
|
87
|
+
this.tabIndex = undefined;
|
|
88
|
+
/** Set to `true` to operate Studio in RTL (Right to Left) mode.
|
|
89
|
+
* @default false
|
|
90
|
+
* @initial
|
|
91
|
+
*/
|
|
92
|
+
this.enableRtl = undefined;
|
|
93
|
+
/** DOM element to use as the popup parent for Studio popups (context menus, etc.).
|
|
94
|
+
*/
|
|
95
|
+
this.popupParent = undefined;
|
|
96
|
+
/** Theme to apply to Studio.
|
|
97
|
+
*
|
|
98
|
+
* @default studioTheme
|
|
99
|
+
*/
|
|
100
|
+
this.theme = undefined;
|
|
101
|
+
/** If your theme uses a font that is available on Google Fonts, pass true to load it from Google's CDN.
|
|
102
|
+
*/
|
|
103
|
+
this.loadThemeGoogleFonts = undefined;
|
|
104
|
+
/** The CSS layer that this theme should be rendered onto. When specified,
|
|
105
|
+
* Studio CSS will be wrapped in a `@layer ${themeCssLayer} { ... }` block.
|
|
106
|
+
*
|
|
107
|
+
* NOTE: when specifying `themeCssLayer` we recommend setting
|
|
108
|
+
* `themeStyleContainer` to `document.body` to ensure that Studio CSS
|
|
109
|
+
* comes after your application CSS, allowing your application to set the
|
|
110
|
+
* order of layers.
|
|
111
|
+
*
|
|
112
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@layer
|
|
113
|
+
*/
|
|
114
|
+
this.themeCssLayer = undefined;
|
|
115
|
+
/** The nonce attribute to set on style elements added to the document by
|
|
116
|
+
* themes. If "foo" is passed to this property, Studio can use the Content
|
|
117
|
+
* Security Policy `style-src 'nonce-foo'`, instead of the less secure
|
|
118
|
+
* `style-src 'unsafe-inline'`.
|
|
119
|
+
*
|
|
120
|
+
* Note: CSP nonces are global to a page, where a page has multiple Studio components,
|
|
121
|
+
* every one must have the same styleNonce set.
|
|
122
|
+
*/
|
|
123
|
+
this.styleNonce = undefined;
|
|
124
|
+
/** An element to insert style elements into when injecting styles into the
|
|
125
|
+
* Studio. Styles are inserted at the start of the element.
|
|
126
|
+
*
|
|
127
|
+
* If undefined, styles will be added to the document head for Studio components
|
|
128
|
+
* rendered in the main document fragment, or to Studio wrapper element
|
|
129
|
+
* for other Studio components (e.g. those rendered in a shadow DOM or detached from the
|
|
130
|
+
* document).
|
|
131
|
+
*
|
|
132
|
+
* @initial
|
|
133
|
+
*/
|
|
134
|
+
this.themeStyleContainer = undefined;
|
|
135
|
+
/** Allows overriding what `document` is used.
|
|
136
|
+
* Use this when you want Studio to use a different `document` than the one available on the global scope.
|
|
137
|
+
* This can happen if docking out components (something which Electron supports).
|
|
138
|
+
*/
|
|
139
|
+
this.getDocument = undefined;
|
|
140
|
+
/** Disables touch support (but does not remove the browser's efforts to simulate mouse events on touch).
|
|
141
|
+
* @default false
|
|
142
|
+
* @initial
|
|
143
|
+
*/
|
|
144
|
+
this.suppressTouch = undefined;
|
|
145
|
+
/** A map of key->value pairs for localising text within Studio.
|
|
146
|
+
* @initial
|
|
147
|
+
*/
|
|
148
|
+
this.localeText = undefined;
|
|
149
|
+
/** A callback for localising text within Studio.
|
|
150
|
+
* @initial
|
|
151
|
+
*/
|
|
152
|
+
this.getLocaleText = undefined;
|
|
153
|
+
/** 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.
|
|
154
|
+
* @initial
|
|
155
|
+
*/
|
|
156
|
+
this.studioId = undefined;
|
|
157
|
+
/** Provides a context object that is provided to different callbacks Studio uses. Used for passing additional information to the callbacks used by your application.
|
|
158
|
+
* @initial
|
|
159
|
+
*/
|
|
160
|
+
this.context = undefined;
|
|
161
|
+
/** Initial state for Studio. Only read once on initialization. Can be used in conjunction with `api.getState()` to save and restore Studio state.
|
|
162
|
+
* @initial
|
|
163
|
+
*/
|
|
164
|
+
this.initialState = undefined;
|
|
165
|
+
/** Defines the data sources used by Studio.
|
|
166
|
+
*
|
|
167
|
+
* If updated after initially being set, only changes to synchronous data will be processed.
|
|
168
|
+
* Any other changes will be ignored (e.g. adding/removing data sources, updating fields, etc.)
|
|
169
|
+
*/
|
|
170
|
+
this.data = undefined;
|
|
171
|
+
/** Which mode Studio is in.
|
|
172
|
+
* @default 'view'
|
|
173
|
+
*/
|
|
174
|
+
this.mode = undefined;
|
|
175
|
+
/** Default layout styling.
|
|
176
|
+
*/
|
|
177
|
+
this.layout = undefined;
|
|
178
|
+
/** AI Assistant configuration.
|
|
179
|
+
*
|
|
180
|
+
* NOTE: The **AI Assistant** is an experimental feature. Behaviour will be
|
|
181
|
+
* slightly different depending on the LLM being used, and results can vary across queries.
|
|
182
|
+
*
|
|
183
|
+
* @initial
|
|
184
|
+
*/
|
|
185
|
+
this.ai = undefined;
|
|
186
|
+
/** Overrides for the layout and widget configs.
|
|
187
|
+
*/
|
|
188
|
+
this.overrides = undefined;
|
|
189
|
+
/** Configure which panels are displayed and on which side.
|
|
190
|
+
*/
|
|
191
|
+
this.panels = undefined;
|
|
192
|
+
/** State has been updated.
|
|
193
|
+
*/
|
|
194
|
+
this.stateUpdated = new EventEmitter();
|
|
195
|
+
/** 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.
|
|
196
|
+
*/
|
|
197
|
+
this.apiReady = new EventEmitter();
|
|
198
|
+
/** The data engine has been initialised, and the UI has been created, but may not be fully rendered yet.
|
|
199
|
+
*/
|
|
200
|
+
this.studioReady = new EventEmitter();
|
|
201
|
+
/** An error has occurred within Studio.
|
|
202
|
+
*/
|
|
203
|
+
this.errorRaised = new EventEmitter();
|
|
204
|
+
this._nativeElement = elementDef.nativeElement;
|
|
205
|
+
// NOSONAR
|
|
206
|
+
this._fullyReady.then(() => {
|
|
207
|
+
// Register the status flag reset before any events are fired
|
|
208
|
+
// so that we can swap to synchronous event firing as soon as the studio is ready
|
|
209
|
+
this._holdEvents = false;
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
ngAfterViewInit() {
|
|
213
|
+
// Run the setup outside of angular so all the event handlers that are created do not trigger change detection
|
|
214
|
+
this._angularFrameworkOverrides.runOutsideAngular(() => {
|
|
215
|
+
// Get all the inputs that are valid AgStudioProperties
|
|
216
|
+
const studioPropertiesKeys = Object.keys(this).filter((key) => !(key.startsWith('_') ||
|
|
217
|
+
key == 'studioProperties' ||
|
|
218
|
+
key == 'modules' ||
|
|
219
|
+
this[key] instanceof EventEmitter));
|
|
220
|
+
const coercedStudioProperties = {};
|
|
221
|
+
for (const key of studioPropertiesKeys) {
|
|
222
|
+
const valueToUse = getValueOrCoercedValue(key, this[key]);
|
|
223
|
+
coercedStudioProperties[key] = valueToUse;
|
|
224
|
+
}
|
|
225
|
+
const mergedStudioProperties = _combineAttributesAndStudioProperties(this.studioProperties, coercedStudioProperties, studioPropertiesKeys);
|
|
226
|
+
const studioParams = {
|
|
227
|
+
globalListener: this.globalListener.bind(this),
|
|
228
|
+
frameworkOverrides: this._angularFrameworkOverrides,
|
|
229
|
+
setThemeOnRootDiv: true,
|
|
230
|
+
modules: this.modules,
|
|
231
|
+
};
|
|
232
|
+
const api = _createStudio(this._nativeElement, mergedStudioProperties, studioParams);
|
|
233
|
+
if (api) {
|
|
234
|
+
this.api = api;
|
|
235
|
+
}
|
|
236
|
+
this._initialised = true;
|
|
237
|
+
// sometimes, especially in large client apps apiReady can fire before ngAfterViewInit
|
|
238
|
+
// this ties these together so that apiReady will always fire after agStudio's ngAfterViewInit
|
|
239
|
+
// the actual containing component's ngAfterViewInit will fire just after agStudio's
|
|
240
|
+
this._resolveFullyReady();
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
ngOnChanges(changes) {
|
|
244
|
+
if (this._initialised) {
|
|
245
|
+
// Run the changes outside of angular so any event handlers that are created do not trigger change detection
|
|
246
|
+
this._angularFrameworkOverrides.runOutsideAngular(() => {
|
|
247
|
+
const studioProperties = {};
|
|
248
|
+
for (const key of Object.keys(changes)) {
|
|
249
|
+
const value = changes[key];
|
|
250
|
+
studioProperties[key] = value.currentValue;
|
|
251
|
+
}
|
|
252
|
+
_processPropertyChanges(studioProperties, this.api);
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
ngOnDestroy() {
|
|
257
|
+
if (this._initialised) {
|
|
258
|
+
// need to do this before the destroy, so we know not to emit any events
|
|
259
|
+
// while tearing down the studio.
|
|
260
|
+
this._destroyed = true;
|
|
261
|
+
// could be null if studio failed to initialise
|
|
262
|
+
this.api?.destroy();
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
// we'll emit the emit if a user is listening for a given event either on the component via normal angular binding
|
|
266
|
+
// or via studioProperties
|
|
267
|
+
isEmitterUsed(eventType) {
|
|
268
|
+
const emitter = this[eventType];
|
|
269
|
+
// For RxJs compatibility we need to check for observed v7+ or observers v6
|
|
270
|
+
const emitterAny = emitter;
|
|
271
|
+
const hasEmitter = emitterAny?.observed ?? emitterAny?.observers?.length > 0;
|
|
272
|
+
// apiReady => onApiReady
|
|
273
|
+
const asEventName = `on${eventType.charAt(0).toUpperCase()}${eventType.substring(1)}`;
|
|
274
|
+
const hasStudioPropertyListener = !!this.studioProperties && !!this.studioProperties[asEventName];
|
|
275
|
+
return hasEmitter || hasStudioPropertyListener;
|
|
276
|
+
}
|
|
277
|
+
globalListener(eventType, event) {
|
|
278
|
+
// if we are tearing down, don't emit angular events, as this causes
|
|
279
|
+
// problems with the angular router
|
|
280
|
+
if (this._destroyed) {
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
// generically look up the eventType
|
|
284
|
+
const emitter = this[eventType];
|
|
285
|
+
if (emitter && this.isEmitterUsed(eventType)) {
|
|
286
|
+
// Make sure we emit within the angular zone, so change detection works properly
|
|
287
|
+
const fireEmitter = () => this._angularFrameworkOverrides.runInsideAngular(() => emitter.emit(event));
|
|
288
|
+
if (this._holdEvents) {
|
|
289
|
+
// if the user is listening to events, wait for ngAfterViewInit to fire first, then emit the studio events
|
|
290
|
+
this._fullyReady.then(() => fireEmitter());
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
fireEmitter();
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgStudio, deps: [{ token: i0.ElementRef }, { token: AngularFrameworkOverrides }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
298
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.14", type: AgStudio, isStandalone: true, selector: "ag-studio", inputs: { studioProperties: "studioProperties", modules: "modules", tabIndex: "tabIndex", enableRtl: ["enableRtl", "enableRtl", booleanAttribute], popupParent: "popupParent", theme: "theme", loadThemeGoogleFonts: ["loadThemeGoogleFonts", "loadThemeGoogleFonts", booleanAttribute], themeCssLayer: "themeCssLayer", styleNonce: "styleNonce", themeStyleContainer: "themeStyleContainer", getDocument: "getDocument", suppressTouch: ["suppressTouch", "suppressTouch", booleanAttribute], localeText: "localeText", getLocaleText: "getLocaleText", studioId: "studioId", context: "context", initialState: "initialState", data: "data", mode: "mode", layout: "layout", ai: "ai", overrides: "overrides", panels: "panels" }, outputs: { stateUpdated: "stateUpdated", apiReady: "apiReady", studioReady: "studioReady", errorRaised: "errorRaised" }, providers: [AngularFrameworkOverrides], usesOnChanges: true, ngImport: i0, template: '', isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
|
|
299
|
+
}
|
|
300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgStudio, decorators: [{
|
|
301
|
+
type: Component,
|
|
302
|
+
args: [{
|
|
303
|
+
selector: 'ag-studio',
|
|
304
|
+
standalone: true,
|
|
305
|
+
template: '',
|
|
306
|
+
providers: [AngularFrameworkOverrides],
|
|
307
|
+
// tell angular we don't want view encapsulation, we don't want a shadow root
|
|
308
|
+
encapsulation: ViewEncapsulation.None,
|
|
309
|
+
}]
|
|
310
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: AngularFrameworkOverrides }], propDecorators: { studioProperties: [{
|
|
311
|
+
type: Input
|
|
312
|
+
}], modules: [{
|
|
313
|
+
type: Input
|
|
314
|
+
}], tabIndex: [{
|
|
315
|
+
type: Input
|
|
316
|
+
}], enableRtl: [{
|
|
317
|
+
type: Input,
|
|
318
|
+
args: [{ transform: booleanAttribute }]
|
|
319
|
+
}], popupParent: [{
|
|
320
|
+
type: Input
|
|
321
|
+
}], theme: [{
|
|
322
|
+
type: Input
|
|
323
|
+
}], loadThemeGoogleFonts: [{
|
|
324
|
+
type: Input,
|
|
325
|
+
args: [{ transform: booleanAttribute }]
|
|
326
|
+
}], themeCssLayer: [{
|
|
327
|
+
type: Input
|
|
328
|
+
}], styleNonce: [{
|
|
329
|
+
type: Input
|
|
330
|
+
}], themeStyleContainer: [{
|
|
331
|
+
type: Input
|
|
332
|
+
}], getDocument: [{
|
|
333
|
+
type: Input
|
|
334
|
+
}], suppressTouch: [{
|
|
335
|
+
type: Input,
|
|
336
|
+
args: [{ transform: booleanAttribute }]
|
|
337
|
+
}], localeText: [{
|
|
338
|
+
type: Input
|
|
339
|
+
}], getLocaleText: [{
|
|
340
|
+
type: Input
|
|
341
|
+
}], studioId: [{
|
|
342
|
+
type: Input
|
|
343
|
+
}], context: [{
|
|
344
|
+
type: Input
|
|
345
|
+
}], initialState: [{
|
|
346
|
+
type: Input
|
|
347
|
+
}], data: [{
|
|
348
|
+
type: Input
|
|
349
|
+
}], mode: [{
|
|
350
|
+
type: Input
|
|
351
|
+
}], layout: [{
|
|
352
|
+
type: Input
|
|
353
|
+
}], ai: [{
|
|
354
|
+
type: Input
|
|
355
|
+
}], overrides: [{
|
|
356
|
+
type: Input
|
|
357
|
+
}], panels: [{
|
|
358
|
+
type: Input
|
|
359
|
+
}], stateUpdated: [{
|
|
360
|
+
type: Output
|
|
361
|
+
}], apiReady: [{
|
|
362
|
+
type: Output
|
|
363
|
+
}], studioReady: [{
|
|
364
|
+
type: Output
|
|
365
|
+
}], errorRaised: [{
|
|
366
|
+
type: Output
|
|
367
|
+
}] } });
|
|
368
|
+
const booleanMixedStudioProperties = new Set(_BOOLEAN_MIXED_STUDIO_PROPERTIES);
|
|
369
|
+
/**
|
|
370
|
+
* Used to support the user setting combined boolean and string / object properties
|
|
371
|
+
* as plain HTML attributes and us correctly mapping that to true.
|
|
372
|
+
* For example cellSection can be boolean or an object
|
|
373
|
+
*/
|
|
374
|
+
function getValueOrCoercedValue(key, valueToUse) {
|
|
375
|
+
if (booleanMixedStudioProperties.has(key)) {
|
|
376
|
+
// Handle plain HTML boolean attributes and convert them to boolean values
|
|
377
|
+
// Also handle the false string case to match Angular boolean attributes
|
|
378
|
+
// eslint-disable-next-line sonarjs/no-nested-conditional
|
|
379
|
+
return valueToUse === '' ? true : valueToUse === 'false' ? false : valueToUse;
|
|
380
|
+
}
|
|
381
|
+
return valueToUse;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
class AgStudioModule {
|
|
385
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgStudioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
386
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: AgStudioModule, imports: [AgStudio], exports: [AgStudio] }); }
|
|
387
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgStudioModule }); }
|
|
388
|
+
}
|
|
389
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgStudioModule, decorators: [{
|
|
390
|
+
type: NgModule,
|
|
391
|
+
args: [{
|
|
392
|
+
imports: [AgStudio],
|
|
393
|
+
exports: [AgStudio],
|
|
394
|
+
}]
|
|
395
|
+
}] });
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Generated bundle index. Do not edit.
|
|
399
|
+
*/
|
|
400
|
+
|
|
401
|
+
export { AgStudio, AgStudioModule, AngularFrameworkOverrides };
|
|
402
|
+
//# sourceMappingURL=ag-studio-angular.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ag-studio-angular.mjs","sources":["../../../projects/ag-studio-angular/src/lib/angularFrameworkOverrides.ts","../../../projects/ag-studio-angular/src/lib/ag-studio.component.ts","../../../projects/ag-studio-angular/src/lib/ag-studio.module.ts","../../../projects/ag-studio-angular/src/ag-studio-angular.ts"],"sourcesContent":["import { Injectable, NgZone } from '@angular/core';\nimport { _VanillaFrameworkOverrides } from 'ag-studio';\n\nimport type { FrameworkOverridesIncomingSource } from 'ag-grid-enterprise';\n\n@Injectable()\nexport class AngularFrameworkOverrides extends _VanillaFrameworkOverrides {\n public override readonly batchFrameworkComps: boolean = true;\n\n // Flag used to control Zone behaviour when running tests as many test features rely on Zone.\n private readonly isRunningWithinTestZone: boolean = false;\n\n private readonly runOutside: <T>(callback: () => T, source?: FrameworkOverridesIncomingSource) => T;\n\n constructor(private readonly _ngZone: NgZone) {\n super('angular');\n\n this.isRunningWithinTestZone =\n (globalThis as any)?.AG_STUDIO_UNDER_TEST ?? !!(globalThis as any)?.Zone?.AsyncTestZoneSpec;\n\n if (!this._ngZone) {\n this.runOutside = (callback) => callback();\n } else if (this.isRunningWithinTestZone) {\n this.runOutside = (callback, source) => {\n if (source === 'resize-observer' || source === 'popupPositioning') {\n // ensure resize observer callbacks are run outside of Angular even under test due to Jest not supporting ResizeObserver\n // which means it just loops continuously with a setTimeout with no way to flush the queue or have fixture.whenStable() resolve.\n return this._ngZone.runOutsideAngular(callback);\n }\n // When under test run inside Angular so that tests can use fixture.whenStable() to wait for async operations to complete.\n return callback();\n };\n } else {\n this.runOutside = (callback) => this._ngZone.runOutsideAngular(callback);\n }\n }\n\n // Make all events run outside Angular as they often trigger the setup of event listeners\n // By having the event listeners outside Angular we can avoid triggering change detection\n // This also means that if a user calls an AG Studio API method from within their component\n // the internal side effects will not trigger change detection. Without this the events would\n // run inside Angular and trigger change detection as the source of the event was within the angular zone.\n override wrapIncoming: <T>(callback: () => T, source?: FrameworkOverridesIncomingSource) => T = (\n callback,\n source\n ) => this.runOutside(callback, source);\n\n /**\n * The shouldWrapOutgoing property is used to determine if events should be run outside of Angular or not.\n * If an event handler is registered outside of Angular then we should not wrap the event handler\n * with runInsideAngular() as the user may not have wanted this.\n * This is also used to not wrap internal event listeners that are registered with RowNodes and Columns.\n */\n public get shouldWrapOutgoing() {\n return this._ngZone && NgZone.isInAngularZone();\n }\n\n /**\n * Make sure that any code that is executed outside of AG Studio is running within the Angular zone.\n * This means users can update templates and use binding without having to do anything extra.\n */\n override wrapOutgoing: <T>(callback: () => T) => T = (callback) => this.runInsideAngular(callback);\n\n runInsideAngular<T>(callback: () => T): T {\n if (!this._ngZone || NgZone.isInAngularZone()) {\n return callback();\n }\n\n // Check for _ngZone existence as it is not present when Zoneless\n return this._ngZone.run(callback);\n }\n\n runOutsideAngular<T>(callback: () => T, source?: FrameworkOverridesIncomingSource): T {\n return this.runOutside(callback, source);\n }\n}\n","/* eslint-disable no-duplicate-imports */\n// False positive lint error, ElementRef and co can't be type imports\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\nimport {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n ViewEncapsulation,\n booleanAttribute,\n} from '@angular/core';\nimport type { AgStudioApi, AgStudioModule, AgStudioProperties, _StudioParams } from 'ag-studio';\nimport {\n _BOOLEAN_MIXED_STUDIO_PROPERTIES,\n _combineAttributesAndStudioProperties,\n _createStudio,\n _processPropertyChanges,\n} from 'ag-studio';\n// @START_IMPORTS@\nimport type {\n AgAiAssistant,\n AgDataEngine,\n AgDataSourcesDefinition,\n AgPageLayoutState,\n AgPanelConfig,\n AgReportState,\n AgStudioApiReadyEvent,\n AgStudioErrorRaisedEvent,\n AgStudioGetLocaleTextParams,\n AgStudioLocaleText,\n AgStudioMode,\n AgStudioOverrides,\n AgStudioReadyEvent,\n AgStudioStateUpdatedEvent,\n AgStudioTheme,\n} from 'ag-studio';\n\n// @END_IMPORTS@\n\nimport { AngularFrameworkOverrides } from './angularFrameworkOverrides';\n\n@Component({\n selector: 'ag-studio',\n standalone: true,\n template: '',\n providers: [AngularFrameworkOverrides],\n // tell angular we don't want view encapsulation, we don't want a shadow root\n encapsulation: ViewEncapsulation.None,\n})\nexport class AgStudio implements AfterViewInit, OnChanges, OnDestroy {\n // not intended for user to interact with. so putting _ in so if user gets reference\n // to this object, they kind'a know it's not part of the agreed interface\n private readonly _nativeElement: any;\n private _initialised = false;\n private _destroyed = false;\n\n // in order to ensure firing of apiReady is deterministic\n private _holdEvents = true;\n private _resolveFullyReady: () => void;\n private readonly _fullyReady: Promise<void> = new Promise((resolve) => {\n this._resolveFullyReady = resolve;\n });\n\n /** Dash Api available after onApiReady event has fired. */\n public api: AgStudioApi;\n\n constructor(\n elementDef: ElementRef,\n private readonly _angularFrameworkOverrides: AngularFrameworkOverrides\n ) {\n this._nativeElement = elementDef.nativeElement;\n // NOSONAR\n this._fullyReady.then(() => {\n // Register the status flag reset before any events are fired\n // so that we can swap to synchronous event firing as soon as the studio is ready\n this._holdEvents = false;\n });\n }\n\n ngAfterViewInit(): void {\n // Run the setup outside of angular so all the event handlers that are created do not trigger change detection\n this._angularFrameworkOverrides.runOutsideAngular(() => {\n // Get all the inputs that are valid AgStudioProperties\n const studioPropertiesKeys = Object.keys(this).filter(\n (key) =>\n !(\n key.startsWith('_') ||\n key == 'studioProperties' ||\n key == 'modules' ||\n this[key as keyof AgStudio] instanceof EventEmitter\n )\n );\n\n const coercedStudioProperties = {} as AgStudioProperties;\n for (const key of studioPropertiesKeys) {\n const valueToUse = getValueOrCoercedValue(key, this[key as keyof AgStudio]);\n coercedStudioProperties[key as keyof AgStudioProperties] = valueToUse;\n }\n\n const mergedStudioProperties = _combineAttributesAndStudioProperties(\n this.studioProperties,\n coercedStudioProperties,\n studioPropertiesKeys\n );\n\n const studioParams: _StudioParams = {\n globalListener: this.globalListener.bind(this),\n frameworkOverrides: this._angularFrameworkOverrides,\n setThemeOnRootDiv: true,\n modules: this.modules,\n };\n\n const api = _createStudio(this._nativeElement, mergedStudioProperties, studioParams);\n if (api) {\n this.api = api;\n }\n\n this._initialised = true;\n\n // sometimes, especially in large client apps apiReady can fire before ngAfterViewInit\n // this ties these together so that apiReady will always fire after agStudio's ngAfterViewInit\n // the actual containing component's ngAfterViewInit will fire just after agStudio's\n this._resolveFullyReady();\n });\n }\n\n public ngOnChanges(changes: any): void {\n if (this._initialised) {\n // Run the changes outside of angular so any event handlers that are created do not trigger change detection\n this._angularFrameworkOverrides.runOutsideAngular(() => {\n const studioProperties: AgStudioProperties = {};\n for (const key of Object.keys(changes)) {\n const value = changes[key];\n studioProperties[key as keyof AgStudioProperties] = value.currentValue;\n }\n _processPropertyChanges(studioProperties, this.api);\n });\n }\n }\n\n public ngOnDestroy(): void {\n if (this._initialised) {\n // need to do this before the destroy, so we know not to emit any events\n // while tearing down the studio.\n this._destroyed = true;\n // could be null if studio failed to initialise\n this.api?.destroy();\n }\n }\n\n // we'll emit the emit if a user is listening for a given event either on the component via normal angular binding\n // or via studioProperties\n protected isEmitterUsed(eventType: string): boolean {\n const emitter = <EventEmitter<any>>(<any>this)[eventType];\n // For RxJs compatibility we need to check for observed v7+ or observers v6\n const emitterAny = emitter as any;\n const hasEmitter = emitterAny?.observed ?? emitterAny?.observers?.length > 0;\n\n // apiReady => onApiReady\n const asEventName = `on${eventType.charAt(0).toUpperCase()}${eventType.substring(1)}`;\n const hasStudioPropertyListener = !!this.studioProperties && !!(this.studioProperties as any)[asEventName];\n\n return hasEmitter || hasStudioPropertyListener;\n }\n\n private globalListener(eventType: string, event: any): void {\n // if we are tearing down, don't emit angular events, as this causes\n // problems with the angular router\n if (this._destroyed) {\n return;\n }\n\n // generically look up the eventType\n const emitter = <EventEmitter<any>>(<any>this)[eventType];\n if (emitter && this.isEmitterUsed(eventType)) {\n // Make sure we emit within the angular zone, so change detection works properly\n const fireEmitter = () => this._angularFrameworkOverrides.runInsideAngular(() => emitter.emit(event));\n\n if (this._holdEvents) {\n // if the user is listening to events, wait for ngAfterViewInit to fire first, then emit the studio events\n this._fullyReady.then(() => fireEmitter());\n } else {\n fireEmitter();\n }\n }\n }\n\n /** 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. */\n @Input() public studioProperties: AgStudioProperties | undefined;\n /**\n * Used to register AG Studio Modules directly with this instance of Studio.\n */\n @Input() public modules: AgStudioModule[] | undefined;\n\n // @START@\n /** Change this value to set the tabIndex order of Studio within your application.\n * @default 0\n * @initial\n */\n @Input() public tabIndex: number | undefined = undefined;\n /** Set to `true` to operate Studio in RTL (Right to Left) mode.\n * @default false\n * @initial\n */\n @Input({ transform: booleanAttribute }) public enableRtl: boolean | undefined = undefined;\n /** DOM element to use as the popup parent for Studio popups (context menus, etc.).\n */\n @Input() public popupParent: HTMLElement | null | undefined = undefined;\n /** Theme to apply to Studio.\n *\n * @default studioTheme\n */\n @Input() public theme: AgStudioTheme | undefined = undefined;\n /** If your theme uses a font that is available on Google Fonts, pass true to load it from Google's CDN.\n */\n @Input({ transform: booleanAttribute }) public loadThemeGoogleFonts: boolean | undefined = undefined;\n /** The CSS layer that this theme should be rendered onto. When specified,\n * Studio CSS will be wrapped in a `@layer ${themeCssLayer} { ... }` block.\n *\n * NOTE: when specifying `themeCssLayer` we recommend setting\n * `themeStyleContainer` to `document.body` to ensure that Studio CSS\n * comes after your application CSS, allowing your application to set the\n * order of layers.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@layer\n */\n @Input() public themeCssLayer: string | undefined = undefined;\n /** The nonce attribute to set on style elements added to the document by\n * themes. If \"foo\" is passed to this property, Studio can use the Content\n * Security Policy `style-src 'nonce-foo'`, instead of the less secure\n * `style-src 'unsafe-inline'`.\n *\n * Note: CSP nonces are global to a page, where a page has multiple Studio components,\n * every one must have the same styleNonce set.\n */\n @Input() public styleNonce: string | undefined = undefined;\n /** An element to insert style elements into when injecting styles into the\n * Studio. Styles are inserted at the start of the element.\n *\n * If undefined, styles will be added to the document head for Studio components\n * rendered in the main document fragment, or to Studio wrapper element\n * for other Studio components (e.g. those rendered in a shadow DOM or detached from the\n * document).\n *\n * @initial\n */\n @Input() public themeStyleContainer: (HTMLElement | (() => HTMLElement | void)) | undefined = undefined;\n /** Allows overriding what `document` is used.\n * Use this when you want Studio to use a different `document` than the one available on the global scope.\n * This can happen if docking out components (something which Electron supports).\n */\n @Input() public getDocument: (() => Document) | undefined = undefined;\n /** Disables touch support (but does not remove the browser's efforts to simulate mouse events on touch).\n * @default false\n * @initial\n */\n @Input({ transform: booleanAttribute }) public suppressTouch: boolean | undefined = undefined;\n /** A map of key->value pairs for localising text within Studio.\n * @initial\n */\n @Input() public localeText: AgStudioLocaleText | undefined = undefined;\n /** A callback for localising text within Studio.\n * @initial\n */\n @Input() public getLocaleText: ((params: AgStudioGetLocaleTextParams) => string) | undefined = undefined;\n /** 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.\n * @initial\n */\n @Input() public studioId: string | undefined = undefined;\n /** Provides a context object that is provided to different callbacks Studio uses. Used for passing additional information to the callbacks used by your application.\n * @initial\n */\n @Input() public context: any = undefined;\n /** Initial state for Studio. Only read once on initialization. Can be used in conjunction with `api.getState()` to save and restore Studio state.\n * @initial\n */\n @Input() public initialState: AgReportState | undefined = undefined;\n /** Defines the data sources used by Studio.\n *\n * If updated after initially being set, only changes to synchronous data will be processed.\n * Any other changes will be ignored (e.g. adding/removing data sources, updating fields, etc.)\n */\n @Input() public data: AgDataSourcesDefinition | AgDataEngine | undefined = undefined;\n /** Which mode Studio is in.\n * @default 'view'\n */\n @Input() public mode: AgStudioMode | undefined = undefined;\n /** Default layout styling.\n */\n @Input() public layout: Partial<AgPageLayoutState> | undefined = undefined;\n /** AI Assistant configuration.\n *\n * NOTE: The **AI Assistant** is an experimental feature. Behaviour will be\n * slightly different depending on the LLM being used, and results can vary across queries.\n *\n * @initial\n */\n @Input() public ai: AgAiAssistant | undefined = undefined;\n /** Overrides for the layout and widget configs.\n */\n @Input() public overrides: AgStudioOverrides | undefined = undefined;\n /** Configure which panels are displayed and on which side.\n */\n @Input() public panels: AgPanelConfig | undefined = undefined;\n\n /** State has been updated.\n */\n @Output() public stateUpdated: EventEmitter<AgStudioStateUpdatedEvent> =\n new EventEmitter<AgStudioStateUpdatedEvent>();\n /** 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.\n */\n @Output() public apiReady: EventEmitter<AgStudioApiReadyEvent> = new EventEmitter<AgStudioApiReadyEvent>();\n /** The data engine has been initialised, and the UI has been created, but may not be fully rendered yet.\n */\n @Output() public studioReady: EventEmitter<AgStudioReadyEvent> = new EventEmitter<AgStudioReadyEvent>();\n /** An error has occurred within Studio.\n */\n @Output() public errorRaised: EventEmitter<AgStudioErrorRaisedEvent> = new EventEmitter<AgStudioErrorRaisedEvent>();\n\n // @END@\n}\n\nconst booleanMixedStudioProperties = new Set<string>(_BOOLEAN_MIXED_STUDIO_PROPERTIES);\n/**\n * Used to support the user setting combined boolean and string / object properties\n * as plain HTML attributes and us correctly mapping that to true.\n * For example cellSection can be boolean or an object\n */\nfunction getValueOrCoercedValue(key: string, valueToUse: any): any {\n if (booleanMixedStudioProperties.has(key)) {\n // Handle plain HTML boolean attributes and convert them to boolean values\n // Also handle the false string case to match Angular boolean attributes\n // eslint-disable-next-line sonarjs/no-nested-conditional\n return valueToUse === '' ? true : valueToUse === 'false' ? false : valueToUse;\n }\n return valueToUse;\n}\n","import { NgModule } from '@angular/core';\n\nimport { AgStudio } from './ag-studio.component';\n\n@NgModule({\n imports: [AgStudio],\n exports: [AgStudio],\n})\nexport class AgStudioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.AngularFrameworkOverrides"],"mappings":";;;;AAMM,MAAO,yBAA0B,SAAQ,0BAA0B,CAAA;AAQrE,IAAA,WAAA,CAA6B,OAAe,EAAA;QACxC,KAAK,CAAC,SAAS,CAAC;QADS,IAAA,CAAA,OAAO,GAAP,OAAO;QAPX,IAAA,CAAA,mBAAmB,GAAY,IAAI;;QAG3C,IAAA,CAAA,uBAAuB,GAAY,KAAK;;;;;;AAgChD,QAAA,IAAA,CAAA,YAAY,GAA2E,CAC5F,QAAQ,EACR,MAAM,KACL,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC;AAYtC;;;AAGG;AACM,QAAA,IAAA,CAAA,YAAY,GAAgC,CAAC,QAAQ,KAAK,IAAI,CAAC,gBAAgB,CAAC,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