@telia-ace/alliance-ui 1.0.14 → 1.0.15
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/CHANGELOG.md +18 -2
- package/components/alliance-link.d.ts +2 -0
- package/components/alliance-link.js +4 -150
- package/components/alliance-link.js.map +1 -1
- package/components/alliance-modal.d.ts +12 -0
- package/components/alliance-modal.js +7 -237
- package/components/alliance-modal.js.map +1 -1
- package/components/alliance-paginator.d.ts +13 -0
- package/components/alliance-paginator.js +6 -308
- package/components/alliance-paginator.js.map +1 -1
- package/components/alliance-table.d.ts +2 -0
- package/components/alliance-table.js +6 -144
- package/components/alliance-table.js.map +1 -1
- package/components/alliance-view.d.ts +32 -0
- package/components/alliance-view.js +291 -0
- package/components/alliance-view.js.map +1 -0
- package/components/chunk-ADFC4JKF.js +315 -0
- package/components/chunk-ADFC4JKF.js.map +1 -0
- package/components/chunk-B6YHD7BN.js +4 -0
- package/components/chunk-B6YHD7BN.js.map +1 -0
- package/components/chunk-JQ76TOQT.js +4 -0
- package/components/chunk-JQ76TOQT.js.map +1 -0
- package/components/chunk-LYU2K33W.js +464 -0
- package/components/chunk-LYU2K33W.js.map +1 -0
- package/components/chunk-NB6ODBZJ.js +13 -0
- package/components/chunk-NB6ODBZJ.js.map +1 -0
- package/components/chunk-P2AWWJPH.js +3 -0
- package/components/chunk-P2AWWJPH.js.map +1 -0
- package/components/chunk-WYQTL7R3.js +167 -0
- package/components/chunk-WYQTL7R3.js.map +1 -0
- package/components/chunk-XPHFAKEI.js +164 -0
- package/components/chunk-XPHFAKEI.js.map +1 -0
- package/components/index.d.ts +2 -6
- package/components/index.js +10 -18
- package/components/index.js.map +1 -1
- package/package.json +9 -13
- package/voca/components/telia-accordion-item.d.ts +1 -1
- package/voca/components/telia-accordion-item.js +3 -70
- package/voca/components/telia-accordion-item.js.map +1 -1
- package/voca/components/telia-accordion.d.ts +2 -1
- package/voca/components/telia-accordion.js +3 -104
- package/voca/components/telia-accordion.js.map +1 -1
- package/voca/components/telia-badge.d.ts +2 -1
- package/voca/components/telia-badge.js +3 -83
- package/voca/components/telia-badge.js.map +1 -1
- package/voca/components/telia-button.d.ts +2 -1
- package/voca/components/telia-button.js +3 -6
- package/voca/components/telia-button.js.map +1 -1
- package/voca/components/telia-card-frame-link.d.ts +2 -1
- package/voca/components/telia-card-frame-link.js +3 -46
- package/voca/components/telia-card-frame-link.js.map +1 -1
- package/voca/components/telia-card-frame.d.ts +2 -1
- package/voca/components/telia-card-frame.js +3 -4
- package/voca/components/telia-card-frame.js.map +1 -1
- package/voca/components/telia-checkbox.d.ts +2 -1
- package/voca/components/telia-checkbox.js +3 -102
- package/voca/components/telia-checkbox.js.map +1 -1
- package/voca/components/telia-chip-choice.d.ts +2 -1
- package/voca/components/telia-chip-choice.js +3 -70
- package/voca/components/telia-chip-choice.js.map +1 -1
- package/voca/components/telia-chip-filter.d.ts +2 -1
- package/voca/components/telia-chip-filter.js +3 -50
- package/voca/components/telia-chip-filter.js.map +1 -1
- package/voca/components/telia-col.d.ts +2 -1
- package/voca/components/telia-col.js +3 -47
- package/voca/components/telia-col.js.map +1 -1
- package/voca/components/telia-color-dot.d.ts +2 -1
- package/voca/components/telia-color-dot.js +3 -39
- package/voca/components/telia-color-dot.js.map +1 -1
- package/voca/components/telia-counter-badge.d.ts +2 -1
- package/voca/components/telia-counter-badge.js +3 -45
- package/voca/components/telia-counter-badge.js.map +1 -1
- package/voca/components/telia-cta-link.d.ts +2 -1
- package/voca/components/telia-cta-link.js +3 -58
- package/voca/components/telia-cta-link.js.map +1 -1
- package/voca/components/telia-date-picker.d.ts +2 -1
- package/voca/components/telia-date-picker.js +3 -591
- package/voca/components/telia-date-picker.js.map +1 -1
- package/voca/components/telia-divider.d.ts +2 -1
- package/voca/components/telia-divider.js +3 -46
- package/voca/components/telia-divider.js.map +1 -1
- package/voca/components/telia-field-assistive-text.d.ts +2 -1
- package/voca/components/telia-field-assistive-text.js +3 -4
- package/voca/components/telia-field-assistive-text.js.map +1 -1
- package/voca/components/telia-field-error.d.ts +2 -1
- package/voca/components/telia-field-error.js +3 -7
- package/voca/components/telia-field-error.js.map +1 -1
- package/voca/components/telia-field-valid.d.ts +2 -1
- package/voca/components/telia-field-valid.js +3 -7
- package/voca/components/telia-field-valid.js.map +1 -1
- package/voca/components/telia-fieldset.d.ts +2 -1
- package/voca/components/telia-fieldset.js +3 -56
- package/voca/components/telia-fieldset.js.map +1 -1
- package/voca/components/telia-focus-trap.d.ts +2 -1
- package/voca/components/telia-focus-trap.js +3 -78
- package/voca/components/telia-focus-trap.js.map +1 -1
- package/voca/components/telia-form.d.ts +2 -1
- package/voca/components/telia-form.js +3 -59
- package/voca/components/telia-form.js.map +1 -1
- package/voca/components/telia-grid.d.ts +2 -1
- package/voca/components/telia-grid.js +3 -29
- package/voca/components/telia-grid.js.map +1 -1
- package/voca/components/telia-heading.d.ts +2 -1
- package/voca/components/telia-heading.js +3 -4
- package/voca/components/telia-heading.js.map +1 -1
- package/voca/components/telia-icon.d.ts +2 -1
- package/voca/components/telia-icon.js +3 -5
- package/voca/components/telia-icon.js.map +1 -1
- package/voca/components/telia-image.d.ts +2 -1
- package/voca/components/telia-image.js +3 -42
- package/voca/components/telia-image.js.map +1 -1
- package/voca/components/telia-label.d.ts +2 -1
- package/voca/components/telia-label.js +3 -4
- package/voca/components/telia-label.js.map +1 -1
- package/voca/components/telia-link-image.d.ts +2 -1
- package/voca/components/telia-link-image.js +3 -55
- package/voca/components/telia-link-image.js.map +1 -1
- package/voca/components/telia-link.d.ts +2 -1
- package/voca/components/telia-link.js +3 -5
- package/voca/components/telia-link.js.map +1 -1
- package/voca/components/telia-list.d.ts +2 -1
- package/voca/components/telia-list.js +3 -69
- package/voca/components/telia-list.js.map +1 -1
- package/voca/components/telia-logo.d.ts +2 -1
- package/voca/components/telia-logo.js +3 -54
- package/voca/components/telia-logo.js.map +1 -1
- package/voca/components/telia-notification.d.ts +2 -1
- package/voca/components/telia-notification.js +3 -87
- package/voca/components/telia-notification.js.map +1 -1
- package/voca/components/telia-overlay.d.ts +2 -1
- package/voca/components/telia-overlay.js +3 -31
- package/voca/components/telia-overlay.js.map +1 -1
- package/voca/components/telia-p.d.ts +2 -1
- package/voca/components/telia-p.js +3 -51
- package/voca/components/telia-p.js.map +1 -1
- package/voca/components/telia-pictogram.d.ts +2 -1
- package/voca/components/telia-pictogram.js +3 -112
- package/voca/components/telia-pictogram.js.map +1 -1
- package/voca/components/telia-radio-button.d.ts +2 -1
- package/voca/components/telia-radio-button.js +3 -54
- package/voca/components/telia-radio-button.js.map +1 -1
- package/voca/components/telia-row.d.ts +2 -1
- package/voca/components/telia-row.js +3 -37
- package/voca/components/telia-row.js.map +1 -1
- package/voca/components/telia-search-input.d.ts +2 -1
- package/voca/components/telia-search-input.js +3 -134
- package/voca/components/telia-search-input.js.map +1 -1
- package/voca/components/telia-select.d.ts +2 -1
- package/voca/components/telia-select.js +3 -114
- package/voca/components/telia-select.js.map +1 -1
- package/voca/components/telia-skeleton.d.ts +2 -1
- package/voca/components/telia-skeleton.js +3 -32
- package/voca/components/telia-skeleton.js.map +1 -1
- package/voca/components/telia-status-badge.d.ts +2 -1
- package/voca/components/telia-status-badge.js +3 -58
- package/voca/components/telia-status-badge.js.map +1 -1
- package/voca/components/telia-style-link.d.ts +2 -1
- package/voca/components/telia-style-link.js +3 -4
- package/voca/components/telia-style-link.js.map +1 -1
- package/voca/components/telia-tab-content.d.ts +2 -1
- package/voca/components/telia-tab-content.js +3 -44
- package/voca/components/telia-tab-content.js.map +1 -1
- package/voca/components/telia-tab-header.d.ts +2 -1
- package/voca/components/telia-tab-header.js +3 -6
- package/voca/components/telia-tab-header.js.map +1 -1
- package/voca/components/telia-tab.d.ts +2 -1
- package/voca/components/telia-tab.js +3 -160
- package/voca/components/telia-tab.js.map +1 -1
- package/voca/components/telia-text-input.d.ts +2 -1
- package/voca/components/telia-text-input.js +3 -14
- package/voca/components/telia-text-input.js.map +1 -1
- package/voca/components/telia-text-spacing.d.ts +2 -1
- package/voca/components/telia-text-spacing.js +3 -29
- package/voca/components/telia-text-spacing.js.map +1 -1
- package/voca/components/telia-textarea.d.ts +2 -1
- package/voca/components/telia-textarea.js +3 -111
- package/voca/components/telia-textarea.js.map +1 -1
- package/voca/components/telia-toggle.d.ts +2 -1
- package/voca/components/telia-toggle.js +3 -143
- package/voca/components/telia-toggle.js.map +1 -1
- package/voca/components/telia-visually-hidden.d.ts +2 -1
- package/voca/components/telia-visually-hidden.js +3 -4
- package/voca/components/telia-visually-hidden.js.map +1 -1
- package/voca/foundations/component-library-styling.d.ts +2 -1
- package/voca/foundations/component-library-styling.js +3 -3
- package/voca/foundations/component-library-styling.js.map +1 -1
- package/voca/foundations/index.d.ts +6 -4
- package/voca/foundations/index.js +161 -162
- package/voca/foundations/index.js.map +1 -1
- package/voca/icons/index.js +3 -338
- package/voca/icons/index.js.map +1 -1
- package/chunks/check-circle-filled-42095247.js +0 -5
- package/chunks/check-circle-filled-42095247.js.map +0 -1
- package/chunks/chevron-down-50d47dd6.js +0 -5
- package/chunks/chevron-down-50d47dd6.js.map +0 -1
- package/chunks/chevron-right-788ce8a9.js +0 -6
- package/chunks/chevron-right-788ce8a9.js.map +0 -1
- package/chunks/close-7d423291.js +0 -5
- package/chunks/close-7d423291.js.map +0 -1
- package/chunks/close-ac6e4f1c.js +0 -5
- package/chunks/close-ac6e4f1c.js.map +0 -1
- package/chunks/error-9925a844.js +0 -7
- package/chunks/error-9925a844.js.map +0 -1
- package/chunks/error-filled-8de50bdd.js +0 -5
- package/chunks/error-filled-8de50bdd.js.map +0 -1
- package/chunks/getSvgContent-f2389ce0.js +0 -14
- package/chunks/getSvgContent-f2389ce0.js.map +0 -1
- package/chunks/index-514c4fef.js +0 -213
- package/chunks/index-514c4fef.js.map +0 -1
- package/chunks/index-eef143db.js +0 -531
- package/chunks/index-eef143db.js.map +0 -1
- package/chunks/query-assigned-elements-6cda07f5.js +0 -856
- package/chunks/query-assigned-elements-6cda07f5.js.map +0 -1
- package/chunks/repeat-aaedbe31.js +0 -143
- package/chunks/repeat-aaedbe31.js.map +0 -1
- package/chunks/stringCombiner-10b57054.js +0 -50
- package/chunks/stringCombiner-10b57054.js.map +0 -1
- package/chunks/telia-button-c9ba09a9.js +0 -86
- package/chunks/telia-button-c9ba09a9.js.map +0 -1
- package/chunks/telia-card-frame-340f3315.js +0 -39
- package/chunks/telia-card-frame-340f3315.js.map +0 -1
- package/chunks/telia-field-assistive-text-173ba2fb.js +0 -32
- package/chunks/telia-field-assistive-text-173ba2fb.js.map +0 -1
- package/chunks/telia-field-error-f978aeb3.js +0 -40
- package/chunks/telia-field-error-f978aeb3.js.map +0 -1
- package/chunks/telia-field-valid-5d8f121e.js +0 -39
- package/chunks/telia-field-valid-5d8f121e.js.map +0 -1
- package/chunks/telia-heading-38ae44ae.js +0 -104
- package/chunks/telia-heading-38ae44ae.js.map +0 -1
- package/chunks/telia-icon-d0e7c715.js +0 -73
- package/chunks/telia-icon-d0e7c715.js.map +0 -1
- package/chunks/telia-label-f4c1eb47.js +0 -36
- package/chunks/telia-label-f4c1eb47.js.map +0 -1
- package/chunks/telia-link-42cb2e68.js +0 -51
- package/chunks/telia-link-42cb2e68.js.map +0 -1
- package/chunks/telia-style-link-bb7bfd94.js +0 -56
- package/chunks/telia-style-link-bb7bfd94.js.map +0 -1
- package/chunks/telia-tab-header-890fc7c8.js +0 -98
- package/chunks/telia-tab-header-890fc7c8.js.map +0 -1
- package/chunks/telia-text-input-289394d8.js +0 -169
- package/chunks/telia-text-input-289394d8.js.map +0 -1
- package/chunks/telia-visually-hidden-9015e8cd.js +0 -34
- package/chunks/telia-visually-hidden-9015e8cd.js.map +0 -1
- package/chunks/telia-vst2-dfb33a56.js +0 -41
- package/chunks/telia-vst2-dfb33a56.js.map +0 -1
- package/chunks/uniqueId-0daf01ec.js +0 -5
- package/chunks/uniqueId-0daf01ec.js.map +0 -1
- package/chunks/variables-ecb680f0.js +0 -8
- package/chunks/variables-ecb680f0.js.map +0 -1
- package/components/alliance-link/alliance-link.d.ts +0 -27
- package/components/alliance-link/index.d.ts +0 -1
- package/components/alliance-modal/alliance-modal.d.ts +0 -43
- package/components/alliance-modal/index.d.ts +0 -2
- package/components/alliance-paginator/alliance-page-selector.d.ts +0 -22
- package/components/alliance-paginator/alliance-paginator-button.d.ts +0 -17
- package/components/alliance-paginator/alliance-paginator.d.ts +0 -32
- package/components/alliance-paginator/index.d.ts +0 -4
- package/components/alliance-paginator/utils.d.ts +0 -13
- package/components/alliance-table/alliance-table-body.d.ts +0 -5
- package/components/alliance-table/alliance-table-data.d.ts +0 -5
- package/components/alliance-table/alliance-table-head.d.ts +0 -7
- package/components/alliance-table/alliance-table-row.d.ts +0 -6
- package/components/alliance-table/alliance-table.d.ts +0 -5
- package/components/alliance-table/index.d.ts +0 -5
- package/style.css +0 -1
|
@@ -1,308 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import "../chunks/telia-icon-d0e7c715.js";
|
|
8
|
-
import { c as M, a as V } from "../chunks/chevron-right-788ce8a9.js";
|
|
9
|
-
import "../chunks/index-eef143db.js";
|
|
10
|
-
import "../chunks/telia-vst2-dfb33a56.js";
|
|
11
|
-
import "../chunks/getSvgContent-f2389ce0.js";
|
|
12
|
-
const $ = "...", P = (e, a) => {
|
|
13
|
-
let i = a - e + 1;
|
|
14
|
-
return Array.from({ length: i }, (n, t) => t + e);
|
|
15
|
-
};
|
|
16
|
-
function R(e) {
|
|
17
|
-
return e[e.length - 1];
|
|
18
|
-
}
|
|
19
|
-
function F(e) {
|
|
20
|
-
return Array.from({ length: e }, (a, i) => B(i + 1, e));
|
|
21
|
-
}
|
|
22
|
-
function B(e, a) {
|
|
23
|
-
return `${e} / ${a}`;
|
|
24
|
-
}
|
|
25
|
-
function G(e) {
|
|
26
|
-
const a = e.split("/")[0];
|
|
27
|
-
if (typeof a != "string")
|
|
28
|
-
throw new Error("Could not parse page value from select.");
|
|
29
|
-
return parseInt(a);
|
|
30
|
-
}
|
|
31
|
-
function C({ itemCount: e, pageSize: a, siblingCount: i, currentPage: n }) {
|
|
32
|
-
const t = Math.ceil(e / a);
|
|
33
|
-
if (i + 5 >= t)
|
|
34
|
-
return P(1, t);
|
|
35
|
-
const s = Math.max(n - i, 1), x = Math.min(n + i, t), v = s > 2, y = x < t - 2, z = 1, T = t;
|
|
36
|
-
if (!v && y) {
|
|
37
|
-
let f = 3 + 2 * i;
|
|
38
|
-
return [...P(1, f), $, t];
|
|
39
|
-
}
|
|
40
|
-
if (v && !y) {
|
|
41
|
-
let f = 3 + 2 * i, O = P(t - f + 1, t);
|
|
42
|
-
return [z, $, ...O];
|
|
43
|
-
}
|
|
44
|
-
if (v && y) {
|
|
45
|
-
let f = P(s, x);
|
|
46
|
-
return [z, $, ...f, $, T];
|
|
47
|
-
}
|
|
48
|
-
return P(1, t);
|
|
49
|
-
}
|
|
50
|
-
var H = Object.defineProperty, W = Object.getOwnPropertyDescriptor, w = (e, a, i, n) => {
|
|
51
|
-
for (var t = n > 1 ? void 0 : n ? W(a, i) : a, o = e.length - 1, s; o >= 0; o--)
|
|
52
|
-
(s = e[o]) && (t = (n ? s(a, i, t) : s(t)) || t);
|
|
53
|
-
return n && t && H(a, i, t), t;
|
|
54
|
-
};
|
|
55
|
-
let m = class extends _ {
|
|
56
|
-
constructor() {
|
|
57
|
-
super(...arguments), this.currentPage = 0, this.lastPage = 0, this.onChange = (e) => {
|
|
58
|
-
const a = G(e.currentTarget.value), i = new CustomEvent("select-page", {
|
|
59
|
-
bubbles: !0,
|
|
60
|
-
composed: !0,
|
|
61
|
-
detail: { nextPage: a, previousPage: this.currentPage },
|
|
62
|
-
cancelable: !0
|
|
63
|
-
});
|
|
64
|
-
this.dispatchEvent(i);
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
render() {
|
|
68
|
-
return c`
|
|
69
|
-
<select
|
|
70
|
-
id="select"
|
|
71
|
-
@change=${this.onChange}
|
|
72
|
-
.value=${B(this.currentPage, this.lastPage)}
|
|
73
|
-
>
|
|
74
|
-
${L(
|
|
75
|
-
F(this.lastPage),
|
|
76
|
-
(e) => c`<option value="${e}">${e}</option>`
|
|
77
|
-
)}
|
|
78
|
-
</select>
|
|
79
|
-
`;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
m.styles = I`
|
|
83
|
-
:host select {
|
|
84
|
-
padding: ${r(b.spacing16)} ${r(b.spacing24)};
|
|
85
|
-
border-radius: ${r(D.radiusFull)};
|
|
86
|
-
border: ${r(D.widthXs)} solid ${r(g.purple850)};
|
|
87
|
-
background-color: transparent;
|
|
88
|
-
color: ${r(g.purple850)};
|
|
89
|
-
text-align: center;
|
|
90
|
-
align-items: center;
|
|
91
|
-
justify-content: center;
|
|
92
|
-
cursor: pointer;
|
|
93
|
-
display: inline-flex;
|
|
94
|
-
font-family: 'TeliaSans', Helvetica, Arial, 'Lucida Grande', sans-serif;
|
|
95
|
-
font-size: ${r(b.spacing16)};
|
|
96
|
-
line-height: ${r(b.spacing16)};
|
|
97
|
-
transition: color ${r(j.duration150)} ease,
|
|
98
|
-
background-color ${r(j.duration150)} ease;
|
|
99
|
-
|
|
100
|
-
-webkit-appearance: none;
|
|
101
|
-
-moz-appearance: none;
|
|
102
|
-
appearance: none;
|
|
103
|
-
outline: none;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
:host select:hover {
|
|
107
|
-
background-color: ${r(g.purple850)};
|
|
108
|
-
color: ${r(g.white)};
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
:host select:active {
|
|
112
|
-
background-color: ${r(g.purple700)};
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
:host select option {
|
|
116
|
-
background-color: ${r(g.white)};
|
|
117
|
-
color: ${r(g.black)};
|
|
118
|
-
text-align: center;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
:host select::-ms-expand {
|
|
122
|
-
display: none;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
:host select:focus-visible {
|
|
126
|
-
outline: solid ${r(N.focusBorderWidth)} ${r(N.focusColor)};
|
|
127
|
-
outline-offset: ${r(b.spacing4)};
|
|
128
|
-
}
|
|
129
|
-
`;
|
|
130
|
-
w([
|
|
131
|
-
l({ type: Number, attribute: "current-page" })
|
|
132
|
-
], m.prototype, "currentPage", 2);
|
|
133
|
-
w([
|
|
134
|
-
l({ type: Number, attribute: "last-page" })
|
|
135
|
-
], m.prototype, "lastPage", 2);
|
|
136
|
-
m = w([
|
|
137
|
-
S("alliance-page-selector")
|
|
138
|
-
], m);
|
|
139
|
-
var X = Object.defineProperty, q = Object.getOwnPropertyDescriptor, h = (e, a, i, n) => {
|
|
140
|
-
for (var t = n > 1 ? void 0 : n ? q(a, i) : a, o = e.length - 1, s; o >= 0; o--)
|
|
141
|
-
(s = e[o]) && (t = (n ? s(a, i, t) : s(t)) || t);
|
|
142
|
-
return n && t && X(a, i, t), t;
|
|
143
|
-
};
|
|
144
|
-
let p = class extends _ {
|
|
145
|
-
constructor() {
|
|
146
|
-
super(...arguments), this.itemCount = 0, this.pageSize = 50, this.initialPage = 1, this.siblingCount = 2, this.currentPage = this.initialPage, this.pages = [], this.changePage = (e) => {
|
|
147
|
-
if (e === this.currentPage || // Next page is the same
|
|
148
|
-
e < 1 || // Next page is 0
|
|
149
|
-
e > this.pages[this.pages.length - 1])
|
|
150
|
-
return;
|
|
151
|
-
const a = new CustomEvent("change-page", {
|
|
152
|
-
bubbles: !0,
|
|
153
|
-
composed: !0,
|
|
154
|
-
detail: { nextPage: e, previousPage: this.currentPage },
|
|
155
|
-
cancelable: !0
|
|
156
|
-
});
|
|
157
|
-
this.dispatchEvent(a) && (this.currentPage = e, this.pages = C({
|
|
158
|
-
itemCount: this.itemCount,
|
|
159
|
-
pageSize: this.pageSize,
|
|
160
|
-
siblingCount: this.siblingCount,
|
|
161
|
-
currentPage: this.currentPage
|
|
162
|
-
}));
|
|
163
|
-
}, this.next = () => {
|
|
164
|
-
this.changePage(this.currentPage + 1);
|
|
165
|
-
}, this.previous = () => {
|
|
166
|
-
this.changePage(this.currentPage - 1);
|
|
167
|
-
}, this.onPageSelect = (e) => this.changePage(e.detail.nextPage);
|
|
168
|
-
}
|
|
169
|
-
connectedCallback() {
|
|
170
|
-
super.connectedCallback(), this.currentPage = this.initialPage, this.pages = C({
|
|
171
|
-
itemCount: this.itemCount,
|
|
172
|
-
pageSize: this.pageSize,
|
|
173
|
-
siblingCount: this.siblingCount,
|
|
174
|
-
currentPage: this.currentPage
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
attributeChangedCallback(e, a, i) {
|
|
178
|
-
super.attributeChangedCallback(e, a, i), e === "initial-page" && (this.currentPage = this.initialPage), this.pages = C({
|
|
179
|
-
itemCount: this.itemCount,
|
|
180
|
-
pageSize: this.pageSize,
|
|
181
|
-
siblingCount: this.siblingCount,
|
|
182
|
-
currentPage: this.currentPage,
|
|
183
|
-
[e]: i
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
render() {
|
|
187
|
-
return c`
|
|
188
|
-
<alliance-paginator-button
|
|
189
|
-
@click=${this.previous}
|
|
190
|
-
?disabled=${this.currentPage === 1}
|
|
191
|
-
icon="left"
|
|
192
|
-
></alliance-paginator-button>
|
|
193
|
-
|
|
194
|
-
${L(
|
|
195
|
-
this.pages,
|
|
196
|
-
(e) => e === "..." ? c`<telia-label>...</telia-label>` : c`<alliance-paginator-button
|
|
197
|
-
page=${e}
|
|
198
|
-
@click=${() => this.changePage(e)}
|
|
199
|
-
?selected=${this.currentPage === e}
|
|
200
|
-
></alliance-paginator-button>`
|
|
201
|
-
)}
|
|
202
|
-
|
|
203
|
-
<alliance-page-selector
|
|
204
|
-
current-page=${this.currentPage}
|
|
205
|
-
last-page=${R(this.pages)}
|
|
206
|
-
@select-page=${this.onPageSelect}
|
|
207
|
-
>
|
|
208
|
-
</alliance-page-selector>
|
|
209
|
-
|
|
210
|
-
<alliance-paginator-button
|
|
211
|
-
@click=${this.next}
|
|
212
|
-
?disabled=${this.currentPage === R(this.pages)}
|
|
213
|
-
icon="right"
|
|
214
|
-
></alliance-paginator-button>
|
|
215
|
-
`;
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
|
-
p.styles = I`
|
|
219
|
-
:host {
|
|
220
|
-
display: flex;
|
|
221
|
-
flex-direction: row;
|
|
222
|
-
place-items: center;
|
|
223
|
-
gap: ${r(b.spacing8)};
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
:host telia-label {
|
|
227
|
-
display: none;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
:host .telia-label {
|
|
231
|
-
color: ${r(g.purple700)};
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
:host alliance-paginator-button[page] {
|
|
235
|
-
display: none;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
span {
|
|
239
|
-
display: block;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
@container (min-width: ${r(A.breakpointLg)}) {
|
|
243
|
-
:host telia-label,
|
|
244
|
-
:host alliance-paginator-button[page] {
|
|
245
|
-
display: block;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
:host alliance-page-selector {
|
|
249
|
-
display: none;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
`;
|
|
253
|
-
h([
|
|
254
|
-
l({ type: Number, attribute: "item-count" })
|
|
255
|
-
], p.prototype, "itemCount", 2);
|
|
256
|
-
h([
|
|
257
|
-
l({ type: Number, attribute: "page-size" })
|
|
258
|
-
], p.prototype, "pageSize", 2);
|
|
259
|
-
h([
|
|
260
|
-
l({ type: Number, attribute: "initial-page" })
|
|
261
|
-
], p.prototype, "initialPage", 2);
|
|
262
|
-
h([
|
|
263
|
-
l({ type: Number, attribute: "sibling-count" })
|
|
264
|
-
], p.prototype, "siblingCount", 2);
|
|
265
|
-
h([
|
|
266
|
-
k()
|
|
267
|
-
], p.prototype, "currentPage", 2);
|
|
268
|
-
h([
|
|
269
|
-
k()
|
|
270
|
-
], p.prototype, "pages", 2);
|
|
271
|
-
p = h([
|
|
272
|
-
S("alliance-paginator")
|
|
273
|
-
], p);
|
|
274
|
-
var J = Object.defineProperty, K = Object.getOwnPropertyDescriptor, d = (e, a, i, n) => {
|
|
275
|
-
for (var t = n > 1 ? void 0 : n ? K(a, i) : a, o = e.length - 1, s; o >= 0; o--)
|
|
276
|
-
(s = e[o]) && (t = (n ? s(a, i, t) : s(t)) || t);
|
|
277
|
-
return n && t && J(a, i, t), t;
|
|
278
|
-
}, E = /* @__PURE__ */ ((e) => (e.Left = "left", e.Right = "right", e))(E || {});
|
|
279
|
-
let u = class extends _ {
|
|
280
|
-
constructor() {
|
|
281
|
-
super(...arguments), this.selected = !1, this.disabled = !1, this.clickable = !0;
|
|
282
|
-
}
|
|
283
|
-
renderContent() {
|
|
284
|
-
return this.icon === "left" ? c`<telia-icon size="sm" svg="${M.svg}" />` : this.icon === "right" ? c`<telia-icon size="sm" svg="${V.svg}" />` : c`<span>${this.page}</span>`;
|
|
285
|
-
}
|
|
286
|
-
render() {
|
|
287
|
-
return c`<telia-button ?disabled=${this.disabled} variant=${this.selected ? "primary" : "tertiary-purple"}>${this.renderContent()}</telia-button> `;
|
|
288
|
-
}
|
|
289
|
-
};
|
|
290
|
-
d([
|
|
291
|
-
l({ type: E })
|
|
292
|
-
], u.prototype, "icon", 2);
|
|
293
|
-
d([
|
|
294
|
-
l({ type: String })
|
|
295
|
-
], u.prototype, "page", 2);
|
|
296
|
-
d([
|
|
297
|
-
l({ type: Boolean })
|
|
298
|
-
], u.prototype, "selected", 2);
|
|
299
|
-
d([
|
|
300
|
-
l({ type: Boolean })
|
|
301
|
-
], u.prototype, "disabled", 2);
|
|
302
|
-
d([
|
|
303
|
-
l({ type: Boolean })
|
|
304
|
-
], u.prototype, "clickable", 2);
|
|
305
|
-
u = d([
|
|
306
|
-
S("alliance-paginator-button")
|
|
307
|
-
], u);
|
|
308
|
-
//# sourceMappingURL=alliance-paginator.js.map
|
|
1
|
+
import './chunk-LYU2K33W.js';
|
|
2
|
+
import './chunk-JQ76TOQT.js';
|
|
3
|
+
import './chunk-B6YHD7BN.js';
|
|
4
|
+
import './chunk-NB6ODBZJ.js';
|
|
5
|
+
//# sourceMappingURL=out.js.map
|
|
6
|
+
//# sourceMappingURL=alliance-paginator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alliance-paginator.js","sources":["../src/components/alliance-paginator/utils.ts","../src/components/alliance-paginator/alliance-page-selector.ts","../src/components/alliance-paginator/alliance-paginator.ts","../src/components/alliance-paginator/alliance-paginator-button.ts"],"sourcesContent":["/* \n Pagination logic taken from https://www.freecodecamp.org/news/build-a-custom-pagination-component-in-react/\n*/\nconst DOTS = '...';\n\nconst range = (start: number, end: number) => {\n let length = end - start + 1;\n /*\n Create an array of certain length and set the elements within it from\n start value to end value.\n */\n return Array.from({ length }, (_, idx) => idx + start);\n};\n\ntype Args = {\n itemCount: number;\n pageSize: number;\n siblingCount: number;\n currentPage: number;\n};\n\nexport type Pages = (number | '...')[];\n\nexport function getLastPage(pages: Pages): number {\n return pages[pages.length - 1] as number;\n}\n\nexport function listPages(lastPage: number): string[] {\n return Array.from({ length: lastPage }, (_, i) => {\n return pageToSelectValue(i + 1, lastPage);\n });\n}\n\nexport function pageToSelectValue(page: number, lastPage: number): string {\n return `${page} / ${lastPage}`;\n}\n\nexport function selectValueToPage(selectValue: string): number {\n const value = selectValue.split('/')[0];\n\n if (typeof value !== 'string') {\n throw new Error('Could not parse page value from select.');\n }\n\n return parseInt(value);\n}\n\nexport function getPagination({ itemCount, pageSize, siblingCount, currentPage }: Args): Pages {\n const totalPageCount = Math.ceil(itemCount / pageSize);\n\n // Pages count is determined as siblingCount + firstPage + lastPage + currentPage + 2*DOTS\n const totalPageNumbers = siblingCount + 5;\n\n /*\n Case 1:\n If the number of pages is less than the page numbers we want to show in our\n paginationComponent, we return the range [1..totalPageCount]\n */\n if (totalPageNumbers >= totalPageCount) {\n return range(1, totalPageCount);\n }\n\n /*\n Calculate left and right sibling index and make sure they are within range 1 and totalPageCount\n */\n const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);\n const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPageCount);\n\n /*\n We do not show dots just when there is just one page number to be inserted between the extremes of sibling and the page limits i.e 1 and totalPageCount. Hence we are using leftSiblingIndex > 2 and rightSiblingIndex < totalPageCount - 2\n */\n const shouldShowLeftDots = leftSiblingIndex > 2;\n const shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;\n\n const firstPageIndex = 1;\n const lastPageIndex = totalPageCount;\n\n /*\n Case 2: No left dots to show, but rights dots to be shown\n */\n if (!shouldShowLeftDots && shouldShowRightDots) {\n let leftItemCount = 3 + 2 * siblingCount;\n let leftRange = range(1, leftItemCount);\n\n return [...leftRange, DOTS, totalPageCount];\n }\n\n /*\n Case 3: No right dots to show, but left dots to be shown\n */\n if (shouldShowLeftDots && !shouldShowRightDots) {\n let rightItemCount = 3 + 2 * siblingCount;\n let rightRange = range(totalPageCount - rightItemCount + 1, totalPageCount);\n return [firstPageIndex, DOTS, ...rightRange];\n }\n\n /*\n Case 4: Both left and right dots to be shown\n */\n if (shouldShowLeftDots && shouldShowRightDots) {\n let middleRange = range(leftSiblingIndex, rightSiblingIndex);\n return [firstPageIndex, DOTS, ...middleRange, DOTS, lastPageIndex];\n }\n\n return range(1, totalPageCount);\n}\n","import '@/voca/components/telia-button';\nimport { borders, colors, focus, motion, spacing } from '@/voca/foundations';\nimport { css, html, LitElement, unsafeCSS } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { repeat } from 'lit/directives/repeat.js';\n\nimport { listPages, pageToSelectValue, selectValueToPage } from './utils';\n\n/**\n * Event dispatched when selecting a page.\n *\n * Event: `change-page`\n *\n * Detail: Object containing the properties `nextPage` and `previousPage`.\n */\nexport type SelectPageEvent = CustomEvent<{ nextPage: number; previousPage: number }>;\n\n@customElement('alliance-page-selector')\nexport class PageSelect extends LitElement {\n static styles = css`\n :host select {\n padding: ${unsafeCSS(spacing.spacing16)} ${unsafeCSS(spacing.spacing24)};\n border-radius: ${unsafeCSS(borders.radiusFull)};\n border: ${unsafeCSS(borders.widthXs)} solid ${unsafeCSS(colors.purple850)};\n background-color: transparent;\n color: ${unsafeCSS(colors.purple850)};\n text-align: center;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n display: inline-flex;\n font-family: 'TeliaSans', Helvetica, Arial, 'Lucida Grande', sans-serif;\n font-size: ${unsafeCSS(spacing.spacing16)};\n line-height: ${unsafeCSS(spacing.spacing16)};\n transition: color ${unsafeCSS(motion.duration150)} ease,\n background-color ${unsafeCSS(motion.duration150)} ease;\n\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n outline: none;\n }\n\n :host select:hover {\n background-color: ${unsafeCSS(colors.purple850)};\n color: ${unsafeCSS(colors.white)};\n }\n\n :host select:active {\n background-color: ${unsafeCSS(colors.purple700)};\n }\n\n :host select option {\n background-color: ${unsafeCSS(colors.white)};\n color: ${unsafeCSS(colors.black)};\n text-align: center;\n }\n\n :host select::-ms-expand {\n display: none;\n }\n\n :host select:focus-visible {\n outline: solid ${unsafeCSS(focus.focusBorderWidth)} ${unsafeCSS(focus.focusColor)};\n outline-offset: ${unsafeCSS(spacing.spacing4)};\n }\n `;\n\n @property({ type: Number, attribute: 'current-page' })\n currentPage: number = 0;\n\n @property({ type: Number, attribute: 'last-page' })\n lastPage: number = 0;\n\n onChange = (\n e: Event & {\n currentTarget: HTMLSelectElement;\n }\n ) => {\n const nextPage = selectValueToPage(e.currentTarget.value);\n\n const event: SelectPageEvent = new CustomEvent('select-page', {\n bubbles: true,\n composed: true,\n detail: { nextPage, previousPage: this.currentPage },\n cancelable: true,\n });\n this.dispatchEvent(event);\n };\n\n render() {\n return html`\n <select\n id=\"select\"\n @change=${this.onChange}\n .value=${pageToSelectValue(this.currentPage, this.lastPage)}\n >\n ${repeat(\n listPages(this.lastPage),\n (page) => html`<option value=\"${page}\">${page}</option>`\n )}\n </select>\n `;\n }\n}\n","import '@/voca/components/telia-button';\nimport '@/voca/components/telia-label';\nimport { breakpoints, colors, spacing } from '@/voca/foundations';\nimport { css, html, LitElement, unsafeCSS } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { repeat } from 'lit/directives/repeat.js';\nimport type { SelectPageEvent } from './alliance-page-selector';\n\nimport { getLastPage, getPagination, type Pages } from './utils';\n\n/**\n * Event dispatched when pressing a page button.\n *\n * Event: `change-page`\n *\n * Detail: Object containing the properties `nextPage` and `previousPage`.\n */\nexport type ChangePageEvent = CustomEvent<{ nextPage: number; previousPage: number }>;\n\n@customElement('alliance-paginator')\nexport class Paginator extends LitElement {\n static styles = css`\n :host {\n display: flex;\n flex-direction: row;\n place-items: center;\n gap: ${unsafeCSS(spacing.spacing8)};\n }\n\n :host telia-label {\n display: none;\n }\n\n :host .telia-label {\n color: ${unsafeCSS(colors.purple700)};\n }\n\n :host alliance-paginator-button[page] {\n display: none;\n }\n\n span {\n display: block;\n }\n\n @container (min-width: ${unsafeCSS(breakpoints.breakpointLg)}) {\n :host telia-label,\n :host alliance-paginator-button[page] {\n display: block;\n }\n\n :host alliance-page-selector {\n display: none;\n }\n }\n `;\n\n connectedCallback() {\n super.connectedCallback();\n\n this.currentPage = this.initialPage;\n this.pages = getPagination({\n itemCount: this.itemCount,\n pageSize: this.pageSize,\n siblingCount: this.siblingCount,\n currentPage: this.currentPage,\n });\n }\n\n attributeChangedCallback(name: string, _: string | null, value: string | null) {\n super.attributeChangedCallback(name, _, value);\n\n if (name === 'initial-page') {\n this.currentPage = this.initialPage;\n }\n\n this.pages = getPagination({\n itemCount: this.itemCount,\n pageSize: this.pageSize,\n siblingCount: this.siblingCount,\n currentPage: this.currentPage,\n [name]: value,\n });\n }\n\n @property({ type: Number, attribute: 'item-count' })\n itemCount: number = 0;\n\n @property({ type: Number, attribute: 'page-size' })\n pageSize: number = 50;\n\n @property({ type: Number, attribute: 'initial-page' })\n initialPage: number = 1;\n\n @property({ type: Number, attribute: 'sibling-count' })\n siblingCount: number = 2;\n\n @state()\n currentPage: number = this.initialPage;\n\n @state()\n pages: Pages = [];\n\n changePage = (nextPage: number) => {\n if (\n nextPage === this.currentPage || // Next page is the same\n nextPage < 1 || // Next page is 0\n nextPage > (this.pages[this.pages.length - 1] as number) // Next page is outside of available pages\n ) {\n return;\n }\n\n const event: ChangePageEvent = new CustomEvent('change-page', {\n bubbles: true,\n composed: true,\n detail: { nextPage, previousPage: this.currentPage },\n cancelable: true,\n });\n const defaultNotPrevented = this.dispatchEvent(event);\n\n if (defaultNotPrevented) {\n this.currentPage = nextPage;\n\n this.pages = getPagination({\n itemCount: this.itemCount,\n pageSize: this.pageSize,\n siblingCount: this.siblingCount,\n currentPage: this.currentPage,\n });\n }\n };\n\n next = () => {\n this.changePage(this.currentPage + 1);\n };\n\n previous = () => {\n this.changePage(this.currentPage - 1);\n };\n\n onPageSelect = (event: SelectPageEvent) => this.changePage(event.detail.nextPage);\n\n render() {\n return html`\n <alliance-paginator-button\n @click=${this.previous}\n ?disabled=${this.currentPage === 1}\n icon=\"left\"\n ></alliance-paginator-button>\n\n ${repeat(this.pages, (pageNumber) =>\n pageNumber === '...'\n ? html`<telia-label>...</telia-label>`\n : html`<alliance-paginator-button\n page=${pageNumber}\n @click=${() => this.changePage(pageNumber)}\n ?selected=${this.currentPage === pageNumber}\n ></alliance-paginator-button>`\n )}\n\n <alliance-page-selector\n current-page=${this.currentPage}\n last-page=${getLastPage(this.pages)}\n @select-page=${this.onPageSelect}\n >\n </alliance-page-selector>\n\n <alliance-paginator-button\n @click=${this.next}\n ?disabled=${this.currentPage === getLastPage(this.pages)}\n icon=\"right\"\n ></alliance-paginator-button>\n `;\n }\n}\n","import '@/voca/components/telia-button';\nimport '@/voca/components/telia-icon';\nimport { chevronLeft, chevronRight } from '@/voca/icons';\nimport { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nenum Icon {\n Left = 'left',\n Right = 'right',\n}\n\n@customElement('alliance-paginator-button')\nexport class PaginatorButton extends LitElement {\n @property({ type: Icon })\n icon?: Icon;\n\n @property({ type: String })\n page?: string;\n\n @property({ type: Boolean })\n selected: boolean = false;\n\n @property({ type: Boolean })\n disabled: boolean = false;\n\n @property({ type: Boolean })\n clickable: boolean = true;\n\n private renderContent() {\n if (this.icon === Icon.Left) {\n return html`<telia-icon size=\"sm\" svg=\"${chevronLeft.svg}\" />`;\n }\n\n if (this.icon === Icon.Right) {\n return html`<telia-icon size=\"sm\" svg=\"${chevronRight.svg}\" />`;\n }\n\n return html`<span>${this.page}</span>`;\n }\n\n render() {\n /*\n Ignore prettier on next line because Voca \n uses textContent on the telia-button element\n to detect whether or not it only contains an\n icon - which does not take account for white space...\n https://github.com/telia-company/design-system/issues/813\n */\n // prettier-ignore\n return html`<telia-button ?disabled=${this.disabled} variant=${this.selected ? 'primary' : 'tertiary-purple'}>${this.renderContent()}</telia-button> `;\n }\n}\n"],"names":["DOTS","range","start","end","length","_","idx","getLastPage","pages","listPages","lastPage","pageToSelectValue","page","selectValueToPage","selectValue","value","getPagination","itemCount","pageSize","siblingCount","currentPage","totalPageCount","leftSiblingIndex","rightSiblingIndex","shouldShowLeftDots","shouldShowRightDots","firstPageIndex","lastPageIndex","leftItemCount","rightItemCount","rightRange","middleRange","PageSelect","LitElement","nextPage","event","html","repeat","css","unsafeCSS","spacing","borders","colors","motion","focus","__decorateClass","property","customElement","Paginator","name","pageNumber","breakpoints","state","Icon","PaginatorButton","chevronLeft","chevronRight"],"mappings":";;;;;;;;;;;AAGA,MAAMA,IAAO,OAEPC,IAAQ,CAACC,GAAeC,MAAgB;AACtC,MAAAC,IAASD,IAAMD,IAAQ;AAKpB,SAAA,MAAM,KAAK,EAAE,QAAAE,KAAU,CAACC,GAAGC,MAAQA,IAAMJ,CAAK;AACzD;AAWO,SAASK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
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var D = Object.defineProperty, j = Object.getOwnPropertyDescriptor, x = (a, r, t, l) => {
|
|
8
|
-
for (var e = l > 1 ? void 0 : l ? j(r, t) : r, s = a.length - 1, o; s >= 0; s--)
|
|
9
|
-
(o = a[s]) && (e = (l ? o(r, t, e) : o(e)) || e);
|
|
10
|
-
return l && e && D(r, t, e), e;
|
|
11
|
-
};
|
|
12
|
-
let d = class extends p {
|
|
13
|
-
render() {
|
|
14
|
-
return i` <alliance-tb>
|
|
15
|
-
<slot></slot>
|
|
16
|
-
</alliance-tb>`;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
d.styles = c`
|
|
20
|
-
:host {
|
|
21
|
-
display: table;
|
|
22
|
-
border-collapse: collapse;
|
|
23
|
-
width: 100%;
|
|
24
|
-
}
|
|
25
|
-
`;
|
|
26
|
-
d = x([
|
|
27
|
-
b("alliance-table")
|
|
28
|
-
], d);
|
|
29
|
-
var C = Object.defineProperty, T = Object.getOwnPropertyDescriptor, B = (a, r, t, l) => {
|
|
30
|
-
for (var e = l > 1 ? void 0 : l ? T(r, t) : r, s = a.length - 1, o; s >= 0; s--)
|
|
31
|
-
(o = a[s]) && (e = (l ? o(r, t, e) : o(e)) || e);
|
|
32
|
-
return l && e && C(r, t, e), e;
|
|
33
|
-
};
|
|
34
|
-
let h = class extends p {
|
|
35
|
-
render() {
|
|
36
|
-
return i`<slot></slot>`;
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
h.styles = c`
|
|
40
|
-
:host {
|
|
41
|
-
display: table-row-group;
|
|
42
|
-
vertical-align: middle;
|
|
43
|
-
border-color: inherit;
|
|
44
|
-
}
|
|
45
|
-
`;
|
|
46
|
-
h = B([
|
|
47
|
-
b("alliance-tb")
|
|
48
|
-
], h);
|
|
49
|
-
var S = Object.defineProperty, H = Object.getOwnPropertyDescriptor, I = (a, r, t, l) => {
|
|
50
|
-
for (var e = l > 1 ? void 0 : l ? H(r, t) : r, s = a.length - 1, o; s >= 0; s--)
|
|
51
|
-
(o = a[s]) && (e = (l ? o(r, t, e) : o(e)) || e);
|
|
52
|
-
return l && e && S(r, t, e), e;
|
|
53
|
-
};
|
|
54
|
-
let _ = class extends p {
|
|
55
|
-
render() {
|
|
56
|
-
return i` <slot></slot> `;
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
_.styles = c`
|
|
60
|
-
:host {
|
|
61
|
-
display: table-cell;
|
|
62
|
-
vertical-align: inherit;
|
|
63
|
-
padding: ${n($.spacing24)};
|
|
64
|
-
}
|
|
65
|
-
`;
|
|
66
|
-
_ = I([
|
|
67
|
-
b("alliance-td")
|
|
68
|
-
], _);
|
|
69
|
-
var R = Object.defineProperty, W = Object.getOwnPropertyDescriptor, P = (a, r, t, l) => {
|
|
70
|
-
for (var e = l > 1 ? void 0 : l ? W(r, t) : r, s = a.length - 1, o; s >= 0; s--)
|
|
71
|
-
(o = a[s]) && (e = (l ? o(r, t, e) : o(e)) || e);
|
|
72
|
-
return l && e && R(r, t, e), e;
|
|
73
|
-
};
|
|
74
|
-
let f = class extends p {
|
|
75
|
-
constructor() {
|
|
76
|
-
super(...arguments), this.label = "";
|
|
77
|
-
}
|
|
78
|
-
render() {
|
|
79
|
-
return i`<telia-heading tag="h4" variant="title-100">${this.label}</telia-heading>`;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
f.styles = c`
|
|
83
|
-
:host {
|
|
84
|
-
display: table-cell;
|
|
85
|
-
padding: ${n($.spacing24)};
|
|
86
|
-
}
|
|
87
|
-
`;
|
|
88
|
-
P([
|
|
89
|
-
O({ type: String })
|
|
90
|
-
], f.prototype, "label", 2);
|
|
91
|
-
f = P([
|
|
92
|
-
b("alliance-th")
|
|
93
|
-
], f);
|
|
94
|
-
var X = Object.defineProperty, q = Object.getOwnPropertyDescriptor, m = (a, r, t, l) => {
|
|
95
|
-
for (var e = l > 1 ? void 0 : l ? q(r, t) : r, s = a.length - 1, o; s >= 0; s--)
|
|
96
|
-
(o = a[s]) && (e = (l ? o(r, t, e) : o(e)) || e);
|
|
97
|
-
return l && e && X(r, t, e), e;
|
|
98
|
-
};
|
|
99
|
-
let v = class extends p {
|
|
100
|
-
constructor() {
|
|
101
|
-
super(...arguments), this.clickable = !1;
|
|
102
|
-
}
|
|
103
|
-
render() {
|
|
104
|
-
return i`
|
|
105
|
-
${this.clickable ? z : ""}
|
|
106
|
-
<slot></slot>
|
|
107
|
-
`;
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
v.styles = c`
|
|
111
|
-
:host {
|
|
112
|
-
display: table-row;
|
|
113
|
-
border-bottom: ${n(w.widthXs)} solid ${n(u.gray200)};
|
|
114
|
-
}
|
|
115
|
-
`;
|
|
116
|
-
m([
|
|
117
|
-
O({ type: Boolean })
|
|
118
|
-
], v.prototype, "clickable", 2);
|
|
119
|
-
v = m([
|
|
120
|
-
b("alliance-tr")
|
|
121
|
-
], v);
|
|
122
|
-
const z = i`<style>
|
|
123
|
-
:host {
|
|
124
|
-
background-color: transparent;
|
|
125
|
-
transition: background-color ${n(g.duration150)} ${n(g.easeIn)};
|
|
126
|
-
cursor: pointer;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
:host(:hover),
|
|
130
|
-
:host(:focus-visible),
|
|
131
|
-
:host(:focus) {
|
|
132
|
-
background-color: ${n(u.gray200)};
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
:host(:active) {
|
|
136
|
-
background-color: ${n(u.gray300)};
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
:host(:focus-visible) {
|
|
140
|
-
outline: solid ${n(y.focusBorderWidth)} ${n(y.focusColor)};
|
|
141
|
-
outline-offset: ${n($.spacing4)};
|
|
142
|
-
}
|
|
143
|
-
</style>`;
|
|
144
|
-
//# sourceMappingURL=alliance-table.js.map
|
|
1
|
+
import './chunk-XPHFAKEI.js';
|
|
2
|
+
import './chunk-P2AWWJPH.js';
|
|
3
|
+
import './chunk-B6YHD7BN.js';
|
|
4
|
+
import './chunk-NB6ODBZJ.js';
|
|
5
|
+
//# sourceMappingURL=out.js.map
|
|
6
|
+
//# sourceMappingURL=alliance-table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SerializeableObject, Promisable } from '@telia-ace/alliance-internal-client-utilities';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
declare const viewElementPrefix = "alliance-view-";
|
|
5
|
+
declare const viewElementSelector = "app-view";
|
|
6
|
+
declare enum ViewElementType {
|
|
7
|
+
Main = "main",
|
|
8
|
+
Aside = "aside",
|
|
9
|
+
Body = "body"
|
|
10
|
+
}
|
|
11
|
+
declare function viewElementTag(appName: string): string;
|
|
12
|
+
type ViewInitProps = {
|
|
13
|
+
app?: IViewElement['app'];
|
|
14
|
+
capability?: IViewElement['capability'];
|
|
15
|
+
id?: IViewElement['id'];
|
|
16
|
+
args?: IViewElement['args'];
|
|
17
|
+
type?: IViewElement['type'];
|
|
18
|
+
complete?: IViewElement['complete'];
|
|
19
|
+
};
|
|
20
|
+
interface IViewElement extends LitElement {
|
|
21
|
+
init: (props: ViewInitProps) => void;
|
|
22
|
+
complete: (result: SerializeableObject | null) => void;
|
|
23
|
+
app: string;
|
|
24
|
+
capability: string;
|
|
25
|
+
args: SerializeableObject;
|
|
26
|
+
mounted: boolean;
|
|
27
|
+
loading: boolean;
|
|
28
|
+
type?: ViewElementType;
|
|
29
|
+
}
|
|
30
|
+
declare function registerViewElement(appName: string, onRender: (element: IViewElement) => Promisable<void>): void;
|
|
31
|
+
|
|
32
|
+
export { IViewElement, ViewElementType, ViewInitProps, registerViewElement, viewElementPrefix, viewElementSelector, viewElementTag };
|