@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 { useRef, useState } from 'preact/hooks'
|
|
2
|
-
import { className } from '
|
|
3
|
-
import { focusElement, getKey, keyNames } from '
|
|
4
|
-
import Icon from '
|
|
5
|
-
import { useGeneratedId } from '
|
|
6
|
-
import { useI18n } from '
|
|
2
|
+
import { className } from 'lib/css'
|
|
3
|
+
import { focusElement, getKey, keyNames } from 'ui/utils/general-utils'
|
|
4
|
+
import Icon from 'ui/components/layout/icon'
|
|
5
|
+
import { useGeneratedId } from 'ui/hooks/seamly-hooks'
|
|
6
|
+
import { useI18n } from 'domains/i18n'
|
|
7
7
|
import InOutTransition, {
|
|
8
8
|
transitionStartStates,
|
|
9
|
-
} from '
|
|
9
|
+
} from 'ui/components/widgets/in-out-transition'
|
|
10
10
|
import TranslationsOptionsDialog from './options-dialog'
|
|
11
11
|
|
|
12
12
|
export default function TranslationsOptionButton() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useMemo } from 'preact/hooks'
|
|
2
|
-
import Form from '
|
|
3
|
-
import { className } from '
|
|
4
|
-
import { useI18n } from '
|
|
5
|
-
import { useTranslations } from '
|
|
6
|
-
import Select from '
|
|
2
|
+
import Form from 'ui/components/form-controls/form'
|
|
3
|
+
import { className } from 'lib/css'
|
|
4
|
+
import { useI18n } from 'domains/i18n'
|
|
5
|
+
import { useTranslations } from 'domains/translations/hooks'
|
|
6
|
+
import Select from 'ui/components/form-controls/select'
|
|
7
7
|
|
|
8
8
|
function TranslationsOptionsDialogForm({ controlName, descriptionId }) {
|
|
9
9
|
const { t } = useI18n()
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { useCallback, useMemo, useRef, useState } from 'preact/hooks'
|
|
2
|
-
import OptionsFrame from '
|
|
3
|
-
import { FormProvider } from '
|
|
2
|
+
import OptionsFrame from 'ui/components/options/options-frame'
|
|
3
|
+
import { FormProvider } from 'domains/forms'
|
|
4
|
+
import { useGeneratedId } from 'ui/hooks/seamly-hooks'
|
|
5
|
+
import { getValidator } from 'ui/utils/form-utils'
|
|
6
|
+
import { isNotEmptyString } from 'ui/utils/validations'
|
|
7
|
+
import {
|
|
8
|
+
useTranslations,
|
|
9
|
+
useTranslationsContainer,
|
|
10
|
+
} from 'domains/translations/hooks'
|
|
11
|
+
import { useI18n } from 'domains/i18n'
|
|
4
12
|
import TranslationsOptionsDialogForm from './form'
|
|
5
|
-
import { useGeneratedId } from '../../../../ui/hooks/seamly-hooks'
|
|
6
|
-
import { getValidator } from '../../../../ui/utils/form-utils'
|
|
7
|
-
import { isNotEmptyString } from '../../../../ui/utils/validations'
|
|
8
|
-
import { useTranslations, useTranslationsContainer } from '../../hooks'
|
|
9
|
-
import { useI18n } from '../../../i18n'
|
|
10
13
|
|
|
11
14
|
export const formName = 'translation-settings'
|
|
12
15
|
export const inputName = 'locale'
|
|
@@ -2,9 +2,13 @@ import {
|
|
|
2
2
|
useElementFocusingById,
|
|
3
3
|
useSeamlyCommands,
|
|
4
4
|
useStableCallback,
|
|
5
|
-
} from '
|
|
6
|
-
import { actionTypes } from '
|
|
7
|
-
import {
|
|
5
|
+
} from 'ui/hooks/seamly-hooks'
|
|
6
|
+
import { actionTypes } from 'ui/utils/seamly-utils'
|
|
7
|
+
import {
|
|
8
|
+
useSelector,
|
|
9
|
+
useSelectorWithProps,
|
|
10
|
+
useStoreDispatch,
|
|
11
|
+
} from 'domains/redux'
|
|
8
12
|
import * as Selectors from './selectors'
|
|
9
13
|
import * as Actions from './actions'
|
|
10
14
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { seamlyActions } from 'ui/utils/seamly-utils'
|
|
2
|
+
import {
|
|
3
|
+
Actions as I18nActions,
|
|
4
|
+
Selectors as I18nSelectors,
|
|
5
|
+
} from 'domains/i18n'
|
|
1
6
|
import * as Actions from './actions'
|
|
2
|
-
import { seamlyActions } from '../../ui/utils/seamly-utils'
|
|
3
|
-
import { Actions as I18nActions, Selectors as I18nSelectors } from '../i18n'
|
|
4
7
|
|
|
5
8
|
export default function createMiddleware() {
|
|
6
9
|
return ({ dispatch, getState }) =>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { seamlyActions } from 'ui/utils/seamly-utils'
|
|
2
|
+
import { randomId } from 'lib/id'
|
|
3
|
+
import * as AppActions from 'domains/app/actions'
|
|
4
4
|
import * as Actions from './actions'
|
|
5
|
-
import
|
|
5
|
+
import { createReducer } from './utils'
|
|
6
6
|
|
|
7
7
|
const initialState = {
|
|
8
8
|
isActive: false,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as ConfigSelectors from '
|
|
2
|
-
import * as AppSelectors from '
|
|
1
|
+
import * as ConfigSelectors from 'domains/config/selectors'
|
|
2
|
+
import * as AppSelectors from 'domains/app/selectors'
|
|
3
3
|
|
|
4
|
+
import { selectState } from 'ui/hooks/seamly-state-hooks'
|
|
4
5
|
import { visibilityStates, StoreKey } from './constants'
|
|
5
6
|
import { createAction, createThunk, calculateVisibility } from './utils'
|
|
6
7
|
import * as Selectors from './selectors'
|
|
7
|
-
import { selectState } from '../../ui/hooks/seamly-state-hooks'
|
|
8
8
|
|
|
9
9
|
export const setFromStorage = createAction('setFromStorage', (visibility) => ({
|
|
10
10
|
visibility,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback } from 'preact/hooks'
|
|
2
|
-
import { useSelector, useStoreDispatch } from '
|
|
2
|
+
import { useSelector, useStoreDispatch } from 'domains/redux'
|
|
3
3
|
import * as Actions from './actions'
|
|
4
4
|
import * as Selectors from './selectors'
|
|
5
5
|
import { visibilityStates } from './constants'
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { render, h } from 'preact'
|
|
2
2
|
import Events from 'minivents'
|
|
3
|
-
import ChatApp from '
|
|
4
|
-
import SeamlyCore from '
|
|
5
|
-
import { API } from '
|
|
6
|
-
import { createStore } from '
|
|
7
|
-
import * as AppActions from '
|
|
3
|
+
import ChatApp from 'ui/components/chat-app'
|
|
4
|
+
import SeamlyCore from 'ui/components/core/seamly-core'
|
|
5
|
+
import { API } from 'api'
|
|
6
|
+
import { createStore } from 'domains/store'
|
|
7
|
+
import * as AppActions from 'domains/app/actions'
|
|
8
8
|
|
|
9
9
|
export default class Engine {
|
|
10
10
|
constructor(config, externalApi) {
|
|
@@ -20,6 +20,7 @@ export default class Engine {
|
|
|
20
20
|
this.externalApi = externalApi
|
|
21
21
|
|
|
22
22
|
this.api = new API({
|
|
23
|
+
layoutMode: config.layoutMode,
|
|
23
24
|
namespace: config.namespace,
|
|
24
25
|
config: config.api,
|
|
25
26
|
context: config.context,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCallback, useEffect, useState } from 'preact/hooks'
|
|
2
2
|
import { getUrlParams, getUrlSearchString, randomId } from '@seamly/web-ui'
|
|
3
|
+
import { getStateObj, getDeprecatedStateObj } from 'style-guide/states'
|
|
3
4
|
import StyleGuideView from './view'
|
|
4
5
|
import StyleGuideLinks from './links'
|
|
5
|
-
import { getStateObj, getDeprecatedStateObj } from '../states'
|
|
6
6
|
|
|
7
7
|
const StyleGuideApp = ({
|
|
8
8
|
config,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUrlSearchString, getUrlParams } from '@seamly/web-ui'
|
|
2
|
-
import { categories } from '
|
|
2
|
+
import { categories } from 'style-guide/states'
|
|
3
3
|
|
|
4
4
|
const StyleGuideLinks = ({ setSelectedState, states, headingLevel }) => {
|
|
5
5
|
const CategoryHeading = `h${headingLevel.toString()}`
|
|
@@ -9,20 +9,17 @@ import {
|
|
|
9
9
|
ComponentFilter,
|
|
10
10
|
createReduxStore,
|
|
11
11
|
} from '@seamly/web-ui'
|
|
12
|
-
import stateReducer from '
|
|
13
|
-
import { Reducer as formReducer } from '
|
|
14
|
-
import { Reducer as translationsReducer } from '
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} from '../../domains/i18n'
|
|
19
|
-
import { Reducer as interruptReducer } from '../../domains/interrupt'
|
|
20
|
-
import { Reducer as appReducer } from '../../domains/app'
|
|
12
|
+
import stateReducer from 'domains/store/state-reducer'
|
|
13
|
+
import { Reducer as formReducer } from 'domains/forms'
|
|
14
|
+
import { Reducer as translationsReducer } from 'domains/translations'
|
|
15
|
+
import { Reducer as i18nReducer, Actions as I18nActions } from 'domains/i18n'
|
|
16
|
+
import { Reducer as interruptReducer } from 'domains/interrupt'
|
|
17
|
+
import { Reducer as appReducer } from 'domains/app'
|
|
21
18
|
import {
|
|
22
19
|
Reducer as configReducer,
|
|
23
20
|
Actions as ConfigActions,
|
|
24
|
-
} from '
|
|
25
|
-
import { Reducer as visibilityReducer } from '
|
|
21
|
+
} from 'domains/config'
|
|
22
|
+
import { Reducer as visibilityReducer } from 'domains/visibility'
|
|
26
23
|
import { seamlyActions } from '../../ui/utils/seamly-utils'
|
|
27
24
|
|
|
28
25
|
const { SET_PARTICIPANT } = seamlyActions
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useSeamlyOptions } from '
|
|
2
|
-
import { className } from '
|
|
3
|
-
import OptionsButton from '
|
|
1
|
+
import { useSeamlyOptions } from 'ui/hooks/seamly-hooks'
|
|
2
|
+
import { className } from 'lib/css'
|
|
3
|
+
import OptionsButton from 'ui/components/options/options-button'
|
|
4
4
|
import {
|
|
5
5
|
useTranslations,
|
|
6
6
|
OptionsButton as TranslationsOptionsButton,
|
|
7
|
-
} from '
|
|
7
|
+
} from 'domains/translations'
|
|
8
8
|
|
|
9
9
|
export default function AppOptions() {
|
|
10
10
|
const { menuOptions, allowOptionSelection } = useSeamlyOptions()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo } from 'preact/hooks'
|
|
2
|
-
import { useConfig } from '
|
|
2
|
+
import { useConfig } from 'domains/config'
|
|
3
3
|
import ComponentContext from './component-context'
|
|
4
4
|
import ChoicePrompt from './event/choice-prompt'
|
|
5
5
|
import Text from './event/text'
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { useRef, useEffect } from 'preact/hooks'
|
|
2
|
-
import { className } from '
|
|
3
|
-
import { useI18n } from '
|
|
2
|
+
import { className } from 'lib/css'
|
|
3
|
+
import { useI18n } from 'domains/i18n'
|
|
4
4
|
import {
|
|
5
5
|
useSeamlyIsLoading,
|
|
6
6
|
useSkiplink,
|
|
7
7
|
useSkiplinkTargetFocusing,
|
|
8
|
-
} from '
|
|
9
|
-
import { useEvents } from '
|
|
8
|
+
} from 'ui/hooks/seamly-hooks'
|
|
9
|
+
import { useEvents } from 'ui/hooks/seamly-state-hooks'
|
|
10
|
+
import PrivacyDisclaimer from 'ui/components/layout/privacy-disclaimer'
|
|
11
|
+
import { useVisibility } from 'domains/visibility'
|
|
10
12
|
import Event from './event/event'
|
|
11
13
|
import Loader from './loader'
|
|
12
14
|
import ComponentFilter from './component-filter'
|
|
13
|
-
import PrivacyDisclaimer from '../layout/privacy-disclaimer'
|
|
14
|
-
import { useVisibility } from '../../../domains/visibility'
|
|
15
15
|
|
|
16
16
|
const Conversation = () => {
|
|
17
17
|
const { t } = useI18n()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo, useRef } from 'preact/hooks'
|
|
2
|
-
import { className } from '
|
|
3
|
-
import parseBody from '
|
|
4
|
-
import { useGeneratedId, useSeamlyCommands } from '
|
|
5
|
-
import { cardTypes, actionTypes } from '
|
|
2
|
+
import { className } from 'lib/css'
|
|
3
|
+
import parseBody from 'lib/parse-body'
|
|
4
|
+
import { useGeneratedId, useSeamlyCommands } from 'ui/hooks/seamly-hooks'
|
|
5
|
+
import { cardTypes, actionTypes } from 'ui/utils/seamly-utils'
|
|
6
6
|
|
|
7
7
|
const CardComponent = ({
|
|
8
8
|
id,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useGeneratedId } from '
|
|
2
|
-
import MessageContainer from '
|
|
3
|
-
import { useTranslatedEventData } from '
|
|
1
|
+
import { useGeneratedId } from 'ui/hooks/seamly-hooks'
|
|
2
|
+
import MessageContainer from 'ui/components/conversation/message-container'
|
|
3
|
+
import { useTranslatedEventData } from 'domains/translations'
|
|
4
4
|
import CardComponent from './card-component'
|
|
5
5
|
|
|
6
6
|
const CardMessage = ({ event }) => {
|
package/src/javascripts/ui/components/conversation/event/carousel-component/components/controls.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { className } from '
|
|
2
|
-
import { useI18n } from '
|
|
3
|
-
import Icon from '
|
|
1
|
+
import { className } from 'lib/css'
|
|
2
|
+
import { useI18n } from 'domains/i18n'
|
|
3
|
+
import Icon from 'ui/components/layout/icon'
|
|
4
4
|
|
|
5
5
|
export default function CarouselControls({
|
|
6
6
|
items,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRef } from 'preact'
|
|
2
2
|
import { useState, useEffect, useRef, useMemo } from 'preact/hooks'
|
|
3
|
-
import { className } from '
|
|
4
|
-
import { useGeneratedId } from '
|
|
3
|
+
import { className } from 'lib/css'
|
|
4
|
+
import { useGeneratedId } from 'ui/hooks/utility-hooks'
|
|
5
|
+
import CarouselMessageSlide from 'ui/components/conversation/event/carousel-message/components/slide'
|
|
5
6
|
import CarouselPagination from './components/pagination'
|
|
6
7
|
import CarouselControls from './components/controls'
|
|
7
|
-
import CarouselMessageSlide from '../carousel-message/components/slide'
|
|
8
8
|
|
|
9
9
|
const defaultGetItemKey = (item, idx, prefix) => `${prefix}${idx}`
|
|
10
10
|
const defaultGetItemLabel = (item) => item.label
|
package/src/javascripts/ui/components/conversation/event/carousel-message/components/slide.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { className } from '
|
|
2
|
-
import { useI18n } from '
|
|
3
|
-
import CardComponent from '
|
|
1
|
+
import { className } from 'lib/css'
|
|
2
|
+
import { useI18n } from 'domains/i18n'
|
|
3
|
+
import CardComponent from 'ui/components/conversation/event/card-component'
|
|
4
4
|
|
|
5
5
|
export default function CarouselMessageSlide({
|
|
6
6
|
item: slide,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import MessageContainer from '
|
|
2
|
-
import CarouselComponent from '
|
|
3
|
-
import { useTranslatedEventData } from '
|
|
1
|
+
import MessageContainer from 'ui/components/conversation/message-container'
|
|
2
|
+
import CarouselComponent from 'ui/components/conversation/event/carousel-component'
|
|
3
|
+
import { useTranslatedEventData } from 'domains/translations'
|
|
4
4
|
import CarouselMessageSlide from './components/slide'
|
|
5
5
|
|
|
6
6
|
const getItemKey = (item, idx, prefix = '') => `${prefix}${item.title}:${idx}`
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
useSeamlyServiceInfo,
|
|
6
6
|
useLastMessageEventId,
|
|
7
7
|
useGeneratedId,
|
|
8
|
-
} from '
|
|
9
|
-
import { className } from '
|
|
10
|
-
import { actionTypes } from '
|
|
11
|
-
import Icon from '
|
|
12
|
-
import { useI18n } from '
|
|
13
|
-
import { useTranslatedEventData } from '
|
|
14
|
-
import MessageContainer from '
|
|
8
|
+
} from 'ui/hooks/seamly-hooks'
|
|
9
|
+
import { className } from 'lib/css'
|
|
10
|
+
import { actionTypes } from 'ui/utils/seamly-utils'
|
|
11
|
+
import Icon from 'ui/components/layout/icon'
|
|
12
|
+
import { useI18n } from 'domains/i18n'
|
|
13
|
+
import { useTranslatedEventData } from 'domains/translations'
|
|
14
|
+
import MessageContainer from 'ui/components/conversation/message-container'
|
|
15
15
|
|
|
16
16
|
export const useChoicePrompt = (event) => {
|
|
17
17
|
const { payload } = event
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useCallback } from 'preact/hooks'
|
|
2
|
-
import { className } from '
|
|
3
|
-
import parseBody from '
|
|
4
|
-
import { useGeneratedId, useSeamlyCommands } from '
|
|
2
|
+
import { className } from 'lib/css'
|
|
3
|
+
import parseBody from 'lib/parse-body'
|
|
4
|
+
import { useGeneratedId, useSeamlyCommands } from 'ui/hooks/seamly-hooks'
|
|
5
|
+
import { actionTypes } from 'ui/utils/seamly-utils'
|
|
6
|
+
import MessageContainer from 'ui/components/conversation/message-container'
|
|
7
|
+
import { useTranslatedEventData } from 'domains/translations'
|
|
5
8
|
import useEventLinkClickHandler from './hooks/use-event-link-click-handler'
|
|
6
|
-
import { actionTypes } from '../../../utils/seamly-utils'
|
|
7
|
-
import MessageContainer from '../message-container'
|
|
8
|
-
import { useTranslatedEventData } from '../../../../domains/translations'
|
|
9
9
|
|
|
10
10
|
const Cta = ({ event }) => {
|
|
11
11
|
const [body] = useTranslatedEventData(event)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { dividerKeys } from '
|
|
2
|
-
import { useI18n } from '
|
|
3
|
-
import EventDivider from '
|
|
1
|
+
import { dividerKeys } from 'ui/utils/seamly-utils'
|
|
2
|
+
import { useI18n } from 'domains/i18n'
|
|
3
|
+
import EventDivider from 'ui/components/conversation/event-divider'
|
|
4
4
|
|
|
5
5
|
const dividerTypes = {
|
|
6
6
|
[dividerKeys.new_topic]: 'newtopic',
|
package/src/javascripts/ui/components/conversation/event/divider/variants/new-translation.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useMemo } from 'preact/hooks'
|
|
2
|
-
import { useI18n } from '
|
|
3
|
-
import EventDivider from '
|
|
4
|
-
import { className } from '
|
|
5
|
-
import { useTranslations } from '
|
|
2
|
+
import { useI18n } from 'domains/i18n'
|
|
3
|
+
import EventDivider from 'ui/components/conversation/event-divider'
|
|
4
|
+
import { className } from 'lib/css'
|
|
5
|
+
import { useTranslations } from 'domains/translations'
|
|
6
6
|
|
|
7
7
|
const NewTranslationDivider = ({ event }) => {
|
|
8
8
|
const { t } = useI18n()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useEffect } from 'preact/hooks'
|
|
2
|
-
import EventDivider from '
|
|
3
|
-
import { className } from '
|
|
4
|
-
import { microsecondsToMilliseconds } from '
|
|
5
|
-
import { useFormattedDate } from '
|
|
6
|
-
import { useForceUpdate } from '
|
|
2
|
+
import EventDivider from 'ui/components/conversation/event-divider'
|
|
3
|
+
import { className } from 'lib/css'
|
|
4
|
+
import { microsecondsToMilliseconds } from 'ui/utils/general-utils'
|
|
5
|
+
import { useFormattedDate } from 'ui/components/conversation/event/hooks/use-formatted-date'
|
|
6
|
+
import { useForceUpdate } from 'ui/hooks/utility-hooks'
|
|
7
7
|
|
|
8
8
|
const TimeIndicator = ({ event }) => {
|
|
9
9
|
const forceUpdate = useForceUpdate()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useSeamlyParticipant } from '
|
|
2
|
-
import { className } from '
|
|
3
|
-
import { useConfig } from '
|
|
4
|
-
import { useI18n } from '
|
|
1
|
+
import { useSeamlyParticipant } from 'ui/hooks/seamly-hooks'
|
|
2
|
+
import { className } from 'lib/css'
|
|
3
|
+
import { useConfig } from 'domains/config'
|
|
4
|
+
import { useI18n } from 'domains/i18n'
|
|
5
5
|
|
|
6
6
|
const EventParticipant = ({ eventPayload }) => {
|
|
7
7
|
const { t } = useI18n()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { className } from '
|
|
2
|
-
import useEventComponentMapping from '
|
|
1
|
+
import { className } from 'lib/css'
|
|
2
|
+
import useEventComponentMapping from 'ui/hooks/use-event-component-mapping'
|
|
3
3
|
import TimeIndicator from './divider/variants/time-indicator'
|
|
4
4
|
|
|
5
5
|
const Event = ({ event, newParticipant }) => {
|
package/src/javascripts/ui/components/conversation/event/hooks/use-event-link-click-handler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { actionTypes } from '
|
|
2
|
-
import { useSeamlyCommands } from '
|
|
1
|
+
import { actionTypes } from 'ui/utils/seamly-utils'
|
|
2
|
+
import { useSeamlyCommands } from 'ui/hooks/seamly-hooks'
|
|
3
3
|
|
|
4
4
|
const useEventLinkClickHandler = (eventId) => {
|
|
5
5
|
const { sendAction } = useSeamlyCommands()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useI18n } from '
|
|
2
|
-
import { getRelativeDate } from '
|
|
3
|
-
import { useConfig } from '
|
|
1
|
+
import { useI18n } from 'domains/i18n'
|
|
2
|
+
import { getRelativeDate } from 'ui/utils/general-utils'
|
|
3
|
+
import { useConfig } from 'domains/config'
|
|
4
4
|
|
|
5
5
|
const dateFormatOptions = { month: 'long', day: 'numeric', year: 'numeric' }
|
|
6
6
|
const timeFormatOptions = { hour: 'numeric', minute: 'numeric' }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useState } from 'preact/hooks'
|
|
2
|
-
import Lightbox from '
|
|
3
|
-
import { useI18n } from '
|
|
4
|
-
import { className } from '
|
|
5
|
-
import Icon from '
|
|
2
|
+
import Lightbox from 'ui/components/widgets/lightbox'
|
|
3
|
+
import { useI18n } from 'domains/i18n'
|
|
4
|
+
import { className } from 'lib/css'
|
|
5
|
+
import Icon from 'ui/components/layout/icon'
|
|
6
6
|
|
|
7
7
|
const ImageLightbox = ({ description, url }) => {
|
|
8
8
|
const { t } = useI18n()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState } from 'preact/hooks'
|
|
2
|
+
import MessageContainer from 'ui/components/conversation/message-container'
|
|
3
|
+
import { useTranslatedEventData } from 'domains/translations'
|
|
2
4
|
import ImageLightbox from './image-lightbox'
|
|
3
|
-
import MessageContainer from '../message-container'
|
|
4
|
-
import { useTranslatedEventData } from '../../../../domains/translations'
|
|
5
5
|
|
|
6
6
|
const Image = ({ event, descriptorId, ...props }) => {
|
|
7
7
|
const [body] = useTranslatedEventData(event)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useMemo } from 'preact/hooks'
|
|
2
2
|
import Mustache from 'mustache'
|
|
3
|
-
import parseBody from '
|
|
4
|
-
import EventDivider from '
|
|
5
|
-
import { useTranslatedEventData } from '
|
|
6
|
-
import { useParticipants } from '
|
|
3
|
+
import parseBody from 'lib/parse-body'
|
|
4
|
+
import EventDivider from 'ui/components/conversation/event-divider'
|
|
5
|
+
import { useTranslatedEventData } from 'domains/translations'
|
|
6
|
+
import { useParticipants } from 'domains/config'
|
|
7
7
|
|
|
8
8
|
const Participant = ({ event }) => {
|
|
9
9
|
const { agent } = useParticipants()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useMemo } from 'preact/hooks'
|
|
2
|
-
import parseBody from '
|
|
2
|
+
import parseBody from 'lib/parse-body'
|
|
3
|
+
import MessageContainer from 'ui/components/conversation/message-container'
|
|
4
|
+
import { useTranslatedEventData } from 'domains/translations'
|
|
3
5
|
import useEventLinkClickHandler from './hooks/use-event-link-click-handler'
|
|
4
6
|
import { parseRichText } from './hooks/use-text-rendering'
|
|
5
|
-
import MessageContainer from '../message-container'
|
|
6
|
-
import { useTranslatedEventData } from '../../../../domains/translations'
|
|
7
7
|
|
|
8
8
|
const Text = ({ event, ...props }) => {
|
|
9
9
|
const [body] = useTranslatedEventData(event)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useI18n } from '
|
|
2
|
-
import MessageContainer from '
|
|
3
|
-
import { useTranslatedEventData } from '
|
|
1
|
+
import { useI18n } from 'domains/i18n'
|
|
2
|
+
import MessageContainer from 'ui/components/conversation/message-container'
|
|
3
|
+
import { useTranslatedEventData } from 'domains/translations'
|
|
4
4
|
|
|
5
5
|
const Translation = ({ event, ...props }) => {
|
|
6
6
|
const { t } = useI18n()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useMemo } from 'preact/hooks'
|
|
2
|
-
import { className } from '
|
|
3
|
-
import Icon from '
|
|
4
|
-
import { useI18n } from '
|
|
5
|
-
import MessageContainer from '
|
|
6
|
-
import { useTranslatedEventData } from '
|
|
2
|
+
import { className } from 'lib/css'
|
|
3
|
+
import Icon from 'ui/components/layout/icon'
|
|
4
|
+
import { useI18n } from 'domains/i18n'
|
|
5
|
+
import MessageContainer from 'ui/components/conversation/message-container'
|
|
6
|
+
import { useTranslatedEventData } from 'domains/translations'
|
|
7
7
|
|
|
8
8
|
const UploadContent = ({ children, url, target }) =>
|
|
9
9
|
url ? (
|