@sparkvault/sdk-js 16.2.1 → 16.3.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/dist/index.d.ts CHANGED
@@ -3644,6 +3644,8 @@ interface HelpDeskDesk {
3644
3644
  customer_can_mark_resolved: boolean;
3645
3645
  /** Optional plain-text note shown only after a request is confirmed sent. */
3646
3646
  ticket_confirmation_message?: string | null;
3647
+ /** Optional one-line plain-text note shown beside the support view's ticket button. */
3648
+ ticket_contact_note?: string | null;
3647
3649
  /** Independent ticket-portal gate, additional to customer authentication. */
3648
3650
  ticket_access_control?: {
3649
3651
  mode: 'public' | 'password' | 'ip_allowlist' | 'identity';
package/dist/index.mjs CHANGED
@@ -22671,9 +22671,9 @@ function injectHelpDeskSupportStyles() {
22671
22671
  .svhs-result:hover .svhs-result-title{color:var(--hd-accent-ink,${DS.action});text-decoration:underline}
22672
22672
  .svhs-result-excerpt{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0;color:${DS.slate600};font-size:14px;line-height:1.5;overflow-wrap:anywhere}
22673
22673
  .svhs-result-category{display:block;margin-top:6px;color:${DS.slate500};font-size:12px;line-height:1.4}
22674
- .svhs-results-bottom{background:${DS.slate50};border-top-color:${DS.slate200}}
22675
- .svhs-footer-title{margin:0 0 3px;color:${DS.slate900};font-size:14px;font-weight:600;line-height:1.5}
22676
- .svhs-footer-copy{margin:0 0 14px;color:${DS.slate600};font-size:13px;line-height:1.5}
22674
+ .svhs-results-bottom{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;background:${DS.slate50};border-top-color:${DS.slate200}}
22675
+ /* Wraps below the ticket button when less than 200px remain beside it, as under the panel's full-width button. */
22676
+ .svhs-contact-note{flex:1 1 200px;min-width:0;margin:0;color:${DS.slate500};font-size:13px;line-height:1.5;overflow-wrap:anywhere}
22677
22677
  .svhs-error{margin:12px 0 0;color:${DS.error};font-size:14px;line-height:1.5;overflow-wrap:anywhere}
22678
22678
  .svhs-status{margin:16px 0;color:${DS.slate600};font-size:14px;line-height:1.5}
22679
22679
  .svhs-empty{padding:12px 0 4px}
@@ -22816,10 +22816,6 @@ function injectHelpDeskSupportStyles() {
22816
22816
  .svhs-page .svhs-start-bottom{padding-top:0;align-items:flex-start}
22817
22817
  .svhs-page .svhs-start-bottom .svhs-primary{width:auto;min-width:160px}
22818
22818
  .svhs-page[data-stage=issue] .svhs-heading{font-size:28px}
22819
- .svhs-page .svhs-results-bottom{display:flex;align-items:center;gap:24px}
22820
- .svhs-page .svhs-results-bottom[hidden]{display:none}
22821
- .svhs-page .svhs-escalation{flex:1;min-width:0}
22822
- .svhs-page .svhs-footer-copy{margin:0}
22823
22819
  .svhs-page .svhs-results-bottom .svhs-secondary{width:auto;flex:none}
22824
22820
  .svhs-page .svhs-contact-target,.svhs-page .svhs-contact-target>.svhd-container{min-height:0}
22825
22821
  .svhs-page .svhs-contact-scroll{padding:0}
@@ -22832,8 +22828,7 @@ function injectHelpDeskSupportStyles() {
22832
22828
  .svhs-page .svhs-start-bottom{padding-top:0}
22833
22829
  .svhs-page .svhs-start-bottom .svhs-primary{width:100%}
22834
22830
  .svhs-page[data-stage=issue] .svhs-heading{font-size:26px}
22835
- .svhs-page .svhs-results-bottom{display:block}
22836
- .svhs-page .svhs-results-bottom .svhs-secondary{width:100%;margin-top:14px}
22831
+ .svhs-page .svhs-results-bottom .svhs-secondary{width:100%}
22837
22832
  .svhs-page .svhs-contact-scroll{padding:0}
22838
22833
  }
22839
22834
  `;
@@ -23223,6 +23218,7 @@ class SupportView {
23223
23218
  this.resultCopy = element('p', 'svhs-copy');
23224
23219
  this.resultStatus = element('div', 'svhs-empty');
23225
23220
  this.resultError = element('p', 'svhs-error');
23221
+ this.contactNote = element('p', 'svhs-contact-note');
23226
23222
  this.articleTitle = element('h2', 'svhs-article-title');
23227
23223
  this.articleCategory = element('p', 'svhs-category');
23228
23224
  this.articleContent = element('div', 'svhs-article-content');
@@ -23335,9 +23331,11 @@ class SupportView {
23335
23331
  return;
23336
23332
  this.actions.onContact(['locked', 'unavailable'].includes(this.state?.kbState || '') ? 'direct' : this.state?.results?.length ? 'none_match' : 'no_results');
23337
23333
  });
23334
+ this.contactNote.id = `${this.prefix}-contact-note`;
23335
+ this.contactNote.hidden = true;
23338
23336
  this.resultsFooter = this.footer('results');
23339
23337
  this.resultsFooter.classList.add('svhs-results-bottom');
23340
- this.resultsFooter.append(this.contactResults);
23338
+ this.resultsFooter.append(this.contactResults, this.contactNote);
23341
23339
  const article = this.screen('article');
23342
23340
  article.classList.add('svhs-article-scroll');
23343
23341
  this.articleTitle.tabIndex = -1;
@@ -23705,6 +23703,13 @@ class SupportView {
23705
23703
  }
23706
23704
  this.resultsFooter.hidden = Boolean(state.busy);
23707
23705
  this.contactResults.disabled = Boolean(state.busy);
23706
+ // Desk configuration, set as text: never parsed as markup.
23707
+ this.contactNote.textContent = state.contactNote || '';
23708
+ this.contactNote.hidden = !state.contactNote;
23709
+ if (state.contactNote)
23710
+ this.contactResults.setAttribute('aria-describedby', this.contactNote.id);
23711
+ else
23712
+ this.contactResults.removeAttribute('aria-describedby');
23708
23713
  }
23709
23714
  renderResultStatus(state, results) {
23710
23715
  const signature = state.kbState === 'locked' ? `locked:${state.kbAccessMode}` : state.busy ? 'busy' : state.kbState === 'unavailable' ? 'unavailable' : results.length ? 'matches' : 'empty';
@@ -24202,7 +24207,7 @@ function createHelpDeskSupport(config, options) {
24202
24207
  return (await http.request(path, { method: 'POST', body, credentials: 'omit', headers: { 'X-SV-Client': 'help-desk-portal', ...headers } })).data;
24203
24208
  },
24204
24209
  });
24205
- update({ deskName: answer.desk.organization_name || 'Support', brandColor: answer.desk.branding?.color });
24210
+ update({ deskName: answer.desk.organization_name || 'Support', brandColor: answer.desk.branding?.color, contactNote: answer.desk.ticket_contact_note ?? undefined });
24206
24211
  return answer;
24207
24212
  }).catch((error) => { connected = null; throw error; });
24208
24213
  return connected;
@@ -29543,7 +29548,7 @@ class SparkVault {
29543
29548
  }
29544
29549
  /** Get the SDK version */
29545
29550
  static get version() {
29546
- return '16.2.1';
29551
+ return '16.3.0';
29547
29552
  }
29548
29553
  }
29549
29554
  if (typeof window !== 'undefined') {