Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
33dcd4b
Refactor file structure: move `IterableInbox` to `inbox` directory an…
lposen Nov 7, 2024
a1d215f
Update imports for IterableInboxCustomizations to reflect new file st…
lposen Nov 7, 2024
e5ff188
Refactor file structure: move inbox-related components to `inbox` dir…
lposen Nov 7, 2024
827462a
Refactor imports: consolidate IterableInApp classes into a single inA…
lposen Nov 7, 2024
27f1bf0
Refactor in-app structure: separate classes into individual files, in…
lposen Nov 7, 2024
507902a
Refactor inbox structure: move components to a new `components` direc…
lposen Nov 7, 2024
fd2ea12
Refactor Iterable module: rename AuthResponseCallback to IterableAuth…
lposen Nov 7, 2024
5af5f45
Refactor event names: rename EventName to IterableEventName in Iterab…
lposen Nov 7, 2024
7cf303c
Refactor enums: move IterableAuthResponseResult, IterableEventName, a…
lposen Nov 7, 2024
95c4988
Refactor Iterable module: move IterableActionContext to a new file, u…
lposen Nov 7, 2024
3a52215
Refactor Iterable module: update imports for IterableAuthResponse and…
lposen Nov 7, 2024
9ac9906
Refactor Iterable module: update imports for IterableActionContext, I…
lposen Nov 7, 2024
20b10a3
Refactor Iterable module: move IterablePushPlatform enum to a separat…
lposen Nov 7, 2024
f7066e7
Refactor imports in IterableLogger, IterableUtil, and IterableInAppMe…
lposen Nov 7, 2024
5a1eea0
Refactor Iterable module: update imports for consistency and rename t…
lposen Nov 7, 2024
1db7ca4
Refactor imports in Iterable module: update paths to use absolute imp…
lposen Nov 7, 2024
04dc426
Refactor imports and restructure files in Iterable module: consolidat…
lposen Nov 7, 2024
1393e4b
Undid local path changes as they do not work with the build
lposen Nov 7, 2024
6cfa8a2
Fix import path for package.json in Iterable class to ensure correct …
lposen Nov 7, 2024
4688446
Refactor types in inbox module: change type aliases to interfaces for…
lposen Nov 7, 2024
f96f5c9
Merge branch '2.0.0-alpha/MOB-10131-remove-duplicate-code' into 2.0.0…
lposen Nov 14, 2024
3d92e26
Changed file order as it was messing with mocks
lposen Nov 14, 2024
e6d729f
Merge branch '2.0.0-alpha/MOB-9995-reorganize-source-code' of github.…
lposen Nov 14, 2024
65aa68c
Merge branch '2.0.0-alpha/MOB-10131-remove-duplicate-code' into 2.0.0…
lposen Nov 15, 2024
4216fa7
Remove default exports from Iterable classes and enums
lposen Nov 15, 2024
8ea2a20
Merge branch '2.0.0-alpha/MOB-10131-remove-duplicate-code' into 2.0.0…
lposen Nov 25, 2024
a20baec
Merge branch '2.0.0-alpha/MOB-10131-remove-duplicate-code' into 2.0.0…
lposen Nov 26, 2024
c8ece69
Merge branch '2.0.0-alpha/MOB-10131-remove-duplicate-code' into 2.0.0…
lposen Nov 27, 2024
a7dccb5
Merge branch '2.0.0-alpha/master' into 2.0.0-alpha/MOB-9995-reorganiz…
lposen Dec 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Iterable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
IterableInAppLocation,
IterableInAppManager,
IterableInAppMessage,
} from './inApp';
} from 'inApp';
import { IterableAction } from './IterableAction';
import { IterableActionContext } from './IterableActionContext';
import { IterableAttributionInfo } from './IterableAttributionInfo';
Expand Down
2 changes: 1 addition & 1 deletion src/IterableConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
IterableLogLevel,
IterablePushPlatform,
} from './enums';
import { IterableInAppMessage, IterableInAppShowResponse } from './inApp';
import { IterableInAppMessage, IterableInAppShowResponse } from 'inApp';

/**
* An IterableConfig object sets various properties of the SDK.
Expand Down
2 changes: 1 addition & 1 deletion src/__mocks__/MockRNIterableAPI.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IterableAttributionInfo } from '../IterableAttributionInfo';
import { IterableInAppMessage } from '../inApp';
import { IterableInAppMessage } from 'inApp';

export class MockRNIterableAPI {
static email?: string;
Expand Down
4 changes: 2 additions & 2 deletions src/inbox/IterableInboxDataModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import {
IterableInAppDeleteSource,
IterableInAppLocation,
IterableInAppMessage,
} from '../inApp';
} from 'inApp';
import type {
IterableInboxImpressionRowInfo,
IterableInboxRowViewModel,
} from './types';
} from 'inbox/types';
import { Iterable } from '../Iterable';

const RNIterableAPI = NativeModules.RNIterableAPI;
Expand Down
6 changes: 3 additions & 3 deletions src/inbox/components/IterableInbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ import { SafeAreaView } from 'react-native-safe-area-context';

import { Iterable } from '../../Iterable';
import { useAppStateListener, useDeviceOrientation } from '../../hooks';
import { IterableInAppDeleteSource, IterableInAppLocation } from '../../inApp';
import { IterableInAppDeleteSource, IterableInAppLocation } from 'inApp';

import IterableInboxDataModel from '../IterableInboxDataModel';
import IterableInboxDataModel from 'inbox/IterableInboxDataModel';
import type {
IterableInboxImpressionRowInfo,
IterableInboxRowViewModel,
IterableInboxCustomizations,
} from '../types';
} from 'inbox/types';
import { IterableInboxEmptyState } from './IterableInboxEmptyState';
import { IterableInboxMessageDisplay } from './IterableInboxMessageDisplay';
import { IterableInboxMessageList } from './IterableInboxMessageList';
Expand Down
2 changes: 1 addition & 1 deletion src/inbox/components/IterableInboxEmptyState.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StyleSheet, Text, View } from 'react-native';

import { type IterableInboxCustomizations } from '../types';
import { type IterableInboxCustomizations } from 'inbox/types';

// TODO: Comment
export interface IterableInboxEmptyStateProps {
Expand Down
4 changes: 2 additions & 2 deletions src/inbox/components/IterableInboxMessageCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import {
type ViewStyle,
} from 'react-native';

import { IterableInboxDataModel } from '../IterableInboxDataModel';
import { IterableInboxDataModel } from 'inbox/IterableInboxDataModel';
import type {
IterableInboxRowViewModel,
IterableInboxCustomizations,
} from '../types';
} from 'inbox/types';

// TODO: Change to component
function defaultMessageListLayout(
Expand Down
7 changes: 4 additions & 3 deletions src/inbox/components/IterableInboxMessageDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ import {
IterableHtmlInAppContent,
IterableInAppCloseSource,
IterableInAppLocation,
} from '../../inApp';
} from 'inApp';
import { Iterable } from '../../Iterable';
import { IterableAction, IterableActionContext } from '../../IterableAction';
import { IterableAction } from '../../IterableAction';
import { IterableEdgeInsets } from '../../IterableEdgeInsets';
import { type IterableInboxRowViewModel } from '../types';
import { type IterableInboxRowViewModel } from 'inbox/types';
import IterableActionContext from '../../IterableActionContext';

// TODO: Comment
export interface IterableInboxMessageDisplayProps {
Expand Down
6 changes: 3 additions & 3 deletions src/inbox/components/IterableInboxMessageList.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { useCallback, useRef, useState } from 'react';
import { type ViewabilityConfig, type ViewToken, FlatList } from 'react-native';

import { IterableInAppMessage } from '../../inApp';
import { IterableInboxDataModel } from '../IterableInboxDataModel';
import { IterableInAppMessage } from 'inApp';
import { IterableInboxDataModel } from 'inbox/IterableInboxDataModel';
import type {
IterableInboxImpressionRowInfo,
IterableInboxRowViewModel,
IterableInboxCustomizations,
} from '../types';
} from 'inbox/types';
import { IterableInboxMessageCell } from './IterableInboxMessageCell';

// TODO: Comment
Expand Down
2 changes: 1 addition & 1 deletion src/inbox/types/IterableInboxRowViewModel.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IterableInAppMessage } from '../../inApp';
import { IterableInAppMessage } from 'inApp';

// TODO: Add description
export type IterableInboxRowViewModel = {
Expand Down
6 changes: 5 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"compilerOptions": {
"rootDir": ".",
"paths": {
"@iterable/react-native-sdk": ["./src/index"]
"@iterable/react-native-sdk": ["./src/index"],
"inbox/*": ["./src/inbox/*"],
"inbox": ["./src/inbox/index"],
"inApp/*": ["./src/inApp/*"],
"inApp": ["./src/inApp/index"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure exactly what this change is for

},
"allowUnreachableCode": false,
"allowUnusedLabels": false,
Expand Down