@topconsultnpm/sdkui-react 6.22.0-dev1.9 → 6.22.0-dev2.2

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 (45) hide show
  1. package/lib/components/base/TMDataGridExportForm.js +39 -30
  2. package/lib/components/base/TMModal.js +1 -1
  3. package/lib/components/choosers/TMDynDataListItemChooser.d.ts +2 -0
  4. package/lib/components/choosers/TMDynDataListItemChooser.js +4 -6
  5. package/lib/components/editors/TMDateBox.d.ts +16 -1
  6. package/lib/components/editors/TMDateBox.js +90 -22
  7. package/lib/components/editors/TMMetadataEditor.js +19 -20
  8. package/lib/components/editors/TMTextArea.d.ts +1 -0
  9. package/lib/components/editors/TMTextArea.js +23 -15
  10. package/lib/components/editors/TMTextBox.d.ts +2 -0
  11. package/lib/components/editors/TMTextBox.js +38 -22
  12. package/lib/components/features/documents/TMDcmtForm.d.ts +2 -1
  13. package/lib/components/features/documents/TMDcmtForm.js +107 -8
  14. package/lib/components/features/documents/TMRelationViewer.js +13 -32
  15. package/lib/components/features/search/TMSearch.d.ts +2 -1
  16. package/lib/components/features/search/TMSearch.js +2 -2
  17. package/lib/components/features/search/TMSearchResult.d.ts +2 -1
  18. package/lib/components/features/search/TMSearchResult.js +13 -40
  19. package/lib/components/features/search/TMSignatureInfoContent.d.ts +4 -2
  20. package/lib/components/features/search/TMSignatureInfoContent.js +373 -79
  21. package/lib/components/forms/Login/TMLoginForm.d.ts +2 -0
  22. package/lib/components/forms/Login/TMLoginForm.js +17 -3
  23. package/lib/components/forms/Login/TextBox.d.ts +3 -0
  24. package/lib/components/forms/Login/TextBox.js +2 -2
  25. package/lib/components/pages/TMPage.js +3 -1
  26. package/lib/components/query/TMQueryEditor.js +1 -1
  27. package/lib/components/viewers/TMMidViewer.js +1 -1
  28. package/lib/helper/Globalization.d.ts +1 -1
  29. package/lib/helper/SDKUI_Globals.js +22 -2
  30. package/lib/helper/SDKUI_Localizator.d.ts +9 -0
  31. package/lib/helper/SDKUI_Localizator.js +90 -0
  32. package/lib/helper/TMUtils.d.ts +29 -1
  33. package/lib/helper/TMUtils.js +249 -10
  34. package/lib/helper/grafometricSignaturesCache.d.ts +45 -0
  35. package/lib/helper/grafometricSignaturesCache.js +56 -0
  36. package/lib/helper/index.d.ts +1 -0
  37. package/lib/helper/index.js +1 -0
  38. package/lib/hooks/useDocumentOperations.d.ts +2 -1
  39. package/lib/hooks/useDocumentOperations.js +15 -15
  40. package/lib/hooks/usePreventFileDrop.js +14 -3
  41. package/lib/ts/graphometricTypes.d.ts +62 -0
  42. package/lib/ts/graphometricTypes.js +1 -0
  43. package/lib/ts/index.d.ts +1 -0
  44. package/lib/ts/index.js +1 -0
  45. package/package.json +66 -61
@@ -71,7 +71,7 @@ const IconButton = styled.div `
71
71
  align-items: center;
72
72
  cursor: ${props => !props.$disabled ? 'pointer' : 'default'};
73
73
  `;
74
- const TextBox = forwardRef(({ label, type, additionalIcons = [], cursor = 'text', disabled, icon, onClick, onKeyDown, onValueChanged, placeHolder, readOnly, showSuccess, validationItems = [], value }, ref) => {
74
+ const TextBox = forwardRef(({ label, type, additionalIcons = [], cursor = 'text', disabled, icon, onClick, onKeyDown, onValueChanged, placeHolder, readOnly, showSuccess, validationItems = [], value, name, id, autoComplete }, ref) => {
75
75
  const [showPassword, setShowPassword] = useState(false);
76
76
  const [isFocused, setIsFocused] = useState(false);
77
77
  const mainValidation = useMemo(() => {
@@ -106,6 +106,6 @@ const TextBox = forwardRef(({ label, type, additionalIcons = [], cursor = 'text'
106
106
  }
107
107
  return color;
108
108
  }, [mainValidation]);
109
- return (_jsxs(Container, { children: [label && _jsx(Label, { "$color": borderColor, children: label }), _jsxs(InputContainer, { "$borderColor": borderColor, "$borderThickness": borderThickness, "$focused": isFocused, "$disabled": disabled, children: [icon && _jsx(IconWrapper, { "$color": validationItems.length > 0 ? borderColor : TMColors.primary, children: icon }), _jsx(Input, { ref: ref, onKeyDown: onKeyDown, onClick: onClick, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), type: type === "password" && showPassword ? "text" : type, value: value, onChange: (e) => onValueChanged?.(e.target.value), placeholder: placeHolder, "$readOnly": readOnly, disabled: disabled, "$color": fontColor, "$cursor": !disabled ? cursor : 'default' }), _jsxs(IconsRow, { children: [additionalIcons.map((iconItem, index) => (iconItem.visible !== false && _jsx(TMTooltip, { content: iconItem.tooltip, children: _jsxs(IconButton, { "$disabled": disabled, "$color": iconItem.color ?? '#313131', onClick: iconItem.onClick, children: [" ", iconItem.icon, " "] }) }, index * 2))), type === "password" && (_jsx(IconButton, { "$disabled": disabled, "$color": '#313131', onClick: () => setShowPassword(!showPassword), children: showPassword ? _jsx(IconShow, {}) : _jsx(IconHide, {}) }))] })] }), _jsx(ValidationMessageContainer, { children: validationMessages.map((val, index) => (_jsx(ValidationMessage, { "$color": val.color, children: val.message }, index * 2))) })] }));
109
+ return (_jsxs(Container, { children: [label && _jsx(Label, { "$color": borderColor, children: label }), _jsxs(InputContainer, { "$borderColor": borderColor, "$borderThickness": borderThickness, "$focused": isFocused, "$disabled": disabled, children: [icon && _jsx(IconWrapper, { "$color": validationItems.length > 0 ? borderColor : TMColors.primary, children: icon }), _jsx(Input, { ref: ref, name: name, id: id, autoComplete: autoComplete, onKeyDown: onKeyDown, onClick: onClick, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), type: type === "password" && showPassword ? "text" : type, value: value, onChange: (e) => onValueChanged?.(e.target.value), placeholder: placeHolder, "$readOnly": readOnly, disabled: disabled, "$color": fontColor, "$cursor": !disabled ? cursor : 'default' }), _jsxs(IconsRow, { children: [additionalIcons.map((iconItem, index) => (iconItem.visible !== false && _jsx(TMTooltip, { content: iconItem.tooltip, children: _jsxs(IconButton, { "$disabled": disabled, "$color": iconItem.color ?? '#313131', onClick: iconItem.onClick, children: [" ", iconItem.icon, " "] }) }, index * 2))), type === "password" && (_jsx(IconButton, { "$disabled": disabled, "$color": '#313131', onClick: () => setShowPassword(!showPassword), children: showPassword ? _jsx(IconShow, {}) : _jsx(IconHide, {}) }))] })] }), _jsx(ValidationMessageContainer, { children: validationMessages.map((val, index) => (_jsx(ValidationMessage, { "$color": val.color, children: val.message }, index * 2))) })] }));
110
110
  });
111
111
  export default TextBox;
@@ -219,7 +219,9 @@ const TMPage = ({ id, objClass = ObjectClasses.None, listDisabled = false, lastR
219
219
  setShowList(false);
220
220
  }, showColumnLines: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.showColumnLines) === 1, showRowLines: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.showRowLines) === 1, onSelectionChanged: (e) => { setSelectedItems(e.selectedRowsData); onSelectionChanged?.(e.selectedRowsData); }, children: [_jsx(GroupPanel, { visible: !!(deviceType !== DeviceType.MOBILE && showAllColumns) }), _jsx(SearchPanel, { visible: false }), _jsx(Grouping, { autoExpandAll: false }), _jsx(HeaderFilter, { visible: true }), _jsx(Selection, { mode: "multiple", showCheckBoxesMode: "onClick", selectAllMode: 'allPages' }), _jsx(Scrolling, { mode: "standard", useNative: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.useNativeScrollbar) === 1 }), _jsx(Paging, { pageSize: 25 }), _jsx(Pager, { visible: true, showInfo: true, showNavigationButtons: true }), _jsx(LoadPanel, { enabled: true }), _jsx(Column, { width: 20, cellRender: cellRenderObjectIcon }), _jsx(Column, { width: 'auto', visible: showId, dataField: "id", caption: "ID" }), _jsx(Column, { width: 250, dataField: "name", caption: SDKUI_Localizator.Name, sortOrder: "asc" }), objClass == ObjectClasses.User ?
221
221
  _jsxs(_Fragment, { children: [_jsx(Column, { width: 'auto', dataField: "type", caption: SDKUI_Localizator.Type }), _jsx(Column, { width: 'auto', dataField: "fn", caption: SDKUI_Localizator.User_FirstName }), _jsx(Column, { width: 'auto', dataField: "ln", caption: SDKUI_Localizator.User_LastName })] })
222
- : _jsx(_Fragment, {}), _jsx(Column, { width: 250, visible: objClass == ObjectClasses.User ? true : showAllColumns, dataField: "description", caption: SDKUI_Localizator.Description }), customColumns?.map((item, index) => { return React.cloneElement(item, { key: index, visible: showAllColumns }); }), _jsx(Column, { width: 'auto', visible: showAllColumns, dataField: "ownerID", caption: SDKUI_Localizator.OwnerID }), _jsx(Column, { width: 'auto', visible: showAllColumns, dataField: "ownerName", caption: SDKUI_Localizator.OwnerName }), _jsx(Column, { width: 'auto', dataType: "date", format: Globalization.getDateDisplayFormat(), visible: showAllColumns, dataField: "creationTime", caption: SDKUI_Localizator.CreationTime }), _jsx(Column, { width: 'auto', dataType: "date", format: Globalization.getDateDisplayFormat(), visible: showAllColumns, dataField: "lastUpdateTime", caption: SDKUI_Localizator.LastUpdateTime })] })] }), detailInsteadOfContent ??
222
+ : _jsx(_Fragment, {}), _jsx(Column, { width: 250, visible: objClass == ObjectClasses.User ? true : showAllColumns, dataField: "description", caption: SDKUI_Localizator.Description }), objClass == ObjectClasses.Process ?
223
+ _jsx(Column, { width: 'auto', visible: showAllColumns, dataField: "orchPlatforms", caption: 'Piattaforma di orchestrazione' })
224
+ : _jsx(_Fragment, {}), customColumns?.map((item, index) => { return React.cloneElement(item, { key: index, visible: showAllColumns }); }), _jsx(Column, { width: 'auto', visible: showAllColumns, dataField: "ownerID", caption: SDKUI_Localizator.OwnerID }), _jsx(Column, { width: 'auto', visible: showAllColumns, dataField: "ownerName", caption: SDKUI_Localizator.OwnerName }), _jsx(Column, { width: 'auto', dataType: "date", format: Globalization.getDateDisplayFormat(), visible: showAllColumns, dataField: "creationTime", caption: SDKUI_Localizator.CreationTime }), _jsx(Column, { width: 'auto', dataType: "date", format: Globalization.getDateDisplayFormat(), visible: showAllColumns, dataField: "lastUpdateTime", caption: SDKUI_Localizator.LastUpdateTime })] })] }), detailInsteadOfContent ??
223
225
  _jsx(TMLayoutItem, { children: selectedItems.length == 1 || formMode == FormModes.Create || formMode == FormModes.Duplicate ?
224
226
  _jsx(TMToolbarCard, { onBack: deviceType === DeviceType.MOBILE ? () => setShowList(true) : undefined, title: calcSaveFormTitle(objName, formMode, selectedItems.length == 0 ? -1 : selectedItems[0].id, detailTitlePathKeys), children: getDetailFormWithProps() })
225
227
  :
@@ -986,7 +986,7 @@ const TMQdWhereItemValue = ({ whereItem, index, queryParamsDynDataList, onlyEdit
986
986
  _jsxs(StyledDivHorizontal, { children: [(editingMode == EditingModes.Chooser) &&
987
987
  _jsxs(_Fragment, { children: [showDataListChooseForm && !isEditableList &&
988
988
  _jsx(TMDataListItemChooserForm, { height: '500px', width: '450px', allowMultipleSelection: whereItem.operator == QueryOperators.In || whereItem.operator == QueryOperators.NotIn, dataListId: md?.dataListID, selectedIDs: whereItem.value1?.split(',').map((item) => !item.startsWith("'") ? item : item.slice(1, -1)) ?? [], onClose: () => setShowDataListChooseForm(false), onChoose: (IDs) => { IDs && normalizeValue(IDs.length == 1 ? IDs[0] : IDs.map((item) => `${item}`).join(","), true); } }), showDynDataListChooseForm && !isEditableList &&
989
- _jsx(TMDynDataListItemChooserForm, { TID: whereItem.tid, MID: md?.id, height: '500px', width: '450px', dynDL: dynDl, allowMultipleSelection: whereItem.operator == QueryOperators.In || whereItem.operator == QueryOperators.NotIn, searchResult: dataSource, selectedIDs: [whereItem.value1], onClose: () => setShowDynDataListChooseForm(false), onChoose: (IDs) => {
989
+ _jsx(TMDynDataListItemChooserForm, { TID: whereItem.tid, MID: md?.id, height: '500px', width: '450px', dynDL: dynDl, allowMultipleSelection: whereItem.operator == QueryOperators.In || whereItem.operator == QueryOperators.NotIn, searchResult: dataSource, selectedIDs: [whereItem.value1], queryParamsDynDataList: queryParamsDynDataList, onClose: () => setShowDynDataListChooseForm(false), onChoose: (IDs) => {
990
990
  IDs && normalizeValue(IDs.length == 1 ? IDs[0] : IDs.map((item) => `${item}`).join(","), true);
991
991
  if (!dynDl)
992
992
  return;
@@ -107,7 +107,7 @@ export const TMMetadataTooltip = ({ tid, md, color, children, layoutMode = Layou
107
107
  let isNumeratorInArk = md?.dataDomain === MetadataDataDomains.Numerator && layoutMode === LayoutModes.Ark;
108
108
  const renderTooltipContent = (tid, md) => {
109
109
  return (!md ? null
110
- : _jsxs(StyledTooltipContainer, { children: [_jsx(StyledTooltipItem, { "$color": color, children: `${SDK_Globals.useLocalizedName ? md.nameLoc : md.name} (TID: ${tid}, MID: ${md.id})` }), md.description && _jsx(StyledTooltipItem, { "$color": color, children: md.description }), _jsx(StyledTooltipSeparatorItem, { color: color }), md.objectClass === ObjectClasses.Permission && _jsx(StyledTooltipItem, { style: { fontWeight: 600 }, children: 'Tipo documento NON autorizzato' }), _jsx(StyledTooltipSeparatorItem, { color: color }), _jsxs(StyledTooltipItem, { "$color": color, children: [md.dataType, " ", md.dataType == MetadataDataTypes.Varchar ? `(${md.length ?? 0})` : md.dataType == MetadataDataTypes.Number ? `(${md.length ?? 0},${md.scale ?? 0})` : '', md.isPrimaryKey === 1 ? ' (PK)' : ''] }), _jsx(StyledTooltipItem, { style: { color: md.isRequired === 1 && !isNumeratorInArk ? TMColors.error : color }, children: md.isRequired === 1 && !isNumeratorInArk ? SDKUI_Localizator.Required : SDKUI_Localizator.RequiredNOT }), md.dataDomain && _jsx(StyledTooltipItem, { "$color": color, children: md.dataDomain }), md.isLexProt == 1 && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.Yes}` }), md.isLexProt == 2 && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.MetadataFlag}` }), md.isLexProt == 3 && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.Yes} (${SDKUI_Localizator.MetadataFlag})` }), md.isFreeSearchInput && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Search_Free}: ${SDKUI_Localizator.Yes}` }), md.isSpecialSearchOutput && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Search_Special}: ${SDKUI_Localizator.Yes}` }), md.format?.format && md.format.format != MetadataFormats.None && _jsx(StyledTooltipItem, { color: color, children: `${SDKUI_Localizator.Format}: ${LocalizeMetadataFormats(md.format.format)}` }), md.defaultValue && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Default}: ${_setDefaultValueForUI(md.defaultValue)}` }), md.fromTID && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.MetadataRoot}: ${md.isRootMID == 1 ? SDKUI_Localizator.Yes : SDKUI_Localizator.No}` }), md.templateMID && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Template}: ${md.templateMID}` }), md.perm && _jsxs(_Fragment, { children: [_jsx(StyledTooltipItem, { "$color": 'primary', "$marginTop": '5px', children: SDKUI_Localizator.Perms }), _jsx(StyledTooltipSeparatorItem, { color: color }), _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Archive}: ${md.perm.canArchive ?? SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.View_Metadato}: ${md.perm.canView ?? SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Search}: ${md.perm.canSearch ?? SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Update}: ${md.perm.canUpdate ?? SDKUI_Localizator.No}` })] })] }));
110
+ : _jsxs(StyledTooltipContainer, { children: [_jsx(StyledTooltipItem, { "$color": color, children: `${SDK_Globals.useLocalizedName ? md.nameLoc : md.name} (TID: ${tid}, MID: ${md.id})` }), md.description && _jsx(StyledTooltipItem, { "$color": color, children: md.description }), _jsx(StyledTooltipSeparatorItem, { color: color }), md.objectClass === ObjectClasses.Permission && _jsx(StyledTooltipItem, { style: { fontWeight: 600 }, children: 'Tipo documento NON autorizzato' }), _jsx(StyledTooltipSeparatorItem, { color: color }), _jsxs(StyledTooltipItem, { "$color": color, children: [md.dataType, " ", md.dataType == MetadataDataTypes.Varchar ? `(${md.length ?? 0})` : md.dataType == MetadataDataTypes.Number ? `(${md.length ?? 0},${md.scale ?? 0})` : '', md.isPrimaryKey === 1 ? ' (PK)' : ''] }), _jsx(StyledTooltipItem, { style: { color: md.isRequired === 1 && !isNumeratorInArk ? TMColors.error : color }, children: md.isRequired === 1 && !isNumeratorInArk ? SDKUI_Localizator.Required : SDKUI_Localizator.RequiredNOT }), md.dataDomain && _jsx(StyledTooltipItem, { "$color": color, children: md.dataDomain }), md.isLexProt == 1 && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.Yes}` }), md.isLexProt == 2 && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.MetadataFlag}` }), md.isLexProt == 3 && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.Yes} (${SDKUI_Localizator.MetadataFlag})` }), md.isFreeSearchInput && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Search_Free}: ${SDKUI_Localizator.Yes}` }), md.isSpecialSearchOutput && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Search_Special}: ${SDKUI_Localizator.Yes}` }), md.format?.format && md.format.format != MetadataFormats.None && _jsx(StyledTooltipItem, { color: color, children: `${SDKUI_Localizator.Format}: ${LocalizeMetadataFormats(md.format.format)}` }), md.format?.format === MetadataFormats.CustomRegEx && md.format.formatCustom && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.PatternRegex}: ${md.format.formatCustom}` }), md.defaultValue && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Default}: ${_setDefaultValueForUI(md.defaultValue)}` }), md.fromTID && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.MetadataRoot}: ${md.isRootMID == 1 ? SDKUI_Localizator.Yes : SDKUI_Localizator.No}` }), md.templateMID && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Template}: ${md.templateMID}` }), md.perm && _jsxs(_Fragment, { children: [_jsx(StyledTooltipItem, { "$color": 'primary', "$marginTop": '5px', children: SDKUI_Localizator.Perms }), _jsx(StyledTooltipSeparatorItem, { color: color }), _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Archive}: ${md.perm.canArchive ?? SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.View_Metadato}: ${md.perm.canView ?? SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Search}: ${md.perm.canSearch ?? SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Update}: ${md.perm.canUpdate ?? SDKUI_Localizator.No}` })] })] }));
111
111
  };
112
112
  return (_jsx("div", { style: { pointerEvents: 'all' }, children: _jsx(TMTooltip, { content: renderTooltipContent(tid, md), children: children }) }));
113
113
  };
@@ -9,7 +9,7 @@ export declare class Globalization {
9
9
  static getDateTimeDisplayValueCompact(value: Date | string | undefined, displayType?: DateDisplayTypes, metadataFormat?: MetadataFormats): string;
10
10
  static getDateDisplayFormat(displayType?: DateDisplayTypes): string;
11
11
  static getNumberDisplayValue(value: Number, withThousandsSeparator?: boolean, numberDisplayFormat?: string): string;
12
- static metadataFormatToDateDisplayFormat(format: MetadataFormats): "" | "MM/dd/yyyy" | "dd/MM/yyyy" | "EEEE dd MMMM yyyy" | "HH:mm" | "HH:mm:ss" | "MM/dd/yyyy HH:mm:ss" | "dd/MM/yyyy HH:mm:ss" | "MM/dd/yyyy HH:mm" | "dd/MM/yyyy HH:mm" | "EEEE dd MMMM yyyy HH:mm" | "EEEE dd MMMM yyyy HH:mm:ss";
12
+ static metadataFormatToDateDisplayFormat(format: MetadataFormats): "" | "dd/MM/yyyy" | "HH:mm" | "HH:mm:ss" | "MM/dd/yyyy" | "EEEE dd MMMM yyyy" | "MM/dd/yyyy HH:mm:ss" | "dd/MM/yyyy HH:mm:ss" | "MM/dd/yyyy HH:mm" | "dd/MM/yyyy HH:mm" | "EEEE dd MMMM yyyy HH:mm" | "EEEE dd MMMM yyyy HH:mm:ss";
13
13
  static getDecimalSeparator(): string | undefined;
14
14
  static getThousandsSeparator(): string | undefined;
15
15
  }
@@ -1,6 +1,7 @@
1
1
  import { InvoiceRetrieveFormats, LocalStorageService, OrderRetrieveFormats } from "@topconsultnpm/sdk-ts";
2
2
  import { FontSize } from "../utils/theme";
3
3
  import { SDKUI_Localizator } from "./SDKUI_Localizator";
4
+ import { removeGrafometricSignatures, clearGrafometricSignaturesCache, hasGrafometricSignatures } from "./grafometricSignaturesCache";
4
5
  export class DocumentDownloadSettings {
5
6
  constructor() {
6
7
  this.exportMode = 'copy';
@@ -18,8 +19,27 @@ export class DocumentDownloadSettings {
18
19
  export const dcmtsFileCacheDownload = new Map();
19
20
  export const dcmtsFileCachePreview = new Map();
20
21
  export const CACHE_SIZE_LIMIT = 10;
21
- export const clearDcmtsFileCache = () => { dcmtsFileCachePreview.clear(); dcmtsFileCacheDownload.clear(); };
22
- export const removeDcmtsFileCache = (key) => { dcmtsFileCachePreview.delete(key); dcmtsFileCacheDownload.delete(key); };
22
+ export const clearDcmtsFileCache = () => {
23
+ dcmtsFileCachePreview.clear();
24
+ dcmtsFileCacheDownload.clear();
25
+ clearGrafometricSignaturesCache(); // Svuota anche la cache delle firme grafometriche
26
+ };
27
+ export const removeDcmtsFileCache = (key) => {
28
+ if (dcmtsFileCachePreview.has(key))
29
+ dcmtsFileCachePreview.delete(key);
30
+ if (dcmtsFileCacheDownload.has(key))
31
+ dcmtsFileCacheDownload.delete(key);
32
+ // Invalida anche la cache delle firme grafometriche quando il file viene rimosso
33
+ // La chiave è nel formato "TID-DID"
34
+ const parts = key.split('-');
35
+ if (parts.length === 2) {
36
+ const tid = parseInt(parts[0], 10);
37
+ const did = parseInt(parts[1], 10);
38
+ if (!isNaN(tid) && !isNaN(did) && hasGrafometricSignatures(tid, did)) {
39
+ removeGrafometricSignatures(tid, did);
40
+ }
41
+ }
42
+ };
23
43
  export const isDcmtFileInCache = (key) => dcmtsFileCachePreview.has(key);
24
44
  export const DEFAULT_CHECK_IN_OUT_FOLDER = "";
25
45
  export class UserSettings {
@@ -310,6 +310,7 @@ export declare class SDKUI_Localizator {
310
310
  static get FEFormats_ASWEX_PDF(): "Extended AssoSoftware Style Sheet (PDF)" | "Hoja de estilo extendido AssoSoftware (PDF)" | "Feuille de style étendu AssoSoftware (PDF)" | "Folha de estilo extendido AssoSoftware (PDF)" | "Foglio di stile esteso AssoSoftware (PDF)";
311
311
  static get FEFormats_SDI_HTML(): "SdI Style Sheet (HTML)" | "Hoja de estilo SdI (HTML)" | "Feuille de style SdI (HTML)" | "Folha de estilo SdI (HTML)" | "Foglio di stile SdI (HTML)";
312
312
  static get FEFormats_SDI_PDF(): "SdI Style Sheet (PDF)" | "Hoja de estilo SdI (PDF)" | "Feuille de style SdI (PDF)" | "Folha de estilo SdI (PDF)" | "Foglio di stile SdI (PDF)";
313
+ static get Field(): string;
313
314
  static get FileCheck(): string;
314
315
  static get FileExtensionNotViewable(): string;
315
316
  static get FileConversion(): string;
@@ -324,6 +325,7 @@ export declare class SDKUI_Localizator {
324
325
  static get FolderIsEmpty(): string;
325
326
  static get ForgetPassword(): "Passwort vergessen" | "Forgot password" | "Has olvidado tu contraseña" | "Mot de passe oublié" | "Esqueceu sua senha" | "Password dimenticata";
326
327
  static get Format(): "Format" | "Formato";
328
+ static get FormatNotRespected(): "\"{{0}}\" entspricht nicht dem erforderlichen Format ({{1}})." | "\"{{0}}\" does not match the required format ({{1}})." | "\"{{0}}\" no respeta el formato requerido ({{1}})." | "\"{{0}}\" ne respecte pas le format requis ({{1}})." | "\"{{0}}\" não respeita o formato exigido ({{1}})." | "\"{{0}}\" non rispetta il formato richiesto ({{1}}).";
327
329
  static get Formats_None(): "Originale (XML)" | "Original (XML)";
328
330
  static get Formula(): "Formel" | "Formula" | "Fórmula" | "Formule";
329
331
  static get FormulaEditor_Function_TM_GetViewLink_WithDate(): "mit Verfallsdatum" | "with expiration date" | "con fecha de finalización" | "avec date d'expiration" | "com data de validade" | "con data di scadenza";
@@ -431,6 +433,9 @@ export declare class SDKUI_Localizator {
431
433
  static get Interval(): "Intervall" | "Interval" | "Intervalo" | "Intervalle" | "Intervallo";
432
434
  static get Invalid_File(): "Ungültige datei" | "Invalid file" | "Archivo inválido" | "Fichier non valide" | "Arquivo inválido" | "File non valido";
433
435
  static get InvalidDcmt(): "Ungültiges Dokument" | "Invalid document" | "Documento inválido" | "Document non valide" | "Documento non valido";
436
+ static get InvalidEmailAddress(): "\"{{0}}\" ist keine gültige E-Mail-Adresse." | "\"{{0}}\" is not a valid e-mail address." | "\"{{0}}\" no es una dirección de correo electrónico válida." | "\"{{0}}\" n'est pas une adresse e-mail valide." | "\"{{0}}\" não é um endereço de e-mail válido." | "\"{{0}}\" non è un indirizzo e-mail valido.";
437
+ static get InvalidTaxCode(): "\"{{0}}\" ist kein gültiger Steuerkennzeichen." | "\"{{0}}\" is not a valid Tax Code." | "\"{{0}}\" no es un Código Fiscal válido." | "\"{{0}}\" n'est pas un Code Fiscal valide." | "\"{{0}}\" não é um Código Fiscal válido." | "\"{{0}}\" non è un Codice Fiscale valido.";
438
+ static get InvalidVatNumber(): "\"{{0}}\" ist keine gültige Umsatzsteuer-Identifikationsnummer (11 Ziffern)." | "\"{{0}}\" is not a valid VAT number (11 digits)." | "\"{{0}}\" no es un número de IVA válido (11 dígitos)." | "\"{{0}}\" n'est pas un numéro de TVA valide (11 chiffres)." | "\"{{0}}\" não é um número de IVA válido (11 dígitos)." | "\"{{0}}\" non è una Partita IVA valida (11 cifre).";
434
439
  static get InvoiceRetrieveFormat(): "Exportieren Sie die Rechnung im folgenden Format" | "Export invoice in the following format" | "Exportar la factura en el siguiente formato" | "Exportez la facture au format suivant" | "Exporte a fatura no seguinte formato" | "Esporta la fattura nel seguente formato";
435
440
  static get LandingPage(): string;
436
441
  static get LastRead(): string;
@@ -466,6 +471,7 @@ export declare class SDKUI_Localizator {
466
471
  static get Match(): "Übereinstimmen" | "Match" | "Emparejar" | "Associer" | "Corresponder" | "Abbina";
467
472
  static get MatchManyDocumentsManyToMany(): "Mehrere Dokumente mehrfach zuordnen" | "Match many documents many to many" | "Emparejar muchos documentos de muchos a muchos" | "Associer plusieurs documents plusieurs à plusieurs" | "Corresponder muitos documentos de muitos para muitos" | "Abbina documenti molti a molti";
468
473
  static get Max_Value(): "Der Maximalwert ist {{0}}" | "The maximum value is {{0}}" | "El valor máximo es {{0}}" | "La valeur maximale est {{0}}" | "O valor máximo é {{0}}" | "Il valore massimo è {{0}}";
474
+ static get MaxLengthExceeded(): "\"{{0}}\" hat die maximale Länge von {{1}} Zeichen überschritten." | "\"{{0}}\" has exceeded the maximum length of {{1}} characters." | "\"{{0}}\" ha superado la longitud máxima de {{1}} caracteres." | "\"{{0}}\" a dépassé la longueur maximale de {{1}} caractères." | "\"{{0}}\" excedeu o comprimento máximo de {{1}} caracteres." | "\"{{0}}\" ha superato la lunghezza massima di {{1}} caratteri.";
469
475
  static get MaxDcmtsToBeReturned(): "Maximale Anzahl von Dokumenten" | "Max number of documents" | "Número máximo de documentos" | "Nombre maximum de documents" | "O número máximo de documentos" | "Numero massimo di documenti";
470
476
  static get Maximize(): "Maximieren" | "Maximize" | "Maximizar" | "Maximiser" | "Massimizza";
471
477
  static get MetadataFlag(): "Markieren von Methadaten" | "Flag metadata" | "Metadato de indicador" | "Mètadonnée de marque" | "Marcação de metadados" | "Metadato di contrassegno";
@@ -595,6 +601,7 @@ export declare class SDKUI_Localizator {
595
601
  static get Password(): "Passwort" | "Password" | "Contraseña" | "Mot de passe" | "Senha";
596
602
  static get PassToArchive(): "Zur Archivierung übergeben" | "Pass to archive" | "Pasar a archivo" | "Passer à l'archivage" | "Passar para arquivo" | "Passa ad archiviazione";
597
603
  static get PassToSearch(): "Zur Suche übergeben" | "Pass to search" | "Pasar a búsqueda" | "Passer à la recherche" | "Passar para pesquisa" | "Passa a ricerca";
604
+ static get PatternRegex(): "Regex-Muster" | "Regex pattern" | "Patrón regex" | "Motif regex" | "Padrão regex" | "Pattern regex";
598
605
  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";
599
606
  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.";
600
607
  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";
@@ -678,6 +685,8 @@ export declare class SDKUI_Localizator {
678
685
  static get SearchType(): "Suchtyp" | "Search type" | "Tipo de búsqueda" | "Type de recherche" | "Tipo de pesquisa" | "Tipo di ricerca";
679
686
  static get Required(): "Obligatorisch" | "Required" | "Obligatorio" | "Obbligatoire" | "Obrigatório" | "Obbligatorio";
680
687
  static get RequiredField(): "Erforderliches Feld" | "Required field" | "Campo obligatorio" | "Champ obligatoire" | "Campo obrigatório" | "Campo Obbligatorio";
688
+ static get RequiredFormat(): "Erforderliches Format" | "Required format" | "Formato requerido" | "Format requis" | "Formato obrigatório" | "Formato richiesto";
689
+ static get ValueMustBeDateOrTime(): "Der Wert muss ein Datum oder eine Uhrzeit sein" | "Value must be a date or time" | "El valor debe ser una fecha o una hora" | "La valeur doit être une date ou une heure" | "O valor deve ser uma data ou hora" | "Il valore deve essere una data o un orario";
681
690
  static get RequiredNOT(): "Nicht obligatorisch" | "Not mandatory" | "No obligatorio" | "Pas obligatoire" | "Não é obrigatório" | "Non obbligatorio";
682
691
  static get Refresh(): "Aktualisieren" | "Refresh" | "Actualizar" | "Mis à jour" | "Refrescar" | "Aggiorna";
683
692
  static get Reminder(): "Erinnerung" | "Reminder" | "Recordatorio" | "Rappel" | "Lembrete" | "Promemoria";
@@ -3067,6 +3067,16 @@ export class SDKUI_Localizator {
3067
3067
  default: return "Foglio di stile SdI (PDF)";
3068
3068
  }
3069
3069
  }
3070
+ static get Field() {
3071
+ switch (this._cultureID) {
3072
+ case CultureIDs.De_DE: return "Feld";
3073
+ case CultureIDs.En_US: return "Field";
3074
+ case CultureIDs.Es_ES: return "Campo";
3075
+ case CultureIDs.Fr_FR: return "Champ";
3076
+ case CultureIDs.Pt_PT: return "Campo";
3077
+ default: return "Campo";
3078
+ }
3079
+ }
3070
3080
  static get FileCheck() {
3071
3081
  switch (this._cultureID) {
3072
3082
  case CultureIDs.De_DE: return "Dateikontrolle";
@@ -3207,6 +3217,16 @@ export class SDKUI_Localizator {
3207
3217
  default: return "Formato";
3208
3218
  }
3209
3219
  }
3220
+ static get FormatNotRespected() {
3221
+ switch (this._cultureID) {
3222
+ case CultureIDs.De_DE: return "\"{{0}}\" entspricht nicht dem erforderlichen Format ({{1}}).";
3223
+ case CultureIDs.En_US: return "\"{{0}}\" does not match the required format ({{1}}).";
3224
+ case CultureIDs.Es_ES: return "\"{{0}}\" no respeta el formato requerido ({{1}}).";
3225
+ case CultureIDs.Fr_FR: return "\"{{0}}\" ne respecte pas le format requis ({{1}}).";
3226
+ case CultureIDs.Pt_PT: return "\"{{0}}\" não respeita o formato exigido ({{1}}).";
3227
+ default: return "\"{{0}}\" non rispetta il formato richiesto ({{1}}).";
3228
+ }
3229
+ }
3210
3230
  static get Formats_None() {
3211
3231
  switch (this._cultureID) {
3212
3232
  case CultureIDs.De_DE: return "Originale (XML)";
@@ -4278,6 +4298,36 @@ export class SDKUI_Localizator {
4278
4298
  default: return "Documento non valido";
4279
4299
  }
4280
4300
  }
4301
+ static get InvalidEmailAddress() {
4302
+ switch (this._cultureID) {
4303
+ case CultureIDs.De_DE: return "\"{{0}}\" ist keine gültige E-Mail-Adresse.";
4304
+ case CultureIDs.En_US: return "\"{{0}}\" is not a valid e-mail address.";
4305
+ case CultureIDs.Es_ES: return "\"{{0}}\" no es una dirección de correo electrónico válida.";
4306
+ case CultureIDs.Fr_FR: return "\"{{0}}\" n'est pas une adresse e-mail valide.";
4307
+ case CultureIDs.Pt_PT: return "\"{{0}}\" não é um endereço de e-mail válido.";
4308
+ default: return "\"{{0}}\" non è un indirizzo e-mail valido.";
4309
+ }
4310
+ }
4311
+ static get InvalidTaxCode() {
4312
+ switch (this._cultureID) {
4313
+ case CultureIDs.De_DE: return "\"{{0}}\" ist kein gültiger Steuerkennzeichen.";
4314
+ case CultureIDs.En_US: return "\"{{0}}\" is not a valid Tax Code.";
4315
+ case CultureIDs.Es_ES: return "\"{{0}}\" no es un Código Fiscal válido.";
4316
+ case CultureIDs.Fr_FR: return "\"{{0}}\" n'est pas un Code Fiscal valide.";
4317
+ case CultureIDs.Pt_PT: return "\"{{0}}\" não é um Código Fiscal válido.";
4318
+ default: return "\"{{0}}\" non è un Codice Fiscale valido.";
4319
+ }
4320
+ }
4321
+ static get InvalidVatNumber() {
4322
+ switch (this._cultureID) {
4323
+ case CultureIDs.De_DE: return "\"{{0}}\" ist keine gültige Umsatzsteuer-Identifikationsnummer (11 Ziffern).";
4324
+ case CultureIDs.En_US: return "\"{{0}}\" is not a valid VAT number (11 digits).";
4325
+ case CultureIDs.Es_ES: return "\"{{0}}\" no es un número de IVA válido (11 dígitos).";
4326
+ case CultureIDs.Fr_FR: return "\"{{0}}\" n'est pas un numéro de TVA valide (11 chiffres).";
4327
+ case CultureIDs.Pt_PT: return "\"{{0}}\" não é um número de IVA válido (11 dígitos).";
4328
+ default: return "\"{{0}}\" non è una Partita IVA valida (11 cifre).";
4329
+ }
4330
+ }
4281
4331
  static get InvoiceRetrieveFormat() {
4282
4332
  switch (this._cultureID) {
4283
4333
  case CultureIDs.De_DE: return "Exportieren Sie die Rechnung im folgenden Format";
@@ -4628,6 +4678,16 @@ export class SDKUI_Localizator {
4628
4678
  default: return "Il valore massimo è {{0}}";
4629
4679
  }
4630
4680
  }
4681
+ static get MaxLengthExceeded() {
4682
+ switch (this._cultureID) {
4683
+ case CultureIDs.De_DE: return "\"{{0}}\" hat die maximale Länge von {{1}} Zeichen überschritten.";
4684
+ case CultureIDs.En_US: return "\"{{0}}\" has exceeded the maximum length of {{1}} characters.";
4685
+ case CultureIDs.Es_ES: return "\"{{0}}\" ha superado la longitud máxima de {{1}} caracteres.";
4686
+ case CultureIDs.Fr_FR: return "\"{{0}}\" a dépassé la longueur maximale de {{1}} caractères.";
4687
+ case CultureIDs.Pt_PT: return "\"{{0}}\" excedeu o comprimento máximo de {{1}} caracteres.";
4688
+ default: return "\"{{0}}\" ha superato la lunghezza massima di {{1}} caratteri.";
4689
+ }
4690
+ }
4631
4691
  static get MaxDcmtsToBeReturned() {
4632
4692
  switch (this._cultureID) {
4633
4693
  case CultureIDs.De_DE: return "Maximale Anzahl von Dokumenten";
@@ -5910,6 +5970,16 @@ export class SDKUI_Localizator {
5910
5970
  default: return "Passa a ricerca";
5911
5971
  }
5912
5972
  }
5973
+ static get PatternRegex() {
5974
+ switch (this._cultureID) {
5975
+ case CultureIDs.De_DE: return "Regex-Muster";
5976
+ case CultureIDs.En_US: return "Regex pattern";
5977
+ case CultureIDs.Es_ES: return "Patrón regex";
5978
+ case CultureIDs.Fr_FR: return "Motif regex";
5979
+ case CultureIDs.Pt_PT: return "Padrão regex";
5980
+ default: return "Pattern regex";
5981
+ }
5982
+ }
5913
5983
  static get PasswordMustContain() {
5914
5984
  switch (this._cultureID) {
5915
5985
  case CultureIDs.De_DE: return "Das Passwort muss enthalten";
@@ -6759,6 +6829,26 @@ export class SDKUI_Localizator {
6759
6829
  default: return "Campo Obbligatorio";
6760
6830
  }
6761
6831
  }
6832
+ static get RequiredFormat() {
6833
+ switch (this._cultureID) {
6834
+ case CultureIDs.De_DE: return "Erforderliches Format";
6835
+ case CultureIDs.En_US: return "Required format";
6836
+ case CultureIDs.Es_ES: return "Formato requerido";
6837
+ case CultureIDs.Fr_FR: return "Format requis";
6838
+ case CultureIDs.Pt_PT: return "Formato obrigatório";
6839
+ default: return "Formato richiesto";
6840
+ }
6841
+ }
6842
+ static get ValueMustBeDateOrTime() {
6843
+ switch (this._cultureID) {
6844
+ case CultureIDs.De_DE: return "Der Wert muss ein Datum oder eine Uhrzeit sein";
6845
+ case CultureIDs.En_US: return "Value must be a date or time";
6846
+ case CultureIDs.Es_ES: return "El valor debe ser una fecha o una hora";
6847
+ case CultureIDs.Fr_FR: return "La valeur doit être une date ou une heure";
6848
+ case CultureIDs.Pt_PT: return "O valor deve ser uma data ou hora";
6849
+ default: return "Il valore deve essere una data o un orario";
6850
+ }
6851
+ }
6762
6852
  static get RequiredNOT() {
6763
6853
  switch (this._cultureID) {
6764
6854
  case CultureIDs.De_DE: return "Nicht obligatorisch";
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { FileItem } from '../components';
3
- import { AppModules, DataColumnDescriptor, DcmtTypeDescriptor, MetadataDescriptor, PdGs, SearchResultDescriptor } from '@topconsultnpm/sdk-ts';
3
+ import { AppModules, DataColumnDescriptor, DcmtTypeDescriptor, MetadataDescriptor, MetadataFormats, PdGs, SearchResultDescriptor } from '@topconsultnpm/sdk-ts';
4
4
  /**
5
5
  * Estensioni di firma/marca temporale note che possono avvolgere altre estensioni.
6
6
  * Es: file.pdf.p7m, file.xml.p7m, file.docx.p7m, file.xml.p7m.ts
@@ -109,4 +109,32 @@ export declare enum DcmtDisplayNameMethod {
109
109
  * Se i metadati non sono presenti nel dtd, li recupera dalla cache.
110
110
  */
111
111
  export declare const getDTDDisplayNameInfo: (dtd: DcmtTypeDescriptor | undefined) => Promise<string>;
112
+ export declare const getCurrencySymbol: (format: MetadataFormats | undefined) => string | undefined;
113
+ /** Estrae Format e FormatCulture dalle proprietà estese di una colonna. */
114
+ export declare const getColumnFormatInfo: (col: DataColumnDescriptor) => {
115
+ format: MetadataFormats;
116
+ formatCulture: string;
117
+ };
118
+ /**
119
+ * Restituisce il pattern di formato DevExtreme per DateBox basato su MetadataFormats e cultura.
120
+ * Usa la stessa logica di formatDateTimeByMetadataFormat per garantire coerenza.
121
+ * Supporta: IT (it-IT), GB (en-GB), US (en-US), JP (ja-JP)
122
+ */
123
+ export declare const getDevExtremeDateDisplayFormat: (format: MetadataFormats | undefined, formatCulture?: string) => string;
124
+ /** Formatta una data secondo MetadataFormats e cultura. */
125
+ export declare const formatDateTimeByMetadataFormat: (value: Date, format: MetadataFormats | undefined, formatCulture: string | undefined | null) => string;
126
+ /** Formatta un numero secondo MetadataFormats e cultura. Valute con simbolo e 2 decimali (0 per Yen). */
127
+ export declare const formatNumberByMetadataFormat: (value: number | string, format: MetadataFormats | undefined, formatCulture: string) => string;
128
+ /** Converte un valore in data locale. Restituisce il valore originale se il parsing fallisce. */
129
+ export declare const safeParseDateToLocaleString: (value: any) => string;
130
+ /**
131
+ * Trova un DataColumnDescriptor corrispondente a un dataField (formato TID_MID).
132
+ * Cerca prima per MID nelle extendedProperties, poi per caption.
133
+ */
134
+ export declare const findDataColumnByField: (columns: DataColumnDescriptor[], dataField: string | undefined, caption?: string) => DataColumnDescriptor | undefined;
135
+ /**
136
+ * Formatta un valore per l'export in base al tipo di colonna.
137
+ * Gestisce date, numeri e valute secondo il formato definito nella colonna.
138
+ */
139
+ export declare const formatValueForExport: (value: any, dataCol: DataColumnDescriptor | undefined, fallbackDataType?: string) => string;
112
140
  export {};