@digitransit-component/digitransit-component-autosuggest 8.0.1 → 8.0.3
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/README.md +12 -12
- package/lib/index.cjs +1 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.development.cjs +23 -61
- package/lib/index.js +22 -60
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -6625,8 +6625,8 @@ const Suggestions = /*#__PURE__*/memo(function Suggestions(_ref2) {
|
|
|
6625
6625
|
lng,
|
|
6626
6626
|
styles,
|
|
6627
6627
|
hidden,
|
|
6628
|
-
renderClearHistoryButton,
|
|
6629
|
-
handleClearHistory
|
|
6628
|
+
renderClearHistoryButton = false,
|
|
6629
|
+
handleClearHistory = () => undefined
|
|
6630
6630
|
} = _ref2,
|
|
6631
6631
|
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
6632
6632
|
const [t] = useTranslation();
|
|
@@ -6665,10 +6665,6 @@ process.env.NODE_ENV !== "production" ? Suggestions.propTypes = {
|
|
|
6665
6665
|
renderClearHistoryButton: PropTypes.bool,
|
|
6666
6666
|
handleClearHistory: PropTypes.func
|
|
6667
6667
|
} : void 0;
|
|
6668
|
-
Suggestions.defaultProps = {
|
|
6669
|
-
renderClearHistoryButton: false,
|
|
6670
|
-
handleClearHistory: () => undefined
|
|
6671
|
-
};
|
|
6672
6668
|
|
|
6673
6669
|
/**
|
|
6674
6670
|
* Input clear button element
|
|
@@ -6721,13 +6717,13 @@ function Input({
|
|
|
6721
6717
|
ariaLabel,
|
|
6722
6718
|
inputRef,
|
|
6723
6719
|
styles,
|
|
6724
|
-
renderLabel,
|
|
6720
|
+
renderLabel = false,
|
|
6725
6721
|
isMobile,
|
|
6726
6722
|
inputClassName,
|
|
6727
6723
|
transportMode,
|
|
6728
6724
|
clearButtonColor,
|
|
6729
|
-
autoFocus,
|
|
6730
|
-
inputOnBlur,
|
|
6725
|
+
autoFocus = false,
|
|
6726
|
+
inputOnBlur = () => {},
|
|
6731
6727
|
onValueChange
|
|
6732
6728
|
}) {
|
|
6733
6729
|
const handleChange = e => {
|
|
@@ -6786,12 +6782,6 @@ process.env.NODE_ENV !== "production" ? Input.propTypes = {
|
|
|
6786
6782
|
inputOnBlur: PropTypes.func,
|
|
6787
6783
|
onValueChange: PropTypes.func.isRequired
|
|
6788
6784
|
} : void 0;
|
|
6789
|
-
Input.defaultProps = {
|
|
6790
|
-
autoFocus: false,
|
|
6791
|
-
renderLabel: false,
|
|
6792
|
-
transportMode: undefined,
|
|
6793
|
-
inputOnBlur: () => {}
|
|
6794
|
-
};
|
|
6795
6785
|
|
|
6796
6786
|
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6797
6787
|
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -7386,32 +7376,37 @@ function DTAutosuggest({
|
|
|
7386
7376
|
placeholder,
|
|
7387
7377
|
onSelect,
|
|
7388
7378
|
icon,
|
|
7389
|
-
value,
|
|
7379
|
+
value = '',
|
|
7390
7380
|
onClear,
|
|
7391
|
-
lang: lng,
|
|
7381
|
+
lang: lng = 'fi',
|
|
7392
7382
|
getAutoSuggestIcons,
|
|
7393
7383
|
handleViaPoints,
|
|
7394
7384
|
focusChange,
|
|
7395
7385
|
storeRef,
|
|
7396
|
-
isMobile,
|
|
7386
|
+
isMobile = false,
|
|
7397
7387
|
mobileLabel,
|
|
7398
|
-
inputClassName,
|
|
7388
|
+
inputClassName = '',
|
|
7399
7389
|
translatedPlaceholder,
|
|
7400
|
-
required,
|
|
7390
|
+
required = false,
|
|
7401
7391
|
ariaLabel,
|
|
7402
|
-
fontWeights
|
|
7403
|
-
|
|
7392
|
+
fontWeights = {
|
|
7393
|
+
medium: 500
|
|
7394
|
+
},
|
|
7395
|
+
colors = defaultColors,
|
|
7404
7396
|
modeSet,
|
|
7405
|
-
showScroll,
|
|
7406
|
-
isEmbedded,
|
|
7397
|
+
showScroll = false,
|
|
7398
|
+
isEmbedded = false,
|
|
7407
7399
|
transportMode,
|
|
7408
7400
|
targets,
|
|
7409
|
-
sources,
|
|
7401
|
+
sources = [],
|
|
7410
7402
|
geocodingSize,
|
|
7411
7403
|
filterResults,
|
|
7412
7404
|
searchContext,
|
|
7413
|
-
pathOpts
|
|
7414
|
-
|
|
7405
|
+
pathOpts = {
|
|
7406
|
+
routesPrefix: 'linjat',
|
|
7407
|
+
stopsPrefix: 'pysakit'
|
|
7408
|
+
},
|
|
7409
|
+
refPoint = {}
|
|
7415
7410
|
}) {
|
|
7416
7411
|
const [t] = useTranslation();
|
|
7417
7412
|
const initialState = {
|
|
@@ -7826,39 +7821,6 @@ process.env.NODE_ENV !== "production" ? DTAutosuggest.propTypes = {
|
|
|
7826
7821
|
showScroll: PropTypes.bool,
|
|
7827
7822
|
isEmbedded: PropTypes.bool
|
|
7828
7823
|
} : void 0;
|
|
7829
|
-
DTAutosuggest.defaultProps = {
|
|
7830
|
-
icon: undefined,
|
|
7831
|
-
value: '',
|
|
7832
|
-
transportMode: undefined,
|
|
7833
|
-
filterResults: undefined,
|
|
7834
|
-
onClear: undefined,
|
|
7835
|
-
lang: 'fi',
|
|
7836
|
-
storeRef: undefined,
|
|
7837
|
-
handleViaPoints: undefined,
|
|
7838
|
-
focusChange: undefined,
|
|
7839
|
-
getAutoSuggestIcons: undefined,
|
|
7840
|
-
sources: [],
|
|
7841
|
-
targets: undefined,
|
|
7842
|
-
isMobile: false,
|
|
7843
|
-
isEmbedded: false,
|
|
7844
|
-
geocodingSize: undefined,
|
|
7845
|
-
pathOpts: {
|
|
7846
|
-
routesPrefix: 'linjat',
|
|
7847
|
-
stopsPrefix: 'pysakit'
|
|
7848
|
-
},
|
|
7849
|
-
ariaLabel: undefined,
|
|
7850
|
-
mobileLabel: undefined,
|
|
7851
|
-
inputClassName: '',
|
|
7852
|
-
translatedPlaceholder: undefined,
|
|
7853
|
-
fontWeights: {
|
|
7854
|
-
medium: 500
|
|
7855
|
-
},
|
|
7856
|
-
colors: defaultColors,
|
|
7857
|
-
required: false,
|
|
7858
|
-
modeSet: undefined,
|
|
7859
|
-
showScroll: false,
|
|
7860
|
-
refPoint: {}
|
|
7861
|
-
};
|
|
7862
7824
|
var index = props => {
|
|
7863
7825
|
return /*#__PURE__*/React.createElement(I18nextProvider, {
|
|
7864
7826
|
i18n: i18n
|