commit_hash
stringlengths
40
40
input
stringlengths
13
7.99k
output
stringlengths
5
155
full_message
stringlengths
6
8.96k
10e4a1bd3bd1868a8da161fbb21f79630f9a0695
--- core/__tests__/core/CreateGuardedScreensTest.tsx @@ -0,0 +1,49 @@ +import React from 'react'; +import { createMiniAppScreens } from '../../src/core/CreateGuardedScreens'; +import { createStackNavigator } from '@react-navigation/stack'; + + +const Stack = createStackNavigator(); +const MockComponent = () => <></>; +const mockFeatureModule = { + id: 'feature-id', + getScreenConfig: jest.fn(), +}; + +describe('createMiniAppScreens', () => { + it('renders multiple screens correctly', () => { + const configs = [ + { name: 'Screen1', component: MockComponent, featureId: 'feature1' }, + { name: 'Screen2', component: MockComponent, featureId: 'feature2' }, + ]; + + const screens = createMiniAppScreens(Stack, configs); + expect(screens).toHaveLength(2); + expect(screens[0].props.name).toBe('Screen1'); + expect(screens[1].props.name).toBe('Screen2'); + }); + + it('renders screen with feature module correctly', () => { + mockFeatureModule.getScreenConfig.mockReturnValue({ + getComponent: () => MockComponent, + options: {}, + clockCheckRequired: false, + }); + const configs = [ + { screen: 'FeatureScreen', featureModule: mockFeatureModule, featureId: 'feature1' }, + ]; + const screens = createMiniAppScreens(Stack, configs); + expect(screens).toHaveLength(1); + expect(screens[0].props.name).toBe('FeatureScreen'); + }); + + it('returns null when screen config is missing in feature module', () => { + mockFeatureModule.getScreenConfig.mockReturnValue(null); + const configs = [ + { screen: 'MissingScreen', featureModule: mockFeatureModule }, + ]; + + const screens = createMiniAppScreens(Stack, configs); + expect(screens[0]).toBeNull(); + }); +});
createguardedscreens test
createguardedscreens test
057800ffcb58afec13e8ab4d78b0fcb28f43fd13
--- src/containers/UserHeader.tsx @@ -31,7 +31,7 @@ const styles = StyleSheet.create({ export const UserHeader = () => { const userId: string = useSelector(getEncryptedUserId); const storeId: string = useSelector(SiteSelectors.getUserWorkingSite); - const name = useSelector(UserSelectors.getUserName); + const name: string = useSelector(UserSelectors.getUserName) ?? ''; const isClockedIn = useSelector(ClockStatusSelectors.getIsClockedIn) ?? false; const presence = useUserPresence(userId); --- src/containers/UserHeader.tsx @@ -31,7 +31,7 @@ const styles = StyleSheet.create({ export const UserHeader = () => { const userId: string = useSelector(getEncryptedUserId); const storeId: string = useSelector(SiteSelectors.getUserWorkingSite); - const name = useSelector(UserSelectors.getUserName); + const name: string = useSelector(UserSelectors.getUserName) ?? ''; const isClockedIn = useSelector(ClockStatusSelectors.getIsClockedIn) ?? false; const presence = useUserPresence(userId);
tsc fix
tsc fix
ef8e632b90d919aa05526a976ed8841fa151c439
--- __tests__/components/ChatWidgetComponent.a11y.test.tsx @@ -3,7 +3,6 @@ import {render} from '@testing-library/react-native'; import {ChatWidget} from '../../src/components/ChatWidget/ChatWidgetComponent'; import {useNavigation} from '@react-navigation/native'; import {useSelector} from 'react-redux'; -import {TelemetryService} from '@walmart/allspark-foundation/Telemetry'; import {SiteSelectors} from '@walmart/allspark-foundation/Site'; import {UserSelectors} from '@walmart/allspark-foundation/User'; import {ClockSelectors} from '@walmart/allspark-foundation';
feat(ada): ada updates
feat(ada): ada updates
49c7cd20724667e339862d730428fdfabd0a372b
--- __tests__/AppTest.tsx @@ -1,45 +1,45 @@ import React from 'react'; import {create} from 'react-test-renderer'; -import {RootContainer} from '../../src/core/RootContainer'; +import {App} from '../src/index'; jest.mock( '@walmart/gtp-shared-components/dist/theme/theme-provider', () => 'ThemeProvider', ); -jest.mock('../../env', () => ({ +jest.mock('../env', () => ({ __esModule: true, default: {env: 'dev'}, })); -jest.mock('../../src/core/Auth', () => ({ +jest.mock('../src/core/Auth', () => ({ AuthRef: {current: {}}, })); -jest.mock('../../src/core/HttpClient', () => ({ +jest.mock('../src/core/HttpClient', () => ({ HttpClientRef: {current: {}}, })); -jest.mock('../../src/core/Logger', () => ({ +jest.mock('../src/core/Logger', () => ({ CoreLoggerProvider: 'CoreLoggerProvider', })); -jest.mock('../../src/core/Telemetry', () => ({ +jest.mock('../src/core/Telemetry', () => ({ TelemetryRef: {current: {}}, })); -jest.mock('../../src/translations', () => ({ +jest.mock('../src/translations', () => ({ TranslationRef: {current: {}}, })); -jest.mock('../../src/updates/UpdateVersionModal', () => ({ +jest.mock('../src/updates/UpdateVersionModal', () => ({ UpdateVersionModal: 'UpdateVersionModal', })); -jest.mock('../../src/core/AllsparkTheme', () => ({ +jest.mock('../src/core/AllsparkTheme', () => ({ AllsparkTheme: {}, NavigationTheme: {}, })); -jest.mock('../../src/navigation/index', () => ({ +jest.mock('../src/navigation/index', () => ({ RootNav: 'RootNav', })); describe('RootContainer', () => { it('renders and fires startup event', () => { - const component = create(<RootContainer />); + const component = create(<App />); expect(component.toJSON()).toMatchSnapshot(); }); }); --- index.js @@ -4,14 +4,11 @@ import 'react-native-get-random-values'; import 'intl'; import 'intl/locale-data/jsonp/en'; - import 'moment/locale/es'; import 'moment/locale/es-mx'; -import moment from 'moment'; -moment.locale('en'); import {AppRegistry} from 'react-native'; -import {RootContainer} from './src/core/RootContainer'; +import {App} from './src'; import {name as appName} from './app.json'; -AppRegistry.registerComponent(appName, () => RootContainer); +AppRegistry.registerComponent(appName, () => App); --- src/index.tsx @@ -15,21 +15,21 @@ import {HttpClientConsumer} from '@walmart/core-services/HttpClient'; import {TranslationConsumer} from '@walmart/core-services/Translations'; import {LocalStorageConsumer} from '@walmart/core-services/LocalStorage'; -import env from '../../env'; -import {RootNav} from '../navigation'; -import {TranslationRef} from '../translations'; -import {UpdateVersionModal} from '../updates/UpdateVersionModal'; +import env from '../env'; +import {RootNav} from './navigation'; +import {TranslationRef} from './translations'; +import {UpdateVersionModal} from './updates/UpdateVersionModal'; -import {AuthRef} from './Auth'; -import {CoreLoggerProvider} from './Logger'; -import {TelemetryRef} from './Telemetry'; -import {HttpClientRef} from './HttpClient'; -import {AllsparkTheme, NavigationTheme} from './AllsparkTheme'; -import {LocalStorageRef} from './LocalStorage'; +import {AuthRef} from './core/Auth'; +import {CoreLoggerProvider} from './core/Logger'; +import {TelemetryRef} from './core/Telemetry'; +import {HttpClientRef} from './core/HttpClient'; +import {AllsparkTheme, NavigationTheme} from './core/AllsparkTheme'; +import {LocalStorageRef} from './core/LocalStorage'; const AllsparkRecipe = {env} as AllsparkInputRecipe; -export const RootContainer = () => ( +export const App = () => ( <SafeAreaProvider> <ThemeProvider theme={AllsparkTheme}> <AllsparkCoreServices recipe={AllsparkRecipe}> --- src/translations/TranslationSetupGuard.tsx @@ -1,4 +1,5 @@ import React, {PropsWithChildren, useEffect, useState} from 'react'; +import moment from 'moment'; import {useTranslationInstance} from '@walmart/core-services/Translations'; import {syncDeviceLanguage} from './utils'; import {enUS} from './en-US'; @@ -12,6 +13,7 @@ export const TranslationSetupGuard = (props: PropsWithChildren<{}>) => { // Translation setup useEffect(() => { + moment.locale('en'); translationInstance.addResourceBundle('en-US', 'common', enUS); translationInstance.addResourceBundle('es-MX', 'common', esMX); syncDeviceLanguage();
move root container up as root src export. setup moment local in translation provider
move root container up as root src export. setup moment local in translation provider
80cb0c3f873c1404e096541b7d5ff736c86df61d
--- packages/me-at-walmart-container/__tests__/services/user/getAssociatesInfo.test.ts @@ -6,14 +6,11 @@ import { import { getCachedUser, getCachedUserRaw, + cacheUserInfo, } from '../../../src/services/user/cache'; import {AllsparkGraphQLClient} from '@walmart/allspark-foundation/GraphQL'; import {MeAtWalmartEnvironment} from '@walmart/allspark-foundation/Environment'; - -jest.mock('../../../src/services/user/transforms', () => ({ - tokenDataToUser: jest.fn(), - parseUserResponse: jest.fn(), -})); +import {UserLogger} from '../../../src/services/user/utils'; jest.mock('../../../src/services/user/cache', () => ({ getCachedUser: jest.fn(), @@ -21,12 +18,147 @@ jest.mock('../../../src/services/user/cache', () => ({ cacheUserInfo: jest.fn(), })); -jest.mock('../../../src/services/user/utils', () => ({ - UserLogger: { - error: jest.fn(), - }, +jest.mock('../../../src/services/user/transforms', () => ({ + tokenDataToUser: jest.fn(), + parseUserResponse: jest.fn(), })); +describe('getAssociateInfo', () => { + const tokenData = { + scope: 'openid full', + client_id: 'Connected-Associate', + guid: 'rBfyTLalJ7EEZJGCE4ZWjez8YPzfXFiB', + iss: 'https://pfedcert.wal-mart.com', + jti: '2Z50wGWU', + sub: 'NOT_FOUND', + c: '', + userid: '', + aud: '', + upn: 'vn57guq@homeoffice.wal-mart.com', + nbf: 1736975385, + iat: 1736975505, + win: '', + exp: 1736976405, + }; + const tokenUser = {userId: 'mockUserId', email: tokenData.upn}; + const mockEnv = {http: {consumerId: 'mockConsumerId'}}; + const user = {userId: 'mockUserId', email: tokenData.upn}; + const cachedUser = {userId: 'mockUserId', email: tokenData.upn}; + const error = new Error('GraphQL error'); + + beforeEach(() => { + jest.clearAllMocks(); + MeAtWalmartEnvironment.getDeferred.mockResolvedValue(mockEnv); + (tokenDataToUser as jest.Mock).mockReturnValue(tokenUser); + }); + + test('should return cached user if available', async () => { + (getCachedUser as jest.Mock).mockResolvedValue({ + id: 'cachedUser', + name: 'Cached User', + }); + + const result = await getAssociateInfo(tokenData); + + expect(result).toEqual({id: 'cachedUser', name: 'Cached User'}); + expect(AllsparkGraphQLClient.query).not.toHaveBeenCalled(); + }); + + test('should fetch user from GraphQL and cache if successful', async () => { + (getCachedUser as jest.Mock).mockResolvedValue(null); + MeAtWalmartEnvironment.getDeferred.mockResolvedValue({ + http: {consumerId: 'consumer-id'}, + }); + (AllsparkGraphQLClient.query as jest.Mock).mockResolvedValue({ + data: {getLoggedInUser: tokenUser}, + error: null, + }); + (parseUserResponse as jest.Mock).mockReturnValue(user); + + const result = await getAssociateInfo(tokenData); + + expect(result).toEqual(user); + }); + + test('should return tokenUser if GraphQL returns null', async () => { + (getCachedUser as jest.Mock).mockResolvedValue(null); + MeAtWalmartEnvironment.getDeferred.mockResolvedValue({ + http: {consumerId: 'consumer-id'}, + }); + (AllsparkGraphQLClient.query as jest.Mock).mockResolvedValue({ + data: {getLoggedInUser: null}, + error: null, + }); + + const result = await getAssociateInfo(tokenData); + + expect(result).toEqual(tokenUser); + }); + + test('should return cached raw user if GraphQL request fails', async () => { + (getCachedUser as jest.Mock).mockResolvedValue(null); + (AllsparkGraphQLClient.query as jest.Mock).mockRejectedValue(new Error('GraphQL Error')); + (getCachedUserRaw as jest.Mock).mockResolvedValue({ + user: {id: 'cachedRawUser', name: 'Fallback User'}, + }); + + const result = await getAssociateInfo(tokenData); + + expect(UserLogger.error).toHaveBeenCalledWith('FETCH_ASSOCIATE: ERROR', { + message: 'GraphQL Error', + fallbackType: 'CACHE', + }); + expect(result).toEqual({id: 'cachedRawUser', name: 'Fallback User'}); + }); + + test('should return token user if GraphQL fails and no cached raw user is found', async () => { + (getCachedUser as jest.Mock).mockResolvedValue(null); + (AllsparkGraphQLClient.query as jest.Mock).mockRejectedValue(new Error('GraphQL Error')); + (getCachedUserRaw as jest.Mock).mockResolvedValue(null); + + const result = await getAssociateInfo(tokenData); + + expect(UserLogger.error).toHaveBeenCalledWith('FETCH_ASSOCIATE: ERROR', { + message: 'GraphQL Error', + fallbackType: 'TOKEN', + }); + expect(result).toEqual(tokenUser); + }); + + test('should NOT cache user info when there is an error in response', async () => { + const mockGraphQLResponse = { + data: { + getLoggedInUser: { id: '123', name: 'John Doe' }, // Mock user data + }, + error: new Error('GraphQL Query Error'), // Simulate GraphQL error + }; + + jest.spyOn(AllsparkGraphQLClient, 'query').mockResolvedValue(mockGraphQLResponse); + + await getAssociateInfo(tokenData); + + expect(cacheUserInfo).not.toHaveBeenCalled(); // Ensure caching does NOT happen + }); + + test('should handle GraphQL error and fallback to cache or token', async () => { + (getCachedUserRaw as jest.Mock).mockResolvedValue(cachedUser); + (getCachedUser as jest.Mock).mockResolvedValue(null); + MeAtWalmartEnvironment.getDeferred.mockResolvedValue({ + http: {consumerId: 'consumer-id'}, + }); + (AllsparkGraphQLClient.query as jest.Mock).mockRejectedValue(error); + + const result = await getAssociateInfo(tokenData); + + expect(result).toEqual(cachedUser); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); +}); + +/* describe('getAssociateInfo', () => { const tokenData = { scope: 'openid full', @@ -108,4 +240,4 @@ describe('getAssociateInfo', () => { afterEach(() => { jest.clearAllMocks(); }); -}); +}); */
improved the test coverage to 100% packages/me-at-walmart-container/src/services/user/getAssociateInfo.ts
improved the test coverage to 100% packages/me-at-walmart-container/src/services/user/getAssociateInfo.ts
6536f55f254cfc365836d65bac1e7f8141f71de7
--- graphql.yml @@ -24,7 +24,6 @@ applications: - 'v3' - 'Drop14' - name: 'GetTeamById' - hash: '8a0ff1bceff296ade72cd86c88273c0924510d42ff6bd3487819814045781f31' queryTemplate: 'src/queries/getTeamById.graphql' tags: - 'v2' @@ -53,7 +52,6 @@ applications: - 'v3' - 'Drop14' - name: 'GetTeamById' - hash: '8a0ff1bceff296ade72cd86c88273c0924510d42ff6bd3487819814045781f31' queryTemplate: 'src/queries/getTeamById.graphql' tags: - 'v2' @@ -82,7 +80,6 @@ applications: - 'v3' - 'Drop14' - name: 'GetTeamById' - hash: '8a0ff1bceff296ade72cd86c88273c0924510d42ff6bd3487819814045781f31' queryTemplate: 'src/queries/getTeamById.graphql' tags: - 'v2' --- graphql.yml @@ -24,7 +24,6 @@ applications: - 'v3' - 'Drop14' - name: 'GetTeamById' - hash: '8a0ff1bceff296ade72cd86c88273c0924510d42ff6bd3487819814045781f31' queryTemplate: 'src/queries/getTeamById.graphql' tags: - 'v2' @@ -53,7 +52,6 @@ applications: - 'v3' - 'Drop14' - name: 'GetTeamById' - hash: '8a0ff1bceff296ade72cd86c88273c0924510d42ff6bd3487819814045781f31' queryTemplate: 'src/queries/getTeamById.graphql' tags: - 'v2' @@ -82,7 +80,6 @@ applications: - 'v3' - 'Drop14' - name: 'GetTeamById' - hash: '8a0ff1bceff296ade72cd86c88273c0924510d42ff6bd3487819814045781f31' queryTemplate: 'src/queries/getTeamById.graphql' tags: - 'v2'
Removed hash values
Removed hash values
235231030f50c38118a3b62d955504aeb0968f44
--- .yarn/patches/@walmart-ask-sam-mini-app-npm-1.29.3-61985fa7e6.patch @@ -1,12 +0,0 @@ -diff --git a/dist/components/item-details/ItemBarcode.js b/dist/components/item-details/ItemBarcode.js -index ec1c66ed8de9ebb9be326888acfa1c4dcf524577..a2bd72bbccd7c90f66e34b5c8f5f96e31ca90479 100644 ---- a/dist/components/item-details/ItemBarcode.js -+++ b/dist/components/item-details/ItemBarcode.js -@@ -1,6 +1,6 @@ - import React from 'react'; - import { Image, StyleSheet, Text, View } from 'react-native'; --import Barcode from 'react-native-barcode-builder'; -+import Barcode from '@walmart/react-native-barcode-builder'; - import { Images, Metrics, Colors, Fonts } from '../../theme'; - import { getTestProps } from '../../transforms/getTestProps'; - const styles = StyleSheet.create({ --- package.json @@ -84,7 +84,7 @@ "@walmart/allspark-utils": "6.9.0", "@walmart/amp-mini-app": "1.2.8", "@walmart/ask-sam-chat-components": "^0.2.7", - "@walmart/ask-sam-mini-app": "patch:@walmart/ask-sam-mini-app@npm%3A1.29.3#~/.yarn/patches/@walmart-ask-sam-mini-app-npm-1.29.3-61985fa7e6.patch", + "@walmart/ask-sam-mini-app": "1.31.5", "@walmart/associate-listening-mini-app": "1.2.32", "@walmart/attendance-mini-app": "3.156.0", "@walmart/avp-feature-app": "0.16.19", --- yarn.lock @@ -7672,9 +7672,9 @@ __metadata: languageName: node linkType: hard -"@walmart/ask-sam-mini-app@npm:1.29.3": - version: 1.29.3 - resolution: "@walmart/ask-sam-mini-app@npm:1.29.3::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fask-sam-mini-app%2F-%2F%40walmart%2Fask-sam-mini-app-1.29.3.tgz" +"@walmart/ask-sam-mini-app@npm:1.31.5": + version: 1.31.5 + resolution: "@walmart/ask-sam-mini-app@npm:1.31.5::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fask-sam-mini-app%2F-%2F%40walmart%2Fask-sam-mini-app-1.31.5.tgz" dependencies: apisauce: "npm:^1.1.2" numeral: "npm:^2.0.6" @@ -7700,58 +7700,6 @@ __metadata: moment: ">=2.26" react: ">=18.2.0" react-native: 0.73.7 - react-native-barcode-builder: ">=2" - react-native-blob-util: ">=0.16" - react-native-device-info: ">=10.3" - react-native-error-boundary: ">=1.1.6" - react-native-modal: ">=13" - react-native-pdf: ">=6.6.2" - react-native-popup-menu: ">=0.15.9" - react-native-qrcode-svg: ">=6.1.2" - react-native-safe-area-context: 4.8.2 - react-native-svg: ">=14.0" - react-native-tab-view: ">=3.3" - react-native-typing-animation: ">=0.1" - react-native-vector-icons: ">=9" - react-native-video: ">=5.2" - react-native-view-shot: ">=3.4" - react-native-webview: ">=13.2" - react-native-wm-voice-text: ">=0.3" - reselect: ">=4" - victory-native: ">=36.5" - checksum: 10c0/965c9a2698b5bea208afcc4b1a6936440d293e3597ad8b729e6546cd20bcb5d65853c3b7da1627ae96929a93a2918bf6a50672b2234c4e351d180d1cd596a30e - languageName: node - linkType: hard - -"@walmart/ask-sam-mini-app@patch:@walmart/ask-sam-mini-app@npm%3A1.29.3#~/.yarn/patches/@walmart-ask-sam-mini-app-npm-1.29.3-61985fa7e6.patch": - version: 1.29.3 - resolution: "@walmart/ask-sam-mini-app@patch:@walmart/ask-sam-mini-app@npm%3A1.29.3%3A%3A__archiveUrl=https%253A%252F%252Fnpm.ci.artifacts.walmart.com%253A443%252Fartifactory%252Fapi%252Fnpm%252Fnpme-npm%252F%2540walmart%252Fask-sam-mini-app%252F-%252F%2540walmart%252Fask-sam-mini-app-1.29.3.tgz#~/.yarn/patches/@walmart-ask-sam-mini-app-npm-1.29.3-61985fa7e6.patch::version=1.29.3&hash=fd78ea" - dependencies: - apisauce: "npm:^1.1.2" - numeral: "npm:^2.0.6" - reduxsauce: "npm:^1.2.0" - peerDependencies: - "@apollo/client": ">=3.7.3" - "@react-native/gradle-plugin": ">=0.73.4" - "@react-navigation/native": ">=6.0.0" - "@react-navigation/stack": ">=6.0.0" - "@terrylinla/react-native-sketch-canvas": "*" - "@walmart/allspark-foundation": "*" - "@walmart/ask-sam-chat-components": ">=0.2.9" - "@walmart/core-services": ">=6.1.0" - "@walmart/gtp-shared-components": ">=2.2.1" - "@walmart/redux-store": ">=3.1.4" - "@walmart/schedule-mini-app": "*" - "@walmart/ui-components": ">=1.5" - "@walmart/wfm-ui": "*" - axios: ">=1.2.6" - expo: 50.0.17 - expo-linear-gradient: ">=12.7.2" - lodash: ">=4.17" - moment: ">=2.26" - react: ">=18.2.0" - react-native: 0.73.7 - react-native-barcode-builder: ">=2" react-native-blob-util: ">=0.16" react-native-device-info: ">=10.3" react-native-error-boundary: ">=1.1.6" @@ -7770,7 +7718,7 @@ __metadata: react-native-wm-voice-text: ">=0.3" reselect: ">=4" victory-native: ">=36.5" - checksum: 10c0/a985ba6c7dab24567e922ab5708c67cb2dfffe03efa75fb67ea55e97c9ad337f9cb0c2b6e51e452068ed9d19eebfaf3b55e94babed51ee9be56daed2f357e917 + checksum: 10c0/32c74fdcd4f7c3b9e0aba092d6cbf89172618b44c332626f507ca63d0e98cf289788a3b9d2b948b50b23e73755e8c488d7c9b69ae02f295528ed9f1c421b4fb6 languageName: node linkType: hard @@ -8682,7 +8630,7 @@ __metadata: "@walmart/allspark-utils": "npm:6.9.0" "@walmart/amp-mini-app": "npm:1.2.8" "@walmart/ask-sam-chat-components": "npm:^0.2.7" - "@walmart/ask-sam-mini-app": "patch:@walmart/ask-sam-mini-app@npm%3A1.29.3#~/.yarn/patches/@walmart-ask-sam-mini-app-npm-1.29.3-61985fa7e6.patch" + "@walmart/ask-sam-mini-app": "npm:1.31.5" "@walmart/associate-listening-mini-app": "npm:1.2.32" "@walmart/attendance-mini-app": "npm:3.156.0" "@walmart/avp-feature-app": "npm:0.16.19"
fix(ask sam): OPIF-199178,SMBLV-8692 bump ask sam version to Drop 31 latest (#4299)
fix(ask sam): OPIF-199178,SMBLV-8692 bump ask sam version to Drop 31 latest (#4299) * chore(ask-sam-mini-app): SMBLV-8895 barcode-builder library upgrade * fix: OPIF-199178 Compensable check added to mini app redirect for 'S' * fix(ask sam mini app version): OPIF-199178 compensable check fix * build(ask sam mini app): SMBLV-8898 resolve conflicts with develop --------- Co-authored-by: Savankumar Akbari - sakbari <sakbari@m-c02rv0v4g8wl.homeoffice.wal-mart.com>
ddd4f838b030862819fa1b74f26ebbf73023bce4
--- saucelabs/.looper-native-common-saucelabs.yml @@ -35,6 +35,7 @@ tools: flows: npm-install-and-coverage: + - npm install -g json-edit-cli && json set package.json --key=dependencies.react-native-wm-barcode --value=2.3.0 - npm install - (name put appropriate env file in place) npm run env:${env} - npm run coverage
SSMP-516 set compatible version for barcode package to allow builds for simulator (#326)
SSMP-516 set compatible version for barcode package to allow builds for simulator (#326) Co-authored-by: Hitesh Arora - h0a006n <Hitesh.Arora@walmart.com>
6ff7ab9789d358528e78566cca16e0377e757bbd
--- package-lock.json @@ -4343,9 +4343,9 @@ "integrity": "sha512-qJaaKPSs5rNbukmidrZoqqWylzPX1nos0NwavGpgMjfCIvRuAE83yxNgNMV2KNP8y42YfNhEQlMJ5dCnsg/vWw==" }, "@walmart/push-to-talk-mini-app": { - "version": "0.5.91", - "resolved": "https://npme.walmart.com/@walmart/push-to-talk-mini-app/-/push-to-talk-mini-app-0.5.91.tgz", - "integrity": "sha512-cHiUrL7DoEVWYtOqXfWP7xazQytO30VNHRk8J7HXSG1Mnae8p723IThp+ffAW80xnkhYi5uMuOPC3XPxm7BBSw==" + "version": "0.5.92", + "resolved": "https://npme.walmart.com/@walmart/push-to-talk-mini-app/-/push-to-talk-mini-app-0.5.92.tgz", + "integrity": "sha512-+BvvgK5NSrrCzHdMgjd2MNxQ/IhVK/blQUkYBNrm6tx8M6O3gxnEIgccqXri7rtgrix+uSskChkuP4nTZeTzzA==" }, "@walmart/react-native-collapsible": { "version": "1.5.3", --- package.json @@ -91,7 +91,7 @@ "@walmart/moment-walmart": "1.0.4", "@walmart/payrollsolution_miniapp": "0.91.0", "@walmart/price-changes-mini-app": "1.0.6", - "@walmart/push-to-talk-mini-app": "0.5.91", + "@walmart/push-to-talk-mini-app": "0.5.92", "@walmart/react-native-env": "^0.2.0", "@walmart/react-native-logger": "^1.28.0", "@walmart/react-native-shared-navigation": "^0.4.0",
updating package version
updating package version
ab2b63070207ea639e7b2615c4f570601d2f70f0
--- core/__tests__/PinAccess/ActivityMonitorGuardTest.tsx @@ -0,0 +1,38 @@ +import React from 'react'; +import {useDispatch} from 'react-redux'; +import {AllsparkNavigationClient} from '@walmart/allspark-foundation/Navigation'; +import {render} from '@testing-library/react-native'; +import {Text} from 'react-native'; +import {ActivityMonitorGuard} from '../../src/PinAccess/ActivityMonitorGuard'; + +describe('ActivityMonitorGuard tests', () => { + const dispatch = jest.fn(); + + beforeEach(() => { + jest.useFakeTimers(); + (useDispatch as jest.Mock).mockReturnValue(dispatch); + (AllsparkNavigationClient.getCurrentRouteName as jest.Mock).mockReturnValue( + 'HomeScreen', + ); + }); + + afterEach(() => { + jest.useRealTimers(); + jest.clearAllMocks(); + }); + + const children = <Text>Child component</Text>; + const props = {children}; + it('matches snapshot', async () => { + const component = render(<ActivityMonitorGuard {...props} />); + const onIdleTimeLapsed = + component.UNSAFE_root._fiber.child.pendingProps.onIdleTimeLapsed; + expect(component.getByText('Child component')).toBeTruthy(); + onIdleTimeLapsed('timeout'); + jest.advanceTimersByTime(400); + expect(dispatch).not.toHaveBeenCalled(); + jest.advanceTimersByTime(200); + expect(dispatch).toHaveBeenCalledTimes(1); + expect(component.toJSON()).toMatchSnapshot(); + }); +}); --- core/__tests__/PinAccess/__snapshots__/ActivityMonitorGuardTest.tsx.snap @@ -0,0 +1,14 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ActivityMonitorGuard tests matches snapshot 1`] = ` +<ActivityMonitor + backgroundIdleTime={14400000} + enabled={false} + inactivityTime={300000} + onIdleTimeLapsed={[Function]} +> + <Text> + Child component + </Text> +</ActivityMonitor> +`;
added activity monitor guard test file
added activity monitor guard test file
effc26b73e0fcaa19eff8f63321dec141d47288a
--- package-lock.json @@ -34,7 +34,7 @@ "@walmart/allspark-graphql-client": "^0.1.0", "@walmart/allspark-home-mini-app": "0.6.14", "@walmart/allspark-neon-core": "0.1.31", - "@walmart/amp-mini-app": "0.2.13", + "@walmart/amp-mini-app": "1.0.11", "@walmart/ask-sam-chat-components": "^0.2.7", "@walmart/ask-sam-mini-app": "1.3.52", "@walmart/attendance-mini-app": "0.33.0", @@ -4674,24 +4674,18 @@ } }, "node_modules/@walmart/amp-mini-app": { - "version": "0.2.13", - "resolved": "https://npme.walmart.com/@walmart/amp-mini-app/-/amp-mini-app-0.2.13.tgz", - "integrity": "sha512-wMf1jjs+qo9wq9rtBjCg8swt0UV4vxrakMkXCS+6zGUb6bihTRH0F5hsfJsx7hyCG5Vq0uASzB1MOLgoSxIzPQ==", + "version": "1.0.11", + "resolved": "https://npme.walmart.com/@walmart/amp-mini-app/-/amp-mini-app-1.0.11.tgz", + "integrity": "sha512-fBbv+R2p8fFwKeXnnm+df21WQC4kL5Z6OO9x/pBLOJmuIJO4jdOiRq7gDBRe9eTcB1ZRmBwrebLUiVoFYRf3oQ==", + "hasInstallScript": true, "peerDependencies": { - "@react-navigation/native": "^5.7.3", - "@react-navigation/stack": "^5.9.0", - "@walmart/core-services": "^0.1.27", - "@walmart/functional-components": "^1.0.27", - "@walmart/gtp-shared-components": "^0.2.2", - "@walmart/react-native-logger": "^1.9.0", - "@walmart/react-native-shared-navigation": "^0.2.0", - "@walmart/redux-store": "^1.0.12", - "react": "^16.13.1", - "react-native": "^0.63.2", - "react-native-encrypted-storage": "^4.0.2", - "react-native-wm-telemetry": "^0.3.0", - "react-redux": "^7.2.1", - "redux": "^4.0.5" + "@react-navigation/native": "^6.0.0", + "@react-navigation/stack": "^6.1.0", + "@walmart/core-services": "^1.4.9", + "@walmart/gtp-shared-components": "^1.8.17", + "@walmart/redux-store": "^3.1.3", + "react": "^18.2.0", + "react-native": "~0.70.5" } }, "node_modules/@walmart/ask-sam-chat-components": { @@ -24988,9 +24982,9 @@ "integrity": "sha512-SCQFcGc3IHLT8b0xFRjhSd0bidmlNBcK8/rCnKmSAXZ3Z351jbqzYsutJ/ZEiR9nlP9Qu9tAWXSos2UnYFut3w==" }, "@walmart/amp-mini-app": { - "version": "0.2.13", - "resolved": "https://npme.walmart.com/@walmart/amp-mini-app/-/amp-mini-app-0.2.13.tgz", - "integrity": "sha512-wMf1jjs+qo9wq9rtBjCg8swt0UV4vxrakMkXCS+6zGUb6bihTRH0F5hsfJsx7hyCG5Vq0uASzB1MOLgoSxIzPQ==" + "version": "1.0.11", + "resolved": "https://npme.walmart.com/@walmart/amp-mini-app/-/amp-mini-app-1.0.11.tgz", + "integrity": "sha512-fBbv+R2p8fFwKeXnnm+df21WQC4kL5Z6OO9x/pBLOJmuIJO4jdOiRq7gDBRe9eTcB1ZRmBwrebLUiVoFYRf3oQ==" }, "@walmart/ask-sam-chat-components": { "version": "0.2.13", --- package.json @@ -77,7 +77,7 @@ "@walmart/allspark-graphql-client": "^0.1.0", "@walmart/allspark-home-mini-app": "0.6.14", "@walmart/allspark-neon-core": "0.1.31", - "@walmart/amp-mini-app": "0.2.13", + "@walmart/amp-mini-app": "1.0.11", "@walmart/ask-sam-chat-components": "^0.2.7", "@walmart/ask-sam-mini-app": "1.3.52", "@walmart/attendance-mini-app": "0.33.0",
bump amp version to 1.0.11
bump amp version to 1.0.11
3c2fd11466db6488248f965d111635716d432651
--- patches/@walmart+taskit-mini-app+0.34.5-beta.9.patch @@ -1,38 +0,0 @@ -diff --git a/node_modules/@walmart/taskit-mini-app/src/components/ImagePreview/index.tsx b/node_modules/@walmart/taskit-mini-app/src/components/ImagePreview/index.tsx -index 0a0e415..bf1fdf9 100644 ---- a/node_modules/@walmart/taskit-mini-app/src/components/ImagePreview/index.tsx -+++ b/node_modules/@walmart/taskit-mini-app/src/components/ImagePreview/index.tsx -@@ -6,7 +6,7 @@ import { - TouchableOpacity, - StyleSheet, - } from 'react-native'; --import Carousel from 'react-native-snap-carousel'; -+import Carousel from 'react-native-new-snap-carousel'; - import {useNavigation} from '@react-navigation/native'; - - import {FontIcon} from '@walmart/ui-components'; -diff --git a/node_modules/@walmart/taskit-mini-app/src/components/SliderPagination/SliderPagination.tsx b/node_modules/@walmart/taskit-mini-app/src/components/SliderPagination/SliderPagination.tsx -index 78e9c25..d2f8c99 100644 ---- a/node_modules/@walmart/taskit-mini-app/src/components/SliderPagination/SliderPagination.tsx -+++ b/node_modules/@walmart/taskit-mini-app/src/components/SliderPagination/SliderPagination.tsx -@@ -1,6 +1,6 @@ - import React from 'react'; - import {View, StyleSheet} from 'react-native'; --import {Pagination} from 'react-native-snap-carousel'; -+import {Pagination} from 'react-native-new-snap-carousel'; - import {colors} from '@walmart/gtp-shared-components'; - - const SliderPagination = ({length, activeSlide, style}): JSX.Element => { -diff --git a/node_modules/@walmart/taskit-mini-app/src/containers/TaskDetails/index.tsx b/node_modules/@walmart/taskit-mini-app/src/containers/TaskDetails/index.tsx -index 2cfbd77..71c3f35 100644 ---- a/node_modules/@walmart/taskit-mini-app/src/containers/TaskDetails/index.tsx -+++ b/node_modules/@walmart/taskit-mini-app/src/containers/TaskDetails/index.tsx -@@ -6,7 +6,7 @@ import { - SafeAreaView, - } from 'react-native'; - import {ScrollView} from 'react-native-gesture-handler'; --import Carousel from 'react-native-snap-carousel'; -+import Carousel from 'react-native-new-snap-carousel'; - import {useTranslation} from 'react-i18next'; - import {useDispatch, useSelector} from 'react-redux'; - import {getVersion} from 'react-native-device-info';
Removed taskit patch file
Removed taskit patch file
442f6691245118fe8ba71ce49c7fac0d221b9d39
--- package.json @@ -86,7 +86,7 @@ "@walmart/inbox-mini-app": "0.18.0", "@walmart/iteminfo-mini-app": "2.0.16", "@walmart/manager-approvals-miniapp": "0.0.58", - "@walmart/metrics-mini-app": "0.4.14", + "@walmart/metrics-mini-app": "0.4.15", "@walmart/moment-walmart": "1.0.4", "@walmart/push-to-talk-mini-app": "0.5.39", "@walmart/react-native-env": "^0.2.0",
bumping metrics version
bumping metrics version
49020ff4fe5c8e711798f822bf74aae24818023b
--- android/app/build.gradle @@ -134,7 +134,7 @@ android { applicationId "com.walmart.stores.allspark.beta" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 11 + versionCode 12 versionName "1.0.1" } splits { --- ios/AllSpark/Info.plist @@ -34,7 +34,7 @@ </dict> </array> <key>CFBundleVersion</key> - <string>11</string> + <string>12</string> <key>LSApplicationQueriesSchemes</key> <array> <string>invmgmt</string> --- ios/AllSparkTests/Info.plist @@ -19,6 +19,6 @@ <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> - <string>11</string> + <string>12</string> </dict> </plist>
Incrementing build number
Incrementing build number
219b7787bbf9ca8272eba835baa16e093ed24162
--- packages/allspark-foundation/src/Components/Hub/Container/index.tsx @@ -1,23 +1,21 @@ import { Button } from '@walmart/gtp-shared-components/dist'; -export * from './types'; - -interface TeamWidget { +export interface TeamWidget { name: string; rank: number; enable: boolean; } - interface Team { +export interface Team { name: string; widgets: TeamWidget[]; } - interface TeamWidgetMapping { +export interface TeamWidgetMapping { [key: string]: Team; } - interface ValidatedTeamWidgetMapping { +export interface ValidatedTeamWidgetMapping { [key: string]: { name: string, widgets: string[] }; } @@ -37,48 +35,44 @@ const jsonData = {"teamWidgetMapping": } } -export const Container = () => { + export function validateWidgets(data: { teamWidgetMapping: TeamWidgetMapping }): ValidatedTeamWidgetMapping { + const validatedData: ValidatedTeamWidgetMapping = {}; - function validateWidgets(data: { teamWidgetMapping: TeamWidgetMapping }): ValidatedTeamWidgetMapping { - const validatedData: ValidatedTeamWidgetMapping = {}; - - // Iterate over each team in the data - for (const teamId in data.teamWidgetMapping) { - if (Object.prototype.hasOwnProperty.call(data.teamWidgetMapping, teamId)) { - const team = data.teamWidgetMapping[teamId]; - const validatedTeam: { name: string, widgets: string[] } = { - name: team.name, - widgets: [] - }; - - // Sort widgets by rank - team.widgets.sort((a, b) => a.rank - b.rank); - - // Validate each widget - for (const widget of team.widgets) { - if (widget.enable) { - validatedTeam.widgets.push(widget.name); - } - } - - // Add the validated team to the result - validatedData[teamId] = validatedTeam; - } + // Iterate over each team in the data + for (const teamId in data.teamWidgetMapping) { + if (Object.prototype.hasOwnProperty.call(data.teamWidgetMapping, teamId)) { + const team = data.teamWidgetMapping[teamId]; + const validatedTeam: { name: string, widgets: string[] } = { + name: team.name, + widgets: [] + }; + + // Sort widgets by rank + team.widgets.sort((a, b) => a.rank - b.rank); + + // Validate each widget + for (const widget of team.widgets) { + if (widget.enable) { + validatedTeam.widgets.push(widget.name); } - - return validatedData; } - const validatedWidgets = validateWidgets(jsonData) + // Add the validated team to the result + validatedData[teamId] = validatedTeam; + } + } + + return validatedData; +} + +const validatedWidgets = validateWidgets(jsonData) console.log('WIDGETS LIST--', validatedWidgets); - + +export const Container = () => { + + return <> - <Button - testID="validate-widget" - onPress={() => validateWidgets(jsonData)} - > - WIDGET VALIDATION - </Button> + </> }
rebase commit 3
rebase commit 3
0b2b1d74c6e27d50f059e4a3546d55d571bc4d7d
--- package.json @@ -177,7 +177,7 @@ "@walmart/timesheet-feature-app": "0.2.0-beta.17", "@walmart/topstock-mini-app": "1.28.16", "@walmart/translator-mini-app": "1.8.14", - "@walmart/ui-components": "1.27.2", + "@walmart/ui-components": "1.27.4", "@walmart/walmart-fiscal-week": "^0.3.6", "@walmart/welcomeme-mini-app": "^1.0.15", "@walmart/wfm-ui": "4.1.0", @@ -453,7 +453,7 @@ "@walmart/me-at-walmart-common": "workspace:^", "@walmart/me-at-walmart-container": "workspace:^", "@walmart/moment-walmart": "1.0.4", - "@walmart/ui-components": "1.27.2", + "@walmart/ui-components": "1.27.4", "axios-cache-adapter": "patch:axios-cache-adapter@npm%3A2.7.3#~/.yarn/patches/axios-cache-adapter-npm-2.7.3-26c357b785.patch", "axios-cache-interceptor": "patch:axios-cache-interceptor@npm%3A1.5.1#~/.yarn/patches/axios-cache-interceptor-npm-1.5.1-c84dd3f9ed.patch", "axios": "~1.11.0", --- yarn.lock @@ -8562,7 +8562,7 @@ __metadata: "@walmart/timesheet-feature-app": "npm:0.2.0-beta.17" "@walmart/topstock-mini-app": "npm:1.28.16" "@walmart/translator-mini-app": "npm:1.8.14" - "@walmart/ui-components": "npm:1.27.2" + "@walmart/ui-components": "npm:1.27.4" "@walmart/walmart-fiscal-week": "npm:^0.3.6" "@walmart/welcomeme-mini-app": "npm:^1.0.15" "@walmart/wfm-ui": "npm:4.1.0" @@ -9688,9 +9688,9 @@ __metadata: languageName: node linkType: hard -"@walmart/ui-components@npm:1.27.2": - version: 1.27.2 - resolution: "@walmart/ui-components@npm:1.27.2::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fui-components%2F-%2F%40walmart%2Fui-components-1.27.2.tgz" +"@walmart/ui-components@npm:1.27.4": + version: 1.27.4 + resolution: "@walmart/ui-components@npm:1.27.4::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fui-components%2F-%2F%40walmart%2Fui-components-1.27.4.tgz" peerDependencies: "@react-navigation/stack": ">=6.1.0" "@walmart/allspark-foundation": "*" @@ -9710,7 +9710,7 @@ __metadata: react-native-safe-area-context: ">=3.1.3" react-native-vector-icons: ">=7.0.0" react-native-webview: ">=10.10.2" - checksum: 10c0/ea4a6cf9481f399f430f13956114607675a963a94bc3ff90b0977f5b0d5607d9fc8a620030c464968a49604448881aff83a5584bfb0f5ebb263859d4e9706f36 + checksum: 10c0/2418f63c4ccc58fc10477ed0e60011070298861ff4fbb54d4367056ea7db236e75d5da8662a7394f1194dd16054d39df3b925224a6368997e3d9f6fb51056206 languageName: node linkType: hard
fix(ui-component): translation bug fix (#5221)
fix(ui-component): translation bug fix (#5221) Co-authored-by: Maksym Novakh - m0n09mr <Maksym.Novakh0@walmart.com>
865b649766118b4d7f2c2abc59c7fe86d1213e72
--- package.json @@ -88,7 +88,7 @@ "@walmart/counts-component-miniapp": "0.1.2", "@walmart/emergency-mini-app": "1.19.0", "@walmart/exception-mini-app": "1.0.16", - "@walmart/facilities-management-miniapp": "0.5.23", + "@walmart/facilities-management-miniapp": "0.5.24", "@walmart/feedback-all-spark-miniapp": "0.9.10", "@walmart/financial-wellbeing-feature-app": "1.1.2", "@walmart/functional-components": "2.0.6",
Update package.json
Update package.json
d7ae1ff02ceb2febdd9db5b12a1b30c36b306b02
--- packages/allspark-foundation/src/Components/ComponentContainers.md @@ -38,14 +38,11 @@ Or with `AllsparkComponentContainers`: <AllsparkComponentContainers.List container='Me@Walmart.HomeScreen' {...props} /> ``` -##### Configuration +##### List Control -The `List` component accepts optional props to control which components are rendered. +The `List` component accepts an optional `allow` prop to control which components are rendered and in what order. -- `allow` - A list of component ids to allow. If provided, only components with ids in this list will be rendered. -- `deny` - A list of component ids to deny. If provided, components with ids in this list will not be rendered. - -> Note. If both `allow` and `deny` are provided, `allow` will take precedence. +- `allow` - A list of component ids to allow. If provided, only components with ids in this list will be rendered. And they will be rendered in the order they are provided. ```tsx const ALLOW_LIST = ['emergency-card', ...];
chore: update component container docs
chore: update component container docs
4e6ba115de44cb5cdbbe22343cd4c63a8f337e94
--- __tests__/store/selectors/selectors.test.ts @@ -15,7 +15,6 @@ import * as selectorModule from '../../../src/store/selectors/selectors'; describe('AssociateExpHubSelectors', () => { // Setup test data for our tests - const timestamp = Date.now(); const mockState = { AssociateExpHub: { // Team selection state
chore(ui): update myteam version and roster version and tests
chore(ui): update myteam version and roster version and tests
b9ee606f05b34b6914fc6c0108a3a60c5f4806e7
--- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/myteam-mini-app", - "version": "1.15.20", + "version": "1.15.21", "main": "dist/index.js", "files": [ "dist" @@ -99,7 +99,7 @@ "@walmart/react-native-shared-navigation": "6.1.4", "@walmart/react-native-sumo-sdk": "2.6.0", "@walmart/redux-store": "3.7.0", - "@walmart/roster-mini-app": "2.12.21", + "@walmart/roster-mini-app": "2.12.22", "@walmart/ui-components": "1.15.1", "babel-jest": "^29.2.1", "chance": "^1.1.11", --- yarn.lock @@ -6497,7 +6497,7 @@ __metadata: "@walmart/react-native-shared-navigation": "npm:6.1.4" "@walmart/react-native-sumo-sdk": "npm:2.6.0" "@walmart/redux-store": "npm:3.7.0" - "@walmart/roster-mini-app": "npm:2.12.21" + "@walmart/roster-mini-app": "npm:2.12.22" "@walmart/ui-components": "npm:1.15.1" babel-jest: "npm:^29.2.1" chance: "npm:^1.1.11" @@ -6678,9 +6678,9 @@ __metadata: languageName: node linkType: hard -"@walmart/roster-mini-app@npm:2.12.21": - version: 2.12.21 - resolution: "@walmart/roster-mini-app@npm:2.12.21" +"@walmart/roster-mini-app@npm:2.12.22": + version: 2.12.22 + resolution: "@walmart/roster-mini-app@npm:2.12.22" peerDependencies: "@react-native-async-storage/async-storage": ^1.21.0 "@react-native-community/netinfo": ^11.0.1 @@ -6722,7 +6722,7 @@ __metadata: redux: ^4.2.1 redux-saga: ^1.2.3 wifi-store-locator: 1.4.1 - checksum: 10c0/4bbf34290ee31cf22e5d72a5575660b1676702334113c7cf3c09bfa3118c8a0a5e3a4bcbdc34ff6844fe41e791672cf12928f4bcef574b2ab8b8d5df8f16cf5b + checksum: 10c0/303638a2f29f4065f197793eea6b9a275fadd30ba2058ea7bf130264c1abbc4df535b1fa3f3c62c1f936ea355b836389b0771f50bf347b797023363e970bdb30 languageName: node linkType: hard
Update my team mini app version
Update my team mini app version
f5ef594c8422a257968200d38fcbed07acbc56b4
--- .looper.yml @@ -11,10 +11,6 @@ flows: - call: pr - yarn run build - npm publish - # - sonar("Sonar"): - # - (name Sonar Scanner) sonar-scanner -Dproject.settings=sonar-project.properties - # - (name Publish Hygieia to Sonar) hygieia.publishSonar() - # - (name Hygieia Publish Build) hygieia.publishBuild() pr: - (name Corepack enable) corepack enable
Update looper files
Update looper files
d4d2ceb581652256d39ff5c8dba791e64d480906
--- package-lock.json @@ -4137,9 +4137,9 @@ } }, "@walmart/allspark-home-mini-app": { - "version": "0.5.19", - "resolved": "https://npme.walmart.com/@walmart/allspark-home-mini-app/-/allspark-home-mini-app-0.5.19.tgz", - "integrity": "sha512-f2P4lXGm/8LlNyRRqRnLZ9sVhJa/IFmDOCRDSN1vPt4DpHfMy+fNbWNvrmwoqJofPCo63ZZ8lZnm04inCxb90w==", + "version": "0.5.23", + "resolved": "https://npme.walmart.com/@walmart/allspark-home-mini-app/-/allspark-home-mini-app-0.5.23.tgz", + "integrity": "sha512-yNB/y8SoIrsHZ4whROjoTx3D6xz4E/C/f3yxVxM8Lwwlnx2iQGFts6KdzGD8hMcxNH8c4dfzdekNUZn/KK7sVA==", "requires": { "moment": "^2.29.0", "uuid": "^8.3.1" --- package.json @@ -71,7 +71,7 @@ "@sharcoux/slider": "^5.2.1", "@terrylinla/react-native-sketch-canvas": "^0.8.0", "@walmart/allspark-health-survey-mini-app": "0.0.43", - "@walmart/allspark-home-mini-app": "0.5.19", + "@walmart/allspark-home-mini-app": "0.5.23", "@walmart/allspark-me-mini-app": "0.31.2", "@walmart/allspark-neon-core": "0.1.25", "@walmart/ask-sam-mini-app": "0.40.4",
home version bump
home version bump
0f52749319cb0a1d95b8a5d0682bcb7aa19286cb
--- packages/allspark-foundation/__tests__/FeatureRunner/components/UserHeader.test.tsx @@ -2,11 +2,6 @@ import { UserHeader } from '../../../src/FeatureRunner/components/UserHeader'; import { render } from '@testing-library/react-native'; import React from 'react'; -jest.mock('react-redux', () => ({ - ...jest.requireActual('react-redux'), - useSelector: jest.fn(), -})); - jest.mock('../../../src/User', () => ({ UserSelectors: { getOriginalUser: jest.fn(), --- packages/allspark-foundation/__tests__/FeatureRunner/screens/Home.test.tsx @@ -6,11 +6,6 @@ import { UserSelectors } from '../../../src/User'; import { useSelector } from 'react-redux'; -jest.mock('react-redux', () => ({ - ...jest.requireActual('react-redux'), - useSelector: jest.fn(), -})); - jest.mock('../../../src/User', () => ({ UserSelectors: { getOriginalUser: jest.fn(), --- packages/allspark-foundation/__tests__/FeatureRunner/screens/Login.test.tsx @@ -2,11 +2,6 @@ import { Login } from '../../../src/FeatureRunner/screens/Login'; import { render } from '@testing-library/react-native'; import React from 'react'; -jest.mock('react-redux', () => ({ - ...jest.requireActual('react-redux'), - useSelector: jest.fn(), -})); - jest.mock('../../../src/Auth', () => ({ AuthSelectors: { getSigningIn: jest.fn(), --- packages/allspark-foundation/__tests__/FeatureRunner/screens/Permission.test.tsx @@ -9,11 +9,6 @@ import { import { NotificationSelectors } from '../../../src/Notification'; -jest.mock('react-redux', () => ({ - ...jest.requireActual('react-redux'), - useSelector: jest.fn(), -})); - jest.mock('../../../src/Notification', () => ({ NotificationSelectors: { getPermissionStatus: jest.fn(), --- packages/allspark-foundation/__tests__/FeatureRunner/screens/SideMenu.test.tsx @@ -4,11 +4,6 @@ import { SideMenu } from '../../../src/FeatureRunner/screens/SideMenu'; import { render } from '@testing-library/react-native'; -jest.mock('react-redux', () => ({ - ...jest.requireActual('react-redux'), - useSelector: jest.fn(), -})); - describe('SideMenu.tsx', () => { afterEach(() => { jest.clearAllMocks(); --- packages/allspark-foundation/__tests__/Permissions/utils.test.ts @@ -7,6 +7,22 @@ import { isStatusUnset, } from '../../src/Permissions'; +jest.mock('react-native/Libraries/Utilities/Platform', () => { + let platform = { + OS: 'ios', + }; + + const select = jest.fn().mockImplementation((obj) => { + const value = obj[platform.OS]; + return !value ? obj.default : value; + }); + + //@ts-ignore + platform.select = select; + + return platform; +}); + describe('Permissions', () => { afterEach(() => { jest.clearAllMocks(); --- packages/allspark-foundation/__tests__/Scanner/AllSparkScanner.test.tsx @@ -2,12 +2,6 @@ import React from 'react'; import { AllsparkScanner } from '../../src/Scanner'; import { render } from '@testing-library/react-native'; -jest.mock('react-redux', () => ({ - ...jest.requireActual('react-redux'), - useSelector: jest.fn(), - useDispatch: jest.fn(), -})); - jest.mock('../../src/Scanner/utils', () => ({ getScannerLicense: jest.fn(), })); --- packages/allspark-foundation/__tests__/User/components/ImpersonationForm.test.tsx @@ -2,12 +2,6 @@ import { ImpersonationForm } from '../../../src/User/components/ImpersonationFor import React from 'react'; import { render } from '@testing-library/react-native'; -jest.mock('react-redux', () => ({ - ...jest.requireActual('react-redux'), - useSelector: jest.fn(), - useDispatch: jest.fn(), -})); - jest.mock('../../../src/User/selectors', () => ({ UserSelectors: { getOriginalUser: jest.fn(), --- packages/allspark-foundation/__tests__/__mocks__/react-native/Libraries/Utilities/Platform.js @@ -1,14 +0,0 @@ -jest.mock('react-native/Libraries/Utilities/Platform', () => { - let platform = { - OS: 'ios', - }; - - const select = jest.fn().mockImplementation((obj) => { - const value = obj[platform.OS]; - return !value ? obj.default : value; - }); - - platform.select = select; - - return platform; -}); --- packages/allspark-foundation/__tests__/__mocks__/react-redux.js @@ -0,0 +1,5 @@ +jest.mock('react-redux', () => ({ + ...jest.requireActual('react-redux'), + useSelector: jest.fn(), + useDispatch: jest.fn(), +}));
made changes based on comments
made changes based on comments
2265d115de2aa4f4071990842e75e55423cb34d3
--- package-lock.json @@ -39,7 +39,7 @@ "@walmart/ask-sam-mini-app": "1.3.3", "@walmart/config-components": "4.0.1", "@walmart/core-services": "~1.4.9", - "@walmart/core-services-allspark": "~1.10.11", + "@walmart/core-services-allspark": "~1.10.13", "@walmart/core-utils": "~1.3.0", "@walmart/core-widget-registry": "~0.7.1", "@walmart/counts-component-miniapp": "0.0.39", @@ -57,7 +57,7 @@ "@walmart/iteminfo-mini-app": "6.0.1", "@walmart/manager-approvals-miniapp": "0.1.1", "@walmart/me-field-mini-app": "1.1.35", - "@walmart/metrics-mini-app": "0.9.32", + "@walmart/metrics-mini-app": "0.9.34", "@walmart/mod-flex-mini-app": "1.2.7", "@walmart/moment-walmart": "1.0.4", "@walmart/OneWalmart-MiniApp": "1.0.12", @@ -4738,7 +4738,9 @@ } }, "node_modules/@walmart/core-services-allspark": { - "version": "1.10.11", + "version": "1.10.13", + "resolved": "https://npme.walmart.com/@walmart/core-services-allspark/-/core-services-allspark-1.10.13.tgz", + "integrity": "sha512-0SayoNQoMjzokp/cJTZYJ3Y2Keu0cUAEX/FeB3b6APFsozNsqNFGJxOXa0nIPuIQmLB4L9gKiQgPhv/+lxUJ1w==", "license": "ISC", "dependencies": { "crypto-js": "^4.1.1", @@ -5253,9 +5255,9 @@ } }, "node_modules/@walmart/metrics-mini-app": { - "version": "0.9.32", - "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.9.32.tgz", - "integrity": "sha512-TEyG8Nz216ECPEaZY0EzU0jym+BHYBihZQv5jSB5/mbFFRkIiafHXFIAThTljg4Nflv5TjUjRglzghjadEWxHw==", + "version": "0.9.34", + "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.9.34.tgz", + "integrity": "sha512-e7uTxoI3M/x80bqxtxBZdlzvksWW/gaFmfhrXuvFfmWWBjkCCfU8JHMliPpgzPii9EBcugueF3luScVl8aMFAw==", "dependencies": { "@types/base-64": "^1.0.0", "apisauce": "1.1.2", @@ -24762,7 +24764,9 @@ } }, "@walmart/core-services-allspark": { - "version": "1.10.11", + "version": "1.10.13", + "resolved": "https://npme.walmart.com/@walmart/core-services-allspark/-/core-services-allspark-1.10.13.tgz", + "integrity": "sha512-0SayoNQoMjzokp/cJTZYJ3Y2Keu0cUAEX/FeB3b6APFsozNsqNFGJxOXa0nIPuIQmLB4L9gKiQgPhv/+lxUJ1w==", "requires": { "crypto-js": "^3.3.0", "jwt-decode": "^3.1.2", @@ -24859,9 +24863,9 @@ "integrity": "sha512-ERQVQCZSYCKEZwgSAlPgAx0qKtqGudUA53rfxZ3RgDznTDqoaxmXG6aA3iCtfZpoF2RKr7CAKc/RYABitQdt4g==" }, "@walmart/metrics-mini-app": { - "version": "0.9.32", - "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.9.32.tgz", - "integrity": "sha512-TEyG8Nz216ECPEaZY0EzU0jym+BHYBihZQv5jSB5/mbFFRkIiafHXFIAThTljg4Nflv5TjUjRglzghjadEWxHw==", + "version": "0.9.34", + "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.9.34.tgz", + "integrity": "sha512-e7uTxoI3M/x80bqxtxBZdlzvksWW/gaFmfhrXuvFfmWWBjkCCfU8JHMliPpgzPii9EBcugueF3luScVl8aMFAw==", "requires": { "@types/base-64": "^1.0.0", "apisauce": "1.1.2", --- package.json @@ -82,7 +82,7 @@ "@walmart/ask-sam-mini-app": "1.3.3", "@walmart/config-components": "4.0.1", "@walmart/core-services": "~1.4.9", - "@walmart/core-services-allspark": "~1.10.11", + "@walmart/core-services-allspark": "~1.10.13", "@walmart/core-utils": "~1.3.0", "@walmart/core-widget-registry": "~0.7.1", "@walmart/counts-component-miniapp": "0.0.39", @@ -100,7 +100,7 @@ "@walmart/iteminfo-mini-app": "6.0.1", "@walmart/manager-approvals-miniapp": "0.1.1", "@walmart/me-field-mini-app": "1.1.35", - "@walmart/metrics-mini-app": "0.9.32", + "@walmart/metrics-mini-app": "0.9.34", "@walmart/mod-flex-mini-app": "1.2.7", "@walmart/moment-walmart": "1.0.4", "@walmart/pay-stub-miniapp": "0.9.5",
metrics mini app - SMBLV 2998
metrics mini app - SMBLV 2998
840b8af75bf06477f5281ad0106f053fee5937b7
--- packages/allspark-http-client/src/HttpClient.ts @@ -95,7 +95,13 @@ class HttpClient extends Axios implements IHttpClient { return cloneInstance; } - const { headers = {}, interceptors = [], ...restConfig } = config; + const { + headers = {}, + interceptors = [], + requestInterceptors, + responseInterceptors, + ...restConfig + } = config; // Merge Config // @ts-ignore - mergeConfig exists but is not defined on type @@ -110,12 +116,12 @@ class HttpClient extends Axios implements IHttpClient { // Merge Interceptors // @ts-ignore - legacy format - if (restConfig.requestInterceptors || restConfig.responseInterceptors) { + if (requestInterceptors || responseInterceptors) { warnForIncorrectInterceptors(key); - if (restConfig.requestInterceptors) { + if (requestInterceptors) { interceptors.push( - ...restConfig.requestInterceptors.map((requestInterceptor) => { + ...requestInterceptors.map((requestInterceptor) => { return { request: requestInterceptor, response: undefined, @@ -124,9 +130,9 @@ class HttpClient extends Axios implements IHttpClient { ); } - if (restConfig.responseInterceptors) { + if (responseInterceptors) { interceptors.push( - ...restConfig.responseInterceptors.map((responseInterceptor) => { + ...responseInterceptors.map((responseInterceptor) => { return { request: undefined, response: responseInterceptor,
fix: handling legacy interceptors bug during instantiation of http client instance
fix: handling legacy interceptors bug during instantiation of http client instance
d5e192bf5d2f6330fe0d13db1dbc2c7589db0932
--- src/hooks/roster.ts @@ -5,6 +5,7 @@ import { useGetDailyRosterLazyQuery, useGetDailyRosterQuery, } from '../queries/getDailyRoster'; +import {AppState} from "react-native"; // import {useDailyRosterMock} from '../mocks'; export const useDailyRoster = () => { @@ -46,3 +47,8 @@ export const useDailyRosterLazy = () => { errorPolicy: 'all', }); }; + +//TODO: What happens in case of RBAC failure? +export const useIsWeeklyScheduleLinkVisible = () => { + const getRbacConfig = (state: AppState) => state?.rbac; +}; --- src/redux/selectors.ts @@ -41,6 +41,14 @@ export const getUploadingBlob = createSelector( (state) => state.uploadingBlob, ); +const getRbacState: { + data: any; //TODO: Determine data type + error: boolean; + fetchingPolicy: boolean; + loaded: boolean; + policyExpired: boolean; +} = (state: GlobalState) => state?.rbac; + export const getPlayingReceivingPTT = createSelector( [getTextingState], (state) => state.isReceivingPTT, --- src/hooks/roster.ts @@ -5,6 +5,7 @@ import { useGetDailyRosterLazyQuery, useGetDailyRosterQuery, } from '../queries/getDailyRoster'; +import {AppState} from "react-native"; // import {useDailyRosterMock} from '../mocks'; export const useDailyRoster = () => { @@ -46,3 +47,8 @@ export const useDailyRosterLazy = () => { errorPolicy: 'all', }); }; + +//TODO: What happens in case of RBAC failure? +export const useIsWeeklyScheduleLinkVisible = () => { + const getRbacConfig = (state: AppState) => state?.rbac; +}; --- src/redux/selectors.ts @@ -41,6 +41,14 @@ export const getUploadingBlob = createSelector( (state) => state.uploadingBlob, ); +const getRbacState: { + data: any; //TODO: Determine data type + error: boolean; + fetchingPolicy: boolean; + loaded: boolean; + policyExpired: boolean; +} = (state: GlobalState) => state?.rbac; + export const getPlayingReceivingPTT = createSelector( [getTextingState], (state) => state.isReceivingPTT,
starting RBAC impl
starting RBAC impl
1b50719679d2ad933d2cade466317c7cd43dffcf
--- package-lock.json @@ -2990,9 +2990,9 @@ } }, "@walmart/allspark-health-survey-mini-app": { - "version": "0.0.31", - "resolved": "https://npme.walmart.com/@walmart/allspark-health-survey-mini-app/-/allspark-health-survey-mini-app-0.0.31.tgz", - "integrity": "sha512-VG/trWfFK2QVjCyZi4ZsiAkA8hfBOR+xXHJFUiKLlb+xzxB2pA9ZtZwoGn9SNBRzJ0JEq9pbLIBSZsi3v4rh8w==", + "version": "0.0.32", + "resolved": "https://npme.walmart.com/@walmart/allspark-health-survey-mini-app/-/allspark-health-survey-mini-app-0.0.32.tgz", + "integrity": "sha512-XhuSCz9Avhno0fLX1wU+YsPgTim31R+IdXs+dkXIcSD6gE9x1zIwxXpE1ydzerdNezkdvziJLU2VFRLZ2RK09w==", "requires": { "@walmart/patient-portal-mobile": "^2.1.5", "crypto-js": "^3.3.0", @@ -3147,18 +3147,18 @@ "integrity": "sha512-3IE39bHVqFbWWaPOMHZF98Q9c3LDKGTmypMiTM2QygGXXElkFWIH7GxfmlwmY2vwa+wmNsoYZmG2iusf1ZjJoA==" }, "react-i18next": { - "version": "11.8.12", - "resolved": "https://npme.walmart.com/react-i18next/-/react-i18next-11.8.12.tgz", - "integrity": "sha512-M2PSVP9MzT/7yofXfCOF5gAVotinrM4BXWiguk8uFSznJsfFzTjrp3K9CBWcXitpoCBVZGZJ2AnbaWGSNkJqfw==", + "version": "11.8.13", + "resolved": "https://npme.walmart.com/react-i18next/-/react-i18next-11.8.13.tgz", + "integrity": "sha512-KTNuLYnEwI9y54nSEal4yBxXBnfCCfh7t/0p/UHfhlGNcIMu+V4x/y5zGKzbOEK4noQrUzZ+J47RPYH7rMs2ZQ==", "requires": { "@babel/runtime": "^7.13.6", - "html-parse-stringify2": "^2.0.1" + "html-parse-stringify": "^3.0.0" }, "dependencies": { "@babel/runtime": { - "version": "7.13.10", - "resolved": "https://npme.walmart.com/@babel/runtime/-/runtime-7.13.10.tgz", - "integrity": "sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw==", + "version": "7.13.17", + "resolved": "https://npme.walmart.com/@babel/runtime/-/runtime-7.13.17.tgz", + "integrity": "sha512-NCdgJEelPTSh+FEFylhnP1ylq848l1z9t9N0j1Lfbcw0+KXGjsTvUmkxy+voLLXB5SOKMbLLx4jxYliGrYQseA==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -6381,6 +6381,21 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "html-parse-stringify": { + "version": "3.0.0", + "resolved": "https://npme.walmart.com/html-parse-stringify/-/html-parse-stringify-3.0.0.tgz", + "integrity": "sha512-TrTKp/U0tACrpqalte/VhxepqMLii2mOfC8iuOt4+VA7Zdi6BUKKqNJvEsO17Cr3T3E7PpqLe3NdLII6bcYJgg==", + "requires": { + "void-elements": "3.1.0" + }, + "dependencies": { + "void-elements": { + "version": "3.1.0", + "resolved": "https://npme.walmart.com/void-elements/-/void-elements-3.1.0.tgz", + "integrity": "sha1-YU9/v42AHwu18GYfWy9XhXUOTwk=" + } + } + }, "html-parse-stringify2": { "version": "2.0.1", "resolved": "https://npme.walmart.com/html-parse-stringify2/-/html-parse-stringify2-2.0.1.tgz", --- package.json @@ -60,7 +60,7 @@ "@react-navigation/stack": "^5.9.0", "@redux-saga/testing-utils": "^1.1.3", "@terrylinla/react-native-sketch-canvas": "^0.8.0", - "@walmart/allspark-health-survey-mini-app": "0.0.31", + "@walmart/allspark-health-survey-mini-app": "0.0.32", "@walmart/allspark-home-mini-app": "0.1.11", "@walmart/allspark-me-mini-app": "0.0.22", "@walmart/ask-sam-mini-app": "0.10.34",
update health cards (#466)
update health cards (#466) Co-authored-by: Dylan Lane - rlane1 <Russell.Lane@walmart.com>
30fbd463d59a5c963521ba3c29812c1bd1449869
--- example/src/teamHub/screens/container.tsx @@ -2,7 +2,8 @@ import {useNavigation} from '@react-navigation/native'; import {useEffect} from 'react'; import {TeamHub} from '../feature'; import {TeamHubLogger, TeamHubTelemetry} from '../services'; -import {Header} from '@walmart/allspark-foundation/Components'; +import {Header, TeamSwitcher} from '@walmart/allspark-foundation/Components'; +import {teamData} from './mockData'; export const ContainerScreen = TeamHub.createScreen( () => { @@ -14,7 +15,7 @@ export const ContainerScreen = TeamHub.createScreen( param1: 'true', }); navigation.setOptions({title: 'My Team'}); - }, []); + }, [navigation]); return ( <> @@ -22,6 +23,7 @@ export const ContainerScreen = TeamHub.createScreen( title="Hub value-prop title" subText="Short introduction to convey the action we intend the associate to take through this hub." /> + <TeamSwitcher teamData={teamData} /> </> ); }, --- example/src/teamHub/screens/mockData.ts @@ -6,7 +6,8 @@ export const Images = { deliAndBakery: 'https://i5-me.walmartimages.com/images/teams/delibakery-team-9aca808f6d.png', fuel: 'https://i5-me.walmartimages.com/images/teams/fuel-team-1eeec3363a.png', - myTeams: 'https://i5-me.walmartimages.com/images/teams/totalstore-team.png', + myTeams: + 'https://i5-me.walmartimages.com/images/teams/my-teams-mgr-exp-1edac1ba4a.png', totalStore: 'https://i5-me.walmartimages.com/images/teams/task-image-store-02bdfd7611.png', foodAndConsumerables: --- example/src/teamHub/screens/screen.tsx @@ -6,8 +6,6 @@ import {useNavigation} from '@react-navigation/core'; import {TeamHubLogger, TeamHubTelemetry} from '../services'; import {TeamHub} from '../feature'; import {AllsparkNavigationClient} from '@walmart/allspark-foundation/Navigation'; -import {Header, TeamSwitcher} from '@walmart/allspark-foundation/Components'; -import {teamData} from './mockData'; export const HomeScreen = TeamHub.createScreen( () => { @@ -19,15 +17,10 @@ export const HomeScreen = TeamHub.createScreen( param1: 'true', }); navigation.setOptions({title: 'Hub Name'}); - }, []); + }, [navigation]); return ( <View style={{flex: 1}}> - <Header - title="Hub value-prop title" - subText="Short introduction to convey the action we intend the associate to take through this hub." - /> - <TeamSwitcher teamData={teamData} /> <Button variant="primary" UNSAFE_style={{marginBottom: 10, marginTop: 20}} --- packages/allspark-foundation/package.json @@ -67,6 +67,7 @@ "@graphql-codegen/typescript-operations": "^4.0.1", "@graphql-codegen/typescript-react-apollo": "^4.1.0", "@reduxjs/toolkit": "^1.9.7", + "@shopify/flash-list": "~1.6.4", "@types/node-fetch": "^2.6.9", "@walmart/allspark-utils": "workspace:^", "axios": "~1.6.0", --- packages/allspark-foundation/src/Components/Hub/TeamSwitcher/index.tsx @@ -1,9 +1,10 @@ import React, { useEffect, useMemo, useState } from 'react'; -import { Text, View, Image, FlatList, TouchableOpacity } from 'react-native'; +import { Text, View, Image, TouchableOpacity } from 'react-native'; import { TeamSwitcherProps, TeamSwitcherTypes } from './types'; import { TeamSwitcherStyles } from './styles'; import { VerticalDivider } from './VerticalDivider'; import { AddEditButton } from './AddEditButton'; +import { FlashList } from '@shopify/flash-list'; export * from './types'; @@ -20,7 +21,8 @@ export const TeamSwitcher = ({ teamData = [] }: TeamSwitcherProps) => { const handlePress = (teamLabel: string) => setSelectedTeam(teamLabel); - const handleAddEditpress = () => console.log('Add/Edit button pressed'); + const handleAddEditPress = () => console.log('Add/Edit button pressed'); + const keyExtractor = (item: TeamSwitcherTypes) => item.teamLabel; const renderTeamItem = ({ item }: { item: TeamSwitcherTypes }) => { const isSelected = item.teamLabel === selectedTeam; @@ -63,14 +65,14 @@ export const TeamSwitcher = ({ teamData = [] }: TeamSwitcherProps) => { return ( <View style={styles.container}> - <FlatList + <FlashList data={teamData} renderItem={renderTeamItem} - keyExtractor={(item) => item.teamLabel} + keyExtractor={keyExtractor} horizontal={true} showsHorizontalScrollIndicator={false} contentContainerStyle={styles.flatListContent} - ListFooterComponent={<AddEditButton onPress={handleAddEditpress} />} + ListFooterComponent={<AddEditButton onPress={handleAddEditPress} />} /> </View> ); --- yarn.lock @@ -4866,6 +4866,20 @@ __metadata: languageName: node linkType: hard +"@shopify/flash-list@npm:~1.6.4": + version: 1.6.4 + resolution: "@shopify/flash-list@npm:1.6.4" + dependencies: + recyclerlistview: "npm:4.2.0" + tslib: "npm:2.4.0" + peerDependencies: + "@babel/runtime": "*" + react: "*" + react-native: "*" + checksum: 10c0/4b99f29f8ec2c9405c0f215d207cb489cea383c4c1d93bb594e7bb494204829b6d1b9fd9bad5c3ded5de1a0da098349b7c246cc558fb544834d8224b25f2f4c5 + languageName: node + linkType: hard + "@sideway/address@npm:^4.1.5": version: 4.1.5 resolution: "@sideway/address@npm:4.1.5" @@ -5594,6 +5608,7 @@ __metadata: "@react-navigation/native": "npm:^6.1.6" "@react-navigation/stack": "npm:^6.3.17" "@reduxjs/toolkit": "npm:^1.9.7" + "@shopify/flash-list": "npm:~1.6.4" "@types/crypto-js": "npm:^4.1.3" "@types/lodash": "npm:~4.14.178" "@types/node": "npm:20.5.9" @@ -12240,7 +12255,7 @@ __metadata: languageName: node linkType: hard -"lodash.debounce@npm:^4.0.8": +"lodash.debounce@npm:4.0.8, lodash.debounce@npm:^4.0.8": version: 4.0.8 resolution: "lodash.debounce@npm:4.0.8" checksum: 10c0/762998a63e095412b6099b8290903e0a8ddcb353ac6e2e0f2d7e7d03abd4275fe3c689d88960eb90b0dde4f177554d51a690f22a343932ecbc50a5d111849987 @@ -14793,7 +14808,7 @@ __metadata: languageName: node linkType: hard -"prop-types@npm:^15.6.2, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": +"prop-types@npm:15.8.1, prop-types@npm:^15.6.2, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": version: 15.8.1 resolution: "prop-types@npm:15.8.1" dependencies: @@ -15465,6 +15480,20 @@ __metadata: languageName: node linkType: hard +"recyclerlistview@npm:4.2.0": + version: 4.2.0 + resolution: "recyclerlistview@npm:4.2.0" + dependencies: + lodash.debounce: "npm:4.0.8" + prop-types: "npm:15.8.1" + ts-object-utils: "npm:0.0.5" + peerDependencies: + react: ">= 15.2.1" + react-native: ">= 0.30.0" + checksum: 10c0/eee8e128f90d1c7fe97bc3c1204fd3b959e5895bef76bb45510f0eb23b2b72f5f7c48a87819abdefd0b8eb1dc7f76af57e3dcbaabcfb136306e6e8dee7c0375b + languageName: node + linkType: hard + "redent@npm:^3.0.0": version: 3.0.0 resolution: "redent@npm:3.0.0" @@ -17057,6 +17086,13 @@ __metadata: languageName: node linkType: hard +"ts-object-utils@npm:0.0.5": + version: 0.0.5 + resolution: "ts-object-utils@npm:0.0.5" + checksum: 10c0/0279f8a7504b3905f2b14769769985f214154f1aedc60077c3baaced078369ae465aecc6acc04c614f40893e559d05697f6f4ef9fc411e3b6d1d15e6269a5e14 + languageName: node + linkType: hard + "ts-retry-promise@npm:~0.7.1": version: 0.7.1 resolution: "ts-retry-promise@npm:0.7.1" @@ -17075,6 +17111,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:2.4.0": + version: 2.4.0 + resolution: "tslib@npm:2.4.0" + checksum: 10c0/eb19bda3ae545b03caea6a244b34593468e23d53b26bf8649fbc20fce43e9b21a71127fd6d2b9662c0fe48ee6ff668ead48fd00d3b88b2b716b1c12edae25b5d + languageName: node + linkType: hard + "tslib@npm:^1.8.1": version: 1.14.1 resolution: "tslib@npm:1.14.1"
feat(ui): update flashlist and image url smdv-5962
feat(ui): update flashlist and image url smdv-5962
cf29768058a3e83b0dbbc3aa2b668e7215c7aeac
--- CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.33.1-alpha.3](https://gecgithub01.walmart.com/allspark/allspark-core/compare/v6.33.1-alpha.2...v6.33.1-alpha.3) (2025-07-18) + +**Note:** Version bump only for package @walmart/me-at-walmart + + + + + ## [6.33.1-alpha.2](https://gecgithub01.walmart.com/allspark/allspark-core/compare/v6.33.1-alpha.1...v6.33.1-alpha.2) (2025-07-18) **Note:** Version bump only for package @walmart/me-at-walmart --- lerna.json @@ -1,5 +1,5 @@ { - "version": "6.33.1-alpha.2", + "version": "6.33.1-alpha.3", "npmClient": "yarn", "changelogPreset": "angular", "command": { --- packages/core-services-allspark/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.33.1-alpha.3](https://gecgithub01.walmart.com/allspark/allspark-core-services/compare/v6.33.1-alpha.2...v6.33.1-alpha.3) (2025-07-18) + +**Note:** Version bump only for package @walmart/core-services-allspark + + + + + ## [6.33.1-alpha.2](https://gecgithub01.walmart.com/allspark/allspark-core-services/compare/v6.33.1-alpha.1...v6.33.1-alpha.2) (2025-07-18) **Note:** Version bump only for package @walmart/core-services-allspark --- packages/core-services-allspark/package.json @@ -1,6 +1,6 @@ { "name": "@walmart/core-services-allspark", - "version": "6.33.1-alpha.2", + "version": "6.33.1-alpha.3", "description": "", "main": "lib/index.js", "types": "lib/index.d.ts", --- packages/core-widget-registry/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.33.1-alpha.3](https://gecgithub01.walmart.com/allspark/allspark-core-services/compare/v6.33.1-alpha.2...v6.33.1-alpha.3) (2025-07-18) + +**Note:** Version bump only for package @walmart/core-widget-registry + + + + + ## [6.33.1-alpha.2](https://gecgithub01.walmart.com/allspark/allspark-core-services/compare/v6.33.1-alpha.1...v6.33.1-alpha.2) (2025-07-18) **Note:** Version bump only for package @walmart/core-widget-registry --- packages/core-widget-registry/package.json @@ -1,6 +1,6 @@ { "name": "@walmart/core-widget-registry", - "version": "6.33.1-alpha.2", + "version": "6.33.1-alpha.3", "description": "Repo for Me@Walmart related widget registries", "author": "rlane1 <russell.lane@walmart.com>", "license": "ISC", --- packages/me-at-walmart-common/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.33.1-alpha.3](https://gecgithub01.walmart.com/allspark/allspark/compare/v6.33.1-alpha.2...v6.33.1-alpha.3) (2025-07-18) + +**Note:** Version bump only for package @walmart/me-at-walmart-common + + + + + ## [6.33.1-alpha.2](https://gecgithub01.walmart.com/allspark/allspark/compare/v6.33.1-alpha.1...v6.33.1-alpha.2) (2025-07-18) **Note:** Version bump only for package @walmart/me-at-walmart-common --- packages/me-at-walmart-common/package.json @@ -1,6 +1,6 @@ { "name": "@walmart/me-at-walmart-common", - "version": "6.33.1-alpha.2", + "version": "6.33.1-alpha.3", "description": "Common utilities and components for Me@Walmat mini apps", "main": "lib/index.js", "types": "lib/index.d.ts", --- packages/me-at-walmart-container/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.33.1-alpha.3](https://gecgithub01.walmart.com/allspark/allspark-core/compare/v6.33.1-alpha.2...v6.33.1-alpha.3) (2025-07-18) + +**Note:** Version bump only for package @walmart/me-at-walmart-container + + + + + ## [6.33.1-alpha.2](https://gecgithub01.walmart.com/allspark/allspark-core/compare/v6.33.1-alpha.1...v6.33.1-alpha.2) (2025-07-18) **Note:** Version bump only for package @walmart/me-at-walmart-container --- packages/me-at-walmart-container/package.json @@ -1,6 +1,6 @@ { "name": "@walmart/me-at-walmart-container", - "version": "6.33.1-alpha.2", + "version": "6.33.1-alpha.3", "description": "", "main": "lib/index.js", "types": "lib/index.d.ts",
chore(version): updating package version
chore(version): updating package version
dda169f6bb1eff4b9d9e94813706177a79f8f10f
--- packages/allspark-foundation-hub/src/HubFeature/Store/Hub/Container/Screens/HubDashboard.tsx @@ -162,7 +162,8 @@ export const HubDashboard = ({ message: 'Setting allowedWidgetsList', }); setAllowedWidgetsList(allowedWidgets); - }, [defaultWidgets, teamState, widgets]); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); /** Bottom sheet update */ const navigation = useNavigation(); @@ -268,12 +269,10 @@ export const HubDashboard = ({ <AllsparkComponentContainers.Component container={name} id={componentOverrides.FloatingButton.id} - props={ - { - ...componentOverrides.FloatingButton?.props, - selectedTeamIds: selectedTeamIds || teamState.teamIds, - } || {} - } + props={{ + ...componentOverrides.FloatingButton?.props, + selectedTeamIds: selectedTeamIds || teamState.teamIds, + }} /> </View> )}
Update the hub dashboard use effect
Update the hub dashboard use effect
c70cba93537b734a600fe03712b7188b1414f6bc
--- src/hooks/useDesignMode.tsx @@ -0,0 +1,72 @@ +import { LocalStorage } from '@/core/LocalStorage'; +import { ConfigSelectors } from '@walmart/allspark-foundation/Config'; +import { Switch } from '@walmart/gtp-shared-components'; +import { createSelector } from 'reselect'; +import { useEffect, useState, useSyncExternalStore } from 'react'; +import { useSelector } from 'react-redux'; +import { Logger } from '../core/Logger'; +import { createExternalStore } from '@/utils/createExternalStore'; + +export type DesignMode = 'classic' | 'modern'; + +export const DEFAULT_DESIGN_MODE: DesignMode = 'classic'; +export const DESIGN_MODE_CACHE_KEY = 'design_mode'; +const DESIGN_MODE_CONFIG_KEY = 'core.design_mode'; + +// Create a persistent store for design mode +export const designModeStore = createExternalStore<DesignMode>(DEFAULT_DESIGN_MODE, { + storageKey: DESIGN_MODE_CACHE_KEY, +}); + +const getConfigDesignMode = createSelector( + [ConfigSelectors.getContainerConfig], + (config) => config?.[DESIGN_MODE_CONFIG_KEY] as DesignMode | undefined, +); + +export const useDesignMode = () => { + // Optionally incorporate the config value as a fallback on first render. + const configMode = useSelector(getConfigDesignMode); + const initialFallback = configMode || DEFAULT_DESIGN_MODE; + + // Subscribe to the store for updates + const mode = useSyncExternalStore( + designModeStore.subscribe, + designModeStore.getSnapshot, + () => initialFallback + ); + const [isInitialized, setIsInitialized] = useState(false); + + // Initialize the store once on component mount + useEffect(() => { + designModeStore.initialize(initialFallback).then(() => { + setIsInitialized(true); + }); + }, [initialFallback]); + + const toggle = () => { + const newMode = mode === 'modern' ? 'classic' : 'modern'; + designModeStore.set(newMode); + }; + + return { mode, toggle, isHydrated: isInitialized }; +}; + +export const DesignModeSwitch = () => { + const { mode, toggle, isHydrated } = useDesignMode(); + + // Optionally, show a placeholder while hydrating. + if (!isHydrated || mode === undefined) { + return null; + } + + return ( + <Switch + label="Use modern design" + accessibilityLabel="use modern design" + testID="design_mode" + isOn={mode === 'modern'} + onValueChange={toggle} + UNSAFE_style={{ marginTop: 16 }} + /> + ); +}; --- src/utils/createExternalStore.tsx @@ -0,0 +1,107 @@ +import { Logger } from '../core/Logger'; +import { LocalStorage } from '@/core/LocalStorage'; + +type Subscriber<T> = () => void; +type ServerValue<T> = () => T; + +interface Store<T> { + // Subscribe to store changes + subscribe: (callback: Subscriber<T>) => () => void; + // Get current state snapshot + getSnapshot: () => T; + // Get server snapshot for SSR (if needed) + getServerSnapshot: ServerValue<T>; + // Update store value + set: (value: T) => void; + // Initialize with persisted value (if storage key provided) + initialize: (defaultValue?: T) => Promise<void>; + // For persisted stores - save value to storage + persist: (newValue: T) => Promise<void>; +} + +/** + * Creates a store that works with useSyncExternalStore + * + * @param initialValue - Default value for store + * @param options - Optional configuration + * @returns Store object with methods for state management + */ +export function createExternalStore<T>( + initialValue: T, + options?: { + storageKey?: string; // If provided, persists to LocalStorage + logger?: (message: string, error?: Error) => void; // Custom logger + } +): Store<T> { + let currentValue = initialValue; + const subscribers = new Set<Subscriber<T>>(); + + const storageKey = options?.storageKey; + const log = options?.logger || ((message: string, error?: Error) => { + if (error) { + Logger.error(message, { message: error.message }); + } else { + Logger.debug(message); + } + }); + + const notifySubscribers = () => { + subscribers.forEach((callback) => callback()); + }; + + // Initialize store from persisted storage if storage key provided + const initialize = async (defaultValue?: T): Promise<void> => { + if (storageKey) { + try { + const value = await LocalStorage.get(storageKey); + if (value !== null && value !== undefined) { + currentValue = value as T; + notifySubscribers(); + } else if (defaultValue !== undefined) { + currentValue = defaultValue; + notifySubscribers(); + } + } catch (error) { + log('Error initializing store from storage', error as Error); + if (defaultValue !== undefined) { + currentValue = defaultValue; + notifySubscribers(); + } + } + } + }; + + // Persist value to storage if storage key provided + const persist = async (value: T): Promise<void> => { + if (storageKey) { + try { + await LocalStorage.set(storageKey, value); + } catch (error) { + log('Error persisting store value to storage', error as Error); + } + } + }; + + // Update store value + const set = (value: T): void => { + if (value !== currentValue) { + currentValue = value; + notifySubscribers(); + if (storageKey) { + persist(value); + } + } + }; + + return { + subscribe: (callback) => { + subscribers.add(callback); + return () => subscribers.delete(callback); + }, + getSnapshot: () => currentValue, + getServerSnapshot: () => initialValue, + set, + initialize, + persist, + }; +}
feat(design mode): add design mode toggle with local storage persistence
feat(design mode): add design mode toggle with local storage persistence
687e72e108245f5248e198e76832a71978740f1b
--- src/components/Roster/AssociateListItem.tsx @@ -50,6 +50,10 @@ export const AssociateListItem: React.FC<AssociateListItemProps> = React.memo( const siteId: string | undefined = useSelector( SiteSelectors.getUserWorkingSite, ); + const countryCode: string | undefined = useSelector( + SiteSelectors.getSiteCountry, + ); + const shouldShowStatusChipAndWeeklySchedule: boolean = useRbacConfigWithJobCode(); const userIsInRoster = useUserIsInRoster(); @@ -146,8 +150,11 @@ export const AssociateListItem: React.FC<AssociateListItemProps> = React.memo( onPress={() => { goToIndividualSchedule( associate.userId, - associate.fullName, siteId, + associateDisplayName(associate), + associate.payType, + associate.win, + countryCode, ); }} disabled={!associate.userId}> --- src/navigation/utils.ts @@ -8,34 +8,13 @@ export const goToWeeklySchedule = (wins: string[], teamName?: string) => { }); }; -// export const goToIndividualSchedule = ( -// userId?: string | undefined | null, -// businessUnitNumber?: number, -// displayName?: string | null, -// payType?: string, -// win?: string, -// countryCode?: string, -// ) => { -// navigate('scheduleScreen', { -// // @ts-ignore -// screen: 'scheduleNav.associateView', -// params: { -// userInfo: { -// userId: userId, //TODO: Associate Obj -// businessUnitNumber: businessUnitNumber, //TODO: Store number as int -// displayName: displayName, //TODO: Associate Obj -// payType: payType, //TODO: Associate Obj -// walmartIdentificationNumber: win,//TODO: Associate Obj -// country: countryCode, //TODO: Associate Obj -// }, -// }, -// }); -// }; - export const goToIndividualSchedule = ( - userId?: string | undefined | null, - displayName?: string | undefined | null, - storeNumber?: string | undefined, + userId?: string | null, + businessUnitNumber?: string | null, + displayName?: string | null, + payType?: string | null, + win?: number | null, + countryCode?: string | null, ) => { navigate('scheduleScreen', { // @ts-ignore @@ -43,9 +22,11 @@ export const goToIndividualSchedule = ( params: { userInfo: { userId: userId, + businessUnitNumber: businessUnitNumber, displayName: displayName, - - site: storeNumber, + payType: payType, + walmartIdentificationNumber: win, + country: countryCode, }, }, });
updating method to use new params
updating method to use new params
ca21b575d84eb263c2d82fef8d3f3b5cef25097c
--- src/screens/RosterDetailScreen/SupplyChainRosterDetailScreen.tsx @@ -52,7 +52,6 @@ import {AssociateListLoading} from '../../components/AssociateList/AssociateList import {AssociateListItem} from '../../components/AssociateList/AssociateListItem'; import {analytics} from '../../logger/analytics'; import moment from 'moment'; -import {useGetSupplyChainShifts} from '@walmart/allspark-foundation-hub/lib/SupplyChain/Hooks/useSupplyChainShifts'; import {Alert, Body} from '@walmart/gtp-shared-components'; import { @@ -103,7 +102,6 @@ export const SupplyChainRosterDetailScreen = ({ const showSearchInput = useSelector(displaySearchInput); const showTeamHub: boolean = useSelector(showManagerTeamsHub); const isManagerView = useUserCanSeeHub(); - const {allShifts} = useGetSupplyChainShifts(); const isSalariedOrLead = showTeamHub && isManagerView; const defaultTeamLabel = initialTeamName || TOTAL_SITE_TEAM_LABEL; const defaultTeamIds = initialTeamId ? [initialTeamId] : [TOTAL_SITE_TEAM_ID]; @@ -244,7 +242,11 @@ export const SupplyChainRosterDetailScreen = ({ teamRosterData: any, shiftNumber: any, ) { - if (shiftNumber.length === allShifts.length) { + if ( + availableShifts?.supplyChainShifts.every((shift) => + shiftNumber.includes(shift.number), + ) + ) { return teamRosterData; } return teamRosterData.filter((member: any) =>
Adding all shift check
Adding all shift check
84c08883dedef0bc146de0b3bd64529fb389bbd6
--- package.json @@ -159,7 +159,7 @@ "react-native-flipper": "0.182.0", "react-native-fs": "^2.20.0", "react-native-geolocation-service": "^5.3.1", - "react-native-gesture-handler": "^2.9.0", + "react-native-gesture-handler": "2.9.0", "react-native-get-random-values": "^1.8.0", "react-native-haptic-feedback": "^1.14.0", "react-native-html-parser": "^0.1.0",
downgrade react-native-gesture-handler
downgrade react-native-gesture-handler
a820e1fe6fecf231bb7004e67cd6c497725f9837
--- src/components/ClockStatusIndicator.tsx @@ -2,7 +2,7 @@ import React from 'react'; import {StyleProp, StyleSheet, TextStyle, View, ViewStyle} from 'react-native'; import {Body, colors} from '@walmart/gtp-shared-components'; import {useTranslation} from 'react-i18next'; -import {TEXTING_I18N_NAMESPACE} from '../../translations'; +import {TEXTING_I18N_NAMESPACE} from "../translations"; const styles = StyleSheet.create({ indicatorRow: {
updating broken import
updating broken import
613e1571b1aed8f1ce9a381647bb92b9b124f320
--- __tests__/navigation/AssociateHallwayNav/__snapshots__/MainStackNavTest.tsx.snap @@ -348,7 +348,7 @@ exports[`AssociateHallwayNav matches snapshot; handles mount and unmount effects } /> <Screen - component="ItemInfoMiniApp" + component="GuardedItemInfoMiniApp" name="itemInfoQuickAction" /> <Screen @@ -771,7 +771,7 @@ exports[`AssociateHallwayNav matches snapshot; handles mount and unmount effects } /> <Screen - component="ItemInfoMiniApp" + component="GuardedItemInfoMiniApp" name="itemInfoQuickAction" /> <Screen --- src/navigation/AssociateHallwayNav/MainStackNav.tsx @@ -142,6 +142,7 @@ const WorkMiniApps = [ ]; const ClockOutGuardedTaskItQuickAction = withClockOutGuard(TaskItQuickActions); +const ClockOutGuardedItemInfoQuickAction = withClockOutGuard(ItemInfoMiniApp); const WorkMiniAppScreens = WorkMiniApps.map((screen) => { const {screenName, component} = screen; @@ -380,7 +381,7 @@ export const MainStackNav = () => { /> <MainStack.Screen name='itemInfoQuickAction' - component={ItemInfoMiniApp} + component={ClockOutGuardedItemInfoQuickAction} /> <MainStack.Screen name='me-field-mini-app'
adding a clock check for item info quick action
adding a clock check for item info quick action
fea3ff1638b4bb7896a94ad1c52b483ddd4f271c
--- package.json @@ -99,9 +99,9 @@ "@walmart/react-native-shared-navigation": "6.1.4", "@walmart/react-native-sumo-sdk": "2.6.0", "@walmart/redux-store": "3.7.0", - "@walmart/roster-mini-app": "2.25.4", + "@walmart/roster-mini-app": "2.26.0", "@walmart/ui-components": "1.15.1", - "@walmart/wmconnect-mini-app": "2.23.1", + "@walmart/wmconnect-mini-app": "2.24.0", "babel-jest": "^29.2.1", "chance": "^1.1.11", "eslint": "8.22.0", --- yarn.lock @@ -6561,9 +6561,9 @@ __metadata: "@walmart/react-native-shared-navigation": "npm:6.1.4" "@walmart/react-native-sumo-sdk": "npm:2.6.0" "@walmart/redux-store": "npm:3.7.0" - "@walmart/roster-mini-app": "npm:2.25.4" + "@walmart/roster-mini-app": "npm:2.26.0" "@walmart/ui-components": "npm:1.15.1" - "@walmart/wmconnect-mini-app": "npm:2.23.1" + "@walmart/wmconnect-mini-app": "npm:2.24.0" babel-jest: "npm:^29.2.1" chance: "npm:^1.1.11" eslint: "npm:8.22.0" @@ -6745,9 +6745,9 @@ __metadata: languageName: node linkType: hard -"@walmart/roster-mini-app@npm:2.25.4": - version: 2.25.4 - resolution: "@walmart/roster-mini-app@npm:2.25.4::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Froster-mini-app%2F-%2F%40walmart%2Froster-mini-app-2.25.4.tgz" +"@walmart/roster-mini-app@npm:2.26.0": + version: 2.26.0 + resolution: "@walmart/roster-mini-app@npm:2.26.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Froster-mini-app%2F-%2Froster-mini-app-2.26.0.tgz" peerDependencies: "@react-native-async-storage/async-storage": ^1.21.0 "@react-native-community/netinfo": ^11.0.1 @@ -6789,7 +6789,7 @@ __metadata: redux: ^4.2.1 redux-saga: ^1.2.3 wifi-store-locator: 1.4.1 - checksum: 10c0/1bf11a946ba1fdc30d2e9035dc8f774867ce5d41e12e2c72b2ab03b54fdd896ee1a7de6cd2b9396489f9c1a0a821c4dc9125900892d5a4d7e446693a289aad46 + checksum: 10c0/6a1564f8434a5dfe9980484f20fbe345f836eeb5a1c5efe8b619caca2aa70556f320ad386678f379d12e4dab12406b8acb377a61b283edb5611adeeebca21589 languageName: node linkType: hard @@ -6813,9 +6813,9 @@ __metadata: languageName: node linkType: hard -"@walmart/wmconnect-mini-app@npm:2.23.1": - version: 2.23.1 - resolution: "@walmart/wmconnect-mini-app@npm:2.23.1::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fwmconnect-mini-app%2F-%2F%40walmart%2Fwmconnect-mini-app-2.23.1.tgz" +"@walmart/wmconnect-mini-app@npm:2.24.0": + version: 2.24.0 + resolution: "@walmart/wmconnect-mini-app@npm:2.24.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fwmconnect-mini-app%2F-%2F%40walmart%2Fwmconnect-mini-app-2.24.0.tgz" peerDependencies: "@react-native-async-storage/async-storage": ^1.21.0 "@react-native-community/netinfo": ^11.0.1 @@ -6855,7 +6855,7 @@ __metadata: redux: ^4.2.1 redux-saga: ^1.2.3 wifi-store-locator: 1.4.1 - checksum: 10c0/a06e03971565433bf73c257e0a515217638dc58229722b918ed44beb0556a9b1fd2937a9e72e5ba4fea60046d9bf4dfd2b49e55f158b86df7dbe682865a52f68 + checksum: 10c0/e250d105ff97f75fb1f48f0255b6b2be9df4427f9ced846dd5aac7c47d5b452eefd5817f4430a4c8643eb8f62200267143f2e118516877d004df92626e6c116d languageName: node linkType: hard
feat(ui): updating wmconnect and roster app versions
feat(ui): updating wmconnect and roster app versions
d376939e3c2c35e6f8354b0101721c0a58b1acff
--- packages/allspark-foundation-hub/package.json @@ -1,6 +1,6 @@ { "name": "@walmart/allspark-foundation-hub", - "version": "1.3.0", + "version": "1.3.1", "description": "", "main": "lib/index.js", "types": "lib/index.d.ts",
Update the foundation hub version
Update the foundation hub version
7a55aed61e9fbfd5bed571b64b32258ce3c56a83
--- patches/@walmart+facilities-management-miniapp+0.5.22.patch @@ -1,28 +0,0 @@ -diff --git a/node_modules/@walmart/facilities-management-miniapp/dist/utils/wmNotificationsListener.js b/node_modules/@walmart/facilities-management-miniapp/dist/utils/wmNotificationsListener.js -index 51e43a3..92e9cd1 100644 ---- a/node_modules/@walmart/facilities-management-miniapp/dist/utils/wmNotificationsListener.js -+++ b/node_modules/@walmart/facilities-management-miniapp/dist/utils/wmNotificationsListener.js -@@ -5,6 +5,7 @@ import { APP_NAME, EVENT_NAME } from '../logs/logConstans'; - import { navigate } from '@walmart/react-native-shared-navigation'; - import { Routes } from '../NavigationStack/Routes'; - import { NOTIFICATION_TYPE } from '../constants/common'; -+var taskIt = require('@walmart/taskit-mini-app'); - export var initWmNotificationsListener = function () { - var notificationForegroundHandler = function (event) { - if (event) { -@@ -46,6 +47,7 @@ export var initWmNotificationsListener = function () { - var details = typeof customData_1.task_details === 'string' - ? JSON.parse(customData_1.task_details) - : customData_1.task_details; -+ taskIt === null || taskIt === void 0 ? void 0 : taskIt.taskItNotificationHandler(customData_1); - typeof navigate === 'function' && - navigate('taskit', { - screen_id: 'refrigerator.details', -@@ -94,6 +96,7 @@ export var initWmNotificationsListener = function () { - ? JSON.parse(customData.task_details) - : customData.task_details; - if (customData.DM_API_SUCCESS_FLAG === 'true') { -+ taskIt === null || taskIt === void 0 ? void 0 : taskIt.taskItNotificationHandler(customData); - typeof navigate === 'function' && - navigate('taskit', { - screen_id: 'refrigerator.details', \ No newline at end of file
Removing patch file
Removing patch file
032aa6e3701ba12090187ce8e2470c97a6ceeb9d
--- packages/allspark-foundation-hub/package.json @@ -1,6 +1,6 @@ { "name": "@walmart/allspark-foundation-hub", - "version": "1.3.5", + "version": "1.3.6", "description": "", "main": "lib/index.js", "types": "lib/index.d.ts",
Update foundation hub version
Update foundation hub version
30d235fee3e2e9f2d149450439c6df77e8be9cbf
--- jest.config.ts @@ -46,8 +46,7 @@ const config: Config = { }, }, moduleNameMapper: { - '^@/Translations$': '<rootDir>/src/Translations', - '^@/translations$': '<rootDir>/src/Translations', + '^.*/Translations$': '<rootDir>/src/Translations', '@walmart/ui-components/(.*)': '<rootDir>/__mocks__/@walmart/ui-components.js', '@react-navigation/drawer/(.*)':
fix(translation): unit test
fix(translation): unit test
15bd3eae29c458ba4bca728ac24de936b6a0c81a
--- package.json @@ -103,7 +103,7 @@ "@walmart/emergency-mini-app": "1.27.1", "@walmart/exception-mini-app": "1.7.10", "@walmart/facilities-management-miniapp": "0.10.0", - "@walmart/feedback-all-spark-miniapp": "0.9.60", + "@walmart/feedback-all-spark-miniapp": "0.9.63", "@walmart/financial-wellbeing-feature-app": "1.23.2", "@walmart/functional-components": "6.1.4", "@walmart/gta-react-native-calendars": "0.7.0", --- yarn.lock @@ -6128,12 +6128,12 @@ __metadata: languageName: node linkType: hard -"@walmart/feedback-all-spark-miniapp@npm:0.9.60": - version: 0.9.60 - resolution: "@walmart/feedback-all-spark-miniapp@npm:0.9.60" +"@walmart/feedback-all-spark-miniapp@npm:0.9.63": + version: 0.9.63 + resolution: "@walmart/feedback-all-spark-miniapp@npm:0.9.63" peerDependencies: "@react-native-async-storage/async-storage": ^1.19.0 - "@react-native-community/datetimepicker": ^6.1.3 + "@react-native-community/datetimepicker": 7.6.2 "@react-native-picker/picker": 2.4.2 "@react-navigation/native": ^6.0.0 "@react-navigation/stack": ^6.1.0 @@ -6146,17 +6146,17 @@ __metadata: "@walmart/ui-components": 1.10.1 crypto-js: ^3.3.0 react: ^18.2.0 - react-native: 0.72.6 + react-native: 0.73.7 react-native-background-timer: ^2.4.1 react-native-drop-shadow: ">=1.0.0" react-native-vector-icons: ^9.2.0 - react-native-webview: ^11.18.2 + react-native-webview: 13.6.1 react-native-wm-telemetry: 0.4.0 react-navigation: ^4.4.3 react-redux: ^7.2.1 reduxsauce: ^1.2.0 reselect: ^4.0.0 - checksum: 10c0/729f4fce36d576751a2c722fffd0c9bdb54edf31b61eb767060fed7f86a28bfe88bb2fe386f092c25116d0551fb38607c8f75ec16ab593c7d4ad2d15ec38867f + checksum: 10c0/3bc4f61dc435addf5f348e3be1f82f68a94b48a0170e26b1d82349bda6148c59d4a6c2d9f348c2229e02b5636d3e2e78eb501240dfebd8505d67825e74fbcf16 languageName: node linkType: hard @@ -7745,7 +7745,7 @@ __metadata: "@walmart/emergency-mini-app": "npm:1.27.1" "@walmart/exception-mini-app": "npm:1.7.10" "@walmart/facilities-management-miniapp": "npm:0.10.0" - "@walmart/feedback-all-spark-miniapp": "npm:0.9.60" + "@walmart/feedback-all-spark-miniapp": "npm:0.9.63" "@walmart/financial-wellbeing-feature-app": "npm:1.23.2" "@walmart/functional-components": "npm:6.1.4" "@walmart/gta-react-native-calendars": "npm:0.7.0"
feedback version update and latest pull
feedback version update and latest pull
0dca05d94406cc7c0afd508568014fba6715c151
--- package-lock.json @@ -25161,9 +25161,9 @@ "integrity": "sha512-31gtF8rVekdlx443qIZY7uGrD1ctzINt0C/Y+QP4VsRfZC2/n0J50syLxJqD2rP5S4+e0TYtdT1MLmGNtTteTQ==" }, "@walmart/feedback-all-spark-miniapp": { - "version": "0.9.9", - "resolved": "https://npme.walmart.com/@walmart/feedback-all-spark-miniapp/-/feedback-all-spark-miniapp-0.9.9.tgz", - "integrity": "sha512-zflnSCCc2yaDFeasMBtEuH74oGEZg1E2auhNUZ05C6zzO9yZ+oHun9+0jhnt+ag6zqZDCG1/AbgUJjfzAgY2dA==" + "version": "0.9.10", + "resolved": "https://npme.walmart.com/@walmart/feedback-all-spark-miniapp/-/feedback-all-spark-miniapp-0.9.10.tgz", + "integrity": "sha512-zqz82og6sfBPi2wYuXT6WiBgENoP8RMv3FUoQ4sb1TjIacOFRuGJbsu1TjG1YtdOz/GDrMty9W9ZH03KyNZLFg==" }, "@walmart/financial-wellbeing-feature-app": { "version": "1.0.64", --- package.json @@ -89,7 +89,7 @@ "@walmart/emergency-mini-app": "1.17.0", "@walmart/exception-mini-app": "1.0.14", "@walmart/facilities-management-miniapp": "0.4.2", - "@walmart/feedback-all-spark-miniapp": "0.9.9", + "@walmart/feedback-all-spark-miniapp": "0.9.10", "@walmart/financial-wellbeing-feature-app": "1.0.64", "@walmart/functional-components": "2.0.6", "@walmart/gta-react-native-calendars": "0.0.15",
feedback mini app version bump
feedback mini app version bump
3acb78704d9c6e4db5ff2fcdb41e1e476c34e8ab
--- README.md @@ -8,7 +8,7 @@ This is the Me@Walmart app. - [Onboarding docs](https://gecgithub01.walmart.com/ - Xcode - Android Studio -- Yarn/ruby/java (see mise.toml for version requirements) +- Yarn/ruby/java/node (see [mise.toml](mise.toml) for version requirements) ### Optional prereqs - [brew](https://brew.sh/)
Update README.md
Update README.md
8d7896b5d6d5e71e7e9395efea010aea2ac35646
--- package.json @@ -110,7 +110,7 @@ "@walmart/gtp-shared-components": "2.2.7-rc.0", "@walmart/ims-print-services-ui": "2.19.1", "@walmart/inbox-mini-app": "0.99.5", - "@walmart/invue-react-native-sdk": "0.1.26-alpha.10-wt1", + "@walmart/invue-react-native-sdk": "0.1.26-alpha.12", "@walmart/iteminfo-mini-app": "patch:@walmart/iteminfo-mini-app@npm%3A8.2.9#~/.yarn/patches/@walmart-iteminfo-mini-app-npm-8.2.9-06a4a40b76.patch", "@walmart/learning-mini-app": "20.0.41", "@walmart/manager-approvals-miniapp": "patch:@walmart/manager-approvals-miniapp@npm%3A0.3.2#~/.yarn/patches/@walmart-manager-approvals-miniapp-npm-0.3.2-b9a11617cb.patch", --- yarn.lock @@ -7882,15 +7882,15 @@ __metadata: languageName: node linkType: hard -"@walmart/invue-react-native-sdk@npm:0.1.26-alpha.10-wt1": - version: 0.1.26-alpha.10-wt1 - resolution: "@walmart/invue-react-native-sdk@npm:0.1.26-alpha.10-wt1::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Finvue-react-native-sdk%2F-%2F%40walmart%2Finvue-react-native-sdk-0.1.26-alpha.10-wt1.tgz" +"@walmart/invue-react-native-sdk@npm:0.1.26-alpha.12": + version: 0.1.26-alpha.12 + resolution: "@walmart/invue-react-native-sdk@npm:0.1.26-alpha.12::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Finvue-react-native-sdk%2F-%2F%40walmart%2Finvue-react-native-sdk-0.1.26-alpha.12.tgz" dependencies: base64-js: "npm:^1.5.1" peerDependencies: react: "*" react-native: "*" - checksum: 10c0/1da0010b0d498af9585e0f3e72372ae99c63738b708ca5965bb557ed1e7d23553e69dfca1ddcd90c5b77158d401f0d7d20b42a21bf381d54e24fd11420c119d8 + checksum: 10c0/96ab3bb9282a851dd093ee213091089ef22f48cd0f59f5d5a66691c28d60e1803eab83dca0a1b1968710cce4dcc0be2664ff2a3f9f32c8be2613ff1127fbe69e languageName: node linkType: hard @@ -8314,7 +8314,7 @@ __metadata: "@walmart/gtp-shared-components": "npm:2.2.7-rc.0" "@walmart/ims-print-services-ui": "npm:2.19.1" "@walmart/inbox-mini-app": "npm:0.99.5" - "@walmart/invue-react-native-sdk": "npm:0.1.26-alpha.10-wt1" + "@walmart/invue-react-native-sdk": "npm:0.1.26-alpha.12" "@walmart/iteminfo-mini-app": "patch:@walmart/iteminfo-mini-app@npm%3A8.2.9#~/.yarn/patches/@walmart-iteminfo-mini-app-npm-8.2.9-06a4a40b76.patch" "@walmart/learning-mini-app": "npm:20.0.41" "@walmart/manager-approvals-miniapp": "patch:@walmart/manager-approvals-miniapp@npm%3A0.3.2#~/.yarn/patches/@walmart-manager-approvals-miniapp-npm-0.3.2-b9a11617cb.patch"
fix(package.json): ALLSPARK-5974 update invue sdk to support ios 15.1
fix(package.json): ALLSPARK-5974 update invue sdk to support ios 15.1
e10f88027bf7fe23a0ae91bb80011611735ba1a9
--- jest.config.js @@ -5,10 +5,10 @@ module.exports = { collectCoverageFrom: ['<rootDir>/src/**/*.{js,jsx,ts,tsx}'], coverageThreshold: { global: { - statements: 0, - branches: 0, - functions: 0, - lines: 0, + statements: 16.4, + branches: 7, + functions: 7.84, + lines: 16.98, }, }, transformIgnorePatterns: [ @@ -17,5 +17,6 @@ module.exports = { testPathIgnorePatterns: [ '<rootDir>/__tests__/setup.ts', '<rootDir>/__tests__/__mocks__/', + '<rootDir>/__tests__/harness/', ], }; --- jest.config.js @@ -5,10 +5,10 @@ module.exports = { collectCoverageFrom: ['<rootDir>/src/**/*.{js,jsx,ts,tsx}'], coverageThreshold: { global: { - statements: 0, - branches: 0, - functions: 0, - lines: 0, + statements: 16.4, + branches: 7, + functions: 7.84, + lines: 16.98, }, }, transformIgnorePatterns: [ @@ -17,5 +17,6 @@ module.exports = { testPathIgnorePatterns: [ '<rootDir>/__tests__/setup.ts', '<rootDir>/__tests__/__mocks__/', + '<rootDir>/__tests__/harness/', ], };
ignore harness and bump coverage thresh
ignore harness and bump coverage thresh
41807905d183b3579048a3f887026e226834f20b
--- package-lock.json @@ -37,7 +37,7 @@ "@walmart/ask-sam-chat-components": "^0.2.7", "@walmart/ask-sam-mini-app": "1.3.74", "@walmart/attendance-mini-app": "0.86.0", - "@walmart/compass-sdk-rn": "3.16.1", + "@walmart/compass-sdk-rn": "3.16.17", "@walmart/config-components": "4.1.0-rc.4", "@walmart/core-services": "~2.0.19", "@walmart/core-services-allspark": "~2.10.15", @@ -4907,9 +4907,9 @@ } }, "node_modules/@walmart/compass-sdk-rn": { - "version": "3.16.1", - "resolved": "https://npme.walmart.com/@walmart/compass-sdk-rn/-/compass-sdk-rn-3.16.1.tgz", - "integrity": "sha512-uosdKTI5vIqbp0WPCEO8Bwy/0uJuk6cy5clCyJJGpheGIRQiSPcsqBy+vx21TI+N/eA0XSqHgDAsckpKYgloWQ==", + "version": "3.16.17", + "resolved": "https://npme.walmart.com/@walmart/compass-sdk-rn/-/compass-sdk-rn-3.16.17.tgz", + "integrity": "sha512-E3AWgniUS68f9DfWvhX1XoPuo9FFe2RXL0HxYcX6w9zq1wIu+sZX79Y9c0NL6pecNWOpKex/krNPMFYgC5q3RA==", "license": "MIT", "peerDependencies": { "react": "*", @@ -25182,9 +25182,9 @@ } }, "@walmart/compass-sdk-rn": { - "version": "3.16.1", - "resolved": "https://npme.walmart.com/@walmart/compass-sdk-rn/-/compass-sdk-rn-3.16.1.tgz", - "integrity": "sha512-uosdKTI5vIqbp0WPCEO8Bwy/0uJuk6cy5clCyJJGpheGIRQiSPcsqBy+vx21TI+N/eA0XSqHgDAsckpKYgloWQ==" + "version": "3.16.17", + "resolved": "https://npme.walmart.com/@walmart/compass-sdk-rn/-/compass-sdk-rn-3.16.17.tgz", + "integrity": "sha512-E3AWgniUS68f9DfWvhX1XoPuo9FFe2RXL0HxYcX6w9zq1wIu+sZX79Y9c0NL6pecNWOpKex/krNPMFYgC5q3RA==" }, "@walmart/config-components": { "version": "4.1.0-rc.4", --- src/auth/ConfirmSignoutPrompt.tsx @@ -1,10 +1,5 @@ import React, {FC} from 'react'; -import { - View, - Text, - StyleSheet, - Platform, -} from 'react-native'; +import {View, Text, StyleSheet, Platform} from 'react-native'; import {useTranslation} from 'react-i18next'; import {StackScreenProps} from '@react-navigation/stack'; @@ -44,7 +39,7 @@ const styles = StyleSheet.create({ lineHeight: 24, }, button: { - paddingTop: 40, + paddingTop: 24, }, }); @@ -53,7 +48,10 @@ type ConfirmSignOutModalProps = StackScreenProps< 'Core.ConfirmSignoutPrompt' >; -//service_configuration_fetch_error, token_refresh_failed - show network error on this codes. +const NETWORK_ERROR = [ + 'service_configuration_fetch_error', + 'token_refresh_failed', +]; export const ConfirmSignoutPrompt: FC<ConfirmSignOutModalProps> = (props) => { const {navigation, route} = props; const [t] = useTranslation('common'); @@ -61,10 +59,17 @@ export const ConfirmSignoutPrompt: FC<ConfirmSignOutModalProps> = (props) => { params: {reason}, } = route; - console.log('sva', route.params, reason); - //TODO reason should be code and proper message should be displayed. + const networkIssue = t('signoutConfirmationDialog.network'); useBackButton(() => true); + const signOutMessage = Platform.select({ + ios: t('signoutConfirmationDialog.ios'), + android: t('signoutConfirmationDialog.android'), + }); + const message = NETWORK_ERROR.includes(reason!) + ? networkIssue + : signOutMessage; + const onSubmit = () => { authActions.signOutRequestAcknowledged(); navigation.goBack(); @@ -73,11 +78,10 @@ export const ConfirmSignoutPrompt: FC<ConfirmSignOutModalProps> = (props) => { return ( <View style={[styles.container]}> <View style={[styles.card]}> - <Text style={styles.headerText}>You've been signed out</Text> - <Text style={styles.messageText}> - Due to a technical issue you've been signed out of your account. - Please sign in again. + <Text style={styles.headerText}> + {t('signoutConfirmationDialog.header')} </Text> + <Text style={styles.messageText}>{message}</Text> <View style={styles.button}> <Button @@ -85,7 +89,7 @@ export const ConfirmSignoutPrompt: FC<ConfirmSignOutModalProps> = (props) => { onPress={onSubmit} isFullWidth testID='got_it_btn'> - Got it + {t('signoutConfirmationDialog.confirm')} </Button> </View> </View> --- src/navigation/index.tsx @@ -40,7 +40,7 @@ import { ToastCardStyleInterpolator, } from './NavigationConstants'; import {RootStackMap} from './types'; -import { ConfirmSignoutPrompt } from "../auth/ConfirmSignoutPrompt"; +import {ConfirmSignoutPrompt} from '../auth/ConfirmSignoutPrompt'; const RootStack = createStackNavigator<RootStackMap>(); --- src/startup/index.ts @@ -79,7 +79,7 @@ export function* appFlow() { yield call(resetTo, 'login'); //Wait for login page to be loaded. yield take(AuthTypes.SIGN_IN_PAGE_LOADED); - if (reason) { + if (data?.reason) { //Show signout prompt and followup instructions yield call(navigate, 'Core.ConfirmSignoutPrompt', data); //Wait for confirmation --- src/translations/en-US.ts @@ -167,6 +167,15 @@ export const enUS_common = { unMatchedPin: 'The PIN entered does not match', wrongPin: 'Wrong PIN entered', }, + signoutConfirmationDialog: { + android: + "Due to a technical issue, you've been signed out of your account.", + confirm: 'Got it', + header: "You've been signed out", + ios: "Due to a technical issue, you've been signed out of your account. \n\nPlease tap CONTINUE button in next screen and then sign in again.", + network: + "Due to a technical/network issue, you've been signed out of your account. Please sign in again.", + }, signoutDialog: { cancelButtonText: 'Cancel', signOutButtonText: 'Sign out', --- src/translations/es-MX.ts @@ -174,6 +174,15 @@ export const esMX_common = { unMatchedPin: 'El PIN ingresado no coincide', wrongPin: 'PIN incorrecto, inténtalo de nuevo', }, + signoutConfirmationDialog: { + android: + 'Debido a un problema técnico, se ha cerrado la sesión de su cuenta.', + confirm: 'entiendo', + header: 'Has sido desconectado', + ios: 'Debido a un problema técnico, se ha cerrado la sesión de su cuenta. \n\n Toque el botón CONTINUAR en la siguiente pantalla y luego vuelva a iniciar sesión.', + network: + 'Debido a un problema técnico o de red, se cerró la sesión de su cuenta. Inicie sesión de nuevo.', + }, signoutDialog: { cancelButtonText: 'Regresar', signOutButtonText: 'Cerrar sesión',
updated translation.
updated translation.
73b20dcfb4ec7aa66645777f1ae2c8a29676c9fb
--- __tests__/navigation/AssociateHallwayNav/Tabs/__snapshots__/MyTeamStackNavTest.tsx.snap @@ -25,6 +25,31 @@ exports[`MyTeamStackNav matches snapshot 1`] = ` component="TimeClockScreen" name="timeClock" /> + <Screen + name="modalScreen" + options={ + Object { + "cardStyle": Object { + "backgroundColor": "rgba(0, 0, 0, 0.3)", + "paddingTop": 375, + }, + "headerShown": false, + "presentation": "transparentModal", + } + } + /> + <Screen + component="NewTorScreen" + name="newTor" + /> + <Screen + component="TorReviewScreen" + name="torReview" + /> + <Screen + component="TorSubmissionScreen" + name="torSubmission" + /> <Screen name="PttSearchScreen" /> --- __tests__/navigation/AssociateHallwayNav/__snapshots__/MainStackNavTest.tsx.snap @@ -139,6 +139,19 @@ Array [ component="TorReviewScreen" name="torReview" /> + <Screen + name="modalScreen" + options={ + Object { + "cardStyle": Object { + "backgroundColor": "rgba(0, 0, 0, 0.3)", + "paddingTop": 375, + }, + "headerShown": false, + "presentation": "transparentModal", + } + } + /> <Screen component="TorSubmissionScreen" name="torSubmission" --- src/navigation/AssociateHallwayNav/MainStackNav.tsx @@ -29,6 +29,7 @@ import { TimeClockScreen, TorReviewScreen, TorSubmissionScreen, + ModalScreen, } from '@walmart/time-clock-mini-app'; import {InboxScreen} from '@walmart/inbox-mini-app'; import {ModFlexMiniApp} from '@walmart/mod-flex-mini-app'; @@ -66,6 +67,7 @@ import { FWB_NAV_SCREEN_NAME, } from '@walmart/financial-wellbeing-feature-app'; import {PayStubMiniApp} from '@walmart/pay-stub-miniapp'; +import {useWindowDimensions} from 'react-native'; //--- Main Stack --- // const MainStack = createStackNavigator(); @@ -124,6 +126,11 @@ export const MainStackNav = () => { useAssociateStartup(); + const width = useWindowDimensions().width; + const height = useWindowDimensions().height; + + const screenWidth = width < height ? width : height; + return ( <> <MainStack.Navigator @@ -203,6 +210,20 @@ export const MainStackNav = () => { <MainStack.Screen name='torReview' component={TorReviewScreen} /> + <MainStack.Screen + name='modalScreen' + component={ModalScreen} + options={{ + presentation: 'transparentModal', + headerShown: false, + ...TransitionPresets.ModalSlideFromBottomIOS, + cardStyle: { + paddingTop: screenWidth / 2, + backgroundColor: 'rgba(0, 0, 0, 0.3)', + }, + }} + /> + <MainStack.Screen name='torSubmission' component={TorSubmissionScreen} --- src/navigation/AssociateHallwayNav/Tabs/MyTeamStackNav.tsx @@ -1,18 +1,29 @@ import React from 'react'; -import {createStackNavigator} from '@react-navigation/stack'; +import {createStackNavigator, TransitionPresets} from '@react-navigation/stack'; import { Components, Properties, PushToTalkMiniApp, } from '@walmart/push-to-talk-mini-app'; -import {TimeClockScreen} from '@walmart/time-clock-mini-app'; +import { + ModalScreen, + NewTorScreen, + TimeClockScreen, + TorReviewScreen, + TorSubmissionScreen, +} from '@walmart/time-clock-mini-app'; import {ScheduleMiniApp} from '@walmart/schedule-mini-app'; import {DrawerButton, Header} from '@walmart/ui-components'; import {useTranslation} from '@walmart/core-services/Translations'; +import {useWindowDimensions} from 'react-native'; const MyTeamStack = createStackNavigator(); export const MyTeamStackNav = () => { + const width = useWindowDimensions().width; + const height = useWindowDimensions().height; + + const screenWidth = width < height ? width : height; const [t] = useTranslation('common'); return ( <MyTeamStack.Navigator @@ -30,6 +41,29 @@ export const MyTeamStackNav = () => { {/* Only accessible from PTT - OnboardingScreen & PttScreen */} <MyTeamStack.Screen name='timeClock' component={TimeClockScreen} /> + <MyTeamStack.Screen + name='modalScreen' + component={ModalScreen} + options={{ + presentation: 'transparentModal', + headerShown: false, + ...TransitionPresets.ModalSlideFromBottomIOS, + cardStyle: { + paddingTop: screenWidth / 2, + backgroundColor: 'rgba(0, 0, 0, 0.3)', + }, + }} + /> + + <MyTeamStack.Screen name='newTor' component={NewTorScreen} /> + + <MyTeamStack.Screen name='torReview' component={TorReviewScreen} /> + + <MyTeamStack.Screen + name='torSubmission' + component={TorSubmissionScreen} + /> + {/* This PTT Screen overrides the header */} {/* HeaderSearchIcon */} <MyTeamStack.Screen
Add modal screen to stack navigation
Add modal screen to stack navigation
f0ea66408d39045f6bdf9b9df00d17db7087de00
--- packages/allspark-foundation/src/HTTP/client.ts @@ -202,7 +202,7 @@ export class HttpClient extends Axios { }, // Interceptors are not handled by axios config. Adding through config is our creation so // we'll have to handle the merging. - interceptors: [...interceptors, ...(this.config.interceptors || [])], + interceptors: [...(this.config.interceptors || []), ...interceptors], }); // Create new instance
fix: interceptors were merged in incorrect order
fix: interceptors were merged in incorrect order
7ccf2ccafddd2c5e721069313478482154275151
--- src/navigation/AssociateHallwayNav/MainStackNav.tsx @@ -9,7 +9,7 @@ import {ScheduleMiniApp} from '@walmart/schedule-mini-app'; import {HealthSurveyMiniApp} from '@walmart/allspark-health-survey-mini-app'; import SettingsMiniApp from '@walmart/settings-mini-app'; import ImpersonationMiniApp from '@walmart/impersonation-mini-app'; -import {Components} from '@walmart/push-to-talk-mini-app'; +import {Components, Properties} from '@walmart/push-to-talk-mini-app'; import {FeedbackMiniApp} from '@walmart/feedback-all-spark-miniapp'; import {FeedbackDialogScreen} from '@walmart/feedback-all-spark-miniapp/dist/src/feedback/containers/FeedbackDialogScreen'; import {SurveySaysDialogScreen} from '@walmart/feedback-all-spark-miniapp/dist/src/feedback/containers/SurveySaysDialogScreen'; @@ -216,6 +216,12 @@ export const MainStackNav = () => { component={Components.TextingScreen} /> + <MainStack.Screen + name='PTT.MessagesList.ButtonSheet.Screen' + component={Components.MessagesScreen} + options={Properties.PttScreenNavProperties} + /> + <MainStack.Screen name='WhatsNewModal' component={WhatsNewModal} /> <MainStack.Screen
adding meganav screen to allspark-core
adding meganav screen to allspark-core
ca2cc4f6e2da351ad2a852ee12638b94282fca20
--- package-lock.json @@ -82,7 +82,7 @@ "@walmart/shelfavailability-mini-app": "1.4.0", "@walmart/taskit-mini-app": "0.48.0", "@walmart/time-clock-mini-app": "0.30.0", - "@walmart/ui-components": "1.6.0", + "@walmart/ui-components": "1.7.0", "@walmart/welcomeme-mini-app": "0.73.0", "@walmart/wfm-ui": "0.2.25", "axios": "^0.26.1", @@ -6131,9 +6131,9 @@ "license": "GPL-3.0-or-later" }, "node_modules/@walmart/ui-components": { - "version": "1.6.0", - "resolved": "https://npme.walmart.com/@walmart/ui-components/-/ui-components-1.6.0.tgz", - "integrity": "sha512-OhaIqIupBKMtp/cSrtM2bQX3/bbDpp3NdmnM/CKqZE5dGUccZIFKdDG+GSaNOKIN+hHWLoEqGctfOxjbtIZT/Q==", + "version": "1.7.0", + "resolved": "https://npme.walmart.com/@walmart/ui-components/-/ui-components-1.7.0.tgz", + "integrity": "sha512-pPonh/rHr4OPmhTiG9/9cs+ERNJHCppW1BNHqCR64rFozZSH3dqnnZJmPFdruLA4GbpvJBroh2H321sB5ecdcw==", "license": "ISC", "dependencies": { "react-hook-form": "^7.33.1", @@ -25180,9 +25180,9 @@ "integrity": "sha1-QVwJoEY4zaaC39G6HDOGH7COw/Y=" }, "@walmart/ui-components": { - "version": "1.6.0", - "resolved": "https://npme.walmart.com/@walmart/ui-components/-/ui-components-1.6.0.tgz", - "integrity": "sha512-OhaIqIupBKMtp/cSrtM2bQX3/bbDpp3NdmnM/CKqZE5dGUccZIFKdDG+GSaNOKIN+hHWLoEqGctfOxjbtIZT/Q==", + "version": "1.7.0", + "resolved": "https://npme.walmart.com/@walmart/ui-components/-/ui-components-1.7.0.tgz", + "integrity": "sha512-pPonh/rHr4OPmhTiG9/9cs+ERNJHCppW1BNHqCR64rFozZSH3dqnnZJmPFdruLA4GbpvJBroh2H321sB5ecdcw==", "requires": { "react-hook-form": "^7.33.1", "react-native-calendars": "^1.1291.0", --- package.json @@ -124,7 +124,7 @@ "@walmart/shelfavailability-mini-app": "1.4.0", "@walmart/taskit-mini-app": "0.48.0", "@walmart/time-clock-mini-app": "0.30.0", - "@walmart/ui-components": "1.6.0", + "@walmart/ui-components": "1.7.0", "@walmart/welcomeme-mini-app": "0.73.0", "@walmart/wfm-ui": "0.2.25", "axios": "^0.26.1",
vs-1248: add icon in ui-component
vs-1248: add icon in ui-component
32c5503138daa3de2a5a4a4f58077f3a7face549
--- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/myteam-mini-app", - "version": "1.15.38", + "version": "1.15.39", "main": "dist/index.js", "files": [ "dist" @@ -99,7 +99,7 @@ "@walmart/react-native-shared-navigation": "6.1.4", "@walmart/react-native-sumo-sdk": "2.6.0", "@walmart/redux-store": "3.7.0", - "@walmart/roster-mini-app": "2.12.40", + "@walmart/roster-mini-app": "2.12.41", "@walmart/ui-components": "1.15.1", "babel-jest": "^29.2.1", "chance": "^1.1.11", --- yarn.lock @@ -6416,7 +6416,7 @@ __metadata: "@walmart/react-native-shared-navigation": "npm:6.1.4" "@walmart/react-native-sumo-sdk": "npm:2.6.0" "@walmart/redux-store": "npm:3.7.0" - "@walmart/roster-mini-app": "npm:2.12.40" + "@walmart/roster-mini-app": "npm:2.12.41" "@walmart/ui-components": "npm:1.15.1" babel-jest: "npm:^29.2.1" chance: "npm:^1.1.11" @@ -6597,9 +6597,9 @@ __metadata: languageName: node linkType: hard -"@walmart/roster-mini-app@npm:2.12.40": - version: 2.12.40 - resolution: "@walmart/roster-mini-app@npm:2.12.40" +"@walmart/roster-mini-app@npm:2.12.41": + version: 2.12.41 + resolution: "@walmart/roster-mini-app@npm:2.12.41" peerDependencies: "@react-native-async-storage/async-storage": ^1.21.0 "@react-native-community/netinfo": ^11.0.1 @@ -6641,7 +6641,7 @@ __metadata: redux: ^4.2.1 redux-saga: ^1.2.3 wifi-store-locator: 1.4.1 - checksum: 10c0/741f43458e2a6cc660eb26aa051c8e017eb979b9793db96c1e4c731db1bd15c53f187f61773b06b40b128fe043b81f2f6e41649090b13c51b835ce52bcef631c + checksum: 10c0/373bac0eb4f85316b84c5dae1a0417a4c56ea05ea5694fbb245cb00d9ba34c915ba219894cee5d9c6c95e1c2550e22e57bc7511660a9f3239e6793647556ec13 languageName: node linkType: hard
Update the roster mini app version
Update the roster mini app version
d86338b5a89db37ccd62378991ee6e16b9c4fd14
--- __tests__/screens/MessagesScreen/OneToOneChatTest.tsx @@ -31,6 +31,7 @@ import { import {unsubscribeChannels} from '../../../src/channels'; import {finishPendingRequests} from "../../harness/utils"; import {createMessageList} from "../../../dist/utils"; +import {MessageList} from "../../../src/components/MessageList"; jest.mock('../../../src/channels/transforms', () => ({ normalizeChannelSnapshot: jest.fn(), @@ -211,8 +212,10 @@ describe('1-1 chat', () => { expect(mockOnSnapShot).toHaveBeenNthCalledWith(1, expect.any(Function), expect.any(Function)); }); - it('should see messages loaded onto the screen', () => { - //TODO + it('should see messages loaded onto the screen', async () => { + const messagesList = renderWithProviders(<MessageList messages={[]} channelPath={''} onEndReachedHandler={() => {}} />); + await finishPendingRequests(); + expect(messagesList.toJSON()).toMatchSnapshot(); }); it('should display an image message as expected', () => { --- __tests__/screens/MessagesScreen/__snapshots__/OneToOneChatTest.tsx.snap @@ -744,3 +744,50 @@ exports[`1-1 chat should receive a text message 1`] = ` </View> </View> `; + +exports[`1-1 chat should see messages loaded onto the screen 1`] = ` +<RCTScrollView + contentContainerStyle={ + { + "paddingHorizontal": 16, + } + } + data={[]} + getItem={[Function]} + getItemCount={[Function]} + invertStickyHeaders={true} + inverted={true} + isInvertedVirtualizedList={true} + keyExtractor={[Function]} + onContentSizeChange={[Function]} + onEndReached={[Function]} + onEndReachedThreshold={0.2} + onLayout={[Function]} + onMomentumScrollBegin={[Function]} + onMomentumScrollEnd={[Function]} + onScroll={[Function]} + onScrollBeginDrag={[Function]} + onScrollEndDrag={[Function]} + removeClippedSubviews={false} + renderItem={[Function]} + scrollEventThrottle={50} + showsVerticalScrollIndicator={false} + stickyHeaderIndices={[]} + style={ + [ + { + "transform": [ + { + "scaleY": -1, + }, + ], + }, + undefined, + ] + } + testID="flatList" + viewabilityConfigCallbackPairs={[]} +> + <View /> +</RCTScrollView> +`; --- __tests__/screens/MessagesScreen/OneToOneChatTest.tsx @@ -31,6 +31,7 @@ import { import {unsubscribeChannels} from '../../../src/channels'; import {finishPendingRequests} from "../../harness/utils"; import {createMessageList} from "../../../dist/utils"; +import {MessageList} from "../../../src/components/MessageList"; jest.mock('../../../src/channels/transforms', () => ({ normalizeChannelSnapshot: jest.fn(), @@ -211,8 +212,10 @@ describe('1-1 chat', () => { expect(mockOnSnapShot).toHaveBeenNthCalledWith(1, expect.any(Function), expect.any(Function)); }); - it('should see messages loaded onto the screen', () => { - //TODO + it('should see messages loaded onto the screen', async () => { + const messagesList = renderWithProviders(<MessageList messages={[]} channelPath={''} onEndReachedHandler={() => {}} />); + await finishPendingRequests(); + expect(messagesList.toJSON()).toMatchSnapshot(); }); it('should display an image message as expected', () => { --- __tests__/screens/MessagesScreen/__snapshots__/OneToOneChatTest.tsx.snap @@ -744,3 +744,50 @@ exports[`1-1 chat should receive a text message 1`] = ` </View> </View> `; + +exports[`1-1 chat should see messages loaded onto the screen 1`] = ` +<RCTScrollView + contentContainerStyle={ + { + "paddingHorizontal": 16, + } + } + data={[]} + getItem={[Function]} + getItemCount={[Function]} + invertStickyHeaders={true} + inverted={true} + isInvertedVirtualizedList={true} + keyExtractor={[Function]} + onContentSizeChange={[Function]} + onEndReached={[Function]} + onEndReachedThreshold={0.2} + onLayout={[Function]} + onMomentumScrollBegin={[Function]} + onMomentumScrollEnd={[Function]} + onScroll={[Function]} + onScrollBeginDrag={[Function]} + onScrollEndDrag={[Function]} + removeClippedSubviews={false} + renderItem={[Function]} + scrollEventThrottle={50} + showsVerticalScrollIndicator={false} + stickyHeaderIndices={[]} + style={ + [ + { + "transform": [ + { + "scaleY": -1, + }, + ], + }, + undefined, + ] + } + testID="flatList" + viewabilityConfigCallbackPairs={[]} +> + <View /> +</RCTScrollView> +`;
adding first mock messages list test
adding first mock messages list test
f3e568433bd37f5d5df99f931c477fe69ff42eb2
--- package-lock.json @@ -3128,40 +3128,28 @@ "integrity": "sha512-vzirL8LmvVnJdyNGFtqfzf3Pth9kuwqnd0cxllT7Gw3Qil4+snxw6yrC9Iw49jIvUFqjGjfkkFbXPeSqOcCVzw==" }, "@walmart/ims-print-services-ui": { - "version": "0.0.17", - "resolved": "https://npme.walmart.com/@walmart/ims-print-services-ui/-/ims-print-services-ui-0.0.17.tgz", - "integrity": "sha512-EvnYQplLs10O3lHZmNbaEDlMR+1hyDzFQqWoQtbPbCYFw/Hj9NOFOkbGfYrsDIMojpMU38yyaVABSoKn0OiEkw==" + "version": "0.0.18", + "resolved": "https://npme.walmart.com/@walmart/ims-print-services-ui/-/ims-print-services-ui-0.0.18.tgz", + "integrity": "sha512-Ol/xACFeq3wLT94Y1AUZi7fmuSwCx9AVHz1NbE8S+Rcjvs+R7xslLqYoR4BMC+AkFl6IsDwuwHlYeN0xVNvlgw==" }, "@walmart/inbox-mini-app": { "version": "0.0.94", "resolved": "https://npme.walmart.com/@walmart/inbox-mini-app/-/inbox-mini-app-0.0.94.tgz", "integrity": "sha512-Nw48GsUKz2HkFr1qjavFld2pryaG9Jzn/QPT9C/xk7UgxTs4UeCmSJEZ99oLeSIV3TA9rgAH8dThkqzwmjP6ew==" }, - "@walmart/manager-approvals-miniapp": { - "version": "0.0.20", - "resolved": "https://npme.walmart.com/@walmart/manager-approvals-miniapp/-/manager-approvals-miniapp-0.0.20.tgz", - "integrity": "sha512-E120x3njupYAHAhpAOmwe44Nva/eVk+q9HkcUYV0+bdDILyqEhrplyENGq1a2hoNZ7mYhuKdmcoIYFeZjV4pIQ==" - }, "@walmart/iteminfo-mini-app": { - "version": "1.0.1", - "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-1.0.1.tgz", - "integrity": "sha512-JZQNletV6dQHxBg7FDj+kK274uZ9iG0XMV5penlfIksItSSRNrR3SQ3qQOe0bKCfXB9ABjnExcTreBeP74TuhQ==", + "version": "1.0.3", + "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-1.0.3.tgz", + "integrity": "sha512-0IXSXKeHx17FbwUrHby8Au/bWTi/C5jo/3VJabj6m0+X2Yc1SMRIcAa7V7YGF9STsiyoGpFN3mh5Ghf6QNjU6g==", "requires": { "react-native-chart-kit": "6.6.1" - }, - "dependencies": { - "react-native-chart-kit": { - "version": "6.6.1", - "resolved": "https://npme.walmart.com/react-native-chart-kit/-/react-native-chart-kit-6.6.1.tgz", - "integrity": "sha512-aYPqKW37CxOVnP6jWq+I7mQ4AWJ6kDvD2InMI143ShQCmOmWGMbykIgFZ3xs8KFCgQx8YUaPgnvayH9zuOP07Q==", - "requires": { - "lodash": "^4.17.13", - "paths-js": "^0.4.10", - "point-in-polygon": "^1.0.1" - } - } } }, + "@walmart/manager-approvals-miniapp": { + "version": "0.0.25", + "resolved": "https://npme.walmart.com/@walmart/manager-approvals-miniapp/-/manager-approvals-miniapp-0.0.25.tgz", + "integrity": "sha512-xr7ZTzOLyVf+t7fVLUHekm2OJT4tPbe0TGhDkE9uMsUu+Kde/PclBFqddUp36CmM+9Cn4y9o8CqEDcvctA6Ylw==" + }, "@walmart/moment-walmart": { "version": "1.0.4", "resolved": "https://npme.walmart.com/@walmart/moment-walmart/-/moment-walmart-1.0.4.tgz", @@ -12457,6 +12445,16 @@ "xdate": "^0.8.0" } }, + "react-native-chart-kit": { + "version": "6.6.1", + "resolved": "https://npme.walmart.com/react-native-chart-kit/-/react-native-chart-kit-6.6.1.tgz", + "integrity": "sha512-aYPqKW37CxOVnP6jWq+I7mQ4AWJ6kDvD2InMI143ShQCmOmWGMbykIgFZ3xs8KFCgQx8YUaPgnvayH9zuOP07Q==", + "requires": { + "lodash": "^4.17.13", + "paths-js": "^0.4.10", + "point-in-polygon": "^1.0.1" + } + }, "react-native-circular-progress": { "version": "1.3.6", "resolved": "https://npme.walmart.com/react-native-circular-progress/-/react-native-circular-progress-1.3.6.tgz", --- package.json @@ -63,7 +63,7 @@ "@redux-saga/testing-utils": "^1.1.3", "@sharcoux/slider": "^5.2.1", "@terrylinla/react-native-sketch-canvas": "^0.8.0", - "@walmart/iteminfo-mini-app": "1.0.1", + "@walmart/iteminfo-mini-app": "1.0.3", "@walmart/allspark-health-survey-mini-app": "0.0.38", "@walmart/allspark-home-mini-app": "0.4.0", "@walmart/allspark-me-mini-app": "0.1.0", @@ -75,7 +75,7 @@ "@walmart/functional-components": "1.0.27", "@walmart/gtp-shared-components": "^1.1.5", "@walmart/impersonation-mini-app": "1.0.15", - "@walmart/ims-print-services-ui": "0.0.17", + "@walmart/ims-print-services-ui": "0.0.18", "@walmart/inbox-mini-app": "0.0.94", "@walmart/manager-approvals-miniapp": "0.0.25", "@walmart/moment-walmart": "1.0.4",
iteminfo 1.0.3 and print 0.0.18
iteminfo 1.0.3 and print 0.0.18
ceb038c4947f2aa0776672ef36719af214cccec9
--- packages/components-library/components/Icon/types.ts @@ -5,10 +5,12 @@ export const ICON_NAMES = [ 'birthday-cake', 'bug', 'bulb', + 'calendar', 'career', 'cellular-data-saver-off', 'cellular-data-saver-on', 'chat', + 'checklist', 'clock-in', 'clock-out', 'clock-out-v2', @@ -44,6 +46,7 @@ export const ICON_NAMES = [ 'store-location', 'store-map', 'team', + 'teams', 'thermometer', 'tote-handle', ] as const;
feat(icons): allspark-6276 added 2.0 icon names
feat(icons): allspark-6276 added 2.0 icon names
83222ad0d66f63ed136e46e07b68f39811d7001e
--- packages/allspark-foundation/src/HTTP/client.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ import axios, { Axios, HeadersDefaults, AxiosInstance } from 'axios'; import { HttpOptions } from '@apollo/client'; import { Response } from 'node-fetch'; @@ -56,29 +57,39 @@ export class HttpClient extends Axios { }; constructor(config: HttpClientConfig = {}) { - // @ts-ignore - mergeConfig exists but is not defined on type - super(axios.mergeConfig(axios.defaults, config)); - // Default key config fields and set on instance const { featureId = 'default', isFeatureInstance = false, timeout = TIMEOUT, + withCredentials = false, interceptors = [], cache = {}, - withCredentials = false, // @ts-ignore - handling legacy format requestInterceptors, // @ts-ignore - handling legacy format responseInterceptors, - ...restConfig + ...axiosConfig } = config; - this.featureId = featureId; - this.isFeatureInstance = isFeatureInstance; + // Create axios parent instance with merged config + // @ts-ignore - mergeConfig exists but is not defined on type + super(axios.mergeConfig(axios.defaults, axiosConfig)); + + // Set axios defaults for defaulted fields extracted above this.defaults.timeout = timeout; this.defaults.withCredentials = withCredentials; - this.config = { timeout, interceptors, ...restConfig }; + + // Setup custom fields + this.featureId = featureId; + this.isFeatureInstance = isFeatureInstance; + this.config = { + timeout, + withCredentials, + interceptors, + cache, + ...axiosConfig, + }; this.storage = getStorageForClient(featureId); // Setup cache interceptor, not added to config so not duplicated on clone @@ -113,11 +124,23 @@ export class HttpClient extends Axios { public configure = (config: Omit<HttpClientConfig, 'featureId'>) => { this.configured = true; + // Extract custom fileds we must manually merge. + const { interceptors = [], cache = {}, ...restConfig } = config; + // @ts-ignore - mergeConfig exists but is not defined on type - this.defaults = axios.mergeConfig(this.defaults, config); + this.defaults = axios.mergeConfig(this.defaults, restConfig); - if (config.interceptors) { - this.addInterceptors(config.interceptors, { recursive: true }); + if (interceptors) { + this.addInterceptors(interceptors, { recursive: true }); + } + + if (cache) { + // @ts-ignore - clear cache instance, before creating a new one + this.defaults.cache = null; + setupCache(this as unknown as AxiosInstance, { + ...cache, + storage: getStorageForClient(this.featureId), + }); } }; @@ -144,18 +167,24 @@ export class HttpClient extends Axios { return existingClient; } - const { interceptors = [], headers, ...restConfig } = config || {}; - //@ts-ignore - overwriting in case specified if (config.baseURL) { warnForBaseURL(featureId); } - // Merge Config + // --- Merge Config --- // + // Extract custom fileds we must manually merge. + const { interceptors = [], headers, ...restConfig } = config || {}; + + // Cache on defaults would be the created cache instance, not the config; + // Removing it so its not merged with defaults and a new cache is created + // on the new instance. + // @ts-ignore + const { cache, ...parentDefaults } = this.defaults; + // @ts-ignore - mergeConfig exists but is not defined on type - const mergedConfig = axios.mergeConfig(this.defaults, { + const mergedConfig = axios.mergeConfig(parentDefaults, { ...restConfig, - cache: null, featureId, isFeatureInstance: true, headers: {
fix: http client default merging included custom fields and cache
fix: http client default merging included custom fields and cache
af43bae6506ac47b5a99bd5ff23b63aef0faa96c
--- packages/allspark-foundation-hub/__tests__/TeamListItem.test.tsx @@ -28,20 +28,13 @@ describe('TeamListItem', () => { }); it('renders list item for team selection correctly', () => { - const { getByTestId, toJSON } = render( - <TeamListItem {...teamSelectionProps} /> - ); - - expect(toJSON()).toMatchSnapshot(); - + const { getByTestId } = render(<TeamListItem {...teamSelectionProps} />); const teamNameElement = getByTestId('teamlist-teamname'); expect(teamNameElement).toBeTruthy(); }); it('renders list item for all teams roster view correctly', () => { - const { getByTestId, toJSON } = render(<TeamListItem {...allTeamsProps} />); - - expect(toJSON()).toMatchSnapshot(); + const { getByTestId } = render(<TeamListItem {...allTeamsProps} />); const teamNameElement = getByTestId('teamlist-teamname'); expect(teamNameElement).toBeTruthy(); --- packages/allspark-foundation-hub/__tests__/__snapshots__/TeamListItem.test.tsx.snap @@ -1,308 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`TeamListItem renders list item for all teams roster view correctly 1`] = ` -<View - accessibilityState={ - { - "busy": undefined, - "checked": undefined, - "disabled": undefined, - "expanded": undefined, - "selected": undefined, - } - } - accessibilityValue={ - { - "max": undefined, - "min": undefined, - "now": undefined, - "text": undefined, - } - } - accessible={true} - collapsable={false} - focusable={true} - onClick={[Function]} - onResponderGrant={[Function]} - onResponderMove={[Function]} - onResponderRelease={[Function]} - onResponderTerminate={[Function]} - onResponderTerminationRequest={[Function]} - onStartShouldSetResponder={[Function]} - style={ - { - "alignItems": "center", - "backgroundColor": "#fff", - "borderBottomColor": "#e3e4e5", - "borderBottomWidth": 1, - "display": "flex", - "flexDirection": "row", - "justifyContent": "space-between", - "opacity": 1, - "paddingBottom": 16, - "paddingTop": 16, - } - } - testID="team-list-item" -> - <View - style={ - { - "alignItems": "center", - "display": "flex", - "flexDirection": "row", - "gap": 10, - } - } - > - <Image - onError={[Function]} - resizeMode="cover" - source={ - { - "uri": "https://i5-me.walmartimages.com/images/teams/task-image-store-02bdfd7611.png", - } - } - style={ - { - "alignSelf": "flex-start", - "height": 32, - "justifyContent": "flex-start", - "width": 36, - } - } - /> - <View - accessibilityLabel="Management 93 Clocked in" - accessibilityRole="header" - accessible={true} - style={ - { - "display": "flex", - "flexDirection": "column", - } - } - > - <Body - UNSAFE_style={ - { - "fontSize": 16, - "fontWeight": "700", - "lineHeight": 24, - } - } - testID="teamlist-teamname" - > - Management - </Body> - <Body - UNSAFE_style={ - { - "color": "#2e2f32", - "fontFamily": "Bogle-Regular", - "fontSize": 14, - "fontWeight": "400", - "lineHeight": 20, - } - } - > - 93 Clocked in - </Body> - </View> - </View> - <View - style={ - { - "alignItems": "center", - "display": "flex", - "flexDirection": "row", - "gap": 12, - } - } - > - <View - accessibilityLabel="View Management" - accessibilityRole="button" - > - <ChevronRightIcon - UNSAFE_style={ - { - "height": 24, - "width": 24, - } - } - /> - </View> - </View> -</View> -`; - -exports[`TeamListItem renders list item for team selection correctly 1`] = ` -<View - accessibilityState={ - { - "busy": undefined, - "checked": undefined, - "disabled": undefined, - "expanded": undefined, - "selected": undefined, - } - } - accessibilityValue={ - { - "max": undefined, - "min": undefined, - "now": undefined, - "text": undefined, - } - } - accessible={true} - collapsable={false} - focusable={true} - onClick={[Function]} - onResponderGrant={[Function]} - onResponderMove={[Function]} - onResponderRelease={[Function]} - onResponderTerminate={[Function]} - onResponderTerminationRequest={[Function]} - onStartShouldSetResponder={[Function]} - style={ - { - "alignItems": "center", - "backgroundColor": "#fff", - "borderBottomColor": "#e3e4e5", - "borderBottomWidth": 1, - "display": "flex", - "flexDirection": "row", - "justifyContent": "space-between", - "opacity": 1, - "paddingBottom": 16, - "paddingTop": 16, - } - } - testID="team-list-item" -> - <View - style={ - { - "alignItems": "center", - "display": "flex", - "flexDirection": "row", - "gap": 10, - } - } - > - <Image - onError={[Function]} - resizeMode="cover" - source={ - { - "uri": "https://i5-me.walmartimages.com/images/teams/task-image-store-02bdfd7611.png", - } - } - style={ - { - "alignSelf": "flex-start", - "height": 32, - "justifyContent": "flex-start", - "width": 36, - } - } - /> - <View - accessibilityLabel="Management " - accessibilityRole="header" - accessible={true} - style={ - { - "display": "flex", - "flexDirection": "column", - } - } - > - <Body - UNSAFE_style={ - { - "fontSize": 16, - "fontWeight": "400", - "lineHeight": 24, - } - } - testID="teamlist-teamname" - > - Management - </Body> - </View> - </View> - <View - style={ - { - "alignItems": "center", - "display": "flex", - "flexDirection": "row", - "gap": 12, - } - } - > - <View - accessibilityLabel=" checkboxunchecked" - accessibilityState={ - { - "busy": undefined, - "checked": undefined, - "disabled": undefined, - "expanded": undefined, - "selected": false, - } - } - accessibilityValue={ - { - "max": undefined, - "min": undefined, - "now": undefined, - "text": undefined, - } - } - accessible={true} - collapsable={false} - focusable={true} - onBlur={[Function]} - onClick={[Function]} - onFocus={[Function]} - onResponderGrant={[Function]} - onResponderMove={[Function]} - onResponderRelease={[Function]} - onResponderTerminate={[Function]} - onResponderTerminationRequest={[Function]} - onStartShouldSetResponder={[Function]} - style={ - [ - { - "alignItems": "flex-start", - "flexDirection": "row", - }, - undefined, - ] - } - testID="team-selection-checkbox-Management" - > - <View - style={ - { - "alignItems": "center", - "backgroundColor": "#fff", - "borderColor": "#000", - "borderRadius": 2, - "borderStyle": "solid", - "borderWidth": 1, - "height": 18, - "justifyContent": "center", - "margin": 1, - "width": 18, - } - } - /> - </View> - </View> -</View> -`;
feat(ui): removed snaps
feat(ui): removed snaps
c3bd276ba50244b8ceeae0719cf740510445d4cf
--- __tests__/harness/redux/mockState/index.ts @@ -14,5 +14,11 @@ export const initialStateMock: GlobalState = { locale: {}, versions: {}, deviceInfo: {}, - appConfig: {}, + appConfig: { + data: { + texting: { + enableMessageButton: 'true', + }, + }, + }, }; --- src/redux/selectors.ts @@ -3,7 +3,6 @@ import {UserSelectors, GlobalState} from '@walmart/redux-store'; import {encryptUserId} from '../utils/user'; import {SharedReduxState} from './types'; import {CCMFallbacks} from '../ccmFallbacks'; -import {logger} from '../logger/Logger'; export const getEncryptedUserId = createSelector( [UserSelectors.getUserWIN], --- __tests__/harness/redux/mockState/index.ts @@ -14,5 +14,11 @@ export const initialStateMock: GlobalState = { locale: {}, versions: {}, deviceInfo: {}, - appConfig: {}, + appConfig: { + data: { + texting: { + enableMessageButton: 'true', + }, + }, + }, }; --- src/redux/selectors.ts @@ -3,7 +3,6 @@ import {UserSelectors, GlobalState} from '@walmart/redux-store'; import {encryptUserId} from '../utils/user'; import {SharedReduxState} from './types'; import {CCMFallbacks} from '../ccmFallbacks'; -import {logger} from '../logger/Logger'; export const getEncryptedUserId = createSelector( [UserSelectors.getUserWIN],
fixing unit tests
fixing unit tests
89e2df8d9f29d3471cdd4f52cd58a345184db343
--- targets/US/package.json @@ -148,7 +148,7 @@ "@walmart/store-feature-orders": "1.26.12", "@walmart/taskit-mini-app": "patch:@walmart/taskit-mini-app@npm%3A3.3.0#~/.yarn/patches/@walmart-taskit-mini-app-npm-3.3.0-a2dd632c59.patch", "@walmart/time-clock-mini-app": "2.400.0", - "@walmart/topstock-mini-app": "1.16.16", + "@walmart/topstock-mini-app": "1.16.17", "@walmart/ui-components": "patch:@walmart/ui-components@patch%3A@walmart/ui-components@npm%253A1.16.1%23~/.yarn/patches/@walmart-ui-components-npm-1.16.1-c240fb0151.patch%3A%3Aversion=1.16.1&hash=79c828#~/.yarn/patches/@walmart-ui-components-patch-cd5ae6f92c.patch", "@walmart/welcomeme-mini-app": "0.95.1", "@walmart/wfm-ui": "1.6.0", --- yarn.lock @@ -7126,7 +7126,7 @@ __metadata: "@walmart/store-feature-orders": "npm:1.26.12" "@walmart/taskit-mini-app": "patch:@walmart/taskit-mini-app@npm%3A3.3.0#~/.yarn/patches/@walmart-taskit-mini-app-npm-3.3.0-a2dd632c59.patch" "@walmart/time-clock-mini-app": "npm:2.400.0" - "@walmart/topstock-mini-app": "npm:1.16.16" + "@walmart/topstock-mini-app": "npm:1.16.17" "@walmart/ui-components": "patch:@walmart/ui-components@patch%3A@walmart/ui-components@npm%253A1.16.1%23~/.yarn/patches/@walmart-ui-components-npm-1.16.1-c240fb0151.patch%3A%3Aversion=1.16.1&hash=79c828#~/.yarn/patches/@walmart-ui-components-patch-cd5ae6f92c.patch" "@walmart/welcomeme-mini-app": "npm:0.95.1" "@walmart/wfm-ui": "npm:1.6.0" @@ -8113,9 +8113,9 @@ __metadata: languageName: node linkType: hard -"@walmart/topstock-mini-app@npm:1.16.16": - version: 1.16.16 - resolution: "@walmart/topstock-mini-app@npm:1.16.16" +"@walmart/topstock-mini-app@npm:1.16.17": + version: 1.16.17 + resolution: "@walmart/topstock-mini-app@npm:1.16.17" peerDependencies: "@react-native-firebase/app": ^15.1.1 "@react-native-firebase/crashlytics": ^15.1.1 @@ -8132,7 +8132,7 @@ __metadata: react-native-haptic-feedback: ^1.13.0 react-native-vector-icons: ">=6.6.0" react-redux: ">=7.2.0" - checksum: 10c0/001cce7a5436cf0d28856a947c641e956dd2deaaef492469eb38629969e74b74d16456993a258e7f042b146269e665709716aeea2b93435e59315d667a427cd1 + checksum: 10c0/9332d8fb7792e99f6fe734670ef1d60e23e9657d9b4ae779de5ad1f2eb4a6c0d2bca28153f0b6f6c6b7aad821e0dee36d745da338724ca604c129af9a8811e07 languageName: node linkType: hard
fix(): updated topstock version
fix(): updated topstock version
890b84312b20c78003f4a1e62382d7a6eab4ebc7
--- docs/CHANGELOG.md @@ -1,3 +1,17 @@ +# [2.1.0](https://gecgithub01.walmart.com/smdv/roster-miniapp/compare/v2.0.2...v2.1.0) (2024-04-25) + + +### Bug Fixes + +* **ui:** sonar property update SMDV-5648 ([87392fc](https://gecgithub01.walmart.com/smdv/roster-miniapp/commit/87392fc216c4df10e917165299ac00d1a204c013)) +* **ui:** sonar property update SMDV-5648 ([1f27db8](https://gecgithub01.walmart.com/smdv/roster-miniapp/commit/1f27db8cdd1942753eb77a50a0ae358fe832f6ef)) + + +### Features + +* **ui:** add sonar update SMDV-5648 ([a44b959](https://gecgithub01.walmart.com/smdv/roster-miniapp/commit/a44b9593eeab23e43482836f3c5a6cc412e4a32a)) +* **ui:** add sonar update SMDV-5648 ([47fd19a](https://gecgithub01.walmart.com/smdv/roster-miniapp/commit/47fd19a6c03a100870799fb51f193fc4286f23cb)) + ## [2.0.2](https://gecgithub01.walmart.com/smdv/roster-miniapp/compare/v2.0.1...v2.0.2) (2024-04-23) --- package-lock.json @@ -1,12 +1,12 @@ { "name": "@walmart/roster-mini-app", - "version": "2.0.2", + "version": "2.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@walmart/roster-mini-app", - "version": "2.0.2", + "version": "2.1.0", "hasInstallScript": true, "devDependencies": { "@babel/core": "^7.20.0", --- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/roster-mini-app", - "version": "2.0.2", + "version": "2.1.0", "private": false, "main": "dist/index.js", "files": [
chore(release): 2.1.0 [skip ci]
chore(release): 2.1.0 [skip ci] # [2.1.0](https://gecgithub01.walmart.com/smdv/roster-miniapp/compare/v2.0.2...v2.1.0) (2024-04-25) ### Bug Fixes * **ui:** sonar property update SMDV-5648 ([87392fc](https://gecgithub01.walmart.com/smdv/roster-miniapp/commit/87392fc216c4df10e917165299ac00d1a204c013)) * **ui:** sonar property update SMDV-5648 ([1f27db8](https://gecgithub01.walmart.com/smdv/roster-miniapp/commit/1f27db8cdd1942753eb77a50a0ae358fe832f6ef)) ### Features * **ui:** add sonar update SMDV-5648 ([a44b959](https://gecgithub01.walmart.com/smdv/roster-miniapp/commit/a44b9593eeab23e43482836f3c5a6cc412e4a32a)) * **ui:** add sonar update SMDV-5648 ([47fd19a](https://gecgithub01.walmart.com/smdv/roster-miniapp/commit/47fd19a6c03a100870799fb51f193fc4286f23cb))
2c1f508544c6b833ea2ea3250b11257730361200
--- src/home/components/TaskCard/index.tsx @@ -34,14 +34,15 @@ export const TaskCard: FC<TaskCardProps> = (props) => { const copilot = configMap?.copilot; const showTaskClockStatus = useHomeAppConfig('showTaskClockStatus', true); const tmsVersion = useHomeAppConfig('tmsVersion', TMS_VERSION_2); - + /* istanbul ignore next */ + const displayStyle = copilot?.enabled ? 'none' : 'flex'; return isClockedIn ? ( <View style={[ styles.container, style, // eslint-disable-next-line react-native/no-inline-styles - {display: copilot?.enabled ? 'none' : 'flex'}, + {display: displayStyle}, ]} testID='taskCard'> <Headline style={styles.titleText}> --- src/navigation/AssociateHallwayNav/Tabs/index.tsx @@ -181,6 +181,7 @@ export const MainTabsNav = () => { const pttBadgeCount = pttVoiceBadgeCount + pttTextBadgeCount; const renderTaskIt = () => + /* istanbul ignore next */ taskit.enabled ? ( <MainTabs.Screen name='taskit'
fix: lint
fix: lint
f0a96d616f87812db30ac1d599cbce16dbcdb323
--- package-lock.json @@ -3411,9 +3411,9 @@ "integrity": "sha512-f4KuVr2K+ITDD3vmd1FWWAdHYKUyd+/PGu3s0YpFCAMe97jEm9En9xcDT1iEqM+3+kpcunwzm/E09vexdz8VMQ==" }, "@walmart/metrics-mini-app": { - "version": "0.4.11", - "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.4.11.tgz", - "integrity": "sha512-GqO2SEWNHFhjDbf9Gy3rEYKubg2TPxdH1KBAxpeAfemQbupsL5EpNXS4xRPGlOBf9Unsv6jqsQwpu+vJynRofA==", + "version": "0.4.12", + "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.4.12.tgz", + "integrity": "sha512-LAuiMisSTPFCaaTJ9J1DuaLW0va59dbskY8YiaTY/dziEtojPEkF4Sw4kX24pIQLEuKiipdBrjiWiuetSyR6JA==", "requires": { "@types/base-64": "^1.0.0", "apisauce": "^1.1.2", @@ -3574,9 +3574,9 @@ "integrity": "sha512-PhbwXZYIduJImUrywvm+tqhFgV2qwNk2xhXjbaoBBOF8d0vHDjNElNEUvayM+9Nj25hFciAg/kYvFxXYpoelNQ==" }, "@walmart/shelfavailability-mini-app": { - "version": "0.3.90", - "resolved": "https://npme.walmart.com/@walmart/shelfavailability-mini-app/-/shelfavailability-mini-app-0.3.90.tgz", - "integrity": "sha512-B0DNvDih/RS74eUovgwpGtdA76s7pSRIcptKOS7Xd4kUjD7BojHNLf+Hzdq6paJUXA3DHh1ZXWfjVTYgWgVlLQ==", + "version": "0.3.91", + "resolved": "https://npme.walmart.com/@walmart/shelfavailability-mini-app/-/shelfavailability-mini-app-0.3.91.tgz", + "integrity": "sha512-Ged8iYVEb6BBzCsfbEkJAcOVNUaGUUzJkHW10mwnmEl8c3sO7l2uOxVbapN0c5Ax/sDEsgLiX/gHohQpwVfPVg==", "requires": { "@types/uuid": "^8.3.0", "@types/xdate": "^0.8.31", --- package.json @@ -96,7 +96,7 @@ "@walmart/redux-store": "^1.0.15", "@walmart/schedule-mini-app": "0.3.1", "@walmart/settings-mini-app": "1.3.7", - "@walmart/shelfavailability-mini-app": "0.3.90", + "@walmart/shelfavailability-mini-app": "0.3.91", "@walmart/time-clock-mini-app": "0.4.18", "@walmart/ui-components": "1.1.57", "@walmart/welcomeme-mini-app": "0.30.4",
03.91 SA
03.91 SA
90b7dbbf2e25ffbc29c81c8e4db16452e3ebb540
--- .looper.yml @@ -15,11 +15,6 @@ scheduling: concurrent branches: - spec: feature/* triggers: - - push: - call: canaryRelease - skipAuthor: - - jenkinspan - - svc-looper - manual: name: Publish Changed call: publishFromChanges @@ -99,7 +94,7 @@ flows: canaryRelease: - call: preparePublish - - (name Publish Canary) HUSKY=0 npx lerna publish --canary --conventional-commits preminor --preid beta --registry ${REPOSOLNS_NPM_REPO} --yes + - (name Publish Canary) HUSKY=0 npx lerna publish --canary preminor --preid beta --registry ${REPOSOLNS_NPM_REPO} --yes publishMinor: --- packages/expo-config-plugins/src/utils.ts @@ -4,8 +4,3 @@ export function sanitizedName(name: string) { .normalize("NFD") .replace(/[\u0300-\u036f]/g, ""); } - -export function doNothing(name: string) { - // This function intentionally does nothing. - return name; -}
disabling auto publish
disabling auto publish
bf1046c709a2c6efa09363e0b1508348a353f150
--- packages/allspark-foundation/__tests__/FeatureRunner/components/FeatureSection.test.tsx @@ -1,12 +1,14 @@ import React from 'react'; import { render, fireEvent } from '../../utils'; import { + FeatureHeading, FeatureSection, LocalStorageCard, } from '../../../src/FeatureRunner/components/FeatureSection'; import { AllsparkNavigationClient } from '../../../src/Navigation'; import { AllsparkFeatureModule } from '../../../src/Feature'; import { AllsparkLocalStorage } from '../../../src/LocalStorage'; +import { ActiveAllsparkContainer } from '../../../src/Container'; jest.mock('../../../src/Navigation', () => ({ AllsparkNavigationClient: { @@ -24,6 +26,21 @@ jest.mock('../../../src/LocalStorage', () => ({ getFeatureInstance: jest.fn(), }, })); +jest.mock('../../../src/Container', () => { + return { + ActiveAllsparkContainer: { + features: { + disableFeature: jest.fn(), + enableFeature: jest.fn(), + useFeatureName: jest.fn(), + useFeatureEnabled: jest.fn(), + } + } + } +}); + +const consoleLogSpy = jest.spyOn(console, 'log'); + const props = { feature: { featureID: 'test-feature', @@ -58,6 +75,7 @@ describe('FeatureSection and LocalStorageCard', () => { const { getByTestId } = render(<LocalStorageCard featureID='test' />); fireEvent.press(getByTestId('clear')); expect(mockClear).toHaveBeenCalled(); + expect(consoleLogSpy).toHaveBeenCalledTimes(3); }); it('call logLocalStorage on Log button press', async () => { mockGetAllKeys.mockResolvedValue(['key1', 'key2']); @@ -70,4 +88,22 @@ describe('FeatureSection and LocalStorageCard', () => { expect(mockGetAllKeys).toHaveBeenCalled(); expect(mockMultiGet).toHaveBeenCalledWith(['key1', 'key2']); }); + it('verify onToggle method', () => { + (ActiveAllsparkContainer.features.useFeatureEnabled as jest.Mock).mockReturnValue(true); + const props = { featureID: 'test-feature'} + const screen = render(<FeatureHeading {...props}/>); + let btn = screen.getByTestId('feature-heading-button'); + + fireEvent.press(btn); + expect(ActiveAllsparkContainer.features.disableFeature).toHaveBeenCalledWith('test-feature'); + }); + it('verify onToggle method when feature not enabled', () => { + (ActiveAllsparkContainer.features.useFeatureEnabled as jest.Mock).mockReturnValue(false); + const props = { featureID: 'test-feature'} + const screen = render(<FeatureHeading {...props}/>); + let btn = screen.getByTestId('feature-heading-button'); + + fireEvent.press(btn); + expect(ActiveAllsparkContainer.features.enableFeature).toHaveBeenCalledWith('test-feature'); + }) }); --- packages/allspark-foundation/__tests__/FeatureRunner/components/LanguageButton.test.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { render, fireEvent } from '../../utils'; import { ChangeLanguageButton } from '../../../src/FeatureRunner/components/LanguageButton'; import { AllsparkNavigationClient } from '../../../src/Navigation'; +import { useAllsparkTranslation } from '../../../src/Translation'; jest.mock('../../../src/Navigation', () => ({ AllsparkNavigationClient: { @@ -36,6 +37,14 @@ describe('ChangeLanguageButton', () => { test('should render snapshot', async () => { const { toJSON } = render(<ChangeLanguageButton />); + expect(toJSON()).toMatchSnapshot(); + }); + test('should return default language when not provided by i18n', async () => { + (useAllsparkTranslation as jest.Mock).mockImplementation(jest.fn(() => ({ + i18n: {}, + }))); + const { toJSON } = render(<ChangeLanguageButton />); + expect(toJSON()).toMatchSnapshot(); }); }); --- packages/allspark-foundation/__tests__/FeatureRunner/components/__snapshots__/LanguageButton.test.tsx.snap @@ -56,3 +56,60 @@ exports[`ChangeLanguageButton should render snapshot 1`] = ` </Body> </View> `; + +exports[`ChangeLanguageButton should return default language when not provided by i18n 1`] = ` +<View + accessibilityState={ + { + "busy": undefined, + "checked": undefined, + "disabled": undefined, + "expanded": undefined, + "selected": undefined, + } + } + accessibilityValue={ + { + "max": undefined, + "min": undefined, + "now": undefined, + "text": undefined, + } + } + accessible={true} + collapsable={false} + focusable={true} + onClick={[Function]} + onResponderGrant={[Function]} + onResponderMove={[Function]} + onResponderRelease={[Function]} + onResponderTerminate={[Function]} + onResponderTerminationRequest={[Function]} + onStartShouldSetResponder={[Function]} + style={ + { + "alignItems": "center", + "flexDirection": "row", + "opacity": 1, + } + } + testID="languageButton" +> + <GlobeIcon + color="white" + size={24} + /> + <Body + UNSAFE_style={ + { + "color": "white", + "fontSize": 16, + "lineHeight": 24, + "marginLeft": 4, + } + } + > + EN + </Body> +</View> +`; --- packages/allspark-foundation/__tests__/FeatureRunner/screens/__snapshots__/Home.test.tsx.snap @@ -116,6 +116,7 @@ exports[`Home should render correctly 1`] = ` </Heading> <Button onPress={[Function]} + testID="feature-heading-button" variant="tertiary" > Disable --- packages/allspark-foundation/src/FeatureRunner/components/FeatureSection.tsx @@ -91,7 +91,7 @@ export const FeatureHeading = (props: { <Heading> Feature: {name} ({enabled ? 'Enabled' : 'Disabled'}) </Heading> - <Button variant='tertiary' onPress={onToggle}> + <Button testID='feature-heading-button' variant='tertiary' onPress={onToggle}> {enabled ? 'Disable' : 'Enable'} </Button> </View>
test: coverage for FeatureRunner components
test: coverage for FeatureRunner components
ce5a3888a3bb34dd73b88c8ec6f1917749e849be
--- packages/allspark-foundation-hub/src/HubFeature/Hub/TeamSwitcher/index.tsx @@ -147,7 +147,6 @@ export const TeamSwitcher = ({ findTeamById(evaluatedTeamList, selectedTeamPreference) || evaluatedSelectTeam ); - // eslint-disable-next-line react-hooks/exhaustive-deps }, [ userPrefTeams, empType, @@ -155,6 +154,9 @@ export const TeamSwitcher = ({ isOffSite, allTeamsOfStore, selectedTeamPreference, + selectedTeam, + teamData, + dispatch, ]); useEffect(() => {
Update the team id change for selected team
Update the team id change for selected team
4a49ebed38c6e33f5ee0414021ff761ba14e5377
--- package-lock.json @@ -85,7 +85,7 @@ "@walmart/native-rfid-scanner": "3.7.3", "@walmart/onewalmart-miniapp": "1.0.24", "@walmart/pay-stub-miniapp": "0.15.2", - "@walmart/payrollsolution_miniapp": "0.140.1", + "@walmart/payrollsolution_miniapp": "0.140.3", "@walmart/price-changes-mini-app": "1.10.9", "@walmart/profile-feature-app": "1.138.3", "@walmart/react-native-encrypted-storage": "~1.1.3", @@ -12089,9 +12089,9 @@ } }, "node_modules/@walmart/payrollsolution_miniapp": { - "version": "0.140.1", - "resolved": "https://npme.walmart.com/@walmart/payrollsolution_miniapp/-/payrollsolution_miniapp-0.140.1.tgz", - "integrity": "sha512-9XCsrETQNy2upiG4JlKKk6ujH3E9JPksvudEtfi0PpjSJfjpLRfL7gd76axRM+31JFUzB8yQeZ9yjGMZcTr2Ug==", + "version": "0.140.3", + "resolved": "https://npme.walmart.com/@walmart/payrollsolution_miniapp/-/payrollsolution_miniapp-0.140.3.tgz", + "integrity": "sha512-LaT2GQbwcRfJDEhkrCWVUp1o6rasFqN9y1BVbn4T9CehLGcQZ1xU1JqbpfGZ/AldoNQw3cgJ6ADNFDyXVMmR0A==", "hasInstallScript": true, "dependencies": { "crypto-js": "^3.3.0", --- package.json @@ -126,7 +126,7 @@ "@walmart/native-rfid-scanner": "3.7.3", "@walmart/onewalmart-miniapp": "1.0.24", "@walmart/pay-stub-miniapp": "0.15.2", - "@walmart/payrollsolution_miniapp": "0.140.1", + "@walmart/payrollsolution_miniapp": "0.140.3", "@walmart/price-changes-mini-app": "1.10.9", "@walmart/profile-feature-app": "1.138.3", "@walmart/react-native-encrypted-storage": "~1.1.3", @@ -389,7 +389,7 @@ "@walmart/native-rfid-scanner": "3.7.3", "@walmart/onewalmart-miniapp": "1.0.24", "@walmart/pay-stub-miniapp": "0.15.2", - "@walmart/payrollsolution_miniapp": "0.140.1", + "@walmart/payrollsolution_miniapp": "0.140.3", "@walmart/price-changes-mini-app": "1.10.9", "@walmart/profile-feature-app": "1.138.3", "@walmart/react-native-encrypted-storage": "~1.1.3",
feat: bump version
feat: bump version
2e85448537d8b23b66c611bf1f6cf8fd2b5fb793
--- packages/me-at-walmart-container/src/redux/config.ts @@ -38,6 +38,7 @@ import { HTTP_SUCCESS_LOG_RATE_KEY, } from '../http/constants'; import {ConfigLogger, MeAtWalmartConfigService} from '../services/config'; +import { NavConfigActionCreators } from '@walmart/allspark-foundation'; export const MIN_ALLOWED_FORCE_REFRESH_INTERVAL = 5 * 60 * 1000; @@ -247,6 +248,10 @@ export function* onAppConfigSuccess() { } } +const FEATURE_ID_ALIASES: Record<string, string> = { + 'ask_sam': 'askSam' +}; + export function* onConfigUpdate( action: | IConfigActions['FETCH_SUCCESS'] @@ -256,10 +261,14 @@ export function* onConfigUpdate( if (payload?.oneClick) { Object.entries(payload.oneClick).forEach(([featureId, config]) => { + const actualFeatureId = FEATURE_ID_ALIASES[featureId] || featureId; + if (config?.enable === false) { - ActiveAllsparkContainer.disableFeature(featureId); + ActiveAllsparkContainer.features.disableFeature(actualFeatureId); + // NavConfigActionCreators.disableOption(actualFeatureId); // TODO: this doesn't work } else { - ActiveAllsparkContainer.enableFeature(featureId); + ActiveAllsparkContainer.features.enableFeature(actualFeatureId); + // NavConfigActionCreators.enableOption(actualFeatureId); // TODO: this doesn't work } }); }
fix: feature toggle used incorrect method
fix: feature toggle used incorrect method
dfe8a30cec065cc8d3f4a11bd27764aeb4d63d11
--- packages/allspark-foundation/src/HTTP/client.ts @@ -13,6 +13,7 @@ import { ResponseInterceptor, } from './types'; import { + warnForAdapter, warnForBaseURL, warnForIncorrectInterceptors, warnForLegacyCalls, @@ -93,10 +94,12 @@ export class HttpClient extends Axios { this.storage = getStorageForClient(featureId); // Setup cache interceptor, not added to config so not duplicated on clone - setupCache(this as unknown as AxiosInstance, { - ...cache, - storage: this.storage, - }); + if (!config.skipCacheSetup) { + setupCache(this as unknown as AxiosInstance, { + ...cache, + storage: this.storage, + }); + } // Setup retry interceptor, not added to config so not duplicated on clone const retryInterceptor = createRetryInterceptor(this); @@ -172,6 +175,12 @@ export class HttpClient extends Axios { warnForBaseURL(featureId); } + // @backwards-compatability - skipping cache setup if adapter is specified to avoid conflict + if (config?.adapter) { + warnForAdapter(featureId); + config.skipCacheSetup = true; + } + // --- Merge Config --- // // Extract custom fileds we must manually merge. const { interceptors = [], headers, ...restConfig } = config || {}; --- packages/allspark-foundation/src/HTTP/types.ts @@ -75,6 +75,8 @@ export type HttpClientCustomConfig = { isFeatureInstance?: boolean; retry?: RetryConfig; interceptors?: Interceptor[]; + // @backwards-compatibility - only added to bypass default cache setup for those using cache adapter + skipCacheSetup?: boolean; }; export type HttpClientConfig = Omit< --- packages/allspark-foundation/src/HTTP/warnings.ts @@ -32,3 +32,9 @@ export const warnForLegacyCalls = ( `Allspark Http Client Warning!\n${method} request to ${url}, for ${featureId} feature client, may be using an incorrect format.\n${method} calls should follow the format: ${method}(url, data, config) not ${method}(url, config)` ); }; + +export const warnForAdapter = (featureId: string) => { + console.warn( + `Allspark Http Client Warning!\nAdapter specified for ${featureId} feature client. This will disable the default cache behavior. If you want to use the cache, please remove the adapter.` + ); +};
feat: add flag to skip http client cache setup. implement when adapter present on config
feat: add flag to skip http client cache setup. implement when adapter present on config
768d472142cd34a407a1c7fa6aff809d5c630905
--- packages/core-utils/src/hooks.ts @@ -1,3 +1,4 @@ +import { useEffect } from 'react'; import * as AllsparkUtils from '@walmart/allspark-utils'; /** @@ -15,11 +16,27 @@ export const useAppState = AllsparkUtils.useAppState; export const useAppStateEffect = AllsparkUtils.useAppStateEffect; /** - * @deprecated moved to "@walmart/allspark-utils" + * @deprecated use 'useAsync' from "@walmart/allspark-utils". + * Note that the API has changed in the new version. * @example * import {useAsync} from '@walmart/allspark-utils'; */ -export const useAsync = AllsparkUtils.useAsync; +export const useAsync = <T>( + promise: Promise<T> | (() => Promise<T>), + dependencies: any[] = [], + autoFetch: boolean = true +) => { + const [fetch, state] = AllsparkUtils.useLazyAsync(promise); + + useEffect(() => { + if (autoFetch) { + fetch(); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [...dependencies]); + + return { ...state, refetch: fetch }; +}; /** * @deprecated moved to "@walmart/allspark-utils"
fix: use async hook did not maintain backwards compatability
fix: use async hook did not maintain backwards compatability
81ce2956487ffef40066e852ac5f18311102434b
--- android/app/build.gradle @@ -134,7 +134,7 @@ android { applicationId "com.walmart.stores.allspark.beta" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 20 + versionCode 21 versionName "1.0.1" } splits { --- ios/AllSpark/Info.plist @@ -34,7 +34,7 @@ </dict> </array> <key>CFBundleVersion</key> - <string>20</string> + <string>21</string> <key>LSApplicationQueriesSchemes</key> <array> <string>invmgmt</string> --- ios/AllSparkTests/Info.plist @@ -19,6 +19,6 @@ <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> - <string>20</string> + <string>21</string> </dict> </plist>
Incrementing build number
Incrementing build number
16f7402093411d32a2c1ec7b35e5982d6968da3c
--- packages/allspark-foundation-hub/src/Store/Modules/TeamSwitcher/index.tsx @@ -454,80 +454,78 @@ export const TeamSwitcher = ({ message: `initializeTeamEvaluation starting. teamData.length=${teamData.length}, isPrefAvailable=${isPrefAvaialable}, selectedTeamPreference=${selectedTeamPreference}`, }); - if (teamData.length && isPrefAvaialable) { - let evaluatedTeamList: TeamSwitcherTypes[] = []; - let evaluatedSelectTeam: TeamSwitcherTypes = - selectedTeamData ?? ({} as TeamSwitcherTypes); - - if (isSalariedAndNotHomeOffice) { - evaluatedTeamList = [totalStore, management, ...allTeamsOfStore]; - evaluatedSelectTeam = management; - } - if (isHourlyAndHomeOffice) { - evaluatedTeamList = [totalStore, ...allTeamsOfStore]; - evaluatedSelectTeam = totalStore; - } - if (isPrefAvaialable) { - const primaryTeamData = userPrimaryTeam?.[0] as Team; - if ( - userPrefTeams && - userPrefTeams.length === 1 && - userPrefTeams[0].teamId === primaryTeamData.teamId - ) { - evaluatedTeamList = [totalStore, userPrefTeams?.[0]]; - // Don't override user selection here - let it be determined below - evaluatedSelectTeam = userPrefTeams?.[0]; - } else { - evaluatedTeamList = [ - totalStore, - myTeams, - ...(userPrefTeams ? sorter(userPrefTeams, primaryTeamData) : []), - ]; - // Don't override user selection here - let it be determined below - evaluatedSelectTeam = myTeams; - } - } + let evaluatedTeamList: TeamSwitcherTypes[] = []; + let evaluatedSelectTeam: TeamSwitcherTypes = + selectedTeamData ?? ({} as TeamSwitcherTypes); + + if (isSalariedAndNotHomeOffice) { + evaluatedTeamList = [totalStore, management, ...allTeamsOfStore]; + evaluatedSelectTeam = management; + } + if (isHourlyAndHomeOffice) { + evaluatedTeamList = [totalStore, ...allTeamsOfStore]; + evaluatedSelectTeam = totalStore; + } + if (isPrefAvaialable) { + const primaryTeamData = userPrimaryTeam?.[0] as Team; if ( - !isSalariedAndNotHomeOffice && - !isHourlyAndHomeOffice && - !isPrefAvaialable && - !selectedTeamPreference + userPrefTeams && + userPrefTeams.length === 1 && + userPrefTeams[0].teamId === primaryTeamData.teamId ) { - const defaultTeams = getDefaultTeamsForUserType(empType, userTeams); - evaluatedTeamList = [totalStore, ...defaultTeams]; - evaluatedSelectTeam = defaultTeams[0] || totalStore; + evaluatedTeamList = [totalStore, userPrefTeams?.[0]]; + // Don't override user selection here - let it be determined below + evaluatedSelectTeam = userPrefTeams?.[0]; + } else { + evaluatedTeamList = [ + totalStore, + myTeams, + ...(userPrefTeams ? sorter(userPrefTeams, primaryTeamData) : []), + ]; + // Don't override user selection here - let it be determined below + evaluatedSelectTeam = myTeams; } + } + if ( + !isSalariedAndNotHomeOffice && + !isHourlyAndHomeOffice && + !isPrefAvaialable && + !selectedTeamPreference + ) { + const defaultTeams = getDefaultTeamsForUserType(empType, userTeams); + evaluatedTeamList = [totalStore, ...defaultTeams]; + evaluatedSelectTeam = defaultTeams[0] || totalStore; + } - setTeamSwitcherList(evaluatedTeamList); - - // FIXED: Prioritize user's explicit selection over defaults - let targetTeam: TeamSwitcherTypes | undefined; + setTeamSwitcherList(evaluatedTeamList); - // First, try to find the user's selected team preference in the evaluated list - if (selectedTeamPreference) { - targetTeam = findTeamByLabel(evaluatedTeamList, selectedTeamPreference); + // FIXED: Prioritize user's explicit selection over defaults + let targetTeam: TeamSwitcherTypes | undefined; - loggerRef.current.info('Team selection search', { - message: `Looking for selected team: "${selectedTeamPreference}", found: ${!!targetTeam}`, - }); - } + // First, try to find the user's selected team preference in the evaluated list + if (selectedTeamPreference) { + targetTeam = findTeamByLabel(evaluatedTeamList, selectedTeamPreference); - // If no user preference or preference not found, use the evaluated default - if (!targetTeam) { - targetTeam = evaluatedSelectTeam; + loggerRef.current.info('Team selection search', { + message: `Looking for selected team: "${selectedTeamPreference}", found: ${!!targetTeam}`, + }); + } - loggerRef.current.info('Using default team', { - message: `No user preference found, using default: "${targetTeam?.teamLabel}"`, - }); - } else { - loggerRef.current.info('Using user preference', { - message: `Using user selected team: "${targetTeam.teamLabel}"`, - }); - } + // If no user preference or preference not found, use the evaluated default + if (!targetTeam) { + targetTeam = evaluatedSelectTeam; - // Use selectTeam without triggering onTeamChange during initialization - selectTeam(targetTeam, false); // false = don't trigger onTeamChange during init + loggerRef.current.info('Using default team', { + message: `No user preference found, using default: "${targetTeam?.teamLabel}"`, + }); + } else { + loggerRef.current.info('Using user preference', { + message: `Using user selected team: "${targetTeam.teamLabel}"`, + }); } + + // Use selectTeam without triggering onTeamChange during initialization + selectTeam(targetTeam, false); // false = don't trigger onTeamChange during init }, [ isLoading, teamData,
feat(ui): removed unnecessary if check
feat(ui): removed unnecessary if check
5b87360b90055c2881c1387b3a9dc75e24b441fa
--- packages/allspark-foundation/__tests__/Feature/withFeatureScreenGuards.test.tsx @@ -1,37 +1,26 @@ -import { ComponentType } from 'react'; +import React from 'react'; import { render } from '@testing-library/react-native'; -import { withFeatureScreenGuards } from '../../src/Feature/withFeatureScreenGuards'; -import { Provider } from 'react-redux'; -import { createStore } from 'redux'; +import { withFeatureToggleGuard } from '../../src/Feature/withFeatureToggleGuard'; +import { Text } from 'react-native'; -describe('withFeatureScreenGuards', () => { - const mockReducer = (state = { clock: { isClockedOut: false } }, action) => state; - const mockStore = createStore(mockReducer); - const MockComponent: ComponentType<any> = () => <>Mock Component</>; - it('should wrap the component with clockCheckEnabled props as false and render without error', () => { - const WrappedComponent = withFeatureScreenGuards({ - Component: MockComponent, - featureId: 'feature-1', - clockCheckEnabled: false, - }); - const results = render( - <Provider store={mockStore}> - <WrappedComponent /> - </Provider> - ); - expect(results.toJSON()).not.toBeNull(); +const TestComponent = () => <Text>Test Component</Text>; +const TestComponentWithGuard = withFeatureToggleGuard({ + Component: TestComponent, + featureId: 'test-feature-id', +}); + +describe('withFeatureToggleGuard', () => { + it('renders the component when the feature is enabled', () => { + const { getByText } = render(<TestComponentWithGuard />); + expect(getByText(/Test Component/i)).toBeTruthy(); }); - it('should wrap the component with clockCheckEnabled props as true and render without error', () => { - const WrappedComponent = withFeatureScreenGuards({ - Component: MockComponent, - featureId: 'feature-1', - clockCheckEnabled: true, - }); - const results = render( - <Provider store={mockStore}> - <WrappedComponent /> - </Provider> - ); - expect(results.toJSON()).not.toBeNull(); + it('renders fallback content when the feature is disabled', () => { + jest.spyOn( + require('../../src/Container/ActiveContainerManager').ActiveAllsparkContainer.features, + 'useFeatureEnabled' + ).mockReturnValue(false); + + const { getByText } = render(<TestComponentWithGuard />); + expect(getByText(/isn't available right now/i)).toBeTruthy(); }); -}); \ No newline at end of file +});
with feature toggle tests
with feature toggle tests
95f4272c0bfd75e7aa0bb2eac883f5ed5eaae639
--- __tests__/auth/__snapshots__/SectionCardTest.tsx.snap @@ -3,6 +3,7 @@ exports[`SectionCard renders default 1`] = ` <SolidCard color="white" + contentInset="none" elevation={1} style={ Array [ @@ -20,6 +21,7 @@ exports[`SectionCard renders default 1`] = ` style={ Object { "flexDirection": "row", + "lineHeight": 16, } } > @@ -29,6 +31,7 @@ exports[`SectionCard renders default 1`] = ` "alignItems": "flex-start", "flex": 2, "flexDirection": "column", + "padding": 16, } } > @@ -37,7 +40,6 @@ exports[`SectionCard renders default 1`] = ` Object { "color": "#2e2f32", "fontSize": 12, - "lineHeight": 16, } } > @@ -67,26 +69,16 @@ exports[`SectionCard renders default 1`] = ` Action </SecondaryButton> </View> - <View + <Image + resizeMode="contain" + source={1} style={ Object { - "flex": 1, + "alignSelf": "flex-end", + "width": 130, } } - > - <Image - source={1} - style={ - Object { - "bottom": -16, - "height": 140, - "position": "absolute", - "right": -16, - "width": 130, - } - } - /> - </View> + /> </View> </SolidCard> `; @@ -94,6 +86,7 @@ exports[`SectionCard renders default 1`] = ` exports[`SectionCard renders with loading and custom style 1`] = ` <SolidCard color="white" + contentInset="none" elevation={1} style={ Array [ @@ -113,6 +106,7 @@ exports[`SectionCard renders with loading and custom style 1`] = ` style={ Object { "flexDirection": "row", + "lineHeight": 16, } } > @@ -122,6 +116,7 @@ exports[`SectionCard renders with loading and custom style 1`] = ` "alignItems": "flex-start", "flex": 2, "flexDirection": "column", + "padding": 16, } } > @@ -130,7 +125,6 @@ exports[`SectionCard renders with loading and custom style 1`] = ` Object { "color": "#2e2f32", "fontSize": 12, - "lineHeight": 16, } } > @@ -161,26 +155,16 @@ exports[`SectionCard renders with loading and custom style 1`] = ` Action </SecondaryButton> </View> - <View + <Image + resizeMode="contain" + source={1} style={ Object { - "flex": 1, + "alignSelf": "flex-end", + "width": 130, } } - > - <Image - source={1} - style={ - Object { - "bottom": -16, - "height": 140, - "position": "absolute", - "right": -16, - "width": 130, - } - } - /> - </View> + /> </View> </SolidCard> `;
Snapshot update
Snapshot update
d2a20b06049379a220ccc8fc6a1853768160466d
--- packages/allspark-foundation-hub/src/HubFeature/Store/TeamSelection/Component/ErrorScreen.tsx @@ -1,4 +1,4 @@ -import { ErrorMessage } from '@walmart/gtp-shared-components'; +import { Button, ErrorMessage, Link } from '@walmart/gtp-shared-components'; import { ActionButtonGroup } from '../../../Shared/Components/ActionButtonGroup'; import React from 'react'; import { errorScreenStyles as styles } from '../styles'; @@ -36,6 +36,20 @@ export const ErrorScreen = ({ <ErrorMessage accessibilityRole='alert' accessibilityLabel={errorTitle} + // actions={ + // <View style={styles.buttonContainer}> + // <Button + // size='medium' + // variant='primary' + // onPress={handlePrimaryButtonPress} + // > + // {primaryButtonText} + // </Button> + // <Link onPress={handleSecondaryButtonPress}> + // {secondaryButtonText} + // </Link> + // </View> + // } media={ <TeamImage accessibilityRole='image'
feat: commented out actions
feat: commented out actions
85f1af8b7a106fe162ef24385dab82d410a2682e
--- package-lock.json @@ -51,7 +51,7 @@ "@walmart/counts-component-miniapp": "0.1.5", "@walmart/emergency-mini-app": "1.25.1", "@walmart/exception-mini-app": "1.5.1", - "@walmart/facilities-management-miniapp": "0.6.67", + "@walmart/facilities-management-miniapp": "0.6.70", "@walmart/feedback-all-spark-miniapp": "0.9.43", "@walmart/financial-wellbeing-feature-app": "1.10.4", "@walmart/functional-components": "~4.0.3", @@ -8253,9 +8253,9 @@ } }, "node_modules/@walmart/facilities-management-miniapp": { - "version": "0.6.67", - "resolved": "https://npme.walmart.com/@walmart/facilities-management-miniapp/-/facilities-management-miniapp-0.6.67.tgz", - "integrity": "sha512-vAn11SgL6thiZdZLdAe1EvJ+gYGSDJa2HBrLPXlTFQgUHtf2+fnnj4SG9bX8mg9/Ax3Hg7IQaiKle3GsdgN2ww==", + "version": "0.6.70", + "resolved": "https://npme.walmart.com/@walmart/facilities-management-miniapp/-/facilities-management-miniapp-0.6.70.tgz", + "integrity": "sha512-0p5sAxFDZfOs8DpUZ4LYEfzxa5kgldeha/yNjEVds8SUJJBUJ1u7qoJaMgrhfS5CC5TArTgt0PzZZ3tN3i0LFg==", "hasInstallScript": true, "peerDependencies": { "@react-native-community/cameraroll": "^4.1.2", @@ -33590,9 +33590,9 @@ "integrity": "sha512-d5j7mlW+7Muw6vSZzc0WvoPbOOlF0oLkniWfAS6IP/o9SZ08Ph6NRIRAg95PWOqeW52zh7YTJZwEi24Zpaf93g==" }, "@walmart/facilities-management-miniapp": { - "version": "0.6.67", - "resolved": "https://npme.walmart.com/@walmart/facilities-management-miniapp/-/facilities-management-miniapp-0.6.67.tgz", - "integrity": "sha512-vAn11SgL6thiZdZLdAe1EvJ+gYGSDJa2HBrLPXlTFQgUHtf2+fnnj4SG9bX8mg9/Ax3Hg7IQaiKle3GsdgN2ww==" + "version": "0.6.70", + "resolved": "https://npme.walmart.com/@walmart/facilities-management-miniapp/-/facilities-management-miniapp-0.6.70.tgz", + "integrity": "sha512-0p5sAxFDZfOs8DpUZ4LYEfzxa5kgldeha/yNjEVds8SUJJBUJ1u7qoJaMgrhfS5CC5TArTgt0PzZZ3tN3i0LFg==" }, "@walmart/feedback-all-spark-miniapp": { "version": "0.9.43", --- package.json @@ -92,7 +92,7 @@ "@walmart/counts-component-miniapp": "0.1.5", "@walmart/emergency-mini-app": "1.25.1", "@walmart/exception-mini-app": "1.5.1", - "@walmart/facilities-management-miniapp": "0.6.67", + "@walmart/facilities-management-miniapp": "0.6.70", "@walmart/feedback-all-spark-miniapp": "0.9.43", "@walmart/financial-wellbeing-feature-app": "1.10.4", "@walmart/functional-components": "~4.0.3",
FixIT: Drop 15 Features
FixIT: Drop 15 Features
e4a5021bd0542a70d8c0a4c8a1ba7174fa39e150
--- package.json @@ -141,7 +141,7 @@ "@walmart/returns-mini-app": "4.6.0", "@walmart/rfid-scan-mini-app": "2.3.16", "@walmart/roster-mini-app": "2.4.0", - "@walmart/schedule-mini-app": "0.114.2", + "@walmart/schedule-mini-app": "0.116.0", "@walmart/shelfavailability-mini-app": "1.5.26", "@walmart/store-feature-orders": "1.26.9", "@walmart/taskit-mini-app": "3.0.2", @@ -149,7 +149,7 @@ "@walmart/topstock-mini-app": "1.10.8", "@walmart/ui-components": "patch:@walmart/ui-components@npm%3A1.15.14#~/.yarn/patches/@walmart-ui-components-npm-1.15.14-a6f67304be.patch", "@walmart/welcomeme-mini-app": "0.94.0", - "@walmart/wfm-ui": "0.8.12", + "@walmart/wfm-ui": "1.3.0", "@walmart/wm-plus-mini-app": "0.12.20", "@walmart/wmconnect-mini-app": "2.3.0", "axios": "~1.6.0", --- yarn.lock @@ -7056,12 +7056,12 @@ __metadata: languageName: node linkType: hard -"@walmart/schedule-mini-app@npm:0.114.2": - version: 0.114.2 - resolution: "@walmart/schedule-mini-app@npm:0.114.2" +"@walmart/schedule-mini-app@npm:0.116.0": + version: 0.116.0 + resolution: "@walmart/schedule-mini-app@npm:0.116.0" dependencies: "@walmart/moment-walmart": "npm:^1.0.4" - "@walmart/wfm-ui": "npm:0.8.12" + "@walmart/wfm-ui": "npm:1.3.0" wfm-allspark-data-library: "npm:3.3.0" peerDependencies: "@react-native-community/datetimepicker": ^7.6.2 @@ -7079,15 +7079,15 @@ __metadata: crypto-js: ">=4.2.0" i18next: ">=19.8.7" javascript-time-ago: ">=2.3.4" - react: ">=18.1.0" + react: ">=18.2.0" react-i18next: ">=12.0.0" - react-native: ">=0.70.5" + react-native: ">=0.72.6" react-native-tab-view: ">=3.3.0" react-native-wm-config: ">=0.1.1" react-redux: ">=7.2.1" redux: ">=4.0.5" reselect: ">=4.0.0" - checksum: 10c0/88b6df5f372b51b7477ff036c08819d2060a156e6adf1e8286c4ed3cc7f172ab22764867f76a0abe5c9fba7206045d750a4461075d5c383681eb4c1d314bfb91 + checksum: 10c0/90c923ecf16e12a73d0160fd125a913c1d51477080d1cd2212f1f67aea341834dd88da1533f717fe69560f1eab9227313f09d7bbd6e91361874feb0b56e44778 languageName: node linkType: hard @@ -7360,27 +7360,21 @@ __metadata: languageName: node linkType: hard -"@walmart/wfm-ui@npm:0.8.12": - version: 0.8.12 - resolution: "@walmart/wfm-ui@npm:0.8.12" +"@walmart/wfm-ui@npm:1.3.0": + version: 1.3.0 + resolution: "@walmart/wfm-ui@npm:1.3.0" dependencies: "@walmart/moment-walmart": "npm:1.0.3" - lodash: "npm:^4.17.20" - lodash.get: "npm:^4.4.2" - lodash.isequal: "npm:^4.5.0" - lodash.uniqby: "npm:^4.7.0" - react-native-vector-icons: "npm:^7.0.0" - string.prototype.matchall: "npm:^4.0.2" + string.prototype.matchall: "npm:>=4.0.2" peerDependencies: - "@walmart/gtp-shared-components": ">=2.1.1" - i18next: ^19.8.7 - moment: ^2.29.4 - react: ">=18.1.0" - react-i18next: ">=12.0.0" - react-native: ">=0.70.5" - react-native-modal: ^11.5.6 - xdate: ^0.8.0 - checksum: 10c0/06b8f38a4d5b2fbc1e2adc2d2bf2c0c1c5bcf27697652a2080d62974b4f8c7f6754a6fa4c9bc72dd60c2735d2e4cd08e83829a47de78a606d8798eb137160cf4 + "@walmart/allspark-foundation": "*" + moment: ">=2.29.4" + react: ">=18.2.0" + react-native: ">=0.72.6" + react-native-modal: ">=11.5.6" + react-native-vector-icons: ">=7.0.0" + xdate: ">=0.8.0" + checksum: 10c0/73314d47830c87f216fcba13239801a480b0bf4eb77f7b49750b6a3f0d936f7365cc99335049f03a2e750ee90215c493d55181412097660c4e64c504857faf4b languageName: node linkType: hard @@ -7856,7 +7850,7 @@ __metadata: "@walmart/returns-mini-app": "npm:4.6.0" "@walmart/rfid-scan-mini-app": "npm:2.3.16" "@walmart/roster-mini-app": "npm:2.4.0" - "@walmart/schedule-mini-app": "npm:0.114.2" + "@walmart/schedule-mini-app": "npm:0.116.0" "@walmart/shelfavailability-mini-app": "npm:1.5.26" "@walmart/store-feature-orders": "npm:1.26.9" "@walmart/taskit-mini-app": "npm:3.0.2" @@ -7864,7 +7858,7 @@ __metadata: "@walmart/topstock-mini-app": "npm:1.10.8" "@walmart/ui-components": "patch:@walmart/ui-components@npm%3A1.15.14#~/.yarn/patches/@walmart-ui-components-npm-1.15.14-a6f67304be.patch" "@walmart/welcomeme-mini-app": "npm:0.94.0" - "@walmart/wfm-ui": "npm:0.8.12" + "@walmart/wfm-ui": "npm:1.3.0" "@walmart/wm-plus-mini-app": "npm:0.12.20" "@walmart/wmconnect-mini-app": "npm:2.3.0" adaptive-expressions: "npm:^4.13.5" @@ -20335,7 +20329,7 @@ __metadata: languageName: node linkType: hard -"string.prototype.matchall@npm:^4.0.10, string.prototype.matchall@npm:^4.0.2": +"string.prototype.matchall@npm:>=4.0.2, string.prototype.matchall@npm:^4.0.10, string.prototype.matchall@npm:^4.0.2": version: 4.0.11 resolution: "string.prototype.matchall@npm:4.0.11" dependencies:
Bump schedule-mini-app and wfm-ui versions - drop23
Bump schedule-mini-app and wfm-ui versions - drop23
a418068a71b3c2a4091b1a75ea0b1b7d3eca67d7
--- android/app/build.gradle @@ -158,8 +158,8 @@ android { applicationId "com.walmart.stores.allspark.beta" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 908 - versionName "1.10.1" + versionCode 909 + versionName "1.10.2" buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() if (isNewArchitectureEnabled()) { // We configure the CMake build only if you decide to opt-in for the New Architecture. --- ios/AllSpark/Info.plist @@ -19,7 +19,7 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>1.10.1</string> + <string>1.10.2</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleURLTypes</key> @@ -36,7 +36,7 @@ </dict> </array> <key>CFBundleVersion</key> - <string>908</string> + <string>909</string> <key>FirebaseAutomaticScreenReportingEnabled</key> <false /> <key>LSApplicationQueriesSchemes</key> --- package-lock.json @@ -1,12 +1,12 @@ { "name": "allspark-main", - "version": "1.10.1", + "version": "1.10.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "allspark-main", - "version": "1.10.1", + "version": "1.10.2", "hasInstallScript": true, "dependencies": { "@react-native-community/art": "^1.2.0", @@ -68,7 +68,7 @@ "@walmart/push-to-talk-mini-app": "1.9.22", "@walmart/react-native-encrypted-storage": "1.1.3", "@walmart/react-native-env": "0.2.0", - "@walmart/react-native-logger": "1.34.3", + "@walmart/react-native-logger": "1.34.4", "@walmart/react-native-scanner-3.0": "0.1.32", "@walmart/react-native-shared-navigation": "1.0.2", "@walmart/react-native-store-map": "0.3.7", @@ -5798,10 +5798,11 @@ } }, "node_modules/@walmart/react-native-logger": { - "version": "1.34.3", - "resolved": "https://npme.walmart.com/@walmart/react-native-logger/-/react-native-logger-1.34.3.tgz", - "integrity": "sha512-jABrdSwlGl2Ozn6lkh+jG2kQJNoVaJSr/XfFrvsuFbEYWpLS2ydARKrxxHvtqvTrzqqpAvwx+2rik77g4xNSFw==", + "version": "1.34.4", + "resolved": "https://npme.walmart.com/@walmart/react-native-logger/-/react-native-logger-1.34.4.tgz", + "integrity": "sha512-7cG3yUXm0nVr0mlq9yqSZd2d+Ake6MI/Cr8jft1wthRcpJuI6Ytn7jd2/vKfxWrnbR3ZE9a+zcPxaviGVLt3Mw==", "peerDependencies": { + "lodash": "^4.17.21", "react": "^16.8.1", "react-native": ">=0.60.0-rc.0 <1.0.x" } @@ -25233,9 +25234,9 @@ } }, "@walmart/mod-flex-mini-app": { - "version": "1.6.6", - "resolved": "https://npme.walmart.com/@walmart/mod-flex-mini-app/-/mod-flex-mini-app-1.6.6.tgz", - "integrity": "sha512-LK6m7OauduWayU2ewcrYCygzMagm3PFSZN1s1nUu4LHEkas/5U3tE8bxGPAvv+lYeWHsDgDL6+Px3pw1dtBVEQ==" + "version": "1.7.3", + "resolved": "https://npme.walmart.com/@walmart/mod-flex-mini-app/-/mod-flex-mini-app-1.7.3.tgz", + "integrity": "sha512-KlT6mqxEJq7jehx936CfOkxUQMoZVOBXYpMMIdvxK4NOVAsbHD+kTKjzJJDicBZvad8wW6k9Jl8zXS2Uv2gQVg==" }, "@walmart/moment-walmart": { "version": "1.0.4" @@ -25280,9 +25281,9 @@ "version": "0.2.0" }, "@walmart/react-native-logger": { - "version": "1.34.3", - "resolved": "https://npme.walmart.com/@walmart/react-native-logger/-/react-native-logger-1.34.3.tgz", - "integrity": "sha512-jABrdSwlGl2Ozn6lkh+jG2kQJNoVaJSr/XfFrvsuFbEYWpLS2ydARKrxxHvtqvTrzqqpAvwx+2rik77g4xNSFw==" + "version": "1.34.4", + "resolved": "https://npme.walmart.com/@walmart/react-native-logger/-/react-native-logger-1.34.4.tgz", + "integrity": "sha512-7cG3yUXm0nVr0mlq9yqSZd2d+Ake6MI/Cr8jft1wthRcpJuI6Ytn7jd2/vKfxWrnbR3ZE9a+zcPxaviGVLt3Mw==" }, "@walmart/react-native-scanner-3.0": { "version": "0.1.32", --- package.json @@ -1,6 +1,6 @@ { "name": "allspark-main", - "version": "1.10.1", + "version": "1.10.2", "private": true, "scripts": { "android": "react-native run-android", @@ -110,7 +110,7 @@ "@walmart/push-to-talk-mini-app": "1.9.22", "@walmart/react-native-encrypted-storage": "1.1.3", "@walmart/react-native-env": "0.2.0", - "@walmart/react-native-logger": "1.34.3", + "@walmart/react-native-logger": "1.34.4", "@walmart/react-native-scanner-3.0": "0.1.32", "@walmart/react-native-shared-navigation": "1.0.2", "@walmart/react-native-store-map": "0.3.7",
logger fix and hotfix bump to 1.10.2
logger fix and hotfix bump to 1.10.2
18ce8a57ae488ea490e6e18c4aba5c2073d3ecc9
--- targets/US/package.json @@ -89,7 +89,7 @@ "@walmart/attendance-mini-app": "3.44.0", "@walmart/avp-feature-app": "0.8.7", "@walmart/avp-shared-library": "0.8.9", - "@walmart/backroom-mini-app": "1.5.14", + "@walmart/backroom-mini-app": "1.5.15", "@walmart/calling-mini-app": "0.5.17", "@walmart/checkout-mini-app": "3.24.0", "@walmart/compass-sdk-rn": "5.19.15", --- yarn.lock @@ -6066,9 +6066,9 @@ __metadata: languageName: node linkType: hard -"@walmart/backroom-mini-app@npm:1.5.14": - version: 1.5.14 - resolution: "@walmart/backroom-mini-app@npm:1.5.14" +"@walmart/backroom-mini-app@npm:1.5.15": + version: 1.5.15 + resolution: "@walmart/backroom-mini-app@npm:1.5.15" dependencies: pubsub-js: "npm:^1.9.4" react-native-mask-input: "npm:^1.2.3" @@ -6091,7 +6091,7 @@ __metadata: react-native-svg-transformer: ">=1.0.0" react-redux: ^8.0.0 redux: ^4.0.0 - checksum: 10c0/fe6570ef89c7474a770695bbe949a62b3b6e5c228ba350de7d029c5527a2d1ee3b303d547d18f0e7afdfc0d03fa5e5b7e59fe2047f40f295be30da80a3cb9d10 + checksum: 10c0/bd5479920d524118a73ca8c014c7aca62f9f96e5a94387d88221e06e768accb377163f17fc4178819e4f391ddc04e3990d803293b4b2854a26caac5127eef207 languageName: node linkType: hard @@ -6994,7 +6994,7 @@ __metadata: "@walmart/attendance-mini-app": "npm:3.44.0" "@walmart/avp-feature-app": "npm:0.8.7" "@walmart/avp-shared-library": "npm:0.8.9" - "@walmart/backroom-mini-app": "npm:1.5.14" + "@walmart/backroom-mini-app": "npm:1.5.15" "@walmart/calling-mini-app": "npm:0.5.17" "@walmart/checkout-mini-app": "npm:3.24.0" "@walmart/compass-sdk-rn": "npm:5.19.15"
Update @walmart/backroom-mini-app to 1.5.15
Update @walmart/backroom-mini-app to 1.5.15
6565ff0e3bc55153053ee51e426baba6b99e73cc
--- scripts/slackWorkflow.sh @@ -46,6 +46,12 @@ if [ -z "$SLACK_PR_WEBHOOK" ]; then exit 1 fi +#checking for Required GitHub PR URL +if [ -z "$GITHUB_PR_URL" ]; then + echo "ERROR: Must provide GITHUB_PR_URL" + exit 1 +fi + #Pulling information #Branch if [ -z "$branch" ];
edited slack workflow to check for PR URL (#89)
edited slack workflow to check for PR URL (#89) Co-authored-by: Hitesh Arora <>
650ff9575d0834ec239b14f146281e4477015bff
--- src/utils/user.ts @@ -35,6 +35,7 @@ export const associateIsOnPPTO = (associate?: Associate) => associate?.punch?.clockStatus === '4'; //TODO: Missing schedule field on associate object. GetDailyRosterQuery needs update +// eslint-disable-next-line @typescript-eslint/no-unused-vars export const associateIsNotScheduled = (associate?: Associate) => false; export const associateDisplayName = ( --- src/utils/user.ts @@ -35,6 +35,7 @@ export const associateIsOnPPTO = (associate?: Associate) => associate?.punch?.clockStatus === '4'; //TODO: Missing schedule field on associate object. GetDailyRosterQuery needs update +// eslint-disable-next-line @typescript-eslint/no-unused-vars export const associateIsNotScheduled = (associate?: Associate) => false; export const associateDisplayName = (
adding lint rule
adding lint rule
c3727778ded99413895f9f74ca944b0594f7bf05
--- docs/CHANGELOG.md @@ -1,3 +1,11 @@ +# [1.3.0](https://gecgithub01.walmart.com/smdv/myteam-miniapp/compare/v1.2.0...v1.3.0) (2024-06-11) + + +### Features + +* **ui:** Merge changes SMDV-5809 ([8bb9a90](https://gecgithub01.walmart.com/smdv/myteam-miniapp/commit/8bb9a904abbff694b94eb43272a20b93e19a195f)) +* **ui:** Merge changes SMDV-5809 ([c683ef1](https://gecgithub01.walmart.com/smdv/myteam-miniapp/commit/c683ef186c468d326f125a02e308a7c8c686d392)) + # [1.2.0](https://gecgithub01.walmart.com/smdv/myteam-miniapp/compare/v1.1.7...v1.2.0) (2024-05-17) --- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/myteam-mini-app", - "version": "1.2.0", + "version": "1.3.0", "main": "dist/index.js", "files": [ "dist"
chore(release): 1.3.0 [skip ci]
chore(release): 1.3.0 [skip ci] # [1.3.0](https://gecgithub01.walmart.com/smdv/myteam-miniapp/compare/v1.2.0...v1.3.0) (2024-06-11) ### Features * **ui:** Merge changes SMDV-5809 ([8bb9a90](https://gecgithub01.walmart.com/smdv/myteam-miniapp/commit/8bb9a904abbff694b94eb43272a20b93e19a195f)) * **ui:** Merge changes SMDV-5809 ([c683ef1](https://gecgithub01.walmart.com/smdv/myteam-miniapp/commit/c683ef186c468d326f125a02e308a7c8c686d392))
a3bc89b5ad1aa5660cd81ffa71289aefa3059213
--- .looper.multibranch.yml @@ -607,11 +607,11 @@ flows: - var(END_TIME): date +%s - var(TIME_ELAPSED): - $(($START_TIME - $END_TIME)) + $START_TIME-$END_TIME - var(MINUTES): - $((($TIME_ELAPSED % 3600) / 60)) + ($TIME_ELAPSED%3600)/60 - var(SECONDS): - $(((($TIME_ELAPSED%3600) / 60) % 60)) + (($TIME_ELAPSED%3600)/60)%60 - slack.postMessage: message: $MESSAGE_TITLE channelId: ${slackChannel}
Update .looper.multibranch.yml
Update .looper.multibranch.yml
fb014519862c0e5f38f1946d21a34b778acd55bc
--- android/app/build.gradle @@ -134,7 +134,7 @@ android { applicationId "com.walmart.stores.allspark.beta" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 62 + versionCode 63 versionName "1.0.4" } splits { --- ios/AllSpark/Info.plist @@ -34,7 +34,7 @@ </dict> </array> <key>CFBundleVersion</key> - <string>62</string> + <string>63</string> <key>LSApplicationQueriesSchemes</key> <array> <string>invmgmt</string> --- ios/AllSparkTests/Info.plist @@ -19,6 +19,6 @@ <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> - <string>62</string> + <string>63</string> </dict> </plist>
Incrementing build number
Incrementing build number
0b45333b0174904198f68afbb4f23d7badcbf874
--- packages/allspark-foundation/src/Work/index.ts @@ -1,2 +1 @@ -export * from './Context' // REMOVE export * from './redux'
feat: remove extraneous export DWORK-6097
feat: remove extraneous export DWORK-6097
b311b3d0bdf8d48c35f55e6f84a8183c65b4bf49
--- packages/associate-exp-hub-team-switcher/src/components/team-switcher/MyWalmartTeamSwitcherFilter.tsx @@ -252,13 +252,9 @@ const MyWalmartTeamSwitcherComponent: React.FC<TeamSwitcherProps> = ({ }) ); - if (isActive && onTeamChange) { - onTeamChange(selectedTeam.teamLabel, teamSwitcherData); - } - lastSyncedTeamRef.current = {teamId: selectedTeam.teamId, timestamp}; prevShiftsRef.current = shifts; - }, [dispatch, isActive, onTeamChange]); + }, [dispatch]); React.useEffect(() => { const selectedTeam = teamState.selectedTeamData; @@ -266,8 +262,37 @@ const MyWalmartTeamSwitcherComponent: React.FC<TeamSwitcherProps> = ({ // Only sync if we have valid team data if (!selectedTeam.teamId || !selectedTeam.teamLabel) return; - // Sync to Work Context - syncToWorkContext(selectedTeam, selectedShifts); + // Check if shifts actually changed (length or content) + const shiftsChanged = + prevShiftsRef.current.length !== selectedShifts.length || + JSON.stringify(prevShiftsRef.current) !== JSON.stringify(selectedShifts); + + // Only sync if team changed or shifts changed + const teamChanged = prevTeamRef.current?.teamId !== selectedTeam.teamId; + + if (teamChanged || shiftsChanged) { + // Sync to Work Context + syncToWorkContext(selectedTeam, selectedShifts); + + // Call onTeamChange if active and team actually changed + if (isActive && onTeamChange && teamChanged) { + const teamDataWithDepts = selectedTeam as any; + const teamSwitcherData: TeamSwitcherData = { + teamId: selectedTeam.teamId, + teamLabel: selectedTeam.teamLabel, + teamData: JSON.stringify(selectedTeam), + shifts: JSON.stringify(selectedShifts), + metricsDeptsNumbers: JSON.stringify( + teamDataWithDepts.areaDepartments?.metricsDeptsNumbers || [] + ), + merchantDeptsNumbers: JSON.stringify( + teamDataWithDepts.areaDepartments?.merchantDeptsNumbers || [] + ), + timestamp: Date.now(), + }; + onTeamChange(selectedTeam.teamLabel, teamSwitcherData); + } + } // Log telemetry when active and team actually changed if ( @@ -297,6 +322,7 @@ const MyWalmartTeamSwitcherComponent: React.FC<TeamSwitcherProps> = ({ isActive, isSiteDC, syncToWorkContext, + onTeamChange, broadcastTeamChange, ]);
feat(ui): cleanup logs
feat(ui): cleanup logs
95361901bb23aae1dc584805794e61a8c12ab2c3
--- package.json @@ -89,7 +89,7 @@ "@walmart/attendance-mini-app": "3.44.0", "@walmart/avp-feature-app": "0.5.1", "@walmart/avp-shared-library": "0.5.2", - "@walmart/backroom-mini-app": "1.1.9", + "@walmart/backroom-mini-app": "1.1.10", "@walmart/calling-mini-app": "0.2.38", "@walmart/checkout-mini-app": " 3.16.3", "@walmart/compass-sdk-rn": "5.19.8", --- yarn.lock @@ -5731,9 +5731,9 @@ __metadata: languageName: node linkType: hard -"@walmart/backroom-mini-app@npm:1.1.9": - version: 1.1.9 - resolution: "@walmart/backroom-mini-app@npm:1.1.9" +"@walmart/backroom-mini-app@npm:1.1.10": + version: 1.1.10 + resolution: "@walmart/backroom-mini-app@npm:1.1.10" dependencies: pubsub-js: "npm:^1.9.4" react-native-mask-input: "npm:^1.2.3" @@ -5755,7 +5755,7 @@ __metadata: react-native-svg-transformer: ">=1.0.0" react-redux: ^8.0.0 redux: ^4.0.0 - checksum: 10c0/9d4af460931d78d12cc1d7d6df6d611d3ecd4bf874ed83da6deb48da9eee5b2d6aa05af5993c1ffa8b7ae3f0fb1d36a5e94112ea6671c9ebedc7baa8888e2172 + checksum: 10c0/a4679860f32f12994630edc609dba1f430b209c95f868ffe05a8b2b3ac2306e35002f04d6d8f75a5979babca4999aee926f15cf6eca224160b09261e62a6d79d languageName: node linkType: hard @@ -7804,7 +7804,7 @@ __metadata: "@walmart/attendance-mini-app": "npm:3.44.0" "@walmart/avp-feature-app": "npm:0.5.1" "@walmart/avp-shared-library": "npm:0.5.2" - "@walmart/backroom-mini-app": "npm:1.1.9" + "@walmart/backroom-mini-app": "npm:1.1.10" "@walmart/calling-mini-app": "npm:0.2.38" "@walmart/checkout-mini-app": "npm: 3.16.3" "@walmart/compass-sdk-rn": "npm:5.19.8"
Update @walmart/backroom-mini-app to 1.1.10
Update @walmart/backroom-mini-app to 1.1.10
9a92611944b59b6a44637f42d8cd068302beeb12
--- package-lock.json @@ -43,7 +43,7 @@ "@walmart/core-services-allspark": "~2.2.2", "@walmart/core-utils": "~1.3.0", "@walmart/core-widget-registry": "~0.7.2", - "@walmart/counts-component-miniapp": "0.0.42", + "@walmart/counts-component-miniapp": "0.1.2", "@walmart/emergency-mini-app": "1.17.0", "@walmart/exception-mini-app": "1.0.14", "@walmart/facilities-management-miniapp": "0.4.2", @@ -5018,27 +5018,30 @@ } }, "node_modules/@walmart/counts-component-miniapp": { - "version": "0.0.42", - "resolved": "https://npme.walmart.com/@walmart/counts-component-miniapp/-/counts-component-miniapp-0.0.42.tgz", - "integrity": "sha512-tk3UvKAl/VM29GwO/5uNURHnJkR/M1kq42Hn/2Xob+Ww7rY3gOHKhCTL3NytAPrZxyQco0ZyfGOGPbpy2aDnRw==", + "version": "0.1.2", + "resolved": "https://npme.walmart.com/@walmart/counts-component-miniapp/-/counts-component-miniapp-0.1.2.tgz", + "integrity": "sha512-/MvR5ACBMHVTgVtBgQ8lYQAQc1dMgfvNQ2n4XdgbXSyi9PLVNJjr89WTh1h9YBJxtihmwMMhx66cP3TVqZal6A==", + "hasInstallScript": true, "peerDependencies": { - "@react-native-community/netinfo": "^5.9.9", - "@react-navigation/native": "^5.7.3", - "@react-navigation/stack": "^5.9.0", - "@walmart/core-services": "^1.0.15", - "@walmart/core-utils": "^1.0.9", - "@walmart/gtp-shared-components": "1.8.17", - "@walmart/react-native-env": "^0.1.0", - "@walmart/react-native-logger": "^1.25.0", - "@walmart/react-native-shared-navigation": "^0.2.0", - "@walmart/redux-store": "^1.0.12", - "i18next": "^20.3.1", - "react": "^17.0.2", - "react-i18next": "^11.10.0", - "react-native": "^0.67.4", - "react-native-wm-network": "^0.1.0", - "react-native-wm-telemetry": "^0.2.0", - "react-redux": "^7.2.1" + "@react-native-community/async-storage": "^1.12.1", + "@react-native-community/netinfo": "9.3.6", + "@react-navigation/native": "^6.0.0", + "@react-navigation/stack": "^6.1.0", + "@walmart/core-services-allspark": "~1.10.11", + "@walmart/core-utils": "~1.3.0", + "@walmart/gtp-shared-components": "^2.0.0", + "@walmart/react-native-shared-navigation": "1.0.2", + "@walmart/redux-store": "^3.1.3", + "i18next": "^22.0.1", + "jwt-decode": "^3.1.2", + "react": "^18.2.0", + "react-i18next": "^12.0.0", + "react-native": "0.70.5", + "react-native-app-auth": "^6.4.3", + "react-native-device-info": "^10.3.0", + "react-native-wm-telemetry": "0.3.0", + "react-redux": "^8.0.4", + "reselect": "^4.1.0" } }, "node_modules/@walmart/emergency-mini-app": { @@ -25138,9 +25141,9 @@ "integrity": "sha512-qCDWQF6Uvg9ftBqG4BHItlS1Fh6B0kzBDa3d9/ObmcAaeiGhWM1H3WkOaNeI+h8j7SoSAHiHeyGVbw+OCpH2sQ==" }, "@walmart/counts-component-miniapp": { - "version": "0.0.42", - "resolved": "https://npme.walmart.com/@walmart/counts-component-miniapp/-/counts-component-miniapp-0.0.42.tgz", - "integrity": "sha512-tk3UvKAl/VM29GwO/5uNURHnJkR/M1kq42Hn/2Xob+Ww7rY3gOHKhCTL3NytAPrZxyQco0ZyfGOGPbpy2aDnRw==" + "version": "0.1.2", + "resolved": "https://npme.walmart.com/@walmart/counts-component-miniapp/-/counts-component-miniapp-0.1.2.tgz", + "integrity": "sha512-/MvR5ACBMHVTgVtBgQ8lYQAQc1dMgfvNQ2n4XdgbXSyi9PLVNJjr89WTh1h9YBJxtihmwMMhx66cP3TVqZal6A==" }, "@walmart/emergency-mini-app": { "version": "1.17.0", --- package.json @@ -86,7 +86,7 @@ "@walmart/core-services-allspark": "~2.2.2", "@walmart/core-utils": "~1.3.0", "@walmart/core-widget-registry": "~0.7.2", - "@walmart/counts-component-miniapp": "0.0.42", + "@walmart/counts-component-miniapp": "0.1.2", "@walmart/emergency-mini-app": "1.17.0", "@walmart/exception-mini-app": "1.0.14", "@walmart/facilities-management-miniapp": "0.4.2",
Bump Counts v0.1.2
Bump Counts v0.1.2
9082f8551f6d58f45ff071a49a3601c60a878280
--- .looper.multibranch.yml @@ -96,6 +96,8 @@ envs: FASTLANE_HIDE_GITHUB_ISSUES: 1 FASTLANE_SKIP_UPDATE_CHECK: 1 FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 300 + FASTLANE_OPT_OUT_USAGE: 1 + FASTLANE_HIDE_PLUGINS_TABLE: 1 AUDIT_SLACK_CHANNEL: allspark-node-audit MULTI_BUILD: false # PRODUCT_NAME: 'Me@Walmart'
Update .looper.multibranch.yml
Update .looper.multibranch.yml
3e36a297e31c4ad235678cf92e93972af55b33a2
--- package.json @@ -135,7 +135,7 @@ "@walmart/me-at-walmart-container": "workspace:^", "@walmart/me-at-walmart-location": "^1.2.20", "@walmart/metrics-mini-app": "1.34.6", - "@walmart/mod-flex-mini-app": "1.31.4", + "@walmart/mod-flex-mini-app": "1.31.5", "@walmart/moment-walmart": "1.0.4", "@walmart/money-auth-shared-components": "2.4.3", "@walmart/my-walmart-hub": "1.6.7", --- yarn.lock @@ -8533,7 +8533,7 @@ __metadata: "@walmart/me-at-walmart-container": "workspace:^" "@walmart/me-at-walmart-location": "npm:^1.2.20" "@walmart/metrics-mini-app": "npm:1.34.6" - "@walmart/mod-flex-mini-app": "npm:1.31.4" + "@walmart/mod-flex-mini-app": "npm:1.31.5" "@walmart/moment-walmart": "npm:1.0.4" "@walmart/money-auth-shared-components": "npm:2.4.3" "@walmart/my-walmart-hub": "npm:1.6.7" @@ -8814,15 +8814,16 @@ __metadata: languageName: node linkType: hard -"@walmart/mod-flex-mini-app@npm:1.31.4": - version: 1.31.4 - resolution: "@walmart/mod-flex-mini-app@npm:1.31.4::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fmod-flex-mini-app%2F-%2F%40walmart%2Fmod-flex-mini-app-1.31.4.tgz" +"@walmart/mod-flex-mini-app@npm:1.31.5": + version: 1.31.5 + resolution: "@walmart/mod-flex-mini-app@npm:1.31.5::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fmod-flex-mini-app%2F-%2F%40walmart%2Fmod-flex-mini-app-1.31.5.tgz" peerDependencies: "@react-native-segmented-control/segmented-control": ^2.5.7 "@react-navigation/drawer": ">=7" "@react-navigation/material-top-tabs": ">=7" "@react-navigation/native": ">=7" "@react-navigation/stack": ">=7" + "@shopify/flash-list": 1.7.6 "@walmart/allspark-foundation": ">=6" "@walmart/allspark-utils": ">=6" "@walmart/core-services-allspark": ">=6" @@ -8848,7 +8849,7 @@ __metadata: redux: ^4.2.1 redux-saga: ^1.2.3 uuid: ^3.3.2 - checksum: 10c0/d37e0a4d91c426334cd25414a1a2c1da4c5f2942a5bbfef03fbd49f203ab2db4107a42be219b20d7ec42205bca2ccc682a3195931ef943d979b602da28e9114d + checksum: 10c0/36a57092a74b8cf4a309e3732b47ee5807fa7adc044d804f99ad6ca4caa86a03ccb4a46dd6e7f3260089070e15e5d53d1083e849a1bd1a4ba083848fde26c480 languageName: node linkType: hard
feat(mod-flex-mini-app): modflex drop 35 version bump (#5201)
feat(mod-flex-mini-app): modflex drop 35 version bump (#5201) Co-authored-by: Yarien Mendez Suarez - y0m07dz <Yarien.Mendez.Suarez@walmart.com>
370e8396197b1dd7269c2e765c938a1074b94f93
--- __tests__/__mocks__/@walmart/allspark-http-client.js @@ -0,0 +1,13 @@ +const mockClient = { + get: jest.fn(), + cancelRequests: jest.fn(), + resumeRequests: jest.fn(), + clone: jest.fn(() => mockClient), +}; + +module.exports = { + __esModule: true, + default: mockClient, + useHttpClient: jest.fn(() => mockClient), + CommonHttpClient: mockClient, +}; --- __tests__/__mocks__/@walmart/gtp-shared-components.js @@ -31,6 +31,12 @@ const typographyMocks = typography.reduce((prev, cur) => { }, {}); module.exports = { - colors: {blue: Array(101), gray: Array(101), spark: Array(101)}, + colors: { + blue: Array(101), + gray: Array(101), + spark: Array(101), + green: Array(101), + red: Array(101), + }, ...typographyMocks, }; --- __tests__/__mocks__/expo-av.js @@ -0,0 +1,4 @@ +module.exports = { + Audio: jest.fn(), + Video: jest.fn(), +}; --- jest.config.js @@ -12,7 +12,7 @@ module.exports = { }, }, transformIgnorePatterns: [ - '<rootDir>/node_modules/(?!(react-native|@walmart/gtp-shared-components|@react-native-community/picker|@walmart/redux-store|@react-native-firebase|react-native-iphone-x-helper|react-native-gesture-handler|@react-native/polyfills|@react-native/normalize-color|@walmart/ui-components|@walmart/core-services|@walmart/core-utils))', + '<rootDir>/node_modules/(?!(react-native|@walmart/gtp-shared-components|@react-native-community/picker|@walmart/redux-store|@react-native-firebase|react-native-iphone-x-helper|react-native-gesture-handler|@react-native/polyfills|@react-native/normalize-color|@walmart/ui-components|@walmart/core-services|@walmart/core-utils|expo*|Expo*|@walmart/allspark-http-client|axios))', ], testPathIgnorePatterns: [ '<rootDir>/__tests__/setup.ts', --- package-lock.json @@ -1,12 +1,12 @@ { "name": "@walmart/texting-mini-app", - "version": "2.0.0", + "version": "2.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@walmart/texting-mini-app", - "version": "2.0.0", + "version": "2.0.2", "hasInstallScript": true, "devDependencies": { "@babel/core": "^7.8.4", --- __tests__/__mocks__/@walmart/allspark-http-client.js @@ -0,0 +1,13 @@ +const mockClient = { + get: jest.fn(), + cancelRequests: jest.fn(), + resumeRequests: jest.fn(), + clone: jest.fn(() => mockClient), +}; + +module.exports = { + __esModule: true, + default: mockClient, + useHttpClient: jest.fn(() => mockClient), + CommonHttpClient: mockClient, +}; --- __tests__/__mocks__/@walmart/gtp-shared-components.js @@ -31,6 +31,12 @@ const typographyMocks = typography.reduce((prev, cur) => { }, {}); module.exports = { - colors: {blue: Array(101), gray: Array(101), spark: Array(101)}, + colors: { + blue: Array(101), + gray: Array(101), + spark: Array(101), + green: Array(101), + red: Array(101), + }, ...typographyMocks, }; --- __tests__/__mocks__/expo-av.js @@ -0,0 +1,4 @@ +module.exports = { + Audio: jest.fn(), + Video: jest.fn(), +}; --- jest.config.js @@ -12,7 +12,7 @@ module.exports = { }, }, transformIgnorePatterns: [ - '<rootDir>/node_modules/(?!(react-native|@walmart/gtp-shared-components|@react-native-community/picker|@walmart/redux-store|@react-native-firebase|react-native-iphone-x-helper|react-native-gesture-handler|@react-native/polyfills|@react-native/normalize-color|@walmart/ui-components|@walmart/core-services|@walmart/core-utils))', + '<rootDir>/node_modules/(?!(react-native|@walmart/gtp-shared-components|@react-native-community/picker|@walmart/redux-store|@react-native-firebase|react-native-iphone-x-helper|react-native-gesture-handler|@react-native/polyfills|@react-native/normalize-color|@walmart/ui-components|@walmart/core-services|@walmart/core-utils|expo*|Expo*|@walmart/allspark-http-client|axios))', ], testPathIgnorePatterns: [ '<rootDir>/__tests__/setup.ts', --- package-lock.json @@ -1,12 +1,12 @@ { "name": "@walmart/texting-mini-app", - "version": "2.0.0", + "version": "2.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@walmart/texting-mini-app", - "version": "2.0.0", + "version": "2.0.2", "hasInstallScript": true, "devDependencies": { "@babel/core": "^7.8.4",
Fixing a few tests
Fixing a few tests
6f63a2b6873baf82eb24d6d0c0fb9b85b3329b8a
--- src/components/RosterFiltersAndInfo/RosterFiltersAndInfo.tsx @@ -45,7 +45,10 @@ export const RosterFiltersAndInfo = ({ [associates.length], ); const viewWeeklySchedule = () => { - goToWeeklySchedule(associateWINs, teamName); + goToWeeklySchedule( + associateWINs, + teamName === 'myTeams' ? t('myTeams') : teamName, + ); }; if (loading) --- src/translations/en-US.ts @@ -1,6 +1,7 @@ export const enUS = { roster: 'Roster', allTeams: 'All teams', + myTeams: 'My Teams', userHeader: { clockedIn: 'Clocked in', clockedOut: 'Clocked out', --- src/translations/es-MX.ts @@ -1,6 +1,7 @@ export const esMX = { roster: 'Lista', allTeams: 'Todos los equipos', + myTeams: 'Mis Equipos', userHeader: { clockedIn: 'Dentro de horario', clockedOut: 'Fuera de turno',
fix: my Teams schedule page title
fix: my Teams schedule page title
747d23de995e75fc6e78d35d8cb3fcc5654930c2
--- app.config.US.ts @@ -174,6 +174,9 @@ const CONFIG: ExpoConfig = { requireFullScreen: true, supportsTablet: true, }, + notification: { + icon: `${__dirname}/assets/images/icon-notification.png`, + }, orientation: 'portrait', platforms: ['ios', 'android', 'web'], plugins: [ --- assets/images/icon-notification.png Binary files /dev/null and b/assets/images/icon-notification.png differ
fix(notifications): add alert icon for android (#4224)
fix(notifications): add alert icon for android (#4224) * fix: android notification icon added * fix: notifications changed to notification --------- Co-authored-by: Shubhang Shah <s0s0zug@homeoffice.wal-mart.com>
acb301948680020ddc09a5c1f613f8e19aa90e01
--- package-lock.json @@ -40,7 +40,7 @@ "@walmart/amp-mini-app": "1.1.68", "@walmart/ask-sam-chat-components": "^0.2.7", "@walmart/ask-sam-mini-app": "1.17.10", - "@walmart/attendance-mini-app": "^3.8.0", + "@walmart/attendance-mini-app": "3.8.0", "@walmart/compass-sdk-rn": "5.18.9", "@walmart/config-components": "4.2.13", "@walmart/copilot-mini-app": "3.26.4", --- package.json @@ -81,7 +81,7 @@ "@walmart/amp-mini-app": "1.1.68", "@walmart/ask-sam-chat-components": "^0.2.7", "@walmart/ask-sam-mini-app": "1.17.10", - "@walmart/attendance-mini-app": "^3.8.0", + "@walmart/attendance-mini-app": "3.8.0", "@walmart/compass-sdk-rn": "5.18.9", "@walmart/config-components": "4.2.13", "@walmart/copilot-mini-app": "3.26.4",
remove ^ from ama version
remove ^ from ama version
ff0dc93d42b23dc7c05d4a63ebb73dc03ae3e87c
--- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/roster-mini-app", - "version": "2.36.0", + "version": "2.37.0", "main": "dist/index.js", "files": [ "dist"
Update the roster navigation stack
Update the roster navigation stack
e8cb1a7ccdccbb191289aafc3113e9d60e6008cc
--- packages/allspark-foundation-hub/src/HubFeature/Store/Onboarding/TeamOnboarding/OnboardingContext.tsx @@ -21,7 +21,7 @@ export const OnboardingContext = createContext<any>({}); export const useOnboardingContext = () => useContext(OnboardingContext); export const OnboardingProvider = ({ children }: any) => { - const [showOnboarding, setShowOnboarding] = useState(false); + const [showOnboarding, setShowOnboarding] = useState(true); /**Personas identification */ const isPeopleLead: boolean = useSelector(UserSelectors.getIsUserPeopleLead); const isTeamLead: boolean = useSelector(UserSelectors.getIsUserTeamLead); --- packages/allspark-foundation-hub/src/HubFeature/SupplyChain/Hub/SiteHubDashboard.tsx @@ -25,6 +25,7 @@ import { useNavigation, useRoute, } from '@react-navigation/native'; +import { mockGetSupplyChainTeamsByStoreQueryResponse } from '../Screens/EditSavedTeamModal/mockTeamsData'; import styles from '../../Store/Hub/Container/styles'; import { useSelector } from 'react-redux'; import { useOnboardingContext } from '../../SupplyChain/Screens/OnboardingScreen/OnboardingContext'; @@ -81,6 +82,22 @@ export const SiteHubDashboard = ({ name, widgets }: HubDashboardProps) => { const hubScreeName = useSelector(ManagerExperienceSelectors.getHubScreenName); const { t } = useAllsparkTranslation(); + const getTeamNameById = (teamIds: string[]): string[] => { + const matchingTeamNames: string[] = []; + + teamIds.forEach((teamId) => { + const team = + mockGetSupplyChainTeamsByStoreQueryResponse.data.supplyChainTeamsByStore.teams.find( + (teadData) => teadData.teamId === teamId.toString() + ); + if (team) { + matchingTeamNames.push(team.teamName); + } + }); + + return matchingTeamNames; + }; + const allTeamData = getTeamNameById(selectedTeamIds); // After changing store, reload all the hub widgets with new store data. useEffect(() => { if (currentSiteId !== parentSiteID.current) { @@ -193,8 +210,9 @@ export const SiteHubDashboard = ({ name, widgets }: HubDashboardProps) => { <View style={{ backgroundColor: '#0071dc', minHeight: 70 }}> <TeamShiftSwitcher isLoading={false} - numTotalShifts={selectedShifts?.length || 0} - teamName='Fuel' + allSavedTeams={allTeamData} + numTotalShifts={6} + teamName={allTeamData[0]} teamId={selectedTeamIds?.[0] || '1000000'} selectedShifts={selectedShifts} onPress={() => { @@ -211,7 +229,7 @@ export const SiteHubDashboard = ({ name, widgets }: HubDashboardProps) => { /> {show && ( // we only show this once <Popover - content={`Tap here to change the team you're viewing.`} + content={"Tap here to change the team you're viewing."} handleClose={() => setShow(!show)} showPopover={show} UNSAFE_style={{ width: '60%' }}
Adding state data to teamswitcher
Adding state data to teamswitcher
e4d253789f86e028b6baea50d008bde1fffc0303
--- package-lock.json @@ -60,7 +60,7 @@ "@walmart/impersonation-mini-app": "1.20.2", "@walmart/ims-print-services-ui": "2.5.1", "@walmart/inbox-mini-app": "0.86.1", - "@walmart/iteminfo-mini-app": "7.6.0", + "@walmart/iteminfo-mini-app": "7.6.1", "@walmart/manager-approvals-miniapp": "0.2.4", "@walmart/me-field-mini-app": "13.0.3", "@walmart/metrics-mini-app": "0.13.11", @@ -8503,9 +8503,9 @@ } }, "node_modules/@walmart/iteminfo-mini-app": { - "version": "7.6.0", - "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-7.6.0.tgz", - "integrity": "sha512-FXdKdynrm6KVFrFg3hpIk2PV4SCLqit+Hm1bXS7Olw8ADjWKx1ntjHff9KmV8Gzt9gwSb7FrlCM2QaHc0ZSrew==", + "version": "7.6.1", + "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-7.6.1.tgz", + "integrity": "sha512-cVDk8hrxmt9ie3ypHL3XxzdN6srSyU3CY+Z0Lzt+iq4/4xheyZ7N/iu84MMHr2CHKgG7rZv+3FwpDdHigW7vvA==", "peerDependencies": { "@react-native-community/netinfo": ">=9.3.6", "@react-native-firebase/analytics": ">=15.1.1", @@ -33667,9 +33667,9 @@ } }, "@walmart/iteminfo-mini-app": { - "version": "7.6.0", - "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-7.6.0.tgz", - "integrity": "sha512-FXdKdynrm6KVFrFg3hpIk2PV4SCLqit+Hm1bXS7Olw8ADjWKx1ntjHff9KmV8Gzt9gwSb7FrlCM2QaHc0ZSrew==" + "version": "7.6.1", + "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-7.6.1.tgz", + "integrity": "sha512-cVDk8hrxmt9ie3ypHL3XxzdN6srSyU3CY+Z0Lzt+iq4/4xheyZ7N/iu84MMHr2CHKgG7rZv+3FwpDdHigW7vvA==" }, "@walmart/manager-approvals-miniapp": { "version": "0.2.4" --- package.json @@ -101,7 +101,7 @@ "@walmart/impersonation-mini-app": "1.20.2", "@walmart/ims-print-services-ui": "2.5.1", "@walmart/inbox-mini-app": "0.86.1", - "@walmart/iteminfo-mini-app": "7.6.0", + "@walmart/iteminfo-mini-app": "7.6.1", "@walmart/manager-approvals-miniapp": "0.2.4", "@walmart/me-field-mini-app": "13.0.3", "@walmart/metrics-mini-app": "0.13.11",
upgrade iteminfo for drop 15.x
upgrade iteminfo for drop 15.x
8d586a0d37c68e17ee12fea67c2c3ae5cafcd2f7
--- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/roster-mini-app", - "version": "2.37.0", + "version": "2.38.0", "main": "dist/index.js", "files": [ "dist" --- src/screens/RosterDetailScreen/RosterDetailScreen.tsx @@ -20,7 +20,7 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { default: 'Roster', fallbackLng: 'en-US', }), - renderLeft: route.params.teamId === primaryTeamId && renderDrawerButton, + headerLeft: route.params.teamId === primaryTeamId && renderDrawerButton, }); }, [navigation]);
Update the roster navigation stack
Update the roster navigation stack
d8014bb973a0321206d3d97a04a71d5adfa9b79a
--- src/index.tsx @@ -1,6 +1,6 @@ -import React, {Component} from 'react'; +import React, {Component, ComponentType} from 'react'; import codePush from 'react-native-code-push'; -import {Text, TextInput} from 'react-native'; +import {Text, TextInput, TextInputProps} from 'react-native'; import {AllsparkNotificationClient} from '@walmart/allspark-foundation/Notification'; import {MeAtWalmartContainer} from '@walmart/me-at-walmart-container'; import {IMeAtWalmartEnvironment} from '@walmart/me-at-walmart-common'; @@ -13,16 +13,18 @@ import {ENV, ENV_OVERRIDES} from '../env'; // Set up font scaling for the app to avoid issues with settings overriding the app's font styles. export const setFontScaling = () => { // Override Text scaling - if ((Text as any).defaultProps == null) { - (Text as any).defaultProps = {}; + if ((Text as ComponentType).defaultProps == null) { + (Text as ComponentType).defaultProps = { + allowFontScaling: false, + }; } - (Text as any).defaultProps.allowFontScaling = false; // Override Text scaling in input fields - if ((TextInput as any).defaultProps == null) { - (TextInput as any).defaultProps = {}; + if ((TextInput as ComponentType<TextInputProps>).defaultProps == null) { + (TextInput as ComponentType<TextInputProps>).defaultProps = { + allowFontScaling: false, + }; } - (TextInput as any).defaultProps.allowFontScaling = false; }; /**
chore: font scaling ts cleanup
chore: font scaling ts cleanup
f0a991286700ef11298c953b2e442d32de9601b3
--- src/components/AssociateRosterItem/index.tsx @@ -59,7 +59,7 @@ export const AssociateRosterItem = React.memo((props: AssociateItemProps) => { const name = associateDisplayName(associate); const onText = () => startAssociateText([associate.associateId!]); - const shouldShowMessageButton = + const shouldShowMessageAndPttButton = associate?.win?.toString() !== currentUser?.win?.toString(); return ( <Card @@ -83,7 +83,7 @@ export const AssociateRosterItem = React.memo((props: AssociateItemProps) => { encryptedId={encryptedId} style={styles.tag} /> - {isMessageButtonEnabled && shouldShowMessageButton && ( + {shouldShowMessageAndPttButton && ( <View style={styles.buttonsStyle}> {isPushToTalkEnabled && ( <Button @@ -102,15 +102,17 @@ export const AssociateRosterItem = React.memo((props: AssociateItemProps) => { </Text> </Button> )} - <Button - variant='secondary' - onPress={onText} - size='small' - disabled={!userIsInRoster}> - <Text> - {t('rosterScreen.associateRosterItem.messageBtn')} - </Text> - </Button> + {isMessageButtonEnabled && ( + <Button + variant='secondary' + onPress={onText} + size='small' + disabled={!userIsInRoster}> + <Text> + {t('rosterScreen.associateRosterItem.messageBtn')} + </Text> + </Button> + )} </View> )} </> --- src/components/AssociateRosterItem/index.tsx @@ -59,7 +59,7 @@ export const AssociateRosterItem = React.memo((props: AssociateItemProps) => { const name = associateDisplayName(associate); const onText = () => startAssociateText([associate.associateId!]); - const shouldShowMessageButton = + const shouldShowMessageAndPttButton = associate?.win?.toString() !== currentUser?.win?.toString(); return ( <Card @@ -83,7 +83,7 @@ export const AssociateRosterItem = React.memo((props: AssociateItemProps) => { encryptedId={encryptedId} style={styles.tag} /> - {isMessageButtonEnabled && shouldShowMessageButton && ( + {shouldShowMessageAndPttButton && ( <View style={styles.buttonsStyle}> {isPushToTalkEnabled && ( <Button @@ -102,15 +102,17 @@ export const AssociateRosterItem = React.memo((props: AssociateItemProps) => { </Text> </Button> )} - <Button - variant='secondary' - onPress={onText} - size='small' - disabled={!userIsInRoster}> - <Text> - {t('rosterScreen.associateRosterItem.messageBtn')} - </Text> - </Button> + {isMessageButtonEnabled && ( + <Button + variant='secondary' + onPress={onText} + size='small' + disabled={!userIsInRoster}> + <Text> + {t('rosterScreen.associateRosterItem.messageBtn')} + </Text> + </Button> + )} </View> )} </>
update feature flag logic
update feature flag logic
bb52aec30f0c65f6f5ab978e9adc8813adcee705
--- targets/US/package.json @@ -91,7 +91,7 @@ "@walmart/avp-shared-library": "0.10.1", "@walmart/backroom-mini-app": "1.5.20", "@walmart/calling-mini-app": "0.5.17", - "@walmart/checkout-mini-app": "3.24.0", + "@walmart/checkout-mini-app": "4.0.1", "@walmart/compass-sdk-rn": "5.19.15", "@walmart/config-components": "4.4.5", "@walmart/core-services": "~6.5.2", --- yarn.lock @@ -6153,9 +6153,9 @@ __metadata: languageName: node linkType: hard -"@walmart/checkout-mini-app@npm:3.24.0": - version: 3.24.0 - resolution: "@walmart/checkout-mini-app@npm:3.24.0" +"@walmart/checkout-mini-app@npm:4.0.1": + version: 4.0.1 + resolution: "@walmart/checkout-mini-app@npm:4.0.1" dependencies: "@stomp/stompjs": "npm:^7.0.0" cpc-input: "npm:^1.7.28" @@ -6197,7 +6197,7 @@ __metadata: react-native-wm-telemetry: ">=6" react-redux: ^8.1.3 redux: ^4.0.5 - checksum: 10c0/91d35fd0b64431acf11e0576c0d6bdc209d079fef43070e269357269f1f5fe7ae91cde4e97cae541132c4e425b88a3ffc1bb6154c9ef496383cee530c3840238 + checksum: 10c0/96c630bc31d5f3845830d02e0bff1c4ff83e2ff3143ba0318f9523dabfaaf2aac10bf4cc9ffa08baea67bde0704b3c6ac67080db74574402f7899a7added64a4 languageName: node linkType: hard @@ -7007,7 +7007,7 @@ __metadata: "@walmart/avp-shared-library": "npm:0.10.1" "@walmart/backroom-mini-app": "npm:1.5.20" "@walmart/calling-mini-app": "npm:0.5.17" - "@walmart/checkout-mini-app": "npm:3.24.0" + "@walmart/checkout-mini-app": "npm:4.0.1" "@walmart/compass-sdk-rn": "npm:5.19.15" "@walmart/config-components": "npm:4.4.5" "@walmart/core-services": "npm:~6.5.2"
CO version 4.0.1
CO version 4.0.1