@seamly/web-ui 20.6.0 → 20.7.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 +22 -0
- package/build/dist/lib/index.debug.js +4 -4
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.js +22 -32
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/standalone.js +22 -33
- package/build/dist/lib/standalone.min.js +1 -1
- package/build/dist/lib/style-guide.js +6 -24
- package/build/dist/lib/style-guide.min.js +1 -1
- package/build/dist/lib/styles.css +1 -1
- package/package.json +1 -1
- package/src/javascripts/ui/components/suggestions/index.js +37 -26
- package/src/javascripts/ui/hooks/use-seamly-commands.js +0 -17
- package/src/javascripts/ui/utils/seamly-utils.js +2 -3
- package/src/stylesheets/5-components/_suggestions.scss +3 -3
package/build/dist/lib/index.js
CHANGED
|
@@ -9171,9 +9171,9 @@ const seamlyStateReducer = (state, action) => {
|
|
|
9171
9171
|
|
|
9172
9172
|
|
|
9173
9173
|
if (accountHasUploads && (eventType === eventTypes.message || eventType === eventTypes.participant) && !payload.fromClient) {
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9174
|
+
var _payload$entry;
|
|
9175
|
+
|
|
9176
|
+
const entryType = payload === null || payload === void 0 ? void 0 : (_payload$entry = payload.entry) === null || _payload$entry === void 0 ? void 0 : _payload$entry.type;
|
|
9177
9177
|
newOptions = seamly_utils_objectSpread(seamly_utils_objectSpread({}, newOptions), {}, {
|
|
9178
9178
|
features: seamly_utils_objectSpread(seamly_utils_objectSpread({}, newOptions.features), {}, {
|
|
9179
9179
|
uploads: seamly_utils_objectSpread(seamly_utils_objectSpread({}, newOptions.features.uploads), {}, {
|
|
@@ -9300,12 +9300,9 @@ const seamlyStateReducer = (state, action) => {
|
|
|
9300
9300
|
const newFeaturesHasUpload = newFeatures.hasOwnProperty(featureKeys.uploads); // Only set uploads if it was initialised by the account config.
|
|
9301
9301
|
|
|
9302
9302
|
if (newFeaturesHasUpload) {
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
const {
|
|
9307
|
-
type: entryType
|
|
9308
|
-
} = lastParticipantEventPayload.entry || {};
|
|
9303
|
+
var _lastParticipantEvent, _lastParticipantEvent2;
|
|
9304
|
+
|
|
9305
|
+
const entryType = lastParticipantEvent === null || lastParticipantEvent === void 0 ? void 0 : (_lastParticipantEvent = lastParticipantEvent.payload) === null || _lastParticipantEvent === void 0 ? void 0 : (_lastParticipantEvent2 = _lastParticipantEvent.entry) === null || _lastParticipantEvent2 === void 0 ? void 0 : _lastParticipantEvent2.type;
|
|
9309
9306
|
newFeatures = seamly_utils_objectSpread(seamly_utils_objectSpread({}, newFeatures), {}, {
|
|
9310
9307
|
uploads: {
|
|
9311
9308
|
enabled: !!(uploads && uploads.enabled),
|
|
@@ -11822,20 +11819,6 @@ const useSeamlyCommands = () => {
|
|
|
11822
11819
|
}
|
|
11823
11820
|
});
|
|
11824
11821
|
}, [dispatch]);
|
|
11825
|
-
const sendInfo = (0,hooks_namespaceObject.useCallback)(({
|
|
11826
|
-
type,
|
|
11827
|
-
subtype
|
|
11828
|
-
}) => {
|
|
11829
|
-
const info = {
|
|
11830
|
-
type,
|
|
11831
|
-
subtype,
|
|
11832
|
-
id: randomId(),
|
|
11833
|
-
transactionId: randomId(),
|
|
11834
|
-
participant: userParticipantId,
|
|
11835
|
-
fromClient: true
|
|
11836
|
-
};
|
|
11837
|
-
api.send('info', info);
|
|
11838
|
-
}, [api]);
|
|
11839
11822
|
const sendAction = (0,hooks_namespaceObject.useCallback)(body => {
|
|
11840
11823
|
if (!body) {
|
|
11841
11824
|
return;
|
|
@@ -11878,7 +11861,6 @@ const useSeamlyCommands = () => {
|
|
|
11878
11861
|
connect,
|
|
11879
11862
|
start,
|
|
11880
11863
|
sendMessage,
|
|
11881
|
-
sendInfo,
|
|
11882
11864
|
sendAction,
|
|
11883
11865
|
sendContext,
|
|
11884
11866
|
reset,
|
|
@@ -14205,16 +14187,15 @@ const SuggestionsList = ({
|
|
|
14205
14187
|
|
|
14206
14188
|
|
|
14207
14189
|
|
|
14208
|
-
|
|
14209
14190
|
|
|
14210
14191
|
|
|
14211
14192
|
const Suggestions = ({
|
|
14212
|
-
isAside
|
|
14193
|
+
isAside = false
|
|
14213
14194
|
}) => {
|
|
14214
14195
|
// generic hooks
|
|
14215
14196
|
const {
|
|
14216
|
-
|
|
14217
|
-
} =
|
|
14197
|
+
isInline
|
|
14198
|
+
} = useSeamlyLayoutMode();
|
|
14218
14199
|
const {
|
|
14219
14200
|
t
|
|
14220
14201
|
} = useI18n();
|
|
@@ -14256,11 +14237,20 @@ const Suggestions = ({
|
|
|
14256
14237
|
const prevHasSuggestions = (0,hooks_namespaceObject.useRef)(false);
|
|
14257
14238
|
const previousRenderedSuggestions = (0,hooks_namespaceObject.useRef)([]);
|
|
14258
14239
|
const hasSuggestions = !!suggestions.length;
|
|
14259
|
-
const hideSuggestions =
|
|
14240
|
+
const hideSuggestions = isInline ? (hasResponded || isOpen) && !isAside : hasResponded;
|
|
14260
14241
|
const prevHideSuggestions = (0,hooks_namespaceObject.useRef)(hideSuggestions);
|
|
14261
14242
|
const showSuggestionsContainer = hasSuggestions && !hideSuggestions;
|
|
14262
14243
|
const renderedSuggestions = hasSuggestions ? suggestions : previousRenderedSuggestions.current;
|
|
14263
|
-
previousRenderedSuggestions.current = renderedSuggestions;
|
|
14244
|
+
previousRenderedSuggestions.current = renderedSuggestions;
|
|
14245
|
+
const suggestionsClassNames = (0,hooks_namespaceObject.useMemo)(() => {
|
|
14246
|
+
const classNames = ['suggestions'];
|
|
14247
|
+
|
|
14248
|
+
if (isAside) {
|
|
14249
|
+
classNames.push('suggestions--aside');
|
|
14250
|
+
}
|
|
14251
|
+
|
|
14252
|
+
return css_className(classNames);
|
|
14253
|
+
}, [isAside]); // click handler
|
|
14264
14254
|
|
|
14265
14255
|
const handleClick = (0,hooks_namespaceObject.useCallback)(({
|
|
14266
14256
|
id,
|
|
@@ -14325,7 +14315,7 @@ const Suggestions = ({
|
|
|
14325
14315
|
isActive: showSuggestionsContainer,
|
|
14326
14316
|
transitionStartState: transitionStartStates.notRendered,
|
|
14327
14317
|
children: (0,jsx_runtime_namespaceObject.jsxs)(ContainerElement, {
|
|
14328
|
-
className:
|
|
14318
|
+
className: suggestionsClassNames,
|
|
14329
14319
|
"aria-labelledby": headingText ? sectionId : null,
|
|
14330
14320
|
ref: containerRef,
|
|
14331
14321
|
children: [headingText && (0,jsx_runtime_namespaceObject.jsx)("p", {
|
|
@@ -22518,7 +22508,7 @@ class API {
|
|
|
22518
22508
|
return {
|
|
22519
22509
|
clientName: "@seamly/web-ui",
|
|
22520
22510
|
clientVariant: this.layoutMode,
|
|
22521
|
-
clientVersion: "20.
|
|
22511
|
+
clientVersion: "20.7.0",
|
|
22522
22512
|
currentUrl: window.location.toString(),
|
|
22523
22513
|
screenResolution: `${window.screen.width}x${window.screen.height}`,
|
|
22524
22514
|
timezone: getTimeZone(),
|