@atlaskit/editor-plugin-date 17.0.13 → 17.0.15

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,21 @@
1
1
  # @atlaskit/editor-plugin-date
2
2
 
3
+ ## 17.0.15
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 17.0.14
10
+
11
+ ### Patch Changes
12
+
13
+ - [`656801b9e097c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/656801b9e097c) -
14
+ VOLTC-331 - Migrate updated package usage in platform/editor: rewrite barrel imports of
15
+ voltCompliant provider packages to deep/subpath imports (consumer-side debarrel). No public API
16
+ changes.
17
+ - Updated dependencies
18
+
3
19
  ## 17.0.13
4
20
 
5
21
  ### Patch Changes
@@ -20,7 +20,7 @@ var _utils = require("@atlaskit/editor-common/utils");
20
20
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
21
21
  var _comment = _interopRequireDefault(require("@atlaskit/icon/core/comment"));
22
22
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
23
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
23
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
24
24
  var _actions = require("./pm-plugins/actions");
25
25
  var _commands = require("./pm-plugins/commands");
26
26
  var _keymap = _interopRequireDefault(require("./pm-plugins/keymap"));
@@ -184,7 +184,7 @@ var datePlugin = function datePlugin(_ref3) {
184
184
  nodes: function nodes() {
185
185
  return [{
186
186
  name: 'date',
187
- node: (0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid') ? _adfSchema.dateWithLocalId : _adfSchema.date
187
+ node: (0, _fg.fg)('platform_editor_adf_with_localid') ? _adfSchema.dateWithLocalId : _adfSchema.date
188
188
  }];
189
189
  },
190
190
  pmPlugins: function pmPlugins() {
@@ -9,7 +9,7 @@ var _browser = require("@atlaskit/editor-common/browser");
9
9
  var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
10
10
  var _utils = require("@atlaskit/editor-common/utils");
11
11
  var _whitespace = require("@atlaskit/editor-common/whitespace");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
13
13
  var _utils2 = require("./utils");
14
14
  var intlRef;
15
15
  var dateNodeSpec = exports.dateNodeSpec = function dateNodeSpec(node) {
@@ -53,7 +53,7 @@ var dateToDOM = exports.dateToDOM = function dateToDOM(node, state, getPos, intl
53
53
  'data-timestamp': timestamp,
54
54
  draggable: 'true'
55
55
  };
56
- if ((0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid')) {
56
+ if ((0, _fg.fg)('platform_editor_adf_with_localid')) {
57
57
  nodeWrapperAttrs['data-local-id'] = node.attrs.localId;
58
58
  }
59
59
  var wrapperAttrs = {
@@ -9,7 +9,7 @@ var _utils = require("@atlaskit/editor-common/utils");
9
9
  var _model = require("@atlaskit/editor-prosemirror/model");
10
10
  var _state = require("@atlaskit/editor-prosemirror/state");
11
11
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
13
13
  var _internal = require("../ui/DatePicker/utils/internal");
14
14
  var _pluginKey = require("./plugin-key");
15
15
  /** Delete the date and close the datepicker */
@@ -48,7 +48,7 @@ var insertDateCommand = exports.insertDateCommand = function insertDateCommand(p
48
48
  }
49
49
  if (inputMethod) {
50
50
  var _pluginInjectionApi$a;
51
- var resolvedInputMethod = (0, _platformFeatureFlags.fg)('platform_editor_element_browser_analytic') ? inputMethod : _analytics.INPUT_METHOD.QUICK_INSERT;
51
+ var resolvedInputMethod = (0, _fg.fg)('platform_editor_element_browser_analytic') ? inputMethod : _analytics.INPUT_METHOD.QUICK_INSERT;
52
52
  pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 || (_pluginInjectionApi$a = _pluginInjectionApi$a.actions) === null || _pluginInjectionApi$a === void 0 || _pluginInjectionApi$a.attachAnalyticsEvent({
53
53
  action: _analytics.ACTION.INSERTED,
54
54
  actionSubject: _analytics.ACTION_SUBJECT.DOCUMENT,
@@ -18,9 +18,9 @@ var _react = _interopRequireDefault(require("react"));
18
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
- var _form = require("@atlaskit/form");
22
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
23
- var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
21
+ var _errorMessage = require("@atlaskit/form/error-message");
22
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
23
+ var _textField = _interopRequireDefault(require("@atlaskit/textfield/text-field"));
24
24
  var _formatParse = require("./utils/formatParse");
25
25
  var _internal = require("./utils/internal");
26
26
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
@@ -138,7 +138,7 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
138
138
  }
139
139
 
140
140
  // focus trap for arrow keys in input field
141
- if ((0, _platformFeatureFlags.fg)('platform_editor_datepicker_focus_fix')) {
141
+ if ((0, _fg.fg)('platform_editor_datepicker_focus_fix')) {
142
142
  event.stopPropagation();
143
143
  }
144
144
  var dispatchAnalyticsEvent = _this.props.dispatchAnalyticsEvent;
@@ -206,7 +206,7 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
206
206
  var displayError = (attemptedDateParse === null || !possiblyValid) && inputText !== '';
207
207
  return /*#__PURE__*/_react.default.createElement("div", {
208
208
  className: (0, _runtime.ax)(["_ca0qqslr _n3tdutpp _19bvqslr _u5f3qslr"])
209
- }, /*#__PURE__*/_react.default.createElement(_textfield.default, {
209
+ }, /*#__PURE__*/_react.default.createElement(_textField.default, {
210
210
  name: "datetextfield",
211
211
  value: inputText,
212
212
  ref: this.handleInputRef,
@@ -217,7 +217,7 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
217
217
  autoComplete: "off",
218
218
  isInvalid: displayError,
219
219
  "aria-label": formatMessage(_messages.dateMessages.onKeyUpDownText)
220
- }), displayError && /*#__PURE__*/_react.default.createElement(_form.ErrorMessage, null, formatMessage(_messages.dateMessages.invalidDateError)));
220
+ }), displayError && /*#__PURE__*/_react.default.createElement(_errorMessage.ErrorMessage, null, formatMessage(_messages.dateMessages.invalidDateError)));
221
221
  }
222
222
  }, {
223
223
  key: "componentDidUpdate",
@@ -227,7 +227,7 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
227
227
  this.inputRef.setSelectionRange(setInputSelectionPos, setInputSelectionPos);
228
228
  this.setInputSelectionPos = undefined;
229
229
  }
230
- var shouldFocusInput = (0, _platformFeatureFlags.fg)('platform_editor_datepicker_focus_fix') ? !prevProps.autoFocus && this.props.autoFocus : this.props.autoFocus;
230
+ var shouldFocusInput = (0, _fg.fg)('platform_editor_datepicker_focus_fix') ? !prevProps.autoFocus && this.props.autoFocus : this.props.autoFocus;
231
231
  if (this.inputRef && shouldFocusInput) {
232
232
  this.focusInput();
233
233
  }
@@ -16,7 +16,7 @@ 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
18
  var _reactIntl = require("react-intl");
19
- var _calendar = _interopRequireDefault(require("@atlaskit/calendar"));
19
+ var _calendar = _interopRequireDefault(require("@atlaskit/calendar/calendar"));
20
20
  var _analytics = require("@atlaskit/editor-common/analytics");
21
21
  var _messages = require("@atlaskit/editor-common/messages");
22
22
  var _ui = require("@atlaskit/editor-common/ui");
@@ -7,7 +7,7 @@ exports.dateToDateType = dateToDateType;
7
7
  exports.dateTypeToDate = dateTypeToDate;
8
8
  exports.formatDateType = formatDateType;
9
9
  exports.parseDateType = parseDateType;
10
- var _locale = require("@atlaskit/locale");
10
+ var _localizationProvider = require("@atlaskit/locale/localization-provider");
11
11
  /**
12
12
  * Attempt to parse a string representing a date in a particular locale to a date object
13
13
  * @param dateString The string representing the date in the given locale, eg '02/12/2000'
@@ -16,7 +16,7 @@ var _locale = require("@atlaskit/locale");
16
16
  */
17
17
  function parseDateType(dateString, locale) {
18
18
  try {
19
- var l10n = (0, _locale.createLocalizationProvider)(locale);
19
+ var l10n = (0, _localizationProvider.createLocalizationProvider)(locale);
20
20
  var date = l10n.parseDate(dateString);
21
21
 
22
22
  // If date is invalid
@@ -48,7 +48,7 @@ function formatDateType(date, locale) {
48
48
  var day = date.day,
49
49
  month = date.month,
50
50
  year = date.year;
51
- var l10n = (0, _locale.createLocalizationProvider)(locale);
51
+ var l10n = (0, _localizationProvider.createLocalizationProvider)(locale);
52
52
 
53
53
  // The JS Date api represents month as a number between 0-11 :)
54
54
  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
@@ -11,7 +11,7 @@ import { calculateToolbarPositionAboveSelection } from '@atlaskit/editor-common/
11
11
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
12
12
  import CommentIcon from '@atlaskit/icon/core/comment';
13
13
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
14
- import { fg } from '@atlaskit/platform-feature-flags';
14
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
15
15
  import { closeDatePicker, closeDatePickerWithAnalytics, createDate } from './pm-plugins/actions';
16
16
  import { deleteDateCommand, insertDateCommand } from './pm-plugins/commands';
17
17
  import keymap from './pm-plugins/keymap';
@@ -3,7 +3,7 @@ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
3
3
  import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
4
4
  import { timestampToString } from '@atlaskit/editor-common/utils';
5
5
  import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
6
- import { fg } from '@atlaskit/platform-feature-flags';
6
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
7
7
  import { getDateInformation } from './utils';
8
8
  let intlRef;
9
9
  export const dateNodeSpec = node => {
@@ -3,7 +3,7 @@ import { todayTimestampInUTC } from '@atlaskit/editor-common/utils';
3
3
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
4
4
  import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { canInsert } from '@atlaskit/editor-prosemirror/utils';
6
- import { fg } from '@atlaskit/platform-feature-flags';
6
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
7
7
  import { isToday } from '../ui/DatePicker/utils/internal';
8
8
  import { pluginKey } from './plugin-key';
9
9
  /** Delete the date and close the datepicker */
@@ -6,9 +6,9 @@ import React from 'react';
6
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
- import { ErrorMessage } from '@atlaskit/form';
10
- import { fg } from '@atlaskit/platform-feature-flags';
11
- import TextField from '@atlaskit/textfield';
9
+ import { ErrorMessage } from '@atlaskit/form/error-message';
10
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
11
+ import TextField from '@atlaskit/textfield/text-field';
12
12
  import { formatDateType, parseDateType } from './utils/formatParse';
13
13
  import { adjustDate, findDateSegmentByPosition, isDatePossiblyValid } from './utils/internal';
14
14
 
@@ -4,7 +4,7 @@ import "./index.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import React from 'react';
6
6
  import { injectIntl } from 'react-intl';
7
- import Calendar from '@atlaskit/calendar';
7
+ import Calendar from '@atlaskit/calendar/calendar';
8
8
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
9
9
  import { dateMessages as messages } from '@atlaskit/editor-common/messages';
10
10
  import { PlainOutsideClickTargetRefContext, Popup, withOuterListeners } from '@atlaskit/editor-common/ui';
@@ -1,4 +1,4 @@
1
- import { createLocalizationProvider } from '@atlaskit/locale';
1
+ import { createLocalizationProvider } from '@atlaskit/locale/localization-provider';
2
2
  /**
3
3
  * Attempt to parse a string representing a date in a particular locale to a date object
4
4
  * @param dateString The string representing the date in the given locale, eg '02/12/2000'
@@ -14,7 +14,7 @@ import { calculateToolbarPositionAboveSelection } from '@atlaskit/editor-common/
14
14
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
15
15
  import CommentIcon from '@atlaskit/icon/core/comment';
16
16
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
17
- import { fg } from '@atlaskit/platform-feature-flags';
17
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
18
18
  import { closeDatePicker as _closeDatePicker, closeDatePickerWithAnalytics as _closeDatePickerWithAnalytics, createDate } from './pm-plugins/actions';
19
19
  import { deleteDateCommand, insertDateCommand } from './pm-plugins/commands';
20
20
  import keymap from './pm-plugins/keymap';
@@ -3,7 +3,7 @@ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
3
3
  import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
4
4
  import { timestampToString } from '@atlaskit/editor-common/utils';
5
5
  import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
6
- import { fg } from '@atlaskit/platform-feature-flags';
6
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
7
7
  import { getDateInformation } from './utils';
8
8
  var intlRef;
9
9
  export var dateNodeSpec = function dateNodeSpec(node) {
@@ -3,7 +3,7 @@ import { todayTimestampInUTC } from '@atlaskit/editor-common/utils';
3
3
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
4
4
  import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { canInsert } from '@atlaskit/editor-prosemirror/utils';
6
- import { fg } from '@atlaskit/platform-feature-flags';
6
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
7
7
  import { isToday } from '../ui/DatePicker/utils/internal';
8
8
  import { pluginKey } from './plugin-key';
9
9
  /** Delete the date and close the datepicker */
@@ -13,9 +13,9 @@ import React from 'react';
13
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
- import { ErrorMessage } from '@atlaskit/form';
17
- import { fg } from '@atlaskit/platform-feature-flags';
18
- import TextField from '@atlaskit/textfield';
16
+ import { ErrorMessage } from '@atlaskit/form/error-message';
17
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
18
+ import TextField from '@atlaskit/textfield/text-field';
19
19
  import { formatDateType, parseDateType } from './utils/formatParse';
20
20
  import { adjustDate, findDateSegmentByPosition, isDatePossiblyValid } from './utils/internal';
21
21
 
@@ -11,7 +11,7 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
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
13
  import { injectIntl } from 'react-intl';
14
- import Calendar from '@atlaskit/calendar';
14
+ import Calendar from '@atlaskit/calendar/calendar';
15
15
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
16
16
  import { dateMessages as messages } from '@atlaskit/editor-common/messages';
17
17
  import { PlainOutsideClickTargetRefContext, Popup, withOuterListeners } from '@atlaskit/editor-common/ui';
@@ -1,4 +1,4 @@
1
- import { createLocalizationProvider } from '@atlaskit/locale';
1
+ import { createLocalizationProvider } from '@atlaskit/locale/localization-provider';
2
2
  /**
3
3
  * Attempt to parse a string representing a date in a particular locale to a date object
4
4
  * @param dateString The string representing the date in the given locale, eg '02/12/2000'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-date",
3
- "version": "17.0.13",
3
+ "version": "17.0.15",
4
4
  "description": "Date plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  "@atlaskit/platform-feature-experiments": "^0.3.0",
39
39
  "@atlaskit/platform-feature-flags": "^2.1.0",
40
40
  "@atlaskit/textfield": "^10.1.0",
41
- "@atlaskit/tmp-editor-statsig": "^159.0.0",
41
+ "@atlaskit/tmp-editor-statsig": "^160.0.0",
42
42
  "@atlaskit/tokens": "^16.8.0",
43
43
  "@atlaskit/visually-hidden": "^4.3.0",
44
44
  "@babel/runtime": "^7.0.0",