@atlaskit/editor-plugin-card 14.0.0 → 14.0.2
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 +17 -0
- package/dist/cjs/pm-plugins/actions.js +10 -1
- package/dist/cjs/pm-plugins/main.js +1 -0
- package/dist/cjs/pm-plugins/reducers.js +7 -0
- package/dist/cjs/pm-plugins/utils.js +1 -3
- package/dist/cjs/ui/ResizableEmbedCard.js +33 -17
- package/dist/cjs/ui/ToolbarViewedEvent.js +22 -4
- package/dist/cjs/ui/toolbar.js +38 -19
- package/dist/es2019/pm-plugins/actions.js +5 -0
- package/dist/es2019/pm-plugins/main.js +1 -0
- package/dist/es2019/pm-plugins/reducers.js +11 -0
- package/dist/es2019/pm-plugins/utils.js +1 -3
- package/dist/es2019/ui/ResizableEmbedCard.js +17 -0
- package/dist/es2019/ui/ToolbarViewedEvent.js +20 -4
- package/dist/es2019/ui/toolbar.js +35 -19
- package/dist/esm/pm-plugins/actions.js +9 -0
- package/dist/esm/pm-plugins/main.js +1 -0
- package/dist/esm/pm-plugins/reducers.js +7 -0
- package/dist/esm/pm-plugins/utils.js +1 -3
- package/dist/esm/ui/ResizableEmbedCard.js +33 -17
- package/dist/esm/ui/ToolbarViewedEvent.js +22 -4
- package/dist/esm/ui/toolbar.js +38 -19
- package/dist/types/pm-plugins/actions.d.ts +2 -1
- package/dist/types/pm-plugins/util/state.d.ts +2 -1
- package/dist/types/pm-plugins/utils.d.ts +2 -2
- package/dist/types/types/index.d.ts +13 -1
- package/dist/types/ui/ResizableEmbedCard.d.ts +1 -0
- package/dist/types-ts4.5/pm-plugins/actions.d.ts +2 -1
- package/dist/types-ts4.5/pm-plugins/util/state.d.ts +2 -1
- package/dist/types-ts4.5/pm-plugins/utils.d.ts +2 -2
- package/dist/types-ts4.5/types/index.d.ts +13 -1
- package/dist/types-ts4.5/ui/ResizableEmbedCard.d.ts +1 -0
- package/package.json +6 -3
|
@@ -20,6 +20,12 @@ export type CardInfo = {
|
|
|
20
20
|
title?: string;
|
|
21
21
|
url?: string;
|
|
22
22
|
};
|
|
23
|
+
export type ToolbarResolvedAttributes = {
|
|
24
|
+
displayCategory?: 'smartLink' | 'link';
|
|
25
|
+
extensionKey?: string | null;
|
|
26
|
+
status?: string | null;
|
|
27
|
+
statusDetails?: string | null;
|
|
28
|
+
};
|
|
23
29
|
export type Request = {
|
|
24
30
|
/**
|
|
25
31
|
* Analytics action to be used when disaptching
|
|
@@ -95,6 +101,7 @@ export type CardPluginState = {
|
|
|
95
101
|
provider: CardProvider | null;
|
|
96
102
|
removeOverlay?: () => void;
|
|
97
103
|
requests: Request[];
|
|
104
|
+
resolvedToolbarAttributesByUrl: Record<string, ToolbarResolvedAttributes>;
|
|
98
105
|
selectedInlineLinkPosition?: number;
|
|
99
106
|
showDatasourceModal: boolean;
|
|
100
107
|
showLinkingToolbar: boolean;
|
|
@@ -156,6 +163,11 @@ export type SetDatasourceTableRef = {
|
|
|
156
163
|
datasourceTableRef?: HTMLElement;
|
|
157
164
|
type: 'SET_DATASOURCE_TABLE_REF';
|
|
158
165
|
};
|
|
166
|
+
export type SetResolvedToolbarAttributes = {
|
|
167
|
+
attributes: ToolbarResolvedAttributes;
|
|
168
|
+
type: 'SET_RESOLVED_TOOLBAR_ATTRIBUTES';
|
|
169
|
+
url: string;
|
|
170
|
+
};
|
|
159
171
|
export type SetCardLayout = {
|
|
160
172
|
layout: DatasourceTableLayout;
|
|
161
173
|
type: 'SET_CARD_LAYOUT';
|
|
@@ -184,5 +196,5 @@ export type RemoveDatasourceStash = {
|
|
|
184
196
|
type: 'REMOVE_DATASOURCE_STASH';
|
|
185
197
|
url: string;
|
|
186
198
|
};
|
|
187
|
-
export type CardPluginAction = SetProvider | Queue | Resolve | Register | RemoveCard | ShowLinkToolbar | HideLinkToolbar | ShowDatasourceModal | HideDatasourceModal | RegisterSmartCardEvents | SetDatasourceTableRef | SetCardLayout | SetCardLayoutAndDatasourceTableRef | ClearOverlayCandidate | RegisterRemoveOverlayOnInsertedLink | SetDatasourceStash | RemoveDatasourceStash;
|
|
199
|
+
export type CardPluginAction = SetProvider | Queue | Resolve | Register | RemoveCard | ShowLinkToolbar | HideLinkToolbar | ShowDatasourceModal | HideDatasourceModal | RegisterSmartCardEvents | SetDatasourceTableRef | SetResolvedToolbarAttributes | SetCardLayout | SetCardLayoutAndDatasourceTableRef | ClearOverlayCandidate | RegisterRemoveOverlayOnInsertedLink | SetDatasourceStash | RemoveDatasourceStash;
|
|
188
200
|
export {};
|
|
@@ -47,6 +47,7 @@ export default class ResizableEmbedCard extends React.Component<Props, State> {
|
|
|
47
47
|
calcSnapPoints(): number[];
|
|
48
48
|
calcPxWidth: (useLayout?: RichMediaLayout) => number;
|
|
49
49
|
get insideInlineLike(): boolean;
|
|
50
|
+
private handleResizeStart;
|
|
50
51
|
highlights: (newWidth: number, snapPoints: number[]) => string[] | number[];
|
|
51
52
|
/**
|
|
52
53
|
* Previously height of the box was controlled with paddingTop/paddingBottom trick inside Wrapper.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.2",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@atlaskit/primitives": "^18.1.0",
|
|
62
62
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
63
63
|
"@atlaskit/smart-card": "^43.31.0",
|
|
64
|
-
"@atlaskit/tmp-editor-statsig": "^56.
|
|
64
|
+
"@atlaskit/tmp-editor-statsig": "^56.2.0",
|
|
65
65
|
"@atlaskit/tokens": "^12.0.0",
|
|
66
66
|
"@babel/runtime": "^7.0.0",
|
|
67
67
|
"@emotion/react": "^11.7.1",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"uuid": "^3.1.0"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"@atlaskit/editor-common": "^112.
|
|
74
|
+
"@atlaskit/editor-common": "^112.19.0",
|
|
75
75
|
"@atlaskit/link-provider": "^4.3.0",
|
|
76
76
|
"react": "^18.2.0",
|
|
77
77
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -122,6 +122,9 @@
|
|
|
122
122
|
"platform_editor_adf_with_localid": {
|
|
123
123
|
"type": "boolean"
|
|
124
124
|
},
|
|
125
|
+
"platform_synced_block_patch_9": {
|
|
126
|
+
"type": "boolean"
|
|
127
|
+
},
|
|
125
128
|
"jim-lower-ranking-in-jira-macro-search": {
|
|
126
129
|
"type": "boolean"
|
|
127
130
|
}
|