@operato/property-panel 9.0.0-beta.14
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/.editorconfig +29 -0
- package/.storybook/main.js +5 -0
- package/.storybook/preview.js +52 -0
- package/.storybook/server.mjs +8 -0
- package/CHANGELOG.md +11 -0
- package/LICENSE +21 -0
- package/README.md +76 -0
- package/demo/index.html +30 -0
- package/dist/src/graphql/board.d.ts +6 -0
- package/dist/src/graphql/board.js +130 -0
- package/dist/src/graphql/board.js.map +1 -0
- package/dist/src/graphql/data-subscription.d.ts +5 -0
- package/dist/src/graphql/data-subscription.js +24 -0
- package/dist/src/graphql/data-subscription.js.map +1 -0
- package/dist/src/graphql/favorite-board.d.ts +1 -0
- package/dist/src/graphql/favorite-board.js +23 -0
- package/dist/src/graphql/favorite-board.js.map +1 -0
- package/dist/src/graphql/group.d.ts +7 -0
- package/dist/src/graphql/group.js +125 -0
- package/dist/src/graphql/group.js.map +1 -0
- package/dist/src/graphql/index.d.ts +4 -0
- package/dist/src/graphql/index.js +5 -0
- package/dist/src/graphql/index.js.map +1 -0
- package/dist/src/graphql/play-group.d.ts +13 -0
- package/dist/src/graphql/play-group.js +205 -0
- package/dist/src/graphql/play-group.js.map +1 -0
- package/dist/src/graphql/scenario.d.ts +6 -0
- package/dist/src/graphql/scenario.js +69 -0
- package/dist/src/graphql/scenario.js.map +1 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.js +8 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/ox-property-panel.d.ts +46 -0
- package/dist/src/ox-property-panel.js +346 -0
- package/dist/src/ox-property-panel.js.map +1 -0
- package/dist/src/property-panel/abstract-property.d.ts +10 -0
- package/dist/src/property-panel/abstract-property.js +53 -0
- package/dist/src/property-panel/abstract-property.js.map +1 -0
- package/dist/src/property-panel/data-binding/data-binding-mapper.d.ts +58 -0
- package/dist/src/property-panel/data-binding/data-binding-mapper.js +380 -0
- package/dist/src/property-panel/data-binding/data-binding-mapper.js.map +1 -0
- package/dist/src/property-panel/data-binding/data-binding-value-map.d.ts +6 -0
- package/dist/src/property-panel/data-binding/data-binding-value-map.js +20 -0
- package/dist/src/property-panel/data-binding/data-binding-value-map.js.map +1 -0
- package/dist/src/property-panel/data-binding/data-binding-value-range.d.ts +6 -0
- package/dist/src/property-panel/data-binding/data-binding-value-range.js +20 -0
- package/dist/src/property-panel/data-binding/data-binding-value-range.js.map +1 -0
- package/dist/src/property-panel/data-binding/data-binding.d.ts +44 -0
- package/dist/src/property-panel/data-binding/data-binding.js +442 -0
- package/dist/src/property-panel/data-binding/data-binding.js.map +1 -0
- package/dist/src/property-panel/effects/effects.d.ts +24 -0
- package/dist/src/property-panel/effects/effects.js +72 -0
- package/dist/src/property-panel/effects/effects.js.map +1 -0
- package/dist/src/property-panel/effects/property-animation.d.ts +23 -0
- package/dist/src/property-panel/effects/property-animation.js +147 -0
- package/dist/src/property-panel/effects/property-animation.js.map +1 -0
- package/dist/src/property-panel/effects/property-animations.d.ts +22 -0
- package/dist/src/property-panel/effects/property-animations.js +70 -0
- package/dist/src/property-panel/effects/property-animations.js.map +1 -0
- package/dist/src/property-panel/effects/property-event-hover.d.ts +21 -0
- package/dist/src/property-panel/effects/property-event-hover.js +193 -0
- package/dist/src/property-panel/effects/property-event-hover.js.map +1 -0
- package/dist/src/property-panel/effects/property-event-tap.d.ts +36 -0
- package/dist/src/property-panel/effects/property-event-tap.js +262 -0
- package/dist/src/property-panel/effects/property-event-tap.js.map +1 -0
- package/dist/src/property-panel/effects/property-event.d.ts +22 -0
- package/dist/src/property-panel/effects/property-event.js +64 -0
- package/dist/src/property-panel/effects/property-event.js.map +1 -0
- package/dist/src/property-panel/effects/property-shadow.d.ts +23 -0
- package/dist/src/property-panel/effects/property-shadow.js +66 -0
- package/dist/src/property-panel/effects/property-shadow.js.map +1 -0
- package/dist/src/property-panel/effects/value-converter.d.ts +1 -0
- package/dist/src/property-panel/effects/value-converter.js +17 -0
- package/dist/src/property-panel/effects/value-converter.js.map +1 -0
- package/dist/src/property-panel/inspector/inspector.d.ts +27 -0
- package/dist/src/property-panel/inspector/inspector.js +357 -0
- package/dist/src/property-panel/inspector/inspector.js.map +1 -0
- package/dist/src/property-panel/shapes/shapes.d.ts +26 -0
- package/dist/src/property-panel/shapes/shapes.js +312 -0
- package/dist/src/property-panel/shapes/shapes.js.map +1 -0
- package/dist/src/property-panel/specifics/specific-properties-builder.d.ts +16 -0
- package/dist/src/property-panel/specifics/specific-properties-builder.js +138 -0
- package/dist/src/property-panel/specifics/specific-properties-builder.js.map +1 -0
- package/dist/src/property-panel/specifics/specifics.d.ts +25 -0
- package/dist/src/property-panel/specifics/specifics.js +84 -0
- package/dist/src/property-panel/specifics/specifics.js.map +1 -0
- package/dist/src/property-panel/styles/styles.d.ts +23 -0
- package/dist/src/property-panel/styles/styles.js +269 -0
- package/dist/src/property-panel/styles/styles.js.map +1 -0
- package/dist/src/types.d.ts +43 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/dist/stories/index.stories.d.ts +22 -0
- package/dist/stories/index.stories.js +121 -0
- package/dist/stories/index.stories.js.map +1 -0
- package/dist/stories/input-table-property.stories.d.ts +21 -0
- package/dist/stories/input-table-property.stories.js +84 -0
- package/dist/stories/input-table-property.stories.js.map +1 -0
- package/dist/test/ox-property-panel.test.d.ts +1 -0
- package/dist/test/ox-property-panel.test.js +24 -0
- package/dist/test/ox-property-panel.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +108 -0
- package/src/graphql/board.ts +144 -0
- package/src/graphql/data-subscription.ts +30 -0
- package/src/graphql/favorite-board.ts +25 -0
- package/src/graphql/group.ts +138 -0
- package/src/graphql/index.ts +4 -0
- package/src/graphql/play-group.ts +225 -0
- package/src/graphql/scenario.ts +79 -0
- package/src/index.ts +8 -0
- package/src/ox-property-panel.ts +347 -0
- package/src/property-panel/abstract-property.ts +67 -0
- package/src/property-panel/data-binding/data-binding-mapper.ts +412 -0
- package/src/property-panel/data-binding/data-binding-value-map.ts +19 -0
- package/src/property-panel/data-binding/data-binding-value-range.ts +19 -0
- package/src/property-panel/data-binding/data-binding.ts +464 -0
- package/src/property-panel/effects/effects.ts +77 -0
- package/src/property-panel/effects/property-animation.ts +155 -0
- package/src/property-panel/effects/property-animations.ts +74 -0
- package/src/property-panel/effects/property-event-hover.ts +212 -0
- package/src/property-panel/effects/property-event-tap.ts +269 -0
- package/src/property-panel/effects/property-event.ts +73 -0
- package/src/property-panel/effects/property-shadow.ts +77 -0
- package/src/property-panel/effects/value-converter.ts +17 -0
- package/src/property-panel/inspector/inspector.ts +407 -0
- package/src/property-panel/shapes/shapes.ts +321 -0
- package/src/property-panel/specifics/specific-properties-builder.ts +152 -0
- package/src/property-panel/specifics/specifics.ts +81 -0
- package/src/property-panel/styles/styles.ts +287 -0
- package/src/types.ts +63 -0
- package/stories/index.stories.ts +134 -0
- package/stories/input-table-property.stories.ts +96 -0
- package/test/ox-property-panel.test.ts +32 -0
- package/themes/app-theme.css +138 -0
- package/themes/calendar-theme.css +61 -0
- package/themes/dark.css +51 -0
- package/themes/grist-theme.css +175 -0
- package/themes/help-theme.css +57 -0
- package/themes/layout-theme.css +94 -0
- package/themes/light.css +51 -0
- package/themes/material-theme.css +23 -0
- package/themes/md-typescale-styles.css +100 -0
- package/themes/oops-theme.css +22 -0
- package/themes/report-theme.css +47 -0
- package/themes/spacing.css +23 -0
- package/themes/state-color.css +6 -0
- package/themes/tooltip-theme.css +11 -0
- package/translations/en.json +723 -0
- package/translations/ja.json +727 -0
- package/translations/ko.json +727 -0
- package/translations/ms.json +609 -0
- package/translations/zh.json +726 -0
- package/tsconfig.json +25 -0
- package/web-dev-server.config.mjs +27 -0
- package/web-test-runner.config.mjs +41 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { client } from '@operato/graphql';
|
|
2
|
+
import gql from 'graphql-tag';
|
|
3
|
+
export async function playlists() {
|
|
4
|
+
const response = await client.query({
|
|
5
|
+
query: gql `
|
|
6
|
+
{
|
|
7
|
+
playGroups {
|
|
8
|
+
items {
|
|
9
|
+
id
|
|
10
|
+
name
|
|
11
|
+
description
|
|
12
|
+
}
|
|
13
|
+
total
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
`
|
|
17
|
+
});
|
|
18
|
+
return response.data.playGroups.items;
|
|
19
|
+
}
|
|
20
|
+
export async function fetchPlayGroupList() {
|
|
21
|
+
const response = await client.query({
|
|
22
|
+
query: gql `
|
|
23
|
+
{
|
|
24
|
+
playGroups {
|
|
25
|
+
items {
|
|
26
|
+
id
|
|
27
|
+
name
|
|
28
|
+
description
|
|
29
|
+
}
|
|
30
|
+
total
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`
|
|
34
|
+
});
|
|
35
|
+
return response.data;
|
|
36
|
+
}
|
|
37
|
+
export async function fetchPlayGroup(groupId) {
|
|
38
|
+
const response = await client.query({
|
|
39
|
+
query: gql `
|
|
40
|
+
query FetchPlayGroup($id: String!) {
|
|
41
|
+
playGroup(id: $id) {
|
|
42
|
+
id
|
|
43
|
+
name
|
|
44
|
+
description
|
|
45
|
+
boards {
|
|
46
|
+
id
|
|
47
|
+
name
|
|
48
|
+
description
|
|
49
|
+
model
|
|
50
|
+
thumbnail
|
|
51
|
+
createdAt
|
|
52
|
+
creator {
|
|
53
|
+
id
|
|
54
|
+
name
|
|
55
|
+
}
|
|
56
|
+
updatedAt
|
|
57
|
+
updater {
|
|
58
|
+
id
|
|
59
|
+
name
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
createdAt
|
|
63
|
+
creator {
|
|
64
|
+
id
|
|
65
|
+
name
|
|
66
|
+
}
|
|
67
|
+
updatedAt
|
|
68
|
+
updater {
|
|
69
|
+
id
|
|
70
|
+
name
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
`,
|
|
75
|
+
variables: {
|
|
76
|
+
id: groupId
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
return response.data;
|
|
80
|
+
}
|
|
81
|
+
export async function fetchPlayGroupByName(name) {
|
|
82
|
+
const response = await client.query({
|
|
83
|
+
query: gql `
|
|
84
|
+
query FetchPlayGroupByName($name: String!) {
|
|
85
|
+
playGroupByName(name: $name) {
|
|
86
|
+
id
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
`,
|
|
90
|
+
variables: {
|
|
91
|
+
name
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
return response.data.playGroupByName;
|
|
95
|
+
}
|
|
96
|
+
export async function createPlayGroup(group) {
|
|
97
|
+
var { name, description } = group;
|
|
98
|
+
const response = await client.mutate({
|
|
99
|
+
mutation: gql `
|
|
100
|
+
mutation CreatePlayGroup($playGroup: NewPlayGroup!) {
|
|
101
|
+
createPlayGroup(playGroup: $playGroup) {
|
|
102
|
+
id
|
|
103
|
+
name
|
|
104
|
+
description
|
|
105
|
+
createdAt
|
|
106
|
+
updatedAt
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
`,
|
|
110
|
+
variables: {
|
|
111
|
+
playGroup: { name, description }
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
return response.data;
|
|
115
|
+
}
|
|
116
|
+
export async function updatePlayGroup(group) {
|
|
117
|
+
var { id, name, description } = group;
|
|
118
|
+
const response = await client.mutate({
|
|
119
|
+
mutation: gql `
|
|
120
|
+
mutation UpdatePlayGroup($id: String!, $patch: PlayGroupPatch!) {
|
|
121
|
+
updatePlayGroup(id: $id, patch: $patch) {
|
|
122
|
+
id
|
|
123
|
+
name
|
|
124
|
+
description
|
|
125
|
+
createdAt
|
|
126
|
+
updatedAt
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
`,
|
|
130
|
+
variables: {
|
|
131
|
+
id,
|
|
132
|
+
patch: { name, description }
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
return response.data;
|
|
136
|
+
}
|
|
137
|
+
export async function deletePlayGroup(id) {
|
|
138
|
+
const response = await client.mutate({
|
|
139
|
+
mutation: gql `
|
|
140
|
+
mutation ($id: String!) {
|
|
141
|
+
deletePlayGroup(id: $id)
|
|
142
|
+
}
|
|
143
|
+
`,
|
|
144
|
+
variables: {
|
|
145
|
+
id
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
return response.data;
|
|
149
|
+
}
|
|
150
|
+
export async function joinPlayGroup(boardId, group) {
|
|
151
|
+
var { id, name, description } = group;
|
|
152
|
+
const response = await client.mutate({
|
|
153
|
+
mutation: gql `
|
|
154
|
+
mutation JoinPlayGroup($id: String!, $boardIds: [String!]!) {
|
|
155
|
+
joinPlayGroup(id: $id, boardIds: $boardIds) {
|
|
156
|
+
id
|
|
157
|
+
name
|
|
158
|
+
description
|
|
159
|
+
boards {
|
|
160
|
+
id
|
|
161
|
+
name
|
|
162
|
+
description
|
|
163
|
+
createdAt
|
|
164
|
+
updatedAt
|
|
165
|
+
}
|
|
166
|
+
createdAt
|
|
167
|
+
updatedAt
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
`,
|
|
171
|
+
variables: {
|
|
172
|
+
id,
|
|
173
|
+
boardIds: [boardId]
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
return response.data;
|
|
177
|
+
}
|
|
178
|
+
export async function leavePlayGroup(boardId, groupId) {
|
|
179
|
+
const response = await client.mutate({
|
|
180
|
+
mutation: gql `
|
|
181
|
+
mutation ($id: String!, $boardIds: [String]!) {
|
|
182
|
+
leavePlayGroup(id: $id, boardIds: $boardIds) {
|
|
183
|
+
id
|
|
184
|
+
name
|
|
185
|
+
description
|
|
186
|
+
boards {
|
|
187
|
+
id
|
|
188
|
+
name
|
|
189
|
+
description
|
|
190
|
+
createdAt
|
|
191
|
+
updatedAt
|
|
192
|
+
}
|
|
193
|
+
createdAt
|
|
194
|
+
updatedAt
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
`,
|
|
198
|
+
variables: {
|
|
199
|
+
id: groupId,
|
|
200
|
+
boardIds: [boardId]
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
return response.data;
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=play-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"play-group.js","sourceRoot":"","sources":["../../../src/graphql/play-group.ts"],"names":[],"mappings":"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","sourcesContent":["import { PlayGroup } from '../types.js'\nimport { client } from '@operato/graphql'\nimport gql from 'graphql-tag'\n\nexport async function playlists(): Promise<{ name: string; description: string }[]> {\n const response = await client.query({\n query: gql`\n {\n playGroups {\n items {\n id\n name\n description\n }\n total\n }\n }\n `\n })\n\n return response.data.playGroups.items\n}\n\nexport async function fetchPlayGroupList() {\n const response = await client.query({\n query: gql`\n {\n playGroups {\n items {\n id\n name\n description\n }\n total\n }\n }\n `\n })\n\n return response.data\n}\n\nexport async function fetchPlayGroup(groupId: string) {\n const response = await client.query({\n query: gql`\n query FetchPlayGroup($id: String!) {\n playGroup(id: $id) {\n id\n name\n description\n boards {\n id\n name\n description\n model\n thumbnail\n createdAt\n creator {\n id\n name\n }\n updatedAt\n updater {\n id\n name\n }\n }\n createdAt\n creator {\n id\n name\n }\n updatedAt\n updater {\n id\n name\n }\n }\n }\n `,\n variables: {\n id: groupId\n }\n })\n\n return response.data\n}\n\nexport async function fetchPlayGroupByName(name: string) {\n const response = await client.query({\n query: gql`\n query FetchPlayGroupByName($name: String!) {\n playGroupByName(name: $name) {\n id\n }\n }\n `,\n variables: {\n name\n }\n })\n\n return response.data.playGroupByName\n}\n\nexport async function createPlayGroup(group: PlayGroup) {\n var { name, description } = group\n\n const response = await client.mutate({\n mutation: gql`\n mutation CreatePlayGroup($playGroup: NewPlayGroup!) {\n createPlayGroup(playGroup: $playGroup) {\n id\n name\n description\n createdAt\n updatedAt\n }\n }\n `,\n variables: {\n playGroup: { name, description }\n }\n })\n\n return response.data\n}\n\nexport async function updatePlayGroup(group: PlayGroup) {\n var { id, name, description } = group\n\n const response = await client.mutate({\n mutation: gql`\n mutation UpdatePlayGroup($id: String!, $patch: PlayGroupPatch!) {\n updatePlayGroup(id: $id, patch: $patch) {\n id\n name\n description\n createdAt\n updatedAt\n }\n }\n `,\n variables: {\n id,\n patch: { name, description }\n }\n })\n\n return response.data\n}\n\nexport async function deletePlayGroup(id: string) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($id: String!) {\n deletePlayGroup(id: $id)\n }\n `,\n variables: {\n id\n }\n })\n return response.data\n}\n\nexport async function joinPlayGroup(boardId: string, group: PlayGroup) {\n var { id, name, description } = group\n\n const response = await client.mutate({\n mutation: gql`\n mutation JoinPlayGroup($id: String!, $boardIds: [String!]!) {\n joinPlayGroup(id: $id, boardIds: $boardIds) {\n id\n name\n description\n boards {\n id\n name\n description\n createdAt\n updatedAt\n }\n createdAt\n updatedAt\n }\n }\n `,\n variables: {\n id,\n boardIds: [boardId]\n }\n })\n\n return response.data\n}\n\nexport async function leavePlayGroup(boardId: string, groupId: string) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($id: String!, $boardIds: [String]!) {\n leavePlayGroup(id: $id, boardIds: $boardIds) {\n id\n name\n description\n boards {\n id\n name\n description\n createdAt\n updatedAt\n }\n createdAt\n updatedAt\n }\n }\n `,\n variables: {\n id: groupId,\n boardIds: [boardId]\n }\n })\n\n return response.data\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const scenarios: () => Promise<{
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
}[]>;
|
|
5
|
+
export declare const startScenario: (scenarioName: string, instanceName: string, variables: string | number | object) => Promise<any>;
|
|
6
|
+
export declare const runScenario: (scenarioName: string, variables: string | number | object) => Promise<any>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import gql from 'graphql-tag';
|
|
2
|
+
import { client } from '@operato/graphql';
|
|
3
|
+
export const scenarios = async () => {
|
|
4
|
+
var response = await client.query({
|
|
5
|
+
query: gql `
|
|
6
|
+
query {
|
|
7
|
+
scenarios {
|
|
8
|
+
items {
|
|
9
|
+
name
|
|
10
|
+
description
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`
|
|
15
|
+
});
|
|
16
|
+
if (response.errors) {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
return response.data.scenarios.items;
|
|
20
|
+
};
|
|
21
|
+
export const startScenario = async (scenarioName, instanceName, variables) => {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
if (!scenarioName) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (client) {
|
|
27
|
+
var response = await client.query({
|
|
28
|
+
query: gql `
|
|
29
|
+
mutation ($instanceName: String, $scenarioName: String!, $variables: Object) {
|
|
30
|
+
startScenario(instanceName: $instanceName, scenarioName: $scenarioName, variables: $variables) {
|
|
31
|
+
state
|
|
32
|
+
message
|
|
33
|
+
data
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`,
|
|
37
|
+
variables: {
|
|
38
|
+
instanceName: instanceName,
|
|
39
|
+
scenarioName: scenarioName,
|
|
40
|
+
variables
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
return (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.startScenario) === null || _b === void 0 ? void 0 : _b.data;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
export const runScenario = async (scenarioName, variables) => {
|
|
47
|
+
var _a, _b;
|
|
48
|
+
if (!scenarioName)
|
|
49
|
+
return;
|
|
50
|
+
if (client) {
|
|
51
|
+
var response = await client.query({
|
|
52
|
+
query: gql `
|
|
53
|
+
mutation ($scenarioName: String!, $variables: Object) {
|
|
54
|
+
runScenario(scenarioName: $scenarioName, variables: $variables) {
|
|
55
|
+
state
|
|
56
|
+
message
|
|
57
|
+
data
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
`,
|
|
61
|
+
variables: {
|
|
62
|
+
scenarioName: scenarioName,
|
|
63
|
+
variables
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
return (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.runScenario) === null || _b === void 0 ? void 0 : _b.data;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=scenario.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenario.js","sourceRoot":"","sources":["../../../src/graphql/scenario.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,IAAsD,EAAE;IACpF,IAAI,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;QAChC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;KAST;KACF,CAAC,CAAA;IAEF,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,OAAO,EAAE,CAAA;IACX,CAAC;IAED,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAA;AACtC,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAChC,YAAoB,EACpB,YAAoB,EACpB,SAAmC,EACnC,EAAE;;IACF,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAM;IACR,CAAC;IAED,IAAI,MAAM,EAAE,CAAC;QACX,IAAI,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;YAChC,KAAK,EAAE,GAAG,CAAA;;;;;;;;OAQT;YACD,SAAS,EAAE;gBACT,YAAY,EAAE,YAAY;gBAC1B,YAAY,EAAE,YAAY;gBAC1B,SAAS;aACV;SACF,CAAC,CAAA;QAEF,OAAO,MAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,0CAAE,aAAa,0CAAE,IAAI,CAAA;IAC5C,CAAC;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,EAAE,YAAoB,EAAE,SAAmC,EAAE,EAAE;;IAC7F,IAAI,CAAC,YAAY;QAAE,OAAM;IAEzB,IAAI,MAAM,EAAE,CAAC;QACX,IAAI,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;YAChC,KAAK,EAAE,GAAG,CAAA;;;;;;;;OAQT;YACD,SAAS,EAAE;gBACT,YAAY,EAAE,YAAY;gBAC1B,SAAS;aACV;SACF,CAAC,CAAA;QAEF,OAAO,MAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,0CAAE,WAAW,0CAAE,IAAI,CAAA;IAC1C,CAAC;AACH,CAAC,CAAA","sourcesContent":["import gql from 'graphql-tag'\n\nimport { client } from '@operato/graphql'\n\nexport const scenarios = async (): Promise<{ name: string; description: string }[]> => {\n var response = await client.query({\n query: gql`\n query {\n scenarios {\n items {\n name\n description\n }\n }\n }\n `\n })\n\n if (response.errors) {\n return []\n }\n\n return response.data.scenarios.items\n}\n\nexport const startScenario = async (\n scenarioName: string,\n instanceName: string,\n variables: string | number | object\n) => {\n if (!scenarioName) {\n return\n }\n\n if (client) {\n var response = await client.query({\n query: gql`\n mutation ($instanceName: String, $scenarioName: String!, $variables: Object) {\n startScenario(instanceName: $instanceName, scenarioName: $scenarioName, variables: $variables) {\n state\n message\n data\n }\n }\n `,\n variables: {\n instanceName: instanceName,\n scenarioName: scenarioName,\n variables\n }\n })\n\n return response?.data?.startScenario?.data\n }\n}\n\nexport const runScenario = async (scenarioName: string, variables: string | number | object) => {\n if (!scenarioName) return\n\n if (client) {\n var response = await client.query({\n query: gql`\n mutation ($scenarioName: String!, $variables: Object) {\n runScenario(scenarioName: $scenarioName, variables: $variables) {\n state\n message\n data\n }\n }\n `,\n variables: {\n scenarioName: scenarioName,\n variables\n }\n })\n\n return response?.data?.runScenario?.data\n }\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { OxPropertyPanel } from './ox-property-panel.js';
|
|
2
|
+
export * from './property-panel/data-binding/data-binding.js';
|
|
3
|
+
export * from './property-panel/effects/effects.js';
|
|
4
|
+
export * from './property-panel/inspector/inspector.js';
|
|
5
|
+
export * from './property-panel/shapes/shapes.js';
|
|
6
|
+
export * from './property-panel/specifics/specifics.js';
|
|
7
|
+
export * from './property-panel/styles/styles.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { OxPropertyPanel } from './ox-property-panel.js';
|
|
2
|
+
export * from './property-panel/data-binding/data-binding.js';
|
|
3
|
+
export * from './property-panel/effects/effects.js';
|
|
4
|
+
export * from './property-panel/inspector/inspector.js';
|
|
5
|
+
export * from './property-panel/shapes/shapes.js';
|
|
6
|
+
export * from './property-panel/specifics/specifics.js';
|
|
7
|
+
export * from './property-panel/styles/styles.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAExD,cAAc,+CAA+C,CAAA;AAC7D,cAAc,qCAAqC,CAAA;AACnD,cAAc,yCAAyC,CAAA;AACvD,cAAc,mCAAmC,CAAA;AACjD,cAAc,yCAAyC,CAAA;AACvD,cAAc,mCAAmC,CAAA","sourcesContent":["export { OxPropertyPanel } from './ox-property-panel.js'\n\nexport * from './property-panel/data-binding/data-binding.js'\nexport * from './property-panel/effects/effects.js'\nexport * from './property-panel/inspector/inspector.js'\nexport * from './property-panel/shapes/shapes.js'\nexport * from './property-panel/specifics/specifics.js'\nexport * from './property-panel/styles/styles.js'\n"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import '@material/web/icon/icon.js';
|
|
5
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
6
|
+
import { Component, Model, Scene } from '@hatiolab/things-scene';
|
|
7
|
+
import { PropertyDataBinding } from './property-panel/data-binding/data-binding.js';
|
|
8
|
+
import { PropertyEffects } from './property-panel/effects/effects.js';
|
|
9
|
+
import { SceneInspector } from './property-panel/inspector/inspector.js';
|
|
10
|
+
import { PropertyShapes } from './property-panel/shapes/shapes.js';
|
|
11
|
+
import { PropertyStyles } from './property-panel/styles/styles.js';
|
|
12
|
+
declare const OxPropertyPanel_base: typeof LitElement & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types.js").ScopedElementsHost>;
|
|
13
|
+
export declare class OxPropertyPanel extends OxPropertyPanel_base {
|
|
14
|
+
static styles: import("lit").CSSResult[];
|
|
15
|
+
scene: Scene | null;
|
|
16
|
+
bounds: any;
|
|
17
|
+
model: Model | null;
|
|
18
|
+
selected: Component[];
|
|
19
|
+
specificProps: any;
|
|
20
|
+
tabName: string | null;
|
|
21
|
+
collapsed: boolean;
|
|
22
|
+
fonts: any[];
|
|
23
|
+
propertyEditor: any[];
|
|
24
|
+
propertyTarget: Component | null;
|
|
25
|
+
firstUpdated(): void;
|
|
26
|
+
updated(change: PropertyValues<this>): void;
|
|
27
|
+
static get scopedElements(): {
|
|
28
|
+
'property-shape': typeof PropertyShapes;
|
|
29
|
+
'property-style': typeof PropertyStyles;
|
|
30
|
+
'property-effect': typeof PropertyEffects;
|
|
31
|
+
'property-data-binding': typeof PropertyDataBinding;
|
|
32
|
+
'scene-inspector': typeof SceneInspector;
|
|
33
|
+
};
|
|
34
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
35
|
+
private onPropertyChanged;
|
|
36
|
+
private onBoundsChanged;
|
|
37
|
+
private onChangedByScene;
|
|
38
|
+
private setPropertyTargetAsDefault;
|
|
39
|
+
private onCollapsed;
|
|
40
|
+
private onSceneChanged;
|
|
41
|
+
private onSelectedChanged;
|
|
42
|
+
private setPropertyTarget;
|
|
43
|
+
private setBounds;
|
|
44
|
+
private isLine;
|
|
45
|
+
}
|
|
46
|
+
export {};
|