@limetech/lime-elements 37.1.0-next.43 → 37.1.0-next.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{component-66df95e7.js → component-9c3fa668.js} +12 -935
- package/dist/cjs/component-9c3fa668.js.map +1 -0
- package/dist/cjs/component-a0124759.js +929 -0
- package/dist/cjs/component-a0124759.js.map +1 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-breadcrumbs.cjs.entry.js +2 -1
- package/dist/cjs/limel-breadcrumbs.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-callout.cjs.entry.js +1 -1
- package/dist/cjs/limel-chip-set.cjs.entry.js +1 -1
- package/dist/cjs/limel-code-editor.cjs.entry.js +189 -0
- package/dist/cjs/limel-code-editor.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-file-viewer.cjs.entry.js +260 -0
- package/dist/cjs/limel-file-viewer.cjs.entry.js.map +1 -0
- package/dist/cjs/limel-file.cjs.entry.js +1 -1
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
- package/dist/cjs/limel-icon-button.cjs.entry.js +8 -1
- package/dist/cjs/limel-icon-button.cjs.entry.js.map +1 -1
- package/dist/cjs/{limel-list_2.cjs.entry.js → limel-list.cjs.entry.js} +2 -122
- package/dist/cjs/limel-list.cjs.entry.js.map +1 -0
- package/dist/cjs/limel-menu-surface.cjs.entry.js +130 -0
- package/dist/cjs/limel-menu-surface.cjs.entry.js.map +1 -0
- package/dist/cjs/limel-menu_2.cjs.entry.js +14 -13
- package/dist/cjs/limel-menu_2.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{translations-f8080c48.js → translations-a384b596.js} +37 -1
- package/dist/cjs/translations-a384b596.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +2 -1
- package/dist/collection/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/dist/collection/components/code-editor/code-editor.js +2 -3
- package/dist/collection/components/code-editor/code-editor.js.map +1 -1
- package/dist/collection/components/code-editor/code-editor.types.js.map +1 -1
- package/dist/collection/components/file-viewer/extension-mapping.js +66 -0
- package/dist/collection/components/file-viewer/extension-mapping.js.map +1 -0
- package/dist/collection/components/file-viewer/file-viewer.css +266 -0
- package/dist/collection/components/file-viewer/file-viewer.js +387 -0
- package/dist/collection/components/file-viewer/file-viewer.js.map +1 -0
- package/dist/collection/components/file-viewer/file-viewer.types.js +2 -0
- package/dist/collection/components/file-viewer/file-viewer.types.js.map +1 -0
- package/dist/collection/components/file-viewer/fullscreen.js +43 -0
- package/dist/collection/components/file-viewer/fullscreen.js.map +1 -0
- package/dist/collection/components/icon-button/icon-button.js +8 -1
- package/dist/collection/components/icon-button/icon-button.js.map +1 -1
- package/dist/collection/translations/da.js +6 -0
- package/dist/collection/translations/da.js.map +1 -1
- package/dist/collection/translations/en.js +6 -0
- package/dist/collection/translations/en.js.map +1 -1
- package/dist/collection/translations/fi.js +6 -0
- package/dist/collection/translations/fi.js.map +1 -1
- package/dist/collection/translations/nl.js +6 -0
- package/dist/collection/translations/nl.js.map +1 -1
- package/dist/collection/translations/no.js +6 -0
- package/dist/collection/translations/no.js.map +1 -1
- package/dist/collection/translations/sv.js +6 -0
- package/dist/collection/translations/sv.js.map +1 -1
- package/dist/esm/{component-fffa3419.js → component-0be247ac.js} +13 -934
- package/dist/esm/component-0be247ac.js.map +1 -0
- package/dist/esm/component-6d079abe.js +926 -0
- package/dist/esm/component-6d079abe.js.map +1 -0
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-breadcrumbs.entry.js +2 -1
- package/dist/esm/limel-breadcrumbs.entry.js.map +1 -1
- package/dist/esm/limel-callout.entry.js +1 -1
- package/dist/esm/limel-chip-set.entry.js +1 -1
- package/dist/esm/limel-code-editor.entry.js +189 -0
- package/dist/esm/limel-code-editor.entry.js.map +1 -1
- package/dist/esm/limel-file-viewer.entry.js +256 -0
- package/dist/esm/limel-file-viewer.entry.js.map +1 -0
- package/dist/esm/limel-file.entry.js +1 -1
- package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
- package/dist/esm/limel-icon-button.entry.js +8 -1
- package/dist/esm/limel-icon-button.entry.js.map +1 -1
- package/dist/esm/{limel-list_2.entry.js → limel-list.entry.js} +3 -122
- package/dist/esm/limel-list.entry.js.map +1 -0
- package/dist/esm/limel-menu-surface.entry.js +126 -0
- package/dist/esm/limel-menu-surface.entry.js.map +1 -0
- package/dist/esm/limel-menu_2.entry.js +2 -1
- package/dist/esm/limel-menu_2.entry.js.map +1 -1
- package/dist/esm/limel-snackbar.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{translations-f88bb584.js → translations-dea847ae.js} +37 -1
- package/dist/esm/translations-dea847ae.js.map +1 -0
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js.map +1 -1
- package/dist/lime-elements/p-3ee3dcdc.js +2 -0
- package/dist/lime-elements/p-3ee3dcdc.js.map +1 -0
- package/dist/lime-elements/p-45449868.entry.js +2 -0
- package/dist/lime-elements/p-45449868.entry.js.map +1 -0
- package/dist/lime-elements/{p-550cae4a.entry.js → p-4c100bed.entry.js} +2 -2
- package/dist/lime-elements/p-5dd6d677.js +82 -0
- package/dist/lime-elements/p-5dd6d677.js.map +1 -0
- package/dist/lime-elements/p-685e5867.entry.js +2 -0
- package/dist/lime-elements/p-685e5867.entry.js.map +1 -0
- package/dist/lime-elements/{p-6933a99c.entry.js → p-6e66b78a.entry.js} +2 -2
- package/dist/lime-elements/{p-6933a99c.entry.js.map → p-6e66b78a.entry.js.map} +1 -1
- package/dist/lime-elements/p-6fa8bf86.entry.js +2 -0
- package/dist/lime-elements/p-6fa8bf86.entry.js.map +1 -0
- package/dist/lime-elements/{p-9a5745e5.entry.js → p-6fac3a11.entry.js} +2 -2
- package/dist/lime-elements/{p-c9aee7a1.entry.js → p-80f0c441.entry.js} +2 -2
- package/dist/lime-elements/{p-cf61ac34.entry.js → p-8eff47a6.entry.js} +2 -2
- package/dist/lime-elements/p-9eab9eb2.entry.js +2 -0
- package/dist/lime-elements/p-9eab9eb2.entry.js.map +1 -0
- package/dist/lime-elements/p-b8deba1b.entry.js +2 -0
- package/dist/lime-elements/p-b8deba1b.entry.js.map +1 -0
- package/dist/lime-elements/{p-7972528a.entry.js → p-dbcae3a0.entry.js} +2 -2
- package/dist/lime-elements/p-e3b16b61.js +126 -0
- package/dist/lime-elements/p-e3b16b61.js.map +1 -0
- package/dist/lime-elements/{p-2d0587d5.entry.js → p-fed820d9.entry.js} +4 -4
- package/dist/lime-elements/{p-2d0587d5.entry.js.map → p-fed820d9.entry.js.map} +1 -1
- package/dist/types/components/code-editor/code-editor.d.ts +1 -2
- package/dist/types/components/code-editor/code-editor.types.d.ts +1 -1
- package/dist/types/components/file-viewer/extension-mapping.d.ts +1 -0
- package/dist/types/components/file-viewer/file-viewer.types.d.ts +2 -0
- package/dist/types/components/file-viewer/fullscreen.d.ts +9 -0
- package/dist/types/components/icon-button/icon-button.d.ts +1 -0
- package/dist/types/components.d.ts +209 -20
- package/dist/types/translations/da.d.ts +6 -0
- package/dist/types/translations/en.d.ts +6 -0
- package/dist/types/translations/fi.d.ts +6 -0
- package/dist/types/translations/nl.d.ts +6 -0
- package/dist/types/translations/no.d.ts +6 -0
- package/dist/types/translations/sv.d.ts +6 -0
- package/package.json +2 -2
- package/dist/cjs/component-66df95e7.js.map +0 -1
- package/dist/cjs/limel-list_2.cjs.entry.js.map +0 -1
- package/dist/cjs/translations-f8080c48.js.map +0 -1
- package/dist/esm/component-fffa3419.js.map +0 -1
- package/dist/esm/limel-list_2.entry.js.map +0 -1
- package/dist/esm/translations-f88bb584.js.map +0 -1
- package/dist/lime-elements/p-172385f4.entry.js +0 -2
- package/dist/lime-elements/p-172385f4.entry.js.map +0 -1
- package/dist/lime-elements/p-22031b5b.entry.js +0 -2
- package/dist/lime-elements/p-22031b5b.entry.js.map +0 -1
- package/dist/lime-elements/p-94cb40fb.entry.js +0 -2
- package/dist/lime-elements/p-94cb40fb.entry.js.map +0 -1
- package/dist/lime-elements/p-b59e4287.js +0 -2
- package/dist/lime-elements/p-b59e4287.js.map +0 -1
- package/dist/lime-elements/p-dfba92de.js +0 -206
- package/dist/lime-elements/p-dfba92de.js.map +0 -1
- /package/dist/lime-elements/{p-550cae4a.entry.js.map → p-4c100bed.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-9a5745e5.entry.js.map → p-6fac3a11.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-c9aee7a1.entry.js.map → p-80f0c441.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-cf61ac34.entry.js.map → p-8eff47a6.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-7972528a.entry.js.map → p-dbcae3a0.entry.js.map} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const a={"callout.note":"Bemærk","callout.important":"Vigtig","callout.tip":"Tip","callout.caution":"Advarsel","callout.warning":"Advarsel","date-picker.today":"Idag","date-picker.month.heading":"Måned","date-picker.quarter.heading":"Kvartal","date-picker.year.heading":"År","chip-set.clear-all":"Ryd alle","file.drag-and-drop-tips":"Træk og slip filen her, eller klik for at gennemse."};const e={"callout.note":"Note","callout.important":"Important","callout.tip":"Tip","callout.caution":"Caution","callout.warning":"Warning","date-picker.today":"Today","date-picker.month.heading":"Month","date-picker.quarter.heading":"Quarter","date-picker.year.heading":"Year","chip-set.clear-all":"Clear all","chip-set.remove-chip":"Remove chip","snackbar.dismiss":"Dismiss","file.drag-and-drop-tips":"Drag and drop your file here, or click to browse."};const t={"callout.note":"Huomio","callout.important":"Tärkeää","callout.tip":"Vinkki","callout.caution":"Varoitus","callout.warning":"Varoitus","date-picker.today":"Tänään","date-picker.month.heading":"Kuukausi","date-picker.quarter.heading":"Vuosineljännes","date-picker.year.heading":"Vuosi","chip-set.clear-all":"Tyhjennä kaikki","file.drag-and-drop-tips":"Vedä ja pudota tiedostosi tähän, tai napsauta selataksesi."};const i={"callout.note":"Opmerking","callout.important":"Belangrijk","callout.tip":"Tip","callout.caution":"Waarschuwing","callout.warning":"Waarschuwing","date-picker.today":"Vandaag","date-picker.month.heading":"Maand","date-picker.quarter.heading":"Kwartaal","date-picker.year.heading":"Jaar","chip-set.clear-all":"Alles wissen","file.drag-and-drop-tips":"Sleep uw bestand en zet het hier neer of klik om te bladeren."};const l={"callout.note":"Note","callout.important":"Viktig","callout.tip":"Tip","callout.caution":"Advarsel","callout.warning":"Advarsel","date-picker.today":"I dag","date-picker.month.heading":"Måned","date-picker.quarter.heading":"Kvartal","date-picker.year.heading":"År","chip-set.clear-all":"Fjern alle","file.drag-and-drop-tips":"Dra og slipp filen her, eller klikk for å bla gjennom."};const r={"callout.note":"Obs","callout.important":"Viktigt","callout.tip":"Tips","callout.caution":"Varning","callout.warning":"Varning","date-picker.today":"Idag","date-picker.month.heading":"Månad","date-picker.quarter.heading":"Kvartal","date-picker.year.heading":"År","chip-set.clear-all":"Rensa alla","chip-set.remove-chip":"Ta bort chip","snackbar.dismiss":"Stäng","file.drag-and-drop-tips":"Dra och släpp filen här eller klicka om du vill bläddra."};const n={da:a,en:e,fi:t,no:l,nl:i,sv:r};class o{get(a,e="en"){return n[e][a]}}const c=new o;const d=(()=>c)();export{d as t};
|
|
2
|
-
//# sourceMappingURL=p-b59e4287.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["da","en","fi","nl","no","sv","allTranslations","Translations","get","key","language","translations","translate"],"sources":["./src/translations/da.ts","./src/translations/en.ts","./src/translations/fi.ts","./src/translations/nl.ts","./src/translations/no.ts","./src/translations/sv.ts","./src/global/translations.ts"],"sourcesContent":["export default {\n 'callout.note': 'Bemærk',\n 'callout.important': 'Vigtig',\n 'callout.tip': 'Tip',\n 'callout.caution': 'Advarsel',\n 'callout.warning': 'Advarsel',\n 'date-picker.today': 'Idag',\n 'date-picker.month.heading': 'Måned',\n 'date-picker.quarter.heading': 'Kvartal',\n 'date-picker.year.heading': 'År',\n 'chip-set.clear-all': 'Ryd alle',\n 'file.drag-and-drop-tips':\n 'Træk og slip filen her, eller klik for at gennemse.',\n};\n","export default {\n 'callout.note': 'Note',\n 'callout.important': 'Important',\n 'callout.tip': 'Tip',\n 'callout.caution': 'Caution',\n 'callout.warning': 'Warning',\n 'date-picker.today': 'Today',\n 'date-picker.month.heading': 'Month',\n 'date-picker.quarter.heading': 'Quarter',\n 'date-picker.year.heading': 'Year',\n 'chip-set.clear-all': 'Clear all',\n 'chip-set.remove-chip': 'Remove chip',\n 'snackbar.dismiss': 'Dismiss',\n 'file.drag-and-drop-tips':\n 'Drag and drop your file here, or click to browse.',\n};\n","export default {\n 'callout.note': 'Huomio',\n 'callout.important': 'Tärkeää',\n 'callout.tip': 'Vinkki',\n 'callout.caution': 'Varoitus',\n 'callout.warning': 'Varoitus',\n 'date-picker.today': 'Tänään',\n 'date-picker.month.heading': 'Kuukausi',\n 'date-picker.quarter.heading': 'Vuosineljännes',\n 'date-picker.year.heading': 'Vuosi',\n 'chip-set.clear-all': 'Tyhjennä kaikki',\n 'file.drag-and-drop-tips':\n 'Vedä ja pudota tiedostosi tähän, tai napsauta selataksesi.',\n};\n","export default {\n 'callout.note': 'Opmerking',\n 'callout.important': 'Belangrijk',\n 'callout.tip': 'Tip',\n 'callout.caution': 'Waarschuwing',\n 'callout.warning': 'Waarschuwing',\n 'date-picker.today': 'Vandaag',\n 'date-picker.month.heading': 'Maand',\n 'date-picker.quarter.heading': 'Kwartaal',\n 'date-picker.year.heading': 'Jaar',\n 'chip-set.clear-all': 'Alles wissen',\n 'file.drag-and-drop-tips':\n 'Sleep uw bestand en zet het hier neer of klik om te bladeren.',\n};\n","export default {\n 'callout.note': 'Note',\n 'callout.important': 'Viktig',\n 'callout.tip': 'Tip',\n 'callout.caution': 'Advarsel',\n 'callout.warning': 'Advarsel',\n 'date-picker.today': 'I dag',\n 'date-picker.month.heading': 'Måned',\n 'date-picker.quarter.heading': 'Kvartal',\n 'date-picker.year.heading': 'År',\n 'chip-set.clear-all': 'Fjern alle',\n 'file.drag-and-drop-tips':\n 'Dra og slipp filen her, eller klikk for å bla gjennom.',\n};\n","export default {\n 'callout.note': 'Obs',\n 'callout.important': 'Viktigt',\n 'callout.tip': 'Tips',\n 'callout.caution': 'Varning',\n 'callout.warning': 'Varning',\n 'date-picker.today': 'Idag',\n 'date-picker.month.heading': 'Månad',\n 'date-picker.quarter.heading': 'Kvartal',\n 'date-picker.year.heading': 'År',\n 'chip-set.clear-all': 'Rensa alla',\n 'chip-set.remove-chip': 'Ta bort chip',\n 'snackbar.dismiss': 'Stäng',\n 'file.drag-and-drop-tips':\n 'Dra och släpp filen här eller klicka om du vill bläddra.',\n};\n","import da from '../translations/da';\nimport en from '../translations/en';\nimport fi from '../translations/fi';\nimport nl from '../translations/nl';\nimport no from '../translations/no';\nimport sv from '../translations/sv';\n\nconst allTranslations = { da: da, en: en, fi: fi, no: no, nl: nl, sv: sv };\n\nexport class Translations {\n public get(key, language = 'en') {\n return allTranslations[language][key];\n }\n}\n\nconst translations = new Translations();\nexport default (() => {\n return translations;\n})();\n"],"mappings":"AAAA,MAAAA,EAAe,CACX,eAAgB,SAChB,oBAAqB,SACrB,cAAe,MACf,kBAAmB,WACnB,kBAAmB,WACnB,oBAAqB,OACrB,4BAA6B,QAC7B,8BAA+B,UAC/B,2BAA4B,KAC5B,qBAAsB,WACtB,0BACI,uDCZR,MAAAC,EAAe,CACX,eAAgB,OAChB,oBAAqB,YACrB,cAAe,MACf,kBAAmB,UACnB,kBAAmB,UACnB,oBAAqB,QACrB,4BAA6B,QAC7B,8BAA+B,UAC/B,2BAA4B,OAC5B,qBAAsB,YACtB,uBAAwB,cACxB,mBAAoB,UACpB,0BACI,qDCdR,MAAAC,EAAe,CACX,eAAgB,SAChB,oBAAqB,UACrB,cAAe,SACf,kBAAmB,WACnB,kBAAmB,WACnB,oBAAqB,SACrB,4BAA6B,WAC7B,8BAA+B,iBAC/B,2BAA4B,QAC5B,qBAAsB,kBACtB,0BACI,8DCZR,MAAAC,EAAe,CACX,eAAgB,YAChB,oBAAqB,aACrB,cAAe,MACf,kBAAmB,eACnB,kBAAmB,eACnB,oBAAqB,UACrB,4BAA6B,QAC7B,8BAA+B,WAC/B,2BAA4B,OAC5B,qBAAsB,eACtB,0BACI,iECZR,MAAAC,EAAe,CACX,eAAgB,OAChB,oBAAqB,SACrB,cAAe,MACf,kBAAmB,WACnB,kBAAmB,WACnB,oBAAqB,QACrB,4BAA6B,QAC7B,8BAA+B,UAC/B,2BAA4B,KAC5B,qBAAsB,aACtB,0BACI,0DCZR,MAAAC,EAAe,CACX,eAAgB,MAChB,oBAAqB,UACrB,cAAe,OACf,kBAAmB,UACnB,kBAAmB,UACnB,oBAAqB,OACrB,4BAA6B,QAC7B,8BAA+B,UAC/B,2BAA4B,KAC5B,qBAAsB,aACtB,uBAAwB,eACxB,mBAAoB,QACpB,0BACI,4DCPR,MAAMC,EAAkB,CAAEN,GAAIA,EAAIC,GAAIA,EAAIC,GAAIA,EAAIE,GAAIA,EAAID,GAAIA,EAAIE,GAAIA,G,MAEzDE,EACFC,IAAIC,EAAKC,EAAW,MACvB,OAAOJ,EAAgBI,GAAUD,E,EAIzC,MAAME,EAAe,IAAIJ,EACzB,MAAAK,EAAe,KACJD,EADI,U"}
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
import{M as t,a as i}from"./p-48d4ef20.js";import{m as n,c as e}from"./p-dcc97cc2.js";import{n as r}from"./p-6e219bb4.js";import{g as s}from"./p-9faad6eb.js";
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright 2018 Google Inc.
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in
|
|
14
|
-
* all copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
-
* THE SOFTWARE.
|
|
23
|
-
*/var u={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"};var o={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")};var f={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30};var a;(function(t){t[t["BOTTOM"]=1]="BOTTOM";t[t["CENTER"]=2]="CENTER";t[t["RIGHT"]=4]="RIGHT";t[t["FLIP_RTL"]=8]="FLIP_RTL"})(a||(a={}));var h;(function(t){t[t["TOP_LEFT"]=0]="TOP_LEFT";t[t["TOP_RIGHT"]=4]="TOP_RIGHT";t[t["BOTTOM_LEFT"]=1]="BOTTOM_LEFT";t[t["BOTTOM_RIGHT"]=5]="BOTTOM_RIGHT";t[t["TOP_START"]=8]="TOP_START";t[t["TOP_END"]=12]="TOP_END";t[t["BOTTOM_START"]=9]="BOTTOM_START";t[t["BOTTOM_END"]=13]="BOTTOM_END"})(h||(h={}));
|
|
24
|
-
/*! *****************************************************************************
|
|
25
|
-
Copyright (c) Microsoft Corporation.
|
|
26
|
-
|
|
27
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
28
|
-
purpose with or without fee is hereby granted.
|
|
29
|
-
|
|
30
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
31
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
32
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
33
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
34
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
35
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
36
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
37
|
-
***************************************************************************** */var c=function(t,i){c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return c(t,i)};function d(t,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");c(t,i);function n(){this.constructor=t}t.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}var l=function(){l=Object.assign||function t(i){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s))i[s]=n[s]}return i};return l.apply(this,arguments)};
|
|
38
|
-
/**
|
|
39
|
-
* @license
|
|
40
|
-
* Copyright 2018 Google Inc.
|
|
41
|
-
*
|
|
42
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
43
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
44
|
-
* in the Software without restriction, including without limitation the rights
|
|
45
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
46
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
47
|
-
* furnished to do so, subject to the following conditions:
|
|
48
|
-
*
|
|
49
|
-
* The above copyright notice and this permission notice shall be included in
|
|
50
|
-
* all copies or substantial portions of the Software.
|
|
51
|
-
*
|
|
52
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
53
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
54
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
55
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
56
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
57
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
58
|
-
* THE SOFTWARE.
|
|
59
|
-
*/var v,m;var b={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_TEXT_CLASS:"mdc-list-item__text",LIST_ITEM_PRIMARY_TEXT_CLASS:"mdc-list-item__primary-text",ROOT:"mdc-list"};var I=(v={},v[""+b.LIST_ITEM_ACTIVATED_CLASS]="mdc-list-item--activated",v[""+b.LIST_ITEM_CLASS]="mdc-list-item",v[""+b.LIST_ITEM_DISABLED_CLASS]="mdc-list-item--disabled",v[""+b.LIST_ITEM_SELECTED_CLASS]="mdc-list-item--selected",v[""+b.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-list-item__primary-text",v[""+b.ROOT]="mdc-list",v);var E=(m={},m[""+b.LIST_ITEM_ACTIVATED_CLASS]="mdc-deprecated-list-item--activated",m[""+b.LIST_ITEM_CLASS]="mdc-deprecated-list-item",m[""+b.LIST_ITEM_DISABLED_CLASS]="mdc-deprecated-list-item--disabled",m[""+b.LIST_ITEM_SELECTED_CLASS]="mdc-deprecated-list-item--selected",m[""+b.LIST_ITEM_TEXT_CLASS]="mdc-deprecated-list-item__text",m[""+b.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-deprecated-list-item__primary-text",m[""+b.ROOT]="mdc-deprecated-list",m);var A={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",ARIA_INTERACTIVE_ROLES_SELECTOR:'[role="listbox"], [role="menu"]',ARIA_MULTI_SELECTABLE_SELECTOR:'[aria-multiselectable="true"]',CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+b.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+b.LIST_ITEM_CLASS+" a,\n ."+E[b.LIST_ITEM_CLASS]+" button:not(:disabled),\n ."+E[b.LIST_ITEM_CLASS]+" a\n ",DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:"\n ."+b.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+b.LIST_ITEM_CLASS+" a,\n ."+b.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+b.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled),\n .'+E[b.LIST_ITEM_CLASS]+" button:not(:disabled),\n ."+E[b.LIST_ITEM_CLASS]+" a,\n ."+E[b.LIST_ITEM_CLASS]+' input[type="radio"]:not(:disabled),\n .'+E[b.LIST_ITEM_CLASS]+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]',SELECTED_ITEM_SELECTOR:'[aria-selected="true"], [aria-current="true"]'};var T={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300};var x="evolution";
|
|
60
|
-
/**
|
|
61
|
-
* @license
|
|
62
|
-
* Copyright 2020 Google Inc.
|
|
63
|
-
*
|
|
64
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
65
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
66
|
-
* in the Software without restriction, including without limitation the rights
|
|
67
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
68
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
69
|
-
* furnished to do so, subject to the following conditions:
|
|
70
|
-
*
|
|
71
|
-
* The above copyright notice and this permission notice shall be included in
|
|
72
|
-
* all copies or substantial portions of the Software.
|
|
73
|
-
*
|
|
74
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
75
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
76
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
77
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
78
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
79
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
80
|
-
* THE SOFTWARE.
|
|
81
|
-
*/var C=["input","button","textarea","select"];var _=function(t){var i=t.target;if(!i){return}var n=(""+i.tagName).toLowerCase();if(C.indexOf(n)===-1){t.preventDefault()}};
|
|
82
|
-
/**
|
|
83
|
-
* @license
|
|
84
|
-
* Copyright 2020 Google Inc.
|
|
85
|
-
*
|
|
86
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
87
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
88
|
-
* in the Software without restriction, including without limitation the rights
|
|
89
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
90
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
91
|
-
* furnished to do so, subject to the following conditions:
|
|
92
|
-
*
|
|
93
|
-
* The above copyright notice and this permission notice shall be included in
|
|
94
|
-
* all copies or substantial portions of the Software.
|
|
95
|
-
*
|
|
96
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
97
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
98
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
99
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
100
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
101
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
102
|
-
* THE SOFTWARE.
|
|
103
|
-
*/function O(){var t={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""};return t}function p(t,i){var n=new Map;for(var e=0;e<t;e++){var r=i(e).trim();if(!r){continue}var s=r[0].toLowerCase();if(!n.has(s)){n.set(s,[])}n.get(s).push({text:r.toLowerCase(),index:e})}n.forEach((function(t){t.sort((function(t,i){return t.index-i.index}))}));return n}function g(t,i){var n=t.nextChar,e=t.focusItemAtIndex,r=t.sortedIndexByFirstChar,s=t.focusedItemIndex,u=t.skipFocus,o=t.isItemAtIndexDisabled;clearTimeout(i.bufferClearTimeout);i.bufferClearTimeout=setTimeout((function(){L(i)}),T.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS);i.typeaheadBuffer=i.typeaheadBuffer+n;var f;if(i.typeaheadBuffer.length===1){f=y(r,s,o,i)}else{f=S(r,o,i)}if(f!==-1&&!u){e(f)}return f}function y(t,i,n,e){var r=e.typeaheadBuffer[0];var s=t.get(r);if(!s){return-1}if(r===e.currentFirstChar&&s[e.sortedIndexCursor].index===i){e.sortedIndexCursor=(e.sortedIndexCursor+1)%s.length;var u=s[e.sortedIndexCursor].index;if(!n(u)){return u}}e.currentFirstChar=r;var o=-1;var f;for(f=0;f<s.length;f++){if(!n(s[f].index)){o=f;break}}for(;f<s.length;f++){if(s[f].index>i&&!n(s[f].index)){o=f;break}}if(o!==-1){e.sortedIndexCursor=o;return s[e.sortedIndexCursor].index}return-1}function S(t,i,n){var e=n.typeaheadBuffer[0];var r=t.get(e);if(!r){return-1}var s=r[n.sortedIndexCursor];if(s.text.lastIndexOf(n.typeaheadBuffer,0)===0&&!i(s.index)){return s.index}var u=(n.sortedIndexCursor+1)%r.length;var o=-1;while(u!==n.sortedIndexCursor){var f=r[u];var a=f.text.lastIndexOf(n.typeaheadBuffer,0)===0;var h=!i(f.index);if(a&&h){o=u;break}u=(u+1)%r.length}if(o!==-1){n.sortedIndexCursor=o;return r[n.sortedIndexCursor].index}return-1}function R(t){return t.typeaheadBuffer.length>0}function L(t){t.typeaheadBuffer=""}function w(t,i){var n=t.event,e=t.isTargetListItem,s=t.focusedItemIndex,u=t.focusItemAtIndex,o=t.sortedIndexByFirstChar,f=t.isItemAtIndexDisabled;var a=r(n)==="ArrowLeft";var h=r(n)==="ArrowUp";var c=r(n)==="ArrowRight";var d=r(n)==="ArrowDown";var l=r(n)==="Home";var v=r(n)==="End";var m=r(n)==="Enter";var b=r(n)==="Spacebar";if(n.ctrlKey||n.metaKey||a||h||c||d||l||v||m){return-1}var I=!b&&n.key.length===1;if(I){_(n);var E={focusItemAtIndex:u,focusedItemIndex:s,nextChar:n.key.toLowerCase(),sortedIndexByFirstChar:o,skipFocus:false,isItemAtIndexDisabled:f};return g(E,i)}if(!b){return-1}if(e){_(n)}var A=e&&R(i);if(A){var E={focusItemAtIndex:u,focusedItemIndex:s,nextChar:" ",sortedIndexByFirstChar:o,skipFocus:false,isItemAtIndexDisabled:f};return g(E,i)}return-1}
|
|
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
|
-
*/function D(t){return t instanceof Array}var F=function(t){d(i,t);function i(n){var e=t.call(this,l(l({},i.defaultAdapter),n))||this;e.wrapFocus=false;e.isVertical=true;e.isSingleSelectionList=false;e.selectedIndex=T.UNSET_INDEX;e.focusedItemIndex=T.UNSET_INDEX;e.useActivatedClass=false;e.useSelectedAttr=false;e.ariaCurrentAttrValue=null;e.isCheckboxList=false;e.isRadioList=false;e.hasTypeahead=false;e.typeaheadState=O();e.sortedIndexByFirstChar=new Map;return e}Object.defineProperty(i,"strings",{get:function(){return A},enumerable:false,configurable:true});Object.defineProperty(i,"cssClasses",{get:function(){return b},enumerable:false,configurable:true});Object.defineProperty(i,"numbers",{get:function(){return T},enumerable:false,configurable:true});Object.defineProperty(i,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){return undefined},focusItemAtIndex:function(){return undefined},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return false},hasRadioAtIndex:function(){return false},isCheckboxCheckedAtIndex:function(){return false},isFocusInsideList:function(){return false},isRootFocused:function(){return false},listItemAtIndexHasClass:function(){return false},notifyAction:function(){return undefined},removeClassForElementIndex:function(){return undefined},setAttributeForElementIndex:function(){return undefined},setCheckedCheckboxOrRadioAtIndex:function(){return undefined},setTabIndexForListItemChildren:function(){return undefined},getPrimaryTextAtIndex:function(){return""}}},enumerable:false,configurable:true});i.prototype.layout=function(){if(this.adapter.getListItemCount()===0){return}if(this.adapter.hasCheckboxAtIndex(0)){this.isCheckboxList=true}else if(this.adapter.hasRadioAtIndex(0)){this.isRadioList=true}else{this.maybeInitializeSingleSelection()}if(this.hasTypeahead){this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex()}};i.prototype.getFocusedItemIndex=function(){return this.focusedItemIndex};i.prototype.setWrapFocus=function(t){this.wrapFocus=t};i.prototype.setVerticalOrientation=function(t){this.isVertical=t};i.prototype.setSingleSelection=function(t){this.isSingleSelectionList=t;if(t){this.maybeInitializeSingleSelection();this.selectedIndex=this.getSelectedIndexFromDOM()}};i.prototype.maybeInitializeSingleSelection=function(){var t=this.getSelectedIndexFromDOM();if(t===T.UNSET_INDEX)return;var i=this.adapter.listItemAtIndexHasClass(t,b.LIST_ITEM_ACTIVATED_CLASS);if(i){this.setUseActivatedClass(true)}this.isSingleSelectionList=true;this.selectedIndex=t};i.prototype.getSelectedIndexFromDOM=function(){var t=T.UNSET_INDEX;var i=this.adapter.getListItemCount();for(var n=0;n<i;n++){var e=this.adapter.listItemAtIndexHasClass(n,b.LIST_ITEM_SELECTED_CLASS);var r=this.adapter.listItemAtIndexHasClass(n,b.LIST_ITEM_ACTIVATED_CLASS);if(!(e||r)){continue}t=n;break}return t};i.prototype.setHasTypeahead=function(t){this.hasTypeahead=t;if(t){this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex()}};i.prototype.isTypeaheadInProgress=function(){return this.hasTypeahead&&R(this.typeaheadState)};i.prototype.setUseActivatedClass=function(t){this.useActivatedClass=t};i.prototype.setUseSelectedAttribute=function(t){this.useSelectedAttr=t};i.prototype.getSelectedIndex=function(){return this.selectedIndex};i.prototype.setSelectedIndex=function(t,i){var n=i===void 0?{}:i,e=n.forceUpdate;if(!this.isIndexValid(t)){return}if(this.isCheckboxList){this.setCheckboxAtIndex(t)}else if(this.isRadioList){this.setRadioAtIndex(t)}else{this.setSingleSelectionAtIndex(t,{forceUpdate:e})}};i.prototype.handleFocusIn=function(t){if(t>=0){this.focusedItemIndex=t;this.adapter.setAttributeForElementIndex(t,"tabindex","0");this.adapter.setTabIndexForListItemChildren(t,"0")}};i.prototype.handleFocusOut=function(t){var i=this;if(t>=0){this.adapter.setAttributeForElementIndex(t,"tabindex","-1");this.adapter.setTabIndexForListItemChildren(t,"-1")}setTimeout((function(){if(!i.adapter.isFocusInsideList()){i.setTabindexToFirstSelectedOrFocusedItem()}}),0)};i.prototype.handleKeydown=function(t,i,n){var e=this;var s=r(t)==="ArrowLeft";var u=r(t)==="ArrowUp";var o=r(t)==="ArrowRight";var f=r(t)==="ArrowDown";var a=r(t)==="Home";var h=r(t)==="End";var c=r(t)==="Enter";var d=r(t)==="Spacebar";var l=t.key==="A"||t.key==="a";if(this.adapter.isRootFocused()){if(u||h){t.preventDefault();this.focusLastElement()}else if(f||a){t.preventDefault();this.focusFirstElement()}if(this.hasTypeahead){var v={event:t,focusItemAtIndex:function(t){e.focusItemAtIndex(t)},focusedItemIndex:-1,isTargetListItem:i,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(t){return e.adapter.listItemAtIndexHasClass(t,b.LIST_ITEM_DISABLED_CLASS)}};w(v,this.typeaheadState)}return}var m=this.adapter.getFocusedElementIndex();if(m===-1){m=n;if(m<0){return}}if(this.isVertical&&f||!this.isVertical&&o){_(t);this.focusNextElement(m)}else if(this.isVertical&&u||!this.isVertical&&s){_(t);this.focusPrevElement(m)}else if(a){_(t);this.focusFirstElement()}else if(h){_(t);this.focusLastElement()}else if(l&&t.ctrlKey&&this.isCheckboxList){t.preventDefault();this.toggleAll(this.selectedIndex===T.UNSET_INDEX?[]:this.selectedIndex)}else if(c||d){if(i){var I=t.target;if(I&&I.tagName==="A"&&c){return}_(t);if(this.adapter.listItemAtIndexHasClass(m,b.LIST_ITEM_DISABLED_CLASS)){return}if(!this.isTypeaheadInProgress()){if(this.isSelectableList()){this.setSelectedIndexOnAction(m)}this.adapter.notifyAction(m)}}}if(this.hasTypeahead){var v={event:t,focusItemAtIndex:function(t){e.focusItemAtIndex(t)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:i,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(t){return e.adapter.listItemAtIndexHasClass(t,b.LIST_ITEM_DISABLED_CLASS)}};w(v,this.typeaheadState)}};i.prototype.handleClick=function(t,i){if(t===T.UNSET_INDEX){return}if(this.adapter.listItemAtIndexHasClass(t,b.LIST_ITEM_DISABLED_CLASS)){return}if(this.isSelectableList()){this.setSelectedIndexOnAction(t,i)}this.adapter.notifyAction(t)};i.prototype.focusNextElement=function(t){var i=this.adapter.getListItemCount();var n=t+1;if(n>=i){if(this.wrapFocus){n=0}else{return t}}this.focusItemAtIndex(n);return n};i.prototype.focusPrevElement=function(t){var i=t-1;if(i<0){if(this.wrapFocus){i=this.adapter.getListItemCount()-1}else{return t}}this.focusItemAtIndex(i);return i};i.prototype.focusFirstElement=function(){this.focusItemAtIndex(0);return 0};i.prototype.focusLastElement=function(){var t=this.adapter.getListItemCount()-1;this.focusItemAtIndex(t);return t};i.prototype.focusInitialElement=function(){var t=this.getFirstSelectedOrFocusedItemIndex();this.focusItemAtIndex(t);return t};i.prototype.setEnabled=function(t,i){if(!this.isIndexValid(t)){return}if(i){this.adapter.removeClassForElementIndex(t,b.LIST_ITEM_DISABLED_CLASS);this.adapter.setAttributeForElementIndex(t,A.ARIA_DISABLED,"false")}else{this.adapter.addClassForElementIndex(t,b.LIST_ITEM_DISABLED_CLASS);this.adapter.setAttributeForElementIndex(t,A.ARIA_DISABLED,"true")}};i.prototype.setSingleSelectionAtIndex=function(t,i){var n=i===void 0?{}:i,e=n.forceUpdate;if(this.selectedIndex===t&&!e){return}var r=b.LIST_ITEM_SELECTED_CLASS;if(this.useActivatedClass){r=b.LIST_ITEM_ACTIVATED_CLASS}if(this.selectedIndex!==T.UNSET_INDEX){this.adapter.removeClassForElementIndex(this.selectedIndex,r)}this.setAriaForSingleSelectionAtIndex(t);this.setTabindexAtIndex(t);if(t!==T.UNSET_INDEX){this.adapter.addClassForElementIndex(t,r)}this.selectedIndex=t};i.prototype.setAriaForSingleSelectionAtIndex=function(t){if(this.selectedIndex===T.UNSET_INDEX){this.ariaCurrentAttrValue=this.adapter.getAttributeForElementIndex(t,A.ARIA_CURRENT)}var i=this.ariaCurrentAttrValue!==null;var n=i?A.ARIA_CURRENT:A.ARIA_SELECTED;if(this.selectedIndex!==T.UNSET_INDEX){this.adapter.setAttributeForElementIndex(this.selectedIndex,n,"false")}if(t!==T.UNSET_INDEX){var e=i?this.ariaCurrentAttrValue:"true";this.adapter.setAttributeForElementIndex(t,n,e)}};i.prototype.getSelectionAttribute=function(){return this.useSelectedAttr?A.ARIA_SELECTED:A.ARIA_CHECKED};i.prototype.setRadioAtIndex=function(t){var i=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(t,true);if(this.selectedIndex!==T.UNSET_INDEX){this.adapter.setAttributeForElementIndex(this.selectedIndex,i,"false")}this.adapter.setAttributeForElementIndex(t,i,"true");this.selectedIndex=t};i.prototype.setCheckboxAtIndex=function(t){var i=this.getSelectionAttribute();for(var n=0;n<this.adapter.getListItemCount();n++){var e=false;if(t.indexOf(n)>=0){e=true}this.adapter.setCheckedCheckboxOrRadioAtIndex(n,e);this.adapter.setAttributeForElementIndex(n,i,e?"true":"false")}this.selectedIndex=t};i.prototype.setTabindexAtIndex=function(t){if(this.focusedItemIndex===T.UNSET_INDEX&&t!==0){this.adapter.setAttributeForElementIndex(0,"tabindex","-1")}else if(this.focusedItemIndex>=0&&this.focusedItemIndex!==t){this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1")}if(!(this.selectedIndex instanceof Array)&&this.selectedIndex!==t){this.adapter.setAttributeForElementIndex(this.selectedIndex,"tabindex","-1")}if(t!==T.UNSET_INDEX){this.adapter.setAttributeForElementIndex(t,"tabindex","0")}};i.prototype.isSelectableList=function(){return this.isSingleSelectionList||this.isCheckboxList||this.isRadioList};i.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var t=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(t)};i.prototype.getFirstSelectedOrFocusedItemIndex=function(){if(!this.isSelectableList()){return Math.max(this.focusedItemIndex,0)}if(typeof this.selectedIndex==="number"&&this.selectedIndex!==T.UNSET_INDEX){return this.selectedIndex}if(D(this.selectedIndex)&&this.selectedIndex.length>0){return this.selectedIndex.reduce((function(t,i){return Math.min(t,i)}))}return 0};i.prototype.isIndexValid=function(t){var i=this;if(t instanceof Array){if(!this.isCheckboxList){throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list")}if(t.length===0){return true}else{return t.some((function(t){return i.isIndexInRange(t)}))}}else if(typeof t==="number"){if(this.isCheckboxList){throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t)}return this.isIndexInRange(t)||this.isSingleSelectionList&&t===T.UNSET_INDEX}else{return false}};i.prototype.isIndexInRange=function(t){var i=this.adapter.getListItemCount();return t>=0&&t<i};i.prototype.setSelectedIndexOnAction=function(t,i){if(i===void 0){i=true}if(this.isCheckboxList){this.toggleCheckboxAtIndex(t,i)}else{this.setSelectedIndex(t)}};i.prototype.toggleCheckboxAtIndex=function(t,i){var n=this.getSelectionAttribute();var e=this.adapter.isCheckboxCheckedAtIndex(t);if(i){e=!e;this.adapter.setCheckedCheckboxOrRadioAtIndex(t,e)}this.adapter.setAttributeForElementIndex(t,n,e?"true":"false");var r=this.selectedIndex===T.UNSET_INDEX?[]:this.selectedIndex.slice();if(e){r.push(t)}else{r=r.filter((function(i){return i!==t}))}this.selectedIndex=r};i.prototype.focusItemAtIndex=function(t){this.adapter.focusItemAtIndex(t);this.focusedItemIndex=t};i.prototype.toggleAll=function(t){var i=this.adapter.getListItemCount();if(t.length===i){this.setCheckboxAtIndex([])}else{var n=[];for(var e=0;e<i;e++){if(!this.adapter.listItemAtIndexHasClass(e,b.LIST_ITEM_DISABLED_CLASS)||t.indexOf(e)>-1){n.push(e)}}this.setCheckboxAtIndex(n)}};i.prototype.typeaheadMatchItem=function(t,i,n){var e=this;if(n===void 0){n=false}var r={focusItemAtIndex:function(t){e.focusItemAtIndex(t)},focusedItemIndex:i?i:this.focusedItemIndex,nextChar:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:n,isItemAtIndexDisabled:function(t){return e.adapter.listItemAtIndexHasClass(t,b.LIST_ITEM_DISABLED_CLASS)}};return g(r,this.typeaheadState)};i.prototype.typeaheadInitSortedIndex=function(){return p(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)};i.prototype.clearTypeaheadBuffer=function(){L(this.typeaheadState)};return i}(t);
|
|
126
|
-
/**
|
|
127
|
-
* @license
|
|
128
|
-
* Copyright 2018 Google Inc.
|
|
129
|
-
*
|
|
130
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
131
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
132
|
-
* in the Software without restriction, including without limitation the rights
|
|
133
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
134
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
135
|
-
* furnished to do so, subject to the following conditions:
|
|
136
|
-
*
|
|
137
|
-
* The above copyright notice and this permission notice shall be included in
|
|
138
|
-
* all copies or substantial portions of the Software.
|
|
139
|
-
*
|
|
140
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
141
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
142
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
143
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
144
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
145
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
146
|
-
* THE SOFTWARE.
|
|
147
|
-
*/var N=function(t){d(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}Object.defineProperty(i.prototype,"vertical",{set:function(t){this.foundation.setVerticalOrientation(t)},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"listElements",{get:function(){return Array.from(this.root.querySelectorAll("."+this.classNameMap[b.LIST_ITEM_CLASS]))},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"wrapFocus",{set:function(t){this.foundation.setWrapFocus(t)},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"typeaheadInProgress",{get:function(){return this.foundation.isTypeaheadInProgress()},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"hasTypeahead",{set:function(t){this.foundation.setHasTypeahead(t)},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"singleSelection",{set:function(t){this.foundation.setSingleSelection(t)},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(t){this.foundation.setSelectedIndex(t)},enumerable:false,configurable:true});i.attachTo=function(t){return new i(t)};i.prototype.initialSyncWithDOM=function(){this.isEvolutionEnabled=x in this.root.dataset;if(this.isEvolutionEnabled){this.classNameMap=I}else if(n(this.root,A.DEPRECATED_SELECTOR)){this.classNameMap=E}else{this.classNameMap=Object.values(b).reduce((function(t,i){t[i]=i;return t}),{})}this.handleClick=this.handleClickEvent.bind(this);this.handleKeydown=this.handleKeydownEvent.bind(this);this.focusInEventListener=this.handleFocusInEvent.bind(this);this.focusOutEventListener=this.handleFocusOutEvent.bind(this);this.listen("keydown",this.handleKeydown);this.listen("click",this.handleClick);this.listen("focusin",this.focusInEventListener);this.listen("focusout",this.focusOutEventListener);this.layout();this.initializeListType();this.ensureFocusable()};i.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown);this.unlisten("click",this.handleClick);this.unlisten("focusin",this.focusInEventListener);this.unlisten("focusout",this.focusOutEventListener)};i.prototype.layout=function(){var t=this.root.getAttribute(A.ARIA_ORIENTATION);this.vertical=t!==A.ARIA_ORIENTATION_HORIZONTAL;var i="."+this.classNameMap[b.LIST_ITEM_CLASS]+":not([tabindex])";var n=A.FOCUSABLE_CHILD_ELEMENTS;var e=this.root.querySelectorAll(i);if(e.length){Array.prototype.forEach.call(e,(function(t){t.setAttribute("tabindex","-1")}))}var r=this.root.querySelectorAll(n);if(r.length){Array.prototype.forEach.call(r,(function(t){t.setAttribute("tabindex","-1")}))}if(this.isEvolutionEnabled){this.foundation.setUseSelectedAttribute(true)}this.foundation.layout()};i.prototype.getPrimaryText=function(t){var i;var n=t.querySelector("."+this.classNameMap[b.LIST_ITEM_PRIMARY_TEXT_CLASS]);if(this.isEvolutionEnabled||n){return(i=n===null||n===void 0?void 0:n.textContent)!==null&&i!==void 0?i:""}var e=t.querySelector("."+this.classNameMap[b.LIST_ITEM_TEXT_CLASS]);return e&&e.textContent||""};i.prototype.initializeListType=function(){var t=this;this.isInteractive=n(this.root,A.ARIA_INTERACTIVE_ROLES_SELECTOR);if(this.isEvolutionEnabled&&this.isInteractive){var i=Array.from(this.root.querySelectorAll(A.SELECTED_ITEM_SELECTOR),(function(i){return t.listElements.indexOf(i)}));if(n(this.root,A.ARIA_MULTI_SELECTABLE_SELECTOR)){this.selectedIndex=i}else if(i.length>0){this.selectedIndex=i[0]}return}var e=this.root.querySelectorAll(A.ARIA_ROLE_CHECKBOX_SELECTOR);var r=this.root.querySelector(A.ARIA_CHECKED_RADIO_SELECTOR);if(e.length){var s=this.root.querySelectorAll(A.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=Array.from(s,(function(i){return t.listElements.indexOf(i)}))}else if(r){this.selectedIndex=this.listElements.indexOf(r)}};i.prototype.setEnabled=function(t,i){this.foundation.setEnabled(t,i)};i.prototype.typeaheadMatchItem=function(t,i){return this.foundation.typeaheadMatchItem(t,i,true)};i.prototype.getDefaultFoundation=function(){var t=this;var i={addClassForElementIndex:function(i,n){var e=t.listElements[i];if(e){e.classList.add(t.classNameMap[n])}},focusItemAtIndex:function(i){var n=t.listElements[i];if(n){n.focus()}},getAttributeForElementIndex:function(i,n){return t.listElements[i].getAttribute(n)},getFocusedElementIndex:function(){return t.listElements.indexOf(document.activeElement)},getListItemCount:function(){return t.listElements.length},getPrimaryTextAtIndex:function(i){return t.getPrimaryText(t.listElements[i])},hasCheckboxAtIndex:function(i){var n=t.listElements[i];return!!n.querySelector(A.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(i){var n=t.listElements[i];return!!n.querySelector(A.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(i){var n=t.listElements[i];var e=n.querySelector(A.CHECKBOX_SELECTOR);return e.checked},isFocusInsideList:function(){return t.root!==document.activeElement&&t.root.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===t.root},listItemAtIndexHasClass:function(i,n){return t.listElements[i].classList.contains(t.classNameMap[n])},notifyAction:function(i){t.emit(A.ACTION_EVENT,{index:i},true)},removeClassForElementIndex:function(i,n){var e=t.listElements[i];if(e){e.classList.remove(t.classNameMap[n])}},setAttributeForElementIndex:function(i,n,e){var r=t.listElements[i];if(r){r.setAttribute(n,e)}},setCheckedCheckboxOrRadioAtIndex:function(i,n){var e=t.listElements[i];var r=e.querySelector(A.CHECKBOX_RADIO_SELECTOR);r.checked=n;var s=document.createEvent("Event");s.initEvent("change",true,true);r.dispatchEvent(s)},setTabIndexForListItemChildren:function(i,n){var e=t.listElements[i];var r=A.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX;Array.prototype.forEach.call(e.querySelectorAll(r),(function(t){t.setAttribute("tabindex",n)}))}};return new F(i)};i.prototype.ensureFocusable=function(){if(this.isEvolutionEnabled&&this.isInteractive){if(!this.root.querySelector("."+this.classNameMap[b.LIST_ITEM_CLASS]+'[tabindex="0"]')){var t=this.initialFocusIndex();if(t!==-1){this.listElements[t].tabIndex=0}}}};i.prototype.initialFocusIndex=function(){if(this.selectedIndex instanceof Array&&this.selectedIndex.length>0){return this.selectedIndex[0]}if(typeof this.selectedIndex==="number"&&this.selectedIndex!==T.UNSET_INDEX){return this.selectedIndex}var t=this.root.querySelector("."+this.classNameMap[b.LIST_ITEM_CLASS]+":not(."+this.classNameMap[b.LIST_ITEM_DISABLED_CLASS]+")");if(t===null){return-1}return this.getListItemIndex(t)};i.prototype.getListItemIndex=function(t){var i=e(t,"."+this.classNameMap[b.LIST_ITEM_CLASS]+", ."+this.classNameMap[b.ROOT]);if(i&&n(i,"."+this.classNameMap[b.LIST_ITEM_CLASS])){return this.listElements.indexOf(i)}return-1};i.prototype.handleFocusInEvent=function(t){var i=this.getListItemIndex(t.target);this.foundation.handleFocusIn(i)};i.prototype.handleFocusOutEvent=function(t){var i=this.getListItemIndex(t.target);this.foundation.handleFocusOut(i)};i.prototype.handleKeydownEvent=function(t){var i=this.getListItemIndex(t.target);var n=t.target;this.foundation.handleKeydown(t,n.classList.contains(this.classNameMap[b.LIST_ITEM_CLASS]),i)};i.prototype.handleClickEvent=function(t){var i=this.getListItemIndex(t.target);var e=t.target;var r=!n(e,A.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(i,r)};return i}(i);
|
|
148
|
-
/*! *****************************************************************************
|
|
149
|
-
Copyright (c) Microsoft Corporation.
|
|
150
|
-
|
|
151
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
152
|
-
purpose with or without fee is hereby granted.
|
|
153
|
-
|
|
154
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
155
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
156
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
157
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
158
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
159
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
160
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
161
|
-
***************************************************************************** */var M=function(t,i){M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return M(t,i)};function k(t,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");M(t,i);function n(){this.constructor=t}t.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}var j=function(){j=Object.assign||function t(i){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s))i[s]=n[s]}return i};return j.apply(this,arguments)};function B(t){var i=typeof Symbol==="function"&&Symbol.iterator,n=i&&t[i],e=0;if(n)return n.call(t);if(t&&typeof t.length==="number")return{next:function(){if(t&&e>=t.length)t=void 0;return{value:t&&t[e++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}
|
|
162
|
-
/**
|
|
163
|
-
* @license
|
|
164
|
-
* Copyright 2018 Google Inc.
|
|
165
|
-
*
|
|
166
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
167
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
168
|
-
* in the Software without restriction, including without limitation the rights
|
|
169
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
170
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
171
|
-
* furnished to do so, subject to the following conditions:
|
|
172
|
-
*
|
|
173
|
-
* The above copyright notice and this permission notice shall be included in
|
|
174
|
-
* all copies or substantial portions of the Software.
|
|
175
|
-
*
|
|
176
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
177
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
178
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
179
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
180
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
181
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
182
|
-
* THE SOFTWARE.
|
|
183
|
-
*/var H=function(t){k(i,t);function i(n){var e=t.call(this,j(j({},i.defaultAdapter),n))||this;e.isSurfaceOpen=false;e.isQuickOpen=false;e.isHoistedElement=false;e.isFixedPosition=false;e.isHorizontallyCenteredOnViewport=false;e.maxHeight=0;e.openAnimationEndTimerId=0;e.closeAnimationEndTimerId=0;e.animationRequestId=0;e.anchorCorner=h.TOP_START;e.originCorner=h.TOP_START;e.anchorMargin={top:0,right:0,bottom:0,left:0};e.position={x:0,y:0};return e}Object.defineProperty(i,"cssClasses",{get:function(){return u},enumerable:false,configurable:true});Object.defineProperty(i,"strings",{get:function(){return o},enumerable:false,configurable:true});Object.defineProperty(i,"numbers",{get:function(){return f},enumerable:false,configurable:true});Object.defineProperty(i,"Corner",{get:function(){return h},enumerable:false,configurable:true});Object.defineProperty(i,"defaultAdapter",{get:function(){return{addClass:function(){return undefined},removeClass:function(){return undefined},hasClass:function(){return false},hasAnchor:function(){return false},isElementInContainer:function(){return false},isFocused:function(){return false},isRtl:function(){return false},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){return undefined},setMaxHeight:function(){return undefined},setTransformOrigin:function(){return undefined},saveFocus:function(){return undefined},restoreFocus:function(){return undefined},notifyClose:function(){return undefined},notifyOpen:function(){return undefined},notifyClosing:function(){return undefined}}},enumerable:false,configurable:true});i.prototype.init=function(){var t=i.cssClasses,n=t.ROOT,e=t.OPEN;if(!this.adapter.hasClass(n)){throw new Error(n+" class required in root element.")}if(this.adapter.hasClass(e)){this.isSurfaceOpen=true}};i.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId);clearTimeout(this.closeAnimationEndTimerId);cancelAnimationFrame(this.animationRequestId)};i.prototype.setAnchorCorner=function(t){this.anchorCorner=t};i.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^a.RIGHT};i.prototype.setAnchorMargin=function(t){this.anchorMargin.top=t.top||0;this.anchorMargin.right=t.right||0;this.anchorMargin.bottom=t.bottom||0;this.anchorMargin.left=t.left||0};i.prototype.setIsHoisted=function(t){this.isHoistedElement=t};i.prototype.setFixedPosition=function(t){this.isFixedPosition=t};i.prototype.isFixed=function(){return this.isFixedPosition};i.prototype.setAbsolutePosition=function(t,i){this.position.x=this.isFinite(t)?t:0;this.position.y=this.isFinite(i)?i:0};i.prototype.setIsHorizontallyCenteredOnViewport=function(t){this.isHorizontallyCenteredOnViewport=t};i.prototype.setQuickOpen=function(t){this.isQuickOpen=t};i.prototype.setMaxHeight=function(t){this.maxHeight=t};i.prototype.isOpen=function(){return this.isSurfaceOpen};i.prototype.open=function(){var t=this;if(this.isSurfaceOpen){return}this.adapter.saveFocus();if(this.isQuickOpen){this.isSurfaceOpen=true;this.adapter.addClass(i.cssClasses.OPEN);this.dimensions=this.adapter.getInnerDimensions();this.autoposition();this.adapter.notifyOpen()}else{this.adapter.addClass(i.cssClasses.ANIMATING_OPEN);this.animationRequestId=requestAnimationFrame((function(){t.dimensions=t.adapter.getInnerDimensions();t.autoposition();t.adapter.addClass(i.cssClasses.OPEN);t.openAnimationEndTimerId=setTimeout((function(){t.openAnimationEndTimerId=0;t.adapter.removeClass(i.cssClasses.ANIMATING_OPEN);t.adapter.notifyOpen()}),f.TRANSITION_OPEN_DURATION)}));this.isSurfaceOpen=true}};i.prototype.close=function(t){var n=this;if(t===void 0){t=false}if(!this.isSurfaceOpen){return}this.adapter.notifyClosing();if(this.isQuickOpen){this.isSurfaceOpen=false;if(!t){this.maybeRestoreFocus()}this.adapter.removeClass(i.cssClasses.OPEN);this.adapter.removeClass(i.cssClasses.IS_OPEN_BELOW);this.adapter.notifyClose();return}this.adapter.addClass(i.cssClasses.ANIMATING_CLOSED);requestAnimationFrame((function(){n.adapter.removeClass(i.cssClasses.OPEN);n.adapter.removeClass(i.cssClasses.IS_OPEN_BELOW);n.closeAnimationEndTimerId=setTimeout((function(){n.closeAnimationEndTimerId=0;n.adapter.removeClass(i.cssClasses.ANIMATING_CLOSED);n.adapter.notifyClose()}),f.TRANSITION_CLOSE_DURATION)}));this.isSurfaceOpen=false;if(!t){this.maybeRestoreFocus()}};i.prototype.handleBodyClick=function(t){var i=t.target;if(this.adapter.isElementInContainer(i)){return}this.close()};i.prototype.handleKeydown=function(t){var i=t.keyCode,n=t.key;var e=n==="Escape"||i===27;if(e){this.close()}};i.prototype.autoposition=function(){var t;this.measurements=this.getAutoLayoutmeasurements();var n=this.getoriginCorner();var e=this.getMenuSurfaceMaxHeight(n);var r=this.hasBit(n,a.BOTTOM)?"bottom":"top";var s=this.hasBit(n,a.RIGHT)?"right":"left";var u=this.getHorizontalOriginOffset(n);var o=this.getVerticalOriginOffset(n);var h=this.measurements,c=h.anchorSize,d=h.surfaceSize;var l=(t={},t[s]=u,t[r]=o,t);if(c.width/d.width>f.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO){s="center"}if(this.isHoistedElement||this.isFixedPosition){this.adjustPositionForHoistedElement(l)}this.adapter.setTransformOrigin(s+" "+r);this.adapter.setPosition(l);this.adapter.setMaxHeight(e?e+"px":"");if(!this.hasBit(n,a.BOTTOM)){this.adapter.addClass(i.cssClasses.IS_OPEN_BELOW)}};i.prototype.getAutoLayoutmeasurements=function(){var t=this.adapter.getAnchorDimensions();var i=this.adapter.getBodyDimensions();var n=this.adapter.getWindowDimensions();var e=this.adapter.getWindowScroll();if(!t){t={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}}return{anchorSize:t,bodySize:i,surfaceSize:this.dimensions,viewportDistance:{top:t.top,right:n.width-t.right,bottom:n.height-t.bottom,left:t.left},viewportSize:n,windowScroll:e}};i.prototype.getoriginCorner=function(){var t=this.originCorner;var n=this.measurements,e=n.viewportDistance,r=n.anchorSize,s=n.surfaceSize;var u=i.numbers.MARGIN_TO_EDGE;var o=this.hasBit(this.anchorCorner,a.BOTTOM);var f;var h;if(o){f=e.top-u+this.anchorMargin.bottom;h=e.bottom-u-this.anchorMargin.bottom}else{f=e.top-u+this.anchorMargin.top;h=e.bottom-u+r.height-this.anchorMargin.top}var c=h-s.height>0;if(!c&&f>h){t=this.setBit(t,a.BOTTOM)}var d=this.adapter.isRtl();var l=this.hasBit(this.anchorCorner,a.FLIP_RTL);var v=this.hasBit(this.anchorCorner,a.RIGHT)||this.hasBit(t,a.RIGHT);var m=false;if(d&&l){m=!v}else{m=v}var b;var I;if(m){b=e.left+r.width+this.anchorMargin.right;I=e.right-this.anchorMargin.right}else{b=e.left+this.anchorMargin.left;I=e.right+r.width-this.anchorMargin.left}var E=b-s.width>0;var A=I-s.width>0;var T=this.hasBit(t,a.FLIP_RTL)&&this.hasBit(t,a.RIGHT);if(A&&T&&d||!E&&T){t=this.unsetBit(t,a.RIGHT)}else if(E&&m&&d||E&&!m&&v||!A&&b>=I){t=this.setBit(t,a.RIGHT)}return t};i.prototype.getMenuSurfaceMaxHeight=function(t){if(this.maxHeight>0){return this.maxHeight}var n=this.measurements.viewportDistance;var e=0;var r=this.hasBit(t,a.BOTTOM);var s=this.hasBit(this.anchorCorner,a.BOTTOM);var u=i.numbers.MARGIN_TO_EDGE;if(r){e=n.top+this.anchorMargin.top-u;if(!s){e+=this.measurements.anchorSize.height}}else{e=n.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-u;if(s){e-=this.measurements.anchorSize.height}}return e};i.prototype.getHorizontalOriginOffset=function(t){var i=this.measurements.anchorSize;var n=this.hasBit(t,a.RIGHT);var e=this.hasBit(this.anchorCorner,a.RIGHT);if(n){var r=e?i.width-this.anchorMargin.left:this.anchorMargin.right;if(this.isHoistedElement||this.isFixedPosition){return r-(this.measurements.viewportSize.width-this.measurements.bodySize.width)}return r}return e?i.width-this.anchorMargin.right:this.anchorMargin.left};i.prototype.getVerticalOriginOffset=function(t){var i=this.measurements.anchorSize;var n=this.hasBit(t,a.BOTTOM);var e=this.hasBit(this.anchorCorner,a.BOTTOM);var r=0;if(n){r=e?i.height-this.anchorMargin.top:-this.anchorMargin.bottom}else{r=e?i.height+this.anchorMargin.bottom:this.anchorMargin.top}return r};i.prototype.adjustPositionForHoistedElement=function(t){var i,n;var e=this.measurements,r=e.windowScroll,s=e.viewportDistance,u=e.surfaceSize,o=e.viewportSize;var f=Object.keys(t);try{for(var a=B(f),h=a.next();!h.done;h=a.next()){var c=h.value;var d=t[c]||0;if(this.isHorizontallyCenteredOnViewport&&(c==="left"||c==="right")){t[c]=(o.width-u.width)/2;continue}d+=s[c];if(!this.isFixedPosition){if(c==="top"){d+=r.y}else if(c==="bottom"){d-=r.y}else if(c==="left"){d+=r.x}else{d-=r.x}}t[c]=d}}catch(t){i={error:t}}finally{try{if(h&&!h.done&&(n=a.return))n.call(a)}finally{if(i)throw i.error}}};i.prototype.maybeRestoreFocus=function(){var t=this;var i=this.adapter.isFocused();var n=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);if(i||n){setTimeout((function(){t.adapter.restoreFocus()}),f.TOUCH_EVENT_WAIT_MS)}};i.prototype.hasBit=function(t,i){return Boolean(t&i)};i.prototype.setBit=function(t,i){return t|i};i.prototype.unsetBit=function(t,i){return t^i};i.prototype.isFinite=function(t){return typeof t==="number"&&isFinite(t)};return i}(t);
|
|
184
|
-
/**
|
|
185
|
-
* @license
|
|
186
|
-
* Copyright 2018 Google Inc.
|
|
187
|
-
*
|
|
188
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
189
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
190
|
-
* in the Software without restriction, including without limitation the rights
|
|
191
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
192
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
193
|
-
* furnished to do so, subject to the following conditions:
|
|
194
|
-
*
|
|
195
|
-
* The above copyright notice and this permission notice shall be included in
|
|
196
|
-
* all copies or substantial portions of the Software.
|
|
197
|
-
*
|
|
198
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
199
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
200
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
201
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
202
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
203
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
204
|
-
* THE SOFTWARE.
|
|
205
|
-
*/var P=function(t){k(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.attachTo=function(t){return new i(t)};i.prototype.initialSyncWithDOM=function(){var t=this;var i=this.root.parentElement;this.anchorElement=i&&i.classList.contains(u.ANCHOR)?i:null;if(this.root.classList.contains(u.FIXED)){this.setFixedPosition(true)}this.handleKeydown=function(i){t.foundation.handleKeydown(i)};this.handleBodyClick=function(i){t.foundation.handleBodyClick(i)};this.registerBodyClickListener=function(){document.body.addEventListener("click",t.handleBodyClick,{capture:true})};this.deregisterBodyClickListener=function(){document.body.removeEventListener("click",t.handleBodyClick,{capture:true})};this.listen("keydown",this.handleKeydown);this.listen(o.OPENED_EVENT,this.registerBodyClickListener);this.listen(o.CLOSED_EVENT,this.deregisterBodyClickListener)};i.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown);this.unlisten(o.OPENED_EVENT,this.registerBodyClickListener);this.unlisten(o.CLOSED_EVENT,this.deregisterBodyClickListener);t.prototype.destroy.call(this)};i.prototype.isOpen=function(){return this.foundation.isOpen()};i.prototype.open=function(){this.foundation.open()};i.prototype.close=function(t){if(t===void 0){t=false}this.foundation.close(t)};Object.defineProperty(i.prototype,"quickOpen",{set:function(t){this.foundation.setQuickOpen(t)},enumerable:false,configurable:true});i.prototype.setIsHoisted=function(t){this.foundation.setIsHoisted(t)};i.prototype.setMenuSurfaceAnchorElement=function(t){this.anchorElement=t};i.prototype.setFixedPosition=function(t){if(t){this.root.classList.add(u.FIXED)}else{this.root.classList.remove(u.FIXED)}this.foundation.setFixedPosition(t)};i.prototype.setAbsolutePosition=function(t,i){this.foundation.setAbsolutePosition(t,i);this.setIsHoisted(true)};i.prototype.setAnchorCorner=function(t){this.foundation.setAnchorCorner(t)};i.prototype.setAnchorMargin=function(t){this.foundation.setAnchorMargin(t)};i.prototype.getDefaultFoundation=function(){var t=this;var i={addClass:function(i){return t.root.classList.add(i)},removeClass:function(i){return t.root.classList.remove(i)},hasClass:function(i){return t.root.classList.contains(i)},hasAnchor:function(){return!!t.anchorElement},notifyClose:function(){return t.emit(H.strings.CLOSED_EVENT,{})},notifyClosing:function(){t.emit(H.strings.CLOSING_EVENT,{})},notifyOpen:function(){return t.emit(H.strings.OPENED_EVENT,{})},isElementInContainer:function(i){return t.root.contains(i)},isRtl:function(){return getComputedStyle(t.root).getPropertyValue("direction")==="rtl"},setTransformOrigin:function(i){var n=s(window,"transform")+"-origin";t.root.style.setProperty(n,i)},isFocused:function(){return document.activeElement===t.root},saveFocus:function(){t.previousFocus=document.activeElement},restoreFocus:function(){if(t.root.contains(document.activeElement)){if(t.previousFocus&&t.previousFocus.focus){t.previousFocus.focus()}}},getInnerDimensions:function(){return{width:t.root.offsetWidth,height:t.root.offsetHeight}},getAnchorDimensions:function(){return t.anchorElement?t.anchorElement.getBoundingClientRect():null},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(i){var n=t.root;n.style.left="left"in i?i.left+"px":"";n.style.right="right"in i?i.right+"px":"";n.style.top="top"in i?i.top+"px":"";n.style.bottom="bottom"in i?i.bottom+"px":""},setMaxHeight:function(i){t.root.style.maxHeight=i}};return new H(i)};return i}(i);export{h as C,H as M,F as a,P as b,b as c,N as d,T as n,A as s};
|
|
206
|
-
//# sourceMappingURL=p-dfba92de.js.map
|