@sheerid/jslib-nightly 2.214.0-alpha.4 → 2.215.0-alpha.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/FormFieldTypeahead.css +4 -4
- package/README.md +187 -0
- package/_mysheerid-preview.css +4 -4
- package/_mysheerid-preview.js +316 -316
- package/_mysheerid-preview.js.map +1 -1
- package/chunk/ActiveDutyStartDateComponent-8ed93MIc.js +4 -4
- package/chunk/ActiveDutyStartDateComponent-BfkF0ser.js +4 -4
- package/chunk/AddressComponent-AiyIPiCz.js +4 -4
- package/chunk/AddressComponent-DV2Wsw6k.js +4 -4
- package/chunk/CaptchaComponent-CSCvSY8Y.js +4 -4
- package/chunk/CaptchaComponent-DcxyBvrf.js +4 -4
- package/chunk/ChangeLocaleComponent-Cu2DR-Q3.js +4 -4
- package/chunk/ChangeLocaleComponent-DUnfgQuX.js +4 -4
- package/chunk/City-BmrJpnS6.js +4 -4
- package/chunk/City-yVVnZQTP.js +4 -4
- package/chunk/CollegeNameComponent-DqIROnau.js +4 -4
- package/chunk/CollegeNameComponent-OwbvKomU.js +4 -4
- package/chunk/CopyToClipboardComponent-9hyfSMC0.js +4 -4
- package/chunk/CopyToClipboardComponent-H3bJGcOM.js +4 -4
- package/chunk/CountryComponentWrapper--2UQ7mXP.js +4 -4
- package/chunk/CountryComponentWrapper-Ceq-eink.js +4 -4
- package/chunk/DriverLicenseNumberComponent-D9cakdvU.js +4 -4
- package/chunk/DriverLicenseNumberComponent-ziLNYB8e.js +4 -4
- package/chunk/EBTCardNumberComponent-BbL9NoDt.js +4 -4
- package/chunk/EBTCardNumberComponent-ps7LjMyZ.js +4 -4
- package/chunk/EmailLoopPending-In0FH-Ap.js +4 -4
- package/chunk/EmailLoopPending-lxRF0bx8.js +4 -4
- package/chunk/FirstResponderOrganizationComponent-BJ_sSKyU.js +4 -4
- package/chunk/FirstResponderOrganizationComponent-CIRKlR-B.js +4 -4
- package/chunk/FormFieldInputSelect-CjWY_ush.js +4 -4
- package/chunk/FormFieldInputSelect-o7QZaYhS.js +4 -4
- package/chunk/FormFieldLayout-DDEEmlGC.js +4 -4
- package/chunk/FormFieldLayout-DEVPpEyA.js +4 -4
- package/chunk/FormFieldText-CJ-GVpZE.js +4 -4
- package/chunk/FormFieldText-CaWtYVur.js +4 -4
- package/chunk/FormFieldTypeahead-D0_jXok8.js +4 -4
- package/chunk/FormFieldTypeahead-vwV0QGbl.js +4 -4
- package/chunk/FormSelectChoice-BahCx4wG.js +4 -4
- package/chunk/FormSelectChoice-C-rIlDKl.js +4 -4
- package/chunk/InputText-CCNbZmMe.js +4 -4
- package/chunk/InputText-PEiatRRJ.js +4 -4
- package/chunk/LicensedProfessionalOrganizationComponent-CDUu7n6S.js +4 -4
- package/chunk/LicensedProfessionalOrganizationComponent-DfulwYkx.js +4 -4
- package/chunk/MedicalProfessionalOrganizationComponent-DNENwJq-.js +4 -4
- package/chunk/MedicalProfessionalOrganizationComponent-RGG8iBdc.js +4 -4
- package/chunk/MemberIdComponent-C8mVSo9m.js +4 -4
- package/chunk/MemberIdComponent-oanWSvQh.js +4 -4
- package/chunk/MembershipOrganizationComponent-B4bYo0LI.js +4 -4
- package/chunk/MembershipOrganizationComponent-BPkKoRE3.js +4 -4
- package/chunk/Onfido-BG8cDEVW.js +4 -4
- package/chunk/PersonalInfoStepSubmitButton-j44RdZDq.js +4 -4
- package/chunk/PersonalInfoStepSubmitButton-v_kWLmEw.js +4 -4
- package/chunk/PersonalInfoStepWrapper-BOBNCgik.js +4 -4
- package/chunk/PersonalInfoStepWrapper-PV06WMKL.js +4 -4
- package/chunk/PostalCodeComponent-DrCcV90W.js +4 -4
- package/chunk/PostalCodeComponent-KXVfZkLx.js +4 -4
- package/chunk/SSN-B_z2R4Bx.js +4 -4
- package/chunk/SSN-Hb1lTx8A.js +4 -4
- package/chunk/StateSelectComponent-CChSqKXz.js +4 -4
- package/chunk/StateSelectComponent-CIpB-Rh1.js +4 -4
- package/chunk/StatusComponent-C6J1B7Tl.js +4 -4
- package/chunk/StatusComponent-pmuIhuXi.js +4 -4
- package/chunk/StepCard-CIfaQVu-.js +4 -4
- package/chunk/StepCard-dcwCtPrW.js +4 -4
- package/chunk/StepCollectMilitaryStatusComponent-C02BKffq.js +4 -4
- package/chunk/StepCollectMilitaryStatusComponent-CaP-tPJA.js +4 -4
- package/chunk/StepDriverLicensePersonalInfoComponent-C4QRbgMC.js +4 -4
- package/chunk/StepDriverLicensePersonalInfoComponent-I3LNN4GB.js +4 -4
- package/chunk/StepGeneralIdentityPersonalInfoComponent-Bw6WDrOP.js +4 -4
- package/chunk/StepGeneralIdentityPersonalInfoComponent-CGIiAyvk.js +4 -4
- package/chunk/StepHybridIdentityPersonalInfoComponent-BAe_HzjN.js +4 -4
- package/chunk/StepHybridIdentityPersonalInfoComponent-kE7xVuag.js +4 -4
- package/chunk/StepIDCheckLoopOnfido-Sg4a19wV.js +4 -4
- package/chunk/StepIDCheckLoopOnfido-djTS20UT.js +4 -4
- package/chunk/StepIDCheckLoopRegula-B5I-ojjy.js +4 -4
- package/chunk/StepIDCheckLoopRegula-DZA5G1Z6.js +4 -4
- package/chunk/StepInactiveMilitaryPersonalInfoComponent-BBsJj3Sm.js +4 -4
- package/chunk/StepInactiveMilitaryPersonalInfoComponent-DDwAnwM5.js +4 -4
- package/chunk/TeacherSchoolComponent-CQsnm2Ob.js +4 -4
- package/chunk/TeacherSchoolComponent-DFtsbQdJ.js +4 -4
- package/chunk/ar-uNi-5jZs.js +4 -4
- package/chunk/bg-BSs2zI8g.js +4 -4
- package/chunk/bn-IN-DgKTANOE.js +4 -4
- package/chunk/cs-ZQhsI2gf.js +4 -4
- package/chunk/da-Ca6-P-fb.js +4 -4
- package/chunk/de-qTizo3k0.js +4 -4
- package/chunk/downshift.esm-CtrbqQGL.js +4 -4
- package/chunk/downshift.esm-huKBwB2d.js +4 -4
- package/chunk/el-Ci0_i7um.js +4 -4
- package/chunk/en-GB-BMFtN6kg.js +4 -4
- package/chunk/es-10I2Uwx1.js +4 -4
- package/chunk/es-ES-BEtGV8ZY.js +4 -4
- package/chunk/fi-VAIle52X.js +4 -4
- package/chunk/fr-CA-YGnUj1Cd.js +4 -4
- package/chunk/fr-CmkojiS4.js +4 -4
- package/chunk/ga-CTdDfi4f.js +4 -4
- package/chunk/hi-IN-mBG2SFX6.js +4 -4
- package/chunk/hr-D8voB0hC.js +4 -4
- package/chunk/hu-DzN9Oup5.js +4 -4
- package/chunk/id-ZqMlj7_U.js +4 -4
- package/chunk/index-5ENZBJEX.js +4 -4
- package/chunk/index-B0SBEWOf.js +4 -4
- package/chunk/index-B2w8GxVA.js +4 -4
- package/chunk/index-B88uZBY0.js +4 -4
- package/chunk/index-BA3bE-f-.js +4 -4
- package/chunk/index-BWVPL9OQ.js +4 -4
- package/chunk/index-BZ1nv-sB.js +4 -4
- package/chunk/index-BbOCWcRK.js +4 -4
- package/chunk/index-BfLyVxHW.js +4 -4
- package/chunk/index-Bn00xQJF.js +4 -4
- package/chunk/index-BoJdZalW.js +4 -4
- package/chunk/index-Brpm5gN6.js +4 -4
- package/chunk/index-BvxBxJg1.js +4 -4
- package/chunk/index-C4dHeTGl.js +4 -4
- package/chunk/index-CARFmnRY.js +4 -4
- package/chunk/index-CHDBBfsg.js +4 -4
- package/chunk/index-CR19uOwz.js +4 -4
- package/chunk/index-CTGY1a4m.js +4 -4
- package/chunk/index-CaBrLsal.js +4 -4
- package/chunk/index-CaQ-a7L7.js +4 -4
- package/chunk/index-Cn27i0i0.js +4 -4
- package/chunk/index-CnlkYvi8.js +4 -4
- package/chunk/index-CrGgYYxL.js +4 -4
- package/chunk/index-CrPc1exn.js +4 -4
- package/chunk/index-CsFSxihY.js +4 -4
- package/chunk/index-D2d6x5LN.js +4 -4
- package/chunk/index-D2nA_06X.js +4 -4
- package/chunk/index-D3EKpvm9.js +4 -4
- package/chunk/index-D7Mqx5na.js +4 -4
- package/chunk/index-DFoMYB8K.js +4 -4
- package/chunk/index-DIkWpujR.js +4 -4
- package/chunk/index-DeW_gAIO.js +4 -4
- package/chunk/index-DhehscKj.js +4 -4
- package/chunk/index-DzdL5k0x.js +4 -4
- package/chunk/index-EUJqfdiJ.js +4 -4
- package/chunk/index-JJtRAk_6.js +4 -4
- package/chunk/index-MB6FRj7G.js +4 -4
- package/chunk/index-dTu4ORna.js +4 -4
- package/chunk/index-dWqQPCim.js +4 -4
- package/chunk/index-kldzFCt7.js +4 -4
- package/chunk/index-pw3DJwhY.js +4 -4
- package/chunk/is-OeoxCvCJ.js +4 -4
- package/chunk/it-C8ZVZXAZ.js +4 -4
- package/chunk/iw-BlNWQ44s.js +4 -4
- package/chunk/ja-ByZsq6B3.js +4 -4
- package/chunk/ko-CJtRHc1k.js +4 -4
- package/chunk/lo-DG5_kBxI.js +4 -4
- package/chunk/lt-CPMjVK0l.js +4 -4
- package/chunk/militaryStepHelpers-BAkdVJwA.js +4 -4
- package/chunk/militaryStepHelpers-BBHrfNCB.js +4 -4
- package/chunk/mocks-CeAm-JFs.js +4 -4
- package/chunk/mocks-ClJ0M6QH.js +4 -4
- package/chunk/ms-kW4-QxcQ.js +4 -4
- package/chunk/nl-BE-B50g9ESZ.js +4 -4
- package/chunk/nl-CqhguuWs.js +4 -4
- package/chunk/no-oDvd5Pbh.js +4 -4
- package/chunk/pl-CmJTwwaK.js +4 -4
- package/chunk/pt-BR-Bn7yzXgL.js +4 -4
- package/chunk/pt-CO5wB188.js +4 -4
- package/chunk/ro-sj1FJM-g.js +4 -4
- package/chunk/ru-8IiNvgy2.js +4 -4
- package/chunk/sk-aGVgcFKm.js +4 -4
- package/chunk/sl-BhNdkTbu.js +4 -4
- package/chunk/sr-BMFHnZm-.js +4 -4
- package/chunk/sv-B_eq88ce.js +4 -4
- package/chunk/sw-DbdFPGF8.js +4 -4
- package/chunk/th-BYY2tGFz.js +4 -4
- package/chunk/tr-d4Yjkvpu.js +4 -4
- package/chunk/uk-Cm64Vc92.js +4 -4
- package/chunk/ur-DFf2LHi5.js +4 -4
- package/chunk/useCollectFieldsEndpoint-Cd6d_u47.js +4 -4
- package/chunk/useCollectFieldsEndpoint-DqTjyVEr.js +4 -4
- package/chunk/useMetrics-D2fG6cgw.js +4 -4
- package/chunk/useMetrics-wq7yrL0b.js +4 -4
- package/chunk/vi-DDgpUcog.js +4 -4
- package/chunk/zh-BoejQGiZ.js +4 -4
- package/chunk/zh-HK-Bwd8sr9B.js +4 -4
- package/chunk/zu-BKlg24xX.js +4 -4
- package/package.json +1 -1
- package/sheerid-install.css +4 -4
- package/sheerid-install.js +4 -4
- package/sheerid.css +4 -4
- package/sheerid.js +332 -332
- package/sheerid.js.map +1 -1
package/FormFieldTypeahead.css
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* This file is not intended for use in other contexts and there are no guarantees about its behavior outside of MySheerID.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* VERSION: 2.
|
|
8
|
-
* BUILD_TIMESTAMP:
|
|
9
|
-
* BUILD_DATE: Tue Apr 14 2026
|
|
10
|
-
* BUILD_COMMIT:
|
|
7
|
+
* VERSION: 2.215.0-alpha.0
|
|
8
|
+
* BUILD_TIMESTAMP: 1776202890174
|
|
9
|
+
* BUILD_DATE: Tue Apr 14 2026 21:41:30 GMT+0000 (Coordinated Universal Time)
|
|
10
|
+
* BUILD_COMMIT: ceb803335dbda9716b81bda554fd4f45c81e4441
|
|
11
11
|
*/
|
|
12
12
|
.sid-selected-org__wrapper:focus-within .sid-selected-org__container{outline:2px solid var(--sheerid-color-focus, Highlight);outline-offset:2px}.sid-selected-org__container{background:var(--sheerid-color-fg-10);display:flex;gap:var(--sheerid-font-size-medium);padding:var(--sheerid-font-size-medium);place-items:center}.sid-selected-org__clear{background:transparent;border:0;border-radius:3px;color:var(--sheerid-color-fg);cursor:pointer;display:inline-block;font-size:24px;font-weight:lighter;padding:1px 5px}.sid-selected-org__clear:hover{background:var(--sheerid-color-fg-20)}.sid-selected-org__name{flex-grow:1;font-size:var(--sheerid-font-size-body);font-weight:400}.sid-selected-org__location{color:var(--sheerid-color-fg-70);display:block}.sid-input-clear-button{background-color:transparent;border:none;height:100%;margin:0;padding:0;position:absolute;top:0;width:35px}.sid-ltr .sid-input-clear-button{right:0}.sid-rtl .sid-input-clear-button{left:0}.sid-input-clear-button--disabled{cursor:not-allowed}.sid-text-input{padding-right:30px;text-overflow:ellipsis}
|
package/README.md
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# SheerID JavaScript Library
|
|
2
|
+
|
|
3
|
+
See [https://developer.sheerid.com](https://developer.sheerid.com) for more
|
|
4
|
+
|
|
5
|
+
## Step 1: Overview
|
|
6
|
+
|
|
7
|
+
An overview of SheerID Installation Methods can be found [**here**](https://developer.sheerid.com/js-library)
|
|
8
|
+
|
|
9
|
+
This readme demonstrates options when SheerID is installed via the CDN.
|
|
10
|
+
|
|
11
|
+
## Step 2: Install via the CDN
|
|
12
|
+
|
|
13
|
+
Click [**here**](https://developer.sheerid.com/js-library#installation) for instructions. Once you have an html page with a form rendered in a div, you are ready to reference the various options outlined in this README
|
|
14
|
+
|
|
15
|
+
## Set Options
|
|
16
|
+
|
|
17
|
+
After step 2 you should have something like this:
|
|
18
|
+
|
|
19
|
+
<div id="my-form"></div>
|
|
20
|
+
<script type="module">
|
|
21
|
+
import sheerId from "https://cdn.jsdelivr.net/npm/@sheerid/jslib@2/sheerid-install.js"
|
|
22
|
+
|
|
23
|
+
// Create a program at my.sheerid.com
|
|
24
|
+
var myProgramId = '<YOUR_PROGRAM_ID>';
|
|
25
|
+
var myDiv = document.getElementById('my-form');
|
|
26
|
+
var myForm = new sheerId.loadInlineIframe(myDiv, myProgramId);
|
|
27
|
+
myForm.setOptions({ logLevel: "info" })
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
Many of the custom behaviors SheerID offers are exposed via `setOptions`. `sheerId.setOptions({logLevel: 'info'});` is setting the log level of the library to info, for increased debugging output while testing your program.
|
|
31
|
+
|
|
32
|
+
### Available Options
|
|
33
|
+
|
|
34
|
+
Pass all or a part of the following object to `sheerId.setOptions()`:
|
|
35
|
+
|
|
36
|
+
customFormFields: [],
|
|
37
|
+
doFetchTheme: true,
|
|
38
|
+
httpRequestTimeout: 10000, // ms
|
|
39
|
+
locale: null,
|
|
40
|
+
logLevel: "error",
|
|
41
|
+
messagesWithLocale: {},
|
|
42
|
+
minimumOrganizationSearchLength: 1,
|
|
43
|
+
mockStep: undefined,
|
|
44
|
+
mockSubSegment: undefined,
|
|
45
|
+
mockErrorId: undefined,
|
|
46
|
+
mockErrorDetailId: undefined,
|
|
47
|
+
mockCaptchaError: undefined,
|
|
48
|
+
mockRewardCode: undefined,
|
|
49
|
+
mockRedirectUrl: undefined,
|
|
50
|
+
mockResponse: undefined,
|
|
51
|
+
privacyPolicyUrl: undefined,
|
|
52
|
+
useFingerprinting: false,
|
|
53
|
+
verificationId: undefined,
|
|
54
|
+
|
|
55
|
+
For a full list of options, see https://developer.sheerid.com/jslib-api-docs/index.html#options
|
|
56
|
+
|
|
57
|
+
## Custom Form Fields
|
|
58
|
+
|
|
59
|
+
Custom form fields have the following interface:
|
|
60
|
+
|
|
61
|
+
export interface FormFieldConfig {
|
|
62
|
+
fieldId: string; // should be camelCase. Will be used the key in metadata where the value is stored. Also used to build localization message keys
|
|
63
|
+
fieldType: string; // Only text for now. Later: | "select" | "radio", etc
|
|
64
|
+
validate: (value: string | boolean) => ErrorId | string | undefined; // If value is invalid, return an error id or string so the error msg can be localized and shown
|
|
65
|
+
showPlaceholderAndHideLabel?: boolean;
|
|
66
|
+
required?: boolean;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
At the time of writing, only `fieldType=text` is supported. Provide an array of custom form fields to `setOptions` and they will be added below other form fields.
|
|
70
|
+
|
|
71
|
+
The data that is collected for custom fields is attached to the verification as metadata with the metadata key = `fieldId`. This data will show up in Verification Reports.
|
|
72
|
+
|
|
73
|
+
myForm.setOptions({
|
|
74
|
+
customFormFields: [
|
|
75
|
+
{
|
|
76
|
+
fieldId: "favoriteHairColor",
|
|
77
|
+
fieldType: "text",
|
|
78
|
+
showPlaceholderAndHideLabel: false,
|
|
79
|
+
required: true,
|
|
80
|
+
validate: (value) => {
|
|
81
|
+
if (!value) {
|
|
82
|
+
return "hairColorRequired"; // this becomes `errorId.hairColorRequired` in your localized messages object
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
You will want to provide localized messaging for your field, which can be done with setOptions as well:
|
|
90
|
+
|
|
91
|
+
myForm.setOptions({
|
|
92
|
+
messagesWithLocale: {
|
|
93
|
+
"en-US": {
|
|
94
|
+
favoriteHairColorPlaceholder: 'My hair is...',
|
|
95
|
+
favoriteHairColorLabel: 'Hair Color',
|
|
96
|
+
'errorId.hairColorRequired': 'Hair Color is Required',
|
|
97
|
+
},
|
|
98
|
+
es: {
|
|
99
|
+
testPlaceholder: 'Mi pelo es...',
|
|
100
|
+
testLabel: 'Color de pelo',
|
|
101
|
+
'errorId.myCustomErrorId': 'Se requiere color de cabello',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
**Note:** placeholder and label message keys are automatically formulated based on the fieldId: `${fieldId}Placeholder` and `${fieldId}Label`
|
|
107
|
+
|
|
108
|
+
See it in action: https://jsfiddle.net/AaronSheerID/n91p2sya/
|
|
109
|
+
|
|
110
|
+
Custom form fields of type `checkbox` are available as well. They do not use placeholder or required values. You can construct a validation callback to enforce that they are true or false, and display any error message accordingly.
|
|
111
|
+
|
|
112
|
+
## Hooks
|
|
113
|
+
|
|
114
|
+
Hooks are a convenient way to run your own javascript function(s) when the core jslib does certain things. They are helpful because you don't need to know a lot about the system to do certain things at certain times.
|
|
115
|
+
|
|
116
|
+
To add a hook, call addHook with the HookName and a callback. The callback will be passed relevant parameter(s) that you may or may not choose to utilize.
|
|
117
|
+
|
|
118
|
+
the form objects returned from modals or from inline iframes have `on` and
|
|
119
|
+
`once` methods to run your own code when events happen inside the verification
|
|
120
|
+
process.
|
|
121
|
+
|
|
122
|
+
```javascript
|
|
123
|
+
myForm.on("ON_VERIFICATION_SUCCESS", (verificationResponse) => {
|
|
124
|
+
window.location = "new.html";
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
myForm.once("ON_VERIFICATION_SUCCESS", (verificationResponse) => {
|
|
128
|
+
window.location = "new.html";
|
|
129
|
+
});
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
`on` and `once` return an unsubscribe function you can use to remove listeners.
|
|
133
|
+
|
|
134
|
+
```javascript
|
|
135
|
+
var unsubscribe = myForm.on("ON_FORM_LOCALE_CHANGE", (locale) => {
|
|
136
|
+
window.alert(`new locale: ${locale}`);
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
unsubscribe();
|
|
140
|
+
// The above callback will no longer run on locale changes.
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
There are 4 hooks you can use:
|
|
144
|
+
|
|
145
|
+
`ON_VERIFICATION_READY`
|
|
146
|
+
|
|
147
|
+
When the page loads, several api requests take place. Once they've all returned, and the library has initialized, ON_VERIFICATION_READY is called. After calling this hook once, your callbacks are removed/reset to ensure this happens only once per page-load (UX-346)
|
|
148
|
+
|
|
149
|
+
Your callback is given the `VerificationResponse` object
|
|
150
|
+
|
|
151
|
+
`ON_VERIFICATION_SUCCESS`
|
|
152
|
+
|
|
153
|
+
Called right after the API responds with the success step, but before the viewModel is updated in response to that API response.
|
|
154
|
+
|
|
155
|
+
Your callback is given the `VerificationResponse` object
|
|
156
|
+
|
|
157
|
+
`ON_VERIFICATION_STEP_CHANGE`
|
|
158
|
+
|
|
159
|
+
Called any time the current viewModel's step is different from the API response (just received)'s step. In other words, when the library determines we're about to display a different step.
|
|
160
|
+
Your callback is given the `VerificationResponse` object
|
|
161
|
+
|
|
162
|
+
`ON_FORM_LOCALE_CHANGE`
|
|
163
|
+
|
|
164
|
+
Called any time the current viewModel's locale is updated. Typically, this action occurs whenever a user changes their locale using the locale picker.
|
|
165
|
+
|
|
166
|
+
Your callback is provided the `Locale` string
|
|
167
|
+
|
|
168
|
+
See it in action [here](https://jsfiddle.net/AaronSheerID/adnj61ke/)
|
|
169
|
+
|
|
170
|
+
## Extra Messages
|
|
171
|
+
|
|
172
|
+
In addition to overriding any message, you can add extra text to a specific region on the form. Normally no text is shown in these spots. To add text, just define it using `setOptions()` along with the appropriate message key:
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
sheerId.setOptions({
|
|
176
|
+
messagesWithLocale: {
|
|
177
|
+
"en-US": {
|
|
178
|
+
extraMessageCollectAboveSubmit: 'Lorem ipsum...',
|
|
179
|
+
},
|
|
180
|
+
es: {
|
|
181
|
+
extraMessageCollectAboveSubmit: 'Lorem ipsum... (es)',
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
});
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
At this time only `extraMessageCollectAboveSubmit` is available. This message with show right above the Submit button on the collect step for any Segment.
|
package/_mysheerid-preview.css
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* This file is not intended for use in other contexts and there are no guarantees about its behavior outside of MySheerID.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* VERSION: 2.
|
|
8
|
-
* BUILD_TIMESTAMP:
|
|
9
|
-
* BUILD_DATE: Tue Apr 14 2026
|
|
10
|
-
* BUILD_COMMIT:
|
|
7
|
+
* VERSION: 2.215.0-alpha.0
|
|
8
|
+
* BUILD_TIMESTAMP: 1776202890174
|
|
9
|
+
* BUILD_DATE: Tue Apr 14 2026 21:41:30 GMT+0000 (Coordinated Universal Time)
|
|
10
|
+
* BUILD_COMMIT: ceb803335dbda9716b81bda554fd4f45c81e4441
|
|
11
11
|
*/
|
|
12
12
|
.sid-inline-iframe{border:0;height:100%;min-width:32rem}.sid-modal__wrapper{background:#fff;border-radius:5px;box-shadow:#989898 10px 10px 15px;left:50%;max-height:calc(100% - 80px);opacity:0;outline:none;overflow-y:auto;position:fixed;top:50%;transform:translate(-50%,-50%);transition:opacity .3s linear;width:32rem;z-index:9998}.sid-modal__wrapper.fade-in{opacity:1}.sid-modal__iframe{border:0;display:block;height:100%;min-width:250px;width:100%}.sid-modal__close-button{align-items:center;background:none;border:none;color:inherit;cursor:pointer;display:flex;flex-direction:row;position:absolute;right:10px;text-decoration:none;top:10px;z-index:9999}.sid-modal__close-icon{background-image:url(https://services.sheerid.com/jsapi/img/btn1.png);background-repeat:no-repeat;filter:brightness(25%);height:20px;width:20px}.sid-modal__close-text{color:#000;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:var(--sheerid-font-size-body);margin-right:5px}.sid-modal__overlay{background-color:#b3b3b3;height:100%;left:0;opacity:0;position:fixed;top:0;transition:opacity .3s linear;width:100%;z-index:9997}.sid-modal__overlay.fade-in{opacity:.75}@media(max-width:620px){.sid-modal__wrapper{max-width:calc(100vw - 1rem)}}@media(max-width:32rem){.sid-inline-iframe{min-width:calc(100vw - 1rem);width:100%}}
|