@leonsilicon/react-native-wishlist 0.0.0
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 +20 -0
- package/MGWishList.podspec +40 -0
- package/README.md +281 -0
- package/android/CMakeLists.txt +86 -0
- package/android/build.gradle +72 -0
- package/android/gradle.properties +5 -0
- package/android/spotless.gradle +24 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/com/wishlist/ContentContainer.kt +22 -0
- package/android/src/main/java/com/wishlist/Orchestrator.kt +38 -0
- package/android/src/main/java/com/wishlist/TemplateContainer.kt +30 -0
- package/android/src/main/java/com/wishlist/TemplateContainerViewManager.kt +65 -0
- package/android/src/main/java/com/wishlist/TemplateInterceptor.kt +29 -0
- package/android/src/main/java/com/wishlist/TemplateInterceptorViewManager.kt +23 -0
- package/android/src/main/java/com/wishlist/UIScheduler.kt +15 -0
- package/android/src/main/java/com/wishlist/Wishlist.kt +135 -0
- package/android/src/main/java/com/wishlist/WishlistManagerModule.kt +51 -0
- package/android/src/main/java/com/wishlist/WishlistPackage.kt +47 -0
- package/android/src/main/java/com/wishlist/WishlistSoLoader.kt +17 -0
- package/android/src/main/java/com/wishlist/WishlistViewManager.kt +69 -0
- package/android/src/main/jni/ErrorHandlerAndroid.cpp +16 -0
- package/android/src/main/jni/ErrorHandlerAndroid.h +13 -0
- package/android/src/main/jni/JNIStateRegistry.cpp +22 -0
- package/android/src/main/jni/JNIStateRegistry.h +23 -0
- package/android/src/main/jni/OnLoad.cpp +12 -0
- package/android/src/main/jni/Orchestrator.cpp +167 -0
- package/android/src/main/jni/Orchestrator.hpp +78 -0
- package/android/src/main/jni/UISchedulerAndroid.cpp +20 -0
- package/android/src/main/jni/UISchedulerAndroid.h +18 -0
- package/android/src/main/jni/WishlistManagerModule.cpp +91 -0
- package/android/src/main/jni/WishlistManagerModule.hpp +43 -0
- package/android/src/main/jni/wishlist.h +19 -0
- package/cpp/ContentContainer/MGContentContainerComponentDescriptor.h +40 -0
- package/cpp/ContentContainer/MGContentContainerShadowNode.cpp +21 -0
- package/cpp/ContentContainer/MGContentContainerShadowNode.h +30 -0
- package/cpp/ContentContainer/MGContentContainerState.cpp +31 -0
- package/cpp/ContentContainer/MGContentContainerState.h +39 -0
- package/cpp/DataBinding/MGBindingProvider.hpp +21 -0
- package/cpp/DataBinding/MGDataBinding.hpp +23 -0
- package/cpp/DataBinding/MGDataBindingImpl.cpp +112 -0
- package/cpp/DataBinding/MGDataBindingImpl.hpp +35 -0
- package/cpp/DependencyInjection/MGDI.hpp +33 -0
- package/cpp/DependencyInjection/MGDIImpl.cpp +65 -0
- package/cpp/DependencyInjection/MGDIImpl.hpp +45 -0
- package/cpp/DependencyInjection/MGUIManagerHolder.cpp +21 -0
- package/cpp/DependencyInjection/MGUIManagerHolder.h +24 -0
- package/cpp/ItemProvider/ComponentsPool.cpp +91 -0
- package/cpp/ItemProvider/ComponentsPool.h +49 -0
- package/cpp/ItemProvider/ItemProvider.cpp +60 -0
- package/cpp/ItemProvider/ItemProvider.h +67 -0
- package/cpp/ItemProvider/ShadowNodeBinding.cpp +356 -0
- package/cpp/ItemProvider/ShadowNodeBinding.h +59 -0
- package/cpp/ItemProvider/ShadowNodeCopyMachine.cpp +95 -0
- package/cpp/ItemProvider/ShadowNodeCopyMachine.h +25 -0
- package/cpp/MGErrorHandler.h +12 -0
- package/cpp/MGViewportCarer/MGVSyncRequester.hpp +18 -0
- package/cpp/MGViewportCarer/MGViewportCarer.hpp +42 -0
- package/cpp/MGViewportCarer/MGViewportCarerImpl.cpp +453 -0
- package/cpp/MGViewportCarer/MGViewportCarerImpl.h +80 -0
- package/cpp/MGViewportCarer/MGViewportCarerListener.hpp +27 -0
- package/cpp/TemplateContainer/MGTemplateContainerComponentDescriptor.h +15 -0
- package/cpp/TemplateContainer/MGTemplateContainerShadowNode.cpp +43 -0
- package/cpp/TemplateContainer/MGTemplateContainerShadowNode.h +42 -0
- package/cpp/TemplateContainer/MGTemplateContainerState.cpp +37 -0
- package/cpp/TemplateContainer/MGTemplateContainerState.h +39 -0
- package/cpp/UIScheduler/MGUIScheduler.cpp +8 -0
- package/cpp/UIScheduler/MGUIScheduler.hpp +18 -0
- package/cpp/Wishlist/MGWishlistComponentDescriptor.h +14 -0
- package/cpp/Wishlist/MGWishlistShadowNode.cpp +49 -0
- package/cpp/Wishlist/MGWishlistShadowNode.h +37 -0
- package/cpp/Wishlist/MGWishlistState.cpp +57 -0
- package/cpp/Wishlist/MGWishlistState.h +42 -0
- package/cpp/WishlistDefine.h +3 -0
- package/cpp/WishlistJsRuntime.cpp +139 -0
- package/cpp/WishlistJsRuntime.h +59 -0
- package/ios/MGContentContainerComponent.h +9 -0
- package/ios/MGContentContainerComponent.mm +34 -0
- package/ios/MGErrorHandlerIOS.h +13 -0
- package/ios/MGErrorHandlerIOS.mm +12 -0
- package/ios/MGObjCJSIUtils.h +63 -0
- package/ios/MGTemplateContainerComponent.h +12 -0
- package/ios/MGTemplateContainerComponent.mm +105 -0
- package/ios/MGTemplateInterceptorComponent.h +9 -0
- package/ios/MGTemplateInterceptorComponent.mm +72 -0
- package/ios/MGWishListComponent.h +17 -0
- package/ios/MGWishListComponent.mm +187 -0
- package/ios/MGWishlistManager.h +21 -0
- package/ios/MGWishlistManager.mm +319 -0
- package/ios/MGWishlistQueue.h +11 -0
- package/ios/MGWishlistQueue.m +34 -0
- package/ios/Orchestrator/MGOrchestrator.h +35 -0
- package/ios/Orchestrator/MGOrchestrator.mm +139 -0
- package/ios/Orchestrator/MGOrchestratorCppAdapter.cpp +25 -0
- package/ios/Orchestrator/MGOrchestratorCppAdapter.hpp +32 -0
- package/ios/UIScheduleriOS/MGUIScheduleriOS.hpp +19 -0
- package/ios/UIScheduleriOS/MGUIScheduleriOS.mm +21 -0
- package/lib/commonjs/Colors.js +399 -0
- package/lib/commonjs/Colors.js.map +1 -0
- package/lib/commonjs/ComponentPool.js +28 -0
- package/lib/commonjs/ComponentPool.js.map +1 -0
- package/lib/commonjs/Components/ForEach.js +21 -0
- package/lib/commonjs/Components/ForEach.js.map +1 -0
- package/lib/commonjs/Components/ForEachBase.js +19 -0
- package/lib/commonjs/Components/ForEachBase.js.map +1 -0
- package/lib/commonjs/Components/IF.js +34 -0
- package/lib/commonjs/Components/IF.js.map +1 -0
- package/lib/commonjs/Components/Pressable.js +73 -0
- package/lib/commonjs/Components/Pressable.js.map +1 -0
- package/lib/commonjs/Components/Switch.js +52 -0
- package/lib/commonjs/Components/Switch.js.map +1 -0
- package/lib/commonjs/Components/WishlistImage.js +29 -0
- package/lib/commonjs/Components/WishlistImage.js.map +1 -0
- package/lib/commonjs/Components/WishlistText.js +24 -0
- package/lib/commonjs/Components/WishlistText.js.map +1 -0
- package/lib/commonjs/Components/WishlistView.js +10 -0
- package/lib/commonjs/Components/WishlistView.js.map +1 -0
- package/lib/commonjs/EventHandler.js +72 -0
- package/lib/commonjs/EventHandler.js.map +1 -0
- package/lib/commonjs/InflatorRepository.js +155 -0
- package/lib/commonjs/InflatorRepository.js.map +1 -0
- package/lib/commonjs/OrchestratorBinding.js +12 -0
- package/lib/commonjs/OrchestratorBinding.js.map +1 -0
- package/lib/commonjs/Specs/NativeContentContainer.js +12 -0
- package/lib/commonjs/Specs/NativeContentContainer.js.map +1 -0
- package/lib/commonjs/Specs/NativeTemplateContainer.js +12 -0
- package/lib/commonjs/Specs/NativeTemplateContainer.js.map +1 -0
- package/lib/commonjs/Specs/NativeTemplateInterceptor.js +10 -0
- package/lib/commonjs/Specs/NativeTemplateInterceptor.js.map +1 -0
- package/lib/commonjs/Specs/NativeWishlist.js +16 -0
- package/lib/commonjs/Specs/NativeWishlist.js.map +1 -0
- package/lib/commonjs/Specs/NativeWishlistManager.js +9 -0
- package/lib/commonjs/Specs/NativeWishlistManager.js.map +1 -0
- package/lib/commonjs/TemplateContext.js +17 -0
- package/lib/commonjs/TemplateContext.js.map +1 -0
- package/lib/commonjs/TemplateItem.js +2 -0
- package/lib/commonjs/TemplateItem.js.map +1 -0
- package/lib/commonjs/TemplateValue.js +68 -0
- package/lib/commonjs/TemplateValue.js.map +1 -0
- package/lib/commonjs/Utils.js +20 -0
- package/lib/commonjs/Utils.js.map +1 -0
- package/lib/commonjs/Wishlist.js +290 -0
- package/lib/commonjs/Wishlist.js.map +1 -0
- package/lib/commonjs/WishlistContext.js +17 -0
- package/lib/commonjs/WishlistContext.js.map +1 -0
- package/lib/commonjs/WishlistData.js +149 -0
- package/lib/commonjs/WishlistData.js.map +1 -0
- package/lib/commonjs/WishlistDataCopy.js +115 -0
- package/lib/commonjs/WishlistDataCopy.js.map +1 -0
- package/lib/commonjs/WishlistJsRuntime.android.js +22 -0
- package/lib/commonjs/WishlistJsRuntime.android.js.map +1 -0
- package/lib/commonjs/WishlistJsRuntime.js +42 -0
- package/lib/commonjs/WishlistJsRuntime.js.map +1 -0
- package/lib/commonjs/createTemplateComponent.js +196 -0
- package/lib/commonjs/createTemplateComponent.js.map +1 -0
- package/lib/commonjs/global.d.js +2 -0
- package/lib/commonjs/global.d.js.map +1 -0
- package/lib/commonjs/index.js +83 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/renderTemplate.js +14 -0
- package/lib/commonjs/renderTemplate.js.map +1 -0
- package/lib/module/Colors.js +395 -0
- package/lib/module/Colors.js.map +1 -0
- package/lib/module/ComponentPool.js +24 -0
- package/lib/module/ComponentPool.js.map +1 -0
- package/lib/module/Components/ForEach.js +17 -0
- package/lib/module/Components/ForEach.js.map +1 -0
- package/lib/module/Components/ForEachBase.js +14 -0
- package/lib/module/Components/ForEachBase.js.map +1 -0
- package/lib/module/Components/IF.js +29 -0
- package/lib/module/Components/IF.js.map +1 -0
- package/lib/module/Components/Pressable.js +68 -0
- package/lib/module/Components/Pressable.js.map +1 -0
- package/lib/module/Components/Switch.js +45 -0
- package/lib/module/Components/Switch.js.map +1 -0
- package/lib/module/Components/WishlistImage.js +25 -0
- package/lib/module/Components/WishlistImage.js.map +1 -0
- package/lib/module/Components/WishlistText.js +20 -0
- package/lib/module/Components/WishlistText.js.map +1 -0
- package/lib/module/Components/WishlistView.js +6 -0
- package/lib/module/Components/WishlistView.js.map +1 -0
- package/lib/module/EventHandler.js +66 -0
- package/lib/module/EventHandler.js.map +1 -0
- package/lib/module/InflatorRepository.js +149 -0
- package/lib/module/InflatorRepository.js.map +1 -0
- package/lib/module/OrchestratorBinding.js +8 -0
- package/lib/module/OrchestratorBinding.js.map +1 -0
- package/lib/module/Specs/NativeContentContainer.js +7 -0
- package/lib/module/Specs/NativeContentContainer.js.map +1 -0
- package/lib/module/Specs/NativeTemplateContainer.js +7 -0
- package/lib/module/Specs/NativeTemplateContainer.js.map +1 -0
- package/lib/module/Specs/NativeTemplateInterceptor.js +5 -0
- package/lib/module/Specs/NativeTemplateInterceptor.js.map +1 -0
- package/lib/module/Specs/NativeWishlist.js +11 -0
- package/lib/module/Specs/NativeWishlist.js.map +1 -0
- package/lib/module/Specs/NativeWishlistManager.js +5 -0
- package/lib/module/Specs/NativeWishlistManager.js.map +1 -0
- package/lib/module/TemplateContext.js +12 -0
- package/lib/module/TemplateContext.js.map +1 -0
- package/lib/module/TemplateItem.js +2 -0
- package/lib/module/TemplateItem.js.map +1 -0
- package/lib/module/TemplateValue.js +63 -0
- package/lib/module/TemplateValue.js.map +1 -0
- package/lib/module/Utils.js +15 -0
- package/lib/module/Utils.js.map +1 -0
- package/lib/module/Wishlist.js +284 -0
- package/lib/module/Wishlist.js.map +1 -0
- package/lib/module/WishlistContext.js +12 -0
- package/lib/module/WishlistContext.js.map +1 -0
- package/lib/module/WishlistData.js +144 -0
- package/lib/module/WishlistData.js.map +1 -0
- package/lib/module/WishlistDataCopy.js +111 -0
- package/lib/module/WishlistDataCopy.js.map +1 -0
- package/lib/module/WishlistJsRuntime.android.js +16 -0
- package/lib/module/WishlistJsRuntime.android.js.map +1 -0
- package/lib/module/WishlistJsRuntime.js +35 -0
- package/lib/module/WishlistJsRuntime.js.map +1 -0
- package/lib/module/createTemplateComponent.js +191 -0
- package/lib/module/createTemplateComponent.js.map +1 -0
- package/lib/module/global.d.js +2 -0
- package/lib/module/global.d.js.map +1 -0
- package/lib/module/index.js +14 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/renderTemplate.js +10 -0
- package/lib/module/renderTemplate.js.map +1 -0
- package/lib/typescript/Colors.d.ts +7 -0
- package/lib/typescript/Colors.d.ts.map +1 -0
- package/lib/typescript/ComponentPool.d.ts +10 -0
- package/lib/typescript/ComponentPool.d.ts.map +1 -0
- package/lib/typescript/Components/ForEach.d.ts +2 -0
- package/lib/typescript/Components/ForEach.d.ts.map +1 -0
- package/lib/typescript/Components/ForEachBase.d.ts +3 -0
- package/lib/typescript/Components/ForEachBase.d.ts.map +1 -0
- package/lib/typescript/Components/IF.d.ts +3 -0
- package/lib/typescript/Components/IF.d.ts.map +1 -0
- package/lib/typescript/Components/Pressable.d.ts +15 -0
- package/lib/typescript/Components/Pressable.d.ts.map +1 -0
- package/lib/typescript/Components/Switch.d.ts +17 -0
- package/lib/typescript/Components/Switch.d.ts.map +1 -0
- package/lib/typescript/Components/WishlistImage.d.ts +3 -0
- package/lib/typescript/Components/WishlistImage.d.ts.map +1 -0
- package/lib/typescript/Components/WishlistText.d.ts +3 -0
- package/lib/typescript/Components/WishlistText.d.ts.map +1 -0
- package/lib/typescript/Components/WishlistView.d.ts +3 -0
- package/lib/typescript/Components/WishlistView.d.ts.map +1 -0
- package/lib/typescript/EventHandler.d.ts +9 -0
- package/lib/typescript/EventHandler.d.ts.map +1 -0
- package/lib/typescript/InflatorRepository.d.ts +28 -0
- package/lib/typescript/InflatorRepository.d.ts.map +1 -0
- package/lib/typescript/OrchestratorBinding.d.ts +13 -0
- package/lib/typescript/OrchestratorBinding.d.ts.map +1 -0
- package/lib/typescript/Specs/NativeContentContainer.d.ts +6 -0
- package/lib/typescript/Specs/NativeContentContainer.d.ts.map +1 -0
- package/lib/typescript/Specs/NativeTemplateContainer.d.ts +9 -0
- package/lib/typescript/Specs/NativeTemplateContainer.d.ts.map +1 -0
- package/lib/typescript/Specs/NativeTemplateInterceptor.d.ts +6 -0
- package/lib/typescript/Specs/NativeTemplateInterceptor.d.ts.map +1 -0
- package/lib/typescript/Specs/NativeWishlist.d.ts +22 -0
- package/lib/typescript/Specs/NativeWishlist.d.ts.map +1 -0
- package/lib/typescript/Specs/NativeWishlistManager.d.ts +7 -0
- package/lib/typescript/Specs/NativeWishlistManager.d.ts.map +1 -0
- package/lib/typescript/TemplateContext.d.ts +9 -0
- package/lib/typescript/TemplateContext.d.ts.map +1 -0
- package/lib/typescript/TemplateItem.d.ts +13 -0
- package/lib/typescript/TemplateItem.d.ts.map +1 -0
- package/lib/typescript/TemplateValue.d.ts +16 -0
- package/lib/typescript/TemplateValue.d.ts.map +1 -0
- package/lib/typescript/Utils.d.ts +3 -0
- package/lib/typescript/Utils.d.ts.map +1 -0
- package/lib/typescript/Wishlist.d.ts +59 -0
- package/lib/typescript/Wishlist.d.ts.map +1 -0
- package/lib/typescript/WishlistContext.d.ts +11 -0
- package/lib/typescript/WishlistContext.d.ts.map +1 -0
- package/lib/typescript/WishlistData.d.ts +20 -0
- package/lib/typescript/WishlistData.d.ts.map +1 -0
- package/lib/typescript/WishlistDataCopy.d.ts +25 -0
- package/lib/typescript/WishlistDataCopy.d.ts.map +1 -0
- package/lib/typescript/WishlistJsRuntime.android.d.ts +4 -0
- package/lib/typescript/WishlistJsRuntime.android.d.ts.map +1 -0
- package/lib/typescript/WishlistJsRuntime.d.ts +6 -0
- package/lib/typescript/WishlistJsRuntime.d.ts.map +1 -0
- package/lib/typescript/createTemplateComponent.d.ts +35 -0
- package/lib/typescript/createTemplateComponent.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +8 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/renderTemplate.d.ts +3 -0
- package/lib/typescript/renderTemplate.d.ts.map +1 -0
- package/package.json +195 -0
- package/src/Colors.ts +474 -0
- package/src/ComponentPool.ts +33 -0
- package/src/Components/ForEach.tsx +22 -0
- package/src/Components/ForEachBase.tsx +8 -0
- package/src/Components/IF.tsx +20 -0
- package/src/Components/Pressable.tsx +111 -0
- package/src/Components/Switch.tsx +49 -0
- package/src/Components/WishlistImage.tsx +25 -0
- package/src/Components/WishlistText.tsx +14 -0
- package/src/Components/WishlistView.tsx +4 -0
- package/src/EventHandler.ts +78 -0
- package/src/InflatorRepository.ts +231 -0
- package/src/OrchestratorBinding.ts +15 -0
- package/src/Specs/NativeContentContainer.ts +9 -0
- package/src/Specs/NativeTemplateContainer.ts +13 -0
- package/src/Specs/NativeTemplateInterceptor.ts +8 -0
- package/src/Specs/NativeWishlist.ts +42 -0
- package/src/Specs/NativeWishlistManager.ts +7 -0
- package/src/TemplateContext.tsx +14 -0
- package/src/TemplateItem.ts +15 -0
- package/src/TemplateValue.tsx +101 -0
- package/src/Utils.ts +15 -0
- package/src/Wishlist.tsx +417 -0
- package/src/WishlistContext.tsx +15 -0
- package/src/WishlistData.ts +179 -0
- package/src/WishlistDataCopy.ts +138 -0
- package/src/WishlistJsRuntime.android.ts +20 -0
- package/src/WishlistJsRuntime.ts +59 -0
- package/src/createTemplateComponent.tsx +263 -0
- package/src/global.d.ts +1 -0
- package/src/index.ts +17 -0
- package/src/renderTemplate.ts +22 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { forwardRef, useMemo } from 'react';
|
|
4
|
+
import { StyleSheet, Text } from 'react-native';
|
|
5
|
+
import { TemplateCallback } from './EventHandler';
|
|
6
|
+
import { ForEachBase } from './Components/ForEachBase';
|
|
7
|
+
import InflatorRepository, { getUIInflatorRegistry } from './InflatorRepository';
|
|
8
|
+
import { CaseBase } from './Components/Switch';
|
|
9
|
+
import { useTemplateContext } from './TemplateContext';
|
|
10
|
+
import { createTemplateValue, isTemplateValue } from './TemplateValue';
|
|
11
|
+
import { generateId } from './Utils';
|
|
12
|
+
import { useWishlistContext } from './WishlistContext';
|
|
13
|
+
|
|
14
|
+
// This is based on types from @types/react-native createAnimatedComponent.
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
function setInObject(obj, path, value) {
|
|
17
|
+
'worklet';
|
|
18
|
+
|
|
19
|
+
let current = obj;
|
|
20
|
+
for (let i = 0; i < path.length - 1; i++) {
|
|
21
|
+
current[path[i]] = current[path[i]] ?? {};
|
|
22
|
+
current = current[path[i]];
|
|
23
|
+
}
|
|
24
|
+
current[path[path.length - 1]] = value;
|
|
25
|
+
}
|
|
26
|
+
function traverseObject(obj, callback) {
|
|
27
|
+
const stack = [{
|
|
28
|
+
path: [],
|
|
29
|
+
value: obj
|
|
30
|
+
}];
|
|
31
|
+
while (stack.length > 0) {
|
|
32
|
+
const {
|
|
33
|
+
path,
|
|
34
|
+
value
|
|
35
|
+
} = stack.pop();
|
|
36
|
+
if (value && typeof value === 'object' && !isTemplateValue(value) && !(value instanceof TemplateCallback) && (path.length === 0 || path[path.length - 1] !== 'children')) {
|
|
37
|
+
Object.keys(value).forEach(key => {
|
|
38
|
+
stack.push({
|
|
39
|
+
path: [...path, key],
|
|
40
|
+
value: value[key]
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
} else {
|
|
44
|
+
callback(path, value);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function convertToTemplateValue(value, path) {
|
|
49
|
+
let curTemplateType = value;
|
|
50
|
+
return {
|
|
51
|
+
// TODO(janic): Need to call remove for template values created here.
|
|
52
|
+
templateValue: createTemplateValue(() => {
|
|
53
|
+
'worklet';
|
|
54
|
+
|
|
55
|
+
return curTemplateType;
|
|
56
|
+
}),
|
|
57
|
+
targetPath: path
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export function createTemplateComponent(Component, {
|
|
61
|
+
addProps,
|
|
62
|
+
additionalTemplateProps
|
|
63
|
+
} = {}) {
|
|
64
|
+
const parsedAdditionalTemplateProps = additionalTemplateProps?.map(prop => prop.split('.')) ?? [];
|
|
65
|
+
const WishListComponent = /*#__PURE__*/forwardRef(({
|
|
66
|
+
style,
|
|
67
|
+
...props
|
|
68
|
+
}, ref) => {
|
|
69
|
+
const {
|
|
70
|
+
inflatorId
|
|
71
|
+
} = useWishlistContext();
|
|
72
|
+
const {
|
|
73
|
+
templateType
|
|
74
|
+
} = useTemplateContext();
|
|
75
|
+
const nativeId = useMemo(generateId, []);
|
|
76
|
+
const otherPropsMemoized = useMemo(() => {
|
|
77
|
+
const resolvedStyle = StyleSheet.flatten(style);
|
|
78
|
+
const templateValues = [];
|
|
79
|
+
const templateCallbacks = [];
|
|
80
|
+
const additionalProps = [];
|
|
81
|
+
const otherProps = {};
|
|
82
|
+
traverseObject({
|
|
83
|
+
...props,
|
|
84
|
+
style: resolvedStyle
|
|
85
|
+
}, (path, value) => {
|
|
86
|
+
const applyHacks = () => {
|
|
87
|
+
// Text component needs to receive a string child to work properly.
|
|
88
|
+
// @ts-expect-error TODO: fix this.
|
|
89
|
+
if (path[0] === 'children' && Component === Text) {
|
|
90
|
+
setInObject(otherProps, path, ' ');
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
if (isTemplateValue(value)) {
|
|
94
|
+
templateValues.push({
|
|
95
|
+
templateValue: value,
|
|
96
|
+
targetPath: path
|
|
97
|
+
});
|
|
98
|
+
applyHacks();
|
|
99
|
+
} else if (value instanceof TemplateCallback) {
|
|
100
|
+
templateCallbacks.push({
|
|
101
|
+
worklet: value.worklet,
|
|
102
|
+
// Callbacks should never be in objects.
|
|
103
|
+
eventName: value.eventName ?? path[0].replace(/^on/, 'top')
|
|
104
|
+
});
|
|
105
|
+
// Events have a boolean prop associated to know whether the
|
|
106
|
+
// function is set or not, so we still want to pass the prop.
|
|
107
|
+
setInObject(otherProps, path, () => {});
|
|
108
|
+
} else {
|
|
109
|
+
// @ts-expect-error TODO: fix this.
|
|
110
|
+
if (Component === ForEachBase && path[0] === 'template') {
|
|
111
|
+
templateValues.push(convertToTemplateValue(value, path));
|
|
112
|
+
}
|
|
113
|
+
if (
|
|
114
|
+
// @ts-expect-error TODO: fix this.
|
|
115
|
+
Component === CaseBase && path[0] === 'value' && !isTemplateValue(value)) {
|
|
116
|
+
templateValues.push(convertToTemplateValue(value, path));
|
|
117
|
+
}
|
|
118
|
+
if (
|
|
119
|
+
// @ts-expect-error TODO: fix this.
|
|
120
|
+
Component === Text && path[0] === 'children' && !isTemplateValue(value)) {
|
|
121
|
+
templateValues.push(convertToTemplateValue(value, path));
|
|
122
|
+
}
|
|
123
|
+
parsedAdditionalTemplateProps.forEach(additionalPath => {
|
|
124
|
+
if (additionalPath.length === path.length && additionalPath.every((p, i) => p === path[i])) {
|
|
125
|
+
additionalProps.push({
|
|
126
|
+
targetPath: path,
|
|
127
|
+
value
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
setInObject(otherProps, path, value);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
InflatorRepository.registerMapping(inflatorId, nativeId, templateType, (value, templateItem, pool, rootValue) => {
|
|
135
|
+
'worklet';
|
|
136
|
+
|
|
137
|
+
const propsToSet = {};
|
|
138
|
+
additionalProps.forEach(({
|
|
139
|
+
targetPath,
|
|
140
|
+
value: v
|
|
141
|
+
}) => {
|
|
142
|
+
setInObject(propsToSet, targetPath, v);
|
|
143
|
+
});
|
|
144
|
+
templateValues.forEach(({
|
|
145
|
+
templateValue,
|
|
146
|
+
targetPath
|
|
147
|
+
}) => {
|
|
148
|
+
setInObject(propsToSet, targetPath, templateValue.value());
|
|
149
|
+
});
|
|
150
|
+
templateCallbacks.forEach(({
|
|
151
|
+
eventName,
|
|
152
|
+
worklet
|
|
153
|
+
}) => {
|
|
154
|
+
templateItem.setCallback(eventName, ev => {
|
|
155
|
+
getUIInflatorRegistry().withCurrentValues(value, rootValue, () => {
|
|
156
|
+
worklet(ev, value, rootValue);
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
// Styles need to be passed as props.
|
|
162
|
+
const {
|
|
163
|
+
style: styleForProps,
|
|
164
|
+
...otherPropsToSet
|
|
165
|
+
} = propsToSet;
|
|
166
|
+
const finalPropsToSet = {
|
|
167
|
+
...otherPropsToSet,
|
|
168
|
+
...styleForProps
|
|
169
|
+
};
|
|
170
|
+
if (addProps) {
|
|
171
|
+
addProps(templateItem, finalPropsToSet, inflatorId, pool, rootValue);
|
|
172
|
+
} else {
|
|
173
|
+
templateItem.addProps(finalPropsToSet);
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
return otherProps;
|
|
177
|
+
// TODO: This will change on every render, if we want this memo to work properly we need
|
|
178
|
+
// to shallow compare the props object.
|
|
179
|
+
}, [inflatorId, nativeId, props, style, templateType]);
|
|
180
|
+
|
|
181
|
+
// @ts-expect-error: this is ok.
|
|
182
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
183
|
+
...otherPropsMemoized,
|
|
184
|
+
ref: ref,
|
|
185
|
+
nativeID: nativeId
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
WishListComponent.displayName = `WishList(${Component.displayName})`;
|
|
189
|
+
return WishListComponent;
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=createTemplateComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useMemo","StyleSheet","Text","TemplateCallback","ForEachBase","InflatorRepository","getUIInflatorRegistry","CaseBase","useTemplateContext","createTemplateValue","isTemplateValue","generateId","useWishlistContext","jsx","_jsx","setInObject","obj","path","value","current","i","length","traverseObject","callback","stack","pop","Object","keys","forEach","key","push","convertToTemplateValue","curTemplateType","templateValue","targetPath","createTemplateComponent","Component","addProps","additionalTemplateProps","parsedAdditionalTemplateProps","map","prop","split","WishListComponent","style","props","ref","inflatorId","templateType","nativeId","otherPropsMemoized","resolvedStyle","flatten","templateValues","templateCallbacks","additionalProps","otherProps","applyHacks","worklet","eventName","replace","additionalPath","every","p","registerMapping","templateItem","pool","rootValue","propsToSet","v","setCallback","ev","withCurrentValues","styleForProps","otherPropsToSet","finalPropsToSet","nativeID","displayName"],"sourceRoot":"../../src","sources":["createTemplateComponent.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAClD,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,gBAAgB,QAAiC,gBAAgB;AAC1E,SAASC,WAAW,QAAQ,0BAA0B;AACtD,OAAOC,kBAAkB,IACvBC,qBAAqB,QAChB,sBAAsB;AAC7B,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,kBAAkB,QAAQ,mBAAmB;AACtD,SACEC,mBAAmB,EACnBC,eAAe,QAGV,iBAAiB;AACxB,SAASC,UAAU,QAAQ,SAAS;AACpC,SAASC,kBAAkB,QAAQ,mBAAmB;;AAItD;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAgCA,SAASC,WAAWA,CAACC,GAAQ,EAAEC,IAAc,EAAEC,KAAU,EAAE;EACzD,SAAS;;EAET,IAAIC,OAAO,GAAGH,GAAG;EACjB,KAAK,IAAII,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,IAAI,CAACI,MAAM,GAAG,CAAC,EAAED,CAAC,EAAE,EAAE;IACxCD,OAAO,CAACF,IAAI,CAACG,CAAC,CAAC,CAAC,GAAGD,OAAO,CAACF,IAAI,CAACG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACzCD,OAAO,GAAGA,OAAO,CAACF,IAAI,CAACG,CAAC,CAAC,CAAC;EAC5B;EACAD,OAAO,CAACF,IAAI,CAACA,IAAI,CAACI,MAAM,GAAG,CAAC,CAAC,CAAC,GAAGH,KAAK;AACxC;AAEA,SAASI,cAAcA,CACrBN,GAAQ,EACRO,QAA8C,EAC9C;EACA,MAAMC,KAAuC,GAAG,CAAC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AU,EAAEE,QAAQ,EAAEJ,KAAK,EAAED,KAAK,EAAEI,YAAY,CAAC,CAAC;;IAEtD;IACA,oBAAOlC,IAAA,CAACsB,SAAS;MAAA,GAAKc,kBAAkB;MAAEJ,GAAG,EAAEA,GAAI;MAAC8B,QAAQ,EAAE3B;IAAS,CAAE,CAAC;EAC5E,CAAC,CAAoC;EAErCN,iBAAiB,CAACkC,WAAW,GAAG,YAAYzC,SAAS,CAACyC,WAAW,GAAG;EAEpE,OAAOlC,iBAAiB;AAC1B","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["global.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import './EventHandler';
|
|
4
|
+
import WishListManager from './Specs/NativeWishlistManager';
|
|
5
|
+
import { bindNativeWishlistContext } from './WishlistJsRuntime';
|
|
6
|
+
WishListManager.install();
|
|
7
|
+
bindNativeWishlistContext();
|
|
8
|
+
export { useTemplateValue, TemplateValue } from './TemplateValue';
|
|
9
|
+
export { createTemplateComponent } from './createTemplateComponent';
|
|
10
|
+
export { Wishlist, WishListInstance } from './Wishlist';
|
|
11
|
+
export { useWishlistData, useWishlistContextData, WishlistData } from './WishlistData';
|
|
12
|
+
export { createRunInJsFn, createRunInWishlistFn } from './WishlistJsRuntime';
|
|
13
|
+
export { renderTemplate } from './renderTemplate';
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["WishListManager","bindNativeWishlistContext","install","useTemplateValue","TemplateValue","createTemplateComponent","Wishlist","WishListInstance","useWishlistData","useWishlistContextData","WishlistData","createRunInJsFn","createRunInWishlistFn","renderTemplate"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,OAAO,gBAAgB;AACvB,OAAOA,eAAe,MAAM,+BAA+B;AAC3D,SAASC,yBAAyB,QAAQ,qBAAqB;AAE/DD,eAAe,CAACE,OAAO,CAAC,CAAC;AACzBD,yBAAyB,CAAC,CAAC;AAE3B,SAASE,gBAAgB,EAAEC,aAAa,QAAQ,iBAAiB;AACjE,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,QAAQ,EAAEC,gBAAgB,QAAQ,YAAY;AACvD,SACEC,eAAe,EACfC,sBAAsB,EACtBC,YAAY,QACP,gBAAgB;AACvB,SAASC,eAAe,EAAEC,qBAAqB,QAAQ,qBAAqB;AAC5E,SAASC,cAAc,QAAQ,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { getUIInflatorRegistry } from './InflatorRepository';
|
|
4
|
+
export function renderTemplate(template, value, rootValue, inflatorId, pool) {
|
|
5
|
+
'worklet';
|
|
6
|
+
|
|
7
|
+
const item = pool.getComponent(template);
|
|
8
|
+
return getUIInflatorRegistry().useMappings(item, value, template, inflatorId, pool, rootValue);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=renderTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getUIInflatorRegistry","renderTemplate","template","value","rootValue","inflatorId","pool","item","getComponent","useMappings"],"sourceRoot":"../../src","sources":["renderTemplate.ts"],"mappings":";;AACA,SAASA,qBAAqB,QAAQ,sBAAsB;AAE5D,OAAO,SAASC,cAAcA,CAC5BC,QAAgB,EAChBC,KAAU,EACVC,SAAc,EACdC,UAAkB,EAClBC,IAAmB,EACnB;EACA,SAAS;;EAET,MAAMC,IAAI,GAAGD,IAAI,CAACE,YAAY,CAACN,QAAQ,CAAE;EACzC,OAAOF,qBAAqB,CAAC,CAAC,CAACS,WAAW,CACxCF,IAAI,EACJJ,KAAK,EACLD,QAAQ,EACRG,UAAU,EACVC,IAAI,EACJF,SACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Colors.d.ts","sourceRoot":"","sources":["../../src/Colors.ts"],"names":[],"mappings":"AAMA,UAAU,cAAc;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACzD;AAwcD,wBAAgB,iBAAiB,IAAI,cAAc,CAQlD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TemplateItem } from './TemplateItem';
|
|
2
|
+
export type NodeType = 'View' | 'Text' | 'Paragraph' | 'RawText';
|
|
3
|
+
export type NativeComponentPool = {
|
|
4
|
+
getComponent: (id: string) => TemplateItem | undefined;
|
|
5
|
+
};
|
|
6
|
+
export type ComponentPool = NativeComponentPool & {
|
|
7
|
+
createNode(type: NodeType): TemplateItem;
|
|
8
|
+
};
|
|
9
|
+
export declare function wrapComponentPool(pool: NativeComponentPool): ComponentPool;
|
|
10
|
+
//# sourceMappingURL=ComponentPool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentPool.d.ts","sourceRoot":"","sources":["../../src/ComponentPool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;AAEjE,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS,CAAC;CACxD,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG;IAChD,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,CAAC;CAC1C,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,mBAAmB,GAAG,aAAa,CAoB1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForEach.d.ts","sourceRoot":"","sources":["../../../src/Components/ForEach.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO,kMAiBlB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForEachBase.d.ts","sourceRoot":"","sources":["../../../src/Components/ForEachBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAK1C,eAAO,MAAM,WAAW,8EAEtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IF.d.ts","sourceRoot":"","sources":["../../../src/Components/IF.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAiB1B,wBAAgB,EAAE,CAAC,KAAK,EAAE,GAAG,qBAE5B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewProps } from 'react-native';
|
|
3
|
+
export declare function getNextHandlerTag(): number;
|
|
4
|
+
export declare const State: {
|
|
5
|
+
readonly UNDETERMINED: 0;
|
|
6
|
+
readonly FAILED: 1;
|
|
7
|
+
readonly BEGAN: 2;
|
|
8
|
+
readonly CANCELLED: 3;
|
|
9
|
+
readonly ACTIVE: 4;
|
|
10
|
+
readonly END: 5;
|
|
11
|
+
};
|
|
12
|
+
export declare const Pressable: React.ForwardRefExoticComponent<ViewProps & {
|
|
13
|
+
onPress?: ((item: any, rootItem: any) => void) | null;
|
|
14
|
+
} & React.RefAttributes<any>>;
|
|
15
|
+
//# sourceMappingURL=Pressable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../src/Components/Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAuB,SAAS,EAAE,MAAM,cAAc,CAAC;AAyC9D,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAKD,eAAO,MAAM,KAAK;;;;;;;CAOR,CAAC;AAmCX,eAAO,MAAM,SAAS;cAhCV,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI;6BAmDtD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle } from 'react-native';
|
|
3
|
+
import type { TemplateValue } from '../TemplateValue';
|
|
4
|
+
type SwitchProps = {
|
|
5
|
+
value: TemplateValue<unknown>;
|
|
6
|
+
children: React.ReactElement<typeof Case>[];
|
|
7
|
+
style?: ViewStyle;
|
|
8
|
+
};
|
|
9
|
+
export declare function Switch(props: SwitchProps): React.JSX.Element;
|
|
10
|
+
export declare const CaseBase: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
|
|
11
|
+
type CaseProps = React.PropsWithChildren<{
|
|
12
|
+
value: TemplateValue<unknown> | string | boolean | number;
|
|
13
|
+
style?: ViewStyle;
|
|
14
|
+
}>;
|
|
15
|
+
export declare function Case(props: CaseProps): React.JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=Switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/Components/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAItD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9B,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC;IAC5C,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,qBAUxC;AAED,eAAO,MAAM,QAAQ,8EAEnB,CAAC;AAcH,KAAK,SAAS,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACvC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IAC1D,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC,CAAC;AAEH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,qBAEpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WishlistImage.d.ts","sourceRoot":"","sources":["../../../src/Components/WishlistImage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAY,MAAM,cAAc,CAAC;AAG/C,eAAO,MAAM,aAAa,sEAqBxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WishlistText.d.ts","sourceRoot":"","sources":["../../../src/Components/WishlistText.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,eAAO,MAAM,YAAY,qEAUvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WishlistView.d.ts","sourceRoot":"","sources":["../../../src/Components/WishlistView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,eAAO,MAAM,YAAY,qEAAgC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type TemplateCallbackWorklet = (nativeEvent: any, value: any, rootValue: any) => unknown;
|
|
2
|
+
export declare class TemplateCallback {
|
|
3
|
+
worklet: TemplateCallbackWorklet;
|
|
4
|
+
eventName: string | undefined;
|
|
5
|
+
constructor(worklet: TemplateCallbackWorklet, eventName?: string);
|
|
6
|
+
}
|
|
7
|
+
export declare function useTemplateCallback(worklet: (nativeEvent: any, value: any, rootValue: any) => unknown, eventName?: string): TemplateCallback;
|
|
8
|
+
export declare function initEventHandler(): void;
|
|
9
|
+
//# sourceMappingURL=EventHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventHandler.d.ts","sourceRoot":"","sources":["../../src/EventHandler.ts"],"names":[],"mappings":"AAkDA,MAAM,MAAM,uBAAuB,GAAG,CACpC,WAAW,EAAE,GAAG,EAChB,KAAK,EAAE,GAAG,EACV,SAAS,EAAE,GAAG,KACX,OAAO,CAAC;AAEb,qBAAa,gBAAgB;IAC3B,OAAO,EAAE,uBAAuB,CAAC;IACjC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;gBAElB,OAAO,EAAE,uBAAuB,EAAE,SAAS,CAAC,EAAE,MAAM;CAIjE;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,KAAK,OAAO,EAClE,SAAS,CAAC,EAAE,MAAM,oBAKnB;AAED,wBAAgB,gBAAgB,SAE/B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ComponentPool, NativeComponentPool } from './ComponentPool';
|
|
2
|
+
import { TemplateItem } from './TemplateItem';
|
|
3
|
+
import type { TemplateValueUIState } from './TemplateValue';
|
|
4
|
+
export type InflateMethod = (index: number, pool: ComponentPool, previousItem: TemplateItem | null) => [TemplateItem, any] | undefined;
|
|
5
|
+
export type MappingInflateMethod = (value: unknown, templateItem: TemplateItem, pool: ComponentPool, rootValue: unknown) => void;
|
|
6
|
+
export type UIInflatorRegistry = {
|
|
7
|
+
inflateItem: (id: string, index: number, pool: NativeComponentPool, prevItem: TemplateItem | null) => TemplateItem | undefined;
|
|
8
|
+
registerInflator: (id: string, inflateMethod: InflateMethod) => void;
|
|
9
|
+
unregisterInflator: (id: string) => void;
|
|
10
|
+
registerMapping: (inflatorId: string, nativeId: string, templateType: string, inflateMethod: MappingInflateMethod) => void;
|
|
11
|
+
useMappings: (item: TemplateItem, value: unknown, templateType: string, id: string, pool: ComponentPool, rootValue: unknown) => TemplateItem;
|
|
12
|
+
getTemplateValueState: (id: string) => TemplateValueUIState | undefined;
|
|
13
|
+
setTemplateValueState: (id: string, state: TemplateValueUIState) => void;
|
|
14
|
+
deleteTemplateValueState: (id: string) => void;
|
|
15
|
+
getCurrentValue: () => unknown;
|
|
16
|
+
getCurrentRootValue: () => unknown;
|
|
17
|
+
withCurrentValues: (value: unknown, rootValue: unknown, callback: () => void) => void;
|
|
18
|
+
didPushChildren: () => void;
|
|
19
|
+
addPushChildrenCallback: (callback: () => void) => void;
|
|
20
|
+
processProps: (props: any) => any;
|
|
21
|
+
};
|
|
22
|
+
export declare function getUIInflatorRegistry(): UIInflatorRegistry;
|
|
23
|
+
export default class InflatorRepository {
|
|
24
|
+
static register(id: string, inflateMethod: InflateMethod): void;
|
|
25
|
+
static unregister(id: string): void;
|
|
26
|
+
static registerMapping(inflatorId: string, nativeId: string, templateType: string, inflateMethod: MappingInflateMethod): void;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=InflatorRepository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InflatorRepository.d.ts","sourceRoot":"","sources":["../../src/InflatorRepository.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,mBAAmB,EAEpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAG5D,MAAM,MAAM,aAAa,GAAG,CAC1B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,aAAa,EACnB,YAAY,EAAE,YAAY,GAAG,IAAI,KAC9B,CAAC,YAAY,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC;AAErC,MAAM,MAAM,oBAAoB,GAAG,CACjC,KAAK,EAAE,OAAO,EACd,YAAY,EAAE,YAAY,EAC1B,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CAAC;IACxD,YAAY,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;CACnC,CAAC;AAmIF,wBAAgB,qBAAqB,IAAI,kBAAkB,CAI1D;AAED,MAAM,CAAC,OAAO,OAAO,kBAAkB;IACrC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa;IAQxD,MAAM,CAAC,UAAU,CAAC,EAAE,EAAE,MAAM;IAQ5B,MAAM,CAAC,eAAe,CACpB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,oBAAoB;CAatC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface VisibleItem {
|
|
2
|
+
index: number;
|
|
3
|
+
key: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ViewportObserver {
|
|
6
|
+
markItemsDirty: (indices: Array<number>) => void;
|
|
7
|
+
markAllItemsDirty: () => void;
|
|
8
|
+
getAllVisibleItems: () => Array<VisibleItem>;
|
|
9
|
+
updateIndices: (newIndex: number) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function scheduleSyncUp(wishlistId: string): void;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=OrchestratorBinding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrchestratorBinding.d.ts","sourceRoot":"","sources":["../../src/OrchestratorBinding.ts"],"names":[],"mappings":"AAAA,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AACD,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACjD,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,kBAAkB,EAAE,MAAM,KAAK,CAAC,WAAW,CAAC,CAAC;IAC7C,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,QAGhD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
export interface NativeContentContainerProps extends ViewProps {
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeContentContainerProps>;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=NativeContentContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeContentContainer.d.ts","sourceRoot":"","sources":["../../../src/Specs/NativeContentContainer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,2BAA4B,SAAQ,SAAS;CAAG;;AAEjE,wBAGE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
export interface NativeTemplateContainerProps extends ViewProps {
|
|
3
|
+
inflatorId: string;
|
|
4
|
+
wishlistId: string;
|
|
5
|
+
names: string;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeTemplateContainerProps>;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=NativeTemplateContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeTemplateContainer.d.ts","sourceRoot":"","sources":["../../../src/Specs/NativeTemplateContainer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,4BAA6B,SAAQ,SAAS;IAC7D,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;;AAED,wBAGE"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
export interface NativeTemplateInterceptorProps extends ViewProps {
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeTemplateInterceptorProps>;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=NativeTemplateInterceptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeTemplateInterceptor.d.ts","sourceRoot":"","sources":["../../../src/Specs/NativeTemplateInterceptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,8BAA+B,SAAQ,SAAS;CAAG;;AAEpE,wBAEE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { ViewProps } from 'react-native';
|
|
3
|
+
import type { DirectEventHandler, Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
|
+
import { NativeComponentType } from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
5
|
+
export type EventInFile = Readonly<{
|
|
6
|
+
value: Double;
|
|
7
|
+
}>;
|
|
8
|
+
export interface WishlistProps extends ViewProps {
|
|
9
|
+
inflatorId: string;
|
|
10
|
+
initialIndex: Int32;
|
|
11
|
+
onStartReached?: DirectEventHandler<Readonly<{}>>;
|
|
12
|
+
onEndReached?: DirectEventHandler<Readonly<{}>>;
|
|
13
|
+
}
|
|
14
|
+
type NativeType = NativeComponentType<WishlistProps>;
|
|
15
|
+
export type ScrollToItem = (viewRef: React.ElementRef<NativeType>, index: Int32, animated: boolean) => void;
|
|
16
|
+
interface NativeCommands {
|
|
17
|
+
readonly scrollToItem: ScrollToItem;
|
|
18
|
+
}
|
|
19
|
+
export declare const Commands: NativeCommands;
|
|
20
|
+
declare const _default: NativeComponentType<WishlistProps>;
|
|
21
|
+
export default _default;
|
|
22
|
+
//# sourceMappingURL=NativeWishlist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeWishlist.d.ts","sourceRoot":"","sources":["../../../src/Specs/NativeWishlist.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,kBAAkB,EAClB,MAAM,EACN,KAAK,EACN,MAAM,2CAA2C,CAAC;AAEnD,OAA+B,EAC7B,mBAAmB,EACpB,MAAM,yDAAyD,CAAC;AAEjE,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,KAAK,CAAC;IACpB,cAAc,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IAClD,YAAY,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;CACjD;AAED,KAAK,UAAU,GAAG,mBAAmB,CAAC,aAAa,CAAC,CAAC;AAErD,MAAM,MAAM,YAAY,GAAG,CACzB,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,EACrC,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,OAAO,KACd,IAAI,CAAC;AAEV,UAAU,cAAc;IACtB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;CACrC;AAED,eAAO,MAAM,QAAQ,gBAEnB,CAAC;;AAEH,wBAEG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeWishlistManager.d.ts","sourceRoot":"","sources":["../../../src/Specs/NativeWishlistManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhE,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,OAAO,IAAI,OAAO,CAAC;CACpB;;AAED,wBAAyE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const TemplateContext: import("node_modules/@types/react").Context<{
|
|
2
|
+
templateType: string;
|
|
3
|
+
renderChildren?: boolean;
|
|
4
|
+
} | null>;
|
|
5
|
+
export declare function useTemplateContext(): {
|
|
6
|
+
templateType: string;
|
|
7
|
+
renderChildren?: boolean;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=TemplateContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TemplateContext.d.ts","sourceRoot":"","sources":["../../src/TemplateContext.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;kBACZ,MAAM;qBACH,OAAO;SACX,CAAC;AAEhB,wBAAgB,kBAAkB;kBAJlB,MAAM;qBACH,OAAO;EASzB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type TemplateItem = {
|
|
2
|
+
[key: string]: TemplateItem | undefined;
|
|
3
|
+
} & {
|
|
4
|
+
key: string;
|
|
5
|
+
type: string;
|
|
6
|
+
getByWishId: (id: string) => TemplateItem | undefined;
|
|
7
|
+
addProps: (props: any) => void;
|
|
8
|
+
setCallback: (eventName: string, callback: (nativeEvent: any) => void) => void;
|
|
9
|
+
describe: () => string;
|
|
10
|
+
setChildren: (children: TemplateItem[]) => void;
|
|
11
|
+
getTag: () => number;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=TemplateItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TemplateItem.d.ts","sourceRoot":"","sources":["../../src/TemplateItem.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAAC;CACzC,GAAG;IACF,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS,CAAC;IACtD,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,WAAW,EAAE,CACX,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,CAAC,WAAW,EAAE,GAAG,KAAK,IAAI,KACjC,IAAI,CAAC;IACV,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,WAAW,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAChD,MAAM,EAAE,MAAM,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type TemplateValueMapper<ItemT, ValueT> = (item: ItemT, rootValue: any) => ValueT;
|
|
2
|
+
export type TemplateValueUIState = {
|
|
3
|
+
current: any;
|
|
4
|
+
dirty: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type TemplateValue<ValueT> = {
|
|
7
|
+
value: () => ValueT;
|
|
8
|
+
};
|
|
9
|
+
export type TemplateValueInternal<ValueT> = TemplateValue<ValueT> & {
|
|
10
|
+
__isTemplateValue: boolean;
|
|
11
|
+
__remove: () => void;
|
|
12
|
+
};
|
|
13
|
+
export declare function createTemplateValue<ValueT>(mapper: TemplateValueMapper<any, ValueT>): TemplateValueInternal<ValueT>;
|
|
14
|
+
export declare function isTemplateValue(value: unknown): value is TemplateValueInternal<any>;
|
|
15
|
+
export declare function useTemplateValue<ItemT, ValueT>(mapper: TemplateValueMapper<ItemT, ValueT>): TemplateValue<ValueT>;
|
|
16
|
+
//# sourceMappingURL=TemplateValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TemplateValue.d.ts","sourceRoot":"","sources":["../../src/TemplateValue.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,mBAAmB,CAAC,KAAK,EAAE,MAAM,IAAI,CAC/C,IAAI,EAAE,KAAK,EACX,SAAS,EAAE,GAAG,KACX,MAAM,CAAC;AAIZ,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,GAAG,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,MAAM,IAAI;IAClC,KAAK,EAAE,MAAM,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,CAAC,GAAG;IAClE,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,MAAM,EACxC,MAAM,EAAE,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,GACvC,qBAAqB,CAAC,MAAM,CAAC,CAgD/B;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,qBAAqB,CAAC,GAAG,CAAC,CAMrC;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAC5C,MAAM,EAAE,mBAAmB,CAAC,KAAK,EAAE,MAAM,CAAC,GACzC,aAAa,CAAC,MAAM,CAAC,CAUvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../../src/Utils.ts"],"names":[],"mappings":"AAIA,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,wBAAgB,cAAc,IAAI,MAAM,CAMvC"}
|