interaqt 0.1.0 → 0.2.1

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 (329) hide show
  1. package/agent/.claude/agents/code-generation-handler.md +598 -0
  2. package/agent/.claude/agents/computation-generation-handler.md +290 -0
  3. package/agent/.claude/agents/implement-design-handler.md +179 -0
  4. package/agent/.claude/agents/permission-generation-handler.md +202 -0
  5. package/agent/.claude/agents/requirements-analysis-handler-bak.md +530 -0
  6. package/agent/.claude/agents/requirements-analysis-handler.md +720 -0
  7. package/agent/.claude/settings.local.json +46 -0
  8. package/agent/CLAUDE.md +72 -0
  9. package/dist/index.js +10508 -4
  10. package/dist/index.js.map +1 -1
  11. package/dist/runtime/ComputationSourceMap.d.ts +117 -0
  12. package/dist/runtime/ComputationSourceMap.d.ts.map +1 -0
  13. package/dist/runtime/Controller.d.ts +37 -26
  14. package/dist/runtime/Controller.d.ts.map +1 -1
  15. package/dist/runtime/ExternalSynchronizer.d.ts +6 -0
  16. package/dist/runtime/ExternalSynchronizer.d.ts.map +1 -0
  17. package/dist/runtime/MonoSystem.d.ts +29 -17
  18. package/dist/runtime/MonoSystem.d.ts.map +1 -1
  19. package/dist/runtime/Mysql.d.ts +2 -2
  20. package/dist/runtime/PGLite.d.ts +35 -0
  21. package/dist/runtime/PGLite.d.ts.map +1 -0
  22. package/dist/runtime/PostgreSQL.d.ts +2 -2
  23. package/dist/runtime/SQLite.d.ts +3 -3
  24. package/dist/runtime/SQLite.d.ts.map +1 -1
  25. package/dist/runtime/Scheduler.d.ts +28 -61
  26. package/dist/runtime/Scheduler.d.ts.map +1 -1
  27. package/dist/runtime/System.d.ts +18 -224
  28. package/dist/runtime/System.d.ts.map +1 -1
  29. package/dist/runtime/{ActivityCall.d.ts → activity/ActivityCall.d.ts} +6 -7
  30. package/dist/runtime/activity/ActivityCall.d.ts.map +1 -0
  31. package/dist/runtime/activity/ActivityManager.d.ts +44 -0
  32. package/dist/runtime/activity/ActivityManager.d.ts.map +1 -0
  33. package/dist/runtime/{InteractionCall.d.ts → activity/InteractionCall.d.ts} +28 -41
  34. package/dist/runtime/activity/InteractionCall.d.ts.map +1 -0
  35. package/dist/runtime/computations/Any.d.ts +71 -0
  36. package/dist/runtime/computations/Any.d.ts.map +1 -0
  37. package/dist/runtime/computations/Average.d.ts +69 -0
  38. package/dist/runtime/computations/Average.d.ts.map +1 -0
  39. package/dist/runtime/computations/Computation.d.ts +138 -0
  40. package/dist/runtime/computations/Computation.d.ts.map +1 -0
  41. package/dist/runtime/computations/Count.d.ts +73 -0
  42. package/dist/runtime/computations/Count.d.ts.map +1 -0
  43. package/dist/runtime/computations/Custom.d.ts +45 -0
  44. package/dist/runtime/computations/Custom.d.ts.map +1 -0
  45. package/dist/runtime/computations/Every.d.ts +74 -0
  46. package/dist/runtime/computations/Every.d.ts.map +1 -0
  47. package/dist/runtime/computations/MathResolver.d.ts +60 -0
  48. package/dist/runtime/computations/MathResolver.d.ts.map +1 -0
  49. package/dist/runtime/computations/RealTime.d.ts +66 -0
  50. package/dist/runtime/computations/RealTime.d.ts.map +1 -0
  51. package/dist/runtime/{computedDataHandles → computations}/StateMachine.d.ts +31 -22
  52. package/dist/runtime/computations/StateMachine.d.ts.map +1 -0
  53. package/dist/runtime/computations/Summation.d.ts +66 -0
  54. package/dist/runtime/computations/Summation.d.ts.map +1 -0
  55. package/dist/runtime/computations/Transform.d.ts +29 -0
  56. package/dist/runtime/computations/Transform.d.ts.map +1 -0
  57. package/dist/runtime/computations/TransitionFinder.d.ts +11 -0
  58. package/dist/runtime/computations/TransitionFinder.d.ts.map +1 -0
  59. package/dist/runtime/computations/WeightedSummation.d.ts +71 -0
  60. package/dist/runtime/computations/WeightedSummation.d.ts.map +1 -0
  61. package/dist/runtime/computations/index.d.ts +22 -0
  62. package/dist/runtime/computations/index.d.ts.map +1 -0
  63. package/dist/runtime/errors/ActivityErrors.d.ts +40 -0
  64. package/dist/runtime/errors/ActivityErrors.d.ts.map +1 -0
  65. package/dist/runtime/errors/ComputationErrors.d.ts +61 -0
  66. package/dist/runtime/errors/ComputationErrors.d.ts.map +1 -0
  67. package/dist/runtime/errors/ConditionErrors.d.ts +33 -0
  68. package/dist/runtime/errors/ConditionErrors.d.ts.map +1 -0
  69. package/dist/runtime/errors/FrameworkError.d.ts +77 -0
  70. package/dist/runtime/errors/FrameworkError.d.ts.map +1 -0
  71. package/dist/runtime/errors/InteractionErrors.d.ts +21 -0
  72. package/dist/runtime/errors/InteractionErrors.d.ts.map +1 -0
  73. package/dist/runtime/errors/SystemErrors.d.ts +16 -0
  74. package/dist/runtime/errors/SystemErrors.d.ts.map +1 -0
  75. package/dist/runtime/errors/index.d.ts +37 -0
  76. package/dist/runtime/errors/index.d.ts.map +1 -0
  77. package/dist/runtime/index.d.ts +9 -7
  78. package/dist/runtime/index.d.ts.map +1 -1
  79. package/dist/shared/Action.d.ts +38 -0
  80. package/dist/shared/Action.d.ts.map +1 -0
  81. package/dist/shared/Activity.d.ts +178 -0
  82. package/dist/shared/Activity.d.ts.map +1 -0
  83. package/dist/shared/Any.d.ts +82 -0
  84. package/dist/shared/Any.d.ts.map +1 -0
  85. package/dist/shared/Attributive.d.ts +92 -0
  86. package/dist/shared/Attributive.d.ts.map +1 -0
  87. package/dist/shared/Average.d.ts +59 -0
  88. package/dist/shared/Average.d.ts.map +1 -0
  89. package/dist/shared/BoolExp.d.ts +139 -63
  90. package/dist/shared/BoolExp.d.ts.map +1 -1
  91. package/dist/shared/Computation.d.ts +23 -0
  92. package/dist/shared/Computation.d.ts.map +1 -0
  93. package/dist/shared/Condition.d.ts +43 -0
  94. package/dist/shared/Condition.d.ts.map +1 -0
  95. package/dist/shared/Conditions.d.ts +38 -0
  96. package/dist/shared/Conditions.d.ts.map +1 -0
  97. package/dist/shared/Count.d.ts +77 -0
  98. package/dist/shared/Count.d.ts.map +1 -0
  99. package/dist/shared/Custom.d.ts +108 -0
  100. package/dist/shared/Custom.d.ts.map +1 -0
  101. package/dist/shared/Data.d.ts +121 -0
  102. package/dist/shared/Data.d.ts.map +1 -0
  103. package/dist/shared/DataAttributives.d.ts +38 -0
  104. package/dist/shared/DataAttributives.d.ts.map +1 -0
  105. package/dist/shared/Entity.d.ts +96 -0
  106. package/dist/shared/Entity.d.ts.map +1 -0
  107. package/dist/shared/Event.d.ts +36 -0
  108. package/dist/shared/Event.d.ts.map +1 -0
  109. package/dist/shared/Every.d.ts +85 -0
  110. package/dist/shared/Every.d.ts.map +1 -0
  111. package/dist/shared/Gateway.d.ts +36 -0
  112. package/dist/shared/Gateway.d.ts.map +1 -0
  113. package/dist/shared/Interaction.d.ts +108 -0
  114. package/dist/shared/Interaction.d.ts.map +1 -0
  115. package/dist/shared/Payload.d.ts +39 -0
  116. package/dist/shared/Payload.d.ts.map +1 -0
  117. package/dist/shared/PayloadItem.d.ts +85 -0
  118. package/dist/shared/PayloadItem.d.ts.map +1 -0
  119. package/dist/shared/Property.d.ts +83 -0
  120. package/dist/shared/Property.d.ts.map +1 -0
  121. package/dist/shared/RealDictionary.d.ts +94 -0
  122. package/dist/shared/RealDictionary.d.ts.map +1 -0
  123. package/dist/shared/RealTime.d.ts +66 -0
  124. package/dist/shared/RealTime.d.ts.map +1 -0
  125. package/dist/shared/RefContainer.d.ts +89 -0
  126. package/dist/shared/RefContainer.d.ts.map +1 -0
  127. package/dist/shared/Relation.d.ts +140 -0
  128. package/dist/shared/Relation.d.ts.map +1 -0
  129. package/dist/shared/SideEffect.d.ts +45 -0
  130. package/dist/shared/SideEffect.d.ts.map +1 -0
  131. package/dist/shared/StateMachine.d.ts +55 -0
  132. package/dist/shared/StateMachine.d.ts.map +1 -0
  133. package/dist/shared/StateNode.d.ts +45 -0
  134. package/dist/shared/StateNode.d.ts.map +1 -0
  135. package/dist/shared/StateTransfer.d.ts +63 -0
  136. package/dist/shared/StateTransfer.d.ts.map +1 -0
  137. package/dist/shared/Summation.d.ts +59 -0
  138. package/dist/shared/Summation.d.ts.map +1 -0
  139. package/dist/shared/Transform.d.ts +54 -0
  140. package/dist/shared/Transform.d.ts.map +1 -0
  141. package/dist/shared/User.d.ts +10 -0
  142. package/dist/shared/User.d.ts.map +1 -0
  143. package/dist/shared/WeightedSummation.d.ts +82 -0
  144. package/dist/shared/WeightedSummation.d.ts.map +1 -0
  145. package/dist/shared/index.d.ts +35 -9
  146. package/dist/shared/index.d.ts.map +1 -1
  147. package/dist/shared/init.d.ts +3 -0
  148. package/dist/shared/init.d.ts.map +1 -0
  149. package/dist/shared/interfaces.d.ts +72 -0
  150. package/dist/shared/interfaces.d.ts.map +1 -0
  151. package/dist/shared/types.d.ts +77 -0
  152. package/dist/shared/types.d.ts.map +1 -0
  153. package/dist/shared/utils.d.ts +16 -10
  154. package/dist/shared/utils.d.ts.map +1 -1
  155. package/dist/storage/erstorage/AttributeInfo.d.ts +8 -3
  156. package/dist/storage/erstorage/AttributeInfo.d.ts.map +1 -1
  157. package/dist/storage/erstorage/AttributeQuery.d.ts +4 -3
  158. package/dist/storage/erstorage/AttributeQuery.d.ts.map +1 -1
  159. package/dist/storage/erstorage/EntityQueryHandle.d.ts +18 -17
  160. package/dist/storage/erstorage/EntityQueryHandle.d.ts.map +1 -1
  161. package/dist/storage/erstorage/EntityToTableMap.d.ts +27 -5
  162. package/dist/storage/erstorage/EntityToTableMap.d.ts.map +1 -1
  163. package/dist/storage/erstorage/FilteredEntityManager.d.ts +70 -0
  164. package/dist/storage/erstorage/FilteredEntityManager.d.ts.map +1 -0
  165. package/dist/storage/erstorage/LinkInfo.d.ts +10 -3
  166. package/dist/storage/erstorage/LinkInfo.d.ts.map +1 -1
  167. package/dist/storage/erstorage/MatchExp.d.ts +19 -9
  168. package/dist/storage/erstorage/MatchExp.d.ts.map +1 -1
  169. package/dist/storage/erstorage/MergedItemProcessor.d.ts +25 -0
  170. package/dist/storage/erstorage/MergedItemProcessor.d.ts.map +1 -0
  171. package/dist/storage/erstorage/Modifier.d.ts +1 -1
  172. package/dist/storage/erstorage/NewRecordData.d.ts +16 -9
  173. package/dist/storage/erstorage/NewRecordData.d.ts.map +1 -1
  174. package/dist/storage/erstorage/RecordInfo.d.ts +11 -2
  175. package/dist/storage/erstorage/RecordInfo.d.ts.map +1 -1
  176. package/dist/storage/erstorage/RecordQuery.d.ts +9 -8
  177. package/dist/storage/erstorage/RecordQuery.d.ts.map +1 -1
  178. package/dist/storage/erstorage/RecordQueryAgent.d.ts +26 -13
  179. package/dist/storage/erstorage/RecordQueryAgent.d.ts.map +1 -1
  180. package/dist/storage/erstorage/Setup.d.ts +49 -11
  181. package/dist/storage/erstorage/Setup.d.ts.map +1 -1
  182. package/dist/storage/erstorage/util.d.ts.map +1 -1
  183. package/package.json +44 -20
  184. package/README.md +0 -53
  185. package/dist/runtime/ActivityCall.d.ts.map +0 -1
  186. package/dist/runtime/ActivityCall.js +0 -379
  187. package/dist/runtime/ActivityCall.js.map +0 -1
  188. package/dist/runtime/Controller.js +0 -225
  189. package/dist/runtime/Controller.js.map +0 -1
  190. package/dist/runtime/InteractionCall.d.ts.map +0 -1
  191. package/dist/runtime/InteractionCall.js +0 -385
  192. package/dist/runtime/InteractionCall.js.map +0 -1
  193. package/dist/runtime/MonoSystem.js +0 -331
  194. package/dist/runtime/MonoSystem.js.map +0 -1
  195. package/dist/runtime/Mysql.js +0 -171
  196. package/dist/runtime/Mysql.js.map +0 -1
  197. package/dist/runtime/PostgreSQL.js +0 -172
  198. package/dist/runtime/PostgreSQL.js.map +0 -1
  199. package/dist/runtime/SQLite.js +0 -146
  200. package/dist/runtime/SQLite.js.map +0 -1
  201. package/dist/runtime/Scheduler.js +0 -457
  202. package/dist/runtime/Scheduler.js.map +0 -1
  203. package/dist/runtime/System.js +0 -90
  204. package/dist/runtime/System.js.map +0 -1
  205. package/dist/runtime/asyncInteractionContext.js +0 -3
  206. package/dist/runtime/asyncInteractionContext.js.map +0 -1
  207. package/dist/runtime/boolExpression.js +0 -43
  208. package/dist/runtime/boolExpression.js.map +0 -1
  209. package/dist/runtime/computedDataHandles/Any.d.ts +0 -52
  210. package/dist/runtime/computedDataHandles/Any.d.ts.map +0 -1
  211. package/dist/runtime/computedDataHandles/Any.js +0 -152
  212. package/dist/runtime/computedDataHandles/Any.js.map +0 -1
  213. package/dist/runtime/computedDataHandles/Computation.d.ts +0 -108
  214. package/dist/runtime/computedDataHandles/Computation.d.ts.map +0 -1
  215. package/dist/runtime/computedDataHandles/Computation.js +0 -49
  216. package/dist/runtime/computedDataHandles/Computation.js.map +0 -1
  217. package/dist/runtime/computedDataHandles/ComputedDataHandle.d.ts +0 -42
  218. package/dist/runtime/computedDataHandles/ComputedDataHandle.d.ts.map +0 -1
  219. package/dist/runtime/computedDataHandles/ComputedDataHandle.js +0 -4
  220. package/dist/runtime/computedDataHandles/ComputedDataHandle.js.map +0 -1
  221. package/dist/runtime/computedDataHandles/Count.d.ts +0 -45
  222. package/dist/runtime/computedDataHandles/Count.d.ts.map +0 -1
  223. package/dist/runtime/computedDataHandles/Count.js +0 -85
  224. package/dist/runtime/computedDataHandles/Count.js.map +0 -1
  225. package/dist/runtime/computedDataHandles/Every.d.ts +0 -56
  226. package/dist/runtime/computedDataHandles/Every.d.ts.map +0 -1
  227. package/dist/runtime/computedDataHandles/Every.js +0 -178
  228. package/dist/runtime/computedDataHandles/Every.js.map +0 -1
  229. package/dist/runtime/computedDataHandles/StateMachine.d.ts.map +0 -1
  230. package/dist/runtime/computedDataHandles/StateMachine.js +0 -180
  231. package/dist/runtime/computedDataHandles/StateMachine.js.map +0 -1
  232. package/dist/runtime/computedDataHandles/Transform.d.ts +0 -26
  233. package/dist/runtime/computedDataHandles/Transform.d.ts.map +0 -1
  234. package/dist/runtime/computedDataHandles/Transform.js +0 -106
  235. package/dist/runtime/computedDataHandles/Transform.js.map +0 -1
  236. package/dist/runtime/computedDataHandles/TransitionFinder.d.ts +0 -57
  237. package/dist/runtime/computedDataHandles/TransitionFinder.d.ts.map +0 -1
  238. package/dist/runtime/computedDataHandles/TransitionFinder.js +0 -40
  239. package/dist/runtime/computedDataHandles/TransitionFinder.js.map +0 -1
  240. package/dist/runtime/computedDataHandles/WeightedSummation.d.ts +0 -57
  241. package/dist/runtime/computedDataHandles/WeightedSummation.d.ts.map +0 -1
  242. package/dist/runtime/computedDataHandles/WeightedSummation.js +0 -146
  243. package/dist/runtime/computedDataHandles/WeightedSummation.js.map +0 -1
  244. package/dist/runtime/computedDataHandles/index.d.ts +0 -7
  245. package/dist/runtime/computedDataHandles/index.d.ts.map +0 -1
  246. package/dist/runtime/computedDataHandles/index.js +0 -7
  247. package/dist/runtime/computedDataHandles/index.js.map +0 -1
  248. package/dist/runtime/index.js +0 -15
  249. package/dist/runtime/index.js.map +0 -1
  250. package/dist/runtime/server.d.ts +0 -35
  251. package/dist/runtime/server.d.ts.map +0 -1
  252. package/dist/runtime/server.js +0 -171
  253. package/dist/runtime/server.js.map +0 -1
  254. package/dist/runtime/types/boolExpression.js +0 -6
  255. package/dist/runtime/types/boolExpression.js.map +0 -1
  256. package/dist/runtime/util.js +0 -39
  257. package/dist/runtime/util.js.map +0 -1
  258. package/dist/shared/BoolExp.js +0 -252
  259. package/dist/shared/BoolExp.js.map +0 -1
  260. package/dist/shared/activity/Activity.d.ts +0 -465
  261. package/dist/shared/activity/Activity.d.ts.map +0 -1
  262. package/dist/shared/activity/Activity.js +0 -264
  263. package/dist/shared/activity/Activity.js.map +0 -1
  264. package/dist/shared/activity/Condition.d.ts +0 -75
  265. package/dist/shared/activity/Condition.d.ts.map +0 -1
  266. package/dist/shared/activity/Condition.js +0 -51
  267. package/dist/shared/activity/Condition.js.map +0 -1
  268. package/dist/shared/activity/Data.d.ts +0 -115
  269. package/dist/shared/activity/Data.d.ts.map +0 -1
  270. package/dist/shared/activity/Data.js +0 -89
  271. package/dist/shared/activity/Data.js.map +0 -1
  272. package/dist/shared/attributive.d.ts +0 -93
  273. package/dist/shared/attributive.d.ts.map +0 -1
  274. package/dist/shared/attributive.js +0 -59
  275. package/dist/shared/attributive.js.map +0 -1
  276. package/dist/shared/computed.d.ts +0 -607
  277. package/dist/shared/computed.d.ts.map +0 -1
  278. package/dist/shared/computed.js +0 -202
  279. package/dist/shared/computed.js.map +0 -1
  280. package/dist/shared/createClass.d.ts +0 -102
  281. package/dist/shared/createClass.d.ts.map +0 -1
  282. package/dist/shared/createClass.js +0 -276
  283. package/dist/shared/createClass.js.map +0 -1
  284. package/dist/shared/dictionary/Dictionary.d.ts +0 -40
  285. package/dist/shared/dictionary/Dictionary.d.ts.map +0 -1
  286. package/dist/shared/dictionary/Dictionary.js +0 -51
  287. package/dist/shared/dictionary/Dictionary.js.map +0 -1
  288. package/dist/shared/entity/Entity.d.ts +0 -149
  289. package/dist/shared/entity/Entity.d.ts.map +0 -1
  290. package/dist/shared/entity/Entity.js +0 -226
  291. package/dist/shared/entity/Entity.js.map +0 -1
  292. package/dist/shared/index.js +0 -11
  293. package/dist/shared/index.js.map +0 -1
  294. package/dist/shared/user/User.d.ts +0 -21
  295. package/dist/shared/user/User.d.ts.map +0 -1
  296. package/dist/shared/user/User.js +0 -11
  297. package/dist/shared/user/User.js.map +0 -1
  298. package/dist/shared/utils.js +0 -19
  299. package/dist/shared/utils.js.map +0 -1
  300. package/dist/storage/erstorage/AttributeInfo.js +0 -147
  301. package/dist/storage/erstorage/AttributeInfo.js.map +0 -1
  302. package/dist/storage/erstorage/AttributeQuery.js +0 -190
  303. package/dist/storage/erstorage/AttributeQuery.js.map +0 -1
  304. package/dist/storage/erstorage/EntityQueryHandle.js +0 -78
  305. package/dist/storage/erstorage/EntityQueryHandle.js.map +0 -1
  306. package/dist/storage/erstorage/EntityToTableMap.js +0 -262
  307. package/dist/storage/erstorage/EntityToTableMap.js.map +0 -1
  308. package/dist/storage/erstorage/LinkInfo.js +0 -89
  309. package/dist/storage/erstorage/LinkInfo.js.map +0 -1
  310. package/dist/storage/erstorage/MatchExp.js +0 -211
  311. package/dist/storage/erstorage/MatchExp.js.map +0 -1
  312. package/dist/storage/erstorage/Modifier.js +0 -24
  313. package/dist/storage/erstorage/Modifier.js.map +0 -1
  314. package/dist/storage/erstorage/NewRecordData.js +0 -178
  315. package/dist/storage/erstorage/NewRecordData.js.map +0 -1
  316. package/dist/storage/erstorage/RecordInfo.js +0 -111
  317. package/dist/storage/erstorage/RecordInfo.js.map +0 -1
  318. package/dist/storage/erstorage/RecordQuery.js +0 -158
  319. package/dist/storage/erstorage/RecordQuery.js.map +0 -1
  320. package/dist/storage/erstorage/RecordQueryAgent.js +0 -1130
  321. package/dist/storage/erstorage/RecordQueryAgent.js.map +0 -1
  322. package/dist/storage/erstorage/Setup.js +0 -400
  323. package/dist/storage/erstorage/Setup.js.map +0 -1
  324. package/dist/storage/erstorage/util.js +0 -25
  325. package/dist/storage/erstorage/util.js.map +0 -1
  326. package/dist/storage/index.js +0 -13
  327. package/dist/storage/index.js.map +0 -1
  328. package/dist/storage/utils.js +0 -48
  329. package/dist/storage/utils.js.map +0 -1
@@ -1,264 +0,0 @@
1
- import { createClass } from "../createClass.js";
2
- import { Entity, Relation } from "../entity/Entity.js";
3
- import { Attributive, Attributives, } from "../attributive.js";
4
- import { Condition, Conditions } from './Condition.js';
5
- import { Computation, DataAttributive, DataAttributives, Query } from "./Data.js";
6
- // 交互动作,因为以后可能有更多的关于交互动作的管理,所以应该是个对象,而不只是字符串名字。
7
- // 例如获取所有的 send xxx 类型的交互动作。
8
- export const Action = createClass({
9
- name: 'Action',
10
- public: {
11
- name: {
12
- type: 'string',
13
- required: true
14
- }
15
- }
16
- });
17
- // CAUTION 全局唯一的 GET 交互。
18
- export const GetAction = new Action({ name: 'get' });
19
- export const PayloadItem = createClass({
20
- name: 'PayloadItem',
21
- public: {
22
- name: {
23
- type: 'string',
24
- required: true
25
- },
26
- // 用于修饰后面的 UserAttributive 或者 Entity,类型根据 base 变化而变化
27
- attributives: {
28
- type: [Attributives, Attributive],
29
- collection: false,
30
- },
31
- // 当前 Item 的具体概念类型
32
- base: {
33
- type: Entity,
34
- required: true,
35
- collection: false,
36
- },
37
- // isRef 表示这个 payload 是不是一个有 id ,系统中已经存在的。
38
- // 例如交互"用户 删除 内容",用户执行这个交互时传的 "内容" 就应该是有 id 。
39
- isRef: {
40
- type: 'boolean',
41
- collection: false,
42
- defaultValue: () => false
43
- },
44
- required: {
45
- type: 'boolean',
46
- collection: false,
47
- defaultValue: () => false
48
- },
49
- isCollection: {
50
- type: 'boolean',
51
- collection: false,
52
- defaultValue: () => false
53
- },
54
- // payload 也可以指向前其他交互中定义的实体之类的,这用在了 activity 中。
55
- itemRef: {
56
- collection: false,
57
- required: false,
58
- type: [Attributive, Entity],
59
- }
60
- }
61
- });
62
- export const Payload = createClass({
63
- name: 'Payload',
64
- public: {
65
- items: {
66
- type: PayloadItem,
67
- collection: true,
68
- required: true,
69
- defaultValue: () => []
70
- }
71
- }
72
- });
73
- // 执行的 side effect。通常需要和实现的系统进行约定。
74
- export const SideEffect = createClass({
75
- name: 'SideEffect',
76
- public: {
77
- name: {
78
- type: 'string',
79
- required: true,
80
- collection: false
81
- },
82
- handle: {
83
- type: 'function',
84
- required: true,
85
- collection: false
86
- }
87
- }
88
- });
89
- export const Interaction = createClass({
90
- name: 'Interaction',
91
- display: (interaction) => `${interaction.action.name}`,
92
- public: {
93
- name: {
94
- type: 'string',
95
- collection: false,
96
- required: true
97
- },
98
- conditions: {
99
- type: [Conditions, Condition],
100
- required: false,
101
- collection: false,
102
- },
103
- // 用户自定义的任何定语
104
- userAttributives: {
105
- type: [Attributives, Attributive],
106
- required: false,
107
- collection: false,
108
- },
109
- // 当前的用户的 alias 名字。这个地方应该改成 Alias 才更加好
110
- userRef: {
111
- type: Attributive,
112
- collection: false,
113
- },
114
- action: {
115
- type: Action,
116
- collection: false,
117
- required: true
118
- },
119
- payload: {
120
- type: Payload,
121
- collection: false,
122
- },
123
- // 副作用
124
- sideEffects: {
125
- type: SideEffect,
126
- collection: true,
127
- defaultValue: (...args) => []
128
- },
129
- dataAttributives: {
130
- type: [DataAttributive, DataAttributives],
131
- required: false,
132
- collection: false,
133
- },
134
- data: {
135
- type: [Entity, Relation, Computation],
136
- required: false,
137
- collection: false
138
- },
139
- query: {
140
- type: Query,
141
- required: false,
142
- collection: false
143
- }
144
- }
145
- });
146
- // 分支条件判断
147
- export const Gateway = createClass({
148
- name: 'Gateway',
149
- public: {
150
- name: {
151
- type: 'string',
152
- required: true
153
- }
154
- }
155
- });
156
- // 用户可以定义事件
157
- export const Event = createClass({
158
- name: 'Event',
159
- public: {
160
- name: {
161
- type: 'string',
162
- required: true
163
- }
164
- }
165
- });
166
- const TRANSFER_PLACEHOLDER = {};
167
- const ACTIVITY_GROUP_PLACEHOLDER = {};
168
- export const Activity = createClass({
169
- name: 'Activity',
170
- public: {
171
- name: {
172
- type: 'string',
173
- collection: false,
174
- required: true
175
- },
176
- // 节点
177
- interactions: {
178
- type: Interaction,
179
- collection: true,
180
- defaultValue: (...args) => []
181
- },
182
- // 节点
183
- gateways: {
184
- type: Gateway,
185
- collection: true,
186
- defaultValue: (...args) => []
187
- },
188
- // 边
189
- transfers: {
190
- type: TRANSFER_PLACEHOLDER, // 待会要被替换掉的,因为 activity/transfer 循环引用了。所以只能待会再替换成真的
191
- collection: true,
192
- defaultValue: (...args) => []
193
- },
194
- // 节点分组
195
- groups: {
196
- // 待会要被替换掉的,因为 activity/activityGroup 循环引用了。所以只能待会再替换成真的
197
- type: ACTIVITY_GROUP_PLACEHOLDER,
198
- collection: true,
199
- defaultValue: (...args) => []
200
- },
201
- // 抛出的事件groups
202
- events: {
203
- type: Event,
204
- collection: true,
205
- defaultValue: (...args) => []
206
- },
207
- }
208
- });
209
- // ActivityGroup 本质上是一个控制单元,不是 Activity。用来决定里面的 interaction 在什么情况下达到了完成状态。
210
- export const ActivityGroup = createClass({
211
- name: 'ActivityGroup',
212
- public: {
213
- type: {
214
- type: 'string',
215
- required: true,
216
- collection: false
217
- },
218
- activities: {
219
- // type: Activity,
220
- instanceType: {},
221
- collection: true,
222
- required: false,
223
- defaultValue: (...args) => []
224
- }
225
- }
226
- });
227
- export const Transfer = createClass({
228
- name: 'Transfer',
229
- public: {
230
- name: {
231
- type: 'string',
232
- required: true,
233
- collection: false
234
- },
235
- source: {
236
- type: [Interaction, ActivityGroup, Gateway],
237
- required: true,
238
- collection: false
239
- },
240
- target: {
241
- type: [Interaction, ActivityGroup, Gateway],
242
- required: true,
243
- collection: false
244
- }
245
- }
246
- });
247
- // 修正前面 Activity 里面为了解决循环引用问题的占位符
248
- Activity.public.transfers.type = Transfer;
249
- Activity.public.groups.type = ActivityGroup;
250
- export function forEachInteraction(activity, handle, parenGroup) {
251
- activity.interactions.forEach(i => handle(i, parenGroup));
252
- activity.groups.forEach(group => {
253
- group.activities.forEach(sub => forEachInteraction(sub, handle, group));
254
- });
255
- }
256
- export function getInteractions(activity) {
257
- const result = [];
258
- forEachInteraction(activity, (i) => result.push(i));
259
- return result;
260
- }
261
- export function findRootActivity(interaction) {
262
- return null;
263
- }
264
- //# sourceMappingURL=Activity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Activity.js","sourceRoot":"","sources":["../../../src/shared/activity/Activity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAoD,MAAM,mBAAmB,CAAC;AACjG,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAC,WAAW,EAAE,YAAY,GAAG,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAC,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAE,KAAK,EAAC,MAAM,WAAW,CAAC;AAGhF,+CAA+C;AAC/C,6BAA6B;AAC7B,MAAM,CAAC,MAAM,MAAM,GAAG,WAAW,CAAC;IAC9B,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE;QACJ,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACjB;KACJ;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;YACJ,IAAI,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,CAAC;YAC3C,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;SACpB;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,CAAC;YAC3C,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;SACpB;KACJ;CACJ,CAAC,CAAA;AAEF,iCAAiC;AACjC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,QAAQ,CAAA;AACzC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,GAAG,aAAa,CAAA;AAU3C,MAAM,UAAU,kBAAkB,CAAC,QAA8B,EAAE,MAAwE,EAAE,UAAsC;IAC/K,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAA;IACzD,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAC5B,KAAK,CAAC,UAAW,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;IAC5E,CAAC,CAAC,CAAA;AACN,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,QAA8B;IAC1D,MAAM,MAAM,GAA8B,EAAE,CAAA;IAC5C,kBAAkB,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;IACnD,OAAO,MAAM,CAAA;AACjB,CAAC;AAGD,MAAM,UAAU,gBAAgB,CAAC,WAAoC;IACjE,OAAO,IAAI,CAAA;AACf,CAAC"}
@@ -1,75 +0,0 @@
1
- import { KlassInstance } from "../createClass.js";
2
- import { BoolExp } from "../BoolExp.js";
3
- export declare const Condition: import("../createClass.js").Klass<{
4
- content: {
5
- type: "function";
6
- required: true;
7
- collection: false;
8
- };
9
- name: {
10
- type: "string";
11
- };
12
- }>;
13
- export declare const Conditions: import("../createClass.js").Klass<{
14
- content: {
15
- type: (import("../createClass.js").Klass<import("../BoolExp.js").BoolAtomPublic> | import("../createClass.js").Klass<{
16
- type: {
17
- type: "string";
18
- required: true;
19
- collection: false;
20
- defaultValue: () => string;
21
- };
22
- operator: {
23
- type: "string";
24
- required: true;
25
- collection: false;
26
- options: string[];
27
- defaultValue: () => string;
28
- };
29
- left: {
30
- instanceType: (KlassInstance<import("../createClass.js").Klass<import("../BoolExp.js").BoolAtomPublic>> | import("../BoolExp.js").UnwrappedBoolExpressionInstanceType<any>);
31
- required: true;
32
- collection: false;
33
- };
34
- right: {
35
- instanceType: (KlassInstance<import("../createClass.js").Klass<import("../BoolExp.js").BoolAtomPublic>> | import("../BoolExp.js").UnwrappedBoolExpressionInstanceType<any>);
36
- required: false;
37
- collection: false;
38
- };
39
- }>)[];
40
- collection: false;
41
- required: false;
42
- };
43
- }>;
44
- export declare function boolExpToConditions(obj: BoolExp<KlassInstance<typeof Condition>>): import("../createClass.js").KlassInstanceOfPublic<{
45
- content: {
46
- type: (import("../createClass.js").Klass<import("../BoolExp.js").BoolAtomPublic> | import("../createClass.js").Klass<{
47
- type: {
48
- type: "string";
49
- required: true;
50
- collection: false;
51
- defaultValue: () => string;
52
- };
53
- operator: {
54
- type: "string";
55
- required: true;
56
- collection: false;
57
- options: string[];
58
- defaultValue: () => string;
59
- };
60
- left: {
61
- instanceType: (KlassInstance<import("../createClass.js").Klass<import("../BoolExp.js").BoolAtomPublic>> | import("../BoolExp.js").UnwrappedBoolExpressionInstanceType<any>);
62
- required: true;
63
- collection: false;
64
- };
65
- right: {
66
- instanceType: (KlassInstance<import("../createClass.js").Klass<import("../BoolExp.js").BoolAtomPublic>> | import("../BoolExp.js").UnwrappedBoolExpressionInstanceType<any>);
67
- required: false;
68
- collection: false;
69
- };
70
- }>)[];
71
- collection: false;
72
- required: false;
73
- };
74
- }>;
75
- //# sourceMappingURL=Condition.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Condition.d.ts","sourceRoot":"","sources":["../../../src/shared/activity/Condition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAC,OAAO,EAA0D,MAAM,eAAe,CAAC;AAG/F,eAAO,MAAM,SAAS;;;;;;;;;EAapB,CAAA;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWrB,CAAA;AAsBF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,CAAC,aAAa,CAAC,OAAO,SAAS,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIhF"}
@@ -1,51 +0,0 @@
1
- import { createClass } from "../createClass.js";
2
- import { BoolExpressionData, BoolAtomData } from "../BoolExp.js";
3
- export const Condition = createClass({
4
- name: 'Condition',
5
- display: (obj) => `${obj.name}`,
6
- public: {
7
- content: {
8
- type: 'function',
9
- required: true,
10
- collection: false
11
- },
12
- name: {
13
- type: 'string'
14
- },
15
- }
16
- });
17
- export const Conditions = createClass({
18
- name: 'Conditions',
19
- display: (obj) => `${obj.name}`,
20
- public: {
21
- // CAUTION content 的类型是 BoolExpressionData<UserAttributiveAtom>
22
- content: {
23
- type: [BoolExpressionData, BoolAtomData],
24
- collection: false,
25
- required: false
26
- },
27
- }
28
- });
29
- function toConditions(obj) {
30
- if (!obj)
31
- return undefined;
32
- if (obj.raw.type === 'atom') {
33
- return BoolAtomData.create({
34
- type: 'atom',
35
- data: obj.raw.data
36
- });
37
- }
38
- const expData = obj.raw;
39
- return BoolExpressionData.create({
40
- type: 'expression',
41
- operator: expData.operator,
42
- left: toConditions(obj.left),
43
- right: toConditions(obj.right),
44
- });
45
- }
46
- export function boolExpToConditions(obj) {
47
- return Conditions.create({
48
- content: toConditions(obj)
49
- });
50
- }
51
- //# sourceMappingURL=Condition.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Condition.js","sourceRoot":"","sources":["../../../src/shared/activity/Condition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAiC,kBAAkB,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAG/F,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;IACjC,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,IAAI,EAAE;IAC/B,MAAM,EAAE;QACJ,OAAO,EAAE;YACL,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;SACpB;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;SACjB;KACJ;CACJ,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;IAClC,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,IAAI,EAAE;IAC/B,MAAM,EAAE;QACJ,+DAA+D;QAC/D,OAAO,EAAE;YACL,IAAI,EAAE,CAAC,kBAAkB,EAAE,YAAY,CAAC;YACxC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAClB;KACJ;CACJ,CAAC,CAAA;AAEF,SAAS,YAAY,CAAC,GAA8C;IAChE,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAA;IAE1B,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QAC1B,OAAO,YAAY,CAAC,MAAM,CAAC;YACvB,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI;SACrB,CAAC,CAAA;IACN,CAAC;IAED,MAAM,OAAO,GAAG,GAAG,CAAC,GAA6D,CAAA;IACjF,OAAO,kBAAkB,CAAC,MAAM,CAAC;QAC7B,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,IAAI,EAAE,YAAY,CAAC,GAAG,CAAC,IAAI,CAAE;QAC7B,KAAK,EAAE,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC;KACjC,CAAC,CAAA;AACN,CAAC;AAGD,MAAM,UAAU,mBAAmB,CAAC,GAA6C;IAC7E,OAAO,UAAU,CAAC,MAAM,CAAC;QACrB,OAAO,EAAE,YAAY,CAAC,GAAG,CAA6C;KACzE,CAAC,CAAA;AACN,CAAC"}
@@ -1,115 +0,0 @@
1
- import { KlassInstance } from "../createClass.js";
2
- import { BoolExp } from "../BoolExp.js";
3
- export declare const DataAttributive: import("../createClass.js").Klass<{
4
- content: {
5
- type: "function";
6
- required: true;
7
- collection: false;
8
- };
9
- name: {
10
- type: "string";
11
- };
12
- }>;
13
- export declare const DataAttributives: import("../createClass.js").Klass<{
14
- content: {
15
- type: (import("../createClass.js").Klass<import("../BoolExp.js").BoolAtomPublic> | import("../createClass.js").Klass<{
16
- type: {
17
- type: "string";
18
- required: true;
19
- collection: false;
20
- defaultValue: () => string;
21
- };
22
- operator: {
23
- type: "string";
24
- required: true;
25
- collection: false;
26
- options: string[];
27
- defaultValue: () => string;
28
- };
29
- left: {
30
- instanceType: (KlassInstance<import("../createClass.js").Klass<import("../BoolExp.js").BoolAtomPublic>> | import("../BoolExp.js").UnwrappedBoolExpressionInstanceType<any>);
31
- required: true;
32
- collection: false;
33
- };
34
- right: {
35
- instanceType: (KlassInstance<import("../createClass.js").Klass<import("../BoolExp.js").BoolAtomPublic>> | import("../BoolExp.js").UnwrappedBoolExpressionInstanceType<any>);
36
- required: false;
37
- collection: false;
38
- };
39
- }>)[];
40
- collection: false;
41
- required: false;
42
- };
43
- }>;
44
- export declare const QueryItem: import("../createClass.js").Klass<{
45
- name: {
46
- type: "string";
47
- required: true;
48
- collection: false;
49
- };
50
- value: {
51
- type: "string";
52
- required: true;
53
- collection: false;
54
- };
55
- }>;
56
- export declare const Query: import("../createClass.js").Klass<{
57
- items: {
58
- type: import("../createClass.js").Klass<{
59
- name: {
60
- type: "string";
61
- required: true;
62
- collection: false;
63
- };
64
- value: {
65
- type: "string";
66
- required: true;
67
- collection: false;
68
- };
69
- }>;
70
- required: true;
71
- collection: true;
72
- };
73
- }>;
74
- export declare const Computation: import("../createClass.js").Klass<{
75
- content: {
76
- type: "function";
77
- required: true;
78
- collection: false;
79
- };
80
- name: {
81
- type: "string";
82
- };
83
- }>;
84
- export declare function boolExpToDataAttributives(obj: BoolExp<KlassInstance<typeof DataAttributive>>): import("../createClass.js").KlassInstanceOfPublic<{
85
- content: {
86
- type: (import("../createClass.js").Klass<import("../BoolExp.js").BoolAtomPublic> | import("../createClass.js").Klass<{
87
- type: {
88
- type: "string";
89
- required: true;
90
- collection: false;
91
- defaultValue: () => string;
92
- };
93
- operator: {
94
- type: "string";
95
- required: true;
96
- collection: false;
97
- options: string[];
98
- defaultValue: () => string;
99
- };
100
- left: {
101
- instanceType: (KlassInstance<import("../createClass.js").Klass<import("../BoolExp.js").BoolAtomPublic>> | import("../BoolExp.js").UnwrappedBoolExpressionInstanceType<any>);
102
- required: true;
103
- collection: false;
104
- };
105
- right: {
106
- instanceType: (KlassInstance<import("../createClass.js").Klass<import("../BoolExp.js").BoolAtomPublic>> | import("../BoolExp.js").UnwrappedBoolExpressionInstanceType<any>);
107
- required: false;
108
- collection: false;
109
- };
110
- }>)[];
111
- collection: false;
112
- required: false;
113
- };
114
- }>;
115
- //# sourceMappingURL=Data.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Data.d.ts","sourceRoot":"","sources":["../../../src/shared/activity/Data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAC,OAAO,EAA0D,MAAM,eAAe,CAAC;AAG/F,eAAO,MAAM,eAAe;;;;;;;;;EAa1B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW3B,CAAA;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;EAcpB,CAAA;AAEF,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;EAShB,CAAA;AAGF,eAAO,MAAM,WAAW;;;;;;;;;EAYtB,CAAA;AAuBF,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,CAAC,aAAa,CAAC,OAAO,eAAe,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAI5F"}
@@ -1,89 +0,0 @@
1
- import { createClass } from "../createClass.js";
2
- import { BoolExpressionData, BoolAtomData } from "../BoolExp.js";
3
- export const DataAttributive = createClass({
4
- name: 'DataAttributive',
5
- display: (obj) => `${obj.name}`,
6
- public: {
7
- content: {
8
- type: 'function',
9
- required: true,
10
- collection: false
11
- },
12
- name: {
13
- type: 'string'
14
- },
15
- }
16
- });
17
- export const DataAttributives = createClass({
18
- name: 'DataAttributives',
19
- display: (obj) => `${obj.name}`,
20
- public: {
21
- // CAUTION content 的类型是 BoolExpressionData<UserAttributiveAtom>
22
- content: {
23
- type: [BoolExpressionData, BoolAtomData],
24
- collection: false,
25
- required: false
26
- },
27
- }
28
- });
29
- export const QueryItem = createClass({
30
- name: 'QueryItem',
31
- public: {
32
- name: {
33
- type: 'string',
34
- required: true,
35
- collection: false,
36
- },
37
- value: {
38
- type: 'string',
39
- required: true,
40
- collection: false,
41
- },
42
- }
43
- });
44
- export const Query = createClass({
45
- name: 'Query',
46
- public: {
47
- items: {
48
- type: QueryItem,
49
- required: true,
50
- collection: true,
51
- }
52
- }
53
- });
54
- export const Computation = createClass({
55
- name: 'Computation',
56
- public: {
57
- content: {
58
- type: 'function',
59
- required: true,
60
- collection: false
61
- },
62
- name: {
63
- type: 'string'
64
- },
65
- }
66
- });
67
- function toDataAttributives(obj) {
68
- if (!obj)
69
- return undefined;
70
- if (obj.raw.type === 'atom') {
71
- return BoolAtomData.create({
72
- type: 'atom',
73
- data: obj.raw.data
74
- });
75
- }
76
- const expData = obj.raw;
77
- return BoolExpressionData.create({
78
- type: 'expression',
79
- operator: expData.operator,
80
- left: toDataAttributives(obj.left),
81
- right: toDataAttributives(obj.right),
82
- });
83
- }
84
- export function boolExpToDataAttributives(obj) {
85
- return DataAttributives.create({
86
- content: toDataAttributives(obj)
87
- });
88
- }
89
- //# sourceMappingURL=Data.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Data.js","sourceRoot":"","sources":["../../../src/shared/activity/Data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAiC,kBAAkB,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAG/F,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;IACvC,IAAI,EAAE,iBAAiB;IACvB,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,IAAI,EAAE;IAC/B,MAAM,EAAE;QACJ,OAAO,EAAE;YACL,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;SACpB;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;SACjB;KACJ;CACJ,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;IACxC,IAAI,EAAE,kBAAkB;IACxB,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,IAAI,EAAE;IAC/B,MAAM,EAAE;QACJ,+DAA+D;QAC/D,OAAO,EAAE;YACL,IAAI,EAAE,CAAC,kBAAkB,EAAE,YAAY,CAAC;YACxC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAClB;KACJ;CACJ,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,WA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