react-native-firework-sdk 2.5.2 → 2.5.3

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.
@@ -1095,49 +1095,49 @@
1095
1095
  {
1096
1096
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1097
1097
  "kind": "IntegerLiteral",
1098
- "offset": 226,
1098
+ "offset": 223,
1099
1099
  "length": 3,
1100
1100
  "value": "1"
1101
1101
  },
1102
1102
  {
1103
1103
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1104
1104
  "kind": "IntegerLiteral",
1105
- "offset": 231,
1105
+ "offset": 228,
1106
1106
  "length": 11,
1107
1107
  "value": "2"
1108
1108
  },
1109
1109
  {
1110
1110
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1111
1111
  "kind": "IntegerLiteral",
1112
- "offset": 226,
1112
+ "offset": 223,
1113
1113
  "length": 3,
1114
1114
  "value": "1"
1115
1115
  },
1116
1116
  {
1117
1117
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1118
1118
  "kind": "IntegerLiteral",
1119
- "offset": 231,
1119
+ "offset": 228,
1120
1120
  "length": 11,
1121
1121
  "value": "2"
1122
1122
  },
1123
1123
  {
1124
1124
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1125
1125
  "kind": "IntegerLiteral",
1126
- "offset": 226,
1126
+ "offset": 223,
1127
1127
  "length": 3,
1128
1128
  "value": "1"
1129
1129
  },
1130
1130
  {
1131
1131
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1132
1132
  "kind": "IntegerLiteral",
1133
- "offset": 231,
1133
+ "offset": 228,
1134
1134
  "length": 11,
1135
1135
  "value": "2"
1136
1136
  },
1137
1137
  {
1138
1138
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1139
1139
  "kind": "StringLiteral",
1140
- "offset": 502,
1140
+ "offset": 499,
1141
1141
  "length": 47,
1142
1142
  "value": "\"firework.notification.name.appLanguageChanged\""
1143
1143
  },
@@ -1095,49 +1095,49 @@
1095
1095
  {
1096
1096
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1097
1097
  "kind": "IntegerLiteral",
1098
- "offset": 226,
1098
+ "offset": 223,
1099
1099
  "length": 3,
1100
1100
  "value": "1"
1101
1101
  },
1102
1102
  {
1103
1103
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1104
1104
  "kind": "IntegerLiteral",
1105
- "offset": 231,
1105
+ "offset": 228,
1106
1106
  "length": 11,
1107
1107
  "value": "2"
1108
1108
  },
1109
1109
  {
1110
1110
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1111
1111
  "kind": "IntegerLiteral",
1112
- "offset": 226,
1112
+ "offset": 223,
1113
1113
  "length": 3,
1114
1114
  "value": "1"
1115
1115
  },
1116
1116
  {
1117
1117
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1118
1118
  "kind": "IntegerLiteral",
1119
- "offset": 231,
1119
+ "offset": 228,
1120
1120
  "length": 11,
1121
1121
  "value": "2"
1122
1122
  },
1123
1123
  {
1124
1124
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1125
1125
  "kind": "IntegerLiteral",
1126
- "offset": 226,
1126
+ "offset": 223,
1127
1127
  "length": 3,
1128
1128
  "value": "1"
1129
1129
  },
1130
1130
  {
1131
1131
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1132
1132
  "kind": "IntegerLiteral",
1133
- "offset": 231,
1133
+ "offset": 228,
1134
1134
  "length": 11,
1135
1135
  "value": "2"
1136
1136
  },
1137
1137
  {
1138
1138
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1139
1139
  "kind": "StringLiteral",
1140
- "offset": 502,
1140
+ "offset": 499,
1141
1141
  "length": 47,
1142
1142
  "value": "\"firework.notification.name.appLanguageChanged\""
1143
1143
  },
@@ -1095,49 +1095,49 @@
1095
1095
  {
1096
1096
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1097
1097
  "kind": "IntegerLiteral",
1098
- "offset": 226,
1098
+ "offset": 223,
1099
1099
  "length": 3,
1100
1100
  "value": "1"
1101
1101
  },
1102
1102
  {
1103
1103
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1104
1104
  "kind": "IntegerLiteral",
1105
- "offset": 231,
1105
+ "offset": 228,
1106
1106
  "length": 11,
1107
1107
  "value": "2"
1108
1108
  },
1109
1109
  {
1110
1110
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1111
1111
  "kind": "IntegerLiteral",
1112
- "offset": 226,
1112
+ "offset": 223,
1113
1113
  "length": 3,
1114
1114
  "value": "1"
1115
1115
  },
1116
1116
  {
1117
1117
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1118
1118
  "kind": "IntegerLiteral",
1119
- "offset": 231,
1119
+ "offset": 228,
1120
1120
  "length": 11,
1121
1121
  "value": "2"
1122
1122
  },
1123
1123
  {
1124
1124
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1125
1125
  "kind": "IntegerLiteral",
1126
- "offset": 226,
1126
+ "offset": 223,
1127
1127
  "length": 3,
1128
1128
  "value": "1"
1129
1129
  },
1130
1130
  {
1131
1131
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1132
1132
  "kind": "IntegerLiteral",
1133
- "offset": 231,
1133
+ "offset": 228,
1134
1134
  "length": 11,
1135
1135
  "value": "2"
1136
1136
  },
1137
1137
  {
1138
1138
  "filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/AppLanguageManager.swift",
1139
1139
  "kind": "StringLiteral",
1140
- "offset": 502,
1140
+ "offset": 499,
1141
1141
  "length": 47,
1142
1142
  "value": "\"firework.notification.name.appLanguageChanged\""
1143
1143
  },
@@ -14,11 +14,11 @@
14
14
  </data>
15
15
  <key>Info.plist</key>
16
16
  <data>
17
- UU+onRShcQMw1uXCaopuTpxkDbM=
17
+ m85VoHlIV8I+sJSOuNZyZSM9IBY=
18
18
  </data>
19
19
  <key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
20
20
  <data>
21
- roVrA+zBhViTn1+musiH9YtZN4g=
21
+ JD+JGaE1pyP/erK3A8uz3Z7svAw=
22
22
  </data>
23
23
  <key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
24
24
  <data>
@@ -34,11 +34,11 @@
34
34
  </data>
35
35
  <key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
36
36
  <data>
37
- 8nUapBbTxrEctwHv8MiF5EjVMBM=
37
+ F2Umii8apCaLMJVyMWQgIUzpn1E=
38
38
  </data>
39
39
  <key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
40
40
  <data>
41
- roVrA+zBhViTn1+musiH9YtZN4g=
41
+ JD+JGaE1pyP/erK3A8uz3Z7svAw=
42
42
  </data>
43
43
  <key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
44
44
  <data>
@@ -54,7 +54,7 @@
54
54
  </data>
55
55
  <key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
56
56
  <data>
57
- lAZN1MHaVzad24oIUuAL665Ve/c=
57
+ sx659FYeam5PK2jbM7Y1WGtkf6o=
58
58
  </data>
59
59
  <key>Modules/module.modulemap</key>
60
60
  <data>
@@ -81,7 +81,7 @@
81
81
  <dict>
82
82
  <key>hash2</key>
83
83
  <data>
84
- zLmAM9IPyMwInxOl0os0ke7UNYdLFUljxP3ZpE5nvv0=
84
+ oCsc58odDNLMVdMzw7mJXy5H9hjzH0Q+nIMvCe+bXmo=
85
85
  </data>
86
86
  </dict>
87
87
  <key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
@@ -109,14 +109,14 @@
109
109
  <dict>
110
110
  <key>hash2</key>
111
111
  <data>
112
- HpN79cN877uO6s4DyXGEgNjLGLruwBVaXP2k3kk7b6E=
112
+ Vu9VotUZ3qa07wHJJHfcF7zHGfazMs4gqsPKw71trU8=
113
113
  </data>
114
114
  </dict>
115
115
  <key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
116
116
  <dict>
117
117
  <key>hash2</key>
118
118
  <data>
119
- zLmAM9IPyMwInxOl0os0ke7UNYdLFUljxP3ZpE5nvv0=
119
+ oCsc58odDNLMVdMzw7mJXy5H9hjzH0Q+nIMvCe+bXmo=
120
120
  </data>
121
121
  </dict>
122
122
  <key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
@@ -144,7 +144,7 @@
144
144
  <dict>
145
145
  <key>hash2</key>
146
146
  <data>
147
- mDMN+Ylv+JqpZt1BRxltE+4ueOU3vJBg+X3hZ3UxVFo=
147
+ PLzWyLq9D4PE/sfLnT90BiC90QSacxTwX6PxCpMT0Tg=
148
148
  </data>
149
149
  </dict>
150
150
  <key>Modules/module.modulemap</key>
@@ -8,7 +8,7 @@ import UIKit
8
8
 
9
9
  private let appLanguageStorageKey = "firework_sdk_app_language_storage_key"
10
10
 
11
- enum AppLanguageLayoutDirection: Int {
11
+ enum LanguageLayoutDirection: Int {
12
12
  case ltr, rtl, unsupported
13
13
  }
14
14
 
@@ -55,7 +55,7 @@ public class AppLanguageManager {
55
55
  return LanguageUtil.getLanguageCode(language)
56
56
  }
57
57
 
58
- var appLanguageLayoutDirection: AppLanguageLayoutDirection? {
58
+ var appLanguageLayoutDirection: LanguageLayoutDirection? {
59
59
  guard let languageCode = appLanguageCode else {
60
60
  return nil
61
61
  }
@@ -69,24 +69,30 @@ public class AppLanguageManager {
69
69
  return .unsupported
70
70
  }
71
71
  }
72
-
73
- var shouldHorizontalFlip: Bool {
74
- guard let appLanguageCode = appLanguageCode else {
75
- return false
72
+
73
+ var systemLanguageLayoutDirection: LanguageLayoutDirection? {
74
+ guard let languageCode = systemLanguageCode else {
75
+ return nil
76
76
  }
77
-
78
- guard let systemLanguageCode = systemLanguageCode else {
79
- return false
77
+ let direction = Locale.characterDirection(forLanguage: languageCode)
78
+ switch direction {
79
+ case .leftToRight:
80
+ return .ltr
81
+ case .rightToLeft:
82
+ return .rtl
83
+ default:
84
+ return .unsupported
80
85
  }
86
+ }
81
87
 
82
- let appLanguageDirection = Locale.characterDirection(forLanguage: appLanguageCode)
83
- let systemLanguageDirection = Locale.characterDirection(forLanguage: systemLanguageCode)
84
-
85
- if appLanguageDirection == .leftToRight, systemLanguageDirection == .rightToLeft {
88
+ var shouldHorizontalFlip: Bool {
89
+ if appLanguageLayoutDirection == .rtl,
90
+ systemLanguageLayoutDirection == .ltr {
86
91
  return true
87
92
  }
88
-
89
- if appLanguageDirection == .rightToLeft, systemLanguageDirection == .leftToRight {
93
+
94
+ if appLanguageLayoutDirection == .ltr,
95
+ systemLanguageLayoutDirection == .rtl {
90
96
  return true
91
97
  }
92
98
 
@@ -41,7 +41,15 @@ extension UIView {
41
41
 
42
42
  @objc func fw_semanticContentAttribute() -> UISemanticContentAttribute {
43
43
  if self.isIOSSDKView, AppLanguageManager.shared.shouldHorizontalFlip {
44
- return .forceLeftToRight
44
+ let systemLanguageLayoutDirection = AppLanguageManager.shared.systemLanguageLayoutDirection ?? .unsupported
45
+ switch systemLanguageLayoutDirection {
46
+ case .ltr:
47
+ return .forceLeftToRight
48
+ case .rtl:
49
+ return .forceRightToLeft
50
+ case .unsupported:
51
+ return fw_semanticContentAttribute()
52
+ }
45
53
  }
46
54
 
47
55
  return fw_semanticContentAttribute()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-firework-sdk",
3
- "version": "2.5.2",
3
+ "version": "2.5.3",
4
4
  "description": "Firework React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",