@club-employes/utopia 4.109.0 → 4.110.0

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.
@@ -9,6 +9,7 @@ declare const _default: DefineComponent<FilterLocationProps, {}, {}, {}, {}, Com
9
9
  orLabel: string;
10
10
  nearMeLabel: string;
11
11
  geolocDisabledLabel: string;
12
+ geolocationEnabled: boolean;
12
13
  maxDistance: number;
13
14
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
14
15
  export default _default;
@@ -15,6 +15,7 @@ export interface FilterLocationProps {
15
15
  geolocDisabledLabel?: string;
16
16
  modelValue: FilterLocationValue;
17
17
  departments: DropDownOption[];
18
+ geolocationEnabled?: boolean;
18
19
  maxDistance?: number;
19
20
  innerModalId?: string;
20
21
  }
@@ -1,6 +1,6 @@
1
1
  import { Ref } from 'vue';
2
2
  export declare function useGeolocation(): {
3
- geolocationEnabled: Ref<boolean>;
3
+ geolocationActive: Ref<boolean>;
4
4
  getLocation: (callback: (active: boolean, coords?: {
5
5
  latitude: number;
6
6
  longitude: number;
@@ -1,5 +1,5 @@
1
1
  {
2
- "generated": "2026-01-26T11:08:16.533Z",
2
+ "generated": "2026-01-26T11:15:39.871Z",
3
3
  "count": 1239,
4
4
  "icons": [
5
5
  "Accessibility",
package/dist/index.js CHANGED
@@ -8065,7 +8065,7 @@ const km = ["aria-label"], Bm = {
8065
8065
  });
8066
8066
  function jm() {
8067
8067
  const e = navigator.geolocation, t = J(!0);
8068
- return { geolocationEnabled: t, getLocation: ((o) => {
8068
+ return { geolocationActive: t, getLocation: ((o) => {
8069
8069
  e && e.getCurrentPosition((s) => {
8070
8070
  s.coords.latitude && s.coords.longitude ? (t.value = !0, o(!0, { latitude: s.coords.latitude, longitude: s.coords.longitude })) : (t.value = !1, o(!1));
8071
8071
  }, () => {
@@ -8073,7 +8073,10 @@ function jm() {
8073
8073
  });
8074
8074
  }) };
8075
8075
  }
8076
- const Gm = { class: "utopia-filterlocation" }, Sm = { class: "utopia-filterlocation__near-me" }, Ym = {
8076
+ const Gm = { class: "utopia-filterlocation" }, Sm = {
8077
+ key: 1,
8078
+ class: "utopia-filterlocation__near-me"
8079
+ }, Ym = {
8077
8080
  key: 0,
8078
8081
  class: "utopia-filterlocation__distance"
8079
8082
  }, Em = { class: "utopia-filterlocation__inputs-container" }, Lm = { key: 0 }, Hm = /* @__PURE__ */ re({
@@ -8085,12 +8088,13 @@ const Gm = { class: "utopia-filterlocation" }, Sm = { class: "utopia-filterlocat
8085
8088
  geolocDisabledLabel: { default: "Geolocation is not enabled." },
8086
8089
  modelValue: {},
8087
8090
  departments: {},
8091
+ geolocationEnabled: { type: Boolean, default: !0 },
8088
8092
  maxDistance: { default: 100 },
8089
8093
  innerModalId: {}
8090
8094
  },
8091
8095
  emits: ["update:modelValue"],
8092
8096
  setup(e, { emit: t }) {
8093
- const n = e, o = t, { geolocationEnabled: s, getLocation: A } = jm(), r = (a) => {
8097
+ const n = e, o = t, { geolocationActive: s, getLocation: A } = jm(), r = (a) => {
8094
8098
  const l = { departments: [], location: { active: !1, distance: n.modelValue.location.distance } };
8095
8099
  a ? A((d, c) => {
8096
8100
  l.location.active = d, c && (l.location.latitude = c.latitude, l.location.longitude = c.longitude), o("update:modelValue", l);
@@ -8111,7 +8115,8 @@ const Gm = { class: "utopia-filterlocation" }, Sm = { class: "utopia-filterlocat
8111
8115
  multiple: "",
8112
8116
  clearable: ""
8113
8117
  }, null, 8, ["modelValue", "label", "options", "disabled", "inner-modal-id"]),
8114
- C(T(ye), {
8118
+ e.geolocationEnabled ? (u(), M(T(ye), {
8119
+ key: 0,
8115
8120
  size: "sm",
8116
8121
  class: "utopia-filterlocation__or-label"
8117
8122
  }, {
@@ -8119,8 +8124,8 @@ const Gm = { class: "utopia-filterlocation" }, Sm = { class: "utopia-filterlocat
8119
8124
  oe(D(e.orLabel), 1)
8120
8125
  ]),
8121
8126
  _: 1
8122
- }),
8123
- v("div", Sm, [
8127
+ })) : P("", !0),
8128
+ e.geolocationEnabled ? (u(), m("div", Sm, [
8124
8129
  C(T(ye), { size: "sm" }, {
8125
8130
  default: G(() => [
8126
8131
  oe(D(e.nearMeLabel), 1)
@@ -8133,8 +8138,9 @@ const Gm = { class: "utopia-filterlocation" }, Sm = { class: "utopia-filterlocat
8133
8138
  size: "small",
8134
8139
  "onUpdate:modelValue": r
8135
8140
  }, null, 8, ["modelValue", "label"])
8136
- ]),
8137
- v("div", {
8141
+ ])) : P("", !0),
8142
+ e.geolocationEnabled ? (u(), m("div", {
8143
+ key: 2,
8138
8144
  class: H(["utopia-filterlocation__distance-container", { "utopia-filterlocation__distance-container--open": e.modelValue.location.active }])
8139
8145
  }, [
8140
8146
  C(nt, { name: "utopia-filterlocation-collapse" }, {
@@ -8171,10 +8177,10 @@ const Gm = { class: "utopia-filterlocation" }, Sm = { class: "utopia-filterlocat
8171
8177
  _: 1
8172
8178
  })
8173
8179
  ]))
8174
- ], 2)
8180
+ ], 2)) : P("", !0)
8175
8181
  ]));
8176
8182
  }
8177
- }), Mr = /* @__PURE__ */ fe(Hm, [["__scopeId", "data-v-baec725c"]]), Zm = { class: "page-header" }, Im = { class: "page-header__content" }, Fm = { class: "page-header__title" }, Jm = {
8183
+ }), Mr = /* @__PURE__ */ fe(Hm, [["__scopeId", "data-v-b62db7c4"]]), Zm = { class: "page-header" }, Im = { class: "page-header__content" }, Fm = { class: "page-header__title" }, Jm = {
8178
8184
  key: 0,
8179
8185
  class: "page-header__action"
8180
8186
  }, Nm = /* @__PURE__ */ re({