@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
|
@@ -18264,9 +18264,9 @@ const seamlyStateReducer = (state, action) => {
|
|
|
18264
18264
|
|
|
18265
18265
|
|
|
18266
18266
|
if (accountHasUploads && (eventType === eventTypes.message || eventType === eventTypes.participant) && !payload.fromClient) {
|
|
18267
|
-
|
|
18268
|
-
|
|
18269
|
-
|
|
18267
|
+
var _payload$entry;
|
|
18268
|
+
|
|
18269
|
+
const entryType = payload === null || payload === void 0 ? void 0 : (_payload$entry = payload.entry) === null || _payload$entry === void 0 ? void 0 : _payload$entry.type;
|
|
18270
18270
|
newOptions = seamly_utils_objectSpread(seamly_utils_objectSpread({}, newOptions), {}, {
|
|
18271
18271
|
features: seamly_utils_objectSpread(seamly_utils_objectSpread({}, newOptions.features), {}, {
|
|
18272
18272
|
uploads: seamly_utils_objectSpread(seamly_utils_objectSpread({}, newOptions.features.uploads), {}, {
|
|
@@ -18397,12 +18397,9 @@ const seamlyStateReducer = (state, action) => {
|
|
|
18397
18397
|
const newFeaturesHasUpload = newFeatures.hasOwnProperty(featureKeys.uploads); // Only set uploads if it was initialised by the account config.
|
|
18398
18398
|
|
|
18399
18399
|
if (newFeaturesHasUpload) {
|
|
18400
|
-
|
|
18401
|
-
|
|
18402
|
-
|
|
18403
|
-
const {
|
|
18404
|
-
type: entryType
|
|
18405
|
-
} = lastParticipantEventPayload.entry || {};
|
|
18400
|
+
var _lastParticipantEvent, _lastParticipantEvent2;
|
|
18401
|
+
|
|
18402
|
+
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;
|
|
18406
18403
|
newFeatures = seamly_utils_objectSpread(seamly_utils_objectSpread({}, newFeatures), {}, {
|
|
18407
18404
|
uploads: {
|
|
18408
18405
|
enabled: !!(uploads && uploads.enabled),
|
|
@@ -21116,21 +21113,6 @@ const useSeamlyCommands = () => {
|
|
|
21116
21113
|
}
|
|
21117
21114
|
});
|
|
21118
21115
|
}, [dispatch]);
|
|
21119
|
-
const sendInfo = hooks_module_A(_ref2 => {
|
|
21120
|
-
let {
|
|
21121
|
-
type,
|
|
21122
|
-
subtype
|
|
21123
|
-
} = _ref2;
|
|
21124
|
-
const info = {
|
|
21125
|
-
type,
|
|
21126
|
-
subtype,
|
|
21127
|
-
id: randomId(),
|
|
21128
|
-
transactionId: randomId(),
|
|
21129
|
-
participant: userParticipantId,
|
|
21130
|
-
fromClient: true
|
|
21131
|
-
};
|
|
21132
|
-
api.send('info', info);
|
|
21133
|
-
}, [api]);
|
|
21134
21116
|
const sendAction = hooks_module_A(body => {
|
|
21135
21117
|
if (!body) {
|
|
21136
21118
|
return;
|
|
@@ -21173,7 +21155,6 @@ const useSeamlyCommands = () => {
|
|
|
21173
21155
|
connect,
|
|
21174
21156
|
start,
|
|
21175
21157
|
sendMessage,
|
|
21176
|
-
sendInfo,
|
|
21177
21158
|
sendAction,
|
|
21178
21159
|
sendContext,
|
|
21179
21160
|
reset,
|
|
@@ -23673,17 +23654,16 @@ const SuggestionsList = _ref => {
|
|
|
23673
23654
|
|
|
23674
23655
|
|
|
23675
23656
|
|
|
23676
|
-
|
|
23677
23657
|
|
|
23678
23658
|
|
|
23679
23659
|
const Suggestions = _ref => {
|
|
23680
23660
|
let {
|
|
23681
|
-
isAside
|
|
23661
|
+
isAside = false
|
|
23682
23662
|
} = _ref;
|
|
23683
23663
|
// generic hooks
|
|
23684
23664
|
const {
|
|
23685
|
-
|
|
23686
|
-
} =
|
|
23665
|
+
isInline
|
|
23666
|
+
} = useSeamlyLayoutMode();
|
|
23687
23667
|
const {
|
|
23688
23668
|
t
|
|
23689
23669
|
} = useI18n();
|
|
@@ -23725,11 +23705,20 @@ const Suggestions = _ref => {
|
|
|
23725
23705
|
const prevHasSuggestions = hooks_module_h(false);
|
|
23726
23706
|
const previousRenderedSuggestions = hooks_module_h([]);
|
|
23727
23707
|
const hasSuggestions = !!suggestions.length;
|
|
23728
|
-
const hideSuggestions =
|
|
23708
|
+
const hideSuggestions = isInline ? (hasResponded || isOpen) && !isAside : hasResponded;
|
|
23729
23709
|
const prevHideSuggestions = hooks_module_h(hideSuggestions);
|
|
23730
23710
|
const showSuggestionsContainer = hasSuggestions && !hideSuggestions;
|
|
23731
23711
|
const renderedSuggestions = hasSuggestions ? suggestions : previousRenderedSuggestions.current;
|
|
23732
|
-
previousRenderedSuggestions.current = renderedSuggestions;
|
|
23712
|
+
previousRenderedSuggestions.current = renderedSuggestions;
|
|
23713
|
+
const suggestionsClassNames = hooks_module_(() => {
|
|
23714
|
+
const classNames = ['suggestions'];
|
|
23715
|
+
|
|
23716
|
+
if (isAside) {
|
|
23717
|
+
classNames.push('suggestions--aside');
|
|
23718
|
+
}
|
|
23719
|
+
|
|
23720
|
+
return css_className(classNames);
|
|
23721
|
+
}, [isAside]); // click handler
|
|
23733
23722
|
|
|
23734
23723
|
const handleClick = hooks_module_A(_ref2 => {
|
|
23735
23724
|
let {
|
|
@@ -23797,7 +23786,7 @@ const Suggestions = _ref => {
|
|
|
23797
23786
|
isActive: showSuggestionsContainer,
|
|
23798
23787
|
transitionStartState: transitionStartStates.notRendered,
|
|
23799
23788
|
children: jsxRuntime_module_e(ContainerElement, {
|
|
23800
|
-
className:
|
|
23789
|
+
className: suggestionsClassNames,
|
|
23801
23790
|
"aria-labelledby": headingText ? sectionId : null,
|
|
23802
23791
|
ref: containerRef,
|
|
23803
23792
|
children: [headingText && jsxRuntime_module_e("p", {
|
|
@@ -32353,7 +32342,7 @@ class API {
|
|
|
32353
32342
|
return {
|
|
32354
32343
|
clientName: "@seamly/web-ui",
|
|
32355
32344
|
clientVariant: this.layoutMode,
|
|
32356
|
-
clientVersion: "20.
|
|
32345
|
+
clientVersion: "20.7.0",
|
|
32357
32346
|
currentUrl: window.location.toString(),
|
|
32358
32347
|
screenResolution: `${window.screen.width}x${window.screen.height}`,
|
|
32359
32348
|
timezone: getTimeZone(),
|