q2-tecton-elements 1.21.2 → 1.22.0
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/dist/cjs/installCanvasRenderer-b4d10c92.js +38433 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-badge_2.cjs.entry.js +5 -3
- package/dist/cjs/q2-calendar.cjs.entry.js +75 -55
- package/dist/cjs/q2-carousel.cjs.entry.js +3 -3
- package/dist/cjs/q2-chart-bar.cjs.entry.js +4679 -0
- package/dist/cjs/q2-chart-donut.cjs.entry.js +357 -35592
- package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/q2-calendar/index.js +43 -2
- package/dist/collection/components/q2-chart-bar/index.js +466 -0
- package/dist/collection/components/q2-chart-bar/styles.css +85 -0
- package/dist/collection/components/q2-chart-donut/index.js +3 -3
- package/dist/collection/components/q2-checkbox/styles.css +5 -1
- package/dist/collection/components/q2-editable-field/styles.css +1 -1
- package/dist/collection/components/q2-input/formatting/phone.js +2 -2
- package/dist/collection/components/q2-input/index.js +21 -0
- package/dist/collection/components/q2-input/styles.css +2 -2
- package/dist/collection/components/q2-radio/styles.css +1 -1
- package/dist/collection/utils/charting.js +182 -0
- package/dist/components/click-elsewhere.d.ts +11 -0
- package/dist/components/click-elsewhere.js +6 -0
- package/dist/components/index.d.ts +62 -0
- package/dist/components/index.js +42 -0
- package/dist/components/index10.js +84 -0
- package/dist/components/index11.js +383 -0
- package/dist/components/index12.js +125 -0
- package/dist/components/index13.js +602 -0
- package/dist/components/index2.js +100 -0
- package/dist/components/index3.js +90 -0
- package/dist/components/index4.js +62 -0
- package/dist/components/index5.js +146 -0
- package/dist/components/index6.js +145 -0
- package/dist/components/index7.js +2960 -0
- package/dist/components/index8.js +3356 -0
- package/dist/components/index9.js +101 -0
- package/dist/components/installCanvasRenderer.js +38282 -0
- package/dist/components/q2-avatar.d.ts +11 -0
- package/dist/components/q2-avatar.js +6 -0
- package/dist/components/q2-badge.d.ts +11 -0
- package/dist/components/q2-badge.js +6 -0
- package/dist/components/q2-btn.d.ts +11 -0
- package/dist/components/q2-btn.js +6 -0
- package/dist/components/q2-calendar.d.ts +11 -0
- package/dist/components/q2-calendar.js +3755 -0
- package/dist/components/q2-card.d.ts +11 -0
- package/dist/components/q2-card.js +187 -0
- package/dist/components/q2-carousel-pane.d.ts +11 -0
- package/dist/components/q2-carousel-pane.js +97 -0
- package/dist/components/q2-carousel.d.ts +11 -0
- package/dist/components/q2-carousel.js +5379 -0
- package/dist/components/q2-chart-bar.d.ts +11 -0
- package/dist/components/q2-chart-bar.js +4710 -0
- package/dist/components/q2-chart-donut.d.ts +11 -0
- package/dist/components/q2-chart-donut.js +4887 -0
- package/dist/components/q2-checkbox-group.d.ts +11 -0
- package/dist/components/q2-checkbox-group.js +114 -0
- package/dist/components/q2-checkbox.d.ts +11 -0
- package/dist/components/q2-checkbox.js +138 -0
- package/dist/components/q2-dropdown-item.d.ts +11 -0
- package/dist/components/q2-dropdown-item.js +6 -0
- package/dist/components/q2-dropdown.d.ts +11 -0
- package/dist/components/q2-dropdown.js +345 -0
- package/dist/components/q2-editable-field.d.ts +11 -0
- package/dist/components/q2-editable-field.js +220 -0
- package/dist/components/q2-icon.d.ts +11 -0
- package/dist/components/q2-icon.js +6 -0
- package/dist/components/q2-input.d.ts +11 -0
- package/dist/components/q2-input.js +6 -0
- package/dist/components/q2-loading-element.d.ts +11 -0
- package/dist/components/q2-loading-element.js +52 -0
- package/dist/components/q2-loading.d.ts +11 -0
- package/dist/components/q2-loading.js +6 -0
- package/dist/components/q2-loc.d.ts +11 -0
- package/dist/components/q2-loc.js +40 -0
- package/dist/components/q2-message.d.ts +11 -0
- package/dist/components/q2-message.js +6 -0
- package/dist/components/q2-month-picker.d.ts +11 -0
- package/dist/components/q2-month-picker.js +189 -0
- package/dist/components/q2-optgroup.d.ts +11 -0
- package/dist/components/q2-optgroup.js +75 -0
- package/dist/components/q2-option-list.d.ts +11 -0
- package/dist/components/q2-option-list.js +6 -0
- package/dist/components/q2-option.d.ts +11 -0
- package/dist/components/q2-option.js +81 -0
- package/dist/components/q2-pagination.d.ts +11 -0
- package/dist/components/q2-pagination.js +184 -0
- package/dist/components/q2-pill.d.ts +11 -0
- package/dist/components/q2-pill.js +216 -0
- package/dist/components/q2-popover.d.ts +11 -0
- package/dist/components/q2-popover.js +6 -0
- package/dist/components/q2-radio-group.d.ts +11 -0
- package/dist/components/q2-radio-group.js +191 -0
- package/dist/components/q2-radio.d.ts +11 -0
- package/dist/components/q2-radio.js +105 -0
- package/dist/components/q2-section.d.ts +11 -0
- package/dist/components/q2-section.js +218 -0
- package/dist/components/q2-select.d.ts +11 -0
- package/dist/components/q2-select.js +817 -0
- package/dist/components/q2-stepper-pane.d.ts +11 -0
- package/dist/components/q2-stepper-pane.js +92 -0
- package/dist/components/q2-stepper-vertical.d.ts +11 -0
- package/dist/components/q2-stepper-vertical.js +311 -0
- package/dist/components/q2-stepper.d.ts +11 -0
- package/dist/components/q2-stepper.js +252 -0
- package/dist/components/q2-tab-container.d.ts +11 -0
- package/dist/components/q2-tab-container.js +288 -0
- package/dist/components/q2-tab-pane.d.ts +11 -0
- package/dist/components/q2-tab-pane.js +58 -0
- package/dist/components/q2-tag.d.ts +11 -0
- package/dist/components/q2-tag.js +156 -0
- package/dist/components/q2-textarea.d.ts +11 -0
- package/dist/components/q2-textarea.js +265 -0
- package/dist/components/q2-tooltip.d.ts +11 -0
- package/dist/components/q2-tooltip.js +112 -0
- package/dist/components/shapes.js +91 -0
- package/dist/components/tecton-tab-pane.d.ts +11 -0
- package/dist/components/tecton-tab-pane.js +111 -0
- package/dist/esm/installCanvasRenderer-0143b52d.js +38282 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-badge_2.entry.js +5 -3
- package/dist/esm/q2-calendar.entry.js +75 -55
- package/dist/esm/q2-carousel.entry.js +3 -3
- package/dist/esm/q2-chart-bar.entry.js +4675 -0
- package/dist/esm/q2-chart-donut.entry.js +171 -35406
- package/dist/esm/q2-checkbox.entry.js +1 -1
- package/dist/esm/q2-editable-field.entry.js +1 -1
- package/dist/esm/q2-radio.entry.js +1 -1
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/q2-tecton-elements/p-1f85cced.js +39 -0
- package/dist/q2-tecton-elements/{p-89608314.entry.js → p-4625184b.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-9772b15f.entry.js → p-520c40f6.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-6b52a262.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c4640b55.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-7e8f43d1.entry.js → p-cf41970f.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-e4dc9ac0.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f35bf6a3.entry.js +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/types/components/q2-calendar/index.d.ts +3 -0
- package/dist/types/components/q2-chart-bar/index.d.ts +40 -0
- package/dist/types/components/q2-chart-donut/index.d.ts +7 -10
- package/dist/types/components/q2-input/index.d.ts +1 -0
- package/dist/types/components.d.ts +50 -3
- package/dist/types/utils/charting.d.ts +14 -0
- package/package.json +5 -2
- package/dist/q2-tecton-elements/p-0766a694.entry.js +0 -1
- package/dist/q2-tecton-elements/p-5f064e1e.entry.js +0 -39
- package/dist/q2-tecton-elements/p-8d25ec52.entry.js +0 -1
- /package/dist/types/workspace/workspace/{tecton-production_release_1.21.x → Tecton_tecton-production_master}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
|
@@ -25,6 +25,7 @@ function requiredArgs(required, args) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
|
|
28
29
|
/**
|
|
29
30
|
* @name toDate
|
|
30
31
|
* @category Common Helpers
|
|
@@ -60,7 +61,7 @@ function toDate(argument) {
|
|
|
60
61
|
requiredArgs(1, arguments);
|
|
61
62
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
62
63
|
|
|
63
|
-
if (argument instanceof Date ||
|
|
64
|
+
if (argument instanceof Date || _typeof$1(argument) === 'object' && argStr === '[object Date]') {
|
|
64
65
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
65
66
|
return new Date(argument.getTime());
|
|
66
67
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -224,6 +225,7 @@ function isSameDay(dirtyDateLeft, dirtyDateRight) {
|
|
|
224
225
|
return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();
|
|
225
226
|
}
|
|
226
227
|
|
|
228
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
227
229
|
/**
|
|
228
230
|
* @name isDate
|
|
229
231
|
* @category Common Helpers
|
|
@@ -259,7 +261,7 @@ function isSameDay(dirtyDateLeft, dirtyDateRight) {
|
|
|
259
261
|
|
|
260
262
|
function isDate(value) {
|
|
261
263
|
requiredArgs(1, arguments);
|
|
262
|
-
return value instanceof Date ||
|
|
264
|
+
return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
263
265
|
}
|
|
264
266
|
|
|
265
267
|
/**
|
|
@@ -497,7 +499,7 @@ function addLeadingZeros(number, targetLength) {
|
|
|
497
499
|
|
|
498
500
|
var formatters$1 = {
|
|
499
501
|
// Year
|
|
500
|
-
y: function (date, token) {
|
|
502
|
+
y: function y(date, token) {
|
|
501
503
|
// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
|
|
502
504
|
// | Year | y | yy | yyy | yyyy | yyyyy |
|
|
503
505
|
// |----------|-------|----|-------|-------|-------|
|
|
@@ -512,16 +514,16 @@ var formatters$1 = {
|
|
|
512
514
|
return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
|
|
513
515
|
},
|
|
514
516
|
// Month
|
|
515
|
-
M: function (date, token) {
|
|
517
|
+
M: function M(date, token) {
|
|
516
518
|
var month = date.getUTCMonth();
|
|
517
519
|
return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
518
520
|
},
|
|
519
521
|
// Day of the month
|
|
520
|
-
d: function (date, token) {
|
|
522
|
+
d: function d(date, token) {
|
|
521
523
|
return addLeadingZeros(date.getUTCDate(), token.length);
|
|
522
524
|
},
|
|
523
525
|
// AM or PM
|
|
524
|
-
a: function (date, token) {
|
|
526
|
+
a: function a(date, token) {
|
|
525
527
|
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
|
|
526
528
|
|
|
527
529
|
switch (token) {
|
|
@@ -541,23 +543,23 @@ var formatters$1 = {
|
|
|
541
543
|
}
|
|
542
544
|
},
|
|
543
545
|
// Hour [1-12]
|
|
544
|
-
h: function (date, token) {
|
|
546
|
+
h: function h(date, token) {
|
|
545
547
|
return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
|
|
546
548
|
},
|
|
547
549
|
// Hour [0-23]
|
|
548
|
-
H: function (date, token) {
|
|
550
|
+
H: function H(date, token) {
|
|
549
551
|
return addLeadingZeros(date.getUTCHours(), token.length);
|
|
550
552
|
},
|
|
551
553
|
// Minute
|
|
552
|
-
m: function (date, token) {
|
|
554
|
+
m: function m(date, token) {
|
|
553
555
|
return addLeadingZeros(date.getUTCMinutes(), token.length);
|
|
554
556
|
},
|
|
555
557
|
// Second
|
|
556
|
-
s: function (date, token) {
|
|
558
|
+
s: function s(date, token) {
|
|
557
559
|
return addLeadingZeros(date.getUTCSeconds(), token.length);
|
|
558
560
|
},
|
|
559
561
|
// Fraction of second
|
|
560
|
-
S: function (date, token) {
|
|
562
|
+
S: function S(date, token) {
|
|
561
563
|
var numberOfDigits = token.length;
|
|
562
564
|
var milliseconds = date.getUTCMilliseconds();
|
|
563
565
|
var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
|
|
@@ -623,7 +625,7 @@ var dayPeriodEnum = {
|
|
|
623
625
|
*/
|
|
624
626
|
var formatters = {
|
|
625
627
|
// Era
|
|
626
|
-
G: function (date, token, localize) {
|
|
628
|
+
G: function G(date, token, localize) {
|
|
627
629
|
var era = date.getUTCFullYear() > 0 ? 1 : 0;
|
|
628
630
|
|
|
629
631
|
switch (token) {
|
|
@@ -650,7 +652,7 @@ var formatters = {
|
|
|
650
652
|
}
|
|
651
653
|
},
|
|
652
654
|
// Year
|
|
653
|
-
y: function (date, token, localize) {
|
|
655
|
+
y: function y(date, token, localize) {
|
|
654
656
|
// Ordinal number
|
|
655
657
|
if (token === 'yo') {
|
|
656
658
|
var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
@@ -664,7 +666,7 @@ var formatters = {
|
|
|
664
666
|
return formatters$1.y(date, token);
|
|
665
667
|
},
|
|
666
668
|
// Local week-numbering year
|
|
667
|
-
Y: function (date, token, localize, options) {
|
|
669
|
+
Y: function Y(date, token, localize, options) {
|
|
668
670
|
var signedWeekYear = getUTCWeekYear(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
669
671
|
|
|
670
672
|
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year
|
|
@@ -685,7 +687,7 @@ var formatters = {
|
|
|
685
687
|
return addLeadingZeros(weekYear, token.length);
|
|
686
688
|
},
|
|
687
689
|
// ISO week-numbering year
|
|
688
|
-
R: function (date, token) {
|
|
690
|
+
R: function R(date, token) {
|
|
689
691
|
var isoWeekYear = getUTCISOWeekYear(date); // Padding
|
|
690
692
|
|
|
691
693
|
return addLeadingZeros(isoWeekYear, token.length);
|
|
@@ -699,12 +701,12 @@ var formatters = {
|
|
|
699
701
|
// | BC 2 | 2 | -1 |
|
|
700
702
|
// Also `yy` always returns the last two digits of a year,
|
|
701
703
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
702
|
-
u: function (date, token) {
|
|
704
|
+
u: function u(date, token) {
|
|
703
705
|
var year = date.getUTCFullYear();
|
|
704
706
|
return addLeadingZeros(year, token.length);
|
|
705
707
|
},
|
|
706
708
|
// Quarter
|
|
707
|
-
Q: function (date, token, localize) {
|
|
709
|
+
Q: function Q(date, token, localize) {
|
|
708
710
|
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
709
711
|
|
|
710
712
|
switch (token) {
|
|
@@ -746,7 +748,7 @@ var formatters = {
|
|
|
746
748
|
}
|
|
747
749
|
},
|
|
748
750
|
// Stand-alone quarter
|
|
749
|
-
q: function (date, token, localize) {
|
|
751
|
+
q: function q(date, token, localize) {
|
|
750
752
|
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
751
753
|
|
|
752
754
|
switch (token) {
|
|
@@ -788,7 +790,7 @@ var formatters = {
|
|
|
788
790
|
}
|
|
789
791
|
},
|
|
790
792
|
// Month
|
|
791
|
-
M: function (date, token, localize) {
|
|
793
|
+
M: function M(date, token, localize) {
|
|
792
794
|
var month = date.getUTCMonth();
|
|
793
795
|
|
|
794
796
|
switch (token) {
|
|
@@ -826,7 +828,7 @@ var formatters = {
|
|
|
826
828
|
}
|
|
827
829
|
},
|
|
828
830
|
// Stand-alone month
|
|
829
|
-
L: function (date, token, localize) {
|
|
831
|
+
L: function L(date, token, localize) {
|
|
830
832
|
var month = date.getUTCMonth();
|
|
831
833
|
|
|
832
834
|
switch (token) {
|
|
@@ -868,7 +870,7 @@ var formatters = {
|
|
|
868
870
|
}
|
|
869
871
|
},
|
|
870
872
|
// Local week of year
|
|
871
|
-
w: function (date, token, localize, options) {
|
|
873
|
+
w: function w(date, token, localize, options) {
|
|
872
874
|
var week = getUTCWeek(date, options);
|
|
873
875
|
|
|
874
876
|
if (token === 'wo') {
|
|
@@ -880,7 +882,7 @@ var formatters = {
|
|
|
880
882
|
return addLeadingZeros(week, token.length);
|
|
881
883
|
},
|
|
882
884
|
// ISO week of year
|
|
883
|
-
I: function (date, token, localize) {
|
|
885
|
+
I: function I(date, token, localize) {
|
|
884
886
|
var isoWeek = getUTCISOWeek(date);
|
|
885
887
|
|
|
886
888
|
if (token === 'Io') {
|
|
@@ -892,7 +894,7 @@ var formatters = {
|
|
|
892
894
|
return addLeadingZeros(isoWeek, token.length);
|
|
893
895
|
},
|
|
894
896
|
// Day of the month
|
|
895
|
-
d: function (date, token, localize) {
|
|
897
|
+
d: function d(date, token, localize) {
|
|
896
898
|
if (token === 'do') {
|
|
897
899
|
return localize.ordinalNumber(date.getUTCDate(), {
|
|
898
900
|
unit: 'date'
|
|
@@ -902,7 +904,7 @@ var formatters = {
|
|
|
902
904
|
return formatters$1.d(date, token);
|
|
903
905
|
},
|
|
904
906
|
// Day of year
|
|
905
|
-
D: function (date, token, localize) {
|
|
907
|
+
D: function D(date, token, localize) {
|
|
906
908
|
var dayOfYear = getUTCDayOfYear(date);
|
|
907
909
|
|
|
908
910
|
if (token === 'Do') {
|
|
@@ -914,7 +916,7 @@ var formatters = {
|
|
|
914
916
|
return addLeadingZeros(dayOfYear, token.length);
|
|
915
917
|
},
|
|
916
918
|
// Day of week
|
|
917
|
-
E: function (date, token, localize) {
|
|
919
|
+
E: function E(date, token, localize) {
|
|
918
920
|
var dayOfWeek = date.getUTCDay();
|
|
919
921
|
|
|
920
922
|
switch (token) {
|
|
@@ -951,7 +953,7 @@ var formatters = {
|
|
|
951
953
|
}
|
|
952
954
|
},
|
|
953
955
|
// Local day of week
|
|
954
|
-
e: function (date, token, localize, options) {
|
|
956
|
+
e: function e(date, token, localize, options) {
|
|
955
957
|
var dayOfWeek = date.getUTCDay();
|
|
956
958
|
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
957
959
|
|
|
@@ -1000,7 +1002,7 @@ var formatters = {
|
|
|
1000
1002
|
}
|
|
1001
1003
|
},
|
|
1002
1004
|
// Stand-alone local day of week
|
|
1003
|
-
c: function (date, token, localize, options) {
|
|
1005
|
+
c: function c(date, token, localize, options) {
|
|
1004
1006
|
var dayOfWeek = date.getUTCDay();
|
|
1005
1007
|
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
1006
1008
|
|
|
@@ -1049,7 +1051,7 @@ var formatters = {
|
|
|
1049
1051
|
}
|
|
1050
1052
|
},
|
|
1051
1053
|
// ISO day of week
|
|
1052
|
-
i: function (date, token, localize) {
|
|
1054
|
+
i: function i(date, token, localize) {
|
|
1053
1055
|
var dayOfWeek = date.getUTCDay();
|
|
1054
1056
|
var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
1055
1057
|
|
|
@@ -1099,7 +1101,7 @@ var formatters = {
|
|
|
1099
1101
|
}
|
|
1100
1102
|
},
|
|
1101
1103
|
// AM or PM
|
|
1102
|
-
a: function (date, token, localize) {
|
|
1104
|
+
a: function a(date, token, localize) {
|
|
1103
1105
|
var hours = date.getUTCHours();
|
|
1104
1106
|
var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
|
|
1105
1107
|
|
|
@@ -1132,7 +1134,7 @@ var formatters = {
|
|
|
1132
1134
|
}
|
|
1133
1135
|
},
|
|
1134
1136
|
// AM, PM, midnight, noon
|
|
1135
|
-
b: function (date, token, localize) {
|
|
1137
|
+
b: function b(date, token, localize) {
|
|
1136
1138
|
var hours = date.getUTCHours();
|
|
1137
1139
|
var dayPeriodEnumValue;
|
|
1138
1140
|
|
|
@@ -1173,7 +1175,7 @@ var formatters = {
|
|
|
1173
1175
|
}
|
|
1174
1176
|
},
|
|
1175
1177
|
// in the morning, in the afternoon, in the evening, at night
|
|
1176
|
-
B: function (date, token, localize) {
|
|
1178
|
+
B: function B(date, token, localize) {
|
|
1177
1179
|
var hours = date.getUTCHours();
|
|
1178
1180
|
var dayPeriodEnumValue;
|
|
1179
1181
|
|
|
@@ -1211,7 +1213,7 @@ var formatters = {
|
|
|
1211
1213
|
}
|
|
1212
1214
|
},
|
|
1213
1215
|
// Hour [1-12]
|
|
1214
|
-
h: function (date, token, localize) {
|
|
1216
|
+
h: function h(date, token, localize) {
|
|
1215
1217
|
if (token === 'ho') {
|
|
1216
1218
|
var hours = date.getUTCHours() % 12;
|
|
1217
1219
|
if (hours === 0) hours = 12;
|
|
@@ -1223,7 +1225,7 @@ var formatters = {
|
|
|
1223
1225
|
return formatters$1.h(date, token);
|
|
1224
1226
|
},
|
|
1225
1227
|
// Hour [0-23]
|
|
1226
|
-
H: function (date, token, localize) {
|
|
1228
|
+
H: function H(date, token, localize) {
|
|
1227
1229
|
if (token === 'Ho') {
|
|
1228
1230
|
return localize.ordinalNumber(date.getUTCHours(), {
|
|
1229
1231
|
unit: 'hour'
|
|
@@ -1233,7 +1235,7 @@ var formatters = {
|
|
|
1233
1235
|
return formatters$1.H(date, token);
|
|
1234
1236
|
},
|
|
1235
1237
|
// Hour [0-11]
|
|
1236
|
-
K: function (date, token, localize) {
|
|
1238
|
+
K: function K(date, token, localize) {
|
|
1237
1239
|
var hours = date.getUTCHours() % 12;
|
|
1238
1240
|
|
|
1239
1241
|
if (token === 'Ko') {
|
|
@@ -1245,7 +1247,7 @@ var formatters = {
|
|
|
1245
1247
|
return addLeadingZeros(hours, token.length);
|
|
1246
1248
|
},
|
|
1247
1249
|
// Hour [1-24]
|
|
1248
|
-
k: function (date, token, localize) {
|
|
1250
|
+
k: function k(date, token, localize) {
|
|
1249
1251
|
var hours = date.getUTCHours();
|
|
1250
1252
|
if (hours === 0) hours = 24;
|
|
1251
1253
|
|
|
@@ -1258,7 +1260,7 @@ var formatters = {
|
|
|
1258
1260
|
return addLeadingZeros(hours, token.length);
|
|
1259
1261
|
},
|
|
1260
1262
|
// Minute
|
|
1261
|
-
m: function (date, token, localize) {
|
|
1263
|
+
m: function m(date, token, localize) {
|
|
1262
1264
|
if (token === 'mo') {
|
|
1263
1265
|
return localize.ordinalNumber(date.getUTCMinutes(), {
|
|
1264
1266
|
unit: 'minute'
|
|
@@ -1268,7 +1270,7 @@ var formatters = {
|
|
|
1268
1270
|
return formatters$1.m(date, token);
|
|
1269
1271
|
},
|
|
1270
1272
|
// Second
|
|
1271
|
-
s: function (date, token, localize) {
|
|
1273
|
+
s: function s(date, token, localize) {
|
|
1272
1274
|
if (token === 'so') {
|
|
1273
1275
|
return localize.ordinalNumber(date.getUTCSeconds(), {
|
|
1274
1276
|
unit: 'second'
|
|
@@ -1278,11 +1280,11 @@ var formatters = {
|
|
|
1278
1280
|
return formatters$1.s(date, token);
|
|
1279
1281
|
},
|
|
1280
1282
|
// Fraction of second
|
|
1281
|
-
S: function (date, token) {
|
|
1283
|
+
S: function S(date, token) {
|
|
1282
1284
|
return formatters$1.S(date, token);
|
|
1283
1285
|
},
|
|
1284
1286
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1285
|
-
X: function (date, token, _localize, options) {
|
|
1287
|
+
X: function X(date, token, _localize, options) {
|
|
1286
1288
|
var originalDate = options._originalDate || date;
|
|
1287
1289
|
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
1288
1290
|
|
|
@@ -1314,7 +1316,7 @@ var formatters = {
|
|
|
1314
1316
|
}
|
|
1315
1317
|
},
|
|
1316
1318
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
1317
|
-
x: function (date, token, _localize, options) {
|
|
1319
|
+
x: function x(date, token, _localize, options) {
|
|
1318
1320
|
var originalDate = options._originalDate || date;
|
|
1319
1321
|
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
1320
1322
|
|
|
@@ -1342,7 +1344,7 @@ var formatters = {
|
|
|
1342
1344
|
}
|
|
1343
1345
|
},
|
|
1344
1346
|
// Timezone (GMT)
|
|
1345
|
-
O: function (date, token, _localize, options) {
|
|
1347
|
+
O: function O(date, token, _localize, options) {
|
|
1346
1348
|
var originalDate = options._originalDate || date;
|
|
1347
1349
|
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
1348
1350
|
|
|
@@ -1360,7 +1362,7 @@ var formatters = {
|
|
|
1360
1362
|
}
|
|
1361
1363
|
},
|
|
1362
1364
|
// Timezone (specific non-location)
|
|
1363
|
-
z: function (date, token, _localize, options) {
|
|
1365
|
+
z: function z(date, token, _localize, options) {
|
|
1364
1366
|
var originalDate = options._originalDate || date;
|
|
1365
1367
|
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
1366
1368
|
|
|
@@ -1378,13 +1380,13 @@ var formatters = {
|
|
|
1378
1380
|
}
|
|
1379
1381
|
},
|
|
1380
1382
|
// Seconds timestamp
|
|
1381
|
-
t: function (date, token, _localize, options) {
|
|
1383
|
+
t: function t(date, token, _localize, options) {
|
|
1382
1384
|
var originalDate = options._originalDate || date;
|
|
1383
1385
|
var timestamp = Math.floor(originalDate.getTime() / 1000);
|
|
1384
1386
|
return addLeadingZeros(timestamp, token.length);
|
|
1385
1387
|
},
|
|
1386
1388
|
// Milliseconds timestamp
|
|
1387
|
-
T: function (date, token, _localize, options) {
|
|
1389
|
+
T: function T(date, token, _localize, options) {
|
|
1388
1390
|
var originalDate = options._originalDate || date;
|
|
1389
1391
|
var timestamp = originalDate.getTime();
|
|
1390
1392
|
return addLeadingZeros(timestamp, token.length);
|
|
@@ -1423,7 +1425,7 @@ function formatTimezone(offset, dirtyDelimiter) {
|
|
|
1423
1425
|
return sign + hours + delimiter + minutes;
|
|
1424
1426
|
}
|
|
1425
1427
|
|
|
1426
|
-
var dateLongFormatter = function (pattern, formatLong) {
|
|
1428
|
+
var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
|
|
1427
1429
|
switch (pattern) {
|
|
1428
1430
|
case 'P':
|
|
1429
1431
|
return formatLong.date({
|
|
@@ -1448,7 +1450,7 @@ var dateLongFormatter = function (pattern, formatLong) {
|
|
|
1448
1450
|
}
|
|
1449
1451
|
};
|
|
1450
1452
|
|
|
1451
|
-
var timeLongFormatter = function (pattern, formatLong) {
|
|
1453
|
+
var timeLongFormatter = function timeLongFormatter(pattern, formatLong) {
|
|
1452
1454
|
switch (pattern) {
|
|
1453
1455
|
case 'p':
|
|
1454
1456
|
return formatLong.time({
|
|
@@ -1473,7 +1475,7 @@ var timeLongFormatter = function (pattern, formatLong) {
|
|
|
1473
1475
|
}
|
|
1474
1476
|
};
|
|
1475
1477
|
|
|
1476
|
-
var dateTimeLongFormatter = function (pattern, formatLong) {
|
|
1478
|
+
var dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {
|
|
1477
1479
|
var matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
1478
1480
|
var datePattern = matchResult[1];
|
|
1479
1481
|
var timePattern = matchResult[2];
|
|
@@ -1603,7 +1605,7 @@ var formatDistanceLocale = {
|
|
|
1603
1605
|
}
|
|
1604
1606
|
};
|
|
1605
1607
|
|
|
1606
|
-
var formatDistance = function (token, count, options) {
|
|
1608
|
+
var formatDistance = function formatDistance(token, count, options) {
|
|
1607
1609
|
var result;
|
|
1608
1610
|
var tokenValue = formatDistanceLocale[token];
|
|
1609
1611
|
|
|
@@ -1678,7 +1680,7 @@ var formatRelativeLocale = {
|
|
|
1678
1680
|
other: 'P'
|
|
1679
1681
|
};
|
|
1680
1682
|
|
|
1681
|
-
var formatRelative = function (token, _date, _baseDate, _options) {
|
|
1683
|
+
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
|
|
1682
1684
|
return formatRelativeLocale[token];
|
|
1683
1685
|
};
|
|
1684
1686
|
|
|
@@ -1795,7 +1797,7 @@ var formattingDayPeriodValues = {
|
|
|
1795
1797
|
}
|
|
1796
1798
|
};
|
|
1797
1799
|
|
|
1798
|
-
var ordinalNumber = function (dirtyNumber, _options) {
|
|
1800
|
+
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
|
|
1799
1801
|
var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,
|
|
1800
1802
|
// if they are different for different grammatical genders,
|
|
1801
1803
|
// use `options.unit`.
|
|
@@ -1830,7 +1832,7 @@ var localize = {
|
|
|
1830
1832
|
quarter: buildLocalizeFn({
|
|
1831
1833
|
values: quarterValues,
|
|
1832
1834
|
defaultWidth: 'wide',
|
|
1833
|
-
argumentCallback: function (quarter) {
|
|
1835
|
+
argumentCallback: function argumentCallback(quarter) {
|
|
1834
1836
|
return quarter - 1;
|
|
1835
1837
|
}
|
|
1836
1838
|
}),
|
|
@@ -1974,7 +1976,7 @@ var match = {
|
|
|
1974
1976
|
ordinalNumber: buildMatchPatternFn({
|
|
1975
1977
|
matchPattern: matchOrdinalNumberPattern,
|
|
1976
1978
|
parsePattern: parseOrdinalNumberPattern,
|
|
1977
|
-
valueCallback: function (value) {
|
|
1979
|
+
valueCallback: function valueCallback(value) {
|
|
1978
1980
|
return parseInt(value, 10);
|
|
1979
1981
|
}
|
|
1980
1982
|
}),
|
|
@@ -1989,7 +1991,7 @@ var match = {
|
|
|
1989
1991
|
defaultMatchWidth: 'wide',
|
|
1990
1992
|
parsePatterns: parseQuarterPatterns,
|
|
1991
1993
|
defaultParseWidth: 'any',
|
|
1992
|
-
valueCallback: function (index) {
|
|
1994
|
+
valueCallback: function valueCallback(index) {
|
|
1993
1995
|
return index + 1;
|
|
1994
1996
|
}
|
|
1995
1997
|
}),
|
|
@@ -3172,7 +3174,11 @@ const Q2Calendar = class {
|
|
|
3172
3174
|
const validDays = getValidDaysOfWeek(this.daysOfWeekChecksum);
|
|
3173
3175
|
const { typedValue } = this;
|
|
3174
3176
|
const { isValid: isValid$1, inputDate, isAvailable } = validateInput(this.typedValue, validDays, this.validDates, this.invalidDates, this.startDate, this.endDate, this.defaultFormatString, this.assume);
|
|
3175
|
-
if (
|
|
3177
|
+
if (!typedValue && (inputDate === null || inputDate === void 0 ? void 0 : inputDate.toString()) === 'Invalid Date') {
|
|
3178
|
+
// initial/clear state
|
|
3179
|
+
this.setHints({ isValid: true, message: this.defaultHintMessage, messageType: 'info' });
|
|
3180
|
+
}
|
|
3181
|
+
else if (isValid$1 ||
|
|
3176
3182
|
(typedValue &&
|
|
3177
3183
|
typedValue.length > 4 && // at least mm/dd provided
|
|
3178
3184
|
inputDate &&
|
|
@@ -3310,6 +3316,7 @@ const Q2Calendar = class {
|
|
|
3310
3316
|
this.readonly = undefined;
|
|
3311
3317
|
this.invalid = undefined;
|
|
3312
3318
|
this.typeable = undefined;
|
|
3319
|
+
this.clearable = undefined;
|
|
3313
3320
|
this.placeholder = undefined;
|
|
3314
3321
|
this.buttonLabel = undefined;
|
|
3315
3322
|
this.disabledMsg = undefined;
|
|
@@ -3356,6 +3363,14 @@ const Q2Calendar = class {
|
|
|
3356
3363
|
componentDidLoad() {
|
|
3357
3364
|
index.overrideFocus(this.hostElement);
|
|
3358
3365
|
}
|
|
3366
|
+
get canClear() {
|
|
3367
|
+
if (this.isTypeable) {
|
|
3368
|
+
return this.clearable && !!this.typedValue;
|
|
3369
|
+
}
|
|
3370
|
+
else {
|
|
3371
|
+
return this.clearable && !!this.value;
|
|
3372
|
+
}
|
|
3373
|
+
}
|
|
3359
3374
|
get currentWeeks() {
|
|
3360
3375
|
const weeks = this.dateList.reduce((accum, item, index) => {
|
|
3361
3376
|
const chunkIndex = Math.floor(index / 7);
|
|
@@ -3459,6 +3474,11 @@ const Q2Calendar = class {
|
|
|
3459
3474
|
return;
|
|
3460
3475
|
this.inputField.shadowRoot.querySelector('.input-field').focus();
|
|
3461
3476
|
}
|
|
3477
|
+
handleClear() {
|
|
3478
|
+
this.value = null;
|
|
3479
|
+
this.typedValue = '';
|
|
3480
|
+
this.setHints({ isValid: true, message: this.defaultHintMessage, messageType: 'info' });
|
|
3481
|
+
}
|
|
3462
3482
|
//////// Observers //////////
|
|
3463
3483
|
ariaLabelObserver() {
|
|
3464
3484
|
index.handleAriaLabel(this);
|
|
@@ -3610,7 +3630,7 @@ const Q2Calendar = class {
|
|
|
3610
3630
|
});
|
|
3611
3631
|
}
|
|
3612
3632
|
calendarField() {
|
|
3613
|
-
return (index$1.h("q2-input", { ref: el => (this.inputField = el), class: "calendar-input-field", value: this.formattedValue, label: index.loc(this.label), hideLabel: this.hideLabel, disabled: !!this.disabled, readonly: !!this.readonly, placeholder: this.computedPlaceholder, optional: !!this.optional, ariaExpanded: `${!!this.dropdownOpen}`, errors: (this.localizedErrors.length > 0 && this.localizedErrors) ||
|
|
3633
|
+
return (index$1.h("q2-input", { ref: el => (this.inputField = el), class: "calendar-input-field", value: this.formattedValue, label: index.loc(this.label), hideLabel: this.hideLabel, disabled: !!this.disabled, readonly: !!this.readonly, clearable: this.canClear, placeholder: this.computedPlaceholder, optional: !!this.optional, ariaExpanded: `${!!this.dropdownOpen}`, errors: (this.localizedErrors.length > 0 && this.localizedErrors) ||
|
|
3614
3634
|
(this.invalid && ['tecton.element.calendar.invalid']) ||
|
|
3615
3635
|
[], onClick: this.onInputClick, onChange: this.onInputChange, onInput: this.onInputInput, onKeyDown: this.onInputKeydown, onKeyUp: this.onInputKeyup, onBlur: this.onInputBlur, "icon-right": "calendar", "format-modifier": this.isTypeable ? this.formatModifier : '', pseudo: !this.isTypeable, type: "date", "hide-messages": true, "test-id": "inputAndCalendarToggle" }));
|
|
3616
3636
|
}
|
|
@@ -153,15 +153,15 @@ function getWindow() {
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
/**
|
|
156
|
-
* Dom7 4.0.
|
|
156
|
+
* Dom7 4.0.6
|
|
157
157
|
* Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API
|
|
158
158
|
* https://framework7.io/docs/dom7.html
|
|
159
159
|
*
|
|
160
|
-
* Copyright
|
|
160
|
+
* Copyright 2023, Vladimir Kharlampidi
|
|
161
161
|
*
|
|
162
162
|
* Licensed under MIT
|
|
163
163
|
*
|
|
164
|
-
* Released on:
|
|
164
|
+
* Released on: February 2, 2023
|
|
165
165
|
*/
|
|
166
166
|
|
|
167
167
|
/* eslint-disable no-proto */
|