@topconsultnpm/sdkui-react 6.19.0-dev1.54 → 6.19.0-dev1.55

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 (34) hide show
  1. package/lib/components/base/TMLayout.d.ts +2 -1
  2. package/lib/components/base/TMLayout.js +2 -2
  3. package/lib/components/features/documents/TMDcmtBlog.js +1 -1
  4. package/lib/components/features/search/TMSearch.js +1 -1
  5. package/lib/components/features/tasks/TMTaskForm.d.ts +33 -0
  6. package/lib/components/features/tasks/TMTaskForm.js +291 -0
  7. package/lib/components/features/tasks/TMTasksAgenda.d.ts +17 -0
  8. package/lib/components/features/tasks/TMTasksAgenda.js +107 -0
  9. package/lib/components/features/tasks/TMTasksCalendar.d.ts +21 -0
  10. package/lib/components/features/tasks/TMTasksCalendar.js +240 -0
  11. package/lib/components/features/tasks/TMTasksHeader.d.ts +14 -0
  12. package/lib/components/features/tasks/TMTasksHeader.js +37 -0
  13. package/lib/components/features/tasks/TMTasksPanelContent.d.ts +19 -0
  14. package/lib/components/features/tasks/TMTasksPanelContent.js +74 -0
  15. package/lib/components/features/tasks/TMTasksUtils.d.ts +130 -0
  16. package/lib/components/features/tasks/TMTasksUtils.js +602 -0
  17. package/lib/components/features/tasks/TMTasksUtilsView.d.ts +32 -0
  18. package/lib/components/features/tasks/TMTasksUtilsView.js +107 -0
  19. package/lib/components/features/tasks/TMTasksView.d.ts +37 -0
  20. package/lib/components/features/tasks/TMTasksView.js +555 -0
  21. package/lib/components/features/workflow/TMWorkflowPopup.js +2 -2
  22. package/lib/components/grids/TMBlogsPost.js +27 -27
  23. package/lib/components/grids/TMBlogsPostUtils.js +1 -1
  24. package/lib/components/index.d.ts +8 -0
  25. package/lib/components/index.js +9 -0
  26. package/lib/helper/SDKUI_Localizator.d.ts +54 -4
  27. package/lib/helper/SDKUI_Localizator.js +526 -25
  28. package/lib/helper/TMCustomSearchBar.d.ts +8 -0
  29. package/lib/helper/TMCustomSearchBar.js +54 -0
  30. package/lib/helper/TMToppyMessage.js +1 -1
  31. package/lib/helper/TMUtils.d.ts +10 -1
  32. package/lib/helper/TMUtils.js +42 -1
  33. package/lib/stories/TMSDKUI_Localizator.stories.js +1 -1
  34. package/package.json +1 -1
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface TMCustomSearchBarProps {
3
+ placeholder?: string;
4
+ initialValue?: string;
5
+ onSearchChange?: (value: string) => void;
6
+ }
7
+ declare const TMCustomSearchBar: React.FC<TMCustomSearchBarProps>;
8
+ export default TMCustomSearchBar;
@@ -0,0 +1,54 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import TextBox from 'devextreme-react/cjs/text-box';
3
+ import { useEffect, useState } from 'react';
4
+ import { SDKUI_Localizator } from './SDKUI_Localizator';
5
+ import { IconCloseOutline, IconSearch } from './TMIcons';
6
+ const TMCustomSearchBar = ({ placeholder = SDKUI_Localizator.SearchAction + "...", initialValue = '', onSearchChange, }) => {
7
+ const [searchText, setSearchText] = useState("");
8
+ useEffect(() => {
9
+ setSearchText(initialValue);
10
+ });
11
+ const handleInput = (e) => {
12
+ if (e === undefined || e.event === undefined)
13
+ return;
14
+ const value = e.event?.target.value ?? '';
15
+ setSearchText(value);
16
+ if (onSearchChange) {
17
+ onSearchChange(value);
18
+ }
19
+ };
20
+ return (_jsxs("div", { style: {
21
+ display: 'flex',
22
+ alignItems: 'center',
23
+ width: '160px',
24
+ position: 'relative',
25
+ }, children: [_jsx(IconSearch, { style: {
26
+ position: 'absolute',
27
+ left: '5px',
28
+ zIndex: 1,
29
+ fontSize: '14px',
30
+ color: '#708090',
31
+ } }), _jsx(TextBox, { width: "160px", height: "24px", placeholder: placeholder, value: searchText, onInput: handleInput, style: {
32
+ width: '100%',
33
+ fontSize: '12px',
34
+ color: '#708090',
35
+ borderRadius: '4px',
36
+ paddingLeft: '15px',
37
+ boxSizing: 'border-box',
38
+ paddingRight: '25px',
39
+ border: '1px solid #e0e0e0',
40
+ } }), searchText.length > 0 && (_jsx(IconCloseOutline, { style: {
41
+ position: 'absolute',
42
+ right: '5px',
43
+ cursor: 'pointer',
44
+ zIndex: 2,
45
+ fontSize: '19px',
46
+ color: '#708090',
47
+ }, onClick: () => {
48
+ setSearchText('');
49
+ if (onSearchChange) {
50
+ onSearchChange('');
51
+ }
52
+ } }))] }));
53
+ };
54
+ export default TMCustomSearchBar;
@@ -37,6 +37,6 @@ const StyledToppyImage = styled.img `
37
37
  `;
38
38
  const TMToppyMessage = (props) => {
39
39
  const { message, titleTooltip } = props;
40
- return _jsxs(TMLayoutContainer, { gap: 30, alignItems: 'center', justifyContent: 'center', children: [_jsx(StyledToppyTextContainer, { children: _jsx(StyledToppyText, { title: titleTooltip ? titleTooltip : undefined, children: message }) }), _jsx(StyledToppyImage, { src: Toppy, alt: 'Toppy' })] });
40
+ return _jsxs(TMLayoutContainer, { gap: 30, alignItems: 'center', justifyContent: 'center', onContextMenu: (e) => e.preventDefault(), children: [_jsx(StyledToppyTextContainer, { children: _jsx(StyledToppyText, { title: titleTooltip ? titleTooltip : undefined, children: message }) }), _jsx(StyledToppyImage, { src: Toppy, alt: 'Toppy' })] });
41
41
  };
42
42
  export default TMToppyMessage;
@@ -1,4 +1,5 @@
1
- import { DataColumnDescriptor } from '@topconsultnpm/sdk-ts';
1
+ import React from 'react';
2
+ import { DataColumnDescriptor, PdGs } from '@topconsultnpm/sdk-ts';
2
3
  export declare const getFileIcon: (fileExtension: string | undefined, fileCount: number | undefined, tooltipContent?: JSX.Element | string) => import("react/jsx-runtime").JSX.Element;
3
4
  export declare function formatBytes(bytes: number | undefined, decimalPlaces?: number): string;
4
5
  export interface RowData {
@@ -18,3 +19,11 @@ export declare const isWidgetEnabled: (widgetId: string, widgetsString: string)
18
19
  export declare const isSign4TopEnabled: (widgetsString: string) => boolean;
19
20
  export declare const isCreateCertificateEnabled: (widgetsString: string) => boolean;
20
21
  export declare const isPdfEditorEnabled: (widgetsString: string) => boolean;
22
+ interface TabItemProps {
23
+ $isSelected: boolean;
24
+ }
25
+ export declare const StyledTabItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, TabItemProps>> & string;
26
+ export declare const StyledTabIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, TabItemProps>> & string;
27
+ export declare const TMCountBadge: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
28
+ export declare const getPdgsIconMap: (fontSize?: number) => Map<PdGs, JSX.Element>;
29
+ export {};
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import styled from "styled-components";
3
3
  import { TMTooltip } from '../components';
4
4
  import { IconKey } from './TMIcons';
5
- import { DataListCacheService, MetadataDataDomains } from '@topconsultnpm/sdk-ts';
5
+ import { DataListCacheService, MetadataDataDomains, PdGs } from '@topconsultnpm/sdk-ts';
6
6
  import { SDKUI_Localizator } from './SDKUI_Localizator';
7
7
  const StyledIconFileContainer = styled.div `
8
8
  height: 22px;
@@ -174,3 +174,44 @@ export const isCreateCertificateEnabled = (widgetsString) => {
174
174
  export const isPdfEditorEnabled = (widgetsString) => {
175
175
  return isWidgetEnabled(PDF_EDITOR_ID, widgetsString);
176
176
  };
177
+ export const StyledTabItem = styled.div `
178
+ display: flex;
179
+ align-items: center;
180
+ padding: 6px 12px;
181
+ border-radius: 8px;
182
+ font-weight: ${({ $isSelected }) => ($isSelected ? 'bold' : 'normal')};
183
+ color: ${({ $isSelected }) => ($isSelected ? '#fff' : '#000')};
184
+ background: ${({ $isSelected }) => $isSelected
185
+ ? 'linear-gradient(270deg, #46B5A2 16%, #3BAABC 34%, #3BAABC 34%, #3681AD 54%, #3368A5 72%, #2F549D 88%, #304F99 100%)'
186
+ : 'transparent'};
187
+ transition: background-color 0.2s ease;
188
+ font-size: 1rem;
189
+ &:hover {
190
+ background: ${({ $isSelected }) => ($isSelected ? null : 'rgba(0, 0, 0, 0.05)')};
191
+ }
192
+ `;
193
+ export const StyledTabIcon = styled.i `
194
+ cursor: pointer;
195
+ font-size: 16px;
196
+ color: ${({ $isSelected }) => ($isSelected ? '#fff !important' : '#000 !important')};
197
+ transition: color 0.2s ease;
198
+ `;
199
+ export const TMCountBadge = styled.div ` background-color: #ff5252; color: white; border-radius: 999px; margin-left: 8px; font-size: 0.7rem; line-height: 1; min-height: 20px; min-width: 20px; display: flex ; align-items: center; justify-content: center; `;
200
+ const taskPdgsIconClassMap = () => {
201
+ return new Map([
202
+ [PdGs.None, ""],
203
+ [PdGs.CF, "dx-icon-folder"],
204
+ [PdGs.DT, "dx-icon-file"],
205
+ [PdGs.WF, "dx-icon-box"],
206
+ [PdGs.WG, "dx-icon-group"],
207
+ ]);
208
+ };
209
+ export const getPdgsIconMap = (fontSize = 20) => {
210
+ return new Map([
211
+ [PdGs.None, _jsx("span", {}, "PdGs-None")],
212
+ [PdGs.CF, _jsx("i", { style: { fontSize }, className: taskPdgsIconClassMap().get(PdGs.CF) }, "PdGs-CF")],
213
+ [PdGs.DT, _jsx("i", { style: { fontSize }, className: taskPdgsIconClassMap().get(PdGs.DT) }, "PdGs-DT")],
214
+ [PdGs.WF, _jsx("i", { style: { fontSize }, className: taskPdgsIconClassMap().get(PdGs.WF) }, "PdGs-WF")],
215
+ [PdGs.WG, _jsx("i", { style: { fontSize }, className: taskPdgsIconClassMap().get(PdGs.WG) }, "PdGs-WG")], // <IconUserGroup color="#009700"/>
216
+ ]);
217
+ };
@@ -25,7 +25,7 @@ const Template = () => {
25
25
  { key: "All", value: SDKUI_Localizator.All },
26
26
  { key: "AllFilesAndFoldersInSupportArea", value: SDKUI_Localizator.AllFilesAndFoldersInSupportArea },
27
27
  { key: "AllItems", value: SDKUI_Localizator.AllItems },
28
- { key: "Alls2", value: SDKUI_Localizator.Alls2 },
28
+ { key: "AllFemale", value: SDKUI_Localizator.AllFemale },
29
29
  { key: "Alphabetic", value: SDKUI_Localizator.Alphabetic },
30
30
  { key: "Applied", value: SDKUI_Localizator.Applied },
31
31
  { key: "Apply", value: SDKUI_Localizator.Apply },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.19.0-dev1.54",
3
+ "version": "6.19.0-dev1.55",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",