@topconsultnpm/sdkui-react-beta 6.7.11 → 6.7.12

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.
@@ -1,10 +1,23 @@
1
1
  import React from "react";
2
- import { AppModules, CultureIDs, ITopMediaSession, SessionDescriptor } from "@topconsultnpm/sdk-ts-beta";
2
+ import { AppModules, ArchiveDescriptor, AuthenticationModes, CultureIDs, ITopMediaSession, SessionDescriptor } from "@topconsultnpm/sdk-ts-beta";
3
3
  import { DeviceType } from "../base/TMDeviceProvider";
4
4
  export declare const onChangeLanguage: (cultureID: CultureIDs) => void;
5
5
  export declare const useCultureID: ({ cultureID }: {
6
6
  cultureID: CultureIDs;
7
7
  }) => CultureIDs;
8
+ export declare const LOGIN_HISTORY_KEY = "LOGIN_HISTORY";
9
+ export interface ITMLoginHistory {
10
+ id: number;
11
+ name: string;
12
+ endpoint: TMEndpointsType | undefined;
13
+ archive: ArchiveDescriptor | undefined;
14
+ domain: string;
15
+ domainAlternative: string;
16
+ authenticationMode: AuthenticationModes;
17
+ username: string;
18
+ language: CultureIDs;
19
+ onBehalfUsername: string;
20
+ }
8
21
  export type TMEndpointsType = {
9
22
  Description: string;
10
23
  URL: string;
@@ -17,6 +30,7 @@ interface ITMLoginFormProps {
17
30
  onLogged: (tmSession: ITopMediaSession) => void;
18
31
  onChangeLanguage?: (e: CultureIDs) => void;
19
32
  cultureID?: CultureIDs;
33
+ saveLoginHistoryToLocalStorage?: boolean;
20
34
  }
21
35
  export declare const cultureIDsDataSource: {
22
36
  value: CultureIDs;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useState } from "react";
3
- import { AppModules, AuthenticationModes, CultureIDs, ChangePswDescriptor, SDK_Localizator, SessionDescriptor, TopMediaServer, ValidationItem, ResultTypes, SDK_Globals } from "@topconsultnpm/sdk-ts-beta";
3
+ import { AppModules, AuthenticationModes, CultureIDs, ChangePswDescriptor, SDK_Localizator, SessionDescriptor, TopMediaServer, ValidationItem, ResultTypes, SDK_Globals, LocalStorageService } from "@topconsultnpm/sdk-ts-beta";
4
4
  import deMessages from "devextreme/localization/messages/de.json";
5
5
  import enMessages from "devextreme/localization/messages/en.json";
6
6
  import esMessages from "devextreme/localization/messages/es.json";
@@ -26,6 +26,8 @@ import TMButton from "../base/TMButton";
26
26
  import TMSummary from "../editors/TMSummary";
27
27
  import TMDropDown from "../editors/TMDropDown";
28
28
  import { DeviceType, useDeviceType } from "../base/TMDeviceProvider";
29
+ import TMLoginPopupSaveLoginInfo from "./TMLoginPopupSaveLoginInfo";
30
+ import TMCheckBox from "../editors/TMCheckBox";
29
31
  export const onChangeLanguage = (cultureID) => {
30
32
  //localizzazione devexpress
31
33
  switch (cultureID) {
@@ -67,6 +69,7 @@ export const useCultureID = ({ cultureID = CultureIDs.It_IT }) => {
67
69
  }, []);
68
70
  return (currentCultureID);
69
71
  };
72
+ export const LOGIN_HISTORY_KEY = 'LOGIN_HISTORY';
70
73
  const StyledLoginContainer = styled.div ` position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); box-shadow: 3px 3px 10px #00000024; width: ${props => props.$responsiveWidth ? props.$responsiveWidth : '51%'}; height: ${props => props.$responsiveHeight ? props.$responsiveHeight : '71%'}; border-radius: 10px; display: flex; flex-direction: row; justify-content: space-between; align-items: center; background: #FFFFFF 0% 0% no-repeat padding-box; overflow: hidden; `;
71
74
  const StyledContainer = styled.div ` width: 100%; overflow: auto; height: 100%; position: absolute; `;
72
75
  const StyledHeaderText = styled.p ` padding-top: 25px; padding-bottom: 15px; font-size: 1.4rem; font-weight: bolder; color: ${TMColors.primary}; `;
@@ -109,6 +112,11 @@ const TMLoginForm = (props) => {
109
112
  const otp6Ref = useRef(null);
110
113
  const [otpValues, setOtpValues] = useState(['', '', '', '', '', '']);
111
114
  const [otpHasFilled, setOtpHasFilled] = useState([false, false, false, false, false, false]);
115
+ // popup save login State
116
+ const [popupSaveLoginInfoVisible, setPopupSaveLoginInfoVisible] = useState(false);
117
+ const [saveLoginInfo, setSaveLoginInfo] = useState(false);
118
+ const [saveLoginInfoName, setSaveLoginInfoName] = useState("");
119
+ const [loginHistory, setLoginHistory] = useState(LocalStorageService.getItem(LOGIN_HISTORY_KEY) ?? []);
112
120
  useEffect(() => {
113
121
  let interval;
114
122
  if (recoveryPasswordState.step === 2 && wait > 0) {
@@ -156,7 +164,7 @@ const TMLoginForm = (props) => {
156
164
  }
157
165
  else
158
166
  setArchiveID(''); }, [archive]);
159
- useEffect(() => { loginValidator(); }, [username, password, domain, endpoint, archive, archives, domainAlternative, archiveID, props.cultureID, authMode, onBehalfUsername, onBeHalfPassword]);
167
+ useEffect(() => { loginValidator(); }, [username, password, domain, endpoint, archive, archives, domainAlternative, archiveID, props.cultureID, authMode, onBehalfUsername, onBeHalfPassword, saveLoginInfo, saveLoginInfoName]);
160
168
  useEffect(() => { recoveryPasswordValidator(); }, [recoveryPasswordState.confermPassword, recoveryPasswordState.email, recoveryPasswordState.newPassword, recoveryPasswordState.otp, recoveryPasswordState.step]);
161
169
  useEffect(() => {
162
170
  let arr = [...otpHasFilled];
@@ -327,6 +335,25 @@ const TMLoginForm = (props) => {
327
335
  ;
328
336
  setLoginValidationItems(arr);
329
337
  }
338
+ if (saveLoginInfo && saveLoginInfoName.length === 0) {
339
+ if (!arr.find(item => item.PropertyName === 'saveLoginName')) {
340
+ arr.push(new ValidationItem(ResultTypes.ERROR, 'saveLoginName', SDK_Localizator.RequiredField));
341
+ }
342
+ ;
343
+ setLoginValidationItems(arr);
344
+ }
345
+ else {
346
+ const findItemByField = LocalStorageService.findItemByField(LOGIN_HISTORY_KEY, "name", saveLoginInfoName);
347
+ if (findItemByField) {
348
+ if (!arr.find(item => item.PropertyName === 'saveLoginName')) {
349
+ arr.push(new ValidationItem(ResultTypes.ERROR, 'saveLoginName', SDKUI_Localizator.DuplicateNameError));
350
+ }
351
+ }
352
+ else {
353
+ arr = arr.filter(item => item.PropertyName !== 'saveLoginName');
354
+ }
355
+ setLoginValidationItems(arr);
356
+ }
330
357
  switch (authMode) {
331
358
  case AuthenticationModes.TopMedia:
332
359
  arr.filter(item => item.PropertyName !== 'domain' && item.PropertyName !== 'domain_alt' && item.PropertyName !== 'onBeHalfUsername' && item.PropertyName !== 'onBeHalfPassword');
@@ -400,6 +427,22 @@ const TMLoginForm = (props) => {
400
427
  break;
401
428
  }
402
429
  };
430
+ const updateLoginHistory = (newEntry) => {
431
+ // Get the existing history from localStorage or initialize an empty array if none exists
432
+ const currentHistory = JSON.parse(localStorage.getItem(LOGIN_HISTORY_KEY) ?? "[]");
433
+ // Generate a new ID (incremental)
434
+ const newId = currentHistory.length > 0 ? Math.max(...currentHistory.map((item) => item.id)) + 1 : 1;
435
+ // Create a new object with the generated ID
436
+ const newLoginHistory = { ...newEntry, id: newId };
437
+ // Add the new entry to the current history
438
+ currentHistory.push(newLoginHistory);
439
+ // Update Login History State
440
+ setLoginHistory(currentHistory);
441
+ // Save the updated array back to localStorage
442
+ LocalStorageService.setItem(LOGIN_HISTORY_KEY, currentHistory);
443
+ };
444
+ const showPopupSaveLoginInfo = () => { setPopupSaveLoginInfoVisible(true); };
445
+ const hidePopupSaveLoginInfo = () => { setPopupSaveLoginInfoVisible(false); };
403
446
  const recoveryPasswordValidator = () => {
404
447
  let arr = [...recoveryPasswordValidationItems];
405
448
  let char_upperCase = new RegExp(/([A-Z])/g);
@@ -638,6 +681,30 @@ const TMLoginForm = (props) => {
638
681
  catch (e) {
639
682
  TMExceptionBoxManager.show({ exception: e });
640
683
  }
684
+ finally {
685
+ try {
686
+ if (SDK_Globals.tmSession && saveLoginInfo && saveLoginInfoName.length > 0) {
687
+ const maxId = loginHistory.reduce((max, item) => (item.id > max ? item.id : max), 0);
688
+ const loginHistoryNewEntry = {
689
+ id: maxId + 1,
690
+ name: saveLoginInfoName,
691
+ endpoint: endpoint ?? undefined,
692
+ archive: archive ?? undefined,
693
+ domain: domain ?? '',
694
+ domainAlternative: domainAlternative ?? '',
695
+ authenticationMode: authMode,
696
+ username: username,
697
+ language: props.cultureID ?? CultureIDs.None,
698
+ onBehalfUsername: onBehalfUsername,
699
+ };
700
+ updateLoginHistory(loginHistoryNewEntry);
701
+ }
702
+ }
703
+ catch (e) {
704
+ // Login failed
705
+ console.log("Login failed. Please check your username and password.");
706
+ }
707
+ }
641
708
  TMSpinner.hide();
642
709
  }
643
710
  async function getArchivesAsync() {
@@ -769,15 +836,15 @@ const TMLoginForm = (props) => {
769
836
  setOtpValues(['', '', '', '', '', '']);
770
837
  }
771
838
  };
772
- return (_jsx(StyledLoginContainer, { "$responsiveHeight": calcResponsiveSizes(deviceType, '75%', '96%', '98%'), "$responsiveWidth": calcResponsiveSizes(deviceType, '55%', '95%', '95%'), children: _jsxs(TMLayoutContainer, { direction: calcResponsiveDirection(deviceType, "horizontal", "vertical", "vertical"), children: [_jsx(TMLayoutItem, { width: calcResponsiveSizes(deviceType, "40%", "100%", "100%"), height: calcResponsiveSizes(deviceType, '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(deviceType, '21%', '50%', '50%'), "$top": '20%', children: _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: "" }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column' }, children: [_jsx("div", { style: { fontSize: '0.8rem', color: '#343434', fontWeight: 'lighter' }, children: "TopMedia" }), _jsx("div", { style: { fontSize: '2.5rem', lineHeight: 1 }, children: SDK_Globals.appModule })] })] }) }) }) }) }), _jsxs(TMLayoutItem, { width: calcResponsiveSizes(deviceType, "60%", "100%", "100%"), height: calcResponsiveSizes(deviceType, '100%', '80%', '80%'), children: [togglePages.recovery &&
773
- _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(deviceType, '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(deviceType, '150px', '150px', '300px'), height: calcResponsiveSizes(deviceType, '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, { deviceType: deviceType, 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(deviceType, '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(deviceType, '30px', '40px', '40px'), fontSize: "0.8rem", onClick: backToLogin, icon: _jsx(IconArrowLeft, {}) }), _jsx(TMButton, { width: calcResponsiveSizes(deviceType, '150px', '150px', '300px'), height: calcResponsiveSizes(deviceType, '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(deviceType, '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(deviceType, '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(deviceType, '30px', '40px', '40px'), fontSize: "0.8rem", onClick: backToLogin, icon: _jsx(IconArrowLeft, {}) }), _jsx(TMButton, { width: calcResponsiveSizes(deviceType, '150px', '150px', '300px'), height: calcResponsiveSizes(deviceType, '30px', '40px', '40px'), fontSize: "1rem", disabled: !selectedArchive, caption: SDKUI_Localizator.Select, onClick: () => { setArchive(selectedArchive); backToLogin(); setSelectedArchive(undefined); }, showTooltip: false })] }) })] }) }), (isLoginPage()) &&
774
- _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(deviceType, '40px', '40px', '10px')}` }, children: _jsx(TMCard, { showBorder: false, children: _jsxs(TMLayoutContainer, { children: [_jsxs(TMLayoutItem, { children: [_jsx(TMSummary, { label: SDKUI_Localizator.Endpoint, icon: _jsx(IconAccessPoint, {}), showClearButton: true, 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 ?
775
- _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 }) :
776
- _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 ?
777
- _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) })] })
778
- :
779
- _jsxs(_Fragment, { children: [_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(TMLayoutItem, { children: _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) }) })] }) }), authMode === AuthenticationModes.TopMediaOnBehalfOf && _jsx(TMLayoutItem, { children: _jsxs(TMLayoutContainer, { direction: "horizontal", children: [_jsx(TMLayoutItem, { children: _jsxs(TMLayoutContainer, { children: [_jsx(TMLayoutItem, { children: _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(TMLayoutItem, { children: _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) }) })] }) }), _jsx(TMLayoutItem, { children: _jsxs(TMLayoutContainer, { children: [_jsx(TMLayoutItem, { children: _jsx(TMTextBox, { label: SDKUI_Localizator.Domain, icon: _jsx(IconWeb, {}), value: domain, onValueChanged: (e) => setDomain(e.target.value), validationItems: loginValidationItems.filter(item => item.PropertyName === 'domain') }) }), _jsx(TMLayoutItem, { children: _jsx(TMTextBox, { label: SDKUI_Localizator.UserName, icon: _jsx(IconUser, {}), value: onBehalfUsername, onValueChanged: (e) => setOnBeHalfUsername(e.target.value), validationItems: loginValidationItems.filter(item => item.PropertyName === 'onBeHalfUsername') }) })] }) })] }) }), authMode !== AuthenticationModes.TopMediaOnBehalfOf ? _jsx(TMLayoutItem, { children: _jsx(TMDropDown, { dataSource: cultureIDsDataSource, icon: _jsx(IconLanguage, {}), label: SDKUI_Localizator.CultureID, onValueChanged: (e) => props.onChangeLanguage && props.onChangeLanguage(e.target.value), value: props.cultureID, validationItems: loginValidationItems.filter(item => item.PropertyName === 'cultureId') }) }) :
780
- _jsxs(TMLayoutContainer, { direction: "horizontal", children: [_jsx(TMLayoutItem, { children: _jsx(TMDropDown, { dataSource: cultureIDsDataSource, icon: _jsx(IconLanguage, {}), label: SDKUI_Localizator.CultureID, onValueChanged: (e) => props.onChangeLanguage && props.onChangeLanguage(e.target.value), value: props.cultureID, validationItems: loginValidationItems.filter(item => item.PropertyName === 'cultureId') }) }), _jsx(TMLayoutItem, { children: _jsx(TMTextBox, { type: "password", label: SDKUI_Localizator.Password, icon: _jsx(IconPassword, {}), value: onBeHalfPassword, onValueChanged: (e) => setOnBeHalfPassword(e.target.value), validationItems: loginValidationItems.filter(item => item.PropertyName === 'onBeHalfPassword') }) })] })] }) }) }) }), authMode === AuthenticationModes.TopMedia && _jsxs(TMLayoutItem, { height: "fit-content", width: "fit-content", children: [_jsx("p", { onClick: () => isPasswordChangeEnable() && setTogglePages({ recovery: false, change: true, archive: false, endpoint: false }), tabIndex: isPasswordChangeEnable() ? 0 : undefined, onKeyDown: (e) => e.code === 'Space' && setTogglePages({ recovery: false, change: true, archive: false, endpoint: false }), style: { userSelect: 'none', cursor: isPasswordChangeEnable() ? 'pointer' : 'default', color: isPasswordChangeEnable() ? TMColors.primary : 'rgb(180,180,180)', textAlign: 'center', fontSize: '0.9rem' }, children: SDKUI_Localizator.ChangePassword }), _jsx("p", { tabIndex: isPasswordChangeEnable() ? 0 : undefined, onKeyDown: (e) => e.code === 'Space' && showRecoveryPassword(), onClick: () => isPasswordChangeEnable() && showRecoveryPassword(), style: { userSelect: 'none', marginTop: '10px', cursor: isPasswordChangeEnable() ? 'pointer' : 'default', color: isPasswordChangeEnable() ? TMColors.primary : 'rgb(180,180,180)', fontSize: '0.9rem' }, children: SDKUI_Localizator.ForgetPassword })] }), _jsx(TMLayoutItem, { height: "fit-content", children: _jsx("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'center', padding: '20px 0' }, children: _jsx(TMButton, { width: calcResponsiveSizes(deviceType, '150px', '150px', '250px'), height: calcResponsiveSizes(deviceType, '30px', '40px', '40px'), fontSize: "1.1rem", caption: "Login", disabled: loginValidationItems.length > 0, onClick: login, showTooltip: false }) }) })] }) })] })] }) }));
839
+ return (_jsxs(StyledLoginContainer, { "$responsiveHeight": calcResponsiveSizes(deviceType, '75%', '96%', '98%'), "$responsiveWidth": calcResponsiveSizes(deviceType, '55%', '95%', '95%'), children: [_jsxs(TMLayoutContainer, { direction: calcResponsiveDirection(deviceType, "horizontal", "vertical", "vertical"), children: [_jsx(TMLayoutItem, { width: calcResponsiveSizes(deviceType, "40%", "100%", "100%"), height: calcResponsiveSizes(deviceType, '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(deviceType, '21%', '50%', '50%'), "$top": '20%', children: _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: "" }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column' }, children: [_jsx("div", { style: { fontSize: '0.8rem', color: '#343434', fontWeight: 'lighter' }, children: "TopMedia" }), _jsx("div", { style: { fontSize: '2.5rem', lineHeight: 1 }, children: SDK_Globals.appModule })] })] }) }) }) }) }), _jsxs(TMLayoutItem, { width: calcResponsiveSizes(deviceType, "60%", "100%", "100%"), height: calcResponsiveSizes(deviceType, '100%', '80%', '80%'), children: [togglePages.recovery &&
840
+ _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(deviceType, '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(deviceType, '150px', '150px', '300px'), height: calcResponsiveSizes(deviceType, '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, { deviceType: deviceType, 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(deviceType, '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(deviceType, '30px', '40px', '40px'), fontSize: "0.8rem", onClick: backToLogin, icon: _jsx(IconArrowLeft, {}) }), _jsx(TMButton, { width: calcResponsiveSizes(deviceType, '150px', '150px', '300px'), height: calcResponsiveSizes(deviceType, '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(deviceType, '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(deviceType, '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(deviceType, '30px', '40px', '40px'), fontSize: "0.8rem", onClick: backToLogin, icon: _jsx(IconArrowLeft, {}) }), _jsx(TMButton, { width: calcResponsiveSizes(deviceType, '150px', '150px', '300px'), height: calcResponsiveSizes(deviceType, '30px', '40px', '40px'), fontSize: "1rem", disabled: !selectedArchive, caption: SDKUI_Localizator.Select, onClick: () => { setArchive(selectedArchive); backToLogin(); setSelectedArchive(undefined); }, showTooltip: false })] }) })] }) }), (isLoginPage()) &&
841
+ _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(deviceType, '40px', '40px', '10px')}` }, children: _jsx(TMCard, { showBorder: false, children: _jsxs(TMLayoutContainer, { children: [_jsxs(TMLayoutItem, { children: [_jsx(TMSummary, { label: SDKUI_Localizator.Endpoint, icon: _jsx(IconAccessPoint, {}), showClearButton: true, 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 ?
842
+ _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 }) :
843
+ _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 ?
844
+ _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) })] })
845
+ :
846
+ _jsxs(_Fragment, { children: [_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(TMLayoutItem, { children: _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) }) })] }) }), authMode === AuthenticationModes.TopMediaOnBehalfOf && _jsx(TMLayoutItem, { children: _jsxs(TMLayoutContainer, { direction: "horizontal", children: [_jsx(TMLayoutItem, { children: _jsxs(TMLayoutContainer, { children: [_jsx(TMLayoutItem, { children: _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(TMLayoutItem, { children: _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) }) })] }) }), _jsx(TMLayoutItem, { children: _jsxs(TMLayoutContainer, { children: [_jsx(TMLayoutItem, { children: _jsx(TMTextBox, { label: SDKUI_Localizator.Domain, icon: _jsx(IconWeb, {}), value: domain, onValueChanged: (e) => setDomain(e.target.value), validationItems: loginValidationItems.filter(item => item.PropertyName === 'domain') }) }), _jsx(TMLayoutItem, { children: _jsx(TMTextBox, { label: SDKUI_Localizator.UserName, icon: _jsx(IconUser, {}), value: onBehalfUsername, onValueChanged: (e) => setOnBeHalfUsername(e.target.value), validationItems: loginValidationItems.filter(item => item.PropertyName === 'onBeHalfUsername') }) })] }) })] }) }), authMode !== AuthenticationModes.TopMediaOnBehalfOf ? _jsx(TMLayoutItem, { children: _jsx(TMDropDown, { dataSource: cultureIDsDataSource, icon: _jsx(IconLanguage, {}), label: SDKUI_Localizator.CultureID, onValueChanged: (e) => props.onChangeLanguage && props.onChangeLanguage(e.target.value), value: props.cultureID, validationItems: loginValidationItems.filter(item => item.PropertyName === 'cultureId') }) }) :
847
+ _jsxs(TMLayoutContainer, { direction: "horizontal", children: [_jsx(TMLayoutItem, { children: _jsx(TMDropDown, { dataSource: cultureIDsDataSource, icon: _jsx(IconLanguage, {}), label: SDKUI_Localizator.CultureID, onValueChanged: (e) => props.onChangeLanguage && props.onChangeLanguage(e.target.value), value: props.cultureID, validationItems: loginValidationItems.filter(item => item.PropertyName === 'cultureId') }) }), _jsx(TMLayoutItem, { children: _jsx(TMTextBox, { type: "password", label: SDKUI_Localizator.Password, icon: _jsx(IconPassword, {}), value: onBeHalfPassword, onValueChanged: (e) => setOnBeHalfPassword(e.target.value), validationItems: loginValidationItems.filter(item => item.PropertyName === 'onBeHalfPassword') }) })] }), props.saveLoginHistoryToLocalStorage && _jsxs(TMLayoutItem, { children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', marginTop: 12 }, children: [_jsx("i", { style: { fontSize: 20 }, className: "dx-icon-save" }), _jsx(TMCheckBox, { elementStyle: { marginLeft: 5 }, labelPosition: "left", label: SDKUI_Localizator.RememberCredentials, value: saveLoginInfo, onValueChanged: () => { setSaveLoginInfo(prevSaveLoginInfo => !prevSaveLoginInfo); }, isModifiedWhen: saveLoginInfo })] }), saveLoginInfo && _jsx(TMTextBox, { type: "text", label: SDKUI_Localizator.EnterNameForAccess, icon: _jsx("i", { style: { fontSize: 20 }, className: "dx-icon-save" }), value: saveLoginInfoName, onValueChanged: (e) => setSaveLoginInfoName(e.target.value), validationItems: loginValidationItems.filter(item => item.PropertyName === 'saveLoginName') })] })] }) }) }) }), _jsxs(TMLayoutItem, { height: "fit-content", width: "fit-content", children: [props.saveLoginHistoryToLocalStorage && _jsx("p", { onClick: showPopupSaveLoginInfo, onKeyDown: (e) => { }, style: { marginTop: '10px', userSelect: 'none', cursor: 'pointer', color: TMColors.primary, textAlign: 'center', fontSize: '0.9rem' }, children: SDKUI_Localizator.SwitchUser }), authMode === AuthenticationModes.TopMedia && _jsxs("div", { children: [_jsx("p", { onClick: () => isPasswordChangeEnable() && setTogglePages({ recovery: false, change: true, archive: false, endpoint: false }), tabIndex: isPasswordChangeEnable() ? 0 : undefined, onKeyDown: (e) => e.code === 'Space' && setTogglePages({ recovery: false, change: true, archive: false, endpoint: false }), style: { marginTop: '10px', userSelect: 'none', cursor: isPasswordChangeEnable() ? 'pointer' : 'default', color: isPasswordChangeEnable() ? TMColors.primary : 'rgb(180,180,180)', textAlign: 'center', fontSize: '0.9rem' }, children: SDKUI_Localizator.ChangePassword }), _jsx("p", { tabIndex: isPasswordChangeEnable() ? 0 : undefined, onKeyDown: (e) => e.code === 'Space' && showRecoveryPassword(), onClick: () => isPasswordChangeEnable() && showRecoveryPassword(), style: { userSelect: 'none', marginTop: '10px', cursor: isPasswordChangeEnable() ? 'pointer' : 'default', color: isPasswordChangeEnable() ? TMColors.primary : 'rgb(180,180,180)', fontSize: '0.9rem' }, children: SDKUI_Localizator.ForgetPassword })] })] }), _jsx(TMLayoutItem, { height: "fit-content", children: _jsx("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'center', padding: '20px 0' }, children: _jsx(TMButton, { width: calcResponsiveSizes(deviceType, '150px', '150px', '250px'), height: calcResponsiveSizes(deviceType, '30px', '40px', '40px'), fontSize: "1.1rem", caption: "Login", disabled: loginValidationItems.length > 0, onClick: login, showTooltip: false }) }) })] }) })] })] }), _jsx(TMLoginPopupSaveLoginInfo, { visible: popupSaveLoginInfoVisible, hidePopup: hidePopupSaveLoginInfo, loginHistory: loginHistory, setLoginHistory: setLoginHistory, setEndpoint: setEndpoint, setArchive: setArchive, setAuthMode: setAuthMode, setUsername: setUsername, setPassword: setPassword, setDomain: setDomain, setDomainArternative: setDomainArternative, setOnBeHalfUsername: setOnBeHalfUsername, setOnBeHalfPassword: setOnBeHalfPassword, onChangeLanguage: onChangeLanguage })] }));
781
848
  };
782
849
  const TMPasswordManager = ({ validationItems = [], operation = 'change' }) => {
783
850
  const passwordStrength = () => {
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { ITMLoginHistory, TMEndpointsType } from "./TMLoginForm";
3
+ import { ArchiveDescriptor, AuthenticationModes, CultureIDs } from "@topconsultnpm/sdk-ts-beta";
4
+ interface TMLoginPopupSaveLoginInfoProps {
5
+ loginHistory: Array<ITMLoginHistory>;
6
+ setLoginHistory: React.Dispatch<React.SetStateAction<Array<ITMLoginHistory>>>;
7
+ visible: boolean;
8
+ hidePopup: () => void;
9
+ setEndpoint: React.Dispatch<React.SetStateAction<TMEndpointsType | undefined>>;
10
+ setArchive: React.Dispatch<React.SetStateAction<ArchiveDescriptor | undefined>>;
11
+ setAuthMode: React.Dispatch<React.SetStateAction<AuthenticationModes>>;
12
+ setUsername: React.Dispatch<React.SetStateAction<string>>;
13
+ setPassword: React.Dispatch<React.SetStateAction<string>>;
14
+ setDomain: React.Dispatch<React.SetStateAction<string>>;
15
+ setDomainArternative: React.Dispatch<React.SetStateAction<string>>;
16
+ setOnBeHalfUsername: React.Dispatch<React.SetStateAction<string>>;
17
+ setOnBeHalfPassword: React.Dispatch<React.SetStateAction<string>>;
18
+ onChangeLanguage?: (e: CultureIDs) => void;
19
+ }
20
+ declare const TMLoginPopupSaveLoginInfo: (props: TMLoginPopupSaveLoginInfoProps) => import("react/jsx-runtime").JSX.Element;
21
+ export default TMLoginPopupSaveLoginInfo;
@@ -0,0 +1,113 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from "react";
3
+ import { Accordion, LoadIndicator, Popup, ScrollView } from "devextreme-react";
4
+ import { LOGIN_HISTORY_KEY, } from "./TMLoginForm";
5
+ import { LocalStorageService } from "@topconsultnpm/sdk-ts-beta";
6
+ import { Item } from "devextreme-react/cjs/accordion";
7
+ import { SDKUI_Localizator } from "../../helper/SDKUI_Localizator";
8
+ import { ButtonNames, TMExceptionBoxManager, TMMessageBoxManager } from "../base/TMPopUp";
9
+ import TMTooltip from "../base/TMTooltip";
10
+ import TMTextBox from "../editors/TMTextBox";
11
+ const TMLoginPopupSaveLoginInfo = (props) => {
12
+ const { loginHistory, setLoginHistory, visible, hidePopup, setEndpoint, setArchive, setAuthMode, setUsername, setPassword, setDomain, setDomainArternative, setOnBeHalfUsername, setOnBeHalfPassword, onChangeLanguage } = props;
13
+ const [loginHistoryData, setLoginHistoryData] = useState(loginHistory);
14
+ const [loading, setLoading] = useState(false);
15
+ const [searchText, setSearchText] = useState('');
16
+ useEffect(() => {
17
+ let timeoutId;
18
+ if (searchText.length > 0) {
19
+ setLoading(true);
20
+ timeoutId = setTimeout(() => {
21
+ setLoginHistoryData(loginHistory.filter(data => data.name.toLowerCase().includes(searchText.toLowerCase())));
22
+ setLoading(false);
23
+ }, 300);
24
+ }
25
+ else {
26
+ setLoginHistoryData(loginHistory);
27
+ setLoading(false);
28
+ }
29
+ return () => {
30
+ clearTimeout(timeoutId);
31
+ };
32
+ }, [searchText]);
33
+ // Function to generate a hash from a string (text)
34
+ const stringToHash = (str) => {
35
+ let hash = 0;
36
+ for (let i = 0; i < str.length; i++) {
37
+ hash = (hash << 5) - hash + str.charCodeAt(i);
38
+ hash = hash & hash; // Convert to 32bit integer
39
+ }
40
+ return hash;
41
+ };
42
+ const getRandomColorFromText = (text) => {
43
+ const hash = stringToHash(text);
44
+ // Map the hash to a color, using the hash value for RGB
45
+ const r = (hash & 0xFF0000) >> 16; // Red (8 bits)
46
+ const g = (hash & 0x00FF00) >> 8; // Green (8 bits)
47
+ const b = hash & 0x0000FF; // Blue (8 bits)
48
+ // Ensure the RGB values are within the valid range (0-255)
49
+ return `rgb(${r % 256}, ${g % 256}, ${b % 256})`;
50
+ };
51
+ // Function to calculate luminance from a hex color
52
+ const getLuminance = (color) => {
53
+ // Using slice() instead of substr()
54
+ let r = parseInt(color.slice(1, 3), 16) / 255; // slice(1, 3) extracts the hex digits for red
55
+ let g = parseInt(color.slice(3, 5), 16) / 255; // slice(3, 5) extracts the hex digits for green
56
+ let b = parseInt(color.slice(5, 7), 16) / 255; // slice(5, 7) extracts the hex digits for blue
57
+ // Apply the luminance formula
58
+ const a = [r, g, b].map(c => c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4));
59
+ const luminance = 0.2126 * a[0] + 0.7152 * a[1] + 0.0722 * a[2];
60
+ return luminance;
61
+ };
62
+ // Function to determine text color based on background luminance
63
+ const getTextColor = (backgroundColor) => {
64
+ return getLuminance(backgroundColor) > 0.5 ? 'black' : 'white';
65
+ };
66
+ const titleRender = () => (_jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', width: '100%' }, children: [_jsx("h3", { children: SDKUI_Localizator.SwitchUser }), _jsx("button", { style: { background: 'none', border: 'none', fontSize: '16px', cursor: 'pointer' }, onClick: hidePopup, children: _jsx("i", { style: { fontSize: 20 }, className: "dx-icon-remove" }) })] }));
67
+ const deleteItemFromLocalStorage = (name) => {
68
+ const msg = SDKUI_Localizator.Delete_ConfirmFor1.replaceParams(name);
69
+ TMMessageBoxManager.show({
70
+ title: SDKUI_Localizator.Delete, message: msg, buttons: [ButtonNames.YES, ButtonNames.NO],
71
+ onButtonClick: async (e) => {
72
+ if (e !== ButtonNames.YES)
73
+ return;
74
+ try {
75
+ LocalStorageService.deleteItemByField(LOGIN_HISTORY_KEY, "name", name);
76
+ setLoginHistory(LocalStorageService.getItem(LOGIN_HISTORY_KEY) ?? []);
77
+ }
78
+ catch (e) {
79
+ TMExceptionBoxManager.show({ exception: e });
80
+ }
81
+ }
82
+ });
83
+ };
84
+ const fillLoginForm = (data) => {
85
+ setEndpoint(data.endpoint);
86
+ setArchive(data.archive);
87
+ setUsername(data.username);
88
+ setPassword("");
89
+ setAuthMode(data.authenticationMode);
90
+ setDomain(data.domain);
91
+ setDomainArternative(data.domainAlternative);
92
+ setOnBeHalfUsername(data.onBehalfUsername);
93
+ setOnBeHalfPassword("");
94
+ if (onChangeLanguage)
95
+ onChangeLanguage(data.language);
96
+ hidePopup();
97
+ };
98
+ const itemTemplate = (data) => {
99
+ // Generate a random background color for the circle
100
+ const randomBGColor = getRandomColorFromText(data.name);
101
+ // Determine the text color (black or white) based on background color luminance
102
+ const textColor = getTextColor(randomBGColor);
103
+ return _jsx(ScrollView, { direction: "horizontal", showScrollbar: "always", style: { width: '100%' }, useNative: true, children: _jsxs("div", { style: { display: 'flex', background: '#fff', boxShadow: '0 4px 20px rgba(0, 0, 0, 0.1)', overflow: 'hidden', width: '100%', justifyContent: 'center', alignItems: 'center' }, children: [_jsx(TMTooltip, { content: data.name, children: _jsx("div", { style: { background: randomBGColor, color: textColor, display: 'flex', justifyContent: 'center', alignItems: 'center', width: '15vw', height: '15vw', maxWidth: '70px', maxHeight: '70px', borderRadius: '50%', fontWeight: 'bold', margin: '20px', textAlign: 'center' }, children: data.name.slice(0, 3).toUpperCase() }) }), _jsxs("div", { style: { padding: '5px', flex: 1 }, children: [_jsxs("div", { style: { marginBottom: '12px', fontSize: '1em', color: '#555' }, children: [SDKUI_Localizator.Name, ": ", _jsxs("span", { style: { fontWeight: 'bold', color: '#333' }, children: [" ", data.name] })] }), _jsxs("div", { style: { marginBottom: '12px', fontSize: '1em', color: '#555' }, children: [SDKUI_Localizator.Endpoint, ": ", _jsxs("span", { style: { fontWeight: 'bold', color: '#333' }, children: [" ", data.endpoint?.Description ?? '', "/", data.username] }), " "] }), _jsxs("div", { style: { marginBottom: '12px', fontSize: '1em', color: '#555' }, children: [SDKUI_Localizator.ArchiveID, ": ", _jsxs("span", { style: { fontWeight: 'bold', color: '#333' }, children: [" ", data.archive?.description ?? ''] })] }), _jsxs("div", { style: { marginBottom: '12px', fontSize: '1em', color: '#555' }, children: [SDKUI_Localizator.AuthMode, ":", _jsxs("span", { style: { fontWeight: 'bold', color: '#333' }, children: [" ", data.authenticationMode] })] }), _jsxs("div", { style: { marginBottom: '12px', fontSize: '1em', color: '#555' }, children: [SDKUI_Localizator.CultureID, ":", _jsxs("span", { style: { fontWeight: 'bold', color: '#333' }, children: [" ", data.language] })] }), _jsxs("div", { style: { display: 'flex', justifyContent: 'flex-start', alignItems: 'center' }, children: [_jsx(TMTooltip, { content: "Login", children: _jsx("div", { onClick: () => { fillLoginForm(data); }, style: { backgroundColor: randomBGColor, color: textColor, display: 'flex', justifyContent: 'center', alignItems: 'center', width: '15vw', height: '15vw', maxWidth: '50px', maxHeight: '50px', borderRadius: '50%', fontWeight: 'bold', marginRight: '10px', textAlign: 'center' }, children: _jsx("i", { className: "dx-icon-login", style: { fontSize: '1.5em', color: textColor, cursor: 'pointer' } }) }) }), _jsx(TMTooltip, { content: SDKUI_Localizator.Delete, children: _jsx("div", { onClick: () => { deleteItemFromLocalStorage(data.name); }, style: { backgroundColor: "#ff4d4f", display: 'flex', justifyContent: 'center', alignItems: 'center', width: '15vw', height: '15vw', maxWidth: '50px', maxHeight: '50px', borderRadius: '50%', fontWeight: 'bold', textAlign: 'center' }, children: _jsx("i", { className: "dx-icon-trash", style: { fontSize: '1.5em', color: getTextColor("#ff4d4f"), cursor: 'pointer' } }) }) })] })] })] }) });
104
+ };
105
+ const onSearchValueChanged = (e) => {
106
+ if (e === undefined)
107
+ return;
108
+ setSearchText(e.target.value);
109
+ };
110
+ return _jsxs(Popup, { width: "90%", height: "80%", maxWidth: 600, visible: visible, onHiding: hidePopup, title: SDKUI_Localizator.SwitchUser, titleRender: titleRender, hideOnOutsideClick: false, showTitle: true, resizeEnabled: true, dragEnabled: true, showCloseButton: true, children: [_jsx("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", width: "100%", marginBottom: "10px" }, children: _jsx(TMTextBox, { width: "160px", value: searchText, onValueChanged: onSearchValueChanged, label: SDKUI_Localizator.Search, placeHolder: SDKUI_Localizator.Search + "...", borderRadius: "6px" }) }), loading ? (_jsx("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", width: "100%" }, children: _jsx(LoadIndicator, {}) })) :
111
+ _jsx(Accordion, { defaultSelectedItems: [], collapsible: true, multiple: false, animationDuration: 300, noDataText: SDKUI_Localizator.NoCredentialsSaved, style: { border: "1px solid #ddd", borderRadius: "6px", boxShadow: "0 2px 6px rgba(0, 0, 0, 0.1)" }, children: loginHistoryData.sort((a, b) => a.name.localeCompare(b.name)).map((data, index) => _jsxs(Item, { title: data.name, children: [itemTemplate(data), " "] }, index)) })] });
112
+ };
113
+ export default TMLoginPopupSaveLoginInfo;
@@ -224,4 +224,9 @@ export declare class SDKUI_Localizator {
224
224
  static get WelcomeTo(): "Willkommen bei {{0}}" | "Welcome to {{0}}" | "Bienvenido a {{0}}" | "Bienvenue sur {{0}}" | "Bem-vindo à {{0}}" | "Benvenuto su {{0}}";
225
225
  static get ShowSearch(): "Suche anzeigen" | "Show search" | "Mostrar búsqueda" | "Afficher la recherche" | "Mostrar pesquisa" | "Mostra ricerca";
226
226
  static get HideSearch(): "Suche ausblenden" | "Hide search" | "Ocultar búsqueda" | "Masquer la recherche" | "Ocultar pesquisa" | "Nascondi ricerca";
227
+ static get NoCredentialsSaved(): "Keine gespeicherten Anmeldedaten" | "No credentials saved" | "No se han guardado credenciales" | "Aucune information d'identification enregistrée" | "Nenhuma credencial salva" | "Nessuna credenziale salvata";
228
+ static get DuplicateNameError(): "Der Name existiert bereits in der Anmeldehistorie. Jeder Eintrag muss einen eindeutigen Namen haben, um Duplikate zu vermeiden. Bitte wählen Sie einen anderen Namen." | "The name already exists in the login history. Each entry must have a unique name to avoid duplication. Please choose a different name." | "El nombre ya existe en el historial de inicio de sesión. Cada entrada debe tener un nombre único para evitar duplicados. Por favor, elija un nombre diferente." | "Le nom existe déjà dans l'historique de connexion. Chaque entrée doit avoir un nom unique pour éviter les doublons. Veuillez choisir un autre nom." | "O nome já existe no histórico de login. Cada entrada deve ter um nome único para evitar duplicações. Por favor, escolha um nome diferente." | "Il nome esiste già nella cronologia di accesso. Ogni voce deve avere un nome unico per evitare duplicati. Si prega di scegliere un nome diverso.";
229
+ static get EnterNameForAccess(): "Geben Sie einen Namen für den Zugriff ein" | "Enter a name for access" | "Introduzca un nombre para el acceso" | "Entrez un nom pour l'accès" | "Insira um nome para o acesso" | "Inserire un nome per l'accesso";
230
+ static get RememberCredentials(): "Anmeldedaten merken" | "Remember credentials" | "Recordar credenciales" | "Se souvenir des identifiants" | "Lembrar credenciais" | "Ricorda credenziali";
231
+ static get SwitchUser(): "Benutzer wechseln" | "Switch user" | "Cambiar usuario" | "Changer d'utilisateur" | "Mudar de usuário" | "Cambia utente";
227
232
  }
@@ -2190,4 +2190,84 @@ export class SDKUI_Localizator {
2190
2190
  default: return "Nascondi ricerca";
2191
2191
  }
2192
2192
  }
2193
+ static get NoCredentialsSaved() {
2194
+ switch (this._cultureID) {
2195
+ case CultureIDs.De_DE:
2196
+ return "Keine gespeicherten Anmeldedaten";
2197
+ case CultureIDs.En_US:
2198
+ return "No credentials saved";
2199
+ case CultureIDs.Es_ES:
2200
+ return "No se han guardado credenciales";
2201
+ case CultureIDs.Fr_FR:
2202
+ return "Aucune information d'identification enregistrée";
2203
+ case CultureIDs.Pt_PT:
2204
+ return "Nenhuma credencial salva";
2205
+ default:
2206
+ return "Nessuna credenziale salvata";
2207
+ }
2208
+ }
2209
+ static get DuplicateNameError() {
2210
+ switch (this._cultureID) {
2211
+ case CultureIDs.De_DE:
2212
+ return "Der Name existiert bereits in der Anmeldehistorie. Jeder Eintrag muss einen eindeutigen Namen haben, um Duplikate zu vermeiden. Bitte wählen Sie einen anderen Namen.";
2213
+ case CultureIDs.En_US:
2214
+ return "The name already exists in the login history. Each entry must have a unique name to avoid duplication. Please choose a different name.";
2215
+ case CultureIDs.Es_ES:
2216
+ return "El nombre ya existe en el historial de inicio de sesión. Cada entrada debe tener un nombre único para evitar duplicados. Por favor, elija un nombre diferente.";
2217
+ case CultureIDs.Fr_FR:
2218
+ return "Le nom existe déjà dans l'historique de connexion. Chaque entrée doit avoir un nom unique pour éviter les doublons. Veuillez choisir un autre nom.";
2219
+ case CultureIDs.Pt_PT:
2220
+ return "O nome já existe no histórico de login. Cada entrada deve ter um nome único para evitar duplicações. Por favor, escolha um nome diferente.";
2221
+ default:
2222
+ return "Il nome esiste già nella cronologia di accesso. Ogni voce deve avere un nome unico per evitare duplicati. Si prega di scegliere un nome diverso.";
2223
+ }
2224
+ }
2225
+ static get EnterNameForAccess() {
2226
+ switch (this._cultureID) {
2227
+ case CultureIDs.De_DE:
2228
+ return "Geben Sie einen Namen für den Zugriff ein";
2229
+ case CultureIDs.En_US:
2230
+ return "Enter a name for access";
2231
+ case CultureIDs.Es_ES:
2232
+ return "Introduzca un nombre para el acceso";
2233
+ case CultureIDs.Fr_FR:
2234
+ return "Entrez un nom pour l'accès";
2235
+ case CultureIDs.Pt_PT:
2236
+ return "Insira um nome para o acesso";
2237
+ default:
2238
+ return "Inserire un nome per l'accesso";
2239
+ }
2240
+ }
2241
+ static get RememberCredentials() {
2242
+ switch (this._cultureID) {
2243
+ case CultureIDs.De_DE:
2244
+ return "Anmeldedaten merken";
2245
+ case CultureIDs.En_US:
2246
+ return "Remember credentials";
2247
+ case CultureIDs.Es_ES:
2248
+ return "Recordar credenciales";
2249
+ case CultureIDs.Fr_FR:
2250
+ return "Se souvenir des identifiants";
2251
+ case CultureIDs.Pt_PT:
2252
+ return "Lembrar credenciais";
2253
+ default:
2254
+ return "Ricorda credenziali";
2255
+ }
2256
+ }
2257
+ static get SwitchUser() {
2258
+ switch (this._cultureID) {
2259
+ case CultureIDs.De_DE:
2260
+ return "Benutzer wechseln";
2261
+ case CultureIDs.En_US:
2262
+ return "Switch user";
2263
+ case CultureIDs.Es_ES:
2264
+ return "Cambiar usuario";
2265
+ case CultureIDs.Fr_FR:
2266
+ return "Changer d'utilisateur";
2267
+ case CultureIDs.Pt_PT:
2268
+ return "Mudar de usuário";
2269
+ default:
2270
+ return "Cambia utente";
2271
+ }
2272
+ }
2193
2273
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.7.11",
3
+ "version": "6.7.12",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -28,7 +28,7 @@
28
28
  "lib"
29
29
  ],
30
30
  "dependencies": {
31
- "@topconsultnpm/sdk-ts-beta": "^6.7.8",
31
+ "@topconsultnpm/sdk-ts-beta": "^6.7.10",
32
32
  "buffer": "^6.0.3",
33
33
  "devextreme": "24.1.6",
34
34
  "devextreme-react": "24.1.6",