@atlaskit/editor-plugin-limited-mode 3.0.1 → 3.0.3

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,20 @@
1
1
  # @atlaskit/editor-plugin-limited-mode
2
2
 
3
+ ## 3.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 3.0.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`c59b674ee234d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c59b674ee234d) -
14
+ NOISSUE - Update limited mode messages and move to editor-common so they can be picked up for
15
+ translation.
16
+ - Updated dependencies
17
+
3
18
  ## 3.0.1
4
19
 
5
20
  ### Patch Changes
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  var _typeof = require("@babel/runtime/helpers/typeof");
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
@@ -9,11 +8,11 @@ exports.limitedModePlugin = void 0;
9
8
  var _react = _interopRequireWildcard(require("react"));
10
9
  var _bindEventListener = require("bind-event-listener");
11
10
  var _reactIntlNext = require("react-intl-next");
11
+ var _messages = require("@atlaskit/editor-common/messages");
12
12
  var _usePluginStateEffect = require("@atlaskit/editor-common/use-plugin-state-effect");
13
13
  var _compiled = require("@atlaskit/primitives/compiled");
14
14
  var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
15
15
  var _main = require("./pm-plugins/main");
16
- var _messages = _interopRequireDefault(require("./pm-plugins/messages"));
17
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
18
17
  var limitedModePlugin = exports.limitedModePlugin = function limitedModePlugin(_ref) {
19
18
  var _ref$config = _ref.config,
@@ -59,15 +58,15 @@ var limitedModePlugin = exports.limitedModePlugin = function limitedModePlugin(_
59
58
  if (isLimitedModeEnabled && hasEditorBeenFocusedRef.current && !hasShownFlagRef.current) {
60
59
  var _options$showFlag;
61
60
  void ((_options$showFlag = options.showFlag) === null || _options$showFlag === void 0 ? void 0 : _options$showFlag.call(options, {
62
- title: formatMessage(_messages.default.limitedModeTitle),
63
- description: _learnMoreLink ? formatMessage(_messages.default.limitedModeDescriptionWithLink, {
61
+ title: formatMessage(_messages.limitedModeMessages.limitedModeTitle),
62
+ description: _learnMoreLink ? formatMessage(_messages.limitedModeMessages.limitedModeDescriptionWithLink, {
64
63
  learnMoreLink: function learnMoreLink(chunks) {
65
64
  return /*#__PURE__*/_react.default.createElement(_compiled.Anchor, {
66
65
  target: "_blank",
67
66
  href: _learnMoreLink
68
67
  }, chunks);
69
68
  }
70
- }) : formatMessage(_messages.default.limitedModeDescriptionWithoutLink),
69
+ }) : formatMessage(_messages.limitedModeMessages.limitedModeDescriptionWithoutLink),
71
70
  close: 'auto'
72
71
  }));
73
72
  hasShownFlagRef.current = true;
@@ -1,11 +1,11 @@
1
1
  import React, { useRef, useEffect, useCallback } from 'react';
2
2
  import { bind } from 'bind-event-listener';
3
3
  import { useIntl } from 'react-intl-next';
4
+ import { limitedModeMessages } from '@atlaskit/editor-common/messages';
4
5
  import { usePluginStateEffect } from '@atlaskit/editor-common/use-plugin-state-effect';
5
6
  import { Anchor } from '@atlaskit/primitives/compiled';
6
7
  import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
7
8
  import { createPlugin, limitedModePluginKey } from './pm-plugins/main';
8
- import messages from './pm-plugins/messages';
9
9
  export const limitedModePlugin = ({
10
10
  config: options = {},
11
11
  api
@@ -52,13 +52,13 @@ export const limitedModePlugin = ({
52
52
  if (isLimitedModeEnabled && hasEditorBeenFocusedRef.current && !hasShownFlagRef.current) {
53
53
  var _options$showFlag;
54
54
  void ((_options$showFlag = options.showFlag) === null || _options$showFlag === void 0 ? void 0 : _options$showFlag.call(options, {
55
- title: formatMessage(messages.limitedModeTitle),
56
- description: learnMoreLink ? formatMessage(messages.limitedModeDescriptionWithLink, {
55
+ title: formatMessage(limitedModeMessages.limitedModeTitle),
56
+ description: learnMoreLink ? formatMessage(limitedModeMessages.limitedModeDescriptionWithLink, {
57
57
  learnMoreLink: chunks => /*#__PURE__*/React.createElement(Anchor, {
58
58
  target: "_blank",
59
59
  href: learnMoreLink
60
60
  }, chunks)
61
- }) : formatMessage(messages.limitedModeDescriptionWithoutLink),
61
+ }) : formatMessage(limitedModeMessages.limitedModeDescriptionWithoutLink),
62
62
  close: 'auto'
63
63
  }));
64
64
  hasShownFlagRef.current = true;
@@ -1,11 +1,11 @@
1
1
  import React, { useRef, useEffect, useCallback } from 'react';
2
2
  import { bind } from 'bind-event-listener';
3
3
  import { useIntl } from 'react-intl-next';
4
+ import { limitedModeMessages } from '@atlaskit/editor-common/messages';
4
5
  import { usePluginStateEffect } from '@atlaskit/editor-common/use-plugin-state-effect';
5
6
  import { Anchor } from '@atlaskit/primitives/compiled';
6
7
  import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
7
8
  import { createPlugin, limitedModePluginKey } from './pm-plugins/main';
8
- import messages from './pm-plugins/messages';
9
9
  export var limitedModePlugin = function limitedModePlugin(_ref) {
10
10
  var _ref$config = _ref.config,
11
11
  options = _ref$config === void 0 ? {} : _ref$config,
@@ -50,15 +50,15 @@ export var limitedModePlugin = function limitedModePlugin(_ref) {
50
50
  if (isLimitedModeEnabled && hasEditorBeenFocusedRef.current && !hasShownFlagRef.current) {
51
51
  var _options$showFlag;
52
52
  void ((_options$showFlag = options.showFlag) === null || _options$showFlag === void 0 ? void 0 : _options$showFlag.call(options, {
53
- title: formatMessage(messages.limitedModeTitle),
54
- description: _learnMoreLink ? formatMessage(messages.limitedModeDescriptionWithLink, {
53
+ title: formatMessage(limitedModeMessages.limitedModeTitle),
54
+ description: _learnMoreLink ? formatMessage(limitedModeMessages.limitedModeDescriptionWithLink, {
55
55
  learnMoreLink: function learnMoreLink(chunks) {
56
56
  return /*#__PURE__*/React.createElement(Anchor, {
57
57
  target: "_blank",
58
58
  href: _learnMoreLink
59
59
  }, chunks);
60
60
  }
61
- }) : formatMessage(messages.limitedModeDescriptionWithoutLink),
61
+ }) : formatMessage(limitedModeMessages.limitedModeDescriptionWithoutLink),
62
62
  close: 'auto'
63
63
  }));
64
64
  hasShownFlagRef.current = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-limited-mode",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "LimitedMode plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,14 +29,14 @@
29
29
  "atlaskit:src": "src/index.ts",
30
30
  "dependencies": {
31
31
  "@atlaskit/editor-prosemirror": "7.0.0",
32
- "@atlaskit/primitives": "^14.15.0",
33
- "@atlaskit/tmp-editor-statsig": "^13.0.0",
32
+ "@atlaskit/primitives": "^15.0.0",
33
+ "@atlaskit/tmp-editor-statsig": "^13.10.0",
34
34
  "@babel/runtime": "^7.0.0",
35
35
  "bind-event-listener": "^3.0.0",
36
36
  "react-intl-next": "npm:react-intl@^5.18.1"
37
37
  },
38
38
  "peerDependencies": {
39
- "@atlaskit/editor-common": "^110.4.0",
39
+ "@atlaskit/editor-common": "^110.12.0",
40
40
  "react": "^18.2.0"
41
41
  },
42
42
  "devDependencies": {
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _reactIntlNext = require("react-intl-next");
8
- // Disable no-re-export rule for entry point files
9
- /* eslint-disable @atlaskit/editor/no-re-export */
10
- var _default = exports.default = (0, _reactIntlNext.defineMessages)({
11
- limitedModeTitle: {
12
- id: 'fabric.editor.limitedModeTitle',
13
- defaultMessage: 'Speed Improvements',
14
- description: 'Title for flag shown when some functionality is disabled in a page in order to improve the pages speed.'
15
- },
16
- limitedModeDescriptionWithLink: {
17
- id: 'fabric.editor.limitedModeDescription',
18
- defaultMessage: 'To increase speed and response time <learnMoreLink>some editing features are limited.</learnMoreLink>',
19
- description: 'Description for flag shown when some functionality is disabled in a page in order to improve the pages speed. This description contains a link to learn more about limited mode.'
20
- },
21
- limitedModeDescriptionWithoutLink: {
22
- id: 'fabric.editor.limitedModeDescriptionWithoutLink',
23
- defaultMessage: 'To increase speed and response time some editing features are limited.',
24
- description: 'Description for flag shown when some functionality is disabled in a page in order to improve the pages speed. This description does not contain a link to learn more about limited mode.'
25
- }
26
- });
@@ -1,21 +0,0 @@
1
- // Disable no-re-export rule for entry point files
2
- /* eslint-disable @atlaskit/editor/no-re-export */
3
-
4
- import { defineMessages } from 'react-intl-next';
5
- export default defineMessages({
6
- limitedModeTitle: {
7
- id: 'fabric.editor.limitedModeTitle',
8
- defaultMessage: 'Speed Improvements',
9
- description: 'Title for flag shown when some functionality is disabled in a page in order to improve the pages speed.'
10
- },
11
- limitedModeDescriptionWithLink: {
12
- id: 'fabric.editor.limitedModeDescription',
13
- defaultMessage: 'To increase speed and response time <learnMoreLink>some editing features are limited.</learnMoreLink>',
14
- description: 'Description for flag shown when some functionality is disabled in a page in order to improve the pages speed. This description contains a link to learn more about limited mode.'
15
- },
16
- limitedModeDescriptionWithoutLink: {
17
- id: 'fabric.editor.limitedModeDescriptionWithoutLink',
18
- defaultMessage: 'To increase speed and response time some editing features are limited.',
19
- description: 'Description for flag shown when some functionality is disabled in a page in order to improve the pages speed. This description does not contain a link to learn more about limited mode.'
20
- }
21
- });
@@ -1,21 +0,0 @@
1
- // Disable no-re-export rule for entry point files
2
- /* eslint-disable @atlaskit/editor/no-re-export */
3
-
4
- import { defineMessages } from 'react-intl-next';
5
- export default defineMessages({
6
- limitedModeTitle: {
7
- id: 'fabric.editor.limitedModeTitle',
8
- defaultMessage: 'Speed Improvements',
9
- description: 'Title for flag shown when some functionality is disabled in a page in order to improve the pages speed.'
10
- },
11
- limitedModeDescriptionWithLink: {
12
- id: 'fabric.editor.limitedModeDescription',
13
- defaultMessage: 'To increase speed and response time <learnMoreLink>some editing features are limited.</learnMoreLink>',
14
- description: 'Description for flag shown when some functionality is disabled in a page in order to improve the pages speed. This description contains a link to learn more about limited mode.'
15
- },
16
- limitedModeDescriptionWithoutLink: {
17
- id: 'fabric.editor.limitedModeDescriptionWithoutLink',
18
- defaultMessage: 'To increase speed and response time some editing features are limited.',
19
- description: 'Description for flag shown when some functionality is disabled in a page in order to improve the pages speed. This description does not contain a link to learn more about limited mode.'
20
- }
21
- });
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- limitedModeTitle: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- limitedModeDescriptionWithLink: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- limitedModeDescriptionWithoutLink: {
13
- id: string;
14
- defaultMessage: string;
15
- description: string;
16
- };
17
- };
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- limitedModeTitle: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- limitedModeDescriptionWithLink: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- limitedModeDescriptionWithoutLink: {
13
- id: string;
14
- defaultMessage: string;
15
- description: string;
16
- };
17
- };
18
- export default _default;