@contentful/field-editor-reference 5.21.2 → 5.21.4
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/cjs/__fixtures__/FakeSdk.js +3 -3
- package/dist/cjs/__fixtures__/asset/index.js +10 -10
- package/dist/cjs/__fixtures__/content-type/index.js +1 -1
- package/dist/cjs/__fixtures__/entry/index.js +7 -7
- package/dist/cjs/__fixtures__/fixtures.js +6 -8
- package/dist/cjs/__fixtures__/locale/index.js +2 -2
- package/dist/cjs/__fixtures__/space/index.js +1 -1
- package/dist/cjs/assets/MultipleMediaEditor.js +5 -7
- package/dist/cjs/assets/SingleMediaEditor.js +4 -6
- package/dist/cjs/assets/WrappedAssetCard/AssetCardActions.js +19 -21
- package/dist/cjs/assets/WrappedAssetCard/FetchingWrappedAssetCard.js +11 -18
- package/dist/cjs/assets/WrappedAssetCard/WrappedAssetCard.js +11 -20
- package/dist/cjs/assets/WrappedAssetCard/WrappedAssetLink.js +9 -12
- package/dist/cjs/assets/index.js +3 -3
- package/dist/cjs/common/EntityStore.js +32 -51
- package/dist/cjs/common/MultipleReferenceEditor.js +11 -20
- package/dist/cjs/common/ReferenceEditor.js +5 -7
- package/dist/cjs/common/SingleReferenceEditor.js +7 -11
- package/dist/cjs/common/SortableLinkList.js +14 -14
- package/dist/cjs/common/customCardTypes.js +2 -4
- package/dist/cjs/common/queryClient.js +9 -14
- package/dist/cjs/common/useContentTypePermissions.js +1 -3
- package/dist/cjs/common/useEditorPermissions.js +3 -15
- package/dist/cjs/common/useEditorPermissions.spec.js +11 -12
- package/dist/cjs/components/AssetThumbnail/AssetThumbnail.js +3 -5
- package/dist/cjs/components/CreateEntryLinkButton/CreateEntryLinkButton.js +9 -13
- package/dist/cjs/components/CreateEntryLinkButton/CreateEntryLinkButton.spec.js +15 -17
- package/dist/cjs/components/CreateEntryLinkButton/CreateEntryMenuTrigger.js +19 -29
- package/dist/cjs/components/CreateEntryLinkButton/CreateEntryMenuTrigger.spec.js +12 -14
- package/dist/cjs/components/LinkActions/CombinedLinkActions.js +21 -28
- package/dist/cjs/components/LinkActions/LinkActions.js +15 -17
- package/dist/cjs/components/LinkActions/LinkEntityActions.js +17 -26
- package/dist/cjs/components/LinkActions/NoLinkPermissionsInfo.js +3 -5
- package/dist/cjs/components/LinkActions/helpers.js +5 -14
- package/dist/cjs/components/LinkActions/redesignStyles.js +4 -4
- package/dist/cjs/components/LinkActions/styles.js +1 -1
- package/dist/cjs/components/MissingEntityCard/MissingEntityCard.js +9 -11
- package/dist/cjs/components/ResourceEntityErrorCard/ResourceEntityErrorCard.js +4 -6
- package/dist/cjs/components/ResourceEntityErrorCard/UnsupportedEntityCard.js +4 -6
- package/dist/cjs/components/ScheduledIconWithTooltip/ScheduleTooltip.js +8 -10
- package/dist/cjs/components/ScheduledIconWithTooltip/ScheduledIconWithTooltip.js +4 -9
- package/dist/cjs/components/ScheduledIconWithTooltip/formatDateAndTime.js +4 -5
- package/dist/cjs/components/SpaceName/SpaceName.js +7 -9
- package/dist/cjs/components/index.js +12 -12
- package/dist/cjs/entries/MultipleEntryReferenceEditor.js +7 -9
- package/dist/cjs/entries/SingleEntryReferenceEditor.js +5 -7
- package/dist/cjs/entries/WrappedEntryCard/FetchingWrappedEntryCard.js +11 -20
- package/dist/cjs/entries/WrappedEntryCard/WrappedEntryCard.js +17 -23
- package/dist/cjs/entries/index.js +3 -3
- package/dist/cjs/index.js +37 -37
- package/dist/cjs/resources/Cards/ContentfulEntryCard.js +4 -13
- package/dist/cjs/resources/Cards/ResourceCard.js +12 -16
- package/dist/cjs/resources/Cards/ResourceCard.spec.js +17 -20
- package/dist/cjs/resources/MultipleResourceReferenceEditor.js +17 -20
- package/dist/cjs/resources/MultipleResourceReferenceEditor.spec.js +13 -34
- package/dist/cjs/resources/SingleResourceReferenceEditor.js +9 -11
- package/dist/cjs/resources/SingleResourceReferenceEditor.spec.js +6 -13
- package/dist/cjs/resources/testHelpers/resourceEditorHelpers.js +5 -12
- package/dist/cjs/resources/useResourceLinkActions.js +2 -11
- package/dist/cjs/types.js +3 -3
- package/dist/cjs/utils/fromFieldValidations.js +1 -2
- package/dist/cjs/utils/useSortIDs.js +4 -6
- package/dist/esm/__fixtures__/FakeSdk.js +3 -3
- package/dist/esm/assets/MultipleMediaEditor.js +3 -3
- package/dist/esm/assets/SingleMediaEditor.js +2 -2
- package/dist/esm/assets/WrappedAssetCard/AssetCardActions.js +12 -12
- package/dist/esm/assets/WrappedAssetCard/FetchingWrappedAssetCard.js +9 -14
- package/dist/esm/assets/WrappedAssetCard/WrappedAssetCard.js +7 -15
- package/dist/esm/assets/WrappedAssetCard/WrappedAssetLink.js +6 -7
- package/dist/esm/common/EntityStore.js +22 -39
- package/dist/esm/common/MultipleReferenceEditor.js +9 -16
- package/dist/esm/common/ReferenceEditor.js +2 -2
- package/dist/esm/common/SingleReferenceEditor.js +5 -7
- package/dist/esm/common/SortableLinkList.js +12 -12
- package/dist/esm/common/queryClient.js +3 -10
- package/dist/esm/common/useContentTypePermissions.js +1 -3
- package/dist/esm/common/useEditorPermissions.js +3 -15
- package/dist/esm/common/useEditorPermissions.spec.js +11 -12
- package/dist/esm/components/AssetThumbnail/AssetThumbnail.js +1 -1
- package/dist/esm/components/CreateEntryLinkButton/CreateEntryLinkButton.js +5 -7
- package/dist/esm/components/CreateEntryLinkButton/CreateEntryLinkButton.spec.js +12 -12
- package/dist/esm/components/CreateEntryLinkButton/CreateEntryMenuTrigger.js +15 -23
- package/dist/esm/components/CreateEntryLinkButton/CreateEntryMenuTrigger.spec.js +8 -9
- package/dist/esm/components/LinkActions/CombinedLinkActions.js +19 -30
- package/dist/esm/components/LinkActions/LinkActions.js +9 -9
- package/dist/esm/components/LinkActions/LinkEntityActions.js +11 -18
- package/dist/esm/components/LinkActions/NoLinkPermissionsInfo.js +1 -1
- package/dist/esm/components/LinkActions/helpers.js +2 -11
- package/dist/esm/components/MissingEntityCard/MissingEntityCard.js +6 -6
- package/dist/esm/components/ResourceEntityErrorCard/ResourceEntityErrorCard.js +2 -2
- package/dist/esm/components/ResourceEntityErrorCard/UnsupportedEntityCard.js +2 -2
- package/dist/esm/components/ScheduledIconWithTooltip/ScheduleTooltip.js +3 -3
- package/dist/esm/components/ScheduledIconWithTooltip/ScheduledIconWithTooltip.js +2 -5
- package/dist/esm/components/ScheduledIconWithTooltip/formatDateAndTime.js +2 -11
- package/dist/esm/components/SpaceName/SpaceName.js +4 -4
- package/dist/esm/entries/MultipleEntryReferenceEditor.js +5 -5
- package/dist/esm/entries/SingleEntryReferenceEditor.js +3 -3
- package/dist/esm/entries/WrappedEntryCard/FetchingWrappedEntryCard.js +8 -15
- package/dist/esm/entries/WrappedEntryCard/WrappedEntryCard.js +14 -18
- package/dist/esm/resources/Cards/ContentfulEntryCard.js +2 -9
- package/dist/esm/resources/Cards/ResourceCard.js +10 -12
- package/dist/esm/resources/Cards/ResourceCard.spec.js +11 -12
- package/dist/esm/resources/MultipleResourceReferenceEditor.js +13 -14
- package/dist/esm/resources/MultipleResourceReferenceEditor.spec.js +11 -30
- package/dist/esm/resources/SingleResourceReferenceEditor.js +6 -6
- package/dist/esm/resources/SingleResourceReferenceEditor.spec.js +4 -9
- package/dist/esm/resources/testHelpers/resourceEditorHelpers.js +2 -9
- package/dist/esm/resources/useResourceLinkActions.js +2 -11
- package/dist/esm/utils/fromFieldValidations.js +0 -1
- package/dist/esm/utils/useSortIDs.js +2 -2
- package/dist/types/assets/MultipleMediaEditor.d.ts +2 -2
- package/dist/types/assets/SingleMediaEditor.d.ts +2 -2
- package/dist/types/assets/WrappedAssetCard/AssetCardActions.d.ts +3 -3
- package/dist/types/assets/WrappedAssetCard/FetchingWrappedAssetCard.d.ts +2 -2
- package/dist/types/assets/WrappedAssetCard/WrappedAssetCard.d.ts +2 -2
- package/dist/types/assets/WrappedAssetCard/WrappedAssetLink.d.ts +2 -2
- package/dist/types/common/EntityStore.d.ts +1 -1
- package/dist/types/common/MultipleReferenceEditor.d.ts +1 -1
- package/dist/types/common/ReferenceEditor.d.ts +1 -1
- package/dist/types/common/SingleReferenceEditor.d.ts +1 -1
- package/dist/types/common/SortableLinkList.d.ts +1 -1
- package/dist/types/common/queryClient.d.ts +1 -1
- package/dist/types/components/AssetThumbnail/AssetThumbnail.d.ts +2 -2
- package/dist/types/components/CreateEntryLinkButton/CreateEntryLinkButton.d.ts +1 -1
- package/dist/types/components/CreateEntryLinkButton/CreateEntryMenuTrigger.d.ts +1 -1
- package/dist/types/components/LinkActions/CombinedLinkActions.d.ts +2 -2
- package/dist/types/components/LinkActions/LinkActions.d.ts +1 -1
- package/dist/types/components/LinkActions/LinkEntityActions.d.ts +2 -2
- package/dist/types/components/LinkActions/NoLinkPermissionsInfo.d.ts +2 -2
- package/dist/types/components/MissingEntityCard/MissingEntityCard.d.ts +2 -2
- package/dist/types/components/ResourceEntityErrorCard/ResourceEntityErrorCard.d.ts +2 -2
- package/dist/types/components/ResourceEntityErrorCard/UnsupportedEntityCard.d.ts +2 -2
- package/dist/types/components/ScheduledIconWithTooltip/ScheduleTooltip.d.ts +1 -1
- package/dist/types/components/ScheduledIconWithTooltip/ScheduledIconWithTooltip.d.ts +1 -1
- package/dist/types/components/SpaceName/SpaceName.d.ts +2 -2
- package/dist/types/entries/MultipleEntryReferenceEditor.d.ts +2 -2
- package/dist/types/entries/SingleEntryReferenceEditor.d.ts +2 -2
- package/dist/types/entries/WrappedEntryCard/FetchingWrappedEntryCard.d.ts +2 -2
- package/dist/types/entries/WrappedEntryCard/WrappedEntryCard.d.ts +1 -1
- package/dist/types/resources/Cards/ContentfulEntryCard.d.ts +2 -2
- package/dist/types/resources/Cards/ResourceCard.d.ts +2 -2
- package/dist/types/resources/MultipleResourceReferenceEditor.d.ts +2 -2
- package/dist/types/resources/SingleResourceReferenceEditor.d.ts +2 -2
- package/package.json +7 -4
|
@@ -8,13 +8,13 @@ Object.defineProperty(exports, "CombinedLinkActions", {
|
|
|
8
8
|
return CombinedLinkActions;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _react =
|
|
11
|
+
const _react = _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36components = require("@contentful/f36-components");
|
|
13
13
|
const _f36icons = require("@contentful/f36-icons");
|
|
14
14
|
const _CreateEntryLinkButton = require("../CreateEntryLinkButton/CreateEntryLinkButton");
|
|
15
15
|
const _LinkActions = require("./LinkActions");
|
|
16
16
|
const _NoLinkPermissionsInfo = require("./NoLinkPermissionsInfo");
|
|
17
|
-
const _redesignStyles =
|
|
17
|
+
const _redesignStyles = _interop_require_wildcard(require("./redesignStyles"));
|
|
18
18
|
function _getRequireWildcardCache(nodeInterop) {
|
|
19
19
|
if (typeof WeakMap !== "function") return null;
|
|
20
20
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -36,9 +36,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
36
36
|
if (cache && cache.has(obj)) {
|
|
37
37
|
return cache.get(obj);
|
|
38
38
|
}
|
|
39
|
-
var newObj = {
|
|
40
|
-
__proto__: null
|
|
41
|
-
};
|
|
39
|
+
var newObj = {};
|
|
42
40
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
43
41
|
for(var key in obj){
|
|
44
42
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -62,19 +60,16 @@ const testIds = {
|
|
|
62
60
|
};
|
|
63
61
|
function CombinedLinkActions(props) {
|
|
64
62
|
if (props.isFull) {
|
|
65
|
-
return null;
|
|
63
|
+
return null;
|
|
66
64
|
}
|
|
67
|
-
// We don't want to render a spacious container in case there are are already
|
|
68
|
-
// assets linked (in case of entries, always show it) as the border wouldn't be
|
|
69
|
-
// nicely aligned with asset cards.
|
|
70
65
|
const hideEmptyCard = props.entityType === 'Asset' && !props.isEmpty;
|
|
71
|
-
return
|
|
66
|
+
return _react.createElement("div", {
|
|
72
67
|
className: hideEmptyCard ? '' : _redesignStyles.container
|
|
73
|
-
}, !props.canCreateEntity && !props.canLinkEntity &&
|
|
68
|
+
}, !props.canCreateEntity && !props.canLinkEntity && _react.createElement(_NoLinkPermissionsInfo.NoLinkPermissionsInfo, null), props.entityType === 'Entry' && _react.createElement(CombinedEntryLinkActions, props), props.entityType === 'Asset' && _react.createElement(CombinedAssetLinkActions, props));
|
|
74
69
|
}
|
|
75
70
|
function CombinedEntryLinkActions(props) {
|
|
76
71
|
if (props.canCreateEntity) {
|
|
77
|
-
return
|
|
72
|
+
return _react.createElement(_CreateEntryLinkButton.CreateEntryLinkButton, {
|
|
78
73
|
testId: testIds.actionsWrapper,
|
|
79
74
|
disabled: props.isDisabled,
|
|
80
75
|
text: props.combinedActionsLabel || 'Add content',
|
|
@@ -87,7 +82,7 @@ function CombinedEntryLinkActions(props) {
|
|
|
87
82
|
onSelect: (contentTypeId)=>{
|
|
88
83
|
return contentTypeId ? props.onCreate(contentTypeId) : Promise.resolve();
|
|
89
84
|
},
|
|
90
|
-
customDropdownItems: props.canLinkEntity ?
|
|
85
|
+
customDropdownItems: props.canLinkEntity ? _react.createElement(_f36components.Menu.Item, {
|
|
91
86
|
testId: testIds.linkExisting,
|
|
92
87
|
onClick: ()=>{
|
|
93
88
|
props.onLinkExisting();
|
|
@@ -95,7 +90,7 @@ function CombinedEntryLinkActions(props) {
|
|
|
95
90
|
}, "Add existing content") : undefined
|
|
96
91
|
});
|
|
97
92
|
} else if (props.canLinkEntity) {
|
|
98
|
-
return
|
|
93
|
+
return _react.createElement(_f36components.Button, {
|
|
99
94
|
isDisabled: props.isDisabled,
|
|
100
95
|
testId: testIds.linkExisting,
|
|
101
96
|
className: _redesignStyles.action,
|
|
@@ -103,7 +98,7 @@ function CombinedEntryLinkActions(props) {
|
|
|
103
98
|
props.onLinkExisting();
|
|
104
99
|
},
|
|
105
100
|
variant: "secondary",
|
|
106
|
-
startIcon:
|
|
101
|
+
startIcon: _react.createElement(_f36icons.LinkIcon, null),
|
|
107
102
|
size: "small"
|
|
108
103
|
}, "Add existing content");
|
|
109
104
|
}
|
|
@@ -113,7 +108,7 @@ function CombinedAssetLinkActions(props) {
|
|
|
113
108
|
const [isOpen, setOpen] = _react.useState(false);
|
|
114
109
|
if (!props.canLinkEntity || !props.canCreateEntity) {
|
|
115
110
|
if (props.canLinkEntity) {
|
|
116
|
-
return
|
|
111
|
+
return _react.createElement(_f36components.Button, {
|
|
117
112
|
isDisabled: props.isDisabled,
|
|
118
113
|
testId: testIds.linkExisting,
|
|
119
114
|
className: _redesignStyles.action,
|
|
@@ -121,12 +116,12 @@ function CombinedAssetLinkActions(props) {
|
|
|
121
116
|
props.onLinkExisting();
|
|
122
117
|
},
|
|
123
118
|
variant: "secondary",
|
|
124
|
-
startIcon:
|
|
119
|
+
startIcon: _react.createElement(_f36icons.PlusIcon, null),
|
|
125
120
|
size: "small"
|
|
126
121
|
}, "Add existing media");
|
|
127
122
|
}
|
|
128
123
|
if (props.canCreateEntity) {
|
|
129
|
-
return
|
|
124
|
+
return _react.createElement(_f36components.Button, {
|
|
130
125
|
isDisabled: props.isDisabled,
|
|
131
126
|
testId: testIds.createAndLink,
|
|
132
127
|
className: _redesignStyles.action,
|
|
@@ -134,15 +129,13 @@ function CombinedAssetLinkActions(props) {
|
|
|
134
129
|
props.onCreate();
|
|
135
130
|
},
|
|
136
131
|
variant: "secondary",
|
|
137
|
-
startIcon:
|
|
132
|
+
startIcon: _react.createElement(_f36icons.PlusIcon, null),
|
|
138
133
|
size: "small"
|
|
139
134
|
}, "Add media");
|
|
140
135
|
}
|
|
141
136
|
return null;
|
|
142
137
|
}
|
|
143
|
-
|
|
144
|
-
// that works without content types to cover asset use-case.
|
|
145
|
-
return /*#__PURE__*/ _react.createElement(_f36components.Menu, {
|
|
138
|
+
return _react.createElement(_f36components.Menu, {
|
|
146
139
|
isOpen: isOpen,
|
|
147
140
|
onClose: ()=>{
|
|
148
141
|
setOpen(false);
|
|
@@ -150,22 +143,22 @@ function CombinedAssetLinkActions(props) {
|
|
|
150
143
|
onOpen: ()=>{
|
|
151
144
|
setOpen(true);
|
|
152
145
|
}
|
|
153
|
-
},
|
|
154
|
-
endIcon:
|
|
146
|
+
}, _react.createElement(_f36components.Menu.Trigger, null, _react.createElement(_f36components.Button, {
|
|
147
|
+
endIcon: _react.createElement(_f36icons.ChevronDownIcon, null),
|
|
155
148
|
isDisabled: props.isDisabled,
|
|
156
149
|
testId: testIds.actionsWrapper,
|
|
157
150
|
className: _redesignStyles.action,
|
|
158
151
|
variant: "secondary",
|
|
159
|
-
startIcon:
|
|
152
|
+
startIcon: _react.createElement(_f36icons.PlusIcon, null),
|
|
160
153
|
size: "small"
|
|
161
|
-
}, "Add media")), isOpen &&
|
|
154
|
+
}, "Add media")), isOpen && _react.createElement(_f36components.Menu.List, {
|
|
162
155
|
testId: testIds.dropdown
|
|
163
|
-
},
|
|
156
|
+
}, _react.createElement(_f36components.Menu.Item, {
|
|
164
157
|
testId: testIds.linkExisting,
|
|
165
158
|
onClick: ()=>{
|
|
166
159
|
props.onLinkExisting();
|
|
167
160
|
}
|
|
168
|
-
}, "Add existing media"),
|
|
161
|
+
}, "Add existing media"), _react.createElement(_f36components.Menu.Item, {
|
|
169
162
|
testId: testIds.createAndLink,
|
|
170
163
|
onClick: ()=>{
|
|
171
164
|
props.onCreate();
|
|
@@ -9,19 +9,19 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
LinkActions: function() {
|
|
13
|
-
return LinkActions;
|
|
14
|
-
},
|
|
15
12
|
testIds: function() {
|
|
16
13
|
return testIds;
|
|
14
|
+
},
|
|
15
|
+
LinkActions: function() {
|
|
16
|
+
return LinkActions;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
const _react =
|
|
19
|
+
const _react = _interop_require_wildcard(require("react"));
|
|
20
20
|
const _f36components = require("@contentful/f36-components");
|
|
21
21
|
const _f36icons = require("@contentful/f36-icons");
|
|
22
22
|
const _CreateEntryLinkButton = require("../CreateEntryLinkButton/CreateEntryLinkButton");
|
|
23
23
|
const _NoLinkPermissionsInfo = require("./NoLinkPermissionsInfo");
|
|
24
|
-
const _styles =
|
|
24
|
+
const _styles = _interop_require_wildcard(require("./styles"));
|
|
25
25
|
function _getRequireWildcardCache(nodeInterop) {
|
|
26
26
|
if (typeof WeakMap !== "function") return null;
|
|
27
27
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -43,9 +43,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
43
43
|
if (cache && cache.has(obj)) {
|
|
44
44
|
return cache.get(obj);
|
|
45
45
|
}
|
|
46
|
-
var newObj = {
|
|
47
|
-
__proto__: null
|
|
48
|
-
};
|
|
46
|
+
var newObj = {};
|
|
49
47
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
50
48
|
for(var key in obj){
|
|
51
49
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -79,16 +77,16 @@ const testIds = {
|
|
|
79
77
|
};
|
|
80
78
|
function LinkActions(props) {
|
|
81
79
|
if (props.isFull) {
|
|
82
|
-
return null;
|
|
80
|
+
return null;
|
|
83
81
|
}
|
|
84
82
|
const defaultLabels = props.entityType === 'Entry' ? defaultEntryLabels : defaultAssetLabels;
|
|
85
83
|
const labels = {
|
|
86
84
|
...defaultLabels,
|
|
87
85
|
...props.actionLabels
|
|
88
86
|
};
|
|
89
|
-
return
|
|
87
|
+
return _react.createElement("div", {
|
|
90
88
|
className: _styles.container
|
|
91
|
-
}, props.canCreateEntity &&
|
|
89
|
+
}, props.canCreateEntity && _react.createElement(_react.Fragment, null, props.entityType === 'Entry' && _react.createElement(_CreateEntryLinkButton.CreateEntryLinkButton, {
|
|
92
90
|
testId: testIds.createAndLink,
|
|
93
91
|
disabled: props.isDisabled,
|
|
94
92
|
text: labels.createNew({
|
|
@@ -99,27 +97,27 @@ function LinkActions(props) {
|
|
|
99
97
|
onSelect: (contentTypeId)=>{
|
|
100
98
|
return contentTypeId ? props.onCreate(contentTypeId, props.itemsLength) : Promise.resolve();
|
|
101
99
|
}
|
|
102
|
-
}), props.entityType === 'Asset' &&
|
|
100
|
+
}), props.entityType === 'Asset' && _react.createElement(_f36components.Button, {
|
|
103
101
|
isDisabled: props.isDisabled,
|
|
104
102
|
testId: testIds.createAndLink,
|
|
105
103
|
onClick: ()=>{
|
|
106
104
|
props.onCreate(undefined, props.itemsLength);
|
|
107
105
|
},
|
|
108
106
|
variant: "secondary",
|
|
109
|
-
startIcon:
|
|
107
|
+
startIcon: _react.createElement(_f36icons.PlusIcon, null),
|
|
110
108
|
size: "small"
|
|
111
|
-
}, labels.createNew()),
|
|
109
|
+
}, labels.createNew()), _react.createElement("span", {
|
|
112
110
|
className: _styles.separator
|
|
113
|
-
})), props.canLinkEntity &&
|
|
111
|
+
})), props.canLinkEntity && _react.createElement(_f36components.Button, {
|
|
114
112
|
isDisabled: props.isDisabled,
|
|
115
113
|
testId: testIds.linkExisting,
|
|
116
114
|
onClick: ()=>{
|
|
117
115
|
props.onLinkExisting();
|
|
118
116
|
},
|
|
119
117
|
variant: "secondary",
|
|
120
|
-
startIcon:
|
|
118
|
+
startIcon: _react.createElement(_f36icons.LinkIcon, null),
|
|
121
119
|
size: "small"
|
|
122
120
|
}, labels.linkExisting({
|
|
123
121
|
canLinkMultiple: props.canLinkMultiple
|
|
124
|
-
})), !props.canCreateEntity && !props.canLinkEntity &&
|
|
122
|
+
})), !props.canCreateEntity && !props.canLinkEntity && _react.createElement(_NoLinkPermissionsInfo.NoLinkPermissionsInfo, null));
|
|
125
123
|
}
|
|
@@ -9,17 +9,17 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
|
|
13
|
-
return
|
|
12
|
+
useLinkActionsProps: function() {
|
|
13
|
+
return useLinkActionsProps;
|
|
14
14
|
},
|
|
15
15
|
LinkEntityActions: function() {
|
|
16
16
|
return LinkEntityActions;
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
return
|
|
18
|
+
CombinedLinkEntityActions: function() {
|
|
19
|
+
return CombinedLinkEntityActions;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
const _react =
|
|
22
|
+
const _react = _interop_require_wildcard(require("react"));
|
|
23
23
|
const _CombinedLinkActions = require("./CombinedLinkActions");
|
|
24
24
|
const _helpers = require("./helpers");
|
|
25
25
|
const _LinkActions = require("./LinkActions");
|
|
@@ -44,9 +44,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
44
44
|
if (cache && cache.has(obj)) {
|
|
45
45
|
return cache.get(obj);
|
|
46
46
|
}
|
|
47
|
-
var newObj = {
|
|
48
|
-
__proto__: null
|
|
49
|
-
};
|
|
47
|
+
var newObj = {};
|
|
50
48
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
51
49
|
for(var key in obj){
|
|
52
50
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -65,7 +63,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
65
63
|
return newObj;
|
|
66
64
|
}
|
|
67
65
|
function useLinkActionsProps(props) {
|
|
68
|
-
const { sdk, editorPermissions, entityType, canLinkMultiple, isDisabled, actionLabels, itemsLength
|
|
66
|
+
const { sdk , editorPermissions , entityType , canLinkMultiple , isDisabled , actionLabels , itemsLength } = props;
|
|
69
67
|
const maxLinksCount = editorPermissions.validations.numberOfLinks?.max;
|
|
70
68
|
const value = sdk.field.getValue();
|
|
71
69
|
const linkCount = Array.isArray(value) ? value.length : value ? 1 : 0;
|
|
@@ -80,8 +78,7 @@ function useLinkActionsProps(props) {
|
|
|
80
78
|
slide,
|
|
81
79
|
index
|
|
82
80
|
});
|
|
83
|
-
},
|
|
84
|
-
[
|
|
81
|
+
}, [
|
|
85
82
|
entityType,
|
|
86
83
|
props.onCreate,
|
|
87
84
|
props.onAction
|
|
@@ -96,14 +93,13 @@ function useLinkActionsProps(props) {
|
|
|
96
93
|
index: index === undefined ? undefined : index + i
|
|
97
94
|
});
|
|
98
95
|
});
|
|
99
|
-
},
|
|
100
|
-
[
|
|
96
|
+
}, [
|
|
101
97
|
entityType,
|
|
102
98
|
props.onLink,
|
|
103
99
|
props.onAction
|
|
104
100
|
]);
|
|
105
101
|
const onCreate = _react.useCallback(async (contentTypeId, index)=>{
|
|
106
|
-
const { entity, slide
|
|
102
|
+
const { entity , slide } = await (0, _helpers.createEntity)({
|
|
107
103
|
sdk,
|
|
108
104
|
entityType,
|
|
109
105
|
contentTypeId
|
|
@@ -129,8 +125,7 @@ function useLinkActionsProps(props) {
|
|
|
129
125
|
onLinkedExisting([
|
|
130
126
|
entity
|
|
131
127
|
], index);
|
|
132
|
-
},
|
|
133
|
-
[
|
|
128
|
+
}, [
|
|
134
129
|
sdk,
|
|
135
130
|
entityType,
|
|
136
131
|
onLinkedExisting
|
|
@@ -145,13 +140,11 @@ function useLinkActionsProps(props) {
|
|
|
145
140
|
return;
|
|
146
141
|
}
|
|
147
142
|
onLinkedExisting(entities, index);
|
|
148
|
-
},
|
|
149
|
-
[
|
|
143
|
+
}, [
|
|
150
144
|
sdk,
|
|
151
145
|
entityType,
|
|
152
146
|
onLinkedExisting
|
|
153
147
|
]);
|
|
154
|
-
// FIXME: The memoization might rerun every time due to the always changing callback identities above
|
|
155
148
|
return (0, _react.useMemo)(()=>({
|
|
156
149
|
entityType,
|
|
157
150
|
canLinkMultiple,
|
|
@@ -167,8 +160,7 @@ function useLinkActionsProps(props) {
|
|
|
167
160
|
onCreated,
|
|
168
161
|
onLinkedExisting,
|
|
169
162
|
itemsLength
|
|
170
|
-
}),
|
|
171
|
-
[
|
|
163
|
+
}), [
|
|
172
164
|
entityType,
|
|
173
165
|
canLinkMultiple,
|
|
174
166
|
isDisabled,
|
|
@@ -177,7 +169,6 @@ function useLinkActionsProps(props) {
|
|
|
177
169
|
editorPermissions.canCreateEntity,
|
|
178
170
|
editorPermissions.canLinkEntity,
|
|
179
171
|
actionLabels,
|
|
180
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
|
|
181
172
|
editorPermissions.creatableContentTypes.map((ct)=>ct.sys.id).join(':'),
|
|
182
173
|
onCreate,
|
|
183
174
|
onLinkExisting,
|
|
@@ -187,9 +178,9 @@ function useLinkActionsProps(props) {
|
|
|
187
178
|
itemsLength
|
|
188
179
|
]);
|
|
189
180
|
}
|
|
190
|
-
function LinkEntityActions({ renderCustomActions, ...props }) {
|
|
191
|
-
return renderCustomActions ? renderCustomActions(props) :
|
|
181
|
+
function LinkEntityActions({ renderCustomActions , ...props }) {
|
|
182
|
+
return renderCustomActions ? renderCustomActions(props) : _react.createElement(_LinkActions.LinkActions, props);
|
|
192
183
|
}
|
|
193
|
-
function CombinedLinkEntityActions({ renderCustomActions, ...props }) {
|
|
194
|
-
return renderCustomActions ? renderCustomActions(props) :
|
|
184
|
+
function CombinedLinkEntityActions({ renderCustomActions , ...props }) {
|
|
185
|
+
return renderCustomActions ? renderCustomActions(props) : _react.createElement(_CombinedLinkActions.CombinedLinkActions, props);
|
|
195
186
|
}
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "NoLinkPermissionsInfo", {
|
|
|
8
8
|
return NoLinkPermissionsInfo;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _react =
|
|
11
|
+
const _react = _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36components = require("@contentful/f36-components");
|
|
13
13
|
function _getRequireWildcardCache(nodeInterop) {
|
|
14
14
|
if (typeof WeakMap !== "function") return null;
|
|
@@ -31,9 +31,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
31
31
|
if (cache && cache.has(obj)) {
|
|
32
32
|
return cache.get(obj);
|
|
33
33
|
}
|
|
34
|
-
var newObj = {
|
|
35
|
-
__proto__: null
|
|
36
|
-
};
|
|
34
|
+
var newObj = {};
|
|
37
35
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
38
36
|
for(var key in obj){
|
|
39
37
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -52,5 +50,5 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
52
50
|
return newObj;
|
|
53
51
|
}
|
|
54
52
|
function NoLinkPermissionsInfo() {
|
|
55
|
-
return
|
|
53
|
+
return _react.createElement(_f36components.Paragraph, null, "You don't have permission to view this content or this field is not correctly configured. Contact your administrator for help.");
|
|
56
54
|
}
|
|
@@ -12,11 +12,11 @@ _export(exports, {
|
|
|
12
12
|
createEntity: function() {
|
|
13
13
|
return createEntity;
|
|
14
14
|
},
|
|
15
|
-
selectMultipleEntities: function() {
|
|
16
|
-
return selectMultipleEntities;
|
|
17
|
-
},
|
|
18
15
|
selectSingleEntity: function() {
|
|
19
16
|
return selectSingleEntity;
|
|
17
|
+
},
|
|
18
|
+
selectMultipleEntities: function() {
|
|
19
|
+
return selectMultipleEntities;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
const getContentTypeIds = (contentTypes)=>contentTypes.map((ct)=>ct.sys.id);
|
|
@@ -25,7 +25,7 @@ async function createEntity(props) {
|
|
|
25
25
|
if (!props.contentTypeId) {
|
|
26
26
|
return {};
|
|
27
27
|
}
|
|
28
|
-
const { entity, slide
|
|
28
|
+
const { entity , slide } = await props.sdk.navigator.openNewEntry(props.contentTypeId, {
|
|
29
29
|
slideIn: true
|
|
30
30
|
});
|
|
31
31
|
return {
|
|
@@ -33,7 +33,7 @@ async function createEntity(props) {
|
|
|
33
33
|
slide
|
|
34
34
|
};
|
|
35
35
|
} else {
|
|
36
|
-
const { entity, slide
|
|
36
|
+
const { entity , slide } = await props.sdk.navigator.openNewAsset({
|
|
37
37
|
slideIn: true
|
|
38
38
|
});
|
|
39
39
|
return {
|
|
@@ -46,8 +46,6 @@ async function selectSingleEntity(props) {
|
|
|
46
46
|
if (props.entityType === 'Entry') {
|
|
47
47
|
return await props.sdk.dialogs.selectSingleEntry({
|
|
48
48
|
locale: props.sdk.field.locale,
|
|
49
|
-
// readable CTs do not cover cases where user has partial access to a CT entry,
|
|
50
|
-
// e.g. via tags so we're passing in all available CTs (based on field validations)
|
|
51
49
|
contentTypes: getContentTypeIds(props.editorPermissions.availableContentTypes)
|
|
52
50
|
});
|
|
53
51
|
} else {
|
|
@@ -60,18 +58,11 @@ async function selectSingleEntity(props) {
|
|
|
60
58
|
async function selectMultipleEntities(props) {
|
|
61
59
|
const value = props.sdk.field.getValue();
|
|
62
60
|
const linkCount = Array.isArray(value) ? value.length : value ? 1 : 0;
|
|
63
|
-
// TODO: Why not always set `min: 1` by default? Does it make sense to enforce
|
|
64
|
-
// user to select as many entities as the field's "min" requires? What if e.g.
|
|
65
|
-
// "min" is 4 and the user wants to insert 2 entities first, then create 2 new ones?
|
|
66
61
|
const min = Math.max((props.editorPermissions.validations.numberOfLinks?.min || 1) - linkCount, 1);
|
|
67
|
-
// TODO: Consider same for max. If e.g. "max" is 4, we disable the button if the
|
|
68
|
-
// user wants to select 5 but we show no information why the button is disabled.
|
|
69
62
|
const max = (props.editorPermissions.validations.numberOfLinks?.max || +Infinity) - linkCount;
|
|
70
63
|
if (props.entityType === 'Entry') {
|
|
71
64
|
return await props.sdk.dialogs.selectMultipleEntries({
|
|
72
65
|
locale: props.sdk.field.locale,
|
|
73
|
-
// readable CTs do not cover cases where user has partial access to a CT entry,
|
|
74
|
-
// e.g. via tags so we're passing in all available CTs (based on field validations)
|
|
75
66
|
contentTypes: getContentTypeIds(props.editorPermissions.availableContentTypes),
|
|
76
67
|
min,
|
|
77
68
|
max
|
|
@@ -9,17 +9,17 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
+
container: function() {
|
|
13
|
+
return container;
|
|
14
|
+
},
|
|
12
15
|
action: function() {
|
|
13
16
|
return action;
|
|
14
17
|
},
|
|
15
18
|
chevronIcon: function() {
|
|
16
19
|
return chevronIcon;
|
|
17
|
-
},
|
|
18
|
-
container: function() {
|
|
19
|
-
return container;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
const _f36tokens =
|
|
22
|
+
const _f36tokens = _interop_require_default(require("@contentful/f36-tokens"));
|
|
23
23
|
const _emotion = require("emotion");
|
|
24
24
|
function _interop_require_default(obj) {
|
|
25
25
|
return obj && obj.__esModule ? obj : {
|
|
@@ -16,7 +16,7 @@ _export(exports, {
|
|
|
16
16
|
return separator;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
const _f36tokens =
|
|
19
|
+
const _f36tokens = _interop_require_default(require("@contentful/f36-tokens"));
|
|
20
20
|
const _emotion = require("emotion");
|
|
21
21
|
function _interop_require_default(obj) {
|
|
22
22
|
return obj && obj.__esModule ? obj : {
|
|
@@ -8,10 +8,10 @@ Object.defineProperty(exports, "MissingEntityCard", {
|
|
|
8
8
|
return MissingEntityCard;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _react =
|
|
11
|
+
const _react = _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36components = require("@contentful/f36-components");
|
|
13
13
|
const _f36icons = require("@contentful/f36-icons");
|
|
14
|
-
const _styles =
|
|
14
|
+
const _styles = _interop_require_wildcard(require("./styles"));
|
|
15
15
|
function _getRequireWildcardCache(nodeInterop) {
|
|
16
16
|
if (typeof WeakMap !== "function") return null;
|
|
17
17
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -33,9 +33,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
33
33
|
if (cache && cache.has(obj)) {
|
|
34
34
|
return cache.get(obj);
|
|
35
35
|
}
|
|
36
|
-
var newObj = {
|
|
37
|
-
__proto__: null
|
|
38
|
-
};
|
|
36
|
+
var newObj = {};
|
|
39
37
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
40
38
|
for(var key in obj){
|
|
41
39
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -54,20 +52,20 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
54
52
|
return newObj;
|
|
55
53
|
}
|
|
56
54
|
function MissingEntityCard(props) {
|
|
57
|
-
return
|
|
55
|
+
return _react.createElement(_f36components.Card, {
|
|
58
56
|
className: _styles.card,
|
|
59
57
|
testId: "cf-ui-missing-entry-card",
|
|
60
58
|
isSelected: props.isSelected
|
|
61
|
-
},
|
|
59
|
+
}, _react.createElement(_f36components.Flex, {
|
|
62
60
|
alignItems: "center",
|
|
63
61
|
justifyContent: "space-between"
|
|
64
|
-
},
|
|
62
|
+
}, _react.createElement("div", {
|
|
65
63
|
className: props.asSquare ? _styles.squareCard : ''
|
|
66
|
-
},
|
|
64
|
+
}, _react.createElement(_f36components.SectionHeading, {
|
|
67
65
|
marginBottom: "none"
|
|
68
|
-
}, props.entityType, " is missing or inaccessible")), !props.isDisabled && props.onRemove &&
|
|
66
|
+
}, props.entityType, " is missing or inaccessible")), !props.isDisabled && props.onRemove && _react.createElement(_f36components.IconButton, {
|
|
69
67
|
variant: "transparent",
|
|
70
|
-
icon:
|
|
68
|
+
icon: _react.createElement(_f36icons.CloseIcon, {
|
|
71
69
|
variant: "muted"
|
|
72
70
|
}),
|
|
73
71
|
"aria-label": "Delete",
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "ResourceEntityErrorCard", {
|
|
|
8
8
|
return ResourceEntityErrorCard;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _react =
|
|
11
|
+
const _react = _interop_require_wildcard(require("react"));
|
|
12
12
|
const _EntityStore = require("../../common/EntityStore");
|
|
13
13
|
const _MissingEntityCard = require("../MissingEntityCard/MissingEntityCard");
|
|
14
14
|
const _UnsupportedEntityCard = require("./UnsupportedEntityCard");
|
|
@@ -33,9 +33,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
33
33
|
if (cache && cache.has(obj)) {
|
|
34
34
|
return cache.get(obj);
|
|
35
35
|
}
|
|
36
|
-
var newObj = {
|
|
37
|
-
__proto__: null
|
|
38
|
-
};
|
|
36
|
+
var newObj = {};
|
|
39
37
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
40
38
|
for(var key in obj){
|
|
41
39
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -55,12 +53,12 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
55
53
|
}
|
|
56
54
|
function ResourceEntityErrorCard(props) {
|
|
57
55
|
if ((0, _EntityStore.isUnsupportedError)(props.error)) {
|
|
58
|
-
return
|
|
56
|
+
return _react.createElement(_UnsupportedEntityCard.UnsupportedEntityCard, {
|
|
59
57
|
linkType: props.linkType,
|
|
60
58
|
isSelected: props.isSelected
|
|
61
59
|
});
|
|
62
60
|
}
|
|
63
|
-
return
|
|
61
|
+
return _react.createElement(_MissingEntityCard.MissingEntityCard, {
|
|
64
62
|
entityType: "Entry",
|
|
65
63
|
isDisabled: props.isDisabled,
|
|
66
64
|
isSelected: props.isSelected,
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "UnsupportedEntityCard", {
|
|
|
8
8
|
return UnsupportedEntityCard;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _react =
|
|
11
|
+
const _react = _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36components = require("@contentful/f36-components");
|
|
13
13
|
const _emotion = require("emotion");
|
|
14
14
|
function _getRequireWildcardCache(nodeInterop) {
|
|
@@ -32,9 +32,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
32
32
|
if (cache && cache.has(obj)) {
|
|
33
33
|
return cache.get(obj);
|
|
34
34
|
}
|
|
35
|
-
var newObj = {
|
|
36
|
-
__proto__: null
|
|
37
|
-
};
|
|
35
|
+
var newObj = {};
|
|
38
36
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
39
37
|
for(var key in obj){
|
|
40
38
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -58,10 +56,10 @@ const styles = {
|
|
|
58
56
|
})
|
|
59
57
|
};
|
|
60
58
|
function UnsupportedEntityCard(props) {
|
|
61
|
-
return
|
|
59
|
+
return _react.createElement(_f36components.Card, {
|
|
62
60
|
className: styles.card,
|
|
63
61
|
isSelected: props.isSelected
|
|
64
|
-
},
|
|
62
|
+
}, _react.createElement(_f36components.SectionHeading, {
|
|
65
63
|
marginBottom: "none"
|
|
66
64
|
}, "Resource type ", props.linkType, " is currently not supported"));
|
|
67
65
|
}
|
|
@@ -9,14 +9,14 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
ScheduleTooltip: function() {
|
|
13
|
-
return ScheduleTooltip;
|
|
14
|
-
},
|
|
15
12
|
getScheduleTooltipContent: function() {
|
|
16
13
|
return getScheduleTooltipContent;
|
|
14
|
+
},
|
|
15
|
+
ScheduleTooltip: function() {
|
|
16
|
+
return ScheduleTooltip;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
const _react =
|
|
19
|
+
const _react = _interop_require_wildcard(require("react"));
|
|
20
20
|
const _f36components = require("@contentful/f36-components");
|
|
21
21
|
const _formatDateAndTime = require("./formatDateAndTime");
|
|
22
22
|
function _getRequireWildcardCache(nodeInterop) {
|
|
@@ -40,9 +40,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
40
40
|
if (cache && cache.has(obj)) {
|
|
41
41
|
return cache.get(obj);
|
|
42
42
|
}
|
|
43
|
-
var newObj = {
|
|
44
|
-
__proto__: null
|
|
45
|
-
};
|
|
43
|
+
var newObj = {};
|
|
46
44
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
47
45
|
for(var key in obj){
|
|
48
46
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -60,12 +58,12 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
60
58
|
}
|
|
61
59
|
return newObj;
|
|
62
60
|
}
|
|
63
|
-
const getScheduleTooltipContent = ({ job, jobsCount
|
|
61
|
+
const getScheduleTooltipContent = ({ job , jobsCount })=>{
|
|
64
62
|
return `Will ${job.action.toLowerCase()} ${(0, _formatDateAndTime.formatDateAndTime)(job.scheduledFor.datetime).toLowerCase()}
|
|
65
63
|
${jobsCount > 1 ? `+ ${jobsCount - 1} more` : ''}`;
|
|
66
64
|
};
|
|
67
|
-
const ScheduleTooltip = ({ job, jobsCount, children
|
|
68
|
-
return
|
|
65
|
+
const ScheduleTooltip = ({ job , jobsCount , children })=>{
|
|
66
|
+
return _react.createElement(_f36components.Tooltip, {
|
|
69
67
|
placement: "top",
|
|
70
68
|
testId: job.sys.id,
|
|
71
69
|
as: "div",
|