@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.
@@ -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, null,
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")),
@@ -104,7 +104,7 @@ export const ThumbnailBox = styled.div `
104
104
  export const Image = styled.img `
105
105
  width: 100%;
106
106
  height: 100%;
107
- object-fit: cover;
107
+ object-fit: contain;
108
108
  `;
109
109
  export const Link = styled.a `
110
110
  display: flex;
@@ -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 group.", value: [], searchValue: searchTerm, defaultActiveFirstOption: false, suffixIcon: null, filterOption: false, onSearch: v => setSearchTerm(v), notFoundContent: null, loading: isFetching, options: (users || []).map(user => ({
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 }),
@@ -59,3 +59,11 @@ export declare const GENERAL_ACTIONS: {
59
59
  readonly label: "Restricted";
60
60
  };
61
61
  };
62
+ export declare const GENERATE_DESCRIPTION: {
63
+ 1: {
64
+ [x: number]: string;
65
+ };
66
+ 0: {
67
+ [x: number]: string;
68
+ };
69
+ };
@@ -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": "First day of this week (Mon - Sun)",
18
- "lastDayOfWeekSunSat": "First day of this week (Sun - Sat)",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.3-beta.63",
3
+ "version": "1.3.3-beta.65",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",