@hortiview/shared-components 0.0.11528 → 0.0.11587
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 +17 -0
- package/dist/{BigLoadingSpinner-D7H28pr5.js → BigLoadingSpinner-iegTbDcD.js} +6 -6
- package/dist/GenericCard-6J558OgP.js +350 -0
- package/dist/{ListAreaService-YS_UUPh5.js → ListAreaService-DOwtdRa4.js} +18 -16
- package/dist/_MapCache-B75yWNNd.js +376 -0
- package/dist/_baseIsEqual-D0Dsajdb.js +317 -0
- package/dist/_getTag-BCf9b56Z.js +81 -0
- package/dist/animationframe-EMBh6XeO.js +54 -0
- package/dist/component-DsB0poTj.js +571 -0
- package/dist/component-neHBNHRu.js +114 -0
- package/dist/components/AlertBanner/AlertBanner.js +16 -15
- package/dist/components/BaseView/BaseView.js +5 -5
- package/dist/components/BasicHeading/BasicHeading.js +25 -24
- package/dist/components/BasicHeading/BasicHeading.test.js +9 -9
- package/dist/components/BlockView/BlockView.js +5 -5
- package/dist/components/ChipCard/ChipCard.js +1765 -14
- package/dist/components/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +28 -27
- package/dist/components/DeleteModal/DeleteModal.js +37 -34
- package/dist/components/Disclaimer/Disclaimer.js +11 -9
- package/dist/components/EmptyView/EmptyView.js +258 -19
- package/dist/components/Filter/Filter.js +58 -54
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +13 -11
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.d.ts +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +5974 -6387
- package/dist/components/FormComponents/FormNumber/CustomTextField.d.ts +1 -1
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +5 -5
- package/dist/components/FormComponents/FormNumber/FormNumber.d.ts +1 -1
- package/dist/components/FormComponents/FormNumber/FormNumber.js +1 -1
- package/dist/components/FormComponents/FormRadio/FormRadio.js +4 -4
- package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +3 -3
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +6 -5
- package/dist/components/FormComponents/FormSlider/FormSlider.js +1155 -27
- package/dist/components/FormComponents/FormText/FormText.d.ts +1 -1
- package/dist/components/FormComponents/FormText/FormText.js +33 -32
- package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +1 -1
- package/dist/components/FormComponents/FormToggle/FormToggle.js +17 -15
- package/dist/components/GenericTable/GenericTable.js +10486 -74
- package/dist/components/GenericTable/Mobile/GenericCard.js +4 -3
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +1 -1
- package/dist/components/GenericTable/Mobile/GenericCardList.js +10 -8
- package/dist/components/HashTabView/HashTabView.js +1805 -72
- package/dist/components/HeaderFilter/HeaderFilter.d.ts +1 -1
- package/dist/components/HeaderFilter/HeaderFilter.js +4 -4
- package/dist/components/HealthCheckFailed/HealthCheckFailed.js +20 -17
- package/dist/components/Iconify/Iconify.d.ts +1 -2
- package/dist/components/Iconify/Iconify.js +42 -42
- package/dist/components/InfoGroup/InfoGroup.js +30 -28
- package/dist/components/ListArea/ListArea.js +29 -27
- package/dist/components/ListArea/ListArea.test.js +2 -2
- package/dist/components/ListArea/ListAreaService.js +7 -5
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +506 -37
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.js +926 -9
- package/dist/components/ModulePadding/ModulePadding.d.ts +7 -0
- package/dist/components/ModulePadding/ModulePadding.js +28 -0
- package/dist/components/ModulePadding/ModulePadding.test.d.ts +1 -0
- package/dist/components/ModulePadding/ModulePadding.test.js +22 -0
- package/dist/components/OverflowTooltip/OverflowTooltip.js +6 -6
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +1 -1
- package/dist/components/SearchBar/SearchBar.js +7 -6
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +13 -13
- package/dist/floating-ui.dom-CeD8zknG.js +978 -0
- package/dist/get-7ACccM2X.js +114 -0
- package/dist/{get-BiqanC9_.js → get-DFv1gXfq.js} +1 -1
- package/dist/hooks/useHelperText.js +1 -1
- package/dist/identity-DLWZln-X.js +1763 -0
- package/dist/index.es-0lQcz8m1.js +444 -0
- package/dist/index.es-25EARqhH.js +2027 -0
- package/dist/index.es-3043KTnb.js +1066 -0
- package/dist/index.es-41ztjcFT.js +724 -0
- package/dist/index.es-6TJ1S8Jr.js +954 -0
- package/dist/index.es-8GOVkuo-.js +374 -0
- package/dist/index.es-B-_jXDuz.js +216 -0
- package/dist/index.es-BWgXLqXn.js +102 -0
- package/dist/index.es-BtjV0oNv.js +360 -0
- package/dist/index.es-BvrQnJ3j.js +509 -0
- package/dist/index.es-CF_xy2ns.js +674 -0
- package/dist/index.es-CL_Heu1n.js +54 -0
- package/dist/index.es-CiqbARoC.js +306 -0
- package/dist/index.es-D-CKRzIB.js +63 -0
- package/dist/index.es-D6N-XWHe.js +56 -0
- package/dist/index.es-DKDgy7Kt.js +45 -0
- package/dist/index.es-DntoATwO.js +159 -0
- package/dist/index.es-UHKFl8Da.js +7075 -0
- package/dist/index.es-d5xhUpJZ.js +3242 -0
- package/dist/index.es-da0cf7oE.js +569 -0
- package/dist/index.es-h2lMdt7G.js +107 -0
- package/dist/index.es-zr101OF5.js +4853 -0
- package/dist/{isArray-2zMxXFEr.js → isArray-DN9s620O.js} +3 -3
- package/dist/{isArray-C_5XvIlE.js → isArray-Dub1wGJM.js} +1 -1
- package/dist/isEmpty-B4GG2s-V.js +31 -0
- package/dist/isPlainObject-C273y67K.js +40 -0
- package/dist/isString-BW9UHONv.js +21 -0
- package/dist/keyboard-Bpt0aBqQ.js +107 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +57 -55
- package/dist/orderBy-Bd48bw88.js +316 -0
- package/dist/react-tooltip.min-DSY6KDqS.js +431 -0
- package/dist/services/UtilService.js +2 -2
- package/dist/toString-CrgB_7Pe.js +54 -0
- package/dist/tslib.es6-BDCynO9F.js +162 -0
- package/dist/types/GenericTable.d.ts +1 -1
- package/dist/uniqueId-NU3-C36A.js +18 -0
- package/dist/util-DA21pZXj.js +78 -0
- package/package.json +1 -1
- package/dist/GenericCard-jlt8ZsHi.js +0 -80
- package/dist/_Map-Dtlps7IZ.js +0 -113
- package/dist/_overArg-_0pUmCsX.js +0 -14
- package/dist/get-P-5PYZOE.js +0 -426
- package/dist/isEmpty-BimaZd5G.js +0 -225
- package/dist/isString-BOHPtrlm.js +0 -44
- package/dist/orderBy-BVQIswlJ.js +0 -765
- package/dist/react-tooltip.min-Czs4RGD1.js +0 -1400
|
@@ -1,99 +1,1832 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
import { jsx as R, jsxs as G, Fragment as st } from "react/jsx-runtime";
|
|
2
|
+
import { E as ut } from "../../index.es-h2lMdt7G.js";
|
|
3
|
+
import { G as x } from "../../index.es-DntoATwO.js";
|
|
4
|
+
import { P as dt } from "../../index.es-D-CKRzIB.js";
|
|
5
|
+
import { c as B, _ as V, P as c } from "../../identity-DLWZln-X.js";
|
|
6
|
+
import p, { forwardRef as Y, useRef as A, useImperativeHandle as F, useCallback as ft, useEffect as N, useMemo as ht, createContext as pt, useContext as mt, useState as _t } from "react";
|
|
7
|
+
import { c as nt, d as Z } from "../../index.es-da0cf7oE.js";
|
|
8
|
+
import { I as Tt } from "../../index.es-3043KTnb.js";
|
|
9
|
+
import { b as _, c as L, a as vt } from "../../tslib.es6-BDCynO9F.js";
|
|
10
|
+
import { M as k, a as H } from "../../component-neHBNHRu.js";
|
|
11
|
+
import { b as gt, M as tt, a as E, m as bt } from "../../component-DsB0poTj.js";
|
|
12
|
+
import { u as St } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
13
|
+
import '../../assets/HashTabView.css';/**
|
|
14
|
+
* @license
|
|
15
|
+
* Copyright 2018 Google Inc.
|
|
16
|
+
*
|
|
17
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
18
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
19
|
+
* in the Software without restriction, including without limitation the rights
|
|
20
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
21
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
22
|
+
* furnished to do so, subject to the following conditions:
|
|
23
|
+
*
|
|
24
|
+
* The above copyright notice and this permission notice shall be included in
|
|
25
|
+
* all copies or substantial portions of the Software.
|
|
26
|
+
*
|
|
27
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
28
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
29
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
30
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
31
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
32
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
33
|
+
* THE SOFTWARE.
|
|
34
|
+
*/
|
|
35
|
+
var Ct = {
|
|
36
|
+
ACTIVE: "mdc-tab-indicator--active",
|
|
37
|
+
FADE: "mdc-tab-indicator--fade",
|
|
38
|
+
NO_TRANSITION: "mdc-tab-indicator--no-transition"
|
|
39
|
+
}, Et = {
|
|
40
|
+
CONTENT_SELECTOR: ".mdc-tab-indicator__content"
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* @license
|
|
44
|
+
* Copyright 2018 Google Inc.
|
|
45
|
+
*
|
|
46
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
47
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
48
|
+
* in the Software without restriction, including without limitation the rights
|
|
49
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
50
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
51
|
+
* furnished to do so, subject to the following conditions:
|
|
52
|
+
*
|
|
53
|
+
* The above copyright notice and this permission notice shall be included in
|
|
54
|
+
* all copies or substantial portions of the Software.
|
|
55
|
+
*
|
|
56
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
57
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
58
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
59
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
60
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
61
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
62
|
+
* THE SOFTWARE.
|
|
63
|
+
*/
|
|
64
|
+
var v = (
|
|
65
|
+
/** @class */
|
|
66
|
+
function(a) {
|
|
67
|
+
_(e, a);
|
|
68
|
+
function e(t) {
|
|
69
|
+
return a.call(this, L(L({}, e.defaultAdapter), t)) || this;
|
|
70
|
+
}
|
|
71
|
+
return Object.defineProperty(e, "cssClasses", {
|
|
72
|
+
get: function() {
|
|
73
|
+
return Ct;
|
|
74
|
+
},
|
|
75
|
+
enumerable: !1,
|
|
76
|
+
configurable: !0
|
|
77
|
+
}), Object.defineProperty(e, "strings", {
|
|
78
|
+
get: function() {
|
|
79
|
+
return Et;
|
|
80
|
+
},
|
|
81
|
+
enumerable: !1,
|
|
82
|
+
configurable: !0
|
|
83
|
+
}), Object.defineProperty(e, "defaultAdapter", {
|
|
84
|
+
get: function() {
|
|
85
|
+
return {
|
|
86
|
+
addClass: function() {
|
|
87
|
+
},
|
|
88
|
+
removeClass: function() {
|
|
89
|
+
},
|
|
90
|
+
computeContentClientRect: function() {
|
|
91
|
+
return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
|
|
92
|
+
},
|
|
93
|
+
setContentStyleProperty: function() {
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
enumerable: !1,
|
|
98
|
+
configurable: !0
|
|
99
|
+
}), e.prototype.computeContentClientRect = function() {
|
|
100
|
+
return this.adapter.computeContentClientRect();
|
|
101
|
+
}, e;
|
|
102
|
+
}(k)
|
|
103
|
+
);
|
|
104
|
+
/**
|
|
105
|
+
* @license
|
|
106
|
+
* Copyright 2018 Google Inc.
|
|
107
|
+
*
|
|
108
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
109
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
110
|
+
* in the Software without restriction, including without limitation the rights
|
|
111
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
112
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
113
|
+
* furnished to do so, subject to the following conditions:
|
|
114
|
+
*
|
|
115
|
+
* The above copyright notice and this permission notice shall be included in
|
|
116
|
+
* all copies or substantial portions of the Software.
|
|
117
|
+
*
|
|
118
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
119
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
120
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
121
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
122
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
123
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
124
|
+
* THE SOFTWARE.
|
|
125
|
+
*/
|
|
126
|
+
var yt = (
|
|
127
|
+
/** @class */
|
|
128
|
+
function(a) {
|
|
129
|
+
_(e, a);
|
|
130
|
+
function e() {
|
|
131
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
132
|
+
}
|
|
133
|
+
return e.prototype.activate = function() {
|
|
134
|
+
this.adapter.addClass(v.cssClasses.ACTIVE);
|
|
135
|
+
}, e.prototype.deactivate = function() {
|
|
136
|
+
this.adapter.removeClass(v.cssClasses.ACTIVE);
|
|
137
|
+
}, e;
|
|
138
|
+
}(v)
|
|
139
|
+
);
|
|
140
|
+
/**
|
|
141
|
+
* @license
|
|
142
|
+
* Copyright 2018 Google Inc.
|
|
143
|
+
*
|
|
144
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
145
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
146
|
+
* in the Software without restriction, including without limitation the rights
|
|
147
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
148
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
149
|
+
* furnished to do so, subject to the following conditions:
|
|
150
|
+
*
|
|
151
|
+
* The above copyright notice and this permission notice shall be included in
|
|
152
|
+
* all copies or substantial portions of the Software.
|
|
153
|
+
*
|
|
154
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
155
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
156
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
157
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
158
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
159
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
160
|
+
* THE SOFTWARE.
|
|
161
|
+
*/
|
|
162
|
+
var At = (
|
|
163
|
+
/** @class */
|
|
164
|
+
function(a) {
|
|
165
|
+
_(e, a);
|
|
166
|
+
function e() {
|
|
167
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
168
|
+
}
|
|
169
|
+
return e.prototype.activate = function(t) {
|
|
170
|
+
if (!t) {
|
|
171
|
+
this.adapter.addClass(v.cssClasses.ACTIVE);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
var n = this.computeContentClientRect(), r = t.width / n.width, o = t.left - n.left;
|
|
175
|
+
this.adapter.addClass(v.cssClasses.NO_TRANSITION), this.adapter.setContentStyleProperty("transform", "translateX(" + o + "px) scaleX(" + r + ")"), this.computeContentClientRect(), this.adapter.removeClass(v.cssClasses.NO_TRANSITION), this.adapter.addClass(v.cssClasses.ACTIVE), this.adapter.setContentStyleProperty("transform", "");
|
|
176
|
+
}, e.prototype.deactivate = function() {
|
|
177
|
+
this.adapter.removeClass(v.cssClasses.ACTIVE);
|
|
178
|
+
}, e;
|
|
179
|
+
}(v)
|
|
180
|
+
);
|
|
181
|
+
/**
|
|
182
|
+
* @license
|
|
183
|
+
* Copyright 2018 Google Inc.
|
|
184
|
+
*
|
|
185
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
186
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
187
|
+
* in the Software without restriction, including without limitation the rights
|
|
188
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
189
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
190
|
+
* furnished to do so, subject to the following conditions:
|
|
191
|
+
*
|
|
192
|
+
* The above copyright notice and this permission notice shall be included in
|
|
193
|
+
* all copies or substantial portions of the Software.
|
|
194
|
+
*
|
|
195
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
196
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
197
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
198
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
199
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
200
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
201
|
+
* THE SOFTWARE.
|
|
202
|
+
*/
|
|
203
|
+
var rt = (
|
|
204
|
+
/** @class */
|
|
205
|
+
function(a) {
|
|
206
|
+
_(e, a);
|
|
207
|
+
function e() {
|
|
208
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
209
|
+
}
|
|
210
|
+
return e.attachTo = function(t) {
|
|
211
|
+
return new e(t);
|
|
212
|
+
}, e.prototype.initialize = function() {
|
|
213
|
+
this.content_ = this.root.querySelector(v.strings.CONTENT_SELECTOR);
|
|
214
|
+
}, e.prototype.computeContentClientRect = function() {
|
|
215
|
+
return this.foundation.computeContentClientRect();
|
|
216
|
+
}, e.prototype.getDefaultFoundation = function() {
|
|
217
|
+
var t = this, n = {
|
|
218
|
+
addClass: function(r) {
|
|
219
|
+
return t.root.classList.add(r);
|
|
220
|
+
},
|
|
221
|
+
removeClass: function(r) {
|
|
222
|
+
return t.root.classList.remove(r);
|
|
223
|
+
},
|
|
224
|
+
computeContentClientRect: function() {
|
|
225
|
+
return t.content_.getBoundingClientRect();
|
|
226
|
+
},
|
|
227
|
+
setContentStyleProperty: function(r, o) {
|
|
228
|
+
return t.content_.style.setProperty(r, o);
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
return this.root.classList.contains(v.cssClasses.FADE) ? new yt(n) : new At(n);
|
|
232
|
+
}, e.prototype.activate = function(t) {
|
|
233
|
+
this.foundation.activate(t);
|
|
234
|
+
}, e.prototype.deactivate = function() {
|
|
235
|
+
this.foundation.deactivate();
|
|
236
|
+
}, e;
|
|
237
|
+
}(H)
|
|
238
|
+
);
|
|
239
|
+
/**
|
|
240
|
+
* @license
|
|
241
|
+
* Copyright 2018 Google Inc.
|
|
242
|
+
*
|
|
243
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
244
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
245
|
+
* in the Software without restriction, including without limitation the rights
|
|
246
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
247
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
248
|
+
* furnished to do so, subject to the following conditions:
|
|
249
|
+
*
|
|
250
|
+
* The above copyright notice and this permission notice shall be included in
|
|
251
|
+
* all copies or substantial portions of the Software.
|
|
252
|
+
*
|
|
253
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
254
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
255
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
256
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
257
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
258
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
259
|
+
* THE SOFTWARE.
|
|
260
|
+
*/
|
|
261
|
+
var K = {
|
|
262
|
+
ACTIVE: "mdc-tab--active"
|
|
263
|
+
}, M = {
|
|
264
|
+
ARIA_SELECTED: "aria-selected",
|
|
265
|
+
CONTENT_SELECTOR: ".mdc-tab__content",
|
|
266
|
+
INTERACTED_EVENT: "MDCTab:interacted",
|
|
267
|
+
RIPPLE_SELECTOR: ".mdc-tab__ripple",
|
|
268
|
+
TABINDEX: "tabIndex",
|
|
269
|
+
TAB_INDICATOR_SELECTOR: ".mdc-tab-indicator"
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* @license
|
|
273
|
+
* Copyright 2018 Google Inc.
|
|
274
|
+
*
|
|
275
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
276
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
277
|
+
* in the Software without restriction, including without limitation the rights
|
|
278
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
279
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
280
|
+
* furnished to do so, subject to the following conditions:
|
|
281
|
+
*
|
|
282
|
+
* The above copyright notice and this permission notice shall be included in
|
|
283
|
+
* all copies or substantial portions of the Software.
|
|
284
|
+
*
|
|
285
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
286
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
287
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
288
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
289
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
290
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
291
|
+
* THE SOFTWARE.
|
|
292
|
+
*/
|
|
293
|
+
var P = (
|
|
294
|
+
/** @class */
|
|
295
|
+
function(a) {
|
|
296
|
+
_(e, a);
|
|
297
|
+
function e(t) {
|
|
298
|
+
var n = a.call(this, L(L({}, e.defaultAdapter), t)) || this;
|
|
299
|
+
return n.focusOnActivate_ = !0, n;
|
|
300
|
+
}
|
|
301
|
+
return Object.defineProperty(e, "cssClasses", {
|
|
302
|
+
get: function() {
|
|
303
|
+
return K;
|
|
304
|
+
},
|
|
305
|
+
enumerable: !1,
|
|
306
|
+
configurable: !0
|
|
307
|
+
}), Object.defineProperty(e, "strings", {
|
|
308
|
+
get: function() {
|
|
309
|
+
return M;
|
|
310
|
+
},
|
|
311
|
+
enumerable: !1,
|
|
312
|
+
configurable: !0
|
|
313
|
+
}), Object.defineProperty(e, "defaultAdapter", {
|
|
314
|
+
get: function() {
|
|
315
|
+
return {
|
|
316
|
+
addClass: function() {
|
|
317
|
+
},
|
|
318
|
+
removeClass: function() {
|
|
319
|
+
},
|
|
320
|
+
hasClass: function() {
|
|
321
|
+
return !1;
|
|
322
|
+
},
|
|
323
|
+
setAttr: function() {
|
|
324
|
+
},
|
|
325
|
+
activateIndicator: function() {
|
|
326
|
+
},
|
|
327
|
+
deactivateIndicator: function() {
|
|
328
|
+
},
|
|
329
|
+
notifyInteracted: function() {
|
|
330
|
+
},
|
|
331
|
+
getOffsetLeft: function() {
|
|
332
|
+
return 0;
|
|
333
|
+
},
|
|
334
|
+
getOffsetWidth: function() {
|
|
335
|
+
return 0;
|
|
336
|
+
},
|
|
337
|
+
getContentOffsetLeft: function() {
|
|
338
|
+
return 0;
|
|
339
|
+
},
|
|
340
|
+
getContentOffsetWidth: function() {
|
|
341
|
+
return 0;
|
|
342
|
+
},
|
|
343
|
+
focus: function() {
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
},
|
|
347
|
+
enumerable: !1,
|
|
348
|
+
configurable: !0
|
|
349
|
+
}), e.prototype.handleClick = function() {
|
|
350
|
+
this.adapter.notifyInteracted();
|
|
351
|
+
}, e.prototype.isActive = function() {
|
|
352
|
+
return this.adapter.hasClass(K.ACTIVE);
|
|
353
|
+
}, e.prototype.setFocusOnActivate = function(t) {
|
|
354
|
+
this.focusOnActivate_ = t;
|
|
355
|
+
}, e.prototype.activate = function(t) {
|
|
356
|
+
this.adapter.addClass(K.ACTIVE), this.adapter.setAttr(M.ARIA_SELECTED, "true"), this.adapter.setAttr(M.TABINDEX, "0"), this.adapter.activateIndicator(t), this.focusOnActivate_ && this.adapter.focus();
|
|
357
|
+
}, e.prototype.deactivate = function() {
|
|
358
|
+
this.isActive() && (this.adapter.removeClass(K.ACTIVE), this.adapter.setAttr(M.ARIA_SELECTED, "false"), this.adapter.setAttr(M.TABINDEX, "-1"), this.adapter.deactivateIndicator());
|
|
359
|
+
}, e.prototype.computeDimensions = function() {
|
|
360
|
+
var t = this.adapter.getOffsetWidth(), n = this.adapter.getOffsetLeft(), r = this.adapter.getContentOffsetWidth(), o = this.adapter.getContentOffsetLeft();
|
|
361
|
+
return {
|
|
362
|
+
contentLeft: n + o,
|
|
363
|
+
contentRight: n + o + r,
|
|
364
|
+
rootLeft: n,
|
|
365
|
+
rootRight: n + t
|
|
366
|
+
};
|
|
367
|
+
}, e;
|
|
368
|
+
}(k)
|
|
369
|
+
);
|
|
370
|
+
/**
|
|
371
|
+
* @license
|
|
372
|
+
* Copyright 2018 Google Inc.
|
|
373
|
+
*
|
|
374
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
375
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
376
|
+
* in the Software without restriction, including without limitation the rights
|
|
377
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
378
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
379
|
+
* furnished to do so, subject to the following conditions:
|
|
380
|
+
*
|
|
381
|
+
* The above copyright notice and this permission notice shall be included in
|
|
382
|
+
* all copies or substantial portions of the Software.
|
|
383
|
+
*
|
|
384
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
385
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
386
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
387
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
388
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
389
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
390
|
+
* THE SOFTWARE.
|
|
391
|
+
*/
|
|
392
|
+
var at = (
|
|
393
|
+
/** @class */
|
|
394
|
+
function(a) {
|
|
395
|
+
_(e, a);
|
|
396
|
+
function e() {
|
|
397
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
398
|
+
}
|
|
399
|
+
return e.attachTo = function(t) {
|
|
400
|
+
return new e(t);
|
|
401
|
+
}, e.prototype.initialize = function(t, n) {
|
|
402
|
+
t === void 0 && (t = function(i, l) {
|
|
403
|
+
return new tt(i, l);
|
|
404
|
+
}), n === void 0 && (n = function(i) {
|
|
405
|
+
return new rt(i);
|
|
406
|
+
}), this.id = this.root.id;
|
|
407
|
+
var r = new gt(tt.createAdapter(this));
|
|
408
|
+
this.ripple_ = t(this.root, r);
|
|
409
|
+
var o = this.root.querySelector(P.strings.TAB_INDICATOR_SELECTOR);
|
|
410
|
+
this.tabIndicator_ = n(o), this.content_ = this.root.querySelector(P.strings.CONTENT_SELECTOR);
|
|
411
|
+
}, e.prototype.initialSyncWithDOM = function() {
|
|
412
|
+
var t = this;
|
|
413
|
+
this.handleClick_ = function() {
|
|
414
|
+
return t.foundation.handleClick();
|
|
415
|
+
}, this.listen("click", this.handleClick_);
|
|
416
|
+
}, e.prototype.destroy = function() {
|
|
417
|
+
this.unlisten("click", this.handleClick_), this.ripple_.destroy(), a.prototype.destroy.call(this);
|
|
418
|
+
}, e.prototype.getDefaultFoundation = function() {
|
|
419
|
+
var t = this, n = {
|
|
420
|
+
setAttr: function(r, o) {
|
|
421
|
+
return t.root.setAttribute(r, o);
|
|
422
|
+
},
|
|
423
|
+
addClass: function(r) {
|
|
424
|
+
return t.root.classList.add(r);
|
|
425
|
+
},
|
|
426
|
+
removeClass: function(r) {
|
|
427
|
+
return t.root.classList.remove(r);
|
|
428
|
+
},
|
|
429
|
+
hasClass: function(r) {
|
|
430
|
+
return t.root.classList.contains(r);
|
|
431
|
+
},
|
|
432
|
+
activateIndicator: function(r) {
|
|
433
|
+
return t.tabIndicator_.activate(r);
|
|
434
|
+
},
|
|
435
|
+
deactivateIndicator: function() {
|
|
436
|
+
return t.tabIndicator_.deactivate();
|
|
437
|
+
},
|
|
438
|
+
notifyInteracted: function() {
|
|
439
|
+
return t.emit(
|
|
440
|
+
P.strings.INTERACTED_EVENT,
|
|
441
|
+
{ tabId: t.id },
|
|
442
|
+
!0
|
|
443
|
+
/* bubble */
|
|
444
|
+
);
|
|
445
|
+
},
|
|
446
|
+
getOffsetLeft: function() {
|
|
447
|
+
return t.root.offsetLeft;
|
|
448
|
+
},
|
|
449
|
+
getOffsetWidth: function() {
|
|
450
|
+
return t.root.offsetWidth;
|
|
451
|
+
},
|
|
452
|
+
getContentOffsetLeft: function() {
|
|
453
|
+
return t.content_.offsetLeft;
|
|
454
|
+
},
|
|
455
|
+
getContentOffsetWidth: function() {
|
|
456
|
+
return t.content_.offsetWidth;
|
|
457
|
+
},
|
|
458
|
+
focus: function() {
|
|
459
|
+
return t.root.focus();
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
return new P(n);
|
|
463
|
+
}, Object.defineProperty(e.prototype, "active", {
|
|
464
|
+
/**
|
|
465
|
+
* Getter for the active state of the tab
|
|
466
|
+
*/
|
|
467
|
+
get: function() {
|
|
468
|
+
return this.foundation.isActive();
|
|
469
|
+
},
|
|
470
|
+
enumerable: !1,
|
|
471
|
+
configurable: !0
|
|
472
|
+
}), Object.defineProperty(e.prototype, "focusOnActivate", {
|
|
473
|
+
set: function(t) {
|
|
474
|
+
this.foundation.setFocusOnActivate(t);
|
|
475
|
+
},
|
|
476
|
+
enumerable: !1,
|
|
477
|
+
configurable: !0
|
|
478
|
+
}), e.prototype.activate = function(t) {
|
|
479
|
+
this.foundation.activate(t);
|
|
480
|
+
}, e.prototype.deactivate = function() {
|
|
481
|
+
this.foundation.deactivate();
|
|
482
|
+
}, e.prototype.computeIndicatorClientRect = function() {
|
|
483
|
+
return this.tabIndicator_.computeContentClientRect();
|
|
484
|
+
}, e.prototype.computeDimensions = function() {
|
|
485
|
+
return this.foundation.computeDimensions();
|
|
486
|
+
}, e.prototype.focus = function() {
|
|
487
|
+
this.root.focus();
|
|
488
|
+
}, e;
|
|
489
|
+
}(H)
|
|
490
|
+
);
|
|
491
|
+
/**
|
|
492
|
+
* @license
|
|
493
|
+
* Copyright 2018 Google Inc.
|
|
494
|
+
*
|
|
495
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
496
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
497
|
+
* in the Software without restriction, including without limitation the rights
|
|
498
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
499
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
500
|
+
* furnished to do so, subject to the following conditions:
|
|
501
|
+
*
|
|
502
|
+
* The above copyright notice and this permission notice shall be included in
|
|
503
|
+
* all copies or substantial portions of the Software.
|
|
504
|
+
*
|
|
505
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
506
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
507
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
508
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
509
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
510
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
511
|
+
* THE SOFTWARE.
|
|
512
|
+
*/
|
|
513
|
+
var ot = {
|
|
514
|
+
ANIMATING: "mdc-tab-scroller--animating",
|
|
515
|
+
SCROLL_AREA_SCROLL: "mdc-tab-scroller__scroll-area--scroll",
|
|
516
|
+
SCROLL_TEST: "mdc-tab-scroller__test"
|
|
517
|
+
}, Lt = {
|
|
518
|
+
AREA_SELECTOR: ".mdc-tab-scroller__scroll-area",
|
|
519
|
+
CONTENT_SELECTOR: ".mdc-tab-scroller__scroll-content"
|
|
520
|
+
};
|
|
521
|
+
/**
|
|
522
|
+
* @license
|
|
523
|
+
* Copyright 2018 Google Inc.
|
|
524
|
+
*
|
|
525
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
526
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
527
|
+
* in the Software without restriction, including without limitation the rights
|
|
528
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
529
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
530
|
+
* furnished to do so, subject to the following conditions:
|
|
531
|
+
*
|
|
532
|
+
* The above copyright notice and this permission notice shall be included in
|
|
533
|
+
* all copies or substantial portions of the Software.
|
|
534
|
+
*
|
|
535
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
536
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
537
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
538
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
539
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
540
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
541
|
+
* THE SOFTWARE.
|
|
542
|
+
*/
|
|
543
|
+
var Q = (
|
|
544
|
+
/** @class */
|
|
545
|
+
/* @__PURE__ */ function() {
|
|
546
|
+
function a(e) {
|
|
547
|
+
this.adapter = e;
|
|
548
|
+
}
|
|
549
|
+
return a;
|
|
550
|
+
}()
|
|
551
|
+
);
|
|
552
|
+
/**
|
|
553
|
+
* @license
|
|
554
|
+
* Copyright 2018 Google Inc.
|
|
555
|
+
*
|
|
556
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
557
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
558
|
+
* in the Software without restriction, including without limitation the rights
|
|
559
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
560
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
561
|
+
* furnished to do so, subject to the following conditions:
|
|
562
|
+
*
|
|
563
|
+
* The above copyright notice and this permission notice shall be included in
|
|
564
|
+
* all copies or substantial portions of the Software.
|
|
565
|
+
*
|
|
566
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
567
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
568
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
569
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
570
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
571
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
572
|
+
* THE SOFTWARE.
|
|
573
|
+
*/
|
|
574
|
+
var Rt = (
|
|
575
|
+
/** @class */
|
|
576
|
+
function(a) {
|
|
577
|
+
_(e, a);
|
|
578
|
+
function e() {
|
|
579
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
580
|
+
}
|
|
581
|
+
return e.prototype.getScrollPositionRTL = function() {
|
|
582
|
+
var t = this.adapter.getScrollAreaScrollLeft(), n = this.calculateScrollEdges_().right;
|
|
583
|
+
return Math.round(n - t);
|
|
584
|
+
}, e.prototype.scrollToRTL = function(t) {
|
|
585
|
+
var n = this.calculateScrollEdges_(), r = this.adapter.getScrollAreaScrollLeft(), o = this.clampScrollValue_(n.right - t);
|
|
586
|
+
return {
|
|
587
|
+
finalScrollPosition: o,
|
|
588
|
+
scrollDelta: o - r
|
|
589
|
+
};
|
|
590
|
+
}, e.prototype.incrementScrollRTL = function(t) {
|
|
591
|
+
var n = this.adapter.getScrollAreaScrollLeft(), r = this.clampScrollValue_(n - t);
|
|
592
|
+
return {
|
|
593
|
+
finalScrollPosition: r,
|
|
594
|
+
scrollDelta: r - n
|
|
595
|
+
};
|
|
596
|
+
}, e.prototype.getAnimatingScrollPosition = function(t) {
|
|
597
|
+
return t;
|
|
598
|
+
}, e.prototype.calculateScrollEdges_ = function() {
|
|
599
|
+
var t = this.adapter.getScrollContentOffsetWidth(), n = this.adapter.getScrollAreaOffsetWidth();
|
|
600
|
+
return {
|
|
601
|
+
left: 0,
|
|
602
|
+
right: t - n
|
|
603
|
+
};
|
|
604
|
+
}, e.prototype.clampScrollValue_ = function(t) {
|
|
605
|
+
var n = this.calculateScrollEdges_();
|
|
606
|
+
return Math.min(Math.max(n.left, t), n.right);
|
|
607
|
+
}, e;
|
|
608
|
+
}(Q)
|
|
609
|
+
);
|
|
610
|
+
/**
|
|
611
|
+
* @license
|
|
612
|
+
* Copyright 2018 Google Inc.
|
|
613
|
+
*
|
|
614
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
615
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
616
|
+
* in the Software without restriction, including without limitation the rights
|
|
617
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
618
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
619
|
+
* furnished to do so, subject to the following conditions:
|
|
620
|
+
*
|
|
621
|
+
* The above copyright notice and this permission notice shall be included in
|
|
622
|
+
* all copies or substantial portions of the Software.
|
|
623
|
+
*
|
|
624
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
625
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
626
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
627
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
628
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
629
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
630
|
+
* THE SOFTWARE.
|
|
631
|
+
*/
|
|
632
|
+
var It = (
|
|
633
|
+
/** @class */
|
|
634
|
+
function(a) {
|
|
635
|
+
_(e, a);
|
|
636
|
+
function e() {
|
|
637
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
638
|
+
}
|
|
639
|
+
return e.prototype.getScrollPositionRTL = function(t) {
|
|
640
|
+
var n = this.adapter.getScrollAreaScrollLeft();
|
|
641
|
+
return Math.round(t - n);
|
|
642
|
+
}, e.prototype.scrollToRTL = function(t) {
|
|
643
|
+
var n = this.adapter.getScrollAreaScrollLeft(), r = this.clampScrollValue_(-t);
|
|
644
|
+
return {
|
|
645
|
+
finalScrollPosition: r,
|
|
646
|
+
scrollDelta: r - n
|
|
647
|
+
};
|
|
648
|
+
}, e.prototype.incrementScrollRTL = function(t) {
|
|
649
|
+
var n = this.adapter.getScrollAreaScrollLeft(), r = this.clampScrollValue_(n - t);
|
|
650
|
+
return {
|
|
651
|
+
finalScrollPosition: r,
|
|
652
|
+
scrollDelta: r - n
|
|
653
|
+
};
|
|
654
|
+
}, e.prototype.getAnimatingScrollPosition = function(t, n) {
|
|
655
|
+
return t - n;
|
|
656
|
+
}, e.prototype.calculateScrollEdges_ = function() {
|
|
657
|
+
var t = this.adapter.getScrollContentOffsetWidth(), n = this.adapter.getScrollAreaOffsetWidth();
|
|
658
|
+
return {
|
|
659
|
+
left: n - t,
|
|
660
|
+
right: 0
|
|
661
|
+
};
|
|
662
|
+
}, e.prototype.clampScrollValue_ = function(t) {
|
|
663
|
+
var n = this.calculateScrollEdges_();
|
|
664
|
+
return Math.max(Math.min(n.right, t), n.left);
|
|
665
|
+
}, e;
|
|
666
|
+
}(Q)
|
|
667
|
+
);
|
|
668
|
+
/**
|
|
669
|
+
* @license
|
|
670
|
+
* Copyright 2018 Google Inc.
|
|
671
|
+
*
|
|
672
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
673
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
674
|
+
* in the Software without restriction, including without limitation the rights
|
|
675
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
676
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
677
|
+
* furnished to do so, subject to the following conditions:
|
|
678
|
+
*
|
|
679
|
+
* The above copyright notice and this permission notice shall be included in
|
|
680
|
+
* all copies or substantial portions of the Software.
|
|
681
|
+
*
|
|
682
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
683
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
684
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
685
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
686
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
687
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
688
|
+
* THE SOFTWARE.
|
|
689
|
+
*/
|
|
690
|
+
var Ot = (
|
|
691
|
+
/** @class */
|
|
692
|
+
function(a) {
|
|
693
|
+
_(e, a);
|
|
694
|
+
function e() {
|
|
695
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
696
|
+
}
|
|
697
|
+
return e.prototype.getScrollPositionRTL = function(t) {
|
|
698
|
+
var n = this.adapter.getScrollAreaScrollLeft();
|
|
699
|
+
return Math.round(n - t);
|
|
700
|
+
}, e.prototype.scrollToRTL = function(t) {
|
|
701
|
+
var n = this.adapter.getScrollAreaScrollLeft(), r = this.clampScrollValue_(t);
|
|
702
|
+
return {
|
|
703
|
+
finalScrollPosition: r,
|
|
704
|
+
scrollDelta: n - r
|
|
705
|
+
};
|
|
706
|
+
}, e.prototype.incrementScrollRTL = function(t) {
|
|
707
|
+
var n = this.adapter.getScrollAreaScrollLeft(), r = this.clampScrollValue_(n + t);
|
|
708
|
+
return {
|
|
709
|
+
finalScrollPosition: r,
|
|
710
|
+
scrollDelta: n - r
|
|
711
|
+
};
|
|
712
|
+
}, e.prototype.getAnimatingScrollPosition = function(t, n) {
|
|
713
|
+
return t + n;
|
|
714
|
+
}, e.prototype.calculateScrollEdges_ = function() {
|
|
715
|
+
var t = this.adapter.getScrollContentOffsetWidth(), n = this.adapter.getScrollAreaOffsetWidth();
|
|
716
|
+
return {
|
|
717
|
+
left: t - n,
|
|
718
|
+
right: 0
|
|
719
|
+
};
|
|
720
|
+
}, e.prototype.clampScrollValue_ = function(t) {
|
|
721
|
+
var n = this.calculateScrollEdges_();
|
|
722
|
+
return Math.min(Math.max(n.right, t), n.left);
|
|
723
|
+
}, e;
|
|
724
|
+
}(Q)
|
|
725
|
+
);
|
|
726
|
+
/**
|
|
727
|
+
* @license
|
|
728
|
+
* Copyright 2018 Google Inc.
|
|
729
|
+
*
|
|
730
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
731
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
732
|
+
* in the Software without restriction, including without limitation the rights
|
|
733
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
734
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
735
|
+
* furnished to do so, subject to the following conditions:
|
|
736
|
+
*
|
|
737
|
+
* The above copyright notice and this permission notice shall be included in
|
|
738
|
+
* all copies or substantial portions of the Software.
|
|
739
|
+
*
|
|
740
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
741
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
742
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
743
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
744
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
745
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
746
|
+
* THE SOFTWARE.
|
|
747
|
+
*/
|
|
748
|
+
var q = (
|
|
749
|
+
/** @class */
|
|
750
|
+
function(a) {
|
|
751
|
+
_(e, a);
|
|
752
|
+
function e(t) {
|
|
753
|
+
var n = a.call(this, L(L({}, e.defaultAdapter), t)) || this;
|
|
754
|
+
return n.isAnimating_ = !1, n;
|
|
755
|
+
}
|
|
756
|
+
return Object.defineProperty(e, "cssClasses", {
|
|
757
|
+
get: function() {
|
|
758
|
+
return ot;
|
|
759
|
+
},
|
|
760
|
+
enumerable: !1,
|
|
761
|
+
configurable: !0
|
|
762
|
+
}), Object.defineProperty(e, "strings", {
|
|
763
|
+
get: function() {
|
|
764
|
+
return Lt;
|
|
765
|
+
},
|
|
766
|
+
enumerable: !1,
|
|
767
|
+
configurable: !0
|
|
768
|
+
}), Object.defineProperty(e, "defaultAdapter", {
|
|
769
|
+
get: function() {
|
|
770
|
+
return {
|
|
771
|
+
eventTargetMatchesSelector: function() {
|
|
772
|
+
return !1;
|
|
773
|
+
},
|
|
774
|
+
addClass: function() {
|
|
775
|
+
},
|
|
776
|
+
removeClass: function() {
|
|
777
|
+
},
|
|
778
|
+
addScrollAreaClass: function() {
|
|
779
|
+
},
|
|
780
|
+
setScrollAreaStyleProperty: function() {
|
|
781
|
+
},
|
|
782
|
+
setScrollContentStyleProperty: function() {
|
|
783
|
+
},
|
|
784
|
+
getScrollContentStyleValue: function() {
|
|
785
|
+
return "";
|
|
786
|
+
},
|
|
787
|
+
setScrollAreaScrollLeft: function() {
|
|
788
|
+
},
|
|
789
|
+
getScrollAreaScrollLeft: function() {
|
|
790
|
+
return 0;
|
|
791
|
+
},
|
|
792
|
+
getScrollContentOffsetWidth: function() {
|
|
793
|
+
return 0;
|
|
794
|
+
},
|
|
795
|
+
getScrollAreaOffsetWidth: function() {
|
|
796
|
+
return 0;
|
|
797
|
+
},
|
|
798
|
+
computeScrollAreaClientRect: function() {
|
|
799
|
+
return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
|
|
800
|
+
},
|
|
801
|
+
computeScrollContentClientRect: function() {
|
|
802
|
+
return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
|
|
803
|
+
},
|
|
804
|
+
computeHorizontalScrollbarHeight: function() {
|
|
805
|
+
return 0;
|
|
806
|
+
}
|
|
807
|
+
};
|
|
808
|
+
},
|
|
809
|
+
enumerable: !1,
|
|
810
|
+
configurable: !0
|
|
811
|
+
}), e.prototype.init = function() {
|
|
812
|
+
var t = this.adapter.computeHorizontalScrollbarHeight();
|
|
813
|
+
this.adapter.setScrollAreaStyleProperty("margin-bottom", -t + "px"), this.adapter.addScrollAreaClass(e.cssClasses.SCROLL_AREA_SCROLL);
|
|
814
|
+
}, e.prototype.getScrollPosition = function() {
|
|
815
|
+
if (this.isRTL_())
|
|
816
|
+
return this.computeCurrentScrollPositionRTL_();
|
|
817
|
+
var t = this.calculateCurrentTranslateX_(), n = this.adapter.getScrollAreaScrollLeft();
|
|
818
|
+
return n - t;
|
|
819
|
+
}, e.prototype.handleInteraction = function() {
|
|
820
|
+
this.isAnimating_ && this.stopScrollAnimation_();
|
|
821
|
+
}, e.prototype.handleTransitionEnd = function(t) {
|
|
822
|
+
var n = t.target;
|
|
823
|
+
!this.isAnimating_ || !this.adapter.eventTargetMatchesSelector(n, e.strings.CONTENT_SELECTOR) || (this.isAnimating_ = !1, this.adapter.removeClass(e.cssClasses.ANIMATING));
|
|
824
|
+
}, e.prototype.incrementScroll = function(t) {
|
|
825
|
+
t !== 0 && this.animate_(this.getIncrementScrollOperation_(t));
|
|
826
|
+
}, e.prototype.incrementScrollImmediate = function(t) {
|
|
827
|
+
if (t !== 0) {
|
|
828
|
+
var n = this.getIncrementScrollOperation_(t);
|
|
829
|
+
n.scrollDelta !== 0 && (this.stopScrollAnimation_(), this.adapter.setScrollAreaScrollLeft(n.finalScrollPosition));
|
|
830
|
+
}
|
|
831
|
+
}, e.prototype.scrollTo = function(t) {
|
|
832
|
+
if (this.isRTL_())
|
|
833
|
+
return this.scrollToRTL_(t);
|
|
834
|
+
this.scrollTo_(t);
|
|
835
|
+
}, e.prototype.getRTLScroller = function() {
|
|
836
|
+
return this.rtlScrollerInstance_ || (this.rtlScrollerInstance_ = this.rtlScrollerFactory_()), this.rtlScrollerInstance_;
|
|
837
|
+
}, e.prototype.calculateCurrentTranslateX_ = function() {
|
|
838
|
+
var t = this.adapter.getScrollContentStyleValue("transform");
|
|
839
|
+
if (t === "none")
|
|
840
|
+
return 0;
|
|
841
|
+
var n = /\((.+?)\)/.exec(t);
|
|
842
|
+
if (!n)
|
|
843
|
+
return 0;
|
|
844
|
+
var r = n[1], o = vt(r.split(","), 6);
|
|
845
|
+
o[0], o[1], o[2], o[3];
|
|
846
|
+
var i = o[4];
|
|
847
|
+
return o[5], parseFloat(i);
|
|
848
|
+
}, e.prototype.clampScrollValue_ = function(t) {
|
|
849
|
+
var n = this.calculateScrollEdges_();
|
|
850
|
+
return Math.min(Math.max(n.left, t), n.right);
|
|
851
|
+
}, e.prototype.computeCurrentScrollPositionRTL_ = function() {
|
|
852
|
+
var t = this.calculateCurrentTranslateX_();
|
|
853
|
+
return this.getRTLScroller().getScrollPositionRTL(t);
|
|
854
|
+
}, e.prototype.calculateScrollEdges_ = function() {
|
|
855
|
+
var t = this.adapter.getScrollContentOffsetWidth(), n = this.adapter.getScrollAreaOffsetWidth();
|
|
856
|
+
return {
|
|
857
|
+
left: 0,
|
|
858
|
+
right: t - n
|
|
859
|
+
};
|
|
860
|
+
}, e.prototype.scrollTo_ = function(t) {
|
|
861
|
+
var n = this.getScrollPosition(), r = this.clampScrollValue_(t), o = r - n;
|
|
862
|
+
this.animate_({
|
|
863
|
+
finalScrollPosition: r,
|
|
864
|
+
scrollDelta: o
|
|
865
|
+
});
|
|
866
|
+
}, e.prototype.scrollToRTL_ = function(t) {
|
|
867
|
+
var n = this.getRTLScroller().scrollToRTL(t);
|
|
868
|
+
this.animate_(n);
|
|
869
|
+
}, e.prototype.getIncrementScrollOperation_ = function(t) {
|
|
870
|
+
if (this.isRTL_())
|
|
871
|
+
return this.getRTLScroller().incrementScrollRTL(t);
|
|
872
|
+
var n = this.getScrollPosition(), r = t + n, o = this.clampScrollValue_(r), i = o - n;
|
|
873
|
+
return {
|
|
874
|
+
finalScrollPosition: o,
|
|
875
|
+
scrollDelta: i
|
|
876
|
+
};
|
|
877
|
+
}, e.prototype.animate_ = function(t) {
|
|
878
|
+
var n = this;
|
|
879
|
+
t.scrollDelta !== 0 && (this.stopScrollAnimation_(), this.adapter.setScrollAreaScrollLeft(t.finalScrollPosition), this.adapter.setScrollContentStyleProperty("transform", "translateX(" + t.scrollDelta + "px)"), this.adapter.computeScrollAreaClientRect(), requestAnimationFrame(function() {
|
|
880
|
+
n.adapter.addClass(e.cssClasses.ANIMATING), n.adapter.setScrollContentStyleProperty("transform", "none");
|
|
881
|
+
}), this.isAnimating_ = !0);
|
|
882
|
+
}, e.prototype.stopScrollAnimation_ = function() {
|
|
883
|
+
this.isAnimating_ = !1;
|
|
884
|
+
var t = this.getAnimatingScrollPosition_();
|
|
885
|
+
this.adapter.removeClass(e.cssClasses.ANIMATING), this.adapter.setScrollContentStyleProperty("transform", "translateX(0px)"), this.adapter.setScrollAreaScrollLeft(t);
|
|
886
|
+
}, e.prototype.getAnimatingScrollPosition_ = function() {
|
|
887
|
+
var t = this.calculateCurrentTranslateX_(), n = this.adapter.getScrollAreaScrollLeft();
|
|
888
|
+
return this.isRTL_() ? this.getRTLScroller().getAnimatingScrollPosition(n, t) : n - t;
|
|
889
|
+
}, e.prototype.rtlScrollerFactory_ = function() {
|
|
890
|
+
var t = this.adapter.getScrollAreaScrollLeft();
|
|
891
|
+
this.adapter.setScrollAreaScrollLeft(t - 1);
|
|
892
|
+
var n = this.adapter.getScrollAreaScrollLeft();
|
|
893
|
+
if (n < 0)
|
|
894
|
+
return this.adapter.setScrollAreaScrollLeft(t), new It(this.adapter);
|
|
895
|
+
var r = this.adapter.computeScrollAreaClientRect(), o = this.adapter.computeScrollContentClientRect(), i = Math.round(o.right - r.right);
|
|
896
|
+
return this.adapter.setScrollAreaScrollLeft(t), i === n ? new Ot(this.adapter) : new Rt(this.adapter);
|
|
897
|
+
}, e.prototype.isRTL_ = function() {
|
|
898
|
+
return this.adapter.getScrollContentStyleValue("direction") === "rtl";
|
|
899
|
+
}, e;
|
|
900
|
+
}(k)
|
|
901
|
+
);
|
|
902
|
+
/**
|
|
903
|
+
* @license
|
|
904
|
+
* Copyright 2018 Google Inc.
|
|
905
|
+
*
|
|
906
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
907
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
908
|
+
* in the Software without restriction, including without limitation the rights
|
|
909
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
910
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
911
|
+
* furnished to do so, subject to the following conditions:
|
|
912
|
+
*
|
|
913
|
+
* The above copyright notice and this permission notice shall be included in
|
|
914
|
+
* all copies or substantial portions of the Software.
|
|
915
|
+
*
|
|
916
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
917
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
918
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
919
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
920
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
921
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
922
|
+
* THE SOFTWARE.
|
|
923
|
+
*/
|
|
924
|
+
var U;
|
|
925
|
+
function Dt(a, e) {
|
|
926
|
+
if (e === void 0 && (e = !0), e && typeof U < "u")
|
|
927
|
+
return U;
|
|
928
|
+
var t = a.createElement("div");
|
|
929
|
+
t.classList.add(ot.SCROLL_TEST), a.body.appendChild(t);
|
|
930
|
+
var n = t.offsetHeight - t.clientHeight;
|
|
931
|
+
return a.body.removeChild(t), e && (U = n), n;
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* @license
|
|
935
|
+
* Copyright 2018 Google Inc.
|
|
936
|
+
*
|
|
937
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
938
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
939
|
+
* in the Software without restriction, including without limitation the rights
|
|
940
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
941
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
942
|
+
* furnished to do so, subject to the following conditions:
|
|
943
|
+
*
|
|
944
|
+
* The above copyright notice and this permission notice shall be included in
|
|
945
|
+
* all copies or substantial portions of the Software.
|
|
946
|
+
*
|
|
947
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
948
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
949
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
950
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
951
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
952
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
953
|
+
* THE SOFTWARE.
|
|
954
|
+
*/
|
|
955
|
+
var it = (
|
|
956
|
+
/** @class */
|
|
957
|
+
function(a) {
|
|
958
|
+
_(e, a);
|
|
959
|
+
function e() {
|
|
960
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
961
|
+
}
|
|
962
|
+
return e.attachTo = function(t) {
|
|
963
|
+
return new e(t);
|
|
964
|
+
}, e.prototype.initialize = function() {
|
|
965
|
+
this.area_ = this.root.querySelector(q.strings.AREA_SELECTOR), this.content_ = this.root.querySelector(q.strings.CONTENT_SELECTOR);
|
|
966
|
+
}, e.prototype.initialSyncWithDOM = function() {
|
|
967
|
+
var t = this;
|
|
968
|
+
this.handleInteraction_ = function() {
|
|
969
|
+
return t.foundation.handleInteraction();
|
|
970
|
+
}, this.handleTransitionEnd_ = function(n) {
|
|
971
|
+
return t.foundation.handleTransitionEnd(n);
|
|
972
|
+
}, this.area_.addEventListener("wheel", this.handleInteraction_, E()), this.area_.addEventListener("touchstart", this.handleInteraction_, E()), this.area_.addEventListener("pointerdown", this.handleInteraction_, E()), this.area_.addEventListener("mousedown", this.handleInteraction_, E()), this.area_.addEventListener("keydown", this.handleInteraction_, E()), this.content_.addEventListener("transitionend", this.handleTransitionEnd_);
|
|
973
|
+
}, e.prototype.destroy = function() {
|
|
974
|
+
a.prototype.destroy.call(this), this.area_.removeEventListener("wheel", this.handleInteraction_, E()), this.area_.removeEventListener("touchstart", this.handleInteraction_, E()), this.area_.removeEventListener("pointerdown", this.handleInteraction_, E()), this.area_.removeEventListener("mousedown", this.handleInteraction_, E()), this.area_.removeEventListener("keydown", this.handleInteraction_, E()), this.content_.removeEventListener("transitionend", this.handleTransitionEnd_);
|
|
975
|
+
}, e.prototype.getDefaultFoundation = function() {
|
|
976
|
+
var t = this, n = {
|
|
977
|
+
eventTargetMatchesSelector: function(r, o) {
|
|
978
|
+
return bt(r, o);
|
|
979
|
+
},
|
|
980
|
+
addClass: function(r) {
|
|
981
|
+
return t.root.classList.add(r);
|
|
982
|
+
},
|
|
983
|
+
removeClass: function(r) {
|
|
984
|
+
return t.root.classList.remove(r);
|
|
985
|
+
},
|
|
986
|
+
addScrollAreaClass: function(r) {
|
|
987
|
+
return t.area_.classList.add(r);
|
|
988
|
+
},
|
|
989
|
+
setScrollAreaStyleProperty: function(r, o) {
|
|
990
|
+
return t.area_.style.setProperty(r, o);
|
|
991
|
+
},
|
|
992
|
+
setScrollContentStyleProperty: function(r, o) {
|
|
993
|
+
return t.content_.style.setProperty(r, o);
|
|
994
|
+
},
|
|
995
|
+
getScrollContentStyleValue: function(r) {
|
|
996
|
+
return window.getComputedStyle(t.content_).getPropertyValue(r);
|
|
997
|
+
},
|
|
998
|
+
setScrollAreaScrollLeft: function(r) {
|
|
999
|
+
return t.area_.scrollLeft = r;
|
|
1000
|
+
},
|
|
1001
|
+
getScrollAreaScrollLeft: function() {
|
|
1002
|
+
return t.area_.scrollLeft;
|
|
1003
|
+
},
|
|
1004
|
+
getScrollContentOffsetWidth: function() {
|
|
1005
|
+
return t.content_.offsetWidth;
|
|
1006
|
+
},
|
|
1007
|
+
getScrollAreaOffsetWidth: function() {
|
|
1008
|
+
return t.area_.offsetWidth;
|
|
1009
|
+
},
|
|
1010
|
+
computeScrollAreaClientRect: function() {
|
|
1011
|
+
return t.area_.getBoundingClientRect();
|
|
1012
|
+
},
|
|
1013
|
+
computeScrollContentClientRect: function() {
|
|
1014
|
+
return t.content_.getBoundingClientRect();
|
|
1015
|
+
},
|
|
1016
|
+
computeHorizontalScrollbarHeight: function() {
|
|
1017
|
+
return Dt(document);
|
|
1018
|
+
}
|
|
1019
|
+
};
|
|
1020
|
+
return new q(n);
|
|
1021
|
+
}, e.prototype.getScrollPosition = function() {
|
|
1022
|
+
return this.foundation.getScrollPosition();
|
|
1023
|
+
}, e.prototype.getScrollContentWidth = function() {
|
|
1024
|
+
return this.content_.offsetWidth;
|
|
1025
|
+
}, e.prototype.incrementScroll = function(t) {
|
|
1026
|
+
this.foundation.incrementScroll(t);
|
|
1027
|
+
}, e.prototype.scrollTo = function(t) {
|
|
1028
|
+
this.foundation.scrollTo(t);
|
|
1029
|
+
}, e;
|
|
1030
|
+
}(H)
|
|
1031
|
+
);
|
|
1032
|
+
/**
|
|
1033
|
+
* @license
|
|
1034
|
+
* Copyright 2018 Google Inc.
|
|
1035
|
+
*
|
|
1036
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1037
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1038
|
+
* in the Software without restriction, including without limitation the rights
|
|
1039
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1040
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1041
|
+
* furnished to do so, subject to the following conditions:
|
|
1042
|
+
*
|
|
1043
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1044
|
+
* all copies or substantial portions of the Software.
|
|
1045
|
+
*
|
|
1046
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1047
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1048
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1049
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1050
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1051
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1052
|
+
* THE SOFTWARE.
|
|
1053
|
+
*/
|
|
1054
|
+
var f = {
|
|
1055
|
+
ARROW_LEFT_KEY: "ArrowLeft",
|
|
1056
|
+
ARROW_RIGHT_KEY: "ArrowRight",
|
|
1057
|
+
END_KEY: "End",
|
|
1058
|
+
ENTER_KEY: "Enter",
|
|
1059
|
+
HOME_KEY: "Home",
|
|
1060
|
+
SPACE_KEY: "Space",
|
|
1061
|
+
TAB_ACTIVATED_EVENT: "MDCTabBar:activated",
|
|
1062
|
+
TAB_SCROLLER_SELECTOR: ".mdc-tab-scroller",
|
|
1063
|
+
TAB_SELECTOR: ".mdc-tab"
|
|
1064
|
+
}, g = {
|
|
1065
|
+
ARROW_LEFT_KEYCODE: 37,
|
|
1066
|
+
ARROW_RIGHT_KEYCODE: 39,
|
|
1067
|
+
END_KEYCODE: 35,
|
|
1068
|
+
ENTER_KEYCODE: 13,
|
|
1069
|
+
EXTRA_SCROLL_AMOUNT: 20,
|
|
1070
|
+
HOME_KEYCODE: 36,
|
|
1071
|
+
SPACE_KEYCODE: 32
|
|
1072
|
+
};
|
|
1073
|
+
/**
|
|
1074
|
+
* @license
|
|
1075
|
+
* Copyright 2018 Google Inc.
|
|
1076
|
+
*
|
|
1077
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1078
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1079
|
+
* in the Software without restriction, including without limitation the rights
|
|
1080
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1081
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1082
|
+
* furnished to do so, subject to the following conditions:
|
|
1083
|
+
*
|
|
1084
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1085
|
+
* all copies or substantial portions of the Software.
|
|
1086
|
+
*
|
|
1087
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1088
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1089
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1090
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1091
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1092
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1093
|
+
* THE SOFTWARE.
|
|
1094
|
+
*/
|
|
1095
|
+
var I = /* @__PURE__ */ new Set();
|
|
1096
|
+
I.add(f.ARROW_LEFT_KEY);
|
|
1097
|
+
I.add(f.ARROW_RIGHT_KEY);
|
|
1098
|
+
I.add(f.END_KEY);
|
|
1099
|
+
I.add(f.HOME_KEY);
|
|
1100
|
+
I.add(f.ENTER_KEY);
|
|
1101
|
+
I.add(f.SPACE_KEY);
|
|
1102
|
+
var O = /* @__PURE__ */ new Map();
|
|
1103
|
+
O.set(g.ARROW_LEFT_KEYCODE, f.ARROW_LEFT_KEY);
|
|
1104
|
+
O.set(g.ARROW_RIGHT_KEYCODE, f.ARROW_RIGHT_KEY);
|
|
1105
|
+
O.set(g.END_KEYCODE, f.END_KEY);
|
|
1106
|
+
O.set(g.HOME_KEYCODE, f.HOME_KEY);
|
|
1107
|
+
O.set(g.ENTER_KEYCODE, f.ENTER_KEY);
|
|
1108
|
+
O.set(g.SPACE_KEYCODE, f.SPACE_KEY);
|
|
1109
|
+
var ct = (
|
|
1110
|
+
/** @class */
|
|
1111
|
+
function(a) {
|
|
1112
|
+
_(e, a);
|
|
1113
|
+
function e(t) {
|
|
1114
|
+
var n = a.call(this, L(L({}, e.defaultAdapter), t)) || this;
|
|
1115
|
+
return n.useAutomaticActivation_ = !1, n;
|
|
1116
|
+
}
|
|
1117
|
+
return Object.defineProperty(e, "strings", {
|
|
1118
|
+
get: function() {
|
|
1119
|
+
return f;
|
|
1120
|
+
},
|
|
1121
|
+
enumerable: !1,
|
|
1122
|
+
configurable: !0
|
|
1123
|
+
}), Object.defineProperty(e, "numbers", {
|
|
1124
|
+
get: function() {
|
|
1125
|
+
return g;
|
|
1126
|
+
},
|
|
1127
|
+
enumerable: !1,
|
|
1128
|
+
configurable: !0
|
|
1129
|
+
}), Object.defineProperty(e, "defaultAdapter", {
|
|
1130
|
+
get: function() {
|
|
1131
|
+
return {
|
|
1132
|
+
scrollTo: function() {
|
|
1133
|
+
},
|
|
1134
|
+
incrementScroll: function() {
|
|
1135
|
+
},
|
|
1136
|
+
getScrollPosition: function() {
|
|
1137
|
+
return 0;
|
|
1138
|
+
},
|
|
1139
|
+
getScrollContentWidth: function() {
|
|
1140
|
+
return 0;
|
|
1141
|
+
},
|
|
1142
|
+
getOffsetWidth: function() {
|
|
1143
|
+
return 0;
|
|
1144
|
+
},
|
|
1145
|
+
isRTL: function() {
|
|
1146
|
+
return !1;
|
|
1147
|
+
},
|
|
1148
|
+
setActiveTab: function() {
|
|
1149
|
+
},
|
|
1150
|
+
activateTabAtIndex: function() {
|
|
1151
|
+
},
|
|
1152
|
+
deactivateTabAtIndex: function() {
|
|
1153
|
+
},
|
|
1154
|
+
focusTabAtIndex: function() {
|
|
1155
|
+
},
|
|
1156
|
+
getTabIndicatorClientRectAtIndex: function() {
|
|
1157
|
+
return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
|
|
1158
|
+
},
|
|
1159
|
+
getTabDimensionsAtIndex: function() {
|
|
1160
|
+
return { rootLeft: 0, rootRight: 0, contentLeft: 0, contentRight: 0 };
|
|
1161
|
+
},
|
|
1162
|
+
getPreviousActiveTabIndex: function() {
|
|
1163
|
+
return -1;
|
|
1164
|
+
},
|
|
1165
|
+
getFocusedTabIndex: function() {
|
|
1166
|
+
return -1;
|
|
1167
|
+
},
|
|
1168
|
+
getIndexOfTabById: function() {
|
|
1169
|
+
return -1;
|
|
1170
|
+
},
|
|
1171
|
+
getTabListLength: function() {
|
|
1172
|
+
return 0;
|
|
1173
|
+
},
|
|
1174
|
+
notifyTabActivated: function() {
|
|
1175
|
+
}
|
|
1176
|
+
};
|
|
1177
|
+
},
|
|
1178
|
+
enumerable: !1,
|
|
1179
|
+
configurable: !0
|
|
1180
|
+
}), e.prototype.setUseAutomaticActivation = function(t) {
|
|
1181
|
+
this.useAutomaticActivation_ = t;
|
|
1182
|
+
}, e.prototype.activateTab = function(t) {
|
|
1183
|
+
var n = this.adapter.getPreviousActiveTabIndex();
|
|
1184
|
+
if (!(!this.indexIsInRange_(t) || t === n)) {
|
|
1185
|
+
var r;
|
|
1186
|
+
n !== -1 && (this.adapter.deactivateTabAtIndex(n), r = this.adapter.getTabIndicatorClientRectAtIndex(n)), this.adapter.activateTabAtIndex(t, r), this.scrollIntoView(t), this.adapter.notifyTabActivated(t);
|
|
1187
|
+
}
|
|
1188
|
+
}, e.prototype.handleKeyDown = function(t) {
|
|
1189
|
+
var n = this.getKeyFromEvent_(t);
|
|
1190
|
+
if (n !== void 0)
|
|
1191
|
+
if (this.isActivationKey_(n) || t.preventDefault(), this.useAutomaticActivation_) {
|
|
1192
|
+
if (this.isActivationKey_(n))
|
|
1193
|
+
return;
|
|
1194
|
+
var r = this.determineTargetFromKey_(this.adapter.getPreviousActiveTabIndex(), n);
|
|
1195
|
+
this.adapter.setActiveTab(r), this.scrollIntoView(r);
|
|
1196
|
+
} else {
|
|
1197
|
+
var o = this.adapter.getFocusedTabIndex();
|
|
1198
|
+
if (this.isActivationKey_(n))
|
|
1199
|
+
this.adapter.setActiveTab(o);
|
|
1200
|
+
else {
|
|
1201
|
+
var r = this.determineTargetFromKey_(o, n);
|
|
1202
|
+
this.adapter.focusTabAtIndex(r), this.scrollIntoView(r);
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
}, e.prototype.handleTabInteraction = function(t) {
|
|
1206
|
+
this.adapter.setActiveTab(this.adapter.getIndexOfTabById(t.detail.tabId));
|
|
1207
|
+
}, e.prototype.scrollIntoView = function(t) {
|
|
1208
|
+
if (this.indexIsInRange_(t)) {
|
|
1209
|
+
if (t === 0)
|
|
1210
|
+
return this.adapter.scrollTo(0);
|
|
1211
|
+
if (t === this.adapter.getTabListLength() - 1)
|
|
1212
|
+
return this.adapter.scrollTo(this.adapter.getScrollContentWidth());
|
|
1213
|
+
if (this.isRTL_())
|
|
1214
|
+
return this.scrollIntoViewRTL_(t);
|
|
1215
|
+
this.scrollIntoView_(t);
|
|
1216
|
+
}
|
|
1217
|
+
}, e.prototype.determineTargetFromKey_ = function(t, n) {
|
|
1218
|
+
var r = this.isRTL_(), o = this.adapter.getTabListLength() - 1, i = n === f.END_KEY, l = n === f.ARROW_LEFT_KEY && !r || n === f.ARROW_RIGHT_KEY && r, s = n === f.ARROW_RIGHT_KEY && !r || n === f.ARROW_LEFT_KEY && r, u = t;
|
|
1219
|
+
return i ? u = o : l ? u -= 1 : s ? u += 1 : u = 0, u < 0 ? u = o : u > o && (u = 0), u;
|
|
1220
|
+
}, e.prototype.calculateScrollIncrement_ = function(t, n, r, o) {
|
|
1221
|
+
var i = this.adapter.getTabDimensionsAtIndex(n), l = i.contentLeft - r - o, s = i.contentRight - r, u = s - g.EXTRA_SCROLL_AMOUNT, h = l + g.EXTRA_SCROLL_AMOUNT;
|
|
1222
|
+
return n < t ? Math.min(u, 0) : Math.max(h, 0);
|
|
1223
|
+
}, e.prototype.calculateScrollIncrementRTL_ = function(t, n, r, o, i) {
|
|
1224
|
+
var l = this.adapter.getTabDimensionsAtIndex(n), s = i - l.contentLeft - r, u = i - l.contentRight - r - o, h = u + g.EXTRA_SCROLL_AMOUNT, b = s - g.EXTRA_SCROLL_AMOUNT;
|
|
1225
|
+
return n > t ? Math.max(h, 0) : Math.min(b, 0);
|
|
1226
|
+
}, e.prototype.findAdjacentTabIndexClosestToEdge_ = function(t, n, r, o) {
|
|
1227
|
+
var i = n.rootLeft - r, l = n.rootRight - r - o, s = i + l, u = i < 0 || s < 0, h = l > 0 || s > 0;
|
|
1228
|
+
return u ? t - 1 : h ? t + 1 : -1;
|
|
1229
|
+
}, e.prototype.findAdjacentTabIndexClosestToEdgeRTL_ = function(t, n, r, o, i) {
|
|
1230
|
+
var l = i - n.rootLeft - o - r, s = i - n.rootRight - r, u = l + s, h = l > 0 || u > 0, b = s < 0 || u < 0;
|
|
1231
|
+
return h ? t + 1 : b ? t - 1 : -1;
|
|
1232
|
+
}, e.prototype.getKeyFromEvent_ = function(t) {
|
|
1233
|
+
return I.has(t.key) ? t.key : O.get(t.keyCode);
|
|
1234
|
+
}, e.prototype.isActivationKey_ = function(t) {
|
|
1235
|
+
return t === f.SPACE_KEY || t === f.ENTER_KEY;
|
|
1236
|
+
}, e.prototype.indexIsInRange_ = function(t) {
|
|
1237
|
+
return t >= 0 && t < this.adapter.getTabListLength();
|
|
1238
|
+
}, e.prototype.isRTL_ = function() {
|
|
1239
|
+
return this.adapter.isRTL();
|
|
1240
|
+
}, e.prototype.scrollIntoView_ = function(t) {
|
|
1241
|
+
var n = this.adapter.getScrollPosition(), r = this.adapter.getOffsetWidth(), o = this.adapter.getTabDimensionsAtIndex(t), i = this.findAdjacentTabIndexClosestToEdge_(t, o, n, r);
|
|
1242
|
+
if (this.indexIsInRange_(i)) {
|
|
1243
|
+
var l = this.calculateScrollIncrement_(t, i, n, r);
|
|
1244
|
+
this.adapter.incrementScroll(l);
|
|
1245
|
+
}
|
|
1246
|
+
}, e.prototype.scrollIntoViewRTL_ = function(t) {
|
|
1247
|
+
var n = this.adapter.getScrollPosition(), r = this.adapter.getOffsetWidth(), o = this.adapter.getTabDimensionsAtIndex(t), i = this.adapter.getScrollContentWidth(), l = this.findAdjacentTabIndexClosestToEdgeRTL_(t, o, n, r, i);
|
|
1248
|
+
if (this.indexIsInRange_(l)) {
|
|
1249
|
+
var s = this.calculateScrollIncrementRTL_(t, l, n, r, i);
|
|
1250
|
+
this.adapter.incrementScroll(s);
|
|
1251
|
+
}
|
|
1252
|
+
}, e;
|
|
1253
|
+
}(k)
|
|
1254
|
+
);
|
|
1255
|
+
/**
|
|
1256
|
+
* @license
|
|
1257
|
+
* Copyright 2018 Google Inc.
|
|
1258
|
+
*
|
|
1259
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1260
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1261
|
+
* in the Software without restriction, including without limitation the rights
|
|
1262
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1263
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1264
|
+
* furnished to do so, subject to the following conditions:
|
|
1265
|
+
*
|
|
1266
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1267
|
+
* all copies or substantial portions of the Software.
|
|
1268
|
+
*
|
|
1269
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1270
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1271
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1272
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1273
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1274
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1275
|
+
* THE SOFTWARE.
|
|
1276
|
+
*/
|
|
1277
|
+
var J = ct.strings, Pt = 0, Nt = (
|
|
1278
|
+
/** @class */
|
|
1279
|
+
function(a) {
|
|
1280
|
+
_(e, a);
|
|
1281
|
+
function e() {
|
|
1282
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
1283
|
+
}
|
|
1284
|
+
return e.attachTo = function(t) {
|
|
1285
|
+
return new e(t);
|
|
1286
|
+
}, Object.defineProperty(e.prototype, "focusOnActivate", {
|
|
1287
|
+
set: function(t) {
|
|
1288
|
+
this.tabList_.forEach(function(n) {
|
|
1289
|
+
return n.focusOnActivate = t;
|
|
1290
|
+
});
|
|
1291
|
+
},
|
|
1292
|
+
enumerable: !1,
|
|
1293
|
+
configurable: !0
|
|
1294
|
+
}), Object.defineProperty(e.prototype, "useAutomaticActivation", {
|
|
1295
|
+
set: function(t) {
|
|
1296
|
+
this.foundation.setUseAutomaticActivation(t);
|
|
1297
|
+
},
|
|
1298
|
+
enumerable: !1,
|
|
1299
|
+
configurable: !0
|
|
1300
|
+
}), e.prototype.initialize = function(t, n) {
|
|
1301
|
+
t === void 0 && (t = function(r) {
|
|
1302
|
+
return new at(r);
|
|
1303
|
+
}), n === void 0 && (n = function(r) {
|
|
1304
|
+
return new it(r);
|
|
1305
|
+
}), this.tabList_ = this.instantiateTabs_(t), this.tabScroller_ = this.instantiateTabScroller_(n);
|
|
1306
|
+
}, e.prototype.initialSyncWithDOM = function() {
|
|
1307
|
+
var t = this;
|
|
1308
|
+
this.handleTabInteraction_ = function(r) {
|
|
1309
|
+
return t.foundation.handleTabInteraction(r);
|
|
1310
|
+
}, this.handleKeyDown_ = function(r) {
|
|
1311
|
+
return t.foundation.handleKeyDown(r);
|
|
1312
|
+
}, this.listen(P.strings.INTERACTED_EVENT, this.handleTabInteraction_), this.listen("keydown", this.handleKeyDown_);
|
|
1313
|
+
for (var n = 0; n < this.tabList_.length; n++)
|
|
1314
|
+
if (this.tabList_[n].active) {
|
|
1315
|
+
this.scrollIntoView(n);
|
|
1316
|
+
break;
|
|
1317
|
+
}
|
|
1318
|
+
}, e.prototype.destroy = function() {
|
|
1319
|
+
a.prototype.destroy.call(this), this.unlisten(P.strings.INTERACTED_EVENT, this.handleTabInteraction_), this.unlisten("keydown", this.handleKeyDown_), this.tabList_.forEach(function(t) {
|
|
1320
|
+
return t.destroy();
|
|
1321
|
+
}), this.tabScroller_ && this.tabScroller_.destroy();
|
|
1322
|
+
}, e.prototype.getDefaultFoundation = function() {
|
|
1323
|
+
var t = this, n = {
|
|
1324
|
+
scrollTo: function(r) {
|
|
1325
|
+
return t.tabScroller_.scrollTo(r);
|
|
1326
|
+
},
|
|
1327
|
+
incrementScroll: function(r) {
|
|
1328
|
+
return t.tabScroller_.incrementScroll(r);
|
|
1329
|
+
},
|
|
1330
|
+
getScrollPosition: function() {
|
|
1331
|
+
return t.tabScroller_.getScrollPosition();
|
|
1332
|
+
},
|
|
1333
|
+
getScrollContentWidth: function() {
|
|
1334
|
+
return t.tabScroller_.getScrollContentWidth();
|
|
1335
|
+
},
|
|
1336
|
+
getOffsetWidth: function() {
|
|
1337
|
+
return t.root.offsetWidth;
|
|
1338
|
+
},
|
|
1339
|
+
isRTL: function() {
|
|
1340
|
+
return window.getComputedStyle(t.root).getPropertyValue("direction") === "rtl";
|
|
1341
|
+
},
|
|
1342
|
+
setActiveTab: function(r) {
|
|
1343
|
+
return t.foundation.activateTab(r);
|
|
1344
|
+
},
|
|
1345
|
+
activateTabAtIndex: function(r, o) {
|
|
1346
|
+
return t.tabList_[r].activate(o);
|
|
1347
|
+
},
|
|
1348
|
+
deactivateTabAtIndex: function(r) {
|
|
1349
|
+
return t.tabList_[r].deactivate();
|
|
1350
|
+
},
|
|
1351
|
+
focusTabAtIndex: function(r) {
|
|
1352
|
+
return t.tabList_[r].focus();
|
|
1353
|
+
},
|
|
1354
|
+
getTabIndicatorClientRectAtIndex: function(r) {
|
|
1355
|
+
return t.tabList_[r].computeIndicatorClientRect();
|
|
1356
|
+
},
|
|
1357
|
+
getTabDimensionsAtIndex: function(r) {
|
|
1358
|
+
return t.tabList_[r].computeDimensions();
|
|
1359
|
+
},
|
|
1360
|
+
getPreviousActiveTabIndex: function() {
|
|
1361
|
+
for (var r = 0; r < t.tabList_.length; r++)
|
|
1362
|
+
if (t.tabList_[r].active)
|
|
1363
|
+
return r;
|
|
1364
|
+
return -1;
|
|
1365
|
+
},
|
|
1366
|
+
getFocusedTabIndex: function() {
|
|
1367
|
+
var r = t.getTabElements_(), o = document.activeElement;
|
|
1368
|
+
return r.indexOf(o);
|
|
1369
|
+
},
|
|
1370
|
+
getIndexOfTabById: function(r) {
|
|
1371
|
+
for (var o = 0; o < t.tabList_.length; o++)
|
|
1372
|
+
if (t.tabList_[o].id === r)
|
|
1373
|
+
return o;
|
|
1374
|
+
return -1;
|
|
1375
|
+
},
|
|
1376
|
+
getTabListLength: function() {
|
|
1377
|
+
return t.tabList_.length;
|
|
1378
|
+
},
|
|
1379
|
+
notifyTabActivated: function(r) {
|
|
1380
|
+
return t.emit(J.TAB_ACTIVATED_EVENT, { index: r }, !0);
|
|
1381
|
+
}
|
|
1382
|
+
};
|
|
1383
|
+
return new ct(n);
|
|
1384
|
+
}, e.prototype.activateTab = function(t) {
|
|
1385
|
+
this.foundation.activateTab(t);
|
|
1386
|
+
}, e.prototype.scrollIntoView = function(t) {
|
|
1387
|
+
this.foundation.scrollIntoView(t);
|
|
1388
|
+
}, e.prototype.getTabElements_ = function() {
|
|
1389
|
+
return [].slice.call(this.root.querySelectorAll(J.TAB_SELECTOR));
|
|
1390
|
+
}, e.prototype.instantiateTabs_ = function(t) {
|
|
1391
|
+
return this.getTabElements_().map(function(n) {
|
|
1392
|
+
return n.id = n.id || "mdc-tab-" + ++Pt, t(n);
|
|
1393
|
+
});
|
|
1394
|
+
}, e.prototype.instantiateTabScroller_ = function(t) {
|
|
1395
|
+
var n = this.root.querySelector(J.TAB_SCROLLER_SELECTOR);
|
|
1396
|
+
return n ? t(n) : null;
|
|
1397
|
+
}, e;
|
|
1398
|
+
}(H)
|
|
1399
|
+
);
|
|
1400
|
+
const xt = {
|
|
1401
|
+
/**
|
|
1402
|
+
* Index of the currently active tab.
|
|
1403
|
+
*
|
|
1404
|
+
* Defaults to **0**.
|
|
1405
|
+
*/
|
|
1406
|
+
activeTabIndex: c.number,
|
|
1407
|
+
/**
|
|
1408
|
+
* Accepts one or more Tab components.
|
|
1409
|
+
*
|
|
1410
|
+
* Defaults to **null**.
|
|
1411
|
+
*/
|
|
1412
|
+
children: c.node,
|
|
1413
|
+
/**
|
|
1414
|
+
* The css class name to be passed through to the component markup.
|
|
1415
|
+
*
|
|
1416
|
+
* Defaults to **undefined**.
|
|
1417
|
+
*/
|
|
1418
|
+
className: c.string,
|
|
1419
|
+
/**
|
|
1420
|
+
* Clustered tabs can be aligned to 'start', 'center', or 'end'. Requires one or more tabs to have clustered set to true.
|
|
1421
|
+
*
|
|
1422
|
+
* Defaults to **'start'**.
|
|
1423
|
+
*/
|
|
1424
|
+
clusterAlign: c.oneOf(["start", "center", "end"]),
|
|
1425
|
+
/**
|
|
1426
|
+
* Indicates that tabs should shrink in size to be as narrow as possible without causing text to wrap.
|
|
1427
|
+
*
|
|
1428
|
+
* Defaults to **false**.
|
|
1429
|
+
*/
|
|
1430
|
+
clustered: c.bool,
|
|
1431
|
+
/**
|
|
1432
|
+
* Apply elevated styles to raise the tab-bar above standard content.
|
|
1433
|
+
*
|
|
1434
|
+
* Defaults to **false**.
|
|
1435
|
+
*/
|
|
1436
|
+
elevated: c.bool,
|
|
1437
|
+
/**
|
|
1438
|
+
* Fires when switching to a different tab.
|
|
1439
|
+
*
|
|
1440
|
+
* Defaults to **null**.
|
|
1441
|
+
*/
|
|
1442
|
+
onTabActivated: c.func,
|
|
1443
|
+
/**
|
|
1444
|
+
* @deprecated _Please use elevated instead._
|
|
1445
|
+
*
|
|
1446
|
+
* Apply a raised style.
|
|
1447
|
+
*
|
|
1448
|
+
* Defaults to **undefined**.
|
|
1449
|
+
*/
|
|
1450
|
+
raised: Z(c.bool, "TabBar", "Please use elevated instead."),
|
|
1451
|
+
/**
|
|
1452
|
+
* @deprecated _Deprecated, containers will scroll when necessary._
|
|
1453
|
+
*
|
|
1454
|
+
* Create a fixed height scrollable container.
|
|
1455
|
+
*
|
|
1456
|
+
* Defaults to **undefined**.
|
|
1457
|
+
*/
|
|
1458
|
+
scrollable: Z(c.bool, "TabBar", "Deprecated, containers will scroll when necessary."),
|
|
1459
|
+
/**
|
|
1460
|
+
* Indicates that the tab icon and label should flow vertically instead of horizontally.
|
|
1461
|
+
*
|
|
1462
|
+
* Defaults to **false**.
|
|
1463
|
+
*/
|
|
1464
|
+
stacked: c.bool,
|
|
1465
|
+
/**
|
|
1466
|
+
* Background theme color. Accepts one of 'primary', 'secondary', or 'surface'.
|
|
1467
|
+
*
|
|
1468
|
+
* Defaults to **'surface'**.
|
|
1469
|
+
*/
|
|
1470
|
+
variant: c.oneOf(["primary", "secondary", "surface"])
|
|
1471
|
+
}, Mt = {
|
|
1472
|
+
activeTabIndex: 0,
|
|
1473
|
+
children: null,
|
|
1474
|
+
className: void 0,
|
|
1475
|
+
clusterAlign: "start",
|
|
1476
|
+
clustered: !1,
|
|
1477
|
+
elevated: !1,
|
|
1478
|
+
raised: void 0,
|
|
1479
|
+
scrollable: void 0,
|
|
1480
|
+
stacked: !1,
|
|
1481
|
+
variant: "surface"
|
|
1482
|
+
}, Wt = {
|
|
1483
|
+
/**
|
|
1484
|
+
* Indicates that the tab is active.
|
|
1485
|
+
*
|
|
1486
|
+
* Defaults to **undefined**.
|
|
1487
|
+
*/
|
|
1488
|
+
active: c.bool,
|
|
1489
|
+
/**
|
|
1490
|
+
* The custom tab notification badge to be rendered.
|
|
1491
|
+
*
|
|
1492
|
+
* Defaults to **undefined**.
|
|
1493
|
+
*/
|
|
1494
|
+
badge: c.oneOfType([c.string, c.func, c.node]),
|
|
1495
|
+
/**
|
|
1496
|
+
* The displayed content. Expects a valid string, though will accept any valid components or markup. If label and `children` are both set, `label` will take priority.
|
|
1497
|
+
*
|
|
1498
|
+
* Defaults to **null**.
|
|
1499
|
+
*/
|
|
1500
|
+
children: c.node,
|
|
1501
|
+
/**
|
|
1502
|
+
* The css class name to be passed through to the component markup.
|
|
1503
|
+
*
|
|
1504
|
+
* Defaults to **undefined**.
|
|
1505
|
+
*/
|
|
1506
|
+
className: c.string,
|
|
1507
|
+
/**
|
|
1508
|
+
* Indicates that the tab should shrink in size to be as narrow as possible without causing text to wrap.
|
|
1509
|
+
*
|
|
1510
|
+
* Defaults to **false**.
|
|
1511
|
+
*/
|
|
1512
|
+
clustered: c.bool,
|
|
1513
|
+
/**
|
|
1514
|
+
* Add a leading icon to the tab.
|
|
1515
|
+
*
|
|
1516
|
+
* Defaults to **undefined**.
|
|
1517
|
+
*/
|
|
1518
|
+
icon: c.node,
|
|
1519
|
+
/**
|
|
1520
|
+
* An icon to be used as the tab indicator. Accepts the name of any valid material icon (see Icon component documentation for a list of valid icons). If no icon is provided the tab-indicator will use an underline.
|
|
1521
|
+
*
|
|
1522
|
+
* Defaults to **null**.
|
|
1523
|
+
*/
|
|
1524
|
+
indicatorIcon: c.string,
|
|
1525
|
+
/**
|
|
1526
|
+
* The tab-indicator will span the entire tab with 'full' or only the content of the tab with 'content'.
|
|
1527
|
+
*
|
|
1528
|
+
* Defaults to **'full'**.
|
|
1529
|
+
*/
|
|
1530
|
+
indicatorSize: c.oneOf(["full", "content"]),
|
|
1531
|
+
/**
|
|
1532
|
+
* The tab-indicator will use a 'slide' or 'fade' transition between tabs.
|
|
1533
|
+
*
|
|
1534
|
+
* Defaults to **'slide'**.
|
|
1535
|
+
*/
|
|
1536
|
+
indicatorTransition: c.oneOf(["slide", "fade"]),
|
|
1537
|
+
/**
|
|
1538
|
+
* The displayed text. Expects a valid string. If label and `children` are both set, `label` will take priority.
|
|
1539
|
+
*
|
|
1540
|
+
* Defaults to **null**.
|
|
1541
|
+
*/
|
|
1542
|
+
label: c.node,
|
|
1543
|
+
/**
|
|
1544
|
+
* Indicates that the tab icon and label should flow vertically instead of horizontally. If stacked is true the tab will not show a badge. You can place the badge on the leading icon.
|
|
1545
|
+
*
|
|
1546
|
+
* Defaults to **false**.
|
|
1547
|
+
*/
|
|
1548
|
+
stacked: c.bool
|
|
1549
|
+
}, wt = {
|
|
1550
|
+
active: void 0,
|
|
1551
|
+
badge: void 0,
|
|
1552
|
+
children: null,
|
|
1553
|
+
className: void 0,
|
|
1554
|
+
clustered: !1,
|
|
1555
|
+
icon: void 0,
|
|
1556
|
+
indicatorIcon: null,
|
|
1557
|
+
indicatorSize: "full",
|
|
1558
|
+
indicatorTransition: "slide",
|
|
1559
|
+
label: null,
|
|
1560
|
+
stacked: !1
|
|
1561
|
+
};
|
|
1562
|
+
c.bool, c.string, c.string;
|
|
1563
|
+
c.oneOf(["start", "center", "end"]), c.node;
|
|
1564
|
+
const W = /* @__PURE__ */ Y((a, e) => {
|
|
1565
|
+
const {
|
|
1566
|
+
active: t,
|
|
1567
|
+
className: n,
|
|
1568
|
+
icon: r,
|
|
1569
|
+
id: o,
|
|
1570
|
+
transition: i,
|
|
1571
|
+
...l
|
|
1572
|
+
} = a, s = A(), u = A(), h = B("lmnt", "lmnt-tab-indicator", "mdc-tab-indicator", t && "mdc-tab-indicator--active", i === "fade" && "mdc-tab-indicator--fade", n);
|
|
1573
|
+
return N(() => (u.current = rt.attachTo(s.current), () => {
|
|
1574
|
+
u.current.destroy();
|
|
1575
|
+
}), [u]), F(e, () => s.current, []), /* @__PURE__ */ p.createElement("span", V({
|
|
1576
|
+
id: o,
|
|
1577
|
+
className: h,
|
|
1578
|
+
ref: s
|
|
1579
|
+
}, l), r && /* @__PURE__ */ p.createElement("span", {
|
|
1580
|
+
className: "mdc-tab-indicator__content mdc-tab-indicator__content--icon material-icons",
|
|
1581
|
+
"aria-hidden": "true"
|
|
1582
|
+
}, r), !r && /* @__PURE__ */ p.createElement("span", {
|
|
1583
|
+
className: "mdc-tab-indicator__content mdc-tab-indicator__content--underline"
|
|
1584
|
+
}));
|
|
1585
|
+
});
|
|
1586
|
+
W.displayName = "TabIndicator";
|
|
1587
|
+
W.propTypes = {
|
|
1588
|
+
active: c.bool,
|
|
1589
|
+
className: c.string,
|
|
1590
|
+
icon: c.string,
|
|
1591
|
+
id: c.string,
|
|
1592
|
+
transition: c.oneOf(["fade", "slide"])
|
|
1593
|
+
};
|
|
1594
|
+
W.defaultProps = {
|
|
1595
|
+
active: !1,
|
|
1596
|
+
className: null,
|
|
1597
|
+
icon: null,
|
|
1598
|
+
id: null,
|
|
1599
|
+
transition: "slide"
|
|
1600
|
+
};
|
|
1601
|
+
const lt = /* @__PURE__ */ pt({}), Kt = (a, e) => {
|
|
1602
|
+
if (a)
|
|
1603
|
+
return typeof a == "string" ? /* @__PURE__ */ p.createElement(Tt, {
|
|
1604
|
+
tabIndex: 0,
|
|
1605
|
+
role: "button",
|
|
1606
|
+
className: "mdc-tab__icon",
|
|
1607
|
+
ariaHidden: !0,
|
|
1608
|
+
ariaLabel: e,
|
|
1609
|
+
icon: a
|
|
1610
|
+
}) : nt(a, {
|
|
1611
|
+
className: "mdc-tab__icon",
|
|
1612
|
+
tabIndex: 0,
|
|
1613
|
+
"aria-hidden": !0,
|
|
1614
|
+
"aria-label": e,
|
|
1615
|
+
role: "button"
|
|
1616
|
+
});
|
|
1617
|
+
}, j = /* @__PURE__ */ Y((a, e) => {
|
|
1618
|
+
const {
|
|
1619
|
+
active: t,
|
|
1620
|
+
badge: n,
|
|
1621
|
+
children: r,
|
|
1622
|
+
className: o,
|
|
1623
|
+
clustered: i,
|
|
1624
|
+
icon: l,
|
|
1625
|
+
indicatorIcon: s,
|
|
1626
|
+
indicatorSize: u,
|
|
1627
|
+
indicatorTransition: h,
|
|
1628
|
+
label: b,
|
|
1629
|
+
stacked: S,
|
|
1630
|
+
...D
|
|
1631
|
+
} = a, T = A(), m = A();
|
|
1632
|
+
F(e, () => T.current, []);
|
|
1633
|
+
const d = mt(lt), C = d.stacked || S, $ = d.clustered || i;
|
|
1634
|
+
N(() => (m.current = at.attachTo(T.current), () => {
|
|
1635
|
+
m.current.destroy();
|
|
1636
|
+
}), []);
|
|
1637
|
+
const z = B("lmnt", "lmnt-tab", "mdc-tab", "mdc-button", t && "mdc-tab--active", $ && "mdc-tab--min-width", C && "mdc-tab--stacked", o);
|
|
1638
|
+
return /* @__PURE__ */ p.createElement("button", V({
|
|
1639
|
+
type: "button",
|
|
1640
|
+
"aria-selected": t,
|
|
1641
|
+
ref: T,
|
|
1642
|
+
className: z,
|
|
1643
|
+
role: "tab"
|
|
1644
|
+
}, D), /* @__PURE__ */ p.createElement("span", {
|
|
1645
|
+
className: "mdc-tab__content"
|
|
1646
|
+
}, l && Kt(l, b), /* @__PURE__ */ p.createElement("span", {
|
|
1647
|
+
className: "mdc-tab__text-label"
|
|
1648
|
+
}, r), u === "content" && /* @__PURE__ */ p.createElement(W, {
|
|
1649
|
+
active: t,
|
|
1650
|
+
icon: s,
|
|
1651
|
+
transition: h
|
|
1652
|
+
}, s), n && !C && nt(n, {
|
|
1653
|
+
className: "lmnt-tab-bar--notification-badge"
|
|
1654
|
+
})), u === "full" && /* @__PURE__ */ p.createElement(W, {
|
|
1655
|
+
active: t,
|
|
1656
|
+
icon: s,
|
|
1657
|
+
transition: h
|
|
1658
|
+
}, s), /* @__PURE__ */ p.createElement("span", {
|
|
1659
|
+
className: "lmnt-tab___ripple mdc-tab__ripple"
|
|
1660
|
+
}));
|
|
1661
|
+
});
|
|
1662
|
+
j.displayName = "Tab";
|
|
1663
|
+
j.propTypes = Wt;
|
|
1664
|
+
j.defaultProps = wt;
|
|
1665
|
+
const X = /* @__PURE__ */ Y((a, e) => {
|
|
1666
|
+
const {
|
|
1667
|
+
align: t,
|
|
1668
|
+
className: n,
|
|
1669
|
+
children: r,
|
|
1670
|
+
...o
|
|
1671
|
+
} = a, i = A(), l = A();
|
|
1672
|
+
N(() => (l.current = it.attachTo(i.current), () => {
|
|
1673
|
+
l.current.destroy();
|
|
1674
|
+
}), [l]);
|
|
1675
|
+
const s = B("lmnt", "lmnt-tab-scroller", "mdc-tab-scroller", t === "start" && "mdc-tab-scroller--align-start", t === "center" && "mdc-tab-scroller--align-center", t === "end" && "mdc-tab-scroller--align-end", n);
|
|
1676
|
+
return F(e, () => i.current, []), /* @__PURE__ */ p.createElement("div", V({
|
|
1677
|
+
className: s,
|
|
1678
|
+
ref: i
|
|
1679
|
+
}, o), /* @__PURE__ */ p.createElement("div", {
|
|
1680
|
+
className: "mdc-tab-scroller__scroll-area"
|
|
1681
|
+
}, /* @__PURE__ */ p.createElement("div", {
|
|
1682
|
+
className: "mdc-tab-scroller__scroll-content"
|
|
1683
|
+
}, r)), /* @__PURE__ */ p.createElement("hr", {
|
|
1684
|
+
className: "lmnt-tab-bar--divider"
|
|
1685
|
+
}));
|
|
1686
|
+
});
|
|
1687
|
+
X.displayName = "TabBar";
|
|
1688
|
+
X.propTypes = {
|
|
1689
|
+
align: c.oneOf(["start", "center", "end"]),
|
|
1690
|
+
className: c.string,
|
|
1691
|
+
children: c.oneOfType([c.arrayOf(c.node), c.node])
|
|
1692
|
+
};
|
|
1693
|
+
X.defaultProps = {
|
|
1694
|
+
align: "start",
|
|
1695
|
+
className: void 0,
|
|
1696
|
+
children: void 0
|
|
1697
|
+
};
|
|
1698
|
+
const w = /* @__PURE__ */ Y((a, e) => {
|
|
1699
|
+
const {
|
|
1700
|
+
activeTabIndex: t,
|
|
1701
|
+
children: n,
|
|
1702
|
+
className: r,
|
|
1703
|
+
clusterAlign: o,
|
|
1704
|
+
clustered: i,
|
|
1705
|
+
elevated: l,
|
|
1706
|
+
onTabActivated: s,
|
|
1707
|
+
raised: u,
|
|
1708
|
+
scrollable: h,
|
|
1709
|
+
stacked: b,
|
|
1710
|
+
variant: S,
|
|
1711
|
+
...D
|
|
1712
|
+
} = a, T = A(), m = A();
|
|
1713
|
+
F(e, () => T.current, []);
|
|
1714
|
+
const d = ft((z) => s && s(z.detail.index), [s]);
|
|
1715
|
+
N(() => (m.current = Nt.attachTo(T.current), m.current.unlisten("MDCTabBar:activated", d), m.current.listen("MDCTabBar:activated", d), () => {
|
|
1716
|
+
m.current.unlisten("MDCTabBar:activated", d), m.current.destroy();
|
|
1717
|
+
}), [n, m, d]), N(() => {
|
|
1718
|
+
m.current.activateTab(t);
|
|
1719
|
+
}, [m, t]);
|
|
1720
|
+
const C = B("lmnt", "lmnt-tab-bar", "mdc-tab-bar", u && !h && "mdc-tab-bar--raised", l && "mdc-tab-bar--elevated", S === "primary" && "mdc-tab-bar--primary", S === "secondary" && "mdc-tab-bar--secondary", S === "surface" && "mdc-tab-bar--surface", r), $ = ht(() => ({
|
|
1721
|
+
stacked: b,
|
|
1722
|
+
clustered: i
|
|
1723
|
+
}), [b, i]);
|
|
1724
|
+
return /* @__PURE__ */ p.createElement(lt.Provider, {
|
|
1725
|
+
value: $
|
|
1726
|
+
}, /* @__PURE__ */ p.createElement("div", V({
|
|
1727
|
+
className: C,
|
|
1728
|
+
role: "tablist",
|
|
1729
|
+
ref: T
|
|
1730
|
+
}, D), /* @__PURE__ */ p.createElement(X, {
|
|
1731
|
+
align: o
|
|
1732
|
+
}, n)));
|
|
1733
|
+
});
|
|
1734
|
+
w.displayName = "TabBar";
|
|
1735
|
+
w.propTypes = xt;
|
|
1736
|
+
w.defaultProps = Mt;
|
|
1737
|
+
w.displayName = "TabBar";
|
|
1738
|
+
const Bt = "_elevation_xbjx4_1", Vt = "_themeBackground_xbjx4_6", Yt = "_tabBar_xbjx4_10", Ft = "_tabWrapper_xbjx4_20", kt = "_stickyHeader_xbjx4_24", Ht = "_tabButton_xbjx4_30", jt = "_childContainer_xbjx4_34", Xt = "_childContainerPhone_xbjx4_38", $t = "_iconColorRed_xbjx4_42", zt = "_miniPadding_xbjx4_47", y = {
|
|
1739
|
+
elevation: Bt,
|
|
1740
|
+
themeBackground: Vt,
|
|
1741
|
+
tabBar: Yt,
|
|
1742
|
+
tabWrapper: Ft,
|
|
1743
|
+
stickyHeader: kt,
|
|
1744
|
+
tabButton: Ht,
|
|
1745
|
+
childContainer: jt,
|
|
1746
|
+
childContainerPhone: Xt,
|
|
1747
|
+
iconColorRed: $t,
|
|
1748
|
+
miniPadding: zt
|
|
1749
|
+
}, et = (a, e) => !e || !a ? 0 : a.findIndex((t) => t.hash === e.replace("#", "")) ?? 0, ie = ({
|
|
1750
|
+
tabs: a,
|
|
1751
|
+
hasHash: e = !0,
|
|
1752
|
+
hash: t = "",
|
|
1753
|
+
clusterAlign: n = "start",
|
|
1754
|
+
hasClusteredTabs: r,
|
|
1755
|
+
children: o,
|
|
1756
|
+
verticalGap: i = "none",
|
|
1757
|
+
elevation: l = 0,
|
|
1758
|
+
backgroundColor: s = "themeBackground",
|
|
1759
|
+
onChange: u,
|
|
1760
|
+
hasStickyTabs: h = !1,
|
|
1761
|
+
classNameHeader: b = ""
|
|
29
1762
|
}) => {
|
|
30
|
-
const [
|
|
31
|
-
|
|
32
|
-
if (!
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
}, [
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
|
|
1763
|
+
const [S, D] = _t(et(a, t)), { isDesktop: T } = St();
|
|
1764
|
+
N(() => {
|
|
1765
|
+
if (!e || !t) return;
|
|
1766
|
+
const d = et(a, t);
|
|
1767
|
+
D(d);
|
|
1768
|
+
}, [a, t, e]);
|
|
1769
|
+
const m = (d) => {
|
|
1770
|
+
const C = a[d].hash;
|
|
1771
|
+
C != null && e && window.history.replaceState(null, "", `#${C}`), D(d), u?.(d);
|
|
39
1772
|
};
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
-
|
|
1773
|
+
return /* @__PURE__ */ R(
|
|
1774
|
+
ut,
|
|
42
1775
|
{
|
|
43
|
-
elevation:
|
|
44
|
-
className: `${
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
-
|
|
1776
|
+
elevation: l,
|
|
1777
|
+
className: `${y.elevation} ${s === "none" ? "" : y.themeBackground}`,
|
|
1778
|
+
children: /* @__PURE__ */ G(
|
|
1779
|
+
x,
|
|
47
1780
|
{
|
|
48
1781
|
"data-testid": "hash-tab-container",
|
|
49
1782
|
direction: "vertical",
|
|
50
|
-
gap:
|
|
1783
|
+
gap: i,
|
|
51
1784
|
secondaryAlign: "stretch",
|
|
52
1785
|
children: [
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
|
|
1786
|
+
/* @__PURE__ */ G(
|
|
1787
|
+
x,
|
|
55
1788
|
{
|
|
56
|
-
direction:
|
|
57
|
-
className: `${
|
|
1789
|
+
direction: T ? "horizontal" : "vertical",
|
|
1790
|
+
className: `${y.tabWrapper} ${h ? y.stickyHeader : ""} ${b}`,
|
|
58
1791
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
|
|
1792
|
+
/* @__PURE__ */ R(
|
|
1793
|
+
w,
|
|
61
1794
|
{
|
|
62
1795
|
"data-testid": "tab-bar",
|
|
63
|
-
className:
|
|
64
|
-
clustered:
|
|
65
|
-
clusterAlign:
|
|
1796
|
+
className: y.tabBar,
|
|
1797
|
+
clustered: T ? r : !1,
|
|
1798
|
+
clusterAlign: n,
|
|
66
1799
|
variant: "surface",
|
|
67
|
-
activeTabIndex:
|
|
68
|
-
onTabActivated:
|
|
69
|
-
children:
|
|
70
|
-
|
|
1800
|
+
activeTabIndex: S,
|
|
1801
|
+
onTabActivated: m,
|
|
1802
|
+
children: a.map((d, C) => /* @__PURE__ */ R(
|
|
1803
|
+
j,
|
|
71
1804
|
{
|
|
72
|
-
"data-testid": `tab-${
|
|
73
|
-
icon:
|
|
74
|
-
className: `${
|
|
75
|
-
active:
|
|
76
|
-
children: /* @__PURE__ */
|
|
77
|
-
|
|
78
|
-
|
|
1805
|
+
"data-testid": `tab-${d.title}`,
|
|
1806
|
+
icon: d.leadingIcon,
|
|
1807
|
+
className: `${o ? y.tabButton : ""} ${d.isIconRed ? y.iconColorRed : ""}`,
|
|
1808
|
+
active: S === C,
|
|
1809
|
+
children: /* @__PURE__ */ G(x, { gap: "dense", children: [
|
|
1810
|
+
d.title,
|
|
1811
|
+
d.trailingIcon
|
|
79
1812
|
] })
|
|
80
1813
|
},
|
|
81
|
-
`${
|
|
1814
|
+
`${C}_${d.hash}`
|
|
82
1815
|
))
|
|
83
1816
|
}
|
|
84
1817
|
),
|
|
85
|
-
|
|
86
|
-
|
|
1818
|
+
o ? /* @__PURE__ */ R(
|
|
1819
|
+
dt,
|
|
87
1820
|
{
|
|
88
1821
|
variant: "dense",
|
|
89
|
-
className:
|
|
90
|
-
children: /* @__PURE__ */
|
|
1822
|
+
className: T ? y.childContainer : y.childContainerPhone,
|
|
1823
|
+
children: /* @__PURE__ */ R(x, { gap: "dense", primaryAlign: "center", secondaryAlign: "center", children: o })
|
|
91
1824
|
}
|
|
92
|
-
) : /* @__PURE__ */
|
|
1825
|
+
) : /* @__PURE__ */ R(st, {})
|
|
93
1826
|
]
|
|
94
1827
|
}
|
|
95
1828
|
),
|
|
96
|
-
|
|
1829
|
+
h ? /* @__PURE__ */ R(x, { fullWidth: !0, direction: "vertical", className: y.miniPadding, children: a[S]?.component }) : a[S]?.component
|
|
97
1830
|
]
|
|
98
1831
|
}
|
|
99
1832
|
)
|
|
@@ -101,5 +1834,5 @@ import '../../assets/HashTabView.css';const N = "_elevation_xbjx4_1", R = "_them
|
|
|
101
1834
|
);
|
|
102
1835
|
};
|
|
103
1836
|
export {
|
|
104
|
-
|
|
1837
|
+
ie as HashTabView
|
|
105
1838
|
};
|