intelica-library-components 1.1.159 → 1.1.161
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.
|
@@ -6164,9 +6164,28 @@ class Shared {
|
|
|
6164
6164
|
});
|
|
6165
6165
|
}
|
|
6166
6166
|
async embedDashboard(command, container, options) {
|
|
6167
|
+
container.replaceChildren();
|
|
6167
6168
|
const embedUrl = await firstValueFrom(this.getEmbedUrl(command));
|
|
6168
6169
|
await this.createEmbedContext(embedUrl, container, options);
|
|
6169
6170
|
}
|
|
6171
|
+
async embedDashboardInteractive(command, container, options) {
|
|
6172
|
+
container.replaceChildren();
|
|
6173
|
+
const embedUrl = await firstValueFrom(this.getEmbedUrl({ ...command, parameters: undefined }));
|
|
6174
|
+
const embeddingContext = await createEmbeddingContext();
|
|
6175
|
+
const sdkParameters = command.parameters
|
|
6176
|
+
? Object.entries(command.parameters).map(([Name, Values]) => ({ Name, Values }))
|
|
6177
|
+
: undefined;
|
|
6178
|
+
return await embeddingContext.embedDashboard({
|
|
6179
|
+
url: embedUrl,
|
|
6180
|
+
container,
|
|
6181
|
+
...(options?.height && { height: options.height }),
|
|
6182
|
+
...(options?.width && { width: options.width }),
|
|
6183
|
+
}, sdkParameters ? { parameters: sdkParameters } : undefined);
|
|
6184
|
+
}
|
|
6185
|
+
async setDashboardParameters(dashboard, parameters) {
|
|
6186
|
+
const sdkParameters = Object.entries(parameters).map(([Name, Values]) => ({ Name, Values }));
|
|
6187
|
+
await dashboard.setParameters(sdkParameters);
|
|
6188
|
+
}
|
|
6170
6189
|
async createEmbedVisualContext(embedUrl, container, options) {
|
|
6171
6190
|
const embeddingContext = await createEmbeddingContext();
|
|
6172
6191
|
await embeddingContext.embedVisual({
|
|
@@ -6216,22 +6235,22 @@ class DashboardQsComponent {
|
|
|
6216
6235
|
});
|
|
6217
6236
|
effect(() => {
|
|
6218
6237
|
const id = this.dashboardId();
|
|
6219
|
-
|
|
6238
|
+
const parameters = this.parameters();
|
|
6220
6239
|
if (!this.viewReady() || !id)
|
|
6221
6240
|
return;
|
|
6222
|
-
this.EmbedDashboard(id);
|
|
6241
|
+
this.EmbedDashboard(id, parameters);
|
|
6223
6242
|
});
|
|
6224
6243
|
}
|
|
6225
6244
|
ngAfterViewInit() {
|
|
6226
6245
|
this.viewReady.set(true);
|
|
6227
6246
|
}
|
|
6228
|
-
async EmbedDashboard(dashboardId) {
|
|
6247
|
+
async EmbedDashboard(dashboardId, parameters) {
|
|
6229
6248
|
const container = this.containers.first?.nativeElement;
|
|
6230
6249
|
if (!container)
|
|
6231
6250
|
return;
|
|
6232
6251
|
this.isLoading.set(true);
|
|
6233
6252
|
try {
|
|
6234
|
-
await this.sharedService.embedDashboard({ dashboardId, parameters
|
|
6253
|
+
await this.sharedService.embedDashboard({ dashboardId, parameters }, container, { height: this.height() ?? `${window.innerHeight - 50}px` });
|
|
6235
6254
|
}
|
|
6236
6255
|
catch (error) {
|
|
6237
6256
|
console.error('Error embedding dashboard:', error);
|
|
@@ -6251,6 +6270,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.23", ngImpo
|
|
|
6251
6270
|
args: ['visualContainer']
|
|
6252
6271
|
}], dashboardIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: false }] }], parametersInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "parameters", required: false }] }], heightInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], isLoadingChange: [{ type: i0.Output, args: ["isLoadingChange"] }] } });
|
|
6253
6272
|
|
|
6273
|
+
class DashboardQsInteractiveComponent {
|
|
6274
|
+
sharedService = inject(Shared);
|
|
6275
|
+
route = inject(ActivatedRoute);
|
|
6276
|
+
containers;
|
|
6277
|
+
dashboardIdInput = input(undefined, ...(ngDevMode ? [{ debugName: "dashboardIdInput", alias: 'dashboardId' }] : [{ alias: 'dashboardId' }]));
|
|
6278
|
+
parametersInput = input(undefined, ...(ngDevMode ? [{ debugName: "parametersInput", alias: 'parameters' }] : [{ alias: 'parameters' }]));
|
|
6279
|
+
heightInput = input(undefined, ...(ngDevMode ? [{ debugName: "heightInput", alias: 'height' }] : [{ alias: 'height' }]));
|
|
6280
|
+
routeData = toSignal(this.route.data, { initialValue: this.route.snapshot.data });
|
|
6281
|
+
dashboardId = computed(() => this.dashboardIdInput() ?? this.routeData()['dashboardId'], ...(ngDevMode ? [{ debugName: "dashboardId" }] : []));
|
|
6282
|
+
parameters = computed(() => this.parametersInput() ?? this.routeData()['parameters'], ...(ngDevMode ? [{ debugName: "parameters" }] : []));
|
|
6283
|
+
height = computed(() => this.heightInput() ?? this.routeData()['height'], ...(ngDevMode ? [{ debugName: "height" }] : []));
|
|
6284
|
+
isLoading = signal(true, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
6285
|
+
isLoadingChange = output();
|
|
6286
|
+
viewReady = signal(false, ...(ngDevMode ? [{ debugName: "viewReady" }] : []));
|
|
6287
|
+
dashboardRef = null;
|
|
6288
|
+
constructor() {
|
|
6289
|
+
effect(() => {
|
|
6290
|
+
this.isLoadingChange.emit(this.isLoading());
|
|
6291
|
+
});
|
|
6292
|
+
effect(() => {
|
|
6293
|
+
const id = this.dashboardId();
|
|
6294
|
+
if (!this.viewReady() || !id)
|
|
6295
|
+
return;
|
|
6296
|
+
this.firstEmbed(id);
|
|
6297
|
+
});
|
|
6298
|
+
effect(() => {
|
|
6299
|
+
const params = this.parameters();
|
|
6300
|
+
if (!this.dashboardRef || !params)
|
|
6301
|
+
return;
|
|
6302
|
+
this.sharedService.setDashboardParameters(this.dashboardRef, params);
|
|
6303
|
+
});
|
|
6304
|
+
}
|
|
6305
|
+
ngAfterViewInit() {
|
|
6306
|
+
this.viewReady.set(true);
|
|
6307
|
+
}
|
|
6308
|
+
async firstEmbed(dashboardId) {
|
|
6309
|
+
const container = this.containers.first?.nativeElement;
|
|
6310
|
+
if (!container)
|
|
6311
|
+
return;
|
|
6312
|
+
this.isLoading.set(true);
|
|
6313
|
+
try {
|
|
6314
|
+
this.dashboardRef = await this.sharedService.embedDashboardInteractive({ dashboardId, parameters: this.parameters() }, container, { height: this.height() ?? `${window.innerHeight - 50}px` });
|
|
6315
|
+
}
|
|
6316
|
+
catch (error) {
|
|
6317
|
+
console.error('Error embedding dashboard:', error);
|
|
6318
|
+
}
|
|
6319
|
+
finally {
|
|
6320
|
+
this.isLoading.set(false);
|
|
6321
|
+
}
|
|
6322
|
+
}
|
|
6323
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: DashboardQsInteractiveComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6324
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.23", type: DashboardQsInteractiveComponent, isStandalone: true, selector: "intelica-dashboard-qs-interactive", inputs: { dashboardIdInput: { classPropertyName: "dashboardIdInput", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null }, parametersInput: { classPropertyName: "parametersInput", publicName: "parameters", isSignal: true, isRequired: false, transformFunction: null }, heightInput: { classPropertyName: "heightInput", publicName: "height", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isLoadingChange: "isLoadingChange" }, viewQueries: [{ propertyName: "containers", predicate: ["visualContainer"], descendants: true }], ngImport: i0, template: "<div #visualContainer [style.height]=\"height()\" [class.hidden]=\"isLoading()\"></div>\n" });
|
|
6325
|
+
}
|
|
6326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: DashboardQsInteractiveComponent, decorators: [{
|
|
6327
|
+
type: Component,
|
|
6328
|
+
args: [{ selector: 'intelica-dashboard-qs-interactive', imports: [], template: "<div #visualContainer [style.height]=\"height()\" [class.hidden]=\"isLoading()\"></div>\n" }]
|
|
6329
|
+
}], ctorParameters: () => [], propDecorators: { containers: [{
|
|
6330
|
+
type: ViewChildren,
|
|
6331
|
+
args: ['visualContainer']
|
|
6332
|
+
}], dashboardIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: false }] }], parametersInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "parameters", required: false }] }], heightInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], isLoadingChange: [{ type: i0.Output, args: ["isLoadingChange"] }] } });
|
|
6333
|
+
|
|
6254
6334
|
class CheckboxFilterDirective extends FilterDirective {
|
|
6255
6335
|
constructor() {
|
|
6256
6336
|
super(FilterTypeEnum.Checkbox);
|
|
@@ -9132,5 +9212,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.23", ngImpo
|
|
|
9132
9212
|
* Generated bundle index. Do not edit.
|
|
9133
9213
|
*/
|
|
9134
9214
|
|
|
9135
|
-
export { ALERT_DEFAULTS, ALERT_ICON_OVERRIDES, ALERT_ICON_PATHS, ALERT_TYPE_CONFIG, ActionDirective, ActionsMenuComponent, AddFavoritesComponent, AlertButtonMode, AlertService, AlertType, BreadCrumbComponent, ButtonSplitComponent, CheckboxFilterDirective, ClientContextSelector, Color, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DATEPICKER_BUTTON_TYPES, DashboardQsComponent, DataDirective, DateFilterDirective, DateModeOptions, DatepickerComponent, DynamicInputValidation, EchartComponent, EchartService, ElementService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, FilterChipsComponent, FiltersComponent, FormatAmountPipe, GetCookieAttributes, GlobalFavoriteService, GlobalFeatureFlagService, GlobalMenuService, GlobalTermService, GoogleTaskManagerService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaAlertComponent, IntelicaCellCheckboxDirective, IntelicaSessionService, ItemSplitDirective, LanguageService, MatrixColumnComponent, MatrixColumnGroupComponent, MatrixTableComponent, ModalDialogComponent, MultiSelectComponent, NotificationJobService, NotificationOrchestratorService, NotificationService, NotificationSignalRService, OrderConstants, PageInformation, PageRootChildGuard, PaginatorComponent, Patterns, PopoverComponent, ProfileService, RecordPerPageComponent, RequestCacheService, ResponseHeadersInterceptor, RowResumenComponent, RowResumenTreeComponent, SearchComponent, SelectDetailFilterDirective, SelectFilterDirective, SetsesioninformationComponent, Shared, SharedService, SkeletonChartComponent, SkeletonComponent, SkeletonService, SkeletonTableComponent, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TableFetchComponent, TableSortOrder, TemplateDirective, TemplateMenuComponent, TermPipe, TermService, TextAreaFilterDirective, TextFilterDirective, TextRangeFilterDirective, TitleComponent, TreeColumnComponent, TreeColumnGroupComponent, TreeTableComponent, TruncatePipe, decryptData, encryptData, getColor };
|
|
9215
|
+
export { ALERT_DEFAULTS, ALERT_ICON_OVERRIDES, ALERT_ICON_PATHS, ALERT_TYPE_CONFIG, ActionDirective, ActionsMenuComponent, AddFavoritesComponent, AlertButtonMode, AlertService, AlertType, BreadCrumbComponent, ButtonSplitComponent, CheckboxFilterDirective, ClientContextSelector, Color, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DATEPICKER_BUTTON_TYPES, DashboardQsComponent, DashboardQsInteractiveComponent, DataDirective, DateFilterDirective, DateModeOptions, DatepickerComponent, DynamicInputValidation, EchartComponent, EchartService, ElementService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, FilterChipsComponent, FiltersComponent, FormatAmountPipe, GetCookieAttributes, GlobalFavoriteService, GlobalFeatureFlagService, GlobalMenuService, GlobalTermService, GoogleTaskManagerService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaAlertComponent, IntelicaCellCheckboxDirective, IntelicaSessionService, ItemSplitDirective, LanguageService, MatrixColumnComponent, MatrixColumnGroupComponent, MatrixTableComponent, ModalDialogComponent, MultiSelectComponent, NotificationJobService, NotificationOrchestratorService, NotificationService, NotificationSignalRService, OrderConstants, PageInformation, PageRootChildGuard, PaginatorComponent, Patterns, PopoverComponent, ProfileService, RecordPerPageComponent, RequestCacheService, ResponseHeadersInterceptor, RowResumenComponent, RowResumenTreeComponent, SearchComponent, SelectDetailFilterDirective, SelectFilterDirective, SetsesioninformationComponent, Shared, SharedService, SkeletonChartComponent, SkeletonComponent, SkeletonService, SkeletonTableComponent, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TableFetchComponent, TableSortOrder, TemplateDirective, TemplateMenuComponent, TermPipe, TermService, TextAreaFilterDirective, TextFilterDirective, TextRangeFilterDirective, TitleComponent, TreeColumnComponent, TreeColumnGroupComponent, TreeTableComponent, TruncatePipe, decryptData, encryptData, getColor };
|
|
9136
9216
|
//# sourceMappingURL=intelica-library-components.mjs.map
|