@contentful/field-editor-shared 1.7.0 → 1.7.1

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.
@@ -17,6 +17,12 @@ function _interop_require_default(obj) {
17
17
  default: obj
18
18
  };
19
19
  }
20
+ var ScheduledActionTypes;
21
+ (function(ScheduledActionTypes) {
22
+ ScheduledActionTypes["publish"] = "publish";
23
+ ScheduledActionTypes["unpublish"] = "unpublish";
24
+ ScheduledActionTypes["patch+publish"] = "patch+publish";
25
+ })(ScheduledActionTypes || (ScheduledActionTypes = {}));
20
26
  function ScheduledBanner({ entityId, jobs }) {
21
27
  const scheduledJobs = jobs.filter((job)=>job.entity.sys.id === entityId);
22
28
  const sortedScheduledJobs = (0, _lodash.orderBy)(scheduledJobs, [
@@ -30,7 +36,7 @@ function ScheduledBanner({ entityId, jobs }) {
30
36
  }
31
37
  const pendingJobsCount = scheduledJobs.length - 1;
32
38
  const lowerCaseAction = scheduledAction.action.toLowerCase();
33
- const action = lowerCaseAction === ScheduledActionTypes['patch+publish'] ? `${lowerCaseAction} (via Schedule Series)` : lowerCaseAction;
39
+ const action = lowerCaseAction === "patch+publish" ? `${lowerCaseAction} (via Schedule Series)` : lowerCaseAction;
34
40
  return _react.default.createElement(_Banner.Banner, {
35
41
  content: `All locales are scheduled to ${action} on:`,
36
42
  highlight: `${(0, _f36components.formatDateAndTime)(scheduledAction.scheduledFor.datetime)}${pendingJobsCount > 0 ? ` [and +${pendingJobsCount} more]` : ''}`
@@ -2,6 +2,12 @@ import React from 'react';
2
2
  import { formatDateAndTime } from '@contentful/f36-components';
3
3
  import { orderBy } from 'lodash';
4
4
  import { Banner } from './Banner';
5
+ var ScheduledActionTypes;
6
+ (function(ScheduledActionTypes) {
7
+ ScheduledActionTypes["publish"] = "publish";
8
+ ScheduledActionTypes["unpublish"] = "unpublish";
9
+ ScheduledActionTypes["patch+publish"] = "patch+publish";
10
+ })(ScheduledActionTypes || (ScheduledActionTypes = {}));
5
11
  export function ScheduledBanner({ entityId, jobs }) {
6
12
  const scheduledJobs = jobs.filter((job)=>job.entity.sys.id === entityId);
7
13
  const sortedScheduledJobs = orderBy(scheduledJobs, [
@@ -15,7 +21,7 @@ export function ScheduledBanner({ entityId, jobs }) {
15
21
  }
16
22
  const pendingJobsCount = scheduledJobs.length - 1;
17
23
  const lowerCaseAction = scheduledAction.action.toLowerCase();
18
- const action = lowerCaseAction === ScheduledActionTypes['patch+publish'] ? `${lowerCaseAction} (via Schedule Series)` : lowerCaseAction;
24
+ const action = lowerCaseAction === "patch+publish" ? `${lowerCaseAction} (via Schedule Series)` : lowerCaseAction;
19
25
  return React.createElement(Banner, {
20
26
  content: `All locales are scheduled to ${action} on:`,
21
27
  highlight: `${formatDateAndTime(scheduledAction.scheduledFor.datetime)}${pendingJobsCount > 0 ? ` [and +${pendingJobsCount} more]` : ''}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-shared",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -54,5 +54,5 @@
54
54
  "publishConfig": {
55
55
  "registry": "https://npm.pkg.github.com/"
56
56
  },
57
- "gitHead": "d734036ff89da141dbb91ade0342fb7f82cfe167"
57
+ "gitHead": "4f029f8d8ad0d8b8e270db4619fa1e8fb278a509"
58
58
  }