@topconsultnpm/sdkui-react-beta 6.8.69 → 6.8.70

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.
@@ -39,7 +39,7 @@ const TMMetadataEditor = ({ isLexProt, layoutMode, queryOperator, isModifiedWhen
39
39
  let btnDistincValues = { text: 'Valori distinti', icon: _jsx(IconLayerGroup, { fontSize: 16 }), onClick: () => { ShowAlert({ message: "TODO Valori distinti", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } };
40
40
  let isReadOnlyResult = isReadOnlyInternal();
41
41
  if (value?.startsWith("{@QueryParam") || value == "{@UserName}" || value == "{@UserID}" || queryOperator == QueryOperators.Custom)
42
- return _jsx(TMTextBox, { placeHolder: md?.defaultValue ?? '', isModifiedWhen: isModifiedWhenInternal(), readOnly: isReadOnlyResult, label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { layoutMode: layoutMode, md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'text', maxLength: maxLength, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
42
+ return _jsx(TMTextBox, { placeHolder: layoutMode === LayoutModes.Ark ? md?.defaultValue ?? '' : '', isModifiedWhen: isModifiedWhenInternal(), readOnly: isReadOnlyResult, label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { layoutMode: layoutMode, md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'text', maxLength: maxLength, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
43
43
  if (md?.dataDomain == MetadataDataDomains.DynamicDataList)
44
44
  return _jsx(TMDynDataListItemChooser, { readOnly: isReadOnlyResult, isModifiedWhen: isModifiedWhenInternal(), label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { layoutMode: layoutMode, md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, md: md, tid: tid, buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, queryParamsDynDataList: queryParamsDynDataList, onCascadeRefreshDynDataLists: onCascadeRefreshDynDataLists, elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, allowMultipleSelection: multipleSelectionIsenabled, values: value ? [value] : [], showClearButton: !isReadOnlyResult, onValueChanged: (IDs) => {
45
45
  if (!IDs || IDs.length <= 0)
@@ -62,18 +62,18 @@ const TMMetadataEditor = ({ isLexProt, layoutMode, queryOperator, isModifiedWhen
62
62
  onValueChanged?.(IDs.join(","));
63
63
  } });
64
64
  if (showAsText)
65
- return _jsx(TMTextBox, { placeHolder: md?.defaultValue ?? '', isModifiedWhen: isModifiedWhenInternal(), readOnly: isReadOnlyResult, label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { layoutMode: layoutMode, md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'text', buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, showClearButton: !isReadOnlyResult, maxLength: maxLength, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
65
+ return _jsx(TMTextBox, { placeHolder: layoutMode === LayoutModes.Ark ? md?.defaultValue ?? '' : '', isModifiedWhen: isModifiedWhenInternal(), readOnly: isReadOnlyResult, label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { layoutMode: layoutMode, md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'text', buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, showClearButton: !isReadOnlyResult, maxLength: maxLength, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
66
66
  if (showAsNumber)
67
- return _jsx(TMTextBox, { placeHolder: md?.defaultValue ?? '', isModifiedWhen: isModifiedWhenInternal(), readOnly: isReadOnlyResult, label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { layoutMode: layoutMode, md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'number', showClearButton: !isReadOnlyResult, precision: md?.length, scale: md?.scale, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
67
+ return _jsx(TMTextBox, { placeHolder: layoutMode === LayoutModes.Ark ? md?.defaultValue ?? '' : '', isModifiedWhen: isModifiedWhenInternal(), readOnly: isReadOnlyResult, label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { layoutMode: layoutMode, md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'number', showClearButton: !isReadOnlyResult, precision: md?.length, scale: md?.scale, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
68
68
  switch (md?.dataType) {
69
- case MetadataDataTypes.DateTime: return _jsx(TMDateBox, { placeholder: md.defaultValue ?? '', isModifiedWhen: isModifiedWhenInternal(), readOnly: isReadOnlyResult, icon: showLabelTop ? _jsx(TMMetadataIcon, { layoutMode: layoutMode, md: md, tid: tid }) : undefined, label: showLabelTop ? md?.nameLoc : undefined, validationItems: validationItems, disabled: disabled, width: '100%', value: value, buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, showClearButton: !isReadOnlyResult, useDateSerializationFormat: true, containerElement: containerElement, onValueChange: (newValue) => { onValueChange?.(newValue ? newValue.toString() : undefined); onValueChanged?.(newValue ? newValue.toString() : undefined); } });
70
- case MetadataDataTypes.Number: return _jsx(TMTextBox, { placeHolder: md?.defaultValue ?? '', isModifiedWhen: isModifiedWhenInternal(), readOnly: isReadOnlyResult, label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { layoutMode: layoutMode, md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'number', buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, showClearButton: !isReadOnlyResult, precision: md?.length, scale: md?.scale, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
69
+ case MetadataDataTypes.DateTime: return _jsx(TMDateBox, { placeholder: layoutMode === LayoutModes.Ark ? md?.defaultValue ?? '' : '', isModifiedWhen: isModifiedWhenInternal(), readOnly: isReadOnlyResult, icon: showLabelTop ? _jsx(TMMetadataIcon, { layoutMode: layoutMode, md: md, tid: tid }) : undefined, label: showLabelTop ? md?.nameLoc : undefined, validationItems: validationItems, disabled: disabled, width: '100%', value: value, buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, showClearButton: !isReadOnlyResult, useDateSerializationFormat: true, containerElement: containerElement, onValueChange: (newValue) => { onValueChange?.(newValue ? newValue.toString() : undefined); onValueChanged?.(newValue ? newValue.toString() : undefined); } });
70
+ case MetadataDataTypes.Number: return _jsx(TMTextBox, { placeHolder: layoutMode === LayoutModes.Ark ? md?.defaultValue ?? '' : '', isModifiedWhen: isModifiedWhenInternal(), readOnly: isReadOnlyResult, label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { layoutMode: layoutMode, md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'number', buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, showClearButton: !isReadOnlyResult, precision: md?.length, scale: md?.scale, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
71
71
  default:
72
72
  if (showByTextarea) {
73
- return _jsx(TMTextArea, { placeHolder: md.defaultValue ?? '', rows: 1, readOnly: isReadOnlyResult, label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { layoutMode: layoutMode, md: md, tid: tid }) : undefined, isModifiedWhen: isModifiedWhenInternal(), validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, showClearButton: !isReadOnlyResult, buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, autoFocus: autoFocus, maxLength: maxLength, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => { onValueChanged?.(newValue); }, resize: false });
73
+ return _jsx(TMTextArea, { placeHolder: layoutMode === LayoutModes.Ark ? md?.defaultValue ?? '' : '', rows: 1, readOnly: isReadOnlyResult, label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { layoutMode: layoutMode, md: md, tid: tid }) : undefined, isModifiedWhen: isModifiedWhenInternal(), validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, showClearButton: !isReadOnlyResult, buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, autoFocus: autoFocus, maxLength: maxLength, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => { onValueChanged?.(newValue); }, resize: false });
74
74
  }
75
75
  else {
76
- return _jsx(TMTextBox, { placeHolder: md?.defaultValue ?? '', isModifiedWhen: isModifiedWhenInternal(), readOnly: isReadOnlyResult, label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { layoutMode: layoutMode, md: md, tid: tid }) : undefined, disabled: disabled, validationItems: validationItems, type: 'text', elementStyle: { width: '100%' }, showClearButton: !isReadOnlyResult, buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, autoFocus: autoFocus, maxLength: maxLength, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => { onValueChanged?.(newValue); } });
76
+ return _jsx(TMTextBox, { placeHolder: layoutMode === LayoutModes.Ark ? md?.defaultValue ?? '' : '', isModifiedWhen: isModifiedWhenInternal(), readOnly: isReadOnlyResult, label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { layoutMode: layoutMode, md: md, tid: tid }) : undefined, disabled: disabled, validationItems: validationItems, type: 'text', elementStyle: { width: '100%' }, showClearButton: !isReadOnlyResult, buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, autoFocus: autoFocus, maxLength: maxLength, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => { onValueChanged?.(newValue); } });
77
77
  }
78
78
  }
79
79
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.8.69",
3
+ "version": "6.8.70",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",