@topconsultnpm/sdkui-react-beta 6.17.2 → 6.17.3

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.
@@ -10,6 +10,7 @@ interface ITMArchiveProps {
10
10
  connectorFileSave?: () => Promise<File>;
11
11
  onSavedAsyncCallback?: (tid: number | undefined, did: number | undefined) => Promise<void>;
12
12
  enableDragDropOverlay?: boolean;
13
+ passToSearch?: () => void;
13
14
  }
14
15
  declare const TMArchive: React.FunctionComponent<ITMArchiveProps>;
15
16
  export default TMArchive;
@@ -12,7 +12,7 @@ import TMTreeSelector from '../search/TMTreeSelector';
12
12
  import TMPanel from '../../base/TMPanel';
13
13
  import { TMPanelManagerProvider, useTMPanelManagerContext } from '../../layout/panelManager/TMPanelManagerContext';
14
14
  import TMPanelManagerContainer from '../../layout/panelManager/TMPanelManagerContainer';
15
- const TMArchive = ({ onDcmtTypeSelect = undefined, inputTID, inputFile = null, connectorFileSave = undefined, onSavedAsyncCallback, inputMids = [], enableDragDropOverlay = false }) => {
15
+ const TMArchive = ({ onDcmtTypeSelect = undefined, inputTID, inputFile = null, connectorFileSave = undefined, onSavedAsyncCallback, inputMids = [], enableDragDropOverlay = false, passToSearch }) => {
16
16
  const [currentTID, setCurrentTID] = useState(inputTID ?? 0);
17
17
  const [mruTIDs, setMruTIDs] = useState([]);
18
18
  const [currentMruTID, setCurrentMruTID] = useState(0);
@@ -52,7 +52,7 @@ const TMArchive = ({ onDcmtTypeSelect = undefined, inputTID, inputFile = null, c
52
52
  setMruTIDs(newMruTIDS);
53
53
  } }), [mruTIDs, currentMruTID, deviceType]);
54
54
  const tmFormElement = useMemo(() => currentTID ?
55
- _jsx(TMDcmtForm, { TID: currentTID, DID: undefined, groupId: 'tmForm', layoutMode: LayoutModes.Ark, onClose: deviceType === DeviceType.MOBILE ? () => setCurrentTID(undefined) : undefined, onSaveRecents: (TIDs) => setMruTIDs(TIDs), showDcmtFormSidebar: false, inputFile: inputFile, connectorFileSave: connectorFileSave, onSavedAsyncCallback: onSavedAsyncCallback, inputMids: inputMids, enableDragDropOverlay: enableDragDropOverlay })
55
+ _jsx(TMDcmtForm, { TID: currentTID, DID: undefined, groupId: 'tmForm', layoutMode: LayoutModes.Ark, onClose: deviceType === DeviceType.MOBILE ? () => setCurrentTID(undefined) : undefined, onSaveRecents: (TIDs) => setMruTIDs(TIDs), showDcmtFormSidebar: false, inputFile: inputFile, connectorFileSave: connectorFileSave, onSavedAsyncCallback: onSavedAsyncCallback, inputMids: inputMids, enableDragDropOverlay: enableDragDropOverlay, passToSearch: passToSearch })
56
56
  :
57
57
  _jsx(TMPanel, { title: 'Archiviazione', allowMaximize: false, children: _jsxs(TMLayoutContainer, { gap: 30, alignItems: 'center', justifyContent: 'center', children: [_jsx(StyledToppyTextContainer, { children: _jsx(StyledToppyText, { children: SDKUI_Localizator.DcmtTypeSelect }) }), _jsx(StyledToppyImage, { src: Logo, alt: 'Toppy' })] }) }), [currentTID, deviceType, mruTIDs, inputFile, inputMids]);
58
58
  const allInitialPanelVisibility = {
@@ -41,6 +41,7 @@ interface ITMDcmtFormProps {
41
41
  onOpenS4TViewerRequest?: (dcmtInfo: Array<DcmtInfo>, onRefreshSearchAsync?: (() => Promise<void>)) => void;
42
42
  s4TViewerDialogComponent?: React.ReactNode;
43
43
  enableDragDropOverlay?: boolean;
44
+ passToSearch?: () => void;
44
45
  }
45
46
  declare const TMDcmtForm: React.FC<ITMDcmtFormProps>;
46
47
  export default TMDcmtForm;
@@ -8,7 +8,7 @@ import { DownloadTypes, FormModes } from '../../../ts';
8
8
  import { DeviceType, useDeviceType } from '../../base/TMDeviceProvider';
9
9
  import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
10
10
  import { getWorkItemSetIDAsync, handleArchiveVisibility, searchResultToMetadataValues } from '../../../helper/queryHelper';
11
- import { genUniqueId, IconShow, SDKUI_Localizator, updateMruTids, IconBoard, IconDcmtTypeSys, IconDetailDcmts, svgToString, IconDownload, calcIsModified, IconMenuVertical, Globalization, getListMaxItems, getSystemMetadata, IconBoxArchiveIn, IconClear, IconUndo, SDKUI_Globals, IconPreview, isTaskMoreInfo, IconWorkflow } from '../../../helper';
11
+ import { genUniqueId, IconShow, SDKUI_Localizator, updateMruTids, IconBoard, IconDcmtTypeSys, IconDetailDcmts, svgToString, IconDownload, calcIsModified, IconMenuVertical, Globalization, getListMaxItems, getSystemMetadata, IconBoxArchiveIn, IconClear, IconUndo, SDKUI_Globals, IconPreview, isTaskMoreInfo, IconWorkflow, IconSearch } from '../../../helper';
12
12
  import { hasDetailRelations, hasMasterRelations, isXMLFileExt } from '../../../helper/dcmtsHelper';
13
13
  import { Gutters, TMColors } from '../../../utils/theme';
14
14
  import { StyledFormButtonsContainer, StyledLoadingContainer, StyledModalContainer, StyledSpinner, StyledToolbarCardContainer } from '../../base/Styled';
@@ -34,9 +34,10 @@ import { useWorkflowApprove } from '../../../hooks/useWorkflowApprove';
34
34
  import ToppyHelpCenter from '../assistant/ToppyHelpCenter';
35
35
  import TMBlogCommentForm from '../blog/TMBlogCommentForm';
36
36
  import WFDiagram from '../workflow/diagram/WFDiagram';
37
+ import TMTooltip from '../../base/TMTooltip';
37
38
  let abortControllerLocal = new AbortController();
38
39
  //#endregion
39
- const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes.Update, onClose, onSavedAsyncCallback, TID, DID, formMode = FormModes.Update, canNext, canPrev, count, itemIndex, onNext, onPrev, allowNavigation = true, allowRelations = true, isClosable = false, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, showDcmtFormSidebar = true, invokedByTodo = false, titleModal, isModal = false, widthModal = "100%", heightModal = "100%", groupId, onWFOperationCompleted, onTaskCompleted, inputFile = null, taskFormDialogComponent, taskMoreInfo, connectorFileSave = undefined, inputMids = [], onOpenS4TViewerRequest, s4TViewerDialogComponent, enableDragDropOverlay = false }) => {
40
+ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes.Update, onClose, onSavedAsyncCallback, TID, DID, formMode = FormModes.Update, canNext, canPrev, count, itemIndex, onNext, onPrev, allowNavigation = true, allowRelations = true, isClosable = false, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, showDcmtFormSidebar = true, invokedByTodo = false, titleModal, isModal = false, widthModal = "100%", heightModal = "100%", groupId, onWFOperationCompleted, onTaskCompleted, inputFile = null, taskFormDialogComponent, taskMoreInfo, connectorFileSave = undefined, inputMids = [], onOpenS4TViewerRequest, s4TViewerDialogComponent, enableDragDropOverlay = false, passToSearch }) => {
40
41
  const [id, setID] = useState('');
41
42
  const [showWaitPanelLocal, setShowWaitPanelLocal] = useState(false);
42
43
  const [waitPanelTitleLocal, setWaitPanelTitleLocal] = useState('');
@@ -298,7 +299,8 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
298
299
  ...(allowRelations && currentTIDHasDetailRelations ? [{ icon: svgToString(_jsx(IconDetailDcmts, {})), operationType: 'singleRow', disabled: isDetailsDisabled, text: SDKUI_Localizator.DcmtsDetail, onClick: () => { if (!isDetailsDisabled)
299
300
  setIsOpenDetails(!isOpenDetails); } }] : []),
300
301
  ];
301
- const formToolbar = _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [allowNavigation && canPrev != undefined && _jsx("p", { style: { textAlign: 'center', padding: '1px 4px', display: 'flex' }, children: `${itemIndex}/${count}` }), allowNavigation && canPrev != undefined && _jsx(TMSaveFormButtonPrevious, { btnStyle: 'icon', iconColor: 'white', isModified: calcIsModified(formData, formDataOrig), formMode: formMode, canPrev: canPrev, onPrev: onPrev }), allowNavigation && canNext != undefined && _jsx(TMSaveFormButtonNext, { btnStyle: 'icon', iconColor: 'white', isModified: calcIsModified(formData, formDataOrig), formMode: formMode, canNext: canNext, onNext: onNext }), layoutMode === LayoutModes.Update && _jsx(IconMenuVertical, { id: `commands-detail-${id}`, color: 'white', cursor: 'pointer' }), layoutMode === LayoutModes.Update && _jsx(ContextMenu, { showEvent: 'click', dataSource: commandsMenuItems, target: `#commands-detail-${id}` })] });
302
+ const formToolbar = _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [allowNavigation && canPrev != undefined && _jsx("p", { style: { textAlign: 'center', padding: '1px 4px', display: 'flex' }, children: `${itemIndex}/${count}` }), allowNavigation && canPrev != undefined && _jsx(TMSaveFormButtonPrevious, { btnStyle: 'icon', iconColor: 'white', isModified: calcIsModified(formData, formDataOrig), formMode: formMode, canPrev: canPrev, onPrev: onPrev }), allowNavigation && canNext != undefined && _jsx(TMSaveFormButtonNext, { btnStyle: 'icon', iconColor: 'white', isModified: calcIsModified(formData, formDataOrig), formMode: formMode, canNext: canNext, onNext: onNext }), layoutMode === LayoutModes.Update && _jsx(IconMenuVertical, { id: `commands-detail-${id}`, color: 'white', cursor: 'pointer' }), layoutMode === LayoutModes.Update && _jsx(ContextMenu, { showEvent: 'click', dataSource: commandsMenuItems, target: `#commands-detail-${id}` }), layoutMode === LayoutModes.Ark &&
303
+ _jsx(TMTooltip, { content: SDKUI_Localizator.PassToSearch, position: 'bottom', children: _jsx(IconSearch, { style: { cursor: 'pointer' }, onClick: passToSearch }) })] });
302
304
  function createChange(mid, metadataType, modifiedValue) {
303
305
  return { mid, metadataType, modifiedValue };
304
306
  }
@@ -380,6 +380,7 @@ export declare class SDKUI_Localizator {
380
380
  static get Participants(): "Teilnehmer" | "Participants" | "Participantes" | "Partecipanti";
381
381
  static get Password(): "Passwort" | "Password" | "Contraseña" | "Mot de passe" | "Senha";
382
382
  static get PassToArchive(): "Zur Archivierung übergeben" | "Pass to archive" | "Pasar a archivo" | "Passer à l'archivage" | "Passar para arquivo" | "Passa ad archiviazione";
383
+ static get PassToSearch(): "Zur Suche übergeben" | "Pass to search" | "Pasar a búsqueda" | "Passer à la recherche" | "Passar para pesquisa" | "Passa a ricerca";
383
384
  static get PasswordMustContain(): "Das Passwort muss enthalten" | "The password must contain" | "La contraseña debe contener" | "Le mot de passe doit contenir" | "A palavra-passe deve conter" | "La password deve contenere";
384
385
  static get PasswordChangedSuccessfully(): "Das Passwort wurde erfolgreich geändert." | "Password changed successfully." | "Contraseña cambiada con éxito." | "Le mot de passe a été changé avec succès." | "Senha alterada com sucesso." | "Password cambiata con successo.";
385
386
  static get PasswordContainsUsernameError(): "Das Passwort darf den Benutzernamen nicht enthalten" | "The password cannot contain the username" | "La contraseña no puede contener el nombre de usuario" | "Le mot de passe ne peut pas contenir le nom d'utilisateur" | "A senha não pode conter o nome de usuário" | "La password non può contenere il nome utente";
@@ -3708,6 +3708,16 @@ export class SDKUI_Localizator {
3708
3708
  default: return "Passa ad archiviazione";
3709
3709
  }
3710
3710
  }
3711
+ static get PassToSearch() {
3712
+ switch (this._cultureID) {
3713
+ case CultureIDs.De_DE: return "Zur Suche übergeben";
3714
+ case CultureIDs.En_US: return "Pass to search";
3715
+ case CultureIDs.Es_ES: return "Pasar a búsqueda";
3716
+ case CultureIDs.Fr_FR: return "Passer à la recherche";
3717
+ case CultureIDs.Pt_PT: return "Passar para pesquisa";
3718
+ default: return "Passa a ricerca";
3719
+ }
3720
+ }
3711
3721
  static get PasswordMustContain() {
3712
3722
  switch (this._cultureID) {
3713
3723
  case CultureIDs.De_DE: return "Das Passwort muss enthalten";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.17.2",
3
+ "version": "6.17.3",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",