@meetelise/chat 1.19.2 → 1.19.4
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.
|
@@ -24,6 +24,7 @@ import { isMobile } from "../../utils";
|
|
|
24
24
|
import axios from "axios";
|
|
25
25
|
import { mapValues } from "lodash";
|
|
26
26
|
import classnames from "classnames";
|
|
27
|
+
import parseISO from "date-fns/parseISO";
|
|
27
28
|
|
|
28
29
|
@customElement("tour-scheduler")
|
|
29
30
|
export class TourScheduler extends LitElement {
|
|
@@ -819,7 +820,9 @@ export class TourScheduler extends LitElement {
|
|
|
819
820
|
.options=${this.selectedDate
|
|
820
821
|
? this.availabilitiesGroupedByDay[
|
|
821
822
|
format(this.selectedDate, "y-MM-dd")
|
|
822
|
-
]?.map((date) =>
|
|
823
|
+
]?.map((date) =>
|
|
824
|
+
format(parseISO(`${date.datetime}${date.offset}`), "h:mmaaa")
|
|
825
|
+
)
|
|
823
826
|
: []}
|
|
824
827
|
@change=${(e: Event) => {
|
|
825
828
|
if (e.target instanceof TimePicker) {
|
package/src/assetUrls.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export const glowBarMp4 =
|
|
2
|
-
"https://
|
|
2
|
+
"https://eliseusercontent.meetelise.com/webchat/HorizontalBar-Shadow.mp4";
|
|
3
3
|
export const glowBarWebm =
|
|
4
|
-
"https://
|
|
4
|
+
"https://eliseusercontent.meetelise.com/webchat/HorizontalBar-Shadow.webm";
|
package/src/chatID.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { v4 as uuid } from "uuid";
|
|
|
3
3
|
const localStorageNamespacingPrefix = "com.meetelise";
|
|
4
4
|
const chatIdKeyPrefix = `${localStorageNamespacingPrefix}.chatID`;
|
|
5
5
|
const chatIdIssueTimeKeyPrefix = `${localStorageNamespacingPrefix}.chatIDIssueTime`;
|
|
6
|
-
const chatIdTimeToLiveInMilliseconds =
|
|
6
|
+
const chatIdTimeToLiveInMilliseconds = 6 * 60 * 60 * 1000; // 6 hours
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Get or create a UUID that is the same between browser sessions.
|
|
@@ -4,7 +4,7 @@ import { Theme } from "./themes";
|
|
|
4
4
|
import { darkMessage } from "./themes";
|
|
5
5
|
|
|
6
6
|
const defaultAvatarUrl =
|
|
7
|
-
"https://
|
|
7
|
+
"https://eliseusercontent.meetelise.com/webchat/looping-gradient.gif";
|
|
8
8
|
|
|
9
9
|
export default function createConversation(
|
|
10
10
|
session: Talk.Session,
|
package/src/getAvailabilities.ts
CHANGED
|
@@ -11,6 +11,9 @@ import {
|
|
|
11
11
|
} from "@meetelise/rest-sdk";
|
|
12
12
|
import groupBy from "lodash/groupBy";
|
|
13
13
|
import { TourType } from "./WebComponent/Scheduler/tour-scheduler";
|
|
14
|
+
import isPast from "date-fns/isPast";
|
|
15
|
+
import parseISO from "date-fns/parseISO";
|
|
16
|
+
import isValid from "date-fns/isValid";
|
|
14
17
|
|
|
15
18
|
const availabilitiesCache: {
|
|
16
19
|
buildingId?: number | null;
|
|
@@ -127,6 +130,7 @@ export const getAvailabilitiesGroupedByDay = async (
|
|
|
127
130
|
tourType,
|
|
128
131
|
buildingId
|
|
129
132
|
);
|
|
133
|
+
|
|
130
134
|
if (!availabilitiesForTourTypeRaw) {
|
|
131
135
|
return {};
|
|
132
136
|
}
|
|
@@ -137,7 +141,9 @@ export const getAvailabilitiesGroupedByDay = async (
|
|
|
137
141
|
} = {
|
|
138
142
|
availableTourStartTimes:
|
|
139
143
|
(availabilitiesForTourTypeRaw.availableTourStartTimes
|
|
140
|
-
? (
|
|
144
|
+
? (
|
|
145
|
+
availabilitiesForTourTypeRaw.availableTourStartTimes as unknown as string[]
|
|
146
|
+
).filter((dt) => isValid(parseISO(dt)) && !isPast(parseISO(dt)))
|
|
141
147
|
: []
|
|
142
148
|
)?.map((dateString) => dateStringToDateWithTimeZoneOffset(dateString)),
|
|
143
149
|
};
|