File tree Expand file tree Collapse file tree 5 files changed +61
-1
lines changed
test/integration/__snapshots__ Expand file tree Collapse file tree 5 files changed +61
-1
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,15 @@ export const officialPlugins = [
82
82
requireDoc : false ,
83
83
position : 'top'
84
84
} ,
85
+ {
86
+ name : 'Import from API' ,
87
+ src : '/src/menu/CompasImportFromLiander.js' ,
88
+ icon : 'create_new_folder' ,
89
+ default : false ,
90
+ kind : 'menu' ,
91
+ requireDoc : false ,
92
+ position : 'top'
93
+ } ,
85
94
{
86
95
name : 'Save project' ,
87
96
src : '/src/menu/CompasSave.js' ,
Original file line number Diff line number Diff line change
1
+ import { html , LitElement } from 'lit-element' ;
2
+ import { get } from 'lit-translate' ;
3
+
4
+ import '../filtered-list.js' ;
5
+ import '../wizard-textfield.js' ;
6
+ import {
7
+ newWizardEvent ,
8
+ Wizard ,
9
+ } from '../foundation.js' ;
10
+
11
+ export default class ImportFromApiPlugin extends LitElement {
12
+ private importFromApiWizard ( ) : Wizard {
13
+ return [
14
+ {
15
+ title : get ( 'compas.import.title' ) ,
16
+ content : [
17
+ html `< filtered-list >
18
+
19
+ </ filtered-list > ` ,
20
+ ] ,
21
+ } ,
22
+ ] ;
23
+ }
24
+
25
+ async run ( ) : Promise < void > {
26
+ document
27
+ . querySelector ( 'open-scd' )
28
+ ?. dispatchEvent ( newWizardEvent ( this . importFromApiWizard ( ) ) ) ;
29
+ }
30
+ }
Original file line number Diff line number Diff line change @@ -567,6 +567,9 @@ export const de: Translations = {
567
567
minor : '???' ,
568
568
patch : '???' ,
569
569
} ,
570
+ import : {
571
+ title : '???'
572
+ } ,
570
573
open : {
571
574
title : '???' ,
572
575
localTitle : '???' ,
Original file line number Diff line number Diff line change @@ -563,6 +563,9 @@ export const en = {
563
563
minor : 'Minor change' ,
564
564
patch : 'Patch change' ,
565
565
} ,
566
+ import : {
567
+ title : 'Import from API'
568
+ } ,
566
569
open : {
567
570
title : 'Open project' ,
568
571
localTitle : 'Local' ,
Original file line number Diff line number Diff line change 1
1
/* @web /test-runner snapshot v1 */
2
2
export const snapshots = { } ;
3
3
4
- snapshots [ "open-scd looks like its snapshot" ] =
4
+ snapshots [ "open-scd looks like its snapshot" ] =
5
5
`<mwc-drawer
6
6
class="mdc-theme--surface"
7
7
hasheader=""
@@ -850,6 +850,21 @@ snapshots["open-scd looks like its snapshot"] =
850
850
</mwc-icon>
851
851
Project from CIM
852
852
</mwc-check-list-item>
853
+ <mwc-check-list-item
854
+ aria-disabled="false"
855
+ class="official"
856
+ graphic="control"
857
+ hasmeta=""
858
+ left=""
859
+ mwc-list-item=""
860
+ tabindex="-1"
861
+ value="/src/menu/CompasImportFromLiander.js"
862
+ >
863
+ <mwc-icon slot="meta">
864
+ create_new_folder
865
+ </mwc-icon>
866
+ Import from API
867
+ </mwc-check-list-item>
853
868
<mwc-check-list-item
854
869
aria-disabled="false"
855
870
class="official"
You can’t perform that action at this time.
0 commit comments