linear-react-components-ui 2.1.0-beta.0 → 2.1.0-beta.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.
- package/lib/assets/styles/datepicker2.css +77 -4
- package/lib/inputs/number/Currency.js +19 -17
- package/lib/inputs/number/Currency.js.map +1 -1
- package/lib/inputs/number/Decimal.js +19 -17
- package/lib/inputs/number/Decimal.js.map +1 -1
- package/lib/inputs/number/index.js +17 -15
- package/lib/inputs/number/index.js.map +1 -1
- package/lib/inputs2/date/calendarbox.d.ts +23 -0
- package/lib/inputs2/date/calendarbox.js +254 -0
- package/lib/inputs2/date/calendarbox.js.map +1 -0
- package/lib/inputs2/date/datefield/base.js +590 -214
- package/lib/inputs2/date/datefield/base.js.map +1 -1
- package/lib/inputs2/date/datefield/triggers.js +4 -4
- package/lib/inputs2/date/datefield/triggers.js.map +1 -1
- package/lib/inputs2/date/datefield/types.d.ts +5 -12
- package/lib/inputs2/date/dateperiodfield/base.js +543 -674
- package/lib/inputs2/date/dateperiodfield/base.js.map +1 -1
- package/lib/inputs2/date/dateperiodfield/triggers.js +21 -9
- package/lib/inputs2/date/dateperiodfield/triggers.js.map +1 -1
- package/lib/inputs2/date/dateperiodfield/types.d.ts +7 -23
- package/lib/inputs2/date/helpers.d.ts +21 -4
- package/lib/inputs2/date/helpers.js +64 -4
- package/lib/inputs2/date/helpers.js.map +1 -1
- package/lib/inputs2/date/{base/constants.d.ts → hooks/useCalendarPosition.d.ts} +1 -1
- package/lib/inputs2/date/hooks/useCalendarPosition.js +93 -0
- package/lib/inputs2/date/hooks/useCalendarPosition.js.map +1 -0
- package/lib/inputs2/date/hooks/useDateCalendarState.d.ts +14 -0
- package/lib/inputs2/date/hooks/useDateCalendarState.js +250 -0
- package/lib/inputs2/date/hooks/useDateCalendarState.js.map +1 -0
- package/lib/inputs2/date/hooks/useDateMask.d.ts +20 -0
- package/lib/inputs2/date/hooks/useDateMask.js +178 -0
- package/lib/inputs2/date/hooks/useDateMask.js.map +1 -0
- package/lib/inputs2/date/timeselector.d.ts +15 -0
- package/lib/inputs2/date/timeselector.js +228 -0
- package/lib/inputs2/date/timeselector.js.map +1 -0
- package/lib/inputs2/date/types.d.ts +16 -1
- package/lib/inputs2/date/types.js.map +1 -1
- package/lib/inputs2/selectfield/base.js +1 -1
- package/lib/inputs2/selectfield/base.js.map +1 -1
- package/lib/menus/float/SubMenuContainer.d.ts +10 -28
- package/lib/menus/float/SubMenuContainer.js +97 -83
- package/lib/menus/float/SubMenuContainer.js.map +1 -1
- package/lib/node_modules/moment/dist/locale/pt-br.js +54 -0
- package/lib/node_modules/moment/dist/locale/pt-br.js.map +1 -0
- package/lib/treetable/helpers.d.ts +0 -2
- package/lib/treetable/helpers.js.map +1 -1
- package/package.json +1 -1
- package/lib/_virtual/index.js +0 -8
- package/lib/_virtual/index.js.map +0 -1
- package/lib/_virtual/index2.js +0 -5
- package/lib/_virtual/index2.js.map +0 -1
- package/lib/_virtual/index3.js +0 -5
- package/lib/_virtual/index3.js.map +0 -1
- package/lib/_virtual/react-is.development.js +0 -5
- package/lib/_virtual/react-is.development.js.map +0 -1
- package/lib/_virtual/react-is.production.min.js +0 -5
- package/lib/_virtual/react-is.production.min.js.map +0 -1
- package/lib/inputs2/date/base/constants.js +0 -69
- package/lib/inputs2/date/base/constants.js.map +0 -1
- package/lib/inputs2/date/datefield/calendarbox.d.ts +0 -6
- package/lib/inputs2/date/datefield/calendarbox.js +0 -228
- package/lib/inputs2/date/datefield/calendarbox.js.map +0 -1
- package/lib/inputs2/date/dateperiodfield/calendarbox.d.ts +0 -6
- package/lib/inputs2/date/dateperiodfield/calendarbox.js +0 -282
- package/lib/inputs2/date/dateperiodfield/calendarbox.js.map +0 -1
- package/lib/node_modules/object-assign/index.js +0 -79
- package/lib/node_modules/object-assign/index.js.map +0 -1
- package/lib/node_modules/prop-types/checkPropTypes.js +0 -69
- package/lib/node_modules/prop-types/checkPropTypes.js.map +0 -1
- package/lib/node_modules/prop-types/factoryWithThrowingShims.js +0 -59
- package/lib/node_modules/prop-types/factoryWithThrowingShims.js.map +0 -1
- package/lib/node_modules/prop-types/factoryWithTypeCheckers.js +0 -452
- package/lib/node_modules/prop-types/factoryWithTypeCheckers.js.map +0 -1
- package/lib/node_modules/prop-types/index.js +0 -21
- package/lib/node_modules/prop-types/index.js.map +0 -1
- package/lib/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -13
- package/lib/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +0 -1
- package/lib/node_modules/prop-types/lib/has.js +0 -12
- package/lib/node_modules/prop-types/lib/has.js.map +0 -1
- package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +0 -166
- package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +0 -1
- package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +0 -107
- package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +0 -1
- package/lib/node_modules/prop-types/node_modules/react-is/index.js +0 -18
- package/lib/node_modules/prop-types/node_modules/react-is/index.js.map +0 -1
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { c as compilerRuntimeExports } from "../../../_virtual/compiler-runtime.js";
|
|
3
|
-
import _ from "../../../_virtual/lodash.js";
|
|
4
|
-
import hooks from "../../../node_modules/moment/dist/moment.js";
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
|
-
import Button from "../../../buttons/Button.js";
|
|
7
|
-
import '../../../assets/styles/button.css';/* empty css */
|
|
8
|
-
import TextContent from "../../../textContent/index.js";
|
|
9
|
-
import { useDateFieldContext } from "./context.js";
|
|
10
|
-
import { generateCalendarWeeks, TOKEN_ISO_FORMAT } from "../helpers.js";
|
|
11
|
-
import { useCalendarPosition } from "../base/constants.js";
|
|
12
|
-
const CalendarBox = forwardRef((__, ref) => {
|
|
13
|
-
const $ = compilerRuntimeExports.c(63);
|
|
14
|
-
const {
|
|
15
|
-
inputFieldId,
|
|
16
|
-
calendarDisplayDate,
|
|
17
|
-
calendarBoxOpen,
|
|
18
|
-
dateContainerRef,
|
|
19
|
-
handlePreviousMonth,
|
|
20
|
-
handleNextMonth,
|
|
21
|
-
selectedDate,
|
|
22
|
-
handleSelectDate,
|
|
23
|
-
activeDescendant
|
|
24
|
-
} = useDateFieldContext();
|
|
25
|
-
const {
|
|
26
|
-
calendarBoxStyles
|
|
27
|
-
} = useCalendarPosition(calendarBoxOpen, dateContainerRef);
|
|
28
|
-
let t0;
|
|
29
|
-
let t1;
|
|
30
|
-
let t10;
|
|
31
|
-
let t11;
|
|
32
|
-
let t2;
|
|
33
|
-
let t3;
|
|
34
|
-
let t4;
|
|
35
|
-
let t5;
|
|
36
|
-
let t6;
|
|
37
|
-
let t7;
|
|
38
|
-
let t8;
|
|
39
|
-
let t9;
|
|
40
|
-
if ($[0] !== activeDescendant || $[1] !== calendarBoxOpen || $[2] !== calendarBoxStyles || $[3] !== calendarDisplayDate || $[4] !== handleNextMonth || $[5] !== handlePreviousMonth || $[6] !== handleSelectDate || $[7] !== inputFieldId || $[8] !== ref || $[9] !== selectedDate) {
|
|
41
|
-
const weeks = generateCalendarWeeks(calendarDisplayDate);
|
|
42
|
-
const handleOnMouseDown = _temp;
|
|
43
|
-
t5 = ref;
|
|
44
|
-
t6 = calendarBoxStyles;
|
|
45
|
-
t7 = calendarBoxOpen;
|
|
46
|
-
t8 = "date-calendar-box";
|
|
47
|
-
t9 = "test-date-field-calendar-box";
|
|
48
|
-
let t122;
|
|
49
|
-
if ($[22] !== handlePreviousMonth) {
|
|
50
|
-
t122 = /* @__PURE__ */ jsx(Button, { boxShadow: false, type: "button", iconName: "arrow_left", title: "Mês anterior", className: "previous-month", "aria-label": "Mês anterior", onClick: handlePreviousMonth, onMouseDown: handleOnMouseDown });
|
|
51
|
-
$[22] = handlePreviousMonth;
|
|
52
|
-
$[23] = t122;
|
|
53
|
-
} else {
|
|
54
|
-
t122 = $[23];
|
|
55
|
-
}
|
|
56
|
-
let t132;
|
|
57
|
-
if ($[24] !== calendarDisplayDate) {
|
|
58
|
-
t132 = calendarDisplayDate.format("MMMM YYYY");
|
|
59
|
-
$[24] = calendarDisplayDate;
|
|
60
|
-
$[25] = t132;
|
|
61
|
-
} else {
|
|
62
|
-
t132 = $[25];
|
|
63
|
-
}
|
|
64
|
-
let t142;
|
|
65
|
-
if ($[26] !== calendarDisplayDate) {
|
|
66
|
-
t142 = calendarDisplayDate.format("MMMM YYYY");
|
|
67
|
-
$[26] = calendarDisplayDate;
|
|
68
|
-
$[27] = t142;
|
|
69
|
-
} else {
|
|
70
|
-
t142 = $[27];
|
|
71
|
-
}
|
|
72
|
-
let t152;
|
|
73
|
-
if ($[28] !== t132 || $[29] !== t142) {
|
|
74
|
-
t152 = /* @__PURE__ */ jsx("div", { "aria-live": "polite", className: "month-year", children: /* @__PURE__ */ jsx(TextContent, { "aria-label": t132, as: "p", "data-testid": "test-date-field-calendar-box-month-description", children: t142 }) });
|
|
75
|
-
$[28] = t132;
|
|
76
|
-
$[29] = t142;
|
|
77
|
-
$[30] = t152;
|
|
78
|
-
} else {
|
|
79
|
-
t152 = $[30];
|
|
80
|
-
}
|
|
81
|
-
let t16;
|
|
82
|
-
if ($[31] !== handleNextMonth) {
|
|
83
|
-
t16 = /* @__PURE__ */ jsx(Button, { boxShadow: false, type: "button", iconName: "arrow_right", title: "Próximo mês", className: "next-month", "aria-label": "Próximo mês", onClick: handleNextMonth, onMouseDown: handleOnMouseDown });
|
|
84
|
-
$[31] = handleNextMonth;
|
|
85
|
-
$[32] = t16;
|
|
86
|
-
} else {
|
|
87
|
-
t16 = $[32];
|
|
88
|
-
}
|
|
89
|
-
if ($[33] !== inputFieldId || $[34] !== t122 || $[35] !== t152 || $[36] !== t16) {
|
|
90
|
-
t10 = /* @__PURE__ */ jsxs("div", { id: inputFieldId, className: "date-calendar-box-header", children: [
|
|
91
|
-
t122,
|
|
92
|
-
t152,
|
|
93
|
-
t16
|
|
94
|
-
] });
|
|
95
|
-
$[33] = inputFieldId;
|
|
96
|
-
$[34] = t122;
|
|
97
|
-
$[35] = t152;
|
|
98
|
-
$[36] = t16;
|
|
99
|
-
$[37] = t10;
|
|
100
|
-
} else {
|
|
101
|
-
t10 = $[37];
|
|
102
|
-
}
|
|
103
|
-
if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
|
|
104
|
-
t11 = /* @__PURE__ */ jsx("div", { "aria-label": "Dias da Semana", role: "grid", className: "date-calendar-box-days-of-week", children: hooks.weekdaysShort(true).map(_temp2) });
|
|
105
|
-
$[38] = t11;
|
|
106
|
-
} else {
|
|
107
|
-
t11 = $[38];
|
|
108
|
-
}
|
|
109
|
-
t4 = "date-calendar-box-grid-of-days";
|
|
110
|
-
t2 = "Calendário";
|
|
111
|
-
t3 = "grid";
|
|
112
|
-
t0 = "weeks";
|
|
113
|
-
let t17;
|
|
114
|
-
if ($[39] !== activeDescendant || $[40] !== calendarDisplayDate || $[41] !== handleSelectDate || $[42] !== selectedDate) {
|
|
115
|
-
t17 = (week, weekIndex) => /* @__PURE__ */ jsx("tr", { role: "row", children: week.map((date, dateIndex) => {
|
|
116
|
-
const isToday = _.isEqual(hooks().format(TOKEN_ISO_FORMAT), date.format(TOKEN_ISO_FORMAT));
|
|
117
|
-
const hasFocus = _.isEqual(activeDescendant, date.format(TOKEN_ISO_FORMAT));
|
|
118
|
-
const isSelected = selectedDate ? date.isSame(selectedDate, "day") : false;
|
|
119
|
-
const isCurrentMonth = date.month() === calendarDisplayDate.month();
|
|
120
|
-
const idActiveDescendant = date.format(TOKEN_ISO_FORMAT);
|
|
121
|
-
const descriptionDate = date.format("LL");
|
|
122
|
-
return /* @__PURE__ */ jsx("td", { role: "gridcell", children: /* @__PURE__ */ jsx(Button, { id: idActiveDescendant, type: "button", className: "day-button", boxShadow: false, tabIndex: -1, title: descriptionDate, "aria-label": descriptionDate, "aria-selected": isSelected, "data-testid": "test-date-field-day-button", "data-state-is-today": isToday, "data-state-has-focus": hasFocus, "data-state-is-current-month": isCurrentMonth, label: date.date().toString(), onMouseDown: handleOnMouseDown, onClick: () => handleSelectDate(date) }) }, dateIndex);
|
|
123
|
-
}) }, weekIndex + 1);
|
|
124
|
-
$[39] = activeDescendant;
|
|
125
|
-
$[40] = calendarDisplayDate;
|
|
126
|
-
$[41] = handleSelectDate;
|
|
127
|
-
$[42] = selectedDate;
|
|
128
|
-
$[43] = t17;
|
|
129
|
-
} else {
|
|
130
|
-
t17 = $[43];
|
|
131
|
-
}
|
|
132
|
-
t1 = weeks.map(t17);
|
|
133
|
-
$[0] = activeDescendant;
|
|
134
|
-
$[1] = calendarBoxOpen;
|
|
135
|
-
$[2] = calendarBoxStyles;
|
|
136
|
-
$[3] = calendarDisplayDate;
|
|
137
|
-
$[4] = handleNextMonth;
|
|
138
|
-
$[5] = handlePreviousMonth;
|
|
139
|
-
$[6] = handleSelectDate;
|
|
140
|
-
$[7] = inputFieldId;
|
|
141
|
-
$[8] = ref;
|
|
142
|
-
$[9] = selectedDate;
|
|
143
|
-
$[10] = t0;
|
|
144
|
-
$[11] = t1;
|
|
145
|
-
$[12] = t10;
|
|
146
|
-
$[13] = t11;
|
|
147
|
-
$[14] = t2;
|
|
148
|
-
$[15] = t3;
|
|
149
|
-
$[16] = t4;
|
|
150
|
-
$[17] = t5;
|
|
151
|
-
$[18] = t6;
|
|
152
|
-
$[19] = t7;
|
|
153
|
-
$[20] = t8;
|
|
154
|
-
$[21] = t9;
|
|
155
|
-
} else {
|
|
156
|
-
t0 = $[10];
|
|
157
|
-
t1 = $[11];
|
|
158
|
-
t10 = $[12];
|
|
159
|
-
t11 = $[13];
|
|
160
|
-
t2 = $[14];
|
|
161
|
-
t3 = $[15];
|
|
162
|
-
t4 = $[16];
|
|
163
|
-
t5 = $[17];
|
|
164
|
-
t6 = $[18];
|
|
165
|
-
t7 = $[19];
|
|
166
|
-
t8 = $[20];
|
|
167
|
-
t9 = $[21];
|
|
168
|
-
}
|
|
169
|
-
let t12;
|
|
170
|
-
if ($[44] !== t0 || $[45] !== t1) {
|
|
171
|
-
t12 = /* @__PURE__ */ jsx("tbody", { className: t0, children: t1 });
|
|
172
|
-
$[44] = t0;
|
|
173
|
-
$[45] = t1;
|
|
174
|
-
$[46] = t12;
|
|
175
|
-
} else {
|
|
176
|
-
t12 = $[46];
|
|
177
|
-
}
|
|
178
|
-
let t13;
|
|
179
|
-
if ($[47] !== t12 || $[48] !== t2 || $[49] !== t3) {
|
|
180
|
-
t13 = /* @__PURE__ */ jsx("table", { "aria-label": t2, role: t3, children: t12 });
|
|
181
|
-
$[47] = t12;
|
|
182
|
-
$[48] = t2;
|
|
183
|
-
$[49] = t3;
|
|
184
|
-
$[50] = t13;
|
|
185
|
-
} else {
|
|
186
|
-
t13 = $[50];
|
|
187
|
-
}
|
|
188
|
-
let t14;
|
|
189
|
-
if ($[51] !== t13 || $[52] !== t4) {
|
|
190
|
-
t14 = /* @__PURE__ */ jsx("div", { className: t4, children: t13 });
|
|
191
|
-
$[51] = t13;
|
|
192
|
-
$[52] = t4;
|
|
193
|
-
$[53] = t14;
|
|
194
|
-
} else {
|
|
195
|
-
t14 = $[53];
|
|
196
|
-
}
|
|
197
|
-
let t15;
|
|
198
|
-
if ($[54] !== t10 || $[55] !== t11 || $[56] !== t14 || $[57] !== t5 || $[58] !== t6 || $[59] !== t7 || $[60] !== t8 || $[61] !== t9) {
|
|
199
|
-
t15 = /* @__PURE__ */ jsxs("div", { ref: t5, style: t6, "aria-expanded": t7, className: t8, "data-testid": t9, children: [
|
|
200
|
-
t10,
|
|
201
|
-
t11,
|
|
202
|
-
t14
|
|
203
|
-
] });
|
|
204
|
-
$[54] = t10;
|
|
205
|
-
$[55] = t11;
|
|
206
|
-
$[56] = t14;
|
|
207
|
-
$[57] = t5;
|
|
208
|
-
$[58] = t6;
|
|
209
|
-
$[59] = t7;
|
|
210
|
-
$[60] = t8;
|
|
211
|
-
$[61] = t9;
|
|
212
|
-
$[62] = t15;
|
|
213
|
-
} else {
|
|
214
|
-
t15 = $[62];
|
|
215
|
-
}
|
|
216
|
-
return t15;
|
|
217
|
-
});
|
|
218
|
-
CalendarBox.displayName = "DateFieldCalendarBox";
|
|
219
|
-
function _temp(event) {
|
|
220
|
-
event?.preventDefault?.();
|
|
221
|
-
}
|
|
222
|
-
function _temp2(day, idx) {
|
|
223
|
-
return /* @__PURE__ */ jsx("span", { title: day, role: "columnheader", children: day }, `day-of-week-${idx + 1}`);
|
|
224
|
-
}
|
|
225
|
-
export {
|
|
226
|
-
CalendarBox
|
|
227
|
-
};
|
|
228
|
-
//# sourceMappingURL=calendarbox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendarbox.js","sources":["../../../../src/lib/inputs2/date/datefield/calendarbox.tsx"],"sourcesContent":["import _ from 'lodash';\nimport moment from 'moment';\nimport { ComponentProps, forwardRef, MouseEvent } from 'react';\nimport Button from '../../../buttons';\nimport TextContent from '../../../textContent';\nimport { useDateFieldContext } from './context';\nimport { generateCalendarWeeks, TOKEN_ISO_FORMAT } from '../helpers';\nimport { useCalendarPosition } from '../base/constants';\n\ninterface DateFieldCalendarBoxProps extends ComponentProps<'div'> { }\n\nconst CalendarBox = forwardRef<HTMLDivElement, DateFieldCalendarBoxProps>((__, ref) => {\n const {\n inputFieldId, calendarDisplayDate, calendarBoxOpen, dateContainerRef, handlePreviousMonth, \n handleNextMonth, selectedDate, handleSelectDate, activeDescendant,\n } = useDateFieldContext();\n const { calendarBoxStyles } = useCalendarPosition(calendarBoxOpen, dateContainerRef);\n\n const weeks = generateCalendarWeeks(calendarDisplayDate);\n\n const handleOnMouseDown = (event: MouseEvent<HTMLButtonElement>) => {\n event?.preventDefault?.();\n };\n\n return (\n <div\n ref={ref}\n style={calendarBoxStyles}\n aria-expanded={calendarBoxOpen}\n className=\"date-calendar-box\"\n data-testid=\"test-date-field-calendar-box\">\n <div id={inputFieldId} className=\"date-calendar-box-header\">\n <Button\n boxShadow={false}\n type=\"button\"\n iconName=\"arrow_left\"\n title=\"Mês anterior\"\n className=\"previous-month\"\n aria-label=\"Mês anterior\"\n onClick={handlePreviousMonth}\n onMouseDown={handleOnMouseDown} />\n <div aria-live=\"polite\" className=\"month-year\">\n <TextContent\n aria-label={calendarDisplayDate.format('MMMM YYYY')}\n as=\"p\"\n data-testid=\"test-date-field-calendar-box-month-description\">\n {calendarDisplayDate.format('MMMM YYYY')}\n </TextContent>\n </div>\n <Button\n boxShadow={false}\n type=\"button\"\n iconName=\"arrow_right\"\n title=\"Próximo mês\"\n className=\"next-month\"\n aria-label=\"Próximo mês\"\n onClick={handleNextMonth}\n onMouseDown={handleOnMouseDown} />\n </div>\n <div aria-label=\"Dias da Semana\" role=\"grid\" className=\"date-calendar-box-days-of-week\">\n {moment.weekdaysShort(true).map((day, idx) => (\n <span\n title={day}\n role=\"columnheader\" \n key={`day-of-week-${idx + 1}`}>\n {day}\n </span>\n ))}\n </div>\n <div className=\"date-calendar-box-grid-of-days\">\n <table aria-label=\"Calendário\" role=\"grid\">\n <tbody className=\"weeks\">\n {weeks.map((week, weekIndex) => (\n <tr role=\"row\" key={weekIndex + 1}>\n {week.map((date, dateIndex) => {\n const isToday = _.isEqual(\n moment().format(TOKEN_ISO_FORMAT), date.format(TOKEN_ISO_FORMAT),\n );\n const hasFocus = _.isEqual(activeDescendant, date.format(TOKEN_ISO_FORMAT));\n const isSelected = selectedDate ? date.isSame(selectedDate, 'day') : false;\n const isCurrentMonth = date.month() === calendarDisplayDate.month();\n const idActiveDescendant = date.format(TOKEN_ISO_FORMAT);\n const descriptionDate = date.format('LL');\n return (\n <td role=\"gridcell\" key={dateIndex}>\n <Button\n id={idActiveDescendant}\n type=\"button\"\n className=\"day-button\"\n boxShadow={false}\n tabIndex={-1}\n title={descriptionDate}\n aria-label={descriptionDate}\n aria-selected={isSelected}\n data-testid=\"test-date-field-day-button\"\n data-state-is-today={isToday}\n data-state-has-focus={hasFocus}\n data-state-is-current-month={isCurrentMonth}\n label={date.date().toString()}\n onMouseDown={handleOnMouseDown}\n onClick={() => handleSelectDate(date)} />\n </td>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </div>\n );\n});\n\nCalendarBox.displayName = 'DateFieldCalendarBox';\n\nexport { CalendarBox };\nexport type { DateFieldCalendarBoxProps };\n"],"names":["CalendarBox","forwardRef","__","ref","$","_c","inputFieldId","calendarDisplayDate","calendarBoxOpen","dateContainerRef","handlePreviousMonth","handleNextMonth","selectedDate","handleSelectDate","activeDescendant","useDateFieldContext","calendarBoxStyles","useCalendarPosition","t0","t1","t10","t11","t2","t3","t4","t5","t6","t7","t8","t9","weeks","generateCalendarWeeks","handleOnMouseDown","_temp","t12","t13","format","t14","t15","t16","Symbol","for","moment","weekdaysShort","map","_temp2","t17","week","weekIndex","date","dateIndex","isToday","_","isEqual","TOKEN_ISO_FORMAT","hasFocus","isSelected","isSame","isCurrentMonth","month","idActiveDescendant","descriptionDate","toString","displayName","event","preventDefault","day","idx"],"mappings":";;;;;;;;;;;AAWA,MAAMA,cAAcC,WAAsD,CAAAC,IAAAC,QAAA;AAAA,QAAAC,IAAAC,uBAAAA,EAAA,EAAA;AACxE,QAAA;AAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,EAAAA,IAGIC,oBAAAA;AACJ,QAAA;AAAA,IAAAC;AAAAA,EAAAA,IAA8BC,oBAAoBT,iBAAiBC,gBAAgB;AAAE,MAAAS;AAAA,MAAAC;AAAA,MAAAC;AAAA,MAAAC;AAAA,MAAAC;AAAA,MAAAC;AAAA,MAAAC;AAAA,MAAAC;AAAA,MAAAC;AAAA,MAAAC;AAAA,MAAAC;AAAA,MAAAC;AAAA,MAAAzB,EAAA,CAAA,MAAAU,oBAAAV,SAAAI,mBAAAJ,EAAA,CAAA,MAAA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AA,MAAAsB,MAAAtB,EAAA,EAAA,MAAAuB,MAAAvB,EAAA,EAAA,MAAAwB,MAAAxB,UAAAyB,IAAA;AAnFRS,wCACOnC,KAAAA,IACEa,OAAAA,IACQR,iBAAAA,IACL,WAAAoB,IACE,eAAAC,IACZT,UAAAA;AAAAA,MAAAA;AAAAA,MA4BAC;AAAAA,MAUAgB;AAAAA,IAAAA,GAwCF;AAAMjC,YAAAgB;AAAAhB,YAAAiB;AAAAjB,YAAAiC;AAAAjC,YAAAqB;AAAArB,YAAAsB;AAAAtB,YAAAuB;AAAAvB,YAAAwB;AAAAxB,YAAAyB;AAAAzB,YAAAkC;AAAAA,EAAA,OAAA;AAAAA,UAAAlC,EAAA,EAAA;AAAA,EAAA;AAAA,SApFNkC;AAoFM,CAET;AAEDtC,YAAY+D,cAAc;AAtGgD,SAAA9B,MAAA+B,OAAA;AAUtEA,SAAKC,iBAAAA;AAAoB;AAV6C,SAAApB,OAAAqB,KAAAC,KAAA;AAAA,SAkDhE,oBAAA,QAAA,EACSD,YACF,MAAA,gBAEJA,UAAAA,IAAAA,GADI,eAAeC,MAAM,CAAC,EAE7B;AAAO;"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
interface DateFieldCalendarBoxProps extends ComponentProps<'div'> {
|
|
3
|
-
}
|
|
4
|
-
declare const CalendarBox: import('react').ForwardRefExoticComponent<Omit<DateFieldCalendarBoxProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
|
-
export { CalendarBox };
|
|
6
|
-
export type { DateFieldCalendarBoxProps };
|
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { c as compilerRuntimeExports } from "../../../_virtual/compiler-runtime.js";
|
|
3
|
-
import _ from "../../../_virtual/lodash.js";
|
|
4
|
-
import hooks from "../../../node_modules/moment/dist/moment.js";
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
|
-
import Button from "../../../buttons/Button.js";
|
|
7
|
-
import '../../../assets/styles/button.css';/* empty css */
|
|
8
|
-
import TextContent from "../../../textContent/index.js";
|
|
9
|
-
import { useDatePeriodFieldContext } from "./context.js";
|
|
10
|
-
import { generateCalendarWeeks, TOKEN_ISO_FORMAT } from "../helpers.js";
|
|
11
|
-
import { useCalendarPosition } from "../base/constants.js";
|
|
12
|
-
const CalendarBox = forwardRef((__, ref) => {
|
|
13
|
-
const $ = compilerRuntimeExports.c(75);
|
|
14
|
-
const {
|
|
15
|
-
initialInputId,
|
|
16
|
-
finalInputId,
|
|
17
|
-
activeDescendant,
|
|
18
|
-
calendarBoxOpen,
|
|
19
|
-
dateContainerRef,
|
|
20
|
-
calendarDisplayDate,
|
|
21
|
-
selectedDate,
|
|
22
|
-
handleChangeNextMonth,
|
|
23
|
-
handleChangePreviousMonth,
|
|
24
|
-
handleChangeUpdateDateState,
|
|
25
|
-
handleChangeActiveDescendant
|
|
26
|
-
} = useDatePeriodFieldContext();
|
|
27
|
-
const {
|
|
28
|
-
calendarBoxStyles
|
|
29
|
-
} = useCalendarPosition(calendarBoxOpen, dateContainerRef);
|
|
30
|
-
let t0;
|
|
31
|
-
let t1;
|
|
32
|
-
let t10;
|
|
33
|
-
let t11;
|
|
34
|
-
let t2;
|
|
35
|
-
let t3;
|
|
36
|
-
let t4;
|
|
37
|
-
let t5;
|
|
38
|
-
let t6;
|
|
39
|
-
let t7;
|
|
40
|
-
let t8;
|
|
41
|
-
let t9;
|
|
42
|
-
if ($[0] !== activeDescendant || $[1] !== calendarBoxOpen || $[2] !== calendarBoxStyles || $[3] !== calendarDisplayDate || $[4] !== finalInputId || $[5] !== handleChangeActiveDescendant || $[6] !== handleChangeNextMonth || $[7] !== handleChangePreviousMonth || $[8] !== handleChangeUpdateDateState || $[9] !== initialInputId || $[10] !== ref || $[11] !== selectedDate) {
|
|
43
|
-
const weeks = generateCalendarWeeks(calendarDisplayDate);
|
|
44
|
-
let t122;
|
|
45
|
-
if ($[24] !== selectedDate) {
|
|
46
|
-
t122 = (day) => selectedDate.inicial && selectedDate.final && day.isAfter(selectedDate.inicial, "day") && day.isBefore(selectedDate.final, "day");
|
|
47
|
-
$[24] = selectedDate;
|
|
48
|
-
$[25] = t122;
|
|
49
|
-
} else {
|
|
50
|
-
t122 = $[25];
|
|
51
|
-
}
|
|
52
|
-
const isInRange = t122;
|
|
53
|
-
let t132;
|
|
54
|
-
if ($[26] !== selectedDate) {
|
|
55
|
-
t132 = (day_0) => selectedDate.inicial && day_0.isSame(selectedDate.inicial, "day") || selectedDate.final && day_0.isSame(selectedDate.final, "day");
|
|
56
|
-
$[26] = selectedDate;
|
|
57
|
-
$[27] = t132;
|
|
58
|
-
} else {
|
|
59
|
-
t132 = $[27];
|
|
60
|
-
}
|
|
61
|
-
const isSelected = t132;
|
|
62
|
-
const handleOnMouseDown = _temp;
|
|
63
|
-
let t142;
|
|
64
|
-
if ($[28] !== finalInputId || $[29] !== handleChangeActiveDescendant || $[30] !== handleChangeUpdateDateState || $[31] !== initialInputId) {
|
|
65
|
-
t142 = (___, daySelected) => {
|
|
66
|
-
const inputActive = document.activeElement;
|
|
67
|
-
let inputType = void 0;
|
|
68
|
-
if (inputActive?.id === initialInputId) {
|
|
69
|
-
inputType = "initial";
|
|
70
|
-
}
|
|
71
|
-
if (inputActive?.id === finalInputId) {
|
|
72
|
-
inputType = "final";
|
|
73
|
-
}
|
|
74
|
-
if (!_.isUndefined(inputType)) {
|
|
75
|
-
handleChangeUpdateDateState({
|
|
76
|
-
date: daySelected,
|
|
77
|
-
inputType
|
|
78
|
-
});
|
|
79
|
-
handleChangeActiveDescendant(daySelected.format(TOKEN_ISO_FORMAT));
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
$[28] = finalInputId;
|
|
83
|
-
$[29] = handleChangeActiveDescendant;
|
|
84
|
-
$[30] = handleChangeUpdateDateState;
|
|
85
|
-
$[31] = initialInputId;
|
|
86
|
-
$[32] = t142;
|
|
87
|
-
} else {
|
|
88
|
-
t142 = $[32];
|
|
89
|
-
}
|
|
90
|
-
const handleOnClick = t142;
|
|
91
|
-
t5 = ref;
|
|
92
|
-
t6 = calendarBoxStyles;
|
|
93
|
-
t7 = calendarBoxOpen;
|
|
94
|
-
t8 = "date-calendar-box";
|
|
95
|
-
t9 = "test-date-period-field-calendar-box";
|
|
96
|
-
let t152;
|
|
97
|
-
if ($[33] !== handleChangePreviousMonth) {
|
|
98
|
-
t152 = /* @__PURE__ */ jsx(Button, { boxShadow: false, type: "button", iconName: "arrow_left", title: "Mês anterior", className: "previous-month", "aria-label": "Mês anterior", onClick: handleChangePreviousMonth, onMouseDown: handleOnMouseDown });
|
|
99
|
-
$[33] = handleChangePreviousMonth;
|
|
100
|
-
$[34] = t152;
|
|
101
|
-
} else {
|
|
102
|
-
t152 = $[34];
|
|
103
|
-
}
|
|
104
|
-
let t16;
|
|
105
|
-
if ($[35] !== calendarDisplayDate) {
|
|
106
|
-
t16 = calendarDisplayDate.format("MMMM YYYY");
|
|
107
|
-
$[35] = calendarDisplayDate;
|
|
108
|
-
$[36] = t16;
|
|
109
|
-
} else {
|
|
110
|
-
t16 = $[36];
|
|
111
|
-
}
|
|
112
|
-
let t17;
|
|
113
|
-
if ($[37] !== calendarDisplayDate) {
|
|
114
|
-
t17 = calendarDisplayDate.format("MMMM YYYY");
|
|
115
|
-
$[37] = calendarDisplayDate;
|
|
116
|
-
$[38] = t17;
|
|
117
|
-
} else {
|
|
118
|
-
t17 = $[38];
|
|
119
|
-
}
|
|
120
|
-
let t18;
|
|
121
|
-
if ($[39] !== t16 || $[40] !== t17) {
|
|
122
|
-
t18 = /* @__PURE__ */ jsx("div", { "aria-live": "polite", className: "month-year", children: /* @__PURE__ */ jsx(TextContent, { "aria-label": t16, as: "p", "data-testid": "test-date-period-field-calendar-box-month-description", children: t17 }) });
|
|
123
|
-
$[39] = t16;
|
|
124
|
-
$[40] = t17;
|
|
125
|
-
$[41] = t18;
|
|
126
|
-
} else {
|
|
127
|
-
t18 = $[41];
|
|
128
|
-
}
|
|
129
|
-
let t19;
|
|
130
|
-
if ($[42] !== handleChangeNextMonth) {
|
|
131
|
-
t19 = /* @__PURE__ */ jsx(Button, { boxShadow: false, type: "button", iconName: "arrow_right", title: "Próximo mês", className: "next-month", "aria-label": "Próximo mês", onClick: handleChangeNextMonth, onMouseDown: handleOnMouseDown });
|
|
132
|
-
$[42] = handleChangeNextMonth;
|
|
133
|
-
$[43] = t19;
|
|
134
|
-
} else {
|
|
135
|
-
t19 = $[43];
|
|
136
|
-
}
|
|
137
|
-
if ($[44] !== initialInputId || $[45] !== t152 || $[46] !== t18 || $[47] !== t19) {
|
|
138
|
-
t10 = /* @__PURE__ */ jsxs("div", { id: initialInputId, className: "date-calendar-box-header", children: [
|
|
139
|
-
t152,
|
|
140
|
-
t18,
|
|
141
|
-
t19
|
|
142
|
-
] });
|
|
143
|
-
$[44] = initialInputId;
|
|
144
|
-
$[45] = t152;
|
|
145
|
-
$[46] = t18;
|
|
146
|
-
$[47] = t19;
|
|
147
|
-
$[48] = t10;
|
|
148
|
-
} else {
|
|
149
|
-
t10 = $[48];
|
|
150
|
-
}
|
|
151
|
-
if ($[49] === Symbol.for("react.memo_cache_sentinel")) {
|
|
152
|
-
t11 = /* @__PURE__ */ jsx("div", { "aria-label": "Dias da Semana", role: "grid", className: "date-calendar-box-days-of-week", children: hooks.weekdaysShort(true).map(_temp2) });
|
|
153
|
-
$[49] = t11;
|
|
154
|
-
} else {
|
|
155
|
-
t11 = $[49];
|
|
156
|
-
}
|
|
157
|
-
t4 = "date-calendar-box-grid-of-days";
|
|
158
|
-
t2 = "Calendário";
|
|
159
|
-
t3 = "grid";
|
|
160
|
-
t0 = "weeks";
|
|
161
|
-
let t20;
|
|
162
|
-
if ($[50] !== activeDescendant || $[51] !== calendarDisplayDate || $[52] !== handleOnClick || $[53] !== isInRange || $[54] !== isSelected) {
|
|
163
|
-
t20 = (week, weekIndex) => /* @__PURE__ */ jsx("tr", { role: "row", children: week.map((day_2, dateIndex) => {
|
|
164
|
-
const idActiveDescendant = day_2.format(TOKEN_ISO_FORMAT);
|
|
165
|
-
const isToday = _.isEqual(hooks().format(TOKEN_ISO_FORMAT), day_2.format(TOKEN_ISO_FORMAT));
|
|
166
|
-
const inRange = isInRange(day_2) ?? false;
|
|
167
|
-
const hasFocus = _.isEqual(activeDescendant, day_2.format(TOKEN_ISO_FORMAT));
|
|
168
|
-
const hasSelected = isSelected(day_2) ?? false;
|
|
169
|
-
const isCurrentMonth = day_2.month() === calendarDisplayDate.month();
|
|
170
|
-
const descriptionDate = day_2.format("LL");
|
|
171
|
-
return /* @__PURE__ */ jsx("td", { role: "gridcell", children: /* @__PURE__ */ jsx(Button, { id: idActiveDescendant, type: "button", className: "day-button", boxShadow: false, tabIndex: -1, title: descriptionDate, "aria-label": descriptionDate, "aria-selected": hasSelected, "data-testid": "test-date-period-field-day-button", "data-state-is-today": isToday, "data-state-has-focus": hasFocus, "data-state-is-in-range": inRange, "data-state-is-current-month": isCurrentMonth, label: day_2.date().toString(), onMouseDown: handleOnMouseDown, onClick: (event_0) => {
|
|
172
|
-
handleOnClick(event_0, day_2);
|
|
173
|
-
} }) }, dateIndex);
|
|
174
|
-
}) }, weekIndex + 1);
|
|
175
|
-
$[50] = activeDescendant;
|
|
176
|
-
$[51] = calendarDisplayDate;
|
|
177
|
-
$[52] = handleOnClick;
|
|
178
|
-
$[53] = isInRange;
|
|
179
|
-
$[54] = isSelected;
|
|
180
|
-
$[55] = t20;
|
|
181
|
-
} else {
|
|
182
|
-
t20 = $[55];
|
|
183
|
-
}
|
|
184
|
-
t1 = weeks.map(t20);
|
|
185
|
-
$[0] = activeDescendant;
|
|
186
|
-
$[1] = calendarBoxOpen;
|
|
187
|
-
$[2] = calendarBoxStyles;
|
|
188
|
-
$[3] = calendarDisplayDate;
|
|
189
|
-
$[4] = finalInputId;
|
|
190
|
-
$[5] = handleChangeActiveDescendant;
|
|
191
|
-
$[6] = handleChangeNextMonth;
|
|
192
|
-
$[7] = handleChangePreviousMonth;
|
|
193
|
-
$[8] = handleChangeUpdateDateState;
|
|
194
|
-
$[9] = initialInputId;
|
|
195
|
-
$[10] = ref;
|
|
196
|
-
$[11] = selectedDate;
|
|
197
|
-
$[12] = t0;
|
|
198
|
-
$[13] = t1;
|
|
199
|
-
$[14] = t10;
|
|
200
|
-
$[15] = t11;
|
|
201
|
-
$[16] = t2;
|
|
202
|
-
$[17] = t3;
|
|
203
|
-
$[18] = t4;
|
|
204
|
-
$[19] = t5;
|
|
205
|
-
$[20] = t6;
|
|
206
|
-
$[21] = t7;
|
|
207
|
-
$[22] = t8;
|
|
208
|
-
$[23] = t9;
|
|
209
|
-
} else {
|
|
210
|
-
t0 = $[12];
|
|
211
|
-
t1 = $[13];
|
|
212
|
-
t10 = $[14];
|
|
213
|
-
t11 = $[15];
|
|
214
|
-
t2 = $[16];
|
|
215
|
-
t3 = $[17];
|
|
216
|
-
t4 = $[18];
|
|
217
|
-
t5 = $[19];
|
|
218
|
-
t6 = $[20];
|
|
219
|
-
t7 = $[21];
|
|
220
|
-
t8 = $[22];
|
|
221
|
-
t9 = $[23];
|
|
222
|
-
}
|
|
223
|
-
let t12;
|
|
224
|
-
if ($[56] !== t0 || $[57] !== t1) {
|
|
225
|
-
t12 = /* @__PURE__ */ jsx("tbody", { className: t0, children: t1 });
|
|
226
|
-
$[56] = t0;
|
|
227
|
-
$[57] = t1;
|
|
228
|
-
$[58] = t12;
|
|
229
|
-
} else {
|
|
230
|
-
t12 = $[58];
|
|
231
|
-
}
|
|
232
|
-
let t13;
|
|
233
|
-
if ($[59] !== t12 || $[60] !== t2 || $[61] !== t3) {
|
|
234
|
-
t13 = /* @__PURE__ */ jsx("table", { "aria-label": t2, role: t3, children: t12 });
|
|
235
|
-
$[59] = t12;
|
|
236
|
-
$[60] = t2;
|
|
237
|
-
$[61] = t3;
|
|
238
|
-
$[62] = t13;
|
|
239
|
-
} else {
|
|
240
|
-
t13 = $[62];
|
|
241
|
-
}
|
|
242
|
-
let t14;
|
|
243
|
-
if ($[63] !== t13 || $[64] !== t4) {
|
|
244
|
-
t14 = /* @__PURE__ */ jsx("div", { className: t4, children: t13 });
|
|
245
|
-
$[63] = t13;
|
|
246
|
-
$[64] = t4;
|
|
247
|
-
$[65] = t14;
|
|
248
|
-
} else {
|
|
249
|
-
t14 = $[65];
|
|
250
|
-
}
|
|
251
|
-
let t15;
|
|
252
|
-
if ($[66] !== t10 || $[67] !== t11 || $[68] !== t14 || $[69] !== t5 || $[70] !== t6 || $[71] !== t7 || $[72] !== t8 || $[73] !== t9) {
|
|
253
|
-
t15 = /* @__PURE__ */ jsxs("div", { ref: t5, style: t6, "aria-expanded": t7, className: t8, "data-testid": t9, children: [
|
|
254
|
-
t10,
|
|
255
|
-
t11,
|
|
256
|
-
t14
|
|
257
|
-
] });
|
|
258
|
-
$[66] = t10;
|
|
259
|
-
$[67] = t11;
|
|
260
|
-
$[68] = t14;
|
|
261
|
-
$[69] = t5;
|
|
262
|
-
$[70] = t6;
|
|
263
|
-
$[71] = t7;
|
|
264
|
-
$[72] = t8;
|
|
265
|
-
$[73] = t9;
|
|
266
|
-
$[74] = t15;
|
|
267
|
-
} else {
|
|
268
|
-
t15 = $[74];
|
|
269
|
-
}
|
|
270
|
-
return t15;
|
|
271
|
-
});
|
|
272
|
-
CalendarBox.displayName = "DatePeriodFieldCalendarBox";
|
|
273
|
-
function _temp(event) {
|
|
274
|
-
event?.preventDefault?.();
|
|
275
|
-
}
|
|
276
|
-
function _temp2(day_1, idx) {
|
|
277
|
-
return /* @__PURE__ */ jsx("span", { title: day_1, role: "columnheader", children: day_1 }, `day-of-week-${idx + 1}`);
|
|
278
|
-
}
|
|
279
|
-
export {
|
|
280
|
-
CalendarBox
|
|
281
|
-
};
|
|
282
|
-
//# sourceMappingURL=calendarbox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendarbox.js","sources":["../../../../src/lib/inputs2/date/dateperiodfield/calendarbox.tsx"],"sourcesContent":["import _ from 'lodash';\nimport moment, { type Moment } from 'moment';\nimport { ComponentProps, forwardRef, MouseEvent } from 'react';\nimport Button from '../../../buttons';\nimport TextContent from '../../../textContent';\nimport { useDatePeriodFieldContext } from './context';\nimport { generateCalendarWeeks, TOKEN_ISO_FORMAT } from '../helpers';\nimport type { InputType } from './types';\nimport { useCalendarPosition } from '../base/constants';\n\ninterface DateFieldCalendarBoxProps extends ComponentProps<'div'> { }\n\nconst CalendarBox = forwardRef<HTMLDivElement, DateFieldCalendarBoxProps>((__, ref) => {\n const {\n initialInputId, finalInputId, activeDescendant, calendarBoxOpen, dateContainerRef, \n calendarDisplayDate, selectedDate, handleChangeNextMonth, handleChangePreviousMonth, \n handleChangeUpdateDateState, handleChangeActiveDescendant,\n } = useDatePeriodFieldContext();\n const { calendarBoxStyles } = useCalendarPosition(calendarBoxOpen, dateContainerRef);\n\n const weeks = generateCalendarWeeks(calendarDisplayDate);\n\n const isInRange = (day: Moment) => selectedDate.inicial && selectedDate.final &&\n day.isAfter(selectedDate.inicial, 'day') && day.isBefore(selectedDate.final, 'day');\n const isSelected = (day: Moment) =>\n (selectedDate.inicial && day.isSame(selectedDate.inicial, 'day')) ||\n (selectedDate.final && day.isSame(selectedDate.final, 'day'));\n const handleOnMouseDown = (event: MouseEvent<HTMLButtonElement>) => {\n event?.preventDefault?.();\n };\n\n const handleOnClick = (___: MouseEvent<HTMLButtonElement>, daySelected: Moment) => {\n const inputActive = document.activeElement;\n let inputType: InputType | undefined = undefined;\n if (inputActive?.id === initialInputId) inputType = 'initial';\n if (inputActive?.id === finalInputId) inputType = 'final';\n if (!_.isUndefined(inputType)) {\n handleChangeUpdateDateState({ date: daySelected, inputType });\n handleChangeActiveDescendant(daySelected.format(TOKEN_ISO_FORMAT));\n }\n };\n\n return (\n <div\n ref={ref}\n style={calendarBoxStyles}\n aria-expanded={calendarBoxOpen}\n className=\"date-calendar-box\"\n data-testid=\"test-date-period-field-calendar-box\">\n <div id={initialInputId} className=\"date-calendar-box-header\">\n <Button\n boxShadow={false}\n type=\"button\"\n iconName=\"arrow_left\"\n title=\"Mês anterior\"\n className=\"previous-month\"\n aria-label=\"Mês anterior\"\n onClick={handleChangePreviousMonth}\n onMouseDown={handleOnMouseDown} />\n <div aria-live=\"polite\" className=\"month-year\">\n <TextContent\n aria-label={calendarDisplayDate.format('MMMM YYYY')}\n as=\"p\"\n data-testid=\"test-date-period-field-calendar-box-month-description\">\n {calendarDisplayDate.format('MMMM YYYY')}\n </TextContent>\n </div>\n <Button\n boxShadow={false}\n type=\"button\"\n iconName=\"arrow_right\"\n title=\"Próximo mês\"\n className=\"next-month\"\n aria-label=\"Próximo mês\"\n onClick={handleChangeNextMonth}\n onMouseDown={handleOnMouseDown} />\n </div>\n <div aria-label=\"Dias da Semana\" role=\"grid\" className=\"date-calendar-box-days-of-week\">\n {moment.weekdaysShort(true).map((day, idx) => (\n <span\n title={day}\n role=\"columnheader\" \n key={`day-of-week-${idx + 1}`}>\n {day}\n </span>\n ))}\n </div>\n <div className=\"date-calendar-box-grid-of-days\">\n <table aria-label=\"Calendário\" role=\"grid\">\n <tbody className=\"weeks\">\n {weeks.map((week, weekIndex) => (\n <tr role=\"row\" key={weekIndex + 1}>\n {week.map((day, dateIndex) => {\n const idActiveDescendant = day.format(TOKEN_ISO_FORMAT);\n const isToday = _.isEqual(\n moment().format(TOKEN_ISO_FORMAT), \n day.format(TOKEN_ISO_FORMAT),\n );\n const inRange = isInRange(day) ?? false;\n const hasFocus = _.isEqual(activeDescendant, day.format(TOKEN_ISO_FORMAT));\n const hasSelected = isSelected(day) ?? false;\n const isCurrentMonth = day.month() === calendarDisplayDate.month();\n const descriptionDate = day.format('LL');\n return (\n <td role=\"gridcell\" key={dateIndex}>\n <Button\n id={idActiveDescendant}\n type=\"button\"\n className=\"day-button\"\n boxShadow={false}\n tabIndex={-1}\n title={descriptionDate}\n aria-label={descriptionDate}\n aria-selected={hasSelected}\n data-testid=\"test-date-period-field-day-button\"\n data-state-is-today={isToday}\n data-state-has-focus={hasFocus}\n data-state-is-in-range={inRange}\n data-state-is-current-month={isCurrentMonth}\n label={day.date().toString()}\n onMouseDown={handleOnMouseDown}\n onClick={(event) => { handleOnClick(event, day); }} />\n </td>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </div>\n );\n});\n\nCalendarBox.displayName = 'DatePeriodFieldCalendarBox';\n\nexport { CalendarBox };\nexport type { DateFieldCalendarBoxProps };\n"],"names":["CalendarBox","forwardRef","__","ref","$","_c","initialInputId","finalInputId","activeDescendant","calendarBoxOpen","dateContainerRef","calendarDisplayDate","selectedDate","handleChangeNextMonth","handleChangePreviousMonth","handleChangeUpdateDateState","handleChangeActiveDescendant","useDatePeriodFieldContext","calendarBoxStyles","useCalendarPosition","t0","t1","t10","t11","t2","t3","t4","t5","t6","t7","t8","t9","weeks","generateCalendarWeeks","t12","day","inicial","final","isAfter","isBefore","isInRange","t13","day_0","isSame","isSelected","handleOnMouseDown","_temp","t14","___","daySelected","inputActive","document","activeElement","inputType","undefined","id","_","isUndefined","date","format","TOKEN_ISO_FORMAT","handleOnClick","t15","t16","t17","t18","t19","Symbol","for","moment","weekdaysShort","map","_temp2","t20","week","weekIndex","day_2","dateIndex","idActiveDescendant","isToday","isEqual","inRange","hasFocus","hasSelected","isCurrentMonth","month","descriptionDate","toString","event_0","event","displayName","preventDefault","day_1","idx"],"mappings":";;;;;;;;;;;AAYA,MAAMA,cAAcC,WAAsD,CAAAC,IAAAC,QAAA;AAAA,QAAAC,IAAAC,uBAAAA,EAAA,EAAA;AACxE,QAAA;AAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,EAAAA,IAIIC,0BAAAA;AACJ,QAAA;AAAA,IAAAC;AAAAA,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ACF,MAAA,gBAEJA,UAAAA,MAAAA,GADI,eAAe0D,MAAM,CAAC,EAE7B;AAAO;"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
object-assign
|
|
3
|
-
(c) Sindre Sorhus
|
|
4
|
-
@license MIT
|
|
5
|
-
*/
|
|
6
|
-
var objectAssign;
|
|
7
|
-
var hasRequiredObjectAssign;
|
|
8
|
-
function requireObjectAssign() {
|
|
9
|
-
if (hasRequiredObjectAssign) return objectAssign;
|
|
10
|
-
hasRequiredObjectAssign = 1;
|
|
11
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
12
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
13
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
14
|
-
function toObject(val) {
|
|
15
|
-
if (val === null || val === void 0) {
|
|
16
|
-
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
17
|
-
}
|
|
18
|
-
return Object(val);
|
|
19
|
-
}
|
|
20
|
-
function shouldUseNative() {
|
|
21
|
-
try {
|
|
22
|
-
if (!Object.assign) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
var test1 = new String("abc");
|
|
26
|
-
test1[5] = "de";
|
|
27
|
-
if (Object.getOwnPropertyNames(test1)[0] === "5") {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
var test2 = {};
|
|
31
|
-
for (var i = 0; i < 10; i++) {
|
|
32
|
-
test2["_" + String.fromCharCode(i)] = i;
|
|
33
|
-
}
|
|
34
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
|
|
35
|
-
return test2[n];
|
|
36
|
-
});
|
|
37
|
-
if (order2.join("") !== "0123456789") {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
var test3 = {};
|
|
41
|
-
"abcdefghijklmnopqrst".split("").forEach(function(letter) {
|
|
42
|
-
test3[letter] = letter;
|
|
43
|
-
});
|
|
44
|
-
if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
return true;
|
|
48
|
-
} catch (err) {
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
objectAssign = shouldUseNative() ? Object.assign : function(target, source) {
|
|
53
|
-
var from;
|
|
54
|
-
var to = toObject(target);
|
|
55
|
-
var symbols;
|
|
56
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
57
|
-
from = Object(arguments[s]);
|
|
58
|
-
for (var key in from) {
|
|
59
|
-
if (hasOwnProperty.call(from, key)) {
|
|
60
|
-
to[key] = from[key];
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
if (getOwnPropertySymbols) {
|
|
64
|
-
symbols = getOwnPropertySymbols(from);
|
|
65
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
66
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
67
|
-
to[symbols[i]] = from[symbols[i]];
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return to;
|
|
73
|
-
};
|
|
74
|
-
return objectAssign;
|
|
75
|
-
}
|
|
76
|
-
export {
|
|
77
|
-
requireObjectAssign as __require
|
|
78
|
-
};
|
|
79
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../node_modules/object-assign/index.js"],"sourcesContent":["/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\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