@giteeteam/apps-team-components 1.3.0-alpha.1 → 1.3.0-alpha.3

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 (264) hide show
  1. package/README.md +21 -21
  2. package/dist/components/common/EmptyField.d.ts +0 -1
  3. package/dist/components/common/EmptyField.js +7 -5
  4. package/dist/components/common/PriceTag.js +26 -23
  5. package/dist/components/common/expand-component/index.d.ts +0 -1
  6. package/dist/components/common/expand-component/index.js +12 -10
  7. package/dist/components/common/expand-component/style.js +8 -6
  8. package/dist/components/common/item-icon/ItemIcon.d.ts +0 -1
  9. package/dist/components/common/item-icon/ItemIcon.js +6 -4
  10. package/dist/components/common/overflow-tooltip/BaseOverflowTooltip.d.ts +0 -1
  11. package/dist/components/common/overflow-tooltip/BaseOverflowTooltip.js +9 -6
  12. package/dist/components/common/overflow-tooltip/OverflowTooltip.js +9 -6
  13. package/dist/components/common/overflow-tooltip/SimpleOverflowToolTip.js +8 -5
  14. package/dist/components/common/overflow-tooltip/style/index.js +16 -14
  15. package/dist/components/common/style/global.js +4 -2
  16. package/dist/components/common/style/mixin.js +18 -15
  17. package/dist/components/common/user-field/UserAvatar.js +8 -6
  18. package/dist/components/common/user-field/style/index.js +23 -21
  19. package/dist/components/common/utils.js +13 -9
  20. package/dist/components/default-empty-icon/config.js +11 -6
  21. package/dist/components/default-empty-icon/index.js +10 -9
  22. package/dist/components/default-empty-icon/style.js +65 -62
  23. package/dist/components/default-empty-icon/types.js +3 -1
  24. package/dist/components/field-behavior/fields/type.js +5 -2
  25. package/dist/components/fields/actors/BaseField.js +5 -2
  26. package/dist/components/fields/actors/ReadView.d.ts +0 -1
  27. package/dist/components/fields/actors/ReadView.js +8 -6
  28. package/dist/components/fields/ancestor/ReadView.js +8 -6
  29. package/dist/components/fields/ancestor/utils.js +4 -12
  30. package/dist/components/fields/assignee/ReadView.d.ts +0 -1
  31. package/dist/components/fields/assignee/ReadView.js +13 -11
  32. package/dist/components/fields/base-component/utils.js +3 -1
  33. package/dist/components/fields/bind-workspace/ReadView.d.ts +0 -1
  34. package/dist/components/fields/bind-workspace/ReadView.js +11 -9
  35. package/dist/components/fields/bind-workspace/hooks.js +7 -4
  36. package/dist/components/fields/bind-workspace/style/index.js +5 -3
  37. package/dist/components/fields/cascade/ReadView.js +8 -6
  38. package/dist/components/fields/cascade/utils.js +4 -3
  39. package/dist/components/fields/checkbox/ReadView.d.ts +0 -1
  40. package/dist/components/fields/checkbox/ReadView.js +7 -5
  41. package/dist/components/fields/created-at/ReadView.js +10 -8
  42. package/dist/components/fields/created-by/ReadView.d.ts +0 -1
  43. package/dist/components/fields/created-by/ReadView.js +11 -9
  44. package/dist/components/fields/data-quote/ReadView.js +12 -10
  45. package/dist/components/fields/data-quote/utils.js +5 -3
  46. package/dist/components/fields/date/ReadView.d.ts +0 -1
  47. package/dist/components/fields/date/ReadView.js +8 -6
  48. package/dist/components/fields/dropdown/BaseField.js +53 -40
  49. package/dist/components/fields/dropdown/Cell.d.ts +0 -1
  50. package/dist/components/fields/dropdown/Cell.js +6 -4
  51. package/dist/components/fields/dropdown/ReadView.d.ts +0 -1
  52. package/dist/components/fields/dropdown/ReadView.js +10 -8
  53. package/dist/components/fields/dropdown/data.d.ts +1 -1
  54. package/dist/components/fields/dropdown/data.js +6 -3
  55. package/dist/components/fields/dropdown/hook.d.ts +0 -1
  56. package/dist/components/fields/dropdown/hook.js +11 -8
  57. package/dist/components/fields/dropdown/style.js +88 -85
  58. package/dist/components/fields/file/ReadView.d.ts +0 -1
  59. package/dist/components/fields/file/ReadView.js +7 -5
  60. package/dist/components/fields/formula/ReadView.d.ts +0 -1
  61. package/dist/components/fields/formula/ReadView.js +7 -5
  62. package/dist/components/fields/hooks/useViewClass.js +4 -2
  63. package/dist/components/fields/hyper-link/ReadView.d.ts +0 -1
  64. package/dist/components/fields/hyper-link/ReadView.js +8 -6
  65. package/dist/components/fields/hyper-link/style/index.js +18 -15
  66. package/dist/components/fields/item-group/ReadView.d.ts +0 -1
  67. package/dist/components/fields/item-group/ReadView.js +6 -4
  68. package/dist/components/fields/item-type/ItemTypeIcon.js +15 -17
  69. package/dist/components/fields/item-type/ReadView.d.ts +0 -1
  70. package/dist/components/fields/item-type/ReadView.js +7 -5
  71. package/dist/components/fields/item-type/style/index.js +7 -5
  72. package/dist/components/fields/key/ReadView.d.ts +0 -1
  73. package/dist/components/fields/key/ReadView.js +7 -5
  74. package/dist/components/fields/long-text/ReadView.d.ts +0 -1
  75. package/dist/components/fields/long-text/ReadView.js +8 -6
  76. package/dist/components/fields/long-text/style/index.js +7 -5
  77. package/dist/components/fields/number/BaseField.js +5 -2
  78. package/dist/components/fields/number/ReadView.d.ts +0 -1
  79. package/dist/components/fields/number/ReadView.js +8 -6
  80. package/dist/components/fields/priority/ReadView.js +12 -10
  81. package/dist/components/fields/priority/style/index.js +53 -50
  82. package/dist/components/fields/radio/ReadView.d.ts +0 -1
  83. package/dist/components/fields/radio/ReadView.js +8 -6
  84. package/dist/components/fields/repo-files/ReadView.js +8 -6
  85. package/dist/components/fields/repo-files/utils.js +5 -3
  86. package/dist/components/fields/reporter/ReadView.d.ts +0 -1
  87. package/dist/components/fields/reporter/ReadView.js +11 -9
  88. package/dist/components/fields/script/BaseField.js +4 -1
  89. package/dist/components/fields/script/ReadView.d.ts +0 -1
  90. package/dist/components/fields/script/ReadView.js +10 -8
  91. package/dist/components/fields/sprint/ReadView.js +7 -5
  92. package/dist/components/fields/status/Cell.js +8 -6
  93. package/dist/components/fields/status/Field.d.ts +0 -1
  94. package/dist/components/fields/status/ReadView.js +10 -8
  95. package/dist/components/fields/status/SelectFlowHandler.js +15 -12
  96. package/dist/components/fields/status/SelectTransition.js +13 -10
  97. package/dist/components/fields/status/Transition.js +18 -15
  98. package/dist/components/fields/status/TransitionButton.js +17 -14
  99. package/dist/components/fields/status/TransitionPanel.js +14 -11
  100. package/dist/components/fields/status/View.js +11 -8
  101. package/dist/components/fields/status/style/index.js +300 -323
  102. package/dist/components/fields/story-point/ReadView.d.ts +0 -1
  103. package/dist/components/fields/story-point/ReadView.js +6 -4
  104. package/dist/components/fields/tag/ReadView.js +10 -8
  105. package/dist/components/fields/tag/style/index.js +7 -5
  106. package/dist/components/fields/team/ReadView.js +10 -8
  107. package/dist/components/fields/team/style/index.js +5 -3
  108. package/dist/components/fields/text/BaseField.d.ts +0 -1
  109. package/dist/components/fields/text/ReadView.js +8 -6
  110. package/dist/components/fields/tree/ReadView.js +10 -8
  111. package/dist/components/fields/tree/utils.js +5 -3
  112. package/dist/components/fields/updated-at/ReadView.js +10 -8
  113. package/dist/components/fields/updated-by/ReadView.d.ts +0 -1
  114. package/dist/components/fields/updated-by/ReadView.js +11 -9
  115. package/dist/components/fields/user/ReadView.d.ts +0 -1
  116. package/dist/components/fields/user/ReadView.js +11 -9
  117. package/dist/components/fields/user/style/index.js +12 -9
  118. package/dist/components/fields/user-group/BaseField.d.ts +0 -1
  119. package/dist/components/fields/user-group/ReadView.js +11 -13
  120. package/dist/components/fields/version/ReadView.js +8 -6
  121. package/dist/components/fields/workspace/ReadView.d.ts +0 -1
  122. package/dist/components/fields/workspace/ReadView.js +10 -8
  123. package/dist/components/filters/filter-search/utils.js +6 -6
  124. package/dist/components/item/hooks.js +5 -2
  125. package/dist/components/table-components/EditTableCell.d.ts +1 -0
  126. package/dist/components/table-components/EditTableCell.js +38 -16
  127. package/dist/components/table-components/index.js +14 -11
  128. package/dist/components/table-components/style/index.js +7 -5
  129. package/dist/components/table-components/utils.js +49 -46
  130. package/dist/icons/SyncIconFont.js +7 -5
  131. package/dist/icons/createFromIconFontClass.js +3 -1
  132. package/dist/icons/empty-icon/index.d.ts +8 -1
  133. package/dist/icons/empty-icon/large-item@2x.png.js +3 -0
  134. package/dist/icons/empty-icon/large-workspace@2x.png.js +3 -0
  135. package/dist/icons/empty-icon/small-default@2x.png.js +3 -0
  136. package/dist/icons/empty-icon/workspace-empty.svg +126 -126
  137. package/dist/icons/index.d.ts +1 -1
  138. package/dist/icons/index.js +37 -35
  139. package/dist/icons/style/index.js +23 -21
  140. package/dist/icons/svg/ArrowBack.svg.js +3 -0
  141. package/dist/icons/svg/Done.svg.js +3 -0
  142. package/dist/icons/svg/DottedCircle.svg.js +3 -0
  143. package/dist/icons/svg/HollowCircle.svg.js +3 -0
  144. package/dist/icons/svg/Search.svg.js +3 -0
  145. package/dist/icons/svg/Workflow.svg.js +3 -0
  146. package/dist/index.js +47 -47
  147. package/dist/lib/app/utils.d.ts +0 -1
  148. package/dist/lib/app/utils.js +4 -2
  149. package/dist/lib/array.js +5 -44
  150. package/dist/lib/config.js +8 -6
  151. package/dist/lib/constants/code.js +3 -1
  152. package/dist/lib/constants/field.js +5 -2
  153. package/dist/lib/contexts/antdConfig.js +10 -7
  154. package/dist/lib/contexts/currentUser.js +7 -4
  155. package/dist/lib/contexts/currentWorkspace.js +7 -4
  156. package/dist/lib/contexts/datetimeFormat.js +7 -4
  157. package/dist/lib/contexts/index.js +16 -13
  158. package/dist/lib/contexts/itemConfig.js +7 -4
  159. package/dist/lib/contexts/teamConfig.js +8 -5
  160. package/dist/lib/contexts/tenant.js +7 -4
  161. package/dist/lib/contexts/workflowConfig.js +7 -4
  162. package/dist/lib/dataType.js +4 -5
  163. package/dist/lib/date.js +11 -52
  164. package/dist/lib/dayjs.js +2 -1
  165. package/dist/lib/error/log.js +7 -4
  166. package/dist/lib/error/utils.d.ts +1 -1
  167. package/dist/lib/error/utils.js +8 -20
  168. package/dist/lib/error/withServerError.js +3 -1
  169. package/dist/lib/fetch.js +23 -54
  170. package/dist/lib/global.js +16 -14
  171. package/dist/lib/hooks/useAntdConfig.js +4 -2
  172. package/dist/lib/hooks/useCurrentUser.js +4 -2
  173. package/dist/lib/hooks/useCurrentWorkspace.js +4 -2
  174. package/dist/lib/hooks/useDataQuoteStore.js +8 -5
  175. package/dist/lib/hooks/useDateTimeFormatType.js +4 -2
  176. package/dist/lib/hooks/useI18n.d.ts +1 -1
  177. package/dist/lib/hooks/useI18n.js +4 -2
  178. package/dist/lib/hooks/useItemConfig.js +4 -2
  179. package/dist/lib/hooks/useTeamConfig.js +4 -2
  180. package/dist/lib/hooks/useTenant.js +4 -2
  181. package/dist/lib/hooks/useWorkflowConfig.js +4 -2
  182. package/dist/lib/i18n.js +6 -3
  183. package/dist/lib/icons/utils.js +10 -9
  184. package/dist/lib/isInOne.js +2 -1
  185. package/dist/lib/number.js +3 -1
  186. package/dist/lib/path.d.ts +2 -2
  187. package/dist/lib/path.js +9 -6
  188. package/dist/lib/regExp.js +3 -1
  189. package/dist/lib/router.js +4 -1
  190. package/dist/lib/storage.js +4 -39
  191. package/dist/lib/store/dataQuoteStore.js +5 -2
  192. package/dist/lib/swr/constants.js +4 -2
  193. package/dist/lib/swr/hooks.js +6 -3
  194. package/dist/lib/swr/throttleWithCache.js +7 -5
  195. package/dist/lib/throttleFetch.js +4 -2
  196. package/dist/lib/useConfig.js +9 -6
  197. package/dist/lib/useUser.js +9 -6
  198. package/dist/lib/users.js +5 -2
  199. package/dist/lib/workflow.js +21 -20
  200. package/dist/locales/index.js +5 -3
  201. package/dist/public/icons/BulbIcon.svg +1 -1
  202. package/dist/public/icons/Cloud.svg +1 -1
  203. package/dist/public/icons/ConsultIcon.svg +1 -1
  204. package/dist/public/icons/Demo.svg +1 -1
  205. package/dist/public/icons/ErrorTemplate.svg +1 -1
  206. package/dist/public/icons/Fail.svg +1 -1
  207. package/dist/public/icons/Flag.svg +1 -1
  208. package/dist/public/icons/GiteeIcon.svg +1 -1
  209. package/dist/public/icons/IntelligenceGradient.svg +1 -1
  210. package/dist/public/icons/Issue_Approval.svg +1 -1
  211. package/dist/public/icons/Issue_Bug.svg +1 -1
  212. package/dist/public/icons/Issue_Demand.svg +1 -1
  213. package/dist/public/icons/Issue_Doc.svg +1 -1
  214. package/dist/public/icons/Issue_Idea.svg +1 -1
  215. package/dist/public/icons/Issue_List.svg +1 -1
  216. package/dist/public/icons/Issue_Plan.svg +1 -1
  217. package/dist/public/icons/Issue_Product.svg +1 -1
  218. package/dist/public/icons/Issue_Risk.svg +1 -1
  219. package/dist/public/icons/Issue_Story.svg +1 -1
  220. package/dist/public/icons/Issue_Subtask.svg +1 -1
  221. package/dist/public/icons/Issue_Task.svg +1 -1
  222. package/dist/public/icons/Issue_Test.svg +1 -1
  223. package/dist/public/icons/Issue_TestExcution.svg +1 -1
  224. package/dist/public/icons/Issue_TestPlan.svg +1 -1
  225. package/dist/public/icons/Issue_Time.svg +1 -1
  226. package/dist/public/icons/Issue_develop.svg +1 -1
  227. package/dist/public/icons/KanbanCover.svg +7 -7
  228. package/dist/public/icons/ListCover.svg +117 -117
  229. package/dist/public/icons/ManHour.svg +1 -1
  230. package/dist/public/icons/MobileIcon.svg +1 -1
  231. package/dist/public/icons/NoItemType.svg +10 -10
  232. package/dist/public/icons/ProductIcon.svg +1 -1
  233. package/dist/public/icons/RedFlagIcon.svg +1 -1
  234. package/dist/public/icons/Safe.svg +1 -1
  235. package/dist/public/icons/StarIcon.svg +60 -60
  236. package/dist/public/icons/StructureCover.svg +1 -1
  237. package/dist/public/icons/Success.svg +1 -1
  238. package/dist/public/icons/TeamIcon.svg +1 -1
  239. package/dist/public/icons/WebIcon.svg +1 -1
  240. package/dist/public/icons/iconfont.svg +467 -467
  241. package/dist/public/icons/iconfont_single_color.css +912 -912
  242. package/dist/public/mockServiceWorker.js +284 -284
  243. package/dist/style/common.js +11 -24
  244. package/dist/style/global.js +9 -7
  245. package/package.json +111 -105
  246. package/dist/components/fields/base-component/types.js +0 -1
  247. package/dist/components/fields/hooks/useParamsAdapter.js +0 -1
  248. package/dist/components/fields/radio/BaseField.js +0 -1
  249. package/dist/components/fields/status/Field.js +0 -1
  250. package/dist/components/fields/tag/BaseField.js +0 -1
  251. package/dist/components/fields/text/BaseField.js +0 -1
  252. package/dist/components/fields/tree/BaseField.js +0 -1
  253. package/dist/components/fields/tree/types.js +0 -1
  254. package/dist/components/fields/types.js +0 -1
  255. package/dist/components/fields/user-group/ActionCell.js +0 -1
  256. package/dist/components/fields/user-group/BaseField.js +0 -1
  257. package/dist/icons/empty-icon/index.js +0 -8
  258. package/dist/icons/svg/ArrowBack.svg +0 -1
  259. package/dist/icons/svg/Done.svg +0 -1
  260. package/dist/icons/svg/DottedCircle.svg +0 -7
  261. package/dist/icons/svg/HollowCircle.svg +0 -6
  262. package/dist/icons/svg/Search.svg +0 -1
  263. package/dist/icons/svg/Workflow.svg +0 -12
  264. package/dist/lib/error/index.js +0 -2
@@ -1,11 +1,12 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
1
+ import { jsx, Fragment } from '@emotion/react/jsx-runtime';
2
2
  import { memo, useMemo } from 'react';
3
3
  import { css } from '@emotion/react';
4
- import { Tag as AntdTag } from 'antd';
4
+ import { Tag } from 'antd';
5
5
  import { isObject } from 'lodash-es';
6
- import EmptyField from '../../common/EmptyField';
7
- import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
8
- import { baseTagStyle } from './style';
6
+ import EmptyField from '../../common/EmptyField.js';
7
+ import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
8
+ import { baseTagStyle } from './style/index.js';
9
+
9
10
  const TagReadView = memo(({ value }) => {
10
11
  const tags = useMemo(() => {
11
12
  return Array.isArray(value)
@@ -14,8 +15,9 @@ const TagReadView = memo(({ value }) => {
14
15
  })
15
16
  : [];
16
17
  }, [value]);
17
- const content = useMemo(() => tags.length ? (tags.map(item => (_jsx(AntdTag, { css: css(baseTagStyle), children: _jsx(BaseOverflowTooltip, { title: item, children: item }) }, item)))) : (_jsx(EmptyField, { readonly: true })), [tags]);
18
- return _jsx(_Fragment, { children: content });
18
+ const content = useMemo(() => tags.length ? (tags.map(item => (jsx(Tag, { css: css(baseTagStyle), children: jsx(BaseOverflowTooltip, { title: item, children: item }) }, item)))) : (jsx(EmptyField, { readonly: true })), [tags]);
19
+ return jsx(Fragment, { children: content });
19
20
  });
20
21
  TagReadView.displayName = 'TagReadView';
21
- export default TagReadView;
22
+
23
+ export { TagReadView as default };
@@ -1,6 +1,8 @@
1
- export const baseTagStyle = `
2
- max-width: 6em;
3
- height: 22px;
4
- white-space: normal;
5
- vertical-align: middle;
1
+ const baseTagStyle = `
2
+ max-width: 6em;
3
+ height: 22px;
4
+ white-space: normal;
5
+ vertical-align: middle;
6
6
  `;
7
+
8
+ export { baseTagStyle };
@@ -1,18 +1,20 @@
1
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from '@emotion/react/jsx-runtime';
2
2
  import { memo } from 'react';
3
3
  import { css } from '@emotion/react';
4
- import useCurrentWorkspace from '../../../lib/hooks/useCurrentWorkspace';
5
- import { i18n } from '../../../lib/i18n';
6
- import EmptyField from '../../common/EmptyField';
7
- import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
8
- import { deletedStyle, forbiddenStyle } from './style';
4
+ import useCurrentWorkspace from '../../../lib/hooks/useCurrentWorkspace.js';
5
+ import { i18n } from '../../../lib/i18n.js';
6
+ import EmptyField from '../../common/EmptyField.js';
7
+ import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
8
+ import { forbiddenStyle, deletedStyle } from './style/index.js';
9
+
9
10
  const TeamReadView = memo(({ value, readonly }) => {
10
11
  var _a;
11
12
  const hasName = value === null || value === void 0 ? void 0 : value.every(team => team.name);
12
13
  const deleted = value === null || value === void 0 ? void 0 : value.every(team => team.deleted);
13
14
  const forbidden = value === null || value === void 0 ? void 0 : value.every(team => !team.enable);
14
15
  const { workspaceKey } = useCurrentWorkspace();
15
- return (value === null || value === void 0 ? void 0 : value.length) ? (hasName ? (_jsx(BaseOverflowTooltip, { css: forbidden ? css(forbiddenStyle) : undefined, children: (_a = value === null || value === void 0 ? void 0 : value.map(team => (team.enable ? team.name : `${team.name}(${i18n.t('global.columns.forbiddenActive')})`))) === null || _a === void 0 ? void 0 : _a.join(',') })) : deleted ? (_jsx(BaseOverflowTooltip, { css: css(deletedStyle), children: i18n.t('global.haveDelete') })) : null) : (_jsx(EmptyField, { readonly: readonly || !workspaceKey }));
16
+ return (value === null || value === void 0 ? void 0 : value.length) ? (hasName ? (jsx(BaseOverflowTooltip, { css: forbidden ? css(forbiddenStyle) : undefined, children: (_a = value === null || value === void 0 ? void 0 : value.map(team => (team.enable ? team.name : `${team.name}(${i18n.t('global.columns.forbiddenActive')})`))) === null || _a === void 0 ? void 0 : _a.join(',') })) : deleted ? (jsx(BaseOverflowTooltip, { css: css(deletedStyle), children: i18n.t('global.haveDelete') })) : null) : (jsx(EmptyField, { readonly: readonly || !workspaceKey }));
16
17
  });
17
18
  TeamReadView.displayName = 'TeamReadView';
18
- export default TeamReadView;
19
+
20
+ export { TeamReadView as default };
@@ -1,4 +1,6 @@
1
- export const forbiddenStyle = `
2
- text-decoration: line-through;
1
+ const forbiddenStyle = `
2
+ text-decoration: line-through;
3
3
  `;
4
- export const deletedStyle = forbiddenStyle;
4
+ const deletedStyle = forbiddenStyle;
5
+
6
+ export { deletedStyle, forbiddenStyle };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { InputProps } from 'antd';
3
2
  import type { FieldProps } from '../base-component/types';
4
3
  export type BaseFieldProps = InputProps & FieldProps & {
@@ -1,7 +1,8 @@
1
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from '@emotion/react/jsx-runtime';
2
2
  import { memo, useMemo } from 'react';
3
- import EmptyField from '../../common/EmptyField';
4
- import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
3
+ import EmptyField from '../../common/EmptyField.js';
4
+ import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
5
+
5
6
  const TextReadView = memo(({ value: propsValue = '', addonBefore = '', addonAfter = '', readonly }) => {
6
7
  const showValue = useMemo(() => {
7
8
  if (propsValue) {
@@ -10,9 +11,10 @@ const TextReadView = memo(({ value: propsValue = '', addonBefore = '', addonAfte
10
11
  return '';
11
12
  }, [propsValue, addonBefore, addonAfter]);
12
13
  if (!showValue) {
13
- return _jsx(EmptyField, { readonly: readonly });
14
+ return jsx(EmptyField, { readonly: readonly });
14
15
  }
15
- return _jsx(BaseOverflowTooltip, { title: showValue, children: showValue });
16
+ return jsx(BaseOverflowTooltip, { title: showValue, children: showValue });
16
17
  });
17
18
  TextReadView.displayName = 'TextReadView';
18
- export default TextReadView;
19
+
20
+ export { TextReadView as default };
@@ -1,9 +1,10 @@
1
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
- import { memo, useEffect, useMemo, useState } from 'react';
1
+ import { jsx } from '@emotion/react/jsx-runtime';
2
+ import { memo, useState, useMemo, useEffect } from 'react';
3
3
  import { cloneDeep } from 'lodash-es';
4
- import EmptyField from '../../common/EmptyField';
5
- import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
6
- import { toFlatten, toTree } from './utils';
4
+ import EmptyField from '../../common/EmptyField.js';
5
+ import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
6
+ import { toTree, toFlatten } from './utils.js';
7
+
7
8
  const TreeReadView = memo(({ value: propsValue, options: originalOptions, multiple, readonly, showParentPath }) => {
8
9
  const [value, setValue] = useState(null);
9
10
  const { options, optionList } = useMemo(() => {
@@ -50,9 +51,10 @@ const TreeReadView = memo(({ value: propsValue, options: originalOptions, multip
50
51
  return showValue;
51
52
  }, [value, multiple, optionList]);
52
53
  if (!showValue) {
53
- return _jsx(EmptyField, { readonly: readonly });
54
+ return jsx(EmptyField, { readonly: readonly });
54
55
  }
55
- return _jsx(BaseOverflowTooltip, { title: showValue, children: showValue });
56
+ return jsx(BaseOverflowTooltip, { title: showValue, children: showValue });
56
57
  });
57
58
  TreeReadView.displayName = 'TreeReadView';
58
- export default TreeReadView;
59
+
60
+ export { TreeReadView as default };
@@ -1,4 +1,4 @@
1
- export const titleDelimiter = '/';
1
+ const titleDelimiter = '/';
2
2
  const addFullTitle = (showParentPath, tree, parentTitle) => {
3
3
  if (!tree)
4
4
  return;
@@ -17,7 +17,7 @@ const addFullTitle = (showParentPath, tree, parentTitle) => {
17
17
  addFullTitle(showParentPath, item.children, nextTitle);
18
18
  }
19
19
  };
20
- export const toTree = (data, showParentPath = false) => {
20
+ const toTree = (data, showParentPath = false) => {
21
21
  const temp = {};
22
22
  const tree = [];
23
23
  for (const i in data) {
@@ -37,6 +37,8 @@ export const toTree = (data, showParentPath = false) => {
37
37
  addFullTitle(showParentPath, tree);
38
38
  return tree;
39
39
  };
40
- export const toFlatten = (data) => {
40
+ const toFlatten = (data) => {
41
41
  return data.reduce((arr, { id, title, parentId, value, label, fullTitle, children = [] }) => arr.concat([{ id, title, parentId, value, label, fullTitle }], toFlatten(children)), []);
42
42
  };
43
+
44
+ export { titleDelimiter, toFlatten, toTree };
@@ -1,9 +1,10 @@
1
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from '@emotion/react/jsx-runtime';
2
2
  import { memo, useMemo } from 'react';
3
- import useDateTimeFormatType from '../../../lib/hooks/useDateTimeFormatType';
4
- import EmptyField from '../../common/EmptyField';
5
- import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
6
- import { dateFormat } from '../../common/utils';
3
+ import useDateTimeFormatType from '../../../lib/hooks/useDateTimeFormatType.js';
4
+ import EmptyField from '../../common/EmptyField.js';
5
+ import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
6
+ import { dateFormat } from '../../common/utils.js';
7
+
7
8
  const UpdatedAtReadView = memo(({ value }) => {
8
9
  const dateFormatType = useDateTimeFormatType();
9
10
  const showValue = useMemo(() => {
@@ -13,9 +14,10 @@ const UpdatedAtReadView = memo(({ value }) => {
13
14
  return '';
14
15
  }, [value, dateFormatType]);
15
16
  if (!showValue) {
16
- return _jsx(EmptyField, { readonly: true });
17
+ return jsx(EmptyField, { readonly: true });
17
18
  }
18
- return _jsx(BaseOverflowTooltip, { title: showValue, children: showValue });
19
+ return jsx(BaseOverflowTooltip, { title: showValue, children: showValue });
19
20
  });
20
21
  UpdatedAtReadView.displayName = 'UpdatedAtReadView';
21
- export default UpdatedAtReadView;
22
+
23
+ export { UpdatedAtReadView as default };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { User as UserTyped } from '../../../lib/types/models';
3
2
  declare const UpdatedByReadView: import("react").MemoExoticComponent<({ value }: {
4
3
  value: UserTyped;
@@ -1,11 +1,12 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
1
+ import { jsx, jsxs } from '@emotion/react/jsx-runtime';
2
2
  import { memo, useMemo } from 'react';
3
3
  import { ClassNames } from '@emotion/react';
4
- import { generateUserDisplayName, isUserDeleted, isUserDisabled } from '../../../lib/useUser';
5
- import EmptyField from '../../common/EmptyField';
6
- import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
7
- import UserAvatar from '../../common/user-field/UserAvatar';
8
- import { userDeletedStyle, userDisabledStyle, usernameStyle } from '../user/style';
4
+ import { generateUserDisplayName, isUserDeleted, isUserDisabled } from '../../../lib/useUser.js';
5
+ import EmptyField from '../../common/EmptyField.js';
6
+ import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
7
+ import UserAvatar from '../../common/user-field/UserAvatar.js';
8
+ import { usernameStyle, userDeletedStyle, userDisabledStyle } from '../user/style/index.js';
9
+
9
10
  const UpdatedByReadView = memo(({ value }) => {
10
11
  const showValue = useMemo(() => {
11
12
  if (value) {
@@ -14,9 +15,10 @@ const UpdatedByReadView = memo(({ value }) => {
14
15
  return '';
15
16
  }, [value]);
16
17
  if (!showValue) {
17
- return _jsx(EmptyField, { readonly: true });
18
+ return jsx(EmptyField, { readonly: true });
18
19
  }
19
- return (_jsx(ClassNames, { children: ({ cx, css }) => (_jsxs(BaseOverflowTooltip, { title: showValue, maxline: 1, children: [_jsx(UserAvatar, { user: value }), _jsx("span", { className: cx(css(usernameStyle), isUserDeleted(value) ? css(userDeletedStyle) : '', isUserDisabled(value) ? css(userDisabledStyle) : ''), children: showValue })] })) }));
20
+ return (jsx(ClassNames, { children: ({ cx, css }) => (jsxs(BaseOverflowTooltip, { title: showValue, maxline: 1, children: [jsx(UserAvatar, { user: value }), jsx("span", { className: cx(css(usernameStyle), isUserDeleted(value) ? css(userDeletedStyle) : '', isUserDisabled(value) ? css(userDisabledStyle) : ''), children: showValue })] })) }));
20
21
  });
21
22
  UpdatedByReadView.displayName = 'UpdatedByReadView';
22
- export default UpdatedByReadView;
23
+
24
+ export { UpdatedByReadView as default };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { BaseUserProps } from './types';
3
2
  declare const UserReadView: React.FC<Pick<BaseUserProps, 'value' | 'readonly'>>;
4
3
  export default UserReadView;
@@ -1,16 +1,17 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
1
+ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
2
2
  import { memo, useMemo } from 'react';
3
3
  import { ClassNames } from '@emotion/react';
4
- import { generateUserDisplayName, isUserDeleted, isUserDisabled, userDataFormat } from '../../../lib/useUser';
5
- import EmptyField from '../../common/EmptyField';
6
- import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
7
- import { userDeletedStyle, userDisabledStyle } from '../user/style';
4
+ import { userDataFormat, isUserDeleted, isUserDisabled, generateUserDisplayName } from '../../../lib/useUser.js';
5
+ import EmptyField from '../../common/EmptyField.js';
6
+ import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
7
+ import { userDeletedStyle, userDisabledStyle } from './style/index.js';
8
+
8
9
  const EMPTY_ARRAY = [];
9
10
  const UserReadView = memo(({ value, readonly }) => {
10
11
  const displayValues = useMemo(() => {
11
12
  return ((value === null || value === void 0 ? void 0 : value.map((val, i) => {
12
13
  const item = userDataFormat(val);
13
- return (_jsxs("span", { children: [i ? ',' : '', _jsx(ClassNames, { children: ({ cx, css }) => (_jsx("span", { className: cx({ [css(userDeletedStyle)]: isUserDeleted(item) }, { [css(userDisabledStyle)]: isUserDisabled(item) }), children: generateUserDisplayName(item) })) })] }, i));
14
+ return (jsxs("span", { children: [i ? ',' : '', jsx(ClassNames, { children: ({ cx, css }) => (jsx("span", { className: cx({ [css(userDeletedStyle)]: isUserDeleted(item) }, { [css(userDisabledStyle)]: isUserDisabled(item) }), children: generateUserDisplayName(item) })) })] }, i));
14
15
  })) || EMPTY_ARRAY);
15
16
  }, [value]);
16
17
  const tooltipValues = useMemo(() => {
@@ -20,9 +21,10 @@ const UserReadView = memo(({ value, readonly }) => {
20
21
  });
21
22
  }, [value]);
22
23
  if (!displayValues.length) {
23
- return _jsx(EmptyField, { readonly: readonly, isUser: true });
24
+ return jsx(EmptyField, { readonly: readonly, isUser: true });
24
25
  }
25
- return (_jsx(BaseOverflowTooltip, { title: tooltipValues.join(','), maxline: 1, children: displayValues }));
26
+ return (jsx(BaseOverflowTooltip, { title: tooltipValues.join(','), maxline: 1, children: displayValues }));
26
27
  });
27
28
  UserReadView.displayName = 'UserReadView';
28
- export default UserReadView;
29
+
30
+ export { UserReadView as default };
@@ -1,12 +1,15 @@
1
- import { gray6, gray9 } from '../../../../style/common';
2
- export const userDisabledStyle = `
3
- color: ${gray6};
1
+ import { gray6, gray9 } from '../../../../style/common.js';
2
+
3
+ const userDisabledStyle = `
4
+ color: ${gray6};
4
5
  `;
5
- export const userDeletedStyle = `
6
- text-decoration: line-through;
6
+ const userDeletedStyle = `
7
+ text-decoration: line-through;
7
8
  `;
8
- export const usernameStyle = `
9
- font-size: 14px;
10
- line-height: 20px;
11
- color: ${gray9};
9
+ const usernameStyle = `
10
+ font-size: 14px;
11
+ line-height: 20px;
12
+ color: ${gray9};
12
13
  `;
14
+
15
+ export { userDeletedStyle, userDisabledStyle, usernameStyle };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type SelectProps } from 'antd';
3
2
  import { FieldProps } from '../base-component/types';
4
3
  import { IParams } from '../hooks/useParamsAdapter';
@@ -1,13 +1,10 @@
1
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
- import { useEffect, useMemo, useState } from 'react';
3
- import { isNil, isObject } from 'lodash-es';
4
- import EmptyField from '../../common/EmptyField';
5
- import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
6
- import { handleValue } from '../dropdown/BaseField';
7
- export const isNilFilter = function (value) {
8
- var _a;
9
- return (_a = value === null || value === void 0 ? void 0 : value.filter) === null || _a === void 0 ? void 0 : _a.call(value, val => !isNil(val));
10
- };
1
+ import { jsx } from '@emotion/react/jsx-runtime';
2
+ import { useState, useEffect, useMemo } from 'react';
3
+ import { isObject } from 'lodash-es';
4
+ import EmptyField from '../../common/EmptyField.js';
5
+ import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
6
+ import { handleValue } from '../dropdown/BaseField.js';
7
+
11
8
  const UserGroupReadView = props => {
12
9
  const { value: propsValue, options, mode, readonly } = props;
13
10
  const [value, setValue] = useState([]);
@@ -49,9 +46,10 @@ const UserGroupReadView = props => {
49
46
  return showValue;
50
47
  }, [mode, value, options]);
51
48
  if (!showValue) {
52
- return _jsx(EmptyField, { readonly: readonly });
49
+ return jsx(EmptyField, { readonly: readonly });
53
50
  }
54
- return _jsx(BaseOverflowTooltip, { title: showValue, children: showValue });
51
+ return jsx(BaseOverflowTooltip, { title: showValue, children: showValue });
55
52
  };
56
53
  UserGroupReadView.displayName = 'UserGroupReadView';
57
- export default UserGroupReadView;
54
+
55
+ export { UserGroupReadView as default };
@@ -1,12 +1,14 @@
1
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from '@emotion/react/jsx-runtime';
2
2
  import { memo } from 'react';
3
- import useCurrentWorkspace from '../../../lib/hooks/useCurrentWorkspace';
4
- import EmptyField from '../../common/EmptyField';
5
- import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
3
+ import useCurrentWorkspace from '../../../lib/hooks/useCurrentWorkspace.js';
4
+ import EmptyField from '../../common/EmptyField.js';
5
+ import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
6
+
6
7
  const VersionReadView = memo(({ value, readonly }) => {
7
8
  var _a;
8
9
  const { workspaceKey } = useCurrentWorkspace();
9
- return (value === null || value === void 0 ? void 0 : value.length) ? (_jsx(BaseOverflowTooltip, { children: (_a = value === null || value === void 0 ? void 0 : value.map(version => version.name)) === null || _a === void 0 ? void 0 : _a.join(',') })) : (_jsx(EmptyField, { readonly: readonly || !workspaceKey }));
10
+ return (value === null || value === void 0 ? void 0 : value.length) ? (jsx(BaseOverflowTooltip, { children: (_a = value === null || value === void 0 ? void 0 : value.map(version => version.name)) === null || _a === void 0 ? void 0 : _a.join(',') })) : (jsx(EmptyField, { readonly: readonly || !workspaceKey }));
10
11
  });
11
12
  VersionReadView.displayName = 'VersionReadView';
12
- export default VersionReadView;
13
+
14
+ export { VersionReadView as default };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface WorkspaceReadViewProps {
3
2
  value?: {
4
3
  name?: string;
@@ -1,16 +1,18 @@
1
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from '@emotion/react/jsx-runtime';
2
2
  import { memo } from 'react';
3
3
  import { ClassNames } from '@emotion/react';
4
- import EmptyField from '../../common/EmptyField';
5
- import { getTooltipMaxlineStyle, tooltipOverflowStyle } from '../../common/overflow-tooltip/style';
6
- import { useToWorkspacePage } from '../bind-workspace/hooks';
7
- import { pointerStyle } from '../bind-workspace/style';
4
+ import EmptyField from '../../common/EmptyField.js';
5
+ import { tooltipOverflowStyle, getTooltipMaxlineStyle } from '../../common/overflow-tooltip/style/index.js';
6
+ import { useToWorkspacePage } from '../bind-workspace/hooks.js';
7
+ import { pointerStyle } from '../bind-workspace/style/index.js';
8
+
8
9
  const WorkspaceReadView = memo(({ value }) => {
9
10
  const { name, key } = value || {};
10
11
  const { toWorkspacePage } = useToWorkspacePage();
11
- return (_jsx(ClassNames, { children: ({ cx, css }) => {
12
- return name ? (_jsx("span", { className: cx(css(tooltipOverflowStyle), css(getTooltipMaxlineStyle(1)), css(pointerStyle)), title: name, onClick: () => toWorkspacePage(key), children: name })) : (_jsx(EmptyField, { readonly: true }));
12
+ return (jsx(ClassNames, { children: ({ cx, css }) => {
13
+ return name ? (jsx("span", { className: cx(css(tooltipOverflowStyle), css(getTooltipMaxlineStyle(1)), css(pointerStyle)), title: name, onClick: () => toWorkspacePage(key), children: name })) : (jsx(EmptyField, { readonly: true }));
13
14
  } }));
14
15
  });
15
16
  WorkspaceReadView.displayName = 'WorkspaceReadView';
16
- export default WorkspaceReadView;
17
+
18
+ export { WorkspaceReadView as default };
@@ -1,16 +1,14 @@
1
1
  import { pick } from 'lodash-es';
2
- import { getArrayValue } from 'lib/array';
3
- import { isDate } from 'lib/date';
2
+ import { getArrayValue } from '../../../lib/array.js';
3
+ import '../../../lib/date.js';
4
+
4
5
  const pickKey = {
5
6
  label: [],
6
7
  value: ['objectId', 'icon', 'key', 'icon', 'name', 'enable', 'deleted'],
7
8
  username: ['username', 'nickname', 'deleted', 'enabled'],
8
9
  key: ['icon', 'key', 'name', 'objectId'],
9
10
  };
10
- export const getValue = item => item.value || item.key || item.id || item.objectId;
11
- export const getLabel = item => item.label || item.name || item.value;
12
- export const getFieldCollectionRealValue = v => (isDate(v === null || v === void 0 ? void 0 : v.type) ? !!(v === null || v === void 0 ? void 0 : v.value) : !!(v === null || v === void 0 ? void 0 : v.expression) && !!(v === null || v === void 0 ? void 0 : v.value));
13
- export const getRealValueByIqlTo = (value, options, key) => {
11
+ const getRealValueByIqlTo = (value, options, key) => {
14
12
  if (!value || !options)
15
13
  return value;
16
14
  return getArrayValue(value)
@@ -26,3 +24,5 @@ export const getRealValueByIqlTo = (value, options, key) => {
26
24
  })
27
25
  .filter(Boolean);
28
26
  };
27
+
28
+ export { getRealValueByIqlTo };
@@ -1,5 +1,8 @@
1
- import { useFetchItemById } from '../../lib/swr/hooks';
2
- export const useItem = (itemId, detail) => {
1
+ import { useFetchItemById } from '../../lib/swr/hooks.js';
2
+
3
+ const useItem = (itemId, detail) => {
3
4
  const { data, mutate, isValidating } = useFetchItemById({ id: itemId, detail });
4
5
  return { itemData: data, mutate, isValidating };
5
6
  };
7
+
8
+ export { useItem };
@@ -10,6 +10,7 @@ export interface EditTableCellMappingProps {
10
10
  text?: any;
11
11
  data?: any;
12
12
  dataSource?: string;
13
+ type?: string;
13
14
  Component: React.FC<any>;
14
15
  handleChange?: (value: any) => void;
15
16
  }
@@ -1,18 +1,40 @@
1
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
- import { memo } from 'react';
1
+ import { jsx } from '@emotion/react/jsx-runtime';
2
+ import { memo, useMemo } from 'react';
3
3
  import { omit } from 'lodash-es';
4
- const EditTableCell = ({ overlayClsName, itemTypeId, workspaceId, readonly, id, objectId, property, text, Component, dataSource, handleChange, }) => {
5
- const commonProps = {
6
- overlayClsName,
7
- itemTypeId,
8
- workspaceId,
9
- readonly: !!readonly,
10
- itemId: id,
11
- objectId,
12
- value: text,
13
- dataSource,
14
- ...omit(property, 'defaultValue'),
15
- };
16
- return _jsx(Component, { ...commonProps, onChange: handleChange });
4
+ import { FIELD_TYPE_KEY_MAPPINGS } from '../../lib/global.js';
5
+
6
+ const EditTableCell = ({ overlayClsName, itemTypeId, workspaceId, readonly, id, objectId, property, text, Component, dataSource, data, type, handleChange, }) => {
7
+ const commonProps = useMemo(() => {
8
+ const commonProps = {
9
+ overlayClsName,
10
+ itemTypeId,
11
+ workspaceId,
12
+ readonly: !!readonly,
13
+ itemId: id,
14
+ objectId,
15
+ value: text,
16
+ dataSource,
17
+ ...omit(property, 'defaultValue'),
18
+ };
19
+ if ([
20
+ FIELD_TYPE_KEY_MAPPINGS.Dropdown,
21
+ FIELD_TYPE_KEY_MAPPINGS.Tree,
22
+ FIELD_TYPE_KEY_MAPPINGS.Checkbox,
23
+ FIELD_TYPE_KEY_MAPPINGS.Radio,
24
+ FIELD_TYPE_KEY_MAPPINGS.Priority,
25
+ FIELD_TYPE_KEY_MAPPINGS.UserGroup,
26
+ ].includes(type)) {
27
+ commonProps.options = (data === null || data === void 0 ? void 0 : data.customData) || [];
28
+ }
29
+ commonProps.userData = data || [];
30
+ if (type === FIELD_TYPE_KEY_MAPPINGS.LongText) {
31
+ commonProps.maxRows = 1;
32
+ commonProps.minRows = 1;
33
+ }
34
+ return commonProps;
35
+ }, [data, dataSource, id, itemTypeId, objectId, overlayClsName, property, readonly, text, type, workspaceId]);
36
+ return jsx(Component, { ...commonProps, onChange: handleChange });
17
37
  };
18
- export default memo(EditTableCell);
38
+ var EditTableCell$1 = memo(EditTableCell);
39
+
40
+ export { EditTableCell$1 as default };
@@ -1,8 +1,9 @@
1
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
- import { useCallback, useRef, useState } from 'react';
1
+ import { jsx } from '@emotion/react/jsx-runtime';
2
+ import { useState, useRef, useCallback } from 'react';
3
3
  import { isEmpty } from 'lodash-es';
4
- import EmptyField from '../common/EmptyField';
5
- import EditTableCell from './EditTableCell';
4
+ import EmptyField from '../common/EmptyField.js';
5
+ import EditTableCell from './EditTableCell.js';
6
+
6
7
  const reduceObjArr = ({ arr, keys }) => {
7
8
  return arr.reduce((accumulatorStr, nextObj) => {
8
9
  const nextValue = keys.length > 1 ? `${nextObj[keys[0]]}(${nextObj[keys[1]]})` : nextObj[keys[0]];
@@ -29,9 +30,9 @@ const transferItem = (item, readonly) => {
29
30
  else if ((_c = item[0]) === null || _c === void 0 ? void 0 : _c.value) {
30
31
  return reduceObjArr({ arr: item, keys: ['value'] });
31
32
  }
32
- return _jsx(EmptyField, { readonly: readonly });
33
+ return jsx(EmptyField, { readonly: readonly });
33
34
  }
34
- return _jsx(EmptyField, { readonly: readonly });
35
+ return jsx(EmptyField, { readonly: readonly });
35
36
  };
36
37
  const EMPTY_ARRAY = [];
37
38
  const defaultValue = {};
@@ -52,14 +53,16 @@ const BaseTableCell = ({ className, cellData, column, rowData, readComponents =
52
53
  }, [editComponents]);
53
54
  if (cellEntered && EditComponent) {
54
55
  const { property, data, objectId } = column;
55
- return (_jsx("div", { className: cls, children: _jsx(EditTableCell, { Component: EditComponent, workspaceId: (_a = rowData.workspace) === null || _a === void 0 ? void 0 : _a.objectId, itemTypeId: (_b = rowData.itemType) === null || _b === void 0 ? void 0 : _b.objectId, property: property, data: data, id: rowData.objectId, readonly: readonly, objectId: objectId, text: cellData, handleChange: handleChange, dataSource: column.dataSource }) }));
56
+ return (jsx("div", { className: cls, children: jsx(EditTableCell, { Component: EditComponent, workspaceId: (_a = rowData.workspace) === null || _a === void 0 ? void 0 : _a.objectId, itemTypeId: (_b = rowData.itemType) === null || _b === void 0 ? void 0 : _b.objectId, property: property, data: data, id: rowData.objectId, readonly: readonly, objectId: objectId, text: cellData, type: column.componentType, handleChange: handleChange, dataSource: column.dataSource }) }));
56
57
  }
57
58
  if (ReadComponent) {
58
- return (_jsx("div", { className: cls, onMouseOver: handleMouseOver, children: _jsx(ReadComponent, { readonly: readonly, value: cellData, ...column.property, userData: column.data, options: ((_c = column.data) === null || _c === void 0 ? void 0 : _c.customData) || EMPTY_ARRAY, itemValues: rowData, objectId: column.objectId, dataSource: column.dataSource }) }));
59
+ return (jsx("div", { className: cls, onMouseOver: handleMouseOver, children: jsx(ReadComponent, { readonly: readonly, value: cellData, ...column.property, userData: column.data, options: ((_c = column.data) === null || _c === void 0 ? void 0 : _c.customData) || EMPTY_ARRAY, itemValues: rowData, objectId: column.objectId, dataSource: column.dataSource }) }));
59
60
  }
60
61
  const text = transferItem(cellData !== null && cellData !== void 0 ? cellData : rowData[column.dataIndex], readonly);
61
- return _jsx("div", { className: cls, children: text });
62
+ return jsx("div", { className: cls, children: text });
62
63
  };
63
- export const TableCell = props => {
64
- return _jsx(BaseTableCell, { ...props });
64
+ const TableCell = props => {
65
+ return jsx(BaseTableCell, { ...props });
65
66
  };
67
+
68
+ export { TableCell };
@@ -1,6 +1,8 @@
1
- export const fieldCellGlobalStyle = `
2
- .field-cell-layout {
3
- align-items: center;
4
- width: 100%;
5
- }
1
+ const fieldCellGlobalStyle = `
2
+ .field-cell-layout {
3
+ align-items: center;
4
+ width: 100%;
5
+ }
6
6
  `;
7
+
8
+ export { fieldCellGlobalStyle };