@ohos-ports/react-native-navigation 8.9.0-beta.11 → 8.9.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -11
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/statusbar/StatusBarPresenter.kt +212 -0
- package/lib/module/ARCHITECTURE.md +331 -0
- package/lib/module/Mock/Application.js +33 -0
- package/lib/module/Mock/Application.js.map +1 -0
- package/lib/module/Mock/ComponentProps.js +4 -0
- package/lib/module/Mock/ComponentProps.js.map +1 -0
- package/lib/module/Mock/Components/BottomTabs.js +16 -0
- package/lib/module/Mock/Components/BottomTabs.js.map +1 -0
- package/lib/module/Mock/Components/ComponentScreen.js +101 -0
- package/lib/module/Mock/Components/ComponentScreen.js.map +1 -0
- package/lib/module/Mock/Components/LayoutComponent.js +50 -0
- package/lib/module/Mock/Components/LayoutComponent.js.map +1 -0
- package/lib/module/Mock/Components/Modals.js +22 -0
- package/lib/module/Mock/Components/Modals.js.map +1 -0
- package/lib/module/Mock/Components/NavigationButton.js +72 -0
- package/lib/module/Mock/Components/NavigationButton.js.map +1 -0
- package/lib/module/Mock/Components/Overlays.js +23 -0
- package/lib/module/Mock/Components/Overlays.js.map +1 -0
- package/lib/module/Mock/Components/SideMenu.js +29 -0
- package/lib/module/Mock/Components/SideMenu.js.map +1 -0
- package/lib/module/Mock/Components/Stack.js +18 -0
- package/lib/module/Mock/Components/Stack.js.map +1 -0
- package/lib/module/Mock/Components/TopBar.js +81 -0
- package/lib/module/Mock/Components/TopBar.js.map +1 -0
- package/lib/module/Mock/Layouts/BottomTabsNode.js +30 -0
- package/lib/module/Mock/Layouts/BottomTabsNode.js.map +1 -0
- package/lib/module/Mock/Layouts/ComponentNode.js +102 -0
- package/lib/module/Mock/Layouts/ComponentNode.js.map +1 -0
- package/lib/module/Mock/Layouts/LayoutNodeFactory.js +28 -0
- package/lib/module/Mock/Layouts/LayoutNodeFactory.js.map +1 -0
- package/lib/module/Mock/Layouts/Node.js +14 -0
- package/lib/module/Mock/Layouts/Node.js.map +1 -0
- package/lib/module/Mock/Layouts/ParentNode.js +66 -0
- package/lib/module/Mock/Layouts/ParentNode.js.map +1 -0
- package/lib/module/Mock/Layouts/SideMenu.js +72 -0
- package/lib/module/Mock/Layouts/SideMenu.js.map +1 -0
- package/lib/module/Mock/Layouts/StackNode.js +12 -0
- package/lib/module/Mock/Layouts/StackNode.js.map +1 -0
- package/lib/module/Mock/Stores/EventsStore.js +53 -0
- package/lib/module/Mock/Stores/EventsStore.js.map +1 -0
- package/lib/{cjs → module}/Mock/Stores/LayoutStore.js +24 -56
- package/lib/module/Mock/Stores/LayoutStore.js.map +1 -0
- package/lib/module/Mock/actions/layoutActions.js +19 -0
- package/lib/module/Mock/actions/layoutActions.js.map +1 -0
- package/lib/module/Mock/connect.js +8 -0
- package/lib/module/Mock/connect.js.map +1 -0
- package/lib/module/Mock/constants.js +5 -0
- package/lib/module/Mock/constants.js.map +1 -0
- package/lib/module/Mock/index.js +20 -0
- package/lib/module/Mock/index.js.map +1 -0
- package/lib/module/Mock/mocks/AppRegistryService.js +6 -0
- package/lib/module/Mock/mocks/AppRegistryService.js.map +1 -0
- package/lib/module/Mock/mocks/NativeCommandsSender.js +146 -0
- package/lib/module/Mock/mocks/NativeCommandsSender.js.map +1 -0
- package/lib/module/Mock/mocks/NativeEventsReceiver.js +103 -0
- package/lib/module/Mock/mocks/NativeEventsReceiver.js.map +1 -0
- package/lib/module/Navigation.js +250 -0
- package/lib/module/Navigation.js.map +1 -0
- package/lib/{cjs → module}/NavigationDelegate.js +34 -33
- package/lib/module/NavigationDelegate.js.map +1 -0
- package/lib/module/adapters/AndroidCustomRowForwarder.js +75 -0
- package/lib/module/adapters/AndroidCustomRowForwarder.js.map +1 -0
- package/lib/module/adapters/AppRegistryService.js +9 -0
- package/lib/module/adapters/AppRegistryService.js.map +1 -0
- package/lib/module/adapters/AssetResolver.js +9 -0
- package/lib/module/adapters/AssetResolver.js.map +1 -0
- package/lib/module/adapters/ColorService.js +9 -0
- package/lib/module/adapters/ColorService.js.map +1 -0
- package/lib/module/adapters/Constants.js +19 -0
- package/lib/module/adapters/Constants.js.map +1 -0
- package/lib/{cjs → module}/adapters/NativeCommandsSender.js +5 -39
- package/lib/module/adapters/NativeCommandsSender.js.map +1 -0
- package/lib/module/adapters/NativeEventsReceiver.js +65 -0
- package/lib/module/adapters/NativeEventsReceiver.js.map +1 -0
- package/lib/module/adapters/NativeEventsReceiver.mock.js +6 -0
- package/lib/module/adapters/NativeEventsReceiver.mock.js.map +1 -0
- package/lib/module/adapters/NativeRNNTurboEventEmitter.js +7 -0
- package/lib/module/adapters/NativeRNNTurboEventEmitter.js.map +1 -0
- package/lib/module/adapters/NativeRNNTurboModule.js +6 -0
- package/lib/module/adapters/NativeRNNTurboModule.js.map +1 -0
- package/lib/module/adapters/TouchablePreview.js +115 -0
- package/lib/module/adapters/TouchablePreview.js.map +1 -0
- package/lib/module/adapters/UniqueIdProvider.js +9 -0
- package/lib/module/adapters/UniqueIdProvider.js.map +1 -0
- package/lib/module/commands/Commands.js +241 -0
- package/lib/module/commands/Commands.js.map +1 -0
- package/lib/module/commands/Commands.test.js +759 -0
- package/lib/module/commands/Commands.test.js.map +1 -0
- package/lib/module/commands/Deprecations.js +66 -0
- package/lib/module/commands/Deprecations.js.map +1 -0
- package/lib/module/commands/LayoutTreeCrawler.js +32 -0
- package/lib/module/commands/LayoutTreeCrawler.js.map +1 -0
- package/lib/module/commands/LayoutTreeCrawler.test.js +82 -0
- package/lib/module/commands/LayoutTreeCrawler.test.js.map +1 -0
- package/lib/module/commands/LayoutTreeParser.js +130 -0
- package/lib/module/commands/LayoutTreeParser.js.map +1 -0
- package/lib/module/commands/LayoutTreeParser.test.js +359 -0
- package/lib/module/commands/LayoutTreeParser.test.js.map +1 -0
- package/lib/module/commands/LayoutType.js +16 -0
- package/lib/module/commands/LayoutType.js.map +1 -0
- package/lib/module/commands/LayoutType.test.js +12 -0
- package/lib/module/commands/LayoutType.test.js.map +1 -0
- package/lib/module/commands/OptionsCrawler.js +72 -0
- package/lib/module/commands/OptionsCrawler.js.map +1 -0
- package/lib/module/commands/OptionsCrawler.test.js +351 -0
- package/lib/module/commands/OptionsCrawler.test.js.map +1 -0
- package/lib/{cjs → module}/commands/OptionsProcessor.js +67 -102
- package/lib/module/commands/OptionsProcessor.js.map +1 -0
- package/lib/module/commands/OptionsProcessor.test.js +1234 -0
- package/lib/module/commands/OptionsProcessor.test.js.map +1 -0
- package/lib/{cjs → module}/components/ComponentRegistry.js +3 -27
- package/lib/module/components/ComponentRegistry.js.map +1 -0
- package/lib/module/components/ComponentRegistry.test.js +57 -0
- package/lib/module/components/ComponentRegistry.test.js.map +1 -0
- package/lib/module/components/ComponentWrapper.js +80 -0
- package/lib/module/components/ComponentWrapper.js.map +1 -0
- package/lib/module/components/ComponentWrapper.test.js +333 -0
- package/lib/module/components/ComponentWrapper.test.js.map +1 -0
- package/lib/module/components/Modal.js +125 -0
- package/lib/module/components/Modal.js.map +1 -0
- package/lib/{cjs → module}/components/Store.js +3 -27
- package/lib/module/components/Store.js.map +1 -0
- package/lib/module/components/Store.test.js +148 -0
- package/lib/module/components/Store.test.js.map +1 -0
- package/lib/module/events/CommandsObserver.js +19 -0
- package/lib/module/events/CommandsObserver.js.map +1 -0
- package/lib/module/events/CommandsObserver.test.js +43 -0
- package/lib/module/events/CommandsObserver.test.js.map +1 -0
- package/lib/module/events/ComponentEventsObserver.js +94 -0
- package/lib/module/events/ComponentEventsObserver.js.map +1 -0
- package/lib/module/events/ComponentEventsObserver.test.js +391 -0
- package/lib/module/events/ComponentEventsObserver.test.js.map +1 -0
- package/lib/{cjs → module}/events/EventsRegistry.js +3 -27
- package/lib/module/events/EventsRegistry.js.map +1 -0
- package/lib/module/events/EventsRegistry.test.js +131 -0
- package/lib/module/events/EventsRegistry.test.js.map +1 -0
- package/lib/module/index.js +22 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/interfaces/CommandName.js +22 -0
- package/lib/module/interfaces/CommandName.js.map +1 -0
- package/lib/module/interfaces/ComponentEvents.js +2 -0
- package/lib/module/interfaces/ComponentEvents.js.map +1 -0
- package/lib/module/interfaces/EventSubscription.js +2 -0
- package/lib/module/interfaces/EventSubscription.js.map +1 -0
- package/lib/module/interfaces/Events.js +2 -0
- package/lib/module/interfaces/Events.js.map +1 -0
- package/lib/module/interfaces/Layout.js +4 -0
- package/lib/module/interfaces/Layout.js.map +1 -0
- package/lib/module/interfaces/NavigationComponent.js +21 -0
- package/lib/module/interfaces/NavigationComponent.js.map +1 -0
- package/lib/module/interfaces/NavigationComponentListener.js +4 -0
- package/lib/module/interfaces/NavigationComponentListener.js.map +1 -0
- package/lib/module/interfaces/NavigationComponentProps.js +2 -0
- package/lib/module/interfaces/NavigationComponentProps.js.map +1 -0
- package/lib/module/interfaces/NavigationFunctionComponent.js +4 -0
- package/lib/module/interfaces/NavigationFunctionComponent.js.map +1 -0
- package/lib/module/interfaces/Options.js +47 -0
- package/lib/module/interfaces/Options.js.map +1 -0
- package/lib/module/interfaces/ProcessorSubscription.js +2 -0
- package/lib/module/interfaces/ProcessorSubscription.js.map +1 -0
- package/lib/module/interfaces/Processors.js +4 -0
- package/lib/module/interfaces/Processors.js.map +1 -0
- package/lib/module/linking/DeferredLinkQueue.js +52 -0
- package/lib/module/linking/DeferredLinkQueue.js.map +1 -0
- package/lib/module/linking/DeferredLinkQueue.test.js +54 -0
- package/lib/module/linking/DeferredLinkQueue.test.js.map +1 -0
- package/lib/{cjs → module}/linking/LinkingHandler.js +43 -40
- package/lib/module/linking/LinkingHandler.js.map +1 -0
- package/lib/module/linking/LinkingHandler.test.js +384 -0
- package/lib/module/linking/LinkingHandler.test.js.map +1 -0
- package/lib/module/linking/ModalLayoutBuilder.js +56 -0
- package/lib/module/linking/ModalLayoutBuilder.js.map +1 -0
- package/lib/module/linking/ModalLayoutBuilder.test.js +154 -0
- package/lib/module/linking/ModalLayoutBuilder.test.js.map +1 -0
- package/lib/{cjs → module}/linking/RouteMatcher.js +15 -31
- package/lib/module/linking/RouteMatcher.js.map +1 -0
- package/lib/module/linking/RouteMatcher.test.js +164 -0
- package/lib/module/linking/RouteMatcher.test.js.map +1 -0
- package/lib/module/linking/URLParser.js +56 -0
- package/lib/module/linking/URLParser.js.map +1 -0
- package/lib/module/linking/URLParser.test.js +100 -0
- package/lib/module/linking/URLParser.test.js.map +1 -0
- package/lib/module/linking/types.js +4 -0
- package/lib/module/linking/types.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/processors/LayoutProcessor.js +15 -0
- package/lib/module/processors/LayoutProcessor.js.map +1 -0
- package/lib/module/processors/LayoutProcessor.test.js +53 -0
- package/lib/module/processors/LayoutProcessor.test.js.map +1 -0
- package/lib/module/processors/LayoutProcessorsStore.js +18 -0
- package/lib/module/processors/LayoutProcessorsStore.js.map +1 -0
- package/lib/module/processors/LayoutProcessorsStore.test.js +31 -0
- package/lib/module/processors/LayoutProcessorsStore.test.js.map +1 -0
- package/lib/module/processors/OptionProcessorsStore.js +19 -0
- package/lib/module/processors/OptionProcessorsStore.js.map +1 -0
- package/lib/module/processors/OptionProcessorsStore.test.js +31 -0
- package/lib/module/processors/OptionProcessorsStore.test.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/package.json +7 -12
- package/lib/cjs/Mock/Application.js +0 -67
- package/lib/cjs/Mock/ComponentProps.js +0 -16
- package/lib/cjs/Mock/Components/BottomTabs.js +0 -50
- package/lib/cjs/Mock/Components/ComponentScreen.js +0 -135
- package/lib/cjs/Mock/Components/LayoutComponent.js +0 -85
- package/lib/cjs/Mock/Components/Modals.js +0 -56
- package/lib/cjs/Mock/Components/NavigationButton.js +0 -104
- package/lib/cjs/Mock/Components/Overlays.js +0 -57
- package/lib/cjs/Mock/Components/SideMenu.js +0 -69
- package/lib/cjs/Mock/Components/Stack.js +0 -52
- package/lib/cjs/Mock/Components/TopBar.js +0 -115
- package/lib/cjs/Mock/Layouts/BottomTabsNode.js +0 -60
- package/lib/cjs/Mock/Layouts/ComponentNode.js +0 -132
- package/lib/cjs/Mock/Layouts/LayoutNodeFactory.js +0 -59
- package/lib/cjs/Mock/Layouts/Node.js +0 -32
- package/lib/cjs/Mock/Layouts/ParentNode.js +0 -99
- package/lib/cjs/Mock/Layouts/SideMenu.js +0 -112
- package/lib/cjs/Mock/Layouts/StackNode.js +0 -42
- package/lib/cjs/Mock/Stores/EventsStore.js +0 -85
- package/lib/cjs/Mock/actions/layoutActions.js +0 -47
- package/lib/cjs/Mock/connect.js +0 -31
- package/lib/cjs/Mock/constants.js +0 -31
- package/lib/cjs/Mock/index.js +0 -48
- package/lib/cjs/Mock/mocks/AppRegistryService.js +0 -31
- package/lib/cjs/Mock/mocks/NativeCommandsSender.js +0 -181
- package/lib/cjs/Mock/mocks/NativeEventsReceiver.js +0 -146
- package/lib/cjs/Navigation.js +0 -259
- package/lib/cjs/adapters/AndroidCustomRowForwarder.js +0 -84
- package/lib/cjs/adapters/AppRegistryService.js +0 -33
- package/lib/cjs/adapters/AssetResolver.js +0 -33
- package/lib/cjs/adapters/ColorService.js +0 -33
- package/lib/cjs/adapters/Constants.js +0 -43
- package/lib/cjs/adapters/NativeEventsReceiver.js +0 -99
- package/lib/cjs/adapters/NativeEventsReceiver.mock.js +0 -30
- package/lib/cjs/adapters/NativeRNNTurboEventEmitter.js +0 -27
- package/lib/cjs/adapters/NativeRNNTurboModule.js +0 -26
- package/lib/cjs/adapters/TouchablePreview.js +0 -137
- package/lib/cjs/adapters/UniqueIdProvider.js +0 -43
- package/lib/cjs/commands/Commands.js +0 -276
- package/lib/cjs/commands/Deprecations.js +0 -101
- package/lib/cjs/commands/LayoutTreeCrawler.js +0 -56
- package/lib/cjs/commands/LayoutTreeParser.js +0 -154
- package/lib/cjs/commands/LayoutType.js +0 -40
- package/lib/cjs/commands/OptionsCrawler.js +0 -106
- package/lib/cjs/components/ComponentWrapper.js +0 -114
- package/lib/cjs/components/Modal.js +0 -159
- package/lib/cjs/events/CommandsObserver.js +0 -43
- package/lib/cjs/events/ComponentEventsObserver.js +0 -128
- package/lib/cjs/index.js +0 -63
- package/lib/cjs/interfaces/CommandName.js +0 -46
- package/lib/cjs/interfaces/ComponentEvents.js +0 -1
- package/lib/cjs/interfaces/EventSubscription.js +0 -1
- package/lib/cjs/interfaces/Events.js +0 -1
- package/lib/cjs/interfaces/Layout.js +0 -16
- package/lib/cjs/interfaces/NavigationComponent.js +0 -62
- package/lib/cjs/interfaces/NavigationComponentListener.js +0 -16
- package/lib/cjs/interfaces/NavigationComponentProps.js +0 -1
- package/lib/cjs/interfaces/NavigationFunctionComponent.js +0 -16
- package/lib/cjs/interfaces/Options.js +0 -47
- package/lib/cjs/interfaces/ProcessorSubscription.js +0 -1
- package/lib/cjs/interfaces/Processors.js +0 -16
- package/lib/cjs/linking/DeferredLinkQueue.js +0 -66
- package/lib/cjs/linking/ModalLayoutBuilder.js +0 -59
- package/lib/cjs/linking/URLParser.js +0 -70
- package/lib/cjs/linking/types.js +0 -16
- package/lib/cjs/processors/LayoutProcessor.js +0 -39
- package/lib/cjs/processors/LayoutProcessorsStore.js +0 -42
- package/lib/cjs/processors/OptionProcessorsStore.js +0 -43
- package/lib/cjs/types.js +0 -1
- package/postinstall.js +0 -53
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["OptionProcessorsStore","describe","uut","beforeEach","it","processor","value","_commandName","addProcessor","expect","getProcessors","toEqual","secondProcessor","remove"],"sourceRoot":"../../../src","sources":["processors/OptionProcessorsStore.test.ts"],"mappings":";;AAAA,SAASA,qBAAqB,QAAQ,4BAAyB;AAE/DC,QAAQ,CAAC,yBAAyB,EAAE,MAAM;EACxC,IAAIC,GAA0B;EAC9BC,UAAU,CAAC,MAAM;IACfD,GAAG,GAAG,IAAIF,qBAAqB,CAAC,CAAC;EACnC,CAAC,CAAC;EAEFI,EAAE,CAAC,oCAAoC,EAAE,MAAM;IAC7C,MAAMC,SAAS,GAAGA,CAACC,KAAU,EAAEC,YAAoB,KAAKD,KAAK;IAC7DJ,GAAG,CAACM,YAAY,CAAC,QAAQ,EAAEH,SAAS,CAAC;IACrCI,MAAM,CAACP,GAAG,CAACQ,aAAa,CAAC,QAAQ,CAAC,CAAC,CAACC,OAAO,CAAC,CAACN,SAAS,CAAC,CAAC;EAC1D,CAAC,CAAC;EAEFD,EAAE,CAAC,+DAA+D,EAAE,MAAM;IACxE,MAAMC,SAAS,GAAGA,CAACC,KAAU,EAAEC,YAAoB,KAAKD,KAAK;IAC7D,MAAMM,eAAe,GAAGA,CAACN,KAAU,EAAEC,YAAoB,KAAKD,KAAK;IACnEJ,GAAG,CAACM,YAAY,CAAC,QAAQ,EAAEH,SAAS,CAAC;IACrCH,GAAG,CAACM,YAAY,CAAC,QAAQ,EAAEI,eAAe,CAAC;IAC3CH,MAAM,CAACP,GAAG,CAACQ,aAAa,CAAC,QAAQ,CAAC,CAAC,CAACC,OAAO,CAAC,CAACN,SAAS,EAAEO,eAAe,CAAC,CAAC;EAC3E,CAAC,CAAC;EAEFR,EAAE,CAAC,6BAA6B,EAAE,MAAM;IACtC,MAAMC,SAAS,GAAGA,CAACC,KAAU,EAAEC,YAAoB,KAAKD,KAAK;IAC7D,MAAM;MAAEO;IAAO,CAAC,GAAGX,GAAG,CAACM,YAAY,CAAC,QAAQ,EAAEH,SAAS,CAAC;IACxDI,MAAM,CAACP,GAAG,CAACQ,aAAa,CAAC,QAAQ,CAAC,CAAC,CAACC,OAAO,CAAC,CAACN,SAAS,CAAC,CAAC;IACxDQ,MAAM,CAAC,CAAC;IACRJ,MAAM,CAACP,GAAG,CAACQ,aAAa,CAAC,QAAQ,CAAC,CAAC,CAACC,OAAO,CAAC,EAAE,CAAC;EACjD,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ohos-ports/react-native-navigation",
|
|
3
|
-
"version": "8.9.0-beta.
|
|
3
|
+
"version": "8.9.0-beta.2",
|
|
4
4
|
"description": "React Native Navigation - truly native navigation for iOS and Android (HarmonyOS port)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -15,30 +15,27 @@
|
|
|
15
15
|
"url": "https://github.com/ohos-ports/ohos-ports.git",
|
|
16
16
|
"directory": "ports/react-native-navigation/8.9.0"
|
|
17
17
|
},
|
|
18
|
-
"main": "./lib/
|
|
18
|
+
"main": "./lib/module/index.js",
|
|
19
19
|
"types": "./lib/typescript/index.d.ts",
|
|
20
20
|
"exports": {
|
|
21
21
|
".": {
|
|
22
22
|
"types": "./lib/typescript/index.d.ts",
|
|
23
|
-
"default": "./lib/
|
|
23
|
+
"default": "./lib/module/index.js"
|
|
24
24
|
},
|
|
25
25
|
"./Mock": {
|
|
26
26
|
"types": "./lib/typescript/Mock/index.d.ts",
|
|
27
|
-
"default": "./lib/
|
|
27
|
+
"default": "./lib/module/Mock/index.js"
|
|
28
28
|
},
|
|
29
29
|
"./package.json": "./package.json"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"lib",
|
|
33
|
-
"postinstall.js",
|
|
34
33
|
"README.md",
|
|
35
34
|
"LICENSE"
|
|
36
35
|
],
|
|
37
|
-
"scripts": {
|
|
38
|
-
"postinstall": "node postinstall.js"
|
|
39
|
-
},
|
|
40
36
|
"peerDependencies": {
|
|
41
|
-
"react": "*"
|
|
37
|
+
"react": "*",
|
|
38
|
+
"@ohos-ports/react-native": "^0.87.1-beta.1"
|
|
42
39
|
},
|
|
43
40
|
"peerDependenciesMeta": {
|
|
44
41
|
"@ohos-ports/remx": {
|
|
@@ -50,8 +47,6 @@
|
|
|
50
47
|
"lodash": "4.18.1",
|
|
51
48
|
"prop-types": "15.x.x",
|
|
52
49
|
"react-lifecycles-compat": "^3.0.4",
|
|
53
|
-
"tslib": "1.9.3"
|
|
54
|
-
"@ohos-ports/react-native": "^0.87.1-beta.2",
|
|
55
|
-
"react-native": "npm:@ohos-ports/react-native@^0.87.1-beta.2"
|
|
50
|
+
"tslib": "1.9.3"
|
|
56
51
|
}
|
|
57
52
|
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var Application_exports = {};
|
|
30
|
-
__export(Application_exports, {
|
|
31
|
-
Application: () => Application
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(Application_exports);
|
|
34
|
-
var React = __toESM(require("react"), 1);
|
|
35
|
-
var import_react_native = require("@ohos-ports/react-native");
|
|
36
|
-
var import_connect = require("./connect.js");
|
|
37
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
|
-
const Application = (0, import_connect.connect)(class extends React.Component {
|
|
39
|
-
constructor(props) {
|
|
40
|
-
super(props);
|
|
41
|
-
props.entryPoint();
|
|
42
|
-
}
|
|
43
|
-
render() {
|
|
44
|
-
const {
|
|
45
|
-
LayoutComponent
|
|
46
|
-
} = require("./Components/LayoutComponent");
|
|
47
|
-
const {
|
|
48
|
-
LayoutStore
|
|
49
|
-
} = require("./Stores/LayoutStore");
|
|
50
|
-
const {
|
|
51
|
-
Modals
|
|
52
|
-
} = require("./Components/Modals");
|
|
53
|
-
const {
|
|
54
|
-
Overlays
|
|
55
|
-
} = require("./Components/Overlays");
|
|
56
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native.View, {
|
|
57
|
-
testID: "Application",
|
|
58
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(LayoutComponent, {
|
|
59
|
-
layoutNode: LayoutStore.getLayout()
|
|
60
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Modals, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Overlays, {})]
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
65
|
-
0 && (module.exports = {
|
|
66
|
-
Application
|
|
67
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var ComponentProps_exports = {};
|
|
16
|
-
module.exports = __toCommonJS(ComponentProps_exports);
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var BottomTabs_exports = {};
|
|
30
|
-
__export(BottomTabs_exports, {
|
|
31
|
-
BottomTabs: () => BottomTabs
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(BottomTabs_exports);
|
|
34
|
-
var import_react = __toESM(require("react"), 1);
|
|
35
|
-
var import_LayoutComponent = require("./LayoutComponent.js");
|
|
36
|
-
var import_connect = require("../connect.js");
|
|
37
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
|
-
const BottomTabs = (0, import_connect.connect)(class extends import_react.Component {
|
|
39
|
-
render() {
|
|
40
|
-
return this.props.layoutNode.children.map((child) => {
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_LayoutComponent.LayoutComponent, {
|
|
42
|
-
layoutNode: child
|
|
43
|
-
}, child.nodeId);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
-
0 && (module.exports = {
|
|
49
|
-
BottomTabs
|
|
50
|
-
});
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var ComponentScreen_exports = {};
|
|
30
|
-
__export(ComponentScreen_exports, {
|
|
31
|
-
ComponentScreen: () => ComponentScreen
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(ComponentScreen_exports);
|
|
34
|
-
var import_react = __toESM(require("react"), 1);
|
|
35
|
-
var import_react_native = require("@ohos-ports/react-native");
|
|
36
|
-
var import_react_native_navigation = require("react-native-navigation");
|
|
37
|
-
var import_constants = require("../constants.js");
|
|
38
|
-
var import_LayoutStore = require("../Stores/LayoutStore.js");
|
|
39
|
-
var import_connect = require("../connect.js");
|
|
40
|
-
var import_TopBar = require("./TopBar.js");
|
|
41
|
-
var import_EventsStore = require("../Stores/EventsStore.js");
|
|
42
|
-
var import_lodash = __toESM(require("lodash"), 1);
|
|
43
|
-
var import_layoutActions = require("../actions/layoutActions.js");
|
|
44
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
|
-
function isURISource(src) {
|
|
46
|
-
return !!src && typeof src === "object" && "uri" in src;
|
|
47
|
-
}
|
|
48
|
-
const ComponentScreen = (0, import_connect.connect)(class extends import_react.Component {
|
|
49
|
-
constructor(props) {
|
|
50
|
-
super(props);
|
|
51
|
-
}
|
|
52
|
-
componentDidMount() {
|
|
53
|
-
this.props.layoutNode.componentDidMount();
|
|
54
|
-
}
|
|
55
|
-
isVisible() {
|
|
56
|
-
const isVisible = import_LayoutStore.LayoutStore.isVisibleLayout(this.props.layoutNode);
|
|
57
|
-
return isVisible;
|
|
58
|
-
}
|
|
59
|
-
renderTabBar() {
|
|
60
|
-
const bottomTabs = this.props.layoutNode.getBottomTabs();
|
|
61
|
-
if (!bottomTabs) return null;
|
|
62
|
-
const bottomTabsOptions = bottomTabs.resolveOptions().bottomTabs;
|
|
63
|
-
if (bottomTabsOptions?.visible === false) return null;
|
|
64
|
-
const buttons = bottomTabs.children.map((child, i) => {
|
|
65
|
-
const bottomTabOptions = child.resolveOptions().bottomTab;
|
|
66
|
-
const icon = bottomTabs.selectedIndex === i ? bottomTabOptions?.selectedIcon : bottomTabOptions?.icon;
|
|
67
|
-
const iconURI = isURISource(icon) ? icon.uri : void 0;
|
|
68
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.View, {
|
|
69
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.TouchableOpacity, {
|
|
70
|
-
style: {
|
|
71
|
-
padding: 10
|
|
72
|
-
},
|
|
73
|
-
testID: bottomTabOptions?.testID,
|
|
74
|
-
onPress: () => {
|
|
75
|
-
import_EventsStore.events.invokeBottomTabPressed({
|
|
76
|
-
tabIndex: i
|
|
77
|
-
});
|
|
78
|
-
if (import_lodash.default.defaultTo(bottomTabOptions?.selectTabOnPress, true)) (0, import_layoutActions.switchTabByIndex)(this.props.layoutNode.getBottomTabs(), i);
|
|
79
|
-
},
|
|
80
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native.View, {
|
|
81
|
-
style: {
|
|
82
|
-
justifyContent: "center",
|
|
83
|
-
alignItems: "center"
|
|
84
|
-
},
|
|
85
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, {
|
|
86
|
-
children: bottomTabOptions?.badge
|
|
87
|
-
}), iconURI && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Image, {
|
|
88
|
-
style: {
|
|
89
|
-
width: 18,
|
|
90
|
-
height: 18,
|
|
91
|
-
marginBottom: 5
|
|
92
|
-
},
|
|
93
|
-
source: {
|
|
94
|
-
uri: iconURI
|
|
95
|
-
}
|
|
96
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, {
|
|
97
|
-
style: {
|
|
98
|
-
fontSize: 12
|
|
99
|
-
},
|
|
100
|
-
children: bottomTabOptions?.text || ""
|
|
101
|
-
})]
|
|
102
|
-
})
|
|
103
|
-
})
|
|
104
|
-
}, `tab-${i}`);
|
|
105
|
-
});
|
|
106
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.View, {
|
|
107
|
-
testID: bottomTabsOptions?.testID,
|
|
108
|
-
style: {
|
|
109
|
-
flexDirection: "row",
|
|
110
|
-
justifyContent: "center",
|
|
111
|
-
width: "100%",
|
|
112
|
-
backgroundColor: "#F0F2F5"
|
|
113
|
-
},
|
|
114
|
-
children: buttons
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
render() {
|
|
118
|
-
const Component2 = import_react_native_navigation.Navigation.mock.store.getWrappedComponent(this.props.layoutNode.data.name);
|
|
119
|
-
if (!Component2) throw new Error(`${this.props.layoutNode.data.name} has not been registered.`);
|
|
120
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native.View, {
|
|
121
|
-
testID: this.isVisible() ? import_constants.VISIBLE_SCREEN_TEST_ID : void 0,
|
|
122
|
-
children: [this.props.layoutNode.getStack() && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TopBar.TopBar, {
|
|
123
|
-
layoutNode: this.props.layoutNode,
|
|
124
|
-
topBarOptions: this.props.layoutNode.resolveOptions().topBar,
|
|
125
|
-
backButtonOptions: this.props.layoutNode.resolveOptions().topBar?.backButton
|
|
126
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component2, {
|
|
127
|
-
componentId: this.props.layoutNode.nodeId
|
|
128
|
-
}), this.renderTabBar()]
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
133
|
-
0 && (module.exports = {
|
|
134
|
-
ComponentScreen
|
|
135
|
-
});
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var LayoutComponent_exports = {};
|
|
30
|
-
__export(LayoutComponent_exports, {
|
|
31
|
-
LayoutComponent: () => LayoutComponent
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(LayoutComponent_exports);
|
|
34
|
-
var import_react = __toESM(require("react"), 1);
|
|
35
|
-
var import_react_native = require("@ohos-ports/react-native");
|
|
36
|
-
var import_BottomTabs = require("./BottomTabs.js");
|
|
37
|
-
var import_ComponentScreen = require("./ComponentScreen.js");
|
|
38
|
-
var import_Stack = require("./Stack.js");
|
|
39
|
-
var import_SideMenu = require("./SideMenu.js");
|
|
40
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
|
-
const LayoutComponent = class extends import_react.Component {
|
|
42
|
-
render() {
|
|
43
|
-
switch (this.props.layoutNode.type) {
|
|
44
|
-
case "BottomTabs":
|
|
45
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_BottomTabs.BottomTabs, {
|
|
46
|
-
layoutNode: this.props.layoutNode
|
|
47
|
-
});
|
|
48
|
-
case "Stack":
|
|
49
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Stack.Stack, {
|
|
50
|
-
layoutNode: this.props.layoutNode
|
|
51
|
-
});
|
|
52
|
-
case "Component":
|
|
53
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentScreen.ComponentScreen, {
|
|
54
|
-
layoutNode: this.props.layoutNode
|
|
55
|
-
});
|
|
56
|
-
case "SideMenuRoot":
|
|
57
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SideMenu.SideMenuRoot, {
|
|
58
|
-
layoutNode: this.props.layoutNode
|
|
59
|
-
});
|
|
60
|
-
case "SideMenuLeft":
|
|
61
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SideMenu.SideMenuLeft, {
|
|
62
|
-
layoutNode: this.props.layoutNode
|
|
63
|
-
});
|
|
64
|
-
case "SideMenuCenter":
|
|
65
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SideMenu.SideMenuCenter, {
|
|
66
|
-
layoutNode: this.props.layoutNode
|
|
67
|
-
});
|
|
68
|
-
case "SideMenuRight":
|
|
69
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SideMenu.SideMenuRight, {
|
|
70
|
-
layoutNode: this.props.layoutNode
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.View, {});
|
|
74
|
-
}
|
|
75
|
-
componentDidCatch(error, errorInfo) {
|
|
76
|
-
const err = new Error(`Error while trying to render layout ${this.props.layoutNode.nodeId} of type ${this.props.layoutNode.type}: ${error}
|
|
77
|
-
${errorInfo?.componentStack}`);
|
|
78
|
-
err.cause = error;
|
|
79
|
-
throw err;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
83
|
-
0 && (module.exports = {
|
|
84
|
-
LayoutComponent
|
|
85
|
-
});
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var Modals_exports = {};
|
|
30
|
-
__export(Modals_exports, {
|
|
31
|
-
Modals: () => Modals
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(Modals_exports);
|
|
34
|
-
var import_react = __toESM(require("react"), 1);
|
|
35
|
-
var import_react_native = require("@ohos-ports/react-native");
|
|
36
|
-
var import_LayoutComponent = require("./LayoutComponent.js");
|
|
37
|
-
var import_LayoutStore = require("../Stores/LayoutStore.js");
|
|
38
|
-
var import_connect = require("../connect.js");
|
|
39
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
|
-
const Modals = (0, import_connect.connect)(class extends import_react.Component {
|
|
41
|
-
render() {
|
|
42
|
-
const children = import_LayoutStore.LayoutStore.getModals();
|
|
43
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.View, {
|
|
44
|
-
testID: "MODALS",
|
|
45
|
-
children: children.map((child) => {
|
|
46
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_LayoutComponent.LayoutComponent, {
|
|
47
|
-
layoutNode: child
|
|
48
|
-
}, child.nodeId);
|
|
49
|
-
})
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
54
|
-
0 && (module.exports = {
|
|
55
|
-
Modals
|
|
56
|
-
});
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var NavigationButton_exports = {};
|
|
30
|
-
__export(NavigationButton_exports, {
|
|
31
|
-
NavigationButton: () => NavigationButton
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(NavigationButton_exports);
|
|
34
|
-
var import_react = __toESM(require("react"), 1);
|
|
35
|
-
var import_react_native = require("@ohos-ports/react-native");
|
|
36
|
-
var import_react_native_navigation = require("react-native-navigation");
|
|
37
|
-
var import_EventsStore = require("../Stores/EventsStore.js");
|
|
38
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
-
const NavigationButton = class extends import_react.Component {
|
|
40
|
-
ref = void 0;
|
|
41
|
-
render() {
|
|
42
|
-
const {
|
|
43
|
-
button,
|
|
44
|
-
componentId
|
|
45
|
-
} = this.props;
|
|
46
|
-
if (button.component) return this.renderButtonComponent();
|
|
47
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Button, {
|
|
48
|
-
testID: button.testID,
|
|
49
|
-
title: button.text || "",
|
|
50
|
-
disabled: button.enabled === false,
|
|
51
|
-
onPress: () => button.enabled !== false && import_EventsStore.events.invokeNavigationButtonPressed({
|
|
52
|
-
buttonId: button.id,
|
|
53
|
-
componentId
|
|
54
|
-
})
|
|
55
|
-
}, button.id);
|
|
56
|
-
}
|
|
57
|
-
renderButtonComponent() {
|
|
58
|
-
const {
|
|
59
|
-
button,
|
|
60
|
-
componentId
|
|
61
|
-
} = this.props;
|
|
62
|
-
const buttonComponentId = button.component.componentId;
|
|
63
|
-
const ComponentClass = import_react_native_navigation.Navigation.mock.store.getComponentClassForName(button.component.name);
|
|
64
|
-
if (!ComponentClass) {
|
|
65
|
-
throw new Error(`Cannot find registered component for: ${button.component?.name}`);
|
|
66
|
-
}
|
|
67
|
-
const ButtonComponent = ComponentClass();
|
|
68
|
-
const props = import_react_native_navigation.Navigation.mock.store.getPropsForId(buttonComponentId);
|
|
69
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.TouchableOpacity, {
|
|
70
|
-
onPress: () => {
|
|
71
|
-
if (this.ref) {
|
|
72
|
-
this.invokeOnClick(
|
|
73
|
-
// @ts-ignore
|
|
74
|
-
(this.ref._reactInternalFiber || this.ref._reactInternals).return.stateNode
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
import_EventsStore.events.invokeNavigationButtonPressed({
|
|
78
|
-
buttonId: button.id,
|
|
79
|
-
componentId
|
|
80
|
-
});
|
|
81
|
-
},
|
|
82
|
-
testID: button.testID,
|
|
83
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonComponent, {
|
|
84
|
-
...props,
|
|
85
|
-
componentId: buttonComponentId,
|
|
86
|
-
ref: (ref) => this.ref = ref
|
|
87
|
-
}, buttonComponentId)
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
invokeOnClick(stateNode) {
|
|
91
|
-
if (stateNode.children) {
|
|
92
|
-
stateNode.children.forEach((instance) => {
|
|
93
|
-
if (instance.internalInstanceHandle && instance.internalInstanceHandle.stateNode.props.onClick) {
|
|
94
|
-
instance.internalInstanceHandle.stateNode.props.onClick();
|
|
95
|
-
}
|
|
96
|
-
this.invokeOnClick(instance);
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
102
|
-
0 && (module.exports = {
|
|
103
|
-
NavigationButton
|
|
104
|
-
});
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var Overlays_exports = {};
|
|
30
|
-
__export(Overlays_exports, {
|
|
31
|
-
Overlays: () => Overlays
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(Overlays_exports);
|
|
34
|
-
var import_react = __toESM(require("react"), 1);
|
|
35
|
-
var import_react_native = require("@ohos-ports/react-native");
|
|
36
|
-
var import_constants = require("../constants.js");
|
|
37
|
-
var import_LayoutComponent = require("./LayoutComponent.js");
|
|
38
|
-
var import_LayoutStore = require("../Stores/LayoutStore.js");
|
|
39
|
-
var import_connect = require("../connect.js");
|
|
40
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
|
-
const Overlays = (0, import_connect.connect)(class extends import_react.Component {
|
|
42
|
-
render() {
|
|
43
|
-
const children = import_LayoutStore.LayoutStore.getOverlays();
|
|
44
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.View, {
|
|
45
|
-
testID: import_constants.VISIBLE_OVERLAY_TEST_ID,
|
|
46
|
-
children: children.map((child) => {
|
|
47
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_LayoutComponent.LayoutComponent, {
|
|
48
|
-
layoutNode: child
|
|
49
|
-
}, child.nodeId);
|
|
50
|
-
})
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
-
0 && (module.exports = {
|
|
56
|
-
Overlays
|
|
57
|
-
});
|