@memberjunction/ng-dashboards 5.4.0 → 5.5.0
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/dist/AI/components/agents/agent-configuration.component.js +4 -4
- package/dist/AI/components/agents/agent-configuration.component.js.map +1 -1
- package/dist/AI/components/agents/agent-editor.component.d.ts.map +1 -1
- package/dist/AI/components/agents/agent-editor.component.js +5 -4
- package/dist/AI/components/agents/agent-editor.component.js.map +1 -1
- package/dist/AI/components/models/model-management.component.js +3 -3
- package/dist/AI/components/models/model-management.component.js.map +1 -1
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts.map +1 -1
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +8 -7
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js.map +1 -1
- package/dist/AI/components/prompts/prompt-management.component.js +3 -3
- package/dist/AI/components/prompts/prompt-management.component.js.map +1 -1
- package/dist/AI/components/system/system-configuration.component.js +4 -4
- package/dist/AI/components/system/system-configuration.component.js.map +1 -1
- package/dist/APIKeys/api-applications-panel.component.d.ts.map +1 -1
- package/dist/APIKeys/api-applications-panel.component.js +3 -2
- package/dist/APIKeys/api-applications-panel.component.js.map +1 -1
- package/dist/APIKeys/api-keys-resource.component.js +2 -2
- package/dist/APIKeys/api-keys-resource.component.js.map +1 -1
- package/dist/APIKeys/api-scopes-panel.component.d.ts.map +1 -1
- package/dist/APIKeys/api-scopes-panel.component.js +4 -3
- package/dist/APIKeys/api-scopes-panel.component.js.map +1 -1
- package/dist/Actions/components/actions-overview.component.js +3 -3
- package/dist/Actions/components/actions-overview.component.js.map +1 -1
- package/dist/Actions/components/categories-list-view.component.d.ts.map +1 -1
- package/dist/Actions/components/categories-list-view.component.js +3 -2
- package/dist/Actions/components/categories-list-view.component.js.map +1 -1
- package/dist/Actions/components/execution-monitoring.component.js +2 -2
- package/dist/Actions/components/execution-monitoring.component.js.map +1 -1
- package/dist/Actions/components/explorer/action-explorer.component.js +2 -2
- package/dist/Actions/components/explorer/action-explorer.component.js.map +1 -1
- package/dist/Actions/components/explorer/new-action-panel.component.d.ts.map +1 -1
- package/dist/Actions/components/explorer/new-action-panel.component.js +3 -2
- package/dist/Actions/components/explorer/new-action-panel.component.js.map +1 -1
- package/dist/Actions/components/explorer/new-category-panel.component.d.ts.map +1 -1
- package/dist/Actions/components/explorer/new-category-panel.component.js +3 -2
- package/dist/Actions/components/explorer/new-category-panel.component.js.map +1 -1
- package/dist/Communication/communication-templates-resource.component.js +2 -2
- package/dist/Communication/communication-templates-resource.component.js.map +1 -1
- package/dist/ComponentStudio/components/artifact-load-dialog.component.d.ts +6 -0
- package/dist/ComponentStudio/components/artifact-load-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/artifact-load-dialog.component.js +19 -6
- package/dist/ComponentStudio/components/artifact-load-dialog.component.js.map +1 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.d.ts +4 -0
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.js +13 -4
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.js.map +1 -1
- package/dist/Credentials/components/credentials-categories-resource.component.d.ts +2 -0
- package/dist/Credentials/components/credentials-categories-resource.component.d.ts.map +1 -1
- package/dist/Credentials/components/credentials-categories-resource.component.js +13 -9
- package/dist/Credentials/components/credentials-categories-resource.component.js.map +1 -1
- package/dist/Credentials/components/credentials-list-resource.component.js +11 -11
- package/dist/Credentials/components/credentials-list-resource.component.js.map +1 -1
- package/dist/Credentials/components/credentials-overview-resource.component.js +3 -3
- package/dist/Credentials/components/credentials-overview-resource.component.js.map +1 -1
- package/dist/Credentials/components/credentials-types-resource.component.d.ts +2 -0
- package/dist/Credentials/components/credentials-types-resource.component.d.ts.map +1 -1
- package/dist/Credentials/components/credentials-types-resource.component.js +13 -9
- package/dist/Credentials/components/credentials-types-resource.component.js.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-resource.component.js +11 -11
- package/dist/DashboardBrowser/dashboard-browser-resource.component.js.map +1 -1
- package/dist/DashboardBrowser/dashboard-share-dialog.component.d.ts.map +1 -1
- package/dist/DashboardBrowser/dashboard-share-dialog.component.js +4 -3
- package/dist/DashboardBrowser/dashboard-share-dialog.component.js.map +1 -1
- package/dist/DataExplorer/components/view-selector/view-selector.component.d.ts.map +1 -1
- package/dist/DataExplorer/components/view-selector/view-selector.component.js +4 -3
- package/dist/DataExplorer/components/view-selector/view-selector.component.js.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +6 -6
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/DataExplorer/data-explorer-resource.component.d.ts.map +1 -1
- package/dist/DataExplorer/data-explorer-resource.component.js +4 -1
- package/dist/DataExplorer/data-explorer-resource.component.js.map +1 -1
- package/dist/DataExplorer/services/explorer-state.service.d.ts.map +1 -1
- package/dist/DataExplorer/services/explorer-state.service.js +9 -8
- package/dist/DataExplorer/services/explorer-state.service.js.map +1 -1
- package/dist/EntityAdmin/entity-admin-dashboard.component.js +2 -2
- package/dist/EntityAdmin/entity-admin-dashboard.component.js.map +1 -1
- package/dist/Home/home-application.js +2 -2
- package/dist/Home/home-application.js.map +1 -1
- package/dist/Lists/components/lists-browse-resource.component.js +3 -3
- package/dist/Lists/components/lists-browse-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-categories-resource.component.d.ts +1 -0
- package/dist/Lists/components/lists-categories-resource.component.d.ts.map +1 -1
- package/dist/Lists/components/lists-categories-resource.component.js +17 -14
- package/dist/Lists/components/lists-categories-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-my-lists-resource.component.js +2 -2
- package/dist/Lists/components/lists-my-lists-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-operations-resource.component.d.ts +1 -0
- package/dist/Lists/components/lists-operations-resource.component.d.ts.map +1 -1
- package/dist/Lists/components/lists-operations-resource.component.js +15 -12
- package/dist/Lists/components/lists-operations-resource.component.js.map +1 -1
- package/dist/MCP/components/mcp-connection-dialog.component.d.ts.map +1 -1
- package/dist/MCP/components/mcp-connection-dialog.component.js +3 -2
- package/dist/MCP/components/mcp-connection-dialog.component.js.map +1 -1
- package/dist/MCP/components/mcp-test-tool-dialog.component.d.ts.map +1 -1
- package/dist/MCP/components/mcp-test-tool-dialog.component.js +8 -7
- package/dist/MCP/components/mcp-test-tool-dialog.component.js.map +1 -1
- package/dist/MCP/mcp-dashboard.component.js +22 -22
- package/dist/MCP/mcp-dashboard.component.js.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.d.ts +2 -0
- package/dist/QueryBrowser/query-browser-resource.component.d.ts.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.js +14 -10
- package/dist/QueryBrowser/query-browser-resource.component.js.map +1 -1
- package/dist/Scheduling/services/scheduling-instrumentation.service.d.ts.map +1 -1
- package/dist/Scheduling/services/scheduling-instrumentation.service.js +2 -1
- package/dist/Scheduling/services/scheduling-instrumentation.service.js.map +1 -1
- package/dist/Testing/components/testing-explorer.component.d.ts +1 -0
- package/dist/Testing/components/testing-explorer.component.d.ts.map +1 -1
- package/dist/Testing/components/testing-explorer.component.js +22 -18
- package/dist/Testing/components/testing-explorer.component.js.map +1 -1
- package/dist/Testing/components/testing-review.component.d.ts +1 -0
- package/dist/Testing/components/testing-review.component.d.ts.map +1 -1
- package/dist/Testing/components/testing-review.component.js +14 -10
- package/dist/Testing/components/testing-review.component.js.map +1 -1
- package/dist/VersionHistory/components/diff-resource.component.js +6 -6
- package/dist/VersionHistory/components/diff-resource.component.js.map +1 -1
- package/dist/VersionHistory/components/graph-resource.component.js +2 -2
- package/dist/VersionHistory/components/graph-resource.component.js.map +1 -1
- package/dist/VersionHistory/components/labels-resource.component.js +3 -3
- package/dist/VersionHistory/components/labels-resource.component.js.map +1 -1
- package/package.json +38 -38
|
@@ -113,6 +113,8 @@ export declare class QueryBrowserResourceComponent extends BaseResourceComponent
|
|
|
113
113
|
onResizeStart(event: MouseEvent): void;
|
|
114
114
|
private onResizeMove;
|
|
115
115
|
private onResizeEnd;
|
|
116
|
+
/** Case-insensitive UUID check whether a query is the currently selected query. */
|
|
117
|
+
IsQuerySelected(query: QueryInfo): boolean;
|
|
116
118
|
static ɵfac: i0.ɵɵFactoryDeclaration<QueryBrowserResourceComponent, never>;
|
|
117
119
|
static ɵcmp: i0.ɵɵComponentDeclaration<QueryBrowserResourceComponent, "mj-query-browser-resource", never, {}, {}, never, never, false, never>;
|
|
118
120
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-browser-resource.component.d.ts","sourceRoot":"","sources":["../../src/QueryBrowser/query-browser-resource.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAA2B,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7H,OAAO,EAAE,MAAM,EAAiB,MAAM,iBAAiB,CAAC;AAIxD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAY,SAAS,EAAE,iBAAiB,EAAgB,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAkB,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EACH,yBAAyB,EACzB,kBAAkB,EACrB,MAAM,iCAAiC,CAAC;;AACzC;;GAEG;AACH,UAAU,YAAY;IAClB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,qBAQa,6BAA8B,SAAQ,qBAAsB,YAAW,MAAM,EAAE,SAAS;IA2B7F,OAAO,CAAC,GAAG;IACX,OAAO,CAAC,iBAAiB;IACzB,OAAO,CAAC,MAAM;IACd,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|
|
1
|
+
{"version":3,"file":"query-browser-resource.component.d.ts","sourceRoot":"","sources":["../../src/QueryBrowser/query-browser-resource.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAA2B,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7H,OAAO,EAAE,MAAM,EAAiB,MAAM,iBAAiB,CAAC;AAIxD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAY,SAAS,EAAE,iBAAiB,EAAgB,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAkB,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EACH,yBAAyB,EACzB,kBAAkB,EACrB,MAAM,iCAAiC,CAAC;;AACzC;;GAEG;AACH,UAAU,YAAY;IAClB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,qBAQa,6BAA8B,SAAQ,qBAAsB,YAAW,MAAM,EAAE,SAAS;IA2B7F,OAAO,CAAC,GAAG;IACX,OAAO,CAAC,iBAAiB;IACzB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,IAAI;IA9BhB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAA6B;IACjE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAO;IAClD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAO;IAC9C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAO;IAEvC,SAAS,UAAQ;IACjB,UAAU,EAAE,iBAAiB,EAAE,CAAM;IACrC,YAAY,EAAE,YAAY,EA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,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI;IAIjD,iBAAiB,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAMtE,gBAAgB,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAYtD,kBAAkB,IAAI,MAAM;IAI5B,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM;IAQ7C,OAAO,IAAI,IAAI;IAKf,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,MAAM;IAI1D,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,MAAM;IAQ5D;;;OAGG;IACH,OAAO,CAAC,aAAa;IAcrB;;;OAGG;IACH,OAAO,CAAC,SAAS;IAgBjB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAmC5B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAa1B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAoB9B;;OAEG;IACH,OAAO,CAAC,+BAA+B;IAkBvC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAU3B;;OAEG;IACI,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAY7C,OAAO,CAAC,YAAY;IAgBpB,OAAO,CAAC,WAAW;IAgBnB,mFAAmF;IAC5E,eAAe,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO;yCAthBxC,6BAA6B;2CAA7B,6BAA6B;CAyhBzC"}
|
|
@@ -9,7 +9,7 @@ import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
|
9
9
|
import { NavigationEnd } from '@angular/router';
|
|
10
10
|
import { Subject } from 'rxjs';
|
|
11
11
|
import { takeUntil, filter } from 'rxjs/operators';
|
|
12
|
-
import { RegisterClass } from '@memberjunction/global';
|
|
12
|
+
import { RegisterClass, UUIDsEqual } from '@memberjunction/global';
|
|
13
13
|
import { BaseResourceComponent } from '@memberjunction/ng-shared';
|
|
14
14
|
import { Metadata, QueryCategoryInfo, CompositeKey } from '@memberjunction/core';
|
|
15
15
|
import { UserInfoEngine } from '@memberjunction/core-entities';
|
|
@@ -116,7 +116,7 @@ function QueryBrowserResourceComponent_ng_template_31_Conditional_0_Conditional_
|
|
|
116
116
|
} if (rf & 2) {
|
|
117
117
|
const query_r10 = ctx.$implicit;
|
|
118
118
|
const ctx_r2 = i0.ɵɵnextContext(4);
|
|
119
|
-
i0.ɵɵclassProp("selected",
|
|
119
|
+
i0.ɵɵclassProp("selected", ctx_r2.IsQuerySelected(query_r10))("hidden", !ctx_r2.isQueryVisible(query_r10));
|
|
120
120
|
i0.ɵɵadvance(4);
|
|
121
121
|
i0.ɵɵtextInterpolate(query_r10.Name);
|
|
122
122
|
i0.ɵɵadvance();
|
|
@@ -282,7 +282,7 @@ let QueryBrowserResourceComponent = class QueryBrowserResourceComponent extends
|
|
|
282
282
|
// Parse initial URL state
|
|
283
283
|
const urlState = this.parseUrlState();
|
|
284
284
|
if (urlState?.queryId) {
|
|
285
|
-
const query = this.queries.find(q => q.ID
|
|
285
|
+
const query = this.queries.find(q => UUIDsEqual(q.ID, urlState.queryId));
|
|
286
286
|
if (query) {
|
|
287
287
|
this.selectedQuery = query;
|
|
288
288
|
this.expandCategoryForQuery(query);
|
|
@@ -304,7 +304,7 @@ let QueryBrowserResourceComponent = class QueryBrowserResourceComponent extends
|
|
|
304
304
|
const categoryMap = new Map();
|
|
305
305
|
// Create nodes for all categories
|
|
306
306
|
for (const category of this.categories) {
|
|
307
|
-
const queriesInCategory = this.queries.filter(q => q.CategoryID
|
|
307
|
+
const queriesInCategory = this.queries.filter(q => UUIDsEqual(q.CategoryID, category.ID));
|
|
308
308
|
categoryMap.set(category.ID, {
|
|
309
309
|
category,
|
|
310
310
|
children: [],
|
|
@@ -424,7 +424,7 @@ let QueryBrowserResourceComponent = class QueryBrowserResourceComponent extends
|
|
|
424
424
|
isQueryVisible(query) {
|
|
425
425
|
if (!this.searchText)
|
|
426
426
|
return true;
|
|
427
|
-
return this.filteredQueries.some(q => q.ID
|
|
427
|
+
return this.filteredQueries.some(q => UUIDsEqual(q.ID, query.ID));
|
|
428
428
|
}
|
|
429
429
|
hasVisibleContent(node) {
|
|
430
430
|
if (!this.searchText)
|
|
@@ -537,9 +537,9 @@ let QueryBrowserResourceComponent = class QueryBrowserResourceComponent extends
|
|
|
537
537
|
// Apply the state without triggering URL updates
|
|
538
538
|
this.skipUrlUpdate = true;
|
|
539
539
|
if (urlState?.queryId) {
|
|
540
|
-
const query = this.queries.find(q => q.ID
|
|
540
|
+
const query = this.queries.find(q => UUIDsEqual(q.ID, urlState.queryId));
|
|
541
541
|
if (query) {
|
|
542
|
-
if (this.selectedQuery?.ID
|
|
542
|
+
if (!UUIDsEqual(this.selectedQuery?.ID, query.ID)) {
|
|
543
543
|
this.selectedQuery = query;
|
|
544
544
|
this.expandCategoryForQuery(query);
|
|
545
545
|
}
|
|
@@ -576,7 +576,7 @@ let QueryBrowserResourceComponent = class QueryBrowserResourceComponent extends
|
|
|
576
576
|
return;
|
|
577
577
|
const expandCategory = (nodes, targetCategoryId) => {
|
|
578
578
|
for (const node of nodes) {
|
|
579
|
-
if (node.category.ID
|
|
579
|
+
if (UUIDsEqual(node.category.ID, targetCategoryId)) {
|
|
580
580
|
node.expanded = true;
|
|
581
581
|
return true;
|
|
582
582
|
}
|
|
@@ -594,7 +594,7 @@ let QueryBrowserResourceComponent = class QueryBrowserResourceComponent extends
|
|
|
594
594
|
*/
|
|
595
595
|
expandCategoryForQueryRecursive(nodes, targetCategoryId) {
|
|
596
596
|
for (const node of nodes) {
|
|
597
|
-
if (node.category.ID
|
|
597
|
+
if (UUIDsEqual(node.category.ID, targetCategoryId)) {
|
|
598
598
|
node.expanded = true;
|
|
599
599
|
return true;
|
|
600
600
|
}
|
|
@@ -654,6 +654,10 @@ let QueryBrowserResourceComponent = class QueryBrowserResourceComponent extends
|
|
|
654
654
|
UserInfoEngine.Instance.SetSettingDebounced(QueryBrowserResourceComponent_1.SETTINGS_KEY, this.PanelWidth.toString());
|
|
655
655
|
this.zone.run(() => this.cdr.markForCheck());
|
|
656
656
|
}
|
|
657
|
+
/** Case-insensitive UUID check whether a query is the currently selected query. */
|
|
658
|
+
IsQuerySelected(query) {
|
|
659
|
+
return UUIDsEqual(this.selectedQuery?.ID, query.ID);
|
|
660
|
+
}
|
|
657
661
|
static ɵfac = function QueryBrowserResourceComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryBrowserResourceComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.NavigationService), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.NgZone)); };
|
|
658
662
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryBrowserResourceComponent, selectors: [["mj-query-browser-resource"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 33, vars: 15, consts: [["categoryNode", ""], [1, "query-browser-container"], [1, "query-tree-panel"], [1, "tree-header"], [1, "header-title"], [1, "fa-solid", "fa-database"], [1, "query-count"], [1, "header-actions"], ["title", "Expand all", 1, "icon-btn", 3, "click"], [1, "fa-solid", "fa-folder-open"], ["title", "Collapse all", 1, "icon-btn", 3, "click"], [1, "fa-solid", "fa-folder"], ["title", "Refresh", 1, "icon-btn", 3, "click"], [1, "fa-solid", "fa-refresh"], [1, "tree-search"], [1, "search-input-wrapper"], [1, "fa-solid", "fa-search", "search-icon"], ["type", "text", "placeholder", "Search queries...", 1, "search-input", 3, "input", "value"], [1, "clear-btn"], [1, "tree-content"], [1, "loading-state"], [1, "empty-state"], [1, "category-tree"], [1, "resize-handle", 3, "mousedown"], [1, "resize-handle-grip"], [1, "query-viewer-panel"], [1, "no-selection"], [3, "QueryId", "AutoRun", "SelectionMode"], [1, "clear-btn", 3, "click"], [1, "fa-solid", "fa-times"], ["text", "Loading queries..."], [1, "fa-solid", "fa-database", "empty-icon"], [1, "fa-solid", "fa-search", "empty-icon"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "fa-solid", "fa-hand-pointer", "no-selection-icon"], [1, "no-selection-message"], [1, "no-selection-hint"], [3, "EntityLinkClick", "RowDoubleClick", "OpenQueryRecord", "QueryId", "AutoRun", "SelectionMode"], [1, "category-item", 3, "expanded", "padding-left"], [1, "category-item"], [1, "category-header", 3, "click"], [1, "fa-solid", "expand-icon"], [1, "fa-solid", "fa-folder", "category-icon"], [1, "category-name"], [1, "category-count"], [1, "category-queries"], [1, "query-item", 3, "selected", "hidden"], [1, "query-item", 3, "click"], [1, "fa-solid", "fa-file-code", "query-icon"], [1, "query-info"], [1, "query-name"], [1, "query-description"], ["title", "Has parameters", 1, "fa-solid", "fa-sliders", "param-icon"]], template: function QueryBrowserResourceComponent_Template(rf, ctx) { if (rf & 1) {
|
|
659
663
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
@@ -731,7 +735,7 @@ QueryBrowserResourceComponent = QueryBrowserResourceComponent_1 = __decorate([
|
|
|
731
735
|
export { QueryBrowserResourceComponent };
|
|
732
736
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryBrowserResourceComponent, [{
|
|
733
737
|
type: Component,
|
|
734
|
-
args: [{ standalone: false, selector: 'mj-query-browser-resource', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- Query Browser Resource -->\n<div class=\"query-browser-container\" [class.resizing]=\"IsResizing\">\n <!-- Left Panel: Query Tree -->\n <div class=\"query-tree-panel\" [style.width.px]=\"PanelWidth\">\n <!-- Header -->\n <div class=\"tree-header\">\n <div class=\"header-title\">\n <i class=\"fa-solid fa-database\"></i>\n <span>Queries</span>\n <span class=\"query-count\">({{ getTotalQueryCount() }})</span>\n </div>\n <div class=\"header-actions\">\n <button class=\"icon-btn\" (click)=\"expandAll()\" title=\"Expand all\">\n <i class=\"fa-solid fa-folder-open\"></i>\n </button>\n <button class=\"icon-btn\" (click)=\"collapseAll()\" title=\"Collapse all\">\n <i class=\"fa-solid fa-folder\"></i>\n </button>\n <button class=\"icon-btn\" (click)=\"refresh()\" title=\"Refresh\">\n <i class=\"fa-solid fa-refresh\"></i>\n </button>\n </div>\n </div>\n\n <!-- Search -->\n <div class=\"tree-search\">\n <div class=\"search-input-wrapper\">\n <i class=\"fa-solid fa-search search-icon\"></i>\n <input type=\"text\"\n class=\"search-input\"\n [value]=\"searchText\"\n placeholder=\"Search queries...\"\n (input)=\"onSearchChange($any($event.target).value)\">\n @if (searchText) {\n <button class=\"clear-btn\" (click)=\"clearSearch()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n }\n </div>\n </div>\n\n <!-- Tree Content -->\n <div class=\"tree-content\">\n <!-- Loading -->\n @if (isLoading) {\n <div class=\"loading-state\">\n <mj-loading text=\"Loading queries...\"></mj-loading>\n </div>\n }\n\n <!-- Empty -->\n @if (!isLoading && queries.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-database empty-icon\"></i>\n <p>No queries available</p>\n </div>\n }\n\n <!-- No results -->\n @if (!isLoading && searchText && filteredQueries.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-search empty-icon\"></i>\n <p>No queries match \"{{ searchText }}\"</p>\n </div>\n }\n\n <!-- Category Tree -->\n @if (!isLoading && queries.length > 0) {\n <div class=\"category-tree\">\n @for (node of categoryTree; track trackByCategory($index, node)) {\n <ng-container *ngTemplateOutlet=\"categoryNode; context: { node: node }\"></ng-container>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Resize Handle -->\n <div class=\"resize-handle\"\n [class.active]=\"IsResizing\"\n (mousedown)=\"onResizeStart($event)\">\n <div class=\"resize-handle-grip\"></div>\n </div>\n\n <!-- Right Panel: Query Viewer -->\n <div class=\"query-viewer-panel\">\n <!-- No query selected -->\n @if (!selectedQuery) {\n <div class=\"no-selection\">\n <i class=\"fa-solid fa-hand-pointer no-selection-icon\"></i>\n <p class=\"no-selection-message\">Select a query from the list</p>\n <p class=\"no-selection-hint\">Click on a query to view and run it</p>\n </div>\n }\n\n <!-- Query Viewer -->\n @if (selectedQuery) {\n <mj-query-viewer\n [QueryId]=\"selectedQuery.ID\"\n [AutoRun]=\"true\"\n [SelectionMode]=\"'multiple'\"\n (EntityLinkClick)=\"onEntityLinkClick($event)\"\n (RowDoubleClick)=\"onRowDoubleClick($event)\"\n (OpenQueryRecord)=\"onOpenQueryRecord($event)\">\n </mj-query-viewer>\n }\n </div>\n</div>\n\n<!-- Category Node Template -->\n<ng-template #categoryNode let-node=\"node\">\n @if (hasVisibleContent(node)) {\n <div class=\"category-item\"\n [class.expanded]=\"node.expanded\"\n [style.padding-left.px]=\"node.level * 16 + 8\">\n <div class=\"category-header\" (click)=\"toggleExpand(node)\">\n <i class=\"fa-solid expand-icon\"\n [class.fa-chevron-down]=\"node.expanded\"\n [class.fa-chevron-right]=\"!node.expanded\"></i>\n <i class=\"fa-solid fa-folder category-icon\"\n [class.fa-folder-open]=\"node.expanded\"></i>\n <span class=\"category-name\">{{ node.category.Name }}</span>\n <span class=\"category-count\">({{ getNodeQueryCount(node) }})</span>\n </div>\n <!-- Queries in this category -->\n @if (node.expanded) {\n <div class=\"category-queries\">\n @for (query of node.queries; track trackByQuery($index, query)) {\n <div class=\"query-item\"\n [class.selected]=\"selectedQuery?.ID === query.ID\"\n [class.hidden]=\"!isQueryVisible(query)\"\n (click)=\"selectQuery(query, $event)\">\n <i class=\"fa-solid fa-file-code query-icon\"></i>\n <div class=\"query-info\">\n <span class=\"query-name\">{{ query.Name }}</span>\n @if (query.Description) {\n <span class=\"query-description\">{{ query.Description }}</span>\n }\n </div>\n @if (query.UsesTemplate) {\n <i class=\"fa-solid fa-sliders param-icon\" title=\"Has parameters\"></i>\n }\n </div>\n }\n </div>\n }\n <!-- Child categories -->\n @if (node.expanded) {\n @for (child of node.children; track trackByCategory($index, child)) {\n <ng-container *ngTemplateOutlet=\"categoryNode; context: { node: child }\"></ng-container>\n }\n }\n </div>\n }\n</ng-template>\n", styles: ["/* Query Browser Resource Styles */\n\n:host {\n display: block;\n height: 100%;\n}\n\n.query-browser-container {\n display: flex;\n height: 100%;\n background: #f5f5f5;\n}\n\n/* Left Panel: Query Tree */\n.query-tree-panel {\n flex-shrink: 0;\n background: #fff;\n border-right: 1px solid #e0e0e0;\n display: flex;\n flex-direction: column;\n /* Width controlled by [style.width.px] binding */\n}\n\n/* Tree Header */\n.tree-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 16px;\n background: linear-gradient(135deg, #5c6bc0 0%, #3949ab 100%);\n color: #fff;\n}\n\n.header-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 600;\n}\n\n.header-title i {\n font-size: 16px;\n}\n\n.query-count {\n font-weight: 400;\n opacity: 0.8;\n font-size: 13px;\n}\n\n.header-actions {\n display: flex;\n gap: 4px;\n}\n\n.icon-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n background: rgba(255, 255, 255, 0.15);\n color: #fff;\n border-radius: 4px;\n cursor: pointer;\n transition: background 0.15s ease;\n}\n\n.icon-btn:hover {\n background: rgba(255, 255, 255, 0.25);\n}\n\n/* Tree Search */\n.tree-search {\n padding: 12px;\n border-bottom: 1px solid #e0e0e0;\n}\n\n.search-input-wrapper {\n display: flex;\n align-items: center;\n width: 100%;\n border: 1px solid #ccc;\n border-radius: 4px;\n background: #fff;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n\n.search-input-wrapper:focus-within {\n border-color: #5c6bc0;\n box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.15);\n}\n\n.search-icon {\n color: #888;\n margin-left: 10px;\n font-size: 14px;\n}\n\n.search-input {\n flex: 1;\n border: none;\n outline: none;\n padding: 8px 10px;\n font-size: 14px;\n background: transparent;\n}\n\n.search-input::placeholder {\n color: #999;\n}\n\n.clear-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n background: transparent;\n color: #888;\n cursor: pointer;\n margin-right: 4px;\n border-radius: 4px;\n}\n\n.clear-btn:hover {\n color: #333;\n background: #f0f0f0;\n}\n\n/* Tree Content */\n.tree-content {\n flex: 1;\n overflow-y: auto;\n padding: 8px 0;\n}\n\n/* Loading & Empty States */\n.loading-state,\n.empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px 20px;\n text-align: center;\n}\n\n.empty-icon {\n font-size: 36px;\n color: #ccc;\n margin-bottom: 12px;\n}\n\n.empty-state p {\n margin: 0;\n color: #666;\n font-size: 14px;\n}\n\n/* Category Tree */\n.category-tree {\n padding: 0 4px;\n}\n\n.category-item {\n margin-bottom: 2px;\n}\n\n.category-header {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 12px;\n cursor: pointer;\n border-radius: 4px;\n transition: background 0.15s ease;\n}\n\n.category-header:hover {\n background: #f0f0f0;\n}\n\n.expand-icon {\n font-size: 10px;\n color: #888;\n width: 12px;\n text-align: center;\n}\n\n.category-icon {\n color: #f9a825;\n font-size: 14px;\n}\n\n.category-name {\n flex: 1;\n font-weight: 500;\n color: #333;\n font-size: 13px;\n}\n\n.category-count {\n color: #888;\n font-size: 12px;\n}\n\n/* Query Items */\n.category-queries {\n margin-left: 28px;\n}\n\n.query-item {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 8px 12px;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.15s ease;\n margin: 2px 0;\n}\n\n.query-item:hover {\n background: #f0f7ff;\n}\n\n.query-item.selected {\n background: #e3f2fd;\n border-left: 3px solid #2196f3;\n margin-left: -3px;\n}\n\n.query-item.hidden {\n display: none;\n}\n\n.query-icon {\n color: #5c6bc0;\n font-size: 14px;\n margin-top: 2px;\n}\n\n.query-info {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.query-name {\n font-size: 13px;\n color: #333;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.query-description {\n font-size: 11px;\n color: #888;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.param-icon {\n color: #f9a825;\n font-size: 12px;\n margin-top: 2px;\n}\n\n.query-details-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n background: transparent;\n color: #999;\n cursor: pointer;\n border-radius: 4px;\n opacity: 0;\n transition: all 0.15s ease;\n flex-shrink: 0;\n}\n\n.query-item:hover .query-details-btn {\n opacity: 1;\n}\n\n.query-details-btn:hover {\n background: rgba(92, 107, 192, 0.15);\n color: #5c6bc0;\n}\n\n/* Resize Handle */\n.resize-handle {\n flex-shrink: 0;\n width: 6px;\n cursor: col-resize;\n background: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background 0.15s ease;\n position: relative;\n z-index: 10;\n}\n\n.resize-handle:hover,\n.resize-handle.active {\n background: rgba(92, 107, 192, 0.15);\n}\n\n.resize-handle-grip {\n width: 2px;\n height: 32px;\n border-radius: 1px;\n background: #ccc;\n transition: background 0.15s ease;\n}\n\n.resize-handle:hover .resize-handle-grip,\n.resize-handle.active .resize-handle-grip {\n background: #5c6bc0;\n}\n\n/* Prevent text selection and set cursor during resize */\n.query-browser-container.resizing {\n cursor: col-resize;\n user-select: none;\n}\n\n.query-browser-container.resizing * {\n pointer-events: none;\n}\n\n.query-browser-container.resizing .resize-handle {\n pointer-events: auto;\n}\n\n/* Right Panel: Query Viewer */\n.query-viewer-panel {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n}\n\n/* No Selection State */\n.no-selection {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 40px;\n}\n\n.no-selection-icon {\n font-size: 64px;\n color: #ddd;\n margin-bottom: 20px;\n}\n\n.no-selection-message {\n font-size: 18px;\n color: #666;\n margin: 0 0 8px 0;\n}\n\n.no-selection-hint {\n font-size: 14px;\n color: #999;\n margin: 0;\n}\n\n/* Query Viewer fills remaining space */\nmj-query-viewer {\n flex: 1;\n min-height: 0;\n}\n\n/* Scrollbar styling */\n.tree-content::-webkit-scrollbar {\n width: 6px;\n}\n\n.tree-content::-webkit-scrollbar-track {\n background: #f1f1f1;\n}\n\n.tree-content::-webkit-scrollbar-thumb {\n background: #ccc;\n border-radius: 3px;\n}\n\n.tree-content::-webkit-scrollbar-thumb:hover {\n background: #aaa;\n}\n\n/* Responsive */\n@media (max-width: 768px) {\n .query-browser-container {\n flex-direction: column;\n }\n\n .query-tree-panel {\n width: 100% !important;\n height: 40%;\n border-right: none;\n border-bottom: 1px solid #e0e0e0;\n }\n\n .resize-handle {\n display: none;\n }\n\n .query-viewer-panel {\n height: 60%;\n }\n}\n"] }]
|
|
738
|
+
args: [{ standalone: false, selector: 'mj-query-browser-resource', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- Query Browser Resource -->\n<div class=\"query-browser-container\" [class.resizing]=\"IsResizing\">\n <!-- Left Panel: Query Tree -->\n <div class=\"query-tree-panel\" [style.width.px]=\"PanelWidth\">\n <!-- Header -->\n <div class=\"tree-header\">\n <div class=\"header-title\">\n <i class=\"fa-solid fa-database\"></i>\n <span>Queries</span>\n <span class=\"query-count\">({{ getTotalQueryCount() }})</span>\n </div>\n <div class=\"header-actions\">\n <button class=\"icon-btn\" (click)=\"expandAll()\" title=\"Expand all\">\n <i class=\"fa-solid fa-folder-open\"></i>\n </button>\n <button class=\"icon-btn\" (click)=\"collapseAll()\" title=\"Collapse all\">\n <i class=\"fa-solid fa-folder\"></i>\n </button>\n <button class=\"icon-btn\" (click)=\"refresh()\" title=\"Refresh\">\n <i class=\"fa-solid fa-refresh\"></i>\n </button>\n </div>\n </div>\n\n <!-- Search -->\n <div class=\"tree-search\">\n <div class=\"search-input-wrapper\">\n <i class=\"fa-solid fa-search search-icon\"></i>\n <input type=\"text\"\n class=\"search-input\"\n [value]=\"searchText\"\n placeholder=\"Search queries...\"\n (input)=\"onSearchChange($any($event.target).value)\">\n @if (searchText) {\n <button class=\"clear-btn\" (click)=\"clearSearch()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n }\n </div>\n </div>\n\n <!-- Tree Content -->\n <div class=\"tree-content\">\n <!-- Loading -->\n @if (isLoading) {\n <div class=\"loading-state\">\n <mj-loading text=\"Loading queries...\"></mj-loading>\n </div>\n }\n\n <!-- Empty -->\n @if (!isLoading && queries.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-database empty-icon\"></i>\n <p>No queries available</p>\n </div>\n }\n\n <!-- No results -->\n @if (!isLoading && searchText && filteredQueries.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-search empty-icon\"></i>\n <p>No queries match \"{{ searchText }}\"</p>\n </div>\n }\n\n <!-- Category Tree -->\n @if (!isLoading && queries.length > 0) {\n <div class=\"category-tree\">\n @for (node of categoryTree; track trackByCategory($index, node)) {\n <ng-container *ngTemplateOutlet=\"categoryNode; context: { node: node }\"></ng-container>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Resize Handle -->\n <div class=\"resize-handle\"\n [class.active]=\"IsResizing\"\n (mousedown)=\"onResizeStart($event)\">\n <div class=\"resize-handle-grip\"></div>\n </div>\n\n <!-- Right Panel: Query Viewer -->\n <div class=\"query-viewer-panel\">\n <!-- No query selected -->\n @if (!selectedQuery) {\n <div class=\"no-selection\">\n <i class=\"fa-solid fa-hand-pointer no-selection-icon\"></i>\n <p class=\"no-selection-message\">Select a query from the list</p>\n <p class=\"no-selection-hint\">Click on a query to view and run it</p>\n </div>\n }\n\n <!-- Query Viewer -->\n @if (selectedQuery) {\n <mj-query-viewer\n [QueryId]=\"selectedQuery.ID\"\n [AutoRun]=\"true\"\n [SelectionMode]=\"'multiple'\"\n (EntityLinkClick)=\"onEntityLinkClick($event)\"\n (RowDoubleClick)=\"onRowDoubleClick($event)\"\n (OpenQueryRecord)=\"onOpenQueryRecord($event)\">\n </mj-query-viewer>\n }\n </div>\n</div>\n\n<!-- Category Node Template -->\n<ng-template #categoryNode let-node=\"node\">\n @if (hasVisibleContent(node)) {\n <div class=\"category-item\"\n [class.expanded]=\"node.expanded\"\n [style.padding-left.px]=\"node.level * 16 + 8\">\n <div class=\"category-header\" (click)=\"toggleExpand(node)\">\n <i class=\"fa-solid expand-icon\"\n [class.fa-chevron-down]=\"node.expanded\"\n [class.fa-chevron-right]=\"!node.expanded\"></i>\n <i class=\"fa-solid fa-folder category-icon\"\n [class.fa-folder-open]=\"node.expanded\"></i>\n <span class=\"category-name\">{{ node.category.Name }}</span>\n <span class=\"category-count\">({{ getNodeQueryCount(node) }})</span>\n </div>\n <!-- Queries in this category -->\n @if (node.expanded) {\n <div class=\"category-queries\">\n @for (query of node.queries; track trackByQuery($index, query)) {\n <div class=\"query-item\"\n [class.selected]=\"IsQuerySelected(query)\"\n [class.hidden]=\"!isQueryVisible(query)\"\n (click)=\"selectQuery(query, $event)\">\n <i class=\"fa-solid fa-file-code query-icon\"></i>\n <div class=\"query-info\">\n <span class=\"query-name\">{{ query.Name }}</span>\n @if (query.Description) {\n <span class=\"query-description\">{{ query.Description }}</span>\n }\n </div>\n @if (query.UsesTemplate) {\n <i class=\"fa-solid fa-sliders param-icon\" title=\"Has parameters\"></i>\n }\n </div>\n }\n </div>\n }\n <!-- Child categories -->\n @if (node.expanded) {\n @for (child of node.children; track trackByCategory($index, child)) {\n <ng-container *ngTemplateOutlet=\"categoryNode; context: { node: child }\"></ng-container>\n }\n }\n </div>\n }\n</ng-template>\n", styles: ["/* Query Browser Resource Styles */\n\n:host {\n display: block;\n height: 100%;\n}\n\n.query-browser-container {\n display: flex;\n height: 100%;\n background: #f5f5f5;\n}\n\n/* Left Panel: Query Tree */\n.query-tree-panel {\n flex-shrink: 0;\n background: #fff;\n border-right: 1px solid #e0e0e0;\n display: flex;\n flex-direction: column;\n /* Width controlled by [style.width.px] binding */\n}\n\n/* Tree Header */\n.tree-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 16px;\n background: linear-gradient(135deg, #5c6bc0 0%, #3949ab 100%);\n color: #fff;\n}\n\n.header-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 600;\n}\n\n.header-title i {\n font-size: 16px;\n}\n\n.query-count {\n font-weight: 400;\n opacity: 0.8;\n font-size: 13px;\n}\n\n.header-actions {\n display: flex;\n gap: 4px;\n}\n\n.icon-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n background: rgba(255, 255, 255, 0.15);\n color: #fff;\n border-radius: 4px;\n cursor: pointer;\n transition: background 0.15s ease;\n}\n\n.icon-btn:hover {\n background: rgba(255, 255, 255, 0.25);\n}\n\n/* Tree Search */\n.tree-search {\n padding: 12px;\n border-bottom: 1px solid #e0e0e0;\n}\n\n.search-input-wrapper {\n display: flex;\n align-items: center;\n width: 100%;\n border: 1px solid #ccc;\n border-radius: 4px;\n background: #fff;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n\n.search-input-wrapper:focus-within {\n border-color: #5c6bc0;\n box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.15);\n}\n\n.search-icon {\n color: #888;\n margin-left: 10px;\n font-size: 14px;\n}\n\n.search-input {\n flex: 1;\n border: none;\n outline: none;\n padding: 8px 10px;\n font-size: 14px;\n background: transparent;\n}\n\n.search-input::placeholder {\n color: #999;\n}\n\n.clear-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n background: transparent;\n color: #888;\n cursor: pointer;\n margin-right: 4px;\n border-radius: 4px;\n}\n\n.clear-btn:hover {\n color: #333;\n background: #f0f0f0;\n}\n\n/* Tree Content */\n.tree-content {\n flex: 1;\n overflow-y: auto;\n padding: 8px 0;\n}\n\n/* Loading & Empty States */\n.loading-state,\n.empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px 20px;\n text-align: center;\n}\n\n.empty-icon {\n font-size: 36px;\n color: #ccc;\n margin-bottom: 12px;\n}\n\n.empty-state p {\n margin: 0;\n color: #666;\n font-size: 14px;\n}\n\n/* Category Tree */\n.category-tree {\n padding: 0 4px;\n}\n\n.category-item {\n margin-bottom: 2px;\n}\n\n.category-header {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 12px;\n cursor: pointer;\n border-radius: 4px;\n transition: background 0.15s ease;\n}\n\n.category-header:hover {\n background: #f0f0f0;\n}\n\n.expand-icon {\n font-size: 10px;\n color: #888;\n width: 12px;\n text-align: center;\n}\n\n.category-icon {\n color: #f9a825;\n font-size: 14px;\n}\n\n.category-name {\n flex: 1;\n font-weight: 500;\n color: #333;\n font-size: 13px;\n}\n\n.category-count {\n color: #888;\n font-size: 12px;\n}\n\n/* Query Items */\n.category-queries {\n margin-left: 28px;\n}\n\n.query-item {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 8px 12px;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.15s ease;\n margin: 2px 0;\n}\n\n.query-item:hover {\n background: #f0f7ff;\n}\n\n.query-item.selected {\n background: #e3f2fd;\n border-left: 3px solid #2196f3;\n margin-left: -3px;\n}\n\n.query-item.hidden {\n display: none;\n}\n\n.query-icon {\n color: #5c6bc0;\n font-size: 14px;\n margin-top: 2px;\n}\n\n.query-info {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.query-name {\n font-size: 13px;\n color: #333;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.query-description {\n font-size: 11px;\n color: #888;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.param-icon {\n color: #f9a825;\n font-size: 12px;\n margin-top: 2px;\n}\n\n.query-details-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n background: transparent;\n color: #999;\n cursor: pointer;\n border-radius: 4px;\n opacity: 0;\n transition: all 0.15s ease;\n flex-shrink: 0;\n}\n\n.query-item:hover .query-details-btn {\n opacity: 1;\n}\n\n.query-details-btn:hover {\n background: rgba(92, 107, 192, 0.15);\n color: #5c6bc0;\n}\n\n/* Resize Handle */\n.resize-handle {\n flex-shrink: 0;\n width: 6px;\n cursor: col-resize;\n background: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background 0.15s ease;\n position: relative;\n z-index: 10;\n}\n\n.resize-handle:hover,\n.resize-handle.active {\n background: rgba(92, 107, 192, 0.15);\n}\n\n.resize-handle-grip {\n width: 2px;\n height: 32px;\n border-radius: 1px;\n background: #ccc;\n transition: background 0.15s ease;\n}\n\n.resize-handle:hover .resize-handle-grip,\n.resize-handle.active .resize-handle-grip {\n background: #5c6bc0;\n}\n\n/* Prevent text selection and set cursor during resize */\n.query-browser-container.resizing {\n cursor: col-resize;\n user-select: none;\n}\n\n.query-browser-container.resizing * {\n pointer-events: none;\n}\n\n.query-browser-container.resizing .resize-handle {\n pointer-events: auto;\n}\n\n/* Right Panel: Query Viewer */\n.query-viewer-panel {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n}\n\n/* No Selection State */\n.no-selection {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 40px;\n}\n\n.no-selection-icon {\n font-size: 64px;\n color: #ddd;\n margin-bottom: 20px;\n}\n\n.no-selection-message {\n font-size: 18px;\n color: #666;\n margin: 0 0 8px 0;\n}\n\n.no-selection-hint {\n font-size: 14px;\n color: #999;\n margin: 0;\n}\n\n/* Query Viewer fills remaining space */\nmj-query-viewer {\n flex: 1;\n min-height: 0;\n}\n\n/* Scrollbar styling */\n.tree-content::-webkit-scrollbar {\n width: 6px;\n}\n\n.tree-content::-webkit-scrollbar-track {\n background: #f1f1f1;\n}\n\n.tree-content::-webkit-scrollbar-thumb {\n background: #ccc;\n border-radius: 3px;\n}\n\n.tree-content::-webkit-scrollbar-thumb:hover {\n background: #aaa;\n}\n\n/* Responsive */\n@media (max-width: 768px) {\n .query-browser-container {\n flex-direction: column;\n }\n\n .query-tree-panel {\n width: 100% !important;\n height: 40%;\n border-right: none;\n border-bottom: 1px solid #e0e0e0;\n }\n\n .resize-handle {\n display: none;\n }\n\n .query-viewer-panel {\n height: 60%;\n }\n}\n"] }]
|
|
735
739
|
}], () => [{ type: i0.ChangeDetectorRef }, { type: i1.NavigationService }, { type: i2.Router }, { type: i0.ElementRef }, { type: i0.NgZone }], null); })();
|
|
736
740
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryBrowserResourceComponent, { className: "QueryBrowserResourceComponent", filePath: "src/QueryBrowser/query-browser-resource.component.ts", lineNumber: 40 }); })();
|
|
737
741
|
//# sourceMappingURL=query-browser-resource.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-browser-resource.component.js","sourceRoot":"","sources":["../../src/QueryBrowser/query-browser-resource.component.ts","../../src/QueryBrowser/query-browser-resource.component.html"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,SAAS,EAAwC,uBAAuB,EAAsB,MAAM,eAAe,CAAC;AAC7H,OAAO,EAAU,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAqB,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAa,iBAAiB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAgB,cAAc,EAAE,MAAM,+BAA+B,CAAC;;;;;;;;;;IC2BnE,kCAAkD;IAAxB,kMAAS,oBAAa,KAAC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;YAGzC,AADE,AADE,iBAAS,EACL,EACF;YAIJ,AADF,gCAAyB,eACW;YAChC,yBAA8C;YAC9C,kCAIsD;YAApD,sJAAS,uCAAyC,KAAC;YAJrD,iBAIsD;YACtD,qGAAkB;YAMtB,AADE,iBAAM,EACF;YAGN,gCAA0B;YAExB,kGAAiB;YAOjB,kGAA0C;YAQ1C,kGAAgE;YAQhE,kGAAwC;YAQ5C,AADE,iBAAM,EACF;YAGN,gCAEsC;YAApC,4JAAa,yBAAqB,KAAC;YACnC,2BAAsC;YACxC,iBAAM;YAGN,gCAAgC;YAE9B,kGAAsB;YAStB,8GAAqB;YAWzB,AADE,iBAAM,EACF;YAGN,iIAA2C;;YA7GN,0CAA6B;YAElC,cAA6B;YAA7B,6CAA6B;YAM3B,eAA4B;YAA5B,yDAA4B;YAqBpD,gBAAoB;YAApB,sCAAoB;YAGtB,cAIC;YAJD,0CAIC;YAOH,eAIC;YAJD,yCAIC;YAGD,cAKC;YALD,sEAKC;YAGD,cAKC;YALD,gGAKC;YAGD,cAMC;YAND,oEAMC;YAMH,cAA2B;YAA3B,wCAA2B;YAQ3B,eAMC;YAND,8CAMC;YAGD,cASC;YATD,6CASC;;;ADlEQ,6BAA6B;IARzC,aAAa,CAAC,qBAAqB,EAAE,sBAAsB,CAAC;GAQhD,6BAA6B,CAohBzC;;iFAphBY,6BAA6B;cAPzC,SAAS;6BACI,KAAK,YACL,2BAA2B,mBAGpB,uBAAuB,CAAC,MAAM;;kFAEtC,6BAA6B","sourcesContent":["import { Component, OnInit, OnDestroy, ChangeDetectorRef, ChangeDetectionStrategy, ElementRef, NgZone } from '@angular/core';\nimport { Router, NavigationEnd } from '@angular/router';\nimport { Subject } from 'rxjs';\nimport { takeUntil, filter } from 'rxjs/operators';\nimport { RegisterClass } from '@memberjunction/global';\nimport { BaseResourceComponent, NavigationService } from '@memberjunction/ng-shared';\nimport { Metadata, QueryInfo, QueryCategoryInfo, CompositeKey } from '@memberjunction/core';\nimport { ResourceData, UserInfoEngine } from '@memberjunction/core-entities';\nimport {\n QueryEntityLinkClickEvent,\n QueryRowClickEvent\n} from '@memberjunction/ng-query-viewer';\n/**\n * Tree node for the query category hierarchy\n */\ninterface CategoryNode {\n category: QueryCategoryInfo;\n children: CategoryNode[];\n queries: QueryInfo[];\n expanded: boolean;\n level: number;\n}\n\n/**\n * A resource component for browsing and executing stored queries.\n * Features:\n * - Hierarchical category navigation\n * - Query search\n * - Query viewer with parameter input\n * - Entity linking for clickable record IDs\n */\n@RegisterClass(BaseResourceComponent, 'QueryBrowserResource')\n@Component({\n standalone: false,\n selector: 'mj-query-browser-resource',\n templateUrl: './query-browser-resource.component.html',\n styleUrls: ['./query-browser-resource.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class QueryBrowserResourceComponent extends BaseResourceComponent implements OnInit, OnDestroy {\n private static readonly SETTINGS_KEY = 'QueryBrowser/panelWidth';\n private static readonly DEFAULT_PANEL_WIDTH = 320;\n private static readonly MIN_PANEL_WIDTH = 200;\n private static readonly MAX_PANEL_WIDTH = 600;\n\n public isLoading = true;\n public categories: QueryCategoryInfo[] = [];\n public categoryTree: CategoryNode[] = [];\n public queries: QueryInfo[] = [];\n public filteredQueries: QueryInfo[] = [];\n public selectedQuery: QueryInfo | null = null;\n public searchText = '';\n public PanelWidth = QueryBrowserResourceComponent.DEFAULT_PANEL_WIDTH;\n public IsResizing = false;\n\n private metadata = new Metadata();\n private destroy$ = new Subject<void>();\n private dataLoaded = false;\n private skipUrlUpdate = true; // Skip URL updates during initialization\n private lastNavigatedUrl = ''; // Track URL to avoid reacting to our own navigation\n\n // Bound event handlers for resize (need references for removeEventListener)\n private boundOnResizeMove = this.onResizeMove.bind(this);\n private boundOnResizeEnd = this.onResizeEnd.bind(this);\n\n constructor(\n private cdr: ChangeDetectorRef,\n private navigationService: NavigationService,\n private router: Router,\n private elementRef: ElementRef,\n private zone: NgZone\n ) {\n super();\n }\n\n ngOnInit(): void {\n this.loadSavedPanelWidth();\n this.loadData();\n\n // Subscribe to router NavigationEnd events for back/forward button support\n this.router.events\n .pipe(\n filter((event): event is NavigationEnd => event instanceof NavigationEnd),\n takeUntil(this.destroy$)\n )\n .subscribe(event => {\n const currentUrl = event.urlAfterRedirects || event.url;\n if (currentUrl !== this.lastNavigatedUrl && this.dataLoaded) {\n this.onExternalNavigation(currentUrl);\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n // Ensure any pending debounced settings are flushed\n UserInfoEngine.Instance.FlushPendingSettings();\n // Remove resize listeners if active\n document.removeEventListener('mousemove', this.boundOnResizeMove);\n document.removeEventListener('mouseup', this.boundOnResizeEnd);\n }\n\n async GetResourceDisplayName(data: ResourceData): Promise<string> {\n return 'Queries';\n }\n\n async GetResourceIconClass(data: ResourceData): Promise<string> {\n return 'fa-solid fa-database';\n }\n\n // ========================================\n // Data Loading\n // ========================================\n\n private async loadData(forceRefresh = false): Promise<void> {\n try {\n this.isLoading = true;\n this.cdr.markForCheck();\n\n // Force re-fetch from server when explicitly refreshing\n if (forceRefresh) {\n await this.metadata.Refresh();\n }\n\n // Load from metadata\n this.categories = this.metadata.QueryCategories || [];\n this.queries = (this.metadata.Queries || []).filter(q =>\n q.Status === 'Approved' && q.UserCanRun(this.metadata.CurrentUser)\n );\n\n this.filteredQueries = [...this.queries];\n this.buildCategoryTree();\n\n // Mark data as loaded and apply any query params for deep linking\n this.dataLoaded = true;\n\n // Parse initial URL state\n const urlState = this.parseUrlState();\n if (urlState?.queryId) {\n const query = this.queries.find(q => q.ID === urlState.queryId);\n if (query) {\n this.selectedQuery = query;\n this.expandCategoryForQuery(query);\n }\n }\n\n // Enable URL updates after initialization\n this.skipUrlUpdate = false;\n\n } catch (error) {\n console.error('Error loading queries:', error);\n } finally {\n this.isLoading = false;\n this.NotifyLoadComplete();\n this.cdr.markForCheck();\n }\n }\n\n private buildCategoryTree(): void {\n const categoryMap = new Map<string, CategoryNode>();\n\n // Create nodes for all categories\n for (const category of this.categories) {\n const queriesInCategory = this.queries.filter(q => q.CategoryID === category.ID);\n categoryMap.set(category.ID, {\n category,\n children: [],\n queries: queriesInCategory,\n expanded: true,\n level: 0\n });\n }\n\n // Build tree structure\n const roots: CategoryNode[] = [];\n for (const category of this.categories) {\n const node = categoryMap.get(category.ID)!;\n if (category.ParentID) {\n const parent = categoryMap.get(category.ParentID);\n if (parent) {\n node.level = parent.level + 1;\n parent.children.push(node);\n } else {\n roots.push(node);\n }\n } else {\n roots.push(node);\n }\n }\n\n // Add uncategorized queries to a virtual root\n const uncategorizedQueries = this.queries.filter(q => !q.CategoryID);\n if (uncategorizedQueries.length > 0) {\n const uncategorizedCategory = new QueryCategoryInfo({\n ID: '__uncategorized__',\n Name: 'Uncategorized',\n Description: 'Queries without a category'\n });\n roots.push({\n category: uncategorizedCategory,\n children: [],\n queries: uncategorizedQueries,\n expanded: true,\n level: 0\n });\n }\n\n // Sort children recursively\n const sortNodes = (nodes: CategoryNode[]): void => {\n nodes.sort((a, b) => a.category.Name.localeCompare(b.category.Name));\n for (const node of nodes) {\n node.queries.sort((a, b) => a.Name.localeCompare(b.Name));\n sortNodes(node.children);\n }\n };\n sortNodes(roots);\n\n this.categoryTree = roots;\n }\n\n // ========================================\n // Search\n // ========================================\n\n public onSearchChange(value: string): void {\n this.searchText = value;\n\n if (!value.trim()) {\n this.filteredQueries = [...this.queries];\n } else {\n const searchLower = value.toLowerCase();\n this.filteredQueries = this.queries.filter(q =>\n q.Name.toLowerCase().includes(searchLower) ||\n q.Description?.toLowerCase().includes(searchLower) ||\n q.Category?.toLowerCase().includes(searchLower)\n );\n }\n\n // Expand all categories when searching\n if (value) {\n this.expandAll();\n }\n\n this.cdr.markForCheck();\n }\n\n public clearSearch(): void {\n this.searchText = '';\n this.filteredQueries = [...this.queries];\n this.cdr.markForCheck();\n }\n\n // ========================================\n // Tree Navigation\n // ========================================\n\n public toggleExpand(node: CategoryNode, event?: Event): void {\n if (event) {\n event.stopPropagation();\n }\n node.expanded = !node.expanded;\n this.cdr.markForCheck();\n }\n\n public expandAll(): void {\n const expand = (nodes: CategoryNode[]): void => {\n for (const node of nodes) {\n node.expanded = true;\n expand(node.children);\n }\n };\n expand(this.categoryTree);\n this.cdr.markForCheck();\n }\n\n public collapseAll(): void {\n const collapse = (nodes: CategoryNode[]): void => {\n for (const node of nodes) {\n node.expanded = false;\n collapse(node.children);\n }\n };\n collapse(this.categoryTree);\n this.cdr.markForCheck();\n }\n\n public selectQuery(query: QueryInfo, event?: Event): void {\n if (event) {\n event.stopPropagation();\n }\n this.selectedQuery = query;\n this.updateUrl();\n this.cdr.markForCheck();\n }\n\n public isQueryVisible(query: QueryInfo): boolean {\n if (!this.searchText) return true;\n return this.filteredQueries.some(q => q.ID === query.ID);\n }\n\n public hasVisibleContent(node: CategoryNode): boolean {\n if (!this.searchText) return true;\n\n // Check if any queries in this category match\n if (node.queries.some(q => this.isQueryVisible(q))) {\n return true;\n }\n\n // Check if any child categories have visible content\n return node.children.some(child => this.hasVisibleContent(child));\n }\n\n // ========================================\n // Query Viewer Events\n // ========================================\n\n public onEntityLinkClick(event: QueryEntityLinkClickEvent): void {\n // Open the entity record using navigation service\n // Convert the recordId string to a CompositeKey (assumes single-field primary key)\n const compositeKey = CompositeKey.FromID(event.recordId);\n this.navigationService.OpenEntityRecord(event.entityName, compositeKey);\n }\n\n public onRowDoubleClick(event: QueryRowClickEvent): void {\n // Could show record details or other action\n }\n\n public onOpenQueryRecord(event: { queryId: string; queryName: string }): void {\n // Open the Query entity record using navigation service\n const compositeKey = CompositeKey.FromID(event.queryId);\n this.navigationService.OpenEntityRecord('MJ: Queries', compositeKey);\n }\n\n public openQueryDetails(query: QueryInfo, event: Event): void {\n // Stop propagation so clicking the button doesn't also select the query\n event.stopPropagation();\n // Open the Query entity record\n const compositeKey = CompositeKey.FromID(query.ID);\n this.navigationService.OpenEntityRecord('MJ: Queries', compositeKey);\n }\n\n // ========================================\n // Utilities\n // ========================================\n\n public getTotalQueryCount(): number {\n return this.queries.length;\n }\n\n public getNodeQueryCount(node: CategoryNode): number {\n let count = node.queries.length;\n for (const child of node.children) {\n count += this.getNodeQueryCount(child);\n }\n return count;\n }\n\n public refresh(): void {\n this.selectedQuery = null;\n this.loadData(true);\n }\n\n public trackByCategory(index: number, node: CategoryNode): string {\n return node.category.ID;\n }\n\n public trackByQuery(index: number, query: QueryInfo): string {\n return query.ID;\n }\n\n // ========================================\n // Deep Linking\n // ========================================\n\n /**\n * Parse URL query string for query state.\n * Query params: queryId\n */\n private parseUrlState(): { queryId?: string } | null {\n const url = this.router.url;\n const queryIndex = url.indexOf('?');\n if (queryIndex === -1) return null;\n\n const queryString = url.substring(queryIndex + 1);\n const params = new URLSearchParams(queryString);\n const queryId = params.get('queryId');\n\n if (!queryId) return null;\n\n return { queryId };\n }\n\n /**\n * Update URL query string to reflect current state.\n * Uses NavigationService for proper URL management that respects app-scoped routes.\n */\n private updateUrl(): void {\n if (this.skipUrlUpdate) return;\n\n const queryParams: Record<string, string | null> = {};\n\n // Add query ID if selected, null to remove\n if (this.selectedQuery?.ID) {\n queryParams['queryId'] = this.selectedQuery.ID;\n } else {\n queryParams['queryId'] = null;\n }\n\n // Use NavigationService to update query params properly\n this.navigationService.UpdateActiveTabQueryParams(queryParams);\n }\n\n /**\n * Handle external navigation (back/forward buttons).\n * Parses the URL and applies the state without triggering a new navigation.\n */\n private onExternalNavigation(url: string): void {\n // Check if this URL is for our component (contains our base path)\n const currentPath = this.router.url.split('?')[0];\n const newPath = url.split('?')[0];\n\n // Only handle if we're still on the same base path (same component instance)\n if (currentPath !== newPath) {\n return; // Different route entirely, shell will handle it\n }\n\n // Parse the new URL state\n const urlState = this.parseUrlFromString(url);\n\n // Apply the state without triggering URL updates\n this.skipUrlUpdate = true;\n if (urlState?.queryId) {\n const query = this.queries.find(q => q.ID === urlState.queryId);\n if (query) {\n if (this.selectedQuery?.ID !== query.ID) {\n this.selectedQuery = query;\n this.expandCategoryForQuery(query);\n }\n }\n } else {\n // No queryId means clear selection\n this.selectedQuery = null;\n }\n this.skipUrlUpdate = false;\n\n // Update the tracked URL\n this.lastNavigatedUrl = url;\n\n this.cdr.markForCheck();\n }\n\n /**\n * Parse URL state from a URL string (used for external navigation).\n */\n private parseUrlFromString(url: string): { queryId?: string } | null {\n const queryIndex = url.indexOf('?');\n if (queryIndex === -1) return null;\n\n const queryString = url.substring(queryIndex + 1);\n const params = new URLSearchParams(queryString);\n const queryId = params.get('queryId');\n\n if (!queryId) return null;\n\n return { queryId };\n }\n\n /**\n * Expands the category tree to show the given query\n */\n private expandCategoryForQuery(query: QueryInfo): void {\n if (!query.CategoryID) return;\n\n const expandCategory = (nodes: CategoryNode[], targetCategoryId: string): boolean => {\n for (const node of nodes) {\n if (node.category.ID === targetCategoryId) {\n node.expanded = true;\n return true;\n }\n if (this.expandCategoryForQueryRecursive(node.children, targetCategoryId)) {\n node.expanded = true;\n return true;\n }\n }\n return false;\n };\n\n expandCategory(this.categoryTree, query.CategoryID);\n }\n\n /**\n * Helper for recursive category expansion\n */\n private expandCategoryForQueryRecursive(nodes: CategoryNode[], targetCategoryId: string): boolean {\n for (const node of nodes) {\n if (node.category.ID === targetCategoryId) {\n node.expanded = true;\n return true;\n }\n if (node.children.length > 0 && this.expandCategoryForQueryRecursive(node.children, targetCategoryId)) {\n node.expanded = true;\n return true;\n }\n }\n return false;\n }\n\n // ========================================\n // Panel Resize\n // ========================================\n\n /**\n * Load saved panel width from user settings\n */\n private loadSavedPanelWidth(): void {\n const saved = UserInfoEngine.Instance.GetSetting(QueryBrowserResourceComponent.SETTINGS_KEY);\n if (saved) {\n const width = parseInt(saved, 10);\n if (!isNaN(width) && width >= QueryBrowserResourceComponent.MIN_PANEL_WIDTH && width <= QueryBrowserResourceComponent.MAX_PANEL_WIDTH) {\n this.PanelWidth = width;\n }\n }\n }\n\n /**\n * Start resizing the left panel via drag handle\n */\n public onResizeStart(event: MouseEvent): void {\n event.preventDefault();\n this.IsResizing = true;\n this.cdr.markForCheck();\n\n // Run outside Angular zone for performance during mousemove\n this.zone.runOutsideAngular(() => {\n document.addEventListener('mousemove', this.boundOnResizeMove);\n document.addEventListener('mouseup', this.boundOnResizeEnd);\n });\n }\n\n private onResizeMove(event: MouseEvent): void {\n if (!this.IsResizing) return;\n\n const containerRect = this.elementRef.nativeElement.querySelector('.query-browser-container')?.getBoundingClientRect();\n if (!containerRect) return;\n\n const newWidth = event.clientX - containerRect.left;\n const clamped = Math.max(\n QueryBrowserResourceComponent.MIN_PANEL_WIDTH,\n Math.min(QueryBrowserResourceComponent.MAX_PANEL_WIDTH, newWidth)\n );\n\n this.PanelWidth = clamped;\n this.zone.run(() => this.cdr.markForCheck());\n }\n\n private onResizeEnd(): void {\n if (!this.IsResizing) return;\n this.IsResizing = false;\n\n document.removeEventListener('mousemove', this.boundOnResizeMove);\n document.removeEventListener('mouseup', this.boundOnResizeEnd);\n\n // Persist width with debouncing\n UserInfoEngine.Instance.SetSettingDebounced(\n QueryBrowserResourceComponent.SETTINGS_KEY,\n this.PanelWidth.toString()\n );\n\n this.zone.run(() => this.cdr.markForCheck());\n }\n}\n","<!-- Query Browser Resource -->\n<div class=\"query-browser-container\" [class.resizing]=\"IsResizing\">\n <!-- Left Panel: Query Tree -->\n <div class=\"query-tree-panel\" [style.width.px]=\"PanelWidth\">\n <!-- Header -->\n <div class=\"tree-header\">\n <div class=\"header-title\">\n <i class=\"fa-solid fa-database\"></i>\n <span>Queries</span>\n <span class=\"query-count\">({{ getTotalQueryCount() }})</span>\n </div>\n <div class=\"header-actions\">\n <button class=\"icon-btn\" (click)=\"expandAll()\" title=\"Expand all\">\n <i class=\"fa-solid fa-folder-open\"></i>\n </button>\n <button class=\"icon-btn\" (click)=\"collapseAll()\" title=\"Collapse all\">\n <i class=\"fa-solid fa-folder\"></i>\n </button>\n <button class=\"icon-btn\" (click)=\"refresh()\" title=\"Refresh\">\n <i class=\"fa-solid fa-refresh\"></i>\n </button>\n </div>\n </div>\n\n <!-- Search -->\n <div class=\"tree-search\">\n <div class=\"search-input-wrapper\">\n <i class=\"fa-solid fa-search search-icon\"></i>\n <input type=\"text\"\n class=\"search-input\"\n [value]=\"searchText\"\n placeholder=\"Search queries...\"\n (input)=\"onSearchChange($any($event.target).value)\">\n @if (searchText) {\n <button class=\"clear-btn\" (click)=\"clearSearch()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n }\n </div>\n </div>\n\n <!-- Tree Content -->\n <div class=\"tree-content\">\n <!-- Loading -->\n @if (isLoading) {\n <div class=\"loading-state\">\n <mj-loading text=\"Loading queries...\"></mj-loading>\n </div>\n }\n\n <!-- Empty -->\n @if (!isLoading && queries.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-database empty-icon\"></i>\n <p>No queries available</p>\n </div>\n }\n\n <!-- No results -->\n @if (!isLoading && searchText && filteredQueries.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-search empty-icon\"></i>\n <p>No queries match \"{{ searchText }}\"</p>\n </div>\n }\n\n <!-- Category Tree -->\n @if (!isLoading && queries.length > 0) {\n <div class=\"category-tree\">\n @for (node of categoryTree; track trackByCategory($index, node)) {\n <ng-container *ngTemplateOutlet=\"categoryNode; context: { node: node }\"></ng-container>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Resize Handle -->\n <div class=\"resize-handle\"\n [class.active]=\"IsResizing\"\n (mousedown)=\"onResizeStart($event)\">\n <div class=\"resize-handle-grip\"></div>\n </div>\n\n <!-- Right Panel: Query Viewer -->\n <div class=\"query-viewer-panel\">\n <!-- No query selected -->\n @if (!selectedQuery) {\n <div class=\"no-selection\">\n <i class=\"fa-solid fa-hand-pointer no-selection-icon\"></i>\n <p class=\"no-selection-message\">Select a query from the list</p>\n <p class=\"no-selection-hint\">Click on a query to view and run it</p>\n </div>\n }\n\n <!-- Query Viewer -->\n @if (selectedQuery) {\n <mj-query-viewer\n [QueryId]=\"selectedQuery.ID\"\n [AutoRun]=\"true\"\n [SelectionMode]=\"'multiple'\"\n (EntityLinkClick)=\"onEntityLinkClick($event)\"\n (RowDoubleClick)=\"onRowDoubleClick($event)\"\n (OpenQueryRecord)=\"onOpenQueryRecord($event)\">\n </mj-query-viewer>\n }\n </div>\n</div>\n\n<!-- Category Node Template -->\n<ng-template #categoryNode let-node=\"node\">\n @if (hasVisibleContent(node)) {\n <div class=\"category-item\"\n [class.expanded]=\"node.expanded\"\n [style.padding-left.px]=\"node.level * 16 + 8\">\n <div class=\"category-header\" (click)=\"toggleExpand(node)\">\n <i class=\"fa-solid expand-icon\"\n [class.fa-chevron-down]=\"node.expanded\"\n [class.fa-chevron-right]=\"!node.expanded\"></i>\n <i class=\"fa-solid fa-folder category-icon\"\n [class.fa-folder-open]=\"node.expanded\"></i>\n <span class=\"category-name\">{{ node.category.Name }}</span>\n <span class=\"category-count\">({{ getNodeQueryCount(node) }})</span>\n </div>\n <!-- Queries in this category -->\n @if (node.expanded) {\n <div class=\"category-queries\">\n @for (query of node.queries; track trackByQuery($index, query)) {\n <div class=\"query-item\"\n [class.selected]=\"selectedQuery?.ID === query.ID\"\n [class.hidden]=\"!isQueryVisible(query)\"\n (click)=\"selectQuery(query, $event)\">\n <i class=\"fa-solid fa-file-code query-icon\"></i>\n <div class=\"query-info\">\n <span class=\"query-name\">{{ query.Name }}</span>\n @if (query.Description) {\n <span class=\"query-description\">{{ query.Description }}</span>\n }\n </div>\n @if (query.UsesTemplate) {\n <i class=\"fa-solid fa-sliders param-icon\" title=\"Has parameters\"></i>\n }\n </div>\n }\n </div>\n }\n <!-- Child categories -->\n @if (node.expanded) {\n @for (child of node.children; track trackByCategory($index, child)) {\n <ng-container *ngTemplateOutlet=\"categoryNode; context: { node: child }\"></ng-container>\n }\n }\n </div>\n }\n</ng-template>\n"]}
|
|
1
|
+
{"version":3,"file":"query-browser-resource.component.js","sourceRoot":"","sources":["../../src/QueryBrowser/query-browser-resource.component.ts","../../src/QueryBrowser/query-browser-resource.component.html"],"names":[],"mappings":";;;;;;;AAAA,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N,0CAA6B;YAElC,cAA6B;YAA7B,6CAA6B;YAM3B,eAA4B;YAA5B,yDAA4B;YAqBpD,gBAAoB;YAApB,sCAAoB;YAGtB,cAIC;YAJD,0CAIC;YAOH,eAIC;YAJD,yCAIC;YAGD,cAKC;YALD,sEAKC;YAGD,cAKC;YALD,gGAKC;YAGD,cAMC;YAND,oEAMC;YAMH,cAA2B;YAA3B,wCAA2B;YAQ3B,eAMC;YAND,8CAMC;YAGD,cASC;YATD,6CASC;;;ADlEQ,6BAA6B;IARzC,aAAa,CAAC,qBAAqB,EAAE,sBAAsB,CAAC;GAQhD,6BAA6B,CAyhBzC;;iFAzhBY,6BAA6B;cAPzC,SAAS;6BACI,KAAK,YACL,2BAA2B,mBAGpB,uBAAuB,CAAC,MAAM;;kFAEtC,6BAA6B","sourcesContent":["import { Component, OnInit, OnDestroy, ChangeDetectorRef, ChangeDetectionStrategy, ElementRef, NgZone } from '@angular/core';\nimport { Router, NavigationEnd } from '@angular/router';\nimport { Subject } from 'rxjs';\nimport { takeUntil, filter } from 'rxjs/operators';\nimport { RegisterClass , UUIDsEqual } from '@memberjunction/global';\nimport { BaseResourceComponent, NavigationService } from '@memberjunction/ng-shared';\nimport { Metadata, QueryInfo, QueryCategoryInfo, CompositeKey } from '@memberjunction/core';\nimport { ResourceData, UserInfoEngine } from '@memberjunction/core-entities';\nimport {\n QueryEntityLinkClickEvent,\n QueryRowClickEvent\n} from '@memberjunction/ng-query-viewer';\n/**\n * Tree node for the query category hierarchy\n */\ninterface CategoryNode {\n category: QueryCategoryInfo;\n children: CategoryNode[];\n queries: QueryInfo[];\n expanded: boolean;\n level: number;\n}\n\n/**\n * A resource component for browsing and executing stored queries.\n * Features:\n * - Hierarchical category navigation\n * - Query search\n * - Query viewer with parameter input\n * - Entity linking for clickable record IDs\n */\n@RegisterClass(BaseResourceComponent, 'QueryBrowserResource')\n@Component({\n standalone: false,\n selector: 'mj-query-browser-resource',\n templateUrl: './query-browser-resource.component.html',\n styleUrls: ['./query-browser-resource.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class QueryBrowserResourceComponent extends BaseResourceComponent implements OnInit, OnDestroy {\n private static readonly SETTINGS_KEY = 'QueryBrowser/panelWidth';\n private static readonly DEFAULT_PANEL_WIDTH = 320;\n private static readonly MIN_PANEL_WIDTH = 200;\n private static readonly MAX_PANEL_WIDTH = 600;\n\n public isLoading = true;\n public categories: QueryCategoryInfo[] = [];\n public categoryTree: CategoryNode[] = [];\n public queries: QueryInfo[] = [];\n public filteredQueries: QueryInfo[] = [];\n public selectedQuery: QueryInfo | null = null;\n public searchText = '';\n public PanelWidth = QueryBrowserResourceComponent.DEFAULT_PANEL_WIDTH;\n public IsResizing = false;\n\n private metadata = new Metadata();\n private destroy$ = new Subject<void>();\n private dataLoaded = false;\n private skipUrlUpdate = true; // Skip URL updates during initialization\n private lastNavigatedUrl = ''; // Track URL to avoid reacting to our own navigation\n\n // Bound event handlers for resize (need references for removeEventListener)\n private boundOnResizeMove = this.onResizeMove.bind(this);\n private boundOnResizeEnd = this.onResizeEnd.bind(this);\n\n constructor(\n private cdr: ChangeDetectorRef,\n private navigationService: NavigationService,\n private router: Router,\n private elementRef: ElementRef,\n private zone: NgZone\n ) {\n super();\n }\n\n ngOnInit(): void {\n this.loadSavedPanelWidth();\n this.loadData();\n\n // Subscribe to router NavigationEnd events for back/forward button support\n this.router.events\n .pipe(\n filter((event): event is NavigationEnd => event instanceof NavigationEnd),\n takeUntil(this.destroy$)\n )\n .subscribe(event => {\n const currentUrl = event.urlAfterRedirects || event.url;\n if (currentUrl !== this.lastNavigatedUrl && this.dataLoaded) {\n this.onExternalNavigation(currentUrl);\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n // Ensure any pending debounced settings are flushed\n UserInfoEngine.Instance.FlushPendingSettings();\n // Remove resize listeners if active\n document.removeEventListener('mousemove', this.boundOnResizeMove);\n document.removeEventListener('mouseup', this.boundOnResizeEnd);\n }\n\n async GetResourceDisplayName(data: ResourceData): Promise<string> {\n return 'Queries';\n }\n\n async GetResourceIconClass(data: ResourceData): Promise<string> {\n return 'fa-solid fa-database';\n }\n\n // ========================================\n // Data Loading\n // ========================================\n\n private async loadData(forceRefresh = false): Promise<void> {\n try {\n this.isLoading = true;\n this.cdr.markForCheck();\n\n // Force re-fetch from server when explicitly refreshing\n if (forceRefresh) {\n await this.metadata.Refresh();\n }\n\n // Load from metadata\n this.categories = this.metadata.QueryCategories || [];\n this.queries = (this.metadata.Queries || []).filter(q =>\n q.Status === 'Approved' && q.UserCanRun(this.metadata.CurrentUser)\n );\n\n this.filteredQueries = [...this.queries];\n this.buildCategoryTree();\n\n // Mark data as loaded and apply any query params for deep linking\n this.dataLoaded = true;\n\n // Parse initial URL state\n const urlState = this.parseUrlState();\n if (urlState?.queryId) {\n const query = this.queries.find(q => UUIDsEqual(q.ID, urlState.queryId));\n if (query) {\n this.selectedQuery = query;\n this.expandCategoryForQuery(query);\n }\n }\n\n // Enable URL updates after initialization\n this.skipUrlUpdate = false;\n\n } catch (error) {\n console.error('Error loading queries:', error);\n } finally {\n this.isLoading = false;\n this.NotifyLoadComplete();\n this.cdr.markForCheck();\n }\n }\n\n private buildCategoryTree(): void {\n const categoryMap = new Map<string, CategoryNode>();\n\n // Create nodes for all categories\n for (const category of this.categories) {\n const queriesInCategory = this.queries.filter(q => UUIDsEqual(q.CategoryID, category.ID));\n categoryMap.set(category.ID, {\n category,\n children: [],\n queries: queriesInCategory,\n expanded: true,\n level: 0\n });\n }\n\n // Build tree structure\n const roots: CategoryNode[] = [];\n for (const category of this.categories) {\n const node = categoryMap.get(category.ID)!;\n if (category.ParentID) {\n const parent = categoryMap.get(category.ParentID);\n if (parent) {\n node.level = parent.level + 1;\n parent.children.push(node);\n } else {\n roots.push(node);\n }\n } else {\n roots.push(node);\n }\n }\n\n // Add uncategorized queries to a virtual root\n const uncategorizedQueries = this.queries.filter(q => !q.CategoryID);\n if (uncategorizedQueries.length > 0) {\n const uncategorizedCategory = new QueryCategoryInfo({\n ID: '__uncategorized__',\n Name: 'Uncategorized',\n Description: 'Queries without a category'\n });\n roots.push({\n category: uncategorizedCategory,\n children: [],\n queries: uncategorizedQueries,\n expanded: true,\n level: 0\n });\n }\n\n // Sort children recursively\n const sortNodes = (nodes: CategoryNode[]): void => {\n nodes.sort((a, b) => a.category.Name.localeCompare(b.category.Name));\n for (const node of nodes) {\n node.queries.sort((a, b) => a.Name.localeCompare(b.Name));\n sortNodes(node.children);\n }\n };\n sortNodes(roots);\n\n this.categoryTree = roots;\n }\n\n // ========================================\n // Search\n // ========================================\n\n public onSearchChange(value: string): void {\n this.searchText = value;\n\n if (!value.trim()) {\n this.filteredQueries = [...this.queries];\n } else {\n const searchLower = value.toLowerCase();\n this.filteredQueries = this.queries.filter(q =>\n q.Name.toLowerCase().includes(searchLower) ||\n q.Description?.toLowerCase().includes(searchLower) ||\n q.Category?.toLowerCase().includes(searchLower)\n );\n }\n\n // Expand all categories when searching\n if (value) {\n this.expandAll();\n }\n\n this.cdr.markForCheck();\n }\n\n public clearSearch(): void {\n this.searchText = '';\n this.filteredQueries = [...this.queries];\n this.cdr.markForCheck();\n }\n\n // ========================================\n // Tree Navigation\n // ========================================\n\n public toggleExpand(node: CategoryNode, event?: Event): void {\n if (event) {\n event.stopPropagation();\n }\n node.expanded = !node.expanded;\n this.cdr.markForCheck();\n }\n\n public expandAll(): void {\n const expand = (nodes: CategoryNode[]): void => {\n for (const node of nodes) {\n node.expanded = true;\n expand(node.children);\n }\n };\n expand(this.categoryTree);\n this.cdr.markForCheck();\n }\n\n public collapseAll(): void {\n const collapse = (nodes: CategoryNode[]): void => {\n for (const node of nodes) {\n node.expanded = false;\n collapse(node.children);\n }\n };\n collapse(this.categoryTree);\n this.cdr.markForCheck();\n }\n\n public selectQuery(query: QueryInfo, event?: Event): void {\n if (event) {\n event.stopPropagation();\n }\n this.selectedQuery = query;\n this.updateUrl();\n this.cdr.markForCheck();\n }\n\n public isQueryVisible(query: QueryInfo): boolean {\n if (!this.searchText) return true;\n return this.filteredQueries.some(q => UUIDsEqual(q.ID, query.ID));\n }\n\n public hasVisibleContent(node: CategoryNode): boolean {\n if (!this.searchText) return true;\n\n // Check if any queries in this category match\n if (node.queries.some(q => this.isQueryVisible(q))) {\n return true;\n }\n\n // Check if any child categories have visible content\n return node.children.some(child => this.hasVisibleContent(child));\n }\n\n // ========================================\n // Query Viewer Events\n // ========================================\n\n public onEntityLinkClick(event: QueryEntityLinkClickEvent): void {\n // Open the entity record using navigation service\n // Convert the recordId string to a CompositeKey (assumes single-field primary key)\n const compositeKey = CompositeKey.FromID(event.recordId);\n this.navigationService.OpenEntityRecord(event.entityName, compositeKey);\n }\n\n public onRowDoubleClick(event: QueryRowClickEvent): void {\n // Could show record details or other action\n }\n\n public onOpenQueryRecord(event: { queryId: string; queryName: string }): void {\n // Open the Query entity record using navigation service\n const compositeKey = CompositeKey.FromID(event.queryId);\n this.navigationService.OpenEntityRecord('MJ: Queries', compositeKey);\n }\n\n public openQueryDetails(query: QueryInfo, event: Event): void {\n // Stop propagation so clicking the button doesn't also select the query\n event.stopPropagation();\n // Open the Query entity record\n const compositeKey = CompositeKey.FromID(query.ID);\n this.navigationService.OpenEntityRecord('MJ: Queries', compositeKey);\n }\n\n // ========================================\n // Utilities\n // ========================================\n\n public getTotalQueryCount(): number {\n return this.queries.length;\n }\n\n public getNodeQueryCount(node: CategoryNode): number {\n let count = node.queries.length;\n for (const child of node.children) {\n count += this.getNodeQueryCount(child);\n }\n return count;\n }\n\n public refresh(): void {\n this.selectedQuery = null;\n this.loadData(true);\n }\n\n public trackByCategory(index: number, node: CategoryNode): string {\n return node.category.ID;\n }\n\n public trackByQuery(index: number, query: QueryInfo): string {\n return query.ID;\n }\n\n // ========================================\n // Deep Linking\n // ========================================\n\n /**\n * Parse URL query string for query state.\n * Query params: queryId\n */\n private parseUrlState(): { queryId?: string } | null {\n const url = this.router.url;\n const queryIndex = url.indexOf('?');\n if (queryIndex === -1) return null;\n\n const queryString = url.substring(queryIndex + 1);\n const params = new URLSearchParams(queryString);\n const queryId = params.get('queryId');\n\n if (!queryId) return null;\n\n return { queryId };\n }\n\n /**\n * Update URL query string to reflect current state.\n * Uses NavigationService for proper URL management that respects app-scoped routes.\n */\n private updateUrl(): void {\n if (this.skipUrlUpdate) return;\n\n const queryParams: Record<string, string | null> = {};\n\n // Add query ID if selected, null to remove\n if (this.selectedQuery?.ID) {\n queryParams['queryId'] = this.selectedQuery.ID;\n } else {\n queryParams['queryId'] = null;\n }\n\n // Use NavigationService to update query params properly\n this.navigationService.UpdateActiveTabQueryParams(queryParams);\n }\n\n /**\n * Handle external navigation (back/forward buttons).\n * Parses the URL and applies the state without triggering a new navigation.\n */\n private onExternalNavigation(url: string): void {\n // Check if this URL is for our component (contains our base path)\n const currentPath = this.router.url.split('?')[0];\n const newPath = url.split('?')[0];\n\n // Only handle if we're still on the same base path (same component instance)\n if (currentPath !== newPath) {\n return; // Different route entirely, shell will handle it\n }\n\n // Parse the new URL state\n const urlState = this.parseUrlFromString(url);\n\n // Apply the state without triggering URL updates\n this.skipUrlUpdate = true;\n if (urlState?.queryId) {\n const query = this.queries.find(q => UUIDsEqual(q.ID, urlState.queryId));\n if (query) {\n if (!UUIDsEqual(this.selectedQuery?.ID, query.ID)) {\n this.selectedQuery = query;\n this.expandCategoryForQuery(query);\n }\n }\n } else {\n // No queryId means clear selection\n this.selectedQuery = null;\n }\n this.skipUrlUpdate = false;\n\n // Update the tracked URL\n this.lastNavigatedUrl = url;\n\n this.cdr.markForCheck();\n }\n\n /**\n * Parse URL state from a URL string (used for external navigation).\n */\n private parseUrlFromString(url: string): { queryId?: string } | null {\n const queryIndex = url.indexOf('?');\n if (queryIndex === -1) return null;\n\n const queryString = url.substring(queryIndex + 1);\n const params = new URLSearchParams(queryString);\n const queryId = params.get('queryId');\n\n if (!queryId) return null;\n\n return { queryId };\n }\n\n /**\n * Expands the category tree to show the given query\n */\n private expandCategoryForQuery(query: QueryInfo): void {\n if (!query.CategoryID) return;\n\n const expandCategory = (nodes: CategoryNode[], targetCategoryId: string): boolean => {\n for (const node of nodes) {\n if (UUIDsEqual(node.category.ID, targetCategoryId)) {\n node.expanded = true;\n return true;\n }\n if (this.expandCategoryForQueryRecursive(node.children, targetCategoryId)) {\n node.expanded = true;\n return true;\n }\n }\n return false;\n };\n\n expandCategory(this.categoryTree, query.CategoryID);\n }\n\n /**\n * Helper for recursive category expansion\n */\n private expandCategoryForQueryRecursive(nodes: CategoryNode[], targetCategoryId: string): boolean {\n for (const node of nodes) {\n if (UUIDsEqual(node.category.ID, targetCategoryId)) {\n node.expanded = true;\n return true;\n }\n if (node.children.length > 0 && this.expandCategoryForQueryRecursive(node.children, targetCategoryId)) {\n node.expanded = true;\n return true;\n }\n }\n return false;\n }\n\n // ========================================\n // Panel Resize\n // ========================================\n\n /**\n * Load saved panel width from user settings\n */\n private loadSavedPanelWidth(): void {\n const saved = UserInfoEngine.Instance.GetSetting(QueryBrowserResourceComponent.SETTINGS_KEY);\n if (saved) {\n const width = parseInt(saved, 10);\n if (!isNaN(width) && width >= QueryBrowserResourceComponent.MIN_PANEL_WIDTH && width <= QueryBrowserResourceComponent.MAX_PANEL_WIDTH) {\n this.PanelWidth = width;\n }\n }\n }\n\n /**\n * Start resizing the left panel via drag handle\n */\n public onResizeStart(event: MouseEvent): void {\n event.preventDefault();\n this.IsResizing = true;\n this.cdr.markForCheck();\n\n // Run outside Angular zone for performance during mousemove\n this.zone.runOutsideAngular(() => {\n document.addEventListener('mousemove', this.boundOnResizeMove);\n document.addEventListener('mouseup', this.boundOnResizeEnd);\n });\n }\n\n private onResizeMove(event: MouseEvent): void {\n if (!this.IsResizing) return;\n\n const containerRect = this.elementRef.nativeElement.querySelector('.query-browser-container')?.getBoundingClientRect();\n if (!containerRect) return;\n\n const newWidth = event.clientX - containerRect.left;\n const clamped = Math.max(\n QueryBrowserResourceComponent.MIN_PANEL_WIDTH,\n Math.min(QueryBrowserResourceComponent.MAX_PANEL_WIDTH, newWidth)\n );\n\n this.PanelWidth = clamped;\n this.zone.run(() => this.cdr.markForCheck());\n }\n\n private onResizeEnd(): void {\n if (!this.IsResizing) return;\n this.IsResizing = false;\n\n document.removeEventListener('mousemove', this.boundOnResizeMove);\n document.removeEventListener('mouseup', this.boundOnResizeEnd);\n\n // Persist width with debouncing\n UserInfoEngine.Instance.SetSettingDebounced(\n QueryBrowserResourceComponent.SETTINGS_KEY,\n this.PanelWidth.toString()\n );\n\n this.zone.run(() => this.cdr.markForCheck());\n }\n\n /** Case-insensitive UUID check whether a query is the currently selected query. */\n public IsQuerySelected(query: QueryInfo): boolean {\n return UUIDsEqual(this.selectedQuery?.ID, query.ID);\n }\n}\n","<!-- Query Browser Resource -->\n<div class=\"query-browser-container\" [class.resizing]=\"IsResizing\">\n <!-- Left Panel: Query Tree -->\n <div class=\"query-tree-panel\" [style.width.px]=\"PanelWidth\">\n <!-- Header -->\n <div class=\"tree-header\">\n <div class=\"header-title\">\n <i class=\"fa-solid fa-database\"></i>\n <span>Queries</span>\n <span class=\"query-count\">({{ getTotalQueryCount() }})</span>\n </div>\n <div class=\"header-actions\">\n <button class=\"icon-btn\" (click)=\"expandAll()\" title=\"Expand all\">\n <i class=\"fa-solid fa-folder-open\"></i>\n </button>\n <button class=\"icon-btn\" (click)=\"collapseAll()\" title=\"Collapse all\">\n <i class=\"fa-solid fa-folder\"></i>\n </button>\n <button class=\"icon-btn\" (click)=\"refresh()\" title=\"Refresh\">\n <i class=\"fa-solid fa-refresh\"></i>\n </button>\n </div>\n </div>\n\n <!-- Search -->\n <div class=\"tree-search\">\n <div class=\"search-input-wrapper\">\n <i class=\"fa-solid fa-search search-icon\"></i>\n <input type=\"text\"\n class=\"search-input\"\n [value]=\"searchText\"\n placeholder=\"Search queries...\"\n (input)=\"onSearchChange($any($event.target).value)\">\n @if (searchText) {\n <button class=\"clear-btn\" (click)=\"clearSearch()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n }\n </div>\n </div>\n\n <!-- Tree Content -->\n <div class=\"tree-content\">\n <!-- Loading -->\n @if (isLoading) {\n <div class=\"loading-state\">\n <mj-loading text=\"Loading queries...\"></mj-loading>\n </div>\n }\n\n <!-- Empty -->\n @if (!isLoading && queries.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-database empty-icon\"></i>\n <p>No queries available</p>\n </div>\n }\n\n <!-- No results -->\n @if (!isLoading && searchText && filteredQueries.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-search empty-icon\"></i>\n <p>No queries match \"{{ searchText }}\"</p>\n </div>\n }\n\n <!-- Category Tree -->\n @if (!isLoading && queries.length > 0) {\n <div class=\"category-tree\">\n @for (node of categoryTree; track trackByCategory($index, node)) {\n <ng-container *ngTemplateOutlet=\"categoryNode; context: { node: node }\"></ng-container>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Resize Handle -->\n <div class=\"resize-handle\"\n [class.active]=\"IsResizing\"\n (mousedown)=\"onResizeStart($event)\">\n <div class=\"resize-handle-grip\"></div>\n </div>\n\n <!-- Right Panel: Query Viewer -->\n <div class=\"query-viewer-panel\">\n <!-- No query selected -->\n @if (!selectedQuery) {\n <div class=\"no-selection\">\n <i class=\"fa-solid fa-hand-pointer no-selection-icon\"></i>\n <p class=\"no-selection-message\">Select a query from the list</p>\n <p class=\"no-selection-hint\">Click on a query to view and run it</p>\n </div>\n }\n\n <!-- Query Viewer -->\n @if (selectedQuery) {\n <mj-query-viewer\n [QueryId]=\"selectedQuery.ID\"\n [AutoRun]=\"true\"\n [SelectionMode]=\"'multiple'\"\n (EntityLinkClick)=\"onEntityLinkClick($event)\"\n (RowDoubleClick)=\"onRowDoubleClick($event)\"\n (OpenQueryRecord)=\"onOpenQueryRecord($event)\">\n </mj-query-viewer>\n }\n </div>\n</div>\n\n<!-- Category Node Template -->\n<ng-template #categoryNode let-node=\"node\">\n @if (hasVisibleContent(node)) {\n <div class=\"category-item\"\n [class.expanded]=\"node.expanded\"\n [style.padding-left.px]=\"node.level * 16 + 8\">\n <div class=\"category-header\" (click)=\"toggleExpand(node)\">\n <i class=\"fa-solid expand-icon\"\n [class.fa-chevron-down]=\"node.expanded\"\n [class.fa-chevron-right]=\"!node.expanded\"></i>\n <i class=\"fa-solid fa-folder category-icon\"\n [class.fa-folder-open]=\"node.expanded\"></i>\n <span class=\"category-name\">{{ node.category.Name }}</span>\n <span class=\"category-count\">({{ getNodeQueryCount(node) }})</span>\n </div>\n <!-- Queries in this category -->\n @if (node.expanded) {\n <div class=\"category-queries\">\n @for (query of node.queries; track trackByQuery($index, query)) {\n <div class=\"query-item\"\n [class.selected]=\"IsQuerySelected(query)\"\n [class.hidden]=\"!isQueryVisible(query)\"\n (click)=\"selectQuery(query, $event)\">\n <i class=\"fa-solid fa-file-code query-icon\"></i>\n <div class=\"query-info\">\n <span class=\"query-name\">{{ query.Name }}</span>\n @if (query.Description) {\n <span class=\"query-description\">{{ query.Description }}</span>\n }\n </div>\n @if (query.UsesTemplate) {\n <i class=\"fa-solid fa-sliders param-icon\" title=\"Has parameters\"></i>\n }\n </div>\n }\n </div>\n }\n <!-- Child categories -->\n @if (node.expanded) {\n @for (child of node.children; track trackByCategory($index, child)) {\n <ng-container *ngTemplateOutlet=\"categoryNode; context: { node: child }\"></ng-container>\n }\n }\n </div>\n }\n</ng-template>\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduling-instrumentation.service.d.ts","sourceRoot":"","sources":["../../../src/Scheduling/services/scheduling-instrumentation.service.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"scheduling-instrumentation.service.d.ts","sourceRoot":"","sources":["../../../src/Scheduling/services/scheduling-instrumentation.service.ts"],"names":[],"mappings":";AAOA,MAAM,WAAW,cAAc;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,E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AClB,cAAc,EAAE,MAAM,CAAC;QACvB,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;QACjE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,eAAe,EAAE,YAAY,GAAG,OAAO,GAAG,MAAM,CAAC;QACjD,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;QACrB,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;QACnB,eAAe,EAAE,OAAO,CAAC;QACzB,eAAe,EAAE,OAAO,CAAC;KAC1B,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAiCf,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAc1C,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAkB5C,uBAAuB,IAAI,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;yCA9gB7D,gCAAgC;6CAAhC,gCAAgC;CA0hB5C"}
|
|
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
|
|
|
2
2
|
import { BehaviorSubject, from, combineLatest } from 'rxjs';
|
|
3
3
|
import { switchMap, shareReplay, tap } from 'rxjs/operators';
|
|
4
4
|
import { RunView, Metadata } from '@memberjunction/core';
|
|
5
|
+
import { UUIDsEqual } from '@memberjunction/global';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export class SchedulingInstrumentationService {
|
|
7
8
|
_dateRange$ = new BehaviorSubject({
|
|
@@ -231,7 +232,7 @@ export class SchedulingInstrumentationService {
|
|
|
231
232
|
const allJobs = jobsResult.Results;
|
|
232
233
|
const allRuns = runsResult.Results;
|
|
233
234
|
return types.map(type => {
|
|
234
|
-
const jobsOfType = allJobs.filter(j => j.JobTypeID
|
|
235
|
+
const jobsOfType = allJobs.filter(j => UUIDsEqual(j.JobTypeID, type.ID));
|
|
235
236
|
const activeJobs = jobsOfType.filter(j => j.Status === 'Active');
|
|
236
237
|
const jobIds = new Set(jobsOfType.map(j => j.ID));
|
|
237
238
|
const runsOfType = allRuns.filter(r => jobIds.has(r.ScheduledJobID));
|