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.
- package/agent/.claude/agents/code-generation-handler.md +598 -0
- package/agent/.claude/agents/computation-generation-handler.md +290 -0
- package/agent/.claude/agents/implement-design-handler.md +179 -0
- package/agent/.claude/agents/permission-generation-handler.md +202 -0
- package/agent/.claude/agents/requirements-analysis-handler-bak.md +530 -0
- package/agent/.claude/agents/requirements-analysis-handler.md +720 -0
- package/agent/.claude/settings.local.json +46 -0
- package/agent/CLAUDE.md +72 -0
- package/dist/index.js +10508 -4
- package/dist/index.js.map +1 -1
- package/dist/runtime/ComputationSourceMap.d.ts +117 -0
- package/dist/runtime/ComputationSourceMap.d.ts.map +1 -0
- package/dist/runtime/Controller.d.ts +37 -26
- package/dist/runtime/Controller.d.ts.map +1 -1
- package/dist/runtime/ExternalSynchronizer.d.ts +6 -0
- package/dist/runtime/ExternalSynchronizer.d.ts.map +1 -0
- package/dist/runtime/MonoSystem.d.ts +29 -17
- package/dist/runtime/MonoSystem.d.ts.map +1 -1
- package/dist/runtime/Mysql.d.ts +2 -2
- package/dist/runtime/PGLite.d.ts +35 -0
- package/dist/runtime/PGLite.d.ts.map +1 -0
- package/dist/runtime/PostgreSQL.d.ts +2 -2
- package/dist/runtime/SQLite.d.ts +3 -3
- package/dist/runtime/SQLite.d.ts.map +1 -1
- package/dist/runtime/Scheduler.d.ts +28 -61
- package/dist/runtime/Scheduler.d.ts.map +1 -1
- package/dist/runtime/System.d.ts +18 -224
- package/dist/runtime/System.d.ts.map +1 -1
- package/dist/runtime/{ActivityCall.d.ts → activity/ActivityCall.d.ts} +6 -7
- package/dist/runtime/activity/ActivityCall.d.ts.map +1 -0
- package/dist/runtime/activity/ActivityManager.d.ts +44 -0
- package/dist/runtime/activity/ActivityManager.d.ts.map +1 -0
- package/dist/runtime/{InteractionCall.d.ts → activity/InteractionCall.d.ts} +28 -41
- package/dist/runtime/activity/InteractionCall.d.ts.map +1 -0
- package/dist/runtime/computations/Any.d.ts +71 -0
- package/dist/runtime/computations/Any.d.ts.map +1 -0
- package/dist/runtime/computations/Average.d.ts +69 -0
- package/dist/runtime/computations/Average.d.ts.map +1 -0
- package/dist/runtime/computations/Computation.d.ts +138 -0
- package/dist/runtime/computations/Computation.d.ts.map +1 -0
- package/dist/runtime/computations/Count.d.ts +73 -0
- package/dist/runtime/computations/Count.d.ts.map +1 -0
- package/dist/runtime/computations/Custom.d.ts +45 -0
- package/dist/runtime/computations/Custom.d.ts.map +1 -0
- package/dist/runtime/computations/Every.d.ts +74 -0
- package/dist/runtime/computations/Every.d.ts.map +1 -0
- package/dist/runtime/computations/MathResolver.d.ts +60 -0
- package/dist/runtime/computations/MathResolver.d.ts.map +1 -0
- package/dist/runtime/computations/RealTime.d.ts +66 -0
- package/dist/runtime/computations/RealTime.d.ts.map +1 -0
- package/dist/runtime/{computedDataHandles → computations}/StateMachine.d.ts +31 -22
- package/dist/runtime/computations/StateMachine.d.ts.map +1 -0
- package/dist/runtime/computations/Summation.d.ts +66 -0
- package/dist/runtime/computations/Summation.d.ts.map +1 -0
- package/dist/runtime/computations/Transform.d.ts +29 -0
- package/dist/runtime/computations/Transform.d.ts.map +1 -0
- package/dist/runtime/computations/TransitionFinder.d.ts +11 -0
- package/dist/runtime/computations/TransitionFinder.d.ts.map +1 -0
- package/dist/runtime/computations/WeightedSummation.d.ts +71 -0
- package/dist/runtime/computations/WeightedSummation.d.ts.map +1 -0
- package/dist/runtime/computations/index.d.ts +22 -0
- package/dist/runtime/computations/index.d.ts.map +1 -0
- package/dist/runtime/errors/ActivityErrors.d.ts +40 -0
- package/dist/runtime/errors/ActivityErrors.d.ts.map +1 -0
- package/dist/runtime/errors/ComputationErrors.d.ts +61 -0
- package/dist/runtime/errors/ComputationErrors.d.ts.map +1 -0
- package/dist/runtime/errors/ConditionErrors.d.ts +33 -0
- package/dist/runtime/errors/ConditionErrors.d.ts.map +1 -0
- package/dist/runtime/errors/FrameworkError.d.ts +77 -0
- package/dist/runtime/errors/FrameworkError.d.ts.map +1 -0
- package/dist/runtime/errors/InteractionErrors.d.ts +21 -0
- package/dist/runtime/errors/InteractionErrors.d.ts.map +1 -0
- package/dist/runtime/errors/SystemErrors.d.ts +16 -0
- package/dist/runtime/errors/SystemErrors.d.ts.map +1 -0
- package/dist/runtime/errors/index.d.ts +37 -0
- package/dist/runtime/errors/index.d.ts.map +1 -0
- package/dist/runtime/index.d.ts +9 -7
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/shared/Action.d.ts +38 -0
- package/dist/shared/Action.d.ts.map +1 -0
- package/dist/shared/Activity.d.ts +178 -0
- package/dist/shared/Activity.d.ts.map +1 -0
- package/dist/shared/Any.d.ts +82 -0
- package/dist/shared/Any.d.ts.map +1 -0
- package/dist/shared/Attributive.d.ts +92 -0
- package/dist/shared/Attributive.d.ts.map +1 -0
- package/dist/shared/Average.d.ts +59 -0
- package/dist/shared/Average.d.ts.map +1 -0
- package/dist/shared/BoolExp.d.ts +139 -63
- package/dist/shared/BoolExp.d.ts.map +1 -1
- package/dist/shared/Computation.d.ts +23 -0
- package/dist/shared/Computation.d.ts.map +1 -0
- package/dist/shared/Condition.d.ts +43 -0
- package/dist/shared/Condition.d.ts.map +1 -0
- package/dist/shared/Conditions.d.ts +38 -0
- package/dist/shared/Conditions.d.ts.map +1 -0
- package/dist/shared/Count.d.ts +77 -0
- package/dist/shared/Count.d.ts.map +1 -0
- package/dist/shared/Custom.d.ts +108 -0
- package/dist/shared/Custom.d.ts.map +1 -0
- package/dist/shared/Data.d.ts +121 -0
- package/dist/shared/Data.d.ts.map +1 -0
- package/dist/shared/DataAttributives.d.ts +38 -0
- package/dist/shared/DataAttributives.d.ts.map +1 -0
- package/dist/shared/Entity.d.ts +96 -0
- package/dist/shared/Entity.d.ts.map +1 -0
- package/dist/shared/Event.d.ts +36 -0
- package/dist/shared/Event.d.ts.map +1 -0
- package/dist/shared/Every.d.ts +85 -0
- package/dist/shared/Every.d.ts.map +1 -0
- package/dist/shared/Gateway.d.ts +36 -0
- package/dist/shared/Gateway.d.ts.map +1 -0
- package/dist/shared/Interaction.d.ts +108 -0
- package/dist/shared/Interaction.d.ts.map +1 -0
- package/dist/shared/Payload.d.ts +39 -0
- package/dist/shared/Payload.d.ts.map +1 -0
- package/dist/shared/PayloadItem.d.ts +85 -0
- package/dist/shared/PayloadItem.d.ts.map +1 -0
- package/dist/shared/Property.d.ts +83 -0
- package/dist/shared/Property.d.ts.map +1 -0
- package/dist/shared/RealDictionary.d.ts +94 -0
- package/dist/shared/RealDictionary.d.ts.map +1 -0
- package/dist/shared/RealTime.d.ts +66 -0
- package/dist/shared/RealTime.d.ts.map +1 -0
- package/dist/shared/RefContainer.d.ts +89 -0
- package/dist/shared/RefContainer.d.ts.map +1 -0
- package/dist/shared/Relation.d.ts +140 -0
- package/dist/shared/Relation.d.ts.map +1 -0
- package/dist/shared/SideEffect.d.ts +45 -0
- package/dist/shared/SideEffect.d.ts.map +1 -0
- package/dist/shared/StateMachine.d.ts +55 -0
- package/dist/shared/StateMachine.d.ts.map +1 -0
- package/dist/shared/StateNode.d.ts +45 -0
- package/dist/shared/StateNode.d.ts.map +1 -0
- package/dist/shared/StateTransfer.d.ts +63 -0
- package/dist/shared/StateTransfer.d.ts.map +1 -0
- package/dist/shared/Summation.d.ts +59 -0
- package/dist/shared/Summation.d.ts.map +1 -0
- package/dist/shared/Transform.d.ts +54 -0
- package/dist/shared/Transform.d.ts.map +1 -0
- package/dist/shared/User.d.ts +10 -0
- package/dist/shared/User.d.ts.map +1 -0
- package/dist/shared/WeightedSummation.d.ts +82 -0
- package/dist/shared/WeightedSummation.d.ts.map +1 -0
- package/dist/shared/index.d.ts +35 -9
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/init.d.ts +3 -0
- package/dist/shared/init.d.ts.map +1 -0
- package/dist/shared/interfaces.d.ts +72 -0
- package/dist/shared/interfaces.d.ts.map +1 -0
- package/dist/shared/types.d.ts +77 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/utils.d.ts +16 -10
- package/dist/shared/utils.d.ts.map +1 -1
- package/dist/storage/erstorage/AttributeInfo.d.ts +8 -3
- package/dist/storage/erstorage/AttributeInfo.d.ts.map +1 -1
- package/dist/storage/erstorage/AttributeQuery.d.ts +4 -3
- package/dist/storage/erstorage/AttributeQuery.d.ts.map +1 -1
- package/dist/storage/erstorage/EntityQueryHandle.d.ts +18 -17
- package/dist/storage/erstorage/EntityQueryHandle.d.ts.map +1 -1
- package/dist/storage/erstorage/EntityToTableMap.d.ts +27 -5
- package/dist/storage/erstorage/EntityToTableMap.d.ts.map +1 -1
- package/dist/storage/erstorage/FilteredEntityManager.d.ts +70 -0
- package/dist/storage/erstorage/FilteredEntityManager.d.ts.map +1 -0
- package/dist/storage/erstorage/LinkInfo.d.ts +10 -3
- package/dist/storage/erstorage/LinkInfo.d.ts.map +1 -1
- package/dist/storage/erstorage/MatchExp.d.ts +19 -9
- package/dist/storage/erstorage/MatchExp.d.ts.map +1 -1
- package/dist/storage/erstorage/MergedItemProcessor.d.ts +25 -0
- package/dist/storage/erstorage/MergedItemProcessor.d.ts.map +1 -0
- package/dist/storage/erstorage/Modifier.d.ts +1 -1
- package/dist/storage/erstorage/NewRecordData.d.ts +16 -9
- package/dist/storage/erstorage/NewRecordData.d.ts.map +1 -1
- package/dist/storage/erstorage/RecordInfo.d.ts +11 -2
- package/dist/storage/erstorage/RecordInfo.d.ts.map +1 -1
- package/dist/storage/erstorage/RecordQuery.d.ts +9 -8
- package/dist/storage/erstorage/RecordQuery.d.ts.map +1 -1
- package/dist/storage/erstorage/RecordQueryAgent.d.ts +26 -13
- package/dist/storage/erstorage/RecordQueryAgent.d.ts.map +1 -1
- package/dist/storage/erstorage/Setup.d.ts +49 -11
- package/dist/storage/erstorage/Setup.d.ts.map +1 -1
- package/dist/storage/erstorage/util.d.ts.map +1 -1
- package/package.json +44 -20
- package/README.md +0 -53
- package/dist/runtime/ActivityCall.d.ts.map +0 -1
- package/dist/runtime/ActivityCall.js +0 -379
- package/dist/runtime/ActivityCall.js.map +0 -1
- package/dist/runtime/Controller.js +0 -225
- package/dist/runtime/Controller.js.map +0 -1
- package/dist/runtime/InteractionCall.d.ts.map +0 -1
- package/dist/runtime/InteractionCall.js +0 -385
- package/dist/runtime/InteractionCall.js.map +0 -1
- package/dist/runtime/MonoSystem.js +0 -331
- package/dist/runtime/MonoSystem.js.map +0 -1
- package/dist/runtime/Mysql.js +0 -171
- package/dist/runtime/Mysql.js.map +0 -1
- package/dist/runtime/PostgreSQL.js +0 -172
- package/dist/runtime/PostgreSQL.js.map +0 -1
- package/dist/runtime/SQLite.js +0 -146
- package/dist/runtime/SQLite.js.map +0 -1
- package/dist/runtime/Scheduler.js +0 -457
- package/dist/runtime/Scheduler.js.map +0 -1
- package/dist/runtime/System.js +0 -90
- package/dist/runtime/System.js.map +0 -1
- package/dist/runtime/asyncInteractionContext.js +0 -3
- package/dist/runtime/asyncInteractionContext.js.map +0 -1
- package/dist/runtime/boolExpression.js +0 -43
- package/dist/runtime/boolExpression.js.map +0 -1
- package/dist/runtime/computedDataHandles/Any.d.ts +0 -52
- package/dist/runtime/computedDataHandles/Any.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/Any.js +0 -152
- package/dist/runtime/computedDataHandles/Any.js.map +0 -1
- package/dist/runtime/computedDataHandles/Computation.d.ts +0 -108
- package/dist/runtime/computedDataHandles/Computation.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/Computation.js +0 -49
- package/dist/runtime/computedDataHandles/Computation.js.map +0 -1
- package/dist/runtime/computedDataHandles/ComputedDataHandle.d.ts +0 -42
- package/dist/runtime/computedDataHandles/ComputedDataHandle.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/ComputedDataHandle.js +0 -4
- package/dist/runtime/computedDataHandles/ComputedDataHandle.js.map +0 -1
- package/dist/runtime/computedDataHandles/Count.d.ts +0 -45
- package/dist/runtime/computedDataHandles/Count.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/Count.js +0 -85
- package/dist/runtime/computedDataHandles/Count.js.map +0 -1
- package/dist/runtime/computedDataHandles/Every.d.ts +0 -56
- package/dist/runtime/computedDataHandles/Every.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/Every.js +0 -178
- package/dist/runtime/computedDataHandles/Every.js.map +0 -1
- package/dist/runtime/computedDataHandles/StateMachine.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/StateMachine.js +0 -180
- package/dist/runtime/computedDataHandles/StateMachine.js.map +0 -1
- package/dist/runtime/computedDataHandles/Transform.d.ts +0 -26
- package/dist/runtime/computedDataHandles/Transform.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/Transform.js +0 -106
- package/dist/runtime/computedDataHandles/Transform.js.map +0 -1
- package/dist/runtime/computedDataHandles/TransitionFinder.d.ts +0 -57
- package/dist/runtime/computedDataHandles/TransitionFinder.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/TransitionFinder.js +0 -40
- package/dist/runtime/computedDataHandles/TransitionFinder.js.map +0 -1
- package/dist/runtime/computedDataHandles/WeightedSummation.d.ts +0 -57
- package/dist/runtime/computedDataHandles/WeightedSummation.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/WeightedSummation.js +0 -146
- package/dist/runtime/computedDataHandles/WeightedSummation.js.map +0 -1
- package/dist/runtime/computedDataHandles/index.d.ts +0 -7
- package/dist/runtime/computedDataHandles/index.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/index.js +0 -7
- package/dist/runtime/computedDataHandles/index.js.map +0 -1
- package/dist/runtime/index.js +0 -15
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/server.d.ts +0 -35
- package/dist/runtime/server.d.ts.map +0 -1
- package/dist/runtime/server.js +0 -171
- package/dist/runtime/server.js.map +0 -1
- package/dist/runtime/types/boolExpression.js +0 -6
- package/dist/runtime/types/boolExpression.js.map +0 -1
- package/dist/runtime/util.js +0 -39
- package/dist/runtime/util.js.map +0 -1
- package/dist/shared/BoolExp.js +0 -252
- package/dist/shared/BoolExp.js.map +0 -1
- package/dist/shared/activity/Activity.d.ts +0 -465
- package/dist/shared/activity/Activity.d.ts.map +0 -1
- package/dist/shared/activity/Activity.js +0 -264
- package/dist/shared/activity/Activity.js.map +0 -1
- package/dist/shared/activity/Condition.d.ts +0 -75
- package/dist/shared/activity/Condition.d.ts.map +0 -1
- package/dist/shared/activity/Condition.js +0 -51
- package/dist/shared/activity/Condition.js.map +0 -1
- package/dist/shared/activity/Data.d.ts +0 -115
- package/dist/shared/activity/Data.d.ts.map +0 -1
- package/dist/shared/activity/Data.js +0 -89
- package/dist/shared/activity/Data.js.map +0 -1
- package/dist/shared/attributive.d.ts +0 -93
- package/dist/shared/attributive.d.ts.map +0 -1
- package/dist/shared/attributive.js +0 -59
- package/dist/shared/attributive.js.map +0 -1
- package/dist/shared/computed.d.ts +0 -607
- package/dist/shared/computed.d.ts.map +0 -1
- package/dist/shared/computed.js +0 -202
- package/dist/shared/computed.js.map +0 -1
- package/dist/shared/createClass.d.ts +0 -102
- package/dist/shared/createClass.d.ts.map +0 -1
- package/dist/shared/createClass.js +0 -276
- package/dist/shared/createClass.js.map +0 -1
- package/dist/shared/dictionary/Dictionary.d.ts +0 -40
- package/dist/shared/dictionary/Dictionary.d.ts.map +0 -1
- package/dist/shared/dictionary/Dictionary.js +0 -51
- package/dist/shared/dictionary/Dictionary.js.map +0 -1
- package/dist/shared/entity/Entity.d.ts +0 -149
- package/dist/shared/entity/Entity.d.ts.map +0 -1
- package/dist/shared/entity/Entity.js +0 -226
- package/dist/shared/entity/Entity.js.map +0 -1
- package/dist/shared/index.js +0 -11
- package/dist/shared/index.js.map +0 -1
- package/dist/shared/user/User.d.ts +0 -21
- package/dist/shared/user/User.d.ts.map +0 -1
- package/dist/shared/user/User.js +0 -11
- package/dist/shared/user/User.js.map +0 -1
- package/dist/shared/utils.js +0 -19
- package/dist/shared/utils.js.map +0 -1
- package/dist/storage/erstorage/AttributeInfo.js +0 -147
- package/dist/storage/erstorage/AttributeInfo.js.map +0 -1
- package/dist/storage/erstorage/AttributeQuery.js +0 -190
- package/dist/storage/erstorage/AttributeQuery.js.map +0 -1
- package/dist/storage/erstorage/EntityQueryHandle.js +0 -78
- package/dist/storage/erstorage/EntityQueryHandle.js.map +0 -1
- package/dist/storage/erstorage/EntityToTableMap.js +0 -262
- package/dist/storage/erstorage/EntityToTableMap.js.map +0 -1
- package/dist/storage/erstorage/LinkInfo.js +0 -89
- package/dist/storage/erstorage/LinkInfo.js.map +0 -1
- package/dist/storage/erstorage/MatchExp.js +0 -211
- package/dist/storage/erstorage/MatchExp.js.map +0 -1
- package/dist/storage/erstorage/Modifier.js +0 -24
- package/dist/storage/erstorage/Modifier.js.map +0 -1
- package/dist/storage/erstorage/NewRecordData.js +0 -178
- package/dist/storage/erstorage/NewRecordData.js.map +0 -1
- package/dist/storage/erstorage/RecordInfo.js +0 -111
- package/dist/storage/erstorage/RecordInfo.js.map +0 -1
- package/dist/storage/erstorage/RecordQuery.js +0 -158
- package/dist/storage/erstorage/RecordQuery.js.map +0 -1
- package/dist/storage/erstorage/RecordQueryAgent.js +0 -1130
- package/dist/storage/erstorage/RecordQueryAgent.js.map +0 -1
- package/dist/storage/erstorage/Setup.js +0 -400
- package/dist/storage/erstorage/Setup.js.map +0 -1
- package/dist/storage/erstorage/util.js +0 -25
- package/dist/storage/erstorage/util.js.map +0 -1
- package/dist/storage/index.js +0 -13
- package/dist/storage/index.js.map +0 -1
- package/dist/storage/utils.js +0 -48
- 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,C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nD,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,G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