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