@topconsultnpm/sdkui-react-beta 6.7.6 → 6.7.8

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.
@@ -169,7 +169,7 @@ const StyledWorkFlowOperationButton = styled.div `
169
169
  justify-content: flex-end;
170
170
  width: ${props => props.$width};
171
171
  height: ${props => props.$height};
172
- font-weight: bold;
172
+ font-weight: 600;
173
173
  cursor: ${props => !props.$isDisabled ? 'pointer' : 'default'};
174
174
  border-radius: 10px;
175
175
  overflow: hidden;
@@ -13,9 +13,10 @@ interface ITMMetadataEditorProps {
13
13
  disabled?: boolean;
14
14
  validationItems?: ValidationItem[];
15
15
  hasLabel?: boolean;
16
+ readOnly?: boolean;
16
17
  onValueChanged?: (value: any) => void;
17
18
  onValueChange?: (value: any) => void;
18
19
  onCascadeRefreshDynDataLists?: (dynDataListsToBeRefreshed: DynDataListsToBeRefreshed[]) => void;
19
20
  }
20
- declare const TMMetadataEditor: ({ hasLabel, tid, mid, value, queryParamsDynDataList, containerElement, allowMultipleSelection, autoFocus, showAsText, showAsNumber, validationItems, disabled, onValueChanged, onValueChange, onCascadeRefreshDynDataLists }: ITMMetadataEditorProps) => import("react/jsx-runtime").JSX.Element;
21
+ declare const TMMetadataEditor: ({ hasLabel, readOnly, tid, mid, value, queryParamsDynDataList, containerElement, allowMultipleSelection, autoFocus, showAsText, showAsNumber, validationItems, disabled, onValueChanged, onValueChange, onCascadeRefreshDynDataLists }: ITMMetadataEditorProps) => import("react/jsx-runtime").JSX.Element;
21
22
  export default TMMetadataEditor;
@@ -10,7 +10,7 @@ import TMUserChooser from '../choosers/TMUserChooser';
10
10
  import TMDateBox from './TMDateBox';
11
11
  import TMTextBox from './TMTextBox';
12
12
  import { TMMetadataIcon } from '../viewers/TMMidViewer';
13
- const TMMetadataEditor = ({ hasLabel = false, tid, mid, value, queryParamsDynDataList, containerElement, allowMultipleSelection, autoFocus, showAsText, showAsNumber, validationItems = [], disabled = false, onValueChanged, onValueChange, onCascadeRefreshDynDataLists }) => {
13
+ const TMMetadataEditor = ({ hasLabel = false, readOnly, tid, mid, value, queryParamsDynDataList, containerElement, allowMultipleSelection, autoFocus, showAsText, showAsNumber, validationItems = [], disabled = false, onValueChanged, onValueChange, onCascadeRefreshDynDataLists }) => {
14
14
  const [md, setMd] = useState();
15
15
  useEffect(() => {
16
16
  DcmtTypeListCacheService.GetAsync(tid).then((dtd) => {
@@ -19,7 +19,7 @@ const TMMetadataEditor = ({ hasLabel = false, tid, mid, value, queryParamsDynDat
19
19
  }, [mid]);
20
20
  let btnDistincValues = { text: 'Valori distinti', icon: _jsx(IconLayerGroup, { fontSize: 16 }), onClick: () => { ShowAlert({ message: "TODO Valori distinti", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } };
21
21
  if (value?.startsWith("{@QueryParam") || value == "{@UserName}" || value == "{@UserID}")
22
- return _jsx(TMTextBox, { readOnly: md?.dataDomain === MetadataDataDomains.Computed, label: hasLabel ? md?.nameLoc : undefined, icon: hasLabel ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'text', maxLength: md?.length, autoFocus: autoFocus, value: value || '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
22
+ return _jsx(TMTextBox, { readOnly: readOnly, label: hasLabel ? md?.nameLoc : undefined, icon: hasLabel ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'text', maxLength: md?.length, autoFocus: autoFocus, value: value || '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
23
23
  if (md?.dataDomain == MetadataDataDomains.DynamicDataList)
24
24
  return _jsx(TMDynDataListItemChooser, { label: hasLabel ? md?.nameLoc : undefined, icon: hasLabel ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, md: md, tid: tid, buttons: [btnDistincValues], queryParamsDynDataList: queryParamsDynDataList, onCascadeRefreshDynDataLists: onCascadeRefreshDynDataLists, elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, allowMultipleSelection: allowMultipleSelection, values: value ? [value] : [], showClearButton: true, onValueChanged: (IDs) => {
25
25
  if (!IDs || IDs.length <= 0)
@@ -42,13 +42,13 @@ const TMMetadataEditor = ({ hasLabel = false, tid, mid, value, queryParamsDynDat
42
42
  onValueChanged?.(IDs.join(","));
43
43
  } });
44
44
  if (showAsText)
45
- return _jsx(TMTextBox, { readOnly: md?.dataDomain === MetadataDataDomains.Computed, label: hasLabel ? md?.nameLoc : undefined, icon: hasLabel ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'text', buttons: [btnDistincValues], showClearButton: true, maxLength: md?.length, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
45
+ return _jsx(TMTextBox, { readOnly: readOnly, label: hasLabel ? md?.nameLoc : undefined, icon: hasLabel ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'text', buttons: [btnDistincValues], showClearButton: true, maxLength: md?.length, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
46
46
  if (showAsNumber)
47
- return _jsx(TMTextBox, { readOnly: md?.dataDomain === MetadataDataDomains.Computed, label: hasLabel ? md?.nameLoc : undefined, icon: hasLabel ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'number', showClearButton: true, precision: md?.length, scale: md?.scale, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
47
+ return _jsx(TMTextBox, { readOnly: readOnly, label: hasLabel ? md?.nameLoc : undefined, icon: hasLabel ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'number', showClearButton: true, precision: md?.length, scale: md?.scale, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
48
48
  switch (md?.dataType) {
49
- case MetadataDataTypes.DateTime: return _jsx(TMDateBox, { readOnly: md?.dataDomain === MetadataDataDomains.Computed, icon: hasLabel ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, label: hasLabel ? md?.nameLoc : undefined, validationItems: validationItems, disabled: disabled, width: '100%', value: value, buttons: [btnDistincValues], showClearButton: true, useDateSerializationFormat: true, containerElement: containerElement, onValueChange: (newValue) => { onValueChange?.(newValue ? newValue.toString() : undefined); onValueChanged?.(newValue ? newValue.toString() : undefined); } });
50
- case MetadataDataTypes.Number: return _jsx(TMTextBox, { readOnly: md?.dataDomain === MetadataDataDomains.Computed, label: hasLabel ? md?.nameLoc : undefined, icon: hasLabel ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'number', buttons: [btnDistincValues], showClearButton: true, precision: md?.length, scale: md?.scale, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
51
- default: return _jsx(TMTextBox, { readOnly: md?.dataDomain === MetadataDataDomains.Computed, label: hasLabel ? md?.nameLoc : undefined, icon: hasLabel ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, disabled: disabled, validationItems: validationItems, type: 'text', elementStyle: { width: '100%' }, showClearButton: true, buttons: [btnDistincValues], autoFocus: autoFocus, maxLength: md?.length, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => { onValueChanged?.(newValue); } });
49
+ case MetadataDataTypes.DateTime: return _jsx(TMDateBox, { readOnly: readOnly, icon: hasLabel ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, label: hasLabel ? md?.nameLoc : undefined, validationItems: validationItems, disabled: disabled, width: '100%', value: value, buttons: [btnDistincValues], showClearButton: true, useDateSerializationFormat: true, containerElement: containerElement, onValueChange: (newValue) => { onValueChange?.(newValue ? newValue.toString() : undefined); onValueChanged?.(newValue ? newValue.toString() : undefined); } });
50
+ case MetadataDataTypes.Number: return _jsx(TMTextBox, { readOnly: readOnly, label: hasLabel ? md?.nameLoc : undefined, icon: hasLabel ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'number', buttons: [btnDistincValues], showClearButton: true, precision: md?.length, scale: md?.scale, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
51
+ default: return _jsx(TMTextBox, { readOnly: readOnly, label: hasLabel ? md?.nameLoc : undefined, icon: hasLabel ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, disabled: disabled, validationItems: validationItems, type: 'text', elementStyle: { width: '100%' }, showClearButton: true, buttons: [btnDistincValues], autoFocus: autoFocus, maxLength: md?.length, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => { onValueChanged?.(newValue); } });
52
52
  }
53
53
  };
54
54
  export default TMMetadataEditor;
@@ -1,4 +1,7 @@
1
+ import { UserAppSettings } from "@topconsultnpm/sdk-ts-beta";
1
2
  export declare class SDKUI_Globals {
3
+ constructor();
4
+ static userAppSettings: UserAppSettings | undefined;
2
5
  private static _dataGridShowRowLines;
3
6
  private static _dataGridShowColumnLines;
4
7
  private static _dataGridUseNativeScrollbar;
@@ -1,4 +1,23 @@
1
+ import { AppearanceSettings, FilterPageSettings, SearchSettings, UIPanel, UserAppSettings } from "@topconsultnpm/sdk-ts-beta";
1
2
  export class SDKUI_Globals {
3
+ constructor() {
4
+ SDKUI_Globals.userAppSettings = new UserAppSettings();
5
+ SDKUI_Globals.userAppSettings.appearanceSettings = new AppearanceSettings();
6
+ SDKUI_Globals.userAppSettings.appearanceSettings.fontSize = "12px";
7
+ SDKUI_Globals.userAppSettings.appearanceSettings.gridRowAlternationEnabled = 0;
8
+ SDKUI_Globals.userAppSettings.appearanceSettings.gridShowColumnLines = 0;
9
+ SDKUI_Globals.userAppSettings.appearanceSettings.gridShowRowLines = 0;
10
+ SDKUI_Globals.userAppSettings.appearanceSettings.useNativeScrollbar = 1;
11
+ SDKUI_Globals.userAppSettings.landingPage = "";
12
+ SDKUI_Globals.userAppSettings.searchSettings = new SearchSettings();
13
+ SDKUI_Globals.userAppSettings.searchSettings.filterPageSettings = new FilterPageSettings();
14
+ SDKUI_Globals.userAppSettings.searchSettings.filterPageSettings.treePanel = new UIPanel();
15
+ SDKUI_Globals.userAppSettings.searchSettings.filterPageSettings.treePanel.visible = 1;
16
+ SDKUI_Globals.userAppSettings.searchSettings.filterPageSettings.treePanel.size = '20%';
17
+ SDKUI_Globals.userAppSettings.searchSettings.filterPageSettings.recentPanel = new UIPanel();
18
+ SDKUI_Globals.userAppSettings.searchSettings.filterPageSettings.recentPanel.visible = 1;
19
+ SDKUI_Globals.userAppSettings.searchSettings.filterPageSettings.recentPanel.size = '30%';
20
+ }
2
21
  static get dataGridShowRowLines() { return this._dataGridShowRowLines; }
3
22
  static set dataGridShowRowLines(theDataGridShowRowLines) { this._dataGridShowRowLines = theDataGridShowRowLines; }
4
23
  static get dataGridShowColumnLines() { return this._dataGridShowColumnLines; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.7.6",
3
+ "version": "6.7.8",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -28,7 +28,7 @@
28
28
  "lib"
29
29
  ],
30
30
  "dependencies": {
31
- "@topconsultnpm/sdk-ts-beta": "^6.7.5",
31
+ "@topconsultnpm/sdk-ts-beta": "^6.7.7",
32
32
  "buffer": "^6.0.3",
33
33
  "devextreme": "24.1.6",
34
34
  "devextreme-react": "24.1.6",