@hotelinking/ui 14.47.11 → 14.47.12

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/ui.d.ts CHANGED
@@ -77,7 +77,7 @@ export declare const BiggerSizes: readonly ["bigger", "huge", "massive"];
77
77
  * Configuración completa de una categoría de filtro
78
78
  */
79
79
  declare interface CategoryConfig {
80
- id: string;
80
+ label: string;
81
81
  name: string;
82
82
  componentType: 'uiInput' | 'uiSelect';
83
83
  defaultProps: FilterProps;
@@ -166,6 +166,7 @@ export declare type FileInputType = {
166
166
  */
167
167
  declare interface FilterProps {
168
168
  name?: string;
169
+ label?: string;
169
170
  value?: string;
170
171
  items?: SelectItemType[];
171
172
  select?: SelectItemType;
@@ -205,7 +206,8 @@ declare interface Props {
205
206
  filters?: {
206
207
  logicOperator: string;
207
208
  filters: Array<{
208
- category: string;
209
+ name: string;
210
+ label: string;
209
211
  type: 'uiInput' | 'uiSelect';
210
212
  value: string | undefined;
211
213
  }>;
@@ -214,9 +216,11 @@ declare interface Props {
214
216
 
215
217
  export declare type SelectItemType = {
216
218
  /** Unique value inside the select */
217
- id: string;
219
+ id?: string;
218
220
  /** Name of the item */
219
221
  name: string;
222
+ /** Label of the item */
223
+ label?: string;
220
224
  /** In case of smart filters the type of component should be attached to smart filter */
221
225
  type?: 'uiInput' | 'uiSelect';
222
226
  };
@@ -1579,7 +1583,8 @@ export declare const uiSmartFilterMultipleV2: DefineComponent<Props, {}, {}, {},
1579
1583
  smartFiltersSent: (filters: {
1580
1584
  logicOperator: string;
1581
1585
  filters: {
1582
- category: string;
1586
+ name: string;
1587
+ label: string;
1583
1588
  type: "uiInput" | "uiSelect";
1584
1589
  value: string | undefined;
1585
1590
  }[];
@@ -1590,7 +1595,8 @@ smartFilterDeleted: (I: number) => any;
1590
1595
  onSmartFiltersSent?: ((filters: {
1591
1596
  logicOperator: string;
1592
1597
  filters: {
1593
- category: string;
1598
+ name: string;
1599
+ label: string;
1594
1600
  type: "uiInput" | "uiSelect";
1595
1601
  value: string | undefined;
1596
1602
  }[];
@@ -1601,7 +1607,8 @@ onSmartFilterDeleted?: ((I: number) => any) | undefined;
1601
1607
  filters: {
1602
1608
  logicOperator: string;
1603
1609
  filters: {
1604
- category: string;
1610
+ name: string;
1611
+ label: string;
1605
1612
  type: "uiInput" | "uiSelect";
1606
1613
  value: string | undefined;
1607
1614
  }[];
package/dist/ui.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as M, createBlock as k, createElementBlock as n, openBlock as l, resolveDynamicComponent as Re, normalizeClass as y, computed as Y, createCommentVNode as b, renderSlot as E, createElementVNode as e, ref as I, watch as H, unref as c, withCtx as f, createVNode as m, toDisplayString as g, createTextVNode as z, Transition as re, Fragment as $, renderList as S, withDirectives as B, vModelDynamic as ct, vShow as D, withModifiers as ye, vModelText as se, createStaticVNode as te, resolveComponent as Fe, vModelCheckbox as Ee, reactive as ae, isRef as xe, TransitionGroup as gt, onMounted as mt, shallowRef as pt, mergeProps as ve } from "vue";
1
+ import { defineComponent as M, createBlock as k, createElementBlock as n, openBlock as l, resolveDynamicComponent as Re, normalizeClass as y, computed as Y, createCommentVNode as b, renderSlot as E, createElementVNode as e, ref as I, watch as H, unref as c, withCtx as f, createVNode as m, toDisplayString as g, createTextVNode as L, Transition as re, Fragment as $, renderList as S, withDirectives as B, vModelDynamic as ct, vShow as D, withModifiers as ye, vModelText as se, createStaticVNode as te, resolveComponent as Fe, vModelCheckbox as Ee, reactive as ae, isRef as xe, TransitionGroup as gt, onMounted as mt, shallowRef as pt, mergeProps as ve } from "vue";
2
2
  import { Menu as _e, MenuButton as $e, MenuItems as Ce, MenuItem as Se, Combobox as Ue, ComboboxLabel as He, ComboboxInput as Ze, ComboboxButton as Je, ComboboxOptions as We, ComboboxOption as Ge, SwitchGroup as ft, Switch as ht, SwitchLabel as yt, TransitionRoot as Be, Dialog as Me, TransitionChild as X, DialogPanel as je, DialogTitle as Qe, Disclosure as De, DisclosureButton as Q, DisclosurePanel as Te, Listbox as vt, ListboxLabel as bt, ListboxButton as wt, ListboxOptions as kt, ListboxOption as xt, Popover as _t, PopoverButton as $t, PopoverPanel as Ct } from "@headlessui/vue";
3
3
  import V from "dayjs";
4
4
  import ze from "vue3-apexcharts";
@@ -649,7 +649,7 @@ const Jt = {
649
649
  ], 2),
650
650
  m(c($e), { class: "text-black inline-flex justify-between w-full rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-sm font-medium hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-black" }, {
651
651
  default: f(() => [
652
- z(g(s.value) + " ", 1),
652
+ L(g(s.value) + " ", 1),
653
653
  t.verticalPosition === "bottom" ? (l(), k(c(oe), {
654
654
  key: 0,
655
655
  "aria-hidden": "true",
@@ -942,7 +942,7 @@ const Jt = {
942
942
  class: "mr-2",
943
943
  loading: d.loading
944
944
  }, null, 8, ["icon", "loading"]),
945
- z(" " + g(d.error), 1)
945
+ L(" " + g(d.error), 1)
946
946
  ], 512), [
947
947
  [D, d.error]
948
948
  ])
@@ -1000,7 +1000,7 @@ const Jt = {
1000
1000
  e("div", wl, [
1001
1001
  m(c(He), { class: "block text-sm font-medium" }, {
1002
1002
  default: f(() => [
1003
- z(g(v.label), 1)
1003
+ L(g(v.label), 1)
1004
1004
  ]),
1005
1005
  _: 1
1006
1006
  }),
@@ -1157,7 +1157,7 @@ const Bl = { class: "flex justify-between" }, Ml = {
1157
1157
  e("div", Bl, [
1158
1158
  m(c(He), { class: "block text-sm font-medium" }, {
1159
1159
  default: f(() => [
1160
- z(g(d.label), 1)
1160
+ L(g(d.label), 1)
1161
1161
  ]),
1162
1162
  _: 1
1163
1163
  }),
@@ -1185,7 +1185,7 @@ const Bl = { class: "flex justify-between" }, Ml = {
1185
1185
  }, "w-full rounded-md border py-2 pl-3 pr-10 shadow-sm focus:border-lime-400 focus:outline-none focus:ring-1 focus:ring-lime-400 sm:text-sm"]),
1186
1186
  onChange: h[0] || (h[0] = (v) => s.value = v.target.value),
1187
1187
  onBlur: h[1] || (h[1] = (v) => s.value = ""),
1188
- "display-value": (v) => v.name
1188
+ "display-value": (v) => v.label || v.name
1189
1189
  }, null, 8, ["class", "display-value"]),
1190
1190
  m(c(Je), { class: "h-full absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none" }, {
1191
1191
  default: f(() => [
@@ -1212,7 +1212,7 @@ const Bl = { class: "flex justify-between" }, Ml = {
1212
1212
  }, [
1213
1213
  e("span", {
1214
1214
  class: y(["block truncate", w && "font-semibold"])
1215
- }, g(v.name), 3),
1215
+ }, g(v.label || v.name), 3),
1216
1216
  w ? (l(), n("span", {
1217
1217
  key: 0,
1218
1218
  class: y(["absolute inset-y-0 right-0 flex items-center pr-4", j ? "text-black" : "text-lime-400"])
@@ -1364,7 +1364,7 @@ const Bl = { class: "flex justify-between" }, Ml = {
1364
1364
  class: "mr-2",
1365
1365
  loading: !1
1366
1366
  }, null, 8, ["icon"]),
1367
- z(" " + g(t.error), 1)
1367
+ L(" " + g(t.error), 1)
1368
1368
  ], 2), [
1369
1369
  [D, t.error]
1370
1370
  ])
@@ -1630,7 +1630,7 @@ const Bl = { class: "flex justify-between" }, Ml = {
1630
1630
  loading: r.loading
1631
1631
  }, {
1632
1632
  default: f(() => [
1633
- z(g(s.name), 1)
1633
+ L(g(s.name), 1)
1634
1634
  ]),
1635
1635
  _: 2
1636
1636
  }, 1032, ["color", "loading"]))), 128))
@@ -1779,7 +1779,7 @@ const Bl = { class: "flex justify-between" }, Ml = {
1779
1779
  class: "text-lg font-medium leading-6"
1780
1780
  }, {
1781
1781
  default: f(() => [
1782
- z(g(o.title), 1)
1782
+ L(g(o.title), 1)
1783
1783
  ]),
1784
1784
  _: 1
1785
1785
  }),
@@ -1944,7 +1944,7 @@ const Bl = { class: "flex justify-between" }, Ml = {
1944
1944
  href: i.href,
1945
1945
  class: "hidden rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:block"
1946
1946
  }, [
1947
- z(g(i.action), 1),
1947
+ L(g(i.action), 1),
1948
1948
  e("span", Is, ", " + g(i.name), 1)
1949
1949
  ], 8, As)
1950
1950
  ])
@@ -2189,7 +2189,7 @@ function co(p, u, r, i, s, o) {
2189
2189
  }, [
2190
2190
  e("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" }),
2191
2191
  e("span", { class: "sr-only" }, [
2192
- z(", {"),
2192
+ L(", {"),
2193
2193
  e("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })
2194
2194
  ])
2195
2195
  ])
@@ -2404,7 +2404,7 @@ const ie = /* @__PURE__ */ le(xo, [["render", $o]]), Co = {
2404
2404
  onClick: w
2405
2405
  }, {
2406
2406
  default: f(() => [
2407
- z(g(C.literals.changeInBulk), 1)
2407
+ L(g(C.literals.changeInBulk), 1)
2408
2408
  ]),
2409
2409
  _: 1
2410
2410
  }, 8, ["loading"])
@@ -2510,7 +2510,7 @@ const ie = /* @__PURE__ */ le(xo, [["render", $o]]), Co = {
2510
2510
  key: P
2511
2511
  }, [
2512
2512
  m(ie, {
2513
- onClick: (L) => F(_, N.id, N.name),
2513
+ onClick: (z) => F(_, N.id, N.name),
2514
2514
  class: "border-l border-gray-200 px-6 py-3 text-black hover:text-lime-400 cursor-pointer",
2515
2515
  price: _,
2516
2516
  currency: C.currency.symbol,
@@ -3115,7 +3115,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
3115
3115
  "aria-hidden": "true",
3116
3116
  class: "shrink-0"
3117
3117
  }, null, 8, ["icon"]),
3118
- z(" " + g(t.name) + " ", 1),
3118
+ L(" " + g(t.name) + " ", 1),
3119
3119
  m(c(ne), {
3120
3120
  class: y([t.children.some((a) => a.current) || t.current ? "rotate-90 text-black" : "text-gray-400", "ml-auto h-5 w-5 shrink-0"]),
3121
3121
  "aria-hidden": "true"
@@ -3139,7 +3139,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
3139
3139
  class: y([a.current ? "bg-lime-100" : "hover:bg-lime-100", "block rounded-md py-2 pl-9 pr-2 text-sm leading-6 text-gray-700 cursor-pointer"])
3140
3140
  }, {
3141
3141
  default: f(() => [
3142
- z(g(a.name), 1)
3142
+ L(g(a.name), 1)
3143
3143
  ]),
3144
3144
  _: 2
3145
3145
  }, 1032, ["onClick", "class"])
@@ -3165,7 +3165,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
3165
3165
  "aria-hidden": "true",
3166
3166
  class: "shrink-0"
3167
3167
  }, null, 8, ["icon"]),
3168
- z(" " + g(t.name), 1)
3168
+ L(" " + g(t.name), 1)
3169
3169
  ], 10, la))
3170
3170
  ]))), 128))
3171
3171
  ])
@@ -3194,7 +3194,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
3194
3194
  loading: d.loading
3195
3195
  }, {
3196
3196
  default: f(() => [
3197
- z(g(d.text), 1)
3197
+ L(g(d.text), 1)
3198
3198
  ]),
3199
3199
  _: 2
3200
3200
  }, 1032, ["value", "loading"]))), 256))
@@ -3280,7 +3280,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
3280
3280
  class: "self-center flex-shrink-0 h-3 w-3 text-red-500",
3281
3281
  "aria-hidden": "true"
3282
3282
  })) : b("", !0),
3283
- z(" " + g(r.item.change), 1)
3283
+ L(" " + g(r.item.change), 1)
3284
3284
  ], 2)) : b("", !0),
3285
3285
  B(e("div", pa, [
3286
3286
  e("div", fa, [
@@ -3355,7 +3355,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
3355
3355
  class: "mr-2 mb-2"
3356
3356
  }, {
3357
3357
  default: f(() => [
3358
- z(g(o.text), 1)
3358
+ L(g(o.text), 1)
3359
3359
  ]),
3360
3360
  _: 2
3361
3361
  }, 1032, ["loading", "color"]))), 128))
@@ -3542,7 +3542,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
3542
3542
  color: F.color
3543
3543
  }, {
3544
3544
  default: f(() => [
3545
- z(g(F.content), 1)
3545
+ L(g(F.content), 1)
3546
3546
  ]),
3547
3547
  _: 2
3548
3548
  }, 1032, ["loading", "color"])) : typeof F == "object" && F.type === "link" ? (l(), n("span", {
@@ -3606,7 +3606,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
3606
3606
  ]),
3607
3607
  "aria-current": t.current ? "page" : void 0
3608
3608
  }, [
3609
- z(g(t.name) + " ", 1),
3609
+ L(g(t.name) + " ", 1),
3610
3610
  t.count ? (l(), n("span", {
3611
3611
  key: 0,
3612
3612
  class: y([
@@ -3721,7 +3721,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
3721
3721
  onClick: (d) => s.$emit("timelineEventClicked", t.linkId),
3722
3722
  class: "font-medium text-black hover:text-lime-400 cursor-pointer"
3723
3723
  }, g(t?.target), 9, yn),
3724
- z(" " + g(t?.content), 1)
3724
+ L(" " + g(t?.content), 1)
3725
3725
  ])
3726
3726
  ]),
3727
3727
  e("div", vn, [
@@ -4115,7 +4115,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
4115
4115
  onClick: (o) => u.$emit("action", i.action)
4116
4116
  }, {
4117
4117
  default: f(() => [
4118
- z(g(i.text), 1)
4118
+ L(g(i.text), 1)
4119
4119
  ]),
4120
4120
  _: 2
4121
4121
  }, 1032, ["onClick"]))), 128)),
@@ -4170,7 +4170,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
4170
4170
  e("div", yi, [
4171
4171
  m(c(Qe), { class: "text-base font-semibold leading-6" }, {
4172
4172
  default: f(() => [
4173
- z(g(r.title), 1)
4173
+ L(g(r.title), 1)
4174
4174
  ]),
4175
4175
  _: 1
4176
4176
  }),
@@ -4295,7 +4295,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
4295
4295
  size: "small"
4296
4296
  }, {
4297
4297
  default: f(() => [
4298
- z(g(o.literals.deleteAllImages), 1)
4298
+ L(g(o.literals.deleteAllImages), 1)
4299
4299
  ]),
4300
4300
  _: 1
4301
4301
  })) : b("", !0)
@@ -4557,7 +4557,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
4557
4557
  }),
4558
4558
  m(U, { loading: !0 }, {
4559
4559
  default: f(() => d[2] || (d[2] = [
4560
- z("Search", -1)
4560
+ L("Search", -1)
4561
4561
  ])),
4562
4562
  _: 1,
4563
4563
  __: [2]
@@ -4598,7 +4598,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
4598
4598
  onClick: t
4599
4599
  }, {
4600
4600
  default: f(() => [
4601
- z(g(a.literals.search), 1)
4601
+ L(g(a.literals.search), 1)
4602
4602
  ]),
4603
4603
  _: 1
4604
4604
  }, 8, ["disabled", "class"])
@@ -4707,7 +4707,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
4707
4707
  onTagEvent: i[2] || (i[2] = (t) => r.$emit("deviceStatusTagClicked", t))
4708
4708
  }, {
4709
4709
  default: f(() => [
4710
- z(g(s.name), 1)
4710
+ L(g(s.name), 1)
4711
4711
  ]),
4712
4712
  _: 2
4713
4713
  }, 1032, ["loading", "event", "color"]))), 128))
@@ -4734,7 +4734,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
4734
4734
  }, null, 8, ["icon"])
4735
4735
  ], 2),
4736
4736
  e("h3", ud, [
4737
- z(g(r.name) + " ", 1),
4737
+ L(g(r.name) + " ", 1),
4738
4738
  B(e("span", {
4739
4739
  class: "text-black hover:text-lime-400 underline cursor-pointer",
4740
4740
  onClick: i[0] || (i[0] = (s) => r.$emit("deviceStatusQtyClicked", r.id))
@@ -4752,7 +4752,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
4752
4752
  onTagEvent: i[1] || (i[1] = (t) => r.$emit("deviceStatusTagClicked", t))
4753
4753
  }, {
4754
4754
  default: f(() => [
4755
- z(g(s.name), 1)
4755
+ L(g(s.name), 1)
4756
4756
  ]),
4757
4757
  _: 2
4758
4758
  }, 1032, ["event", "color"]))), 128))
@@ -5062,7 +5062,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
5062
5062
  e("div", Fd, [
5063
5063
  m(c(bt), { class: "block text-sm font-medium" }, {
5064
5064
  default: f(() => [
5065
- z(g(a.label), 1)
5065
+ L(g(a.label), 1)
5066
5066
  ]),
5067
5067
  _: 1
5068
5068
  }),
@@ -5233,7 +5233,7 @@ const hr = /* @__PURE__ */ le(mr, [["render", fr]]), yr = /* @__PURE__ */ M({
5233
5233
  loading: a.loading
5234
5234
  }, {
5235
5235
  default: f(() => [
5236
- z(g(a.buttonLiteral), 1)
5236
+ L(g(a.buttonLiteral), 1)
5237
5237
  ]),
5238
5238
  _: 1
5239
5239
  }, 8, ["loading"])) : b("", !0)
@@ -5285,7 +5285,7 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5285
5285
  onClick: t
5286
5286
  }, {
5287
5287
  default: f(() => [
5288
- z(g(v.addLiteral), 1)
5288
+ L(g(v.addLiteral), 1)
5289
5289
  ]),
5290
5290
  _: 1
5291
5291
  }, 8, ["icon"])) : b("", !0)
@@ -5314,7 +5314,7 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5314
5314
  onClick: a
5315
5315
  }, {
5316
5316
  default: f(() => [
5317
- z(g(v.removeLiteral), 1)
5317
+ L(g(v.removeLiteral), 1)
5318
5318
  ]),
5319
5319
  _: 1
5320
5320
  }, 8, ["icon"])) : b("", !0),
@@ -5326,7 +5326,7 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5326
5326
  onClick: t
5327
5327
  }, {
5328
5328
  default: f(() => [
5329
- z(g(v.addLiteral), 1)
5329
+ L(g(v.addLiteral), 1)
5330
5330
  ]),
5331
5331
  _: 1
5332
5332
  }, 8, ["icon"])) : b("", !0)
@@ -5338,7 +5338,7 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5338
5338
  color: "secondary"
5339
5339
  }, {
5340
5340
  default: f(() => [
5341
- z(g(v.buttonLiteral), 1)
5341
+ L(g(v.buttonLiteral), 1)
5342
5342
  ]),
5343
5343
  _: 1
5344
5344
  }),
@@ -5349,7 +5349,7 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5349
5349
  onClick: h
5350
5350
  }, {
5351
5351
  default: f(() => [
5352
- z(g(v.removeLiteral), 1)
5352
+ L(g(v.removeLiteral), 1)
5353
5353
  ]),
5354
5354
  _: 1
5355
5355
  })
@@ -5378,19 +5378,19 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5378
5378
  setup(p, { emit: u }) {
5379
5379
  const r = p, i = u, s = I({ id: "1", name: r.literals.and }), o = ae([]), t = I(r.availableCategories[0]), a = (_) => _ ? _ === "uiInput" ? r.literals.contains : r.literals.is : "", d = (_) => {
5380
5380
  o.splice(0, o.length), _.logicOperator === "and" || _.logicOperator === r.literals.and ? s.value = { id: "1", name: r.literals.and } : (_.logicOperator === "or" || _.logicOperator === r.literals.or) && (s.value = { id: "2", name: r.literals.or }), _.filters.forEach((P) => {
5381
- const L = r.availableCategories.find((R) => R.name === P.category);
5382
- if (L) {
5381
+ const z = r.availableCategories.find((R) => R.name === P.name);
5382
+ if (z) {
5383
5383
  const R = {
5384
- id: Date.now().toString() + Math.random().toString(36).substr(2, 9),
5385
- name: P.category,
5384
+ label: P.label,
5385
+ name: P.name,
5386
5386
  type: P.type,
5387
- props: { ...L.defaultProps }
5387
+ props: { ...z.defaultProps }
5388
5388
  };
5389
5389
  if (P.type === "uiInput")
5390
5390
  R.props.value = P.value || "";
5391
5391
  else if (P.type === "uiSelect") {
5392
- const G = L.defaultProps.items?.find((ut) => ut.name === P.value);
5393
- G ? R.props.select = G : L.defaultProps.items && L.defaultProps.items.length > 0 && (R.props.select = L.defaultProps.items[0]);
5392
+ const G = z.defaultProps.items?.find((ut) => ut.name === P.value);
5393
+ G ? R.props.select = G : z.defaultProps.items && z.defaultProps.items.length > 0 && (R.props.select = z.defaultProps.items[0]);
5394
5394
  }
5395
5395
  o.push(R);
5396
5396
  }
@@ -5399,7 +5399,7 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5399
5399
  H(() => r.literals, (_) => {
5400
5400
  s.value.id === "1" ? s.value.name = _.and : s.value.id === "2" && (s.value.name = _.or);
5401
5401
  }, { deep: !0 }), H(() => r.availableCategories, (_) => {
5402
- _.length > 0 && (_.some((L) => L.id === t.value.id) || (t.value = _[0]));
5402
+ _.length > 0 && (_.some((z) => z.name === t.value.name) || (t.value = _[0]));
5403
5403
  }, { deep: !0 }), H(() => r.filters, (_) => {
5404
5404
  _ && d(_);
5405
5405
  }, { deep: !0, immediate: !0 });
@@ -5407,10 +5407,10 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5407
5407
  { id: "1", name: r.literals.and },
5408
5408
  { id: "2", name: r.literals.or }
5409
5409
  ]), v = Y(() => r.availableCategories.map((_) => ({
5410
- id: _.id,
5411
- name: _.name
5410
+ name: _.name,
5411
+ label: _.label
5412
5412
  }))), j = Y(() => ({
5413
- id: t.value.id,
5413
+ label: t.value.label,
5414
5414
  name: t.value.name
5415
5415
  })), w = Y(() => o.map((_) => _.type === "uiInput" ? {
5416
5416
  name: _.name,
@@ -5427,12 +5427,12 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5427
5427
  })), T = (_) => {
5428
5428
  s.value = Array.isArray(_) ? _[0] || { id: "1", name: r.literals.and } : _;
5429
5429
  }, x = (_) => {
5430
- const P = Array.isArray(_) ? _[0] : _, L = r.availableCategories.find((R) => R.id === P.id);
5431
- L && (t.value = L);
5430
+ const P = Array.isArray(_) ? _[0] : _, z = r.availableCategories.find((R) => R.name === P.id);
5431
+ z && (t.value = z);
5432
5432
  }, A = () => {
5433
5433
  if (!t.value) return;
5434
5434
  const _ = {
5435
- id: Date.now().toString(),
5435
+ label: t.value.label,
5436
5436
  name: t.value.name,
5437
5437
  type: t.value.componentType,
5438
5438
  props: { ...t.value.defaultProps }
@@ -5440,8 +5440,8 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5440
5440
  o.push(_);
5441
5441
  }, F = (_, P) => {
5442
5442
  if (_ < 0 || _ >= o.length) return;
5443
- const L = o[_];
5444
- L.type === "uiInput" ? typeof P == "string" && (L.props.value = P) : L.type === "uiSelect" && (Array.isArray(P) ? L.props.select = P[0] : typeof P == "object" && P !== null && (L.props.select = P));
5443
+ const z = o[_];
5444
+ z.type === "uiInput" ? typeof P == "string" && (z.props.value = P) : z.type === "uiSelect" && (Array.isArray(P) ? z.props.select = P[0] : typeof P == "object" && P !== null && (z.props.select = P));
5445
5445
  }, C = (_) => {
5446
5446
  _ >= 0 && _ < o.length && (o.splice(_, 1), i("smartFilterDeleted", _));
5447
5447
  }, q = () => {
@@ -5449,10 +5449,11 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5449
5449
  }, N = () => {
5450
5450
  const P = {
5451
5451
  logicOperator: s.value.id === "1" ? "and" : "or",
5452
- filters: o.map((L) => ({
5453
- category: L.id,
5454
- type: L.type,
5455
- value: L.type === "uiInput" ? L.props.value : L.props.select?.id
5452
+ filters: o.map((z) => ({
5453
+ name: z.name,
5454
+ label: z.label,
5455
+ type: z.type,
5456
+ value: z.type === "uiInput" ? z.props.value : z.props.select?.id
5456
5457
  }))
5457
5458
  };
5458
5459
  i("smartFiltersSent", P);
@@ -5462,8 +5463,8 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5462
5463
  m(c($t), { class: "inline-flex items-center gap-x-2 text-sm/6 font-semibold text-gray-900 outline-none" }, {
5463
5464
  default: f(() => [
5464
5465
  e("span", null, g(r.literals.filters) + ": ", 1),
5465
- (l(!0), n($, null, S(w.value, (L, R) => (l(), n($, { key: R }, [
5466
- e("span", Wd, g(L.name) + " " + g(L.operator) + ": " + g(L.value), 1),
5466
+ (l(!0), n($, null, S(w.value, (z, R) => (l(), n($, { key: R }, [
5467
+ e("span", Wd, g(z.name) + " " + g(z.operator) + ": " + g(z.value), 1),
5467
5468
  R < w.value.length - 1 ? (l(), n("span", Gd, g(s.value.name), 1)) : b("", !0)
5468
5469
  ], 64))), 128)),
5469
5470
  m(c(oe), {
@@ -5500,15 +5501,15 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5500
5501
  disabled: !t.value
5501
5502
  }, {
5502
5503
  default: f(() => P[0] || (P[0] = [
5503
- z(" Agregar Filtro ", -1)
5504
+ L(" Agregar Filtro ", -1)
5504
5505
  ])),
5505
5506
  _: 1,
5506
5507
  __: [0]
5507
5508
  }, 8, ["disabled"])
5508
5509
  ]),
5509
- (l(!0), n($, null, S(o, (L, R) => (l(), n("div", {
5510
+ (l(!0), n($, null, S(o, (z, R) => (l(), n("div", {
5510
5511
  class: "flex items-center gap-x-2 w-full",
5511
- key: L.id
5512
+ key: z.name
5512
5513
  }, [
5513
5514
  m(Z, {
5514
5515
  loading: !1,
@@ -5516,7 +5517,7 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5516
5517
  color: "gray"
5517
5518
  }, {
5518
5519
  default: f(() => [
5519
- z(g(L.name), 1)
5520
+ L(g(z.label), 1)
5520
5521
  ]),
5521
5522
  _: 2
5522
5523
  }, 1024),
@@ -5526,23 +5527,23 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5526
5527
  color: "gray"
5527
5528
  }, {
5528
5529
  default: f(() => [
5529
- z(g(a(L.type)), 1)
5530
+ L(g(a(z.type)), 1)
5530
5531
  ]),
5531
5532
  _: 2
5532
5533
  }, 1024),
5533
- L.type === "uiSelect" ? (l(), k(ee, {
5534
+ z.type === "uiSelect" ? (l(), k(ee, {
5534
5535
  key: 0,
5535
5536
  class: "grow",
5536
5537
  loading: !1,
5537
- items: L.props.items || [],
5538
- select: L.props.select || L.props.items?.[0] || { id: "0", name: "Select..." },
5538
+ items: z.props.items || [],
5539
+ select: z.props.select || z.props.items?.[0] || { id: "0", name: "Select..." },
5539
5540
  onSelectChanged: (G) => F(R, G)
5540
- }, null, 8, ["items", "select", "onSelectChanged"])) : L.type === "uiInput" ? (l(), k(J, {
5541
+ }, null, 8, ["items", "select", "onSelectChanged"])) : z.type === "uiInput" ? (l(), k(J, {
5541
5542
  key: 1,
5542
5543
  class: "grow",
5543
5544
  loading: !1,
5544
- name: L.props.name || "",
5545
- value: L.props.value || "",
5545
+ name: z.props.name || "",
5546
+ value: z.props.value || "",
5546
5547
  onInput: (G) => F(R, G.target.value)
5547
5548
  }, null, 8, ["name", "value", "onInput"])) : b("", !0),
5548
5549
  R === 0 ? (l(), k(ee, {
@@ -5561,7 +5562,7 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5561
5562
  class: "uppercase"
5562
5563
  }, {
5563
5564
  default: f(() => [
5564
- z(g(s.value.name), 1)
5565
+ L(g(s.value.name), 1)
5565
5566
  ]),
5566
5567
  _: 1
5567
5568
  })) : b("", !0),
@@ -5583,7 +5584,7 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5583
5584
  onClick: q
5584
5585
  }, {
5585
5586
  default: f(() => [
5586
- z(g(r.literals.deleteAll), 1)
5587
+ L(g(r.literals.deleteAll), 1)
5587
5588
  ]),
5588
5589
  _: 1
5589
5590
  }, 8, ["icon"]),
@@ -5593,7 +5594,7 @@ const Ye = /* @__PURE__ */ le(Rd, [["render", Ud]]), Hd = { class: "flex flex-co
5593
5594
  onClick: N
5594
5595
  }, {
5595
5596
  default: f(() => [
5596
- z(g(r.literals.filter), 1)
5597
+ L(g(r.literals.filter), 1)
5597
5598
  ]),
5598
5599
  _: 1
5599
5600
  }, 8, ["icon"])
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hotelinking/ui",
3
3
  "private": false,
4
- "version": "14.47.11",
4
+ "version": "14.47.12",
5
5
  "files": [
6
6
  "dist"
7
7
  ],