@qualified-salesforce/web 0.0.1-oidc-bootstrap → 0.1.1

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 (98) hide show
  1. package/CAPABILITY-REFERENCE.md +41 -0
  2. package/CHANGELOG.md +84 -0
  3. package/README.md +65 -0
  4. package/constants.generated.js +30 -2
  5. package/css/widget/multimodal_v2/index.split-css.panda.css +265 -47
  6. package/package.json +18 -4
  7. package/packs/widget/api/docking/viewport_lock.js +93 -2
  8. package/packs/widget/esm/index.d.ts +134 -0
  9. package/packs/widget/esm/index.js +18 -2
  10. package/packs/widget/esm/qualified.css +265 -47
  11. package/src/graphql-types.js +74 -1
  12. package/src/url.js +4 -1
  13. package/vendor/actioncable/connection.js +40 -3
  14. package/vendor/actioncable/connection_monitor.js +8 -0
  15. package/vendor/actioncable/consumer.js +7 -1
  16. package/vendor/actioncable/index.js +5 -2
  17. package/vendor/actioncable/sse_socket.js +262 -0
  18. package/widget/analytics.js +8 -0
  19. package/widget/api_handler/base_api_handler.js +24 -0
  20. package/widget/booker_outcome_tracker.js +58 -20
  21. package/widget/capabilities.js +190 -0
  22. package/widget/channel.js +38 -6
  23. package/widget/constants.generated.js +2 -1
  24. package/widget/multimodal_v2/components/AppLayout.js +1 -1
  25. package/widget/multimodal_v2/components/app/Foreground.js +10 -9
  26. package/widget/multimodal_v2/components/app/Input.js +8 -3
  27. package/widget/multimodal_v2/components/app/LightboxExperience.js +17 -3
  28. package/widget/multimodal_v2/components/app/Main.js +87 -31
  29. package/widget/multimodal_v2/components/app/MessengerButton.js +18 -1
  30. package/widget/multimodal_v2/components/chat/ChatInputForm.js +8 -6
  31. package/widget/multimodal_v2/components/chat/timeline/CalendarEventPickRenderer.js +2 -2
  32. package/widget/multimodal_v2/components/chat/timeline/PresentDeckRenderer.js +346 -170
  33. package/widget/multimodal_v2/components/chat/timeline/SystemRenderer.js +4 -7
  34. package/widget/multimodal_v2/components/decks/index.js +506 -52
  35. package/widget/multimodal_v2/components/helpers/content_click_payloads.js +67 -1
  36. package/widget/multimodal_v2/components/lightbox_gather/index.js +4 -4
  37. package/widget/multimodal_v2/components/meetings/MeetingBookerEntry.js +8 -1
  38. package/widget/multimodal_v2/components/meetings/MeetingOfferEmailStep.js +1 -1
  39. package/widget/multimodal_v2/components/meetings/MeetingSummaryRail.js +1 -1
  40. package/widget/multimodal_v2/components/meetings/MeetingTimeSelector.js +1 -1
  41. package/widget/multimodal_v2/components/multimodal/Controls.js +11 -3
  42. package/widget/multimodal_v2/components/multimodal/useMultimodal.js +19 -7
  43. package/widget/multimodal_v2/components/presentations/index.js +61 -0
  44. package/widget/multimodal_v2/constants.js +1 -1
  45. package/widget/multimodal_v2/images/icons.js +17 -1
  46. package/widget/multimodal_v2/index.panda.js +2 -2
  47. package/widget/multimodal_v2/locales/cs.js +8 -1
  48. package/widget/multimodal_v2/locales/da.js +8 -1
  49. package/widget/multimodal_v2/locales/de.js +8 -1
  50. package/widget/multimodal_v2/locales/en.js +8 -1
  51. package/widget/multimodal_v2/locales/en_AU.js +8 -1
  52. package/widget/multimodal_v2/locales/en_GB.js +8 -1
  53. package/widget/multimodal_v2/locales/es.js +8 -1
  54. package/widget/multimodal_v2/locales/es_LA.js +8 -1
  55. package/widget/multimodal_v2/locales/fi.js +8 -1
  56. package/widget/multimodal_v2/locales/fr.js +8 -1
  57. package/widget/multimodal_v2/locales/fr_CA.js +8 -1
  58. package/widget/multimodal_v2/locales/id.js +8 -1
  59. package/widget/multimodal_v2/locales/it.js +8 -1
  60. package/widget/multimodal_v2/locales/ja.js +8 -1
  61. package/widget/multimodal_v2/locales/ko.js +8 -1
  62. package/widget/multimodal_v2/locales/nb.js +8 -1
  63. package/widget/multimodal_v2/locales/nl.js +8 -1
  64. package/widget/multimodal_v2/locales/pl.js +8 -1
  65. package/widget/multimodal_v2/locales/pt_BR.js +8 -1
  66. package/widget/multimodal_v2/locales/ru.js +8 -1
  67. package/widget/multimodal_v2/locales/sv.js +8 -1
  68. package/widget/multimodal_v2/locales/th.js +8 -1
  69. package/widget/multimodal_v2/locales/tr.js +8 -1
  70. package/widget/multimodal_v2/locales/vi.js +8 -1
  71. package/widget/multimodal_v2/locales/zh_CN.js +8 -1
  72. package/widget/multimodal_v2/locales/zh_TW.js +8 -1
  73. package/widget/multimodal_v2/multimodal.js +5 -1
  74. package/widget/multimodal_v2/multimodal_channel.js +13 -8
  75. package/widget/multimodal_v2/signals/messages_signal.js +4 -0
  76. package/widget/multimodal_v2/stores/ai_conversation_store.js +6 -2
  77. package/widget/multimodal_v2/stores/artifact_store.js +352 -27
  78. package/widget/multimodal_v2/stores/call_store.js +40 -1
  79. package/widget/multimodal_v2/stores/call_ui_adapter.js +1 -1
  80. package/widget/multimodal_v2/stores/decks_store.js +405 -39
  81. package/widget/multimodal_v2/stores/meeting_store.js +15 -10
  82. package/widget/multimodal_v2/stores/presentation_ga_adapter.js +64 -0
  83. package/widget/multimodal_v2/stores/presentation_telemetry_store.js +556 -0
  84. package/widget/multimodal_v2/stores/presentations_store.js +1 -0
  85. package/widget/multimodal_v2/stores/root_store.js +157 -268
  86. package/widget/multimodal_v2/stores/screen_share_store.js +41 -21
  87. package/widget/multimodal_v2/stores/translation_store.js +9 -0
  88. package/widget/multimodal_v2/stores/ui_store.js +7 -7
  89. package/widget/multimodal_v2/stores/website_navigation_store.js +3 -1
  90. package/widget/multimodal_v2/text_turn_response_tracker.js +419 -0
  91. package/widget/multimodal_v2/types.js +21 -1
  92. package/widget/multimodal_v2/utils/locale.js +2 -1
  93. package/widget/multimodal_v2/utils/signals.js +35 -4
  94. package/widget/pardot_visitor.js +7 -1
  95. package/widget/server-logger.js +97 -2
  96. package/widget/tracker.js +69 -21
  97. package/widget/widget/page_mirror_factory.js +9 -1
  98. package/widget/widget/widget.js +29 -4
@@ -19,7 +19,21 @@ import { cx } from "../../styled-system/css/cx.js";
19
19
  import { cva } from "../../styled-system/css/cva.js";
20
20
  import { styled } from "../../styled-system/jsx/factory.js";
21
21
 
22
- /** @jsxImportSource preact */
22
+ /** @jsxImportSource preact */ function _extends() {
23
+ _extends = Object.assign || function(target) {
24
+ for(var i = 1; i < arguments.length; i++){
25
+ var source = arguments[i];
26
+ for(var key in source){
27
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
28
+ target[key] = source[key];
29
+ }
30
+ }
31
+ }
32
+ return target;
33
+ };
34
+ return _extends.apply(this, arguments);
35
+ }
36
+
23
37
 
24
38
 
25
39
 
@@ -314,26 +328,10 @@ const Sizing = cva({
314
328
  }
315
329
  },
316
330
  {
317
- maximizedState: types_MaximizedState.ARTIFACT,
318
- displayMode: [
319
- types_DisplayMode.DOCKED,
320
- types_DisplayMode.SIDEBAR
321
- ],
322
- css: {
323
- // The bottom 40% of the artifact split. Anchored to the bottom by
324
- // Positioning above, so this height is what leaves room for the artifact
325
- // fixed to the top of the viewport. Its other half is the 60% given to
326
- // [part='artifact'] in Layouting below; the two have to keep adding up.
327
- _mobile: {
328
- height: "[40%]"
329
- }
330
- }
331
- },
332
- {
333
- // Split out from the artifact case above, which used to share this rule.
334
- // The maximized multimodal panel is fullscreen on mobile and hides the chat,
335
- // input and privacy rows, so this height governs nothing visible and is not
336
- // the other half of anything -- it must not follow the artifact's number.
331
+ // Split out from the artifact case that used to share this rule. The
332
+ // maximized multimodal panel is fullscreen on mobile and hides the chat,
333
+ // input and privacy rows, so this height governs nothing visible -- it must
334
+ // not follow whatever the artifact does.
337
335
  maximizedState: types_MaximizedState.MULTIMODAL,
338
336
  displayMode: [
339
337
  types_DisplayMode.DOCKED,
@@ -361,6 +359,29 @@ const Sizing = cva({
361
359
  }
362
360
  ]
363
361
  });
362
+ // What the floating call panel is capped to on a phone. Declared once because two
363
+ // states share it: the closed state, where the panel is the whole of the messenger,
364
+ // and a call taken with the artifact open, where it floats over the artifact in the
365
+ // same corner. Only the cap is shareable -- see the artifact rule for the corner.
366
+ const FLOATING_CALL_PANEL_MOBILE_SIZE = {
367
+ maxHeight: "[170px]",
368
+ maxWidth: "[229px]"
369
+ };
370
+ // The mobile artifact covers the messenger, so it has to out-stack it as well as
371
+ // paint over it, and by default it does neither reliably. [part='main'] is a
372
+ // stacking context and every row in it is a `z-index: auto` child, so anything
373
+ // positioned inside one of those rows joins the same level as this pane and wins
374
+ // on tree order for being later in the DOM. That is not a hypothetical: every
375
+ // shared Button is `position: relative`, so the composer's mic and send buttons
376
+ // were punching through the scrim at full brightness while the input's own
377
+ // background sat behind it, and [part='multimodal'] carries an explicit
378
+ // `z-index: 1` from ChildContainer that floated the whole idle panel over the
379
+ // slide.
380
+ //
381
+ // Two levels above that clears both. The call panel takes the second one while it
382
+ // is floating in the corner, which is the one state where it does belong on top.
383
+ const ARTIFACT_OVERLAY_Z_INDEX = 2;
384
+ const FLOATING_CALL_PANEL_Z_INDEX = 3;
364
385
  const Layouting = cva({
365
386
  compoundVariants: [
366
387
  {
@@ -567,10 +588,7 @@ const Layouting = cva({
567
588
  zIndex: 2
568
589
  },
569
590
  _mobile: {
570
- "& > [part='multimodal']": {
571
- maxHeight: "[170px]",
572
- maxWidth: "[229px]"
573
- }
591
+ "& > [part='multimodal']": FLOATING_CALL_PANEL_MOBILE_SIZE
574
592
  }
575
593
  }
576
594
  },
@@ -692,13 +710,24 @@ const Layouting = cva({
692
710
  height: "[100%]",
693
711
  // The host spans the viewport, so this is what the panel leaves.
694
712
  width: "[calc(100% - var(--q-main-width, 0px))]",
695
- // Top 60% of the artifact split; the messenger takes the bottom 40% in
696
- // Sizing above. Change one and you have to change the other.
713
+ // Covers the messenger rather than sharing the height with it, in a call
714
+ // and out of one alike, so the geometry does not move when a call starts.
715
+ //
716
+ // Carries its own scrim, matching Background.tsx's. That one is a sibling
717
+ // of [part='main'] and so paints under the whole messenger, which was
718
+ // enough while this pane sat in the 40% the messenger did not occupy.
719
+ // Covering the messenger instead puts its opaque white card behind this
720
+ // pane, so anything this does not paint over -- the space around a
721
+ // centred artifact, or the gutters beside a letterboxed slide -- would
722
+ // show the transcript at full strength rather than dimmed behind it.
697
723
  _mobile: {
698
724
  top: "[0]",
699
725
  left: "[0]",
700
726
  width: "[100%]",
701
- height: "[60%]"
727
+ height: "[100%]",
728
+ backgroundColor: "[rgba(0, 0, 0, 0.5)]",
729
+ backdropFilter: "[blur(2px)]",
730
+ zIndex: ARTIFACT_OVERLAY_Z_INDEX
702
731
  }
703
732
  }
704
733
  }
@@ -736,13 +765,16 @@ const Layouting = cva({
736
765
  left: "[0]",
737
766
  width: "[calc(100% - var(--q-main-width) - var(--q-main-horizontal-offset))]",
738
767
  height: "[100%]",
739
- // Top 60% of the artifact split; the messenger takes the bottom 40% in
740
- // Sizing above. Change one and you have to change the other.
768
+ // Covers the messenger rather than splitting the height with it; see the
769
+ // docked rule above for what the scrim and the stacking order are for.
741
770
  _mobile: {
742
771
  top: "[0]",
743
772
  left: "[0]",
744
773
  width: "[100%]",
745
- height: "[60%]"
774
+ height: "[100%]",
775
+ backgroundColor: "[rgba(0, 0, 0, 0.5)]",
776
+ backdropFilter: "[blur(2px)]",
777
+ zIndex: ARTIFACT_OVERLAY_Z_INDEX
746
778
  }
747
779
  }
748
780
  }
@@ -755,7 +787,31 @@ const Layouting = cva({
755
787
  types_DisplayMode.SIDEBAR
756
788
  ],
757
789
  css: {
790
+ // A call leaves the artifact's geometry alone -- it stays the full-screen
791
+ // overlay it is off-call -- and floats over it in the bottom-right corner,
792
+ // which is where the closed state puts a call.
793
+ //
794
+ // The corner is not the same declaration as the closed state's. There it
795
+ // comes from the host: [part='main'] is itself a small fixed box pinned to
796
+ // that corner and the panel is the only thing in it. Here the host is the
797
+ // full-viewport messenger the artifact is covering, so it cannot be moved,
798
+ // and the offsets have to be restated on the panel. The bottom offset is
799
+ // written as the closed state writes it so an offer footer still pushes the
800
+ // panel up. Only the size cap is genuinely shared.
758
801
  _mobile: {
802
+ "& > [part='multimodal']": _extends({
803
+ position: "fixed",
804
+ bottom: "[calc(24px + var(--q-bottom-offset, 0px))]",
805
+ right: "[24px]",
806
+ width: "[fit-content]",
807
+ height: "[auto]",
808
+ zIndex: FLOATING_CALL_PANEL_Z_INDEX
809
+ }, FLOATING_CALL_PANEL_MOBILE_SIZE),
810
+ // The toolbar is the one row a call still takes away. Its close button
811
+ // would sit in the same corner as the artifact's own, dimmed behind the
812
+ // scrim -- two crosses arguing over one corner. Ending the call is on the
813
+ // floating panel and closing the artifact is the artifact's own button,
814
+ // so nothing here is the only way to do anything.
759
815
  "& > [part='toolbar']": {
760
816
  display: "none"
761
817
  }
@@ -36,6 +36,7 @@ const MessengerButton = (param)=>{
36
36
  children: [
37
37
  launcherImageUrl ? /*#__PURE__*/ jsxRuntime_module_u(ImageContainer, {
38
38
  "data-component-name": "MessengerButton.ImageContainer",
39
+ fillsLauncher: !showLabel,
39
40
  children: /*#__PURE__*/ jsxRuntime_module_u("img", {
40
41
  src: launcherImageUrl,
41
42
  alt: t("chat.messenger"),
@@ -111,7 +112,14 @@ const Launcher = styled("button", {
111
112
  hasCustomImage: true,
112
113
  hasLabel: false,
113
114
  css: {
114
- padding: "[0 8px]"
115
+ width: "[48px]",
116
+ padding: "[0]",
117
+ background: "$transparent",
118
+ boxShadow: "[none]",
119
+ "&:hover": {
120
+ background: "$transparent",
121
+ boxShadow: "[none]"
122
+ }
115
123
  }
116
124
  }
117
125
  ]
@@ -126,6 +134,15 @@ const ImageContainer = styled("div", {
126
134
  justifyContent: "center",
127
135
  borderRadius: "[50%]",
128
136
  overflow: "hidden"
137
+ },
138
+ variants: {
139
+ fillsLauncher: {
140
+ true: {
141
+ width: "[100%]",
142
+ height: "[100%]"
143
+ },
144
+ false: {}
145
+ }
129
146
  }
130
147
  });
131
148
  ImageContainer.displayName = "ImageContainer";
@@ -4,7 +4,6 @@ import { signals_module_useSignal, useComputed, utils_module_u, jsxRuntime_modul
4
4
  import "../../constants.js";
5
5
  import { SpeakNowMicIcon, ArrowRightIcon } from "../../images/icons.js";
6
6
  import "../../styled-system/jsx/index.js";
7
- import { toIntlLocale } from "../../utils/locale.js";
8
7
  import { isMobile } from "../../utils/media_queries.js";
9
8
  import { Text, t } from "../helpers/Localization.js";
10
9
  import { useTextOverflow } from "../helpers/useTextOverflow.js";
@@ -52,15 +51,18 @@ var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce);
52
51
 
53
52
 
54
53
 
55
-
56
54
  const CHAT_INPUT_ID = "multimodal-chat-input";
57
55
  const ChatInputForm = (param)=>{
58
56
  let { rootStore } = param;
59
57
  var _ref, _ref1;
60
58
  var _rootStore_config_featureFlags, _rootStore_config, _rootStore_config_featureFlags1, _rootStore_config1;
61
59
  const { displayMode, ctaItems, hasAiStrategyButtonCtas, textInputValue, submitDisabled, placeholder, inputLabel, sendMessageLabel, handleTextInputChange, handleTextInputFocus, handleSubmit, handleCtaClick, submitForm, multimodalButton, textareaRef, characterCountLabel, showCharacterCount } = useChatInputForm(rootStore);
62
- const useButtonsAboveForm = useComputed(()=>hasAiStrategyButtonCtas.value && !displayMode.collapsedCenter.value);
63
- const useButtonsInsideForm = useComputed(()=>hasAiStrategyButtonCtas.value && displayMode.collapsedCenter.value);
60
+ // Strategy CTAs are part of the initial compact pounce. After the visitor
61
+ // responds, keep the compact messenger focused on continuing the conversation;
62
+ // the CTAs remain available in the fully opened messenger.
63
+ const showAiStrategyButtonCtas = useComputed(()=>hasAiStrategyButtonCtas.value && (!displayMode.minimized.value || !rootStore.messages.hasVisitorEngaged.value));
64
+ const useButtonsAboveForm = useComputed(()=>showAiStrategyButtonCtas.value && !displayMode.collapsedCenter.value);
65
+ const useButtonsInsideForm = useComputed(()=>showAiStrategyButtonCtas.value && displayMode.collapsedCenter.value);
64
66
  // CTA buttons emit their own content impression, separate from the canned-prompt
65
67
  // impression in ChatComposer. Fires once while the buttons are shown; resets when
66
68
  // they're gone so a re-appearance is tracked again.
@@ -68,7 +70,7 @@ const ChatInputForm = (param)=>{
68
70
  useSignalEffect(()=>{
69
71
  var _rootStore_config_featureFlags, _rootStore_config;
70
72
  const items = ctaItems.value;
71
- if (items.length === 0) {
73
+ if (!showAiStrategyButtonCtas.value || items.length === 0) {
72
74
  ctaImpressionFired.value = false;
73
75
  return;
74
76
  }
@@ -210,7 +212,7 @@ function useChatInputForm(rootStore) {
210
212
  // Compact pill states (collapsed_center) have no room for a counter alongside the CTAs.
211
213
  const showCharacterCount = useComputed(()=>isOverCharacterLimit.value && !displayMode.collapsedCenter.value);
212
214
  const characterCountLabel = useComputed(()=>{
213
- const numberFormat = new Intl.NumberFormat(toIntlLocale(rootStore.translationStore.effectiveLocale.value));
215
+ const numberFormat = new Intl.NumberFormat(rootStore.translationStore.effectiveIntlLocale.value);
214
216
  return translate("chat.characterCount", {
215
217
  count: numberFormat.format(characterCount.value),
216
218
  max: numberFormat.format((/* inlined export .CHAT_INPUT_MAX_LENGTH */2000))
@@ -14,7 +14,7 @@ import { styled } from "../../../styled-system/jsx/factory.js";
14
14
 
15
15
  const CalendarEventPickRenderer = (param)=>{
16
16
  let { item, context: rootStore } = param;
17
- const { t, effectiveLocale } = rootStore.translationStore;
17
+ const { t, effectiveIntlLocale } = rootStore.translationStore;
18
18
  const { state } = useCalendarEventPick({
19
19
  item
20
20
  });
@@ -51,7 +51,7 @@ const CalendarEventPickRenderer = (param)=>{
51
51
  timeZone: state.timeZone,
52
52
  timeLabel: t("meetings.time"),
53
53
  dateLabel: t("meetings.date"),
54
- locale: effectiveLocale.value
54
+ locale: effectiveIntlLocale.value
55
55
  }),
56
56
  /*#__PURE__*/ jsxRuntime_module_u(Footer, {
57
57
  "data-component-name": "CalendarEventPickRenderer.Footer",