@memberjunction/ng-dashboards 5.22.0 → 5.23.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/README.md +51 -0
- package/dist/AI/components/agents/agent-configuration.component.d.ts.map +1 -1
- package/dist/AI/components/agents/agent-configuration.component.js +364 -362
- package/dist/AI/components/agents/agent-configuration.component.js.map +1 -1
- package/dist/AI/components/agents/agent-editor.component.js +2 -2
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts +275 -64
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts.map +1 -1
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js +2645 -436
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts +240 -6
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +2166 -256
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
- package/dist/AI/components/execution-monitoring.component.d.ts.map +1 -1
- package/dist/AI/components/execution-monitoring.component.js +191 -197
- package/dist/AI/components/execution-monitoring.component.js.map +1 -1
- package/dist/AI/components/models/model-management.component.js +9 -8
- package/dist/AI/components/models/model-management.component.js.map +1 -1
- package/dist/AI/components/prompts/prompt-management.component.js +305 -299
- package/dist/AI/components/prompts/prompt-management.component.js.map +1 -1
- package/dist/AI/components/system/system-configuration.component.js +319 -313
- package/dist/AI/components/system/system-configuration.component.js.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts +1 -2
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.js +12 -27
- package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
- package/dist/APIKeys/api-applications-panel.component.js +10 -12
- package/dist/APIKeys/api-applications-panel.component.js.map +1 -1
- package/dist/APIKeys/api-key-create-dialog.component.js +13 -19
- package/dist/APIKeys/api-key-create-dialog.component.js.map +1 -1
- package/dist/APIKeys/api-key-edit-panel.component.js +12 -14
- package/dist/APIKeys/api-key-edit-panel.component.js.map +1 -1
- package/dist/APIKeys/api-scopes-panel.component.js +61 -68
- package/dist/APIKeys/api-scopes-panel.component.js.map +1 -1
- package/dist/APIKeys/api-usage-panel.component.js +10 -11
- package/dist/APIKeys/api-usage-panel.component.js.map +1 -1
- package/dist/Actions/components/actions-list-view.component.js +82 -96
- package/dist/Actions/components/actions-list-view.component.js.map +1 -1
- package/dist/Actions/components/actions-overview.component.js +130 -134
- 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 +40 -46
- package/dist/Actions/components/categories-list-view.component.js.map +1 -1
- package/dist/Actions/components/code-management.component.js +2 -2
- package/dist/Actions/components/code-management.component.js.map +1 -1
- package/dist/Actions/components/entity-integration.component.js +2 -2
- package/dist/Actions/components/entity-integration.component.js.map +1 -1
- package/dist/Actions/components/execution-monitoring.component.js +127 -132
- package/dist/Actions/components/execution-monitoring.component.js.map +1 -1
- package/dist/Actions/components/executions-list-view.component.js +2 -2
- package/dist/Actions/components/executions-list-view.component.js.map +1 -1
- package/dist/Actions/components/explorer/action-card.component.js +11 -17
- package/dist/Actions/components/explorer/action-card.component.js.map +1 -1
- package/dist/Actions/components/explorer/action-explorer.component.js +5 -11
- package/dist/Actions/components/explorer/action-explorer.component.js.map +1 -1
- package/dist/Actions/components/explorer/action-list-item.component.js +8 -10
- package/dist/Actions/components/explorer/action-list-item.component.js.map +1 -1
- package/dist/Actions/components/explorer/action-toolbar.component.js +112 -133
- package/dist/Actions/components/explorer/action-toolbar.component.js.map +1 -1
- package/dist/Actions/components/explorer/action-tree-panel.component.js +63 -83
- package/dist/Actions/components/explorer/action-tree-panel.component.js.map +1 -1
- package/dist/Actions/components/explorer/new-action-panel.component.js +17 -21
- package/dist/Actions/components/explorer/new-action-panel.component.js.map +1 -1
- package/dist/Actions/components/explorer/new-category-panel.component.js +17 -21
- package/dist/Actions/components/explorer/new-category-panel.component.js.map +1 -1
- package/dist/Actions/components/scheduled-actions.component.js +2 -2
- package/dist/Actions/components/scheduled-actions.component.js.map +1 -1
- package/dist/Actions/components/security-permissions.component.js +2 -2
- package/dist/Actions/components/security-permissions.component.js.map +1 -1
- package/dist/ComponentStudio/component-studio-dashboard.component.d.ts +13 -5
- package/dist/ComponentStudio/component-studio-dashboard.component.d.ts.map +1 -1
- package/dist/ComponentStudio/component-studio-dashboard.component.js +168 -145
- package/dist/ComponentStudio/component-studio-dashboard.component.js.map +1 -1
- package/dist/ComponentStudio/components/artifact-load-dialog.component.d.ts +4 -5
- package/dist/ComponentStudio/components/artifact-load-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/artifact-load-dialog.component.js +197 -200
- package/dist/ComponentStudio/components/artifact-load-dialog.component.js.map +1 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.d.ts +5 -7
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.js +142 -148
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.js.map +1 -1
- package/dist/ComponentStudio/components/browser/component-browser.component.js +153 -166
- package/dist/ComponentStudio/components/browser/component-browser.component.js.map +1 -1
- package/dist/ComponentStudio/components/editors/code-editor-panel.component.js +15 -20
- package/dist/ComponentStudio/components/editors/code-editor-panel.component.js.map +1 -1
- package/dist/ComponentStudio/components/editors/data-requirements-editor.component.js +16 -21
- package/dist/ComponentStudio/components/editors/data-requirements-editor.component.js.map +1 -1
- package/dist/ComponentStudio/components/editors/requirements-editor.component.js +18 -23
- package/dist/ComponentStudio/components/editors/requirements-editor.component.js.map +1 -1
- package/dist/ComponentStudio/components/editors/spec-editor.component.js +25 -30
- package/dist/ComponentStudio/components/editors/spec-editor.component.js.map +1 -1
- package/dist/ComponentStudio/components/new-component-dialog/new-component-dialog.component.js +10 -11
- package/dist/ComponentStudio/components/new-component-dialog/new-component-dialog.component.js.map +1 -1
- package/dist/ComponentStudio/components/save-version-dialog/save-version-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/save-version-dialog/save-version-dialog.component.js +24 -35
- package/dist/ComponentStudio/components/save-version-dialog/save-version-dialog.component.js.map +1 -1
- package/dist/ComponentStudio/components/text-import-dialog.component.js +15 -17
- package/dist/ComponentStudio/components/text-import-dialog.component.js.map +1 -1
- package/dist/Credentials/components/credentials-categories-resource.component.js +7 -6
- package/dist/Credentials/components/credentials-categories-resource.component.js.map +1 -1
- package/dist/Credentials/components/credentials-list-resource.component.js +6 -5
- package/dist/Credentials/components/credentials-list-resource.component.js.map +1 -1
- package/dist/Credentials/components/credentials-types-resource.component.js +7 -6
- package/dist/Credentials/components/credentials-types-resource.component.js.map +1 -1
- package/dist/DashboardBrowser/dashboard-share-dialog.component.js +9 -9
- package/dist/DashboardBrowser/dashboard-share-dialog.component.js.map +1 -1
- package/dist/Home/home-dashboard.component.js +4 -4
- package/dist/Home/home-dashboard.component.js.map +1 -1
- package/dist/Integration/components/connections/connections.component.js +4 -4
- package/dist/Integration/components/connections/connections.component.js.map +1 -1
- package/dist/Integration/components/mapping-workspace/mapping-workspace.component.js +246 -259
- package/dist/Integration/components/mapping-workspace/mapping-workspace.component.js.map +1 -1
- package/dist/Integration/components/widgets/integration-card.component.js +7 -9
- package/dist/Integration/components/widgets/integration-card.component.js.map +1 -1
- package/dist/Integration/integration.module.d.ts +6 -10
- package/dist/Integration/integration.module.d.ts.map +1 -1
- package/dist/Integration/integration.module.js +12 -20
- package/dist/Integration/integration.module.js.map +1 -1
- package/dist/KnowledgeHub/components/clusters/cluster-visualization-resource.component.d.ts +106 -0
- package/dist/KnowledgeHub/components/clusters/cluster-visualization-resource.component.d.ts.map +1 -0
- package/dist/KnowledgeHub/components/clusters/cluster-visualization-resource.component.js +607 -0
- package/dist/KnowledgeHub/components/clusters/cluster-visualization-resource.component.js.map +1 -0
- package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.d.ts +7 -2
- package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.d.ts.map +1 -1
- package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js +59 -31
- package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js.map +1 -1
- package/dist/KnowledgeHub/index.d.ts +1 -0
- package/dist/KnowledgeHub/index.d.ts.map +1 -1
- package/dist/KnowledgeHub/index.js +1 -0
- package/dist/KnowledgeHub/index.js.map +1 -1
- package/dist/Lists/components/lists-browse-resource.component.d.ts.map +1 -1
- package/dist/Lists/components/lists-browse-resource.component.js +9 -7
- package/dist/Lists/components/lists-browse-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-my-lists-resource.component.js +5 -4
- package/dist/Lists/components/lists-my-lists-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-operations-resource.component.js +10 -9
- package/dist/Lists/components/lists-operations-resource.component.js.map +1 -1
- package/dist/MCP/components/mcp-connection-dialog.component.js +141 -132
- package/dist/MCP/components/mcp-connection-dialog.component.js.map +1 -1
- package/dist/MCP/components/mcp-log-detail-panel.component.js +4 -4
- package/dist/MCP/components/mcp-log-detail-panel.component.js.map +1 -1
- package/dist/MCP/components/mcp-server-dialog.component.js +141 -128
- package/dist/MCP/components/mcp-server-dialog.component.js.map +1 -1
- package/dist/MCP/components/mcp-test-tool-dialog.component.js +210 -218
- package/dist/MCP/components/mcp-test-tool-dialog.component.js.map +1 -1
- package/dist/MCP/mcp-dashboard.component.js +2 -2
- package/dist/MCP/mcp-dashboard.component.js.map +1 -1
- package/dist/MCP/mcp.module.d.ts +6 -9
- package/dist/MCP/mcp.module.d.ts.map +1 -1
- package/dist/MCP/mcp.module.js +20 -22
- package/dist/MCP/mcp.module.js.map +1 -1
- package/dist/Scheduling/components/scheduling-activity.component.js +5 -4
- package/dist/Scheduling/components/scheduling-activity.component.js.map +1 -1
- package/dist/Scheduling/components/scheduling-jobs.component.js +6 -5
- package/dist/Scheduling/components/scheduling-jobs.component.js.map +1 -1
- package/dist/Scheduling/components/scheduling-overview.component.js +93 -92
- package/dist/Scheduling/components/scheduling-overview.component.js.map +1 -1
- package/dist/Testing/testing-dashboard.component.js +9 -10
- package/dist/Testing/testing-dashboard.component.js.map +1 -1
- package/dist/actions-dashboards.module.d.ts +8 -13
- package/dist/actions-dashboards.module.d.ts.map +1 -1
- package/dist/actions-dashboards.module.js +6 -27
- package/dist/actions-dashboards.module.js.map +1 -1
- package/dist/ai-dashboards.module.d.ts +16 -20
- package/dist/ai-dashboards.module.d.ts.map +1 -1
- package/dist/ai-dashboards.module.js +23 -44
- package/dist/ai-dashboards.module.js.map +1 -1
- package/dist/communication-dashboards.module.d.ts +4 -8
- package/dist/communication-dashboards.module.d.ts.map +1 -1
- package/dist/communication-dashboards.module.js +0 -19
- package/dist/communication-dashboards.module.js.map +1 -1
- package/dist/component-studio-dashboards.module.d.ts +7 -11
- package/dist/component-studio-dashboards.module.d.ts.map +1 -1
- package/dist/component-studio-dashboards.module.js +22 -34
- package/dist/component-studio-dashboards.module.js.map +1 -1
- package/dist/core-dashboards.module.d.ts +12 -18
- package/dist/core-dashboards.module.d.ts.map +1 -1
- package/dist/core-dashboards.module.js +15 -31
- package/dist/core-dashboards.module.js.map +1 -1
- package/dist/credentials-dashboards.module.d.ts +5 -8
- package/dist/credentials-dashboards.module.d.ts.map +1 -1
- package/dist/credentials-dashboards.module.js +3 -19
- package/dist/credentials-dashboards.module.js.map +1 -1
- package/dist/data-explorer-dashboards.module.d.ts +7 -13
- package/dist/data-explorer-dashboards.module.d.ts.map +1 -1
- package/dist/data-explorer-dashboards.module.js +0 -27
- package/dist/data-explorer-dashboards.module.js.map +1 -1
- package/dist/lists-dashboards.module.d.ts +5 -8
- package/dist/lists-dashboards.module.d.ts.map +1 -1
- package/dist/lists-dashboards.module.js +3 -19
- package/dist/lists-dashboards.module.js.map +1 -1
- package/dist/public-api.d.ts +1 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +1 -0
- package/dist/public-api.js.map +1 -1
- package/dist/scheduling-dashboards.module.d.ts +6 -10
- package/dist/scheduling-dashboards.module.d.ts.map +1 -1
- package/dist/scheduling-dashboards.module.js +3 -23
- package/dist/scheduling-dashboards.module.js.map +1 -1
- package/dist/testing-dashboards.module.d.ts +7 -13
- package/dist/testing-dashboards.module.d.ts.map +1 -1
- package/dist/testing-dashboards.module.js +0 -27
- package/dist/testing-dashboards.module.js.map +1 -1
- package/package.json +47 -55
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-tree-panel.component.js","sourceRoot":"","sources":["../../../../src/Actions/components/explorer/action-tree-panel.component.ts","../../../../src/Actions/components/explorer/action-tree-panel.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EAGZ,uBAAuB,EAEvB,YAAY,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;;;;;;;;;ICyB/B,wBAAkC;;;;IAIhC,kCAG+B;IAA7B,0NAAS,sBAAe,EAAE,CAAC,KAAC;IAC5B,wBAAiC;IACnC,iBAAS;;IAHP,AADA,iCAAmB,iBACH;;;IAHpB,uHAAwC;;;;IA2B5C,+BAE4C;IAA1C,yMAAS,sBAAe,eAAe,CAAC,KAAC;IACzC,gCAAwB;IACtB,wBAAiC;IACnC,iBAAO;IACP,gCAAwB;IAAA,6BAAa;IAAA,iBAAO;IAC5C,gCAAyB;IAAA,YAA6B;IACxD,AADwD,iBAAO,EACzD;;;IAPJ,8DAA8C;IAMrB,eAA6B;IAA7B,oDAA6B;;;IAMxD,wBAAwG;;;;IAYhG,kCAEiE;IAD/D,oRAAS,kDAAwC,KAAC;IAElD,oBAAyG;IAC3G,iBAAS;;;;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AC;YAChC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,EAAE,CAAC;YACpC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IAEM,sBAAsB,CAAC,UAAkB;QAC9C,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3E,CAAC;kHApPU,wBAAwB;6DAAxB,wBAAwB;YAAxB,2GAAA,uBAAmB,0BAAK,oFAAxB,eAAW,0BAAa;;YCkHnC,AAlJF,4FAAoB,oEAkJX;;YAlJT,0CAmKC;;;iFDnIY,wBAAwB;cAPpC,SAAS;6BACI,KAAK,YACP,sBAAsB,mBAGf,uBAAuB,CAAC,MAAM;;kBAG9C,KAAK;;kBACL,KAAK;;kBACL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBAqNN,YAAY;mBAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC;;kBAc7C,YAAY;mBAAC,kBAAkB;;kFAxOrB,wBAAwB","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n OnInit,\n OnDestroy,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n HostListener\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { MJActionCategoryEntity } from '@memberjunction/core-entities';\nimport { ActionExplorerStateService } from '../../services/action-explorer-state.service';\nimport { MJActionEntityExtended } from '@memberjunction/actions-base';\n\nexport interface CategoryTreeNode {\n category: MJActionCategoryEntity;\n children: CategoryTreeNode[];\n level: number;\n actionCount: number;\n totalActionCount: number; // Including descendants\n}\n\n@Component({\n standalone: false,\n selector: 'mj-action-tree-panel',\n templateUrl: './action-tree-panel.component.html',\n styleUrls: ['./action-tree-panel.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ActionTreePanelComponent implements OnInit, OnDestroy {\n @Input() Categories: MJActionCategoryEntity[] = [];\n @Input() Actions: MJActionEntityExtended[] = [];\n @Output() CategorySelected = new EventEmitter<string>();\n @Output() NewCategoryClick = new EventEmitter<string | null>(); // parent ID or null for root\n @Output() EditCategoryClick = new EventEmitter<MJActionCategoryEntity>();\n\n public CategoryTree: CategoryTreeNode[] = [];\n public SelectedCategoryId = 'all';\n public ExpandedCategories: Set<string> = new Set();\n public TreeWidth = 280;\n public IsCollapsed = false;\n public IsResizing = false;\n public SearchTerm = '';\n public FilteredTree: CategoryTreeNode[] = [];\n\n private destroy$ = new Subject<void>();\n private categoryParentMap = new Map<string, string | null>();\n private categoryDescendants = new Map<string, Set<string>>();\n\n constructor(\n public StateService: ActionExplorerStateService,\n private cdr: ChangeDetectorRef\n ) {}\n\n ngOnInit(): void {\n this.subscribeToState();\n this.buildCategoryTree();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private subscribeToState(): void {\n this.StateService.TreeWidth$.pipe(takeUntil(this.destroy$)).subscribe(width => {\n this.TreeWidth = width;\n this.cdr.markForCheck();\n });\n\n this.StateService.TreeCollapsed$.pipe(takeUntil(this.destroy$)).subscribe(collapsed => {\n this.IsCollapsed = collapsed;\n this.cdr.markForCheck();\n });\n\n this.StateService.SelectedCategoryId$.pipe(takeUntil(this.destroy$)).subscribe(id => {\n this.SelectedCategoryId = id;\n this.cdr.markForCheck();\n });\n\n this.StateService.ExpandedCategories$.pipe(takeUntil(this.destroy$)).subscribe(expanded => {\n this.ExpandedCategories = expanded;\n this.cdr.markForCheck();\n });\n }\n\n public buildCategoryTree(): void {\n const categoryMap = new Map<string, CategoryTreeNode>();\n this.categoryParentMap.clear();\n this.categoryDescendants.clear();\n\n // Build action counts per category\n const actionCounts = new Map<string, number>();\n this.Actions.forEach(action => {\n if (action.CategoryID) {\n actionCounts.set(action.CategoryID, (actionCounts.get(action.CategoryID) || 0) + 1);\n }\n });\n\n // First pass: create all nodes\n this.Categories.forEach(category => {\n categoryMap.set(category.ID, {\n category,\n children: [],\n level: 0,\n actionCount: actionCounts.get(category.ID) || 0,\n totalActionCount: 0\n });\n this.categoryParentMap.set(category.ID, category.ParentID || null);\n this.categoryDescendants.set(category.ID, new Set([category.ID]));\n });\n\n // Second pass: build tree structure\n const rootNodes: CategoryTreeNode[] = [];\n categoryMap.forEach(node => {\n const parentId = node.category.ParentID;\n if (parentId && categoryMap.has(parentId)) {\n const parent = categoryMap.get(parentId)!;\n parent.children.push(node);\n node.level = parent.level + 1;\n } else {\n rootNodes.push(node);\n }\n });\n\n // Build descendant mapping\n this.Categories.forEach(category => {\n if (category.ParentID) {\n let currentParentId: string | null = category.ParentID;\n while (currentParentId) {\n const descendants = this.categoryDescendants.get(currentParentId);\n if (descendants) {\n descendants.add(category.ID);\n }\n const parent = categoryMap.get(currentParentId);\n currentParentId = parent?.category.ParentID || null;\n }\n }\n });\n\n // Calculate total action counts (including descendants)\n const calculateTotalCounts = (node: CategoryTreeNode): number => {\n const descendants = this.categoryDescendants.get(node.category.ID);\n if (descendants) {\n let total = 0;\n descendants.forEach(descId => {\n total += actionCounts.get(descId) || 0;\n });\n node.totalActionCount = total;\n return total;\n }\n return node.actionCount;\n };\n\n // Sort children at each level and calculate totals\n const sortAndCalculate = (nodes: CategoryTreeNode[]) => {\n nodes.sort((a, b) => a.category.Name.localeCompare(b.category.Name));\n nodes.forEach(node => {\n sortAndCalculate(node.children);\n calculateTotalCounts(node);\n });\n };\n sortAndCalculate(rootNodes);\n\n this.CategoryTree = rootNodes;\n this.FilteredTree = this.SearchTerm ? this.filterTree(rootNodes, this.SearchTerm.toLowerCase()) : rootNodes;\n this.cdr.markForCheck();\n }\n\n private filterTree(nodes: CategoryTreeNode[], searchTerm: string): CategoryTreeNode[] {\n const result: CategoryTreeNode[] = [];\n for (const node of nodes) {\n const matchesSearch = node.category.Name.toLowerCase().includes(searchTerm);\n const filteredChildren = this.filterTree(node.children, searchTerm);\n\n if (matchesSearch || filteredChildren.length > 0) {\n result.push({\n ...node,\n children: filteredChildren\n });\n }\n }\n return result;\n }\n\n public onSearchChange(term: string): void {\n this.SearchTerm = term;\n this.FilteredTree = term ? this.filterTree(this.CategoryTree, term.toLowerCase()) : this.CategoryTree;\n this.cdr.markForCheck();\n }\n\n public getTotalActionCount(): number {\n return this.Actions.length;\n }\n\n public getUncategorizedCount(): number {\n return this.Actions.filter(a => !a.CategoryID).length;\n }\n\n public selectCategory(categoryId: string): void {\n this.StateService.setSelectedCategoryId(categoryId);\n this.CategorySelected.emit(categoryId);\n }\n\n public toggleExpanded(categoryId: string, event: MouseEvent): void {\n event.stopPropagation();\n this.StateService.toggleCategoryExpanded(categoryId);\n }\n\n public isExpanded(categoryId: string): boolean {\n return this.ExpandedCategories.has(categoryId);\n }\n\n public isSelected(categoryId: string): boolean {\n return this.SelectedCategoryId === categoryId;\n }\n\n public toggleCollapse(): void {\n this.StateService.toggleTreeCollapsed();\n }\n\n public onNewCategory(parentId: string | null, event: MouseEvent): void {\n event.stopPropagation();\n this.NewCategoryClick.emit(parentId);\n }\n\n public onEditCategory(category: MJActionCategoryEntity, event: MouseEvent): void {\n event.stopPropagation();\n this.EditCategoryClick.emit(category);\n }\n\n public expandAll(): void {\n this.StateService.expandAllCategories(this.Categories.map(c => c.ID));\n }\n\n public collapseAll(): void {\n this.StateService.collapseAllCategories();\n }\n\n // Resize handling\n public onResizeStart(event: MouseEvent): void {\n event.preventDefault();\n this.IsResizing = true;\n document.body.style.cursor = 'ew-resize';\n document.body.style.userSelect = 'none';\n }\n\n @HostListener('document:mousemove', ['$event'])\n onMouseMove(event: MouseEvent): void {\n if (!this.IsResizing) return;\n\n const newWidth = event.clientX;\n const clampedWidth = Math.min(\n Math.max(newWidth, this.StateService.TreeWidthMin),\n Math.min(this.StateService.TreeWidthMax, window.innerWidth - 400)\n );\n\n this.TreeWidth = clampedWidth;\n this.cdr.detectChanges();\n }\n\n @HostListener('document:mouseup')\n onMouseUp(): void {\n if (this.IsResizing) {\n this.IsResizing = false;\n document.body.style.cursor = '';\n document.body.style.userSelect = '';\n this.StateService.setTreeWidth(this.TreeWidth);\n }\n }\n\n public getCategoryDescendants(categoryId: string): Set<string> {\n return this.categoryDescendants.get(categoryId) || new Set([categoryId]);\n }\n}\n","@if (!IsCollapsed) {\n <div class=\"tree-panel\" [style.width.px]=\"TreeWidth\">\n <div class=\"tree-header\">\n <div class=\"header-content\">\n <h3><i class=\"fa-solid fa-folder-tree\"></i> Categories</h3>\n <div class=\"header-actions\">\n <button kendoButton\n [fillMode]=\"'flat'\"\n [size]=\"'small'\"\n title=\"Expand All\"\n (click)=\"expandAll()\">\n <i class=\"fa-solid fa-angles-down\"></i>\n </button>\n <button kendoButton\n [fillMode]=\"'flat'\"\n [size]=\"'small'\"\n title=\"Collapse All\"\n (click)=\"collapseAll()\">\n <i class=\"fa-solid fa-angles-up\"></i>\n </button>\n <button kendoButton\n [fillMode]=\"'flat'\"\n [size]=\"'small'\"\n title=\"Collapse Panel\"\n (click)=\"toggleCollapse()\">\n <i class=\"fa-solid fa-chevron-left\"></i>\n </button>\n </div>\n </div>\n\n <div class=\"tree-search\">\n <kendo-textbox\n [placeholder]=\"'Filter categories...'\"\n [value]=\"SearchTerm\"\n (valueChange)=\"onSearchChange($event)\"\n [size]=\"'small'\">\n <ng-template kendoTextBoxPrefixTemplate>\n <i class=\"fa-solid fa-search\"></i>\n </ng-template>\n @if (SearchTerm) {\n <ng-template kendoTextBoxSuffixTemplate>\n <button kendoButton\n [fillMode]=\"'flat'\"\n [size]=\"'small'\"\n (click)=\"onSearchChange('')\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </ng-template>\n }\n </kendo-textbox>\n </div>\n </div>\n\n <div class=\"tree-content\">\n <!-- All Categories -->\n <div class=\"tree-item root-item\"\n [class.selected]=\"isSelected('all')\"\n (click)=\"selectCategory('all')\">\n <span class=\"item-icon\">\n <i class=\"fa-solid fa-layer-group\"></i>\n </span>\n <span class=\"item-name\">All Actions</span>\n <span class=\"item-count\">{{ getTotalActionCount() }}</span>\n </div>\n\n <!-- Uncategorized -->\n @if (getUncategorizedCount() > 0) {\n <div class=\"tree-item uncategorized-item\"\n [class.selected]=\"isSelected('uncategorized')\"\n (click)=\"selectCategory('uncategorized')\">\n <span class=\"item-icon\">\n <i class=\"fa-solid fa-inbox\"></i>\n </span>\n <span class=\"item-name\">Uncategorized</span>\n <span class=\"item-count\">{{ getUncategorizedCount() }}</span>\n </div>\n }\n\n <!-- Category Tree -->\n <div class=\"tree-categories\">\n <ng-container *ngTemplateOutlet=\"categoryTreeTemplate; context: { nodes: FilteredTree }\"></ng-container>\n </div>\n\n <ng-template #categoryTreeTemplate let-nodes=\"nodes\">\n @for (node of nodes; track node.category.ID) {\n <div class=\"tree-node\" [style.--level]=\"node.level\">\n <div class=\"tree-item\"\n [class.selected]=\"isSelected(node.category.ID)\"\n [class.has-children]=\"node.children.length > 0\"\n (click)=\"selectCategory(node.category.ID)\">\n\n @if (node.children.length > 0) {\n <button class=\"expand-btn\"\n (click)=\"toggleExpanded(node.category.ID, $event)\"\n [title]=\"isExpanded(node.category.ID) ? 'Collapse' : 'Expand'\">\n <i [class]=\"isExpanded(node.category.ID) ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'\"></i>\n </button>\n } @else {\n <span class=\"expand-placeholder\"></span>\n }\n\n <span class=\"item-icon\">\n <i [class]=\"isExpanded(node.category.ID) ? 'fa-solid fa-folder-open' : 'fa-solid fa-folder'\"></i>\n </span>\n <span class=\"item-name\" [title]=\"node.category.Name\">{{ node.category.Name }}</span>\n <span class=\"item-count\" [title]=\"node.totalActionCount + ' total actions'\">{{ node.totalActionCount }}</span>\n\n <div class=\"item-actions\">\n <button kendoButton\n [fillMode]=\"'flat'\"\n [size]=\"'small'\"\n title=\"Add Subcategory\"\n (click)=\"onNewCategory(node.category.ID, $event)\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n </div>\n </div>\n\n @if (node.children.length > 0 && isExpanded(node.category.ID)) {\n <div class=\"tree-children\">\n <ng-container *ngTemplateOutlet=\"categoryTreeTemplate; context: { nodes: node.children }\"></ng-container>\n </div>\n }\n </div>\n }\n </ng-template>\n </div>\n\n <div class=\"tree-footer\">\n <button kendoButton\n [fillMode]=\"'outline'\"\n [themeColor]=\"'primary'\"\n [size]=\"'small'\"\n class=\"new-category-btn\"\n (click)=\"onNewCategory(null, $event)\">\n <i class=\"fa-solid fa-plus\"></i>\n New Category\n </button>\n </div>\n\n <!-- Resize Handle -->\n <div class=\"resize-handle\"\n (mousedown)=\"onResizeStart($event)\"\n title=\"Drag to resize\">\n </div>\n </div>\n} @else {\n <!-- Collapsed State -->\n <div class=\"tree-panel-collapsed\">\n <button kendoButton\n [fillMode]=\"'flat'\"\n title=\"Expand Category Panel\"\n (click)=\"toggleCollapse()\">\n <i class=\"fa-solid fa-chevron-right\"></i>\n </button>\n <button kendoButton\n [fillMode]=\"'flat'\"\n title=\"All Actions\"\n [class.selected]=\"isSelected('all')\"\n (click)=\"selectCategory('all')\">\n <i class=\"fa-solid fa-layer-group\"></i>\n </button>\n </div>\n}\n"]}
|
|
1
|
+
{"version":3,"file":"action-tree-panel.component.js","sourceRoot":"","sources":["../../../../src/Actions/components/explorer/action-tree-panel.component.ts","../../../../src/Actions/components/explorer/action-tree-panel.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EAGZ,uBAAuB,EAEvB,YAAY,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;;;;;;;;;IC0B/B,kCAC+B;IAA7B,4MAAS,sBAAe,EAAE,CAAC,KAAC;IAC5B,wBAAiC;IACnC,iBAAS;;;;IAoBb,+BAE4C;IAA1C,yMAAS,sBAAe,eAAe,CAAC,KAAC;IACzC,gCAAwB;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AG,EAAE,CAAC;YAChC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,EAAE,CAAC;YACpC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IAEM,sBAAsB,CAAC,UAAkB;QAC9C,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3E,CAAC;kHApPU,wBAAwB;6DAAxB,wBAAwB;YAAxB,2GAAA,uBAAmB,0BAAK,oFAAxB,eAAW,0BAAa;;YC2GnC,AA3IF,4FAAoB,oEA2IX;;YA3IT,0CA4JC;;;iFD5HY,wBAAwB;cAPpC,SAAS;6BACI,KAAK,YACP,sBAAsB,mBAGf,uBAAuB,CAAC,MAAM;;kBAG9C,KAAK;;kBACL,KAAK;;kBACL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBAqNN,YAAY;mBAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC;;kBAc7C,YAAY;mBAAC,kBAAkB;;kFAxOrB,wBAAwB","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n OnInit,\n OnDestroy,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n HostListener\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { MJActionCategoryEntity } from '@memberjunction/core-entities';\nimport { ActionExplorerStateService } from '../../services/action-explorer-state.service';\nimport { MJActionEntityExtended } from '@memberjunction/actions-base';\n\nexport interface CategoryTreeNode {\n category: MJActionCategoryEntity;\n children: CategoryTreeNode[];\n level: number;\n actionCount: number;\n totalActionCount: number; // Including descendants\n}\n\n@Component({\n standalone: false,\n selector: 'mj-action-tree-panel',\n templateUrl: './action-tree-panel.component.html',\n styleUrls: ['./action-tree-panel.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ActionTreePanelComponent implements OnInit, OnDestroy {\n @Input() Categories: MJActionCategoryEntity[] = [];\n @Input() Actions: MJActionEntityExtended[] = [];\n @Output() CategorySelected = new EventEmitter<string>();\n @Output() NewCategoryClick = new EventEmitter<string | null>(); // parent ID or null for root\n @Output() EditCategoryClick = new EventEmitter<MJActionCategoryEntity>();\n\n public CategoryTree: CategoryTreeNode[] = [];\n public SelectedCategoryId = 'all';\n public ExpandedCategories: Set<string> = new Set();\n public TreeWidth = 280;\n public IsCollapsed = false;\n public IsResizing = false;\n public SearchTerm = '';\n public FilteredTree: CategoryTreeNode[] = [];\n\n private destroy$ = new Subject<void>();\n private categoryParentMap = new Map<string, string | null>();\n private categoryDescendants = new Map<string, Set<string>>();\n\n constructor(\n public StateService: ActionExplorerStateService,\n private cdr: ChangeDetectorRef\n ) {}\n\n ngOnInit(): void {\n this.subscribeToState();\n this.buildCategoryTree();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private subscribeToState(): void {\n this.StateService.TreeWidth$.pipe(takeUntil(this.destroy$)).subscribe(width => {\n this.TreeWidth = width;\n this.cdr.markForCheck();\n });\n\n this.StateService.TreeCollapsed$.pipe(takeUntil(this.destroy$)).subscribe(collapsed => {\n this.IsCollapsed = collapsed;\n this.cdr.markForCheck();\n });\n\n this.StateService.SelectedCategoryId$.pipe(takeUntil(this.destroy$)).subscribe(id => {\n this.SelectedCategoryId = id;\n this.cdr.markForCheck();\n });\n\n this.StateService.ExpandedCategories$.pipe(takeUntil(this.destroy$)).subscribe(expanded => {\n this.ExpandedCategories = expanded;\n this.cdr.markForCheck();\n });\n }\n\n public buildCategoryTree(): void {\n const categoryMap = new Map<string, CategoryTreeNode>();\n this.categoryParentMap.clear();\n this.categoryDescendants.clear();\n\n // Build action counts per category\n const actionCounts = new Map<string, number>();\n this.Actions.forEach(action => {\n if (action.CategoryID) {\n actionCounts.set(action.CategoryID, (actionCounts.get(action.CategoryID) || 0) + 1);\n }\n });\n\n // First pass: create all nodes\n this.Categories.forEach(category => {\n categoryMap.set(category.ID, {\n category,\n children: [],\n level: 0,\n actionCount: actionCounts.get(category.ID) || 0,\n totalActionCount: 0\n });\n this.categoryParentMap.set(category.ID, category.ParentID || null);\n this.categoryDescendants.set(category.ID, new Set([category.ID]));\n });\n\n // Second pass: build tree structure\n const rootNodes: CategoryTreeNode[] = [];\n categoryMap.forEach(node => {\n const parentId = node.category.ParentID;\n if (parentId && categoryMap.has(parentId)) {\n const parent = categoryMap.get(parentId)!;\n parent.children.push(node);\n node.level = parent.level + 1;\n } else {\n rootNodes.push(node);\n }\n });\n\n // Build descendant mapping\n this.Categories.forEach(category => {\n if (category.ParentID) {\n let currentParentId: string | null = category.ParentID;\n while (currentParentId) {\n const descendants = this.categoryDescendants.get(currentParentId);\n if (descendants) {\n descendants.add(category.ID);\n }\n const parent = categoryMap.get(currentParentId);\n currentParentId = parent?.category.ParentID || null;\n }\n }\n });\n\n // Calculate total action counts (including descendants)\n const calculateTotalCounts = (node: CategoryTreeNode): number => {\n const descendants = this.categoryDescendants.get(node.category.ID);\n if (descendants) {\n let total = 0;\n descendants.forEach(descId => {\n total += actionCounts.get(descId) || 0;\n });\n node.totalActionCount = total;\n return total;\n }\n return node.actionCount;\n };\n\n // Sort children at each level and calculate totals\n const sortAndCalculate = (nodes: CategoryTreeNode[]) => {\n nodes.sort((a, b) => a.category.Name.localeCompare(b.category.Name));\n nodes.forEach(node => {\n sortAndCalculate(node.children);\n calculateTotalCounts(node);\n });\n };\n sortAndCalculate(rootNodes);\n\n this.CategoryTree = rootNodes;\n this.FilteredTree = this.SearchTerm ? this.filterTree(rootNodes, this.SearchTerm.toLowerCase()) : rootNodes;\n this.cdr.markForCheck();\n }\n\n private filterTree(nodes: CategoryTreeNode[], searchTerm: string): CategoryTreeNode[] {\n const result: CategoryTreeNode[] = [];\n for (const node of nodes) {\n const matchesSearch = node.category.Name.toLowerCase().includes(searchTerm);\n const filteredChildren = this.filterTree(node.children, searchTerm);\n\n if (matchesSearch || filteredChildren.length > 0) {\n result.push({\n ...node,\n children: filteredChildren\n });\n }\n }\n return result;\n }\n\n public onSearchChange(term: string): void {\n this.SearchTerm = term;\n this.FilteredTree = term ? this.filterTree(this.CategoryTree, term.toLowerCase()) : this.CategoryTree;\n this.cdr.markForCheck();\n }\n\n public getTotalActionCount(): number {\n return this.Actions.length;\n }\n\n public getUncategorizedCount(): number {\n return this.Actions.filter(a => !a.CategoryID).length;\n }\n\n public selectCategory(categoryId: string): void {\n this.StateService.setSelectedCategoryId(categoryId);\n this.CategorySelected.emit(categoryId);\n }\n\n public toggleExpanded(categoryId: string, event: MouseEvent): void {\n event.stopPropagation();\n this.StateService.toggleCategoryExpanded(categoryId);\n }\n\n public isExpanded(categoryId: string): boolean {\n return this.ExpandedCategories.has(categoryId);\n }\n\n public isSelected(categoryId: string): boolean {\n return this.SelectedCategoryId === categoryId;\n }\n\n public toggleCollapse(): void {\n this.StateService.toggleTreeCollapsed();\n }\n\n public onNewCategory(parentId: string | null, event: MouseEvent): void {\n event.stopPropagation();\n this.NewCategoryClick.emit(parentId);\n }\n\n public onEditCategory(category: MJActionCategoryEntity, event: MouseEvent): void {\n event.stopPropagation();\n this.EditCategoryClick.emit(category);\n }\n\n public expandAll(): void {\n this.StateService.expandAllCategories(this.Categories.map(c => c.ID));\n }\n\n public collapseAll(): void {\n this.StateService.collapseAllCategories();\n }\n\n // Resize handling\n public onResizeStart(event: MouseEvent): void {\n event.preventDefault();\n this.IsResizing = true;\n document.body.style.cursor = 'ew-resize';\n document.body.style.userSelect = 'none';\n }\n\n @HostListener('document:mousemove', ['$event'])\n onMouseMove(event: MouseEvent): void {\n if (!this.IsResizing) return;\n\n const newWidth = event.clientX;\n const clampedWidth = Math.min(\n Math.max(newWidth, this.StateService.TreeWidthMin),\n Math.min(this.StateService.TreeWidthMax, window.innerWidth - 400)\n );\n\n this.TreeWidth = clampedWidth;\n this.cdr.detectChanges();\n }\n\n @HostListener('document:mouseup')\n onMouseUp(): void {\n if (this.IsResizing) {\n this.IsResizing = false;\n document.body.style.cursor = '';\n document.body.style.userSelect = '';\n this.StateService.setTreeWidth(this.TreeWidth);\n }\n }\n\n public getCategoryDescendants(categoryId: string): Set<string> {\n return this.categoryDescendants.get(categoryId) || new Set([categoryId]);\n }\n}\n","@if (!IsCollapsed) {\n <div class=\"tree-panel\" [style.width.px]=\"TreeWidth\">\n <div class=\"tree-header\">\n <div class=\"header-content\">\n <h3><i class=\"fa-solid fa-folder-tree\"></i> Categories</h3>\n <div class=\"header-actions\">\n <button mjButton\n variant=\"flat\"\n size=\"sm\"\n title=\"Expand All\"\n (click)=\"expandAll()\">\n <i class=\"fa-solid fa-angles-down\"></i>\n </button>\n <button mjButton\n variant=\"flat\"\n size=\"sm\"\n title=\"Collapse All\"\n (click)=\"collapseAll()\">\n <i class=\"fa-solid fa-angles-up\"></i>\n </button>\n <button mjButton\n variant=\"flat\"\n size=\"sm\"\n title=\"Collapse Panel\"\n (click)=\"toggleCollapse()\">\n <i class=\"fa-solid fa-chevron-left\"></i>\n </button>\n </div>\n </div>\n\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\" class=\"mj-input\"\n placeholder=\"Filter categories...\"\n [value]=\"SearchTerm\"\n (input)=\"onSearchChange($any($event.target).value)\" />\n @if (SearchTerm) {\n <button mjButton variant=\"flat\" size=\"sm\" class=\"search-clear\"\n (click)=\"onSearchChange('')\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n }\n </div>\n </div>\n </div>\n\n <div class=\"tree-content\">\n <!-- All Categories -->\n <div class=\"tree-item root-item\"\n [class.selected]=\"isSelected('all')\"\n (click)=\"selectCategory('all')\">\n <span class=\"item-icon\">\n <i class=\"fa-solid fa-layer-group\"></i>\n </span>\n <span class=\"item-name\">All Actions</span>\n <span class=\"item-count\">{{ getTotalActionCount() }}</span>\n </div>\n\n <!-- Uncategorized -->\n @if (getUncategorizedCount() > 0) {\n <div class=\"tree-item uncategorized-item\"\n [class.selected]=\"isSelected('uncategorized')\"\n (click)=\"selectCategory('uncategorized')\">\n <span class=\"item-icon\">\n <i class=\"fa-solid fa-inbox\"></i>\n </span>\n <span class=\"item-name\">Uncategorized</span>\n <span class=\"item-count\">{{ getUncategorizedCount() }}</span>\n </div>\n }\n\n <!-- Category Tree -->\n <div class=\"tree-categories\">\n <ng-container *ngTemplateOutlet=\"categoryTreeTemplate; context: { nodes: FilteredTree }\"></ng-container>\n </div>\n\n <ng-template #categoryTreeTemplate let-nodes=\"nodes\">\n @for (node of nodes; track node.category.ID) {\n <div class=\"tree-node\" [style.--level]=\"node.level\">\n <div class=\"tree-item\"\n [class.selected]=\"isSelected(node.category.ID)\"\n [class.has-children]=\"node.children.length > 0\"\n (click)=\"selectCategory(node.category.ID)\">\n\n @if (node.children.length > 0) {\n <button class=\"expand-btn\"\n (click)=\"toggleExpanded(node.category.ID, $event)\"\n [title]=\"isExpanded(node.category.ID) ? 'Collapse' : 'Expand'\">\n <i [class]=\"isExpanded(node.category.ID) ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'\"></i>\n </button>\n } @else {\n <span class=\"expand-placeholder\"></span>\n }\n\n <span class=\"item-icon\">\n <i [class]=\"isExpanded(node.category.ID) ? 'fa-solid fa-folder-open' : 'fa-solid fa-folder'\"></i>\n </span>\n <span class=\"item-name\" [title]=\"node.category.Name\">{{ node.category.Name }}</span>\n <span class=\"item-count\" [title]=\"node.totalActionCount + ' total actions'\">{{ node.totalActionCount }}</span>\n\n <div class=\"item-actions\">\n <button mjButton\n variant=\"flat\"\n size=\"sm\"\n title=\"Add Subcategory\"\n (click)=\"onNewCategory(node.category.ID, $event)\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n </div>\n </div>\n\n @if (node.children.length > 0 && isExpanded(node.category.ID)) {\n <div class=\"tree-children\">\n <ng-container *ngTemplateOutlet=\"categoryTreeTemplate; context: { nodes: node.children }\"></ng-container>\n </div>\n }\n </div>\n }\n </ng-template>\n </div>\n\n <div class=\"tree-footer\">\n <button mjButton\n variant=\"primary\"\n size=\"sm\"\n class=\"new-category-btn\"\n (click)=\"onNewCategory(null, $event)\">\n <i class=\"fa-solid fa-plus\"></i>\n New Category\n </button>\n </div>\n\n <!-- Resize Handle -->\n <div class=\"resize-handle\"\n (mousedown)=\"onResizeStart($event)\"\n title=\"Drag to resize\">\n </div>\n </div>\n} @else {\n <!-- Collapsed State -->\n <div class=\"tree-panel-collapsed\">\n <button mjButton\n variant=\"flat\"\n title=\"Expand Category Panel\"\n (click)=\"toggleCollapse()\">\n <i class=\"fa-solid fa-chevron-right\"></i>\n </button>\n <button mjButton\n variant=\"flat\"\n title=\"All Actions\"\n [class.selected]=\"isSelected('all')\"\n (click)=\"selectCategory('all')\">\n <i class=\"fa-solid fa-layer-group\"></i>\n </button>\n </div>\n}\n"]}
|
|
@@ -8,9 +8,7 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
import * as i1 from "../../services/action-explorer-state.service";
|
|
9
9
|
import * as i2 from "@memberjunction/ng-shared";
|
|
10
10
|
import * as i3 from "@angular/forms";
|
|
11
|
-
import * as i4 from "@
|
|
12
|
-
import * as i5 from "@progress/kendo-angular-dropdowns";
|
|
13
|
-
import * as i6 from "@progress/kendo-angular-inputs";
|
|
11
|
+
import * as i4 from "@memberjunction/ng-ui-components";
|
|
14
12
|
const _forTrack0 = ($index, $item) => $item.value;
|
|
15
13
|
function NewActionPanelComponent_Conditional_0_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
16
14
|
i0.ɵɵelementStart(0, "div", 8);
|
|
@@ -102,22 +100,22 @@ function NewActionPanelComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
102
100
|
i0.ɵɵelementStart(16, "div", 9)(17, "label", 13);
|
|
103
101
|
i0.ɵɵtext(18, " Action Name ");
|
|
104
102
|
i0.ɵɵelementEnd();
|
|
105
|
-
i0.ɵɵelementStart(19, "
|
|
106
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
103
|
+
i0.ɵɵelementStart(19, "input", 14);
|
|
104
|
+
i0.ɵɵtwoWayListener("ngModelChange", function NewActionPanelComponent_Conditional_0_Template_input_ngModelChange_19_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Name, $event) || (ctx_r1.Name = $event); return i0.ɵɵresetView($event); });
|
|
107
105
|
i0.ɵɵelementEnd();
|
|
108
106
|
i0.ɵɵconditionalCreate(20, NewActionPanelComponent_Conditional_0_Conditional_20_Template, 2, 1, "span", 15);
|
|
109
107
|
i0.ɵɵelementEnd();
|
|
110
108
|
i0.ɵɵelementStart(21, "div", 9)(22, "label", 16);
|
|
111
109
|
i0.ɵɵtext(23, " Description ");
|
|
112
110
|
i0.ɵɵelementEnd();
|
|
113
|
-
i0.ɵɵelementStart(24, "
|
|
114
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
111
|
+
i0.ɵɵelementStart(24, "textarea", 17);
|
|
112
|
+
i0.ɵɵtwoWayListener("ngModelChange", function NewActionPanelComponent_Conditional_0_Template_textarea_ngModelChange_24_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Description, $event) || (ctx_r1.Description = $event); return i0.ɵɵresetView($event); });
|
|
115
113
|
i0.ɵɵelementEnd()();
|
|
116
114
|
i0.ɵɵelementStart(25, "div", 9)(26, "label", 18);
|
|
117
115
|
i0.ɵɵtext(27, " Category ");
|
|
118
116
|
i0.ɵɵelementEnd();
|
|
119
|
-
i0.ɵɵelementStart(28, "
|
|
120
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
117
|
+
i0.ɵɵelementStart(28, "mj-dropdown", 19);
|
|
118
|
+
i0.ɵɵtwoWayListener("ngModelChange", function NewActionPanelComponent_Conditional_0_Template_mj_dropdown_ngModelChange_28_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.CategoryID, $event) || (ctx_r1.CategoryID = $event); return i0.ɵɵresetView($event); });
|
|
121
119
|
i0.ɵɵelementEnd();
|
|
122
120
|
i0.ɵɵconditionalCreate(29, NewActionPanelComponent_Conditional_0_Conditional_29_Template, 2, 1, "span", 15);
|
|
123
121
|
i0.ɵɵelementEnd();
|
|
@@ -138,33 +136,31 @@ function NewActionPanelComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
138
136
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
139
137
|
i0.ɵɵadvance();
|
|
140
138
|
i0.ɵɵproperty("@slideIn", undefined);
|
|
141
|
-
i0.ɵɵadvance(
|
|
142
|
-
i0.ɵɵproperty("fillMode", "flat");
|
|
143
|
-
i0.ɵɵadvance(3);
|
|
139
|
+
i0.ɵɵadvance(8);
|
|
144
140
|
i0.ɵɵconditional(ctx_r1.Errors["general"] ? 9 : -1);
|
|
145
141
|
i0.ɵɵadvance(5);
|
|
146
142
|
i0.ɵɵrepeater(ctx_r1.TypeOptions);
|
|
147
143
|
i0.ɵɵadvance(5);
|
|
148
144
|
i0.ɵɵclassProp("invalid", ctx_r1.Errors["name"]);
|
|
149
145
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Name);
|
|
150
|
-
i0.ɵɵproperty("
|
|
146
|
+
i0.ɵɵproperty("maxlength", 425);
|
|
151
147
|
i0.ɵɵadvance();
|
|
152
148
|
i0.ɵɵconditional(ctx_r1.Errors["name"] ? 20 : -1);
|
|
153
149
|
i0.ɵɵadvance(4);
|
|
154
150
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Description);
|
|
155
|
-
i0.ɵɵproperty("
|
|
151
|
+
i0.ɵɵproperty("rows", 3);
|
|
156
152
|
i0.ɵɵadvance(4);
|
|
157
153
|
i0.ɵɵclassProp("invalid", ctx_r1.Errors["category"]);
|
|
158
154
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.CategoryID);
|
|
159
|
-
i0.ɵɵproperty("
|
|
155
|
+
i0.ɵɵproperty("Data", ctx_r1.getCategoryOptions())("ValuePrimitive", true);
|
|
160
156
|
i0.ɵɵadvance();
|
|
161
157
|
i0.ɵɵconditional(ctx_r1.Errors["category"] ? 29 : -1);
|
|
162
158
|
i0.ɵɵadvance(6);
|
|
163
|
-
i0.ɵɵproperty("
|
|
159
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsSaving);
|
|
164
160
|
i0.ɵɵadvance();
|
|
165
161
|
i0.ɵɵconditional(ctx_r1.IsSaving ? 36 : 37);
|
|
166
162
|
i0.ɵɵadvance(2);
|
|
167
|
-
i0.ɵɵproperty("
|
|
163
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsSaving);
|
|
168
164
|
} }
|
|
169
165
|
export class NewActionPanelComponent {
|
|
170
166
|
StateService;
|
|
@@ -318,11 +314,11 @@ export class NewActionPanelComponent {
|
|
|
318
314
|
return path.join(' / ');
|
|
319
315
|
}
|
|
320
316
|
static ɵfac = function NewActionPanelComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NewActionPanelComponent)(i0.ɵɵdirectiveInject(i1.ActionExplorerStateService), i0.ɵɵdirectiveInject(i2.NavigationService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
321
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NewActionPanelComponent, selectors: [["mj-new-action-panel"]], inputs: { Categories: "Categories", PreselectedCategoryId: "PreselectedCategoryId" }, outputs: { ActionCreated: "ActionCreated", Close: "Close" }, standalone: false, decls: 1, vars: 1, consts: [[1, "panel-backdrop"], [1, "panel-backdrop", 3, "click"], [1, "slide-panel"], [1, "panel-header"], [1, "fa-solid", "fa-bolt"], ["
|
|
322
|
-
i0.ɵɵconditionalCreate(0, NewActionPanelComponent_Conditional_0_Template, 40,
|
|
317
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NewActionPanelComponent, selectors: [["mj-new-action-panel"]], inputs: { Categories: "Categories", PreselectedCategoryId: "PreselectedCategoryId" }, outputs: { ActionCreated: "ActionCreated", Close: "Close" }, standalone: false, decls: 1, vars: 1, consts: [[1, "panel-backdrop"], [1, "panel-backdrop", 3, "click"], [1, "slide-panel"], [1, "panel-header"], [1, "fa-solid", "fa-bolt"], ["mjButton", "", "variant", "flat", 3, "click"], [1, "fa-solid", "fa-times"], [1, "panel-content"], [1, "error-banner"], [1, "form-group"], [1, "form-label", "required"], [1, "type-selector"], [1, "type-option", 3, "selected"], ["for", "actionName", 1, "form-label", "required"], ["type", "text", "id", "actionName", "placeholder", "Enter action name", 1, "mj-input", 3, "ngModelChange", "ngModel", "maxlength"], [1, "error-text"], ["for", "actionDescription", 1, "form-label"], ["id", "actionDescription", "placeholder", "Describe what this action does", 1, "mj-textarea", 3, "ngModelChange", "ngModel", "rows"], ["for", "actionCategory", 1, "form-label", "required"], ["TextField", "text", "ValueField", "value", 3, "ngModelChange", "ngModel", "Data", "ValuePrimitive"], [1, "info-box"], [1, "fa-solid", "fa-info-circle"], [1, "panel-footer"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], ["mjButton", "", "variant", "outline", 3, "click", "disabled"], [1, "fa-solid", "fa-exclamation-circle"], [1, "type-option", 3, "click"], [1, "type-icon"], [1, "type-info"], [1, "type-label"], [1, "type-description"], [1, "fa-solid", "fa-check", "check-icon"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-check"]], template: function NewActionPanelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
318
|
+
i0.ɵɵconditionalCreate(0, NewActionPanelComponent_Conditional_0_Template, 40, 18, "div", 0);
|
|
323
319
|
} if (rf & 2) {
|
|
324
320
|
i0.ɵɵconditional(ctx.IsOpen ? 0 : -1);
|
|
325
|
-
} }, dependencies: [i3.NgControlStatus, i3.MaxLengthValidator, i3.NgModel, i4.
|
|
321
|
+
} }, dependencies: [i3.DefaultValueAccessor, i3.NgControlStatus, i3.MaxLengthValidator, i3.NgModel, i4.MJButtonDirective, i4.MJDropdownComponent], styles: [".panel-backdrop[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--mj-bg-overlay);\n z-index: 1000;\n display: flex;\n justify-content: flex-end;\n}\n\n.slide-panel[_ngcontent-%COMP%] {\n width: 500px;\n max-width: 100%;\n height: 100%;\n background: var(--mj-bg-surface-card);\n box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);\n display: flex;\n flex-direction: column;\n}\n\n.panel-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 20px 24px;\n border-bottom: 1px solid var(--mj-border-default);\n}\n\n.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 10px;\n color: var(--mj-text-primary);\n}\n\n.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n}\n\n.panel-content[_ngcontent-%COMP%] {\n flex: 1;\n padding: 24px;\n overflow-y: auto;\n}\n\n.error-banner[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px 16px;\n background: color-mix(in srgb, var(--mj-status-error) 10%, var(--mj-bg-surface));\n color: var(--mj-status-error);\n border-radius: 8px;\n margin-bottom: 20px;\n font-size: 14px;\n}\n\n.error-banner[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 16px;\n}\n\n.form-group[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}\n\n.form-label[_ngcontent-%COMP%] {\n display: block;\n margin-bottom: 8px;\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.form-label.required[_ngcontent-%COMP%]::after {\n content: ' *';\n color: var(--mj-status-error);\n}\n\n\n\n.type-selector[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.type-option[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 14px;\n padding: 14px 16px;\n border: 2px solid var(--mj-border-default);\n border-radius: 10px;\n background: var(--mj-bg-surface-card);\n cursor: pointer;\n transition: all 0.2s ease;\n text-align: left;\n}\n\n.type-option[_ngcontent-%COMP%]:hover {\n border-color: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n background: var(--mj-bg-surface-hover);\n}\n\n.type-option.selected[_ngcontent-%COMP%] {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n}\n\n.type-icon[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n height: 44px;\n border-radius: 10px;\n background: var(--mj-bg-surface-sunken);\n flex-shrink: 0;\n}\n\n.type-option.selected[_ngcontent-%COMP%] .type-icon[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n}\n\n.type-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 18px;\n color: var(--mj-text-muted);\n}\n\n.type-option.selected[_ngcontent-%COMP%] .type-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-text-inverse);\n}\n\n.type-info[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.type-label[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.type-description[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-muted);\n}\n\n.check-icon[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n font-size: 16px;\n}\n\n.error-text[_ngcontent-%COMP%] {\n display: block;\n margin-top: 4px;\n font-size: 12px;\n color: var(--mj-status-error);\n}\n\n\n\n.info-box[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n padding: 14px 16px;\n background: color-mix(in srgb, var(--mj-status-info) 10%, var(--mj-bg-surface));\n border-radius: 8px;\n margin-top: 24px;\n}\n\n.info-box[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-status-info);\n font-size: 16px;\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n.info-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 13px;\n color: var(--mj-text-primary);\n line-height: 1.5;\n}\n\n.panel-footer[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n padding: 16px 24px;\n border-top: 1px solid var(--mj-border-default);\n background: var(--mj-bg-page);\n}\n\n.panel-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n\n\n@media (max-width: 520px) {\n .slide-panel[_ngcontent-%COMP%] {\n width: 100%;\n }\n}"], data: { animation: [
|
|
326
322
|
trigger('slideIn', [
|
|
327
323
|
transition(':enter', [
|
|
328
324
|
style({ transform: 'translateX(100%)', opacity: 0 }),
|
|
@@ -346,7 +342,7 @@ export class NewActionPanelComponent {
|
|
|
346
342
|
animate('200ms ease-in', style({ transform: 'translateX(100%)', opacity: 0 }))
|
|
347
343
|
])
|
|
348
344
|
])
|
|
349
|
-
], template: "@if (IsOpen) {\n <div class=\"panel-backdrop\" (click)=\"onBackdropClick($event)\">\n <div class=\"slide-panel\" @slideIn>\n <div class=\"panel-header\">\n <h2>\n <i class=\"fa-solid fa-bolt\"></i>\n New Action\n </h2>\n <button
|
|
345
|
+
], template: "@if (IsOpen) {\n <div class=\"panel-backdrop\" (click)=\"onBackdropClick($event)\">\n <div class=\"slide-panel\" @slideIn>\n <div class=\"panel-header\">\n <h2>\n <i class=\"fa-solid fa-bolt\"></i>\n New Action\n </h2>\n <button mjButton\n variant=\"flat\"\n (click)=\"onClose()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n\n <div class=\"panel-content\">\n @if (Errors['general']) {\n <div class=\"error-banner\">\n <i class=\"fa-solid fa-exclamation-circle\"></i>\n {{ Errors['general'] }}\n </div>\n }\n\n <!-- Action Type Selection -->\n <div class=\"form-group\">\n <label class=\"form-label required\">Action Type</label>\n <div class=\"type-selector\">\n @for (option of TypeOptions; track option.value) {\n <button class=\"type-option\"\n [class.selected]=\"Type === option.value\"\n (click)=\"selectType(option.value)\">\n <div class=\"type-icon\">\n <i [class]=\"option.icon\"></i>\n </div>\n <div class=\"type-info\">\n <span class=\"type-label\">{{ option.label }}</span>\n <span class=\"type-description\">{{ option.description }}</span>\n </div>\n @if (Type === option.value) {\n <i class=\"fa-solid fa-check check-icon\"></i>\n }\n </button>\n }\n </div>\n </div>\n\n <div class=\"form-group\">\n <label for=\"actionName\" class=\"form-label required\">\n Action Name\n </label>\n <input type=\"text\" class=\"mj-input\"\n id=\"actionName\"\n [(ngModel)]=\"Name\"\n placeholder=\"Enter action name\"\n [maxlength]=\"425\"\n [class.invalid]=\"Errors['name']\" />\n @if (Errors['name']) {\n <span class=\"error-text\">{{ Errors['name'] }}</span>\n }\n </div>\n\n <div class=\"form-group\">\n <label for=\"actionDescription\" class=\"form-label\">\n Description\n </label>\n <textarea class=\"mj-textarea\"\n id=\"actionDescription\"\n [(ngModel)]=\"Description\"\n placeholder=\"Describe what this action does\"\n [rows]=\"3\"></textarea>\n </div>\n\n <div class=\"form-group\">\n <label for=\"actionCategory\" class=\"form-label required\">\n Category\n </label>\n <mj-dropdown\n [(ngModel)]=\"CategoryID\"\n [Data]=\"getCategoryOptions()\"\n TextField=\"text\"\n ValueField=\"value\"\n [ValuePrimitive]=\"true\"\n [class.invalid]=\"Errors['category']\">\n </mj-dropdown>\n @if (Errors['category']) {\n <span class=\"error-text\">{{ Errors['category'] }}</span>\n }\n </div>\n\n <div class=\"info-box\">\n <i class=\"fa-solid fa-info-circle\"></i>\n <p>\n After creating the action, you'll be taken to the full action editor\n where you can configure parameters, code, and other settings.\n </p>\n </div>\n </div>\n\n <div class=\"panel-footer\">\n <button mjButton\n variant=\"primary\"\n [disabled]=\"IsSaving\"\n (click)=\"onSave()\">\n @if (IsSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n Creating...\n } @else {\n <i class=\"fa-solid fa-check\"></i>\n Create Action\n }\n </button>\n <button mjButton\n variant=\"outline\"\n [disabled]=\"IsSaving\"\n (click)=\"onClose()\">\n Cancel\n </button>\n </div>\n </div>\n </div>\n}\n", styles: [".panel-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--mj-bg-overlay);\n z-index: 1000;\n display: flex;\n justify-content: flex-end;\n}\n\n.slide-panel {\n width: 500px;\n max-width: 100%;\n height: 100%;\n background: var(--mj-bg-surface-card);\n box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);\n display: flex;\n flex-direction: column;\n}\n\n.panel-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 20px 24px;\n border-bottom: 1px solid var(--mj-border-default);\n}\n\n.panel-header h2 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 10px;\n color: var(--mj-text-primary);\n}\n\n.panel-header h2 i {\n color: var(--mj-brand-primary);\n}\n\n.panel-content {\n flex: 1;\n padding: 24px;\n overflow-y: auto;\n}\n\n.error-banner {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px 16px;\n background: color-mix(in srgb, var(--mj-status-error) 10%, var(--mj-bg-surface));\n color: var(--mj-status-error);\n border-radius: 8px;\n margin-bottom: 20px;\n font-size: 14px;\n}\n\n.error-banner i {\n font-size: 16px;\n}\n\n.form-group {\n margin-bottom: 20px;\n}\n\n.form-label {\n display: block;\n margin-bottom: 8px;\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.form-label.required::after {\n content: ' *';\n color: var(--mj-status-error);\n}\n\n/* Type Selector */\n.type-selector {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.type-option {\n display: flex;\n align-items: center;\n gap: 14px;\n padding: 14px 16px;\n border: 2px solid var(--mj-border-default);\n border-radius: 10px;\n background: var(--mj-bg-surface-card);\n cursor: pointer;\n transition: all 0.2s ease;\n text-align: left;\n}\n\n.type-option:hover {\n border-color: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n background: var(--mj-bg-surface-hover);\n}\n\n.type-option.selected {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n}\n\n.type-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n height: 44px;\n border-radius: 10px;\n background: var(--mj-bg-surface-sunken);\n flex-shrink: 0;\n}\n\n.type-option.selected .type-icon {\n background: var(--mj-brand-primary);\n}\n\n.type-icon i {\n font-size: 18px;\n color: var(--mj-text-muted);\n}\n\n.type-option.selected .type-icon i {\n color: var(--mj-text-inverse);\n}\n\n.type-info {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.type-label {\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.type-description {\n font-size: 12px;\n color: var(--mj-text-muted);\n}\n\n.check-icon {\n color: var(--mj-brand-primary);\n font-size: 16px;\n}\n\n.error-text {\n display: block;\n margin-top: 4px;\n font-size: 12px;\n color: var(--mj-status-error);\n}\n\n/* Info Box */\n.info-box {\n display: flex;\n gap: 12px;\n padding: 14px 16px;\n background: color-mix(in srgb, var(--mj-status-info) 10%, var(--mj-bg-surface));\n border-radius: 8px;\n margin-top: 24px;\n}\n\n.info-box i {\n color: var(--mj-status-info);\n font-size: 16px;\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n.info-box p {\n margin: 0;\n font-size: 13px;\n color: var(--mj-text-primary);\n line-height: 1.5;\n}\n\n.panel-footer {\n display: flex;\n gap: 12px;\n padding: 16px 24px;\n border-top: 1px solid var(--mj-border-default);\n background: var(--mj-bg-page);\n}\n\n.panel-footer button {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n/* Mobile */\n@media (max-width: 520px) {\n .slide-panel {\n width: 100%;\n }\n}\n"] }]
|
|
350
346
|
}], () => [{ type: i1.ActionExplorerStateService }, { type: i2.NavigationService }, { type: i0.ChangeDetectorRef }], { Categories: [{
|
|
351
347
|
type: Input
|
|
352
348
|
}], PreselectedCategoryId: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new-action-panel.component.js","sourceRoot":"","sources":["../../../../src/Actions/components/explorer/new-action-panel.component.ts","../../../../src/Actions/components/explorer/new-action-panel.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EAGZ,uBAAuB,EAExB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIxE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;;;;;;;;;;ICA1C,8BAA0B;IACxB,wBAA8C;IAC9C,YACF;IAAA,iBAAM;;;IADJ,eACF;IADE,yDACF;;;IAmBQ,wBAA4C;;;;IAXhD,kCAEqC;IAAnC,+NAAS,kCAAwB,KAAC;IAClC,+BAAuB;IACrB,oBAA6B;IAC/B,iBAAM;IAEJ,AADF,+BAAuB,eACI;IAAA,YAAkB;IAAA,iBAAO;IAClD,gCAA+B;IAAA,YAAwB;IACzD,AADyD,iBAAO,EAC1D;IACN,6GAA6B;IAG/B,iBAAS;;;;IAZP,2DAAwC;IAGnC,eAAqB;IAArB,6BAAqB;IAGC,eAAkB;IAAlB,qCAA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ectionStrategy,\n ChangeDetectorRef\n} from '@angular/core';\nimport { trigger, transition, style, animate } from '@angular/animations';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { Metadata, LogError, CompositeKey } from '@memberjunction/core';\nimport { MJActionCategoryEntity, MJActionEntity } from '@memberjunction/core-entities';\nimport { NavigationService } from '@memberjunction/ng-shared';\nimport { ActionExplorerStateService } from '../../services/action-explorer-state.service';\nimport { UUIDsEqual } from '@memberjunction/global';\n\ntype ActionType = 'Custom' | 'Generated';\n\n@Component({\n standalone: false,\n selector: 'mj-new-action-panel',\n templateUrl: './new-action-panel.component.html',\n styleUrls: ['./new-action-panel.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('slideIn', [\n transition(':enter', [\n style({ transform: 'translateX(100%)', opacity: 0 }),\n animate('250ms ease-out', style({ transform: 'translateX(0)', opacity: 1 }))\n ]),\n transition(':leave', [\n animate('200ms ease-in', style({ transform: 'translateX(100%)', opacity: 0 }))\n ])\n ])\n ]\n})\nexport class NewActionPanelComponent implements OnInit, OnDestroy {\n @Input() Categories: MJActionCategoryEntity[] = [];\n @Input() PreselectedCategoryId: string | null = null;\n @Output() ActionCreated = new EventEmitter<MJActionEntity>();\n @Output() Close = new EventEmitter<void>();\n\n public IsOpen = false;\n public IsSaving = false;\n\n // Form fields\n public Name = '';\n public Description = '';\n public CategoryID: string | null = null;\n public Type: ActionType = 'Custom';\n\n // Validation\n public Errors: { [key: string]: string } = {};\n\n public TypeOptions: Array<{ value: ActionType; label: string; icon: string; description: string }> = [\n {\n value: 'Custom',\n label: 'Custom Action',\n icon: 'fa-solid fa-code',\n description: 'Write your own action code with full control'\n },\n {\n value: 'Generated',\n label: 'AI Generated',\n icon: 'fa-solid fa-robot',\n description: 'Let AI generate the action code from a prompt'\n }\n ];\n\n private destroy$ = new Subject<void>();\n\n constructor(\n public StateService: ActionExplorerStateService,\n private navigationService: NavigationService,\n private cdr: ChangeDetectorRef\n ) {}\n\n ngOnInit(): void {\n this.StateService.NewActionPanelOpen$.pipe(\n takeUntil(this.destroy$)\n ).subscribe(isOpen => {\n this.IsOpen = isOpen;\n if (isOpen) {\n this.resetForm();\n }\n this.cdr.markForCheck();\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private resetForm(): void {\n this.Name = '';\n this.Description = '';\n this.CategoryID = this.PreselectedCategoryId || (this.StateService.SelectedCategoryId !== 'all' && this.StateService.SelectedCategoryId !== 'uncategorized'\n ? this.StateService.SelectedCategoryId\n : null);\n this.Type = 'Custom';\n this.Errors = {};\n this.IsSaving = false;\n }\n\n public onClose(): void {\n this.StateService.closeNewActionPanel();\n this.Close.emit();\n }\n\n public onBackdropClick(event: MouseEvent): void {\n if ((event.target as HTMLElement).classList.contains('panel-backdrop')) {\n this.onClose();\n }\n }\n\n public validate(): boolean {\n this.Errors = {};\n\n if (!this.Name || this.Name.trim().length === 0) {\n this.Errors['name'] = 'Action name is required';\n } else if (this.Name.trim().length < 3) {\n this.Errors['name'] = 'Action name must be at least 3 characters';\n } else if (this.Name.trim().length > 425) {\n this.Errors['name'] = 'Action name must be less than 425 characters';\n }\n\n if (!this.CategoryID) {\n this.Errors['category'] = 'Please select a category';\n }\n\n return Object.keys(this.Errors).length === 0;\n }\n\n public async onSave(): Promise<void> {\n if (!this.validate()) {\n this.cdr.markForCheck();\n return;\n }\n\n this.IsSaving = true;\n this.cdr.markForCheck();\n\n try {\n const md = new Metadata();\n const action = await md.GetEntityObject<MJActionEntity>('MJ: Actions');\n\n action.Name = this.Name.trim();\n action.Description = this.Description.trim() || null;\n action.CategoryID = this.CategoryID!;\n action.Type = this.Type;\n action.Status = 'Pending'; // New actions start as pending\n\n const saved = await action.Save();\n\n if (saved) {\n this.ActionCreated.emit(action);\n this.StateService.closeNewActionPanel();\n\n // Open the full action record for editing\n const key = new CompositeKey([{ FieldName: 'ID', Value: action.ID }]);\n this.navigationService.OpenEntityRecord('MJ: Actions', key);\n } else {\n this.Errors['general'] = 'Failed to save action. Please try again.';\n }\n } catch (error) {\n LogError('Failed to create action', undefined, error);\n this.Errors['general'] = 'An error occurred while creating the action.';\n } finally {\n this.IsSaving = false;\n this.cdr.markForCheck();\n }\n }\n\n public selectType(type: ActionType): void {\n this.Type = type;\n }\n\n public getCategoryOptions(): Array<{ text: string; value: string }> {\n const options: Array<{ text: string; value: string }> = [];\n\n // Sort categories by path for easier selection\n const sortedCategories = [...this.Categories].sort((a, b) =>\n this.getCategoryPath(a).localeCompare(this.getCategoryPath(b))\n );\n\n sortedCategories.forEach(category => {\n options.push({\n text: this.getCategoryPath(category),\n value: category.ID\n });\n });\n\n return options;\n }\n\n private getCategoryPath(category: MJActionCategoryEntity): string {\n const path: string[] = [category.Name];\n let currentParentId = category.ParentID;\n\n while (currentParentId) {\n const parent = this.Categories.find(c => UUIDsEqual(c.ID, currentParentId));\n if (parent) {\n path.unshift(parent.Name);\n currentParentId = parent.ParentID || null;\n } else {\n break;\n }\n }\n\n return path.join(' / ');\n }\n}\n","@if (IsOpen) {\n <div class=\"panel-backdrop\" (click)=\"onBackdropClick($event)\">\n <div class=\"slide-panel\" @slideIn>\n <div class=\"panel-header\">\n <h2>\n <i class=\"fa-solid fa-bolt\"></i>\n New Action\n </h2>\n <button kendoButton\n [fillMode]=\"'flat'\"\n (click)=\"onClose()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n\n <div class=\"panel-content\">\n @if (Errors['general']) {\n <div class=\"error-banner\">\n <i class=\"fa-solid fa-exclamation-circle\"></i>\n {{ Errors['general'] }}\n </div>\n }\n\n <!-- Action Type Selection -->\n <div class=\"form-group\">\n <label class=\"form-label required\">Action Type</label>\n <div class=\"type-selector\">\n @for (option of TypeOptions; track option.value) {\n <button class=\"type-option\"\n [class.selected]=\"Type === option.value\"\n (click)=\"selectType(option.value)\">\n <div class=\"type-icon\">\n <i [class]=\"option.icon\"></i>\n </div>\n <div class=\"type-info\">\n <span class=\"type-label\">{{ option.label }}</span>\n <span class=\"type-description\">{{ option.description }}</span>\n </div>\n @if (Type === option.value) {\n <i class=\"fa-solid fa-check check-icon\"></i>\n }\n </button>\n }\n </div>\n </div>\n\n <div class=\"form-group\">\n <label for=\"actionName\" class=\"form-label required\">\n Action Name\n </label>\n <kendo-textbox\n id=\"actionName\"\n [(ngModel)]=\"Name\"\n [placeholder]=\"'Enter action name'\"\n [maxlength]=\"425\"\n [class.invalid]=\"Errors['name']\">\n </kendo-textbox>\n @if (Errors['name']) {\n <span class=\"error-text\">{{ Errors['name'] }}</span>\n }\n </div>\n\n <div class=\"form-group\">\n <label for=\"actionDescription\" class=\"form-label\">\n Description\n </label>\n <kendo-textarea\n id=\"actionDescription\"\n [(ngModel)]=\"Description\"\n [placeholder]=\"'Describe what this action does'\"\n [rows]=\"3\">\n </kendo-textarea>\n </div>\n\n <div class=\"form-group\">\n <label for=\"actionCategory\" class=\"form-label required\">\n Category\n </label>\n <kendo-dropdownlist\n id=\"actionCategory\"\n [(ngModel)]=\"CategoryID\"\n [data]=\"getCategoryOptions()\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n [class.invalid]=\"Errors['category']\">\n </kendo-dropdownlist>\n @if (Errors['category']) {\n <span class=\"error-text\">{{ Errors['category'] }}</span>\n }\n </div>\n\n <div class=\"info-box\">\n <i class=\"fa-solid fa-info-circle\"></i>\n <p>\n After creating the action, you'll be taken to the full action editor\n where you can configure parameters, code, and other settings.\n </p>\n </div>\n </div>\n\n <div class=\"panel-footer\">\n <button kendoButton\n [fillMode]=\"'solid'\"\n [themeColor]=\"'primary'\"\n [disabled]=\"IsSaving\"\n (click)=\"onSave()\">\n @if (IsSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n Creating...\n } @else {\n <i class=\"fa-solid fa-check\"></i>\n Create Action\n }\n </button>\n <button kendoButton\n [fillMode]=\"'outline'\"\n [disabled]=\"IsSaving\"\n (click)=\"onClose()\">\n Cancel\n </button>\n </div>\n </div>\n </div>\n}\n"]}
|
|
1
|
+
{"version":3,"file":"new-action-panel.component.js","sourceRoot":"","sources":["../../../../src/Actions/components/explorer/new-action-panel.component.ts","../../../../src/Actions/components/explorer/new-action-panel.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EAGZ,uBAAuB,EAExB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIxE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;;;;;;;;ICA1C,8BAA0B;IACxB,wBAA8C;IAC9C,YACF;IAAA,iBAAM;;;IADJ,eACF;IADE,yDACF;;;IAmBQ,wBAA4C;;;;IAXhD,kCAEqC;IAAnC,+NAAS,kCAAwB,KAAC;IAClC,+BAAuB;IACrB,oBAA6B;IAC/B,iBAAM;IAEJ,AADF,+BAAuB,eACI;IAAA,YAAkB;IAAA,iBAAO;IAClD,gCAA+B;IAAA,YAAwB;IACzD,AADyD,iBAAO,EAC1D;IACN,6GAA6B;IAG/B,iBAAS;;;;IAZP,2DAAwC;IAGnC,eAAqB;IAArB,6BAAqB;IAGC,eAAkB;IAAlB,qCAAkB;IACZ,eAAwB;IAAxB,2CAAwB;IAEzD,cAEC;IAFD,0DAEC;;;IAiBL,gCAAyB;IAAA,YAAoB;IAAA,iBAAO;;;IAA3B,cAAoB;IAApB,2CAAoB;;;IA4B7C,gCAAyB;IAAA,YAAwB;IAAA,iBAAO;;;IAA/B,cAAwB;IAAxB,+CAAwB;;;IAmBjD,wBAA2C;IAC3C,6BACF;;;IACE,w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,EAAE,CAAC,CAAC;qBAC7E,CAAC;oBACF,UAAU,CAAC,QAAQ,EAAE;wBACnB,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;qBAC/E,CAAC;iBACH,CAAC;aACH;;iFAEU,uBAAuB;cAlBnC,SAAS;6BACI,KAAK,YACP,qBAAqB,mBAGd,uBAAuB,CAAC,MAAM,cACnC;oBACV,OAAO,CAAC,SAAS,EAAE;wBACjB,UAAU,CAAC,QAAQ,EAAE;4BACnB,KAAK,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;4BACpD,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;yBAC7E,CAAC;wBACF,UAAU,CAAC,QAAQ,EAAE;4BACnB,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;yBAC/E,CAAC;qBACH,CAAC;iBACH;;kBAGA,KAAK;;kBACL,KAAK;;kBACL,MAAM;;kBACN,MAAM;;kFAJI,uBAAuB","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n OnInit,\n OnDestroy,\n ChangeDetectionStrategy,\n ChangeDetectorRef\n} from '@angular/core';\nimport { trigger, transition, style, animate } from '@angular/animations';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { Metadata, LogError, CompositeKey } from '@memberjunction/core';\nimport { MJActionCategoryEntity, MJActionEntity } from '@memberjunction/core-entities';\nimport { NavigationService } from '@memberjunction/ng-shared';\nimport { ActionExplorerStateService } from '../../services/action-explorer-state.service';\nimport { UUIDsEqual } from '@memberjunction/global';\n\ntype ActionType = 'Custom' | 'Generated';\n\n@Component({\n standalone: false,\n selector: 'mj-new-action-panel',\n templateUrl: './new-action-panel.component.html',\n styleUrls: ['./new-action-panel.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('slideIn', [\n transition(':enter', [\n style({ transform: 'translateX(100%)', opacity: 0 }),\n animate('250ms ease-out', style({ transform: 'translateX(0)', opacity: 1 }))\n ]),\n transition(':leave', [\n animate('200ms ease-in', style({ transform: 'translateX(100%)', opacity: 0 }))\n ])\n ])\n ]\n})\nexport class NewActionPanelComponent implements OnInit, OnDestroy {\n @Input() Categories: MJActionCategoryEntity[] = [];\n @Input() PreselectedCategoryId: string | null = null;\n @Output() ActionCreated = new EventEmitter<MJActionEntity>();\n @Output() Close = new EventEmitter<void>();\n\n public IsOpen = false;\n public IsSaving = false;\n\n // Form fields\n public Name = '';\n public Description = '';\n public CategoryID: string | null = null;\n public Type: ActionType = 'Custom';\n\n // Validation\n public Errors: { [key: string]: string } = {};\n\n public TypeOptions: Array<{ value: ActionType; label: string; icon: string; description: string }> = [\n {\n value: 'Custom',\n label: 'Custom Action',\n icon: 'fa-solid fa-code',\n description: 'Write your own action code with full control'\n },\n {\n value: 'Generated',\n label: 'AI Generated',\n icon: 'fa-solid fa-robot',\n description: 'Let AI generate the action code from a prompt'\n }\n ];\n\n private destroy$ = new Subject<void>();\n\n constructor(\n public StateService: ActionExplorerStateService,\n private navigationService: NavigationService,\n private cdr: ChangeDetectorRef\n ) {}\n\n ngOnInit(): void {\n this.StateService.NewActionPanelOpen$.pipe(\n takeUntil(this.destroy$)\n ).subscribe(isOpen => {\n this.IsOpen = isOpen;\n if (isOpen) {\n this.resetForm();\n }\n this.cdr.markForCheck();\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private resetForm(): void {\n this.Name = '';\n this.Description = '';\n this.CategoryID = this.PreselectedCategoryId || (this.StateService.SelectedCategoryId !== 'all' && this.StateService.SelectedCategoryId !== 'uncategorized'\n ? this.StateService.SelectedCategoryId\n : null);\n this.Type = 'Custom';\n this.Errors = {};\n this.IsSaving = false;\n }\n\n public onClose(): void {\n this.StateService.closeNewActionPanel();\n this.Close.emit();\n }\n\n public onBackdropClick(event: MouseEvent): void {\n if ((event.target as HTMLElement).classList.contains('panel-backdrop')) {\n this.onClose();\n }\n }\n\n public validate(): boolean {\n this.Errors = {};\n\n if (!this.Name || this.Name.trim().length === 0) {\n this.Errors['name'] = 'Action name is required';\n } else if (this.Name.trim().length < 3) {\n this.Errors['name'] = 'Action name must be at least 3 characters';\n } else if (this.Name.trim().length > 425) {\n this.Errors['name'] = 'Action name must be less than 425 characters';\n }\n\n if (!this.CategoryID) {\n this.Errors['category'] = 'Please select a category';\n }\n\n return Object.keys(this.Errors).length === 0;\n }\n\n public async onSave(): Promise<void> {\n if (!this.validate()) {\n this.cdr.markForCheck();\n return;\n }\n\n this.IsSaving = true;\n this.cdr.markForCheck();\n\n try {\n const md = new Metadata();\n const action = await md.GetEntityObject<MJActionEntity>('MJ: Actions');\n\n action.Name = this.Name.trim();\n action.Description = this.Description.trim() || null;\n action.CategoryID = this.CategoryID!;\n action.Type = this.Type;\n action.Status = 'Pending'; // New actions start as pending\n\n const saved = await action.Save();\n\n if (saved) {\n this.ActionCreated.emit(action);\n this.StateService.closeNewActionPanel();\n\n // Open the full action record for editing\n const key = new CompositeKey([{ FieldName: 'ID', Value: action.ID }]);\n this.navigationService.OpenEntityRecord('MJ: Actions', key);\n } else {\n this.Errors['general'] = 'Failed to save action. Please try again.';\n }\n } catch (error) {\n LogError('Failed to create action', undefined, error);\n this.Errors['general'] = 'An error occurred while creating the action.';\n } finally {\n this.IsSaving = false;\n this.cdr.markForCheck();\n }\n }\n\n public selectType(type: ActionType): void {\n this.Type = type;\n }\n\n public getCategoryOptions(): Array<{ text: string; value: string }> {\n const options: Array<{ text: string; value: string }> = [];\n\n // Sort categories by path for easier selection\n const sortedCategories = [...this.Categories].sort((a, b) =>\n this.getCategoryPath(a).localeCompare(this.getCategoryPath(b))\n );\n\n sortedCategories.forEach(category => {\n options.push({\n text: this.getCategoryPath(category),\n value: category.ID\n });\n });\n\n return options;\n }\n\n private getCategoryPath(category: MJActionCategoryEntity): string {\n const path: string[] = [category.Name];\n let currentParentId = category.ParentID;\n\n while (currentParentId) {\n const parent = this.Categories.find(c => UUIDsEqual(c.ID, currentParentId));\n if (parent) {\n path.unshift(parent.Name);\n currentParentId = parent.ParentID || null;\n } else {\n break;\n }\n }\n\n return path.join(' / ');\n }\n}\n","@if (IsOpen) {\n <div class=\"panel-backdrop\" (click)=\"onBackdropClick($event)\">\n <div class=\"slide-panel\" @slideIn>\n <div class=\"panel-header\">\n <h2>\n <i class=\"fa-solid fa-bolt\"></i>\n New Action\n </h2>\n <button mjButton\n variant=\"flat\"\n (click)=\"onClose()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n\n <div class=\"panel-content\">\n @if (Errors['general']) {\n <div class=\"error-banner\">\n <i class=\"fa-solid fa-exclamation-circle\"></i>\n {{ Errors['general'] }}\n </div>\n }\n\n <!-- Action Type Selection -->\n <div class=\"form-group\">\n <label class=\"form-label required\">Action Type</label>\n <div class=\"type-selector\">\n @for (option of TypeOptions; track option.value) {\n <button class=\"type-option\"\n [class.selected]=\"Type === option.value\"\n (click)=\"selectType(option.value)\">\n <div class=\"type-icon\">\n <i [class]=\"option.icon\"></i>\n </div>\n <div class=\"type-info\">\n <span class=\"type-label\">{{ option.label }}</span>\n <span class=\"type-description\">{{ option.description }}</span>\n </div>\n @if (Type === option.value) {\n <i class=\"fa-solid fa-check check-icon\"></i>\n }\n </button>\n }\n </div>\n </div>\n\n <div class=\"form-group\">\n <label for=\"actionName\" class=\"form-label required\">\n Action Name\n </label>\n <input type=\"text\" class=\"mj-input\"\n id=\"actionName\"\n [(ngModel)]=\"Name\"\n placeholder=\"Enter action name\"\n [maxlength]=\"425\"\n [class.invalid]=\"Errors['name']\" />\n @if (Errors['name']) {\n <span class=\"error-text\">{{ Errors['name'] }}</span>\n }\n </div>\n\n <div class=\"form-group\">\n <label for=\"actionDescription\" class=\"form-label\">\n Description\n </label>\n <textarea class=\"mj-textarea\"\n id=\"actionDescription\"\n [(ngModel)]=\"Description\"\n placeholder=\"Describe what this action does\"\n [rows]=\"3\"></textarea>\n </div>\n\n <div class=\"form-group\">\n <label for=\"actionCategory\" class=\"form-label required\">\n Category\n </label>\n <mj-dropdown\n [(ngModel)]=\"CategoryID\"\n [Data]=\"getCategoryOptions()\"\n TextField=\"text\"\n ValueField=\"value\"\n [ValuePrimitive]=\"true\"\n [class.invalid]=\"Errors['category']\">\n </mj-dropdown>\n @if (Errors['category']) {\n <span class=\"error-text\">{{ Errors['category'] }}</span>\n }\n </div>\n\n <div class=\"info-box\">\n <i class=\"fa-solid fa-info-circle\"></i>\n <p>\n After creating the action, you'll be taken to the full action editor\n where you can configure parameters, code, and other settings.\n </p>\n </div>\n </div>\n\n <div class=\"panel-footer\">\n <button mjButton\n variant=\"primary\"\n [disabled]=\"IsSaving\"\n (click)=\"onSave()\">\n @if (IsSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n Creating...\n } @else {\n <i class=\"fa-solid fa-check\"></i>\n Create Action\n }\n </button>\n <button mjButton\n variant=\"outline\"\n [disabled]=\"IsSaving\"\n (click)=\"onClose()\">\n Cancel\n </button>\n </div>\n </div>\n </div>\n}\n"]}
|
|
@@ -7,9 +7,7 @@ import { UUIDsEqual } from '@memberjunction/global';
|
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
import * as i1 from "../../services/action-explorer-state.service";
|
|
9
9
|
import * as i2 from "@angular/forms";
|
|
10
|
-
import * as i3 from "@
|
|
11
|
-
import * as i4 from "@progress/kendo-angular-dropdowns";
|
|
12
|
-
import * as i5 from "@progress/kendo-angular-inputs";
|
|
10
|
+
import * as i3 from "@memberjunction/ng-ui-components";
|
|
13
11
|
function NewCategoryPanelComponent_Conditional_0_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
14
12
|
i0.ɵɵelementStart(0, "div", 8);
|
|
15
13
|
i0.ɵɵelement(1, "i", 21);
|
|
@@ -54,22 +52,22 @@ function NewCategoryPanelComponent_Conditional_0_Template(rf, ctx) { if (rf & 1)
|
|
|
54
52
|
i0.ɵɵelementStart(10, "div", 9)(11, "label", 10);
|
|
55
53
|
i0.ɵɵtext(12, " Category Name ");
|
|
56
54
|
i0.ɵɵelementEnd();
|
|
57
|
-
i0.ɵɵelementStart(13, "
|
|
58
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
55
|
+
i0.ɵɵelementStart(13, "input", 11);
|
|
56
|
+
i0.ɵɵtwoWayListener("ngModelChange", function NewCategoryPanelComponent_Conditional_0_Template_input_ngModelChange_13_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Name, $event) || (ctx_r1.Name = $event); return i0.ɵɵresetView($event); });
|
|
59
57
|
i0.ɵɵelementEnd();
|
|
60
58
|
i0.ɵɵconditionalCreate(14, NewCategoryPanelComponent_Conditional_0_Conditional_14_Template, 2, 1, "span", 12);
|
|
61
59
|
i0.ɵɵelementEnd();
|
|
62
60
|
i0.ɵɵelementStart(15, "div", 9)(16, "label", 13);
|
|
63
61
|
i0.ɵɵtext(17, " Description ");
|
|
64
62
|
i0.ɵɵelementEnd();
|
|
65
|
-
i0.ɵɵelementStart(18, "
|
|
66
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
63
|
+
i0.ɵɵelementStart(18, "textarea", 14);
|
|
64
|
+
i0.ɵɵtwoWayListener("ngModelChange", function NewCategoryPanelComponent_Conditional_0_Template_textarea_ngModelChange_18_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Description, $event) || (ctx_r1.Description = $event); return i0.ɵɵresetView($event); });
|
|
67
65
|
i0.ɵɵelementEnd()();
|
|
68
66
|
i0.ɵɵelementStart(19, "div", 9)(20, "label", 15);
|
|
69
67
|
i0.ɵɵtext(21, " Parent Category ");
|
|
70
68
|
i0.ɵɵelementEnd();
|
|
71
|
-
i0.ɵɵelementStart(22, "
|
|
72
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
69
|
+
i0.ɵɵelementStart(22, "mj-dropdown", 16);
|
|
70
|
+
i0.ɵɵtwoWayListener("ngModelChange", function NewCategoryPanelComponent_Conditional_0_Template_mj_dropdown_ngModelChange_22_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.ParentID, $event) || (ctx_r1.ParentID = $event); return i0.ɵɵresetView($event); });
|
|
73
71
|
i0.ɵɵelementEnd();
|
|
74
72
|
i0.ɵɵelementStart(23, "span", 17);
|
|
75
73
|
i0.ɵɵtext(24, " Leave empty to create a root-level category ");
|
|
@@ -86,28 +84,26 @@ function NewCategoryPanelComponent_Conditional_0_Template(rf, ctx) { if (rf & 1)
|
|
|
86
84
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
87
85
|
i0.ɵɵadvance();
|
|
88
86
|
i0.ɵɵproperty("@slideIn", undefined);
|
|
89
|
-
i0.ɵɵadvance(
|
|
90
|
-
i0.ɵɵproperty("fillMode", "flat");
|
|
91
|
-
i0.ɵɵadvance(3);
|
|
87
|
+
i0.ɵɵadvance(8);
|
|
92
88
|
i0.ɵɵconditional(ctx_r1.Errors["general"] ? 9 : -1);
|
|
93
89
|
i0.ɵɵadvance(4);
|
|
94
90
|
i0.ɵɵclassProp("invalid", ctx_r1.Errors["name"]);
|
|
95
91
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Name);
|
|
96
|
-
i0.ɵɵproperty("
|
|
92
|
+
i0.ɵɵproperty("maxlength", 200);
|
|
97
93
|
i0.ɵɵadvance();
|
|
98
94
|
i0.ɵɵconditional(ctx_r1.Errors["name"] ? 14 : -1);
|
|
99
95
|
i0.ɵɵadvance(4);
|
|
100
96
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Description);
|
|
101
|
-
i0.ɵɵproperty("
|
|
97
|
+
i0.ɵɵproperty("rows", 3)("maxlength", 1000);
|
|
102
98
|
i0.ɵɵadvance(4);
|
|
103
99
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.ParentID);
|
|
104
|
-
i0.ɵɵproperty("
|
|
100
|
+
i0.ɵɵproperty("Data", ctx_r1.getParentOptions())("ValuePrimitive", true);
|
|
105
101
|
i0.ɵɵadvance(4);
|
|
106
|
-
i0.ɵɵproperty("
|
|
102
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsSaving);
|
|
107
103
|
i0.ɵɵadvance();
|
|
108
104
|
i0.ɵɵconditional(ctx_r1.IsSaving ? 27 : 28);
|
|
109
105
|
i0.ɵɵadvance(2);
|
|
110
|
-
i0.ɵɵproperty("
|
|
106
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsSaving);
|
|
111
107
|
} }
|
|
112
108
|
export class NewCategoryPanelComponent {
|
|
113
109
|
StateService;
|
|
@@ -241,11 +237,11 @@ export class NewCategoryPanelComponent {
|
|
|
241
237
|
return path.join(' / ');
|
|
242
238
|
}
|
|
243
239
|
static ɵfac = function NewCategoryPanelComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NewCategoryPanelComponent)(i0.ɵɵdirectiveInject(i1.ActionExplorerStateService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
244
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NewCategoryPanelComponent, selectors: [["mj-new-category-panel"]], inputs: { Categories: "Categories", PreselectedParentId: "PreselectedParentId" }, outputs: { CategoryCreated: "CategoryCreated", Close: "Close" }, standalone: false, decls: 1, vars: 1, consts: [[1, "panel-backdrop"], [1, "panel-backdrop", 3, "click"], [1, "slide-panel"], [1, "panel-header"], [1, "fa-solid", "fa-folder-plus"], ["
|
|
245
|
-
i0.ɵɵconditionalCreate(0, NewCategoryPanelComponent_Conditional_0_Template, 31,
|
|
240
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NewCategoryPanelComponent, selectors: [["mj-new-category-panel"]], inputs: { Categories: "Categories", PreselectedParentId: "PreselectedParentId" }, outputs: { CategoryCreated: "CategoryCreated", Close: "Close" }, standalone: false, decls: 1, vars: 1, consts: [[1, "panel-backdrop"], [1, "panel-backdrop", 3, "click"], [1, "slide-panel"], [1, "panel-header"], [1, "fa-solid", "fa-folder-plus"], ["mjButton", "", "variant", "flat", 3, "click"], [1, "fa-solid", "fa-times"], [1, "panel-content"], [1, "error-banner"], [1, "form-group"], ["for", "categoryName", 1, "form-label", "required"], ["type", "text", "id", "categoryName", "placeholder", "Enter category name", 1, "mj-input", 3, "ngModelChange", "ngModel", "maxlength"], [1, "error-text"], ["for", "categoryDescription", 1, "form-label"], ["id", "categoryDescription", "placeholder", "Optional description for this category", 1, "mj-textarea", 3, "ngModelChange", "ngModel", "rows", "maxlength"], ["for", "categoryParent", 1, "form-label"], ["TextField", "text", "ValueField", "value", 3, "ngModelChange", "ngModel", "Data", "ValuePrimitive"], [1, "help-text"], [1, "panel-footer"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], ["mjButton", "", "variant", "outline", 3, "click", "disabled"], [1, "fa-solid", "fa-exclamation-circle"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-check"]], template: function NewCategoryPanelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
241
|
+
i0.ɵɵconditionalCreate(0, NewCategoryPanelComponent_Conditional_0_Template, 31, 16, "div", 0);
|
|
246
242
|
} if (rf & 2) {
|
|
247
243
|
i0.ɵɵconditional(ctx.IsOpen ? 0 : -1);
|
|
248
|
-
} }, dependencies: [i2.NgControlStatus, i2.MaxLengthValidator, i2.NgModel, i3.
|
|
244
|
+
} }, dependencies: [i2.DefaultValueAccessor, i2.NgControlStatus, i2.MaxLengthValidator, i2.NgModel, i3.MJButtonDirective, i3.MJDropdownComponent], styles: [".panel-backdrop[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--mj-bg-overlay);\n z-index: 1000;\n display: flex;\n justify-content: flex-end;\n}\n\n.slide-panel[_ngcontent-%COMP%] {\n width: 450px;\n max-width: 100%;\n height: 100%;\n background: var(--mj-bg-surface-card);\n box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);\n display: flex;\n flex-direction: column;\n}\n\n.panel-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 20px 24px;\n border-bottom: 1px solid var(--mj-border-default);\n}\n\n.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 10px;\n color: var(--mj-text-primary);\n}\n\n.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n}\n\n.panel-content[_ngcontent-%COMP%] {\n flex: 1;\n padding: 24px;\n overflow-y: auto;\n}\n\n.error-banner[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px 16px;\n background: color-mix(in srgb, var(--mj-status-error) 10%, var(--mj-bg-surface));\n color: var(--mj-status-error);\n border-radius: 8px;\n margin-bottom: 20px;\n font-size: 14px;\n}\n\n.error-banner[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 16px;\n}\n\n.form-group[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}\n\n.form-label[_ngcontent-%COMP%] {\n display: block;\n margin-bottom: 6px;\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.form-label.required[_ngcontent-%COMP%]::after {\n content: ' *';\n color: var(--mj-status-error);\n}\n\n.error-text[_ngcontent-%COMP%] {\n display: block;\n margin-top: 4px;\n font-size: 12px;\n color: var(--mj-status-error);\n}\n\n.help-text[_ngcontent-%COMP%] {\n display: block;\n margin-top: 4px;\n font-size: 12px;\n color: var(--mj-text-muted);\n}\n\n.panel-footer[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n padding: 16px 24px;\n border-top: 1px solid var(--mj-border-default);\n background: var(--mj-bg-page);\n}\n\n.panel-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n\n\n@media (max-width: 480px) {\n .slide-panel[_ngcontent-%COMP%] {\n width: 100%;\n }\n}"], data: { animation: [
|
|
249
245
|
trigger('slideIn', [
|
|
250
246
|
transition(':enter', [
|
|
251
247
|
style({ transform: 'translateX(100%)', opacity: 0 }),
|
|
@@ -269,7 +265,7 @@ export class NewCategoryPanelComponent {
|
|
|
269
265
|
animate('200ms ease-in', style({ transform: 'translateX(100%)', opacity: 0 }))
|
|
270
266
|
])
|
|
271
267
|
])
|
|
272
|
-
], template: "@if (IsOpen) {\n <div class=\"panel-backdrop\" (click)=\"onBackdropClick($event)\">\n <div class=\"slide-panel\" @slideIn>\n <div class=\"panel-header\">\n <h2>\n <i class=\"fa-solid fa-folder-plus\"></i>\n New Category\n </h2>\n <button
|
|
268
|
+
], template: "@if (IsOpen) {\n <div class=\"panel-backdrop\" (click)=\"onBackdropClick($event)\">\n <div class=\"slide-panel\" @slideIn>\n <div class=\"panel-header\">\n <h2>\n <i class=\"fa-solid fa-folder-plus\"></i>\n New Category\n </h2>\n <button mjButton\n variant=\"flat\"\n (click)=\"onClose()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n\n <div class=\"panel-content\">\n @if (Errors['general']) {\n <div class=\"error-banner\">\n <i class=\"fa-solid fa-exclamation-circle\"></i>\n {{ Errors['general'] }}\n </div>\n }\n\n <div class=\"form-group\">\n <label for=\"categoryName\" class=\"form-label required\">\n Category Name\n </label>\n <input type=\"text\" class=\"mj-input\"\n id=\"categoryName\"\n [(ngModel)]=\"Name\"\n placeholder=\"Enter category name\"\n [maxlength]=\"200\"\n [class.invalid]=\"Errors['name']\" />\n @if (Errors['name']) {\n <span class=\"error-text\">{{ Errors['name'] }}</span>\n }\n </div>\n\n <div class=\"form-group\">\n <label for=\"categoryDescription\" class=\"form-label\">\n Description\n </label>\n <textarea class=\"mj-textarea\"\n id=\"categoryDescription\"\n [(ngModel)]=\"Description\"\n placeholder=\"Optional description for this category\"\n [rows]=\"3\"\n [maxlength]=\"1000\"></textarea>\n </div>\n\n <div class=\"form-group\">\n <label for=\"categoryParent\" class=\"form-label\">\n Parent Category\n </label>\n <mj-dropdown\n [(ngModel)]=\"ParentID\"\n [Data]=\"getParentOptions()\"\n TextField=\"text\"\n ValueField=\"value\"\n [ValuePrimitive]=\"true\">\n </mj-dropdown>\n <span class=\"help-text\">\n Leave empty to create a root-level category\n </span>\n </div>\n </div>\n\n <div class=\"panel-footer\">\n <button mjButton\n variant=\"primary\"\n [disabled]=\"IsSaving\"\n (click)=\"onSave()\">\n @if (IsSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n Creating...\n } @else {\n <i class=\"fa-solid fa-check\"></i>\n Create Category\n }\n </button>\n <button mjButton\n variant=\"outline\"\n [disabled]=\"IsSaving\"\n (click)=\"onClose()\">\n Cancel\n </button>\n </div>\n </div>\n </div>\n}\n", styles: [".panel-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--mj-bg-overlay);\n z-index: 1000;\n display: flex;\n justify-content: flex-end;\n}\n\n.slide-panel {\n width: 450px;\n max-width: 100%;\n height: 100%;\n background: var(--mj-bg-surface-card);\n box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);\n display: flex;\n flex-direction: column;\n}\n\n.panel-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 20px 24px;\n border-bottom: 1px solid var(--mj-border-default);\n}\n\n.panel-header h2 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 10px;\n color: var(--mj-text-primary);\n}\n\n.panel-header h2 i {\n color: var(--mj-brand-primary);\n}\n\n.panel-content {\n flex: 1;\n padding: 24px;\n overflow-y: auto;\n}\n\n.error-banner {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px 16px;\n background: color-mix(in srgb, var(--mj-status-error) 10%, var(--mj-bg-surface));\n color: var(--mj-status-error);\n border-radius: 8px;\n margin-bottom: 20px;\n font-size: 14px;\n}\n\n.error-banner i {\n font-size: 16px;\n}\n\n.form-group {\n margin-bottom: 20px;\n}\n\n.form-label {\n display: block;\n margin-bottom: 6px;\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.form-label.required::after {\n content: ' *';\n color: var(--mj-status-error);\n}\n\n.error-text {\n display: block;\n margin-top: 4px;\n font-size: 12px;\n color: var(--mj-status-error);\n}\n\n.help-text {\n display: block;\n margin-top: 4px;\n font-size: 12px;\n color: var(--mj-text-muted);\n}\n\n.panel-footer {\n display: flex;\n gap: 12px;\n padding: 16px 24px;\n border-top: 1px solid var(--mj-border-default);\n background: var(--mj-bg-page);\n}\n\n.panel-footer button {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n/* Mobile */\n@media (max-width: 480px) {\n .slide-panel {\n width: 100%;\n }\n}\n"] }]
|
|
273
269
|
}], () => [{ type: i1.ActionExplorerStateService }, { type: i0.ChangeDetectorRef }], { Categories: [{
|
|
274
270
|
type: Input
|
|
275
271
|
}], PreselectedParentId: [{
|