@finos/legend-application-studio 28.19.51 → 28.19.52
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/components/editor/editor-group/dataProduct/DataProductEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js +53 -10
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.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/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts +1 -0
- 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 +6 -2
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js.map +1 -1
- package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts +6 -1
- package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js +31 -1
- package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js.map +1 -1
- package/package.json +8 -8
- package/src/components/editor/editor-group/dataProduct/DataProductEditor.tsx +188 -26
- package/src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts +7 -0
- package/src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts +41 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-application-studio",
|
|
3
|
-
"version": "28.19.
|
|
3
|
+
"version": "28.19.52",
|
|
4
4
|
"description": "Legend Studio application core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@finos/legend-application": "16.0.75",
|
|
49
49
|
"@finos/legend-art": "7.1.126",
|
|
50
|
-
"@finos/legend-code-editor": "2.0.
|
|
51
|
-
"@finos/legend-data-cube": "0.3.
|
|
52
|
-
"@finos/legend-extension-dsl-data-product": "0.0.
|
|
53
|
-
"@finos/legend-graph": "32.3.
|
|
54
|
-
"@finos/legend-lego": "2.0.
|
|
55
|
-
"@finos/legend-query-builder": "4.17.
|
|
50
|
+
"@finos/legend-code-editor": "2.0.126",
|
|
51
|
+
"@finos/legend-data-cube": "0.3.36",
|
|
52
|
+
"@finos/legend-extension-dsl-data-product": "0.0.12",
|
|
53
|
+
"@finos/legend-graph": "32.3.7",
|
|
54
|
+
"@finos/legend-lego": "2.0.137",
|
|
55
|
+
"@finos/legend-query-builder": "4.17.49",
|
|
56
56
|
"@finos/legend-server-depot": "6.1.1",
|
|
57
|
-
"@finos/legend-server-lakehouse": "0.3.
|
|
57
|
+
"@finos/legend-server-lakehouse": "0.3.7",
|
|
58
58
|
"@finos/legend-server-sdlc": "5.3.65",
|
|
59
59
|
"@finos/legend-server-showcase": "0.2.61",
|
|
60
60
|
"@finos/legend-shared": "11.0.20",
|
|
@@ -94,27 +94,28 @@ import { CODE_EDITOR_LANGUAGE } from '@finos/legend-code-editor';
|
|
|
94
94
|
import { CodeEditor } from '@finos/legend-lego/code-editor';
|
|
95
95
|
import {
|
|
96
96
|
type DataProduct,
|
|
97
|
+
type DataProductElement,
|
|
98
|
+
type DataProductElementScope,
|
|
99
|
+
type DataProductRuntimeInfo,
|
|
100
|
+
type Expertise,
|
|
97
101
|
type GraphManagerState,
|
|
98
102
|
type LakehouseAccessPoint,
|
|
99
|
-
type V1_DataProductArtifactAccessPointGroup,
|
|
100
|
-
type V1_DataProductArtifactAccessPointImplementation,
|
|
101
|
-
type V1_DataProductArtifactGeneration,
|
|
102
103
|
type Mapping,
|
|
103
|
-
type PackageableRuntime,
|
|
104
|
-
type DataProductRuntimeInfo,
|
|
105
104
|
type PackageableElement,
|
|
106
|
-
type
|
|
107
|
-
type
|
|
105
|
+
type PackageableRuntime,
|
|
106
|
+
type V1_AccessPointGroupInfo,
|
|
107
|
+
type V1_AccessPointImplementation,
|
|
108
|
+
type V1_DataProductArtifact,
|
|
108
109
|
DataProductEmbeddedImageIcon,
|
|
109
110
|
DataProductLibraryIcon,
|
|
110
111
|
Email,
|
|
111
112
|
LakehouseTargetEnv,
|
|
112
113
|
StereotypeExplicitReference,
|
|
114
|
+
V1_DataProduct,
|
|
113
115
|
V1_DataProductIconLibraryId,
|
|
114
|
-
validate_PureExecutionMapping,
|
|
115
116
|
V1_PureGraphManager,
|
|
116
117
|
V1_RemoteEngine,
|
|
117
|
-
|
|
118
|
+
validate_PureExecutionMapping,
|
|
118
119
|
} from '@finos/legend-graph';
|
|
119
120
|
import {
|
|
120
121
|
accessPoint_setClassification,
|
|
@@ -134,6 +135,10 @@ import {
|
|
|
134
135
|
runtimeInfo_setDescription,
|
|
135
136
|
supportInfo_setSupportUrl,
|
|
136
137
|
supportInfo_setWebsite,
|
|
138
|
+
expertise_setDescription,
|
|
139
|
+
expertise_addId,
|
|
140
|
+
expertise_deleteId,
|
|
141
|
+
dataProduct_deleteExpertise,
|
|
137
142
|
} from '../../../../stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js';
|
|
138
143
|
import { LEGEND_STUDIO_TEST_ID } from '../../../../__lib__/LegendStudioTesting.js';
|
|
139
144
|
import { LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY } from '../../../../__lib__/LegendStudioApplicationNavigationContext.js';
|
|
@@ -156,6 +161,7 @@ import {
|
|
|
156
161
|
ProductViewer,
|
|
157
162
|
} from '@finos/legend-extension-dsl-data-product';
|
|
158
163
|
import type { LegendStudioApplicationStore } from '../../../../stores/LegendStudioBaseStore.js';
|
|
164
|
+
import type { DepotServerClient } from '@finos/legend-server-depot';
|
|
159
165
|
|
|
160
166
|
export enum AP_GROUP_MODAL_ERRORS {
|
|
161
167
|
GROUP_NAME_EMPTY = 'Group Name is empty',
|
|
@@ -489,16 +495,15 @@ export const LakehouseDataProductAccessPointEditor = observer(
|
|
|
489
495
|
if (dataProductContent) {
|
|
490
496
|
const contentJson = JSON.parse(
|
|
491
497
|
dataProductContent,
|
|
492
|
-
) as
|
|
498
|
+
) as V1_DataProductArtifact;
|
|
493
499
|
const apPlanGeneration = contentJson.accessPointGroups
|
|
494
500
|
.find(
|
|
495
|
-
(group:
|
|
501
|
+
(group: V1_AccessPointGroupInfo) =>
|
|
496
502
|
group.id === groupState.value.id,
|
|
497
503
|
)
|
|
498
504
|
?.accessPointImplementations.find(
|
|
499
|
-
(
|
|
500
|
-
apImplementation
|
|
501
|
-
) => apImplementation.id === accessPoint.id,
|
|
505
|
+
(apImplementation: V1_AccessPointImplementation) =>
|
|
506
|
+
apImplementation.id === accessPoint.id,
|
|
502
507
|
);
|
|
503
508
|
|
|
504
509
|
setDebugOutput(JSON.stringify(apPlanGeneration, null, 2));
|
|
@@ -1933,6 +1938,145 @@ const HomeTab = observer(
|
|
|
1933
1938
|
},
|
|
1934
1939
|
);
|
|
1935
1940
|
|
|
1941
|
+
const ExpertiseEditor = observer(
|
|
1942
|
+
(props: { dataProductEditorState: DataProductEditorState }) => {
|
|
1943
|
+
const { dataProductEditorState } = props;
|
|
1944
|
+
const product = dataProductEditorState.product;
|
|
1945
|
+
|
|
1946
|
+
const NewExpertIdComponent = observer(
|
|
1947
|
+
(newElementProps: { expertise: Expertise }) => {
|
|
1948
|
+
const { expertise } = newElementProps;
|
|
1949
|
+
const [title, setTitle] = useState('');
|
|
1950
|
+
|
|
1951
|
+
return (
|
|
1952
|
+
<div className="data-product-editor__support-info__expertise-id-container">
|
|
1953
|
+
<div className="panel__content__form__section__list__new-item__input">
|
|
1954
|
+
<input
|
|
1955
|
+
className="input input-group__input panel__content__form__section__input input--dark"
|
|
1956
|
+
type="title"
|
|
1957
|
+
placeholder="Enter User ID"
|
|
1958
|
+
value={title}
|
|
1959
|
+
onChange={(event) => {
|
|
1960
|
+
setTitle(event.target.value);
|
|
1961
|
+
}}
|
|
1962
|
+
/>
|
|
1963
|
+
</div>
|
|
1964
|
+
<button
|
|
1965
|
+
className="panel__content__form__section__list__new-item__add-btn btn btn--dark"
|
|
1966
|
+
onClick={() => {
|
|
1967
|
+
expertise_addId(expertise, title);
|
|
1968
|
+
setTitle('');
|
|
1969
|
+
}}
|
|
1970
|
+
>
|
|
1971
|
+
Save
|
|
1972
|
+
</button>
|
|
1973
|
+
</div>
|
|
1974
|
+
);
|
|
1975
|
+
},
|
|
1976
|
+
);
|
|
1977
|
+
|
|
1978
|
+
const addNewExpertise = () => {
|
|
1979
|
+
dataProductEditorState.createExpertise();
|
|
1980
|
+
};
|
|
1981
|
+
|
|
1982
|
+
const updateExpertiseDescription = (
|
|
1983
|
+
expertise: Expertise,
|
|
1984
|
+
val: string | undefined,
|
|
1985
|
+
): void => {
|
|
1986
|
+
if (val) {
|
|
1987
|
+
expertise_setDescription(expertise, val);
|
|
1988
|
+
}
|
|
1989
|
+
};
|
|
1990
|
+
|
|
1991
|
+
const handleRemoveId = (expertise: Expertise, id: string) => {
|
|
1992
|
+
expertise_deleteId(expertise, id);
|
|
1993
|
+
};
|
|
1994
|
+
|
|
1995
|
+
const handleRemoveExpertise = (expertise: Expertise) => {
|
|
1996
|
+
dataProduct_deleteExpertise(product, expertise);
|
|
1997
|
+
};
|
|
1998
|
+
|
|
1999
|
+
return (
|
|
2000
|
+
<>
|
|
2001
|
+
<PanelHeader className="panel__header--access-point">
|
|
2002
|
+
<div className="panel__content__form__section__header__label">
|
|
2003
|
+
Expertise
|
|
2004
|
+
</div>
|
|
2005
|
+
<PanelHeaderActions>
|
|
2006
|
+
<PanelHeaderActionItem
|
|
2007
|
+
className="panel__header__action"
|
|
2008
|
+
onClick={addNewExpertise}
|
|
2009
|
+
title="Add new expertise"
|
|
2010
|
+
>
|
|
2011
|
+
<PlusIcon />
|
|
2012
|
+
</PanelHeaderActionItem>
|
|
2013
|
+
</PanelHeaderActions>
|
|
2014
|
+
</PanelHeader>
|
|
2015
|
+
{dataProductEditorState.product.expertise?.map((expertise) => (
|
|
2016
|
+
<>
|
|
2017
|
+
<div className="data-product-editor__expertise">
|
|
2018
|
+
<div className="panel__content__form__section">
|
|
2019
|
+
<div className="panel__content__form__section__header__prompt">
|
|
2020
|
+
Description
|
|
2021
|
+
</div>
|
|
2022
|
+
<textarea
|
|
2023
|
+
className="panel__content__form__section__textarea"
|
|
2024
|
+
spellCheck={false}
|
|
2025
|
+
disabled={dataProductEditorState.isReadOnly}
|
|
2026
|
+
value={expertise.description ?? ''}
|
|
2027
|
+
onChange={(event) =>
|
|
2028
|
+
updateExpertiseDescription(expertise, event.target.value)
|
|
2029
|
+
}
|
|
2030
|
+
style={{
|
|
2031
|
+
height: '100%',
|
|
2032
|
+
}}
|
|
2033
|
+
/>
|
|
2034
|
+
</div>
|
|
2035
|
+
<div className="panel__content__form__section">
|
|
2036
|
+
<div className="panel__content__form__section__header__prompt">
|
|
2037
|
+
User IDs
|
|
2038
|
+
</div>
|
|
2039
|
+
<div className="panel__content__form__section__list__id-list">
|
|
2040
|
+
{expertise.expertIds?.map((id) => (
|
|
2041
|
+
<div
|
|
2042
|
+
className="panel__content__form__section__list__item"
|
|
2043
|
+
key={id}
|
|
2044
|
+
>
|
|
2045
|
+
{id}
|
|
2046
|
+
|
|
2047
|
+
<button
|
|
2048
|
+
className="panel__content__form__section__list__item__remove-btn"
|
|
2049
|
+
disabled={dataProductEditorState.isReadOnly}
|
|
2050
|
+
onClick={() => handleRemoveId(expertise, id)}
|
|
2051
|
+
tabIndex={-1}
|
|
2052
|
+
>
|
|
2053
|
+
<TimesIcon />
|
|
2054
|
+
</button>
|
|
2055
|
+
</div>
|
|
2056
|
+
))}
|
|
2057
|
+
</div>
|
|
2058
|
+
<NewExpertIdComponent expertise={expertise} />
|
|
2059
|
+
</div>
|
|
2060
|
+
<div className="data-product-editor__expertise__actions">
|
|
2061
|
+
<button
|
|
2062
|
+
className="access-point-editor__generic-entry__remove-btn--group"
|
|
2063
|
+
onClick={() => {
|
|
2064
|
+
handleRemoveExpertise(expertise);
|
|
2065
|
+
}}
|
|
2066
|
+
tabIndex={-1}
|
|
2067
|
+
title="Remove Expertise"
|
|
2068
|
+
>
|
|
2069
|
+
<TimesIcon />
|
|
2070
|
+
</button>
|
|
2071
|
+
</div>
|
|
2072
|
+
</div>
|
|
2073
|
+
</>
|
|
2074
|
+
))}
|
|
2075
|
+
</>
|
|
2076
|
+
);
|
|
2077
|
+
},
|
|
2078
|
+
);
|
|
2079
|
+
|
|
1936
2080
|
const SupportTab = observer(
|
|
1937
2081
|
(props: {
|
|
1938
2082
|
dataProductEditorState: DataProductEditorState;
|
|
@@ -2192,6 +2336,7 @@ const SupportTab = observer(
|
|
|
2192
2336
|
isReadOnly={isReadOnly}
|
|
2193
2337
|
emptyMessage="No emails specified"
|
|
2194
2338
|
/>
|
|
2339
|
+
<ExpertiseEditor dataProductEditorState={dataProductEditorState} />
|
|
2195
2340
|
</div>
|
|
2196
2341
|
);
|
|
2197
2342
|
},
|
|
@@ -2201,6 +2346,7 @@ const getDataProductViewerState = (
|
|
|
2201
2346
|
product: DataProduct,
|
|
2202
2347
|
graphManagerState: GraphManagerState,
|
|
2203
2348
|
applicationStore: LegendStudioApplicationStore,
|
|
2349
|
+
depotServerClient: DepotServerClient,
|
|
2204
2350
|
) => {
|
|
2205
2351
|
const graphManager = guaranteeType(
|
|
2206
2352
|
graphManagerState.graphManager,
|
|
@@ -2211,16 +2357,19 @@ const getDataProductViewerState = (
|
|
|
2211
2357
|
V1_DataProduct,
|
|
2212
2358
|
);
|
|
2213
2359
|
const remoteEngine = guaranteeType(graphManager.engine, V1_RemoteEngine);
|
|
2214
|
-
|
|
2360
|
+
const dataProductViewerState = new DataProductViewerState(
|
|
2215
2361
|
v1_dataProduct,
|
|
2216
2362
|
applicationStore,
|
|
2217
2363
|
remoteEngine.getEngineServerClient(),
|
|
2364
|
+
depotServerClient,
|
|
2218
2365
|
graphManagerState,
|
|
2219
2366
|
applicationStore.config.options.dataProductConfig,
|
|
2220
2367
|
undefined,
|
|
2221
2368
|
undefined,
|
|
2222
2369
|
{},
|
|
2223
2370
|
);
|
|
2371
|
+
dataProductViewerState.init();
|
|
2372
|
+
return dataProductViewerState;
|
|
2224
2373
|
};
|
|
2225
2374
|
|
|
2226
2375
|
export const DataProductEditor = observer(() => {
|
|
@@ -2230,14 +2379,9 @@ export const DataProductEditor = observer(() => {
|
|
|
2230
2379
|
const product = dataProductEditorState.product;
|
|
2231
2380
|
const isReadOnly = dataProductEditorState.isReadOnly;
|
|
2232
2381
|
const auth = useAuth();
|
|
2233
|
-
const [showPreview,
|
|
2234
|
-
const [dataProductViewerState, setDataProductViewerState] =
|
|
2235
|
-
|
|
2236
|
-
product,
|
|
2237
|
-
editorStore.graphManagerState,
|
|
2238
|
-
editorStore.applicationStore,
|
|
2239
|
-
),
|
|
2240
|
-
);
|
|
2382
|
+
const [showPreview, setShowPreview] = useState(false);
|
|
2383
|
+
const [dataProductViewerState, setDataProductViewerState] =
|
|
2384
|
+
useState<DataProductViewerState>();
|
|
2241
2385
|
|
|
2242
2386
|
const deployDataProduct = (): void => {
|
|
2243
2387
|
// Trigger OAuth flow if not authenticated
|
|
@@ -2319,6 +2463,7 @@ export const DataProductEditor = observer(() => {
|
|
|
2319
2463
|
product,
|
|
2320
2464
|
editorStore.graphManagerState,
|
|
2321
2465
|
editorStore.applicationStore,
|
|
2466
|
+
editorStore.depotServerClient,
|
|
2322
2467
|
),
|
|
2323
2468
|
);
|
|
2324
2469
|
}
|
|
@@ -2328,6 +2473,7 @@ export const DataProductEditor = observer(() => {
|
|
|
2328
2473
|
[
|
|
2329
2474
|
editorStore.applicationStore,
|
|
2330
2475
|
editorStore.graphManagerState,
|
|
2476
|
+
editorStore.depotServerClient,
|
|
2331
2477
|
product,
|
|
2332
2478
|
showPreview,
|
|
2333
2479
|
],
|
|
@@ -2349,7 +2495,21 @@ export const DataProductEditor = observer(() => {
|
|
|
2349
2495
|
<div className="btn__dropdown-combo btn__dropdown-combo--primary">
|
|
2350
2496
|
<button
|
|
2351
2497
|
className="btn__dropdown-combo__label"
|
|
2352
|
-
onClick={() =>
|
|
2498
|
+
onClick={() => {
|
|
2499
|
+
setShowPreview((prev) => {
|
|
2500
|
+
if (!prev) {
|
|
2501
|
+
setDataProductViewerState(
|
|
2502
|
+
getDataProductViewerState(
|
|
2503
|
+
product,
|
|
2504
|
+
editorStore.graphManagerState,
|
|
2505
|
+
editorStore.applicationStore,
|
|
2506
|
+
editorStore.depotServerClient,
|
|
2507
|
+
),
|
|
2508
|
+
);
|
|
2509
|
+
}
|
|
2510
|
+
return !prev;
|
|
2511
|
+
});
|
|
2512
|
+
}}
|
|
2353
2513
|
title={showPreview ? 'Hide Preview' : 'Preview Description'}
|
|
2354
2514
|
tabIndex={-1}
|
|
2355
2515
|
style={{
|
|
@@ -2396,8 +2556,10 @@ export const DataProductEditor = observer(() => {
|
|
|
2396
2556
|
<DataProductSidebar dataProductEditorState={dataProductEditorState} />
|
|
2397
2557
|
<ResizablePanelGroup orientation="vertical">
|
|
2398
2558
|
<ResizablePanel>{renderActivivtyBarTab()}</ResizablePanel>
|
|
2399
|
-
{showPreview &&
|
|
2400
|
-
|
|
2559
|
+
{showPreview && dataProductViewerState && (
|
|
2560
|
+
<ResizablePanelSplitter />
|
|
2561
|
+
)}
|
|
2562
|
+
{showPreview && dataProductViewerState && (
|
|
2401
2563
|
<ResizablePanel>
|
|
2402
2564
|
<div className="data-product-editor__preview-container theme__hc-light">
|
|
2403
2565
|
<ProductViewer productViewerState={dataProductViewerState} />
|
package/src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts
CHANGED
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
DataProductRuntimeInfo,
|
|
44
44
|
type DataProductElement,
|
|
45
45
|
type Mapping,
|
|
46
|
+
Expertise,
|
|
46
47
|
observe_DataProductElementScope,
|
|
47
48
|
DataProductElementScope,
|
|
48
49
|
validate_PureExecutionMapping,
|
|
@@ -78,6 +79,7 @@ import {
|
|
|
78
79
|
accessPointGroup_swapAccessPoints,
|
|
79
80
|
dataProduct_addAccessPoint,
|
|
80
81
|
dataProduct_addAccessPointGroup,
|
|
82
|
+
dataProduct_addExpertise,
|
|
81
83
|
dataProduct_deleteAccessPoint,
|
|
82
84
|
dataProduct_deleteAccessPointGroup,
|
|
83
85
|
dataProduct_swapAccessPointGroups,
|
|
@@ -726,6 +728,11 @@ export class DataProductEditorState extends ElementEditorState {
|
|
|
726
728
|
});
|
|
727
729
|
}
|
|
728
730
|
|
|
731
|
+
createExpertise() {
|
|
732
|
+
const newExpertise = new Expertise();
|
|
733
|
+
dataProduct_addExpertise(this.product, newExpertise);
|
|
734
|
+
}
|
|
735
|
+
|
|
729
736
|
*deploy(token: string | undefined): GeneratorFn<void> {
|
|
730
737
|
try {
|
|
731
738
|
assertTrue(
|
|
@@ -34,6 +34,8 @@ import {
|
|
|
34
34
|
type DataProductDiagram,
|
|
35
35
|
type DataProductElementScope,
|
|
36
36
|
observe_APG,
|
|
37
|
+
observe_Expertise,
|
|
38
|
+
type Expertise,
|
|
37
39
|
} from '@finos/legend-graph';
|
|
38
40
|
import { addUniqueEntry, deleteEntry, swapEntry } from '@finos/legend-shared';
|
|
39
41
|
import { action } from 'mobx';
|
|
@@ -178,6 +180,45 @@ export const dataProduct_deleteAccessPointGroup = action(
|
|
|
178
180
|
},
|
|
179
181
|
);
|
|
180
182
|
|
|
183
|
+
export const dataProduct_addExpertise = action(
|
|
184
|
+
(product: DataProduct, expertise: Expertise) => {
|
|
185
|
+
const observedExpertise = observe_Expertise(expertise);
|
|
186
|
+
if (!product.expertise) {
|
|
187
|
+
product.expertise = [observedExpertise];
|
|
188
|
+
} else {
|
|
189
|
+
addUniqueEntry(product.expertise, observedExpertise);
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
);
|
|
193
|
+
|
|
194
|
+
export const dataProduct_deleteExpertise = action(
|
|
195
|
+
(product: DataProduct, expertise: Expertise) => {
|
|
196
|
+
if (product.expertise) {
|
|
197
|
+
deleteEntry(product.expertise, expertise);
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
export const expertise_setDescription = action(
|
|
203
|
+
(expertise: Expertise, desc: string) => {
|
|
204
|
+
expertise.description = desc;
|
|
205
|
+
},
|
|
206
|
+
);
|
|
207
|
+
|
|
208
|
+
export const expertise_addId = action((expertise: Expertise, id: string) => {
|
|
209
|
+
if (expertise.expertIds) {
|
|
210
|
+
addUniqueEntry(expertise.expertIds, id);
|
|
211
|
+
} else {
|
|
212
|
+
expertise.expertIds = [id];
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
export const expertise_deleteId = action((expertise: Expertise, id: string) => {
|
|
217
|
+
if (expertise.expertIds) {
|
|
218
|
+
deleteEntry(expertise.expertIds, id);
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
|
|
181
222
|
export const dataProduct_swapAccessPointGroups = action(
|
|
182
223
|
(
|
|
183
224
|
product: DataProduct,
|