@mapsindoors/map-template 1.16.0 → 1.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/{combo-box-item.entry-48605f24.mjs → combo-box-item.entry-3bdf398c.mjs} +1 -1
- package/dist/mapsindoors-react.es.js +2 -2
- package/dist/mapsindoors-react.umd.js +58 -58
- package/dist/mapsindoors-webcomponent.es.js +49608 -3
- package/dist/mapsindoors-webcomponent.umd.js +82 -82
- package/dist/{mi-card_2.entry-c2d6e4cb.mjs → mi-card_2.entry-40da4c22.mjs} +1 -1
- package/dist/{mi-chip.entry-220d7527.mjs → mi-chip.entry-8361080b.mjs} +1 -1
- package/dist/{mi-column.entry-07e53d71.mjs → mi-column.entry-1a4d1bd7.mjs} +1 -1
- package/dist/{mi-combo-box.entry-4633c7be.mjs → mi-combo-box.entry-3512ddbe.mjs} +1 -1
- package/dist/{mi-data-table.entry-07472817.mjs → mi-data-table.entry-3220f2be.mjs} +1 -1
- package/dist/{mi-distance_2.entry-e986eb84.mjs → mi-distance_2.entry-dcbb24c5.mjs} +1 -1
- package/dist/{mi-dropdown-item.entry-b9ca8157.mjs → mi-dropdown-item.entry-280ba4ce.mjs} +1 -1
- package/dist/{mi-dropdown.entry-08e0244a.mjs → mi-dropdown.entry-6c8f21d6.mjs} +1 -1
- package/dist/{mi-floor-selector.entry-b5ab3ede.mjs → mi-floor-selector.entry-5305d533.mjs} +5 -3
- package/dist/{mi-keyboard.entry-3ab79e44.mjs → mi-keyboard.entry-fcd58e0d.mjs} +1 -1
- package/dist/{mi-list-item-category.entry-99c79322.mjs → mi-list-item-category.entry-01d06afa.mjs} +1 -1
- package/dist/{mi-list-item-location.entry-e4973248.mjs → mi-list-item-location.entry-71cad82b.mjs} +9 -9
- package/dist/{mi-list.entry-c3fa0533.mjs → mi-list.entry-6b662039.mjs} +1 -1
- package/dist/{mi-location-booking.entry-e9fb4056.mjs → mi-location-booking.entry-3ede4961.mjs} +1 -1
- package/dist/{mi-location-info.entry-281b75cd.mjs → mi-location-info.entry-bc94c6aa.mjs} +1 -1
- package/dist/{mi-map-googlemaps.entry-2cc3d7bd.mjs → mi-map-googlemaps.entry-92d13571.mjs} +1 -1
- package/dist/{mi-map-mapbox.entry-c19c1c01.mjs → mi-map-mapbox.entry-793e7606.mjs} +1 -1
- package/dist/{mi-metric-card.entry-0333ee8a.mjs → mi-metric-card.entry-517557b8.mjs} +1 -1
- package/dist/{mi-my-position.entry-25e1230b.mjs → mi-my-position.entry-f10f3919.mjs} +1 -1
- package/dist/{mi-notification.entry-eb6fb735.mjs → mi-notification.entry-cc765c3c.mjs} +1 -1
- package/dist/{mi-route-instructions-heading.entry-bf1207a4.mjs → mi-route-instructions-heading.entry-4d3417ae.mjs} +1 -1
- package/dist/{mi-route-instructions-maneuver-legacy.entry-176db576.mjs → mi-route-instructions-maneuver-legacy.entry-ff7e6758.mjs} +1 -1
- package/dist/{mi-route-instructions-maneuver.entry-b34bfa44.mjs → mi-route-instructions-maneuver.entry-5d1bf1ef.mjs} +1 -1
- package/dist/{mi-route-instructions-step-legacy.entry-e4e2120f.mjs → mi-route-instructions-step-legacy.entry-9c75f214.mjs} +1 -1
- package/dist/{mi-route-instructions-step.entry-f780f5aa.mjs → mi-route-instructions-step.entry-b5588bd5.mjs} +1 -1
- package/dist/{mi-route-instructions.entry-b29c7a01.mjs → mi-route-instructions.entry-71ff4605.mjs} +1 -1
- package/dist/{mi-scroll-buttons.entry-8f20f782.mjs → mi-scroll-buttons.entry-312b45dd.mjs} +1 -1
- package/dist/{mi-search.entry-c699085d.mjs → mi-search.entry-a7b3ccc6.mjs} +1 -1
- package/dist/{mi-share-sms.entry-1e719dbf.mjs → mi-share-sms.entry-89c98479.mjs} +1 -1
- package/dist/{mi-step-switcher.entry-929d9c22.mjs → mi-step-switcher.entry-a5889eaf.mjs} +1 -1
- package/dist/{mi-tab-panel.entry-d60faca8.mjs → mi-tab-panel.entry-065b3497.mjs} +1 -1
- package/dist/{mi-tab.entry-be23d7c0.mjs → mi-tab.entry-44ba1f0f.mjs} +1 -1
- package/dist/{mi-tabs.entry-8c7a7879.mjs → mi-tabs.entry-9b0f103f.mjs} +1 -1
- package/dist/{mi-time.entry-646cf512.mjs → mi-time.entry-591fe0bd.mjs} +1 -1
- package/dist/{reactcomponent-f1212b63.mjs → reactcomponent-2fa842c6.mjs} +11114 -10904
- package/package.json +4 -1
- package/dist/combo-box-item.entry-f9f13752.mjs +0 -12
- package/dist/mi-card_2.entry-1a72c651.mjs +0 -23
- package/dist/mi-chip.entry-f647e52f.mjs +0 -16
- package/dist/mi-column.entry-4ffe12c8.mjs +0 -18
- package/dist/mi-combo-box.entry-e13b79dd.mjs +0 -260
- package/dist/mi-data-table.entry-69d09420.mjs +0 -213
- package/dist/mi-distance_2.entry-4c4448a4.mjs +0 -54
- package/dist/mi-dropdown-item.entry-c2a28628.mjs +0 -12
- package/dist/mi-dropdown.entry-1a63efa5.mjs +0 -296
- package/dist/mi-floor-selector.entry-688f9b1a.mjs +0 -110
- package/dist/mi-keyboard.entry-4dd75752.mjs +0 -2960
- package/dist/mi-list-item-category.entry-fa0d749e.mjs +0 -36
- package/dist/mi-list-item-location.entry-8ce424e5.mjs +0 -134
- package/dist/mi-list.entry-79bbeb09.mjs +0 -39
- package/dist/mi-location-booking.entry-3ea227d8.mjs +0 -4863
- package/dist/mi-location-info.entry-da932325.mjs +0 -29
- package/dist/mi-map-googlemaps.entry-ed869826.mjs +0 -396
- package/dist/mi-map-mapbox.entry-64063ac6.mjs +0 -298
- package/dist/mi-metric-card.entry-c7e0ead2.mjs +0 -26
- package/dist/mi-my-position.entry-39daf02a.mjs +0 -1396
- package/dist/mi-notification.entry-ebcbc0cd.mjs +0 -81
- package/dist/mi-route-instructions-heading.entry-343f11db.mjs +0 -72
- package/dist/mi-route-instructions-maneuver-legacy.entry-85fdbc9b.mjs +0 -73
- package/dist/mi-route-instructions-maneuver.entry-e9c4bf8d.mjs +0 -73
- package/dist/mi-route-instructions-step-legacy.entry-0f55fb47.mjs +0 -199
- package/dist/mi-route-instructions-step.entry-5f4cd9de.mjs +0 -234
- package/dist/mi-route-instructions.entry-ece4fa37.mjs +0 -140
- package/dist/mi-scroll-buttons.entry-9f426250.mjs +0 -46
- package/dist/mi-search.entry-81d35326.mjs +0 -240
- package/dist/mi-share-sms.entry-994a87b1.mjs +0 -53
- package/dist/mi-step-switcher.entry-b53eb2bc.mjs +0 -24
- package/dist/mi-tab-panel.entry-464dc246.mjs +0 -19
- package/dist/mi-tab.entry-4da5bba3.mjs +0 -11
- package/dist/mi-tabs.entry-cbe62a06.mjs +0 -34
- package/dist/mi-time.entry-7b94fad6.mjs +0 -43
- package/dist/webcomponent-e45720b9.mjs +0 -36539
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { r as a, c as i, h as e } from "./webcomponent-e45720b9.mjs";
|
|
2
|
-
const d = 'a.mi-button{cursor:default}.mi-button{border-radius:4px;border-width:1px;border-style:solid;font-family:Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:500;padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;display:inline-flex;align-items:center}.mi-button:disabled{opacity:0.48;cursor:not-allowed}.mi-button object{filter:invert(9%) sepia(13%) saturate(692%) hue-rotate(185deg) brightness(98%) contrast(91%);width:16px;height:16px}.mi-button--small{padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;font-size:0.875rem;height:32px}.mi-button--small object{width:16px;height:16px}.mi-button--large{padding-left:16px;padding-right:16px;font-size:1.25rem}.mi-button--large object{width:20px;height:20px}.mi-button--full-width{width:100%;justify-content:center}.mi-button--icon-left{padding-left:12px}.mi-button--icon-left object{margin-right:8px}.mi-button--icon-right{padding-right:12px}.mi-button--icon-right object{margin-left:8px}.mi-button--icon-both{padding-top:12px;padding-bottom:12px}.mi-button--icon-both object:first-of-type{margin-right:8px}.mi-button--icon-both object:last-of-type{margin-left:8px}.mi-button--base{background:linear-gradient(#f5f7fa, #ebeff5);color:#1e2025;border-color:#c8d0e0}.mi-button--base:not(:disabled):hover{background:linear-gradient(#ebeff5, #dee3ed);border-color:#aeb9cb}.mi-button--base:not(:disabled):active{background:linear-gradient(#dee3ed, #ebeff5)}.mi-button--primary{color:#ffffff;border-color:#20693e;background:linear-gradient(#3ba064, #2a844e)}.mi-button--primary object{filter:invert(100%) sepia(93%) saturate(0%) hue-rotate(201deg) brightness(106%) contrast(106%)}.mi-button--primary:not(:disabled):hover{background:linear-gradient(#2a844e, #20693e)}.mi-button--primary:not(:disabled):active{background:linear-gradient(#20693e, #2a844e)}.mi-button--delete{background:linear-gradient(#f55151, #de1b1b);color:#ffffff;border-color:#ba0d0d}.mi-button--delete object{filter:invert(100%) sepia(93%) saturate(0%) hue-rotate(201deg) brightness(106%) contrast(106%)}.mi-button--delete:not(:disabled):hover{background:linear-gradient(#de1b1b, #ba0d0d)}.mi-button--delete:not(:disabled):active{background:linear-gradient(#ba0d0d, #de1b1b)}.mi-button--outline{color:#3071d9;border-color:#3071d9;background-color:transparent}.mi-button--outline object{filter:invert(38%) sepia(97%) saturate(742%) hue-rotate(188deg) brightness(86%) contrast(97%)}.mi-button--outline:not(:disabled):hover{color:#1d5bbf;border-color:#1d5bbf;background-color:#eef4fc}.mi-button--outline:not(:disabled):active{color:#1d5bbf;border-color:#1d5bbf;background-color:#cfe0fc}.mi-button--link{color:#3071d9;border-style:none;background-color:transparent;cursor:pointer}.mi-button--link object{filter:invert(38%) sepia(97%) saturate(742%) hue-rotate(188deg) brightness(86%) contrast(97%)}.mi-button--link:not(:disabled):hover{color:#1d5bbf;border-color:#1d5bbf;background-color:#eef4fc}.mi-button--link:disabled:hover{cursor:not-allowed}.mi-button--link:not(:disabled):active{color:#1d5bbf;border-color:#1d5bbf;background-color:#cfe0fc}.width-none{width:0}.width-xxx-small{width:2px}.width-xx-small{width:4px}.width-x-small{width:8px}.width-small{width:12px}.width-medium{width:16px}.width-large{width:24px}.width-x-large{width:32px}.width-xx-large{width:40px}.width-xxx-large{width:48px}.width-xxxx-large{width:64px}.min-width-none{min-width:0}.min-width-xxx-small{min-width:2px}.min-width-xx-small{min-width:4px}.min-width-x-small{min-width:8px}.min-width-small{min-width:12px}.min-width-medium{min-width:16px}.min-width-large{min-width:24px}.min-width-x-large{min-width:32px}.min-width-xx-large{min-width:40px}.min-width-xxx-large{min-width:48px}.min-width-xxxx-large{min-width:64px}.max-width-none{max-width:0}.max-width-xxx-small{max-width:2px}.max-width-xx-small{max-width:4px}.max-width-x-small{max-width:8px}.max-width-small{max-width:12px}.max-width-medium{max-width:16px}.max-width-large{max-width:24px}.max-width-x-large{max-width:32px}.max-width-xx-large{max-width:40px}.max-width-xxx-large{max-width:48px}.max-width-xxxx-large{max-width:64px}.height-none{height:0}.height-xxx-small{height:2px}.height-xx-small{height:4px}.height-x-small{height:8px}.height-small{height:12px}.height-medium{height:16px}.height-large{height:24px}.height-x-large{height:32px}.height-xx-large{height:40px}.height-xxx-large{height:48px}.height-xxxx-large{height:64px}.min-height-none{min-height:0}.min-height-xxx-small{min-height:2px}.min-height-xx-small{min-height:4px}.min-height-x-small{min-height:8px}.min-height-small{min-height:12px}.min-height-medium{min-height:16px}.min-height-large{min-height:24px}.min-height-x-large{min-height:32px}.min-height-xx-large{min-height:40px}.min-height-xxx-large{min-height:48px}.min-height-xxxx-large{min-height:64px}.max-height-none{max-height:0}.max-height-xxx-small{max-height:2px}.max-height-xx-small{max-height:4px}.max-height-x-small{max-height:8px}.max-height-small{max-height:12px}.max-height-medium{max-height:16px}.max-height-large{max-height:24px}.max-height-x-large{max-height:32px}.max-height-xx-large{max-height:40px}.max-height-xxx-large{max-height:48px}.max-height-xxxx-large{max-height:64px}.debug *{outline:1px solid gold}.flex{display:flex;flex:1}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.display-block{display:block}.display-inline-block{display:inline-block}.display-inline{display:inline}.display-none{display:none}.text-decoration-none{text-decoration:none}.text-right{text-align:right}.text-left{text-align:left}.text-center{text-align:center}.margin-auto{margin-left:auto;margin-right:auto}form .inputs{margin:0 auto;width:80%;padding-top:32px;padding-bottom:32px;position:relative;display:flex;flex-direction:row;align-items:center}form .inputs span.plus-sign{position:absolute;left:16px;display:block;font-size:1rem;font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#1c1917;top:50%;transform:translateY(-50%)}form .inputs input{padding-left:12px;padding-right:12px;background-color:#ffffff;border-style:solid;border-width:1px;border-radius:8px;height:48px;font-size:1.25rem;font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#1c1917;box-sizing:border-box}form .inputs input:focus{border-color:#3b82f6;box-shadow:0 0 0 2px #dbeafe}form .inputs input.country-code{width:15%;min-width:88px;margin-right:16px;padding-left:32px}form .inputs input.phone-number{width:85%}form button{margin-top:32px;margin-bottom:24px}', l = class {
|
|
3
|
-
constructor(t) {
|
|
4
|
-
a(this, t), this.successfullySent = i(this, "successfullySent", 7), this.unsuccessfullySent = i(this, "unsuccessfullySent", 7), this.submitFormHandler = (n) => {
|
|
5
|
-
n.preventDefault();
|
|
6
|
-
const o = !!(this.venueId && this.originLocationId && this.destinationLocationId);
|
|
7
|
-
if (!this.formElement.checkValidity() || !o) {
|
|
8
|
-
this.countryCodeInputElement.validity.valid || this.countryCodeInputElement.focus(), this.phoneNumberInputElement.validity.valid || this.phoneNumberInputElement.focus();
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
mapsindoors.services.ShareService.directionsToPhone(this.venueId, this.originLocationId, this.destinationLocationId, this.countryCodeInputElement.value, this.phoneNumberInputElement.value).then(() => this.successfullySent.emit()).catch((r) => this.unsuccessfullySent.emit(r));
|
|
12
|
-
}, this.venueId = void 0, this.originLocationId = void 0, this.destinationLocationId = void 0, this.countryCode = "1", this.phoneNumberInputPlaceholder = "Enter phone number", this.submitButtonLabel = "Send SMS";
|
|
13
|
-
}
|
|
14
|
-
componentDidRender() {
|
|
15
|
-
this.countryCodeInputElement.value = this.countryCode;
|
|
16
|
-
}
|
|
17
|
-
componentDidLoad() {
|
|
18
|
-
this.addIntersectionObserver();
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Observe the input field for phone number and focus it on intersection.
|
|
22
|
-
*/
|
|
23
|
-
addIntersectionObserver() {
|
|
24
|
-
this.intersectionObserver = new IntersectionObserver((t) => {
|
|
25
|
-
t[0].intersectionRatio <= 0 || (this.phoneNumberInputElement.focus(), this.intersectionObserver.disconnect());
|
|
26
|
-
}), this.intersectionObserver.observe(this.phoneNumberInputElement);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Set input attribute on mi-keyboard component.
|
|
30
|
-
*
|
|
31
|
-
* @param {FocusEvent} event
|
|
32
|
-
*/
|
|
33
|
-
setKeyboardInputElement(t) {
|
|
34
|
-
this.miKeyboardElement.inputElement = t.target;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Update form validity.
|
|
38
|
-
*/
|
|
39
|
-
updateFormValidity() {
|
|
40
|
-
if (!this.formElement.checkValidity()) {
|
|
41
|
-
this.submitButtonElement.disabled = !0;
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
this.submitButtonElement.disabled = !1;
|
|
45
|
-
}
|
|
46
|
-
render() {
|
|
47
|
-
return e("form", { onSubmit: this.submitFormHandler, ref: (t) => this.formElement = t }, e("div", { class: "inputs" }, e("span", { class: "plus-sign" }, "+"), e("input", { id: "country-code", class: "country-code", pattern: "[0-9]{1,3}", required: !0, autocomplete: "off", type: "text", placeholder: this.countryCode, ref: (t) => this.countryCodeInputElement = t, onInput: () => this.updateFormValidity(), onFocus: (t) => this.setKeyboardInputElement(t) }), e("input", { id: "phone-number", class: "phone-number", pattern: "[0-9]{6,10}", required: !0, autocomplete: "off", type: "text", placeholder: this.phoneNumberInputPlaceholder, ref: (t) => this.phoneNumberInputElement = t, onInput: () => this.updateFormValidity(), onFocus: (t) => this.setKeyboardInputElement(t) })), e("mi-keyboard", { layout: "numeric", ref: (t) => this.miKeyboardElement = t }), e("div", { class: "flex justify-center" }, e("button", { type: "submit", disabled: !0, class: "mi-button mi-button--primary", ref: (t) => this.submitButtonElement = t }, this.submitButtonLabel)));
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
l.style = d;
|
|
51
|
-
export {
|
|
52
|
-
l as mi_share_sms
|
|
53
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { r as n, c as d, h as t, H as p } from "./webcomponent-e45720b9.mjs";
|
|
2
|
-
const h = ":host{display:flex}button{padding:16px;background-color:transparent;border:none}button:disabled svg{fill:#d1d5db}button svg{fill:#1f2937}div.steps{padding-top:12px;padding-bottom:12px;padding-left:4px;padding-right:4px;display:flex;flex-grow:1;flex-direction:column;vertical-align:center;justify-content:center}div.steps p{margin:0;padding-bottom:8px;color:#1c1917;font-size:1rem;font-weight:500;line-height:1.25rem;text-align:center}div.steps__dots{display:flex;justify-content:center}div.steps__dots span{width:8px;height:8px;margin-right:8px;float:left;background-color:#d1d5db;border-radius:50%}div.steps__dots span.active{background-color:#1f2937}div.steps__dots span:last-child{margin-right:0px}", o = class {
|
|
3
|
-
constructor(e) {
|
|
4
|
-
n(this, e), this.stepIndexChanged = d(this, "stepIndexChanged", 7), this.heading = void 0, this.steps = [], this.stepIndex = 0;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Set step index and emit stepIndexChanged event.
|
|
8
|
-
*
|
|
9
|
-
* @param {number} index
|
|
10
|
-
*/
|
|
11
|
-
setStepIndex(e) {
|
|
12
|
-
this.stepIndex = e, this.stepIndexChanged.emit(this.stepIndex);
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
return t(p, null, t("button", { type: "button", disabled: this.steps.length === 0 || this.stepIndex === 0, onClick: () => this.setStepIndex(this.stepIndex - 1) }, t("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24px", height: "24px" }, t("path", { d: "M0 0h24v24H0V0z", fill: "none" }), t("path", { d: "M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z" }))), t("div", { class: "steps" }, this.heading ? t("p", { part: "heading" }, this.heading) : null, t("div", { class: "steps__dots" }, this.steps.map((e, i) => {
|
|
16
|
-
const s = this.stepIndex === i;
|
|
17
|
-
return t("span", { part: s ? "active-dot" : "dot", class: { active: s } });
|
|
18
|
-
}))), t("button", { type: "button", disabled: this.steps.length === 0 || this.stepIndex === this.steps.length - 1, onClick: () => this.setStepIndex(this.stepIndex + 1) }, t("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24px", height: "24px" }, t("path", { d: "M0 0h24v24H0V0z", fill: "none" }), t("path", { d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z" }))));
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
o.style = h;
|
|
22
|
-
export {
|
|
23
|
-
o as mi_step_switcher
|
|
24
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { r as i, h as s } from "./webcomponent-e45720b9.mjs";
|
|
2
|
-
const t = 'div{display:none}div.active{font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";flex-shrink:0;flex-grow:1;display:block}', a = class {
|
|
3
|
-
constructor(e) {
|
|
4
|
-
i(this, e), this.isActive = !1;
|
|
5
|
-
}
|
|
6
|
-
async active(e) {
|
|
7
|
-
return e !== void 0 && (this.isActive = !!e), this.isActive;
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
const e = {
|
|
11
|
-
active: this.isActive
|
|
12
|
-
};
|
|
13
|
-
return s("div", { class: e }, s("slot", null));
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
a.style = t;
|
|
17
|
-
export {
|
|
18
|
-
a as mi_tab_panel
|
|
19
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { r as a, h as o, H as l, g as d } from "./webcomponent-e45720b9.mjs";
|
|
2
|
-
const b = ':host{font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";flex-shrink:0;flex-grow:1}:host .nav{border:none;border-bottom:solid;border-color:#d1d5db;border-width:1px;padding-left:24px}:host .nav--borderless-bottom{border-bottom:0}:host .nav ul{display:flex;flex-direction:row;padding:0;margin:0;margin-bottom:-1px}:host .nav ul li{list-style:none;text-align:center;cursor:pointer;padding:16px;border-width:1px;border-style:solid;border-color:rgba(0, 0, 0, 0)}:host .nav ul li.active{background-color:#f9fafb;border-color:#d1d5db;border-width:1px;border-style:solid;border-bottom:none;border-top-left-radius:4px;border-top-right-radius:4px;font-weight:600}:host .content{display:block;padding:16px;background-color:#f9fafb}:host .content--bordered{border-width:1px;border-color:#d1d5db;border-style:solid;border-radius:4px}', c = class {
|
|
3
|
-
constructor(e) {
|
|
4
|
-
a(this, e), this.active = 0, this.bordered = !1, this.tabs = void 0;
|
|
5
|
-
}
|
|
6
|
-
connectedCallback() {
|
|
7
|
-
new MutationObserver(this.componentWillRender.bind(this)).observe(this.el, { childList: !0 });
|
|
8
|
-
}
|
|
9
|
-
componentWillRender() {
|
|
10
|
-
const e = this.el.querySelectorAll("mi-tab");
|
|
11
|
-
this.tabs = Array.from(e).reduce((t, r, s) => {
|
|
12
|
-
const i = Array.from(this.el.getElementsByTagName("mi-tab-panel")).find((n) => n.id === r.tabFor);
|
|
13
|
-
return i && t.push({ label: r.label, content: i }), t;
|
|
14
|
-
}, []);
|
|
15
|
-
}
|
|
16
|
-
componentDidRender() {
|
|
17
|
-
this.selectTab(this.active);
|
|
18
|
-
}
|
|
19
|
-
async selectTab(e) {
|
|
20
|
-
await this.tabs[e].content.active() || (this.active = e, this.tabs.forEach((r, s) => r.content.active(s === e)));
|
|
21
|
-
}
|
|
22
|
-
render() {
|
|
23
|
-
return o(l, null, o("nav", { class: `nav ${this.bordered === !0 ? "nav--borderless-bottom" : ""}` }, o("ul", null, this.tabs.map((e, t) => o("li", { class: this.active === t ? "active" : "", onClick: () => {
|
|
24
|
-
this.selectTab(t);
|
|
25
|
-
} }, " ", e.label, " ")))), o("section", { class: `content ${this.bordered === !0 ? "content--bordered" : ""}` }, o("slot", null)));
|
|
26
|
-
}
|
|
27
|
-
get el() {
|
|
28
|
-
return d(this);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
c.style = b;
|
|
32
|
-
export {
|
|
33
|
-
c as mi_tabs
|
|
34
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { r as e, h as l } from "./webcomponent-e45720b9.mjs";
|
|
2
|
-
const u = class {
|
|
3
|
-
constructor(t) {
|
|
4
|
-
e(this, t), this.seconds = void 0, this.translations = void 0, this.translationsData = void 0;
|
|
5
|
-
}
|
|
6
|
-
setTranslations() {
|
|
7
|
-
this.translations ? this.translationsData = JSON.parse(this.translations) : this.translationsData = { days: "d", hours: "h", minutes: "min" };
|
|
8
|
-
}
|
|
9
|
-
componentWillLoad() {
|
|
10
|
-
this.setTranslations();
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Get display string in days, hours, and minutes, eg. "1 d 23 h 4 min".
|
|
14
|
-
* Minimum display value is 1 minute.
|
|
15
|
-
*
|
|
16
|
-
* @param {number} seconds Duration in seconds.
|
|
17
|
-
* @returns {string}
|
|
18
|
-
*/
|
|
19
|
-
getDurationDisplayString(t) {
|
|
20
|
-
const n = Math.floor(t / 86400), a = Math.floor(t % 86400 / 3600), i = Math.floor(t % 86400 % 3600 / 60), r = n > 0 ? `${n} ${this.translationsData.days} ` : "", o = a > 0 ? `${a} ${this.translationsData.hours} ` : "";
|
|
21
|
-
let s = i > 0 ? `${i} ${this.translationsData.minutes}` : "";
|
|
22
|
-
return !r && !o && !s && (s = "1 min"), `${r}${o}${s}`.trim();
|
|
23
|
-
}
|
|
24
|
-
render() {
|
|
25
|
-
return this.seconds >= 0 && this.translationsData ? this.renderDuration() : null;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Render formatted duration string.
|
|
29
|
-
*
|
|
30
|
-
* @returns {JSX.Element}
|
|
31
|
-
*/
|
|
32
|
-
renderDuration() {
|
|
33
|
-
return l("span", null, this.getDurationDisplayString(this.seconds));
|
|
34
|
-
}
|
|
35
|
-
static get watchers() {
|
|
36
|
-
return {
|
|
37
|
-
translations: ["setTranslations"]
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
export {
|
|
42
|
-
u as mi_time
|
|
43
|
-
};
|