@operato/scene-progressbar 9.0.0-beta.0 → 9.0.0-beta.15
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/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/progress-circle.js +8 -4
- package/dist/progress-circle.js.map +1 -1
- package/dist/progress-horizontal.js +8 -4
- package/dist/progress-horizontal.js.map +1 -1
- package/dist/progress-vertical.js +8 -4
- package/dist/progress-vertical.js.map +1 -1
- package/package.json +7 -6
package/dist/index.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export { default as ProgressCircle } from './progress-circle';
|
2
|
-
export { default as ProgressVertical } from './progress-vertical';
|
3
|
-
export { default as ProgressHorizontal } from './progress-horizontal';
|
1
|
+
export { default as ProgressCircle } from './progress-circle.js';
|
2
|
+
export { default as ProgressVertical } from './progress-vertical.js';
|
3
|
+
export { default as ProgressHorizontal } from './progress-horizontal.js';
|
package/dist/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export { default as ProgressCircle } from './progress-circle';
|
2
|
-
export { default as ProgressVertical } from './progress-vertical';
|
3
|
-
export { default as ProgressHorizontal } from './progress-horizontal';
|
1
|
+
export { default as ProgressCircle } from './progress-circle.js';
|
2
|
+
export { default as ProgressVertical } from './progress-vertical.js';
|
3
|
+
export { default as ProgressHorizontal } from './progress-horizontal.js';
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA","sourcesContent":["export { default as ProgressCircle } from './progress-circle.js'\nexport { default as ProgressVertical } from './progress-vertical.js'\nexport { default as ProgressHorizontal } from './progress-horizontal.js'\n"]}
|
package/dist/progress-circle.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
import {
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { Ellipse, ValueHolder, sceneComponent } from '@hatiolab/things-scene';
|
2
3
|
const NATURE = {
|
3
4
|
mutable: false,
|
4
5
|
resizable: true,
|
@@ -37,7 +38,7 @@ const NATURE = {
|
|
37
38
|
],
|
38
39
|
help: 'scene/component/progress-circle'
|
39
40
|
};
|
40
|
-
|
41
|
+
let ProgressCircle = class ProgressCircle extends ValueHolder(Ellipse) {
|
41
42
|
render(context) {
|
42
43
|
var { startAngle = 0, endAngle = 360, lineWidth = 20, blankStrokeStyle, cx, cy, rx, ry, packmanStyle = false, animFromBase = false } = this.state;
|
43
44
|
this.animOnValueChange(this.value, animFromBase, 0);
|
@@ -74,6 +75,9 @@ export default class ProgressCircle extends ValueHolder(Ellipse) {
|
|
74
75
|
get nature() {
|
75
76
|
return NATURE;
|
76
77
|
}
|
77
|
-
}
|
78
|
-
|
78
|
+
};
|
79
|
+
ProgressCircle = __decorate([
|
80
|
+
sceneComponent('progress-circle')
|
81
|
+
], ProgressCircle);
|
82
|
+
export default ProgressCircle;
|
79
83
|
//# sourceMappingURL=progress-circle.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"progress-circle.js","sourceRoot":"","sources":["../src/progress-circle.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"progress-circle.js","sourceRoot":"","sources":["../src/progress-circle.ts"],"names":[],"mappings":";AAAA,OAAO,EAA8B,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wBAAw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AC9F,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QAEtB,OAAO,CAAC,SAAS,EAAE,CAAA;QAEnB,OAAO,CAAC,SAAS,EAAE,CAAA;QAEnB,sBAAsB;QAEtB,OAAO,CAAC,OAAO,CACb,EAAE,EACF,EAAE,EACF,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EACZ,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EACZ,CAAC,EACD,kBAAkB,EAClB,kBAAkB,GAAG,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,GAAG,OAAO,CACvE,CAAA;QAED,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;IAC1B,CAAC;IAED,UAAU,CAAC,OAAiC;QAC1C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AA7EoB,cAAc;IADlC,cAAc,CAAC,iBAAiB,CAAC;GACb,cAAc,CA6ElC;eA7EoB,cAAc","sourcesContent":["import { Component, ComponentNature, Ellipse, ValueHolder, sceneComponent } from '@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'value',\n name: 'value'\n },\n {\n type: 'number',\n label: 'start-angle',\n name: 'startAngle'\n },\n {\n type: 'number',\n label: 'end-angle',\n name: 'endAngle'\n },\n {\n type: 'color',\n label: 'blank-stroke-style',\n name: 'blankStrokeStyle'\n },\n {\n type: 'checkbox',\n label: 'packman-style',\n name: 'packmanStyle'\n },\n {\n type: 'checkbox',\n label: 'anim-from-base',\n name: 'animFromBase'\n }\n ],\n help: 'scene/component/progress-circle'\n}\n\n@sceneComponent('progress-circle')\nexport default class ProgressCircle extends ValueHolder(Ellipse) {\n render(context: CanvasRenderingContext2D) {\n var {\n startAngle = 0,\n endAngle = 360,\n lineWidth = 20,\n blankStrokeStyle,\n cx,\n cy,\n rx,\n ry,\n packmanStyle = false,\n animFromBase = false\n } = this.state\n\n this.animOnValueChange(this.value, animFromBase, 0)\n\n const RADIAN = 0.0174533 / Math.PI\n\n context.beginPath()\n this.drawStroke(context)\n // Angle마다 '-90'와 '-0.5 * Math.PI'가 있는 이유는 0도를 시계의 12시 방향으로 맞추기 위함.\n var startAngleToRadian = (startAngle - 90) * RADIAN * Math.PI\n var endAngleToRadian = (endAngle - 90) * RADIAN * Math.PI\n\n //// / 바깥쪽 원 그리기 ////\n context.strokeStyle = blankStrokeStyle\n context.ellipse(cx, cy, Math.abs(rx), Math.abs(ry), 0, startAngleToRadian, endAngleToRadian)\n\n context.lineWidth = lineWidth\n context.stroke()\n\n var percent = Math.min(Math.max(this.animValue / 100, 0), 100)\n\n context.beginPath()\n if (packmanStyle) {\n context.ellipse(\n cx,\n cy,\n Math.abs(rx),\n Math.abs(ry),\n 0,\n startAngleToRadian,\n startAngleToRadian + (endAngleToRadian - startAngleToRadian) * percent\n )\n context.lineTo(cx, cy)\n } else {\n context.ellipse(cx, cy, Math.abs(rx), Math.abs(ry), 0, startAngleToRadian, endAngleToRadian)\n }\n this.drawFill(context)\n\n context.closePath()\n\n context.beginPath()\n\n //// 채워지는 원 그리기 ////\n\n context.ellipse(\n cx,\n cy,\n Math.abs(rx),\n Math.abs(ry),\n 0,\n startAngleToRadian,\n startAngleToRadian + (endAngleToRadian - startAngleToRadian) * percent\n )\n\n this.drawStroke(context)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n this.drawText(context)\n }\n\n get nature() {\n return NATURE\n }\n}\n"]}
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import {
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { RectPath, Shape, ValueHolder, sceneComponent } from '@hatiolab/things-scene';
|
2
3
|
const NATURE = {
|
3
4
|
mutable: false,
|
4
5
|
resizable: true,
|
@@ -30,7 +31,7 @@ const NATURE = {
|
|
30
31
|
],
|
31
32
|
help: 'scene/component/progress-horizontal'
|
32
33
|
};
|
33
|
-
|
34
|
+
let ProgressHorizontal = class ProgressHorizontal extends ValueHolder(RectPath(Shape)) {
|
34
35
|
render(context) {
|
35
36
|
var { top, left, height, width, backgroundColor = 'transparent', reverse, animFromBase = false } = this.state;
|
36
37
|
this.animOnValueChange(this.value, animFromBase, 0);
|
@@ -61,6 +62,9 @@ export default class ProgressHorizontal extends ValueHolder(RectPath(Shape)) {
|
|
61
62
|
get nature() {
|
62
63
|
return NATURE;
|
63
64
|
}
|
64
|
-
}
|
65
|
-
|
65
|
+
};
|
66
|
+
ProgressHorizontal = __decorate([
|
67
|
+
sceneComponent('progress-horizontal')
|
68
|
+
], ProgressHorizontal);
|
69
|
+
export default ProgressHorizontal;
|
66
70
|
//# sourceMappingURL=progress-horizontal.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"progress-horizontal.js","sourceRoot":"","sources":["../src/progress-horizontal.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"progress-horizontal.js","sourceRoot":"","sources":["../src/progress-horizontal.ts"],"names":[],"mappings":";AAAA,OAAO,EAA8B,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEjH,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,OAAO;SAClB;QACD;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,kBAAkB;YACzB,IAAI,EAAE,iBAAiB;YACvB,QAAQ,EAAE,iBAAiB;SAC5B;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,SAAS;SACpB;Q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GAAG,SAAS,EAAE,GAAG,EAAE,KAAK,GAAG,SAAS,EAAE,MAAM,CAAC,CAAA;QAEnE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QAEtB,OAAO,CAAC,SAAS,EAAE,CAAA;QAEnB,OAAO,CAAC,SAAS,EAAE,CAAA;QAEnB,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;IACxC,CAAC;IAED,UAAU,CAAC,OAAiC;QAC1C,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;QACxB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxB,CAAC;IAED,oBAAoB;IAEpB,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AA1CoB,kBAAkB;IADtC,cAAc,CAAC,qBAAqB,CAAC;GACjB,kBAAkB,CA0CtC;eA1CoB,kBAAkB","sourcesContent":["import { Component, ComponentNature, RectPath, Shape, ValueHolder, sceneComponent } from '@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'value',\n name: 'value',\n property: 'value'\n },\n {\n type: 'color',\n label: 'background-color',\n name: 'backgroundColor',\n property: 'backgroundColor'\n },\n {\n type: 'checkbox',\n label: 'reverse',\n name: 'reverse',\n property: 'reverse'\n },\n {\n type: 'checkbox',\n label: 'anim-from-base',\n name: 'animFromBase'\n }\n ],\n help: 'scene/component/progress-horizontal'\n}\n\n@sceneComponent('progress-horizontal')\nexport default class ProgressHorizontal extends ValueHolder(RectPath(Shape)) {\n render(context: CanvasRenderingContext2D) {\n var { top, left, height, width, backgroundColor = 'transparent', reverse, animFromBase = false } = this.state\n\n this.animOnValueChange(this.value, animFromBase, 0)\n\n // background의 색상\n context.beginPath()\n context.rect(left, top, width, height)\n\n context.fillStyle = backgroundColor\n context.fill()\n\n // value의 색상\n context.beginPath()\n\n var drawValue = width - (width * Math.max(Math.min(this.animValue, 100), 0)) / 100\n drawValue = Math.max(Math.min(drawValue, width), 0) // DrawValue도 높이보다 작거나 커지지 말아야 한다.\n\n // 그리는 값의 방향을 지정\n if (reverse) context.rect(left, top, width - drawValue, height)\n else context.rect(left + drawValue, top, width - drawValue, height)\n\n this.drawFill(context)\n\n context.closePath()\n\n context.beginPath()\n\n context.rect(left, top, width, height)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n this.drawStroke(context)\n this.drawText(context)\n }\n\n // get controls() {}\n\n get nature() {\n return NATURE\n }\n}\n"]}
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import {
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { RectPath, Shape, ValueHolder, sceneComponent } from '@hatiolab/things-scene';
|
2
3
|
const NATURE = {
|
3
4
|
mutable: false,
|
4
5
|
resizable: true,
|
@@ -24,7 +25,7 @@ const NATURE = {
|
|
24
25
|
],
|
25
26
|
help: 'scene/component/progress-vertical'
|
26
27
|
};
|
27
|
-
|
28
|
+
let ProgressVertical = class ProgressVertical extends ValueHolder(RectPath(Shape)) {
|
28
29
|
render(context) {
|
29
30
|
var { top, left, height, width, backgroundColor = 'transparent', animFromBase = false } = this.state;
|
30
31
|
this.animOnValueChange(this.value, animFromBase, 0);
|
@@ -50,6 +51,9 @@ export default class ProgressVertical extends ValueHolder(RectPath(Shape)) {
|
|
50
51
|
get nature() {
|
51
52
|
return NATURE;
|
52
53
|
}
|
53
|
-
}
|
54
|
-
|
54
|
+
};
|
55
|
+
ProgressVertical = __decorate([
|
56
|
+
sceneComponent('progress-vertical')
|
57
|
+
], ProgressVertical);
|
58
|
+
export default ProgressVertical;
|
55
59
|
//# sourceMappingURL=progress-vertical.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"progress-vertical.js","sourceRoot":"","sources":["../src/progress-vertical.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"progress-vertical.js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AG,MAAM,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAA;QACpF,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAA,CAAC,kCAAkC;QACvF,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;QAE9D,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QAEtB,OAAO,CAAC,SAAS,EAAE,CAAA;QAEnB,OAAO,CAAC,SAAS,EAAE,CAAA;QAEnB,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;IACxC,CAAC;IAED,UAAU,CAAC,OAAiC;QAC1C,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;QACxB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AArCoB,gBAAgB;IADpC,cAAc,CAAC,mBAAmB,CAAC;GACf,gBAAgB,CAqCpC;eArCoB,gBAAgB","sourcesContent":["import { Component, ComponentNature, RectPath, Shape, ValueHolder, sceneComponent } from '@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'value',\n name: 'value',\n property: 'value'\n },\n {\n type: 'color',\n label: 'background-color',\n name: 'backgroundColor',\n property: 'backgroundColor'\n },\n {\n type: 'checkbox',\n label: 'anim-from-base',\n name: 'animFromBase'\n }\n ],\n help: 'scene/component/progress-vertical'\n}\n\n@sceneComponent('progress-vertical')\nexport default class ProgressVertical extends ValueHolder(RectPath(Shape)) {\n render(context: CanvasRenderingContext2D) {\n var { top, left, height, width, backgroundColor = 'transparent', animFromBase = false } = this.state\n\n this.animOnValueChange(this.value, animFromBase, 0)\n\n // background의 색상\n context.beginPath()\n context.rect(left, top, width, height)\n\n context.fillStyle = backgroundColor\n context.fill()\n\n // value의 색상\n context.beginPath()\n\n var drawValue = height - (height * Math.max(Math.min(this.animValue, 100), 0)) / 100\n drawValue = Math.max(Math.min(drawValue, height), 0) // DrawValue도 높이보다 작거나 커지지 말아야 한다.\n context.rect(left, top + drawValue, width, height - drawValue)\n\n this.drawFill(context)\n\n context.closePath()\n\n context.beginPath()\n\n context.rect(left, top, width, height)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n this.drawStroke(context)\n this.drawText(context)\n }\n\n get nature() {\n return NATURE\n }\n}\n"]}
|
package/package.json
CHANGED
@@ -2,7 +2,8 @@
|
|
2
2
|
"name": "@operato/scene-progressbar",
|
3
3
|
"description": "Progressbar component for things-scene",
|
4
4
|
"author": "heartyoh",
|
5
|
-
"version": "9.0.0-beta.
|
5
|
+
"version": "9.0.0-beta.15",
|
6
|
+
"type": "module",
|
6
7
|
"main": "dist/index.js",
|
7
8
|
"module": "dist/index.js",
|
8
9
|
"license": "MIT",
|
@@ -31,14 +32,14 @@
|
|
31
32
|
},
|
32
33
|
"devDependencies": {
|
33
34
|
"@hatiolab/prettier-config": "^1.0.0",
|
34
|
-
"@things-factory/builder": "^
|
35
|
-
"@things-factory/operato-board": "^
|
35
|
+
"@things-factory/builder": "^9.0.0-beta",
|
36
|
+
"@things-factory/operato-board": "^9.0.0-beta",
|
36
37
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
37
38
|
"@typescript-eslint/parser": "^4.33.0",
|
38
39
|
"@web/dev-server": "^0.1.28",
|
39
40
|
"concurrently": "^8.0.1",
|
40
|
-
"eslint": "^
|
41
|
-
"eslint-config-prettier": "^
|
41
|
+
"eslint": "^9.18.0",
|
42
|
+
"eslint-config-prettier": "^10.0.1",
|
42
43
|
"husky": "^8.0.3",
|
43
44
|
"lint-staged": "^13.2.2",
|
44
45
|
"prettier": "^2.4.1",
|
@@ -57,5 +58,5 @@
|
|
57
58
|
"prettier --write"
|
58
59
|
]
|
59
60
|
},
|
60
|
-
"gitHead": "
|
61
|
+
"gitHead": "3a94a8a9ee8cb8de82ad331cb08b9e48d6625d31"
|
61
62
|
}
|