@topconsultnpm/sdkui-react-beta 6.6.15 → 6.6.17
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/TMEditorBase.d.ts +7 -1
- package/lib/components/choosers/TMDataListItemChooser.d.ts +0 -2
- package/lib/components/choosers/TMDataListItemChooser.js +2 -2
- package/lib/components/choosers/TMDcmtTypeChooser.d.ts +0 -2
- package/lib/components/choosers/TMDcmtTypeChooser.js +2 -2
- package/lib/components/choosers/TMDynDataListItemChooser.d.ts +0 -2
- package/lib/components/choosers/TMDynDataListItemChooser.js +2 -2
- package/lib/components/choosers/TMMetadataChooser.d.ts +0 -1
- package/lib/components/choosers/TMMetadataChooser.js +2 -2
- package/lib/components/choosers/TMUserChooser.d.ts +0 -2
- package/lib/components/choosers/TMUserChooser.js +2 -2
- package/lib/components/editors/TMDateBox.d.ts +1 -0
- package/lib/components/editors/TMDateBox.js +10 -2
- package/lib/components/editors/TMSummary.d.ts +1 -2
- package/lib/components/editors/TMSummary.js +5 -3
- package/lib/components/editors/TMTextArea.d.ts +2 -7
- package/lib/components/editors/TMTextBox.d.ts +0 -6
- package/lib/components/editors/TMTextBox.js +11 -18
- package/lib/components/forms/TMLoginForm.js +1 -1
- package/lib/components/query/TMQueryEditor.js +10 -9
- package/lib/helper/TMIcons.d.ts +1 -0
- package/lib/helper/TMIcons.js +3 -0
- package/package.json +1 -1
|
@@ -4,8 +4,14 @@ export type Colors = 'error' | 'warning' | 'success' | 'info' | 'primary' | 'sec
|
|
|
4
4
|
type IconModes = 'outside' | 'inside' | 'none';
|
|
5
5
|
type LabelModes = 'left' | 'top' | 'none';
|
|
6
6
|
export type Sizes = 'small' | 'medium' | 'large';
|
|
7
|
+
export type TMEditorButtonData = {
|
|
8
|
+
icon: any;
|
|
9
|
+
text?: string;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
};
|
|
7
12
|
export interface ITMEditorBase {
|
|
8
13
|
backgroundColor?: string;
|
|
14
|
+
buttons?: TMEditorButtonData[];
|
|
9
15
|
customActionIcon?: any;
|
|
10
16
|
disabled?: boolean;
|
|
11
17
|
elementStyle?: React.CSSProperties;
|
|
@@ -24,9 +30,9 @@ export interface ITMEditorBase {
|
|
|
24
30
|
placeHolder?: string;
|
|
25
31
|
readOnly?: boolean;
|
|
26
32
|
showId?: boolean;
|
|
33
|
+
showClearButton?: boolean;
|
|
27
34
|
value?: any;
|
|
28
35
|
validationItems?: ValidationItem[];
|
|
29
36
|
width?: string;
|
|
30
|
-
onCustomActionClick?: VoidFunction;
|
|
31
37
|
}
|
|
32
38
|
export {};
|
|
@@ -8,8 +8,6 @@ interface ITMDataListItemChooserProps extends ITMChooserProps {
|
|
|
8
8
|
values?: string[];
|
|
9
9
|
/** Visualizza il bordo */
|
|
10
10
|
showBorder?: boolean;
|
|
11
|
-
/** Se presente, visualizza il bottone Pulisci ed esegue */
|
|
12
|
-
hasClear?: boolean;
|
|
13
11
|
}
|
|
14
12
|
declare const TMDataListItemChooser: React.FunctionComponent<ITMDataListItemChooserProps>;
|
|
15
13
|
export default TMDataListItemChooser;
|
|
@@ -8,12 +8,12 @@ import TMSpinner from '../base/TMSpinner';
|
|
|
8
8
|
import TMSummary from '../editors/TMSummary';
|
|
9
9
|
import TMChooserForm from '../forms/TMChooserForm';
|
|
10
10
|
import TMDataListItemViewer from '../viewers/TMDataListItemViewer';
|
|
11
|
-
const TMDataListItemChooser = ({ dataListId, backgroundColor, showBorder = true, elementStyle, allowMultipleSelection, values, isModifiedWhen, label, placeHolder, validationItems = [], onValueChanged
|
|
11
|
+
const TMDataListItemChooser = ({ dataListId, backgroundColor, showBorder = true, buttons = [], elementStyle, allowMultipleSelection, values, isModifiedWhen, label, placeHolder, showClearButton = false, validationItems = [], onValueChanged }) => {
|
|
12
12
|
const [showChooser, setShowChooser] = useState(false);
|
|
13
13
|
const renderTemplate = () => {
|
|
14
14
|
return (_jsxs(StyledDivHorizontal, { style: { minWidth: '125px' }, children: [placeHolder && (!values || values.length <= 0) && _jsx("p", { children: placeHolder }), values && values.length > 0 && _jsx(TMDataListItemViewer, { dataListId: dataListId, value: values?.[0] }), values && values.length > 1 && _jsx("p", { style: { marginLeft: '10px' }, children: `(+${values.length - 1} ${values.length == 2 ? 'altro' : 'altri'})` })] }));
|
|
15
15
|
};
|
|
16
|
-
return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { backgroundColor: backgroundColor, showBorder: showBorder, iconEditButton: _jsx(IconSearch, {}), onEditorClick: () => setShowChooser(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, label: label, template: renderTemplate(), onClearClick:
|
|
16
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { buttons: buttons, backgroundColor: backgroundColor, showBorder: showBorder, hasValue: values && values.length > 0, showClearButton: showClearButton, iconEditButton: _jsx(IconSearch, { fontSize: 16 }), onEditorClick: () => setShowChooser(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, label: label, template: renderTemplate(), onClearClick: showClearButton ? () => { onValueChanged?.([]); } : undefined, validationItems: validationItems }), showChooser &&
|
|
17
17
|
_jsx(TMDataListItemChooserForm, { allowMultipleSelection: allowMultipleSelection, dataListId: dataListId, selectedIDs: values, onClose: () => setShowChooser(false), onChoose: (IDs) => { onValueChanged?.(IDs); } })] }));
|
|
18
18
|
};
|
|
19
19
|
export default TMDataListItemChooser;
|
|
@@ -10,8 +10,6 @@ interface ITMDcmtTypeChooser extends ITMChooserProps {
|
|
|
10
10
|
/** Visualizza il bordo */
|
|
11
11
|
showBorder?: boolean;
|
|
12
12
|
borderRadius?: string;
|
|
13
|
-
/** Se presente, visualizza il bottone ed esegue */
|
|
14
|
-
hasClear?: boolean;
|
|
15
13
|
openEditorOnSummaryClick?: boolean;
|
|
16
14
|
}
|
|
17
15
|
declare const TMDcmtTypeChooser: React.FunctionComponent<ITMDcmtTypeChooser>;
|
|
@@ -7,7 +7,7 @@ import { StyledDivHorizontal } from '../base/Styled';
|
|
|
7
7
|
import TMTidViewer, { TMDcmtTypeIcon } from '../viewers/TMTidViewer';
|
|
8
8
|
import TMSummary from '../editors/TMSummary';
|
|
9
9
|
import TMChooserForm from '../forms/TMChooserForm';
|
|
10
|
-
const TMDcmtTypeChooser = ({ tmSession, dataSource, disabled, backgroundColor, borderRadius = '4px', placeHolder = `<${SDKUI_Localizator.NoneSelection}>`, openEditorOnSummaryClick, showBorder = true, showId = false, elementStyle, allowMultipleSelection, ShowOnlyDcmtTypes, ShowOnlySAP, filterTemplateTID, values, isModifiedWhen, label, width, height, validationItems = [], onValueChanged
|
|
10
|
+
const TMDcmtTypeChooser = ({ tmSession, dataSource, disabled, backgroundColor, borderRadius = '4px', buttons = [], placeHolder = `<${SDKUI_Localizator.NoneSelection}>`, openEditorOnSummaryClick, showBorder = true, showId = false, elementStyle, allowMultipleSelection, ShowOnlyDcmtTypes, ShowOnlySAP, filterTemplateTID, values, isModifiedWhen, label, width, height, showClearButton = false, validationItems = [], onValueChanged }) => {
|
|
11
11
|
const [showChooser, setShowChooser] = useState(false);
|
|
12
12
|
useEffect(() => {
|
|
13
13
|
TMSpinner.show({ description: `${SDKUI_Localizator.Loading} - ${SDK_Localizator.ListDcmtTypeOrView} ...` });
|
|
@@ -17,7 +17,7 @@ const TMDcmtTypeChooser = ({ tmSession, dataSource, disabled, backgroundColor, b
|
|
|
17
17
|
const renderTemplate = () => {
|
|
18
18
|
return (_jsxs(StyledDivHorizontal, { style: { width: 'max-content', height: '100%' }, children: [values && _jsx(TMTidViewer, { tmSession: tmSession, tid: values[0], showIcon: true, showId: showId, noneSelectionText: placeHolder }), values && values.length > 1 && _jsx("p", { style: { marginLeft: '10px' }, children: `(+${values.length - 1} ${values.length == 2 ? 'altro' : 'altri'})` })] }));
|
|
19
19
|
};
|
|
20
|
-
return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { backgroundColor: backgroundColor, showBorder: showBorder, borderRadius: borderRadius, iconEditButton: _jsx(IconSearch, {}), onEditorClick: () => !disabled && setShowChooser(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, label: label, width: width, height: showBorder ? height : '24px', template: renderTemplate(), openEditorOnSummaryClick: openEditorOnSummaryClick, onClearClick:
|
|
20
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { backgroundColor: backgroundColor, buttons: buttons, showBorder: showBorder, borderRadius: borderRadius, hasValue: values && values.length > 0, showClearButton: showClearButton, iconEditButton: _jsx(IconSearch, { fontSize: 16 }), onEditorClick: () => !disabled && setShowChooser(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, label: label, width: width, height: showBorder ? height : '24px', template: renderTemplate(), openEditorOnSummaryClick: openEditorOnSummaryClick, onClearClick: showClearButton ? () => { !disabled && onValueChanged?.([]); } : undefined, validationItems: validationItems }), showChooser &&
|
|
21
21
|
_jsx(TMDcmtTypeChooserForm, { tmSession: tmSession, allowMultipleSelection: allowMultipleSelection, dataSource: dataSource, selectedIDs: values, ShowOnlyDcmtTypes: ShowOnlyDcmtTypes, ShowOnlySAP: ShowOnlySAP, filterTemplateTID: filterTemplateTID, onClose: () => setShowChooser(false), onChoose: (IDs) => { onValueChanged?.(IDs); } })] }));
|
|
22
22
|
};
|
|
23
23
|
export default TMDcmtTypeChooser;
|
|
@@ -12,8 +12,6 @@ interface ITMDynDataListItemChooserProps extends ITMChooserProps {
|
|
|
12
12
|
values?: string[];
|
|
13
13
|
/** Visualizza il bordo */
|
|
14
14
|
showBorder?: boolean;
|
|
15
|
-
/** Se presente, visualizza il bottone Pulisci ed esegue */
|
|
16
|
-
hasClear?: boolean;
|
|
17
15
|
/** Se presente, sono i parametri da passare alla query per recuperare il dataSource */
|
|
18
16
|
queryParamsDynDataList?: string[];
|
|
19
17
|
/** Indica quali liste dati dinamiche aggiornare in cascata */
|
|
@@ -23,7 +23,7 @@ export const IsParametricQuery = (qd) => {
|
|
|
23
23
|
}
|
|
24
24
|
return false;
|
|
25
25
|
};
|
|
26
|
-
const TMDynDataListItemChooser = ({ tid, md, layoutMode = LayoutModes.None, queryParamsDynDataList, backgroundColor, showBorder = true, elementStyle, allowMultipleSelection, values, isModifiedWhen, label, placeHolder, validationItems = [], onValueChanged, onCascadeRefreshDynDataLists,
|
|
26
|
+
const TMDynDataListItemChooser = ({ tid, md, layoutMode = LayoutModes.None, queryParamsDynDataList, buttons = [], backgroundColor, showBorder = true, elementStyle, allowMultipleSelection, values, isModifiedWhen, label, placeHolder, validationItems = [], onValueChanged, onCascadeRefreshDynDataLists, showClearButton }) => {
|
|
27
27
|
const [showChooser, setShowChooser] = useState(false);
|
|
28
28
|
const [dynDl, setDynDl] = useState();
|
|
29
29
|
const [dataSource, setDataSource] = useState();
|
|
@@ -67,7 +67,7 @@ const TMDynDataListItemChooser = ({ tid, md, layoutMode = LayoutModes.None, quer
|
|
|
67
67
|
const renderTemplate = () => {
|
|
68
68
|
return (_jsxs(StyledDivHorizontal, { style: { minWidth: '125px' }, children: [placeHolder && (!values || values.length <= 0) && _jsx("p", { children: placeHolder }), values && values.length > 0 && dynDl && dataSource && _jsxs(StyledDivHorizontal, { children: [_jsx(IconDetails, {}), _jsx("p", { style: { marginLeft: '5px' }, children: dataSource.dtdResult?.rows?.filter(o => o[dynDl.selectItemForValue ?? 0] == values?.[0])?.[0]?.[dynDl.selectItemForDescription ?? 0] })] }), values && values.length > 1 && _jsx("p", { style: { marginLeft: '10px' }, children: `(+${values.length - 1} ${values.length == 2 ? 'altro' : 'altri'})` })] }));
|
|
69
69
|
};
|
|
70
|
-
return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { backgroundColor: backgroundColor, showBorder: showBorder, iconEditButton: _jsx(IconSearch, {}), onEditorClick: () => setShowChooser(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, label: label, template: renderTemplate(), onClearClick:
|
|
70
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { backgroundColor: backgroundColor, buttons: buttons, showBorder: showBorder, hasValue: values && values.length > 0, showClearButton: showClearButton, iconEditButton: _jsx(IconSearch, { fontSize: 16 }), onEditorClick: () => setShowChooser(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, label: label, template: renderTemplate(), onClearClick: showClearButton ? () => { onValueChanged?.([]); } : undefined, validationItems: validationItems }), showChooser &&
|
|
71
71
|
_jsx(TMDynDataListItemChooserForm, { TID: tid, MID: md?.id, dynDL: dynDl, allowMultipleSelection: allowMultipleSelection, searchResult: dataSource, selectedIDs: values, onClose: () => setShowChooser(false), onChoose: (IDs) => {
|
|
72
72
|
onValueChanged?.(IDs);
|
|
73
73
|
if (!dynDl)
|
|
@@ -20,7 +20,6 @@ interface ITMMetadataChooserProps extends ITMChooserProps {
|
|
|
20
20
|
getColorIndex?: (tid: TID_Alias) => string;
|
|
21
21
|
showBorder?: boolean;
|
|
22
22
|
borderRadius?: string;
|
|
23
|
-
hasClear?: boolean;
|
|
24
23
|
openEditorOnSummaryClick?: boolean;
|
|
25
24
|
validationItems?: ValidationItem[];
|
|
26
25
|
}
|
|
@@ -12,12 +12,12 @@ import TMButton from '../base/TMButton';
|
|
|
12
12
|
import TMSummary from '../editors/TMSummary';
|
|
13
13
|
import TMChooserForm from '../forms/TMChooserForm';
|
|
14
14
|
import TMSpinner from '../base/TMSpinner';
|
|
15
|
-
const TMMetadataChooser = ({ tmSession, dataSource, inputDcmtTypesList, disabled, validationItems, getColorIndex, showCompleteMetadataName, qdShowOnlySelectItems, borderRadius = '4px', fontSize = FontSize.defaultFontSize, backgroundColor, openEditorOnSummaryClick, showBorder = true, showId = false, elementStyle, allowMultipleSelection, allowSysMetadata, value, values, isModifiedWhen, tids, label, width, height, onValueChanged,
|
|
15
|
+
const TMMetadataChooser = ({ tmSession, dataSource, buttons = [], inputDcmtTypesList, disabled, validationItems, getColorIndex, showCompleteMetadataName, qdShowOnlySelectItems, borderRadius = '4px', fontSize = FontSize.defaultFontSize, backgroundColor, openEditorOnSummaryClick, showBorder = true, showId = false, elementStyle, allowMultipleSelection, allowSysMetadata, value, values, isModifiedWhen, tids, label, width, height, onValueChanged, showClearButton, qd, placeHolder }) => {
|
|
16
16
|
const [showChooser, setShowChooser] = useState(false);
|
|
17
17
|
const renderTemplate = () => {
|
|
18
18
|
return (_jsxs(StyledDivHorizontal, { style: { width: 'max-content', height: '100%' }, children: [values && _jsx(TMMidViewer, { tmSession: tmSession, tid_mid: values[0], showIcon: true, showId: showId, showCompleteName: showCompleteMetadataName }), values && values.length > 1 && _jsx("p", { style: { marginLeft: '10px' }, children: `(+${values.length - 1} ${values.length == 2 ? 'altro' : 'altri'})` }), (values == undefined || values.length == 0) && _jsx("p", { children: placeHolder })] }));
|
|
19
19
|
};
|
|
20
|
-
return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { label: label, width: width, height: showBorder ? height : '24px', validationItems: validationItems, backgroundColor: backgroundColor, placeHolder: placeHolder, fontSize: fontSize, showBorder: showBorder, borderRadius: borderRadius, iconEditButton: _jsx(IconSearch, {}), openEditorOnSummaryClick: openEditorOnSummaryClick, onEditorClick: () => !disabled && setShowChooser(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, template: renderTemplate(), onClearClick:
|
|
20
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { label: label, width: width, height: showBorder ? height : '24px', validationItems: validationItems, backgroundColor: backgroundColor, buttons: buttons, placeHolder: placeHolder, fontSize: fontSize, showBorder: showBorder, borderRadius: borderRadius, hasValue: values && values.length > 0, showClearButton: showClearButton, iconEditButton: _jsx(IconSearch, { fontSize: 16 }), openEditorOnSummaryClick: openEditorOnSummaryClick, onEditorClick: () => !disabled && setShowChooser(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, template: renderTemplate(), onClearClick: showClearButton ? () => { onValueChanged?.([]); } : undefined }), showChooser &&
|
|
21
21
|
_jsx(TMMetadataChooserForm, { tmSession: tmSession, allowMultipleSelection: allowMultipleSelection, height: '500px', width: '600px', allowSysMetadata: allowSysMetadata, getColorIndex: getColorIndex, dataSource: dataSource, inputDcmtTypesList: inputDcmtTypesList, tids: tids, qd: qd, qdShowOnlySelectItems: qdShowOnlySelectItems, selectedIDs: values, onClose: () => setShowChooser(false), onChoose: (tid_mids) => { onValueChanged?.(tid_mids); } })] }));
|
|
22
22
|
};
|
|
23
23
|
export default TMMetadataChooser;
|
|
@@ -6,8 +6,6 @@ interface ITMUserChooserProps extends ITMChooserProps {
|
|
|
6
6
|
values?: number[];
|
|
7
7
|
/** Visualizza il bordo */
|
|
8
8
|
showBorder?: boolean;
|
|
9
|
-
/** Se presente, visualizza il bottone Pulisci ed esegue */
|
|
10
|
-
hasClear?: boolean;
|
|
11
9
|
}
|
|
12
10
|
declare const TMUserChooser: React.FunctionComponent<ITMUserChooserProps>;
|
|
13
11
|
export default TMUserChooser;
|
|
@@ -8,7 +8,7 @@ import TMSpinner from '../base/TMSpinner';
|
|
|
8
8
|
import TMTooltip from '../base/TMTooltip';
|
|
9
9
|
import TMSummary from '../editors/TMSummary';
|
|
10
10
|
import TMChooserForm from '../forms/TMChooserForm';
|
|
11
|
-
const TMUserChooser = ({ dataSource, backgroundColor, disabled = false, showBorder = true, elementStyle, allowMultipleSelection, values, isModifiedWhen, label, placeHolder, validationItems = [], onValueChanged,
|
|
11
|
+
const TMUserChooser = ({ dataSource, backgroundColor, buttons = [], disabled = false, showBorder = true, elementStyle, allowMultipleSelection, values, isModifiedWhen, label, placeHolder, validationItems = [], onValueChanged, showClearButton }) => {
|
|
12
12
|
const [showChooser, setShowChooser] = useState(false);
|
|
13
13
|
useEffect(() => {
|
|
14
14
|
if (!values || values.length <= 0)
|
|
@@ -21,7 +21,7 @@ const TMUserChooser = ({ dataSource, backgroundColor, disabled = false, showBord
|
|
|
21
21
|
? _jsx("p", { children: placeHolder })
|
|
22
22
|
: _jsxs(_Fragment, { children: [_jsx(TMUserIdViewer, { userId: values?.[0], showIcon: true }), values && values.length > 1 && _jsx("p", { style: { marginLeft: '10px' }, children: `(+${values.length - 1} ${values.length == 2 ? 'altro' : 'altri'})` })] }) }));
|
|
23
23
|
};
|
|
24
|
-
return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { disabled: disabled, backgroundColor: backgroundColor, showBorder: showBorder, iconEditButton: _jsx(IconSearch, {}), onEditorClick: () => setShowChooser(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, label: label, template: renderTemplate(), onClearClick:
|
|
24
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { disabled: disabled, backgroundColor: backgroundColor, buttons: buttons, showBorder: showBorder, hasValue: values && values.length > 0, showClearButton: showClearButton, iconEditButton: _jsx(IconSearch, { fontSize: 16 }), onEditorClick: () => setShowChooser(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, label: label, template: renderTemplate(), onClearClick: showClearButton ? () => { onValueChanged?.([]); } : undefined, validationItems: validationItems }), showChooser &&
|
|
25
25
|
_jsx(TMUserChooserForm, { allowMultipleSelection: allowMultipleSelection, dataSource: dataSource, selectedIDs: values, onClose: () => setShowChooser(false), onChoose: (IDs) => { onValueChanged?.(IDs); } })] }));
|
|
26
26
|
};
|
|
27
27
|
export default TMUserChooser;
|
|
@@ -7,6 +7,7 @@ interface ITMDateBoxProps extends IDateBoxOptions {
|
|
|
7
7
|
isModifiedWhen?: boolean;
|
|
8
8
|
useDateSerializationFormat?: boolean;
|
|
9
9
|
containerElement?: Element;
|
|
10
|
+
buttons?: any;
|
|
10
11
|
}
|
|
11
12
|
declare const TMDateBox: (props: ITMDateBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export default TMDateBox;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { DateBox } from 'devextreme-react';
|
|
4
|
-
import {
|
|
4
|
+
import { Button } from 'devextreme-react/cjs/date-box';
|
|
5
|
+
import { DateDisplayTypes, Globalization, IconLayerGroup } from '../../helper';
|
|
5
6
|
import { TMColors } from '../../utils/theme';
|
|
6
7
|
import TMVilViewer from '../base/TMVilViewer';
|
|
8
|
+
import ReactDOMServer from 'react-dom/server';
|
|
7
9
|
const TMDateBox = (props) => {
|
|
8
10
|
useEffect(() => {
|
|
9
11
|
let htmlElement = dateBoxRef?.current?.instance().element();
|
|
@@ -65,6 +67,12 @@ const TMDateBox = (props) => {
|
|
|
65
67
|
const currentDate = new Date(e.value);
|
|
66
68
|
currentDate.setHours(0, 0, 0, 0);
|
|
67
69
|
e.component.option("value", currentDate.toISOString());
|
|
68
|
-
}
|
|
70
|
+
}, children: props.buttons?.map((btn) => {
|
|
71
|
+
return (_jsx(Button, { name: btn.text, location: "after", options: {
|
|
72
|
+
icon: ReactDOMServer.renderToString(_jsx(IconLayerGroup, {})),
|
|
73
|
+
stylingMode: 'text',
|
|
74
|
+
onClick: () => btn?.onClick?.()
|
|
75
|
+
} }, btn.text));
|
|
76
|
+
}) }), _jsx(TMVilViewer, { vil: props.validationItems })] }));
|
|
69
77
|
};
|
|
70
78
|
export default TMDateBox;
|
|
@@ -8,10 +8,9 @@ interface ITMSummary extends ITMEditorBase {
|
|
|
8
8
|
iconeEditTooltip?: string;
|
|
9
9
|
template?: React.ReactNode;
|
|
10
10
|
openEditorOnSummaryClick?: boolean;
|
|
11
|
-
|
|
11
|
+
hasValue?: boolean;
|
|
12
12
|
onEditorClick?: () => void;
|
|
13
13
|
onClearClick?: () => void;
|
|
14
|
-
onCustumBtnClick?: () => void;
|
|
15
14
|
onValueChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
16
15
|
}
|
|
17
16
|
declare const TMSummary: React.FunctionComponent<ITMSummary>;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { FontSize, TMColors } from '../../utils/theme';
|
|
4
4
|
import { StyledEditorContainer, StyledEditorIcon, StyledEditorLabel, editorColorManager } from './TMEditorStyled';
|
|
5
|
-
import {
|
|
5
|
+
import { IconClearButton, IconPencil, SDKUI_Localizator } from '../../helper';
|
|
6
6
|
import TMLayoutContainer, { TMLayoutItem } from '../base/TMLayout';
|
|
7
7
|
import TMVilViewer from '../base/TMVilViewer';
|
|
8
8
|
import TMTooltip from '../base/TMTooltip';
|
|
@@ -46,11 +46,13 @@ const StyledEditorButtonIcon2 = styled.div `
|
|
|
46
46
|
border-bottom-color: ${TMColors.primary};
|
|
47
47
|
}
|
|
48
48
|
`;
|
|
49
|
-
const TMSummary = ({
|
|
49
|
+
const TMSummary = ({ hasValue, borderRadius = '4px', validationItems = [], buttons = [], label = '', onClearClick, openEditorOnSummaryClick, onEditorClick, backgroundColor = 'transparent', showBorder = true, isModifiedWhen, elementStyle, width = '100%', height = '100%', fontSize = FontSize.defaultFontSize, icon, showEditButton = true, showClearButton, iconEditButton, iconeEditTooltip, labelPosition = 'left', template, disabled = false, onValueChanged }) => {
|
|
50
50
|
const renderTemplateField = () => {
|
|
51
51
|
return (_jsx(StyledSummaryTemplateInput, { tabIndex: 0, "$backgroundColor": backgroundColor, "$borderRadius": borderRadius, "$isModified": isModifiedWhen, "$vil": validationItems, "$disabled": disabled, "$showBorder": showBorder, "$fontSize": fontSize, "$width": width, "$height": height, onChange: onValueChanged, children: _jsxs("div", { onClick: () => { if (openEditorOnSummaryClick && !disabled)
|
|
52
52
|
onEditorClick?.(); }, onDoubleClick: () => { if (!openEditorOnSummaryClick && !disabled)
|
|
53
|
-
onEditorClick?.(); }, style: { display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', width: '100%', minHeight: '16px', cursor: openEditorOnSummaryClick ? 'pointer' : 'default' }, children: [template, _jsxs("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', pointerEvents: disabled ? 'none' : 'auto', opacity: disabled ? 0.4 : 1 }, children: [
|
|
53
|
+
onEditorClick?.(); }, style: { display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', width: '100%', minHeight: '16px', cursor: openEditorOnSummaryClick ? 'pointer' : 'default' }, children: [template, _jsxs("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', pointerEvents: disabled ? 'none' : 'auto', opacity: disabled ? 0.4 : 1 }, children: [showClearButton && hasValue && _jsx(StyledEditorButtonIcon2, { tabIndex: disabled ? -1 : 0, onKeyDown: (e) => e.code === 'Space' && onClearClick?.(), onClick: onClearClick, children: _jsx(TMTooltip, { content: SDKUI_Localizator.Clear, children: _jsx(IconClearButton, {}) }) }), !openEditorOnSummaryClick && showEditButton && _jsx(StyledEditorButtonIcon2, { tabIndex: disabled ? -1 : 0, onKeyDown: (e) => e.code === 'Space' && onEditorClick?.(), onClick: onEditorClick, children: _jsx(TMTooltip, { content: iconeEditTooltip ?? SDKUI_Localizator.Update, children: iconEditButton ?? _jsx(IconPencil, {}) }) }), buttons.map((buttonItem) => {
|
|
54
|
+
return (_jsx(StyledEditorButtonIcon2, { onClick: buttonItem.onClick, children: _jsx(TMTooltip, { content: buttonItem.text, children: buttonItem.icon }) }, buttonItem.text));
|
|
55
|
+
})] })] }) }));
|
|
54
56
|
};
|
|
55
57
|
const renderLabel = () => {
|
|
56
58
|
return (_jsx(StyledEditorLabel, { "$isFocused": false, "$labelPosition": labelPosition, "$disabled": disabled, "$fontSize": fontSize, children: _jsx("div", { style: { flexDirection: "row", display: "flex", alignItems: "start", justifyContent: "start" }, children: label }) }));
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import React, { ChangeEvent } from 'react';
|
|
2
|
-
import { ITMEditorBase } from '../base/TMEditorBase';
|
|
3
|
-
export type TMTextAreaButtonData = {
|
|
4
|
-
icon: any;
|
|
5
|
-
text?: string;
|
|
6
|
-
onClick?: () => void;
|
|
7
|
-
};
|
|
2
|
+
import { ITMEditorBase, TMEditorButtonData } from '../base/TMEditorBase';
|
|
8
3
|
interface ITMTextArea extends ITMEditorBase {
|
|
9
4
|
value: string;
|
|
10
5
|
onValueChanged: ((e: ChangeEvent<HTMLTextAreaElement>) => void) | undefined;
|
|
11
6
|
formulaItems?: Array<string>;
|
|
12
|
-
buttons?: Array<
|
|
7
|
+
buttons?: Array<TMEditorButtonData>;
|
|
13
8
|
onBlur?: (value: string | undefined) => void;
|
|
14
9
|
autoFocus?: boolean;
|
|
15
10
|
maxValue?: number;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ITMEditorBase } from '../base/TMEditorBase';
|
|
3
|
-
export type TMTextBoxButtonData = {
|
|
4
|
-
icon: any;
|
|
5
|
-
text?: string;
|
|
6
|
-
onClick?: () => void;
|
|
7
|
-
};
|
|
8
3
|
export type TextBoxType = 'text' | 'email' | 'password' | 'number';
|
|
9
4
|
interface ITMTextBox extends ITMEditorBase {
|
|
10
5
|
autoFocus?: boolean;
|
|
11
|
-
buttons?: TMTextBoxButtonData[];
|
|
12
6
|
formulaItems?: string[];
|
|
13
7
|
maxValue?: number;
|
|
14
8
|
maxLength?: number;
|
|
@@ -3,13 +3,13 @@ import { useState, useEffect, useRef } from 'react';
|
|
|
3
3
|
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
|
-
import { IconHide, IconShow, useWindowWidth } from '../../helper';
|
|
7
|
-
import TMContextMenu, { useContextMenu } from '../base/TMContextMenuOLD';
|
|
6
|
+
import { genUniqueId, IconClearButton, IconHide, IconShow, useWindowWidth } from '../../helper';
|
|
8
7
|
import ShowAlert from '../base/TMAlert';
|
|
9
8
|
import { TMExceptionBoxManager } from '../base/TMPopUp';
|
|
10
9
|
import TMLayoutContainer, { TMLayoutItem } from '../base/TMLayout';
|
|
11
10
|
import TMVilViewer from '../base/TMVilViewer';
|
|
12
11
|
import TMTooltip from '../base/TMTooltip';
|
|
12
|
+
import { ContextMenu } from 'devextreme-react';
|
|
13
13
|
const StyledShowPasswordIcon = styled.div `
|
|
14
14
|
color: ${props => !props.$disabled ? (props.$vil.length === 0) ? !props.$isModified ? TMColors.text_normal : TMColors.isModified : editorColorManager(props.$vil) : TMColors.disabled};
|
|
15
15
|
position: absolute;
|
|
@@ -18,15 +18,16 @@ const StyledShowPasswordIcon = styled.div `
|
|
|
18
18
|
transform: translateY(-25px);
|
|
19
19
|
cursor: pointer;
|
|
20
20
|
`;
|
|
21
|
-
const TMTextBox = ({ autoFocus, maxLength, precision, scale, validationItems = [], label = '', readOnly = false, formulaItems = [], buttons = [], isModifiedWhen, placeHolder, elementStyle, width = '100%', maxValue, fontSize = FontSize.defaultFontSize, icon, labelPosition = 'left', value, disabled = false, type = 'text', onValueChanged, onBlur }) => {
|
|
21
|
+
const TMTextBox = ({ autoFocus, maxLength, precision, scale, showClearButton, validationItems = [], label = '', readOnly = false, formulaItems = [], buttons = [], isModifiedWhen, placeHolder, elementStyle, width = '100%', maxValue, fontSize = FontSize.defaultFontSize, icon, labelPosition = 'left', value, disabled = false, type = 'text', onValueChanged, onBlur }) => {
|
|
22
22
|
const [initialType, setInitialType] = useState(type);
|
|
23
23
|
const [currentType, setCurrentType] = useState(type);
|
|
24
24
|
const [currentValue, setCurrentValue] = useState(value);
|
|
25
25
|
const [formulaMenuItems, setFormulaMenuItems] = useState([]);
|
|
26
26
|
const [isFocused, setIsFocused] = useState(false);
|
|
27
|
-
const { clicked, setClicked, points, setPoints } = useContextMenu();
|
|
28
27
|
const inputRef = useRef(null);
|
|
29
28
|
let screenWidth = useWindowWidth();
|
|
29
|
+
const [id, setID] = useState('');
|
|
30
|
+
useEffect(() => { setID(genUniqueId()); }, []);
|
|
30
31
|
useEffect(() => { setCurrentType(type); setInitialType(type); }, [type]);
|
|
31
32
|
useEffect(() => { setCurrentValue(value); }, [value]);
|
|
32
33
|
useEffect(() => {
|
|
@@ -80,6 +81,7 @@ const TMTextBox = ({ autoFocus, maxLength, precision, scale, validationItems = [
|
|
|
80
81
|
let newValue = textbeforecursorposition + textToInsert + textaftercursorposition;
|
|
81
82
|
inputRef.current.value = newValue;
|
|
82
83
|
onValueChanged?.({ target: { value: newValue } });
|
|
84
|
+
onBlur?.(newValue);
|
|
83
85
|
inputRef.current.focus();
|
|
84
86
|
inputRef.current.selectionStart = inputRef.current.selectionEnd = cursorposition + textToInsert.length;
|
|
85
87
|
}
|
|
@@ -97,7 +99,7 @@ const TMTextBox = ({ autoFocus, maxLength, precision, scale, validationItems = [
|
|
|
97
99
|
return Number(curValue);
|
|
98
100
|
};
|
|
99
101
|
const renderInputField = () => {
|
|
100
|
-
return (_jsxs(_Fragment, { children: [_jsx(StyledEditor, { ref: inputRef, autoFocus: autoFocus, readOnly: readOnly, type: currentType, disabled: disabled, value: currentValue, width: width || '100%', placeholder: placeHolder, maxLength: maxLength, onFocus: () => setIsFocused(true), onBlur: (e) => { setIsFocused(false); if (currentValue != value)
|
|
102
|
+
return (_jsxs(_Fragment, { children: [_jsx(StyledEditor, { ref: inputRef, id: `text-${id}`, autoFocus: autoFocus, readOnly: readOnly, type: currentType, disabled: disabled, value: currentValue, width: width || '100%', placeholder: placeHolder, maxLength: maxLength, onFocus: () => setIsFocused(true), onBlur: (e) => { setIsFocused(false); if (currentValue != value)
|
|
101
103
|
onBlur?.(currentValue); }, onChange: (e) => {
|
|
102
104
|
if (currentType === 'number') {
|
|
103
105
|
let number = Number(e.target.value);
|
|
@@ -120,18 +122,6 @@ const TMTextBox = ({ autoFocus, maxLength, precision, scale, validationItems = [
|
|
|
120
122
|
}
|
|
121
123
|
setCurrentValue(e.target.value);
|
|
122
124
|
onValueChanged?.(e);
|
|
123
|
-
}, onContextMenu: (e) => {
|
|
124
|
-
if (formulaItems.length <= 0)
|
|
125
|
-
return;
|
|
126
|
-
// prevent default right click behavior
|
|
127
|
-
e.preventDefault();
|
|
128
|
-
// set our click state to true when a user right clicks
|
|
129
|
-
setClicked(true);
|
|
130
|
-
const bounds = e.currentTarget.getBoundingClientRect();
|
|
131
|
-
const x = e.clientX - bounds.left;
|
|
132
|
-
const y = e.clientY - bounds.top;
|
|
133
|
-
// set the x and y coordinates of our users right click
|
|
134
|
-
setPoints({ x, y });
|
|
135
125
|
}, onKeyDown: (e) => {
|
|
136
126
|
if (currentType === 'number') {
|
|
137
127
|
if (!scale && (e.key == "." || e.key == ","))
|
|
@@ -140,7 +130,10 @@ const TMTextBox = ({ autoFocus, maxLength, precision, scale, validationItems = [
|
|
|
140
130
|
}, "$isMobile": screenWidth < 640, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, "$fontSize": fontSize, "$maxValue": maxValue, "$width": width, "$type": currentType }), initialType === 'password' && currentValue && _jsx(StyledShowPasswordIcon, { onClick: toggleShowPassword, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, children: showPasswordIcon() }), initialType !== 'password' &&
|
|
141
131
|
buttons.map((buttonItem, index) => {
|
|
142
132
|
return (_jsx(StyledEditorButtonIcon, { onClick: buttonItem.onClick, "$index": index, "$transform": '-26px', children: _jsx(TMTooltip, { content: buttonItem.text, children: buttonItem.icon }) }, index));
|
|
143
|
-
}),
|
|
133
|
+
}), initialType !== 'password' && showClearButton && currentValue && _jsx(StyledEditorButtonIcon, { "$index": buttons.length, "$transform": '-26px', onClick: () => {
|
|
134
|
+
onValueChanged?.({ target: { value: undefined } });
|
|
135
|
+
onBlur?.(undefined);
|
|
136
|
+
}, children: _jsx(IconClearButton, {}) }), formulaItems.length > 0 && (_jsx(ContextMenu, { dataSource: formulaMenuItems, target: `#text-${id}`, onItemClick: (e) => { insertText(e.itemData?.text ?? ''); } })), _jsx(TMVilViewer, { vil: validationItems })] }));
|
|
144
137
|
};
|
|
145
138
|
const renderedLeftLabelTextBox = () => {
|
|
146
139
|
return (_jsxs(TMLayoutContainer, { direction: 'horizontal', children: [icon && _jsx(TMLayoutItem, { width: '20px', children: _jsx(StyledEditorIcon, { "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, children: icon }) }), _jsx(TMLayoutItem, { children: _jsxs(StyledEditorContainer, { "$width": width, children: [label && _jsx(StyledEditorLabel, { "$isFocused": isFocused, "$labelPosition": labelPosition, "$disabled": disabled, "$fontSize": fontSize, children: label }), renderInputField()] }) })] }));
|
|
@@ -772,7 +772,7 @@ const TMLoginForm = (props) => {
|
|
|
772
772
|
return (_jsx(StyledLoginContainer, { "$responsiveHeight": calcResponsiveSizes(size, '75%', '96%', '98%'), "$responsiveWidth": calcResponsiveSizes(size, '55%', '95%', '95%'), children: _jsxs(TMLayoutContainer, { direction: calcResponsiveDirection(size, "horizontal", "vertical", "vertical"), children: [_jsx(TMLayoutItem, { width: calcResponsiveSizes(size, "40%", "100%", "100%"), height: calcResponsiveSizes(size, '100%', '20%', '20%'), children: _jsx("div", { style: { width: '100%', height: '100%', backgroundImage: `url(${backgroundLogin})`, backgroundRepeat: 'no-repeat', backgroundSize: 'cover', backgroundPosition: 'center', borderRadius: '10px' }, children: _jsx(StyledLogoContainer, { "$width": "100%", "$height": calcResponsiveSizes(size, '21%', '50%', '50%'), "$top": '20%', children: SDK_Globals.appModule === AppModules.ORCHESTRATOR ? _jsx("div", { style: { width: '60%', height: '50%', backgroundImage: `url(${logo})`, backgroundRepeat: 'no-repeat', backgroundSize: 'contain', position: 'absolute', backgroundPosition: 'center', top: '50%', left: '50%', transform: 'translate(-50%, -50%)' } }) :
|
|
773
773
|
_jsx("div", { style: { display: 'flex', height: '100%', alignItems: 'center', justifyContent: 'center', fontWeight: 'bolder', color: TMColors.secondary, fontStyle: 'italic' }, children: _jsxs("div", { style: { display: 'flex', alignItems: 'flex-end', gap: 10 }, children: [_jsx("img", { src: six, height: 40, alt: "" }), _jsx("div", { children: SDK_Globals.appModule })] }) }) }) }) }), _jsxs(TMLayoutItem, { width: calcResponsiveSizes(size, "60%", "100%", "100%"), height: calcResponsiveSizes(size, '100%', '80%', '80%'), children: [togglePages.recovery &&
|
|
774
774
|
_jsx(StyledContainer, { children: _jsxs(TMLayoutContainer, { alignItems: "center", children: [_jsx(TMLayoutItem, { width: "fit-content", height: "max-content", children: _jsx(StyledHeaderText, { children: SDKUI_Localizator.ForgetPassword }) }), _jsx(TMLayoutItem, { children: _jsx("div", { style: { padding: `0px ${calcResponsiveSizes(size, '40px', '40px', '10px')}` }, children: _jsx(TMCard, { showBorder: false, children: _jsxs(TMLayoutContainer, { children: [_jsx(TMLayoutItem, { height: "max-content", children: _jsxs("div", { style: { width: '100%', height: '5px', display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', marginTop: '20px' }, children: [_jsx("div", { style: { transform: 'translateX(-1px)', width: '15px', height: '15px', borderRadius: '20px', transition: '500ms ease', backgroundColor: TMColors.primary, zIndex: 300, color: 'white', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: "1" }), _jsx("div", { style: { width: '15px', height: '15px', borderRadius: '20px', transition: '500ms ease', backgroundColor: recoveryPasswordState.step > 1 ? TMColors.primary : 'rgb(180,180,180)', zIndex: 300, color: 'white', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: "2" }), _jsx("div", { style: { transform: 'translateX(1px)', width: '15px', height: '15px', borderRadius: '20px', transition: '500ms ease', backgroundColor: recoveryPasswordState.step > 2 ? TMColors.primary : 'rgb(180,180,180)', zIndex: 300, color: 'white', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: "3" }), _jsx("div", { style: { width: '100%', height: '5px', backgroundColor: 'rgb(180,180,180)', position: 'absolute' } }), _jsx("div", { style: { width: recoveryPasswordState.step === 1 ? '0%' : recoveryPasswordState.step === 2 ? '50%' : '100%', transition: '500ms ease', height: '5px', backgroundColor: TMColors.primary, position: 'absolute' } })] }) }), recoveryPasswordState.step === 1 && _jsx(TMLayoutItem, { children: _jsx(TMTextBox, { type: "email", elementStyle: { marginTop: '30px' }, label: SDKUI_Localizator.InsertYourEmail, icon: _jsx(IconMail, {}), onValueChanged: (e) => setRecoveryPasswordState({ ...recoveryPasswordState, email: e.target.value }), value: recoveryPasswordState.email, validationItems: recoveryPasswordState.email?.length === 0 ? recoveryPasswordValidationItems.filter(item => item.PropertyName === 'recoveryPass_email') : recoveryPasswordValidationItems.filter(item => item.PropertyName === 'recoveryPass_notEmail') }) }), recoveryPasswordState.step === 2 && _jsx(TMLayoutItem, { children: _jsxs(StyledOTPContainer, { children: [_jsxs(StyledOTPLabel, { children: [" ", SDKUI_Localizator.InsertOTP, " ", otpHasFilled.find(input => input === true) && _jsx("strong", { style: { cursor: 'pointer' }, onClick: () => setOtpValues(['', '', '', '', '', '']), children: SDKUI_Localizator.ClearOTP }), " "] }), _jsxs(StyledOTPInputContainer, { children: [_jsx(StyledOTPInput, { ref: otp1Ref, type: "number", max: 9, min: 0, value: otpValues[0], onChange: (e) => { let arr = [...otpValues]; arr[0] = e.target.value; setOtpValues(arr); } }), _jsx(StyledOTPInput, { ref: otp2Ref, type: "number", max: 9, min: 0, value: otpValues[1], onChange: (e) => { let arr = [...otpValues]; arr[1] = e.target.value; setOtpValues(arr); } }), _jsx(StyledOTPInput, { ref: otp3Ref, type: "number", max: 9, min: 0, value: otpValues[2], onChange: (e) => { let arr = [...otpValues]; arr[2] = e.target.value; setOtpValues(arr); } }), _jsx(StyledOTPInput, { ref: otp4Ref, type: "number", max: 9, min: 0, value: otpValues[3], onChange: (e) => { let arr = [...otpValues]; arr[3] = e.target.value; setOtpValues(arr); } }), _jsx(StyledOTPInput, { ref: otp5Ref, type: "number", max: 9, min: 0, value: otpValues[4], onChange: (e) => { let arr = [...otpValues]; arr[4] = e.target.value; setOtpValues(arr); } }), _jsx(StyledOTPInput, { ref: otp6Ref, type: "number", max: 9, min: 0, value: otpValues[5], onChange: (e) => { let arr = [...otpValues]; arr[5] = e.target.value; setOtpValues(arr); } })] }), _jsxs(StyledOTPWaitPanel, { children: [_jsxs("em", { children: [" ", SDKUI_Localizator.OTPSent, " ", _jsx("strong", { children: recoveryPasswordState.email }), ". ", SDKUI_Localizator.OTPNewRequest, " ", _jsx("strong", { children: wait }), " ", SDKUI_Localizator.Seconds] }), ".", wait === 0 && _jsx(TMButton, { caption: SDKUI_Localizator.NewOTP, showTooltip: false, onClick: () => setWait(60) })] })] }) }), recoveryPasswordState.step === 3 && _jsxs(_Fragment, { children: [_jsx(TMLayoutItem, { children: _jsx(TMTextBox, { type: "password", label: SDKUI_Localizator.NewPassword, icon: _jsx(IconPassword, {}), onValueChanged: (e) => setRecoveryPasswordState({ ...recoveryPasswordState, newPassword: e.target.value }), value: recoveryPasswordState.newPassword, validationItems: recoveryPasswordValidationItems.filter(item => item.PropertyName === 'recoveryPass_new' || item.PropertyName === 'recoveryPass_equalUsername' || item.PropertyName === 'recoveryPass_containUsername') }) }), _jsx(TMLayoutItem, { children: _jsx(TMTextBox, { type: "password", label: SDKUI_Localizator.ConfirmPassword, icon: _jsx(IconPassword, {}), onValueChanged: (e) => setRecoveryPasswordState({ ...recoveryPasswordState, confermPassword: e.target.value }), value: recoveryPasswordState.confermPassword, validationItems: recoveryPasswordValidationItems.filter(item => item.PropertyName === 'recoveryPass_confirm' || item.PropertyName === 'recoveryPass_notConfirmed') }) })] })] }) }) }) }), recoveryPasswordState.step === 3 && _jsx(TMPasswordManager, { operation: "recovery", validationItems: recoveryPasswordValidationItems }), _jsx(TMLayoutItem, { height: "fit-content", width: "fit-content", children: _jsx("p", { onClick: () => { recoveryPasswordBackClick(); }, tabIndex: isPasswordChangeEnable() ? 0 : undefined, onKeyDown: (e) => e.code === 'Space' && recoveryPasswordBackClick(), style: { userSelect: 'none', cursor: 'pointer', color: TMColors.primary, fontSize: '1rem' }, children: (recoveryPasswordState.step === 1 || recoveryPasswordState.step === 3) ? SDKUI_Localizator.Back : SDKUI_Localizator.Cancel }) }), _jsx(TMLayoutItem, { height: "fit-content", children: _jsx("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'center', padding: '20px 0' }, children: _jsx(TMButton, { width: calcResponsiveSizes(size, '150px', '150px', '300px'), height: calcResponsiveSizes(size, '30px', '40px', '40px'), fontSize: "1rem", disabled: recoveryPasswordValidationItems.filter(vil => vil.ResultType === ResultTypes.ERROR).length > 0, caption: recoveryPasswordState.step < 3 ? SDKUI_Localizator.Next : SDKUI_Localizator.Save, onClick: () => recoveryPasswordOnClickManager(), showTooltip: false }) }) })] }) }), togglePages.change && _jsx(TMChangePassword, { tmSession: getChangePswTmSession(), username: username, enable: isPasswordChangeEnable(), onClose: () => backToLogin() }), togglePages.endpoint && _jsx(StyledContainer, { children: _jsxs(TMLayoutContainer, { alignItems: "center", children: [_jsx(TMLayoutItem, { width: "fit-content", height: "max-content", children: _jsx(StyledHeaderText, { children: SDKUI_Localizator.Endpoint }) }), _jsx(TMLayoutItem, { height: "fit-content", maxHeight: "70%", children: _jsx("div", { style: { height: '100%', padding: `0px ${calcResponsiveSizes(size, '40px', '40px', '10px')}` }, children: _jsx(TMCard, { showBorder: false, children: _jsxs(DataGrid, { height: '100%', elementAttr: { class: 'dx-custom-row' }, dataSource: endpoints, allowColumnResizing: true, columnResizingMode: "widget", columnAutoWidth: true, allowColumnReordering: true, keyExpr: "URL", showBorders: true, showColumnLines: SDKUI_Globals.dataGridShowColumnLines, showRowLines: SDKUI_Globals.dataGridShowRowLines, onSelectionChanged: (e) => setSelectedEndPoint(e.selectedRowsData[0]), onRowDblClick: () => { setEndpoint(selectedEndpoint); backToLogin(); setSelectedEndPoint(undefined); }, children: [_jsx(Selection, { mode: "single", showCheckBoxesMode: "onClick", selectAllMode: 'allPages' }), _jsx(ScrollBar, { width: 3 }), _jsx(Column, { dataField: "Description", caption: SDKUI_Localizator.Description, allowSorting: false }), _jsx(Column, { dataField: "URL", caption: 'URL', allowSorting: false }), _jsx(Column, { dataField: "isDefault", caption: 'Default', dataType: "boolean", allowSorting: false })] }) }) }) }), recoveryPasswordState.step === 3 && _jsx(TMPasswordManager, { operation: "recovery", validationItems: recoveryPasswordValidationItems }), _jsx(TMLayoutItem, { height: "fit-content", children: _jsxs("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'center', padding: '10px 0', gap: 10 }, children: [_jsx(TMButton, { caption: SDKUI_Localizator.Back, btnStyle: "icon", height: calcResponsiveSizes(size, '30px', '40px', '40px'), fontSize: "0.8rem", onClick: backToLogin, icon: _jsx(IconArrowLeft, {}) }), _jsx(TMButton, { width: calcResponsiveSizes(size, '150px', '150px', '300px'), height: calcResponsiveSizes(size, '30px', '40px', '40px'), fontSize: "1rem", disabled: !selectedEndpoint, caption: SDKUI_Localizator.Select, onClick: () => { setEndpoint(selectedEndpoint); backToLogin(); setSelectedEndPoint(undefined); }, showTooltip: false }), _jsx(TMButton, { caption: 'Ping', btnStyle: "icon", height: calcResponsiveSizes(size, '30px', '40px', '40px'), fontSize: "0.8rem", disabled: !selectedEndpoint, onClick: () => pingAsync(selectedEndpoint), icon: _jsx(IconWifi, {}) })] }) })] }) }), togglePages.archive && _jsx(StyledContainer, { children: _jsxs(TMLayoutContainer, { alignItems: "center", children: [_jsx(TMLayoutItem, { width: "fit-content", height: "max-content", children: _jsx(StyledHeaderText, { children: SDKUI_Localizator.ArchiveID }) }), _jsx(TMLayoutItem, { height: "fit-content", maxHeight: "70%", children: _jsx("div", { style: { height: '100%', padding: `0px ${calcResponsiveSizes(size, '40px', '40px', '10px')}` }, children: _jsx(TMCard, { showBorder: false, children: _jsxs(DataGrid, { height: '100%', dataSource: archives, allowColumnResizing: true, columnResizingMode: "widget", columnAutoWidth: true, allowColumnReordering: true, keyExpr: "id", showBorders: true, showColumnLines: SDKUI_Globals.dataGridShowColumnLines, showRowLines: SDKUI_Globals.dataGridShowRowLines, onSelectionChanged: (e) => setSelectedArchive(e.selectedRowsData[0]), onRowDblClick: () => { setArchive(selectedArchive); backToLogin(); setSelectedArchive(undefined); }, children: [_jsx(Selection, { mode: "single", showCheckBoxesMode: "onClick", selectAllMode: 'allPages' }), _jsx(Column, { dataField: "id", caption: 'ID', allowSorting: false }), _jsx(Column, { dataField: "description", caption: SDKUI_Localizator.Description, allowSorting: false }), _jsx(Column, { dataField: "isDefault", caption: 'Default', dataType: "boolean", allowSorting: false })] }) }) }) }), recoveryPasswordState.step === 3 && _jsx(TMPasswordManager, { operation: "recovery", validationItems: recoveryPasswordValidationItems }), _jsx(TMLayoutItem, { height: "fit-content", children: _jsxs("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'center', padding: '20px 0', gap: 10 }, children: [_jsx(TMButton, { caption: SDKUI_Localizator.Back, btnStyle: "icon", height: calcResponsiveSizes(size, '30px', '40px', '40px'), fontSize: "0.8rem", onClick: backToLogin, icon: _jsx(IconArrowLeft, {}) }), _jsx(TMButton, { width: calcResponsiveSizes(size, '150px', '150px', '300px'), height: calcResponsiveSizes(size, '30px', '40px', '40px'), fontSize: "1rem", disabled: !selectedArchive, caption: SDKUI_Localizator.Select, onClick: () => { setArchive(selectedArchive); backToLogin(); setSelectedArchive(undefined); }, showTooltip: false })] }) })] }) }), (isLoginPage()) &&
|
|
775
|
-
_jsx(StyledContainer, { children: _jsxs(TMLayoutContainer, { alignItems: "center", children: [_jsx(TMLayoutItem, { width: "fit-content", height: "max-content", children: _jsx(StyledHeaderText, { children: "Login" }) }), _jsx(TMLayoutItem, { children: _jsx("div", { style: { padding: `0px ${calcResponsiveSizes(size, '40px', '40px', '10px')}` }, children: _jsx(TMCard, { showBorder: false, children: _jsxs(TMLayoutContainer, { children: [_jsxs(TMLayoutItem, { children: [_jsx(TMSummary, { label: SDKUI_Localizator.Endpoint, icon: _jsx(IconAccessPoint, {}), onClearClick: () => setEndpoint(undefined), iconEditButton: _jsx(IconSearch, {}), template: _jsx("div", { children: endpoint?.Description }),
|
|
775
|
+
_jsx(StyledContainer, { children: _jsxs(TMLayoutContainer, { alignItems: "center", children: [_jsx(TMLayoutItem, { width: "fit-content", height: "max-content", children: _jsx(StyledHeaderText, { children: "Login" }) }), _jsx(TMLayoutItem, { children: _jsx("div", { style: { padding: `0px ${calcResponsiveSizes(size, '40px', '40px', '10px')}` }, children: _jsx(TMCard, { showBorder: false, children: _jsxs(TMLayoutContainer, { children: [_jsxs(TMLayoutItem, { children: [_jsx(TMSummary, { label: SDKUI_Localizator.Endpoint, icon: _jsx(IconAccessPoint, {}), onClearClick: () => setEndpoint(undefined), iconEditButton: _jsx(IconSearch, {}), template: _jsx("div", { children: endpoint?.Description }), buttons: [{ text: "Ping", icon: _jsx(IconWifi, { color: "gray" }), onClick: () => pingAsync(endpoint) }], validationItems: loginValidationItems.filter(item => item.PropertyName === 'endpoint'), onEditorClick: showEndpoints }), archives && archives.length > 0 ?
|
|
776
776
|
_jsx(TMSummary, { label: SDKUI_Localizator.ArchiveID, onClearClick: () => setArchive(undefined), iconEditButton: _jsx(IconSearch, {}), icon: _jsx(IconArchive, {}), template: _jsx("div", { children: archive ? archive.description : null }), validationItems: loginValidationItems.filter(item => item.PropertyName === 'archive'), onEditorClick: showArchives }) :
|
|
777
777
|
_jsx(TMTextBox, { label: SDKUI_Localizator.ArchiveID, icon: _jsx(IconArchive, {}), onValueChanged: (e) => setArchiveID(e.target.value), value: archiveID, validationItems: loginValidationItems.filter(item => item.PropertyName === 'archive') }), _jsx(TMDropDown, { dataSource: [{ display: 'TopMedia', value: AuthenticationModes.TopMedia }, { display: SDKUI_Localizator.AuthMode_OnBehalfOf, value: AuthenticationModes.TopMediaOnBehalfOf }, { display: 'MSAzure', value: AuthenticationModes.MSAzure }, { display: SDKUI_Localizator.AuthMode_WindowsViaTopMedia, value: AuthenticationModes.WindowsThroughTopMedia }], label: SDKUI_Localizator.AuthMode, value: authMode, icon: _jsx(IconLogin, {}), onValueChanged: (e) => { setAuthMode(e.target.value); }, validationItems: loginValidationItems.filter(item => item.PropertyName === 'authMode') })] }), (authMode === AuthenticationModes.TopMedia || authMode === AuthenticationModes.WindowsThroughTopMedia) && _jsx(TMLayoutItem, { children: authMode === AuthenticationModes.WindowsThroughTopMedia ?
|
|
778
778
|
_jsxs(_Fragment, { children: [_jsx(TMTextBox, { label: SDKUI_Localizator.Domain, icon: _jsx(IconWeb, {}), value: domainAlternative, onValueChanged: (e) => setDomainArternative(e.target.value), validationItems: loginValidationItems.filter(item => item.PropertyName === 'domain_alt') }), _jsx(TMTextBox, { validationItems: loginValidationItems.filter(item => item.PropertyName === 'username'), label: SDKUI_Localizator.UserName, icon: _jsx(IconUser, {}), value: username, onValueChanged: (e) => setUsername(e.target.value) }), _jsx(TMTextBox, { validationItems: loginValidationItems.filter(item => item.PropertyName === 'password'), type: "password", label: SDKUI_Localizator.Password, icon: _jsx(IconPassword, {}), value: password, onValueChanged: (e) => setPassword(e.target.value) })] })
|
|
@@ -3,7 +3,7 @@ import { useEffect, useState } from 'react';
|
|
|
3
3
|
import { SDK_Localizator, AccessLevels, OnJoinItem, JoinTypes, PlatformObjectValidator, MetadataDataDomains, DcmtTypeListCacheService, JoinItem, SystemMIDsAsNumber, MetadataDataTypes, OrderByItem, QueryDescriptor, QueryFunctions, QueryOperators, ResultTypes, SelectItem, SDK_Globals, UserListCacheService, WhereItem, SearchEngine, SelectItemVisibilities, DataListCacheService, QueryValidatorOptions, TMPropertyNames, AppModules, LayoutModes } from '@topconsultnpm/sdk-ts-beta';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import Accordion, { Item } from 'devextreme-react/accordion';
|
|
6
|
-
import { SDKUI_Localizator, IconSearch, IconCount, getQueryCountAsync, calcIsModified, IconClear, IconAddCircleOutline, IconDotsVerticalCircleOutline, IconHide, IconShow, IconDraggabledots, genUniqueId, LocalizeQueryOperators, LocalizeQueryFunctions, LocalizeQueryJoinTypes, IconArchiveDoc, IconArrowRight } from '../../helper';
|
|
6
|
+
import { SDKUI_Localizator, IconSearch, IconCount, getQueryCountAsync, calcIsModified, IconClear, IconAddCircleOutline, IconDotsVerticalCircleOutline, IconHide, IconShow, IconDraggabledots, genUniqueId, LocalizeQueryOperators, LocalizeQueryFunctions, LocalizeQueryJoinTypes, IconArchiveDoc, IconArrowRight, IconLayerGroup } from '../../helper';
|
|
7
7
|
import { displayMetadataValue, getDcmtTypesByQdAsync, getTIDsByQd } from '../../helper/queryHelper';
|
|
8
8
|
import { useOutsideClick } from '../../hooks/useOutsideClick';
|
|
9
9
|
import { FormModes } from '../../ts';
|
|
@@ -1018,24 +1018,25 @@ const TMQdWhereItemValue = ({ whereItem, index, queryParamsDynDataList, onlyEdit
|
|
|
1018
1018
|
: _jsxs(_Fragment, { children: [displayMetadataValue(md, whereItem.value1, mdValueEmptyDescr), numberOfOperands == 2 && (whereItem.value2 && whereItem.value2 != '' ? ` - ${displayMetadataValue(md, whereItem.value2, mdValueEmptyDescr)}` : ' - ?')] }) })] })] }));
|
|
1019
1019
|
};
|
|
1020
1020
|
export const TMQdWhereItemValueEditor = ({ tid, value, queryParamsDynDataList, containerElement, allowMultipleSelection, autoFocus, numberOfOperands, md, onValueChanged, onValueChange, onCascadeRefreshDynDataLists }) => {
|
|
1021
|
+
let btnDistincValues = { text: 'Valori distinti', icon: _jsx(IconLayerGroup, { fontSize: 16 }), onClick: () => { ShowAlert({ message: "TODO Valori distinti", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } };
|
|
1021
1022
|
if (value?.startsWith("{@QueryParam") || value == "{@UserName}" || value == "{@UserID}")
|
|
1022
1023
|
return _jsx(TMTextBox, { elementStyle: { width: '100%' }, type: 'text', maxLength: md?.length, autoFocus: autoFocus, value: value || '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
|
|
1023
1024
|
if (md?.dataDomain == MetadataDataDomains.DynamicDataList)
|
|
1024
|
-
return _jsx(TMDynDataListItemChooser, { md: md, tid: tid, queryParamsDynDataList: queryParamsDynDataList, onCascadeRefreshDynDataLists: onCascadeRefreshDynDataLists, elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, allowMultipleSelection: allowMultipleSelection, values: value ? [value] : [],
|
|
1025
|
+
return _jsx(TMDynDataListItemChooser, { md: md, tid: tid, buttons: [btnDistincValues], queryParamsDynDataList: queryParamsDynDataList, onCascadeRefreshDynDataLists: onCascadeRefreshDynDataLists, elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, allowMultipleSelection: allowMultipleSelection, values: value ? [value] : [], showClearButton: true, onValueChanged: (IDs) => {
|
|
1025
1026
|
if (!IDs || IDs.length <= 0)
|
|
1026
1027
|
onValueChanged?.(undefined);
|
|
1027
1028
|
else
|
|
1028
1029
|
onValueChanged?.(IDs[0]);
|
|
1029
1030
|
} });
|
|
1030
1031
|
if (md?.dataDomain == MetadataDataDomains.DataList)
|
|
1031
|
-
return _jsx(TMDataListItemChooser, { elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, dataListId: md.dataListID, allowMultipleSelection: allowMultipleSelection, values: value?.split(',').map((item) => !item.startsWith("'") ? item : item.slice(1, -1)) ?? [],
|
|
1032
|
+
return _jsx(TMDataListItemChooser, { elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, dataListId: md.dataListID, allowMultipleSelection: allowMultipleSelection, values: value?.split(',').map((item) => !item.startsWith("'") ? item : item.slice(1, -1)) ?? [], showClearButton: true, buttons: [btnDistincValues], onValueChanged: (IDs) => {
|
|
1032
1033
|
if (!IDs || IDs.length <= 0)
|
|
1033
1034
|
onValueChanged?.(undefined);
|
|
1034
1035
|
else
|
|
1035
1036
|
onValueChanged?.(IDs.join(","));
|
|
1036
1037
|
} });
|
|
1037
1038
|
if (md?.dataDomain == MetadataDataDomains.UserID)
|
|
1038
|
-
return _jsx(TMUserChooser, { elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, placeHolder: " ",
|
|
1039
|
+
return _jsx(TMUserChooser, { elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, placeHolder: " ", showClearButton: true, allowMultipleSelection: allowMultipleSelection, values: value?.split(',').map((item) => !item.startsWith("'") ? Number(item) : Number(item.slice(1, -1))) ?? [], buttons: [btnDistincValues], onValueChanged: (IDs) => {
|
|
1039
1040
|
if (!IDs || IDs.length <= 0)
|
|
1040
1041
|
onValueChanged?.(undefined);
|
|
1041
1042
|
else
|
|
@@ -1043,13 +1044,13 @@ export const TMQdWhereItemValueEditor = ({ tid, value, queryParamsDynDataList, c
|
|
|
1043
1044
|
} });
|
|
1044
1045
|
switch (numberOfOperands) {
|
|
1045
1046
|
case 11:
|
|
1046
|
-
case 99: return _jsx(TMTextBox, { elementStyle: { width: '100%' }, type: 'text', maxLength: md?.length, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
|
|
1047
|
-
case 12: return _jsx(TMTextBox, { elementStyle: { width: '100%' }, type: 'number', precision: md?.length, scale: md?.scale, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
|
|
1047
|
+
case 99: return _jsx(TMTextBox, { elementStyle: { width: '100%' }, type: 'text', buttons: [btnDistincValues], showClearButton: true, maxLength: md?.length, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
|
|
1048
|
+
case 12: return _jsx(TMTextBox, { elementStyle: { width: '100%' }, type: 'number', showClearButton: true, precision: md?.length, scale: md?.scale, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
|
|
1048
1049
|
default:
|
|
1049
1050
|
switch (md?.dataType) {
|
|
1050
|
-
case MetadataDataTypes.DateTime: return _jsx(TMDateBox, { width: '100%', value: value, useDateSerializationFormat: true, containerElement: containerElement, onValueChange: (newValue) => { onValueChange?.(newValue ? newValue.toString() : undefined); onValueChanged?.(newValue ? newValue.toString() : undefined); } });
|
|
1051
|
-
case MetadataDataTypes.Number: return _jsx(TMTextBox, { elementStyle: { width: '100%' }, type: 'number', precision: md?.length, scale: md?.scale, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
|
|
1052
|
-
default: return _jsx(TMTextBox, { type: 'text', elementStyle: { width: '100%' }, autoFocus: autoFocus, maxLength: md?.length, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => { onValueChanged?.(newValue); } });
|
|
1051
|
+
case MetadataDataTypes.DateTime: return _jsx(TMDateBox, { width: '100%', value: value, buttons: [btnDistincValues], showClearButton: true, useDateSerializationFormat: true, containerElement: containerElement, onValueChange: (newValue) => { onValueChange?.(newValue ? newValue.toString() : undefined); onValueChanged?.(newValue ? newValue.toString() : undefined); } });
|
|
1052
|
+
case MetadataDataTypes.Number: return _jsx(TMTextBox, { elementStyle: { width: '100%' }, type: 'number', buttons: [btnDistincValues], showClearButton: true, precision: md?.length, scale: md?.scale, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
|
|
1053
|
+
default: return _jsx(TMTextBox, { type: 'text', elementStyle: { width: '100%' }, showClearButton: true, buttons: [btnDistincValues], autoFocus: autoFocus, maxLength: md?.length, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => { onValueChanged?.(newValue); } });
|
|
1053
1054
|
}
|
|
1054
1055
|
}
|
|
1055
1056
|
};
|
package/lib/helper/TMIcons.d.ts
CHANGED
|
@@ -116,6 +116,7 @@ declare function IconHistory(props: React.SVGProps<SVGSVGElement>): import("reac
|
|
|
116
116
|
declare function IconForceStop(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
117
117
|
declare function IconDraggabledots(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
118
118
|
declare function IconClear(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
119
|
+
export declare function IconClearButton(props: Readonly<React.SVGProps<SVGSVGElement>>): import("react/jsx-runtime").JSX.Element;
|
|
119
120
|
declare function IconAddCircleOutline(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
120
121
|
declare function IconDotsVerticalCircleOutline(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
121
122
|
declare function IconMapping(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
package/lib/helper/TMIcons.js
CHANGED
|
@@ -351,6 +351,9 @@ function IconDraggabledots(props) {
|
|
|
351
351
|
function IconClear(props) {
|
|
352
352
|
return (_jsxs("svg", { fontSize: props.fontSize ? props.fontSize : FONTSIZE, viewBox: "0 0 1024 1024", fill: "currentColor", height: "1em", width: "1em", ...props, children: [" ", _jsxs("defs", { children: [" ", _jsx("style", {}), " "] }), " ", _jsx("path", { d: "M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6c-.3 1.5-.4 3-.4 4.4 0 14.4 11.6 26 26 26h723c1.5 0 3-.1 4.4-.4 14.2-2.4 23.7-15.9 21.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z" }), " "] }));
|
|
353
353
|
}
|
|
354
|
+
export function IconClearButton(props) {
|
|
355
|
+
return (_jsx("svg", { fontSize: 16, fill: "currentColor", width: "1em", height: "1em", viewBox: "0 0 20 20", ...props, children: _jsx("path", { d: "M4.089 4.216l0.058-0.069c0.174-0.174 0.443-0.193 0.638-0.058l0.069 0.058 5.146 5.147 5.146-5.147c0.174-0.174 0.443-0.193 0.638-0.058l0.069 0.058c0.173 0.174 0.193 0.443 0.058 0.638l-0.058 0.069-5.147 5.146 5.147 5.146c0.173 0.174 0.193 0.443 0.058 0.638l-0.058 0.069c-0.174 0.173-0.443 0.193-0.638 0.058l-0.069-0.058-5.146-5.147-5.146 5.147c-0.174 0.173-0.443 0.193-0.638 0.058l-0.069-0.058c-0.174-0.174-0.193-0.443-0.058-0.638l0.058-0.069 5.147-5.146-5.147-5.146c-0.174-0.174-0.193-0.443-0.058-0.638v0z" }) }));
|
|
356
|
+
}
|
|
354
357
|
function IconAddCircleOutline(props) {
|
|
355
358
|
return (_jsxs("svg", { fontSize: props.fontSize ? props.fontSize : FONTSIZE, viewBox: "0 0 512 512", fill: "currentColor", height: "1em", width: "1em", ...props, children: [" ", _jsx("path", { fill: "none", stroke: "currentColor", strokeMiterlimit: 10, strokeWidth: 32, d: "M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z" }), " ", _jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 32, d: "M256 176v160M336 256H176" }), " "] }));
|
|
356
359
|
}
|