@syncfusion/ej2-calendars 25.2.7-30676 → 26.1.35-7502
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/.eslintrc.json +261 -0
- package/README.md +178 -178
- package/dist/ej2-calendars.min.js +10 -0
- package/dist/ej2-calendars.umd.min.js +10 -1
- package/dist/ej2-calendars.umd.min.js.map +1 -1
- package/dist/es6/ej2-calendars.es2015.js +182 -236
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +252 -307
- package/dist/es6/ej2-calendars.es5.js.map +1 -1
- package/dist/global/ej2-calendars.min.js +11 -0
- package/dist/global/ej2-calendars.min.js.map +1 -0
- package/dist/global/index.d.ts +14 -0
- package/helpers/e2e/calendarHelper.js +13 -13
- package/helpers/e2e/datepickerHelper.js +13 -13
- package/helpers/e2e/daterangepickerHelper.js +13 -13
- package/helpers/e2e/datetimepickerHelper.js +13 -13
- package/helpers/e2e/index.js +3 -3
- package/helpers/e2e/timepickerHelper.js +13 -13
- package/license +10 -10
- package/package.json +85 -85
- package/src/calendar/calendar-model.d.ts +277 -277
- package/src/calendar/calendar.d.ts +20 -21
- package/src/calendar/calendar.js +60 -52
- package/src/calendar/islamic.js +8 -7
- package/src/common/maskplaceholder-model.d.ts +36 -36
- package/src/common/maskplaceholder.js +19 -19
- package/src/datepicker/datepicker-model.d.ts +289 -289
- package/src/datepicker/datepicker.d.ts +9 -10
- package/src/datepicker/datepicker.js +38 -39
- package/src/daterangepicker/daterangepicker-model.d.ts +427 -427
- package/src/daterangepicker/daterangepicker.d.ts +1 -2
- package/src/daterangepicker/daterangepicker.js +46 -50
- package/src/datetimepicker/datetimepicker-model.d.ts +453 -453
- package/src/datetimepicker/datetimepicker.d.ts +1 -1
- package/src/datetimepicker/datetimepicker.js +37 -31
- package/src/maskbase/interface.js +0 -1
- package/src/maskbase/masked-date-time.js +3 -5
- package/src/timepicker/timepicker-model.d.ts +350 -350
- package/src/timepicker/timepicker.d.ts +4 -5
- package/src/timepicker/timepicker.js +28 -32
- package/styles/bootstrap-dark.css +1107 -261
- package/styles/bootstrap.css +1106 -261
- package/styles/bootstrap4.css +1113 -261
- package/styles/bootstrap5-dark.css +1133 -261
- package/styles/bootstrap5.css +1133 -261
- package/styles/calendar/_all.scss +2 -2
- package/styles/calendar/_bds-definition.scss +273 -273
- package/styles/calendar/_bootstrap-dark-definition.scss +238 -238
- package/styles/calendar/_bootstrap-definition.scss +238 -238
- package/styles/calendar/_bootstrap4-definition.scss +238 -238
- package/styles/calendar/_bootstrap5-definition.scss +258 -258
- package/styles/calendar/_bootstrap5.3-definition.scss +256 -260
- package/styles/calendar/_fabric-dark-definition.scss +202 -202
- package/styles/calendar/_fabric-definition.scss +200 -200
- package/styles/calendar/_fluent-definition.scss +262 -264
- package/styles/calendar/_fluent2-definition.scss +290 -294
- package/styles/calendar/_fusionnew-definition.scss +260 -260
- package/styles/calendar/_highcontrast-definition.scss +199 -199
- package/styles/calendar/_highcontrast-light-definition.scss +202 -202
- package/styles/calendar/_layout.scss +809 -565
- package/styles/calendar/_material-dark-definition.scss +204 -204
- package/styles/calendar/_material-definition.scss +199 -199
- package/styles/calendar/_material3-definition.scss +196 -196
- package/styles/calendar/_tailwind-definition.scss +271 -271
- package/styles/calendar/_theme.scss +614 -643
- package/styles/calendar/bootstrap-dark.css +416 -114
- package/styles/calendar/bootstrap.css +416 -114
- package/styles/calendar/bootstrap4.css +416 -114
- package/styles/calendar/bootstrap5-dark.css +437 -115
- package/styles/calendar/bootstrap5.css +437 -115
- package/styles/calendar/fabric-dark.css +421 -116
- package/styles/calendar/fabric.css +423 -117
- package/styles/calendar/fluent-dark.css +485 -143
- package/styles/calendar/fluent.css +485 -143
- package/styles/calendar/fluent2.css +549 -274
- package/styles/calendar/highcontrast-light.css +417 -114
- package/styles/calendar/highcontrast.css +423 -117
- package/styles/calendar/icons/_bds.scss +13 -13
- package/styles/calendar/icons/_bootstrap-dark.scss +13 -13
- package/styles/calendar/icons/_bootstrap.scss +13 -13
- package/styles/calendar/icons/_bootstrap4.scss +13 -13
- package/styles/calendar/icons/_bootstrap5.3.scss +13 -13
- package/styles/calendar/icons/_bootstrap5.scss +13 -13
- package/styles/calendar/icons/_fabric-dark.scss +13 -13
- package/styles/calendar/icons/_fabric.scss +13 -13
- package/styles/calendar/icons/_fluent.scss +13 -13
- package/styles/calendar/icons/_fluent2.scss +13 -13
- package/styles/calendar/icons/_fusionnew.scss +13 -13
- package/styles/calendar/icons/_highcontrast-light.scss +13 -13
- package/styles/calendar/icons/_highcontrast.scss +13 -13
- package/styles/calendar/icons/_material-dark.scss +13 -13
- package/styles/calendar/icons/_material.scss +13 -13
- package/styles/calendar/icons/_material3.scss +13 -13
- package/styles/calendar/icons/_tailwind.scss +13 -13
- package/styles/calendar/material-dark.css +423 -117
- package/styles/calendar/material.css +423 -117
- package/styles/calendar/material3-dark.css +426 -117
- package/styles/calendar/material3-dark.scss +1 -1
- package/styles/calendar/material3.css +426 -117
- package/styles/calendar/material3.scss +1 -1
- package/styles/calendar/tailwind-dark.css +469 -117
- package/styles/calendar/tailwind.css +469 -117
- package/styles/datepicker/_all.scss +2 -2
- package/styles/datepicker/_bds-definition.scss +105 -105
- package/styles/datepicker/_bootstrap-dark-definition.scss +97 -97
- package/styles/datepicker/_bootstrap-definition.scss +96 -96
- package/styles/datepicker/_bootstrap4-definition.scss +101 -101
- package/styles/datepicker/_bootstrap5-definition.scss +107 -107
- package/styles/datepicker/_bootstrap5.3-definition.scss +107 -108
- package/styles/datepicker/_fabric-dark-definition.scss +98 -98
- package/styles/datepicker/_fabric-definition.scss +95 -95
- package/styles/datepicker/_fluent-definition.scss +107 -107
- package/styles/datepicker/_fluent2-definition.scss +118 -118
- package/styles/datepicker/_fusionnew-definition.scss +107 -107
- package/styles/datepicker/_highcontrast-definition.scss +96 -96
- package/styles/datepicker/_highcontrast-light-definition.scss +99 -99
- package/styles/datepicker/_layout.scss +442 -459
- package/styles/datepicker/_material-dark-definition.scss +103 -103
- package/styles/datepicker/_material-definition.scss +100 -100
- package/styles/datepicker/_material3-definition.scss +97 -97
- package/styles/datepicker/_tailwind-definition.scss +105 -105
- package/styles/datepicker/_theme.scss +53 -48
- package/styles/datepicker/bootstrap-dark.css +59 -20
- package/styles/datepicker/bootstrap.css +59 -20
- package/styles/datepicker/bootstrap4.css +61 -20
- package/styles/datepicker/bootstrap5-dark.css +63 -21
- package/styles/datepicker/bootstrap5.css +63 -21
- package/styles/datepicker/fabric-dark.css +59 -20
- package/styles/datepicker/fabric.css +59 -20
- package/styles/datepicker/fluent-dark.css +63 -21
- package/styles/datepicker/fluent.css +63 -21
- package/styles/datepicker/fluent2.css +172 -109
- package/styles/datepicker/highcontrast-light.css +59 -20
- package/styles/datepicker/highcontrast.css +59 -20
- package/styles/datepicker/icons/_bds.scss +76 -52
- package/styles/datepicker/icons/_bootstrap-dark.scss +73 -49
- package/styles/datepicker/icons/_bootstrap.scss +72 -50
- package/styles/datepicker/icons/_bootstrap4.scss +76 -52
- package/styles/datepicker/icons/_bootstrap5.3.scss +76 -52
- package/styles/datepicker/icons/_bootstrap5.scss +76 -52
- package/styles/datepicker/icons/_fabric-dark.scss +65 -43
- package/styles/datepicker/icons/_fabric.scss +65 -43
- package/styles/datepicker/icons/_fluent.scss +76 -52
- package/styles/datepicker/icons/_fluent2.scss +83 -52
- package/styles/datepicker/icons/_fusionnew.scss +76 -52
- package/styles/datepicker/icons/_highcontrast-light.scss +72 -50
- package/styles/datepicker/icons/_highcontrast.scss +72 -50
- package/styles/datepicker/icons/_material-dark.scss +99 -59
- package/styles/datepicker/icons/_material.scss +99 -59
- package/styles/datepicker/icons/_material3.scss +79 -50
- package/styles/datepicker/icons/_tailwind.scss +76 -52
- package/styles/datepicker/material-dark.css +87 -22
- package/styles/datepicker/material.css +101 -24
- package/styles/datepicker/material3-dark.css +94 -24
- package/styles/datepicker/material3-dark.scss +1 -1
- package/styles/datepicker/material3.css +94 -24
- package/styles/datepicker/material3.scss +1 -1
- package/styles/datepicker/tailwind-dark.css +68 -21
- package/styles/datepicker/tailwind.css +68 -21
- package/styles/daterangepicker/_all.scss +2 -2
- package/styles/daterangepicker/_bds-definition.scss +294 -294
- package/styles/daterangepicker/_bootstrap-dark-definition.scss +258 -258
- package/styles/daterangepicker/_bootstrap-definition.scss +258 -258
- package/styles/daterangepicker/_bootstrap4-definition.scss +268 -268
- package/styles/daterangepicker/_bootstrap5-definition.scss +296 -296
- package/styles/daterangepicker/_bootstrap5.3-definition.scss +296 -298
- package/styles/daterangepicker/_fabric-dark-definition.scss +261 -261
- package/styles/daterangepicker/_fabric-definition.scss +258 -258
- package/styles/daterangepicker/_fluent-definition.scss +322 -313
- package/styles/daterangepicker/_fluent2-definition.scss +309 -305
- package/styles/daterangepicker/_fusionnew-definition.scss +295 -295
- package/styles/daterangepicker/_highcontrast-definition.scss +258 -258
- package/styles/daterangepicker/_highcontrast-light-definition.scss +261 -261
- package/styles/daterangepicker/_layout.scss +1022 -790
- package/styles/daterangepicker/_material-dark-definition.scss +266 -266
- package/styles/daterangepicker/_material-definition.scss +266 -266
- package/styles/daterangepicker/_material3-definition.scss +262 -262
- package/styles/daterangepicker/_tailwind-definition.scss +287 -287
- package/styles/daterangepicker/_theme.scss +463 -415
- package/styles/daterangepicker/bootstrap-dark.css +524 -91
- package/styles/daterangepicker/bootstrap.css +523 -91
- package/styles/daterangepicker/bootstrap4.css +528 -91
- package/styles/daterangepicker/bootstrap5-dark.css +529 -91
- package/styles/daterangepicker/bootstrap5.css +529 -91
- package/styles/daterangepicker/fabric-dark.css +518 -91
- package/styles/daterangepicker/fabric.css +518 -91
- package/styles/daterangepicker/fluent-dark.css +559 -96
- package/styles/daterangepicker/fluent.css +559 -96
- package/styles/daterangepicker/fluent2.css +658 -191
- package/styles/daterangepicker/highcontrast-light.css +518 -91
- package/styles/daterangepicker/highcontrast.css +518 -91
- package/styles/daterangepicker/icons/_bds.scss +92 -74
- package/styles/daterangepicker/icons/_bootstrap-dark.scss +85 -61
- package/styles/daterangepicker/icons/_bootstrap.scss +85 -69
- package/styles/daterangepicker/icons/_bootstrap4.scss +94 -75
- package/styles/daterangepicker/icons/_bootstrap5.3.scss +92 -74
- package/styles/daterangepicker/icons/_bootstrap5.scss +92 -74
- package/styles/daterangepicker/icons/_fabric-dark.scss +85 -69
- package/styles/daterangepicker/icons/_fabric.scss +85 -69
- package/styles/daterangepicker/icons/_fluent.scss +92 -74
- package/styles/daterangepicker/icons/_fluent2.scss +132 -91
- package/styles/daterangepicker/icons/_fusionnew.scss +92 -74
- package/styles/daterangepicker/icons/_highcontrast-light.scss +85 -69
- package/styles/daterangepicker/icons/_highcontrast.scss +85 -69
- package/styles/daterangepicker/icons/_material-dark.scss +119 -85
- package/styles/daterangepicker/icons/_material.scss +119 -85
- package/styles/daterangepicker/icons/_material3.scss +129 -90
- package/styles/daterangepicker/icons/_tailwind.scss +92 -74
- package/styles/daterangepicker/material-dark.css +543 -91
- package/styles/daterangepicker/material.css +562 -93
- package/styles/daterangepicker/material3-dark.css +578 -94
- package/styles/daterangepicker/material3-dark.scss +1 -1
- package/styles/daterangepicker/material3.css +578 -94
- package/styles/daterangepicker/material3.scss +1 -1
- package/styles/daterangepicker/tailwind-dark.css +526 -91
- package/styles/daterangepicker/tailwind.css +526 -91
- package/styles/datetimepicker/_all.scss +2 -2
- package/styles/datetimepicker/_bds-definition.scss +65 -65
- package/styles/datetimepicker/_bootstrap-dark-definition.scss +60 -60
- package/styles/datetimepicker/_bootstrap-definition.scss +59 -59
- package/styles/datetimepicker/_bootstrap4-definition.scss +65 -65
- package/styles/datetimepicker/_bootstrap5-definition.scss +65 -65
- package/styles/datetimepicker/_bootstrap5.3-definition.scss +65 -65
- package/styles/datetimepicker/_fabric-dark-definition.scss +60 -60
- package/styles/datetimepicker/_fabric-definition.scss +57 -57
- package/styles/datetimepicker/_fluent-definition.scss +65 -65
- package/styles/datetimepicker/_fluent2-definition.scss +65 -65
- package/styles/datetimepicker/_fusionnew-definition.scss +65 -65
- package/styles/datetimepicker/_highcontrast-definition.scss +57 -57
- package/styles/datetimepicker/_highcontrast-light-definition.scss +60 -60
- package/styles/datetimepicker/_layout.scss +235 -179
- package/styles/datetimepicker/_material-dark-definition.scss +64 -64
- package/styles/datetimepicker/_material-definition.scss +62 -62
- package/styles/datetimepicker/_material3-definition.scss +61 -61
- package/styles/datetimepicker/_tailwind-definition.scss +65 -65
- package/styles/datetimepicker/_theme.scss +70 -70
- package/styles/datetimepicker/bootstrap-dark.css +49 -26
- package/styles/datetimepicker/bootstrap.css +49 -26
- package/styles/datetimepicker/bootstrap4.css +49 -26
- package/styles/datetimepicker/bootstrap5-dark.css +49 -26
- package/styles/datetimepicker/bootstrap5.css +49 -26
- package/styles/datetimepicker/fabric-dark.css +49 -26
- package/styles/datetimepicker/fabric.css +49 -26
- package/styles/datetimepicker/fluent-dark.css +49 -26
- package/styles/datetimepicker/fluent.css +49 -26
- package/styles/datetimepicker/fluent2.css +150 -115
- package/styles/datetimepicker/highcontrast-light.css +49 -26
- package/styles/datetimepicker/highcontrast.css +49 -26
- package/styles/datetimepicker/icons/_bds.scss +11 -11
- package/styles/datetimepicker/icons/_bootstrap-dark.scss +11 -11
- package/styles/datetimepicker/icons/_bootstrap.scss +11 -11
- package/styles/datetimepicker/icons/_bootstrap4.scss +11 -11
- package/styles/datetimepicker/icons/_bootstrap5.3.scss +11 -11
- package/styles/datetimepicker/icons/_bootstrap5.scss +11 -11
- package/styles/datetimepicker/icons/_fabric-dark.scss +11 -11
- package/styles/datetimepicker/icons/_fabric.scss +11 -11
- package/styles/datetimepicker/icons/_fluent.scss +11 -11
- package/styles/datetimepicker/icons/_fluent2.scss +11 -11
- package/styles/datetimepicker/icons/_fusionnew.scss +11 -11
- package/styles/datetimepicker/icons/_highcontrast-light.scss +11 -11
- package/styles/datetimepicker/icons/_highcontrast.scss +11 -11
- package/styles/datetimepicker/icons/_material-dark.scss +53 -31
- package/styles/datetimepicker/icons/_material.scss +62 -40
- package/styles/datetimepicker/icons/_material3.scss +11 -11
- package/styles/datetimepicker/icons/_tailwind.scss +11 -11
- package/styles/datetimepicker/material-dark.css +82 -27
- package/styles/datetimepicker/material.css +96 -29
- package/styles/datetimepicker/material3-dark.css +85 -29
- package/styles/datetimepicker/material3-dark.scss +1 -1
- package/styles/datetimepicker/material3.css +85 -29
- package/styles/datetimepicker/material3.scss +1 -1
- package/styles/datetimepicker/tailwind-dark.css +49 -26
- package/styles/datetimepicker/tailwind.css +49 -26
- package/styles/fabric-dark.css +1106 -263
- package/styles/fabric.css +1108 -264
- package/styles/fluent-dark.css +1211 -294
- package/styles/fluent.css +1211 -294
- package/styles/fluent2.css +1313 -433
- package/styles/highcontrast-light.css +1102 -261
- package/styles/highcontrast.css +1108 -264
- package/styles/material-dark.css +1193 -265
- package/styles/material.css +1212 -267
- package/styles/material3-dark.css +1207 -268
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +1207 -268
- package/styles/material3.scss +1 -1
- package/styles/tailwind-dark.css +1167 -263
- package/styles/tailwind.css +1167 -263
- package/styles/timepicker/_all.scss +2 -2
- package/styles/timepicker/_bds-definition.scss +84 -84
- package/styles/timepicker/_bootstrap-dark-definition.scss +80 -80
- package/styles/timepicker/_bootstrap-definition.scss +77 -77
- package/styles/timepicker/_bootstrap4-definition.scss +85 -85
- package/styles/timepicker/_bootstrap5-definition.scss +86 -86
- package/styles/timepicker/_bootstrap5.3-definition.scss +85 -85
- package/styles/timepicker/_fabric-dark-definition.scss +80 -80
- package/styles/timepicker/_fabric-definition.scss +77 -77
- package/styles/timepicker/_fluent-definition.scss +86 -86
- package/styles/timepicker/_fluent2-definition.scss +84 -84
- package/styles/timepicker/_fusionnew-definition.scss +86 -86
- package/styles/timepicker/_highcontrast-definition.scss +77 -77
- package/styles/timepicker/_highcontrast-light-definition.scss +80 -80
- package/styles/timepicker/_layout.scss +288 -226
- package/styles/timepicker/_material-dark-definition.scss +84 -84
- package/styles/timepicker/_material-definition.scss +81 -81
- package/styles/timepicker/_material3-definition.scss +83 -83
- package/styles/timepicker/_tailwind-definition.scss +84 -84
- package/styles/timepicker/_theme.scss +111 -109
- package/styles/timepicker/bootstrap-dark.css +59 -10
- package/styles/timepicker/bootstrap.css +59 -10
- package/styles/timepicker/bootstrap4.css +59 -10
- package/styles/timepicker/bootstrap5-dark.css +59 -10
- package/styles/timepicker/bootstrap5.css +59 -10
- package/styles/timepicker/fabric-dark.css +59 -10
- package/styles/timepicker/fabric.css +59 -10
- package/styles/timepicker/fluent-dark.css +59 -10
- package/styles/timepicker/fluent.css +59 -10
- package/styles/timepicker/fluent2.css +160 -99
- package/styles/timepicker/highcontrast-light.css +59 -10
- package/styles/timepicker/highcontrast.css +59 -10
- package/styles/timepicker/icons/_bds.scss +24 -24
- package/styles/timepicker/icons/_bootstrap-dark.scss +23 -23
- package/styles/timepicker/icons/_bootstrap.scss +24 -24
- package/styles/timepicker/icons/_bootstrap4.scss +24 -24
- package/styles/timepicker/icons/_bootstrap5.3.scss +24 -24
- package/styles/timepicker/icons/_bootstrap5.scss +24 -24
- package/styles/timepicker/icons/_fabric-dark.scss +24 -24
- package/styles/timepicker/icons/_fabric.scss +24 -24
- package/styles/timepicker/icons/_fluent.scss +24 -24
- package/styles/timepicker/icons/_fluent2.scss +24 -24
- package/styles/timepicker/icons/_fusionnew.scss +24 -24
- package/styles/timepicker/icons/_highcontrast-light.scss +24 -24
- package/styles/timepicker/icons/_highcontrast.scss +24 -24
- package/styles/timepicker/icons/_material-dark.scss +52 -37
- package/styles/timepicker/icons/_material.scss +54 -39
- package/styles/timepicker/icons/_material3.scss +24 -24
- package/styles/timepicker/icons/_tailwind.scss +24 -24
- package/styles/timepicker/material-dark.css +85 -11
- package/styles/timepicker/material.css +99 -13
- package/styles/timepicker/material3-dark.css +93 -13
- package/styles/timepicker/material3-dark.scss +1 -1
- package/styles/timepicker/material3.css +93 -13
- package/styles/timepicker/material3.scss +1 -1
- package/styles/timepicker/tailwind-dark.css +59 -10
- package/styles/timepicker/tailwind.css +59 -10
- package/tslint.json +111 -0
- package/CHANGELOG.md +0 -1220
- package/styles/calendar/_bigger.scss +0 -1142
- package/styles/calendar/_tailwind4-definition.scss +0 -260
- package/styles/calendar/icons/_tailwind4.scss +0 -13
- package/styles/datepicker/_bigger.scss +0 -82
- package/styles/datepicker/_tailwind4-definition.scss +0 -108
- package/styles/datepicker/icons/_tailwind4.scss +0 -52
- package/styles/daterangepicker/_bigger.scss +0 -971
- package/styles/daterangepicker/_tailwind4-definition.scss +0 -298
- package/styles/daterangepicker/icons/_tailwind4.scss +0 -74
- package/styles/datetimepicker/_bigger.scss +0 -105
- package/styles/datetimepicker/_tailwind4-definition.scss +0 -65
- package/styles/datetimepicker/icons/_tailwind4.scss +0 -11
- package/styles/timepicker/_bigger.scss +0 -92
- package/styles/timepicker/_tailwind4-definition.scss +0 -86
- package/styles/timepicker/icons/_tailwind4.scss +0 -24
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Component, Internationalization, isNullOrUndefined, Browser, attributes, closest, addClass, removeClass, rippleEffect, EventHandler, getValue, getDefaultDateObject, cldrData, detach, L10n, extend, KeyboardEvents, getUniqueID, Property, Event, NotifyPropertyChanges, throwError, HijriParser, Touch, formatUnit, Animation, setValue, ChildProperty, merge, isUndefined, createElement, select, remove, prepend, Collection, append, setStyleAttribute } from '@syncfusion/ej2-base';
|
|
2
2
|
import { Popup } from '@syncfusion/ej2-popups';
|
|
3
3
|
import { Input } from '@syncfusion/ej2-inputs';
|
|
4
4
|
import { Button } from '@syncfusion/ej2-buttons';
|
|
5
5
|
import { ListBase } from '@syncfusion/ej2-lists';
|
|
6
6
|
|
|
7
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
8
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12
|
-
};
|
|
13
|
-
/* eslint-disable @typescript-eslint/no-unused-expressions */
|
|
7
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
8
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12
|
+
};
|
|
14
13
|
//class constant defination.
|
|
15
14
|
const OTHERMONTH = 'e-other-month';
|
|
16
15
|
const OTHERDECADE = 'e-other-year';
|
|
@@ -71,7 +70,6 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
71
70
|
this.isDateSelected = true;
|
|
72
71
|
this.isTodayClicked = false;
|
|
73
72
|
this.preventChange = false;
|
|
74
|
-
this.isAngular = false;
|
|
75
73
|
this.previousDates = false;
|
|
76
74
|
}
|
|
77
75
|
/**
|
|
@@ -269,7 +267,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
269
267
|
if (this.showTodayButton) {
|
|
270
268
|
this.createContentFooter();
|
|
271
269
|
}
|
|
272
|
-
if (this.getModuleName()
|
|
270
|
+
if (this.getModuleName() !== 'daterangepicker') {
|
|
273
271
|
EventHandler.add(this.table, 'focus', this.addContentFocus, this);
|
|
274
272
|
EventHandler.add(this.table, 'blur', this.removeContentFocus, this);
|
|
275
273
|
}
|
|
@@ -340,8 +338,9 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
340
338
|
addClass([this.calendarElement], '' + WEEKNUMBER);
|
|
341
339
|
}
|
|
342
340
|
}
|
|
343
|
-
|
|
344
|
-
|
|
341
|
+
const shortNames = this.getCultureValues().length > 0 &&
|
|
342
|
+
this.getCultureValues() ? this.shiftArray(((this.getCultureValues().length > 0 &&
|
|
343
|
+
this.getCultureValues())), this.firstDayOfWeek) : null;
|
|
345
344
|
if (!isNullOrUndefined(shortNames)) {
|
|
346
345
|
for (let days = 0; days <= daysCount; days++) {
|
|
347
346
|
html += '<th class="">' + this.toCapitalize(shortNames[days]) + '</th>';
|
|
@@ -462,6 +461,9 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
462
461
|
this.nextIcon = this.previousIcon = this.table = null;
|
|
463
462
|
}
|
|
464
463
|
keyActionHandle(e, value, multiSelection) {
|
|
464
|
+
if (this.calendarElement === null && e.action === 'escape') {
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
465
467
|
const focusedDate = this.tableBodyElement.querySelector('tr td.e-focused-date');
|
|
466
468
|
let selectedDate;
|
|
467
469
|
if (multiSelection) {
|
|
@@ -481,19 +483,22 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
481
483
|
this.effect = '';
|
|
482
484
|
switch (e.action) {
|
|
483
485
|
case 'moveLeft':
|
|
484
|
-
if (this.getModuleName()
|
|
486
|
+
if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target) &&
|
|
487
|
+
e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
|
|
485
488
|
this.keyboardNavigate(-1, view, e, this.max, this.min);
|
|
486
489
|
e.preventDefault();
|
|
487
490
|
}
|
|
488
491
|
break;
|
|
489
492
|
case 'moveRight':
|
|
490
|
-
if (this.getModuleName()
|
|
493
|
+
if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target) &&
|
|
494
|
+
e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
|
|
491
495
|
this.keyboardNavigate(1, view, e, this.max, this.min);
|
|
492
496
|
e.preventDefault();
|
|
493
497
|
}
|
|
494
498
|
break;
|
|
495
499
|
case 'moveUp':
|
|
496
|
-
if (this.getModuleName()
|
|
500
|
+
if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target) &&
|
|
501
|
+
e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
|
|
497
502
|
if (view === 0) {
|
|
498
503
|
this.keyboardNavigate(-7, view, e, this.max, this.min); // move the current date to the previous seven days.
|
|
499
504
|
}
|
|
@@ -504,7 +509,8 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
504
509
|
}
|
|
505
510
|
break;
|
|
506
511
|
case 'moveDown':
|
|
507
|
-
if (this.getModuleName()
|
|
512
|
+
if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target) &&
|
|
513
|
+
e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
|
|
508
514
|
if (view === 0) {
|
|
509
515
|
this.keyboardNavigate(7, view, e, this.max, this.min);
|
|
510
516
|
}
|
|
@@ -518,13 +524,13 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
518
524
|
if (e.target === this.headerTitleElement) {
|
|
519
525
|
this.navigateTitle(e);
|
|
520
526
|
}
|
|
521
|
-
else if (e.target === this.previousIcon) {
|
|
527
|
+
else if (e.target === this.previousIcon && !e.target.className.includes(DISABLED)) {
|
|
522
528
|
this.navigatePrevious(e);
|
|
523
529
|
}
|
|
524
|
-
else if (e.target === this.nextIcon) {
|
|
530
|
+
else if (e.target === this.nextIcon && !e.target.className.includes(DISABLED)) {
|
|
525
531
|
this.navigateNext(e);
|
|
526
532
|
}
|
|
527
|
-
else if (e.target === this.todayElement) {
|
|
533
|
+
else if (e.target === this.todayElement && !e.target.className.includes(DISABLED)) {
|
|
528
534
|
this.todayButtonClick(e, value);
|
|
529
535
|
if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {
|
|
530
536
|
this.element.focus();
|
|
@@ -537,12 +543,14 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
537
543
|
// eslint-disable-next-line radix
|
|
538
544
|
const d = new Date(parseInt('' + (element).id, 0));
|
|
539
545
|
this.selectDate(e, d, (element));
|
|
546
|
+
if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {
|
|
547
|
+
this.element.focus();
|
|
548
|
+
}
|
|
540
549
|
}
|
|
541
550
|
else {
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
this.element.focus();
|
|
551
|
+
if (!e.target.className.includes(DISABLED)) {
|
|
552
|
+
this.contentClick(null, --view, (element), value);
|
|
553
|
+
}
|
|
546
554
|
}
|
|
547
555
|
}
|
|
548
556
|
}
|
|
@@ -616,7 +624,12 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
616
624
|
case 'tab':
|
|
617
625
|
if ((this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') && e.target === this.todayElement) {
|
|
618
626
|
e.preventDefault();
|
|
619
|
-
this.
|
|
627
|
+
if (this.isAngular) {
|
|
628
|
+
this.inputElement.focus();
|
|
629
|
+
}
|
|
630
|
+
else {
|
|
631
|
+
this.element.focus();
|
|
632
|
+
}
|
|
620
633
|
this.hide();
|
|
621
634
|
}
|
|
622
635
|
break;
|
|
@@ -627,6 +640,11 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
627
640
|
this.hide();
|
|
628
641
|
}
|
|
629
642
|
break;
|
|
643
|
+
case 'escape':
|
|
644
|
+
if ((this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') && (e.target === this.headerTitleElement || e.target === this.previousIcon || e.target === this.nextIcon || e.target === this.todayElement)) {
|
|
645
|
+
this.hide();
|
|
646
|
+
}
|
|
647
|
+
break;
|
|
630
648
|
}
|
|
631
649
|
}
|
|
632
650
|
keyboardNavigate(number, currentView, e, max, min) {
|
|
@@ -815,7 +833,6 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
815
833
|
// if (args.isDisabled && +this.value === +args.date) {
|
|
816
834
|
// this.setProperties({ value: null }, true);
|
|
817
835
|
// }
|
|
818
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
819
836
|
let currentTarget;
|
|
820
837
|
if (!isNullOrUndefined(e) && e.type === 'click') {
|
|
821
838
|
currentTarget = e.currentTarget;
|
|
@@ -906,7 +923,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
906
923
|
const tdEle = this.dayCell(localDate);
|
|
907
924
|
const dayLink = this.createElement('span');
|
|
908
925
|
const localMonth = (value && (value).getMonth() === localDate.getMonth());
|
|
909
|
-
const select
|
|
926
|
+
const select = (value && (value).getFullYear() === yr && localMonth);
|
|
910
927
|
const title = this.globalize.formatDate(localDate, { type: 'date', format: 'MMM y' });
|
|
911
928
|
dayLink.textContent = this.toCapitalize(this.globalize.formatDate(localDate, {
|
|
912
929
|
format: null, type: 'dateTime', skeleton: 'MMM'
|
|
@@ -914,7 +931,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
914
931
|
if ((this.min && (curYrs < minYr || (month < minMonth && curYrs === minYr))) || (this.max && (curYrs > maxYr || (month > maxMonth && curYrs >= maxYr)))) {
|
|
915
932
|
addClass([tdEle], DISABLED);
|
|
916
933
|
}
|
|
917
|
-
else if (!valueUtil && select
|
|
934
|
+
else if (!valueUtil && select) {
|
|
918
935
|
addClass([tdEle], SELECTED);
|
|
919
936
|
}
|
|
920
937
|
else {
|
|
@@ -1562,9 +1579,6 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
1562
1579
|
navigateTitle(e) {
|
|
1563
1580
|
e.preventDefault();
|
|
1564
1581
|
this.title(e);
|
|
1565
|
-
if (this.getModuleName() === 'calendar') {
|
|
1566
|
-
this.table.focus();
|
|
1567
|
-
}
|
|
1568
1582
|
}
|
|
1569
1583
|
previous() {
|
|
1570
1584
|
this.effect = '';
|
|
@@ -1593,9 +1607,6 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
1593
1607
|
this.islamicModule.islamicPrevious();
|
|
1594
1608
|
}
|
|
1595
1609
|
this.triggerNavigate(e);
|
|
1596
|
-
if (this.getModuleName() === 'calendar') {
|
|
1597
|
-
this.table.focus();
|
|
1598
|
-
}
|
|
1599
1610
|
}
|
|
1600
1611
|
next() {
|
|
1601
1612
|
this.effect = '';
|
|
@@ -1624,9 +1635,6 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
1624
1635
|
this.islamicModule.islamicNext();
|
|
1625
1636
|
}
|
|
1626
1637
|
this.triggerNavigate(eve);
|
|
1627
|
-
if (this.getModuleName() === 'calendar') {
|
|
1628
|
-
this.table.focus();
|
|
1629
|
-
}
|
|
1630
1638
|
}
|
|
1631
1639
|
/**
|
|
1632
1640
|
* This method is used to navigate to the month/year/decade view of the Calendar.
|
|
@@ -2636,7 +2644,6 @@ let Calendar = class Calendar extends CalendarBase {
|
|
|
2636
2644
|
if (!isNullOrUndefined(this.value)) {
|
|
2637
2645
|
this.setProperties({ value: this.value }, true);
|
|
2638
2646
|
}
|
|
2639
|
-
// eslint-disable-next-line use-isnan
|
|
2640
2647
|
if (!this.isMultiSelection && +this.value !== Number.NaN && (!isNullOrUndefined(this.value) &&
|
|
2641
2648
|
!isNullOrUndefined(this.previousDate) || this.previousDate === null
|
|
2642
2649
|
&& !isNaN(+this.value))) {
|
|
@@ -2667,7 +2674,6 @@ Calendar = __decorate([
|
|
|
2667
2674
|
/**
|
|
2668
2675
|
*
|
|
2669
2676
|
*/
|
|
2670
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2671
2677
|
//class constant defination.
|
|
2672
2678
|
const OTHERMONTH$1 = 'e-other-month';
|
|
2673
2679
|
const YEAR$1 = 'e-year';
|
|
@@ -2920,12 +2926,12 @@ class Islamic {
|
|
|
2920
2926
|
const dayLink = this.calendarInstance.createElement('span');
|
|
2921
2927
|
const localMonth = (value &&
|
|
2922
2928
|
(this.getIslamicDate(value)).month === (this.getIslamicDate(localDate)).month);
|
|
2923
|
-
const select
|
|
2929
|
+
const select = (value && (this.getIslamicDate(value)).year === yr && localMonth);
|
|
2924
2930
|
dayLink.textContent = this.calendarInstance.globalize.formatDate(localDate, { type: 'dateTime', format: 'MMM', calendar: 'islamic' });
|
|
2925
2931
|
if ((this.calendarInstance.min && (curYrs < minYr || (month < minMonth && curYrs === minYr))) || (this.calendarInstance.max && (curYrs > maxYr || (month > maxMonth && curYrs >= maxYr)))) {
|
|
2926
2932
|
addClass([tdEle], DISABLED$1);
|
|
2927
2933
|
}
|
|
2928
|
-
else if (!valueUtil && select
|
|
2934
|
+
else if (!valueUtil && select) {
|
|
2929
2935
|
addClass([tdEle], SELECTED$1);
|
|
2930
2936
|
}
|
|
2931
2937
|
else {
|
|
@@ -2963,7 +2969,8 @@ class Islamic {
|
|
|
2963
2969
|
endHdrYr = Number(endHdrYr.replace(/[٠١٢٣٤٥٦٧٨٩]/g, (d) => String.fromCharCode(d.charCodeAt(0) - 1632 + 48)));
|
|
2964
2970
|
}
|
|
2965
2971
|
const splityear = this.calendarInstance.headerElement.textContent.split('-');
|
|
2966
|
-
if ((!isNullOrUndefined(e) && (splityear[0] !== startHdrYr) && e.action === 'home') ||
|
|
2972
|
+
if ((!isNullOrUndefined(e) && (splityear[0] !== startHdrYr) && e.action === 'home') ||
|
|
2973
|
+
(!isNullOrUndefined(e) && e.type === 'keydown' && e.action === 'end')) {
|
|
2967
2974
|
startHdrYr = this.calendarInstance.headerElement.textContent.split('-')[0].trim();
|
|
2968
2975
|
endHdrYr = this.calendarInstance.headerElement.textContent.split('-')[1].trim();
|
|
2969
2976
|
}
|
|
@@ -2973,8 +2980,8 @@ class Islamic {
|
|
|
2973
2980
|
this.calendarInstance.islamicPreviousHeader = null;
|
|
2974
2981
|
}
|
|
2975
2982
|
if (this.calendarInstance.previousIconClicked) {
|
|
2976
|
-
|
|
2977
|
-
for (
|
|
2983
|
+
let i = 0;
|
|
2984
|
+
for (i = 0; i <= splityear.length; i++) {
|
|
2978
2985
|
endHdrYr = endHdrYr - splityear[i] === 2 || splityear[i]
|
|
2979
2986
|
- endHdrYr === 2 ? (parseInt(endHdrYr, 10) + 1).toString() :
|
|
2980
2987
|
endHdrYr - splityear[i] === 3 || splityear[i] - endHdrYr === 3 ?
|
|
@@ -3218,18 +3225,12 @@ class Islamic {
|
|
|
3218
3225
|
}
|
|
3219
3226
|
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
3220
3227
|
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3228
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3229
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3230
|
-
};
|
|
3231
|
-
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
3232
|
-
/// <reference path='../calendar/calendar-model.d.ts'/>
|
|
3228
|
+
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
3229
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3230
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3231
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3232
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3233
|
+
};
|
|
3233
3234
|
//class constant defination
|
|
3234
3235
|
const DATEWRAPPER = 'e-date-wrapper';
|
|
3235
3236
|
const ROOT$1 = 'e-datepicker';
|
|
@@ -3281,7 +3282,6 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3281
3282
|
this.invalidValueString = null;
|
|
3282
3283
|
this.checkPreviousValue = null;
|
|
3283
3284
|
this.maskedDateValue = '';
|
|
3284
|
-
this.isAngular = false;
|
|
3285
3285
|
this.preventChange = false;
|
|
3286
3286
|
this.isIconClicked = false;
|
|
3287
3287
|
this.isDynamicValueChanged = false;
|
|
@@ -3386,7 +3386,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3386
3386
|
this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
|
|
3387
3387
|
}
|
|
3388
3388
|
if (this.fullScreenMode && Browser.isDevice) {
|
|
3389
|
-
this.cssClass += ' ' +
|
|
3389
|
+
this.cssClass += ' ' + 'e-popup-expand';
|
|
3390
3390
|
}
|
|
3391
3391
|
let updatedCssClassValues = this.cssClass;
|
|
3392
3392
|
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
@@ -3655,8 +3655,6 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3655
3655
|
});
|
|
3656
3656
|
}
|
|
3657
3657
|
break;
|
|
3658
|
-
default:
|
|
3659
|
-
break;
|
|
3660
3658
|
}
|
|
3661
3659
|
}
|
|
3662
3660
|
unBindEvents() {
|
|
@@ -4076,8 +4074,8 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4076
4074
|
}
|
|
4077
4075
|
strictModeUpdate() {
|
|
4078
4076
|
let format;
|
|
4079
|
-
|
|
4080
|
-
|
|
4077
|
+
const pattern = /^y/;
|
|
4078
|
+
const charPattern = /[^a-zA-Z]/;
|
|
4081
4079
|
let formatOptions;
|
|
4082
4080
|
if (this.getModuleName() === 'datetimepicker') {
|
|
4083
4081
|
format = !isNullOrUndefined(this.formatString) ? this.formatString : this.dateTimeFormat;
|
|
@@ -4201,10 +4199,10 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4201
4199
|
open: () => {
|
|
4202
4200
|
if (Browser.isDevice && this.fullScreenMode) {
|
|
4203
4201
|
this.iconRight = parseInt(window.getComputedStyle(this.calendarElement.querySelector('.e-header.e-month .e-prev')).marginRight, 10) > 16 ? true : false;
|
|
4204
|
-
this.touchModule = new Touch(this.calendarElement.querySelector(
|
|
4202
|
+
this.touchModule = new Touch(this.calendarElement.querySelector('.e-content.e-month'), {
|
|
4205
4203
|
swipe: this.CalendarSwipeHandler.bind(this)
|
|
4206
4204
|
});
|
|
4207
|
-
EventHandler.add(this.calendarElement.querySelector(
|
|
4205
|
+
EventHandler.add(this.calendarElement.querySelector('.e-content.e-month'), 'touchstart', this.TouchStartHandler, this);
|
|
4208
4206
|
}
|
|
4209
4207
|
if (this.getModuleName() !== 'datetimepicker') {
|
|
4210
4208
|
if (document.activeElement !== this.inputElement) {
|
|
@@ -4251,26 +4249,22 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4251
4249
|
let direction = 0;
|
|
4252
4250
|
if (this.iconRight) {
|
|
4253
4251
|
switch (e.swipeDirection) {
|
|
4254
|
-
case
|
|
4252
|
+
case 'Left':
|
|
4255
4253
|
direction = 1;
|
|
4256
4254
|
break;
|
|
4257
|
-
case
|
|
4255
|
+
case 'Right':
|
|
4258
4256
|
direction = -1;
|
|
4259
4257
|
break;
|
|
4260
|
-
default:
|
|
4261
|
-
break;
|
|
4262
4258
|
}
|
|
4263
4259
|
}
|
|
4264
4260
|
else {
|
|
4265
4261
|
switch (e.swipeDirection) {
|
|
4266
|
-
case
|
|
4262
|
+
case 'Up':
|
|
4267
4263
|
direction = 1;
|
|
4268
4264
|
break;
|
|
4269
|
-
case
|
|
4265
|
+
case 'Down':
|
|
4270
4266
|
direction = -1;
|
|
4271
4267
|
break;
|
|
4272
|
-
default:
|
|
4273
|
-
break;
|
|
4274
4268
|
}
|
|
4275
4269
|
}
|
|
4276
4270
|
if (this.touchStart) {
|
|
@@ -4325,16 +4319,17 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4325
4319
|
}
|
|
4326
4320
|
monthSpan.textContent = '' + this.globalize.formatDate(this.value || new Date(), dateOptions);
|
|
4327
4321
|
if (this.fullScreenMode) {
|
|
4328
|
-
const modelCloseIcon = this.createElement(
|
|
4322
|
+
const modelCloseIcon = this.createElement('span', { className: 'e-popup-close' });
|
|
4329
4323
|
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.modelCloseHandler, this);
|
|
4330
|
-
const modelTodayButton = this.calendarElement.querySelector(
|
|
4331
|
-
h2.classList.add(
|
|
4332
|
-
modelTodayButton.classList.add(
|
|
4324
|
+
const modelTodayButton = this.calendarElement.querySelector('button.e-today');
|
|
4325
|
+
h2.classList.add('e-day-wrapper');
|
|
4326
|
+
modelTodayButton.classList.add('e-outline');
|
|
4333
4327
|
modelHeader.appendChild(modelCloseIcon);
|
|
4334
4328
|
modelHeader.appendChild(modelTodayButton);
|
|
4335
4329
|
}
|
|
4336
|
-
if (!this.fullScreenMode)
|
|
4330
|
+
if (!this.fullScreenMode) {
|
|
4337
4331
|
modelHeader.appendChild(yearHeading);
|
|
4332
|
+
}
|
|
4338
4333
|
h2.appendChild(daySpan);
|
|
4339
4334
|
h2.appendChild(monthSpan);
|
|
4340
4335
|
modelHeader.appendChild(h2);
|
|
@@ -4541,7 +4536,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4541
4536
|
EventHandler.add(document, 'mousedown touchstart', this.documentHandler, this);
|
|
4542
4537
|
});
|
|
4543
4538
|
if (Browser.isDevice) {
|
|
4544
|
-
|
|
4539
|
+
const dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });
|
|
4545
4540
|
dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
|
|
4546
4541
|
this.mobilePopupWrapper.appendChild(dlgOverlay);
|
|
4547
4542
|
}
|
|
@@ -4599,7 +4594,8 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4599
4594
|
this.modal = null;
|
|
4600
4595
|
}
|
|
4601
4596
|
if (Browser.isDevice) {
|
|
4602
|
-
if (!isNullOrUndefined(this.mobilePopupWrapper) &&
|
|
4597
|
+
if (!isNullOrUndefined(this.mobilePopupWrapper) &&
|
|
4598
|
+
(prevent && (isNullOrUndefined(this.preventArgs) || !this.preventArgs.cancel))) {
|
|
4603
4599
|
this.mobilePopupWrapper.remove();
|
|
4604
4600
|
this.mobilePopupWrapper = null;
|
|
4605
4601
|
}
|
|
@@ -4868,7 +4864,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4868
4864
|
this.globalize = new Internationalization(this.locale);
|
|
4869
4865
|
this.checkFormat();
|
|
4870
4866
|
this.checkView();
|
|
4871
|
-
const attributes
|
|
4867
|
+
const attributes = dynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :
|
|
4872
4868
|
['value', 'min', 'max', 'disabled', 'readonly', 'style', 'name', 'placeholder', 'type'];
|
|
4873
4869
|
let options;
|
|
4874
4870
|
if (this.getModuleName() === 'datetimepicker') {
|
|
@@ -4893,7 +4889,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4893
4889
|
options = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
|
|
4894
4890
|
}
|
|
4895
4891
|
}
|
|
4896
|
-
for (const prop of attributes
|
|
4892
|
+
for (const prop of attributes) {
|
|
4897
4893
|
if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) {
|
|
4898
4894
|
switch (prop) {
|
|
4899
4895
|
case 'disabled':
|
|
@@ -5040,9 +5036,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
5040
5036
|
this.calendarElement.querySelectorAll(dateIdString)[0] &&
|
|
5041
5037
|
this.calendarElement.querySelectorAll(dateIdString)[0].classList.contains('e-disabled');
|
|
5042
5038
|
if ((!isNullOrUndefined(this.value) && !isNullOrUndefined(this.min) &&
|
|
5043
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5044
5039
|
!isNullOrUndefined(this.max) && !(new Date(this.value).setMilliseconds(0) >= new Date(this.min).setMilliseconds(0)
|
|
5045
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5046
5040
|
&& new Date(this.value).setMilliseconds(0) <= new Date(this.max).setMilliseconds(0)))
|
|
5047
5041
|
|| (!this.strictMode && this.inputElement.value !== '' && this.inputElement.value !== this.maskedDateValue && isNullOrUndefined(this.value) || isDisabledDate)) {
|
|
5048
5042
|
addClass([this.inputWrapper.container], ERROR);
|
|
@@ -5295,18 +5289,12 @@ DatePicker = __decorate$1([
|
|
|
5295
5289
|
NotifyPropertyChanges
|
|
5296
5290
|
], DatePicker);
|
|
5297
5291
|
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5305
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5306
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5307
|
-
};
|
|
5308
|
-
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
5309
|
-
/// <reference path='../calendar/calendar-model.d.ts'/>
|
|
5292
|
+
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
5293
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5294
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5295
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5296
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5297
|
+
};
|
|
5310
5298
|
const DATERANGEWRAPPER = 'e-date-range-wrapper';
|
|
5311
5299
|
const INPUTCONTAINER$1 = 'e-input-group';
|
|
5312
5300
|
const DATERANGEICON = 'e-input-group-icon e-range-icon e-icons';
|
|
@@ -5417,7 +5405,6 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5417
5405
|
this.preventBlur = false;
|
|
5418
5406
|
this.preventFocus = false;
|
|
5419
5407
|
this.invalidValueString = null;
|
|
5420
|
-
this.isAngular = false;
|
|
5421
5408
|
this.preventChange = false;
|
|
5422
5409
|
this.dateRangeOptions = options;
|
|
5423
5410
|
}
|
|
@@ -5641,20 +5628,20 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5641
5628
|
this.bindEvents();
|
|
5642
5629
|
}
|
|
5643
5630
|
setDataAttribute(isDynamic) {
|
|
5644
|
-
let attributes
|
|
5631
|
+
let attributes = {};
|
|
5645
5632
|
if (!isDynamic) {
|
|
5646
5633
|
for (let i = 0; i < this.element.attributes.length; i++) {
|
|
5647
|
-
attributes
|
|
5634
|
+
attributes[this.element.attributes[i].name] =
|
|
5648
5635
|
this.element.getAttribute(this.element.attributes[i].name);
|
|
5649
5636
|
}
|
|
5650
5637
|
}
|
|
5651
5638
|
else {
|
|
5652
|
-
attributes
|
|
5639
|
+
attributes = this.htmlAttributes;
|
|
5653
5640
|
}
|
|
5654
|
-
for (const pro of Object.keys(attributes
|
|
5641
|
+
for (const pro of Object.keys(attributes)) {
|
|
5655
5642
|
if (pro.indexOf('data') === 0) {
|
|
5656
|
-
this.firstHiddenChild.setAttribute(pro, attributes
|
|
5657
|
-
this.secondHiddenChild.setAttribute(pro, attributes
|
|
5643
|
+
this.firstHiddenChild.setAttribute(pro, attributes[`${pro}`]);
|
|
5644
|
+
this.secondHiddenChild.setAttribute(pro, attributes[`${pro}`]);
|
|
5658
5645
|
}
|
|
5659
5646
|
}
|
|
5660
5647
|
}
|
|
@@ -5686,14 +5673,14 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5686
5673
|
const name = element.getAttribute('name') ? element.getAttribute('name') : element.getAttribute('id');
|
|
5687
5674
|
input.setAttribute('name', name);
|
|
5688
5675
|
element.removeAttribute('name');
|
|
5689
|
-
const attributes
|
|
5690
|
-
for (let i = 0; i < attributes
|
|
5691
|
-
if (isNullOrUndefined(element.getAttribute(attributes
|
|
5676
|
+
const attributes = ['required', 'aria-required', 'form'];
|
|
5677
|
+
for (let i = 0; i < attributes.length; i++) {
|
|
5678
|
+
if (isNullOrUndefined(element.getAttribute(attributes[i]))) {
|
|
5692
5679
|
continue;
|
|
5693
5680
|
}
|
|
5694
|
-
const attr = element.getAttribute(attributes
|
|
5695
|
-
input.setAttribute(attributes
|
|
5696
|
-
element.removeAttribute(attributes
|
|
5681
|
+
const attr = element.getAttribute(attributes[i]);
|
|
5682
|
+
input.setAttribute(attributes[i], attr);
|
|
5683
|
+
element.removeAttribute(attributes[i]);
|
|
5697
5684
|
}
|
|
5698
5685
|
}
|
|
5699
5686
|
updateHtmlAttributeToWrapper() {
|
|
@@ -5953,11 +5940,11 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5953
5940
|
}
|
|
5954
5941
|
checkHtmlAttributes(isDynamic) {
|
|
5955
5942
|
this.globalize = new Internationalization(this.locale);
|
|
5956
|
-
const attributes
|
|
5943
|
+
const attributes = isDynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :
|
|
5957
5944
|
['startDate', 'endDate', 'minDays', 'maxDays', 'min', 'max', 'disabled', 'readonly', 'style', 'name', 'placeholder',
|
|
5958
5945
|
'type', 'value'];
|
|
5959
5946
|
const format = { format: this.formatString, type: 'date', skeleton: 'yMd' };
|
|
5960
|
-
for (const prop of attributes
|
|
5947
|
+
for (const prop of attributes) {
|
|
5961
5948
|
if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) {
|
|
5962
5949
|
switch (prop) {
|
|
5963
5950
|
case 'disabled':
|
|
@@ -6048,8 +6035,9 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6048
6035
|
const startDate = this.presetsItem[i].start;
|
|
6049
6036
|
const endDate = this.presetsItem[i].end;
|
|
6050
6037
|
if (this.startValue && this.endValue) {
|
|
6051
|
-
if (startDate.getDate()
|
|
6052
|
-
|
|
6038
|
+
if (startDate.getDate() === this.startValue.getDate() && startDate.getMonth() === this.startValue.getMonth() &&
|
|
6039
|
+
startDate.getFullYear() === this.startValue.getFullYear() && endDate.getDate() === this.endValue.getDate() &&
|
|
6040
|
+
endDate.getMonth() === this.endValue.getMonth() && endDate.getFullYear() === this.endValue.getFullYear()) {
|
|
6053
6041
|
this.activeIndex = i;
|
|
6054
6042
|
this.isCustomRange = false;
|
|
6055
6043
|
}
|
|
@@ -6321,19 +6309,15 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6321
6309
|
}
|
|
6322
6310
|
this.updateHiddenInput();
|
|
6323
6311
|
}
|
|
6324
|
-
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
6325
6312
|
getStartEndDate(date, isEnd, range, dateOptions) {
|
|
6326
6313
|
if (this.depth === 'Month') {
|
|
6327
6314
|
return this.globalize.parseDate(range[isEnd ? 1 : 0].trim(), dateOptions);
|
|
6328
6315
|
}
|
|
6329
|
-
else if (this.depth === 'Year'
|
|
6316
|
+
else if (this.depth === 'Year') {
|
|
6330
6317
|
return new Date(date.getFullYear(), date.getMonth() + (isEnd ? 1 : 0), isEnd ? 0 : 1);
|
|
6331
6318
|
}
|
|
6332
|
-
else if (!isNullOrUndefined(date)) {
|
|
6333
|
-
return new Date(date.getFullYear(), isEnd ? 11 : 0, isEnd ? 31 : 1);
|
|
6334
|
-
}
|
|
6335
6319
|
else {
|
|
6336
|
-
return
|
|
6320
|
+
return new Date(date.getFullYear(), isEnd ? 11 : 0, isEnd ? 31 : 1);
|
|
6337
6321
|
}
|
|
6338
6322
|
}
|
|
6339
6323
|
clearRange() {
|
|
@@ -7940,10 +7924,10 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
7940
7924
|
const controlContainer = this.createElement('div', { className: RANGECONTAINER });
|
|
7941
7925
|
const headerContainer = this.createElement('div', { className: RANGEHEADER });
|
|
7942
7926
|
if (this.isMobile && this.fullScreenMode) {
|
|
7943
|
-
const modelHeaderIconWrapper = this.createElement(
|
|
7944
|
-
const modelCloseIcon = this.createElement(
|
|
7927
|
+
const modelHeaderIconWrapper = this.createElement('div', { className: 'e-model-header-wrapper' });
|
|
7928
|
+
const modelCloseIcon = this.createElement('span', { className: 'e-popup-close' });
|
|
7945
7929
|
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.modelRangeCloseHandler, this);
|
|
7946
|
-
const modelApplyButton = this.createElement(
|
|
7930
|
+
const modelApplyButton = this.createElement('span', { className: 'e-apply' });
|
|
7947
7931
|
EventHandler.add(modelApplyButton, 'mousedown touchstart', this.applyFunction, this);
|
|
7948
7932
|
modelHeaderIconWrapper.appendChild(modelCloseIcon);
|
|
7949
7933
|
modelHeaderIconWrapper.appendChild(modelApplyButton);
|
|
@@ -8038,10 +8022,13 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8038
8022
|
eve.preventDefault();
|
|
8039
8023
|
}
|
|
8040
8024
|
if (!isNullOrUndefined(this.startValue) && !isNullOrUndefined(this.endValue)) {
|
|
8041
|
-
if (!(this.previousStartValue && this.previousEndValue &&
|
|
8042
|
-
this.startValue.
|
|
8043
|
-
|
|
8044
|
-
|
|
8025
|
+
if (!(this.previousStartValue && this.previousEndValue &&
|
|
8026
|
+
this.startValue.getDate() === this.previousStartValue.getDate() &&
|
|
8027
|
+
this.startValue.getMonth() === this.previousStartValue.getMonth() &&
|
|
8028
|
+
this.startValue.getFullYear() === this.previousStartValue.getFullYear()
|
|
8029
|
+
&& this.endValue.getDate() === this.previousEndValue.getDate() &&
|
|
8030
|
+
this.endValue.getMonth() === this.previousEndValue.getMonth()
|
|
8031
|
+
&& this.endValue.getFullYear() === this.previousEndValue.getFullYear())) {
|
|
8045
8032
|
Input.setValue(this.rangeArgs(eve).text, this.inputElement, this.floatLabelType, this.showClearButton);
|
|
8046
8033
|
}
|
|
8047
8034
|
this.previousStartValue = new Date(+this.startValue);
|
|
@@ -8211,9 +8198,9 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8211
8198
|
if (this.fullScreenMode) {
|
|
8212
8199
|
const modelWrapper = createElement('div', { className: 'e-range-mob-popup-wrap' });
|
|
8213
8200
|
const modelHeader = this.createElement('div', { className: 'e-model-header' });
|
|
8214
|
-
const modelTitleSpan = this.createElement(
|
|
8215
|
-
modelTitleSpan.textContent =
|
|
8216
|
-
const modelCloseIcon = this.createElement(
|
|
8201
|
+
const modelTitleSpan = this.createElement('span', { className: 'e-model-title' });
|
|
8202
|
+
modelTitleSpan.textContent = 'Select Preset';
|
|
8203
|
+
const modelCloseIcon = this.createElement('span', { className: 'e-popup-close' });
|
|
8217
8204
|
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.modelRangeCloseHandler, this);
|
|
8218
8205
|
const presetContent = this.presetElement;
|
|
8219
8206
|
modelHeader.appendChild(modelCloseIcon);
|
|
@@ -8277,10 +8264,10 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8277
8264
|
if (this.isMobile && this.fullScreenMode) {
|
|
8278
8265
|
this.iconRangeRight = this.calendarElement && window.getComputedStyle(this.calendarElement.querySelector('.e-header.e-month .e-prev')).cssFloat;
|
|
8279
8266
|
if (this.iconRangeRight) {
|
|
8280
|
-
this.touchRangeModule = new Touch(this.calendarElement.querySelector(
|
|
8267
|
+
this.touchRangeModule = new Touch(this.calendarElement.querySelector('.e-content.e-month'), {
|
|
8281
8268
|
swipe: this.dateRangeSwipeHandler.bind(this)
|
|
8282
8269
|
});
|
|
8283
|
-
EventHandler.add(this.calendarElement.querySelector(
|
|
8270
|
+
EventHandler.add(this.calendarElement.querySelector('.e-content.e-month'), 'touchstart', this.touchStartRangeHandler, this);
|
|
8284
8271
|
}
|
|
8285
8272
|
}
|
|
8286
8273
|
attributes(this.inputElement, { 'aria-expanded': 'true', 'aria-owns': this.element.id, 'aria-controls': this.inputElement.id });
|
|
@@ -8358,7 +8345,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8358
8345
|
EventHandler.remove(document, 'keydown', this.popupCloseHandler);
|
|
8359
8346
|
}
|
|
8360
8347
|
}, targetExitViewport: () => {
|
|
8361
|
-
|
|
8348
|
+
const popupEle = this.popupObj && this.popupObj.element;
|
|
8362
8349
|
if (!Browser.isDevice && popupEle && popupEle.getBoundingClientRect().height < window.innerHeight) {
|
|
8363
8350
|
this.hide();
|
|
8364
8351
|
}
|
|
@@ -8379,28 +8366,24 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8379
8366
|
}
|
|
8380
8367
|
dateRangeSwipeHandler(e) {
|
|
8381
8368
|
let direction = 0;
|
|
8382
|
-
if (this.iconRangeRight
|
|
8369
|
+
if (this.iconRangeRight === 'left') {
|
|
8383
8370
|
switch (e.swipeDirection) {
|
|
8384
|
-
case
|
|
8371
|
+
case 'Left':
|
|
8385
8372
|
direction = 1;
|
|
8386
8373
|
break;
|
|
8387
|
-
case
|
|
8374
|
+
case 'Right':
|
|
8388
8375
|
direction = -1;
|
|
8389
8376
|
break;
|
|
8390
|
-
default:
|
|
8391
|
-
break;
|
|
8392
8377
|
}
|
|
8393
8378
|
}
|
|
8394
8379
|
else {
|
|
8395
8380
|
switch (e.swipeDirection) {
|
|
8396
|
-
case
|
|
8381
|
+
case 'Up':
|
|
8397
8382
|
direction = 1;
|
|
8398
8383
|
break;
|
|
8399
|
-
case
|
|
8384
|
+
case 'Down':
|
|
8400
8385
|
direction = -1;
|
|
8401
8386
|
break;
|
|
8402
|
-
default:
|
|
8403
|
-
break;
|
|
8404
8387
|
}
|
|
8405
8388
|
}
|
|
8406
8389
|
if (this.touchRangeStart) {
|
|
@@ -8668,7 +8651,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8668
8651
|
}
|
|
8669
8652
|
createInput() {
|
|
8670
8653
|
if (this.fullScreenMode && this.isMobile) {
|
|
8671
|
-
this.cssClass += ' ' +
|
|
8654
|
+
this.cssClass += ' ' + 'e-popup-expand';
|
|
8672
8655
|
}
|
|
8673
8656
|
let updatedCssClassValue = this.cssClass;
|
|
8674
8657
|
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
@@ -9311,13 +9294,11 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
9311
9294
|
this.endButton.element.removeAttribute('disabled');
|
|
9312
9295
|
this.selectableDates();
|
|
9313
9296
|
}
|
|
9314
|
-
super.setOverlayIndex(this.mobileRangePopupWrap, this.popupObj.element, this.modal,
|
|
9315
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9316
|
-
this.isMobile || Browser.isDevice);
|
|
9297
|
+
super.setOverlayIndex(this.mobileRangePopupWrap, this.popupObj.element, this.modal, this.isMobile || Browser.isDevice);
|
|
9317
9298
|
}
|
|
9318
9299
|
});
|
|
9319
9300
|
if (Browser.isDevice) {
|
|
9320
|
-
|
|
9301
|
+
const dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });
|
|
9321
9302
|
dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
|
|
9322
9303
|
this.mobileRangePopupWrap.appendChild(dlgOverlay);
|
|
9323
9304
|
}
|
|
@@ -9507,7 +9488,6 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
9507
9488
|
this.updateHeader();
|
|
9508
9489
|
}
|
|
9509
9490
|
}
|
|
9510
|
-
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
9511
9491
|
getStartEndValue(date, isEnd) {
|
|
9512
9492
|
if (this.depth === 'Month') {
|
|
9513
9493
|
return this.checkDateValue(new Date(this.checkValue(date)));
|
|
@@ -9882,17 +9862,12 @@ DateRangePicker = __decorate$2([
|
|
|
9882
9862
|
NotifyPropertyChanges
|
|
9883
9863
|
], DateRangePicker);
|
|
9884
9864
|
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
|
|
9891
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
9892
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9893
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9894
|
-
};
|
|
9895
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
9865
|
+
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
9866
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9867
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
9868
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9869
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9870
|
+
};
|
|
9896
9871
|
const WRAPPERCLASS = 'e-time-wrapper';
|
|
9897
9872
|
const POPUP$2 = 'e-popup';
|
|
9898
9873
|
const ERROR$2 = 'e-error';
|
|
@@ -9922,13 +9897,7 @@ var TimePickerBase;
|
|
|
9922
9897
|
(function (TimePickerBase) {
|
|
9923
9898
|
// eslint-disable-next-line max-len, jsdoc/require-jsdoc
|
|
9924
9899
|
function createListItems(createdEl, min, max, globalize, timeFormat, step) {
|
|
9925
|
-
if (this.calendarMode === 'Gregorian')
|
|
9926
|
-
|
|
9927
|
-
}
|
|
9928
|
-
else {
|
|
9929
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9930
|
-
|
|
9931
|
-
}
|
|
9900
|
+
if (this.calendarMode === 'Gregorian') ;
|
|
9932
9901
|
let start;
|
|
9933
9902
|
const interval = step * 60000;
|
|
9934
9903
|
const listItems = [];
|
|
@@ -9993,7 +9962,6 @@ let TimePicker = class TimePicker extends Component {
|
|
|
9993
9962
|
this.timeCollections = [];
|
|
9994
9963
|
this.disableItemCollection = [];
|
|
9995
9964
|
this.invalidValueString = null;
|
|
9996
|
-
this.isAngular = false;
|
|
9997
9965
|
this.preventChange = false;
|
|
9998
9966
|
this.maskedDateValue = '';
|
|
9999
9967
|
this.moduleName = this.getModuleName();
|
|
@@ -10125,14 +10093,14 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10125
10093
|
const name = target.getAttribute('name') ? target.getAttribute('name') : target.getAttribute('id');
|
|
10126
10094
|
input.setAttribute('name', name);
|
|
10127
10095
|
target.removeAttribute('name');
|
|
10128
|
-
const attributes
|
|
10129
|
-
for (let i = 0; i < attributes
|
|
10130
|
-
if (isNullOrUndefined(target.getAttribute(attributes
|
|
10096
|
+
const attributes = ['required', 'aria-required', 'form'];
|
|
10097
|
+
for (let i = 0; i < attributes.length; i++) {
|
|
10098
|
+
if (isNullOrUndefined(target.getAttribute(attributes[i]))) {
|
|
10131
10099
|
continue;
|
|
10132
10100
|
}
|
|
10133
|
-
const attr = target.getAttribute(attributes
|
|
10134
|
-
input.setAttribute(attributes
|
|
10135
|
-
target.removeAttribute(attributes
|
|
10101
|
+
const attr = target.getAttribute(attributes[i]);
|
|
10102
|
+
input.setAttribute(attributes[i], attr);
|
|
10103
|
+
target.removeAttribute(attributes[i]);
|
|
10136
10104
|
}
|
|
10137
10105
|
}
|
|
10138
10106
|
initialize() {
|
|
@@ -10201,7 +10169,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10201
10169
|
}
|
|
10202
10170
|
createInputElement() {
|
|
10203
10171
|
if (this.fullScreenMode && Browser.isDevice) {
|
|
10204
|
-
this.cssClass += ' ' +
|
|
10172
|
+
this.cssClass += ' ' + 'e-popup-expand';
|
|
10205
10173
|
}
|
|
10206
10174
|
let updatedCssClassesValue = this.cssClass;
|
|
10207
10175
|
const isBindClearAction = this.enableMask ? false : true;
|
|
@@ -10312,7 +10280,6 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10312
10280
|
}
|
|
10313
10281
|
return modules;
|
|
10314
10282
|
}
|
|
10315
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10316
10283
|
cldrFormat(type) {
|
|
10317
10284
|
let cldrDateTimeString;
|
|
10318
10285
|
if (this.locale === 'en' || this.locale === 'en-US') {
|
|
@@ -10460,17 +10427,17 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10460
10427
|
this.popupObj.collision = { X: 'none', Y: 'flip' };
|
|
10461
10428
|
}
|
|
10462
10429
|
if (Browser.isDevice && this.fullScreenMode) {
|
|
10463
|
-
this.popupObj.element.style.maxHeight =
|
|
10464
|
-
this.popupObj.element.style.width =
|
|
10430
|
+
this.popupObj.element.style.maxHeight = '100%';
|
|
10431
|
+
this.popupObj.element.style.width = '100%';
|
|
10465
10432
|
}
|
|
10466
10433
|
else {
|
|
10467
10434
|
this.popupObj.element.style.maxHeight = POPUPDIMENSION;
|
|
10468
10435
|
}
|
|
10469
10436
|
if (Browser.isDevice && this.fullScreenMode) {
|
|
10470
10437
|
const modelHeader = this.createElement('div', { className: 'e-model-header' });
|
|
10471
|
-
const modelTitleSpan = this.createElement(
|
|
10472
|
-
modelTitleSpan.textContent =
|
|
10473
|
-
const modelCloseIcon = this.createElement(
|
|
10438
|
+
const modelTitleSpan = this.createElement('span', { className: 'e-model-title' });
|
|
10439
|
+
modelTitleSpan.textContent = 'Select time';
|
|
10440
|
+
const modelCloseIcon = this.createElement('span', { className: 'e-popup-close' });
|
|
10474
10441
|
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.timePopupCloseHandler, this);
|
|
10475
10442
|
modelHeader.appendChild(modelCloseIcon);
|
|
10476
10443
|
modelHeader.appendChild(modelTitleSpan);
|
|
@@ -10855,7 +10822,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10855
10822
|
}
|
|
10856
10823
|
inputHandler(event) {
|
|
10857
10824
|
if (!this.readonly && this.enabled) {
|
|
10858
|
-
if (!((event.action
|
|
10825
|
+
if (!((event.action === 'right' || event.action === 'left' || event.action === 'tab') || ((event.action === 'home' || event.action === 'end' || event.action === 'up' || event.action === 'down') && !this.isPopupOpen() && !this.enableMask))) {
|
|
10859
10826
|
event.preventDefault();
|
|
10860
10827
|
}
|
|
10861
10828
|
switch (event.action) {
|
|
@@ -11189,8 +11156,6 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11189
11156
|
});
|
|
11190
11157
|
}
|
|
11191
11158
|
break;
|
|
11192
|
-
default:
|
|
11193
|
-
break;
|
|
11194
11159
|
}
|
|
11195
11160
|
}
|
|
11196
11161
|
formResetHandler() {
|
|
@@ -11306,10 +11271,10 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11306
11271
|
}
|
|
11307
11272
|
}
|
|
11308
11273
|
checkAttributes(isDynamic) {
|
|
11309
|
-
const attributes
|
|
11274
|
+
const attributes = isDynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :
|
|
11310
11275
|
['step', 'disabled', 'readonly', 'style', 'name', 'value', 'min', 'max', 'placeholder'];
|
|
11311
11276
|
let value;
|
|
11312
|
-
for (const prop of attributes
|
|
11277
|
+
for (const prop of attributes) {
|
|
11313
11278
|
if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) {
|
|
11314
11279
|
switch (prop) {
|
|
11315
11280
|
case 'disabled':
|
|
@@ -12082,7 +12047,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
12082
12047
|
}
|
|
12083
12048
|
});
|
|
12084
12049
|
if (Browser.isDevice) {
|
|
12085
|
-
|
|
12050
|
+
const dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });
|
|
12086
12051
|
dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
|
|
12087
12052
|
this.mobileTimePopupWrap.appendChild(dlgOverlay);
|
|
12088
12053
|
}
|
|
@@ -12452,21 +12417,14 @@ __decorate$3([
|
|
|
12452
12417
|
TimePicker = __decorate$3([
|
|
12453
12418
|
NotifyPropertyChanges
|
|
12454
12419
|
], TimePicker);
|
|
12455
|
-
|
|
12456
12420
|
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
12457
12421
|
|
|
12458
|
-
|
|
12459
|
-
|
|
12460
|
-
|
|
12461
|
-
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
12465
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
12466
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12467
|
-
};
|
|
12468
|
-
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
12469
|
-
///<reference path='../datepicker/datepicker-model.d.ts'/>
|
|
12422
|
+
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
12423
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
12424
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
12425
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
12426
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12427
|
+
};
|
|
12470
12428
|
//class constant defination
|
|
12471
12429
|
const DATEWRAPPER$1 = 'e-date-wrapper';
|
|
12472
12430
|
const DATEPICKERROOT = 'e-datepicker';
|
|
@@ -12482,7 +12440,7 @@ const ROOT$4 = 'e-datetimepicker';
|
|
|
12482
12440
|
const DATETIMEPOPUPWRAPPER = 'e-datetimepopup-wrapper';
|
|
12483
12441
|
const INPUTWRAPPER$1 = 'e-input-group-icon';
|
|
12484
12442
|
const POPUP$3 = 'e-popup';
|
|
12485
|
-
const TIMEICON
|
|
12443
|
+
const TIMEICON = 'e-time-icon';
|
|
12486
12444
|
const INPUTFOCUS$2 = 'e-input-focus';
|
|
12487
12445
|
const POPUPDIMENSION$1 = '250px';
|
|
12488
12446
|
const ICONANIMATION$1 = 'e-icon-anim';
|
|
@@ -12793,7 +12751,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12793
12751
|
this.renderTimeIcon();
|
|
12794
12752
|
}
|
|
12795
12753
|
renderTimeIcon() {
|
|
12796
|
-
this.timeIcon = Input.appendSpan(INPUTWRAPPER$1 + ' ' + TIMEICON
|
|
12754
|
+
this.timeIcon = Input.appendSpan(INPUTWRAPPER$1 + ' ' + TIMEICON + ' ' + ICONS$1, this.inputWrapper.container);
|
|
12797
12755
|
}
|
|
12798
12756
|
bindInputEvents() {
|
|
12799
12757
|
EventHandler.add(this.timeIcon, 'mousedown', this.timeHandler, this);
|
|
@@ -13014,7 +12972,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13014
12972
|
this.dateTimeWrapper.style.left = '0px';
|
|
13015
12973
|
}
|
|
13016
12974
|
if (Browser.isDevice) {
|
|
13017
|
-
|
|
12975
|
+
const dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });
|
|
13018
12976
|
dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
|
|
13019
12977
|
this.timeModal.appendChild(dlgOverlay);
|
|
13020
12978
|
}
|
|
@@ -13033,7 +12991,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13033
12991
|
if (!this.preventArgs.cancel && !this.readonly) {
|
|
13034
12992
|
const openAnimation = {
|
|
13035
12993
|
name: 'FadeIn',
|
|
13036
|
-
duration: ANIMATIONDURATION$1
|
|
12994
|
+
duration: ANIMATIONDURATION$1
|
|
13037
12995
|
};
|
|
13038
12996
|
if (this.zIndex === 1000) {
|
|
13039
12997
|
this.popupObject.show(new Animation(openAnimation), this.element);
|
|
@@ -13123,9 +13081,9 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13123
13081
|
}
|
|
13124
13082
|
});
|
|
13125
13083
|
if (Browser.isDevice && this.fullScreenMode) {
|
|
13126
|
-
this.popupObject.element.style.display =
|
|
13127
|
-
this.popupObject.element.style.maxHeight =
|
|
13128
|
-
this.popupObject.element.style.width =
|
|
13084
|
+
this.popupObject.element.style.display = 'flex';
|
|
13085
|
+
this.popupObject.element.style.maxHeight = '100%';
|
|
13086
|
+
this.popupObject.element.style.width = '100%';
|
|
13129
13087
|
}
|
|
13130
13088
|
else {
|
|
13131
13089
|
this.popupObject.element.style.maxHeight = POPUPDIMENSION$1;
|
|
@@ -13133,11 +13091,11 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13133
13091
|
if (Browser.isDevice && this.fullScreenMode) {
|
|
13134
13092
|
const modelWrapper = createElement('div', { className: 'e-datetime-mob-popup-wrap' });
|
|
13135
13093
|
const modelHeader = this.createElement('div', { className: 'e-model-header' });
|
|
13136
|
-
const modelTitleSpan = this.createElement(
|
|
13137
|
-
modelTitleSpan.textContent =
|
|
13138
|
-
const modelCloseIcon = this.createElement(
|
|
13094
|
+
const modelTitleSpan = this.createElement('span', { className: 'e-model-title' });
|
|
13095
|
+
modelTitleSpan.textContent = 'Select time';
|
|
13096
|
+
const modelCloseIcon = this.createElement('span', { className: 'e-popup-close' });
|
|
13139
13097
|
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.dateTimeCloseHandler, this);
|
|
13140
|
-
const timeContent = this.dateTimeWrapper.querySelector(
|
|
13098
|
+
const timeContent = this.dateTimeWrapper.querySelector('.e-content');
|
|
13141
13099
|
modelHeader.appendChild(modelCloseIcon);
|
|
13142
13100
|
modelHeader.appendChild(modelTitleSpan);
|
|
13143
13101
|
modelWrapper.appendChild(modelHeader);
|
|
@@ -13444,9 +13402,15 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13444
13402
|
return this.calculateStartEnd(tempStartValue, start, 'starttime');
|
|
13445
13403
|
}
|
|
13446
13404
|
TimePopupFormat() {
|
|
13447
|
-
|
|
13448
|
-
|
|
13449
|
-
const proxy =
|
|
13405
|
+
let format = '';
|
|
13406
|
+
let formatCount = 0;
|
|
13407
|
+
const proxy = this;
|
|
13408
|
+
/**
|
|
13409
|
+
* Formats the value specifier.
|
|
13410
|
+
*
|
|
13411
|
+
* @param {string} formattext - The format text.
|
|
13412
|
+
* @returns {string} The formatted value specifier.
|
|
13413
|
+
*/
|
|
13450
13414
|
function formatValueSpecifier(formattext) {
|
|
13451
13415
|
switch (formattext) {
|
|
13452
13416
|
case 'd':
|
|
@@ -13461,11 +13425,11 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13461
13425
|
case 'yy':
|
|
13462
13426
|
case 'yyy':
|
|
13463
13427
|
case 'yyyy':
|
|
13464
|
-
if (format
|
|
13428
|
+
if (format === '') {
|
|
13465
13429
|
format = format + formattext;
|
|
13466
13430
|
}
|
|
13467
13431
|
else {
|
|
13468
|
-
format = format +
|
|
13432
|
+
format = format + '/' + formattext;
|
|
13469
13433
|
}
|
|
13470
13434
|
formatCount = formatCount + 1;
|
|
13471
13435
|
break;
|
|
@@ -13575,10 +13539,10 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13575
13539
|
}
|
|
13576
13540
|
}
|
|
13577
13541
|
checkAttributes(isDynamic) {
|
|
13578
|
-
const attributes
|
|
13542
|
+
const attributes = isDynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :
|
|
13579
13543
|
['style', 'name', 'step', 'disabled', 'readonly', 'value', 'min', 'max', 'placeholder', 'type'];
|
|
13580
13544
|
let value;
|
|
13581
|
-
for (const prop of attributes
|
|
13545
|
+
for (const prop of attributes) {
|
|
13582
13546
|
if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) {
|
|
13583
13547
|
switch (prop) {
|
|
13584
13548
|
case 'name':
|
|
@@ -14144,10 +14108,6 @@ DateTimePicker = __decorate$4([
|
|
|
14144
14108
|
NotifyPropertyChanges
|
|
14145
14109
|
], DateTimePicker);
|
|
14146
14110
|
|
|
14147
|
-
/**
|
|
14148
|
-
* DateTimePicker modules
|
|
14149
|
-
*/
|
|
14150
|
-
|
|
14151
14111
|
const ARROWLEFT = 'ArrowLeft';
|
|
14152
14112
|
const ARROWRIGHT = 'ArrowRight';
|
|
14153
14113
|
const ARROWUP = 'ArrowUp';
|
|
@@ -14435,8 +14395,8 @@ class MaskedDateTime {
|
|
|
14435
14395
|
}
|
|
14436
14396
|
if (month >= 1) {
|
|
14437
14397
|
newDateValue.setMonth(month - 1);
|
|
14438
|
-
if (month >= 10 || month
|
|
14439
|
-
if (this.isLeadingZero && month
|
|
14398
|
+
if (month >= 10 || month === 1) {
|
|
14399
|
+
if (this.isLeadingZero && month === 1) {
|
|
14440
14400
|
this.isNavigate = month.toString().length === 1;
|
|
14441
14401
|
this.isLeadingZero = false;
|
|
14442
14402
|
}
|
|
@@ -14588,7 +14548,6 @@ class MaskedDateTime {
|
|
|
14588
14548
|
case 'a':
|
|
14589
14549
|
{
|
|
14590
14550
|
this.periodCharacter += newVal[start - 1].toLowerCase();
|
|
14591
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14592
14551
|
const periodString = (this.getCulturedValue('dayPeriods.format.wide'));
|
|
14593
14552
|
const periodkeys = Object.keys(periodString);
|
|
14594
14553
|
for (let i = 0; this.periodCharacter.length > 0; i++) {
|
|
@@ -14602,15 +14561,12 @@ class MaskedDateTime {
|
|
|
14602
14561
|
}
|
|
14603
14562
|
break;
|
|
14604
14563
|
}
|
|
14605
|
-
default:
|
|
14606
|
-
break;
|
|
14607
14564
|
}
|
|
14608
14565
|
this.maskDateValue = newDateValue;
|
|
14609
14566
|
}
|
|
14610
14567
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14611
14568
|
formatCheck() {
|
|
14612
|
-
|
|
14613
|
-
const proxy = this;
|
|
14569
|
+
const proxy = this;
|
|
14614
14570
|
function formatValueSpecifier(formattext) {
|
|
14615
14571
|
let result;
|
|
14616
14572
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -14937,8 +14893,6 @@ class MaskedDateTime {
|
|
|
14937
14893
|
case 'a':
|
|
14938
14894
|
newDateValue.setHours((newDateValue.getHours() + 12) % 24);
|
|
14939
14895
|
break;
|
|
14940
|
-
default:
|
|
14941
|
-
break;
|
|
14942
14896
|
}
|
|
14943
14897
|
this.maskDateValue = newDateValue.getFullYear() > 0 ? newDateValue : this.maskDateValue;
|
|
14944
14898
|
if (this.validCharacters.indexOf(this.hiddenMask[start]) !== -1) {
|
|
@@ -14994,13 +14948,5 @@ class MaskedDateTime {
|
|
|
14994
14948
|
}
|
|
14995
14949
|
}
|
|
14996
14950
|
|
|
14997
|
-
|
|
14998
|
-
* MaskedDateTime modules
|
|
14999
|
-
*/
|
|
15000
|
-
|
|
15001
|
-
/**
|
|
15002
|
-
* Calendar all modules
|
|
15003
|
-
*/
|
|
15004
|
-
|
|
15005
|
-
export { CalendarBase, Calendar, Islamic, DatePicker, Presets, DateRangePicker, TimePickerBase, TimeMaskPlaceholder, TimePicker, DateTimePicker, MaskedDateTime };
|
|
14951
|
+
export { Calendar, CalendarBase, DatePicker, DateRangePicker, DateTimePicker, Islamic, MaskedDateTime, Presets, TimeMaskPlaceholder, TimePicker, TimePickerBase };
|
|
15006
14952
|
//# sourceMappingURL=ej2-calendars.es2015.js.map
|