@esri/calcite-components 1.0.0-next.317 → 1.0.0-next.320
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/calcite/assets/calcite-icon/centerAlign16.json +1 -0
- package/dist/calcite/assets/calcite-icon/centerAlign24.json +1 -0
- package/dist/calcite/assets/calcite-icon/centerAlign32.json +1 -0
- package/dist/calcite/assets/calcite-icon/convert16.json +1 -0
- package/dist/calcite/assets/calcite-icon/convert24.json +1 -0
- package/dist/calcite/assets/calcite-icon/convert32.json +1 -0
- package/dist/calcite/assets/calcite-icon/formDropdown16.json +1 -0
- package/dist/calcite/assets/calcite-icon/formDropdown24.json +1 -0
- package/dist/calcite/assets/calcite-icon/formDropdown32.json +1 -0
- package/dist/calcite/assets/calcite-icon/language16.json +1 -0
- package/dist/calcite/assets/calcite-icon/language24.json +1 -0
- package/dist/calcite/assets/calcite-icon/language32.json +1 -0
- package/dist/calcite/assets/calcite-icon/languageTranslate16.json +1 -0
- package/dist/calcite/assets/calcite-icon/languageTranslate24.json +1 -0
- package/dist/calcite/assets/calcite-icon/languageTranslate32.json +1 -0
- package/dist/calcite/assets/calcite-icon/leftAlign16.json +1 -0
- package/dist/calcite/assets/calcite-icon/leftAlign24.json +1 -0
- package/dist/calcite/assets/calcite-icon/leftAlign32.json +1 -0
- package/dist/calcite/assets/calcite-icon/terminal16.json +1 -0
- package/dist/calcite/assets/calcite-icon/terminal24.json +1 -0
- package/dist/calcite/assets/calcite-icon/terminal32.json +1 -0
- package/dist/calcite/assets/calcite-icon/touch16.json +1 -0
- package/dist/calcite/assets/calcite-icon/touch24.json +1 -0
- package/dist/calcite/assets/calcite-icon/touch32.json +1 -0
- package/dist/calcite/calcite.esm.js +1 -1
- package/dist/calcite/p-1480eb2d.entry.js +5 -0
- package/dist/calcite/p-2cd9d307.entry.js +5 -0
- package/dist/calcite/p-6e050609.entry.js +5 -0
- package/dist/calcite/p-8e252799.system.js +1 -1
- package/dist/calcite/p-96bbc815.system.entry.js +5 -0
- package/dist/calcite/p-cb55c32c.system.entry.js +5 -0
- package/dist/calcite/p-e817ded0.entry.js +5 -0
- package/dist/calcite/{p-44a07313.system.entry.js → p-f7b5dd98.system.entry.js} +1 -1
- package/dist/calcite/p-fa9a1d8f.system.entry.js +5 -0
- package/dist/cjs/calcite-action-bar.cjs.entry.js +24 -0
- package/dist/cjs/calcite-color-picker_3.cjs.entry.js +3 -3
- package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +349 -223
- package/dist/cjs/calcite-panel.cjs.entry.js +3 -3
- package/dist/cjs/calcite.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/calcite-action-bar/calcite-action-bar.js +3 -0
- package/dist/collection/components/calcite-filter/calcite-filter.js +1 -1
- package/dist/collection/components/calcite-icon/assets/calcite-icon/centerAlign16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/centerAlign24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/centerAlign32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/convert16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/convert24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/convert32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/formDropdown16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/formDropdown24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/formDropdown32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/language16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/language24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/language32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/languageTranslate16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/languageTranslate24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/languageTranslate32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/leftAlign16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/leftAlign24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/leftAlign32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/terminal16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/terminal24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/terminal32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/touch16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/touch24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/touch32.json +1 -0
- package/dist/collection/components/calcite-input-time-picker/calcite-input-time-picker.js +81 -76
- package/dist/collection/components/calcite-panel/calcite-panel.js +3 -3
- package/dist/collection/components/calcite-time-picker/calcite-time-picker.css +56 -91
- package/dist/collection/components/calcite-time-picker/calcite-time-picker.js +254 -289
- package/dist/collection/components/calcite-time-picker/resources.js +15 -9
- package/dist/collection/utils/conditionalSlot.js +26 -0
- package/dist/collection/utils/time.js +144 -36
- package/dist/components/calcite-action-bar.js +25 -1
- package/dist/components/calcite-color-picker-swatch2.js +3 -3
- package/dist/components/calcite-input-time-picker.js +51 -48
- package/dist/components/calcite-panel.js +3 -3
- package/dist/components/calcite-time-picker2.js +320 -187
- package/dist/custom-elements/index.js +381 -231
- package/dist/esm/calcite-action-bar.entry.js +25 -1
- package/dist/esm/calcite-color-picker_3.entry.js +3 -3
- package/dist/esm/calcite-input-time-picker_2.entry.js +349 -223
- package/dist/esm/calcite-panel.entry.js +3 -3
- package/dist/esm/calcite.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/calcite-action-bar.entry.js +1 -1
- package/dist/esm-es5/calcite-color-picker_3.entry.js +1 -1
- package/dist/esm-es5/calcite-input-time-picker_2.entry.js +2 -2
- package/dist/esm-es5/calcite-panel.entry.js +1 -1
- package/dist/esm-es5/calcite.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/extras/docs-json.json +23 -101
- package/dist/types/components/calcite-action-bar/calcite-action-bar.d.ts +2 -1
- package/dist/types/components/calcite-input-time-picker/calcite-input-time-picker.d.ts +12 -4
- package/dist/types/components/calcite-panel/calcite-panel.d.ts +1 -1
- package/dist/types/components/calcite-time-picker/calcite-time-picker.d.ts +35 -23
- package/dist/types/components/calcite-time-picker/resources.d.ts +14 -8
- package/dist/types/components.d.ts +17 -41
- package/dist/types/utils/conditionalSlot.d.ts +17 -0
- package/dist/types/utils/time.d.ts +18 -5
- package/hydrate/index.js +399 -239
- package/package.json +11 -11
- package/readme.md +2 -2
- package/dist/calcite/p-12a9599d.system.entry.js +0 -5
- package/dist/calcite/p-88784777.system.entry.js +0 -5
- package/dist/calcite/p-9634f89d.entry.js +0 -5
- package/dist/calcite/p-b37b7b9e.system.entry.js +0 -5
- package/dist/calcite/p-e1da1646.entry.js +0 -5
- package/dist/calcite/p-e78e743b.entry.js +0 -5
- package/dist/calcite/p-f333e31b.entry.js +0 -5
package/hydrate/index.js
CHANGED
|
@@ -7510,6 +7510,28 @@ function throttle$1(func, wait, options) {
|
|
|
7510
7510
|
});
|
|
7511
7511
|
}
|
|
7512
7512
|
|
|
7513
|
+
const slotChangedMap = new WeakMap();
|
|
7514
|
+
function onSlotChange() {
|
|
7515
|
+
forceUpdate$1(this);
|
|
7516
|
+
}
|
|
7517
|
+
const eventType = "slotchange";
|
|
7518
|
+
/**
|
|
7519
|
+
* Helper to set up a conditional slot component on connectedCallback.
|
|
7520
|
+
*/
|
|
7521
|
+
function connectConditionalSlotComponent(component) {
|
|
7522
|
+
const boundSlotChange = onSlotChange.bind(component);
|
|
7523
|
+
component.el.shadowRoot.addEventListener(eventType, boundSlotChange);
|
|
7524
|
+
slotChangedMap.set(component, boundSlotChange);
|
|
7525
|
+
}
|
|
7526
|
+
/**
|
|
7527
|
+
* Helper to tear down a conditional slot component on disconnectedCallback.
|
|
7528
|
+
*/
|
|
7529
|
+
function disconnectConditionalSlotComponent(component) {
|
|
7530
|
+
const boundSlotChange = slotChangedMap.get(component);
|
|
7531
|
+
component.el.shadowRoot.removeEventListener(eventType, boundSlotChange);
|
|
7532
|
+
slotChangedMap.delete(component);
|
|
7533
|
+
}
|
|
7534
|
+
|
|
7513
7535
|
const calciteActionBarCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}/*!@:root*/.sc-calcite-action-bar:root{--calcite-animation-timing:300ms}/*!@.calcite-animate*/.calcite-animate.sc-calcite-action-bar{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-action-bar{-webkit-animation-name:in;animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-action-bar{-webkit-animation-name:in-down;animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-action-bar{-webkit-animation-name:in-up;animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-action-bar{-webkit-animation-name:in-scale;animation-name:in-scale}/*!@:host*/.sc-calcite-action-bar-h{-webkit-box-sizing:border-box;box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}/*!@:host **/.sc-calcite-action-bar-h *.sc-calcite-action-bar{-webkit-box-sizing:border-box;box-sizing:border-box}/*!@:root*/.sc-calcite-action-bar:root{--calcite-popper-transition:150ms ease-in-out}/*!@:host([hidden])*/[hidden].sc-calcite-action-bar-h{display:none}/*!@:host*/.sc-calcite-action-bar-h{-ms-flex-item-align:stretch;align-self:stretch;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;pointer-events:auto;max-width:15vw}/*!@:host([overflow-actions-disabled])*/[overflow-actions-disabled].sc-calcite-action-bar-h{overflow-y:auto}/*!@:host([expanded])*/[expanded].sc-calcite-action-bar-h{max-width:20vw}/*!@::slotted(calcite-action-group)*/.sc-calcite-action-bar-s>calcite-action-group{border-width:0;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-2)}/*!@::slotted(calcite-action-group:last-child)*/.sc-calcite-action-bar-s>calcite-action-group:last-child{border-bottom-width:0}/*!@.action-group--bottom*/.action-group--bottom.sc-calcite-action-bar{padding-bottom:0;-ms-flex-positive:1;flex-grow:1;-ms-flex-pack:end;justify-content:flex-end}";
|
|
7514
7536
|
|
|
7515
7537
|
/**
|
|
@@ -7634,11 +7656,13 @@ class CalciteActionBar {
|
|
|
7634
7656
|
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.observe(el);
|
|
7635
7657
|
}
|
|
7636
7658
|
this.conditionallyOverflowActions();
|
|
7659
|
+
connectConditionalSlotComponent(this);
|
|
7637
7660
|
}
|
|
7638
7661
|
disconnectedCallback() {
|
|
7639
7662
|
var _a, _b;
|
|
7640
7663
|
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
7641
7664
|
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
7665
|
+
disconnectConditionalSlotComponent(this);
|
|
7642
7666
|
}
|
|
7643
7667
|
// --------------------------------------------------------------------------
|
|
7644
7668
|
//
|
|
@@ -10080,7 +10104,7 @@ cs.get.rgb = function (string) {
|
|
|
10080
10104
|
|
|
10081
10105
|
var abbr = /^#([a-f0-9]{3,4})$/i;
|
|
10082
10106
|
var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;
|
|
10083
|
-
var rgba = /^rgba?\(\s*([+-]?\d+)\s
|
|
10107
|
+
var rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
|
|
10084
10108
|
var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
|
|
10085
10109
|
var keyword = /^(\w+)$/;
|
|
10086
10110
|
|
|
@@ -10167,7 +10191,7 @@ cs.get.hsl = function (string) {
|
|
|
10167
10191
|
return null;
|
|
10168
10192
|
}
|
|
10169
10193
|
|
|
10170
|
-
var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?[\d
|
|
10194
|
+
var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
|
|
10171
10195
|
var match = string.match(hsl);
|
|
10172
10196
|
|
|
10173
10197
|
if (match) {
|
|
@@ -10188,7 +10212,7 @@ cs.get.hwb = function (string) {
|
|
|
10188
10212
|
return null;
|
|
10189
10213
|
}
|
|
10190
10214
|
|
|
10191
|
-
var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d
|
|
10215
|
+
var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
|
|
10192
10216
|
var match = string.match(hwb);
|
|
10193
10217
|
|
|
10194
10218
|
if (match) {
|
|
@@ -19792,6 +19816,72 @@ class CalciteInputMessage {
|
|
|
19792
19816
|
}
|
|
19793
19817
|
|
|
19794
19818
|
const maxTenthForMinuteAndSecond = 5;
|
|
19819
|
+
function createLocaleDateTimeFormatter(locale, includeSeconds = true) {
|
|
19820
|
+
try {
|
|
19821
|
+
const options = {
|
|
19822
|
+
hour: "2-digit",
|
|
19823
|
+
minute: "2-digit",
|
|
19824
|
+
timeZone: "UTC"
|
|
19825
|
+
};
|
|
19826
|
+
if (includeSeconds) {
|
|
19827
|
+
options.second = "2-digit";
|
|
19828
|
+
}
|
|
19829
|
+
return new Intl.DateTimeFormat(locale, options);
|
|
19830
|
+
}
|
|
19831
|
+
catch (e) {
|
|
19832
|
+
throw new Error(`Invalid locale supplied while attempting to create a DateTime formatter: ${locale}`);
|
|
19833
|
+
}
|
|
19834
|
+
}
|
|
19835
|
+
function formatTimePart(number) {
|
|
19836
|
+
const numberAsString = number.toString();
|
|
19837
|
+
return number >= 0 && number <= 9 ? numberAsString.padStart(2, "0") : numberAsString;
|
|
19838
|
+
}
|
|
19839
|
+
function formatTimeString(value) {
|
|
19840
|
+
if (!isValidTime(value)) {
|
|
19841
|
+
return null;
|
|
19842
|
+
}
|
|
19843
|
+
const [hourString, minuteString, secondString] = value.split(":");
|
|
19844
|
+
const hour = formatTimePart(parseInt(hourString));
|
|
19845
|
+
const minute = formatTimePart(parseInt(minuteString));
|
|
19846
|
+
if (secondString) {
|
|
19847
|
+
const second = formatTimePart(parseInt(secondString));
|
|
19848
|
+
return `${hour}:${minute}:${second}`;
|
|
19849
|
+
}
|
|
19850
|
+
return `${hour}:${minute}`;
|
|
19851
|
+
}
|
|
19852
|
+
function getLocaleHourCycle(locale) {
|
|
19853
|
+
const formatter = createLocaleDateTimeFormatter(locale);
|
|
19854
|
+
const parts = formatter.formatToParts(new Date(Date.UTC(0, 0, 0, 0, 0, 0)));
|
|
19855
|
+
return getLocalizedTimePart("meridiem", parts) ? "12" : "24";
|
|
19856
|
+
}
|
|
19857
|
+
function getLocalizedTimePart(part, parts) {
|
|
19858
|
+
var _a, _b, _c, _d;
|
|
19859
|
+
if (!part || !parts) {
|
|
19860
|
+
return null;
|
|
19861
|
+
}
|
|
19862
|
+
if (part === "hourSuffix") {
|
|
19863
|
+
const hourIndex = parts.indexOf(parts.find(({ type }) => type === "hour"));
|
|
19864
|
+
const minuteIndex = parts.indexOf(parts.find(({ type }) => type === "minute"));
|
|
19865
|
+
const hourSuffix = parts[hourIndex + 1];
|
|
19866
|
+
return hourSuffix && hourSuffix.type === "literal" && minuteIndex - hourIndex === 2
|
|
19867
|
+
? ((_a = hourSuffix.value) === null || _a === void 0 ? void 0 : _a.trim()) || null
|
|
19868
|
+
: null;
|
|
19869
|
+
}
|
|
19870
|
+
if (part === "minuteSuffix") {
|
|
19871
|
+
const minuteIndex = parts.indexOf(parts.find(({ type }) => type === "minute"));
|
|
19872
|
+
const secondIndex = parts.indexOf(parts.find(({ type }) => type === "second"));
|
|
19873
|
+
const minuteSuffix = parts[minuteIndex + 1];
|
|
19874
|
+
return minuteSuffix && minuteSuffix.type === "literal" && secondIndex - minuteIndex === 2
|
|
19875
|
+
? ((_b = minuteSuffix.value) === null || _b === void 0 ? void 0 : _b.trim()) || null
|
|
19876
|
+
: null;
|
|
19877
|
+
}
|
|
19878
|
+
if (part === "secondSuffix") {
|
|
19879
|
+
const secondIndex = parts.indexOf(parts.find(({ type }) => type === "second"));
|
|
19880
|
+
const secondSuffix = parts[secondIndex + 1];
|
|
19881
|
+
return secondSuffix && secondSuffix.type === "literal" ? ((_c = secondSuffix.value) === null || _c === void 0 ? void 0 : _c.trim()) || null : null;
|
|
19882
|
+
}
|
|
19883
|
+
return ((_d = parts.find(({ type }) => (part == "meridiem" ? type === "dayPeriod" : type === part))) === null || _d === void 0 ? void 0 : _d.value) || null;
|
|
19884
|
+
}
|
|
19795
19885
|
function getMeridiem(hour) {
|
|
19796
19886
|
if (!isValidNumber(hour)) {
|
|
19797
19887
|
return null;
|
|
@@ -19799,51 +19889,93 @@ function getMeridiem(hour) {
|
|
|
19799
19889
|
const hourAsNumber = parseInt(hour);
|
|
19800
19890
|
return hourAsNumber >= 0 && hourAsNumber <= 11 ? "AM" : "PM";
|
|
19801
19891
|
}
|
|
19802
|
-
function
|
|
19803
|
-
if (!
|
|
19804
|
-
return
|
|
19892
|
+
function isValidTime(value) {
|
|
19893
|
+
if (!value || value.startsWith(":") || value.endsWith(":")) {
|
|
19894
|
+
return false;
|
|
19805
19895
|
}
|
|
19806
|
-
const
|
|
19807
|
-
|
|
19808
|
-
|
|
19896
|
+
const splitValue = value.split(":");
|
|
19897
|
+
const validLength = splitValue.length > 1 && splitValue.length < 4;
|
|
19898
|
+
if (!validLength) {
|
|
19899
|
+
return false;
|
|
19900
|
+
}
|
|
19901
|
+
const [hour, minute, second] = splitValue;
|
|
19902
|
+
const hourAsNumber = parseInt(splitValue[0]);
|
|
19903
|
+
const minuteAsNumber = parseInt(splitValue[1]);
|
|
19904
|
+
const secondAsNumber = parseInt(splitValue[2]);
|
|
19905
|
+
const hourValid = isValidNumber(hour) && hourAsNumber >= 0 && hourAsNumber < 24;
|
|
19906
|
+
const minuteValid = isValidNumber(minute) && minuteAsNumber >= 0 && minuteAsNumber < 60;
|
|
19907
|
+
const secondValid = isValidNumber(second) && secondAsNumber >= 0 && secondAsNumber < 60;
|
|
19908
|
+
if ((hourValid && minuteValid && !second) || (hourValid && minuteValid && secondValid)) {
|
|
19909
|
+
return true;
|
|
19809
19910
|
}
|
|
19810
|
-
return hourAsNumber > 12 ? formatTimePart(hourAsNumber - 12) : hour;
|
|
19811
19911
|
}
|
|
19812
|
-
function
|
|
19813
|
-
|
|
19814
|
-
|
|
19815
|
-
|
|
19816
|
-
|
|
19817
|
-
|
|
19818
|
-
|
|
19819
|
-
|
|
19912
|
+
function isValidTimePart(value, part) {
|
|
19913
|
+
if (part === "meridiem") {
|
|
19914
|
+
return value === "AM" || value === "PM";
|
|
19915
|
+
}
|
|
19916
|
+
if (!isValidNumber(value)) {
|
|
19917
|
+
return false;
|
|
19918
|
+
}
|
|
19919
|
+
const valueAsNumber = Number(value);
|
|
19920
|
+
return part === "hour" ? valueAsNumber >= 0 && valueAsNumber < 24 : valueAsNumber >= 0 && valueAsNumber < 60;
|
|
19820
19921
|
}
|
|
19821
|
-
function
|
|
19822
|
-
if (!value
|
|
19922
|
+
function localizeTimePart(value, part, locale) {
|
|
19923
|
+
if (!isValidTimePart(value, part)) {
|
|
19924
|
+
return;
|
|
19925
|
+
}
|
|
19926
|
+
const valueAsNumber = parseInt(value);
|
|
19927
|
+
const date = new Date(Date.UTC(0, 0, 0, part === "hour" ? valueAsNumber : part === "meridiem" ? (value === "AM" ? 0 : 12) : 0, part === "minute" ? valueAsNumber : 0, part === "second" ? valueAsNumber : 0));
|
|
19928
|
+
if (!date) {
|
|
19929
|
+
return;
|
|
19930
|
+
}
|
|
19931
|
+
const formatter = createLocaleDateTimeFormatter(locale);
|
|
19932
|
+
const parts = formatter.formatToParts(date);
|
|
19933
|
+
return getLocalizedTimePart(part, parts);
|
|
19934
|
+
}
|
|
19935
|
+
function localizeTimeString(value, locale = "en", includeSeconds = true) {
|
|
19936
|
+
if (!isValidTime(value)) {
|
|
19823
19937
|
return null;
|
|
19824
19938
|
}
|
|
19825
|
-
const
|
|
19826
|
-
|
|
19827
|
-
|
|
19828
|
-
|
|
19829
|
-
|
|
19830
|
-
|
|
19831
|
-
|
|
19832
|
-
|
|
19833
|
-
|
|
19834
|
-
|
|
19835
|
-
|
|
19836
|
-
|
|
19837
|
-
|
|
19838
|
-
|
|
19839
|
-
|
|
19840
|
-
|
|
19939
|
+
const { hour, minute, second = "0" } = parseTimeString(value);
|
|
19940
|
+
const dateFromTimeString = new Date(Date.UTC(0, 0, 0, parseInt(hour), parseInt(minute), parseInt(second)));
|
|
19941
|
+
const formatter = createLocaleDateTimeFormatter(locale, includeSeconds);
|
|
19942
|
+
return (formatter === null || formatter === void 0 ? void 0 : formatter.format(dateFromTimeString)) || null;
|
|
19943
|
+
}
|
|
19944
|
+
function localizeTimeStringToParts(value, locale = "en") {
|
|
19945
|
+
if (!isValidTime(value)) {
|
|
19946
|
+
return null;
|
|
19947
|
+
}
|
|
19948
|
+
const { hour, minute, second = "0" } = parseTimeString(value);
|
|
19949
|
+
const dateFromTimeString = new Date(Date.UTC(0, 0, 0, parseInt(hour), parseInt(minute), parseInt(second)));
|
|
19950
|
+
if (dateFromTimeString) {
|
|
19951
|
+
const formatter = createLocaleDateTimeFormatter(locale);
|
|
19952
|
+
const parts = formatter.formatToParts(dateFromTimeString);
|
|
19953
|
+
return {
|
|
19954
|
+
localizedHour: getLocalizedTimePart("hour", parts),
|
|
19955
|
+
localizedHourSuffix: getLocalizedTimePart("hourSuffix", parts),
|
|
19956
|
+
localizedMinute: getLocalizedTimePart("minute", parts),
|
|
19957
|
+
localizedMinuteSuffix: getLocalizedTimePart("minuteSuffix", parts),
|
|
19958
|
+
localizedSecond: getLocalizedTimePart("second", parts),
|
|
19959
|
+
localizedSecondSuffix: getLocalizedTimePart("secondSuffix", parts),
|
|
19960
|
+
localizedMeridiem: getLocalizedTimePart("meridiem", parts)
|
|
19961
|
+
};
|
|
19841
19962
|
}
|
|
19842
19963
|
return null;
|
|
19843
19964
|
}
|
|
19844
|
-
function
|
|
19845
|
-
|
|
19846
|
-
|
|
19965
|
+
function parseTimeString(value) {
|
|
19966
|
+
if (isValidTime(value)) {
|
|
19967
|
+
const [hour, minute, second] = value.split(":");
|
|
19968
|
+
return {
|
|
19969
|
+
hour,
|
|
19970
|
+
minute,
|
|
19971
|
+
second
|
|
19972
|
+
};
|
|
19973
|
+
}
|
|
19974
|
+
return {
|
|
19975
|
+
hour: null,
|
|
19976
|
+
minute: null,
|
|
19977
|
+
second: null
|
|
19978
|
+
};
|
|
19847
19979
|
}
|
|
19848
19980
|
|
|
19849
19981
|
const calciteInputTimePickerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}/*!@:root*/.sc-calcite-input-time-picker:root{--calcite-animation-timing:300ms}/*!@.calcite-animate*/.calcite-animate.sc-calcite-input-time-picker{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-input-time-picker{-webkit-animation-name:in;animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-input-time-picker{-webkit-animation-name:in-down;animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-input-time-picker{-webkit-animation-name:in-up;animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-input-time-picker{-webkit-animation-name:in-scale;animation-name:in-scale}/*!@:root*/.sc-calcite-input-time-picker:root{--calcite-popper-transition:150ms ease-in-out}/*!@:host([hidden])*/[hidden].sc-calcite-input-time-picker-h{display:none}/*!@:host*/.sc-calcite-input-time-picker-h{display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}/*!@::slotted(input[slot=hidden-form-input])*/.sc-calcite-input-time-picker-s>input[slot=hidden-form-input]{bottom:0 !important;left:0 !important;margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;right:0 !important;top:0 !important;-webkit-transform:none !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
|
|
@@ -19861,8 +19993,11 @@ class CalciteInputTimePicker {
|
|
|
19861
19993
|
this.active = false;
|
|
19862
19994
|
/** The disabled state of the time input */
|
|
19863
19995
|
this.disabled = false;
|
|
19864
|
-
/**
|
|
19865
|
-
|
|
19996
|
+
/**
|
|
19997
|
+
* BCP 47 language tag for desired language and country format
|
|
19998
|
+
* @internal
|
|
19999
|
+
*/
|
|
20000
|
+
this.locale = document.documentElement.lang || navigator.language || "en";
|
|
19866
20001
|
/**
|
|
19867
20002
|
* When true, makes the component required for form-submission.
|
|
19868
20003
|
*
|
|
@@ -19886,56 +20021,60 @@ class CalciteInputTimePicker {
|
|
|
19886
20021
|
//--------------------------------------------------------------------------
|
|
19887
20022
|
this.calciteInputBlurHandler = () => {
|
|
19888
20023
|
this.active = false;
|
|
19889
|
-
const
|
|
19890
|
-
|
|
19891
|
-
|
|
19892
|
-
}
|
|
20024
|
+
const shouldIncludeSeconds = this.shouldIncludeSeconds();
|
|
20025
|
+
const localizedInputValue = localizeTimeString(this.calciteInputEl.value, this.locale, shouldIncludeSeconds);
|
|
20026
|
+
this.setInputValue(localizedInputValue || localizeTimeString(this.value, this.locale, shouldIncludeSeconds));
|
|
19893
20027
|
};
|
|
19894
20028
|
this.calciteInputFocusHandler = () => {
|
|
19895
20029
|
this.active = true;
|
|
19896
20030
|
};
|
|
19897
20031
|
this.calciteInputInputHandler = (event) => {
|
|
19898
|
-
|
|
20032
|
+
const target = event.target;
|
|
20033
|
+
this.setValue({ value: target.value });
|
|
20034
|
+
};
|
|
20035
|
+
this.timePickerChangeHandler = (event) => {
|
|
20036
|
+
event.stopPropagation();
|
|
20037
|
+
const target = event.target;
|
|
20038
|
+
const value = target.value;
|
|
20039
|
+
this.setValue({ value, origin: "time-picker" });
|
|
19899
20040
|
};
|
|
19900
20041
|
this.setCalciteInputEl = (el) => {
|
|
19901
20042
|
this.calciteInputEl = el;
|
|
19902
20043
|
};
|
|
20044
|
+
this.setCalciteTimePickerEl = (el) => {
|
|
20045
|
+
this.calciteTimePickerEl = el;
|
|
20046
|
+
};
|
|
19903
20047
|
this.setInputValue = (newInputValue) => {
|
|
19904
20048
|
if (!this.calciteInputEl) {
|
|
19905
20049
|
return;
|
|
19906
20050
|
}
|
|
19907
|
-
|
|
19908
|
-
const { hour, minute, second } = parseTimeString(newInputValue);
|
|
19909
|
-
this.calciteInputEl.value = newInputValue
|
|
19910
|
-
? `${getMeridiemHour(hour)}:${minute}${this.step !== 60 ? ":" + second : ""} ${getMeridiem(hour)}`
|
|
19911
|
-
: null;
|
|
19912
|
-
}
|
|
19913
|
-
else {
|
|
19914
|
-
this.calciteInputEl.value = newInputValue;
|
|
19915
|
-
}
|
|
20051
|
+
this.calciteInputEl.value = newInputValue;
|
|
19916
20052
|
};
|
|
19917
20053
|
this.setValue = ({ value, origin = "input" }) => {
|
|
19918
20054
|
const previousValue = this.value;
|
|
19919
|
-
const
|
|
20055
|
+
const newValue = formatTimeString(value);
|
|
20056
|
+
const newLocalizedValue = localizeTimeString(newValue, this.locale, this.shouldIncludeSeconds());
|
|
19920
20057
|
this.internalValueChange = origin !== "external" && origin !== "loading";
|
|
19921
20058
|
const shouldEmit = origin !== "loading" &&
|
|
19922
20059
|
origin !== "external" &&
|
|
19923
20060
|
((value !== this.previousValidValue && !value) ||
|
|
19924
|
-
!!(!this.previousValidValue &&
|
|
19925
|
-
(
|
|
20061
|
+
!!(!this.previousValidValue && newValue) ||
|
|
20062
|
+
(newValue !== this.previousValidValue && newValue));
|
|
19926
20063
|
if (value) {
|
|
19927
20064
|
if (shouldEmit) {
|
|
19928
|
-
this.previousValidValue =
|
|
20065
|
+
this.previousValidValue = newValue;
|
|
19929
20066
|
}
|
|
19930
|
-
if (
|
|
19931
|
-
this.value =
|
|
20067
|
+
if (newValue && newValue !== this.value) {
|
|
20068
|
+
this.value = newValue;
|
|
19932
20069
|
}
|
|
20070
|
+
this.localizedValue = newLocalizedValue;
|
|
19933
20071
|
}
|
|
19934
20072
|
else {
|
|
19935
20073
|
this.value = value;
|
|
20074
|
+
this.localizedValue = null;
|
|
19936
20075
|
}
|
|
19937
20076
|
if (origin === "time-picker" || origin === "external") {
|
|
19938
|
-
this.setInputValue(
|
|
20077
|
+
this.setInputValue(newLocalizedValue);
|
|
19939
20078
|
}
|
|
19940
20079
|
if (shouldEmit) {
|
|
19941
20080
|
const changeEvent = this.calciteInputTimePickerChange.emit();
|
|
@@ -19946,17 +20085,26 @@ class CalciteInputTimePicker {
|
|
|
19946
20085
|
this.previousValidValue = previousValue;
|
|
19947
20086
|
}
|
|
19948
20087
|
else {
|
|
19949
|
-
this.previousValidValue =
|
|
20088
|
+
this.previousValidValue = newValue;
|
|
19950
20089
|
}
|
|
19951
20090
|
}
|
|
19952
20091
|
};
|
|
19953
20092
|
}
|
|
20093
|
+
localeWatcher(newLocale) {
|
|
20094
|
+
this.setInputValue(localizeTimeString(this.value, newLocale, this.shouldIncludeSeconds()));
|
|
20095
|
+
}
|
|
19954
20096
|
valueWatcher(newValue) {
|
|
19955
20097
|
if (!this.internalValueChange) {
|
|
19956
20098
|
this.setValue({ value: newValue, origin: "external" });
|
|
19957
20099
|
}
|
|
19958
20100
|
this.internalValueChange = false;
|
|
19959
20101
|
}
|
|
20102
|
+
clickHandler(event) {
|
|
20103
|
+
if (event.composedPath().includes(this.calciteTimePickerEl)) {
|
|
20104
|
+
return;
|
|
20105
|
+
}
|
|
20106
|
+
this.setFocus();
|
|
20107
|
+
}
|
|
19960
20108
|
keyUpHandler(event) {
|
|
19961
20109
|
if (event.key === "Escape" && this.active) {
|
|
19962
20110
|
this.active = false;
|
|
@@ -19967,21 +20115,6 @@ class CalciteInputTimePicker {
|
|
|
19967
20115
|
event.stopPropagation();
|
|
19968
20116
|
this.active = false;
|
|
19969
20117
|
}
|
|
19970
|
-
timePickerChangeHandler(event) {
|
|
19971
|
-
event.preventDefault();
|
|
19972
|
-
event.stopPropagation();
|
|
19973
|
-
if (event.detail) {
|
|
19974
|
-
const { hour, minute, second } = event.detail;
|
|
19975
|
-
let value;
|
|
19976
|
-
if (hour && minute) {
|
|
19977
|
-
value = second && this.step !== 60 ? `${hour}:${minute}:${second}` : `${hour}:${minute}`;
|
|
19978
|
-
}
|
|
19979
|
-
else {
|
|
19980
|
-
value = "";
|
|
19981
|
-
}
|
|
19982
|
-
this.setValue({ value, origin: "time-picker" });
|
|
19983
|
-
}
|
|
19984
|
-
}
|
|
19985
20118
|
timePickerFocusHandler(event) {
|
|
19986
20119
|
event.preventDefault();
|
|
19987
20120
|
event.stopPropagation();
|
|
@@ -20004,6 +20137,9 @@ class CalciteInputTimePicker {
|
|
|
20004
20137
|
onLabelClick() {
|
|
20005
20138
|
this.setFocus();
|
|
20006
20139
|
}
|
|
20140
|
+
shouldIncludeSeconds() {
|
|
20141
|
+
return this.step < 60;
|
|
20142
|
+
}
|
|
20007
20143
|
//--------------------------------------------------------------------------
|
|
20008
20144
|
//
|
|
20009
20145
|
// Lifecycle
|
|
@@ -20011,15 +20147,13 @@ class CalciteInputTimePicker {
|
|
|
20011
20147
|
//--------------------------------------------------------------------------
|
|
20012
20148
|
connectedCallback() {
|
|
20013
20149
|
if (this.value) {
|
|
20014
|
-
this.setValue({ value: this.value, origin: "loading" });
|
|
20150
|
+
this.setValue({ value: isValidTime(this.value) ? this.value : undefined, origin: "loading" });
|
|
20015
20151
|
}
|
|
20016
20152
|
connectLabel(this);
|
|
20017
20153
|
connectForm(this);
|
|
20018
20154
|
}
|
|
20019
20155
|
componentDidLoad() {
|
|
20020
|
-
|
|
20021
|
-
this.setInputValue(this.value);
|
|
20022
|
-
}
|
|
20156
|
+
this.setInputValue(this.localizedValue);
|
|
20023
20157
|
}
|
|
20024
20158
|
disconnectedCallback() {
|
|
20025
20159
|
disconnectLabel(this);
|
|
@@ -20031,12 +20165,12 @@ class CalciteInputTimePicker {
|
|
|
20031
20165
|
//
|
|
20032
20166
|
// --------------------------------------------------------------------------
|
|
20033
20167
|
render() {
|
|
20034
|
-
const { hour, minute, second } = parseTimeString(this.value);
|
|
20035
20168
|
const popoverId = `${this.referenceElementId}-popover`;
|
|
20036
|
-
return (hAsync(Host, null, hAsync("div", { "aria-controls": popoverId, "aria-haspopup": "dialog", "aria-label": this.name, "aria-owns": popoverId, id: this.referenceElementId, role: "combobox" }, hAsync("calcite-input", { disabled: this.disabled, icon: "clock", label: getLabelText(this), onCalciteInputBlur: this.calciteInputBlurHandler, onCalciteInputFocus: this.calciteInputFocusHandler, onCalciteInputInput: this.calciteInputInputHandler, ref: this.setCalciteInputEl, scale: this.scale, step: this.step })), hAsync("calcite-popover", { id: popoverId, label: "Time Picker", open: this.active || false, referenceElement: this.referenceElementId }, hAsync("calcite-time-picker", {
|
|
20169
|
+
return (hAsync(Host, null, hAsync("div", { "aria-controls": popoverId, "aria-haspopup": "dialog", "aria-label": this.name, "aria-owns": popoverId, id: this.referenceElementId, role: "combobox" }, hAsync("calcite-input", { disabled: this.disabled, icon: "clock", label: getLabelText(this), onCalciteInputBlur: this.calciteInputBlurHandler, onCalciteInputFocus: this.calciteInputFocusHandler, onCalciteInputInput: this.calciteInputInputHandler, ref: this.setCalciteInputEl, scale: this.scale, step: this.step })), hAsync("calcite-popover", { id: popoverId, label: "Time Picker", open: this.active || false, referenceElement: this.referenceElementId }, hAsync("calcite-time-picker", { intlHour: this.intlHour, intlHourDown: this.intlHourDown, intlHourUp: this.intlHourUp, intlMeridiem: this.intlMeridiem, intlMeridiemDown: this.intlMeridiemDown, intlMeridiemUp: this.intlMeridiemUp, intlMinute: this.intlMinute, intlMinuteDown: this.intlMinuteDown, intlMinuteUp: this.intlMinuteUp, intlSecond: this.intlSecond, intlSecondDown: this.intlSecondDown, intlSecondUp: this.intlSecondUp, lang: this.locale, onCalciteTimePickerChange: this.timePickerChangeHandler, ref: this.setCalciteTimePickerEl, scale: this.scale, step: this.step, value: this.value })), hAsync(HiddenFormInputSlot, { component: this })));
|
|
20037
20170
|
}
|
|
20038
20171
|
get el() { return getElement(this); }
|
|
20039
20172
|
static get watchers() { return {
|
|
20173
|
+
"locale": ["localeWatcher"],
|
|
20040
20174
|
"value": ["valueWatcher"]
|
|
20041
20175
|
}; }
|
|
20042
20176
|
static get style() { return calciteInputTimePickerCss; }
|
|
@@ -20046,7 +20180,6 @@ class CalciteInputTimePicker {
|
|
|
20046
20180
|
"$members$": {
|
|
20047
20181
|
"active": [1540],
|
|
20048
20182
|
"disabled": [516],
|
|
20049
|
-
"hourDisplayFormat": [1, "hour-display-format"],
|
|
20050
20183
|
"intlHour": [1, "intl-hour"],
|
|
20051
20184
|
"intlHourDown": [1, "intl-hour-down"],
|
|
20052
20185
|
"intlHourUp": [1, "intl-hour-up"],
|
|
@@ -20059,14 +20192,16 @@ class CalciteInputTimePicker {
|
|
|
20059
20192
|
"intlSecond": [1, "intl-second"],
|
|
20060
20193
|
"intlSecondDown": [1, "intl-second-down"],
|
|
20061
20194
|
"intlSecondUp": [1, "intl-second-up"],
|
|
20195
|
+
"locale": [1025, "lang"],
|
|
20062
20196
|
"name": [1],
|
|
20063
20197
|
"required": [516],
|
|
20064
20198
|
"scale": [513],
|
|
20065
20199
|
"step": [2],
|
|
20066
20200
|
"value": [1025],
|
|
20201
|
+
"localizedValue": [32],
|
|
20067
20202
|
"setFocus": [64]
|
|
20068
20203
|
},
|
|
20069
|
-
"$listeners$": [[0, "
|
|
20204
|
+
"$listeners$": [[0, "click", "clickHandler"], [0, "keyup", "keyUpHandler"], [0, "calciteTimePickerBlur", "timePickerBlurHandler"], [0, "calciteTimePickerFocus", "timePickerFocusHandler"]],
|
|
20070
20205
|
"$lazyBundleId$": "-",
|
|
20071
20206
|
"$attrsToReflect$": [["active", "active"], ["disabled", "disabled"], ["required", "required"], ["scale", "scale"]]
|
|
20072
20207
|
}; }
|
|
@@ -21450,7 +21585,7 @@ class CalcitePanel {
|
|
|
21450
21585
|
this.setBackRef = (node) => {
|
|
21451
21586
|
this.backButtonEl = node;
|
|
21452
21587
|
};
|
|
21453
|
-
this.
|
|
21588
|
+
this.panelKeyDownHandler = (event) => {
|
|
21454
21589
|
if (event.key === "Escape") {
|
|
21455
21590
|
this.dismiss();
|
|
21456
21591
|
}
|
|
@@ -21567,12 +21702,12 @@ class CalcitePanel {
|
|
|
21567
21702
|
return (hAsync("div", { class: CSS$j.fabContainer }, hAsync("slot", { name: SLOTS$c.fab })));
|
|
21568
21703
|
}
|
|
21569
21704
|
render() {
|
|
21570
|
-
const { dismissed, disabled, dismissible, el, loading,
|
|
21705
|
+
const { dismissed, disabled, dismissible, el, loading, panelKeyDownHandler } = this;
|
|
21571
21706
|
const rtl = getElementDir(el) === "rtl";
|
|
21572
21707
|
const panelNode = (hAsync("article", { "aria-busy": loading.toString(), class: {
|
|
21573
21708
|
[CSS$j.container]: true,
|
|
21574
21709
|
[CSS_UTILITY.rtl]: rtl
|
|
21575
|
-
}, hidden: dismissible && dismissed,
|
|
21710
|
+
}, hidden: dismissible && dismissed, onKeyDown: panelKeyDownHandler, ref: this.setContainerRef, tabIndex: dismissible ? 0 : -1 }, this.renderHeaderNode(), this.renderContent(), this.renderFooterSlottedContent() || this.renderFooterActions()));
|
|
21576
21711
|
return (hAsync(Fragment, null, loading || disabled ? hAsync("calcite-scrim", { loading: loading }) : null, panelNode));
|
|
21577
21712
|
}
|
|
21578
21713
|
get el() { return getElement(this); }
|
|
@@ -29829,26 +29964,32 @@ class CalciteTileSelectGroup {
|
|
|
29829
29964
|
}
|
|
29830
29965
|
|
|
29831
29966
|
const CSS$5 = {
|
|
29967
|
+
button: "button",
|
|
29832
29968
|
buttonBottomLeft: "button--bottom-left",
|
|
29833
29969
|
buttonBottomRight: "button--bottom-right",
|
|
29834
|
-
button: "button",
|
|
29835
|
-
delimiter: "delimiter",
|
|
29836
|
-
hour: "hour",
|
|
29837
29970
|
buttonHourDown: "button--hour-down",
|
|
29838
29971
|
buttonHourUp: "button--hour-up",
|
|
29839
|
-
input: "input",
|
|
29840
|
-
meridiem: "meridiem",
|
|
29841
29972
|
buttonMeridiemDown: "button--meridiem-down",
|
|
29842
29973
|
buttonMeridiemUp: "button--meridiem-up",
|
|
29843
|
-
minute: "minute",
|
|
29844
29974
|
buttonMinuteDown: "button--minute-down",
|
|
29845
29975
|
buttonMinuteUp: "button--minute-up",
|
|
29846
|
-
second: "second",
|
|
29847
29976
|
buttonSecondDown: "button--second-down",
|
|
29848
29977
|
buttonSecondUp: "button--second-up",
|
|
29849
|
-
timePicker: "time-picker",
|
|
29850
29978
|
buttonTopLeft: "button--top-left",
|
|
29851
|
-
buttonTopRight: "button--top-right"
|
|
29979
|
+
buttonTopRight: "button--top-right",
|
|
29980
|
+
column: "column",
|
|
29981
|
+
delimiter: "delimiter",
|
|
29982
|
+
hour: "hour",
|
|
29983
|
+
input: "input",
|
|
29984
|
+
meridiem: "meridiem",
|
|
29985
|
+
minute: "minute",
|
|
29986
|
+
second: "second",
|
|
29987
|
+
showMeridiem: "show-meridiem",
|
|
29988
|
+
showSecond: "show-second",
|
|
29989
|
+
"scale-s": "scale-s",
|
|
29990
|
+
"scale-m": "scale-m",
|
|
29991
|
+
"scale-l": "scale-l",
|
|
29992
|
+
timePicker: "time-picker"
|
|
29852
29993
|
};
|
|
29853
29994
|
const TEXT$2 = {
|
|
29854
29995
|
hour: "Hour",
|
|
@@ -29865,8 +30006,11 @@ const TEXT$2 = {
|
|
|
29865
30006
|
secondUp: "Increase second"
|
|
29866
30007
|
};
|
|
29867
30008
|
|
|
29868
|
-
const calciteTimePickerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}/*!@:root*/.sc-calcite-time-picker:root{--calcite-animation-timing:300ms}/*!@.calcite-animate*/.calcite-animate.sc-calcite-time-picker{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-time-picker{-webkit-animation-name:in;animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-time-picker{-webkit-animation-name:in-down;animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-time-picker{-webkit-animation-name:in-up;animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-time-picker{-webkit-animation-name:in-scale;animation-name:in-scale}/*!@:root*/.sc-calcite-time-picker:root{--calcite-popper-transition:150ms ease-in-out}/*!@:host([hidden])*/[hidden].sc-calcite-time-picker-h{display:none}/*!@:host*/.sc-calcite-time-picker-h{color:var(--calcite-ui-
|
|
30009
|
+
const calciteTimePickerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}/*!@:root*/.sc-calcite-time-picker:root{--calcite-animation-timing:300ms}/*!@.calcite-animate*/.calcite-animate.sc-calcite-time-picker{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-time-picker{-webkit-animation-name:in;animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-time-picker{-webkit-animation-name:in-down;animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-time-picker{-webkit-animation-name:in-up;animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-time-picker{-webkit-animation-name:in-scale;animation-name:in-scale}/*!@:root*/.sc-calcite-time-picker:root{--calcite-popper-transition:150ms ease-in-out}/*!@:host([hidden])*/[hidden].sc-calcite-time-picker-h{display:none}/*!@:host*/.sc-calcite-time-picker-h{display:inline-block}/*!@.time-picker*/.time-picker.sc-calcite-time-picker{background-color:var(--calcite-ui-foreground-1);display:-ms-flexbox;display:flex;font-weight:var(--calcite-font-weight-medium);-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);box-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);color:var(--calcite-ui-text-1);border-radius:var(--calcite-border-radius)}/*!@.time-picker .column*/.time-picker.sc-calcite-time-picker .column.sc-calcite-time-picker{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}/*!@.time-picker .button*/.time-picker.sc-calcite-time-picker .button.sc-calcite-time-picker{background-color:var(--calcite-ui-foreground-1);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}/*!@.time-picker .button:hover, .time-picker .button:focus*/.time-picker.sc-calcite-time-picker .button.sc-calcite-time-picker:hover,.time-picker.sc-calcite-time-picker .button.sc-calcite-time-picker:focus{background-color:var(--calcite-ui-foreground-2);outline:2px solid transparent;outline-offset:2px}/*!@.time-picker .button:active*/.time-picker.sc-calcite-time-picker .button.sc-calcite-time-picker:active{background-color:var(--calcite-ui-foreground-3)}/*!@.time-picker .button.top-left*/.time-picker.sc-calcite-time-picker .button.top-left.sc-calcite-time-picker{border-top-left-radius:var(--calcite-border-radius)}/*!@.time-picker .button.bottom-left*/.time-picker.sc-calcite-time-picker .button.bottom-left.sc-calcite-time-picker{border-bottom-left-radius:var(--calcite-border-radius)}/*!@.time-picker .button.top-right*/.time-picker.sc-calcite-time-picker .button.top-right.sc-calcite-time-picker{border-top-right-radius:var(--calcite-border-radius)}/*!@.time-picker .button.bottom-right*/.time-picker.sc-calcite-time-picker .button.bottom-right.sc-calcite-time-picker{border-bottom-right-radius:var(--calcite-border-radius)}/*!@.time-picker .button calcite-icon*/.time-picker.sc-calcite-time-picker .button.sc-calcite-time-picker calcite-icon.sc-calcite-time-picker{color:var(--calcite-ui-text-3)}/*!@.time-picker .input*/.time-picker.sc-calcite-time-picker .input.sc-calcite-time-picker{background-color:var(--calcite-ui-foreground-1);cursor:pointer;font-weight:var(--calcite-font-weight-medium);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}/*!@.time-picker .input:hover*/.time-picker.sc-calcite-time-picker .input.sc-calcite-time-picker:hover{-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-2);box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-2)}/*!@.time-picker .input:focus, .time-picker .input:hover:focus*/.time-picker.sc-calcite-time-picker .input.sc-calcite-time-picker:focus,.time-picker.sc-calcite-time-picker .input.sc-calcite-time-picker:hover:focus{outline:2px solid transparent;outline-offset:2px;-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}/*!@.time-picker.scale-s*/.time-picker.scale-s.sc-calcite-time-picker{font-size:var(--calcite-font-size--1)}/*!@.time-picker.scale-s .button,\n.time-picker.scale-s .input*/.time-picker.scale-s.sc-calcite-time-picker .button.sc-calcite-time-picker,.time-picker.scale-s.sc-calcite-time-picker .input.sc-calcite-time-picker{padding-left:0.75rem;padding-right:0.75rem;padding-top:0.25rem;padding-bottom:0.25rem}/*!@.time-picker.scale-s:not(.show-meridiem) .delimiter:last-child*/.time-picker.scale-s.sc-calcite-time-picker:not(.show-meridiem) .delimiter.sc-calcite-time-picker:last-child{-webkit-padding-end:0.75rem;padding-inline-end:0.75rem}/*!@.time-picker.scale-m*/.time-picker.scale-m.sc-calcite-time-picker{font-size:var(--calcite-font-size-0)}/*!@.time-picker.scale-m .button,\n.time-picker.scale-m .input*/.time-picker.scale-m.sc-calcite-time-picker .button.sc-calcite-time-picker,.time-picker.scale-m.sc-calcite-time-picker .input.sc-calcite-time-picker{padding-left:1rem;padding-right:1rem;padding-top:0.5rem;padding-bottom:0.5rem}/*!@.time-picker.scale-m:not(.show-meridiem) .delimiter:last-child*/.time-picker.scale-m.sc-calcite-time-picker:not(.show-meridiem) .delimiter.sc-calcite-time-picker:last-child{-webkit-padding-end:1rem;padding-inline-end:1rem}/*!@.time-picker.scale-l*/.time-picker.scale-l.sc-calcite-time-picker{font-size:var(--calcite-font-size-1)}/*!@.time-picker.scale-l .button,\n.time-picker.scale-l .input*/.time-picker.scale-l.sc-calcite-time-picker .button.sc-calcite-time-picker,.time-picker.scale-l.sc-calcite-time-picker .input.sc-calcite-time-picker{padding-left:1.25rem;padding-right:1.25rem;padding-top:0.75rem;padding-bottom:0.75rem}/*!@.time-picker.scale-l:not(.show-meridiem) .delimiter:last-child*/.time-picker.scale-l.sc-calcite-time-picker:not(.show-meridiem) .delimiter.sc-calcite-time-picker:last-child{-webkit-padding-end:1.25rem;padding-inline-end:1.25rem}";
|
|
29869
30010
|
|
|
30011
|
+
function capitalize(str) {
|
|
30012
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
30013
|
+
}
|
|
29870
30014
|
class CalciteTimePicker {
|
|
29871
30015
|
constructor(hostRef) {
|
|
29872
30016
|
registerInstance(this, hostRef);
|
|
@@ -29878,10 +30022,6 @@ class CalciteTimePicker {
|
|
|
29878
30022
|
// Properties
|
|
29879
30023
|
//
|
|
29880
30024
|
//--------------------------------------------------------------------------
|
|
29881
|
-
/** The hour value (24-hour format) */
|
|
29882
|
-
this.hour = null;
|
|
29883
|
-
/** Format of the hour value (12-hour or 24-hour) (this will be replaced by locale eventually) */
|
|
29884
|
-
this.hourDisplayFormat = "12";
|
|
29885
30025
|
/** aria-label for the hour input
|
|
29886
30026
|
* @default "Hour"
|
|
29887
30027
|
*/
|
|
@@ -29930,35 +30070,25 @@ class CalciteTimePicker {
|
|
|
29930
30070
|
* @default "Increase second"
|
|
29931
30071
|
*/
|
|
29932
30072
|
this.intlSecondUp = TEXT$2.secondUp;
|
|
29933
|
-
/**
|
|
29934
|
-
|
|
29935
|
-
|
|
29936
|
-
|
|
30073
|
+
/**
|
|
30074
|
+
* BCP 47 language tag for desired language and country format
|
|
30075
|
+
* @internal
|
|
30076
|
+
*/
|
|
30077
|
+
this.locale = document.documentElement.lang || navigator.language || "en";
|
|
29937
30078
|
/** The scale (size) of the time picker */
|
|
29938
30079
|
this.scale = "m";
|
|
29939
30080
|
/** number that specifies the granularity that the value must adhere to */
|
|
29940
30081
|
this.step = 60;
|
|
29941
|
-
|
|
29942
|
-
|
|
29943
|
-
|
|
29944
|
-
// State
|
|
29945
|
-
//
|
|
29946
|
-
// --------------------------------------------------------------------------
|
|
29947
|
-
/** The am/pm value */
|
|
29948
|
-
this.meridiem = null;
|
|
29949
|
-
this.displayHour = this.getDisplayHour();
|
|
29950
|
-
// --------------------------------------------------------------------------
|
|
29951
|
-
//
|
|
29952
|
-
// Private Methods
|
|
29953
|
-
//
|
|
29954
|
-
// --------------------------------------------------------------------------
|
|
30082
|
+
/** The selected time in UTC */
|
|
30083
|
+
this.value = null;
|
|
30084
|
+
this.showSecond = this.step < 60;
|
|
29955
30085
|
this.decrementHour = () => {
|
|
29956
30086
|
const newHour = !this.hour ? 0 : this.hour === "00" ? 23 : parseInt(this.hour) - 1;
|
|
29957
|
-
this.
|
|
30087
|
+
this.setValuePart("hour", newHour);
|
|
29958
30088
|
};
|
|
29959
30089
|
this.decrementMeridiem = () => {
|
|
29960
30090
|
const newMeridiem = this.meridiem === "PM" ? "AM" : "PM";
|
|
29961
|
-
this.
|
|
30091
|
+
this.setValuePart("meridiem", newMeridiem);
|
|
29962
30092
|
};
|
|
29963
30093
|
this.decrementMinuteOrSecond = (key) => {
|
|
29964
30094
|
let newValue;
|
|
@@ -29969,7 +30099,7 @@ class CalciteTimePicker {
|
|
|
29969
30099
|
else {
|
|
29970
30100
|
newValue = 59;
|
|
29971
30101
|
}
|
|
29972
|
-
this.
|
|
30102
|
+
this.setValuePart(key, newValue);
|
|
29973
30103
|
};
|
|
29974
30104
|
this.decrementMinute = () => {
|
|
29975
30105
|
this.decrementMinuteOrSecond("minute");
|
|
@@ -29991,7 +30121,7 @@ class CalciteTimePicker {
|
|
|
29991
30121
|
const keyAsNumber = parseInt(key);
|
|
29992
30122
|
let newHour;
|
|
29993
30123
|
if (isValidNumber(this.hour)) {
|
|
29994
|
-
switch (this.
|
|
30124
|
+
switch (this.hourCycle) {
|
|
29995
30125
|
case "12":
|
|
29996
30126
|
newHour =
|
|
29997
30127
|
this.hour === "01" && keyAsNumber >= 0 && keyAsNumber <= 2
|
|
@@ -30014,13 +30144,13 @@ class CalciteTimePicker {
|
|
|
30014
30144
|
else {
|
|
30015
30145
|
newHour = keyAsNumber;
|
|
30016
30146
|
}
|
|
30017
|
-
this.
|
|
30147
|
+
this.setValuePart("hour", newHour);
|
|
30018
30148
|
}
|
|
30019
30149
|
else {
|
|
30020
30150
|
switch (key) {
|
|
30021
30151
|
case "Backspace":
|
|
30022
30152
|
case "Delete":
|
|
30023
|
-
this.
|
|
30153
|
+
this.setValuePart("hour", null);
|
|
30024
30154
|
break;
|
|
30025
30155
|
case "ArrowDown":
|
|
30026
30156
|
event.preventDefault();
|
|
@@ -30044,7 +30174,7 @@ class CalciteTimePicker {
|
|
|
30044
30174
|
};
|
|
30045
30175
|
this.incrementMeridiem = () => {
|
|
30046
30176
|
const newMeridiem = this.meridiem === "AM" ? "PM" : "AM";
|
|
30047
|
-
this.
|
|
30177
|
+
this.setValuePart("meridiem", newMeridiem);
|
|
30048
30178
|
};
|
|
30049
30179
|
this.incrementHour = () => {
|
|
30050
30180
|
const newHour = isValidNumber(this.hour)
|
|
@@ -30052,7 +30182,7 @@ class CalciteTimePicker {
|
|
|
30052
30182
|
? 0
|
|
30053
30183
|
: parseInt(this.hour) + 1
|
|
30054
30184
|
: 1;
|
|
30055
|
-
this.
|
|
30185
|
+
this.setValuePart("hour", newHour);
|
|
30056
30186
|
};
|
|
30057
30187
|
this.incrementMinuteOrSecond = (key) => {
|
|
30058
30188
|
const newValue = isValidNumber(this[key])
|
|
@@ -30060,7 +30190,7 @@ class CalciteTimePicker {
|
|
|
30060
30190
|
? 0
|
|
30061
30191
|
: parseInt(this[key]) + 1
|
|
30062
30192
|
: 0;
|
|
30063
|
-
this.
|
|
30193
|
+
this.setValuePart(key, newValue);
|
|
30064
30194
|
};
|
|
30065
30195
|
this.incrementMinute = () => {
|
|
30066
30196
|
this.incrementMinuteOrSecond("minute");
|
|
@@ -30076,14 +30206,14 @@ class CalciteTimePicker {
|
|
|
30076
30206
|
this.meridiemKeyDownHandler = (event) => {
|
|
30077
30207
|
switch (event.key) {
|
|
30078
30208
|
case "a":
|
|
30079
|
-
this.
|
|
30209
|
+
this.setValuePart("meridiem", "AM");
|
|
30080
30210
|
break;
|
|
30081
30211
|
case "p":
|
|
30082
|
-
this.
|
|
30212
|
+
this.setValuePart("meridiem", "PM");
|
|
30083
30213
|
break;
|
|
30084
30214
|
case "Backspace":
|
|
30085
30215
|
case "Delete":
|
|
30086
|
-
this.
|
|
30216
|
+
this.setValuePart("meridiem", null);
|
|
30087
30217
|
break;
|
|
30088
30218
|
case "ArrowUp":
|
|
30089
30219
|
event.preventDefault();
|
|
@@ -30124,13 +30254,13 @@ class CalciteTimePicker {
|
|
|
30124
30254
|
else {
|
|
30125
30255
|
newMinute = keyAsNumber;
|
|
30126
30256
|
}
|
|
30127
|
-
this.
|
|
30257
|
+
this.setValuePart("minute", newMinute);
|
|
30128
30258
|
}
|
|
30129
30259
|
else {
|
|
30130
30260
|
switch (key) {
|
|
30131
30261
|
case "Backspace":
|
|
30132
30262
|
case "Delete":
|
|
30133
|
-
this.
|
|
30263
|
+
this.setValuePart("minute", null);
|
|
30134
30264
|
break;
|
|
30135
30265
|
case "ArrowDown":
|
|
30136
30266
|
event.preventDefault();
|
|
@@ -30172,13 +30302,13 @@ class CalciteTimePicker {
|
|
|
30172
30302
|
else {
|
|
30173
30303
|
newSecond = keyAsNumber;
|
|
30174
30304
|
}
|
|
30175
|
-
this.
|
|
30305
|
+
this.setValuePart("second", newSecond);
|
|
30176
30306
|
}
|
|
30177
30307
|
else {
|
|
30178
30308
|
switch (key) {
|
|
30179
30309
|
case "Backspace":
|
|
30180
30310
|
case "Delete":
|
|
30181
|
-
this.
|
|
30311
|
+
this.setValuePart("second", null);
|
|
30182
30312
|
break;
|
|
30183
30313
|
case "ArrowDown":
|
|
30184
30314
|
event.preventDefault();
|
|
@@ -30200,59 +30330,96 @@ class CalciteTimePicker {
|
|
|
30200
30330
|
this.incrementSecond();
|
|
30201
30331
|
}
|
|
30202
30332
|
};
|
|
30203
|
-
this.
|
|
30204
|
-
|
|
30205
|
-
|
|
30206
|
-
|
|
30207
|
-
|
|
30208
|
-
|
|
30209
|
-
|
|
30210
|
-
|
|
30211
|
-
|
|
30212
|
-
|
|
30213
|
-
|
|
30214
|
-
|
|
30215
|
-
|
|
30216
|
-
|
|
30217
|
-
|
|
30218
|
-
|
|
30219
|
-
|
|
30220
|
-
|
|
30221
|
-
|
|
30222
|
-
|
|
30223
|
-
|
|
30224
|
-
|
|
30225
|
-
|
|
30226
|
-
|
|
30227
|
-
|
|
30228
|
-
|
|
30229
|
-
|
|
30230
|
-
|
|
30231
|
-
|
|
30232
|
-
|
|
30233
|
-
|
|
30234
|
-
|
|
30333
|
+
this.setHourEl = (el) => (this.hourEl = el);
|
|
30334
|
+
this.setMeridiemEl = (el) => (this.meridiemEl = el);
|
|
30335
|
+
this.setMinuteEl = (el) => (this.minuteEl = el);
|
|
30336
|
+
this.setSecondEl = (el) => (this.secondEl = el);
|
|
30337
|
+
this.setValue = (value, emit = true) => {
|
|
30338
|
+
if (isValidTime(value)) {
|
|
30339
|
+
const { hour, minute, second } = parseTimeString(value);
|
|
30340
|
+
const { localizedHour, localizedHourSuffix, localizedMinute, localizedMinuteSuffix, localizedSecond, localizedSecondSuffix, localizedMeridiem } = localizeTimeStringToParts(value, this.locale);
|
|
30341
|
+
this.localizedHour = localizedHour;
|
|
30342
|
+
this.localizedHourSuffix = localizedHourSuffix;
|
|
30343
|
+
this.localizedMinute = localizedMinute;
|
|
30344
|
+
this.localizedMinuteSuffix = localizedMinuteSuffix;
|
|
30345
|
+
this.localizedSecond = localizedSecond;
|
|
30346
|
+
this.localizedSecondSuffix = localizedSecondSuffix;
|
|
30347
|
+
this.hour = hour;
|
|
30348
|
+
this.minute = minute;
|
|
30349
|
+
this.second = second;
|
|
30350
|
+
if (localizedMeridiem) {
|
|
30351
|
+
this.localizedMeridiem = localizedMeridiem;
|
|
30352
|
+
this.meridiem = getMeridiem(this.hour);
|
|
30353
|
+
}
|
|
30354
|
+
}
|
|
30355
|
+
else {
|
|
30356
|
+
this.hour = null;
|
|
30357
|
+
this.localizedHour = null;
|
|
30358
|
+
this.localizedHourSuffix = null;
|
|
30359
|
+
this.localizedMeridiem = null;
|
|
30360
|
+
this.localizedMinute = null;
|
|
30361
|
+
this.localizedMinuteSuffix = null;
|
|
30362
|
+
this.localizedSecond = null;
|
|
30363
|
+
this.localizedSecondSuffix = null;
|
|
30364
|
+
this.meridiem = null;
|
|
30365
|
+
this.minute = null;
|
|
30366
|
+
this.second = null;
|
|
30367
|
+
this.value = null;
|
|
30368
|
+
}
|
|
30369
|
+
if (emit) {
|
|
30370
|
+
this.calciteTimePickerChange.emit();
|
|
30371
|
+
}
|
|
30372
|
+
};
|
|
30373
|
+
this.setValuePart = (key, value, emit = true) => {
|
|
30374
|
+
var _a;
|
|
30375
|
+
if (key === "meridiem") {
|
|
30376
|
+
this.meridiem = value;
|
|
30377
|
+
if (isValidNumber(this.hour)) {
|
|
30378
|
+
const hourAsNumber = parseInt(this.hour);
|
|
30379
|
+
switch (value) {
|
|
30380
|
+
case "AM":
|
|
30381
|
+
if (hourAsNumber >= 12) {
|
|
30382
|
+
this.hour = formatTimePart(hourAsNumber - 12);
|
|
30383
|
+
}
|
|
30384
|
+
break;
|
|
30385
|
+
case "PM":
|
|
30386
|
+
if (hourAsNumber < 12) {
|
|
30387
|
+
this.hour = formatTimePart(hourAsNumber + 12);
|
|
30388
|
+
}
|
|
30389
|
+
break;
|
|
30235
30390
|
}
|
|
30236
|
-
|
|
30391
|
+
this.localizedHour = localizeTimePart(this.hour, "hour", this.locale);
|
|
30392
|
+
}
|
|
30393
|
+
}
|
|
30394
|
+
else {
|
|
30395
|
+
this[key] = typeof value === "number" ? formatTimePart(value) : value;
|
|
30396
|
+
this[`localized${capitalize(key)}`] = localizeTimePart(this[key], key, this.locale);
|
|
30397
|
+
}
|
|
30398
|
+
if (this.hour && this.minute) {
|
|
30399
|
+
const showSeconds = this.second && this.showSecond;
|
|
30400
|
+
this.value = `${this.hour}:${this.minute}:${showSeconds ? this.second : "00"}`;
|
|
30401
|
+
}
|
|
30402
|
+
else {
|
|
30403
|
+
this.value = null;
|
|
30237
30404
|
}
|
|
30238
|
-
this.
|
|
30405
|
+
this.localizedMeridiem = this.value
|
|
30406
|
+
? ((_a = localizeTimeStringToParts(this.value, this.locale)) === null || _a === void 0 ? void 0 : _a.localizedMeridiem) || null
|
|
30407
|
+
: localizeTimePart(this.meridiem, "meridiem", this.locale);
|
|
30239
30408
|
if (emit) {
|
|
30240
|
-
this.calciteTimePickerChange.emit(
|
|
30409
|
+
this.calciteTimePickerChange.emit();
|
|
30241
30410
|
}
|
|
30242
30411
|
};
|
|
30243
30412
|
}
|
|
30244
|
-
|
|
30245
|
-
|
|
30246
|
-
|
|
30247
|
-
}
|
|
30413
|
+
localeWatcher(newLocale) {
|
|
30414
|
+
this.hourCycle = getLocaleHourCycle(newLocale);
|
|
30415
|
+
this.setValue(this.value, false);
|
|
30248
30416
|
}
|
|
30249
|
-
|
|
30250
|
-
|
|
30251
|
-
|
|
30252
|
-
|
|
30253
|
-
|
|
30254
|
-
|
|
30255
|
-
this.timeChanged = false;
|
|
30417
|
+
valueWatcher(newValue) {
|
|
30418
|
+
this.setValue(newValue, false);
|
|
30419
|
+
}
|
|
30420
|
+
hourChanged(newHour) {
|
|
30421
|
+
if (this.meridiem && isValidNumber(newHour)) {
|
|
30422
|
+
this.setValuePart("meridiem", getMeridiem(newHour));
|
|
30256
30423
|
}
|
|
30257
30424
|
}
|
|
30258
30425
|
//--------------------------------------------------------------------------
|
|
@@ -30283,7 +30450,7 @@ class CalciteTimePicker {
|
|
|
30283
30450
|
if (this.step !== 60) {
|
|
30284
30451
|
this.setFocus("second");
|
|
30285
30452
|
}
|
|
30286
|
-
else if (this.
|
|
30453
|
+
else if (this.hourCycle === "12") {
|
|
30287
30454
|
this.setFocus("meridiem");
|
|
30288
30455
|
}
|
|
30289
30456
|
break;
|
|
@@ -30295,7 +30462,7 @@ class CalciteTimePicker {
|
|
|
30295
30462
|
this.setFocus("minute");
|
|
30296
30463
|
break;
|
|
30297
30464
|
case "ArrowRight":
|
|
30298
|
-
if (this.
|
|
30465
|
+
if (this.hourCycle === "12") {
|
|
30299
30466
|
this.setFocus("meridiem");
|
|
30300
30467
|
}
|
|
30301
30468
|
break;
|
|
@@ -30325,6 +30492,11 @@ class CalciteTimePicker {
|
|
|
30325
30492
|
var _a;
|
|
30326
30493
|
(_a = this[`${target || "hour"}El`]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
30327
30494
|
}
|
|
30495
|
+
// --------------------------------------------------------------------------
|
|
30496
|
+
//
|
|
30497
|
+
// Private Methods
|
|
30498
|
+
//
|
|
30499
|
+
// --------------------------------------------------------------------------
|
|
30328
30500
|
buttonActivated(event) {
|
|
30329
30501
|
const key = event.key;
|
|
30330
30502
|
if (key === " ") {
|
|
@@ -30332,40 +30504,14 @@ class CalciteTimePicker {
|
|
|
30332
30504
|
}
|
|
30333
30505
|
return isActivationKey(key);
|
|
30334
30506
|
}
|
|
30335
|
-
getDisplayHour() {
|
|
30336
|
-
if (!this.hour) {
|
|
30337
|
-
return "--";
|
|
30338
|
-
}
|
|
30339
|
-
if (this.hourDisplayFormat === "12") {
|
|
30340
|
-
return getMeridiemHour(this.hour);
|
|
30341
|
-
}
|
|
30342
|
-
return this.hour;
|
|
30343
|
-
}
|
|
30344
|
-
getTime() {
|
|
30345
|
-
return {
|
|
30346
|
-
hour: this.hour,
|
|
30347
|
-
minute: this.minute,
|
|
30348
|
-
second: this.second
|
|
30349
|
-
};
|
|
30350
|
-
}
|
|
30351
30507
|
// --------------------------------------------------------------------------
|
|
30352
30508
|
//
|
|
30353
30509
|
// Lifecycle
|
|
30354
30510
|
//
|
|
30355
30511
|
// --------------------------------------------------------------------------
|
|
30356
30512
|
connectedCallback() {
|
|
30357
|
-
|
|
30358
|
-
|
|
30359
|
-
}
|
|
30360
|
-
if (isValidNumber(this.hour)) {
|
|
30361
|
-
this.hour = formatTimePart(parseInt(this.hour));
|
|
30362
|
-
}
|
|
30363
|
-
if (isValidNumber(this.minute)) {
|
|
30364
|
-
this.minute = formatTimePart(parseInt(this.minute));
|
|
30365
|
-
}
|
|
30366
|
-
if (isValidNumber(this.second)) {
|
|
30367
|
-
this.second = formatTimePart(parseInt(this.second));
|
|
30368
|
-
}
|
|
30513
|
+
this.setValue(this.value, false);
|
|
30514
|
+
this.hourCycle = getLocaleHourCycle(this.locale);
|
|
30369
30515
|
}
|
|
30370
30516
|
// --------------------------------------------------------------------------
|
|
30371
30517
|
//
|
|
@@ -30373,66 +30519,69 @@ class CalciteTimePicker {
|
|
|
30373
30519
|
//
|
|
30374
30520
|
// --------------------------------------------------------------------------
|
|
30375
30521
|
render() {
|
|
30376
|
-
const iconScale = this.scale === "s" || this.scale === "m" ? "s" : "m";
|
|
30377
|
-
const includeSeconds = this.step !== 60;
|
|
30378
30522
|
const hourIsNumber = isValidNumber(this.hour);
|
|
30523
|
+
const iconScale = this.scale === "s" || this.scale === "m" ? "s" : "m";
|
|
30379
30524
|
const minuteIsNumber = isValidNumber(this.minute);
|
|
30380
30525
|
const secondIsNumber = isValidNumber(this.second);
|
|
30381
|
-
|
|
30526
|
+
const showMeridiem = this.hourCycle === "12";
|
|
30527
|
+
return (hAsync("div", { class: {
|
|
30528
|
+
[CSS$5.timePicker]: true,
|
|
30529
|
+
[CSS$5.showMeridiem]: showMeridiem,
|
|
30530
|
+
[CSS$5.showSecond]: this.showSecond,
|
|
30531
|
+
[CSS$5[`scale-${this.scale}`]]: true
|
|
30532
|
+
} }, hAsync("div", { class: CSS$5.column, role: "group" }, hAsync("span", { "aria-label": this.intlHourUp, class: {
|
|
30382
30533
|
[CSS$5.button]: true,
|
|
30383
30534
|
[CSS$5.buttonHourUp]: true,
|
|
30384
30535
|
[CSS$5.buttonTopLeft]: true
|
|
30385
|
-
}, onClick: this.incrementHour, onKeyDown: this.hourUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, hAsync("calcite-icon", { icon: "chevron-up", scale: iconScale })), hAsync("span", { "aria-label": this.intlHour, "aria-valuemax": "23", "aria-valuemin": "1", "aria-valuenow": hourIsNumber && parseInt(this.hour), "aria-valuetext": this.hour, class: {
|
|
30536
|
+
}, onClick: this.incrementHour, onKeyDown: this.hourUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, hAsync("calcite-icon", { icon: "chevron-up", scale: iconScale })), hAsync("span", { "aria-label": this.intlHour, "aria-valuemax": "23", "aria-valuemin": "1", "aria-valuenow": (hourIsNumber && parseInt(this.hour)) || "0", "aria-valuetext": this.hour, class: {
|
|
30386
30537
|
[CSS$5.input]: true,
|
|
30387
30538
|
[CSS$5.hour]: true
|
|
30388
|
-
}, onFocus: this.focusHandler, onKeyDown: this.hourKeyDownHandler, ref:
|
|
30539
|
+
}, onFocus: this.focusHandler, onKeyDown: this.hourKeyDownHandler, ref: this.setHourEl, role: "spinbutton", tabIndex: 0 }, this.localizedHour || "--"), hAsync("span", { "aria-label": this.intlHourDown, class: {
|
|
30389
30540
|
[CSS$5.button]: true,
|
|
30390
30541
|
[CSS$5.buttonHourDown]: true,
|
|
30391
30542
|
[CSS$5.buttonBottomLeft]: true
|
|
30392
|
-
}, onClick: this.decrementHour, onKeyDown: this.hourDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, hAsync("calcite-icon", { icon: "chevron-down", scale: iconScale }))), hAsync("span", { class: CSS$5.delimiter },
|
|
30543
|
+
}, onClick: this.decrementHour, onKeyDown: this.hourDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, hAsync("calcite-icon", { icon: "chevron-down", scale: iconScale }))), hAsync("span", { class: CSS$5.delimiter }, this.localizedHourSuffix), hAsync("div", { class: CSS$5.column, role: "group" }, hAsync("span", { "aria-label": this.intlMinuteUp, class: {
|
|
30393
30544
|
[CSS$5.button]: true,
|
|
30394
30545
|
[CSS$5.buttonMinuteUp]: true
|
|
30395
|
-
}, onClick: this.incrementMinute, onKeyDown: this.minuteUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, hAsync("calcite-icon", { icon: "chevron-up", scale: iconScale })), hAsync("span", { "aria-label": this.intlMinute, "aria-valuemax": "12", "aria-valuemin": "1", "aria-valuenow": minuteIsNumber && parseInt(this.minute), "aria-valuetext": this.minute, class: {
|
|
30546
|
+
}, onClick: this.incrementMinute, onKeyDown: this.minuteUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, hAsync("calcite-icon", { icon: "chevron-up", scale: iconScale })), hAsync("span", { "aria-label": this.intlMinute, "aria-valuemax": "12", "aria-valuemin": "1", "aria-valuenow": (minuteIsNumber && parseInt(this.minute)) || "0", "aria-valuetext": this.minute, class: {
|
|
30396
30547
|
[CSS$5.input]: true,
|
|
30397
30548
|
[CSS$5.minute]: true
|
|
30398
|
-
}, onFocus: this.focusHandler, onKeyDown: this.minuteKeyDownHandler, ref:
|
|
30549
|
+
}, onFocus: this.focusHandler, onKeyDown: this.minuteKeyDownHandler, ref: this.setMinuteEl, role: "spinbutton", tabIndex: 0 }, this.localizedMinute || "--"), hAsync("span", { "aria-label": this.intlMinuteDown, class: {
|
|
30399
30550
|
[CSS$5.button]: true,
|
|
30400
30551
|
[CSS$5.buttonMinuteDown]: true
|
|
30401
|
-
}, onClick: this.decrementMinute, onKeyDown: this.minuteDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, hAsync("calcite-icon", { icon: "chevron-down", scale: iconScale }))),
|
|
30552
|
+
}, onClick: this.decrementMinute, onKeyDown: this.minuteDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, hAsync("calcite-icon", { icon: "chevron-down", scale: iconScale }))), this.showSecond && hAsync("span", { class: CSS$5.delimiter }, this.localizedMinuteSuffix), this.showSecond && (hAsync("div", { class: CSS$5.column, role: "group" }, hAsync("span", { "aria-label": this.intlSecondUp, class: {
|
|
30402
30553
|
[CSS$5.button]: true,
|
|
30403
30554
|
[CSS$5.buttonSecondUp]: true
|
|
30404
|
-
}, onClick: this.incrementSecond, onKeyDown: this.secondUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, hAsync("calcite-icon", { icon: "chevron-up", scale: iconScale })), hAsync("span", { "aria-label": this.intlSecond, "aria-valuemax": "59", "aria-valuemin": "0", "aria-valuenow": secondIsNumber && parseInt(this.second), "aria-valuetext": this.second, class: {
|
|
30555
|
+
}, onClick: this.incrementSecond, onKeyDown: this.secondUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, hAsync("calcite-icon", { icon: "chevron-up", scale: iconScale })), hAsync("span", { "aria-label": this.intlSecond, "aria-valuemax": "59", "aria-valuemin": "0", "aria-valuenow": (secondIsNumber && parseInt(this.second)) || "0", "aria-valuetext": this.second, class: {
|
|
30405
30556
|
[CSS$5.input]: true,
|
|
30406
30557
|
[CSS$5.second]: true
|
|
30407
|
-
}, onFocus: this.focusHandler, onKeyDown: this.secondKeyDownHandler, ref:
|
|
30558
|
+
}, onFocus: this.focusHandler, onKeyDown: this.secondKeyDownHandler, ref: this.setSecondEl, role: "spinbutton", tabIndex: 0 }, this.localizedSecond || "--"), hAsync("span", { "aria-label": this.intlSecondDown, class: {
|
|
30408
30559
|
[CSS$5.button]: true,
|
|
30409
30560
|
[CSS$5.buttonSecondDown]: true
|
|
30410
|
-
}, onClick: this.decrementSecond, onKeyDown: this.secondDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, hAsync("calcite-icon", { icon: "chevron-down", scale: iconScale })))), this.
|
|
30561
|
+
}, onClick: this.decrementSecond, onKeyDown: this.secondDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, hAsync("calcite-icon", { icon: "chevron-down", scale: iconScale })))), this.localizedSecondSuffix && (hAsync("span", { class: CSS$5.delimiter }, this.localizedSecondSuffix)), showMeridiem && (hAsync("div", { class: CSS$5.column, role: "group" }, hAsync("span", { "aria-label": this.intlMeridiemUp, class: {
|
|
30411
30562
|
[CSS$5.button]: true,
|
|
30412
30563
|
[CSS$5.buttonMeridiemUp]: true,
|
|
30413
30564
|
[CSS$5.buttonTopRight]: true
|
|
30414
|
-
}, onClick: this.incrementMeridiem, onKeyDown: this.meridiemUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, hAsync("calcite-icon", { icon: "chevron-up", scale: iconScale })), hAsync("span", { "aria-label": this.intlMeridiem, "aria-valuemax": "2", "aria-valuemin": "1", "aria-valuenow": this.meridiem === "
|
|
30565
|
+
}, onClick: this.incrementMeridiem, onKeyDown: this.meridiemUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, hAsync("calcite-icon", { icon: "chevron-up", scale: iconScale })), hAsync("span", { "aria-label": this.intlMeridiem, "aria-valuemax": "2", "aria-valuemin": "1", "aria-valuenow": (this.meridiem === "PM" && "2") || "1", "aria-valuetext": this.meridiem, class: {
|
|
30415
30566
|
[CSS$5.input]: true,
|
|
30416
30567
|
[CSS$5.meridiem]: true
|
|
30417
|
-
}, onFocus: this.focusHandler, onKeyDown: this.meridiemKeyDownHandler, ref:
|
|
30568
|
+
}, onFocus: this.focusHandler, onKeyDown: this.meridiemKeyDownHandler, ref: this.setMeridiemEl, role: "spinbutton", tabIndex: 0 }, this.localizedMeridiem || "--"), hAsync("span", { "aria-label": this.intlMeridiemDown, class: {
|
|
30418
30569
|
[CSS$5.button]: true,
|
|
30419
30570
|
[CSS$5.buttonMeridiemDown]: true,
|
|
30420
30571
|
[CSS$5.buttonBottomRight]: true
|
|
30421
|
-
}, onClick: this.decrementMeridiem, onKeyDown: this.meridiemDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, hAsync("calcite-icon", { icon: "chevron-down", scale: iconScale }))))))
|
|
30572
|
+
}, onClick: this.decrementMeridiem, onKeyDown: this.meridiemDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, hAsync("calcite-icon", { icon: "chevron-down", scale: iconScale }))))));
|
|
30422
30573
|
}
|
|
30423
30574
|
get el() { return getElement(this); }
|
|
30424
30575
|
static get watchers() { return {
|
|
30425
|
-
"
|
|
30426
|
-
"
|
|
30427
|
-
"
|
|
30576
|
+
"locale": ["localeWatcher"],
|
|
30577
|
+
"value": ["valueWatcher"],
|
|
30578
|
+
"hour": ["hourChanged"]
|
|
30428
30579
|
}; }
|
|
30429
30580
|
static get style() { return calciteTimePickerCss; }
|
|
30430
30581
|
static get cmpMeta() { return {
|
|
30431
30582
|
"$flags$": 9,
|
|
30432
30583
|
"$tagName$": "calcite-time-picker",
|
|
30433
30584
|
"$members$": {
|
|
30434
|
-
"hour": [1025],
|
|
30435
|
-
"hourDisplayFormat": [513, "hour-display-format"],
|
|
30436
30585
|
"intlHour": [1, "intl-hour"],
|
|
30437
30586
|
"intlHourDown": [1, "intl-hour-down"],
|
|
30438
30587
|
"intlHourUp": [1, "intl-hour-up"],
|
|
@@ -30445,17 +30594,28 @@ class CalciteTimePicker {
|
|
|
30445
30594
|
"intlSecond": [1, "intl-second"],
|
|
30446
30595
|
"intlSecondDown": [1, "intl-second-down"],
|
|
30447
30596
|
"intlSecondUp": [1, "intl-second-up"],
|
|
30448
|
-
"
|
|
30449
|
-
"
|
|
30450
|
-
"
|
|
30451
|
-
"
|
|
30597
|
+
"locale": [1025, "lang"],
|
|
30598
|
+
"scale": [1],
|
|
30599
|
+
"step": [2],
|
|
30600
|
+
"value": [1025],
|
|
30601
|
+
"hour": [32],
|
|
30602
|
+
"hourCycle": [32],
|
|
30603
|
+
"localizedHour": [32],
|
|
30604
|
+
"localizedHourSuffix": [32],
|
|
30605
|
+
"localizedMeridiem": [32],
|
|
30606
|
+
"localizedMinute": [32],
|
|
30607
|
+
"localizedMinuteSuffix": [32],
|
|
30608
|
+
"localizedSecond": [32],
|
|
30609
|
+
"localizedSecondSuffix": [32],
|
|
30452
30610
|
"meridiem": [32],
|
|
30453
|
-
"
|
|
30611
|
+
"minute": [32],
|
|
30612
|
+
"second": [32],
|
|
30613
|
+
"showSecond": [32],
|
|
30454
30614
|
"setFocus": [64]
|
|
30455
30615
|
},
|
|
30456
30616
|
"$listeners$": [[0, "blur", "hostBlurHandler"], [0, "focus", "hostFocusHandler"], [0, "keydown", "keyDownHandler"]],
|
|
30457
30617
|
"$lazyBundleId$": "-",
|
|
30458
|
-
"$attrsToReflect$": [
|
|
30618
|
+
"$attrsToReflect$": []
|
|
30459
30619
|
}; }
|
|
30460
30620
|
}
|
|
30461
30621
|
|