cx 26.2.4 → 26.3.1
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/build/charts/helpers/ValueAtFinder.d.ts +2 -2
- package/build/charts/helpers/ValueAtFinder.d.ts.map +1 -1
- package/build/widgets/form/Calendar.d.ts +1 -0
- package/build/widgets/form/Calendar.d.ts.map +1 -1
- package/build/widgets/form/Calendar.js +14 -22
- package/dist/manifest.js +841 -841
- package/dist/widgets.js +5 -1
- package/package.json +1 -1
- package/src/widgets/form/Calendar.tsx +772 -862
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PointReducer, PointReducerConfig, PointReducerInstance, PointReducerAccumulator } from "./PointReducer";
|
|
2
|
-
import { Bind, Prop } from "../../ui/Prop";
|
|
3
1
|
import { AccessorChain } from "../../data/createAccessorModelProxy";
|
|
2
|
+
import { Bind, Prop } from "../../ui/Prop";
|
|
3
|
+
import { PointReducer, PointReducerAccumulator, PointReducerConfig, PointReducerInstance } from "./PointReducer";
|
|
4
4
|
export interface ValueAtAccumulator extends PointReducerAccumulator {
|
|
5
5
|
at: number;
|
|
6
6
|
left?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValueAtFinder.d.ts","sourceRoot":"","sources":["../../../src/charts/helpers/ValueAtFinder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ValueAtFinder.d.ts","sourceRoot":"","sources":["../../../src/charts/helpers/ValueAtFinder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEjH,MAAM,WAAW,kBAAmB,SAAQ,uBAAuB;IAChE,EAAE,EAAE,MA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LElement | null;
|
|
103
|
+
unsubscribeWheel?: () => void;
|
|
103
104
|
constructor(props: CalendarCmpProps);
|
|
104
105
|
getPage(refDate: Date): {
|
|
105
106
|
refDate: Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/widgets/form/Calendar.tsx"],"names":[],"mappings":"AAAA,6BAA6B;AAK7B,OAAO,iBAAiB,CAAC;AAEzB,OAAO,EAAE,IAAI,EAAU,MAAM,iBAAiB,CAAC;AAkB/C,OAAO,EAAE,KAAK,EAAE,WAAW,EAAmB,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE9D,UAAU,OAAO;
|
|
1
|
+
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/widgets/form/Calendar.tsx"],"names":[],"mappings":"AAAA,6BAA6B;AAK7B,OAAO,iBAAiB,CAAC;AAEzB,OAAO,EAAE,IAAI,EAAU,MAAM,iBAAiB,CAAC;AAkB/C,OAAO,EAAE,KAAK,EAAE,WAAW,EAAmB,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE9D,UAAU,OAAO;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,OAAO,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|
@@ -6,7 +6,7 @@ import { FocusManager, offFocusOut, oneFocusOut } from "../../ui/FocusManager";
|
|
|
6
6
|
import "../../ui/Format";
|
|
7
7
|
import { Localization } from "../../ui/Localization";
|
|
8
8
|
import { VDOM, Widget } from "../../ui/Widget";
|
|
9
|
-
import { parseDateInvariant } from "../../util";
|
|
9
|
+
import { addEventListenerWithOptions, parseDateInvariant } from "../../util";
|
|
10
10
|
import { KeyCode } from "../../util/KeyCode";
|
|
11
11
|
import { dateDiff } from "../../util/date/dateDiff";
|
|
12
12
|
import { lowerBoundCheck } from "../../util/date/lowerBoundCheck";
|
|
@@ -103,8 +103,7 @@ export class Calendar extends Field {
|
|
|
103
103
|
return;
|
|
104
104
|
if (!validationCheck(date, data, calendarWidget.disabledDaysOfWeek))
|
|
105
105
|
return;
|
|
106
|
-
if (this.onBeforeSelect &&
|
|
107
|
-
instance.invoke("onBeforeSelect", e, instance, date) === false)
|
|
106
|
+
if (this.onBeforeSelect && instance.invoke("onBeforeSelect", e, instance, date) === false)
|
|
108
107
|
return;
|
|
109
108
|
if (calendarWidget.partial) {
|
|
110
109
|
let mixed = parseDateInvariant(data.value);
|
|
@@ -127,8 +126,7 @@ Calendar.prototype.maxValueErrorText = "Select a date not after {0:d}.";
|
|
|
127
126
|
Calendar.prototype.maxExclusiveErrorText = "Select a date before {0:d}.";
|
|
128
127
|
Calendar.prototype.minValueErrorText = "Select a date not before {0:d}.";
|
|
129
128
|
Calendar.prototype.minExclusiveErrorText = "Select a date after {0:d}.";
|
|
130
|
-
Calendar.prototype.disabledDaysOfWeekErrorText =
|
|
131
|
-
"Selected day of week is not allowed.";
|
|
129
|
+
Calendar.prototype.disabledDaysOfWeekErrorText = "Selected day of week is not allowed.";
|
|
132
130
|
Calendar.prototype.suppressErrorsUntilVisited = false;
|
|
133
131
|
Calendar.prototype.showTodayButton = false;
|
|
134
132
|
Calendar.prototype.todayButtonText = "Today";
|
|
@@ -151,12 +149,11 @@ const validationCheck = (date, data, disabledDaysOfWeek) => {
|
|
|
151
149
|
};
|
|
152
150
|
export class CalendarCmp extends VDOM.Component {
|
|
153
151
|
el = null;
|
|
152
|
+
unsubscribeWheel;
|
|
154
153
|
constructor(props) {
|
|
155
154
|
super(props);
|
|
156
155
|
let { data } = props.instance;
|
|
157
|
-
let refDate = data.refDate
|
|
158
|
-
? data.refDate
|
|
159
|
-
: data.date || zeroTime(new Date());
|
|
156
|
+
let refDate = data.refDate ? data.refDate : data.date || zeroTime(new Date());
|
|
160
157
|
this.state = {
|
|
161
158
|
hover: false,
|
|
162
159
|
focus: false,
|
|
@@ -194,9 +191,7 @@ export class CalendarCmp extends VDOM.Component {
|
|
|
194
191
|
if (date.getTime() == this.state.cursor.getTime())
|
|
195
192
|
return;
|
|
196
193
|
let refDate = this.state.refDate;
|
|
197
|
-
if (options.movePage ||
|
|
198
|
-
date < this.state.startDate ||
|
|
199
|
-
date > this.state.endDate)
|
|
194
|
+
if (options.movePage || date < this.state.startDate || date > this.state.endDate)
|
|
200
195
|
refDate = date;
|
|
201
196
|
this.setState({
|
|
202
197
|
...this.getPage(refDate),
|
|
@@ -333,7 +328,9 @@ export class CalendarCmp extends VDOM.Component {
|
|
|
333
328
|
this.el.focus();
|
|
334
329
|
if (this.el) {
|
|
335
330
|
tooltipParentDidMount(this.el, ...getFieldTooltip(this.props.instance));
|
|
336
|
-
this.el
|
|
331
|
+
this.unsubscribeWheel = addEventListenerWithOptions(this.el, "wheel", (e) => this.handleWheel(e), {
|
|
332
|
+
passive: false,
|
|
333
|
+
});
|
|
337
334
|
}
|
|
338
335
|
}
|
|
339
336
|
UNSAFE_componentWillReceiveProps(props) {
|
|
@@ -349,6 +346,7 @@ export class CalendarCmp extends VDOM.Component {
|
|
|
349
346
|
componentWillUnmount() {
|
|
350
347
|
offFocusOut(this);
|
|
351
348
|
tooltipParentWillUnmount(this.props.instance);
|
|
349
|
+
this.unsubscribeWheel?.();
|
|
352
350
|
}
|
|
353
351
|
showYearDropdown() {
|
|
354
352
|
if (this.el && this.el.firstChild) {
|
|
@@ -400,8 +398,7 @@ export class CalendarCmp extends VDOM.Component {
|
|
|
400
398
|
});
|
|
401
399
|
}
|
|
402
400
|
}, children: _jsx("table", { children: _jsx("tbody", { children: rows.map((row, rowIndex) => (_jsx("tr", { children: row.map((year) => (_jsx("td", { className: CSS.element(calendarWidget.baseClass, "year-option", {
|
|
403
|
-
unselectable: (minYear && year < minYear) ||
|
|
404
|
-
(maxYear && year > maxYear),
|
|
401
|
+
unselectable: (minYear && year < minYear) || (maxYear && year > maxYear),
|
|
405
402
|
selected: year === refYear,
|
|
406
403
|
active: year === currentYear,
|
|
407
404
|
}), onClick: (e) => this.handleYearSelect(e, year), children: year }, year))) }, rowIndex))) }) }) }));
|
|
@@ -426,9 +423,7 @@ export class CalendarCmp extends VDOM.Component {
|
|
|
426
423
|
outside: month != date.getMonth(),
|
|
427
424
|
unselectable: unselectable,
|
|
428
425
|
selected: data.date && sameDate(data.date, date),
|
|
429
|
-
cursor: (this.state.hover || this.state.focus) &&
|
|
430
|
-
this.state.cursor &&
|
|
431
|
-
sameDate(this.state.cursor, date),
|
|
426
|
+
cursor: (this.state.hover || this.state.focus) && this.state.cursor && sameDate(this.state.cursor, date),
|
|
432
427
|
today: calendarWidget.highlightToday && sameDate(date, today),
|
|
433
428
|
}), dayInfo.className, CSS.mod(dayInfo.mod));
|
|
434
429
|
let dateInst = new Date(date);
|
|
@@ -439,9 +434,7 @@ export class CalendarCmp extends VDOM.Component {
|
|
|
439
434
|
}
|
|
440
435
|
let culture = Culture.getDateTimeCulture();
|
|
441
436
|
let monthNames = culture.getMonthNames("long");
|
|
442
|
-
let dayNames = culture
|
|
443
|
-
.getWeekdayNames("short")
|
|
444
|
-
.map((x) => x.substr(0, 2));
|
|
437
|
+
let dayNames = culture.getWeekdayNames("short").map((x) => x.substr(0, 2));
|
|
445
438
|
if (startWithMonday)
|
|
446
439
|
dayNames = [...dayNames.slice(1), dayNames[0]];
|
|
447
440
|
return (_jsxs("div", { className: data.classNames, tabIndex: data.disabled || !data.focusable ? null : data.tabIndex || 0, onKeyDown: (e) => this.handleKeyPress(e), onMouseDown: (e) => {
|
|
@@ -454,8 +447,7 @@ export class CalendarCmp extends VDOM.Component {
|
|
|
454
447
|
this.el = el;
|
|
455
448
|
}, onMouseMove: (e) => tooltipMouseMove(e, ...getFieldTooltip(this.props.instance)), onMouseLeave: (e) => this.handleMouseLeave(e), onMouseEnter: (e) => this.handleMouseEnter(e),
|
|
456
449
|
// onWheel={(e) => this.handleWheel(e)}
|
|
457
|
-
onFocus: (e) => this.handleFocus(e), onBlur: (e) => this.handleBlur(e), children: [this.state.activeView == "calendar" && (_jsxs("table", { children: [_jsxs("thead", { children: [_jsxs("tr", { className: CSS.element(baseClass, "header"), children: [_jsx("td", {}), _jsx("td", { onClick: (e) => this.move(e, "y", -1), children: _jsx(ForwardIcon, { className: CSS.element(baseClass, "icon-prev-year") }) }), _jsx("td", { onClick: (e) => this.move(e, "m", -1), children: _jsx(DropdownIcon, { className: CSS.element(baseClass, "icon-prev-month") }) }), _jsxs("th", { className: CSS.element(baseClass, "display"), colSpan: 3, children: [monthNames[month], _jsx("br", {}), _jsx("span", { onClick: () => this.showYearDropdown(), className: CSS.element(baseClass, "year-name"), children: year })] }), _jsx("td", { onClick: (e) => this.move(e, "m", +1), children: _jsx(DropdownIcon, { className: CSS.element(baseClass, "icon-next-month") }) }), _jsx("td", { onClick: (e) => this.move(e, "y", +1), children: _jsx(ForwardIcon, { className: CSS.element(baseClass, "icon-next-year") }) }), _jsx("td", {})] }, "h"), _jsxs("tr", { className: CSS.element(baseClass, "day-names"), children: [_jsx("td", {}), dayNames.map((name, i) => (_jsx("th", { children: name }, i))), _jsx("td", {})] }, "d")] }), _jsx("tbody", { children: weeks })] })), this.state.activeView == "calendar" &&
|
|
458
|
-
calendarWidget.showTodayButton && (_jsx("div", { className: CSS.element(baseClass, "toolbar"), children: _jsx("button", { className: CSS.expand(CSS.element(baseClass, "today-button"), CSS.block("button", "hollow")), "data-year": today.getFullYear(), "data-month": today.getMonth() + 1, "data-date": today.getDate(), onClick: (e) => {
|
|
450
|
+
onFocus: (e) => this.handleFocus(e), onBlur: (e) => this.handleBlur(e), children: [this.state.activeView == "calendar" && (_jsxs("table", { children: [_jsxs("thead", { children: [_jsxs("tr", { className: CSS.element(baseClass, "header"), children: [_jsx("td", {}), _jsx("td", { onClick: (e) => this.move(e, "y", -1), children: _jsx(ForwardIcon, { className: CSS.element(baseClass, "icon-prev-year") }) }), _jsx("td", { onClick: (e) => this.move(e, "m", -1), children: _jsx(DropdownIcon, { className: CSS.element(baseClass, "icon-prev-month") }) }), _jsxs("th", { className: CSS.element(baseClass, "display"), colSpan: 3, children: [monthNames[month], _jsx("br", {}), _jsx("span", { onClick: () => this.showYearDropdown(), className: CSS.element(baseClass, "year-name"), children: year })] }), _jsx("td", { onClick: (e) => this.move(e, "m", +1), children: _jsx(DropdownIcon, { className: CSS.element(baseClass, "icon-next-month") }) }), _jsx("td", { onClick: (e) => this.move(e, "y", +1), children: _jsx(ForwardIcon, { className: CSS.element(baseClass, "icon-next-year") }) }), _jsx("td", {})] }, "h"), _jsxs("tr", { className: CSS.element(baseClass, "day-names"), children: [_jsx("td", {}), dayNames.map((name, i) => (_jsx("th", { children: name }, i))), _jsx("td", {})] }, "d")] }), _jsx("tbody", { children: weeks })] })), this.state.activeView == "calendar" && calendarWidget.showTodayButton && (_jsx("div", { className: CSS.element(baseClass, "toolbar"), children: _jsx("button", { className: CSS.expand(CSS.element(baseClass, "today-button"), CSS.block("button", "hollow")), "data-year": today.getFullYear(), "data-month": today.getMonth() + 1, "data-date": today.getDate(), onClick: (e) => {
|
|
459
451
|
this.handleMouseDown(e);
|
|
460
452
|
}, children: calendarWidget.todayButtonText }) })), this.state.activeView == "year-picker" && this.renderYearPicker()] }));
|
|
461
453
|
}
|