@things-factory/integration-ui 9.0.0-beta.19 → 9.0.0-beta.20
Sign up to get free protection for your applications and to get access to all the features.
- package/client/analysis/graph-viewer.ts +1 -1
- package/client/analysis/node.ts +2 -2
- package/client/analysis/relationship.ts +1 -1
- package/client/bootstrap.ts +10 -6
- package/client/editors/entity-editor.ts +2 -2
- package/client/editors/property-editor.ts +5 -5
- package/client/editors/things-editor-entity-selector.ts +1 -1
- package/client/grist/connection-selector.ts +1 -1
- package/client/grist/connector-selector.ts +1 -1
- package/client/pages/connection.ts +1 -1
- package/client/pages/integration-analysis.ts +3 -3
- package/client/pages/integration-monitor.ts +4 -4
- package/client/pages/scenario.ts +3 -3
- package/client/pages/state-register.ts +1 -1
- package/client/viewparts/scenario-instance-log-view.ts +1 -1
- package/client/viewparts/scenario-instance-monitor.ts +1 -1
- package/client/viewparts/scenario-instance-view.ts +2 -2
- package/client/viewparts/scenario-monitor.ts +1 -1
- package/client/viewparts/scenarios-monitor.ts +1 -1
- package/dist-client/analysis/graph-viewer.d.ts +1 -1
- package/dist-client/analysis/graph-viewer.js.map +1 -1
- package/dist-client/analysis/node.d.ts +1 -1
- package/dist-client/analysis/node.js +1 -1
- package/dist-client/analysis/node.js.map +1 -1
- package/dist-client/analysis/relationship.d.ts +1 -1
- package/dist-client/analysis/relationship.js.map +1 -1
- package/dist-client/bootstrap.d.ts +2 -2
- package/dist-client/bootstrap.js +5 -5
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/editors/entity-editor.d.ts +1 -1
- package/dist-client/editors/entity-editor.js +2 -2
- package/dist-client/editors/entity-editor.js.map +1 -1
- package/dist-client/editors/property-editor.d.ts +5 -5
- package/dist-client/editors/property-editor.js +5 -5
- package/dist-client/editors/property-editor.js.map +1 -1
- package/dist-client/editors/things-editor-entity-selector.d.ts +1 -1
- package/dist-client/editors/things-editor-entity-selector.js +1 -1
- package/dist-client/editors/things-editor-entity-selector.js.map +1 -1
- package/dist-client/grist/connection-selector.d.ts +1 -1
- package/dist-client/grist/connection-selector.js +1 -1
- package/dist-client/grist/connection-selector.js.map +1 -1
- package/dist-client/grist/connector-selector.d.ts +1 -1
- package/dist-client/grist/connector-selector.js +1 -1
- package/dist-client/grist/connector-selector.js.map +1 -1
- package/dist-client/pages/connection.d.ts +1 -1
- package/dist-client/pages/connection.js +1 -1
- package/dist-client/pages/connection.js.map +1 -1
- package/dist-client/pages/integration-analysis.d.ts +1 -1
- package/dist-client/pages/integration-analysis.js +2 -2
- package/dist-client/pages/integration-analysis.js.map +1 -1
- package/dist-client/pages/integration-monitor.d.ts +4 -4
- package/dist-client/pages/integration-monitor.js +4 -4
- package/dist-client/pages/integration-monitor.js.map +1 -1
- package/dist-client/pages/scenario.d.ts +2 -2
- package/dist-client/pages/scenario.js +3 -3
- package/dist-client/pages/scenario.js.map +1 -1
- package/dist-client/pages/state-register.js +1 -1
- package/dist-client/pages/state-register.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/viewparts/scenario-instance-log-view.js +1 -1
- package/dist-client/viewparts/scenario-instance-log-view.js.map +1 -1
- package/dist-client/viewparts/scenario-instance-monitor.d.ts +1 -1
- package/dist-client/viewparts/scenario-instance-monitor.js +1 -1
- package/dist-client/viewparts/scenario-instance-monitor.js.map +1 -1
- package/dist-client/viewparts/scenario-instance-view.d.ts +1 -1
- package/dist-client/viewparts/scenario-instance-view.js +2 -2
- package/dist-client/viewparts/scenario-instance-view.js.map +1 -1
- package/dist-client/viewparts/scenario-monitor.d.ts +1 -1
- package/dist-client/viewparts/scenario-monitor.js +1 -1
- package/dist-client/viewparts/scenario-monitor.js.map +1 -1
- package/dist-client/viewparts/scenarios-monitor.d.ts +1 -1
- package/dist-client/viewparts/scenarios-monitor.js +1 -1
- package/dist-client/viewparts/scenarios-monitor.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/client/analysis/graph-viewer-old.ts +0 -1097
package/client/analysis/node.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { Node } from './graph-data'
|
1
|
+
import { Node } from './graph-data.js'
|
2
2
|
import * as d3 from 'd3'
|
3
|
-
import { class2color, class2darkenColor } from './utils'
|
3
|
+
import { class2color, class2darkenColor } from './utils.js'
|
4
4
|
|
5
5
|
export function appendNodeToGraph(
|
6
6
|
svgNodes: d3.Selection<SVGGElement, unknown, HTMLElement, any>, // 타입 지정
|
package/client/bootstrap.ts
CHANGED
@@ -1,17 +1,21 @@
|
|
1
|
-
import './editors/entity-editor'
|
2
|
-
import './editors/property-editor'
|
1
|
+
import './editors/entity-editor.js'
|
2
|
+
import './editors/property-editor.js'
|
3
3
|
|
4
4
|
import { OxGristEditorJson } from '@operato/app/grist-editor/ox-grist-editor-json.js'
|
5
5
|
import { OxGristRendererCrontab } from '@operato/app/grist-editor/ox-grist-renderer-crontab.js'
|
6
|
-
import {
|
6
|
+
import {
|
7
|
+
registerEditor as registerGristEditor,
|
8
|
+
registerRenderer as registerGristRenderer,
|
9
|
+
OxGristRendererJson5
|
10
|
+
} from '@operato/data-grist'
|
7
11
|
import { OxGristEditorCrontab } from '@operato/grist-editor/ox-grist-editor-crontab.js'
|
8
12
|
import { OxGristEditorPrivilege } from '@operato/app/grist-editor/ox-grist-editor-privilege.js'
|
9
13
|
import { OxGristEditorParameters } from '@operato/grist-editor/ox-grist-editor-parameters.js'
|
10
14
|
import { OxPropertyEditor } from '@operato/property-editor'
|
11
15
|
|
12
|
-
import { ConnectionSelector } from './grist/connection-selector'
|
13
|
-
import { ConnectorSelector } from './grist/connector-selector'
|
14
|
-
import { TaskTypeSelector } from './grist/task-type-selector'
|
16
|
+
import { ConnectionSelector } from './grist/connection-selector.js'
|
17
|
+
import { ConnectorSelector } from './grist/connector-selector.js'
|
18
|
+
import { TaskTypeSelector } from './grist/task-type-selector.js'
|
15
19
|
|
16
20
|
export default function bootstrap() {
|
17
21
|
registerGristEditor('task-type', TaskTypeSelector)
|
@@ -2,11 +2,11 @@
|
|
2
2
|
* Copyright © HatioLab Inc. All rights reserved.
|
3
3
|
*/
|
4
4
|
|
5
|
-
import './things-editor-entity-selector'
|
5
|
+
import './things-editor-entity-selector.js'
|
6
6
|
|
7
7
|
import { html } from 'lit'
|
8
8
|
import { customElement } from 'lit/decorators.js'
|
9
|
-
import cloneDeep from 'lodash-es/cloneDeep'
|
9
|
+
import cloneDeep from 'lodash-es/cloneDeep.js'
|
10
10
|
|
11
11
|
import { OxPropertyEditor } from '@operato/property-editor'
|
12
12
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/*
|
2
2
|
* Copyright © HatioLab Inc. All rights reserved.
|
3
3
|
*/
|
4
|
-
import './things-editor-http-headers'
|
5
|
-
import './things-editor-http-parameters'
|
6
|
-
import './things-editor-http-body'
|
7
|
-
import './things-editor-db-procedure'
|
8
|
-
import './things-editor-tag-scenarios'
|
4
|
+
import './things-editor-http-headers.js'
|
5
|
+
import './things-editor-http-parameters.js'
|
6
|
+
import './things-editor-http-body.js'
|
7
|
+
import './things-editor-db-procedure.js'
|
8
|
+
import './things-editor-tag-scenarios.js'
|
9
9
|
|
10
10
|
import { html } from 'lit'
|
11
11
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import '../analysis/graph-viewer'
|
1
|
+
import '../analysis/graph-viewer.js'
|
2
2
|
|
3
3
|
import gql from 'graphql-tag'
|
4
4
|
import { css, html, nothing } from 'lit'
|
@@ -8,8 +8,8 @@ import { client } from '@operato/graphql'
|
|
8
8
|
import { i18next, localize } from '@operato/i18n'
|
9
9
|
import { PageView } from '@operato/shell'
|
10
10
|
import { ScrollbarStyles } from '@operato/styles'
|
11
|
-
import { GraphData, Node, Relationship } from 'analysis/graph-data'
|
12
|
-
import { GraphViewer } from '../analysis/graph-viewer'
|
11
|
+
import { GraphData, Node, Relationship } from '../analysis/graph-data.js'
|
12
|
+
import { GraphViewer } from '../analysis/graph-viewer.js'
|
13
13
|
import { GraphViewerStyles } from '../analysis/graph-viewer-style'
|
14
14
|
|
15
15
|
@customElement('integration-analysis')
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import '../viewparts/monitoring-summary'
|
2
|
-
import '../viewparts/pending-q-monitor'
|
3
|
-
import '../viewparts/scenarios-monitor'
|
4
|
-
import '../viewparts/connections-monitor'
|
1
|
+
import '../viewparts/monitoring-summary.js'
|
2
|
+
import '../viewparts/pending-q-monitor.js'
|
3
|
+
import '../viewparts/scenarios-monitor.js'
|
4
|
+
import '../viewparts/connections-monitor.js'
|
5
5
|
|
6
6
|
import gql from 'graphql-tag'
|
7
7
|
import { css, html } from 'lit'
|
package/client/pages/scenario.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import '@operato/data-grist'
|
2
|
-
import './scenario-detail'
|
3
|
-
import './scenario-importer'
|
2
|
+
import './scenario-detail.js'
|
3
|
+
import './scenario-importer.js'
|
4
4
|
|
5
5
|
import gql from 'graphql-tag'
|
6
6
|
import { css, html } from 'lit'
|
7
7
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
8
8
|
import moment from '@operato/moment-timezone-es'
|
9
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
9
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
10
10
|
|
11
11
|
import { DataGrist } from '@operato/data-grist/ox-grist.js'
|
12
12
|
import { client } from '@operato/graphql'
|
@@ -2,7 +2,7 @@ import '@operato/data-grist'
|
|
2
2
|
|
3
3
|
import { css, html } from 'lit'
|
4
4
|
import { customElement, property, query } from 'lit/decorators.js'
|
5
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
5
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
6
6
|
import gql from 'graphql-tag'
|
7
7
|
|
8
8
|
import { PageView, store } from '@operato/shell'
|
@@ -5,7 +5,7 @@ import gql from 'graphql-tag'
|
|
5
5
|
|
6
6
|
import { css, html, LitElement, nothing } from 'lit'
|
7
7
|
import { customElement, property, query } from 'lit/decorators.js'
|
8
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
8
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
9
9
|
|
10
10
|
import { subscribe } from '@operato/graphql'
|
11
11
|
import { store } from '@operato/shell'
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import './scenario-instance-log-view'
|
1
|
+
import './scenario-instance-log-view.js'
|
2
2
|
|
3
3
|
import gql from 'graphql-tag'
|
4
4
|
import { css, html, LitElement } from 'lit'
|
5
5
|
import { customElement, property, query } from 'lit/decorators.js'
|
6
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
6
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
7
7
|
|
8
8
|
import { subscribe } from '@operato/graphql'
|
9
9
|
import { store } from '@operato/shell'
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"graph-viewer.js","sourceRoot":"","sources":["../../client/analysis/graph-viewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AAGxB,MAAM,OAAO,WAAW;IAatB,YAAY,SAAc,EAAE,QAAa;QATjC,UAAK,GAAW,EAAE,CAAA;QAClB,kBAAa,GAAmB,EAAE,CAAA;QAClC,gBAAW,GAAG,IAAI,CAAA;QAQxB,IAAI,CAAC,OAAO,mBACV,SAAS,EAAE,CAAC,EACZ,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EACrB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,IAAI,EACf,YAAY,EAAE,SAAS,EACvB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,SAAS,EAClB,oBAAoB,EAAE,SAAS,EAC/B,UAAU,EAAE,EAAE,EACd,iBAAiB,EAAE,SAAS,EAC5B,OAAO,EAAE,KAAK,EACd,cAAc,EAAE,EAAE,EAClB,UAAU,EAAE,CAAC,IACV,QAAQ,CACZ,CAAA;QACD,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACtB,CAAC;IAEO,IAAI,CAAC,QAAa;QACxB,IAAI,CAAC,GAAG,GAAG,EAAE;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AAI,EAAE,CAAC,aAAa,CAAC,aAAa,EACpD,SAAS,GAAG,MAAM,CAAC,WAAW,EAC9B,UAAU,GAAG,MAAM,CAAC,YAAY,EAChC,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,MAAM,GAAG,MAAM,CAAC,MAAM,EACtB,IAAI,GAAG,MAAM,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,EAC3B,IAAI,GAAG,MAAM,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC,CAAA;QAE9B,IAAI,KAAK,KAAK,CAAC,IAAI,MAAM,KAAK,CAAC,EAAE,CAAC;YAChC,OAAM,CAAC,iBAAiB;QAC1B,CAAC;QAED,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC,CAAA;QACvE,IAAI,CAAC,YAAY,GAAG,CAAC,SAAS,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,EAAE,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAA;QAEjG,IAAI,CAAC,GAAG,CAAC,IAAI,CACX,WAAW,EACX,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,UAAU,GAAG,IAAI,CAAC,QAAQ,GAAG,GAAG,CACrG,CAAA;IACH,CAAC;IAED,IAAI;QACF,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;YACxB,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;SACzC,CAAA;IACH,CAAC;CACF","sourcesContent":["import * as d3 from 'd3'\nimport { Node, Relationship, GraphData } from './graph-data'\n\nexport class GraphViewer {\n private svg: any\n private svgNodes: any\n private svgRelationships: any\n private nodes: Node[] = []\n private relationships: Relationship[] = []\n private needZoomFit = true\n private options: any\n private svgScale\n private svgTranslate\n\n public simulation: any\n\n constructor(_selector: any, _options: any) {\n this.options = {\n arrowSize: 4,\n colors: this.colors(),\n highlight: undefined,\n infoPanel: true,\n minCollision: undefined,\n graphData: undefined,\n dataUrl: undefined,\n nodeOutlineFillColor: undefined,\n nodeRadius: 25,\n relationshipColor: '#a5abb6',\n zoomFit: false,\n classes2colors: {},\n numClasses: 0,\n ..._options\n }\n this.init(_selector)\n }\n\n private init(selector: any) {\n this.svg = d3\n .select(selector)\n .append('svg')\n .attr('width', '100%')\n .attr('height', '100%')\n .attr('class', 'graph-viewer')\n .call(\n d3.zoom().on('zoom', (event, d) => {\n var scale = event.transform.k,\n translate = [event.transform.x, event.transform.y]\n\n if (this.svgTranslate) {\n translate[0] += this.svgTranslate[0]\n translate[1] += this.svgTranslate[1]\n }\n\n if (this.svgScale) {\n scale *= this.svgScale\n }\n\n this.svg.attr('transform', 'translate(' + translate[0] + ', ' + translate[1] + ') scale(' + scale + ')')\n })\n )\n .on('dblclick.zoom', null)\n .append('g') // 그룹 요소 추가\n .attr('width', '100%')\n .attr('height', '100%')\n\n // Define arrow markers for graph links\n this.svg\n .append('defs')\n .append('marker')\n .attr('id', 'arrow')\n .attr('viewBox', '0 -5 10 10')\n .attr('refX', 10)\n .attr('refY', 0)\n .attr('markerWidth', 6)\n .attr('markerHeight', 6)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M0,-5L10,0L0,5')\n .attr('fill', this.options.relationshipColor)\n\n this.svgNodes = this.svg.append('g').attr('class', 'nodes')\n this.svgRelationships = this.svg.append('g').attr('class', 'relationships')\n this.simulation = this.initSimulation()\n\n if (this.options.graphData) {\n this.updateWithGraphData(this.options.graphData)\n }\n }\n\n initSimulation() {\n const x = this.svg.node().parentElement.parentElement.clientWidth / 2\n const y = this.svg.node().parentElement.parentElement.clientHeight / 2\n\n var simulation = d3\n .forceSimulation()\n .force(\n 'collide',\n d3\n .forceCollide()\n .radius(d => {\n return this.options.minCollision\n })\n .iterations(2)\n )\n .force('charge', d3.forceManyBody())\n .force(\n 'link',\n d3.forceLink().id(d => {\n return d.id\n })\n )\n .force('center', d3.forceCenter(x, y))\n .on('tick', () => {\n this.tick()\n })\n .on('end', () => {\n if (this.options.zoomFit && this.needZoomFit) {\n this.needZoomFit = false\n this.zoomFit()\n }\n })\n\n return simulation\n }\n\n private tick() {\n this.svgNodes.selectAll('.node').attr('transform', (d: any) => `translate(${d.x}, ${d.y})`)\n\n this.svgRelationships\n .selectAll('.relationship')\n .attr('x1', (d: any) => this.calculateIntersection(d.source, d.target).x1)\n .attr('y1', (d: any) => this.calculateIntersection(d.source, d.target).y1)\n .attr('x2', (d: any) => this.calculateIntersection(d.source, d.target).x2)\n .attr('y2', (d: any) => this.calculateIntersection(d.source, d.target).y2)\n\n this.svgRelationships.selectAll('.relationship-text').attr('transform', (d: any) => {\n const midX =\n (this.calculateIntersection(d.source, d.target).x1 + this.calculateIntersection(d.source, d.target).x2) / 2\n const midY =\n (this.calculateIntersection(d.source, d.target).y1 + this.calculateIntersection(d.source, d.target).y2) / 2\n return `translate(${midX}, ${midY})`\n })\n }\n\n private calculateIntersection(source, target) {\n const dx = target.x - source.x\n const dy = target.y - source.y\n const distance = Math.sqrt(dx * dx + dy * dy)\n const ratio = (distance - this.options.nodeRadius) / distance\n\n const x1 = source.x + dx * (this.options.nodeRadius / distance)\n const y1 = source.y + dy * (this.options.nodeRadius / distance)\n const x2 = target.x - dx * (this.options.nodeRadius / distance)\n const y2 = target.y - dy * (this.options.nodeRadius / distance)\n\n return { x1, y1, x2, y2 }\n }\n\n private colors() {\n return [\n '#68bdf6', // light blue\n '#6dce9e', // green #1\n '#faafc2', // light pink\n '#f2baf6', // purple\n '#ff928c', // light red\n '#fcea7e', // light yellow\n '#ffc766', // light orange\n '#405f9e', // navy blue\n '#a5abb6', // dark gray\n '#78cecb', // green #2,\n '#b88cbb', // dark purple\n '#ced2d9', // light gray\n '#e84646', // dark red\n '#fa5f86', // dark pink\n '#ffab1a', // dark orange\n '#fcda19', // dark yellow\n '#797b80', // black\n '#c9d96f', // pistachio\n '#47991f', // green #3\n '#70edee', // turquoise\n '#ff75ea' // pink\n ]\n }\n\n updateWithGraphData(graphData: GraphData) {\n this.nodes = graphData.results[0].data[0].graph.nodes\n this.relationships = graphData.results[0].data[0].graph.relationships\n\n this.relationships.forEach(rel => {\n const sourceNode = this.nodes.find(node => node.id === rel.startNode)\n const targetNode = this.nodes.find(node => node.id === rel.endNode)\n\n if (!sourceNode || !targetNode) {\n console.warn(`Node not found for relationship: ${rel.id}`)\n return\n }\n\n rel.source = sourceNode\n rel.target = targetNode\n })\n\n this.updateNodesAndRelationships()\n }\n\n private updateNodesAndRelationships() {\n this.needZoomFit = true\n\n this.svgNodes.selectAll('.node').remove()\n this.svgRelationships.selectAll('.relationship').remove()\n this.svgRelationships.selectAll('.relationship-text').remove()\n\n this.appendNodesToGraph()\n this.appendRelationshipsToGraph()\n\n this.simulation.nodes(this.nodes)\n ;(this.simulation.force('link') as d3.ForceLink<Node, Relationship>).links(this.relationships)\n\n // 시뮬레이션을 강제로 재시작하여 레이아웃이 적절히 재정렬되도록 함\n this.simulation.alpha(1).restart()\n }\n\n private appendNodesToGraph() {\n const nodeEnter = this.svgNodes\n .selectAll('.node')\n .data(this.nodes, (d: any) => d.id)\n .enter()\n .append('g')\n .attr('class', d => {\n var highlight,\n i,\n classes = 'node',\n label = d.labels[0]\n\n if (d.icon) {\n classes += ' node-icon'\n }\n\n return classes\n })\n .on('click', (event, d) => {\n d.fx = d.fy = null\n\n if (typeof this.options.onNodeClick === 'function') {\n this.options.onNodeClick(d)\n }\n })\n .on('dblclick', (event, d) => {\n this.stickNode(event, d)\n\n if (typeof this.options.onNodeDoubleClick === 'function') {\n this.options.onNodeDoubleClick(d)\n }\n })\n .on('mouseenter', (event, d) => {\n event.target.dispatchEvent(\n new CustomEvent('node-mouseenter', {\n detail: d,\n bubbles: true\n })\n )\n })\n .on('mouseleave', (event, d) => {\n event.target.dispatchEvent(\n new CustomEvent('node-mouseleave', {\n detail: d,\n bubbles: true\n })\n )\n })\n .call(\n d3\n .drag()\n .on('start', this.dragStarted.bind(this))\n .on('drag', this.dragged.bind(this))\n .on('end', this.dragEnded.bind(this))\n )\n\n nodeEnter\n .append('circle')\n .attr('class', 'outline')\n .attr('r', this.options.nodeRadius)\n .style('fill', d => this.class2color(d.labels[0]))\n .style('stroke', d => this.class2darkenColor(d.labels[0]))\n .style('stroke-width', 2)\n\n nodeEnter\n .append('text')\n .attr('class', 'text icon')\n .attr('x', 0)\n .attr('y', 0)\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'central')\n .attr('font-family', 'Material Symbols Outlined')\n .attr('font-size', '24px')\n .attr('fill', '#000')\n .text(d => this.getNodeIcon(d))\n\n nodeEnter\n .append('text')\n .attr('dy', 40)\n .attr('text-anchor', 'middle')\n .text(d => d.properties.name || d.id)\n }\n\n stickNode(event: d3.event, d) {\n d.fx = event.x\n d.fy = event.y\n }\n\n private appendRelationshipsToGraph() {\n const relationshipEnter = this.svgRelationships\n .selectAll('.relationship')\n .data(\n this.relationships.filter(rel => rel.source && rel.target),\n d => d.id\n )\n .enter()\n .append('g')\n .attr('class', 'relationship-group')\n\n relationshipEnter\n .append('line')\n .attr('class', 'relationship')\n .style('stroke', this.options.relationshipColor)\n .style('stroke-width', 2)\n .attr('marker-end', 'url(#arrow)')\n\n relationshipEnter\n .append('text')\n .attr('class', 'relationship-text')\n .attr('fill', '#000000')\n .attr('font-size', '8px')\n .attr('pointer-events', 'none')\n .attr('text-anchor', 'middle')\n .text(d => d.type)\n }\n\n private getNodeIcon(d: Node): string {\n return d.icon || ''\n }\n\n private class2color(cls: string) {\n if (!this.options.classes2colors[cls]) {\n this.options.classes2colors[cls] = this.options.colors[this.options.numClasses % this.options.colors.length]\n this.options.numClasses++\n }\n return this.options.classes2colors[cls]\n }\n\n private class2darkenColor(cls: string) {\n return d3.rgb(this.class2color(cls)).darker(1)\n }\n\n private dragStarted(event: any, d: Node) {\n if (!event.active) this.simulation.alphaTarget(0.3).restart()\n d.fx = d.x\n d.fy = d.y\n }\n\n private dragged(event: any, d: Node) {\n d.fx = event.x\n d.fy = event.y\n }\n\n private dragEnded(event: any, d: Node) {\n if (!event.active) this.simulation.alphaTarget(0)\n d.fx = null\n d.fy = null\n }\n\n zoomFit() {\n var bounds = this.svg.node().getBBox(),\n parent = this.svg.node().parentElement.parentElement,\n fullWidth = parent.clientWidth,\n fullHeight = parent.clientHeight,\n width = bounds.width,\n height = bounds.height,\n midX = bounds.x + width / 2,\n midY = bounds.y + height / 2\n\n if (width === 0 || height === 0) {\n return // nothing to fit\n }\n\n this.svgScale = 0.85 / Math.max(width / fullWidth, height / fullHeight)\n this.svgTranslate = [fullWidth / 2 - this.svgScale * midX, fullHeight / 2 - this.svgScale * midY]\n\n this.svg.attr(\n 'transform',\n 'translate(' + this.svgTranslate[0] + ', ' + this.svgTranslate[1] + ') scale(' + this.svgScale + ')'\n )\n }\n\n size() {\n return {\n nodes: this.nodes.length,\n relationships: this.relationships.length\n }\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"graph-viewer.js","sourceRoot":"","sources":["../../client/analysis/graph-viewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AAGxB,MAAM,OAAO,WAAW;IAatB,YAAY,SAAc,EAAE,QAAa;QATjC,UAAK,GAAW,EAAE,CAAA;QAClB,kBAAa,GAAmB,EAAE,CAAA;QAClC,gBAAW,GAAG,IAAI,CAAA;QAQxB,IAAI,CAAC,OAAO,mBACV,SAAS,EAAE,CAAC,EACZ,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EACrB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,IAAI,EACf,YAAY,EAAE,SAAS,EACvB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,SAAS,EAClB,oBAAoB,EAAE,SAAS,EAC/B,UAAU,EAAE,EAAE,EACd,iBAAiB,EAAE,S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E,IAAI,CAAC,aAAa,CAAC,MAAM;SACzC,CAAA;IACH,CAAC;CACF","sourcesContent":["import * as d3 from 'd3'\nimport { Node, Relationship, GraphData } from './graph-data.js'\n\nexport class GraphViewer {\n private svg: any\n private svgNodes: any\n private svgRelationships: any\n private nodes: Node[] = []\n private relationships: Relationship[] = []\n private needZoomFit = true\n private options: any\n private svgScale\n private svgTranslate\n\n public simulation: any\n\n constructor(_selector: any, _options: any) {\n this.options = {\n arrowSize: 4,\n colors: this.colors(),\n highlight: undefined,\n infoPanel: true,\n minCollision: undefined,\n graphData: undefined,\n dataUrl: undefined,\n nodeOutlineFillColor: undefined,\n nodeRadius: 25,\n relationshipColor: '#a5abb6',\n zoomFit: false,\n classes2colors: {},\n numClasses: 0,\n ..._options\n }\n this.init(_selector)\n }\n\n private init(selector: any) {\n this.svg = d3\n .select(selector)\n .append('svg')\n .attr('width', '100%')\n .attr('height', '100%')\n .attr('class', 'graph-viewer')\n .call(\n d3.zoom().on('zoom', (event, d) => {\n var scale = event.transform.k,\n translate = [event.transform.x, event.transform.y]\n\n if (this.svgTranslate) {\n translate[0] += this.svgTranslate[0]\n translate[1] += this.svgTranslate[1]\n }\n\n if (this.svgScale) {\n scale *= this.svgScale\n }\n\n this.svg.attr('transform', 'translate(' + translate[0] + ', ' + translate[1] + ') scale(' + scale + ')')\n })\n )\n .on('dblclick.zoom', null)\n .append('g') // 그룹 요소 추가\n .attr('width', '100%')\n .attr('height', '100%')\n\n // Define arrow markers for graph links\n this.svg\n .append('defs')\n .append('marker')\n .attr('id', 'arrow')\n .attr('viewBox', '0 -5 10 10')\n .attr('refX', 10)\n .attr('refY', 0)\n .attr('markerWidth', 6)\n .attr('markerHeight', 6)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M0,-5L10,0L0,5')\n .attr('fill', this.options.relationshipColor)\n\n this.svgNodes = this.svg.append('g').attr('class', 'nodes')\n this.svgRelationships = this.svg.append('g').attr('class', 'relationships')\n this.simulation = this.initSimulation()\n\n if (this.options.graphData) {\n this.updateWithGraphData(this.options.graphData)\n }\n }\n\n initSimulation() {\n const x = this.svg.node().parentElement.parentElement.clientWidth / 2\n const y = this.svg.node().parentElement.parentElement.clientHeight / 2\n\n var simulation = d3\n .forceSimulation()\n .force(\n 'collide',\n d3\n .forceCollide()\n .radius(d => {\n return this.options.minCollision\n })\n .iterations(2)\n )\n .force('charge', d3.forceManyBody())\n .force(\n 'link',\n d3.forceLink().id(d => {\n return d.id\n })\n )\n .force('center', d3.forceCenter(x, y))\n .on('tick', () => {\n this.tick()\n })\n .on('end', () => {\n if (this.options.zoomFit && this.needZoomFit) {\n this.needZoomFit = false\n this.zoomFit()\n }\n })\n\n return simulation\n }\n\n private tick() {\n this.svgNodes.selectAll('.node').attr('transform', (d: any) => `translate(${d.x}, ${d.y})`)\n\n this.svgRelationships\n .selectAll('.relationship')\n .attr('x1', (d: any) => this.calculateIntersection(d.source, d.target).x1)\n .attr('y1', (d: any) => this.calculateIntersection(d.source, d.target).y1)\n .attr('x2', (d: any) => this.calculateIntersection(d.source, d.target).x2)\n .attr('y2', (d: any) => this.calculateIntersection(d.source, d.target).y2)\n\n this.svgRelationships.selectAll('.relationship-text').attr('transform', (d: any) => {\n const midX =\n (this.calculateIntersection(d.source, d.target).x1 + this.calculateIntersection(d.source, d.target).x2) / 2\n const midY =\n (this.calculateIntersection(d.source, d.target).y1 + this.calculateIntersection(d.source, d.target).y2) / 2\n return `translate(${midX}, ${midY})`\n })\n }\n\n private calculateIntersection(source, target) {\n const dx = target.x - source.x\n const dy = target.y - source.y\n const distance = Math.sqrt(dx * dx + dy * dy)\n const ratio = (distance - this.options.nodeRadius) / distance\n\n const x1 = source.x + dx * (this.options.nodeRadius / distance)\n const y1 = source.y + dy * (this.options.nodeRadius / distance)\n const x2 = target.x - dx * (this.options.nodeRadius / distance)\n const y2 = target.y - dy * (this.options.nodeRadius / distance)\n\n return { x1, y1, x2, y2 }\n }\n\n private colors() {\n return [\n '#68bdf6', // light blue\n '#6dce9e', // green #1\n '#faafc2', // light pink\n '#f2baf6', // purple\n '#ff928c', // light red\n '#fcea7e', // light yellow\n '#ffc766', // light orange\n '#405f9e', // navy blue\n '#a5abb6', // dark gray\n '#78cecb', // green #2,\n '#b88cbb', // dark purple\n '#ced2d9', // light gray\n '#e84646', // dark red\n '#fa5f86', // dark pink\n '#ffab1a', // dark orange\n '#fcda19', // dark yellow\n '#797b80', // black\n '#c9d96f', // pistachio\n '#47991f', // green #3\n '#70edee', // turquoise\n '#ff75ea' // pink\n ]\n }\n\n updateWithGraphData(graphData: GraphData) {\n this.nodes = graphData.results[0].data[0].graph.nodes\n this.relationships = graphData.results[0].data[0].graph.relationships\n\n this.relationships.forEach(rel => {\n const sourceNode = this.nodes.find(node => node.id === rel.startNode)\n const targetNode = this.nodes.find(node => node.id === rel.endNode)\n\n if (!sourceNode || !targetNode) {\n console.warn(`Node not found for relationship: ${rel.id}`)\n return\n }\n\n rel.source = sourceNode\n rel.target = targetNode\n })\n\n this.updateNodesAndRelationships()\n }\n\n private updateNodesAndRelationships() {\n this.needZoomFit = true\n\n this.svgNodes.selectAll('.node').remove()\n this.svgRelationships.selectAll('.relationship').remove()\n this.svgRelationships.selectAll('.relationship-text').remove()\n\n this.appendNodesToGraph()\n this.appendRelationshipsToGraph()\n\n this.simulation.nodes(this.nodes)\n ;(this.simulation.force('link') as d3.ForceLink<Node, Relationship>).links(this.relationships)\n\n // 시뮬레이션을 강제로 재시작하여 레이아웃이 적절히 재정렬되도록 함\n this.simulation.alpha(1).restart()\n }\n\n private appendNodesToGraph() {\n const nodeEnter = this.svgNodes\n .selectAll('.node')\n .data(this.nodes, (d: any) => d.id)\n .enter()\n .append('g')\n .attr('class', d => {\n var highlight,\n i,\n classes = 'node',\n label = d.labels[0]\n\n if (d.icon) {\n classes += ' node-icon'\n }\n\n return classes\n })\n .on('click', (event, d) => {\n d.fx = d.fy = null\n\n if (typeof this.options.onNodeClick === 'function') {\n this.options.onNodeClick(d)\n }\n })\n .on('dblclick', (event, d) => {\n this.stickNode(event, d)\n\n if (typeof this.options.onNodeDoubleClick === 'function') {\n this.options.onNodeDoubleClick(d)\n }\n })\n .on('mouseenter', (event, d) => {\n event.target.dispatchEvent(\n new CustomEvent('node-mouseenter', {\n detail: d,\n bubbles: true\n })\n )\n })\n .on('mouseleave', (event, d) => {\n event.target.dispatchEvent(\n new CustomEvent('node-mouseleave', {\n detail: d,\n bubbles: true\n })\n )\n })\n .call(\n d3\n .drag()\n .on('start', this.dragStarted.bind(this))\n .on('drag', this.dragged.bind(this))\n .on('end', this.dragEnded.bind(this))\n )\n\n nodeEnter\n .append('circle')\n .attr('class', 'outline')\n .attr('r', this.options.nodeRadius)\n .style('fill', d => this.class2color(d.labels[0]))\n .style('stroke', d => this.class2darkenColor(d.labels[0]))\n .style('stroke-width', 2)\n\n nodeEnter\n .append('text')\n .attr('class', 'text icon')\n .attr('x', 0)\n .attr('y', 0)\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'central')\n .attr('font-family', 'Material Symbols Outlined')\n .attr('font-size', '24px')\n .attr('fill', '#000')\n .text(d => this.getNodeIcon(d))\n\n nodeEnter\n .append('text')\n .attr('dy', 40)\n .attr('text-anchor', 'middle')\n .text(d => d.properties.name || d.id)\n }\n\n stickNode(event: d3.event, d) {\n d.fx = event.x\n d.fy = event.y\n }\n\n private appendRelationshipsToGraph() {\n const relationshipEnter = this.svgRelationships\n .selectAll('.relationship')\n .data(\n this.relationships.filter(rel => rel.source && rel.target),\n d => d.id\n )\n .enter()\n .append('g')\n .attr('class', 'relationship-group')\n\n relationshipEnter\n .append('line')\n .attr('class', 'relationship')\n .style('stroke', this.options.relationshipColor)\n .style('stroke-width', 2)\n .attr('marker-end', 'url(#arrow)')\n\n relationshipEnter\n .append('text')\n .attr('class', 'relationship-text')\n .attr('fill', '#000000')\n .attr('font-size', '8px')\n .attr('pointer-events', 'none')\n .attr('text-anchor', 'middle')\n .text(d => d.type)\n }\n\n private getNodeIcon(d: Node): string {\n return d.icon || ''\n }\n\n private class2color(cls: string) {\n if (!this.options.classes2colors[cls]) {\n this.options.classes2colors[cls] = this.options.colors[this.options.numClasses % this.options.colors.length]\n this.options.numClasses++\n }\n return this.options.classes2colors[cls]\n }\n\n private class2darkenColor(cls: string) {\n return d3.rgb(this.class2color(cls)).darker(1)\n }\n\n private dragStarted(event: any, d: Node) {\n if (!event.active) this.simulation.alphaTarget(0.3).restart()\n d.fx = d.x\n d.fy = d.y\n }\n\n private dragged(event: any, d: Node) {\n d.fx = event.x\n d.fy = event.y\n }\n\n private dragEnded(event: any, d: Node) {\n if (!event.active) this.simulation.alphaTarget(0)\n d.fx = null\n d.fy = null\n }\n\n zoomFit() {\n var bounds = this.svg.node().getBBox(),\n parent = this.svg.node().parentElement.parentElement,\n fullWidth = parent.clientWidth,\n fullHeight = parent.clientHeight,\n width = bounds.width,\n height = bounds.height,\n midX = bounds.x + width / 2,\n midY = bounds.y + height / 2\n\n if (width === 0 || height === 0) {\n return // nothing to fit\n }\n\n this.svgScale = 0.85 / Math.max(width / fullWidth, height / fullHeight)\n this.svgTranslate = [fullWidth / 2 - this.svgScale * midX, fullHeight / 2 - this.svgScale * midY]\n\n this.svg.attr(\n 'transform',\n 'translate(' + this.svgTranslate[0] + ', ' + this.svgTranslate[1] + ') scale(' + this.svgScale + ')'\n )\n }\n\n size() {\n return {\n nodes: this.nodes.length,\n relationships: this.relationships.length\n }\n }\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../client/analysis/node.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../client/analysis/node.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,EAAE,WAAW,EAAE,iBAAiB,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6C,EAAE,CAAO;IACrE,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,CAAA;IACd,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,CAAA;AAChB,CAAC;AAED,SAAS,SAAS,CAAC,KAA6C,EAAE,CAAO,EAAE,UAA0C;IACnH,IAAI,CAAC,KAAK,CAAC,MAAM;QAAE,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;IAC5C,CAAC,CAAC,EAAE,GAAG,IAAI,CAAA;IACX,CAAC,CAAC,EAAE,GAAG,IAAI,CAAA;AACb,CAAC","sourcesContent":["import { Node } from './graph-data.js'\nimport * as d3 from 'd3'\nimport { class2color, class2darkenColor } from './utils.js'\n\nexport function appendNodeToGraph(\n svgNodes: d3.Selection<SVGGElement, unknown, HTMLElement, any>, // 타입 지정\n nodes: Node[],\n options: any\n) {\n const nodeEnter = svgNodes\n .selectAll<SVGGElement, Node>('.node')\n .data(nodes, d => d.id)\n .enter()\n .append('g')\n .attr('class', d => {\n let classes = 'node'\n if (d.icon) classes += ' node-icon'\n if (d.image) classes += ' node-image'\n if (options.highlight) {\n options.highlight.forEach((highlight: any) => {\n if (d.labels[0] === highlight.class && d.properties[highlight.property] === highlight.value) {\n classes += ' node-highlighted'\n }\n })\n }\n return classes\n })\n .call(\n d3\n .drag<SVGGElement, Node>() // 제네릭 타입 지정\n .on('start', (event, d) => dragStarted(event, d, options.simulation))\n .on('drag', (event, d) => dragged(event, d))\n .on('end', (event, d) => dragEnded(event, d, options.simulation))\n )\n\n nodeEnter\n .append('circle')\n .attr('r', options.nodeRadius)\n .style('fill', d => class2color(options.classes2colors, d.labels[0], options.colors, options.numClasses))\n .style('stroke', d =>\n class2darkenColor(class2color(options.classes2colors, d.labels[0], options.colors, options.numClasses))\n )\n .style('stroke-width', 2)\n\n nodeEnter\n .append('text')\n .attr('dy', 4)\n .attr('text-anchor', 'middle')\n .text(d => d.properties.name || d.id)\n\n return nodeEnter\n}\n\nfunction dragStarted(\n event: d3.D3DragEvent<SVGGElement, Node, any>,\n d: Node,\n simulation: d3.Simulation<Node, undefined>\n) {\n if (!event.active) simulation.alphaTarget(0.3).restart()\n d.fx = d.x\n d.fy = d.y\n}\n\nfunction dragged(event: d3.D3DragEvent<SVGGElement, Node, any>, d: Node) {\n d.fx = event.x\n d.fy = event.y\n}\n\nfunction dragEnded(event: d3.D3DragEvent<SVGGElement, Node, any>, d: Node, simulation: d3.Simulation<Node, undefined>) {\n if (!event.active) simulation.alphaTarget(0)\n d.fx = null\n d.fy = null\n}\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Relationship } from './graph-data';
|
1
|
+
import { Relationship } from './graph-data.js';
|
2
2
|
import * as d3 from 'd3';
|
3
3
|
export declare function appendRelationshipToGraph(svgRelationships: d3.Selection<SVGGElement, unknown, HTMLElement, any>, // 타입 지정
|
4
4
|
relationships: Relationship[], options: any): any;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"relationship.js","sourceRoot":"","sources":["../../client/analysis/relationship.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,yBAAyB,CACvC,gBAAsE,EAAE,QAAQ;AAChF,aAA6B,EAC7B,OAAY;IAEZ,MAAM,iBAAiB,GAAG,gBAAgB;SACvC,SAAS,CAA+B,eAAe,CAAC;SACxD,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC9B,KAAK,EAAE;SACP,MAAM,CAAC,MAAM,CAAC;SACd,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC;SAC7B,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC;SACvB,KAAK,CAAC,cAAc,EAAE,CAAC,CAAC,CAAA;IAE3B,OAAO,iBAAiB,CAAA;AAC1B,CAAC","sourcesContent":["import { Relationship } from './graph-data'\nimport * as d3 from 'd3'\n\nexport function appendRelationshipToGraph(\n svgRelationships: d3.Selection<SVGGElement, unknown, HTMLElement, any>, // 타입 지정\n relationships: Relationship[],\n options: any\n) {\n const relationshipEnter = svgRelationships\n .selectAll<SVGLineElement, Relationship>('.relationship')\n .data(relationships, d => d.id)\n .enter()\n .append('line')\n .attr('class', 'relationship')\n .style('stroke', '#aaa')\n .style('stroke-width', 2)\n\n return relationshipEnter\n}\n"]}
|
1
|
+
{"version":3,"file":"relationship.js","sourceRoot":"","sources":["../../client/analysis/relationship.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,yBAAyB,CACvC,gBAAsE,EAAE,QAAQ;AAChF,aAA6B,EAC7B,OAAY;IAEZ,MAAM,iBAAiB,GAAG,gBAAgB;SACvC,SAAS,CAA+B,eAAe,CAAC;SACxD,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC9B,KAAK,EAAE;SACP,MAAM,CAAC,MAAM,CAAC;SACd,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC;SAC7B,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC;SACvB,KAAK,CAAC,cAAc,EAAE,CAAC,CAAC,CAAA;IAE3B,OAAO,iBAAiB,CAAA;AAC1B,CAAC","sourcesContent":["import { Relationship } from './graph-data.js'\nimport * as d3 from 'd3'\n\nexport function appendRelationshipToGraph(\n svgRelationships: d3.Selection<SVGGElement, unknown, HTMLElement, any>, // 타입 지정\n relationships: Relationship[],\n options: any\n) {\n const relationshipEnter = svgRelationships\n .selectAll<SVGLineElement, Relationship>('.relationship')\n .data(relationships, d => d.id)\n .enter()\n .append('line')\n .attr('class', 'relationship')\n .style('stroke', '#aaa')\n .style('stroke-width', 2)\n\n return relationshipEnter\n}\n"]}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import './editors/entity-editor';
|
2
|
-
import './editors/property-editor';
|
1
|
+
import './editors/entity-editor.js';
|
2
|
+
import './editors/property-editor.js';
|
3
3
|
export default function bootstrap(): void;
|
package/dist-client/bootstrap.js
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
import './editors/entity-editor';
|
2
|
-
import './editors/property-editor';
|
1
|
+
import './editors/entity-editor.js';
|
2
|
+
import './editors/property-editor.js';
|
3
3
|
import { OxGristEditorJson } from '@operato/app/grist-editor/ox-grist-editor-json.js';
|
4
4
|
import { OxGristRendererCrontab } from '@operato/app/grist-editor/ox-grist-renderer-crontab.js';
|
5
5
|
import { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer } from '@operato/data-grist';
|
6
6
|
import { OxGristEditorCrontab } from '@operato/grist-editor/ox-grist-editor-crontab.js';
|
7
7
|
import { OxGristEditorParameters } from '@operato/grist-editor/ox-grist-editor-parameters.js';
|
8
8
|
import { OxPropertyEditor } from '@operato/property-editor';
|
9
|
-
import { ConnectionSelector } from './grist/connection-selector';
|
10
|
-
import { ConnectorSelector } from './grist/connector-selector';
|
11
|
-
import { TaskTypeSelector } from './grist/task-type-selector';
|
9
|
+
import { ConnectionSelector } from './grist/connection-selector.js';
|
10
|
+
import { ConnectorSelector } from './grist/connector-selector.js';
|
11
|
+
import { TaskTypeSelector } from './grist/task-type-selector.js';
|
12
12
|
export default function bootstrap() {
|
13
13
|
registerGristEditor('task-type', TaskTypeSelector);
|
14
14
|
registerGristEditor('connector', ConnectorSelector);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAA;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,wDAAwD,CAAA;AAC/F,OAAO,EACL,cAAc,IAAI,mBAAmB,EACrC,gBAAgB,IAAI,qBAAqB,EAE1C,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAA;AAEvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAA;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAEhE,MAAM,CAAC,OAAO,UAAU,SAAS;IAC/B,mBAAmB,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAA;IAClD,mBAAmB,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAA;IACnD,mBAAmB,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAA;IACrD,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;IAC9C,mBAAmB,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAA;IAC1D,mBAAmB,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAA;IAEpD,qBAAqB,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAAA;IAExD,gBAAgB,CAAC,QAAQ,CAAC;QACxB,cAAc,EAAE,8BAA8B;QAC9C,iBAAiB,EAAE,iCAAiC;QACpD,WAAW,EAAE,2BAA2B;QACxC,iBAAiB,EAAE,iCAAiC;QACpD,qBAAqB,EAAE,qCAAqC;QAC5D,eAAe,EAAE,+BAA+B;QAChD,sBAAsB,EAAE,sCAAsC;KAC/D,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import './editors/entity-editor.js'\nimport './editors/property-editor.js'\n\nimport { OxGristEditorJson } from '@operato/app/grist-editor/ox-grist-editor-json.js'\nimport { OxGristRendererCrontab } from '@operato/app/grist-editor/ox-grist-renderer-crontab.js'\nimport {\n registerEditor as registerGristEditor,\n registerRenderer as registerGristRenderer,\n OxGristRendererJson5\n} from '@operato/data-grist'\nimport { OxGristEditorCrontab } from '@operato/grist-editor/ox-grist-editor-crontab.js'\nimport { OxGristEditorPrivilege } from '@operato/app/grist-editor/ox-grist-editor-privilege.js'\nimport { OxGristEditorParameters } from '@operato/grist-editor/ox-grist-editor-parameters.js'\nimport { OxPropertyEditor } from '@operato/property-editor'\n\nimport { ConnectionSelector } from './grist/connection-selector.js'\nimport { ConnectorSelector } from './grist/connector-selector.js'\nimport { TaskTypeSelector } from './grist/task-type-selector.js'\n\nexport default function bootstrap() {\n registerGristEditor('task-type', TaskTypeSelector)\n registerGristEditor('connector', ConnectorSelector)\n registerGristEditor('connection', ConnectionSelector)\n registerGristEditor('json', OxGristEditorJson)\n registerGristEditor('parameters', OxGristEditorParameters)\n registerGristEditor('crontab', OxGristEditorCrontab)\n\n registerGristRenderer('crontab', OxGristRendererCrontab)\n\n OxPropertyEditor.register({\n 'http-headers': 'property-editor-http-headers',\n 'http-parameters': 'property-editor-http-parameters',\n 'http-body': 'property-editor-http-body',\n 'entity-selector': 'property-editor-entity-selector',\n 'scenario-step-input': 'property-editor-scenario-step-input',\n 'tag-scenarios': 'property-editor-tag-scenarios',\n 'procedure-parameters': 'property-editor-procedure-parameters'\n })\n}\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import './things-editor-entity-selector';
|
1
|
+
import './things-editor-entity-selector.js';
|
2
2
|
import { OxPropertyEditor } from '@operato/property-editor';
|
3
3
|
export declare class PropertyEditorEntitySelector extends OxPropertyEditor {
|
4
4
|
static get styles(): import("lit").CSSResult[];
|
@@ -2,10 +2,10 @@
|
|
2
2
|
* Copyright © HatioLab Inc. All rights reserved.
|
3
3
|
*/
|
4
4
|
import { __decorate } from "tslib";
|
5
|
-
import './things-editor-entity-selector';
|
5
|
+
import './things-editor-entity-selector.js';
|
6
6
|
import { html } from 'lit';
|
7
7
|
import { customElement } from 'lit/decorators.js';
|
8
|
-
import cloneDeep from 'lodash-es/cloneDeep';
|
8
|
+
import cloneDeep from 'lodash-es/cloneDeep.js';
|
9
9
|
import { OxPropertyEditor } from '@operato/property-editor';
|
10
10
|
let PropertyEditorEntitySelector = class PropertyEditorEntitySelector extends OxPropertyEditor {
|
11
11
|
static get styles() {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"entity-editor.js","sourceRoot":"","sources":["../../client/editors/entity-editor.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,
|
1
|
+
{"version":3,"file":"entity-editor.js","sourceRoot":"","sources":["../../client/editors/entity-editor.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,oCAAoC,CAAA;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,SAAS,MAAM,wBAAwB,CAAA;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAGpD,IAAM,4BAA4B,GAAlC,MAAM,4BAA6B,SAAQ,gBAAgB;IAChE,MAAM,KAAK,MAAM;QACf,OAAO,CAAC,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACrC,CAAC;IAED,cAAc,CAAC,KAAK,EAAE,IAAI;QACxB,OAAO,IAAI,CAAA;;;iBAGE,KAAK;sBACA,IAAI,CAAC,QAAQ;;KAE9B,CAAA;IACH,CAAC;IAED,YAAY,CAAC,iBAAiB;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;IAED,IAAI,aAAa;QACf,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,eAAe,CAAC,KAAK;QACnB,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;YAAE,OAAO,KAAK,CAAA;QAE9C,OAAO,QAAQ,GAAG,KAAK,CAAA;IACzB,CAAC;IAED,aAAa,CAAC,CAAC;;QACb,CAAC,CAAC,eAAe,EAAE,CAAA;QAEnB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAA;QAEpD,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;QAEhF,MAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;IACtC,CAAC;CACF,CAAA;AAtCY,4BAA4B;IADxC,aAAa,CAAC,iCAAiC,CAAC;GACpC,4BAA4B,CAsCxC","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport './things-editor-entity-selector.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport cloneDeep from 'lodash-es/cloneDeep.js'\n\nimport { OxPropertyEditor } from '@operato/property-editor'\n\n@customElement('property-editor-entity-selector')\nexport class PropertyEditorEntitySelector extends OxPropertyEditor {\n static get styles() {\n return [...OxPropertyEditor.styles]\n }\n\n editorTemplate(value, spec) {\n return html`\n <things-editor-entity-selector\n id=\"editor\"\n .value=${value}\n .properties=${spec.property}\n ></things-editor-entity-selector>\n `\n }\n\n shouldUpdate(changedProperties) {\n return true\n }\n\n get valueProperty() {\n return 'value'\n }\n\n _computeLabelId(label) {\n if (label.indexOf('label.') >= 0) return label\n\n return 'label.' + label\n }\n\n _valueChanged(e) {\n e.stopPropagation()\n\n this.value = cloneDeep(e.target[this.valueProperty])\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n\n this.observe?.call(this, this.value)\n }\n}\n"]}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import './things-editor-http-headers';
|
2
|
-
import './things-editor-http-parameters';
|
3
|
-
import './things-editor-http-body';
|
4
|
-
import './things-editor-db-procedure';
|
5
|
-
import './things-editor-tag-scenarios';
|
1
|
+
import './things-editor-http-headers.js';
|
2
|
+
import './things-editor-http-parameters.js';
|
3
|
+
import './things-editor-http-body.js';
|
4
|
+
import './things-editor-db-procedure.js';
|
5
|
+
import './things-editor-tag-scenarios.js';
|
6
6
|
import { OxPropertyEditor } from '@operato/property-editor';
|
7
7
|
export declare class PropertyEditorScenarioStepInput extends OxPropertyEditor {
|
8
8
|
static get styles(): import("lit").CSSResult[];
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/*
|
2
2
|
* Copyright © HatioLab Inc. All rights reserved.
|
3
3
|
*/
|
4
|
-
import './things-editor-http-headers';
|
5
|
-
import './things-editor-http-parameters';
|
6
|
-
import './things-editor-http-body';
|
7
|
-
import './things-editor-db-procedure';
|
8
|
-
import './things-editor-tag-scenarios';
|
4
|
+
import './things-editor-http-headers.js';
|
5
|
+
import './things-editor-http-parameters.js';
|
6
|
+
import './things-editor-http-body.js';
|
7
|
+
import './things-editor-db-procedure.js';
|
8
|
+
import './things-editor-tag-scenarios.js';
|
9
9
|
import { html } from 'lit';
|
10
10
|
import { OxPropertyEditor } from '@operato/property-editor';
|
11
11
|
export class PropertyEditorScenarioStepInput extends OxPropertyEditor {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"property-editor.js","sourceRoot":"","sources":["../../client/editors/property-editor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,
|
1
|
+
{"version":3,"file":"property-editor.js","sourceRoot":"","sources":["../../client/editors/property-editor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,iCAAiC,CAAA;AACxC,OAAO,oCAAoC,CAAA;AAC3C,OAAO,8BAA8B,CAAA;AACrC,OAAO,iCAAiC,CAAA;AACxC,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAE1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAE3D,MAAM,OAAO,+BAAgC,SAAQ,gBAAgB;IACnE,MAAM,KAAK,MAAM;QACf,OAAO,CAAC,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACrC,CAAC;IAED,cAAc,CAAC,KA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,OAAO,CAAC,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACrC,CAAC;IAED,cAAc,CAAC,KAAK,EAAE,IAAI;QACxB,2EAA2E;QAC3E,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;QAC5C,MAAM,KAAK,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,KAAI,EAAE,CAAA;QAExG,OAAO,IAAI,CAAA;;;iBAGE,KAAK;sBACA,IAAI,CAAC,QAAQ;iBAClB,KAAK;;;KAGjB,CAAA;IACH,CAAC;CACF;AAED,cAAc,CAAC,MAAM,CAAC,+BAA+B,EAAE,0BAA0B,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport './things-editor-http-headers.js'\nimport './things-editor-http-parameters.js'\nimport './things-editor-http-body.js'\nimport './things-editor-db-procedure.js'\nimport './things-editor-tag-scenarios.js'\n\nimport { html } from 'lit'\n\nimport { OxPropertyEditor } from '@operato/property-editor'\n\nexport class PropertyEditorScenarioStepInput extends OxPropertyEditor {\n static get styles() {\n return [...OxPropertyEditor.styles]\n }\n\n editorTemplate(value, spec) {\n /* context must be a datagrid(grist) instance, and host must be a record */\n const { context: grid, host: record } = spec\n const steps = grid?.dirtyData.records.filter(rec => rec.name !== record.name).map(rec => rec.name) || []\n\n return html`\n <input id=\"editor\" .value=${value || ''} list=\"step-list\" />\n <datalist id=\"step-list\">${steps.map(id => html` <option value=${id}></option> `)}</datalist>\n `\n }\n}\n\ncustomElements.define('property-editor-scenario-step-input', PropertyEditorScenarioStepInput)\n\nexport class PropertyEditorHttpHeaders extends OxPropertyEditor {\n static get styles() {\n return [...OxPropertyEditor.styles]\n }\n\n editorTemplate(value, spec) {\n return html`\n <things-editor-http-headers id=\"editor\" .value=${value} .properties=${spec.property}></things-editor-http-headers>\n `\n }\n}\n\ncustomElements.define('property-editor-http-headers', PropertyEditorHttpHeaders)\n\nexport class PropertyEditorHttpParameters extends OxPropertyEditor {\n static get styles() {\n return [...OxPropertyEditor.styles]\n }\n\n editorTemplate(value, spec) {\n return html`\n <things-editor-http-parameters\n id=\"editor\"\n .value=${value}\n .properties=${spec.property}\n ></things-editor-http-parameters>\n `\n }\n}\n\ncustomElements.define('property-editor-http-parameters', PropertyEditorHttpParameters)\n\nexport class PropertyEditorHttpBody extends OxPropertyEditor {\n static get styles() {\n return [...OxPropertyEditor.styles]\n }\n\n editorTemplate(value, spec) {\n return html`\n <things-editor-http-body id=\"editor\" .value=${value} .properties=${spec.property}></things-editor-http-body>\n `\n }\n}\n\ncustomElements.define('property-editor-http-body', PropertyEditorHttpBody)\n\nexport class PropertyEditorProcedureParameters extends OxPropertyEditor {\n static get styles() {\n return [...OxPropertyEditor.styles]\n }\n\n editorTemplate(value, spec) {\n /* context must be a datagrid(grist) instance, and host must be a record */\n const { context: grid, host: record } = spec\n const { dbtype = 'oracle' } = spec.property || {}\n\n const steps = grid?.dirtyData.records.filter(rec => rec.name !== record.name).map(rec => rec.name) || []\n\n return html`\n <things-editor-db-procedure\n id=\"editor\"\n .value=${value}\n .properties=${spec.property}\n .steps=${steps}\n .dbtype=${dbtype}\n fullwidth\n ></things-editor-db-procedure>\n `\n }\n}\n\ncustomElements.define('property-editor-procedure-parameters', PropertyEditorProcedureParameters)\n\nexport class PropertyEditorTagScenarios extends OxPropertyEditor {\n static get styles() {\n return [...OxPropertyEditor.styles]\n }\n\n editorTemplate(value, spec) {\n /* context must be a datagrid(grist) instance, and host must be a record */\n const { context: grid, host: record } = spec\n const steps = grid?.dirtyData.records.filter(rec => rec.name !== record.name).map(rec => rec.name) || []\n\n return html`\n <things-editor-tag-scenarios\n id=\"editor\"\n .value=${value}\n .properties=${spec.property}\n .steps=${steps}\n fullwidth\n ></things-editor-tag-scenarios>\n `\n }\n}\n\ncustomElements.define('property-editor-tag-scenarios', PropertyEditorTagScenarios)\n"]}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
3
|
*/
|
4
4
|
import '@material/web/icon/icon.js';
|
5
|
-
import './entity-selector';
|
5
|
+
import './entity-selector.js';
|
6
6
|
import { LitElement } from 'lit';
|
7
7
|
export default class ThingsEditorEntitySelector extends LitElement {
|
8
8
|
static styles: import("lit").CSSResult[];
|