@topconsultnpm/sdkui-react 6.22.0-dev2.43 → 6.22.0-dev2.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +43 -45
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +60 -67
- package/lib/components/base/Styled.d.ts +77 -93
- package/lib/components/base/TMCounterBar.d.ts +2 -2
- package/lib/components/base/TMCounterContainer.d.ts +1 -2
- package/lib/components/base/TMCustomButton.d.ts +1 -1
- package/lib/components/base/TMDataGridExportForm.d.ts +1 -2
- package/lib/components/base/TMFileManager.d.ts +1 -2
- package/lib/components/base/TMFileManagerDataGridView.d.ts +1 -2
- package/lib/components/base/TMFileManagerDataGridView.js +11 -2
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +1 -1
- package/lib/components/base/TMFileManagerThumbnailItems.js +19 -9
- package/lib/components/base/TMFileManagerThumbnailsView.d.ts +1 -1
- package/lib/components/base/TMFileManagerUtils.d.ts +7 -4
- package/lib/components/base/TMFileManagerUtils.js +21 -1
- package/lib/components/base/TMLayout.d.ts +4 -4
- package/lib/components/base/TMList.d.ts +1 -2
- package/lib/components/base/TMListView.d.ts +1 -1
- package/lib/components/base/TMSpinner.d.ts +1 -2
- package/lib/components/base/TMTab.d.ts +3 -4
- package/lib/components/base/TMTooltip.d.ts +1 -1
- package/lib/components/base/TMTreeView.d.ts +8 -14
- package/lib/components/base/TMUserAvatar.d.ts +1 -2
- package/lib/components/base/TMVilViewer.d.ts +1 -2
- package/lib/components/base/TMWaitPanel.d.ts +2 -3
- package/lib/components/choosers/TMDynDataListItemChooser.d.ts +1 -1
- package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +1 -2
- package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +1 -2
- package/lib/components/choosers/TMQuickSearchInfo.d.ts +1 -2
- package/lib/components/choosers/TMRelationChooser.d.ts +3 -3
- package/lib/components/choosers/TMUserChooser.d.ts +2 -2
- package/lib/components/editors/TMEditorStyled.d.ts +42 -20
- package/lib/components/editors/TMFormulaEditor.d.ts +1 -1
- package/lib/components/editors/TMHtmlContentDisplay.d.ts +1 -2
- package/lib/components/editors/TMHtmlEditor.d.ts +1 -2
- package/lib/components/editors/TMTreeDropDown.d.ts +1 -1
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +1 -1
- package/lib/components/features/blog/TMBlogCommentForm.d.ts +1 -2
- package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +1 -1
- package/lib/components/features/documents/TMDcmtIcon.d.ts +1 -2
- package/lib/components/features/documents/TMDcmtIcon.js +5 -3
- package/lib/components/features/documents/TMDcmtPreview.d.ts +6 -8
- package/lib/components/features/documents/TMDcmtTasks.d.ts +1 -2
- package/lib/components/features/documents/TMDragDropOverlay.d.ts +1 -1
- package/lib/components/features/documents/TMMasterInfoFields.d.ts +1 -2
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +1 -2
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +1 -2
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +4 -4
- package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +1 -2
- package/lib/components/features/search/TMMetadataOutputForm.d.ts +1 -2
- package/lib/components/features/search/TMMetadataSorterForm.d.ts +1 -2
- package/lib/components/features/search/TMSavedQuerySelector.d.ts +2 -2
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +3 -9
- package/lib/components/features/search/TMSearchResultFloatingActionButton.d.ts +1 -1
- package/lib/components/features/search/TMSignatureInfoContent.d.ts +1 -2
- package/lib/components/features/search/TMViewHistoryDcmt.d.ts +1 -2
- package/lib/components/features/tasks/TMTaskForm.d.ts +1 -1
- package/lib/components/features/tasks/TMTaskFormUtils.d.ts +10 -10
- package/lib/components/features/tasks/TMTasksAgenda.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksCalendar.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksHeader.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksPanelContent.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksUtilsView.d.ts +5 -5
- package/lib/components/features/tasks/TMTasksView.d.ts +1 -1
- package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +2 -3
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +7 -8
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +1 -3
- package/lib/components/forms/Login/ChangePasswordInputs.d.ts +1 -3
- package/lib/components/forms/Login/Chooser.d.ts +2 -2
- package/lib/components/forms/TMChooserForm.d.ts +1 -2
- package/lib/components/forms/TMSaveForm.d.ts +4 -4
- package/lib/components/grids/TMBlogAttachments.d.ts +1 -2
- package/lib/components/grids/TMBlogAttachments.js +13 -2
- package/lib/components/grids/TMBlogHeader.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.d.ts +1 -1
- package/lib/components/grids/TMBlogsPostUtils.d.ts +9 -9
- package/lib/components/grids/TMValidationItemsList.d.ts +1 -2
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -2
- package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +2 -2
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +6 -5
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +2 -2
- package/lib/components/layout/panelManager/TMPanelWrapper.d.ts +2 -2
- package/lib/components/pages/TMPage.d.ts +1 -1
- package/lib/components/query/TMQueryEditor.d.ts +10 -14
- package/lib/components/settings/SettingsAppearance.d.ts +1 -2
- package/lib/components/sidebar/TMAboutApp.d.ts +1 -2
- package/lib/components/sidebar/TMCommandsPanel.d.ts +4 -4
- package/lib/components/sidebar/TMHeader.d.ts +3 -3
- package/lib/components/viewers/TMDataListItemViewer.d.ts +2 -3
- package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +2 -3
- package/lib/components/viewers/TMMidViewer.d.ts +2 -2
- package/lib/components/viewers/TMTidViewer.d.ts +2 -2
- package/lib/helper/SDKUI_Globals.d.ts +1 -0
- package/lib/helper/SDKUI_Globals.js +1 -0
- package/lib/helper/SDKUI_Localizator.d.ts +5 -0
- package/lib/helper/SDKUI_Localizator.js +50 -0
- package/lib/helper/TMAppUpdatedModal.d.ts +1 -0
- package/lib/helper/TMAppUpdatedModal.js +134 -0
- package/lib/helper/TMCommandsContextMenu.d.ts +1 -1
- package/lib/helper/TMIcons.d.ts +280 -280
- package/lib/helper/TMPdfViewer.d.ts +1 -2
- package/lib/helper/TMToppyMessage.d.ts +2 -2
- package/lib/helper/TMUtils.d.ts +9 -10
- package/lib/helper/TMUtils.js +13 -1
- package/lib/helper/helpers.d.ts +3 -1
- package/lib/helper/helpers.js +2 -0
- package/lib/helper/index.d.ts +1 -0
- package/lib/helper/index.js +1 -0
- package/lib/hooks/useInputDialog.d.ts +1 -2
- package/lib/services/platform_services.d.ts +2 -3
- package/package.json +1 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { DataGridTypes } from 'devextreme-react/data-grid';
|
|
3
2
|
interface ITMDataUserIdItemViewerProps {
|
|
4
3
|
userId?: number;
|
|
5
4
|
showIcon?: boolean;
|
|
6
5
|
}
|
|
7
|
-
declare const TMDataUserIdItemViewer: ({ userId, showIcon }: ITMDataUserIdItemViewerProps) =>
|
|
6
|
+
declare const TMDataUserIdItemViewer: ({ userId, showIcon }: ITMDataUserIdItemViewerProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
7
|
export default TMDataUserIdItemViewer;
|
|
9
|
-
export declare const cellRenderUserIdItem: (data: DataGridTypes.ColumnCellTemplateData, showIcon?: boolean) =>
|
|
8
|
+
export declare const cellRenderUserIdItem: (data: DataGridTypes.ColumnCellTemplateData, showIcon?: boolean) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,7 +22,7 @@ interface ITMMetadataIcon {
|
|
|
22
22
|
isMetadataSelected?: boolean;
|
|
23
23
|
elementStyle?: React.CSSProperties;
|
|
24
24
|
}
|
|
25
|
-
export declare const TMMetadataIcon: ({ tid, md, color, layoutMode, isMetadataSelected, elementStyle }: ITMMetadataIcon) =>
|
|
25
|
+
export declare const TMMetadataIcon: ({ tid, md, color, layoutMode, isMetadataSelected, elementStyle }: ITMMetadataIcon) => import("react/jsx-runtime").JSX.Element | null;
|
|
26
26
|
interface ITMMetadataTooltip {
|
|
27
27
|
tid: number | undefined;
|
|
28
28
|
md: MetadataDescriptor | undefined;
|
|
@@ -31,6 +31,6 @@ interface ITMMetadataTooltip {
|
|
|
31
31
|
layoutMode?: LayoutModes;
|
|
32
32
|
}
|
|
33
33
|
export declare const TMMetadataTooltip: React.FC<ITMMetadataTooltip>;
|
|
34
|
-
export declare const cellRenderMID: (data: DataGridTypes.ColumnCellTemplateData, noneSelectionText?: string, tid?: number) =>
|
|
34
|
+
export declare const cellRenderMID: (data: DataGridTypes.ColumnCellTemplateData, noneSelectionText?: string, tid?: number) => import("react/jsx-runtime").JSX.Element;
|
|
35
35
|
export declare const getDisplayAlias: (dcmtTypeName: string | undefined, alias: string | undefined) => string | undefined;
|
|
36
36
|
export {};
|
|
@@ -252,5 +252,5 @@ export interface ITMTidViewerProps {
|
|
|
252
252
|
}
|
|
253
253
|
declare const TMTidViewer: React.FC<ITMTidViewerProps>;
|
|
254
254
|
export default TMTidViewer;
|
|
255
|
-
export declare const cellRenderTID: (data: DataGridTypes.ColumnCellTemplateData, noneSelectionText?: string) =>
|
|
256
|
-
export declare const renderDTDTooltipContent: (dtd: DcmtTypeDescriptor | undefined) =>
|
|
255
|
+
export declare const cellRenderTID: (data: DataGridTypes.ColumnCellTemplateData, noneSelectionText?: string) => import("react/jsx-runtime").JSX.Element;
|
|
256
|
+
export declare const renderDTDTooltipContent: (dtd: DcmtTypeDescriptor | undefined) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -37,6 +37,7 @@ export declare class UserSettings {
|
|
|
37
37
|
dcmtCheckoutInfo: CheckoutInfo[];
|
|
38
38
|
defaultCheckInOutFolder: string;
|
|
39
39
|
documentDownloadSettings: DocumentDownloadSettings;
|
|
40
|
+
lastSeenAppVersion: string;
|
|
40
41
|
constructor(skipCssUpdate?: boolean);
|
|
41
42
|
/** Load settings from local storage or other sources */
|
|
42
43
|
static LoadSettings(userID: number | undefined, archiveID: string | undefined): UserSettings;
|
|
@@ -59,6 +59,7 @@ export class UserSettings {
|
|
|
59
59
|
this.dcmtCheckoutInfo = [];
|
|
60
60
|
this.defaultCheckInOutFolder = DEFAULT_CHECK_IN_OUT_FOLDER;
|
|
61
61
|
this.documentDownloadSettings = new DocumentDownloadSettings();
|
|
62
|
+
this.lastSeenAppVersion = '';
|
|
62
63
|
this.themeSettings = new ThemeSettings(skipCssUpdate);
|
|
63
64
|
}
|
|
64
65
|
/** Load settings from local storage or other sources */
|
|
@@ -43,6 +43,10 @@ export declare class SDKUI_Localizator {
|
|
|
43
43
|
static get Apply(): "Anwenden" | "Apply" | "Aplicar" | "Applique" | "Applica";
|
|
44
44
|
static get ApplyAndClose(): "Anwenden und Schließen" | "Apply and close" | "Aplicar y cerrar" | "Applique et ferme" | "Aplicar e fechar" | "Applica e chiudi";
|
|
45
45
|
static get ApplyContextualFilter(): string;
|
|
46
|
+
static get AppUpdatedMessage(): string;
|
|
47
|
+
static get AppUpdatedMessageFromTo(): string;
|
|
48
|
+
static get AppUpdatedSubMessage(): string;
|
|
49
|
+
static get AppUpdatedTitle(): string;
|
|
46
50
|
static get Approve(): "Genehmigen" | "Approve" | "Aprobar" | "Approuver" | "Aprovar" | "Approva";
|
|
47
51
|
static get Archive(): "Archiv" | "Archive" | "Almacenar" | "Armazena" | "Archivia";
|
|
48
52
|
static get ArchiveConstraint(): "Archivierungsbeschränkung" | "Archive constraint" | "Vínculo de almacenamiento" | "Contrainte d'archivage" | "Armazenamento de restrição" | "Vincolo di archiviazione";
|
|
@@ -220,6 +224,7 @@ export declare class SDKUI_Localizator {
|
|
|
220
224
|
static get DiagramItemTypes_End(): "Ende" | "End" | "Fin" | "Fim" | "Fine";
|
|
221
225
|
static get Disabled(): "Deaktiviert" | "Disabled" | "Deshabilitado" | "Désactivé" | "Desabilitado" | "Disabilitato";
|
|
222
226
|
static get DisableMultipleSelection(): string;
|
|
227
|
+
static get DiscoverWhatsNew(): string;
|
|
223
228
|
static get DisplayFormat(): string;
|
|
224
229
|
static get DisplayNameMethod(): string;
|
|
225
230
|
static get DisplayNameMethod_Abstract(): string;
|
|
@@ -384,6 +384,46 @@ export class SDKUI_Localizator {
|
|
|
384
384
|
default: return "Applica filtro contestuale";
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
+
static get AppUpdatedMessage() {
|
|
388
|
+
switch (this._cultureID) {
|
|
389
|
+
case CultureIDs.De_DE: return "Die Anwendung wurde auf Version {{0}} aktualisiert.";
|
|
390
|
+
case CultureIDs.En_US: return "The application has been updated to version {{0}}.";
|
|
391
|
+
case CultureIDs.Es_ES: return "La aplicación se ha actualizado a la versión {{0}}.";
|
|
392
|
+
case CultureIDs.Fr_FR: return "L'application a été mise à jour vers la version {{0}}.";
|
|
393
|
+
case CultureIDs.Pt_PT: return "A aplicação foi atualizada para a versão {{0}}.";
|
|
394
|
+
default: return "L'applicazione è stata aggiornata alla versione {{0}}.";
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
static get AppUpdatedMessageFromTo() {
|
|
398
|
+
switch (this._cultureID) {
|
|
399
|
+
case CultureIDs.De_DE: return "Die Anwendung wurde von Version {{0}} auf Version {{1}} aktualisiert.";
|
|
400
|
+
case CultureIDs.En_US: return "The application has been updated from version {{0}} to version {{1}}.";
|
|
401
|
+
case CultureIDs.Es_ES: return "La aplicación se ha actualizado de la versión {{0}} a la versión {{1}}.";
|
|
402
|
+
case CultureIDs.Fr_FR: return "L'application a été mise à jour de la version {{0}} à la version {{1}}.";
|
|
403
|
+
case CultureIDs.Pt_PT: return "A aplicação foi atualizada da versão {{0}} para a versão {{1}}.";
|
|
404
|
+
default: return "L'applicazione è stata aggiornata dalla versione {{0}} alla versione {{1}}.";
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
static get AppUpdatedSubMessage() {
|
|
408
|
+
switch (this._cultureID) {
|
|
409
|
+
case CultureIDs.De_DE: return "Entdecken Sie die neuen Funktionen und Verbesserungen dieser Version.";
|
|
410
|
+
case CultureIDs.En_US: return "Discover the new features and improvements introduced in this version.";
|
|
411
|
+
case CultureIDs.Es_ES: return "Descubra las nuevas funciones y mejoras introducidas en esta versión.";
|
|
412
|
+
case CultureIDs.Fr_FR: return "Découvrez les nouvelles fonctionnalités et améliorations de cette version.";
|
|
413
|
+
case CultureIDs.Pt_PT: return "Descubra as novas funcionalidades e melhorias desta versão.";
|
|
414
|
+
default: return "Scopri le nuove funzionalità e i miglioramenti introdotti in questa versione.";
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
static get AppUpdatedTitle() {
|
|
418
|
+
switch (this._cultureID) {
|
|
419
|
+
case CultureIDs.De_DE: return "Aktualisierung abgeschlossen";
|
|
420
|
+
case CultureIDs.En_US: return "Update completed";
|
|
421
|
+
case CultureIDs.Es_ES: return "Actualización completada";
|
|
422
|
+
case CultureIDs.Fr_FR: return "Mise à jour terminée";
|
|
423
|
+
case CultureIDs.Pt_PT: return "Atualização concluída";
|
|
424
|
+
default: return "Aggiornamento completato";
|
|
425
|
+
}
|
|
426
|
+
}
|
|
387
427
|
static get Approve() {
|
|
388
428
|
switch (this._cultureID) {
|
|
389
429
|
case CultureIDs.De_DE: return "Genehmigen";
|
|
@@ -2149,6 +2189,16 @@ export class SDKUI_Localizator {
|
|
|
2149
2189
|
default: return "Disabilita selezione multipla";
|
|
2150
2190
|
}
|
|
2151
2191
|
}
|
|
2192
|
+
static get DiscoverWhatsNew() {
|
|
2193
|
+
switch (this._cultureID) {
|
|
2194
|
+
case CultureIDs.De_DE: return "Neuigkeiten entdecken";
|
|
2195
|
+
case CultureIDs.En_US: return "Discover what's new";
|
|
2196
|
+
case CultureIDs.Es_ES: return "Descubre las novedades";
|
|
2197
|
+
case CultureIDs.Fr_FR: return "Découvrir les nouveautés";
|
|
2198
|
+
case CultureIDs.Pt_PT: return "Descobrir as novidades";
|
|
2199
|
+
default: return "Scopri le novità";
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2152
2202
|
static get DisplayFormat() {
|
|
2153
2203
|
switch (this._cultureID) {
|
|
2154
2204
|
case CultureIDs.De_DE: return "Anzeigeformat";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TMAppUpdatedModal: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { AppModules, SDK_Globals } from '@topconsultnpm/sdk-ts';
|
|
5
|
+
import { useDeviceType, TMModal } from '../components';
|
|
6
|
+
import { calcResponsiveSizes, WHATS_NEWS_LINK_URL } from './helpers';
|
|
7
|
+
import { SDKUI_Globals } from './SDKUI_Globals';
|
|
8
|
+
import { SDKUI_Localizator } from './SDKUI_Localizator';
|
|
9
|
+
import { IconUpdate, IconOpenInNew } from './TMIcons';
|
|
10
|
+
import { getAppModuleButtonColors } from './TMUtils';
|
|
11
|
+
const Content = styled.div `
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
width: 100%;
|
|
15
|
+
background-color: #ffffff;
|
|
16
|
+
`;
|
|
17
|
+
const Header = styled.div `
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: 14px;
|
|
22
|
+
padding: 32px 30px 26px 30px;
|
|
23
|
+
background-color: ${({ $backgroundColor }) => $backgroundColor};
|
|
24
|
+
color: #ffffff;
|
|
25
|
+
text-align: center;
|
|
26
|
+
`;
|
|
27
|
+
const HeaderIcon = styled.div `
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
width: 68px;
|
|
32
|
+
height: 68px;
|
|
33
|
+
border-radius: 50%;
|
|
34
|
+
background-color: rgba(255, 255, 255, 0.18);
|
|
35
|
+
border: 1px solid rgba(255, 255, 255, 0.35);
|
|
36
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
|
|
37
|
+
`;
|
|
38
|
+
const HeaderTitle = styled.h2 `
|
|
39
|
+
margin: 0;
|
|
40
|
+
font-size: 22px;
|
|
41
|
+
font-weight: 600;
|
|
42
|
+
letter-spacing: 0.2px;
|
|
43
|
+
`;
|
|
44
|
+
const VersionBadge = styled.span `
|
|
45
|
+
display: inline-block;
|
|
46
|
+
padding: 4px 12px;
|
|
47
|
+
border-radius: 999px;
|
|
48
|
+
background-color: rgba(255, 255, 255, 0.22);
|
|
49
|
+
border: 1px solid rgba(255, 255, 255, 0.4);
|
|
50
|
+
font-size: 13px;
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
letter-spacing: 0.3px;
|
|
53
|
+
`;
|
|
54
|
+
const Body = styled.div `
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
gap: 10px;
|
|
58
|
+
padding: 26px 30px 22px 30px;
|
|
59
|
+
text-align: center;
|
|
60
|
+
`;
|
|
61
|
+
const Message = styled.p `
|
|
62
|
+
margin: 0;
|
|
63
|
+
font-size: 15px;
|
|
64
|
+
line-height: 1.6;
|
|
65
|
+
color: #242424;
|
|
66
|
+
`;
|
|
67
|
+
const SubMessage = styled.p `
|
|
68
|
+
margin: 0;
|
|
69
|
+
font-size: 13px;
|
|
70
|
+
line-height: 1.6;
|
|
71
|
+
color: #6b6b6b;
|
|
72
|
+
`;
|
|
73
|
+
const Footer = styled.div `
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: row;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
align-items: center;
|
|
78
|
+
flex-wrap: wrap;
|
|
79
|
+
gap: 12px;
|
|
80
|
+
padding: 0 30px 28px 30px;
|
|
81
|
+
`;
|
|
82
|
+
const BaseButton = styled.button `
|
|
83
|
+
display: inline-flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
gap: 8px;
|
|
87
|
+
min-width: 150px;
|
|
88
|
+
padding: 10px 18px;
|
|
89
|
+
border-radius: 8px;
|
|
90
|
+
font-size: 14px;
|
|
91
|
+
font-weight: 600;
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
|
|
94
|
+
`;
|
|
95
|
+
const PrimaryButton = styled(BaseButton) `
|
|
96
|
+
border: 1px solid ${({ $base }) => $base};
|
|
97
|
+
background-color: ${({ $base }) => $base};
|
|
98
|
+
color: #ffffff;
|
|
99
|
+
|
|
100
|
+
&:hover {
|
|
101
|
+
background-color: ${({ $hover }) => $hover};
|
|
102
|
+
border-color: ${({ $hover }) => $hover};
|
|
103
|
+
box-shadow: 0 2px 8px ${({ $shadow }) => $shadow};
|
|
104
|
+
}
|
|
105
|
+
`;
|
|
106
|
+
const SecondaryButton = styled(BaseButton) `
|
|
107
|
+
border: 1px solid #d5d5d5;
|
|
108
|
+
background-color: #ffffff;
|
|
109
|
+
color: #444444;
|
|
110
|
+
|
|
111
|
+
&:hover {
|
|
112
|
+
background-color: #f3f3f3;
|
|
113
|
+
border-color: #bdbdbd;
|
|
114
|
+
}
|
|
115
|
+
`;
|
|
116
|
+
export const TMAppUpdatedModal = () => {
|
|
117
|
+
const deviceType = useDeviceType();
|
|
118
|
+
const currentVersion = SDK_Globals.appVersion ?? '';
|
|
119
|
+
const appModuleID = SDK_Globals.tmSession?.SessionDescr?.appModuleID ?? AppModules.SURFER;
|
|
120
|
+
const appModuleColors = useMemo(() => getAppModuleButtonColors(appModuleID), [appModuleID]);
|
|
121
|
+
const [previousVersion] = useState(() => SDKUI_Globals.userSettings.lastSeenAppVersion ?? '');
|
|
122
|
+
const [isOpen, setIsOpen] = useState(() => currentVersion !== '' && previousVersion !== currentVersion);
|
|
123
|
+
useEffect(() => {
|
|
124
|
+
if (!isOpen)
|
|
125
|
+
return;
|
|
126
|
+
SDKUI_Globals.userSettings.lastSeenAppVersion = currentVersion;
|
|
127
|
+
}, [isOpen, currentVersion]);
|
|
128
|
+
const onClose = () => { setIsOpen(false); };
|
|
129
|
+
if (!isOpen)
|
|
130
|
+
return null;
|
|
131
|
+
return (_jsx(TMModal, { width: calcResponsiveSizes(deviceType, '520px', '520px', '95%'), height: 'auto', showHeader: false, resizable: false, onClose: onClose, children: _jsxs(Content, { children: [_jsxs(Header, { "$backgroundColor": appModuleColors.base, children: [_jsx(HeaderIcon, { children: _jsx(IconUpdate, { fontSize: 34 }) }), _jsx(HeaderTitle, { children: SDKUI_Localizator.AppUpdatedTitle }), _jsx(VersionBadge, { children: `${SDK_Globals.appModule} ${currentVersion}` })] }), _jsxs(Body, { children: [_jsx(Message, { children: previousVersion
|
|
132
|
+
? SDKUI_Localizator.AppUpdatedMessageFromTo.replaceParams(previousVersion, currentVersion)
|
|
133
|
+
: SDKUI_Localizator.AppUpdatedMessage.replaceParams(currentVersion) }), _jsx(SubMessage, { children: SDKUI_Localizator.AppUpdatedSubMessage })] }), _jsxs(Footer, { children: [_jsxs(PrimaryButton, { "$base": appModuleColors.base, "$hover": appModuleColors.hover, "$shadow": appModuleColors.shadow, onClick: () => window.open(WHATS_NEWS_LINK_URL, '_blank', 'noopener,noreferrer'), children: [_jsx(IconOpenInNew, { fontSize: 18 }), SDKUI_Localizator.DiscoverWhatsNew] }), _jsx(SecondaryButton, { onClick: onClose, children: SDKUI_Localizator.Close })] })] }) }));
|
|
134
|
+
};
|
|
@@ -12,5 +12,5 @@ interface TMCommandsContextMenuProps {
|
|
|
12
12
|
trigger?: 'right' | 'left';
|
|
13
13
|
children?: React.ReactNode;
|
|
14
14
|
}
|
|
15
|
-
export declare const TMCommandsContextMenu: React.MemoExoticComponent<({ target, menuItems, id, showEvent, onHiding, trigger, children }: TMCommandsContextMenuProps) =>
|
|
15
|
+
export declare const TMCommandsContextMenu: React.MemoExoticComponent<({ target, menuItems, id, showEvent, onHiding, trigger, children }: TMCommandsContextMenuProps) => import("react/jsx-runtime").JSX.Element>;
|
|
16
16
|
export {};
|