@topconsultnpm/sdkui-react-beta 6.16.108 → 6.16.110

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.
@@ -21,7 +21,9 @@ const StyledWorkFlowOperationButtonsContainer = styled.div `
21
21
  gap: 10px;
22
22
  flex-direction: column;
23
23
  `;
24
- const StyledTextArea = styled.textarea `
24
+ const StyledTextArea = styled.textarea.attrs({
25
+ maxLength: 200
26
+ }) `
25
27
  width: 100%;
26
28
  height: 100%;
27
29
  border: 1px solid ${props => props.$isValid ? '#b4b4b4' : TMColors.error};
@@ -32,6 +34,12 @@ const StyledTextArea = styled.textarea `
32
34
  border-bottom: 4px solid ${props => props.$isValid ? TMColors.primaryColor : TMColors.error};
33
35
  }
34
36
  `;
37
+ const CharacterCounter = styled.div `
38
+ text-align: right;
39
+ font-size: 0.8rem;
40
+ color: #6c757d;
41
+ margin-top: 2px;
42
+ `;
35
43
  const StyledModalBodyWrapper = styled.div `
36
44
  display: flex;
37
45
  flex-direction: column;
@@ -90,7 +98,7 @@ export const WorkFlowApproveRejectPopUp = ({ TID = 0, DID = 0, deviceType = Devi
90
98
  const workflowAction = isReject === 0 ? SDKUI_Localizator.Approve : SDKUI_Localizator.Reject;
91
99
  const itemCount = selectedItems.length > 0 ? `(${selectedItems.length} workitem)` : '';
92
100
  const title = `${workflowAction} ${itemCount}`;
93
- return (_jsx(TMModal, { title: title, onClose: onClose, width: deviceType === DeviceType.MOBILE ? '95%' : '60%', height: '60%', isModal: true, children: _jsxs(StyledModalBodyWrapper, { children: [_jsxs(StyledModalContentContainer, { children: [_jsxs("p", { style: { color: (isReject === 1 && disable) ? TMColors.error : 'black' }, children: [SDKUI_Localizator.CommentText, " ", isReject === 1 && disable && _jsx("span", { children: ` (${SDKUI_Localizator.RequiredField})` }), " "] }), _jsx(StyledTextArea, { "$isValid": isReject === 0 ? true : !disable, value: commentValue, onChange: (e) => setCommentValue(e.target.value) })] }), _jsx(StyledModalFooter, { children: isReject === 0
101
+ return (_jsx(TMModal, { title: title, onClose: onClose, width: '600px', height: '270px', isModal: true, children: _jsxs(StyledModalBodyWrapper, { children: [_jsxs(StyledModalContentContainer, { children: [_jsxs("p", { style: { color: (isReject === 1 && disable) ? TMColors.error : 'black' }, children: [SDKUI_Localizator.CommentText, " ", isReject === 1 && disable && _jsx("span", { children: ` (${SDKUI_Localizator.RequiredField})` }), " "] }), _jsx(StyledTextArea, { "$isValid": isReject === 0 ? true : !disable, value: commentValue, onChange: (e) => setCommentValue(e.target.value) }), _jsx(CharacterCounter, { children: `${200 - commentValue.length} ${SDKUI_Localizator.CharactersRemaining}` })] }), _jsx(StyledModalFooter, { children: isReject === 0
94
102
  ? _jsx(TMButton, { btnStyle: 'advanced', showTooltip: false, icon: _jsx(IconApply, {}), caption: SDKUI_Localizator.Approve, disabled: false, onClick: () => completeOrRejectAsync(isReject), advancedColor: TMColors.success })
95
103
  : _jsx(TMButton, { btnStyle: 'advanced', showTooltip: false, icon: _jsx(IconCloseOutline, {}), caption: SDKUI_Localizator.Reject, disabled: disable, onClick: () => { !disable && completeOrRejectAsync(isReject); }, advancedColor: TMColors.error }) })] }) }));
96
104
  };
@@ -151,9 +159,9 @@ export const WorkFlowReAssignPopUp = ({ DID = 0, TID = 0, deviceType = DeviceTyp
151
159
  fetchData();
152
160
  return () => { isMounted = false; };
153
161
  }, [tidToUse]);
154
- return (_jsx(TMModal, { onClose: onClose, width: deviceType === DeviceType.MOBILE ? '95%' : '60%', height: '60%', isModal: true, title: SDKUI_Localizator.Reassign + (selectedItems.length > 0 ? ' (' + selectedItems.length + ' workitem)' : ''), children: _jsxs(StyledModalBodyWrapper, { children: [_jsxs(StyledModalContentContainer, { children: [_jsx(TMUserChooser, { dataSource: participants, values: selectedUserID, onValueChanged: (IDs) => {
162
+ return (_jsx(TMModal, { onClose: onClose, width: '600px', height: '270px', isModal: true, title: SDKUI_Localizator.Reassign + (selectedItems.length > 0 ? ' (' + selectedItems.length + ' workitem)' : ''), children: _jsxs(StyledModalBodyWrapper, { children: [_jsxs(StyledModalContentContainer, { children: [_jsx(TMUserChooser, { dataSource: participants, values: selectedUserID, onValueChanged: (IDs) => {
155
163
  setSelectedUserID(IDs ?? []);
156
- } }), _jsxs("p", { style: { color: commentValue.length === 0 ? TMColors.error : 'black' }, children: [SDKUI_Localizator.CommentText, " ", commentValue.length === 0 && _jsx("span", { children: ` (${SDKUI_Localizator.RequiredField})` }), " "] }), _jsx(StyledTextArea, { "$isValid": commentValue.length !== 0, value: commentValue, onChange: (e) => setCommentValue(e.target.value) })] }), _jsx(StyledModalFooter, { children: _jsx(TMButton, { btnStyle: 'advanced', showTooltip: false, icon: _jsx(IconUser, { fontSize: 16 }), caption: SDKUI_Localizator.Reassign, disabled: disable, onClick: () => !disable && reAssignWorkFlowAsync(), advancedColor: TMColors.tertiary }) })] }) }));
164
+ } }), _jsxs("p", { style: { color: commentValue.length === 0 ? TMColors.error : 'black' }, children: [SDKUI_Localizator.CommentText, " ", commentValue.length === 0 && _jsx("span", { children: ` (${SDKUI_Localizator.RequiredField})` }), " "] }), _jsx(StyledTextArea, { "$isValid": commentValue.length !== 0, value: commentValue, onChange: (e) => setCommentValue(e.target.value) }), _jsx(CharacterCounter, { children: `${200 - commentValue.length} ${SDKUI_Localizator.CharactersRemaining}` })] }), _jsx(StyledModalFooter, { children: _jsx(TMButton, { btnStyle: 'advanced', showTooltip: false, icon: _jsx(IconUser, { fontSize: 16 }), caption: SDKUI_Localizator.Reassign, disabled: disable, onClick: () => !disable && reAssignWorkFlowAsync(), advancedColor: TMColors.tertiary }) })] }) }));
157
165
  };
158
166
  export const WorkFlowMoreInfoPopUp = ({ DID = 0, TID = 0, deviceType = DeviceType.DESKTOP, onClose, onCompleted }) => {
159
167
  const [users, setUsers] = useState([]);
@@ -3,7 +3,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; // Importa us
3
3
  import TMModal from '../../../base/TMModal';
4
4
  import { DiagramItemTypes } from './interfaces';
5
5
  import TMCheckBox from '../../../editors/TMCheckBox';
6
- import { calcIsModified, getSystemMetadata, IconApply, IconUndo, SDKUI_Localizator } from '../../../../helper';
6
+ import { calcIsModified, getSystemMetadata, IconApply, IconUndo, LocalizeDiagramItemType, SDKUI_Localizator } from '../../../../helper';
7
7
  import TMMetadataChooser from '../../../choosers/TMMetadataChooser';
8
8
  import { FormModes, MetadataValueDescriptorEx } from '../../../../ts';
9
9
  import TMTextBox from '../../../editors/TMTextBox';
@@ -676,6 +676,6 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
676
676
  }
677
677
  return (_jsxs(FormContainer, { children: [renderCommonFields(), specificFields, _jsxs(ButtonsContainer, { children: [_jsx(TMButton, { caption: 'Applica', btnStyle: 'advanced', advancedColor: TMColors.tertiary, icon: _jsx(IconApply, {}), showTooltip: false, disabled: !isModified, onClick: handleSave }), _jsx(TMButton, { caption: 'Annulla', btnStyle: 'toolbar', color: 'primary', icon: _jsx(IconUndo, {}), showTooltip: false, disabled: !isModified, onClick: handleCancel })] })] }));
678
678
  };
679
- return (_jsx(TMModal, { title: DiagramItemTypes[localItem.Type].toString(), onClose: onClose, isModal: true, width: calculatedWidth, height: calculatedHeight, children: renderForm() }));
679
+ return (_jsx(TMModal, { title: LocalizeDiagramItemType(localItem.Type), onClose: onClose, isModal: true, width: calculatedWidth, height: calculatedHeight, children: renderForm() }));
680
680
  };
681
681
  export default DiagramItemForm;
@@ -36,7 +36,7 @@ const SettingsAppearance = ({ landingPagesOptions, permissions = { canArchive: t
36
36
  options = options.filter(option => option.value !== LandingPages.DOSSIERS);
37
37
  }
38
38
  if (!permissions?.workFlowLicense) {
39
- options = options.filter(option => option.value !== LandingPages.APPR_WORKFLOW);
39
+ options = options.filter(option => option.value !== LandingPages.WORKFLOW_APPR);
40
40
  }
41
41
  return options;
42
42
  }, [permissions?.canArchive, permissions?.canSearch, permissions?.wgGroupLicense, permissions?.dossiersLicense, permissions?.workFlowLicense, landingPagesOptions]);
@@ -70,6 +70,7 @@ export declare class SDKUI_Localizator {
70
70
  static get CassettoDoganalePlus_UserName(): "STD-Benutzer des ADM-Portals" | "STD User of the ADM Portal" | "Usuario STD del Portal ADM" | "Utilisateur STD du portail ADM" | "Utilizador DST do Portal ADM" | "Utente STD del Portale ADM";
71
71
  static get Cancel(): "Abbrechen" | "Cancel" | "Anular" | "Annuler" | "Cancelar" | "Annulla";
72
72
  static get ChangePassword(): "Kennwort ändern" | "Change password" | "Cambiar la contraseña" | "Changer le mot de passe" | "Alterar a senha" | "Cambia password";
73
+ static get CharactersRemaining(): "verbleibende Zeichen" | "characters remaining" | "caracteres restantes" | "caractères restants" | "caratteri rimanenti";
73
74
  static get CheckIn(): "Check in" | "Enregistrement";
74
75
  static get CheckOut(): "Check out" | "Extraction";
75
76
  static get ChooseFolder(): string;
@@ -137,7 +138,7 @@ export declare class SDKUI_Localizator {
137
138
  static get Deselected(): string;
138
139
  static get Diagram(): "Diagramm" | "Diagram" | "Diagrama" | "Diagramme" | "Diagramma";
139
140
  static get DiagramNew(): "Neues Diagramm" | "New diagram" | "Nuevo diagrama" | "Nouveau diagramme" | "Novo diagrama" | "Nuovo diagramma";
140
- static get DiagramItemTypes_Start(): "Zum Booten" | "Start" | "Arrancar" | "Pour démarrer" | "Para inicializar" | "Avviare";
141
+ static get DiagramItemTypes_Start(): string;
141
142
  static get DiagramItemTypes_Condition(): "Bedingung" | "Condition" | "Condición" | "Condição" | "Condizione";
142
143
  static get DiagramItemTypes_Status(): "Status" | "Estado" | "Statut" | "Stato";
143
144
  static get DiagramItemTypes_Approval(): "Genehmigungsanfrage" | "Approval request" | "Solicitud de aprobación" | "Demande d'approbation" | "Solicitação de aprovação" | "Richiesta approvazione";
@@ -518,7 +519,7 @@ export declare class SDKUI_Localizator {
518
519
  static get Source(): "Ursprung" | "Source" | "Origen" | "Origem" | "Origine";
519
520
  static get SpecialOperators(): "Spezielle Operatoren" | "Special operators" | "Operadores especiales" | "Opérateurs spéciaux" | "Os operadores especiais" | "Operatori speciali";
520
521
  static get StandardMode(): "Standardmodus" | "Standard mode" | "Modo estándar" | "Mode standard" | "Modo padrão" | "Modalità standard";
521
- static get Start(): "Zum Booten" | "Start" | "Arrancar" | "Pour démarrer" | "Para inicializar" | "Avviare";
522
+ static get Start(): "Start" | "Zum Booten" | "Arrancar" | "Pour démarrer" | "Para inicializar" | "Avviare";
522
523
  static get Statistics(): "Statistiken" | "Statistics" | "Estadística" | "Statistiques" | "Estatísticas" | "Statistiche";
523
524
  static get Status(): "Status" | "Estado" | "Statut" | "Stato";
524
525
  static get Summary(): "Zusammenfassung" | "Summary" | "Resumen" | "Résumé" | "Resumo" | "Riepilogo";
@@ -649,6 +649,16 @@ export class SDKUI_Localizator {
649
649
  default: return "Cambia password";
650
650
  }
651
651
  }
652
+ static get CharactersRemaining() {
653
+ switch (this._cultureID) {
654
+ case CultureIDs.De_DE: return "verbleibende Zeichen";
655
+ case CultureIDs.En_US: return "characters remaining";
656
+ case CultureIDs.Es_ES: return "caracteres restantes";
657
+ case CultureIDs.Fr_FR: return "caractères restants";
658
+ case CultureIDs.Pt_PT: return "caracteres restantes";
659
+ default: return "caratteri rimanenti";
660
+ }
661
+ }
652
662
  static get CheckIn() {
653
663
  switch (this._cultureID) {
654
664
  case CultureIDs.De_DE: return "Check in";
@@ -1326,7 +1336,7 @@ export class SDKUI_Localizator {
1326
1336
  }
1327
1337
  }
1328
1338
  static get DiagramItemTypes_Start() {
1329
- return this.Start;
1339
+ return "Start";
1330
1340
  }
1331
1341
  static get DiagramItemTypes_Condition() {
1332
1342
  switch (this._cultureID) {
@@ -53,11 +53,11 @@ export declare enum LandingPages {
53
53
  SEARCH = "search",
54
54
  ARCHIVE = "archive",
55
55
  WORKING_GROUPS = "workingGroups",
56
- APPR_WORKFLOW = "approvazioneWorkflow",
57
- DOSSIERS = "pratiche",
58
- PREFERITI = "preferiti",
59
- RECENTI = "recenti",
60
- AREA_MANAGER = "areaDiAppoggio",
56
+ WORKFLOW_APPR = "workflowAppr",
57
+ DOSSIERS = "dossiers",
58
+ FAVORITES = "favorites",
59
+ RECENT = "recent",
60
+ AREA_MANAGER = "areaManager",
61
61
  NOTIFICATIONS = "notifications",
62
62
  ACTIVITIES = "activities"
63
63
  }
@@ -684,11 +684,11 @@ export var LandingPages;
684
684
  LandingPages["SEARCH"] = "search";
685
685
  LandingPages["ARCHIVE"] = "archive";
686
686
  LandingPages["WORKING_GROUPS"] = "workingGroups";
687
- LandingPages["APPR_WORKFLOW"] = "approvazioneWorkflow";
688
- LandingPages["DOSSIERS"] = "pratiche";
689
- LandingPages["PREFERITI"] = "preferiti";
690
- LandingPages["RECENTI"] = "recenti";
691
- LandingPages["AREA_MANAGER"] = "areaDiAppoggio";
687
+ LandingPages["WORKFLOW_APPR"] = "workflowAppr";
688
+ LandingPages["DOSSIERS"] = "dossiers";
689
+ LandingPages["FAVORITES"] = "favorites";
690
+ LandingPages["RECENT"] = "recent";
691
+ LandingPages["AREA_MANAGER"] = "areaManager";
692
692
  LandingPages["NOTIFICATIONS"] = "notifications";
693
693
  LandingPages["ACTIVITIES"] = "activities";
694
694
  })(LandingPages || (LandingPages = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.16.108",
3
+ "version": "6.16.110",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",