@atlaskit/editor-plugin-date 10.0.32 → 12.0.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 CHANGED
@@ -1,5 +1,52 @@
1
1
  # @atlaskit/editor-plugin-date
2
2
 
3
+ ## 12.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`901c87a57486e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/901c87a57486e) -
8
+ Removed `react-intl-next` alias and replaced all usages with `react-intl` directly.
9
+
10
+ What changed: The `react-intl-next` npm alias (which resolved to `react-intl@^5`) has been
11
+ removed. All imports now reference `react-intl` directly, and `peerDependencies` have been updated
12
+ to `"^5.25.1 || ^6.0.0 || ^7.0.0"`.
13
+
14
+ How consumer should update their code: Ensure `react-intl` is installed at a version satisfying
15
+ `^5.25.1 || ^6.0.0 || ^7.0.0`. If your application was using `react-intl-next` as an npm alias, it
16
+ can be safely removed. Replace any remaining `react-intl-next` imports with `react-intl`.
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
22
+ ## 11.0.0
23
+
24
+ ### Patch Changes
25
+
26
+ - [`b10c935ca9497`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b10c935ca9497) -
27
+ Removed deprecated `browser` singleton from editor-common. This has been replaced with a
28
+ `getBrowserInfo` function that returns the same information. This change was made to avoid issues
29
+ with module loading order and to provide a more consistent API for accessing browser information.
30
+
31
+ Please update any imports of `browser` to use `getBrowserInfo` instead. For example, the following
32
+ imports have been removed:
33
+
34
+ ```javascript
35
+ import { browser } from '@atlaskit/editor-common/utils';
36
+ import { browser } from '@atlaskit/editor-common/browser';
37
+ ```
38
+
39
+ Instead, please use:
40
+
41
+ ```javascript
42
+ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
43
+ ```
44
+
45
+ If you were previously using `browser.ie_version`, you would now use
46
+ `getBrowserInfo().ie_version`.
47
+
48
+ - Updated dependencies
49
+
3
50
  ## 10.0.32
4
51
 
5
52
  ### Patch Changes
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.dateToDOM = exports.dateNodeSpec = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _reactIntlNext = require("react-intl-next");
9
+ var _reactIntl = require("react-intl");
10
+ var _browser = require("@atlaskit/editor-common/browser");
10
11
  var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
11
12
  var _utils = require("@atlaskit/editor-common/utils");
12
13
  var _whitespace = require("@atlaskit/editor-common/whitespace");
@@ -17,7 +18,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
17
18
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18
19
  var intlRef;
19
20
  var dateNodeSpec = exports.dateNodeSpec = function dateNodeSpec(node) {
20
- intlRef = intlRef || (0, _reactIntlNext.createIntl)({
21
+ intlRef = intlRef || (0, _reactIntl.createIntl)({
21
22
  locale: document.documentElement.lang || 'en-US'
22
23
  });
23
24
  var timestamp = node.attrs.timestamp;
@@ -75,7 +76,7 @@ var dateToDOM = exports.dateToDOM = function dateToDOM(node, state, getPos, intl
75
76
  class: 'zeroWidthSpaceContainer'
76
77
  }, ['span', {
77
78
  class: 'inlineNodeViewAddZeroWidthSpace'
78
- }, _whitespace.ZERO_WIDTH_SPACE]], ['span', wrapperAttrs, ['span', attrs, displayString]], _utils.browser.android ? ['span', {
79
+ }, _whitespace.ZERO_WIDTH_SPACE]], ['span', wrapperAttrs, ['span', attrs, displayString]], (0, _browser.getBrowserInfo)().android ? ['span', {
79
80
  class: 'zeroWidthSpaceContainer',
80
81
  contentEditable: 'false'
81
82
  }, ['span', {
@@ -15,7 +15,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
15
15
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
17
  var _react = _interopRequireDefault(require("react"));
18
- var _reactIntlNext = require("react-intl-next");
18
+ var _reactIntl = require("react-intl");
19
19
  var _analytics = require("@atlaskit/editor-common/analytics");
20
20
  var _messages = require("@atlaskit/editor-common/messages");
21
21
  var _form = require("@atlaskit/form");
@@ -239,5 +239,5 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
239
239
  }
240
240
  }]);
241
241
  }(_react.default.Component); // eslint-disable-next-line @typescript-eslint/ban-types
242
- var _default_1 = (0, _reactIntlNext.injectIntl)(DatePickerInput);
242
+ var _default_1 = (0, _reactIntl.injectIntl)(DatePickerInput);
243
243
  var _default = exports.default = _default_1;
@@ -15,7 +15,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
15
15
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
17
  var _react = _interopRequireDefault(require("react"));
18
- var _reactIntlNext = require("react-intl-next");
18
+ var _reactIntl = require("react-intl");
19
19
  var _calendar = _interopRequireDefault(require("@atlaskit/calendar"));
20
20
  var _analytics = require("@atlaskit/editor-common/analytics");
21
21
  var _messages = require("@atlaskit/editor-common/messages");
@@ -186,5 +186,5 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
186
186
  }
187
187
  }]);
188
188
  }(_react.default.Component); // eslint-disable-next-line @typescript-eslint/ban-types
189
- var _default_1 = (0, _reactIntlNext.injectIntl)(DatePicker);
189
+ var _default_1 = (0, _reactIntl.injectIntl)(DatePicker);
190
190
  var _default = exports.default = _default_1;
@@ -1,6 +1,7 @@
1
- import { createIntl } from 'react-intl-next';
1
+ import { createIntl } from 'react-intl';
2
+ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
2
3
  import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
3
- import { browser, timestampToString } from '@atlaskit/editor-common/utils';
4
+ import { timestampToString } from '@atlaskit/editor-common/utils';
4
5
  import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
5
6
  import { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -66,7 +67,7 @@ export const dateToDOM = (node, state, getPos, intl) => {
66
67
  class: 'zeroWidthSpaceContainer'
67
68
  }, ['span', {
68
69
  class: 'inlineNodeViewAddZeroWidthSpace'
69
- }, ZERO_WIDTH_SPACE]], ['span', wrapperAttrs, ['span', attrs, displayString]], browser.android ? ['span', {
70
+ }, ZERO_WIDTH_SPACE]], ['span', wrapperAttrs, ['span', attrs, displayString]], getBrowserInfo().android ? ['span', {
70
71
  class: 'zeroWidthSpaceContainer',
71
72
  contentEditable: 'false'
72
73
  }, ['span', {
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import "./date-picker-input.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import React from 'react';
6
- import { injectIntl } from 'react-intl-next';
6
+ import { injectIntl } from 'react-intl';
7
7
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
8
8
  import { dateMessages as messages } from '@atlaskit/editor-common/messages';
9
9
  import { ErrorMessage } from '@atlaskit/form';
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import "./index.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import React from 'react';
6
- import { injectIntl } from 'react-intl-next';
6
+ import { injectIntl } from 'react-intl';
7
7
  import Calendar from '@atlaskit/calendar';
8
8
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
9
9
  import { dateMessages as messages } from '@atlaskit/editor-common/messages';
@@ -1,9 +1,10 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- import { createIntl } from 'react-intl-next';
4
+ import { createIntl } from 'react-intl';
5
+ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
5
6
  import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
6
- import { browser, timestampToString } from '@atlaskit/editor-common/utils';
7
+ import { timestampToString } from '@atlaskit/editor-common/utils';
7
8
  import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
8
9
  import { fg } from '@atlaskit/platform-feature-flags';
9
10
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -68,7 +69,7 @@ export var dateToDOM = function dateToDOM(node, state, getPos, intl) {
68
69
  class: 'zeroWidthSpaceContainer'
69
70
  }, ['span', {
70
71
  class: 'inlineNodeViewAddZeroWidthSpace'
71
- }, ZERO_WIDTH_SPACE]], ['span', wrapperAttrs, ['span', attrs, displayString]], browser.android ? ['span', {
72
+ }, ZERO_WIDTH_SPACE]], ['span', wrapperAttrs, ['span', attrs, displayString]], getBrowserInfo().android ? ['span', {
72
73
  class: 'zeroWidthSpaceContainer',
73
74
  contentEditable: 'false'
74
75
  }, ['span', {
@@ -10,7 +10,7 @@ import { ax, ix } from "@compiled/react/runtime";
10
10
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
11
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
12
  import React from 'react';
13
- import { injectIntl } from 'react-intl-next';
13
+ import { injectIntl } from 'react-intl';
14
14
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
15
15
  import { dateMessages as messages } from '@atlaskit/editor-common/messages';
16
16
  import { ErrorMessage } from '@atlaskit/form';
@@ -10,7 +10,7 @@ import { ax, ix } from "@compiled/react/runtime";
10
10
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
11
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
12
  import React from 'react';
13
- import { injectIntl } from 'react-intl-next';
13
+ import { injectIntl } from 'react-intl';
14
14
  import Calendar from '@atlaskit/calendar';
15
15
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
16
16
  import { dateMessages as messages } from '@atlaskit/editor-common/messages';
@@ -1,4 +1,4 @@
1
- import type { IntlShape } from 'react-intl-next';
1
+ import type { IntlShape } from 'react-intl';
2
2
  import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
3
3
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
@@ -1,4 +1,4 @@
1
- import type { IntlShape } from 'react-intl-next';
1
+ import type { IntlShape } from 'react-intl';
2
2
  import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
3
3
  import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
@@ -1,4 +1,4 @@
1
- import type { IntlShape } from 'react-intl-next';
1
+ import type { IntlShape } from 'react-intl';
2
2
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
3
  type DateInformation = {
4
4
  color: 'red' | undefined;
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
6
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
7
7
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
8
8
  import type { DateType } from '../../types';
9
9
  export interface InputProps {
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
6
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
7
7
  import type { WeekDay } from '@atlaskit/calendar/types';
8
8
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
9
9
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
@@ -1,4 +1,4 @@
1
- import type { IntlShape } from 'react-intl-next';
1
+ import type { IntlShape } from 'react-intl';
2
2
  import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
3
3
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
@@ -1,4 +1,4 @@
1
- import type { IntlShape } from 'react-intl-next';
1
+ import type { IntlShape } from 'react-intl';
2
2
  import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
3
3
  import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
@@ -1,4 +1,4 @@
1
- import type { IntlShape } from 'react-intl-next';
1
+ import type { IntlShape } from 'react-intl';
2
2
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
3
  type DateInformation = {
4
4
  color: 'red' | undefined;
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
6
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
7
7
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
8
8
  import type { DateType } from '../../types';
9
9
  export interface InputProps {
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
6
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
7
7
  import type { WeekDay } from '@atlaskit/calendar/types';
8
8
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
9
9
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-date",
3
- "version": "10.0.32",
3
+ "version": "12.0.0",
4
4
  "description": "Date plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,36 +29,37 @@
29
29
  ],
30
30
  "atlaskit:src": "src/index.ts",
31
31
  "dependencies": {
32
- "@atlaskit/adf-schema": "^52.4.0",
32
+ "@atlaskit/adf-schema": "^52.5.0",
33
33
  "@atlaskit/calendar": "^17.2.0",
34
34
  "@atlaskit/css": "^0.19.0",
35
- "@atlaskit/editor-plugin-analytics": "^8.0.0",
36
- "@atlaskit/editor-plugin-annotation": "^8.0.0",
37
- "@atlaskit/editor-plugin-editor-disabled": "^8.0.0",
38
- "@atlaskit/editor-plugin-editor-viewmode": "^10.0.0",
35
+ "@atlaskit/editor-plugin-analytics": "^10.0.0",
36
+ "@atlaskit/editor-plugin-annotation": "^10.0.0",
37
+ "@atlaskit/editor-plugin-editor-disabled": "^10.0.0",
38
+ "@atlaskit/editor-plugin-editor-viewmode": "^12.0.0",
39
39
  "@atlaskit/editor-prosemirror": "^7.3.0",
40
40
  "@atlaskit/editor-shared-styles": "^3.10.0",
41
41
  "@atlaskit/form": "^15.5.0",
42
- "@atlaskit/icon": "^34.1.0",
43
- "@atlaskit/locale": "^4.0.0",
42
+ "@atlaskit/icon": "^34.2.0",
43
+ "@atlaskit/locale": "^4.1.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/textfield": "^8.3.0",
46
- "@atlaskit/tmp-editor-statsig": "^62.0.0",
46
+ "@atlaskit/tmp-editor-statsig": "^62.4.0",
47
47
  "@atlaskit/tokens": "^13.0.0",
48
48
  "@atlaskit/visually-hidden": "^3.0.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "bind-event-listener": "^3.0.0",
51
51
  "date-fns": "^2.17.0",
52
- "react-intl-next": "npm:react-intl@^5.18.1",
53
52
  "react-loadable": "^5.1.0"
54
53
  },
55
54
  "devDependencies": {
56
- "@testing-library/react": "^16.3.0"
55
+ "@testing-library/react": "^16.3.0",
56
+ "react-intl": "^6.6.2"
57
57
  },
58
58
  "peerDependencies": {
59
- "@atlaskit/editor-common": "^112.21.0",
59
+ "@atlaskit/editor-common": "^114.0.0",
60
60
  "react": "^18.2.0",
61
- "react-dom": "^18.2.0"
61
+ "react-dom": "^18.2.0",
62
+ "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
62
63
  },
63
64
  "techstack": {
64
65
  "@atlassian/frontend": {