@things-factory/apptool-ui 6.0.104 → 6.0.107

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.
@@ -1,4 +1,5 @@
1
1
  import './layout/app-toolbar'
2
+ import './layout/app-busybar'
2
3
 
3
4
  import { html } from 'lit-html'
4
5
 
@@ -13,4 +14,13 @@ export default function bootstrap() {
13
14
  },
14
15
  position: VIEWPART_POSITION.HEADERBAR
15
16
  })
17
+
18
+ appendViewpart({
19
+ name: 'appbusybar',
20
+ viewpart: {
21
+ show: true,
22
+ template: html` <app-busybar></app-busybar> `
23
+ },
24
+ position: VIEWPART_POSITION.HEADERBAR
25
+ })
16
26
  }
@@ -0,0 +1,52 @@
1
+ import '@material/mwc-linear-progress'
2
+
3
+ import { css, html, LitElement } from 'lit'
4
+ import { connect } from 'pwa-helpers/connect-mixin.js'
5
+
6
+ import { store } from '@things-factory/shell'
7
+
8
+ class AppBusyBar extends connect(store)(LitElement) {
9
+ static get properties() {
10
+ return {
11
+ _busy: Boolean
12
+ }
13
+ }
14
+
15
+ static get styles() {
16
+ return [
17
+ css`
18
+ :host {
19
+ display: flex;
20
+ }
21
+
22
+ mwc-linear-progress {
23
+ flex: 1;
24
+ height: 2px;
25
+ }
26
+ `
27
+ ]
28
+ }
29
+
30
+ render() {
31
+ return this._busy ? html`<mwc-linear-progress indeterminate></mwc-linear-progress>` : html``
32
+ }
33
+
34
+ stateChanged(state) {
35
+ if (!state.busy.busy) {
36
+ this._busy = false
37
+ }
38
+
39
+ this._last_state = state.busy.busy
40
+
41
+ if (!this._timeout) {
42
+ this._timeout = setTimeout(() => {
43
+ if (this._last_state) {
44
+ this._busy = true
45
+ }
46
+ delete this._timeout
47
+ }, 500)
48
+ }
49
+ }
50
+ }
51
+
52
+ customElements.define('app-busybar', AppBusyBar)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/apptool-ui",
3
- "version": "6.0.104",
3
+ "version": "6.0.107",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -24,8 +24,10 @@
24
24
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
25
25
  },
26
26
  "dependencies": {
27
+ "@material/mwc-icon": "^0.27.0",
28
+ "@material/mwc-linear-progress": "^0.27.0",
27
29
  "@operato/layout": "^1.0.1",
28
- "@things-factory/apptool-base": "^6.0.104"
30
+ "@things-factory/apptool-base": "^6.0.107"
29
31
  },
30
- "gitHead": "c239d87b7e21262af03804064e01a6dc3a2e23fa"
32
+ "gitHead": "fa6d3ad23a445081db89b26e75a696fb46a38bd6"
31
33
  }