@teipublisher/pb-components 2.26.0-next-3.9 → 2.26.0-next-3.11

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/pb-elements.json CHANGED
@@ -2587,15 +2587,9 @@
2587
2587
  "path": "./src/pb-collapse.js",
2588
2588
  "description": "A collapsible block: in collapsed state it only shows a header and expands if clicked.\nThe header should go into slot `collapse-trigger`, the content into `collapse-content`.\nExample:\n\n```html\n<pb-collapse>\n <div slot=\"collapse-trigger\">\n Metadata\n </div>\n <pb-view slot=\"collapse-content\" src=\"document1\" subscribe=\"transcription\" xpath=\"//teiHeader\"></pb-view>\n</pb-collapse>\n```\n\nBy adding a CSS 'icon-right' to a `pb-collapse` the icon can be placed on the right side\n```\n<pb-collapse class='icon-right'>\n```",
2589
2589
  "attributes": [
2590
- {
2591
- "name": "horizontal",
2592
- "type": "boolean",
2593
- "default": "false",
2594
- "deprecatedMessage": "Corresponds to the iron-collapse's horizontal property."
2595
- },
2596
2590
  {
2597
2591
  "name": "no-animation",
2598
- "description": "Corresponds to the iron-collapse's noAnimation property.",
2592
+ "description": "Whether to disable animations.",
2599
2593
  "type": "boolean",
2600
2594
  "default": "false"
2601
2595
  },
@@ -2605,24 +2599,6 @@
2605
2599
  "type": "boolean",
2606
2600
  "default": "false"
2607
2601
  },
2608
- {
2609
- "name": "expand-icon",
2610
- "description": "The iron-icon when collapsed. Value must be one of the icons defined by iron-icons",
2611
- "type": "string",
2612
- "default": "\"icons:expand-more\""
2613
- },
2614
- {
2615
- "name": "collapse-icon",
2616
- "description": "The icon when expanded.",
2617
- "type": "string",
2618
- "default": "\"icons:expand-less\""
2619
- },
2620
- {
2621
- "name": "no-icons",
2622
- "description": "Whether to hide the expand/collapse icon.",
2623
- "type": "boolean",
2624
- "default": "false"
2625
- },
2626
2602
  {
2627
2603
  "name": "toggles",
2628
2604
  "description": "By default, an open collapse is closed if another pb-collapse is expanded on the same event channel.\nSet to true to keep multiple pb-collapse open at the same time.",
@@ -2664,15 +2640,13 @@
2664
2640
  "properties": [
2665
2641
  {
2666
2642
  "name": "horizontal",
2667
- "attribute": "horizontal",
2668
2643
  "type": "boolean",
2669
- "default": "false",
2670
- "deprecatedMessage": "Corresponds to the iron-collapse's horizontal property."
2644
+ "default": "false"
2671
2645
  },
2672
2646
  {
2673
2647
  "name": "noAnimation",
2674
2648
  "attribute": "no-animation",
2675
- "description": "Corresponds to the iron-collapse's noAnimation property.",
2649
+ "description": "Whether to disable animations.",
2676
2650
  "type": "boolean",
2677
2651
  "default": "false"
2678
2652
  },
@@ -2685,22 +2659,16 @@
2685
2659
  },
2686
2660
  {
2687
2661
  "name": "expandIcon",
2688
- "attribute": "expand-icon",
2689
- "description": "The iron-icon when collapsed. Value must be one of the icons defined by iron-icons",
2690
2662
  "type": "string",
2691
2663
  "default": "\"icons:expand-more\""
2692
2664
  },
2693
2665
  {
2694
2666
  "name": "collapseIcon",
2695
- "attribute": "collapse-icon",
2696
- "description": "The icon when expanded.",
2697
2667
  "type": "string",
2698
2668
  "default": "\"icons:expand-less\""
2699
2669
  },
2700
2670
  {
2701
2671
  "name": "noIcons",
2702
- "attribute": "no-icons",
2703
- "description": "Whether to hide the expand/collapse icon.",
2704
2672
  "type": "boolean",
2705
2673
  "default": "false"
2706
2674
  },
@@ -2768,8 +2736,17 @@
2768
2736
  "cssProperties": [
2769
2737
  {
2770
2738
  "name": "--pb-collapse-icon-padding",
2771
- "description": "padding in px for the \"caret-down\" icon left to the collapsible item",
2772
- "default": "\"0 4px 0 0\""
2739
+ "description": "padding left or right of the \"caret\" icon left to the collapsible item",
2740
+ "default": "\".5rem\""
2741
+ },
2742
+ {
2743
+ "name": "--pb-collapse-icon-size",
2744
+ "description": "size of the \"caret\" icon left to the collapsible item",
2745
+ "default": "\".75rem\""
2746
+ },
2747
+ {
2748
+ "name": "--pb-collapse-icon-image",
2749
+ "description": "image of the \"caret\" icon left to the collapsible item"
2773
2750
  }
2774
2751
  ]
2775
2752
  },
@@ -11944,6 +11921,11 @@
11944
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",
11945
11922
  "type": "string"
11946
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
+ },
11947
11929
  {
11948
11930
  "name": "node-id",
11949
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.",
@@ -12053,7 +12035,7 @@
12053
12035
  },
12054
12036
  {
12055
12037
  "name": "no-scroll",
12056
- "description": "If set, do not scroll the view to target node (e.g. given in URL hash) \nafter content was loaded.",
12038
+ "description": "If set, do not scroll the view to target node (e.g. given in URL hash)\nafter content was loaded.",
12057
12039
  "type": "boolean",
12058
12040
  "default": "false"
12059
12041
  },
@@ -12084,7 +12066,7 @@
12084
12066
  },
12085
12067
  {
12086
12068
  "name": "wait-for",
12087
- "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.",
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.",
12088
12070
  "type": "string"
12089
12071
  },
12090
12072
  {
@@ -12132,6 +12114,12 @@
12132
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",
12133
12115
  "type": "string"
12134
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
+ },
12135
12123
  {
12136
12124
  "name": "nodeId",
12137
12125
  "attribute": "node-id",
@@ -12267,7 +12255,7 @@
12267
12255
  {
12268
12256
  "name": "noScroll",
12269
12257
  "attribute": "no-scroll",
12270
- "description": "If set, do not scroll the view to target node (e.g. given in URL hash) \nafter content was loaded.",
12258
+ "description": "If set, do not scroll the view to target node (e.g. given in URL hash)\nafter content was loaded.",
12271
12259
  "type": "boolean",
12272
12260
  "default": "false"
12273
12261
  },
@@ -12304,7 +12292,7 @@
12304
12292
  {
12305
12293
  "name": "waitFor",
12306
12294
  "attribute": "wait-for",
12307
- "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.",
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.",
12308
12296
  "type": "string"
12309
12297
  },
12310
12298
  {
@@ -12441,6 +12429,11 @@
12441
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",
12442
12430
  "type": "string"
12443
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
+ },
12444
12437
  {
12445
12438
  "name": "node-id",
12446
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.",
@@ -12550,7 +12543,7 @@
12550
12543
  },
12551
12544
  {
12552
12545
  "name": "no-scroll",
12553
- "description": "If set, do not scroll the view to target node (e.g. given in URL hash) \nafter content was loaded.",
12546
+ "description": "If set, do not scroll the view to target node (e.g. given in URL hash)\nafter content was loaded.",
12554
12547
  "type": "boolean",
12555
12548
  "default": "false"
12556
12549
  },
@@ -12581,7 +12574,7 @@
12581
12574
  },
12582
12575
  {
12583
12576
  "name": "wait-for",
12584
- "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.",
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.",
12585
12578
  "type": "string"
12586
12579
  },
12587
12580
  {
@@ -12604,6 +12597,12 @@
12604
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",
12605
12598
  "type": "string"
12606
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
+ },
12607
12606
  {
12608
12607
  "name": "nodeId",
12609
12608
  "attribute": "node-id",
@@ -12739,7 +12738,7 @@
12739
12738
  {
12740
12739
  "name": "noScroll",
12741
12740
  "attribute": "no-scroll",
12742
- "description": "If set, do not scroll the view to target node (e.g. given in URL hash) \nafter content was loaded.",
12741
+ "description": "If set, do not scroll the view to target node (e.g. given in URL hash)\nafter content was loaded.",
12743
12742
  "type": "boolean",
12744
12743
  "default": "false"
12745
12744
  },
@@ -12776,7 +12775,7 @@
12776
12775
  {
12777
12776
  "name": "waitFor",
12778
12777
  "attribute": "wait-for",
12779
- "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.",
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.",
12780
12779
  "type": "string"
12781
12780
  },
12782
12781
  {
@@ -3,7 +3,6 @@ import {pbMixin} from './pb-mixin.js';
3
3
  import {themableMixin} from "./theming.js";
4
4
  import '@polymer/iron-icon';
5
5
  import '@polymer/iron-icons';
6
- import '@polymer/iron-collapse';
7
6
 
8
7
 
9
8
  /**
@@ -27,7 +26,9 @@ import '@polymer/iron-collapse';
27
26
  *
28
27
  * @slot collapse-trigger - trigger toggling collapsed content on/off
29
28
  * @slot collapse-content - content to be collapsed
30
- * @cssprop [--pb-collapse-icon-padding=0 4px 0 0] - padding in px for the "caret-down" icon left to the collapsible item
29
+ * @cssprop [--pb-collapse-icon-padding=.5rem] - padding left or right of the "caret" icon left to the collapsible item
30
+ * @cssprop [--pb-collapse-icon-size=.75rem] - size of the "caret" icon left to the collapsible item
31
+ * @cssprop [--pb-collapse-icon-image] - image of the "caret" icon left to the collapsible item
31
32
  * @fires pb-collapse-open - Fires opening the collapsed section
32
33
  */
33
34
  export class PbCollapse extends themableMixin(pbMixin(LitElement)) {
@@ -35,14 +36,7 @@ export class PbCollapse extends themableMixin(pbMixin(LitElement)) {
35
36
  return {
36
37
  ...super.properties,
37
38
  /**
38
- * @deprecated
39
- * Corresponds to the iron-collapse's horizontal property.
40
- */
41
- horizontal: {
42
- type: Boolean
43
- },
44
- /**
45
- * Corresponds to the iron-collapse's noAnimation property.
39
+ * Whether to disable animations.
46
40
  *
47
41
  */
48
42
  noAnimation: {
@@ -62,27 +56,6 @@ export class PbCollapse extends themableMixin(pbMixin(LitElement)) {
62
56
  */
63
57
  toggles: {
64
58
  type: Boolean
65
- },
66
- /**
67
- * The iron-icon when collapsed. Value must be one of the icons defined by iron-icons
68
- */
69
- expandIcon: {
70
- type: String,
71
- attribute: 'expand-icon'
72
- },
73
- /**
74
- * The icon when expanded.
75
- */
76
- collapseIcon: {
77
- type: String,
78
- attribute: 'collapse-icon'
79
- },
80
- /**
81
- * Whether to hide the expand/collapse icon.
82
- */
83
- noIcons: {
84
- type: Boolean,
85
- attribute: 'no-icons'
86
59
  }
87
60
  };
88
61
  }
@@ -118,6 +91,16 @@ export class PbCollapse extends themableMixin(pbMixin(LitElement)) {
118
91
  }
119
92
  }
120
93
 
94
+ updated(changedProperties) {
95
+ super.updated(changedProperties);
96
+ if (changedProperties.has('opened')) {
97
+ const details = this.shadowRoot.querySelector('details');
98
+ if (details) {
99
+ details.open = this.opened;
100
+ }
101
+ }
102
+ }
103
+
121
104
  /**
122
105
  * opens the collapsible section
123
106
  */
@@ -149,19 +132,21 @@ export class PbCollapse extends themableMixin(pbMixin(LitElement)) {
149
132
  }
150
133
  }
151
134
 
135
+ _handleToggle(e) {
136
+ e.preventDefault();
137
+ this.toggle();
138
+ }
139
+
152
140
  render() {
153
141
  return html`
154
- <div id="trigger" @click="${this.toggle}" class="collapse-trigger">
155
- ${
156
- !this.noIcons ?
157
- html`<iron-icon icon="${this.opened ? this.collapseIcon : this.expandIcon}"></iron-icon>` :
158
- null
159
- }
160
- <slot id="collapseTrigger" name="collapse-trigger"></slot>
161
- </div>
162
- <iron-collapse id="collapse" horizontal="${this.horizontal}" no-animation="${this.noAnimation}" .opened="${this.opened}">
163
- <slot name="collapse-content"></slot>
164
- </iron-collapse>
142
+ <details ?open="${this.opened}" class="${this.horizontal ? 'horizontal' : ''}">
143
+ <summary @click="${this._handleToggle}" class="collapse-trigger">
144
+ <slot id="collapseTrigger" name="collapse-trigger"></slot>
145
+ </summary>
146
+ <div class="collapse-content ${this.noAnimation ? 'no-animation' : ''}">
147
+ <slot name="collapse-content"></slot>
148
+ </div>
149
+ </details>
165
150
  `;
166
151
  }
167
152
 
@@ -172,21 +157,91 @@ export class PbCollapse extends themableMixin(pbMixin(LitElement)) {
172
157
  position: relative;
173
158
  }
174
159
 
175
- #trigger {
176
- display: grid;
177
- align-items:center;
178
- grid-template-columns:min-content auto;
160
+ details {
161
+ display: block;
179
162
  }
180
163
 
181
- iron-icon {
182
- padding: var(--pb-collapse-icon-padding, 0 4px 0 0);
164
+ summary {
165
+ display: inline-flex;
166
+ align-items: center;
167
+ cursor: pointer;
168
+ list-style: none;
169
+ outline: none;
170
+ cursor: pointer;
171
+ user-select: none;
172
+ gap: var(--pb-collapse-icon-padding, .5rem);
183
173
  }
184
174
 
185
- :host(.icon-right) iron-icon {
186
- position: absolute;
187
- right: 0;
175
+ :host(:not(.icon-right)) summary::before {
176
+ display: block;
177
+ content: "";
178
+ background-image: var(--pb-collapse-icon-image, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3E%3C/svg%3E"));
179
+ transform: none;
180
+ height: var(--pb-collapse-icon-size, .75rem);
181
+ width: var(--pb-collapse-icon-size, .75rem);
182
+ background-size: var(--pb-collapse-icon-size, .75rem) auto;
183
+ background-position: left center;
184
+ background-repeat: no-repeat;
188
185
  }
189
186
 
187
+ :host(.icon-right) summary::after {
188
+ display: block;
189
+ content: "";
190
+ background-image: var(--pb-collapse-icon-image, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3E%3C/svg%3E"));
191
+ transform: none;
192
+ height: var(--pb-collapse-icon-size, .75rem);
193
+ width: var(--pb-collapse-icon-size, .75rem);
194
+ background-size: var(--pb-collapse-icon-size, .75rem) auto;
195
+ background-position: right center;
196
+ background-repeat: no-repeat;
197
+ }
198
+
199
+ .dropdown-button[open]>summary::after {
200
+ transform: rotate(180deg);
201
+ }
202
+
203
+ .collapse-content {
204
+ overflow: hidden;
205
+ transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
206
+ }
207
+
208
+ .collapse-content.no-animation {
209
+ transition: none;
210
+ }
211
+
212
+ details[open] .collapse-content {
213
+ animation: slideDown 0.3s ease-in-out;
214
+ }
215
+
216
+ details:not([open]) .collapse-content {
217
+ animation: slideUp 0.3s ease-in-out;
218
+ }
219
+
220
+ .horizontal .collapse-content {
221
+ transition: max-width 0.3s ease-in-out, opacity 0.3s ease-in-out;
222
+ }
223
+
224
+ @keyframes slideDown {
225
+ from {
226
+ opacity: 0;
227
+ max-height: 0;
228
+ }
229
+ to {
230
+ opacity: 1;
231
+ max-height: 1000px;
232
+ }
233
+ }
234
+
235
+ @keyframes slideUp {
236
+ from {
237
+ opacity: 1;
238
+ max-height: 1000px;
239
+ }
240
+ to {
241
+ opacity: 0;
242
+ max-height: 0;
243
+ }
244
+ }
190
245
  `;
191
246
  }
192
247
  }
@@ -45,7 +45,7 @@ export class PbOddEditor extends pbHotkeys(pbMixin(LitElement)) {
45
45
  padding:0;
46
46
  height:auto;
47
47
  }
48
-
48
+
49
49
  #layout {
50
50
  width: 100%;
51
51
  display: grid;
@@ -131,15 +131,13 @@ export class PbOddEditor extends pbHotkeys(pbMixin(LitElement)) {
131
131
  white-space: nowrap;
132
132
  }
133
133
 
134
- /* todo: this doesn't work - should refactor to have the complete trigger exposed here (move out of pb-collapse) */
135
- pb-collapse#meta ::slotted(.collapse-trigger){
136
- /*height:56px;*/
134
+ details {
135
+ --details-transition-duration:0.8s;
137
136
  }
138
-
139
- iron-collapse {
140
- --iron-collapse-transition-duration:0.8s;
137
+ details[open] {
138
+ padding: 0;
141
139
  }
142
-
140
+
143
141
  pb-message#errorMsg{
144
142
  background: var(--paper-red-500);
145
143
  color:white;
@@ -148,19 +146,19 @@ export class PbOddEditor extends pbHotkeys(pbMixin(LitElement)) {
148
146
  height:100%;
149
147
  overflow:auto;
150
148
  }
151
-
149
+
152
150
  paper-tab{
153
151
  width:100px;
154
152
  }
155
-
153
+
156
154
  .editingView {
157
155
  width:100%;
158
156
  }
159
-
157
+
160
158
  vaadin-tabs{
161
159
  margin-top:10px;
162
160
  }
163
-
161
+
164
162
  vaadin-tab{
165
163
  background:var(--paper-grey-200);
166
164
  padding:0 6px;
@@ -300,7 +298,7 @@ export class PbOddEditor extends pbHotkeys(pbMixin(LitElement)) {
300
298
  handle-as="json" content-type="application/x-www-form-urlencoded"
301
299
  with-credentials
302
300
  method="GET"></iron-ajax>
303
-
301
+
304
302
  <iron-ajax id="saveOdd"
305
303
  handle-as="json"
306
304
  with-credentials></iron-ajax>
@@ -315,7 +313,7 @@ export class PbOddEditor extends pbHotkeys(pbMixin(LitElement)) {
315
313
  <pb-edit-xml id="editSource"><paper-icon-button icon="code" title="${translate('odd.editor.odd-source')}"></paper-icon-button></pb-edit-xml>
316
314
  <paper-icon-button @click="${() => this.save(true)}" icon="icons:cloud-download" title="${fsSupported ? translate('odd.editor.save-as'): translate('odd.editor.download')}"></paper-icon-button>
317
315
  <paper-icon-button @click="${this._reload}" icon="refresh" title="${translate('odd.editor.reload')}"></paper-icon-button>
318
- <paper-icon-button @click="${() => this.save(false)}" icon="save" title="${translate('odd.editor.save')} ${this.display('save')}"
316
+ <paper-icon-button @click="${() => this.save(false)}" icon="save" title="${translate('odd.editor.save')} ${this.display('save')}"
319
317
  ?disabled="${!this.loggedIn}"></paper-icon-button>
320
318
  </span>
321
319
  </h3>
@@ -328,7 +326,7 @@ export class PbOddEditor extends pbHotkeys(pbMixin(LitElement)) {
328
326
  <div id="jump-to">
329
327
  <paper-autocomplete id="jumpTo" label="${translate('odd.editor.jump-to')}" always-float-label="always-float-label"></paper-autocomplete>
330
328
  </div>
331
-
329
+
332
330
  <h3>${translate('odd.editor.specs')}</h3>
333
331
  </div>
334
332
  <div id="navlist">
@@ -340,7 +338,7 @@ export class PbOddEditor extends pbHotkeys(pbMixin(LitElement)) {
340
338
  `)}
341
339
  </div>
342
340
  <section class="specs" id="specs">
343
-
341
+
344
342
  <paper-card class="metadata">
345
343
  <pb-collapse id="meta">
346
344
  <h4 slot="collapse-trigger" class="panel-title">
@@ -372,21 +370,21 @@ export class PbOddEditor extends pbHotkeys(pbMixin(LitElement)) {
372
370
  </div>
373
371
  </pb-collapse>
374
372
  </paper-card>
375
-
373
+
376
374
  <!-- todo: import elementspec to make it function -->
377
-
375
+
378
376
  <div class="editingView">
379
377
  <vaadin-tabs id="tabs" selected="${this.tabIndex}">
380
378
  ${repeat(this.tabs, (i) => i.id, (i, index) =>
381
379
  html`
382
380
  <vaadin-tab name="${i}" @click="${(e) => this._selectTab(e, i)}"><span style="padding-right:20px;">${i}</span><paper-icon-button icon="close" @click="${(ev) => this._closeTabHandler(ev, index)}"></paper-icon-button></vaadin-tab>
383
- `)}
381
+ `)}
384
382
  </vaadin-tabs>
385
-
383
+
386
384
  <div id="currentElement"></div>
387
385
  </div>
388
386
  </section>
389
-
387
+
390
388
  </div>
391
389
 
392
390
 
@@ -921,7 +919,7 @@ export class PbOddEditor extends pbHotkeys(pbMixin(LitElement)) {
921
919
  "output-root": this.outputRoot,};
922
920
  saveOdd.body = data;
923
921
  }
924
-
922
+
925
923
  const request = saveOdd.generateRequest();
926
924
  request.completes
927
925
  .then((req) => {
@@ -956,9 +954,9 @@ export class PbOddEditor extends pbHotkeys(pbMixin(LitElement)) {
956
954
  document.dispatchEvent(new CustomEvent('pb-end-update'));
957
955
  return;
958
956
  }
959
-
957
+
960
958
  let msg;
961
-
959
+
962
960
  if (this.lessThanApiVersion('1.0.0')) {
963
961
  const report = data.report.map(PbOddEditor._renderReport);
964
962
  msg = `<div class="list-group">${report.join('')}</div>`;
@@ -966,9 +964,9 @@ export class PbOddEditor extends pbHotkeys(pbMixin(LitElement)) {
966
964
  const report = data.report;
967
965
  msg = `<div class="list-group">${report}</div>`;
968
966
  }
969
-
967
+
970
968
  this.shadowRoot.getElementById('dialog').set(i18n("odd.editor.saved"), msg);
971
-
969
+
972
970
  this._hasChanges = false;
973
971
  document.dispatchEvent(new CustomEvent('pb-end-update'));
974
972
 
@@ -12,7 +12,7 @@ import '@polymer/paper-menu-button/paper-menu-button';
12
12
  import '@polymer/paper-listbox/paper-listbox';
13
13
  import '@polymer/paper-styles/color';
14
14
  import '@polymer/paper-item/paper-item';
15
- import '@polymer/iron-collapse/iron-collapse';
15
+
16
16
  import './pb-message.js';
17
17
  import './pb-odd-model-editor.js';
18
18
 
@@ -95,8 +95,8 @@ export class PbOddElementspecEditor extends LitElement {
95
95
  }
96
96
 
97
97
  /*todo: this does not take effect*/
98
- iron-collapse.models{
99
- --iron-collapse-transition-duration:0.4s;
98
+ details.models{
99
+ --details-transition-duration:0.4s;
100
100
  }
101
101
 
102
102
  .models{