@seamly/web-ui 25.0.0 → 25.1.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/build/dist/lib/index.debug.js +75 -47
- package/build/dist/lib/index.debug.js.map +1 -1
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.debug.min.js.map +1 -1
- package/build/dist/lib/index.js +38 -15
- package/build/dist/lib/index.js.map +1 -1
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/index.min.js.map +1 -1
- package/build/dist/lib/styles.css +1 -1
- package/package.json +11 -11
- package/src/javascripts/core/domains/store/slice.ts +1 -0
- package/src/javascripts/core/domains/store/store.types.ts +1 -0
- package/src/javascripts/core/ui/components/conversation/conversation.tsx +9 -11
- package/src/javascripts/core/ui/components/conversation/event/choice-prompt.tsx +1 -1
- package/src/javascripts/core/ui/components/entry/upload-toggle.tsx +1 -0
- package/src/javascripts/core/ui/components/layout/chat.tsx +6 -4
- package/src/javascripts/core/ui/components/view/window-view/collapse-button.tsx +10 -1
- package/src/javascripts/core/ui/components/view/window-view/window-open-button.tsx +7 -1
- package/src/javascripts/core/ui/hooks/focus-helper-hooks.ts +5 -0
|
@@ -14485,7 +14485,7 @@ class API {
|
|
|
14485
14485
|
return {
|
|
14486
14486
|
clientName: "@seamly/web-ui",
|
|
14487
14487
|
clientVariant: this.#layoutMode,
|
|
14488
|
-
clientVersion: "25.
|
|
14488
|
+
clientVersion: "25.1.0",
|
|
14489
14489
|
currentUrl: window.location.toString(),
|
|
14490
14490
|
screenResolution: `${window.screen.width}x${window.screen.height}`,
|
|
14491
14491
|
timezone: (0,_utils__WEBPACK_IMPORTED_MODULE_13__.getTimeZone)(),
|
|
@@ -16646,6 +16646,7 @@ const initialStoreState = {
|
|
|
16646
16646
|
skiplinkTargetId: (0,lib_id__WEBPACK_IMPORTED_MODULE_10__.randomId)(),
|
|
16647
16647
|
optionsButtonId: (0,lib_id__WEBPACK_IMPORTED_MODULE_10__.randomId)(),
|
|
16648
16648
|
headerCollapseButtonId: (0,lib_id__WEBPACK_IMPORTED_MODULE_10__.randomId)(),
|
|
16649
|
+
windowOpenButtonId: (0,lib_id__WEBPACK_IMPORTED_MODULE_10__.randomId)(),
|
|
16649
16650
|
serviceData: {},
|
|
16650
16651
|
options: {
|
|
16651
16652
|
features: {
|
|
@@ -19679,13 +19680,15 @@ const Conversation = () => {
|
|
|
19679
19680
|
className: (0,lib_css__WEBPACK_IMPORTED_MODULE_4__.className)('chat__body'),
|
|
19680
19681
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("div", {
|
|
19681
19682
|
className: (0,lib_css__WEBPACK_IMPORTED_MODULE_4__.className)('conversation__container'),
|
|
19682
|
-
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(ui_components_layout_privacy_disclaimer__WEBPACK_IMPORTED_MODULE_5__["default"], {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.
|
|
19683
|
-
className: (0,lib_css__WEBPACK_IMPORTED_MODULE_4__.className)('conversation'),
|
|
19683
|
+
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(ui_components_layout_privacy_disclaimer__WEBPACK_IMPORTED_MODULE_5__["default"], {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("div", {
|
|
19684
19684
|
role: "log",
|
|
19685
19685
|
"aria-label": t('chat.srLabel'),
|
|
19686
|
-
children:
|
|
19687
|
-
|
|
19688
|
-
|
|
19686
|
+
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("ol", {
|
|
19687
|
+
className: (0,lib_css__WEBPACK_IMPORTED_MODULE_4__.className)('conversation'),
|
|
19688
|
+
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_component_filter__WEBPACK_IMPORTED_MODULE_10__["default"], {
|
|
19689
|
+
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(Events, {})
|
|
19690
|
+
}), debouncedIsLoading ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_loader__WEBPACK_IMPORTED_MODULE_12__["default"], {}) : null, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_entry_abort_transaction_button_abort_transaction_button__WEBPACK_IMPORTED_MODULE_9__["default"], {})]
|
|
19691
|
+
})
|
|
19689
19692
|
})]
|
|
19690
19693
|
})
|
|
19691
19694
|
})]
|
|
@@ -20569,7 +20572,7 @@ const ChoicePrompt = ({
|
|
|
20569
20572
|
child.props = {
|
|
20570
20573
|
...child.props,
|
|
20571
20574
|
event: subEvent,
|
|
20572
|
-
descriptorId,
|
|
20575
|
+
id: descriptorId,
|
|
20573
20576
|
showTranslationToggle: false
|
|
20574
20577
|
};
|
|
20575
20578
|
return child;
|
|
@@ -23835,6 +23838,7 @@ const UploadToggle = () => {
|
|
|
23835
23838
|
"aria-disabled": !showUploadButton,
|
|
23836
23839
|
type: "button",
|
|
23837
23840
|
onClick: showUploadButton ? onClickHandler : undefined,
|
|
23841
|
+
tabIndex: !showUploadButton ? -1 : undefined,
|
|
23838
23842
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(ui_components_layout_icon__WEBPACK_IMPORTED_MODULE_3__["default"], {
|
|
23839
23843
|
name: "file",
|
|
23840
23844
|
size: "32",
|
|
@@ -24628,13 +24632,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24628
24632
|
/* harmony import */ var domains_app_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! domains/app/hooks */ "./src/javascripts/core/domains/app/hooks.ts");
|
|
24629
24633
|
/* harmony import */ var domains_config_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! domains/config/hooks */ "./src/javascripts/core/domains/config/hooks.ts");
|
|
24630
24634
|
/* harmony import */ var domains_i18n_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! domains/i18n/hooks */ "./src/javascripts/core/domains/i18n/hooks.ts");
|
|
24631
|
-
/* harmony import */ var
|
|
24632
|
-
/* harmony import */ var
|
|
24633
|
-
/* harmony import */ var
|
|
24634
|
-
/* harmony import */ var
|
|
24635
|
-
/* harmony import */ var
|
|
24636
|
-
/* harmony import */ var
|
|
24637
|
-
/* harmony import */ var
|
|
24635
|
+
/* harmony import */ var domains_visibility_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! domains/visibility/hooks */ "./src/javascripts/core/domains/visibility/hooks.ts");
|
|
24636
|
+
/* harmony import */ var lib_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lib/css */ "./src/javascripts/core/lib/css.ts");
|
|
24637
|
+
/* harmony import */ var preact_compat__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! preact/compat */ "preact/compat");
|
|
24638
|
+
/* harmony import */ var preact_compat__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(preact_compat__WEBPACK_IMPORTED_MODULE_6__);
|
|
24639
|
+
/* harmony import */ var ui_components_suggestions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ui/components/suggestions */ "./src/javascripts/core/ui/components/suggestions/index.tsx");
|
|
24640
|
+
/* harmony import */ var ui_hooks_component_helper_hooks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ui/hooks/component-helper-hooks */ "./src/javascripts/core/ui/hooks/component-helper-hooks.ts");
|
|
24641
|
+
/* harmony import */ var ui_hooks_focus_helper_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ui/hooks/focus-helper-hooks */ "./src/javascripts/core/ui/hooks/focus-helper-hooks.ts");
|
|
24638
24642
|
/* harmony import */ var ui_hooks_seamly_state_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ui/hooks/seamly-state-hooks */ "./src/javascripts/core/ui/hooks/seamly-state-hooks.ts");
|
|
24639
24643
|
/* harmony import */ var ui_hooks_utility_hooks__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ui/hooks/utility-hooks */ "./src/javascripts/core/ui/hooks/utility-hooks.ts");
|
|
24640
24644
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/preact/compat/jsx-runtime.mjs");
|
|
@@ -24651,15 +24655,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24651
24655
|
|
|
24652
24656
|
|
|
24653
24657
|
|
|
24654
|
-
const Chat = (0,
|
|
24658
|
+
const Chat = (0,preact_compat__WEBPACK_IMPORTED_MODULE_6__.forwardRef)(({
|
|
24655
24659
|
children,
|
|
24656
24660
|
className: givenClassName = ''
|
|
24657
24661
|
}, forwardedRef) => {
|
|
24658
24662
|
const {
|
|
24663
|
+
closeChat,
|
|
24659
24664
|
isOpen,
|
|
24660
|
-
isVisible
|
|
24661
|
-
|
|
24662
|
-
|
|
24665
|
+
isVisible
|
|
24666
|
+
} = (0,domains_visibility_hooks__WEBPACK_IMPORTED_MODULE_4__.useVisibility)();
|
|
24667
|
+
const focusWindowOpenButton = (0,ui_hooks_focus_helper_hooks__WEBPACK_IMPORTED_MODULE_9__.useWindowOpenButtonFocusing)();
|
|
24663
24668
|
const {
|
|
24664
24669
|
namespace,
|
|
24665
24670
|
layoutMode
|
|
@@ -24667,7 +24672,7 @@ const Chat = (0,preact_compat__WEBPACK_IMPORTED_MODULE_7__.forwardRef)(({
|
|
|
24667
24672
|
const {
|
|
24668
24673
|
isInline
|
|
24669
24674
|
} = (0,ui_hooks_seamly_state_hooks__WEBPACK_IMPORTED_MODULE_10__.useSeamlyLayoutMode)();
|
|
24670
|
-
const appContainerClassNames = (0,
|
|
24675
|
+
const appContainerClassNames = (0,ui_hooks_component_helper_hooks__WEBPACK_IMPORTED_MODULE_8__.useSeamlyAppContainerClassNames)();
|
|
24671
24676
|
const headingId = (0,ui_hooks_utility_hooks__WEBPACK_IMPORTED_MODULE_11__.useGeneratedId)();
|
|
24672
24677
|
const userHasResponded = (0,domains_app_hooks__WEBPACK_IMPORTED_MODULE_1__.useUserHasResponded)();
|
|
24673
24678
|
const {
|
|
@@ -24686,26 +24691,25 @@ const Chat = (0,preact_compat__WEBPACK_IMPORTED_MODULE_7__.forwardRef)(({
|
|
|
24686
24691
|
}
|
|
24687
24692
|
const onKeyDownHandler = e => {
|
|
24688
24693
|
if (e.code && e.code === 'Escape' || e.keyCode === 27) if (!isInline && isOpen) {
|
|
24689
|
-
|
|
24690
|
-
|
|
24691
|
-
});
|
|
24694
|
+
closeChat();
|
|
24695
|
+
focusWindowOpenButton();
|
|
24692
24696
|
}
|
|
24693
24697
|
};
|
|
24694
24698
|
return isVisible && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("section", {
|
|
24695
|
-
className: (0,
|
|
24699
|
+
className: (0,lib_css__WEBPACK_IMPORTED_MODULE_5__.className)(classNames),
|
|
24696
24700
|
onKeyDown: onKeyDownHandler,
|
|
24697
24701
|
tabIndex: -1,
|
|
24698
24702
|
ref: forwardedRef,
|
|
24699
24703
|
role: layoutMode === 'window' ? 'dialog' : undefined,
|
|
24700
24704
|
"aria-labelledby": headingId,
|
|
24701
24705
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("h2", {
|
|
24702
|
-
className: (0,
|
|
24706
|
+
className: (0,lib_css__WEBPACK_IMPORTED_MODULE_5__.className)('chat__title', 'visually-hidden'),
|
|
24703
24707
|
id: headingId,
|
|
24704
|
-
children: t('
|
|
24708
|
+
children: t('window.srModalLayoutLabel')
|
|
24705
24709
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("div", {
|
|
24706
|
-
className: (0,
|
|
24710
|
+
className: (0,lib_css__WEBPACK_IMPORTED_MODULE_5__.className)('chat-wrapper'),
|
|
24707
24711
|
children: children
|
|
24708
|
-
}), layoutMode === 'inline' && isOpen && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(
|
|
24712
|
+
}), layoutMode === 'inline' && isOpen && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(ui_components_suggestions__WEBPACK_IMPORTED_MODULE_7__["default"], {
|
|
24709
24713
|
isAside: true
|
|
24710
24714
|
})]
|
|
24711
24715
|
});
|
|
@@ -26343,9 +26347,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26343
26347
|
/* harmony import */ var domains_i18n_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! domains/i18n/hooks */ "./src/javascripts/core/domains/i18n/hooks.ts");
|
|
26344
26348
|
/* harmony import */ var domains_visibility_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! domains/visibility/hooks */ "./src/javascripts/core/domains/visibility/hooks.ts");
|
|
26345
26349
|
/* harmony import */ var lib_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lib/css */ "./src/javascripts/core/lib/css.ts");
|
|
26346
|
-
/* harmony import */ var
|
|
26347
|
-
/* harmony import */ var
|
|
26348
|
-
/* harmony import */ var
|
|
26350
|
+
/* harmony import */ var preact_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! preact/hooks */ "preact/hooks");
|
|
26351
|
+
/* harmony import */ var preact_hooks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(preact_hooks__WEBPACK_IMPORTED_MODULE_3__);
|
|
26352
|
+
/* harmony import */ var ui_components_layout_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ui/components/layout/icon */ "./src/javascripts/core/ui/components/layout/icon.tsx");
|
|
26353
|
+
/* harmony import */ var ui_hooks_focus_helper_hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ui/hooks/focus-helper-hooks */ "./src/javascripts/core/ui/hooks/focus-helper-hooks.ts");
|
|
26354
|
+
/* harmony import */ var ui_hooks_seamly_state_hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ui/hooks/seamly-state-hooks */ "./src/javascripts/core/ui/hooks/seamly-state-hooks.ts");
|
|
26355
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/preact/compat/jsx-runtime.mjs");
|
|
26356
|
+
|
|
26357
|
+
|
|
26349
26358
|
|
|
26350
26359
|
|
|
26351
26360
|
|
|
@@ -26362,12 +26371,17 @@ const CollapseButton = () => {
|
|
|
26362
26371
|
} = (0,domains_visibility_hooks__WEBPACK_IMPORTED_MODULE_1__.useVisibility)();
|
|
26363
26372
|
const {
|
|
26364
26373
|
isWindow
|
|
26365
|
-
} = (0,
|
|
26366
|
-
|
|
26374
|
+
} = (0,ui_hooks_seamly_state_hooks__WEBPACK_IMPORTED_MODULE_6__.useSeamlyLayoutMode)();
|
|
26375
|
+
const focusWindowOpenButton = (0,ui_hooks_focus_helper_hooks__WEBPACK_IMPORTED_MODULE_5__.useWindowOpenButtonFocusing)();
|
|
26376
|
+
const handleClick = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_3__.useCallback)(() => {
|
|
26377
|
+
closeChat();
|
|
26378
|
+
focusWindowOpenButton();
|
|
26379
|
+
}, [closeChat, focusWindowOpenButton]);
|
|
26380
|
+
return isOpen && isWindow ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("button", {
|
|
26367
26381
|
type: "button",
|
|
26368
26382
|
className: (0,lib_css__WEBPACK_IMPORTED_MODULE_2__.className)('button', 'collapse-button'),
|
|
26369
|
-
onClick:
|
|
26370
|
-
children: /*#__PURE__*/(0,
|
|
26383
|
+
onClick: handleClick,
|
|
26384
|
+
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(ui_components_layout_icon__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
|
26371
26385
|
name: "chevronDown",
|
|
26372
26386
|
size: "32",
|
|
26373
26387
|
alt: t('window.srCollapseButton')
|
|
@@ -26483,8 +26497,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26483
26497
|
/* harmony import */ var ui_components_widgets_in_out_transition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ui/components/widgets/in-out-transition */ "./src/javascripts/core/ui/components/widgets/in-out-transition.tsx");
|
|
26484
26498
|
/* harmony import */ var ui_hooks_focus_helper_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ui/hooks/focus-helper-hooks */ "./src/javascripts/core/ui/hooks/focus-helper-hooks.ts");
|
|
26485
26499
|
/* harmony import */ var ui_hooks_seamly_api_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ui/hooks/seamly-api-hooks */ "./src/javascripts/core/ui/hooks/seamly-api-hooks.ts");
|
|
26486
|
-
/* harmony import */ var
|
|
26487
|
-
/* harmony import */ var
|
|
26500
|
+
/* harmony import */ var ui_hooks_seamly_hooks__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ui/hooks/seamly-hooks */ "./src/javascripts/core/ui/hooks/seamly-hooks.ts");
|
|
26501
|
+
/* harmony import */ var ui_hooks_seamly_state_hooks__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ui/hooks/seamly-state-hooks */ "./src/javascripts/core/ui/hooks/seamly-state-hooks.ts");
|
|
26502
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/preact/compat/jsx-runtime.mjs");
|
|
26503
|
+
|
|
26488
26504
|
|
|
26489
26505
|
|
|
26490
26506
|
|
|
@@ -26500,15 +26516,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26500
26516
|
|
|
26501
26517
|
const ButtonIcon = () => {
|
|
26502
26518
|
const startChatIcon = (0,domains_config_hooks__WEBPACK_IMPORTED_MODULE_0__.useStartChatIcon)();
|
|
26503
|
-
const currentAgent = (0,
|
|
26519
|
+
const currentAgent = (0,ui_hooks_seamly_state_hooks__WEBPACK_IMPORTED_MODULE_12__.useSeamlyCurrentAgent)();
|
|
26504
26520
|
const hasError = (0,react_redux__WEBPACK_IMPORTED_MODULE_6__.useSelector)(domains_interrupt_selectors__WEBPACK_IMPORTED_MODULE_2__.selectHasError);
|
|
26505
26521
|
const isActiveConversation = currentAgent && !hasError;
|
|
26506
26522
|
const src = isActiveConversation ? currentAgent.avatar : startChatIcon;
|
|
26507
|
-
return src ? /*#__PURE__*/(0,
|
|
26523
|
+
return src ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("img", {
|
|
26508
26524
|
className: (0,lib_css__WEBPACK_IMPORTED_MODULE_4__.className)(isActiveConversation ? 'avatar' : 'icon'),
|
|
26509
26525
|
src: src,
|
|
26510
26526
|
alt: ""
|
|
26511
|
-
}) : /*#__PURE__*/(0,
|
|
26527
|
+
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(ui_components_layout_icon__WEBPACK_IMPORTED_MODULE_7__["default"], {
|
|
26512
26528
|
name: "avatar",
|
|
26513
26529
|
size: "32",
|
|
26514
26530
|
alt: ""
|
|
@@ -26526,28 +26542,33 @@ const WindowOpenButton = ({
|
|
|
26526
26542
|
const {
|
|
26527
26543
|
isOpen
|
|
26528
26544
|
} = (0,domains_visibility_hooks__WEBPACK_IMPORTED_MODULE_3__.useVisibility)();
|
|
26529
|
-
const
|
|
26545
|
+
const {
|
|
26546
|
+
windowOpenButtonId
|
|
26547
|
+
} = (0,ui_hooks_seamly_hooks__WEBPACK_IMPORTED_MODULE_11__.useSeamlyStateContext)();
|
|
26548
|
+
const count = (0,ui_hooks_seamly_state_hooks__WEBPACK_IMPORTED_MODULE_12__.useSeamlyUnreadCount)();
|
|
26530
26549
|
const handleClick = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_5__.useCallback)(() => {
|
|
26531
26550
|
onClick();
|
|
26532
26551
|
focusSkiplinkTarget();
|
|
26533
26552
|
}, [focusSkiplinkTarget, onClick]);
|
|
26534
|
-
return /*#__PURE__*/(0,
|
|
26553
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(ui_components_widgets_in_out_transition__WEBPACK_IMPORTED_MODULE_8__["default"], {
|
|
26535
26554
|
isActive: !isOpen,
|
|
26536
26555
|
transitionStartState: ui_components_widgets_in_out_transition__WEBPACK_IMPORTED_MODULE_8__.transitionStartStates.rendered,
|
|
26537
|
-
children: /*#__PURE__*/(0,
|
|
26556
|
+
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("button", {
|
|
26557
|
+
type: "button",
|
|
26538
26558
|
className: (0,lib_css__WEBPACK_IMPORTED_MODULE_4__.className)('window-open-button'),
|
|
26539
26559
|
"aria-label": ariaLabel,
|
|
26540
|
-
"aria-hidden": isOpen,
|
|
26541
26560
|
onClick: handleClick,
|
|
26542
|
-
|
|
26561
|
+
inert: isOpen || undefined,
|
|
26562
|
+
id: windowOpenButtonId,
|
|
26563
|
+
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(ui_components_widgets_in_out_transition__WEBPACK_IMPORTED_MODULE_8__["default"], {
|
|
26543
26564
|
isActive: !!count,
|
|
26544
26565
|
transitionStartState: ui_components_widgets_in_out_transition__WEBPACK_IMPORTED_MODULE_8__.transitionStartStates.notRendered,
|
|
26545
|
-
children: /*#__PURE__*/(0,
|
|
26566
|
+
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("span", {
|
|
26546
26567
|
className: (0,lib_css__WEBPACK_IMPORTED_MODULE_4__.className)('message-count'),
|
|
26547
26568
|
"aria-hidden": "true",
|
|
26548
26569
|
children: count
|
|
26549
26570
|
})
|
|
26550
|
-
}), /*#__PURE__*/(0,
|
|
26571
|
+
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(ButtonIcon, {})]
|
|
26551
26572
|
})
|
|
26552
26573
|
});
|
|
26553
26574
|
};
|
|
@@ -27378,7 +27399,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27378
27399
|
/* harmony export */ useElementFocusingById: () => (/* binding */ useElementFocusingById),
|
|
27379
27400
|
/* harmony export */ useFocusIfSeamlyContainedFocus: () => (/* binding */ useFocusIfSeamlyContainedFocus),
|
|
27380
27401
|
/* harmony export */ useSeamlyContainerElement: () => (/* binding */ useSeamlyContainerElement),
|
|
27381
|
-
/* harmony export */ useSkiplinkTargetFocusing: () => (/* binding */ useSkiplinkTargetFocusing)
|
|
27402
|
+
/* harmony export */ useSkiplinkTargetFocusing: () => (/* binding */ useSkiplinkTargetFocusing),
|
|
27403
|
+
/* harmony export */ useWindowOpenButtonFocusing: () => (/* binding */ useWindowOpenButtonFocusing)
|
|
27382
27404
|
/* harmony export */ });
|
|
27383
27405
|
/* harmony import */ var domains_store__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! domains/store */ "./src/javascripts/core/domains/store/index.ts");
|
|
27384
27406
|
/* harmony import */ var domains_store_slice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! domains/store/slice */ "./src/javascripts/core/domains/store/slice.ts");
|
|
@@ -27418,6 +27440,12 @@ const useSkiplinkTargetFocusing = () => {
|
|
|
27418
27440
|
const skiplinkTargetId = (0,_seamly_state_hooks__WEBPACK_IMPORTED_MODULE_4__.useSkiplink)();
|
|
27419
27441
|
return useElementFocusingById(skiplinkTargetId);
|
|
27420
27442
|
};
|
|
27443
|
+
const useWindowOpenButtonFocusing = () => {
|
|
27444
|
+
const {
|
|
27445
|
+
windowOpenButtonId
|
|
27446
|
+
} = (0,_seamly_state_hooks__WEBPACK_IMPORTED_MODULE_4__.useSeamlyStateContext)();
|
|
27447
|
+
return useElementFocusingById(windowOpenButtonId);
|
|
27448
|
+
};
|
|
27421
27449
|
const useFocusIfSeamlyContainedFocus = () => {
|
|
27422
27450
|
const containerElementRef = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);
|
|
27423
27451
|
const [seamlyContainerElement] = useSeamlyContainerElement();
|