@wavelengthusaf/components 1.1.6 → 1.1.7

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/dist/index.mjs CHANGED
@@ -40,26 +40,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
40
40
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
41
41
  mod
42
42
  ));
43
- var __async = (__this, __arguments, generator) => {
44
- return new Promise((resolve, reject) => {
45
- var fulfilled = (value) => {
46
- try {
47
- step(generator.next(value));
48
- } catch (e) {
49
- reject(e);
50
- }
51
- };
52
- var rejected = (value) => {
53
- try {
54
- step(generator.throw(value));
55
- } catch (e) {
56
- reject(e);
57
- }
58
- };
59
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
60
- step((generator = generator.apply(__this, __arguments)).next());
61
- });
62
- };
63
43
 
64
44
  // node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js
65
45
  var require_react_is_production_min = __commonJS({
@@ -3388,43 +3368,12 @@ function WavelengthExampleComponent({ width: width2 = 100, height: height2 = 100
3388
3368
 
3389
3369
  // src/components/search/WavelengthSearch.tsx
3390
3370
  import React9, { useState as useState2 } from "react";
3391
- import { Autocomplete as Autocomplete2, ListItemText, Popper } from "@mui/material";
3371
+ import { Autocomplete as Autocomplete2, ListItemText } from "@mui/material";
3392
3372
  import TextField2 from "@mui/material/TextField";
3393
3373
  import InputAdornment from "@mui/material/InputAdornment";
3394
3374
  import IconButton from "@mui/material/IconButton";
3395
3375
  import { useRef } from "react";
3396
3376
  import ListItem from "@mui/material/ListItem";
3397
- var CustomPopper = (props) => {
3398
- return /* @__PURE__ */ React9.createElement(
3399
- Popper,
3400
- __spreadProps(__spreadValues({}, props), {
3401
- placement: "right-start",
3402
- disablePortal: false,
3403
- modifiers: [
3404
- {
3405
- name: "flip",
3406
- enabled: true,
3407
- options: {
3408
- altBoundary: true,
3409
- rootBoundary: "document",
3410
- padding: 8
3411
- }
3412
- },
3413
- {
3414
- name: "preventOverflow",
3415
- enabled: true,
3416
- options: {
3417
- altAxis: true,
3418
- altBoundary: true,
3419
- tether: false,
3420
- rootBoundary: "document",
3421
- padding: 8
3422
- }
3423
- }
3424
- ]
3425
- })
3426
- );
3427
- };
3428
3377
  function WavelengthSearch({
3429
3378
  id,
3430
3379
  mode,
@@ -3436,6 +3385,8 @@ function WavelengthSearch({
3436
3385
  placeholder,
3437
3386
  searchFunction,
3438
3387
  onSearchItemSelected,
3388
+ options,
3389
+ onChange,
3439
3390
  borderColor: borderColor2,
3440
3391
  hoverColor,
3441
3392
  textColor,
@@ -3454,8 +3405,8 @@ function WavelengthSearch({
3454
3405
  loading: true,
3455
3406
  disableListWrap: true,
3456
3407
  freeSolo: true,
3457
- disablePortal: true,
3458
3408
  onChange: (e, value) => {
3409
+ console.log(" AutoComplete value ", value);
3459
3410
  if (value != null) {
3460
3411
  if (typeof value == "string") {
3461
3412
  console.log("String Input, No Selection");
@@ -3465,11 +3416,11 @@ function WavelengthSearch({
3465
3416
  }
3466
3417
  },
3467
3418
  disableCloseOnSelect: false,
3468
- getOptionLabel: (results2) => {
3469
- const returnVal = typeof results2 === "string" ? results2 : results2.title;
3419
+ getOptionLabel: (options2) => {
3420
+ const returnVal = typeof options2 === "string" ? options2 : options2.title;
3470
3421
  return returnVal;
3471
3422
  },
3472
- options: results,
3423
+ options,
3473
3424
  sx: { width: width2 },
3474
3425
  renderOption: (props, results2) => (
3475
3426
  // @ts-expect-error boneless chicken
@@ -3506,16 +3457,9 @@ function WavelengthSearch({
3506
3457
  }
3507
3458
  },
3508
3459
  label,
3509
- onChange: (e) => __async(this, null, function* () {
3510
- if (searchFunction) {
3511
- const response = yield searchFunction(e.target.value);
3512
- console.log(response);
3513
- yield setResults(response);
3514
- }
3515
- })
3460
+ onChange
3516
3461
  })
3517
- ),
3518
- PopperComponent: CustomPopper
3462
+ )
3519
3463
  }
3520
3464
  ));
3521
3465
  } else if (mode == "manual") {