@things-factory/shell 7.0.1-alpha.28 → 7.0.1-alpha.33

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/route.js CHANGED
@@ -1,3 +1,14 @@
1
+ /**
2
+ * This is the place where the PageElement matching from the contextPath is finally searched.
3
+ * If it has reached here, it means that the PageElement matching the path has not been found, so it returns the page name 'page404'.
4
+ * This page displays the Page404 Element implementing the tag name 'page-404'.
5
+ * Naturally, the mapping implementation for the 'page404' page can be overridden in the parent module.
6
+ *
7
+ * 여기는 contextPath로부터 매칭되는 PageElement를 과정에서 맨 마직막에 뒤져지는 곳이다.
8
+ * 여기까지 들어왔다면, path에 매핑되는 PageElement를 찾지 못한 것이므로, 페이지 이름 'page404' 를 리턴한다.
9
+ * 이 페이지는 태그네임 'page-404'를 구현한 Page404 Element를 보여주게 된다.
10
+ * 당연히 상위 모듈에서 'page404' 페이지에 대한 매핑 구현을 오버라이드 할 수 있다.
11
+ */
1
12
  export default function route(page) {
2
13
  import('@operato/shell/page-404.js')
3
14
  return 'page404'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/shell",
3
- "version": "7.0.1-alpha.28",
3
+ "version": "7.0.1-alpha.33",
4
4
  "description": "Core module for framework",
5
5
  "bin": {
6
6
  "things-factory": "bin/things-factory",
@@ -59,11 +59,11 @@
59
59
  "@operato/shell": "^2.0.0-alpha.0",
60
60
  "@operato/typeorm-history": "^2.0.0-alpha.0",
61
61
  "@operato/utils": "^2.0.0-alpha.0",
62
- "@things-factory/ejs-remote": "^7.0.1-alpha.28",
63
- "@things-factory/env": "^7.0.1-alpha.28",
62
+ "@things-factory/ejs-remote": "^7.0.1-alpha.29",
63
+ "@things-factory/env": "^7.0.1-alpha.29",
64
64
  "@things-factory/operato-license-checker": "^4.0.4",
65
- "@things-factory/styles": "^7.0.1-alpha.28",
66
- "@things-factory/utils": "^7.0.1-alpha.28",
65
+ "@things-factory/styles": "^7.0.1-alpha.29",
66
+ "@things-factory/utils": "^7.0.1-alpha.29",
67
67
  "@webcomponents/scoped-custom-element-registry": "^0.0.9",
68
68
  "@webcomponents/webcomponentsjs": "^2.6.0",
69
69
  "args": "^5.0.0",
@@ -134,5 +134,5 @@
134
134
  "pg": "^8.7.3",
135
135
  "sqlite3": "^5.0.8"
136
136
  },
137
- "gitHead": "a7d650636abe1cdfbad71b7f445b48fdfee5f4be"
137
+ "gitHead": "46c2d83fcb20d9882254e25bc61dcbf5db31959b"
138
138
  }
@@ -1,3 +0,0 @@
1
- export * from './oops-note'
2
- export * from './oops-spinner'
3
- export * from './oops-progress'
@@ -1,49 +0,0 @@
1
- import { LitElement, html, css } from 'lit'
2
-
3
- import '@material/mwc-icon'
4
-
5
- export class OopsNote extends LitElement {
6
- static get styles() {
7
- return css`
8
- :host {
9
- display: block;
10
- text-align: center;
11
- }
12
- mwc-icon {
13
- font: var(--oops-note-icon-font);
14
- color: var(--oops-note-icon-color);
15
- border: var(--oops-note-icon-border);
16
- border-radius: var(--oops-note-icon-border-radius);
17
- padding: var(--oops-note-icon-padding);
18
- }
19
- [title] {
20
- margin: var(--oops-note-title-margin);
21
- font: var(--oops-note-title-font);
22
- color: var(--oops-note-title-color);
23
- text-transform: capitalize;
24
- }
25
- [description] {
26
- font: var(--oops-note-description-font);
27
- color: var(--oops-note-description-color);
28
- }
29
- `
30
- }
31
-
32
- static get properties() {
33
- return {
34
- icon: String,
35
- title: String,
36
- description: String
37
- }
38
- }
39
-
40
- render() {
41
- return html`
42
- <mwc-icon>${this.icon}</mwc-icon>
43
- <div title>${this.title}</div>
44
- <div description>${this.description}</div>
45
- `
46
- }
47
- }
48
-
49
- customElements.define('oops-note', OopsNote)
@@ -1,81 +0,0 @@
1
- import gql from 'graphql-tag'
2
- import { html, LitElement } from 'lit'
3
-
4
- import { subscribe } from '@operato/graphql'
5
-
6
- export class OopsProgress extends LitElement {
7
- static get properties() {
8
- return {
9
- tag: String,
10
- subscription: Boolean
11
- }
12
- }
13
-
14
- render() {
15
- return html` <slot></slot> `
16
- }
17
-
18
- disconnectedCallback() {
19
- super.disconnectedCallback()
20
- this.stopSubscribe()
21
- }
22
-
23
- get subscription() {
24
- return this._subscription
25
- }
26
-
27
- set subscription(subscription) {
28
- console.warn('oops-progress#subscription is readonly property')
29
- }
30
-
31
- async updated(changes) {
32
- if (changes.has('tag') && this.subscription) {
33
- await this.stopSubscribe()
34
- }
35
- }
36
-
37
- async startSubscribe() {
38
- if (!this.tag || this._subscription) {
39
- return
40
- }
41
-
42
- this._subscription = await subscribe(
43
- {
44
- query: gql`
45
- subscription {
46
- data(tag: "${this.tag}") {
47
- tag
48
- data
49
- }
50
- }`
51
- },
52
- {
53
- next: async ({ data }) => {
54
- if (data) {
55
- const { progress = 0, message = '' } = data?.data?.data || {}
56
- this.dispatchEvent(
57
- new CustomEvent('progress', {
58
- detail: {
59
- progress,
60
- message
61
- }
62
- })
63
- )
64
-
65
- if (progress >= 100) {
66
- await this.stopSubscribe()
67
- this.dispatchEvent(new CustomEvent('finish'))
68
- }
69
- }
70
- }
71
- }
72
- )
73
- }
74
-
75
- async stopSubscribe() {
76
- await this._subscription?.unsubscribe()
77
- delete this._subscription
78
- }
79
- }
80
-
81
- customElements.define('oops-progress', OopsProgress)
@@ -1,31 +0,0 @@
1
- import { LitElement, html, css } from 'lit'
2
-
3
- export class OopsSpinner extends LitElement {
4
- static get styles() {
5
- return css`
6
- :host {
7
- width: 70px;
8
- height: 70px;
9
- margin: 0 auto;
10
- background: url(/assets/images/spinner.png) 0 0 no-repeat;
11
- background-size: 700%;
12
- animation: spinner steps(6) 2s infinite both;
13
- }
14
-
15
- @keyframes spinner {
16
- 0% {
17
- background-position: 0%;
18
- }
19
- 100% {
20
- background-position: 100%;
21
- }
22
- }
23
- `
24
- }
25
-
26
- render() {
27
- return html``
28
- }
29
- }
30
-
31
- customElements.define('oops-spinner', OopsSpinner)