@qssolutions/ssas-registration-form 1.0.8 → 1.0.9
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/components/SSASRegistrationForm.d.ts.map +1 -1
- package/dist/index.esm.js +32 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +32 -4
- package/dist/index.js.map +1 -1
- package/dist/services/ApiService.d.ts.map +1 -1
- package/dist/web-component.js +32 -4
- package/dist/web-component.js.map +1 -1
- package/dist/web-component.min.js +1 -1
- package/dist/web-component.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21813,9 +21813,11 @@ class ApiService {
|
|
|
21813
21813
|
}
|
|
21814
21814
|
catch (error) {
|
|
21815
21815
|
console.error("Failed to fetch countries:", error);
|
|
21816
|
-
|
|
21816
|
+
const err = new Error(error.response?.data?.error ||
|
|
21817
21817
|
error.message ||
|
|
21818
21818
|
"Failed to fetch countries");
|
|
21819
|
+
err.status = error.response?.status;
|
|
21820
|
+
throw err;
|
|
21819
21821
|
}
|
|
21820
21822
|
}
|
|
21821
21823
|
/**
|
|
@@ -21859,9 +21861,11 @@ class ApiService {
|
|
|
21859
21861
|
}
|
|
21860
21862
|
catch (error) {
|
|
21861
21863
|
console.error("Failed to fetch org sizes:", error);
|
|
21862
|
-
|
|
21864
|
+
const err = new Error(error.response?.data?.error ||
|
|
21863
21865
|
error.message ||
|
|
21864
21866
|
"Failed to fetch organization sizes");
|
|
21867
|
+
err.status = error.response?.status;
|
|
21868
|
+
throw err;
|
|
21865
21869
|
}
|
|
21866
21870
|
}
|
|
21867
21871
|
/**
|
|
@@ -21880,9 +21884,11 @@ class ApiService {
|
|
|
21880
21884
|
}
|
|
21881
21885
|
catch (error) {
|
|
21882
21886
|
console.error("Failed to fetch industries:", error);
|
|
21883
|
-
|
|
21887
|
+
const err = new Error(error.response?.data?.error ||
|
|
21884
21888
|
error.message ||
|
|
21885
21889
|
"Failed to fetch industries");
|
|
21890
|
+
err.status = error.response?.status;
|
|
21891
|
+
throw err;
|
|
21886
21892
|
}
|
|
21887
21893
|
}
|
|
21888
21894
|
/**
|
|
@@ -22880,6 +22886,7 @@ const SSASRegistrationForm = ({ config, }) => {
|
|
|
22880
22886
|
const [isLoadingPartner, setIsLoadingPartner] = React.useState(false);
|
|
22881
22887
|
const [isLoadingLocalization, setIsLoadingLocalization] = React.useState(false);
|
|
22882
22888
|
const [partnerLoadFailed, setPartnerLoadFailed] = React.useState(false);
|
|
22889
|
+
const [isDomainNotWhitelisted, setIsDomainNotWhitelisted] = React.useState(false);
|
|
22883
22890
|
const isLoadingData = isLoadingCountries ||
|
|
22884
22891
|
isLoadingOrgSizes ||
|
|
22885
22892
|
isLoadingIndustries ||
|
|
@@ -22948,6 +22955,8 @@ const SSASRegistrationForm = ({ config, }) => {
|
|
|
22948
22955
|
})
|
|
22949
22956
|
.catch((error) => {
|
|
22950
22957
|
console.error("Failed to load countries:", error);
|
|
22958
|
+
if (error.status === 403)
|
|
22959
|
+
setIsDomainNotWhitelisted(true);
|
|
22951
22960
|
})
|
|
22952
22961
|
.finally(() => {
|
|
22953
22962
|
setIsLoadingCountries(false);
|
|
@@ -22970,6 +22979,8 @@ const SSASRegistrationForm = ({ config, }) => {
|
|
|
22970
22979
|
})
|
|
22971
22980
|
.catch((error) => {
|
|
22972
22981
|
console.error("Failed to load org sizes:", error);
|
|
22982
|
+
if (error.status === 403)
|
|
22983
|
+
setIsDomainNotWhitelisted(true);
|
|
22973
22984
|
})
|
|
22974
22985
|
.finally(() => {
|
|
22975
22986
|
setIsLoadingOrgSizes(false);
|
|
@@ -22986,6 +22997,8 @@ const SSASRegistrationForm = ({ config, }) => {
|
|
|
22986
22997
|
})
|
|
22987
22998
|
.catch((error) => {
|
|
22988
22999
|
console.error("Failed to load industries:", error);
|
|
23000
|
+
if (error.status === 403)
|
|
23001
|
+
setIsDomainNotWhitelisted(true);
|
|
22989
23002
|
})
|
|
22990
23003
|
.finally(() => {
|
|
22991
23004
|
setIsLoadingIndustries(false);
|
|
@@ -23179,7 +23192,22 @@ const SSASRegistrationForm = ({ config, }) => {
|
|
|
23179
23192
|
fontSize: mergedConfig.theme?.fonts?.sizes
|
|
23180
23193
|
?.subheading || 16,
|
|
23181
23194
|
lineHeight: "28px",
|
|
23182
|
-
} }, "Your company is not eligible to use this form. Please contact your administrator for assistance."))) : (React.createElement("
|
|
23195
|
+
} }, "Your company is not eligible to use this form. Please contact your administrator for assistance."))) : isDomainNotWhitelisted ? (React.createElement("div", { style: {
|
|
23196
|
+
textAlign: "center",
|
|
23197
|
+
padding: "40px 20px",
|
|
23198
|
+
color: "#605e5c",
|
|
23199
|
+
} },
|
|
23200
|
+
React.createElement("div", { style: {
|
|
23201
|
+
fontSize: mergedConfig.theme?.fonts?.sizes?.heading ||
|
|
23202
|
+
24,
|
|
23203
|
+
fontWeight: 700,
|
|
23204
|
+
marginBottom: 16,
|
|
23205
|
+
} }, "Domain Not Whitelisted"),
|
|
23206
|
+
React.createElement("div", { style: {
|
|
23207
|
+
fontSize: mergedConfig.theme?.fonts?.sizes
|
|
23208
|
+
?.subheading || 16,
|
|
23209
|
+
lineHeight: "28px",
|
|
23210
|
+
} }, "Your company has not registered this domain into the whitelist. Please contact QSSolutions admin to add it."))) : (React.createElement("form", { className: styles.formWrapper, style: mergedConfig.customStyles?.formWrapper, onSubmit: handleSubmit(submitForm), noValidate: true },
|
|
23183
23211
|
React.createElement("div", { style: { textAlign: "center" } },
|
|
23184
23212
|
React.createElement("div", { style: {
|
|
23185
23213
|
fontSize: mergedConfig.theme?.fonts?.sizes
|