@saasquatch/mint-components 1.5.3-6 → 1.5.3

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.
Files changed (232) hide show
  1. package/CHANGELOG.md +22 -8
  2. package/dist/cjs/sqm-big-stat_35.cjs.entry.js +20 -17
  3. package/dist/cjs/sqm-stencilbook.cjs.entry.js +3 -3
  4. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +4 -1
  5. package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +4 -1
  6. package/dist/collection/components/sqm-input-field/sqm-input-field.js +13 -6
  7. package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +3 -0
  8. package/dist/collection/components/sqm-portal-register/usePortalRegister.js +0 -1
  9. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe.js +1 -1
  10. package/dist/collection/utils/RequiredPropsError.js +15 -11
  11. package/dist/esm/sqm-big-stat_35.entry.js +20 -17
  12. package/dist/esm/sqm-stencilbook.entry.js +3 -3
  13. package/dist/esm-es5/sqm-big-stat_35.entry.js +1 -1
  14. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  15. package/dist/mint-components/mint-components.esm.js +1 -1
  16. package/dist/mint-components/p-062e1e78.system.entry.js +1 -0
  17. package/dist/mint-components/p-436da6b8.system.js +1 -1
  18. package/dist/mint-components/{p-8bce224f.entry.js → p-76702646.entry.js} +2 -2
  19. package/dist/mint-components/{p-e9aec70e.system.entry.js → p-8d9b64a3.system.entry.js} +1 -1
  20. package/dist/mint-components/{p-69c4e5a7.entry.js → p-dfad44ee.entry.js} +8 -8
  21. package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field.d.ts +4 -1
  22. package/dist/types/components/sqm-dropdown-field/sqm-dropdown-field.d.ts +4 -1
  23. package/dist/types/components/sqm-input-field/sqm-input-field.d.ts +10 -4
  24. package/dist/types/components/sqm-name-fields/sqm-name-fields.d.ts +4 -1
  25. package/dist/types/components.d.ts +26 -14
  26. package/dist/types/utils/RequiredPropsError.d.ts +4 -1
  27. package/grapesjs/grapesjs.js +1 -1
  28. package/package.json +1 -1
  29. package/shoelace/assets/icons/123.svg +3 -0
  30. package/shoelace/assets/icons/activity.svg +3 -0
  31. package/shoelace/assets/icons/apple.svg +4 -0
  32. package/shoelace/assets/icons/bandaid-fill.svg +3 -0
  33. package/shoelace/assets/icons/bandaid.svg +4 -0
  34. package/shoelace/assets/icons/bank.svg +3 -0
  35. package/shoelace/assets/icons/bank2.svg +3 -0
  36. package/shoelace/assets/icons/behance.svg +3 -0
  37. package/shoelace/assets/icons/bell-slash-fill.svg +3 -0
  38. package/shoelace/assets/icons/bell-slash.svg +3 -0
  39. package/shoelace/assets/icons/bluetooth.svg +3 -0
  40. package/shoelace/assets/icons/body-text.svg +3 -0
  41. package/shoelace/assets/icons/boombox-fill.svg +4 -0
  42. package/shoelace/assets/icons/boombox.svg +6 -0
  43. package/shoelace/assets/icons/boxes.svg +3 -0
  44. package/shoelace/assets/icons/cash-coin.svg +6 -0
  45. package/shoelace/assets/icons/check-lg.svg +3 -0
  46. package/shoelace/assets/icons/cloud-haze2.svg +3 -0
  47. package/shoelace/assets/icons/coin.svg +5 -0
  48. package/shoelace/assets/icons/currency-bitcoin.svg +3 -0
  49. package/shoelace/assets/icons/currency-dollar.svg +3 -0
  50. package/shoelace/assets/icons/currency-euro.svg +3 -0
  51. package/shoelace/assets/icons/currency-exchange.svg +3 -0
  52. package/shoelace/assets/icons/currency-pound.svg +3 -0
  53. package/shoelace/assets/icons/currency-yen.svg +3 -0
  54. package/shoelace/assets/icons/dash-lg.svg +3 -0
  55. package/shoelace/assets/icons/device-hdd-fill.svg +4 -0
  56. package/shoelace/assets/icons/device-hdd.svg +5 -0
  57. package/shoelace/assets/icons/device-ssd-fill.svg +4 -0
  58. package/shoelace/assets/icons/device-ssd.svg +4 -0
  59. package/shoelace/assets/icons/displayport-fill.svg +3 -0
  60. package/shoelace/assets/icons/displayport.svg +4 -0
  61. package/shoelace/assets/icons/dpad-fill.svg +3 -0
  62. package/shoelace/assets/icons/dpad.svg +4 -0
  63. package/shoelace/assets/icons/dribbble.svg +3 -0
  64. package/shoelace/assets/icons/ear-fill.svg +3 -0
  65. package/shoelace/assets/icons/ear.svg +3 -0
  66. package/shoelace/assets/icons/easel2-fill.svg +4 -0
  67. package/shoelace/assets/icons/easel2.svg +3 -0
  68. package/shoelace/assets/icons/easel3-fill.svg +3 -0
  69. package/shoelace/assets/icons/easel3.svg +3 -0
  70. package/shoelace/assets/icons/envelope-check-fill.svg +4 -0
  71. package/shoelace/assets/icons/envelope-check.svg +4 -0
  72. package/shoelace/assets/icons/envelope-dash-fill.svg +4 -0
  73. package/shoelace/assets/icons/envelope-dash.svg +4 -0
  74. package/shoelace/assets/icons/envelope-exclamation-fill.svg +4 -0
  75. package/shoelace/assets/icons/envelope-exclamation.svg +4 -0
  76. package/shoelace/assets/icons/envelope-plus-fill.svg +4 -0
  77. package/shoelace/assets/icons/envelope-plus.svg +4 -0
  78. package/shoelace/assets/icons/envelope-slash-fill.svg +4 -0
  79. package/shoelace/assets/icons/envelope-slash.svg +4 -0
  80. package/shoelace/assets/icons/envelope-x-fill.svg +4 -0
  81. package/shoelace/assets/icons/envelope-x.svg +4 -0
  82. package/shoelace/assets/icons/ethernet.svg +4 -0
  83. package/shoelace/assets/icons/exclamation-lg.svg +3 -0
  84. package/shoelace/assets/icons/explicit-fill.svg +3 -0
  85. package/shoelace/assets/icons/explicit.svg +4 -0
  86. package/shoelace/assets/icons/fan.svg +4 -0
  87. package/shoelace/assets/icons/file-earmark-pdf-fill.svg +4 -0
  88. package/shoelace/assets/icons/file-earmark-pdf.svg +4 -0
  89. package/shoelace/assets/icons/file-pdf-fill.svg +4 -0
  90. package/shoelace/assets/icons/file-pdf.svg +4 -0
  91. package/shoelace/assets/icons/fingerprint.svg +7 -0
  92. package/shoelace/assets/icons/gender-ambiguous.svg +3 -0
  93. package/shoelace/assets/icons/gender-female.svg +3 -0
  94. package/shoelace/assets/icons/gender-male.svg +3 -0
  95. package/shoelace/assets/icons/gender-trans.svg +3 -0
  96. package/shoelace/assets/icons/git.svg +3 -0
  97. package/shoelace/assets/icons/gpu-card.svg +5 -0
  98. package/shoelace/assets/icons/graph-down-arrow.svg +3 -0
  99. package/shoelace/assets/icons/graph-up-arrow.svg +3 -0
  100. package/shoelace/assets/icons/hdmi-fill.svg +3 -0
  101. package/shoelace/assets/icons/hdmi.svg +4 -0
  102. package/shoelace/assets/icons/headset-vr.svg +4 -0
  103. package/shoelace/assets/icons/hypnotize.svg +4 -0
  104. package/shoelace/assets/icons/infinity.svg +3 -0
  105. package/shoelace/assets/icons/info-lg.svg +3 -0
  106. package/shoelace/assets/icons/line.svg +3 -0
  107. package/shoelace/assets/icons/list-columns-reverse.svg +3 -0
  108. package/shoelace/assets/icons/list-columns.svg +3 -0
  109. package/shoelace/assets/icons/magic.svg +3 -0
  110. package/shoelace/assets/icons/mastodon.svg +3 -0
  111. package/shoelace/assets/icons/medium.svg +3 -0
  112. package/shoelace/assets/icons/memory.svg +3 -0
  113. package/shoelace/assets/icons/messenger.svg +3 -0
  114. package/shoelace/assets/icons/meta.svg +3 -0
  115. package/shoelace/assets/icons/microsoft.svg +3 -0
  116. package/shoelace/assets/icons/modem-fill.svg +3 -0
  117. package/shoelace/assets/icons/modem.svg +4 -0
  118. package/shoelace/assets/icons/mortarboard-fill.svg +4 -0
  119. package/shoelace/assets/icons/mortarboard.svg +4 -0
  120. package/shoelace/assets/icons/motherboard-fill.svg +4 -0
  121. package/shoelace/assets/icons/motherboard.svg +4 -0
  122. package/shoelace/assets/icons/nintendo-switch.svg +4 -0
  123. package/shoelace/assets/icons/optical-audio-fill.svg +4 -0
  124. package/shoelace/assets/icons/optical-audio.svg +5 -0
  125. package/shoelace/assets/icons/paypal.svg +3 -0
  126. package/shoelace/assets/icons/pc-display-horizontal.svg +3 -0
  127. package/shoelace/assets/icons/pc-display.svg +3 -0
  128. package/shoelace/assets/icons/pc-horizontal.svg +3 -0
  129. package/shoelace/assets/icons/pc.svg +3 -0
  130. package/shoelace/assets/icons/pci-card.svg +4 -0
  131. package/shoelace/assets/icons/person-rolodex.svg +4 -0
  132. package/shoelace/assets/icons/person-video.svg +4 -0
  133. package/shoelace/assets/icons/person-video2.svg +4 -0
  134. package/shoelace/assets/icons/person-video3.svg +4 -0
  135. package/shoelace/assets/icons/person-workspace.svg +4 -0
  136. package/shoelace/assets/icons/piggy-bank-fill.svg +3 -0
  137. package/shoelace/assets/icons/piggy-bank.svg +4 -0
  138. package/shoelace/assets/icons/pin-map-fill.svg +4 -0
  139. package/shoelace/assets/icons/pin-map.svg +4 -0
  140. package/shoelace/assets/icons/pinterest.svg +3 -0
  141. package/shoelace/assets/icons/playstation.svg +3 -0
  142. package/shoelace/assets/icons/plus-lg.svg +3 -0
  143. package/shoelace/assets/icons/plus-slash-minus.svg +3 -0
  144. package/shoelace/assets/icons/projector-fill.svg +3 -0
  145. package/shoelace/assets/icons/projector.svg +4 -0
  146. package/shoelace/assets/icons/qr-code-scan.svg +7 -0
  147. package/shoelace/assets/icons/qr-code.svg +7 -0
  148. package/shoelace/assets/icons/question-lg.svg +3 -0
  149. package/shoelace/assets/icons/quora.svg +3 -0
  150. package/shoelace/assets/icons/quote.svg +3 -0
  151. package/shoelace/assets/icons/radioactive.svg +4 -0
  152. package/shoelace/assets/icons/recycle.svg +3 -0
  153. package/shoelace/assets/icons/reddit.svg +4 -0
  154. package/shoelace/assets/icons/robot.svg +4 -0
  155. package/shoelace/assets/icons/router-fill.svg +6 -0
  156. package/shoelace/assets/icons/router.svg +6 -0
  157. package/shoelace/assets/icons/safe-fill.svg +4 -0
  158. package/shoelace/assets/icons/safe.svg +4 -0
  159. package/shoelace/assets/icons/safe2-fill.svg +4 -0
  160. package/shoelace/assets/icons/safe2.svg +4 -0
  161. package/shoelace/assets/icons/sd-card-fill.svg +3 -0
  162. package/shoelace/assets/icons/sd-card.svg +4 -0
  163. package/shoelace/assets/icons/send-check-fill.svg +4 -0
  164. package/shoelace/assets/icons/send-check.svg +4 -0
  165. package/shoelace/assets/icons/send-dash-fill.svg +4 -0
  166. package/shoelace/assets/icons/send-dash.svg +4 -0
  167. package/shoelace/assets/icons/send-exclamation-fill.svg +4 -0
  168. package/shoelace/assets/icons/send-exclamation.svg +4 -0
  169. package/shoelace/assets/icons/send-fill.svg +3 -0
  170. package/shoelace/assets/icons/send-plus-fill.svg +4 -0
  171. package/shoelace/assets/icons/send-plus.svg +4 -0
  172. package/shoelace/assets/icons/send-slash-fill.svg +4 -0
  173. package/shoelace/assets/icons/send-slash.svg +4 -0
  174. package/shoelace/assets/icons/send-x-fill.svg +4 -0
  175. package/shoelace/assets/icons/send-x.svg +4 -0
  176. package/shoelace/assets/icons/send.svg +3 -0
  177. package/shoelace/assets/icons/signal.svg +3 -0
  178. package/shoelace/assets/icons/skype.svg +3 -0
  179. package/shoelace/assets/icons/slash-lg.svg +3 -0
  180. package/shoelace/assets/icons/snapchat.svg +3 -0
  181. package/shoelace/assets/icons/spotify.svg +3 -0
  182. package/shoelace/assets/icons/stack-overflow.svg +4 -0
  183. package/shoelace/assets/icons/steam.svg +4 -0
  184. package/shoelace/assets/icons/strava.svg +3 -0
  185. package/shoelace/assets/icons/terminal-dash.svg +4 -0
  186. package/shoelace/assets/icons/terminal-plus.svg +4 -0
  187. package/shoelace/assets/icons/terminal-split.svg +4 -0
  188. package/shoelace/assets/icons/terminal-x.svg +4 -0
  189. package/shoelace/assets/icons/thunderbolt-fill.svg +3 -0
  190. package/shoelace/assets/icons/thunderbolt.svg +4 -0
  191. package/shoelace/assets/icons/ticket-detailed-fill.svg +3 -0
  192. package/shoelace/assets/icons/ticket-detailed.svg +4 -0
  193. package/shoelace/assets/icons/ticket-fill.svg +3 -0
  194. package/shoelace/assets/icons/ticket-perforated-fill.svg +3 -0
  195. package/shoelace/assets/icons/ticket-perforated.svg +4 -0
  196. package/shoelace/assets/icons/ticket.svg +3 -0
  197. package/shoelace/assets/icons/tiktok.svg +3 -0
  198. package/shoelace/assets/icons/translate.svg +4 -0
  199. package/shoelace/assets/icons/usb-c-fill.svg +3 -0
  200. package/shoelace/assets/icons/usb-c.svg +4 -0
  201. package/shoelace/assets/icons/usb-drive-fill.svg +3 -0
  202. package/shoelace/assets/icons/usb-drive.svg +3 -0
  203. package/shoelace/assets/icons/usb-fill.svg +3 -0
  204. package/shoelace/assets/icons/usb-micro-fill.svg +3 -0
  205. package/shoelace/assets/icons/usb-micro.svg +4 -0
  206. package/shoelace/assets/icons/usb-mini-fill.svg +3 -0
  207. package/shoelace/assets/icons/usb-mini.svg +4 -0
  208. package/shoelace/assets/icons/usb-plug-fill.svg +3 -0
  209. package/shoelace/assets/icons/usb-plug.svg +3 -0
  210. package/shoelace/assets/icons/usb-symbol.svg +3 -0
  211. package/shoelace/assets/icons/usb.svg +4 -0
  212. package/shoelace/assets/icons/vimeo.svg +3 -0
  213. package/shoelace/assets/icons/webcam-fill.svg +4 -0
  214. package/shoelace/assets/icons/webcam.svg +4 -0
  215. package/shoelace/assets/icons/window-dash.svg +5 -0
  216. package/shoelace/assets/icons/window-desktop.svg +4 -0
  217. package/shoelace/assets/icons/window-fullscreen.svg +4 -0
  218. package/shoelace/assets/icons/window-plus.svg +5 -0
  219. package/shoelace/assets/icons/window-split.svg +4 -0
  220. package/shoelace/assets/icons/window-stack.svg +4 -0
  221. package/shoelace/assets/icons/window-x.svg +5 -0
  222. package/shoelace/assets/icons/windows.svg +3 -0
  223. package/shoelace/assets/icons/wordpress.svg +5 -0
  224. package/shoelace/assets/icons/x-lg.svg +4 -0
  225. package/shoelace/assets/icons/xbox.svg +3 -0
  226. package/shoelace/assets/icons/yin-yang.svg +4 -0
  227. package/shoelace/themes/themes/dark.styles.d.ts +2 -0
  228. package/shoelace/themes/themes/dark.styles.js +531 -0
  229. package/shoelace/themes/themes/light.css +439 -0
  230. package/shoelace/themes/themes/light.styles.d.ts +2 -0
  231. package/shoelace/themes/themes/light.styles.js +531 -0
  232. package/dist/mint-components/p-4afb82e5.system.entry.js +0 -1
package/CHANGELOG.md CHANGED
@@ -7,22 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [1.5.3] - 2022-03-28
11
-
12
- ### Changed
10
+ ## [1.5.3] - 2022-03-31
13
11
 
12
+ ### Added
14
13
  - Input component added for use in \<sqm-portal-register>
15
-
16
14
  - Added Component:
17
-
18
15
  - \<sqm-input-field>
19
- - Required by default but can be optional
20
- - All text is configurable by props
21
- - Best used in `formData` slot
16
+ - Required by default but can be optional with the `field-optional` prop
17
+ - Field label and error message are configurable by prop
18
+ - Best used in `formData` slot inside \<sqm-portal-register>
22
19
  - Form field name can be customized with the `field-name` prop
20
+ - `field-name` must be a unique string and is submitted as the key to the value submitted
21
+ - For example, with `field-name` set to `businessName` the result is `{"businessName":"SaaSquatch"}`
22
+ - An error is displayed if `field-name` prop is not included
23
23
  - Input type can be customized with the `field-type` prop
24
24
  - Supports `text`, `tel`, and `date` as types
25
25
 
26
+ ### Changed
27
+
28
+ - Changed Components:
29
+ - \<sqm-dropdown-field>
30
+ - An error is now displayed if `dropdown-name` prop is not included
31
+ - `dropdown-required` prop deprecated, must use `dropdown-optional` instead
32
+ - Field is still required by default
33
+ - \<sqm-checkbox-field>
34
+ - Error is now displayed if `checkbox-name` prop is not included
35
+ - `checkbox-required` prop deprecated, must use `checkbox-optional` instead
36
+ - Field is still required by default
37
+ - \<sqm-referral-iframe>
38
+ - Updated fail fast state text
39
+
26
40
  ## [1.5.2] - 2022-03-08
27
41
 
28
42
  ### Changed
@@ -138,35 +138,38 @@ const style = {
138
138
  Heading: {
139
139
  display: "inline-block",
140
140
  },
141
- Alert: {
142
- margin: "28px",
143
- },
144
141
  Children: {
145
142
  display: "none",
146
143
  },
147
144
  };
148
145
  const sheet = JSS.createStyleSheet(style);
149
146
  const styleString = sheet.toString();
150
- function RequiredPropsError({ missingProps }, children) {
147
+ function RequiredPropsError({ missingProps, heading = "There was a problem loading this section", subheading = "There was a technical problem that prevented this section from loading. Please contact us with the link to this page.", description = "Error occured while loading <{tagName}>. Values for the following attributes are missing:", }, children) {
151
148
  if (!missingProps)
152
149
  return false;
153
150
  const host = index_module.P();
154
151
  const [detailsOpen, setDetailsOpen] = stencilHooks_module.useState(false);
155
- return (index.h("sl-alert", { type: "danger", open: true, class: sheet.classes.Alert },
152
+ return (index.h("sl-alert", { type: "danger", open: true },
156
153
  index.h("style", { type: "text/css" }, styleString),
157
154
  index.h("div", { slot: "icon", class: sheet.classes.IconStyle },
158
155
  index.h("sl-icon", { name: "exclamation-octagon" })),
159
156
  index.h("div", { class: sheet.classes.DivStyle },
160
- index.h("h2", { class: sheet.classes.Heading }, "There was a problem loading this section"),
161
- index.h("p", null, "There was a technical problem that prevented this section from loading. Please contact us with the link to this page.")),
157
+ index.h("h2", { class: sheet.classes.Heading }, global.intl.formatMessage({
158
+ id: `error-heading`,
159
+ defaultMessage: heading,
160
+ })),
161
+ index.h("p", null, global.intl.formatMessage({
162
+ id: `error-subheading`,
163
+ defaultMessage: subheading,
164
+ }))),
162
165
  index.h("details", { class: sheet.classes.Details },
163
166
  index.h("summary", { onClick: () => setDetailsOpen(!detailsOpen) },
164
167
  detailsOpen ? "Less" : "More",
165
168
  " details"),
166
- index.h("p", null,
167
- "Error occured while loading ",
168
- `<${host.tagName.toLowerCase()}>`,
169
- ". Values for the following attributes are missing:"),
169
+ index.h("p", null, global.intl.formatMessage({
170
+ id: `error-description`,
171
+ defaultMessage: description,
172
+ }, { tagName: host.tagName.toLowerCase() })),
170
173
  index.h("ul", null, missingProps.map((prop) => (index.h("li", null,
171
174
  index.h("strong", null, prop.attribute)))))),
172
175
  index.h("div", { class: sheet.classes.Children }, children)));
@@ -229,7 +232,7 @@ const CheckboxField = class {
229
232
  },
230
233
  ]);
231
234
  if (!index_module.jn() && missingProps) {
232
- return index.h(RequiredPropsError, { missingProps: missingProps });
235
+ return (index.h(RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this form", subheading: "A technical problem prevented this checkbox field from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }));
233
236
  }
234
237
  const content = {
235
238
  ...utils.getProps(this),
@@ -355,7 +358,7 @@ const DropdownField = class {
355
358
  },
356
359
  ]);
357
360
  if (!index_module.jn() && missingProps) {
358
- return (index.h(RequiredPropsError, { missingProps: missingProps }, index.h("slot", null)));
361
+ return (index.h(RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this form", subheading: "A technical problem prevented this drop down field from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }, index.h("slot", null)));
359
362
  }
360
363
  const content = {
361
364
  ...utils.getProps(this),
@@ -825,10 +828,11 @@ const InputField = class {
825
828
  * @uiName Input Type
826
829
  * @uiType string
827
830
  * @uiEnum ["text", "date", "tel"]
831
+ * @uiEnumNames ["Text", "Date", "Phone Number"]
828
832
  */
829
833
  this.fieldType = "text";
830
834
  /**
831
- * @uiName Empty error message
835
+ * @uiName Required Error Message
832
836
  */
833
837
  this.errorMessage = "Cannot be empty";
834
838
  /**
@@ -849,7 +853,7 @@ const InputField = class {
849
853
  },
850
854
  ]);
851
855
  if (!index_module.jn() && missingProps) {
852
- return index.h(RequiredPropsError, { missingProps: missingProps });
856
+ return (index.h(RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this form", subheading: "A technical problem prevented this input field from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }));
853
857
  }
854
858
  const { states } = index_module.jn() ? useInputFieldDemo(this) : useInputField();
855
859
  return index.h(ShadowViewAddon.InputFieldView, { states: states, content: content });
@@ -5356,7 +5360,6 @@ function usePortalRegister(props) {
5356
5360
  return;
5357
5361
  const key = control.name;
5358
5362
  const value = control.value;
5359
- console.log({ key, value });
5360
5363
  jsonpointer.jsonpointer.set(formData, key, value);
5361
5364
  // required validation
5362
5365
  if (control.required && !value) {
@@ -5845,7 +5848,7 @@ const SqmReferralIframe = class {
5845
5848
  },
5846
5849
  ]);
5847
5850
  if (missingProps) {
5848
- return index.h(RequiredPropsError, { missingProps: missingProps });
5851
+ return (index.h(RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this page", subheading: "A technical problem prevented this iframe from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }));
5849
5852
  }
5850
5853
  const { states, data } = index_module.jn()
5851
5854
  ? useReferralIframeDemo(utils.getProps(this))
@@ -9381,7 +9381,7 @@ const ReferralIframeReadme = "# sqm-referral-iframe\r\n\r\n\r\n\r\n<!-- Auto Gen
9381
9381
 
9382
9382
  const ForgotPasswordReadme = "# sqm-portal-forgot-password\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| -------------- | --------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; success: boolean; loginPath: string; }; content?: { secondaryButton: any; messageSlot: any; emailLabel?: string; submitLabel?: string; }; }` | `undefined` |\r\n| `emailLabel` | `email-label` | | `string` | `\"Email\"` |\r\n| `loginPath` | `login-path` | | `string` | `\"/login\"` |\r\n| `redirectPath` | `redirect-path` | The page that users are redirected to from the password reset email. | `string` | `\"/resetPassword\"` |\r\n| `submitLabel` | `submit-label` | | `string` | `\"Request Password Reset\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-forgot-password --> sqm-form-message\r\n style sqm-portal-forgot-password fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
9383
9383
 
9384
- const RegisterReadme = "# sqm-portal-register\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\n\n\n## Properties\n\n| Property | Attribute | Description | Type | Default |\n| -------------------------- | ---------------------------- | ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |\n| `confirmPassword` | `confirm-password` | | `boolean` | `false` |\n| `confirmPasswordLabel` | `confirm-password-label` | | `string` | `\"Confirm Password\"` |\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; confirmPassword: boolean; hideInputs: boolean; validationState?: FormState; enablePasswordValidation?: boolean; loginPath: string; }; refs?: { formRef: any; }; content?: { formData?: VNode; terms?: VNode; passwordField?: VNode; secondaryButton?: VNode; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; confirmPasswordLabel: string; }; }` | `undefined` |\n| `emailLabel` | `email-label` | | `string` | `\"Email\"` |\n| `enablePasswordValidation` | `enable-password-validation` | | `boolean` | `true` |\n| `hideInputs` | `hide-inputs` | | `boolean` | `false` |\n| `loginLabel` | `login-label` | | `string` | `\"Sign in\"` |\n| `loginPath` | `login-path` | | `string` | `\"/login\"` |\n| `nextPage` | `next-page` | | `string` | `\"/\"` |\n| `pageLabel` | `page-label` | | `string` | `\"Register\"` |\n| `passwordLabel` | `password-label` | | `string` | `\"Password\"` |\n| `redirectPath` | `redirect-path` | The page that users are redirected to from the verification email. | `string` | `\"/verifyEmail\"` |\n| `submitLabel` | `submit-label` | | `string` | `\"Register\"` |\n\n\n## Dependencies\n\n### Used by\n\n - [sqm-stencilbook](../sqm-stencilbook)\n\n### Depends on\n\n- [sqm-form-message](../sqm-form-message)\n- [sqm-password-field](../sqm-password-field)\n\n### Graph\n```mermaid\ngraph TD;\n sqm-portal-register --> sqm-form-message\n sqm-portal-register --> sqm-password-field\n sqm-stencilbook --> sqm-portal-register\n style sqm-portal-register fill:#f9f,stroke:#333,stroke-width:4px\n```\n\n----------------------------------------------\n\n*Built with [StencilJS](https://stenciljs.com/)*\n";
9384
+ const RegisterReadme = "# sqm-portal-register\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| -------------------------- | ---------------------------- | ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |\r\n| `confirmPassword` | `confirm-password` | | `boolean` | `false` |\r\n| `confirmPasswordLabel` | `confirm-password-label` | | `string` | `\"Confirm Password\"` |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; confirmPassword: boolean; hideInputs: boolean; validationState?: FormState; enablePasswordValidation?: boolean; loginPath: string; }; refs?: { formRef: any; }; content?: { formData?: VNode; terms?: VNode; passwordField?: VNode; secondaryButton?: VNode; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; confirmPasswordLabel: string; }; }` | `undefined` |\r\n| `emailLabel` | `email-label` | | `string` | `\"Email\"` |\r\n| `enablePasswordValidation` | `enable-password-validation` | | `boolean` | `true` |\r\n| `hideInputs` | `hide-inputs` | | `boolean` | `false` |\r\n| `loginLabel` | `login-label` | | `string` | `\"Sign in\"` |\r\n| `loginPath` | `login-path` | | `string` | `\"/login\"` |\r\n| `nextPage` | `next-page` | | `string` | `\"/\"` |\r\n| `pageLabel` | `page-label` | | `string` | `\"Register\"` |\r\n| `passwordLabel` | `password-label` | | `string` | `\"Password\"` |\r\n| `redirectPath` | `redirect-path` | The page that users are redirected to from the verification email. | `string` | `\"/verifyEmail\"` |\r\n| `submitLabel` | `submit-label` | | `string` | `\"Register\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Used by\r\n\r\n - [sqm-stencilbook](../sqm-stencilbook)\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n- [sqm-password-field](../sqm-password-field)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-register --> sqm-form-message\r\n sqm-portal-register --> sqm-password-field\r\n sqm-stencilbook --> sqm-portal-register\r\n style sqm-portal-register fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
9385
9385
 
9386
9386
  const EditProfileReadme = "# sqm-portal-profile\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| ------------------------ | --------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |\r\n| `countrytext` | `countrytext` | | `string` | `\"Country\"` |\r\n| `demoData` | -- | | `{ states?: { success: boolean; loading: boolean; submitDisabled: boolean; showCountry: boolean; formState: { country: string; firstName: string; lastName: string; errors: any; error: string; }; user: { id: string; accountId: string; firstName: string; lastName: string; email: string; countryCode: string; }; text: { firstnametext: string; lastnametext: string; emailtext: string; countrytext: string; editProfileHeader: string; editProfileSubHeader: string; submitChangeButtonText: string; }; }; }` | `undefined` |\r\n| `editProfileHeader` | `edit-profile-header` | | `string` | `\"Edit your profile\"` |\r\n| `editProfileSubHeader` | `edit-profile-sub-header` | | `string` | `\"Personal Information\"` |\r\n| `emailtext` | `emailtext` | | `string` | `\"Email\"` |\r\n| `firstnametext` | `firstnametext` | | `string` | `\"First Name\"` |\r\n| `lastnametext` | `lastnametext` | | `string` | `\"Last Name\"` |\r\n| `showCountry` | `show-country` | | `boolean` | `true` |\r\n| `submitChangeButtonText` | `submit-change-button-text` | | `string` | `\"Submit Changes\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-profile --> sqm-form-message\r\n style sqm-portal-profile fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
9387
9387
 
@@ -9893,7 +9893,7 @@ const NameFields$1 = /*#__PURE__*/Object.freeze({
9893
9893
  NameFieldsWithErrors: NameFieldsWithErrors
9894
9894
  });
9895
9895
 
9896
- const scenario$i = "@owner:sam\r\n@author:sam\r\nFeature: Checkbox Field\r\n\r\n Field to be used to be used as a checkbox during registration. A motivating use case is to use this component as a terms\r\n and conditions field, to sastisfy legal requirements that a customer might have for their end users.\r\n\r\n Background: A user is on the portal registration page\r\n Given a user is viewing the \"/register\"\r\n And \"/register\" contains the registration form\r\n And the registration form has the following fields\r\n | fields |\r\n | first name |\r\n | last name |\r\n | email |\r\n | password |\r\n | checkbox |\r\n\r\n @motivating\r\n Scenario: Checkbox is required by default\r\n Given the user is filling out the registration form\r\n And the name fields have valid input\r\n And the email field has valid input\r\n And the password field has valid input\r\n And the checkbox is not checked\r\n When they try to register\r\n Then the checkbox is highlighted in red\r\n And the error message says \"Must be checked\"\r\n\r\n @landmine\r\n Scenario: Checkboxes with the same \"checkbox-name\" are not submitted in the form data\r\n Given the register form has the following html\r\n \"\"\"\r\n <sqm-portal-register>\r\n <sqm-name-fields slot=\"formData\"></sqm-name-fields>\r\n <sqm-checkbox-field\r\n slot=\"formData\"\r\n checkbox-label=\"I am not a robot\"\r\n error-message=\"Cannot be a robot\"\r\n checkbox-name=\"isHuman\"\r\n ></sqm-checkbox-field>\r\n <div slot=\"terms\">\r\n <sqm-checkbox-field checkbox-name=\"isHuman\"></sqm-checkbox-field>\r\n </div>\r\n </sqm-portal-register>\r\n \"\"\"\r\n And the checkboxes are checked\r\n When the user tries to register\r\n Then the form is submitted\r\n But no field with key \"isHuman\" is included in the form data\r\n\r\n @motivating\r\n Scenario: Multiple checkboxes need different \"checkbox-name\" values\r\n Given the register form has the following html\r\n \"\"\"\r\n <sqm-portal-register>\r\n <sqm-name-fields slot=\"formData\"></sqm-name-fields>\r\n <sqm-checkbox-field\r\n slot=\"formData\"\r\n checkbox-label=\"I am not a robot\"\r\n error-message=\"Cannot be a robot\"\r\n checkbox-name=\"isHuman\"\r\n ></sqm-checkbox-field>\r\n <div slot=\"terms\">\r\n <sqm-checkbox-field checkbox-name=\"myCheckbox\"></sqm-checkbox-field>\r\n </div>\r\n </sqm-portal-register>\r\n \"\"\"\r\n And the checkboxes are not checked\r\n When the user tries to register\r\n Then both checkboxes are bordered in red\r\n And the checkboxes have different error messages\r\n When the user checks the boxes\r\n And tries to register\r\n Then the form is submitted\r\n And the following fields are included in the form data\r\n | feilds |\r\n | isHuman |\r\n | myCheckbox |\r\n\r\n @motivating\r\n Scenario: Checkboxes can be optional\r\n Given the register form has the following html\r\n \"\"\"\r\n <sqm-portal-register>\r\n <sqm-name-fields slot=\"formData\"></sqm-name-fields>\r\n <sqm-checkbox-field\r\n slot=\"formData\"\r\n checkbox-label=\"I am not a robot\"\r\n checkbox-optional=\"true\"\r\n checkbox-name=\"isHuman\"\r\n />\r\n </sqm-portal-register>\r\n \"\"\"\r\n And the checkbox is not checked\r\n When the user tries to register\r\n Then there is no error for the checkbox\r\n\r\n @minutae\r\n Scenario Outline: Validation error message is configurable\r\n The error message string is evaluated as an ICU string, but currently is provided no context\r\n Given the checkbox is required\r\n And the checkbox has prop \"error-message\" with <propValue>\r\n When the user tries to register\r\n But they havent checked the checkbox\r\n Then they see <errorMessage> below\r\n Examples:\r\n | propValue | errorMessage |\r\n | | Must be checked |\r\n | My Custom Message | My Custom Message |\r\n\r\n @motivating\r\n Scenario Outline: Checkbox text and link are configurable\r\n Given the checkbox has the following prop values\r\n | prop | value |\r\n | checkbox-label | <labelText> |\r\n | checkbox-label-link | <labelLink> |\r\n | checkbox-label-link-text | <labelLinkText> |\r\n When the user views the checkbox\r\n Then they see <text>\r\n And when they click <labelLinkText> they are redirected to <labelLink>\r\n #First example below is the defaults set by the controller\r\n Examples:\r\n | labelText | labelLinkText | labelLink | text |\r\n | By signing up you agree to the {labelLink} | Terms and Conditions | https://example.com | By signing up you agree to the Terms and Conditions |\r\n | Read our {labelLink} before registration | Terms of Service | https://example.com/terms | Read our Terms of Service before registration |\r\n | By registering you agree to our terms and conditions | N/A | N/A | By registering you agree to our terms and conditions |\r\n\r\n @motivating\r\n Scenario: The form field name attribute is configurable\r\n Given the checkbox has prop \"checkbox-name\" with value \"myCheckBox\"\r\n When the user checks the box\r\n And they register\r\n Then the value of the checkbox is submitted under \"myCheckBox\" field\r\n\r\n @minutae\r\n Scenario Outline: The checkbox field component fails fast if a checkbox name isn't provided\r\n Given the checkbox <mayHave> prop \"checkbox-name\"\r\n And it <mayHavePropValue>\r\n When a user views the checkbox\r\n Then an alert with an error message is displayed in place of the checkbox\r\n And it has a details section\r\n When \"More details\" is clicked\r\n Then the following information will be displayed\r\n | component being used |\r\n | missing attribute(s) |\r\n Examples:\r\n | mayBeAnAttribute | mayHavePropValue |\r\n | doesn't have | N/A |\r\n | has | \"\" |\r\n | has | |";
9896
+ const scenario$i = "@owner:sam\r\n@author:sam\r\nFeature: Checkbox Field\r\n\r\n Field to be used to be used as a checkbox during registration. A motivating use case is to use this component as a terms\r\n and conditions field, to sastisfy legal requirements that a customer might have for their end users.\r\n\r\n Background: A user is on the portal registration page\r\n Given a user is viewing the \"/register\"\r\n And \"/register\" contains the registration form\r\n And the registration form has the following fields\r\n | fields |\r\n | first name |\r\n | last name |\r\n | email |\r\n | password |\r\n | checkbox |\r\n\r\n @motivating\r\n Scenario: Checkbox is required by default\r\n Given the user is filling out the registration form\r\n And the name fields have valid input\r\n And the email field has valid input\r\n And the password field has valid input\r\n And the checkbox is not checked\r\n When they try to register\r\n Then the checkbox is highlighted in red\r\n And the error message says \"Must be checked\"\r\n\r\n @landmine\r\n Scenario: Checkboxes with the same \"checkbox-name\" are not submitted in the form data\r\n Given the register form has the following html\r\n \"\"\"\r\n <sqm-portal-register>\r\n <sqm-name-fields slot=\"formData\"></sqm-name-fields>\r\n <sqm-checkbox-field\r\n slot=\"formData\"\r\n checkbox-label=\"I am not a robot\"\r\n error-message=\"Cannot be a robot\"\r\n checkbox-name=\"isHuman\"\r\n ></sqm-checkbox-field>\r\n <div slot=\"terms\">\r\n <sqm-checkbox-field checkbox-name=\"isHuman\"></sqm-checkbox-field>\r\n </div>\r\n </sqm-portal-register>\r\n \"\"\"\r\n And the checkboxes are checked\r\n When the user tries to register\r\n Then the form is submitted\r\n But no field with key \"isHuman\" is included in the form data\r\n\r\n @motivating\r\n Scenario: Multiple checkboxes need different \"checkbox-name\" values\r\n Given the register form has the following html\r\n \"\"\"\r\n <sqm-portal-register>\r\n <sqm-name-fields slot=\"formData\"></sqm-name-fields>\r\n <sqm-checkbox-field\r\n slot=\"formData\"\r\n checkbox-label=\"I am not a robot\"\r\n error-message=\"Cannot be a robot\"\r\n checkbox-name=\"isHuman\"\r\n ></sqm-checkbox-field>\r\n <div slot=\"terms\">\r\n <sqm-checkbox-field checkbox-name=\"myCheckbox\"></sqm-checkbox-field>\r\n </div>\r\n </sqm-portal-register>\r\n \"\"\"\r\n And the checkboxes are not checked\r\n When the user tries to register\r\n Then both checkboxes are bordered in red\r\n And the checkboxes have different error messages\r\n When the user checks the boxes\r\n And tries to register\r\n Then the form is submitted\r\n And the following fields are included in the form data\r\n | feilds |\r\n | isHuman |\r\n | myCheckbox |\r\n\r\n @motivating\r\n Scenario: Checkboxes can be optional\r\n Given the register form has the following html\r\n \"\"\"\r\n <sqm-portal-register>\r\n <sqm-name-fields slot=\"formData\"></sqm-name-fields>\r\n <sqm-checkbox-field\r\n slot=\"formData\"\r\n checkbox-label=\"I am not a robot\"\r\n checkbox-optional=\"true\"\r\n checkbox-name=\"isHuman\"\r\n />\r\n </sqm-portal-register>\r\n \"\"\"\r\n And the checkbox is not checked\r\n When the user tries to register\r\n Then there is no error for the checkbox\r\n\r\n @minutae\r\n Scenario Outline: Validation error message is configurable\r\n The error message string is evaluated as an ICU string, but currently is provided no context\r\n Given the checkbox is required\r\n And the checkbox has prop \"error-message\" with <propValue>\r\n When the user tries to register\r\n But they havent checked the checkbox\r\n Then they see <errorMessage> below\r\n Examples:\r\n | propValue | errorMessage |\r\n | | Must be checked |\r\n | My Custom Message | My Custom Message |\r\n\r\n @motivating\r\n Scenario Outline: Checkbox text and link are configurable\r\n Given the checkbox has the following prop values\r\n | prop | value |\r\n | checkbox-label | <labelText> |\r\n | checkbox-label-link | <labelLink> |\r\n | checkbox-label-link-text | <labelLinkText> |\r\n When the user views the checkbox\r\n Then they see <text>\r\n And when they click <labelLinkText> they are redirected to <labelLink>\r\n #First example below is the defaults set by the controller\r\n Examples:\r\n | labelText | labelLinkText | labelLink | text |\r\n | By signing up you agree to the {labelLink} | Terms and Conditions | https://example.com | By signing up you agree to the Terms and Conditions |\r\n | Read our {labelLink} before registration | Terms of Service | https://example.com/terms | Read our Terms of Service before registration |\r\n | By registering you agree to our terms and conditions | N/A | N/A | By registering you agree to our terms and conditions |\r\n\r\n @motivating\r\n Scenario: The form field name attribute is configurable\r\n Given the checkbox has prop \"checkbox-name\" with value \"myCheckBox\"\r\n When the user checks the box\r\n And they register\r\n Then the boolean value of the checkbox is submitted under \"myCheckBox\" field\r\n\r\n @minutae\r\n Scenario Outline: The checkbox field component fails fast if a checkbox name isn't provided\r\n Given the checkbox <mayHave> prop \"checkbox-name\"\r\n And it <mayHavePropValue>\r\n When a user views the checkbox\r\n Then an alert with an error message is displayed in place of the checkbox\r\n And it has a details section\r\n When \"More details\" is clicked\r\n Then the following information is displayed\r\n | information |\r\n | component being used |\r\n | missing attribute(s) |\r\n Examples:\r\n | mayBeAnAttribute | mayHavePropValue |\r\n | doesn't have | N/A |\r\n | has | \"\" |\r\n | has | |";
9897
9897
 
9898
9898
  const CheckboxField_stories = {
9899
9899
  title: "Components/Checkbox Field",
@@ -10173,7 +10173,7 @@ const UseDropdownField = /*#__PURE__*/Object.freeze({
10173
10173
  MissingName: MissingName$1
10174
10174
  });
10175
10175
 
10176
- const scenario$j = "@author:derek\r\n@owner:derek\r\nFeature: Form Input Field\r\n\r\n This component is used as a custom registration field during registration. The field can be text,\r\n a date or phone number. A motivating use case is to ask for a users company name, this value would then be mapped\r\n through the Managed Identity Service and upserted on the user after registration.\r\n\r\n Background: A user exists and is viewing the hosted portal registration\r\n Given a user is viewing \"/register\"\r\n And \"/register\" contains the registration form\r\n And the registration form has a custom input field\r\n\r\n @motivating\r\n Scenario Outline: Input fields are required by default but can be optional\r\n Given the input has prop \"field-optional\" with <value>\r\n And the input is empty\r\n When the user tries to register\r\n Then the input <mayBe> highlighted in red\r\n And an error message <mayAppear> in red below\r\n And form submission <mayBe> blocked\r\n Examples:\r\n | value | mayBe | mayAppear |\r\n | false | is | appears |\r\n | | is | appears |\r\n | true | isn't | doesn't appear |\r\n\r\n @motivating\r\n Scenario: Input field labels are configurable\r\n Given the input has prop \"field-label\" with value \"My Custom Input\"\r\n When the user views the registration form\r\n Then they see the input field\r\n And it has label \"My Custom Input\" above the input\r\n\r\n @minutae\r\n Scenario Outline: The validation error message is configurable\r\n The error message string is evaluated as an ICU string, but currently is provided no context\r\n Given the input is required\r\n And it has prop \"error-message\" with <value>\r\n When the user tries to register\r\n But they haven't filled in the input\r\n Then they see <errorMessage> below\r\n Examples:\r\n | value | errorMessage |\r\n | | Cannot be empty |\r\n | My Custom Message | My Custom Message |\r\n\r\n @motivating\r\n Scenario: Form data attribute name is configurable\r\n Given the input has prop \"field-name\" with value \"myCustomField\"\r\n When the user types \"testing testing\" into the input\r\n And they register\r\n Then \"testing testing\" is submitted under \"myCustomField\" in the form data\r\n\r\n @motivating\r\n Scenario Outline: The input field is a text input by default\r\n Given the input <mayHave> prop \"field-type\" with <value>\r\n When the user views the input field\r\n Then it is a text input\r\n Examples:\r\n | mayHave | value |\r\n | has | text |\r\n | doesn't have | |\r\n\r\n @motivating\r\n Scenario: Date type inputs are supported\r\n Given the input has prop \"field-type\" \"date\"\r\n When the user views the input field\r\n Then they see \"mm/dd/yyyy\" as a placeholder\r\n And they see a calendar icon on the right\r\n When they start typing a date\r\n Then it maintains the \"mm/dd/yyyy\" format\r\n When they click the calendar icon\r\n Then a dropdown appears\r\n And they see a calendar\r\n When they select a date\r\n Then it is applied to the input\r\n\r\n @motivating\r\n Scenario: Phone number type inputs are supported\r\n Given the input has prop \"field-type\" with value \"tel\"\r\n When the user starts typing a phone number in the input\r\n Then it is formatted into the following form \"(XXX) XXX-XXXX\"\r\n When they pre-fix their phone number with a \"1\"\r\n Then it is formatted into the following form \"1 (XXX) XXX-XXXX\"\r\n\r\n @landmine\r\n Scenario: Telephone formatting is removed after 10 numbers\r\n Given a user using a phone number input field\r\n And they entered their 10 character phone number\r\n And it was not prefixed with a 1\r\n When they add another character\r\n Then the formatting is removed\r\n\r\n @landmine\r\n Scenario Outline: Input values are always recorded as strings in the form data\r\n Given the input has prop \"field-type\" with <value>\r\n And it has a \"field-name\"\r\n When the user inputs <formInput>\r\n And they register\r\n Then <formData> is recorded in the form data as a string\r\n Examples:\r\n | value | formInput | formData |\r\n | text | Hello there | Hello there |\r\n | date | 05/07/2021 | 2021-05-07 |\r\n | tel | (250) 234-9877 | (250) 234-9877 |\r\n\r\n @minutae\r\n Scenario Outline: The input field component fails fast if a field name isn't provided\r\n Given the input <mayHave> prop \"field-name\"\r\n And it <mayHavePropValue>\r\n When a user views the input\r\n Then an alert with an error message is displayed in place of the input\r\n And it has a details section\r\n When \"More details\" is clicked\r\n Then the following information will be displayed\r\n | component being used |\r\n | missing attribute(s) |\r\n Examples:\r\n | mayBeAnAttribute | mayHavePropValue |\r\n | doesn't have | N/A |\r\n | has | \"\" |\r\n | has | |";
10176
+ const scenario$j = "@author:derek\r\n@owner:derek\r\nFeature: Form Input Field\r\n\r\n This component is used as a custom registration field during registration. The field can be text,\r\n a date or phone number. A motivating use case is to ask for a users company name, this value would then be mapped\r\n through the Managed Identity Service and upserted on the user after registration.\r\n\r\n Background: A user exists and is viewing the hosted portal registration\r\n Given a user is viewing \"/register\"\r\n And \"/register\" contains the registration form\r\n And the registration form has a custom input field\r\n\r\n @motivating\r\n Scenario Outline: Input fields are required by default but can be optional\r\n Given the input has prop \"field-optional\" with <value>\r\n And the input is empty\r\n When the user tries to register\r\n Then the input <mayBe> highlighted in red\r\n And an error message <mayAppear> in red below\r\n And form submission <mayBe> blocked\r\n Examples:\r\n | value | mayBe | mayAppear |\r\n | false | is | appears |\r\n | | is | appears |\r\n | true | isn't | doesn't appear |\r\n\r\n @motivating\r\n Scenario: Input field labels are configurable\r\n Given the input has prop \"field-label\" with value \"My Custom Input\"\r\n When the user views the registration form\r\n Then they see the input field\r\n And it has label \"My Custom Input\" above the input\r\n\r\n @minutae\r\n Scenario Outline: The validation error message is configurable\r\n The error message string is evaluated as an ICU string, but currently is provided no context\r\n Given the input is required\r\n And it has prop \"error-message\" with <value>\r\n When the user tries to register\r\n But they haven't filled in the input\r\n Then they see <errorMessage> below\r\n Examples:\r\n | value | errorMessage |\r\n | | Cannot be empty |\r\n | My Custom Message | My Custom Message |\r\n\r\n @motivating\r\n Scenario: Form data attribute name is configurable\r\n Given the input has prop \"field-name\" with value \"myCustomField\"\r\n When the user types \"testing testing\" into the input\r\n And they register\r\n Then \"testing testing\" is submitted under \"myCustomField\" in the form data\r\n\r\n @motivating\r\n Scenario Outline: The input field is a text input by default\r\n Given the input <mayHave> prop \"field-type\" with <value>\r\n When the user views the input field\r\n Then it is a text input\r\n Examples:\r\n | mayHave | value |\r\n | has | text |\r\n | doesn't have | |\r\n\r\n @motivating\r\n Scenario: Date type inputs are supported\r\n Given the input has prop \"field-type\" \"date\"\r\n When the user views the input field\r\n Then they see \"mm/dd/yyyy\" as a placeholder\r\n And they see a calendar icon on the right\r\n When they start typing a date\r\n Then it maintains the \"mm/dd/yyyy\" format\r\n When they click the calendar icon\r\n Then a dropdown appears\r\n And they see a calendar\r\n When they select a date\r\n Then it is applied to the input\r\n\r\n @landmine\r\n Scenario: The clear text button in the date picker does not clear the date\r\n Due to an incompatibility between our shoelace version and the browser, the clear funtionality is not supported currently\r\n Given the input has prop \"field-type\" \"date\"\r\n And the user has entered a date\r\n When they click the calendar icon\r\n And click the 'clear' text button\r\n Then their selected date is not cleared\r\n\r\n @motivating\r\n Scenario: Phone number type inputs are supported\r\n Given the input has prop \"field-type\" with value \"tel\"\r\n When the user starts typing a phone number in the input\r\n Then it is formatted into the following form \"(XXX) XXX-XXXX\"\r\n When they pre-fix their phone number with a \"1\"\r\n Then it is formatted into the following form \"1 (XXX) XXX-XXXX\"\r\n\r\n @landmine\r\n Scenario: Telephone formatting is removed after 10 numbers\r\n Given a user using a phone number input field\r\n And they entered their 10 character phone number\r\n And it was not prefixed with a 1\r\n When they add another character\r\n Then the formatting is removed\r\n\r\n @landmine\r\n Scenario Outline: Input values are always recorded as strings in the form data\r\n Given the input has prop \"field-type\" with <value>\r\n And it has a \"field-name\"\r\n When the user inputs <formInput>\r\n And they register\r\n Then <formData> is recorded in the form data as a string\r\n Examples:\r\n | value | formInput | formData |\r\n | text | Hello there | Hello there |\r\n | date | 05/07/2021 | 2021-05-07 |\r\n | tel | (250) 234-9877 | (250) 234-9877 |\r\n\r\n @minutae\r\n Scenario Outline: The input field component fails fast if a field name isn't provided\r\n Given the input <mayHave> prop \"field-name\"\r\n And it <mayHavePropValue>\r\n When a user views the input\r\n Then an alert with an error message is displayed in place of the input\r\n And it has a details section\r\n When \"More details\" is clicked\r\n Then the following information is displayed\r\n | information |\r\n | component being used |\r\n | missing attribute(s) |\r\n Examples:\r\n | mayBeAnAttribute | mayHavePropValue |\r\n | doesn't have | N/A |\r\n | has | \"\" |\r\n | has | |";
10177
10177
 
10178
10178
  const InputField_stories = {
10179
10179
  title: "Components/Input Field",
@@ -44,7 +44,7 @@ export class CheckboxField {
44
44
  },
45
45
  ]);
46
46
  if (!isDemo() && missingProps) {
47
- return h(RequiredPropsError, { missingProps: missingProps });
47
+ return (h(RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this form", subheading: "A technical problem prevented this checkbox field from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }));
48
48
  }
49
49
  const content = {
50
50
  ...getProps(this),
@@ -204,6 +204,9 @@ export class CheckboxField {
204
204
  "tags": [{
205
205
  "text": undefined,
206
206
  "name": "undocumented"
207
+ }, {
208
+ "text": "object",
209
+ "name": "uiType"
207
210
  }],
208
211
  "text": ""
209
212
  }
@@ -35,7 +35,7 @@ export class DropdownField {
35
35
  },
36
36
  ]);
37
37
  if (!isDemo() && missingProps) {
38
- return (h(RequiredPropsError, { missingProps: missingProps },
38
+ return (h(RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this form", subheading: "A technical problem prevented this drop down field from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" },
39
39
  h("slot", null)));
40
40
  }
41
41
  const content = {
@@ -155,6 +155,9 @@ export class DropdownField {
155
155
  "tags": [{
156
156
  "text": undefined,
157
157
  "name": "undocumented"
158
+ }, {
159
+ "text": "object",
160
+ "name": "uiType"
158
161
  }],
159
162
  "text": ""
160
163
  }
@@ -16,10 +16,11 @@ export class InputField {
16
16
  * @uiName Input Type
17
17
  * @uiType string
18
18
  * @uiEnum ["text", "date", "tel"]
19
+ * @uiEnumNames ["Text", "Date", "Phone Number"]
19
20
  */
20
21
  this.fieldType = "text";
21
22
  /**
22
- * @uiName Empty error message
23
+ * @uiName Required Error Message
23
24
  */
24
25
  this.errorMessage = "Cannot be empty";
25
26
  /**
@@ -40,7 +41,7 @@ export class InputField {
40
41
  },
41
42
  ]);
42
43
  if (!isDemo() && missingProps) {
43
- return h(RequiredPropsError, { missingProps: missingProps });
44
+ return (h(RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this form", subheading: "A technical problem prevented this input field from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }));
44
45
  }
45
46
  const { states } = isDemo() ? useInputFieldDemo(this) : useInputField();
46
47
  return h(InputFieldView, { states: states, content: content });
@@ -59,10 +60,10 @@ export class InputField {
59
60
  "optional": false,
60
61
  "docs": {
61
62
  "tags": [{
62
- "text": "Input name attribute",
63
+ "text": "Input Name Attribute",
63
64
  "name": "uiName"
64
65
  }],
65
- "text": ""
66
+ "text": "Used as the key of the inputs value in form data."
66
67
  },
67
68
  "attribute": "field-name",
68
69
  "reflect": false
@@ -79,7 +80,7 @@ export class InputField {
79
80
  "optional": false,
80
81
  "docs": {
81
82
  "tags": [{
82
- "text": "Input label",
83
+ "text": "Input Label",
83
84
  "name": "uiName"
84
85
  }],
85
86
  "text": ""
@@ -107,6 +108,9 @@ export class InputField {
107
108
  }, {
108
109
  "text": "[\"text\", \"date\", \"tel\"]",
109
110
  "name": "uiEnum"
111
+ }, {
112
+ "text": "[\"Text\", \"Date\", \"Phone Number\"]",
113
+ "name": "uiEnumNames"
110
114
  }],
111
115
  "text": ""
112
116
  },
@@ -126,7 +130,7 @@ export class InputField {
126
130
  "optional": false,
127
131
  "docs": {
128
132
  "tags": [{
129
- "text": "Empty error message",
133
+ "text": "Required Error Message",
130
134
  "name": "uiName"
131
135
  }],
132
136
  "text": ""
@@ -179,6 +183,9 @@ export class InputField {
179
183
  "tags": [{
180
184
  "text": undefined,
181
185
  "name": "undocumented"
186
+ }, {
187
+ "text": "object",
188
+ "name": "uiType"
182
189
  }],
183
190
  "text": ""
184
191
  }
@@ -92,6 +92,9 @@ export class NameFields {
92
92
  "tags": [{
93
93
  "text": undefined,
94
94
  "name": "undocumented"
95
+ }, {
96
+ "text": "object",
97
+ "name": "uiType"
95
98
  }],
96
99
  "text": ""
97
100
  }
@@ -17,7 +17,6 @@ export function usePortalRegister(props) {
17
17
  return;
18
18
  const key = control.name;
19
19
  const value = control.value;
20
- console.log({ key, value });
21
20
  jsonpointer.set(formData, key, value);
22
21
  // required validation
23
22
  if (control.required && !value) {
@@ -31,7 +31,7 @@ export class SqmReferralIframe {
31
31
  },
32
32
  ]);
33
33
  if (missingProps) {
34
- return h(RequiredPropsError, { missingProps: missingProps });
34
+ return (h(RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this page", subheading: "A technical problem prevented this iframe from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }));
35
35
  }
36
36
  const { states, data } = isDemo()
37
37
  ? useReferralIframeDemo(getProps(this))
@@ -1,6 +1,7 @@
1
1
  import { useHost } from "@saasquatch/component-boilerplate";
2
2
  import { useState } from "@saasquatch/universal-hooks";
3
3
  import { h } from "@stencil/core";
4
+ import { intl } from "../global/global";
4
5
  import { createStyleSheet } from "../styling/JSS";
5
6
  const style = {
6
7
  IconStyle: {
@@ -17,35 +18,38 @@ const style = {
17
18
  Heading: {
18
19
  display: "inline-block",
19
20
  },
20
- Alert: {
21
- margin: "28px",
22
- },
23
21
  Children: {
24
22
  display: "none",
25
23
  },
26
24
  };
27
25
  const sheet = createStyleSheet(style);
28
26
  const styleString = sheet.toString();
29
- export function RequiredPropsError({ missingProps }, children) {
27
+ export function RequiredPropsError({ missingProps, heading = "There was a problem loading this section", subheading = "There was a technical problem that prevented this section from loading. Please contact us with the link to this page.", description = "Error occured while loading <{tagName}>. Values for the following attributes are missing:", }, children) {
30
28
  if (!missingProps)
31
29
  return false;
32
30
  const host = useHost();
33
31
  const [detailsOpen, setDetailsOpen] = useState(false);
34
- return (h("sl-alert", { type: "danger", open: true, class: sheet.classes.Alert },
32
+ return (h("sl-alert", { type: "danger", open: true },
35
33
  h("style", { type: "text/css" }, styleString),
36
34
  h("div", { slot: "icon", class: sheet.classes.IconStyle },
37
35
  h("sl-icon", { name: "exclamation-octagon" })),
38
36
  h("div", { class: sheet.classes.DivStyle },
39
- h("h2", { class: sheet.classes.Heading }, "There was a problem loading this section"),
40
- h("p", null, "There was a technical problem that prevented this section from loading. Please contact us with the link to this page.")),
37
+ h("h2", { class: sheet.classes.Heading }, intl.formatMessage({
38
+ id: `error-heading`,
39
+ defaultMessage: heading,
40
+ })),
41
+ h("p", null, intl.formatMessage({
42
+ id: `error-subheading`,
43
+ defaultMessage: subheading,
44
+ }))),
41
45
  h("details", { class: sheet.classes.Details },
42
46
  h("summary", { onClick: () => setDetailsOpen(!detailsOpen) },
43
47
  detailsOpen ? "Less" : "More",
44
48
  " details"),
45
- h("p", null,
46
- "Error occured while loading ",
47
- `<${host.tagName.toLowerCase()}>`,
48
- ". Values for the following attributes are missing:"),
49
+ h("p", null, intl.formatMessage({
50
+ id: `error-description`,
51
+ defaultMessage: description,
52
+ }, { tagName: host.tagName.toLowerCase() })),
49
53
  h("ul", null, missingProps.map((prop) => (h("li", null,
50
54
  h("strong", null, prop.attribute)))))),
51
55
  h("div", { class: sheet.classes.Children }, children)));
@@ -134,35 +134,38 @@ const style = {
134
134
  Heading: {
135
135
  display: "inline-block",
136
136
  },
137
- Alert: {
138
- margin: "28px",
139
- },
140
137
  Children: {
141
138
  display: "none",
142
139
  },
143
140
  };
144
141
  const sheet = createStyleSheet(style);
145
142
  const styleString = sheet.toString();
146
- function RequiredPropsError({ missingProps }, children) {
143
+ function RequiredPropsError({ missingProps, heading = "There was a problem loading this section", subheading = "There was a technical problem that prevented this section from loading. Please contact us with the link to this page.", description = "Error occured while loading <{tagName}>. Values for the following attributes are missing:", }, children) {
147
144
  if (!missingProps)
148
145
  return false;
149
146
  const host = P();
150
147
  const [detailsOpen, setDetailsOpen] = useState(false);
151
- return (h$1("sl-alert", { type: "danger", open: true, class: sheet.classes.Alert },
148
+ return (h$1("sl-alert", { type: "danger", open: true },
152
149
  h$1("style", { type: "text/css" }, styleString),
153
150
  h$1("div", { slot: "icon", class: sheet.classes.IconStyle },
154
151
  h$1("sl-icon", { name: "exclamation-octagon" })),
155
152
  h$1("div", { class: sheet.classes.DivStyle },
156
- h$1("h2", { class: sheet.classes.Heading }, "There was a problem loading this section"),
157
- h$1("p", null, "There was a technical problem that prevented this section from loading. Please contact us with the link to this page.")),
153
+ h$1("h2", { class: sheet.classes.Heading }, intl.formatMessage({
154
+ id: `error-heading`,
155
+ defaultMessage: heading,
156
+ })),
157
+ h$1("p", null, intl.formatMessage({
158
+ id: `error-subheading`,
159
+ defaultMessage: subheading,
160
+ }))),
158
161
  h$1("details", { class: sheet.classes.Details },
159
162
  h$1("summary", { onClick: () => setDetailsOpen(!detailsOpen) },
160
163
  detailsOpen ? "Less" : "More",
161
164
  " details"),
162
- h$1("p", null,
163
- "Error occured while loading ",
164
- `<${host.tagName.toLowerCase()}>`,
165
- ". Values for the following attributes are missing:"),
165
+ h$1("p", null, intl.formatMessage({
166
+ id: `error-description`,
167
+ defaultMessage: description,
168
+ }, { tagName: host.tagName.toLowerCase() })),
166
169
  h$1("ul", null, missingProps.map((prop) => (h$1("li", null,
167
170
  h$1("strong", null, prop.attribute)))))),
168
171
  h$1("div", { class: sheet.classes.Children }, children)));
@@ -225,7 +228,7 @@ const CheckboxField = class {
225
228
  },
226
229
  ]);
227
230
  if (!jn() && missingProps) {
228
- return h$1(RequiredPropsError, { missingProps: missingProps });
231
+ return (h$1(RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this form", subheading: "A technical problem prevented this checkbox field from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }));
229
232
  }
230
233
  const content = {
231
234
  ...getProps(this),
@@ -351,7 +354,7 @@ const DropdownField = class {
351
354
  },
352
355
  ]);
353
356
  if (!jn() && missingProps) {
354
- return (h$1(RequiredPropsError, { missingProps: missingProps }, h$1("slot", null)));
357
+ return (h$1(RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this form", subheading: "A technical problem prevented this drop down field from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }, h$1("slot", null)));
355
358
  }
356
359
  const content = {
357
360
  ...getProps(this),
@@ -821,10 +824,11 @@ const InputField = class {
821
824
  * @uiName Input Type
822
825
  * @uiType string
823
826
  * @uiEnum ["text", "date", "tel"]
827
+ * @uiEnumNames ["Text", "Date", "Phone Number"]
824
828
  */
825
829
  this.fieldType = "text";
826
830
  /**
827
- * @uiName Empty error message
831
+ * @uiName Required Error Message
828
832
  */
829
833
  this.errorMessage = "Cannot be empty";
830
834
  /**
@@ -845,7 +849,7 @@ const InputField = class {
845
849
  },
846
850
  ]);
847
851
  if (!jn() && missingProps) {
848
- return h$1(RequiredPropsError, { missingProps: missingProps });
852
+ return (h$1(RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this form", subheading: "A technical problem prevented this input field from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }));
849
853
  }
850
854
  const { states } = jn() ? useInputFieldDemo(this) : useInputField();
851
855
  return h$1(InputFieldView, { states: states, content: content });
@@ -5352,7 +5356,6 @@ function usePortalRegister(props) {
5352
5356
  return;
5353
5357
  const key = control.name;
5354
5358
  const value = control.value;
5355
- console.log({ key, value });
5356
5359
  jsonpointer.set(formData, key, value);
5357
5360
  // required validation
5358
5361
  if (control.required && !value) {
@@ -5841,7 +5844,7 @@ const SqmReferralIframe = class {
5841
5844
  },
5842
5845
  ]);
5843
5846
  if (missingProps) {
5844
- return h$1(RequiredPropsError, { missingProps: missingProps });
5847
+ return (h$1(RequiredPropsError, { missingProps: missingProps, heading: "An error occured while loading this page", subheading: "A technical problem prevented this iframe from loading. Please contact us with the link to this page.", description: "Values for the following attributes are missing:" }));
5845
5848
  }
5846
5849
  const { states, data } = jn()
5847
5850
  ? useReferralIframeDemo(getProps(this))