@atlaskit/editor-plugin-card 1.10.3 → 1.11.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,13 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 1.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#97997](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97997)
8
+ [`ee970964e1f2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ee970964e1f2) -
9
+ [ux] Replaces the Datasources Toolbar TableIcon with a new custom Icon
10
+
3
11
  ## 1.10.3
4
12
 
5
13
  ### Patch Changes
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
@@ -11,13 +10,13 @@ var _messages = require("@atlaskit/editor-common/messages");
11
10
  var _ui = require("@atlaskit/editor-common/ui");
12
11
  var _utils = require("@atlaskit/editor-common/utils");
13
12
  var _state = require("@atlaskit/editor-prosemirror/state");
14
- var _table = _interopRequireDefault(require("@atlaskit/icon/glyph/table"));
15
13
  var _linkDatasource = require("@atlaskit/link-datasource");
16
14
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
15
  var _primitives = require("@atlaskit/primitives");
18
16
  var _doc = require("../pm-plugins/doc");
19
17
  var _pluginKey = require("../pm-plugins/plugin-key");
20
18
  var _CardContextProvider = require("./CardContextProvider");
19
+ var _DatasourceIcon = require("./DatasourceIcon");
21
20
  var _useFetchDatasourceInfo = require("./useFetchDatasourceInfo");
22
21
  /** @jsx jsx */
23
22
 
@@ -97,7 +96,7 @@ var DatasourceAppearanceButtonWithCardContext = function DatasourceAppearanceBut
97
96
  return (0, _react2.jsx)(_primitives.Flex, null, (0, _react2.jsx)(_ui.FloatingToolbarButton, {
98
97
  css: buttonStyles,
99
98
  title: buttonLabel,
100
- icon: (0, _react2.jsx)(_table.default, {
99
+ icon: (0, _react2.jsx)(_DatasourceIcon.DatasourceIcon, {
101
100
  label: buttonLabel
102
101
  }),
103
102
  selected: selected,
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.DatasourceIcon = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _icon = _interopRequireDefault(require("@atlaskit/icon"));
11
+ var _primitives = require("@atlaskit/primitives");
12
+ var IconDatasourceGlyph = function IconDatasourceGlyph(props) {
13
+ return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
14
+ xmlns: "http://www.w3.org/2000/svg",
15
+ width: "15",
16
+ height: "15",
17
+ viewBox: "0 0 15 15",
18
+ fill: "none"
19
+ }, props), /*#__PURE__*/_react.default.createElement("path", {
20
+ fillRule: "evenodd",
21
+ clipRule: "evenodd",
22
+ d: "M0 2C0 0.89543 0.895431 0 2 0H13C14.1046 0 15 0.895431 15 2V13C15 14.1046 14.1046 15 13 15H2C0.89543 15 0 14.1046 0 13V2ZM5 6C5 5.44772 5.44772 5 6 5L12 5C12.5523 5 13 5.44772 13 6C13 6.55229 12.5523 7 12 7L6 7C5.44772 7 5 6.55228 5 6ZM6 8C5.44772 8 5 8.44771 5 9C5 9.55228 5.44772 10 6 10L12 10C12.5523 10 13 9.55229 13 9C13 8.44772 12.5523 8 12 8L6 8ZM5 12C5 11.4477 5.44772 11 6 11L12 11C12.5523 11 13 11.4477 13 12C13 12.5523 12.5523 13 12 13L6 13C5.44772 13 5 12.5523 5 12ZM3 7C3.55228 7 4 6.55228 4 6C4 5.44772 3.55228 5 3 5C2.44772 5 2 5.44772 2 6C2 6.55228 2.44772 7 3 7ZM5 3C5 2.44772 5.44772 2 6 2L12 2C12.5523 2 13 2.44772 13 3C13 3.55229 12.5523 4 12 4L6 4C5.44772 4 5 3.55228 5 3ZM3 4C3.55228 4 4 3.55228 4 3C4 2.44772 3.55228 2 3 2C2.44772 2 2 2.44772 2 3C2 3.55228 2.44772 4 3 4ZM4 9C4 9.55229 3.55228 10 3 10C2.44772 10 2 9.55229 2 9C2 8.44771 2.44772 8 3 8C3.55228 8 4 8.44771 4 9ZM3 13C3.55228 13 4 12.5523 4 12C4 11.4477 3.55228 11 3 11C2.44772 11 2 11.4477 2 12C2 12.5523 2.44772 13 3 13Z",
23
+ fill: 'currentColor'
24
+ }));
25
+ };
26
+ var wrapperStyles = (0, _primitives.xcss)({
27
+ padding: 'space.050',
28
+ justifyContent: 'center',
29
+ alignItems: 'center',
30
+ width: 'space.300',
31
+ height: 'space.300'
32
+ });
33
+ var DatasourceIcon = exports.DatasourceIcon = function DatasourceIcon(props) {
34
+ return /*#__PURE__*/_react.default.createElement(_primitives.Flex, {
35
+ xcss: wrapperStyles
36
+ }, /*#__PURE__*/_react.default.createElement(_icon.default, (0, _extends2.default)({
37
+ glyph: IconDatasourceGlyph
38
+ }, props)));
39
+ };
@@ -5,13 +5,13 @@ import { cardMessages as messages } from '@atlaskit/editor-common/messages';
5
5
  import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
6
6
  import { canRenderDatasource } from '@atlaskit/editor-common/utils';
7
7
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
8
- import TableIcon from '@atlaskit/icon/glyph/table';
9
8
  import { buildDatasourceAdf } from '@atlaskit/link-datasource';
10
9
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
11
10
  import { Flex } from '@atlaskit/primitives';
12
11
  import { updateCardViaDatasource } from '../pm-plugins/doc';
13
12
  import { pluginKey } from '../pm-plugins/plugin-key';
14
13
  import { CardContextProvider } from './CardContextProvider';
14
+ import { DatasourceIcon } from './DatasourceIcon';
15
15
  import { useFetchDatasourceInfo } from './useFetchDatasourceInfo';
16
16
  const buttonStyles = css({
17
17
  pointerEvents: 'auto'
@@ -91,7 +91,7 @@ const DatasourceAppearanceButtonWithCardContext = ({
91
91
  return jsx(Flex, null, jsx(Button, {
92
92
  css: buttonStyles,
93
93
  title: buttonLabel,
94
- icon: jsx(TableIcon, {
94
+ icon: jsx(DatasourceIcon, {
95
95
  label: buttonLabel
96
96
  }),
97
97
  selected: selected,
@@ -0,0 +1,32 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React from 'react';
3
+ import Icon from '@atlaskit/icon';
4
+ import { Flex, xcss } from '@atlaskit/primitives';
5
+ const IconDatasourceGlyph = props => {
6
+ return /*#__PURE__*/React.createElement("svg", _extends({
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ width: "15",
9
+ height: "15",
10
+ viewBox: "0 0 15 15",
11
+ fill: "none"
12
+ }, props), /*#__PURE__*/React.createElement("path", {
13
+ fillRule: "evenodd",
14
+ clipRule: "evenodd",
15
+ d: "M0 2C0 0.89543 0.895431 0 2 0H13C14.1046 0 15 0.895431 15 2V13C15 14.1046 14.1046 15 13 15H2C0.89543 15 0 14.1046 0 13V2ZM5 6C5 5.44772 5.44772 5 6 5L12 5C12.5523 5 13 5.44772 13 6C13 6.55229 12.5523 7 12 7L6 7C5.44772 7 5 6.55228 5 6ZM6 8C5.44772 8 5 8.44771 5 9C5 9.55228 5.44772 10 6 10L12 10C12.5523 10 13 9.55229 13 9C13 8.44772 12.5523 8 12 8L6 8ZM5 12C5 11.4477 5.44772 11 6 11L12 11C12.5523 11 13 11.4477 13 12C13 12.5523 12.5523 13 12 13L6 13C5.44772 13 5 12.5523 5 12ZM3 7C3.55228 7 4 6.55228 4 6C4 5.44772 3.55228 5 3 5C2.44772 5 2 5.44772 2 6C2 6.55228 2.44772 7 3 7ZM5 3C5 2.44772 5.44772 2 6 2L12 2C12.5523 2 13 2.44772 13 3C13 3.55229 12.5523 4 12 4L6 4C5.44772 4 5 3.55228 5 3ZM3 4C3.55228 4 4 3.55228 4 3C4 2.44772 3.55228 2 3 2C2.44772 2 2 2.44772 2 3C2 3.55228 2.44772 4 3 4ZM4 9C4 9.55229 3.55228 10 3 10C2.44772 10 2 9.55229 2 9C2 8.44771 2.44772 8 3 8C3.55228 8 4 8.44771 4 9ZM3 13C3.55228 13 4 12.5523 4 12C4 11.4477 3.55228 11 3 11C2.44772 11 2 11.4477 2 12C2 12.5523 2.44772 13 3 13Z",
16
+ fill: 'currentColor'
17
+ }));
18
+ };
19
+ const wrapperStyles = xcss({
20
+ padding: 'space.050',
21
+ justifyContent: 'center',
22
+ alignItems: 'center',
23
+ width: 'space.300',
24
+ height: 'space.300'
25
+ });
26
+ export const DatasourceIcon = props => {
27
+ return /*#__PURE__*/React.createElement(Flex, {
28
+ xcss: wrapperStyles
29
+ }, /*#__PURE__*/React.createElement(Icon, _extends({
30
+ glyph: IconDatasourceGlyph
31
+ }, props)));
32
+ };
@@ -5,13 +5,13 @@ import { cardMessages as messages } from '@atlaskit/editor-common/messages';
5
5
  import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
6
6
  import { canRenderDatasource } from '@atlaskit/editor-common/utils';
7
7
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
8
- import TableIcon from '@atlaskit/icon/glyph/table';
9
8
  import { buildDatasourceAdf } from '@atlaskit/link-datasource';
10
9
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
11
10
  import { Flex } from '@atlaskit/primitives';
12
11
  import { updateCardViaDatasource } from '../pm-plugins/doc';
13
12
  import { pluginKey } from '../pm-plugins/plugin-key';
14
13
  import { CardContextProvider } from './CardContextProvider';
14
+ import { DatasourceIcon } from './DatasourceIcon';
15
15
  import { useFetchDatasourceInfo } from './useFetchDatasourceInfo';
16
16
  var buttonStyles = css({
17
17
  pointerEvents: 'auto'
@@ -89,7 +89,7 @@ var DatasourceAppearanceButtonWithCardContext = function DatasourceAppearanceBut
89
89
  return jsx(Flex, null, jsx(Button, {
90
90
  css: buttonStyles,
91
91
  title: buttonLabel,
92
- icon: jsx(TableIcon, {
92
+ icon: jsx(DatasourceIcon, {
93
93
  label: buttonLabel
94
94
  }),
95
95
  selected: selected,
@@ -0,0 +1,32 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React from 'react';
3
+ import Icon from '@atlaskit/icon';
4
+ import { Flex, xcss } from '@atlaskit/primitives';
5
+ var IconDatasourceGlyph = function IconDatasourceGlyph(props) {
6
+ return /*#__PURE__*/React.createElement("svg", _extends({
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ width: "15",
9
+ height: "15",
10
+ viewBox: "0 0 15 15",
11
+ fill: "none"
12
+ }, props), /*#__PURE__*/React.createElement("path", {
13
+ fillRule: "evenodd",
14
+ clipRule: "evenodd",
15
+ d: "M0 2C0 0.89543 0.895431 0 2 0H13C14.1046 0 15 0.895431 15 2V13C15 14.1046 14.1046 15 13 15H2C0.89543 15 0 14.1046 0 13V2ZM5 6C5 5.44772 5.44772 5 6 5L12 5C12.5523 5 13 5.44772 13 6C13 6.55229 12.5523 7 12 7L6 7C5.44772 7 5 6.55228 5 6ZM6 8C5.44772 8 5 8.44771 5 9C5 9.55228 5.44772 10 6 10L12 10C12.5523 10 13 9.55229 13 9C13 8.44772 12.5523 8 12 8L6 8ZM5 12C5 11.4477 5.44772 11 6 11L12 11C12.5523 11 13 11.4477 13 12C13 12.5523 12.5523 13 12 13L6 13C5.44772 13 5 12.5523 5 12ZM3 7C3.55228 7 4 6.55228 4 6C4 5.44772 3.55228 5 3 5C2.44772 5 2 5.44772 2 6C2 6.55228 2.44772 7 3 7ZM5 3C5 2.44772 5.44772 2 6 2L12 2C12.5523 2 13 2.44772 13 3C13 3.55229 12.5523 4 12 4L6 4C5.44772 4 5 3.55228 5 3ZM3 4C3.55228 4 4 3.55228 4 3C4 2.44772 3.55228 2 3 2C2.44772 2 2 2.44772 2 3C2 3.55228 2.44772 4 3 4ZM4 9C4 9.55229 3.55228 10 3 10C2.44772 10 2 9.55229 2 9C2 8.44771 2.44772 8 3 8C3.55228 8 4 8.44771 4 9ZM3 13C3.55228 13 4 12.5523 4 12C4 11.4477 3.55228 11 3 11C2.44772 11 2 11.4477 2 12C2 12.5523 2.44772 13 3 13Z",
16
+ fill: 'currentColor'
17
+ }));
18
+ };
19
+ var wrapperStyles = xcss({
20
+ padding: 'space.050',
21
+ justifyContent: 'center',
22
+ alignItems: 'center',
23
+ width: 'space.300',
24
+ height: 'space.300'
25
+ });
26
+ export var DatasourceIcon = function DatasourceIcon(props) {
27
+ return /*#__PURE__*/React.createElement(Flex, {
28
+ xcss: wrapperStyles
29
+ }, /*#__PURE__*/React.createElement(Icon, _extends({
30
+ glyph: IconDatasourceGlyph
31
+ }, props)));
32
+ };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { GlyphProps } from '@atlaskit/icon/types';
3
+ export declare const DatasourceIcon: (props: GlyphProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { GlyphProps } from '@atlaskit/icon/types';
3
+ export declare const DatasourceIcon: (props: GlyphProps) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "1.10.3",
3
+ "version": "1.11.0",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,7 +35,7 @@
35
35
  "@atlaskit/adf-schema": "^35.12.2",
36
36
  "@atlaskit/analytics-next": "^9.3.0",
37
37
  "@atlaskit/custom-steps": "^0.1.0",
38
- "@atlaskit/editor-common": "^79.1.0",
38
+ "@atlaskit/editor-common": "^79.2.0",
39
39
  "@atlaskit/editor-plugin-analytics": "^1.1.0",
40
40
  "@atlaskit/editor-plugin-decorations": "^1.1.0",
41
41
  "@atlaskit/editor-plugin-editor-viewmode": "^1.1.0",
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/linking-types": "^8.8.0",
56
56
  "@atlaskit/platform-feature-flags": "^0.2.0",
57
57
  "@atlaskit/primitives": "^6.1.0",
58
- "@atlaskit/smart-card": "^26.60.0",
58
+ "@atlaskit/smart-card": "^26.62.0",
59
59
  "@atlaskit/theme": "^12.7.0",
60
60
  "@atlaskit/tokens": "^1.45.0",
61
61
  "@babel/runtime": "^7.0.0",