@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/README.md CHANGED
@@ -394,7 +394,11 @@ contact intent records content-free assistance analytics; closing records no
394
394
  invented outcome. Search outages and protected articles are separate states,
395
395
  with contact still available subject to its own access policy. Republish older
396
396
  KB releases once to generate their in-widget reader documents; the canonical
397
- help-center link remains available.
397
+ help-center link remains available. Help Desk > Settings > General can set a
398
+ short note shown beside the "Still need help? Open a ticket" button under the
399
+ suggestions, such as who answers and how soon. The optional public desk field
400
+ is `ticket_contact_note` (one line, up to 160 characters); null or omission
401
+ shows no note. It is rendered as text, never HTML.
398
402
 
399
403
  Contact reuses the ticket form's draft, attachment and uncertain-send handling.
400
404
  The subject and message are editable. A verified website session appears without
package/dist/index.cjs CHANGED
@@ -22675,9 +22675,9 @@ function injectHelpDeskSupportStyles() {
22675
22675
  .svhs-result:hover .svhs-result-title{color:var(--hd-accent-ink,${DS.action});text-decoration:underline}
22676
22676
  .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}
22677
22677
  .svhs-result-category{display:block;margin-top:6px;color:${DS.slate500};font-size:12px;line-height:1.4}
22678
- .svhs-results-bottom{background:${DS.slate50};border-top-color:${DS.slate200}}
22679
- .svhs-footer-title{margin:0 0 3px;color:${DS.slate900};font-size:14px;font-weight:600;line-height:1.5}
22680
- .svhs-footer-copy{margin:0 0 14px;color:${DS.slate600};font-size:13px;line-height:1.5}
22678
+ .svhs-results-bottom{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;background:${DS.slate50};border-top-color:${DS.slate200}}
22679
+ /* Wraps below the ticket button when less than 200px remain beside it, as under the panel's full-width button. */
22680
+ .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}
22681
22681
  .svhs-error{margin:12px 0 0;color:${DS.error};font-size:14px;line-height:1.5;overflow-wrap:anywhere}
22682
22682
  .svhs-status{margin:16px 0;color:${DS.slate600};font-size:14px;line-height:1.5}
22683
22683
  .svhs-empty{padding:12px 0 4px}
@@ -22820,10 +22820,6 @@ function injectHelpDeskSupportStyles() {
22820
22820
  .svhs-page .svhs-start-bottom{padding-top:0;align-items:flex-start}
22821
22821
  .svhs-page .svhs-start-bottom .svhs-primary{width:auto;min-width:160px}
22822
22822
  .svhs-page[data-stage=issue] .svhs-heading{font-size:28px}
22823
- .svhs-page .svhs-results-bottom{display:flex;align-items:center;gap:24px}
22824
- .svhs-page .svhs-results-bottom[hidden]{display:none}
22825
- .svhs-page .svhs-escalation{flex:1;min-width:0}
22826
- .svhs-page .svhs-footer-copy{margin:0}
22827
22823
  .svhs-page .svhs-results-bottom .svhs-secondary{width:auto;flex:none}
22828
22824
  .svhs-page .svhs-contact-target,.svhs-page .svhs-contact-target>.svhd-container{min-height:0}
22829
22825
  .svhs-page .svhs-contact-scroll{padding:0}
@@ -22836,8 +22832,7 @@ function injectHelpDeskSupportStyles() {
22836
22832
  .svhs-page .svhs-start-bottom{padding-top:0}
22837
22833
  .svhs-page .svhs-start-bottom .svhs-primary{width:100%}
22838
22834
  .svhs-page[data-stage=issue] .svhs-heading{font-size:26px}
22839
- .svhs-page .svhs-results-bottom{display:block}
22840
- .svhs-page .svhs-results-bottom .svhs-secondary{width:100%;margin-top:14px}
22835
+ .svhs-page .svhs-results-bottom .svhs-secondary{width:100%}
22841
22836
  .svhs-page .svhs-contact-scroll{padding:0}
22842
22837
  }
22843
22838
  `;
@@ -23227,6 +23222,7 @@ class SupportView {
23227
23222
  this.resultCopy = element('p', 'svhs-copy');
23228
23223
  this.resultStatus = element('div', 'svhs-empty');
23229
23224
  this.resultError = element('p', 'svhs-error');
23225
+ this.contactNote = element('p', 'svhs-contact-note');
23230
23226
  this.articleTitle = element('h2', 'svhs-article-title');
23231
23227
  this.articleCategory = element('p', 'svhs-category');
23232
23228
  this.articleContent = element('div', 'svhs-article-content');
@@ -23339,9 +23335,11 @@ class SupportView {
23339
23335
  return;
23340
23336
  this.actions.onContact(['locked', 'unavailable'].includes(this.state?.kbState || '') ? 'direct' : this.state?.results?.length ? 'none_match' : 'no_results');
23341
23337
  });
23338
+ this.contactNote.id = `${this.prefix}-contact-note`;
23339
+ this.contactNote.hidden = true;
23342
23340
  this.resultsFooter = this.footer('results');
23343
23341
  this.resultsFooter.classList.add('svhs-results-bottom');
23344
- this.resultsFooter.append(this.contactResults);
23342
+ this.resultsFooter.append(this.contactResults, this.contactNote);
23345
23343
  const article = this.screen('article');
23346
23344
  article.classList.add('svhs-article-scroll');
23347
23345
  this.articleTitle.tabIndex = -1;
@@ -23709,6 +23707,13 @@ class SupportView {
23709
23707
  }
23710
23708
  this.resultsFooter.hidden = Boolean(state.busy);
23711
23709
  this.contactResults.disabled = Boolean(state.busy);
23710
+ // Desk configuration, set as text: never parsed as markup.
23711
+ this.contactNote.textContent = state.contactNote || '';
23712
+ this.contactNote.hidden = !state.contactNote;
23713
+ if (state.contactNote)
23714
+ this.contactResults.setAttribute('aria-describedby', this.contactNote.id);
23715
+ else
23716
+ this.contactResults.removeAttribute('aria-describedby');
23712
23717
  }
23713
23718
  renderResultStatus(state, results) {
23714
23719
  const signature = state.kbState === 'locked' ? `locked:${state.kbAccessMode}` : state.busy ? 'busy' : state.kbState === 'unavailable' ? 'unavailable' : results.length ? 'matches' : 'empty';
@@ -24206,7 +24211,7 @@ function createHelpDeskSupport(config, options) {
24206
24211
  return (await http.request(path, { method: 'POST', body, credentials: 'omit', headers: { 'X-SV-Client': 'help-desk-portal', ...headers } })).data;
24207
24212
  },
24208
24213
  });
24209
- update({ deskName: answer.desk.organization_name || 'Support', brandColor: answer.desk.branding?.color });
24214
+ update({ deskName: answer.desk.organization_name || 'Support', brandColor: answer.desk.branding?.color, contactNote: answer.desk.ticket_contact_note ?? undefined });
24210
24215
  return answer;
24211
24216
  }).catch((error) => { connected = null; throw error; });
24212
24217
  return connected;
@@ -29547,7 +29552,7 @@ class SparkVault {
29547
29552
  }
29548
29553
  /** Get the SDK version */
29549
29554
  static get version() {
29550
- return '16.2.1';
29555
+ return '16.3.0';
29551
29556
  }
29552
29557
  }
29553
29558
  if (typeof window !== 'undefined') {