@popsure/dirty-swan 0.66.28 → 0.66.29

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 (25) hide show
  1. package/dist/cjs/index.js +4 -4
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/lib/components/downloadButton/index.test.d.ts +1 -0
  4. package/dist/cjs/lib/components/input/autoSuggestInput/index.test.d.ts +1 -0
  5. package/dist/esm/components/autocompleteAddress/index.js +2 -2
  6. package/dist/esm/components/autocompleteAddress/index.js.map +1 -1
  7. package/dist/esm/components/autocompleteAddress/index.test.js +21 -12
  8. package/dist/esm/components/autocompleteAddress/index.test.js.map +1 -1
  9. package/dist/esm/components/downloadButton/index.js +1 -1
  10. package/dist/esm/components/downloadButton/index.js.map +1 -1
  11. package/dist/esm/components/downloadButton/index.test.js +25 -0
  12. package/dist/esm/components/downloadButton/index.test.js.map +1 -0
  13. package/dist/esm/components/input/autoSuggestInput/index.js +1 -1
  14. package/dist/esm/components/input/autoSuggestInput/index.js.map +1 -1
  15. package/dist/esm/components/input/autoSuggestInput/index.test.js +24 -0
  16. package/dist/esm/components/input/autoSuggestInput/index.test.js.map +1 -0
  17. package/dist/esm/lib/components/downloadButton/index.test.d.ts +1 -0
  18. package/dist/esm/lib/components/input/autoSuggestInput/index.test.d.ts +1 -0
  19. package/package.json +1 -1
  20. package/src/lib/components/autocompleteAddress/index.test.tsx +17 -11
  21. package/src/lib/components/autocompleteAddress/index.tsx +7 -0
  22. package/src/lib/components/downloadButton/index.test.tsx +22 -0
  23. package/src/lib/components/downloadButton/index.tsx +1 -0
  24. package/src/lib/components/input/autoSuggestInput/index.test.tsx +22 -0
  25. package/src/lib/components/input/autoSuggestInput/index.tsx +1 -0
package/dist/cjs/index.js CHANGED
@@ -11224,8 +11224,8 @@ var AutocompleteAddress = function (_a) {
11224
11224
  };
11225
11225
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: classNames("wmx8 bg-neutral-600 ".concat(styles$G['map-container']), (_b = {},
11226
11226
  _b[styles$G['map-container--hidden']] = place === null,
11227
- _b)), children: [jsxRuntime.jsx("div", { className: styles$G.map, id: "map", "aria-hidden": "true" }), isLoading && (jsxRuntime.jsx("div", { className: styles$G['loading-spinner'], children: jsxRuntime.jsx("div", { className: "ds-spinner ds-spinner__m" }) }))] }), jsxRuntime.jsx("div", { className: "wmx8", children: manualAddressEntry === false ? (jsxRuntime.jsxs("div", { style: { position: 'relative' }, children: [jsxRuntime.jsx(Input, { className: "w100", id: "autocomplete", "data-cy": "autocomplete", type: "text", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.manualAddressEntry) || 'Search for address', ref: autocompleteElement, disabled: hasLoadedGoogleAPI === false }, "autocomplete-search"), hasLoadedGoogleAPI === false && (jsxRuntime.jsx("div", { "data-cy": "google-api-loader", className: styles$G['loading-spinner'], children: jsxRuntime.jsx("div", { className: "ds-spinner ds-spinner__m" }) }))] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "d-flex c-gap16 ".concat(styles$G['input-line']), children: [jsxRuntime.jsx(Input, __assign({ className: "w100", "data-cy": "autocomplete", type: "text", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.street) || 'Street', value: (address === null || address === void 0 ? void 0 : address.street) || '', onChange: onManualAddressChange(), name: "street" }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.street), "autocomplete-street"), jsxRuntime.jsx(Input, __assign({ className: "wmx2 ".concat(styles$G['house-number-input']), "data-cy": "autocomplete-house-number", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.houseNumber) || 'House number', value: (address === null || address === void 0 ? void 0 : address.houseNumber) || '', name: "houseNumber", onChange: onManualAddressChange() }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.houseNumber), "autocomplete-house-number")] }), jsxRuntime.jsx(Input, __assign({ className: "mt16", "data-cy": "autocomplete-additional-info", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.additionalInformation) ||
11228
- 'Additional information (C/O, apartment, etc.)', value: (address === null || address === void 0 ? void 0 : address.additionalInformation) || '', name: "additionalInformation", onChange: onManualAddressChange({ updatePlace: false }) }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.additionalInformation), "autocomplete-additional-info"), jsxRuntime.jsxs("div", { className: "d-flex mt16 c-gap16 ".concat(styles$G['input-line']), children: [jsxRuntime.jsx(Input, __assign({ className: "w100", "data-cy": "autocomplete-postcode", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.postcode) || 'Postcode', value: (address === null || address === void 0 ? void 0 : address.postcode) || '', name: "postcode", onChange: onManualAddressChange() }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.postcode), "autocomplete-postcode"), jsxRuntime.jsx(Input, __assign({ className: "w100", "data-cy": "autocomplete-city", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.city) || 'City', value: (address === null || address === void 0 ? void 0 : address.city) || '', name: "city", onChange: onManualAddressChange() }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.city), "autocomplete-city")] })] })) }), manualAddressEntry === false && (jsxRuntime.jsxs("div", { className: "p-p mt8", children: [(manualAddressEntryTexts === null || manualAddressEntryTexts === void 0 ? void 0 : manualAddressEntryTexts.preText) || 'Or ', jsxRuntime.jsx("button", { className: 'p-a p-p fw-bold c-pointer bg-transparent', onClick: handleEnterAddressManually, type: "button", children: (manualAddressEntryTexts === null || manualAddressEntryTexts === void 0 ? void 0 : manualAddressEntryTexts.cta) || 'enter address manually' })] }))] }));
11227
+ _b)), children: [jsxRuntime.jsx("div", { className: styles$G.map, id: "map", "aria-hidden": "true" }), isLoading && (jsxRuntime.jsx("div", { className: styles$G['loading-spinner'], children: jsxRuntime.jsx("div", { className: "ds-spinner ds-spinner__m" }) }))] }), jsxRuntime.jsx("div", { className: "wmx8", children: manualAddressEntry === false ? (jsxRuntime.jsxs("div", { style: { position: 'relative' }, children: [jsxRuntime.jsx(Input, { className: "w100", id: "autocomplete", "data-cy": "autocomplete", "data-testid": "autocomplete", type: "text", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.manualAddressEntry) || 'Search for address', ref: autocompleteElement, disabled: hasLoadedGoogleAPI === false }, "autocomplete-search"), hasLoadedGoogleAPI === false && (jsxRuntime.jsx("div", { "data-cy": "google-api-loader", "data-testid": "google-api-loader", className: styles$G['loading-spinner'], children: jsxRuntime.jsx("div", { className: "ds-spinner ds-spinner__m" }) }))] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "d-flex c-gap16 ".concat(styles$G['input-line']), children: [jsxRuntime.jsx(Input, __assign({ className: "w100", "data-cy": "autocomplete", "data-testid": "autocomplete", type: "text", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.street) || 'Street', value: (address === null || address === void 0 ? void 0 : address.street) || '', onChange: onManualAddressChange(), name: "street" }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.street), "autocomplete-street"), jsxRuntime.jsx(Input, __assign({ className: "wmx2 ".concat(styles$G['house-number-input']), "data-cy": "autocomplete-house-number", "data-testid": "autocomplete-house-number", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.houseNumber) || 'House number', value: (address === null || address === void 0 ? void 0 : address.houseNumber) || '', name: "houseNumber", onChange: onManualAddressChange() }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.houseNumber), "autocomplete-house-number")] }), jsxRuntime.jsx(Input, __assign({ className: "mt16", "data-cy": "autocomplete-additional-info", "data-testid": "autocomplete-additional-info", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.additionalInformation) ||
11228
+ 'Additional information (C/O, apartment, etc.)', value: (address === null || address === void 0 ? void 0 : address.additionalInformation) || '', name: "additionalInformation", onChange: onManualAddressChange({ updatePlace: false }) }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.additionalInformation), "autocomplete-additional-info"), jsxRuntime.jsxs("div", { className: "d-flex mt16 c-gap16 ".concat(styles$G['input-line']), children: [jsxRuntime.jsx(Input, __assign({ className: "w100", "data-cy": "autocomplete-postcode", "data-testid": "autocomplete-postcode", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.postcode) || 'Postcode', value: (address === null || address === void 0 ? void 0 : address.postcode) || '', name: "postcode", onChange: onManualAddressChange() }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.postcode), "autocomplete-postcode"), jsxRuntime.jsx(Input, __assign({ className: "w100", "data-cy": "autocomplete-city", "data-testid": "autocomplete-city", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.city) || 'City', value: (address === null || address === void 0 ? void 0 : address.city) || '', name: "city", onChange: onManualAddressChange() }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.city), "autocomplete-city")] })] })) }), manualAddressEntry === false && (jsxRuntime.jsxs("div", { className: "p-p mt8", children: [(manualAddressEntryTexts === null || manualAddressEntryTexts === void 0 ? void 0 : manualAddressEntryTexts.preText) || 'Or ', jsxRuntime.jsx("button", { className: 'p-a p-p fw-bold c-pointer bg-transparent', onClick: handleEnterAddressManually, type: "button", children: (manualAddressEntryTexts === null || manualAddressEntryTexts === void 0 ? void 0 : manualAddressEntryTexts.cta) || 'enter address manually' })] }))] }));
11229
11229
  };
11230
11230
 
11231
11231
  var propTypes$2 = {exports: {}};
@@ -14571,7 +14571,7 @@ styleInject(css_248z$E);
14571
14571
 
14572
14572
  var InitialButton = function (_a) {
14573
14573
  var onDownload = _a.onDownload;
14574
- return (jsxRuntime.jsx(Button, { className: "w100 ".concat(styles$D.button), leftIcon: jsxRuntime.jsx(DownloadIcon, {}), onClick: onDownload, "data-cy": "download-documents-button", children: "Download" }));
14574
+ return (jsxRuntime.jsx(Button, { className: "w100 ".concat(styles$D.button), leftIcon: jsxRuntime.jsx(DownloadIcon, {}), onClick: onDownload, "data-cy": "download-documents-button", "data-testid": "download-documents-button", children: "Download" }));
14575
14575
  };
14576
14576
  // TODO: Allow setting loading to true to display text
14577
14577
  var GeneratingButton = function () { return (jsxRuntime.jsx(Button, { className: "w100 ".concat(styles$D.button), loading: true, children: "Generating" })); };
@@ -20100,7 +20100,7 @@ var AutoSuggestInput = function (_a) {
20100
20100
  _a)), children: suggestion.value })] }));
20101
20101
  };
20102
20102
  var getSuggestionValue = function (suggestion) { return suggestion.value; };
20103
- var renderInputComponent = function (autoSuggestInputProps) { return (jsxRuntime.jsx(Input, __assign({}, autoSuggestInputProps, { placeholder: placeholder, "data-cy": "suggest-multi-select-input" }))); };
20103
+ var renderInputComponent = function (autoSuggestInputProps) { return (jsxRuntime.jsx(Input, __assign({}, autoSuggestInputProps, { placeholder: placeholder, "data-cy": "suggest-multi-select-input", "data-testid": "suggest-multi-select-input" }))); };
20104
20104
  return (jsxRuntime.jsx("div", { className: className, children: jsxRuntime.jsx(Autosuggest, { theme: styles$p, suggestions: suggestions, onSuggestionsFetchRequested: handleSuggestionFetchRequest, onSuggestionsClearRequested: handleSuggestionClearRequest, getSuggestionValue: getSuggestionValue, renderSuggestion: renderSuggestion, highlightFirstSuggestion: true, inputProps: __assign(__assign({}, inputProps), { value: currentOption, onChange: function (_, _a) {
20105
20105
  var newValue = _a.newValue;
20106
20106
  onChange(newValue);