@finos/legend-extension-dsl-data-product 0.0.2
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 +3 -0
- package/lib/__lib__/DSL_DataProduct_Event.d.ts +19 -0
- package/lib/__lib__/DSL_DataProduct_Event.d.ts.map +1 -0
- package/lib/__lib__/DSL_DataProduct_Event.js +20 -0
- package/lib/__lib__/DSL_DataProduct_Event.js.map +1 -0
- package/lib/components/Core_DataProductDataAccess_LegendApplicationPlugin.d.ts +25 -0
- package/lib/components/Core_DataProductDataAccess_LegendApplicationPlugin.d.ts.map +1 -0
- package/lib/components/Core_DataProductDataAccess_LegendApplicationPlugin.js +105 -0
- package/lib/components/Core_DataProductDataAccess_LegendApplicationPlugin.js.map +1 -0
- package/lib/components/DataProduct/DataContract/EntitlementsDataContractCreator.d.ts +27 -0
- package/lib/components/DataProduct/DataContract/EntitlementsDataContractCreator.d.ts.map +1 -0
- package/lib/components/DataProduct/DataContract/EntitlementsDataContractCreator.js +57 -0
- package/lib/components/DataProduct/DataContract/EntitlementsDataContractCreator.js.map +1 -0
- package/lib/components/DataProduct/DataContract/EntitlementsDataContractViewer.d.ts +29 -0
- package/lib/components/DataProduct/DataContract/EntitlementsDataContractViewer.d.ts.map +1 -0
- package/lib/components/DataProduct/DataContract/EntitlementsDataContractViewer.js +165 -0
- package/lib/components/DataProduct/DataContract/EntitlementsDataContractViewer.js.map +1 -0
- package/lib/components/DataProduct/DataProductDataAccess.d.ts +34 -0
- package/lib/components/DataProduct/DataProductDataAccess.d.ts.map +1 -0
- package/lib/components/DataProduct/DataProductDataAccess.js +336 -0
- package/lib/components/DataProduct/DataProductDataAccess.js.map +1 -0
- package/lib/components/DataProduct/DataProductSupportInfo.d.ts +22 -0
- package/lib/components/DataProduct/DataProductSupportInfo.d.ts.map +1 -0
- package/lib/components/DataProduct/DataProductSupportInfo.js +43 -0
- package/lib/components/DataProduct/DataProductSupportInfo.js.map +1 -0
- package/lib/components/DataProduct/Subscriptions/DataProductSubscriptionsViewer.d.ts +26 -0
- package/lib/components/DataProduct/Subscriptions/DataProductSubscriptionsViewer.d.ts.map +1 -0
- package/lib/components/DataProduct/Subscriptions/DataProductSubscriptionsViewer.js +219 -0
- package/lib/components/DataProduct/Subscriptions/DataProductSubscriptionsViewer.js.map +1 -0
- package/lib/components/ProductViewer.d.ts +33 -0
- package/lib/components/ProductViewer.d.ts.map +1 -0
- package/lib/components/ProductViewer.js +113 -0
- package/lib/components/ProductViewer.js.map +1 -0
- package/lib/components/ProductWiki.d.ts +39 -0
- package/lib/components/ProductWiki.d.ts.map +1 -0
- package/lib/components/ProductWiki.js +95 -0
- package/lib/components/ProductWiki.js.map +1 -0
- package/lib/components/TerminalProduct/TerminalProductPrice.d.ts +22 -0
- package/lib/components/TerminalProduct/TerminalProductPrice.d.ts.map +1 -0
- package/lib/components/TerminalProduct/TerminalProductPrice.js +39 -0
- package/lib/components/TerminalProduct/TerminalProductPrice.js.map +1 -0
- package/lib/components/UserRenderer/MultiUserRenderer.d.ts +24 -0
- package/lib/components/UserRenderer/MultiUserRenderer.d.ts.map +1 -0
- package/lib/components/UserRenderer/MultiUserRenderer.js +46 -0
- package/lib/components/UserRenderer/MultiUserRenderer.js.map +1 -0
- package/lib/components/UserRenderer/UserRenderer.d.ts +27 -0
- package/lib/components/UserRenderer/UserRenderer.d.ts.map +1 -0
- package/lib/components/UserRenderer/UserRenderer.js +57 -0
- package/lib/components/UserRenderer/UserRenderer.js.map +1 -0
- package/lib/components/__test-utils__/StateTestUtils.d.ts +36 -0
- package/lib/components/__test-utils__/StateTestUtils.d.ts.map +1 -0
- package/lib/components/__test-utils__/StateTestUtils.js +97 -0
- package/lib/components/__test-utils__/StateTestUtils.js.map +1 -0
- package/lib/components/__test-utils__/TEST_DATA__LakehouseContractData.d.ts +25 -0
- package/lib/components/__test-utils__/TEST_DATA__LakehouseContractData.d.ts.map +1 -0
- package/lib/components/__test-utils__/TEST_DATA__LakehouseContractData.js +231 -0
- package/lib/components/__test-utils__/TEST_DATA__LakehouseContractData.js.map +1 -0
- package/lib/components/__test-utils__/TEST_DATA__LakehouseDataProducts.d.ts +71 -0
- package/lib/components/__test-utils__/TEST_DATA__LakehouseDataProducts.d.ts.map +1 -0
- package/lib/components/__test-utils__/TEST_DATA__LakehouseDataProducts.js +316 -0
- package/lib/components/__test-utils__/TEST_DATA__LakehouseDataProducts.js.map +1 -0
- package/lib/index.css +17 -0
- package/lib/index.css.map +1 -0
- package/lib/index.d.ts +32 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +32 -0
- package/lib/index.js.map +1 -0
- package/lib/package.json +95 -0
- package/lib/stores/BaseLayoutState.d.ts +35 -0
- package/lib/stores/BaseLayoutState.d.ts.map +1 -0
- package/lib/stores/BaseLayoutState.js +166 -0
- package/lib/stores/BaseLayoutState.js.map +1 -0
- package/lib/stores/BaseViewerState.d.ts +33 -0
- package/lib/stores/BaseViewerState.d.ts.map +1 -0
- package/lib/stores/BaseViewerState.js +27 -0
- package/lib/stores/BaseViewerState.js.map +1 -0
- package/lib/stores/DataProduct/DataProductAPGState.d.ts +62 -0
- package/lib/stores/DataProduct/DataProductAPGState.d.ts.map +1 -0
- package/lib/stores/DataProduct/DataProductAPGState.js +222 -0
- package/lib/stores/DataProduct/DataProductAPGState.js.map +1 -0
- package/lib/stores/DataProduct/DataProductDataAccessState.d.ts +66 -0
- package/lib/stores/DataProduct/DataProductDataAccessState.d.ts.map +1 -0
- package/lib/stores/DataProduct/DataProductDataAccessState.js +191 -0
- package/lib/stores/DataProduct/DataProductDataAccessState.js.map +1 -0
- package/lib/stores/DataProduct/DataProductViewerState.d.ts +40 -0
- package/lib/stores/DataProduct/DataProductViewerState.d.ts.map +1 -0
- package/lib/stores/DataProduct/DataProductViewerState.js +60 -0
- package/lib/stores/DataProduct/DataProductViewerState.js.map +1 -0
- package/lib/stores/DataProduct/EntitlementsDataContractViewerState.d.ts +31 -0
- package/lib/stores/DataProduct/EntitlementsDataContractViewerState.d.ts.map +1 -0
- package/lib/stores/DataProduct/EntitlementsDataContractViewerState.js +57 -0
- package/lib/stores/DataProduct/EntitlementsDataContractViewerState.js.map +1 -0
- package/lib/stores/DataProductDataAccess_LegendApplicationPlugin_Extension.d.ts +33 -0
- package/lib/stores/DataProductDataAccess_LegendApplicationPlugin_Extension.d.ts.map +1 -0
- package/lib/stores/DataProductDataAccess_LegendApplicationPlugin_Extension.js +17 -0
- package/lib/stores/DataProductDataAccess_LegendApplicationPlugin_Extension.js.map +1 -0
- package/lib/stores/ProductViewerNavigation.d.ts +29 -0
- package/lib/stores/ProductViewerNavigation.d.ts.map +1 -0
- package/lib/stores/ProductViewerNavigation.js +35 -0
- package/lib/stores/ProductViewerNavigation.js.map +1 -0
- package/lib/stores/TerminalProduct/TerminalProductViewerState.d.ts +25 -0
- package/lib/stores/TerminalProduct/TerminalProductViewerState.d.ts.map +1 -0
- package/lib/stores/TerminalProduct/TerminalProductViewerState.js +32 -0
- package/lib/stores/TerminalProduct/TerminalProductViewerState.js.map +1 -0
- package/lib/utils/DataContractUtils.d.ts +23 -0
- package/lib/utils/DataContractUtils.d.ts.map +1 -0
- package/lib/utils/DataContractUtils.js +76 -0
- package/lib/utils/DataContractUtils.js.map +1 -0
- package/lib/utils/LakehouseUtils.d.ts +21 -0
- package/lib/utils/LakehouseUtils.d.ts.map +1 -0
- package/lib/utils/LakehouseUtils.js +72 -0
- package/lib/utils/LakehouseUtils.js.map +1 -0
- package/package.json +95 -0
- package/src/__lib__/DSL_DataProduct_Event.ts +19 -0
- package/src/components/Core_DataProductDataAccess_LegendApplicationPlugin.tsx +233 -0
- package/src/components/DataProduct/DataContract/EntitlementsDataContractCreator.tsx +182 -0
- package/src/components/DataProduct/DataContract/EntitlementsDataContractViewer.tsx +586 -0
- package/src/components/DataProduct/DataProductDataAccess.tsx +767 -0
- package/src/components/DataProduct/DataProductSupportInfo.tsx +195 -0
- package/src/components/DataProduct/Subscriptions/DataProductSubscriptionsViewer.tsx +602 -0
- package/src/components/ProductViewer.tsx +287 -0
- package/src/components/ProductWiki.tsx +196 -0
- package/src/components/TerminalProduct/TerminalProductPrice.tsx +56 -0
- package/src/components/UserRenderer/MultiUserRenderer.tsx +89 -0
- package/src/components/UserRenderer/UserRenderer.tsx +100 -0
- package/src/components/__test-utils__/StateTestUtils.ts +170 -0
- package/src/components/__test-utils__/TEST_DATA__LakehouseContractData.ts +253 -0
- package/src/components/__test-utils__/TEST_DATA__LakehouseDataProducts.ts +343 -0
- package/src/index.ts +34 -0
- package/src/stores/BaseLayoutState.ts +220 -0
- package/src/stores/BaseViewerState.ts +75 -0
- package/src/stores/DataProduct/DataProductAPGState.ts +385 -0
- package/src/stores/DataProduct/DataProductDataAccessState.ts +354 -0
- package/src/stores/DataProduct/DataProductViewerState.ts +100 -0
- package/src/stores/DataProduct/EntitlementsDataContractViewerState.ts +83 -0
- package/src/stores/DataProductDataAccess_LegendApplicationPlugin_Extension.ts +38 -0
- package/src/stores/ProductViewerNavigation.ts +48 -0
- package/src/stores/TerminalProduct/TerminalProductViewerState.ts +43 -0
- package/src/utils/DataContractUtils.ts +121 -0
- package/src/utils/LakehouseUtils.ts +91 -0
- package/tsconfig.json +91 -0
- package/tsconfig.package.json +56 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
AnchorLinkIcon,
|
|
19
|
+
DocumentIcon,
|
|
20
|
+
EnvelopeOutlineIcon,
|
|
21
|
+
ExternalLinkIcon,
|
|
22
|
+
HeadsetIcon,
|
|
23
|
+
QuestionCircleOutlineIcon,
|
|
24
|
+
WorldOutlineIcon,
|
|
25
|
+
} from '@finos/legend-art';
|
|
26
|
+
import { observer } from 'mobx-react-lite';
|
|
27
|
+
import { useEffect, useRef } from 'react';
|
|
28
|
+
import { Box, Grid2 as Grid, Link } from '@mui/material';
|
|
29
|
+
import type { DataProductViewerState } from '../../stores/DataProduct/DataProductViewerState.js';
|
|
30
|
+
import {
|
|
31
|
+
generateAnchorForSection,
|
|
32
|
+
DATA_PRODUCT_VIEWER_SECTION,
|
|
33
|
+
} from '../../stores/ProductViewerNavigation.js';
|
|
34
|
+
import { ProductWikiPlaceholder } from '../ProductWiki.js';
|
|
35
|
+
|
|
36
|
+
export const DataProductSupportInfo = observer(
|
|
37
|
+
(props: { dataProductViewerState: DataProductViewerState }) => {
|
|
38
|
+
const { dataProductViewerState } = props;
|
|
39
|
+
const sectionRef = useRef<HTMLDivElement>(null);
|
|
40
|
+
|
|
41
|
+
const anchor = generateAnchorForSection(
|
|
42
|
+
DATA_PRODUCT_VIEWER_SECTION.SUPPORT_INFO,
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const supportInfo = dataProductViewerState.product.supportInfo;
|
|
46
|
+
const doesSupportInfoExist =
|
|
47
|
+
supportInfo !== undefined &&
|
|
48
|
+
(supportInfo.emails.length > 0 ||
|
|
49
|
+
supportInfo.documentation ||
|
|
50
|
+
supportInfo.website ||
|
|
51
|
+
supportInfo.faqUrl ||
|
|
52
|
+
supportInfo.supportUrl);
|
|
53
|
+
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (sectionRef.current) {
|
|
56
|
+
dataProductViewerState.layoutState.setWikiPageAnchor(
|
|
57
|
+
anchor,
|
|
58
|
+
sectionRef.current,
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
return () =>
|
|
62
|
+
dataProductViewerState.layoutState.unsetWikiPageAnchor(anchor);
|
|
63
|
+
}, [dataProductViewerState, anchor]);
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<div ref={sectionRef} className="data-product__viewer__wiki__section">
|
|
67
|
+
<div className="data-product__viewer__wiki__section__header">
|
|
68
|
+
<div className="data-product__viewer__wiki__section__header__label">
|
|
69
|
+
Support
|
|
70
|
+
<button
|
|
71
|
+
className="data-product__viewer__wiki__section__header__anchor"
|
|
72
|
+
tabIndex={-1}
|
|
73
|
+
onClick={() => dataProductViewerState.changeZone(anchor, true)}
|
|
74
|
+
>
|
|
75
|
+
<AnchorLinkIcon />
|
|
76
|
+
</button>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
<div className="data-product__viewer__wiki__section__content">
|
|
80
|
+
{doesSupportInfoExist ? (
|
|
81
|
+
<Grid
|
|
82
|
+
container={true}
|
|
83
|
+
spacing={3}
|
|
84
|
+
columns={2}
|
|
85
|
+
className="data-product__viewer__support-info_container"
|
|
86
|
+
>
|
|
87
|
+
{supportInfo.emails.length > 0 && (
|
|
88
|
+
<Grid
|
|
89
|
+
size={1}
|
|
90
|
+
className="data-product__viewer__support-info__section"
|
|
91
|
+
>
|
|
92
|
+
<Box className="data-product__viewer__support-info__section__icon">
|
|
93
|
+
<EnvelopeOutlineIcon />
|
|
94
|
+
</Box>
|
|
95
|
+
{supportInfo.emails.map((email, index) => (
|
|
96
|
+
<>
|
|
97
|
+
<Link
|
|
98
|
+
key={email.address}
|
|
99
|
+
className="data-product__viewer__support-info__link"
|
|
100
|
+
href={`mailto:${email.address}`}
|
|
101
|
+
>
|
|
102
|
+
{email.title}
|
|
103
|
+
<ExternalLinkIcon />
|
|
104
|
+
</Link>
|
|
105
|
+
{index < supportInfo.emails.length - 1 ? ', ' : null}
|
|
106
|
+
</>
|
|
107
|
+
))}
|
|
108
|
+
</Grid>
|
|
109
|
+
)}
|
|
110
|
+
{supportInfo.documentation !== undefined && (
|
|
111
|
+
<Grid
|
|
112
|
+
size={1}
|
|
113
|
+
className="data-product__viewer__support-info__section"
|
|
114
|
+
>
|
|
115
|
+
<Box className="data-product__viewer__support-info__section__icon">
|
|
116
|
+
<DocumentIcon />
|
|
117
|
+
</Box>
|
|
118
|
+
<Link
|
|
119
|
+
className="data-product__viewer__support-info__link"
|
|
120
|
+
href={supportInfo.documentation.url}
|
|
121
|
+
target="_blank"
|
|
122
|
+
rel="noopener noreferrer"
|
|
123
|
+
>
|
|
124
|
+
{supportInfo.documentation.label ??
|
|
125
|
+
supportInfo.documentation.url}
|
|
126
|
+
<ExternalLinkIcon />
|
|
127
|
+
</Link>
|
|
128
|
+
</Grid>
|
|
129
|
+
)}
|
|
130
|
+
{supportInfo.supportUrl !== undefined && (
|
|
131
|
+
<Grid
|
|
132
|
+
size={1}
|
|
133
|
+
className="data-product__viewer__support-info__section"
|
|
134
|
+
>
|
|
135
|
+
<Box className="data-product__viewer__support-info__section__icon">
|
|
136
|
+
<HeadsetIcon />
|
|
137
|
+
</Box>
|
|
138
|
+
<Link
|
|
139
|
+
className="data-product__viewer__support-info__link"
|
|
140
|
+
href={supportInfo.supportUrl.url}
|
|
141
|
+
target="_blank"
|
|
142
|
+
rel="noopener noreferrer"
|
|
143
|
+
>
|
|
144
|
+
{supportInfo.supportUrl.label ?? supportInfo.supportUrl.url}
|
|
145
|
+
<ExternalLinkIcon />
|
|
146
|
+
</Link>
|
|
147
|
+
</Grid>
|
|
148
|
+
)}
|
|
149
|
+
{supportInfo.website !== undefined && (
|
|
150
|
+
<Grid
|
|
151
|
+
size={1}
|
|
152
|
+
className="data-product__viewer__support-info__section"
|
|
153
|
+
>
|
|
154
|
+
<Box className="data-product__viewer__support-info__section__icon">
|
|
155
|
+
<WorldOutlineIcon />
|
|
156
|
+
</Box>
|
|
157
|
+
<Link
|
|
158
|
+
className="data-product__viewer__support-info__link"
|
|
159
|
+
href={supportInfo.website.url}
|
|
160
|
+
target="_blank"
|
|
161
|
+
rel="noopener noreferrer"
|
|
162
|
+
>
|
|
163
|
+
{supportInfo.website.label ?? supportInfo.website.url}
|
|
164
|
+
<ExternalLinkIcon />
|
|
165
|
+
</Link>
|
|
166
|
+
</Grid>
|
|
167
|
+
)}
|
|
168
|
+
{supportInfo.faqUrl !== undefined && (
|
|
169
|
+
<Grid
|
|
170
|
+
size={1}
|
|
171
|
+
className="data-product__viewer__support-info__section"
|
|
172
|
+
>
|
|
173
|
+
<Box className="data-product__viewer__support-info__section__icon">
|
|
174
|
+
<QuestionCircleOutlineIcon />
|
|
175
|
+
</Box>
|
|
176
|
+
<Link
|
|
177
|
+
className="data-product__viewer__support-info__link"
|
|
178
|
+
href={supportInfo.faqUrl.url}
|
|
179
|
+
target="_blank"
|
|
180
|
+
rel="noopener noreferrer"
|
|
181
|
+
>
|
|
182
|
+
{supportInfo.faqUrl.label ?? supportInfo.faqUrl.url}
|
|
183
|
+
<ExternalLinkIcon />
|
|
184
|
+
</Link>
|
|
185
|
+
</Grid>
|
|
186
|
+
)}
|
|
187
|
+
</Grid>
|
|
188
|
+
) : (
|
|
189
|
+
<ProductWikiPlaceholder message="(support information not specified)" />
|
|
190
|
+
)}
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
);
|
|
194
|
+
},
|
|
195
|
+
);
|