@things-factory/shell 4.2.12 → 4.3.0
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/app/app-style.js +2 -1
- package/client/app/app.js +26 -6
- package/client/app/pages/page-404.js +1 -1
- package/client/elements/oops-note.js +1 -1
- package/client/elements/oops-progress.js +1 -1
- package/client/elements/oops-spinner.js +1 -1
- package/client/entries/public/home.js +1 -1
- package/package.json +12 -11
package/client/app/app-style.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { css } from 'lit
|
1
|
+
import { css } from 'lit'
|
2
2
|
|
3
3
|
export const AppStyle = css`
|
4
4
|
:host {
|
@@ -9,6 +9,7 @@ export const AppStyle = css`
|
|
9
9
|
grid-template-areas: var(--app-grid-template-area, 'header header header' 'nav main aside' 'nav footer aside');
|
10
10
|
grid-gap: var(--app-grid-gap, 0em);
|
11
11
|
|
12
|
+
max-width: 100vw;
|
12
13
|
width: 100vw;
|
13
14
|
height: 100vh;
|
14
15
|
}
|
package/client/app/app.js
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
import '@operato/layout'
|
2
2
|
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import { installRouter } from 'pwa-helpers/router.js'
|
3
|
+
import { LitElement, html } from 'lit'
|
4
|
+
import { UPDATE_ACTIVE_PAGE, UPDATE_CONTEXT_PATH, UPDATE_MODULES, navigateWithSilence, store } from '@operato/shell'
|
6
5
|
|
7
|
-
import {
|
6
|
+
import { AppStyle } from './app-style'
|
8
7
|
import { ScrollbarStyles } from '@operato/styles'
|
8
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
9
9
|
import { getPathInfo } from '@operato/utils'
|
10
|
-
|
11
|
-
import
|
10
|
+
import { installRouter } from 'pwa-helpers/router.js'
|
11
|
+
import throttle from 'lodash-es/throttle'
|
12
12
|
|
13
13
|
class ThingsApp extends connect(store)(LitElement) {
|
14
14
|
static get properties() {
|
@@ -56,6 +56,8 @@ class ThingsApp extends connect(store)(LitElement) {
|
|
56
56
|
connectedCallback() {
|
57
57
|
super.connectedCallback()
|
58
58
|
|
59
|
+
window.addEventListener('resize', () => this.resized())
|
60
|
+
|
59
61
|
/* 모듈 임포트를 동적으로 처리한다. */
|
60
62
|
import(
|
61
63
|
/* webpackPrefetch: true */
|
@@ -111,6 +113,22 @@ class ThingsApp extends connect(store)(LitElement) {
|
|
111
113
|
this.setBase()
|
112
114
|
}
|
113
115
|
|
116
|
+
resized() {
|
117
|
+
if (!this._throttledResize) {
|
118
|
+
this._throttledResize = throttle(() => {
|
119
|
+
const aside = this.renderRoot.querySelector('ox-aside-bar').clientWidth
|
120
|
+
const nav = this.renderRoot.querySelector('ox-nav-bar').clientWidth
|
121
|
+
|
122
|
+
this.style.setProperty(
|
123
|
+
'--app-grid-template-columns',
|
124
|
+
`auto minmax(calc(100vw - ${aside}px - ${nav}px), 1fr) auto`
|
125
|
+
)
|
126
|
+
}, 100)
|
127
|
+
}
|
128
|
+
|
129
|
+
this._throttledResize()
|
130
|
+
}
|
131
|
+
|
114
132
|
routeToPage() {
|
115
133
|
let activePages = this.shadowRoot.querySelectorAll('main > .page[active]')
|
116
134
|
activePages.forEach(page => {
|
@@ -165,6 +183,8 @@ class ThingsApp extends connect(store)(LitElement) {
|
|
165
183
|
if (changedProps.has('_contextPath')) {
|
166
184
|
this.setBase()
|
167
185
|
}
|
186
|
+
|
187
|
+
this.resized()
|
168
188
|
}
|
169
189
|
|
170
190
|
shouldUpdate() {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@things-factory/shell",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.3.0",
|
4
4
|
"description": "Core module for framework",
|
5
5
|
"bin": {
|
6
6
|
"things-factory": "bin/things-factory",
|
@@ -44,16 +44,16 @@
|
|
44
44
|
"@material/mwc-icon-button": "^0.25.3",
|
45
45
|
"@material/mwc-slider": "^0.25.3",
|
46
46
|
"@material/mwc-textfield": "^0.25.3",
|
47
|
-
"@operato/board": "^0.3
|
48
|
-
"@operato/graphql": "^0.3
|
49
|
-
"@operato/help": "^0.3
|
50
|
-
"@operato/layout": "^0.3
|
51
|
-
"@operato/shell": "^0.3
|
52
|
-
"@operato/utils": "^0.3
|
47
|
+
"@operato/board": "^0.4.3",
|
48
|
+
"@operato/graphql": "^0.4.3",
|
49
|
+
"@operato/help": "^0.4.3",
|
50
|
+
"@operato/layout": "^0.4.3",
|
51
|
+
"@operato/shell": "^0.4.3",
|
52
|
+
"@operato/utils": "^0.4.3",
|
53
53
|
"@things-factory/ejs-remote": "^4.1.40",
|
54
54
|
"@things-factory/env": "^4.1.40",
|
55
|
-
"@things-factory/styles": "^4.
|
56
|
-
"@things-factory/utils": "^4.
|
55
|
+
"@things-factory/styles": "^4.3.0",
|
56
|
+
"@things-factory/utils": "^4.3.0",
|
57
57
|
"@webcomponents/webcomponentsjs": "^2.6.0",
|
58
58
|
"@webpack-contrib/schema-utils": "^1.0.0-beta.0",
|
59
59
|
"apollo-server-core": "^3.5.0",
|
@@ -92,9 +92,10 @@
|
|
92
92
|
"koa-static": "^5.0.0",
|
93
93
|
"koa-unless": "^1.0.7",
|
94
94
|
"koa2-connect-history-api-fallback": "^0.1.2",
|
95
|
-
"lit": "^2.0
|
95
|
+
"lit": "^2.2.0",
|
96
96
|
"loader-utils": "^2.0.0",
|
97
97
|
"lodash": "^4.17.15",
|
98
|
+
"lodash-es": "^4.17.15",
|
98
99
|
"mkdirp": "^1.0.3",
|
99
100
|
"mqtt": "^4.3.4",
|
100
101
|
"node-fetch": "^2.6.0",
|
@@ -128,5 +129,5 @@
|
|
128
129
|
"resolutions": {
|
129
130
|
"core-js": "^3.16.0"
|
130
131
|
},
|
131
|
-
"gitHead": "
|
132
|
+
"gitHead": "772c8e6f56a3dda655ad49f7018a49a37e081ee8"
|
132
133
|
}
|