@atlaskit/link-create 3.0.0 → 3.1.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,14 @@
1
1
  # @atlaskit/link-create
2
2
 
3
+ ## 3.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#117654](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/117654)
8
+ [`7ff489bc159fc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7ff489bc159fc) -
9
+ [ux] Update requests to expect subtype field, show live doc icon for live docs in link create
10
+ modal
11
+
3
12
  ## 3.0.0
4
13
 
5
14
  ### Major Changes
@@ -16,7 +16,7 @@ var CREATE_FORM_MIN_HEIGHT_IN_PX = exports.CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
16
16
  var LINK_CREATE_FORM_POST_CREATE_FIELD = exports.LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
17
17
  var PACKAGE_DATA = exports.PACKAGE_DATA = {
18
18
  packageName: "@atlaskit/link-create" || '',
19
- packageVersion: "3.0.0" || '',
19
+ packageVersion: "3.1.0" || '',
20
20
  component: COMPONENT_NAME,
21
21
  componentName: COMPONENT_NAME
22
22
  };
@@ -5,13 +5,16 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.UrlIcon = exports.PageIcon = void 0;
8
+ exports.UrlIcon = exports.PageIcon = exports.LiveDocIcon = void 0;
9
9
  require("./index.compiled.css");
10
10
  var _runtime = require("@compiled/react/runtime");
11
11
  var _react = _interopRequireDefault(require("react"));
12
+ var _reactIntlNext = require("react-intl-next");
12
13
  var _8 = _interopRequireDefault(require("@atlaskit/icon-file-type/glyph/document/16"));
14
+ var _9 = _interopRequireDefault(require("@atlaskit/icon-object/glyph/page-live-doc/16"));
13
15
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
16
  var _colors = require("@atlaskit/theme/colors");
17
+ var _messages = require("./messages");
15
18
  var _old = require("./old");
16
19
  var baseStyles = null;
17
20
  var UrlIconNew = function UrlIconNew(_ref) {
@@ -32,7 +35,14 @@ var UrlIcon = exports.UrlIcon = function UrlIcon(props) {
32
35
  return /*#__PURE__*/_react.default.createElement(_old.UrlIconOld, props);
33
36
  };
34
37
  var PageIcon = exports.PageIcon = function PageIcon() {
38
+ var intl = (0, _reactIntlNext.useIntl)();
35
39
  return /*#__PURE__*/_react.default.createElement(_8.default, {
36
- label: "Page"
40
+ label: intl.formatMessage(_messages.iconLabelMessages.pageIconLabel)
41
+ });
42
+ };
43
+ var LiveDocIcon = exports.LiveDocIcon = function LiveDocIcon() {
44
+ var intl = (0, _reactIntlNext.useIntl)();
45
+ return /*#__PURE__*/_react.default.createElement(_9.default, {
46
+ label: intl.formatMessage(_messages.iconLabelMessages.pageIconLabel)
37
47
  });
38
48
  };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.iconLabelMessages = void 0;
7
+ var _reactIntlNext = require("react-intl-next");
8
+ var iconLabelMessages = exports.iconLabelMessages = (0, _reactIntlNext.defineMessages)({
9
+ pageIconLabel: {
10
+ id: 'link-create.page-icon-label',
11
+ defaultMessage: 'Page',
12
+ description: 'Label for Page icons used in the link create modal'
13
+ },
14
+ liveDocIconLabel: {
15
+ id: 'link-create.live-doc-icon-label',
16
+ defaultMessage: 'Live Doc',
17
+ description: 'Label for Live Doc icons used in the link create modal'
18
+ }
19
+ });
package/dist/cjs/index.js CHANGED
@@ -58,6 +58,12 @@ Object.defineProperty(exports, "LinkCreateExitWarningProvider", {
58
58
  return _exitWarningModalContext.ExitWarningModalProvider;
59
59
  }
60
60
  });
61
+ Object.defineProperty(exports, "LiveDocIcon", {
62
+ enumerable: true,
63
+ get: function get() {
64
+ return _icon.LiveDocIcon;
65
+ }
66
+ });
61
67
  Object.defineProperty(exports, "PageIcon", {
62
68
  enumerable: true,
63
69
  get: function get() {
@@ -10,7 +10,7 @@ export const CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
10
10
  export const LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
11
11
  export const PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/link-create" || '',
13
- packageVersion: "3.0.0" || '',
13
+ packageVersion: "3.1.0" || '',
14
14
  component: COMPONENT_NAME,
15
15
  componentName: COMPONENT_NAME
16
16
  };
@@ -2,9 +2,12 @@
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
5
+ import { useIntl } from 'react-intl-next';
5
6
  import Document16Icon from '@atlaskit/icon-file-type/glyph/document/16';
7
+ import PageLiveDoc16Icon from '@atlaskit/icon-object/glyph/page-live-doc/16';
6
8
  import { fg } from '@atlaskit/platform-feature-flags';
7
9
  import { N20A } from '@atlaskit/theme/colors';
10
+ import { iconLabelMessages } from './messages';
8
11
  import { UrlIconOld } from './old';
9
12
  const baseStyles = null;
10
13
  const UrlIconNew = ({
@@ -24,6 +27,15 @@ export const UrlIcon = props => {
24
27
  }
25
28
  return /*#__PURE__*/React.createElement(UrlIconOld, props);
26
29
  };
27
- export const PageIcon = () => /*#__PURE__*/React.createElement(Document16Icon, {
28
- label: "Page"
29
- });
30
+ export const PageIcon = () => {
31
+ const intl = useIntl();
32
+ return /*#__PURE__*/React.createElement(Document16Icon, {
33
+ label: intl.formatMessage(iconLabelMessages.pageIconLabel)
34
+ });
35
+ };
36
+ export const LiveDocIcon = () => {
37
+ const intl = useIntl();
38
+ return /*#__PURE__*/React.createElement(PageLiveDoc16Icon, {
39
+ label: intl.formatMessage(iconLabelMessages.pageIconLabel)
40
+ });
41
+ };
@@ -0,0 +1,13 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export const iconLabelMessages = defineMessages({
3
+ pageIconLabel: {
4
+ id: 'link-create.page-icon-label',
5
+ defaultMessage: 'Page',
6
+ description: 'Label for Page icons used in the link create modal'
7
+ },
8
+ liveDocIconLabel: {
9
+ id: 'link-create.live-doc-icon-label',
10
+ defaultMessage: 'Live Doc',
11
+ description: 'Label for Live Doc icons used in the link create modal'
12
+ }
13
+ });
@@ -2,5 +2,5 @@ export { AsyncSelect, CreateForm, CreateFormLoader, FormSpy, Select, SiteSelect,
2
2
  export { LinkCreateCallbackProvider, useLinkCreateCallback } from './controllers/callback-context';
3
3
  export { ExitWarningModalProvider as LinkCreateExitWarningProvider, useWithExitWarning } from './controllers/exit-warning-modal-context';
4
4
  export { FORM_ERROR } from 'final-form';
5
- export { PageIcon, UrlIcon } from './common/ui/icon';
5
+ export { PageIcon, UrlIcon, LiveDocIcon } from './common/ui/icon';
6
6
  export { CreateField } from './controllers/create-field/index';
@@ -10,7 +10,7 @@ export var CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
10
10
  export var LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
11
11
  export var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/link-create" || '',
13
- packageVersion: "3.0.0" || '',
13
+ packageVersion: "3.1.0" || '',
14
14
  component: COMPONENT_NAME,
15
15
  componentName: COMPONENT_NAME
16
16
  };
@@ -2,9 +2,12 @@
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
5
+ import { useIntl } from 'react-intl-next';
5
6
  import Document16Icon from '@atlaskit/icon-file-type/glyph/document/16';
7
+ import PageLiveDoc16Icon from '@atlaskit/icon-object/glyph/page-live-doc/16';
6
8
  import { fg } from '@atlaskit/platform-feature-flags';
7
9
  import { N20A } from '@atlaskit/theme/colors';
10
+ import { iconLabelMessages } from './messages';
8
11
  import { UrlIconOld } from './old';
9
12
  var baseStyles = null;
10
13
  var UrlIconNew = function UrlIconNew(_ref) {
@@ -25,7 +28,14 @@ export var UrlIcon = function UrlIcon(props) {
25
28
  return /*#__PURE__*/React.createElement(UrlIconOld, props);
26
29
  };
27
30
  export var PageIcon = function PageIcon() {
31
+ var intl = useIntl();
28
32
  return /*#__PURE__*/React.createElement(Document16Icon, {
29
- label: "Page"
33
+ label: intl.formatMessage(iconLabelMessages.pageIconLabel)
34
+ });
35
+ };
36
+ export var LiveDocIcon = function LiveDocIcon() {
37
+ var intl = useIntl();
38
+ return /*#__PURE__*/React.createElement(PageLiveDoc16Icon, {
39
+ label: intl.formatMessage(iconLabelMessages.pageIconLabel)
30
40
  });
31
41
  };
@@ -0,0 +1,13 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var iconLabelMessages = defineMessages({
3
+ pageIconLabel: {
4
+ id: 'link-create.page-icon-label',
5
+ defaultMessage: 'Page',
6
+ description: 'Label for Page icons used in the link create modal'
7
+ },
8
+ liveDocIconLabel: {
9
+ id: 'link-create.live-doc-icon-label',
10
+ defaultMessage: 'Live Doc',
11
+ description: 'Label for Live Doc icons used in the link create modal'
12
+ }
13
+ });
package/dist/esm/index.js CHANGED
@@ -2,5 +2,5 @@ export { AsyncSelect, CreateForm, CreateFormLoader, FormSpy, Select, SiteSelect,
2
2
  export { LinkCreateCallbackProvider, useLinkCreateCallback } from './controllers/callback-context';
3
3
  export { ExitWarningModalProvider as LinkCreateExitWarningProvider, useWithExitWarning } from './controllers/exit-warning-modal-context';
4
4
  export { FORM_ERROR } from 'final-form';
5
- export { PageIcon, UrlIcon } from './common/ui/icon';
5
+ export { PageIcon, UrlIcon, LiveDocIcon } from './common/ui/icon';
6
6
  export { CreateField } from './controllers/create-field/index';
@@ -9,4 +9,5 @@ type UrlIconProps = {
9
9
  };
10
10
  export declare const UrlIcon: (props: UrlIconProps) => JSX.Element;
11
11
  export declare const PageIcon: () => JSX.Element;
12
+ export declare const LiveDocIcon: () => JSX.Element;
12
13
  export {};
@@ -0,0 +1,12 @@
1
+ export declare const iconLabelMessages: {
2
+ pageIconLabel: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ liveDocIconLabel: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ };
@@ -5,5 +5,5 @@ export { LinkCreateCallbackProvider, useLinkCreateCallback } from './controllers
5
5
  export { ExitWarningModalProvider as LinkCreateExitWarningProvider, useWithExitWarning, } from './controllers/exit-warning-modal-context';
6
6
  export type { Validator, ValidatorMap } from './common/types';
7
7
  export { FORM_ERROR } from 'final-form';
8
- export { PageIcon, UrlIcon } from './common/ui/icon';
8
+ export { PageIcon, UrlIcon, LiveDocIcon } from './common/ui/icon';
9
9
  export { CreateField } from './controllers/create-field/index';
@@ -9,4 +9,5 @@ type UrlIconProps = {
9
9
  };
10
10
  export declare const UrlIcon: (props: UrlIconProps) => JSX.Element;
11
11
  export declare const PageIcon: () => JSX.Element;
12
+ export declare const LiveDocIcon: () => JSX.Element;
12
13
  export {};
@@ -0,0 +1,12 @@
1
+ export declare const iconLabelMessages: {
2
+ pageIconLabel: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ liveDocIconLabel: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ };
@@ -5,5 +5,5 @@ export { LinkCreateCallbackProvider, useLinkCreateCallback } from './controllers
5
5
  export { ExitWarningModalProvider as LinkCreateExitWarningProvider, useWithExitWarning, } from './controllers/exit-warning-modal-context';
6
6
  export type { Validator, ValidatorMap } from './common/types';
7
7
  export { FORM_ERROR } from 'final-form';
8
- export { PageIcon, UrlIcon } from './common/ui/icon';
8
+ export { PageIcon, UrlIcon, LiveDocIcon } from './common/ui/icon';
9
9
  export { CreateField } from './controllers/create-field/index';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-create",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "The driver component of meta creation flow",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,24 +38,25 @@
38
38
  "dependencies": {
39
39
  "@atlaskit/analytics-next": "^11.0.0",
40
40
  "@atlaskit/atlassian-context": "^0.2.0",
41
- "@atlaskit/button": "^21.0.0",
41
+ "@atlaskit/button": "^21.1.0",
42
42
  "@atlaskit/css": "^0.10.0",
43
43
  "@atlaskit/empty-state": "^9.0.0",
44
44
  "@atlaskit/form": "^12.0.0",
45
- "@atlaskit/icon": "^24.0.0",
45
+ "@atlaskit/icon": "^24.1.0",
46
46
  "@atlaskit/icon-file-type": "^7.0.0",
47
+ "@atlaskit/icon-object": "^7.0.0",
47
48
  "@atlaskit/intl-messages-provider": "^2.0.0",
48
49
  "@atlaskit/layering": "^2.0.0",
49
50
  "@atlaskit/linking-common": "^8.0.0",
50
51
  "@atlaskit/modal-dialog": "^13.0.0",
51
52
  "@atlaskit/platform-feature-flags": "^1.1.0",
52
- "@atlaskit/primitives": "^14.0.0",
53
+ "@atlaskit/primitives": "^14.1.0",
53
54
  "@atlaskit/select": "^19.0.0",
54
55
  "@atlaskit/smart-user-picker": "^8.0.0",
55
56
  "@atlaskit/spinner": "^18.0.0",
56
57
  "@atlaskit/textfield": "^8.0.0",
57
58
  "@atlaskit/theme": "^17.0.0",
58
- "@atlaskit/tokens": "^4.0.0",
59
+ "@atlaskit/tokens": "^4.2.0",
59
60
  "@babel/runtime": "^7.0.0",
60
61
  "@compiled/react": "^0.18.2",
61
62
  "@emotion/react": "^11.7.1",