@operato/process 2.0.0-alpha.7 → 2.0.0-alpha.71
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 +436 -0
- package/demo/index-modeller.html +13 -2
- package/demo/index-viewer.html +13 -2
- package/demo/index.html +13 -2
- package/dist/src/modeller/component-toolbar/component-detail.d.ts +1 -1
- package/dist/src/modeller/component-toolbar/component-menu.d.ts +1 -1
- package/dist/src/modeller/component-toolbar/component-menu.js +9 -4
- package/dist/src/modeller/component-toolbar/component-menu.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-toolbar.d.ts +1 -1
- package/dist/src/modeller/edit-toolbar.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.d.ts +2 -2
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +19 -19
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/effects.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-shadow.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/inspector/inspector.js +1 -1
- package/dist/src/modeller/property-sidebar/inspector/inspector.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 +8 -8
- package/dist/src/modeller/property-sidebar/property-sidebar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/shapes/shapes.d.ts +2 -2
- package/dist/src/modeller/property-sidebar/shapes/shapes.js +15 -4
- package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specifics.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specifics.js +4 -1
- 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/ox-editor-process-selector.d.ts +2 -2
- package/dist/src/ox-editor-process-selector.js +3 -3
- package/dist/src/ox-editor-process-selector.js.map +1 -1
- package/dist/src/ox-process-list.js +16 -16
- package/dist/src/ox-process-list.js.map +1 -1
- package/dist/src/ox-process-modeller.d.ts +4 -3
- package/dist/src/ox-process-modeller.js +6 -3
- package/dist/src/ox-process-modeller.js.map +1 -1
- package/dist/src/ox-process-template-list.d.ts +1 -1
- package/dist/src/ox-process-viewer.d.ts +3 -3
- package/dist/src/ox-process-viewer.js +16 -15
- package/dist/src/ox-process-viewer.js.map +1 -1
- package/dist/src/selector/ox-process-creation-card.d.ts +2 -2
- package/dist/src/selector/ox-process-creation-card.js +4 -5
- package/dist/src/selector/ox-process-creation-card.js.map +1 -1
- package/dist/src/selector/ox-process-selector.d.ts +1 -1
- package/dist/src/selector/process-creation-popup.d.ts +2 -2
- package/dist/src/selector/process-creation-popup.js +4 -6
- package/dist/src/selector/process-creation-popup.js.map +1 -1
- package/dist/src/selector/process-thumbnail-card.d.ts +1 -1
- package/dist/src/selector/process-thumbnail-card.js +2 -2
- package/dist/src/selector/process-thumbnail-card.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -26
- package/src/modeller/component-toolbar/component-menu.ts +9 -5
- package/src/modeller/property-sidebar/data-binding/data-binding.ts +19 -19
- package/src/modeller/property-sidebar/inspector/inspector.ts +1 -1
- package/src/modeller/property-sidebar/property-sidebar.ts +8 -8
- package/src/modeller/property-sidebar/shapes/shapes.ts +15 -4
- package/src/modeller/property-sidebar/specifics/specifics.ts +5 -1
- package/src/ox-editor-process-selector.ts +3 -3
- package/src/ox-process-list.ts +16 -19
- package/src/ox-process-modeller.ts +7 -3
- package/src/ox-process-viewer.ts +16 -15
- package/src/selector/ox-process-creation-card.ts +4 -5
- package/src/selector/process-creation-popup.ts +4 -6
- package/src/selector/process-thumbnail-card.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-process-modeller.js","sourceRoot":"","sources":["../../src/ox-process-modeller.ts"],"names":[],"mappings":";AAAA,OAAO,mBAAmB,CAAA;AAC1B,OAAO,oCAAoC,CAAA;AAC3C,OAAO,kCAAkC,CAAA;AACzC,OAAO,qCAAqC,CAAA;AAC5C,OAAO,mCAAmC,CAAA;AAC1C,OAAO,wBAAwB,CAAA;AAC/B,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAS,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAA;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAA;AAG9E,MAAM,KAAK,GAAG,OAAO,EAAE,CAAA;AAEvB,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,iCAAiC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AACxF,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC,2CAA2C,EAA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M,EAAE,CAAC;sDAAyB;AACxB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAkB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAqB;AACrB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;mDAAqB;AACnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAmC;AAClC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAqB;AACnB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDAA8B;AAC9B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAqB;AACpB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAc;AACd;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;6DAA+B;AAC9B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gDAAkB;AACjB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;yDAA2B;AAEd;IAAtC,KAAK,CAAC,sBAAsB,CAAC;sDAAkC;AAzHrD,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CAmX7B","sourcesContent":["import '@material/mwc-fab'\nimport '@operato/board/ox-scene-handler.js'\nimport '@operato/board/ox-scene-layer.js'\nimport '@operato/board/ox-scene-property.js'\nimport '@operato/board/ox-scene-viewer.js'\nimport '@hatiolab/things-scene'\nimport './ox-process-viewer'\n\nimport { saveAs } from 'file-saver'\nimport { css, html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { 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'\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-process-modeller')\nexport class OxProcessModeller 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 process-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 process-component-toolbar {\n max-height: 100%;\n }\n\n process-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 mwc-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(--secondary-color, black);\n\n display: flex;\n justify-content: center;\n flex-direction: column;\n }\n\n ox-process-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 }) processName: 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('process-edit-toolbar') private editToolbar!: EditToolbar\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 'process-edit-toolbar': EditToolbar,\n 'process-property-sidebar': PropertySidebar,\n 'process-component-toolbar': ComponentToolbar\n }\n }\n\n render() {\n return html`\n <process-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 </process-edit-toolbar>\n\n <div content>\n <process-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 </process-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-viewer>\n\n <mwc-fab icon=\"save\" @click=${() => this.onTapSave()} title=\"save\"> </mwc-fab>\n </div>\n\n <process-property-sidebar\n .scene=${this.scene}\n .selected=${this.selected}\n .collapsed=${this.hideProperty}\n .fonts=${this.fonts}\n .propertyEditor=${this.propertyEditor}\n >\n </process-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>): void {\n if (changes.has('scene')) {\n if (this.scene) {\n this.scene.anchorStarterTemplate = {\n type: 'streamline',\n lineWidth: 2,\n strokeStyle: 'black',\n begin: 'oval',\n beginSize: 'size9',\n end: 'arrow',\n endSize: 'size9',\n round: 10\n }\n }\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 process = {\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-process-viewer .provider=${this.provider} .process=${process}></ox-process-viewer> `,\n parent: this.renderRoot as Element\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.processName || '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에 대한 정의를 process-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-process-modeller.js","sourceRoot":"","sources":["../../src/ox-process-modeller.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,oCAAoC,CAAA;AAC3C,OAAO,kCAAkC,CAAA;AACzC,OAAO,qCAAqC,CAAA;AAC5C,OAAO,mCAAmC,CAAA;AAC1C,OAAO,wBAAwB,CAAA;AAC/B,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAS,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAA;AACjF,OAAO,EAAE,WAAW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web/icon/icon.js'\nimport '@material/web/fab/fab.js'\n\nimport '@operato/board/ox-scene-handler.js'\nimport '@operato/board/ox-scene-layer.js'\nimport '@operato/board/ox-scene-property.js'\nimport '@operato/board/ox-scene-viewer.js'\nimport '@hatiolab/things-scene'\nimport './ox-process-viewer'\n\nimport { saveAs } from 'file-saver'\nimport { css, html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { 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'\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-process-modeller')\nexport class OxProcessModeller 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 process-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 process-component-toolbar {\n max-height: 100%;\n }\n\n process-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(--secondary-color, black);\n\n display: flex;\n justify-content: center;\n flex-direction: column;\n }\n\n ox-process-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 }) processName: 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('process-edit-toolbar') private editToolbar!: EditToolbar\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 'process-edit-toolbar': EditToolbar,\n 'process-property-sidebar': PropertySidebar,\n 'process-component-toolbar': ComponentToolbar\n }\n }\n\n render() {\n return html`\n <process-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 </process-edit-toolbar>\n\n <div content>\n <process-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 </process-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-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 <process-property-sidebar\n .scene=${this.scene}\n .selected=${this.selected}\n .collapsed=${this.hideProperty}\n .fonts=${this.fonts}\n .propertyEditor=${this.propertyEditor}\n >\n </process-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>): void {\n if (changes.has('scene')) {\n if (this.scene) {\n this.scene.anchorStarterTemplate = {\n type: 'streamline',\n lineWidth: 2,\n strokeStyle: 'black',\n begin: 'oval',\n beginSize: 'size9',\n end: 'arrow',\n endSize: 'size9',\n round: 10\n }\n }\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 process = {\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-process-viewer .provider=${this.provider} .process=${process}></ox-process-viewer> `,\n parent: this.renderRoot as Element\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.processName || '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에 대한 정의를 process-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"]}
|
|
@@ -6,7 +6,7 @@ export declare class OxProcessTemplateList extends LitElement {
|
|
|
6
6
|
static styles: import("lit").CSSResult[];
|
|
7
7
|
withoutSearch: boolean;
|
|
8
8
|
grist: DataGrist;
|
|
9
|
-
render(): import("lit").TemplateResult<1>;
|
|
9
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
10
10
|
fetchHandler({ page, limit, sortings, filters }: FetchOption): Promise<{
|
|
11
11
|
total: any;
|
|
12
12
|
records: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '@material/
|
|
2
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import '@material/web/fab/fab.js';
|
|
3
3
|
import { LitElement, PropertyValues } from 'lit';
|
|
4
4
|
import { Component, ReferenceProvider } from '@hatiolab/things-scene';
|
|
5
5
|
export declare class OxProcessViewer extends LitElement {
|
|
@@ -27,7 +27,7 @@ export declare class OxProcessViewer extends LitElement {
|
|
|
27
27
|
_prev: HTMLElement;
|
|
28
28
|
_next: HTMLElement;
|
|
29
29
|
_fullscreen: HTMLElement;
|
|
30
|
-
render(): import("lit").TemplateResult<1>;
|
|
30
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
31
31
|
connectedCallback(): void;
|
|
32
32
|
disconnectedCallback(): void;
|
|
33
33
|
updated(changes: PropertyValues<this>): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import '@material/
|
|
3
|
-
import '@material/
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
import '@material/web/fab/fab.js';
|
|
4
4
|
import { css, html, LitElement } from 'lit';
|
|
5
5
|
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
6
6
|
import { create, SCENE_MODE } from '@hatiolab/things-scene';
|
|
@@ -26,37 +26,38 @@ let OxProcessViewer = class OxProcessViewer extends LitElement {
|
|
|
26
26
|
render() {
|
|
27
27
|
var fullscreen = !isIOS() && !this.hideFullscreen
|
|
28
28
|
? html `
|
|
29
|
-
<
|
|
29
|
+
<md-fab
|
|
30
30
|
id="fullscreen"
|
|
31
|
-
.icon=${document.fullscreenElement ? 'fullscreen_exit' : 'fullscreen'}
|
|
32
31
|
@click=${(e) => this.onTapFullscreen()}
|
|
33
32
|
@mouseover=${(e) => this.transientShowButtons(true)}
|
|
34
33
|
@mouseout=${(e) => this.transientShowButtons()}
|
|
35
34
|
title="fullscreen"
|
|
36
|
-
|
|
35
|
+
>
|
|
36
|
+
<md-icon slot="icon">${document.fullscreenElement ? 'fullscreen_exit' : 'fullscreen'}</md-icon>
|
|
37
|
+
</md-fab>
|
|
37
38
|
`
|
|
38
39
|
: html ``;
|
|
39
40
|
var prev = !this.hideNavigation
|
|
40
41
|
? html `
|
|
41
|
-
<
|
|
42
|
+
<md-icon
|
|
42
43
|
id="prev"
|
|
43
44
|
@click=${(e) => this.onTapPrev()}
|
|
44
45
|
@mouseover=${(e) => this.transientShowButtons(true)}
|
|
45
46
|
@mouseout=${(e) => this.transientShowButtons()}
|
|
46
47
|
hidden
|
|
47
|
-
>keyboard_arrow_left</
|
|
48
|
+
>keyboard_arrow_left</md-icon
|
|
48
49
|
>
|
|
49
50
|
`
|
|
50
51
|
: html ``;
|
|
51
52
|
var next = !this.hideNavigation
|
|
52
53
|
? html `
|
|
53
|
-
<
|
|
54
|
+
<md-icon
|
|
54
55
|
id="next"
|
|
55
56
|
@click=${(e) => this.onTapNext()}
|
|
56
57
|
@mouseover=${(e) => this.transientShowButtons(true)}
|
|
57
58
|
@mouseout=${(e) => this.transientShowButtons()}
|
|
58
59
|
hidden
|
|
59
|
-
>keyboard_arrow_right</
|
|
60
|
+
>keyboard_arrow_right</md-icon
|
|
60
61
|
>
|
|
61
62
|
`
|
|
62
63
|
: html ``;
|
|
@@ -425,7 +426,7 @@ OxProcessViewer.styles = [
|
|
|
425
426
|
}
|
|
426
427
|
|
|
427
428
|
/* navigation buttons */
|
|
428
|
-
|
|
429
|
+
md-icon {
|
|
429
430
|
z-index: 10;
|
|
430
431
|
position: absolute;
|
|
431
432
|
top: 45%;
|
|
@@ -437,14 +438,14 @@ OxProcessViewer.styles = [
|
|
|
437
438
|
color: #fff;
|
|
438
439
|
user-select: none;
|
|
439
440
|
|
|
440
|
-
--
|
|
441
|
+
--md-icon-size: 3em;
|
|
441
442
|
}
|
|
442
443
|
|
|
443
|
-
|
|
444
|
+
md-icon[hidden] {
|
|
444
445
|
display: none;
|
|
445
446
|
}
|
|
446
447
|
|
|
447
|
-
|
|
448
|
+
md-icon:hover {
|
|
448
449
|
background-color: rgba(0, 0, 0, 0.2);
|
|
449
450
|
border-radius: 50%;
|
|
450
451
|
}
|
|
@@ -468,8 +469,8 @@ OxProcessViewer.styles = [
|
|
|
468
469
|
}
|
|
469
470
|
|
|
470
471
|
@media print {
|
|
471
|
-
|
|
472
|
-
|
|
472
|
+
md-fab,
|
|
473
|
+
md-icon {
|
|
473
474
|
display: none;
|
|
474
475
|
}
|
|
475
476
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-process-viewer.js","sourceRoot":"","sources":["../../src/ox-process-viewer.ts"],"names":[],"mappings":";AAAA,OAAO,mBAAmB,CAAA;AAC1B,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAa,MAAM,EAAqB,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACzF,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAA;AAC7E,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAG3D,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;;QA2EuB,YAAO,GAAW,EAAE,CAAA;QACpB,YAAO,GAAQ,EAAE,CAAA;QACjB,aAAQ,GAA6B,IAAI,CAAA;QAIK,mBAAc,GAAG,KAAK,CAAA;QACtB,mBAAc,GAAG,KAAK,CAAA;QAEvF,WAAM,GAAQ,IAAI,CAAA;QAClB,aAAQ,GAAiC,EAAE,CAAA;QAC3C,cAAS,GAAiC,EAAE,CAAA;QAK9C,qBAAgB,GAAY,MAAA,IAAI,CAAC,OAAO,0CAAE,EAAE,CAAA;IAkdrD,CAAC;IA3cC,MAAM;Q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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqEF;CACF,AAxEY,CAwEZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAqB;AACpB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAkB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAA0C;AACzC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAU;AACT;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAY;AAEmC;IAAzE,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;uDAAuB;AACtB;IAAzE,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;uDAAuB;AAEvF;IAAR,KAAK,EAAE;+CAAmB;AAClB;IAAR,KAAK,EAAE;iDAA4C;AAC3C;IAAR,KAAK,EAAE;kDAA6C;AAE5C;IAAR,KAAK,EAAE;mDAAyB;AACxB;IAAR,KAAK,EAAE;yDAAoC;AAI1B;IAAjB,KAAK,CAAC,SAAS,CAAC;gDAAsB;AACvB;IAAf,KAAK,CAAC,OAAO,CAAC;8CAAoB;AACnB;IAAf,KAAK,CAAC,OAAO,CAAC;8CAAoB;AACb;IAArB,KAAK,CAAC,aAAa,CAAC;oDAA0B;AAhGpC,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CA6iB3B","sourcesContent":["import '@material/mwc-fab'\nimport '@material/mwc-icon'\n\nimport { css, html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { Component, create, ReferenceProvider, SCENE_MODE } from '@hatiolab/things-scene'\nimport { isIOS, togglefullscreen } from '@operato/utils'\nimport { ScrollbarStyles } from '@operato/styles'\n\nimport { DataStorage } from './data-storage/data-storage.js'\nimport { DataSubscriptionProviderImpl } from './graphql/data-subscription.js'\nimport { runScenario, startScenario } from './graphql/scenario.js'\n\n@customElement('ox-process-viewer')\nexport class OxProcessViewer extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n position: relative;\n\n width: 100%; /* 전체화면보기를 위해서 필요함. */\n overflow: hidden;\n }\n\n #target {\n flex: 1;\n\n width: 100%; /* 전체화면보기를 위해서 필요함. */\n height: 100%;\n\n outline: 0;\n }\n\n /* navigation buttons */\n mwc-icon {\n z-index: 10;\n position: absolute;\n top: 45%;\n min-width: 50px;\n width: 50px;\n height: 50px;\n margin: 0;\n padding: 0;\n color: #fff;\n user-select: none;\n\n --mdc-icon-size: 3em;\n }\n\n mwc-icon[hidden] {\n display: none;\n }\n\n mwc-icon:hover {\n background-color: rgba(0, 0, 0, 0.2);\n border-radius: 50%;\n }\n\n #prev {\n left: 5px;\n }\n\n #next {\n right: 5px;\n }\n\n #fullscreen {\n position: absolute;\n bottom: 15px;\n right: 16px;\n }\n\n [hidden] {\n display: none;\n }\n\n @media print {\n mwc-fab,\n mwc-icon {\n display: none;\n }\n }\n `\n ]\n\n @property({ type: String }) baseUrl: string = ''\n @property({ type: Object }) process: any = {}\n @property({ type: Object }) provider: ReferenceProvider | null = null\n @property({ type: Object }) data: any\n @property({ type: Object }) values: any\n\n @property({ type: Boolean, reflect: true, attribute: 'hide-fullscreen' }) hideFullscreen = false\n @property({ type: Boolean, reflect: true, attribute: 'hide-navigation' }) hideNavigation = false\n\n @state() _scene: any = null\n @state() _forward: { id: string; scene: any }[] = []\n @state() _backward: { id: string; scene: any }[] = []\n\n @state() _oldtarget?: HTMLElement\n @state() _fade_animations?: Array<Animation>\n\n public currentProcessId?: string = this.process?.id\n\n @query('#target') _target!: HTMLElement\n @query('#prev') _prev!: HTMLElement\n @query('#next') _next!: HTMLElement\n @query('#fullscreen') _fullscreen!: HTMLElement\n\n render() {\n var fullscreen =\n !isIOS() && !this.hideFullscreen\n ? html`\n <mwc-fab\n id=\"fullscreen\"\n .icon=${document.fullscreenElement ? 'fullscreen_exit' : 'fullscreen'}\n @click=${(e: Event) => this.onTapFullscreen()}\n @mouseover=${(e: Event) => this.transientShowButtons(true)}\n @mouseout=${(e: Event) => this.transientShowButtons()}\n title=\"fullscreen\"\n ></mwc-fab>\n `\n : html``\n\n var prev = !this.hideNavigation\n ? html`\n <mwc-icon\n id=\"prev\"\n @click=${(e: Event) => this.onTapPrev()}\n @mouseover=${(e: Event) => this.transientShowButtons(true)}\n @mouseout=${(e: Event) => this.transientShowButtons()}\n hidden\n >keyboard_arrow_left</mwc-icon\n >\n `\n : html``\n\n var next = !this.hideNavigation\n ? html`\n <mwc-icon\n id=\"next\"\n @click=${(e: Event) => this.onTapNext()}\n @mouseover=${(e: Event) => this.transientShowButtons(true)}\n @mouseout=${(e: Event) => this.transientShowButtons()}\n hidden\n >keyboard_arrow_right</mwc-icon\n >\n `\n : html``\n\n return html`\n ${prev}\n\n <div\n id=\"target\"\n @touchstart=${(e: Event) => this.transientShowButtons()}\n @mousemove=${(e: Event) => this.transientShowButtons()}\n ></div>\n\n ${next} ${fullscreen}\n `\n }\n\n connectedCallback() {\n super.connectedCallback()\n\n window.addEventListener('resize', () => {\n this._scene && this._scene.fit()\n })\n\n this.renderRoot.addEventListener(\n 'close-scene',\n e => {\n e.preventDefault()\n this.onTapPrev()\n },\n false\n )\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n\n this.closeScene()\n }\n\n updated(changes: PropertyValues<this>) {\n if (changes.has('process')) {\n this.closeScene()\n\n if (this.process && this.process.id) {\n if (this.process.model) {\n this.initScene()\n } else {\n this.initSceneAsync()\n }\n }\n }\n\n if (changes.has('data') && this._scene && this.data) {\n this._scene.data = this.data\n }\n\n if (changes.has('values') && this._scene && this.values) {\n this._scene.values = this.values\n }\n }\n\n async initSceneAsync() {\n if (!this.process || !this.process.id) return\n\n this._scene = await this.provider!.get(this.process.id, true)\n this.setupScene({ id: this.process.id, scene: this._scene })\n }\n\n initScene() {\n if (!this.process || !this.process.id) return\n\n this._scene = create({\n model: {\n ...this.process.model\n },\n mode: SCENE_MODE.VIEW,\n refProvider: this.provider!,\n dataStorage: this.process.id !== 'preview' ? new DataStorage(this.process.id) : undefined,\n dataSubscriptionProvider: new DataSubscriptionProviderImpl()\n })\n\n if (this.baseUrl) {\n this._scene.baseUrl = this.baseUrl\n }\n\n this.provider!.add(this.process.id, this._scene)\n\n this.setupScene({ id: this.process.id, scene: this._scene })\n }\n\n closeScene() {\n if (this._scene) {\n this.unbindSceneEvents(this._scene)\n\n this._scene.target = null\n this._scene.release && this._scene.release()\n\n this._scene = null\n }\n\n // delete queued scenes\n this._forward.forEach(({ scene }) => scene.release && scene.release())\n this._forward = []\n\n this._backward.forEach(({ scene }) => scene.release && scene.release())\n this._backward = []\n }\n\n releaseScene() {\n this.closeScene()\n this.transientShowButtons()\n }\n\n setupScene({ id, scene }: { id: string; scene: any }) {\n this._scene = scene\n\n const backgroundColor = this._scene?.root.state.fillStyle\n if (typeof backgroundColor === 'string') {\n this.style.backgroundColor = backgroundColor\n } else {\n this.style.backgroundColor = 'initial'\n }\n\n /* scene의 기존 target을 보관한다. */\n this._oldtarget = this._scene.target\n\n this._scene.fit(this._scene.fitMode)\n this._scene.target = this._target\n\n if (this.data) {\n this._scene.data = this.data\n }\n if (this.values) {\n this._scene.values = this.values\n }\n\n this.currentProcessId = id\n\n this.bindSceneEvents()\n\n this.transientShowButtons()\n }\n\n async showScene(processId: string, bindingData?: any) {\n if (!processId) return\n\n try {\n var scene = await this.provider!.get(processId, true)\n\n if (scene === this._scene) {\n scene.release && scene.release()\n return\n }\n\n if (this._scene) {\n /* old scene을 _backward에 보관한다. */\n this.unbindSceneEvents(this._scene)\n /* 원래의 target에 되돌린다. */\n this._scene.target = this._oldtarget\n this._backward.push({ id: this.currentProcessId!, scene: this._scene })\n }\n\n this._scene = scene\n\n this._forward.forEach(({ scene }) => scene.release && scene.release())\n\n /* forward를 비운다. */\n this._forward = []\n\n this.setupScene({ id: processId, scene })\n\n if (bindingData) {\n scene.data = bindingData\n }\n } catch (e) {\n console.error(e)\n }\n }\n\n bindSceneEvents() {\n this._scene.on('run', this.onRunProcess, this)\n this._scene.on('goto', this.onLinkGoto, this)\n this._scene.on('link-open', this.onLinkOpen, this)\n this._scene.on('link-move', this.onLinkMove, this)\n this._scene.on('route-page', this.onRoutePage, this)\n this._scene.on('start-scenario', this.onStartScenario, this)\n this._scene.on('run-scenario', this.onRunScenario, this)\n }\n\n unbindSceneEvents(scene: any) {\n scene.off('run', this.onRunProcess, this)\n scene.off('goto', this.onLinkGoto, this)\n scene.off('link-open', this.onLinkOpen, this)\n scene.off('link-move', this.onLinkMove, this)\n scene.off('route-page', this.onRoutePage, this)\n scene.off('start-scenario', this.onStartScenario, this)\n scene.off('run-scenario', this.onRunScenario, this)\n }\n\n transientShowButtons(stop?: boolean) {\n var buttons = []\n !this.hideNavigation && buttons.push(this._next, this._prev)\n !this.hideFullscreen && buttons.push(this._fullscreen)\n\n if (buttons.length == 0) {\n return\n }\n\n if (!this._fade_animations) {\n this._fade_animations = buttons\n .filter(button => button)\n .map(button => {\n let animation = button.animate(\n [\n {\n opacity: 1,\n easing: 'ease-in'\n },\n { opacity: 0 }\n ],\n { delay: 1000, duration: 2000 }\n )\n\n animation.onfinish = () => {\n button.setAttribute('hidden', '')\n }\n\n return animation\n })\n }\n\n this._forward.length <= 0 ? this._next.setAttribute('hidden', '') : this._next.removeAttribute('hidden')\n this._backward.length <= 0 ? this._prev.setAttribute('hidden', '') : this._prev.removeAttribute('hidden')\n this._fullscreen && this._fullscreen.removeAttribute('hidden')\n\n this._fade_animations.forEach(animation => {\n animation.cancel()\n if (stop) return\n\n animation.play()\n })\n }\n\n /* event handlers */\n\n onTapNext() {\n var { id, scene } = this._forward.pop() || {}\n if (!scene) return\n\n if (this._scene) {\n this._scene.target = null\n /* 원래의 target에 되돌린다. */\n this._scene.target = this._oldtarget\n this.unbindSceneEvents(this._scene)\n this._backward.push({ id: id!, scene: this._scene })\n }\n\n this.setupScene({ id: id!, scene })\n }\n\n onTapPrev() {\n var { id, scene } = this._backward.pop() || {}\n if (!scene) return\n\n if (this._scene) {\n this._scene.target = null\n /* 원래의 target에 되돌린다. */\n this._scene.target = this._oldtarget\n this.unbindSceneEvents(this._scene)\n this._forward.push({ id: id!, scene: this._scene })\n }\n\n this.setupScene({ id: id!, scene })\n }\n\n onTapFullscreen() {\n togglefullscreen(\n this,\n () => this.requestUpdate(),\n () => this.requestUpdate()\n )\n }\n\n onRunProcess() {\n this.dispatchEvent(new CustomEvent('run-process', { bubbles: true, composed: true, detail: this.process.id }))\n }\n\n onLinkGoto(targetProcessId: string, options: any, fromComponent: any) {\n const { input, output } = options || { input: '(self)' }\n const data = input && fromComponent.root.findFirst(input, fromComponent)?.data\n this.showScene(targetProcessId, data)\n }\n\n onLinkOpen(url: string, value: any, fromComponent: Component) {\n if (!url) return\n\n try {\n window.open(url)\n } catch (ex) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'error',\n message: ex,\n ex\n }\n })\n )\n }\n }\n\n onLinkMove(url: string, value: any, fromComponent: Component) {\n if (!url) return\n\n location.href = url\n }\n\n onRoutePage(page: string) {\n if (!page) {\n return\n }\n\n history.pushState({}, '', page)\n window.dispatchEvent(new Event('popstate'))\n }\n\n async onStartScenario(scenario: string, value: string | number | object, component: Component) {\n try {\n await startScenario(scenario, scenario, value)\n } catch (e) {\n console.error(e)\n }\n }\n\n async onRunScenario(scenario: string, value: string | number | object, component: Component) {\n try {\n component.data = await runScenario(scenario, value)\n } catch (e) {\n console.error(e)\n }\n }\n\n getSceneData() {\n return this._scene?.data\n }\n\n getSceneValues() {\n return this._scene?.values\n }\n\n async getSceneImageData(base64 = false) {\n if (!this._scene) {\n return\n }\n\n var { width, height } = this._scene.model\n var pixelRatio = window.devicePixelRatio\n\n // 1. Scene의 바운드에 근거하여, 오프스크린 캔바스를 만든다.\n var canvas = document.createElement('canvas')\n canvas.width = Number(width)\n canvas.height = Number(height)\n\n var root = this._scene.root\n // 2. 모델레이어의 원래 위치와 스케일을 저장한다.\n var translate = root.get('translate')\n var scale = root.get('scale')\n\n // 3. 위치와 스케일 기본 설정.\n root.set('translate', { x: 0, y: 0 })\n root.set('scale', { x: 1 / pixelRatio, y: 1 / pixelRatio })\n\n // 4. 오프스크린 캔바스의 Context2D를 구한뒤, 모델레이어를 그 위에 그린다.\n var context = canvas.getContext('2d')\n\n root.draw(context)\n\n root.set('translate', translate)\n root.set('scale', scale)\n\n var data = base64 ? canvas.toDataURL() : context!.getImageData(0, 0, width, height).data\n\n return {\n width,\n height,\n data\n }\n }\n\n async printTrick(image: string) {\n var viewTarget: HTMLElement | null = null\n var printTarget: HTMLImageElement | null = null\n\n if (!image) {\n image = (await this.getSceneImageData(true))?.data as string\n }\n\n printTarget = document.createElement('img')\n printTarget.id = 'target'\n printTarget.src = image\n printTarget.style.width = '100%'\n printTarget.style.height = '100%'\n\n const x = (mql: MediaQueryListEvent) => {\n if (mql.matches) {\n if (!viewTarget) {\n viewTarget = (this.renderRoot as ShadowRoot)!.getElementById('target')\n this.renderRoot.replaceChild(printTarget!, viewTarget!)\n }\n } else {\n this.renderRoot.replaceChild(viewTarget!, printTarget!)\n printTarget!.remove()\n mediaQueryList.removeEventListener('change', x)\n }\n }\n\n if (window.matchMedia) {\n var mediaQueryList = window.matchMedia('print')\n mediaQueryList.addEventListener('change', x)\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ox-process-viewer.js","sourceRoot":"","sources":["../../src/ox-process-viewer.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,U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AAU;AACT;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAY;AAEmC;IAAzE,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;uDAAuB;AACtB;IAAzE,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;uDAAuB;AAEvF;IAAR,KAAK,EAAE;+CAAmB;AAClB;IAAR,KAAK,EAAE;iDAA4C;AAC3C;IAAR,KAAK,EAAE;kDAA6C;AAE5C;IAAR,KAAK,EAAE;mDAAyB;AACxB;IAAR,KAAK,EAAE;yDAAoC;AAI1B;IAAjB,KAAK,CAAC,SAAS,CAAC;gDAAsB;AACvB;IAAf,KAAK,CAAC,OAAO,CAAC;8CAAoB;AACnB;IAAf,KAAK,CAAC,OAAO,CAAC;8CAAoB;AACb;IAArB,KAAK,CAAC,aAAa,CAAC;oDAA0B;AAhGpC,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CA8iB3B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/fab/fab.js'\n\nimport { css, html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { Component, create, ReferenceProvider, SCENE_MODE } from '@hatiolab/things-scene'\nimport { isIOS, togglefullscreen } from '@operato/utils'\nimport { ScrollbarStyles } from '@operato/styles'\n\nimport { DataStorage } from './data-storage/data-storage.js'\nimport { DataSubscriptionProviderImpl } from './graphql/data-subscription.js'\nimport { runScenario, startScenario } from './graphql/scenario.js'\n\n@customElement('ox-process-viewer')\nexport class OxProcessViewer extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n position: relative;\n\n width: 100%; /* 전체화면보기를 위해서 필요함. */\n overflow: hidden;\n }\n\n #target {\n flex: 1;\n\n width: 100%; /* 전체화면보기를 위해서 필요함. */\n height: 100%;\n\n outline: 0;\n }\n\n /* navigation buttons */\n md-icon {\n z-index: 10;\n position: absolute;\n top: 45%;\n min-width: 50px;\n width: 50px;\n height: 50px;\n margin: 0;\n padding: 0;\n color: #fff;\n user-select: none;\n\n --md-icon-size: 3em;\n }\n\n md-icon[hidden] {\n display: none;\n }\n\n md-icon:hover {\n background-color: rgba(0, 0, 0, 0.2);\n border-radius: 50%;\n }\n\n #prev {\n left: 5px;\n }\n\n #next {\n right: 5px;\n }\n\n #fullscreen {\n position: absolute;\n bottom: 15px;\n right: 16px;\n }\n\n [hidden] {\n display: none;\n }\n\n @media print {\n md-fab,\n md-icon {\n display: none;\n }\n }\n `\n ]\n\n @property({ type: String }) baseUrl: string = ''\n @property({ type: Object }) process: any = {}\n @property({ type: Object }) provider: ReferenceProvider | null = null\n @property({ type: Object }) data: any\n @property({ type: Object }) values: any\n\n @property({ type: Boolean, reflect: true, attribute: 'hide-fullscreen' }) hideFullscreen = false\n @property({ type: Boolean, reflect: true, attribute: 'hide-navigation' }) hideNavigation = false\n\n @state() _scene: any = null\n @state() _forward: { id: string; scene: any }[] = []\n @state() _backward: { id: string; scene: any }[] = []\n\n @state() _oldtarget?: HTMLElement\n @state() _fade_animations?: Array<Animation>\n\n public currentProcessId?: string = this.process?.id\n\n @query('#target') _target!: HTMLElement\n @query('#prev') _prev!: HTMLElement\n @query('#next') _next!: HTMLElement\n @query('#fullscreen') _fullscreen!: HTMLElement\n\n render() {\n var fullscreen =\n !isIOS() && !this.hideFullscreen\n ? html`\n <md-fab\n id=\"fullscreen\"\n @click=${(e: Event) => this.onTapFullscreen()}\n @mouseover=${(e: Event) => this.transientShowButtons(true)}\n @mouseout=${(e: Event) => this.transientShowButtons()}\n title=\"fullscreen\"\n >\n <md-icon slot=\"icon\">${document.fullscreenElement ? 'fullscreen_exit' : 'fullscreen'}</md-icon>\n </md-fab>\n `\n : html``\n\n var prev = !this.hideNavigation\n ? html`\n <md-icon\n id=\"prev\"\n @click=${(e: Event) => this.onTapPrev()}\n @mouseover=${(e: Event) => this.transientShowButtons(true)}\n @mouseout=${(e: Event) => this.transientShowButtons()}\n hidden\n >keyboard_arrow_left</md-icon\n >\n `\n : html``\n\n var next = !this.hideNavigation\n ? html`\n <md-icon\n id=\"next\"\n @click=${(e: Event) => this.onTapNext()}\n @mouseover=${(e: Event) => this.transientShowButtons(true)}\n @mouseout=${(e: Event) => this.transientShowButtons()}\n hidden\n >keyboard_arrow_right</md-icon\n >\n `\n : html``\n\n return html`\n ${prev}\n\n <div\n id=\"target\"\n @touchstart=${(e: Event) => this.transientShowButtons()}\n @mousemove=${(e: Event) => this.transientShowButtons()}\n ></div>\n\n ${next} ${fullscreen}\n `\n }\n\n connectedCallback() {\n super.connectedCallback()\n\n window.addEventListener('resize', () => {\n this._scene && this._scene.fit()\n })\n\n this.renderRoot.addEventListener(\n 'close-scene',\n e => {\n e.preventDefault()\n this.onTapPrev()\n },\n false\n )\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n\n this.closeScene()\n }\n\n updated(changes: PropertyValues<this>) {\n if (changes.has('process')) {\n this.closeScene()\n\n if (this.process && this.process.id) {\n if (this.process.model) {\n this.initScene()\n } else {\n this.initSceneAsync()\n }\n }\n }\n\n if (changes.has('data') && this._scene && this.data) {\n this._scene.data = this.data\n }\n\n if (changes.has('values') && this._scene && this.values) {\n this._scene.values = this.values\n }\n }\n\n async initSceneAsync() {\n if (!this.process || !this.process.id) return\n\n this._scene = await this.provider!.get(this.process.id, true)\n this.setupScene({ id: this.process.id, scene: this._scene })\n }\n\n initScene() {\n if (!this.process || !this.process.id) return\n\n this._scene = create({\n model: {\n ...this.process.model\n },\n mode: SCENE_MODE.VIEW,\n refProvider: this.provider!,\n dataStorage: this.process.id !== 'preview' ? new DataStorage(this.process.id) : undefined,\n dataSubscriptionProvider: new DataSubscriptionProviderImpl()\n })\n\n if (this.baseUrl) {\n this._scene.baseUrl = this.baseUrl\n }\n\n this.provider!.add(this.process.id, this._scene)\n\n this.setupScene({ id: this.process.id, scene: this._scene })\n }\n\n closeScene() {\n if (this._scene) {\n this.unbindSceneEvents(this._scene)\n\n this._scene.target = null\n this._scene.release && this._scene.release()\n\n this._scene = null\n }\n\n // delete queued scenes\n this._forward.forEach(({ scene }) => scene.release && scene.release())\n this._forward = []\n\n this._backward.forEach(({ scene }) => scene.release && scene.release())\n this._backward = []\n }\n\n releaseScene() {\n this.closeScene()\n this.transientShowButtons()\n }\n\n setupScene({ id, scene }: { id: string; scene: any }) {\n this._scene = scene\n\n const backgroundColor = this._scene?.root.state.fillStyle\n if (typeof backgroundColor === 'string') {\n this.style.backgroundColor = backgroundColor\n } else {\n this.style.backgroundColor = 'initial'\n }\n\n /* scene의 기존 target을 보관한다. */\n this._oldtarget = this._scene.target\n\n this._scene.fit(this._scene.fitMode)\n this._scene.target = this._target\n\n if (this.data) {\n this._scene.data = this.data\n }\n if (this.values) {\n this._scene.values = this.values\n }\n\n this.currentProcessId = id\n\n this.bindSceneEvents()\n\n this.transientShowButtons()\n }\n\n async showScene(processId: string, bindingData?: any) {\n if (!processId) return\n\n try {\n var scene = await this.provider!.get(processId, true)\n\n if (scene === this._scene) {\n scene.release && scene.release()\n return\n }\n\n if (this._scene) {\n /* old scene을 _backward에 보관한다. */\n this.unbindSceneEvents(this._scene)\n /* 원래의 target에 되돌린다. */\n this._scene.target = this._oldtarget\n this._backward.push({ id: this.currentProcessId!, scene: this._scene })\n }\n\n this._scene = scene\n\n this._forward.forEach(({ scene }) => scene.release && scene.release())\n\n /* forward를 비운다. */\n this._forward = []\n\n this.setupScene({ id: processId, scene })\n\n if (bindingData) {\n scene.data = bindingData\n }\n } catch (e) {\n console.error(e)\n }\n }\n\n bindSceneEvents() {\n this._scene.on('run', this.onRunProcess, this)\n this._scene.on('goto', this.onLinkGoto, this)\n this._scene.on('link-open', this.onLinkOpen, this)\n this._scene.on('link-move', this.onLinkMove, this)\n this._scene.on('route-page', this.onRoutePage, this)\n this._scene.on('start-scenario', this.onStartScenario, this)\n this._scene.on('run-scenario', this.onRunScenario, this)\n }\n\n unbindSceneEvents(scene: any) {\n scene.off('run', this.onRunProcess, this)\n scene.off('goto', this.onLinkGoto, this)\n scene.off('link-open', this.onLinkOpen, this)\n scene.off('link-move', this.onLinkMove, this)\n scene.off('route-page', this.onRoutePage, this)\n scene.off('start-scenario', this.onStartScenario, this)\n scene.off('run-scenario', this.onRunScenario, this)\n }\n\n transientShowButtons(stop?: boolean) {\n var buttons = []\n !this.hideNavigation && buttons.push(this._next, this._prev)\n !this.hideFullscreen && buttons.push(this._fullscreen)\n\n if (buttons.length == 0) {\n return\n }\n\n if (!this._fade_animations) {\n this._fade_animations = buttons\n .filter(button => button)\n .map(button => {\n let animation = button.animate(\n [\n {\n opacity: 1,\n easing: 'ease-in'\n },\n { opacity: 0 }\n ],\n { delay: 1000, duration: 2000 }\n )\n\n animation.onfinish = () => {\n button.setAttribute('hidden', '')\n }\n\n return animation\n })\n }\n\n this._forward.length <= 0 ? this._next.setAttribute('hidden', '') : this._next.removeAttribute('hidden')\n this._backward.length <= 0 ? this._prev.setAttribute('hidden', '') : this._prev.removeAttribute('hidden')\n this._fullscreen && this._fullscreen.removeAttribute('hidden')\n\n this._fade_animations.forEach(animation => {\n animation.cancel()\n if (stop) return\n\n animation.play()\n })\n }\n\n /* event handlers */\n\n onTapNext() {\n var { id, scene } = this._forward.pop() || {}\n if (!scene) return\n\n if (this._scene) {\n this._scene.target = null\n /* 원래의 target에 되돌린다. */\n this._scene.target = this._oldtarget\n this.unbindSceneEvents(this._scene)\n this._backward.push({ id: id!, scene: this._scene })\n }\n\n this.setupScene({ id: id!, scene })\n }\n\n onTapPrev() {\n var { id, scene } = this._backward.pop() || {}\n if (!scene) return\n\n if (this._scene) {\n this._scene.target = null\n /* 원래의 target에 되돌린다. */\n this._scene.target = this._oldtarget\n this.unbindSceneEvents(this._scene)\n this._forward.push({ id: id!, scene: this._scene })\n }\n\n this.setupScene({ id: id!, scene })\n }\n\n onTapFullscreen() {\n togglefullscreen(\n this,\n () => this.requestUpdate(),\n () => this.requestUpdate()\n )\n }\n\n onRunProcess() {\n this.dispatchEvent(new CustomEvent('run-process', { bubbles: true, composed: true, detail: this.process.id }))\n }\n\n onLinkGoto(targetProcessId: string, options: any, fromComponent: any) {\n const { input, output } = options || { input: '(self)' }\n const data = input && fromComponent.root.findFirst(input, fromComponent)?.data\n this.showScene(targetProcessId, data)\n }\n\n onLinkOpen(url: string, value: any, fromComponent: Component) {\n if (!url) return\n\n try {\n window.open(url)\n } catch (ex) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'error',\n message: ex,\n ex\n }\n })\n )\n }\n }\n\n onLinkMove(url: string, value: any, fromComponent: Component) {\n if (!url) return\n\n location.href = url\n }\n\n onRoutePage(page: string) {\n if (!page) {\n return\n }\n\n history.pushState({}, '', page)\n window.dispatchEvent(new Event('popstate'))\n }\n\n async onStartScenario(scenario: string, value: string | number | object, component: Component) {\n try {\n await startScenario(scenario, scenario, value)\n } catch (e) {\n console.error(e)\n }\n }\n\n async onRunScenario(scenario: string, value: string | number | object, component: Component) {\n try {\n component.data = await runScenario(scenario, value)\n } catch (e) {\n console.error(e)\n }\n }\n\n getSceneData() {\n return this._scene?.data\n }\n\n getSceneValues() {\n return this._scene?.values\n }\n\n async getSceneImageData(base64 = false) {\n if (!this._scene) {\n return\n }\n\n var { width, height } = this._scene.model\n var pixelRatio = window.devicePixelRatio\n\n // 1. Scene의 바운드에 근거하여, 오프스크린 캔바스를 만든다.\n var canvas = document.createElement('canvas')\n canvas.width = Number(width)\n canvas.height = Number(height)\n\n var root = this._scene.root\n // 2. 모델레이어의 원래 위치와 스케일을 저장한다.\n var translate = root.get('translate')\n var scale = root.get('scale')\n\n // 3. 위치와 스케일 기본 설정.\n root.set('translate', { x: 0, y: 0 })\n root.set('scale', { x: 1 / pixelRatio, y: 1 / pixelRatio })\n\n // 4. 오프스크린 캔바스의 Context2D를 구한뒤, 모델레이어를 그 위에 그린다.\n var context = canvas.getContext('2d')\n\n root.draw(context)\n\n root.set('translate', translate)\n root.set('scale', scale)\n\n var data = base64 ? canvas.toDataURL() : context!.getImageData(0, 0, width, height).data\n\n return {\n width,\n height,\n data\n }\n }\n\n async printTrick(image: string) {\n var viewTarget: HTMLElement | null = null\n var printTarget: HTMLImageElement | null = null\n\n if (!image) {\n image = (await this.getSceneImageData(true))?.data as string\n }\n\n printTarget = document.createElement('img')\n printTarget.id = 'target'\n printTarget.src = image\n printTarget.style.width = '100%'\n printTarget.style.height = '100%'\n\n const x = (mql: MediaQueryListEvent) => {\n if (mql.matches) {\n if (!viewTarget) {\n viewTarget = (this.renderRoot as ShadowRoot)!.getElementById('target')\n this.renderRoot.replaceChild(printTarget!, viewTarget!)\n }\n } else {\n this.renderRoot.replaceChild(viewTarget!, printTarget!)\n printTarget!.remove()\n mediaQueryList.removeEventListener('change', x)\n }\n }\n\n if (window.matchMedia) {\n var mediaQueryList = window.matchMedia('print')\n mediaQueryList.addEventListener('change', x)\n }\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
2
|
import './process-creation-popup';
|
|
3
3
|
import { LitElement } from 'lit';
|
|
4
4
|
declare const ProcessCreationCard_base: (new (...args: any[]) => LitElement) & typeof LitElement;
|
|
@@ -7,7 +7,7 @@ export declare class ProcessCreationCard extends ProcessCreationCard_base {
|
|
|
7
7
|
defaultGroup?: string;
|
|
8
8
|
groups: any;
|
|
9
9
|
private popup;
|
|
10
|
-
render(): import("lit").TemplateResult<1>;
|
|
10
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
11
11
|
onClick(): void;
|
|
12
12
|
reset(): void;
|
|
13
13
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import '@material/
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
3
|
import './process-creation-popup';
|
|
4
4
|
import { css, html, LitElement } from 'lit';
|
|
5
5
|
import { customElement, property } from 'lit/decorators.js';
|
|
@@ -27,7 +27,8 @@ let ProcessCreationCard = class ProcessCreationCard extends localize(i18next)(Li
|
|
|
27
27
|
text-transform: capitalize;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
md-icon {
|
|
31
|
+
--md-icon-size: 42px;
|
|
31
32
|
display: block;
|
|
32
33
|
font-size: 3.5em;
|
|
33
34
|
color: var(--card-list-create-icon-color);
|
|
@@ -36,9 +37,7 @@ let ProcessCreationCard = class ProcessCreationCard extends localize(i18next)(Li
|
|
|
36
37
|
];
|
|
37
38
|
}
|
|
38
39
|
render() {
|
|
39
|
-
return html `<div @click=${(e) => this.onClick()}>
|
|
40
|
-
<mwc-icon>add_circle_outline</mwc-icon>create process
|
|
41
|
-
</div> `;
|
|
40
|
+
return html `<div @click=${(e) => this.onClick()}><md-icon>add_circle_outline</md-icon>create process</div> `;
|
|
42
41
|
}
|
|
43
42
|
onClick() {
|
|
44
43
|
if (this.popup) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-process-creation-card.js","sourceRoot":"","sources":["../../../src/selector/ox-process-creation-card.ts"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ox-process-creation-card.js","sourceRoot":"","sources":["../../../src/selector/ox-process-creation-card.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;A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AsB;AACtB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;mDAAY;AAlC3B,mBAAmB;IAD/B,aAAa,CAAC,0BAA0B,CAAC;GAC7B,mBAAmB,CAoF/B","sourcesContent":["import '@material/web/icon/icon.js'\nimport './process-creation-popup'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { openPopup } from '@operato/layout'\n\n@customElement('ox-process-creation-card')\nexport class ProcessCreationCard extends localize(i18next)(LitElement) {\n static get styles() {\n return [\n css`\n :host {\n display: flex;\n border: var(--card-list-create-border);\n border-radius: var(--card-list-create-border-radius);\n\n background-color: #fff;\n\n align-content: center;\n justify-content: center;\n }\n\n div {\n text-align: center;\n font-size: 0.8em;\n color: var(--card-list-create-color);\n text-transform: capitalize;\n }\n\n md-icon {\n --md-icon-size: 42px;\n display: block;\n font-size: 3.5em;\n color: var(--card-list-create-icon-color);\n }\n `\n ]\n }\n\n /* default group id */\n @property({ type: String }) defaultGroup?: string\n @property({ type: Array }) groups: any\n\n private popup: any\n\n render() {\n return html`<div @click=${(e: Event) => this.onClick()}><md-icon>add_circle_outline</md-icon>create process</div> `\n }\n\n onClick() {\n if (this.popup) {\n delete this.popup\n }\n\n /*\n * 기존 설정된 이미지가 선택된 상태가 되게 하기 위해서는 selector에 value를 전달해줄 필요가 있음.\n * 주의. value는 object일 수도 있고, string일 수도 있다.\n * string인 경우에는 해당 보드의 id로 해석한다.\n */\n var template = html`\n <process-creation-popup\n .defaultGroup=${this.defaultGroup}\n .groups=${this.groups}\n @create-process=${async (e: CustomEvent) => {\n var { name, description, groupId, model, thumbnail } = e.detail\n\n this.dispatchEvent(\n new CustomEvent('create-process', {\n detail: {\n name,\n description,\n groupId,\n model,\n thumbnail\n }\n })\n )\n\n this.popup && this.popup.close()\n }}\n ></process-creation-popup>\n `\n\n this.popup = openPopup(template, {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.create-process')\n })\n }\n\n reset() {}\n}\n"]}
|
|
@@ -24,7 +24,7 @@ export declare class ProcessSelector extends ProcessSelector_base {
|
|
|
24
24
|
private _page;
|
|
25
25
|
private _total;
|
|
26
26
|
constructor();
|
|
27
|
-
render(): import("lit").TemplateResult<1>;
|
|
27
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
28
28
|
get scrollTargetEl(): HTMLElement | null;
|
|
29
29
|
scrollAction(): Promise<void>;
|
|
30
30
|
firstUpdated(): void;
|
|
@@ -2,7 +2,7 @@ import '@material/mwc-textfield';
|
|
|
2
2
|
import '@material/mwc-textarea';
|
|
3
3
|
import '@material/mwc-select';
|
|
4
4
|
import '@material/mwc-list/mwc-list-item';
|
|
5
|
-
import '@material/
|
|
5
|
+
import '@material/web/button/elevated-button.js';
|
|
6
6
|
import '../ox-process-template-list';
|
|
7
7
|
import { LitElement } from 'lit';
|
|
8
8
|
import { OxProcessTemplateList } from '../ox-process-template-list';
|
|
@@ -15,7 +15,7 @@ export declare class ProcessCreationPopup extends ProcessCreationPopup_base {
|
|
|
15
15
|
name: string;
|
|
16
16
|
}[];
|
|
17
17
|
processTemplateList: OxProcessTemplateList;
|
|
18
|
-
render(): import("lit").TemplateResult<1>;
|
|
18
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
19
19
|
firstUpdated(): void;
|
|
20
20
|
onClickSubmit(): Promise<void>;
|
|
21
21
|
}
|
|
@@ -3,7 +3,7 @@ import '@material/mwc-textfield';
|
|
|
3
3
|
import '@material/mwc-textarea';
|
|
4
4
|
import '@material/mwc-select';
|
|
5
5
|
import '@material/mwc-list/mwc-list-item';
|
|
6
|
-
import '@material/
|
|
6
|
+
import '@material/web/button/elevated-button.js';
|
|
7
7
|
import '../ox-process-template-list';
|
|
8
8
|
import { css, html, LitElement } from 'lit';
|
|
9
9
|
import { customElement, property, query } from 'lit/decorators.js';
|
|
@@ -89,11 +89,9 @@ let ProcessCreationPopup = class ProcessCreationPopup extends localize(i18next)(
|
|
|
89
89
|
</div>
|
|
90
90
|
</div>
|
|
91
91
|
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
@click=${(e) => this.onClickSubmit()}
|
|
96
|
-
></mwc-button>
|
|
92
|
+
<md-elevated-button @click=${(e) => this.onClickSubmit()}
|
|
93
|
+
>${String(i18next.t('button.create'))}</md-elevated-button
|
|
94
|
+
>
|
|
97
95
|
`;
|
|
98
96
|
}
|
|
99
97
|
firstUpdated() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-creation-popup.js","sourceRoot":"","sources":["../../../src/selector/process-creation-popup.ts"],"names":[],"mappings":";AAAA,OAAO,yBAAyB,CAAA;AAChC,OAAO,wBAAwB,CAAA;AAC/B,OAAO,sBAAsB,CAAA;AAC7B,OAAO,kCAAkC,CAAA;AACzC,OAAO,
|
|
1
|
+
{"version":3,"file":"process-creation-popup.js","sourceRoot":"","sources":["../../../src/selector/process-creation-popup.ts"],"names":[],"mappings":";AAAA,OAAO,yBAAyB,CAAA;AAChC,OAAO,wBAAwB,CAAA;AAC/B,OAAO,sBAAsB,CAAA;AAC7B,OAAO,kCAAkC,CAAA;AACzC,OAAO,yCAAyC,CAAA;AAChD,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAI1C,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IACrE,MAAM,KAAK,MAAM;QACf,OAAO;YACL,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6CF;SACF,CAAA;IACH,CAAC;IAOD,MA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,CAAC,mBAAmB,CAAC,WAAW,EAAE,CAAA;QAE7D,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,gBAAgB,EAAE;YAChC,MAAM,EAAE;gBACN,IAAI;gBACJ,WAAW;gBACX,OAAO;gBACP,KAAK,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK;gBACtB,SAAS,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,SAAS;aAC/B;SACF,CAAC,CACH,CAAA;IACH,CAAC;CACF,CAAA;AAzE6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0DAAsB;AACtB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;oDAAwC;AAE/B;IAAlC,KAAK,CAAC,0BAA0B,CAAC;iEAA4C;AAvDnE,oBAAoB;IADhC,aAAa,CAAC,wBAAwB,CAAC;GAC3B,oBAAoB,CA6HhC","sourcesContent":["import '@material/mwc-textfield'\nimport '@material/mwc-textarea'\nimport '@material/mwc-select'\nimport '@material/mwc-list/mwc-list-item'\nimport '@material/web/button/elevated-button.js'\nimport '../ox-process-template-list'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { OxProcessTemplateList } from '../ox-process-template-list'\n\n@customElement('process-creation-popup')\nexport class ProcessCreationPopup extends localize(i18next)(LitElement) {\n static get styles() {\n return [\n css`\n :host {\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 10px;\n\n background-color: white;\n }\n\n [body] {\n flex: 1;\n\n display: flex;\n flex-direction: row;\n gap: 10px;\n\n overflow: hidden;\n }\n\n [content] {\n flex: 1;\n\n display: flex;\n flex-direction: column;\n gap: 10px;\n\n overflow: auto;\n }\n\n [content] > mwc-textarea {\n flex: 1;\n }\n\n [templates] {\n flex: 2;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n\n [templates] > ox-process-template-list {\n flex: 1;\n overflow: hidden;\n }\n `\n ]\n }\n\n @property({ type: String }) defaultGroup?: string\n @property({ type: Array }) groups?: { id: string; name: string }[]\n\n @query('ox-process-template-list') processTemplateList!: OxProcessTemplateList\n\n render() {\n var groups = this.groups || []\n\n return html`\n <div body>\n <div content>\n <mwc-textfield label=${String(i18next.t('label.name'))} name=\"name\" required field-name></mwc-textfield>\n <mwc-textarea\n label=${String(i18next.t('label.description'))}\n name=\"description\"\n field-description\n ></mwc-textarea>\n <mwc-select\n label=${String(i18next.t('label.group'))}\n field-group\n helper=\"If there is no group to choose, you can leave it empty.\"\n >\n ${groups.map(\n group => html`\n <mwc-list-item value=${group.id} ?selected=${this.defaultGroup == group.id}\n >${group.name}</mwc-list-item\n >\n `\n )}\n </mwc-select>\n </div>\n\n <div templates>\n <div>${i18next.t('label.process-template')}</div>\n <ox-process-template-list></ox-process-template-list>\n </div>\n </div>\n\n <md-elevated-button @click=${(e: MouseEvent) => this.onClickSubmit()}\n >${String(i18next.t('button.create'))}</md-elevated-button\n >\n `\n }\n\n firstUpdated() {\n setTimeout(() => {\n ;(this.renderRoot.querySelector('mwc-textfield') as any)?.focus()\n }, 100)\n }\n\n async onClickSubmit() {\n var [name, description, groupId] = ['name', 'description', 'group'].map(attr => {\n return (this.renderRoot.querySelector(`[field-${attr}]`) as any)?.value\n })\n\n if (!name) {\n return\n }\n\n const template = await this.processTemplateList.getSelected()\n\n this.dispatchEvent(\n new CustomEvent('create-process', {\n detail: {\n name,\n description,\n groupId,\n model: template?.model,\n thumbnail: template?.thumbnail\n }\n })\n )\n }\n}\n"]}
|
|
@@ -7,7 +7,7 @@ export declare class ProcessThumbnailCard extends ProcessThumbnailCard_base {
|
|
|
7
7
|
id: string;
|
|
8
8
|
name: string;
|
|
9
9
|
}[];
|
|
10
|
-
render(): import("lit").TemplateResult<1>;
|
|
10
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
11
11
|
onClickFlip(e: Event): void;
|
|
12
12
|
onClickSubmit(e: Event): void;
|
|
13
13
|
reset(): void;
|
|
@@ -49,7 +49,7 @@ let ProcessThumbnailCard = class ProcessThumbnailCard extends localize(i18next)(
|
|
|
49
49
|
text-transform: capitalize;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
[front]
|
|
52
|
+
[front] md-icon {
|
|
53
53
|
margin-top: 15%;
|
|
54
54
|
display: block;
|
|
55
55
|
font-size: 3.5em;
|
|
@@ -103,7 +103,7 @@ let ProcessThumbnailCard = class ProcessThumbnailCard extends localize(i18next)(
|
|
|
103
103
|
render() {
|
|
104
104
|
var groups = this.groups || [];
|
|
105
105
|
return html `
|
|
106
|
-
<div @click=${(e) => this.onClickFlip(e)} front><
|
|
106
|
+
<div @click=${(e) => this.onClickFlip(e)} front><md-icon>add_circle_outline</md-icon>create process</div>
|
|
107
107
|
|
|
108
108
|
<div @click=${(e) => this.onClickFlip(e)} back>
|
|
109
109
|
<form @submit=${(e) => this.onClickSubmit(e)}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-thumbnail-card.js","sourceRoot":"","sources":["../../../src/selector/process-thumbnail-card.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAG1C,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IACrE,MAAM,KAAK,MAAM;QACf,OAAO;YACL,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4FF;SACF,CAAA;IACH,CAAC;IAKD,MAAM;QACJ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AQ,CAAC,MAAM,CAAC,CAAC,KAAK,CAAA;QACtC,IAAI,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,KAAK,CAAA;QACpD,IAAI,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,KAAK,CAAA;QAE5C,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,gBAAgB,EAAE;YAChC,MAAM,EAAE;gBACN,IAAI;gBACJ,WAAW;gBACX,OAAO;aACR;SACF,CAAC,CACH,CAAA;IACH,CAAC;IAED,KAAK;;QACH,IAAI,IAAI,GAAG,MAAA,IAAI,CAAC,UAAU,0CAAE,aAAa,CAAC,MAAM,CAAC,CAAA;QACjD,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,KAAK,EAAE,CAAA;QACd,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;IAClC,CAAC;CACF,CAAA;AArE6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0DAAsB;AACtB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;oDAAwC;AApGvD,oBAAoB;IADhC,aAAa,CAAC,wBAAwB,CAAC;GAC3B,oBAAoB,CAwKhC","sourcesContent":["import { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\n\n@customElement('process-thumbnail-card')\nexport class ProcessThumbnailCard extends localize(i18next)(LitElement) {\n static get styles() {\n return [\n css`\n :host {\n position: relative;\n\n padding: 0;\n margin: 0;\n height: 100%;\n\n -webkit-transform-style: preserve-3d;\n transform-style: preserve-3d;\n -webkit-transition: all 0.5s ease-in-out;\n transition: all 0.5s ease-in-out;\n }\n\n :host(.flipped) {\n -webkit-transform: var(--card-list-flip-transform);\n transform: var(--card-list-flip-transform);\n }\n\n [front],\n [back] {\n position: absolute;\n\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n\n border: var(--card-list-create-border);\n border-radius: var(--card-list-create-border-radius);\n\n background-color: #fff;\n\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n }\n\n [front] {\n text-align: center;\n font-size: 0.8em;\n color: var(--card-list-create-color);\n text-transform: capitalize;\n }\n\n [front]
|
|
1
|
+
{"version":3,"file":"process-thumbnail-card.js","sourceRoot":"","sources":["../../../src/selector/process-thumbnail-card.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAG1C,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IACrE,MAAM,KAAK,MAAM;QACf,OAAO;YACL,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4FF;SACF,CAAA;IACH,CAAC;IAKD,MAAM;QACJ,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA;QAE9B,OAAO,IAAI,CAAA;oBACK,CAAC,CAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;;oBAEjC,CAAC,CAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;wBAC7B,CAAC,CAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;mBACxC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC;;;mBAGvB,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC;;;mBAG9B,OAAO,CA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AE,aAAa,CAAC,MAAM,CAAC,CAAA;QACjD,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,KAAK,EAAE,CAAA;QACd,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;IAClC,CAAC;CACF,CAAA;AArE6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0DAAsB;AACtB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;oDAAwC;AApGvD,oBAAoB;IADhC,aAAa,CAAC,wBAAwB,CAAC;GAC3B,oBAAoB,CAwKhC","sourcesContent":["import { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\n\n@customElement('process-thumbnail-card')\nexport class ProcessThumbnailCard extends localize(i18next)(LitElement) {\n static get styles() {\n return [\n css`\n :host {\n position: relative;\n\n padding: 0;\n margin: 0;\n height: 100%;\n\n -webkit-transform-style: preserve-3d;\n transform-style: preserve-3d;\n -webkit-transition: all 0.5s ease-in-out;\n transition: all 0.5s ease-in-out;\n }\n\n :host(.flipped) {\n -webkit-transform: var(--card-list-flip-transform);\n transform: var(--card-list-flip-transform);\n }\n\n [front],\n [back] {\n position: absolute;\n\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n\n border: var(--card-list-create-border);\n border-radius: var(--card-list-create-border-radius);\n\n background-color: #fff;\n\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n }\n\n [front] {\n text-align: center;\n font-size: 0.8em;\n color: var(--card-list-create-color);\n text-transform: capitalize;\n }\n\n [front] md-icon {\n margin-top: 15%;\n display: block;\n font-size: 3.5em;\n color: var(--card-list-create-icon-color);\n }\n\n [back] {\n -webkit-transform: var(--card-list-flip-transform);\n transform: var(--card-list-flip-transform);\n }\n\n [back] form {\n padding: var(--card-list-create-form-padding);\n display: flex;\n flex-flow: row wrap;\n }\n\n [back] form label {\n flex: 1 1 25%;\n font: var(--card-list-create-label-font);\n color: var(--card-list-create-label-color);\n }\n\n [back] form input,\n [back] form select {\n flex: 1 1 60%;\n width: 10px;\n background-color: #fff;\n border: var(--card-list-create-input-border);\n border-radius: var(--card-list-create-input-border-radius);\n padding: var(--card-list-create-input-padding);\n font: var(--card-list-create-input-font);\n color: var(--card-list-create-input-color);\n }\n\n form * {\n margin: var(--card-list-create-margin);\n }\n\n input[type='submit'] {\n background-color: var(--button-background-color) !important;\n margin: var(--button-margin);\n font: var(--button-font);\n color: var(--button-color) !important;\n border-radius: var(--button-radius);\n border: var(--button-border);\n }\n `\n ]\n }\n\n @property({ type: String }) defaultGroup?: string\n @property({ type: Array }) groups?: { id: string; name: string }[]\n\n render() {\n var groups = this.groups || []\n\n return html`\n <div @click=${(e: Event) => this.onClickFlip(e)} front><md-icon>add_circle_outline</md-icon>create process</div>\n\n <div @click=${(e: Event) => this.onClickFlip(e)} back>\n <form @submit=${(e: Event) => this.onClickSubmit(e)}>\n <label>${i18next.t('label.name')}</label>\n <input type=\"text\" name=\"name\" />\n\n <label>${i18next.t('label.description')}</label>\n <input type=\"text\" name=\"description\" />\n\n <label>${i18next.t('label.group')}</label>\n <select .value=${this.defaultGroup || ''} name=\"groupId\">\n ${groups.map(\n group => html`\n <option value=${group.id} ?selected=${this.defaultGroup == group.id}>${group.name}</option>\n `\n )}\n </select>\n\n <input type=\"submit\" value=${String(i18next.t('button.create'))} />\n </form>\n </div>\n `\n }\n\n onClickFlip(e: Event) {\n if ((e.currentTarget as any)?.hasAttribute('front') || (e.target as any)?.hasAttribute('back')) {\n this.classList.toggle('flipped')\n }\n\n e.stopPropagation()\n }\n\n onClickSubmit(e: Event) {\n e.preventDefault()\n e.stopPropagation()\n\n var form = e.target as any\n\n var name = form.elements['name'].value\n var description = form.elements['description'].value\n var groupId = form.elements['groupId'].value\n\n this.dispatchEvent(\n new CustomEvent('create-process', {\n detail: {\n name,\n description,\n groupId\n }\n })\n )\n }\n\n reset() {\n var form = this.shadowRoot?.querySelector('form')\n if (form) {\n form.reset()\n }\n\n this.classList.remove('flipped')\n }\n}\n"]}
|