@topconsultnpm/sdkui-react-beta 6.6.1 → 6.6.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/lib/components/base/TMContextMenu.d.ts +20 -21
- package/lib/components/base/TMContextMenu.js +101 -48
- package/lib/components/base/TMContextMenuOLD.d.ts +26 -0
- package/lib/components/base/TMContextMenuOLD.js +56 -0
- package/lib/components/base/TMListView.d.ts +22 -21
- package/lib/components/base/TMListView.js +245 -282
- package/lib/components/base/TMListViewOLD.d.ts +24 -0
- package/lib/components/base/TMListViewOLD.js +321 -0
- package/lib/components/editors/TMTextArea.js +1 -1
- package/lib/components/editors/TMTextBox.js +1 -1
- package/lib/components/index.d.ts +3 -2
- package/lib/components/index.js +3 -2
- package/lib/components/query/TMQueryEditor.d.ts +38 -2
- package/lib/components/query/TMQueryEditor.js +189 -178
- package/lib/components/query/TMQueryResult.d.ts +4 -2
- package/lib/components/query/TMQueryResult.js +8 -9
- package/lib/components/query/TMQueryResultForm.d.ts +33 -0
- package/lib/components/query/TMQueryResultForm.js +362 -0
- package/lib/components/sidebar/TMHeader.d.ts +3 -1
- package/lib/components/sidebar/TMHeader.js +22 -106
- package/package.json +1 -1
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { Colors, FontSize } from '../../utils/theme';
|
|
5
|
+
import { getColor } from '../../helper/helpers';
|
|
6
|
+
import { IconCloseCircle, IconDown, IconInsertAbove, IconInsertBelow, IconSearch, IconUp } from '../../helper';
|
|
7
|
+
const StyledContainer = styled.div `
|
|
8
|
+
z-index: -1;
|
|
9
|
+
border: 1px solid;
|
|
10
|
+
border-color: ${props => getColor(props.$color)} ;
|
|
11
|
+
overflow: auto;
|
|
12
|
+
max-height: ${props => props.$maxHight};
|
|
13
|
+
`;
|
|
14
|
+
const StyledListViewWrapper = styled.div `
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
justify-content: flex-start;
|
|
18
|
+
align-items: flex-start;
|
|
19
|
+
font-size: ${props => props.$fontSize} ;
|
|
20
|
+
`;
|
|
21
|
+
const StyledListItemContainer = styled.div `
|
|
22
|
+
display: flex;
|
|
23
|
+
width: 100%;
|
|
24
|
+
flex-direction: row;
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
align-items: center;
|
|
27
|
+
padding: 5px;
|
|
28
|
+
background-color: ${props => !props.$isSelected ? props.$index % 2 === 0 ? 'white' : Colors.colore_sul_primary : Colors.secondary};
|
|
29
|
+
font-size: ${props => props.$fontSize};
|
|
30
|
+
color: ${props => !props.$isSelected ? Colors.primary : 'white'};
|
|
31
|
+
z-index: 1;
|
|
32
|
+
`;
|
|
33
|
+
const StyledLsitItemCheck = styled.input `
|
|
34
|
+
margin-right: 5px;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
`;
|
|
37
|
+
const StyledListItem = styled.li `
|
|
38
|
+
padding: 3px;
|
|
39
|
+
list-style: none;
|
|
40
|
+
text-decoration: none;
|
|
41
|
+
color: ${props => props.$color};
|
|
42
|
+
`;
|
|
43
|
+
const StyledListViewItemDetails = styled.div `
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
align-items: flex-start;
|
|
47
|
+
justify-content: flex-start;
|
|
48
|
+
padding: 5px;
|
|
49
|
+
background-color: ${Colors.contenitore_su_colore_primary};
|
|
50
|
+
color: white;
|
|
51
|
+
width: 100%;
|
|
52
|
+
`;
|
|
53
|
+
const StyledDetailsToggleButton = styled.button `
|
|
54
|
+
border: none;
|
|
55
|
+
background-color: transparent;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
color: ${props => props.$isSelected ? 'white' : Colors.primary};
|
|
58
|
+
`;
|
|
59
|
+
const StyledListViewSearchContainer = styled.div `
|
|
60
|
+
position: sticky;
|
|
61
|
+
padding: 5px;
|
|
62
|
+
top: 0px;
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: row;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: flex-start;
|
|
67
|
+
padding-bottom: 5px;
|
|
68
|
+
border-bottom: 1px solid ${props => getColor(props.$color)};
|
|
69
|
+
background-color: ${props => getColor(props.$color)};
|
|
70
|
+
z-index: 100;
|
|
71
|
+
`;
|
|
72
|
+
const StyledSelectOptionCheckBox = styled.input `
|
|
73
|
+
margin-right: 5px;
|
|
74
|
+
margin-left: 2px;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
width: 20px;
|
|
77
|
+
height: 20px;
|
|
78
|
+
`;
|
|
79
|
+
const StyledListViewSearchInput = styled.input `
|
|
80
|
+
width: 100%;
|
|
81
|
+
padding: 3px 10px;
|
|
82
|
+
border-radius: 5px;
|
|
83
|
+
border-width: 1px ;
|
|
84
|
+
border-color: ${props => getColor(props.$color)};
|
|
85
|
+
border-style: solid;
|
|
86
|
+
color: ${props => getColor(props.$color)};
|
|
87
|
+
&::placeholder{
|
|
88
|
+
color: ${props => getColor(props.$color)};
|
|
89
|
+
}
|
|
90
|
+
&:focus{
|
|
91
|
+
outline: none;
|
|
92
|
+
background-color: #fbf5ca;
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
95
|
+
const StyledListViewSearchIcon = styled.button `
|
|
96
|
+
background-color: transparent;
|
|
97
|
+
border: none;
|
|
98
|
+
cursor: ${props => props.$isSearch ? 'pointer' : 'default'};
|
|
99
|
+
color: ${props => getColor(props.$color)};
|
|
100
|
+
position: absolute;
|
|
101
|
+
right: 10px;
|
|
102
|
+
top: 10px;
|
|
103
|
+
&:focus{
|
|
104
|
+
outline: ${props => !props.$isSearch && 'none'};
|
|
105
|
+
}
|
|
106
|
+
`;
|
|
107
|
+
const StyledListViewFooter = styled.div `
|
|
108
|
+
z-index: 100;
|
|
109
|
+
position: sticky;
|
|
110
|
+
bottom: 0px;
|
|
111
|
+
width: 100%;
|
|
112
|
+
padding: 5px;
|
|
113
|
+
background-color: ${props => getColor(props.$color)};
|
|
114
|
+
color: white;
|
|
115
|
+
font-size: 1rem;
|
|
116
|
+
`;
|
|
117
|
+
const StyledShowHideDetailsButton = styled.button `
|
|
118
|
+
background-color: transparent;
|
|
119
|
+
border: none;
|
|
120
|
+
margin-right: 10px;
|
|
121
|
+
/* color: ${props => getColor(props.$color)}; */
|
|
122
|
+
color: white;
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
transform: translateY(1.5px);
|
|
125
|
+
`;
|
|
126
|
+
const TMListViewOLD = ({ maxHeight = '100%', selectedValues = [], color = 'primary', footer = false, header = false, customItemDetails, customListViewItem, hasItemDetails = false, detailsFields, dataSource, displayField, searchable, elementStyle, selectedListItems, multipleSelect = false, fontSize = FontSize.defaultFontSize }) => {
|
|
127
|
+
const [focusedItem, setFocusedItem] = useState(undefined);
|
|
128
|
+
const [selectedItems, setSelectedItems] = useState([]);
|
|
129
|
+
const [detailRequestItems, setDetailRequestItems] = useState([]);
|
|
130
|
+
const [currentDetailsFields, setCurrentDetailsField] = useState(detailsFields);
|
|
131
|
+
const [searchValue, setSearchValue] = useState('');
|
|
132
|
+
const [currentDataSource, setCurrentDataSource] = useState([]);
|
|
133
|
+
const [usedFields, setUsedFields] = useState([]);
|
|
134
|
+
useEffect(() => {
|
|
135
|
+
if (!selectedValues.fieldName) {
|
|
136
|
+
setSelectedItems(selectedValues);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
let data = [];
|
|
140
|
+
for (let value of selectedValues.fieldValues) {
|
|
141
|
+
for (let d of currentDataSource) {
|
|
142
|
+
if (value === d[selectedValues.fieldName]) {
|
|
143
|
+
data.push(d);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
setSelectedItems(data);
|
|
148
|
+
}
|
|
149
|
+
}, [currentDataSource]);
|
|
150
|
+
useEffect(() => { selectedListItems && selectedListItems(selectedItems); }, [selectedItems]);
|
|
151
|
+
useEffect(() => {
|
|
152
|
+
const selectByKey = (e) => { if (e.code === 'Space' && focusedItem) {
|
|
153
|
+
onListItemClick();
|
|
154
|
+
} };
|
|
155
|
+
window.addEventListener('keyup', selectByKey);
|
|
156
|
+
return () => window.removeEventListener('keyup', selectByKey);
|
|
157
|
+
}, [focusedItem, selectedItems]);
|
|
158
|
+
useEffect(() => {
|
|
159
|
+
let arr = [];
|
|
160
|
+
if (customListViewItem) {
|
|
161
|
+
for (let key of Object.keys(customListViewItem.props)) {
|
|
162
|
+
arr.push(customListViewItem.props[key]);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
arr.push(displayField);
|
|
167
|
+
}
|
|
168
|
+
if (customItemDetails) {
|
|
169
|
+
for (let key of Object.keys(customItemDetails.props)) {
|
|
170
|
+
arr.push(customItemDetails.props[key]);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
else if (currentDetailsFields) {
|
|
174
|
+
for (let field of currentDetailsFields) {
|
|
175
|
+
arr.push(field);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
setUsedFields(arr);
|
|
179
|
+
}, [customItemDetails, customListViewItem, displayField, detailsFields]);
|
|
180
|
+
useEffect(() => {
|
|
181
|
+
if (hasItemDetails) {
|
|
182
|
+
let keys = Object.keys(dataSource[0]);
|
|
183
|
+
if (!displayField) {
|
|
184
|
+
let detailsKeys = keys.filter(key => key !== displayField);
|
|
185
|
+
if (!detailsFields) {
|
|
186
|
+
setCurrentDetailsField(detailsKeys);
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
setCurrentDetailsField(detailsFields);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
if (!detailsFields) {
|
|
194
|
+
setCurrentDetailsField(keys);
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
setCurrentDetailsField(detailsFields);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}, [hasItemDetails, detailsFields, displayField]);
|
|
202
|
+
useEffect(() => {
|
|
203
|
+
if (searchable) {
|
|
204
|
+
if (searchValue.length > 0) {
|
|
205
|
+
filter(dataSource, searchValue);
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
setCurrentDataSource(dataSource);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
setCurrentDataSource(dataSource);
|
|
213
|
+
}
|
|
214
|
+
}, [dataSource, searchValue, searchable]);
|
|
215
|
+
const showHideDetails = () => {
|
|
216
|
+
if (detailRequestItems.length > 0) {
|
|
217
|
+
setDetailRequestItems([]);
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
setDetailRequestItems(currentDataSource);
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
const filter = (dataSource, value) => {
|
|
224
|
+
let arr = [];
|
|
225
|
+
for (let data of dataSource) {
|
|
226
|
+
if (typeof data === 'string') {
|
|
227
|
+
setCurrentDataSource(dataSource.filter(item => item.toString().toLowerCase().includes(value.toLowerCase())));
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
for (let key of usedFields) {
|
|
231
|
+
if (data[key].toString().toLowerCase().includes(value.toLowerCase())) {
|
|
232
|
+
if (!arr.includes(data)) {
|
|
233
|
+
arr.push(data);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
;
|
|
238
|
+
setCurrentDataSource(arr);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
const onListItemClick = () => {
|
|
243
|
+
if (multipleSelect) {
|
|
244
|
+
if (!hasItem(selectedItems, focusedItem)) {
|
|
245
|
+
setSelectedItems(prev => [...prev, focusedItem]);
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
(setSelectedItems(selectedItems.filter(item => JSON.stringify(item) !== JSON.stringify(focusedItem))));
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
setSelectedItems([]);
|
|
253
|
+
setSelectedItems(prev => [...prev, focusedItem]);
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
const onCheckClick = () => { if (hasItem(selectedItems, focusedItem)) {
|
|
257
|
+
setSelectedItems(selectedItems.filter(item => JSON.stringify(item) !== JSON.stringify(focusedItem)));
|
|
258
|
+
} };
|
|
259
|
+
const detailsToggle = (e) => {
|
|
260
|
+
if (detailRequestItems.includes(focusedItem)) {
|
|
261
|
+
setDetailRequestItems(detailRequestItems.filter(item => item !== focusedItem));
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
setDetailRequestItems(prev => [...prev, focusedItem]);
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
const obj = (data, type) => {
|
|
268
|
+
let object = {};
|
|
269
|
+
switch (type) {
|
|
270
|
+
case 'item':
|
|
271
|
+
for (let key of Object.keys(customListViewItem?.props)) {
|
|
272
|
+
object[key] = data[customListViewItem?.props[key]];
|
|
273
|
+
}
|
|
274
|
+
break;
|
|
275
|
+
case 'details':
|
|
276
|
+
for (let key of Object.keys(customItemDetails?.props)) {
|
|
277
|
+
object[key] = data[customItemDetails?.props[key]];
|
|
278
|
+
}
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
return object;
|
|
282
|
+
};
|
|
283
|
+
const hasItem = (arr, el) => {
|
|
284
|
+
let bool = false;
|
|
285
|
+
for (let item of arr) {
|
|
286
|
+
if (typeof item === 'string') {
|
|
287
|
+
if (item === el) {
|
|
288
|
+
bool = true;
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
bool = false;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
if (JSON.stringify(item) == JSON.stringify(el)) {
|
|
297
|
+
bool = true;
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
bool = false;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
return bool;
|
|
306
|
+
};
|
|
307
|
+
const selectDeselectAll = () => { if (selectedItems.length > 0) {
|
|
308
|
+
setSelectedItems([]);
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
setSelectedItems(currentDataSource);
|
|
312
|
+
} };
|
|
313
|
+
const renderedList = () => {
|
|
314
|
+
return (currentDataSource?.map((d, index) => (_jsxs(StyledListViewWrapper, { "$fontSize": fontSize, children: [_jsxs(StyledListItemContainer, { "$isFocused": focusedItem === d, "$isSelected": hasItem(selectedItems, d), "$fontSize": fontSize, tabIndex: 0, "$index": index, onFocus: () => setFocusedItem(d), children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', width: '100%' }, onClick: onListItemClick, children: [multipleSelect && _jsx(StyledLsitItemCheck, { checked: hasItem(selectedItems, d), onChange: onCheckClick, tabIndex: -1, type: "checkbox" }), !customListViewItem ? _jsx(StyledListItem, { "$color": color, children: displayField ? d[displayField] : d }) : React.cloneElement(customListViewItem, obj(d, 'item'))] }), hasItemDetails && _jsx(StyledDetailsToggleButton, { "$isSelected": hasItem(selectedItems, d), onClick: (e) => detailsToggle(e), children: detailRequestItems.includes(d) ? _jsx(IconUp, {}) : _jsx(IconDown, {}) })] }), detailRequestItems.includes(d) && _jsxs(StyledListViewItemDetails, { children: [" ", !customItemDetails ? currentDetailsFields.map((detail, index) => (_jsxs("div", { children: [detail, ": ", d[detail]] }, index))) : React.cloneElement(customItemDetails, obj(d, 'details')), " "] })] }, index))));
|
|
315
|
+
};
|
|
316
|
+
const renderedHeader = () => {
|
|
317
|
+
return (_jsxs(StyledListViewSearchContainer, { "$color": color, children: [multipleSelect && _jsx(StyledSelectOptionCheckBox, { "$color": color, "$fontsize": fontSize, type: 'checkbox', checked: selectedItems.length > 0, onChange: selectDeselectAll }), hasItemDetails && _jsx(StyledShowHideDetailsButton, { "$color": color, onClick: showHideDetails, children: detailRequestItems.length > 0 ? _jsx(IconInsertBelow, {}) : _jsx(IconInsertAbove, {}) }), searchable && _jsx(StyledListViewSearchInput, { "$color": color, value: searchValue, onChange: (e) => setSearchValue(e.target.value), placeholder: 'search' }), searchable && _jsx(StyledListViewSearchIcon, { onClick: () => searchValue.length > 0 && setSearchValue(''), "$isSearch": searchValue.length > 0, "$color": color, children: searchValue.length > 0 ? _jsx(IconCloseCircle, {}) : _jsx(IconSearch, {}) })] }));
|
|
318
|
+
};
|
|
319
|
+
return (_jsx("div", { style: elementStyle, children: _jsxs(StyledContainer, { "$maxHight": maxHeight, "$color": color, children: [" ", (searchable || multipleSelect) && renderedHeader(), " ", _jsx("ul", { children: renderedList() }), " ", multipleSelect && footer && _jsxs(StyledListViewFooter, { "$color": color, children: ["Selected items: ", selectedItems.length, " | Visible items: ", currentDataSource.length] })] }) }));
|
|
320
|
+
};
|
|
321
|
+
export default TMListViewOLD;
|
|
@@ -3,7 +3,7 @@ import { useState, useEffect, useRef } from 'react';
|
|
|
3
3
|
import { StyledEditorButtonIcon, StyledEditorContainer, StyledEditorIcon, StyledEditorLabel, StyledTextareaEditor } from './TMEditorStyled';
|
|
4
4
|
import { FontSize } from '../../utils/theme';
|
|
5
5
|
import { useWindowWidth } from '../../helper';
|
|
6
|
-
import TMContextMenu, { useContextMenu } from '../base/
|
|
6
|
+
import TMContextMenu, { useContextMenu } from '../base/TMContextMenuOLD';
|
|
7
7
|
import { TMExceptionBoxManager } from '../base/TMPopUp';
|
|
8
8
|
import TMLayoutContainer, { TMLayoutItem } from '../base/TMLayout';
|
|
9
9
|
import TMVilViewer from '../base/TMVilViewer';
|
|
@@ -4,7 +4,7 @@ import styled from 'styled-components';
|
|
|
4
4
|
import { StyledEditor, StyledEditorButtonIcon, StyledEditorContainer, StyledEditorIcon, StyledEditorLabel, editorColorManager } from './TMEditorStyled';
|
|
5
5
|
import { FontSize, TMColors } from '../../utils/theme';
|
|
6
6
|
import { IconHide, IconShow, useWindowWidth } from '../../helper';
|
|
7
|
-
import TMContextMenu, { useContextMenu } from '../base/
|
|
7
|
+
import TMContextMenu, { useContextMenu } from '../base/TMContextMenuOLD';
|
|
8
8
|
import ShowAlert from '../base/TMAlert';
|
|
9
9
|
import { TMExceptionBoxManager } from '../base/TMPopUp';
|
|
10
10
|
import TMLayoutContainer, { TMLayoutItem } from '../base/TMLayout';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { default as ShowAlert } from './base/TMAlert';
|
|
2
2
|
export { default as TMButton } from './base/TMButton';
|
|
3
3
|
export { default as TMClosableList } from './base/TMClosableList';
|
|
4
|
-
export * from './base/
|
|
4
|
+
export * from './base/TMContextMenuOLD';
|
|
5
5
|
export { default as TMDropDownMenu } from './base/TMDropDownMenu';
|
|
6
|
-
export { default as
|
|
6
|
+
export { default as TMListViewOLD } from './base/TMListViewOLD';
|
|
7
7
|
export { default as TMList } from './base/TMList';
|
|
8
8
|
export { default as TMModal } from './base/TMModal';
|
|
9
9
|
export * from './base/TMPopUp';
|
|
@@ -30,6 +30,7 @@ export * from './choosers/TMMetadataChooser';
|
|
|
30
30
|
export * from './choosers/TMUserChooser';
|
|
31
31
|
export { default as TMValidationItemsList } from './grids/TMValidationItemsList';
|
|
32
32
|
export * from './query/TMQueryEditor';
|
|
33
|
+
export * from './query/TMQueryResultForm';
|
|
33
34
|
export * from './base/TMTab';
|
|
34
35
|
export { default as TMHeader } from "./sidebar/TMHeader";
|
|
35
36
|
export { default as TMSidebar } from "./sidebar/TMSidebar";
|
package/lib/components/index.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
export { default as ShowAlert } from './base/TMAlert';
|
|
4
4
|
export { default as TMButton } from './base/TMButton';
|
|
5
5
|
export { default as TMClosableList } from './base/TMClosableList';
|
|
6
|
-
export * from './base/
|
|
6
|
+
export * from './base/TMContextMenuOLD';
|
|
7
7
|
export { default as TMDropDownMenu } from './base/TMDropDownMenu';
|
|
8
|
-
export { default as
|
|
8
|
+
export { default as TMListViewOLD } from './base/TMListViewOLD';
|
|
9
9
|
export { default as TMList } from './base/TMList';
|
|
10
10
|
export { default as TMModal } from './base/TMModal';
|
|
11
11
|
export * from './base/TMPopUp';
|
|
@@ -36,6 +36,7 @@ export * from './choosers/TMUserChooser';
|
|
|
36
36
|
export { default as TMValidationItemsList } from './grids/TMValidationItemsList';
|
|
37
37
|
//query
|
|
38
38
|
export * from './query/TMQueryEditor';
|
|
39
|
+
export * from './query/TMQueryResultForm';
|
|
39
40
|
//tab
|
|
40
41
|
export * from './base/TMTab';
|
|
41
42
|
// others
|
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryDescriptor, ValidationItem } from '@topconsultnpm/sdk-ts-beta';
|
|
2
|
+
import { MetadataDescriptor, QueryDescriptor, ValidationItem } from '@topconsultnpm/sdk-ts-beta';
|
|
3
3
|
import { ITMApplyFormProps, FormModes } from '../../ts';
|
|
4
|
+
import { DynDataListsToBeRefreshed } from '../choosers/TMDynDataListItemChooser';
|
|
5
|
+
export declare const StyledRowItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
|
+
export declare const StyledItemWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
7
|
+
$borderRadius?: string;
|
|
8
|
+
}>> & string;
|
|
9
|
+
export declare const StyledAccordionItemContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
|
+
export declare const StyledAccordionItemContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
11
|
+
$disabled?: boolean;
|
|
12
|
+
}>> & string;
|
|
13
|
+
export declare const colorValue = "rgba(224,224,224,.5)";
|
|
14
|
+
export declare const colorBrackets = "rgba(209,52,56,.3)";
|
|
15
|
+
export declare const colorOperator = "rgba(16,124,16,.3)";
|
|
16
|
+
export declare const color1 = "#F5DD9C";
|
|
17
|
+
export declare const color2 = "rgba(15,108,189,.3)";
|
|
18
|
+
export declare const color3 = "rgb(199, 236, 172)";
|
|
19
|
+
export declare const color4 = "rgb(223, 204, 251)";
|
|
20
|
+
export declare const color5 = "rgb(249, 181, 114)";
|
|
21
|
+
export declare const color6 = "rgb(170, 215, 217)";
|
|
22
|
+
export declare const color7 = "rgb(243, 208, 215)";
|
|
23
|
+
export declare const color8 = "rgb(236, 202, 156)";
|
|
24
|
+
export declare const color9 = "rgb(137, 185, 173)";
|
|
25
|
+
export declare const colorX = "rgb(246, 245, 242)";
|
|
4
26
|
export declare enum Descriptors {
|
|
5
27
|
Query = 3
|
|
6
28
|
}
|
|
@@ -14,7 +36,7 @@ export declare function useOrchApplyForm<T>(d: Descriptors, formMode: FormModes,
|
|
|
14
36
|
applyData: () => void;
|
|
15
37
|
};
|
|
16
38
|
interface ITMQueryEditor extends ITMApplyFormProps<QueryDescriptor> {
|
|
17
|
-
|
|
39
|
+
runQdImmediately?: boolean;
|
|
18
40
|
validateSelect?: boolean;
|
|
19
41
|
validateOrderBy?: boolean;
|
|
20
42
|
showDistinct?: boolean;
|
|
@@ -22,6 +44,20 @@ interface ITMQueryEditor extends ITMApplyFormProps<QueryDescriptor> {
|
|
|
22
44
|
borderRadius?: string;
|
|
23
45
|
searchText?: string;
|
|
24
46
|
onFromTIDChanged?: (tid: number) => void;
|
|
47
|
+
onQDChanged?: (qd: QueryDescriptor) => void;
|
|
25
48
|
}
|
|
26
49
|
declare const TMQueryEditor: React.FunctionComponent<ITMQueryEditor>;
|
|
27
50
|
export default TMQueryEditor;
|
|
51
|
+
export declare const TMQdWhereItemValueEditor: ({ tid, value, queryParamsDynDataList, containerElement, allowMultipleSelection, autoFocus, numberOfOperands, md, onValueChanged, onValueChange, onCascadeRefreshDynDataLists }: {
|
|
52
|
+
tid: number | undefined;
|
|
53
|
+
value: string | undefined;
|
|
54
|
+
queryParamsDynDataList?: string[];
|
|
55
|
+
allowMultipleSelection: boolean;
|
|
56
|
+
numberOfOperands: number;
|
|
57
|
+
autoFocus: boolean;
|
|
58
|
+
containerElement: Element | undefined;
|
|
59
|
+
md: MetadataDescriptor | undefined;
|
|
60
|
+
onValueChanged?: (value: any) => void;
|
|
61
|
+
onValueChange?: (value: any) => void;
|
|
62
|
+
onCascadeRefreshDynDataLists?: (dynDataListsToBeRefreshed: DynDataListsToBeRefreshed[]) => void;
|
|
63
|
+
}) => import("react/jsx-runtime").JSX.Element;
|