@applicaster/zapp-react-native-utils 14.0.0-alpha.8419134002 → 14.0.0-alpha.9848043301
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/actionsExecutor/ActionExecutorContext.tsx +1 -1
- package/analyticsUtils/AnalyticsEvents/helper.ts +0 -81
- package/analyticsUtils/AnalyticsEvents/sendOnClickEvent.ts +4 -14
- package/analyticsUtils/__tests__/analyticsUtils.test.js +0 -14
- package/analyticsUtils/events.ts +0 -8
- package/appUtils/accessibilityManager/index.ts +3 -3
- package/arrayUtils/__tests__/isFilledArray.test.ts +1 -1
- package/arrayUtils/index.ts +2 -7
- package/configurationUtils/__tests__/configurationUtils.test.js +31 -0
- package/configurationUtils/index.ts +34 -63
- package/focusManager/FocusManager.ts +6 -4
- package/manifestUtils/{_internals/index.js → _internals.js} +25 -2
- package/manifestUtils/createConfig.js +1 -4
- package/manifestUtils/defaultManifestConfigurations/player.js +200 -1239
- package/manifestUtils/progressBar/__tests__/mobileProgressBar.test.js +30 -0
- package/package.json +2 -2
- package/playerUtils/__tests__/configurationUtils.test.ts +65 -1
- package/playerUtils/configurationGenerator.ts +2572 -0
- package/playerUtils/configurationUtils.ts +44 -0
- package/playerUtils/index.ts +51 -2
- package/playerUtils/useValidatePlayerConfig.tsx +19 -22
- package/reactHooks/feed/useBatchLoading.ts +3 -3
- package/reactHooks/feed/usePipesCacheReset.ts +1 -1
- package/reactHooks/navigation/useIsScreenActive.ts +5 -9
- package/reactHooks/screen/useScreenContext.ts +1 -1
- package/reactHooks/state/__tests__/ZStoreProvider.test.tsx +1 -2
- package/riverComponetsMeasurementProvider/index.tsx +1 -1
- package/services/js2native.ts +0 -1
- package/time/BackgroundTimer.ts +3 -5
- package/utils/index.ts +1 -16
- package/arrayUtils/__tests__/isEmptyArray.test.ts +0 -63
- package/audioPlayerUtils/__tests__/getArtworkImage.test.ts +0 -144
- package/audioPlayerUtils/__tests__/getBackgroundImage.test.ts +0 -72
- package/audioPlayerUtils/__tests__/getImageFromEntry.test.ts +0 -110
- package/audioPlayerUtils/assets/index.ts +0 -2
- package/audioPlayerUtils/index.ts +0 -242
- package/conf/player/__tests__/selectors.test.ts +0 -34
- package/conf/player/selectors.ts +0 -10
- package/configurationUtils/__tests__/getMediaItems.test.ts +0 -65
- package/configurationUtils/__tests__/imageSrcFromMediaItem.test.ts +0 -34
- package/manifestUtils/_internals/getDefaultConfiguration.js +0 -28
- package/playerUtils/__tests__/getPlayerActionButtons.test.ts +0 -54
- package/playerUtils/_internals/__tests__/utils.test.ts +0 -71
- package/playerUtils/_internals/index.ts +0 -1
- package/playerUtils/_internals/utils.ts +0 -31
- package/playerUtils/getPlayerActionButtons.ts +0 -17
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./utils";
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
flatMap,
|
|
3
|
-
get,
|
|
4
|
-
flatten,
|
|
5
|
-
difference,
|
|
6
|
-
} from "@applicaster/zapp-react-native-utils/utils";
|
|
7
|
-
|
|
8
|
-
const extractFields = (field: any) => {
|
|
9
|
-
if (field.group === true) {
|
|
10
|
-
return field.fields;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return field;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const getAllFields = (...configs: any[]) => {
|
|
17
|
-
const allFields = flatMap(configs, (config) => get(config, "fields", []));
|
|
18
|
-
|
|
19
|
-
const processedFields = flatten(allFields.map(extractFields))
|
|
20
|
-
.map((field) => get(field, "key"))
|
|
21
|
-
.filter(Boolean);
|
|
22
|
-
|
|
23
|
-
return processedFields;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const getConfigurationDiff = (
|
|
27
|
-
defaultConfig,
|
|
28
|
-
config: Record<string, any>
|
|
29
|
-
) => {
|
|
30
|
-
return difference(defaultConfig, Object.keys(config));
|
|
31
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { map, take, trim } from "../utils";
|
|
2
|
-
import { selectActionButtons } from "../conf/player/selectors";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Returns the first two action buttons from the configuration.
|
|
6
|
-
* @param {Object} configuration - The player configuration object.
|
|
7
|
-
* @returns {Array} An array containing the first two action buttons.
|
|
8
|
-
*/
|
|
9
|
-
export const getPlayerActionButtons = (configuration: any) => {
|
|
10
|
-
const buttonsString = selectActionButtons(configuration);
|
|
11
|
-
|
|
12
|
-
if (!buttonsString) {
|
|
13
|
-
return [];
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return take(map(buttonsString.split(","), trim), 2);
|
|
17
|
-
};
|