@operato/property-panel 9.2.1 → 10.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -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/ox-property-panel.d.ts +8 -0
- package/dist/src/ox-property-panel.js +44 -3
- package/dist/src/ox-property-panel.js.map +1 -1
- package/dist/src/property-panel/abstract-property.js +1 -0
- package/dist/src/property-panel/abstract-property.js.map +1 -1
- package/dist/src/property-panel/data-binding/data-binding-mapper.js +1 -1
- package/dist/src/property-panel/data-binding/data-binding-mapper.js.map +1 -1
- package/dist/src/property-panel/data-binding/data-binding.js.map +1 -1
- package/dist/src/property-panel/effects/property-animation.js +1 -1
- package/dist/src/property-panel/effects/property-animation.js.map +1 -1
- package/dist/src/property-panel/effects/property-event-hover.js +3 -3
- package/dist/src/property-panel/effects/property-event-hover.js.map +1 -1
- package/dist/src/property-panel/effects/property-event-tap.js +4 -4
- package/dist/src/property-panel/effects/property-event-tap.js.map +1 -1
- package/dist/src/property-panel/inspector/inspector.js +6 -6
- package/dist/src/property-panel/inspector/inspector.js.map +1 -1
- package/dist/src/property-panel/shapes/shapes.d.ts +0 -2
- package/dist/src/property-panel/shapes/shapes.js +5 -44
- package/dist/src/property-panel/shapes/shapes.js.map +1 -1
- package/dist/src/property-panel/threed/property-material3d.d.ts +27 -0
- package/dist/src/property-panel/threed/property-material3d.js +189 -0
- package/dist/src/property-panel/threed/property-material3d.js.map +1 -0
- package/dist/src/property-panel/threed/property-scene3d.d.ts +26 -0
- package/dist/src/property-panel/threed/property-scene3d.js +314 -0
- package/dist/src/property-panel/threed/property-scene3d.js.map +1 -0
- package/dist/src/property-panel/threed/threed.d.ts +17 -0
- package/dist/src/property-panel/threed/threed.js +98 -0
- package/dist/src/property-panel/threed/threed.js.map +1 -0
- package/dist/src/types.d.ts +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -9
- package/.editorconfig +0 -29
- package/.storybook/main.js +0 -5
- package/.storybook/preview.js +0 -52
- package/.storybook/server.mjs +0 -8
- package/demo/index.html +0 -30
- package/dist/stories/index.stories.d.ts +0 -22
- package/dist/stories/index.stories.js +0 -121
- package/dist/stories/index.stories.js.map +0 -1
- package/src/graphql/board.ts +0 -144
- package/src/graphql/data-subscription.ts +0 -30
- package/src/graphql/favorite-board.ts +0 -25
- package/src/graphql/group.ts +0 -138
- package/src/graphql/index.ts +0 -4
- package/src/graphql/play-group.ts +0 -225
- package/src/graphql/scenario.ts +0 -79
- package/src/index.ts +0 -8
- package/src/ox-property-panel.ts +0 -347
- package/src/property-panel/abstract-property.ts +0 -65
- package/src/property-panel/data-binding/data-binding-mapper.ts +0 -408
- package/src/property-panel/data-binding/data-binding-value-map.ts +0 -19
- package/src/property-panel/data-binding/data-binding-value-range.ts +0 -19
- package/src/property-panel/data-binding/data-binding.ts +0 -470
- package/src/property-panel/effects/effects.ts +0 -77
- package/src/property-panel/effects/property-animation.ts +0 -155
- package/src/property-panel/effects/property-animations.ts +0 -73
- package/src/property-panel/effects/property-event-hover-emphasize.ts +0 -74
- package/src/property-panel/effects/property-event-hover.ts +0 -255
- package/src/property-panel/effects/property-event-tap.ts +0 -269
- package/src/property-panel/effects/property-event.ts +0 -73
- package/src/property-panel/effects/property-shadow.ts +0 -77
- package/src/property-panel/effects/value-converter.ts +0 -17
- package/src/property-panel/inspector/inspector.ts +0 -376
- package/src/property-panel/shapes/shapes.ts +0 -379
- package/src/property-panel/specifics/specific-properties-builder.ts +0 -160
- package/src/property-panel/specifics/specifics.ts +0 -81
- package/src/property-panel/styles/styles.ts +0 -285
- package/src/types.ts +0 -63
- package/stories/index.stories.ts +0 -134
- package/tsconfig.json +0 -26
- package/web-dev-server.config.mjs +0 -27
- package/web-test-runner.config.mjs +0 -41
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@operato/property-panel",
|
|
3
3
|
"description": "Webcomponent property-panel following open-wc recommendations",
|
|
4
4
|
"author": "heartyoh",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "10.0.0-beta.2",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"module": "dist/src/index.js",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"./inspector.js": "./dist/src/property-panel/inspector/inspector.js",
|
|
27
27
|
"./shapes.js": "./dist/src/property-panel/shapes/shapes.js",
|
|
28
28
|
"./specifics.js": "./dist/src/property-panel/specifics/specifics.js",
|
|
29
|
-
"./styles.js": "./dist/src/property-panel/styles/styles.js"
|
|
29
|
+
"./styles.js": "./dist/src/property-panel/styles/styles.js",
|
|
30
|
+
"./threed.js": "./dist/src/property-panel/threed/threed.js"
|
|
30
31
|
},
|
|
31
32
|
"typesVersions": {
|
|
32
33
|
"*": {
|
|
@@ -50,6 +51,9 @@
|
|
|
50
51
|
],
|
|
51
52
|
"./styles.js": [
|
|
52
53
|
"./dist/src/property-panel/styles/styles.d.ts"
|
|
54
|
+
],
|
|
55
|
+
"./threed.js": [
|
|
56
|
+
"./dist/src/property-panel/threed/threed.d.ts"
|
|
53
57
|
]
|
|
54
58
|
}
|
|
55
59
|
},
|
|
@@ -57,17 +61,17 @@
|
|
|
57
61
|
"analyze": "cem analyze --litelement",
|
|
58
62
|
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
|
|
59
63
|
"build": "tsc && npm run analyze -- --exclude dist",
|
|
60
|
-
"
|
|
64
|
+
"prepublishOnly": "tsc && npm run analyze -- --exclude dist",
|
|
61
65
|
"storybook": "npm run build && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds -c .storybook/server.mjs\"",
|
|
62
66
|
"storybook:build": "npm run build && build-storybook"
|
|
63
67
|
},
|
|
64
68
|
"dependencies": {
|
|
65
69
|
"@material/web": "^2.0.0",
|
|
66
|
-
"@operato/attachment": "^
|
|
67
|
-
"@operato/i18n": "^
|
|
68
|
-
"@operato/input": "^
|
|
69
|
-
"@operato/styles": "^
|
|
70
|
-
"@operato/utils": "^
|
|
70
|
+
"@operato/attachment": "^10.0.0-beta.2",
|
|
71
|
+
"@operato/i18n": "^10.0.0-beta.2",
|
|
72
|
+
"@operato/input": "^10.0.0-beta.2",
|
|
73
|
+
"@operato/styles": "^10.0.0-beta.2",
|
|
74
|
+
"@operato/utils": "^10.0.0-beta.2",
|
|
71
75
|
"lit": "^3.1.2"
|
|
72
76
|
},
|
|
73
77
|
"devDependencies": {
|
|
@@ -103,5 +107,5 @@
|
|
|
103
107
|
"prettier --write"
|
|
104
108
|
]
|
|
105
109
|
},
|
|
106
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "82e48e285373112cbda6f5cf2f7dc8a279a21104"
|
|
107
111
|
}
|
package/.editorconfig
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# EditorConfig helps developers define and maintain consistent
|
|
2
|
-
# coding styles between different editors and IDEs
|
|
3
|
-
# editorconfig.org
|
|
4
|
-
|
|
5
|
-
root = true
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
[*]
|
|
9
|
-
|
|
10
|
-
# Change these settings to your own preference
|
|
11
|
-
indent_style = space
|
|
12
|
-
indent_size = 2
|
|
13
|
-
|
|
14
|
-
# We recommend you to keep these unchanged
|
|
15
|
-
end_of_line = lf
|
|
16
|
-
charset = utf-8
|
|
17
|
-
trim_trailing_whitespace = true
|
|
18
|
-
insert_final_newline = true
|
|
19
|
-
|
|
20
|
-
[*.md]
|
|
21
|
-
trim_trailing_whitespace = false
|
|
22
|
-
|
|
23
|
-
[*.json]
|
|
24
|
-
indent_size = 2
|
|
25
|
-
|
|
26
|
-
[*.{html,js,md}]
|
|
27
|
-
block_comment_start = /**
|
|
28
|
-
block_comment = *
|
|
29
|
-
block_comment_end = */
|
package/.storybook/main.js
DELETED
package/.storybook/preview.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { i18next } from '@operato/i18n'
|
|
2
|
-
|
|
3
|
-
export const globalTypes = {
|
|
4
|
-
locale: {
|
|
5
|
-
name: 'Locale',
|
|
6
|
-
description: 'Internationalization locale',
|
|
7
|
-
toolbar: {
|
|
8
|
-
icon: 'globe',
|
|
9
|
-
items: [
|
|
10
|
-
{ value: 'en', right: '🇺🇸', title: 'English' },
|
|
11
|
-
{ value: 'ko', right: '🇰🇷', title: '한국어' },
|
|
12
|
-
{ value: 'zh', right: '🇨🇳', title: '中文' },
|
|
13
|
-
{ value: 'ja', right: '🇯🇵', title: '日本語' },
|
|
14
|
-
{ value: 'ms', right: '🇲🇾', title: 'Bahasa Melayu' }
|
|
15
|
-
],
|
|
16
|
-
showName: true
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
theme: {
|
|
20
|
-
name: 'Theme',
|
|
21
|
-
description: 'Global theme for components',
|
|
22
|
-
toolbar: {
|
|
23
|
-
icon: 'paintbrush',
|
|
24
|
-
items: [
|
|
25
|
-
{ value: 'light', title: 'Light' },
|
|
26
|
-
{ value: 'dark', title: 'Dark' }
|
|
27
|
-
],
|
|
28
|
-
showName: true
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export const decorators = [
|
|
34
|
-
(Story, context) => {
|
|
35
|
-
const { locale, theme } = context.globals
|
|
36
|
-
|
|
37
|
-
if (locale) {
|
|
38
|
-
i18next.changeLanguage(locale)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Set the theme class for the document
|
|
42
|
-
if (theme === 'dark') {
|
|
43
|
-
document.documentElement.classList.add('dark')
|
|
44
|
-
document.documentElement.classList.remove('light')
|
|
45
|
-
} else {
|
|
46
|
-
document.documentElement.classList.add('light')
|
|
47
|
-
document.documentElement.classList.remove('dark')
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return Story()
|
|
51
|
-
}
|
|
52
|
-
]
|
package/.storybook/server.mjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { storybookPlugin } from '@web/dev-server-storybook';
|
|
2
|
-
import baseConfig from '../web-dev-server.config.mjs';
|
|
3
|
-
|
|
4
|
-
export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
|
|
5
|
-
...baseConfig,
|
|
6
|
-
open: '/',
|
|
7
|
-
plugins: [storybookPlugin({ type: 'web-components' }), ...baseConfig.plugins],
|
|
8
|
-
});
|
package/demo/index.html
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en-GB">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
6
|
-
<style>
|
|
7
|
-
body {
|
|
8
|
-
background: #fafafa;
|
|
9
|
-
}
|
|
10
|
-
</style>
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<div id="demo"></div>
|
|
14
|
-
|
|
15
|
-
<script type="module">
|
|
16
|
-
import { html, render } from 'lit';
|
|
17
|
-
import '../dist/src/ox-property-panel.js';
|
|
18
|
-
|
|
19
|
-
const header = 'Hello owc World!';
|
|
20
|
-
render(
|
|
21
|
-
html`
|
|
22
|
-
<ox-property-panel .header=${header}>
|
|
23
|
-
some light-dom
|
|
24
|
-
</ox-property-panel>
|
|
25
|
-
`,
|
|
26
|
-
document.querySelector('#demo')
|
|
27
|
-
);
|
|
28
|
-
</script>
|
|
29
|
-
</body>
|
|
30
|
-
</html>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { TemplateResult } from 'lit';
|
|
2
|
-
import '../src/ox-property-panel.js';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: string;
|
|
6
|
-
argTypes: {
|
|
7
|
-
model: {
|
|
8
|
-
control: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export default _default;
|
|
13
|
-
interface Story<T> {
|
|
14
|
-
(args: T): TemplateResult;
|
|
15
|
-
args?: Partial<T>;
|
|
16
|
-
argTypes?: Record<string, unknown>;
|
|
17
|
-
}
|
|
18
|
-
interface ArgTypes {
|
|
19
|
-
model?: any;
|
|
20
|
-
}
|
|
21
|
-
export declare const Regular: Story<ArgTypes>;
|
|
22
|
-
export declare const Custom: Story<ArgTypes>;
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import '../src/ox-property-panel.js';
|
|
3
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles.js';
|
|
4
|
-
export default {
|
|
5
|
-
title: 'OxPropertyPanel',
|
|
6
|
-
component: 'ox-property-panel',
|
|
7
|
-
argTypes: {
|
|
8
|
-
model: { control: 'object' }
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
const Template = ({ model }) => html `
|
|
12
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
13
|
-
|
|
14
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
|
15
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
|
16
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
17
|
-
<link href="/themes/help-theme.css" rel="stylesheet" />
|
|
18
|
-
|
|
19
|
-
<link
|
|
20
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
21
|
-
rel="stylesheet"
|
|
22
|
-
/>
|
|
23
|
-
<link
|
|
24
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
25
|
-
rel="stylesheet"
|
|
26
|
-
/>
|
|
27
|
-
<link
|
|
28
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
29
|
-
rel="stylesheet"
|
|
30
|
-
/>
|
|
31
|
-
|
|
32
|
-
<style>
|
|
33
|
-
${MDTypeScaleStyles.cssText}
|
|
34
|
-
</style>
|
|
35
|
-
|
|
36
|
-
<style>
|
|
37
|
-
#place {
|
|
38
|
-
width: 100%;
|
|
39
|
-
height: 500px;
|
|
40
|
-
text-align: center;
|
|
41
|
-
|
|
42
|
-
background-color: var(--md-sys-color-primary-container);
|
|
43
|
-
color: var(--md-sys-color-on-primary-container);
|
|
44
|
-
}
|
|
45
|
-
</style>
|
|
46
|
-
|
|
47
|
-
<ox-property-panel .model=${model}> </ox-property-panel>
|
|
48
|
-
`;
|
|
49
|
-
export const Regular = Template.bind({});
|
|
50
|
-
Regular.args = {
|
|
51
|
-
model: {
|
|
52
|
-
type: 'progress-circle',
|
|
53
|
-
cy: 100,
|
|
54
|
-
cx: 100,
|
|
55
|
-
rx: 100,
|
|
56
|
-
ry: 100,
|
|
57
|
-
value: '#{data}',
|
|
58
|
-
startAngle: 0,
|
|
59
|
-
endAngle: 360,
|
|
60
|
-
fontSize: 70,
|
|
61
|
-
strokeStyle: 'rgb(82, 199, 255)',
|
|
62
|
-
blankStrokeStyle: 'rgba(0,0,0,.2)',
|
|
63
|
-
fontFamily: 'digital',
|
|
64
|
-
fontColor: '#fff',
|
|
65
|
-
text: '#{data}',
|
|
66
|
-
alpha: 1,
|
|
67
|
-
hidden: false,
|
|
68
|
-
lineWidth: 20,
|
|
69
|
-
lineDash: 'solid',
|
|
70
|
-
lineCap: 'butt',
|
|
71
|
-
rotation: 0,
|
|
72
|
-
paddingTop: 50,
|
|
73
|
-
shadow: {
|
|
74
|
-
left: 4,
|
|
75
|
-
top: 4,
|
|
76
|
-
blurSize: 4,
|
|
77
|
-
color: 'rgba(0,0,0,.3)'
|
|
78
|
-
},
|
|
79
|
-
paddingRight: 15,
|
|
80
|
-
textAlign: 'center',
|
|
81
|
-
textFormat: '#,##0.0',
|
|
82
|
-
data: 99,
|
|
83
|
-
mappings: [],
|
|
84
|
-
locked: false,
|
|
85
|
-
fillStyle: 'rgba(76, 187, 250, 0.2)',
|
|
86
|
-
paddingLeft: 0,
|
|
87
|
-
textBaseline: null,
|
|
88
|
-
packmanStyle: true,
|
|
89
|
-
animFromBase: true,
|
|
90
|
-
bold: true,
|
|
91
|
-
refid: 45
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
export const Custom = Template.bind({});
|
|
95
|
-
Custom.args = {
|
|
96
|
-
model: {
|
|
97
|
-
type: 'rect',
|
|
98
|
-
left: 95.56740614334475,
|
|
99
|
-
top: 30.973680756104017,
|
|
100
|
-
width: 239.5904436860068,
|
|
101
|
-
height: 47.098976109215045,
|
|
102
|
-
fillStyle: 'red',
|
|
103
|
-
strokeStyle: '#000',
|
|
104
|
-
alpha: 1,
|
|
105
|
-
hidden: false,
|
|
106
|
-
lineWidth: 1,
|
|
107
|
-
lineDash: 'solid',
|
|
108
|
-
lineCap: 'butt',
|
|
109
|
-
refid: 8,
|
|
110
|
-
rotation: 0,
|
|
111
|
-
id: 'a',
|
|
112
|
-
mappings: [
|
|
113
|
-
{
|
|
114
|
-
rule: 'value',
|
|
115
|
-
target: '(self)',
|
|
116
|
-
property: 'text'
|
|
117
|
-
}
|
|
118
|
-
]
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
//# sourceMappingURL=index.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../stories/index.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,6BAA6B,CAAA;AACpC,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,iDAAiD,CAAA;AAE7F,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,mBAAmB;IAC9B,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;KAC7B;CACF,CAAA;AAYD,MAAM,QAAQ,GAAoB,CAAC,EAAE,KAAK,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;MAsBzD,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;8BAcD,KAAK;CAClC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,KAAK,EAAE;QACL,IAAI,EAAE,iBAAiB;QACvB,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,GAAG;QACP,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,CAAC;QACb,QAAQ,EAAE,GAAG;QACb,QAAQ,EAAE,EAAE;QACZ,WAAW,EAAE,mBAAmB;QAChC,gBAAgB,EAAE,gBAAgB;QAClC,UAAU,EAAE,SAAS;QACrB,SAAS,EAAE,MAAM;QACjB,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK;QACb,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE,CAAC;QACX,UAAU,EAAE,EAAE;QACd,MAAM,EAAE;YACN,IAAI,EAAE,CAAC;YACP,GAAG,EAAE,CAAC;YACN,QAAQ,EAAE,CAAC;YACX,KAAK,EAAE,gBAAgB;SACxB;QACD,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,SAAS;QACrB,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,KAAK;QACb,SAAS,EAAE,yBAAyB;QACpC,WAAW,EAAE,CAAC;QACd,YAAY,EAAE,IAAI;QAClB,YAAY,EAAE,IAAI;QAClB,YAAY,EAAE,IAAI;QAClB,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,EAAE;KACV;CACF,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACvC,MAAM,CAAC,IAAI,GAAG;IACZ,KAAK,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,iBAAiB;QACvB,GAAG,EAAE,kBAAkB;QACvB,KAAK,EAAE,iBAAiB;QACxB,MAAM,EAAE,kBAAkB;QAC1B,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,MAAM;QACnB,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK;QACb,SAAS,EAAE,CAAC;QACZ,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,MAAM;QACf,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,CAAC;QACX,EAAE,EAAE,GAAG;QACP,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,QAAQ;gBAChB,QAAQ,EAAE,MAAM;aACjB;SACF;KACF;CACF,CAAA","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport '../src/ox-property-panel.js'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles.js'\n\nexport default {\n title: 'OxPropertyPanel',\n component: 'ox-property-panel',\n argTypes: {\n model: { control: 'object' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n model?: any\n}\n\nconst Template: Story<ArgTypes> = ({ model }: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n <link href=\"/themes/help-theme.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n #place {\n width: 100%;\n height: 500px;\n text-align: center;\n\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n </style>\n\n <ox-property-panel .model=${model}> </ox-property-panel>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n model: {\n type: 'progress-circle',\n cy: 100,\n cx: 100,\n rx: 100,\n ry: 100,\n value: '#{data}',\n startAngle: 0,\n endAngle: 360,\n fontSize: 70,\n strokeStyle: 'rgb(82, 199, 255)',\n blankStrokeStyle: 'rgba(0,0,0,.2)',\n fontFamily: 'digital',\n fontColor: '#fff',\n text: '#{data}',\n alpha: 1,\n hidden: false,\n lineWidth: 20,\n lineDash: 'solid',\n lineCap: 'butt',\n rotation: 0,\n paddingTop: 50,\n shadow: {\n left: 4,\n top: 4,\n blurSize: 4,\n color: 'rgba(0,0,0,.3)'\n },\n paddingRight: 15,\n textAlign: 'center',\n textFormat: '#,##0.0',\n data: 99,\n mappings: [],\n locked: false,\n fillStyle: 'rgba(76, 187, 250, 0.2)',\n paddingLeft: 0,\n textBaseline: null,\n packmanStyle: true,\n animFromBase: true,\n bold: true,\n refid: 45\n }\n}\n\nexport const Custom = Template.bind({})\nCustom.args = {\n model: {\n type: 'rect',\n left: 95.56740614334475,\n top: 30.973680756104017,\n width: 239.5904436860068,\n height: 47.098976109215045,\n fillStyle: 'red',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt',\n refid: 8,\n rotation: 0,\n id: 'a',\n mappings: [\n {\n rule: 'value',\n target: '(self)',\n property: 'text'\n }\n ]\n }\n}\n"]}
|
package/src/graphql/board.ts
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { buildArgs, client } from '@operato/graphql'
|
|
2
|
-
|
|
3
|
-
import { Board } from '../types.js'
|
|
4
|
-
import gql from 'graphql-tag'
|
|
5
|
-
|
|
6
|
-
export async function fetchBoardList(listParam = {}) {
|
|
7
|
-
const response = await client.query({
|
|
8
|
-
query: gql`
|
|
9
|
-
{
|
|
10
|
-
boards(${buildArgs(listParam)}) {
|
|
11
|
-
items {
|
|
12
|
-
id
|
|
13
|
-
name
|
|
14
|
-
description
|
|
15
|
-
thumbnail
|
|
16
|
-
createdAt
|
|
17
|
-
updatedAt
|
|
18
|
-
}
|
|
19
|
-
total
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
`
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
return response.data
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export async function fetchBoard(id: string) {
|
|
29
|
-
const response = await client.query({
|
|
30
|
-
query: gql`
|
|
31
|
-
query FetchBoardById($id: String!) {
|
|
32
|
-
board(id: $id) {
|
|
33
|
-
id
|
|
34
|
-
name
|
|
35
|
-
description
|
|
36
|
-
group {
|
|
37
|
-
id
|
|
38
|
-
name
|
|
39
|
-
}
|
|
40
|
-
thumbnail
|
|
41
|
-
model
|
|
42
|
-
createdAt
|
|
43
|
-
creator {
|
|
44
|
-
id
|
|
45
|
-
name
|
|
46
|
-
}
|
|
47
|
-
updatedAt
|
|
48
|
-
updater {
|
|
49
|
-
id
|
|
50
|
-
name
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
`,
|
|
55
|
-
variables: { id }
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
return response.data
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export async function createBoard(board: Board) {
|
|
62
|
-
/*
|
|
63
|
-
input NewBoard {
|
|
64
|
-
name : String!
|
|
65
|
-
description : String
|
|
66
|
-
model : String!
|
|
67
|
-
groupId : String!
|
|
68
|
-
}
|
|
69
|
-
*/
|
|
70
|
-
|
|
71
|
-
board.model = JSON.stringify(board.model)
|
|
72
|
-
|
|
73
|
-
const response = await client.mutate({
|
|
74
|
-
mutation: gql`
|
|
75
|
-
mutation CreateBoard($board: NewBoard!) {
|
|
76
|
-
createBoard(board: $board) {
|
|
77
|
-
id
|
|
78
|
-
name
|
|
79
|
-
description
|
|
80
|
-
model
|
|
81
|
-
createdAt
|
|
82
|
-
updatedAt
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
`,
|
|
86
|
-
variables: {
|
|
87
|
-
board
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
return response.data
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export async function updateBoard(board: Board) {
|
|
95
|
-
/*
|
|
96
|
-
input BoardPatch {
|
|
97
|
-
name : String
|
|
98
|
-
description : String
|
|
99
|
-
model : String
|
|
100
|
-
}
|
|
101
|
-
*/
|
|
102
|
-
var { id, name, description, model, groupId } = board
|
|
103
|
-
model = JSON.stringify(model)
|
|
104
|
-
|
|
105
|
-
const response = await client.mutate({
|
|
106
|
-
mutation: gql`
|
|
107
|
-
mutation UpdateBoard($id: String!, $patch: BoardPatch!) {
|
|
108
|
-
updateBoard(id: $id, patch: $patch) {
|
|
109
|
-
id
|
|
110
|
-
name
|
|
111
|
-
description
|
|
112
|
-
model
|
|
113
|
-
group {
|
|
114
|
-
id
|
|
115
|
-
name
|
|
116
|
-
}
|
|
117
|
-
createdAt
|
|
118
|
-
updatedAt
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
`,
|
|
122
|
-
variables: {
|
|
123
|
-
id,
|
|
124
|
-
patch: { name, description, model, groupId }
|
|
125
|
-
}
|
|
126
|
-
})
|
|
127
|
-
|
|
128
|
-
return response.data
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export async function deleteBoard(id: string) {
|
|
132
|
-
const response = await client.mutate({
|
|
133
|
-
mutation: gql`
|
|
134
|
-
mutation ($id: String!) {
|
|
135
|
-
deleteBoard(id: $id)
|
|
136
|
-
}
|
|
137
|
-
`,
|
|
138
|
-
variables: {
|
|
139
|
-
id
|
|
140
|
-
}
|
|
141
|
-
})
|
|
142
|
-
|
|
143
|
-
return response.data
|
|
144
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Component, DataSubscriptionProvider } from '@hatiolab/things-scene'
|
|
2
|
-
|
|
3
|
-
import gql from 'graphql-tag'
|
|
4
|
-
import { subscribe } from '@operato/graphql'
|
|
5
|
-
|
|
6
|
-
export class DataSubscriptionProviderImpl implements DataSubscriptionProvider {
|
|
7
|
-
async subscribe(tag: string, component: Component) {
|
|
8
|
-
return await subscribe(
|
|
9
|
-
{
|
|
10
|
-
query: gql`
|
|
11
|
-
subscription {
|
|
12
|
-
data(tag: "${tag}") {
|
|
13
|
-
tag
|
|
14
|
-
data
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
`
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
next: async ({ data }: { data: any }) => {
|
|
21
|
-
if (data) {
|
|
22
|
-
component.data = data.data.data
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
dispose() {}
|
|
30
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { buildArgs, client } from '@operato/graphql'
|
|
2
|
-
|
|
3
|
-
import gql from 'graphql-tag'
|
|
4
|
-
|
|
5
|
-
export async function fetchFavoriteBoardList(listParam = {}) {
|
|
6
|
-
const response = await client.query({
|
|
7
|
-
query: gql`
|
|
8
|
-
{
|
|
9
|
-
favoriteBoards(${buildArgs(listParam)}) {
|
|
10
|
-
items {
|
|
11
|
-
id
|
|
12
|
-
name
|
|
13
|
-
description
|
|
14
|
-
thumbnail
|
|
15
|
-
createdAt
|
|
16
|
-
updatedAt
|
|
17
|
-
}
|
|
18
|
-
total
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
`
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
return response.data
|
|
25
|
-
}
|
package/src/graphql/group.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { BoardGroup } from '../types.js'
|
|
2
|
-
import { client } from '@operato/graphql'
|
|
3
|
-
import gql from 'graphql-tag'
|
|
4
|
-
|
|
5
|
-
export async function fetchGroup(id: string) {
|
|
6
|
-
const response = await client.query({
|
|
7
|
-
query: gql`
|
|
8
|
-
query FetchGroupById($id: String!) {
|
|
9
|
-
group(id: $id) {
|
|
10
|
-
id
|
|
11
|
-
name
|
|
12
|
-
description
|
|
13
|
-
createdAt
|
|
14
|
-
creator {
|
|
15
|
-
id
|
|
16
|
-
name
|
|
17
|
-
}
|
|
18
|
-
updatedAt
|
|
19
|
-
updater {
|
|
20
|
-
id
|
|
21
|
-
name
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
`,
|
|
26
|
-
variables: { id }
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
return response.data
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export async function updateGroup(group: BoardGroup) {
|
|
33
|
-
var { id, name, description } = group
|
|
34
|
-
|
|
35
|
-
const response = await client.mutate({
|
|
36
|
-
mutation: gql`
|
|
37
|
-
mutation UpdateGroup($id: String!, $patch: GroupPatch!) {
|
|
38
|
-
updateGroup(id: $id, patch: $patch) {
|
|
39
|
-
id
|
|
40
|
-
name
|
|
41
|
-
description
|
|
42
|
-
createdAt
|
|
43
|
-
updatedAt
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
`,
|
|
47
|
-
variables: {
|
|
48
|
-
id,
|
|
49
|
-
patch: { name, description }
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
return response.data
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export async function deleteGroup(id: string) {
|
|
57
|
-
const response = await client.mutate({
|
|
58
|
-
mutation: gql`
|
|
59
|
-
mutation ($id: String!) {
|
|
60
|
-
deleteGroup(id: $id)
|
|
61
|
-
}
|
|
62
|
-
`,
|
|
63
|
-
variables: {
|
|
64
|
-
id
|
|
65
|
-
}
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
return response.data
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export async function fetchGroupList() {
|
|
72
|
-
const response = await client.query({
|
|
73
|
-
query: gql`
|
|
74
|
-
{
|
|
75
|
-
groups {
|
|
76
|
-
items {
|
|
77
|
-
id
|
|
78
|
-
name
|
|
79
|
-
description
|
|
80
|
-
createdAt
|
|
81
|
-
updatedAt
|
|
82
|
-
}
|
|
83
|
-
total
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
`
|
|
87
|
-
})
|
|
88
|
-
|
|
89
|
-
return response.data
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export async function createGroup(group: BoardGroup) {
|
|
93
|
-
const response = await client.mutate({
|
|
94
|
-
mutation: gql`
|
|
95
|
-
mutation CreateGroup($group: NewGroup!) {
|
|
96
|
-
createGroup(group: $group) {
|
|
97
|
-
id
|
|
98
|
-
name
|
|
99
|
-
description
|
|
100
|
-
createdAt
|
|
101
|
-
updatedAt
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
`,
|
|
105
|
-
variables: { group }
|
|
106
|
-
})
|
|
107
|
-
|
|
108
|
-
return response.data
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export async function joinGroup(boardId: string, groupId: string) {
|
|
112
|
-
const response = await client.mutate({
|
|
113
|
-
mutation: gql`
|
|
114
|
-
mutation JoinGroup($id: String!, $boardIds: [String!]!) {
|
|
115
|
-
joinGroup(id: $id, boardIds: $boardIds) {
|
|
116
|
-
id
|
|
117
|
-
name
|
|
118
|
-
description
|
|
119
|
-
boards {
|
|
120
|
-
id
|
|
121
|
-
name
|
|
122
|
-
description
|
|
123
|
-
createdAt
|
|
124
|
-
updatedAt
|
|
125
|
-
}
|
|
126
|
-
createdAt
|
|
127
|
-
updatedAt
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
`,
|
|
131
|
-
variables: {
|
|
132
|
-
id: groupId,
|
|
133
|
-
boardIds: [boardId]
|
|
134
|
-
}
|
|
135
|
-
})
|
|
136
|
-
|
|
137
|
-
return response.data
|
|
138
|
-
}
|
package/src/graphql/index.ts
DELETED