@ta-interaktiv/react-municipality-search 1.3.0 → 1.4.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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
4
4
 
5
+ # [1.4.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.3.0...@ta-interaktiv/react-municipality-search@1.4.0) (2022-05-18)
6
+
7
+ ### Features
8
+
9
+ - updated to react-spring ^9.4.5 ([2e1c8a1](https://gitlab.com/ta-interaktiv/packages/commit/2e1c8a19acc0963bae2feb563a90286d2e24168c))
10
+
5
11
  # [1.3.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.2.2...@ta-interaktiv/react-municipality-search@1.3.0) (2022-04-20)
6
12
 
7
13
  ### Bug Fixes
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ var React__default = _interopDefault(React);
9
9
  require('@ta-interaktiv/semantic-ui/semantic/dist/components/icon.css');
10
10
  require('@ta-interaktiv/semantic-ui/semantic/dist/components/input.css');
11
11
  require('@ta-interaktiv/semantic-ui/semantic/dist/components/label.css');
12
- var renderprops_cjs_js = require('react-spring/renderprops.cjs.js');
12
+ var reactSpring = require('react-spring');
13
13
  var IntlMessageFormat = _interopDefault(require('intl-messageformat'));
14
14
 
15
15
  /*! *****************************************************************************
@@ -334,10 +334,10 @@ var MunicipalitySearch = (function (_super) {
334
334
  React__default.createElement("i", { className: 'search icon' })),
335
335
  !this.props.hideTooltip && (React__default.createElement("div", null,
336
336
  React__default.createElement("label", { htmlFor: 'search', className: "ui " + (this.state.error ? 'red' : 'basic grey') + " " + labelDirection + " label" }, labelContent())))),
337
- showResults(results) && (React__default.createElement("div", { className: "results " + styles.results }, showResults(results) && (React__default.createElement(renderprops_cjs_js.Transition, { native: true, items: results, keys: function (result) {
337
+ showResults(results) && (React__default.createElement("div", { className: "results " + styles.results }, showResults(results) && (React__default.createElement(reactSpring.Transition, { native: true, items: results, keys: function (result) {
338
338
  return result.PLZ4 + result.GDENR + result.ORTNAME;
339
- }, from: { transform: 'translate(0,-20px)', opacity: 0 }, enter: { transform: 'translate(0,0px)', opacity: 1 }, leave: { transform: 'translate(0, 60px)', opacity: 0 }, config: renderprops_cjs_js.config.gentle }, function (result) { return function (props) {
340
- return (React__default.createElement(renderprops_cjs_js.animated.div, { onClick: function () {
339
+ }, from: { transform: 'translate(0,-20px)', opacity: 0 }, enter: { transform: 'translate(0,0px)', opacity: 1 }, leave: { transform: 'translate(0, 60px)', opacity: 0 }, config: reactSpring.config.gentle }, function (values, result) {
340
+ return (React__default.createElement(reactSpring.animated.div, { onClick: function () {
341
341
  _this.props.onSelectionHandler(result);
342
342
  if (_this.props.showLastSelectedMunicipalities) {
343
343
  _this.pushToLocalStorageArray(result);
@@ -352,7 +352,7 @@ var MunicipalitySearch = (function (_super) {
352
352
  _this.resetComponent();
353
353
  }
354
354
  }
355
- }, className: "result " + styles.result, style: props, tabIndex: 0 },
355
+ }, className: "result " + styles.result, style: values, tabIndex: 0 },
356
356
  React__default.createElement("div", { className: styles.resultHeader },
357
357
  React__default.createElement("span", { className: styles.resultPlz }, result.PLZ4),
358
358
  ' ',
@@ -361,7 +361,7 @@ var MunicipalitySearch = (function (_super) {
361
361
  t('list.municipalityPrefix'),
362
362
  " ",
363
363
  result.GDENAMK)));
364
- }; }))))));
364
+ }))))));
365
365
  };
366
366
  MunicipalitySearch.defaultProps = {
367
367
  municipalityData: '2021v3',
package/es/index.js CHANGED
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
2
2
  import '@ta-interaktiv/semantic-ui/semantic/dist/components/icon.css';
3
3
  import '@ta-interaktiv/semantic-ui/semantic/dist/components/input.css';
4
4
  import '@ta-interaktiv/semantic-ui/semantic/dist/components/label.css';
5
- import { Transition, config, animated } from 'react-spring/renderprops.cjs.js';
5
+ import { Transition, config, animated } from 'react-spring';
6
6
  import IntlMessageFormat from 'intl-messageformat';
7
7
 
8
8
  /*! *****************************************************************************
@@ -329,7 +329,7 @@ var MunicipalitySearch = (function (_super) {
329
329
  React.createElement("label", { htmlFor: 'search', className: "ui " + (this.state.error ? 'red' : 'basic grey') + " " + labelDirection + " label" }, labelContent())))),
330
330
  showResults(results) && (React.createElement("div", { className: "results " + styles.results }, showResults(results) && (React.createElement(Transition, { native: true, items: results, keys: function (result) {
331
331
  return result.PLZ4 + result.GDENR + result.ORTNAME;
332
- }, from: { transform: 'translate(0,-20px)', opacity: 0 }, enter: { transform: 'translate(0,0px)', opacity: 1 }, leave: { transform: 'translate(0, 60px)', opacity: 0 }, config: config.gentle }, function (result) { return function (props) {
332
+ }, from: { transform: 'translate(0,-20px)', opacity: 0 }, enter: { transform: 'translate(0,0px)', opacity: 1 }, leave: { transform: 'translate(0, 60px)', opacity: 0 }, config: config.gentle }, function (values, result) {
333
333
  return (React.createElement(animated.div, { onClick: function () {
334
334
  _this.props.onSelectionHandler(result);
335
335
  if (_this.props.showLastSelectedMunicipalities) {
@@ -345,7 +345,7 @@ var MunicipalitySearch = (function (_super) {
345
345
  _this.resetComponent();
346
346
  }
347
347
  }
348
- }, className: "result " + styles.result, style: props, tabIndex: 0 },
348
+ }, className: "result " + styles.result, style: values, tabIndex: 0 },
349
349
  React.createElement("div", { className: styles.resultHeader },
350
350
  React.createElement("span", { className: styles.resultPlz }, result.PLZ4),
351
351
  ' ',
@@ -354,7 +354,7 @@ var MunicipalitySearch = (function (_super) {
354
354
  t('list.municipalityPrefix'),
355
355
  " ",
356
356
  result.GDENAMK)));
357
- }; }))))));
357
+ }))))));
358
358
  };
359
359
  MunicipalitySearch.defaultProps = {
360
360
  municipalityData: '2021v3',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ta-interaktiv/react-municipality-search",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "React component that allows searching for Swiss municipalities with either ZIP code or place names.",
5
5
  "keywords": [
6
6
  "react",
@@ -46,12 +46,15 @@
46
46
  "dependencies": {
47
47
  "@ta-interaktiv/semantic-ui": "^3.3.3",
48
48
  "intl-messageformat": "^2.2.0",
49
- "react-spring": "^8.0.19"
49
+ "react-spring": "^9.4.5"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@ta-interaktiv/semantic-ui": "^3.1.0",
53
53
  "react": ">=16.0.0",
54
54
  "react-dom": ">=16.0.0"
55
55
  },
56
- "gitHead": "1a2b9e052efec5d218999ec99dbaa8a008e0c153"
56
+ "devDependencies": {
57
+ "@react-spring/types": "^9.4.5"
58
+ },
59
+ "gitHead": "a43facdb171c04efa0d9e2a6d1d25918f0a92635"
57
60
  }
@@ -8,7 +8,7 @@ import {
8
8
  animated,
9
9
  config as springConfig,
10
10
  Transition,
11
- } from 'react-spring/renderprops.cjs.js'
11
+ } from 'react-spring'
12
12
  import IntlMessageFormat from 'intl-messageformat'
13
13
  import de from './locales/de.yml'
14
14
  import fr from './locales/fr.yml'
@@ -459,7 +459,7 @@ export class MunicipalitySearch extends Component<Props, State> {
459
459
  leave={{ transform: 'translate(0, 60px)', opacity: 0 }}
460
460
  config={springConfig.gentle}
461
461
  >
462
- {(result) => (props) =>
462
+ {(values, result) =>
463
463
  (
464
464
  <animated.div
465
465
  onClick={() => {
@@ -482,7 +482,7 @@ export class MunicipalitySearch extends Component<Props, State> {
482
482
  }
483
483
  }}
484
484
  className={`result ${styles.result}`}
485
- style={props}
485
+ style={values}
486
486
  tabIndex={0}
487
487
  >
488
488
  <div className={styles.resultHeader}>