@contentful/field-editor-reference 4.3.11 → 4.4.0
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/CHANGELOG.md +6 -0
- package/dist/components/SpaceName/SpaceName.d.ts +6 -0
- package/dist/entries/WrappedEntryCard/WrappedEntryCard.d.ts +1 -0
- package/dist/field-editor-reference.cjs.development.js +47 -13
- package/dist/field-editor-reference.cjs.development.js.map +1 -1
- package/dist/field-editor-reference.cjs.production.min.js +1 -1
- package/dist/field-editor-reference.cjs.production.min.js.map +1 -1
- package/dist/field-editor-reference.esm.js +49 -15
- package/dist/field-editor-reference.esm.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [4.4.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.3.11...@contentful/field-editor-reference@4.4.0) (2022-07-06)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- add optional space name to entry card ([#1176](https://github.com/contentful/field-editors/issues/1176)) ([62fae44](https://github.com/contentful/field-editors/commit/62fae44a63ad29597acf6ae0ba7f15373b1045c0))
|
|
11
|
+
|
|
6
12
|
## [4.3.11](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.3.10...@contentful/field-editor-reference@4.3.11) (2022-06-30)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
|
@@ -2454,11 +2454,40 @@ SingleReferenceEditor.defaultProps = {
|
|
|
2454
2454
|
hasCardRemoveActions: true
|
|
2455
2455
|
};
|
|
2456
2456
|
|
|
2457
|
+
var styles$1 = {
|
|
2458
|
+
spaceIcon: /*#__PURE__*/emotion.css({
|
|
2459
|
+
flexShrink: 0,
|
|
2460
|
+
fill: tokens.purple600
|
|
2461
|
+
}),
|
|
2462
|
+
spaceName: /*#__PURE__*/emotion.css({
|
|
2463
|
+
color: tokens.gray700,
|
|
2464
|
+
fontSize: tokens.fontSizeS,
|
|
2465
|
+
fontWeight: tokens.fontWeightDemiBold
|
|
2466
|
+
})
|
|
2467
|
+
};
|
|
2468
|
+
function SpaceName(props) {
|
|
2469
|
+
return React.createElement(f36Components.Tooltip, {
|
|
2470
|
+
placement: "top",
|
|
2471
|
+
as: "div",
|
|
2472
|
+
content: "Space"
|
|
2473
|
+
}, React.createElement(f36Components.Flex, {
|
|
2474
|
+
alignItems: "center",
|
|
2475
|
+
gap: "spacingXs",
|
|
2476
|
+
marginRight: "spacingS"
|
|
2477
|
+
}, React.createElement(f36Icons.FolderOpenTrimmedIcon, {
|
|
2478
|
+
className: styles$1.spaceIcon,
|
|
2479
|
+
size: "tiny",
|
|
2480
|
+
"aria-label": "Source space"
|
|
2481
|
+
}), React.createElement(f36Components.Text, {
|
|
2482
|
+
className: styles$1.spaceName
|
|
2483
|
+
}, props.spaceName)));
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2457
2486
|
var getEntryTitle = fieldEditorShared.entityHelpers.getEntryTitle,
|
|
2458
2487
|
getEntityDescription = fieldEditorShared.entityHelpers.getEntityDescription,
|
|
2459
2488
|
getEntryStatus = fieldEditorShared.entityHelpers.getEntryStatus,
|
|
2460
2489
|
getEntryImage = fieldEditorShared.entityHelpers.getEntryImage;
|
|
2461
|
-
var styles$
|
|
2490
|
+
var styles$2 = {
|
|
2462
2491
|
scheduleIcon: /*#__PURE__*/emotion.css({
|
|
2463
2492
|
marginRight: tokens.spacing2Xs
|
|
2464
2493
|
})
|
|
@@ -2523,12 +2552,17 @@ function WrappedEntryCard(props) {
|
|
|
2523
2552
|
size: props.size,
|
|
2524
2553
|
isSelected: props.isSelected,
|
|
2525
2554
|
status: status,
|
|
2526
|
-
|
|
2555
|
+
style: props.spaceName ? {
|
|
2556
|
+
backgroundColor: tokens.gray100
|
|
2557
|
+
} : undefined,
|
|
2558
|
+
icon: props.spaceName ? React.createElement(SpaceName, {
|
|
2559
|
+
spaceName: props.spaceName
|
|
2560
|
+
}) : React.createElement(ScheduledIconWithTooltip, {
|
|
2527
2561
|
getEntityScheduledActions: props.getEntityScheduledActions,
|
|
2528
2562
|
entityType: "Entry",
|
|
2529
2563
|
entityId: props.entry.sys.id
|
|
2530
2564
|
}, React.createElement(f36Icons.ClockIcon, {
|
|
2531
|
-
className: styles$
|
|
2565
|
+
className: styles$2.scheduleIcon,
|
|
2532
2566
|
size: "small",
|
|
2533
2567
|
variant: "muted",
|
|
2534
2568
|
testId: "schedule-icon"
|
|
@@ -2903,7 +2937,7 @@ MultipleReferenceEditor.defaultProps = {
|
|
|
2903
2937
|
hasCardEditActions: true
|
|
2904
2938
|
};
|
|
2905
2939
|
|
|
2906
|
-
var styles$
|
|
2940
|
+
var styles$3 = {
|
|
2907
2941
|
containter: /*#__PURE__*/emotion.css({
|
|
2908
2942
|
position: 'relative'
|
|
2909
2943
|
}),
|
|
@@ -2921,13 +2955,13 @@ var DragHandle = function DragHandle(props) {
|
|
|
2921
2955
|
|
|
2922
2956
|
var SortableLink = /*#__PURE__*/reactSortableHoc.SortableElement(function (props) {
|
|
2923
2957
|
return React__default.createElement("div", {
|
|
2924
|
-
className: styles$
|
|
2958
|
+
className: styles$3.item
|
|
2925
2959
|
}, props.children);
|
|
2926
2960
|
});
|
|
2927
2961
|
var SortableLinkList = /*#__PURE__*/reactSortableHoc.SortableContainer(function (props) {
|
|
2928
2962
|
var lastIndex = props.items.length - 1;
|
|
2929
2963
|
return React__default.createElement("div", {
|
|
2930
|
-
className: styles$
|
|
2964
|
+
className: styles$3.containter
|
|
2931
2965
|
}, props.items.map(function (item, index) {
|
|
2932
2966
|
return React__default.createElement(SortableLink, {
|
|
2933
2967
|
disabled: props.isDisabled,
|
|
@@ -3036,7 +3070,7 @@ var groupToIconMap = {
|
|
|
3036
3070
|
code: 'code',
|
|
3037
3071
|
markup: 'markup'
|
|
3038
3072
|
};
|
|
3039
|
-
var styles$
|
|
3073
|
+
var styles$4 = {
|
|
3040
3074
|
scheduleIcon: /*#__PURE__*/emotion.css({
|
|
3041
3075
|
marginRight: tokens.spacing2Xs
|
|
3042
3076
|
})
|
|
@@ -3098,7 +3132,7 @@ var WrappedAssetCard = function WrappedAssetCard(props) {
|
|
|
3098
3132
|
entityType: "Asset",
|
|
3099
3133
|
entityId: props.asset.sys.id
|
|
3100
3134
|
}, React__default.createElement(f36Icons.ClockIcon, {
|
|
3101
|
-
className: styles$
|
|
3135
|
+
className: styles$4.scheduleIcon,
|
|
3102
3136
|
size: "small",
|
|
3103
3137
|
variant: "muted",
|
|
3104
3138
|
testId: "schedule-icon"
|
|
@@ -3129,7 +3163,7 @@ var WrappedAssetCard = function WrappedAssetCard(props) {
|
|
|
3129
3163
|
};
|
|
3130
3164
|
WrappedAssetCard.defaultProps = defaultProps$1;
|
|
3131
3165
|
|
|
3132
|
-
var styles$
|
|
3166
|
+
var styles$5 = {
|
|
3133
3167
|
scheduleIcon: /*#__PURE__*/emotion.css({
|
|
3134
3168
|
marginRight: tokens.spacing2Xs
|
|
3135
3169
|
})
|
|
@@ -3173,7 +3207,7 @@ var WrappedAssetLink = function WrappedAssetLink(props) {
|
|
|
3173
3207
|
entityType: "Asset",
|
|
3174
3208
|
entityId: props.asset.sys.id
|
|
3175
3209
|
}, React__default.createElement(f36Icons.ClockIcon, {
|
|
3176
|
-
className: styles$
|
|
3210
|
+
className: styles$5.scheduleIcon,
|
|
3177
3211
|
size: "small",
|
|
3178
3212
|
variant: "muted",
|
|
3179
3213
|
testId: "schedule-icon"
|
|
@@ -3372,7 +3406,7 @@ SingleMediaEditor.defaultProps = {
|
|
|
3372
3406
|
isInitiallyDisabled: true
|
|
3373
3407
|
};
|
|
3374
3408
|
|
|
3375
|
-
var styles$
|
|
3409
|
+
var styles$6 = {
|
|
3376
3410
|
gridContainter: /*#__PURE__*/emotion.css({
|
|
3377
3411
|
position: 'relative',
|
|
3378
3412
|
display: 'flex',
|
|
@@ -3396,12 +3430,12 @@ var DragHandle$1 = function DragHandle(props) {
|
|
|
3396
3430
|
|
|
3397
3431
|
var SortableLink$1 = /*#__PURE__*/reactSortableHoc.SortableElement(function (props) {
|
|
3398
3432
|
return React__default.createElement("div", {
|
|
3399
|
-
className: styles$
|
|
3433
|
+
className: styles$6.item
|
|
3400
3434
|
}, props.children);
|
|
3401
3435
|
});
|
|
3402
3436
|
var SortableLinkList$1 = /*#__PURE__*/reactSortableHoc.SortableContainer(function (props) {
|
|
3403
3437
|
return React__default.createElement("div", {
|
|
3404
|
-
className: props.viewType === 'card' ? styles$
|
|
3438
|
+
className: props.viewType === 'card' ? styles$6.gridContainter : styles$6.container
|
|
3405
3439
|
}, props.items.map(function (item, index) {
|
|
3406
3440
|
return React__default.createElement(SortableLink$1, {
|
|
3407
3441
|
disabled: props.isDisabled,
|