@topconsultnpm/sdkui-react-beta 6.9.28 → 6.9.29
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.
|
@@ -73,7 +73,7 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, runQdImmediately = fa
|
|
|
73
73
|
const [showCompleteMetadataName, setShowCompleteMetadataName] = useState(false);
|
|
74
74
|
const [showResultSearch, setShowResultSearch] = useState(false);
|
|
75
75
|
const [fromCount, setFromCount] = useState(0);
|
|
76
|
-
const [dynDataListsToBeRefreshed, setDynDataListsToBeRefreshed] = useState([]);
|
|
76
|
+
// const [dynDataListsToBeRefreshed, setDynDataListsToBeRefreshed] = useState<DynDataListsToBeRefreshed[]>([]);
|
|
77
77
|
useEffect(() => { setShowResultSearch(false); }, [inputData]);
|
|
78
78
|
useEffect(() => {
|
|
79
79
|
if (!formData)
|
|
@@ -738,25 +738,24 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, runQdImmediately = fa
|
|
|
738
738
|
] }), _jsx(TMQdDropDownMenu, { disabled: index == 0, color: 'green', content: _jsx("div", { style: { fontSize: '1rem' }, children: wi.or ? 'OR' : 'AND' }), items: [
|
|
739
739
|
{ text: 'AND', onClick: () => onChange_WhereItem_Or(false, index) },
|
|
740
740
|
{ text: 'OR', onClick: () => onChange_WhereItem_Or(true, index) }
|
|
741
|
-
] }), _jsx(TMQdEditableItem, { value: wi.leftBrackets, backgroundColor: colorBrackets, onValueChanged: (value) => { onChange_WhereItem_Brackets(value, true, index); } }), _jsx(TMMetadataChooser, { disabled: isReadOnly, getColorIndex: getColorIndex, showCompleteMetadataName: showCompleteMetadataName, openEditorOnSummaryClick: true, showBorder: false, borderRadius: borderRadius, showId: showId, backgroundColor: getColorIndex({ tid: wi.tid, alias: wi.alias }), qd: formData, values: [{ tid: wi.tid, mid: wi.mid, aliasTID: wi.alias }], onValueChanged: (values) => { values.length > 0 && onChange_WhereItem_Metadato(values[0], index); } }), _jsx(TMQdDropDownMenu, { backgroundColor: colorOperator, color: 'green', borderRadius: borderRadius, content: _jsx(StyledDivHorizontal, { children: _jsx(StyledItemWrapper, { children: LocalizeQueryOperators(wi.operator) }) }), items: getQueryOperatorsMenuItems(wi, index) }), _jsx(TMQdWhereItemValue, { whereItem: wi, index: index,
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
}, onValueChanged: (values) => { onChange_WhereItem_Values(values[0], values[1], index); } }), _jsx(TMQdEditableItem, { value: wi.rightBrackets, backgroundColor: colorBrackets, onValueChanged: (value) => { onChange_WhereItem_Brackets(value, false, index); } })] }, `${wi.tid}_${wi.mid}_${index}`));
|
|
741
|
+
] }), _jsx(TMQdEditableItem, { value: wi.leftBrackets, backgroundColor: colorBrackets, onValueChanged: (value) => { onChange_WhereItem_Brackets(value, true, index); } }), _jsx(TMMetadataChooser, { disabled: isReadOnly, getColorIndex: getColorIndex, showCompleteMetadataName: showCompleteMetadataName, openEditorOnSummaryClick: true, showBorder: false, borderRadius: borderRadius, showId: showId, backgroundColor: getColorIndex({ tid: wi.tid, alias: wi.alias }), qd: formData, values: [{ tid: wi.tid, mid: wi.mid, aliasTID: wi.alias }], onValueChanged: (values) => { values.length > 0 && onChange_WhereItem_Metadato(values[0], index); } }), _jsx(TMQdDropDownMenu, { backgroundColor: colorOperator, color: 'green', borderRadius: borderRadius, content: _jsx(StyledDivHorizontal, { children: _jsx(StyledItemWrapper, { children: LocalizeQueryOperators(wi.operator) }) }), items: getQueryOperatorsMenuItems(wi, index) }), _jsx(TMQdWhereItemValue, { whereItem: wi, index: index,
|
|
742
|
+
// queryParamsDynDataList={dynDataListsToBeRefreshed.find(o => o.mid == wi.mid)?.queryParams ?? []}
|
|
743
|
+
// onCascadeRefreshDynDataLists={(ddlToBeRefreshed) => {
|
|
744
|
+
// let newDynDataListsToBeRefreshed = [];
|
|
745
|
+
// for (const item of dynDataListsToBeRefreshed) {
|
|
746
|
+
// let index = ddlToBeRefreshed.findIndex(o => o.mid == item.mid || (o.mid == -1 && o.midStarter == item.midStarter));
|
|
747
|
+
// if (index >= 0) continue;
|
|
748
|
+
// newDynDataListsToBeRefreshed.push(item);
|
|
749
|
+
// }
|
|
750
|
+
// for (const item of ddlToBeRefreshed) {
|
|
751
|
+
// if (item.queryParams.length <= 0) continue;
|
|
752
|
+
// if (!item.mid) continue;
|
|
753
|
+
// if (item.mid <= 0) continue;
|
|
754
|
+
// newDynDataListsToBeRefreshed.push(item);
|
|
755
|
+
// }
|
|
756
|
+
// setDynDataListsToBeRefreshed(newDynDataListsToBeRefreshed);
|
|
757
|
+
// }}
|
|
758
|
+
onValueChanged: (values) => { onChange_WhereItem_Values(values[0], values[1], index); } }), _jsx(TMQdEditableItem, { value: wi.rightBrackets, backgroundColor: colorBrackets, onValueChanged: (value) => { onChange_WhereItem_Brackets(value, false, index); } })] }, `${wi.tid}_${wi.mid}_${index}`));
|
|
760
759
|
})] }) }) }), fromCount > 0 && (!isReadOnly || orderByCount > 0) && _jsx(Item, { title: SDK_Localizator.QueryOrderBy, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, orderByCount, validationItems.filter((o) => o.PropertyName == TMPropertyNames.orderBy)), children: _jsx(StyledAccordionItemContainer, { children: _jsxs(StyledAccordionItemContent, { "$disabled": isReadOnly, children: [(!formData?.orderBy || formData?.orderBy.length <= 0) && !isReadOnly &&
|
|
761
760
|
_jsx(StyledRowItem, { children: _jsx(TMButton, { btnStyle: 'normal', disabled: !formData?.from?.tid, caption: SDKUI_Localizator.Add, onClick: onAdd_OrderByItem }) }), formData?.orderBy?.map((oi, index) => {
|
|
762
761
|
return (_jsxs(StyledRowItem, { onDragEnd: dragEnd, onDragOver: dragOver, onDrop: (e) => dropOrderBy(e, oi), children: [!isReadOnly && _jsx(StyledDraggableDiv, { draggable: true, onDragStart: (e) => dragStart(e, oi), children: _jsx(IconDraggabledots, { fontSize: 15, color: TMColors.button_icon }) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconClear, { color: TMColors.button_icon }), caption: SDKUI_Localizator.Remove, onClick: () => onRemove_OrderByItem(index) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconAddCircleOutline, { color: TMColors.button_icon }), caption: SDKUI_Localizator.AddBelow, onClick: () => onAdd_OrderByItem(index + 1) }), !isReadOnly && _jsx(TMQdDropDownMenu, { content: _jsx(TMTooltip, { content: SDK_Localizator.toCaseWord(SDKUI_Localizator.OneMore), children: _jsx(IconDotsVerticalCircleOutline, { color: TMColors.button_icon }) }), items: [
|