@jetbrains/ring-ui-built 7.0.72 → 7.0.73
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/components/_helpers/anchor.js +55 -13
- package/components/_helpers/avatar-info.js +44 -11
- package/components/_helpers/caption.js +2 -2
- package/components/_helpers/card.js +21 -21
- package/components/_helpers/icon-svg.js +75 -17
- package/components/_helpers/input.js +13 -13
- package/components/_helpers/query-assist-suggestions.js +5 -5
- package/components/_helpers/select-filter.js +5 -5
- package/components/_helpers/services-link.js +5 -5
- package/components/_helpers/sidebar.js +6 -6
- package/components/_helpers/tab-link.js +69 -17
- package/components/_helpers/theme.js +231 -54
- package/components/_helpers/title.js +5 -5
- package/components/alert/alert.d.ts +1 -1
- package/components/alert/alert.js +12 -10
- package/components/alert/container.js +4 -4
- package/components/alert-service/alert-service.d.ts +1 -1
- package/components/alert-service/alert-service.js +5 -4
- package/components/auth/auth-core.js +8 -8
- package/components/auth/auth.js +3 -2
- package/components/auth/down-notification.js +61 -17
- package/components/auth/iframe-flow.js +7 -6
- package/components/auth/storage.js +3 -2
- package/components/auth/token-validator.js +1 -1
- package/components/auth/window-flow.js +2 -2
- package/components/auth-dialog/auth-dialog.d.ts +1 -1
- package/components/auth-dialog/auth-dialog.js +15 -14
- package/components/auth-dialog-service/auth-dialog-service.js +4 -6
- package/components/avatar/avatar-info.d.ts +1 -1
- package/components/avatar/avatar-info.js +3 -2
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/avatar.js +16 -15
- package/components/avatar/fallback-avatar.d.ts +1 -1
- package/components/avatar/fallback-avatar.js +183 -59
- package/components/avatar-stack/avatar-stack.d.ts +1 -1
- package/components/avatar-stack/avatar-stack.js +115 -29
- package/components/banner/banner.d.ts +1 -1
- package/components/banner/banner.js +11 -10
- package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/components/breadcrumbs/breadcrumbs.js +3 -2
- package/components/button/button.d.ts +1 -1
- package/components/button/button.js +11 -10
- package/components/button-group/button-group.d.ts +1 -1
- package/components/button-group/button-group.js +6 -8
- package/components/button-group/caption.d.ts +1 -1
- package/components/button-group/caption.js +1 -1
- package/components/button-set/button-set.d.ts +1 -1
- package/components/button-set/button-set.js +2 -5
- package/components/button-toolbar/button-toolbar.d.ts +1 -1
- package/components/button-toolbar/button-toolbar.js +2 -5
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.js +12 -17
- package/components/clipboard/clipboard.js +2 -1
- package/components/code/code.d.ts +1 -1
- package/components/code/code.js +5 -5
- package/components/collapse/collapse-content.js +161 -77
- package/components/collapse/collapse-control.js +69 -22
- package/components/collapse/collapse.js +83 -31
- package/components/confirm/confirm.d.ts +1 -1
- package/components/confirm/confirm.js +11 -13
- package/components/confirm-service/confirm-service.js +4 -3
- package/components/content-layout/content-layout.d.ts +1 -1
- package/components/content-layout/content-layout.js +4 -7
- package/components/content-layout/sidebar.d.ts +1 -1
- package/components/content-layout/sidebar.js +1 -1
- package/components/contenteditable/contenteditable.d.ts +2 -2
- package/components/contenteditable/contenteditable.js +50 -14
- package/components/control-help/control-help.d.ts +1 -1
- package/components/control-help/control-help.js +45 -9
- package/components/control-label/control-label.js +62 -13
- package/components/data-list/data-list.d.ts +1 -1
- package/components/data-list/data-list.js +10 -9
- package/components/data-list/data-list.mock.d.ts +1 -1
- package/components/data-list/data-list.mock.js +79 -78
- package/components/data-list/item.d.ts +2 -2
- package/components/data-list/item.js +18 -17
- package/components/data-list/title.d.ts +1 -1
- package/components/data-list/title.js +2 -1
- package/components/date-picker/consts.js +1 -1
- package/components/date-picker/date-input.d.ts +1 -1
- package/components/date-picker/date-input.js +4 -3
- package/components/date-picker/date-picker.d.ts +1 -1
- package/components/date-picker/date-picker.js +97 -31
- package/components/date-picker/date-popup.d.ts +1 -1
- package/components/date-picker/date-popup.js +11 -10
- package/components/date-picker/day.d.ts +1 -1
- package/components/date-picker/day.js +4 -3
- package/components/date-picker/month-names.d.ts +1 -1
- package/components/date-picker/month-names.js +98 -22
- package/components/date-picker/month-slider.d.ts +1 -1
- package/components/date-picker/month-slider.js +4 -4
- package/components/date-picker/month.d.ts +1 -1
- package/components/date-picker/month.js +79 -18
- package/components/date-picker/months.d.ts +1 -1
- package/components/date-picker/months.js +163 -53
- package/components/date-picker/weekdays.d.ts +1 -1
- package/components/date-picker/weekdays.js +56 -16
- package/components/date-picker/years.d.ts +1 -1
- package/components/date-picker/years.js +5 -5
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dialog/dialog.js +21 -23
- package/components/dropdown/anchor.d.ts +1 -1
- package/components/dropdown/anchor.js +2 -1
- package/components/dropdown/dropdown.d.ts +1 -1
- package/components/dropdown/dropdown.js +7 -8
- package/components/dropdown-menu/dropdown-menu.js +299 -83
- package/components/editable-heading/editable-heading.d.ts +2 -2
- package/components/editable-heading/editable-heading.js +523 -174
- package/components/error-bubble/error-bubble.d.ts +1 -1
- package/components/error-bubble/error-bubble.js +7 -9
- package/components/error-message/error-message.d.ts +1 -1
- package/components/error-message/error-message.js +8 -10
- package/components/footer/footer.js +205 -61
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/create-stateful-context.js +73 -18
- package/components/global/focus-sensor-hoc.js +2 -2
- package/components/global/get-uid.js +1 -1
- package/components/global/react-dom-renderer.d.ts +1 -1
- package/components/global/react-dom-renderer.js +2 -2
- package/components/global/rerender-hoc.js +23 -6
- package/components/global/theme.js +3 -2
- package/components/global/use-event-callback.js +37 -13
- package/components/grid/col.d.ts +1 -1
- package/components/grid/col.js +3 -3
- package/components/grid/grid.d.ts +1 -1
- package/components/grid/grid.js +3 -6
- package/components/grid/row.d.ts +1 -1
- package/components/grid/row.js +3 -3
- package/components/group/group.d.ts +1 -1
- package/components/group/group.js +3 -6
- package/components/header/header-icon.d.ts +1 -1
- package/components/header/header-icon.js +3 -2
- package/components/header/header.d.ts +1 -1
- package/components/header/header.js +7 -12
- package/components/header/links.d.ts +1 -1
- package/components/header/links.js +45 -10
- package/components/header/logo.d.ts +1 -1
- package/components/header/logo.js +4 -3
- package/components/header/profile.js +17 -16
- package/components/header/services-link.d.ts +1 -1
- package/components/header/services-link.js +1 -1
- package/components/header/services.d.ts +1 -1
- package/components/header/services.js +35 -16
- package/components/header/smart-profile.d.ts +1 -1
- package/components/header/smart-profile.js +6 -5
- package/components/header/smart-services.d.ts +1 -1
- package/components/header/smart-services.js +3 -2
- package/components/header/tray.d.ts +1 -1
- package/components/header/tray.js +3 -3
- package/components/heading/heading.js +188 -44
- package/components/i18n/i18n-context.js +51 -13
- package/components/icon/icon-svg.d.ts +1 -1
- package/components/icon/icon-svg.js +2 -1
- package/components/icon/icon.d.ts +1 -1
- package/components/icon/icon.js +6 -5
- package/components/icon/index.js +2 -1
- package/components/input/input.d.ts +1 -1
- package/components/input/input.js +2 -1
- package/components/island/adaptive-island-hoc.js +4 -4
- package/components/island/content.d.ts +1 -1
- package/components/island/content.js +36 -17
- package/components/island/header.d.ts +1 -1
- package/components/island/header.js +32 -14
- package/components/island/island.d.ts +1 -1
- package/components/island/island.js +3 -5
- package/components/link/clickable-link.d.ts +1 -1
- package/components/link/clickable-link.js +2 -2
- package/components/link/link.js +4 -4
- package/components/list/list-custom.d.ts +1 -1
- package/components/list/list-custom.js +2 -2
- package/components/list/list-hint.d.ts +1 -1
- package/components/list/list-hint.js +3 -7
- package/components/list/list-item.d.ts +1 -1
- package/components/list/list-item.js +23 -26
- package/components/list/list-separator.d.ts +1 -1
- package/components/list/list-separator.js +3 -3
- package/components/list/list-title.d.ts +1 -1
- package/components/list/list-title.js +7 -7
- package/components/list/list-users-groups-source.js +6 -5
- package/components/list/list.d.ts +6 -6
- package/components/list/list.js +33 -31
- package/components/loader/loader.d.ts +1 -1
- package/components/loader/loader.js +8 -14
- package/components/loader-inline/loader-inline.d.ts +1 -1
- package/components/loader-inline/loader-inline.js +4 -7
- package/components/loader-screen/loader-screen.d.ts +1 -1
- package/components/loader-screen/loader-screen.js +3 -6
- package/components/login-dialog/login-dialog.d.ts +1 -1
- package/components/login-dialog/login-dialog.js +10 -9
- package/components/login-dialog/service.js +4 -3
- package/components/markdown/markdown.d.ts +1 -1
- package/components/markdown/markdown.js +3 -6
- package/components/message/message.d.ts +1 -1
- package/components/message/message.js +13 -15
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/pager/pager.d.ts +5 -5
- package/components/pager/pager.js +28 -27
- package/components/panel/panel.d.ts +1 -1
- package/components/panel/panel.js +3 -6
- package/components/popup/popup.d.ts +2 -2
- package/components/popup/popup.js +14 -11
- package/components/popup/popup.target.js +68 -16
- package/components/popup-menu/popup-menu.d.ts +1 -1
- package/components/popup-menu/popup-menu.js +7 -9
- package/components/progress-bar/progress-bar.d.ts +1 -1
- package/components/progress-bar/progress-bar.js +4 -7
- package/components/query-assist/query-assist-suggestions.d.ts +1 -1
- package/components/query-assist/query-assist-suggestions.js +5 -4
- package/components/query-assist/query-assist.d.ts +2 -2
- package/components/query-assist/query-assist.js +37 -34
- package/components/radio/radio-item.d.ts +1 -1
- package/components/radio/radio-item.js +40 -20
- package/components/radio/radio.d.ts +1 -1
- package/components/radio/radio.js +3 -5
- package/components/scrollable-section/scrollable-section.d.ts +1 -1
- package/components/scrollable-section/scrollable-section.js +100 -38
- package/components/select/select-filter.d.ts +1 -1
- package/components/select/select-filter.js +5 -4
- package/components/select/select-popup.d.ts +7 -7
- package/components/select/select-popup.js +26 -25
- package/components/select/select.d.ts +3 -3
- package/components/select/select.js +52 -52
- package/components/shortcuts/shortcuts-hoc.js +3 -3
- package/components/slider/slider.js +591 -196
- package/components/storage/storage-local.js +2 -1
- package/components/storage/storage.js +2 -1
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +247 -102
- package/components/table/cell.d.ts +1 -1
- package/components/table/cell.js +2 -2
- package/components/table/disable-hover-hoc.js +3 -3
- package/components/table/header-cell.d.ts +1 -1
- package/components/table/header-cell.js +7 -6
- package/components/table/header.d.ts +2 -2
- package/components/table/header.js +14 -13
- package/components/table/multitable.d.ts +1 -1
- package/components/table/multitable.js +3 -3
- package/components/table/row-with-focus-sensor.d.ts +1 -1
- package/components/table/row-with-focus-sensor.js +3 -2
- package/components/table/row.d.ts +1 -1
- package/components/table/row.js +51 -24
- package/components/table/selection-shortcuts-hoc.js +2 -2
- package/components/table/simple-table.d.ts +1 -1
- package/components/table/simple-table.js +4 -3
- package/components/table/smart-table.d.ts +1 -1
- package/components/table/smart-table.js +4 -3
- package/components/table/table.d.ts +2 -2
- package/components/table/table.js +21 -23
- package/components/tabs/collapsible-more.d.ts +3 -3
- package/components/tabs/collapsible-more.js +253 -83
- package/components/tabs/collapsible-tab.d.ts +1 -1
- package/components/tabs/collapsible-tab.js +4 -3
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/collapsible-tabs.js +450 -188
- package/components/tabs/dumb-tabs.d.ts +2 -2
- package/components/tabs/dumb-tabs.js +10 -9
- package/components/tabs/smart-tabs.d.ts +1 -1
- package/components/tabs/smart-tabs.js +6 -5
- package/components/tabs/tab-link.d.ts +1 -1
- package/components/tabs/tab-link.js +2 -1
- package/components/tabs/tab.d.ts +1 -1
- package/components/tabs/tab.js +2 -2
- package/components/tabs/tabs.js +5 -4
- package/components/tag/tag.d.ts +5 -5
- package/components/tag/tag.js +14 -13
- package/components/tags-input/tags-input.d.ts +1 -1
- package/components/tags-input/tags-input.js +10 -9
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/tags-list/tags-list.js +4 -3
- package/components/text/text.d.ts +1 -1
- package/components/text/text.js +2 -2
- package/components/toggle/toggle.d.ts +1 -1
- package/components/toggle/toggle.js +12 -11
- package/components/tooltip/tooltip.d.ts +1 -1
- package/components/tooltip/tooltip.js +7 -6
- package/components/upload/upload.js +10 -9
- package/components/user-agreement/service.js +11 -10
- package/components/user-agreement/user-agreement.d.ts +1 -1
- package/components/user-agreement/user-agreement.js +19 -18
- package/components/user-card/card.d.ts +1 -1
- package/components/user-card/card.js +3 -2
- package/components/user-card/smart-user-card-tooltip.d.ts +2 -2
- package/components/user-card/smart-user-card-tooltip.js +7 -6
- package/components/user-card/tooltip.d.ts +2 -2
- package/components/user-card/tooltip.js +7 -6
- package/components/user-card/user-card.js +4 -3
- package/package.json +3 -9
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import Heading, { Levels } from '../heading/heading.js';
|
|
6
6
|
import { Button } from '../button/button.js';
|
|
7
7
|
import { S as Size, i as inputStyles } from '../_helpers/input.js';
|
|
8
8
|
import getUID from '../global/get-uid.js';
|
|
9
9
|
import Shortcuts from '../shortcuts/shortcuts.js';
|
|
10
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
10
11
|
import 'util-deprecate';
|
|
11
12
|
import '../_helpers/heading.js';
|
|
12
13
|
import '@jetbrains/icons/chevron-down';
|
|
@@ -36,38 +37,155 @@ var styles = {"editableHeading":"ring-editable-heading-editableHeading","fullSiz
|
|
|
36
37
|
function noop() {}
|
|
37
38
|
// eslint-disable-next-line complexity
|
|
38
39
|
const EditableHeading = props => {
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
40
|
+
const $ = c(129);
|
|
41
|
+
if ($[0] !== "fa5dbeebbdcff2c9ff069f75420e1602116bbe04977ffad50d824f81650995a9") {
|
|
42
|
+
for (let $i = 0; $i < 129; $i += 1) {
|
|
43
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
44
|
+
}
|
|
45
|
+
$[0] = "fa5dbeebbdcff2c9ff069f75420e1602116bbe04977ffad50d824f81650995a9";
|
|
46
|
+
}
|
|
47
|
+
let children;
|
|
48
|
+
let className;
|
|
49
|
+
let dataTest;
|
|
50
|
+
let disabled;
|
|
51
|
+
let error;
|
|
52
|
+
let headingClassName;
|
|
53
|
+
let inputClassName;
|
|
54
|
+
let maxInputRows;
|
|
55
|
+
let onBlur;
|
|
56
|
+
let onChange;
|
|
57
|
+
let onFocus;
|
|
58
|
+
let onScroll;
|
|
59
|
+
let restProps;
|
|
60
|
+
let t0;
|
|
61
|
+
let t1;
|
|
62
|
+
let t10;
|
|
63
|
+
let t11;
|
|
64
|
+
let t12;
|
|
65
|
+
let t2;
|
|
66
|
+
let t3;
|
|
67
|
+
let t4;
|
|
68
|
+
let t5;
|
|
69
|
+
let t6;
|
|
70
|
+
let t7;
|
|
71
|
+
let t8;
|
|
72
|
+
let t9;
|
|
73
|
+
if ($[1] !== props) {
|
|
74
|
+
({
|
|
75
|
+
level: t0,
|
|
76
|
+
className,
|
|
77
|
+
headingClassName,
|
|
78
|
+
inputClassName,
|
|
79
|
+
children,
|
|
80
|
+
isEditing: t1,
|
|
81
|
+
isSavingPossible: t2,
|
|
82
|
+
isSaving: t3,
|
|
83
|
+
embedded: t4,
|
|
84
|
+
size: t5,
|
|
85
|
+
onEdit: t6,
|
|
86
|
+
onSave: t7,
|
|
87
|
+
onCancel: t8,
|
|
88
|
+
autoFocus: t9,
|
|
89
|
+
"data-test": dataTest,
|
|
90
|
+
error,
|
|
91
|
+
disabled,
|
|
92
|
+
multiline: t10,
|
|
93
|
+
renderMenu: t11,
|
|
94
|
+
onFocus,
|
|
95
|
+
onBlur,
|
|
96
|
+
onChange,
|
|
97
|
+
onScroll,
|
|
98
|
+
maxInputRows,
|
|
99
|
+
translations: t12,
|
|
100
|
+
...restProps
|
|
101
|
+
} = props);
|
|
102
|
+
$[1] = props;
|
|
103
|
+
$[2] = children;
|
|
104
|
+
$[3] = className;
|
|
105
|
+
$[4] = dataTest;
|
|
106
|
+
$[5] = disabled;
|
|
107
|
+
$[6] = error;
|
|
108
|
+
$[7] = headingClassName;
|
|
109
|
+
$[8] = inputClassName;
|
|
110
|
+
$[9] = maxInputRows;
|
|
111
|
+
$[10] = onBlur;
|
|
112
|
+
$[11] = onChange;
|
|
113
|
+
$[12] = onFocus;
|
|
114
|
+
$[13] = onScroll;
|
|
115
|
+
$[14] = restProps;
|
|
116
|
+
$[15] = t0;
|
|
117
|
+
$[16] = t1;
|
|
118
|
+
$[17] = t10;
|
|
119
|
+
$[18] = t11;
|
|
120
|
+
$[19] = t12;
|
|
121
|
+
$[20] = t2;
|
|
122
|
+
$[21] = t3;
|
|
123
|
+
$[22] = t4;
|
|
124
|
+
$[23] = t5;
|
|
125
|
+
$[24] = t6;
|
|
126
|
+
$[25] = t7;
|
|
127
|
+
$[26] = t8;
|
|
128
|
+
$[27] = t9;
|
|
129
|
+
} else {
|
|
130
|
+
children = $[2];
|
|
131
|
+
className = $[3];
|
|
132
|
+
dataTest = $[4];
|
|
133
|
+
disabled = $[5];
|
|
134
|
+
error = $[6];
|
|
135
|
+
headingClassName = $[7];
|
|
136
|
+
inputClassName = $[8];
|
|
137
|
+
maxInputRows = $[9];
|
|
138
|
+
onBlur = $[10];
|
|
139
|
+
onChange = $[11];
|
|
140
|
+
onFocus = $[12];
|
|
141
|
+
onScroll = $[13];
|
|
142
|
+
restProps = $[14];
|
|
143
|
+
t0 = $[15];
|
|
144
|
+
t1 = $[16];
|
|
145
|
+
t10 = $[17];
|
|
146
|
+
t11 = $[18];
|
|
147
|
+
t12 = $[19];
|
|
148
|
+
t2 = $[20];
|
|
149
|
+
t3 = $[21];
|
|
150
|
+
t4 = $[22];
|
|
151
|
+
t5 = $[23];
|
|
152
|
+
t6 = $[24];
|
|
153
|
+
t7 = $[25];
|
|
154
|
+
t8 = $[26];
|
|
155
|
+
t9 = $[27];
|
|
156
|
+
}
|
|
157
|
+
const level = t0 === undefined ? Levels.H1 : t0;
|
|
158
|
+
const isEditing = t1 === undefined ? false : t1;
|
|
159
|
+
const isSavingPossible = t2 === undefined ? false : t2;
|
|
160
|
+
const isSaving = t3 === undefined ? false : t3;
|
|
161
|
+
const embedded = t4 === undefined ? false : t4;
|
|
162
|
+
const size = t5 === undefined ? Size.L : t5;
|
|
163
|
+
const onEdit = t6 === undefined ? noop : t6;
|
|
164
|
+
const onSave = t7 === undefined ? noop : t7;
|
|
165
|
+
const onCancel = t8 === undefined ? noop : t8;
|
|
166
|
+
const autoFocus = t9 === undefined ? true : t9;
|
|
167
|
+
const multiline = t10 === undefined ? false : t10;
|
|
168
|
+
const renderMenu = t11 === undefined ? _temp : t11;
|
|
169
|
+
let t13;
|
|
170
|
+
if ($[28] !== t12) {
|
|
171
|
+
t13 = t12 === undefined ? {
|
|
172
|
+
save: "Save",
|
|
173
|
+
cancel: "Cancel"
|
|
174
|
+
} : t12;
|
|
175
|
+
$[28] = t12;
|
|
176
|
+
$[29] = t13;
|
|
177
|
+
} else {
|
|
178
|
+
t13 = $[29];
|
|
179
|
+
}
|
|
180
|
+
const translations = t13;
|
|
181
|
+
let t14;
|
|
182
|
+
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
183
|
+
t14 = getUID("ring-editable-heading-");
|
|
184
|
+
$[30] = t14;
|
|
185
|
+
} else {
|
|
186
|
+
t14 = $[30];
|
|
187
|
+
}
|
|
188
|
+
const [shortcutsScope] = React.useState(t14);
|
|
71
189
|
const [isInFocus, setIsInFocus] = React.useState(false);
|
|
72
190
|
const [isMouseDown, setIsMouseDown] = React.useState(false);
|
|
73
191
|
const [isInSelectionMode, setIsInSelectionMode] = React.useState(false);
|
|
@@ -75,167 +193,398 @@ const EditableHeading = props => {
|
|
|
75
193
|
const [isScrolledToBottom, setIsScrolledToBottom] = React.useState(false);
|
|
76
194
|
const [isOverflow, setIsOverflow] = React.useState(false);
|
|
77
195
|
const hasError = error !== undefined;
|
|
78
|
-
|
|
196
|
+
let t15;
|
|
197
|
+
if ($[31] !== children || $[32] !== hasError || $[33] !== isSaving || $[34] !== isSavingPossible) {
|
|
198
|
+
t15 = !isSavingPossible || !children || children.trim() === "" || hasError || isSaving;
|
|
199
|
+
$[31] = children;
|
|
200
|
+
$[32] = hasError;
|
|
201
|
+
$[33] = isSaving;
|
|
202
|
+
$[34] = isSavingPossible;
|
|
203
|
+
$[35] = t15;
|
|
204
|
+
} else {
|
|
205
|
+
t15 = $[35];
|
|
206
|
+
}
|
|
207
|
+
const isSaveDisabled = t15;
|
|
79
208
|
const isCancelDisabled = isSaving;
|
|
80
209
|
const isShortcutsDisabled = !isInFocus || isSaving;
|
|
81
|
-
|
|
82
|
-
|
|
210
|
+
let map;
|
|
211
|
+
if ($[36] !== isCancelDisabled || $[37] !== isSaveDisabled || $[38] !== onCancel || $[39] !== onSave) {
|
|
212
|
+
map = {};
|
|
83
213
|
if (!isSaveDisabled) {
|
|
84
214
|
map.enter = onSave;
|
|
85
215
|
}
|
|
86
216
|
if (isCancelDisabled) {
|
|
87
217
|
map.esc = onCancel;
|
|
88
218
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
[
|
|
93
|
-
[
|
|
94
|
-
|
|
95
|
-
[
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
checkOverflow(e.target);
|
|
155
|
-
onScroll?.(e);
|
|
156
|
-
}, [onScroll, checkOverflow]);
|
|
157
|
-
const onInputBlur = React.useCallback(e => {
|
|
158
|
-
setIsInFocus(false);
|
|
159
|
-
onBlur?.(e);
|
|
160
|
-
}, [onBlur]);
|
|
161
|
-
useEffect(() => {
|
|
162
|
-
window.addEventListener('mousemove', onMouseMove);
|
|
163
|
-
window.addEventListener('mouseup', onMouseUp);
|
|
164
|
-
return () => {
|
|
165
|
-
window.removeEventListener('mousemove', onMouseMove);
|
|
166
|
-
window.removeEventListener('mouseup', onMouseUp);
|
|
219
|
+
$[36] = isCancelDisabled;
|
|
220
|
+
$[37] = isSaveDisabled;
|
|
221
|
+
$[38] = onCancel;
|
|
222
|
+
$[39] = onSave;
|
|
223
|
+
$[40] = map;
|
|
224
|
+
} else {
|
|
225
|
+
map = $[40];
|
|
226
|
+
}
|
|
227
|
+
const shortcutsMap = map;
|
|
228
|
+
const t16 = isEditing && size === Size.FULL;
|
|
229
|
+
let t17;
|
|
230
|
+
if ($[41] !== className || $[42] !== disabled || $[43] !== hasError || $[44] !== isEditing || $[45] !== isInSelectionMode || $[46] !== multiline || $[47] !== t16) {
|
|
231
|
+
t17 = classNames(styles.editableHeading, className, {
|
|
232
|
+
[styles.fullSize]: t16,
|
|
233
|
+
[styles.isEditing]: isEditing,
|
|
234
|
+
[styles.error]: hasError,
|
|
235
|
+
[styles.disabled]: disabled,
|
|
236
|
+
[styles.multiline]: multiline,
|
|
237
|
+
[styles.selectionMode]: isInSelectionMode
|
|
238
|
+
});
|
|
239
|
+
$[41] = className;
|
|
240
|
+
$[42] = disabled;
|
|
241
|
+
$[43] = hasError;
|
|
242
|
+
$[44] = isEditing;
|
|
243
|
+
$[45] = isInSelectionMode;
|
|
244
|
+
$[46] = multiline;
|
|
245
|
+
$[47] = t16;
|
|
246
|
+
$[48] = t17;
|
|
247
|
+
} else {
|
|
248
|
+
t17 = $[48];
|
|
249
|
+
}
|
|
250
|
+
const classes = t17;
|
|
251
|
+
const t18 = styles[`size${size}`];
|
|
252
|
+
let t19;
|
|
253
|
+
if ($[49] !== headingClassName || $[50] !== t18) {
|
|
254
|
+
t19 = classNames(styles.heading, headingClassName, t18);
|
|
255
|
+
$[49] = headingClassName;
|
|
256
|
+
$[50] = t18;
|
|
257
|
+
$[51] = t19;
|
|
258
|
+
} else {
|
|
259
|
+
t19 = $[51];
|
|
260
|
+
}
|
|
261
|
+
const headingClasses = t19;
|
|
262
|
+
const t20 = !isOverflow;
|
|
263
|
+
let t21;
|
|
264
|
+
if ($[52] !== inputClassName || $[53] !== level || $[54] !== size || $[55] !== t20) {
|
|
265
|
+
t21 = classNames("ring-js-shortcuts", styles.input, styles.textarea, {
|
|
266
|
+
[styles.textareaNotOverflow]: t20
|
|
267
|
+
}, inputStyles[`size${size}`], styles[`level${level}`], inputClassName);
|
|
268
|
+
$[52] = inputClassName;
|
|
269
|
+
$[53] = level;
|
|
270
|
+
$[54] = size;
|
|
271
|
+
$[55] = t20;
|
|
272
|
+
$[56] = t21;
|
|
273
|
+
} else {
|
|
274
|
+
t21 = $[56];
|
|
275
|
+
}
|
|
276
|
+
const inputClasses = t21;
|
|
277
|
+
const stretch = _temp2;
|
|
278
|
+
let t22;
|
|
279
|
+
if ($[57] !== multiline) {
|
|
280
|
+
t22 = el_0 => {
|
|
281
|
+
if (multiline && el_0 && el_0.scrollHeight >= el_0.clientHeight) {
|
|
282
|
+
stretch(el_0);
|
|
283
|
+
}
|
|
167
284
|
};
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
285
|
+
$[57] = multiline;
|
|
286
|
+
$[58] = t22;
|
|
287
|
+
} else {
|
|
288
|
+
t22 = $[58];
|
|
289
|
+
}
|
|
290
|
+
const checkValue = t22;
|
|
291
|
+
let t23;
|
|
292
|
+
if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
|
|
293
|
+
t23 = el_1 => {
|
|
294
|
+
const scrollHeight = el_1.scrollHeight || 0;
|
|
295
|
+
const clientHeight = el_1.clientHeight || 0;
|
|
296
|
+
const scrollTop = el_1.scrollTop || 0;
|
|
297
|
+
setIsScrolledToBottom(scrollHeight - clientHeight <= scrollTop);
|
|
298
|
+
setIsOverflow(scrollHeight > clientHeight);
|
|
299
|
+
};
|
|
300
|
+
$[59] = t23;
|
|
301
|
+
} else {
|
|
302
|
+
t23 = $[59];
|
|
303
|
+
}
|
|
304
|
+
const checkOverflow = t23;
|
|
305
|
+
let t24;
|
|
306
|
+
if ($[60] === Symbol.for("react.memo_cache_sentinel")) {
|
|
307
|
+
t24 = () => {
|
|
308
|
+
setIsMouseDown(true);
|
|
309
|
+
};
|
|
310
|
+
$[60] = t24;
|
|
311
|
+
} else {
|
|
312
|
+
t24 = $[60];
|
|
313
|
+
}
|
|
314
|
+
const onHeadingMouseDown = t24;
|
|
315
|
+
let t25;
|
|
316
|
+
if ($[61] !== isMouseDown) {
|
|
317
|
+
t25 = () => {
|
|
318
|
+
if (!isMouseDown) {
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
setIsInSelectionMode(true);
|
|
322
|
+
};
|
|
323
|
+
$[61] = isMouseDown;
|
|
324
|
+
$[62] = t25;
|
|
325
|
+
} else {
|
|
326
|
+
t25 = $[62];
|
|
327
|
+
}
|
|
328
|
+
const onMouseMove = t25;
|
|
329
|
+
let t26;
|
|
330
|
+
if ($[63] !== disabled || $[64] !== isInSelectionMode || $[65] !== isMouseDown || $[66] !== onEdit) {
|
|
331
|
+
t26 = () => {
|
|
332
|
+
if (isMouseDown && !isInSelectionMode && !disabled) {
|
|
333
|
+
onEdit();
|
|
334
|
+
}
|
|
335
|
+
setIsMouseDown(false);
|
|
336
|
+
setIsInSelectionMode(false);
|
|
337
|
+
};
|
|
338
|
+
$[63] = disabled;
|
|
339
|
+
$[64] = isInSelectionMode;
|
|
340
|
+
$[65] = isMouseDown;
|
|
341
|
+
$[66] = onEdit;
|
|
342
|
+
$[67] = t26;
|
|
343
|
+
} else {
|
|
344
|
+
t26 = $[67];
|
|
345
|
+
}
|
|
346
|
+
const onMouseUp = t26;
|
|
347
|
+
let t27;
|
|
348
|
+
if ($[68] !== checkValue || $[69] !== onFocus) {
|
|
349
|
+
t27 = e => {
|
|
350
|
+
setIsInFocus(true);
|
|
351
|
+
checkValue(e.target);
|
|
352
|
+
checkOverflow(e.target);
|
|
353
|
+
onFocus?.(e);
|
|
354
|
+
};
|
|
355
|
+
$[68] = checkValue;
|
|
356
|
+
$[69] = onFocus;
|
|
357
|
+
$[70] = t27;
|
|
358
|
+
} else {
|
|
359
|
+
t27 = $[70];
|
|
360
|
+
}
|
|
361
|
+
const onInputFocus = t27;
|
|
362
|
+
let t28;
|
|
363
|
+
if ($[71] !== checkValue || $[72] !== onChange) {
|
|
364
|
+
t28 = e_0 => {
|
|
365
|
+
checkValue(e_0.target);
|
|
366
|
+
checkOverflow(e_0.target);
|
|
367
|
+
onChange?.(e_0);
|
|
368
|
+
};
|
|
369
|
+
$[71] = checkValue;
|
|
370
|
+
$[72] = onChange;
|
|
371
|
+
$[73] = t28;
|
|
372
|
+
} else {
|
|
373
|
+
t28 = $[73];
|
|
374
|
+
}
|
|
375
|
+
const onInputChange = t28;
|
|
376
|
+
let t29;
|
|
377
|
+
if ($[74] !== onScroll) {
|
|
378
|
+
t29 = e_1 => {
|
|
379
|
+
checkOverflow(e_1.target);
|
|
380
|
+
onScroll?.(e_1);
|
|
381
|
+
};
|
|
382
|
+
$[74] = onScroll;
|
|
383
|
+
$[75] = t29;
|
|
384
|
+
} else {
|
|
385
|
+
t29 = $[75];
|
|
386
|
+
}
|
|
387
|
+
const onInputScroll = t29;
|
|
388
|
+
let t30;
|
|
389
|
+
if ($[76] !== onBlur) {
|
|
390
|
+
t30 = e_2 => {
|
|
391
|
+
setIsInFocus(false);
|
|
392
|
+
onBlur?.(e_2);
|
|
393
|
+
};
|
|
394
|
+
$[76] = onBlur;
|
|
395
|
+
$[77] = t30;
|
|
396
|
+
} else {
|
|
397
|
+
t30 = $[77];
|
|
398
|
+
}
|
|
399
|
+
const onInputBlur = t30;
|
|
400
|
+
let t31;
|
|
401
|
+
let t32;
|
|
402
|
+
if ($[78] !== onMouseMove || $[79] !== onMouseUp) {
|
|
403
|
+
t31 = () => {
|
|
404
|
+
window.addEventListener("mousemove", onMouseMove);
|
|
405
|
+
window.addEventListener("mouseup", onMouseUp);
|
|
406
|
+
return () => {
|
|
407
|
+
window.removeEventListener("mousemove", onMouseMove);
|
|
408
|
+
window.removeEventListener("mouseup", onMouseUp);
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
t32 = [onMouseMove, onMouseUp];
|
|
412
|
+
$[78] = onMouseMove;
|
|
413
|
+
$[79] = onMouseUp;
|
|
414
|
+
$[80] = t31;
|
|
415
|
+
$[81] = t32;
|
|
416
|
+
} else {
|
|
417
|
+
t31 = $[80];
|
|
418
|
+
t32 = $[81];
|
|
419
|
+
}
|
|
420
|
+
useEffect(t31, t32);
|
|
421
|
+
let t33;
|
|
422
|
+
if ($[82] !== autoFocus || $[83] !== children || $[84] !== dataTest || $[85] !== disabled || $[86] !== headingClasses || $[87] !== inputClasses || $[88] !== isEditing || $[89] !== isSaving || $[90] !== isScrolledToBottom || $[91] !== isShortcutsDisabled || $[92] !== level || $[93] !== maxInputRows || $[94] !== multiline || $[95] !== onChange || $[96] !== onInputBlur || $[97] !== onInputChange || $[98] !== onInputFocus || $[99] !== onInputScroll || $[100] !== restProps || $[101] !== shortcutsMap || $[102] !== shortcutsScope || $[103] !== size) {
|
|
423
|
+
t33 = !disabled && isEditing ? /*#__PURE__*/jsxs(Fragment, {
|
|
424
|
+
children: [/*#__PURE__*/jsx(Shortcuts, {
|
|
425
|
+
map: shortcutsMap,
|
|
426
|
+
scope: shortcutsScope,
|
|
427
|
+
disabled: isShortcutsDisabled
|
|
428
|
+
}), !multiline ? /*#__PURE__*/jsx("input", {
|
|
429
|
+
className: inputClasses,
|
|
430
|
+
value: children,
|
|
431
|
+
autoFocus: autoFocus,
|
|
432
|
+
"data-test": dataTest,
|
|
433
|
+
disabled: isSaving,
|
|
434
|
+
onChange: onChange,
|
|
435
|
+
...restProps,
|
|
436
|
+
onFocus: onInputFocus,
|
|
437
|
+
onBlur: onInputBlur
|
|
438
|
+
}) : /*#__PURE__*/jsxs("div", {
|
|
439
|
+
className: classNames(styles.textareaWrapper, inputStyles[`size${size}`]),
|
|
440
|
+
children: [/*#__PURE__*/jsx("textarea", {
|
|
441
|
+
ref: textAreaRef,
|
|
178
442
|
className: inputClasses,
|
|
179
443
|
value: children,
|
|
180
444
|
autoFocus: autoFocus,
|
|
181
445
|
"data-test": dataTest,
|
|
182
446
|
disabled: isSaving,
|
|
183
|
-
onChange:
|
|
447
|
+
onChange: onInputChange,
|
|
184
448
|
...restProps,
|
|
185
449
|
onFocus: onInputFocus,
|
|
186
|
-
onBlur: onInputBlur
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
autoFocus: autoFocus,
|
|
194
|
-
"data-test": dataTest,
|
|
195
|
-
disabled: isSaving,
|
|
196
|
-
onChange: onInputChange,
|
|
197
|
-
...restProps,
|
|
198
|
-
onFocus: onInputFocus,
|
|
199
|
-
onBlur: onInputBlur,
|
|
200
|
-
onScroll: onInputScroll,
|
|
201
|
-
style: {
|
|
202
|
-
maxHeight: maxInputRows ? `${maxInputRows}lh` : ''
|
|
203
|
-
}
|
|
204
|
-
}), !isScrolledToBottom && jsx("div", {
|
|
205
|
-
className: styles.textareaFade
|
|
206
|
-
})]
|
|
207
|
-
})]
|
|
208
|
-
}) : jsx("button", {
|
|
209
|
-
type: 'button',
|
|
210
|
-
className: styles.headingWrapperButton,
|
|
211
|
-
onMouseDown: onHeadingMouseDown,
|
|
212
|
-
children: jsx(Heading, {
|
|
213
|
-
className: headingClasses,
|
|
214
|
-
level: level,
|
|
215
|
-
"data-test": dataTest,
|
|
216
|
-
children: children
|
|
217
|
-
})
|
|
218
|
-
}), !isEditing && renderMenu(), isEditing && !embedded && jsxs(Fragment, {
|
|
219
|
-
children: [jsx(Button, {
|
|
220
|
-
className: styles.button,
|
|
221
|
-
primary: true,
|
|
222
|
-
disabled: isSaveDisabled,
|
|
223
|
-
loader: isSaving,
|
|
224
|
-
onClick: onSave,
|
|
225
|
-
children: translations.save
|
|
226
|
-
}), jsx(Button, {
|
|
227
|
-
className: styles.button,
|
|
228
|
-
disabled: isCancelDisabled,
|
|
229
|
-
onClick: onCancel,
|
|
230
|
-
children: translations.cancel
|
|
450
|
+
onBlur: onInputBlur,
|
|
451
|
+
onScroll: onInputScroll,
|
|
452
|
+
style: {
|
|
453
|
+
maxHeight: maxInputRows ? `${maxInputRows}lh` : ""
|
|
454
|
+
}
|
|
455
|
+
}), !isScrolledToBottom && /*#__PURE__*/jsx("div", {
|
|
456
|
+
className: styles.textareaFade
|
|
231
457
|
})]
|
|
232
458
|
})]
|
|
233
|
-
})
|
|
459
|
+
}) : /*#__PURE__*/jsx("button", {
|
|
460
|
+
type: "button",
|
|
461
|
+
className: styles.headingWrapperButton,
|
|
462
|
+
onMouseDown: onHeadingMouseDown,
|
|
463
|
+
children: /*#__PURE__*/jsx(Heading, {
|
|
464
|
+
className: headingClasses,
|
|
465
|
+
level: level,
|
|
466
|
+
"data-test": dataTest,
|
|
467
|
+
children: children
|
|
468
|
+
})
|
|
469
|
+
});
|
|
470
|
+
$[82] = autoFocus;
|
|
471
|
+
$[83] = children;
|
|
472
|
+
$[84] = dataTest;
|
|
473
|
+
$[85] = disabled;
|
|
474
|
+
$[86] = headingClasses;
|
|
475
|
+
$[87] = inputClasses;
|
|
476
|
+
$[88] = isEditing;
|
|
477
|
+
$[89] = isSaving;
|
|
478
|
+
$[90] = isScrolledToBottom;
|
|
479
|
+
$[91] = isShortcutsDisabled;
|
|
480
|
+
$[92] = level;
|
|
481
|
+
$[93] = maxInputRows;
|
|
482
|
+
$[94] = multiline;
|
|
483
|
+
$[95] = onChange;
|
|
484
|
+
$[96] = onInputBlur;
|
|
485
|
+
$[97] = onInputChange;
|
|
486
|
+
$[98] = onInputFocus;
|
|
487
|
+
$[99] = onInputScroll;
|
|
488
|
+
$[100] = restProps;
|
|
489
|
+
$[101] = shortcutsMap;
|
|
490
|
+
$[102] = shortcutsScope;
|
|
491
|
+
$[103] = size;
|
|
492
|
+
$[104] = t33;
|
|
493
|
+
} else {
|
|
494
|
+
t33 = $[104];
|
|
495
|
+
}
|
|
496
|
+
let t34;
|
|
497
|
+
if ($[105] !== isEditing || $[106] !== renderMenu) {
|
|
498
|
+
t34 = !isEditing && renderMenu();
|
|
499
|
+
$[105] = isEditing;
|
|
500
|
+
$[106] = renderMenu;
|
|
501
|
+
$[107] = t34;
|
|
502
|
+
} else {
|
|
503
|
+
t34 = $[107];
|
|
504
|
+
}
|
|
505
|
+
let t35;
|
|
506
|
+
if ($[108] !== embedded || $[109] !== isCancelDisabled || $[110] !== isEditing || $[111] !== isSaveDisabled || $[112] !== isSaving || $[113] !== onCancel || $[114] !== onSave || $[115] !== translations) {
|
|
507
|
+
t35 = isEditing && !embedded && /*#__PURE__*/jsxs(Fragment, {
|
|
508
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
509
|
+
className: styles.button,
|
|
510
|
+
primary: true,
|
|
511
|
+
disabled: isSaveDisabled,
|
|
512
|
+
loader: isSaving,
|
|
513
|
+
onClick: onSave,
|
|
514
|
+
children: translations.save
|
|
515
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
516
|
+
className: styles.button,
|
|
517
|
+
disabled: isCancelDisabled,
|
|
518
|
+
onClick: onCancel,
|
|
519
|
+
children: translations.cancel
|
|
520
|
+
})]
|
|
521
|
+
});
|
|
522
|
+
$[108] = embedded;
|
|
523
|
+
$[109] = isCancelDisabled;
|
|
524
|
+
$[110] = isEditing;
|
|
525
|
+
$[111] = isSaveDisabled;
|
|
526
|
+
$[112] = isSaving;
|
|
527
|
+
$[113] = onCancel;
|
|
528
|
+
$[114] = onSave;
|
|
529
|
+
$[115] = translations;
|
|
530
|
+
$[116] = t35;
|
|
531
|
+
} else {
|
|
532
|
+
t35 = $[116];
|
|
533
|
+
}
|
|
534
|
+
let t36;
|
|
535
|
+
if ($[117] !== classes || $[118] !== t33 || $[119] !== t34 || $[120] !== t35) {
|
|
536
|
+
t36 = /*#__PURE__*/jsxs("div", {
|
|
537
|
+
className: classes,
|
|
538
|
+
children: [t33, t34, t35]
|
|
539
|
+
});
|
|
540
|
+
$[117] = classes;
|
|
541
|
+
$[118] = t33;
|
|
542
|
+
$[119] = t34;
|
|
543
|
+
$[120] = t35;
|
|
544
|
+
$[121] = t36;
|
|
545
|
+
} else {
|
|
546
|
+
t36 = $[121];
|
|
547
|
+
}
|
|
548
|
+
let t37;
|
|
549
|
+
if ($[122] !== error || $[123] !== isEditing || $[124] !== size) {
|
|
550
|
+
t37 = isEditing && error && /*#__PURE__*/jsx("div", {
|
|
234
551
|
className: classNames(styles.errorText, inputStyles[`size${size}`]),
|
|
235
552
|
children: error
|
|
236
|
-
})
|
|
237
|
-
|
|
553
|
+
});
|
|
554
|
+
$[122] = error;
|
|
555
|
+
$[123] = isEditing;
|
|
556
|
+
$[124] = size;
|
|
557
|
+
$[125] = t37;
|
|
558
|
+
} else {
|
|
559
|
+
t37 = $[125];
|
|
560
|
+
}
|
|
561
|
+
let t38;
|
|
562
|
+
if ($[126] !== t36 || $[127] !== t37) {
|
|
563
|
+
t38 = /*#__PURE__*/jsxs(Fragment, {
|
|
564
|
+
children: [t36, t37]
|
|
565
|
+
});
|
|
566
|
+
$[126] = t36;
|
|
567
|
+
$[127] = t37;
|
|
568
|
+
$[128] = t38;
|
|
569
|
+
} else {
|
|
570
|
+
t38 = $[128];
|
|
571
|
+
}
|
|
572
|
+
return t38;
|
|
238
573
|
};
|
|
239
574
|
var editableHeading = /*#__PURE__*/React.memo(EditableHeading);
|
|
575
|
+
function _temp() {
|
|
576
|
+
return null;
|
|
577
|
+
}
|
|
578
|
+
function _temp2(el) {
|
|
579
|
+
if (!el || !el.style) {
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
el.style.height = "0";
|
|
583
|
+
const {
|
|
584
|
+
paddingTop,
|
|
585
|
+
paddingBottom
|
|
586
|
+
} = window.getComputedStyle(el);
|
|
587
|
+
el.style.height = `${el.scrollHeight - parseFloat(paddingTop) - parseFloat(paddingBottom)}px`;
|
|
588
|
+
}
|
|
240
589
|
|
|
241
590
|
export { EditableHeading, Levels, Size, editableHeading as default };
|