wacomm 1.61.0 → 1.62.1

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.
@@ -1,9 +1,15 @@
1
+ import { ZeroFuncType } from 'waujs';
2
+ export interface AutocompleteOption {
3
+ id: string;
4
+ value: string;
5
+ }
1
6
  interface AutocompleteProps {
2
7
  ref?: React.Ref<any>;
3
- options: any[];
8
+ options: AutocompleteOption[];
4
9
  placeholder?: string;
5
- onSelect: (placeID: string, description: string) => void;
10
+ onSelect: (option: AutocompleteOption) => void;
6
11
  onChange: (text: string) => void;
12
+ onSearch: ZeroFuncType;
7
13
  }
8
- declare function Autocomplete({ ref, options, onSelect, onChange, placeholder }: AutocompleteProps): import("react/jsx-runtime").JSX.Element;
14
+ declare function Autocomplete({ ref, options, onSelect, onChange, onSearch, placeholder }: AutocompleteProps): import("react/jsx-runtime").JSX.Element;
9
15
  export default Autocomplete;
@@ -9037,22 +9037,22 @@ function aj({
9037
9037
  options: t,
9038
9038
  onSelect: o,
9039
9039
  onChange: n,
9040
- placeholder: r = ""
9040
+ onSearch: r,
9041
+ placeholder: s = ""
9041
9042
  }) {
9042
- const [s, i] = Ye(!1), [a, l] = Ye(""), c = (p, f) => {
9043
- if (f) {
9044
- const { placeID: d, description: m } = f;
9045
- o(d, m);
9046
- }
9047
- }, u = (p, f) => {
9048
- l(f), n(f);
9043
+ const [i, a] = Ye(!1), [l, c] = Ye(""), u = (d, m) => {
9044
+ m && o(m);
9045
+ }, p = (d, m) => {
9046
+ c(m), n(m);
9047
+ }, f = (d) => {
9048
+ d.key === "Enter" && (d.preventDefault(), r());
9049
9049
  };
9050
9050
  return /* @__PURE__ */ b.jsx(
9051
9051
  H1,
9052
9052
  {
9053
9053
  ref: e,
9054
9054
  options: t,
9055
- getOptionLabel: (p) => p.description,
9055
+ getOptionLabel: (d) => d.value,
9056
9056
  popupIcon: null,
9057
9057
  sx: {
9058
9058
  "& .MuiOutlinedInput-root": {
@@ -9063,14 +9063,14 @@ function aj({
9063
9063
  top: "50%",
9064
9064
  transform: "translateY(-50%)",
9065
9065
  paddingLeft: "8px",
9066
- display: s || a ? "none" : "block",
9066
+ display: i || l ? "none" : "block",
9067
9067
  border: "none"
9068
9068
  }
9069
9069
  },
9070
- renderInput: (p) => /* @__PURE__ */ b.jsx(
9070
+ renderInput: (d) => /* @__PURE__ */ b.jsx(
9071
9071
  q1,
9072
9072
  {
9073
- ...p,
9073
+ ...d,
9074
9074
  slotProps: {
9075
9075
  inputLabel: {
9076
9076
  sx: {
@@ -9078,13 +9078,14 @@ function aj({
9078
9078
  }
9079
9079
  }
9080
9080
  },
9081
- label: `${s || a ? "" : r}`
9081
+ label: `${i || l ? "" : s}`
9082
9082
  }
9083
9083
  ),
9084
- onInputChange: u,
9085
- onChange: c,
9086
- onFocus: () => i(!0),
9087
- onBlur: () => i(!1)
9084
+ onInputChange: p,
9085
+ onChange: u,
9086
+ onFocus: () => a(!0),
9087
+ onBlur: () => a(!1),
9088
+ onKeyDown: f
9088
9089
  }
9089
9090
  );
9090
9091
  }
@@ -39003,11 +39004,11 @@ function uR(e) {
39003
39004
  }, [r]), null;
39004
39005
  }
39005
39006
  const MN = Tr(uR);
39006
- const pR = import("./maplibre-gl-DDj3hbFy.mjs").then((e) => e.m), dR = P.forwardRef(function(t, o) {
39007
+ const pR = import("./maplibre-gl-DjOAmwZJ.mjs").then((e) => e.m), dR = P.forwardRef(function(t, o) {
39007
39008
  return Uy(t, o, pR);
39008
39009
  }), fR = Qy;
39009
39010
  const mR = cR;
39010
- const hR = import("./mapbox-gl-DhifSTHm.mjs").then((e) => e.m), RN = P.forwardRef(function(t, o) {
39011
+ const hR = import("./mapbox-gl-Vy6PfrBr.mjs").then((e) => e.m), RN = P.forwardRef(function(t, o) {
39011
39012
  return Uy(t, o, hR);
39012
39013
  }), gR = Qy;
39013
39014
  function yR({ locations: e }) {