@elevasis/ui 2.66.0 → 2.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +3 -3
- package/dist/app/index.d.ts +16 -15
- package/dist/app/index.js +31 -21
- package/dist/auth/index.js +10 -12
- package/dist/charts/index.js +10 -12
- package/dist/chunk-2MTP3H3A.js +425 -0
- package/dist/chunk-3KMDHCAR.js +52 -0
- package/dist/chunk-3MEXPLWT.js +265 -0
- package/dist/{chunk-XNW3O6QW.js → chunk-5NRJ2BLQ.js} +1 -1
- package/dist/chunk-75NOC536.js +2162 -0
- package/dist/chunk-76IVMVI3.js +1764 -0
- package/dist/chunk-AH52XQB7.js +1 -0
- package/dist/chunk-BZZCNLT6.js +12 -0
- package/dist/chunk-DLR4SDZW.js +51 -0
- package/dist/chunk-FK3K2VK2.js +2103 -0
- package/dist/chunk-GBXTRSAU.js +37 -0
- package/dist/chunk-HJVPVS57.js +1934 -0
- package/dist/{chunk-M535KHLW.js → chunk-JC5W55J3.js} +1 -1
- package/dist/{chunk-I7BZVVVU.js → chunk-L3HFJFYF.js} +89 -382
- package/dist/chunk-LGKLC5MG.js +44 -0
- package/dist/{chunk-4DV4ECMG.js → chunk-N7U24M2J.js} +4 -0
- package/dist/chunk-NDHMZT2G.js +383 -0
- package/dist/chunk-OOACTYRA.js +10 -0
- package/dist/chunk-PDHTXPSF.js +12 -0
- package/dist/chunk-QYI5BZKM.js +85 -0
- package/dist/{chunk-4OEVLV66.js → chunk-R6NMRXNO.js} +112 -147
- package/dist/chunk-SIVUCZXQ.js +1194 -0
- package/dist/{chunk-JFBZ6XDW.js → chunk-SNZDFCOQ.js} +3 -49
- package/dist/chunk-TGPJNKDU.js +1595 -0
- package/dist/chunk-TUMSNGTX.js +35 -0
- package/dist/chunk-TYKAKJGW.js +67 -0
- package/dist/chunk-UD657ICS.js +589 -0
- package/dist/chunk-WPIASV3H.js +194 -0
- package/dist/chunk-ZFISGKYW.js +39 -0
- package/dist/chunk-ZGCWTWBD.js +16127 -0
- package/dist/chunk-ZNKZMK2E.js +4528 -0
- package/dist/chunk-ZWS3TCQR.js +11032 -0
- package/dist/components/chat/index.js +2 -1
- package/dist/components/index.d.ts +23 -11
- package/dist/components/index.js +2773 -14
- package/dist/components/navigation/index.js +11 -12
- package/dist/features/auth/index.d.ts +0 -4
- package/dist/features/auth/index.js +12 -13
- package/dist/features/clients/index.js +14 -12
- package/dist/features/crm/index.d.ts +1371 -15
- package/dist/features/crm/index.js +15 -12
- package/dist/features/dashboard/index.d.ts +1 -2
- package/dist/features/dashboard/index.js +15 -12
- package/dist/features/delivery/index.d.ts +0 -4
- package/dist/features/delivery/index.js +15 -12
- package/dist/features/knowledge/index.js +10 -12
- package/dist/features/lead-gen/index.d.ts +35 -15
- package/dist/features/lead-gen/index.js +16 -12
- package/dist/features/monitoring/index.js +15 -12
- package/dist/features/monitoring/requests/index.js +13 -13
- package/dist/features/operations/index.d.ts +1 -2
- package/dist/features/operations/index.js +21 -12
- package/dist/features/public-agent-chat/index.js +2 -1
- package/dist/features/seo/index.js +2 -1
- package/dist/features/settings/index.d.ts +0 -4
- package/dist/features/settings/index.js +14 -12
- package/dist/hooks/access/index.js +10 -12
- package/dist/hooks/delivery/index.d.ts +0 -4
- package/dist/hooks/delivery/index.js +2 -23
- package/dist/hooks/index.d.ts +13 -7
- package/dist/hooks/index.js +10 -12
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +1 -2
- package/dist/hooks/published.d.ts +13 -7
- package/dist/hooks/published.js +10 -12
- package/dist/initialization/index.d.ts +1 -5
- package/dist/knowledge/index.d.ts +1 -2
- package/dist/knowledge/index.js +15 -13
- package/dist/layout/index.js +14 -12
- package/dist/organization/index.d.ts +3 -3
- package/dist/organization/index.js +1 -21
- package/dist/profile/index.d.ts +0 -4
- package/dist/provider/index.d.ts +2 -7
- package/dist/provider/index.js +10 -12
- package/dist/provider/published.d.ts +2 -7
- package/dist/provider/published.js +10 -12
- package/dist/supabase/index.d.ts +0 -8
- package/dist/test-utils/index.d.ts +5 -0
- package/dist/test-utils/index.js +5 -5
- package/dist/test-utils/setup-integration.js +1 -1
- package/dist/test-utils/setup.js +1 -1
- package/dist/theme/index.js +2 -1
- package/dist/typeform/index.js +2049 -1
- package/dist/types/index.d.ts +13 -7
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/index.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-ANNM5R7S.js +0 -51404
- package/dist/chunk-AUDNF2Q7.js +0 -2050
- package/dist/index.css +0 -659
- package/dist/index.d.ts +0 -17888
- package/dist/index.js +0 -30
- package/dist/{chunk-GMXGDO3I.js → chunk-MISHPEJX.js} +1 -1
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { getLeadGenStageCatalog } from './chunk-ZGCWTWBD.js';
|
|
2
|
+
import { SYSTEM_INTERFACE_PROFILES, formatOntologyId, registerBuiltInReadinessProfile, registerReadinessInterfaceMarker, requireContractReadiness, computeInterfaceReadiness, addReadinessIssue, formatInterfaceIdentity, resourceBindingIds, requireCatalogReadiness, requireScopedBinding } from './chunk-L3HFJFYF.js';
|
|
3
|
+
|
|
4
|
+
// ../core/src/business/acquisition/ontology-validation.ts
|
|
5
|
+
var LEAD_GEN_API_INTERFACE = SYSTEM_INTERFACE_PROFILES[0];
|
|
6
|
+
var CRM_API_INTERFACE = SYSTEM_INTERFACE_PROFILES[1];
|
|
7
|
+
var LEAD_GEN_CRM_HANDOFF_INTERFACE = SYSTEM_INTERFACE_PROFILES[2];
|
|
8
|
+
LEAD_GEN_API_INTERFACE.readinessProfile;
|
|
9
|
+
CRM_API_INTERFACE.readinessProfile;
|
|
10
|
+
LEAD_GEN_CRM_HANDOFF_INTERFACE.readinessProfile;
|
|
11
|
+
var LEAD_GEN_LIST_OBJECT_ONTOLOGY_ID = formatOntologyId({
|
|
12
|
+
scope: "sales.lead-gen",
|
|
13
|
+
kind: "object",
|
|
14
|
+
localId: "list"
|
|
15
|
+
});
|
|
16
|
+
var LEAD_GEN_COMPANY_OBJECT_ONTOLOGY_ID = formatOntologyId({
|
|
17
|
+
scope: "sales.lead-gen",
|
|
18
|
+
kind: "object",
|
|
19
|
+
localId: "company"
|
|
20
|
+
});
|
|
21
|
+
var LEAD_GEN_CONTACT_OBJECT_ONTOLOGY_ID = formatOntologyId({
|
|
22
|
+
scope: "sales.lead-gen",
|
|
23
|
+
kind: "object",
|
|
24
|
+
localId: "contact"
|
|
25
|
+
});
|
|
26
|
+
var LEAD_GEN_BUILD_TEMPLATE_CATALOG_ONTOLOGY_ID = formatOntologyId({
|
|
27
|
+
scope: "sales.lead-gen",
|
|
28
|
+
kind: "catalog",
|
|
29
|
+
localId: "build-template"
|
|
30
|
+
});
|
|
31
|
+
var LEAD_GEN_COMPANY_STAGE_CATALOG_ONTOLOGY_ID = formatOntologyId({
|
|
32
|
+
scope: "sales.lead-gen",
|
|
33
|
+
kind: "catalog",
|
|
34
|
+
localId: "company-stage"
|
|
35
|
+
});
|
|
36
|
+
var LEAD_GEN_CONTACT_STAGE_CATALOG_ONTOLOGY_ID = formatOntologyId({
|
|
37
|
+
scope: "sales.lead-gen",
|
|
38
|
+
kind: "catalog",
|
|
39
|
+
localId: "contact-stage"
|
|
40
|
+
});
|
|
41
|
+
var CRM_PIPELINE_CATALOG_ONTOLOGY_ID = formatOntologyId({
|
|
42
|
+
scope: "sales.crm",
|
|
43
|
+
kind: "catalog",
|
|
44
|
+
localId: "crm.pipeline"
|
|
45
|
+
});
|
|
46
|
+
var LEAD_GEN_STAGE_CATALOG_ONTOLOGY_ID = formatOntologyId({
|
|
47
|
+
scope: "sales.lead-gen",
|
|
48
|
+
kind: "catalog",
|
|
49
|
+
localId: "lead-gen.stage-catalog"
|
|
50
|
+
});
|
|
51
|
+
var LEAD_GEN_API_READINESS_CONTRACT = {
|
|
52
|
+
requiredObjects: [
|
|
53
|
+
LEAD_GEN_LIST_OBJECT_ONTOLOGY_ID,
|
|
54
|
+
LEAD_GEN_COMPANY_OBJECT_ONTOLOGY_ID,
|
|
55
|
+
LEAD_GEN_CONTACT_OBJECT_ONTOLOGY_ID
|
|
56
|
+
],
|
|
57
|
+
requiredCatalogs: [
|
|
58
|
+
LEAD_GEN_BUILD_TEMPLATE_CATALOG_ONTOLOGY_ID,
|
|
59
|
+
LEAD_GEN_COMPANY_STAGE_CATALOG_ONTOLOGY_ID,
|
|
60
|
+
LEAD_GEN_CONTACT_STAGE_CATALOG_ONTOLOGY_ID
|
|
61
|
+
]
|
|
62
|
+
};
|
|
63
|
+
var CRM_API_READINESS_CONTRACT = {
|
|
64
|
+
requiredObjects: [],
|
|
65
|
+
requiredCatalogs: [CRM_PIPELINE_CATALOG_ONTOLOGY_ID]
|
|
66
|
+
};
|
|
67
|
+
function isPlainRecord(value) {
|
|
68
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
69
|
+
}
|
|
70
|
+
function createLeadGenStageCatalog(model) {
|
|
71
|
+
return {
|
|
72
|
+
id: LEAD_GEN_STAGE_CATALOG_ONTOLOGY_ID,
|
|
73
|
+
label: "Lead Gen Processing Stages",
|
|
74
|
+
ownerSystemId: "sales.lead-gen",
|
|
75
|
+
kind: "processing-stage-catalog",
|
|
76
|
+
entries: Object.fromEntries(
|
|
77
|
+
Object.entries(getLeadGenStageCatalog(model)).map(([key, entry]) => [
|
|
78
|
+
key,
|
|
79
|
+
{
|
|
80
|
+
...entry
|
|
81
|
+
}
|
|
82
|
+
])
|
|
83
|
+
),
|
|
84
|
+
legacyCatalogKey: "LEAD_GEN_STAGE_CATALOG"
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function requireLeadGenSupplementalReadiness(issues, index, resources, context) {
|
|
88
|
+
const catalogs = resourceBindingIds(resources, "usesCatalogs");
|
|
89
|
+
const templateStepCatalog = findLeadGenTemplateStepCatalog(index);
|
|
90
|
+
if (templateStepCatalog === void 0) {
|
|
91
|
+
addReadinessIssue(
|
|
92
|
+
issues,
|
|
93
|
+
"SYSTEM_INTERFACE_NOT_READY",
|
|
94
|
+
"missing-template-step-catalog",
|
|
95
|
+
`System Interface "${formatInterfaceIdentity(context.systemPath, context.interfaceKey)}" is missing a lead-gen template-step catalog.`
|
|
96
|
+
);
|
|
97
|
+
} else {
|
|
98
|
+
requireCatalogReadiness(issues, index, templateStepCatalog.id, context);
|
|
99
|
+
requireScopedBinding(issues, catalogs, "usesCatalogs", templateStepCatalog.id, context);
|
|
100
|
+
}
|
|
101
|
+
requireCatalogReadiness(issues, index, LEAD_GEN_STAGE_CATALOG_ONTOLOGY_ID, context);
|
|
102
|
+
}
|
|
103
|
+
function requireLeadGenInterfaceReadiness(issues, index, resources, context) {
|
|
104
|
+
requireContractReadiness(issues, index, resources, LEAD_GEN_API_READINESS_CONTRACT, context);
|
|
105
|
+
requireLeadGenSupplementalReadiness(issues, index, resources, context);
|
|
106
|
+
}
|
|
107
|
+
function requireCrmInterfaceReadiness(issues, index, resources, context) {
|
|
108
|
+
requireContractReadiness(issues, index, resources, CRM_API_READINESS_CONTRACT, context);
|
|
109
|
+
}
|
|
110
|
+
function findSystemInterfaceGrant(model, consumer, provider) {
|
|
111
|
+
return Object.values(model.topology?.relationships ?? {}).find((relationship) => {
|
|
112
|
+
const grant = relationship.metadata?.["systemInterfaceGrant"];
|
|
113
|
+
if (!isPlainRecord(grant) || !isPlainRecord(grant.consumer) || !isPlainRecord(grant.provider)) return false;
|
|
114
|
+
return grant.consumer.systemPath === consumer.systemPath && grant.consumer.interfaceKey === consumer.interfaceKey && grant.provider.systemPath === provider.systemPath && grant.provider.interfaceKey === provider.interfaceKey;
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function requireHandoffBridgeReadiness(issues, model, context) {
|
|
118
|
+
const crmResult = computeInterfaceReadiness(model, CRM_API_INTERFACE);
|
|
119
|
+
if (!crmResult.ready) {
|
|
120
|
+
for (const issue of crmResult.issues) {
|
|
121
|
+
addReadinessIssue(
|
|
122
|
+
issues,
|
|
123
|
+
"SYSTEM_BRIDGE_NOT_READY",
|
|
124
|
+
issue.code,
|
|
125
|
+
`Provider interface ${formatInterfaceIdentity(CRM_API_INTERFACE.systemPath, CRM_API_INTERFACE.interfaceKey)} is not ready: ${issue.message}`,
|
|
126
|
+
{ path: issue.path, ref: issue.ref }
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
const bridgeGrant = findSystemInterfaceGrant(model, context, CRM_API_INTERFACE);
|
|
131
|
+
if (bridgeGrant === void 0) {
|
|
132
|
+
addReadinessIssue(
|
|
133
|
+
issues,
|
|
134
|
+
"SYSTEM_BRIDGE_NOT_READY",
|
|
135
|
+
"missing-topology-grant",
|
|
136
|
+
`System Interface "${formatInterfaceIdentity(context.systemPath, context.interfaceKey)}" requires a scoped topology grant to "${formatInterfaceIdentity(CRM_API_INTERFACE.systemPath, CRM_API_INTERFACE.interfaceKey)}".`
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
return bridgeGrant;
|
|
140
|
+
}
|
|
141
|
+
function getLeadGenCrmHandoffResourceIds(model) {
|
|
142
|
+
return Object.values(model.resources ?? {}).filter(
|
|
143
|
+
(resource) => resource.systemPath === LEAD_GEN_CRM_HANDOFF_INTERFACE.systemPath && resource.ontology?.usesCatalogs?.includes(CRM_PIPELINE_CATALOG_ONTOLOGY_ID) === true
|
|
144
|
+
).map((resource) => resource.id);
|
|
145
|
+
}
|
|
146
|
+
function mergeLeadGenDerivedCatalogs(model) {
|
|
147
|
+
const baseCatalogTypes = model.ontology?.catalogTypes ?? {};
|
|
148
|
+
const derivedCatalogTypes = {};
|
|
149
|
+
if (baseCatalogTypes[LEAD_GEN_STAGE_CATALOG_ONTOLOGY_ID] === void 0) {
|
|
150
|
+
derivedCatalogTypes[LEAD_GEN_STAGE_CATALOG_ONTOLOGY_ID] = createLeadGenStageCatalog(model);
|
|
151
|
+
}
|
|
152
|
+
if (Object.keys(derivedCatalogTypes).length === 0) return model;
|
|
153
|
+
return {
|
|
154
|
+
...model,
|
|
155
|
+
ontology: {
|
|
156
|
+
...model.ontology ?? {},
|
|
157
|
+
catalogTypes: {
|
|
158
|
+
...baseCatalogTypes,
|
|
159
|
+
...derivedCatalogTypes
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
registerBuiltInReadinessProfile(LEAD_GEN_API_INTERFACE.readinessProfile, {
|
|
165
|
+
validate: (issues, index, resources, _model, context) => requireLeadGenInterfaceReadiness(issues, index, resources, context),
|
|
166
|
+
prepareModel: mergeLeadGenDerivedCatalogs
|
|
167
|
+
});
|
|
168
|
+
registerBuiltInReadinessProfile(CRM_API_INTERFACE.readinessProfile, {
|
|
169
|
+
validate: (issues, index, resources, _model, context) => requireCrmInterfaceReadiness(issues, index, resources, context)
|
|
170
|
+
});
|
|
171
|
+
registerBuiltInReadinessProfile(LEAD_GEN_CRM_HANDOFF_INTERFACE.readinessProfile, {
|
|
172
|
+
validate: (issues, index, resources, model, context) => {
|
|
173
|
+
requireLeadGenInterfaceReadiness(issues, index, resources, context);
|
|
174
|
+
requireCrmInterfaceReadiness(issues, index, resources, { ...context, allowForeignOwner: true });
|
|
175
|
+
requireHandoffBridgeReadiness(issues, model, context);
|
|
176
|
+
},
|
|
177
|
+
prepareModel: mergeLeadGenDerivedCatalogs
|
|
178
|
+
});
|
|
179
|
+
registerReadinessInterfaceMarker(
|
|
180
|
+
LEAD_GEN_CRM_HANDOFF_INTERFACE.systemPath,
|
|
181
|
+
LEAD_GEN_CRM_HANDOFF_INTERFACE.interfaceKey,
|
|
182
|
+
(model) => ({
|
|
183
|
+
lifecycle: "active",
|
|
184
|
+
readinessProfile: LEAD_GEN_CRM_HANDOFF_INTERFACE.readinessProfile,
|
|
185
|
+
resourceIds: getLeadGenCrmHandoffResourceIds(model)
|
|
186
|
+
})
|
|
187
|
+
);
|
|
188
|
+
function findLeadGenTemplateStepCatalog(index) {
|
|
189
|
+
return Object.values(index.ontology.catalogTypes).find(
|
|
190
|
+
(catalog) => catalog.ownerSystemId === "sales.lead-gen" && catalog.kind === "template-step" && catalog.appliesTo === LEAD_GEN_LIST_OBJECT_ONTOLOGY_ID
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export { CRM_API_INTERFACE, LEAD_GEN_API_INTERFACE };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { usePresetsContext } from './chunk-R6NMRXNO.js';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
|
|
4
|
+
var BUILT_IN_NAMES = /* @__PURE__ */ new Set([
|
|
5
|
+
"default",
|
|
6
|
+
"tactical",
|
|
7
|
+
"regal",
|
|
8
|
+
"cyber-volt",
|
|
9
|
+
"aurora",
|
|
10
|
+
"rose-gold",
|
|
11
|
+
"midnight",
|
|
12
|
+
"titanium",
|
|
13
|
+
"obsidian",
|
|
14
|
+
"honey",
|
|
15
|
+
"abyss",
|
|
16
|
+
"canopy",
|
|
17
|
+
"slate",
|
|
18
|
+
"cyber-strike",
|
|
19
|
+
"cyber-chrome",
|
|
20
|
+
"cyber-void",
|
|
21
|
+
"quarry"
|
|
22
|
+
]);
|
|
23
|
+
function titleCase(str) {
|
|
24
|
+
return str.replace(/(^|-)(\w)/g, (_, sep, char) => (sep ? " " : "") + char.toUpperCase());
|
|
25
|
+
}
|
|
26
|
+
function useAvailablePresets() {
|
|
27
|
+
const presetsMap = usePresetsContext();
|
|
28
|
+
return useMemo(() => {
|
|
29
|
+
return Object.entries(presetsMap).map(([key, preset]) => ({
|
|
30
|
+
value: key,
|
|
31
|
+
label: preset.label ?? titleCase(key),
|
|
32
|
+
description: preset.description ?? "",
|
|
33
|
+
colors: preset.colors ?? [preset.dark.primary, preset.dark.background, preset.light.background],
|
|
34
|
+
isCustom: !BUILT_IN_NAMES.has(key)
|
|
35
|
+
}));
|
|
36
|
+
}, [presetsMap]);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { useAvailablePresets };
|