@atlaskit/editor-common 103.5.0 → 103.7.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 +21 -0
- package/dist/cjs/analytics/types/enums.js +1 -0
- package/dist/cjs/card/MediaAndEmbedsToolbar/index.js +11 -11
- package/dist/cjs/i18n/da.js +1 -0
- package/dist/cjs/i18n/de.js +1 -0
- package/dist/cjs/i18n/hu.js +1 -0
- package/dist/cjs/i18n/ja.js +1 -0
- package/dist/cjs/i18n/ko.js +1 -0
- package/dist/cjs/i18n/nb.js +1 -0
- package/dist/cjs/i18n/pt_BR.js +1 -0
- package/dist/cjs/i18n/ru.js +1 -0
- package/dist/cjs/i18n/th.js +1 -0
- package/dist/cjs/i18n/uk.js +1 -0
- package/dist/cjs/i18n/vi.js +1 -0
- package/dist/cjs/i18n/zh.js +1 -0
- package/dist/cjs/i18n/zh_TW.js +1 -0
- package/dist/cjs/messages/breakout.js +19 -0
- package/dist/cjs/messages/index.js +7 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/resizer/BreakoutResizer.js +9 -4
- package/dist/cjs/resizer/Resizer.js +17 -2
- package/dist/cjs/resizer/ResizerBreakoutModeLabel.js +48 -0
- package/dist/cjs/resizer/index.js +8 -1
- package/dist/cjs/styles/index.js +12 -0
- package/dist/cjs/styles/shared/table.js +3 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/analytics/types/enums.js +1 -0
- package/dist/es2019/card/MediaAndEmbedsToolbar/index.js +11 -12
- package/dist/es2019/i18n/da.js +1 -0
- package/dist/es2019/i18n/de.js +1 -0
- package/dist/es2019/i18n/hu.js +1 -0
- package/dist/es2019/i18n/ja.js +1 -0
- package/dist/es2019/i18n/ko.js +1 -0
- package/dist/es2019/i18n/nb.js +1 -0
- package/dist/es2019/i18n/pt_BR.js +1 -0
- package/dist/es2019/i18n/ru.js +1 -0
- package/dist/es2019/i18n/th.js +1 -0
- package/dist/es2019/i18n/uk.js +1 -0
- package/dist/es2019/i18n/vi.js +1 -0
- package/dist/es2019/i18n/zh.js +1 -0
- package/dist/es2019/i18n/zh_TW.js +1 -0
- package/dist/es2019/messages/breakout.js +13 -0
- package/dist/es2019/messages/index.js +1 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/resizer/BreakoutResizer.js +9 -4
- package/dist/es2019/resizer/Resizer.js +16 -1
- package/dist/es2019/resizer/ResizerBreakoutModeLabel.js +43 -0
- package/dist/es2019/resizer/index.js +2 -1
- package/dist/es2019/styles/index.js +1 -1
- package/dist/es2019/styles/shared/table.js +2 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/analytics/types/enums.js +1 -0
- package/dist/esm/card/MediaAndEmbedsToolbar/index.js +11 -11
- package/dist/esm/i18n/da.js +1 -0
- package/dist/esm/i18n/de.js +1 -0
- package/dist/esm/i18n/hu.js +1 -0
- package/dist/esm/i18n/ja.js +1 -0
- package/dist/esm/i18n/ko.js +1 -0
- package/dist/esm/i18n/nb.js +1 -0
- package/dist/esm/i18n/pt_BR.js +1 -0
- package/dist/esm/i18n/ru.js +1 -0
- package/dist/esm/i18n/th.js +1 -0
- package/dist/esm/i18n/uk.js +1 -0
- package/dist/esm/i18n/vi.js +1 -0
- package/dist/esm/i18n/zh.js +1 -0
- package/dist/esm/i18n/zh_TW.js +1 -0
- package/dist/esm/messages/breakout.js +13 -0
- package/dist/esm/messages/index.js +1 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/resizer/BreakoutResizer.js +9 -4
- package/dist/esm/resizer/Resizer.js +17 -2
- package/dist/esm/resizer/ResizerBreakoutModeLabel.js +41 -0
- package/dist/esm/resizer/index.js +2 -1
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/styles/shared/table.js +2 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/enums.d.ts +1 -0
- package/dist/types/analytics/types/general-events.d.ts +2 -1
- package/dist/types/card/MediaAndEmbedsToolbar/index.d.ts +1 -1
- package/dist/types/i18n/da.d.ts +1 -0
- package/dist/types/i18n/de.d.ts +1 -0
- package/dist/types/i18n/hu.d.ts +1 -0
- package/dist/types/i18n/ja.d.ts +1 -0
- package/dist/types/i18n/ko.d.ts +1 -0
- package/dist/types/i18n/nb.d.ts +1 -0
- package/dist/types/i18n/pt_BR.d.ts +1 -0
- package/dist/types/i18n/ru.d.ts +1 -0
- package/dist/types/i18n/th.d.ts +1 -0
- package/dist/types/i18n/uk.d.ts +1 -0
- package/dist/types/i18n/vi.d.ts +1 -0
- package/dist/types/i18n/zh.d.ts +1 -0
- package/dist/types/i18n/zh_TW.d.ts +1 -0
- package/dist/types/messages/breakout.d.ts +12 -0
- package/dist/types/messages/index.d.ts +1 -0
- package/dist/types/resizer/BreakoutResizer.d.ts +14 -12
- package/dist/types/resizer/Resizer.d.ts +5 -0
- package/dist/types/resizer/ResizerBreakoutModeLabel.d.ts +7 -0
- package/dist/types/resizer/index.d.ts +1 -0
- package/dist/types/resizer/useBreakoutGuidelines.d.ts +2 -2
- package/dist/types/styles/index.d.ts +1 -1
- package/dist/types/styles/shared/table.d.ts +2 -0
- package/dist/types-ts4.5/analytics/types/enums.d.ts +1 -0
- package/dist/types-ts4.5/analytics/types/general-events.d.ts +2 -1
- package/dist/types-ts4.5/card/MediaAndEmbedsToolbar/index.d.ts +1 -1
- package/dist/types-ts4.5/i18n/da.d.ts +1 -0
- package/dist/types-ts4.5/i18n/de.d.ts +1 -0
- package/dist/types-ts4.5/i18n/hu.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ja.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ko.d.ts +1 -0
- package/dist/types-ts4.5/i18n/nb.d.ts +1 -0
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ru.d.ts +1 -0
- package/dist/types-ts4.5/i18n/th.d.ts +1 -0
- package/dist/types-ts4.5/i18n/uk.d.ts +1 -0
- package/dist/types-ts4.5/i18n/vi.d.ts +1 -0
- package/dist/types-ts4.5/i18n/zh.d.ts +1 -0
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +1 -0
- package/dist/types-ts4.5/messages/breakout.d.ts +12 -0
- package/dist/types-ts4.5/messages/index.d.ts +1 -0
- package/dist/types-ts4.5/resizer/BreakoutResizer.d.ts +14 -12
- package/dist/types-ts4.5/resizer/Resizer.d.ts +5 -0
- package/dist/types-ts4.5/resizer/ResizerBreakoutModeLabel.d.ts +7 -0
- package/dist/types-ts4.5/resizer/index.d.ts +1 -0
- package/dist/types-ts4.5/resizer/useBreakoutGuidelines.d.ts +2 -2
- package/dist/types-ts4.5/styles/index.d.ts +1 -1
- package/dist/types-ts4.5/styles/shared/table.d.ts +2 -0
- package/package.json +5 -8
package/dist/es2019/i18n/ja.js
CHANGED
|
@@ -329,6 +329,7 @@ export default {
|
|
|
329
329
|
'fabric.editor.datasourceTitle': '検索クエリを編集',
|
|
330
330
|
'fabric.editor.date': '日付',
|
|
331
331
|
'fabric.editor.date.description': 'カレンダーを使用して日付を追加',
|
|
332
|
+
'fabric.editor.datePickerOpenedAlert': '日付エディターのポップアップが開きました。Tab キーを押してポップアップにアクセスしてください',
|
|
332
333
|
'fabric.editor.decision': '決定事項',
|
|
333
334
|
'fabric.editor.decision.description': '決定事項をキャプチャして簡単に追跡',
|
|
334
335
|
'fabric.editor.decisionPlaceholder': '決定事項を追加…',
|
package/dist/es2019/i18n/ko.js
CHANGED
|
@@ -329,6 +329,7 @@ export default {
|
|
|
329
329
|
'fabric.editor.datasourceTitle': '검색 쿼리 편집',
|
|
330
330
|
'fabric.editor.date': '날짜',
|
|
331
331
|
'fabric.editor.date.description': '캘린더로 날짜 추가',
|
|
332
|
+
'fabric.editor.datePickerOpenedAlert': '날짜 편집기 팝업이 열렸습니다. Tab 키를 눌러 팝업에 액세스하세요',
|
|
332
333
|
'fabric.editor.decision': '결정',
|
|
333
334
|
'fabric.editor.decision.description': '결정을 추적하기 쉽도록 캡처',
|
|
334
335
|
'fabric.editor.decisionPlaceholder': '결정 추가...',
|
package/dist/es2019/i18n/nb.js
CHANGED
|
@@ -328,6 +328,7 @@ export default {
|
|
|
328
328
|
'fabric.editor.datasourceTitle': 'Rediger søkespørring',
|
|
329
329
|
'fabric.editor.date': 'Dato',
|
|
330
330
|
'fabric.editor.date.description': 'Legg til en dato med en kalender',
|
|
331
|
+
'fabric.editor.datePickerOpenedAlert': 'Pop-up for å redigere dato er åpnet, trykk på Tab for å gå til pop-up-vinduet',
|
|
331
332
|
'fabric.editor.decision': 'Beslutning',
|
|
332
333
|
'fabric.editor.decision.description': 'Registrer beslutninger slik at det er lett å spore dem',
|
|
333
334
|
'fabric.editor.decisionPlaceholder': 'Legg til en beslutning …',
|
|
@@ -327,6 +327,7 @@ export default {
|
|
|
327
327
|
'fabric.editor.datasourceTitle': 'Editar consulta de pesquisa',
|
|
328
328
|
'fabric.editor.date': 'Data',
|
|
329
329
|
'fabric.editor.date.description': 'Adicionar data usando um calendário',
|
|
330
|
+
'fabric.editor.datePickerOpenedAlert': 'O pop-up do editor de data foi aberto, pressione Tab para acessar',
|
|
330
331
|
'fabric.editor.decision': 'Decisão',
|
|
331
332
|
'fabric.editor.decision.description': 'Registre decisões para facilitar o acompanhamento',
|
|
332
333
|
'fabric.editor.decisionPlaceholder': 'Adicionar uma decisão...',
|
package/dist/es2019/i18n/ru.js
CHANGED
|
@@ -329,6 +329,7 @@ export default {
|
|
|
329
329
|
'fabric.editor.datasourceTitle': 'Изменить поисковый запрос',
|
|
330
330
|
'fabric.editor.date': 'Дата',
|
|
331
331
|
'fabric.editor.date.description': 'Добавление даты из календаря',
|
|
332
|
+
'fabric.editor.datePickerOpenedAlert': 'Открылось всплывающее окно реактора даты. Для перехода к всплывающему окну нажмите клавишу табуляции',
|
|
332
333
|
'fabric.editor.decision': 'Решение',
|
|
333
334
|
'fabric.editor.decision.description': 'Записывайте решения для удобного отслеживания',
|
|
334
335
|
'fabric.editor.decisionPlaceholder': 'Добавить решение…',
|
package/dist/es2019/i18n/th.js
CHANGED
|
@@ -314,6 +314,7 @@ export default {
|
|
|
314
314
|
'fabric.editor.datasourceTitle': 'แก้ไขคำถามการค้นหา',
|
|
315
315
|
'fabric.editor.date': 'วันที่',
|
|
316
316
|
'fabric.editor.date.description': 'เพิ่มวันที่โดยใช้ปฏิทิน',
|
|
317
|
+
'fabric.editor.datePickerOpenedAlert': 'เปิดป๊อบอัพแก้ไขวันที่ แล้วกดที่ "แท็บ" เพื่อเข้าถึงป๊อบอัพ',
|
|
317
318
|
'fabric.editor.decision': 'การตัดสินใจ',
|
|
318
319
|
'fabric.editor.decision.description': 'สร้างกรอบการตัดสินใจเพื่อให้คุณติดตามได้ง่าย',
|
|
319
320
|
'fabric.editor.decisionPlaceholder': 'เพิ่มการตัดสินใจ…',
|
package/dist/es2019/i18n/uk.js
CHANGED
|
@@ -314,6 +314,7 @@ export default {
|
|
|
314
314
|
'fabric.editor.datasourceTitle': 'Редагувати пошуковий запит',
|
|
315
315
|
'fabric.editor.date': 'Дата',
|
|
316
316
|
'fabric.editor.date.description': 'Вставити дату через календар',
|
|
317
|
+
'fabric.editor.datePickerOpenedAlert': 'Відкрито спливне вікно редактора дат. Натисніть Tab, щоб викликати його.',
|
|
317
318
|
'fabric.editor.decision': 'Рішення',
|
|
318
319
|
'fabric.editor.decision.description': 'Зафіксувати рішення, щоб його було легко знайти',
|
|
319
320
|
'fabric.editor.decisionPlaceholder': 'Додати рішення...',
|
package/dist/es2019/i18n/vi.js
CHANGED
|
@@ -314,6 +314,7 @@ export default {
|
|
|
314
314
|
'fabric.editor.datasourceTitle': 'Sửa truy vấn tìm kiếm',
|
|
315
315
|
'fabric.editor.date': 'Ngày',
|
|
316
316
|
'fabric.editor.date.description': 'Thêm ngày bằng cách sử dụng lịch',
|
|
317
|
+
'fabric.editor.datePickerOpenedAlert': 'Cửa sổ bật lên của trình chỉnh sửa ngày đã mở, hãy nhấn Tab để truy cập cửa sổ bật lên',
|
|
317
318
|
'fabric.editor.decision': 'Quyết định',
|
|
318
319
|
'fabric.editor.decision.description': 'Thu thập các quyết định để dễ dàng theo dõi',
|
|
319
320
|
'fabric.editor.decisionPlaceholder': 'Thêm quyết định…',
|
package/dist/es2019/i18n/zh.js
CHANGED
|
@@ -329,6 +329,7 @@ export default {
|
|
|
329
329
|
'fabric.editor.datasourceTitle': '编辑搜索查询',
|
|
330
330
|
'fabric.editor.date': '日期',
|
|
331
331
|
'fabric.editor.date.description': '使用日历添加日期',
|
|
332
|
+
'fabric.editor.datePickerOpenedAlert': '日期编辑器弹出窗口已打开,按 Tab 键可访问弹出窗口',
|
|
332
333
|
'fabric.editor.decision': '决定',
|
|
333
334
|
'fabric.editor.decision.description': '捕获决策,以便轻松跟踪',
|
|
334
335
|
'fabric.editor.decisionPlaceholder': '添加决定...',
|
|
@@ -329,6 +329,7 @@ export default {
|
|
|
329
329
|
'fabric.editor.datasourceTitle': '編輯搜尋查詢',
|
|
330
330
|
'fabric.editor.date': '日期',
|
|
331
331
|
'fabric.editor.date.description': '使用日曆新增日期',
|
|
332
|
+
'fabric.editor.datePickerOpenedAlert': '日期編輯器快顯視窗已開啟,按 Tab 即可前往快顯視窗',
|
|
332
333
|
'fabric.editor.decision': '決定',
|
|
333
334
|
'fabric.editor.decision.description': '擷取決定以便追蹤',
|
|
334
335
|
'fabric.editor.decisionPlaceholder': '新增決定…',
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export const messages = defineMessages({
|
|
3
|
+
fullWidthLabel: {
|
|
4
|
+
id: 'fabric.editor.breakoutFullWidthLabel',
|
|
5
|
+
defaultMessage: 'Full-width',
|
|
6
|
+
description: 'Resize current element to full-width mode'
|
|
7
|
+
},
|
|
8
|
+
wideWidthLabel: {
|
|
9
|
+
id: 'fabric.editor.breakoutWideWidthLabel',
|
|
10
|
+
defaultMessage: 'Wide',
|
|
11
|
+
description: 'Resize current element to wide mode'
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { defineMessages } from 'react-intl-next';
|
|
5
5
|
export { alignmentMessages } from './alignment';
|
|
6
6
|
export { annotationMessages } from './annotation';
|
|
7
|
+
export { messages as breakoutMessages } from './breakout';
|
|
7
8
|
export { messages as blockTypeMessages } from './block-type';
|
|
8
9
|
export { codeBidiWarningMessages } from './codeBidiWarning';
|
|
9
10
|
export { linkMessages } from './link';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "103.
|
|
4
|
+
const packageVersion = "103.7.0";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -7,6 +7,7 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
|
7
7
|
import { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '../styles';
|
|
8
8
|
import { browser } from '../utils/browser';
|
|
9
9
|
import Resizer from './Resizer';
|
|
10
|
+
import { ResizerBreakoutModeLabel } from './ResizerBreakoutModeLabel';
|
|
10
11
|
import { SNAP_GAP, useBreakoutGuidelines } from './useBreakoutGuidelines';
|
|
11
12
|
const breakoutSupportedNodes = ['layoutSection', 'expand', 'codeBlock'];
|
|
12
13
|
const getHandleStyle = node => {
|
|
@@ -64,7 +65,6 @@ const defaultStyles = {
|
|
|
64
65
|
display: 'grid'
|
|
65
66
|
};
|
|
66
67
|
const RESIZE_STEP_VALUE = 10;
|
|
67
|
-
|
|
68
68
|
/**
|
|
69
69
|
* BreakoutResizer is a common component used to resize nodes that support the 'Breakout' mark, so it requires
|
|
70
70
|
* correct ADF support.
|
|
@@ -81,7 +81,8 @@ const BreakoutResizer = ({
|
|
|
81
81
|
parentRef,
|
|
82
82
|
displayGuidelines,
|
|
83
83
|
editorAnalyticsApi,
|
|
84
|
-
displayGapCursor
|
|
84
|
+
displayGapCursor,
|
|
85
|
+
onResizeStart
|
|
85
86
|
}) => {
|
|
86
87
|
const [{
|
|
87
88
|
minWidth,
|
|
@@ -125,6 +126,7 @@ const BreakoutResizer = ({
|
|
|
125
126
|
return $from.pos >= startPos && endPos >= $to.pos;
|
|
126
127
|
}, [editorView.state.doc, editorView.state.selection, getPos]);
|
|
127
128
|
const handleResizeStart = useCallback(() => {
|
|
129
|
+
onResizeStart === null || onResizeStart === void 0 ? void 0 : onResizeStart();
|
|
128
130
|
let newMinWidth;
|
|
129
131
|
let newMaxWidth;
|
|
130
132
|
const widthState = getEditorWidth();
|
|
@@ -143,7 +145,7 @@ const BreakoutResizer = ({
|
|
|
143
145
|
maxWidth: newMaxWidth
|
|
144
146
|
});
|
|
145
147
|
dispatch(state.tr.setMeta('is-resizer-resizing', true));
|
|
146
|
-
}, [getEditorWidth, editorView, displayGapCursor]);
|
|
148
|
+
}, [onResizeStart, getEditorWidth, editorView, displayGapCursor]);
|
|
147
149
|
const handleResize = useCallback((originalState, delta) => {
|
|
148
150
|
if (editorExperiment('single_column_layouts', true)) {
|
|
149
151
|
const newWidth = originalState.width + delta.width;
|
|
@@ -319,7 +321,10 @@ const BreakoutResizer = ({
|
|
|
319
321
|
handleSize: "clamped",
|
|
320
322
|
handleHighlight: "full-height",
|
|
321
323
|
handlePositioning: "adjacent",
|
|
322
|
-
handleAlignmentMethod: "sticky"
|
|
324
|
+
handleAlignmentMethod: "sticky",
|
|
325
|
+
labelComponent: currentLayout && editorExperiment('single_column_layouts', true) && ['full-width', 'wide'].includes(currentLayout || '') && /*#__PURE__*/React.createElement(ResizerBreakoutModeLabel, {
|
|
326
|
+
layout: currentLayout
|
|
327
|
+
})
|
|
323
328
|
});
|
|
324
329
|
};
|
|
325
330
|
export { BreakoutResizer };
|
|
@@ -2,8 +2,20 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import { Resizable } from 're-resizable';
|
|
5
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
6
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
5
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
6
8
|
import { handleWrapperClass, resizerDangerClassName, resizerExtendedZone, resizerHandleClassName, resizerHandleThumbClassName, resizerHandleTrackClassName, resizerHandleZIndex, resizerHoverZoneClassName, resizerItemClassName } from '../styles/shared/resizer';
|
|
9
|
+
const resizerLabelStyles = xcss({
|
|
10
|
+
position: 'absolute',
|
|
11
|
+
bottom: "var(--ds-space-negative-400, -32px)",
|
|
12
|
+
width: '100%',
|
|
13
|
+
overflow: 'visible',
|
|
14
|
+
display: 'flex',
|
|
15
|
+
justifyContent: 'center',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
height: "var(--ds-space-0, 0px)"
|
|
18
|
+
});
|
|
7
19
|
const SUPPORTED_HANDLES = ['left', 'right'];
|
|
8
20
|
const inheritedCSS = {
|
|
9
21
|
position: 'inherit',
|
|
@@ -46,6 +58,7 @@ const ResizerNext = (props, ref) => {
|
|
|
46
58
|
handleTooltipContent,
|
|
47
59
|
needExtendedResizeZone = true,
|
|
48
60
|
childrenDOMRef,
|
|
61
|
+
labelComponent,
|
|
49
62
|
...otherProps
|
|
50
63
|
} = props;
|
|
51
64
|
const onResizeStart = useCallback(event => {
|
|
@@ -200,6 +213,8 @@ const ResizerNext = (props, ref) => {
|
|
|
200
213
|
}, otherProps), /*#__PURE__*/React.createElement("span", {
|
|
201
214
|
className: resizerZoneClassName,
|
|
202
215
|
ref: ref => childrenDOMRef && childrenDOMRef(ref)
|
|
203
|
-
}, children))
|
|
216
|
+
}, children), labelComponent && editorExperiment('single_column_layouts', true) && /*#__PURE__*/React.createElement(Box, {
|
|
217
|
+
xcss: resizerLabelStyles
|
|
218
|
+
}, labelComponent));
|
|
204
219
|
};
|
|
205
220
|
export default /*#__PURE__*/forwardRef(ResizerNext);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl-next';
|
|
3
|
+
import { Box, Inline, xcss } from '@atlaskit/primitives';
|
|
4
|
+
import { breakoutMessages as messages } from '../messages';
|
|
5
|
+
const fullWidthLabelWrapperStyles = xcss({
|
|
6
|
+
height: "var(--ds-space-400, 32px)",
|
|
7
|
+
display: 'flex',
|
|
8
|
+
backgroundColor: 'elevation.surface.overlay',
|
|
9
|
+
borderRadius: 'border.radius',
|
|
10
|
+
boxShadow: 'elevation.shadow.overlay',
|
|
11
|
+
boxSizing: 'border-box',
|
|
12
|
+
alignItems: 'center'
|
|
13
|
+
});
|
|
14
|
+
const fullWidthLabelStyles = xcss({
|
|
15
|
+
marginLeft: 'space.100',
|
|
16
|
+
marginRight: 'space.100',
|
|
17
|
+
paddingLeft: 'space.075',
|
|
18
|
+
paddingRight: 'space.075',
|
|
19
|
+
paddingTop: 'space.050',
|
|
20
|
+
paddingBottom: 'space.050'
|
|
21
|
+
});
|
|
22
|
+
export const ResizerBreakoutModeLabel = ({
|
|
23
|
+
layout: breaktoutLayout
|
|
24
|
+
}) => {
|
|
25
|
+
const {
|
|
26
|
+
formatMessage
|
|
27
|
+
} = useIntl();
|
|
28
|
+
const message = React.useMemo(() => {
|
|
29
|
+
switch (breaktoutLayout) {
|
|
30
|
+
case 'full-width':
|
|
31
|
+
return formatMessage(messages.fullWidthLabel);
|
|
32
|
+
case 'wide':
|
|
33
|
+
return formatMessage(messages.wideWidthLabel);
|
|
34
|
+
default:
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
}, [breaktoutLayout, formatMessage]);
|
|
38
|
+
return message && /*#__PURE__*/React.createElement(Box, {
|
|
39
|
+
xcss: fullWidthLabelWrapperStyles
|
|
40
|
+
}, /*#__PURE__*/React.createElement(Inline, {
|
|
41
|
+
xcss: fullWidthLabelStyles
|
|
42
|
+
}, message));
|
|
43
|
+
};
|
|
@@ -3,4 +3,5 @@
|
|
|
3
3
|
|
|
4
4
|
export { default as ResizerNext } from './Resizer';
|
|
5
5
|
export { BreakoutResizer, ignoreResizerMutations } from './BreakoutResizer';
|
|
6
|
-
export { useBreakoutGuidelines } from './useBreakoutGuidelines';
|
|
6
|
+
export { useBreakoutGuidelines } from './useBreakoutGuidelines';
|
|
7
|
+
export { ResizerBreakoutModeLabel } from './ResizerBreakoutModeLabel';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
export { textColorStyles } from './shared/text-color';
|
|
5
5
|
export { backgroundColorStyles } from './shared/background-color';
|
|
6
|
-
export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides, tableCellMinWidth, tableNewColumnMinWidth, tableCellBorderWidth, calcTableWidth, TableSharedCssClassName, tableResizeHandleWidth, tableCellPadding, tableMarginTopWithControl } from './shared/table';
|
|
6
|
+
export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides, tableCellMinWidth, tableNewColumnMinWidth, tableCellBorderWidth, calcTableWidth, TableSharedCssClassName, tableResizeHandleWidth, tableCellPadding, tableMarginTopWithControl, tableControlsSpacing, tablePadding } from './shared/table';
|
|
7
7
|
export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles } from './shared/annotation';
|
|
8
8
|
export { columnLayoutSharedStyle, columnLayoutResponsiveSharedStyle, columnLayoutResponsiveRendererStyles } from './shared/column-layout';
|
|
9
9
|
export { mediaSingleSharedStyle, mediaSingleSharedStyleNew, richMediaClassName } from './shared/media-single';
|
|
@@ -15,6 +15,8 @@ export const tableNewColumnMinWidth = 140;
|
|
|
15
15
|
export const tableCellBorderWidth = 1;
|
|
16
16
|
export const tableCellPadding = 8;
|
|
17
17
|
export const tableResizeHandleWidth = 6;
|
|
18
|
+
export const tablePadding = 8;
|
|
19
|
+
export const tableControlsSpacing = tableMarginTop + tablePadding - tableCellBorderWidth;
|
|
18
20
|
export const TableSharedCssClassName = {
|
|
19
21
|
TABLE_CONTAINER: `${tablePrefixSelector}-container`,
|
|
20
22
|
TABLE_NODE_WRAPPER: `${tablePrefixSelector}-wrapper`,
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "103.
|
|
16
|
+
const packageVersion = "103.7.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -427,6 +427,7 @@ export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
427
427
|
ACTION_SUBJECT_ID["PICKER_MEDIA"] = "mediaPicker";
|
|
428
428
|
ACTION_SUBJECT_ID["PICKER_COLOR"] = "colorPicker";
|
|
429
429
|
ACTION_SUBJECT_ID["PICKER_EMOJI"] = "emojiPicker";
|
|
430
|
+
ACTION_SUBJECT_ID["DOCKED_PRIMARY_TOOLBAR"] = "dockedPrimaryToolbar";
|
|
430
431
|
ACTION_SUBJECT_ID["PLACEHOLDER_TEXT"] = "placeholderText";
|
|
431
432
|
ACTION_SUBJECT_ID["POST_QUERY_SEARCH_RESULTS"] = "postQuerySearchResults";
|
|
432
433
|
ACTION_SUBJECT_ID["PRE_QUERY_SEARCH_RESULTS"] = "preQuerySearchResults";
|
|
@@ -18,7 +18,6 @@ import EditorAlignImageLeft from '@atlaskit/icon/glyph/editor/align-image-left';
|
|
|
18
18
|
import EditorAlignImageRight from '@atlaskit/icon/glyph/editor/align-image-right';
|
|
19
19
|
import WrapLeftIcon from '@atlaskit/icon/glyph/editor/media-wrap-left';
|
|
20
20
|
import WrapRightIcon from '@atlaskit/icon/glyph/editor/media-wrap-right';
|
|
21
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
21
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../analytics';
|
|
23
22
|
import { insideTable } from '../../core-utils';
|
|
24
23
|
import commonMessages, { mediaAndEmbedToolbarMessages as toolbarMessages } from '../../messages';
|
|
@@ -110,7 +109,7 @@ var getNodeWidth = function getNodeWidth(node, schema) {
|
|
|
110
109
|
}
|
|
111
110
|
return node.firstChild && node.firstChild.attrs.width || node.attrs.width;
|
|
112
111
|
};
|
|
113
|
-
var makeAlign = function makeAlign(layout, nodeType, widthPluginDependencyApi, analyticsApi) {
|
|
112
|
+
var makeAlign = function makeAlign(layout, nodeType, widthPluginDependencyApi, analyticsApi, allowPixelResizing) {
|
|
114
113
|
return function (state, dispatch) {
|
|
115
114
|
var _ref = state.selection,
|
|
116
115
|
node = _ref.node;
|
|
@@ -124,7 +123,7 @@ var makeAlign = function makeAlign(layout, nodeType, widthPluginDependencyApi, a
|
|
|
124
123
|
return false;
|
|
125
124
|
}
|
|
126
125
|
var nodeWidth = getNodeWidth(node, state.schema);
|
|
127
|
-
var newAttrs =
|
|
126
|
+
var newAttrs = allowPixelResizing ? // with extended experience, change alignment does not change media single width
|
|
128
127
|
_objectSpread(_objectSpread({}, node.attrs), {}, {
|
|
129
128
|
layout: layout
|
|
130
129
|
}) : alignAttributes(layout, node.attrs, undefined, nodeWidth, widthPluginState.lineLength);
|
|
@@ -156,13 +155,13 @@ var makeAlign = function makeAlign(layout, nodeType, widthPluginDependencyApi, a
|
|
|
156
155
|
return true;
|
|
157
156
|
};
|
|
158
157
|
};
|
|
159
|
-
var getToolbarLayout = function getToolbarLayout(layout) {
|
|
160
|
-
if (nonWrappedLayouts.includes(layout) &&
|
|
158
|
+
var getToolbarLayout = function getToolbarLayout(layout, allowPixelResizing) {
|
|
159
|
+
if (nonWrappedLayouts.includes(layout) && allowPixelResizing) {
|
|
161
160
|
return 'center';
|
|
162
161
|
}
|
|
163
162
|
return layout;
|
|
164
163
|
};
|
|
165
|
-
var mapIconsToToolbarItem = function mapIconsToToolbarItem(icons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled) {
|
|
164
|
+
var mapIconsToToolbarItem = function mapIconsToToolbarItem(icons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled, allowPixelResizing) {
|
|
166
165
|
return icons.map(function (toolbarItem) {
|
|
167
166
|
var id = toolbarItem.id,
|
|
168
167
|
value = toolbarItem.value;
|
|
@@ -171,8 +170,8 @@ var mapIconsToToolbarItem = function mapIconsToToolbarItem(icons, layout, intl,
|
|
|
171
170
|
type: 'button',
|
|
172
171
|
icon: toolbarItem.icon,
|
|
173
172
|
title: intl.formatMessage(layoutToMessages[value]),
|
|
174
|
-
selected: getToolbarLayout(layout) === value,
|
|
175
|
-
onClick: makeAlign(value, nodeType, widthPluginDependencyApi, analyticsApi)
|
|
173
|
+
selected: getToolbarLayout(layout, allowPixelResizing) === value,
|
|
174
|
+
onClick: makeAlign(value, nodeType, widthPluginDependencyApi, analyticsApi, allowPixelResizing)
|
|
176
175
|
}, isChangingLayoutDisabled && {
|
|
177
176
|
disabled: value !== 'center'
|
|
178
177
|
});
|
|
@@ -186,14 +185,15 @@ var buildLayoutButtons = function buildLayoutButtons(state, intl, nodeType, widt
|
|
|
186
185
|
var allowWrapping = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : true;
|
|
187
186
|
var allowAlignment = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : true;
|
|
188
187
|
var isChangingLayoutDisabled = arguments.length > 9 ? arguments[9] : undefined;
|
|
188
|
+
var allowPixelResizing = arguments.length > 10 ? arguments[10] : undefined;
|
|
189
189
|
var selection = state.selection;
|
|
190
190
|
if (!(selection instanceof NodeSelection) || !selection.node || !nodeType || shouldHideLayoutToolbar(selection, state.schema, allowResizingInTables)) {
|
|
191
191
|
return [];
|
|
192
192
|
}
|
|
193
193
|
var layout = selection.node.attrs.layout;
|
|
194
|
-
var alignmentToolbarItems = allowAlignment ? mapIconsToToolbarItem(alignmentIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled) : [];
|
|
195
|
-
var wrappingToolbarItems = allowWrapping ? mapIconsToToolbarItem(wrappingIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled) : [];
|
|
196
|
-
var breakOutToolbarItems = !allowResizing ? mapIconsToToolbarItem(breakoutIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi) : [];
|
|
194
|
+
var alignmentToolbarItems = allowAlignment ? mapIconsToToolbarItem(alignmentIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled, allowPixelResizing) : [];
|
|
195
|
+
var wrappingToolbarItems = allowWrapping ? mapIconsToToolbarItem(wrappingIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled, allowPixelResizing) : [];
|
|
196
|
+
var breakOutToolbarItems = !allowResizing ? mapIconsToToolbarItem(breakoutIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, allowPixelResizing) : [];
|
|
197
197
|
var items = [].concat(_toConsumableArray(alignmentToolbarItems), _toConsumableArray(getSeparatorBetweenAlignmentAndWrapping(allowAlignment, allowWrapping)), _toConsumableArray(wrappingToolbarItems), _toConsumableArray(getSeparatorBeforeBreakoutItems(allowAlignment, allowWrapping, allowResizing)), _toConsumableArray(breakOutToolbarItems));
|
|
198
198
|
return items;
|
|
199
199
|
};
|
package/dist/esm/i18n/da.js
CHANGED
|
@@ -328,6 +328,7 @@ export default {
|
|
|
328
328
|
'fabric.editor.datasourceTitle': 'Rediger søgning',
|
|
329
329
|
'fabric.editor.date': 'Dato',
|
|
330
330
|
'fabric.editor.date.description': 'Tilføj en dato med en kalender',
|
|
331
|
+
'fabric.editor.datePickerOpenedAlert': 'Pop op-vinduet til datoredigering er åbnet. Tryk på Tabulatorknappen for at få adgang til pop op-vinduet',
|
|
331
332
|
'fabric.editor.decision': 'Beslutning',
|
|
332
333
|
'fabric.editor.decision.description': 'Registrér beslutninger, så de er lette at finde igen',
|
|
333
334
|
'fabric.editor.decisionPlaceholder': 'Tilføj en beslutning ...',
|
package/dist/esm/i18n/de.js
CHANGED
|
@@ -706,6 +706,7 @@ export default {
|
|
|
706
706
|
'fabric.editor.toolbarLabel': 'Editor',
|
|
707
707
|
'fabric.editor.toolbarMediaTitle': 'Bild, Video oder Datei hinzufügen',
|
|
708
708
|
'fabric.editor.toolbarPositionFixedAtTop': 'Oben fixiert',
|
|
709
|
+
'fabric.editor.toolbarPositionInline': 'Auf gleicher Höhe wie der Text',
|
|
709
710
|
'fabric.editor.tooltip.blockPanel': 'ein Panel',
|
|
710
711
|
'fabric.editor.tooltip.bulletList': 'eine Liste',
|
|
711
712
|
'fabric.editor.tooltip.decisionList': 'eine Entscheidungsliste',
|
package/dist/esm/i18n/hu.js
CHANGED
|
@@ -327,6 +327,7 @@ export default {
|
|
|
327
327
|
'fabric.editor.datasourceTitle': 'Keresési lekérdezés szerkesztése',
|
|
328
328
|
'fabric.editor.date': 'Dátum',
|
|
329
329
|
'fabric.editor.date.description': 'Dátum hozzáadása naptár használatával',
|
|
330
|
+
'fabric.editor.datePickerOpenedAlert': 'Megnyílt a dátumszerkesztő előugró ablak, amelyet a Tab billentyűvel érhetsz el',
|
|
330
331
|
'fabric.editor.decision': 'Döntés',
|
|
331
332
|
'fabric.editor.decision.description': 'Döntések rögzítése az egyszerű nyomon követés érdekében',
|
|
332
333
|
'fabric.editor.decisionPlaceholder': 'Döntés hozzáadása...',
|
package/dist/esm/i18n/ja.js
CHANGED
|
@@ -329,6 +329,7 @@ export default {
|
|
|
329
329
|
'fabric.editor.datasourceTitle': '検索クエリを編集',
|
|
330
330
|
'fabric.editor.date': '日付',
|
|
331
331
|
'fabric.editor.date.description': 'カレンダーを使用して日付を追加',
|
|
332
|
+
'fabric.editor.datePickerOpenedAlert': '日付エディターのポップアップが開きました。Tab キーを押してポップアップにアクセスしてください',
|
|
332
333
|
'fabric.editor.decision': '決定事項',
|
|
333
334
|
'fabric.editor.decision.description': '決定事項をキャプチャして簡単に追跡',
|
|
334
335
|
'fabric.editor.decisionPlaceholder': '決定事項を追加…',
|
package/dist/esm/i18n/ko.js
CHANGED
|
@@ -329,6 +329,7 @@ export default {
|
|
|
329
329
|
'fabric.editor.datasourceTitle': '검색 쿼리 편집',
|
|
330
330
|
'fabric.editor.date': '날짜',
|
|
331
331
|
'fabric.editor.date.description': '캘린더로 날짜 추가',
|
|
332
|
+
'fabric.editor.datePickerOpenedAlert': '날짜 편집기 팝업이 열렸습니다. Tab 키를 눌러 팝업에 액세스하세요',
|
|
332
333
|
'fabric.editor.decision': '결정',
|
|
333
334
|
'fabric.editor.decision.description': '결정을 추적하기 쉽도록 캡처',
|
|
334
335
|
'fabric.editor.decisionPlaceholder': '결정 추가...',
|
package/dist/esm/i18n/nb.js
CHANGED
|
@@ -328,6 +328,7 @@ export default {
|
|
|
328
328
|
'fabric.editor.datasourceTitle': 'Rediger søkespørring',
|
|
329
329
|
'fabric.editor.date': 'Dato',
|
|
330
330
|
'fabric.editor.date.description': 'Legg til en dato med en kalender',
|
|
331
|
+
'fabric.editor.datePickerOpenedAlert': 'Pop-up for å redigere dato er åpnet, trykk på Tab for å gå til pop-up-vinduet',
|
|
331
332
|
'fabric.editor.decision': 'Beslutning',
|
|
332
333
|
'fabric.editor.decision.description': 'Registrer beslutninger slik at det er lett å spore dem',
|
|
333
334
|
'fabric.editor.decisionPlaceholder': 'Legg til en beslutning …',
|
package/dist/esm/i18n/pt_BR.js
CHANGED
|
@@ -327,6 +327,7 @@ export default {
|
|
|
327
327
|
'fabric.editor.datasourceTitle': 'Editar consulta de pesquisa',
|
|
328
328
|
'fabric.editor.date': 'Data',
|
|
329
329
|
'fabric.editor.date.description': 'Adicionar data usando um calendário',
|
|
330
|
+
'fabric.editor.datePickerOpenedAlert': 'O pop-up do editor de data foi aberto, pressione Tab para acessar',
|
|
330
331
|
'fabric.editor.decision': 'Decisão',
|
|
331
332
|
'fabric.editor.decision.description': 'Registre decisões para facilitar o acompanhamento',
|
|
332
333
|
'fabric.editor.decisionPlaceholder': 'Adicionar uma decisão...',
|
package/dist/esm/i18n/ru.js
CHANGED
|
@@ -329,6 +329,7 @@ export default {
|
|
|
329
329
|
'fabric.editor.datasourceTitle': 'Изменить поисковый запрос',
|
|
330
330
|
'fabric.editor.date': 'Дата',
|
|
331
331
|
'fabric.editor.date.description': 'Добавление даты из календаря',
|
|
332
|
+
'fabric.editor.datePickerOpenedAlert': 'Открылось всплывающее окно реактора даты. Для перехода к всплывающему окну нажмите клавишу табуляции',
|
|
332
333
|
'fabric.editor.decision': 'Решение',
|
|
333
334
|
'fabric.editor.decision.description': 'Записывайте решения для удобного отслеживания',
|
|
334
335
|
'fabric.editor.decisionPlaceholder': 'Добавить решение…',
|
package/dist/esm/i18n/th.js
CHANGED
|
@@ -314,6 +314,7 @@ export default {
|
|
|
314
314
|
'fabric.editor.datasourceTitle': 'แก้ไขคำถามการค้นหา',
|
|
315
315
|
'fabric.editor.date': 'วันที่',
|
|
316
316
|
'fabric.editor.date.description': 'เพิ่มวันที่โดยใช้ปฏิทิน',
|
|
317
|
+
'fabric.editor.datePickerOpenedAlert': 'เปิดป๊อบอัพแก้ไขวันที่ แล้วกดที่ "แท็บ" เพื่อเข้าถึงป๊อบอัพ',
|
|
317
318
|
'fabric.editor.decision': 'การตัดสินใจ',
|
|
318
319
|
'fabric.editor.decision.description': 'สร้างกรอบการตัดสินใจเพื่อให้คุณติดตามได้ง่าย',
|
|
319
320
|
'fabric.editor.decisionPlaceholder': 'เพิ่มการตัดสินใจ…',
|
package/dist/esm/i18n/uk.js
CHANGED
|
@@ -314,6 +314,7 @@ export default {
|
|
|
314
314
|
'fabric.editor.datasourceTitle': 'Редагувати пошуковий запит',
|
|
315
315
|
'fabric.editor.date': 'Дата',
|
|
316
316
|
'fabric.editor.date.description': 'Вставити дату через календар',
|
|
317
|
+
'fabric.editor.datePickerOpenedAlert': 'Відкрито спливне вікно редактора дат. Натисніть Tab, щоб викликати його.',
|
|
317
318
|
'fabric.editor.decision': 'Рішення',
|
|
318
319
|
'fabric.editor.decision.description': 'Зафіксувати рішення, щоб його було легко знайти',
|
|
319
320
|
'fabric.editor.decisionPlaceholder': 'Додати рішення...',
|
package/dist/esm/i18n/vi.js
CHANGED
|
@@ -314,6 +314,7 @@ export default {
|
|
|
314
314
|
'fabric.editor.datasourceTitle': 'Sửa truy vấn tìm kiếm',
|
|
315
315
|
'fabric.editor.date': 'Ngày',
|
|
316
316
|
'fabric.editor.date.description': 'Thêm ngày bằng cách sử dụng lịch',
|
|
317
|
+
'fabric.editor.datePickerOpenedAlert': 'Cửa sổ bật lên của trình chỉnh sửa ngày đã mở, hãy nhấn Tab để truy cập cửa sổ bật lên',
|
|
317
318
|
'fabric.editor.decision': 'Quyết định',
|
|
318
319
|
'fabric.editor.decision.description': 'Thu thập các quyết định để dễ dàng theo dõi',
|
|
319
320
|
'fabric.editor.decisionPlaceholder': 'Thêm quyết định…',
|
package/dist/esm/i18n/zh.js
CHANGED
|
@@ -329,6 +329,7 @@ export default {
|
|
|
329
329
|
'fabric.editor.datasourceTitle': '编辑搜索查询',
|
|
330
330
|
'fabric.editor.date': '日期',
|
|
331
331
|
'fabric.editor.date.description': '使用日历添加日期',
|
|
332
|
+
'fabric.editor.datePickerOpenedAlert': '日期编辑器弹出窗口已打开,按 Tab 键可访问弹出窗口',
|
|
332
333
|
'fabric.editor.decision': '决定',
|
|
333
334
|
'fabric.editor.decision.description': '捕获决策,以便轻松跟踪',
|
|
334
335
|
'fabric.editor.decisionPlaceholder': '添加决定...',
|
package/dist/esm/i18n/zh_TW.js
CHANGED
|
@@ -329,6 +329,7 @@ export default {
|
|
|
329
329
|
'fabric.editor.datasourceTitle': '編輯搜尋查詢',
|
|
330
330
|
'fabric.editor.date': '日期',
|
|
331
331
|
'fabric.editor.date.description': '使用日曆新增日期',
|
|
332
|
+
'fabric.editor.datePickerOpenedAlert': '日期編輯器快顯視窗已開啟,按 Tab 即可前往快顯視窗',
|
|
332
333
|
'fabric.editor.decision': '決定',
|
|
333
334
|
'fabric.editor.decision.description': '擷取決定以便追蹤',
|
|
334
335
|
'fabric.editor.decisionPlaceholder': '新增決定…',
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export var messages = defineMessages({
|
|
3
|
+
fullWidthLabel: {
|
|
4
|
+
id: 'fabric.editor.breakoutFullWidthLabel',
|
|
5
|
+
defaultMessage: 'Full-width',
|
|
6
|
+
description: 'Resize current element to full-width mode'
|
|
7
|
+
},
|
|
8
|
+
wideWidthLabel: {
|
|
9
|
+
id: 'fabric.editor.breakoutWideWidthLabel',
|
|
10
|
+
defaultMessage: 'Wide',
|
|
11
|
+
description: 'Resize current element to wide mode'
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { defineMessages } from 'react-intl-next';
|
|
5
5
|
export { alignmentMessages } from './alignment';
|
|
6
6
|
export { annotationMessages } from './annotation';
|
|
7
|
+
export { messages as breakoutMessages } from './breakout';
|
|
7
8
|
export { messages as blockTypeMessages } from './block-type';
|
|
8
9
|
export { codeBidiWarningMessages } from './codeBidiWarning';
|
|
9
10
|
export { linkMessages } from './link';
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "103.
|
|
10
|
+
var packageVersion = "103.7.0";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -8,6 +8,7 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
|
8
8
|
import { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '../styles';
|
|
9
9
|
import { browser } from '../utils/browser';
|
|
10
10
|
import Resizer from './Resizer';
|
|
11
|
+
import { ResizerBreakoutModeLabel } from './ResizerBreakoutModeLabel';
|
|
11
12
|
import { SNAP_GAP, useBreakoutGuidelines } from './useBreakoutGuidelines';
|
|
12
13
|
var breakoutSupportedNodes = ['layoutSection', 'expand', 'codeBlock'];
|
|
13
14
|
var getHandleStyle = function getHandleStyle(node) {
|
|
@@ -65,7 +66,6 @@ var defaultStyles = {
|
|
|
65
66
|
display: 'grid'
|
|
66
67
|
};
|
|
67
68
|
var RESIZE_STEP_VALUE = 10;
|
|
68
|
-
|
|
69
69
|
/**
|
|
70
70
|
* BreakoutResizer is a common component used to resize nodes that support the 'Breakout' mark, so it requires
|
|
71
71
|
* correct ADF support.
|
|
@@ -82,7 +82,8 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
82
82
|
parentRef = _ref.parentRef,
|
|
83
83
|
displayGuidelines = _ref.displayGuidelines,
|
|
84
84
|
editorAnalyticsApi = _ref.editorAnalyticsApi,
|
|
85
|
-
displayGapCursor = _ref.displayGapCursor
|
|
85
|
+
displayGapCursor = _ref.displayGapCursor,
|
|
86
|
+
onResizeStart = _ref.onResizeStart;
|
|
86
87
|
var _useState = useState({
|
|
87
88
|
minWidth: undefined,
|
|
88
89
|
maxWidth: undefined,
|
|
@@ -125,6 +126,7 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
125
126
|
return $from.pos >= startPos && endPos >= $to.pos;
|
|
126
127
|
}, [editorView.state.doc, editorView.state.selection, getPos]);
|
|
127
128
|
var handleResizeStart = useCallback(function () {
|
|
129
|
+
onResizeStart === null || onResizeStart === void 0 || onResizeStart();
|
|
128
130
|
var newMinWidth;
|
|
129
131
|
var newMaxWidth;
|
|
130
132
|
var widthState = getEditorWidth();
|
|
@@ -141,7 +143,7 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
141
143
|
maxWidth: newMaxWidth
|
|
142
144
|
});
|
|
143
145
|
dispatch(state.tr.setMeta('is-resizer-resizing', true));
|
|
144
|
-
}, [getEditorWidth, editorView, displayGapCursor]);
|
|
146
|
+
}, [onResizeStart, getEditorWidth, editorView, displayGapCursor]);
|
|
145
147
|
var handleResize = useCallback(function (originalState, delta) {
|
|
146
148
|
if (editorExperiment('single_column_layouts', true)) {
|
|
147
149
|
var newWidth = originalState.width + delta.width;
|
|
@@ -315,7 +317,10 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
315
317
|
handleSize: "clamped",
|
|
316
318
|
handleHighlight: "full-height",
|
|
317
319
|
handlePositioning: "adjacent",
|
|
318
|
-
handleAlignmentMethod: "sticky"
|
|
320
|
+
handleAlignmentMethod: "sticky",
|
|
321
|
+
labelComponent: currentLayout && editorExperiment('single_column_layouts', true) && ['full-width', 'wide'].includes(currentLayout || '') && /*#__PURE__*/React.createElement(ResizerBreakoutModeLabel, {
|
|
322
|
+
layout: currentLayout
|
|
323
|
+
})
|
|
319
324
|
});
|
|
320
325
|
};
|
|
321
326
|
export { BreakoutResizer };
|