@topconsultnpm/sdkui-react-beta 6.6.111 → 6.6.112

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.
Files changed (252) hide show
  1. package/lib/components/base/TMClosableList.js +0 -1
  2. package/lib/components/base/TMTooltip.js +0 -2
  3. package/lib/components/editors/TMTextArea.js +0 -1
  4. package/lib/components/editors/TMTextBox.js +0 -1
  5. package/lib/components/forms/TMLoginForm.d.ts +3 -1
  6. package/lib/components/forms/TMLoginForm.js +9 -9
  7. package/lib/components/forms/TMSaveForm.js +0 -2
  8. package/lib/components/pages/TMPage.js +0 -2
  9. package/lib/components/query/TMQueryResultForm.js +0 -1
  10. package/lib/components/sidebar/TMHeader.js +3 -4
  11. package/lib/helper/helpers.d.ts +3 -2
  12. package/lib/helper/helpers.js +17 -7
  13. package/package.json +1 -1
  14. package/lib/assets/ImageLibrary/arrow_001.png +0 -0
  15. package/lib/assets/ImageLibrary/arrow_002.png +0 -0
  16. package/lib/assets/ImageLibrary/arrow_003.png +0 -0
  17. package/lib/assets/ImageLibrary/arrow_004.png +0 -0
  18. package/lib/assets/ImageLibrary/arrow_005.png +0 -0
  19. package/lib/assets/ImageLibrary/arrow_006.png +0 -0
  20. package/lib/assets/ImageLibrary/arrow_007.png +0 -0
  21. package/lib/assets/ImageLibrary/arrow_008.png +0 -0
  22. package/lib/assets/ImageLibrary/arrow_009.png +0 -0
  23. package/lib/assets/ImageLibrary/arrow_010.png +0 -0
  24. package/lib/assets/ImageLibrary/arrow_011.png +0 -0
  25. package/lib/assets/ImageLibrary/arrow_012.png +0 -0
  26. package/lib/assets/ImageLibrary/book_001.png +0 -0
  27. package/lib/assets/ImageLibrary/book_002.png +0 -0
  28. package/lib/assets/ImageLibrary/book_003.png +0 -0
  29. package/lib/assets/ImageLibrary/book_004.png +0 -0
  30. package/lib/assets/ImageLibrary/book_005.png +0 -0
  31. package/lib/assets/ImageLibrary/book_006.png +0 -0
  32. package/lib/assets/ImageLibrary/book_007.png +0 -0
  33. package/lib/assets/ImageLibrary/clock_001.png +0 -0
  34. package/lib/assets/ImageLibrary/clock_002.png +0 -0
  35. package/lib/assets/ImageLibrary/clock_003.png +0 -0
  36. package/lib/assets/ImageLibrary/cube_001.png +0 -0
  37. package/lib/assets/ImageLibrary/cube_002.png +0 -0
  38. package/lib/assets/ImageLibrary/cube_003.png +0 -0
  39. package/lib/assets/ImageLibrary/dcmt_001.png +0 -0
  40. package/lib/assets/ImageLibrary/dcmt_002.png +0 -0
  41. package/lib/assets/ImageLibrary/dcmt_003.png +0 -0
  42. package/lib/assets/ImageLibrary/dcmt_004.png +0 -0
  43. package/lib/assets/ImageLibrary/dcmt_005.png +0 -0
  44. package/lib/assets/ImageLibrary/dcmt_006.png +0 -0
  45. package/lib/assets/ImageLibrary/dcmt_007.png +0 -0
  46. package/lib/assets/ImageLibrary/dcmt_008.png +0 -0
  47. package/lib/assets/ImageLibrary/emoticon_001.png +0 -0
  48. package/lib/assets/ImageLibrary/emoticon_002.png +0 -0
  49. package/lib/assets/ImageLibrary/emoticon_003.png +0 -0
  50. package/lib/assets/ImageLibrary/emoticon_004.png +0 -0
  51. package/lib/assets/ImageLibrary/fld_001.png +0 -0
  52. package/lib/assets/ImageLibrary/fld_002.png +0 -0
  53. package/lib/assets/ImageLibrary/fld_003.png +0 -0
  54. package/lib/assets/ImageLibrary/fld_004.png +0 -0
  55. package/lib/assets/ImageLibrary/fld_005.png +0 -0
  56. package/lib/assets/ImageLibrary/fld_006.png +0 -0
  57. package/lib/assets/ImageLibrary/fld_007.png +0 -0
  58. package/lib/assets/ImageLibrary/fld_008.png +0 -0
  59. package/lib/assets/ImageLibrary/fld_009.png +0 -0
  60. package/lib/assets/ImageLibrary/fld_010.png +0 -0
  61. package/lib/assets/ImageLibrary/fld_011.png +0 -0
  62. package/lib/assets/ImageLibrary/fld_012.png +0 -0
  63. package/lib/assets/ImageLibrary/fld_013.png +0 -0
  64. package/lib/assets/ImageLibrary/fld_014.png +0 -0
  65. package/lib/assets/ImageLibrary/fld_015.png +0 -0
  66. package/lib/assets/ImageLibrary/fld_016.png +0 -0
  67. package/lib/assets/ImageLibrary/fld_017.png +0 -0
  68. package/lib/assets/ImageLibrary/fld_018.png +0 -0
  69. package/lib/assets/ImageLibrary/fld_019.png +0 -0
  70. package/lib/assets/ImageLibrary/fld_020.png +0 -0
  71. package/lib/assets/ImageLibrary/fld_021.png +0 -0
  72. package/lib/assets/ImageLibrary/fld_022.png +0 -0
  73. package/lib/assets/ImageLibrary/fld_023.png +0 -0
  74. package/lib/assets/ImageLibrary/fld_024.png +0 -0
  75. package/lib/assets/ImageLibrary/fld_025.png +0 -0
  76. package/lib/assets/ImageLibrary/fld_026.png +0 -0
  77. package/lib/assets/ImageLibrary/fld_027.png +0 -0
  78. package/lib/assets/ImageLibrary/fld_028.png +0 -0
  79. package/lib/assets/ImageLibrary/fld_029.png +0 -0
  80. package/lib/assets/ImageLibrary/fld_030.png +0 -0
  81. package/lib/assets/ImageLibrary/fld_031.png +0 -0
  82. package/lib/assets/ImageLibrary/fld_032.png +0 -0
  83. package/lib/assets/ImageLibrary/fld_033.png +0 -0
  84. package/lib/assets/ImageLibrary/gen_001.png +0 -0
  85. package/lib/assets/ImageLibrary/gen_002.png +0 -0
  86. package/lib/assets/ImageLibrary/gen_003.png +0 -0
  87. package/lib/assets/ImageLibrary/gen_004.png +0 -0
  88. package/lib/assets/ImageLibrary/gen_005.png +0 -0
  89. package/lib/assets/ImageLibrary/gen_006.png +0 -0
  90. package/lib/assets/ImageLibrary/gen_007.png +0 -0
  91. package/lib/assets/ImageLibrary/gen_008.png +0 -0
  92. package/lib/assets/ImageLibrary/gen_009.png +0 -0
  93. package/lib/assets/ImageLibrary/gen_010.png +0 -0
  94. package/lib/assets/ImageLibrary/gen_011.png +0 -0
  95. package/lib/assets/ImageLibrary/gen_012.png +0 -0
  96. package/lib/assets/ImageLibrary/gen_013.png +0 -0
  97. package/lib/assets/ImageLibrary/gen_014.png +0 -0
  98. package/lib/assets/ImageLibrary/gen_015.png +0 -0
  99. package/lib/assets/ImageLibrary/gen_016.png +0 -0
  100. package/lib/assets/ImageLibrary/gen_017.png +0 -0
  101. package/lib/assets/ImageLibrary/gen_018.png +0 -0
  102. package/lib/assets/ImageLibrary/gen_019.png +0 -0
  103. package/lib/assets/ImageLibrary/gen_020.png +0 -0
  104. package/lib/assets/ImageLibrary/gen_021.png +0 -0
  105. package/lib/assets/ImageLibrary/gen_022.png +0 -0
  106. package/lib/assets/ImageLibrary/gen_023.png +0 -0
  107. package/lib/assets/ImageLibrary/gen_024.png +0 -0
  108. package/lib/assets/ImageLibrary/gen_025.png +0 -0
  109. package/lib/assets/ImageLibrary/gen_026.png +0 -0
  110. package/lib/assets/ImageLibrary/gen_027.png +0 -0
  111. package/lib/assets/ImageLibrary/gen_028.png +0 -0
  112. package/lib/assets/ImageLibrary/gen_029.png +0 -0
  113. package/lib/assets/ImageLibrary/gen_030.png +0 -0
  114. package/lib/assets/ImageLibrary/gen_031.png +0 -0
  115. package/lib/assets/ImageLibrary/gen_032.png +0 -0
  116. package/lib/assets/ImageLibrary/gen_033.png +0 -0
  117. package/lib/assets/ImageLibrary/gen_034.png +0 -0
  118. package/lib/assets/ImageLibrary/gen_035.png +0 -0
  119. package/lib/assets/ImageLibrary/gen_036.png +0 -0
  120. package/lib/assets/ImageLibrary/gen_037.png +0 -0
  121. package/lib/assets/ImageLibrary/gen_038.png +0 -0
  122. package/lib/assets/ImageLibrary/gen_039.png +0 -0
  123. package/lib/assets/ImageLibrary/gen_040.png +0 -0
  124. package/lib/assets/ImageLibrary/gen_041.png +0 -0
  125. package/lib/assets/ImageLibrary/gen_042.png +0 -0
  126. package/lib/assets/ImageLibrary/gen_043.png +0 -0
  127. package/lib/assets/ImageLibrary/gen_044.png +0 -0
  128. package/lib/assets/ImageLibrary/gen_045.png +0 -0
  129. package/lib/assets/ImageLibrary/gen_046.png +0 -0
  130. package/lib/assets/ImageLibrary/gen_047.png +0 -0
  131. package/lib/assets/ImageLibrary/gen_048.png +0 -0
  132. package/lib/assets/ImageLibrary/gen_049.png +0 -0
  133. package/lib/assets/ImageLibrary/gen_050.png +0 -0
  134. package/lib/assets/ImageLibrary/gen_051.png +0 -0
  135. package/lib/assets/ImageLibrary/gen_052.png +0 -0
  136. package/lib/assets/ImageLibrary/hand_001.png +0 -0
  137. package/lib/assets/ImageLibrary/hand_002.png +0 -0
  138. package/lib/assets/ImageLibrary/hand_003.png +0 -0
  139. package/lib/assets/ImageLibrary/hand_004.png +0 -0
  140. package/lib/assets/ImageLibrary/hand_005.png +0 -0
  141. package/lib/assets/ImageLibrary/hand_006.png +0 -0
  142. package/lib/assets/ImageLibrary/law_001.png +0 -0
  143. package/lib/assets/ImageLibrary/law_002.png +0 -0
  144. package/lib/assets/ImageLibrary/law_003.png +0 -0
  145. package/lib/assets/ImageLibrary/lock_001.png +0 -0
  146. package/lib/assets/ImageLibrary/lock_002.png +0 -0
  147. package/lib/assets/ImageLibrary/lock_003.png +0 -0
  148. package/lib/assets/ImageLibrary/mail_001.png +0 -0
  149. package/lib/assets/ImageLibrary/mail_002.png +0 -0
  150. package/lib/assets/ImageLibrary/mail_003.png +0 -0
  151. package/lib/assets/ImageLibrary/mail_004.png +0 -0
  152. package/lib/assets/ImageLibrary/mail_005.png +0 -0
  153. package/lib/assets/ImageLibrary/mail_006.png +0 -0
  154. package/lib/assets/ImageLibrary/mail_007.png +0 -0
  155. package/lib/assets/ImageLibrary/mail_008.png +0 -0
  156. package/lib/assets/ImageLibrary/mail_009.png +0 -0
  157. package/lib/assets/ImageLibrary/mail_010.png +0 -0
  158. package/lib/assets/ImageLibrary/mail_011.png +0 -0
  159. package/lib/assets/ImageLibrary/mail_012.png +0 -0
  160. package/lib/assets/ImageLibrary/mail_013.png +0 -0
  161. package/lib/assets/ImageLibrary/mail_014.png +0 -0
  162. package/lib/assets/ImageLibrary/mail_015.png +0 -0
  163. package/lib/assets/ImageLibrary/net_001.png +0 -0
  164. package/lib/assets/ImageLibrary/net_002.png +0 -0
  165. package/lib/assets/ImageLibrary/net_003.png +0 -0
  166. package/lib/assets/ImageLibrary/net_004.png +0 -0
  167. package/lib/assets/ImageLibrary/nmbr_001.png +0 -0
  168. package/lib/assets/ImageLibrary/nmbr_002.png +0 -0
  169. package/lib/assets/ImageLibrary/nmbr_003.png +0 -0
  170. package/lib/assets/ImageLibrary/nmbr_004.png +0 -0
  171. package/lib/assets/ImageLibrary/nmbr_005.png +0 -0
  172. package/lib/assets/ImageLibrary/nmbr_006.png +0 -0
  173. package/lib/assets/ImageLibrary/nmbr_007.png +0 -0
  174. package/lib/assets/ImageLibrary/nmbr_008.png +0 -0
  175. package/lib/assets/ImageLibrary/nmbr_009.png +0 -0
  176. package/lib/assets/ImageLibrary/note_001.png +0 -0
  177. package/lib/assets/ImageLibrary/note_002.png +0 -0
  178. package/lib/assets/ImageLibrary/note_003.png +0 -0
  179. package/lib/assets/ImageLibrary/note_004.png +0 -0
  180. package/lib/assets/ImageLibrary/note_005.png +0 -0
  181. package/lib/assets/ImageLibrary/note_006.png +0 -0
  182. package/lib/assets/ImageLibrary/note_007.png +0 -0
  183. package/lib/assets/ImageLibrary/note_008.png +0 -0
  184. package/lib/assets/ImageLibrary/note_009.png +0 -0
  185. package/lib/assets/ImageLibrary/note_010.png +0 -0
  186. package/lib/assets/ImageLibrary/note_011.png +0 -0
  187. package/lib/assets/ImageLibrary/note_012.png +0 -0
  188. package/lib/assets/ImageLibrary/note_013.png +0 -0
  189. package/lib/assets/ImageLibrary/note_014.png +0 -0
  190. package/lib/assets/ImageLibrary/note_015.png +0 -0
  191. package/lib/assets/ImageLibrary/note_016.png +0 -0
  192. package/lib/assets/ImageLibrary/run_001.png +0 -0
  193. package/lib/assets/ImageLibrary/run_002.png +0 -0
  194. package/lib/assets/ImageLibrary/run_003.png +0 -0
  195. package/lib/assets/ImageLibrary/sem_001.png +0 -0
  196. package/lib/assets/ImageLibrary/sem_002.png +0 -0
  197. package/lib/assets/ImageLibrary/sem_003.png +0 -0
  198. package/lib/assets/ImageLibrary/sem_004.png +0 -0
  199. package/lib/assets/ImageLibrary/sem_005.png +0 -0
  200. package/lib/assets/ImageLibrary/star_001.png +0 -0
  201. package/lib/assets/ImageLibrary/star_002.png +0 -0
  202. package/lib/assets/ImageLibrary/star_003.png +0 -0
  203. package/lib/assets/ImageLibrary/star_004.png +0 -0
  204. package/lib/assets/ImageLibrary/star_005.png +0 -0
  205. package/lib/assets/ImageLibrary/star_006.png +0 -0
  206. package/lib/assets/ImageLibrary/state_001.png +0 -0
  207. package/lib/assets/ImageLibrary/state_002.png +0 -0
  208. package/lib/assets/ImageLibrary/state_003.png +0 -0
  209. package/lib/assets/ImageLibrary/state_004.png +0 -0
  210. package/lib/assets/ImageLibrary/state_005.png +0 -0
  211. package/lib/assets/ImageLibrary/study_001.png +0 -0
  212. package/lib/assets/ImageLibrary/study_002.png +0 -0
  213. package/lib/assets/ImageLibrary/user_001.png +0 -0
  214. package/lib/assets/ImageLibrary/user_002.png +0 -0
  215. package/lib/assets/ImageLibrary/user_003.png +0 -0
  216. package/lib/assets/ImageLibrary/user_004.png +0 -0
  217. package/lib/assets/ImageLibrary/user_005.png +0 -0
  218. package/lib/assets/ImageLibrary/user_006.png +0 -0
  219. package/lib/assets/ImageLibrary/user_007.png +0 -0
  220. package/lib/assets/ImageLibrary/user_008.png +0 -0
  221. package/lib/assets/ImageLibrary/user_009.png +0 -0
  222. package/lib/assets/ImageLibrary/user_010.png +0 -0
  223. package/lib/assets/ImageLibrary/user_011.png +0 -0
  224. package/lib/assets/ImageLibrary/user_012.png +0 -0
  225. package/lib/assets/ImageLibrary/user_013.png +0 -0
  226. package/lib/assets/ImageLibrary/user_014.png +0 -0
  227. package/lib/assets/ImageLibrary/user_015.png +0 -0
  228. package/lib/assets/ImageLibrary/user_016.png +0 -0
  229. package/lib/assets/ImageLibrary/user_017.png +0 -0
  230. package/lib/assets/ImageLibrary/user_018.png +0 -0
  231. package/lib/assets/ImageLibrary/user_019.png +0 -0
  232. package/lib/assets/ImageLibrary/user_020.png +0 -0
  233. package/lib/assets/ImageLibrary/user_021.png +0 -0
  234. package/lib/assets/ImageLibrary/user_022.png +0 -0
  235. package/lib/assets/ImageLibrary/user_023.png +0 -0
  236. package/lib/assets/ImageLibrary/vehicle_001.png +0 -0
  237. package/lib/assets/ImageLibrary/vehicle_002.png +0 -0
  238. package/lib/assets/ImageLibrary/vehicle_003.png +0 -0
  239. package/lib/assets/ImageLibrary/vehicle_004.png +0 -0
  240. package/lib/assets/ImageLibrary/vehicle_005.png +0 -0
  241. package/lib/assets/ImageLibrary/vehicle_006.png +0 -0
  242. package/lib/assets/ImageLibrary/vehicle_007.png +0 -0
  243. package/lib/assets/ImageLibrary/vehicle_008.png +0 -0
  244. package/lib/assets/Toppy-generico.png +0 -0
  245. package/lib/assets/icomoon.eot +0 -0
  246. package/lib/assets/icomoon.svg +0 -97
  247. package/lib/assets/icomoon.ttf +0 -0
  248. package/lib/assets/icomoon.woff +0 -0
  249. package/lib/assets/loading.png +0 -0
  250. package/lib/assets/login-bg.png +0 -0
  251. package/lib/assets/multipleSelectionManager.jpg +0 -0
  252. package/lib/css/tm-sdkui.css +0 -1
@@ -59,7 +59,6 @@ const StyledClosableItemsCount = styled.div `
59
59
  `;
60
60
  const TMClosableList = ({ dataSource, visibility = false, label, inline = false, hasPadding = true }) => {
61
61
  const [status, setStatus] = useState(visibility);
62
- // let width = useWindowWidth()
63
62
  let devicrType = useDeviceType();
64
63
  const renderedItems = () => {
65
64
  return (dataSource.map((item, index) => (_jsx(StyledClosableItem, { children: item }, index))));
@@ -11,8 +11,6 @@ const TMTooltip = ({ children, position, content, hideAfterDelay }) => {
11
11
  window.addEventListener('click', () => setShowTooltip(false));
12
12
  return () => window.removeEventListener('click', () => setShowTooltip(false));
13
13
  }, []);
14
- // const width = useWindowWidth();
15
- // let isDesktop = width > TABLET_WIDTH;
16
14
  const deviceType = useDeviceType();
17
15
  return (_jsxs("div", { children: [_jsx("div", { id: `idContainerTooltip${id}`, style: { display: 'flex', alignItems: 'center', height: 'max-content', width: 'max-content' }, onMouseEnter: () => { setShowTooltip(true); }, onMouseLeave: () => { setShowTooltip(false); }, onClick: () => { if (deviceType === DeviceType.DESKTOP || !hideAfterDelay)
18
16
  return; setTimeout(() => { setShowTooltip(false); }, 1500); }, children: children }), content &&
@@ -15,7 +15,6 @@ const TMTextArea = (props) => {
15
15
  const [currentValue, setCurrentValue] = useState(value);
16
16
  const [formulaMenuItems, setFormulaMenuItems] = useState([]);
17
17
  const { clicked, setClicked, points, setPoints } = useContextMenu();
18
- // let screenWidth = useWindowWidth();
19
18
  const deviceType = useDeviceType();
20
19
  useEffect(() => {
21
20
  setCurrentValue(value);
@@ -39,7 +39,6 @@ const TMTextBox = ({ autoFocus, maxLength, labelColor, precision, scale, showCle
39
39
  const [formulaMenuItems, setFormulaMenuItems] = useState([]);
40
40
  const [isFocused, setIsFocused] = useState(false);
41
41
  const inputRef = useRef(null);
42
- // let screenWidth = useWindowWidth();
43
42
  const deviceType = useDeviceType();
44
43
  const [id, setID] = useState('');
45
44
  useEffect(() => { setID(genUniqueId()); }, []);
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import { AppModules, CultureIDs, ITopMediaSession, SessionDescriptor } from "@topconsultnpm/sdk-ts-beta";
3
+ import { DeviceType } from "../base/TMDeviceProvider";
3
4
  export declare const onChangeLanguage: (cultureID: CultureIDs) => void;
4
5
  export declare const useCultureID: ({ cultureID }: {
5
6
  cultureID: CultureIDs;
@@ -22,7 +23,8 @@ export declare const cultureIDsDataSource: {
22
23
  display: string;
23
24
  }[];
24
25
  declare const TMLoginForm: React.FunctionComponent<ITMLoginFormProps>;
25
- export declare const TMChangePassword: ({ tmSession, username, onClose, enable, hasBack }: {
26
+ export declare const TMChangePassword: ({ deviceType, tmSession, username, onClose, enable, hasBack }: {
27
+ deviceType?: DeviceType | undefined;
26
28
  hasBack?: boolean | undefined;
27
29
  tmSession?: ITopMediaSession | undefined;
28
30
  username: string;
@@ -10,7 +10,7 @@ import ptMessages from "devextreme/localization/messages/pt.json";
10
10
  import { locale as dxlocale, loadMessages } from "devextreme/localization";
11
11
  import backgroundLogin from '../../assets/login-bg.png';
12
12
  import six from '../../assets/loading.png';
13
- import { IconAccessPoint, IconArchive, IconLanguage, IconLogin, IconMail, IconPassword, IconSearch, IconUser, IconWeb, IconWifi, SDKUI_Localizator, calcResponsiveDirection, calcResponsiveSizes, useWindowWidth, IconArrowLeft, SDKUI_Globals } from "../../helper";
13
+ import { IconAccessPoint, IconArchive, IconLanguage, IconLogin, IconMail, IconPassword, IconSearch, IconUser, IconWeb, IconWifi, SDKUI_Localizator, calcResponsiveDirection, calcResponsiveSizes, IconArrowLeft, SDKUI_Globals } from "../../helper";
14
14
  // import { TMColors } from "/utils/theme";
15
15
  // import TMLayoutContainer, { TMCard, TMLayoutItem } from "../Layout/TMLayout";
16
16
  import styled from "styled-components";
@@ -25,6 +25,7 @@ import TMTextBox from "../editors/TMTextBox";
25
25
  import TMButton from "../base/TMButton";
26
26
  import TMSummary from "../editors/TMSummary";
27
27
  import TMDropDown from "../editors/TMDropDown";
28
+ import { DeviceType, useDeviceType } from "../base/TMDeviceProvider";
28
29
  export const onChangeLanguage = (cultureID) => {
29
30
  //localizzazione devexpress
30
31
  switch (cultureID) {
@@ -78,6 +79,7 @@ const StyledLogoContainer = styled.div ` position: relative; width: ${props => p
78
79
  export const cultureIDsDataSource = [{ value: CultureIDs.It_IT, display: "Italiano" }, { value: CultureIDs.Fr_FR, display: "Française" }, { value: CultureIDs.Pt_PT, display: "Português" }, { value: CultureIDs.En_US, display: "English" }, { value: CultureIDs.Es_ES, display: "Español" }, { value: CultureIDs.De_DE, display: "Deutsch" },];
79
80
  const TMLoginForm = (props) => {
80
81
  // const [currentCultureID, setCurrentCultureID] = useState<CultureIDs>(CultureIDs.It_IT);
82
+ const deviceType = useDeviceType();
81
83
  const [endpoints, setEndpoints] = useState();
82
84
  const [selectedEndpoint, setSelectedEndPoint] = useState();
83
85
  const [selectedArchive, setSelectedArchive] = useState();
@@ -107,7 +109,6 @@ const TMLoginForm = (props) => {
107
109
  const otp6Ref = useRef(null);
108
110
  const [otpValues, setOtpValues] = useState(['', '', '', '', '', '']);
109
111
  const [otpHasFilled, setOtpHasFilled] = useState([false, false, false, false, false, false]);
110
- const size = useWindowWidth();
111
112
  useEffect(() => {
112
113
  let interval;
113
114
  if (recoveryPasswordState.step === 2 && wait > 0) {
@@ -768,15 +769,15 @@ const TMLoginForm = (props) => {
768
769
  setOtpValues(['', '', '', '', '', '']);
769
770
  }
770
771
  };
771
- 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: _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(size, "60%", "100%", "100%"), height: calcResponsiveSizes(size, '100%', '80%', '80%'), children: [togglePages.recovery &&
772
- _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()) &&
773
- _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, {}), 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 ?
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 ?
774
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 }) :
775
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 ?
776
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) })] })
777
778
  :
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') }) }) :
779
- _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(size, '150px', '150px', '250px'), height: calcResponsiveSizes(size, '30px', '40px', '40px'), fontSize: "1.1rem", caption: "Login", disabled: loginValidationItems.length > 0, onClick: login, showTooltip: false }) }) })] }) })] })] }) }));
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 }) }) })] }) })] })] }) }));
780
781
  };
781
782
  const TMPasswordManager = ({ validationItems = [], operation = 'change' }) => {
782
783
  const passwordStrength = () => {
@@ -801,11 +802,10 @@ const TMPasswordManager = ({ validationItems = [], operation = 'change' }) => {
801
802
  };
802
803
  return (_jsxs(TMLayoutItem, { height: "60%", children: [_jsx("div", { style: { width: 'calc(100% - 70px)', height: '5px', backgroundColor: 'white', margin: '0px 0px 10px 45px', borderRadius: '2px', overflow: 'hidden' }, children: _jsx("div", { style: { width: passwordStrength().width, height: '100%', backgroundColor: passwordStrength().color, transition: 'ease 300ms' } }) }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', gap: 2, padding: '0 45px 10px 45px' }, children: [_jsxs(TMLayoutContainer, { alignItems: "center", direction: "horizontal", children: [_jsx(TMLayoutItem, { width: "fit-content", height: "fit-content", children: _jsx("div", { style: { width: '7px', height: '7px', borderRadius: '10px', backgroundColor: validationItems.find(item => item.PropertyName === `${operation}Pass_length`) ? 'red' : 'green' }, children: " " }) }), _jsx(TMLayoutItem, { width: "max-content", height: "fit-content", children: _jsx("p", { style: { fontSize: '0.9rem', color: validationItems.find(item => item.PropertyName === `${operation}Pass_length`) ? 'red' : 'green' }, children: SDKUI_Localizator.PasswordLengthError }) })] }), _jsxs(TMLayoutContainer, { alignItems: "center", direction: "horizontal", children: [_jsx(TMLayoutItem, { width: "fit-content", height: "fit-content", children: _jsx("div", { style: { width: '7px', height: '7px', borderRadius: '10px', backgroundColor: validationItems.find(item => item.PropertyName === `${operation}Pass_hasNotLower`) ? 'red' : 'green' }, children: " " }) }), _jsx(TMLayoutItem, { width: "max-content", height: "fit-content", children: _jsx("p", { style: { fontSize: '0.9rem', color: validationItems.find(item => item.PropertyName === `${operation}Pass_hasNotLower`) ? 'red' : 'green' }, children: SDKUI_Localizator.PasswordLowercaseError }) })] }), _jsxs(TMLayoutContainer, { alignItems: "center", direction: "horizontal", children: [_jsx(TMLayoutItem, { width: "fit-content", height: "fit-content", children: _jsx("div", { style: { width: '7px', height: '7px', borderRadius: '10px', backgroundColor: validationItems.find(item => item.PropertyName === `${operation}Pass_hasNotUpper`) ? 'red' : 'green' }, children: " " }) }), _jsx(TMLayoutItem, { width: "max-content", height: "fit-content", children: _jsx("p", { style: { fontSize: '0.9rem', color: validationItems.find(item => item.PropertyName === `${operation}Pass_hasNotUpper`) ? 'red' : 'green' }, children: SDKUI_Localizator.PasswordUppercaseError }) })] }), _jsxs(TMLayoutContainer, { alignItems: "center", direction: "horizontal", children: [_jsx(TMLayoutItem, { width: "fit-content", height: "fit-content", children: _jsx("div", { style: { width: '7px', height: '7px', borderRadius: '10px', backgroundColor: validationItems.find(item => item.PropertyName === `${operation}Pass_hasNotNumber`) ? 'red' : 'green' }, children: " " }) }), _jsx(TMLayoutItem, { width: "max-content", height: "fit-content", children: _jsx("p", { style: { fontSize: '0.9rem', color: validationItems.find(item => item.PropertyName === `${operation}Pass_hasNotNumber`) ? 'red' : 'green' }, children: SDKUI_Localizator.PasswordNumberError }) })] }), _jsxs(TMLayoutContainer, { alignItems: "center", direction: "horizontal", children: [_jsx(TMLayoutItem, { width: "fit-content", height: "fit-content", children: _jsx("div", { style: { width: '7px', height: '7px', borderRadius: '10px', backgroundColor: validationItems.find(item => item.PropertyName === `${operation}Pass_hasNotSymbol`) ? 'red' : 'green' }, children: " " }) }), _jsx(TMLayoutItem, { width: "max-content", height: "fit-content", children: _jsxs("p", { style: { fontSize: '0.9rem', color: validationItems.find(item => item.PropertyName === `${operation}Pass_hasNotSymbol`) ? 'red' : 'green' }, children: [SDKUI_Localizator.PasswordSymbolError, " "] }) })] })] })] }));
803
804
  };
804
- export const TMChangePassword = ({ tmSession, username, onClose, enable, hasBack = true }) => {
805
+ export const TMChangePassword = ({ deviceType = DeviceType.DESKTOP, tmSession, username, onClose, enable, hasBack = true }) => {
805
806
  const [changePasswordState, setChangePasswordState] = useState({ confermPassword: '', newPassword: '', oldPassword: '' });
806
807
  const [changePasswordValidationItems, setChangePasswordValidationItems] = useState([]);
807
808
  useEffect(() => { changePasswordValidator(); }, [changePasswordState.oldPassword, changePasswordState.newPassword, changePasswordState.confermPassword, username]);
808
- const size = useWindowWidth();
809
809
  const changePasswordValidator = () => {
810
810
  let arr = [...changePasswordValidationItems];
811
811
  let char_upperCase = new RegExp(/([A-Z])/g);
@@ -991,6 +991,6 @@ export const TMChangePassword = ({ tmSession, username, onClose, enable, hasBack
991
991
  }
992
992
  };
993
993
  const back = () => { onClose && onClose(); setChangePasswordState({ confermPassword: '', newPassword: '', oldPassword: '' }); };
994
- return (_jsx(StyledContainer, { children: _jsxs(TMLayoutContainer, { alignItems: "center", children: [_jsx(TMLayoutItem, { width: "fit-content", height: "max-content", children: _jsx(StyledHeaderText, { children: SDKUI_Localizator.ChangePassword }) }), _jsx(TMLayoutItem, { children: _jsx("div", { style: { padding: `0px ${calcResponsiveSizes(size, '40px', '40px', '10px')}` }, children: _jsx(TMCard, { showBorder: false, children: _jsxs(TMLayoutContainer, { children: [_jsx(TMLayoutItem, { children: _jsx(TMTextBox, { type: "password", label: SDKUI_Localizator.OldPassword, icon: _jsx(IconPassword, {}), onValueChanged: (e) => setChangePasswordState({ ...changePasswordState, oldPassword: e.target.value }), value: changePasswordState.oldPassword, validationItems: changePasswordValidationItems.filter(item => item.PropertyName === 'changePass_old') }) }), _jsx(TMLayoutItem, { children: _jsx(TMTextBox, { type: "password", label: SDKUI_Localizator.NewPassword, icon: _jsx(IconPassword, {}), onValueChanged: (e) => setChangePasswordState({ ...changePasswordState, newPassword: e.target.value }), value: changePasswordState.newPassword, validationItems: changePasswordValidationItems.filter(item => item.PropertyName === 'changePass_new' || item.PropertyName === 'changePass_equalUsername' || item.PropertyName === 'changePass_containUsername') }) }), _jsx(TMLayoutItem, { children: _jsx(TMTextBox, { type: "password", label: SDKUI_Localizator.ConfirmPassword, icon: _jsx(IconPassword, {}), onValueChanged: (e) => setChangePasswordState({ ...changePasswordState, confermPassword: e.target.value }), value: changePasswordState.confermPassword, validationItems: changePasswordValidationItems.filter(item => item.PropertyName === 'changePass_confirm' || item.PropertyName === 'changePass_notConfirmed') }) })] }) }) }) }), _jsx(TMPasswordManager, { operation: "change", validationItems: changePasswordValidationItems }), hasBack && _jsx(TMLayoutItem, { height: "fit-content", width: "fit-content", children: _jsx("p", { onClick: back, tabIndex: enable ? 0 : undefined, onKeyDown: (e) => e.code === 'Space' && back(), style: { userSelect: 'none', cursor: enable ? 'pointer' : 'default', color: enable ? TMColors.primary : 'rgb(180,180,180)', fontSize: '1rem' }, children: SDKUI_Localizator.Back }) }), _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", caption: SDKUI_Localizator.Save, disabled: changePasswordValidationItems.length > 0, onClick: () => { changePasswordAsync(); }, showTooltip: false }) }) })] }) }));
994
+ return (_jsx(StyledContainer, { children: _jsxs(TMLayoutContainer, { alignItems: "center", children: [_jsx(TMLayoutItem, { width: "fit-content", height: "max-content", children: _jsx(StyledHeaderText, { children: SDKUI_Localizator.ChangePassword }) }), _jsx(TMLayoutItem, { children: _jsx("div", { style: { padding: `0px ${calcResponsiveSizes(deviceType, '40px', '40px', '10px')}` }, children: _jsx(TMCard, { showBorder: false, children: _jsxs(TMLayoutContainer, { children: [_jsx(TMLayoutItem, { children: _jsx(TMTextBox, { type: "password", label: SDKUI_Localizator.OldPassword, icon: _jsx(IconPassword, {}), onValueChanged: (e) => setChangePasswordState({ ...changePasswordState, oldPassword: e.target.value }), value: changePasswordState.oldPassword, validationItems: changePasswordValidationItems.filter(item => item.PropertyName === 'changePass_old') }) }), _jsx(TMLayoutItem, { children: _jsx(TMTextBox, { type: "password", label: SDKUI_Localizator.NewPassword, icon: _jsx(IconPassword, {}), onValueChanged: (e) => setChangePasswordState({ ...changePasswordState, newPassword: e.target.value }), value: changePasswordState.newPassword, validationItems: changePasswordValidationItems.filter(item => item.PropertyName === 'changePass_new' || item.PropertyName === 'changePass_equalUsername' || item.PropertyName === 'changePass_containUsername') }) }), _jsx(TMLayoutItem, { children: _jsx(TMTextBox, { type: "password", label: SDKUI_Localizator.ConfirmPassword, icon: _jsx(IconPassword, {}), onValueChanged: (e) => setChangePasswordState({ ...changePasswordState, confermPassword: e.target.value }), value: changePasswordState.confermPassword, validationItems: changePasswordValidationItems.filter(item => item.PropertyName === 'changePass_confirm' || item.PropertyName === 'changePass_notConfirmed') }) })] }) }) }) }), _jsx(TMPasswordManager, { operation: "change", validationItems: changePasswordValidationItems }), hasBack && _jsx(TMLayoutItem, { height: "fit-content", width: "fit-content", children: _jsx("p", { onClick: back, tabIndex: enable ? 0 : undefined, onKeyDown: (e) => e.code === 'Space' && back(), style: { userSelect: 'none', cursor: enable ? 'pointer' : 'default', color: enable ? TMColors.primary : 'rgb(180,180,180)', fontSize: '1rem' }, children: SDKUI_Localizator.Back }) }), _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", caption: SDKUI_Localizator.Save, disabled: changePasswordValidationItems.length > 0, onClick: () => { changePasswordAsync(); }, showTooltip: false }) }) })] }) }));
995
995
  };
996
996
  export default TMLoginForm;
@@ -14,8 +14,6 @@ import { DeviceType, useDeviceType } from '../base/TMDeviceProvider';
14
14
  const TMSaveForm = ({ id, formMode = FormModes.Update, showToolbar = true, skipIsModifiedCheck = false, title, children, isModal, exception, customToolbarElements, hasNavigation, showBackButton, onClose, onSaveAsync, onNext, onPrev, canNext, canPrev, isModified, onShowList, validationItems = [], onUndo, onCancel, width, height }) => {
15
15
  const [showList, setShowList] = useState(true);
16
16
  const [showErrorGrid, setShowErrorGrid] = useState(false);
17
- // let windowWidth = useWindowWidth()
18
- // let isMobile: boolean = windowWidth <= MOBILE_WIDTH;
19
17
  const deviceType = useDeviceType();
20
18
  const doSaveAsync = async () => { try {
21
19
  await onSaveAsync?.();
@@ -17,8 +17,6 @@ const TMToolbarButton = ({ showTooltip = true, color = 'primary', icon, caption
17
17
  return (_jsx(TMButton, { keyGesture: keyGesture, color: color, disabled: disabled, caption: caption, onClick: () => { onClick && onClick(); }, icon: icon, showTooltip: showTooltip, btnStyle: 'toolbar' }));
18
18
  };
19
19
  const TMPage = ({ id, objClass = ObjectClasses.None, objType, listInsteadOfContent, detailInsteadOfContent, routePage, customButtons, customColumns, searchText, detailForm, detailTitlePathKeys, deps, abortSignal, onProgressChanged, onSelectionChanged, onCountersChanged }) => {
20
- // let width = useWindowWidth();
21
- // let isMobile: boolean = width <= MOBILE_WIDTH;
22
20
  const deviceType = useDeviceType();
23
21
  let gridInstance;
24
22
  const [showId, setShowId] = useState(false);
@@ -222,7 +222,6 @@ const TMQueryResultForm = ({ onUpdate, isModal, onClose, context = SearchResultC
222
222
  _jsxs(StyledTitleContainer, { children: [context === SearchResultContext.WORKFLOW_APPROVE ? _jsx(IconActivityLog, { fontSize: 14 }) : context === SearchResultContext.FAVORITES ? _jsx(IconStar, {}) : context === SearchResultContext.RECENT ? _jsx(IconRefresh, {}) : '', context === SearchResultContext.WORKFLOW_APPROVE ? SDKUI_Localizator.WorkflowApproval : context === SearchResultContext.FAVORITES ? SDKUI_Localizator.Favorites : context === SearchResultContext.RECENT ? SDKUI_Localizator.Recent : ''] }, context === SearchResultContext.WORKFLOW_APPROVE ? 'title2' : context === SearchResultContext.FAVORITES ? 'title0' : context === SearchResultContext.RECENT ? 'title1' : '')
223
223
  ];
224
224
  const [toolbar, setToolbar] = useState(toolbarElements);
225
- // let width = useWindowWidth()
226
225
  const deviceType = useDeviceType();
227
226
  let isMobile = deviceType === DeviceType.MOBILE;
228
227
  useEffect(() => { if (isMobile) {
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useRef } from 'react';
3
3
  import six from '../../assets/loading.png';
4
- import { IconBxInfo, IconCloseOutline, IconLogout, IconPassword, IconSearch, IconSettings, IconUserProfile, MOBILE_WIDTH, SDKUI_Localizator, useWindowWidth } from '../../helper';
4
+ import { IconBxInfo, IconCloseOutline, IconLogout, IconPassword, IconSearch, IconSettings, IconUserProfile, SDKUI_Localizator } from '../../helper';
5
5
  import styled from 'styled-components';
6
6
  import { SDK_Globals, AuthenticationModes } from '@topconsultnpm/sdk-ts-beta';
7
7
  import { FontSize, TMColors } from '../../utils/theme';
@@ -35,7 +35,6 @@ const StyledChaBotBtnWrapper = styled.div ` position: relative; cursor: pointer;
35
35
  const StyledChatBotToppyContainer = styled.div ` background-color: orange; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50px; position: absolute; left: -10px; `;
36
36
  const StyledToppyImage = styled.div ` display: flex; align-items: center; justify-content: center; width: 25px; height: 25px; border-radius: 50px; overflow: hidden; background-color: white; `;
37
37
  export const TMSearchBar = ({ searchValue, onSearchValueChanged, maxWidth, marginLeft }) => {
38
- // const size = useWindowWidth()
39
38
  const deviceType = useDeviceType();
40
39
  return (_jsxs(StyledSearchBarContainer, { style: { maxWidth: maxWidth ? maxWidth : deviceType === DeviceType.MOBILE ? '65%' : '650px', marginLeft: marginLeft ? marginLeft : deviceType === DeviceType.MOBILE ? '10px' : '50px' }, "$isMobile": deviceType === DeviceType.MOBILE, children: [_jsx(IconSearch, { fontSize: 12, color: '#00000060', style: { position: 'absolute', width: '20px', height: '20px', left: '5px', top: '5px', zIndex: 1 } }), _jsx(StyledSearchBar, { placeholder: SDKUI_Localizator.Search + '...', type: "text", value: searchValue, onChange: (e) => onSearchValueChanged(e.target.value) }), searchValue.length > 0 && _jsx(IconCloseOutline, { onClick: () => onSearchValueChanged(''), color: '#00000060', style: { cursor: 'pointer', position: 'absolute', width: '20px', height: '20px', right: '5px', top: '5px', zIndex: 1 } })] }));
41
40
  };
@@ -50,8 +49,8 @@ const TMHeader = ({ showSearchBar = true, clearSearchJobValue, clearSearchQEValu
50
49
  const [isChatbot, setIsChatbot] = useState(false);
51
50
  const menuRef = useRef(null);
52
51
  const userIcon = useRef(null);
53
- let width = useWindowWidth();
54
- let isMobile = width <= MOBILE_WIDTH;
52
+ const deviceType = useDeviceType();
53
+ let isMobile = deviceType == DeviceType.MOBILE;
55
54
  useEffect(() => { clearSearchJobValue && setSearchJobsValue(''); }, [clearSearchJobValue]);
56
55
  useEffect(() => { clearSearchQEValue && setSearchQEValue(''); }, [clearSearchQEValue]);
57
56
  useEffect(() => {
@@ -1,12 +1,13 @@
1
1
  import { Colors as ColorsType } from "../components/base/TMEditorBase";
2
+ import { DeviceType } from "../components";
2
3
  import { AppModules, DataColumnDescriptor, ITopMediaSession, QueryDescriptor, SearchResultDescriptor } from "@topconsultnpm/sdk-ts-beta";
3
4
  import { FormModes } from "../ts";
4
5
  declare const TABLET_WIDTH = 1024;
5
6
  declare const MOBILE_WIDTH = 640;
6
- declare const calcResponsiveDirection: (currentWidth: number, desktopDir: 'horizontal' | 'vertical', tabletDir: 'horizontal' | 'vertical', mobileDir: 'horizontal' | 'vertical') => 'horizontal' | 'vertical';
7
+ declare const calcResponsiveDirection: (deviceType: DeviceType, desktopDir: 'horizontal' | 'vertical', tabletDir: 'horizontal' | 'vertical', mobileDir: 'horizontal' | 'vertical') => 'horizontal' | 'vertical';
7
8
  declare const openApps: (appModule: AppModules, tmSession: ITopMediaSession, appRoutes?: any[]) => Promise<void>;
8
9
  export declare const setSDK_GlobalsInfoAsync: (tms: ITopMediaSession | undefined) => Promise<ITopMediaSession>;
9
- declare const calcResponsiveSizes: (currentWidth: number, desktopSize: string, tabletSize: string, mobileSize: string) => string;
10
+ declare const calcResponsiveSizes: (deviceType: DeviceType | undefined, desktopSize: string, tabletSize: string, mobileSize: string) => string;
10
11
  declare const useWindowWidth: () => number;
11
12
  declare const getColor: (color: ColorsType) => string;
12
13
  declare const makeID: (length: number) => string;
@@ -1,6 +1,6 @@
1
1
  import { useLayoutEffect, useState } from "react";
2
2
  import { Colors } from "../utils/theme";
3
- import { ButtonNames, TMExceptionBoxManager, TMMessageBoxManager, TMSpinner } from "../components";
3
+ import { ButtonNames, DeviceType, TMExceptionBoxManager, TMMessageBoxManager, TMSpinner } from "../components";
4
4
  import { SDK_Globals, SystemMIDsAsNumber, TopMediaServer } from "@topconsultnpm/sdk-ts-beta";
5
5
  import { Buffer } from 'buffer';
6
6
  import { FormModes } from "../ts";
@@ -8,13 +8,18 @@ import { SDKUI_Localizator } from "./SDKUI_Localizator";
8
8
  //#region Responsive Helpers
9
9
  const TABLET_WIDTH = 1024;
10
10
  const MOBILE_WIDTH = 640;
11
- const calcResponsiveDirection = (currentWidth, desktopDir, tabletDir, mobileDir) => {
12
- if (currentWidth > TABLET_WIDTH)
11
+ const calcResponsiveDirection = (deviceType, desktopDir, tabletDir, mobileDir) => {
12
+ if (deviceType === DeviceType.DESKTOP)
13
13
  return desktopDir;
14
- if (currentWidth <= TABLET_WIDTH && currentWidth > MOBILE_WIDTH)
14
+ if (deviceType === DeviceType.TABLET)
15
15
  return tabletDir;
16
16
  return mobileDir;
17
17
  };
18
+ // const calcResponsiveDirection = (currentWidth: number, desktopDir: 'horizontal' | 'vertical', tabletDir: 'horizontal' | 'vertical', mobileDir: 'horizontal' | 'vertical'): 'horizontal' | 'vertical' => {
19
+ // if (currentWidth > TABLET_WIDTH) return desktopDir;
20
+ // if (currentWidth <= TABLET_WIDTH && currentWidth > MOBILE_WIDTH) return tabletDir;
21
+ // return mobileDir;
22
+ // }
18
23
  const openApps = async (appModule, tmSession, appRoutes) => {
19
24
  try {
20
25
  window.Buffer = Buffer;
@@ -51,13 +56,18 @@ export const setSDK_GlobalsInfoAsync = async (tms) => {
51
56
  }
52
57
  return tmSessionNew;
53
58
  };
54
- const calcResponsiveSizes = (currentWidth, desktopSize, tabletSize, mobileSize) => {
55
- if (currentWidth > TABLET_WIDTH)
59
+ const calcResponsiveSizes = (deviceType, desktopSize, tabletSize, mobileSize) => {
60
+ if (deviceType === DeviceType.DESKTOP)
56
61
  return desktopSize;
57
- if (currentWidth <= TABLET_WIDTH && currentWidth > MOBILE_WIDTH)
62
+ if (deviceType === DeviceType.TABLET)
58
63
  return tabletSize;
59
64
  return mobileSize;
60
65
  };
66
+ // const calcResponsiveSizes = (currentWidth: number, desktopSize: string, tabletSize: string, mobileSize: string): string => {
67
+ // if (currentWidth > TABLET_WIDTH) return desktopSize;
68
+ // if (currentWidth <= TABLET_WIDTH && currentWidth > MOBILE_WIDTH) return tabletSize;
69
+ // return mobileSize;
70
+ // }
61
71
  const useWindowWidth = () => {
62
72
  const [windowWidth, setWindowWidth] = useState(window.innerWidth);
63
73
  const handleSize = () => { setWindowWidth(window.innerWidth); };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.6.111",
3
+ "version": "6.6.112",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file