@ui5/webcomponents 2.24.0 → 2.25.0-rc.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 +18 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Carousel.js +3 -1
- package/dist/Carousel.js.map +1 -1
- package/dist/ColorPalette.d.ts +1 -0
- package/dist/ColorPalette.js +23 -12
- package/dist/ColorPalette.js.map +1 -1
- package/dist/ColorPalettePopover.js +6 -5
- package/dist/ColorPalettePopover.js.map +1 -1
- package/dist/DayPicker.d.ts +1 -0
- package/dist/DayPicker.js +10 -2
- package/dist/DayPicker.js.map +1 -1
- package/dist/Dialog.d.ts +39 -0
- package/dist/Dialog.js +107 -3
- package/dist/Dialog.js.map +1 -1
- package/dist/DialogTemplate.js +4 -2
- package/dist/DialogTemplate.js.map +1 -1
- package/dist/FileUploader.d.ts +5 -2
- package/dist/FileUploader.js +22 -1
- package/dist/FileUploader.js.map +1 -1
- package/dist/FileUploaderTemplate.js +3 -2
- package/dist/FileUploaderTemplate.js.map +1 -1
- package/dist/Popup.d.ts +2 -0
- package/dist/Popup.js +7 -1
- package/dist/Popup.js.map +1 -1
- package/dist/css/themes/Dialog.css +1 -1
- package/dist/css/themes/TableHeaderCell.css +1 -1
- package/dist/custom-elements-internal.json +21 -1
- package/dist/custom-elements.json +20 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +3 -1
- package/dist/generated/i18n/i18n-defaults.js +3 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/Dialog.css.d.ts +1 -1
- package/dist/generated/themes/Dialog.css.js +1 -1
- package/dist/generated/themes/Dialog.css.js.map +1 -1
- package/dist/generated/themes/TableHeaderCell.css.d.ts +1 -1
- package/dist/generated/themes/TableHeaderCell.css.js +1 -1
- package/dist/generated/themes/TableHeaderCell.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +6 -1
- package/dist/web-types.json +12 -2
- package/package-scripts.cjs +1 -0
- package/package.json +11 -9
- package/src/DialogTemplate.tsx +13 -0
- package/src/FileUploaderTemplate.tsx +4 -0
- package/src/i18n/messagebundle.properties +7 -0
- package/src/themes/Dialog.css +22 -1
- package/src/themes/TableHeaderCell.css +1 -0
package/dist/Dialog.js
CHANGED
|
@@ -13,12 +13,15 @@ import { isUp, isDown, isLeft, isRight, isUpShift, isDownShift, isLeftShift, isR
|
|
|
13
13
|
import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js";
|
|
14
14
|
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
|
15
15
|
import toLowercaseEnumValue from "@ui5/webcomponents-base/dist/util/toLowercaseEnumValue.js";
|
|
16
|
+
import { getFirstFocusableElement } from "@ui5/webcomponents-base/dist/util/FocusableElements.js";
|
|
16
17
|
import Popup from "./Popup.js";
|
|
17
18
|
import "@ui5/webcomponents-icons/dist/error.js";
|
|
18
19
|
import "@ui5/webcomponents-icons/dist/alert.js";
|
|
19
20
|
import "@ui5/webcomponents-icons/dist/sys-enter-2.js";
|
|
20
21
|
import "@ui5/webcomponents-icons/dist/information.js";
|
|
21
|
-
import
|
|
22
|
+
import "@ui5/webcomponents-icons/dist/full-screen.js";
|
|
23
|
+
import "@ui5/webcomponents-icons/dist/exit-full-screen.js";
|
|
24
|
+
import { DIALOG_ARIA_DESCRIBEDBY_RESIZABLE, DIALOG_ARIA_DESCRIBEDBY_DRAGGABLE, DIALOG_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE, DIALOG_ARIA_DESCRIBEDBY_REACH_DRAGGABLE_RESIZABLE, DIALOG_ARIA_DESCRIBEDBY_REACH_DRAGGABLE, DIALOG_ARIA_DESCRIBEDBY_REACH_RESIZABLE, DIALOG_RESIZE_HANDLE_TOOLTIP, DIALOG_DRAG_AND_RESIZE_HANDLE_ARIA_LABEL, DIALOG_DRAG_HANDLE_ARIA_LABEL, DIALOG_RESIZE_HANDLE_ARIA_LABEL, DIALOG_HANDLE_ARIA_ROLEDESCRIPTION, DIALOG_HEADER_ARIA_LABEL, DIALOG_CONTENT_ARIA_LABEL, DIALOG_FOOTER_ARIA_LABEL, DIALOG_FULLSCREEN_MAXIMIZE, DIALOG_FULLSCREEN_RESTORE, } from "./generated/i18n/i18n-defaults.js";
|
|
22
25
|
// Template
|
|
23
26
|
import DialogTemplate from "./DialogTemplate.js";
|
|
24
27
|
// Styles
|
|
@@ -29,6 +32,9 @@ import PopupAccessibleRole from "./types/PopupAccessibleRole.js";
|
|
|
29
32
|
* Defines the step size at which this component would change by when being dragged or resized with the keyboard.
|
|
30
33
|
*/
|
|
31
34
|
const STEP_SIZE = 16;
|
|
35
|
+
const FULLSCREEN_BUTTON_ACCESSIBILITY_ATTRIBUTES = {
|
|
36
|
+
ariaKeyShortcuts: "Shift+Ctrl+F",
|
|
37
|
+
};
|
|
32
38
|
/**
|
|
33
39
|
* Defines the icons corresponding to the dialog's state.
|
|
34
40
|
*/
|
|
@@ -82,6 +88,12 @@ const ICON_PER_STATE = {
|
|
|
82
88
|
* - [Shift] + [Up] or [Down] - Decrease/Increase the height of the dialog.
|
|
83
89
|
* - [Shift] + [Left] or [Right] - Decrease/Increase the width of the dialog.
|
|
84
90
|
*
|
|
91
|
+
* #### Fullscreen
|
|
92
|
+
* When the `ui5-dialog` has the `showFullscreenButton` property set to `true`, the user can toggle fullscreen mode
|
|
93
|
+
* with the following keyboard shortcut:
|
|
94
|
+
*
|
|
95
|
+
* - [Shift] + [Ctrl] + [F] - Toggle fullscreen mode.
|
|
96
|
+
*
|
|
85
97
|
* ### ES6 Module Import
|
|
86
98
|
*
|
|
87
99
|
* `import "@ui5/webcomponents/dist/Dialog";`
|
|
@@ -132,6 +144,19 @@ let Dialog = Dialog_1 = class Dialog extends Popup {
|
|
|
132
144
|
* @public
|
|
133
145
|
*/
|
|
134
146
|
this.resizable = false;
|
|
147
|
+
/**
|
|
148
|
+
* Defines whether a fullscreen toggle button is shown in the dialog header.
|
|
149
|
+
* When pressed, it toggles the `stretch` property.
|
|
150
|
+
* The fullscreen button is not available on phone devices.
|
|
151
|
+
*
|
|
152
|
+
* **Note:** The fullscreen button is not available on phone devices,
|
|
153
|
+
* nor when a custom header slot is provided — the application is expected
|
|
154
|
+
* to render its own toggle inside the custom header in those cases.
|
|
155
|
+
* @default false
|
|
156
|
+
* @since 2.25.0
|
|
157
|
+
* @public
|
|
158
|
+
*/
|
|
159
|
+
this.showFullscreenButton = false;
|
|
135
160
|
/**
|
|
136
161
|
* Defines the state of the `Dialog`.
|
|
137
162
|
*
|
|
@@ -142,8 +167,13 @@ let Dialog = Dialog_1 = class Dialog extends Popup {
|
|
|
142
167
|
* @since 1.0.0-rc.15
|
|
143
168
|
*/
|
|
144
169
|
this.state = "None";
|
|
170
|
+
/**
|
|
171
|
+
* @private
|
|
172
|
+
*/
|
|
173
|
+
this._showFullscreenButton = false;
|
|
145
174
|
this._draggedOrResized = false;
|
|
146
175
|
this._dragHandlerRegistered = false;
|
|
176
|
+
this._fullscreenKeydownHandlerRegistered = false;
|
|
147
177
|
this._revertSize = () => {
|
|
148
178
|
Object.assign(this.style, {
|
|
149
179
|
top: "",
|
|
@@ -158,6 +188,7 @@ let Dialog = Dialog_1 = class Dialog extends Popup {
|
|
|
158
188
|
this._resizeMouseMoveHandler = this._onResizeMouseMove.bind(this);
|
|
159
189
|
this._resizeMouseUpHandler = this._onResizeMouseUp.bind(this);
|
|
160
190
|
this._dragStartHandler = this._handleDragStart.bind(this);
|
|
191
|
+
this._fullscreenKeydownHandler = this._onFullscreenKeydown.bind(this);
|
|
161
192
|
}
|
|
162
193
|
static _isHeader(element) {
|
|
163
194
|
return element.classList.contains("ui5-popup-header-root") || element.getAttribute("slot") === "header";
|
|
@@ -221,7 +252,7 @@ let Dialog = Dialog_1 = class Dialog extends Popup {
|
|
|
221
252
|
* Determines if the header should be shown.
|
|
222
253
|
*/
|
|
223
254
|
get _displayHeader() {
|
|
224
|
-
return this.header.length || this.headerText || this.draggable || this.resizable;
|
|
255
|
+
return this.header.length || this.headerText || this.draggable || this.resizable || this._showFullscreenButton;
|
|
225
256
|
}
|
|
226
257
|
get _movable() {
|
|
227
258
|
return !this.stretch && this.onDesktop && (this.draggable || this.resizable);
|
|
@@ -251,7 +282,18 @@ let Dialog = Dialog_1 = class Dialog extends Popup {
|
|
|
251
282
|
return this._movable ? `${this._id}-descr` : undefined;
|
|
252
283
|
}
|
|
253
284
|
get _showResizeHandle() {
|
|
254
|
-
return this.resizable && this.onDesktop;
|
|
285
|
+
return this.resizable && this.onDesktop && !this.stretch;
|
|
286
|
+
}
|
|
287
|
+
get _fullscreenButtonIcon() {
|
|
288
|
+
return this.stretch ? "exit-full-screen" : "full-screen";
|
|
289
|
+
}
|
|
290
|
+
get _fullscreenButtonTooltip() {
|
|
291
|
+
return this.stretch
|
|
292
|
+
? Dialog_1.i18nBundle.getText(DIALOG_FULLSCREEN_RESTORE)
|
|
293
|
+
: Dialog_1.i18nBundle.getText(DIALOG_FULLSCREEN_MAXIMIZE);
|
|
294
|
+
}
|
|
295
|
+
get _fullscreenButtonAccessibilityAttributes() {
|
|
296
|
+
return FULLSCREEN_BUTTON_ACCESSIBILITY_ATTRIBUTES;
|
|
255
297
|
}
|
|
256
298
|
get _resizeHandleTooltip() {
|
|
257
299
|
return this._showResizeHandle ? Dialog_1.i18nBundle.getText(DIALOG_RESIZE_HANDLE_TOOLTIP) : undefined;
|
|
@@ -301,6 +343,7 @@ let Dialog = Dialog_1 = class Dialog extends Popup {
|
|
|
301
343
|
}
|
|
302
344
|
onBeforeRendering() {
|
|
303
345
|
super.onBeforeRendering();
|
|
346
|
+
this._showFullscreenButton = this.showFullscreenButton && !this.onPhone && !this.header.length;
|
|
304
347
|
this._isRTL = this.effectiveDir === "rtl";
|
|
305
348
|
}
|
|
306
349
|
/**
|
|
@@ -318,10 +361,12 @@ let Dialog = Dialog_1 = class Dialog extends Popup {
|
|
|
318
361
|
_attachBrowserEvents() {
|
|
319
362
|
this._attachScreenResizeHandler();
|
|
320
363
|
this._registerDragHandler();
|
|
364
|
+
this._registerFullscreenKeydownHandler();
|
|
321
365
|
}
|
|
322
366
|
_detachBrowserEvents() {
|
|
323
367
|
this._detachScreenResizeHandler();
|
|
324
368
|
this._deregisterDragHandler();
|
|
369
|
+
this._deregisterFullscreenKeydownHandler();
|
|
325
370
|
}
|
|
326
371
|
_attachScreenResizeHandler() {
|
|
327
372
|
if (!this._screenResizeHandlerAttached) {
|
|
@@ -347,6 +392,18 @@ let Dialog = Dialog_1 = class Dialog extends Popup {
|
|
|
347
392
|
this._dragHandlerRegistered = false;
|
|
348
393
|
}
|
|
349
394
|
}
|
|
395
|
+
_registerFullscreenKeydownHandler() {
|
|
396
|
+
if (this.showFullscreenButton && !this._fullscreenKeydownHandlerRegistered) {
|
|
397
|
+
document.addEventListener("keydown", this._fullscreenKeydownHandler);
|
|
398
|
+
this._fullscreenKeydownHandlerRegistered = true;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
_deregisterFullscreenKeydownHandler() {
|
|
402
|
+
if (this._fullscreenKeydownHandlerRegistered) {
|
|
403
|
+
document.removeEventListener("keydown", this._fullscreenKeydownHandler);
|
|
404
|
+
this._fullscreenKeydownHandlerRegistered = false;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
350
407
|
_center() {
|
|
351
408
|
const height = window.innerHeight - this.offsetHeight, width = window.innerWidth - this.offsetWidth;
|
|
352
409
|
Object.assign(this.style, {
|
|
@@ -357,6 +414,40 @@ let Dialog = Dialog_1 = class Dialog extends Popup {
|
|
|
357
414
|
/**
|
|
358
415
|
* Event handlers
|
|
359
416
|
*/
|
|
417
|
+
_toggleFullscreen() {
|
|
418
|
+
if (this.onPhone) {
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
const wasStretched = this.stretch;
|
|
422
|
+
this.stretch = !this.stretch;
|
|
423
|
+
this._revertSize();
|
|
424
|
+
this._draggedOrResized = false;
|
|
425
|
+
if (wasStretched) {
|
|
426
|
+
requestAnimationFrame(() => {
|
|
427
|
+
if (this.open) {
|
|
428
|
+
this._center();
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
_onHeaderDblClick(e) {
|
|
434
|
+
const target = e.target;
|
|
435
|
+
const headerRoot = this._root.querySelector(".ui5-popup-header-root");
|
|
436
|
+
if (target !== headerRoot && !target.classList.contains("ui5-popup-header-text")) {
|
|
437
|
+
return;
|
|
438
|
+
}
|
|
439
|
+
this._toggleFullscreen();
|
|
440
|
+
}
|
|
441
|
+
_onFullscreenKeydown(e) {
|
|
442
|
+
if (this.isTopModalPopup && this._showFullscreenButton && this._isFullscreenShortcut(e)) {
|
|
443
|
+
e.preventDefault();
|
|
444
|
+
e.stopImmediatePropagation();
|
|
445
|
+
this._toggleFullscreen();
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
_isFullscreenShortcut(e) {
|
|
449
|
+
return (e.key === "f" || e.key === "F") && e.ctrlKey && e.shiftKey && !e.altKey;
|
|
450
|
+
}
|
|
360
451
|
_onDragMouseDown(e) {
|
|
361
452
|
// allow dragging only on the header
|
|
362
453
|
if (!this._movable || !this.draggable || !Dialog_1._isHeader(e.target)) {
|
|
@@ -540,6 +631,13 @@ let Dialog = Dialog_1 = class Dialog extends Popup {
|
|
|
540
631
|
window.removeEventListener("mousemove", this._resizeMouseMoveHandler);
|
|
541
632
|
window.removeEventListener("mouseup", this._resizeMouseUpHandler);
|
|
542
633
|
}
|
|
634
|
+
async _getFirstFocusableElement() {
|
|
635
|
+
if (this._showFullscreenButton) {
|
|
636
|
+
const firstFocusable = await getFirstFocusableElement(this.contentDOM) || (this.footerDOM ? await getFirstFocusableElement(this.footerDOM) : null);
|
|
637
|
+
return firstFocusable || getFirstFocusableElement(this);
|
|
638
|
+
}
|
|
639
|
+
return getFirstFocusableElement(this);
|
|
640
|
+
}
|
|
543
641
|
/**
|
|
544
642
|
* Overrides Popup's forwardToLast to prioritize the drag/resize handler
|
|
545
643
|
* when Shift+Tab is pressed from the first focusable element.
|
|
@@ -568,9 +666,15 @@ __decorate([
|
|
|
568
666
|
__decorate([
|
|
569
667
|
property({ type: Boolean })
|
|
570
668
|
], Dialog.prototype, "resizable", void 0);
|
|
669
|
+
__decorate([
|
|
670
|
+
property({ type: Boolean })
|
|
671
|
+
], Dialog.prototype, "showFullscreenButton", void 0);
|
|
571
672
|
__decorate([
|
|
572
673
|
property()
|
|
573
674
|
], Dialog.prototype, "state", void 0);
|
|
675
|
+
__decorate([
|
|
676
|
+
property({ type: Boolean })
|
|
677
|
+
], Dialog.prototype, "_showFullscreenButton", void 0);
|
|
574
678
|
__decorate([
|
|
575
679
|
slot()
|
|
576
680
|
], Dialog.prototype, "header", void 0);
|
package/dist/Dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../src/Dialog.ts"],"names":[],"mappings":";;;;;;;AACA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,4CAA4C,CAAC;AAC/D,OAAO,EACN,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAC7B,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,GACjD,MAAM,sCAAsC,CAAC;AAC9C,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,oBAAoB,MAAM,2DAA2D,CAAC;AAC7F,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,wCAAwC,CAAC;AAChD,OAAO,wCAAwC,CAAC;AAChD,OAAO,8CAA8C,CAAC;AACtD,OAAO,8CAA8C,CAAC;AAEtD,OAAO,EACN,iCAAiC,EACjC,iCAAiC,EACjC,2CAA2C,EAC3C,iDAAiD,EACjD,u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AC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACnE,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa;QAClB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,MAAM,iBAAiB,GAAG,IAAI,CAAC,UAAW,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,GAAG,oBAAoB,CAAgB,CAAC;YAC1G,IAAI,iBAAiB,EAAE,CAAC;gBACvB,iBAAiB,CAAC,KAAK,EAAE,CAAC;gBAC1B,OAAO;YACR,CAAC;QACF,CAAC;QAED,MAAM,KAAK,CAAC,aAAa,EAAE,CAAC;IAC7B,CAAC;CACD,CAAA;AAvpBA;IADC,QAAQ,EAAE;0CACS;AAWpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uCACZ;AAgBhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACV;AAelB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACV;AAYlB;IADC,QAAQ,EAAE;qCACqB;AA+BhC;IADC,IAAI,EAAE;sCACoB;AAQ3B;IADC,IAAI,EAAE;sCACoB;AAGpB;IADN,IAAI,CAAC,oBAAoB,CAAC;gCACG;AA3GzB,MAAM;IATX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,QAAQ,EAAE,cAAc;QACxB,MAAM,EAAE;YACP,KAAK,CAAC,MAAM;YACZ,eAAe;YACf,SAAS;SACT;KACD,CAAC;GACI,MAAM,CAkqBX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import type { Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport clamp from \"@ui5/webcomponents-base/dist/util/clamp.js\";\nimport {\n\tisUp, isDown, isLeft, isRight,\n\tisUpShift, isDownShift, isLeftShift, isRightShift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport toLowercaseEnumValue from \"@ui5/webcomponents-base/dist/util/toLowercaseEnumValue.js\";\nimport Popup from \"./Popup.js\";\nimport \"@ui5/webcomponents-icons/dist/error.js\";\nimport \"@ui5/webcomponents-icons/dist/alert.js\";\nimport \"@ui5/webcomponents-icons/dist/sys-enter-2.js\";\nimport \"@ui5/webcomponents-icons/dist/information.js\";\n\nimport {\n\tDIALOG_ARIA_DESCRIBEDBY_RESIZABLE,\n\tDIALOG_ARIA_DESCRIBEDBY_DRAGGABLE,\n\tDIALOG_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE,\n\tDIALOG_ARIA_DESCRIBEDBY_REACH_DRAGGABLE_RESIZABLE,\n\tDIALOG_ARIA_DESCRIBEDBY_REACH_DRAGGABLE,\n\tDIALOG_ARIA_DESCRIBEDBY_REACH_RESIZABLE,\n\tDIALOG_RESIZE_HANDLE_TOOLTIP,\n\tDIALOG_DRAG_AND_RESIZE_HANDLE_ARIA_LABEL,\n\tDIALOG_DRAG_HANDLE_ARIA_LABEL,\n\tDIALOG_RESIZE_HANDLE_ARIA_LABEL,\n\tDIALOG_HANDLE_ARIA_ROLEDESCRIPTION,\n\tDIALOG_HEADER_ARIA_LABEL,\n\tDIALOG_CONTENT_ARIA_LABEL,\n\tDIALOG_FOOTER_ARIA_LABEL,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Template\nimport DialogTemplate from \"./DialogTemplate.js\";\n// Styles\nimport PopupsCommonCss from \"./generated/themes/PopupsCommon.css.js\";\nimport dialogCSS from \"./generated/themes/Dialog.css.js\";\nimport PopupAccessibleRole from \"./types/PopupAccessibleRole.js\";\n\n/**\n * Defines the step size at which this component would change by when being dragged or resized with the keyboard.\n */\nconst STEP_SIZE = 16;\n\ntype ValueStateWithIcon = ValueState.Negative | ValueState.Critical | ValueState.Positive | ValueState.Information;\n/**\n * Defines the icons corresponding to the dialog's state.\n */\nconst ICON_PER_STATE: Record<ValueStateWithIcon, string> = {\n\t[ValueState.Negative]: \"error\",\n\t[ValueState.Critical]: \"alert\",\n\t[ValueState.Positive]: \"sys-enter-2\",\n\t[ValueState.Information]: \"information\",\n};\n\n/**\n * @class\n * ### Overview\n * The `ui5-dialog` component is used to temporarily display some information in a\n * size-limited window in front of the regular app screen.\n * It is used to prompt the user for an action or a confirmation.\n * The `ui5-dialog` interrupts the current app processing as it is the only focused UI element and\n * the main screen is dimmed/blocked.\n * The dialog combines concepts known from other technologies where the windows have\n * names such as dialog box, dialog window, pop-up, pop-up window, alert box, or message box.\n *\n * The `ui5-dialog` is modal, which means that a user action is required before it is possible to return to the parent window.\n * To open multiple dialogs, each dialog element should be separate in the markup. This will ensure the correct modal behavior. Avoid nesting dialogs within each other.\n * The content of the `ui5-dialog` is fully customizable.\n *\n * ### Structure\n * A `ui5-dialog` consists of a header, content, and a footer for action buttons.\n * The `ui5-dialog` is usually displayed at the center of the screen.\n * Its position can be changed by the user. To enable this, you need to set the property `draggable` accordingly.\n\n *\n * ### Responsive Behavior\n * The `stretch` property can be used to stretch the `ui5-dialog` to full screen. For better usability, it's recommended to stretch the dialog to full screen on phone devices.\n *\n * **Note:** When a `ui5-bar` is used in the header or in the footer, you should remove the default dialog's paddings.\n *\n * For more information see the sample \"Bar in Header/Footer\".\n\n * ### Keyboard Handling\n *\n * #### Basic Navigation\n * When the `ui5-dialog` has the `draggable` property set to `true`, the user can move the dialog\n * with the following keyboard shortcuts:\n *\n * - [Up] or [Down] arrow keys - Move the dialog up/down.\n * - [Left] or [Right] arrow keys - Move the dialog left/right.\n *\n * #### Resizing\n * When the `ui5-dialog` has the `resizable` property set to `true`, the user can change the size of the dialog\n * with the following keyboard shortcuts:\n *\n * - [Shift] + [Up] or [Down] - Decrease/Increase the height of the dialog.\n * - [Shift] + [Left] or [Right] - Decrease/Increase the width of the dialog.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Dialog\";`\n *\n * @constructor\n * @extends Popup\n * @public\n * @csspart header - Used to style the header of the component\n * @csspart content - Used to style the content of the component\n * @csspart footer - Used to style the footer of the component\n */\n@customElement({\n\ttag: \"ui5-dialog\",\n\ttemplate: DialogTemplate,\n\tstyles: [\n\t\tPopup.styles,\n\t\tPopupsCommonCss,\n\t\tdialogCSS,\n\t],\n})\nclass Dialog extends Popup {\n\teventDetails!: Popup[\"eventDetails\"];\n\n\t/**\n\t * Defines the header text.\n\t *\n\t * **Note:** If `header` slot is provided, the `headerText` is ignored.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Determines if the dialog will be stretched to full screen on mobile. On desktop,\n\t * the dialog will be stretched to approximately 90% of the viewport.\n\t *\n\t * **Note:** For better usability of the component it is recommended to set this property to \"true\" when the dialog is opened on phone.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tstretch = false;\n\n\t/**\n\t * Determines whether the component is draggable.\n\t * If this property is set to true, the Dialog will be draggable by its header.\n\t *\n\t * **Note:** The component can be draggable only in desktop mode.\n\t *\n\t * **Note:** This property overrides the default HTML \"draggable\" attribute native behavior.\n\t * When \"draggable\" is set to true, the native browser \"draggable\"\n\t * behavior is prevented and only the Dialog custom logic (\"draggable by its header\") works.\n\t * @default false\n\t * @since 1.0.0-rc.9\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdraggable = false;\n\n\t/**\n\t * Configures the component to be resizable.\n\t * If this property is set to true, the Dialog will have a resize handle in its bottom right corner in LTR languages.\n\t * In RTL languages, the resize handle will be placed in the bottom left corner.\n\t *\n\t * **Note:** The component can be resizable only in desktop mode.\n\t *\n\t * **Note:** Upon resizing, externally defined height and width styling will be ignored.\n\t * @default false\n\t * @since 1.0.0-rc.10\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tresizable = false;\n\n\t/**\n\t * Defines the state of the `Dialog`.\n\t *\n\t * **Note:** If `\"Negative\"` and `\"Critical\"` states is set, it will change the\n\t * accessibility role to \"alertdialog\", if the accessibleRole property is set to `\"Dialog\"`.\n\t * @default \"None\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\tstate: `${ValueState}` = \"None\";\n\n\t_screenResizeHandler: () => void;\n\t_dragMouseMoveHandler: (e: MouseEvent) => void;\n\t_dragMouseUpHandler: (e: MouseEvent) => void;\n\t_resizeMouseMoveHandler: (e: MouseEvent) => void;\n\t_resizeMouseUpHandler: (e: MouseEvent) => void;\n\t_dragStartHandler: (e: DragEvent) => void;\n\t_y?: number;\n\t_x?: number;\n\t_isRTL?: boolean;\n\t_screenResizeHandlerAttached?: boolean;\n\t_initialX?: number;\n\t_initialY?: number;\n\t_initialWidth?: number;\n\t_initialHeight?: number;\n\t_initialTop?: number;\n\t_initialLeft?: number;\n\t_minWidth?: number;\n\t_cachedMinHeight?: number;\n\t_draggedOrResized = false;\n\t_dragHandlerRegistered = false;\n\n\t/**\n\t * Defines the header HTML Element.\n\t *\n\t * **Note:** If `header` slot is provided, the labelling of the dialog is a responsibility of the application developer.\n\t * `accessibleName` should be used.\n\t * @public\n\t */\n\t@slot()\n\theader!: Slot<HTMLElement>;\n\n\t/**\n\t * Defines the footer HTML Element.\n\t *\n\t * @public\n\t */\n\t@slot()\n\tfooter!: Slot<HTMLElement>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._screenResizeHandler = this._screenResize.bind(this);\n\n\t\tthis._dragMouseMoveHandler = this._onDragMouseMove.bind(this);\n\t\tthis._dragMouseUpHandler = this._onDragMouseUp.bind(this);\n\n\t\tthis._resizeMouseMoveHandler = this._onResizeMouseMove.bind(this);\n\t\tthis._resizeMouseUpHandler = this._onResizeMouseUp.bind(this);\n\n\t\tthis._dragStartHandler = this._handleDragStart.bind(this);\n\t}\n\n\tstatic _isHeader(element: HTMLElement) {\n\t\treturn element.classList.contains(\"ui5-popup-header-root\") || element.getAttribute(\"slot\") === \"header\";\n\t}\n\n\tget isModal() {\n\t\treturn true;\n\t}\n\n\tget _ariaLabelledBy() {\n\t\tlet ariaLabelledById;\n\n\t\tif (this.headerText && !this._ariaLabel) {\n\t\t\tariaLabelledById = \"ui5-popup-header-text\";\n\t\t}\n\n\t\treturn ariaLabelledById;\n\t}\n\n\tget effectiveAriaDescribedBy() {\n\t\treturn this._movable ? `${this._id}-dialog-descr` : undefined;\n\t}\n\n\tget ariaDescribedByIds() {\n\t\treturn [\n\t\t\tthis.ariaDescriptionTextId,\n\t\t\tthis.effectiveAriaDescribedBy,\n\t\t].filter(Boolean).join(\" \");\n\t}\n\n\tget dialogAriaDescribedByText() {\n\t\tif (!this._movable) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tif (this.resizable && this.draggable) {\n\t\t\treturn Dialog.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_REACH_DRAGGABLE_RESIZABLE);\n\t\t}\n\t\tif (this.draggable) {\n\t\t\treturn Dialog.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_REACH_DRAGGABLE);\n\t\t}\n\t\tif (this.resizable) {\n\t\t\treturn Dialog.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_REACH_RESIZABLE);\n\t\t}\n\n\t\treturn \"\";\n\t}\n\n\tget ariaDescribedByTextResizable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_RESIZABLE);\n\t}\n\n\tget ariaDescribedByTextDraggable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_DRAGGABLE);\n\t}\n\n\tget ariaDescribedByTextDraggableAndResizable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE);\n\t}\n\n\tget ariaDescribedByHandlerText() {\n\t\tif (this.resizable && this.draggable) {\n\t\t\treturn this.ariaDescribedByTextDraggableAndResizable;\n\t\t}\n\t\tif (this.resizable) {\n\t\t\treturn this.ariaDescribedByTextResizable;\n\t\t}\n\t\tif (this.draggable) {\n\t\t\treturn this.ariaDescribedByTextDraggable;\n\t\t}\n\t\treturn \"\";\n\t}\n\n\t/**\n\t * Determines if the header should be shown.\n\t */\n\tget _displayHeader() {\n\t\treturn this.header.length || this.headerText || this.draggable || this.resizable;\n\t}\n\n\tget _movable() {\n\t\treturn !this.stretch && this.onDesktop && (this.draggable || this.resizable);\n\t}\n\n\tget _dragResizeHandleTabIndex() {\n\t\treturn this._movable ? 0 : undefined;\n\t}\n\n\tget _dragResizeHandleAriaLabel() {\n\t\tif (!this._movable) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tif (this.resizable && this.draggable) {\n\t\t\treturn Dialog.i18nBundle.getText(DIALOG_DRAG_AND_RESIZE_HANDLE_ARIA_LABEL);\n\t\t}\n\t\tif (this.draggable) {\n\t\t\treturn Dialog.i18nBundle.getText(DIALOG_DRAG_HANDLE_ARIA_LABEL);\n\t\t}\n\t\tif (this.resizable) {\n\t\t\treturn Dialog.i18nBundle.getText(DIALOG_RESIZE_HANDLE_ARIA_LABEL);\n\t\t}\n\n\t\treturn \"\";\n\t}\n\n\tget _dragResizeHandleAriaRoleDescription() {\n\t\treturn this._movable ? Dialog.i18nBundle.getText(DIALOG_HANDLE_ARIA_ROLEDESCRIPTION) : undefined;\n\t}\n\n\tget _dragResizeHandleAriaDescribedBy() {\n\t\treturn this._movable ? `${this._id}-descr` : undefined;\n\t}\n\n\tget _showResizeHandle() {\n\t\treturn this.resizable && this.onDesktop;\n\t}\n\n\tget _resizeHandleTooltip() {\n\t\treturn this._showResizeHandle ? Dialog.i18nBundle.getText(DIALOG_RESIZE_HANDLE_TOOLTIP) : undefined;\n\t}\n\n\tget _minHeight() {\n\t\tlet minHeight = Number.parseInt(window.getComputedStyle(this.contentDOM).minHeight);\n\n\t\tconst header = this._root.querySelector<HTMLElement>(\".ui5-popup-header-root\");\n\t\tif (header) {\n\t\t\tminHeight += header.offsetHeight;\n\t\t}\n\n\t\tconst footer = this._root.querySelector<HTMLElement>(\".ui5-popup-footer-root\");\n\t\tif (footer) {\n\t\t\tminHeight += footer.offsetHeight;\n\t\t}\n\n\t\treturn minHeight;\n\t}\n\n\tget hasValueState() {\n\t\treturn this.state !== ValueState.None;\n\t}\n\n\tget _dialogStateIcon() {\n\t\treturn ICON_PER_STATE[this.state as ValueStateWithIcon];\n\t}\n\n\tget _role() {\n\t\tif (this.accessibleRole === PopupAccessibleRole.None) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (this.state === ValueState.Negative || this.state === ValueState.Critical) {\n\t\t\treturn toLowercaseEnumValue(PopupAccessibleRole.AlertDialog);\n\t\t}\n\n\t\treturn toLowercaseEnumValue(this.accessibleRole);\n\t}\n\n\tget _contentRole(): \"region\" {\n\t\treturn \"region\";\n\t}\n\n\tget _headerAriaLabel() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_LABEL);\n\t}\n\n\tget _contentAriaLabel() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_CONTENT_ARIA_LABEL);\n\t}\n\n\tget _footerAriaLabel() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_FOOTER_ARIA_LABEL);\n\t}\n\n\t_show() {\n\t\tsuper._show();\n\t\tthis._center();\n\t}\n\n\tonBeforeRendering() {\n\t\tsuper.onBeforeRendering();\n\n\t\tthis._isRTL = this.effectiveDir === \"rtl\";\n\t}\n\n\t/**\n\t * @override\n\t */\n\t_resize() {\n\t\tsuper._resize();\n\n\t\tif (!this._draggedOrResized) {\n\t\t\tthis._center();\n\t\t}\n\t}\n\n\t_screenResize() {\n\t\tthis._center();\n\t}\n\n\t_attachBrowserEvents() {\n\t\tthis._attachScreenResizeHandler();\n\t\tthis._registerDragHandler();\n\t}\n\n\t_detachBrowserEvents() {\n\t\tthis._detachScreenResizeHandler();\n\t\tthis._deregisterDragHandler();\n\t}\n\n\t_attachScreenResizeHandler() {\n\t\tif (!this._screenResizeHandlerAttached) {\n\t\t\twindow.addEventListener(\"resize\", this._screenResizeHandler);\n\t\t\tthis._screenResizeHandlerAttached = true;\n\t\t}\n\t}\n\n\t_detachScreenResizeHandler() {\n\t\tif (this._screenResizeHandlerAttached) {\n\t\t\twindow.removeEventListener(\"resize\", this._screenResizeHandler);\n\t\t\tthis._screenResizeHandlerAttached = false; // prevent dialog from repositioning during resizing\n\t\t}\n\t}\n\n\t_registerDragHandler() {\n\t\tif (!this._dragHandlerRegistered) {\n\t\t\tthis.addEventListener(\"dragstart\", this._dragStartHandler);\n\t\t\tthis._dragHandlerRegistered = true;\n\t\t}\n\t}\n\n\t_deregisterDragHandler() {\n\t\tif (this._dragHandlerRegistered) {\n\t\t\tthis.removeEventListener(\"dragstart\", this._dragStartHandler);\n\t\t\tthis._dragHandlerRegistered = false;\n\t\t}\n\t}\n\n\t_center() {\n\t\tconst height = window.innerHeight - this.offsetHeight,\n\t\t\twidth = window.innerWidth - this.offsetWidth;\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${Math.round(height / 2)}px`,\n\t\t\tleft: `${Math.round(width / 2)}px`,\n\t\t});\n\t}\n\n\t_revertSize = () => {\n\t\tObject.assign(this.style, {\n\t\t\ttop: \"\",\n\t\t\tleft: \"\",\n\t\t\twidth: \"\",\n\t\t\theight: \"\",\n\t\t});\n\t}\n\n\t/**\n\t * Event handlers\n\t */\n\t_onDragMouseDown(e: MouseEvent) {\n\t\t// allow dragging only on the header\n\t\tif (!this._movable || !this.draggable || !Dialog._isHeader(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t} = this.getBoundingClientRect();\n\t\tconst {\n\t\t\twidth,\n\t\t\theight,\n\t\t} = window.getComputedStyle(this);\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${top}px`,\n\t\t\tleft: `${left}px`,\n\t\t\twidth: `${Math.round(Number.parseFloat(width) * 100) / 100}px`,\n\t\t\theight: `${Math.round(Number.parseFloat(height) * 100) / 100}px`,\n\t\t});\n\n\t\tthis._x = e.clientX;\n\t\tthis._y = e.clientY;\n\n\t\tthis._draggedOrResized = true;\n\t\tthis._attachMouseDragHandlers();\n\t}\n\n\t_onDragMouseMove(e: MouseEvent) {\n\t\te.preventDefault();\n\n\t\tconst { clientX, clientY } = e;\n\t\tconst calcX = this._x! - clientX;\n\t\tconst calcY = this._y! - clientY;\n\t\tconst {\n\t\t\tleft,\n\t\t\ttop,\n\t\t} = this.getBoundingClientRect();\n\n\t\tObject.assign(this.style, {\n\t\t\tleft: `${Math.floor(left - calcX)}px`,\n\t\t\ttop: `${Math.floor(top - calcY)}px`,\n\t\t});\n\n\t\tthis._x = clientX;\n\t\tthis._y = clientY;\n\t}\n\n\t_onDragMouseUp() {\n\t\tdelete this._x;\n\t\tdelete this._y;\n\n\t\tthis._detachMouseDragHandlers();\n\t}\n\n\t_onDragOrResizeKeyDown(e: KeyboardEvent) {\n\t\tif (!this._movable) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst target = e.target as HTMLElement;\n\t\tif (!target || target.id !== `${this._id}-dragResizeHandler`) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.draggable && [isUp, isDown, isLeft, isRight].some(key => key(e))) {\n\t\t\tthis._dragWithEvent(e);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.resizable && [isUpShift, isDownShift, isLeftShift, isRightShift].some(key => key(e))) {\n\t\t\tthis._resizeWithEvent(e);\n\t\t}\n\t}\n\n\t_dragWithEvent(e: KeyboardEvent) {\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t\twidth,\n\t\t\theight,\n\t\t} = this.getBoundingClientRect();\n\n\t\tlet newPos = 0;\n\t\tlet posDirection: \"top\" | \"left\" = \"top\";\n\n\t\tswitch (true) {\n\t\tcase isUp(e):\n\t\t\tnewPos = top - STEP_SIZE;\n\t\t\tposDirection = \"top\";\n\t\t\tbreak;\n\t\tcase isDown(e):\n\t\t\tnewPos = top + STEP_SIZE;\n\t\t\tposDirection = \"top\";\n\t\t\tbreak;\n\t\tcase isLeft(e):\n\t\t\tnewPos = left - STEP_SIZE;\n\t\t\tposDirection = \"left\";\n\t\t\tbreak;\n\t\tcase isRight(e):\n\t\t\tnewPos = left + STEP_SIZE;\n\t\t\tposDirection = \"left\";\n\t\t\tbreak;\n\t\t}\n\n\t\tnewPos = clamp(\n\t\t\tnewPos,\n\t\t\t0,\n\t\t\tposDirection === \"left\" ? window.innerWidth - width : window.innerHeight - height,\n\t\t);\n\n\t\tthis.style[posDirection] = `${newPos}px`;\n\t}\n\n\t_resizeWithEvent(e: KeyboardEvent) {\n\t\tthis._draggedOrResized = true;\n\t\tthis.addEventListener(\"ui5-before-close\", this._revertSize, { once: true });\n\n\t\tconst { top, left } = this.getBoundingClientRect(),\n\t\t\tstyle = window.getComputedStyle(this),\n\t\t\tminWidth = Number.parseFloat(style.minWidth),\n\t\t\tmaxWidth = window.innerWidth - left,\n\t\t\tmaxHeight = window.innerHeight - top;\n\n\t\tlet width = Number.parseFloat(style.width),\n\t\t\theight = Number.parseFloat(style.height);\n\n\t\tswitch (true) {\n\t\tcase isUpShift(e):\n\t\t\theight -= STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isDownShift(e):\n\t\t\theight += STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isLeftShift(e):\n\t\t\twidth -= STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isRightShift(e):\n\t\t\twidth += STEP_SIZE;\n\t\t\tbreak;\n\t\t}\n\n\t\twidth = clamp(width, minWidth, maxWidth);\n\t\theight = clamp(height, this._minHeight, maxHeight);\n\n\t\tObject.assign(this.style, {\n\t\t\twidth: `${width}px`,\n\t\t\theight: `${height}px`,\n\t\t});\n\t}\n\n\t_attachMouseDragHandlers() {\n\t\twindow.addEventListener(\"mousemove\", this._dragMouseMoveHandler);\n\t\twindow.addEventListener(\"mouseup\", this._dragMouseUpHandler);\n\t}\n\n\t_detachMouseDragHandlers() {\n\t\twindow.removeEventListener(\"mousemove\", this._dragMouseMoveHandler);\n\t\twindow.removeEventListener(\"mouseup\", this._dragMouseUpHandler);\n\t}\n\n\t_onResizeMouseDown(e: MouseEvent) {\n\t\tif (!this._movable || !this.resizable) {\n\t\t\treturn;\n\t\t}\n\n\t\te.preventDefault();\n\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t} = this.getBoundingClientRect();\n\t\tconst {\n\t\t\twidth,\n\t\t\theight,\n\t\t\tminWidth,\n\t\t} = window.getComputedStyle(this);\n\n\t\tthis._initialX = e.clientX;\n\t\tthis._initialY = e.clientY;\n\t\tthis._initialWidth = Number.parseFloat(width);\n\t\tthis._initialHeight = Number.parseFloat(height);\n\t\tthis._initialTop = top;\n\t\tthis._initialLeft = left;\n\t\tthis._minWidth = Number.parseFloat(minWidth);\n\t\tthis._cachedMinHeight = this._minHeight;\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${top}px`,\n\t\t\tleft: `${left}px`,\n\t\t});\n\n\t\tthis._draggedOrResized = true;\n\t\tthis._attachMouseResizeHandlers();\n\t}\n\n\t_onResizeMouseMove(e: MouseEvent) {\n\t\tconst { clientX, clientY } = e;\n\n\t\tlet newWidth,\n\t\t\tnewLeft;\n\n\t\tif (this._isRTL) {\n\t\t\tnewWidth = clamp(\n\t\t\t\tthis._initialWidth! - (clientX - this._initialX!),\n\t\t\t\tthis._minWidth!,\n\t\t\t\tthis._initialLeft! + this._initialWidth!,\n\t\t\t);\n\n\t\t\t// check if width is changed to avoid \"left\" jumping when max width is reached\n\t\t\tObject.assign(this.style, {\n\t\t\t\twidth: `${newWidth}px`,\n\t\t\t});\n\n\t\t\tconst deltaWidth = newWidth - this.getBoundingClientRect().width;\n\t\t\tconst rightEdge = this._initialLeft! + this._initialWidth! + deltaWidth;\n\n\t\t\tnewLeft = clamp(\n\t\t\t\trightEdge - newWidth,\n\t\t\t\t0,\n\t\t\t\trightEdge - this._minWidth!,\n\t\t\t);\n\t\t} else {\n\t\t\tnewWidth = clamp(\n\t\t\t\tthis._initialWidth! + (clientX - this._initialX!),\n\t\t\t\tthis._minWidth!,\n\t\t\t\twindow.innerWidth - this._initialLeft!,\n\t\t\t);\n\t\t}\n\n\t\tconst newHeight = clamp(\n\t\t\tthis._initialHeight! + (clientY - this._initialY!),\n\t\t\tthis._cachedMinHeight!,\n\t\t\twindow.innerHeight - this._initialTop!,\n\t\t);\n\n\t\tObject.assign(this.style, {\n\t\t\theight: `${newHeight}px`,\n\t\t\twidth: `${newWidth}px`,\n\t\t\tleft: this._isRTL ? `${newLeft}px` : undefined,\n\t\t});\n\t}\n\n\t_onResizeMouseUp() {\n\t\tdelete this._initialX;\n\t\tdelete this._initialY;\n\t\tdelete this._initialWidth;\n\t\tdelete this._initialHeight;\n\t\tdelete this._initialTop;\n\t\tdelete this._initialLeft;\n\t\tdelete this._minWidth;\n\t\tdelete this._cachedMinHeight;\n\n\t\tthis._detachMouseResizeHandlers();\n\t}\n\n\t_handleDragStart(e: DragEvent) {\n\t\t// Only prevent native drag behavior when dragging from the header\n\t\t// to allow native drag-and-drop functionality in the dialog content.\n\t\tif (this.draggable && e.target instanceof HTMLElement && Dialog._isHeader(e.target)) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_attachMouseResizeHandlers() {\n\t\twindow.addEventListener(\"mousemove\", this._resizeMouseMoveHandler);\n\t\twindow.addEventListener(\"mouseup\", this._resizeMouseUpHandler);\n\t\tthis.addEventListener(\"ui5-before-close\", this._revertSize, { once: true });\n\t}\n\n\t_detachMouseResizeHandlers() {\n\t\twindow.removeEventListener(\"mousemove\", this._resizeMouseMoveHandler);\n\t\twindow.removeEventListener(\"mouseup\", this._resizeMouseUpHandler);\n\t}\n\n\t/**\n\t * Overrides Popup's forwardToLast to prioritize the drag/resize handler\n\t * when Shift+Tab is pressed from the first focusable element.\n\t * @private\n\t */\n\tasync forwardToLast() {\n\t\tif (this._movable) {\n\t\t\tconst dragResizeHandler = this.shadowRoot!.querySelector(`#${this._id}-dragResizeHandler`) as HTMLElement;\n\t\t\tif (dragResizeHandler) {\n\t\t\t\tdragResizeHandler.focus();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tawait super.forwardToLast();\n\t}\n}\n\nDialog.define();\n\nexport default Dialog;\n"]}
|
|
1
|
+
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../src/Dialog.ts"],"names":[],"mappings":";;;;;;;AACA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,4CAA4C,CAAC;AAC/D,OAAO,EACN,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAC7B,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,GACjD,MAAM,sCAAsC,CAAC;AAC9C,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,oBAAoB,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAClG,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,wCAAwC,CAAC;AAChD,OAAO,wCAAwC,CAAC;AAChD,OAAO,8CAA8C,CAAC;AACtD,OAAO,8CAA8C,CAAC;AACtD,OAAO,8CAA8C,CAAC;AACtD,OAAO,mDAAmD,CAAC;AAE3D,OAAO,EACN,iCAAiC,EACjC,iCAAiC,EACjC,2CAA2C,EAC3C,i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EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACV;AAelB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACV;AAelB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oDACC;AAY7B;IADC,QAAQ,EAAE;qCACqB;AAMhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qDACE;AAiC9B;IADC,IAAI,EAAE;sCACoB;AAQ3B;IADC,IAAI,EAAE;sCACoB;AAGpB;IADN,IAAI,CAAC,oBAAoB,CAAC;gCACG;AAlIzB,MAAM;IATX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,QAAQ,EAAE,cAAc;QACxB,MAAM,EAAE;YACP,KAAK,CAAC,MAAM;YACZ,eAAe;YACf,SAAS;SACT;KACD,CAAC;GACI,MAAM,CA8wBX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import type { Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport clamp from \"@ui5/webcomponents-base/dist/util/clamp.js\";\nimport {\n\tisUp, isDown, isLeft, isRight,\n\tisUpShift, isDownShift, isLeftShift, isRightShift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport toLowercaseEnumValue from \"@ui5/webcomponents-base/dist/util/toLowercaseEnumValue.js\";\nimport { getFirstFocusableElement } from \"@ui5/webcomponents-base/dist/util/FocusableElements.js\";\nimport Popup from \"./Popup.js\";\nimport \"@ui5/webcomponents-icons/dist/error.js\";\nimport \"@ui5/webcomponents-icons/dist/alert.js\";\nimport \"@ui5/webcomponents-icons/dist/sys-enter-2.js\";\nimport \"@ui5/webcomponents-icons/dist/information.js\";\nimport \"@ui5/webcomponents-icons/dist/full-screen.js\";\nimport \"@ui5/webcomponents-icons/dist/exit-full-screen.js\";\n\nimport {\n\tDIALOG_ARIA_DESCRIBEDBY_RESIZABLE,\n\tDIALOG_ARIA_DESCRIBEDBY_DRAGGABLE,\n\tDIALOG_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE,\n\tDIALOG_ARIA_DESCRIBEDBY_REACH_DRAGGABLE_RESIZABLE,\n\tDIALOG_ARIA_DESCRIBEDBY_REACH_DRAGGABLE,\n\tDIALOG_ARIA_DESCRIBEDBY_REACH_RESIZABLE,\n\tDIALOG_RESIZE_HANDLE_TOOLTIP,\n\tDIALOG_DRAG_AND_RESIZE_HANDLE_ARIA_LABEL,\n\tDIALOG_DRAG_HANDLE_ARIA_LABEL,\n\tDIALOG_RESIZE_HANDLE_ARIA_LABEL,\n\tDIALOG_HANDLE_ARIA_ROLEDESCRIPTION,\n\tDIALOG_HEADER_ARIA_LABEL,\n\tDIALOG_CONTENT_ARIA_LABEL,\n\tDIALOG_FOOTER_ARIA_LABEL,\n\tDIALOG_FULLSCREEN_MAXIMIZE,\n\tDIALOG_FULLSCREEN_RESTORE,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Template\nimport DialogTemplate from \"./DialogTemplate.js\";\n// Styles\nimport PopupsCommonCss from \"./generated/themes/PopupsCommon.css.js\";\nimport dialogCSS from \"./generated/themes/Dialog.css.js\";\nimport PopupAccessibleRole from \"./types/PopupAccessibleRole.js\";\n\n/**\n * Defines the step size at which this component would change by when being dragged or resized with the keyboard.\n */\nconst STEP_SIZE = 16;\n\nconst FULLSCREEN_BUTTON_ACCESSIBILITY_ATTRIBUTES = {\n\tariaKeyShortcuts: \"Shift+Ctrl+F\",\n};\n\ntype ValueStateWithIcon = ValueState.Negative | ValueState.Critical | ValueState.Positive | ValueState.Information;\n/**\n * Defines the icons corresponding to the dialog's state.\n */\nconst ICON_PER_STATE: Record<ValueStateWithIcon, string> = {\n\t[ValueState.Negative]: \"error\",\n\t[ValueState.Critical]: \"alert\",\n\t[ValueState.Positive]: \"sys-enter-2\",\n\t[ValueState.Information]: \"information\",\n};\n\n/**\n * @class\n * ### Overview\n * The `ui5-dialog` component is used to temporarily display some information in a\n * size-limited window in front of the regular app screen.\n * It is used to prompt the user for an action or a confirmation.\n * The `ui5-dialog` interrupts the current app processing as it is the only focused UI element and\n * the main screen is dimmed/blocked.\n * The dialog combines concepts known from other technologies where the windows have\n * names such as dialog box, dialog window, pop-up, pop-up window, alert box, or message box.\n *\n * The `ui5-dialog` is modal, which means that a user action is required before it is possible to return to the parent window.\n * To open multiple dialogs, each dialog element should be separate in the markup. This will ensure the correct modal behavior. Avoid nesting dialogs within each other.\n * The content of the `ui5-dialog` is fully customizable.\n *\n * ### Structure\n * A `ui5-dialog` consists of a header, content, and a footer for action buttons.\n * The `ui5-dialog` is usually displayed at the center of the screen.\n * Its position can be changed by the user. To enable this, you need to set the property `draggable` accordingly.\n\n *\n * ### Responsive Behavior\n * The `stretch` property can be used to stretch the `ui5-dialog` to full screen. For better usability, it's recommended to stretch the dialog to full screen on phone devices.\n *\n * **Note:** When a `ui5-bar` is used in the header or in the footer, you should remove the default dialog's paddings.\n *\n * For more information see the sample \"Bar in Header/Footer\".\n\n * ### Keyboard Handling\n *\n * #### Basic Navigation\n * When the `ui5-dialog` has the `draggable` property set to `true`, the user can move the dialog\n * with the following keyboard shortcuts:\n *\n * - [Up] or [Down] arrow keys - Move the dialog up/down.\n * - [Left] or [Right] arrow keys - Move the dialog left/right.\n *\n * #### Resizing\n * When the `ui5-dialog` has the `resizable` property set to `true`, the user can change the size of the dialog\n * with the following keyboard shortcuts:\n *\n * - [Shift] + [Up] or [Down] - Decrease/Increase the height of the dialog.\n * - [Shift] + [Left] or [Right] - Decrease/Increase the width of the dialog.\n *\n * #### Fullscreen\n * When the `ui5-dialog` has the `showFullscreenButton` property set to `true`, the user can toggle fullscreen mode\n * with the following keyboard shortcut:\n *\n * - [Shift] + [Ctrl] + [F] - Toggle fullscreen mode.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Dialog\";`\n *\n * @constructor\n * @extends Popup\n * @public\n * @csspart header - Used to style the header of the component\n * @csspart content - Used to style the content of the component\n * @csspart footer - Used to style the footer of the component\n */\n@customElement({\n\ttag: \"ui5-dialog\",\n\ttemplate: DialogTemplate,\n\tstyles: [\n\t\tPopup.styles,\n\t\tPopupsCommonCss,\n\t\tdialogCSS,\n\t],\n})\nclass Dialog extends Popup {\n\teventDetails!: Popup[\"eventDetails\"];\n\n\t/**\n\t * Defines the header text.\n\t *\n\t * **Note:** If `header` slot is provided, the `headerText` is ignored.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Determines if the dialog will be stretched to full screen on mobile. On desktop,\n\t * the dialog will be stretched to approximately 90% of the viewport.\n\t *\n\t * **Note:** For better usability of the component it is recommended to set this property to \"true\" when the dialog is opened on phone.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tstretch = false;\n\n\t/**\n\t * Determines whether the component is draggable.\n\t * If this property is set to true, the Dialog will be draggable by its header.\n\t *\n\t * **Note:** The component can be draggable only in desktop mode.\n\t *\n\t * **Note:** This property overrides the default HTML \"draggable\" attribute native behavior.\n\t * When \"draggable\" is set to true, the native browser \"draggable\"\n\t * behavior is prevented and only the Dialog custom logic (\"draggable by its header\") works.\n\t * @default false\n\t * @since 1.0.0-rc.9\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdraggable = false;\n\n\t/**\n\t * Configures the component to be resizable.\n\t * If this property is set to true, the Dialog will have a resize handle in its bottom right corner in LTR languages.\n\t * In RTL languages, the resize handle will be placed in the bottom left corner.\n\t *\n\t * **Note:** The component can be resizable only in desktop mode.\n\t *\n\t * **Note:** Upon resizing, externally defined height and width styling will be ignored.\n\t * @default false\n\t * @since 1.0.0-rc.10\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tresizable = false;\n\n\t/**\n\t * Defines whether a fullscreen toggle button is shown in the dialog header.\n\t * When pressed, it toggles the `stretch` property.\n\t * The fullscreen button is not available on phone devices.\n\t *\n\t * **Note:** The fullscreen button is not available on phone devices,\n\t * nor when a custom header slot is provided — the application is expected\n\t * to render its own toggle inside the custom header in those cases.\n\t * @default false\n\t * @since 2.25.0\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowFullscreenButton = false;\n\n\t/**\n\t * Defines the state of the `Dialog`.\n\t *\n\t * **Note:** If `\"Negative\"` and `\"Critical\"` states is set, it will change the\n\t * accessibility role to \"alertdialog\", if the accessibleRole property is set to `\"Dialog\"`.\n\t * @default \"None\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\tstate: `${ValueState}` = \"None\";\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_showFullscreenButton = false;\n\n\t_screenResizeHandler: () => void;\n\t_dragMouseMoveHandler: (e: MouseEvent) => void;\n\t_dragMouseUpHandler: (e: MouseEvent) => void;\n\t_resizeMouseMoveHandler: (e: MouseEvent) => void;\n\t_resizeMouseUpHandler: (e: MouseEvent) => void;\n\t_dragStartHandler: (e: DragEvent) => void;\n\t_fullscreenKeydownHandler: (e: KeyboardEvent) => void;\n\t_y?: number;\n\t_x?: number;\n\t_isRTL?: boolean;\n\t_screenResizeHandlerAttached?: boolean;\n\t_initialX?: number;\n\t_initialY?: number;\n\t_initialWidth?: number;\n\t_initialHeight?: number;\n\t_initialTop?: number;\n\t_initialLeft?: number;\n\t_minWidth?: number;\n\t_cachedMinHeight?: number;\n\t_draggedOrResized = false;\n\t_dragHandlerRegistered = false;\n\t_fullscreenKeydownHandlerRegistered = false;\n\n\t/**\n\t * Defines the header HTML Element.\n\t *\n\t * **Note:** If `header` slot is provided, the labelling of the dialog is a responsibility of the application developer.\n\t * `accessibleName` should be used.\n\t * @public\n\t */\n\t@slot()\n\theader!: Slot<HTMLElement>;\n\n\t/**\n\t * Defines the footer HTML Element.\n\t *\n\t * @public\n\t */\n\t@slot()\n\tfooter!: Slot<HTMLElement>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._screenResizeHandler = this._screenResize.bind(this);\n\n\t\tthis._dragMouseMoveHandler = this._onDragMouseMove.bind(this);\n\t\tthis._dragMouseUpHandler = this._onDragMouseUp.bind(this);\n\n\t\tthis._resizeMouseMoveHandler = this._onResizeMouseMove.bind(this);\n\t\tthis._resizeMouseUpHandler = this._onResizeMouseUp.bind(this);\n\n\t\tthis._dragStartHandler = this._handleDragStart.bind(this);\n\t\tthis._fullscreenKeydownHandler = this._onFullscreenKeydown.bind(this);\n\t}\n\n\tstatic _isHeader(element: HTMLElement) {\n\t\treturn element.classList.contains(\"ui5-popup-header-root\") || element.getAttribute(\"slot\") === \"header\";\n\t}\n\n\tget isModal() {\n\t\treturn true;\n\t}\n\n\tget _ariaLabelledBy() {\n\t\tlet ariaLabelledById;\n\n\t\tif (this.headerText && !this._ariaLabel) {\n\t\t\tariaLabelledById = \"ui5-popup-header-text\";\n\t\t}\n\n\t\treturn ariaLabelledById;\n\t}\n\n\tget effectiveAriaDescribedBy() {\n\t\treturn this._movable ? `${this._id}-dialog-descr` : undefined;\n\t}\n\n\tget ariaDescribedByIds() {\n\t\treturn [\n\t\t\tthis.ariaDescriptionTextId,\n\t\t\tthis.effectiveAriaDescribedBy,\n\t\t].filter(Boolean).join(\" \");\n\t}\n\n\tget dialogAriaDescribedByText() {\n\t\tif (!this._movable) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tif (this.resizable && this.draggable) {\n\t\t\treturn Dialog.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_REACH_DRAGGABLE_RESIZABLE);\n\t\t}\n\t\tif (this.draggable) {\n\t\t\treturn Dialog.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_REACH_DRAGGABLE);\n\t\t}\n\t\tif (this.resizable) {\n\t\t\treturn Dialog.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_REACH_RESIZABLE);\n\t\t}\n\n\t\treturn \"\";\n\t}\n\n\tget ariaDescribedByTextResizable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_RESIZABLE);\n\t}\n\n\tget ariaDescribedByTextDraggable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_DRAGGABLE);\n\t}\n\n\tget ariaDescribedByTextDraggableAndResizable() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE);\n\t}\n\n\tget ariaDescribedByHandlerText() {\n\t\tif (this.resizable && this.draggable) {\n\t\t\treturn this.ariaDescribedByTextDraggableAndResizable;\n\t\t}\n\t\tif (this.resizable) {\n\t\t\treturn this.ariaDescribedByTextResizable;\n\t\t}\n\t\tif (this.draggable) {\n\t\t\treturn this.ariaDescribedByTextDraggable;\n\t\t}\n\t\treturn \"\";\n\t}\n\n\t/**\n\t * Determines if the header should be shown.\n\t */\n\tget _displayHeader() {\n\t\treturn this.header.length || this.headerText || this.draggable || this.resizable || this._showFullscreenButton;\n\t}\n\n\tget _movable() {\n\t\treturn !this.stretch && this.onDesktop && (this.draggable || this.resizable);\n\t}\n\n\tget _dragResizeHandleTabIndex() {\n\t\treturn this._movable ? 0 : undefined;\n\t}\n\n\tget _dragResizeHandleAriaLabel() {\n\t\tif (!this._movable) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tif (this.resizable && this.draggable) {\n\t\t\treturn Dialog.i18nBundle.getText(DIALOG_DRAG_AND_RESIZE_HANDLE_ARIA_LABEL);\n\t\t}\n\t\tif (this.draggable) {\n\t\t\treturn Dialog.i18nBundle.getText(DIALOG_DRAG_HANDLE_ARIA_LABEL);\n\t\t}\n\t\tif (this.resizable) {\n\t\t\treturn Dialog.i18nBundle.getText(DIALOG_RESIZE_HANDLE_ARIA_LABEL);\n\t\t}\n\n\t\treturn \"\";\n\t}\n\n\tget _dragResizeHandleAriaRoleDescription() {\n\t\treturn this._movable ? Dialog.i18nBundle.getText(DIALOG_HANDLE_ARIA_ROLEDESCRIPTION) : undefined;\n\t}\n\n\tget _dragResizeHandleAriaDescribedBy() {\n\t\treturn this._movable ? `${this._id}-descr` : undefined;\n\t}\n\n\tget _showResizeHandle() {\n\t\treturn this.resizable && this.onDesktop && !this.stretch;\n\t}\n\n\tget _fullscreenButtonIcon() {\n\t\treturn this.stretch ? \"exit-full-screen\" : \"full-screen\";\n\t}\n\n\tget _fullscreenButtonTooltip() {\n\t\treturn this.stretch\n\t\t\t? Dialog.i18nBundle.getText(DIALOG_FULLSCREEN_RESTORE)\n\t\t\t: Dialog.i18nBundle.getText(DIALOG_FULLSCREEN_MAXIMIZE);\n\t}\n\n\tget _fullscreenButtonAccessibilityAttributes() {\n\t\treturn FULLSCREEN_BUTTON_ACCESSIBILITY_ATTRIBUTES;\n\t}\n\n\tget _resizeHandleTooltip() {\n\t\treturn this._showResizeHandle ? Dialog.i18nBundle.getText(DIALOG_RESIZE_HANDLE_TOOLTIP) : undefined;\n\t}\n\n\tget _minHeight() {\n\t\tlet minHeight = Number.parseInt(window.getComputedStyle(this.contentDOM).minHeight);\n\n\t\tconst header = this._root.querySelector<HTMLElement>(\".ui5-popup-header-root\");\n\t\tif (header) {\n\t\t\tminHeight += header.offsetHeight;\n\t\t}\n\n\t\tconst footer = this._root.querySelector<HTMLElement>(\".ui5-popup-footer-root\");\n\t\tif (footer) {\n\t\t\tminHeight += footer.offsetHeight;\n\t\t}\n\n\t\treturn minHeight;\n\t}\n\n\tget hasValueState() {\n\t\treturn this.state !== ValueState.None;\n\t}\n\n\tget _dialogStateIcon() {\n\t\treturn ICON_PER_STATE[this.state as ValueStateWithIcon];\n\t}\n\n\tget _role() {\n\t\tif (this.accessibleRole === PopupAccessibleRole.None) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (this.state === ValueState.Negative || this.state === ValueState.Critical) {\n\t\t\treturn toLowercaseEnumValue(PopupAccessibleRole.AlertDialog);\n\t\t}\n\n\t\treturn toLowercaseEnumValue(this.accessibleRole);\n\t}\n\n\tget _contentRole(): \"region\" {\n\t\treturn \"region\";\n\t}\n\n\tget _headerAriaLabel() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_HEADER_ARIA_LABEL);\n\t}\n\n\tget _contentAriaLabel() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_CONTENT_ARIA_LABEL);\n\t}\n\n\tget _footerAriaLabel() {\n\t\treturn Dialog.i18nBundle.getText(DIALOG_FOOTER_ARIA_LABEL);\n\t}\n\n\t_show() {\n\t\tsuper._show();\n\t\tthis._center();\n\t}\n\n\tonBeforeRendering() {\n\t\tsuper.onBeforeRendering();\n\n\t\tthis._showFullscreenButton = this.showFullscreenButton && !this.onPhone && !this.header.length;\n\n\t\tthis._isRTL = this.effectiveDir === \"rtl\";\n\t}\n\n\t/**\n\t * @override\n\t */\n\t_resize() {\n\t\tsuper._resize();\n\n\t\tif (!this._draggedOrResized) {\n\t\t\tthis._center();\n\t\t}\n\t}\n\n\t_screenResize() {\n\t\tthis._center();\n\t}\n\n\t_attachBrowserEvents() {\n\t\tthis._attachScreenResizeHandler();\n\t\tthis._registerDragHandler();\n\t\tthis._registerFullscreenKeydownHandler();\n\t}\n\n\t_detachBrowserEvents() {\n\t\tthis._detachScreenResizeHandler();\n\t\tthis._deregisterDragHandler();\n\t\tthis._deregisterFullscreenKeydownHandler();\n\t}\n\n\t_attachScreenResizeHandler() {\n\t\tif (!this._screenResizeHandlerAttached) {\n\t\t\twindow.addEventListener(\"resize\", this._screenResizeHandler);\n\t\t\tthis._screenResizeHandlerAttached = true;\n\t\t}\n\t}\n\n\t_detachScreenResizeHandler() {\n\t\tif (this._screenResizeHandlerAttached) {\n\t\t\twindow.removeEventListener(\"resize\", this._screenResizeHandler);\n\t\t\tthis._screenResizeHandlerAttached = false; // prevent dialog from repositioning during resizing\n\t\t}\n\t}\n\n\t_registerDragHandler() {\n\t\tif (!this._dragHandlerRegistered) {\n\t\t\tthis.addEventListener(\"dragstart\", this._dragStartHandler);\n\t\t\tthis._dragHandlerRegistered = true;\n\t\t}\n\t}\n\n\t_deregisterDragHandler() {\n\t\tif (this._dragHandlerRegistered) {\n\t\t\tthis.removeEventListener(\"dragstart\", this._dragStartHandler);\n\t\t\tthis._dragHandlerRegistered = false;\n\t\t}\n\t}\n\n\t_registerFullscreenKeydownHandler() {\n\t\tif (this.showFullscreenButton && !this._fullscreenKeydownHandlerRegistered) {\n\t\t\tdocument.addEventListener(\"keydown\", this._fullscreenKeydownHandler);\n\t\t\tthis._fullscreenKeydownHandlerRegistered = true;\n\t\t}\n\t}\n\n\t_deregisterFullscreenKeydownHandler() {\n\t\tif (this._fullscreenKeydownHandlerRegistered) {\n\t\t\tdocument.removeEventListener(\"keydown\", this._fullscreenKeydownHandler);\n\t\t\tthis._fullscreenKeydownHandlerRegistered = false;\n\t\t}\n\t}\n\n\t_center() {\n\t\tconst height = window.innerHeight - this.offsetHeight,\n\t\t\twidth = window.innerWidth - this.offsetWidth;\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${Math.round(height / 2)}px`,\n\t\t\tleft: `${Math.round(width / 2)}px`,\n\t\t});\n\t}\n\n\t_revertSize = () => {\n\t\tObject.assign(this.style, {\n\t\t\ttop: \"\",\n\t\t\tleft: \"\",\n\t\t\twidth: \"\",\n\t\t\theight: \"\",\n\t\t});\n\t}\n\n\t/**\n\t * Event handlers\n\t */\n\t_toggleFullscreen() {\n\t\tif (this.onPhone) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst wasStretched = this.stretch;\n\t\tthis.stretch = !this.stretch;\n\n\t\tthis._revertSize();\n\t\tthis._draggedOrResized = false;\n\n\t\tif (wasStretched) {\n\t\t\trequestAnimationFrame(() => {\n\t\t\t\tif (this.open) {\n\t\t\t\t\tthis._center();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\t_onHeaderDblClick(e: MouseEvent) {\n\t\tconst target = e.target as HTMLElement;\n\t\tconst headerRoot = this._root.querySelector(\".ui5-popup-header-root\");\n\t\tif (target !== headerRoot && !target.classList.contains(\"ui5-popup-header-text\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._toggleFullscreen();\n\t}\n\n\t_onFullscreenKeydown(e: KeyboardEvent) {\n\t\tif (this.isTopModalPopup && this._showFullscreenButton && this._isFullscreenShortcut(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopImmediatePropagation();\n\n\t\t\tthis._toggleFullscreen();\n\t\t}\n\t}\n\n\t_isFullscreenShortcut(e: KeyboardEvent) {\n\t\treturn (e.key === \"f\" || e.key === \"F\") && e.ctrlKey && e.shiftKey && !e.altKey;\n\t}\n\n\t_onDragMouseDown(e: MouseEvent) {\n\t\t// allow dragging only on the header\n\t\tif (!this._movable || !this.draggable || !Dialog._isHeader(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t} = this.getBoundingClientRect();\n\t\tconst {\n\t\t\twidth,\n\t\t\theight,\n\t\t} = window.getComputedStyle(this);\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${top}px`,\n\t\t\tleft: `${left}px`,\n\t\t\twidth: `${Math.round(Number.parseFloat(width) * 100) / 100}px`,\n\t\t\theight: `${Math.round(Number.parseFloat(height) * 100) / 100}px`,\n\t\t});\n\n\t\tthis._x = e.clientX;\n\t\tthis._y = e.clientY;\n\n\t\tthis._draggedOrResized = true;\n\t\tthis._attachMouseDragHandlers();\n\t}\n\n\t_onDragMouseMove(e: MouseEvent) {\n\t\te.preventDefault();\n\n\t\tconst { clientX, clientY } = e;\n\t\tconst calcX = this._x! - clientX;\n\t\tconst calcY = this._y! - clientY;\n\t\tconst {\n\t\t\tleft,\n\t\t\ttop,\n\t\t} = this.getBoundingClientRect();\n\n\t\tObject.assign(this.style, {\n\t\t\tleft: `${Math.floor(left - calcX)}px`,\n\t\t\ttop: `${Math.floor(top - calcY)}px`,\n\t\t});\n\n\t\tthis._x = clientX;\n\t\tthis._y = clientY;\n\t}\n\n\t_onDragMouseUp() {\n\t\tdelete this._x;\n\t\tdelete this._y;\n\n\t\tthis._detachMouseDragHandlers();\n\t}\n\n\t_onDragOrResizeKeyDown(e: KeyboardEvent) {\n\t\tif (!this._movable) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst target = e.target as HTMLElement;\n\t\tif (!target || target.id !== `${this._id}-dragResizeHandler`) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.draggable && [isUp, isDown, isLeft, isRight].some(key => key(e))) {\n\t\t\tthis._dragWithEvent(e);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.resizable && [isUpShift, isDownShift, isLeftShift, isRightShift].some(key => key(e))) {\n\t\t\tthis._resizeWithEvent(e);\n\t\t}\n\t}\n\n\t_dragWithEvent(e: KeyboardEvent) {\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t\twidth,\n\t\t\theight,\n\t\t} = this.getBoundingClientRect();\n\n\t\tlet newPos = 0;\n\t\tlet posDirection: \"top\" | \"left\" = \"top\";\n\n\t\tswitch (true) {\n\t\tcase isUp(e):\n\t\t\tnewPos = top - STEP_SIZE;\n\t\t\tposDirection = \"top\";\n\t\t\tbreak;\n\t\tcase isDown(e):\n\t\t\tnewPos = top + STEP_SIZE;\n\t\t\tposDirection = \"top\";\n\t\t\tbreak;\n\t\tcase isLeft(e):\n\t\t\tnewPos = left - STEP_SIZE;\n\t\t\tposDirection = \"left\";\n\t\t\tbreak;\n\t\tcase isRight(e):\n\t\t\tnewPos = left + STEP_SIZE;\n\t\t\tposDirection = \"left\";\n\t\t\tbreak;\n\t\t}\n\n\t\tnewPos = clamp(\n\t\t\tnewPos,\n\t\t\t0,\n\t\t\tposDirection === \"left\" ? window.innerWidth - width : window.innerHeight - height,\n\t\t);\n\n\t\tthis.style[posDirection] = `${newPos}px`;\n\t}\n\n\t_resizeWithEvent(e: KeyboardEvent) {\n\t\tthis._draggedOrResized = true;\n\t\tthis.addEventListener(\"ui5-before-close\", this._revertSize, { once: true });\n\n\t\tconst { top, left } = this.getBoundingClientRect(),\n\t\t\tstyle = window.getComputedStyle(this),\n\t\t\tminWidth = Number.parseFloat(style.minWidth),\n\t\t\tmaxWidth = window.innerWidth - left,\n\t\t\tmaxHeight = window.innerHeight - top;\n\n\t\tlet width = Number.parseFloat(style.width),\n\t\t\theight = Number.parseFloat(style.height);\n\n\t\tswitch (true) {\n\t\tcase isUpShift(e):\n\t\t\theight -= STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isDownShift(e):\n\t\t\theight += STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isLeftShift(e):\n\t\t\twidth -= STEP_SIZE;\n\t\t\tbreak;\n\t\tcase isRightShift(e):\n\t\t\twidth += STEP_SIZE;\n\t\t\tbreak;\n\t\t}\n\n\t\twidth = clamp(width, minWidth, maxWidth);\n\t\theight = clamp(height, this._minHeight, maxHeight);\n\n\t\tObject.assign(this.style, {\n\t\t\twidth: `${width}px`,\n\t\t\theight: `${height}px`,\n\t\t});\n\t}\n\n\t_attachMouseDragHandlers() {\n\t\twindow.addEventListener(\"mousemove\", this._dragMouseMoveHandler);\n\t\twindow.addEventListener(\"mouseup\", this._dragMouseUpHandler);\n\t}\n\n\t_detachMouseDragHandlers() {\n\t\twindow.removeEventListener(\"mousemove\", this._dragMouseMoveHandler);\n\t\twindow.removeEventListener(\"mouseup\", this._dragMouseUpHandler);\n\t}\n\n\t_onResizeMouseDown(e: MouseEvent) {\n\t\tif (!this._movable || !this.resizable) {\n\t\t\treturn;\n\t\t}\n\n\t\te.preventDefault();\n\n\t\tconst {\n\t\t\ttop,\n\t\t\tleft,\n\t\t} = this.getBoundingClientRect();\n\t\tconst {\n\t\t\twidth,\n\t\t\theight,\n\t\t\tminWidth,\n\t\t} = window.getComputedStyle(this);\n\n\t\tthis._initialX = e.clientX;\n\t\tthis._initialY = e.clientY;\n\t\tthis._initialWidth = Number.parseFloat(width);\n\t\tthis._initialHeight = Number.parseFloat(height);\n\t\tthis._initialTop = top;\n\t\tthis._initialLeft = left;\n\t\tthis._minWidth = Number.parseFloat(minWidth);\n\t\tthis._cachedMinHeight = this._minHeight;\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${top}px`,\n\t\t\tleft: `${left}px`,\n\t\t});\n\n\t\tthis._draggedOrResized = true;\n\t\tthis._attachMouseResizeHandlers();\n\t}\n\n\t_onResizeMouseMove(e: MouseEvent) {\n\t\tconst { clientX, clientY } = e;\n\n\t\tlet newWidth,\n\t\t\tnewLeft;\n\n\t\tif (this._isRTL) {\n\t\t\tnewWidth = clamp(\n\t\t\t\tthis._initialWidth! - (clientX - this._initialX!),\n\t\t\t\tthis._minWidth!,\n\t\t\t\tthis._initialLeft! + this._initialWidth!,\n\t\t\t);\n\n\t\t\t// check if width is changed to avoid \"left\" jumping when max width is reached\n\t\t\tObject.assign(this.style, {\n\t\t\t\twidth: `${newWidth}px`,\n\t\t\t});\n\n\t\t\tconst deltaWidth = newWidth - this.getBoundingClientRect().width;\n\t\t\tconst rightEdge = this._initialLeft! + this._initialWidth! + deltaWidth;\n\n\t\t\tnewLeft = clamp(\n\t\t\t\trightEdge - newWidth,\n\t\t\t\t0,\n\t\t\t\trightEdge - this._minWidth!,\n\t\t\t);\n\t\t} else {\n\t\t\tnewWidth = clamp(\n\t\t\t\tthis._initialWidth! + (clientX - this._initialX!),\n\t\t\t\tthis._minWidth!,\n\t\t\t\twindow.innerWidth - this._initialLeft!,\n\t\t\t);\n\t\t}\n\n\t\tconst newHeight = clamp(\n\t\t\tthis._initialHeight! + (clientY - this._initialY!),\n\t\t\tthis._cachedMinHeight!,\n\t\t\twindow.innerHeight - this._initialTop!,\n\t\t);\n\n\t\tObject.assign(this.style, {\n\t\t\theight: `${newHeight}px`,\n\t\t\twidth: `${newWidth}px`,\n\t\t\tleft: this._isRTL ? `${newLeft}px` : undefined,\n\t\t});\n\t}\n\n\t_onResizeMouseUp() {\n\t\tdelete this._initialX;\n\t\tdelete this._initialY;\n\t\tdelete this._initialWidth;\n\t\tdelete this._initialHeight;\n\t\tdelete this._initialTop;\n\t\tdelete this._initialLeft;\n\t\tdelete this._minWidth;\n\t\tdelete this._cachedMinHeight;\n\n\t\tthis._detachMouseResizeHandlers();\n\t}\n\n\t_handleDragStart(e: DragEvent) {\n\t\t// Only prevent native drag behavior when dragging from the header\n\t\t// to allow native drag-and-drop functionality in the dialog content.\n\t\tif (this.draggable && e.target instanceof HTMLElement && Dialog._isHeader(e.target)) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_attachMouseResizeHandlers() {\n\t\twindow.addEventListener(\"mousemove\", this._resizeMouseMoveHandler);\n\t\twindow.addEventListener(\"mouseup\", this._resizeMouseUpHandler);\n\t\tthis.addEventListener(\"ui5-before-close\", this._revertSize, { once: true });\n\t}\n\n\t_detachMouseResizeHandlers() {\n\t\twindow.removeEventListener(\"mousemove\", this._resizeMouseMoveHandler);\n\t\twindow.removeEventListener(\"mouseup\", this._resizeMouseUpHandler);\n\t}\n\n\tasync _getFirstFocusableElement() {\n\t\tif (this._showFullscreenButton) {\n\t\t\tconst firstFocusable = await getFirstFocusableElement(this.contentDOM) || (this.footerDOM ? await getFirstFocusableElement(this.footerDOM) : null);\n\t\t\treturn firstFocusable || getFirstFocusableElement(this);\n\t\t}\n\n\t\treturn getFirstFocusableElement(this);\n\t}\n\n\t/**\n\t * Overrides Popup's forwardToLast to prioritize the drag/resize handler\n\t * when Shift+Tab is pressed from the first focusable element.\n\t * @private\n\t */\n\tasync forwardToLast() {\n\t\tif (this._movable) {\n\t\t\tconst dragResizeHandler = this.shadowRoot!.querySelector(`#${this._id}-dragResizeHandler`) as HTMLElement;\n\t\t\tif (dragResizeHandler) {\n\t\t\t\tdragResizeHandler.focus();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tawait super.forwardToLast();\n\t}\n}\n\nDialog.define();\n\nexport default Dialog;\n"]}
|
package/dist/DialogTemplate.js
CHANGED
|
@@ -3,6 +3,7 @@ import resizeCorner from "@ui5/webcomponents-icons/dist/resize-corner.js";
|
|
|
3
3
|
import PopupTemplate from "./PopupTemplate.js";
|
|
4
4
|
import Title from "./Title.js";
|
|
5
5
|
import Icon from "./Icon.js";
|
|
6
|
+
import Button from "./Button.js";
|
|
6
7
|
export default function DialogTemplate() {
|
|
7
8
|
return PopupTemplate.call(this, {
|
|
8
9
|
beforeContent,
|
|
@@ -11,11 +12,12 @@ export default function DialogTemplate() {
|
|
|
11
12
|
}
|
|
12
13
|
function beforeContent() {
|
|
13
14
|
return (_jsx(_Fragment, { children: !!this._displayHeader &&
|
|
14
|
-
_jsxs("div", { class: "ui5-popup-header-root", id: "ui5-popup-header", role: "region", "aria-label": this._headerAriaLabel, onMouseDown: this._onDragMouseDown, part: "header", children: [this.hasValueState &&
|
|
15
|
+
_jsxs("div", { class: "ui5-popup-header-root", id: "ui5-popup-header", role: "region", "aria-label": this._headerAriaLabel, onMouseDown: this._onDragMouseDown, onDblClick: this._showFullscreenButton ? this._onHeaderDblClick : undefined, part: "header", children: [this.hasValueState &&
|
|
15
16
|
_jsx(Icon, { class: "ui5-dialog-value-state-icon", name: this._dialogStateIcon }), this.header.length ?
|
|
16
17
|
_jsx("slot", { name: "header" })
|
|
17
18
|
:
|
|
18
|
-
_jsx(Title, { level: "H1", id: "ui5-popup-header-text", class: "ui5-popup-header-text", children: this.headerText })
|
|
19
|
+
_jsx(Title, { level: "H1", id: "ui5-popup-header-text", class: "ui5-popup-header-text", children: this.headerText }), this._showFullscreenButton &&
|
|
20
|
+
_jsx(Button, { class: "ui5-dialog-fullscreen-btn", icon: this._fullscreenButtonIcon, design: "Transparent", tooltip: this._fullscreenButtonTooltip, accessibleName: this._fullscreenButtonTooltip, accessibilityAttributes: this._fullscreenButtonAccessibilityAttributes, onClick: this._toggleFullscreen })] }) }));
|
|
19
21
|
}
|
|
20
22
|
function afterContent() {
|
|
21
23
|
return (_jsxs(_Fragment, { children: [!!this.footer.length &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogTemplate.js","sourceRoot":"","sources":["../src/DialogTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,gDAAgD,CAAC;AAE1E,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"DialogTemplate.js","sourceRoot":"","sources":["../src/DialogTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,gDAAgD,CAAC;AAE1E,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,MAAM,CAAC,OAAO,UAAU,cAAc;IACrC,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE;QAC/B,aAAa;QACb,YAAY;KACZ,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,aAAa;IACrB,OAAO,CAAC,4BACN,CAAC,CAAC,IAAI,CAAC,cAAc;YACrB,eACC,KAAK,EAAC,uBAAuB,EAC7B,EAAE,EAAC,kBAAkB,EACrB,IAAI,EAAC,QAAQ,gBACD,IAAI,CAAC,gBAAgB,EACjC,WAAW,EAAE,IAAI,CAAC,gBAAgB,EAClC,UAAU,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,EAC3E,IAAI,EAAC,QAAQ,a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Q,EAAE,IAAI,CAAC,yBAAyB,EACxC,IAAI,EAAC,KAAK,0BACY,IAAI,CAAC,oCAAoC,gBACnD,IAAI,CAAC,0BAA0B,sBACzB,IAAI,CAAC,gCAAgC,EACvD,SAAS,EAAE,IAAI,CAAC,sBAAsB,GAC/B,EACP,IAAI,CAAC,0BAA0B;4BAC/B,eAAM,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,QAAQ,iBAAc,MAAM,EAAC,KAAK,EAAC,iBAAiB,YAAE,IAAI,CAAC,0BAA0B,GAAQ,EAElH,IAAI,CAAC,yBAAyB;4BAC9B,eAAM,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,eAAe,iBAAc,MAAM,EAAC,KAAK,EAAC,iBAAiB,YAAE,IAAI,CAAC,yBAAyB,GAAQ,IAEvH,IAEF,CAAC,CAAC;AACN,CAAC","sourcesContent":["import resizeCorner from \"@ui5/webcomponents-icons/dist/resize-corner.js\";\nimport type Dialog from \"./Dialog.js\";\nimport PopupTemplate from \"./PopupTemplate.js\";\nimport Title from \"./Title.js\";\nimport Icon from \"./Icon.js\";\nimport Button from \"./Button.js\";\n\nexport default function DialogTemplate(this: Dialog) {\n\treturn PopupTemplate.call(this, {\n\t\tbeforeContent,\n\t\tafterContent,\n\t});\n}\n\nfunction beforeContent(this: Dialog) {\n\treturn (<>\n\t\t{!!this._displayHeader &&\n\t\t\t<div\n\t\t\t\tclass=\"ui5-popup-header-root\"\n\t\t\t\tid=\"ui5-popup-header\"\n\t\t\t\trole=\"region\"\n\t\t\t\taria-label={this._headerAriaLabel}\n\t\t\t\tonMouseDown={this._onDragMouseDown}\n\t\t\t\tonDblClick={this._showFullscreenButton ? this._onHeaderDblClick : undefined}\n\t\t\t\tpart=\"header\"\n\t\t\t\t// state={this.state}\n\t\t\t>\n\t\t\t\t{this.hasValueState &&\n\t\t\t\t\t<Icon class=\"ui5-dialog-value-state-icon\" name={this._dialogStateIcon}></Icon>\n\t\t\t\t}\n\t\t\t\t{this.header.length ?\n\t\t\t\t\t<slot name=\"header\"></slot>\n\t\t\t\t\t:\n\t\t\t\t\t<Title level=\"H1\" id=\"ui5-popup-header-text\" class=\"ui5-popup-header-text\">{this.headerText}</Title>\n\t\t\t\t}\n\t\t\t\t{this._showFullscreenButton &&\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclass=\"ui5-dialog-fullscreen-btn\"\n\t\t\t\t\t\ticon={this._fullscreenButtonIcon}\n\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\ttooltip={this._fullscreenButtonTooltip}\n\t\t\t\t\t\taccessibleName={this._fullscreenButtonTooltip}\n\t\t\t\t\t\taccessibilityAttributes={this._fullscreenButtonAccessibilityAttributes}\n\t\t\t\t\t\tonClick={this._toggleFullscreen}\n\t\t\t\t\t></Button>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</>);\n}\n\nfunction afterContent(this: Dialog) {\n\treturn (<>\n\t\t{!!this.footer.length &&\n\t\t\t<div\n\t\t\t\tclass=\"ui5-popup-footer-root\"\n\t\t\t\trole=\"region\"\n\t\t\t\taria-label={this._footerAriaLabel}\n\t\t\t\tpart=\"footer\"\n\t\t\t>\n\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t</div>\n\t\t}\n\t\t{this._showResizeHandle &&\n\t\t\t<div\n\t\t\t\tclass=\"ui5-popup-resize-handle\"\n\t\t\t\tonMouseDown={this._onResizeMouseDown}\n\t\t\t\ttitle={this._resizeHandleTooltip}\n\t\t\t>\n\t\t\t\t<Icon name={resizeCorner}></Icon>\n\t\t\t</div>\n\t\t}\n\t\t{this._movable &&\n\t\t\t<>\n\t\t\t\t<span\n\t\t\t\t\tid={`${this._id}-dragResizeHandler`}\n\t\t\t\t\tclass=\"ui5-popup-drag-resize-handler ui5-hidden-text\"\n\t\t\t\t\ttabIndex={this._dragResizeHandleTabIndex}\n\t\t\t\t\trole=\"img\"\n\t\t\t\t\taria-roledescription={this._dragResizeHandleAriaRoleDescription}\n\t\t\t\t\taria-label={this._dragResizeHandleAriaLabel}\n\t\t\t\t\taria-describedby={this._dragResizeHandleAriaDescribedBy}\n\t\t\t\t\tonKeyDown={this._onDragOrResizeKeyDown}\n\t\t\t\t></span>\n\t\t\t\t{this.ariaDescribedByHandlerText &&\n\t\t\t\t\t<span id={`${this._id}-descr`} aria-hidden=\"true\" class=\"ui5-hidden-text\">{this.ariaDescribedByHandlerText}</span>\n\t\t\t\t}\n\t\t\t\t{this.dialogAriaDescribedByText &&\n\t\t\t\t\t<span id={`${this._id}-dialog-descr`} aria-hidden=\"true\" class=\"ui5-hidden-text\">{this.dialogAriaDescribedByText}</span>\n\t\t\t\t}\n\t\t\t</>\n\t\t}\n\t</>);\n}\n"]}
|
package/dist/FileUploader.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { IFormInputElement } from "@ui5/webcomponents-base/dist/features/In
|
|
|
6
6
|
import type { InputAccInfo } from "./Input.js";
|
|
7
7
|
import type Popover from "./Popover.js";
|
|
8
8
|
import type Tokenizer from "./Tokenizer.js";
|
|
9
|
+
type MappedValueState = Exclude<`${ValueState}`, "None">;
|
|
9
10
|
type FileData = {
|
|
10
11
|
fileName: string;
|
|
11
12
|
fileSize: number;
|
|
@@ -224,12 +225,14 @@ declare class FileUploader extends UI5Element implements IFormInputElement {
|
|
|
224
225
|
openValueStatePopover(): void;
|
|
225
226
|
closeValueStatePopover(): void;
|
|
226
227
|
get accInfo(): InputAccInfo;
|
|
228
|
+
get valueStateTypeMappings(): Record<MappedValueState, string>;
|
|
229
|
+
get ariaValueStateHiddenText(): string | undefined;
|
|
227
230
|
get inputTitle(): string;
|
|
228
231
|
get valueHelpTitle(): string;
|
|
229
232
|
get clearIconTitle(): string;
|
|
230
233
|
get resolvedPlaceholder(): string;
|
|
231
|
-
get valueStateTextMappings(): Record<
|
|
232
|
-
get valueStateText(): string;
|
|
234
|
+
get valueStateTextMappings(): Record<MappedValueState, string>;
|
|
235
|
+
get valueStateText(): string | undefined;
|
|
233
236
|
get hasValueState(): boolean;
|
|
234
237
|
get shouldDisplayDefaultValueStateMessage(): boolean;
|
|
235
238
|
get shouldOpenValueStateMessagePopover(): boolean;
|
package/dist/FileUploader.js
CHANGED
|
@@ -16,7 +16,7 @@ import { getEffectiveAriaLabelText, getAssociatedLabelForTexts, getAllAccessible
|
|
|
16
16
|
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
17
17
|
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
|
18
18
|
import { isUpAlt, isDownAlt, isEnter, isDelete, isF4, isSpace, isRight, isLeft, } from "@ui5/webcomponents-base/dist/Keys.js";
|
|
19
|
-
import { FILEUPLOADER_INPUT_TOOLTIP, FILEUPLOADER_VALUE_HELP_TOOLTIP, FILEUPLOADER_CLEAR_ICON_TOOLTIP, VALUE_STATE_SUCCESS, VALUE_STATE_INFORMATION, VALUE_STATE_ERROR, VALUE_STATE_WARNING, FILEUPLOADER_DEFAULT_PLACEHOLDER, FILEUPLOADER_DEFAULT_MULTIPLE_PLACEHOLDER, FILEUPLOADER_ROLE_DESCRIPTION, FILEUPLOAER_VALUE_MISSING, } from "./generated/i18n/i18n-defaults.js";
|
|
19
|
+
import { FILEUPLOADER_INPUT_TOOLTIP, FILEUPLOADER_VALUE_HELP_TOOLTIP, FILEUPLOADER_CLEAR_ICON_TOOLTIP, VALUE_STATE_SUCCESS, VALUE_STATE_INFORMATION, VALUE_STATE_ERROR, VALUE_STATE_WARNING, VALUE_STATE_TYPE_SUCCESS, VALUE_STATE_TYPE_INFORMATION, VALUE_STATE_TYPE_ERROR, VALUE_STATE_TYPE_WARNING, FILEUPLOADER_DEFAULT_PLACEHOLDER, FILEUPLOADER_DEFAULT_MULTIPLE_PLACEHOLDER, FILEUPLOADER_ROLE_DESCRIPTION, FILEUPLOAER_VALUE_MISSING, } from "./generated/i18n/i18n-defaults.js";
|
|
20
20
|
// Template
|
|
21
21
|
import FileUploaderTemplate from "./FileUploaderTemplate.js";
|
|
22
22
|
// Styles
|
|
@@ -358,8 +358,29 @@ let FileUploader = FileUploader_1 = class FileUploader extends UI5Element {
|
|
|
358
358
|
"ariaHasPopup": "dialog",
|
|
359
359
|
"ariaLabel": getAllAccessibleNameRefTexts(this) || getEffectiveAriaLabelText(this) || getAssociatedLabelForTexts(this) || undefined,
|
|
360
360
|
"ariaDescription": getAllAccessibleDescriptionRefTexts(this) || getEffectiveAriaDescriptionText(this) || undefined,
|
|
361
|
+
"ariaDescribedBy": this.hasValueState ? "valueStateDesc" : undefined,
|
|
361
362
|
};
|
|
362
363
|
}
|
|
364
|
+
get valueStateTypeMappings() {
|
|
365
|
+
return {
|
|
366
|
+
"Positive": FileUploader_1.i18nBundle.getText(VALUE_STATE_TYPE_SUCCESS),
|
|
367
|
+
"Information": FileUploader_1.i18nBundle.getText(VALUE_STATE_TYPE_INFORMATION),
|
|
368
|
+
"Negative": FileUploader_1.i18nBundle.getText(VALUE_STATE_TYPE_ERROR),
|
|
369
|
+
"Critical": FileUploader_1.i18nBundle.getText(VALUE_STATE_TYPE_WARNING),
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
get ariaValueStateHiddenText() {
|
|
373
|
+
if (!this.hasValueState) {
|
|
374
|
+
return undefined;
|
|
375
|
+
}
|
|
376
|
+
const valueStateType = this.valueStateTypeMappings[this.valueState];
|
|
377
|
+
if (this.shouldDisplayDefaultValueStateMessage) {
|
|
378
|
+
return this.valueStateText ? `${valueStateType} ${this.valueStateText}` : valueStateType;
|
|
379
|
+
}
|
|
380
|
+
return this.valueStateMessage.length
|
|
381
|
+
? `${valueStateType} ${this.valueStateMessage.map(el => el.textContent).join(" ")}`
|
|
382
|
+
: valueStateType;
|
|
383
|
+
}
|
|
363
384
|
get inputTitle() {
|
|
364
385
|
return FileUploader_1.i18nBundle.getText(FILEUPLOADER_INPUT_TOOLTIP);
|
|
365
386
|
}
|