@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.
Files changed (156) hide show
  1. package/.editorconfig +29 -0
  2. package/.storybook/main.js +5 -0
  3. package/.storybook/preview.js +52 -0
  4. package/.storybook/server.mjs +8 -0
  5. package/CHANGELOG.md +11 -0
  6. package/LICENSE +21 -0
  7. package/README.md +76 -0
  8. package/demo/index.html +30 -0
  9. package/dist/src/graphql/board.d.ts +6 -0
  10. package/dist/src/graphql/board.js +130 -0
  11. package/dist/src/graphql/board.js.map +1 -0
  12. package/dist/src/graphql/data-subscription.d.ts +5 -0
  13. package/dist/src/graphql/data-subscription.js +24 -0
  14. package/dist/src/graphql/data-subscription.js.map +1 -0
  15. package/dist/src/graphql/favorite-board.d.ts +1 -0
  16. package/dist/src/graphql/favorite-board.js +23 -0
  17. package/dist/src/graphql/favorite-board.js.map +1 -0
  18. package/dist/src/graphql/group.d.ts +7 -0
  19. package/dist/src/graphql/group.js +125 -0
  20. package/dist/src/graphql/group.js.map +1 -0
  21. package/dist/src/graphql/index.d.ts +4 -0
  22. package/dist/src/graphql/index.js +5 -0
  23. package/dist/src/graphql/index.js.map +1 -0
  24. package/dist/src/graphql/play-group.d.ts +13 -0
  25. package/dist/src/graphql/play-group.js +205 -0
  26. package/dist/src/graphql/play-group.js.map +1 -0
  27. package/dist/src/graphql/scenario.d.ts +6 -0
  28. package/dist/src/graphql/scenario.js +69 -0
  29. package/dist/src/graphql/scenario.js.map +1 -0
  30. package/dist/src/index.d.ts +7 -0
  31. package/dist/src/index.js +8 -0
  32. package/dist/src/index.js.map +1 -0
  33. package/dist/src/ox-property-panel.d.ts +46 -0
  34. package/dist/src/ox-property-panel.js +346 -0
  35. package/dist/src/ox-property-panel.js.map +1 -0
  36. package/dist/src/property-panel/abstract-property.d.ts +10 -0
  37. package/dist/src/property-panel/abstract-property.js +53 -0
  38. package/dist/src/property-panel/abstract-property.js.map +1 -0
  39. package/dist/src/property-panel/data-binding/data-binding-mapper.d.ts +58 -0
  40. package/dist/src/property-panel/data-binding/data-binding-mapper.js +380 -0
  41. package/dist/src/property-panel/data-binding/data-binding-mapper.js.map +1 -0
  42. package/dist/src/property-panel/data-binding/data-binding-value-map.d.ts +6 -0
  43. package/dist/src/property-panel/data-binding/data-binding-value-map.js +20 -0
  44. package/dist/src/property-panel/data-binding/data-binding-value-map.js.map +1 -0
  45. package/dist/src/property-panel/data-binding/data-binding-value-range.d.ts +6 -0
  46. package/dist/src/property-panel/data-binding/data-binding-value-range.js +20 -0
  47. package/dist/src/property-panel/data-binding/data-binding-value-range.js.map +1 -0
  48. package/dist/src/property-panel/data-binding/data-binding.d.ts +44 -0
  49. package/dist/src/property-panel/data-binding/data-binding.js +442 -0
  50. package/dist/src/property-panel/data-binding/data-binding.js.map +1 -0
  51. package/dist/src/property-panel/effects/effects.d.ts +24 -0
  52. package/dist/src/property-panel/effects/effects.js +72 -0
  53. package/dist/src/property-panel/effects/effects.js.map +1 -0
  54. package/dist/src/property-panel/effects/property-animation.d.ts +23 -0
  55. package/dist/src/property-panel/effects/property-animation.js +147 -0
  56. package/dist/src/property-panel/effects/property-animation.js.map +1 -0
  57. package/dist/src/property-panel/effects/property-animations.d.ts +22 -0
  58. package/dist/src/property-panel/effects/property-animations.js +70 -0
  59. package/dist/src/property-panel/effects/property-animations.js.map +1 -0
  60. package/dist/src/property-panel/effects/property-event-hover.d.ts +21 -0
  61. package/dist/src/property-panel/effects/property-event-hover.js +193 -0
  62. package/dist/src/property-panel/effects/property-event-hover.js.map +1 -0
  63. package/dist/src/property-panel/effects/property-event-tap.d.ts +36 -0
  64. package/dist/src/property-panel/effects/property-event-tap.js +262 -0
  65. package/dist/src/property-panel/effects/property-event-tap.js.map +1 -0
  66. package/dist/src/property-panel/effects/property-event.d.ts +22 -0
  67. package/dist/src/property-panel/effects/property-event.js +64 -0
  68. package/dist/src/property-panel/effects/property-event.js.map +1 -0
  69. package/dist/src/property-panel/effects/property-shadow.d.ts +23 -0
  70. package/dist/src/property-panel/effects/property-shadow.js +66 -0
  71. package/dist/src/property-panel/effects/property-shadow.js.map +1 -0
  72. package/dist/src/property-panel/effects/value-converter.d.ts +1 -0
  73. package/dist/src/property-panel/effects/value-converter.js +17 -0
  74. package/dist/src/property-panel/effects/value-converter.js.map +1 -0
  75. package/dist/src/property-panel/inspector/inspector.d.ts +27 -0
  76. package/dist/src/property-panel/inspector/inspector.js +357 -0
  77. package/dist/src/property-panel/inspector/inspector.js.map +1 -0
  78. package/dist/src/property-panel/shapes/shapes.d.ts +26 -0
  79. package/dist/src/property-panel/shapes/shapes.js +312 -0
  80. package/dist/src/property-panel/shapes/shapes.js.map +1 -0
  81. package/dist/src/property-panel/specifics/specific-properties-builder.d.ts +16 -0
  82. package/dist/src/property-panel/specifics/specific-properties-builder.js +138 -0
  83. package/dist/src/property-panel/specifics/specific-properties-builder.js.map +1 -0
  84. package/dist/src/property-panel/specifics/specifics.d.ts +25 -0
  85. package/dist/src/property-panel/specifics/specifics.js +84 -0
  86. package/dist/src/property-panel/specifics/specifics.js.map +1 -0
  87. package/dist/src/property-panel/styles/styles.d.ts +23 -0
  88. package/dist/src/property-panel/styles/styles.js +269 -0
  89. package/dist/src/property-panel/styles/styles.js.map +1 -0
  90. package/dist/src/types.d.ts +43 -0
  91. package/dist/src/types.js +2 -0
  92. package/dist/src/types.js.map +1 -0
  93. package/dist/stories/index.stories.d.ts +22 -0
  94. package/dist/stories/index.stories.js +121 -0
  95. package/dist/stories/index.stories.js.map +1 -0
  96. package/dist/stories/input-table-property.stories.d.ts +21 -0
  97. package/dist/stories/input-table-property.stories.js +84 -0
  98. package/dist/stories/input-table-property.stories.js.map +1 -0
  99. package/dist/test/ox-property-panel.test.d.ts +1 -0
  100. package/dist/test/ox-property-panel.test.js +24 -0
  101. package/dist/test/ox-property-panel.test.js.map +1 -0
  102. package/dist/tsconfig.tsbuildinfo +1 -0
  103. package/package.json +108 -0
  104. package/src/graphql/board.ts +144 -0
  105. package/src/graphql/data-subscription.ts +30 -0
  106. package/src/graphql/favorite-board.ts +25 -0
  107. package/src/graphql/group.ts +138 -0
  108. package/src/graphql/index.ts +4 -0
  109. package/src/graphql/play-group.ts +225 -0
  110. package/src/graphql/scenario.ts +79 -0
  111. package/src/index.ts +8 -0
  112. package/src/ox-property-panel.ts +347 -0
  113. package/src/property-panel/abstract-property.ts +67 -0
  114. package/src/property-panel/data-binding/data-binding-mapper.ts +412 -0
  115. package/src/property-panel/data-binding/data-binding-value-map.ts +19 -0
  116. package/src/property-panel/data-binding/data-binding-value-range.ts +19 -0
  117. package/src/property-panel/data-binding/data-binding.ts +464 -0
  118. package/src/property-panel/effects/effects.ts +77 -0
  119. package/src/property-panel/effects/property-animation.ts +155 -0
  120. package/src/property-panel/effects/property-animations.ts +74 -0
  121. package/src/property-panel/effects/property-event-hover.ts +212 -0
  122. package/src/property-panel/effects/property-event-tap.ts +269 -0
  123. package/src/property-panel/effects/property-event.ts +73 -0
  124. package/src/property-panel/effects/property-shadow.ts +77 -0
  125. package/src/property-panel/effects/value-converter.ts +17 -0
  126. package/src/property-panel/inspector/inspector.ts +407 -0
  127. package/src/property-panel/shapes/shapes.ts +321 -0
  128. package/src/property-panel/specifics/specific-properties-builder.ts +152 -0
  129. package/src/property-panel/specifics/specifics.ts +81 -0
  130. package/src/property-panel/styles/styles.ts +287 -0
  131. package/src/types.ts +63 -0
  132. package/stories/index.stories.ts +134 -0
  133. package/stories/input-table-property.stories.ts +96 -0
  134. package/test/ox-property-panel.test.ts +32 -0
  135. package/themes/app-theme.css +138 -0
  136. package/themes/calendar-theme.css +61 -0
  137. package/themes/dark.css +51 -0
  138. package/themes/grist-theme.css +175 -0
  139. package/themes/help-theme.css +57 -0
  140. package/themes/layout-theme.css +94 -0
  141. package/themes/light.css +51 -0
  142. package/themes/material-theme.css +23 -0
  143. package/themes/md-typescale-styles.css +100 -0
  144. package/themes/oops-theme.css +22 -0
  145. package/themes/report-theme.css +47 -0
  146. package/themes/spacing.css +23 -0
  147. package/themes/state-color.css +6 -0
  148. package/themes/tooltip-theme.css +11 -0
  149. package/translations/en.json +723 -0
  150. package/translations/ja.json +727 -0
  151. package/translations/ko.json +727 -0
  152. package/translations/ms.json +609 -0
  153. package/translations/zh.json +726 -0
  154. package/tsconfig.json +25 -0
  155. package/web-dev-server.config.mjs +27 -0
  156. 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 {};