@giteeteam/apps-team-components 1.3.0-alpha.1 → 1.3.0-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/common/EmptyField.d.ts +0 -1
- package/dist/components/common/EmptyField.js +7 -5
- package/dist/components/common/PriceTag.js +11 -8
- package/dist/components/common/expand-component/index.d.ts +0 -1
- package/dist/components/common/expand-component/index.js +12 -10
- package/dist/components/common/expand-component/style.js +4 -2
- package/dist/components/common/item-icon/ItemIcon.d.ts +0 -1
- package/dist/components/common/item-icon/ItemIcon.js +6 -4
- package/dist/components/common/overflow-tooltip/BaseOverflowTooltip.d.ts +0 -1
- package/dist/components/common/overflow-tooltip/BaseOverflowTooltip.js +9 -6
- package/dist/components/common/overflow-tooltip/OverflowTooltip.js +9 -6
- package/dist/components/common/overflow-tooltip/SimpleOverflowToolTip.js +8 -5
- package/dist/components/common/overflow-tooltip/style/index.js +5 -3
- package/dist/components/common/style/global.js +3 -1
- package/dist/components/common/style/mixin.js +6 -3
- package/dist/components/common/user-field/UserAvatar.js +8 -6
- package/dist/components/common/user-field/style/index.js +5 -3
- package/dist/components/common/utils.js +13 -9
- package/dist/components/default-empty-icon/config.js +11 -6
- package/dist/components/default-empty-icon/index.js +10 -9
- package/dist/components/default-empty-icon/style.js +15 -12
- package/dist/components/default-empty-icon/types.js +3 -1
- package/dist/components/field-behavior/fields/type.js +5 -2
- package/dist/components/fields/actors/BaseField.js +5 -2
- package/dist/components/fields/actors/ReadView.d.ts +0 -1
- package/dist/components/fields/actors/ReadView.js +8 -6
- package/dist/components/fields/ancestor/ReadView.js +8 -6
- package/dist/components/fields/ancestor/utils.js +4 -12
- package/dist/components/fields/assignee/ReadView.d.ts +0 -1
- package/dist/components/fields/assignee/ReadView.js +13 -11
- package/dist/components/fields/base-component/utils.js +3 -1
- package/dist/components/fields/bind-workspace/ReadView.d.ts +0 -1
- package/dist/components/fields/bind-workspace/ReadView.js +11 -9
- package/dist/components/fields/bind-workspace/hooks.js +7 -4
- package/dist/components/fields/bind-workspace/style/index.js +3 -1
- package/dist/components/fields/cascade/ReadView.js +8 -6
- package/dist/components/fields/cascade/utils.js +4 -3
- package/dist/components/fields/checkbox/ReadView.d.ts +0 -1
- package/dist/components/fields/checkbox/ReadView.js +7 -5
- package/dist/components/fields/created-at/ReadView.js +10 -8
- package/dist/components/fields/created-by/ReadView.d.ts +0 -1
- package/dist/components/fields/created-by/ReadView.js +11 -9
- package/dist/components/fields/data-quote/ReadView.js +12 -10
- package/dist/components/fields/data-quote/utils.js +5 -3
- package/dist/components/fields/date/ReadView.d.ts +0 -1
- package/dist/components/fields/date/ReadView.js +8 -6
- package/dist/components/fields/dropdown/BaseField.js +42 -40
- package/dist/components/fields/dropdown/Cell.d.ts +0 -1
- package/dist/components/fields/dropdown/Cell.js +6 -4
- package/dist/components/fields/dropdown/ReadView.d.ts +0 -1
- package/dist/components/fields/dropdown/ReadView.js +10 -8
- package/dist/components/fields/dropdown/data.d.ts +1 -1
- package/dist/components/fields/dropdown/data.js +6 -3
- package/dist/components/fields/dropdown/hook.d.ts +0 -1
- package/dist/components/fields/dropdown/hook.js +11 -8
- package/dist/components/fields/dropdown/style.js +21 -18
- package/dist/components/fields/file/ReadView.d.ts +0 -1
- package/dist/components/fields/file/ReadView.js +7 -5
- package/dist/components/fields/formula/ReadView.d.ts +0 -1
- package/dist/components/fields/formula/ReadView.js +7 -5
- package/dist/components/fields/hooks/useViewClass.js +4 -2
- package/dist/components/fields/hyper-link/ReadView.d.ts +0 -1
- package/dist/components/fields/hyper-link/ReadView.js +8 -6
- package/dist/components/fields/hyper-link/style/index.js +7 -4
- package/dist/components/fields/item-group/ReadView.d.ts +0 -1
- package/dist/components/fields/item-group/ReadView.js +6 -4
- package/dist/components/fields/item-type/ItemTypeIcon.js +15 -17
- package/dist/components/fields/item-type/ReadView.d.ts +0 -1
- package/dist/components/fields/item-type/ReadView.js +7 -5
- package/dist/components/fields/item-type/style/index.js +3 -1
- package/dist/components/fields/key/ReadView.d.ts +0 -1
- package/dist/components/fields/key/ReadView.js +7 -5
- package/dist/components/fields/long-text/ReadView.d.ts +0 -1
- package/dist/components/fields/long-text/ReadView.js +8 -6
- package/dist/components/fields/long-text/style/index.js +3 -1
- package/dist/components/fields/number/BaseField.js +5 -2
- package/dist/components/fields/number/ReadView.d.ts +0 -1
- package/dist/components/fields/number/ReadView.js +8 -6
- package/dist/components/fields/priority/ReadView.js +12 -10
- package/dist/components/fields/priority/style/index.js +11 -8
- package/dist/components/fields/radio/ReadView.d.ts +0 -1
- package/dist/components/fields/radio/ReadView.js +8 -6
- package/dist/components/fields/repo-files/ReadView.js +8 -6
- package/dist/components/fields/repo-files/utils.js +5 -3
- package/dist/components/fields/reporter/ReadView.d.ts +0 -1
- package/dist/components/fields/reporter/ReadView.js +11 -9
- package/dist/components/fields/script/BaseField.js +4 -1
- package/dist/components/fields/script/ReadView.d.ts +0 -1
- package/dist/components/fields/script/ReadView.js +10 -8
- package/dist/components/fields/sprint/ReadView.js +7 -5
- package/dist/components/fields/status/Cell.js +8 -6
- package/dist/components/fields/status/Field.d.ts +0 -1
- package/dist/components/fields/status/ReadView.js +10 -8
- package/dist/components/fields/status/SelectFlowHandler.js +15 -12
- package/dist/components/fields/status/SelectTransition.js +13 -10
- package/dist/components/fields/status/Transition.js +18 -15
- package/dist/components/fields/status/TransitionButton.js +17 -14
- package/dist/components/fields/status/TransitionPanel.js +14 -11
- package/dist/components/fields/status/View.js +11 -8
- package/dist/components/fields/status/style/index.js +36 -59
- package/dist/components/fields/story-point/ReadView.d.ts +0 -1
- package/dist/components/fields/story-point/ReadView.js +6 -4
- package/dist/components/fields/tag/ReadView.js +10 -8
- package/dist/components/fields/tag/style/index.js +3 -1
- package/dist/components/fields/team/ReadView.js +10 -8
- package/dist/components/fields/team/style/index.js +4 -2
- package/dist/components/fields/text/BaseField.d.ts +0 -1
- package/dist/components/fields/text/ReadView.js +8 -6
- package/dist/components/fields/tree/ReadView.js +10 -8
- package/dist/components/fields/tree/utils.js +5 -3
- package/dist/components/fields/updated-at/ReadView.js +10 -8
- package/dist/components/fields/updated-by/ReadView.d.ts +0 -1
- package/dist/components/fields/updated-by/ReadView.js +11 -9
- package/dist/components/fields/user/ReadView.d.ts +0 -1
- package/dist/components/fields/user/ReadView.js +11 -9
- package/dist/components/fields/user/style/index.js +7 -4
- package/dist/components/fields/user-group/BaseField.d.ts +0 -1
- package/dist/components/fields/user-group/ReadView.js +11 -13
- package/dist/components/fields/version/ReadView.js +8 -6
- package/dist/components/fields/workspace/ReadView.d.ts +0 -1
- package/dist/components/fields/workspace/ReadView.js +10 -8
- package/dist/components/filters/filter-search/utils.js +6 -6
- package/dist/components/item/hooks.js +5 -2
- package/dist/components/table-components/EditTableCell.js +6 -3
- package/dist/components/table-components/index.js +14 -11
- package/dist/components/table-components/style/index.js +3 -1
- package/dist/components/table-components/utils.js +49 -46
- package/dist/icons/SyncIconFont.js +7 -5
- package/dist/icons/createFromIconFontClass.js +3 -1
- package/dist/icons/empty-icon/index.d.ts +8 -1
- package/dist/icons/empty-icon/large-item@2x.png.js +3 -0
- package/dist/icons/empty-icon/large-workspace@2x.png.js +3 -0
- package/dist/icons/empty-icon/small-default@2x.png.js +3 -0
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +37 -35
- package/dist/icons/style/index.js +4 -2
- package/dist/icons/svg/ArrowBack.svg.js +3 -0
- package/dist/icons/svg/Done.svg.js +3 -0
- package/dist/icons/svg/DottedCircle.svg.js +3 -0
- package/dist/icons/svg/HollowCircle.svg.js +3 -0
- package/dist/icons/svg/Search.svg.js +3 -0
- package/dist/icons/svg/Workflow.svg.js +3 -0
- package/dist/index.js +47 -47
- package/dist/lib/app/utils.d.ts +0 -1
- package/dist/lib/app/utils.js +4 -2
- package/dist/lib/array.js +5 -44
- package/dist/lib/config.js +8 -6
- package/dist/lib/constants/code.js +3 -1
- package/dist/lib/constants/field.js +5 -2
- package/dist/lib/contexts/antdConfig.js +10 -7
- package/dist/lib/contexts/currentUser.js +7 -4
- package/dist/lib/contexts/currentWorkspace.js +7 -4
- package/dist/lib/contexts/datetimeFormat.js +7 -4
- package/dist/lib/contexts/index.js +16 -13
- package/dist/lib/contexts/itemConfig.js +7 -4
- package/dist/lib/contexts/teamConfig.js +8 -5
- package/dist/lib/contexts/tenant.js +7 -4
- package/dist/lib/contexts/workflowConfig.js +7 -4
- package/dist/lib/dataType.js +4 -5
- package/dist/lib/date.js +11 -52
- package/dist/lib/dayjs.js +2 -1
- package/dist/lib/error/log.js +7 -4
- package/dist/lib/error/utils.d.ts +1 -1
- package/dist/lib/error/utils.js +8 -20
- package/dist/lib/error/withServerError.js +3 -1
- package/dist/lib/fetch.js +23 -54
- package/dist/lib/global.js +16 -14
- package/dist/lib/hooks/useAntdConfig.js +4 -2
- package/dist/lib/hooks/useCurrentUser.js +4 -2
- package/dist/lib/hooks/useCurrentWorkspace.js +4 -2
- package/dist/lib/hooks/useDataQuoteStore.js +8 -5
- package/dist/lib/hooks/useDateTimeFormatType.js +4 -2
- package/dist/lib/hooks/useI18n.d.ts +1 -1
- package/dist/lib/hooks/useI18n.js +4 -2
- package/dist/lib/hooks/useItemConfig.js +4 -2
- package/dist/lib/hooks/useTeamConfig.js +4 -2
- package/dist/lib/hooks/useTenant.js +4 -2
- package/dist/lib/hooks/useWorkflowConfig.js +4 -2
- package/dist/lib/i18n.js +6 -3
- package/dist/lib/icons/utils.js +10 -9
- package/dist/lib/isInOne.js +2 -1
- package/dist/lib/number.js +3 -1
- package/dist/lib/path.d.ts +2 -2
- package/dist/lib/path.js +9 -6
- package/dist/lib/regExp.js +3 -1
- package/dist/lib/router.js +4 -1
- package/dist/lib/storage.js +4 -39
- package/dist/lib/store/dataQuoteStore.js +5 -2
- package/dist/lib/swr/constants.js +4 -2
- package/dist/lib/swr/hooks.js +6 -3
- package/dist/lib/swr/throttleWithCache.js +7 -5
- package/dist/lib/throttleFetch.js +4 -2
- package/dist/lib/useConfig.js +9 -6
- package/dist/lib/useUser.js +9 -6
- package/dist/lib/users.js +5 -2
- package/dist/lib/workflow.js +21 -20
- package/dist/locales/index.js +5 -3
- package/dist/style/common.js +11 -24
- package/dist/style/global.js +3 -1
- package/package.json +8 -2
- package/dist/components/fields/base-component/types.js +0 -1
- package/dist/components/fields/hooks/useParamsAdapter.js +0 -1
- package/dist/components/fields/radio/BaseField.js +0 -1
- package/dist/components/fields/status/Field.js +0 -1
- package/dist/components/fields/tag/BaseField.js +0 -1
- package/dist/components/fields/text/BaseField.js +0 -1
- package/dist/components/fields/tree/BaseField.js +0 -1
- package/dist/components/fields/tree/types.js +0 -1
- package/dist/components/fields/types.js +0 -1
- package/dist/components/fields/user-group/ActionCell.js +0 -1
- package/dist/components/fields/user-group/BaseField.js +0 -1
- package/dist/icons/empty-icon/index.js +0 -8
- package/dist/icons/svg/ArrowBack.svg +0 -1
- package/dist/icons/svg/Done.svg +0 -1
- package/dist/icons/svg/DottedCircle.svg +0 -7
- package/dist/icons/svg/HollowCircle.svg +0 -6
- package/dist/icons/svg/Search.svg +0 -1
- package/dist/icons/svg/Workflow.svg +0 -12
- package/dist/lib/error/index.js +0 -2
package/dist/icons/index.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import AntdIcon from '@ant-design/icons';
|
|
4
|
+
export { default } from '@ant-design/icons';
|
|
4
5
|
import { ClassNames } from '@emotion/react';
|
|
5
|
-
import useAntdConfig from 'lib/hooks/useAntdConfig';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { proximaSingleColor, rotateStyle } from './style';
|
|
13
|
-
import IconFont from './SyncIconFont';
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
import useAntdConfig from '../lib/hooks/useAntdConfig.js';
|
|
7
|
+
import img$3 from './svg/ArrowBack.svg.js';
|
|
8
|
+
import img$5 from './svg/Done.svg.js';
|
|
9
|
+
import img$1 from './svg/DottedCircle.svg.js';
|
|
10
|
+
import img from './svg/HollowCircle.svg.js';
|
|
11
|
+
import img$4 from './svg/Search.svg.js';
|
|
12
|
+
import img$2 from './svg/Workflow.svg.js';
|
|
13
|
+
import { proximaSingleColor, rotateStyle } from './style/index.js';
|
|
14
|
+
import IconFont from './SyncIconFont.js';
|
|
15
|
+
|
|
16
|
+
const ROTATE_ICONS = {
|
|
16
17
|
CollapseRight: {
|
|
17
18
|
originKey: 'CollapseLeft',
|
|
18
19
|
rotateClass: rotateStyle(180),
|
|
@@ -50,7 +51,7 @@ export const ROTATE_ICONS = {
|
|
|
50
51
|
rotateClass: rotateStyle(180),
|
|
51
52
|
},
|
|
52
53
|
};
|
|
53
|
-
|
|
54
|
+
const SIMPLE_COLOR_KEYS = [
|
|
54
55
|
'Add',
|
|
55
56
|
'AllItemBoard',
|
|
56
57
|
'Back',
|
|
@@ -231,7 +232,7 @@ export const SIMPLE_COLOR_KEYS = [
|
|
|
231
232
|
'Chart',
|
|
232
233
|
'Pagewidth',
|
|
233
234
|
];
|
|
234
|
-
|
|
235
|
+
const MULTI_COLOR_KEYS = [
|
|
235
236
|
'AddBlue',
|
|
236
237
|
'AddCircle',
|
|
237
238
|
'Alert_Warning',
|
|
@@ -278,43 +279,44 @@ export const MULTI_COLOR_KEYS = [
|
|
|
278
279
|
'ClearAll',
|
|
279
280
|
'AttachmentProducts',
|
|
280
281
|
];
|
|
281
|
-
|
|
282
|
-
return
|
|
282
|
+
const HollowCircleIcon = props => {
|
|
283
|
+
return jsx(AntdIcon, { ...props, component: img });
|
|
283
284
|
};
|
|
284
|
-
|
|
285
|
-
return
|
|
285
|
+
const WorkflowIcon = props => {
|
|
286
|
+
return jsx(AntdIcon, { ...props, style: { fontSize: 10, width: 10, marginLeft: 2 }, component: img$2 });
|
|
286
287
|
};
|
|
287
|
-
|
|
288
|
-
return
|
|
288
|
+
const DottedCircleIcon = props => {
|
|
289
|
+
return jsx(AntdIcon, { ...props, style: { fontSize: 10, width: 10, marginLeft: 2 }, component: img$1 });
|
|
289
290
|
};
|
|
290
|
-
|
|
291
|
-
return
|
|
291
|
+
const ArrowBackIcon = props => {
|
|
292
|
+
return jsx(AntdIcon, { ...props, style: { fontSize: 10, width: 10, marginLeft: 2 }, component: img$3 });
|
|
292
293
|
};
|
|
293
|
-
|
|
294
|
-
return
|
|
294
|
+
const SearchIcon = props => {
|
|
295
|
+
return jsx(AntdIcon, { ...props, style: { fontSize: 10, width: 10, marginLeft: 2 }, component: img$4 });
|
|
295
296
|
};
|
|
296
|
-
|
|
297
|
-
return
|
|
297
|
+
const DoneIcon = props => {
|
|
298
|
+
return jsx(AntdIcon, { ...props, style: { fontSize: 10, width: 10, marginLeft: 2 }, component: img$5 });
|
|
298
299
|
};
|
|
299
|
-
|
|
300
|
+
const CustomIconFont = React.memo(props => {
|
|
300
301
|
const { type, ...restProps } = props;
|
|
301
302
|
if (SIMPLE_COLOR_KEYS.includes(type)) {
|
|
302
|
-
return
|
|
303
|
+
return jsx(SingleColorIcon, { ...props, type: type });
|
|
303
304
|
}
|
|
304
|
-
return
|
|
305
|
+
return jsx(IconFont, { ...restProps, type: `icon-${type}` });
|
|
305
306
|
});
|
|
306
307
|
CustomIconFont.displayName = 'CustomIconFont';
|
|
307
|
-
|
|
308
|
+
const SingleColorIcon = ({ type, ...props }) => {
|
|
308
309
|
const { antPrefix } = useAntdConfig();
|
|
309
|
-
return (
|
|
310
|
+
return (jsx(ClassNames, { children: ({ css, cx }) => (jsx("i", { ...props, className: cx('icon', css(proximaSingleColor(antPrefix)), `proxima-single-color-${type}`, props.className) })) }));
|
|
310
311
|
};
|
|
311
|
-
|
|
312
|
-
export const Icons = [...MULTI_COLOR_KEYS, ...SIMPLE_COLOR_KEYS, ...Object.keys(ROTATE_ICONS)].reduce((res, key) => {
|
|
312
|
+
[...MULTI_COLOR_KEYS, ...SIMPLE_COLOR_KEYS, ...Object.keys(ROTATE_ICONS)].reduce((res, key) => {
|
|
313
313
|
res[key] = ({ className, ...props }) => {
|
|
314
|
-
return (
|
|
314
|
+
return (jsx(ClassNames, { children: ({ cx, css }) => {
|
|
315
315
|
var _a;
|
|
316
|
-
return ROTATE_ICONS[key] ? (
|
|
316
|
+
return ROTATE_ICONS[key] ? (jsx(CustomIconFont, { ...props, className: cx(css(ROTATE_ICONS[key].rotateClass), className, 'proximaicon', 'anticon'), type: ((_a = ROTATE_ICONS[key]) === null || _a === void 0 ? void 0 : _a.originKey) || key })) : (jsx(CustomIconFont, { ...props, type: key, className: cx('proximaicon', 'anticon', className) }));
|
|
317
317
|
} }));
|
|
318
318
|
};
|
|
319
319
|
return res;
|
|
320
320
|
}, {});
|
|
321
|
+
|
|
322
|
+
export { ArrowBackIcon, CustomIconFont, DoneIcon, DottedCircleIcon, HollowCircleIcon, IconFont, MULTI_COLOR_KEYS, ROTATE_ICONS, SIMPLE_COLOR_KEYS, SearchIcon, SingleColorIcon, WorkflowIcon };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const proximaSingleColor = (antPrefix = 'ant') => `
|
|
2
2
|
display: inline-block;
|
|
3
3
|
width: 1em;
|
|
4
4
|
height: 1em;
|
|
@@ -18,6 +18,8 @@ export const proximaSingleColor = (antPrefix = 'ant') => `
|
|
|
18
18
|
display: inline-block;
|
|
19
19
|
}
|
|
20
20
|
`;
|
|
21
|
-
|
|
21
|
+
const rotateStyle = (rotate) => `
|
|
22
22
|
transform: rotate(${rotate}deg);
|
|
23
23
|
`;
|
|
24
|
+
|
|
25
|
+
export { proximaSingleColor, rotateStyle };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var img = "data:image/svg+xml,%3c%3fxml version='1.0' standalone='no'%3f%3e%3c!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg t='1720087015972' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='13078' xmlns:xlink='http://www.w3.org/1999/xlink' width='200' height='200'%3e%3cpath d='M521.856 137.984l2.24 2.24a38.4 38.4 0 0 1 0 54.272l-275.2 275.2h624.64a41.6 41.6 0 1 1 0 83.2H247.488l276.608 276.672a38.4 38.4 0 0 1 4.48 48.96l-4.48 5.312-2.24 2.304-5.312 4.416a38.4 38.4 0 0 1-43.712 0l-5.312-4.48-343.872-343.936a38.272 38.272 0 0 1-11.136-23.872v-12.48a38.272 38.272 0 0 1 11.136-23.872l343.872-343.936a38.4 38.4 0 0 1 54.336 0z' p-id='13079'%3e%3c/path%3e%3c/svg%3e";
|
|
2
|
+
|
|
3
|
+
export { img as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var img = "data:image/svg+xml,%3c%3fxml version='1.0' standalone='no'%3f%3e%3c!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg t='1720427435830' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='13078' xmlns:xlink='http://www.w3.org/1999/xlink' width='200' height='200'%3e%3cpath d='M380.352 842.176l-305.664-305.28a38.4 38.4 0 0 1-0.064-54.272l2.048-2.048a38.464 38.464 0 0 1 54.272 0l275.328 274.88 482.816-575.36a38.4 38.4 0 0 1 54.144-4.736l2.432 2.112a38.4 38.4 0 0 1 4.736 54.08l-510.08 607.936a38.336 38.336 0 0 1-29.376 13.696h-6.72a38.336 38.336 0 0 1-23.872-11.008z' p-id='13079'%3e%3c/path%3e%3c/svg%3e";
|
|
2
|
+
|
|
3
|
+
export { img as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var img = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='utf-8'%3f%3e%3csvg t='1702526505381' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='14633' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3cpath d='M681.919574 995.136018l-33.919979-96.63994a408.447745 408.447745 0 0 1-130.239919 23.039986l-6.911995 0.064h-4.159998l-1.279999 102.399936H511.99968c59.519963 0 116.735927-10.175994 169.919894-28.863982zM243.839848 821.632126l-67.071958 77.375952a511.74368 511.74368 0 0 0 153.151904 91.647943l36.479977-95.67994a409.343744 409.343744 0 0 1-122.559923-73.343955z m709.503556-49.919968l-88.191945-52.031968a412.159742 412.159742 0 0 1-92.927942 108.671932l65.15196 78.975951a514.559678 514.559678 0 0 0 115.967927-135.679915zM107.391933 576.00028l-101.183937 15.87199c9.471994 60.415962 29.439982 117.311927 58.111964 168.767895l89.471944-49.855969a406.079746 406.079746 0 0 1-46.399971-134.783916zM1023.99936 512.00032c0-29.439982-2.495998-58.239964-7.231995-86.207946l-100.927937 17.087989a412.991742 412.991742 0 0 1-0.896 143.359911l100.735937 18.303988c5.439997-30.015981 8.319995-60.927962 8.319995-92.543942zM74.175954 246.400486a508.799682 508.799682 0 0 0-64.63996 166.399896l100.543937 19.775988a406.399746 406.399746 0 0 1 51.583968-132.927917L74.239954 246.400486z m882.303448 11.327993a514.431678 514.431678 0 0 0-114.303928-137.087914l-66.111959 78.271951a412.031742 412.031742 0 0 1 91.583943 109.759931l88.831944-50.943968z m-607.99962-231.039856A510.975681 510.975681 0 0 0 191.99988 112.38457l63.99996 79.87195a408.575745 408.575745 0 0 1 125.247922-68.543957L348.543782 26.688623zM511.99968 0.00064v102.399936c48.63997 0 95.99994 8.447995 140.607912 24.767985l35.199978-96.19194A511.039681 511.039681 0 0 0 511.99968 0.00064z' p-id='14634'%3e%3c/path%3e%3c/svg%3e";
|
|
2
|
+
|
|
3
|
+
export { img as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var img = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='utf-8'%3f%3e%3c!-- Generator: Adobe Illustrator 25.3.0%2c SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3e%3csvg version='1.1' id='%e5%9b%be%e5%b1%82_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 10 10' style='enable-background:new 0 0 10 10%3b' xml:space='preserve'%3e%3cpath d='M5%2c0C2.2%2c0%2c0%2c2.2%2c0%2c5s2.2%2c5%2c5%2c5s5-2.2%2c5-5S7.8%2c0%2c5%2c0z M5%2c8C3.3%2c8%2c2%2c6.7%2c2%2c5s1.3-3%2c3-3s3%2c1.3%2c3%2c3S6.7%2c8%2c5%2c8z'/%3e%3c/svg%3e";
|
|
2
|
+
|
|
3
|
+
export { img as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var img = "data:image/svg+xml,%3c%3fxml version='1.0' standalone='no'%3f%3e%3c!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg t='1720090255506' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='13220' xmlns:xlink='http://www.w3.org/1999/xlink' width='200' height='200'%3e%3cpath d='M457.6 112a345.6 345.6 0 0 1 270.08 561.28l173.056 173.184a38.4 38.4 0 0 1-48.96 58.752l-5.312-4.48-173.184-173.056a345.6 345.6 0 1 1-215.68-615.68z m0 76.8a268.8 268.8 0 1 0 186.944 461.952 18.112 18.112 0 0 1 2.816-3.392l3.392-2.816A268.8 268.8 0 0 0 457.6 188.8z' p-id='13221'%3e%3c/path%3e%3c/svg%3e";
|
|
2
|
+
|
|
3
|
+
export { img as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var img = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='utf-8'%3f%3e%3c!-- Generator: Adobe Illustrator 25.3.0%2c SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3e%3csvg version='1.1' id='%e5%9b%be%e5%b1%82_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 128 128' style='enable-background:new 0 0 128 128%3b' xml:space='preserve'%3e%3cpath d='M111.4%2c88.1c-7.5%2c0-14.46%2c4.82-16.61%2c11.79H38.03c-8.57%2c0-15.53-6.97-15.53-15.53 c0-8.57%2c6.97-14.99%2c15.53-14.99h52.49c14.46%2c0%2c26.25-11.79%2c26.25-26.25s-11.79-26.25-26.25-26.25H33.75 C31.61%2c9.91%2c25.18%2c5.09%2c17.14%2c5.09C8.04%2c5.09%2c0%2c13.12%2c0%2c22.23s8.04%2c17.14%2c17.14%2c17.14c7.5%2c0%2c14.46-4.82%2c16.61-11.79h56.23 c8.57%2c0%2c15.53%2c6.97%2c15.53%2c15.53s-6.42%2c15.53-14.99%2c15.53h-52.5c-14.46%2c0-26.25%2c11.79-26.25%2c26.25s11.79%2c26.25%2c26.25%2c26.25h56.23 c2.14%2c6.97%2c8.57%2c11.79%2c16.61%2c11.79c9.64%2c0%2c17.14-8.04%2c17.14-17.14S120.51%2c88.1%2c111.4%2c88.1z M17.15%2c29.18 c-3.22%2c0-6.42-3.22-6.42-6.97s3.22-6.42%2c6.42-6.42s6.42%2c3.22%2c6.42%2c6.42S20.9%2c29.18%2c17.15%2c29.18z M111.4%2c112.21 c-3.75%2c0-6.42-3.22-6.42-6.42c0-3.21%2c3.22-6.42%2c6.42-6.42c3.21%2c0%2c6.42%2c3.22%2c6.42%2c6.42C117.83%2c108.99%2c114.62%2c112.21%2c111.4%2c112.21z'/%3e%3c/svg%3e";
|
|
2
|
+
|
|
3
|
+
export { img as default };
|
package/dist/index.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
export { default as EmptyField } from './components/common/EmptyField';
|
|
2
|
-
export { default as BaseOverflowTooltip } from './components/common/overflow-tooltip/BaseOverflowTooltip';
|
|
3
|
-
export { default as SimpleOverflowToolTip } from './components/common/overflow-tooltip/SimpleOverflowToolTip';
|
|
4
|
-
export { PriceTag } from './components/common/PriceTag';
|
|
5
|
-
export { default as UserAvatar } from './components/common/user-field/UserAvatar';
|
|
6
|
-
export { default as ActorsReadView } from './components/fields/actors/ReadView';
|
|
7
|
-
export { default as AncestorReadView } from './components/fields/ancestor/ReadView';
|
|
8
|
-
export { default as AssigneeReadView } from './components/fields/assignee/ReadView';
|
|
9
|
-
export { default as BindWorkspaceReadView } from './components/fields/bind-workspace/ReadView';
|
|
10
|
-
export { default as CheckboxReadView } from './components/fields/checkbox/ReadView';
|
|
11
|
-
export { default as CreatedAtReadView } from './components/fields/created-at/ReadView';
|
|
12
|
-
export { default as CreatedByReadView } from './components/fields/created-by/ReadView';
|
|
13
|
-
export { default as DataQuoteReadView } from './components/fields/data-quote/ReadView';
|
|
14
|
-
export { default as DateReadView } from './components/fields/date/ReadView';
|
|
15
|
-
export { default as DropdownCell } from './components/fields/dropdown/Cell';
|
|
16
|
-
export { default as DropdownReadView } from './components/fields/dropdown/ReadView';
|
|
17
|
-
export { default as FileReadView } from './components/fields/file/ReadView';
|
|
18
|
-
export { default as FormulaReadView } from './components/fields/formula/ReadView';
|
|
19
|
-
export { default as HyperLinkReadView } from './components/fields/hyper-link/ReadView';
|
|
20
|
-
export { default as ItemGroupReadView } from './components/fields/item-group/ReadView';
|
|
21
|
-
export { default as ItemTypeReadView } from './components/fields/item-type/ReadView';
|
|
22
|
-
export { default as KeyReadView } from './components/fields/key/ReadView';
|
|
23
|
-
export { default as LongTextReadView } from './components/fields/long-text/ReadView';
|
|
24
|
-
export { default as NumberReadView } from './components/fields/number/ReadView';
|
|
25
|
-
export { default as PriorityReadView } from './components/fields/priority/ReadView';
|
|
26
|
-
export { default as RadioReadView } from './components/fields/radio/ReadView';
|
|
27
|
-
export { default as RepoFileReadView } from './components/fields/repo-files/ReadView';
|
|
28
|
-
export { default as ReporterReadView } from './components/fields/reporter/ReadView';
|
|
29
|
-
export { default as ScriptReadView } from './components/fields/script/ReadView';
|
|
30
|
-
export { default as SprintReadView } from './components/fields/sprint/ReadView';
|
|
31
|
-
export { default as StatusCell } from './components/fields/status/Cell';
|
|
32
|
-
export { default as StatusReadView } from './components/fields/status/ReadView';
|
|
33
|
-
export { default as StoryPointReadView } from './components/fields/story-point/ReadView';
|
|
34
|
-
export { default as TagReadView } from './components/fields/tag/ReadView';
|
|
35
|
-
export { default as TeamReadView } from './components/fields/team/ReadView';
|
|
36
|
-
export { default as TextReadView } from './components/fields/text/ReadView';
|
|
37
|
-
export { default as TreeReadView } from './components/fields/tree/ReadView';
|
|
38
|
-
export { default as UpdatedAtReadView } from './components/fields/updated-at/ReadView';
|
|
39
|
-
export { default as UpdatedByReadView } from './components/fields/updated-by/ReadView';
|
|
40
|
-
export { default as UserReadView } from './components/fields/user/ReadView';
|
|
41
|
-
export { default as UserGroupReadView } from './components/fields/user-group/ReadView';
|
|
42
|
-
export { default as VersionReadView } from './components/fields/version/ReadView';
|
|
43
|
-
export { default as WorkspaceReadView } from './components/fields/workspace/ReadView';
|
|
44
|
-
export { TableCell } from './components/table-components';
|
|
45
|
-
export { getAllReadComponents, getStandardEditComponents, getStandardReadComponents
|
|
46
|
-
export { LibraryProvider } from './lib/contexts';
|
|
47
|
-
export { useDataQuoteStore } from './lib/hooks/useDataQuoteStore';
|
|
1
|
+
export { default as EmptyField } from './components/common/EmptyField.js';
|
|
2
|
+
export { default as BaseOverflowTooltip } from './components/common/overflow-tooltip/BaseOverflowTooltip.js';
|
|
3
|
+
export { default as SimpleOverflowToolTip } from './components/common/overflow-tooltip/SimpleOverflowToolTip.js';
|
|
4
|
+
export { PriceTag } from './components/common/PriceTag.js';
|
|
5
|
+
export { default as UserAvatar } from './components/common/user-field/UserAvatar.js';
|
|
6
|
+
export { default as ActorsReadView } from './components/fields/actors/ReadView.js';
|
|
7
|
+
export { default as AncestorReadView } from './components/fields/ancestor/ReadView.js';
|
|
8
|
+
export { default as AssigneeReadView } from './components/fields/assignee/ReadView.js';
|
|
9
|
+
export { default as BindWorkspaceReadView } from './components/fields/bind-workspace/ReadView.js';
|
|
10
|
+
export { default as CheckboxReadView } from './components/fields/checkbox/ReadView.js';
|
|
11
|
+
export { default as CreatedAtReadView } from './components/fields/created-at/ReadView.js';
|
|
12
|
+
export { default as CreatedByReadView } from './components/fields/created-by/ReadView.js';
|
|
13
|
+
export { default as DataQuoteReadView } from './components/fields/data-quote/ReadView.js';
|
|
14
|
+
export { default as DateReadView } from './components/fields/date/ReadView.js';
|
|
15
|
+
export { default as DropdownCell } from './components/fields/dropdown/Cell.js';
|
|
16
|
+
export { default as DropdownReadView } from './components/fields/dropdown/ReadView.js';
|
|
17
|
+
export { default as FileReadView } from './components/fields/file/ReadView.js';
|
|
18
|
+
export { default as FormulaReadView } from './components/fields/formula/ReadView.js';
|
|
19
|
+
export { default as HyperLinkReadView } from './components/fields/hyper-link/ReadView.js';
|
|
20
|
+
export { default as ItemGroupReadView } from './components/fields/item-group/ReadView.js';
|
|
21
|
+
export { default as ItemTypeReadView } from './components/fields/item-type/ReadView.js';
|
|
22
|
+
export { default as KeyReadView } from './components/fields/key/ReadView.js';
|
|
23
|
+
export { default as LongTextReadView } from './components/fields/long-text/ReadView.js';
|
|
24
|
+
export { default as NumberReadView } from './components/fields/number/ReadView.js';
|
|
25
|
+
export { default as PriorityReadView } from './components/fields/priority/ReadView.js';
|
|
26
|
+
export { default as RadioReadView } from './components/fields/radio/ReadView.js';
|
|
27
|
+
export { default as RepoFileReadView } from './components/fields/repo-files/ReadView.js';
|
|
28
|
+
export { default as ReporterReadView } from './components/fields/reporter/ReadView.js';
|
|
29
|
+
export { default as ScriptReadView } from './components/fields/script/ReadView.js';
|
|
30
|
+
export { default as SprintReadView } from './components/fields/sprint/ReadView.js';
|
|
31
|
+
export { default as StatusCell } from './components/fields/status/Cell.js';
|
|
32
|
+
export { default as StatusReadView } from './components/fields/status/ReadView.js';
|
|
33
|
+
export { default as StoryPointReadView } from './components/fields/story-point/ReadView.js';
|
|
34
|
+
export { default as TagReadView } from './components/fields/tag/ReadView.js';
|
|
35
|
+
export { default as TeamReadView } from './components/fields/team/ReadView.js';
|
|
36
|
+
export { default as TextReadView } from './components/fields/text/ReadView.js';
|
|
37
|
+
export { default as TreeReadView } from './components/fields/tree/ReadView.js';
|
|
38
|
+
export { default as UpdatedAtReadView } from './components/fields/updated-at/ReadView.js';
|
|
39
|
+
export { default as UpdatedByReadView } from './components/fields/updated-by/ReadView.js';
|
|
40
|
+
export { default as UserReadView } from './components/fields/user/ReadView.js';
|
|
41
|
+
export { default as UserGroupReadView } from './components/fields/user-group/ReadView.js';
|
|
42
|
+
export { default as VersionReadView } from './components/fields/version/ReadView.js';
|
|
43
|
+
export { default as WorkspaceReadView } from './components/fields/workspace/ReadView.js';
|
|
44
|
+
export { TableCell } from './components/table-components/index.js';
|
|
45
|
+
export { getAllReadComponents, getStandardEditComponents, getStandardReadComponents } from './components/table-components/utils.js';
|
|
46
|
+
export { LibraryProvider } from './lib/contexts/index.js';
|
|
47
|
+
export { useDataQuoteStore } from './lib/hooks/useDataQuoteStore.js';
|
package/dist/lib/app/utils.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
export declare const requestIdleCallback: (((callback: IdleRequestCallback, options?: IdleRequestOptions) => number) & typeof globalThis.requestIdleCallback) | ((cb: any) => NodeJS.Timeout);
|
|
3
2
|
export declare const cancelIdleCallback: ((handle: number) => void) & typeof globalThis.cancelIdleCallback;
|
package/dist/lib/app/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const requestIdleCallback = (window === null || window === void 0 ? void 0 : window.requestIdleCallback) ||
|
|
2
2
|
function (cb) {
|
|
3
3
|
const start = Date.now();
|
|
4
4
|
return setTimeout(function () {
|
|
@@ -10,7 +10,9 @@ export const requestIdleCallback = (window === null || window === void 0 ? void
|
|
|
10
10
|
});
|
|
11
11
|
}, 1);
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
const cancelIdleCallback = (window === null || window === void 0 ? void 0 : window.cancelIdleCallback) ||
|
|
14
14
|
function (id) {
|
|
15
15
|
clearTimeout(id);
|
|
16
16
|
};
|
|
17
|
+
|
|
18
|
+
export { cancelIdleCallback, requestIdleCallback };
|
package/dist/lib/array.js
CHANGED
|
@@ -1,44 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
export const serializationArrayByKey = (list, keyPath) => {
|
|
8
|
-
if (!list) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
return list.reduce((prev, current) => {
|
|
12
|
-
const currentId = get(current, keyPath);
|
|
13
|
-
return {
|
|
14
|
-
...prev,
|
|
15
|
-
[currentId]: (prev[currentId] || []).concat([current]),
|
|
16
|
-
};
|
|
17
|
-
}, {});
|
|
18
|
-
};
|
|
19
|
-
export const createHash = () => {
|
|
20
|
-
return performance.now();
|
|
21
|
-
};
|
|
22
|
-
export function parseArray(str) {
|
|
23
|
-
if (!str) {
|
|
24
|
-
return [];
|
|
25
|
-
}
|
|
26
|
-
if (Array.isArray(str)) {
|
|
27
|
-
return str;
|
|
28
|
-
}
|
|
29
|
-
if (typeof str === 'string') {
|
|
30
|
-
let result = [];
|
|
31
|
-
try {
|
|
32
|
-
result = str
|
|
33
|
-
.split(',')
|
|
34
|
-
.map(item => item.trim())
|
|
35
|
-
.filter(item => !!item);
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
console.error('...parseArray error', str, error);
|
|
39
|
-
}
|
|
40
|
-
return result;
|
|
41
|
-
}
|
|
42
|
-
return [];
|
|
43
|
-
}
|
|
44
|
-
export const getArrayValue = (value) => { var _a; return (_a = (isArray(value) ? value : [value])) === null || _a === void 0 ? void 0 : _a.filter(Boolean); };
|
|
1
|
+
import { isArray } from 'lodash-es';
|
|
2
|
+
|
|
3
|
+
const getArrayValue = (value) => { var _a; return (_a = (isArray(value) ? value : [value])) === null || _a === void 0 ? void 0 : _a.filter(Boolean); };
|
|
4
|
+
|
|
5
|
+
export { getArrayValue };
|
package/dist/lib/config.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
const getPublicRuntimeConfig = () => {
|
|
2
2
|
var _a;
|
|
3
3
|
if (typeof window !== 'undefined') {
|
|
4
4
|
return (_a = window.__PROXIMA_DATA__) === null || _a === void 0 ? void 0 : _a.publicRuntimeConfig;
|
|
5
5
|
}
|
|
6
6
|
return {};
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
const getUserConfig = () => {
|
|
9
9
|
var _a;
|
|
10
10
|
if (typeof window !== 'undefined') {
|
|
11
11
|
return (_a = window.__PROXIMA_DATA__) === null || _a === void 0 ? void 0 : _a.userConfig;
|
|
12
12
|
}
|
|
13
13
|
return {};
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
getPublicRuntimeConfig() || {};
|
|
16
|
+
getUserConfig();
|
|
17
|
+
function getAcceptLanguageHeader(locale) {
|
|
18
18
|
switch (locale) {
|
|
19
19
|
case 'zh-CN':
|
|
20
20
|
return 'zh-CN;q=0.9,zh;q=0.8,en;q=0.7';
|
|
@@ -31,7 +31,7 @@ export function getAcceptLanguageHeader(locale) {
|
|
|
31
31
|
return 'en;q=0.9';
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
const getQiankunConfig = () => {
|
|
35
35
|
var _a, _b, _c;
|
|
36
36
|
const context = (_a = window === null || window === void 0 ? void 0 : window.QiankunProps) === null || _a === void 0 ? void 0 : _a.context;
|
|
37
37
|
const env = context === null || context === void 0 ? void 0 : context.env;
|
|
@@ -43,3 +43,5 @@ export const getQiankunConfig = () => {
|
|
|
43
43
|
locales: (_c = (_b = env === null || env === void 0 ? void 0 : env.LOCALES) !== null && _b !== void 0 ? _b : process.env.LOCALES) !== null && _c !== void 0 ? _c : 'zh',
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
+
|
|
47
|
+
export { getAcceptLanguageHeader, getPublicRuntimeConfig, getQiankunConfig, getUserConfig };
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import { FIELD_TYPE_KEY_MAPPINGS } from '
|
|
2
|
-
|
|
1
|
+
import { FIELD_TYPE_KEY_MAPPINGS } from '../global.js';
|
|
2
|
+
|
|
3
|
+
const REMOTE_DATA_QUOTE_FIELD_TYPE = [FIELD_TYPE_KEY_MAPPINGS.RemoteFieldRemoteDataQuote];
|
|
4
|
+
|
|
5
|
+
export { REMOTE_DATA_QUOTE_FIELD_TYPE };
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { createContext } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { fieldCellGlobalStyle } from '../../components/table-components/style';
|
|
3
|
+
import { Global, css } from '@emotion/react';
|
|
4
|
+
import { fieldCellGlobalStyle } from '../../components/table-components/style/index.js';
|
|
5
|
+
|
|
5
6
|
const defaultContext = {};
|
|
6
7
|
const defaultAntPrefix = 'ant';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return (
|
|
8
|
+
const AntdConfigContext = createContext(defaultContext);
|
|
9
|
+
const AntdConfigProvider = ({ getPopupContainer, antPrefix = defaultAntPrefix, children, }) => {
|
|
10
|
+
return (jsxs(AntdConfigContext.Provider, { value: {
|
|
10
11
|
getPopupContainer,
|
|
11
12
|
antPrefix,
|
|
12
|
-
}, children: [
|
|
13
|
+
}, children: [jsx(Global, { styles: css(fieldCellGlobalStyle) }), children] }));
|
|
13
14
|
};
|
|
15
|
+
|
|
16
|
+
export { AntdConfigContext, AntdConfigProvider };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { createContext } from 'react';
|
|
3
|
+
|
|
3
4
|
const defaultContext = {};
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return (
|
|
5
|
+
const CurrentUserContext = createContext(defaultContext);
|
|
6
|
+
const CurrentUserProvider = ({ currentUser, children }) => {
|
|
7
|
+
return (jsx(CurrentUserContext.Provider, { value: {
|
|
7
8
|
currentUser,
|
|
8
9
|
}, children: children }));
|
|
9
10
|
};
|
|
11
|
+
|
|
12
|
+
export { CurrentUserContext, CurrentUserProvider };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { createContext } from 'react';
|
|
3
|
+
|
|
3
4
|
const defaultContext = {};
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return (
|
|
5
|
+
const CurrentWorkspaceContext = createContext(defaultContext);
|
|
6
|
+
const CurrentWorkspaceProvider = ({ workspaceKey, children }) => {
|
|
7
|
+
return (jsx(CurrentWorkspaceContext.Provider, { value: {
|
|
7
8
|
workspaceKey,
|
|
8
9
|
}, children: children }));
|
|
9
10
|
};
|
|
11
|
+
|
|
12
|
+
export { CurrentWorkspaceContext, CurrentWorkspaceProvider };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { createContext } from 'react';
|
|
3
|
+
|
|
3
4
|
const defaultContext = {};
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return (
|
|
5
|
+
const DatetimeFormatContext = createContext(defaultContext);
|
|
6
|
+
const DatetimeFormatProvider = ({ datetimeFormat, children }) => {
|
|
7
|
+
return (jsx(DatetimeFormatContext.Provider, { value: {
|
|
7
8
|
datetimeFormat,
|
|
8
9
|
}, children: children }));
|
|
9
10
|
};
|
|
11
|
+
|
|
12
|
+
export { DatetimeFormatContext, DatetimeFormatProvider };
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import {
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import { useMemo, useEffect } from 'react';
|
|
3
3
|
import createCache from '@emotion/cache';
|
|
4
4
|
import { CacheProvider } from '@emotion/react';
|
|
5
|
-
import { i18n } from '../i18n';
|
|
6
|
-
import { AntdConfigProvider } from './antdConfig';
|
|
7
|
-
import { CurrentUserProvider } from './currentUser';
|
|
8
|
-
import { CurrentWorkspaceProvider } from './currentWorkspace';
|
|
9
|
-
import { DatetimeFormatProvider } from './datetimeFormat';
|
|
10
|
-
import { ItemConfigProvider } from './itemConfig';
|
|
11
|
-
import { TeamConfigProvider } from './teamConfig';
|
|
12
|
-
import { TenantProvider } from './tenant';
|
|
13
|
-
import { WorkflowConfigProvider } from './workflowConfig';
|
|
14
|
-
|
|
5
|
+
import { i18n } from '../i18n.js';
|
|
6
|
+
import { AntdConfigProvider } from './antdConfig.js';
|
|
7
|
+
import { CurrentUserProvider } from './currentUser.js';
|
|
8
|
+
import { CurrentWorkspaceProvider } from './currentWorkspace.js';
|
|
9
|
+
import { DatetimeFormatProvider } from './datetimeFormat.js';
|
|
10
|
+
import { ItemConfigProvider } from './itemConfig.js';
|
|
11
|
+
import { TeamConfigProvider } from './teamConfig.js';
|
|
12
|
+
import { TenantProvider } from './tenant.js';
|
|
13
|
+
import { WorkflowConfigProvider } from './workflowConfig.js';
|
|
14
|
+
|
|
15
|
+
const LibraryProvider = ({ getPopupContainer, locale, tenant, datetimeFormat, teamBasePath, teamGateway, isMicroApp, publicRuntimeConfig, userConfig, workspaceKey, workflow, item, currentUser, emotionCacheOptions, children, }) => {
|
|
15
16
|
const emotionCache = useMemo(() => {
|
|
16
17
|
return createCache({
|
|
17
18
|
key: 'apps',
|
|
@@ -21,5 +22,7 @@ export const LibraryProvider = ({ getPopupContainer, locale, tenant, datetimeFor
|
|
|
21
22
|
useEffect(() => {
|
|
22
23
|
i18n.setLocale(locale);
|
|
23
24
|
}, [locale]);
|
|
24
|
-
return (
|
|
25
|
+
return (jsx(CacheProvider, { value: emotionCache, children: jsx(AntdConfigProvider, { getPopupContainer: getPopupContainer, children: jsx(TeamConfigProvider, { teamBasePath: teamBasePath, teamGateway: teamGateway, isMicroApp: isMicroApp, publicRuntimeConfig: publicRuntimeConfig, userConfig: userConfig, children: jsx(TenantProvider, { tenant: tenant, children: jsx(CurrentWorkspaceProvider, { workspaceKey: workspaceKey, children: jsx(DatetimeFormatProvider, { datetimeFormat: datetimeFormat, children: jsx(CurrentUserProvider, { currentUser: currentUser, children: jsx(WorkflowConfigProvider, { workflow: workflow, children: jsx(ItemConfigProvider, { item: item, children: children }) }) }) }) }) }) }) }) }));
|
|
25
26
|
};
|
|
27
|
+
|
|
28
|
+
export { LibraryProvider };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { createContext } from 'react';
|
|
3
|
+
|
|
3
4
|
const defaultContext = {};
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return (
|
|
5
|
+
const ItemConfigContext = createContext(defaultContext);
|
|
6
|
+
const ItemConfigProvider = ({ item, children }) => {
|
|
7
|
+
return (jsx(ItemConfigContext.Provider, { value: {
|
|
7
8
|
item,
|
|
8
9
|
}, children: children }));
|
|
9
10
|
};
|
|
11
|
+
|
|
12
|
+
export { ItemConfigContext, ItemConfigProvider };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { createContext, useMemo } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { getQiankunConfig, getPublicRuntimeConfig, getUserConfig } from '../config.js';
|
|
4
|
+
|
|
4
5
|
const defaultContext = {};
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
const TeamConfigContext = createContext(defaultContext);
|
|
7
|
+
const TeamConfigProvider = ({ teamGateway, teamBasePath, isMicroApp, children, publicRuntimeConfig, userConfig, }) => {
|
|
7
8
|
const runtimeConfig = useMemo(() => {
|
|
8
9
|
const config = { ...getQiankunConfig(), ...getPublicRuntimeConfig(), ...(publicRuntimeConfig || {}) };
|
|
9
10
|
if (teamGateway) {
|
|
@@ -18,9 +19,11 @@ export const TeamConfigProvider = ({ teamGateway, teamBasePath, isMicroApp, chil
|
|
|
18
19
|
const config = { ...getUserConfig(), ...(userConfig || {}) };
|
|
19
20
|
return config;
|
|
20
21
|
}, [userConfig]);
|
|
21
|
-
return (
|
|
22
|
+
return (jsx(TeamConfigContext.Provider, { value: {
|
|
22
23
|
isMicroApp,
|
|
23
24
|
publicRuntimeConfig: runtimeConfig,
|
|
24
25
|
userConfig: _userConfig,
|
|
25
26
|
}, children: children }));
|
|
26
27
|
};
|
|
28
|
+
|
|
29
|
+
export { TeamConfigContext, TeamConfigProvider };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { createContext } from 'react';
|
|
3
|
+
|
|
3
4
|
const defaultContext = {};
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return (
|
|
5
|
+
const TenantContext = createContext(defaultContext);
|
|
6
|
+
const TenantProvider = ({ tenant, children }) => {
|
|
7
|
+
return (jsx(TenantContext.Provider, { value: {
|
|
7
8
|
tenant,
|
|
8
9
|
}, children: children }));
|
|
9
10
|
};
|
|
11
|
+
|
|
12
|
+
export { TenantContext, TenantProvider };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { createContext } from 'react';
|
|
3
|
+
|
|
3
4
|
const defaultContext = {};
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return (
|
|
5
|
+
const WorkflowConfigContext = createContext(defaultContext);
|
|
6
|
+
const WorkflowConfigProvider = ({ workflow, children }) => {
|
|
7
|
+
return (jsx(WorkflowConfigContext.Provider, { value: {
|
|
7
8
|
workflow,
|
|
8
9
|
}, children: children }));
|
|
9
10
|
};
|
|
11
|
+
|
|
12
|
+
export { WorkflowConfigContext, WorkflowConfigProvider };
|