@teipublisher/pb-components 2.26.0-next-3.10 → 2.26.0-next-3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/demo/components.css +2 -8
- package/dist/pb-components-bundle.js +13 -13
- package/dist/pb-elements.json +30 -8
- package/dist/pb-odd-editor.js +1 -1
- package/dist/{vaadin-element-mixin-6633322b.js → vaadin-element-mixin-49ab4037.js} +31 -8
- package/package.json +1 -1
- package/pb-elements.json +30 -8
- package/src/pb-dialog.js +30 -3
- package/src/pb-login.js +12 -12
- package/src/pb-view-annotate.js +3 -0
- package/src/pb-view.js +38 -20
package/dist/pb-elements.json
CHANGED
|
@@ -11921,6 +11921,11 @@
|
|
|
11921
11921
|
"description": "The view type to use for paginating the document. Either `page`, `div` or `single`.\nOverwrites the same property specified on `pb-document`. Values have the following meaning:\n\nValue | Displayed content\n------|------------------\n`page` | content is displayed page by page as determined by tei:pb\n`div` | content is displayed by divisions\n`single` | do not paginate but display entire content at once",
|
|
11922
11922
|
"type": "string"
|
|
11923
11923
|
},
|
|
11924
|
+
{
|
|
11925
|
+
"name": "fill",
|
|
11926
|
+
"description": "Controls the pagination-by-div algorithm: if a page would have less than\n`fill` elements, it tries to fill\nup the page by pulling following divs in. When set to 0, it will never\nattempt to fill up the page. For the annotation editor this should\nalways be 0.",
|
|
11927
|
+
"type": "number"
|
|
11928
|
+
},
|
|
11924
11929
|
{
|
|
11925
11930
|
"name": "node-id",
|
|
11926
11931
|
"description": "An eXist nodeId. If specified, selects the root of the fragment of the document\nwhich should be displayed. Normally this property is set automatically by pagination.",
|
|
@@ -12030,7 +12035,7 @@
|
|
|
12030
12035
|
},
|
|
12031
12036
|
{
|
|
12032
12037
|
"name": "no-scroll",
|
|
12033
|
-
"description": "If set, do not scroll the view to target node (e.g. given in URL hash)
|
|
12038
|
+
"description": "If set, do not scroll the view to target node (e.g. given in URL hash)\nafter content was loaded.",
|
|
12034
12039
|
"type": "boolean",
|
|
12035
12040
|
"default": "false"
|
|
12036
12041
|
},
|
|
@@ -12061,7 +12066,7 @@
|
|
|
12061
12066
|
},
|
|
12062
12067
|
{
|
|
12063
12068
|
"name": "wait-for",
|
|
12064
|
-
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.\n\n`pb-view` by default sets this property to select `pb-toggle-feature` and `pb-select-feature
|
|
12069
|
+
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.\n\n`pb-view` by default sets this property to select `pb-toggle-feature` and `pb-select-feature`\nelements.",
|
|
12065
12070
|
"type": "string"
|
|
12066
12071
|
},
|
|
12067
12072
|
{
|
|
@@ -12109,6 +12114,12 @@
|
|
|
12109
12114
|
"description": "The view type to use for paginating the document. Either `page`, `div` or `single`.\nOverwrites the same property specified on `pb-document`. Values have the following meaning:\n\nValue | Displayed content\n------|------------------\n`page` | content is displayed page by page as determined by tei:pb\n`div` | content is displayed by divisions\n`single` | do not paginate but display entire content at once",
|
|
12110
12115
|
"type": "string"
|
|
12111
12116
|
},
|
|
12117
|
+
{
|
|
12118
|
+
"name": "fill",
|
|
12119
|
+
"attribute": "fill",
|
|
12120
|
+
"description": "Controls the pagination-by-div algorithm: if a page would have less than\n`fill` elements, it tries to fill\nup the page by pulling following divs in. When set to 0, it will never\nattempt to fill up the page. For the annotation editor this should\nalways be 0.",
|
|
12121
|
+
"type": "number"
|
|
12122
|
+
},
|
|
12112
12123
|
{
|
|
12113
12124
|
"name": "nodeId",
|
|
12114
12125
|
"attribute": "node-id",
|
|
@@ -12244,7 +12255,7 @@
|
|
|
12244
12255
|
{
|
|
12245
12256
|
"name": "noScroll",
|
|
12246
12257
|
"attribute": "no-scroll",
|
|
12247
|
-
"description": "If set, do not scroll the view to target node (e.g. given in URL hash)
|
|
12258
|
+
"description": "If set, do not scroll the view to target node (e.g. given in URL hash)\nafter content was loaded.",
|
|
12248
12259
|
"type": "boolean",
|
|
12249
12260
|
"default": "false"
|
|
12250
12261
|
},
|
|
@@ -12281,7 +12292,7 @@
|
|
|
12281
12292
|
{
|
|
12282
12293
|
"name": "waitFor",
|
|
12283
12294
|
"attribute": "wait-for",
|
|
12284
|
-
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.\n\n`pb-view` by default sets this property to select `pb-toggle-feature` and `pb-select-feature
|
|
12295
|
+
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.\n\n`pb-view` by default sets this property to select `pb-toggle-feature` and `pb-select-feature`\nelements.",
|
|
12285
12296
|
"type": "string"
|
|
12286
12297
|
},
|
|
12287
12298
|
{
|
|
@@ -12418,6 +12429,11 @@
|
|
|
12418
12429
|
"description": "The view type to use for paginating the document. Either `page`, `div` or `single`.\nOverwrites the same property specified on `pb-document`. Values have the following meaning:\n\nValue | Displayed content\n------|------------------\n`page` | content is displayed page by page as determined by tei:pb\n`div` | content is displayed by divisions\n`single` | do not paginate but display entire content at once",
|
|
12419
12430
|
"type": "string"
|
|
12420
12431
|
},
|
|
12432
|
+
{
|
|
12433
|
+
"name": "fill",
|
|
12434
|
+
"description": "Controls the pagination-by-div algorithm: if a page would have less than\n`fill` elements, it tries to fill\nup the page by pulling following divs in. When set to 0, it will never\nattempt to fill up the page. For the annotation editor this should\nalways be 0.",
|
|
12435
|
+
"type": "number"
|
|
12436
|
+
},
|
|
12421
12437
|
{
|
|
12422
12438
|
"name": "node-id",
|
|
12423
12439
|
"description": "An eXist nodeId. If specified, selects the root of the fragment of the document\nwhich should be displayed. Normally this property is set automatically by pagination.",
|
|
@@ -12527,7 +12543,7 @@
|
|
|
12527
12543
|
},
|
|
12528
12544
|
{
|
|
12529
12545
|
"name": "no-scroll",
|
|
12530
|
-
"description": "If set, do not scroll the view to target node (e.g. given in URL hash)
|
|
12546
|
+
"description": "If set, do not scroll the view to target node (e.g. given in URL hash)\nafter content was loaded.",
|
|
12531
12547
|
"type": "boolean",
|
|
12532
12548
|
"default": "false"
|
|
12533
12549
|
},
|
|
@@ -12558,7 +12574,7 @@
|
|
|
12558
12574
|
},
|
|
12559
12575
|
{
|
|
12560
12576
|
"name": "wait-for",
|
|
12561
|
-
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.\n\n`pb-view` by default sets this property to select `pb-toggle-feature` and `pb-select-feature
|
|
12577
|
+
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.\n\n`pb-view` by default sets this property to select `pb-toggle-feature` and `pb-select-feature`\nelements.",
|
|
12562
12578
|
"type": "string"
|
|
12563
12579
|
},
|
|
12564
12580
|
{
|
|
@@ -12581,6 +12597,12 @@
|
|
|
12581
12597
|
"description": "The view type to use for paginating the document. Either `page`, `div` or `single`.\nOverwrites the same property specified on `pb-document`. Values have the following meaning:\n\nValue | Displayed content\n------|------------------\n`page` | content is displayed page by page as determined by tei:pb\n`div` | content is displayed by divisions\n`single` | do not paginate but display entire content at once",
|
|
12582
12598
|
"type": "string"
|
|
12583
12599
|
},
|
|
12600
|
+
{
|
|
12601
|
+
"name": "fill",
|
|
12602
|
+
"attribute": "fill",
|
|
12603
|
+
"description": "Controls the pagination-by-div algorithm: if a page would have less than\n`fill` elements, it tries to fill\nup the page by pulling following divs in. When set to 0, it will never\nattempt to fill up the page. For the annotation editor this should\nalways be 0.",
|
|
12604
|
+
"type": "number"
|
|
12605
|
+
},
|
|
12584
12606
|
{
|
|
12585
12607
|
"name": "nodeId",
|
|
12586
12608
|
"attribute": "node-id",
|
|
@@ -12716,7 +12738,7 @@
|
|
|
12716
12738
|
{
|
|
12717
12739
|
"name": "noScroll",
|
|
12718
12740
|
"attribute": "no-scroll",
|
|
12719
|
-
"description": "If set, do not scroll the view to target node (e.g. given in URL hash)
|
|
12741
|
+
"description": "If set, do not scroll the view to target node (e.g. given in URL hash)\nafter content was loaded.",
|
|
12720
12742
|
"type": "boolean",
|
|
12721
12743
|
"default": "false"
|
|
12722
12744
|
},
|
|
@@ -12753,7 +12775,7 @@
|
|
|
12753
12775
|
{
|
|
12754
12776
|
"name": "waitFor",
|
|
12755
12777
|
"attribute": "wait-for",
|
|
12756
|
-
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.\n\n`pb-view` by default sets this property to select `pb-toggle-feature` and `pb-select-feature
|
|
12778
|
+
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.\n\n`pb-view` by default sets this property to select `pb-toggle-feature` and `pb-select-feature`\nelements.",
|
|
12757
12779
|
"type": "string"
|
|
12758
12780
|
},
|
|
12759
12781
|
{
|
package/dist/pb-odd-editor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as e,N as t,j as o,k as i,l as s,A as a,L as r,c as n,h as l,b as d,w as p,p as c}from"./pb-mixin-b1caa22e.js";import{E as h,T as u,D as m,p as g}from"./vaadin-element-mixin-
|
|
1
|
+
import{f as e,N as t,j as o,k as i,l as s,A as a,L as r,c as n,h as l,b as d,w as p,p as c}from"./pb-mixin-b1caa22e.js";import{E as h,T as u,D as m,p as g}from"./vaadin-element-mixin-49ab4037.js";import{h as b,g as v,F as f,D as y,z as w,A as _,c as x,P as $}from"./paper-checkbox-4f410b1f.js";import{a as S}from"./paper-listbox-c2468542.js";import"./paper-icon-button-0fb125c4.js";import"./jinn-codemirror-da0e2d1f.js";import{t as E,g as C}from"./pb-i18n-0611135a.js";const k=(()=>{if("undefined"==typeof self)return!1;if("top"in self&&self!==top)try{top}catch(e){return!1}return"showOpenFilePicker"in self})();k?Promise.resolve().then((function(){return B})):Promise.resolve().then((function(){return z})),k?Promise.resolve().then((function(){return O})):Promise.resolve().then((function(){return L}));const A=k?Promise.resolve().then((function(){return T})):Promise.resolve().then((function(){return j}));async function P(...e){return(await A).default(...e)}const R=async e=>{const t=await e.getFile();return t.handle=e,t};var B={__proto__:null,default:async(e=[{}])=>{Array.isArray(e)||(e=[e]);const t=[];e.forEach((e,o)=>{t[o]={description:e.description||"Files",accept:{}},e.mimeTypes?e.mimeTypes.map(i=>{t[o].accept[i]=e.extensions||[]}):t[o].accept["*/*"]=e.extensions||[]});const o=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:t,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),i=await Promise.all(o.map(R));return e[0].multiple?i:i[0]}};function M(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return(M=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var o=this.s.return;return void 0===o?Promise.resolve({value:e,done:!0}):t(o.apply(this.s,arguments))},throw:function(e){var o=this.s.return;return void 0===o?Promise.reject(e):t(o.apply(this.s,arguments))}},new M(e)}const I=async(e,t,o=e.name,i)=>{const s=[],a=[];var r,n=!1,l=!1;try{for(var d,p=function(e){var t,o,i,s=2;for("undefined"!=typeof Symbol&&(o=Symbol.asyncIterator,i=Symbol.iterator);s--;){if(o&&null!=(t=e[o]))return t.call(e);if(i&&null!=(t=e[i]))return new M(t.call(e));o="@@asyncIterator",i="@@iterator"}throw new TypeError("Object is not async iterable")}(e.values());n=!(d=await p.next()).done;n=!1){const r=d.value,n=`${o}/${r.name}`;"file"===r.kind?a.push(r.getFile().then(t=>(t.directoryHandle=e,t.handle=r,Object.defineProperty(t,"webkitRelativePath",{configurable:!0,enumerable:!0,get:()=>n})))):"directory"!==r.kind||!t||i&&i(r)||s.push(I(r,t,n,i))}}catch(e){l=!0,r=e}finally{try{n&&null!=p.return&&await p.return()}finally{if(l)throw r}}return[...(await Promise.all(s)).flat(),...await Promise.all(a)]};var O={__proto__:null,default:async(e={})=>{e.recursive=e.recursive||!1,e.mode=e.mode||"read";const t=await window.showDirectoryPicker({id:e.id,startIn:e.startIn,mode:e.mode});return(await(await t.values()).next()).done?[t]:I(t,e.recursive,void 0,e.skipDirectory)}},T={__proto__:null,default:async(e,t=[{}],o=null,i=!1,s=null)=>{Array.isArray(t)||(t=[t]),t[0].fileName=t[0].fileName||"Untitled";const a=[];let r=null;if(e instanceof Blob&&e.type?r=e.type:e.headers&&e.headers.get("content-type")&&(r=e.headers.get("content-type")),t.forEach((e,t)=>{a[t]={description:e.description||"Files",accept:{}},e.mimeTypes?(0===t&&r&&e.mimeTypes.push(r),e.mimeTypes.map(o=>{a[t].accept[o]=e.extensions||[]})):r?a[t].accept[r]=e.extensions||[]:a[t].accept["*/*"]=e.extensions||[]}),o)try{await o.getFile()}catch(e){if(o=null,i)throw e}const n=o||await window.showSaveFilePicker({suggestedName:t[0].fileName,id:t[0].id,startIn:t[0].startIn,types:a,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1});!o&&s&&s(n);const l=await n.createWritable();if("stream"in e){const t=e.stream();return await t.pipeTo(l),n}return"body"in e?(await e.body.pipeTo(l),n):(await l.write(await e),await l.close(),n)}},z={__proto__:null,default:async(e=[{}])=>(Array.isArray(e)||(e=[e]),new Promise((t,o)=>{const i=document.createElement("input");i.type="file";const s=[...e.map(e=>e.mimeTypes||[]),...e.map(e=>e.extensions||[])].join();i.multiple=e[0].multiple||!1,i.accept=s||"",i.style.display="none",document.body.append(i);const a=e=>{"function"==typeof r&&r(),t(e)},r=e[0].legacySetup&&e[0].legacySetup(a,()=>r(o),i),n=()=>{window.removeEventListener("focus",n),i.remove()};i.addEventListener("click",()=>{window.addEventListener("focus",n)}),i.addEventListener("change",()=>{window.removeEventListener("focus",n),i.remove(),a(i.multiple?Array.from(i.files):i.files[0])}),"showPicker"in HTMLInputElement.prototype?i.showPicker():i.click()}))},L={__proto__:null,default:async(e=[{}])=>(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((t,o)=>{const i=document.createElement("input");i.type="file",i.webkitdirectory=!0;const s=e=>{"function"==typeof a&&a(),t(e)},a=e[0].legacySetup&&e[0].legacySetup(s,()=>a(o),i);i.addEventListener("change",()=>{let t=Array.from(i.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(t=t.filter(t=>t.webkitRelativePath.split("/").every(t=>!e[0].skipDirectory({name:t,kind:"directory"})))):t=t.filter(e=>2===e.webkitRelativePath.split("/").length),s(t)}),"showPicker"in HTMLInputElement.prototype?i.showPicker():i.click()}))},j={__proto__:null,default:async(e,t={})=>{Array.isArray(t)&&(t=t[0]);const o=document.createElement("a");let i=e;"body"in e&&(i=await async function(e,t){const o=e.getReader(),i=new ReadableStream({start:e=>async function t(){return o.read().then(({done:o,value:i})=>{if(!o)return e.enqueue(i),t();e.close()})}()}),s=new Response(i),a=await s.blob();return o.releaseLock(),new Blob([a],{type:t})}(e.body,e.headers.get("content-type"))),o.download=t.fileName||"Untitled",o.href=URL.createObjectURL(await i);const s=()=>{"function"==typeof a&&a()},a=t.legacySetup&&t.legacySetup(s,()=>a(),o);return o.addEventListener("click",()=>{setTimeout(()=>URL.revokeObjectURL(o.href),3e4),s()}),o.click(),null}};
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e,m as t,P as n,h as o,l as i,a as s,I as a,d as r,n as l,o as c,D as u,p,f as
|
|
1
|
+
import{t as e,m as t,P as n,h as o,l as i,a as s,I as a,d as r,n as l,o as c,D as u,p as d,f as p}from"./paper-checkbox-4f410b1f.js";import"./paper-listbox-c2468542.js";import{w as h,h as m,c as g,p as f,L as y}from"./pb-mixin-b1caa22e.js";import{u as v}from"./paper-icon-button-0fb125c4.js";import{t as b}from"./pb-i18n-0611135a.js";
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -7,7 +7,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7
7
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
8
8
|
Code distributed by Google as part of the polymer project is also
|
|
9
9
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
10
|
-
*/const
|
|
10
|
+
*/const x={templatize(t,n){this._templatizerTemplate=t,this.ctor=e(t,this,{mutableData:Boolean(n),parentModel:this._parentModel,instanceProps:this._instanceProps,forwardHostProp:this._forwardHostPropV2,notifyInstanceProp:this._notifyInstancePropV2})},stamp(e){return new this.ctor(e)},modelForElement(e){return t(this._templatizerTemplate,e)}};
|
|
11
11
|
/**
|
|
12
12
|
@license
|
|
13
13
|
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
@@ -180,7 +180,7 @@ n({_template:o`
|
|
|
180
180
|
</div>
|
|
181
181
|
|
|
182
182
|
<slot></slot>
|
|
183
|
-
`,is:"paper-card",properties:{heading:{type:String,value:"",observer:"_headingChanged"},image:{type:String,value:""},alt:{type:String},preloadImage:{type:Boolean,value:!1},fadeImage:{type:Boolean,value:!1},placeholderImage:{type:String,value:null},elevation:{type:Number,value:1,reflectToAttribute:!0},animatedShadow:{type:Boolean,value:!1},animated:{type:Boolean,reflectToAttribute:!0,readOnly:!0,computed:"_computeAnimated(animatedShadow)"}},_isHidden:function(e){return e?"false":"true"},_headingChanged:function(e){var t=this.getAttribute("heading"),n=this.getAttribute("aria-label");"string"==typeof n&&n!==t||this.setAttribute("aria-label",e)},_computeHeadingClass:function(e){return e?" over-image":""},_computeAnimated:function(e){return e}}),function(){if("undefined"!=typeof document&&!("adoptedStyleSheets"in document)){var e="ShadyCSS"in window&&!ShadyCSS.nativeShadow,t=document.implementation.createHTMLDocument(""),n=new WeakMap,o="object"==typeof DOMException?Error:DOMException,i=Object.defineProperty,s=Array.prototype.forEach,a=/@import.+?;?$/gm,r=["addRule","deleteRule","insertRule","removeRule"],l=CSSStyleSheet.prototype;l.replace=function(){return Promise.reject(new o("Can't call replace on non-constructed CSSStyleSheets."))},l.replaceSync=function(){throw new o("Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.")};var c=new WeakMap,u=new WeakMap,
|
|
183
|
+
`,is:"paper-card",properties:{heading:{type:String,value:"",observer:"_headingChanged"},image:{type:String,value:""},alt:{type:String},preloadImage:{type:Boolean,value:!1},fadeImage:{type:Boolean,value:!1},placeholderImage:{type:String,value:null},elevation:{type:Number,value:1,reflectToAttribute:!0},animatedShadow:{type:Boolean,value:!1},animated:{type:Boolean,reflectToAttribute:!0,readOnly:!0,computed:"_computeAnimated(animatedShadow)"}},_isHidden:function(e){return e?"false":"true"},_headingChanged:function(e){var t=this.getAttribute("heading"),n=this.getAttribute("aria-label");"string"==typeof n&&n!==t||this.setAttribute("aria-label",e)},_computeHeadingClass:function(e){return e?" over-image":""},_computeAnimated:function(e){return e}}),function(){if("undefined"!=typeof document&&!("adoptedStyleSheets"in document)){var e="ShadyCSS"in window&&!ShadyCSS.nativeShadow,t=document.implementation.createHTMLDocument(""),n=new WeakMap,o="object"==typeof DOMException?Error:DOMException,i=Object.defineProperty,s=Array.prototype.forEach,a=/@import.+?;?$/gm,r=["addRule","deleteRule","insertRule","removeRule"],l=CSSStyleSheet.prototype;l.replace=function(){return Promise.reject(new o("Can't call replace on non-constructed CSSStyleSheets."))},l.replaceSync=function(){throw new o("Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.")};var c=new WeakMap,u=new WeakMap,d=new WeakMap,p=new WeakMap,h=F.prototype;h.replace=function(e){try{return this.replaceSync(e),Promise.resolve(this)}catch(e){return Promise.reject(e)}},h.replaceSync=function(e){if(B(this),"string"==typeof e){var t=this;c.get(t).textContent=w(e),p.set(t,[]),u.get(t).forEach((function(e){e.isConnected()&&L(t,T(t,e))}))}},i(h,"cssRules",{configurable:!0,enumerable:!0,get:function(){return B(this),c.get(this).sheet.cssRules}}),i(h,"media",{configurable:!0,enumerable:!0,get:function(){return B(this),c.get(this).sheet.media}}),r.forEach((function(e){h[e]=function(){var t=this;B(t);var n=arguments;p.get(t).push({method:e,args:n}),u.get(t).forEach((function(o){if(o.isConnected()){var i=T(t,o).sheet;i[e].apply(i,n)}}));var o=c.get(t).sheet;return o[e].apply(o,n)}})),i(F,Symbol.hasInstance,{configurable:!0,value:z});var m={childList:!0,subtree:!0},g=new WeakMap,f=new WeakMap,y=new WeakMap,v=new WeakMap;if(U.prototype={isConnected:function(){var e=f.get(this);return e instanceof Document?"loading"!==e.readyState:_(e.host)},connect:function(){var e=P(this);v.get(this).observe(e,m),y.get(this).length>0&&M(this),N(e,(function(e){R(e).connect()}))},disconnect:function(){v.get(this).disconnect()},update:function(e){var t=this,n=f.get(t)===document?"Document":"ShadowRoot";if(!Array.isArray(e))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Iterator getter is not callable.");if(!e.every(z))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Failed to convert value to 'CSSStyleSheet'");if(e.some(I))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Can't adopt non-constructed stylesheets");t.sheets=e;var o=y.get(t),i=S(e);k(o,i).forEach((function(e){C(T(e,t)),W(e,t)})),y.set(t,i),t.isConnected()&&i.length>0&&M(t)}},window.CSSStyleSheet=F,D(Document),"ShadowRoot"in window){D(ShadowRoot);var b=Element.prototype,x=b.attachShadow;b.attachShadow=function(e){var t=x.call(this,e);return"closed"===e.mode&&n.set(this,t),t}}var A=R(document);A.isConnected()?A.connect():document.addEventListener("DOMContentLoaded",A.connect.bind(A))}function w(e){var t=e.replace(a,"");return t!==e&&console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418"),t.trim()}function _(e){return"isConnected"in e?e.isConnected:document.contains(e)}function S(e){return e.filter((function(t,n){return e.indexOf(t)===n}))}function k(e,t){return e.filter((function(e){return-1===t.indexOf(e)}))}function C(e){e.parentNode.removeChild(e)}function E(e){return e.shadowRoot||n.get(e)}function z(e){return"object"==typeof e&&(h.isPrototypeOf(e)||l.isPrototypeOf(e))}function I(e){return"object"==typeof e&&l.isPrototypeOf(e)}function O(e,t){var n=document.createElement("style");return d.get(e).set(t,n),u.get(e).push(t),n}function T(e,t){return d.get(e).get(t)}function W(e,t){d.get(e).delete(t),u.set(e,u.get(e).filter((function(e){return e!==t})))}function L(e,t){requestAnimationFrame((function(){t.textContent=c.get(e).textContent,p.get(e).forEach((function(e){return t.sheet[e.method].apply(t.sheet,e.args)}))}))}function B(e){if(!c.has(e))throw new TypeError("Illegal invocation")}function F(){var e=this,n=document.createElement("style");t.body.appendChild(n),c.set(e,n),u.set(e,[]),d.set(e,new WeakMap),p.set(e,[])}function R(e){var t=g.get(e);return t||(t=new U(e),g.set(e,t)),t}function D(e){i(e.prototype,"adoptedStyleSheets",{configurable:!0,enumerable:!0,get:function(){return R(this).sheets},set:function(e){R(this).update(e)}})}function N(e,t){for(var n=document.createNodeIterator(e,NodeFilter.SHOW_ELEMENT,(function(e){return E(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),null,!1),o=void 0;o=n.nextNode();)t(E(o))}function j(e,t){return t instanceof HTMLStyleElement&&y.get(e).some((function(t){return T(t,e)}))}function P(e){var t=f.get(e);return t instanceof Document?t.body:t}function M(e){var t=document.createDocumentFragment(),n=y.get(e),o=v.get(e),i=P(e);o.disconnect(),n.forEach((function(n){t.appendChild(T(n,e)||O(n,e))})),i.insertBefore(t,null),o.observe(i,m),n.forEach((function(t){L(t,T(t,e))}))}function U(t){var n=this;n.sheets=[],f.set(n,t),y.set(n,[]),v.set(n,new MutationObserver((function(t,o){document?t.forEach((function(t){e||s.call(t.addedNodes,(function(e){e instanceof Element&&N(e,(function(e){R(e).connect()}))})),s.call(t.removedNodes,(function(t){t instanceof Element&&(j(n,t)&&M(n),e||N(t,(function(e){R(e).disconnect()})))}))})):o.disconnect()})))}}();const A=new Map;async function w(e){const t=[];for(const n of e){const e=await _(n);e&&t.push(e)}if(t.length>0){return(new CSSStyleSheet).replace(t.join(""))}return null}function _(e){return fetch(e).then(t=>t.ok?t.text():(console.warn("<theming> Component stylesheet not found: %s",e),null)).then(e=>e).catch(t=>(console.error("<theming> Error loading stylesheet %s: %o",e,t),null))}function S(e){const t=k();if(!t)return null;const n=E(e).join("|");if(A.has(n))return A.get(n);const o=new RegExp(`^(${n})\\b`);let i=null;const s=C(t.cssRules,o,[]);return s.length>0&&(i=new CSSStyleSheet,i.replaceSync(s.join(""))),console.log("<theming> caching stylesheet for %s",n),A.set(n,i),i}function k(){const e=document.querySelector("pb-page");if(!e)return null;const t=e.stylesheet;return t||null}function C(e,t,n){for(let o=0;o<e.length;o++){const i=e[o];if(i instanceof CSSStyleRule){if(t.test(i.selectorText)){const e=i.cssText.replace(t,":host($1) ");n.push(e)}}else i instanceof CSSMediaRule?(n.push(`\n@media ${i.conditionText} {\n`),C(i.cssRules,t,n),n.push("\n}\n")):i instanceof CSSFontFaceRule||n.push(i.cssText)}return n}function E(e){const t=[e.localName];return e.id&&t.push("#"+e.id),e.classList.forEach(e=>t.push("."+e)),t}const z=e=>class extends e{connectedCallback(){super.connectedCallback(),h("pb-page-ready",e=>{const t=k();t&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,t])})}};class I extends(z(f(y))){static get properties(){return Object.assign(Object.assign({},super.properties),{},{noAnimation:{type:Boolean,attribute:"no-animation"},opened:{type:Boolean},toggles:{type:Boolean}})}constructor(){super(),this.horizontal=!1,this.noAnimation=!1,this.opened=!1,this.expandIcon="icons:expand-more",this.collapseIcon="icons:expand-less",this.noIcons=!1,this.toggles=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("pb-collapse-open",()=>{this.open()}),this.toggles&&this.subscribeTo("pb-collapse-open",e=>{if(e.detail&&e.detail._source!==this){for(const t of this.querySelectorAll("pb-collapse"))if(t===e.detail._source)return;this.close()}})}updated(e){if(super.updated(e),e.has("opened")){const e=this.shadowRoot.querySelector("details");e&&(e.open=this.opened)}}open(){this.opened||(this.opened=!0,this.emitTo("pb-collapse-open",this))}close(){this.opened&&(this.opened=!1)}toggle(){this.opened=!this.opened,this.opened&&this.emitTo("pb-collapse-open",this.data)}_handleToggle(e){e.preventDefault(),this.toggle()}render(){return m`
|
|
184
184
|
<details ?open="${this.opened}" class="${this.horizontal?"horizontal":""}">
|
|
185
185
|
<summary @click="${this._handleToggle}" class="collapse-trigger">
|
|
186
186
|
<slot id="collapseTrigger" name="collapse-trigger"></slot>
|
|
@@ -450,7 +450,7 @@ n({_template:o`
|
|
|
450
450
|
<!-- Custom template -->
|
|
451
451
|
<slot id="templates" name="autocomplete-custom-template"></slot>
|
|
452
452
|
</div>
|
|
453
|
-
`,is:"paper-autocomplete-suggestions",behaviors:[
|
|
453
|
+
`,is:"paper-autocomplete-suggestions",behaviors:[x],properties:{for:{type:String},isOpen:{type:Boolean,value:!1,notify:!0},minLength:{type:Number,value:1},maxViewableItems:{type:Number,value:7},textProperty:{type:String,value:"text"},valueProperty:{type:String,value:"value"},source:{type:Array},selectedOption:{type:Object,notify:!0},remoteSource:{type:Boolean,value:!1},eventNamespace:{type:String,value:"-"},highlightedSuggestion:{type:Object,value:{},notify:!0},queryFn:{type:Function},highlightFirst:{type:Boolean,value:!1},showResultsOnFocus:{type:Boolean,value:!1},_suggestions:{type:Array,observer:"_onSuggestionsChanged"},_currentIndex:{type:Number,value:-1},_scrollIndex:{type:Number,value:0},_itemHeight:{type:Number,value:36,observer:"_itemHeightChanged"},_value:{value:void 0},_text:{value:void 0},_idItemSeed:{type:String,value:"aria-"+(new Date).getTime()+"-"+Math.floor(1e3*Math.random()),readOnly:!0},_bindedFunctions:{type:Object,value:function(){return{_onKeypress:null,_onFocus:null,_onBlur:null}}},_hasItemHighBeenCalculated:{type:Boolean,value:!1},__customTplRef:Object},ready:function(){this._value=this.value,this.dataHost=this,this.$.suggestionsWrapper.addEventListener("mousedown",(function(e){e.preventDefault()})),this._suggestionTemplate.__dataHost=this,this.templatize(this._suggestionTemplate)},attached:function(){if(this._input=this.parentNode.querySelector("#"+this.for),null===this._input)throw new Error("Cannot find input field with id: "+this.for);this._bindedFunctions._onKeypress=this._onKeypress.bind(this),this._bindedFunctions._onFocus=this._onFocus.bind(this),this._bindedFunctions._onBlur=this._onBlur.bind(this),this._input.addEventListener("keyup",this._bindedFunctions._onKeypress),this._input.addEventListener("focus",this._bindedFunctions._onFocus),this._input.addEventListener("blur",this._bindedFunctions._onBlur)},detached:function(){this.cancelDebouncer("_onSuggestionChanged"),this._input.removeEventListener("keyup",this._bindedFunctions._onKeypress),this._input.removeEventListener("focus",this._bindedFunctions._onFocus),this._input.removeEventListener("blur",this._bindedFunctions._onBlur),this._input=null,this.__customTplRef=null},_getItemText:function(e){return e[this.textProperty]},_showSuggestionsWrapper:function(){var e=this.$.suggestionsWrapper;e.style.display="block",e.setAttribute("role","listbox"),this.isOpen=!0},_hideSuggestionsWrapper:function(){var e=this.$.suggestionsWrapper;e.style.display="none",e.removeAttribute("role"),this.isOpen=!1,this.highlightedSuggestion={},this._clearSuggestions()},_handleSuggestions:function(e){this.remoteSource?this._remoteSuggestions():this._createSuggestions(e)},_remoteSuggestions:function(){var e=this._input.value,t={text:e,value:e};e&&e.length>=this.minLength?this._fireEvent(t,"change"):this._suggestions=[]},_bindSuggestions:function(e){e.length&&e.length>0?(this._suggestions=e,this._currentIndex=-1,this._scrollIndex=0):this._suggestions=[]},_createSuggestions:function(e){this._currentIndex=-1,this._scrollIndex=0;var t=e.target.value;null!==t&&t.length>=this.minLength?(t=t.toLowerCase(),this.source&&this.source.length>0&&(this._suggestions=this.queryFn(this.source,t))):this._suggestions=[]},get _suggestionTemplate(){if(this.__customTplRef)return this.__customTplRef;var e=this.getEffectiveChildren();return this.__customTplRef=e.length>0?e[0]:this.$.defaultTemplate,this.__customTplRef},_renderSuggestions:function(e){var t=r(this.$.suggestionsWrapper);this._clearSuggestions(),[].slice.call(e).forEach(function(e,n){var o=this.stamp();o.item=e,o.index=n,t.appendChild(o.root)}.bind(this))},_clearSuggestions:function(){for(var e,t=r(this.$.suggestionsWrapper);e=t.lastChild;)t.removeChild(e)},_onSuggestionsChanged:function(){this.debounce("_onSuggestionChanged",()=>{if(this._renderSuggestions(this._suggestions),this._suggestions.length>0?this._showSuggestionsWrapper():this._hideSuggestionsWrapper(),l(),this._resetScroll(),!this._hasItemHighBeenCalculated){var e=this.$.suggestionsWrapper.querySelector("paper-item");null!==e&&(this._itemHeight=e.offsetHeight,this._hasItemHighBeenCalculated=!0)}this.highlightFirst&&this._moveHighlighted(L.DOWN)},100)},_selection:function(e){var t=this._suggestions[e];this._input.value=t[this.textProperty],this.selectedOption=t,this._value=this.value,this._text=this.text,this._emptyItems(),this._fireEvent(t,"selected"),this.hideSuggestions()},_getItems:function(){return this.$.suggestionsWrapper.querySelectorAll("paper-item")},_emptyItems:function(){this._suggestions=[]},_getId:function(){var e=this.getAttribute("id");return e||(e=this.dataset.id),e},_removeActive:function(e){[].slice.call(e).forEach((function(e){e.classList.remove("active"),e.setAttribute("aria-selected","false")}))},_onKeypress:function(e){switch(e.which||e.keyCode){case B.DOWN_ARROW:this._moveHighlighted(L.DOWN);break;case B.UP_ARROW:this._moveHighlighted(L.UP);break;case B.ENTER:this._keyenter();break;case B.ESCAPE:this._hideSuggestionsWrapper();break;case B.LEFT_ARROW:case B.RIGHT_ARROW:break;default:this._handleSuggestions(e)}},_keyenter:function(){if("block"===this.$.suggestionsWrapper.style.display&&this._currentIndex>-1){var e=this._currentIndex;this._selection(e)}},_moveHighlighted:function(e){var t=this._getItems();if(0!==t.length){var n=t.length-1,o=0===this._currentIndex,i=this._currentIndex===n;if((-1===this._currentIndex||o)&&e===L.UP)this._currentIndex=n;else if(i&&e===L.DOWN)this._currentIndex=0;else{var s=e===L.DOWN?1:-1;this._currentIndex=this._currentIndex+s}var a=this._suggestions[this._currentIndex],r=t[this._currentIndex];this._removeActive(t),r.classList.add("active"),r.setAttribute("aria-selected","true"),this._setHighlightedSuggestion(a,r.id),this._scroll(e)}},_scroll:function(e){var t,n,o=this._currentIndex-this._scrollIndex,i=0===this._currentIndex&&o<0,s=this._currentIndex===this._suggestions.length-1&&o>=this.maxViewableItems;i&&e===L.DOWN?(t=0,n=!0):s&&e===L.UP?(t=this._suggestions.length-this.maxViewableItems,n=!0):e===L.UP?(t=this._scrollIndex-1,n=o<0):(t=this._scrollIndex+1,n=o>=this.maxViewableItems),n&&(this._scrollIndex=t,this.$.suggestionsWrapper.scrollTop=this._scrollIndex*this._itemHeight)},_resetScroll:function(){this.$.suggestionsWrapper.scrollTop=0},_setHighlightedSuggestion:function(e,t){this.highlightedSuggestion={option:e,elementId:t,textValue:e[this.textProperty],value:e[this.valueProperty]}},_fireEvent:function(e,t){var n=this._getId(),o="autocomplete"+this.eventNamespace+t;this.fire(o,{id:n,value:e[this.valueProperty]||e.value,text:e[this.textProperty]||e.text,target:this,option:e})},_onSelect:function(e){var t=this.modelForElement(e.currentTarget).index;this._selection(t)},_onBlur:function(){var e={text:this.text,value:this.value};this._fireEvent(e,"blur"),this.hideSuggestions()},_onFocus:function(e){var t={text:this.text,value:this.value};this.showResultsOnFocus&&this._handleSuggestions(e),this._fireEvent(t,"focus")},_getSuggestionId:function(e){return this._idItemSeed+"-"+e},_itemHeightChanged:function(){this.$.suggestionsWrapper.style.maxHeight=this._itemHeight*this.maxViewableItems+"px"},suggestions:function(e){this._bindSuggestions(e)},hideSuggestions:function(){setTimeout(function(){this._hideSuggestionsWrapper()}.bind(this),0)},queryFn:function(e,t){var n=[];return e.forEach(function(e){var o,i;if("object"==typeof e?(o=e[this.textProperty],i=e[this.valueProperty]):i=o=e.toString(),0===o.toLowerCase().indexOf(t)){var s={};s[this.textProperty]=o,s[this.valueProperty]=i,n.push(s)}}.bind(this)),n}});
|
|
454
454
|
/**!
|
|
455
455
|
* hotkeys-js v3.11.2
|
|
456
456
|
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
|
|
@@ -459,12 +459,12 @@ n({_template:o`
|
|
|
459
459
|
* https://jaywcjlove.github.io/hotkeys-js
|
|
460
460
|
* Licensed under the MIT license
|
|
461
461
|
*/
|
|
462
|
-
var F="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function R(e,t,n,o){e.addEventListener?e.addEventListener(t,n,o):e.attachEvent&&e.attachEvent("on".concat(t),(function(){n(window.event)}))}function D(e,t){for(var n=t.slice(0,t.length-1),o=0;o<n.length;o++)n[o]=e[n[o].toLowerCase()];return n}function N(e){"string"!=typeof e&&(e="");for(var t=(e=e.replace(/\s/g,"")).split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function j(e,t){for(var n=e.length>=t.length?e:t,o=e.length>=t.length?t:e,i=!0,s=0;s<n.length;s++)-1===o.indexOf(n[s])&&(i=!1);return i}for(var P={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":F?173:189,"=":F?61:187,";":F?59:186,"'":222,"[":219,"]":221,"\\":220},M={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},U={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},G={16:!1,18:!1,17:!1,91:!1},H={},K=1;K<20;K++)P["f".concat(K)]=111+K;var X=[],V=!1,Y="all",q=[],Z=function(e){return P[e.toLowerCase()]||M[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)},J=function(e){return Object.keys(P).find((function(t){return P[t]===e}))},Q=function(e){return Object.keys(M).find((function(t){return M[t]===e}))};function $(e){Y=e||"all"}function ee(){return Y||"all"}function te(){return X.slice(0)}function ne(){return X.map((function(e){return J(e)||Q(e)||String.fromCharCode(e)}))}function oe(e){var t=e.target||e.srcElement,n=t.tagName,o=!0;return!t.isContentEditable&&("INPUT"!==n&&"TEXTAREA"!==n&&"SELECT"!==n||t.readOnly)||(o=!1),o}function ie(e){return"string"==typeof e&&(e=Z(e)),-1!==X.indexOf(e)}function se(e,t){var n,o;for(var i in e||(e=ee()),H)if(Object.prototype.hasOwnProperty.call(H,i))for(n=H[i],o=0;o<n.length;)n[o].scope===e?n.splice(o,1):o++;ee()===e&&$(t||"all")}function ae(e){var t=e.keyCode||e.which||e.charCode,n=X.indexOf(t);if(n>=0&&X.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&X.splice(0,X.length),93!==t&&224!==t||(t=91),t in G)for(var o in G[t]=!1,M)M[o]===t&&(
|
|
462
|
+
var F="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function R(e,t,n,o){e.addEventListener?e.addEventListener(t,n,o):e.attachEvent&&e.attachEvent("on".concat(t),(function(){n(window.event)}))}function D(e,t){for(var n=t.slice(0,t.length-1),o=0;o<n.length;o++)n[o]=e[n[o].toLowerCase()];return n}function N(e){"string"!=typeof e&&(e="");for(var t=(e=e.replace(/\s/g,"")).split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function j(e,t){for(var n=e.length>=t.length?e:t,o=e.length>=t.length?t:e,i=!0,s=0;s<n.length;s++)-1===o.indexOf(n[s])&&(i=!1);return i}for(var P={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":F?173:189,"=":F?61:187,";":F?59:186,"'":222,"[":219,"]":221,"\\":220},M={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},U={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},G={16:!1,18:!1,17:!1,91:!1},H={},K=1;K<20;K++)P["f".concat(K)]=111+K;var X=[],V=!1,Y="all",q=[],Z=function(e){return P[e.toLowerCase()]||M[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)},J=function(e){return Object.keys(P).find((function(t){return P[t]===e}))},Q=function(e){return Object.keys(M).find((function(t){return M[t]===e}))};function $(e){Y=e||"all"}function ee(){return Y||"all"}function te(){return X.slice(0)}function ne(){return X.map((function(e){return J(e)||Q(e)||String.fromCharCode(e)}))}function oe(e){var t=e.target||e.srcElement,n=t.tagName,o=!0;return!t.isContentEditable&&("INPUT"!==n&&"TEXTAREA"!==n&&"SELECT"!==n||t.readOnly)||(o=!1),o}function ie(e){return"string"==typeof e&&(e=Z(e)),-1!==X.indexOf(e)}function se(e,t){var n,o;for(var i in e||(e=ee()),H)if(Object.prototype.hasOwnProperty.call(H,i))for(n=H[i],o=0;o<n.length;)n[o].scope===e?n.splice(o,1):o++;ee()===e&&$(t||"all")}function ae(e){var t=e.keyCode||e.which||e.charCode,n=X.indexOf(t);if(n>=0&&X.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&X.splice(0,X.length),93!==t&&224!==t||(t=91),t in G)for(var o in G[t]=!1,M)M[o]===t&&(pe[o]=!1)}function re(e){if(void 0===e)Object.keys(H).forEach((function(e){return delete H[e]}));else if(Array.isArray(e))e.forEach((function(e){e.key&&le(e)}));else if("object"==typeof e)e.key&&le(e);else if("string"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var i=n[0],s=n[1];"function"==typeof i&&(s=i,i=""),le({key:e,scope:i,method:s,splitKey:"+"})}}var le=function(e){var t=e.key,n=e.scope,o=e.method,i=e.splitKey,s=void 0===i?"+":i;N(t).forEach((function(e){var t=e.split(s),i=t.length,a=t[i-1],r="*"===a?"*":Z(a);if(H[r]){n||(n=ee());var l=i>1?D(M,t):[];H[r]=H[r].filter((function(e){return!((!o||e.method===o)&&e.scope===n&&j(e.mods,l))}))}}))};function ce(e,t,n,o){var i;if(t.element===o&&(t.scope===n||"all"===t.scope)){for(var s in i=t.mods.length>0,G)Object.prototype.hasOwnProperty.call(G,s)&&(!G[s]&&t.mods.indexOf(+s)>-1||G[s]&&-1===t.mods.indexOf(+s))&&(i=!1);(0!==t.mods.length||G[16]||G[18]||G[17]||G[91])&&!i&&"*"!==t.shortcut||(t.keys=[],t.keys=t.keys.concat(X),!1===t.method(e,t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function ue(e,t){var n=H["*"],o=e.keyCode||e.which||e.charCode;if(pe.filter.call(this,e)){if(93!==o&&224!==o||(o=91),-1===X.indexOf(o)&&229!==o&&X.push(o),["ctrlKey","altKey","shiftKey","metaKey"].forEach((function(t){var n=U[t];e[t]&&-1===X.indexOf(n)?X.push(n):!e[t]&&X.indexOf(n)>-1?X.splice(X.indexOf(n),1):"metaKey"===t&&e[t]&&3===X.length&&(e.ctrlKey||e.shiftKey||e.altKey||(X=X.slice(X.indexOf(n))))})),o in G){for(var i in G[o]=!0,M)M[i]===o&&(pe[i]=!0);if(!n)return}for(var s in G)Object.prototype.hasOwnProperty.call(G,s)&&(G[s]=e[U[s]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(-1===X.indexOf(17)&&X.push(17),-1===X.indexOf(18)&&X.push(18),G[17]=!0,G[18]=!0);var a=ee();if(n)for(var r=0;r<n.length;r++)n[r].scope===a&&("keydown"===e.type&&n[r].keydown||"keyup"===e.type&&n[r].keyup)&&ce(e,n[r],a,t);if(o in H)for(var l=0;l<H[o].length;l++)if(("keydown"===e.type&&H[o][l].keydown||"keyup"===e.type&&H[o][l].keyup)&&H[o][l].key){for(var c=H[o][l],u=c.splitKey,d=c.key.split(u),p=[],h=0;h<d.length;h++)p.push(Z(d[h]));p.sort().join("")===X.sort().join("")&&ce(e,c,a,t)}}}function de(e){return q.indexOf(e)>-1}function pe(e,t,n){X=[];var o=N(e),i=[],s="all",a=document,r=0,l=!1,c=!0,u="+",d=!1;for(void 0===n&&"function"==typeof t&&(n=t),"[object Object]"===Object.prototype.toString.call(t)&&(t.scope&&(s=t.scope),t.element&&(a=t.element),t.keyup&&(l=t.keyup),void 0!==t.keydown&&(c=t.keydown),void 0!==t.capture&&(d=t.capture),"string"==typeof t.splitKey&&(u=t.splitKey)),"string"==typeof t&&(s=t);r<o.length;r++)i=[],(e=o[r].split(u)).length>1&&(i=D(M,e)),(e="*"===(e=e[e.length-1])?"*":Z(e))in H||(H[e]=[]),H[e].push({keyup:l,keydown:c,scope:s,mods:i,shortcut:o[r],method:n,key:o[r],splitKey:u,element:a});void 0!==a&&!de(a)&&window&&(q.push(a),R(a,"keydown",(function(e){ue(e,a)}),d),V||(V=!0,R(window,"focus",(function(){X=[]}),d)),R(a,"keyup",(function(e){ue(e,a),ae(e)}),d))}function he(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(H).forEach((function(n){H[n].filter((function(n){return n.scope===t&&n.shortcut===e})).forEach((function(e){e&&e.method&&e.method()}))}))}var me={getPressedKeyString:ne,setScope:$,getScope:ee,deleteScope:se,getPressedKeyCodes:te,isPressed:ie,filter:oe,trigger:he,unbind:re,keyMap:P,modifier:M,modifierMap:U};for(var ge in me)Object.prototype.hasOwnProperty.call(me,ge)&&(pe[ge]=me[ge]);if("undefined"!=typeof window){var fe=window.hotkeys;pe.noConflict=function(e){return e&&window.hotkeys===pe&&(window.hotkeys=fe),pe},window.hotkeys=pe}const ye=new Set(["INPUT","SELECT","TEXTAREA","PAPER-INPUT","PAPER-TEXTAREA","PB-SEARCH"]);let ve=!0;ve&&(pe.filter=e=>{const t=(e.target||e.srcElement).tagName;return!(t.isContentEditable||ye.has(t))},ve=!1);const be=e=>class extends e{static get properties(){return Object.assign(Object.assign({},super.properties),{},{hotkeys:{type:Object}})}constructor(){super(),this.hotkeys={}}registerHotkey(e,t,n){e&&this.hotkeys[e]&&(n?pe(this.hotkeys[e],{element:n},t):pe(this.hotkeys[e],t))}display(e){if(e&&this.hotkeys[e]){let t=[];return this.hotkeys[e].split(/\s*,\s*/).forEach(e=>{t.push(e.replace("+","-"))}),t.join(", ")}return""}};function xe(e,t,n){n?pe(e,{element:n},t):pe(e,t)}window.pbKeyboard=xe;class Ae extends(z(f(y))){static get properties(){return Object.assign(Object.assign({},super.properties),{},{open:{type:Boolean,reflect:!0},modal:{type:Boolean,reflect:!0},title:{type:String,reflect:!0},message:{type:String,reflect:!0}})}constructor(){super(),this.open=!1,this.modal=!0,this._escListener=this._onEsc.bind(this),this.title=null,this.message=null}_onEsc(e){"Escape"===e.key&&this.open&&this.closeDialog()}openDialog(){this.open||(this.modal?this._dialog.showModal():this._dialog.show(),this.dispatchEvent(new CustomEvent("pb-dialog-opened",{bubbles:!0,composed:!0})),this.open=!0)}closeDialog(){this.open&&(this._dialog.close(),this.dispatchEvent(new CustomEvent("pb-dialog-closed",{bubbles:!0,composed:!0})),this.open=!1)}render(){return m`
|
|
463
463
|
<dialog @click="${e=>e.target===this._dialog&&this.modal&&this.closeDialog()}">
|
|
464
464
|
<article>
|
|
465
465
|
<header>
|
|
466
466
|
${this.title?v(this.title):m`<slot name="title"></slot>`}
|
|
467
|
-
<button rel="prev" aria-label="Close" @click="${this.closeDialog}"
|
|
467
|
+
<button rel="prev" aria-label="Close" @click="${this.closeDialog}"></button>
|
|
468
468
|
</header>
|
|
469
469
|
${this.message?v(this.message):m`<slot></slot>`}
|
|
470
470
|
<footer>
|
|
@@ -472,7 +472,30 @@ var F="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("
|
|
|
472
472
|
</footer>
|
|
473
473
|
</article>
|
|
474
474
|
</dialog>
|
|
475
|
-
`}firstUpdated(){this._dialog=this.renderRoot.querySelector("dialog")}
|
|
475
|
+
`}firstUpdated(){this._dialog=this.renderRoot.querySelector("dialog")}static get styles(){return g`
|
|
476
|
+
header {
|
|
477
|
+
display: flex;
|
|
478
|
+
justify-content: space-between;
|
|
479
|
+
align-items: center;
|
|
480
|
+
}
|
|
481
|
+
button[rel="prev"] {
|
|
482
|
+
display: block;
|
|
483
|
+
height: 1rem;
|
|
484
|
+
width: 1rem;
|
|
485
|
+
background-image: var(--pb-dialog-background-image, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E"));
|
|
486
|
+
background-position: center;
|
|
487
|
+
background-size: auto 1rem;
|
|
488
|
+
background-repeat: no-repeat;
|
|
489
|
+
background-color: transparent;
|
|
490
|
+
border: none;
|
|
491
|
+
}
|
|
492
|
+
footer {
|
|
493
|
+
display: flex;
|
|
494
|
+
justify-content: flex-end;
|
|
495
|
+
align-items: center;
|
|
496
|
+
margin-top: 16px;
|
|
497
|
+
}
|
|
498
|
+
`}}customElements.define("pb-dialog",Ae);class we extends(z(y)){static get styles(){return g`
|
|
476
499
|
:host {
|
|
477
500
|
display: block;
|
|
478
501
|
}
|
|
@@ -503,4 +526,4 @@ var F="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("
|
|
|
503
526
|
@license
|
|
504
527
|
Copyright (c) 2020 Vaadin Ltd.
|
|
505
528
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
506
|
-
*/;class Le{static detectScrollType(){const e=document.createElement("div");e.textContent="ABCD",e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e);let t="reverse";return e.scrollLeft>0?t="default":(e.scrollLeft=2,e.scrollLeft<2&&(t="negative")),document.body.removeChild(e),t}static getNormalizedScrollLeft(e,t,n){const{scrollLeft:o}=n;if("rtl"!==t||!e)return o;switch(e){case"negative":return n.scrollWidth-n.clientWidth+o;case"reverse":return n.scrollWidth-n.clientWidth-o}return o}static setNormalizedScrollLeft(e,t,n,o){if("rtl"===t&&e)switch(e){case"negative":n.scrollLeft=n.clientWidth-n.scrollWidth+o;break;case"reverse":n.scrollLeft=n.scrollWidth-n.clientWidth-o;break;default:n.scrollLeft=o}else n.scrollLeft=o}}const Be=[];let Fe;new MutationObserver((function(){const e=De();Be.forEach(t=>{Re(t,e)})})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Re=function(e,t){t?e.setAttribute("dir",t):e.removeAttribute("dir")},De=function(){return document.documentElement.getAttribute("dir")},Ne=e=>class extends e{static get properties(){return{dir:{type:String,readOnly:!0}}}static finalize(){super.finalize(),Fe||(Fe=Le.detectScrollType())}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")||(this.__subscribe(),Re(this,De()))}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),"dir"!==e)return;const o=n===De()&&-1===Be.indexOf(this),i=!n&&t&&-1===Be.indexOf(this),s=n!==De()&&t===De();o||i?(this.__subscribe(),Re(this,De())):s&&this.__subscribe(!1)}disconnectedCallback(){super.disconnectedCallback(),this.__subscribe(!1),this.removeAttribute("dir")}__subscribe(e=!0){e?-1===Be.indexOf(this)&&Be.push(this):Be.indexOf(this)>-1&&Be.splice(Be.indexOf(this),1)}__getNormalizedScrollLeft(e){return Le.getNormalizedScrollLeft(Fe,this.getAttribute("dir")||"ltr",e)}__setNormalizedScrollLeft(e,t){return Le.setNormalizedScrollLeft(Fe,this.getAttribute("dir")||"ltr",e,t)}},je=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Pe=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Me(){function e(){return!0}return Xe(e)}function Ue(){try{return!!Ge()||!!He()&&(Pe?!Ke():!Me())}catch(e){return!1}}function Ge(){return localStorage.getItem("vaadin.developmentmode.force")}function He(){return["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function Ke(){if(Pe){if(Object.keys(Pe).map(e=>Pe[e]).filter(e=>e.productionMode).length>0)return!0}return!1}function Xe(e,t){if("function"!=typeof e)return;const n=je.exec(e.toString());if(n)try{e=new Function(n[1])}catch(e){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",e)}return e(t)}window.Vaadin=window.Vaadin||{};const Ve=function(e,t){if(window.Vaadin.developmentMode)return Xe(e,t)};function Ye(){}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=Ue());const qe=function(){if("function"==typeof Ve)return Ve(Ye)};let Ze;window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations=window.Vaadin.registrations||[],window.Vaadin.developmentModeCallback=window.Vaadin.developmentModeCallback||{},window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){qe&&qe()};const Je=new Set,Qe=e=>class extends(Ne(e)){static finalize(){super.finalize();const{is:e}=this;e&&!Je.has(e)&&(window.Vaadin.registrations.push(this),Je.add(e),window.Vaadin.developmentModeCallback&&(Ze=u.debounce(Ze,
|
|
529
|
+
*/;class Le{static detectScrollType(){const e=document.createElement("div");e.textContent="ABCD",e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e);let t="reverse";return e.scrollLeft>0?t="default":(e.scrollLeft=2,e.scrollLeft<2&&(t="negative")),document.body.removeChild(e),t}static getNormalizedScrollLeft(e,t,n){const{scrollLeft:o}=n;if("rtl"!==t||!e)return o;switch(e){case"negative":return n.scrollWidth-n.clientWidth+o;case"reverse":return n.scrollWidth-n.clientWidth-o}return o}static setNormalizedScrollLeft(e,t,n,o){if("rtl"===t&&e)switch(e){case"negative":n.scrollLeft=n.clientWidth-n.scrollWidth+o;break;case"reverse":n.scrollLeft=n.scrollWidth-n.clientWidth-o;break;default:n.scrollLeft=o}else n.scrollLeft=o}}const Be=[];let Fe;new MutationObserver((function(){const e=De();Be.forEach(t=>{Re(t,e)})})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Re=function(e,t){t?e.setAttribute("dir",t):e.removeAttribute("dir")},De=function(){return document.documentElement.getAttribute("dir")},Ne=e=>class extends e{static get properties(){return{dir:{type:String,readOnly:!0}}}static finalize(){super.finalize(),Fe||(Fe=Le.detectScrollType())}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")||(this.__subscribe(),Re(this,De()))}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),"dir"!==e)return;const o=n===De()&&-1===Be.indexOf(this),i=!n&&t&&-1===Be.indexOf(this),s=n!==De()&&t===De();o||i?(this.__subscribe(),Re(this,De())):s&&this.__subscribe(!1)}disconnectedCallback(){super.disconnectedCallback(),this.__subscribe(!1),this.removeAttribute("dir")}__subscribe(e=!0){e?-1===Be.indexOf(this)&&Be.push(this):Be.indexOf(this)>-1&&Be.splice(Be.indexOf(this),1)}__getNormalizedScrollLeft(e){return Le.getNormalizedScrollLeft(Fe,this.getAttribute("dir")||"ltr",e)}__setNormalizedScrollLeft(e,t){return Le.setNormalizedScrollLeft(Fe,this.getAttribute("dir")||"ltr",e,t)}},je=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Pe=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Me(){function e(){return!0}return Xe(e)}function Ue(){try{return!!Ge()||!!He()&&(Pe?!Ke():!Me())}catch(e){return!1}}function Ge(){return localStorage.getItem("vaadin.developmentmode.force")}function He(){return["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function Ke(){if(Pe){if(Object.keys(Pe).map(e=>Pe[e]).filter(e=>e.productionMode).length>0)return!0}return!1}function Xe(e,t){if("function"!=typeof e)return;const n=je.exec(e.toString());if(n)try{e=new Function(n[1])}catch(e){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",e)}return e(t)}window.Vaadin=window.Vaadin||{};const Ve=function(e,t){if(window.Vaadin.developmentMode)return Xe(e,t)};function Ye(){}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=Ue());const qe=function(){if("function"==typeof Ve)return Ve(Ye)};let Ze;window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations=window.Vaadin.registrations||[],window.Vaadin.developmentModeCallback=window.Vaadin.developmentModeCallback||{},window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){qe&&qe()};const Je=new Set,Qe=e=>class extends(Ne(e)){static finalize(){super.finalize();const{is:e}=this;e&&!Je.has(e)&&(window.Vaadin.registrations.push(this),Je.add(e),window.Vaadin.developmentModeCallback&&(Ze=u.debounce(Ze,d,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()}),p(Ze)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}};export{Le as D,Qe as E,T as P,We as T,S as i,w as l,be as p,z as t};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teipublisher/pb-components",
|
|
3
|
-
"version": "2.26.0-next-3.
|
|
3
|
+
"version": "2.26.0-next-3.12",
|
|
4
4
|
"description": "Collection of webcomponents underlying TEI Publisher",
|
|
5
5
|
"repository": "https://github.com/eeditiones/tei-publisher-components.git",
|
|
6
6
|
"main": "index.html",
|
package/pb-elements.json
CHANGED
|
@@ -11921,6 +11921,11 @@
|
|
|
11921
11921
|
"description": "The view type to use for paginating the document. Either `page`, `div` or `single`.\nOverwrites the same property specified on `pb-document`. Values have the following meaning:\n\nValue | Displayed content\n------|------------------\n`page` | content is displayed page by page as determined by tei:pb\n`div` | content is displayed by divisions\n`single` | do not paginate but display entire content at once",
|
|
11922
11922
|
"type": "string"
|
|
11923
11923
|
},
|
|
11924
|
+
{
|
|
11925
|
+
"name": "fill",
|
|
11926
|
+
"description": "Controls the pagination-by-div algorithm: if a page would have less than\n`fill` elements, it tries to fill\nup the page by pulling following divs in. When set to 0, it will never\nattempt to fill up the page. For the annotation editor this should\nalways be 0.",
|
|
11927
|
+
"type": "number"
|
|
11928
|
+
},
|
|
11924
11929
|
{
|
|
11925
11930
|
"name": "node-id",
|
|
11926
11931
|
"description": "An eXist nodeId. If specified, selects the root of the fragment of the document\nwhich should be displayed. Normally this property is set automatically by pagination.",
|
|
@@ -12030,7 +12035,7 @@
|
|
|
12030
12035
|
},
|
|
12031
12036
|
{
|
|
12032
12037
|
"name": "no-scroll",
|
|
12033
|
-
"description": "If set, do not scroll the view to target node (e.g. given in URL hash)
|
|
12038
|
+
"description": "If set, do not scroll the view to target node (e.g. given in URL hash)\nafter content was loaded.",
|
|
12034
12039
|
"type": "boolean",
|
|
12035
12040
|
"default": "false"
|
|
12036
12041
|
},
|
|
@@ -12061,7 +12066,7 @@
|
|
|
12061
12066
|
},
|
|
12062
12067
|
{
|
|
12063
12068
|
"name": "wait-for",
|
|
12064
|
-
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.\n\n`pb-view` by default sets this property to select `pb-toggle-feature` and `pb-select-feature
|
|
12069
|
+
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.\n\n`pb-view` by default sets this property to select `pb-toggle-feature` and `pb-select-feature`\nelements.",
|
|
12065
12070
|
"type": "string"
|
|
12066
12071
|
},
|
|
12067
12072
|
{
|
|
@@ -12109,6 +12114,12 @@
|
|
|
12109
12114
|
"description": "The view type to use for paginating the document. Either `page`, `div` or `single`.\nOverwrites the same property specified on `pb-document`. Values have the following meaning:\n\nValue | Displayed content\n------|------------------\n`page` | content is displayed page by page as determined by tei:pb\n`div` | content is displayed by divisions\n`single` | do not paginate but display entire content at once",
|
|
12110
12115
|
"type": "string"
|
|
12111
12116
|
},
|
|
12117
|
+
{
|
|
12118
|
+
"name": "fill",
|
|
12119
|
+
"attribute": "fill",
|
|
12120
|
+
"description": "Controls the pagination-by-div algorithm: if a page would have less than\n`fill` elements, it tries to fill\nup the page by pulling following divs in. When set to 0, it will never\nattempt to fill up the page. For the annotation editor this should\nalways be 0.",
|
|
12121
|
+
"type": "number"
|
|
12122
|
+
},
|
|
12112
12123
|
{
|
|
12113
12124
|
"name": "nodeId",
|
|
12114
12125
|
"attribute": "node-id",
|
|
@@ -12244,7 +12255,7 @@
|
|
|
12244
12255
|
{
|
|
12245
12256
|
"name": "noScroll",
|
|
12246
12257
|
"attribute": "no-scroll",
|
|
12247
|
-
"description": "If set, do not scroll the view to target node (e.g. given in URL hash)
|
|
12258
|
+
"description": "If set, do not scroll the view to target node (e.g. given in URL hash)\nafter content was loaded.",
|
|
12248
12259
|
"type": "boolean",
|
|
12249
12260
|
"default": "false"
|
|
12250
12261
|
},
|
|
@@ -12281,7 +12292,7 @@
|
|
|
12281
12292
|
{
|
|
12282
12293
|
"name": "waitFor",
|
|
12283
12294
|
"attribute": "wait-for",
|
|
12284
|
-
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.\n\n`pb-view` by default sets this property to select `pb-toggle-feature` and `pb-select-feature
|
|
12295
|
+
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.\n\n`pb-view` by default sets this property to select `pb-toggle-feature` and `pb-select-feature`\nelements.",
|
|
12285
12296
|
"type": "string"
|
|
12286
12297
|
},
|
|
12287
12298
|
{
|
|
@@ -12418,6 +12429,11 @@
|
|
|
12418
12429
|
"description": "The view type to use for paginating the document. Either `page`, `div` or `single`.\nOverwrites the same property specified on `pb-document`. Values have the following meaning:\n\nValue | Displayed content\n------|------------------\n`page` | content is displayed page by page as determined by tei:pb\n`div` | content is displayed by divisions\n`single` | do not paginate but display entire content at once",
|
|
12419
12430
|
"type": "string"
|
|
12420
12431
|
},
|
|
12432
|
+
{
|
|
12433
|
+
"name": "fill",
|
|
12434
|
+
"description": "Controls the pagination-by-div algorithm: if a page would have less than\n`fill` elements, it tries to fill\nup the page by pulling following divs in. When set to 0, it will never\nattempt to fill up the page. For the annotation editor this should\nalways be 0.",
|
|
12435
|
+
"type": "number"
|
|
12436
|
+
},
|
|
12421
12437
|
{
|
|
12422
12438
|
"name": "node-id",
|
|
12423
12439
|
"description": "An eXist nodeId. If specified, selects the root of the fragment of the document\nwhich should be displayed. Normally this property is set automatically by pagination.",
|
|
@@ -12527,7 +12543,7 @@
|
|
|
12527
12543
|
},
|
|
12528
12544
|
{
|
|
12529
12545
|
"name": "no-scroll",
|
|
12530
|
-
"description": "If set, do not scroll the view to target node (e.g. given in URL hash)
|
|
12546
|
+
"description": "If set, do not scroll the view to target node (e.g. given in URL hash)\nafter content was loaded.",
|
|
12531
12547
|
"type": "boolean",
|
|
12532
12548
|
"default": "false"
|
|
12533
12549
|
},
|
|
@@ -12558,7 +12574,7 @@
|
|
|
12558
12574
|
},
|
|
12559
12575
|
{
|
|
12560
12576
|
"name": "wait-for",
|
|
12561
|
-
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.\n\n`pb-view` by default sets this property to select `pb-toggle-feature` and `pb-select-feature
|
|
12577
|
+
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.\n\n`pb-view` by default sets this property to select `pb-toggle-feature` and `pb-select-feature`\nelements.",
|
|
12562
12578
|
"type": "string"
|
|
12563
12579
|
},
|
|
12564
12580
|
{
|
|
@@ -12581,6 +12597,12 @@
|
|
|
12581
12597
|
"description": "The view type to use for paginating the document. Either `page`, `div` or `single`.\nOverwrites the same property specified on `pb-document`. Values have the following meaning:\n\nValue | Displayed content\n------|------------------\n`page` | content is displayed page by page as determined by tei:pb\n`div` | content is displayed by divisions\n`single` | do not paginate but display entire content at once",
|
|
12582
12598
|
"type": "string"
|
|
12583
12599
|
},
|
|
12600
|
+
{
|
|
12601
|
+
"name": "fill",
|
|
12602
|
+
"attribute": "fill",
|
|
12603
|
+
"description": "Controls the pagination-by-div algorithm: if a page would have less than\n`fill` elements, it tries to fill\nup the page by pulling following divs in. When set to 0, it will never\nattempt to fill up the page. For the annotation editor this should\nalways be 0.",
|
|
12604
|
+
"type": "number"
|
|
12605
|
+
},
|
|
12584
12606
|
{
|
|
12585
12607
|
"name": "nodeId",
|
|
12586
12608
|
"attribute": "node-id",
|
|
@@ -12716,7 +12738,7 @@
|
|
|
12716
12738
|
{
|
|
12717
12739
|
"name": "noScroll",
|
|
12718
12740
|
"attribute": "no-scroll",
|
|
12719
|
-
"description": "If set, do not scroll the view to target node (e.g. given in URL hash)
|
|
12741
|
+
"description": "If set, do not scroll the view to target node (e.g. given in URL hash)\nafter content was loaded.",
|
|
12720
12742
|
"type": "boolean",
|
|
12721
12743
|
"default": "false"
|
|
12722
12744
|
},
|
|
@@ -12753,7 +12775,7 @@
|
|
|
12753
12775
|
{
|
|
12754
12776
|
"name": "waitFor",
|
|
12755
12777
|
"attribute": "wait-for",
|
|
12756
|
-
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.\n\n`pb-view` by default sets this property to select `pb-toggle-feature` and `pb-select-feature
|
|
12778
|
+
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.\n\n`pb-view` by default sets this property to select `pb-toggle-feature` and `pb-select-feature`\nelements.",
|
|
12757
12779
|
"type": "string"
|
|
12758
12780
|
},
|
|
12759
12781
|
{
|
package/src/pb-dialog.js
CHANGED
|
@@ -64,7 +64,7 @@ export class PbDialog extends themableMixin(pbMixin(LitElement)) {
|
|
|
64
64
|
<article>
|
|
65
65
|
<header>
|
|
66
66
|
${this.title ? unsafeHTML(this.title) : html`<slot name="title"></slot>`}
|
|
67
|
-
<button rel="prev" aria-label="Close" @click="${this.closeDialog}"
|
|
67
|
+
<button rel="prev" aria-label="Close" @click="${this.closeDialog}"></button>
|
|
68
68
|
</header>
|
|
69
69
|
${this.message ? unsafeHTML(this.message) : html`<slot></slot>`}
|
|
70
70
|
<footer>
|
|
@@ -74,10 +74,37 @@ export class PbDialog extends themableMixin(pbMixin(LitElement)) {
|
|
|
74
74
|
</dialog>
|
|
75
75
|
`;
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
|
|
78
78
|
firstUpdated() {
|
|
79
79
|
this._dialog = this.renderRoot.querySelector('dialog');
|
|
80
80
|
}
|
|
81
|
+
|
|
82
|
+
static get styles() {
|
|
83
|
+
return css`
|
|
84
|
+
header {
|
|
85
|
+
display: flex;
|
|
86
|
+
justify-content: space-between;
|
|
87
|
+
align-items: center;
|
|
88
|
+
}
|
|
89
|
+
button[rel="prev"] {
|
|
90
|
+
display: block;
|
|
91
|
+
height: 1rem;
|
|
92
|
+
width: 1rem;
|
|
93
|
+
background-image: var(--pb-dialog-background-image, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E"));
|
|
94
|
+
background-position: center;
|
|
95
|
+
background-size: auto 1rem;
|
|
96
|
+
background-repeat: no-repeat;
|
|
97
|
+
background-color: transparent;
|
|
98
|
+
border: none;
|
|
99
|
+
}
|
|
100
|
+
footer {
|
|
101
|
+
display: flex;
|
|
102
|
+
justify-content: flex-end;
|
|
103
|
+
align-items: center;
|
|
104
|
+
margin-top: 16px;
|
|
105
|
+
}
|
|
106
|
+
`;
|
|
107
|
+
}
|
|
81
108
|
}
|
|
82
109
|
|
|
83
|
-
customElements.define('pb-dialog', PbDialog);
|
|
110
|
+
customElements.define('pb-dialog', PbDialog);
|