@topconsultnpm/sdkui-react-beta 6.6.136 → 6.7.1

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,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, SDKUI_Localizator } from '../../helper';
4
+ import { IconBxInfo, IconCloseOutline, IconLogout, IconPassword, IconSearch, IconSettings, IconUserProfile, SDKUI_Localizator, versionAndBuildtypeInfo } 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';
@@ -9,6 +9,7 @@ import { ButtonNames, TMMessageBoxManager } from '../base/TMPopUp';
9
9
  import Logo from '../../assets/Toppy-generico.png';
10
10
  import { ApplicationThemeColor } from './TMSidebarItem';
11
11
  import { DeviceType, useDeviceType } from '../base/TMDeviceProvider';
12
+ import { moduleTypes } from '../../ts/types';
12
13
  export var TMSearchContext;
13
14
  (function (TMSearchContext) {
14
15
  TMSearchContext["JOBS"] = "jobs";
@@ -86,57 +87,6 @@ const TMHeader = ({ showSearchBar = true, clearSearchJobValue, clearSearchQEValu
86
87
  document.addEventListener('click', handleClickOutside);
87
88
  return () => document.removeEventListener('click', handleClickOutside);
88
89
  }, [menuRef, userIcon, menuStatus]);
89
- let moduleTypes;
90
- (function (moduleTypes) {
91
- moduleTypes["SDK"] = "SDK";
92
- moduleTypes["SDKUI"] = "SDKUI";
93
- moduleTypes["WEBSDK"] = "WEBSDK";
94
- moduleTypes["APP"] = "APP";
95
- })(moduleTypes || (moduleTypes = {}));
96
- let buildTypes;
97
- (function (buildTypes) {
98
- buildTypes["DEV"] = "DEV";
99
- buildTypes["TEST"] = "TEST";
100
- buildTypes["RTM"] = "RTM";
101
- buildTypes["PATCH"] = "PATCH";
102
- })(buildTypes || (buildTypes = {}));
103
- function moduleVersion(module) {
104
- switch (module) {
105
- case moduleTypes.SDK: return SDK_Globals.sdkVersion ?? '0.0.0';
106
- case moduleTypes.SDKUI: return SDK_Globals.sdkuiVersion ?? '0.0.0';
107
- case moduleTypes.WEBSDK: return SDK_Globals.websdkVersion ?? '0.0.0';
108
- default: return SDK_Globals.appVersion ?? '0.0.0';
109
- }
110
- }
111
- function buildtype(module) {
112
- let versionApp = moduleVersion(moduleTypes.APP);
113
- let version = moduleVersion(module);
114
- let nameSDK = SDK_Globals.sdkName ?? "";
115
- let buildType;
116
- if (nameSDK.endsWith('-beta') && version.endsWith('.0'))
117
- buildType = buildTypes.TEST;
118
- else if (nameSDK.endsWith('-beta') && versionApp.endsWith('.0'))
119
- buildType = buildTypes.TEST;
120
- else if (nameSDK.endsWith('-beta'))
121
- buildType = buildTypes.DEV;
122
- else if (version.endsWith('.0'))
123
- buildType = buildTypes.RTM;
124
- else
125
- buildType = buildTypes.PATCH;
126
- return buildType;
127
- }
128
- function versionAndBuildtypeInfo(module) {
129
- let buildType = buildtype(module);
130
- let version = moduleVersion(module);
131
- switch (buildType) {
132
- case buildTypes.DEV:
133
- case buildTypes.TEST:
134
- case buildTypes.RTM: return `${version} ${buildType}`;
135
- default:
136
- let vs = version.split('.');
137
- return `${vs[0]}.${vs[1]} PATCH ${vs[2]}`;
138
- }
139
- }
140
90
  const AboutApp = () => {
141
91
  return (_jsxs(StyledSettingsMenuContainer, { children: [_jsxs(StyledSettingsMenuItem, { children: [_jsxs(StyledSettingsMenuItemTitle, { children: [_jsx(StyledSettingsMenuItemCircle, { style: { color: TMColors.info }, children: "\u25CF" }), " ", SDK_Globals.appModule] }), _jsx(StyledSettingsMenuItemVersion, { style: { color: TMColors.info }, children: versionAndBuildtypeInfo(moduleTypes.APP) })] }), _jsxs(StyledSettingsMenuItem, { children: [_jsxs(StyledSettingsMenuItemTitle, { children: [_jsx(StyledSettingsMenuItemCircle, { style: { color: TMColors.error }, children: "\u25CF" }), " SDKUI-REACT"] }), _jsx(StyledSettingsMenuItemVersion, { style: { color: TMColors.error }, children: versionAndBuildtypeInfo(moduleTypes.SDKUI) })] }), _jsxs(StyledSettingsMenuItem, { children: [_jsxs(StyledSettingsMenuItemTitle, { children: [_jsx(StyledSettingsMenuItemCircle, { style: { color: TMColors.success }, children: "\u25CF" }), " SDK-TS"] }), _jsx(StyledSettingsMenuItemVersion, { style: { color: TMColors.success }, children: versionAndBuildtypeInfo(moduleTypes.SDK) })] }), _jsxs(StyledSettingsMenuItem, { children: [_jsxs(StyledSettingsMenuItemTitle, { children: [_jsx(StyledSettingsMenuItemCircle, { style: { color: TMColors.info }, children: "\u25CF" }), " WEBSDK"] }), _jsx(StyledSettingsMenuItemVersion, { style: { color: TMColors.info }, children: versionAndBuildtypeInfo(moduleTypes.WEBSDK) })] })] }));
142
92
  };
@@ -1,9 +1,9 @@
1
1
  import { DataListViewModes } from '@topconsultnpm/sdk-ts-beta';
2
2
  import { DataGridTypes } from 'devextreme-react/cjs/data-grid';
3
3
  declare const TMDataListItemViewer: ({ dataListId, value, viewMode }: {
4
- dataListId?: number | undefined;
5
- value?: string | undefined;
6
- viewMode?: DataListViewModes | undefined;
4
+ dataListId?: number;
5
+ value?: string;
6
+ viewMode?: DataListViewModes;
7
7
  }) => import("react/jsx-runtime").JSX.Element;
8
8
  export default TMDataListItemViewer;
9
9
  export declare const cellRenderDataListItem: (data: DataGridTypes.ColumnCellTemplateData, dataListId?: number, viewMode?: DataListViewModes) => import("react/jsx-runtime").JSX.Element;
@@ -3,12 +3,12 @@ import { ITopMediaSession, MetadataDescriptor } from '@topconsultnpm/sdk-ts-beta
3
3
  import { TID_MID } from '../../ts';
4
4
  import { DataGridTypes } from 'devextreme-react/cjs/data-grid';
5
5
  export declare const TMMidViewer: ({ tmSession, tid_mid, showCompleteName, showIcon, showId, noneSelectionText }: {
6
- tmSession?: ITopMediaSession | undefined;
6
+ tmSession?: ITopMediaSession;
7
7
  tid_mid: TID_MID | undefined;
8
- showCompleteName?: boolean | undefined;
9
- showIcon?: boolean | undefined;
10
- showId?: boolean | undefined;
11
- noneSelectionText?: string | undefined;
8
+ showCompleteName?: boolean;
9
+ showIcon?: boolean;
10
+ showId?: boolean;
11
+ noneSelectionText?: string;
12
12
  }) => import("react/jsx-runtime").JSX.Element;
13
13
  interface ITMMetadataIcon {
14
14
  tid: number | undefined;
@@ -11,11 +11,11 @@ interface ITMDcmtTypeTooltip {
11
11
  }
12
12
  export declare const TMDcmtTypeTooltip: React.FC<ITMDcmtTypeTooltip>;
13
13
  declare const TMTidViewer: ({ tmSession, tid, showIcon, showId, noneSelectionText }: {
14
- tmSession?: ITopMediaSession | undefined;
15
- tid?: number | undefined;
16
- showIcon?: boolean | undefined;
17
- showId?: boolean | undefined;
18
- noneSelectionText?: string | undefined;
14
+ tmSession?: ITopMediaSession;
15
+ tid?: number;
16
+ showIcon?: boolean;
17
+ showId?: boolean;
18
+ noneSelectionText?: string;
19
19
  }) => import("react/jsx-runtime").JSX.Element;
20
20
  export default TMTidViewer;
21
21
  export declare const cellRenderTID: (data: DataGridTypes.ColumnCellTemplateData, noneSelectionText?: string) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,10 @@
1
1
  import { Colors as ColorsType } from "../components/base/TMEditorBase";
2
2
  import { DeviceType } from "../components";
3
3
  import { AppModules, DataColumnDescriptor, ITopMediaSession, QueryDescriptor, SearchResultDescriptor } from "@topconsultnpm/sdk-ts-beta";
4
- import { FormModes } from "../ts";
4
+ import { FormModes, moduleTypes } from "../ts";
5
5
  declare const TABLET_WIDTH = 1024;
6
6
  declare const MOBILE_WIDTH = 640;
7
- declare const calcResponsiveDirection: (deviceType: DeviceType, desktopDir: '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";
8
8
  declare const openApps: (appModule: AppModules, tmSession: ITopMediaSession, appRoutes?: any[]) => Promise<void>;
9
9
  export declare const setSDK_GlobalsInfoAsync: (tms: ITopMediaSession | undefined) => Promise<ITopMediaSession>;
10
10
  declare const calcResponsiveSizes: (deviceType: DeviceType | undefined, desktopSize: string, tabletSize: string, mobileSize: string) => string;
@@ -24,3 +24,6 @@ export declare const getPrev: (visibleItems: any[], selectedItems: any[]) => any
24
24
  export declare const calcSaveFormTitle: (rootTitle: string | undefined, formMode: FormModes, updateId: number | undefined, pathKeys: string[] | undefined) => string;
25
25
  export declare function calcIsModified(formData: any, formDataOrig: any): boolean;
26
26
  export { openApps, calcResponsiveDirection, calcResponsiveSizes, getColor, genUniqueId, makeID, MOBILE_WIDTH, TABLET_WIDTH };
27
+ export declare function moduleVersion(module: moduleTypes): string;
28
+ export declare function buildtype(module: moduleTypes): string;
29
+ export declare function versionAndBuildtypeInfo(module: moduleTypes): string;
@@ -2,7 +2,7 @@ import { Colors } from "../utils/theme";
2
2
  import { ButtonNames, DeviceType, TMExceptionBoxManager, TMMessageBoxManager, TMSpinner } from "../components";
3
3
  import { SDK_Globals, SystemMIDsAsNumber, TopMediaServer } from "@topconsultnpm/sdk-ts-beta";
4
4
  import { Buffer } from 'buffer';
5
- import { FormModes } from "../ts";
5
+ import { buildTypes, FormModes, moduleTypes } from "../ts";
6
6
  import { SDKUI_Localizator } from "./SDKUI_Localizator";
7
7
  //#region Responsive Helpers
8
8
  const TABLET_WIDTH = 1024;
@@ -255,3 +255,40 @@ export const calcSaveFormTitle = (rootTitle, formMode, updateId, pathKeys) => {
255
255
  export function calcIsModified(formData, formDataOrig) { return JSON.stringify(formData) !== JSON.stringify(formDataOrig); }
256
256
  //#endregion
257
257
  export { openApps, calcResponsiveDirection, calcResponsiveSizes, getColor, genUniqueId, makeID, MOBILE_WIDTH, TABLET_WIDTH };
258
+ export function moduleVersion(module) {
259
+ switch (module) {
260
+ case moduleTypes.SDK: return SDK_Globals.sdkVersion ?? '0.0.0';
261
+ case moduleTypes.SDKUI: return SDK_Globals.sdkuiVersion ?? '0.0.0';
262
+ case moduleTypes.WEBSDK: return SDK_Globals.websdkVersion ?? '0.0.0';
263
+ default: return SDK_Globals.appVersion ?? '0.0.0';
264
+ }
265
+ }
266
+ export function buildtype(module) {
267
+ let versionApp = moduleVersion(moduleTypes.APP);
268
+ let version = moduleVersion(module);
269
+ let nameSDK = SDK_Globals.sdkName ?? "";
270
+ let buildType;
271
+ if (nameSDK.endsWith('-beta') && version.endsWith('.0'))
272
+ buildType = buildTypes.TEST;
273
+ else if (nameSDK.endsWith('-beta') && versionApp.endsWith('.0'))
274
+ buildType = buildTypes.TEST;
275
+ else if (nameSDK.endsWith('-beta'))
276
+ buildType = buildTypes.DEV;
277
+ else if (version.endsWith('.0'))
278
+ buildType = buildTypes.RTM;
279
+ else
280
+ buildType = buildTypes.PATCH;
281
+ return buildType;
282
+ }
283
+ export function versionAndBuildtypeInfo(module) {
284
+ let buildType = buildtype(module);
285
+ let version = moduleVersion(module);
286
+ switch (buildType) {
287
+ case buildTypes.DEV:
288
+ case buildTypes.TEST:
289
+ case buildTypes.RTM: return `${version} ${buildType}`;
290
+ default:
291
+ let vs = version.split('.');
292
+ return `${vs[0]}.${vs[1]} PATCH ${vs[2]}`;
293
+ }
294
+ }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FormModes } from "../ts";
3
2
  import { JobTypes, ObjectClasses, ValidationItem } from "@topconsultnpm/sdk-ts-beta";
4
3
  export declare class SaveFormOptions {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  export declare const useOutsideClick: (callback: (escPressed?: boolean) => void) => import("react").RefObject<HTMLDivElement>;
3
2
  export declare const useEscapeKeyPress: (callback: () => void) => import("react").RefObject<HTMLDivElement>;
package/lib/ts/types.d.ts CHANGED
@@ -153,3 +153,15 @@ export interface ITMChooserProps extends ITMEditorBase {
153
153
  onValueChanged?: (value: any) => void;
154
154
  onRefreshCache?: () => void;
155
155
  }
156
+ export declare enum moduleTypes {
157
+ SDK = "SDK",
158
+ SDKUI = "SDKUI",
159
+ WEBSDK = "WEBSDK",
160
+ APP = "APP"
161
+ }
162
+ export declare enum buildTypes {
163
+ DEV = "DEV",
164
+ TEST = "TEST",
165
+ RTM = "RTM",
166
+ PATCH = "PATCH"
167
+ }
package/lib/ts/types.js CHANGED
@@ -14,4 +14,18 @@ export var TMProgressOptions;
14
14
  TMProgressOptions[TMProgressOptions["Finish"] = 2] = "Finish";
15
15
  TMProgressOptions[TMProgressOptions["NewAbortController"] = 3] = "NewAbortController";
16
16
  })(TMProgressOptions || (TMProgressOptions = {}));
17
+ export var moduleTypes;
18
+ (function (moduleTypes) {
19
+ moduleTypes["SDK"] = "SDK";
20
+ moduleTypes["SDKUI"] = "SDKUI";
21
+ moduleTypes["WEBSDK"] = "WEBSDK";
22
+ moduleTypes["APP"] = "APP";
23
+ })(moduleTypes || (moduleTypes = {}));
24
+ export var buildTypes;
25
+ (function (buildTypes) {
26
+ buildTypes["DEV"] = "DEV";
27
+ buildTypes["TEST"] = "TEST";
28
+ buildTypes["RTM"] = "RTM";
29
+ buildTypes["PATCH"] = "PATCH";
30
+ })(buildTypes || (buildTypes = {}));
17
31
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.6.136",
3
+ "version": "6.7.1",
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.6.23",
31
+ "@topconsultnpm/sdk-ts-beta": "^6.7.0",
32
32
  "buffer": "^6.0.3",
33
33
  "devextreme": "24.1.6",
34
34
  "devextreme-react": "24.1.6",