@cntrl-site/sdk-nextjs 1.9.13-0 → 1.9.13-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -105,149 +105,136 @@ class InteractionsRegistry {
|
|
|
105
105
|
return available;
|
|
106
106
|
}
|
|
107
107
|
notifyLoad() {
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
this.notifyItemCtrlsChange(Array.from(itemsToNotify));
|
|
147
|
-
this.notifyTransitionStartForItems(transitioningItems, activeStateId);
|
|
148
|
-
}
|
|
108
|
+
// const timestamp = Date.now();
|
|
109
|
+
// for (const interaction of this.interactions) {
|
|
110
|
+
// const currentStateId = this.getCurrentStateByInteractionId(interaction.id);
|
|
111
|
+
// const matchingTrigger = interaction.triggers.find(trigger =>
|
|
112
|
+
// 'position' in trigger && trigger.position === 0 && trigger.from === currentStateId
|
|
113
|
+
// );
|
|
114
|
+
// if (!matchingTrigger) continue;
|
|
115
|
+
// const activeStateId = this.getActiveInteractionState(interaction.id);
|
|
116
|
+
// const isNewStateActive = matchingTrigger.to === activeStateId;
|
|
117
|
+
// this.setCurrentStateForInteraction(interaction.id, matchingTrigger.to);
|
|
118
|
+
// const transitioningItems = this.stateItemsIdsMap[activeStateId] ?? [];
|
|
119
|
+
// const state = interaction.states.find((state) => state.id === matchingTrigger.to);
|
|
120
|
+
// const actions = state?.actions ?? [];
|
|
121
|
+
// for (const action of actions) {
|
|
122
|
+
// const ctrl = this.ctrls.get(action.itemId);
|
|
123
|
+
// if (!ctrl) continue;
|
|
124
|
+
// ctrl.receiveAction(action.type);
|
|
125
|
+
// }
|
|
126
|
+
// this.itemsStages = this.itemsStages.map((stage) => {
|
|
127
|
+
// if (stage.interactionId !== interaction.id) return stage;
|
|
128
|
+
// return {
|
|
129
|
+
// itemId: stage.itemId,
|
|
130
|
+
// interactionId: stage.interactionId,
|
|
131
|
+
// type: 'transitioning',
|
|
132
|
+
// from: stage.type === 'transitioning' ? stage.to : stage.stateId!,
|
|
133
|
+
// to: matchingTrigger.to,
|
|
134
|
+
// direction: isNewStateActive ? 'in' : 'out',
|
|
135
|
+
// updated: timestamp
|
|
136
|
+
// };
|
|
137
|
+
// });
|
|
138
|
+
// const itemsToNotify = new Set<ItemId>(transitioningItems);
|
|
139
|
+
// for (const trigger of interaction.triggers) {
|
|
140
|
+
// if (!('itemId' in trigger)) continue;
|
|
141
|
+
// itemsToNotify.add(trigger.itemId);
|
|
142
|
+
// }
|
|
143
|
+
// this.notifyItemCtrlsChange(Array.from(itemsToNotify));
|
|
144
|
+
// this.notifyTransitionStartForItems(transitioningItems, activeStateId);
|
|
145
|
+
// }
|
|
149
146
|
}
|
|
150
147
|
notifyScroll(position) {
|
|
151
|
-
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
if (!('itemId' in trigger))
|
|
199
|
-
continue;
|
|
200
|
-
itemsToNotify.add(trigger.itemId);
|
|
201
|
-
}
|
|
202
|
-
this.notifyItemCtrlsChange(Array.from(itemsToNotify));
|
|
203
|
-
this.notifyTransitionStartForItems(transitioningItems, activeStateId);
|
|
204
|
-
}
|
|
148
|
+
// const timestamp = Date.now();
|
|
149
|
+
// for (const interaction of this.interactions) {
|
|
150
|
+
// const currentStateId = this.getCurrentStateByInteractionId(interaction.id);
|
|
151
|
+
// const activeStateId = interaction.states.find((state) => state.id !== interaction.startStateId)?.id;
|
|
152
|
+
// const matchingTrigger = interaction.triggers.find((trigger) => {
|
|
153
|
+
// if (!('position' in trigger) || trigger.position === 0) return false;
|
|
154
|
+
// const triggerPosition = trigger.position * window.innerWidth;
|
|
155
|
+
// const isScrolledPastTrigger = triggerPosition < position;
|
|
156
|
+
// if (!isScrolledPastTrigger && !trigger.isReverse) return false;
|
|
157
|
+
// const stateId = isScrolledPastTrigger ? trigger.from : trigger.to;
|
|
158
|
+
// return stateId === currentStateId;
|
|
159
|
+
// });
|
|
160
|
+
// if (!matchingTrigger || !('position' in matchingTrigger) || !activeStateId) continue;
|
|
161
|
+
// const triggerPosition = matchingTrigger.position * window.innerWidth;
|
|
162
|
+
// const isScrolledPastTrigger = triggerPosition < position;
|
|
163
|
+
// const targetStateId = isScrolledPastTrigger ? matchingTrigger.to : matchingTrigger.from;
|
|
164
|
+
// this.setCurrentStateForInteraction(interaction.id, targetStateId);
|
|
165
|
+
// const transitioningItems = this.stateItemsIdsMap[activeStateId] ?? [];
|
|
166
|
+
// const state = interaction.states.find((state) => state.id === targetStateId);
|
|
167
|
+
// const actions = state?.actions ?? [];
|
|
168
|
+
// for (const action of actions) {
|
|
169
|
+
// const ctrl = this.ctrls.get(action.itemId);
|
|
170
|
+
// if (!ctrl) continue;
|
|
171
|
+
// ctrl.receiveAction(action.type);
|
|
172
|
+
// }
|
|
173
|
+
// const itemsStages = this.itemsStages.map((stage) => {
|
|
174
|
+
// if (stage.interactionId !== interaction.id) return stage;
|
|
175
|
+
// const newStage = {
|
|
176
|
+
// itemId: stage.itemId,
|
|
177
|
+
// interactionId: stage.interactionId,
|
|
178
|
+
// type: 'transitioning' as const,
|
|
179
|
+
// from: stage.type === 'transitioning' ? stage.to : stage.stateId!,
|
|
180
|
+
// to: targetStateId,
|
|
181
|
+
// direction: targetStateId === activeStateId ? 'in' as const : 'out' as const,
|
|
182
|
+
// updated: timestamp
|
|
183
|
+
// };
|
|
184
|
+
// return newStage;
|
|
185
|
+
// });
|
|
186
|
+
// this.itemsStages = itemsStages;
|
|
187
|
+
// const itemsToNotify = new Set<ItemId>(transitioningItems);
|
|
188
|
+
// for (const trigger of interaction.triggers) {
|
|
189
|
+
// if (!('itemId' in trigger)) continue;
|
|
190
|
+
// itemsToNotify.add(trigger.itemId);
|
|
191
|
+
// }
|
|
192
|
+
// this.notifyItemCtrlsChange(Array.from(itemsToNotify));
|
|
193
|
+
// this.notifyTransitionStartForItems(transitioningItems, activeStateId);
|
|
194
|
+
// }
|
|
205
195
|
}
|
|
206
196
|
notifyItemTrigger(itemId, triggerType) {
|
|
207
|
-
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
this.notifyItemCtrlsChange(Array.from(itemsToNotify));
|
|
249
|
-
this.notifyTransitionStartForItems(transitioningItems, activeStateId);
|
|
250
|
-
}
|
|
197
|
+
// const timestamp = Date.now();
|
|
198
|
+
// for (const interaction of this.interactions) {
|
|
199
|
+
// const currentStateId = this.getCurrentStateByInteractionId(interaction.id);
|
|
200
|
+
// const matchingTrigger = interaction.triggers.find((trigger) =>
|
|
201
|
+
// 'triggerEvent' in trigger
|
|
202
|
+
// && trigger.itemId === itemId
|
|
203
|
+
// && trigger.from === currentStateId
|
|
204
|
+
// && trigger.triggerEvent === triggerType
|
|
205
|
+
// );
|
|
206
|
+
// if (!matchingTrigger) continue;
|
|
207
|
+
// const activeStateId = this.getActiveInteractionState(interaction.id);
|
|
208
|
+
// const isNewStateActive = matchingTrigger.to === activeStateId;
|
|
209
|
+
// this.setCurrentStateForInteraction(interaction.id, matchingTrigger.to);
|
|
210
|
+
// const transitioningItems = this.stateItemsIdsMap[activeStateId] ?? [];
|
|
211
|
+
// const state = interaction.states.find((state) => state.id === matchingTrigger.to);
|
|
212
|
+
// const actions = state?.actions ?? [];
|
|
213
|
+
// for (const action of actions) {
|
|
214
|
+
// const ctrl = this.ctrls.get(action.itemId);
|
|
215
|
+
// if (!ctrl) continue;
|
|
216
|
+
// ctrl.receiveAction(action.type);
|
|
217
|
+
// }
|
|
218
|
+
// this.itemsStages = this.itemsStages.map((stage) => {
|
|
219
|
+
// if (stage.interactionId !== interaction.id) return stage;
|
|
220
|
+
// return {
|
|
221
|
+
// itemId: stage.itemId,
|
|
222
|
+
// interactionId: stage.interactionId,
|
|
223
|
+
// type: 'transitioning',
|
|
224
|
+
// from: stage.type === 'transitioning' ? stage.to : stage.stateId!,
|
|
225
|
+
// to: matchingTrigger.to,
|
|
226
|
+
// direction: isNewStateActive ? 'in' : 'out',
|
|
227
|
+
// updated: timestamp
|
|
228
|
+
// };
|
|
229
|
+
// });
|
|
230
|
+
// const itemsToNotify = new Set<ItemId>(transitioningItems);
|
|
231
|
+
// for (const trigger of interaction.triggers) {
|
|
232
|
+
// if (!('itemId' in trigger)) continue;
|
|
233
|
+
// itemsToNotify.add(trigger.itemId);
|
|
234
|
+
// }
|
|
235
|
+
// this.notifyItemCtrlsChange(Array.from(itemsToNotify));
|
|
236
|
+
// this.notifyTransitionStartForItems(transitioningItems, activeStateId);
|
|
237
|
+
// }
|
|
251
238
|
}
|
|
252
239
|
notifyTransitionStartForItems(itemsIds, activeStateId) {
|
|
253
240
|
var _a, _b;
|
package/package.json
CHANGED
|
@@ -113,140 +113,140 @@ export class InteractionsRegistry implements InteractionsRegistryPort {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
notifyLoad() {
|
|
116
|
-
const timestamp = Date.now();
|
|
117
|
-
for (const interaction of this.interactions) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
116
|
+
// const timestamp = Date.now();
|
|
117
|
+
// for (const interaction of this.interactions) {
|
|
118
|
+
// const currentStateId = this.getCurrentStateByInteractionId(interaction.id);
|
|
119
|
+
// const matchingTrigger = interaction.triggers.find(trigger =>
|
|
120
|
+
// 'position' in trigger && trigger.position === 0 && trigger.from === currentStateId
|
|
121
|
+
// );
|
|
122
|
+
// if (!matchingTrigger) continue;
|
|
123
|
+
// const activeStateId = this.getActiveInteractionState(interaction.id);
|
|
124
|
+
// const isNewStateActive = matchingTrigger.to === activeStateId;
|
|
125
|
+
// this.setCurrentStateForInteraction(interaction.id, matchingTrigger.to);
|
|
126
|
+
// const transitioningItems = this.stateItemsIdsMap[activeStateId] ?? [];
|
|
127
|
+
// const state = interaction.states.find((state) => state.id === matchingTrigger.to);
|
|
128
|
+
// const actions = state?.actions ?? [];
|
|
129
|
+
// for (const action of actions) {
|
|
130
|
+
// const ctrl = this.ctrls.get(action.itemId);
|
|
131
|
+
// if (!ctrl) continue;
|
|
132
|
+
// ctrl.receiveAction(action.type);
|
|
133
|
+
// }
|
|
134
134
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
135
|
+
// this.itemsStages = this.itemsStages.map((stage) => {
|
|
136
|
+
// if (stage.interactionId !== interaction.id) return stage;
|
|
137
|
+
// return {
|
|
138
|
+
// itemId: stage.itemId,
|
|
139
|
+
// interactionId: stage.interactionId,
|
|
140
|
+
// type: 'transitioning',
|
|
141
|
+
// from: stage.type === 'transitioning' ? stage.to : stage.stateId!,
|
|
142
|
+
// to: matchingTrigger.to,
|
|
143
|
+
// direction: isNewStateActive ? 'in' : 'out',
|
|
144
|
+
// updated: timestamp
|
|
145
|
+
// };
|
|
146
|
+
// });
|
|
147
147
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
148
|
+
// const itemsToNotify = new Set<ItemId>(transitioningItems);
|
|
149
|
+
// for (const trigger of interaction.triggers) {
|
|
150
|
+
// if (!('itemId' in trigger)) continue;
|
|
151
|
+
// itemsToNotify.add(trigger.itemId);
|
|
152
|
+
// }
|
|
153
|
+
// this.notifyItemCtrlsChange(Array.from(itemsToNotify));
|
|
154
|
+
// this.notifyTransitionStartForItems(transitioningItems, activeStateId);
|
|
155
|
+
// }
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
notifyScroll(position: number) {
|
|
159
|
-
const timestamp = Date.now();
|
|
160
|
-
for (const interaction of this.interactions) {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
159
|
+
// const timestamp = Date.now();
|
|
160
|
+
// for (const interaction of this.interactions) {
|
|
161
|
+
// const currentStateId = this.getCurrentStateByInteractionId(interaction.id);
|
|
162
|
+
// const activeStateId = interaction.states.find((state) => state.id !== interaction.startStateId)?.id;
|
|
163
|
+
// const matchingTrigger = interaction.triggers.find((trigger) => {
|
|
164
|
+
// if (!('position' in trigger) || trigger.position === 0) return false;
|
|
165
|
+
// const triggerPosition = trigger.position * window.innerWidth;
|
|
166
|
+
// const isScrolledPastTrigger = triggerPosition < position;
|
|
167
|
+
// if (!isScrolledPastTrigger && !trigger.isReverse) return false;
|
|
168
|
+
// const stateId = isScrolledPastTrigger ? trigger.from : trigger.to;
|
|
169
|
+
// return stateId === currentStateId;
|
|
170
|
+
// });
|
|
171
|
+
// if (!matchingTrigger || !('position' in matchingTrigger) || !activeStateId) continue;
|
|
172
|
+
// const triggerPosition = matchingTrigger.position * window.innerWidth;
|
|
173
|
+
// const isScrolledPastTrigger = triggerPosition < position;
|
|
174
|
+
// const targetStateId = isScrolledPastTrigger ? matchingTrigger.to : matchingTrigger.from;
|
|
175
|
+
// this.setCurrentStateForInteraction(interaction.id, targetStateId);
|
|
176
|
+
// const transitioningItems = this.stateItemsIdsMap[activeStateId] ?? [];
|
|
177
|
+
// const state = interaction.states.find((state) => state.id === targetStateId);
|
|
178
|
+
// const actions = state?.actions ?? [];
|
|
179
|
+
// for (const action of actions) {
|
|
180
|
+
// const ctrl = this.ctrls.get(action.itemId);
|
|
181
|
+
// if (!ctrl) continue;
|
|
182
|
+
// ctrl.receiveAction(action.type);
|
|
183
|
+
// }
|
|
184
|
+
// const itemsStages = this.itemsStages.map((stage) => {
|
|
185
|
+
// if (stage.interactionId !== interaction.id) return stage;
|
|
186
|
+
// const newStage = {
|
|
187
|
+
// itemId: stage.itemId,
|
|
188
|
+
// interactionId: stage.interactionId,
|
|
189
|
+
// type: 'transitioning' as const,
|
|
190
|
+
// from: stage.type === 'transitioning' ? stage.to : stage.stateId!,
|
|
191
|
+
// to: targetStateId,
|
|
192
|
+
// direction: targetStateId === activeStateId ? 'in' as const : 'out' as const,
|
|
193
|
+
// updated: timestamp
|
|
194
|
+
// };
|
|
195
|
+
// return newStage;
|
|
196
|
+
// });
|
|
197
|
+
// this.itemsStages = itemsStages;
|
|
198
|
+
// const itemsToNotify = new Set<ItemId>(transitioningItems);
|
|
199
|
+
// for (const trigger of interaction.triggers) {
|
|
200
|
+
// if (!('itemId' in trigger)) continue;
|
|
201
|
+
// itemsToNotify.add(trigger.itemId);
|
|
202
|
+
// }
|
|
203
|
+
// this.notifyItemCtrlsChange(Array.from(itemsToNotify));
|
|
204
|
+
// this.notifyTransitionStartForItems(transitioningItems, activeStateId);
|
|
205
|
+
// }
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
notifyItemTrigger(itemId: string, triggerType: TriggerType): void {
|
|
209
|
-
const timestamp = Date.now();
|
|
210
|
-
for (const interaction of this.interactions) {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
}
|
|
209
|
+
// const timestamp = Date.now();
|
|
210
|
+
// for (const interaction of this.interactions) {
|
|
211
|
+
// const currentStateId = this.getCurrentStateByInteractionId(interaction.id);
|
|
212
|
+
// const matchingTrigger = interaction.triggers.find((trigger) =>
|
|
213
|
+
// 'triggerEvent' in trigger
|
|
214
|
+
// && trigger.itemId === itemId
|
|
215
|
+
// && trigger.from === currentStateId
|
|
216
|
+
// && trigger.triggerEvent === triggerType
|
|
217
|
+
// );
|
|
218
|
+
// if (!matchingTrigger) continue;
|
|
219
|
+
// const activeStateId = this.getActiveInteractionState(interaction.id);
|
|
220
|
+
// const isNewStateActive = matchingTrigger.to === activeStateId;
|
|
221
|
+
// this.setCurrentStateForInteraction(interaction.id, matchingTrigger.to);
|
|
222
|
+
// const transitioningItems = this.stateItemsIdsMap[activeStateId] ?? [];
|
|
223
|
+
// const state = interaction.states.find((state) => state.id === matchingTrigger.to);
|
|
224
|
+
// const actions = state?.actions ?? [];
|
|
225
|
+
// for (const action of actions) {
|
|
226
|
+
// const ctrl = this.ctrls.get(action.itemId);
|
|
227
|
+
// if (!ctrl) continue;
|
|
228
|
+
// ctrl.receiveAction(action.type);
|
|
229
|
+
// }
|
|
230
|
+
// this.itemsStages = this.itemsStages.map((stage) => {
|
|
231
|
+
// if (stage.interactionId !== interaction.id) return stage;
|
|
232
|
+
// return {
|
|
233
|
+
// itemId: stage.itemId,
|
|
234
|
+
// interactionId: stage.interactionId,
|
|
235
|
+
// type: 'transitioning',
|
|
236
|
+
// from: stage.type === 'transitioning' ? stage.to : stage.stateId!,
|
|
237
|
+
// to: matchingTrigger.to,
|
|
238
|
+
// direction: isNewStateActive ? 'in' : 'out',
|
|
239
|
+
// updated: timestamp
|
|
240
|
+
// };
|
|
241
|
+
// });
|
|
242
|
+
// const itemsToNotify = new Set<ItemId>(transitioningItems);
|
|
243
|
+
// for (const trigger of interaction.triggers) {
|
|
244
|
+
// if (!('itemId' in trigger)) continue;
|
|
245
|
+
// itemsToNotify.add(trigger.itemId);
|
|
246
|
+
// }
|
|
247
|
+
// this.notifyItemCtrlsChange(Array.from(itemsToNotify));
|
|
248
|
+
// this.notifyTransitionStartForItems(transitioningItems, activeStateId);
|
|
249
|
+
// }
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
notifyTransitionStartForItems(itemsIds: string[], activeStateId: string) {
|