@topconsultnpm/sdkui-react-beta 6.9.43 → 6.9.45
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/assets/icomoon.svg +96 -96
- package/lib/components/base/Styled.d.ts +23 -1920
- package/lib/components/base/TMAlert.d.ts +2 -3
- package/lib/components/base/TMContextMenuOLD.d.ts +3 -274
- package/lib/components/base/TMDropDownMenu.d.ts +0 -1
- package/lib/components/base/TMEditorBase.d.ts +0 -1
- package/lib/components/base/TMLayout.d.ts +32 -32
- package/lib/components/base/TMRightSidebar.d.ts +4 -4
- package/lib/components/base/TMTab.d.ts +4 -4
- package/lib/components/base/TMVilViewer.d.ts +1 -1
- package/lib/components/choosers/TMRelationChooser.d.ts +5 -5
- package/lib/components/choosers/TMUserChooser.d.ts +5 -5
- package/lib/components/editors/TMEditorStyled.d.ts +19 -20
- package/lib/components/forms/TMLoginForm.d.ts +5 -5
- package/lib/components/query/TMQueryEditor.d.ts +9 -552
- package/lib/components/query/TMQueryEditor.js +15 -15
- package/lib/components/query/TMQueryResult.d.ts +5 -5
- package/lib/components/query/TMQueryResultForm.d.ts +10 -10
- package/lib/components/sidebar/TMHeader.d.ts +2 -2
- package/lib/components/viewers/TMDataListItemViewer.d.ts +3 -3
- package/lib/components/viewers/TMMidViewer.d.ts +5 -5
- package/lib/components/viewers/TMTidViewer.d.ts +5 -5
- package/lib/helper/helpers.d.ts +1 -1
- package/lib/hooks/useForm.d.ts +0 -1
- package/lib/hooks/useOutsideClick.d.ts +0 -1
- package/lib/hooks/useQueryParametersDialog.d.ts +1 -2
- package/lib/hooks/useQueryParametersDialog.js +15 -8
- package/package.json +1 -1
|
@@ -51,7 +51,7 @@ export var Descriptors;
|
|
|
51
51
|
(function (Descriptors) {
|
|
52
52
|
Descriptors[Descriptors["Query"] = 3] = "Query";
|
|
53
53
|
})(Descriptors || (Descriptors = {}));
|
|
54
|
-
export function
|
|
54
|
+
export function useQueryApplyForm(d, formMode, inputData, onApplied, parameters) {
|
|
55
55
|
const newData = () => {
|
|
56
56
|
switch (d) {
|
|
57
57
|
case Descriptors.Query: return SearchEngine.NewQueryDescriptor();
|
|
@@ -62,10 +62,11 @@ export function useOrchApplyForm(d, formMode, inputData, onApplied, parameters)
|
|
|
62
62
|
const [validationItems, setValidationItems] = useState([]);
|
|
63
63
|
return { formData, setFormData, formDataOrig, validationItems, setValidationItems, exception, applyData };
|
|
64
64
|
}
|
|
65
|
-
const TMQueryEditor = ({ formMode, inputData, onQDChanged,
|
|
65
|
+
const TMQueryEditor = ({ formMode, inputData, onQDChanged, isModal, showDistinct = false, showToolbar = true, validateSelect = true, validateOrderBy = true, raiseWarningForOnlyMetadataDcmtTypes = false, onApplied, onClose, height = 'auto', borderRadius = '4px', searchText, showApply, showUndo, showBack, onFromTIDChanged }) => {
|
|
66
66
|
const [confirmQueryParams, ConfirmQueryParamsDialog] = useQueryParametersDialog();
|
|
67
|
-
const { formData, setFormData, formDataOrig, validationItems, setValidationItems, exception, applyData } =
|
|
67
|
+
const { formData, setFormData, formDataOrig, validationItems, setValidationItems, exception, applyData } = useQueryApplyForm(Descriptors.Query, formMode, inputData, onApplied);
|
|
68
68
|
const [dcmtTypesList, setDcmtTypesList] = useState([]);
|
|
69
|
+
const [lastQdParams, setLastQdParams] = useState([]);
|
|
69
70
|
const [resultSearch, setResultSearch] = useState();
|
|
70
71
|
const [elapsedTime, setElapsedTime] = useState(0);
|
|
71
72
|
const [draggingItem, setDraggingItem] = useState();
|
|
@@ -73,7 +74,7 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, runQdImmediately = fa
|
|
|
73
74
|
const [showCompleteMetadataName, setShowCompleteMetadataName] = useState(false);
|
|
74
75
|
const [showResultSearch, setShowResultSearch] = useState(false);
|
|
75
76
|
const [fromCount, setFromCount] = useState(0);
|
|
76
|
-
useEffect(() => { setShowResultSearch(false); }, [inputData]);
|
|
77
|
+
useEffect(() => { setShowResultSearch(false); }, [JSON.stringify(inputData)]);
|
|
77
78
|
useEffect(() => {
|
|
78
79
|
if (!formData)
|
|
79
80
|
return;
|
|
@@ -84,9 +85,7 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, runQdImmediately = fa
|
|
|
84
85
|
useEffect(() => { validateQd(); }, [formData.select, formData.where, formData.orderBy, formData.maxDcmtsToBeReturned]);
|
|
85
86
|
//Se non c'è la toolbar significa che il qd deve essere gestito dall'esterno
|
|
86
87
|
useEffect(() => { if (!showToolbar)
|
|
87
|
-
onQDChanged?.(formData); }, [formData]);
|
|
88
|
-
useEffect(() => { if (runQdImmediately)
|
|
89
|
-
onSearchAsync().catch((err) => { TMExceptionBoxManager.show({ exception: err }); }); }, [runQdImmediately]);
|
|
88
|
+
onQDChanged?.(formData); }, [JSON.stringify(formData)]);
|
|
90
89
|
const validateQd = () => {
|
|
91
90
|
let vil = [];
|
|
92
91
|
let qvo = new QueryValidatorOptions();
|
|
@@ -572,27 +571,28 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, runQdImmediately = fa
|
|
|
572
571
|
// #endregion
|
|
573
572
|
// #region Ricerca
|
|
574
573
|
const renderResultSearchForm = _jsx(TMQueryResultForm, { context: SearchResultContext.METADATA_SEARCH, onClose: () => { setShowResultSearch(false); }, isModal: isModal, result1: resultSearch, elapsedTime: elapsedTime, searchText: searchText });
|
|
575
|
-
const onSearchAsync = async () => {
|
|
574
|
+
const onSearchAsync = async (qdInput) => {
|
|
576
575
|
try {
|
|
577
576
|
const startTime = new Date().getTime();
|
|
578
|
-
let
|
|
579
|
-
if (IsParametricQuery(
|
|
580
|
-
const qdParams = await confirmQueryParams(
|
|
577
|
+
let qdSearch = await prepareQdForSearchAsync(qdInput);
|
|
578
|
+
if (IsParametricQuery(qdSearch)) {
|
|
579
|
+
const qdParams = await confirmQueryParams(qdSearch, lastQdParams);
|
|
580
|
+
setLastQdParams(qdParams);
|
|
581
581
|
if (!qdParams || qdParams.length <= 0)
|
|
582
582
|
return;
|
|
583
583
|
for (const qpd of qdParams) {
|
|
584
|
-
let wi =
|
|
584
|
+
let wi = qdSearch.where?.find(o => o.value1 == qpd.name);
|
|
585
585
|
if (wi)
|
|
586
586
|
wi.value1 = wi.value1?.replace(wi.value1, !qpd.value ? '' : qpd.value.toString());
|
|
587
587
|
else {
|
|
588
|
-
wi =
|
|
588
|
+
wi = qdSearch.where?.find(o => o.value2 == qpd.name);
|
|
589
589
|
if (wi)
|
|
590
590
|
wi.value2 = wi.value2?.replace(wi.value2, !qpd.value ? '' : qpd.value.toString());
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
594
|
TMSpinner.show({ description: `${SDKUI_Localizator.Search} ...`, backgroundColor: 'transparent' });
|
|
595
|
-
let result = await SDK_Globals.tmSession?.NewSearchEngine().SearchByIDAsync(
|
|
595
|
+
let result = await SDK_Globals.tmSession?.NewSearchEngine().SearchByIDAsync(qdSearch);
|
|
596
596
|
let dcmtsFound = result?.dcmtsFound ?? 0;
|
|
597
597
|
if (dcmtsFound <= 0)
|
|
598
598
|
ShowAlert({ message: SDKUI_Localizator.NoDcmtFound, mode: 'info', title: SDKUI_Localizator.SearchResult, duration: 3000 });
|
|
@@ -677,7 +677,7 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, runQdImmediately = fa
|
|
|
677
677
|
}
|
|
678
678
|
};
|
|
679
679
|
// #endregion
|
|
680
|
-
return (_jsxs(_Fragment, { children: [_jsxs(TMApplyForm, { isModal: false, formMode: formMode, isModified: calcIsModified(formData, formDataOrig), exception: exception, validationItems: validationItems, hasNavigation: false, customToolbarElements: _jsxs(_Fragment, { children: [_jsx(TMButton, { btnStyle: 'toolbar', caption: SDKUI_Localizator.Search, color: 'tertiary', icon: _jsx(IconSearch, {}), disabled: errorsCount > 0, onClick: onSearchAsync }), _jsx(TMButton, { btnStyle: 'toolbar', caption: SDKUI_Localizator.Count, icon: _jsx(IconCount, {}), disabled: errorsCount > 0, onClick: () => getQueryCountAsync(formData, true) }), SDK_Globals.tmSession?.SessionDescr?.appModuleID == AppModules.SURFER && _jsx(TMButton, { caption: "Passa ad archiviazione", icon: _jsx(IconArchiveDoc, {}), btnStyle: 'toolbar', fontSize: '1.3rem', onClick: () => { ShowAlert({ message: "TODO Passa ad archiviazione", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } }), SDK_Globals.tmSession?.SessionDescr?.appModuleID == AppModules.SURFER && _jsx(TMButton, { caption: "Vai a risultato", icon: _jsx(IconArrowRight, {}), btnStyle: 'toolbar', fontSize: '1.3rem', onClick: () => { ShowAlert({ message: "TODO Vai a risultato", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } })] }), showToolbar: showToolbar, showApply: showApply, showUndo: showUndo, showBack: showBack, onApply: () => applyData(), onClose: () => onClose?.(), onUndo: () => setFormData(formDataOrig), children: [_jsxs(Accordion, { elementAttr: { class: 'tm-query-dx-accordion' }, height: height, multiple: true, collapsible: true, repaintChangesOnly: true, deferRendering: false, animationDuration: 0, onContentReady: (e) => {
|
|
680
|
+
return (_jsxs(_Fragment, { children: [_jsxs(TMApplyForm, { isModal: false, formMode: formMode, isModified: calcIsModified(formData, formDataOrig), exception: exception, validationItems: validationItems, hasNavigation: false, customToolbarElements: _jsxs(_Fragment, { children: [_jsx(TMButton, { btnStyle: 'toolbar', caption: SDKUI_Localizator.Search, color: 'tertiary', icon: _jsx(IconSearch, {}), disabled: errorsCount > 0, onClick: async () => await onSearchAsync(formData) }), _jsx(TMButton, { btnStyle: 'toolbar', caption: SDKUI_Localizator.Count, icon: _jsx(IconCount, {}), disabled: errorsCount > 0, onClick: () => getQueryCountAsync(formData, true) }), SDK_Globals.tmSession?.SessionDescr?.appModuleID == AppModules.SURFER && _jsx(TMButton, { caption: "Passa ad archiviazione", icon: _jsx(IconArchiveDoc, {}), btnStyle: 'toolbar', fontSize: '1.3rem', onClick: () => { ShowAlert({ message: "TODO Passa ad archiviazione", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } }), SDK_Globals.tmSession?.SessionDescr?.appModuleID == AppModules.SURFER && _jsx(TMButton, { caption: "Vai a risultato", icon: _jsx(IconArrowRight, {}), btnStyle: 'toolbar', fontSize: '1.3rem', onClick: () => { ShowAlert({ message: "TODO Vai a risultato", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } })] }), showToolbar: showToolbar, showApply: showApply, showUndo: showUndo, showBack: showBack, onApply: () => applyData(), onClose: () => onClose?.(), onUndo: () => setFormData(formDataOrig), children: [_jsxs(Accordion, { elementAttr: { class: 'tm-query-dx-accordion' }, height: height, multiple: true, collapsible: true, repaintChangesOnly: true, deferRendering: false, animationDuration: 0, onContentReady: (e) => {
|
|
681
681
|
let items = e.component.option("items");
|
|
682
682
|
if (items && items.length > 0) {
|
|
683
683
|
for (let i = 0; i < items.length; i++) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SearchResultDescriptor } from '@topconsultnpm/sdk-ts-beta';
|
|
2
2
|
declare const TMQueryResult: ({ result, elapsedTime, showHiddenSelectItems, searchText, onSelectionChanged, onDblClick }: {
|
|
3
|
-
onDblClick?: (
|
|
4
|
-
onSelectionChanged?: (
|
|
3
|
+
onDblClick?: () => void;
|
|
4
|
+
onSelectionChanged?: (e: any[]) => void;
|
|
5
5
|
result: SearchResultDescriptor | undefined;
|
|
6
|
-
elapsedTime?: number
|
|
7
|
-
showHiddenSelectItems?: boolean
|
|
8
|
-
searchText?: string
|
|
6
|
+
elapsedTime?: number;
|
|
7
|
+
showHiddenSelectItems?: boolean;
|
|
8
|
+
searchText?: string;
|
|
9
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default TMQueryResult;
|
|
@@ -6,17 +6,17 @@ export declare enum SearchResultContext {
|
|
|
6
6
|
RECENT = "recent"
|
|
7
7
|
}
|
|
8
8
|
declare const TMQueryResultForm: ({ onUpdate, isModal, onClose, context, result1, result2, elapsedTime, searchText, tabIcon1, tabIcon2, tabTitle1, tabTitle2 }: {
|
|
9
|
-
tabTitle1?: string
|
|
10
|
-
tabTitle2?: string
|
|
9
|
+
tabTitle1?: string;
|
|
10
|
+
tabTitle2?: string;
|
|
11
11
|
tabIcon1?: any;
|
|
12
12
|
tabIcon2?: any;
|
|
13
|
-
isModal?: boolean
|
|
14
|
-
onClose?: (
|
|
15
|
-
context?: SearchResultContext
|
|
16
|
-
result1?: SearchResultDescriptor | SearchResultDescriptor[]
|
|
17
|
-
result2?: SearchResultDescriptor | SearchResultDescriptor[]
|
|
18
|
-
elapsedTime?: number
|
|
19
|
-
searchText?: string
|
|
20
|
-
onUpdate?: (
|
|
13
|
+
isModal?: boolean;
|
|
14
|
+
onClose?: () => void;
|
|
15
|
+
context?: SearchResultContext;
|
|
16
|
+
result1?: SearchResultDescriptor | SearchResultDescriptor[];
|
|
17
|
+
result2?: SearchResultDescriptor | SearchResultDescriptor[];
|
|
18
|
+
elapsedTime?: number;
|
|
19
|
+
searchText?: string;
|
|
20
|
+
onUpdate?: () => Promise<void>;
|
|
21
21
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export default TMQueryResultForm;
|
|
@@ -24,8 +24,8 @@ interface ITMHeader {
|
|
|
24
24
|
onSettingsClick?: () => void;
|
|
25
25
|
}
|
|
26
26
|
export declare const TMSearchBar: ({ searchValue, onSearchValueChanged, maxWidth, marginLeft }: {
|
|
27
|
-
maxWidth?: string
|
|
28
|
-
marginLeft?: string
|
|
27
|
+
maxWidth?: string;
|
|
28
|
+
marginLeft?: string;
|
|
29
29
|
searchValue: string;
|
|
30
30
|
onSearchValueChanged: (value: string) => void;
|
|
31
31
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DataListViewModes } from '@topconsultnpm/sdk-ts-beta';
|
|
2
2
|
import { DataGridTypes } from 'devextreme-react/cjs/data-grid';
|
|
3
3
|
declare const TMDataListItemViewer: ({ dataListId, value, viewMode }: {
|
|
4
|
-
dataListId?: number
|
|
5
|
-
value?: string
|
|
6
|
-
viewMode?: DataListViewModes
|
|
4
|
+
dataListId?: number;
|
|
5
|
+
value?: string;
|
|
6
|
+
viewMode?: DataListViewModes;
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default TMDataListItemViewer;
|
|
9
9
|
export declare const cellRenderDataListItem: (data: DataGridTypes.ColumnCellTemplateData, dataListId?: number, viewMode?: DataListViewModes) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,12 +3,12 @@ import { ITopMediaSession, LayoutModes, MetadataDescriptor } from '@topconsultnp
|
|
|
3
3
|
import { TID_MID } from '../../ts';
|
|
4
4
|
import { DataGridTypes } from 'devextreme-react/cjs/data-grid';
|
|
5
5
|
export declare const TMMidViewer: ({ tmSession, tid_mid, showCompleteName, showIcon, showId, noneSelectionText }: {
|
|
6
|
-
tmSession?: ITopMediaSession
|
|
6
|
+
tmSession?: ITopMediaSession;
|
|
7
7
|
tid_mid: TID_MID | undefined;
|
|
8
|
-
showCompleteName?: boolean
|
|
9
|
-
showIcon?: boolean
|
|
10
|
-
showId?: boolean
|
|
11
|
-
noneSelectionText?: string
|
|
8
|
+
showCompleteName?: boolean;
|
|
9
|
+
showIcon?: boolean;
|
|
10
|
+
showId?: boolean;
|
|
11
|
+
noneSelectionText?: string;
|
|
12
12
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
interface ITMMetadataIcon {
|
|
14
14
|
tid: number | undefined;
|
|
@@ -11,11 +11,11 @@ interface ITMDcmtTypeTooltip {
|
|
|
11
11
|
}
|
|
12
12
|
export declare const TMDcmtTypeTooltip: React.FC<ITMDcmtTypeTooltip>;
|
|
13
13
|
declare const TMTidViewer: ({ tmSession, tid, showIcon, showId, noneSelectionText }: {
|
|
14
|
-
tmSession?: ITopMediaSession
|
|
15
|
-
tid?: number
|
|
16
|
-
showIcon?: boolean
|
|
17
|
-
showId?: boolean
|
|
18
|
-
noneSelectionText?: string
|
|
14
|
+
tmSession?: ITopMediaSession;
|
|
15
|
+
tid?: number;
|
|
16
|
+
showIcon?: boolean;
|
|
17
|
+
showId?: boolean;
|
|
18
|
+
noneSelectionText?: string;
|
|
19
19
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export default TMTidViewer;
|
|
21
21
|
export declare const cellRenderTID: (data: DataGridTypes.ColumnCellTemplateData, noneSelectionText?: string) => import("react/jsx-runtime").JSX.Element;
|
package/lib/helper/helpers.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { AppModules, DataColumnDescriptor, ITopMediaSession, QueryDescriptor, Se
|
|
|
4
4
|
import { FormModes, moduleTypes } from "../ts";
|
|
5
5
|
declare const TABLET_WIDTH = 1024;
|
|
6
6
|
declare const MOBILE_WIDTH = 640;
|
|
7
|
-
declare const calcResponsiveDirection: (deviceType: DeviceType, desktopDir:
|
|
7
|
+
declare const calcResponsiveDirection: (deviceType: DeviceType, desktopDir: "horizontal" | "vertical", tabletDir: "horizontal" | "vertical", mobileDir: "horizontal" | "vertical") => "horizontal" | "vertical";
|
|
8
8
|
declare const openApps: (appModule: AppModules, tmSession: ITopMediaSession, appRoutes?: any[]) => Promise<void>;
|
|
9
9
|
export declare const setSDK_GlobalsInfoAsync: (tms: ITopMediaSession | undefined) => Promise<ITopMediaSession>;
|
|
10
10
|
declare const calcResponsiveSizes: (deviceType: DeviceType | undefined, desktopSize: string, tabletSize: string, mobileSize: string) => string;
|
package/lib/hooks/useForm.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { QueryDescriptor, QueryParameterDescriptor } from '@topconsultnpm/sdk-ts-beta';
|
|
3
|
-
export declare const useQueryParametersDialog: () => [(inputQd: QueryDescriptor) => Promise<QueryParameterDescriptor[]>, () => JSX.Element];
|
|
2
|
+
export declare const useQueryParametersDialog: () => [(inputQd: QueryDescriptor, lastQdParams?: QueryParameterDescriptor[]) => Promise<QueryParameterDescriptor[]>, () => JSX.Element];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
3
|
import { QueryParameterDescriptor } from '@topconsultnpm/sdk-ts-beta';
|
|
4
4
|
import { TMModal, TMTextBox, TMButton } from "../components";
|
|
5
5
|
import { IconApply, IconCloseOutline, SDKUI_Localizator } from "../helper";
|
|
@@ -10,7 +10,12 @@ export const useQueryParametersDialog = () => {
|
|
|
10
10
|
const [open, setOpen] = useState(false);
|
|
11
11
|
const [qdParams, setQdParams] = useState([]);
|
|
12
12
|
let qdParamsOut = [];
|
|
13
|
-
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
for (const qdp of qdParams) {
|
|
15
|
+
qdParamsOut.push(qdp);
|
|
16
|
+
}
|
|
17
|
+
}, [qdParams]);
|
|
18
|
+
const confirmQueryParams = (inputQd, lastQdParams) => new Promise((resolve, reject) => {
|
|
14
19
|
if (inputQd.where) {
|
|
15
20
|
let newQueryParams = [];
|
|
16
21
|
let id = 1;
|
|
@@ -19,6 +24,7 @@ export const useQueryParametersDialog = () => {
|
|
|
19
24
|
let qpd = new QueryParameterDescriptor();
|
|
20
25
|
qpd.id = id++;
|
|
21
26
|
qpd.name = wi.value1;
|
|
27
|
+
qpd.value = lastQdParams?.find(o => o.id == qpd.id)?.value;
|
|
22
28
|
if (newQueryParams.findIndex(o => o.name == wi.value1) < 0)
|
|
23
29
|
newQueryParams.push(qpd);
|
|
24
30
|
}
|
|
@@ -26,6 +32,7 @@ export const useQueryParametersDialog = () => {
|
|
|
26
32
|
let qpd = new QueryParameterDescriptor();
|
|
27
33
|
qpd.id = id++;
|
|
28
34
|
qpd.name = wi.value2;
|
|
35
|
+
qpd.value = lastQdParams?.find(o => o.id == qpd.id)?.value;
|
|
29
36
|
if (newQueryParams.findIndex(o => o.name == wi.value2) < 0)
|
|
30
37
|
newQueryParams.push(qpd);
|
|
31
38
|
}
|
|
@@ -50,12 +57,12 @@ export const useQueryParametersDialog = () => {
|
|
|
50
57
|
const ConfirmQueryParamsDialog = () => {
|
|
51
58
|
return (open ?
|
|
52
59
|
_jsx(TMModal, { title: SDKUI_Localizator.QueryParamBind, height: "max-content", width: "400px", onClose: handleClose, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '5px', padding: '10px', height: '100%' }, children: [qdParams.map((qdp, index) => {
|
|
53
|
-
return (_jsx(TMTextBox, { placeHolder: `${SDKUI_Localizator.EnterValue} ...`, label: qdp.name, autoFocus: index == 0, value: qdp.value, onValueChanged: (e) => {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
return (_jsx(TMTextBox, { placeHolder: `${SDKUI_Localizator.EnterValue} ...`, label: qdp.name, autoFocus: index == 0, value: qdp.value ?? '', onValueChanged: (e) => {
|
|
61
|
+
let newQdp = qdParamsOut.find(o => o.id == qdp.id);
|
|
62
|
+
if (newQdp)
|
|
63
|
+
newQdp.value = e.target.value;
|
|
64
|
+
else
|
|
65
|
+
qdParamsOut.push({ id: qdp.id, name: qdp.name, value: e.target.value });
|
|
59
66
|
} }, qdp.id));
|
|
60
67
|
}), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', gap: '5px', paddingTop: '10px', justifyContent: 'flex-end', alignItems: 'center', height: '50px' }, children: [_jsx(TMButton, { btnStyle: "advanced", showTooltip: false, icon: _jsx(IconApply, {}), caption: "OK", advancedColor: TMColors.tertiary, onClick: handleConfirm }), _jsx(TMButton, { btnStyle: "advanced", showTooltip: false, icon: _jsx(IconCloseOutline, {}), caption: SDKUI_Localizator.Cancel, onClick: handleCancel })] })] }) })
|
|
61
68
|
: _jsx(_Fragment, {}));
|