@appmax_npm/ds-prime 1.0.0-alpha.63 → 1.0.0-alpha.67

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as F, ref as n, computed as B, watch as d, openBlock as _, createElementBlock as h, createVNode as u, unref as i, withCtx as C } from "vue";
1
+ import { defineComponent as F, ref as n, computed as B, watch as u, openBlock as _, createElementBlock as h, createVNode as i, unref as d, withCtx as C } from "vue";
2
2
  import V from "primevue/menu";
3
3
  import H from "primevue/popover";
4
4
  import O from "primevue/datepicker";
@@ -14,8 +14,8 @@ const P = /* @__PURE__ */ F({
14
14
  style: {}
15
15
  },
16
16
  emits: ["update:modelValue"],
17
- setup(p, { emit: D }) {
18
- const v = p, b = D, o = n(), c = n(), l = n(null), f = {
17
+ setup(p, { emit: f }) {
18
+ const v = p, D = f, o = n(), r = n(), l = n(null), b = {
19
19
  root: {
20
20
  class: "!min-w-0 am-date-filter"
21
21
  },
@@ -35,7 +35,7 @@ const P = /* @__PURE__ */ F({
35
35
  content: {
36
36
  class: "!p-0"
37
37
  }
38
- }, g = {
38
+ }, k = {
39
39
  dayCell: {
40
40
  class: "!p-0"
41
41
  },
@@ -45,21 +45,21 @@ const P = /* @__PURE__ */ F({
45
45
  panel: {
46
46
  class: "!p-0 !border-none"
47
47
  }
48
- }, k = B(() => [
48
+ }, y = B(() => [
49
49
  {
50
50
  label: "Customizar",
51
51
  icon: "pi pi-calendar",
52
52
  command: (e) => {
53
- c.value.toggle(e.originalEvent), a("Customizar");
53
+ r.value.toggle(e.originalEvent), t("Customizar");
54
54
  },
55
- class: ["custom", o.value === "Customizar" ? "bg-[#EBE1FE]" : ""]
55
+ class: ["am-v3-date-filter-selector-item-customize", "custom", o.value === "Customizar" ? "bg-[#EBE1FE]" : ""]
56
56
  },
57
- { label: "Hoje", command: () => a("Hoje"), class: o.value === "Hoje" ? "bg-[#EBE1FE]" : "" },
58
- { label: "Ontem", command: () => a("Ontem"), class: o.value === "Ontem" ? "bg-[#EBE1FE]" : "" },
59
- { label: "7D", command: () => a("7D"), class: o.value === "7D" ? "bg-[#EBE1FE]" : "" },
60
- { label: "14D", command: () => a("14D"), class: o.value === "14D" ? "bg-[#EBE1FE]" : "" },
61
- { label: "30D", command: () => a("30D"), class: o.value === "30D" ? "bg-[#EBE1FE]" : "" }
62
- ]), a = (e) => {
57
+ { label: "Hoje", command: () => t("Hoje"), class: ["am-v3-date-filter-selector-item-today", o.value === "Hoje" ? "bg-[#EBE1FE]" : ""] },
58
+ { label: "Ontem", command: () => t("Ontem"), class: ["am-v3-date-filter-selector-item-yesterday", o.value === "Ontem" ? "bg-[#EBE1FE]" : ""] },
59
+ { label: "7D", command: () => t("7D"), class: ["am-v3-date-filter-selector-item-7d", o.value === "7D" ? "bg-[#EBE1FE]" : ""] },
60
+ { label: "14D", command: () => t("14D"), class: ["am-v3-date-filter-selector-item-14d", o.value === "14D" ? "bg-[#EBE1FE]" : ""] },
61
+ { label: "30D", command: () => t("30D"), class: ["am-v3-date-filter-selector-item-30d", o.value === "30D" ? "bg-[#EBE1FE]" : ""] }
62
+ ]), t = (e) => {
63
63
  switch (o.value = e, e) {
64
64
  case "Hoje":
65
65
  l.value = [s(), s()];
@@ -81,60 +81,63 @@ const P = /* @__PURE__ */ F({
81
81
  const e = /* @__PURE__ */ new Date();
82
82
  return e.setHours(0, 0, 0, 0), e;
83
83
  }, m = (e) => {
84
- const t = s();
85
- return t.setDate(t.getDate() + e), t;
86
- }, x = (e) => {
84
+ const a = s();
85
+ return a.setDate(a.getDate() + e), a;
86
+ }, g = (e) => {
87
87
  switch (e) {
88
88
  case 0:
89
- a("Hoje");
89
+ t("Hoje");
90
90
  break;
91
91
  case 1:
92
- a("Ontem");
92
+ t("Ontem");
93
93
  break;
94
94
  case 7:
95
- a("7D");
95
+ t("7D");
96
96
  break;
97
97
  case 14:
98
- a("14D");
98
+ t("14D");
99
99
  break;
100
100
  case 30:
101
- a("30D");
101
+ t("30D");
102
102
  break;
103
103
  default:
104
- a("Customizar");
104
+ t("Customizar");
105
105
  break;
106
106
  }
107
107
  };
108
- return d(l, (e) => {
109
- var t;
108
+ return u(l, (e) => {
109
+ var a;
110
110
  if (Array.isArray(e) && e.length === 2 && e[0] && e[1]) {
111
- (t = c.value) == null || t.hide();
112
- const r = e.map((y) => y.toISOString());
113
- b("update:modelValue", r);
111
+ (a = r.value) == null || a.hide();
112
+ const c = e.map((x) => x.toISOString());
113
+ D("update:modelValue", c);
114
114
  }
115
- }), d(
115
+ }), u(
116
116
  () => v.defaultSelected,
117
117
  (e) => {
118
- x(e);
118
+ g(e);
119
119
  },
120
120
  { immediate: !0 }
121
- ), (e, t) => (_(), h("div", null, [
122
- u(i(V), {
123
- model: k.value,
124
- pt: f
121
+ ), (e, a) => (_(), h("div", null, [
122
+ i(d(V), {
123
+ "data-test": "amdatefilter-toolbar",
124
+ model: y.value,
125
+ pt: b
125
126
  }, null, 8, ["model"]),
126
- u(i(H), {
127
+ i(d(H), {
128
+ "data-test": "amdatefilter-popover",
127
129
  ref_key: "popover",
128
- ref: c,
130
+ ref: r,
129
131
  pt: E
130
132
  }, {
131
133
  default: C(() => [
132
- u(i(O), {
134
+ i(d(O), {
135
+ "data-test": "amdatefilter-datepicker",
133
136
  modelValue: l.value,
134
- "onUpdate:modelValue": t[0] || (t[0] = (r) => l.value = r),
137
+ "onUpdate:modelValue": a[0] || (a[0] = (c) => l.value = c),
135
138
  selectionMode: "range",
136
139
  inline: "",
137
- pt: g,
140
+ pt: k,
138
141
  dateFormat: "yyyy-mm-dd",
139
142
  minDate: e.minDate,
140
143
  maxDate: e.maxDate
@@ -144,7 +147,7 @@ const P = /* @__PURE__ */ F({
144
147
  }, 512)
145
148
  ]));
146
149
  }
147
- }), M = /* @__PURE__ */ j(P, [["__scopeId", "data-v-1990f91c"]]);
150
+ }), M = /* @__PURE__ */ j(P, [["__scopeId", "data-v-1cf63367"]]);
148
151
  export {
149
152
  M as default
150
153
  };