@antscorp/antsomi-ui 1.3.3-beta.63 → 1.3.3-beta.65
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/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +2 -8
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.js +1 -1
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/styled.js +1 -1
- package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.js +2 -4
- package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.js +1 -1
- package/es/components/molecules/ShareAccess/constants.d.ts +8 -0
- package/es/components/molecules/ShareAccess/constants.js +10 -0
- package/es/locales/en/translation.json +2 -2
- package/package.json +1 -1
|
@@ -453,10 +453,7 @@ export const AdvancedPicker = props => {
|
|
|
453
453
|
const newDate = getNewDate(item, index);
|
|
454
454
|
setState(state => (Object.assign(Object.assign({}, state), { date: dayjs(newDate).format(format) })));
|
|
455
455
|
} }, item)))))) : (React.createElement(React.Fragment, null,
|
|
456
|
-
React.createElement(Select, { getPopupContainer: triggerNode => {
|
|
457
|
-
console.log(triggerNode.parentNode);
|
|
458
|
-
return triggerNode.parentNode;
|
|
459
|
-
}, options: newCalculationTypes.map(({ label, value }) => ({
|
|
456
|
+
React.createElement(Select, { getPopupContainer: triggerNode => triggerNode.parentNode, options: newCalculationTypes.map(({ label, value }) => ({
|
|
460
457
|
value,
|
|
461
458
|
label: t(label),
|
|
462
459
|
})), value: option.calculationType.value, onChange: value => {
|
|
@@ -464,10 +461,7 @@ export const AdvancedPicker = props => {
|
|
|
464
461
|
onChangeOption({ calculationType });
|
|
465
462
|
} }),
|
|
466
463
|
React.createElement(InputNumber, { value: option.value, style: { width: '100%' }, min: 0, showHandler: false, onChange: value => onChangeOption({ value }) }),
|
|
467
|
-
React.createElement(Select, { getPopupContainer: triggerNode => {
|
|
468
|
-
console.log(triggerNode.parentNode);
|
|
469
|
-
return triggerNode.parentNode;
|
|
470
|
-
}, options: newCalculationDates.map(calculationDate => (Object.assign(Object.assign({}, calculationDate), { label: t(calculationDate.label) }))), value: option.calculationDate.value, onChange: value => {
|
|
464
|
+
React.createElement(Select, { getPopupContainer: triggerNode => triggerNode.parentNode, options: newCalculationDates.map(calculationDate => (Object.assign(Object.assign({}, calculationDate), { label: t(calculationDate.label) }))), value: option.calculationDate.value, onChange: value => {
|
|
471
465
|
const calculationDate = newCalculationDates.find(calculationDate => calculationDate.value === value);
|
|
472
466
|
onChangeOption({ calculationDate });
|
|
473
467
|
} }))),
|
|
@@ -89,7 +89,7 @@ export const RichMenuCell = props => {
|
|
|
89
89
|
React.createElement("source", { src: videoUrl, type: "video/mp4" }))),
|
|
90
90
|
previewImage && (videoState.status === 'idle' || isPreview) && (React.createElement(ThumbnailBox, null,
|
|
91
91
|
React.createElement(Image, { src: previewImage, alt: "thumbnail" }))),
|
|
92
|
-
(videoState.status === 'idle' || isPreview) && videoUrl && (React.createElement(VideoAction,
|
|
92
|
+
(videoState.status === 'idle' || isPreview) && videoUrl && (React.createElement(VideoAction, { className: "video-capture-action-ignore" },
|
|
93
93
|
React.createElement(ActionButton, { id: "video-capture-action-play", onClick: handleVideoPlay },
|
|
94
94
|
React.createElement(Icon, { type: "icon-ants-play-circle", size: 24, style: { width: 26, color: '#fff' } }),
|
|
95
95
|
isAddLabel && React.createElement(ActionButtonLabel, null, "Play")),
|
|
@@ -3,7 +3,7 @@ import { Dropdown } from 'antd';
|
|
|
3
3
|
import produce from 'immer';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { updateObjAccessInfo } from '../../actions';
|
|
6
|
-
import { GENERAL_ACCESS, PUBLIC_ROLE, ROLE_ACCESS_LABEL } from '../../constants';
|
|
6
|
+
import { GENERAL_ACCESS, GENERATE_DESCRIPTION, PUBLIC_ROLE, ROLE_ACCESS_LABEL, } from '../../constants';
|
|
7
7
|
import { useShareAccess } from '../../hooks';
|
|
8
8
|
import { StyledGeneralAccessRoot } from './styled';
|
|
9
9
|
export const GeneralAccess = () => {
|
|
@@ -47,9 +47,7 @@ export const GeneralAccess = () => {
|
|
|
47
47
|
React.createElement("div", { className: "general-dropdown-wrapper" },
|
|
48
48
|
React.createElement("div", { className: "accessable-title" }, isPublic ? 'Public' : 'Restricted'),
|
|
49
49
|
allowEdit && React.createElement(Icon, { className: "icon-angle", type: "icon-ants-angle-down" }))),
|
|
50
|
-
React.createElement("div", { className: "description" }, isPublic
|
|
51
|
-
? 'Only people with access can open this that object.'
|
|
52
|
-
: 'Anyone on the portal can view this data object.')),
|
|
50
|
+
React.createElement("div", { className: "description" }, GENERATE_DESCRIPTION[isPublic][publicRole])),
|
|
53
51
|
!!isPublic && (React.createElement(Dropdown, { placement: "bottomLeft", trigger: ['click'], destroyPopupOnHide: true, disabled: !allowEdit, menu: {
|
|
54
52
|
items: [
|
|
55
53
|
publicRole === PUBLIC_ROLE.ONLY_VIEWER
|
|
@@ -62,7 +62,7 @@ export const SearchUser = (props) => {
|
|
|
62
62
|
if (!allowEdit)
|
|
63
63
|
return null;
|
|
64
64
|
return (React.createElement(StyledSearchUserRoot, null,
|
|
65
|
-
React.createElement(Select, { showSearch: true, placeholder: "Add people and
|
|
65
|
+
React.createElement(Select, { showSearch: true, placeholder: "Add people and groups", value: [], searchValue: searchTerm, defaultActiveFirstOption: false, suffixIcon: null, filterOption: false, onSearch: v => setSearchTerm(v), notFoundContent: null, loading: isFetching, options: (users || []).map(user => ({
|
|
66
66
|
value: user.user_id,
|
|
67
67
|
label: (React.createElement(StyledSelectItem, { onClick: () => handleAddUser(user) },
|
|
68
68
|
React.createElement(Avatar, { src: user.avatar }),
|
|
@@ -77,3 +77,13 @@ export const GENERAL_ACTIONS = {
|
|
|
77
77
|
label: 'Restricted',
|
|
78
78
|
},
|
|
79
79
|
};
|
|
80
|
+
export const GENERATE_DESCRIPTION = {
|
|
81
|
+
[GENERAL_ACCESS.PUBLIC]: {
|
|
82
|
+
[PUBLIC_ROLE.ONLY_EDITOR]: 'Anyone on the portal can edit this item.',
|
|
83
|
+
[PUBLIC_ROLE.ONLY_VIEWER]: 'Anyone on the portal can view this item.',
|
|
84
|
+
},
|
|
85
|
+
[GENERAL_ACCESS.RESTRICTED]: {
|
|
86
|
+
[PUBLIC_ROLE.ONLY_EDITOR]: 'Only people with access can open this item.',
|
|
87
|
+
[PUBLIC_ROLE.ONLY_VIEWER]: 'Only people with access can open this item.',
|
|
88
|
+
},
|
|
89
|
+
};
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"firstDayOfMonth": "First day of this month",
|
|
15
15
|
"firstDayOfQuarter": "First day of this quarter",
|
|
16
16
|
"firstDayOfYear": "First day of this year",
|
|
17
|
-
"lastDayOfWeekMonSun": "
|
|
18
|
-
"lastDayOfWeekSunSat": "
|
|
17
|
+
"lastDayOfWeekMonSun": "Last day of this week (Mon - Sun)",
|
|
18
|
+
"lastDayOfWeekSunSat": "Last day of this week (Sun - Sat)",
|
|
19
19
|
"lastDayOfMonth": "Last day of this month",
|
|
20
20
|
"lastDayOfQuarter": "Last day of this quarter",
|
|
21
21
|
"lastDayOfYear": "Last day of this year",
|