@ionic/portals-react-native 0.0.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/LICENSE.md +67 -0
- package/README.md +192 -0
- package/ReactNativePortals.podspec +20 -0
- package/android/build.gradle +122 -0
- package/android/gradle.properties +4 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/io/ionic/portals/reactnative/ReactNativePortalsModule.kt +203 -0
- package/android/src/main/java/io/ionic/portals/reactnative/ReactNativePortalsPackage.kt +20 -0
- package/ios/Podfile +14 -0
- package/ios/Podfile.lock +389 -0
- package/ios/PortalManager.m +14 -0
- package/ios/PortalView.m +14 -0
- package/ios/PortalsPubSub.m +16 -0
- package/ios/ReactNativePortals-Bridging-Header.h +3 -0
- package/ios/ReactNativePortals.swift +113 -0
- package/ios/ReactNativePortals.xcodeproj/project.pbxproj +417 -0
- package/ios/ReactNativePortals.xcodeproj/xcshareddata/xcschemes/ReactNativePortals.xcscheme +67 -0
- package/ios/ReactNativePortals.xcworkspace/contents.xcworkspacedata +10 -0
- package/ios/ReactNativePortals.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/lib/commonjs/PortalView.android.js +37 -0
- package/lib/commonjs/PortalView.android.js.map +1 -0
- package/lib/commonjs/PortalView.js +22 -0
- package/lib/commonjs/PortalView.js.map +1 -0
- package/lib/commonjs/index.js +62 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/module/PortalView.android.js +23 -0
- package/lib/module/PortalView.android.js.map +1 -0
- package/lib/module/PortalView.js +10 -0
- package/lib/module/PortalView.js.map +1 -0
- package/lib/module/index.js +30 -0
- package/lib/module/index.js.map +1 -0
- package/lib/typescript/PortalView.android.d.ts +4 -0
- package/lib/typescript/PortalView.d.ts +4 -0
- package/lib/typescript/index.d.ts +18 -0
- package/package.json +133 -0
- package/src/PortalView.android.tsx +31 -0
- package/src/PortalView.tsx +11 -0
- package/src/index.ts +53 -0
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
// !$*UTF8*$!
|
|
2
|
+
{
|
|
3
|
+
archiveVersion = 1;
|
|
4
|
+
classes = {
|
|
5
|
+
};
|
|
6
|
+
objectVersion = 55;
|
|
7
|
+
objects = {
|
|
8
|
+
|
|
9
|
+
/* Begin PBXBuildFile section */
|
|
10
|
+
24F0245B69703967E2679F6A /* Pods_ReactNativePortals.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0529BADF230AAE24E9A25425 /* Pods_ReactNativePortals.framework */; };
|
|
11
|
+
A7128A0627F7A16200DADDF3 /* ReactNativePortals.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4FF95D6245B92E800C19C63 /* ReactNativePortals.swift */; };
|
|
12
|
+
A7128A0727F7A16200DADDF3 /* PortalManager.m in Sources */ = {isa = PBXBuildFile; fileRef = A71289F927F79EB200DADDF3 /* PortalManager.m */; };
|
|
13
|
+
A7128A0827F7A16200DADDF3 /* ReactNativePortals-Bridging-Header.h in Headers */ = {isa = PBXBuildFile; fileRef = F4FF95D5245B92E700C19C63 /* ReactNativePortals-Bridging-Header.h */; };
|
|
14
|
+
A7128A0927F7A16200DADDF3 /* PortalsPubSub.m in Sources */ = {isa = PBXBuildFile; fileRef = A71289F827F79D4000DADDF3 /* PortalsPubSub.m */; };
|
|
15
|
+
A7128A0A27F7A16200DADDF3 /* PortalView.m in Sources */ = {isa = PBXBuildFile; fileRef = A71289F727F79CDC00DADDF3 /* PortalView.m */; };
|
|
16
|
+
/* End PBXBuildFile section */
|
|
17
|
+
|
|
18
|
+
/* Begin PBXFileReference section */
|
|
19
|
+
0529BADF230AAE24E9A25425 /* Pods_ReactNativePortals.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ReactNativePortals.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
20
|
+
A71289F727F79CDC00DADDF3 /* PortalView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PortalView.m; sourceTree = "<group>"; };
|
|
21
|
+
A71289F827F79D4000DADDF3 /* PortalsPubSub.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PortalsPubSub.m; sourceTree = "<group>"; };
|
|
22
|
+
A71289F927F79EB200DADDF3 /* PortalManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PortalManager.m; sourceTree = "<group>"; };
|
|
23
|
+
A71289FF27F7A14900DADDF3 /* ReactNativePortals.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReactNativePortals.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
24
|
+
CB9439A9444D2E97DA3B8149 /* Pods-ReactNativePortals.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativePortals.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativePortals/Pods-ReactNativePortals.debug.xcconfig"; sourceTree = "<group>"; };
|
|
25
|
+
F4FF95D5245B92E700C19C63 /* ReactNativePortals-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ReactNativePortals-Bridging-Header.h"; sourceTree = "<group>"; };
|
|
26
|
+
F4FF95D6245B92E800C19C63 /* ReactNativePortals.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReactNativePortals.swift; sourceTree = "<group>"; };
|
|
27
|
+
F8836E0DEEAAB66F82FCC5C9 /* Pods-ReactNativePortals.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativePortals.release.xcconfig"; path = "Target Support Files/Pods-ReactNativePortals/Pods-ReactNativePortals.release.xcconfig"; sourceTree = "<group>"; };
|
|
28
|
+
/* End PBXFileReference section */
|
|
29
|
+
|
|
30
|
+
/* Begin PBXFrameworksBuildPhase section */
|
|
31
|
+
A71289FC27F7A14900DADDF3 /* Frameworks */ = {
|
|
32
|
+
isa = PBXFrameworksBuildPhase;
|
|
33
|
+
buildActionMask = 2147483647;
|
|
34
|
+
files = (
|
|
35
|
+
24F0245B69703967E2679F6A /* Pods_ReactNativePortals.framework in Frameworks */,
|
|
36
|
+
);
|
|
37
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
38
|
+
};
|
|
39
|
+
/* End PBXFrameworksBuildPhase section */
|
|
40
|
+
|
|
41
|
+
/* Begin PBXGroup section */
|
|
42
|
+
134814211AA4EA7D00B7C361 /* Products */ = {
|
|
43
|
+
isa = PBXGroup;
|
|
44
|
+
children = (
|
|
45
|
+
);
|
|
46
|
+
name = Products;
|
|
47
|
+
sourceTree = "<group>";
|
|
48
|
+
};
|
|
49
|
+
3A94B40EE7C428D3005BB0ED /* Frameworks */ = {
|
|
50
|
+
isa = PBXGroup;
|
|
51
|
+
children = (
|
|
52
|
+
0529BADF230AAE24E9A25425 /* Pods_ReactNativePortals.framework */,
|
|
53
|
+
);
|
|
54
|
+
name = Frameworks;
|
|
55
|
+
sourceTree = "<group>";
|
|
56
|
+
};
|
|
57
|
+
58B511D21A9E6C8500147676 = {
|
|
58
|
+
isa = PBXGroup;
|
|
59
|
+
children = (
|
|
60
|
+
F4FF95D6245B92E800C19C63 /* ReactNativePortals.swift */,
|
|
61
|
+
A71289F727F79CDC00DADDF3 /* PortalView.m */,
|
|
62
|
+
A71289F927F79EB200DADDF3 /* PortalManager.m */,
|
|
63
|
+
A71289F827F79D4000DADDF3 /* PortalsPubSub.m */,
|
|
64
|
+
F4FF95D5245B92E700C19C63 /* ReactNativePortals-Bridging-Header.h */,
|
|
65
|
+
134814211AA4EA7D00B7C361 /* Products */,
|
|
66
|
+
6D8E164A6A9206E2166C7202 /* Pods */,
|
|
67
|
+
A71289FF27F7A14900DADDF3 /* ReactNativePortals.framework */,
|
|
68
|
+
3A94B40EE7C428D3005BB0ED /* Frameworks */,
|
|
69
|
+
);
|
|
70
|
+
sourceTree = "<group>";
|
|
71
|
+
};
|
|
72
|
+
6D8E164A6A9206E2166C7202 /* Pods */ = {
|
|
73
|
+
isa = PBXGroup;
|
|
74
|
+
children = (
|
|
75
|
+
CB9439A9444D2E97DA3B8149 /* Pods-ReactNativePortals.debug.xcconfig */,
|
|
76
|
+
F8836E0DEEAAB66F82FCC5C9 /* Pods-ReactNativePortals.release.xcconfig */,
|
|
77
|
+
);
|
|
78
|
+
path = Pods;
|
|
79
|
+
sourceTree = "<group>";
|
|
80
|
+
};
|
|
81
|
+
/* End PBXGroup section */
|
|
82
|
+
|
|
83
|
+
/* Begin PBXHeadersBuildPhase section */
|
|
84
|
+
A71289FA27F7A14900DADDF3 /* Headers */ = {
|
|
85
|
+
isa = PBXHeadersBuildPhase;
|
|
86
|
+
buildActionMask = 2147483647;
|
|
87
|
+
files = (
|
|
88
|
+
A7128A0827F7A16200DADDF3 /* ReactNativePortals-Bridging-Header.h in Headers */,
|
|
89
|
+
);
|
|
90
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
91
|
+
};
|
|
92
|
+
/* End PBXHeadersBuildPhase section */
|
|
93
|
+
|
|
94
|
+
/* Begin PBXNativeTarget section */
|
|
95
|
+
A71289FE27F7A14900DADDF3 /* ReactNativePortals */ = {
|
|
96
|
+
isa = PBXNativeTarget;
|
|
97
|
+
buildConfigurationList = A7128A0327F7A14900DADDF3 /* Build configuration list for PBXNativeTarget "ReactNativePortals" */;
|
|
98
|
+
buildPhases = (
|
|
99
|
+
9634552A23ED22B440934CBE /* [CP] Check Pods Manifest.lock */,
|
|
100
|
+
A71289FA27F7A14900DADDF3 /* Headers */,
|
|
101
|
+
A71289FB27F7A14900DADDF3 /* Sources */,
|
|
102
|
+
A71289FC27F7A14900DADDF3 /* Frameworks */,
|
|
103
|
+
A71289FD27F7A14900DADDF3 /* Resources */,
|
|
104
|
+
);
|
|
105
|
+
buildRules = (
|
|
106
|
+
);
|
|
107
|
+
dependencies = (
|
|
108
|
+
);
|
|
109
|
+
name = ReactNativePortals;
|
|
110
|
+
productName = ReactNativePortals;
|
|
111
|
+
productReference = A71289FF27F7A14900DADDF3 /* ReactNativePortals.framework */;
|
|
112
|
+
productType = "com.apple.product-type.framework";
|
|
113
|
+
};
|
|
114
|
+
/* End PBXNativeTarget section */
|
|
115
|
+
|
|
116
|
+
/* Begin PBXProject section */
|
|
117
|
+
58B511D31A9E6C8500147676 /* Project object */ = {
|
|
118
|
+
isa = PBXProject;
|
|
119
|
+
attributes = {
|
|
120
|
+
LastUpgradeCheck = 1330;
|
|
121
|
+
ORGANIZATIONNAME = Facebook;
|
|
122
|
+
TargetAttributes = {
|
|
123
|
+
A71289FE27F7A14900DADDF3 = {
|
|
124
|
+
CreatedOnToolsVersion = 13.3;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "ReactNativePortals" */;
|
|
129
|
+
compatibilityVersion = "Xcode 13.0";
|
|
130
|
+
developmentRegion = English;
|
|
131
|
+
hasScannedForEncodings = 0;
|
|
132
|
+
knownRegions = (
|
|
133
|
+
English,
|
|
134
|
+
en,
|
|
135
|
+
);
|
|
136
|
+
mainGroup = 58B511D21A9E6C8500147676;
|
|
137
|
+
productRefGroup = 58B511D21A9E6C8500147676;
|
|
138
|
+
projectDirPath = "";
|
|
139
|
+
projectRoot = "";
|
|
140
|
+
targets = (
|
|
141
|
+
A71289FE27F7A14900DADDF3 /* ReactNativePortals */,
|
|
142
|
+
);
|
|
143
|
+
};
|
|
144
|
+
/* End PBXProject section */
|
|
145
|
+
|
|
146
|
+
/* Begin PBXResourcesBuildPhase section */
|
|
147
|
+
A71289FD27F7A14900DADDF3 /* Resources */ = {
|
|
148
|
+
isa = PBXResourcesBuildPhase;
|
|
149
|
+
buildActionMask = 2147483647;
|
|
150
|
+
files = (
|
|
151
|
+
);
|
|
152
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
153
|
+
};
|
|
154
|
+
/* End PBXResourcesBuildPhase section */
|
|
155
|
+
|
|
156
|
+
/* Begin PBXShellScriptBuildPhase section */
|
|
157
|
+
9634552A23ED22B440934CBE /* [CP] Check Pods Manifest.lock */ = {
|
|
158
|
+
isa = PBXShellScriptBuildPhase;
|
|
159
|
+
buildActionMask = 2147483647;
|
|
160
|
+
files = (
|
|
161
|
+
);
|
|
162
|
+
inputFileListPaths = (
|
|
163
|
+
);
|
|
164
|
+
inputPaths = (
|
|
165
|
+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
|
166
|
+
"${PODS_ROOT}/Manifest.lock",
|
|
167
|
+
);
|
|
168
|
+
name = "[CP] Check Pods Manifest.lock";
|
|
169
|
+
outputFileListPaths = (
|
|
170
|
+
);
|
|
171
|
+
outputPaths = (
|
|
172
|
+
"$(DERIVED_FILE_DIR)/Pods-ReactNativePortals-checkManifestLockResult.txt",
|
|
173
|
+
);
|
|
174
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
175
|
+
shellPath = /bin/sh;
|
|
176
|
+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
|
177
|
+
showEnvVarsInLog = 0;
|
|
178
|
+
};
|
|
179
|
+
/* End PBXShellScriptBuildPhase section */
|
|
180
|
+
|
|
181
|
+
/* Begin PBXSourcesBuildPhase section */
|
|
182
|
+
A71289FB27F7A14900DADDF3 /* Sources */ = {
|
|
183
|
+
isa = PBXSourcesBuildPhase;
|
|
184
|
+
buildActionMask = 2147483647;
|
|
185
|
+
files = (
|
|
186
|
+
A7128A0A27F7A16200DADDF3 /* PortalView.m in Sources */,
|
|
187
|
+
A7128A0927F7A16200DADDF3 /* PortalsPubSub.m in Sources */,
|
|
188
|
+
A7128A0627F7A16200DADDF3 /* ReactNativePortals.swift in Sources */,
|
|
189
|
+
A7128A0727F7A16200DADDF3 /* PortalManager.m in Sources */,
|
|
190
|
+
);
|
|
191
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
192
|
+
};
|
|
193
|
+
/* End PBXSourcesBuildPhase section */
|
|
194
|
+
|
|
195
|
+
/* Begin XCBuildConfiguration section */
|
|
196
|
+
58B511ED1A9E6C8500147676 /* Debug */ = {
|
|
197
|
+
isa = XCBuildConfiguration;
|
|
198
|
+
buildSettings = {
|
|
199
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
200
|
+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
|
201
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
202
|
+
CLANG_CXX_LIBRARY = "libc++";
|
|
203
|
+
CLANG_ENABLE_MODULES = YES;
|
|
204
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
|
205
|
+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
206
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
207
|
+
CLANG_WARN_COMMA = YES;
|
|
208
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
209
|
+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
210
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
211
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
|
212
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
213
|
+
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
214
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
|
215
|
+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
216
|
+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
217
|
+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
218
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
219
|
+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
|
220
|
+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
221
|
+
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
222
|
+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
223
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
224
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
225
|
+
COPY_PHASE_STRIP = NO;
|
|
226
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
227
|
+
ENABLE_TESTABILITY = YES;
|
|
228
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
229
|
+
GCC_DYNAMIC_NO_PIC = NO;
|
|
230
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
|
231
|
+
GCC_OPTIMIZATION_LEVEL = 0;
|
|
232
|
+
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
233
|
+
"DEBUG=1",
|
|
234
|
+
"$(inherited)",
|
|
235
|
+
);
|
|
236
|
+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
|
237
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
238
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
239
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
240
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
241
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
242
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
243
|
+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
|
244
|
+
MTL_ENABLE_DEBUG_INFO = YES;
|
|
245
|
+
ONLY_ACTIVE_ARCH = YES;
|
|
246
|
+
SDKROOT = iphoneos;
|
|
247
|
+
};
|
|
248
|
+
name = Debug;
|
|
249
|
+
};
|
|
250
|
+
58B511EE1A9E6C8500147676 /* Release */ = {
|
|
251
|
+
isa = XCBuildConfiguration;
|
|
252
|
+
buildSettings = {
|
|
253
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
254
|
+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
|
255
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
256
|
+
CLANG_CXX_LIBRARY = "libc++";
|
|
257
|
+
CLANG_ENABLE_MODULES = YES;
|
|
258
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
|
259
|
+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
260
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
261
|
+
CLANG_WARN_COMMA = YES;
|
|
262
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
263
|
+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
264
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
265
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
|
266
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
267
|
+
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
268
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
|
269
|
+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
270
|
+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
271
|
+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
272
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
273
|
+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
|
274
|
+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
275
|
+
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
276
|
+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
277
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
278
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
279
|
+
COPY_PHASE_STRIP = YES;
|
|
280
|
+
ENABLE_NS_ASSERTIONS = NO;
|
|
281
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
282
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
283
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
|
284
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
285
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
286
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
287
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
288
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
289
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
290
|
+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
|
291
|
+
MTL_ENABLE_DEBUG_INFO = NO;
|
|
292
|
+
SDKROOT = iphoneos;
|
|
293
|
+
VALIDATE_PRODUCT = YES;
|
|
294
|
+
};
|
|
295
|
+
name = Release;
|
|
296
|
+
};
|
|
297
|
+
A7128A0427F7A14900DADDF3 /* Debug */ = {
|
|
298
|
+
isa = XCBuildConfiguration;
|
|
299
|
+
baseConfigurationReference = CB9439A9444D2E97DA3B8149 /* Pods-ReactNativePortals.debug.xcconfig */;
|
|
300
|
+
buildSettings = {
|
|
301
|
+
CLANG_ANALYZER_NONNULL = YES;
|
|
302
|
+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
|
303
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
|
|
304
|
+
CLANG_ENABLE_OBJC_WEAK = YES;
|
|
305
|
+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
306
|
+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
|
307
|
+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
308
|
+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
|
309
|
+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
|
310
|
+
CODE_SIGN_STYLE = Automatic;
|
|
311
|
+
CURRENT_PROJECT_VERSION = 1;
|
|
312
|
+
DEBUG_INFORMATION_FORMAT = dwarf;
|
|
313
|
+
DEFINES_MODULE = YES;
|
|
314
|
+
DEVELOPMENT_TEAM = 9YN2HU59K8;
|
|
315
|
+
DYLIB_COMPATIBILITY_VERSION = 1;
|
|
316
|
+
DYLIB_CURRENT_VERSION = 1;
|
|
317
|
+
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
|
318
|
+
GCC_C_LANGUAGE_STANDARD = gnu11;
|
|
319
|
+
GENERATE_INFOPLIST_FILE = YES;
|
|
320
|
+
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Facebook. All rights reserved.";
|
|
321
|
+
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
|
322
|
+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
|
323
|
+
LD_RUNPATH_SEARCH_PATHS = (
|
|
324
|
+
"$(inherited)",
|
|
325
|
+
"@executable_path/Frameworks",
|
|
326
|
+
"@loader_path/Frameworks",
|
|
327
|
+
);
|
|
328
|
+
MARKETING_VERSION = 1.0;
|
|
329
|
+
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
|
330
|
+
MTL_FAST_MATH = YES;
|
|
331
|
+
PRODUCT_BUNDLE_IDENTIFIER = io.ionic.react.portals.ReactNativePortals;
|
|
332
|
+
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
|
333
|
+
SKIP_INSTALL = YES;
|
|
334
|
+
SUPPORTS_MACCATALYST = NO;
|
|
335
|
+
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
|
336
|
+
SWIFT_EMIT_LOC_STRINGS = YES;
|
|
337
|
+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
|
338
|
+
SWIFT_VERSION = 5.0;
|
|
339
|
+
TARGETED_DEVICE_FAMILY = "1,2";
|
|
340
|
+
VERSIONING_SYSTEM = "apple-generic";
|
|
341
|
+
VERSION_INFO_PREFIX = "";
|
|
342
|
+
};
|
|
343
|
+
name = Debug;
|
|
344
|
+
};
|
|
345
|
+
A7128A0527F7A14900DADDF3 /* Release */ = {
|
|
346
|
+
isa = XCBuildConfiguration;
|
|
347
|
+
baseConfigurationReference = F8836E0DEEAAB66F82FCC5C9 /* Pods-ReactNativePortals.release.xcconfig */;
|
|
348
|
+
buildSettings = {
|
|
349
|
+
CLANG_ANALYZER_NONNULL = YES;
|
|
350
|
+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
|
351
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
|
|
352
|
+
CLANG_ENABLE_OBJC_WEAK = YES;
|
|
353
|
+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
354
|
+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
|
355
|
+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
356
|
+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
|
357
|
+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
|
358
|
+
CODE_SIGN_STYLE = Automatic;
|
|
359
|
+
COPY_PHASE_STRIP = NO;
|
|
360
|
+
CURRENT_PROJECT_VERSION = 1;
|
|
361
|
+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
|
362
|
+
DEFINES_MODULE = YES;
|
|
363
|
+
DEVELOPMENT_TEAM = 9YN2HU59K8;
|
|
364
|
+
DYLIB_COMPATIBILITY_VERSION = 1;
|
|
365
|
+
DYLIB_CURRENT_VERSION = 1;
|
|
366
|
+
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
|
367
|
+
GCC_C_LANGUAGE_STANDARD = gnu11;
|
|
368
|
+
GENERATE_INFOPLIST_FILE = YES;
|
|
369
|
+
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Facebook. All rights reserved.";
|
|
370
|
+
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
|
371
|
+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
|
372
|
+
LD_RUNPATH_SEARCH_PATHS = (
|
|
373
|
+
"$(inherited)",
|
|
374
|
+
"@executable_path/Frameworks",
|
|
375
|
+
"@loader_path/Frameworks",
|
|
376
|
+
);
|
|
377
|
+
MARKETING_VERSION = 1.0;
|
|
378
|
+
MTL_FAST_MATH = YES;
|
|
379
|
+
PRODUCT_BUNDLE_IDENTIFIER = io.ionic.react.portals.ReactNativePortals;
|
|
380
|
+
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
|
381
|
+
SKIP_INSTALL = YES;
|
|
382
|
+
SUPPORTS_MACCATALYST = NO;
|
|
383
|
+
SWIFT_COMPILATION_MODE = wholemodule;
|
|
384
|
+
SWIFT_EMIT_LOC_STRINGS = YES;
|
|
385
|
+
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
|
386
|
+
SWIFT_VERSION = 5.0;
|
|
387
|
+
TARGETED_DEVICE_FAMILY = "1,2";
|
|
388
|
+
VERSIONING_SYSTEM = "apple-generic";
|
|
389
|
+
VERSION_INFO_PREFIX = "";
|
|
390
|
+
};
|
|
391
|
+
name = Release;
|
|
392
|
+
};
|
|
393
|
+
/* End XCBuildConfiguration section */
|
|
394
|
+
|
|
395
|
+
/* Begin XCConfigurationList section */
|
|
396
|
+
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "ReactNativePortals" */ = {
|
|
397
|
+
isa = XCConfigurationList;
|
|
398
|
+
buildConfigurations = (
|
|
399
|
+
58B511ED1A9E6C8500147676 /* Debug */,
|
|
400
|
+
58B511EE1A9E6C8500147676 /* Release */,
|
|
401
|
+
);
|
|
402
|
+
defaultConfigurationIsVisible = 0;
|
|
403
|
+
defaultConfigurationName = Release;
|
|
404
|
+
};
|
|
405
|
+
A7128A0327F7A14900DADDF3 /* Build configuration list for PBXNativeTarget "ReactNativePortals" */ = {
|
|
406
|
+
isa = XCConfigurationList;
|
|
407
|
+
buildConfigurations = (
|
|
408
|
+
A7128A0427F7A14900DADDF3 /* Debug */,
|
|
409
|
+
A7128A0527F7A14900DADDF3 /* Release */,
|
|
410
|
+
);
|
|
411
|
+
defaultConfigurationIsVisible = 0;
|
|
412
|
+
defaultConfigurationName = Release;
|
|
413
|
+
};
|
|
414
|
+
/* End XCConfigurationList section */
|
|
415
|
+
};
|
|
416
|
+
rootObject = 58B511D31A9E6C8500147676 /* Project object */;
|
|
417
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Scheme
|
|
3
|
+
LastUpgradeVersion = "1330"
|
|
4
|
+
version = "1.3">
|
|
5
|
+
<BuildAction
|
|
6
|
+
parallelizeBuildables = "YES"
|
|
7
|
+
buildImplicitDependencies = "YES">
|
|
8
|
+
<BuildActionEntries>
|
|
9
|
+
<BuildActionEntry
|
|
10
|
+
buildForTesting = "YES"
|
|
11
|
+
buildForRunning = "YES"
|
|
12
|
+
buildForProfiling = "YES"
|
|
13
|
+
buildForArchiving = "YES"
|
|
14
|
+
buildForAnalyzing = "YES">
|
|
15
|
+
<BuildableReference
|
|
16
|
+
BuildableIdentifier = "primary"
|
|
17
|
+
BlueprintIdentifier = "A71289FE27F7A14900DADDF3"
|
|
18
|
+
BuildableName = "ReactNativePortals.framework"
|
|
19
|
+
BlueprintName = "ReactNativePortals"
|
|
20
|
+
ReferencedContainer = "container:ReactNativePortals.xcodeproj">
|
|
21
|
+
</BuildableReference>
|
|
22
|
+
</BuildActionEntry>
|
|
23
|
+
</BuildActionEntries>
|
|
24
|
+
</BuildAction>
|
|
25
|
+
<TestAction
|
|
26
|
+
buildConfiguration = "Debug"
|
|
27
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
28
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
30
|
+
<Testables>
|
|
31
|
+
</Testables>
|
|
32
|
+
</TestAction>
|
|
33
|
+
<LaunchAction
|
|
34
|
+
buildConfiguration = "Debug"
|
|
35
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
36
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
37
|
+
launchStyle = "0"
|
|
38
|
+
useCustomWorkingDirectory = "NO"
|
|
39
|
+
ignoresPersistentStateOnLaunch = "NO"
|
|
40
|
+
debugDocumentVersioning = "YES"
|
|
41
|
+
debugServiceExtension = "internal"
|
|
42
|
+
allowLocationSimulation = "YES">
|
|
43
|
+
</LaunchAction>
|
|
44
|
+
<ProfileAction
|
|
45
|
+
buildConfiguration = "Release"
|
|
46
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
47
|
+
savedToolIdentifier = ""
|
|
48
|
+
useCustomWorkingDirectory = "NO"
|
|
49
|
+
debugDocumentVersioning = "YES">
|
|
50
|
+
<MacroExpansion>
|
|
51
|
+
<BuildableReference
|
|
52
|
+
BuildableIdentifier = "primary"
|
|
53
|
+
BlueprintIdentifier = "A71289FE27F7A14900DADDF3"
|
|
54
|
+
BuildableName = "ReactNativePortals.framework"
|
|
55
|
+
BlueprintName = "ReactNativePortals"
|
|
56
|
+
ReferencedContainer = "container:ReactNativePortals.xcodeproj">
|
|
57
|
+
</BuildableReference>
|
|
58
|
+
</MacroExpansion>
|
|
59
|
+
</ProfileAction>
|
|
60
|
+
<AnalyzeAction
|
|
61
|
+
buildConfiguration = "Debug">
|
|
62
|
+
</AnalyzeAction>
|
|
63
|
+
<ArchiveAction
|
|
64
|
+
buildConfiguration = "Release"
|
|
65
|
+
revealArchiveInOrganizer = "YES">
|
|
66
|
+
</ArchiveAction>
|
|
67
|
+
</Scheme>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
|
|
16
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
+
|
|
18
|
+
const PortalViewManager = (0, _reactNative.requireNativeComponent)('AndroidPortalView');
|
|
19
|
+
|
|
20
|
+
const createFragment = viewId => _reactNative.UIManager.dispatchViewManagerCommand(viewId, // we are calling the 'create' command
|
|
21
|
+
// @ts-expect-error
|
|
22
|
+
_reactNative.UIManager.AndroidPortalView.Commands.create.toString(), [viewId]);
|
|
23
|
+
|
|
24
|
+
const PortalView = props => {
|
|
25
|
+
const ref = (0, _react.useRef)(null);
|
|
26
|
+
(0, _react.useEffect)(() => {
|
|
27
|
+
const viewId = (0, _reactNative.findNodeHandle)(ref.current);
|
|
28
|
+
createFragment(viewId);
|
|
29
|
+
}, []);
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement(PortalViewManager, _extends({}, props, {
|
|
31
|
+
ref: ref
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var _default = PortalView;
|
|
36
|
+
exports.default = _default;
|
|
37
|
+
//# sourceMappingURL=PortalView.android.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PortalView.android.tsx"],"names":["PortalViewManager","createFragment","viewId","UIManager","dispatchViewManagerCommand","AndroidPortalView","Commands","create","toString","PortalView","props","ref","current"],"mappings":";;;;;;;AAAA;;AACA;;;;;;;;AAOA,MAAMA,iBAAiB,GAAG,yCAAuB,mBAAvB,CAA1B;;AAEA,MAAMC,cAAc,GAAIC,MAAD,IACrBC,uBAAUC,0BAAV,CACEF,MADF,EAEE;AACA;AACAC,uBAAUE,iBAAV,CAA4BC,QAA5B,CAAqCC,MAArC,CAA4CC,QAA5C,EAJF,EAKE,CAACN,MAAD,CALF,CADF;;AASA,MAAMO,UAAU,GAAIC,KAAD,IAAwB;AACzC,QAAMC,GAAG,GAAG,mBAAO,IAAP,CAAZ;AAEA,wBAAU,MAAM;AACd,UAAMT,MAAM,GAAG,iCAAeS,GAAG,CAACC,OAAnB,CAAf;AACAX,IAAAA,cAAc,CAACC,MAAD,CAAd;AACD,GAHD,EAGG,EAHH;AAKA,sBAAO,6BAAC,iBAAD,eAAuBQ,KAAvB;AAA8B,IAAA,GAAG,EAAEC;AAAnC,KAAP;AACD,CATD;;eAWeF,U","sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport {\n findNodeHandle,\n requireNativeComponent,\n UIManager,\n} from 'react-native';\nimport type { PortalProps } from '.';\n\nconst PortalViewManager = requireNativeComponent('AndroidPortalView');\n\nconst createFragment = (viewId: number | null) =>\n UIManager.dispatchViewManagerCommand(\n viewId,\n // we are calling the 'create' command\n // @ts-expect-error\n UIManager.AndroidPortalView.Commands.create.toString(),\n [viewId]\n );\n\nconst PortalView = (props: PortalProps) => {\n const ref = useRef(null);\n\n useEffect(() => {\n const viewId = findNodeHandle(ref.current);\n createFragment(viewId);\n }, []);\n\n return <PortalViewManager {...props} ref={ref} />;\n};\n\nexport default PortalView;\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
const HostComponentPortal = (0, _reactNative.requireNativeComponent)('IONPortalView');
|
|
15
|
+
|
|
16
|
+
const PortalView = props => {
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(HostComponentPortal, props);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var _default = PortalView;
|
|
21
|
+
exports.default = _default;
|
|
22
|
+
//# sourceMappingURL=PortalView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PortalView.tsx"],"names":["HostComponentPortal","PortalView","props"],"mappings":";;;;;;;AAAA;;AACA;;;;AAGA,MAAMA,mBAAmB,GAAG,yCAAuB,eAAvB,CAA5B;;AAEA,MAAMC,UAAU,GAAIC,KAAD,IAAwB;AACzC,sBAAO,6BAAC,mBAAD,EAAyBA,KAAzB,CAAP;AACD,CAFD;;eAIeD,U","sourcesContent":["import React from 'react';\nimport { requireNativeComponent } from 'react-native';\nimport type { PortalProps } from '.';\n\nconst HostComponentPortal = requireNativeComponent('IONPortalView');\n\nconst PortalView = (props: PortalProps) => {\n return <HostComponentPortal {...props} />;\n};\n\nexport default PortalView;\n"]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "PortalView", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _PortalView.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.unsubscribe = exports.subscribe = exports.register = exports.publish = exports.addPortal = void 0;
|
|
13
|
+
|
|
14
|
+
var _reactNative = require("react-native");
|
|
15
|
+
|
|
16
|
+
var _PortalView = _interopRequireDefault(require("./PortalView"));
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
const {
|
|
21
|
+
IONPortalsPubSub,
|
|
22
|
+
IONPortalManager
|
|
23
|
+
} = _reactNative.NativeModules;
|
|
24
|
+
const PortalsPubSub = new _reactNative.NativeEventEmitter(IONPortalsPubSub);
|
|
25
|
+
let subscriptionRefDict = {};
|
|
26
|
+
|
|
27
|
+
const subscribe = async (topic, onMessageReceived) => {
|
|
28
|
+
const subscriptionRef = await IONPortalsPubSub.subscribe(topic);
|
|
29
|
+
subscriptionRefDict[subscriptionRef] = PortalsPubSub.addListener('PortalsSubscription', onMessageReceived);
|
|
30
|
+
return subscriptionRef;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
exports.subscribe = subscribe;
|
|
34
|
+
|
|
35
|
+
const unsubscribe = (topic, subRef) => {
|
|
36
|
+
IONPortalsPubSub.unsubscribe(topic, subRef);
|
|
37
|
+
subscriptionRefDict[subRef] = null;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
exports.unsubscribe = unsubscribe;
|
|
41
|
+
|
|
42
|
+
const publish = (topic, data) => {
|
|
43
|
+
const msg = {
|
|
44
|
+
message: data
|
|
45
|
+
};
|
|
46
|
+
IONPortalsPubSub.publish(topic, msg);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
exports.publish = publish;
|
|
50
|
+
|
|
51
|
+
const register = key => {
|
|
52
|
+
IONPortalManager.register(key);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
exports.register = register;
|
|
56
|
+
|
|
57
|
+
const addPortal = portal => {
|
|
58
|
+
IONPortalManager.addPortal(portal);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
exports.addPortal = addPortal;
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":["IONPortalsPubSub","IONPortalManager","NativeModules","PortalsPubSub","NativeEventEmitter","subscriptionRefDict","subscribe","topic","onMessageReceived","subscriptionRef","addListener","unsubscribe","subRef","publish","data","msg","message","register","key","addPortal","portal"],"mappings":";;;;;;;;;;;;;AAAA;;AAIA;;;;AAFA,MAAM;AAAEA,EAAAA,gBAAF;AAAoBC,EAAAA;AAApB,IAAyCC,0BAA/C;AAUA,MAAMC,aAAa,GAAG,IAAIC,+BAAJ,CAAuBJ,gBAAvB,CAAtB;AAEA,IAAIK,mBAAwB,GAAG,EAA/B;;AAEO,MAAMC,SAAS,GAAG,OACvBC,KADuB,EAEvBC,iBAFuB,KAGH;AACpB,QAAMC,eAAe,GAAG,MAAMT,gBAAgB,CAACM,SAAjB,CAA2BC,KAA3B,CAA9B;AACAF,EAAAA,mBAAmB,CAACI,eAAD,CAAnB,GAAuCN,aAAa,CAACO,WAAd,CACrC,qBADqC,EAErCF,iBAFqC,CAAvC;AAIA,SAAOC,eAAP;AACD,CAVM;;;;AAYA,MAAME,WAAW,GAAG,CAACJ,KAAD,EAAgBK,MAAhB,KAAmC;AAC5DZ,EAAAA,gBAAgB,CAACW,WAAjB,CAA6BJ,KAA7B,EAAoCK,MAApC;AACAP,EAAAA,mBAAmB,CAACO,MAAD,CAAnB,GAA8B,IAA9B;AACD,CAHM;;;;AAKA,MAAMC,OAAO,GAAG,CAACN,KAAD,EAAgBO,IAAhB,KAA8B;AACnD,QAAMC,GAAG,GAAG;AAAEC,IAAAA,OAAO,EAAEF;AAAX,GAAZ;AACAd,EAAAA,gBAAgB,CAACa,OAAjB,CAAyBN,KAAzB,EAAgCQ,GAAhC;AACD,CAHM;;;;AAKA,MAAME,QAAQ,GAAIC,GAAD,IAAiB;AACvCjB,EAAAA,gBAAgB,CAACgB,QAAjB,CAA0BC,GAA1B;AACD,CAFM;;;;AAYA,MAAMC,SAAS,GAAIC,MAAD,IAAoB;AAC3CnB,EAAAA,gBAAgB,CAACkB,SAAjB,CAA2BC,MAA3B;AACD,CAFM","sourcesContent":["import { NativeEventEmitter, NativeModules, ViewProps } from 'react-native';\n\nconst { IONPortalsPubSub, IONPortalManager } = NativeModules;\n\nexport { default as PortalView } from './PortalView';\n\nexport interface Message {\n subscriptionRef: number;\n data: any;\n topic: string;\n}\n\nconst PortalsPubSub = new NativeEventEmitter(IONPortalsPubSub);\n\nlet subscriptionRefDict: any = {};\n\nexport const subscribe = async (\n topic: string,\n onMessageReceived: (message: Message) => void\n): Promise<number> => {\n const subscriptionRef = await IONPortalsPubSub.subscribe(topic);\n subscriptionRefDict[subscriptionRef] = PortalsPubSub.addListener(\n 'PortalsSubscription',\n onMessageReceived\n );\n return subscriptionRef;\n};\n\nexport const unsubscribe = (topic: string, subRef: number) => {\n IONPortalsPubSub.unsubscribe(topic, subRef);\n subscriptionRefDict[subRef] = null;\n};\n\nexport const publish = (topic: string, data: any) => {\n const msg = { message: data };\n IONPortalsPubSub.publish(topic, msg);\n};\n\nexport const register = (key: string) => {\n IONPortalManager.register(key);\n};\n\nexport interface Portal {\n name: string;\n startDir?: string;\n initialContext?: any;\n}\n\nexport type PortalProps = Pick<Portal, 'name' | 'initialContext'> & ViewProps;\n\nexport const addPortal = (portal: Portal) => {\n IONPortalManager.addPortal(portal);\n};\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import React, { useEffect, useRef } from 'react';
|
|
4
|
+
import { findNodeHandle, requireNativeComponent, UIManager } from 'react-native';
|
|
5
|
+
const PortalViewManager = requireNativeComponent('AndroidPortalView');
|
|
6
|
+
|
|
7
|
+
const createFragment = viewId => UIManager.dispatchViewManagerCommand(viewId, // we are calling the 'create' command
|
|
8
|
+
// @ts-expect-error
|
|
9
|
+
UIManager.AndroidPortalView.Commands.create.toString(), [viewId]);
|
|
10
|
+
|
|
11
|
+
const PortalView = props => {
|
|
12
|
+
const ref = useRef(null);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const viewId = findNodeHandle(ref.current);
|
|
15
|
+
createFragment(viewId);
|
|
16
|
+
}, []);
|
|
17
|
+
return /*#__PURE__*/React.createElement(PortalViewManager, _extends({}, props, {
|
|
18
|
+
ref: ref
|
|
19
|
+
}));
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default PortalView;
|
|
23
|
+
//# sourceMappingURL=PortalView.android.js.map
|