@things-factory/export-ui 7.0.1-alpha.14 → 7.0.1-alpha.19
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/client/bootstrap.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
import './templates/export-overlay-template'
|
|
3
3
|
|
|
4
4
|
import { html } from 'lit-html'
|
|
@@ -18,7 +18,7 @@ export default function bootstrap() {
|
|
|
18
18
|
type: APPEND_CONTEXT_TOOL,
|
|
19
19
|
tool: {
|
|
20
20
|
position: TOOL_POSITION.FRONT,
|
|
21
|
-
template: html` <
|
|
21
|
+
template: html` <md-icon @click=${openContextToolbarOverlay}>download</md-icon> `,
|
|
22
22
|
context: 'exportable'
|
|
23
23
|
}
|
|
24
24
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
|
|
3
3
|
import { LitElement, css, html } from 'lit'
|
|
4
4
|
import { connect } from 'pwa-helpers'
|
|
@@ -23,12 +23,7 @@ class ExportOverlayTemplate extends connect(store)(LitElement) {
|
|
|
23
23
|
render() {
|
|
24
24
|
const extensions = []
|
|
25
25
|
const exportable = this._context.exportable || {}
|
|
26
|
-
const accept =
|
|
27
|
-
exportable.accept instanceof Array
|
|
28
|
-
? exportable.accept
|
|
29
|
-
: typeof exportable.accept == 'string'
|
|
30
|
-
? [exportable.accept]
|
|
31
|
-
: null
|
|
26
|
+
const accept = exportable.accept instanceof Array ? exportable.accept : typeof exportable.accept == 'string' ? [exportable.accept] : null
|
|
32
27
|
|
|
33
28
|
for (let extension in this._extensions) {
|
|
34
29
|
if (!accept || accept.indexOf(extension) != -1) {
|
|
@@ -42,7 +37,7 @@ class ExportOverlayTemplate extends connect(store)(LitElement) {
|
|
|
42
37
|
(extension, idx) => html`
|
|
43
38
|
<label for="${idx}">
|
|
44
39
|
<li @click=${e => this._export(extension)}>
|
|
45
|
-
<
|
|
40
|
+
<md-icon>description</md-icon>
|
|
46
41
|
<span>${extension}</span>
|
|
47
42
|
</li>
|
|
48
43
|
</label>
|
|
@@ -61,9 +56,7 @@ class ExportOverlayTemplate extends connect(store)(LitElement) {
|
|
|
61
56
|
}
|
|
62
57
|
})
|
|
63
58
|
|
|
64
|
-
this.dispatchEvent(
|
|
65
|
-
new CustomEvent('close-overlay', { detail: { name: 'export-overlay-template', bubbles: true, composed: true } })
|
|
66
|
-
)
|
|
59
|
+
this.dispatchEvent(new CustomEvent('close-overlay', { detail: { name: 'export-overlay-template', bubbles: true, composed: true } }))
|
|
67
60
|
}
|
|
68
61
|
|
|
69
62
|
stateChanged(state) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/export-ui",
|
|
3
|
-
"version": "7.0.1-alpha.
|
|
3
|
+
"version": "7.0.1-alpha.19",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@operato/layout": "^2.0.0-alpha.0",
|
|
28
|
-
"@things-factory/context-ui": "^7.0.1-alpha.
|
|
29
|
-
"@things-factory/export-base": "^7.0.1-alpha.
|
|
28
|
+
"@things-factory/context-ui": "^7.0.1-alpha.19",
|
|
29
|
+
"@things-factory/export-base": "^7.0.1-alpha.19"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "1f7eeff99b319b84ad9e73c5e71c07e76336a648"
|
|
32
32
|
}
|