@finos/legend-application-studio 28.21.18 → 28.21.20
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/lib/__lib__/LegendStudioEvent.d.ts +6 -0
- package/lib/__lib__/LegendStudioEvent.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioEvent.js +7 -0
- package/lib/__lib__/LegendStudioEvent.js.map +1 -1
- package/lib/__lib__/LegendStudioTelemetryHelper.d.ts +6 -0
- package/lib/__lib__/LegendStudioTelemetryHelper.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioTelemetryHelper.js +19 -0
- package/lib/__lib__/LegendStudioTelemetryHelper.js.map +1 -1
- package/lib/components/editor/ActivityBar.d.ts +2 -4
- package/lib/components/editor/ActivityBar.d.ts.map +1 -1
- package/lib/components/editor/ActivityBar.js +3 -17
- package/lib/components/editor/ActivityBar.js.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.d.ts +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js +56 -39
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js.map +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceEditor.js +8 -1
- package/lib/components/editor/editor-group/service-editor/ServiceEditor.js.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/StereotypeSelector.d.ts.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/StereotypeSelector.js +7 -2
- package/lib/components/editor/editor-group/uml-editor/StereotypeSelector.js.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/TaggedValueEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/TaggedValueEditor.js +9 -4
- package/lib/components/editor/editor-group/uml-editor/TaggedValueEditor.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/editor/EditorGraphState.js +4 -1
- package/lib/stores/editor/EditorGraphState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts +6 -2
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js +43 -17
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js.map +1 -1
- package/lib/stores/editor/utils/ModelClassifierUtils.d.ts +1 -0
- package/lib/stores/editor/utils/ModelClassifierUtils.d.ts.map +1 -1
- package/lib/stores/editor/utils/ModelClassifierUtils.js +1 -0
- package/lib/stores/editor/utils/ModelClassifierUtils.js.map +1 -1
- package/package.json +15 -15
- package/src/__lib__/LegendStudioEvent.ts +8 -0
- package/src/__lib__/LegendStudioTelemetryHelper.ts +61 -0
- package/src/components/editor/ActivityBar.tsx +3 -22
- package/src/components/editor/editor-group/dataProduct/DataProductEditor.tsx +96 -42
- package/src/components/editor/editor-group/service-editor/ServiceEditor.tsx +17 -1
- package/src/components/editor/editor-group/uml-editor/StereotypeSelector.tsx +9 -3
- package/src/components/editor/editor-group/uml-editor/TaggedValueEditor.tsx +11 -5
- package/src/stores/editor/EditorGraphState.ts +3 -0
- package/src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts +98 -67
- package/src/stores/editor/utils/ModelClassifierUtils.ts +1 -0
|
@@ -19,10 +19,10 @@ import { useEditorStore } from '../../EditorStoreProvider.js';
|
|
|
19
19
|
import {
|
|
20
20
|
type AccessPointGroupState,
|
|
21
21
|
type AccessPointState,
|
|
22
|
+
type LakehouseAccessPointState,
|
|
22
23
|
DATA_PRODUCT_TAB,
|
|
23
24
|
DATA_PRODUCT_TYPE,
|
|
24
25
|
DataProductEditorState,
|
|
25
|
-
LakehouseAccessPointState,
|
|
26
26
|
ModelAccessPointGroupState,
|
|
27
27
|
} from '../../../../stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js';
|
|
28
28
|
import {
|
|
@@ -87,12 +87,12 @@ import {
|
|
|
87
87
|
useCallback,
|
|
88
88
|
useEffect,
|
|
89
89
|
useLayoutEffect,
|
|
90
|
+
useMemo,
|
|
90
91
|
useRef,
|
|
91
92
|
useState,
|
|
92
93
|
} from 'react';
|
|
93
94
|
import {
|
|
94
95
|
assertErrorThrown,
|
|
95
|
-
filterByType,
|
|
96
96
|
guaranteeNonNullable,
|
|
97
97
|
guaranteeType,
|
|
98
98
|
isNonNullable,
|
|
@@ -208,6 +208,7 @@ import type {
|
|
|
208
208
|
DataProductDocResponse,
|
|
209
209
|
DSL_DataProduct_LegendStudioApplicationPlugin_Extension,
|
|
210
210
|
} from '../../../../stores/extensions/DSL_DataProduct_LegendStudioApplicationPlugin_Extension.js';
|
|
211
|
+
import { LegendStudioTelemetryHelper } from '../../../../__lib__/LegendStudioTelemetryHelper.js';
|
|
211
212
|
|
|
212
213
|
export enum AP_GROUP_MODAL_ERRORS {
|
|
213
214
|
GROUP_NAME_EMPTY = 'Group Name is empty',
|
|
@@ -331,6 +332,17 @@ const AccessPointTitle = observer(
|
|
|
331
332
|
},
|
|
332
333
|
);
|
|
333
334
|
|
|
335
|
+
const AP_RENDER_CHUNK_SIZE = 50;
|
|
336
|
+
const AP_SENTINEL_ROOT_MARGIN = '0px 0px 400px 0px';
|
|
337
|
+
const DEFAULT_CLASSIFICATION_LABEL = 'Classification';
|
|
338
|
+
|
|
339
|
+
const toClassificationOption = (
|
|
340
|
+
classification: string,
|
|
341
|
+
): { label: string; value: string } => ({
|
|
342
|
+
label: classification,
|
|
343
|
+
value: classification,
|
|
344
|
+
});
|
|
345
|
+
|
|
334
346
|
const AccessPointClassification = observer(
|
|
335
347
|
(props: {
|
|
336
348
|
accessPoint: LakehouseAccessPoint;
|
|
@@ -338,52 +350,35 @@ const AccessPointClassification = observer(
|
|
|
338
350
|
}) => {
|
|
339
351
|
const { accessPoint, groupState } = props;
|
|
340
352
|
const applicationStore = useEditorStore().applicationStore;
|
|
341
|
-
const CHOOSE_CLASSIFICATION = 'Classification';
|
|
342
353
|
const updateAccessPointClassificationTextbox: React.ChangeEventHandler<HTMLTextAreaElement> =
|
|
343
354
|
action((event) => {
|
|
344
355
|
accessPoint.classification = event.target.value;
|
|
345
356
|
});
|
|
346
357
|
|
|
347
|
-
const
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
return (
|
|
355
|
-
applicationStore.config.options.dataProductConfig?.classifications ??
|
|
356
|
-
[]
|
|
357
|
-
);
|
|
358
|
-
}
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
const classificationOptions = [CHOOSE_CLASSIFICATION]
|
|
362
|
-
.concat(conditionalClassifications())
|
|
363
|
-
.map((classfication) => ({
|
|
364
|
-
label: classfication,
|
|
365
|
-
value: classfication,
|
|
366
|
-
}));
|
|
358
|
+
const classificationOptions = useMemo(
|
|
359
|
+
() =>
|
|
360
|
+
[DEFAULT_CLASSIFICATION_LABEL]
|
|
361
|
+
.concat(groupState.classifications)
|
|
362
|
+
.map(toClassificationOption),
|
|
363
|
+
[groupState.classifications],
|
|
364
|
+
);
|
|
367
365
|
|
|
368
366
|
const updateAccessPointClassificationFromDropdown = action(
|
|
369
367
|
(val: { label: string; value: string } | null): void => {
|
|
370
368
|
accessPoint_setClassification(
|
|
371
369
|
accessPoint,
|
|
372
|
-
val?.value ===
|
|
370
|
+
val?.value === DEFAULT_CLASSIFICATION_LABEL ? undefined : val?.value,
|
|
373
371
|
);
|
|
374
372
|
},
|
|
375
373
|
);
|
|
376
374
|
|
|
377
|
-
const currentClassification =
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
label: CHOOSE_CLASSIFICATION,
|
|
385
|
-
value: CHOOSE_CLASSIFICATION,
|
|
386
|
-
};
|
|
375
|
+
const currentClassification = useMemo(
|
|
376
|
+
() =>
|
|
377
|
+
toClassificationOption(
|
|
378
|
+
accessPoint.classification ?? DEFAULT_CLASSIFICATION_LABEL,
|
|
379
|
+
),
|
|
380
|
+
[accessPoint.classification],
|
|
381
|
+
);
|
|
387
382
|
|
|
388
383
|
const classificationDocumentationLink = (): void => {
|
|
389
384
|
const docLink =
|
|
@@ -399,7 +394,7 @@ const AccessPointClassification = observer(
|
|
|
399
394
|
style={{
|
|
400
395
|
borderWidth: 'thin',
|
|
401
396
|
borderColor:
|
|
402
|
-
currentClassification.label ===
|
|
397
|
+
currentClassification.label === DEFAULT_CLASSIFICATION_LABEL
|
|
403
398
|
? 'var(--color-red-300)'
|
|
404
399
|
: 'transparent',
|
|
405
400
|
}}
|
|
@@ -721,9 +716,7 @@ export const LakehouseDataProductAccessPointEditor = observer(
|
|
|
721
716
|
const accessPoint = accessPointState.accessPoint;
|
|
722
717
|
const groupState = accessPointState.state;
|
|
723
718
|
const lambdaEditorState = accessPointState.lambdaState;
|
|
724
|
-
const propertyHasParserError = groupState.
|
|
725
|
-
.filter(filterByType(LakehouseAccessPointState))
|
|
726
|
-
.find((pm) => pm.lambdaState.parserError);
|
|
719
|
+
const propertyHasParserError = groupState.hasParserError;
|
|
727
720
|
const [editingDescription, setEditingDescription] = useState(false);
|
|
728
721
|
const [isHoveringDesc, setIsHoveringDesc] = useState(false);
|
|
729
722
|
const [editingTitle, setEditingTitle] = useState(false);
|
|
@@ -736,6 +729,17 @@ export const LakehouseDataProductAccessPointEditor = observer(
|
|
|
736
729
|
);
|
|
737
730
|
}, [lambdaEditorState, editorStore.applicationStore]);
|
|
738
731
|
|
|
732
|
+
// Load the relation columns for access points that already have sample
|
|
733
|
+
// values so mismatches surface on load. This only runs for rendered access
|
|
734
|
+
// points, keeping the number of concurrent calls bounded to the visible set.
|
|
735
|
+
useEffect(() => {
|
|
736
|
+
if (accessPointState.relationElementState !== undefined) {
|
|
737
|
+
flowResult(lambdaEditorState.updateLambdaRelationColumns()).catch(
|
|
738
|
+
editorStore.applicationStore.alertUnhandledError,
|
|
739
|
+
);
|
|
740
|
+
}
|
|
741
|
+
}, [accessPointState, lambdaEditorState, editorStore.applicationStore]);
|
|
742
|
+
|
|
739
743
|
const handleDescriptionEdit = () => setEditingDescription(true);
|
|
740
744
|
const handleDescriptionBlur = () => {
|
|
741
745
|
setEditingDescription(false);
|
|
@@ -1019,7 +1023,9 @@ export const LakehouseDataProductAccessPointEditor = observer(
|
|
|
1019
1023
|
<button
|
|
1020
1024
|
className="access-point-editor__sample-values-btn"
|
|
1021
1025
|
onClick={() => {
|
|
1022
|
-
|
|
1026
|
+
flowResult(
|
|
1027
|
+
accessPointState.createAndaddRelationElement(),
|
|
1028
|
+
).catch(editorStore.applicationStore.alertUnhandledError);
|
|
1023
1029
|
}}
|
|
1024
1030
|
disabled={props.isReadOnly}
|
|
1025
1031
|
title="Add sample values"
|
|
@@ -1730,6 +1736,10 @@ const ModelAccessPointGroupEditor = observer(
|
|
|
1730
1736
|
},
|
|
1731
1737
|
);
|
|
1732
1738
|
|
|
1739
|
+
const AccessPointLoadingSentinel = (props: {
|
|
1740
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
1741
|
+
}) => <div ref={props.ref} className="access-point-editor__sentinel" />;
|
|
1742
|
+
|
|
1733
1743
|
const AccessPointGroupEditor = observer(
|
|
1734
1744
|
(props: { groupState: AccessPointGroupState; isReadOnly: boolean }) => {
|
|
1735
1745
|
const { groupState, isReadOnly } = props;
|
|
@@ -1747,6 +1757,31 @@ const AccessPointGroupEditor = observer(
|
|
|
1747
1757
|
const [aiSuggestion, setAISuggestion] = useState<
|
|
1748
1758
|
DataProductDocResponse | undefined
|
|
1749
1759
|
>(undefined);
|
|
1760
|
+
|
|
1761
|
+
const lakehouseAccessPointStates =
|
|
1762
|
+
groupState.accessPointStates as LakehouseAccessPointState[];
|
|
1763
|
+
const accessPointCount = lakehouseAccessPointStates.length;
|
|
1764
|
+
const [renderedCount, setRenderedCount] = useState(AP_RENDER_CHUNK_SIZE);
|
|
1765
|
+
const accessPointsSentinelRef = useRef<HTMLDivElement>(null);
|
|
1766
|
+
useEffect(() => {
|
|
1767
|
+
const sentinel = accessPointsSentinelRef.current;
|
|
1768
|
+
if (!sentinel) {
|
|
1769
|
+
return undefined;
|
|
1770
|
+
}
|
|
1771
|
+
const intersectionObserver = new IntersectionObserver(
|
|
1772
|
+
(entries) => {
|
|
1773
|
+
if (entries[0]?.isIntersecting) {
|
|
1774
|
+
setRenderedCount((count) =>
|
|
1775
|
+
Math.min(count + AP_RENDER_CHUNK_SIZE, accessPointCount),
|
|
1776
|
+
);
|
|
1777
|
+
}
|
|
1778
|
+
},
|
|
1779
|
+
{ rootMargin: AP_SENTINEL_ROOT_MARGIN },
|
|
1780
|
+
);
|
|
1781
|
+
intersectionObserver.observe(sentinel);
|
|
1782
|
+
return () => intersectionObserver.disconnect();
|
|
1783
|
+
}, [accessPointCount, renderedCount]);
|
|
1784
|
+
|
|
1750
1785
|
const handleDescriptionEdit = () => setEditingDescription(true);
|
|
1751
1786
|
const handleDescriptionBlur = () => {
|
|
1752
1787
|
setEditingDescription(false);
|
|
@@ -1818,6 +1853,10 @@ const AccessPointGroupEditor = observer(
|
|
|
1818
1853
|
if (!aiDocSuggester || !legendAIUrl) {
|
|
1819
1854
|
return;
|
|
1820
1855
|
}
|
|
1856
|
+
LegendStudioTelemetryHelper.logEvent_DataProductLegendAISuggestLaunched(
|
|
1857
|
+
editorStore.applicationStore.telemetryService,
|
|
1858
|
+
productEditorState.product.path,
|
|
1859
|
+
);
|
|
1821
1860
|
setIsSuggestingWithAI(true);
|
|
1822
1861
|
setAISuggestion(undefined);
|
|
1823
1862
|
try {
|
|
@@ -1843,6 +1882,10 @@ const AccessPointGroupEditor = observer(
|
|
|
1843
1882
|
if (!aiSuggestion) {
|
|
1844
1883
|
return;
|
|
1845
1884
|
}
|
|
1885
|
+
LegendStudioTelemetryHelper.logEvent_DataProductLegendAISuggestApplied(
|
|
1886
|
+
editorStore.applicationStore.telemetryService,
|
|
1887
|
+
productEditorState.product.path,
|
|
1888
|
+
);
|
|
1846
1889
|
// Find matching group in the response
|
|
1847
1890
|
const gIdx =
|
|
1848
1891
|
productEditorState.accessPointGroupStates.indexOf(groupState);
|
|
@@ -1880,6 +1923,13 @@ const AccessPointGroupEditor = observer(
|
|
|
1880
1923
|
}
|
|
1881
1924
|
setAISuggestion(undefined);
|
|
1882
1925
|
};
|
|
1926
|
+
const discardAISuggestion = (): void => {
|
|
1927
|
+
LegendStudioTelemetryHelper.logEvent_DataProductLegendAISuggestDiscarded(
|
|
1928
|
+
editorStore.applicationStore.telemetryService,
|
|
1929
|
+
productEditorState.product.path,
|
|
1930
|
+
);
|
|
1931
|
+
setAISuggestion(undefined);
|
|
1932
|
+
};
|
|
1883
1933
|
|
|
1884
1934
|
// Computed AI suggestion for current group
|
|
1885
1935
|
const groupIndex =
|
|
@@ -1922,6 +1972,7 @@ const AccessPointGroupEditor = observer(
|
|
|
1922
1972
|
undefined,
|
|
1923
1973
|
productEditorState.selectedGroupState ?? groupState,
|
|
1924
1974
|
);
|
|
1975
|
+
setRenderedCount(groupState.accessPointStates.length);
|
|
1925
1976
|
};
|
|
1926
1977
|
|
|
1927
1978
|
return (
|
|
@@ -1991,7 +2042,7 @@ const AccessPointGroupEditor = observer(
|
|
|
1991
2042
|
</button>
|
|
1992
2043
|
<button
|
|
1993
2044
|
className="btn data-product-editor__ai-suggestion__dismiss-btn"
|
|
1994
|
-
onClick={
|
|
2045
|
+
onClick={discardAISuggestion}
|
|
1995
2046
|
>
|
|
1996
2047
|
Dismiss
|
|
1997
2048
|
</button>
|
|
@@ -2150,8 +2201,8 @@ const AccessPointGroupEditor = observer(
|
|
|
2150
2201
|
<div
|
|
2151
2202
|
style={{ gap: '1rem', display: 'flex', flexDirection: 'column' }}
|
|
2152
2203
|
>
|
|
2153
|
-
{
|
|
2154
|
-
.
|
|
2204
|
+
{lakehouseAccessPointStates
|
|
2205
|
+
.slice(0, renderedCount)
|
|
2155
2206
|
.map((apState, idx) => (
|
|
2156
2207
|
<LakehouseDataProductAccessPointEditor
|
|
2157
2208
|
key={apState.uuid}
|
|
@@ -2160,6 +2211,9 @@ const AccessPointGroupEditor = observer(
|
|
|
2160
2211
|
aiSuggestionMeta={aiAccessPointMetas?.[idx]}
|
|
2161
2212
|
/>
|
|
2162
2213
|
))}
|
|
2214
|
+
{accessPointCount > renderedCount && (
|
|
2215
|
+
<AccessPointLoadingSentinel ref={accessPointsSentinelRef} />
|
|
2216
|
+
)}
|
|
2163
2217
|
</div>
|
|
2164
2218
|
</>
|
|
2165
2219
|
)}
|
|
@@ -74,6 +74,7 @@ import { LEGEND_STUDIO_DOCUMENTATION_KEY } from '../../../../__lib__/LegendStudi
|
|
|
74
74
|
import { DocumentationLink } from '@finos/legend-lego/application';
|
|
75
75
|
import { ServicePostValidationsEditor } from './ServicePostValidationEditor.js';
|
|
76
76
|
import type { DSL_Service_LegendStudioApplicationPlugin_Extension } from '../../../../stores/extensions/DSL_Service_LegendStudioApplicationPlugin_Extension.js';
|
|
77
|
+
import { LegendStudioTelemetryHelper } from '../../../../__lib__/LegendStudioTelemetryHelper.js';
|
|
77
78
|
|
|
78
79
|
type UserOption = { label: string; value: string };
|
|
79
80
|
|
|
@@ -264,6 +265,10 @@ const ServiceGeneralEditor = observer(() => {
|
|
|
264
265
|
if (!aiDocSuggester || !legendAIUrl) {
|
|
265
266
|
return;
|
|
266
267
|
}
|
|
268
|
+
LegendStudioTelemetryHelper.logEvent_ServiceLegendAISuggestLaunched(
|
|
269
|
+
applicationStore.telemetryService,
|
|
270
|
+
service.path,
|
|
271
|
+
);
|
|
267
272
|
setIsSuggestingWithAI(true);
|
|
268
273
|
setAIDocSuggestion(undefined);
|
|
269
274
|
try {
|
|
@@ -281,9 +286,20 @@ const ServiceGeneralEditor = observer(() => {
|
|
|
281
286
|
if (!aiDocSuggestion) {
|
|
282
287
|
return;
|
|
283
288
|
}
|
|
289
|
+
LegendStudioTelemetryHelper.logEvent_ServiceLegendAISuggestApplied(
|
|
290
|
+
applicationStore.telemetryService,
|
|
291
|
+
service.path,
|
|
292
|
+
);
|
|
284
293
|
service_setDocumentation(service, aiDocSuggestion);
|
|
285
294
|
setAIDocSuggestion(undefined);
|
|
286
295
|
};
|
|
296
|
+
const discardAIDocSuggestion = (): void => {
|
|
297
|
+
LegendStudioTelemetryHelper.logEvent_ServiceLegendAISuggestDiscarded(
|
|
298
|
+
applicationStore.telemetryService,
|
|
299
|
+
service.path,
|
|
300
|
+
);
|
|
301
|
+
setAIDocSuggestion(undefined);
|
|
302
|
+
};
|
|
287
303
|
|
|
288
304
|
const changeTitle: React.ChangeEventHandler<HTMLInputElement> = (event) => {
|
|
289
305
|
if (!isReadOnly) {
|
|
@@ -498,7 +514,7 @@ const ServiceGeneralEditor = observer(() => {
|
|
|
498
514
|
</button>
|
|
499
515
|
<button
|
|
500
516
|
className="btn service-editor__ai-suggestion__dismiss-btn"
|
|
501
|
-
onClick={
|
|
517
|
+
onClick={discardAIDocSuggestion}
|
|
502
518
|
title="Dismiss AI suggestion"
|
|
503
519
|
>
|
|
504
520
|
Dismiss
|
|
@@ -84,6 +84,12 @@ export const StereotypeSelector = observer(
|
|
|
84
84
|
darkTheme,
|
|
85
85
|
} = props;
|
|
86
86
|
const editorStore = useEditorStore();
|
|
87
|
+
// Follow the active app theme by default; the `darkTheme` prop, when
|
|
88
|
+
// provided, still overrides (e.g. for surfaces forced to a fixed look).
|
|
89
|
+
const darkMode =
|
|
90
|
+
darkTheme ??
|
|
91
|
+
!editorStore.applicationStore.layoutService
|
|
92
|
+
.TEMPORARY__isLightColorThemeEnabled;
|
|
87
93
|
|
|
88
94
|
// Profile
|
|
89
95
|
const profileOptions = editorStore.graphManagerState.usableProfiles
|
|
@@ -195,7 +201,7 @@ export const StereotypeSelector = observer(
|
|
|
195
201
|
value={selectedProfile}
|
|
196
202
|
placeholder="Choose a profile"
|
|
197
203
|
filterOption={filterOption}
|
|
198
|
-
darkMode={
|
|
204
|
+
darkMode={darkMode}
|
|
199
205
|
/>
|
|
200
206
|
<button
|
|
201
207
|
className="stereotype-selector__profile__visit-btn"
|
|
@@ -215,12 +221,12 @@ export const StereotypeSelector = observer(
|
|
|
215
221
|
value={selectedStereotype}
|
|
216
222
|
placeholder="Choose a stereotype"
|
|
217
223
|
filterOption={stereotypeFilterOption}
|
|
218
|
-
darkMode={
|
|
224
|
+
darkMode={darkMode}
|
|
219
225
|
/>
|
|
220
226
|
{!isReadOnly && (
|
|
221
227
|
<button
|
|
222
228
|
className={clsx('uml-element-editor__remove-btn', {
|
|
223
|
-
'btn--dark btn--caution':
|
|
229
|
+
'btn--dark btn--caution': darkMode,
|
|
224
230
|
})}
|
|
225
231
|
disabled={isReadOnly}
|
|
226
232
|
onClick={deleteStereotype}
|
|
@@ -88,6 +88,12 @@ export const TaggedValueEditor = observer(
|
|
|
88
88
|
darkTheme,
|
|
89
89
|
} = props;
|
|
90
90
|
const editorStore = useEditorStore();
|
|
91
|
+
// Follow the active app theme by default; the `darkTheme` prop, when
|
|
92
|
+
// provided, still overrides (e.g. for surfaces forced to a fixed look).
|
|
93
|
+
const darkMode =
|
|
94
|
+
darkTheme ??
|
|
95
|
+
!editorStore.applicationStore.layoutService
|
|
96
|
+
.TEMPORARY__isLightColorThemeEnabled;
|
|
91
97
|
// Name
|
|
92
98
|
const changeValue: React.ChangeEventHandler<
|
|
93
99
|
HTMLTextAreaElement | HTMLInputElement
|
|
@@ -204,7 +210,7 @@ export const TaggedValueEditor = observer(
|
|
|
204
210
|
value={selectedProfile}
|
|
205
211
|
placeholder="Choose a profile"
|
|
206
212
|
filterOption={profileFilterOption}
|
|
207
|
-
darkMode={
|
|
213
|
+
darkMode={darkMode}
|
|
208
214
|
/>
|
|
209
215
|
<button
|
|
210
216
|
className="tagged-value-editor__profile__visit-btn"
|
|
@@ -226,12 +232,12 @@ export const TaggedValueEditor = observer(
|
|
|
226
232
|
value={selectedTag}
|
|
227
233
|
placeholder="Choose a tag"
|
|
228
234
|
filterOption={tagFilterOption}
|
|
229
|
-
darkMode={
|
|
235
|
+
darkMode={darkMode}
|
|
230
236
|
/>
|
|
231
237
|
{!isReadOnly && (
|
|
232
238
|
<button
|
|
233
239
|
className={clsx('uml-element-editor__remove-btn', {
|
|
234
|
-
'btn--dark btn--caution':
|
|
240
|
+
'btn--dark btn--caution': darkMode,
|
|
235
241
|
})}
|
|
236
242
|
disabled={isReadOnly}
|
|
237
243
|
onClick={deleteValue}
|
|
@@ -249,7 +255,7 @@ export const TaggedValueEditor = observer(
|
|
|
249
255
|
{isExpanded && (
|
|
250
256
|
<textarea
|
|
251
257
|
className={clsx('tagged-value-editor__value__input', {
|
|
252
|
-
'input--dark':
|
|
258
|
+
'input--dark': darkMode,
|
|
253
259
|
})}
|
|
254
260
|
spellCheck={false}
|
|
255
261
|
disabled={isReadOnly}
|
|
@@ -261,7 +267,7 @@ export const TaggedValueEditor = observer(
|
|
|
261
267
|
{!isExpanded && (
|
|
262
268
|
<input
|
|
263
269
|
className={clsx('tagged-value-editor__value__input', {
|
|
264
|
-
'input--dark':
|
|
270
|
+
'input--dark': darkMode,
|
|
265
271
|
})}
|
|
266
272
|
spellCheck={false}
|
|
267
273
|
disabled={isReadOnly}
|
|
@@ -91,6 +91,7 @@ import {
|
|
|
91
91
|
SnowflakeM2MUdf,
|
|
92
92
|
GraphEntities,
|
|
93
93
|
HostedService,
|
|
94
|
+
Compute,
|
|
94
95
|
DataProduct,
|
|
95
96
|
IngestDefinition,
|
|
96
97
|
MemSQLFunction,
|
|
@@ -876,6 +877,8 @@ export class EditorGraphState {
|
|
|
876
877
|
return PACKAGEABLE_ELEMENT_TYPE.HOSTED_SERVICE;
|
|
877
878
|
} else if (element instanceof DataProduct) {
|
|
878
879
|
return PACKAGEABLE_ELEMENT_TYPE._DATA_PRODUCT;
|
|
880
|
+
} else if (element instanceof Compute) {
|
|
881
|
+
return PACKAGEABLE_ELEMENT_TYPE._COMPUTE;
|
|
879
882
|
} else if (element instanceof IngestDefinition) {
|
|
880
883
|
return PACKAGEABLE_ELEMENT_TYPE.INGEST_DEFINITION;
|
|
881
884
|
} else if (element instanceof MemSQLFunction) {
|