@digi-frontend/dgate-api-documentation 1.0.12 → 1.0.14
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/_virtual/index3.js +1 -1
- package/dist/_virtual/index4.js +1 -1
- package/dist/_virtual/index5.js +1 -1
- package/dist/_virtual/index6.js +1 -1
- package/dist/node_modules/toposort/index.js +1 -1
- package/dist/node_modules/yup/index.esm.js +1 -1
- package/dist/src/components/InfoForm/InfoForm.js +1 -1
- package/dist/src/components/InfoForm/InfoForm.js.map +1 -1
- package/dist/src/components/LivePreview/LivePreview.js +1 -1
- package/dist/src/components/LivePreview/LivePreview.js.map +1 -1
- package/dist/src/components/table/tags-table.js +1 -1
- package/dist/src/components/table/tags-table.js.map +1 -1
- package/dist/styles.css +454 -454
- package/package.json +1 -1
- package/src/components/InfoForm/InfoForm.tsx +1 -0
- package/src/components/LivePreview/LivePreview.tsx +23 -75
- package/src/components/table/tags-table.tsx +5 -8
package/package.json
CHANGED
|
@@ -29,7 +29,6 @@ const LivePreview: React.FC<LivePreviewProps> = ({ transformedData }) => {
|
|
|
29
29
|
: null
|
|
30
30
|
|
|
31
31
|
useEffect(() => {
|
|
32
|
-
console.log({updated: values.tags})
|
|
33
32
|
if (values.tags && values.tags.length) {
|
|
34
33
|
setTableRecords(generateTableData(values.tags, true))
|
|
35
34
|
setTableData(values.tags)
|
|
@@ -42,79 +41,24 @@ const LivePreview: React.FC<LivePreviewProps> = ({ transformedData }) => {
|
|
|
42
41
|
tagName: item.name,
|
|
43
42
|
description: (
|
|
44
43
|
<div className={styles.paramDescContainer}>
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
trigger="click"
|
|
50
|
-
delay={[0, 0]}
|
|
51
|
-
onCreate={(instance) =>
|
|
52
|
-
setTooltipRefs((prev) => ({
|
|
53
|
-
...prev,
|
|
54
|
-
[index]: instance,
|
|
55
|
-
}))
|
|
56
|
-
}
|
|
57
|
-
content={
|
|
58
|
-
<div className={styles.editDescTooltipContent}>
|
|
59
|
-
<p className={styles.editDescTooltipContent_header}>Description</p>
|
|
60
|
-
<TextArea
|
|
61
|
-
placeholder="Describe parameter..."
|
|
62
|
-
value={item.description}
|
|
63
|
-
disabled={readOnly}
|
|
64
|
-
onChange={(value) => null}
|
|
65
|
-
/>
|
|
66
|
-
</div>
|
|
67
|
-
}
|
|
68
|
-
>
|
|
69
|
-
<Button className={styles.editDescBtn} variant="link" color="action">
|
|
70
|
-
{item.description ? item.description.substring(0, 12) : '-'}
|
|
71
|
-
{item.description && item.description.length > 12 ? '...' : ''}
|
|
72
|
-
</Button>
|
|
73
|
-
</Tooltip>
|
|
44
|
+
<Button className={styles.editDescBtn} variant="link" color="action">
|
|
45
|
+
{item.description ? item.description.substring(0, 12) : '-'}
|
|
46
|
+
{item.description && item.description.length > 12 ? '...' : ''}
|
|
47
|
+
</Button>
|
|
74
48
|
</div>
|
|
75
49
|
),
|
|
76
50
|
externalDocs: (
|
|
77
51
|
<div className={styles.paramDescContainer}>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
placement="bottom-end"
|
|
81
|
-
type="function"
|
|
82
|
-
trigger="click"
|
|
83
|
-
delay={[0, 0]}
|
|
84
|
-
onCreate={(instance) =>
|
|
85
|
-
setExternalTooltipRefs((prev) => ({
|
|
86
|
-
...prev,
|
|
87
|
-
[index]: instance,
|
|
88
|
-
}))
|
|
89
|
-
}
|
|
90
|
-
content={
|
|
91
|
-
<div className={styles.editDescTooltipContent}>
|
|
92
|
-
<p className={styles.editDescTooltipContent_header}>External Docs Description</p>
|
|
93
|
-
<TextArea
|
|
94
|
-
placeholder="Describe External Doc..."
|
|
95
|
-
value={item.externalDocs?.description}
|
|
96
|
-
disabled={readOnly}
|
|
97
|
-
onChange={(value) => null}
|
|
98
|
-
/>
|
|
99
|
-
<p className={styles.editDescTooltipContent_header}>External Docs Link</p>
|
|
100
|
-
<TextArea
|
|
101
|
-
placeholder="External Docs Link..."
|
|
102
|
-
value={item.externalDocs?.url}
|
|
103
|
-
disabled={readOnly}
|
|
104
|
-
onChange={(value) => null}
|
|
105
|
-
/>
|
|
106
|
-
</div>
|
|
107
|
-
}
|
|
108
|
-
>
|
|
109
|
-
<Button
|
|
52
|
+
{item.externalDocs && item.externalDocs.url && item.externalDocs.url != '-' ? (
|
|
53
|
+
<a
|
|
110
54
|
className={styles.editDescBtn}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
55
|
+
href={
|
|
56
|
+
item.externalDocs?.url && item.externalDocs?.url.indexOf('http') > -1
|
|
57
|
+
? item.externalDocs?.url
|
|
58
|
+
: `https://${item.externalDocs?.url}`
|
|
59
|
+
}
|
|
60
|
+
rel="noopener noreferrer"
|
|
61
|
+
target="_blank"
|
|
118
62
|
>
|
|
119
63
|
{item?.externalDocs?.description
|
|
120
64
|
? item?.externalDocs?.description?.substring(0, 12)
|
|
@@ -122,8 +66,15 @@ const LivePreview: React.FC<LivePreviewProps> = ({ transformedData }) => {
|
|
|
122
66
|
{item?.externalDocs?.description && item?.externalDocs?.description?.length > 12
|
|
123
67
|
? '...'
|
|
124
68
|
: ''}
|
|
69
|
+
</a>
|
|
70
|
+
) : (
|
|
71
|
+
<Button className={styles.editDescBtn} variant="link" color="action">
|
|
72
|
+
{item.description ? item.description.substring(0, 12) : '-'}
|
|
73
|
+
{item.description && item.description.length > 12 ? '...' : ''}
|
|
125
74
|
</Button>
|
|
126
|
-
|
|
75
|
+
)}
|
|
76
|
+
|
|
77
|
+
{/* </Tooltip> */}
|
|
127
78
|
|
|
128
79
|
{!readOnly && <div className={styles.paramDescContainer_separator}></div>}
|
|
129
80
|
|
|
@@ -156,12 +107,9 @@ const LivePreview: React.FC<LivePreviewProps> = ({ transformedData }) => {
|
|
|
156
107
|
value={info?.description || '-'}
|
|
157
108
|
/>
|
|
158
109
|
|
|
159
|
-
<SimpleLabelValue
|
|
160
|
-
key={'tags'}
|
|
161
|
-
label={'Tags: '}
|
|
162
|
-
/>
|
|
110
|
+
<SimpleLabelValue key={'tags'} label={'Tags: '} />
|
|
163
111
|
<TagsTable
|
|
164
|
-
|
|
112
|
+
id="tags-table"
|
|
165
113
|
data={tableRecords}
|
|
166
114
|
headCells={tagsTableHeaders}
|
|
167
115
|
isFormOpen={false}
|
|
@@ -216,16 +216,13 @@ const TagsTable = ({ id, headCells, data, isFormOpen, setIsFormOpen, saveNewRow,
|
|
|
216
216
|
}
|
|
217
217
|
>
|
|
218
218
|
{readOnly ? (
|
|
219
|
-
<
|
|
219
|
+
<a
|
|
220
220
|
className={_styles.editDescBtn}
|
|
221
221
|
variant="link"
|
|
222
222
|
color="action"
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
a.target = '_blank'
|
|
227
|
-
a.click()
|
|
228
|
-
}}
|
|
223
|
+
href={values.externalDocs?.url}
|
|
224
|
+
target='_blank'
|
|
225
|
+
|
|
229
226
|
>
|
|
230
227
|
{values?.externalDocs?.description
|
|
231
228
|
? values?.externalDocs?.description?.substring(0, 12)
|
|
@@ -234,7 +231,7 @@ const TagsTable = ({ id, headCells, data, isFormOpen, setIsFormOpen, saveNewRow,
|
|
|
234
231
|
values?.externalDocs?.description?.length > 12
|
|
235
232
|
? '...'
|
|
236
233
|
: ''}
|
|
237
|
-
</
|
|
234
|
+
</a>
|
|
238
235
|
) : (
|
|
239
236
|
<Button
|
|
240
237
|
className={_styles.editDescBtn}
|