@seamly/web-ui 20.1.0-alpha.1 → 20.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/deprecated-view.css +1 -1
- package/build/dist/lib/index.debug.js +135 -135
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.js +582 -570
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/standalone.js +607 -595
- package/build/dist/lib/standalone.min.js +1 -1
- package/build/dist/lib/style-guide.js +7294 -7289
- package/build/dist/lib/style-guide.min.js +1 -1
- package/build/dist/lib/styles-default-implementation.css +1 -1
- package/build/dist/lib/styles.css +1 -1
- package/package.json +1 -1
- package/src/javascripts/api/errors/seamly-base-error.js +1 -0
- package/src/javascripts/api/index.js +24 -19
- package/src/javascripts/api/producer.js +3 -3
- package/src/javascripts/domains/app/actions.js +7 -7
- package/src/javascripts/domains/app/hooks.js +1 -1
- package/src/javascripts/domains/app/utils.js +1 -1
- package/src/javascripts/domains/config/hooks.js +1 -1
- package/src/javascripts/domains/config/reducer.js +3 -3
- package/src/javascripts/domains/config/selectors.js +1 -1
- package/src/javascripts/domains/config/utils.js +1 -1
- package/src/javascripts/domains/errors/index.js +2 -2
- package/src/javascripts/domains/forms/hooks.js +1 -1
- package/src/javascripts/domains/forms/provider.js +5 -3
- package/src/javascripts/domains/forms/reducer.js +1 -1
- package/src/javascripts/domains/forms/selectors.js +1 -1
- package/src/javascripts/domains/forms/utils.js +1 -1
- package/src/javascripts/domains/i18n/actions.js +1 -1
- package/src/javascripts/domains/i18n/hooks.js +1 -1
- package/src/javascripts/domains/i18n/reducer.js +1 -1
- package/src/javascripts/domains/i18n/utils.js +1 -1
- package/src/javascripts/domains/interrupt/hooks.js +2 -2
- package/src/javascripts/domains/interrupt/middleware.js +6 -6
- package/src/javascripts/domains/interrupt/reducer.js +1 -1
- package/src/javascripts/domains/interrupt/utils.js +1 -1
- package/src/javascripts/domains/options/middleware.js +1 -1
- package/src/javascripts/domains/store/index.js +10 -10
- package/src/javascripts/domains/store/state-reducer.js +3 -3
- package/src/javascripts/domains/translations/components/chat-status.js +8 -5
- package/src/javascripts/domains/translations/components/options-button.js +6 -6
- package/src/javascripts/domains/translations/components/options-dialog/form.js +5 -5
- package/src/javascripts/domains/translations/components/options-dialog/index.js +10 -7
- package/src/javascripts/domains/translations/hooks.js +7 -3
- package/src/javascripts/domains/translations/middleware.js +5 -2
- package/src/javascripts/domains/translations/reducer.js +4 -4
- package/src/javascripts/domains/translations/selectors.js +1 -1
- package/src/javascripts/domains/translations/utils.js +1 -1
- package/src/javascripts/domains/visibility/actions.js +3 -3
- package/src/javascripts/domains/visibility/hooks.js +1 -1
- package/src/javascripts/domains/visibility/utils.js +1 -1
- package/src/javascripts/lib/css.js +1 -1
- package/src/javascripts/lib/engine/index.js +6 -5
- package/src/javascripts/lib/external-api/index.js +1 -1
- package/src/javascripts/lib/redux-helpers/index.js +1 -1
- package/src/javascripts/style-guide/components/app.js +1 -1
- package/src/javascripts/style-guide/components/links.js +1 -1
- package/src/javascripts/style-guide/components/static-core.js +8 -11
- package/src/javascripts/ui/components/app-options/index.js +4 -4
- package/src/javascripts/ui/components/chat-status/index.js +2 -2
- package/src/javascripts/ui/components/conversation/component-filter.js +1 -1
- package/src/javascripts/ui/components/conversation/conversation.js +6 -6
- package/src/javascripts/ui/components/conversation/event/card-component.js +4 -4
- package/src/javascripts/ui/components/conversation/event/card-message.js +3 -3
- package/src/javascripts/ui/components/conversation/event/carousel-component/components/controls.js +3 -3
- package/src/javascripts/ui/components/conversation/event/carousel-component/components/pagination.js +1 -1
- package/src/javascripts/ui/components/conversation/event/carousel-component/index.js +3 -3
- package/src/javascripts/ui/components/conversation/event/carousel-message/components/slide.js +3 -3
- package/src/javascripts/ui/components/conversation/event/carousel-message/index.js +3 -3
- package/src/javascripts/ui/components/conversation/event/choice-prompt.js +7 -7
- package/src/javascripts/ui/components/conversation/event/cta.js +6 -6
- package/src/javascripts/ui/components/conversation/event/divider/index.js +1 -1
- package/src/javascripts/ui/components/conversation/event/divider/variants/default.js +3 -3
- package/src/javascripts/ui/components/conversation/event/divider/variants/new-translation.js +4 -4
- package/src/javascripts/ui/components/conversation/event/divider/variants/time-indicator.js +5 -5
- package/src/javascripts/ui/components/conversation/event/event-participant.js +4 -4
- package/src/javascripts/ui/components/conversation/event/event.js +2 -2
- package/src/javascripts/ui/components/conversation/event/hooks/use-event-link-click-handler.js +2 -2
- package/src/javascripts/ui/components/conversation/event/hooks/use-formatted-date.js +3 -3
- package/src/javascripts/ui/components/conversation/event/image-lightbox.js +4 -4
- package/src/javascripts/ui/components/conversation/event/image.js +2 -2
- package/src/javascripts/ui/components/conversation/event/participant.js +4 -4
- package/src/javascripts/ui/components/conversation/event/text.js +3 -3
- package/src/javascripts/ui/components/conversation/event/translation.js +3 -3
- package/src/javascripts/ui/components/conversation/event/upload.js +5 -5
- package/src/javascripts/ui/components/conversation/event/video.js +4 -4
- package/src/javascripts/ui/components/conversation/event-divider.js +2 -2
- package/src/javascripts/ui/components/conversation/loader.js +2 -2
- package/src/javascripts/ui/components/conversation/message-container.js +4 -4
- package/src/javascripts/ui/components/core/seamly-activity-monitor.js +4 -4
- package/src/javascripts/ui/components/core/seamly-core.js +2 -2
- package/src/javascripts/ui/components/core/seamly-event-subscriber.js +8 -8
- package/src/javascripts/ui/components/core/seamly-file-upload.js +5 -5
- package/src/javascripts/ui/components/core/seamly-idle-detach-counter.js +2 -2
- package/src/javascripts/ui/components/core/seamly-initializer.js +2 -2
- package/src/javascripts/ui/components/core/seamly-instance-functions-loader.js +5 -5
- package/src/javascripts/ui/components/core/seamly-live-region.js +2 -2
- package/src/javascripts/ui/components/core/seamly-new-notifications.js +5 -5
- package/src/javascripts/ui/components/core/seamly-read-state.js +6 -6
- package/src/javascripts/ui/components/entry/deprecated-toggle-button.js +5 -5
- package/src/javascripts/ui/components/entry/entry-container.js +8 -8
- package/src/javascripts/ui/components/entry/text-entry/hooks.js +6 -9
- package/src/javascripts/ui/components/entry/text-entry/index.js +2 -2
- package/src/javascripts/ui/components/entry/text-entry/text-entry-form.js +8 -8
- package/src/javascripts/ui/components/entry/upload/file-upload-form.js +5 -5
- package/src/javascripts/ui/components/entry/upload/index.js +10 -10
- package/src/javascripts/ui/components/entry/upload-toggle.js +9 -9
- package/src/javascripts/ui/components/faq/faq.js +16 -16
- package/src/javascripts/ui/components/form-controls/error.js +2 -2
- package/src/javascripts/ui/components/form-controls/file-input.js +4 -4
- package/src/javascripts/ui/components/form-controls/form.js +2 -2
- package/src/javascripts/ui/components/form-controls/input.js +1 -1
- package/src/javascripts/ui/components/form-controls/select.js +1 -1
- package/src/javascripts/ui/components/form-controls/wrapper.js +1 -1
- package/src/javascripts/ui/components/layout/agent-info.js +7 -7
- package/src/javascripts/ui/components/layout/chat-frame.js +5 -5
- package/src/javascripts/ui/components/layout/deprecated-app-frame.js +7 -7
- package/src/javascripts/ui/components/layout/header.js +3 -3
- package/src/javascripts/ui/components/layout/icon.js +1 -1
- package/src/javascripts/ui/components/layout/interrupt.js +3 -3
- package/src/javascripts/ui/components/layout/privacy-disclaimer.js +3 -3
- package/src/javascripts/ui/components/options/options-button.js +8 -13
- package/src/javascripts/ui/components/options/options-frame.js +4 -4
- package/src/javascripts/ui/components/options/options.js +1 -1
- package/src/javascripts/ui/components/options/transcript/index.js +8 -8
- package/src/javascripts/ui/components/options/transcript/transcript-form.js +4 -4
- package/src/javascripts/ui/components/warnings/idle-detach-warning.js +6 -6
- package/src/javascripts/ui/components/warnings/prompt.js +2 -2
- package/src/javascripts/ui/components/warnings/resume-conversation-prompt.js +5 -5
- package/src/javascripts/ui/components/widgets/in-out-transition.js +3 -3
- package/src/javascripts/ui/components/widgets/lightbox.js +6 -6
- package/src/javascripts/ui/components/widgets/modal.js +2 -2
- package/src/javascripts/ui/components/widgets/upload-progress.js +4 -4
- package/src/javascripts/ui/hooks/component-helper-hooks.js +1 -1
- package/src/javascripts/ui/hooks/file-upload-hooks.js +2 -3
- package/src/javascripts/ui/hooks/focus-helper-hooks.js +3 -3
- package/src/javascripts/ui/hooks/live-region-hooks.js +2 -2
- package/src/javascripts/ui/hooks/seamly-api-hooks.js +1 -1
- package/src/javascripts/ui/hooks/seamly-entry-hooks.js +2 -2
- package/src/javascripts/ui/hooks/seamly-option-hooks.js +2 -2
- package/src/javascripts/ui/hooks/seamly-state-hooks.js +5 -5
- package/src/javascripts/ui/hooks/use-event-component-mapping.js +2 -2
- package/src/javascripts/ui/hooks/use-seamly-activity-event-handler.js +1 -1
- package/src/javascripts/ui/hooks/use-seamly-chat.js +3 -3
- package/src/javascripts/ui/hooks/use-seamly-commands.js +12 -12
- package/src/javascripts/ui/hooks/use-seamly-dispatch.js +1 -1
- package/src/javascripts/ui/hooks/use-seamly-idle-detach-countdown.js +9 -9
- package/src/javascripts/ui/hooks/use-seamly-resume-conversation-prompt.js +2 -2
- package/src/javascripts/ui/hooks/use-single-file-upload.js +2 -2
- package/src/javascripts/ui/hooks/utility-hooks.js +1 -1
- package/src/stylesheets/4-base/_formelements.scss +3 -3
- package/src/stylesheets/5-components/_buttons.scss +1 -1
- package/src/stylesheets/5-components/_input.scss +2 -2
- package/src/stylesheets/6-default-implementation/_hover.scss +5 -5
- package/src/stylesheets/7-deprecated/4-base/_formelements.scss +4 -4
- package/src/stylesheets/7-deprecated/5-components/_buttons.scss +1 -1
- package/src/stylesheets/7-deprecated/5-components/_input.scss +1 -1
- package/src/stylesheets/7-deprecated/5-components/_options.scss +2 -2
- package/webpack/config.common.js +5 -0
- package/webpack/config.package.js +3 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useEffect } from 'preact/hooks'
|
|
2
|
-
import { className } from '
|
|
2
|
+
import { className } from 'lib/css'
|
|
3
3
|
import {
|
|
4
4
|
useSeamlyCommands,
|
|
5
5
|
useLiveRegion,
|
|
6
6
|
useGeneratedId,
|
|
7
7
|
useSkiplinkTargetFocusing,
|
|
8
|
-
} from '
|
|
9
|
-
import SeamlySessionExpiredError from '
|
|
8
|
+
} from 'ui/hooks/seamly-hooks'
|
|
9
|
+
import SeamlySessionExpiredError from 'api/errors/seamly-session-expired-error'
|
|
10
10
|
|
|
11
11
|
const Interrupt = ({
|
|
12
12
|
originalError,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { className } from '
|
|
2
|
-
import { useI18n } from '
|
|
3
|
-
import { useConfig } from '
|
|
1
|
+
import { className } from 'lib/css'
|
|
2
|
+
import { useI18n } from 'domains/i18n'
|
|
3
|
+
import { useConfig } from 'domains/config'
|
|
4
4
|
|
|
5
5
|
const PrivacyDisclaimer = () => {
|
|
6
6
|
const { t } = useI18n()
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createRef } from 'preact'
|
|
2
2
|
import { useState, useRef, useEffect, useMemo } from 'preact/hooks'
|
|
3
|
-
import { className } from '
|
|
4
|
-
import { useSeamlyOptions, useOptionButton } from '
|
|
5
|
-
import { useI18n } from '
|
|
6
|
-
import Icon from '
|
|
7
|
-
import Options from './options'
|
|
3
|
+
import { className } from 'lib/css'
|
|
4
|
+
import { useSeamlyOptions, useOptionButton } from 'ui/hooks/seamly-hooks'
|
|
5
|
+
import { useI18n } from 'domains/i18n'
|
|
6
|
+
import Icon from 'ui/components/layout/icon'
|
|
8
7
|
import InOutTransition, {
|
|
9
8
|
transitionStartStates,
|
|
10
|
-
} from '
|
|
11
|
-
import { getKey, keyNames, focusElement } from '
|
|
9
|
+
} from 'ui/components/widgets/in-out-transition'
|
|
10
|
+
import { getKey, keyNames, focusElement } from 'ui/utils/general-utils'
|
|
11
|
+
import Options from './options'
|
|
12
12
|
|
|
13
13
|
const OptionsButton = () => {
|
|
14
14
|
const { t } = useI18n()
|
|
@@ -193,11 +193,7 @@ const OptionsButton = () => {
|
|
|
193
193
|
ref={(item) => {
|
|
194
194
|
menuItemButtons.current[i] = item
|
|
195
195
|
}}
|
|
196
|
-
className={className([
|
|
197
|
-
'button',
|
|
198
|
-
'button--secondary',
|
|
199
|
-
...(available ? [] : ['button--disabled']),
|
|
200
|
-
])}
|
|
196
|
+
className={className(['button', 'button--secondary'])}
|
|
201
197
|
onKeyDown={(e) => onMenuItemKeyDownHandler(e, i)}
|
|
202
198
|
onKeyPress={(e) => onKeyPressHandler(e, i)}
|
|
203
199
|
onClick={() => onMenuItemClickHandler(name, available)}
|
|
@@ -227,7 +223,6 @@ const OptionsButton = () => {
|
|
|
227
223
|
...(!multiMenu && firstOptionName
|
|
228
224
|
? [`chat__options__button--${firstOptionName}`]
|
|
229
225
|
: []),
|
|
230
|
-
...(!multiMenu && !firstOption.available ? ['button--disabled'] : []),
|
|
231
226
|
])}
|
|
232
227
|
id={id}
|
|
233
228
|
onClick={onClickHandler}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useRef, useEffect } from 'preact/hooks'
|
|
2
|
-
import Icon from '
|
|
2
|
+
import Icon from 'ui/components/layout/icon'
|
|
3
3
|
import {
|
|
4
4
|
useGeneratedId,
|
|
5
5
|
useOptionButton,
|
|
6
6
|
useSeamlyOptions,
|
|
7
|
-
} from '
|
|
8
|
-
import { className } from '
|
|
9
|
-
import { focusElement } from '
|
|
7
|
+
} from 'ui/hooks/seamly-hooks'
|
|
8
|
+
import { className } from 'lib/css'
|
|
9
|
+
import { focusElement } from 'ui/utils/general-utils'
|
|
10
10
|
|
|
11
11
|
const OptionsFrame = ({
|
|
12
12
|
className: givenClassName,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState } from 'preact/hooks'
|
|
2
|
-
import { useI18n } from '
|
|
3
|
-
import OptionsFrame from '
|
|
4
|
-
import { className } from '
|
|
2
|
+
import { useI18n } from 'domains/i18n'
|
|
3
|
+
import OptionsFrame from 'ui/components/options/options-frame'
|
|
4
|
+
import { className } from 'lib/css'
|
|
5
5
|
import {
|
|
6
6
|
useGeneratedId,
|
|
7
7
|
useOptionButton,
|
|
8
8
|
useSeamlyCommands,
|
|
9
9
|
useSeamlyOptions,
|
|
10
|
-
} from '
|
|
11
|
-
import { actionTypes } from '
|
|
12
|
-
import { FormProvider } from '
|
|
10
|
+
} from 'ui/hooks/seamly-hooks'
|
|
11
|
+
import { actionTypes } from 'ui/utils/seamly-utils'
|
|
12
|
+
import { FormProvider } from 'domains/forms'
|
|
13
|
+
import { getValidator } from 'ui/utils/form-utils'
|
|
14
|
+
import { isEmailString, isNotEmptyString } from 'ui/utils/validations'
|
|
13
15
|
import TranscriptForm from './transcript-form'
|
|
14
|
-
import { getValidator } from '../../../utils/form-utils'
|
|
15
|
-
import { isEmailString, isNotEmptyString } from '../../../utils/validations'
|
|
16
16
|
|
|
17
17
|
const formId = 'sendTranscript'
|
|
18
18
|
const controlName = 'email'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { className } from '
|
|
2
|
-
import { useI18n } from '
|
|
3
|
-
import Form from '
|
|
4
|
-
import Input from '
|
|
1
|
+
import { className } from 'lib/css'
|
|
2
|
+
import { useI18n } from 'domains/i18n'
|
|
3
|
+
import Form from 'ui/components/form-controls/form'
|
|
4
|
+
import Input from 'ui/components/form-controls/input'
|
|
5
5
|
|
|
6
6
|
export default function TranscriptForm({ controlName, describedById }) {
|
|
7
7
|
const { t } = useI18n()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { className } from '
|
|
2
|
-
import { useI18n } from '
|
|
3
|
-
import useSeamlyIdleDetachCountdown from '
|
|
4
|
-
import { useSkiplinkTargetFocusing } from '
|
|
5
|
-
import useSeamlyActivityEventHandler from '
|
|
6
|
-
import useSeamlyCommands from '
|
|
1
|
+
import { className } from 'lib/css'
|
|
2
|
+
import { useI18n } from 'domains/i18n'
|
|
3
|
+
import useSeamlyIdleDetachCountdown from 'ui/hooks/use-seamly-idle-detach-countdown'
|
|
4
|
+
import { useSkiplinkTargetFocusing } from 'ui/hooks/focus-helper-hooks'
|
|
5
|
+
import useSeamlyActivityEventHandler from 'ui/hooks/use-seamly-activity-event-handler'
|
|
6
|
+
import useSeamlyCommands from 'ui/hooks/use-seamly-commands'
|
|
7
7
|
import Prompt from './prompt'
|
|
8
8
|
|
|
9
9
|
const IdleDetachWarning = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { className } from '
|
|
2
|
-
import { useSkiplink, useGeneratedId } from '
|
|
1
|
+
import { className } from 'lib/css'
|
|
2
|
+
import { useSkiplink, useGeneratedId } from 'ui/hooks/seamly-hooks'
|
|
3
3
|
|
|
4
4
|
const Prompt = ({ baseClassName, children, title }) => {
|
|
5
5
|
const skiplinkTargetId = useSkiplink()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { className } from '
|
|
2
|
-
import { useI18n } from '
|
|
1
|
+
import { className } from 'lib/css'
|
|
2
|
+
import { useI18n } from 'domains/i18n'
|
|
3
|
+
import useSeamlyResumeConversationPrompt from 'ui/hooks/use-seamly-resume-conversation-prompt'
|
|
4
|
+
import useSeamlyActivityEventHandler from 'ui/hooks/use-seamly-activity-event-handler'
|
|
5
|
+
import { useSeamlyCurrentAgent } from 'ui/hooks/seamly-state-hooks'
|
|
3
6
|
import Prompt from './prompt'
|
|
4
|
-
import useSeamlyResumeConversationPrompt from '../../hooks/use-seamly-resume-conversation-prompt'
|
|
5
|
-
import useSeamlyActivityEventHandler from '../../hooks/use-seamly-activity-event-handler'
|
|
6
|
-
import { useSeamlyCurrentAgent } from '../../hooks/seamly-state-hooks'
|
|
7
7
|
|
|
8
8
|
const ResumeConversationPrompt = () => {
|
|
9
9
|
const { t } = useI18n()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { toChildArray, cloneElement } from 'preact'
|
|
2
2
|
import { useRef, useState, useEffect } from 'preact/hooks'
|
|
3
|
-
import { useStableCallback } from '
|
|
4
|
-
import { className } from '
|
|
5
|
-
import { defaultTransitionTimeMs } from '
|
|
3
|
+
import { useStableCallback } from 'ui/hooks/seamly-hooks'
|
|
4
|
+
import { className } from 'lib/css'
|
|
5
|
+
import { defaultTransitionTimeMs } from 'config'
|
|
6
6
|
|
|
7
7
|
const transitionClasses = {
|
|
8
8
|
visible: className('transition--visible'),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useRef } from 'preact/hooks'
|
|
2
|
-
import
|
|
3
|
-
import { useI18n } from '../../../domains/i18n'
|
|
2
|
+
import { useI18n } from 'domains/i18n'
|
|
4
3
|
import {
|
|
5
4
|
useSeamlyActivityEventHandler,
|
|
6
5
|
useSeamlyAppContainerClassNames,
|
|
7
|
-
} from '
|
|
8
|
-
import { className } from '
|
|
9
|
-
import Icon from '
|
|
10
|
-
import { useConfig } from '
|
|
6
|
+
} from 'ui/hooks/seamly-hooks'
|
|
7
|
+
import { className } from 'lib/css'
|
|
8
|
+
import Icon from 'ui/components/layout/icon'
|
|
9
|
+
import { useConfig } from 'domains/config'
|
|
10
|
+
import Modal from './modal'
|
|
11
11
|
|
|
12
12
|
const Lightbox = ({ url, description, onClose: onCloseHandler }) => {
|
|
13
13
|
const { zIndex, layoutMode, namespace } = useConfig()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { render, toChildArray } from 'preact'
|
|
2
2
|
import { createFocusTrap } from 'focus-trap'
|
|
3
3
|
import { useLayoutEffect, useEffect, useRef, useState } from 'preact/hooks'
|
|
4
|
-
import { createAriaHider } from '
|
|
5
|
-
import { useGeneratedId } from '
|
|
4
|
+
import { createAriaHider } from 'ui/utils/general-utils'
|
|
5
|
+
import { useGeneratedId } from 'ui/hooks/seamly-hooks'
|
|
6
6
|
|
|
7
7
|
const Modal = ({
|
|
8
8
|
children,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { className } from '
|
|
2
|
-
import { useFileUploads } from '
|
|
3
|
-
import { useI18n } from '
|
|
4
|
-
import Error from '
|
|
1
|
+
import { className } from 'lib/css'
|
|
2
|
+
import { useFileUploads } from 'ui/hooks/seamly-hooks'
|
|
3
|
+
import { useI18n } from 'domains/i18n'
|
|
4
|
+
import Error from 'ui/components/form-controls/error'
|
|
5
5
|
|
|
6
6
|
const UploadProgress = () => {
|
|
7
7
|
const { t } = useI18n()
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { useCallback, useContext } from 'preact/hooks'
|
|
2
|
+
import SeamlyFileUploadContext from 'ui/components/core/seamly-file-upload-context'
|
|
3
|
+
import { seamlyActions } from 'ui/utils/seamly-utils'
|
|
2
4
|
import { useSeamlyStateContext } from './seamly-state-hooks'
|
|
3
5
|
import useSeamlyDispatchContext from './use-seamly-dispatch'
|
|
4
|
-
import SeamlyFileUploadContext from '../components/core/seamly-file-upload-context'
|
|
5
|
-
|
|
6
|
-
import { seamlyActions } from '../utils/seamly-utils'
|
|
7
6
|
|
|
8
7
|
const { CLEAR_ALL_UPLOADS } = seamlyActions
|
|
9
8
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useCallback, useRef } from 'preact/hooks'
|
|
2
|
-
import { useSeamlyStateContext, useSkiplink } from './seamly-state-hooks'
|
|
3
2
|
import {
|
|
4
3
|
focusElement,
|
|
5
4
|
runIfElementContainsOrHasFocus,
|
|
6
|
-
} from '
|
|
5
|
+
} from 'ui/utils/general-utils'
|
|
6
|
+
import { seamlyActions } from 'ui/utils/seamly-utils'
|
|
7
|
+
import { useSeamlyStateContext, useSkiplink } from './seamly-state-hooks'
|
|
7
8
|
import useSeamlyDispatchContext from './use-seamly-dispatch'
|
|
8
|
-
import { seamlyActions } from '../utils/seamly-utils'
|
|
9
9
|
|
|
10
10
|
const { SET_SEAMLY_CONTAINER_ELEMENT } = seamlyActions
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback, useContext } from 'preact/hooks'
|
|
2
|
-
import { SeamlyLiveRegionContext } from '
|
|
3
|
-
import { ariaLiveLevels } from '
|
|
2
|
+
import { SeamlyLiveRegionContext } from 'ui/components/core/seamly-live-region-context'
|
|
3
|
+
import { ariaLiveLevels } from 'ui/utils/seamly-utils'
|
|
4
4
|
|
|
5
5
|
export const useSeamlyLiveRegionContext = () =>
|
|
6
6
|
useContext(SeamlyLiveRegionContext)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useRef, useCallback, useEffect } from 'preact/hooks'
|
|
2
|
-
import { seamlyActions, actionTypes } from '
|
|
2
|
+
import { seamlyActions, actionTypes } from 'ui/utils/seamly-utils'
|
|
3
|
+
import { typingTimeout } from 'config'
|
|
3
4
|
import { useSeamlyStateContext } from './seamly-state-hooks'
|
|
4
5
|
import useSeamlyDispatchContext from './use-seamly-dispatch'
|
|
5
6
|
import { useSeamlyOptions } from './seamly-option-hooks'
|
|
6
7
|
import useSeamlyCommands from './use-seamly-commands'
|
|
7
|
-
import { typingTimeout } from '../../config'
|
|
8
8
|
|
|
9
9
|
const {
|
|
10
10
|
SET_BLOCK_AUTO_ENTRY_SWITCH,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useCallback } from 'preact/hooks'
|
|
2
|
-
import { useI18n } from '
|
|
2
|
+
import { useI18n } from 'domains/i18n'
|
|
3
|
+
import { seamlyActions } from 'ui/utils/seamly-utils'
|
|
3
4
|
import { useSeamlyStateContext } from './seamly-state-hooks'
|
|
4
5
|
import useSeamlyDispatchContext from './use-seamly-dispatch'
|
|
5
6
|
import { useSeamlyObjectStore } from './seamly-api-hooks'
|
|
6
7
|
import { useElementFocusingById } from './focus-helper-hooks'
|
|
7
|
-
import { seamlyActions } from '../utils/seamly-utils'
|
|
8
8
|
|
|
9
9
|
const {
|
|
10
10
|
SET_USER_SELECTED_OPTION,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createSelector } from 'reselect'
|
|
2
|
-
import { useSelector } from '
|
|
3
|
-
import { microsecondsToMilliseconds } from '
|
|
4
|
-
import * as ConfigSelectors from '
|
|
5
|
-
import * as AppSelectors from '
|
|
6
|
-
import { useConfig } from '
|
|
2
|
+
import { useSelector } from 'domains/redux'
|
|
3
|
+
import { microsecondsToMilliseconds } from 'ui/utils/general-utils'
|
|
4
|
+
import * as ConfigSelectors from 'domains/config/selectors'
|
|
5
|
+
import * as AppSelectors from 'domains/app/selectors'
|
|
6
|
+
import { useConfig } from 'domains/config/hooks'
|
|
7
7
|
|
|
8
8
|
export const selectState = (state) => state.state
|
|
9
9
|
export const useSeamlyStateContext = () => useSelector(selectState)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext } from 'preact/hooks'
|
|
2
|
-
import ComponentContext from '
|
|
3
|
-
import { payloadTypes } from '
|
|
2
|
+
import ComponentContext from 'ui/components/conversation/component-context'
|
|
3
|
+
import { payloadTypes } from 'ui/utils/seamly-utils'
|
|
4
4
|
|
|
5
5
|
const useEventComponentMapping = (event) => {
|
|
6
6
|
const components = useContext(ComponentContext)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useContext } from 'preact/hooks'
|
|
2
|
-
import SeamlyActivityEventContext from '
|
|
2
|
+
import SeamlyActivityEventContext from 'ui/components/core/seamly-activity-event-context'
|
|
3
3
|
|
|
4
4
|
const useSeamlyActivityEventHandler = () =>
|
|
5
5
|
useContext(SeamlyActivityEventContext)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useEffect, useRef } from 'preact/hooks'
|
|
2
|
-
import { useI18n } from '
|
|
2
|
+
import { useI18n } from 'domains/i18n'
|
|
3
|
+
import { seamlyActions } from 'ui/utils/seamly-utils'
|
|
4
|
+
import { useVisibility, visibilityStates } from 'domains/visibility'
|
|
3
5
|
import useSeamlyDispatchContext from './use-seamly-dispatch'
|
|
4
6
|
import { useEvents } from './seamly-state-hooks'
|
|
5
7
|
import useSeamlyCommands from './use-seamly-commands'
|
|
6
8
|
import { useSeamlyHasConversation } from './seamly-api-hooks'
|
|
7
9
|
import { useLiveRegion } from './live-region-hooks'
|
|
8
|
-
import { seamlyActions } from '../utils/seamly-utils'
|
|
9
|
-
import { useVisibility, visibilityStates } from '../../domains/visibility'
|
|
10
10
|
import { useConfig } from '../../domains/config'
|
|
11
11
|
|
|
12
12
|
const { SET_IS_LOADING } = seamlyActions
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { useCallback, useContext } from 'preact/hooks'
|
|
2
|
+
import { SeamlyEventBusContext } from 'ui/components/core/seamly-api-context'
|
|
3
|
+
import { randomId } from 'lib/id'
|
|
4
|
+
import { userParticipantId } from 'config'
|
|
5
|
+
import { actionTypes, seamlyActions } from 'ui/utils/seamly-utils'
|
|
6
|
+
import { Actions as InterruptActions } from 'domains/interrupt'
|
|
7
|
+
import { useConfig } from 'domains/config'
|
|
8
|
+
import * as AppActions from 'domains/app/actions'
|
|
9
|
+
import { useUserHasResponded } from 'domains/app/hooks'
|
|
10
|
+
import { useVisibility } from 'domains/visibility'
|
|
11
|
+
import { useStableCallback } from './utility-hooks'
|
|
12
|
+
import useSeamlyDispatchContext from './use-seamly-dispatch'
|
|
13
|
+
import { useSeamlyUnreadCount } from './seamly-state-hooks'
|
|
2
14
|
import {
|
|
3
15
|
useSeamlyApiContext,
|
|
4
16
|
useSeamlyHasConversation,
|
|
5
17
|
} from './seamly-api-hooks'
|
|
6
|
-
import { useSeamlyUnreadCount } from './seamly-state-hooks'
|
|
7
|
-
import useSeamlyDispatchContext from './use-seamly-dispatch'
|
|
8
|
-
import { SeamlyEventBusContext } from '../components/core/seamly-api-context'
|
|
9
|
-
import { randomId } from '../../lib/id'
|
|
10
|
-
import { userParticipantId } from '../../config'
|
|
11
|
-
import { actionTypes, seamlyActions } from '../utils/seamly-utils'
|
|
12
|
-
import { useStableCallback } from './utility-hooks'
|
|
13
|
-
import { Actions as InterruptActions } from '../../domains/interrupt'
|
|
14
|
-
import { useConfig } from '../../domains/config'
|
|
15
|
-
import * as AppActions from '../../domains/app/actions'
|
|
16
|
-
import { useUserHasResponded } from '../../domains/app/hooks'
|
|
17
|
-
import { useVisibility } from '../../domains/visibility'
|
|
18
18
|
|
|
19
19
|
const { ADD_EVENT, SET_INITIAL_STATE } = seamlyActions
|
|
20
20
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { useCallback, useRef } from 'preact/hooks'
|
|
2
|
-
import
|
|
3
|
-
import { useSeamlyStateContext } from './seamly-state-hooks'
|
|
4
|
-
import useSeamlyCommands from './use-seamly-commands'
|
|
5
|
-
import { useI18n } from '../../domains/i18n'
|
|
6
|
-
import { useLiveRegion } from './live-region-hooks'
|
|
2
|
+
import { useI18n } from 'domains/i18n'
|
|
7
3
|
import {
|
|
8
4
|
getTimeFromSeconds,
|
|
9
5
|
millisecondsToSeconds,
|
|
10
|
-
} from '
|
|
11
|
-
import { actionTypes, seamlyActions } from '
|
|
12
|
-
import { screenReaderDebounceDelaySeconds } from '
|
|
13
|
-
import { useVisibility } from '
|
|
6
|
+
} from 'ui/utils/general-utils'
|
|
7
|
+
import { actionTypes, seamlyActions } from 'ui/utils/seamly-utils'
|
|
8
|
+
import { screenReaderDebounceDelaySeconds } from 'config'
|
|
9
|
+
import { useVisibility } from 'domains/visibility'
|
|
10
|
+
import { useLiveRegion } from './live-region-hooks'
|
|
11
|
+
import useSeamlyCommands from './use-seamly-commands'
|
|
12
|
+
import { useSeamlyStateContext } from './seamly-state-hooks'
|
|
13
|
+
import useSeamlyDispatchContext from './use-seamly-dispatch'
|
|
14
14
|
|
|
15
15
|
const {
|
|
16
16
|
CLEAR_IDLE_DETACH_COUNTDOWN,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { useI18n } from 'domains/i18n'
|
|
2
|
+
import { actionTypes, dismissTypes, seamlyActions } from 'ui/utils/seamly-utils'
|
|
1
3
|
import useSeamlyDispatchContext from './use-seamly-dispatch'
|
|
2
4
|
import { useSeamlyStateContext } from './seamly-state-hooks'
|
|
3
5
|
import useSeamlyCommands from './use-seamly-commands'
|
|
4
|
-
import { useI18n } from '../../domains/i18n'
|
|
5
6
|
import { useLiveRegion } from './live-region-hooks'
|
|
6
|
-
import { actionTypes, dismissTypes, seamlyActions } from '../utils/seamly-utils'
|
|
7
7
|
|
|
8
8
|
const { CLEAR_RESUME_CONVERSATION_PROMPT } = seamlyActions
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Selectors } from 'domains/forms'
|
|
2
|
+
import { useSelectorWithProps } from 'domains/redux'
|
|
1
3
|
import { useFileUploads } from './seamly-hooks'
|
|
2
|
-
import { useSelectorWithProps } from '../../domains/redux'
|
|
3
|
-
import { Selectors } from '../../domains/forms'
|
|
4
4
|
|
|
5
5
|
const useSingleFileUpload = (formId, name) => {
|
|
6
6
|
const fileList = useSelectorWithProps(
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
.#{$n}-input__checkbox {
|
|
7
7
|
margin-right: $spacer * 0.5;
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
&[aria-disabled='true'] {
|
|
10
10
|
opacity: 0.5;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
font-weight: $fontweight-bold;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.#{$n}-input__checkbox
|
|
22
|
+
.#{$n}-input__checkbox[aria-disabled='true'] + .#{$n}-label {
|
|
23
23
|
opacity: 0.5;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
font-size: $fontsize-default;
|
|
40
40
|
resize: none;
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
&[aria-disabled='true'] {
|
|
43
43
|
border: $thin-border solid $grey-c;
|
|
44
44
|
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTYgMTYiPjxkZWZzLz48cGF0aCBmaWxsPSIjYTNiNGJmIiBkPSJNMi45OTgsNi41MDNjMC0wLjI0NywwLjA5MS0wLjQ5NCwwLjI3My0wLjY4N2MwLjM4LTAuNDAxLDEuMDEzLTAuNDE5LDEuNDE0LTAuMDRsMi41ODUsMi40NDYJYzAuMzk0LDAuMzczLDEuMDYsMC4zNzMsMS40NTQsMGwyLjU4Ni0yLjQ0NmMwLjQtMC4zNzksMS4wMzMtMC4zNjIsMS40MTMsMC4wNGMwLjM3OSwwLjQsMC4zNjIsMS4wMzQtMC4wMzksMS40MTRsLTIuNTg2LDIuNDQ2CWMtMS4xNTksMS4wOTYtMy4wNDMsMS4wOTYtNC4yMDMsMEwzLjMxLDcuMjI5QzMuMTAyLDcuMDMzLDIuOTk4LDYuNzY4LDIuOTk4LDYuNTAzeiIvPjwvc3ZnPg==');
|
|
45
45
|
color: $grey-c;
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
padding: 0;
|
|
58
58
|
border-radius: $borderradius-small;
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
&[aria-disabled='true'] {
|
|
61
61
|
cursor: auto;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -67,6 +67,6 @@
|
|
|
67
67
|
fill: $interaction;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.#{$n}-input__submit
|
|
70
|
+
.#{$n}-input__submit[aria-disabled='true'] .#{$n}-icon path {
|
|
71
71
|
fill: $grey-c;
|
|
72
72
|
}
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
transition: color $transition, background-color $transition;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.#{$n}-button--primary:not(
|
|
25
|
+
.#{$n}-button--primary:not([aria-disabled='true']) {
|
|
26
26
|
&:hover {
|
|
27
27
|
background-color: $interaction-dark;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.#{$n}-button--secondary:not(
|
|
32
|
-
.#{$n}-button--tertiary:not(
|
|
31
|
+
.#{$n}-button--secondary:not([aria-disabled='true']),
|
|
32
|
+
.#{$n}-button--tertiary:not([aria-disabled='true']) {
|
|
33
33
|
&:hover {
|
|
34
34
|
color: $interaction-dark;
|
|
35
35
|
}
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
.#{$n}-input__submit:not(
|
|
92
|
+
.#{$n}-input__submit:not([aria-disabled='true']):hover .#{$n}-icon path {
|
|
93
93
|
fill: $interaction-dark;
|
|
94
94
|
}
|
|
95
95
|
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
.#{$n}-options__menu__item:not(
|
|
140
|
+
.#{$n}-options__menu__item:not([aria-disabled='true']) {
|
|
141
141
|
transition: color $transition;
|
|
142
142
|
|
|
143
143
|
&:hover {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
.#{$n}-input__checkbox {
|
|
7
7
|
margin-right: $spacer * 0.5;
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
&[aria-disabled='true'] {
|
|
10
10
|
opacity: 0.5;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
font-weight: $fontweight-bold;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.#{$n}-input__checkbox
|
|
22
|
+
.#{$n}-input__checkbox[aria-disabled='true'] + .#{$n}-label {
|
|
23
23
|
opacity: 0.5;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
border: $thin-border solid $brand3;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
&[aria-disabled='true'],
|
|
52
|
+
&[aria-disabled='true']:hover {
|
|
53
53
|
border: $thin-border solid $grey-c;
|
|
54
54
|
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTYgMTYiPjxkZWZzLz48cGF0aCBmaWxsPSIjYTNiNGJmIiBkPSJNMi45OTgsNi41MDNjMC0wLjI0NywwLjA5MS0wLjQ5NCwwLjI3My0wLjY4N2MwLjM4LTAuNDAxLDEuMDEzLTAuNDE5LDEuNDE0LTAuMDRsMi41ODUsMi40NDYJYzAuMzk0LDAuMzczLDEuMDYsMC4zNzMsMS40NTQsMGwyLjU4Ni0yLjQ0NmMwLjQtMC4zNzksMS4wMzMtMC4zNjIsMS40MTMsMC4wNGMwLjM3OSwwLjQsMC4zNjIsMS4wMzQtMC4wMzksMS40MTRsLTIuNTg2LDIuNDQ2CWMtMS4xNTksMS4wOTYtMy4wNDMsMS4wOTYtNC4yMDMsMEwzLjMxLDcuMjI5QzMuMTAyLDcuMDMzLDIuOTk4LDYuNzY4LDIuOTk4LDYuNTAzeiIvPjwvc3ZnPg==');
|
|
55
55
|
color: $grey-c;
|