@applicaster/zapp-react-native-ui-components 15.1.5 → 15.1.6-alpha.2015591222
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/Components/ModalComponent/AudioPlayer/Components/Action.tsx +33 -69
- package/Components/ModalComponent/AudioPlayer/Components/Button.tsx +25 -47
- package/Components/ModalComponent/AudioPlayer/Components/Header.tsx +122 -39
- package/Components/ModalComponent/AudioPlayer/Components/Input.tsx +671 -0
- package/Components/ModalComponent/AudioPlayer/Components/Item.tsx +299 -131
- package/Components/ModalComponent/AudioPlayer/Components/NowPlayingHeaderSection.tsx +86 -0
- package/Components/ModalComponent/AudioPlayer/Components/index.ts +8 -4
- package/Components/ModalComponent/BottomSheetModalContent.tsx +290 -55
- package/Components/ModalComponent/Button/index.tsx +5 -3
- package/Components/ModalComponent/Header/utils.ts +1 -1
- package/Components/ModalComponent/SortableList.tsx +142 -0
- package/Components/ModalComponent/TextInputContent.tsx +100 -0
- package/Components/ModalComponent/__tests__/BottomSheetModalContent.test.tsx +183 -0
- package/Components/ModalComponent/__tests__/TextInputContent.test.tsx +128 -0
- package/Components/ModalComponent/__tests__/showTextInput.test.ts +95 -0
- package/Components/ModalComponent/index.tsx +11 -0
- package/Components/ModalComponent/presets/__tests__/getCell.test.ts +66 -0
- package/Components/ModalComponent/presets/dynamicCollectionCell.tsx +74 -0
- package/Components/ModalComponent/presets/index.ts +27 -0
- package/Components/ModalComponent/presets/selectableCell.tsx +27 -0
- package/Components/ModalComponent/presets/standardCell.tsx +41 -0
- package/Components/ModalComponent/presets/types.ts +35 -0
- package/Components/ModalComponent/showTextInput.ts +43 -0
- package/package.json +6 -5
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
actionExecutor,
|
|
3
|
+
ActionResult,
|
|
4
|
+
} from "@applicaster/zapp-react-native-utils/actionsExecutor/ActionExecutor";
|
|
5
|
+
import { TextInputContent } from "./TextInputContent";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Opens a text-input bottom sheet driven by action.options.
|
|
9
|
+
* Uses openBottomSheet with content.component as body-only UI;
|
|
10
|
+
* standard ModalHeader (dismiss x) is provided by ModalComponent.
|
|
11
|
+
*/
|
|
12
|
+
export async function showTextInputAction(
|
|
13
|
+
action: ActionType,
|
|
14
|
+
context?: Record<string, any>
|
|
15
|
+
): Promise<ActionResult> {
|
|
16
|
+
const { headerTitle, inputLabel, defaultValue, buttonLabel, actions } =
|
|
17
|
+
action.options || {};
|
|
18
|
+
|
|
19
|
+
if (!headerTitle || !buttonLabel || !actions || !actions.length) {
|
|
20
|
+
return ActionResult.Error;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return actionExecutor.handleAction(
|
|
24
|
+
{
|
|
25
|
+
type: "openBottomSheet",
|
|
26
|
+
options: {
|
|
27
|
+
header: {
|
|
28
|
+
title: headerTitle,
|
|
29
|
+
},
|
|
30
|
+
content: {
|
|
31
|
+
component: TextInputContent,
|
|
32
|
+
props: {
|
|
33
|
+
inputLabel,
|
|
34
|
+
defaultValue: defaultValue ?? "",
|
|
35
|
+
buttonLabel,
|
|
36
|
+
actions,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
context
|
|
42
|
+
);
|
|
43
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-ui-components",
|
|
3
|
-
"version": "15.1.
|
|
3
|
+
"version": "15.1.6-alpha.2015591222",
|
|
4
4
|
"description": "Applicaster Zapp React Native ui components for the Quick Brick App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -28,12 +28,13 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@applicaster/applicaster-types": "15.1.
|
|
32
|
-
"@applicaster/zapp-react-native-bridge": "15.1.
|
|
33
|
-
"@applicaster/zapp-react-native-redux": "15.1.
|
|
34
|
-
"@applicaster/zapp-react-native-utils": "15.1.
|
|
31
|
+
"@applicaster/applicaster-types": "15.1.6-alpha.2015591222",
|
|
32
|
+
"@applicaster/zapp-react-native-bridge": "15.1.6-alpha.2015591222",
|
|
33
|
+
"@applicaster/zapp-react-native-redux": "15.1.6-alpha.2015591222",
|
|
34
|
+
"@applicaster/zapp-react-native-utils": "15.1.6-alpha.2015591222",
|
|
35
35
|
"fast-json-stable-stringify": "^2.1.0",
|
|
36
36
|
"promise": "^8.3.0",
|
|
37
|
+
"react-native-sortables": "1.7.1",
|
|
37
38
|
"url": "^0.11.0",
|
|
38
39
|
"uuid": "^3.3.2"
|
|
39
40
|
},
|