@sparkvault/sdk-js 16.0.0 → 16.0.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.
package/dist/index.mjs CHANGED
@@ -22077,6 +22077,7 @@ class SupportView {
22077
22077
  this.live.setAttribute('role', 'status');
22078
22078
  this.live.setAttribute('aria-live', 'polite');
22079
22079
  const toolbar = element('header', 'svhs-toolbar');
22080
+ this.toolbar = toolbar;
22080
22081
  this.back = button('svhs-back', 'Back', () => this.actions.onBack());
22081
22082
  this.back.prepend(icon('back'));
22082
22083
  this.close = button('svhs-icon-button', '', () => this.actions.onClose());
@@ -22096,14 +22097,17 @@ class SupportView {
22096
22097
  this.identityNotice.append(element('p', 'svhs-status', 'Sign-in is open in another window.'), button('svhs-text-button', 'Cancel sign-in', () => this.actions.onCancelIdentity?.()));
22097
22098
  this.identityNotice.hidden = true;
22098
22099
  this.panel.append(this.identityNotice);
22099
- const intro = this.screen('issue', 'How can we help?');
22100
+ const intro = this.screen('issue', 'How can we help?', target ? 'h1' : 'h2');
22100
22101
  // The heading asks the question once, so it names the field too.
22101
22102
  const issueHeading = this.headings.get('issue');
22102
22103
  issueHeading.id = `${this.prefix}-issue-title`;
22104
+ const helper = element('p', 'svhs-copy', 'What is your question? Tell us what is going on.');
22105
+ helper.id = `${this.prefix}-issue-help`;
22103
22106
  this.issue.id = `${this.prefix}-issue`;
22104
22107
  this.issue.setAttribute('aria-labelledby', issueHeading.id);
22108
+ this.issue.setAttribute('aria-describedby', helper.id);
22105
22109
  this.issue.name = 'support_issue';
22106
- this.issue.placeholder = 'Describe what you need help with…';
22110
+ this.issue.placeholder = 'Describe your question or issue';
22107
22111
  this.issue.autocomplete = 'off';
22108
22112
  this.issue.setAttribute('aria-describedby', `${this.prefix}-issue-error`);
22109
22113
  this.issueError.id = `${this.prefix}-issue-error`;
@@ -22121,7 +22125,7 @@ class SupportView {
22121
22125
  this.search();
22122
22126
  }
22123
22127
  });
22124
- intro.append(this.issue, this.issueError);
22128
+ intro.append(helper, this.issue, this.issueError);
22125
22129
  this.find = button('svhs-primary', 'Continue', () => this.search());
22126
22130
  this.footer('issue', 'svhs-start-bottom').append(this.find);
22127
22131
  const results = this.screen('results', 'These articles may help');
@@ -22134,16 +22138,14 @@ class SupportView {
22134
22138
  results.prepend(queryLine);
22135
22139
  results.append(this.resultCopy, this.resultList, this.resultStatus, this.resultError);
22136
22140
  this.resultError.setAttribute('role', 'alert');
22137
- this.contactResults = button('svhs-secondary svhs-full', 'Create a support ticket', () => {
22141
+ this.contactResults = button('svhs-secondary svhs-full', 'Still need help? Open a ticket', () => {
22138
22142
  if (this.state?.busy)
22139
22143
  return;
22140
22144
  this.actions.onContact(['locked', 'unavailable'].includes(this.state?.kbState || '') ? 'direct' : this.state?.results?.length ? 'none_match' : 'no_results');
22141
22145
  });
22142
22146
  this.resultsFooter = this.footer('results');
22143
22147
  this.resultsFooter.classList.add('svhs-results-bottom');
22144
- const escalation = element('div', 'svhs-escalation');
22145
- escalation.append(element('p', 'svhs-footer-title', 'Still need help?'), element('p', 'svhs-footer-copy', 'Send your question to our support team.'));
22146
- this.resultsFooter.append(escalation, this.contactResults);
22148
+ this.resultsFooter.append(this.contactResults);
22147
22149
  const article = this.screen('article');
22148
22150
  article.classList.add('svhs-article-scroll');
22149
22151
  this.articleTitle.tabIndex = -1;
@@ -22253,6 +22255,7 @@ class SupportView {
22253
22255
  this.back.disabled = Boolean(next.navigationLocked || next.identityPending);
22254
22256
  this.back.lastChild.textContent = next.stage === 'article' ? 'All answers' : next.stage === 'feedback' ? 'Keep reading' : 'Back';
22255
22257
  this.deskName.hidden = next.stage === 'article';
22258
+ this.toolbar.hidden = Boolean(this.target && next.stage === 'issue');
22256
22259
  const heading = this.headings.get(next.stage);
22257
22260
  if (heading && !heading.id)
22258
22261
  heading.id = `${this.prefix}-${next.stage}-title`;
@@ -22267,7 +22270,7 @@ class SupportView {
22267
22270
  this.find.replaceChildren();
22268
22271
  if (next.busy)
22269
22272
  this.find.append(element('span', 'svhs-spinner'));
22270
- this.find.append(document.createTextNode(next.busy ? 'Continuing…' : 'Continue'));
22273
+ this.find.append(document.createTextNode(next.busy ? 'Continuing...' : 'Continue'));
22271
22274
  this.issueError.textContent = next.stage === 'issue' ? next.error || '' : '';
22272
22275
  this.issueError.hidden = !this.issueError.textContent;
22273
22276
  this.query.textContent = next.issue;
@@ -22428,12 +22431,12 @@ class SupportView {
22428
22431
  this.hide();
22429
22432
  this.panel.remove();
22430
22433
  }
22431
- screen(stage, title) {
22434
+ screen(stage, title, tag = 'h2') {
22432
22435
  const screen = element('section', 'svhs-screen');
22433
22436
  screen.hidden = true;
22434
22437
  const body = element('div', 'svhs-scroll');
22435
22438
  if (title) {
22436
- const heading = element('h2', 'svhs-heading', title);
22439
+ const heading = element(tag, 'svhs-heading', title);
22437
22440
  heading.tabIndex = -1;
22438
22441
  body.append(heading);
22439
22442
  this.headings.set(stage, heading);
@@ -28348,7 +28351,7 @@ class SparkVault {
28348
28351
  }
28349
28352
  /** Get the SDK version */
28350
28353
  static get version() {
28351
- return '16.0.0';
28354
+ return '16.0.1';
28352
28355
  }
28353
28356
  }
28354
28357
  if (typeof window !== 'undefined') {