@aglyn/plugins-logic 1.0.0-beta.143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +7 -0
- package/package.json +45 -0
- package/src/index.d.ts +19 -0
- package/src/index.js +20 -0
- package/src/index.js.map +1 -0
- package/src/lib/components/host-functions-card.component.d.ts +19 -0
- package/src/lib/components/host-functions-card.component.js +1075 -0
- package/src/lib/components/host-functions-card.component.js.map +1 -0
- package/src/lib/components/host-reference-health-card.component.d.ts +15 -0
- package/src/lib/components/host-reference-health-card.component.js +279 -0
- package/src/lib/components/host-reference-health-card.component.js.map +1 -0
- package/src/lib/components/host-variables-card.component.d.ts +18 -0
- package/src/lib/components/host-variables-card.component.js +630 -0
- package/src/lib/components/host-variables-card.component.js.map +1 -0
- package/src/lib/components/logic-console-page.d.ts +12 -0
- package/src/lib/components/logic-console-page.js +68 -0
- package/src/lib/components/logic-console-page.js.map +1 -0
- package/src/lib/components/where-used-dialog.component.d.ts +20 -0
- package/src/lib/components/where-used-dialog.component.js +103 -0
- package/src/lib/components/where-used-dialog.component.js.map +1 -0
- package/src/lib/constants/bundle-common.d.ts +8 -0
- package/src/lib/constants/bundle-common.js +9 -0
- package/src/lib/constants/bundle-common.js.map +1 -0
- package/src/lib/model/index.d.ts +23 -0
- package/src/lib/model/index.js +23 -0
- package/src/lib/model/index.js.map +1 -0
- package/src/lib/model/parameter-options.d.ts +26 -0
- package/src/lib/model/parameter-options.js +29 -0
- package/src/lib/model/parameter-options.js.map +1 -0
- package/src/lib/model/reference-audit.d.ts +75 -0
- package/src/lib/model/reference-audit.js +155 -0
- package/src/lib/model/reference-audit.js.map +1 -0
- package/src/lib/plugin.d.ts +29 -0
- package/src/lib/plugin.js +82 -0
- package/src/lib/plugin.js.map +1 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ const resolves = (known, id, name)=>{
|
|
17
|
+
const cleanId = id == null ? void 0 : id.trim();
|
|
18
|
+
const cleanName = name == null ? void 0 : name.trim();
|
|
19
|
+
if (!cleanId && !cleanName) return true // Nothing referenced.
|
|
20
|
+
;
|
|
21
|
+
if (!known) return true // Target kind not loaded — don't cry wolf.
|
|
22
|
+
;
|
|
23
|
+
return Boolean(cleanId && known.has(cleanId) || cleanName && known.has(cleanName));
|
|
24
|
+
};
|
|
25
|
+
export function auditHostReferences(input) {
|
|
26
|
+
var _input_actions, _input_workflows, _input_variables, _input_screens;
|
|
27
|
+
const issues = [];
|
|
28
|
+
const { known } = input;
|
|
29
|
+
for (const action of (_input_actions = input.actions) != null ? _input_actions : []){
|
|
30
|
+
var _action_steps;
|
|
31
|
+
const push = (refType, missing)=>{
|
|
32
|
+
var _action_name;
|
|
33
|
+
return issues.push({
|
|
34
|
+
source: 'action',
|
|
35
|
+
sourceId: action.$id,
|
|
36
|
+
sourceName: (_action_name = action.name) != null ? _action_name : action.$id,
|
|
37
|
+
refType,
|
|
38
|
+
missing
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
for (const step of (_action_steps = action.steps) != null ? _action_steps : []){
|
|
42
|
+
if (step.type === 'runWorkflow') {
|
|
43
|
+
if (!resolves(known.workflows, step.workflowId, step.workflowName)) {
|
|
44
|
+
push('workflow', step.workflowId || step.workflowName || '');
|
|
45
|
+
}
|
|
46
|
+
} else if (step.type === 'datasetAppend' || step.type === 'updateDataset') {
|
|
47
|
+
if (!resolves(known.datasets, step.datasetId, step.datasetName)) {
|
|
48
|
+
push('dataset', step.datasetId || step.datasetName || '');
|
|
49
|
+
}
|
|
50
|
+
} else if (step.type === 'enrollList') {
|
|
51
|
+
if (!resolves(known.lists, step.listId, step.listName)) {
|
|
52
|
+
push('list', step.listId || step.listName || '');
|
|
53
|
+
}
|
|
54
|
+
} else if (step.type === 'assignCampaign') {
|
|
55
|
+
if (!resolves(known.campaigns, step.campaignId, step.campaignName)) {
|
|
56
|
+
push('campaign', step.campaignId || step.campaignName || '');
|
|
57
|
+
}
|
|
58
|
+
} else if (step.type === 'showOverlay') {
|
|
59
|
+
if (!resolves(known.overlays, step.overlayId, step.overlayName)) {
|
|
60
|
+
push('overlay', step.overlayId || step.overlayName || '');
|
|
61
|
+
}
|
|
62
|
+
} else if (step.type === 'webhookPost') {
|
|
63
|
+
if (!resolves(known.webhooks, step.webhookId, step.webhookName)) {
|
|
64
|
+
push('webhook', step.webhookId || step.webhookName || '');
|
|
65
|
+
}
|
|
66
|
+
} else if (step.type === 'redirect') {
|
|
67
|
+
// Screen-id redirects (AGL-339) go stale when the screen is
|
|
68
|
+
// deleted/unpublished.
|
|
69
|
+
if (!resolves(known.screens, step.screenId)) {
|
|
70
|
+
push('screen', step.screenId || '');
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
for (const workflow of (_input_workflows = input.workflows) != null ? _input_workflows : []){
|
|
76
|
+
var _workflow_steps;
|
|
77
|
+
for (const step of (_workflow_steps = workflow.steps) != null ? _workflow_steps : []){
|
|
78
|
+
if (!resolves(known.functions, step.functionId, step.functionName)) {
|
|
79
|
+
var _workflow_name;
|
|
80
|
+
issues.push({
|
|
81
|
+
source: 'workflow',
|
|
82
|
+
sourceId: workflow.$id,
|
|
83
|
+
sourceName: (_workflow_name = workflow.name) != null ? _workflow_name : workflow.$id,
|
|
84
|
+
refType: 'function',
|
|
85
|
+
missing: step.functionId || step.functionName || ''
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
for (const variable of (_input_variables = input.variables) != null ? _input_variables : []){
|
|
91
|
+
if (!resolves(known.workflows, variable.workflowId, variable.workflowName)) {
|
|
92
|
+
var _variable_name;
|
|
93
|
+
issues.push({
|
|
94
|
+
source: 'variable',
|
|
95
|
+
sourceId: variable.$id,
|
|
96
|
+
sourceName: (_variable_name = variable.name) != null ? _variable_name : variable.$id,
|
|
97
|
+
refType: 'workflow',
|
|
98
|
+
missing: variable.workflowId || variable.workflowName || ''
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
// Canvas node references (AGL-345): screen links, commerce entities,
|
|
103
|
+
// and repeat datasets persisted in component props.
|
|
104
|
+
const NODE_PROP_TARGETS = [
|
|
105
|
+
{
|
|
106
|
+
prop: 'screenId',
|
|
107
|
+
refType: 'screen',
|
|
108
|
+
known: known.screens
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
prop: 'productId',
|
|
112
|
+
refType: 'product',
|
|
113
|
+
known: known.products
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
prop: 'collectionId',
|
|
117
|
+
refType: 'collection',
|
|
118
|
+
known: known.collections
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
prop: 'categoryId',
|
|
122
|
+
refType: 'category',
|
|
123
|
+
known: known.categories
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
prop: 'repeatDataset',
|
|
127
|
+
refType: 'dataset',
|
|
128
|
+
known: known.datasets
|
|
129
|
+
}
|
|
130
|
+
];
|
|
131
|
+
for (const screen of (_input_screens = input.screens) != null ? _input_screens : []){
|
|
132
|
+
var _screen_nodes;
|
|
133
|
+
for (const node of Object.values((_screen_nodes = screen.nodes) != null ? _screen_nodes : {})){
|
|
134
|
+
var _ref;
|
|
135
|
+
const props = (_ref = node == null ? void 0 : node.props) != null ? _ref : {};
|
|
136
|
+
for (const target of NODE_PROP_TARGETS){
|
|
137
|
+
const value = props[target.prop];
|
|
138
|
+
if (typeof value !== 'string' || !value.trim()) continue;
|
|
139
|
+
if (!resolves(target.known, value)) {
|
|
140
|
+
var _screen_name;
|
|
141
|
+
issues.push({
|
|
142
|
+
source: 'screen',
|
|
143
|
+
sourceId: screen.$id,
|
|
144
|
+
sourceName: (_screen_name = screen.name) != null ? _screen_name : screen.$id,
|
|
145
|
+
refType: target.refType,
|
|
146
|
+
missing: value
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return issues;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
//# sourceMappingURL=reference-audit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../libs/plugins/logic/src/lib/model/reference-audit.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { HostAction } from '@aglyn/aglyn'\nimport type { HostVariable } from '@aglyn/aglyn'\nimport type { HostWorkflow } from '@aglyn/aglyn'\n\n/**\n * Reference-integrity audit (wave v7): id references (AGL-261) are\n * rename-safe but not delete-safe — deleting a workflow leaves actions\n * pointing at nothing, and the executors fail silently at run time.\n * This pure audit cross-checks every reference an automation, workflow,\n * or computed variable holds against the ids/names that still exist,\n * so the console can surface broken wiring before a visitor hits it.\n */\nexport interface ReferenceIssue {\n /** What holds the broken reference. */\n source: 'action' | 'workflow' | 'variable' | 'screen'\n sourceId: string\n /** Display name of the holder. */\n sourceName: string\n /** What the reference points at (\"workflow\", \"dataset\", …). */\n refType: string\n /** The dangling id or name as stored. */\n missing: string\n}\n\n/** A screen's composed nodes, for canvas-reference auditing (AGL-345). */\nexport interface ScreenAuditEntry {\n $id: string\n name?: string\n nodes: Record<string, { props?: Record<string, unknown> } | undefined>\n}\n\nexport interface ReferenceAuditInput {\n actions?: Array<HostAction & { $id: string }>\n workflows?: Array<HostWorkflow & { $id: string }>\n variables?: Array<HostVariable & { $id: string }>\n /** Screen node maps to scan for entity/screen-link references. */\n screens?: ScreenAuditEntry[]\n /** Known-good targets: doc ids AND display names both resolve. */\n known: {\n workflows?: Set<string>\n functions?: Set<string>\n datasets?: Set<string>\n lists?: Set<string>\n campaigns?: Set<string>\n overlays?: Set<string>\n webhooks?: Set<string>\n /** New reference kinds (AGL-345). */\n screens?: Set<string>\n products?: Set<string>\n collections?: Set<string>\n categories?: Set<string>\n }\n}\n\nconst resolves = (\n known: Set<string> | undefined,\n id?: string,\n name?: string,\n): boolean => {\n const cleanId = id?.trim()\n const cleanName = name?.trim()\n if (!cleanId && !cleanName) return true // Nothing referenced.\n if (!known) return true // Target kind not loaded — don't cry wolf.\n return Boolean(\n (cleanId && known.has(cleanId)) || (cleanName && known.has(cleanName)),\n )\n}\n\nexport function auditHostReferences(\n input: ReferenceAuditInput,\n): ReferenceIssue[] {\n const issues: ReferenceIssue[] = []\n const { known } = input\n\n for (const action of input.actions ?? []) {\n const push = (refType: string, missing: string) =>\n issues.push({\n source: 'action',\n sourceId: action.$id,\n sourceName: action.name ?? action.$id,\n refType,\n missing,\n })\n for (const step of action.steps ?? []) {\n if (step.type === 'runWorkflow') {\n if (!resolves(known.workflows, step.workflowId, step.workflowName)) {\n push('workflow', step.workflowId || step.workflowName || '')\n }\n } else if (\n step.type === 'datasetAppend' ||\n step.type === 'updateDataset'\n ) {\n if (!resolves(known.datasets, step.datasetId, step.datasetName)) {\n push('dataset', step.datasetId || step.datasetName || '')\n }\n } else if (step.type === 'enrollList') {\n if (!resolves(known.lists, step.listId, step.listName)) {\n push('list', step.listId || step.listName || '')\n }\n } else if (step.type === 'assignCampaign') {\n if (!resolves(known.campaigns, step.campaignId, step.campaignName)) {\n push('campaign', step.campaignId || step.campaignName || '')\n }\n } else if (step.type === 'showOverlay') {\n if (!resolves(known.overlays, step.overlayId, step.overlayName)) {\n push('overlay', step.overlayId || step.overlayName || '')\n }\n } else if (step.type === 'webhookPost') {\n if (!resolves(known.webhooks, step.webhookId, step.webhookName)) {\n push('webhook', step.webhookId || step.webhookName || '')\n }\n } else if (step.type === 'redirect') {\n // Screen-id redirects (AGL-339) go stale when the screen is\n // deleted/unpublished.\n if (!resolves(known.screens, (step as any).screenId)) {\n push('screen', (step as any).screenId || '')\n }\n }\n }\n }\n\n for (const workflow of input.workflows ?? []) {\n for (const step of workflow.steps ?? []) {\n if (!resolves(known.functions, step.functionId, step.functionName)) {\n issues.push({\n source: 'workflow',\n sourceId: workflow.$id,\n sourceName: workflow.name ?? workflow.$id,\n refType: 'function',\n missing: step.functionId || step.functionName || '',\n })\n }\n }\n }\n\n for (const variable of input.variables ?? []) {\n if (!resolves(known.workflows, variable.workflowId, variable.workflowName)) {\n issues.push({\n source: 'variable',\n sourceId: variable.$id,\n sourceName: variable.name ?? variable.$id,\n refType: 'workflow',\n missing: variable.workflowId || variable.workflowName || '',\n })\n }\n }\n\n // Canvas node references (AGL-345): screen links, commerce entities,\n // and repeat datasets persisted in component props.\n const NODE_PROP_TARGETS: Array<{\n prop: string\n refType: string\n known: Set<string> | undefined\n }> = [\n { prop: 'screenId', refType: 'screen', known: known.screens },\n { prop: 'productId', refType: 'product', known: known.products },\n { prop: 'collectionId', refType: 'collection', known: known.collections },\n { prop: 'categoryId', refType: 'category', known: known.categories },\n { prop: 'repeatDataset', refType: 'dataset', known: known.datasets },\n ]\n for (const screen of input.screens ?? []) {\n for (const node of Object.values(screen.nodes ?? {})) {\n const props = node?.props ?? {}\n for (const target of NODE_PROP_TARGETS) {\n const value = props[target.prop]\n if (typeof value !== 'string' || !value.trim()) continue\n if (!resolves(target.known, value)) {\n issues.push({\n source: 'screen',\n sourceId: screen.$id,\n sourceName: screen.name ?? screen.$id,\n refType: target.refType,\n missing: value,\n })\n }\n }\n }\n }\n\n return issues\n}\n"],"names":["resolves","known","id","name","cleanId","trim","cleanName","Boolean","has","auditHostReferences","input","issues","action","actions","push","refType","missing","source","sourceId","$id","sourceName","step","steps","type","workflows","workflowId","workflowName","datasets","datasetId","datasetName","lists","listId","listName","campaigns","campaignId","campaignName","overlays","overlayId","overlayName","webhooks","webhookId","webhookName","screens","screenId","workflow","functions","functionId","functionName","variable","variables","NODE_PROP_TARGETS","prop","products","collections","categories","screen","node","Object","values","nodes","props","target","value"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAwDD,MAAMA,WAAW,CACfC,OACAC,IACAC;IAEA,MAAMC,UAAUF,sBAAAA,GAAIG,IAAI;IACxB,MAAMC,YAAYH,wBAAAA,KAAME,IAAI;IAC5B,IAAI,CAACD,WAAW,CAACE,WAAW,OAAO,KAAK,sBAAsB;;IAC9D,IAAI,CAACL,OAAO,OAAO,KAAK,2CAA2C;;IACnE,OAAOM,QACL,AAACH,WAAWH,MAAMO,GAAG,CAACJ,YAAcE,aAAaL,MAAMO,GAAG,CAACF;AAE/D;AAEA,OAAO,SAASG,oBACdC,KAA0B;QAKLA,gBA+CEA,kBAcAA,kBAyBFA;IAzFrB,MAAMC,SAA2B,EAAE;IACnC,MAAM,EAAEV,KAAK,EAAE,GAAGS;IAElB,KAAK,MAAME,WAAUF,iBAAAA,MAAMG,OAAO,YAAbH,iBAAiB,EAAE,CAAE;YASrBE;QARnB,MAAME,OAAO,CAACC,SAAiBC;gBAIfJ;mBAHdD,OAAOG,IAAI,CAAC;gBACVG,QAAQ;gBACRC,UAAUN,OAAOO,GAAG;gBACpBC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|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Logic feature plugin (AGL-395). Console-only — variables and no-code
|
|
19
|
+
* functions resolve at render through the tenant compose pipeline, not a
|
|
20
|
+
* canvas element of their own, so there is no UI bundle. The console half
|
|
21
|
+
* declares the Logic nav + page through the ConsoleExtension registry
|
|
22
|
+
* (always-on; the surface is not release-flagged). Its dependents dialog is
|
|
23
|
+
* also drawn in the zone the Automation page hosts for a workflow's usage.
|
|
24
|
+
*/
|
|
25
|
+
export declare function registerLogicConsole(): void;
|
|
26
|
+
export { default as HostVariablesCard } from './components/host-variables-card.component';
|
|
27
|
+
export type { HostVariablesCardProps } from './components/host-variables-card.component';
|
|
28
|
+
export { default as HostFunctionsCard } from './components/host-functions-card.component';
|
|
29
|
+
export type { HostFunctionsCardProps } from './components/host-functions-card.component';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import * as Aglyn from "@aglyn/aglyn";
|
|
17
|
+
import { mdiFunctionVariant } from "@aglyn/shared-data-mdi";
|
|
18
|
+
import { lazy } from "react";
|
|
19
|
+
import HostFunctionsCard from "./components/host-functions-card.component.js";
|
|
20
|
+
import HostVariablesCard from "./components/host-variables-card.component.js";
|
|
21
|
+
import { BUNDLE_ID } from "./constants/bundle-common.js";
|
|
22
|
+
/** Code-split: the Logic console page only loads when opened. */ const LogicConsolePage = lazy(()=>import("./components/logic-console-page.js"));
|
|
23
|
+
/** The dependents dialog, loaded where the Automation page draws its zone. */ const WhereUsedDialog = lazy(()=>import("./components/where-used-dialog.component.js"));
|
|
24
|
+
/**
|
|
25
|
+
* Logic feature plugin (AGL-395). Console-only — variables and no-code
|
|
26
|
+
* functions resolve at render through the tenant compose pipeline, not a
|
|
27
|
+
* canvas element of their own, so there is no UI bundle. The console half
|
|
28
|
+
* declares the Logic nav + page through the ConsoleExtension registry
|
|
29
|
+
* (always-on; the surface is not release-flagged). Its dependents dialog is
|
|
30
|
+
* also drawn in the zone the Automation page hosts for a workflow's usage.
|
|
31
|
+
*/ export function registerLogicConsole() {
|
|
32
|
+
Aglyn.registerConsoleExtension({
|
|
33
|
+
// Variables/functions cards (AGL-419): the besigner functions
|
|
34
|
+
// drawer renders them through the 'besignerFunctions' slot.
|
|
35
|
+
widgets: [
|
|
36
|
+
{
|
|
37
|
+
slot: 'besignerFunctions',
|
|
38
|
+
widgetId: 'logic-variables',
|
|
39
|
+
Component: HostVariablesCard
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
slot: 'besignerFunctions',
|
|
43
|
+
widgetId: 'logic-functions',
|
|
44
|
+
Component: HostFunctionsCard
|
|
45
|
+
},
|
|
46
|
+
// Where a WORKFLOW is used: the Automation page runs the scan and hosts
|
|
47
|
+
// the zone; the dialog that lays a scan out is the one a variable and a
|
|
48
|
+
// function open here, so it is drawn by this plugin.
|
|
49
|
+
{
|
|
50
|
+
slot: 'workflowUsage',
|
|
51
|
+
widgetId: 'logic-where-used',
|
|
52
|
+
Component: WhereUsedDialog
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
pluginId: BUNDLE_ID,
|
|
56
|
+
displayName: 'Logic',
|
|
57
|
+
navItems: [
|
|
58
|
+
{
|
|
59
|
+
label: 'Logic',
|
|
60
|
+
href: '/logic',
|
|
61
|
+
navTabId: 'nav-tab-logic',
|
|
62
|
+
icon: {
|
|
63
|
+
path: mdiFunctionVariant.path
|
|
64
|
+
},
|
|
65
|
+
header: {
|
|
66
|
+
title: 'Functions & Variables',
|
|
67
|
+
icon: {
|
|
68
|
+
path: mdiFunctionVariant.path
|
|
69
|
+
},
|
|
70
|
+
docsTopic: 'bindings'
|
|
71
|
+
},
|
|
72
|
+
Component: LogicConsolePage
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
// Cards consumed directly by the app (the besigner Functions/Variables
|
|
78
|
+
// button opens them in a drawer).
|
|
79
|
+
export { default as HostVariablesCard } from "./components/host-variables-card.component.js";
|
|
80
|
+
export { default as HostFunctionsCard } from "./components/host-functions-card.component.js";
|
|
81
|
+
|
|
82
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/plugins/logic/src/lib/plugin.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as Aglyn from '@aglyn/aglyn'\nimport { mdiFunctionVariant } from '@aglyn/shared-data-mdi'\nimport { lazy } from 'react'\nimport HostFunctionsCard from './components/host-functions-card.component'\nimport HostVariablesCard from './components/host-variables-card.component'\nimport { BUNDLE_ID } from './constants/bundle-common'\n\n/** Code-split: the Logic console page only loads when opened. */\nconst LogicConsolePage = lazy(() => import('./components/logic-console-page'))\n\n/** The dependents dialog, loaded where the Automation page draws its zone. */\nconst WhereUsedDialog = lazy(\n () => import('./components/where-used-dialog.component'),\n)\n\n/**\n * Logic feature plugin (AGL-395). Console-only — variables and no-code\n * functions resolve at render through the tenant compose pipeline, not a\n * canvas element of their own, so there is no UI bundle. The console half\n * declares the Logic nav + page through the ConsoleExtension registry\n * (always-on; the surface is not release-flagged). Its dependents dialog is\n * also drawn in the zone the Automation page hosts for a workflow's usage.\n */\nexport function registerLogicConsole(): void {\n Aglyn.registerConsoleExtension({\n // Variables/functions cards (AGL-419): the besigner functions\n // drawer renders them through the 'besignerFunctions' slot.\n widgets: [\n {\n slot: 'besignerFunctions',\n widgetId: 'logic-variables',\n Component: HostVariablesCard,\n },\n {\n slot: 'besignerFunctions',\n widgetId: 'logic-functions',\n Component: HostFunctionsCard,\n },\n // Where a WORKFLOW is used: the Automation page runs the scan and hosts\n // the zone; the dialog that lays a scan out is the one a variable and a\n // function open here, so it is drawn by this plugin.\n {\n slot: 'workflowUsage',\n widgetId: 'logic-where-used',\n Component: WhereUsedDialog,\n },\n ],\n pluginId: BUNDLE_ID,\n displayName: 'Logic',\n navItems: [\n {\n label: 'Logic',\n href: '/logic',\n navTabId: 'nav-tab-logic',\n icon: { path: mdiFunctionVariant.path },\n header: {\n title: 'Functions & Variables',\n icon: { path: mdiFunctionVariant.path },\n docsTopic: 'bindings',\n },\n Component: LogicConsolePage,\n },\n ],\n })\n}\n\n// Cards consumed directly by the app (the besigner Functions/Variables\n// button opens them in a drawer).\nexport { default as HostVariablesCard } from './components/host-variables-card.component'\nexport type { HostVariablesCardProps } from './components/host-variables-card.component'\nexport { default as HostFunctionsCard } from './components/host-functions-card.component'\nexport type { HostFunctionsCardProps } from './components/host-functions-card.component'\n\n"],"names":["Aglyn","mdiFunctionVariant","lazy","HostFunctionsCard","HostVariablesCard","BUNDLE_ID","LogicConsolePage","WhereUsedDialog","registerLogicConsole","registerConsoleExtension","widgets","slot","widgetId","Component","pluginId","displayName","navItems","label","href","navTabId","icon","path","header","title","docsTopic","default"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,YAAYA,WAAW,eAAc;AACrC,SAASC,kBAAkB,QAAQ,yBAAwB;AAC3D,SAASC,IAAI,QAAQ,QAAO;AAC5B,OAAOC,uBAAuB,gDAA4C;AAC1E,OAAOC,uBAAuB,gDAA4C;AAC1E,SAASC,SAAS,QAAQ,+BAA2B;AAErD,+DAA+D,GAC/D,MAAMC,mBAAmBJ,KAAK,IAAM,MAAM,CAAC;AAE3C,4EAA4E,GAC5E,MAAMK,kBAAkBL,KACtB,IAAM,MAAM,CAAC;AAGf;;;;;;;CAOC,GACD,OAAO,SAASM;IACdR,MAAMS,wBAAwB,CAAC;QAC7B,8DAA8D;QAC9D,4DAA4D;QAC5DC,SAAS;YACP;gBACEC,MAAM;gBACNC,UAAU;gBACVC,WAAWT;YACb;YACA;gBACEO,MAAM;gBACNC,UAAU;gBACVC,WAAWV;YACb;YACA,wEAAwE;YACxE,wEAAwE;YACxE,qDAAqD;YACrD;gBACEQ,MAAM;gBACNC,UAAU;gBACVC,WAAWN;YACb;SACD;QACDO,UAAUT;QACVU,aAAa;QACbC,UAAU;YACR;gBACEC,OAAO;gBACPC,MAAM;gBACNC,UAAU;gBACVC,MAAM;oBAAEC,MAAMpB,mBAAmBoB,IAAI;gBAAC;gBACtCC,QAAQ;oBACNC,OAAO;oBACPH,MAAM;wBAAEC,MAAMpB,mBAAmBoB,IAAI;oBAAC;oBACtCG,WAAW;gBACb;gBACAX,WAAWP;YACb;SACD;IACH;AACF;AAEA,uEAAuE;AACvE,kCAAkC;AAClC,SAASmB,WAAWrB,iBAAiB,QAAQ,gDAA4C;AAEzF,SAASqB,WAAWtB,iBAAiB,QAAQ,gDAA4C"}
|