@things-factory/apptool-ui 6.1.115 → 6.1.118

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/apptool-ui",
3
- "version": "6.1.115",
3
+ "version": "6.1.118",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -30,8 +30,8 @@
30
30
  "@material/mwc-icon": "^0.27.0",
31
31
  "@material/mwc-linear-progress": "^0.27.0",
32
32
  "@operato/layout": "^1.0.1",
33
- "@things-factory/apptool-base": "^6.1.115",
34
- "@things-factory/setting-base": "^6.1.115"
33
+ "@things-factory/apptool-base": "^6.1.118",
34
+ "@things-factory/setting-base": "^6.1.118"
35
35
  },
36
- "gitHead": "3677982365595b0f3a8ec26e47c234878ecbb910"
36
+ "gitHead": "ea96bacb831bdc751bd1962a9d73a7d8abf0e304"
37
37
  }
@@ -1 +0,0 @@
1
- import '@material/mwc-icon';
@@ -1,136 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import '@material/mwc-icon';
3
- import { css, html, LitElement } from 'lit';
4
- import { customElement, state } from 'lit/decorators.js';
5
- import { connect } from 'pwa-helpers/connect-mixin.js';
6
- import { navigate, store, PageView } from '@operato/shell';
7
- let AppMDIBar = class AppMDIBar extends connect(store)(LitElement) {
8
- constructor() {
9
- super(...arguments);
10
- this.pages = [];
11
- this.title = '';
12
- }
13
- render() {
14
- const pages = this.pages || [];
15
- return html `
16
- <div home><mwc-icon>home</mwc-icon></div>
17
-
18
- ${pages.map((page, idx) => {
19
- var _a;
20
- const context = page.context;
21
- const title = (context === null || context === void 0 ? void 0 : context.title) || ((_a = context === null || context === void 0 ? void 0 : context.search) === null || _a === void 0 ? void 0 : _a.placeholder) || '';
22
- return html `
23
- <div @click=${() => this.moveTo(page)} ?active=${this.activePage === page}>
24
- ${title}
25
- <mwc-icon
26
- @click=${(e) => {
27
- e.stopPropagation();
28
- this.closePage(page, idx);
29
- }}
30
- >close</mwc-icon
31
- >
32
- </div>
33
- `;
34
- })}
35
- `;
36
- }
37
- updated(changed) {
38
- if (changed.has('activePage')) {
39
- const page = this.activePage;
40
- if (!this.pages) {
41
- this.pages = [];
42
- }
43
- if (!this.pages.includes(page)) {
44
- this.pages = [...this.pages, page];
45
- }
46
- }
47
- }
48
- stateChanged(state) {
49
- var _a;
50
- const { context, activePage } = state.route || {};
51
- this.activePage = activePage;
52
- /* refresh를 일으키기위한 property 변경을 위한 코드임. */
53
- this.title = context.title || ((_a = context.search) === null || _a === void 0 ? void 0 : _a.placeholder);
54
- }
55
- getHomeRoute() {
56
- var base = document.querySelector('base');
57
- return (base === null || base === void 0 ? void 0 : base.getAttribute('href')) || '/';
58
- }
59
- moveTo(page) {
60
- navigate(page.getAttribute('data-page'));
61
- }
62
- closePage(page, idx) {
63
- var _a;
64
- this.pages = [...this.pages.slice(0, idx), ...this.pages.slice(idx + 1)];
65
- (_a = page.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(page);
66
- page.pageDispose();
67
- if (this.activePage === page) {
68
- const next = this.pages.length > 0 ? Math.max(0, idx - 1) : -1;
69
- navigate(next != -1 ? this.pages[next].getAttribute('data-page') : this.getHomeRoute());
70
- }
71
- }
72
- };
73
- AppMDIBar.styles = [
74
- css `
75
- :host {
76
- display: flex;
77
- background-color: var(--main-section-background-color);
78
- color: var(--mdibar-color, rgba(0, 0, 0, 0.7));
79
- font-size: var(--fontsize-small);
80
- }
81
-
82
- div {
83
- display: inline-block;
84
- position: relative;
85
- max-width: var(--mdibar-max-width, 120px);
86
- padding: var(--mdibar-padding, 3px 22px 0 5px);
87
- border-right: var(--border-dark-color);
88
- border-bottom: var(--border-dark-color);
89
- white-space: nowrap;
90
- overflow: hidden;
91
- text-overflow: ellipsis;
92
- }
93
-
94
- mwc-icon {
95
- position: absolute;
96
- right: 2px;
97
- top: 3px;
98
- margin-left: var(--margin-narrow);
99
- font-size: var(--mdibar-icon-size, 18px);
100
- opacity: 0.5;
101
- }
102
- mwc-icon:hover {
103
- opacity: 0.8;
104
- color: var(--mdibar-hover-color, #cc3300);
105
- }
106
-
107
- [active] {
108
- background-color: var(--mdibar-background-color, #fff);
109
- border-bottom: 1px solid var(--mdibar-background-color, #fff);
110
- color: var(--primary-text-color);
111
- font-weight: bold;
112
- }
113
- [home] {
114
- padding: var(--mdibar-padding-home, 3px 5px 0 23px);
115
- }
116
- [home] mwc-icon {
117
- left: 0;
118
- }
119
- `
120
- ];
121
- __decorate([
122
- state(),
123
- __metadata("design:type", Array)
124
- ], AppMDIBar.prototype, "pages", void 0);
125
- __decorate([
126
- state(),
127
- __metadata("design:type", PageView)
128
- ], AppMDIBar.prototype, "activePage", void 0);
129
- __decorate([
130
- state(),
131
- __metadata("design:type", String)
132
- ], AppMDIBar.prototype, "title", void 0);
133
- AppMDIBar = __decorate([
134
- customElement('app-mdibar')
135
- ], AppMDIBar);
136
- //# sourceMappingURL=app-mdibar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-mdibar.js","sourceRoot":"","sources":["../../client/layout/app-mdibar.ts"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAEtD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAG1D,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IAAlD;;QAkDW,UAAK,GAAe,EAAE,CAAA;QAEtB,UAAK,GAAW,EAAE,CAAA;IAsE7B,CAAC;IApEC,MAAM;QACJ,MAAM,K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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6CF;CACF,CAAA;AAED;IAAC,KAAK,EAAE;;wCAAuB;AAC/B;IAAC,KAAK,EAAE;8BAAc,QAAQ;6CAAA;AAC9B;IAAC,KAAK,EAAE;;wCAAmB;AApDvB,SAAS;IADd,aAAa,CAAC,YAAY,CAAC;GACtB,SAAS,CA0Hd","sourcesContent":["import '@material/mwc-icon'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\nimport { connect } from 'pwa-helpers/connect-mixin.js'\n\nimport { navigate, store, PageView } from '@operato/shell'\n\n@customElement('app-mdibar')\nclass AppMDIBar extends connect(store)(LitElement) {\n static styles = [\n css`\n :host {\n display: flex;\n background-color: var(--main-section-background-color);\n color: var(--mdibar-color, rgba(0, 0, 0, 0.7));\n font-size: var(--fontsize-small);\n }\n\n div {\n display: inline-block;\n position: relative;\n max-width: var(--mdibar-max-width, 120px);\n padding: var(--mdibar-padding, 3px 22px 0 5px);\n border-right: var(--border-dark-color);\n border-bottom: var(--border-dark-color);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n mwc-icon {\n position: absolute;\n right: 2px;\n top: 3px;\n margin-left: var(--margin-narrow);\n font-size: var(--mdibar-icon-size, 18px);\n opacity: 0.5;\n }\n mwc-icon:hover {\n opacity: 0.8;\n color: var(--mdibar-hover-color, #cc3300);\n }\n\n [active] {\n background-color: var(--mdibar-background-color, #fff);\n border-bottom: 1px solid var(--mdibar-background-color, #fff);\n color: var(--primary-text-color);\n font-weight: bold;\n }\n [home] {\n padding: var(--mdibar-padding-home, 3px 5px 0 23px);\n }\n [home] mwc-icon {\n left: 0;\n }\n `\n ]\n\n @state() pages: PageView[] = []\n @state() activePage!: PageView\n @state() title: string = ''\n\n render() {\n const pages = this.pages || []\n\n return html`\n <div home><mwc-icon>home</mwc-icon></div>\n\n ${pages.map((page, idx) => {\n const context = page.context as any\n const title = context?.title || context?.search?.placeholder || ''\n\n return html`\n <div @click=${() => this.moveTo(page)} ?active=${this.activePage === page}>\n ${title}\n <mwc-icon\n @click=${(e: MouseEvent) => {\n e.stopPropagation()\n this.closePage(page, idx)\n }}\n >close</mwc-icon\n >\n </div>\n `\n })}\n `\n }\n\n updated(changed) {\n if (changed.has('activePage')) {\n const page = this.activePage\n\n if (!this.pages) {\n this.pages = []\n }\n\n if (!this.pages.includes(page)) {\n this.pages = [...this.pages, page]\n }\n }\n }\n\n stateChanged(state) {\n const { context, activePage } = state.route || {}\n this.activePage = activePage\n\n /* refresh를 일으키기위한 property 변경을 위한 코드임. */\n this.title = context.title || context.search?.placeholder\n }\n\n getHomeRoute() {\n var base = document.querySelector('base')\n return base?.getAttribute('href') || '/'\n }\n\n moveTo(page: PageView) {\n navigate(page.getAttribute('data-page')!)\n }\n\n closePage(page: PageView, idx: number) {\n this.pages = [...this.pages.slice(0, idx), ...this.pages.slice(idx + 1)]\n\n page.parentNode?.removeChild(page)\n page.pageDispose()\n\n if (this.activePage === page) {\n const next = this.pages.length > 0 ? Math.max(0, idx - 1) : -1\n navigate(next != -1 ? this.pages[next].getAttribute('data-page')! : this.getHomeRoute())\n }\n }\n}\n"]}