@giteeteam/apps-team-components 1.11.9 → 1.11.10-alpha.2
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.
- package/dist/components/fields/predecessor-tasks/BaseField.d.ts +3 -0
- package/dist/components/fields/predecessor-tasks/BaseField.js +14 -0
- package/dist/components/fields/predecessor-tasks/ReadView.d.ts +4 -0
- package/dist/components/fields/predecessor-tasks/ReadView.js +14 -0
- package/dist/components/fields/predecessor-tasks/type.d.ts +4 -0
- package/dist/components/table-components/utils.js +2 -0
- package/dist/lib/global.d.ts +1 -0
- package/dist/lib/global.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import { ClassNames } from '@emotion/react';
|
|
3
|
+
import EmptyField from '../../common/EmptyField.js';
|
|
4
|
+
|
|
5
|
+
const TaskFieldStyle = `
|
|
6
|
+
line-height: 32px;
|
|
7
|
+
`;
|
|
8
|
+
const PreTaskBaseField = ({ value }) => {
|
|
9
|
+
const displayValue = Array.isArray(value) ? value.join() : value;
|
|
10
|
+
return displayValue ? (jsx(ClassNames, { children: ({ cx, css }) => (jsx("span", { className: cx('tooltip-overflow tooltip-maxline-1', css(TaskFieldStyle)), children: displayValue })) })) : (jsx(EmptyField, { readonly: true }));
|
|
11
|
+
};
|
|
12
|
+
PreTaskBaseField.displayName = 'PreTaskBaseField';
|
|
13
|
+
|
|
14
|
+
export { PreTaskBaseField };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import { proximaSdk } from '@giteeteam/proxima-sdk-js';
|
|
3
|
+
import { useDebounceFn } from 'ahooks';
|
|
4
|
+
import { PreTaskBaseField } from './BaseField.js';
|
|
5
|
+
|
|
6
|
+
const PreTaskReadView = ({ value, itemId }) => {
|
|
7
|
+
const { run: handleClick } = useDebounceFn(() => {
|
|
8
|
+
console.info(`Open editor for item ID: ${itemId}`);
|
|
9
|
+
proximaSdk.execute('openItemViewScreen', itemId);
|
|
10
|
+
}, { wait: 300 });
|
|
11
|
+
return (jsx("div", { className: "field-cell-layout", onClick: handleClick, children: jsx(PreTaskBaseField, { value: value }) }));
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { PreTaskReadView as default };
|
|
@@ -21,6 +21,7 @@ import ItemTypeReadView from '../fields/item-type/ReadView.js';
|
|
|
21
21
|
import KeyReadView from '../fields/key/ReadView.js';
|
|
22
22
|
import LongTextReadView from '../fields/long-text/ReadView.js';
|
|
23
23
|
import NumberReadView from '../fields/number/ReadView.js';
|
|
24
|
+
import PreTaskReadView from '../fields/predecessor-tasks/ReadView.js';
|
|
24
25
|
import PriorityCell from '../fields/priority/ActionCell.js';
|
|
25
26
|
import PriorityReadView from '../fields/priority/ReadView.js';
|
|
26
27
|
import RadioReadView from '../fields/radio/ReadView.js';
|
|
@@ -77,6 +78,7 @@ const getStandardReadComponents = () => {
|
|
|
77
78
|
[FIELD_TYPE_KEY_MAPPINGS.UserGroup]: UserGroupReadView,
|
|
78
79
|
[FIELD_TYPE_KEY_MAPPINGS.Version]: VersionReadView,
|
|
79
80
|
[FIELD_TYPE_KEY_MAPPINGS.Workspace]: WorkspaceReadView,
|
|
81
|
+
[FIELD_TYPE_KEY_MAPPINGS.PredecessorTasks]: PreTaskReadView,
|
|
80
82
|
};
|
|
81
83
|
return standardReadComponents;
|
|
82
84
|
};
|
package/dist/lib/global.d.ts
CHANGED
package/dist/lib/global.js
CHANGED