@onesy/ui-react 1.0.117 → 1.0.119
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/esm/index.js +1 -3
- package/index.d.ts +0 -2
- package/index.js +1 -4
- package/package.json +3 -3
- package/AutoCompleteGooglePlaces/AutoCompleteGooglePlaces.d.ts +0 -7
- package/AutoCompleteGooglePlaces/AutoCompleteGooglePlaces.js +0 -85
- package/AutoCompleteGooglePlaces/index.d.ts +0 -1
- package/AutoCompleteGooglePlaces/index.js +0 -8
- package/AutoCompleteGooglePlaces/package.json +0 -6
- package/esm/AutoCompleteGooglePlaces/AutoCompleteGooglePlaces.js +0 -107
- package/esm/AutoCompleteGooglePlaces/index.js +0 -1
package/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license UiReact v1.0.
|
|
1
|
+
/** @license UiReact v1.0.119
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -410,8 +410,6 @@ export { default as AutoCompleteCountry } from './AutoCompleteCountry';
|
|
|
410
410
|
export * from './AutoCompleteCountry';
|
|
411
411
|
export { default as AutoCompleteCurrency } from './AutoCompleteCurrency';
|
|
412
412
|
export * from './AutoCompleteCurrency';
|
|
413
|
-
export { default as AutoCompleteGooglePlaces } from './AutoCompleteGooglePlaces';
|
|
414
|
-
export * from './AutoCompleteGooglePlaces';
|
|
415
413
|
export { default as NotFound } from './NotFound';
|
|
416
414
|
export * from './NotFound';
|
|
417
415
|
export { default as HTMLCanvas } from './HTMLCanvas';
|
package/index.d.ts
CHANGED
|
@@ -405,8 +405,6 @@ export { default as AutoCompleteCountry } from './AutoCompleteCountry';
|
|
|
405
405
|
export * from './AutoCompleteCountry';
|
|
406
406
|
export { default as AutoCompleteCurrency } from './AutoCompleteCurrency';
|
|
407
407
|
export * from './AutoCompleteCurrency';
|
|
408
|
-
export { default as AutoCompleteGooglePlaces } from './AutoCompleteGooglePlaces';
|
|
409
|
-
export * from './AutoCompleteGooglePlaces';
|
|
410
408
|
export { default as NotFound } from './NotFound';
|
|
411
409
|
export * from './NotFound';
|
|
412
410
|
export { default as HTMLCanvas } from './HTMLCanvas';
|
package/index.js
CHANGED
|
@@ -21,7 +21,7 @@ exports.Append = exports.ListSubheader = exports.MenuItem = exports.ListItem = e
|
|
|
21
21
|
exports.Stepper = exports.ImageListItemBox = exports.ImageListItem = exports.ImageList = exports.TablePagination = exports.SpeedDialItem = exports.SpeedDial = exports.PaginationItem = exports.Pagination = exports.Snackbars = exports.Snackbar = exports.Placeholder = exports.TableFooter = exports.TableHeader = exports.TableCell = exports.TableRow = exports.TableBody = exports.TableHead = exports.Table = exports.CardFooter = exports.CardButton = exports.CardHeader = exports.CardMain = exports.CardImage = exports.Card = exports.useScroll = exports.TopAppBar = exports.BottomAppBar = exports.BottomSheet = exports.useSwipe = exports.NavigationDrawer = exports.NavigationItem = exports.NavigationBar = exports.NavigationRail = exports.Breadcrumbs = exports.Accordion = exports.ToggleButtons = exports.ToggleButton = exports.Slider = exports.Banner = exports.Grid = exports.Line = exports.Container = exports.Box = exports.Rating = exports.AutoComplete = exports.Select = exports.useMediaQuery = exports.Menu = exports.Tooltip = void 0;
|
|
22
22
|
exports.AreaChartItem = exports.LineChart = exports.LineChartItem = exports.Chart = exports.DateTimeRangePicker = exports.DateTimePicker = exports.DateRangePicker = exports.DatePicker = exports.Calendar = exports.CalendarMonth = exports.TimeRangePicker = exports.TimePicker = exports.Carousel = exports.LinearMeter = exports.Watch = exports.Path = exports.RoundMeter = exports.Weather = exports.Parallax = exports.Drawing = exports.Countdown = exports.Timer = exports.Labels = exports.Label = exports.RichTextEditor = exports.Markdown = exports.MenuDesktop = exports.DropZone = exports.FileChoose = exports.ImageEdit = exports.ImageCrop = exports.ScreenCapture = exports.Widgets = exports.ColorTextField = exports.NumericTextField = exports.AdvancedTextField = exports.SpyScroll = exports.Image = exports.MainProgress = exports.WindowSplit = exports.ViewSplit = exports.Confirm = exports.Reveal = exports.Masonry = exports.Tree = exports.TimelineItem = exports.Timeline = exports.Tab = exports.Tabs = exports.Step = void 0;
|
|
23
23
|
exports.TextToSpeech = exports.SpeechToText = exports.useLocation = exports.useVisible = exports.SectionReviews = exports.SectionAction = exports.SectionWatch = exports.SectionTimeline = exports.SectionTextMedia = exports.SectionMedia = exports.SectionLogos = exports.SectionImageGallery = exports.SectionContact = exports.SectionCarousel = exports.SectionCards = exports.SectionBoxes = exports.Links = exports.Section = exports.Medias = exports.Properties = exports.Property = exports.Meta = exports.useSubscription = exports.MoreOptions = exports.Text = exports.SmartTextField = exports.Emojis = exports.Share = exports.ImageGallery = exports.PageTransition = exports.useQuery = exports.Page = exports.Forms = exports.Frame = exports.IFrame = exports.FormRow = exports.Form = exports.useForm = exports.Clock = exports.DragAndDropList = exports.Move = exports.DonutChart = exports.PieChart = exports.ColumnChart = exports.ColumnChartItem = exports.BubbleChart = exports.BubbleChartItem = exports.ScatterChart = exports.ScatterChartItem = exports.AreaChart = void 0;
|
|
24
|
-
exports.CookieBanner = exports.Whiteboard = exports.CalendarMenu = exports.Week = exports.Info = exports.CalendarViews = exports.Space = exports.HTMLCanvas = exports.NotFound = exports.
|
|
24
|
+
exports.CookieBanner = exports.Whiteboard = exports.CalendarMenu = exports.Week = exports.Info = exports.CalendarViews = exports.Space = exports.HTMLCanvas = exports.NotFound = exports.AutoCompleteCurrency = exports.AutoCompleteCountry = exports.CalendarAvailability = void 0;
|
|
25
25
|
__exportStar(require("./utils"), exports);
|
|
26
26
|
var Reset_1 = require("./Reset");
|
|
27
27
|
Object.defineProperty(exports, "Reset", { enumerable: true, get: function () { return __importDefault(Reset_1).default; } });
|
|
@@ -632,9 +632,6 @@ __exportStar(require("./AutoCompleteCountry"), exports);
|
|
|
632
632
|
var AutoCompleteCurrency_1 = require("./AutoCompleteCurrency");
|
|
633
633
|
Object.defineProperty(exports, "AutoCompleteCurrency", { enumerable: true, get: function () { return __importDefault(AutoCompleteCurrency_1).default; } });
|
|
634
634
|
__exportStar(require("./AutoCompleteCurrency"), exports);
|
|
635
|
-
var AutoCompleteGooglePlaces_1 = require("./AutoCompleteGooglePlaces");
|
|
636
|
-
Object.defineProperty(exports, "AutoCompleteGooglePlaces", { enumerable: true, get: function () { return __importDefault(AutoCompleteGooglePlaces_1).default; } });
|
|
637
|
-
__exportStar(require("./AutoCompleteGooglePlaces"), exports);
|
|
638
635
|
var NotFound_1 = require("./NotFound");
|
|
639
636
|
Object.defineProperty(exports, "NotFound", { enumerable: true, get: function () { return __importDefault(NotFound_1).default; } });
|
|
640
637
|
__exportStar(require("./NotFound"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onesy/ui-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.119",
|
|
4
4
|
"description": "UI for React",
|
|
5
5
|
"repository": "https://github.com/onesy-me/onesy.git",
|
|
6
6
|
"author": "Lazar <lazareric2@gmail.com>",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
],
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@onesy/style-react": "^1.0.2",
|
|
34
|
-
"react": "^18.
|
|
35
|
-
"react-dom": "^18.
|
|
34
|
+
"react": "^18.3.1",
|
|
35
|
+
"react-dom": "^18.3.1",
|
|
36
36
|
"react-router-dom": "^6.15.0"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IAutoComplete } from '../AutoComplete/AutoComplete';
|
|
3
|
-
export declare type IAutoCompleteGooglePlaces = IAutoComplete & {
|
|
4
|
-
optionsGoogle?: any;
|
|
5
|
-
};
|
|
6
|
-
declare const AutoCompleteGooglePlaces: React.FC<IAutoCompleteGooglePlaces>;
|
|
7
|
-
export default AutoCompleteGooglePlaces;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
-
const react_1 = __importDefault(require("react"));
|
|
19
|
-
const utils_1 = require("@onesy/utils");
|
|
20
|
-
const style_react_1 = require("@onesy/style-react");
|
|
21
|
-
const AutoComplete_1 = __importDefault(require("../AutoComplete"));
|
|
22
|
-
const ListItem_1 = __importDefault(require("../ListItem"));
|
|
23
|
-
const Type_1 = __importDefault(require("../Type"));
|
|
24
|
-
const utils_2 = require("../utils");
|
|
25
|
-
const useStyle = (0, style_react_1.style)(theme => ({
|
|
26
|
-
root: {}
|
|
27
|
-
}), { name: 'onesy-AutoCompleteGooglePlaces' });
|
|
28
|
-
const AutoCompleteGooglePlaces = react_1.default.forwardRef((props_, ref) => {
|
|
29
|
-
const theme = (0, style_react_1.useOnesyTheme)();
|
|
30
|
-
const props = react_1.default.useMemo(() => { var _a, _b, _c, _d, _e, _f, _g, _h; return (Object.assign(Object.assign(Object.assign({}, (_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _a === void 0 ? void 0 : _a.elements) === null || _b === void 0 ? void 0 : _b.all) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.default), (_h = (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _e === void 0 ? void 0 : _e.elements) === null || _f === void 0 ? void 0 : _f.onesyAutoCompleteGooglePlaces) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
|
|
31
|
-
const AutoComplete = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.AutoComplete) || AutoComplete_1.default; }, [theme]);
|
|
32
|
-
const ListItem = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.ListItem) || ListItem_1.default; }, [theme]);
|
|
33
|
-
const Type = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Type) || Type_1.default; }, [theme]);
|
|
34
|
-
const { value, valueDefault, valueInputDefault: valueInputDefault_, onChangeInput: onChangeInputProps, size = 'regular', optionsGoogle: optionsGoogle_, className, children } = props, other = __rest(props, ["value", "valueDefault", "valueInputDefault", "onChangeInput", "size", "optionsGoogle", "className", "children"]);
|
|
35
|
-
const { classes } = useStyle();
|
|
36
|
-
const [places, setPlaces] = react_1.default.useState([]);
|
|
37
|
-
const refs = {
|
|
38
|
-
google: react_1.default.useRef(undefined)
|
|
39
|
-
};
|
|
40
|
-
const optionsGoogle = react_1.default.useMemo(() => {
|
|
41
|
-
return optionsGoogle_ || {
|
|
42
|
-
fields: ['name', 'address_component', 'location', 'geometry']
|
|
43
|
-
};
|
|
44
|
-
}, [optionsGoogle_]);
|
|
45
|
-
const onGoogleResults = react_1.default.useCallback((results) => {
|
|
46
|
-
// update places
|
|
47
|
-
setPlaces((results === null || results === void 0 ? void 0 : results.map((item) => (Object.assign(Object.assign({}, item), { name: item.description })))) || []);
|
|
48
|
-
}, []);
|
|
49
|
-
const init = react_1.default.useCallback(async () => {
|
|
50
|
-
if (!window.google)
|
|
51
|
-
return;
|
|
52
|
-
const google = window.google;
|
|
53
|
-
const { AutocompleteService } = await google.maps.importLibrary('places');
|
|
54
|
-
refs.google.current = new AutocompleteService(undefined, options);
|
|
55
|
-
}, []);
|
|
56
|
-
react_1.default.useEffect(() => {
|
|
57
|
-
// init
|
|
58
|
-
init();
|
|
59
|
-
}, []);
|
|
60
|
-
const onChangeInput = react_1.default.useCallback((0, utils_1.debounce)((valueNew) => {
|
|
61
|
-
if ((0, utils_1.is)('function', onChangeInputProps))
|
|
62
|
-
onChangeInputProps(valueNew);
|
|
63
|
-
if (!refs.google.current)
|
|
64
|
-
return;
|
|
65
|
-
// Make a Google request
|
|
66
|
-
refs.google.current.getQueryPredictions({ input: valueNew }, onGoogleResults);
|
|
67
|
-
}, 440), [optionsGoogle, onChangeInputProps]);
|
|
68
|
-
const options = react_1.default.useMemo(() => {
|
|
69
|
-
return places.map((item) => (Object.assign(Object.assign({}, item), { value: item.name })));
|
|
70
|
-
}, [places]);
|
|
71
|
-
const valueInputDefault = react_1.default.useMemo(() => {
|
|
72
|
-
var _a;
|
|
73
|
-
return valueInputDefault_ !== undefined ? valueInputDefault_ : (_a = options.find((item) => item.value === (value !== undefined ? value : valueDefault))) === null || _a === void 0 ? void 0 : _a.name;
|
|
74
|
-
}, []);
|
|
75
|
-
return ((0, jsx_runtime_1.jsx)(AutoComplete, Object.assign({ ref: ref, valueInputDefault: valueInputDefault, valueDefault: valueDefault, value: value, options: options, onChangeInput: onChangeInput, size: size, renderOption: (item, index_, propsItem) => ((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ start: item.flag, startAlign: 'center', primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: item.name }))), value: item.value, selected: item.value === ((value === null || value === void 0 ? void 0 : value.value) !== undefined ? value === null || value === void 0 ? void 0 : value.value : value), size: 'small', button: true }, propsItem), index_)), className: (0, style_react_1.classNames)([
|
|
76
|
-
(0, utils_2.staticClassName)('AutoCompleteGooglePlaces', theme) && [
|
|
77
|
-
'onesy-AutoCompleteGooglePlaces-root',
|
|
78
|
-
`onesy-AutoCompleteGooglePlaces-size-${size}`
|
|
79
|
-
],
|
|
80
|
-
className,
|
|
81
|
-
classes.root
|
|
82
|
-
]) }, other)));
|
|
83
|
-
});
|
|
84
|
-
AutoCompleteGooglePlaces.displayName = 'onesy-AutoCompleteGooglePlaces';
|
|
85
|
-
exports.default = AutoCompleteGooglePlaces;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './AutoCompleteGooglePlaces';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var AutoCompleteGooglePlaces_1 = require("./AutoCompleteGooglePlaces");
|
|
8
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(AutoCompleteGooglePlaces_1).default; } });
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
const _excluded = ["value", "valueDefault", "valueInputDefault", "onChangeInput", "size", "optionsGoogle", "className", "children"];
|
|
5
|
-
function ownKeys(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; }
|
|
6
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import { debounce, is } from '@onesy/utils';
|
|
9
|
-
import { classNames, style as styleMethod, useOnesyTheme } from '@onesy/style-react';
|
|
10
|
-
import AutoCompleteElement from '../AutoComplete';
|
|
11
|
-
import ListItemElement from '../ListItem';
|
|
12
|
-
import TypeElement from '../Type';
|
|
13
|
-
import { staticClassName } from '../utils';
|
|
14
|
-
const useStyle = styleMethod(theme => ({
|
|
15
|
-
root: {}
|
|
16
|
-
}), {
|
|
17
|
-
name: 'onesy-AutoCompleteGooglePlaces'
|
|
18
|
-
});
|
|
19
|
-
const AutoCompleteGooglePlaces = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
20
|
-
const theme = useOnesyTheme();
|
|
21
|
-
const props = React.useMemo(() => _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyAutoCompleteGooglePlaces?.props?.default), props_), [props_]);
|
|
22
|
-
const AutoComplete = React.useMemo(() => theme?.elements?.AutoComplete || AutoCompleteElement, [theme]);
|
|
23
|
-
const ListItem = React.useMemo(() => theme?.elements?.ListItem || ListItemElement, [theme]);
|
|
24
|
-
const Type = React.useMemo(() => theme?.elements?.Type || TypeElement, [theme]);
|
|
25
|
-
const {
|
|
26
|
-
value,
|
|
27
|
-
valueDefault,
|
|
28
|
-
valueInputDefault: valueInputDefault_,
|
|
29
|
-
onChangeInput: onChangeInputProps,
|
|
30
|
-
size = 'regular',
|
|
31
|
-
optionsGoogle: optionsGoogle_,
|
|
32
|
-
className,
|
|
33
|
-
children
|
|
34
|
-
} = props,
|
|
35
|
-
other = _objectWithoutProperties(props, _excluded);
|
|
36
|
-
const {
|
|
37
|
-
classes
|
|
38
|
-
} = useStyle();
|
|
39
|
-
const [places, setPlaces] = React.useState([]);
|
|
40
|
-
const refs = {
|
|
41
|
-
google: React.useRef(undefined)
|
|
42
|
-
};
|
|
43
|
-
const optionsGoogle = React.useMemo(() => {
|
|
44
|
-
return optionsGoogle_ || {
|
|
45
|
-
fields: ['name', 'address_component', 'location', 'geometry']
|
|
46
|
-
};
|
|
47
|
-
}, [optionsGoogle_]);
|
|
48
|
-
const onGoogleResults = React.useCallback(results => {
|
|
49
|
-
// update places
|
|
50
|
-
setPlaces(results?.map(item => _objectSpread(_objectSpread({}, item), {}, {
|
|
51
|
-
name: item.description
|
|
52
|
-
})) || []);
|
|
53
|
-
}, []);
|
|
54
|
-
const init = React.useCallback(async () => {
|
|
55
|
-
if (!window.google) return;
|
|
56
|
-
const google = window.google;
|
|
57
|
-
const {
|
|
58
|
-
AutocompleteService
|
|
59
|
-
} = await google.maps.importLibrary('places');
|
|
60
|
-
refs.google.current = new AutocompleteService(undefined, options);
|
|
61
|
-
}, []);
|
|
62
|
-
React.useEffect(() => {
|
|
63
|
-
// init
|
|
64
|
-
init();
|
|
65
|
-
}, []);
|
|
66
|
-
const onChangeInput = React.useCallback(debounce(valueNew => {
|
|
67
|
-
if (is('function', onChangeInputProps)) onChangeInputProps(valueNew);
|
|
68
|
-
if (!refs.google.current) return;
|
|
69
|
-
|
|
70
|
-
// Make a Google request
|
|
71
|
-
refs.google.current.getQueryPredictions({
|
|
72
|
-
input: valueNew
|
|
73
|
-
}, onGoogleResults);
|
|
74
|
-
}, 440), [optionsGoogle, onChangeInputProps]);
|
|
75
|
-
const options = React.useMemo(() => {
|
|
76
|
-
return places.map(item => _objectSpread(_objectSpread({}, item), {}, {
|
|
77
|
-
value: item.name
|
|
78
|
-
}));
|
|
79
|
-
}, [places]);
|
|
80
|
-
const valueInputDefault = React.useMemo(() => {
|
|
81
|
-
return valueInputDefault_ !== undefined ? valueInputDefault_ : options.find(item => item.value === (value !== undefined ? value : valueDefault))?.name;
|
|
82
|
-
}, []);
|
|
83
|
-
return /*#__PURE__*/React.createElement(AutoComplete, _extends({
|
|
84
|
-
ref: ref,
|
|
85
|
-
valueInputDefault: valueInputDefault,
|
|
86
|
-
valueDefault: valueDefault,
|
|
87
|
-
value: value,
|
|
88
|
-
options: options,
|
|
89
|
-
onChangeInput: onChangeInput,
|
|
90
|
-
size: size,
|
|
91
|
-
renderOption: (item, index_, propsItem) => /*#__PURE__*/React.createElement(ListItem, _extends({
|
|
92
|
-
key: index_,
|
|
93
|
-
start: item.flag,
|
|
94
|
-
startAlign: "center",
|
|
95
|
-
primary: /*#__PURE__*/React.createElement(Type, {
|
|
96
|
-
version: "b3"
|
|
97
|
-
}, item.name),
|
|
98
|
-
value: item.value,
|
|
99
|
-
selected: item.value === (value?.value !== undefined ? value?.value : value),
|
|
100
|
-
size: "small",
|
|
101
|
-
button: true
|
|
102
|
-
}, propsItem)),
|
|
103
|
-
className: classNames([staticClassName('AutoCompleteGooglePlaces', theme) && ['onesy-AutoCompleteGooglePlaces-root', `onesy-AutoCompleteGooglePlaces-size-${size}`], className, classes.root])
|
|
104
|
-
}, other));
|
|
105
|
-
});
|
|
106
|
-
AutoCompleteGooglePlaces.displayName = 'onesy-AutoCompleteGooglePlaces';
|
|
107
|
-
export default AutoCompleteGooglePlaces;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './AutoCompleteGooglePlaces';
|