@topconsultnpm/sdkui-react-beta 6.9.117 → 6.9.119
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.
|
@@ -10,11 +10,6 @@ interface ITMUserChooserProps extends ITMChooserProps {
|
|
|
10
10
|
declare const TMUserChooser: React.FunctionComponent<ITMUserChooserProps>;
|
|
11
11
|
export default TMUserChooser;
|
|
12
12
|
export declare const TMUserChooserForm: React.FunctionComponent<ITMChooserFormProps<UserDescriptor>>;
|
|
13
|
-
export declare const TMUserIdViewer: ({ userId, showIcon, noneSelectionText }: {
|
|
14
|
-
userId?: number;
|
|
15
|
-
showIcon?: boolean;
|
|
16
|
-
noneSelectionText?: string;
|
|
17
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
13
|
export declare const TMUserIcon: ({ ud }: {
|
|
19
14
|
ud?: UserDescriptor;
|
|
20
15
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -46,7 +46,7 @@ export const TMUserChooserForm = (props) => {
|
|
|
46
46
|
const cellRenderIcon = (data) => _jsx(TMUserIcon, { ud: data.data });
|
|
47
47
|
return (_jsx(TMChooserForm, { title: getTitle(), allowMultipleSelection: props.allowMultipleSelection, hasShowOnlySelectedItems: true, width: props.width, height: props.height, manageUseLocalizedName: false, columns: renderDataGridColumns, selectedIDs: props.selectedIDs, cellRenderIcon: cellRenderIcon, dataSource: props.dataSource, getItems: getItems, onClose: props.onClose, onChoose: (IDs) => props.onChoose?.(IDs) }));
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
const TMUserIdViewer = ({ userId, showIcon = false, noneSelectionText = `<${SDKUI_Localizator.NoneSelection}>` }) => {
|
|
50
50
|
const [ud, setUd] = useState();
|
|
51
51
|
useEffect(() => {
|
|
52
52
|
if (!userId || userId <= 0) {
|
|
@@ -2,7 +2,7 @@ var _a;
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { SDK_Globals, SDK_Localizator, JobTypes, ObjectClasses, OwnershipLevels, ProcessStates, DcmtTypeListCacheService } from "@topconsultnpm/sdk-ts-beta";
|
|
4
4
|
import { TMTooltip } from "../components";
|
|
5
|
-
import { Icon123, IconAccessPoint, IconBasket, IconCloud, IconDataList, IconDisk, IconProcess, IconSettings, IconSignCert, IconSuitcase, IconTree, IconUser, SDKUI_Localizator } from "../helper";
|
|
5
|
+
import { Icon123, IconAccessPoint, IconBasket, IconCloud, IconDataList, IconDisk, IconProcess, IconServerService, IconSettings, IconSignCert, IconSuitcase, IconTree, IconUser, SDKUI_Localizator } from "../helper";
|
|
6
6
|
import { TMColors } from "../utils/theme";
|
|
7
7
|
import { LocalizeOwnershipLevels } from "../helper/Enum_Localizator";
|
|
8
8
|
export class PlatformObjectService {
|
|
@@ -390,7 +390,7 @@ PlatformObjectService.getIcon = (objClass, d) => {
|
|
|
390
390
|
ownershipColor = "red";
|
|
391
391
|
break;
|
|
392
392
|
}
|
|
393
|
-
return (_jsx("div", { style: { flexDirection: "row", display: "flex", alignItems: "center", justifyContent: "center", overflow: 'visible' }, children: _jsxs(TMTooltip, { content: _a.getTooltip(objClass, d), children: [objClass == ObjectClasses.Area && _jsx(IconCloud, { color: ownershipColor }), objClass == ObjectClasses.BasketType && _jsx(IconBasket, { color: ownershipColor }), objClass == ObjectClasses.Disk && _jsx(IconDisk, { color: ownershipColor }), objClass == ObjectClasses.DataList && d.id && d.id > 26 && _jsx(IconDataList, { color: ownershipColor }), objClass == ObjectClasses.DataList && d.id && d.id <= 26 && _jsx(IconSettings, { color: ownershipColor }), objClass == ObjectClasses.Numerator && _jsx(Icon123, { color: ownershipColor }), objClass == ObjectClasses.SignCert && _jsx(IconSignCert, { fontSize: 22, color: ownershipColor }), objClass == ObjectClasses.Tree && _jsx(IconTree, { color: ownershipColor }), objClass == ObjectClasses.TSA && _jsx(IconAccessPoint, { color: ownershipColor }), objClass == ObjectClasses.User && _jsx(IconUser, { color: ownershipColor }), objClass == ObjectClasses.Job && _jsx(IconSuitcase, { color: ownershipColor }), objClass == ObjectClasses.Process && _jsx(IconProcess, { color: d.state === ProcessStates.Running ? TMColors.primary : d.state === ProcessStates.Ready || d.state === ProcessStates.Started ? TMColors.secondary : d.state === ProcessStates.Freezed ? 'rgb(180,180,180)' : d.state === ProcessStates.Completed ? TMColors.success : TMColors.error })] }) }));
|
|
393
|
+
return (_jsx("div", { style: { flexDirection: "row", display: "flex", alignItems: "center", justifyContent: "center", overflow: 'visible' }, children: _jsxs(TMTooltip, { content: _a.getTooltip(objClass, d), children: [objClass == ObjectClasses.Area && _jsx(IconCloud, { color: ownershipColor }), objClass == ObjectClasses.BasketType && _jsx(IconBasket, { color: ownershipColor }), objClass == ObjectClasses.Disk && _jsx(IconDisk, { color: ownershipColor }), objClass == ObjectClasses.DataList && d.id && d.id > 26 && _jsx(IconDataList, { color: ownershipColor }), objClass == ObjectClasses.DataList && d.id && d.id <= 26 && _jsx(IconSettings, { color: ownershipColor }), objClass == ObjectClasses.Numerator && _jsx(Icon123, { color: ownershipColor }), objClass == ObjectClasses.SignCert && _jsx(IconSignCert, { fontSize: 22, color: ownershipColor }), objClass == ObjectClasses.SignServer && _jsx(IconServerService, { fontSize: 22, color: ownershipColor }), objClass == ObjectClasses.Tree && _jsx(IconTree, { color: ownershipColor }), objClass == ObjectClasses.TSA && _jsx(IconAccessPoint, { color: ownershipColor }), objClass == ObjectClasses.User && _jsx(IconUser, { color: ownershipColor }), objClass == ObjectClasses.Job && _jsx(IconSuitcase, { color: ownershipColor }), objClass == ObjectClasses.Process && _jsx(IconProcess, { color: d.state === ProcessStates.Running ? TMColors.primary : d.state === ProcessStates.Ready || d.state === ProcessStates.Started ? TMColors.secondary : d.state === ProcessStates.Freezed ? 'rgb(180,180,180)' : d.state === ProcessStates.Completed ? TMColors.success : TMColors.error })] }) }));
|
|
394
394
|
};
|
|
395
395
|
PlatformObjectService.getTooltip = (objClass, d) => {
|
|
396
396
|
let ownLevel = LocalizeOwnershipLevels(d.ownershipLevel);
|