obi-sdk 0.12.1 → 0.12.2

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.
@@ -0,0 +1,6 @@
1
+ import { O } from "./obi-widget-33113e44.js";
2
+ import "./types-e0297e7b.js";
3
+ export {
4
+ O as ObiWidget
5
+ };
6
+ //# sourceMappingURL=index-ff86c70a.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-ff86c70a.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -16429,6 +16429,7 @@ class Course extends i$1 {
16429
16429
  this.name = "";
16430
16430
  this.description = "";
16431
16431
  this.duration = 10;
16432
+ this.order = 0;
16432
16433
  this.selected = false;
16433
16434
  this.handleClick = withSentryHandler(
16434
16435
  () => {
@@ -16587,6 +16588,9 @@ __decorateClass$5([
16587
16588
  __decorateClass$5([
16588
16589
  n$2({ type: Number })
16589
16590
  ], Course.prototype, "duration", 2);
16591
+ __decorateClass$5([
16592
+ n$2({ type: Number })
16593
+ ], Course.prototype, "order", 2);
16590
16594
  __decorateClass$5([
16591
16595
  n$2({ type: Boolean })
16592
16596
  ], Course.prototype, "selected", 2);
@@ -16610,17 +16614,18 @@ class CourseList extends i$1 {
16610
16614
  }
16611
16615
  return x`
16612
16616
  <div class="course-grid">
16613
- ${this.courses.map((course) => {
16617
+ ${this.courses.sort((a2, b2) => (a2.order || 0) - (b2.order || 0)).map((course) => {
16614
16618
  const isSelected = course.id === this.selectedCourseId;
16615
16619
  return x`
16616
- <obi-course
16617
- id=${course.id}
16618
- name=${course.name}
16619
- description=${course.description || ""}
16620
- duration=${course.duration}
16621
- ?selected=${isSelected}
16622
- ></obi-course>
16623
- `;
16620
+ <obi-course
16621
+ id=${course.id}
16622
+ name=${course.name}
16623
+ description=${course.description || ""}
16624
+ duration=${course.duration}
16625
+ order=${course.order || 0}
16626
+ ?selected=${isSelected}
16627
+ ></obi-course>
16628
+ `;
16624
16629
  })}
16625
16630
  </div>
16626
16631
  `;
@@ -16739,7 +16744,8 @@ class CourseModal extends i$1 {
16739
16744
  id: session.uuid,
16740
16745
  name: session.onboarding_plan.name,
16741
16746
  description: session.onboarding_plan.description,
16742
- duration: session.onboarding_plan.duration
16747
+ duration: session.onboarding_plan.duration,
16748
+ order: session.onboarding_plan.order
16743
16749
  };
16744
16750
  });
16745
16751
  const filteredCourses = mappedCourses.filter((course) => !!course.name);
@@ -16849,6 +16855,25 @@ class CourseModal extends i$1 {
16849
16855
  Sessions are securely recorded for quality improvement purposes.
16850
16856
  </p>
16851
16857
  </div>
16858
+ <div class="powered-by-container">
16859
+ <a href="https://getcor.ai/" target="_blank" class="powered-by-link">
16860
+ <div style="display: flex; align-items: end; gap: 4px;">
16861
+ <p class="powered-by">Powered by</p>
16862
+ <svg
16863
+ xmlns="http://www.w3.org/2000/svg"
16864
+ width="59"
16865
+ height="16"
16866
+ viewBox="0 0 59 16"
16867
+ fill="none"
16868
+ >
16869
+ <path
16870
+ d="M43.1777 3.86914C46.7404 3.86914 48.9042 6.57952 48.9043 9.77051C48.9043 13.4206 46.7624 16 43.1777 16C39.5498 15.9998 37.4299 13.268 37.4297 9.90234C37.4297 6.40537 39.5714 3.86928 43.1777 3.86914ZM28.8398 0C30.7196 0 32.1619 0.852712 33.1455 1.98926L33.2988 1.07129C33.4518 0.481159 33.8017 0.28418 34.2607 0.28418C35.0036 0.284203 35.1345 0.459008 35.2656 1.11426L35.9658 4.93945C36.097 5.5733 35.9869 5.83598 35.4404 6.12012C34.8287 6.42584 34.4137 6.40382 34.0859 5.90137C32.4466 3.08185 30.9818 2.22949 29.0146 2.22949C25.9547 2.22959 24.2285 4.93988 24.2285 7.95605C24.2286 11.9994 26.6979 13.748 29.4082 13.748C31.5502 13.748 33.517 12.6986 34.5225 10.4912C34.8284 9.90123 35.2877 9.79169 35.834 10.0537C36.4241 10.316 36.4898 10.8626 36.2275 11.4746C35.2002 14.0974 32.7523 15.999 28.8398 15.999C24.0969 15.999 21.3428 12.4584 21.3428 8.30566C21.3428 3.49723 24.4684 5.99482e-05 28.8398 0ZM9.93945 0.0927734C10.9259 0.142615 11.7099 0.956225 11.71 1.95215C11.7098 2.97999 10.8746 3.81329 9.84375 3.81348H6.13086C4.88502 3.9007 3.88179 4.86388 3.73535 6.08887L3.73438 6.10059V9.94141L3.73535 9.9541C3.88896 11.2389 4.98549 12.2353 6.31543 12.2354H9.53613C10.971 12.2352 12.1338 11.0752 12.1338 9.64453V6.09766L12.1367 6.00195C12.1867 5.01847 13.0022 4.23648 14.001 4.23633C15.032 4.23637 15.8681 5.06962 15.8682 6.09766V9.95117L15.8662 10.043C15.8203 10.984 15.073 11.7415 14.1348 11.8076V11.8184C12.8383 11.9038 11.8024 12.9378 11.7168 14.2305H11.7051C11.6364 15.1959 10.8295 15.9578 9.84375 15.958H5.97852C4.94743 15.958 4.11137 15.1247 4.11133 14.0967C4.11133 14.0783 4.11177 14.0595 4.1123 14.041H4.10938C3.92516 12.8594 2.94081 11.9037 1.72559 11.8193V11.8076C0.76079 11.7355 3.38938e-05 10.9317 0 9.95117V6.09766L0.00195312 6.00488C0.0487124 5.05403 0.811457 4.29096 1.76367 4.23926C2.96095 4.13852 3.92677 3.20977 4.10938 2.04102L4.1123 2.02148V2.00293C4.11188 1.9871 4.11133 1.97019 4.11133 1.95215C4.11137 0.924114 4.94744 0.0908305 5.97852 0.0908203H9.84375L9.93945 0.0927734ZM57.3926 4.00684C58.0264 4.00684 58.4639 4.42303 58.4639 5.10059C58.4636 6.17112 57.6773 6.54308 56.541 7.00195C55.2296 7.54837 54.4202 8.26929 54.0049 9.14355V12.8809C54.0049 13.5803 54.2454 13.887 55.6006 14.2148C56.2126 14.4116 56.3438 14.5862 56.3438 15.0889C56.3437 15.5696 56.1687 15.7881 55.666 15.7881H50.5518C50.071 15.7881 49.8956 15.5914 49.8955 15.0889C49.8955 14.6299 50.0055 14.433 50.4863 14.2363C51.2949 13.9085 51.5566 13.5805 51.5566 12.8594V7.72266C51.5566 6.82676 51.4256 6.62971 50.3984 6.23633C49.9834 6.06155 49.8955 5.95228 49.8955 5.53711C49.8955 5.16578 50.0051 5.01258 50.3545 4.90332L52.5625 4.13867C53.4805 3.85454 53.9395 4.02928 53.9395 4.94727V7.02344C54.901 5.23148 56.4308 4.00723 57.3926 4.00684ZM42.8506 5.94629C40.9053 5.94629 39.8994 7.38883 39.8994 9.44336C39.8996 11.6725 41.1016 13.9236 43.5273 13.9238C45.1011 13.9238 46.457 12.7867 46.457 10.4043C46.4569 8.17514 45.189 5.94655 42.8506 5.94629Z"
16871
+ fill="#18181B"
16872
+ />
16873
+ </svg>
16874
+ </div>
16875
+ </a>
16876
+ </div>
16852
16877
  </div>
16853
16878
  `;
16854
16879
  }
@@ -17072,6 +17097,34 @@ CourseModal.styles = i$4`
17072
17097
  height: 20px;
17073
17098
  width: 80%;
17074
17099
  }
17100
+
17101
+ .powered-by-container {
17102
+ position: absolute;
17103
+ bottom: 32px;
17104
+ right: 32px;
17105
+ display: flex;
17106
+ flex-direction: row;
17107
+ align-items: end;
17108
+ justify-content: center;
17109
+ gap: 4px;
17110
+ z-index: 10;
17111
+ }
17112
+
17113
+ .powered-by-link {
17114
+ text-decoration: none;
17115
+ }
17116
+
17117
+ .powered-by {
17118
+ color: #18181b;
17119
+ text-align: center;
17120
+ font-family: "Satoshi", sans-serif;
17121
+ font-size: 12px;
17122
+ font-style: normal;
17123
+ font-weight: 400;
17124
+ line-height: 100%;
17125
+ letter-spacing: -0.12px;
17126
+ margin: 0;
17127
+ }
17075
17128
  `;
17076
17129
  __decorateClass$4([
17077
17130
  n$2({ type: Array })
@@ -18539,7 +18592,7 @@ class ObiWidget extends i$1 {
18539
18592
  const updatedConfig = customEvent.detail;
18540
18593
  const needsInit = updatedConfig.isActive && !this.isActive;
18541
18594
  this.updateFromConfig();
18542
- if (needsInit && !isCurrentUrlBlacklisted(this.urlBlacklist)) {
18595
+ if (needsInit && !isCurrentUrlBlacklisted(this.urlBlacklist) && !this.activeSession) {
18543
18596
  this.sessionConnectionCheck();
18544
18597
  }
18545
18598
  this.requestUpdate();
@@ -18671,7 +18724,7 @@ class ObiWidget extends i$1 {
18671
18724
  const primaryColor = windowConfig?.primaryColor || dbConfig?.primaryColor || OBI_PRIMARY_COLOR;
18672
18725
  this.style.setProperty("--obi-primary", primaryColor);
18673
18726
  this.generateColorVariables(primaryColor);
18674
- if (this.isActive && !isCurrentUrlBlacklisted(this.urlBlacklist)) {
18727
+ if (this.isActive && !isCurrentUrlBlacklisted(this.urlBlacklist) && !this.activeSession) {
18675
18728
  this.sessionConnectionCheck();
18676
18729
  }
18677
18730
  }
@@ -18972,4 +19025,4 @@ export {
18972
19025
  withSentryAsyncHandler as w,
18973
19026
  x
18974
19027
  };
18975
- //# sourceMappingURL=obi-widget-b64f0c73.js.map
19028
+ //# sourceMappingURL=obi-widget-33113e44.js.map