@operato/shell 2.0.0-alpha.8 → 2.0.0-alpha.81
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/CHANGELOG.md +159 -0
- package/demo/index.html +14 -3
- package/dist/src/actions/busy.js.map +1 -1
- package/dist/src/actions/route.d.ts +3 -3
- package/dist/src/actions/route.js +5 -5
- package/dist/src/actions/route.js.map +1 -1
- package/dist/src/app/app-style.js +12 -4
- package/dist/src/app/app-style.js.map +1 -1
- package/dist/src/app/app.d.ts +10 -5
- package/dist/src/app/app.js +27 -15
- package/dist/src/app/app.js.map +1 -1
- package/dist/src/app/pages/page-404.d.ts +1 -1
- package/dist/src/app/pages/page-404.js +5 -5
- package/dist/src/app/pages/page-404.js.map +1 -1
- package/dist/src/custom-alert.d.ts +23 -0
- package/dist/src/custom-alert.js +26 -0
- package/dist/src/custom-alert.js.map +1 -0
- package/dist/src/entries/public/home.d.ts +2 -3
- package/dist/src/entries/public/home.js +17 -16
- package/dist/src/entries/public/home.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/store.js +8 -0
- package/dist/src/store.js.map +1 -1
- package/dist/stories/app.stories.d.ts +22 -0
- package/dist/stories/app.stories.js +38 -0
- package/dist/stories/app.stories.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -19
- package/src/actions/busy.ts +1 -1
- package/src/actions/route.ts +5 -5
- package/src/app/app-style.ts +12 -4
- package/src/app/app.ts +49 -16
- package/src/app/pages/page-404.ts +5 -5
- package/src/custom-alert.ts +43 -0
- package/src/entries/public/home.ts +17 -16
- package/src/index.ts +1 -0
- package/src/store.ts +9 -0
- package/stories/app.stories.ts +51 -0
- package/themes/app-theme.css +145 -0
- package/yarn-error.log +4 -5
@@ -1,5 +1,4 @@
|
|
1
|
-
import '@material/
|
2
|
-
import '@material/mwc-button';
|
1
|
+
import '@material/web/icon/icon.js';
|
3
2
|
import { LitElement } from 'lit';
|
4
3
|
export declare class HomePage extends LitElement {
|
5
4
|
static styles: import("lit").CSSResult;
|
@@ -8,7 +7,7 @@ export declare class HomePage extends LitElement {
|
|
8
7
|
title: string;
|
9
8
|
description: string;
|
10
9
|
};
|
11
|
-
render(): import("lit").TemplateResult<1>;
|
10
|
+
render(): import("lit-html").TemplateResult<1>;
|
12
11
|
get applicationMeta(): {
|
13
12
|
icon: string;
|
14
13
|
title: string;
|
@@ -1,13 +1,12 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import '@material/
|
3
|
-
import '@material/mwc-button';
|
2
|
+
import '@material/web/icon/icon.js';
|
4
3
|
import { css, html, LitElement } from 'lit';
|
5
4
|
import { customElement } from 'lit/decorators.js';
|
6
5
|
let HomePage = class HomePage extends LitElement {
|
7
6
|
render() {
|
8
|
-
var {
|
7
|
+
var { title, description } = this.applicationMeta;
|
9
8
|
return html `
|
10
|
-
<
|
9
|
+
<md-icon home @click=${() => (window.location.href = '/')}>home</md-icon>
|
11
10
|
|
12
11
|
<div message>
|
13
12
|
<strong>${title}</strong>
|
@@ -37,7 +36,7 @@ HomePage.styles = css `
|
|
37
36
|
display: block;
|
38
37
|
position: relative;
|
39
38
|
|
40
|
-
--
|
39
|
+
--md-theme-primary: white;
|
41
40
|
}
|
42
41
|
|
43
42
|
[home] {
|
@@ -54,17 +53,19 @@ HomePage.styles = css `
|
|
54
53
|
color: #fff;
|
55
54
|
text-align: center;
|
56
55
|
font-size: 20px;
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
56
|
+
|
57
|
+
strong {
|
58
|
+
display: block;
|
59
|
+
font-size: 2.5rem;
|
60
|
+
}
|
61
|
+
|
62
|
+
img {
|
63
|
+
width: 450px;
|
64
|
+
max-width: 90%;
|
65
|
+
display: block;
|
66
|
+
margin: auto;
|
67
|
+
margin-top: 20px;
|
68
|
+
}
|
68
69
|
}
|
69
70
|
|
70
71
|
@media screen and (max-width: 460px) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"home.js","sourceRoot":"","sources":["../../../../src/entries/public/home.ts"],"names":[],"mappings":";AAAA,OAAO,
|
1
|
+
{"version":3,"file":"home.js","sourceRoot":"","sources":["../../../../src/entries/public/home.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAG1C,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU;IA4DtC,MAAM;QACJ,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,eAAe,CAAA;QAEjD,OAAO,IAAI,CAAA;6BACc,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,GAAG,CAAC;;;kBAG7C,KAAK;UACb,WAAW;;;KAGhB,CAAA;IACH,CAAC;IAED,IAAI,eAAe;QACjB,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC3B,IAAI,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,8BAA8B,CAAoB,CAAA;YACxF,IAAI,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,+BAA+B,CAAoB,CAAA;YAC1F,IAAI,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAC,sCAAsC,CAAoB,CAAA;YAEvG,IAAI,CAAC,gBAAgB,GAAG;gBACtB,IAAI,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI;gBACpB,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB;gBACvD,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAsB;aAChF,CAAA;QACH,CAAC;QAED,OAAO,IAAI,CAAC,gBAAgB,CAAA;IAC9B,CAAC;;AAvFM,eAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDlB,AAnDY,CAmDZ;AApDU,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAyFpB","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement } from 'lit/decorators.js'\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 --md-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 strong {\n display: block;\n font-size: 2.5rem;\n }\n\n img {\n width: 450px;\n max-width: 90%;\n display: block;\n margin: auto;\n margin-top: 20px;\n }\n }\n\n @media screen and (max-width: 460px) {\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 { title, description } = this.applicationMeta\n\n return html`\n <md-icon home @click=${() => (window.location.href = '/')}>home</md-icon>\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"]}
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.js
CHANGED
package/dist/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA","sourcesContent":["export * from './types'\nexport * from './store'\nexport * from './actions'\nexport * from './app/pages/page-view'\nexport * from './object-store'\n"]}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA","sourcesContent":["export * from './types'\nexport * from './store'\nexport * from './actions'\nexport * from './app/pages/page-view'\nexport * from './object-store'\nexport * from './custom-alert'\n"]}
|
package/dist/src/store.js
CHANGED
@@ -7,6 +7,14 @@ import busy from './reducers/busy';
|
|
7
7
|
// Sets up a Chrome extension for time travel debugging.
|
8
8
|
// See https://github.com/zalmoxisus/redux-devtools-extension for more information.
|
9
9
|
const devCompose = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
|
10
|
+
// Only for providing test environment - combineReducers 에서 process.env.NODE_ENV를 접근하기 때문에.
|
11
|
+
if (typeof window.process == 'undefined') {
|
12
|
+
window.process = {
|
13
|
+
env: {
|
14
|
+
NODE_ENV: JSON.stringify('development')
|
15
|
+
}
|
16
|
+
};
|
17
|
+
}
|
10
18
|
export const store = createStore(state => state, devCompose(lazyReducerEnhancer(combineReducers), applyMiddleware(thunk)));
|
11
19
|
// Initially loaded reducers.
|
12
20
|
store.addReducers({
|
package/dist/src/store.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAa,MAAM,sCAAsC,CAAA;AACrF,OAAO,EAAU,eAAe,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,EAAS,MAAM,OAAO,CAAA;AAC7F,OAAO,KAAK,MAAM,aAAa,CAAA;AAE/B,OAAO,GAAG,MAAM,gBAAgB,CAAA;AAChC,OAAO,KAAK,MAAM,kBAAkB,CAAA;AACpC,OAAO,IAAI,MAAM,iBAAiB,CAAA;AAMlC,wDAAwD;AACxD,mFAAmF;AACnF,MAAM,UAAU,GAAG,MAAM,CAAC,oCAAoC,IAAI,OAAO,CAAA;AAEzE,MAAM,CAAC,MAAM,KAAK,GAA4C,WAAW,CACvE,KAAK,CAAC,EAAE,CAAC,KAAK,EACd,UAAU,CAAC,mBAAmB,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC,CACzE,CAAA;AAED,6BAA6B;AAC7B,KAAK,CAAC,WAAW,CAAC;IAChB,GAAG;IACH,KAAK;IACL,IAAI;CACL,CAAC,CAAA","sourcesContent":["import { lazyReducerEnhancer, LazyStore } from 'pwa-helpers/lazy-reducer-enhancer.js'\nimport { Action, applyMiddleware, combineReducers, compose, createStore, Store } from 'redux'\nimport thunk from 'redux-thunk'\n\nimport app from './reducers/app'\nimport route from './reducers/route'\nimport busy from './reducers/busy'\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: Store<unknown, Action<any>> & LazyStore = createStore(\n state => state,\n devCompose(lazyReducerEnhancer(combineReducers), applyMiddleware(thunk))\n)\n\n// Initially loaded reducers.\nstore.addReducers({\n app,\n route,\n busy\n})\n"]}
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAa,MAAM,sCAAsC,CAAA;AACrF,OAAO,EAAU,eAAe,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,EAAS,MAAM,OAAO,CAAA;AAC7F,OAAO,KAAK,MAAM,aAAa,CAAA;AAE/B,OAAO,GAAG,MAAM,gBAAgB,CAAA;AAChC,OAAO,KAAK,MAAM,kBAAkB,CAAA;AACpC,OAAO,IAAI,MAAM,iBAAiB,CAAA;AAMlC,wDAAwD;AACxD,mFAAmF;AACnF,MAAM,UAAU,GAAG,MAAM,CAAC,oCAAoC,IAAI,OAAO,CAAA;AAEzE,2FAA2F;AAC3F,IAAI,OAAO,MAAM,CAAC,OAAO,IAAI,WAAW,EAAE,CAAC;IACzC,MAAM,CAAC,OAAO,GAAG;QACf,GAAG,EAAE;YACH,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC;SACxC;KACK,CAAA;AACV,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAA4C,WAAW,CACvE,KAAK,CAAC,EAAE,CAAC,KAAK,EACd,UAAU,CAAC,mBAAmB,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC,CACzE,CAAA;AAED,6BAA6B;AAC7B,KAAK,CAAC,WAAW,CAAC;IAChB,GAAG;IACH,KAAK;IACL,IAAI;CACL,CAAC,CAAA","sourcesContent":["import { lazyReducerEnhancer, LazyStore } from 'pwa-helpers/lazy-reducer-enhancer.js'\nimport { Action, applyMiddleware, combineReducers, compose, createStore, Store } from 'redux'\nimport thunk from 'redux-thunk'\n\nimport app from './reducers/app'\nimport route from './reducers/route'\nimport busy from './reducers/busy'\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\n// Only for providing test environment - combineReducers 에서 process.env.NODE_ENV를 접근하기 때문에.\nif (typeof window.process == 'undefined') {\n window.process = {\n env: {\n NODE_ENV: JSON.stringify('development')\n }\n } as any\n}\n\nexport const store: Store<unknown, Action<any>> & LazyStore = createStore(\n state => state,\n devCompose(lazyReducerEnhancer(combineReducers), applyMiddleware(thunk))\n)\n\n// Initially loaded reducers.\nstore.addReducers({\n app,\n route,\n busy\n})\n"]}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import '@material/web/icon/icon.js';
|
2
|
+
import { TemplateResult } from 'lit';
|
3
|
+
import '../src/app/app.js';
|
4
|
+
declare const _default: {
|
5
|
+
title: string;
|
6
|
+
component: string;
|
7
|
+
argTypes: {
|
8
|
+
label: {
|
9
|
+
control: string;
|
10
|
+
};
|
11
|
+
};
|
12
|
+
};
|
13
|
+
export default _default;
|
14
|
+
interface Story<T> {
|
15
|
+
(args: T): TemplateResult;
|
16
|
+
args?: Partial<T>;
|
17
|
+
argTypes?: Record<string, unknown>;
|
18
|
+
}
|
19
|
+
interface ArgTypes {
|
20
|
+
label?: string;
|
21
|
+
}
|
22
|
+
export declare const Regular: Story<ArgTypes>;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import '@material/web/icon/icon.js';
|
2
|
+
import { html } from 'lit';
|
3
|
+
import '../src/app/app.js';
|
4
|
+
export default {
|
5
|
+
title: 'things-app',
|
6
|
+
component: 'things-app',
|
7
|
+
argTypes: {
|
8
|
+
label: { control: 'string' }
|
9
|
+
}
|
10
|
+
};
|
11
|
+
const Template = ({ label = '' }) => html `
|
12
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
13
|
+
<link
|
14
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
15
|
+
rel="stylesheet"
|
16
|
+
/>
|
17
|
+
<link
|
18
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
19
|
+
rel="stylesheet"
|
20
|
+
/>
|
21
|
+
<link
|
22
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
23
|
+
rel="stylesheet"
|
24
|
+
/>
|
25
|
+
|
26
|
+
<style>
|
27
|
+
body {
|
28
|
+
background-color: white;
|
29
|
+
}
|
30
|
+
</style>
|
31
|
+
|
32
|
+
<things-app></things-app>
|
33
|
+
`;
|
34
|
+
export const Regular = Template.bind({});
|
35
|
+
Regular.args = {
|
36
|
+
label: 'common header styles'
|
37
|
+
};
|
38
|
+
//# sourceMappingURL=app.stories.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"app.stories.js","sourceRoot":"","sources":["../../stories/app.stories.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAO,IAAI,EAA0B,MAAM,KAAK,CAAA;AACvD,OAAO,mBAAmB,CAAA;AAE1B,eAAe;IACb,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,YAAY;IACvB,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;KAC7B;CACF,CAAA;AAYD,MAAM,QAAQ,GAAoB,CAAC,EAAE,KAAK,GAAG,EAAE,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;CAsBnE,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,KAAK,EAAE,sBAAsB;CAC9B,CAAA","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { css, html, render, TemplateResult } from 'lit'\nimport '../src/app/app.js'\n\nexport default {\n title: 'things-app',\n component: 'things-app',\n argTypes: {\n label: { control: 'string' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n label?: string\n}\n\nconst Template: Story<ArgTypes> = ({ label = '' }: ArgTypes) => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n body {\n background-color: white;\n }\n </style>\n\n <things-app></things-app>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n label: 'common header styles'\n}\n"]}
|