@dcrackel/hematournamentui 1.0.286 → 1.0.288

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.
@@ -808,26 +808,38 @@ const cC = /* @__PURE__ */ te(AC, [["render", lC]]), uC = {
808
808
  required: !1
809
809
  }
810
810
  },
811
- data: () => ({
812
- isDropDownOpen: !1
813
- }),
811
+ data() {
812
+ return {
813
+ isDropDownOpen: !1
814
+ };
815
+ },
814
816
  methods: {
815
817
  handleClick(n) {
816
818
  this.isDropDownOpen = !1, this.$emit("update:selectedItem", n);
817
819
  },
818
820
  handleDropDown() {
819
821
  this.isDropDownOpen = !this.isDropDownOpen;
822
+ },
823
+ handleClickOutside(n) {
824
+ this.$refs.dropdownContainer && !this.$refs.dropdownContainer.contains(n.target) && (this.isDropDownOpen = !1);
820
825
  }
826
+ },
827
+ mounted() {
828
+ document.addEventListener("click", this.handleClickOutside);
829
+ },
830
+ beforeDestroy() {
831
+ document.removeEventListener("click", this.handleClickOutside);
821
832
  }
822
833
  }, dC = /* @__PURE__ */ h("i", { class: "fa-solid fa-chevron-down text-xs text-quinary" }, null, -1), gC = ["onClick"];
823
834
  function hC(n, e, t, r, i, o) {
824
835
  const A = b("BaseText");
825
836
  return C(), B("div", {
826
- class: ee(["flex flex-row w-full relative", [t.alignEnd ? "justify-end" : ""]])
837
+ class: ee(["flex flex-row w-full relative", [t.alignEnd ? "justify-end" : ""]]),
838
+ ref: "dropdownContainer"
827
839
  }, [
828
840
  h("div", {
829
841
  class: ee(["z-10 rounded-lg px-2 py-2 flex flex-row justify-between border border-dropdownSelect bg-white", t.width]),
830
- onClick: e[0] || (e[0] = (s) => o.handleDropDown())
842
+ onClick: e[0] || (e[0] = (...s) => o.handleDropDown && o.handleDropDown(...s))
831
843
  }, [
832
844
  t.label.length > 1 ? (C(), re(A, {
833
845
  key: 0,
@@ -846,7 +858,7 @@ function hC(n, e, t, r, i, o) {
846
858
  ], 2),
847
859
  p(wn, { name: "fade-in-down" }, {
848
860
  default: Se(() => [
849
- n.isDropDownOpen ? (C(), B("div", {
861
+ i.isDropDownOpen ? (C(), B("div", {
850
862
  key: 0,
851
863
  class: ee(["flex flex-col shadow-lg mt-9 z-20 rounded-b-xl absolute bg-neutral border border-dropdownSelect overflow-y-auto max-h-44", t.dropDownWidth])
852
864
  }, [
@@ -37368,7 +37380,10 @@ const vq = /* @__PURE__ */ te(vY, [["render", TY]]), OY = {
37368
37380
  this.searchTerm = n;
37369
37381
  },
37370
37382
  handleFencerSelect(n) {
37371
- this.$emit("update:selectedFencer", n);
37383
+ console.log(`Selected fencer: ${n}`), this.$emit("update:selectedFencer", n);
37384
+ },
37385
+ handlePersonSubmit() {
37386
+ console.log(`Submitted person: ${value}`), this.$emit("submit:person", value);
37372
37387
  }
37373
37388
  }
37374
37389
  }, RY = { class: "w-96 p-4 overflow-y-auto" }, PY = { class: "mb-4 px-4" }, NY = { class: "overflow-y-auto h-full" };
@@ -37397,8 +37412,9 @@ function FY(n, e, t, r, i, o) {
37397
37412
  poolPosition: 0,
37398
37413
  position: 0,
37399
37414
  class: "border border-poolSetup hover:border-bright",
37400
- "onUpdate:click": (l) => o.handleFencerSelect(a)
37401
- }, null, 8, ["name", "club", "onUpdate:click"])
37415
+ "onUpdate:click": (l) => o.handleFencerSelect(a),
37416
+ "onSubmit:person": o.handlePersonSubmit
37417
+ }, null, 8, ["name", "club", "onUpdate:click", "onSubmit:person"])
37402
37418
  ]))), 128))
37403
37419
  ])
37404
37420
  ])
@@ -37462,9 +37478,9 @@ const LY = /* @__PURE__ */ te(OY, [["render", FY]]), HY = {
37462
37478
  },
37463
37479
  computed: {
37464
37480
  formattedClubs() {
37465
- return this.fencingClubs.map((e) => ({
37466
- text: e.Name,
37467
- link: e.ClubId.toString()
37481
+ return this.fencingClubs.map((n) => ({
37482
+ text: n.Name,
37483
+ link: n.ClubId.toString()
37468
37484
  }));
37469
37485
  },
37470
37486
  getLegalName() {
@@ -37517,7 +37533,7 @@ const LY = /* @__PURE__ */ te(OY, [["render", FY]]), HY = {
37517
37533
  console.log(n), this.$emit("update:selectedFencer", n);
37518
37534
  }
37519
37535
  }
37520
- }, YY = { class: "flex drop-shadow" }, qY = { key: 0 }, zY = { class: "rounded-lg p-9 bg-neutral w-full" }, UY = { class: "w-full flex flex-row justify-center mb-4" }, jY = { class: "w-full flex-row justify-center mb-4 flex drop-shadow" }, KY = { class: "flex flex-col mb-4" }, JY = { class: "flex flex-col mb-4" }, GY = { class: "flex flex-col mb-4" }, VY = { class: "flex flex-col mb-4" }, WY = { class: "flex flex-col mb-4" }, ZY = { class: "border-b border-dropdownSelect mt-6" }, XY = { class: "my-4 w-full" }, _Y = { key: 0 }, $Y = { class: "flex flex-row justify-end mt-8" };
37536
+ }, YY = { class: "flex" }, qY = { key: 0 }, zY = { class: "rounded-lg p-9 bg-neutral w-full" }, UY = { class: "w-full flex flex-row justify-center mb-4" }, jY = { class: "w-full flex-row justify-center mb-4 flex drop-shadow" }, KY = { class: "flex flex-col mb-4" }, JY = { class: "flex flex-col mb-4" }, GY = { class: "flex flex-col mb-4" }, VY = { class: "flex flex-col mb-4" }, WY = { class: "flex flex-col mb-4" }, ZY = { class: "border-b border-dropdownSelect mt-6" }, XY = { class: "my-4 w-full" }, _Y = { key: 0 }, $Y = { class: "flex flex-row justify-end mt-8" };
37521
37537
  function eq(n, e, t, r, i, o) {
37522
37538
  const A = b("PeopleColumn"), s = b("BaseText"), a = b("ImageCropper"), l = b("TitledInput"), c = b("DropDownMenu"), u = b("Toggle"), d = b("BaseButton");
37523
37539
  return C(), B("section", YY, [