@applicaster/quick-brick-native-apple 6.14.0 → 6.14.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "QuickBrickApple",
3
- "version": "6.14.0",
3
+ "version": "6.14.2",
4
4
  "platforms": {
5
5
  "ios": "16.0",
6
6
  "tvos": "16.0"
@@ -16,7 +16,7 @@
16
16
  "authors": "Applicaster LTD.",
17
17
  "source": {
18
18
  "git": "https://github.com/applicaster/Zapp-Frameworks.git",
19
- "tag": "@@applicaster/quick-brick-native-apple/6.14.0"
19
+ "tag": "@@applicaster/quick-brick-native-apple/6.14.2"
20
20
  },
21
21
  "requires_arc": true,
22
22
  "source_files": "universal/**/*.{m,swift}",
@@ -25,15 +25,15 @@ extension FocusableGroupManager {
25
25
  Task { @MainActor
26
26
  [weak self] in
27
27
  guard let self else { return }
28
+
28
29
  logFocusError(userInfo: userInfo,
29
30
  ctx: ctx,
30
31
  prev: prev,
31
32
  next: next)
33
+ simulateFocusUpdateRequest(prev: prev, next: next)
32
34
 
33
- // TODO: Unocomment for debugging
34
- // simulateFocusUpdateRequest(prev: prev, next: next)
35
-
36
- await tryToRestoreCorruptedFocusState(rootView: rootView, next: next)
35
+ // TODO: Imlamentation not need now, uncommit in futer if needed
36
+ // await tryToRestoreCorruptedFocusState(rootView: rootView, next: next)
37
37
  }
38
38
  }
39
39
  }
@@ -30,7 +30,8 @@ class FocusableGroupManager {
30
30
  self.itemStorage = itemStorage
31
31
  self.updateService = updateService
32
32
 
33
- registerForMovementDidFailNotification()
33
+ // TODO: Unocomment for debugging or catch focus
34
+ // registerForMovementDidFailNotification()
34
35
  }
35
36
 
36
37
  // MARK: - Group Managment
@@ -154,7 +154,7 @@ public class FocusableGroupView: RCTTVView {
154
154
 
155
155
  params[GroupViewUpdateEvents.previouslyFocusedItem] = dataForFocusItem(focusItem: context.previouslyFocusedView)
156
156
  params[GroupViewUpdateEvents.nextFocusedItem] = dataForFocusItem(focusItem: context.nextFocusedView)
157
- params[GroupViewUpdateEvents.preferredFocusEnvironment] = dataForFocusItem(focusItem: customPreferredFocusEnvironment?.first)
157
+ params[GroupViewUpdateEvents.preferredFocusEnvironment] = dataForFocusItem(focusItem: preferredFocusEnvironments.first)
158
158
  params[GroupViewUpdateEvents.groupId] = groupId
159
159
  params[GroupViewUpdateEvents.isActive] = isActive
160
160
  params[GroupViewUpdateEvents.isFocusDisabled] = isFocusDisabled
@@ -179,12 +179,16 @@ public class FocusableGroupView: RCTTVView {
179
179
  /// - Returns: dictionary instance in case data exists, otherwise nil
180
180
  private func dataForFocusItem(focusItem: Any?) -> [String: Any]? {
181
181
  var retVal = [String: Any]()
182
- if let focusedView = focusItem as? RCTTVView {
182
+ if let focusedView = focusItem as? FocusableView {
183
183
  retVal[FocusItemDataKeys.describingView] = String(describing: focusedView)
184
184
  if let reactTag = focusedView.reactTag?.stringValue {
185
185
  retVal[FocusItemDataKeys.reactTag] = reactTag
186
186
  }
187
187
  retVal[FocusItemDataKeys.isDescendant] = focusedView.isDescendant(of: self)
188
+ retVal[FocusItemDataKeys.itemId] = focusedView.itemId ?? "NO_ID"
189
+ retVal[FocusItemDataKeys.groupId] = focusedView.groupId ?? "NO_GROUP"
190
+ retVal[FocusItemDataKeys.preferredFocus] = focusedView.preferredFocus
191
+ retVal[FocusItemDataKeys.forceFocus] = focusedView.forceFocus
188
192
  }
189
193
  return retVal.keys.count == 0 ? nil : retVal
190
194
  }
@@ -35,4 +35,8 @@ public enum FocusItemDataKeys {
35
35
  static let describingView = "describingView"
36
36
  static let reactTag = "reactTag"
37
37
  static let isDescendant = "isDescendant"
38
+ static let groupId = "groupId"
39
+ static let itemId = "itemId"
40
+ static let preferredFocus = "preferredFocus"
41
+ static let forceFocus = "forceFocus"
38
42
  }
@@ -40,6 +40,8 @@ extension FocusableView: ParallaxViewDelegate {
40
40
  var retVal: [String: Any] = [:]
41
41
  retVal["tag"] = reactTag
42
42
  retVal["itemID"] = itemId
43
+ retVal["groupId"] = groupId
44
+ retVal["preferred"] = preferredFocus
43
45
  return retVal
44
46
  }
45
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/quick-brick-native-apple",
3
- "version": "6.14.0",
3
+ "version": "6.14.2",
4
4
  "description": "iOS and tvOS native code for QuickBrick applications. This package is used to provide native logic for QuickBrick",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"