tsichart-core 1.0.5 → 2.0.0-beta.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.
Files changed (135) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +80 -0
  3. package/dist/index.d.ts +1744 -0
  4. package/dist/index.js +14284 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.mjs +14209 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/dist/{tsiclient.css → styles/index.css} +9498 -9497
  9. package/dist/styles/index.css.map +1 -0
  10. package/package.json +115 -124
  11. package/README.MD +0 -171
  12. package/dist/AggregateExpression.d.ts +0 -13
  13. package/dist/AggregateExpression.js +0 -70
  14. package/dist/AvailabilityChart-C8ewvn3T.js +0 -488
  15. package/dist/AvailabilityChart.d.ts +0 -59
  16. package/dist/AvailabilityChart.js +0 -26
  17. package/dist/ChartComponent-Dg8P-BTZ.js +0 -302
  18. package/dist/ChartComponent-ONNW31RL.d.ts +0 -80
  19. package/dist/ChartComponentData-DBW8_FnY.d.ts +0 -47
  20. package/dist/ChartDataOptions-CNTSB636.js +0 -49
  21. package/dist/ChartDataOptions-D0BJuRZy.d.ts +0 -38
  22. package/dist/ChartVisualizationComponent-CTs5Q_sg.js +0 -23
  23. package/dist/ChartVisualizationComponent-CpR8xZla.d.ts +0 -8
  24. package/dist/ColorPicker-0p6vkATj.js +0 -120
  25. package/dist/ColorPicker.d.ts +0 -28
  26. package/dist/ColorPicker.js +0 -6
  27. package/dist/Component-BgifJdKl.js +0 -401
  28. package/dist/Component-DXwYPoSo.d.ts +0 -226
  29. package/dist/ContextMenu-wqGGgAzp.js +0 -197
  30. package/dist/DateTimeButton-D7N8XG0S.js +0 -38
  31. package/dist/DateTimeButton-DfJL5kvr.d.ts +0 -16
  32. package/dist/DateTimeButtonRange-BM_J646m.js +0 -71
  33. package/dist/DateTimeButtonRange.d.ts +0 -19
  34. package/dist/DateTimeButtonRange.js +0 -15
  35. package/dist/DateTimeButtonSingle-BxMSitQG.js +0 -48
  36. package/dist/DateTimeButtonSingle.d.ts +0 -17
  37. package/dist/DateTimeButtonSingle.js +0 -14
  38. package/dist/DateTimePicker-BgTi-DY9.js +0 -532
  39. package/dist/DateTimePicker.d.ts +0 -69
  40. package/dist/DateTimePicker.js +0 -13
  41. package/dist/EllipsisMenu-CxJ0LoVm.js +0 -116
  42. package/dist/EllipsisMenu.d.ts +0 -20
  43. package/dist/EllipsisMenu.js +0 -6
  44. package/dist/Enums-DWpaQlXk.d.ts +0 -12
  45. package/dist/EventsTable-CsnBvvIW.js +0 -553
  46. package/dist/EventsTable.d.ts +0 -34
  47. package/dist/EventsTable.js +0 -10
  48. package/dist/GeoProcessGraphic-CUBMHIHX.js +0 -145
  49. package/dist/GeoProcessGraphic.d.ts +0 -34
  50. package/dist/GeoProcessGraphic.js +0 -7
  51. package/dist/Grid-uoHKTet9.js +0 -874
  52. package/dist/Grid.d.ts +0 -43
  53. package/dist/Grid.js +0 -6
  54. package/dist/GroupedBarChart-Bc3cGhgz.js +0 -579
  55. package/dist/GroupedBarChart.d.ts +0 -22
  56. package/dist/GroupedBarChart.js +0 -17
  57. package/dist/GroupedBarChartData-B7BTM9JH.d.ts +0 -20
  58. package/dist/GroupedBarChartData-Ml5JJimg.js +0 -121
  59. package/dist/Heatmap-5gFc_AVW.js +0 -524
  60. package/dist/Heatmap.d.ts +0 -31
  61. package/dist/Heatmap.js +0 -14
  62. package/dist/Hierarchy-C5ueDsus.js +0 -260
  63. package/dist/Hierarchy.d.ts +0 -39
  64. package/dist/Hierarchy.js +0 -6
  65. package/dist/HierarchyNavigation-C3Pwt0D6.js +0 -336
  66. package/dist/HierarchyNavigation.d.ts +0 -34
  67. package/dist/HierarchyNavigation.js +0 -6
  68. package/dist/HistoryPlayback-D09bter3.js +0 -175
  69. package/dist/HistoryPlayback-DmJ6u7lU.d.ts +0 -68
  70. package/dist/Interfaces-R_1l9lIT.d.ts +0 -6
  71. package/dist/Legend-gCIrAytG.js +0 -497
  72. package/dist/LineChart-CzDp5ULB.js +0 -3181
  73. package/dist/LineChart.d.ts +0 -163
  74. package/dist/LineChart.js +0 -18
  75. package/dist/ModelAutocomplete-lU71Ndju.js +0 -100
  76. package/dist/ModelAutocomplete.d.ts +0 -12
  77. package/dist/ModelAutocomplete.js +0 -7
  78. package/dist/ModelSearch-OF4DygOJ.js +0 -189
  79. package/dist/ModelSearch.d.ts +0 -23
  80. package/dist/ModelSearch.js +0 -9
  81. package/dist/PieChart-XLc9Itne.js +0 -258
  82. package/dist/PieChart.d.ts +0 -26
  83. package/dist/PieChart.js +0 -17
  84. package/dist/PlaybackControls-DbG9gExy.js +0 -195
  85. package/dist/PlaybackControls.d.ts +0 -39
  86. package/dist/PlaybackControls.js +0 -13
  87. package/dist/ProcessGraphic-Cft1b4Mf.js +0 -154
  88. package/dist/ProcessGraphic.d.ts +0 -31
  89. package/dist/ProcessGraphic.js +0 -7
  90. package/dist/ScatterPlot-CdnqSHq2.js +0 -924
  91. package/dist/ScatterPlot.d.ts +0 -115
  92. package/dist/ScatterPlot.js +0 -17
  93. package/dist/SingleDateTimePicker-Ddr-ogTk.js +0 -213
  94. package/dist/SingleDateTimePicker.d.ts +0 -45
  95. package/dist/SingleDateTimePicker.js +0 -12
  96. package/dist/Slider-CX0nvlqx.js +0 -186
  97. package/dist/Slider.d.ts +0 -31
  98. package/dist/Slider.js +0 -6
  99. package/dist/TemporalXAxisComponent-DXmMekYq.js +0 -129
  100. package/dist/TemporalXAxisComponent-PIeiJYUr.d.ts +0 -23
  101. package/dist/TimezonePicker-CQpXR5eb.js +0 -58
  102. package/dist/TimezonePicker.d.ts +0 -16
  103. package/dist/TimezonePicker.js +0 -10
  104. package/dist/Tooltip-C13k0eeH.js +0 -104
  105. package/dist/TsqExpression.d.ts +0 -36
  106. package/dist/TsqExpression.js +0 -89
  107. package/dist/UXClient-Bn1afElm.js +0 -230
  108. package/dist/UXClient.d.ts +0 -74
  109. package/dist/UXClient.js +0 -47
  110. package/dist/Utils-BcQeZOM3.d.ts +0 -104
  111. package/dist/Utils-DDGqSryb.js +0 -1138
  112. package/dist/Utils.d.ts +0 -7
  113. package/dist/Utils.js +0 -7
  114. package/dist/_tslib-BYFmvNeL.js +0 -96
  115. package/dist/pikaday-jh_aVtJs.js +0 -1252
  116. package/dist/tsiclient.cjs.js +0 -3
  117. package/dist/tsiclient.cjs.js.LICENSE.txt +0 -19
  118. package/dist/tsiclient.cjs.js.map +0 -1
  119. package/dist/tsiclient.d.ts +0 -46
  120. package/dist/tsiclient.esm.js +0 -3
  121. package/dist/tsiclient.esm.js.LICENSE.txt +0 -19
  122. package/dist/tsiclient.esm.js.map +0 -1
  123. package/dist/tsiclient.js +0 -58
  124. package/dist/tsiclient.min.css +0 -6
  125. package/dist/tsiclient.min.css.map +0 -1
  126. package/dist/tsiclient.umd.js +0 -3
  127. package/dist/tsiclient.umd.js.LICENSE.txt +0 -19
  128. package/dist/tsiclient.umd.js.map +0 -1
  129. package/dist/tsiclient.umd.min.js +0 -3
  130. package/dist/tsiclient.umd.min.js.LICENSE.txt +0 -19
  131. package/dist/tsiclient.umd.min.js.map +0 -1
  132. package/tsiclient.css +0 -17323
  133. package/tsiclient.d.ts +0 -46
  134. package/tsiclient.js +0 -58
  135. package/tsiclient.min.css +0 -6
@@ -1,1252 +0,0 @@
1
- function getDefaultExportFromCjs (x) {
2
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3
- }
4
-
5
- var pikaday$1 = {exports: {}};
6
-
7
- /*!
8
- * Pikaday
9
- *
10
- * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
11
- */
12
- var pikaday = pikaday$1.exports;
13
-
14
- var hasRequiredPikaday;
15
-
16
- function requirePikaday () {
17
- if (hasRequiredPikaday) return pikaday$1.exports;
18
- hasRequiredPikaday = 1;
19
- (function (module, exports) {
20
- (function (root, factory)
21
- {
22
-
23
- var moment;
24
- {
25
- // CommonJS module
26
- // Load moment.js as an optional dependency
27
- try { moment = require('moment'); } catch (e) {}
28
- module.exports = factory(moment);
29
- }
30
- }(pikaday, function (moment)
31
- {
32
-
33
- /**
34
- * feature detection and helper functions
35
- */
36
- var hasMoment = typeof moment === 'function',
37
-
38
- hasEventListeners = !!window.addEventListener,
39
-
40
- document = window.document,
41
-
42
- sto = window.setTimeout,
43
-
44
- addEvent = function(el, e, callback, capture)
45
- {
46
- if (hasEventListeners) {
47
- el.addEventListener(e, callback, !!capture);
48
- } else {
49
- el.attachEvent('on' + e, callback);
50
- }
51
- },
52
-
53
- removeEvent = function(el, e, callback, capture)
54
- {
55
- if (hasEventListeners) {
56
- el.removeEventListener(e, callback, !!capture);
57
- } else {
58
- el.detachEvent('on' + e, callback);
59
- }
60
- },
61
-
62
- trim = function(str)
63
- {
64
- return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g,'');
65
- },
66
-
67
- hasClass = function(el, cn)
68
- {
69
- return (' ' + el.className + ' ').indexOf(' ' + cn + ' ') !== -1;
70
- },
71
-
72
- addClass = function(el, cn)
73
- {
74
- if (!hasClass(el, cn)) {
75
- el.className = (el.className === '') ? cn : el.className + ' ' + cn;
76
- }
77
- },
78
-
79
- removeClass = function(el, cn)
80
- {
81
- el.className = trim((' ' + el.className + ' ').replace(' ' + cn + ' ', ' '));
82
- },
83
-
84
- isArray = function(obj)
85
- {
86
- return (/Array/).test(Object.prototype.toString.call(obj));
87
- },
88
-
89
- isDate = function(obj)
90
- {
91
- return (/Date/).test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime());
92
- },
93
-
94
- isWeekend = function(date)
95
- {
96
- var day = date.getDay();
97
- return day === 0 || day === 6;
98
- },
99
-
100
- isLeapYear = function(year)
101
- {
102
- // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951
103
- return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
104
- },
105
-
106
- getDaysInMonth = function(year, month)
107
- {
108
- return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
109
- },
110
-
111
- setToStartOfDay = function(date)
112
- {
113
- if (isDate(date)) date.setHours(0,0,0,0);
114
- },
115
-
116
- compareDates = function(a,b)
117
- {
118
- // weak date comparison (use setToStartOfDay(date) to ensure correct result)
119
- return a.getTime() === b.getTime();
120
- },
121
-
122
- extend = function(to, from, overwrite)
123
- {
124
- var prop, hasProp;
125
- for (prop in from) {
126
- hasProp = to[prop] !== undefined;
127
- if (hasProp && typeof from[prop] === 'object' && from[prop] !== null && from[prop].nodeName === undefined) {
128
- if (isDate(from[prop])) {
129
- if (overwrite) {
130
- to[prop] = new Date(from[prop].getTime());
131
- }
132
- }
133
- else if (isArray(from[prop])) {
134
- if (overwrite) {
135
- to[prop] = from[prop].slice(0);
136
- }
137
- } else {
138
- to[prop] = extend({}, from[prop], overwrite);
139
- }
140
- } else if (overwrite || !hasProp) {
141
- to[prop] = from[prop];
142
- }
143
- }
144
- return to;
145
- },
146
-
147
- fireEvent = function(el, eventName, data)
148
- {
149
- var ev;
150
-
151
- if (document.createEvent) {
152
- ev = document.createEvent('HTMLEvents');
153
- ev.initEvent(eventName, true, false);
154
- ev = extend(ev, data);
155
- el.dispatchEvent(ev);
156
- } else if (document.createEventObject) {
157
- ev = document.createEventObject();
158
- ev = extend(ev, data);
159
- el.fireEvent('on' + eventName, ev);
160
- }
161
- },
162
-
163
- adjustCalendar = function(calendar) {
164
- if (calendar.month < 0) {
165
- calendar.year -= Math.ceil(Math.abs(calendar.month)/12);
166
- calendar.month += 12;
167
- }
168
- if (calendar.month > 11) {
169
- calendar.year += Math.floor(Math.abs(calendar.month)/12);
170
- calendar.month -= 12;
171
- }
172
- return calendar;
173
- },
174
-
175
- /**
176
- * defaults and localisation
177
- */
178
- defaults = {
179
-
180
- // bind the picker to a form field
181
- field: null,
182
-
183
- // automatically show/hide the picker on `field` focus (default `true` if `field` is set)
184
- bound: undefined,
185
-
186
- // position of the datepicker, relative to the field (default to bottom & left)
187
- // ('bottom' & 'left' keywords are not used, 'top' & 'right' are modifier on the bottom/left position)
188
- position: 'bottom left',
189
-
190
- // automatically fit in the viewport even if it means repositioning from the position option
191
- reposition: true,
192
-
193
- // the default output format for `.toString()` and `field` value
194
- format: 'YYYY-MM-DD',
195
-
196
- // the toString function which gets passed a current date object and format
197
- // and returns a string
198
- toString: null,
199
-
200
- // used to create date object from current input string
201
- parse: null,
202
-
203
- // the initial date to view when first opened
204
- defaultDate: null,
205
-
206
- // make the `defaultDate` the initial selected value
207
- setDefaultDate: false,
208
-
209
- // first day of week (0: Sunday, 1: Monday etc)
210
- firstDay: 0,
211
-
212
- // the default flag for moment's strict date parsing
213
- formatStrict: false,
214
-
215
- // the minimum/earliest date that can be selected
216
- minDate: null,
217
- // the maximum/latest date that can be selected
218
- maxDate: null,
219
-
220
- // number of years either side, or array of upper/lower range
221
- yearRange: 10,
222
-
223
- // show week numbers at head of row
224
- showWeekNumber: false,
225
-
226
- // Week picker mode
227
- pickWholeWeek: false,
228
-
229
- // used internally (don't config outside)
230
- minYear: 0,
231
- maxYear: 9999,
232
- minMonth: undefined,
233
- maxMonth: undefined,
234
-
235
- startRange: null,
236
- endRange: null,
237
-
238
- isRTL: false,
239
-
240
- // Additional text to append to the year in the calendar title
241
- yearSuffix: '',
242
-
243
- // Render the month after year in the calendar title
244
- showMonthAfterYear: false,
245
-
246
- // Render days of the calendar grid that fall in the next or previous month
247
- showDaysInNextAndPreviousMonths: false,
248
-
249
- // Allows user to select days that fall in the next or previous month
250
- enableSelectionDaysInNextAndPreviousMonths: false,
251
-
252
- // how many months are visible
253
- numberOfMonths: 1,
254
-
255
- // when numberOfMonths is used, this will help you to choose where the main calendar will be (default `left`, can be set to `right`)
256
- // only used for the first display or when a selected date is not visible
257
- mainCalendar: 'left',
258
-
259
- // Specify a DOM element to render the calendar in
260
- container: undefined,
261
-
262
- // Blur field when date is selected
263
- blurFieldOnSelect : true,
264
-
265
- // internationalization
266
- i18n: {
267
- previousMonth : 'Previous Month',
268
- nextMonth : 'Next Month',
269
- months : ['January','February','March','April','May','June','July','August','September','October','November','December'],
270
- weekdays : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
271
- weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']
272
- },
273
-
274
- // Theme Classname
275
- theme: null,
276
-
277
- // events array
278
- events: [],
279
-
280
- // callback function
281
- onSelect: null,
282
- onOpen: null,
283
- onClose: null,
284
- onDraw: null,
285
-
286
- // Enable keyboard input
287
- keyboardInput: true
288
- },
289
-
290
-
291
- /**
292
- * templating functions to abstract HTML rendering
293
- */
294
- renderDayName = function(opts, day, abbr)
295
- {
296
- day += opts.firstDay;
297
- while (day >= 7) {
298
- day -= 7;
299
- }
300
- return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day];
301
- },
302
-
303
- renderDay = function(opts)
304
- {
305
- var arr = [];
306
- var ariaSelected = 'false';
307
- if (opts.isEmpty) {
308
- if (opts.showDaysInNextAndPreviousMonths) {
309
- arr.push('is-outside-current-month');
310
-
311
- if(!opts.enableSelectionDaysInNextAndPreviousMonths) {
312
- arr.push('is-selection-disabled');
313
- }
314
-
315
- } else {
316
- return '<td class="is-empty"></td>';
317
- }
318
- }
319
- if (opts.isDisabled) {
320
- arr.push('is-disabled');
321
- }
322
- if (opts.isToday) {
323
- arr.push('is-today');
324
- }
325
- if (opts.isSelected) {
326
- arr.push('is-selected');
327
- ariaSelected = 'true';
328
- }
329
- if (opts.hasEvent) {
330
- arr.push('has-event');
331
- }
332
- if (opts.isInRange) {
333
- arr.push('is-inrange');
334
- }
335
- if (opts.isStartRange) {
336
- arr.push('is-startrange');
337
- }
338
- if (opts.isEndRange) {
339
- arr.push('is-endrange');
340
- }
341
- return '<td data-day="' + opts.day + '" class="' + arr.join(' ') + '" aria-selected="' + ariaSelected + '">' +
342
- '<button tabIndex="-1" class="pika-button pika-day" type="button" ' +
343
- 'data-pika-year="' + opts.year + '" data-pika-month="' + opts.month + '" data-pika-day="' + opts.day + '">' +
344
- opts.day +
345
- '</button>' +
346
- '</td>';
347
- },
348
-
349
- renderWeek = function (d, m, y) {
350
- // Lifted from http://javascript.about.com/library/blweekyear.htm, lightly modified.
351
- var onejan = new Date(y, 0, 1),
352
- weekNum = Math.ceil((((new Date(y, m, d) - onejan) / 86400000) + onejan.getDay()+1)/7);
353
- return '<td class="pika-week">' + weekNum + '</td>';
354
- },
355
-
356
- renderRow = function(days, isRTL, pickWholeWeek, isRowSelected)
357
- {
358
- return '<tr class="pika-row' + (pickWholeWeek ? ' pick-whole-week' : '') + (isRowSelected ? ' is-selected' : '') + '">' + (isRTL ? days.reverse() : days).join('') + '</tr>';
359
- },
360
-
361
- renderBody = function(rows)
362
- {
363
- return '<tbody>' + rows.join('') + '</tbody>';
364
- },
365
-
366
- renderHead = function(opts)
367
- {
368
- var i, arr = [];
369
- if (opts.showWeekNumber) {
370
- arr.push('<th></th>');
371
- }
372
- for (i = 0; i < 7; i++) {
373
- arr.push('<th scope="col"><abbr title="' + renderDayName(opts, i) + '">' + renderDayName(opts, i, true) + '</abbr></th>');
374
- }
375
- return '<thead><tr>' + (opts.isRTL ? arr.reverse() : arr).join('') + '</tr></thead>';
376
- },
377
-
378
- renderTitle = function(instance, c, year, month, refYear, randId)
379
- {
380
- var i, j, arr,
381
- opts = instance._o,
382
- isMinYear = year === opts.minYear,
383
- isMaxYear = year === opts.maxYear,
384
- html = '<div id="' + randId + '" class="pika-title">',
385
- monthHtml,
386
- yearHtml,
387
- prev = true,
388
- next = true;
389
-
390
- for (arr = [], i = 0; i < 12; i++) {
391
- arr.push('<option value="' + (year === refYear ? i - c : 12 + i - c) + '"' +
392
- (i === month ? ' selected="selected"': '') +
393
- ((isMinYear && i < opts.minMonth) || (isMaxYear && i > opts.maxMonth) ? 'disabled="disabled"' : '') + '>' +
394
- opts.i18n.months[i] + '</option>');
395
- }
396
-
397
- monthHtml = '<div class="pika-label">' + opts.i18n.months[month] + '<select aria-label="select month" class="pika-select pika-select-month" tabindex="-1">' + arr.join('') + '</select></div>';
398
-
399
- if (isArray(opts.yearRange)) {
400
- i = opts.yearRange[0];
401
- j = opts.yearRange[1] + 1;
402
- } else {
403
- i = year - opts.yearRange;
404
- j = 1 + year + opts.yearRange;
405
- }
406
-
407
- for (arr = []; i < j && i <= opts.maxYear; i++) {
408
- if (i >= opts.minYear) {
409
- arr.push('<option value="' + i + '"' + (i === year ? ' selected="selected"': '') + '>' + (i) + '</option>');
410
- }
411
- }
412
- yearHtml = '<div class="pika-label">' + year + opts.yearSuffix + '<select aria-label="select year" class="pika-select pika-select-year" tabindex="-1">' + arr.join('') + '</select></div>';
413
-
414
- if (opts.showMonthAfterYear) {
415
- html += yearHtml + monthHtml;
416
- } else {
417
- html += monthHtml + yearHtml;
418
- }
419
-
420
- if (isMinYear && (month === 0 || opts.minMonth >= month)) {
421
- prev = false;
422
- }
423
-
424
- if (isMaxYear && (month === 11 || opts.maxMonth <= month)) {
425
- next = false;
426
- }
427
-
428
- if (c === 0) {
429
- html += '<button tabIndex="-1" class="pika-prev' + (prev ? '' : ' is-disabled') + '" type="button">' + opts.i18n.previousMonth + '</button>';
430
- }
431
- if (c === (instance._o.numberOfMonths - 1) ) {
432
- html += '<button tabIndex="-1" class="pika-next' + (next ? '' : ' is-disabled') + '" type="button">' + opts.i18n.nextMonth + '</button>';
433
- }
434
-
435
- return html += '</div>';
436
- },
437
-
438
- renderTable = function(opts, data, randId)
439
- {
440
- return '<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="' + randId + '">' + renderHead(opts) + renderBody(data) + '</table>';
441
- },
442
-
443
-
444
- /**
445
- * Pikaday constructor
446
- */
447
- Pikaday = function(options)
448
- {
449
- var self = this,
450
- opts = self.config(options);
451
-
452
- self._onMouseDown = function(e)
453
- {
454
- if (!self._v) {
455
- return;
456
- }
457
- e = e || window.event;
458
- var target = e.target || e.srcElement;
459
- if (!target) {
460
- return;
461
- }
462
-
463
- if (!hasClass(target, 'is-disabled')) {
464
- if (hasClass(target, 'pika-button') && !hasClass(target, 'is-empty') && !hasClass(target.parentNode, 'is-disabled')) {
465
- self.setDate(new Date(target.getAttribute('data-pika-year'), target.getAttribute('data-pika-month'), target.getAttribute('data-pika-day')));
466
- if (opts.bound) {
467
- sto(function() {
468
- self.hide();
469
- if (opts.blurFieldOnSelect && opts.field) {
470
- opts.field.blur();
471
- }
472
- }, 100);
473
- }
474
- }
475
- else if (hasClass(target, 'pika-prev')) {
476
- self.prevMonth();
477
- }
478
- else if (hasClass(target, 'pika-next')) {
479
- self.nextMonth();
480
- }
481
- }
482
- if (!hasClass(target, 'pika-select')) {
483
- // if this is touch event prevent mouse events emulation
484
- if (e.preventDefault) {
485
- e.preventDefault();
486
- } else {
487
- e.returnValue = false;
488
- return false;
489
- }
490
- } else {
491
- self._c = true;
492
- }
493
- };
494
-
495
- self._onChange = function(e)
496
- {
497
- e = e || window.event;
498
- var target = e.target || e.srcElement;
499
- if (!target) {
500
- return;
501
- }
502
- if (hasClass(target, 'pika-select-month')) {
503
- self.gotoMonth(target.value);
504
- }
505
- else if (hasClass(target, 'pika-select-year')) {
506
- self.gotoYear(target.value);
507
- }
508
- };
509
-
510
- self._onKeyChange = function(e)
511
- {
512
- e = e || window.event;
513
- // ignore if event comes from input box
514
- if (self.isVisible() && e.target && e.target.type !== 'text') {
515
-
516
- switch(e.keyCode){
517
- case 13:
518
- case 27:
519
- if (opts.field) {
520
- opts.field.blur();
521
- }
522
- break;
523
- case 37:
524
- e.preventDefault();
525
- self.adjustDate('subtract', 1);
526
- break;
527
- case 38:
528
- self.adjustDate('subtract', 7);
529
- break;
530
- case 39:
531
- self.adjustDate('add', 1);
532
- break;
533
- case 40:
534
- self.adjustDate('add', 7);
535
- break;
536
- }
537
- }
538
- };
539
-
540
- self._onInputChange = function(e)
541
- {
542
- var date;
543
-
544
- if (e.firedBy === self) {
545
- return;
546
- }
547
- if (opts.parse) {
548
- date = opts.parse(opts.field.value, opts.format);
549
- } else if (hasMoment) {
550
- date = moment(opts.field.value, opts.format, opts.formatStrict);
551
- date = (date && date.isValid()) ? date.toDate() : null;
552
- }
553
- else {
554
- date = new Date(Date.parse(opts.field.value));
555
- }
556
- // if (isDate(date)) {
557
- // self.setDate(date);
558
- // }
559
- // if (!self._v) {
560
- // self.show();
561
- // }
562
- };
563
-
564
- self._onInputFocus = function()
565
- {
566
- self.show();
567
- };
568
-
569
- self._onInputClick = function()
570
- {
571
- self.show();
572
- };
573
-
574
- self._onInputBlur = function()
575
- {
576
- // IE allows pika div to gain focus; catch blur the input field
577
- var pEl = document.activeElement;
578
- do {
579
- if (hasClass(pEl, 'pika-single')) {
580
- return;
581
- }
582
- }
583
- while ((pEl = pEl.parentNode));
584
-
585
- if (!self._c) {
586
- self._b = sto(function() {
587
- self.hide();
588
- }, 50);
589
- }
590
- self._c = false;
591
- };
592
-
593
- self._onClick = function(e)
594
- {
595
- e = e || window.event;
596
- var target = e.target || e.srcElement,
597
- pEl = target;
598
- if (!target) {
599
- return;
600
- }
601
- if (!hasEventListeners && hasClass(target, 'pika-select')) {
602
- if (!target.onchange) {
603
- target.setAttribute('onchange', 'return;');
604
- addEvent(target, 'change', self._onChange);
605
- }
606
- }
607
- do {
608
- if (hasClass(pEl, 'pika-single') || pEl === opts.trigger) {
609
- return;
610
- }
611
- }
612
- while ((pEl = pEl.parentNode));
613
- if (self._v && target !== opts.trigger && pEl !== opts.trigger) {
614
- self.hide();
615
- }
616
- };
617
-
618
- self.el = document.createElement('div');
619
- self.el.className = 'pika-single' + (opts.isRTL ? ' is-rtl' : '') + (opts.theme ? ' ' + opts.theme : '');
620
-
621
- addEvent(self.el, 'mousedown', self._onMouseDown, true);
622
- addEvent(self.el, 'touchend', self._onMouseDown, true);
623
- addEvent(self.el, 'change', self._onChange);
624
-
625
- if (opts.keyboardInput) {
626
- addEvent(document, 'keydown', self._onKeyChange);
627
- }
628
-
629
- if (opts.field) {
630
- if (opts.container) {
631
- opts.container.appendChild(self.el);
632
- } else if (opts.bound) {
633
- document.body.appendChild(self.el);
634
- } else {
635
- opts.field.parentNode.insertBefore(self.el, opts.field.nextSibling);
636
- }
637
- addEvent(opts.field, 'change', self._onInputChange);
638
-
639
- if (!opts.defaultDate) {
640
- if (hasMoment && opts.field.value) {
641
- opts.defaultDate = moment(opts.field.value, opts.format).toDate();
642
- } else {
643
- opts.defaultDate = new Date(Date.parse(opts.field.value));
644
- }
645
- opts.setDefaultDate = true;
646
- }
647
- }
648
-
649
- var defDate = opts.defaultDate;
650
-
651
- if (isDate(defDate)) {
652
- if (opts.setDefaultDate) {
653
- self.setDate(defDate, true);
654
- } else {
655
- self.gotoDate(defDate);
656
- }
657
- } else {
658
- self.gotoDate(new Date());
659
- }
660
-
661
- if (opts.bound) {
662
- this.hide();
663
- self.el.className += ' is-bound';
664
- addEvent(opts.trigger, 'click', self._onInputClick);
665
- addEvent(opts.trigger, 'focus', self._onInputFocus);
666
- addEvent(opts.trigger, 'blur', self._onInputBlur);
667
- } else {
668
- this.show();
669
- }
670
- };
671
-
672
-
673
- /**
674
- * public Pikaday API
675
- */
676
- Pikaday.prototype = {
677
-
678
-
679
- /**
680
- * configure functionality
681
- */
682
- config: function(options)
683
- {
684
- if (!this._o) {
685
- this._o = extend({}, defaults, true);
686
- }
687
-
688
- var opts = extend(this._o, options, true);
689
-
690
- opts.isRTL = !!opts.isRTL;
691
-
692
- opts.field = (opts.field && opts.field.nodeName) ? opts.field : null;
693
-
694
- opts.theme = (typeof opts.theme) === 'string' && opts.theme ? opts.theme : null;
695
-
696
- opts.bound = !!(opts.bound !== undefined ? opts.field && opts.bound : opts.field);
697
-
698
- opts.trigger = (opts.trigger && opts.trigger.nodeName) ? opts.trigger : opts.field;
699
-
700
- opts.disableWeekends = !!opts.disableWeekends;
701
-
702
- opts.disableDayFn = (typeof opts.disableDayFn) === 'function' ? opts.disableDayFn : null;
703
-
704
- var nom = parseInt(opts.numberOfMonths, 10) || 1;
705
- opts.numberOfMonths = nom > 4 ? 4 : nom;
706
-
707
- if (!isDate(opts.minDate)) {
708
- opts.minDate = false;
709
- }
710
- if (!isDate(opts.maxDate)) {
711
- opts.maxDate = false;
712
- }
713
- if ((opts.minDate && opts.maxDate) && opts.maxDate < opts.minDate) {
714
- opts.maxDate = opts.minDate = false;
715
- }
716
- if (opts.minDate) {
717
- this.setMinDate(opts.minDate);
718
- }
719
- if (opts.maxDate) {
720
- this.setMaxDate(opts.maxDate);
721
- }
722
-
723
- if (isArray(opts.yearRange)) {
724
- var fallback = new Date().getFullYear() - 10;
725
- opts.yearRange[0] = parseInt(opts.yearRange[0], 10) || fallback;
726
- opts.yearRange[1] = parseInt(opts.yearRange[1], 10) || fallback;
727
- } else {
728
- opts.yearRange = Math.abs(parseInt(opts.yearRange, 10)) || defaults.yearRange;
729
- if (opts.yearRange > 100) {
730
- opts.yearRange = 100;
731
- }
732
- }
733
-
734
- return opts;
735
- },
736
-
737
- /**
738
- * return a formatted string of the current selection (using Moment.js if available)
739
- */
740
- toString: function(format)
741
- {
742
- format = format || this._o.format;
743
- if (!isDate(this._d)) {
744
- return '';
745
- }
746
- if (this._o.toString) {
747
- return this._o.toString(this._d, format);
748
- }
749
- if (hasMoment) {
750
- return moment(this._d).format(format);
751
- }
752
- return this._d.toDateString();
753
- },
754
-
755
- /**
756
- * return a Moment.js object of the current selection (if available)
757
- */
758
- getMoment: function()
759
- {
760
- return hasMoment ? moment(this._d) : null;
761
- },
762
-
763
- /**
764
- * set the current selection from a Moment.js object (if available)
765
- */
766
- setMoment: function(date, preventOnSelect)
767
- {
768
- if (hasMoment && moment.isMoment(date)) {
769
- this.setDate(date.toDate(), preventOnSelect);
770
- }
771
- },
772
-
773
- /**
774
- * return a Date object of the current selection
775
- */
776
- getDate: function()
777
- {
778
- return isDate(this._d) ? new Date(this._d.getTime()) : null;
779
- },
780
-
781
- /**
782
- * set the current selection
783
- */
784
- setDate: function(date, preventOnSelect)
785
- {
786
- if (!date) {
787
- this._d = null;
788
-
789
- if (this._o.field) {
790
- this._o.field.value = '';
791
- fireEvent(this._o.field, 'change', { firedBy: this });
792
- }
793
-
794
- return this.draw();
795
- }
796
- if (typeof date === 'string') {
797
- date = new Date(Date.parse(date));
798
- }
799
- if (!isDate(date)) {
800
- return;
801
- }
802
-
803
- var min = this._o.minDate,
804
- max = this._o.maxDate;
805
-
806
- if (isDate(min) && date < min) {
807
- date = min;
808
- } else if (isDate(max) && date > max) {
809
- date = max;
810
- }
811
-
812
- this._d = new Date(date.getTime());
813
- setToStartOfDay(this._d);
814
- this.gotoDate(this._d);
815
-
816
- if (this._o.field) {
817
- this._o.field.value = this.toString();
818
- fireEvent(this._o.field, 'change', { firedBy: this });
819
- }
820
- if (!preventOnSelect && typeof this._o.onSelect === 'function') {
821
- this._o.onSelect.call(this, this.getDate());
822
- }
823
- },
824
-
825
- /**
826
- * change view to a specific date
827
- */
828
- gotoDate: function(date)
829
- {
830
- var newCalendar = true;
831
-
832
- if (!isDate(date)) {
833
- return;
834
- }
835
-
836
- if (this.calendars) {
837
- var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1),
838
- lastVisibleDate = new Date(this.calendars[this.calendars.length-1].year, this.calendars[this.calendars.length-1].month, 1),
839
- visibleDate = date.getTime();
840
- // get the end of the month
841
- lastVisibleDate.setMonth(lastVisibleDate.getMonth()+1);
842
- lastVisibleDate.setDate(lastVisibleDate.getDate()-1);
843
- newCalendar = (visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate);
844
- }
845
-
846
- if (newCalendar) {
847
- this.calendars = [{
848
- month: date.getMonth(),
849
- year: date.getFullYear()
850
- }];
851
- if (this._o.mainCalendar === 'right') {
852
- this.calendars[0].month += 1 - this._o.numberOfMonths;
853
- }
854
- }
855
-
856
- this.adjustCalendars();
857
- },
858
-
859
- adjustDate: function(sign, days) {
860
-
861
- var day = this.getDate() || new Date();
862
- var difference = parseInt(days)*24*60*60*1000;
863
-
864
- var newDay;
865
-
866
- if (sign === 'add') {
867
- newDay = new Date(day.valueOf() + difference);
868
- } else if (sign === 'subtract') {
869
- newDay = new Date(day.valueOf() - difference);
870
- }
871
-
872
- this.setDate(newDay);
873
- },
874
-
875
- adjustCalendars: function() {
876
- this.calendars[0] = adjustCalendar(this.calendars[0]);
877
- for (var c = 1; c < this._o.numberOfMonths; c++) {
878
- this.calendars[c] = adjustCalendar({
879
- month: this.calendars[0].month + c,
880
- year: this.calendars[0].year
881
- });
882
- }
883
- this.draw();
884
- },
885
-
886
- gotoToday: function()
887
- {
888
- this.gotoDate(new Date());
889
- },
890
-
891
- /**
892
- * change view to a specific month (zero-index, e.g. 0: January)
893
- */
894
- gotoMonth: function(month)
895
- {
896
- if (!isNaN(month)) {
897
- this.calendars[0].month = parseInt(month, 10);
898
- this.adjustCalendars();
899
- }
900
- },
901
-
902
- nextMonth: function()
903
- {
904
- this.calendars[0].month++;
905
- this.adjustCalendars();
906
- },
907
-
908
- prevMonth: function()
909
- {
910
- this.calendars[0].month--;
911
- this.adjustCalendars();
912
- },
913
-
914
- /**
915
- * change view to a specific full year (e.g. "2012")
916
- */
917
- gotoYear: function(year)
918
- {
919
- if (!isNaN(year)) {
920
- this.calendars[0].year = parseInt(year, 10);
921
- this.adjustCalendars();
922
- }
923
- },
924
-
925
- /**
926
- * change the minDate
927
- */
928
- setMinDate: function(value)
929
- {
930
- if(value instanceof Date) {
931
- setToStartOfDay(value);
932
- this._o.minDate = value;
933
- this._o.minYear = value.getFullYear();
934
- this._o.minMonth = value.getMonth();
935
- } else {
936
- this._o.minDate = defaults.minDate;
937
- this._o.minYear = defaults.minYear;
938
- this._o.minMonth = defaults.minMonth;
939
- this._o.startRange = defaults.startRange;
940
- }
941
-
942
- this.draw();
943
- },
944
-
945
- /**
946
- * change the maxDate
947
- */
948
- setMaxDate: function(value)
949
- {
950
- if(value instanceof Date) {
951
- setToStartOfDay(value);
952
- this._o.maxDate = value;
953
- this._o.maxYear = value.getFullYear();
954
- this._o.maxMonth = value.getMonth();
955
- } else {
956
- this._o.maxDate = defaults.maxDate;
957
- this._o.maxYear = defaults.maxYear;
958
- this._o.maxMonth = defaults.maxMonth;
959
- this._o.endRange = defaults.endRange;
960
- }
961
-
962
- this.draw();
963
- },
964
-
965
- setStartRange: function(value)
966
- {
967
- this._o.startRange = value;
968
- },
969
-
970
- setEndRange: function(value)
971
- {
972
- this._o.endRange = value;
973
- },
974
-
975
- /**
976
- * refresh the HTML
977
- */
978
- draw: function(force)
979
- {
980
- if (!this._v && !force) {
981
- return;
982
- }
983
- var opts = this._o,
984
- minYear = opts.minYear,
985
- maxYear = opts.maxYear,
986
- minMonth = opts.minMonth,
987
- maxMonth = opts.maxMonth,
988
- html = '',
989
- randId;
990
-
991
- if (this._y <= minYear) {
992
- this._y = minYear;
993
- if (!isNaN(minMonth) && this._m < minMonth) {
994
- this._m = minMonth;
995
- }
996
- }
997
- if (this._y >= maxYear) {
998
- this._y = maxYear;
999
- if (!isNaN(maxMonth) && this._m > maxMonth) {
1000
- this._m = maxMonth;
1001
- }
1002
- }
1003
-
1004
- for (var c = 0; c < opts.numberOfMonths; c++) {
1005
- randId = 'pika-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2);
1006
- html += '<div class="pika-lendar">' + renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId) + '</div>';
1007
- }
1008
-
1009
- this.el.innerHTML = html;
1010
-
1011
- if (opts.bound) {
1012
- if(opts.field.type !== 'hidden') {
1013
- sto(function() {
1014
- opts.trigger.focus();
1015
- }, 1);
1016
- }
1017
- }
1018
-
1019
- if (typeof this._o.onDraw === 'function') {
1020
- this._o.onDraw(this);
1021
- }
1022
-
1023
- if (opts.bound) {
1024
- // let the screen reader user know to use arrow keys
1025
- opts.field.setAttribute('aria-label', 'Use the arrow keys to pick a date');
1026
- }
1027
- },
1028
-
1029
- adjustPosition: function()
1030
- {
1031
- var field, pEl, width, height, viewportWidth, viewportHeight, scrollTop, left, top, clientRect;
1032
-
1033
- if (this._o.container) return;
1034
-
1035
- this.el.style.position = 'absolute';
1036
-
1037
- field = this._o.trigger;
1038
- pEl = field;
1039
- width = this.el.offsetWidth;
1040
- height = this.el.offsetHeight;
1041
- viewportWidth = window.innerWidth || document.documentElement.clientWidth;
1042
- viewportHeight = window.innerHeight || document.documentElement.clientHeight;
1043
- scrollTop = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
1044
-
1045
- if (typeof field.getBoundingClientRect === 'function') {
1046
- clientRect = field.getBoundingClientRect();
1047
- left = clientRect.left + window.pageXOffset;
1048
- top = clientRect.bottom + window.pageYOffset;
1049
- } else {
1050
- left = pEl.offsetLeft;
1051
- top = pEl.offsetTop + pEl.offsetHeight;
1052
- while((pEl = pEl.offsetParent)) {
1053
- left += pEl.offsetLeft;
1054
- top += pEl.offsetTop;
1055
- }
1056
- }
1057
-
1058
- // default position is bottom & left
1059
- if ((this._o.reposition && left + width > viewportWidth) ||
1060
- (
1061
- this._o.position.indexOf('right') > -1 &&
1062
- left - width + field.offsetWidth > 0
1063
- )
1064
- ) {
1065
- left = left - width + field.offsetWidth;
1066
- }
1067
- if ((this._o.reposition && top + height > viewportHeight + scrollTop) ||
1068
- (
1069
- this._o.position.indexOf('top') > -1 &&
1070
- top - height - field.offsetHeight > 0
1071
- )
1072
- ) {
1073
- top = top - height - field.offsetHeight;
1074
- }
1075
-
1076
- this.el.style.left = left + 'px';
1077
- this.el.style.top = top + 'px';
1078
- },
1079
-
1080
- /**
1081
- * render HTML for a particular month
1082
- */
1083
- render: function(year, month, randId)
1084
- {
1085
- var opts = this._o,
1086
- now = new Date(),
1087
- days = getDaysInMonth(year, month),
1088
- before = new Date(year, month, 1).getDay(),
1089
- data = [],
1090
- row = [];
1091
- setToStartOfDay(now);
1092
- if (opts.firstDay > 0) {
1093
- before -= opts.firstDay;
1094
- if (before < 0) {
1095
- before += 7;
1096
- }
1097
- }
1098
- var previousMonth = month === 0 ? 11 : month - 1,
1099
- nextMonth = month === 11 ? 0 : month + 1,
1100
- yearOfPreviousMonth = month === 0 ? year - 1 : year,
1101
- yearOfNextMonth = month === 11 ? year + 1 : year,
1102
- daysInPreviousMonth = getDaysInMonth(yearOfPreviousMonth, previousMonth);
1103
- var cells = days + before,
1104
- after = cells;
1105
- while(after > 7) {
1106
- after -= 7;
1107
- }
1108
- cells += 7 - after;
1109
- var isWeekSelected = false;
1110
- for (var i = 0, r = 0; i < cells; i++)
1111
- {
1112
- var day = new Date(year, month, 1 + (i - before)),
1113
- isSelected = isDate(this._d) ? compareDates(day, this._d) : false,
1114
- isToday = compareDates(day, now),
1115
- hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false,
1116
- isEmpty = i < before || i >= (days + before),
1117
- dayNumber = 1 + (i - before),
1118
- monthNumber = month,
1119
- yearNumber = year,
1120
- isStartRange = opts.startRange && compareDates(opts.startRange, day),
1121
- isEndRange = opts.endRange && compareDates(opts.endRange, day),
1122
- isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange,
1123
- isDisabled = (opts.minDate && day < opts.minDate) ||
1124
- (opts.maxDate && day > opts.maxDate) ||
1125
- (opts.disableWeekends && isWeekend(day)) ||
1126
- (opts.disableDayFn && opts.disableDayFn(day));
1127
-
1128
- if (isEmpty) {
1129
- if (i < before) {
1130
- dayNumber = daysInPreviousMonth + dayNumber;
1131
- monthNumber = previousMonth;
1132
- yearNumber = yearOfPreviousMonth;
1133
- } else {
1134
- dayNumber = dayNumber - days;
1135
- monthNumber = nextMonth;
1136
- yearNumber = yearOfNextMonth;
1137
- }
1138
- }
1139
-
1140
- var dayConfig = {
1141
- day: dayNumber,
1142
- month: monthNumber,
1143
- year: yearNumber,
1144
- hasEvent: hasEvent,
1145
- isSelected: isSelected,
1146
- isToday: isToday,
1147
- isDisabled: isDisabled,
1148
- isEmpty: isEmpty,
1149
- isStartRange: isStartRange,
1150
- isEndRange: isEndRange,
1151
- isInRange: isInRange,
1152
- showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths,
1153
- enableSelectionDaysInNextAndPreviousMonths: opts.enableSelectionDaysInNextAndPreviousMonths
1154
- };
1155
-
1156
- if (opts.pickWholeWeek && isSelected) {
1157
- isWeekSelected = true;
1158
- }
1159
-
1160
- row.push(renderDay(dayConfig));
1161
-
1162
- if (++r === 7) {
1163
- if (opts.showWeekNumber) {
1164
- row.unshift(renderWeek(i - before, month, year));
1165
- }
1166
- data.push(renderRow(row, opts.isRTL, opts.pickWholeWeek, isWeekSelected));
1167
- row = [];
1168
- r = 0;
1169
- isWeekSelected = false;
1170
- }
1171
- }
1172
- return renderTable(opts, data, randId);
1173
- },
1174
-
1175
- isVisible: function()
1176
- {
1177
- return this._v;
1178
- },
1179
-
1180
- show: function()
1181
- {
1182
- if (!this.isVisible()) {
1183
- this._v = true;
1184
- this.draw();
1185
- removeClass(this.el, 'is-hidden');
1186
- if (this._o.bound) {
1187
- addEvent(document, 'click', this._onClick);
1188
- this.adjustPosition();
1189
- }
1190
- if (typeof this._o.onOpen === 'function') {
1191
- this._o.onOpen.call(this);
1192
- }
1193
- }
1194
- },
1195
-
1196
- hide: function()
1197
- {
1198
- var v = this._v;
1199
- if (v !== false) {
1200
- if (this._o.bound) {
1201
- removeEvent(document, 'click', this._onClick);
1202
- }
1203
- this.el.style.position = 'static'; // reset
1204
- this.el.style.left = 'auto';
1205
- this.el.style.top = 'auto';
1206
- addClass(this.el, 'is-hidden');
1207
- this._v = false;
1208
- if (v !== undefined && typeof this._o.onClose === 'function') {
1209
- this._o.onClose.call(this);
1210
- }
1211
- }
1212
- },
1213
-
1214
- /**
1215
- * GAME OVER
1216
- */
1217
- destroy: function()
1218
- {
1219
- var opts = this._o;
1220
-
1221
- this.hide();
1222
- removeEvent(this.el, 'mousedown', this._onMouseDown, true);
1223
- removeEvent(this.el, 'touchend', this._onMouseDown, true);
1224
- removeEvent(this.el, 'change', this._onChange);
1225
- if (opts.keyboardInput) {
1226
- removeEvent(document, 'keydown', this._onKeyChange);
1227
- }
1228
- if (opts.field) {
1229
- removeEvent(opts.field, 'change', this._onInputChange);
1230
- if (opts.bound) {
1231
- removeEvent(opts.trigger, 'click', this._onInputClick);
1232
- removeEvent(opts.trigger, 'focus', this._onInputFocus);
1233
- removeEvent(opts.trigger, 'blur', this._onInputBlur);
1234
- }
1235
- }
1236
- if (this.el.parentNode) {
1237
- this.el.parentNode.removeChild(this.el);
1238
- }
1239
- }
1240
-
1241
- };
1242
-
1243
- return Pikaday;
1244
- }));
1245
- } (pikaday$1));
1246
- return pikaday$1.exports;
1247
- }
1248
-
1249
- var pikadayExports = /*@__PURE__*/ requirePikaday();
1250
- var Pikaday = /*@__PURE__*/getDefaultExportFromCjs(pikadayExports);
1251
-
1252
- export { Pikaday as P };