@contentful/field-editor-shared 2.11.0 → 2.11.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/cjs/LocalePublishingEntityStatusBadge/LocalePublishingPopover.js +2 -9
- package/dist/cjs/ReleaseEntityStatusBadge/ReleaseEntityStatusPopover.js +2 -9
- package/dist/cjs/index.js +0 -10
- package/dist/esm/LocalePublishingEntityStatusBadge/LocalePublishingPopover.js +2 -9
- package/dist/esm/ReleaseEntityStatusBadge/ReleaseEntityStatusPopover.js +2 -9
- package/dist/esm/index.js +0 -1
- package/dist/types/LocalePublishingEntityStatusBadge/LocalePublishingPopover.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +7 -7
|
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "LocalePublishingPopover", {
|
|
|
10
10
|
});
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36components = require("@contentful/f36-components");
|
|
13
|
+
const _f36icons = require("@contentful/f36-icons");
|
|
13
14
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
14
15
|
const _emotion = require("emotion");
|
|
15
16
|
const _entityHelpers = /*#__PURE__*/ _interop_require_wildcard(require("../utils/entityHelpers"));
|
|
@@ -149,14 +150,6 @@ const styles = {
|
|
|
149
150
|
padding: `${_f36tokens.default.spacing2Xs} 0`
|
|
150
151
|
})
|
|
151
152
|
};
|
|
152
|
-
const ArrowDownIcon = (0, _f36components.generateIcon)({
|
|
153
|
-
name: 'ArrowDownIcon',
|
|
154
|
-
viewBox: '0 0 12 20',
|
|
155
|
-
path: /*#__PURE__*/ _react.default.createElement("path", {
|
|
156
|
-
d: "M3.03076 8C2.20109 8 1.73228 8.95209 2.23814 9.60971L5.20727 13.4696C5.60757 13.99 6.39223 13.99 6.79252 13.4696L9.76166 9.60971C10.2675 8.95209 9.79871 8 8.96904 8L3.03076 8Z",
|
|
157
|
-
fill: "currentColor"
|
|
158
|
-
})
|
|
159
|
-
});
|
|
160
153
|
const determineBadgeStatus = (localesStatusMap, activeLocales)=>{
|
|
161
154
|
if (!localesStatusMap) return;
|
|
162
155
|
if (localesStatusMap.size === 1 || activeLocales && activeLocales.length === 1) return {
|
|
@@ -269,7 +262,7 @@ function LocalePublishingPopover({ entity, jobs, isScheduled, localesStatusMap,
|
|
|
269
262
|
tabIndex: 0,
|
|
270
263
|
onFocus: ()=>setIsOpen(true),
|
|
271
264
|
onBlur: ()=>setIsOpen(false),
|
|
272
|
-
endIcon: /*#__PURE__*/ _react.default.createElement(ArrowDownIcon, {
|
|
265
|
+
endIcon: /*#__PURE__*/ _react.default.createElement(_f36icons.ArrowDownIcon, {
|
|
273
266
|
color: getIconColor(entityStatus)
|
|
274
267
|
}),
|
|
275
268
|
onMouseOver: onMouseEnter,
|
|
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "ReleaseEntityStatusPopover", {
|
|
|
10
10
|
});
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36components = require("@contentful/f36-components");
|
|
13
|
+
const _f36icons = require("@contentful/f36-icons");
|
|
13
14
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
14
15
|
const _emotion = require("emotion");
|
|
15
16
|
const _constants = require("./constants");
|
|
@@ -209,14 +210,6 @@ function ReleaseEntityStatusPopover({ releaseLocalesStatusMap, activeLocales, is
|
|
|
209
210
|
const status = determineBadgeStatus(releaseLocalesStatusMap, activeLocales);
|
|
210
211
|
const ariaLabel = status.secondary ? 'Multiple statuses' : status.primary;
|
|
211
212
|
const wrapperClass = generateDynamicStyles(status);
|
|
212
|
-
const ArrowDownIcon = (0, _f36components.generateIcon)({
|
|
213
|
-
name: 'ArrowDownIcon',
|
|
214
|
-
viewBox: '0 0 12 20',
|
|
215
|
-
path: /*#__PURE__*/ _react.default.createElement("path", {
|
|
216
|
-
d: "M3.03076 8C2.20109 8 1.73228 8.95209 2.23814 9.60971L5.20727 13.4696C5.60757 13.99 6.39223 13.99 6.79252 13.4696L9.76166 9.60971C10.2675 8.95209 9.79871 8 8.96904 8L3.03076 8Z",
|
|
217
|
-
fill: "currentColor"
|
|
218
|
-
})
|
|
219
|
-
});
|
|
220
213
|
if (isLoading) {
|
|
221
214
|
return /*#__PURE__*/ _react.default.createElement(_f36components.Skeleton.Container, {
|
|
222
215
|
className: styles.skeletonBadge
|
|
@@ -240,7 +233,7 @@ function ReleaseEntityStatusPopover({ releaseLocalesStatusMap, activeLocales, is
|
|
|
240
233
|
variant: _constants.RELEASE_BADGES[status.primary].variant,
|
|
241
234
|
onFocus: ()=>setIsOpen(true),
|
|
242
235
|
onBlur: ()=>setIsOpen(false),
|
|
243
|
-
endIcon: /*#__PURE__*/ _react.default.createElement(ArrowDownIcon, {
|
|
236
|
+
endIcon: /*#__PURE__*/ _react.default.createElement(_f36icons.ArrowDownIcon, {
|
|
244
237
|
color: _constants.RELEASE_BADGES[status.primary].icon
|
|
245
238
|
}),
|
|
246
239
|
onMouseOver: onMouseEnter,
|
package/dist/cjs/index.js
CHANGED
|
@@ -15,9 +15,6 @@ _export(exports, {
|
|
|
15
15
|
AppConfigAPI: function() {
|
|
16
16
|
return _appsdk.AppConfigAPI;
|
|
17
17
|
},
|
|
18
|
-
Asset: function() {
|
|
19
|
-
return _typesEntity.Asset;
|
|
20
|
-
},
|
|
21
18
|
BaseAppSDK: function() {
|
|
22
19
|
return _appsdk.BaseAppSDK;
|
|
23
20
|
},
|
|
@@ -36,9 +33,6 @@ _export(exports, {
|
|
|
36
33
|
DialogsAPI: function() {
|
|
37
34
|
return _appsdk.DialogsAPI;
|
|
38
35
|
},
|
|
39
|
-
Entry: function() {
|
|
40
|
-
return _typesEntity.Entry;
|
|
41
|
-
},
|
|
42
36
|
EntryAPI: function() {
|
|
43
37
|
return _appsdk.EntryAPI;
|
|
44
38
|
},
|
|
@@ -54,9 +48,6 @@ _export(exports, {
|
|
|
54
48
|
FieldConnector: function() {
|
|
55
49
|
return _FieldConnector.FieldConnector;
|
|
56
50
|
},
|
|
57
|
-
File: function() {
|
|
58
|
-
return _typesEntity.File;
|
|
59
|
-
},
|
|
60
51
|
IdsAPI: function() {
|
|
61
52
|
return _appsdk.IdsAPI;
|
|
62
53
|
},
|
|
@@ -111,7 +102,6 @@ const _CharCounter = require("./CharCounter");
|
|
|
111
102
|
const _CharValidation = require("./CharValidation");
|
|
112
103
|
const _FieldConnector = require("./FieldConnector");
|
|
113
104
|
const _PredefinedValuesError = require("./PredefinedValuesError");
|
|
114
|
-
const _typesEntity = require("./typesEntity");
|
|
115
105
|
const _isValidImage = require("./utils/isValidImage");
|
|
116
106
|
const _shortenStorageUnit = require("./utils/shortenStorageUnit");
|
|
117
107
|
_export_star(require("./types"), exports);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useRef, useState } from 'react';
|
|
2
|
-
import { EntityStatusBadge, Flex, Popover
|
|
2
|
+
import { EntityStatusBadge, Flex, Popover } from '@contentful/f36-components';
|
|
3
|
+
import { ArrowDownIcon } from '@contentful/f36-icons';
|
|
3
4
|
import tokens from '@contentful/f36-tokens';
|
|
4
5
|
import { cx, css } from 'emotion';
|
|
5
6
|
import * as entityHelpers from '../utils/entityHelpers';
|
|
@@ -93,14 +94,6 @@ const styles = {
|
|
|
93
94
|
padding: `${tokens.spacing2Xs} 0`
|
|
94
95
|
})
|
|
95
96
|
};
|
|
96
|
-
const ArrowDownIcon = generateIcon({
|
|
97
|
-
name: 'ArrowDownIcon',
|
|
98
|
-
viewBox: '0 0 12 20',
|
|
99
|
-
path: /*#__PURE__*/ React.createElement("path", {
|
|
100
|
-
d: "M3.03076 8C2.20109 8 1.73228 8.95209 2.23814 9.60971L5.20727 13.4696C5.60757 13.99 6.39223 13.99 6.79252 13.4696L9.76166 9.60971C10.2675 8.95209 9.79871 8 8.96904 8L3.03076 8Z",
|
|
101
|
-
fill: "currentColor"
|
|
102
|
-
})
|
|
103
|
-
});
|
|
104
97
|
const determineBadgeStatus = (localesStatusMap, activeLocales)=>{
|
|
105
98
|
if (!localesStatusMap) return;
|
|
106
99
|
if (localesStatusMap.size === 1 || activeLocales && activeLocales.length === 1) return {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useRef, useState } from 'react';
|
|
2
|
-
import { Badge, Flex,
|
|
2
|
+
import { Badge, Flex, Popover, Skeleton } from '@contentful/f36-components';
|
|
3
|
+
import { ArrowDownIcon } from '@contentful/f36-icons';
|
|
3
4
|
import tokens from '@contentful/f36-tokens';
|
|
4
5
|
import { cx, css } from 'emotion';
|
|
5
6
|
import { RELEASE_BADGES } from './constants';
|
|
@@ -153,14 +154,6 @@ export function ReleaseEntityStatusPopover({ releaseLocalesStatusMap, activeLoca
|
|
|
153
154
|
const status = determineBadgeStatus(releaseLocalesStatusMap, activeLocales);
|
|
154
155
|
const ariaLabel = status.secondary ? 'Multiple statuses' : status.primary;
|
|
155
156
|
const wrapperClass = generateDynamicStyles(status);
|
|
156
|
-
const ArrowDownIcon = generateIcon({
|
|
157
|
-
name: 'ArrowDownIcon',
|
|
158
|
-
viewBox: '0 0 12 20',
|
|
159
|
-
path: /*#__PURE__*/ React.createElement("path", {
|
|
160
|
-
d: "M3.03076 8C2.20109 8 1.73228 8.95209 2.23814 9.60971L5.20727 13.4696C5.60757 13.99 6.39223 13.99 6.79252 13.4696L9.76166 9.60971C10.2675 8.95209 9.79871 8 8.96904 8L3.03076 8Z",
|
|
161
|
-
fill: "currentColor"
|
|
162
|
-
})
|
|
163
|
-
});
|
|
164
157
|
if (isLoading) {
|
|
165
158
|
return /*#__PURE__*/ React.createElement(Skeleton.Container, {
|
|
166
159
|
className: styles.skeletonBadge
|
package/dist/esm/index.js
CHANGED
|
@@ -9,7 +9,6 @@ export { entityHelpers };
|
|
|
9
9
|
export { FieldConnector } from './FieldConnector';
|
|
10
10
|
export { ModalDialogLauncher };
|
|
11
11
|
export { PredefinedValuesError } from './PredefinedValuesError';
|
|
12
|
-
export { Asset, Entry, File } from './typesEntity';
|
|
13
12
|
export { isValidImage } from './utils/isValidImage';
|
|
14
13
|
export { shortenStorageUnit, toLocaleString } from './utils/shortenStorageUnit';
|
|
15
14
|
export * from './types';
|
|
@@ -8,5 +8,5 @@ type LocalePublishingPopoverProps = {
|
|
|
8
8
|
activeLocales?: Pick<LocaleProps, 'code'>[];
|
|
9
9
|
localesStatusMap?: LocalePublishStatusMap;
|
|
10
10
|
};
|
|
11
|
-
export declare function LocalePublishingPopover({ entity, jobs, isScheduled, localesStatusMap, activeLocales
|
|
11
|
+
export declare function LocalePublishingPopover({ entity, jobs, isScheduled, localesStatusMap, activeLocales }: LocalePublishingPopoverProps): React.JSX.Element;
|
|
12
12
|
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { entityHelpers };
|
|
|
9
9
|
export { FieldConnector } from './FieldConnector';
|
|
10
10
|
export { ModalDialogLauncher };
|
|
11
11
|
export { PredefinedValuesError } from './PredefinedValuesError';
|
|
12
|
-
export { Asset, Entry, File } from './typesEntity';
|
|
12
|
+
export type { Asset, Entry, File } from './typesEntity';
|
|
13
13
|
export { isValidImage } from './utils/isValidImage';
|
|
14
14
|
export { shortenStorageUnit, toLocaleString } from './utils/shortenStorageUnit';
|
|
15
15
|
export type { FieldConnectorChildProps } from './FieldConnector';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-shared",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.2",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@contentful/app-sdk": "^4.29.0",
|
|
40
|
-
"@contentful/field-editor-test-utils": "^1.6.
|
|
40
|
+
"@contentful/field-editor-test-utils": "^1.6.1",
|
|
41
41
|
"@lingui/core": "5.3.0",
|
|
42
|
-
"@testing-library/react": "16.0
|
|
42
|
+
"@testing-library/react": "16.3.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@contentful/f36-components": "
|
|
46
|
-
"@contentful/f36-note": "^
|
|
47
|
-
"@contentful/f36-tokens": "
|
|
45
|
+
"@contentful/f36-components": "5.1.1",
|
|
46
|
+
"@contentful/f36-note": "^5.1.0",
|
|
47
|
+
"@contentful/f36-tokens": "5.1.0",
|
|
48
48
|
"contentful-management": "^11.45.1",
|
|
49
49
|
"emotion": "^10.0.17",
|
|
50
50
|
"fast-deep-equal": "^3.1.3",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"registry": "https://npm.pkg.github.com/"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "8ab6bd7a3ce2979634ab53673c6b122a6b1b5efb"
|
|
62
62
|
}
|