@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,57 @@
|
|
|
1
|
+
import startCase from 'lodash/startCase';
|
|
2
|
+
import { updateMetadata } from 'pwa-helpers/metadata.js';
|
|
3
|
+
import { REGISTER_NAVIGATION_CALLBACK, UNREGISTER_NAVIGATION_CALLBACK, UPDATE_ACTIVE_PAGE, UPDATE_CONTEXT, UPDATE_PAGE } from '../actions/route.js';
|
|
4
|
+
const APP_TITLE_EL = document.querySelector('meta[name="application-name"]');
|
|
5
|
+
var appTitle;
|
|
6
|
+
if (APP_TITLE_EL) {
|
|
7
|
+
appTitle = APP_TITLE_EL.content;
|
|
8
|
+
}
|
|
9
|
+
const INITIAL_STATE = {
|
|
10
|
+
page: '',
|
|
11
|
+
resourceId: '',
|
|
12
|
+
params: {},
|
|
13
|
+
activePage: null,
|
|
14
|
+
context: {},
|
|
15
|
+
callbacks: []
|
|
16
|
+
};
|
|
17
|
+
const route = (state = INITIAL_STATE, action) => {
|
|
18
|
+
var _a;
|
|
19
|
+
switch (action.type) {
|
|
20
|
+
case UPDATE_PAGE:
|
|
21
|
+
return {
|
|
22
|
+
...state,
|
|
23
|
+
page: action.page,
|
|
24
|
+
resourceId: action.resourceId,
|
|
25
|
+
params: action.params
|
|
26
|
+
};
|
|
27
|
+
case UPDATE_CONTEXT:
|
|
28
|
+
let title = (_a = action.context) === null || _a === void 0 ? void 0 : _a.title;
|
|
29
|
+
let text = typeof title === 'object' ? title.text : title;
|
|
30
|
+
updateMetadata({
|
|
31
|
+
title: appTitle + (text ? ` - ${startCase(text)}` : '')
|
|
32
|
+
});
|
|
33
|
+
return {
|
|
34
|
+
...state,
|
|
35
|
+
context: action.context || (state.activePage && state.activePage.context) || {}
|
|
36
|
+
};
|
|
37
|
+
case UPDATE_ACTIVE_PAGE:
|
|
38
|
+
return {
|
|
39
|
+
...state,
|
|
40
|
+
activePage: action.activePage
|
|
41
|
+
};
|
|
42
|
+
case REGISTER_NAVIGATION_CALLBACK:
|
|
43
|
+
return {
|
|
44
|
+
...state,
|
|
45
|
+
callbacks: [...state.callbacks, action.callback]
|
|
46
|
+
};
|
|
47
|
+
case UNREGISTER_NAVIGATION_CALLBACK:
|
|
48
|
+
return {
|
|
49
|
+
...state,
|
|
50
|
+
callbacks: state.callbacks.filter(callback => callback !== action.callback)
|
|
51
|
+
};
|
|
52
|
+
default:
|
|
53
|
+
return state;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
export default route;
|
|
57
|
+
//# sourceMappingURL=route.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../src/reducers/route.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,EACL,4BAA4B,EAC5B,8BAA8B,EAC9B,kBAAkB,EAClB,cAAc,EACd,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAE5B,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,+BAA+B,CAAoB,CAAA;AAE/F,IAAI,QAA4B,CAAA;AAChC,IAAI,YAAY,EAAE;IAChB,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAA;CAChC;AAED,MAAM,aAAa,GAOf;IACF,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,EAAE;IACd,MAAM,EAAE,EAAE;IACV,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,EAAE;IACX,SAAS,EAAE,EAAE;CACd,CAAA;AAED,MAAM,KAAK,GAAG,CAAC,KAAK,GAAG,aAAa,EAAE,MAAW,EAAE,EAAE;;IACnD,QAAQ,MAAM,CAAC,IAAI,EAAE;QACnB,KAAK,WAAW;YACd,OAAO;gBACL,GAAG,KAAK;gBACR,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB,CAAA;QACH,KAAK,cAAc;YACjB,IAAI,KAAK,GAAG,MAAA,MAAM,CAAC,OAAO,0CAAE,KAAK,CAAA;YACjC,IAAI,IAAI,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAA;YAEzD,cAAc,CAAC;gBACb,KAAK,EAAE,QAAQ,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACxD,CAAC,CAAA;YACF,OAAO;gBACL,GAAG,KAAK;gBACR,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE;aAChF,CAAA;QACH,KAAK,kBAAkB;YACrB,OAAO;gBACL,GAAG,KAAK;gBACR,UAAU,EAAE,MAAM,CAAC,UAAU;aAC9B,CAAA;QAEH,KAAK,4BAA4B;YAC/B,OAAO;gBACL,GAAG,KAAK;gBACR,SAAS,EAAE,CAAC,GAAG,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC;aACjD,CAAA;QACH,KAAK,8BAA8B;YACjC,OAAO;gBACL,GAAG,KAAK;gBACR,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC;aAC5E,CAAA;QAEH;YACE,OAAO,KAAK,CAAA;KACf;AACH,CAAC,CAAA;AAED,eAAe,KAAK,CAAA","sourcesContent":["import startCase from 'lodash/startCase'\nimport { updateMetadata } from 'pwa-helpers/metadata.js'\n\nimport {\n REGISTER_NAVIGATION_CALLBACK,\n UNREGISTER_NAVIGATION_CALLBACK,\n UPDATE_ACTIVE_PAGE,\n UPDATE_CONTEXT,\n UPDATE_PAGE\n} from '../actions/route.js'\n\nconst APP_TITLE_EL = document.querySelector('meta[name=\"application-name\"]') as HTMLMetaElement\n\nvar appTitle: string | undefined\nif (APP_TITLE_EL) {\n appTitle = APP_TITLE_EL.content\n}\n\nconst INITIAL_STATE: {\n page: string\n resourceId: string\n params: any\n activePage: any\n context: any\n callbacks: any[]\n} = {\n page: '',\n resourceId: '',\n params: {},\n activePage: null,\n context: {},\n callbacks: []\n}\n\nconst route = (state = INITIAL_STATE, action: any) => {\n switch (action.type) {\n case UPDATE_PAGE:\n return {\n ...state,\n page: action.page,\n resourceId: action.resourceId,\n params: action.params\n }\n case UPDATE_CONTEXT:\n let title = action.context?.title\n let text = typeof title === 'object' ? title.text : title\n\n updateMetadata({\n title: appTitle + (text ? ` - ${startCase(text)}` : '')\n })\n return {\n ...state,\n context: action.context || (state.activePage && state.activePage.context) || {}\n }\n case UPDATE_ACTIVE_PAGE:\n return {\n ...state,\n activePage: action.activePage\n }\n\n case REGISTER_NAVIGATION_CALLBACK:\n return {\n ...state,\n callbacks: [...state.callbacks, action.callback]\n }\n case UNREGISTER_NAVIGATION_CALLBACK:\n return {\n ...state,\n callbacks: state.callbacks.filter(callback => callback !== action.callback)\n }\n\n default:\n return state\n }\n}\n\nexport default route\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { lazyReducerEnhancer } from 'pwa-helpers/lazy-reducer-enhancer.js';
|
|
2
|
+
import { applyMiddleware, combineReducers, compose, createStore } from 'redux';
|
|
3
|
+
import thunk from 'redux-thunk';
|
|
4
|
+
import app from './reducers/app.js';
|
|
5
|
+
import route from './reducers/route.js';
|
|
6
|
+
// Sets up a Chrome extension for time travel debugging.
|
|
7
|
+
// See https://github.com/zalmoxisus/redux-devtools-extension for more information.
|
|
8
|
+
const devCompose = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
|
|
9
|
+
export const store = createStore(state => state, devCompose(lazyReducerEnhancer(combineReducers), applyMiddleware(thunk)));
|
|
10
|
+
// Initially loaded reducers.
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
store.addReducers({
|
|
13
|
+
app,
|
|
14
|
+
route
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAA;AAC1E,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC9E,OAAO,KAAK,MAAM,aAAa,CAAA;AAE/B,OAAO,GAAG,MAAM,mBAAmB,CAAA;AACnC,OAAO,KAAK,MAAM,qBAAqB,CAAA;AAMvC,wDAAwD;AACxD,mFAAmF;AACnF,MAAM,UAAU,GAAG,MAAM,CAAC,oCAAoC,IAAI,OAAO,CAAA;AAEzE,MAAM,CAAC,MAAM,KAAK,GAAG,WAAW,CAC9B,KAAK,CAAC,EAAE,CAAC,KAAK,EACd,UAAU,CAAC,mBAAmB,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC,CACzE,CAAA;AAED,6BAA6B;AAC7B,aAAa;AACb,KAAK,CAAC,WAAW,CAAC;IAChB,GAAG;IACH,KAAK;CACN,CAAC,CAAA","sourcesContent":["import { lazyReducerEnhancer } from 'pwa-helpers/lazy-reducer-enhancer.js'\nimport { applyMiddleware, combineReducers, compose, createStore } from 'redux'\nimport thunk from 'redux-thunk'\n\nimport app from './reducers/app.js'\nimport route from './reducers/route.js'\n\ndeclare global {\n var __REDUX_DEVTOOLS_EXTENSION_COMPOSE__: any\n}\n\n// Sets up a Chrome extension for time travel debugging.\n// See https://github.com/zalmoxisus/redux-devtools-extension for more information.\nconst devCompose = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose\n\nexport const store = createStore(\n state => state,\n devCompose(lazyReducerEnhancer(combineReducers), applyMiddleware(thunk))\n)\n\n// Initially loaded reducers.\n// @ts-ignore\nstore.addReducers({\n app,\n route\n})\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../@types/global/index.d.ts","../src/index.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/redux/index.d.ts","../../../node_modules/pwa-helpers/lazy-reducer-enhancer.d.ts","../../../node_modules/redux-thunk/es/types.d.ts","../../../node_modules/redux-thunk/es/index.d.ts","../../utils/dist/src/sleep.d.ts","../../utils/dist/src/file-drop-helper.d.ts","../../utils/dist/src/context-path.d.ts","../../utils/dist/src/index.d.ts","../src/actions/app.ts","../src/reducers/app.ts","../../../node_modules/@types/lodash/common/common.d.ts","../../../node_modules/@types/lodash/common/array.d.ts","../../../node_modules/@types/lodash/common/collection.d.ts","../../../node_modules/@types/lodash/common/date.d.ts","../../../node_modules/@types/lodash/common/function.d.ts","../../../node_modules/@types/lodash/common/lang.d.ts","../../../node_modules/@types/lodash/common/math.d.ts","../../../node_modules/@types/lodash/common/number.d.ts","../../../node_modules/@types/lodash/common/object.d.ts","../../../node_modules/@types/lodash/common/seq.d.ts","../../../node_modules/@types/lodash/common/string.d.ts","../../../node_modules/@types/lodash/common/util.d.ts","../../../node_modules/@types/lodash/index.d.ts","../../../node_modules/@types/lodash/startcase.d.ts","../../../node_modules/pwa-helpers/metadata.d.ts","../src/actions/route.ts","../src/reducers/route.ts","../src/store.ts","../src/actions/index.ts","../../../node_modules/@lit/reactive-element/css-tag.d.ts","../../../node_modules/@lit/reactive-element/reactive-controller.d.ts","../../../node_modules/@lit/reactive-element/reactive-element.d.ts","../../../node_modules/@types/trusted-types/lib/index.d.ts","../../../node_modules/@types/trusted-types/index.d.ts","../../../node_modules/lit-html/directive.d.ts","../../../node_modules/lit-html/lit-html.d.ts","../../../node_modules/lit-element/lit-element.d.ts","../../../node_modules/lit/index.d.ts","../src/app/app-style.ts","../../../node_modules/@lit/reactive-element/decorators/base.d.ts","../../../node_modules/@lit/reactive-element/decorators/custom-element.d.ts","../../../node_modules/@lit/reactive-element/decorators/property.d.ts","../../../node_modules/@lit/reactive-element/decorators/state.d.ts","../../../node_modules/@lit/reactive-element/decorators/event-options.d.ts","../../../node_modules/@lit/reactive-element/decorators/query.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-all.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-async.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts","../../../node_modules/lit/decorators.d.ts","../../../node_modules/pwa-helpers/connect-mixin.d.ts","../../../node_modules/pwa-helpers/router.d.ts","../../styles/dist/src/headroom-styles.d.ts","../../styles/dist/src/scrollbar-styles.d.ts","../../styles/dist/src/spinner-styles.d.ts","../../styles/dist/src/tooltip-styles.d.ts","../../styles/dist/src/index.d.ts","../src/app/app.ts","../../../node_modules/@types/lodash/isequal.d.ts","../src/app/pages/page-view.ts","../src/app/pages/page-404.ts","../../../node_modules/@material/base/foundation.d.ts","../../../node_modules/@material/base/types.d.ts","../../../node_modules/@material/base/component.d.ts","../../../node_modules/@material/base/index.d.ts","../../../node_modules/@material/mwc-base/utils.d.ts","../../../node_modules/@material/mwc-base/base-element.d.ts","../../../node_modules/@material/ripple/types.d.ts","../../../node_modules/@material/ripple/adapter.d.ts","../../../node_modules/@material/ripple/foundation.d.ts","../../../node_modules/@material/mwc-ripple/mwc-ripple-base.d.ts","../../../node_modules/@material/mwc-ripple/mwc-ripple.d.ts","../../../node_modules/@material/mwc-base/aria-property.d.ts","../../../node_modules/@material/mwc-ripple/ripple-handlers.d.ts","../../../node_modules/@material/mwc-icon-button/mwc-icon-button-base.d.ts","../../../node_modules/@material/mwc-icon-button/mwc-icon-button.d.ts","../../../node_modules/@material/mwc-icon/mwc-icon.d.ts","../../../node_modules/lit-html/directives/class-map.d.ts","../../../node_modules/lit/directives/class-map.d.ts","../../../node_modules/@material/mwc-button/mwc-button-base.d.ts","../../../node_modules/@material/mwc-button/mwc-button.d.ts","../src/entries/public/home.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/mocha/index.d.ts"],"fileInfos":[{"version":"89f78430e422a0f06d13019d60d5a45b37ec2d28e67eb647f73b1b0d19a46b72","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"abba1071bfd89e55e88a054b0c851ea3e8a494c340d0f3fab19eb18f6afb0c9e","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"d071129cba6a5f2700be09c86c07ad2791ab67d4e5ed1eb301d6746c62745ea4","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"439ece86b8b4d4af78af97e74d373ae1cd657c7169f4dee55038648217ca9fcf","e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","12f4cfe2fe60b810c3174537bc2ddb20c1067b7768643d12cb1266fd183afb75",{"version":"8f19251323456195ec9236df857bac3b8f97b73b540ef06ead2ceccc3884954f","affectsGlobalScope":true},"701978f3975f96e76e3ffc2e1762e3a97e3d323812049fb6fdfd559579b89708","d50a158fc581be7b1c51253ad33cb29c0a8ce3c42ca38775ffadf104c36376d0","1f2cdbf59d0b7933678a64ac26ae2818c48ff9ebf93249dde775dc3e173e16bf","05cfea0488751015b0b85911b6cdcde7c6cebdd9b8cada1ec0b5c1736357a552","6d1f118cfbf15c813f578cf6b87da76d075698bf7db964cb7c3d75f0309652f7","74a8a08e5d642a108ae7b23e72bded7b9d784c665458affdfb1770c1b19bcdd1","43f52604889acbcae7014b3f02b3de8a1c214f47aaaef6f9bb5eef47f6b2aa15","7b48718e216c87c95034533cb162482b9e7d8135b830089e31796aa192b45e29","7ed9e9171143f9e565a55d9b9e8b52a70946490021141395ed8a6083d2026bc1","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","fe4a2042d087990ebfc7dc0142d5aaf5a152e4baea86b45f283f103ec1e871ea","d88a479cccf787b4aa82362150fbeba5211a32dbfafa7b92ba6995ecaf9a1a89","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","ae9930989ed57478eb03b9b80ad3efa7a3eacdfeff0f78ecf7894c4963a64f93","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","6ac6f24aff52e62c3950461aa17eab26e3a156927858e6b654baef0058b4cd1e",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"257511614ce25e8445c8c7ffedd86a618680f2a937e420403c10baa12321b92a","66e64ed8de436d3ceabe6c3f59dd0a39a5237991bccfda5751c78d129e436f68","2605b92f7165ae8a0111edbc749d763f3048f0f56c2fe49028763605e737fb51","5f2b0767266aca2f5c8da1b232b269d53986d4cc4793693fe66da481fe5e16c2",{"version":"79dabd9cbd1ea216b2ac7255943694e57c3592d907c7bfc1a3b45d4b5c4ab187","affectsGlobalScope":true},"25682e1aaa60af71bb32a0daebb8ba7a15551aff880651d4c2cc0fa5b5fc9309","0c8a56610b08f55e29ffb466cd27626ad6dbe822312a398026e82270c63088e3","1e5743b25a63fd34ffbae89adcbf248ee17db6ed08d90079ffa93803c3e80d2a","7b33ee85f2e96a51c0e3bcee47b247a24515aff37a7d8b5dfe4e18b735d37440","2fcd2d22b1f30555e785105597cd8f57ed50300e213c4f1bbca6ae149f782c38",{"version":"bb4248c7f953233ac52332088fac897d62b82be07244e551d87c5049600b6cf7","affectsGlobalScope":true},"70f04c91d3186b1b10157157887fab664968fc9b88377785a5ee42750c202c6d","06e20da1bc94df355f22ac7a9533c2488816ec4cb9134d9b160a263629a07072","c311ef8d8b159d0c268b415f78c1949498dc2d14455a9891c5b8ef84625b1e41","f07a77a7fb1d49aa2b61cb68bf712a083487acd7130d20223a83de03af0c257d","4c8f3565c040d57a7ed0d0f4b817464f0cbf7a5c85829667baa19267a8fa6e3e","97c58f6db61d45712d91d2260994817ae2b568bbb37cc280013079b6b5d2232d","ac388c7c7a262213a3700451bc921e382a93fb27c0252c34ccf03540b4ce044b","9bdb35d0b28dcd5d8f0879bd29f0cf07b7eb48aa63be4dd44057e32fcfeb1c83","fb0107c83e2e0e75b77dacd0c3c6c3ab6844e98dce2a8f858c6f0a57c12136a6","84610cf09dee3cefc910555318f1ad7b45f1cba36905a86849324ca4fead2385","a25d1e52291791819032826af5c52987e16ffdb96e8bb69f7f1790f5ab080be6","d660961abada6b5030461f3322ef3a2e1d9fec74167574f8b590a7796cf90a72","707b4eae3d469b2f347d2083037151922f94c370a9456ebd5ac0a4fb7441c7e7","ef509d57201aa4e2e3e2b3d1fafd066a8ce68cd2caea737d539c3544f5a99a67","84c66a77a1302611ea5001dc88d10de1b5d87c6b2f30a48585495217421ce1ac","23c05cc4d97aa608b5ea8badadb4e1b0c4e306ed5d651c5d1760552e91d1ad92","452807fa3050dbc39caf1ffd2e9cf9b36e719e36ee062f6adebe50be426790d3","cf93fb9208a01c80f0fad245c4360356e5de6c2384b7641acf0b9cc2f5c42448","336398b0efaf964124e636a9b29c4edd5870aee79ac64bf87be58a9d66b7c048","571bc65ec37ba124e762bb822e14a2b8502dc684e356be8feaccbd6b9cadd023","2bbbefc1235500bdb5091f240dc8cba861a95342272f7d11b7574a0d2ef4f85e","69398d1e569b8c8542902444a8c9bed2fc446b846caea7dbc8e57b6df36c9c62","3d89c1bb5080c78d01aa8d56ab274bbeadb52d30743aeea2840e258ea59b9bb7","5ebc6dda07cd1112abcba3da894fafc01c04b37f55bc94bc110da3a662236cee","4e62f2916eff58fb7642853a16bf8c37a5a12a5aa4c6cdf0620c2203779e92b5","7bb66ba955459e755e19f2bf514fb5eda3f4798d2bd50ea7f9dca3caf6d3a866","a0667520a6521c12128fc28cbd5b2af58eef11c5b2a7441e0f0d47f50bf6c8e3","820c26194ad4089bc503b02bbedbd86a865e9c8a05c58ef88c8d19d9c019712a","eda22dbab152e3579ee541522ba2ddc8e24e32fd7535b913709848f16c517caa","6778cdeced9eb23210b26b801cd757b03c052b7738628475acad7c7a3e94c20f","0dcf4c2bf1bb547e2ae5b8dce4656a56fbd15e3401ff5236ea0b93b6c60f9249","9917d466f5b05c616c35c35a778464ae4ec15e00bfce90098743f448fc063d54","d375de88ab19f6c105a65fc89eca1ae782362c5c395283b0c85ef39c7b835dfe","025eb503355f4bbe3e3fecc0bd1a72ecaa9cda73db6e0ecc657779d4172695f2","7b3c1d688dcb8645b5a6c37bce5b047da92b4c298ed8709e03e987e0efb035b1","00096d29ccab72a72092cca31fb92d78b92880bddc53e5904149d21e76648c48",{"version":"87e9ab1e4466fb88c90b179130baaab80d91dd1644de2eb6512c79b24ec11216","affectsGlobalScope":true},"024fea9ee598cfe747f18340ad74e4ea428fc2a7988250ff9fcfce5673b7d422","95ff8a2ebfc0b8b9613faf8d9c948dcc6bf8d5c0052a2d4ae21cacf6cdd28cb9","b28d45120b9dd263bb8575646bc1bce9b89c714487fa7003acb06545b859cf35",{"version":"4ac91fa95beb493421723c097d1fa76516e60bd04c5beca11ad8af627a12b74e","affectsGlobalScope":true},{"version":"27b285e901600242883d62a5fff9f5d262c6fa128b6e6c6963f981f2630a957e","affectsGlobalScope":true},"147cb5b590b77c8c58e4ef0af1ff11ee90ee2b34262816df0665b6ff8fd50aad","6e0575b628aedce5db38c17569e5c909beead07f9052fe7944fb8bfccc3db92e","fd4b34fa1af0c7ac73f9f827d0993dba20523b2cc3ca1e16eaaa2165f46d3172",{"version":"1bc2e3b2cbb2e253f9edb99661c7f48b8e54d8d0b822d29ff6f8ad9a91b4fb79","affectsGlobalScope":true},"71da0a8f613180a839b2542802d425aa4bd4b6ebe6c929eed083c7fcf61f7ef0","0cba3a5d7b81356222594442753cf90dd2892e5ccfe1d262aaca6896ba6c1380","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"c2ab70bbc7a24c42a790890739dd8a0ba9d2e15038b40dff8163a97a5d148c00","affectsGlobalScope":true},"422dbb183fdced59425ca072c8bd09efaa77ce4e2ab928ec0d8a1ce062d2a45a",{"version":"2a801b0322994c3dd7f0ef30265d19b3dd3bae6d793596879166ed6219c3da68","affectsGlobalScope":true},"1dab5ab6bcf11de47ab9db295df8c4f1d92ffa750e8f095e88c71ce4c3299628","f71f46ccd5a90566f0a37b25b23bc4684381ab2180bdf6733f4e6624474e1894",{"version":"54e65985a3ee3cec182e6a555e20974ea936fc8b8d1738c14e8ed8a42bd921d4","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","bcc8caf03ee65fe8610d258752f255fbdddbb2e4de7b6c5628956a5a0d859ec8","34e5de87d983bc6aefef8b17658556e3157003e8d9555d3cb098c6bef0b5fbc8","cc0b61316c4f37393f1f9595e93b673f4184e9d07f4c127165a490ec4a928668","f27371653aded82b2b160f7a7033fb4a5b1534b6f6081ef7be1468f0f15327d3","c762cd6754b13a461c54b59d0ae0ab7aeef3c292c6cf889873f786ee4d8e75c9","f4ea7d5df644785bd9fbf419930cbaec118f0d8b4160037d2339b8e23c059e79",{"version":"c28e5baab1b53377c90d12970e207a2644bc3627840066449e37e2a59125d07e","affectsGlobalScope":true},"7a5459efa09ea82088234e6533a203d528c594b01787fb90fba148885a36e8b6","ae97e20f2e10dbeec193d6a2f9cd9a367a1e293e7d6b33b68bacea166afd7792","fce6a1a1553ff7d54ffb8bb3ae488c9cb5f2f4f4e52212c1abe40f544819ef35","ad41bb744149e92adb06eb953da195115620a3f2ad48e7d3ae04d10762dae197","bf73c576885408d4a176f44a9035d798827cc5020d58284cb18d7573430d9022","7ae078ca42a670445ae0c6a97c029cb83d143d62abd1730efb33f68f0b2c0e82",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"f548e3501187467575e639cabc2e845f2e217a50d5f6869e32cace49874a4255","12eea70b5e11e924bb0543aea5eadc16ced318aa26001b453b0d561c2fd0bd1e","08777cd9318d294646b121838574e1dd7acbb22c21a03df84e1f2c87b1ad47f2","08a90bcdc717df3d50a2ce178d966a8c353fd23e5c392fd3594a6e39d9bb6304",{"version":"bd1a08e30569b0fb2f0b21035eb9b039871f68faa9b98accf847e9c878c5e0a9","affectsGlobalScope":true},"2a12d2da5ac4c4979401a3f6eaafa874747a37c365e4bc18aa2b171ae134d21b","002b837927b53f3714308ecd96f72ee8a053b8aeb28213d8ec6de23ed1608b66","1dc9c847473bb47279e398b22c740c83ea37a5c88bf66629666e3cf4c5b9f99c","a9e4a5a24bf2c44de4c98274975a1a705a0abbaad04df3557c2d3cd8b1727949","00fa7ce8bc8acc560dc341bbfdf37840a8c59e6a67c9bfa3fa5f36254df35db2","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"cfe724f7c694aab65a9bdd1acb05997848c504548c9d4c71645c187a091cfa2a","5f0ed51db151c2cdc4fa3bb0f44ce6066912ad001b607a34e65a96c52eb76248",{"version":"3345c276cab0e76dda86c0fb79104ff915a4580ba0f3e440870e183b1baec476","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","e383ff72aabf294913f8c346f5da1445ae6ad525836d28efd52cbadc01a361a6","f52fbf64c7e480271a9096763c4882d356b05cab05bf56a64e68a95313cd2ce2","59bdb65f28d7ce52ccfc906e9aaf422f8b8534b2d21c32a27d7819be5ad81df7","1835259a20b9fa6b1882931375b69ae5978195f2b139b4e0db51ec8319261649","b52cd693219a63dd21282ac99a7bf55f77cbe8a91f097968856419cc2e05f017","3aff9c8c36192e46a84afe7b926136d520487155154ab9ba982a8b544ea8fc95","a880cf8d85af2e4189c709b0fea613741649c0e40fffb4360ec70762563d5de0","85bbf436a15bbeda4db888be3062d47f99c66fd05d7c50f0f6473a9151b6a070","9f9c49c95ecd25e0cb2587751925976cf64fd184714cb11e213749c80cf0f927","f0c75c08a71f9212c93a719a25fb0320d53f2e50ca89a812640e08f8ad8c408c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"267af67ea520cabd16402522756b19ac63d9e2c1c86e7c4d1ddeb991c32e12c9",{"version":"5f186a758a616c107c70e8918db4630d063bd782f22e6e0b17573b125765b40b","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"outDir":"./","rootDir":"..","sourceMap":true,"strict":true,"target":5,"useDefineForClassFields":false},"fileIdsList":[[167],[74,167],[82,167],[74,82,167],[72,73,167],[103,104,167],[103,104,105,167],[80,104,106,107,167],[80,113,114,115,118,120,167],[80,121,167],[80,113,114,115,167],[80,116,167],[80,167],[80,107,108,110,111,167],[80,112,167],[107,167],[104,109,167],[103,110,167],[53,55,56,57,58,59,60,61,62,63,64,65,167],[53,54,56,57,58,59,60,61,62,63,64,65,167],[54,55,56,57,58,59,60,61,62,63,64,65,167],[53,54,55,57,58,59,60,61,62,63,64,65,167],[53,54,55,56,58,59,60,61,62,63,64,65,167],[53,54,55,56,57,59,60,61,62,63,64,65,167],[53,54,55,56,57,58,60,61,62,63,64,65,167],[53,54,55,56,57,58,59,61,62,63,64,65,167],[53,54,55,56,57,58,59,60,62,63,64,65,167],[53,54,55,56,57,58,59,60,61,63,64,65,167],[53,54,55,56,57,58,59,60,61,62,64,65,167],[53,54,55,56,57,58,59,60,61,62,63,65,167],[53,54,55,56,57,58,59,60,61,62,63,64,167],[65,167],[124,167],[127,167],[128,133,167],[129,139,140,147,156,166,167],[129,130,139,147,167],[131,167],[132,133,140,148,167],[133,156,163,167],[134,136,139,147,167],[135,167],[136,137,167],[138,139,167],[139,167],[139,140,141,156,166,167],[139,140,141,156,167],[142,147,156,166,167],[139,140,142,143,147,156,163,166,167],[142,144,156,163,166,167],[124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173],[139,145,167],[146,166,167],[136,139,147,156,167],[148,167],[149,167],[127,150,167],[151,165,167,171],[152,167],[153,167],[139,154,167],[154,155,167,169],[139,156,157,158,167],[156,158,167],[156,157,167],[159,167],[160,167],[139,161,162,167],[161,162,167],[133,147,156,163,167],[164,167],[147,165,167],[128,142,153,166,167],[133,167],[156,167,168],[167,169],[167,170],[128,133,139,141,150,156,166,167,169,171],[156,167,172],[75,167],[74,78,167],[78,167],[77,78,167],[76,77,167],[83,84,85,86,87,88,89,90,167],[119,167],[74,78,79,167],[43,167],[43,45,167],[42,167],[42,51,68,167],[42,50,70,167],[42,80,167],[40,42,50,51,68,70,80,81,91,92,93,98,167],[42,80,101,167],[42,68,70,80,91,100,167],[42,80,91,117,122,167],[42,50,51,167],[42,66,67,68,167],[42,43,44,46,52,69,167],[94,95,96,97,167],[47,48,49,167]],"referencedMap":[[72,1],[82,2],[83,3],[86,4],[84,4],[88,4],[90,4],[89,4],[87,4],[85,3],[73,1],[74,5],[105,6],[103,1],[106,7],[104,1],[114,1],[108,8],[107,1],[121,9],[122,10],[116,11],[117,12],[118,13],[112,14],[113,15],[115,16],[110,17],[111,18],[109,1],[54,19],[55,20],[53,21],[56,22],[57,23],[58,24],[59,25],[60,26],[61,27],[62,28],[63,29],[64,30],[65,31],[100,32],[66,32],[175,1],[124,33],[125,33],[127,34],[128,35],[129,36],[130,37],[131,38],[132,39],[133,40],[134,41],[135,42],[136,43],[137,43],[138,44],[139,45],[140,46],[141,47],[126,1],[173,1],[142,48],[143,49],[144,50],[174,51],[145,52],[146,53],[147,54],[148,55],[149,56],[150,57],[151,58],[152,59],[153,60],[154,61],[155,62],[156,63],[158,64],[157,65],[159,66],[160,67],[161,68],[162,69],[163,70],[164,71],[165,72],[166,73],[167,74],[168,75],[169,76],[170,77],[171,78],[172,79],[76,80],[75,1],[79,81],[77,82],[119,83],[78,84],[91,85],[120,86],[80,87],[92,88],[44,88],[67,1],[93,1],[46,89],[45,88],[43,1],[42,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[38,1],[34,1],[35,1],[36,1],[37,1],[1,1],[39,1],[40,1],[51,90],[71,91],[68,92],[81,93],[99,94],[102,95],[101,96],[123,97],[41,1],[52,98],[69,99],[70,100],[94,13],[98,101],[95,13],[96,13],[97,13],[49,1],[48,1],[50,102],[47,1]],"exportedModulesMap":[[72,1],[82,2],[83,3],[86,4],[84,4],[88,4],[90,4],[89,4],[87,4],[85,3],[73,1],[74,5],[105,6],[103,1],[106,7],[104,1],[114,1],[108,8],[107,1],[121,9],[122,10],[116,11],[117,12],[118,13],[112,14],[113,15],[115,16],[110,17],[111,18],[109,1],[54,19],[55,20],[53,21],[56,22],[57,23],[58,24],[59,25],[60,26],[61,27],[62,28],[63,29],[64,30],[65,31],[100,32],[66,32],[175,1],[124,33],[125,33],[127,34],[128,35],[129,36],[130,37],[131,38],[132,39],[133,40],[134,41],[135,42],[136,43],[137,43],[138,44],[139,45],[140,46],[141,47],[126,1],[173,1],[142,48],[143,49],[144,50],[174,51],[145,52],[146,53],[147,54],[148,55],[149,56],[150,57],[151,58],[152,59],[153,60],[154,61],[155,62],[156,63],[158,64],[157,65],[159,66],[160,67],[161,68],[162,69],[163,70],[164,71],[165,72],[166,73],[167,74],[168,75],[169,76],[170,77],[171,78],[172,79],[76,80],[75,1],[79,81],[77,82],[119,83],[78,84],[91,85],[120,86],[80,87],[92,88],[44,88],[67,1],[93,1],[46,89],[45,88],[43,1],[42,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[38,1],[34,1],[35,1],[36,1],[37,1],[1,1],[39,1],[40,1],[51,90],[71,91],[68,92],[81,93],[99,94],[102,95],[101,96],[123,97],[41,1],[52,98],[69,99],[70,100],[94,13],[98,101],[95,13],[96,13],[97,13],[49,1],[48,1],[50,102],[47,1]],"semanticDiagnosticsPerFile":[72,82,83,86,84,88,90,89,87,85,73,74,105,103,106,104,114,108,107,121,122,116,117,118,112,113,115,110,111,109,54,55,53,56,57,58,59,60,61,62,63,64,65,100,66,175,124,125,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,126,173,142,143,144,174,145,146,147,148,149,150,151,152,153,154,155,156,158,157,159,160,161,162,163,164,165,166,167,168,169,170,171,172,76,75,79,77,119,78,91,120,80,92,44,67,93,46,45,43,42,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,38,34,35,36,37,1,39,40,51,71,68,81,99,102,101,123,41,52,69,70,94,98,95,96,97,49,48,50,47]},"version":"4.5.4"}
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@operato/shell",
|
|
3
|
+
"description": "WebApplication shell following open-wc recommendations",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"author": "heartyoh",
|
|
6
|
+
"version": "0.3.7",
|
|
7
|
+
"main": "dist/src/index.js",
|
|
8
|
+
"module": "dist/src/index.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./dist/src/index.js"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public",
|
|
14
|
+
"@operato:registry": "https://registry.npmjs.org"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/hatiolab/operato.git",
|
|
19
|
+
"directory": "webcomponents/shell"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"analyze": "cem analyze --litelement",
|
|
23
|
+
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
|
|
24
|
+
"build": "tsc && npm run analyze -- --exclude dist",
|
|
25
|
+
"prepublish": "tsc && npm run analyze -- --exclude dist",
|
|
26
|
+
"lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
|
|
27
|
+
"format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
|
|
28
|
+
"test": "tsc && wtr --coverage",
|
|
29
|
+
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\"",
|
|
30
|
+
"storybook": "tsc && npm run analyze -- --exclude dist && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds -c .storybook/server.mjs\"",
|
|
31
|
+
"storybook:build": "tsc && npm run analyze -- --exclude dist && build-storybook"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@material/mwc-button": "^0.25.3",
|
|
35
|
+
"@material/mwc-icon": "^0.25.3",
|
|
36
|
+
"@material/mwc-icon-button": "^0.25.3",
|
|
37
|
+
"@operato/styles": "^0.3.7",
|
|
38
|
+
"@operato/utils": "^0.3.7",
|
|
39
|
+
"lit": "^2.0.2",
|
|
40
|
+
"lodash": "^4.17.21",
|
|
41
|
+
"pwa-helpers": "^0.9.1",
|
|
42
|
+
"redux": "^4.1.2",
|
|
43
|
+
"redux-thunk": "^2.4.1"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@custom-elements-manifest/analyzer": "^0.4.17",
|
|
47
|
+
"@hatiolab/prettier-config": "^1.0.0",
|
|
48
|
+
"@open-wc/eslint-config": "^4.3.0",
|
|
49
|
+
"@open-wc/testing": "next",
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
51
|
+
"@typescript-eslint/parser": "^4.33.0",
|
|
52
|
+
"@web/dev-server": "^0.1.28",
|
|
53
|
+
"@web/dev-server-storybook": "next",
|
|
54
|
+
"@web/test-runner": "next",
|
|
55
|
+
"concurrently": "^5.3.0",
|
|
56
|
+
"eslint": "^7.32.0",
|
|
57
|
+
"eslint-config-prettier": "^8.3.0",
|
|
58
|
+
"husky": "^4.3.8",
|
|
59
|
+
"lint-staged": "^10.5.4",
|
|
60
|
+
"prettier": "^2.4.1",
|
|
61
|
+
"tslib": "^2.3.1",
|
|
62
|
+
"typescript": "^4.5.2"
|
|
63
|
+
},
|
|
64
|
+
"customElements": "custom-elements.json",
|
|
65
|
+
"prettier": "@hatiolab/prettier-config",
|
|
66
|
+
"husky": {
|
|
67
|
+
"hooks": {
|
|
68
|
+
"pre-commit": "lint-staged"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"lint-staged": {
|
|
72
|
+
"*.ts": [
|
|
73
|
+
"eslint --fix",
|
|
74
|
+
"prettier --write"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"gitHead": "4cc91580b763e2f4f38d95cadef5b18509393bc6"
|
|
78
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const UPDATE_MODULES = 'UPDATE_MODULES'
|
|
2
|
+
export const UPDATE_BASE_URL = 'UPDATE_BASE_URL'
|
|
3
|
+
export const UPDATE_CONTEXT_PATH = 'UPDATE_CONTEXT_PATH'
|
|
4
|
+
export const SET_DOMAINS = 'SET-DOMAINS'
|
|
5
|
+
|
|
6
|
+
export const updateDomains =
|
|
7
|
+
(
|
|
8
|
+
domains: {
|
|
9
|
+
name: string
|
|
10
|
+
subdomain: string
|
|
11
|
+
}[],
|
|
12
|
+
domain: {
|
|
13
|
+
name: string
|
|
14
|
+
subdomain: string
|
|
15
|
+
}
|
|
16
|
+
) =>
|
|
17
|
+
(dispatch: any) => {
|
|
18
|
+
dispatch({
|
|
19
|
+
type: SET_DOMAINS,
|
|
20
|
+
domains,
|
|
21
|
+
domain
|
|
22
|
+
})
|
|
23
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { getPathInfo } from '@operato/utils'
|
|
2
|
+
|
|
3
|
+
import { store } from '../store'
|
|
4
|
+
|
|
5
|
+
export const UPDATE_PAGE = 'UPDATE_PAGE'
|
|
6
|
+
export const UPDATE_CONTEXT = 'UPDATE_CONTEXT'
|
|
7
|
+
export const UPDATE_ACTIVE_PAGE = 'UPDATE_ACTIVE_PAGE'
|
|
8
|
+
|
|
9
|
+
export const REGISTER_NAVIGATION_CALLBACK = 'REGISTER_NAVIGATION_CALLBACK'
|
|
10
|
+
export const UNREGISTER_NAVIGATION_CALLBACK = 'UNREGISTER_NAVIGATION_CALLBACK'
|
|
11
|
+
|
|
12
|
+
export const HOMEPAGE = ''
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 페이지를 이동하는 방법으로는 다음 두가지가 있다.
|
|
16
|
+
* 1. page link를 사용하는 방법 <a href='page'>goto page</a>
|
|
17
|
+
* 이 방법은 route(page)와 동일하다.
|
|
18
|
+
* 2. navigate('page')를 사용하는 방법
|
|
19
|
+
*
|
|
20
|
+
* @param string page
|
|
21
|
+
*/
|
|
22
|
+
export const navigate = (location: string, replace: string) => {
|
|
23
|
+
if (replace) history.replaceState(history.state, '', location)
|
|
24
|
+
else history.pushState({}, '', location)
|
|
25
|
+
|
|
26
|
+
window.dispatchEvent(new Event('popstate'))
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const navigateWithSilence =
|
|
30
|
+
({ pathname: path, search, params }: { pathname: string; search?: string; params?: { [key: string]: any } }) =>
|
|
31
|
+
(dispatch: any) => {
|
|
32
|
+
const { path: pathname } = getPathInfo(path)
|
|
33
|
+
|
|
34
|
+
const reg = /\/([^\/]+)\/*([^\/]*)/
|
|
35
|
+
const decodePath = decodeURIComponent(pathname!)
|
|
36
|
+
const matchReturn = decodePath.match(reg) || []
|
|
37
|
+
const page = matchReturn[1] || HOMEPAGE
|
|
38
|
+
const id = matchReturn[2]
|
|
39
|
+
|
|
40
|
+
// Any other info you might want to extract from the path (like page type),
|
|
41
|
+
// you can do here
|
|
42
|
+
dispatch(loadPage(page, id, params || new URLSearchParams(search)))
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const _preLoadPage = (page: any) => {
|
|
46
|
+
/*
|
|
47
|
+
* _preLoadPage 에서는 page를 load하기 전처리를 수행한다.
|
|
48
|
+
* 예를 들면, page dynamic import 또는 page re-routing
|
|
49
|
+
*/
|
|
50
|
+
var state: any = store.getState()
|
|
51
|
+
|
|
52
|
+
/* override 기능을 위해서 dependency 관계의 역순으로 route를 실행한다. */
|
|
53
|
+
var modules = state.app.modules
|
|
54
|
+
if (modules) {
|
|
55
|
+
for (let i = modules.length - 1; i >= 0; i--) {
|
|
56
|
+
let factoryModule = modules[i]
|
|
57
|
+
let _page = factoryModule.route && factoryModule.route(page)
|
|
58
|
+
if (_page) {
|
|
59
|
+
return _page
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const loadPage = (page: string, id: string, params: { [key: string]: any }) => (dispatch: any) => {
|
|
66
|
+
var newPage = _preLoadPage(page)
|
|
67
|
+
|
|
68
|
+
if (page !== newPage && newPage.indexOf('/') == 0) {
|
|
69
|
+
dispatch(
|
|
70
|
+
navigateWithSilence({
|
|
71
|
+
pathname: newPage,
|
|
72
|
+
params
|
|
73
|
+
})
|
|
74
|
+
)
|
|
75
|
+
return
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
dispatch({
|
|
79
|
+
type: UPDATE_PAGE,
|
|
80
|
+
page: newPage,
|
|
81
|
+
resourceId: id,
|
|
82
|
+
params
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export const route = (url: string) => {
|
|
87
|
+
const link = document.createElement('a')
|
|
88
|
+
|
|
89
|
+
link.setAttribute('href', url)
|
|
90
|
+
|
|
91
|
+
document.body.appendChild(link)
|
|
92
|
+
link.click()
|
|
93
|
+
document.body.removeChild(link)
|
|
94
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { css } from 'lit'
|
|
2
|
+
|
|
3
|
+
export const AppStyle = css`
|
|
4
|
+
:host {
|
|
5
|
+
display: grid;
|
|
6
|
+
|
|
7
|
+
grid-template-rows: var(--app-grid-template-rows, auto 1fr auto);
|
|
8
|
+
grid-template-columns: var(--app-grid-template-columns, auto 1fr auto);
|
|
9
|
+
grid-template-areas: var(--app-grid-template-area, 'header header header' 'nav main aside' 'nav footer aside');
|
|
10
|
+
grid-gap: var(--app-grid-gap, 0em);
|
|
11
|
+
|
|
12
|
+
width: 100vw;
|
|
13
|
+
height: 100vh;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
header-bar {
|
|
17
|
+
grid-area: header;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
nav-bar {
|
|
21
|
+
grid-area: nav;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
main {
|
|
25
|
+
grid-area: main;
|
|
26
|
+
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: row;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
aside-bar {
|
|
34
|
+
grid-area: aside;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
footer-bar {
|
|
38
|
+
grid-area: footer;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
main * {
|
|
42
|
+
flex: 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
main *:not([active]) {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
[hidden] {
|
|
50
|
+
display: none;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
snack-bar {
|
|
54
|
+
z-index: 1000;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Wide layout */
|
|
58
|
+
@media (min-width: 460px) {
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@media print {
|
|
62
|
+
:host {
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: 100%;
|
|
65
|
+
min-height: 100vh;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
`
|
package/src/app/app.ts
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { html, LitElement, PropertyValues } from 'lit'
|
|
2
|
+
import { state } from 'lit/decorators'
|
|
3
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
4
|
+
import { installRouter } from 'pwa-helpers/router.js'
|
|
5
|
+
|
|
6
|
+
import { ScrollbarStyles } from '@operato/styles'
|
|
7
|
+
import { getPathInfo } from '@operato/utils'
|
|
8
|
+
|
|
9
|
+
import { UPDATE_CONTEXT_PATH, UPDATE_MODULES } from '../actions/app'
|
|
10
|
+
import { navigateWithSilence, UPDATE_ACTIVE_PAGE } from '../actions/route'
|
|
11
|
+
import { store } from '../store'
|
|
12
|
+
import { AppStyle } from './app-style'
|
|
13
|
+
|
|
14
|
+
class ThingsApp extends connect(store)(LitElement) {
|
|
15
|
+
static styles = [ScrollbarStyles, AppStyle]
|
|
16
|
+
|
|
17
|
+
@state() _contextPath?: string
|
|
18
|
+
@state() _page?: string
|
|
19
|
+
@state() _pages: { [path: string]: string } = {}
|
|
20
|
+
@state() _resourceId?: string
|
|
21
|
+
@state() _params?: any
|
|
22
|
+
@state() _callbacks: Array<any> = []
|
|
23
|
+
@state() _activePage: any
|
|
24
|
+
@state() _context: any
|
|
25
|
+
@state() _modules: Array<any> = []
|
|
26
|
+
|
|
27
|
+
_moduleInitialized = false
|
|
28
|
+
|
|
29
|
+
render() {
|
|
30
|
+
var params = this._params || {}
|
|
31
|
+
var fullbleed = (this._context && this._context.fullbleed) || (params.fullbleed && params.fullbleed == 'Y')
|
|
32
|
+
var widebleed = (this._context && this._context.widebleed) || (params.widebleed && params.widebleed == 'Y')
|
|
33
|
+
|
|
34
|
+
return html`
|
|
35
|
+
<header-bar ?fullbleed=${fullbleed}></header-bar>
|
|
36
|
+
|
|
37
|
+
<nav-bar ?fullbleed=${fullbleed || widebleed}></nav-bar>
|
|
38
|
+
|
|
39
|
+
<main></main>
|
|
40
|
+
|
|
41
|
+
<aside-bar ?fullbleed=${fullbleed || widebleed}></aside-bar>
|
|
42
|
+
|
|
43
|
+
<footer-bar ?fullbleed=${fullbleed}></footer-bar>
|
|
44
|
+
|
|
45
|
+
<snack-bar></snack-bar>
|
|
46
|
+
`
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
constructor() {
|
|
50
|
+
super()
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
connectedCallback() {
|
|
54
|
+
super.connectedCallback()
|
|
55
|
+
|
|
56
|
+
/* 모듈 임포트를 동적으로 처리한다. */
|
|
57
|
+
import(
|
|
58
|
+
/* webpackPrefetch: true */
|
|
59
|
+
/* webpackPreload: true */
|
|
60
|
+
/* webpackChunkName: "modules" */
|
|
61
|
+
'../module-importer.import'
|
|
62
|
+
).then(module => {
|
|
63
|
+
var modules: {
|
|
64
|
+
name: string
|
|
65
|
+
bootstrap: any
|
|
66
|
+
}[] = module.modules
|
|
67
|
+
|
|
68
|
+
/* lifecycle - bootstrapping */
|
|
69
|
+
this.dispatchEvent(new Event('lifecycle-bootstrap-begin'))
|
|
70
|
+
modules.forEach((m, idx) => {
|
|
71
|
+
try {
|
|
72
|
+
m.bootstrap && m.bootstrap()
|
|
73
|
+
// console.info(`[${idx} BOOTSTRAPED - ${m.name}]`)
|
|
74
|
+
} catch (e) {
|
|
75
|
+
console.error(`[${idx} BOOTSTRAP ERROR -${m.name}]`, e)
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
this.dispatchEvent(new Event('lifecycle-bootstrap-finish'))
|
|
79
|
+
|
|
80
|
+
/* shouldUpdate를 활성화한다. */
|
|
81
|
+
this._moduleInitialized = true
|
|
82
|
+
|
|
83
|
+
/* modules를 store에 dispatch 함으로써, update를 invoke 시킨다. */
|
|
84
|
+
store.dispatch({
|
|
85
|
+
type: UPDATE_MODULES,
|
|
86
|
+
modules
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
installRouter((location, e) => {
|
|
90
|
+
var { contextPath } = getPathInfo(location.pathname)
|
|
91
|
+
|
|
92
|
+
if (this._contextPath !== contextPath) {
|
|
93
|
+
store.dispatch({
|
|
94
|
+
type: UPDATE_CONTEXT_PATH,
|
|
95
|
+
contextPath
|
|
96
|
+
})
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
store.dispatch(navigateWithSilence(location) as any)
|
|
100
|
+
this._callbacks &&
|
|
101
|
+
this._callbacks.forEach(callback => {
|
|
102
|
+
try {
|
|
103
|
+
callback.call(this, location, e)
|
|
104
|
+
} catch (ex) {
|
|
105
|
+
console.error(ex)
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
this.setBase()
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
routeToPage() {
|
|
115
|
+
let activePages = this.renderRoot.querySelectorAll('main > .page[active]')
|
|
116
|
+
activePages.forEach(page => {
|
|
117
|
+
page.removeAttribute('active')
|
|
118
|
+
})
|
|
119
|
+
|
|
120
|
+
this._activePage = this.renderRoot.querySelector(`main > .page[data-page=${this._page}]`)
|
|
121
|
+
|
|
122
|
+
if (!this._activePage) {
|
|
123
|
+
/* 해당 route에 연결된 page가 없는 경우에 main 섹션에 해당 element를 추가해준다. */
|
|
124
|
+
var tagname = this._pages[this._page!]
|
|
125
|
+
if (tagname) {
|
|
126
|
+
var main = this.renderRoot.querySelector('main')
|
|
127
|
+
|
|
128
|
+
var el = document.createElement(tagname)
|
|
129
|
+
el.setAttribute('class', 'page')
|
|
130
|
+
el.setAttribute('data-page', this._page!)
|
|
131
|
+
|
|
132
|
+
main?.appendChild(el)
|
|
133
|
+
|
|
134
|
+
this._activePage = el
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (this._activePage) {
|
|
139
|
+
this._activePage.setAttribute('active', true)
|
|
140
|
+
this._activePage.setAttribute('context-path', this._contextPath)
|
|
141
|
+
this._activePage.lifecycle = {
|
|
142
|
+
...(this._activePage.lifecycle || {}),
|
|
143
|
+
active: true,
|
|
144
|
+
params: this._params,
|
|
145
|
+
resourceId: this._resourceId,
|
|
146
|
+
page: this._page
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
store.dispatch({
|
|
151
|
+
type: UPDATE_ACTIVE_PAGE,
|
|
152
|
+
activePage: this._activePage
|
|
153
|
+
})
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
async updated(changes: PropertyValues<this>) {
|
|
157
|
+
if (changes.has('_modules')) {
|
|
158
|
+
this._readyPageList()
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (changes.has('_page') || changes.has('_resourceId') || changes.has('_params')) {
|
|
162
|
+
this.routeToPage()
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (changes.has('_contextPath')) {
|
|
166
|
+
this.setBase()
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
shouldUpdate() {
|
|
171
|
+
return this._moduleInitialized
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
stateChanged(state: any) {
|
|
175
|
+
this._page = state.route.page
|
|
176
|
+
this._params = state.route.params
|
|
177
|
+
this._resourceId = state.route.resourceId
|
|
178
|
+
this._callbacks = state.route.callbacks
|
|
179
|
+
this._context = state.route.context
|
|
180
|
+
this._modules = state.app.modules
|
|
181
|
+
this._contextPath = state.app.contextPath
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
_readyPageList() {
|
|
185
|
+
var reversedModules = [...this._modules].reverse()
|
|
186
|
+
this._pages = {}
|
|
187
|
+
|
|
188
|
+
/* 모듈 참조 순서 역순으로 page를 추가한다. (for overidable) */
|
|
189
|
+
reversedModules.forEach(m => {
|
|
190
|
+
m.routes &&
|
|
191
|
+
m.routes.forEach((route: any) => {
|
|
192
|
+
if (!this._pages[route.page]) {
|
|
193
|
+
this._pages[route.page] = route.tagname
|
|
194
|
+
}
|
|
195
|
+
})
|
|
196
|
+
})
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
setBase() {
|
|
200
|
+
var base = document.querySelector('base')
|
|
201
|
+
base?.setAttribute('href', this._contextPath ? `${this._contextPath}/` : '/')
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
window.customElements.define('things-app', ThingsApp)
|