@operato/board 8.0.1 → 9.0.0-beta.10
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 +272 -37
- package/dist/src/component/3d.d.ts +1 -1
- package/dist/src/component/3d.js.map +1 -1
- package/dist/src/component/chart-and-gauge.d.ts +1 -1
- package/dist/src/component/chart-and-gauge.js.map +1 -1
- package/dist/src/component/container.d.ts +1 -1
- package/dist/src/component/container.js.map +1 -1
- package/dist/src/component/data-source.d.ts +1 -1
- package/dist/src/component/data-source.js.map +1 -1
- package/dist/src/component/etc.d.ts +1 -1
- package/dist/src/component/etc.js.map +1 -1
- package/dist/src/component/form.d.ts +1 -1
- package/dist/src/component/form.js.map +1 -1
- package/dist/src/component/index.d.ts +12 -12
- package/dist/src/component/index.js +12 -12
- package/dist/src/component/index.js.map +1 -1
- package/dist/src/component/iot.d.ts +1 -1
- package/dist/src/component/iot.js.map +1 -1
- package/dist/src/component/line.d.ts +1 -1
- package/dist/src/component/line.js.map +1 -1
- package/dist/src/component/register-default-groups.js +13 -13
- package/dist/src/component/register-default-groups.js.map +1 -1
- package/dist/src/component/shape.d.ts +1 -1
- package/dist/src/component/shape.js.map +1 -1
- package/dist/src/component/table.d.ts +1 -1
- package/dist/src/component/table.js.map +1 -1
- package/dist/src/component/text-and-media.d.ts +1 -1
- package/dist/src/component/text-and-media.js.map +1 -1
- package/dist/src/component/warehouse.d.ts +1 -1
- package/dist/src/component/warehouse.js.map +1 -1
- package/dist/src/data-storage/data-storage.js +18 -0
- package/dist/src/data-storage/data-storage.js.map +1 -1
- package/dist/src/graphql/board.d.ts +1 -1
- package/dist/src/graphql/board.js.map +1 -1
- package/dist/src/graphql/group.d.ts +1 -1
- package/dist/src/graphql/group.js.map +1 -1
- package/dist/src/graphql/index.d.ts +4 -4
- package/dist/src/graphql/index.js +4 -4
- package/dist/src/graphql/index.js.map +1 -1
- package/dist/src/graphql/play-group.d.ts +1 -1
- package/dist/src/graphql/play-group.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-detail.js +15 -5
- package/dist/src/modeller/component-toolbar/component-detail.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-menu.d.ts +3 -3
- package/dist/src/modeller/component-toolbar/component-menu.js +47 -10
- package/dist/src/modeller/component-toolbar/component-menu.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-toolbar.d.ts +2 -2
- package/dist/src/modeller/component-toolbar/component-toolbar.js +64 -8
- package/dist/src/modeller/component-toolbar/component-toolbar.js.map +1 -1
- package/dist/src/modeller/edit-toolbar.js +127 -4
- package/dist/src/modeller/edit-toolbar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js +93 -34
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-map.js +6 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-map.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-range.js +6 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-range.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +64 -8
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/effects-shared-style.js +5 -5
- package/dist/src/modeller/property-sidebar/effects/effects-shared-style.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/effects.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/effects.js +22 -2
- package/dist/src/modeller/property-sidebar/effects/effects.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-animation.js +21 -1
- package/dist/src/modeller/property-sidebar/effects/property-animation.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-animations.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-animations.js +28 -6
- package/dist/src/modeller/property-sidebar/effects/property-animations.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js +28 -6
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js +40 -8
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event.d.ts +3 -3
- package/dist/src/modeller/property-sidebar/effects/property-event.js +26 -6
- package/dist/src/modeller/property-sidebar/effects/property-event.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-shadow.js +22 -8
- package/dist/src/modeller/property-sidebar/effects/property-shadow.js.map +1 -1
- package/dist/src/modeller/property-sidebar/inspector/inspector.js +38 -6
- package/dist/src/modeller/property-sidebar/inspector/inspector.js.map +1 -1
- package/dist/src/modeller/property-sidebar/property-shared-style.js +25 -14
- package/dist/src/modeller/property-sidebar/property-shared-style.js.map +1 -1
- package/dist/src/modeller/property-sidebar/property-sidebar.d.ts +2 -2
- package/dist/src/modeller/property-sidebar/property-sidebar.js +72 -16
- package/dist/src/modeller/property-sidebar/property-sidebar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/shapes/shapes.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/shapes/shapes.js +47 -14
- package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js +18 -1
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js.map +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specifics.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specifics.js +47 -11
- package/dist/src/modeller/property-sidebar/specifics/specifics.js.map +1 -1
- package/dist/src/modeller/property-sidebar/styles/styles.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/styles/styles.js +36 -13
- package/dist/src/modeller/property-sidebar/styles/styles.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-handler.d.ts +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-handler.js +16 -1
- package/dist/src/modeller/scene-viewer/ox-scene-handler.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-layer.d.ts +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-layer.js +16 -1
- package/dist/src/modeller/scene-viewer/ox-scene-layer.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-property.js +21 -0
- package/dist/src/modeller/scene-viewer/ox-scene-property.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.d.ts +3 -3
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.js +100 -16
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.js.map +1 -1
- package/dist/src/ox-board-component-info.js +33 -6
- package/dist/src/ox-board-component-info.js.map +1 -1
- package/dist/src/ox-board-list.js +58 -9
- package/dist/src/ox-board-list.js.map +1 -1
- package/dist/src/ox-board-modeller.d.ts +6 -6
- package/dist/src/ox-board-modeller.js +109 -20
- package/dist/src/ox-board-modeller.js.map +1 -1
- package/dist/src/ox-board-player.d.ts +2 -2
- package/dist/src/ox-board-player.js +99 -13
- package/dist/src/ox-board-player.js.map +1 -1
- package/dist/src/ox-board-template-list.js +21 -5
- package/dist/src/ox-board-template-list.js.map +1 -1
- package/dist/src/ox-board-template-viewer.js +35 -9
- package/dist/src/ox-board-template-viewer.js.map +1 -1
- package/dist/src/ox-board-viewer.js +131 -17
- package/dist/src/ox-board-viewer.js.map +1 -1
- package/dist/src/ox-editor-board-selector.d.ts +1 -1
- package/dist/src/ox-editor-board-selector.js +22 -1
- package/dist/src/ox-editor-board-selector.js.map +1 -1
- package/dist/src/ox-property-editor-board-selector.d.ts +1 -1
- package/dist/src/ox-property-editor-board-selector.js +1 -1
- package/dist/src/ox-property-editor-board-selector.js.map +1 -1
- package/dist/src/player/ox-board-player-carousel.d.ts +1 -1
- package/dist/src/player/ox-board-player-carousel.js +105 -17
- package/dist/src/player/ox-board-player-carousel.js.map +1 -1
- package/dist/src/player/ox-board-player-grid.js +32 -5
- package/dist/src/player/ox-board-player-grid.js.map +1 -1
- package/dist/src/player/ox-board-wrapper.js +50 -4
- package/dist/src/player/ox-board-wrapper.js.map +1 -1
- package/dist/src/selector/board-creation-popup.d.ts +2 -2
- package/dist/src/selector/board-creation-popup.js +22 -1
- package/dist/src/selector/board-creation-popup.js.map +1 -1
- package/dist/src/selector/board-thumbnail-card.js +15 -0
- package/dist/src/selector/board-thumbnail-card.js.map +1 -1
- package/dist/src/selector/ox-board-creation-card.d.ts +1 -1
- package/dist/src/selector/ox-board-creation-card.js +23 -1
- package/dist/src/selector/ox-board-creation-card.js.map +1 -1
- package/dist/src/selector/ox-board-selector.d.ts +1 -1
- package/dist/src/selector/ox-board-selector.js +55 -7
- package/dist/src/selector/ox-board-selector.js.map +1 -1
- package/dist/stories/property-data-binding-mapper.storiesy.d.ts +21 -0
- package/dist/stories/property-data-binding-mapper.storiesy.js +19 -0
- package/dist/stories/property-data-binding-mapper.storiesy.js.map +1 -0
- package/dist/stories/property-data-binding.stories copy.d.ts +21 -0
- package/dist/stories/property-data-binding.stories copy.js +19 -0
- package/dist/stories/property-data-binding.stories copy.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -24
@@ -4,16 +4,60 @@ import '@operato/data-grist';
|
|
4
4
|
import { css, html, LitElement } from 'lit';
|
5
5
|
import { customElement, property, query } from 'lit/decorators.js';
|
6
6
|
import { OxPopup } from '@operato/popup';
|
7
|
-
import { createBoard, fetchBoardList } from './graphql/board';
|
8
|
-
import { fetchFavoriteBoardList } from './graphql/favorite-board';
|
9
|
-
import { fetchGroupList } from './graphql/group';
|
7
|
+
import { createBoard, fetchBoardList } from './graphql/board.js';
|
8
|
+
import { fetchFavoriteBoardList } from './graphql/favorite-board.js';
|
9
|
+
import { fetchGroupList } from './graphql/group.js';
|
10
10
|
let BoardList = class BoardList extends LitElement {
|
11
11
|
constructor() {
|
12
12
|
super(...arguments);
|
13
|
-
this
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
Object.defineProperty(this, "creatable", {
|
14
|
+
enumerable: true,
|
15
|
+
configurable: true,
|
16
|
+
writable: true,
|
17
|
+
value: false
|
18
|
+
});
|
19
|
+
Object.defineProperty(this, "config", {
|
20
|
+
enumerable: true,
|
21
|
+
configurable: true,
|
22
|
+
writable: true,
|
23
|
+
value: void 0
|
24
|
+
});
|
25
|
+
Object.defineProperty(this, "data", {
|
26
|
+
enumerable: true,
|
27
|
+
configurable: true,
|
28
|
+
writable: true,
|
29
|
+
value: void 0
|
30
|
+
});
|
31
|
+
Object.defineProperty(this, "mode", {
|
32
|
+
enumerable: true,
|
33
|
+
configurable: true,
|
34
|
+
writable: true,
|
35
|
+
value: 'CARD'
|
36
|
+
});
|
37
|
+
Object.defineProperty(this, "groupId", {
|
38
|
+
enumerable: true,
|
39
|
+
configurable: true,
|
40
|
+
writable: true,
|
41
|
+
value: void 0
|
42
|
+
});
|
43
|
+
Object.defineProperty(this, "groups", {
|
44
|
+
enumerable: true,
|
45
|
+
configurable: true,
|
46
|
+
writable: true,
|
47
|
+
value: []
|
48
|
+
});
|
49
|
+
Object.defineProperty(this, "favorites", {
|
50
|
+
enumerable: true,
|
51
|
+
configurable: true,
|
52
|
+
writable: true,
|
53
|
+
value: []
|
54
|
+
});
|
55
|
+
Object.defineProperty(this, "grist", {
|
56
|
+
enumerable: true,
|
57
|
+
configurable: true,
|
58
|
+
writable: true,
|
59
|
+
value: void 0
|
60
|
+
});
|
17
61
|
}
|
18
62
|
render() {
|
19
63
|
const mode = this.mode || 'CARD';
|
@@ -249,7 +293,11 @@ let BoardList = class BoardList extends LitElement {
|
|
249
293
|
}));
|
250
294
|
}
|
251
295
|
};
|
252
|
-
BoardList
|
296
|
+
Object.defineProperty(BoardList, "styles", {
|
297
|
+
enumerable: true,
|
298
|
+
configurable: true,
|
299
|
+
writable: true,
|
300
|
+
value: css `
|
253
301
|
:host {
|
254
302
|
display: flex;
|
255
303
|
|
@@ -361,7 +409,8 @@ BoardList.styles = css `
|
|
361
409
|
display: none;
|
362
410
|
}
|
363
411
|
}
|
364
|
-
|
412
|
+
`
|
413
|
+
});
|
365
414
|
__decorate([
|
366
415
|
property({ type: Boolean })
|
367
416
|
], BoardList.prototype, "creatable", void 0);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-board-list.js","sourceRoot":"","sources":["../../src/ox-board-list.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAS,MAAM,mBAAmB,CAAA;AAGzE,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAExC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAIhD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAAlC;;QAmH+B,cAAS,GAAY,KAAK,CAAA;QAG3B,SAAI,GAA6B,MAAM,CAAA;QAExC,WAAM,GAAU,EAAE,CAAA;QAClB,cAAS,GAAU,EAAE,CAAA;IAwQlD,CAAC;IApQC,MAAM;QACJ,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,MAAM,CAAA;QAEhC,OAAO,IAAI,CAAA;0BACW,IAAI,CAAC,MAAM,UAAU,IAAI,6BAA6B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;wBAOpF,CAAC,CAAQ,EAAE,EAAE;YACrB,IAAI,CAAC,OAAO,GAAI,CAAC,CAAC,aAAkC,CAAC,KAAK,CAAA;YAC1D,IAAI,CAA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AQ,CAAC,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,CAAC,KAAgC,EAAE,OAAY,EAAE,EAAU;QAC/D,QAAQ,CAAC,aAAa,CACpB,IAAI,WAAW,CAAC,QAAQ,EAAE;YACxB,MAAM,EAAE;gBACN,KAAK;gBACL,OAAO;gBACP,EAAE;aACH;SACF,CAAC,CACH,CAAA;IACH,CAAC;;AA/XM,gBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgHlB,AAhHY,CAgHZ;AAE4B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CAA2B;AAC3B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAY;AACX;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCAAU;AACT;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCAAwC;AACvC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAiB;AACjB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;yCAAmB;AAClB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;4CAAsB;AAE7B;IAAlB,KAAK,CAAC,UAAU,CAAC;wCAAkB;AA3HhC,SAAS;IADd,aAAa,CAAC,eAAe,CAAC;GACzB,SAAS,CAiYd","sourcesContent":["import '@operato/popup/ox-popup.js'\nimport '@operato/data-grist'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { ColumnConfig, DataGrist, FetchOption, GristData, GristRecord, SortersConfig } from '@operato/data-grist'\nimport { OxPopup } from '@operato/popup'\n\nimport { createBoard, fetchBoardList } from './graphql/board'\nimport { fetchFavoriteBoardList } from './graphql/favorite-board'\nimport { fetchGroupList } from './graphql/group'\nimport { Board } from './types'\n\n@customElement('ox-board-list')\nclass BoardList extends LitElement {\n static styles = css`\n :host {\n display: flex;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n ox-grist {\n flex: 1;\n overflow-y: auto;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n #headroom {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: var(--padding-default) var(--spacing-large);\n border-top: 2px solid rgba(0, 0, 0, 0.2);\n background-color: var(--md-sys-color-surface);\n box-shadow: var(--box-shadow);\n }\n\n #filters {\n flex: 1;\n --md-icon-size: 20px;\n }\n #mode {\n width: 100px;\n }\n #add {\n width: 50px;\n text-align: right;\n }\n\n #modes > * {\n padding: var(--spacing-small);\n font-size: 1em;\n opacity: 0.5;\n color: var(--md-sys-color-on-primary-container);\n cursor: pointer;\n }\n\n #modes > md-icon[active] {\n border-radius: 9px;\n background-color: rgba(var(--primary-color-rgb), 0.05);\n opacity: 1;\n color: var(--md-sys-color-on-secondary-container);\n cursor: default;\n }\n #modes > md-icon:hover {\n opacity: 1;\n color: var(--md-sys-color-on-secondary-container);\n }\n\n #add button {\n display: flex;\n align-items: center;\n justify-content: center;\n\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n border: 0;\n border-radius: 50%;\n padding: 5px;\n width: 32px;\n height: 32px;\n cursor: pointer;\n }\n\n #add button:hover {\n background-color: var(--md-sys-color-on-primary-container);\n color: var(--md-sys-color-primary-container);\n box-shadow: var(--box-shadow);\n }\n\n #add button md-icon {\n font-size: 1.5em;\n }\n\n #filters {\n position: relative;\n }\n #filters [type='text'] {\n background-color: transparent;\n border: 0;\n border-bottom: var(--border-dim-color);\n padding: var(--spacing-small) var(--spacing-small) 7px 25px;\n font-size: var(--fontsize-large);\n }\n #filters [type='text']:focus {\n outline: none;\n }\n #filters md-icon {\n position: absolute;\n top: 3px;\n color: var(--md-sys-color-on-secondary-container);\n }\n #filters * {\n margin-right: var(--spacing-medium);\n }\n\n @media only screen and (max-width: 460px) {\n #modes {\n display: none;\n }\n }\n `\n\n @property({ type: Boolean }) creatable: boolean = false\n @property({ type: Object }) config: any\n @property({ type: Object }) data: any\n @property({ type: String }) mode: 'GRID' | 'LIST' | 'CARD' = 'CARD'\n @property({ type: String }) groupId?: string\n @property({ type: Array }) groups: any[] = []\n @property({ type: Array }) favorites: any[] = []\n\n @query('ox-grist') grist!: DataGrist\n\n render() {\n const mode = this.mode || 'CARD'\n\n return html`\n <ox-grist .config=${this.config} .mode=${mode} auto-fetch .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\" id=\"headroom\">\n <div id=\"filters\">\n <md-icon>search</md-icon>\n <input type=\"text\" />\n\n <select\n @change=${(e: Event) => {\n this.groupId = (e.currentTarget as HTMLInputElement).value\n this.requestUpdate()\n }}\n >\n <option value=\"\">*</option>\n ${this.groups.map(\n group => html`\n <option value=${group.id} ?selected=${group.id === this.groupId}>${group.description}</option>\n `\n )}\n </select>\n </div>\n\n <div id=\"modes\">\n <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>\n <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>\n <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>\n </div>\n\n ${this.creatable\n ? html`\n <div id=\"add\">\n <button><md-icon @click=${() => this.onCreateBoard()}>add</md-icon></button>\n </div>\n `\n : undefined}\n </div>\n </ox-grist>\n `\n }\n\n async fetchHandler({ page, limit, sorters = [] }: FetchOption) {\n const { items: records, total } = await this.getBoards({ page, limit, sorters })\n\n return {\n total,\n records\n }\n }\n\n get gristConfig() {\n return {\n list: {\n thumbnail: function (record: GristRecord, rowIndex: number) {\n return html` <img src=${record.thumbnail} style=\"width: 100%; height: 100%;\" /> `\n },\n fields: ['name', 'description'],\n details: ['updatedAt']\n },\n columns: [\n {\n type: 'gutter',\n gutterName: 'dirty'\n },\n {\n type: 'gutter',\n gutterName: 'sequence'\n },\n {\n type: 'string',\n name: 'id',\n hidden: true\n },\n {\n type: 'string',\n name: 'name',\n header: 'name',\n record: {\n editable: true,\n align: 'left'\n },\n width: 200,\n sortable: true\n },\n {\n type: 'string',\n name: 'description',\n header: 'description',\n record: {\n editable: true,\n align: 'left'\n },\n width: 200\n },\n {\n type: 'boolean',\n name: 'active',\n header: 'active',\n record: {\n editable: true\n },\n sortable: true,\n width: 60\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: 'updated at',\n record: {\n editable: true\n },\n sortable: true,\n width: 180\n },\n {\n type: 'datetime',\n name: 'createdAt',\n header: 'created at',\n record: {\n editable: true\n },\n sortable: true,\n width: 180\n }\n ],\n rows: {\n selectable: {\n multiple: true\n }\n },\n sorters: [\n {\n name: 'name',\n desc: false\n }\n ],\n pagination: {\n pages: [20, 30, 50, 100, 200]\n }\n }\n }\n\n async refresh() {\n this.groups = (await fetchGroupList()).groups.items\n\n if (this.groups) {\n await this.refreshBoards()\n }\n }\n\n async getBoards({\n page = 1,\n limit = 30,\n sorters = []\n }: { page?: number; limit?: number; sorters?: SortersConfig } = {}) {\n if (this.groupId && this.groupId == 'favor')\n return await this.getFavoriteBoards({\n page,\n limit\n })\n\n var listParam = {\n filters: this.groupId\n ? [\n {\n name: 'groupId',\n operator: 'eq',\n value: this.groupId\n }\n ]\n : [],\n sortings: sorters,\n pagination: {\n page,\n limit\n }\n }\n\n return (await fetchBoardList(listParam)).boards\n }\n\n async getFavoriteBoards({ page = 1, limit = 30 } = {}) {\n var listParam = {\n pagination: {\n page,\n limit\n }\n }\n\n return (await fetchFavoriteBoardList(listParam)).favoriteBoards\n }\n\n async refreshBoards() {\n if (!this.groups) {\n await this.refresh()\n return\n }\n\n this.grist.fetch()\n }\n\n async onCreateBoard() {\n /*\n * 기존 설정된 이미지가 선택된 상태가 되게 하기 위해서는 selector에 value를 전달해줄 필요가 있음.\n * 주의. value는 object일 수도 있고, string일 수도 있다.\n * string인 경우에는 해당 보드의 id로 해석한다.\n */\n var template = html`\n <board-creation-popup\n .defaultGroup=${this.groupId}\n .groups=${this.groups}\n @create-board=${async (e: CustomEvent) => {\n try {\n var { name, description, groupId, model, thumbnail } = e.detail\n\n var board: Board = {\n name,\n description,\n groupId,\n model: model || {\n width: 1200,\n height: 800\n },\n thumbnail\n }\n\n await createBoard(board)\n\n this.notify('info', 'new board created')\n } catch (ex: Error | any) {\n console.error(ex)\n this.notify('error', ex, ex)\n }\n }}\n ></board-creation-popup>\n `\n\n OxPopup.open({\n template,\n parent: this\n })\n\n requestAnimationFrame(() => {\n dispatchEvent(new Event('resize'))\n })\n }\n\n notify(level: 'warn' | 'error' | 'info', message: any, ex?: Error) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level,\n message,\n ex\n }\n })\n )\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"ox-board-list.js","sourceRoot":"","sources":["../../src/ox-board-list.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAS,MAAM,mBAAmB,CAAA;AAGzE,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAExC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAInD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,U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I,EAAE,MAAM,EAAE,CAAC;uCAAwC;AACvC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAiB;AACjB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;yCAAmB;AAClB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;4CAAsB;AAE7B;IAAlB,KAAK,CAAC,UAAU,CAAC;wCAAkB;AA3HhC,SAAS;IADd,aAAa,CAAC,eAAe,CAAC;GACzB,SAAS,CAiYd","sourcesContent":["import '@operato/popup/ox-popup.js'\nimport '@operato/data-grist'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { ColumnConfig, DataGrist, FetchOption, GristData, GristRecord, SortersConfig } from '@operato/data-grist'\nimport { OxPopup } from '@operato/popup'\n\nimport { createBoard, fetchBoardList } from './graphql/board.js'\nimport { fetchFavoriteBoardList } from './graphql/favorite-board.js'\nimport { fetchGroupList } from './graphql/group.js'\nimport { Board } from './types.js'\n\n@customElement('ox-board-list')\nclass BoardList extends LitElement {\n static styles = css`\n :host {\n display: flex;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n ox-grist {\n flex: 1;\n overflow-y: auto;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n #headroom {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: var(--padding-default) var(--spacing-large);\n border-top: 2px solid rgba(0, 0, 0, 0.2);\n background-color: var(--md-sys-color-surface);\n box-shadow: var(--box-shadow);\n }\n\n #filters {\n flex: 1;\n --md-icon-size: 20px;\n }\n #mode {\n width: 100px;\n }\n #add {\n width: 50px;\n text-align: right;\n }\n\n #modes > * {\n padding: var(--spacing-small);\n font-size: 1em;\n opacity: 0.5;\n color: var(--md-sys-color-on-primary-container);\n cursor: pointer;\n }\n\n #modes > md-icon[active] {\n border-radius: 9px;\n background-color: rgba(var(--primary-color-rgb), 0.05);\n opacity: 1;\n color: var(--md-sys-color-on-secondary-container);\n cursor: default;\n }\n #modes > md-icon:hover {\n opacity: 1;\n color: var(--md-sys-color-on-secondary-container);\n }\n\n #add button {\n display: flex;\n align-items: center;\n justify-content: center;\n\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n border: 0;\n border-radius: 50%;\n padding: 5px;\n width: 32px;\n height: 32px;\n cursor: pointer;\n }\n\n #add button:hover {\n background-color: var(--md-sys-color-on-primary-container);\n color: var(--md-sys-color-primary-container);\n box-shadow: var(--box-shadow);\n }\n\n #add button md-icon {\n font-size: 1.5em;\n }\n\n #filters {\n position: relative;\n }\n #filters [type='text'] {\n background-color: transparent;\n border: 0;\n border-bottom: var(--border-dim-color);\n padding: var(--spacing-small) var(--spacing-small) 7px 25px;\n font-size: var(--fontsize-large);\n }\n #filters [type='text']:focus {\n outline: none;\n }\n #filters md-icon {\n position: absolute;\n top: 3px;\n color: var(--md-sys-color-on-secondary-container);\n }\n #filters * {\n margin-right: var(--spacing-medium);\n }\n\n @media only screen and (max-width: 460px) {\n #modes {\n display: none;\n }\n }\n `\n\n @property({ type: Boolean }) creatable: boolean = false\n @property({ type: Object }) config: any\n @property({ type: Object }) data: any\n @property({ type: String }) mode: 'GRID' | 'LIST' | 'CARD' = 'CARD'\n @property({ type: String }) groupId?: string\n @property({ type: Array }) groups: any[] = []\n @property({ type: Array }) favorites: any[] = []\n\n @query('ox-grist') grist!: DataGrist\n\n render() {\n const mode = this.mode || 'CARD'\n\n return html`\n <ox-grist .config=${this.config} .mode=${mode} auto-fetch .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\" id=\"headroom\">\n <div id=\"filters\">\n <md-icon>search</md-icon>\n <input type=\"text\" />\n\n <select\n @change=${(e: Event) => {\n this.groupId = (e.currentTarget as HTMLInputElement).value\n this.requestUpdate()\n }}\n >\n <option value=\"\">*</option>\n ${this.groups.map(\n group => html`\n <option value=${group.id} ?selected=${group.id === this.groupId}>${group.description}</option>\n `\n )}\n </select>\n </div>\n\n <div id=\"modes\">\n <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>\n <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>\n <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>\n </div>\n\n ${this.creatable\n ? html`\n <div id=\"add\">\n <button><md-icon @click=${() => this.onCreateBoard()}>add</md-icon></button>\n </div>\n `\n : undefined}\n </div>\n </ox-grist>\n `\n }\n\n async fetchHandler({ page, limit, sorters = [] }: FetchOption) {\n const { items: records, total } = await this.getBoards({ page, limit, sorters })\n\n return {\n total,\n records\n }\n }\n\n get gristConfig() {\n return {\n list: {\n thumbnail: function (record: GristRecord, rowIndex: number) {\n return html` <img src=${record.thumbnail} style=\"width: 100%; height: 100%;\" /> `\n },\n fields: ['name', 'description'],\n details: ['updatedAt']\n },\n columns: [\n {\n type: 'gutter',\n gutterName: 'dirty'\n },\n {\n type: 'gutter',\n gutterName: 'sequence'\n },\n {\n type: 'string',\n name: 'id',\n hidden: true\n },\n {\n type: 'string',\n name: 'name',\n header: 'name',\n record: {\n editable: true,\n align: 'left'\n },\n width: 200,\n sortable: true\n },\n {\n type: 'string',\n name: 'description',\n header: 'description',\n record: {\n editable: true,\n align: 'left'\n },\n width: 200\n },\n {\n type: 'boolean',\n name: 'active',\n header: 'active',\n record: {\n editable: true\n },\n sortable: true,\n width: 60\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: 'updated at',\n record: {\n editable: true\n },\n sortable: true,\n width: 180\n },\n {\n type: 'datetime',\n name: 'createdAt',\n header: 'created at',\n record: {\n editable: true\n },\n sortable: true,\n width: 180\n }\n ],\n rows: {\n selectable: {\n multiple: true\n }\n },\n sorters: [\n {\n name: 'name',\n desc: false\n }\n ],\n pagination: {\n pages: [20, 30, 50, 100, 200]\n }\n }\n }\n\n async refresh() {\n this.groups = (await fetchGroupList()).groups.items\n\n if (this.groups) {\n await this.refreshBoards()\n }\n }\n\n async getBoards({\n page = 1,\n limit = 30,\n sorters = []\n }: { page?: number; limit?: number; sorters?: SortersConfig } = {}) {\n if (this.groupId && this.groupId == 'favor')\n return await this.getFavoriteBoards({\n page,\n limit\n })\n\n var listParam = {\n filters: this.groupId\n ? [\n {\n name: 'groupId',\n operator: 'eq',\n value: this.groupId\n }\n ]\n : [],\n sortings: sorters,\n pagination: {\n page,\n limit\n }\n }\n\n return (await fetchBoardList(listParam)).boards\n }\n\n async getFavoriteBoards({ page = 1, limit = 30 } = {}) {\n var listParam = {\n pagination: {\n page,\n limit\n }\n }\n\n return (await fetchFavoriteBoardList(listParam)).favoriteBoards\n }\n\n async refreshBoards() {\n if (!this.groups) {\n await this.refresh()\n return\n }\n\n this.grist.fetch()\n }\n\n async onCreateBoard() {\n /*\n * 기존 설정된 이미지가 선택된 상태가 되게 하기 위해서는 selector에 value를 전달해줄 필요가 있음.\n * 주의. value는 object일 수도 있고, string일 수도 있다.\n * string인 경우에는 해당 보드의 id로 해석한다.\n */\n var template = html`\n <board-creation-popup\n .defaultGroup=${this.groupId}\n .groups=${this.groups}\n @create-board=${async (e: CustomEvent) => {\n try {\n var { name, description, groupId, model, thumbnail } = e.detail\n\n var board: Board = {\n name,\n description,\n groupId,\n model: model || {\n width: 1200,\n height: 800\n },\n thumbnail\n }\n\n await createBoard(board)\n\n this.notify('info', 'new board created')\n } catch (ex: Error | any) {\n console.error(ex)\n this.notify('error', ex, ex)\n }\n }}\n ></board-creation-popup>\n `\n\n OxPopup.open({\n template,\n parent: this\n })\n\n requestAnimationFrame(() => {\n dispatchEvent(new Event('resize'))\n })\n }\n\n notify(level: 'warn' | 'error' | 'info', message: any, ex?: Error) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level,\n message,\n ex\n }\n })\n )\n }\n}\n"]}
|
@@ -5,14 +5,14 @@ import './modeller/scene-viewer/ox-scene-handler.js';
|
|
5
5
|
import './modeller/scene-viewer/ox-scene-layer.js';
|
6
6
|
import './modeller/scene-viewer/ox-scene-property.js';
|
7
7
|
import './modeller/scene-viewer/ox-scene-viewer.js';
|
8
|
-
import './ox-board-viewer';
|
8
|
+
import './ox-board-viewer.js';
|
9
9
|
import { LitElement, PropertyValues } from 'lit';
|
10
10
|
import { Scene, SCENE_MODE } from '@hatiolab/things-scene';
|
11
|
-
import { ComponentToolbar } from './modeller/component-toolbar/component-toolbar';
|
12
|
-
import { EditToolbar } from './modeller/edit-toolbar';
|
13
|
-
import { PropertySidebar } from './modeller/property-sidebar/property-sidebar';
|
14
|
-
import { ComponentGroup, ComponentTemplate } from './types';
|
15
|
-
declare const BoardModeller_base: typeof LitElement & import("@open-wc/
|
11
|
+
import { ComponentToolbar } from './modeller/component-toolbar/component-toolbar.js';
|
12
|
+
import { EditToolbar } from './modeller/edit-toolbar.js';
|
13
|
+
import { PropertySidebar } from './modeller/property-sidebar/property-sidebar.js';
|
14
|
+
import { ComponentGroup, ComponentTemplate } from './types.js';
|
15
|
+
declare const BoardModeller_base: typeof LitElement & import("@open-wc/scoped-elements/lit-element.js").ScopedElementsHostConstructor;
|
16
16
|
export declare class BoardModeller extends BoardModeller_base {
|
17
17
|
static styles: import("lit").CSSResult[];
|
18
18
|
static registerGroup(group: ComponentGroup): void;
|
@@ -6,17 +6,17 @@ import './modeller/scene-viewer/ox-scene-handler.js';
|
|
6
6
|
import './modeller/scene-viewer/ox-scene-layer.js';
|
7
7
|
import './modeller/scene-viewer/ox-scene-property.js';
|
8
8
|
import './modeller/scene-viewer/ox-scene-viewer.js';
|
9
|
-
import './ox-board-viewer';
|
9
|
+
import './ox-board-viewer.js';
|
10
10
|
import { saveAs } from 'file-saver';
|
11
11
|
import { css, html, LitElement } from 'lit';
|
12
12
|
import { customElement, property, query } from 'lit/decorators.js';
|
13
13
|
import { MODE_EDIT, SCENE_MODE } from '@hatiolab/things-scene';
|
14
|
-
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
14
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';
|
15
15
|
import { OxPopup } from '@operato/popup';
|
16
16
|
import { isMacOS, togglefullscreen } from '@operato/utils';
|
17
|
-
import { ComponentToolbar } from './modeller/component-toolbar/component-toolbar';
|
18
|
-
import { EditToolbar } from './modeller/edit-toolbar';
|
19
|
-
import { PropertySidebar } from './modeller/property-sidebar/property-sidebar';
|
17
|
+
import { ComponentToolbar } from './modeller/component-toolbar/component-toolbar.js';
|
18
|
+
import { EditToolbar } from './modeller/edit-toolbar.js';
|
19
|
+
import { PropertySidebar } from './modeller/property-sidebar/property-sidebar.js';
|
20
20
|
const MACOS = isMacOS();
|
21
21
|
const ICON_PROPERTIES = new URL('../../icons/icon-properties.png', import.meta.url).href;
|
22
22
|
const ICON_PROPERTIES_LINE_TYPE = new URL('../../icons/icon-properties-line-type.png', import.meta.url).href;
|
@@ -61,18 +61,102 @@ let BoardModeller = class BoardModeller extends ScopedElementsMixin(LitElement)
|
|
61
61
|
}
|
62
62
|
constructor() {
|
63
63
|
super();
|
64
|
-
this
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
this
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
64
|
+
Object.defineProperty(this, "boardName", {
|
65
|
+
enumerable: true,
|
66
|
+
configurable: true,
|
67
|
+
writable: true,
|
68
|
+
value: ''
|
69
|
+
});
|
70
|
+
Object.defineProperty(this, "model", {
|
71
|
+
enumerable: true,
|
72
|
+
configurable: true,
|
73
|
+
writable: true,
|
74
|
+
value: null
|
75
|
+
});
|
76
|
+
Object.defineProperty(this, "baseUrl", {
|
77
|
+
enumerable: true,
|
78
|
+
configurable: true,
|
79
|
+
writable: true,
|
80
|
+
value: ''
|
81
|
+
});
|
82
|
+
Object.defineProperty(this, "selected", {
|
83
|
+
enumerable: true,
|
84
|
+
configurable: true,
|
85
|
+
writable: true,
|
86
|
+
value: []
|
87
|
+
});
|
88
|
+
Object.defineProperty(this, "mode", {
|
89
|
+
enumerable: true,
|
90
|
+
configurable: true,
|
91
|
+
writable: true,
|
92
|
+
value: SCENE_MODE.EDIT
|
93
|
+
});
|
94
|
+
Object.defineProperty(this, "provider", {
|
95
|
+
enumerable: true,
|
96
|
+
configurable: true,
|
97
|
+
writable: true,
|
98
|
+
value: null
|
99
|
+
});
|
100
|
+
Object.defineProperty(this, "hideProperty", {
|
101
|
+
enumerable: true,
|
102
|
+
configurable: true,
|
103
|
+
writable: true,
|
104
|
+
value: false
|
105
|
+
});
|
106
|
+
Object.defineProperty(this, "overlay", {
|
107
|
+
enumerable: true,
|
108
|
+
configurable: true,
|
109
|
+
writable: true,
|
110
|
+
value: ''
|
111
|
+
});
|
112
|
+
Object.defineProperty(this, "scene", {
|
113
|
+
enumerable: true,
|
114
|
+
configurable: true,
|
115
|
+
writable: true,
|
116
|
+
value: void 0
|
117
|
+
});
|
118
|
+
Object.defineProperty(this, "componentGroupList", {
|
119
|
+
enumerable: true,
|
120
|
+
configurable: true,
|
121
|
+
writable: true,
|
122
|
+
value: []
|
123
|
+
});
|
124
|
+
Object.defineProperty(this, "fonts", {
|
125
|
+
enumerable: true,
|
126
|
+
configurable: true,
|
127
|
+
writable: true,
|
128
|
+
value: []
|
129
|
+
});
|
130
|
+
Object.defineProperty(this, "propertyEditor", {
|
131
|
+
enumerable: true,
|
132
|
+
configurable: true,
|
133
|
+
writable: true,
|
134
|
+
value: []
|
135
|
+
});
|
136
|
+
Object.defineProperty(this, "editToolbar", {
|
137
|
+
enumerable: true,
|
138
|
+
configurable: true,
|
139
|
+
writable: true,
|
140
|
+
value: void 0
|
141
|
+
});
|
142
|
+
Object.defineProperty(this, "viewer", {
|
143
|
+
enumerable: true,
|
144
|
+
configurable: true,
|
145
|
+
writable: true,
|
146
|
+
value: void 0
|
147
|
+
});
|
148
|
+
Object.defineProperty(this, "group", {
|
149
|
+
enumerable: true,
|
150
|
+
configurable: true,
|
151
|
+
writable: true,
|
152
|
+
value: ''
|
153
|
+
});
|
154
|
+
Object.defineProperty(this, "shortcutHandler", {
|
155
|
+
enumerable: true,
|
156
|
+
configurable: true,
|
157
|
+
writable: true,
|
158
|
+
value: void 0
|
159
|
+
});
|
76
160
|
document.addEventListener('get-all-scene-component-ids', (e) => {
|
77
161
|
var { component, callback } = e.detail;
|
78
162
|
if (!this.scene)
|
@@ -290,8 +374,12 @@ let BoardModeller = class BoardModeller extends ScopedElementsMixin(LitElement)
|
|
290
374
|
}
|
291
375
|
onContextMenu() { }
|
292
376
|
};
|
293
|
-
BoardModeller
|
294
|
-
|
377
|
+
Object.defineProperty(BoardModeller, "styles", {
|
378
|
+
enumerable: true,
|
379
|
+
configurable: true,
|
380
|
+
writable: true,
|
381
|
+
value: [
|
382
|
+
css `
|
295
383
|
:host {
|
296
384
|
display: flex;
|
297
385
|
flex-direction: column;
|
@@ -361,7 +449,8 @@ BoardModeller.styles = [
|
|
361
449
|
padding: 0;
|
362
450
|
}
|
363
451
|
`
|
364
|
-
]
|
452
|
+
]
|
453
|
+
});
|
365
454
|
__decorate([
|
366
455
|
property({ type: String })
|
367
456
|
], BoardModeller.prototype, "boardName", void 0);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-board-modeller.js","sourceRoot":"","sources":["../../src/ox-board-modeller.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0B,CAAA;AACjC,OAAO,wBAAwB,CAAA;AAC/B,OAAO,6CAA6C,CAAA;AACpD,OAAO,2CAA2C,CAAA;AAClD,OAAO,8CAA8C,CAAA;AACrD,OAAO,4CAA4C,CAAA;AACnD,OAAO,mBAAmB,CAAA;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAA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E,KAAK,EAAE,CAAC;qDAA2B;AAEtB;IAA9B,KAAK,CAAC,cAAc,CAAC;kDAAkC;AACtB;IAAjC,KAAK,CAAC,iBAAiB,CAAC;6CAA+B;AA1H7C,aAAa;IADzB,aAAa,CAAC,mBAAmB,CAAC;GACtB,aAAa,CA6WzB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/fab/fab.js'\nimport '@hatiolab/things-scene'\nimport './modeller/scene-viewer/ox-scene-handler.js'\nimport './modeller/scene-viewer/ox-scene-layer.js'\nimport './modeller/scene-viewer/ox-scene-property.js'\nimport './modeller/scene-viewer/ox-scene-viewer.js'\nimport './ox-board-viewer'\n\nimport { saveAs } from 'file-saver'\nimport { css, html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { MODE_EDIT, Scene, SCENE_MODE } from '@hatiolab/things-scene'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { OxPopup } from '@operato/popup'\nimport { isMacOS, togglefullscreen } from '@operato/utils'\n\nimport { ComponentToolbar } from './modeller/component-toolbar/component-toolbar'\nimport { EditToolbar } from './modeller/edit-toolbar'\nimport { PropertySidebar } from './modeller/property-sidebar/property-sidebar'\nimport { ComponentGroup, ComponentTemplate } from './types'\nimport OxSceneViewer from './modeller/scene-viewer/ox-scene-viewer.js'\n\nconst MACOS = isMacOS()\n\nconst ICON_PROPERTIES = new URL('../../icons/icon-properties.png', import.meta.url).href\nconst ICON_PROPERTIES_LINE_TYPE = new URL('../../icons/icon-properties-line-type.png', import.meta.url).href\nconst ICON_PROPERTIES_ARROW_TYPE = new URL('../../icons/icon-properties-arrow-type.png', import.meta.url).href\nconst ICON_PROPERTIES_LABEL = new URL('../../icons/icon-properties-label.png', import.meta.url).href\nconst ICON_PROPERTIES_PADDING = new URL('../../icons/icon-properties-padding.png', import.meta.url).href\n\nconst ICON_HTOOLBAR = new URL('../../icons/icon-htoolbar.png', import.meta.url).href\nconst ICON_FULLSCREEN = new URL('../../icons/icon-fullscreen.png', import.meta.url).href\nconst ICON_COLLAPSE = new URL('../../icons/icon-collapse.png', import.meta.url).href\nconst ICON_COLLAPSE_ACTIVE = new URL('../../icons/icon-collapse-active.png', import.meta.url).href\n\nconst ICON_SHELL_INSPECTOR = new URL('../../icons/icon-shell-inspector.png', import.meta.url).href\n\nvar Registry: ComponentGroup[] = []\n\n@customElement('ox-board-modeller')\nexport class BoardModeller extends ScopedElementsMixin(LitElement) {\n static styles = [\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n height: 100%;\n overflow: hidden;\n }\n\n edit-toolbar {\n flex: 45px;\n max-height: 45px;\n }\n\n div[content] {\n flex: 1;\n max-height: calc(100% - 45px);\n\n display: flex;\n flex-direction: row;\n }\n\n component-toolbar {\n max-height: 100%;\n }\n\n property-sidebar {\n overflow: hidden;\n }\n\n #scene-wrap {\n position: relative;\n\n flex: 1;\n display: flex;\n flex-direction: row;\n }\n\n ox-scene-viewer {\n flex: 1;\n width: 100%;\n height: 100%;\n }\n\n md-fab {\n position: absolute;\n right: 15px;\n bottom: 15px;\n }\n\n ox-popup {\n width: 90%;\n height: 90%;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n background: var(--md-sys-color-on-secondary-container, black);\n\n display: flex;\n justify-content: center;\n flex-direction: column;\n }\n\n ox-board-viewer {\n width: 98%;\n height: 98%;\n margin: auto;\n padding: 0;\n }\n `\n ]\n\n static registerGroup(group: ComponentGroup) {\n var found = Registry.find(inRegisterGroup => inRegisterGroup.name == group.name)\n\n if (found) {\n found = {\n ...found,\n ...group\n }\n } else {\n Registry.push(group)\n }\n }\n\n static registerTemplate(templates: ComponentTemplate[]): void {\n templates &&\n templates.forEach(template => {\n var groups: string[] = typeof template.group == 'string' ? [template.group] : template.group\n\n Registry.filter(group => groups.includes(group.name)).forEach(group => {\n if (!group.templates.find(inGroupTemplate => inGroupTemplate.type == template.type)) {\n group.templates.push(template)\n }\n })\n })\n }\n\n static get groups(): ComponentGroup[] {\n return Registry\n }\n\n static getGroup(name: string) {\n return Registry.find(group => group.name === name)\n }\n\n @property({ type: String }) boardName: string = ''\n @property({ type: Object }) model: any = null\n @property({ type: String }) baseUrl: string = ''\n @property({ type: Array }) selected: any[] = []\n @property({ type: Number }) mode: SCENE_MODE = SCENE_MODE.EDIT\n @property({ type: Object }) provider: any = null\n @property({ type: Boolean }) hideProperty: boolean = false\n @property({ type: String }) overlay: string = ''\n @property({ type: Object }) scene?: Scene\n @property({ type: Array }) componentGroupList: any[] = []\n @property({ type: Array }) fonts: any[] = []\n @property({ type: Array }) propertyEditor: any[] = []\n\n @query('edit-toolbar') private editToolbar!: EditToolbar\n @query('ox-scene-viewer') private viewer!: OxSceneViewer\n\n private group: string = ''\n private shortcutHandler?: (e: KeyboardEvent) => void\n\n constructor() {\n super()\n\n document.addEventListener('get-all-scene-component-ids', (e: Event) => {\n var { component, callback } = (e as CustomEvent).detail\n\n if (!this.scene) return\n\n var ids\n if (component) {\n ids = this.scene.findAll(component).map(c => c.model.id)\n } else {\n // @ts-ignore\n ids = this.scene.ids.map(({ key }) => key)\n }\n\n ids = ids.filter(Boolean).sort()\n callback(ids)\n })\n\n this.style.setProperty('--url-icon-properties', `url(${ICON_PROPERTIES})`)\n this.style.setProperty('--url-icon-properties-label', `url(${ICON_PROPERTIES_LABEL})`)\n this.style.setProperty('--url-icon-properties-padding', `url(${ICON_PROPERTIES_PADDING})`)\n this.style.setProperty('--url-icon-properties-line-type', `url(${ICON_PROPERTIES_LINE_TYPE})`)\n this.style.setProperty('--url-icon-properties-arrow-type', `url(${ICON_PROPERTIES_ARROW_TYPE})`)\n\n this.style.setProperty('--url-icon-htoolbar', `url(${ICON_HTOOLBAR})`)\n this.style.setProperty('--url-icon-fullscreen', `url(${ICON_FULLSCREEN})`)\n this.style.setProperty('--url-icon-collapse', `url(${ICON_COLLAPSE})`)\n this.style.setProperty('--url-icon-collapse-active', `url(${ICON_COLLAPSE_ACTIVE})`)\n\n this.style.setProperty('--url-icon-shell-inspector', `url(${ICON_SHELL_INSPECTOR})`)\n }\n\n static get scopedElements() {\n return {\n 'edit-toolbar': EditToolbar,\n 'property-sidebar': PropertySidebar,\n 'component-toolbar': ComponentToolbar\n }\n }\n\n render() {\n return html`\n <edit-toolbar\n .scene=${this.scene}\n .selected=${this.selected}\n @hide-property-changed=${(e: CustomEvent) => (this.hideProperty = e.detail.value)}\n @open-preview=${() => this.preview()}\n @download-model=${() => this.downloadModel()}\n @modeller-fullscreen=${() => togglefullscreen(this)}\n >\n ${this.renderBrandingZone()}\n </edit-toolbar>\n\n <div content>\n <component-toolbar\n .scene=${this.scene}\n .mode=${this.mode}\n @mode-changed=${(e: CustomEvent) => {\n this.mode = e.detail.value\n }}\n .componentGroupList=${this.componentGroupList}\n .group=${this.group}\n >\n </component-toolbar>\n\n <div id=\"scene-wrap\">\n <ox-scene-viewer\n id=\"scene\"\n .scene=${this.scene}\n @scene-changed=${(e: CustomEvent) => {\n this.scene = e.detail.value\n }}\n .model=${this.model}\n .selected=${this.selected}\n @selected-changed=${(e: CustomEvent) => {\n this.selected = e.detail.value\n }}\n .mode=${this.mode}\n @mode-changed=${(e: CustomEvent) => {\n this.mode = e.detail.value\n }}\n fit=\"ratio\"\n .baseUrl=${this.baseUrl}\n @contextmenu=${() => this.onContextMenu()}\n .provider=${this.provider}\n name=\"modeller\"\n >\n <ox-scene-layer type=\"selection-layer\"></ox-scene-layer>\n <ox-scene-layer type=\"modeling-layer\"></ox-scene-layer>\n <ox-scene-layer type=\"add-layer\"> </ox-scene-layer>\n <ox-scene-layer type=\"guide-layer\">\n <ox-scene-property name=\"ruler\" value=\"disabled\"></ox-scene-property>\n </ox-scene-layer>\n <ox-scene-layer type=\"shift-layer\">\n <ox-scene-property name=\"text\" value=\"${this.overlay}\"></ox-scene-property>\n <ox-scene-property name=\"alpha\" value=\"0.3\"></ox-scene-property>\n <ox-scene-property name=\"fontFamily\" value=\"arial\"></ox-scene-property>\n <ox-scene-property name=\"fontSize\" value=\"30\" type=\"number\"></ox-scene-property>\n <ox-scene-property name=\"fontColor\" value=\"navy\"></ox-scene-property>\n <ox-scene-property name=\"textBaseline\" value=\"top\"></ox-scene-property>\n <ox-scene-property name=\"textAlign\" value=\"left\"></ox-scene-property>\n <ox-scene-property name=\"paddingTop\" value=\"50\" type=\"number\"></ox-scene-property>\n <ox-scene-property name=\"paddingLeft\" value=\"50\" type=\"number\"></ox-scene-property>\n </ox-scene-layer>\n <ox-scene-layer type=\"decotag-layer\"></ox-scene-layer>\n <ox-scene-handler type=\"text-editor\"></ox-scene-handler>\n <ox-scene-handler type=\"move-handler\"></ox-scene-handler>\n <ox-scene-handler type=\"paste-handler\"></ox-scene-handler>\n </ox-scene-viewer>\n\n <md-fab @click=${() => this.onTapSave()} title=\"save\">\n <md-icon slot=\"icon\">save</md-icon>\n </md-fab>\n </div>\n\n <property-sidebar\n .scene=${this.scene}\n .selected=${this.selected}\n .collapsed=${this.hideProperty}\n .fonts=${this.fonts}\n .propertyEditor=${this.propertyEditor}\n >\n </property-sidebar>\n </div>\n `\n }\n\n connectedCallback(): void {\n super.connectedCallback()\n this.bindShortcutEvent()\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback()\n this.unbindShortcutEvent()\n }\n\n updated(changes: PropertyValues<this>) {\n if (changes.has('scene') && this.scene) {\n this.scene.mode = MODE_EDIT\n }\n }\n\n close() {\n this.model = null\n this.requestUpdate()\n }\n\n onShortcut(e: KeyboardEvent) {\n if (MACOS) var ctrlKey = e.metaKey\n else var ctrlKey = e.ctrlKey\n\n switch (e.code) {\n case 'KeyS':\n if (ctrlKey) {\n this.onTapSave()\n e.preventDefault()\n }\n break\n }\n }\n\n preview() {\n const board = {\n id: 'preview',\n model: this.scene?.model ? JSON.parse(JSON.stringify(this.scene.model)) : null\n }\n\n OxPopup.open({\n template: html` <ox-board-viewer style=\"flex: 1;\" .provider=${this.provider} .board=${board}></ox-board-viewer> `,\n style: 'width: 80vw; height: 80vh;',\n backdrop: true\n })\n\n requestAnimationFrame(() => {\n dispatchEvent(new Event('resize'))\n })\n }\n\n downloadModel() {\n if (!this.scene) return\n\n var model = JSON.stringify(this.model, null, 2)\n var filename = (this.boardName || 'NONAME') + '-' + Date.now() + '.json'\n saveAs(new Blob([model], { type: 'application/octet-stream' }), filename)\n }\n\n renderBrandingZone() {\n return html``\n }\n\n onTapSave() {\n this.dispatchEvent(new CustomEvent('save-model', { bubbles: true, composed: true, detail: { model: this.model } }))\n }\n\n bindShortcutEvent() {\n // TODO: Global Hotkey에 대한 정의를 edit-toolbar에서 가져올 수 있도록 수정해야 함.\n const GLOBAL_HOTKEYS = ['Digit1', 'Digit2', 'F11', 'KeyD', 'KeyP', 'KeyS']\n\n this.shortcutHandler = (e: KeyboardEvent) => {\n const target = e.composedPath()[0] as HTMLElement\n var tagName = target.tagName\n var isInput = target.isContentEditable || tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA'\n var isGlobalHotkey = GLOBAL_HOTKEYS.includes(e.code)\n\n if (!isGlobalHotkey && isInput) return\n if (!this.editToolbar.onShortcut(e)) this.onShortcut(e)\n }\n\n document.addEventListener('keydown', this.shortcutHandler)\n }\n\n unbindShortcutEvent() {\n if (this.shortcutHandler) {\n document.removeEventListener('keydown', this.shortcutHandler)\n delete this.shortcutHandler\n }\n }\n\n undoable(): boolean {\n return !!this.scene?.undoable()\n }\n\n redoable(): boolean {\n return !!this.scene?.redoable()\n }\n\n preserve(): void {\n this.scene?.preserve()\n }\n\n hasUnpreservedChanges(): boolean {\n return !!this.scene?.hasUnpreservedChanges()\n }\n\n onContextMenu() {}\n}\n"]}
|
1
|
+
{"version":3,"file":"ox-board-modeller.js","sourceRoot":"","sources":["../../src/ox-board-modeller.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0B,CAAA;AACjC,OAAO,wBAAwB,CAAA;AAC/B,OAAO,6CAA6C,CAAA;AACpD,OAAO,2CAA2C,CAAA;AACl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pB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAc;AACd;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;yDAA+B;AAC9B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;4CAAkB;AACjB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;qDAA2B;AAEtB;IAA9B,KAAK,CAAC,cAAc,CAAC;kDAAkC;AACtB;IAAjC,KAAK,CAAC,iBAAiB,CAAC;6CAA+B;AA1H7C,aAAa;IADzB,aAAa,CAAC,mBAAmB,CAAC;GACtB,aAAa,CA6WzB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/fab/fab.js'\nimport '@hatiolab/things-scene'\nimport './modeller/scene-viewer/ox-scene-handler.js'\nimport './modeller/scene-viewer/ox-scene-layer.js'\nimport './modeller/scene-viewer/ox-scene-property.js'\nimport './modeller/scene-viewer/ox-scene-viewer.js'\nimport './ox-board-viewer.js'\n\nimport { saveAs } from 'file-saver'\nimport { css, html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { MODE_EDIT, Scene, SCENE_MODE } from '@hatiolab/things-scene'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js'\nimport { OxPopup } from '@operato/popup'\nimport { isMacOS, togglefullscreen } from '@operato/utils'\n\nimport { ComponentToolbar } from './modeller/component-toolbar/component-toolbar.js'\nimport { EditToolbar } from './modeller/edit-toolbar.js'\nimport { PropertySidebar } from './modeller/property-sidebar/property-sidebar.js'\nimport { ComponentGroup, ComponentTemplate } from './types.js'\nimport OxSceneViewer from './modeller/scene-viewer/ox-scene-viewer.js'\n\nconst MACOS = isMacOS()\n\nconst ICON_PROPERTIES = new URL('../../icons/icon-properties.png', import.meta.url).href\nconst ICON_PROPERTIES_LINE_TYPE = new URL('../../icons/icon-properties-line-type.png', import.meta.url).href\nconst ICON_PROPERTIES_ARROW_TYPE = new URL('../../icons/icon-properties-arrow-type.png', import.meta.url).href\nconst ICON_PROPERTIES_LABEL = new URL('../../icons/icon-properties-label.png', import.meta.url).href\nconst ICON_PROPERTIES_PADDING = new URL('../../icons/icon-properties-padding.png', import.meta.url).href\n\nconst ICON_HTOOLBAR = new URL('../../icons/icon-htoolbar.png', import.meta.url).href\nconst ICON_FULLSCREEN = new URL('../../icons/icon-fullscreen.png', import.meta.url).href\nconst ICON_COLLAPSE = new URL('../../icons/icon-collapse.png', import.meta.url).href\nconst ICON_COLLAPSE_ACTIVE = new URL('../../icons/icon-collapse-active.png', import.meta.url).href\n\nconst ICON_SHELL_INSPECTOR = new URL('../../icons/icon-shell-inspector.png', import.meta.url).href\n\nvar Registry: ComponentGroup[] = []\n\n@customElement('ox-board-modeller')\nexport class BoardModeller extends ScopedElementsMixin(LitElement) {\n static styles = [\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n height: 100%;\n overflow: hidden;\n }\n\n edit-toolbar {\n flex: 45px;\n max-height: 45px;\n }\n\n div[content] {\n flex: 1;\n max-height: calc(100% - 45px);\n\n display: flex;\n flex-direction: row;\n }\n\n component-toolbar {\n max-height: 100%;\n }\n\n property-sidebar {\n overflow: hidden;\n }\n\n #scene-wrap {\n position: relative;\n\n flex: 1;\n display: flex;\n flex-direction: row;\n }\n\n ox-scene-viewer {\n flex: 1;\n width: 100%;\n height: 100%;\n }\n\n md-fab {\n position: absolute;\n right: 15px;\n bottom: 15px;\n }\n\n ox-popup {\n width: 90%;\n height: 90%;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n background: var(--md-sys-color-on-secondary-container, black);\n\n display: flex;\n justify-content: center;\n flex-direction: column;\n }\n\n ox-board-viewer {\n width: 98%;\n height: 98%;\n margin: auto;\n padding: 0;\n }\n `\n ]\n\n static registerGroup(group: ComponentGroup) {\n var found = Registry.find(inRegisterGroup => inRegisterGroup.name == group.name)\n\n if (found) {\n found = {\n ...found,\n ...group\n }\n } else {\n Registry.push(group)\n }\n }\n\n static registerTemplate(templates: ComponentTemplate[]): void {\n templates &&\n templates.forEach(template => {\n var groups: string[] = typeof template.group == 'string' ? [template.group] : template.group\n\n Registry.filter(group => groups.includes(group.name)).forEach(group => {\n if (!group.templates.find(inGroupTemplate => inGroupTemplate.type == template.type)) {\n group.templates.push(template)\n }\n })\n })\n }\n\n static get groups(): ComponentGroup[] {\n return Registry\n }\n\n static getGroup(name: string) {\n return Registry.find(group => group.name === name)\n }\n\n @property({ type: String }) boardName: string = ''\n @property({ type: Object }) model: any = null\n @property({ type: String }) baseUrl: string = ''\n @property({ type: Array }) selected: any[] = []\n @property({ type: Number }) mode: SCENE_MODE = SCENE_MODE.EDIT\n @property({ type: Object }) provider: any = null\n @property({ type: Boolean }) hideProperty: boolean = false\n @property({ type: String }) overlay: string = ''\n @property({ type: Object }) scene?: Scene\n @property({ type: Array }) componentGroupList: any[] = []\n @property({ type: Array }) fonts: any[] = []\n @property({ type: Array }) propertyEditor: any[] = []\n\n @query('edit-toolbar') private editToolbar!: EditToolbar\n @query('ox-scene-viewer') private viewer!: OxSceneViewer\n\n private group: string = ''\n private shortcutHandler?: (e: KeyboardEvent) => void\n\n constructor() {\n super()\n\n document.addEventListener('get-all-scene-component-ids', (e: Event) => {\n var { component, callback } = (e as CustomEvent).detail\n\n if (!this.scene) return\n\n var ids\n if (component) {\n ids = this.scene.findAll(component).map(c => c.model.id)\n } else {\n // @ts-ignore\n ids = this.scene.ids.map(({ key }) => key)\n }\n\n ids = ids.filter(Boolean).sort()\n callback(ids)\n })\n\n this.style.setProperty('--url-icon-properties', `url(${ICON_PROPERTIES})`)\n this.style.setProperty('--url-icon-properties-label', `url(${ICON_PROPERTIES_LABEL})`)\n this.style.setProperty('--url-icon-properties-padding', `url(${ICON_PROPERTIES_PADDING})`)\n this.style.setProperty('--url-icon-properties-line-type', `url(${ICON_PROPERTIES_LINE_TYPE})`)\n this.style.setProperty('--url-icon-properties-arrow-type', `url(${ICON_PROPERTIES_ARROW_TYPE})`)\n\n this.style.setProperty('--url-icon-htoolbar', `url(${ICON_HTOOLBAR})`)\n this.style.setProperty('--url-icon-fullscreen', `url(${ICON_FULLSCREEN})`)\n this.style.setProperty('--url-icon-collapse', `url(${ICON_COLLAPSE})`)\n this.style.setProperty('--url-icon-collapse-active', `url(${ICON_COLLAPSE_ACTIVE})`)\n\n this.style.setProperty('--url-icon-shell-inspector', `url(${ICON_SHELL_INSPECTOR})`)\n }\n\n static get scopedElements() {\n return {\n 'edit-toolbar': EditToolbar,\n 'property-sidebar': PropertySidebar,\n 'component-toolbar': ComponentToolbar\n }\n }\n\n render() {\n return html`\n <edit-toolbar\n .scene=${this.scene}\n .selected=${this.selected}\n @hide-property-changed=${(e: CustomEvent) => (this.hideProperty = e.detail.value)}\n @open-preview=${() => this.preview()}\n @download-model=${() => this.downloadModel()}\n @modeller-fullscreen=${() => togglefullscreen(this)}\n >\n ${this.renderBrandingZone()}\n </edit-toolbar>\n\n <div content>\n <component-toolbar\n .scene=${this.scene}\n .mode=${this.mode}\n @mode-changed=${(e: CustomEvent) => {\n this.mode = e.detail.value\n }}\n .componentGroupList=${this.componentGroupList}\n .group=${this.group}\n >\n </component-toolbar>\n\n <div id=\"scene-wrap\">\n <ox-scene-viewer\n id=\"scene\"\n .scene=${this.scene}\n @scene-changed=${(e: CustomEvent) => {\n this.scene = e.detail.value\n }}\n .model=${this.model}\n .selected=${this.selected}\n @selected-changed=${(e: CustomEvent) => {\n this.selected = e.detail.value\n }}\n .mode=${this.mode}\n @mode-changed=${(e: CustomEvent) => {\n this.mode = e.detail.value\n }}\n fit=\"ratio\"\n .baseUrl=${this.baseUrl}\n @contextmenu=${() => this.onContextMenu()}\n .provider=${this.provider}\n name=\"modeller\"\n >\n <ox-scene-layer type=\"selection-layer\"></ox-scene-layer>\n <ox-scene-layer type=\"modeling-layer\"></ox-scene-layer>\n <ox-scene-layer type=\"add-layer\"> </ox-scene-layer>\n <ox-scene-layer type=\"guide-layer\">\n <ox-scene-property name=\"ruler\" value=\"disabled\"></ox-scene-property>\n </ox-scene-layer>\n <ox-scene-layer type=\"shift-layer\">\n <ox-scene-property name=\"text\" value=\"${this.overlay}\"></ox-scene-property>\n <ox-scene-property name=\"alpha\" value=\"0.3\"></ox-scene-property>\n <ox-scene-property name=\"fontFamily\" value=\"arial\"></ox-scene-property>\n <ox-scene-property name=\"fontSize\" value=\"30\" type=\"number\"></ox-scene-property>\n <ox-scene-property name=\"fontColor\" value=\"navy\"></ox-scene-property>\n <ox-scene-property name=\"textBaseline\" value=\"top\"></ox-scene-property>\n <ox-scene-property name=\"textAlign\" value=\"left\"></ox-scene-property>\n <ox-scene-property name=\"paddingTop\" value=\"50\" type=\"number\"></ox-scene-property>\n <ox-scene-property name=\"paddingLeft\" value=\"50\" type=\"number\"></ox-scene-property>\n </ox-scene-layer>\n <ox-scene-layer type=\"decotag-layer\"></ox-scene-layer>\n <ox-scene-handler type=\"text-editor\"></ox-scene-handler>\n <ox-scene-handler type=\"move-handler\"></ox-scene-handler>\n <ox-scene-handler type=\"paste-handler\"></ox-scene-handler>\n </ox-scene-viewer>\n\n <md-fab @click=${() => this.onTapSave()} title=\"save\">\n <md-icon slot=\"icon\">save</md-icon>\n </md-fab>\n </div>\n\n <property-sidebar\n .scene=${this.scene}\n .selected=${this.selected}\n .collapsed=${this.hideProperty}\n .fonts=${this.fonts}\n .propertyEditor=${this.propertyEditor}\n >\n </property-sidebar>\n </div>\n `\n }\n\n connectedCallback(): void {\n super.connectedCallback()\n this.bindShortcutEvent()\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback()\n this.unbindShortcutEvent()\n }\n\n updated(changes: PropertyValues<this>) {\n if (changes.has('scene') && this.scene) {\n this.scene.mode = MODE_EDIT\n }\n }\n\n close() {\n this.model = null\n this.requestUpdate()\n }\n\n onShortcut(e: KeyboardEvent) {\n if (MACOS) var ctrlKey = e.metaKey\n else var ctrlKey = e.ctrlKey\n\n switch (e.code) {\n case 'KeyS':\n if (ctrlKey) {\n this.onTapSave()\n e.preventDefault()\n }\n break\n }\n }\n\n preview() {\n const board = {\n id: 'preview',\n model: this.scene?.model ? JSON.parse(JSON.stringify(this.scene.model)) : null\n }\n\n OxPopup.open({\n template: html` <ox-board-viewer style=\"flex: 1;\" .provider=${this.provider} .board=${board}></ox-board-viewer> `,\n style: 'width: 80vw; height: 80vh;',\n backdrop: true\n })\n\n requestAnimationFrame(() => {\n dispatchEvent(new Event('resize'))\n })\n }\n\n downloadModel() {\n if (!this.scene) return\n\n var model = JSON.stringify(this.model, null, 2)\n var filename = (this.boardName || 'NONAME') + '-' + Date.now() + '.json'\n saveAs(new Blob([model], { type: 'application/octet-stream' }), filename)\n }\n\n renderBrandingZone() {\n return html``\n }\n\n onTapSave() {\n this.dispatchEvent(new CustomEvent('save-model', { bubbles: true, composed: true, detail: { model: this.model } }))\n }\n\n bindShortcutEvent() {\n // TODO: Global Hotkey에 대한 정의를 edit-toolbar에서 가져올 수 있도록 수정해야 함.\n const GLOBAL_HOTKEYS = ['Digit1', 'Digit2', 'F11', 'KeyD', 'KeyP', 'KeyS']\n\n this.shortcutHandler = (e: KeyboardEvent) => {\n const target = e.composedPath()[0] as HTMLElement\n var tagName = target.tagName\n var isInput = target.isContentEditable || tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA'\n var isGlobalHotkey = GLOBAL_HOTKEYS.includes(e.code)\n\n if (!isGlobalHotkey && isInput) return\n if (!this.editToolbar.onShortcut(e)) this.onShortcut(e)\n }\n\n document.addEventListener('keydown', this.shortcutHandler)\n }\n\n unbindShortcutEvent() {\n if (this.shortcutHandler) {\n document.removeEventListener('keydown', this.shortcutHandler)\n delete this.shortcutHandler\n }\n }\n\n undoable(): boolean {\n return !!this.scene?.undoable()\n }\n\n redoable(): boolean {\n return !!this.scene?.redoable()\n }\n\n preserve(): void {\n this.scene?.preserve()\n }\n\n hasUnpreservedChanges(): boolean {\n return !!this.scene?.hasUnpreservedChanges()\n }\n\n onContextMenu() {}\n}\n"]}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import '@material/web/icon/icon.js';
|
2
|
-
import './player/ox-board-wrapper';
|
3
|
-
import './player/ox-board-player-carousel';
|
2
|
+
import './player/ox-board-wrapper.js';
|
3
|
+
import './player/ox-board-player-carousel.js';
|
4
4
|
import { LitElement, PropertyValues } from 'lit';
|
5
5
|
export declare class BoardPlayer extends LitElement {
|
6
6
|
static styles: import("lit").CSSResult;
|
@@ -1,25 +1,106 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
2
|
import '@material/web/icon/icon.js';
|
3
|
-
import './player/ox-board-wrapper';
|
4
|
-
import './player/ox-board-player-carousel';
|
3
|
+
import './player/ox-board-wrapper.js';
|
4
|
+
import './player/ox-board-player-carousel.js';
|
5
5
|
import { html, LitElement } from 'lit';
|
6
6
|
import { customElement, property, query, state } from 'lit/decorators.js';
|
7
7
|
import { exitfullscreen, SwipeListener, togglefullscreen } from '@operato/utils';
|
8
8
|
import { PlaylistStorage } from './data-storage/data-storage.js';
|
9
|
-
import { style } from './ox-board-player-style';
|
9
|
+
import { style } from './ox-board-player-style.js';
|
10
10
|
const DEFAULT_PLAYLIST = String('__default__');
|
11
11
|
let BoardPlayer = class BoardPlayer extends LitElement {
|
12
12
|
constructor() {
|
13
13
|
super(...arguments);
|
14
|
-
this
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
this
|
21
|
-
|
22
|
-
|
14
|
+
Object.defineProperty(this, "playlist", {
|
15
|
+
enumerable: true,
|
16
|
+
configurable: true,
|
17
|
+
writable: true,
|
18
|
+
value: DEFAULT_PLAYLIST
|
19
|
+
});
|
20
|
+
Object.defineProperty(this, "boards", {
|
21
|
+
enumerable: true,
|
22
|
+
configurable: true,
|
23
|
+
writable: true,
|
24
|
+
value: []
|
25
|
+
});
|
26
|
+
Object.defineProperty(this, "playtime", {
|
27
|
+
enumerable: true,
|
28
|
+
configurable: true,
|
29
|
+
writable: true,
|
30
|
+
value: 30
|
31
|
+
});
|
32
|
+
Object.defineProperty(this, "columns", {
|
33
|
+
enumerable: true,
|
34
|
+
configurable: true,
|
35
|
+
writable: true,
|
36
|
+
value: 1
|
37
|
+
});
|
38
|
+
Object.defineProperty(this, "rows", {
|
39
|
+
enumerable: true,
|
40
|
+
configurable: true,
|
41
|
+
writable: true,
|
42
|
+
value: 1
|
43
|
+
});
|
44
|
+
Object.defineProperty(this, "started", {
|
45
|
+
enumerable: true,
|
46
|
+
configurable: true,
|
47
|
+
writable: true,
|
48
|
+
value: false
|
49
|
+
});
|
50
|
+
Object.defineProperty(this, "playing", {
|
51
|
+
enumerable: true,
|
52
|
+
configurable: true,
|
53
|
+
writable: true,
|
54
|
+
value: false
|
55
|
+
});
|
56
|
+
Object.defineProperty(this, "provider", {
|
57
|
+
enumerable: true,
|
58
|
+
configurable: true,
|
59
|
+
writable: true,
|
60
|
+
value: void 0
|
61
|
+
});
|
62
|
+
Object.defineProperty(this, "data", {
|
63
|
+
enumerable: true,
|
64
|
+
configurable: true,
|
65
|
+
writable: true,
|
66
|
+
value: void 0
|
67
|
+
});
|
68
|
+
Object.defineProperty(this, "_controlAnimation", {
|
69
|
+
enumerable: true,
|
70
|
+
configurable: true,
|
71
|
+
writable: true,
|
72
|
+
value: void 0
|
73
|
+
});
|
74
|
+
Object.defineProperty(this, "_transferTimer", {
|
75
|
+
enumerable: true,
|
76
|
+
configurable: true,
|
77
|
+
writable: true,
|
78
|
+
value: void 0
|
79
|
+
});
|
80
|
+
Object.defineProperty(this, "_currentPlayer", {
|
81
|
+
enumerable: true,
|
82
|
+
configurable: true,
|
83
|
+
writable: true,
|
84
|
+
value: void 0
|
85
|
+
});
|
86
|
+
Object.defineProperty(this, "_fullscreened", {
|
87
|
+
enumerable: true,
|
88
|
+
configurable: true,
|
89
|
+
writable: true,
|
90
|
+
value: false
|
91
|
+
});
|
92
|
+
Object.defineProperty(this, "_control", {
|
93
|
+
enumerable: true,
|
94
|
+
configurable: true,
|
95
|
+
writable: true,
|
96
|
+
value: void 0
|
97
|
+
});
|
98
|
+
Object.defineProperty(this, "playlistStorage", {
|
99
|
+
enumerable: true,
|
100
|
+
configurable: true,
|
101
|
+
writable: true,
|
102
|
+
value: new PlaylistStorage()
|
103
|
+
});
|
23
104
|
}
|
24
105
|
render() {
|
25
106
|
return html `
|
@@ -274,7 +355,12 @@ let BoardPlayer = class BoardPlayer extends LitElement {
|
|
274
355
|
await this.updateComplete;
|
275
356
|
}
|
276
357
|
};
|
277
|
-
BoardPlayer
|
358
|
+
Object.defineProperty(BoardPlayer, "styles", {
|
359
|
+
enumerable: true,
|
360
|
+
configurable: true,
|
361
|
+
writable: true,
|
362
|
+
value: style
|
363
|
+
});
|
278
364
|
__decorate([
|
279
365
|
property({ type: String })
|
280
366
|
], BoardPlayer.prototype, "playlist", void 0);
|