@fmsim/board 1.0.34 → 1.0.38
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/.storybook/main.ts +58 -0
- package/.storybook/preview.ts +15 -0
- package/custom-elements.json +1499 -421
- package/dist/src/component/index.d.ts +3 -1
- package/dist/src/component/index.js +3 -1
- package/dist/src/component/index.js.map +1 -1
- package/dist/src/component/restful-attachment-creation-card.d.ts +18 -0
- package/dist/src/component/restful-attachment-creation-card.js +264 -0
- package/dist/src/component/restful-attachment-creation-card.js.map +1 -0
- package/dist/src/component/restful-attachment-selector.d.ts +36 -0
- package/dist/src/component/restful-attachment-selector.js +663 -0
- package/dist/src/component/restful-attachment-selector.js.map +1 -0
- package/dist/src/component/restful-file-selector.d.ts +14 -0
- package/dist/src/component/restful-file-selector.js +181 -0
- package/dist/src/component/restful-file-selector.js.map +1 -0
- package/dist/src/component/restful-input-attachment-selector.d.ts +16 -0
- package/dist/src/component/restful-input-attachment-selector.js +110 -0
- package/dist/src/component/restful-input-attachment-selector.js.map +1 -0
- package/dist/src/component/restful-input-fill-style.d.ts +45 -0
- package/dist/src/component/restful-input-fill-style.js +344 -0
- package/dist/src/component/restful-input-fill-style.js.map +1 -0
- package/dist/src/component/restrul-input-background-pattern.d.ts +35 -0
- package/dist/src/component/restrul-input-background-pattern.js +183 -0
- package/dist/src/component/restrul-input-background-pattern.js.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/layers/movement-layer.d.ts +1 -0
- package/dist/src/layers/movement-layer.js +3 -0
- package/dist/src/layers/movement-layer.js.map +1 -1
- package/dist/src/modeller/property-sidebar/styles/styles.d.ts +1 -0
- package/dist/src/modeller/property-sidebar/styles/styles.js +5 -1
- package/dist/src/modeller/property-sidebar/styles/styles.js.map +1 -1
- package/dist/stories/restful-attachment-selector.stories.d.ts +30 -0
- package/dist/stories/restful-attachment-selector.stories.js +104 -0
- package/dist/stories/restful-attachment-selector.stories.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/icons/attachment/btn-copy-link-hover.svg +4 -0
- package/icons/attachment/btn-copy-link.svg +4 -0
- package/icons/attachment/btn-delete-hover.svg +4 -0
- package/icons/attachment/btn-delete.svg +4 -0
- package/icons/attachment/btn-download-hover.svg +4 -0
- package/icons/attachment/btn-download.svg +4 -0
- package/icons/attachment/btn-zoom-hover.svg +4 -0
- package/icons/attachment/btn-zoom.svg +4 -0
- package/icons/attachment/file.svg +3 -0
- package/icons/board/btn-add-board.svg +5 -0
- package/icons/board/btn-add-list.svg +5 -0
- package/icons/board/btn-close-dropbox.svg +3 -0
- package/icons/board/btn-edit-hover.svg +4 -0
- package/icons/board/btn-edit.svg +4 -0
- package/icons/board/btn-favorite-hover-on.svg +4 -0
- package/icons/board/btn-favorite-hover.svg +4 -0
- package/icons/board/btn-favorite-on.svg +4 -0
- package/icons/board/btn-favorite.svg +4 -0
- package/icons/board/btn-info-hover.svg +3 -0
- package/icons/board/btn-info.svg +3 -0
- package/icons/board/btn-open-dropbox.svg +3 -0
- package/icons/board/btn-users.svg +4 -0
- package/icons/board/favorite_black.svg +1 -0
- package/icons/group-bar/btn-add-list.png +0 -0
- package/icons/group-bar/btn-close-dropbox.png +0 -0
- package/icons/group-bar/btn-edit.png +0 -0
- package/icons/group-bar/btn-open-dropbox-color.png +0 -0
- package/icons/group-bar/btn-search-name.png +0 -0
- package/package.json +12 -8
- package/stories/restful-attachment-selector.stories.ts +113 -0
- package/.storybook/main.js +0 -3
- package/dist/stories/index.stories.d.ts +0 -33
- package/dist/stories/index.stories.js +0 -33
- package/dist/stories/index.stories.js.map +0 -1
- package/stories/index.stories.ts +0 -52
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"movement-layer.js","sourceRoot":"","sources":["../../../src/layers/movement-layer.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,uBAAuB,CAAA;AAC/C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@hatiolab/things-scene'\n\nconst MOVEMENT_STYLES: { [key: string]: string[] } = {\n NORMAL /* NORMAL_TRANSPORT*/: ['#00B05033', '#00B050'],\n DELAY /* DELAYED_TRANSPORT*/: ['#FF000033', '#FF0000'],\n ALTER /* ALTER_TRANSPORT*/: ['#76717133', '#767171'],\n WARN /* WARN_TRANSPORT*/: ['#AAAA0033', '#AAAA00']\n}\n\nexport type PathType = 'COMMAND' | 'JOB'\n\nexport type PathStatus = 'NORMAL' | 'DELAY' | 'ALTER' | 'WARN'\n\nexport type TipType = 'none' | 'arrow' | 'open-arrow' | 'sharp-arrow' | 'diamond' | 'oval'\n\nexport type TipSize = 'size1' | 'size2' | 'size3' | 'size4' | 'size5' | 'size6' | 'size7' | 'size8' | 'size9'\n\nexport type LineDash =\n | 'solid'\n | 'round-dot'\n | 'square-dot'\n | 'dash'\n | 'dash-dot'\n | 'long-dash'\n | 'long-dash-dot'\n | 'long-dash-dot-dot'\n\nexport type Point = {\n x: number\n y: number\n}\n\nexport type Path = Point[]\n\nexport type PathStyles = {\n strokeStyle?: string | string[]\n alpha?: number\n lineWidth?: number\n lineDash?: LineDash\n lineCap?: CanvasLineCap\n lineJoin?: CanvasLineJoin\n begin?: TipType\n beginSize?: TipSize\n end?: TipType\n endSize?: TipSize\n}\n\nexport type PATH = {\n srcMachine: string\n srcZone: string\n srcUnit: string\n dstMachine: string\n dstZone: string\n dstUnit: string\n pathType: PathType\n status: PathStatus\n transportCnt: number\n label: string\n styles?: PathStyles\n}\n\nexport type MOVEMENT = PATH[]\n\nconst WING_FACTOR = Math.sqrt(3)\nconst LINEWIDTH = 2\n\nexport default class MovementLayer extends Layer {\n drawInstructionHandler = (e: Event) => {\n this.data = (e as CustomEvent).detail\n }\n clickComponentHandler = (e: Event) => {\n const component = (e as CustomEvent).detail\n const { type } = component.state\n\n if (type == 'model-layer') {\n this.data = [] /* clear */\n return\n }\n }\n\n ready() {\n const handler = (e: Event) => {\n this.data = (e as CustomEvent).detail\n }\n\n this.drawInstructionHandler = handler.bind(this)\n window.addEventListener('drawInstruction', this.drawInstructionHandler)\n window.addEventListener('clickComponent', this.clickComponentHandler)\n }\n\n dispose() {\n window.removeEventListener('drawInstruction', this.drawInstructionHandler)\n window.removeEventListener('clickComponent', this.clickComponentHandler)\n\n super.dispose && super.dispose()\n }\n\n get capturable() {\n return false\n }\n\n drawArrow(\n ctx: CanvasRenderingContext2D,\n p1: POINT,\n p2: POINT,\n pathType: PathType,\n pathStatus: PathStatus,\n label: string,\n styles?: PathStyles\n ) {\n var { begin = 'none', end = 'arrow', lineWidth = LINEWIDTH, strokeStyle } = styles || {}\n\n if (strokeStyle && !Array.isArray(strokeStyle)) {\n ctx.strokeStyle = strokeStyle\n ctx.fillStyle = strokeStyle\n } else {\n const gradient = ctx.createLinearGradient(p1.x, p1.y, p2.x, p2.y)\n ;((strokeStyle as string[]) || MOVEMENT_STYLES[pathStatus] || []).forEach((color, idx) =>\n gradient.addColorStop(idx, color)\n )\n\n ctx.strokeStyle = gradient\n ctx.fillStyle = gradient\n }\n\n drawEndTips(ctx, [p1, p2], styles)\n ctx.stroke()\n ctx.fill()\n\n ctx.beginPath()\n\n var beginPos = getTipNeckPos(begin, lineWidth, p1, p2)\n var endPos = getTipNeckPos(end, lineWidth, p2, p1)\n\n ctx.moveTo(beginPos.x, beginPos.y)\n ctx.lineTo(endPos.x, endPos.y)\n\n stroke(ctx, {\n lineDash: pathType == 'COMMAND' ? 'dash' : 'solid',\n ...styles\n })\n\n ctx.beginPath()\n ctx.setLineDash([]) // reset line dash\n\n if (label) {\n const fontSize = 14\n const fontFamily = 'Arial'\n\n ctx.font = `bold ${fontSize}px ${fontFamily}`\n\n const textWidth = ctx.measureText(label).width\n\n const [x, y] = [(p1.x + p2.x) / 2 - textWidth / 2, (p1.y + p2.y) / 2]\n ctx.fillRect(x - 3, y - fontSize / 2 - 2, textWidth + 6, fontSize + 4)\n\n ctx.fillStyle = 'white'\n ctx.fillText(label, x, y + fontSize / 2 - 1)\n }\n }\n\n findSourceAndTarget(path: PATH): [Component?, Component?] {\n const root = this.root\n var src, dest\n\n for (const name of [path.srcUnit, path.srcZone, path.srcMachine].filter(Boolean)) {\n src = root.findById(name)\n if (src) {\n break\n }\n }\n\n for (const name of [path.dstUnit, path.dstZone, path.dstMachine].filter(Boolean)) {\n dest = root.findById(name)\n if (dest) {\n break\n }\n }\n\n return [src, dest]\n }\n\n render(ctx: CanvasRenderingContext2D) {\n const root = this.root\n const movement = (this.data instanceof Array && (this.data as MOVEMENT)) || []\n\n ctx.save()\n\n movement.forEach(path => {\n const [src, dest] = this.findSourceAndTarget(path)\n if (!src || !dest) {\n return\n }\n\n const [srcCenter, destCenter] = [src.center, dest.center]\n const [srcPos, destPos] = [\n src.transcoordS2C(srcCenter.x, srcCenter.y, root),\n dest.transcoordS2C(destCenter.x, destCenter.y, root)\n ]\n\n ctx.beginPath()\n\n this.drawArrow(\n ctx,\n srcPos,\n destPos,\n path.pathType,\n path.status,\n path.label || (Number(path.transportCnt || 0) > 1 ? String(path.transportCnt) : ''),\n path.styles\n )\n\n ctx.stroke()\n })\n\n ctx.restore()\n }\n\n get eventMap() {\n return {\n 'model-layer': {\n '(self)': {\n change: this.onchangeModelLayer\n }\n }\n }\n }\n\n onchangeModelLayer(after: any, before: any, hint: any) {\n if (after.scale || after.translate) {\n this.invalidate()\n }\n }\n\n onchangeData(after: Properties, before: Properties): void {\n this.invalidate()\n }\n}\n\nComponent.register('movement-layer', MovementLayer)\n\nfunction getTipNeckPos(tipType: TipType, lineWidth: number, p1: Point, p2: Point) {\n if (tipType.slice(-5) != 'arrow') return p1\n\n var { x, y } = p1\n var theta = Math.atan2(p2.y - p1.y, p2.x - p1.x)\n var diff = lineWidth * 1.5\n\n return {\n x: p1.x + Math.cos(theta) * diff,\n y: p1.y + Math.sin(theta) * diff\n }\n}\n\nfunction drawEndTips(ctx: CanvasRenderingContext2D, path: Path, style?: PathStyles) {\n var {\n lineWidth = LINEWIDTH,\n lineCap,\n alpha = 1,\n begin = 'none',\n end = 'arrow',\n beginSize = 'size2',\n endSize = 'size2'\n } = style || {}\n\n if (begin != 'none' || end != 'none') {\n lineWidth = Number(lineWidth) || LINEWIDTH\n\n if (!isUndefined(lineCap)) ctx.lineCap = lineCap\n if (!isUndefined(lineWidth)) ctx.lineWidth = lineWidth\n if (!isUndefined(alpha)) ctx.globalAlpha *= alpha\n\n // 선 그리기.\n if (begin != 'none') drawTip(ctx, path[0], path[1], lineWidth, begin, tipSize(beginSize, lineWidth))\n if (end != 'none') {\n let length = path.length\n drawTip(ctx, path[length - 1], path[length - 2], lineWidth, end, tipSize(endSize, lineWidth))\n }\n }\n}\n\nfunction drawTip(\n ctx: CanvasRenderingContext2D,\n p1: Point,\n p2: Point,\n lineWidth: number,\n type: TipType,\n size: { X: number; Y: number }\n) {\n var { x, y } = p1\n var theta = Math.atan2(p2.y - y, p2.x - x)\n\n ctx.beginPath()\n\n ctx.translate(x, y)\n ctx.rotate(theta)\n\n switch (type) {\n case 'oval':\n ctx.ellipse(0, 0, size.X, size.Y, 0, 0, 2 * Math.PI)\n ctx.fill()\n // ctx.scale(1, 1 / arc_scale_y)\n break\n case 'diamond':\n ctx.moveTo(-size.X, 0)\n ctx.lineTo(0, -size.Y)\n ctx.lineTo(size.X, 0)\n ctx.lineTo(0, size.Y)\n ctx.fill()\n break\n case 'arrow':\n ctx.moveTo(0, 0)\n ctx.lineTo(WING_FACTOR * size.X, -size.Y)\n ctx.lineTo(WING_FACTOR * size.X, size.Y)\n ctx.fill()\n break\n case 'sharp-arrow':\n ctx.moveTo(0, 0)\n ctx.lineTo(WING_FACTOR * size.X, -size.Y)\n ctx.lineTo(-size.X / 1.5 + WING_FACTOR * size.X, 0)\n ctx.lineTo(WING_FACTOR * size.X, size.Y)\n ctx.fill()\n break\n case 'open-arrow':\n ctx.moveTo(WING_FACTOR * size.X + lineWidth, -size.Y)\n ctx.lineTo(lineWidth, 0)\n ctx.lineTo(WING_FACTOR * size.X + lineWidth, size.Y)\n ctx.stroke()\n break\n default:\n break\n }\n\n ctx.rotate(-theta)\n ctx.translate(-x, -y)\n\n ctx.closePath()\n}\n\nfunction tipSize(size: TipSize, lineWidth: number) {\n let length: { X: number; Y: number } = { X: lineWidth * 1.5, Y: lineWidth * 1.5 }\n lineWidth = lineWidth * 1.2\n\n switch (size) {\n case 'size1':\n length.X = lineWidth\n length.Y = lineWidth\n break\n case 'size2':\n length.X = lineWidth * 1.5\n length.Y = lineWidth\n break\n case 'size3':\n length.X = lineWidth * 2\n length.Y = lineWidth\n break\n case 'size4':\n length.X = lineWidth\n length.Y = lineWidth * 1.5\n break\n case 'size5':\n length.X = lineWidth * 1.5\n length.Y = lineWidth * 1.5\n break\n case 'size6':\n length.X = lineWidth * 2\n length.Y = lineWidth * 1.5\n break\n case 'size7':\n length.X = lineWidth\n length.Y = lineWidth * 2\n break\n case 'size8':\n length.X = lineWidth * 1.5\n length.Y = lineWidth * 2\n break\n case 'size9':\n length.X = lineWidth * 2\n length.Y = lineWidth * 2\n break\n default:\n length.X = lineWidth * 1.5\n length.Y = lineWidth * 1.5\n break\n }\n return length\n}\n\nfunction stroke(ctx: CanvasRenderingContext2D, styles?: PathStyles) {\n var { lineDash: lineDashType = 'solid', lineWidth = 2, lineCap, lineJoin, alpha } = styles || {}\n\n if (lineCap) ctx.lineCap = lineCap\n\n let lineDash = [0, 0]\n\n if (lineDash) {\n var isRound = lineCap == 'round'\n\n switch (lineDashType) {\n case 'solid':\n lineDash = [0, 0]\n break\n case 'round-dot':\n if (isRound) lineDash = [0, lineWidth * 2]\n else lineDash = [lineWidth, lineWidth]\n break\n case 'square-dot':\n if (isRound) lineDash = [lineWidth, lineWidth * 2]\n else lineDash = [lineWidth * 2, lineWidth]\n break\n case 'dash':\n if (isRound) lineDash = [lineWidth * 3, lineWidth * 2.5]\n else lineDash = [lineWidth * 4, lineWidth * 1.5]\n break\n case 'dash-dot':\n if (isRound) lineDash = [lineWidth * 3, lineWidth * 3, 0, lineWidth * 3]\n else lineDash = [lineWidth * 4, lineWidth * 2, lineWidth, lineWidth * 2]\n break\n case 'long-dash':\n if (isRound) lineDash = [lineWidth * 5, lineWidth * 4]\n else lineDash = [lineWidth * 6, lineWidth * 3]\n break\n case 'long-dash-dot':\n if (isRound) lineDash = [lineWidth * 5, lineWidth * 3, 0, lineWidth * 3]\n else lineDash = [lineWidth * 6, lineWidth * 2, lineWidth, lineWidth * 2]\n break\n case 'long-dash-dot-dot':\n if (isRound) lineDash = [lineWidth * 5, lineWidth * 2, 0, lineWidth * 2, 0, lineWidth * 2]\n else lineDash = [lineWidth * 6, lineWidth, lineWidth, lineWidth, lineWidth, lineWidth]\n break\n }\n ctx.setLineDash(lineDash)\n }\n\n if (!isUndefined(alpha)) ctx.globalAlpha *= alpha\n if (!isUndefined(lineJoin)) ctx.lineJoin = lineJoin\n\n ctx.stroke()\n}\n"]}
|
|
1
|
+
{"version":3,"file":"movement-layer.js","sourceRoot":"","sources":["../../../src/layers/movement-layer.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAqB,MAAM,wBAAwB,CAAA;AAE5E,MAAM,eAAe,GAAgC;IACnD,MAAM,CAAC,qBAAqB,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC;IACtD,KAAK,CAAC,sBAAsB,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC;IACtD,KAAK,CAAC,oBAAoB,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC;IACpD,IAAI,CAAC,mBAAmB,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC;CACnD,CAAA;AAwDD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AAChC,MAAM,SAAS,GAAG,CAAC,CAAA;AAEnB,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,KAAK;IAAhD;;QACE,2BAAsB,GAAG,CAAC,CAAQ,EAAE,EAA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SAAS,EAAE,SAAS,GAAG,CAAC,CAAC,CAAA;gBACxE,MAAK;YACP,KAAK,mBAAmB;gBACtB,IAAI,OAAO;oBAAE,QAAQ,GAAG,CAAC,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC,EAAE,CAAC,EAAE,SAAS,GAAG,CAAC,EAAE,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,CAAA;;oBACrF,QAAQ,GAAG,CAAC,SAAS,GAAG,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAA;gBACtF,MAAK;QACT,CAAC;QACD,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;IAC3B,CAAC;IAED,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;QAAE,GAAG,CAAC,WAAW,IAAI,KAAK,CAAA;IACjD,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC;QAAE,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAEnD,GAAG,CAAC,MAAM,EAAE,CAAA;AACd,CAAC","sourcesContent":["import isUndefined from 'lodash-es/isUndefined'\nimport { Component, Layer, POINT, Properties } from '@hatiolab/things-scene'\n\nconst MOVEMENT_STYLES: { [key: string]: string[] } = {\n NORMAL /* NORMAL_TRANSPORT*/: ['#00B05033', '#00B050'],\n DELAY /* DELAYED_TRANSPORT*/: ['#FF000033', '#FF0000'],\n ALTER /* ALTER_TRANSPORT*/: ['#76717133', '#767171'],\n WARN /* WARN_TRANSPORT*/: ['#AAAA0033', '#AAAA00']\n}\n\nexport type PathType = 'COMMAND' | 'JOB'\n\nexport type PathStatus = 'NORMAL' | 'DELAY' | 'ALTER' | 'WARN'\n\nexport type TipType = 'none' | 'arrow' | 'open-arrow' | 'sharp-arrow' | 'diamond' | 'oval'\n\nexport type TipSize = 'size1' | 'size2' | 'size3' | 'size4' | 'size5' | 'size6' | 'size7' | 'size8' | 'size9'\n\nexport type LineDash =\n | 'solid'\n | 'round-dot'\n | 'square-dot'\n | 'dash'\n | 'dash-dot'\n | 'long-dash'\n | 'long-dash-dot'\n | 'long-dash-dot-dot'\n\nexport type Point = {\n x: number\n y: number\n}\n\nexport type Path = Point[]\n\nexport type PathStyles = {\n strokeStyle?: string | string[]\n alpha?: number\n lineWidth?: number\n lineDash?: LineDash\n lineCap?: CanvasLineCap\n lineJoin?: CanvasLineJoin\n begin?: TipType\n beginSize?: TipSize\n end?: TipType\n endSize?: TipSize\n}\n\nexport type PATH = {\n srcMachine: string\n srcZone: string\n srcUnit: string\n dstMachine: string\n dstZone: string\n dstUnit: string\n pathType: PathType\n status: PathStatus\n transportCnt: number\n label: string\n styles?: PathStyles\n}\n\nexport type MOVEMENT = PATH[]\n\nconst WING_FACTOR = Math.sqrt(3)\nconst LINEWIDTH = 2\n\nexport default class MovementLayer extends Layer {\n drawInstructionHandler = (e: Event) => {\n this.data = (e as CustomEvent).detail\n }\n clickComponentHandler = (e: Event) => {\n const component = (e as CustomEvent).detail\n const { type } = component.state\n\n if (type == 'model-layer') {\n this.data = [] /* clear */\n return\n }\n }\n\n ready() {\n const handler = (e: Event) => {\n this.data = (e as CustomEvent).detail\n }\n\n this.drawInstructionHandler = handler.bind(this)\n window.addEventListener('drawInstruction', this.drawInstructionHandler)\n window.addEventListener('clickComponent', this.clickComponentHandler)\n }\n\n dispose() {\n window.removeEventListener('drawInstruction', this.drawInstructionHandler)\n window.removeEventListener('clickComponent', this.clickComponentHandler)\n\n super.dispose && super.dispose()\n }\n\n get pointerEvents() {\n return 'none'\n }\n\n get capturable() {\n return false\n }\n\n drawArrow(\n ctx: CanvasRenderingContext2D,\n p1: POINT,\n p2: POINT,\n pathType: PathType,\n pathStatus: PathStatus,\n label: string,\n styles?: PathStyles\n ) {\n var { begin = 'none', end = 'arrow', lineWidth = LINEWIDTH, strokeStyle } = styles || {}\n\n if (strokeStyle && !Array.isArray(strokeStyle)) {\n ctx.strokeStyle = strokeStyle\n ctx.fillStyle = strokeStyle\n } else {\n const gradient = ctx.createLinearGradient(p1.x, p1.y, p2.x, p2.y)\n ;((strokeStyle as string[]) || MOVEMENT_STYLES[pathStatus] || []).forEach((color, idx) =>\n gradient.addColorStop(idx, color)\n )\n\n ctx.strokeStyle = gradient\n ctx.fillStyle = gradient\n }\n\n drawEndTips(ctx, [p1, p2], styles)\n ctx.stroke()\n ctx.fill()\n\n ctx.beginPath()\n\n var beginPos = getTipNeckPos(begin, lineWidth, p1, p2)\n var endPos = getTipNeckPos(end, lineWidth, p2, p1)\n\n ctx.moveTo(beginPos.x, beginPos.y)\n ctx.lineTo(endPos.x, endPos.y)\n\n stroke(ctx, {\n lineDash: pathType == 'COMMAND' ? 'dash' : 'solid',\n ...styles\n })\n\n ctx.beginPath()\n ctx.setLineDash([]) // reset line dash\n\n if (label) {\n const fontSize = 14\n const fontFamily = 'Arial'\n\n ctx.font = `bold ${fontSize}px ${fontFamily}`\n\n const textWidth = ctx.measureText(label).width\n\n const [x, y] = [(p1.x + p2.x) / 2 - textWidth / 2, (p1.y + p2.y) / 2]\n ctx.fillRect(x - 3, y - fontSize / 2 - 2, textWidth + 6, fontSize + 4)\n\n ctx.fillStyle = 'white'\n ctx.fillText(label, x, y + fontSize / 2 - 1)\n }\n }\n\n findSourceAndTarget(path: PATH): [Component?, Component?] {\n const root = this.root\n var src, dest\n\n for (const name of [path.srcUnit, path.srcZone, path.srcMachine].filter(Boolean)) {\n src = root.findById(name)\n if (src) {\n break\n }\n }\n\n for (const name of [path.dstUnit, path.dstZone, path.dstMachine].filter(Boolean)) {\n dest = root.findById(name)\n if (dest) {\n break\n }\n }\n\n return [src, dest]\n }\n\n render(ctx: CanvasRenderingContext2D) {\n const root = this.root\n const movement = (this.data instanceof Array && (this.data as MOVEMENT)) || []\n\n ctx.save()\n\n movement.forEach(path => {\n const [src, dest] = this.findSourceAndTarget(path)\n if (!src || !dest) {\n return\n }\n\n const [srcCenter, destCenter] = [src.center, dest.center]\n const [srcPos, destPos] = [\n src.transcoordS2C(srcCenter.x, srcCenter.y, root),\n dest.transcoordS2C(destCenter.x, destCenter.y, root)\n ]\n\n ctx.beginPath()\n\n this.drawArrow(\n ctx,\n srcPos,\n destPos,\n path.pathType,\n path.status,\n path.label || (Number(path.transportCnt || 0) > 1 ? String(path.transportCnt) : ''),\n path.styles\n )\n\n ctx.stroke()\n })\n\n ctx.restore()\n }\n\n get eventMap() {\n return {\n 'model-layer': {\n '(self)': {\n change: this.onchangeModelLayer\n }\n }\n }\n }\n\n onchangeModelLayer(after: any, before: any, hint: any) {\n if (after.scale || after.translate) {\n this.invalidate()\n }\n }\n\n onchangeData(after: Properties, before: Properties): void {\n this.invalidate()\n }\n}\n\nComponent.register('movement-layer', MovementLayer)\n\nfunction getTipNeckPos(tipType: TipType, lineWidth: number, p1: Point, p2: Point) {\n if (tipType.slice(-5) != 'arrow') return p1\n\n var { x, y } = p1\n var theta = Math.atan2(p2.y - p1.y, p2.x - p1.x)\n var diff = lineWidth * 1.5\n\n return {\n x: p1.x + Math.cos(theta) * diff,\n y: p1.y + Math.sin(theta) * diff\n }\n}\n\nfunction drawEndTips(ctx: CanvasRenderingContext2D, path: Path, style?: PathStyles) {\n var {\n lineWidth = LINEWIDTH,\n lineCap,\n alpha = 1,\n begin = 'none',\n end = 'arrow',\n beginSize = 'size2',\n endSize = 'size2'\n } = style || {}\n\n if (begin != 'none' || end != 'none') {\n lineWidth = Number(lineWidth) || LINEWIDTH\n\n if (!isUndefined(lineCap)) ctx.lineCap = lineCap\n if (!isUndefined(lineWidth)) ctx.lineWidth = lineWidth\n if (!isUndefined(alpha)) ctx.globalAlpha *= alpha\n\n // 선 그리기.\n if (begin != 'none') drawTip(ctx, path[0], path[1], lineWidth, begin, tipSize(beginSize, lineWidth))\n if (end != 'none') {\n let length = path.length\n drawTip(ctx, path[length - 1], path[length - 2], lineWidth, end, tipSize(endSize, lineWidth))\n }\n }\n}\n\nfunction drawTip(\n ctx: CanvasRenderingContext2D,\n p1: Point,\n p2: Point,\n lineWidth: number,\n type: TipType,\n size: { X: number; Y: number }\n) {\n var { x, y } = p1\n var theta = Math.atan2(p2.y - y, p2.x - x)\n\n ctx.beginPath()\n\n ctx.translate(x, y)\n ctx.rotate(theta)\n\n switch (type) {\n case 'oval':\n ctx.ellipse(0, 0, size.X, size.Y, 0, 0, 2 * Math.PI)\n ctx.fill()\n // ctx.scale(1, 1 / arc_scale_y)\n break\n case 'diamond':\n ctx.moveTo(-size.X, 0)\n ctx.lineTo(0, -size.Y)\n ctx.lineTo(size.X, 0)\n ctx.lineTo(0, size.Y)\n ctx.fill()\n break\n case 'arrow':\n ctx.moveTo(0, 0)\n ctx.lineTo(WING_FACTOR * size.X, -size.Y)\n ctx.lineTo(WING_FACTOR * size.X, size.Y)\n ctx.fill()\n break\n case 'sharp-arrow':\n ctx.moveTo(0, 0)\n ctx.lineTo(WING_FACTOR * size.X, -size.Y)\n ctx.lineTo(-size.X / 1.5 + WING_FACTOR * size.X, 0)\n ctx.lineTo(WING_FACTOR * size.X, size.Y)\n ctx.fill()\n break\n case 'open-arrow':\n ctx.moveTo(WING_FACTOR * size.X + lineWidth, -size.Y)\n ctx.lineTo(lineWidth, 0)\n ctx.lineTo(WING_FACTOR * size.X + lineWidth, size.Y)\n ctx.stroke()\n break\n default:\n break\n }\n\n ctx.rotate(-theta)\n ctx.translate(-x, -y)\n\n ctx.closePath()\n}\n\nfunction tipSize(size: TipSize, lineWidth: number) {\n let length: { X: number; Y: number } = { X: lineWidth * 1.5, Y: lineWidth * 1.5 }\n lineWidth = lineWidth * 1.2\n\n switch (size) {\n case 'size1':\n length.X = lineWidth\n length.Y = lineWidth\n break\n case 'size2':\n length.X = lineWidth * 1.5\n length.Y = lineWidth\n break\n case 'size3':\n length.X = lineWidth * 2\n length.Y = lineWidth\n break\n case 'size4':\n length.X = lineWidth\n length.Y = lineWidth * 1.5\n break\n case 'size5':\n length.X = lineWidth * 1.5\n length.Y = lineWidth * 1.5\n break\n case 'size6':\n length.X = lineWidth * 2\n length.Y = lineWidth * 1.5\n break\n case 'size7':\n length.X = lineWidth\n length.Y = lineWidth * 2\n break\n case 'size8':\n length.X = lineWidth * 1.5\n length.Y = lineWidth * 2\n break\n case 'size9':\n length.X = lineWidth * 2\n length.Y = lineWidth * 2\n break\n default:\n length.X = lineWidth * 1.5\n length.Y = lineWidth * 1.5\n break\n }\n return length\n}\n\nfunction stroke(ctx: CanvasRenderingContext2D, styles?: PathStyles) {\n var { lineDash: lineDashType = 'solid', lineWidth = 2, lineCap, lineJoin, alpha } = styles || {}\n\n if (lineCap) ctx.lineCap = lineCap\n\n let lineDash = [0, 0]\n\n if (lineDash) {\n var isRound = lineCap == 'round'\n\n switch (lineDashType) {\n case 'solid':\n lineDash = [0, 0]\n break\n case 'round-dot':\n if (isRound) lineDash = [0, lineWidth * 2]\n else lineDash = [lineWidth, lineWidth]\n break\n case 'square-dot':\n if (isRound) lineDash = [lineWidth, lineWidth * 2]\n else lineDash = [lineWidth * 2, lineWidth]\n break\n case 'dash':\n if (isRound) lineDash = [lineWidth * 3, lineWidth * 2.5]\n else lineDash = [lineWidth * 4, lineWidth * 1.5]\n break\n case 'dash-dot':\n if (isRound) lineDash = [lineWidth * 3, lineWidth * 3, 0, lineWidth * 3]\n else lineDash = [lineWidth * 4, lineWidth * 2, lineWidth, lineWidth * 2]\n break\n case 'long-dash':\n if (isRound) lineDash = [lineWidth * 5, lineWidth * 4]\n else lineDash = [lineWidth * 6, lineWidth * 3]\n break\n case 'long-dash-dot':\n if (isRound) lineDash = [lineWidth * 5, lineWidth * 3, 0, lineWidth * 3]\n else lineDash = [lineWidth * 6, lineWidth * 2, lineWidth, lineWidth * 2]\n break\n case 'long-dash-dot-dot':\n if (isRound) lineDash = [lineWidth * 5, lineWidth * 2, 0, lineWidth * 2, 0, lineWidth * 2]\n else lineDash = [lineWidth * 6, lineWidth, lineWidth, lineWidth, lineWidth, lineWidth]\n break\n }\n ctx.setLineDash(lineDash)\n }\n\n if (!isUndefined(alpha)) ctx.globalAlpha *= alpha\n if (!isUndefined(lineJoin)) ctx.lineJoin = lineJoin\n\n ctx.stroke()\n}\n"]}
|
|
@@ -6,6 +6,7 @@ import '@operato/input/ox-input-color.js';
|
|
|
6
6
|
import '@operato/input/ox-input-range.js';
|
|
7
7
|
import '@operato/app/input/ox-input-fill-style.js';
|
|
8
8
|
import '@operato/i18n/ox-i18n.js';
|
|
9
|
+
import '../../../component/restful-input-fill-style.js';
|
|
9
10
|
import { Component } from '@hatiolab/things-scene';
|
|
10
11
|
import { AbstractProperty } from '../abstract-property.js';
|
|
11
12
|
export declare class PropertyStyles extends AbstractProperty {
|
|
@@ -7,10 +7,12 @@ import '@operato/input/ox-input-color.js';
|
|
|
7
7
|
import '@operato/input/ox-input-range.js';
|
|
8
8
|
import '@operato/app/input/ox-input-fill-style.js';
|
|
9
9
|
import '@operato/i18n/ox-i18n.js';
|
|
10
|
+
import '../../../component/restful-input-fill-style.js';
|
|
10
11
|
import { css, html } from 'lit';
|
|
11
12
|
import { property, state } from 'lit/decorators.js';
|
|
12
13
|
import { AbstractProperty } from '../abstract-property.js';
|
|
13
14
|
import { PropertySharedStyle } from '../property-shared-style.js';
|
|
15
|
+
import { isRestfulAvailable } from '@fmsim/api';
|
|
14
16
|
export class PropertyStyles extends AbstractProperty {
|
|
15
17
|
constructor() {
|
|
16
18
|
super(...arguments);
|
|
@@ -81,7 +83,9 @@ export class PropertyStyles extends AbstractProperty {
|
|
|
81
83
|
<ox-i18n topic="board-modeller/styles/fill-style" msgid="label.fill-style">fill style</ox-i18n>
|
|
82
84
|
</legend>
|
|
83
85
|
|
|
84
|
-
|
|
86
|
+
${isRestfulAvailable()
|
|
87
|
+
? html ` <restful-input-fill-style value-key="fillStyle" .value=${fillStyle}> </restful-input-fill-style> `
|
|
88
|
+
: html ` <ox-input-fill-style value-key="fillStyle" .value=${fillStyle}> </ox-input-fill-style> `}
|
|
85
89
|
</fieldset>
|
|
86
90
|
|
|
87
91
|
<fieldset>
|
|
@@ -1 +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GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;YAEtB,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;gBACnC,MAAM,GAAG,KAAK,CAAA;gBACd,OAAO,MAAM,CAAA;YACf,CAAC;YAED,MAAM,GAAG,IAAI,CAAA;QACf,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC;;AApjBM,qBAAM,GAAG;IACd,mBAAmB;IACnB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8SF;CACF,AAjTY,CAiTZ;AAC2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAgB;AAChB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gDAA2B;AAC1B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;6CAAkB;AAEnC;IAAR,KAAK,EAAE;qDAA+B","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@polymer/paper-dropdown-menu/paper-dropdown-menu'\nimport '@operato/input/ox-input-color.js'\nimport '@operato/input/ox-input-range.js'\nimport '@operato/app/input/ox-input-fill-style.js'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { css, html } from 'lit'\nimport { property, state } from 'lit/decorators.js'\n\nimport { Component } from '@hatiolab/things-scene'\n\nimport { AbstractProperty } from '../abstract-property.js'\nimport { PropertySharedStyle } from '../property-shared-style.js'\n\nexport class PropertyStyles extends AbstractProperty {\n static styles = [\n PropertySharedStyle,\n css`\n ox-input-range {\n width: 100%;\n }\n\n .btn-group {\n height: 24px;\n }\n\n .btn-group paper-button {\n width: 30px;\n height: 24px;\n min-width: initial;\n margin: 0 4px 0 0;\n padding: 0;\n border-radius: 0;\n display: inline-block;\n border-bottom: 2px solid #fff;\n\n background: var(--url-icon-properties) no-repeat;\n background-size: 70%;\n }\n\n .btn-group paper-button.tbold {\n background-position: 50% -170px;\n }\n\n .btn-group paper-button.titalic {\n background-position: 50% -205px;\n }\n\n .btn-group paper-button.tunderline {\n background-position: 50% -240px;\n }\n\n .btn-group paper-button.tstrikethrough {\n background-position: 50% -415px;\n }\n\n .btn-group paper-button[active] {\n border-color: #f2471c;\n }\n\n .line-type paper-listbox {\n overflow: hidden;\n max-width: 100px;\n }\n .line-type paper-item {\n background: var(--url-icon-properties-line-type) 50% 0 no-repeat;\n min-height: 25px;\n padding: 3px 9px;\n width: 80px;\n }\n\n .line-type paper-item.solid {\n background-position: 50% 10px;\n }\n .line-type paper-item.round-dot {\n background-position: 50% -40px;\n }\n .line-type paper-item.square-dot {\n background-position: 50% -90px;\n }\n .line-type paper-item.dash {\n background-position: 50% -140px;\n }\n .line-type paper-item.dash-dot {\n background-position: 50% -190px;\n }\n .line-type paper-item.long-dash {\n background-position: 50% -240px;\n }\n .line-type paper-item.long-dash-dot {\n background-position: 50% -290px;\n }\n .line-type paper-item.long-dash-dot-dot {\n background-position: 50% -340px;\n }\n\n .line-type .paper-input-container input {\n background: var(--url-icon-properties-line-type) 50% 0 no-repeat !important;\n }\n .line-type.solid .paper-input-container input {\n background-position: 50% 5px !important;\n }\n .line-type.round-dot .paper-input-container input {\n background-position: 50% -45px !important;\n }\n .line-type.square-dot .paper-input-container input {\n background-position: 50% -85px !important;\n }\n .line-type.dash .paper-input-container input {\n background-position: 50% -145px !important;\n }\n .line-type.dash-dot .paper-input-container input {\n background-position: 50% -185px !important;\n }\n .line-type.long-dash .paper-input-container input {\n background-position: 50% -245px !important;\n }\n .line-type.long-dash-dot .paper-input-container input {\n background-position: 50% -285px !important;\n }\n .line-type.long-dash-dot-dot .paper-input-container input {\n background-position: 50% -345px !important;\n }\n\n .arrow-type paper-menu {\n overflow: hidden;\n max-width: 140px;\n }\n .arrow-type paper-item {\n background: var(--url-icon-properties-arrow-type) 50% 0 no-repeat;\n min-height: 30px;\n padding: 3px 7px;\n width: 30px;\n float: left;\n }\n .arrow-type paper-item.begin-no {\n background-position: 50% 16px;\n }\n .arrow-type paper-item.begin-arrow {\n background-position: 50% -39px;\n }\n .arrow-type paper-item.begin-open-arrow {\n background-position: 50% -89px;\n }\n .arrow-type paper-item.begin-stealth-arrow {\n background-position: 50% -139px;\n }\n .arrow-type paper-item.begin-diamond-arrow {\n background-position: 50% -190px;\n }\n .arrow-type paper-item.begin-oval-arrow {\n background-position: 50% -238px;\n }\n .arrow-type paper-item.begin-size1 {\n background-position: 50% -286px;\n }\n .arrow-type paper-item.begin-size2 {\n background-position: 50% -336px;\n }\n .arrow-type paper-item.begin-size3 {\n background-position: 50% -386px;\n }\n .arrow-type paper-item.begin-size4 {\n background-position: 50% -436px;\n }\n .arrow-type paper-item.begin-size5 {\n background-position: 50% -486px;\n }\n .arrow-type paper-item.begin-size6 {\n background-position: 50% -536px;\n }\n .arrow-type paper-item.begin-size7 {\n background-position: 50% -589px;\n }\n .arrow-type paper-item.begin-size8 {\n background-position: 50% -639px;\n }\n .arrow-type paper-item.begin-size9 {\n background-position: 50% -689px;\n }\n .arrow-type paper-item.end-no {\n background-position: 50% 16px;\n }\n .arrow-type paper-item.end-arrow {\n background-position: 50% -739px;\n }\n .arrow-type paper-item.end-open-arrow {\n background-position: 50% -789px;\n }\n .arrow-type paper-item.end-stealth-arrow {\n background-position: 50% -839px;\n }\n .arrow-type paper-item.end-diamond-arrow {\n background-position: 50% -890px;\n }\n .arrow-type paper-item.end-oval-arrow {\n background-position: 50% -938px;\n }\n .arrow-type paper-item.end-size1 {\n background-position: 50% -986px;\n }\n .arrow-type paper-item.end-size2 {\n background-position: 50% -1036px;\n }\n .arrow-type paper-item.end-size3 {\n background-position: 50% -1086px;\n }\n .arrow-type paper-item.end-size4 {\n background-position: 50% -1136px;\n }\n .arrow-type paper-item.end-size5 {\n background-position: 50% -1186px;\n }\n .arrow-type paper-item.end-size6 {\n background-position: 50% -1236px;\n }\n .arrow-type paper-item.end-size7 {\n background-position: 50% -1289px;\n }\n .arrow-type paper-item.end-size8 {\n background-position: 50% -1339px;\n }\n .arrow-type paper-item.end-size9 {\n background-position: 50% -1389px;\n }\n\n .arrow-type .paper-input-container input {\n background: var(--url-icon-properties-arrow-type) 110% 0 no-repeat !important;\n }\n .arrow-type.begin-no .paper-input-container input {\n background-position: 110% 5px !important;\n }\n .arrow-type.begin-arrow .paper-input-container input {\n background-position: 110% -50px !important;\n }\n .arrow-type.begin-open-arrow .paper-input-container input {\n background-position: 110% -100px !important;\n }\n .arrow-type.begin-stealth-arrow .paper-input-container input {\n background-position: 110% -150px !important;\n }\n .arrow-type.begin-diamond-arrow .paper-input-container input {\n background-position: 110% -200px !important;\n }\n .arrow-type.begin-oval-arrow .paper-input-container input {\n background-position: 110% -250px !important;\n }\n .arrow-type.begin-size1 .paper-input-container input {\n background-position: 110% -298px !important;\n }\n .arrow-type.begin-size2 .paper-input-container input {\n background-position: 110% -348px !important;\n }\n .arrow-type.begin-size3 .paper-input-container input {\n background-position: 110% -398px !important;\n }\n .arrow-type.begin-size4 .paper-input-container input {\n background-position: 110% -448px !important;\n }\n .arrow-type.begin-size5 .paper-input-container input {\n background-position: 110% -498px !important;\n }\n .arrow-type.begin-size6 .paper-input-container input {\n background-position: 110% -548px !important;\n }\n .arrow-type.begin-size7 .paper-input-container input {\n background-position: 110% -600px !important;\n }\n .arrow-type.begin-size8 .paper-input-container input {\n background-position: 110% -650px !important;\n }\n .arrow-type.begin-size9 .paper-input-container input {\n background-position: 110% -700px !important;\n }\n .arrow-type.end-no .paper-input-container input {\n background-position: 110% 5px !important;\n }\n .arrow-type.end-arrow .paper-input-container input {\n background-position: 110% -750px !important;\n }\n .arrow-type.end-open-arrow .paper-input-container input {\n background-position: 110% -800px !important;\n }\n .arrow-type.end-stealth-arrow .paper-input-container input {\n background-position: 110% -850px !important;\n }\n .arrow-type.end-diamond-arrow .paper-input-container input {\n background-position: 110% -900px !important;\n }\n .arrow-type.end-oval-arrow .paper-input-container input {\n background-position: 110% -950px !important;\n }\n .arrow-type.end-size1 .paper-input-container input {\n background-position: 110% -998px !important;\n }\n .arrow-type.end-size2 .paper-input-container input {\n background-position: 110% -1048px !important;\n }\n .arrow-type.end-size3 .paper-input-container input {\n background-position: 110% -1098px !important;\n }\n .arrow-type.end-size4 .paper-input-container input {\n background-position: 110% -1148px !important;\n }\n .arrow-type.end-size5 .paper-input-container input {\n background-position: 110% -1198px !important;\n }\n .arrow-type.end-size6 .paper-input-container input {\n background-position: 110% -1248px !important;\n }\n .arrow-type.end-size7 .paper-input-container input {\n background-position: 110% -1300px !important;\n }\n .arrow-type.end-size8 .paper-input-container input {\n background-position: 110% -1350px !important;\n }\n .arrow-type.end-size9 .paper-input-container input {\n background-position: 110% -1400px !important;\n }\n `\n ]\n @property({ type: Object }) value: any = {}\n @property({ type: Array }) selected: Component[] = []\n @property({ type: Array }) fonts: any[] = []\n\n @state() fontAvailable: boolean = false\n\n firstUpdated() {\n this.fontAvailable = !sessionStorage.getItem('ThingsFactory-UseExternServer')\n\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n var {\n alpha = 1,\n fontFamily,\n fontSize,\n lineHeight,\n letterSpacing,\n fontColor,\n bold,\n italic,\n fillStyle,\n lineWidth,\n strokeStyle,\n lineDash,\n lineCap,\n lineJoin,\n begin,\n beginSize,\n end,\n endSize\n } = this.value || {}\n\n return html`\n <fieldset>\n <legend>\n <ox-i18n topic=\"board-modeller/styles/opacity\" msgid=\"label.opacity\">opacity</ox-i18n>\n </legend>\n <ox-input-range min=\"0\" max=\"1\" step=\"0.1\" value-key=\"alpha\" .value=${alpha} editable> </ox-input-range>\n </fieldset>\n\n <fieldset>\n <legend>\n <ox-i18n topic=\"board-modeller/styles/text-style\" msgid=\"label.text-style\">text style</ox-i18n>\n </legend>\n\n <div class=\"property-grid\">\n ${this.fontAvailable\n ? html`\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.font-family\">Font Family</ox-i18n>\n </label>\n\n <ox-font-selector\n value-key=\"fontFamily\"\n .value=${fontFamily}\n class=\"property-full-input\"\n custom-editor\n ></ox-font-selector>\n `\n : html``}\n\n <label class=\"property-half-label icon-only-label font-size\"></label>\n <input type=\"number\" value-key=\"fontSize\" .value=${fontSize} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label lineHeight\"></label>\n <input type=\"number\" value-key=\"lineHeight\" .value=${lineHeight} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label letterSpacing\"></label>\n <input type=\"number\" value-key=\"letterSpacing\" .value=${letterSpacing} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label color\"></label>\n <ox-input-color value-key=\"fontColor\" .value=${fontColor} class=\"property-half-input\"> </ox-input-color>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.text-formatting\">Text Formatting</ox-i18n>\n </label>\n <div class=\"property-full-input btn-group\">\n <paper-button toggles value-key=\"bold\" ?active=${bold} class=\"tbold\"> </paper-button>\n <paper-button toggles value-key=\"italic\" ?active=${italic} class=\"titalic\"> </paper-button>\n </div>\n </div>\n </fieldset>\n\n <fieldset>\n <legend>\n <ox-i18n topic=\"board-modeller/styles/fill-style\" msgid=\"label.fill-style\">fill style</ox-i18n>\n </legend>\n\n <ox-input-fill-style value-key=\"fillStyle\" .value=${fillStyle}> </ox-input-fill-style>\n </fieldset>\n\n <fieldset>\n <legend>\n <ox-i18n msgid=\"label.line-style\" topic=\"board-modeller/styles/line-style\"></ox-i18n>\n </legend>\n\n <div class=\"property-grid\">\n <label class=\"property-half-label icon-only-label linewidth\"></label>\n <input type=\"number\" value-key=\"lineWidth\" .value=${lineWidth} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label color\"></label>\n <ox-input-color value-key=\"strokeStyle\" .value=${strokeStyle} class=\"property-half-input\"> </ox-input-color>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.line-type\">line type</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input line-type solid\">\n <!-- solid는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"lineDash\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${lineDash}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"solid\" name=\"solid\"></paper-item>\n <paper-item class=\"round-dot\" name=\"round-dot\"></paper-item>\n <paper-item class=\"square-dot\" name=\"square-dot\"></paper-item>\n <paper-item class=\"dash\" name=\"dash\"></paper-item>\n <paper-item class=\"dash-dot\" name=\"dash-dot\"></paper-item>\n <paper-item class=\"long-dash\" name=\"long-dash\"></paper-item>\n <paper-item class=\"long-dash-dot\" name=\"long-dash-dot\"></paper-item>\n <paper-item class=\"long-dash-dot-dot\" name=\"long-dash-dot-dot\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.cap-type\">cap type</ox-i18n>\n </label>\n <select class=\"property-full-input select-content\" value-key=\"lineCap\" .value=${lineCap}>\n <option value=\"butt\"><ox-i18n msgid=\"label.square\">square</ox-i18n></option>\n <option value=\"round\"><ox-i18n msgid=\"label.round\">round</ox-i18n></option>\n </select>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.join-type\">join type</ox-i18n>\n </label>\n <select class=\"property-full-input select-content\" value-key=\"lineJoin\" .value=${lineJoin}>\n <option value=\"miter\"><ox-i18n msgid=\"label.miter\">miter</ox-i18n></option>\n <option value=\"round\"><ox-i18n msgid=\"label.round\">round</ox-i18n></option>\n <option value=\"bevel\"><ox-i18n msgid=\"label.bevel\">bevel</ox-i18n></option>\n </select>\n\n ${this._isLine(this.selected)\n ? html`\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.begin-type\">begin type</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type begin-no\">\n <!-- begin-no는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"begin\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${begin}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"begin-no\" name=\"none\"></paper-item>\n <paper-item class=\"begin-arrow\" name=\"arrow\"></paper-item>\n <paper-item class=\"begin-open-arrow\" name=\"open-arrow\"></paper-item>\n <paper-item class=\"begin-stealth-arrow\" name=\"sharp-arrow\"></paper-item>\n <paper-item class=\"begin-diamond-arrow\" name=\"diamond\"></paper-item>\n <paper-item class=\"begin-oval-arrow\" name=\"oval\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.begin-size\">begin size</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type begin-size1\">\n <!-- begin-size1는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"beginSize\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${beginSize}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"begin-size1\" name=\"size1\"></paper-item>\n <paper-item class=\"begin-size2\" name=\"size2\"></paper-item>\n <paper-item class=\"begin-size3\" name=\"size3\"></paper-item>\n <paper-item class=\"begin-size4\" name=\"size4\"></paper-item>\n <paper-item class=\"begin-size5\" name=\"size5\"></paper-item>\n <paper-item class=\"begin-size6\" name=\"size6\"></paper-item>\n <paper-item class=\"begin-size7\" name=\"size7\"></paper-item>\n <paper-item class=\"begin-size8\" name=\"size8\"></paper-item>\n <paper-item class=\"begin-size9\" name=\"size9\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.end-type\">end type</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type end-no\">\n <!-- end-no는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"end\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${end}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"end-no\" name=\"none\"></paper-item>\n <paper-item class=\"end-arrow\" name=\"arrow\"></paper-item>\n <paper-item class=\"end-open-arrow\" name=\"open-arrow\"></paper-item>\n <paper-item class=\"end-stealth-arrow\" name=\"sharp-arrow\"></paper-item>\n <paper-item class=\"end-diamond-arrow\" name=\"diamond\"></paper-item>\n <paper-item class=\"end-oval-arrow\" name=\"oval\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.end-size\">end size</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type end-size1\">\n <!-- end-size1는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"endSize\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${endSize}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"end-size1\" name=\"size1\"></paper-item>\n <paper-item class=\"end-size2\" name=\"size2\"></paper-item>\n <paper-item class=\"end-size3\" name=\"size3\"></paper-item>\n <paper-item class=\"end-size4\" name=\"size4\"></paper-item>\n <paper-item class=\"end-size5\" name=\"size5\"></paper-item>\n <paper-item class=\"end-size6\" name=\"size6\"></paper-item>\n <paper-item class=\"end-size7\" name=\"size7\"></paper-item>\n <paper-item class=\"end-size8\" name=\"size8\"></paper-item>\n <paper-item class=\"end-size9\" name=\"size9\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n `\n : html``}\n </div>\n </fieldset>\n `\n }\n\n _isLine(selected: Component[]) {\n var isLine = false\n\n for (var i = 0; i < selected.length; i++) {\n var comp = selected[i]\n\n if (!comp.isLine || !comp.isLine()) {\n isLine = false\n return isLine\n }\n\n isLine = true\n }\n\n return isLine\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/styles/styles.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,kDAAkD,CAAA;AACzD,OAAO,kCAAkC,CAAA;AACzC,OAAO,kCAAkC,CAAA;AACzC,OAAO,2CAA2C,CAAA;AAClD,OAAO,0BAA0B,CAAA;AACjC,OAAO,gDAAgD,CAAA;AAEvD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAInD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,MAAM,OAAO,cAAe,SAAQ,gBAAgB;IAApD;;QAmT8B,UAAK,GAAQ,EAAE,CAAA;QAChB,aAAQ,GAAgB,EAAE,CAAA;QAC1B,UAAK,GAAU,EAAE,CAAA;QAEnC,kBAAa,GAAY,KAAK,CAAA;IAiQzC,CAAC;IA/PC,YAAY;QACV,IAAI,CAAC,aAAa,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAAA;QAE7E,IAAI,CA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;;;;;;;;;;;KA8SF;CACF,AAjTY,CAiTZ;AAC2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAgB;AAChB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gDAA2B;AAC1B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;6CAAkB;AAEnC;IAAR,KAAK,EAAE;qDAA+B","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@polymer/paper-dropdown-menu/paper-dropdown-menu'\nimport '@operato/input/ox-input-color.js'\nimport '@operato/input/ox-input-range.js'\nimport '@operato/app/input/ox-input-fill-style.js'\nimport '@operato/i18n/ox-i18n.js'\nimport '../../../component/restful-input-fill-style.js'\n\nimport { css, html } from 'lit'\nimport { property, state } from 'lit/decorators.js'\n\nimport { Component } from '@hatiolab/things-scene'\n\nimport { AbstractProperty } from '../abstract-property.js'\nimport { PropertySharedStyle } from '../property-shared-style.js'\n\nimport { isRestfulAvailable } from '@fmsim/api'\nexport class PropertyStyles extends AbstractProperty {\n static styles = [\n PropertySharedStyle,\n css`\n ox-input-range {\n width: 100%;\n }\n\n .btn-group {\n height: 24px;\n }\n\n .btn-group paper-button {\n width: 30px;\n height: 24px;\n min-width: initial;\n margin: 0 4px 0 0;\n padding: 0;\n border-radius: 0;\n display: inline-block;\n border-bottom: 2px solid #fff;\n\n background: var(--url-icon-properties) no-repeat;\n background-size: 70%;\n }\n\n .btn-group paper-button.tbold {\n background-position: 50% -170px;\n }\n\n .btn-group paper-button.titalic {\n background-position: 50% -205px;\n }\n\n .btn-group paper-button.tunderline {\n background-position: 50% -240px;\n }\n\n .btn-group paper-button.tstrikethrough {\n background-position: 50% -415px;\n }\n\n .btn-group paper-button[active] {\n border-color: #f2471c;\n }\n\n .line-type paper-listbox {\n overflow: hidden;\n max-width: 100px;\n }\n .line-type paper-item {\n background: var(--url-icon-properties-line-type) 50% 0 no-repeat;\n min-height: 25px;\n padding: 3px 9px;\n width: 80px;\n }\n\n .line-type paper-item.solid {\n background-position: 50% 10px;\n }\n .line-type paper-item.round-dot {\n background-position: 50% -40px;\n }\n .line-type paper-item.square-dot {\n background-position: 50% -90px;\n }\n .line-type paper-item.dash {\n background-position: 50% -140px;\n }\n .line-type paper-item.dash-dot {\n background-position: 50% -190px;\n }\n .line-type paper-item.long-dash {\n background-position: 50% -240px;\n }\n .line-type paper-item.long-dash-dot {\n background-position: 50% -290px;\n }\n .line-type paper-item.long-dash-dot-dot {\n background-position: 50% -340px;\n }\n\n .line-type .paper-input-container input {\n background: var(--url-icon-properties-line-type) 50% 0 no-repeat !important;\n }\n .line-type.solid .paper-input-container input {\n background-position: 50% 5px !important;\n }\n .line-type.round-dot .paper-input-container input {\n background-position: 50% -45px !important;\n }\n .line-type.square-dot .paper-input-container input {\n background-position: 50% -85px !important;\n }\n .line-type.dash .paper-input-container input {\n background-position: 50% -145px !important;\n }\n .line-type.dash-dot .paper-input-container input {\n background-position: 50% -185px !important;\n }\n .line-type.long-dash .paper-input-container input {\n background-position: 50% -245px !important;\n }\n .line-type.long-dash-dot .paper-input-container input {\n background-position: 50% -285px !important;\n }\n .line-type.long-dash-dot-dot .paper-input-container input {\n background-position: 50% -345px !important;\n }\n\n .arrow-type paper-menu {\n overflow: hidden;\n max-width: 140px;\n }\n .arrow-type paper-item {\n background: var(--url-icon-properties-arrow-type) 50% 0 no-repeat;\n min-height: 30px;\n padding: 3px 7px;\n width: 30px;\n float: left;\n }\n .arrow-type paper-item.begin-no {\n background-position: 50% 16px;\n }\n .arrow-type paper-item.begin-arrow {\n background-position: 50% -39px;\n }\n .arrow-type paper-item.begin-open-arrow {\n background-position: 50% -89px;\n }\n .arrow-type paper-item.begin-stealth-arrow {\n background-position: 50% -139px;\n }\n .arrow-type paper-item.begin-diamond-arrow {\n background-position: 50% -190px;\n }\n .arrow-type paper-item.begin-oval-arrow {\n background-position: 50% -238px;\n }\n .arrow-type paper-item.begin-size1 {\n background-position: 50% -286px;\n }\n .arrow-type paper-item.begin-size2 {\n background-position: 50% -336px;\n }\n .arrow-type paper-item.begin-size3 {\n background-position: 50% -386px;\n }\n .arrow-type paper-item.begin-size4 {\n background-position: 50% -436px;\n }\n .arrow-type paper-item.begin-size5 {\n background-position: 50% -486px;\n }\n .arrow-type paper-item.begin-size6 {\n background-position: 50% -536px;\n }\n .arrow-type paper-item.begin-size7 {\n background-position: 50% -589px;\n }\n .arrow-type paper-item.begin-size8 {\n background-position: 50% -639px;\n }\n .arrow-type paper-item.begin-size9 {\n background-position: 50% -689px;\n }\n .arrow-type paper-item.end-no {\n background-position: 50% 16px;\n }\n .arrow-type paper-item.end-arrow {\n background-position: 50% -739px;\n }\n .arrow-type paper-item.end-open-arrow {\n background-position: 50% -789px;\n }\n .arrow-type paper-item.end-stealth-arrow {\n background-position: 50% -839px;\n }\n .arrow-type paper-item.end-diamond-arrow {\n background-position: 50% -890px;\n }\n .arrow-type paper-item.end-oval-arrow {\n background-position: 50% -938px;\n }\n .arrow-type paper-item.end-size1 {\n background-position: 50% -986px;\n }\n .arrow-type paper-item.end-size2 {\n background-position: 50% -1036px;\n }\n .arrow-type paper-item.end-size3 {\n background-position: 50% -1086px;\n }\n .arrow-type paper-item.end-size4 {\n background-position: 50% -1136px;\n }\n .arrow-type paper-item.end-size5 {\n background-position: 50% -1186px;\n }\n .arrow-type paper-item.end-size6 {\n background-position: 50% -1236px;\n }\n .arrow-type paper-item.end-size7 {\n background-position: 50% -1289px;\n }\n .arrow-type paper-item.end-size8 {\n background-position: 50% -1339px;\n }\n .arrow-type paper-item.end-size9 {\n background-position: 50% -1389px;\n }\n\n .arrow-type .paper-input-container input {\n background: var(--url-icon-properties-arrow-type) 110% 0 no-repeat !important;\n }\n .arrow-type.begin-no .paper-input-container input {\n background-position: 110% 5px !important;\n }\n .arrow-type.begin-arrow .paper-input-container input {\n background-position: 110% -50px !important;\n }\n .arrow-type.begin-open-arrow .paper-input-container input {\n background-position: 110% -100px !important;\n }\n .arrow-type.begin-stealth-arrow .paper-input-container input {\n background-position: 110% -150px !important;\n }\n .arrow-type.begin-diamond-arrow .paper-input-container input {\n background-position: 110% -200px !important;\n }\n .arrow-type.begin-oval-arrow .paper-input-container input {\n background-position: 110% -250px !important;\n }\n .arrow-type.begin-size1 .paper-input-container input {\n background-position: 110% -298px !important;\n }\n .arrow-type.begin-size2 .paper-input-container input {\n background-position: 110% -348px !important;\n }\n .arrow-type.begin-size3 .paper-input-container input {\n background-position: 110% -398px !important;\n }\n .arrow-type.begin-size4 .paper-input-container input {\n background-position: 110% -448px !important;\n }\n .arrow-type.begin-size5 .paper-input-container input {\n background-position: 110% -498px !important;\n }\n .arrow-type.begin-size6 .paper-input-container input {\n background-position: 110% -548px !important;\n }\n .arrow-type.begin-size7 .paper-input-container input {\n background-position: 110% -600px !important;\n }\n .arrow-type.begin-size8 .paper-input-container input {\n background-position: 110% -650px !important;\n }\n .arrow-type.begin-size9 .paper-input-container input {\n background-position: 110% -700px !important;\n }\n .arrow-type.end-no .paper-input-container input {\n background-position: 110% 5px !important;\n }\n .arrow-type.end-arrow .paper-input-container input {\n background-position: 110% -750px !important;\n }\n .arrow-type.end-open-arrow .paper-input-container input {\n background-position: 110% -800px !important;\n }\n .arrow-type.end-stealth-arrow .paper-input-container input {\n background-position: 110% -850px !important;\n }\n .arrow-type.end-diamond-arrow .paper-input-container input {\n background-position: 110% -900px !important;\n }\n .arrow-type.end-oval-arrow .paper-input-container input {\n background-position: 110% -950px !important;\n }\n .arrow-type.end-size1 .paper-input-container input {\n background-position: 110% -998px !important;\n }\n .arrow-type.end-size2 .paper-input-container input {\n background-position: 110% -1048px !important;\n }\n .arrow-type.end-size3 .paper-input-container input {\n background-position: 110% -1098px !important;\n }\n .arrow-type.end-size4 .paper-input-container input {\n background-position: 110% -1148px !important;\n }\n .arrow-type.end-size5 .paper-input-container input {\n background-position: 110% -1198px !important;\n }\n .arrow-type.end-size6 .paper-input-container input {\n background-position: 110% -1248px !important;\n }\n .arrow-type.end-size7 .paper-input-container input {\n background-position: 110% -1300px !important;\n }\n .arrow-type.end-size8 .paper-input-container input {\n background-position: 110% -1350px !important;\n }\n .arrow-type.end-size9 .paper-input-container input {\n background-position: 110% -1400px !important;\n }\n `\n ]\n @property({ type: Object }) value: any = {}\n @property({ type: Array }) selected: Component[] = []\n @property({ type: Array }) fonts: any[] = []\n\n @state() fontAvailable: boolean = false\n\n firstUpdated() {\n this.fontAvailable = !sessionStorage.getItem('ThingsFactory-UseExternServer')\n\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n var {\n alpha = 1,\n fontFamily,\n fontSize,\n lineHeight,\n letterSpacing,\n fontColor,\n bold,\n italic,\n fillStyle,\n lineWidth,\n strokeStyle,\n lineDash,\n lineCap,\n lineJoin,\n begin,\n beginSize,\n end,\n endSize\n } = this.value || {}\n\n return html`\n <fieldset>\n <legend>\n <ox-i18n topic=\"board-modeller/styles/opacity\" msgid=\"label.opacity\">opacity</ox-i18n>\n </legend>\n <ox-input-range min=\"0\" max=\"1\" step=\"0.1\" value-key=\"alpha\" .value=${alpha} editable> </ox-input-range>\n </fieldset>\n\n <fieldset>\n <legend>\n <ox-i18n topic=\"board-modeller/styles/text-style\" msgid=\"label.text-style\">text style</ox-i18n>\n </legend>\n\n <div class=\"property-grid\">\n ${this.fontAvailable\n ? html`\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.font-family\">Font Family</ox-i18n>\n </label>\n\n <ox-font-selector\n value-key=\"fontFamily\"\n .value=${fontFamily}\n class=\"property-full-input\"\n custom-editor\n ></ox-font-selector>\n `\n : html``}\n\n <label class=\"property-half-label icon-only-label font-size\"></label>\n <input type=\"number\" value-key=\"fontSize\" .value=${fontSize} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label lineHeight\"></label>\n <input type=\"number\" value-key=\"lineHeight\" .value=${lineHeight} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label letterSpacing\"></label>\n <input type=\"number\" value-key=\"letterSpacing\" .value=${letterSpacing} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label color\"></label>\n <ox-input-color value-key=\"fontColor\" .value=${fontColor} class=\"property-half-input\"> </ox-input-color>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.text-formatting\">Text Formatting</ox-i18n>\n </label>\n <div class=\"property-full-input btn-group\">\n <paper-button toggles value-key=\"bold\" ?active=${bold} class=\"tbold\"> </paper-button>\n <paper-button toggles value-key=\"italic\" ?active=${italic} class=\"titalic\"> </paper-button>\n </div>\n </div>\n </fieldset>\n\n <fieldset>\n <legend>\n <ox-i18n topic=\"board-modeller/styles/fill-style\" msgid=\"label.fill-style\">fill style</ox-i18n>\n </legend>\n\n ${isRestfulAvailable()\n ? html` <restful-input-fill-style value-key=\"fillStyle\" .value=${fillStyle}> </restful-input-fill-style> `\n : html` <ox-input-fill-style value-key=\"fillStyle\" .value=${fillStyle}> </ox-input-fill-style> `}\n </fieldset>\n\n <fieldset>\n <legend>\n <ox-i18n msgid=\"label.line-style\" topic=\"board-modeller/styles/line-style\"></ox-i18n>\n </legend>\n\n <div class=\"property-grid\">\n <label class=\"property-half-label icon-only-label linewidth\"></label>\n <input type=\"number\" value-key=\"lineWidth\" .value=${lineWidth} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label color\"></label>\n <ox-input-color value-key=\"strokeStyle\" .value=${strokeStyle} class=\"property-half-input\"> </ox-input-color>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.line-type\">line type</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input line-type solid\">\n <!-- solid는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"lineDash\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${lineDash}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"solid\" name=\"solid\"></paper-item>\n <paper-item class=\"round-dot\" name=\"round-dot\"></paper-item>\n <paper-item class=\"square-dot\" name=\"square-dot\"></paper-item>\n <paper-item class=\"dash\" name=\"dash\"></paper-item>\n <paper-item class=\"dash-dot\" name=\"dash-dot\"></paper-item>\n <paper-item class=\"long-dash\" name=\"long-dash\"></paper-item>\n <paper-item class=\"long-dash-dot\" name=\"long-dash-dot\"></paper-item>\n <paper-item class=\"long-dash-dot-dot\" name=\"long-dash-dot-dot\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.cap-type\">cap type</ox-i18n>\n </label>\n <select class=\"property-full-input select-content\" value-key=\"lineCap\" .value=${lineCap}>\n <option value=\"butt\"><ox-i18n msgid=\"label.square\">square</ox-i18n></option>\n <option value=\"round\"><ox-i18n msgid=\"label.round\">round</ox-i18n></option>\n </select>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.join-type\">join type</ox-i18n>\n </label>\n <select class=\"property-full-input select-content\" value-key=\"lineJoin\" .value=${lineJoin}>\n <option value=\"miter\"><ox-i18n msgid=\"label.miter\">miter</ox-i18n></option>\n <option value=\"round\"><ox-i18n msgid=\"label.round\">round</ox-i18n></option>\n <option value=\"bevel\"><ox-i18n msgid=\"label.bevel\">bevel</ox-i18n></option>\n </select>\n\n ${this._isLine(this.selected)\n ? html`\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.begin-type\">begin type</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type begin-no\">\n <!-- begin-no는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"begin\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${begin}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"begin-no\" name=\"none\"></paper-item>\n <paper-item class=\"begin-arrow\" name=\"arrow\"></paper-item>\n <paper-item class=\"begin-open-arrow\" name=\"open-arrow\"></paper-item>\n <paper-item class=\"begin-stealth-arrow\" name=\"sharp-arrow\"></paper-item>\n <paper-item class=\"begin-diamond-arrow\" name=\"diamond\"></paper-item>\n <paper-item class=\"begin-oval-arrow\" name=\"oval\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.begin-size\">begin size</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type begin-size1\">\n <!-- begin-size1는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"beginSize\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${beginSize}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"begin-size1\" name=\"size1\"></paper-item>\n <paper-item class=\"begin-size2\" name=\"size2\"></paper-item>\n <paper-item class=\"begin-size3\" name=\"size3\"></paper-item>\n <paper-item class=\"begin-size4\" name=\"size4\"></paper-item>\n <paper-item class=\"begin-size5\" name=\"size5\"></paper-item>\n <paper-item class=\"begin-size6\" name=\"size6\"></paper-item>\n <paper-item class=\"begin-size7\" name=\"size7\"></paper-item>\n <paper-item class=\"begin-size8\" name=\"size8\"></paper-item>\n <paper-item class=\"begin-size9\" name=\"size9\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.end-type\">end type</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type end-no\">\n <!-- end-no는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"end\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${end}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"end-no\" name=\"none\"></paper-item>\n <paper-item class=\"end-arrow\" name=\"arrow\"></paper-item>\n <paper-item class=\"end-open-arrow\" name=\"open-arrow\"></paper-item>\n <paper-item class=\"end-stealth-arrow\" name=\"sharp-arrow\"></paper-item>\n <paper-item class=\"end-diamond-arrow\" name=\"diamond\"></paper-item>\n <paper-item class=\"end-oval-arrow\" name=\"oval\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.end-size\">end size</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type end-size1\">\n <!-- end-size1는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"endSize\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${endSize}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"end-size1\" name=\"size1\"></paper-item>\n <paper-item class=\"end-size2\" name=\"size2\"></paper-item>\n <paper-item class=\"end-size3\" name=\"size3\"></paper-item>\n <paper-item class=\"end-size4\" name=\"size4\"></paper-item>\n <paper-item class=\"end-size5\" name=\"size5\"></paper-item>\n <paper-item class=\"end-size6\" name=\"size6\"></paper-item>\n <paper-item class=\"end-size7\" name=\"size7\"></paper-item>\n <paper-item class=\"end-size8\" name=\"size8\"></paper-item>\n <paper-item class=\"end-size9\" name=\"size9\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n `\n : html``}\n </div>\n </fieldset>\n `\n }\n\n _isLine(selected: Component[]) {\n var isLine = false\n\n for (var i = 0; i < selected.length; i++) {\n var comp = selected[i]\n\n if (!comp.isLine || !comp.isLine()) {\n isLine = false\n return isLine\n }\n\n isLine = true\n }\n\n return isLine\n }\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components';
|
|
2
|
+
import '../src/component/restful-attachment-selector';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: string;
|
|
6
|
+
argTypes: {
|
|
7
|
+
category: {
|
|
8
|
+
control: "select";
|
|
9
|
+
options: string[];
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
creatable: {
|
|
13
|
+
control: "boolean";
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
userName: {
|
|
17
|
+
control: "text";
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
parameters: {
|
|
22
|
+
layout: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj;
|
|
27
|
+
export declare const Default: Story;
|
|
28
|
+
export declare const WithCategory: Story;
|
|
29
|
+
export declare const ReadOnly: Story;
|
|
30
|
+
export declare const WithTestData: Story;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import '../src/component/restful-attachment-selector';
|
|
3
|
+
sessionStorage.setItem('lv_server_ip_port', 'http://localhost:16060');
|
|
4
|
+
sessionStorage.setItem('lv_server_context_path', '/mcs/lv');
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Components/RestfulAttachmentSelector',
|
|
7
|
+
component: 'restful-attachment-selector',
|
|
8
|
+
argTypes: {
|
|
9
|
+
category: {
|
|
10
|
+
control: 'select',
|
|
11
|
+
options: ['', 'audio', 'video', 'image', 'text', 'application'],
|
|
12
|
+
description: '첨부파일 카테고리'
|
|
13
|
+
},
|
|
14
|
+
creatable: {
|
|
15
|
+
control: 'boolean',
|
|
16
|
+
description: '파일 업로드 가능 여부'
|
|
17
|
+
},
|
|
18
|
+
userName: {
|
|
19
|
+
control: 'text',
|
|
20
|
+
description: '사용자 이름'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
parameters: {
|
|
24
|
+
layout: 'centered'
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
export default meta;
|
|
28
|
+
export const Default = {
|
|
29
|
+
render: args => html `
|
|
30
|
+
<restful-attachment-selector
|
|
31
|
+
.category=${args.category}
|
|
32
|
+
.creatable=${args.creatable}
|
|
33
|
+
.userName=${args.userName}
|
|
34
|
+
style="width: 800px; height: 600px;"
|
|
35
|
+
></restful-attachment-selector>
|
|
36
|
+
`,
|
|
37
|
+
args: {
|
|
38
|
+
category: '',
|
|
39
|
+
creatable: true,
|
|
40
|
+
userName: 'testUser'
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export const WithCategory = {
|
|
44
|
+
...Default,
|
|
45
|
+
args: {
|
|
46
|
+
...Default.args,
|
|
47
|
+
category: 'document'
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
export const ReadOnly = {
|
|
51
|
+
...Default,
|
|
52
|
+
args: {
|
|
53
|
+
...Default.args,
|
|
54
|
+
creatable: false
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
export const WithTestData = {
|
|
58
|
+
...Default,
|
|
59
|
+
args: {
|
|
60
|
+
...Default.args,
|
|
61
|
+
category: 'document'
|
|
62
|
+
},
|
|
63
|
+
play: async ({ canvasElement }) => {
|
|
64
|
+
const selector = canvasElement.querySelector('restful-attachment-selector');
|
|
65
|
+
if (selector) {
|
|
66
|
+
// 테스트 데이터 주입
|
|
67
|
+
selector.attachments = [
|
|
68
|
+
{
|
|
69
|
+
id: 'test-1',
|
|
70
|
+
name: 'test1.txt',
|
|
71
|
+
description: 'Test file 1',
|
|
72
|
+
mimetype: 'text/plain',
|
|
73
|
+
encoding: '7bit',
|
|
74
|
+
category: 'document',
|
|
75
|
+
path: 'test1.txt',
|
|
76
|
+
bulk: '27',
|
|
77
|
+
createdAt: new Date().toISOString(),
|
|
78
|
+
updatedAt: new Date().toISOString(),
|
|
79
|
+
creatorId: 'testUser',
|
|
80
|
+
updaterId: 'testUser',
|
|
81
|
+
fullpath: 'http://localhost:16060/mcs/lv/images/test1.txt',
|
|
82
|
+
download: 'http://localhost:16060/mcs/lv/downloadFile/test1.txt'
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 'test-2',
|
|
86
|
+
name: 'test2.jpg',
|
|
87
|
+
description: 'Test image',
|
|
88
|
+
mimetype: 'image/jpeg',
|
|
89
|
+
encoding: '7bit',
|
|
90
|
+
category: 'image',
|
|
91
|
+
path: 'test2.jpg',
|
|
92
|
+
bulk: '1024',
|
|
93
|
+
createdAt: new Date().toISOString(),
|
|
94
|
+
updatedAt: new Date().toISOString(),
|
|
95
|
+
creatorId: 'testUser',
|
|
96
|
+
updaterId: 'testUser',
|
|
97
|
+
fullpath: 'http://localhost:16060/mcs/lv/images/test2.jpg',
|
|
98
|
+
download: 'http://localhost:16060/mcs/lv/downloadFile/test2.jpg'
|
|
99
|
+
}
|
|
100
|
+
];
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=restful-attachment-selector.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restful-attachment-selector.stories.js","sourceRoot":"","sources":["../../stories/restful-attachment-selector.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAE1B,OAAO,8CAA8C,CAAA;AAGrD,cAAc,CAAC,OAAO,CAAC,mBAAmB,EAAE,wBAAwB,CAAC,CAAA;AACrE,cAAc,CAAC,OAAO,CAAC,wBAAwB,EAAE,SAAS,CAAC,CAAA;AAE3D,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,sCAAsC;IAC7C,SAAS,EAAE,6BAA6B;IACxC,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC;YAC/D,WAAW,EAAE,WAAW;SACzB;QACD,SAAS,EAAE;YACT,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,cAAc;SAC5B;QACD,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,EAAE,WAAW;oBACjB,IAAI,EAAE,IAAI;oBACV,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;oBACnC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;oBACnC,SAAS,EAAE,UAAU;oBACrB,SAAS,EAAE,UAAU;oBACrB,QAAQ,EAAE,gDAAgD;oBAC1D,QAAQ,EAAE,sDAAsD;iBACjE;gBACD;oBACE,EAAE,EAAE,QAAQ;oBACZ,IAAI,EAAE,WAAW;oBACjB,WAAW,EAAE,YAAY;oBACzB,QAAQ,EAAE,YAAY;oBACtB,QAAQ,EAAE,MAAM;oBAChB,QAAQ,EAAE,OAAO;oBACjB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,MAAM;oBACZ,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;oBACnC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;oBACnC,SAAS,EAAE,UAAU;oBACrB,SAAS,EAAE,UAAU;oBACrB,QAAQ,EAAE,gDAAgD;oBAC1D,QAAQ,EAAE,sDAAsD;iBACjE;aACF,CAAA;QACH,CAAC;IACH,CAAC;CACF,CAAA","sourcesContent":["import { html } from 'lit'\nimport type { Meta, StoryObj } from '@storybook/web-components'\nimport '../src/component/restful-attachment-selector'\nimport { RestfulAttachmentSelector } from '../src/component/restful-attachment-selector'\n\nsessionStorage.setItem('lv_server_ip_port', 'http://localhost:16060')\nsessionStorage.setItem('lv_server_context_path', '/mcs/lv')\n\nconst meta = {\n title: 'Components/RestfulAttachmentSelector',\n component: 'restful-attachment-selector',\n argTypes: {\n category: {\n control: 'select',\n options: ['', 'audio', 'video', 'image', 'text', 'application'],\n description: '첨부파일 카테고리'\n },\n creatable: {\n control: 'boolean',\n description: '파일 업로드 가능 여부'\n },\n userName: {\n control: 'text',\n description: '사용자 이름'\n }\n },\n parameters: {\n layout: 'centered'\n }\n} satisfies Meta\n\nexport default meta\ntype Story = StoryObj\n\nexport const Default: Story = {\n render: args => html`\n <restful-attachment-selector\n .category=${args.category}\n .creatable=${args.creatable}\n .userName=${args.userName}\n style=\"width: 800px; height: 600px;\"\n ></restful-attachment-selector>\n `,\n args: {\n category: '',\n creatable: true,\n userName: 'testUser'\n }\n}\n\nexport const WithCategory: Story = {\n ...Default,\n args: {\n ...Default.args,\n category: 'document'\n }\n}\n\nexport const ReadOnly: Story = {\n ...Default,\n args: {\n ...Default.args,\n creatable: false\n }\n}\n\nexport const WithTestData: Story = {\n ...Default,\n args: {\n ...Default.args,\n category: 'document'\n },\n play: async ({ canvasElement }) => {\n const selector = canvasElement.querySelector('restful-attachment-selector') as RestfulAttachmentSelector\n if (selector) {\n // 테스트 데이터 주입\n selector.attachments = [\n {\n id: 'test-1',\n name: 'test1.txt',\n description: 'Test file 1',\n mimetype: 'text/plain',\n encoding: '7bit',\n category: 'document',\n path: 'test1.txt',\n bulk: '27',\n createdAt: new Date().toISOString(),\n updatedAt: new Date().toISOString(),\n creatorId: 'testUser',\n updaterId: 'testUser',\n fullpath: 'http://localhost:16060/mcs/lv/images/test1.txt',\n download: 'http://localhost:16060/mcs/lv/downloadFile/test1.txt'\n },\n {\n id: 'test-2',\n name: 'test2.jpg',\n description: 'Test image',\n mimetype: 'image/jpeg',\n encoding: '7bit',\n category: 'image',\n path: 'test2.jpg',\n bulk: '1024',\n createdAt: new Date().toISOString(),\n updatedAt: new Date().toISOString(),\n creatorId: 'testUser',\n updaterId: 'testUser',\n fullpath: 'http://localhost:16060/mcs/lv/images/test2.jpg',\n download: 'http://localhost:16060/mcs/lv/downloadFile/test2.jpg'\n }\n ]\n }\n }\n}\n"]}
|