@meetelise/chat 1.75.0 → 1.77.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.
Files changed (31) hide show
  1. package/dist/src/WebComponent/Scheduler/time-picker.d.ts +6 -0
  2. package/dist/src/WebComponent/Scheduler/tour-type-option.d.ts +1 -1
  3. package/dist/src/WebComponent/SchedulerV2/contact-form.d.ts +9 -3
  4. package/dist/src/WebComponent/SchedulerV2/itinerary-editor.d.ts +38 -3
  5. package/dist/src/WebComponent/SchedulerV2/itineraryStopStyles.d.ts +1 -2
  6. package/dist/src/WebComponent/SchedulerV2/scheduler-popover.d.ts +18 -1
  7. package/dist/src/WebComponent/SchedulerV2/schedulerIcons.d.ts +18 -0
  8. package/dist/src/WebComponent/SchedulerV2/schedulerV2Styles.d.ts +9 -0
  9. package/dist/src/WebComponent/SchedulerV2/tour-scheduler-v2.d.ts +13 -1
  10. package/dist/src/WebComponent/SchedulerV2/tourTimes.d.ts +1 -1
  11. package/dist/src/WebComponent/actions/international-phone-input.d.ts +7 -0
  12. package/dist/src/WebComponent/me-select.d.ts +2 -0
  13. package/package.json +1 -1
  14. package/public/dist/index.js +2449 -1336
  15. package/src/WebComponent/Scheduler/date-picker.ts +130 -51
  16. package/src/WebComponent/Scheduler/time-picker.ts +62 -0
  17. package/src/WebComponent/Scheduler/tour-type-option.ts +31 -10
  18. package/src/WebComponent/SchedulerV2/booking-confirmation.ts +42 -38
  19. package/src/WebComponent/SchedulerV2/community-picker.ts +222 -160
  20. package/src/WebComponent/SchedulerV2/contact-form.ts +100 -70
  21. package/src/WebComponent/SchedulerV2/itinerary-editor.ts +498 -168
  22. package/src/WebComponent/SchedulerV2/itineraryStopStyles.ts +44 -21
  23. package/src/WebComponent/SchedulerV2/scheduler-popover.ts +105 -9
  24. package/src/WebComponent/SchedulerV2/schedulerIcons.ts +143 -0
  25. package/src/WebComponent/SchedulerV2/schedulerV2Styles.ts +347 -0
  26. package/src/WebComponent/SchedulerV2/tour-scheduler-v2.ts +443 -175
  27. package/src/WebComponent/SchedulerV2/tourTimes.ts +4 -3
  28. package/src/WebComponent/actions/action-confirm-button.ts +4 -3
  29. package/src/WebComponent/actions/international-phone-input.ts +84 -1
  30. package/src/WebComponent/me-select.ts +74 -0
  31. package/src/tourSchedulerV2Booking.test.ts +145 -15
@@ -10,6 +10,12 @@ export declare class TimePicker extends LitElement {
10
10
  selectedDateExists: boolean;
11
11
  timezone: string;
12
12
  defaultSelectedTime?: TimePickerOption | null;
13
+ /**
14
+ * Tour-scheduler-v2's look: three white, outlined times across, the chosen
15
+ * one tinted with the brand colour. Its heading names the time zone, so the
16
+ * note under the times is left out.
17
+ */
18
+ outlined: boolean;
13
19
  private selected?;
14
20
  get selectedTime(): undefined | TimePickerOption | null;
15
21
  protected updated(changedProperties: Map<string | number | symbol, unknown>): void;
@@ -4,7 +4,7 @@ export declare class TourTypeOption extends LitElement {
4
4
  heading: string;
5
5
  subtitle: string;
6
6
  selected: boolean;
7
- /** A white row with the icon on the left, marked by a brand-colour tint when selected. */
7
+ /** The v2 scheduler's white row with the icon on the left, tinted with the brand colour when selected. */
8
8
  outlined: boolean;
9
9
  onClick?: () => void;
10
10
  primaryColor: string;
@@ -23,8 +23,8 @@ export declare const EMPTY_CONTACT: ContactValues;
23
23
  */
24
24
  export declare const contactIsValid: (values: ContactValues, bedroomsRequired: boolean) => boolean;
25
25
  /**
26
- * The prospect's details, in today's scheduler's "Your Information" column
27
- * with its inputs. The scheduler's footer holds the submit button.
26
+ * The prospect's details: the design's "Your Information" column, each field
27
+ * labelled above. The scheduler's footer holds the submit button.
28
28
  */
29
29
  export declare class ContactForm extends LitElement {
30
30
  values: ContactValues;
@@ -38,12 +38,18 @@ export declare class ContactForm extends LitElement {
38
38
  mobile: boolean;
39
39
  private phoneHasBlurred;
40
40
  private setValues;
41
- private inputClasses;
41
+ /** A field's label, with the design's red asterisk when it is required. */
42
+ private label;
42
43
  /**
43
44
  * The bedroom preferences as the filters' chips: each tap picks or clears
44
45
  * one, as the Bedrooms filter does.
45
46
  */
46
47
  private renderLayouts;
48
+ /**
49
+ * The browser's date input, drawn as the design's "Select a date" field:
50
+ * the whole field opens the browser's calendar.
51
+ */
52
+ private renderMoveIn;
47
53
  render(): TemplateResult;
48
54
  static styles: import("lit").CSSResult[];
49
55
  }
@@ -3,6 +3,7 @@ import "../Scheduler/date-picker";
3
3
  import "../Scheduler/time-picker";
4
4
  import "../Scheduler/tour-type-option";
5
5
  import "../mini-loader";
6
+ import "./scheduler-popover";
6
7
  import { CommunitySummary, PlanStop, TourTypeId } from "./tourItineraryApi";
7
8
  export interface TourTypeChoice {
8
9
  id: TourTypeId;
@@ -45,7 +46,16 @@ export declare class ItineraryEditor extends LitElement {
45
46
  primaryColor: string;
46
47
  foregroundColorOnPrimaryBackgroundColor: string;
47
48
  private get offersKnown();
49
+ /** The stop whose "Change date & time" panel is open. */
48
50
  private editingTimeFor;
51
+ /** That panel's calendar is open. */
52
+ private stopDateOpen;
53
+ /** The date field's calendar is open. */
54
+ private dateOpen;
55
+ private mobile;
56
+ private cleanupMobileListener?;
57
+ connectedCallback(): void;
58
+ disconnectedCallback(): void;
49
59
  private dragIndex;
50
60
  private dropIndex;
51
61
  private get selectedTypeOpensLink();
@@ -62,11 +72,36 @@ export declare class ItineraryEditor extends LitElement {
62
72
  private renderTourTypes;
63
73
  /** Today's date picker over `dates`, reporting a picked day other than `date`. */
64
74
  private renderDatePicker;
65
- /** One stop's own day: moving it there makes it a separate tour. */
66
- private renderStopDatePicker;
75
+ /**
76
+ * Closes a calendar when a day is picked, the day already chosen included,
77
+ * which the calendar reports without a date change, and focuses `trigger`.
78
+ * The calendar handles the click first, inside its own shadow root.
79
+ */
80
+ private closeOnDay;
81
+ /**
82
+ * The panel's date field: the stop's own day, which opens the calendar
83
+ * under it. Moving the stop to another day makes it a separate tour.
84
+ */
85
+ private renderStopDateField;
86
+ /** Closes the stop's panel, and puts focus back on its button. */
87
+ private closeStopPanel;
88
+ /**
89
+ * The design's "Change date & time" panel, under the stop's pencil (above
90
+ * it when there isn't room, in place on phones): the stop's date when it
91
+ * has another, then its times. Picking a time closes it.
92
+ */
93
+ private renderStopPanel;
94
+ /** A stop's times; `picked` runs once one is picked, the chosen one included. */
67
95
  private renderTimePicker;
68
96
  private renderLinkPrompt;
69
- private renderSingleDateAndTime;
97
+ /**
98
+ * The design's date field: the chosen day, which opens the calendar under
99
+ * it (in place on phones). Picking a day closes it, the day already chosen
100
+ * included, which the calendar reports without a date change.
101
+ */
102
+ private renderDateField;
103
+ /** "Time (CDT)": the one community's times, in its own time zone. */
104
+ private renderTimes;
70
105
  private renderStop;
71
106
  private renderRemove;
72
107
  private renderProblem;
@@ -1,6 +1,5 @@
1
1
  /**
2
2
  * The list of stops in an itinerary, shared by the schedule step and the
3
- * confirmation. Each stop is a fee calculator card (`.floorplan-image-card`);
4
- * this adds only the numbering and the distance between stops.
3
+ * confirmation: the design's numbered cards, joined by the leg between them.
5
4
  */
6
5
  export declare const itineraryStopStyles: import("lit").CSSResult;
@@ -1,4 +1,4 @@
1
- import { LitElement, TemplateResult } from "lit";
1
+ import { LitElement, PropertyValues, TemplateResult } from "lit";
2
2
  /**
3
3
  * A trigger and the small panel it opens, for the v2 scheduler's secondary
4
4
  * choices. The panel floats under the trigger with `me-select`'s list surface
@@ -8,6 +8,10 @@ import { LitElement, TemplateResult } from "lit";
8
8
  * `inline` (phones) it opens in place instead, after its siblings in the
9
9
  * parent's flex row, as the filter row always did there.
10
10
  *
11
+ * With `fit`, the panel stays inside the scroller it opens in, as the
12
+ * design's per-stop panel does: above the trigger when there isn't room
13
+ * under it, and moved left when it would run past the right edge.
14
+ *
11
15
  * The parent owns `open`; the element asks for a close with `popover-close`.
12
16
  * Slot the trigger as `slot="trigger"` and the panel's content in the default
13
17
  * slot, so the trigger's `aria-controls` can name an id in the parent's tree.
@@ -15,6 +19,19 @@ import { LitElement, TemplateResult } from "lit";
15
19
  export declare class SchedulerPopover extends LitElement {
16
20
  open: boolean;
17
21
  inline: boolean;
22
+ /** Keep the panel inside its scroller (see above). Off, it always opens below. */
23
+ fit: boolean;
24
+ /** With `fit`, where the open panel sits; null until it has been measured. */
25
+ private placement;
26
+ /** It opens, or a phone turns into a wider screen with it open. */
27
+ private opening;
28
+ protected willUpdate(changed: PropertyValues<this>): void;
29
+ protected updated(changed: PropertyValues<this>): void;
30
+ /**
31
+ * Opens the panel above its trigger only when it fits there and not below:
32
+ * what runs past the scroller's foot can be scrolled to, but not its top.
33
+ */
34
+ private place;
18
35
  connectedCallback(): void;
19
36
  disconnectedCallback(): void;
20
37
  private requestClose;
@@ -0,0 +1,18 @@
1
+ import { SVGTemplateResult } from "lit";
2
+ export declare const BuildingLineIcon: (size?: number, strokeWidth?: number) => SVGTemplateResult;
3
+ export declare const CalendarLineIcon: (size?: number) => SVGTemplateResult;
4
+ export declare const ChevronLeftLineIcon: (size?: number) => SVGTemplateResult;
5
+ export declare const ChevronRightLineIcon: (size?: number) => SVGTemplateResult;
6
+ export declare const CloseLineIcon: (size?: number) => SVGTemplateResult;
7
+ export declare const PencilLineIcon: (size?: number) => SVGTemplateResult;
8
+ export declare const TrashLineIcon: (size?: number) => SVGTemplateResult;
9
+ export declare const GripLineIcon: (size?: number) => SVGTemplateResult;
10
+ export declare const PlusLineIcon: (size?: number) => SVGTemplateResult;
11
+ export declare const MapLineIcon: (size?: number) => SVGTemplateResult;
12
+ /** The design's booked mark: a check in a circle, in green. */
13
+ export declare const CheckCircleLineIcon: (size?: number, strokeWidth?: number) => SVGTemplateResult;
14
+ export declare const PersonPlusLineIcon: (size?: number) => SVGTemplateResult;
15
+ export declare const VideoLineIcon: (size?: number) => SVGTemplateResult;
16
+ export declare const MapPinLineIcon: (size?: number) => SVGTemplateResult;
17
+ export declare const StarFilledIcon: (size?: number) => SVGTemplateResult;
18
+ export declare const BadgeCheckFilledIcon: (size?: number) => SVGTemplateResult;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The v2 scheduler's design (the "select one" mockup), shared by its parts.
3
+ * Today's scheduler keeps `tourSchedulerStyles`; nothing here reaches it.
4
+ *
5
+ * The mockup's sample purple is the building's brand colour (`--primary-color`,
6
+ * set by `tour-scheduler-v2`); its lavender fill and ring are tints of it.
7
+ */
8
+ export declare const schedulerV2Tokens: import("lit").CSSResult;
9
+ export declare const schedulerV2Styles: import("lit").CSSResult;
@@ -95,6 +95,14 @@ export declare class TourSchedulerV2 extends LitElement {
95
95
  private planRequestId;
96
96
  private idempotency;
97
97
  private cleanupMobileListener?;
98
+ /**
99
+ * Below this width the modal can't fit the schedule step's three columns
100
+ * (the chat beside it, or a narrow window), so the step stacks.
101
+ */
102
+ private static readonly THREE_COLUMN_MIN_WIDTH;
103
+ private narrow;
104
+ private readonly modalResize;
105
+ private observeModal;
98
106
  connectedCallback(): void;
99
107
  disconnectedCallback(): void;
100
108
  private onKeydown;
@@ -189,7 +197,7 @@ export declare class TourSchedulerV2 extends LitElement {
189
197
  /** A preference can only be required where there is one to choose. */
190
198
  private get bedroomsRequired();
191
199
  private disclaimer;
192
- /** Today's scheduler's body area, which scrolls the whole sheet on phones. */
200
+ /** The body area, which scrolls the whole sheet on phones. */
193
201
  private container;
194
202
  /**
195
203
  * The design's first page: one community, which opens its schedule. More
@@ -200,6 +208,10 @@ export declare class TourSchedulerV2 extends LitElement {
200
208
  private renderItineraryHeading;
201
209
  /** "Add another stop": the nearby communities, under the itinerary. */
202
210
  private renderAddStop;
211
+ private renderEditor;
212
+ private renderContactForm;
213
+ /** The consent text and the submit button, under the form or the itinerary. */
214
+ private renderFooter;
203
215
  private renderSchedule;
204
216
  /** Today's reschedule prompt, with the server's reason. */
205
217
  private renderReschedulePrompt;
@@ -8,7 +8,7 @@ export declare const isoHourMinute: (iso: string) => string;
8
8
  export declare const formatHourMinute: (hourMinute: string) => string;
9
9
  /** ISO start -> "10:45am" */
10
10
  export declare const formatTime: (iso: string) => string;
11
- /** "10:00–10:30am", or "11:30am–12:00pm" across noon. */
11
+ /** "10:00–10:30 AM", or "11:30 AM–12:00 PM" across noon, as the design writes a stop's time. */
12
12
  export declare const formatTimeRange: (startIso: string, endIso: string) => string;
13
13
  /** A calendar date, read as that date wherever the visitor is. */
14
14
  export declare const dateFromIsoDate: (date: string) => Date;
@@ -7,10 +7,17 @@ export declare type InternationalPhoneChangeDetail = {
7
7
  };
8
8
  export declare class InternationalPhoneInput extends LitElement {
9
9
  static styles: import("lit").CSSResult[];
10
+ /** The v2 scheduler's look: a white field with a thin border, as its other inputs. */
11
+ outlined: boolean;
10
12
  country: string | null;
11
13
  value: string;
12
14
  invalid: boolean;
13
15
  placeholder: string;
16
+ /**
17
+ * The number field's accessible name, for a form that labels it above
18
+ * rather than with the placeholder. Left empty, the placeholder names it.
19
+ */
20
+ label: string;
14
21
  private selectedCountry;
15
22
  protected willUpdate(changedProperties: PropertyValues<this>): void;
16
23
  get e164(): string | null;
@@ -7,6 +7,8 @@ export declare class MESelect extends LitElement {
7
7
  options: MeSelectOption[];
8
8
  placeholder?: string;
9
9
  value?: string;
10
+ /** The v2 scheduler's look: a white field with a thin border. */
11
+ outlined: boolean;
10
12
  private activeOption;
11
13
  private isOpen?;
12
14
  private activeOptionIndex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.75.0",
3
+ "version": "1.77.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/MeetElise/chat-ui#readme",