@cobre-npm/ds-v3 0.142.0 → 0.142.2

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.
@@ -1636,7 +1636,8 @@ const Bi = /* @__PURE__ */ Vi(Um, [["render", nh]]), oh = { class: "co-input-gro
1636
1636
  totalItems: { default: void 0 },
1637
1637
  hasError: { type: Boolean },
1638
1638
  pageSize: {},
1639
- isLoading: { type: Boolean }
1639
+ isLoading: { type: Boolean },
1640
+ hasNextPage: { type: Boolean, default: void 0 }
1640
1641
  },
1641
1642
  emits: ["nextPage", "previousPage"],
1642
1643
  setup(t, { emit: e }) {
@@ -1647,8 +1648,8 @@ const Bi = /* @__PURE__ */ Vi(Um, [["render", nh]]), oh = { class: "co-input-gro
1647
1648
  const { currentPage: m, hasError: h, isLoading: _ } = a;
1648
1649
  return m === 1 || m === 0 || h || _;
1649
1650
  }), c = I(() => {
1650
- const { currentPage: m, totalPages: h, hasError: _, isLoading: y } = a;
1651
- return h === void 0 ? !!(_ || y) : m === h || h === 0 || _ || y;
1651
+ const { currentPage: m, totalPages: h, hasError: _, isLoading: y, hasNextPage: v } = a;
1652
+ return _ || y ? !0 : h !== void 0 ? m === h || h === 0 : v !== void 0 ? !v : !1;
1652
1653
  }), u = () => {
1653
1654
  n("previousPage");
1654
1655
  }, d = () => {
@@ -1677,7 +1678,7 @@ const Bi = /* @__PURE__ */ Vi(Um, [["render", nh]]), oh = { class: "co-input-gro
1677
1678
  ])
1678
1679
  ]));
1679
1680
  }
1680
- }), P8 = /* @__PURE__ */ Oe(kh, [["__scopeId", "data-v-689ae869"]]), Ch = ["id", "disabled", "name", "value", "checked"], Th = ["for"], Dh = ["for"], $h = /* @__PURE__ */ de({
1681
+ }), P8 = /* @__PURE__ */ Oe(kh, [["__scopeId", "data-v-7d0d8552"]]), Ch = ["id", "disabled", "name", "value", "checked"], Th = ["for"], Dh = ["for"], $h = /* @__PURE__ */ de({
1681
1682
  __name: "CobreRadio",
1682
1683
  props: {
1683
1684
  value: { default: "" },
@@ -15587,6 +15588,7 @@ const Rk = {
15587
15588
  labelOptional: { default: "" },
15588
15589
  labelTooltip: { default: void 0 },
15589
15590
  errorMsg: { default: "" },
15591
+ showErrors: { type: Boolean, default: !1 },
15590
15592
  placeholder: { default: "" },
15591
15593
  maxDate: { default: void 0 },
15592
15594
  minDate: { default: void 0 },
@@ -15599,63 +15601,73 @@ const Rk = {
15599
15601
  }),
15600
15602
  emits: /* @__PURE__ */ Ia(["update:modelValue"], ["update:modelValue"]),
15601
15603
  setup(t, { expose: e, emit: a }) {
15602
- const n = Lo(t, "modelValue"), o = t, r = a, s = j(!1), l = I(() => {
15603
- if (!o.isRequired) return !0;
15604
+ const n = Lo(t, "modelValue"), o = t, r = a, s = j(!1), l = I(() => s.value), i = I(() => {
15604
15605
  if (!n.value) return !1;
15605
15606
  if (o.range) {
15606
- const d = n.value;
15607
- if (!Array.isArray(d)) return !1;
15608
- const [m, h] = d, _ = m != null && String(m).trim() !== "", y = h != null && String(h).trim() !== "";
15609
- return _ && y;
15607
+ const m = n.value;
15608
+ if (!Array.isArray(m)) return !1;
15609
+ const [h, _] = m, y = h != null && String(h).trim() !== "", v = _ != null && String(_).trim() !== "";
15610
+ return y && v;
15610
15611
  }
15611
15612
  return String(n.value).trim() !== "";
15612
- }), i = I(() => s.value), c = () => {
15613
+ }), c = I(() => {
15614
+ const { isRequired: m, showErrors: h } = o;
15615
+ if (n.value && !l.value) return !0;
15616
+ const y = i.value && !h;
15617
+ return n.value || m ? y : !0;
15618
+ }), u = I(() => [
15619
+ "co-input-v3__field--white",
15620
+ "co-input-v3__field",
15621
+ "form-control",
15622
+ "co-ps-32",
15623
+ ...!c.value && l.value ? ["co-input-v3__field--error"] : []
15624
+ ].join(" ")), d = () => {
15613
15625
  s.value = !0;
15614
15626
  };
15615
15627
  return e({
15616
- isValid: l
15617
- }), (u, d) => {
15618
- const m = Ze("co-tooltip");
15628
+ isValid: c
15629
+ }), (m, h) => {
15630
+ const _ = Ze("co-tooltip");
15619
15631
  return f(), g("div", null, [
15620
- u.label ? (f(), g("div", Rk, [
15632
+ m.label ? (f(), g("div", Rk, [
15621
15633
  C("label", Vk, [
15622
- Fe(q(u.label) + " ", 1),
15623
- u.labelOptional ? (f(), g("span", Bk, " (" + q(u.labelOptional) + ") ", 1)) : x("", !0)
15634
+ Fe(q(m.label) + " ", 1),
15635
+ m.labelOptional ? (f(), g("span", Bk, " (" + q(m.labelOptional) + ") ", 1)) : x("", !0)
15624
15636
  ]),
15625
- u.labelTooltip ? Re((f(), g("i", {
15637
+ m.labelTooltip ? Re((f(), g("i", {
15626
15638
  key: 0,
15627
15639
  "data-bs-toggle": "tooltip",
15628
- title: u.labelTooltip,
15640
+ title: m.labelTooltip,
15629
15641
  class: "icon-info co-icon co-icon--sm ms-2 co-mb-4"
15630
15642
  }, null, 8, Fk)), [
15631
- [m]
15643
+ [_]
15632
15644
  ]) : x("", !0)
15633
15645
  ])) : x("", !0),
15634
15646
  ce(O(Or), {
15635
- required: u.isRequired,
15647
+ required: m.isRequired,
15636
15648
  "model-value": n.value,
15637
15649
  utc: "preserve",
15638
- placeholder: u.placeholder,
15639
- "max-date": u.maxDate,
15640
- "min-date": u.minDate,
15641
- format: u.format || "dd/MM/yyyy",
15642
- locale: u.locale || "es",
15643
- range: u.range,
15650
+ placeholder: m.placeholder,
15651
+ "max-date": m.maxDate,
15652
+ "min-date": m.minDate,
15653
+ format: m.format || "dd/MM/yyyy",
15654
+ locale: m.locale || "es",
15655
+ range: m.range,
15644
15656
  "enable-time-picker": !1,
15645
- ui: { input: "co-input-v3__field--white co-input-v3__field form-control co-ps-32" },
15657
+ ui: { input: u.value },
15646
15658
  "auto-apply": "",
15647
15659
  "action-row": { showSelect: !1, showCancel: !1, showNow: !1, showPreview: !1 },
15648
- "onUpdate:modelValue": d[0] || (d[0] = (h) => r("update:modelValue", h)),
15649
- onBlur: c
15650
- }, null, 8, ["required", "model-value", "placeholder", "max-date", "min-date", "format", "locale", "range"]),
15651
- !l.value && u.errorMsg && i.value ? (f(), g("div", Yk, [
15652
- d[1] || (d[1] = C("i", { class: "icon-alert-circle co-icon co-icon--sm" }, null, -1)),
15653
- C("p", Hk, q(u.errorMsg), 1)
15660
+ "onUpdate:modelValue": h[0] || (h[0] = (y) => r("update:modelValue", y)),
15661
+ onBlur: d
15662
+ }, null, 8, ["required", "model-value", "placeholder", "max-date", "min-date", "format", "locale", "range", "ui"]),
15663
+ !c.value && l.value && m.errorMsg ? (f(), g("div", Yk, [
15664
+ h[1] || (h[1] = C("i", { class: "icon-alert-circle co-icon co-icon--sm" }, null, -1)),
15665
+ C("p", Hk, q(m.errorMsg), 1)
15654
15666
  ])) : x("", !0)
15655
15667
  ]);
15656
15668
  };
15657
15669
  }
15658
- }), Uk = /* @__PURE__ */ Oe(Wk, [["__scopeId", "data-v-f5e1003b"]]), jk = {
15670
+ }), Uk = /* @__PURE__ */ Oe(Wk, [["__scopeId", "data-v-2416d493"]]), jk = {
15659
15671
  class: "mb-0 custom-font co-me-4 skeleton",
15660
15672
  style: { "min-width": "100px" }
15661
15673
  }, zk = { key: 0 }, qk = /* @__PURE__ */ de({
@@ -23401,6 +23413,7 @@ const QE = { class: "co-filter dropdown cobre-dropdown" }, ZE = {
23401
23413
  isRequired: p.required,
23402
23414
  labelOptional: p.required ? void 0 : y.optionalLabel,
23403
23415
  errorMsg: m(p.id),
23416
+ showErrors: d(p.id),
23404
23417
  modelValue: p.value,
23405
23418
  placeholder: p.placeholder,
23406
23419
  maxDate: (H = p.props) == null ? void 0 : H.maxDate,
@@ -23410,7 +23423,7 @@ const QE = { class: "co-filter dropdown cobre-dropdown" }, ZE = {
23410
23423
  labelTooltip: (J = p.props) == null ? void 0 : J.labelTooltip,
23411
23424
  range: (re = p.props) == null ? void 0 : re.range,
23412
23425
  "onUpdate:modelValue": (ue) => u(p.id, ue)
23413
- }, null, 8, ["id", "label", "isRequired", "labelOptional", "errorMsg", "modelValue", "placeholder", "maxDate", "minDate", "format", "locale", "labelTooltip", "range", "onUpdate:modelValue"])
23426
+ }, null, 8, ["id", "label", "isRequired", "labelOptional", "errorMsg", "showErrors", "modelValue", "placeholder", "maxDate", "minDate", "format", "locale", "labelTooltip", "range", "onUpdate:modelValue"])
23414
23427
  ], 2)) : x("", !0),
23415
23428
  p.type === "select" ? (f(), g("div", {
23416
23429
  key: 2,