2.0.1 • Published 3 years ago

@smartpartner/postdirekt-autocomplete v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Smartpartner Autocomplete

this is a branch of netresearch/postdirekt-autocomplete-monorepo which supports building (house number) selection when country, zip, city and street is selected

SDK Developer and Contribution Workflow

Prerequisites

Node.js

Before you can start working on the Autocomplete monorepo, you need to have Node.js installed on your machine. The currently supported versions are 10.0.0 or greater.

To download Node.js visit https://nodejs.org/en/download/.

NOTE: You can use a tool like NVM or N to install and manage multiple node versions

Yarn

In addition to Node.js we use yarn to facilitate multi package development.

To install yarn follow the instructions listed on their website: https://yarnpkg.com/en/docs/install

Verify Prerequisites

You can verify your setup by running the following commands in your terminal:

$ node -v
$ yarn -v

Your Node.js version should be 10.0.0 or greater, your yarn version should be 1.0.0 or greater,

Install Dependencies

Once you have Node.js and yarn installed on your machine and have validated that you are running the proper version, you can set up the development environment by running the following at the root of the repo:

$ yarn

Once you have installed all the dependencies, you can build both packages by running the following command the root of the repo:

$ yarn build

Packages

packages/autocomplete-sdk

This folder contains modified @netresearch/postdirekt-autocomplete-sdk, responsible for abstracting away the Deutsche Post Direkt Autocomplete 2.0 API.

See Readme.

packages/autocomplete-library

This folder contains modified _@netresearch/postdirekt-autocomplete-library, responsible for registering input listeners on given input fields (street address, city, postcode and house number) and fetching address suggestions from the Autocomplete API via the autocomplete-sdk package.

See Readme.

    postDirekt = postdirektAutocompleteLib.init(
        document.getElementById('street'),
        document.getElementById('city'),
        document.getElementById('postcode'),
        document.getElementById('house_nr'),
        document.getElementById('country'),
        'DE',
        '_hash_'            
    );

Testing the packages

Running the Tests

You can run the tests with the command

$ yarn test

To run the linter, do

$ yarn lint

Building the packages

You can build ES2017 compatible artifacts (this is what's published on npm) with

$ yarn build

You can also build ES5 compatible artifacts (output in <rootDir>/dist) with

$ yarn build:es5
ababacorn-jsxacorn-walkacornacorn-globalsansi-escapesansi-regexajvanymatcharr-diffargparsearr-unionansi-stylesarray-uniquearr-flattenarray-equalarray-includesassign-symbolsastral-regexarray.prototype.flatasyncasn1at-least-nodeassert-plusatobbabel-plugin-istanbulaws4aws-sign2asynckitbabel-plugin-jest-hoistbabel-jestbabel-preset-jestbabel-preset-current-node-syntaxbrace-expansionbalanced-matchbasebcrypt-pbkdfbserbs-loggerbrowser-process-hrtimebracesbrowser-resolvebuiltin-modulesbrowserslistbuffer-fromcallsitescache-basecaniuse-litecapture-exitcall-bindcaselesscamelcasechardetcli-widthcli-cursorchalkcliuiclass-utilsci-infocollection-visitcollect-v8-coveragecocolor-convertcommondircolor-namecoloretteconcat-mapcolorscombined-streamcomponent-emittercommanderconvert-source-mapconfusing-browser-globalscopy-descriptorcore-util-iscssomcoverallscssstyledata-urlscyclecross-fetchdebugdecode-uri-componentdecamelizedashdashdeep-equalcross-spawndefine-propertydeep-isdeepmergedefine-propertiesdiff-sequencesdelayed-streamdoctrineelectron-to-chromiumdomexceptionecc-jsbndetect-newlineencodingemoji-regexes-abstracterror-exend-of-streames-to-primitivees6-promiseescape-string-regexpeslintescodegenescaladeeslint-config-airbnbeslint-module-utilseslint-config-airbnb-baseeslint-scopeeslint-import-resolver-nodeeslint-visitor-keyseslint-plugin-importesprimaeslint-config-airbnb-typescripteslint-utilsesrecurseesqueryespreeestraverseestree-walkerexec-shesutilsexitextend-shallowexpectextglobexpand-bracketseyesexecaexternal-editorextendextsprintffast-deep-equalfill-rangefiguresfile-entry-cachefast-json-stable-stringifyfind-cache-dirfb-watchmanfor-inflattedforever-agentfragment-cacheform-datafs.realpathfast-levenshteinfunction-bindfs-extrafseventsget-package-typeflat-cachegensyncfind-upget-intrinsicfunctional-red-black-treeglobget-streamgetpassget-caller-filehar-validatorgraceful-fshar-schemagrowlyglob-parentglobalshashas-bigintsget-valuehas-valueshas-flaghosted-git-infohas-valuehtml-encoding-snifferhtml-escaperhttp-signatureihas-symbolsimport-freshhuman-signalsiconv-liteignoreinflightimurmurhashimport-localip-regexis-accessor-descriptorinterpretinheritsis-bigintinquireris-data-descriptoris-boolean-objectis-arrayishis-callableis-bufferis-descriptoris-extglobis-ciis-date-objectis-fullwidth-code-pointis-extendableis-moduleis-dockeris-generator-fnis-globis-core-moduleis-negative-zerois-referenceis-number-objectis-numberis-symbolis-streamis-regexis-stringis-plain-objectis-windowsisarrayis-typedarrayisobjectisexeis-wslistanbul-lib-coverageisstreamisomorphic-fetchistanbul-lib-instrumentjest-cliistanbul-lib-source-mapsjest-changed-filesistanbul-lib-reportjest-diffjestistanbul-reportsjest-configjest-environment-nodejest-fetch-mockjest-haste-mapjest-docblockjest-get-typejest-eachjest-environment-jsdomjest-junitjest-jasmine2jest-leak-detectorjest-matcher-utilsjest-regex-utiljest-resolvejest-mockjest-message-utiljest-snapshotjest-runtimejest-serializerjest-utiljest-pnp-resolverjs-tokensjest-runnerjest-resolve-dependenciesjest-watcherjest-workerjest-validatejson-parse-better-errorsjsdomjson-parse-even-better-errorsjs-yamljsbnjson-schema-traversejson-stringify-safejsonfilejson-schemajson-stable-stringify-without-jsonifyjson5jsprimlevenkind-oflines-and-columnskleurjsesclodash.camelcaselevnlocate-pathlodash.sortbylodash.memoizeload-json-filelodashlcov-parsemagic-stringlru-cachelolexmap-cachemap-visitmake-dirmake-errormerge-streammime-typesmakeerrormimic-fnminimatchmixin-deepmime-dbminimistmicromatchmslog-drivermkdirpnatural-comparemute-streamnode-modules-regexpnice-trynode-int64normalize-package-datananomatchncpnormalize-pathnode-releasesnode-fetchnpm-run-pathnwsapioauth-signobject-copyobject-keysonceobject-visitnode-notifierobject.valuesobject-inspectobject.assignobject.entriesoptionatorp-each-seriesobject.pickonetimep-finallyos-tmpdirp-tryp-limitparent-moduleparse5p-locatepascalcasepath-is-absolutepath-keypath-parsepath-existsperformance-nowpicomatchpkg-dirpifypiratesparse-jsonpkg-uppretty-formatprelude-lspnpromptpath-typepromise-polyfillpslrandombytesprogresspumpqsreadread-pkgpromptspunycodereact-isregex-notrealpath-nativeread-pkg-uprechoirposix-character-classesremove-trailing-separatorrepeat-stringrequestrequest-promise-coreregexpprequest-promise-nativerequire-main-filenameresolveretrequire-directoryrepeat-elementresolve-urlresolve-cwdrevalidatorrestore-cursorrimrafrollupresolve-fromrollup-pluginutilsrollup-plugin-typescript2rsvprollup-plugin-sourcemapsrun-asyncsafe-buffersaneset-blockingsafer-bufferrxjssafe-regexsaxesserialize-javascriptshellwordssemvershebang-commandshelljsshebang-regexsignal-exitslashsisteransisource-map-resolveslice-ansiset-valuesnapdragonsnapdragon-utilsnapdragon-nodesourcemap-codecsource-mapsource-map-supportspdx-expression-parsesource-map-urlspdx-exceptionssplit-stringspdx-license-idssshpkspdx-correctstack-tracestack-utilsstatic-extendstring-lengthstring-widthstealthy-requiresprintf-jsstring.prototype.trimendstring.prototype.trimstartstrip-final-newlinestrip-json-commentsstrip-eofstrip-ansistrip-bomsymbol-treesupports-hyperlinkstersertablesupports-colorterminal-linktext-tabletest-excludethroattmplthroughtmpto-object-pathto-fast-propertiestr46to-regexts-jesttough-cookieto-regex-rangetslibtsconfig-pathstype-festtunnel-agenttype-checkuglify-jstypedarray-to-buffertypescripttweetnacltsutilstype-detectunbox-primitiveutileunion-valueuri-jsunset-valueuseuniversalifyurixuuidv8-to-istanbulvalidate-npm-package-licenseverrorw3c-xmlserializerw3c-hr-timev8-compile-cachewhatwg-encodingwebidl-conversionswhatwg-fetchwhatwg-mimetypewhatwg-urlwhich-modulewinstonwalkerwrap-ansiwhichwhich-boxed-primitivewritewrappywsword-wrapxmly18nxml-name-validatorxmlcharsyallistwrite-file-atomicyargs-parseryargs
2.0.1

3 years ago

2.0.0

3 years ago