@operato/shell 0.3.7
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/.editorconfig +29 -0
- package/.storybook/main.js +3 -0
- package/.storybook/server.mjs +8 -0
- package/@types/global/index.d.ts +1 -0
- package/CHANGELOG.md +235 -0
- package/LICENSE +21 -0
- package/README.md +75 -0
- package/demo/index.html +33 -0
- package/dist/src/actions/app.d.ts +11 -0
- package/dist/src/actions/app.js +12 -0
- package/dist/src/actions/app.js.map +1 -0
- package/dist/src/actions/index.d.ts +2 -0
- package/dist/src/actions/index.js +3 -0
- package/dist/src/actions/index.js.map +1 -0
- package/dist/src/actions/route.d.ts +26 -0
- package/dist/src/actions/route.js +76 -0
- package/dist/src/actions/route.js.map +1 -0
- package/dist/src/app/app-style.d.ts +1 -0
- package/dist/src/app/app-style.js +68 -0
- package/dist/src/app/app-style.js.map +1 -0
- package/dist/src/app/app.d.ts +1 -0
- package/dist/src/app/app.js +192 -0
- package/dist/src/app/app.js.map +1 -0
- package/dist/src/app/pages/page-404.d.ts +1 -0
- package/dist/src/app/pages/page-404.js +52 -0
- package/dist/src/app/pages/page-404.js.map +1 -0
- package/dist/src/app/pages/page-view.d.ts +16 -0
- package/dist/src/app/pages/page-view.js +131 -0
- package/dist/src/app/pages/page-view.js.map +1 -0
- package/dist/src/entries/public/home.d.ts +17 -0
- package/dist/src/entries/public/home.js +87 -0
- package/dist/src/entries/public/home.js.map +1 -0
- package/dist/src/index.d.ts +0 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/reducers/app.d.ts +36 -0
- package/dist/src/reducers/app.js +36 -0
- package/dist/src/reducers/app.js.map +1 -0
- package/dist/src/reducers/route.d.ts +16 -0
- package/dist/src/reducers/route.js +57 -0
- package/dist/src/reducers/route.js.map +1 -0
- package/dist/src/store.d.ts +4 -0
- package/dist/src/store.js +16 -0
- package/dist/src/store.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +78 -0
- package/src/actions/app.ts +23 -0
- package/src/actions/index.ts +2 -0
- package/src/actions/route.ts +94 -0
- package/src/app/app-style.ts +68 -0
- package/src/app/app.ts +205 -0
- package/src/app/pages/page-404.ts +56 -0
- package/src/app/pages/page-view.ts +142 -0
- package/src/entries/public/home.ts +95 -0
- package/src/index.ts +0 -0
- package/src/module-importer.import +0 -0
- package/src/reducers/app.ts +48 -0
- package/src/reducers/route.ts +77 -0
- package/src/store.ts +26 -0
- package/tsconfig.json +23 -0
- package/web-dev-server.config.mjs +27 -0
- package/web-test-runner.config.mjs +41 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html, LitElement } from 'lit';
|
|
3
|
+
import { state } from 'lit/decorators';
|
|
4
|
+
import { connect } from 'pwa-helpers/connect-mixin.js';
|
|
5
|
+
import { installRouter } from 'pwa-helpers/router.js';
|
|
6
|
+
import { ScrollbarStyles } from '@operato/styles';
|
|
7
|
+
import { getPathInfo } from '@operato/utils';
|
|
8
|
+
import { UPDATE_CONTEXT_PATH, UPDATE_MODULES } from '../actions/app';
|
|
9
|
+
import { navigateWithSilence, UPDATE_ACTIVE_PAGE } from '../actions/route';
|
|
10
|
+
import { store } from '../store';
|
|
11
|
+
import { AppStyle } from './app-style';
|
|
12
|
+
class ThingsApp extends connect(store)(LitElement) {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this._pages = {};
|
|
16
|
+
this._callbacks = [];
|
|
17
|
+
this._modules = [];
|
|
18
|
+
this._moduleInitialized = false;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
var params = this._params || {};
|
|
22
|
+
var fullbleed = (this._context && this._context.fullbleed) || (params.fullbleed && params.fullbleed == 'Y');
|
|
23
|
+
var widebleed = (this._context && this._context.widebleed) || (params.widebleed && params.widebleed == 'Y');
|
|
24
|
+
return html `
|
|
25
|
+
<header-bar ?fullbleed=${fullbleed}></header-bar>
|
|
26
|
+
|
|
27
|
+
<nav-bar ?fullbleed=${fullbleed || widebleed}></nav-bar>
|
|
28
|
+
|
|
29
|
+
<main></main>
|
|
30
|
+
|
|
31
|
+
<aside-bar ?fullbleed=${fullbleed || widebleed}></aside-bar>
|
|
32
|
+
|
|
33
|
+
<footer-bar ?fullbleed=${fullbleed}></footer-bar>
|
|
34
|
+
|
|
35
|
+
<snack-bar></snack-bar>
|
|
36
|
+
`;
|
|
37
|
+
}
|
|
38
|
+
connectedCallback() {
|
|
39
|
+
super.connectedCallback();
|
|
40
|
+
/* 모듈 임포트를 동적으로 처리한다. */
|
|
41
|
+
import(
|
|
42
|
+
/* webpackPrefetch: true */
|
|
43
|
+
/* webpackPreload: true */
|
|
44
|
+
/* webpackChunkName: "modules" */
|
|
45
|
+
'../module-importer.import').then(module => {
|
|
46
|
+
var modules = module.modules;
|
|
47
|
+
/* lifecycle - bootstrapping */
|
|
48
|
+
this.dispatchEvent(new Event('lifecycle-bootstrap-begin'));
|
|
49
|
+
modules.forEach((m, idx) => {
|
|
50
|
+
try {
|
|
51
|
+
m.bootstrap && m.bootstrap();
|
|
52
|
+
// console.info(`[${idx} BOOTSTRAPED - ${m.name}]`)
|
|
53
|
+
}
|
|
54
|
+
catch (e) {
|
|
55
|
+
console.error(`[${idx} BOOTSTRAP ERROR -${m.name}]`, e);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
this.dispatchEvent(new Event('lifecycle-bootstrap-finish'));
|
|
59
|
+
/* shouldUpdate를 활성화한다. */
|
|
60
|
+
this._moduleInitialized = true;
|
|
61
|
+
/* modules를 store에 dispatch 함으로써, update를 invoke 시킨다. */
|
|
62
|
+
store.dispatch({
|
|
63
|
+
type: UPDATE_MODULES,
|
|
64
|
+
modules
|
|
65
|
+
});
|
|
66
|
+
installRouter((location, e) => {
|
|
67
|
+
var { contextPath } = getPathInfo(location.pathname);
|
|
68
|
+
if (this._contextPath !== contextPath) {
|
|
69
|
+
store.dispatch({
|
|
70
|
+
type: UPDATE_CONTEXT_PATH,
|
|
71
|
+
contextPath
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
store.dispatch(navigateWithSilence(location));
|
|
75
|
+
this._callbacks &&
|
|
76
|
+
this._callbacks.forEach(callback => {
|
|
77
|
+
try {
|
|
78
|
+
callback.call(this, location, e);
|
|
79
|
+
}
|
|
80
|
+
catch (ex) {
|
|
81
|
+
console.error(ex);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
this.setBase();
|
|
87
|
+
}
|
|
88
|
+
routeToPage() {
|
|
89
|
+
let activePages = this.renderRoot.querySelectorAll('main > .page[active]');
|
|
90
|
+
activePages.forEach(page => {
|
|
91
|
+
page.removeAttribute('active');
|
|
92
|
+
});
|
|
93
|
+
this._activePage = this.renderRoot.querySelector(`main > .page[data-page=${this._page}]`);
|
|
94
|
+
if (!this._activePage) {
|
|
95
|
+
/* 해당 route에 연결된 page가 없는 경우에 main 섹션에 해당 element를 추가해준다. */
|
|
96
|
+
var tagname = this._pages[this._page];
|
|
97
|
+
if (tagname) {
|
|
98
|
+
var main = this.renderRoot.querySelector('main');
|
|
99
|
+
var el = document.createElement(tagname);
|
|
100
|
+
el.setAttribute('class', 'page');
|
|
101
|
+
el.setAttribute('data-page', this._page);
|
|
102
|
+
main === null || main === void 0 ? void 0 : main.appendChild(el);
|
|
103
|
+
this._activePage = el;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
if (this._activePage) {
|
|
107
|
+
this._activePage.setAttribute('active', true);
|
|
108
|
+
this._activePage.setAttribute('context-path', this._contextPath);
|
|
109
|
+
this._activePage.lifecycle = {
|
|
110
|
+
...(this._activePage.lifecycle || {}),
|
|
111
|
+
active: true,
|
|
112
|
+
params: this._params,
|
|
113
|
+
resourceId: this._resourceId,
|
|
114
|
+
page: this._page
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
store.dispatch({
|
|
118
|
+
type: UPDATE_ACTIVE_PAGE,
|
|
119
|
+
activePage: this._activePage
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
async updated(changes) {
|
|
123
|
+
if (changes.has('_modules')) {
|
|
124
|
+
this._readyPageList();
|
|
125
|
+
}
|
|
126
|
+
if (changes.has('_page') || changes.has('_resourceId') || changes.has('_params')) {
|
|
127
|
+
this.routeToPage();
|
|
128
|
+
}
|
|
129
|
+
if (changes.has('_contextPath')) {
|
|
130
|
+
this.setBase();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
shouldUpdate() {
|
|
134
|
+
return this._moduleInitialized;
|
|
135
|
+
}
|
|
136
|
+
stateChanged(state) {
|
|
137
|
+
this._page = state.route.page;
|
|
138
|
+
this._params = state.route.params;
|
|
139
|
+
this._resourceId = state.route.resourceId;
|
|
140
|
+
this._callbacks = state.route.callbacks;
|
|
141
|
+
this._context = state.route.context;
|
|
142
|
+
this._modules = state.app.modules;
|
|
143
|
+
this._contextPath = state.app.contextPath;
|
|
144
|
+
}
|
|
145
|
+
_readyPageList() {
|
|
146
|
+
var reversedModules = [...this._modules].reverse();
|
|
147
|
+
this._pages = {};
|
|
148
|
+
/* 모듈 참조 순서 역순으로 page를 추가한다. (for overidable) */
|
|
149
|
+
reversedModules.forEach(m => {
|
|
150
|
+
m.routes &&
|
|
151
|
+
m.routes.forEach((route) => {
|
|
152
|
+
if (!this._pages[route.page]) {
|
|
153
|
+
this._pages[route.page] = route.tagname;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
setBase() {
|
|
159
|
+
var base = document.querySelector('base');
|
|
160
|
+
base === null || base === void 0 ? void 0 : base.setAttribute('href', this._contextPath ? `${this._contextPath}/` : '/');
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
ThingsApp.styles = [ScrollbarStyles, AppStyle];
|
|
164
|
+
__decorate([
|
|
165
|
+
state()
|
|
166
|
+
], ThingsApp.prototype, "_contextPath", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
state()
|
|
169
|
+
], ThingsApp.prototype, "_page", void 0);
|
|
170
|
+
__decorate([
|
|
171
|
+
state()
|
|
172
|
+
], ThingsApp.prototype, "_pages", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
state()
|
|
175
|
+
], ThingsApp.prototype, "_resourceId", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
state()
|
|
178
|
+
], ThingsApp.prototype, "_params", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
state()
|
|
181
|
+
], ThingsApp.prototype, "_callbacks", void 0);
|
|
182
|
+
__decorate([
|
|
183
|
+
state()
|
|
184
|
+
], ThingsApp.prototype, "_activePage", void 0);
|
|
185
|
+
__decorate([
|
|
186
|
+
state()
|
|
187
|
+
], ThingsApp.prototype, "_context", void 0);
|
|
188
|
+
__decorate([
|
|
189
|
+
state()
|
|
190
|
+
], ThingsApp.prototype, "_modules", void 0);
|
|
191
|
+
window.customElements.define('things-app', ThingsApp);
|
|
192
|
+
//# sourceMappingURL=app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/app/app.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE5C,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO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C,CAAA","sourcesContent":["import { html, LitElement, PropertyValues } from 'lit'\nimport { state } from 'lit/decorators'\nimport { connect } from 'pwa-helpers/connect-mixin.js'\nimport { installRouter } from 'pwa-helpers/router.js'\n\nimport { ScrollbarStyles } from '@operato/styles'\nimport { getPathInfo } from '@operato/utils'\n\nimport { UPDATE_CONTEXT_PATH, UPDATE_MODULES } from '../actions/app'\nimport { navigateWithSilence, UPDATE_ACTIVE_PAGE } from '../actions/route'\nimport { store } from '../store'\nimport { AppStyle } from './app-style'\n\nclass ThingsApp extends connect(store)(LitElement) {\n static styles = [ScrollbarStyles, AppStyle]\n\n @state() _contextPath?: string\n @state() _page?: string\n @state() _pages: { [path: string]: string } = {}\n @state() _resourceId?: string\n @state() _params?: any\n @state() _callbacks: Array<any> = []\n @state() _activePage: any\n @state() _context: any\n @state() _modules: Array<any> = []\n\n _moduleInitialized = false\n\n render() {\n var params = this._params || {}\n var fullbleed = (this._context && this._context.fullbleed) || (params.fullbleed && params.fullbleed == 'Y')\n var widebleed = (this._context && this._context.widebleed) || (params.widebleed && params.widebleed == 'Y')\n\n return html`\n <header-bar ?fullbleed=${fullbleed}></header-bar>\n\n <nav-bar ?fullbleed=${fullbleed || widebleed}></nav-bar>\n\n <main></main>\n\n <aside-bar ?fullbleed=${fullbleed || widebleed}></aside-bar>\n\n <footer-bar ?fullbleed=${fullbleed}></footer-bar>\n\n <snack-bar></snack-bar>\n `\n }\n\n constructor() {\n super()\n }\n\n connectedCallback() {\n super.connectedCallback()\n\n /* 모듈 임포트를 동적으로 처리한다. */\n import(\n /* webpackPrefetch: true */\n /* webpackPreload: true */\n /* webpackChunkName: \"modules\" */\n '../module-importer.import'\n ).then(module => {\n var modules: {\n name: string\n bootstrap: any\n }[] = module.modules\n\n /* lifecycle - bootstrapping */\n this.dispatchEvent(new Event('lifecycle-bootstrap-begin'))\n modules.forEach((m, idx) => {\n try {\n m.bootstrap && m.bootstrap()\n // console.info(`[${idx} BOOTSTRAPED - ${m.name}]`)\n } catch (e) {\n console.error(`[${idx} BOOTSTRAP ERROR -${m.name}]`, e)\n }\n })\n this.dispatchEvent(new Event('lifecycle-bootstrap-finish'))\n\n /* shouldUpdate를 활성화한다. */\n this._moduleInitialized = true\n\n /* modules를 store에 dispatch 함으로써, update를 invoke 시킨다. */\n store.dispatch({\n type: UPDATE_MODULES,\n modules\n })\n\n installRouter((location, e) => {\n var { contextPath } = getPathInfo(location.pathname)\n\n if (this._contextPath !== contextPath) {\n store.dispatch({\n type: UPDATE_CONTEXT_PATH,\n contextPath\n })\n }\n\n store.dispatch(navigateWithSilence(location) as any)\n this._callbacks &&\n this._callbacks.forEach(callback => {\n try {\n callback.call(this, location, e)\n } catch (ex) {\n console.error(ex)\n }\n })\n })\n })\n\n this.setBase()\n }\n\n routeToPage() {\n let activePages = this.renderRoot.querySelectorAll('main > .page[active]')\n activePages.forEach(page => {\n page.removeAttribute('active')\n })\n\n this._activePage = this.renderRoot.querySelector(`main > .page[data-page=${this._page}]`)\n\n if (!this._activePage) {\n /* 해당 route에 연결된 page가 없는 경우에 main 섹션에 해당 element를 추가해준다. */\n var tagname = this._pages[this._page!]\n if (tagname) {\n var main = this.renderRoot.querySelector('main')\n\n var el = document.createElement(tagname)\n el.setAttribute('class', 'page')\n el.setAttribute('data-page', this._page!)\n\n main?.appendChild(el)\n\n this._activePage = el\n }\n }\n\n if (this._activePage) {\n this._activePage.setAttribute('active', true)\n this._activePage.setAttribute('context-path', this._contextPath)\n this._activePage.lifecycle = {\n ...(this._activePage.lifecycle || {}),\n active: true,\n params: this._params,\n resourceId: this._resourceId,\n page: this._page\n }\n }\n\n store.dispatch({\n type: UPDATE_ACTIVE_PAGE,\n activePage: this._activePage\n })\n }\n\n async updated(changes: PropertyValues<this>) {\n if (changes.has('_modules')) {\n this._readyPageList()\n }\n\n if (changes.has('_page') || changes.has('_resourceId') || changes.has('_params')) {\n this.routeToPage()\n }\n\n if (changes.has('_contextPath')) {\n this.setBase()\n }\n }\n\n shouldUpdate() {\n return this._moduleInitialized\n }\n\n stateChanged(state: any) {\n this._page = state.route.page\n this._params = state.route.params\n this._resourceId = state.route.resourceId\n this._callbacks = state.route.callbacks\n this._context = state.route.context\n this._modules = state.app.modules\n this._contextPath = state.app.contextPath\n }\n\n _readyPageList() {\n var reversedModules = [...this._modules].reverse()\n this._pages = {}\n\n /* 모듈 참조 순서 역순으로 page를 추가한다. (for overidable) */\n reversedModules.forEach(m => {\n m.routes &&\n m.routes.forEach((route: any) => {\n if (!this._pages[route.page]) {\n this._pages[route.page] = route.tagname\n }\n })\n })\n }\n\n setBase() {\n var base = document.querySelector('base')\n base?.setAttribute('href', this._contextPath ? `${this._contextPath}/` : '/')\n }\n}\n\nwindow.customElements.define('things-app', ThingsApp)\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { css, html } from 'lit';
|
|
2
|
+
import { PageView } from './page-view';
|
|
3
|
+
class Page404 extends PageView {
|
|
4
|
+
get context() {
|
|
5
|
+
return {
|
|
6
|
+
title: 'Page Not Found'
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return html `
|
|
11
|
+
<section>
|
|
12
|
+
<mwc-icon>error_outline</mwc-icon>
|
|
13
|
+
<h2>page not found!</h2>
|
|
14
|
+
The page you requested cannot be found.
|
|
15
|
+
</section>
|
|
16
|
+
`;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
Page404.styles = css `
|
|
20
|
+
:host {
|
|
21
|
+
display: block;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
background-color: var(--main-section-background-color);
|
|
24
|
+
--padding-wide: 15%;
|
|
25
|
+
}
|
|
26
|
+
section {
|
|
27
|
+
padding: var(--padding-wide) 0 0 0;
|
|
28
|
+
text-align: center;
|
|
29
|
+
color: var(--secondary-color);
|
|
30
|
+
}
|
|
31
|
+
mwc-icon {
|
|
32
|
+
--mdc-icon-size: 120px;
|
|
33
|
+
color: var(--status-danger-color);
|
|
34
|
+
text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
|
|
35
|
+
}
|
|
36
|
+
h2 {
|
|
37
|
+
margin: 0 auto;
|
|
38
|
+
font-size: 2.5em;
|
|
39
|
+
text-transform: capitalize;
|
|
40
|
+
}
|
|
41
|
+
@media only screen and (max-width: 460px) {
|
|
42
|
+
mwc-icon {
|
|
43
|
+
padding-top: 25%;
|
|
44
|
+
--mdc-icon-size: 90px;
|
|
45
|
+
}
|
|
46
|
+
h2 {
|
|
47
|
+
font-size: 2em;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
customElements.define('page-404', Page404);
|
|
52
|
+
//# sourceMappingURL=page-404.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-404.js","sourceRoot":"","sources":["../../../../src/app/pages/page-404.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,MAAM,OAAQ,SAAQ,QAAQ;IAkC5B,IAAI,OAAO;QACT,OAAO;YACL,KAAK,EAAE,gBAAgB;SACxB,CAAA;IACH,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;;;;;;KAMV,CAAA;IACH,CAAC;;AA/CM,cAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BlB,CAAA;AAmBH,cAAc,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA","sourcesContent":["import { css, html } from 'lit'\n\nimport { PageView } from './page-view'\n\nclass Page404 extends PageView {\n static styles = css`\n :host {\n display: block;\n box-sizing: border-box;\n background-color: var(--main-section-background-color);\n --padding-wide: 15%;\n }\n section {\n padding: var(--padding-wide) 0 0 0;\n text-align: center;\n color: var(--secondary-color);\n }\n mwc-icon {\n --mdc-icon-size: 120px;\n color: var(--status-danger-color);\n text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);\n }\n h2 {\n margin: 0 auto;\n font-size: 2.5em;\n text-transform: capitalize;\n }\n @media only screen and (max-width: 460px) {\n mwc-icon {\n padding-top: 25%;\n --mdc-icon-size: 90px;\n }\n h2 {\n font-size: 2em;\n }\n }\n `\n\n get context() {\n return {\n title: 'Page Not Found'\n }\n }\n\n render() {\n return html`\n <section>\n <mwc-icon>error_outline</mwc-icon>\n <h2>page not found!</h2>\n The page you requested cannot be found.\n </section>\n `\n }\n}\n\ncustomElements.define('page-404', Page404)\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
export declare class PageView extends LitElement {
|
|
3
|
+
shouldUpdate(changes: PropertyValues<this>): boolean;
|
|
4
|
+
active: boolean;
|
|
5
|
+
lifecycle: any;
|
|
6
|
+
contextPath?: string;
|
|
7
|
+
_oldLifecycleInfo$: any;
|
|
8
|
+
pageUpdate(changes?: any, force?: boolean): Promise<void>;
|
|
9
|
+
pageReset(): Promise<void>;
|
|
10
|
+
pageDispose(): Promise<void>;
|
|
11
|
+
pageInitialized(pageInfo: any): void;
|
|
12
|
+
pageUpdated(changes: any, after: any, before: any): void;
|
|
13
|
+
pageDisposed(pageInfo: any): void;
|
|
14
|
+
updateContext(override?: any): void;
|
|
15
|
+
get context(): {};
|
|
16
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import { property } from 'lit/decorators.js';
|
|
4
|
+
import isEqual from 'lodash/isEqual';
|
|
5
|
+
import { UPDATE_CONTEXT } from '../../actions/route';
|
|
6
|
+
import { store } from '../../store';
|
|
7
|
+
function diff(after, before) {
|
|
8
|
+
var changed = false;
|
|
9
|
+
var changes = {};
|
|
10
|
+
Object.getOwnPropertyNames(after).forEach(function (key) {
|
|
11
|
+
let before_val = before[key];
|
|
12
|
+
let after_val = after[key];
|
|
13
|
+
if (!isEqual(before_val, after_val)) {
|
|
14
|
+
changes[key] = after_val;
|
|
15
|
+
changed = true;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return changed && changes;
|
|
19
|
+
}
|
|
20
|
+
export class PageView extends LitElement {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
|
+
this.active = false;
|
|
24
|
+
}
|
|
25
|
+
// Only render this page if it's actually visible.
|
|
26
|
+
shouldUpdate(changes) {
|
|
27
|
+
var active = String(this.active) == 'true';
|
|
28
|
+
var { active: oldActive = false } = this._oldLifecycleInfo$ || {};
|
|
29
|
+
/*
|
|
30
|
+
* page lifecycle
|
|
31
|
+
* case 1. page가 새로 activate 되었다.
|
|
32
|
+
* case 2. page가 active 상태에서 lifecycle 정보가 바뀌었다.
|
|
33
|
+
**/
|
|
34
|
+
if (active) {
|
|
35
|
+
this.pageUpdate({
|
|
36
|
+
active
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
else if (oldActive) {
|
|
40
|
+
this.pageUpdate({
|
|
41
|
+
active
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return active;
|
|
45
|
+
}
|
|
46
|
+
/* lifecycle */
|
|
47
|
+
async pageUpdate(changes = {}, force = false) {
|
|
48
|
+
var before = this._oldLifecycleInfo$ || {};
|
|
49
|
+
var after = {
|
|
50
|
+
...before,
|
|
51
|
+
...this.lifecycle,
|
|
52
|
+
contextPath: this.contextPath,
|
|
53
|
+
...changes
|
|
54
|
+
};
|
|
55
|
+
if (!('initialized' in changes) && after.active && !before.initialized) {
|
|
56
|
+
after.initialized = true;
|
|
57
|
+
}
|
|
58
|
+
if (force) {
|
|
59
|
+
after.updated = Date.now();
|
|
60
|
+
}
|
|
61
|
+
var changed = diff(after, before);
|
|
62
|
+
if (!changed) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
this._oldLifecycleInfo$ = after;
|
|
66
|
+
/* page의 이미 초기화된 상태에서 contextPath가 바뀐다면, 무조건 page가 리셋되어야 한다. */
|
|
67
|
+
if (before.initialized && changed.contextPath) {
|
|
68
|
+
await this.pageReset();
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (changed.initialized) {
|
|
72
|
+
await this.pageInitialized(after);
|
|
73
|
+
}
|
|
74
|
+
if ('initialized' in changed) {
|
|
75
|
+
if (changed.initialized) {
|
|
76
|
+
/*
|
|
77
|
+
* 방금 초기화된 경우라면, 엘리먼트들이 만들어지지 않았을 가능성이 있으므로,
|
|
78
|
+
* 다음 animationFrame에서 pageUpdated 콜백을 호출한다.
|
|
79
|
+
*/
|
|
80
|
+
requestAnimationFrame(async () => {
|
|
81
|
+
await this.pageUpdated(changed, after, before);
|
|
82
|
+
/* active page인 경우에는, page Context 갱신도 필요할 것이다. */
|
|
83
|
+
after.active && this.updateContext();
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
await this.pageDisposed(after);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
await this.pageUpdated(changed, after, before);
|
|
92
|
+
/* active page인 경우에는, page Context 갱신도 필요할 것이다. */
|
|
93
|
+
after.active && this.updateContext();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
async pageReset() {
|
|
97
|
+
var { initialized } = this._oldLifecycleInfo$ || {};
|
|
98
|
+
if (initialized) {
|
|
99
|
+
await this.pageDispose();
|
|
100
|
+
await this.pageUpdate({}, true);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
async pageDispose() {
|
|
104
|
+
await this.pageUpdate({
|
|
105
|
+
initialized: false
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
pageInitialized(pageInfo) { }
|
|
109
|
+
pageUpdated(changes, after, before) { }
|
|
110
|
+
pageDisposed(pageInfo) { }
|
|
111
|
+
/* context */
|
|
112
|
+
updateContext(override) {
|
|
113
|
+
store.dispatch({
|
|
114
|
+
type: UPDATE_CONTEXT,
|
|
115
|
+
context: override ? { ...this.context, ...override } : this.context
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
get context() {
|
|
119
|
+
return {};
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
__decorate([
|
|
123
|
+
property({ type: Boolean })
|
|
124
|
+
], PageView.prototype, "active", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
property({ type: Object })
|
|
127
|
+
], PageView.prototype, "lifecycle", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
property({ type: String, attribute: 'context-path' })
|
|
130
|
+
], PageView.prototype, "contextPath", void 0);
|
|
131
|
+
//# sourceMappingURL=page-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-view.js","sourceRoot":"","sources":["../../../../src/app/pages/page-view.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,OAAO,MAAM,gBAAgB,CAAA;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAEnC,SAAS,IAAI,CAAC,KAAU,EAAE,MAAW;IACnC,IAAI,OAAO,GAAG,KAAK,CAAA;IACnB,IAAI,OAAO,GAA2B,EAAE,CAAA;IAExC,MAAM,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,GAAG;QACrD,IAAI,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;QAC5B,IAAI,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA;QAE1B,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE;YACnC,OAAO,CAAC,GAAG,CAAC,GAAG,SAAS,CAAA;YACxB,OAAO,G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CAAC,QAAa,IAAG,CAAC;IACjC,WAAW,CAAC,OAAY,EAAE,KAAU,EAAE,MAAW,IAAG,CAAC;IACrD,YAAY,CAAC,QAAa,IAAG,CAAC;IAE9B,aAAa;IACb,aAAa,CAAC,QAAc;QAC1B,KAAK,CAAC,QAAQ,CAAC;YACb,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO;SACpE,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,OAAO;QACT,OAAO,EAAE,CAAA;IACX,CAAC;CACF;AA7F8B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCAAwB;AACxB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAe;AACa;IAAtD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;6CAAqB","sourcesContent":["import { LitElement, PropertyValues } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport isEqual from 'lodash/isEqual'\n\nimport { UPDATE_CONTEXT } from '../../actions/route'\nimport { store } from '../../store'\n\nfunction diff(after: any, before: any): any {\n var changed = false\n var changes: { [key: string]: any } = {}\n\n Object.getOwnPropertyNames(after).forEach(function (key) {\n let before_val = before[key]\n let after_val = after[key]\n\n if (!isEqual(before_val, after_val)) {\n changes[key] = after_val\n changed = true\n }\n })\n\n return changed && changes\n}\n\nexport class PageView extends LitElement {\n // Only render this page if it's actually visible.\n shouldUpdate(changes: PropertyValues<this>) {\n var active = String(this.active) == 'true'\n var { active: oldActive = false } = this._oldLifecycleInfo$ || {}\n\n /*\n * page lifecycle\n * case 1. page가 새로 activate 되었다.\n * case 2. page가 active 상태에서 lifecycle 정보가 바뀌었다.\n **/\n if (active) {\n this.pageUpdate({\n active\n })\n } else if (oldActive) {\n this.pageUpdate({\n active\n })\n }\n\n return active\n }\n\n @property({ type: Boolean }) active: boolean = false\n @property({ type: Object }) lifecycle: any\n @property({ type: String, attribute: 'context-path' }) contextPath?: string\n\n _oldLifecycleInfo$: any\n\n /* lifecycle */\n async pageUpdate(changes: any = {}, force: boolean = false) {\n var before = this._oldLifecycleInfo$ || {}\n\n var after = {\n ...before,\n ...this.lifecycle,\n contextPath: this.contextPath,\n ...changes\n }\n\n if (!('initialized' in changes) && after.active && !before.initialized) {\n after.initialized = true\n }\n\n if (force) {\n after.updated = Date.now()\n }\n\n var changed = diff(after, before)\n if (!changed) {\n return\n }\n\n this._oldLifecycleInfo$ = after\n\n /* page의 이미 초기화된 상태에서 contextPath가 바뀐다면, 무조건 page가 리셋되어야 한다. */\n if (before.initialized && changed.contextPath) {\n await this.pageReset()\n return\n }\n\n if (changed.initialized) {\n await this.pageInitialized(after)\n }\n\n if ('initialized' in changed) {\n if (changed.initialized) {\n /*\n * 방금 초기화된 경우라면, 엘리먼트들이 만들어지지 않았을 가능성이 있으므로,\n * 다음 animationFrame에서 pageUpdated 콜백을 호출한다.\n */\n requestAnimationFrame(async () => {\n await this.pageUpdated(changed, after, before)\n /* active page인 경우에는, page Context 갱신도 필요할 것이다. */\n after.active && this.updateContext()\n })\n } else {\n await this.pageDisposed(after)\n }\n } else {\n await this.pageUpdated(changed, after, before)\n /* active page인 경우에는, page Context 갱신도 필요할 것이다. */\n after.active && this.updateContext()\n }\n }\n\n async pageReset() {\n var { initialized } = this._oldLifecycleInfo$ || {}\n\n if (initialized) {\n await this.pageDispose()\n await this.pageUpdate({}, true)\n }\n }\n\n async pageDispose() {\n await this.pageUpdate({\n initialized: false\n })\n }\n\n pageInitialized(pageInfo: any) {}\n pageUpdated(changes: any, after: any, before: any) {}\n pageDisposed(pageInfo: any) {}\n\n /* context */\n updateContext(override?: any) {\n store.dispatch({\n type: UPDATE_CONTEXT,\n context: override ? { ...this.context, ...override } : this.context\n })\n }\n\n get context() {\n return {}\n }\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import '@material/mwc-icon-button';
|
|
2
|
+
import '@material/mwc-button';
|
|
3
|
+
import { LitElement } from 'lit';
|
|
4
|
+
export declare class HomePage extends LitElement {
|
|
5
|
+
static styles: import("lit").CSSResult;
|
|
6
|
+
_applicationMeta?: {
|
|
7
|
+
icon: string;
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
12
|
+
get applicationMeta(): {
|
|
13
|
+
icon: string;
|
|
14
|
+
title: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/mwc-icon-button';
|
|
3
|
+
import '@material/mwc-button';
|
|
4
|
+
import { css, html, LitElement } from 'lit';
|
|
5
|
+
import { customElement } from 'lit/decorators';
|
|
6
|
+
let HomePage = class HomePage extends LitElement {
|
|
7
|
+
render() {
|
|
8
|
+
var { icon, title, description } = this.applicationMeta;
|
|
9
|
+
return html `
|
|
10
|
+
<mwc-icon-button home icon="home" @click=${() => (window.location.href = '/')}></mwc-icon-button>
|
|
11
|
+
|
|
12
|
+
<div message>
|
|
13
|
+
<strong>${title}</strong>
|
|
14
|
+
${description}
|
|
15
|
+
<img src="/assets/images/home.png" />
|
|
16
|
+
</div>
|
|
17
|
+
`;
|
|
18
|
+
}
|
|
19
|
+
get applicationMeta() {
|
|
20
|
+
if (!this._applicationMeta) {
|
|
21
|
+
var iconLink = document.querySelector('link[rel="application-icon"]');
|
|
22
|
+
var titleMeta = document.querySelector('meta[name="application-name"]');
|
|
23
|
+
var descriptionMeta = document.querySelector('meta[name="application-description"]');
|
|
24
|
+
this._applicationMeta = {
|
|
25
|
+
icon: iconLink === null || iconLink === void 0 ? void 0 : iconLink.href,
|
|
26
|
+
title: titleMeta ? titleMeta.content : 'Things Factory',
|
|
27
|
+
description: descriptionMeta ? descriptionMeta.content : 'Reimagining Software'
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return this._applicationMeta;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
HomePage.styles = css `
|
|
34
|
+
:host {
|
|
35
|
+
background-color: var(--main-section-background-color);
|
|
36
|
+
|
|
37
|
+
display: block;
|
|
38
|
+
position: relative;
|
|
39
|
+
|
|
40
|
+
--mdc-theme-primary: white;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[home] {
|
|
44
|
+
position: absolute;
|
|
45
|
+
left: 20px;
|
|
46
|
+
top: 20px;
|
|
47
|
+
font-size: 2em;
|
|
48
|
+
color: white;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[message] {
|
|
52
|
+
background-color: rgba(50, 66, 97, 0.8);
|
|
53
|
+
padding: 60px 50px 0 50px;
|
|
54
|
+
color: #fff;
|
|
55
|
+
text-align: center;
|
|
56
|
+
font-size: 20px;
|
|
57
|
+
}
|
|
58
|
+
[message] strong {
|
|
59
|
+
display: block;
|
|
60
|
+
font-size: 2.5rem;
|
|
61
|
+
}
|
|
62
|
+
[message] img {
|
|
63
|
+
width: 450px;
|
|
64
|
+
max-width: 90%;
|
|
65
|
+
display: block;
|
|
66
|
+
margin: auto;
|
|
67
|
+
margin-top: 20px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@media screen and (max-width: 480px) {
|
|
71
|
+
[message] {
|
|
72
|
+
padding: 60px 30px 0 30px;
|
|
73
|
+
color: #fff;
|
|
74
|
+
text-align: center;
|
|
75
|
+
font-size: 15px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
[message] strong {
|
|
79
|
+
font-size: 1.6rem;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
`;
|
|
83
|
+
HomePage = __decorate([
|
|
84
|
+
customElement('home-page')
|
|
85
|
+
], HomePage);
|
|
86
|
+
export { HomePage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;IAC9B,CAAC;CACF,CAAA;AAtFQ,eAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDlB,CAAA;AAlDU,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAuFpB;SAvFY,QAAQ","sourcesContent":["import '@material/mwc-icon-button'\nimport '@material/mwc-button'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement } from 'lit/decorators'\n\n@customElement('home-page')\nexport class HomePage extends LitElement {\n static styles = css`\n :host {\n background-color: var(--main-section-background-color);\n\n display: block;\n position: relative;\n\n --mdc-theme-primary: white;\n }\n\n [home] {\n position: absolute;\n left: 20px;\n top: 20px;\n font-size: 2em;\n color: white;\n }\n\n [message] {\n background-color: rgba(50, 66, 97, 0.8);\n padding: 60px 50px 0 50px;\n color: #fff;\n text-align: center;\n font-size: 20px;\n }\n [message] strong {\n display: block;\n font-size: 2.5rem;\n }\n [message] img {\n width: 450px;\n max-width: 90%;\n display: block;\n margin: auto;\n margin-top: 20px;\n }\n\n @media screen and (max-width: 480px) {\n [message] {\n padding: 60px 30px 0 30px;\n color: #fff;\n text-align: center;\n font-size: 15px;\n }\n\n [message] strong {\n font-size: 1.6rem;\n }\n }\n `\n\n _applicationMeta?: {\n icon: string\n title: string\n description: string\n }\n\n render() {\n var { icon, title, description } = this.applicationMeta\n\n return html`\n <mwc-icon-button home icon=\"home\" @click=${() => (window.location.href = '/')}></mwc-icon-button>\n\n <div message>\n <strong>${title}</strong>\n ${description}\n <img src=\"/assets/images/home.png\" />\n </div>\n `\n }\n\n get applicationMeta() {\n if (!this._applicationMeta) {\n var iconLink = document.querySelector('link[rel=\"application-icon\"]') as HTMLLinkElement\n var titleMeta = document.querySelector('meta[name=\"application-name\"]') as HTMLMetaElement\n var descriptionMeta = document.querySelector('meta[name=\"application-description\"]') as HTMLMetaElement\n\n this._applicationMeta = {\n icon: iconLink?.href,\n title: titleMeta ? titleMeta.content : 'Things Factory',\n description: descriptionMeta ? descriptionMeta.content : 'Reimagining Software'\n }\n }\n\n return this._applicationMeta\n }\n}\n"]}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
declare const app: (state: {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
contextPath: string;
|
|
4
|
+
domains: {
|
|
5
|
+
name: string;
|
|
6
|
+
subdomain: string;
|
|
7
|
+
}[];
|
|
8
|
+
} | undefined, action: any) => {
|
|
9
|
+
modules: any;
|
|
10
|
+
baseUrl: string;
|
|
11
|
+
contextPath: string;
|
|
12
|
+
domains: {
|
|
13
|
+
name: string;
|
|
14
|
+
subdomain: string;
|
|
15
|
+
}[];
|
|
16
|
+
} | {
|
|
17
|
+
baseUrl: any;
|
|
18
|
+
contextPath: string;
|
|
19
|
+
domains: {
|
|
20
|
+
name: string;
|
|
21
|
+
subdomain: string;
|
|
22
|
+
}[];
|
|
23
|
+
} | {
|
|
24
|
+
contextPath: any;
|
|
25
|
+
baseUrl: string;
|
|
26
|
+
domains: {
|
|
27
|
+
name: string;
|
|
28
|
+
subdomain: string;
|
|
29
|
+
}[];
|
|
30
|
+
} | {
|
|
31
|
+
domains: any;
|
|
32
|
+
domain: any;
|
|
33
|
+
baseUrl: string;
|
|
34
|
+
contextPath: string;
|
|
35
|
+
};
|
|
36
|
+
export default app;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { getPathInfo } from '@operato/utils';
|
|
2
|
+
import { SET_DOMAINS, UPDATE_BASE_URL, UPDATE_CONTEXT_PATH, UPDATE_MODULES } from '../actions/app.js';
|
|
3
|
+
const INITIAL_STATE = {
|
|
4
|
+
baseUrl: location.origin,
|
|
5
|
+
contextPath: getPathInfo(location.pathname).contextPath,
|
|
6
|
+
domains: []
|
|
7
|
+
};
|
|
8
|
+
const app = (state = INITIAL_STATE, action) => {
|
|
9
|
+
switch (action.type) {
|
|
10
|
+
case UPDATE_MODULES:
|
|
11
|
+
return {
|
|
12
|
+
...state,
|
|
13
|
+
modules: action.modules
|
|
14
|
+
};
|
|
15
|
+
case UPDATE_BASE_URL:
|
|
16
|
+
return {
|
|
17
|
+
...state,
|
|
18
|
+
baseUrl: action.baseUrl
|
|
19
|
+
};
|
|
20
|
+
case UPDATE_CONTEXT_PATH:
|
|
21
|
+
return {
|
|
22
|
+
...state,
|
|
23
|
+
contextPath: action.contextPath
|
|
24
|
+
};
|
|
25
|
+
case SET_DOMAINS:
|
|
26
|
+
return {
|
|
27
|
+
...state,
|
|
28
|
+
domains: action.domains,
|
|
29
|
+
domain: action.domain
|
|
30
|
+
};
|
|
31
|
+
default:
|
|
32
|
+
return state;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export default app;
|
|
36
|
+
//# sourceMappingURL=app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/reducers/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE5C,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAErG,MAAM,aAAa,GAOf;IACF,OAAO,EAAE,QAAQ,CAAC,MAAM;IACxB,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,WAAW;IACvD,OAAO,EAAE,EAAE;CACZ,CAAA;AAED,MAAM,GAAG,GAAG,CAAC,KAAK,GAAG,aAAa,EAAE,MAAW,EAAE,EAAE;IACjD,QAAQ,MAAM,CAAC,IAAI,EAAE;QACnB,KAAK,cAAc;YACjB,OAAO;gBACL,GAAG,KAAK;gBACR,OAAO,EAAE,MAAM,CAAC,OAAO;aACxB,CAAA;QACH,KAAK,eAAe;YAClB,OAAO;gBACL,GAAG,KAAK;gBACR,OAAO,EAAE,MAAM,CAAC,OAAO;aACxB,CAAA;QACH,KAAK,mBAAmB;YACtB,OAAO;gBACL,GAAG,KAAK;gBACR,WAAW,EAAE,MAAM,CAAC,WAAW;aAChC,CAAA;QAEH,KAAK,WAAW;YACd,OAAO;gBACL,GAAG,KAAK;gBACR,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB,CAAA;QAEH;YACE,OAAO,KAAK,CAAA;KACf;AACH,CAAC,CAAA;AAED,eAAe,GAAG,CAAA","sourcesContent":["import { getPathInfo } from '@operato/utils'\n\nimport { SET_DOMAINS, UPDATE_BASE_URL, UPDATE_CONTEXT_PATH, UPDATE_MODULES } from '../actions/app.js'\n\nconst INITIAL_STATE: {\n baseUrl: string\n contextPath: string\n domains: {\n name: string\n subdomain: string\n }[]\n} = {\n baseUrl: location.origin,\n contextPath: getPathInfo(location.pathname).contextPath,\n domains: []\n}\n\nconst app = (state = INITIAL_STATE, action: any) => {\n switch (action.type) {\n case UPDATE_MODULES:\n return {\n ...state,\n modules: action.modules\n }\n case UPDATE_BASE_URL:\n return {\n ...state,\n baseUrl: action.baseUrl\n }\n case UPDATE_CONTEXT_PATH:\n return {\n ...state,\n contextPath: action.contextPath\n }\n\n case SET_DOMAINS:\n return {\n ...state,\n domains: action.domains,\n domain: action.domain\n }\n\n default:\n return state\n }\n}\n\nexport default app\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const route: (state: {
|
|
2
|
+
page: string;
|
|
3
|
+
resourceId: string;
|
|
4
|
+
params: any;
|
|
5
|
+
activePage: any;
|
|
6
|
+
context: any;
|
|
7
|
+
callbacks: any[];
|
|
8
|
+
} | undefined, action: any) => {
|
|
9
|
+
page: any;
|
|
10
|
+
resourceId: any;
|
|
11
|
+
params: any;
|
|
12
|
+
activePage: any;
|
|
13
|
+
context: any;
|
|
14
|
+
callbacks: any[];
|
|
15
|
+
};
|
|
16
|
+
export default route;
|