Skip to content

Commit

Permalink
Merge pull request #16 from experianplc/268725_anz_enhancement_addres…
Browse files Browse the repository at this point in the history
…s_validation_demo_engine

268725 anz enhancement address validation demo engine
  • Loading branch information
sufangl authored Feb 20, 2024
2 parents 2c930cc + ff31e3f commit ab0752c
Show file tree
Hide file tree
Showing 24 changed files with 2,871 additions and 815 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ After instantiating a new instance the constructor returns an object that can be
| `post-formatting-search` | After the formatting search has returned a result | ```address.events.on("post-formatting-search", function(data){ // ... });```|
| `post-reset` | After the demo has been reset | ```address.events.on("post-reset", function(){ // ... });```|
| `post-search-type-change` | After the search type has been changed | ```address.events.on("post-search-type-change", function(searchType){ // ... });```|
| `post-datasets-update` | To populate the authorized country dataset(s) into the country dataset dropdown | ```address.events.on("post-datasets-update", function(){ // ... });```|
| `error-display` | To display error when the selected search type is not supported for the country dataset selected | ```address.events.on("error-display", function (error){ // ... });```|
| `request-timeout` | A timeout occurred during the XMLHttpRequest | ```address.events.on("request-timeout", function(xhr){ // ... });```|
| `request-error` | A generic error occurred initiating the XMLHttpRequest | ```address.events.on("request-error", function(xhr){ // ... });```|
| `request-error-400` | A 400 Bad Request error occurred | ```address.events.on("request-error-400", function(xhr){ // ... });```|
Expand Down
57 changes: 57 additions & 0 deletions dist/css/experian-address-validation.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,63 @@
display: none;
}

h2, h3{
display:inline-block;
}

.collapsible {
padding-left: 2px;
}

.tab {
display: inline-block;
margin-left: var(--spaces);
}

.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black;
}

.tooltip .tooltiptext {
visibility: hidden;
width: 250px;
background-color: #406eb3;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -60px;
opacity: 0;
transition: opacity 0.3s;
}

.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #406eb3 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}

.error-display .error-msg{
color: red;
font-weight: bold;
}

/* Loading spinner styles */
@-webkit-keyframes spinner {
0% {
Expand Down
1 change: 1 addition & 0 deletions dist/js/address-metadata-display.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/js/experian-address-validation.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/js/search-address-handling.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 25 additions & 3 deletions dist/lib/address-search.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
import Request from './request';
import { AddressSearchOptions, AddressValidationSearchType, AddressValidationMode } from './search-options';
import { AddressSearchOptions, AddressValidationMode, AddressValidationSearchType } from './search-options';
import { EnrichmentDetails } from './class-types';
export default class AddressValidation {
options: AddressSearchOptions;
searchType: AddressValidationSearchType;
avMode: AddressValidationMode;
events: any;
request: Request;
countryDropdown: {
country: string;
iso3Code: string;
iso2Code: string;
datasetCode: string;
searchType: string;
}[];
componentsCollectionMap: Map<string, string>;
metadataCollectionMap: Map<string, string>;
geocodes: EnrichmentDetails;
cvHousehold: EnrichmentDetails;
tooltipDescriptionMap: Map<string, string>;
premiumLocationInsightMap: Map<string, string>;
private baseUrl;
private datasetsEndpoint;
private searchEndpoint;
private lookupEndpoint;
private lookupV2Endpoint;
private validateEndpoint;
private promptsetEndpoint;
private stepInEndpoint;
Expand All @@ -18,7 +33,10 @@ export default class AddressValidation {
private inputs;
private lastSearchTerm;
private currentSearchTerm;
private lookupType;
private returnAddresses;
private currentCountryCode;
private currentCountryName;
private currentDataSet;
private hasSearchInputBeenReset;
private countryCodeMapping;
Expand All @@ -28,9 +46,10 @@ export default class AddressValidation {
constructor(options: AddressSearchOptions);
setToken(token: string): void;
setSearchType(searchType: AddressValidationSearchType): void;
getLookupEnrichmentData(key: string): void;
getEnrichmentData(globalAddressKey: string): void;
private callEnrichment;
private setup;
private handleEnrichmentResult;
private getParameter;
private get token();
private mergeDefaultOptions;
Expand All @@ -40,6 +59,7 @@ export default class AddressValidation {
setInputs(inputs?: HTMLInputElement[]): void;
private registerInputs;
private setCountryList;
private handleDatasetsResponse;
private handleCountryListChange;
private generateSearchDataForApiCall;
private generateLookupDataForApiCall;
Expand All @@ -50,10 +70,12 @@ export default class AddressValidation {
private canSearch;
private poweredByLogo;
private createPicklist;
private formatLookupLocalityWithoutAddresses;
private format;
private refine;
private lookup;
private result;
private populateResponseToMap;
private checkTab;
private searchSpinner;
private toggleSearchInputs;
Expand Down
Loading

0 comments on commit ab0752c

Please sign in to comment.