@topconsultnpm/sdkui-react-beta 6.6.53 → 6.6.54

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 (32) hide show
  1. package/lib/assets/TopMediaOrchestrator6.svg +92 -92
  2. package/lib/assets/icomoon.svg +96 -96
  3. package/lib/components/base/Styled.d.ts +1919 -22
  4. package/lib/components/base/TMAlert.d.ts +3 -2
  5. package/lib/components/base/TMButton.d.ts +7 -7
  6. package/lib/components/base/TMContextMenuOLD.d.ts +274 -3
  7. package/lib/components/base/TMDropDownMenu.d.ts +1 -0
  8. package/lib/components/base/TMEditorBase.d.ts +1 -0
  9. package/lib/components/base/TMLayout.d.ts +36 -36
  10. package/lib/components/base/TMListView.d.ts +1 -0
  11. package/lib/components/base/TMTab.d.ts +4 -4
  12. package/lib/components/base/TMVilViewer.d.ts +1 -1
  13. package/lib/components/choosers/TMDataListItemChooser.js +2 -2
  14. package/lib/components/choosers/TMUserChooser.d.ts +5 -5
  15. package/lib/components/choosers/TMUserChooser.js +2 -2
  16. package/lib/components/editors/TMDateBox.d.ts +0 -1
  17. package/lib/components/editors/TMDateBox.js +9 -12
  18. package/lib/components/editors/TMEditorStyled.d.ts +17 -16
  19. package/lib/components/editors/TMMetadataEditor.d.ts +2 -1
  20. package/lib/components/editors/TMMetadataEditor.js +10 -10
  21. package/lib/components/forms/TMLoginForm.d.ts +4 -4
  22. package/lib/components/query/TMQueryEditor.d.ts +550 -8
  23. package/lib/components/query/TMQueryResult.d.ts +5 -5
  24. package/lib/components/query/TMQueryResultForm.d.ts +10 -10
  25. package/lib/components/sidebar/TMHeader.d.ts +2 -2
  26. package/lib/components/viewers/TMDataListItemViewer.d.ts +3 -3
  27. package/lib/components/viewers/TMMidViewer.d.ts +5 -5
  28. package/lib/components/viewers/TMTidViewer.d.ts +5 -5
  29. package/lib/helper/helpers.d.ts +1 -1
  30. package/lib/hooks/useForm.d.ts +1 -0
  31. package/lib/hooks/useOutsideClick.d.ts +1 -0
  32. package/package.json +1 -1
@@ -9,9 +9,10 @@ interface ITMMetadataEditorProps {
9
9
  showAsText?: boolean;
10
10
  showAsNumber?: boolean;
11
11
  containerElement: Element | undefined;
12
+ readOnly?: boolean;
12
13
  onValueChanged?: (value: any) => void;
13
14
  onValueChange?: (value: any) => void;
14
15
  onCascadeRefreshDynDataLists?: (dynDataListsToBeRefreshed: DynDataListsToBeRefreshed[]) => void;
15
16
  }
16
- declare const TMMetadataEditor: ({ tid, mid, value, queryParamsDynDataList, containerElement, allowMultipleSelection, autoFocus, showAsText, showAsNumber, onValueChanged, onValueChange, onCascadeRefreshDynDataLists }: ITMMetadataEditorProps) => import("react/jsx-runtime").JSX.Element;
17
+ declare const TMMetadataEditor: ({ tid, mid, value, queryParamsDynDataList, containerElement, allowMultipleSelection, autoFocus, showAsText, showAsNumber, readOnly, onValueChanged, onValueChange, onCascadeRefreshDynDataLists }: ITMMetadataEditorProps) => import("react/jsx-runtime").JSX.Element;
17
18
  export default TMMetadataEditor;
@@ -9,7 +9,7 @@ import TMDynDataListItemChooser from '../choosers/TMDynDataListItemChooser';
9
9
  import TMUserChooser from '../choosers/TMUserChooser';
10
10
  import TMDateBox from './TMDateBox';
11
11
  import TMTextBox from './TMTextBox';
12
- const TMMetadataEditor = ({ tid, mid, value, queryParamsDynDataList, containerElement, allowMultipleSelection, autoFocus, showAsText, showAsNumber, onValueChanged, onValueChange, onCascadeRefreshDynDataLists }) => {
12
+ const TMMetadataEditor = ({ tid, mid, value, queryParamsDynDataList, containerElement, allowMultipleSelection, autoFocus, showAsText, showAsNumber, readOnly = false, onValueChanged, onValueChange, onCascadeRefreshDynDataLists }) => {
13
13
  const [md, setMd] = useState();
14
14
  useEffect(() => {
15
15
  DcmtTypeListCacheService.GetAsync(tid).then((dtd) => {
@@ -18,36 +18,36 @@ const TMMetadataEditor = ({ tid, mid, value, queryParamsDynDataList, containerEl
18
18
  }, [mid]);
19
19
  let btnDistincValues = { text: 'Valori distinti', icon: _jsx(IconLayerGroup, { fontSize: 16 }), onClick: () => { ShowAlert({ message: "TODO Valori distinti", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } };
20
20
  if (value?.startsWith("{@QueryParam") || value == "{@UserName}" || value == "{@UserID}")
21
- return _jsx(TMTextBox, { elementStyle: { width: '100%' }, type: 'text', maxLength: md?.length, autoFocus: autoFocus, value: value || '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
21
+ return _jsx(TMTextBox, { readOnly: readOnly, elementStyle: { width: '100%' }, type: 'text', maxLength: md?.length, autoFocus: autoFocus, value: value || '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
22
22
  if (md?.dataDomain == MetadataDataDomains.DynamicDataList)
23
- return _jsx(TMDynDataListItemChooser, { 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) => {
23
+ return _jsx(TMDynDataListItemChooser, { readOnly: readOnly, 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) => {
24
24
  if (!IDs || IDs.length <= 0)
25
25
  onValueChanged?.(undefined);
26
26
  else
27
27
  onValueChanged?.(IDs[0]);
28
28
  } });
29
29
  if (md?.dataDomain == MetadataDataDomains.DataList)
30
- return _jsx(TMDataListItemChooser, { elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, dataListId: md.dataListID, allowMultipleSelection: allowMultipleSelection, values: value?.split(',').map((item) => !item.startsWith("'") ? item : item.slice(1, -1)) ?? [], showClearButton: true, buttons: [btnDistincValues], onValueChanged: (IDs) => {
30
+ return _jsx(TMDataListItemChooser, { readOnly: readOnly, elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, dataListId: md.dataListID, allowMultipleSelection: allowMultipleSelection, values: value?.split(',').map((item) => !item.startsWith("'") ? item : item.slice(1, -1)) ?? [], showClearButton: true, buttons: [btnDistincValues], onValueChanged: (IDs) => {
31
31
  if (!IDs || IDs.length <= 0)
32
32
  onValueChanged?.(undefined);
33
33
  else
34
34
  onValueChanged?.(IDs.join(","));
35
35
  } });
36
36
  if (md?.dataDomain == MetadataDataDomains.UserID)
37
- return _jsx(TMUserChooser, { elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, placeHolder: " ", showClearButton: true, allowMultipleSelection: allowMultipleSelection, values: value?.split(',').map((item) => !item.startsWith("'") ? Number(item) : Number(item.slice(1, -1))) ?? [], buttons: [btnDistincValues], onValueChanged: (IDs) => {
37
+ return _jsx(TMUserChooser, { readOnly: readOnly, elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, placeHolder: " ", showClearButton: true, allowMultipleSelection: allowMultipleSelection, values: value?.split(',').map((item) => !item.startsWith("'") ? Number(item) : Number(item.slice(1, -1))) ?? [], buttons: [btnDistincValues], onValueChanged: (IDs) => {
38
38
  if (!IDs || IDs.length <= 0)
39
39
  onValueChanged?.(undefined);
40
40
  else
41
41
  onValueChanged?.(IDs.join(","));
42
42
  } });
43
43
  if (showAsText)
44
- return _jsx(TMTextBox, { 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) });
44
+ return _jsx(TMTextBox, { readOnly: readOnly, 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
45
  if (showAsNumber)
46
- return _jsx(TMTextBox, { 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) });
46
+ return _jsx(TMTextBox, { readOnly: readOnly, 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
47
  switch (md?.dataType) {
48
- case MetadataDataTypes.DateTime: return _jsx(TMDateBox, { width: '100%', value: value, buttons: [btnDistincValues], showClearButton: true, useDateSerializationFormat: true, containerElement: containerElement, onValueChange: (newValue) => { onValueChange?.(newValue ? newValue.toString() : undefined); onValueChanged?.(newValue ? newValue.toString() : undefined); } });
49
- case MetadataDataTypes.Number: return _jsx(TMTextBox, { 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) });
50
- default: return _jsx(TMTextBox, { 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); } });
48
+ case MetadataDataTypes.DateTime: return _jsx(TMDateBox, { readOnly: readOnly, width: '100%', value: value, buttons: [btnDistincValues], showClearButton: true, useDateSerializationFormat: true, containerElement: containerElement, onValueChange: (newValue) => { onValueChange?.(newValue ? newValue.toString() : undefined); onValueChanged?.(newValue ? newValue.toString() : undefined); } });
49
+ case MetadataDataTypes.Number: return _jsx(TMTextBox, { readOnly: readOnly, 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) });
50
+ default: return _jsx(TMTextBox, { readOnly: readOnly, 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); } });
51
51
  }
52
52
  };
53
53
  export default TMMetadataEditor;
@@ -23,10 +23,10 @@ export declare const cultureIDsDataSource: {
23
23
  }[];
24
24
  declare const TMLoginForm: React.FunctionComponent<ITMLoginFormProps>;
25
25
  export declare const TMChangePassword: ({ tmSession, username, onClose, enable, hasBack }: {
26
- hasBack?: boolean;
27
- tmSession?: ITopMediaSession;
26
+ hasBack?: boolean | undefined;
27
+ tmSession?: ITopMediaSession | undefined;
28
28
  username: string;
29
- onClose?: () => void;
30
- enable?: boolean;
29
+ onClose?: (() => void) | undefined;
30
+ enable?: boolean | undefined;
31
31
  }) => import("react/jsx-runtime").JSX.Element;
32
32
  export default TMLoginForm;