@wavelengthusaf/components 1.1.5 → 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({
@@ -3405,6 +3385,8 @@ function WavelengthSearch({
3405
3385
  placeholder,
3406
3386
  searchFunction,
3407
3387
  onSearchItemSelected,
3388
+ options,
3389
+ onChange,
3408
3390
  borderColor: borderColor2,
3409
3391
  hoverColor,
3410
3392
  textColor,
@@ -3423,8 +3405,8 @@ function WavelengthSearch({
3423
3405
  loading: true,
3424
3406
  disableListWrap: true,
3425
3407
  freeSolo: true,
3426
- disablePortal: true,
3427
3408
  onChange: (e, value) => {
3409
+ console.log(" AutoComplete value ", value);
3428
3410
  if (value != null) {
3429
3411
  if (typeof value == "string") {
3430
3412
  console.log("String Input, No Selection");
@@ -3434,15 +3416,15 @@ function WavelengthSearch({
3434
3416
  }
3435
3417
  },
3436
3418
  disableCloseOnSelect: false,
3437
- getOptionLabel: (results2) => {
3438
- const returnVal = typeof results2 === "string" ? results2 : results2.title;
3419
+ getOptionLabel: (options2) => {
3420
+ const returnVal = typeof options2 === "string" ? options2 : options2.title;
3439
3421
  return returnVal;
3440
3422
  },
3441
- options: results,
3423
+ options,
3442
3424
  sx: { width: width2 },
3443
3425
  renderOption: (props, results2) => (
3444
3426
  // @ts-expect-error boneless chicken
3445
- /* @__PURE__ */ React9.createElement(ListItem, __spreadProps(__spreadValues({ key: results2.id }, props), { sx: { zIndex: -5 } }), /* @__PURE__ */ React9.createElement(ListItemText, { primary: results2.title, secondary: results2.subtitle }))
3427
+ /* @__PURE__ */ React9.createElement(ListItem, __spreadValues({ key: results2.id }, props), /* @__PURE__ */ React9.createElement(ListItemText, { primary: results2.title, secondary: results2.subtitle }))
3446
3428
  ),
3447
3429
  renderInput: (params) => /* @__PURE__ */ React9.createElement(
3448
3430
  TextField2,
@@ -3475,13 +3457,7 @@ function WavelengthSearch({
3475
3457
  }
3476
3458
  },
3477
3459
  label,
3478
- onChange: (e) => __async(this, null, function* () {
3479
- if (searchFunction) {
3480
- const response = yield searchFunction(e.target.value);
3481
- console.log(response);
3482
- yield setResults(response);
3483
- }
3484
- })
3460
+ onChange
3485
3461
  })
3486
3462
  )
3487
3463
  }