@operato/menu 2.0.0-alpha.100

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.
Files changed (56) hide show
  1. package/.editorconfig +29 -0
  2. package/.storybook/main.js +3 -0
  3. package/.storybook/server.mjs +8 -0
  4. package/CHANGELOG.md +241 -0
  5. package/README.md +75 -0
  6. package/demo/index.html +40 -0
  7. package/dist/src/index.d.ts +0 -0
  8. package/dist/src/index.js +2 -0
  9. package/dist/src/index.js.map +1 -0
  10. package/dist/src/menu-landscape-styles.d.ts +1 -0
  11. package/dist/src/menu-landscape-styles.js +149 -0
  12. package/dist/src/menu-landscape-styles.js.map +1 -0
  13. package/dist/src/menu-portrait-styles.d.ts +1 -0
  14. package/dist/src/menu-portrait-styles.js +145 -0
  15. package/dist/src/menu-portrait-styles.js.map +1 -0
  16. package/dist/src/ox-menu-landscape.d.ts +21 -0
  17. package/dist/src/ox-menu-landscape.js +99 -0
  18. package/dist/src/ox-menu-landscape.js.map +1 -0
  19. package/dist/src/ox-menu-part.d.ts +29 -0
  20. package/dist/src/ox-menu-part.js +135 -0
  21. package/dist/src/ox-menu-part.js.map +1 -0
  22. package/dist/src/ox-menu-portrait.d.ts +13 -0
  23. package/dist/src/ox-menu-portrait.js +88 -0
  24. package/dist/src/ox-menu-portrait.js.map +1 -0
  25. package/dist/src/ox-top-menu-bar.d.ts +23 -0
  26. package/dist/src/ox-top-menu-bar.js +145 -0
  27. package/dist/src/ox-top-menu-bar.js.map +1 -0
  28. package/dist/src/types.d.ts +10 -0
  29. package/dist/src/types.js +2 -0
  30. package/dist/src/types.js.map +1 -0
  31. package/dist/stories/ox-menu-container.d.ts +15 -0
  32. package/dist/stories/ox-menu-container.js +94 -0
  33. package/dist/stories/ox-menu-container.js.map +1 -0
  34. package/dist/stories/ox-menu-portrait.stories.d.ts +17 -0
  35. package/dist/stories/ox-menu-portrait.stories.js +46 -0
  36. package/dist/stories/ox-menu-portrait.stories.js.map +1 -0
  37. package/dist/stories/test-menus.d.ts +2 -0
  38. package/dist/stories/test-menus.js +179 -0
  39. package/dist/stories/test-menus.js.map +1 -0
  40. package/dist/tsconfig.tsbuildinfo +1 -0
  41. package/package.json +99 -0
  42. package/src/index.ts +0 -0
  43. package/src/menu-landscape-styles.ts +149 -0
  44. package/src/menu-portrait-styles.ts +145 -0
  45. package/src/ox-menu-landscape.ts +105 -0
  46. package/src/ox-menu-part.ts +131 -0
  47. package/src/ox-menu-portrait.ts +91 -0
  48. package/src/ox-top-menu-bar.ts +147 -0
  49. package/src/types.ts +10 -0
  50. package/stories/ox-menu-container.ts +97 -0
  51. package/stories/ox-menu-portrait.stories.ts +57 -0
  52. package/stories/test-menus.ts +180 -0
  53. package/themes/app-theme.css +145 -0
  54. package/tsconfig.json +23 -0
  55. package/web-dev-server.config.mjs +27 -0
  56. package/web-test-runner.config.mjs +41 -0
@@ -0,0 +1,145 @@
1
+ import { __decorate } from "tslib";
2
+ import '@material/web/icon/icon.js';
3
+ import { css, html, LitElement } from 'lit';
4
+ import { customElement, property, state } from 'lit/decorators.js';
5
+ import { connect } from 'pwa-helpers';
6
+ import { toggleOverlay } from '@operato/layout';
7
+ import { store } from '@operato/shell';
8
+ let OxTopMenuBar = class OxTopMenuBar extends connect(store)(LitElement) {
9
+ render() {
10
+ const { menus = [], _activeTopLevel } = this;
11
+ return html `
12
+ <slot name="head"></slot>
13
+ <ul>
14
+ ${menus.map(menu => menu.type == 'group'
15
+ ? html ``
16
+ : html `
17
+ <li ?active=${menu === _activeTopLevel}>
18
+ <a
19
+ href="#"
20
+ @click=${(e) => {
21
+ e.preventDefault();
22
+ toggleOverlay('ox-menu-part', {
23
+ backdrop: true
24
+ });
25
+ }}
26
+ >
27
+ ${menu.name}
28
+ <md-icon>expand_more</md-icon>
29
+ </a>
30
+ </li>
31
+ `)}
32
+ </ul>
33
+ <slot name="tail"></slot>
34
+ `;
35
+ }
36
+ stateChanged(state) {
37
+ this.page = state.route.page;
38
+ this.resourceId = state.route.resourceId;
39
+ this.menus = state.liteMenu.menus || [];
40
+ this.slotTemplate = state.liteMenu.slotTemplate;
41
+ }
42
+ // firstUpdated() {
43
+ // this.addEventListener('mousewheel', this.onWheelEvent.bind(this), false)
44
+ // }
45
+ updated(changes) {
46
+ if (changes.has('menus') || changes.has('page') || changes.has('resourceId')) {
47
+ this._findActivePage();
48
+ }
49
+ if (changes.has('slotTemplate')) {
50
+ this.replaceChild(this.slotTemplate, this.renderRoot);
51
+ }
52
+ }
53
+ // onWheelEvent(e) {
54
+ // var delta = Math.max(-1, Math.min(1, e.wheelDelta || -e.detail))
55
+ // this.scrollLeft -= delta * 40
56
+ // console.log('delta', this.scrollLeft, delta, e.wheelDelta || -e.detail)
57
+ // e.preventDefault()
58
+ // }
59
+ _findActivePage() {
60
+ var path = this.resourceId ? `${this.page}/${this.resourceId}` : this.page;
61
+ var menus = this.menus || [];
62
+ this._activeTopLevel = menus.find(menu => {
63
+ var _a;
64
+ if (((_a = menu.path) === null || _a === void 0 ? void 0 : _a.split('?')[0]) === path) {
65
+ return true;
66
+ }
67
+ else if (menu.menus) {
68
+ return !!menu.menus.find(menu => { var _a; return ((_a = menu.path) === null || _a === void 0 ? void 0 : _a.split('?')[0]) === path; });
69
+ }
70
+ });
71
+ }
72
+ };
73
+ OxTopMenuBar.styles = [
74
+ css `
75
+ :host {
76
+ display: flex;
77
+ flex-direction: row;
78
+ }
79
+
80
+ span {
81
+ flex: 1;
82
+ }
83
+
84
+ ul {
85
+ display: flex;
86
+ align-items: center;
87
+ list-style: none;
88
+ margin: 0;
89
+ padding: 0;
90
+ }
91
+
92
+ li {
93
+ display: inline-flex;
94
+ flex-direction: row nowrap;
95
+ float: left;
96
+ overflow: none;
97
+ }
98
+
99
+ a {
100
+ display: inline-block;
101
+ white-space: nowrap;
102
+ overflow: hidden;
103
+ text-overflow: ellipsis;
104
+ padding: var(--padding-default) var(--padding-wide) var(--padding-narrow) var(--padding-wide);
105
+ text-decoration: none;
106
+ color: white;
107
+ }
108
+ a * {
109
+ vertical-align: middle;
110
+ }
111
+ a md-icon {
112
+ opacity: 0.5;
113
+ position: relative;
114
+ top: -2px;
115
+ font-size: 1em;
116
+ }
117
+
118
+ li[active] a {
119
+ font-weight: bold;
120
+ }
121
+ li[active] a md-icon {
122
+ opacity: 1;
123
+ }
124
+ `
125
+ ];
126
+ __decorate([
127
+ property({ type: String })
128
+ ], OxTopMenuBar.prototype, "page", void 0);
129
+ __decorate([
130
+ property({ type: String })
131
+ ], OxTopMenuBar.prototype, "resourceId", void 0);
132
+ __decorate([
133
+ property({ type: Array })
134
+ ], OxTopMenuBar.prototype, "menus", void 0);
135
+ __decorate([
136
+ property({ type: Object })
137
+ ], OxTopMenuBar.prototype, "slotTemplate", void 0);
138
+ __decorate([
139
+ state()
140
+ ], OxTopMenuBar.prototype, "_activeTopLevel", void 0);
141
+ OxTopMenuBar = __decorate([
142
+ customElement('ox-top-menu-bar')
143
+ ], OxTopMenuBar);
144
+ export { OxTopMenuBar };
145
+ //# sourceMappingURL=ox-top-menu-bar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-top-menu-bar.js","sourceRoot":"","sources":["../../src/ox-top-menu-bar.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAoC,MAAM,KAAK,CAAA;AAC7E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAS,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAK/B,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IA8D1D,MAAM;QACJ,MAAM,EAAE,KAAK,GAAG,EAAE,EA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AA+B;AA5D5B,YAAY;IADxB,aAAa,CAAC,iBAAiB,CAAC;GACpB,YAAY,CAsIxB","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { css, html, LitElement, PropertyValueMap, TemplateResult } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { connect } from 'pwa-helpers'\n\nimport { toggleOverlay } from '@operato/layout'\nimport { store } from '@operato/shell'\n\nimport { Menu } from './types'\n\n@customElement('ox-top-menu-bar')\nexport class OxTopMenuBar extends connect(store)(LitElement) {\n static styles = [\n css`\n :host {\n display: flex;\n flex-direction: row;\n }\n\n span {\n flex: 1;\n }\n\n ul {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n li {\n display: inline-flex;\n flex-direction: row nowrap;\n float: left;\n overflow: none;\n }\n\n a {\n display: inline-block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: var(--padding-default) var(--padding-wide) var(--padding-narrow) var(--padding-wide);\n text-decoration: none;\n color: white;\n }\n a * {\n vertical-align: middle;\n }\n a md-icon {\n opacity: 0.5;\n position: relative;\n top: -2px;\n font-size: 1em;\n }\n\n li[active] a {\n font-weight: bold;\n }\n li[active] a md-icon {\n opacity: 1;\n }\n `\n ]\n\n @property({ type: String }) page?: string\n @property({ type: String }) resourceId?: string\n @property({ type: Array }) menus?: Menu[]\n @property({ type: Object }) slotTemplate!: Node\n\n @state() private _activeTopLevel?: Menu\n\n render() {\n const { menus = [], _activeTopLevel } = this\n\n return html`\n <slot name=\"head\"></slot>\n <ul>\n ${menus.map(menu =>\n menu.type == 'group'\n ? html``\n : html`\n <li ?active=${menu === _activeTopLevel}>\n <a\n href=\"#\"\n @click=${(e: MouseEvent) => {\n e.preventDefault()\n toggleOverlay('ox-menu-part', {\n backdrop: true\n })\n }}\n >\n ${menu.name}\n <md-icon>expand_more</md-icon>\n </a>\n </li>\n `\n )}\n </ul>\n <slot name=\"tail\"></slot>\n `\n }\n\n stateChanged(state: any): void {\n this.page = state.route.page\n this.resourceId = state.route.resourceId\n this.menus = state.liteMenu.menus || []\n this.slotTemplate = state.liteMenu.slotTemplate\n }\n\n // firstUpdated() {\n // this.addEventListener('mousewheel', this.onWheelEvent.bind(this), false)\n // }\n\n updated(changes: PropertyValueMap<this>) {\n if (changes.has('menus') || changes.has('page') || changes.has('resourceId')) {\n this._findActivePage()\n }\n\n if (changes.has('slotTemplate')) {\n this.replaceChild(this.slotTemplate, this.renderRoot)\n }\n }\n\n // onWheelEvent(e) {\n // var delta = Math.max(-1, Math.min(1, e.wheelDelta || -e.detail))\n // this.scrollLeft -= delta * 40\n // console.log('delta', this.scrollLeft, delta, e.wheelDelta || -e.detail)\n\n // e.preventDefault()\n // }\n\n _findActivePage() {\n var path = this.resourceId ? `${this.page}/${this.resourceId}` : this.page\n var menus = this.menus || []\n\n this._activeTopLevel = menus.find(menu => {\n if (menu.path?.split('?')[0] === path) {\n return true\n } else if (menu.menus) {\n return !!menu.menus.find(menu => menu.path?.split('?')[0] === path)\n }\n })\n }\n}\n"]}
@@ -0,0 +1,10 @@
1
+ export type Menu = {
2
+ type?: 'group' | 'board';
3
+ name?: string;
4
+ description?: string;
5
+ path?: string;
6
+ icon?: string;
7
+ badge?: boolean | string | (() => boolean);
8
+ active?: boolean | ((menu?: Menu) => boolean);
9
+ menus?: Menu[];
10
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["export type Menu = {\n type?: 'group' | 'board'\n name?: string\n description?: string\n path?: string\n icon?: string\n badge?: boolean | string | (() => boolean)\n active?: boolean | ((menu?: Menu) => boolean)\n menus?: Menu[]\n}\n"]}
@@ -0,0 +1,15 @@
1
+ import '@material/web/icon/icon.js';
2
+ import '../src/ox-menu-portrait';
3
+ import { LitElement, PropertyValues } from 'lit';
4
+ import { Menu } from '../src/types';
5
+ export declare class OxMenuContainer extends LitElement {
6
+ static styles: import("lit").CSSResult[];
7
+ menus?: Menu[];
8
+ activeMenu?: Menu;
9
+ activeTopLevel?: Menu;
10
+ path?: string;
11
+ render(): import("lit-html").TemplateResult<1>;
12
+ firstUpdated(): void;
13
+ updated(changes: PropertyValues<this>): void;
14
+ private findActivePage;
15
+ }
@@ -0,0 +1,94 @@
1
+ import { __decorate } from "tslib";
2
+ import '@material/web/icon/icon.js';
3
+ import '../src/ox-menu-portrait';
4
+ import { css, html, LitElement } from 'lit';
5
+ import { customElement, property, state } from 'lit/decorators.js';
6
+ import { ScrollbarStyles } from '@operato/styles';
7
+ function isActiveMenu(menu, path) {
8
+ var _a;
9
+ return (((_a = menu.path) === null || _a === void 0 ? void 0 : _a.split('?')[0]) === path ||
10
+ (menu.active && typeof menu.active === 'function' && menu.active.call(menu, { path })));
11
+ }
12
+ let OxMenuContainer = class OxMenuContainer extends LitElement {
13
+ render() {
14
+ return html `
15
+ <div
16
+ @click=${(e) => {
17
+ if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey) {
18
+ return;
19
+ }
20
+ const anchor = e.composedPath().filter((n) => n.tagName === 'A')[0];
21
+ if (!anchor) {
22
+ return;
23
+ }
24
+ const href = anchor.href;
25
+ e.preventDefault();
26
+ var [_, path, ...others] = new URL(href).pathname.split('/');
27
+ this.path = path;
28
+ }}
29
+ >
30
+ <ox-menu-portrait
31
+ .menus=${this.menus}
32
+ .activeTopLevel=${this.activeTopLevel}
33
+ .activeMenu=${this.activeMenu}
34
+ .path=${this.path || ''}
35
+ ></ox-menu-portrait>
36
+ </div>
37
+ `;
38
+ }
39
+ firstUpdated() {
40
+ this.renderRoot.addEventListener('active-toplevel', (e) => {
41
+ e.stopPropagation();
42
+ e.preventDefault();
43
+ this.activeTopLevel = e.detail;
44
+ });
45
+ }
46
+ updated(changes) {
47
+ if (changes.has('menus') || changes.has('path')) {
48
+ this.findActivePage();
49
+ }
50
+ }
51
+ findActivePage() {
52
+ var menus = this.menus || [];
53
+ var activeMenu;
54
+ this.activeTopLevel = menus.find(menu => {
55
+ if (isActiveMenu(menu, this.path)) {
56
+ activeMenu = menu;
57
+ return true;
58
+ }
59
+ else if (menu.menus) {
60
+ activeMenu = menu.menus.find((menu) => isActiveMenu(menu, this.path));
61
+ return !!activeMenu;
62
+ }
63
+ });
64
+ this.activeMenu = activeMenu || this.activeTopLevel;
65
+ }
66
+ };
67
+ OxMenuContainer.styles = [
68
+ ScrollbarStyles,
69
+ css `
70
+ :host {
71
+ display: flex;
72
+ overflow-y: auto;
73
+ flex-direction: column;
74
+ background-color: var(--theme-white-color);
75
+ }
76
+ `
77
+ ];
78
+ __decorate([
79
+ property({ type: Array })
80
+ ], OxMenuContainer.prototype, "menus", void 0);
81
+ __decorate([
82
+ state()
83
+ ], OxMenuContainer.prototype, "activeMenu", void 0);
84
+ __decorate([
85
+ state()
86
+ ], OxMenuContainer.prototype, "activeTopLevel", void 0);
87
+ __decorate([
88
+ state()
89
+ ], OxMenuContainer.prototype, "path", void 0);
90
+ OxMenuContainer = __decorate([
91
+ customElement('ox-menu-container')
92
+ ], OxMenuContainer);
93
+ export { OxMenuContainer };
94
+ //# sourceMappingURL=ox-menu-container.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-menu-container.js","sourceRoot":"","sources":["../../stories/ox-menu-container.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,yBAAyB,CAAA;AAEhC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAS,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAIjD,SAAS,YAAY,CAAC,IAAU,EAAE,IAAa;;IAC7C,OAAO,CACL,CAAA,MAAA,IAAI,CAAC,IAAI,0CA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KAAK,EAAE;uDAAsB;AACrB;IAAR,KAAK,EAAE;6CAAc;AAjBX,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CA8E3B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '../src/ox-menu-portrait'\n\nimport { css, html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { ScrollbarStyles } from '@operato/styles'\n\nimport { Menu } from '../src/types'\n\nfunction isActiveMenu(menu: Menu, path?: string) {\n return (\n menu.path?.split('?')[0] === path ||\n (menu.active && typeof menu.active === 'function' && menu.active.call(menu, { path }))\n )\n}\n\n@customElement('ox-menu-container')\nexport class OxMenuContainer extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n overflow-y: auto;\n flex-direction: column;\n background-color: var(--theme-white-color);\n }\n `\n ]\n\n @property({ type: Array }) menus?: Menu[]\n\n @state() activeMenu?: Menu\n @state() activeTopLevel?: Menu\n @state() path?: string\n\n render() {\n return html`\n <div\n @click=${(e: MouseEvent) => {\n if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey) {\n return\n }\n const anchor: HTMLAnchorElement = e.composedPath().filter((n: any) => n.tagName === 'A')[0] as any\n if (!anchor) {\n return\n }\n const href = anchor.href\n e.preventDefault()\n\n var [_, path, ...others] = new URL(href).pathname.split('/')\n this.path = path\n }}\n >\n <ox-menu-portrait\n .menus=${this.menus}\n .activeTopLevel=${this.activeTopLevel}\n .activeMenu=${this.activeMenu}\n .path=${this.path || ''}\n ></ox-menu-portrait>\n </div>\n `\n }\n\n firstUpdated() {\n this.renderRoot.addEventListener('active-toplevel', (e: Event) => {\n e.stopPropagation()\n e.preventDefault()\n\n this.activeTopLevel = (e as CustomEvent).detail\n })\n }\n\n updated(changes: PropertyValues<this>) {\n if (changes.has('menus') || changes.has('path')) {\n this.findActivePage()\n }\n }\n\n private findActivePage() {\n var menus = this.menus || []\n var activeMenu\n\n this.activeTopLevel = menus.find(menu => {\n if (isActiveMenu(menu, this.path)) {\n activeMenu = menu\n return true\n } else if (menu.menus) {\n activeMenu = menu.menus.find((menu: Menu) => isActiveMenu(menu, this.path))\n return !!activeMenu\n }\n })\n\n this.activeMenu = activeMenu || this.activeTopLevel\n }\n}\n"]}
@@ -0,0 +1,17 @@
1
+ import '../src/ox-menu-portrait';
2
+ import { TemplateResult } from 'lit';
3
+ import './ox-menu-container';
4
+ declare const _default: {
5
+ title: string;
6
+ component: string;
7
+ argTypes: {};
8
+ };
9
+ export default _default;
10
+ interface Story<T> {
11
+ (args: T): TemplateResult;
12
+ args?: Partial<T>;
13
+ argTypes?: Record<string, unknown>;
14
+ }
15
+ interface ArgTypes {
16
+ }
17
+ export declare const Regular: Story<ArgTypes>;
@@ -0,0 +1,46 @@
1
+ import '../src/ox-menu-portrait';
2
+ import { html } from 'lit';
3
+ import { menus } from './test-menus';
4
+ import './ox-menu-container';
5
+ export default {
6
+ title: 'OxMenuPortrait',
7
+ component: 'ox-menu-portrait',
8
+ argTypes: {}
9
+ };
10
+ const Template = ({}) => html `
11
+ <link href="/themes/app-theme.css" rel="stylesheet" />
12
+ <link
13
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
14
+ rel="stylesheet"
15
+ />
16
+ <link
17
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
18
+ rel="stylesheet"
19
+ />
20
+ <link
21
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
22
+ rel="stylesheet"
23
+ />
24
+
25
+ <style>
26
+ body {
27
+ background-color: cyan;
28
+ }
29
+
30
+ .container {
31
+ display: flex;
32
+ width: 260px;
33
+ height: 500px;
34
+ }
35
+
36
+ ox-menu-container {
37
+ flex: 1;
38
+ }
39
+ </style>
40
+
41
+ <div class="container">
42
+ <ox-menu-container .menus=${menus}></ox-menu-container>
43
+ </div>
44
+ `;
45
+ export const Regular = Template.bind({});
46
+ //# sourceMappingURL=ox-menu-portrait.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-menu-portrait.stories.js","sourceRoot":"","sources":["../../stories/ox-menu-portrait.stories.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA;AAEhC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACpC,OAAO,qBAAqB,CAAA;AAE5B,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,kBAAkB;IAC7B,QAAQ,EAAE,EAAE;CACb,CAAA;AAUD,MAAM,QAAQ,GAAoB,CAAC,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAgCxB,KAAK;;CAEpC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA","sourcesContent":["import '../src/ox-menu-portrait'\n\nimport { html, TemplateResult } from 'lit'\nimport { menus } from './test-menus'\nimport './ox-menu-container'\n\nexport default {\n title: 'OxMenuPortrait',\n component: 'ox-menu-portrait',\n argTypes: {}\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {}\n\nconst Template: Story<ArgTypes> = ({}: 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: cyan;\n }\n\n .container {\n display: flex;\n width: 260px;\n height: 500px;\n }\n\n ox-menu-container {\n flex: 1;\n }\n </style>\n\n <div class=\"container\">\n <ox-menu-container .menus=${menus}></ox-menu-container>\n </div>\n`\n\nexport const Regular = Template.bind({})\n"]}
@@ -0,0 +1,2 @@
1
+ import { Menu } from '../src/types';
2
+ export declare const menus: Menu[];
@@ -0,0 +1,179 @@
1
+ export const menus = [
2
+ {
3
+ name: '나의 업무 공간',
4
+ type: 'group'
5
+ },
6
+ {
7
+ name: '내 업무함',
8
+ icon: 'format_list_bulleted',
9
+ path: 'todo-list',
10
+ badge: '777'
11
+ },
12
+ {
13
+ name: '내 결재함',
14
+ icon: 'approval',
15
+ path: 'approval-pending-list',
16
+ badge: '3'
17
+ },
18
+ {
19
+ name: '업무 이력 캘린더',
20
+ icon: 'calendar_month',
21
+ path: 'done-list-calendar',
22
+ description: '업무와 관련된 수행 또는 결재 이력을 캘린더에서 조회할 수 있습니다.',
23
+ menus: [
24
+ {
25
+ name: '업무 이력',
26
+ icon: 'history',
27
+ path: 'done-list'
28
+ },
29
+ {
30
+ name: '결재 수행 이력',
31
+ icon: 'history',
32
+ path: 'approval-done-list'
33
+ }
34
+ ]
35
+ },
36
+ {
37
+ name: 'DATASET',
38
+ type: 'group'
39
+ },
40
+ {
41
+ name: '데이타 셋 관리',
42
+ icon: 'display_settings',
43
+ path: 'data-set-list'
44
+ },
45
+ {
46
+ name: '데이타 키셋 관리',
47
+ icon: 'display_settings',
48
+ path: 'data-key-set-list'
49
+ },
50
+ {
51
+ name: '데이타 센서 관리',
52
+ icon: 'sensors',
53
+ path: 'data-sensor-list'
54
+ },
55
+ {
56
+ name: 'DATA ENTRY',
57
+ type: 'group'
58
+ },
59
+ {
60
+ icon: 'post_add',
61
+ name: '데이타 입력 화면',
62
+ path: 'data-entry-list'
63
+ },
64
+ {
65
+ name: 'DATA REPORT',
66
+ type: 'group'
67
+ },
68
+ {
69
+ name: '데이타 샘플 조회',
70
+ icon: 'checklist',
71
+ path: 'data-sample-list',
72
+ menus: [
73
+ {
74
+ name: 'TEST',
75
+ icon: 'checklist',
76
+ path: 'data-sample-search/bfb95a47-5cbd-4415-9032-14789e27c819'
77
+ },
78
+ {
79
+ name: '자숙 공정',
80
+ icon: 'checklist',
81
+ path: 'data-sample-search/5aad9fe2-56a3-4796-afd9-6c044ab39990'
82
+ },
83
+ {
84
+ name: '탕비실 관리',
85
+ icon: 'checklist',
86
+ path: 'data-sample-search/0176fcc3-0dbf-4fe6-9bd0-ca9f9ae91cf4'
87
+ },
88
+ {
89
+ name: '파일 관리',
90
+ icon: 'checklist',
91
+ path: 'data-sample-search/9c6ce158-e28c-4b00-92b9-59739d906609'
92
+ },
93
+ {
94
+ name: '화장실 관리',
95
+ icon: 'checklist',
96
+ path: 'data-sample-search/3998c6a1-b39d-45cf-a0cb-2b11b49331a0'
97
+ }
98
+ ]
99
+ },
100
+ {
101
+ name: '데이타 이탈점 조회',
102
+ icon: 'playlist_remove',
103
+ path: 'data-ooc-list'
104
+ },
105
+ {
106
+ name: '데이터 수집 마감 조회',
107
+ icon: 'functions',
108
+ path: 'data-summary-list',
109
+ menus: [
110
+ {
111
+ name: '자숙 공정',
112
+ icon: 'checklist',
113
+ path: 'data-summary-period/5aad9fe2-56a3-4796-afd9-6c044ab39990'
114
+ },
115
+ {
116
+ name: '탕비실 관리',
117
+ icon: 'checklist',
118
+ path: 'data-summary-period/0176fcc3-0dbf-4fe6-9bd0-ca9f9ae91cf4'
119
+ },
120
+ {
121
+ name: '화장실 관리',
122
+ icon: 'checklist',
123
+ path: 'data-summary-period/3998c6a1-b39d-45cf-a0cb-2b11b49331a0'
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ icon: 'newspaper',
129
+ name: '데이타 리포트',
130
+ path: 'data-report-list'
131
+ },
132
+ {
133
+ icon: 'archive',
134
+ name: '데이타 아카이브 조회',
135
+ path: 'data-archive-list'
136
+ },
137
+ {
138
+ name: '조직',
139
+ type: 'group'
140
+ },
141
+ {
142
+ name: '조직',
143
+ icon: 'account_tree',
144
+ description: '조직 구성과 결재선 관리를 위한 메뉴 구성입니다.',
145
+ menus: [
146
+ {
147
+ name: '연락처 관리',
148
+ path: 'contact-list'
149
+ },
150
+ {
151
+ name: '직원 목록',
152
+ path: 'employee-list'
153
+ },
154
+ {
155
+ name: '부서 조직도',
156
+ path: 'department-tree'
157
+ },
158
+ {
159
+ name: '부서 목록',
160
+ path: 'department-list'
161
+ },
162
+ {
163
+ name: '나의 결재라인 템플릿 목록',
164
+ path: 'my-approval-line-templates-page'
165
+ },
166
+ {
167
+ name: '공통 결재라인 템플릿 목록',
168
+ path: 'common-approval-line-templates-page'
169
+ }
170
+ ]
171
+ },
172
+ {
173
+ name: '모니터링',
174
+ type: 'board',
175
+ path: 'board-viewer/85f69924-cdff-438a-9691-569b3542c38e?title=모니터링',
176
+ icon: 'dashboard'
177
+ }
178
+ ];
179
+ //# sourceMappingURL=test-menus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-menus.js","sourceRoot":"","sources":["../../stories/test-menus.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAW;IAC3B;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,OAAO;KACd;IACD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,sBAAsB;QAC5B,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,KAAK;KACb;IACD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,uBAAuB;QAC7B,KAAK,EAAE,GAAG;KACX;IACD;QACE,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,wCAAwC;QACrD,KAAK,EAAE;YACL;gBACE,IAAI,EAAE,OAAO;gBACb,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AAA","sourcesContent":["import { Menu } from '../src/types'\n\nexport const menus: Menu[] = [\n {\n name: '나의 업무 공간',\n type: 'group'\n },\n {\n name: '내 업무함',\n icon: 'format_list_bulleted',\n path: 'todo-list',\n badge: '777'\n },\n {\n name: '내 결재함',\n icon: 'approval',\n path: 'approval-pending-list',\n badge: '3'\n },\n {\n name: '업무 이력 캘린더',\n icon: 'calendar_month',\n path: 'done-list-calendar',\n description: '업무와 관련된 수행 또는 결재 이력을 캘린더에서 조회할 수 있습니다.',\n menus: [\n {\n name: '업무 이력',\n icon: 'history',\n path: 'done-list'\n },\n {\n name: '결재 수행 이력',\n icon: 'history',\n path: 'approval-done-list'\n }\n ]\n },\n {\n name: 'DATASET',\n type: 'group'\n },\n {\n name: '데이타 셋 관리',\n icon: 'display_settings',\n path: 'data-set-list'\n },\n {\n name: '데이타 키셋 관리',\n icon: 'display_settings',\n path: 'data-key-set-list'\n },\n {\n name: '데이타 센서 관리',\n icon: 'sensors',\n path: 'data-sensor-list'\n },\n {\n name: 'DATA ENTRY',\n type: 'group'\n },\n {\n icon: 'post_add',\n name: '데이타 입력 화면',\n path: 'data-entry-list'\n },\n {\n name: 'DATA REPORT',\n type: 'group'\n },\n {\n name: '데이타 샘플 조회',\n icon: 'checklist',\n path: 'data-sample-list',\n menus: [\n {\n name: 'TEST',\n icon: 'checklist',\n path: 'data-sample-search/bfb95a47-5cbd-4415-9032-14789e27c819'\n },\n {\n name: '자숙 공정',\n icon: 'checklist',\n path: 'data-sample-search/5aad9fe2-56a3-4796-afd9-6c044ab39990'\n },\n {\n name: '탕비실 관리',\n icon: 'checklist',\n path: 'data-sample-search/0176fcc3-0dbf-4fe6-9bd0-ca9f9ae91cf4'\n },\n {\n name: '파일 관리',\n icon: 'checklist',\n path: 'data-sample-search/9c6ce158-e28c-4b00-92b9-59739d906609'\n },\n {\n name: '화장실 관리',\n icon: 'checklist',\n path: 'data-sample-search/3998c6a1-b39d-45cf-a0cb-2b11b49331a0'\n }\n ]\n },\n {\n name: '데이타 이탈점 조회',\n icon: 'playlist_remove',\n path: 'data-ooc-list'\n },\n {\n name: '데이터 수집 마감 조회',\n icon: 'functions',\n path: 'data-summary-list',\n menus: [\n {\n name: '자숙 공정',\n icon: 'checklist',\n path: 'data-summary-period/5aad9fe2-56a3-4796-afd9-6c044ab39990'\n },\n {\n name: '탕비실 관리',\n icon: 'checklist',\n path: 'data-summary-period/0176fcc3-0dbf-4fe6-9bd0-ca9f9ae91cf4'\n },\n {\n name: '화장실 관리',\n icon: 'checklist',\n path: 'data-summary-period/3998c6a1-b39d-45cf-a0cb-2b11b49331a0'\n }\n ]\n },\n {\n icon: 'newspaper',\n name: '데이타 리포트',\n path: 'data-report-list'\n },\n {\n icon: 'archive',\n name: '데이타 아카이브 조회',\n path: 'data-archive-list'\n },\n {\n name: '조직',\n type: 'group'\n },\n {\n name: '조직',\n icon: 'account_tree',\n description: '조직 구성과 결재선 관리를 위한 메뉴 구성입니다.',\n menus: [\n {\n name: '연락처 관리',\n path: 'contact-list'\n },\n {\n name: '직원 목록',\n path: 'employee-list'\n },\n {\n name: '부서 조직도',\n path: 'department-tree'\n },\n {\n name: '부서 목록',\n path: 'department-list'\n },\n {\n name: '나의 결재라인 템플릿 목록',\n path: 'my-approval-line-templates-page'\n },\n {\n name: '공통 결재라인 템플릿 목록',\n path: 'common-approval-line-templates-page'\n }\n ]\n },\n {\n name: '모니터링',\n type: 'board',\n path: 'board-viewer/85f69924-cdff-438a-9691-569b3542c38e?title=모니터링',\n icon: 'dashboard'\n }\n]\n"]}