@topconsultnpm/sdkui-react-beta 6.6.14 → 6.6.16
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/TopMediaOrchestrator6.svg +92 -92
- package/lib/assets/icomoon.svg +96 -96
- package/lib/components/base/Styled.d.ts +22 -1919
- package/lib/components/base/TMAlert.d.ts +2 -3
- package/lib/components/base/TMButton.d.ts +7 -7
- 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 +7 -2
- package/lib/components/base/TMLayout.d.ts +36 -36
- package/lib/components/base/TMListView.d.ts +0 -1
- package/lib/components/base/TMTab.d.ts +4 -4
- package/lib/components/base/TMVilViewer.d.ts +1 -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 +5 -7
- 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/TMEditorStyled.d.ts +16 -17
- 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.d.ts +4 -4
- package/lib/components/forms/TMLoginForm.js +1 -1
- package/lib/components/query/TMQueryEditor.d.ts +12 -554
- package/lib/components/query/TMQueryEditor.js +10 -9
- 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/sidebar/TMSidebar.d.ts +0 -4
- package/lib/components/sidebar/TMSidebar.js +9 -12
- package/lib/components/sidebar/TMSidebarItem.d.ts +0 -7
- package/lib/components/sidebar/TMSidebarItem.js +4 -14
- 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/TMIcons.d.ts +1 -0
- package/lib/helper/TMIcons.js +3 -0
- 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/package.json +1 -1
|
@@ -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;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ValidationItem } from '@topconsultnpm/sdk-ts-beta';
|
|
3
2
|
export declare const editorColorManager: (validationItems: ValidationItem[]) => string;
|
|
4
|
-
export declare const StyledEditorContainer: import("styled-components").
|
|
3
|
+
export declare const StyledEditorContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
5
4
|
$width: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const StyledEditor: import("styled-components").
|
|
5
|
+
}>> & string;
|
|
6
|
+
export declare const StyledEditor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {
|
|
8
7
|
$vil: ValidationItem[];
|
|
9
8
|
$width: string;
|
|
10
9
|
$type: string;
|
|
@@ -12,29 +11,29 @@ export declare const StyledEditor: import("styled-components").IStyledComponent<
|
|
|
12
11
|
$maxValue: number;
|
|
13
12
|
$fontSize: string;
|
|
14
13
|
$disabled: boolean;
|
|
15
|
-
$isMobile?: boolean
|
|
16
|
-
}
|
|
17
|
-
export declare const StyledEditorIcon: import("styled-components").
|
|
14
|
+
$isMobile?: boolean;
|
|
15
|
+
}>> & string;
|
|
16
|
+
export declare const StyledEditorIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
18
17
|
$vil: ValidationItem[];
|
|
19
18
|
$disabled: boolean;
|
|
20
19
|
$isModified: boolean;
|
|
21
|
-
}
|
|
22
|
-
export declare const StyledEditorLabel: import("styled-components").
|
|
20
|
+
}>> & string;
|
|
21
|
+
export declare const StyledEditorLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
23
22
|
$isFocused: boolean;
|
|
24
|
-
$labelPosition:
|
|
23
|
+
$labelPosition: "right" | "left" | "top";
|
|
25
24
|
$disabled: boolean;
|
|
26
25
|
$fontSize: string;
|
|
27
|
-
}
|
|
28
|
-
export declare const StyledEditorButtonIcon: import("styled-components").
|
|
26
|
+
}>> & string;
|
|
27
|
+
export declare const StyledEditorButtonIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
29
28
|
$index: number;
|
|
30
29
|
$transform: string;
|
|
31
|
-
}
|
|
32
|
-
export declare const StyledTextareaEditor: import("styled-components").
|
|
30
|
+
}>> & string;
|
|
31
|
+
export declare const StyledTextareaEditor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, {
|
|
33
32
|
$vil: ValidationItem[];
|
|
34
33
|
$width: string;
|
|
35
34
|
$isModified: boolean;
|
|
36
35
|
$fontSize: string;
|
|
37
36
|
$disabled: boolean;
|
|
38
|
-
$isMobile?: boolean
|
|
39
|
-
$maxHeight?: string
|
|
40
|
-
}
|
|
37
|
+
$isMobile?: boolean;
|
|
38
|
+
$maxHeight?: string;
|
|
39
|
+
}>> & string;
|
|
@@ -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()] }) })] }));
|
|
@@ -23,10 +23,10 @@ export declare const cultureIDsDataSource: {
|
|
|
23
23
|
}[];
|
|
24
24
|
declare const TMLoginForm: React.FunctionComponent<ITMLoginFormProps>;
|
|
25
25
|
export declare const TMChangePassword: ({ tmSession, username, onClose, enable, hasBack }: {
|
|
26
|
-
hasBack?: boolean
|
|
27
|
-
tmSession?: ITopMediaSession
|
|
26
|
+
hasBack?: boolean;
|
|
27
|
+
tmSession?: ITopMediaSession;
|
|
28
28
|
username: string;
|
|
29
|
-
onClose?: (
|
|
30
|
-
enable?: boolean
|
|
29
|
+
onClose?: () => void;
|
|
30
|
+
enable?: boolean;
|
|
31
31
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
export default TMLoginForm;
|
|
@@ -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) })] })
|