commit_hash
stringlengths
40
40
input
stringlengths
13
7.99k
output
stringlengths
5
155
full_message
stringlengths
6
8.96k
3bca7147514cf9890ff473394766bbbe0feb2854
--- packages/allspark-foundation/src/Auth/sagas.ts @@ -1,23 +1,26 @@ import { select, take, takeLatest } from 'redux-saga/effects'; import { AuthActionTypes, IAuthActions } from './redux'; -import { AuthService } from './service'; import { AuthSelectors } from './selectors'; import { AuthResult } from './types'; export function* onGetUser(_: IAuthActions['GET_USER']) { + const { AuthService } = require('./service'); AuthService.getUser(); } export function* onSignIn(action: IAuthActions['SIGN_IN']) { const { payload } = action; + const { AuthService } = require('./service'); AuthService.signIn(payload); } export function* onFetchToken(_: IAuthActions['FETCH_TOKEN']) { + const { AuthService } = require('./service'); AuthService.refreshToken(); } export function* onSignOut(_: IAuthActions['SIGN_OUT']) { + const { AuthService } = require('./service'); AuthService.signOut(); } --- packages/allspark-foundation/src/Clock/sagas.ts @@ -1,16 +1,17 @@ import { select, take, takeLatest } from 'redux-saga/effects'; import { ClockActionTypes, IClockActions } from './redux'; -import { ClockService } from './service'; import { ClockSelectors } from './selectors'; import { ClockData } from './types'; export function* onInit(action: IClockActions['INIT']) { const { payload } = action; + const { ClockService } = require('./service'); ClockService.initialize(payload); } export function* onFetch(action: IClockActions['FETCH']) { const { payload } = action; + const { ClockService } = require('./service'); ClockService.fetch(payload); } --- packages/allspark-foundation/src/Config/sagas.ts @@ -1,16 +1,17 @@ import { select, take, takeLatest } from 'redux-saga/effects'; -import { ConfigService } from './service'; import { ConfigActionTypes, IConfigActions } from './redux'; import { ConfigSelectors } from './selectors'; import { ConfigData } from './types'; export function* onInit(action: IConfigActions['INIT']) { const { payload } = action; + const { ConfigService } = require('./service'); ConfigService.initialize(payload); } export function* onFetch(action: IConfigActions['FETCH']) { const { payload } = action; + const { ConfigService } = require('./service'); ConfigService.fetch(payload); } --- packages/allspark-foundation/src/Device/sagas.ts @@ -1,11 +1,11 @@ import { select, take, takeLatest } from 'redux-saga/effects'; import { DeviceActionTypes, IDeviceActions } from './redux'; -import { DeviceService } from './service'; import { DeviceSelectors } from './selectors'; import { DeviceInfo } from './types'; export function* onFetch(action: IDeviceActions['FETCH']) { const { payload } = action; + const { DeviceService } = require('./service'); DeviceService.fetch(payload); } --- packages/allspark-foundation/src/Location/sagas.ts @@ -1,14 +1,15 @@ import { takeLatest } from 'redux-saga/effects'; import { LocationActionTypes, ILocationActions } from './redux'; -import { LocationService } from './service'; export function* onInit(action: ILocationActions['INIT']) { const { payload } = action; + const { LocationService } = require('./service'); LocationService.initialize(payload); } export function* onFetch(action: ILocationActions['FETCH']) { const { payload } = action; + const { LocationService } = require('./service'); LocationService.fetch(payload); } --- packages/allspark-foundation/src/Site/sagas.ts @@ -1,11 +1,12 @@ import { takeLatest, select, take } from 'redux-saga/effects'; import { SiteActionTypes, ISiteActions } from './redux'; -import { SiteService } from './service'; + import { SiteSelectors } from './selectors'; import { Site } from './types'; export function* onFetchHomeSite(action: ISiteActions['FETCH_HOME_SITE']) { const { payload } = action; + const { SiteService } = require('./service'); SiteService.fetchHomeSite(payload); } @@ -13,6 +14,7 @@ export function* onFetchWorkingSite( action: ISiteActions['FETCH_WORKING_SITE'] ) { const { payload } = action; + const { SiteService } = require('./service'); SiteService.fetchWorkingSite(payload); } --- packages/allspark-foundation/src/User/sagas.ts @@ -1,16 +1,17 @@ import { select, take, takeLatest } from 'redux-saga/effects'; import { UserActionTypes, IUserActions } from './redux'; -import { UserService } from './service'; import { UserSelectors } from './selectors'; import { User } from './types'; export function* onFetch(action: IUserActions['FETCH']) { const { payload } = action; + const { UserService } = require('./service'); UserService.fetch(payload); } export function* onImpersonate(action: IUserActions['IMPERSONATE']) { const { payload } = action; + const { UserService } = require('./service'); UserService.impersonate(payload); }
fix: circular reference existed within root saga causing it to fail. adding dynamic require to break loop
fix: circular reference existed within root saga causing it to fail. adding dynamic require to break loop
286a22a70ce36865f2bbeaed75dc63d4f7525ca9
--- package-lock.json @@ -4463,9 +4463,9 @@ "integrity": "sha1-Wj8o61r2LUN+3ZXhDrzrmHwelGU=" }, "@walmart/react-native-logger": { - "version": "1.28.0", - "resolved": "https://npme.walmart.com/@walmart/react-native-logger/-/react-native-logger-1.28.0.tgz", - "integrity": "sha512-OZYIi/Ub/cO7Qsy1/NeH9Q7z6fPzwcxUGUBRAuwFPJN2ZwVFHCAt5+593ftFjBDhR92Ocg2QgQ5vok4cQvQbhA==" + "version": "1.29.0", + "resolved": "https://npme.walmart.com/@walmart/react-native-logger/-/react-native-logger-1.29.0.tgz", + "integrity": "sha512-qxVserzdiG4xsZCLRIwYfRq/KuHsYSPkrl02tKHNhF5bhtWWo6oEUatBoSsY5BL8EVGOHk2ezsPWb2o5pg9Ryw==" }, "@walmart/react-native-shared-navigation": { "version": "0.4.0", --- package.json @@ -93,7 +93,7 @@ "@walmart/price-changes-mini-app": "1.2.1", "@walmart/push-to-talk-mini-app": "0.5.123", "@walmart/react-native-env": "^0.2.0", - "@walmart/react-native-logger": "^1.28.0", + "@walmart/react-native-logger": "^1.29.0", "@walmart/react-native-shared-navigation": "^0.4.0", "@walmart/react-native-sumo-sdk": "2.2.1", "@walmart/redux-store": "1.1.26",
logger version bump
logger version bump
caf2392b5981667d5c3e0325a2bf6a94117ef907
--- lerna.json @@ -28,9 +28,6 @@ "packages/core-services-allspark", "packages/core-utils", "packages/core-widget-registry", - "packages/me-at-walmart-athena-queries", - - "packages/allspark-authentication", - "packages/allspark-foundation" + "packages/me-at-walmart-athena-queries" ] }
chore: removing v2 packages from lerna config
chore: removing v2 packages from lerna config
34392a9b75fb8b6891249ec0ccbaed3cee5873b2
--- package.json @@ -143,7 +143,7 @@ "@walmart/roster-mini-app": "2.4.0", "@walmart/schedule-mini-app": "0.114.2", "@walmart/shelfavailability-mini-app": "1.5.26", - "@walmart/store-feature-orders": "1.26.10", + "@walmart/store-feature-orders": "1.26.11", "@walmart/taskit-mini-app": "3.0.2", "@walmart/time-clock-mini-app": "2.395.0", "@walmart/topstock-mini-app": "1.12.0", --- yarn.lock @@ -7152,9 +7152,9 @@ __metadata: languageName: node linkType: hard -"@walmart/store-feature-orders@npm:1.26.10": - version: 1.26.10 - resolution: "@walmart/store-feature-orders@npm:1.26.10" +"@walmart/store-feature-orders@npm:1.26.11": + version: 1.26.11 + resolution: "@walmart/store-feature-orders@npm:1.26.11" peerDependencies: "@react-navigation/native": ^6.0.0 "@react-navigation/stack": ^6.1.0 @@ -7163,7 +7163,7 @@ __metadata: "@walmart/react-native-env": 0.2.0 react: ^18.2.0 react-native: ^0.73.7 - checksum: 10c0/5e4016c2bf139ab28f0e6b59d48d93c20076474c1e6932fb65641db8e4e23af9b0888a35781b5d8b8d3c55752d31dedff79e37a0cd5dce51f0dd6cbeca34463f + checksum: 10c0/9ff794d396176107d8a1e34fb5427c88cd0327d4f19010a33866f1845825b518182cda6d0c255c9680b950c7992dd296e4712a9f4101a344e0cc82137aedbc6e languageName: node linkType: hard @@ -7858,7 +7858,7 @@ __metadata: "@walmart/roster-mini-app": "npm:2.4.0" "@walmart/schedule-mini-app": "npm:0.114.2" "@walmart/shelfavailability-mini-app": "npm:1.5.26" - "@walmart/store-feature-orders": "npm:1.26.10" + "@walmart/store-feature-orders": "npm:1.26.11" "@walmart/taskit-mini-app": "npm:3.0.2" "@walmart/time-clock-mini-app": "npm:2.395.0" "@walmart/topstock-mini-app": "npm:1.12.0"
version update sfot
version update sfot
e2e097e8f7e9b2b05589113dc913392fdd9a0fc9
--- package.json @@ -154,7 +154,7 @@ "@walmart/returns-mini-app": "4.17.12", "@walmart/rfid-scan-mini-app": "2.14.3", "@walmart/rn-mobile-sdk-pairing": "2.1.8", - "@walmart/rn-receiving-mini-app": "2.6.18", + "@walmart/rn-receiving-mini-app": "2.6.19", "@walmart/roster-mini-app": "3.8.0", "@walmart/schedule-mini-app": "2.6.2", "@walmart/shelfavailability-mini-app": "1.5.47", --- yarn.lock @@ -8405,7 +8405,7 @@ __metadata: "@walmart/returns-mini-app": "npm:4.17.12" "@walmart/rfid-scan-mini-app": "npm:2.14.3" "@walmart/rn-mobile-sdk-pairing": "npm:2.1.8" - "@walmart/rn-receiving-mini-app": "npm:2.6.18" + "@walmart/rn-receiving-mini-app": "npm:2.6.19" "@walmart/roster-mini-app": "npm:3.8.0" "@walmart/schedule-mini-app": "npm:2.6.2" "@walmart/shelfavailability-mini-app": "npm:1.5.47" @@ -9074,9 +9074,9 @@ __metadata: languageName: node linkType: hard -"@walmart/rn-receiving-mini-app@npm:2.6.18": - version: 2.6.18 - resolution: "@walmart/rn-receiving-mini-app@npm:2.6.18::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Frn-receiving-mini-app%2F-%2F%40walmart%2Frn-receiving-mini-app-2.6.18.tgz" +"@walmart/rn-receiving-mini-app@npm:2.6.19": + version: 2.6.19 + resolution: "@walmart/rn-receiving-mini-app@npm:2.6.19::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Frn-receiving-mini-app%2F-%2F%40walmart%2Frn-receiving-mini-app-2.6.19.tgz" dependencies: "@walmart/atlas-rn-ui-components": "npm:1.4.2" "@walmart/loadquality-mini-app": "npm:2.0.30" @@ -9105,7 +9105,7 @@ __metadata: react-native-svg: ">=14.1.0" react-native-svg-transformer: ">=1.3.0" react-native-vision-camera: "*" - checksum: 10c0/3910d24e45e9cf3684feb11633e5824f0d0420025c576f941c1cd5d04dae61ab9becf117071bc59a8ae83ac4193bd6fcccee54414e0b1854d321bdc637eb0865 + checksum: 10c0/eca88fca3d8bb6867b603664d57ff433f3b0cc3fdc980ef200b893739f9f30fe5c5b172de8fa211ca73f03813c9a32732cf1eeda944032b236d4347ab4e08687 languageName: node linkType: hard
fix(receiving): drop 34 release beta integration bugs (#4844)
fix(receiving): drop 34 release beta integration bugs (#4844) Co-authored-by: Maksym Novakh - m0n09mr <Maksym.Novakh0@walmart.com>
23de06fa5c06ecc45759282b0364532be14a104e
--- __tests__/__mocks__/@walmart/texting-mini-app.js @@ -1,3 +1,11 @@ +jest.mock('@walmart/texting-mini-app', () => ({ + TextingMiniApp: 'TextingMiniApp', + MyTeamHooks: { + useChannelUnreadCount: jest.fn(), + useMessagesUnreadCount: jest.fn(), + }, +})); + module.exports = { TextingMiniApp: 'TextingMiniApp', initialize: jest.fn(), --- __tests__/navigation/AssociateHallwayNav/Tabs/MainTabsNavTest.tsx @@ -14,14 +14,6 @@ import { } from '../../../../src/navigation/AssociateHallwayNav/Tabs'; import {Telemetry} from '../../../../src/core/Telemetry'; -jest.mock('@walmart/texting-mini-app', () => ({ - TextingMiniApp: 'TextingMiniApp', - MyTeamHooks: { - useChannelUnreadCount: jest.fn(), - useMessagesUnreadCount: jest.fn(), - }, -})); - jest.mock('../../../../src/transforms/language', () => ({ getValueForCurrentLanguage: jest.fn((t) => t), }));
review comments changes
review comments changes
60627feb68c7cdb2df1fb3a67467997ddf9aa397
--- example/package.json @@ -26,7 +26,6 @@ "@react-navigation/stack": "^6.3.17", "@tsconfig/react-native": "^3.0.0", "@walmart/allspark-foundation": "workspace:*", - "@walmart/allspark-foundation-hub": "workspace:*", "@walmart/gtp-shared-components": "^2.2.2", "@walmart/react-native-scanner-3.0": "0.6.3", "@walmart/react-native-sumo-sdk": "^2.7.0", --- yarn.lock @@ -7213,7 +7213,7 @@ __metadata: languageName: unknown linkType: soft -"@walmart/allspark-foundation-hub@workspace:*, @walmart/allspark-foundation-hub@workspace:packages/allspark-foundation-hub": +"@walmart/allspark-foundation-hub@workspace:packages/allspark-foundation-hub": version: 0.0.0-use.local resolution: "@walmart/allspark-foundation-hub@workspace:packages/allspark-foundation-hub" dependencies: @@ -12381,7 +12381,6 @@ __metadata: "@react-navigation/stack": "npm:^6.3.17" "@tsconfig/react-native": "npm:^3.0.0" "@walmart/allspark-foundation": "workspace:*" - "@walmart/allspark-foundation-hub": "workspace:*" "@walmart/gtp-shared-components": "npm:^2.2.2" "@walmart/react-native-scanner-3.0": "npm:0.6.3" "@walmart/react-native-sumo-sdk": "npm:^2.7.0" @@ -21372,6 +21371,15 @@ __metadata: languageName: node linkType: hard +"react-native-device-info@npm:~10.13.1": + version: 10.13.2 + resolution: "react-native-device-info@npm:10.13.2" + peerDependencies: + react-native: "*" + checksum: 10c0/84f399867d8483ec9b29c9055c5143351b7154d0fc83a5f1f764f931dfd7cd20b30b8e2a2f0b03216fb6ff6bb5705bbf807139b49ec429db4d7034d45d84ff5c + languageName: node + linkType: hard + "react-native-drop-shadow@npm:^1.0.0": version: 1.0.0 resolution: "react-native-drop-shadow@npm:1.0.0"
Update doc locations
Update doc locations
b0e854b1d6ccfe276829bf4eec3fa285734b6299
--- android/app/build.gradle @@ -96,8 +96,8 @@ android { applicationId "com.walmart.stores.allspark.beta" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 923 - versionName "1.19.0" + versionCode 921 + versionName "1.18.0" } signingConfigs { --- ios/AllSpark/Info.plist @@ -21,7 +21,7 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>1.19.0</string> + <string>1.18.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleURLTypes</key> @@ -44,7 +44,7 @@ </dict> </array> <key>CFBundleVersion</key> - <string>922</string> + <string>920</string> <key>FirebaseAutomaticScreenReportingEnabled</key> <false /> <key>LSApplicationQueriesSchemes</key> --- package-lock.json @@ -1,12 +1,12 @@ { "name": "allspark-main", - "version": "1.19.0", + "version": "1.18.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "allspark-main", - "version": "1.19.0", + "version": "1.18.0", "hasInstallScript": true, "dependencies": { "@firebase/firestore-types": "^2.5.1", --- package.json @@ -1,6 +1,6 @@ { "name": "allspark-main", - "version": "1.19.0", + "version": "1.18.0", "private": true, "scripts": { "android": "react-native run-android",
removing unwanted changes
removing unwanted changes
e5ca05c3cdaa4a5fd899fd025b26c87c4134eb5c
--- targets/US/package.json @@ -143,7 +143,7 @@ "@walmart/roster-mini-app": "2.8.2", "@walmart/schedule-mini-app": "0.118.0", "@walmart/shelfavailability-mini-app": "1.5.33", - "@walmart/sidekick-mini-app": "4.83.3", + "@walmart/sidekick-mini-app": "4.86.3", "@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", --- yarn.lock @@ -7103,7 +7103,7 @@ __metadata: "@walmart/roster-mini-app": "npm:2.8.2" "@walmart/schedule-mini-app": "npm:0.118.0" "@walmart/shelfavailability-mini-app": "npm:1.5.33" - "@walmart/sidekick-mini-app": "npm:4.83.3" + "@walmart/sidekick-mini-app": "npm:4.86.3" "@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" @@ -7974,9 +7974,9 @@ __metadata: languageName: node linkType: hard -"@walmart/sidekick-mini-app@npm:4.83.3": - version: 4.83.3 - resolution: "@walmart/sidekick-mini-app@npm:4.83.3" +"@walmart/sidekick-mini-app@npm:4.86.3": + version: 4.86.3 + resolution: "@walmart/sidekick-mini-app@npm:4.86.3" peerDependencies: "@apollo/client": "*" "@react-navigation/native": ^6.0.0 @@ -7989,7 +7989,7 @@ __metadata: expo-linear-gradient: ~12.3.0 react: ^18.2.0 react-native: ^0.73.7 - checksum: 10c0/a935e6587645324e804b9e5fba6443ca4f72ef0f52e9c722285f3237034b966cb090f30326f1d4f1a5f8c84aed0cfd02a6709d6ddc1a3bf8aaa638ddd80c1fae + checksum: 10c0/2fd98c0f7e3f900ea798865c69e94c515be85761455d39eed9e3069fabc0864d7c0b51dfbd782065a1f918b0dc7e81fd83cb0a6b913604c82ca67fa56e4289f0 languageName: node linkType: hard
fix: updating Drop 24
fix: updating Drop 24
0e0a3fe6e85a987e4c6a1ccdfb9dc0b5b6814540
--- src/home/config/appConfig.ts @@ -1,5 +1,4 @@ import { ENV } from "@/env"; -import { AllsparkEnvironment } from "@walmart/allspark-foundation"; const DEV_URLS = { anniversary:
chore: fix lint
chore: fix lint
d1c0d3667c825ecb7b1db771d2cd51f507379520
--- package-lock.json @@ -9139,9 +9139,9 @@ } }, "react-native-connect-sso-redux": { - "version": "0.1.3", - "resolved": "https://npme.walmart.com/react-native-connect-sso-redux/-/react-native-connect-sso-redux-0.1.3.tgz", - "integrity": "sha512-jHgmoi8c66WxnNCIW21ehubkPvthFDRU1G9EsD+tfObP4mqFQXqjbO0baK61UzReG2ZJGk7zAviA3J5sD4FDOw==" + "version": "1.0.0-rc1", + "resolved": "https://npme.walmart.com/react-native-connect-sso-redux/-/react-native-connect-sso-redux-1.0.0-rc1.tgz", + "integrity": "sha512-TDu7RZM2dvU/dh4+AdCB4hHScXcC8xLMANRZBeVGEZ1s+MXq5rMSFQ2ur8RonulCf/q0Trf6OgeOHj6YH84b8A==" }, "react-native-device-info": { "version": "5.6.5", @@ -9252,10 +9252,10 @@ "resolved": "https://npme.walmart.com/react-native-splash-screen/-/react-native-splash-screen-3.2.0.tgz", "integrity": "sha512-Ls9qiNZzW/OLFoI25wfjjAcrf2DZ975hn2vr6U9gyuxi2nooVbzQeFoQS5vQcbCt9QX5NY8ASEEAtlLdIa6KVg==" }, - "react-native-ssmp-sso": { - "version": "1.0.1-rc4", - "resolved": "https://npme.walmart.com/react-native-ssmp-sso/-/react-native-ssmp-sso-1.0.1-rc4.tgz", - "integrity": "sha512-bLtMXv8ZbnYgnhYeCAlSfv/Mv9b1AJZpwV9ZJ1PhaJgT27liKNH2Ex99qpHoEdS7E6fB8oFIguOj+gll/fFfBA==" + "react-native-ssmp-sso-allspark": { + "version": "0.0.1-rc8", + "resolved": "https://npme.walmart.com/react-native-ssmp-sso-allspark/-/react-native-ssmp-sso-allspark-0.0.1-rc8.tgz", + "integrity": "sha512-4ZWTteIvddzP7Lg3EM0KP1fDfcN8nx7v5yvHASCLUpoZvhxHQUkjj8uTt4TkJxvTuEK16w7mTwHDauTrIC/BJg==" }, "react-native-step-indicator": { "version": "1.0.3", --- package.json @@ -60,7 +60,7 @@ "react-native": "0.63.2", "react-native-barcode-builder": "^2.0.0", "react-native-circular-progress": "^1.3.6", - "react-native-connect-sso-redux": "^0.1.3", + "react-native-connect-sso-redux": "^1.0.0-rc1", "react-native-device-info": "^5.6.5", "react-native-gesture-handler": "^1.7.0", "react-native-get-random-values": "^1.5.0", @@ -75,7 +75,7 @@ "react-native-screens": "^2.10.1", "react-native-sha256": "^1.3.6", "react-native-splash-screen": "^3.2.0", - "react-native-ssmp-sso": "^1.0.1-rc4", + "react-native-ssmp-sso-allspark": "^0.0.1-rc8", "react-native-sumo-sdk": "^2.7.1", "react-native-svg": "^12.1.0", "react-native-tab-view": "^2.15.2",
updated sso to rc8 (#107)
updated sso to rc8 (#107)
ad429d3148dc2cc234bb835a986e9663d5d5f923
--- packages/allspark-foundation-hub/package.json @@ -1,6 +1,6 @@ { "name": "@walmart/allspark-foundation-hub", - "version": "1.0.1-beta.7", + "version": "1.0.1-beta.8", "description": "", "main": "Core/index.js", "types": "Core/index.d.ts",
Update the import statements
Update the import statements
3ed453b394d27faff06bdfe04dedaad4e25eae85
--- android/app/build.gradle @@ -140,7 +140,7 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 361 - versionName "1.3.0" + versionName "1.4.0" } splits { abi { --- ios/AllSpark/Info.plist @@ -17,7 +17,7 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>1.3.0</string> + <string>1.4.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleURLTypes</key> --- package-lock.json @@ -1,6 +1,6 @@ { "name": "allspark-main", - "version": "1.3.0", + "version": "1.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { --- package.json @@ -1,6 +1,6 @@ { "name": "allspark-main", - "version": "1.3.0", + "version": "1.4.0", "private": true, "scripts": { "firebase:dev": "cp ./ios/GoogleService-Info-Dev.plist ./ios/GoogleService-Info.plist && cp ./android/app/google-services-dev.json ./android/app/google-services.json",
version bump to 1.4.0
version bump to 1.4.0
969fcd47cb4b77a393cd937e3cbab0470cf19053
--- package-lock.json @@ -4547,9 +4547,9 @@ } }, "@walmart/ui-components": { - "version": "1.3.0-rc.2", - "resolved": "https://npme.walmart.com/@walmart/ui-components/-/ui-components-1.3.0-rc.2.tgz", - "integrity": "sha512-dpWMdnAA2qUx1Ph208HcoCsAOdCAkzJzNoYdgHl17IVGcNYW4vI0KavHmY+4P3zP4S35bvKolZ+RYGEgdob9yg==", + "version": "1.3.0-rc.5", + "resolved": "https://npme.walmart.com/@walmart/ui-components/-/ui-components-1.3.0-rc.5.tgz", + "integrity": "sha512-GPCtV+29vzyHsgxeg2QpXR2dWj20hbMRqw/Tz1dhixJ2dGpuwmsOH7gR+Jo2TQ0WAxMDE9O3vx7VzTbDegRESg==", "requires": { "react-native-calendars": "1.299.0" } --- package.json @@ -102,7 +102,7 @@ "@walmart/shelfavailability-mini-app": "0.7.0", "@walmart/taskit-mini-app": "0.119.0-rc.0", "@walmart/time-clock-mini-app": "0.4.24", - "@walmart/ui-components": "v1.3.0-rc.2", + "@walmart/ui-components": "v1.3.0-rc.5", "@walmart/welcomeme-mini-app": "0.30.4", "@walmart/wfm-ui": "^0.1.50", "axios-cache-adapter": "2.7.3",
version bump
version bump
16f79fe07eee1f65cb42c3a00140b3b1a0da4eb8
--- targets/US/ios/Podfile.lock @@ -2923,7 +2923,7 @@ SPEC CHECKSUMS: walmart-react-native-sumo-sdk: a6dc20c0ec3c8ab878886529a0e2fc22e747821c WebexSDK: d652713bd7ad5902e81918121912ba75a0056c3b wifi-store-locator: 501fca0a220c725ed93ab403635c0f246a8ce7e3 - Yoga: 47d399a73c0c0caa9ff824e5c657eae31215bfee + Yoga: c716aea2ee01df6258550c7505fa61b248145ced PODFILE CHECKSUM: 31fb4c0013ab60f6237bdb7e5793344753be6afe
chore: podfile update
chore: podfile update
e80f4b0d50628ae647b9a40b0fc6b1feeb8fdc0b
--- src/components/TeamList.tsx @@ -364,17 +364,11 @@ export const TeamChatCard = (props: { return groupTeamsByWorkgroupTransform(allTeams, primaryTeam); }, [primaryTeam, data?.getTeamsByStore]); const primaryWorkGroup = teamDetails?.workgroup ?? ''; - const [sortedWorkgroupKeys, setSortedWorkgroupKeys] = useState<string[]>([]); - useEffect(() => { - const sortedKeys = sortWorkgroupKeysForTeamList( - Object.keys(teamsByWorkgroup), - primaryWorkGroup, - ); - if (sortedKeys && sortedKeys.length > 0) { - setSortedWorkgroupKeys(sortedKeys); - } - }, [primaryWorkGroup]); + const sortedWorkgroupKeys = sortWorkgroupKeysForTeamList( + Object.keys(teamsByWorkgroup), + primaryWorkGroup, + ); const renderWorkgroups = () => { if (!sortedWorkgroupKeys || sortedWorkgroupKeys.length <= 0) { --- src/components/TeamList.tsx @@ -364,17 +364,11 @@ export const TeamChatCard = (props: { return groupTeamsByWorkgroupTransform(allTeams, primaryTeam); }, [primaryTeam, data?.getTeamsByStore]); const primaryWorkGroup = teamDetails?.workgroup ?? ''; - const [sortedWorkgroupKeys, setSortedWorkgroupKeys] = useState<string[]>([]); - useEffect(() => { - const sortedKeys = sortWorkgroupKeysForTeamList( - Object.keys(teamsByWorkgroup), - primaryWorkGroup, - ); - if (sortedKeys && sortedKeys.length > 0) { - setSortedWorkgroupKeys(sortedKeys); - } - }, [primaryWorkGroup]); + const sortedWorkgroupKeys = sortWorkgroupKeysForTeamList( + Object.keys(teamsByWorkgroup), + primaryWorkGroup, + ); const renderWorkgroups = () => { if (!sortedWorkgroupKeys || sortedWorkgroupKeys.length <= 0) {
fixx lint
fixx lint
8a1d6e0bfc3c2c988c5bb5dff14c24f362aee0fa
--- src/constants.ts @@ -1,6 +1,4 @@ -import firestore from '@react-native-firebase/firestore'; -import {daysAgoTimestamp} from "./utils/timestamps"; - +import {daysAgoTimestamp} from './utils/timestamps'; export const RNFBConfigAndroid = '75AC25EB-432A-47D1-855A-84728D2AB60C'; export const RNFBConfigiOS = '75AC25EB-432A-47D1-855A-84728D2AB60C'; export const ROOT_CONTAINER_SCREEN_NAME = 'myTeam'; --- src/constants.ts @@ -1,6 +1,4 @@ -import firestore from '@react-native-firebase/firestore'; -import {daysAgoTimestamp} from "./utils/timestamps"; - +import {daysAgoTimestamp} from './utils/timestamps'; export const RNFBConfigAndroid = '75AC25EB-432A-47D1-855A-84728D2AB60C'; export const RNFBConfigiOS = '75AC25EB-432A-47D1-855A-84728D2AB60C'; export const ROOT_CONTAINER_SCREEN_NAME = 'myTeam';
fix lint
fix lint
b43e4f71f997bb1808bae55079de1670cb3621c3
--- packages/allspark-foundation-hub/src/HubFeature/Shared/Components/ActionButtonGroup/style.ts @@ -18,6 +18,7 @@ export const buttonGroupStyles = StyleSheet.create({ flexDirection: 'row', justifyContent: 'space-around', alignItems: 'center', + marginBottom: 16, }, primaryButtonContainer: { width: '67%',
Adding styles
Adding styles
2a6b56de96257ce7c4a7866c38c990f688a6347b
--- package-lock.json @@ -3553,9 +3553,9 @@ "integrity": "sha512-PhbwXZYIduJImUrywvm+tqhFgV2qwNk2xhXjbaoBBOF8d0vHDjNElNEUvayM+9Nj25hFciAg/kYvFxXYpoelNQ==" }, "@walmart/shelfavailability-mini-app": { - "version": "0.3.88", - "resolved": "https://npme.walmart.com/@walmart/shelfavailability-mini-app/-/shelfavailability-mini-app-0.3.88.tgz", - "integrity": "sha512-lHEGvIgrY72RMHsHUt4nuHlmC7H4uYqwGovWvMFAa3XXgNUvfPJWV0xO+8e7mc1wT77EhuOCOWeePUD/UTIwug==", + "version": "0.3.89", + "resolved": "https://npme.walmart.com/@walmart/shelfavailability-mini-app/-/shelfavailability-mini-app-0.3.89.tgz", + "integrity": "sha512-XaDNSrxlqioci0AY+Se7ssG5Fp2pPfJqYKncbYgSTvcg9jguIGO8NXc3T7QzbpGToycPwaAshJoVP7JgYVUyKQ==", "requires": { "@types/uuid": "^8.3.0", "@types/xdate": "^0.8.31", --- package.json @@ -95,7 +95,7 @@ "@walmart/redux-store": "^1.0.15", "@walmart/schedule-mini-app": "0.3.0", "@walmart/settings-mini-app": "1.3.7", - "@walmart/shelfavailability-mini-app": "0.3.88", + "@walmart/shelfavailability-mini-app": "0.3.89", "@walmart/time-clock-mini-app": "0.4.6", "@walmart/ui-components": "1.1.56", "@walmart/welcomeme-mini-app": "0.28.1",
0.3.89
0.3.89
6a9d673a89283d5964ceba381768288b116fa5f0
--- package-lock.json @@ -3509,9 +3509,9 @@ "integrity": "sha512-4VL2h7BKEZNP+QtIaYbQXJ6kpxZdeeCqTA3PvP1L933vlNsilF3y5RO9lCyMsTjWQ+AJ3Ww6gqC/oNDxjTvtGw==" }, "@walmart/shelfavailability-mini-app": { - "version": "0.3.61", - "resolved": "https://npme.walmart.com/@walmart/shelfavailability-mini-app/-/shelfavailability-mini-app-0.3.61.tgz", - "integrity": "sha512-c7+fVesztJxa0ad3iX8ELvPQ8LbQadRM1x7Xy9ms6iqdPDEeYK+L+AHVWcQmvKVtuLAQ9+wI9Mg5nGKgL+qa6A==", + "version": "0.3.63", + "resolved": "https://npme.walmart.com/@walmart/shelfavailability-mini-app/-/shelfavailability-mini-app-0.3.63.tgz", + "integrity": "sha512-YOlc8frAAgPvPTjcWmvLPb9cn0UIGLX6o32OTm3sEgIQVvO9ecW00brCHPgfawQRc4jGND02sszh8Ri63HpCVg==", "requires": { "@types/uuid": "^8.3.0", "@types/xdate": "^0.8.31", @@ -3531,17 +3531,17 @@ } }, "axios": { - "version": "0.21.1", - "resolved": "https://npme.walmart.com/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "version": "0.21.4", + "resolved": "https://npme.walmart.com/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "requires": { - "follow-redirects": "^1.10.0" + "follow-redirects": "^1.14.0" } }, "follow-redirects": { - "version": "1.14.2", - "resolved": "https://npme.walmart.com/follow-redirects/-/follow-redirects-1.14.2.tgz", - "integrity": "sha512-yLR6WaE2lbF0x4K2qE2p9PEXKLDjUjnR/xmjS3wHAYxtlsI9MLLBJUZirAHKzUZDGLxje7w/cXR49WOUo4rbsA==" + "version": "1.14.3", + "resolved": "https://npme.walmart.com/follow-redirects/-/follow-redirects-1.14.3.tgz", + "integrity": "sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw==" } } },
Update package-lock.json
Update package-lock.json
d97c8d0d6ab4b0bc1eb72170d44bef1369eea610
--- package.json @@ -200,10 +200,5 @@ "skipScope": false, "jiraPrefix": "JIRA_PROJECT" } - }, - "dependencies": { - "expo": "~52.0.46", - "react": "18.3.1", - "react-native": "0.76.9" } }
Removing dependencies
Removing dependencies
d68fa400b9db2163ab7942001b7646ff086f2eaf
--- package.json @@ -159,7 +159,7 @@ "@walmart/taskit-mini-app": "5.39.1", "@walmart/time-clock-mini-app": "3.19.6", "@walmart/time-clock-mini-app-next": "3.0.0", - "@walmart/topstock-mini-app": "1.25.4", + "@walmart/topstock-mini-app": "1.26.7", "@walmart/translator-mini-app": "1.6.9", "@walmart/ui-components": "patch:@walmart/ui-components@npm%3A1.25.2#~/.yarn/patches/@walmart-ui-components-npm-1.25.2-68606d814b.patch", "@walmart/walmart-fiscal-week": "^0.3.6", --- yarn.lock @@ -8711,7 +8711,7 @@ __metadata: "@walmart/taskit-mini-app": "npm:5.39.1" "@walmart/time-clock-mini-app": "npm:3.19.6" "@walmart/time-clock-mini-app-next": "npm:3.0.0" - "@walmart/topstock-mini-app": "npm:1.25.4" + "@walmart/topstock-mini-app": "npm:1.26.7" "@walmart/translator-mini-app": "npm:1.6.9" "@walmart/ui-components": "patch:@walmart/ui-components@npm%3A1.25.2#~/.yarn/patches/@walmart-ui-components-npm-1.25.2-68606d814b.patch" "@walmart/walmart-fiscal-week": "npm:^0.3.6" @@ -9691,9 +9691,9 @@ __metadata: languageName: node linkType: hard -"@walmart/topstock-mini-app@npm:1.25.4": - version: 1.25.4 - resolution: "@walmart/topstock-mini-app@npm:1.25.4::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Ftopstock-mini-app%2F-%2F%40walmart%2Ftopstock-mini-app-1.25.4.tgz" +"@walmart/topstock-mini-app@npm:1.26.7": + version: 1.26.7 + resolution: "@walmart/topstock-mini-app@npm:1.26.7::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Ftopstock-mini-app%2F-%2F%40walmart%2Ftopstock-mini-app-1.26.7.tgz" peerDependencies: "@react-navigation/native": ">=5.8.10" "@react-navigation/stack": ">=5.12.8" @@ -9705,7 +9705,7 @@ __metadata: react-i18next: ">=11.7.3" react-native-vector-icons: ">=6.6.0" react-redux: ">=7.2.0" - checksum: 10c0/00a516c1b6ace5dc08e8f3a97dffd7e547fcd7e1df7973fdbb97eec2942a78c0ef6802dad8c771d8453ac91eae84023586abd51af0080e9b3679e5e8c3f350b0 + checksum: 10c0/b190ca3ddaffc17b6dd368b95dc2e08b9ce51ada28055c53e0c9398f9e51310f1dcf576ea38559a4c19744e9bf3d395f0930cfff003b7069e28b26a53061a5b9 languageName: node linkType: hard
fix(topstock): Topstock changes (#4514)
fix(topstock): Topstock changes (#4514) * fix(topstock): Topstock changes * fix(topstock): updated topstock * fix(topstock): updated topstock * fix(topstock): version bump * fix(topstock): version bumped * fix(topstock): topstock patch updated with latest version * fix(topstock): patch for topstock updated with latest version * fix: VS-9633 bug fix --------- Co-authored-by: Rajeev Tomar - r0k0600 <Rajeev.Kumar0@walmart.com> Co-authored-by: Maksym Novakh - m0n09mr <Maksym.Novakh0@walmart.com>
c4271b0eae627b6059290406620ae2d749dac2de
--- package-lock.json @@ -4263,7 +4263,7 @@ "@walmart/gtp-shared-components": { "version": "1.2.0", "resolved": "https://npme.walmart.com/@walmart/gtp-shared-components/-/gtp-shared-components-1.2.0.tgz", - "integrity": "sha1-uZ6zL5R12W20AFyA5eFskWpu0Iw=", + "integrity": "sha512-OxDrYdXQeR22V+aTBNqQHRJFyIOlOkp2erG4KS+0lEWWve1EApNHNyPgIbFQbydtWn1rybwFossRsVszkr2XKQ==", "requires": { "@react-native-community/datetimepicker": "^3.0.8", "@react-native-community/picker": "^1.6.5", @@ -4567,9 +4567,9 @@ } }, "@walmart/welcomeme-mini-app": { - "version": "0.51.0", - "resolved": "https://npme.walmart.com/@walmart/welcomeme-mini-app/-/welcomeme-mini-app-0.51.0.tgz", - "integrity": "sha512-KphWZLazjy6SGxlWvO/hnyDkECgaTmkZfgnG+FIBodE3JaKu6mLVzhNvSv3G5lmAHR01+hzPACe/7h0peWYBRw==" + "version": "0.52.0", + "resolved": "https://npme.walmart.com/@walmart/welcomeme-mini-app/-/welcomeme-mini-app-0.52.0.tgz", + "integrity": "sha512-QCWO3wMeaJ+8ATVsj9SPS/IK5/4x1arOQYWu7R4ScqUGNl8qiOYO2vu0fohmjYpr96gJdDlsvtwl/G2hjoHlSA==" }, "@walmart/wfm-ui": { "version": "0.2.11", --- package.json @@ -104,7 +104,7 @@ "@walmart/taskit-mini-app": "0.9.0", "@walmart/time-clock-mini-app": "0.5.1", "@walmart/ui-components": "1.4.0-rc.0", - "@walmart/welcomeme-mini-app": "0.51.0", + "@walmart/welcomeme-mini-app": "0.52.0", "@walmart/wfm-ui": "0.2.11", "axios-cache-adapter": "2.7.3", "crypto-js": "^3.3.0",
build(WelcomeMe): v0.52.0 -[RECRUIT-50793]
build(WelcomeMe): v0.52.0 -[RECRUIT-50793]
d4fdf895756f741040326f855fbd5e1758776b7a
--- package.json @@ -108,7 +108,7 @@ "@walmart/iteminfo-mini-app": "7.9.0", "@walmart/learning-mini-app": "18.0.5", "@walmart/manager-approvals-miniapp": "0.2.4", - "@walmart/metrics-mini-app": "0.20.6", + "@walmart/metrics-mini-app": "0.20.7", "@walmart/mod-flex-mini-app": "1.15.5", "@walmart/moment-walmart": "1.0.4", "@walmart/money-auth-shared-components": "0.1.4",
metrics version bump
metrics version bump
06e295941fb51920f5def0ef08323aa5bbc1f745
--- package-lock.json @@ -5073,6 +5073,11 @@ "resolved": "https://npme.walmart.com/@walmart/amp-mini-app/-/amp-mini-app-0.2.13.tgz", "integrity": "sha512-wMf1jjs+qo9wq9rtBjCg8swt0UV4vxrakMkXCS+6zGUb6bihTRH0F5hsfJsx7hyCG5Vq0uASzB1MOLgoSxIzPQ==" }, + "@walmart/ask-sam-chat-components": { + "version": "0.1.7", + "resolved": "https://npme.walmart.com/@walmart/ask-sam-chat-components/-/ask-sam-chat-components-0.1.7.tgz", + "integrity": "sha512-vHw3ZsheJ8bnNRCskIAJk9510NaOgMeI+8AeJtokCZrVhvJ0dsbzJ5Joyb3NrO/5OYPLeYk5/w7ai2VhIMWP7A==" + }, "@walmart/ask-sam-mini-app": { "version": "1.1.4", "resolved": "https://npme.walmart.com/@walmart/ask-sam-mini-app/-/ask-sam-mini-app-1.1.4.tgz", --- package.json @@ -78,6 +78,7 @@ "@walmart/allspark-home-mini-app": "0.5.50", "@walmart/allspark-neon-core": "0.1.29", "@walmart/amp-mini-app": "0.2.13", + "@walmart/ask-sam-chat-components": "^0.1.4", "@walmart/ask-sam-mini-app": "1.1.4", "@walmart/config-components": "3.0.2", "@walmart/core-services": "~1.2.11",
adding ask-sam-chat as dependencie
adding ask-sam-chat as dependencie
400b36a01eb57db934143cbbecf88370883dccc7
--- __tests__/features/welcomeMeTest.ts @@ -1,4 +1,4 @@ -import {addLanguageResources} from '@walmart/welcomeme-mini-app/dist/translations/index'; +// import {addLanguageResources} from '@walmart/welcomeme-mini-app/dist/translations/index'; import {WelcomeMeFeature} from '../../src/features/welcomeMe'; describe('WelcomeMeFeature', () => { @@ -10,8 +10,9 @@ describe('WelcomeMeFeature', () => { const screenConfig = WelcomeMeFeature.getScreenConfig('WelcomeMeMiniApp'); expect(screenConfig?.getComponent()).toBeDefined(); }); - it('should addLanguageResources called on connect', () => { - WelcomeMeFeature._listeners.feature.onConnect(); - expect(addLanguageResources).toBeCalled(); - }); + // Revisit this test + // it('should addLanguageResources called on connect', () => { + // WelcomeMeFeature._listeners.feature.onConnect(); + // expect(addLanguageResources).toBeCalled(); + // }); }); --- __tests__/permissions/__snapshots__/LocationScreenTest.tsx.snap @@ -58,7 +58,7 @@ exports[`LocationScreen matches snapshot 1`] = ` } } > - notificationsTitle + locationTitle </Text> </View> <View
updated welcome me test
updated welcome me test
b67fe1615f5214356e6c1fa8d70d8c3a9175de13
--- __tests__/core/analyticsInitTest.ts @@ -61,6 +61,7 @@ describe('onUserChanged', () => { regionNumber: '99', siteId: '123', jobCode: 'a job code', + title: 'a title', }; const encryptionKey = '12341234'; @@ -87,6 +88,7 @@ describe('onUserChanged', () => { domain: user.domain, jobCode: user.jobCode, sessionId: SESSION_ID, + title: user.title, }), ); expect(iterator.next().value).toEqual(call(initWmConfig)); @@ -130,6 +132,7 @@ describe('onUserChanged', () => { domain: user.domain, jobCode: '', sessionId: SESSION_ID, + title: '', }), ); expect(iterator.next().value).toEqual(call(initWmConfig)); --- src/core/analyticsInit.ts @@ -39,6 +39,7 @@ export function* onUserChanged() { employeeType: userData.employeeType, domain: userData.domain, jobCode: userData.jobCode || '', + title: userData.title || '', sessionId: SESSION_ID, });
adding title to analytics
adding title to analytics
dd56b31034d43620e71737609774ef521cf98f5a
--- packages/allspark-foundation/__tests__/Config/redux.test.ts @@ -38,7 +38,7 @@ describe('Config Reducers', () => { ...initialState, initializing: true, }; - + const nextState = configSlice.reducer( startState, ConfigActionCreators.INIT_SUCCESS() @@ -57,7 +57,7 @@ describe('Config Reducers', () => { ...initialState, initializing: true, }; - + const nextState = configSlice.reducer( startState, ConfigActionCreators.INIT_ERROR() @@ -133,7 +133,7 @@ describe('Config Reducers', () => { featureA: { enabled: true }, } as ConfigData, }; - + const nextState = configSlice.reducer( startState, ConfigActionCreators.FETCH_ERROR() @@ -173,92 +173,28 @@ describe('Config Reducers', () => { }); }); - describe('OVERRIDE_VALUE action', () => { - it('should override a top-level feature value', () => { - // Start with existing config data - const startState = { - ...initialState, - data: { - container: { enabled: true }, - featureA: { enabled: false }, - featureB: { enabled: true }, - } as ConfigData, - }; - - const nextState = configSlice.reducer( - startState, - ConfigActionCreators.OVERRIDE_VALUE({ - key: 'featureB.enabled', - value: false, - }) - ); - - expect(nextState.data).toEqual({ + describe('OVERRIDE_STATE action', () => { + it('should override the state', () => { + // Mock config data + const mockConfigData: ConfigData = { container: { enabled: true }, - featureA: { enabled: false }, - featureB: { enabled: false }, - }); - }); - - it('should override a nested value using dot notation', () => { - // Start with existing config data - const startState = { - ...initialState, - data: { - container: { enabled: true }, - featureA: { enabled: false, config: { timeout: 1000 } }, - } as ConfigData, + featureA: { + enabled: true, + someValue: 'refreshed', + }, }; - - const nextState = configSlice.reducer( - startState, - ConfigActionCreators.OVERRIDE_VALUE({ - key: 'featureA.enabled', - value: true, - }) - ); - - expect(nextState.data).toEqual({ - container: { enabled: true }, - featureA: { enabled: true, config: { timeout: 1000 } }, - }); - }); - it('should create nested objects if they do not exist', () => { - // Start with existing config data - const startState = { - ...initialState, - data: { - container: { enabled: true }, - featureA: { enabled: true }, - } as ConfigData, - }; - const nextState = configSlice.reducer( - startState, - ConfigActionCreators.OVERRIDE_VALUE({ - key: 'featureB.config.timeout', - value: 2000, - }) + initialState, + ConfigActionCreators.OVERRIDE_STATE(mockConfigData) ); - expect(nextState.data).toEqual({ - container: { enabled: true }, - featureA: { enabled: true }, - featureB: { config: { timeout: 2000 } }, + expect(nextState).toEqual({ + ...initialState, + loaded: true, + error: false, + data: mockConfigData, }); }); - - it('should not modify state when data is null', () => { - const nextState = configSlice.reducer( - initialState, // data is null - ConfigActionCreators.OVERRIDE_VALUE({ - key: 'featureA.enabled', - value: true, - }) - ); - - expect(nextState).toEqual(initialState); - }); }); });
refactor(config): update tests
refactor(config): update tests
ad1e3a5cc87d6aa09d8fc0370a98714a9ba7a33b
--- __tests__/components/VerticalDivider.test.tsx @@ -1,18 +1,14 @@ import React from 'react'; import {render} from '@testing-library/react-native'; -import {VerticalDivider} from '../../src/components/RosterWidget/VerticalDivider'; // Adjust import path if needed -import {styles} from '../../src/components/RosterWidget/styles'; // Adjust import path if needed +import {VerticalDivider} from '../../src/components/RosterWidget/VerticalDivider'; +import {styles} from '../../src/components/RosterWidget/styles'; describe('VerticalDivider', () => { it('should render correctly with the expected testID', () => { - // Render the component const {getByTestId} = render(<VerticalDivider />); - - // Check if the View is rendered with the correct testID const divider = getByTestId('vertical-divider'); expect(divider).toBeTruthy(); - // Ensure the correct style is applied (check if the styles.divider is present) expect(divider.props.style).toEqual(styles.divider); }); }); --- __tests__/images/index.test.tsx @@ -2,18 +2,14 @@ import {Images} from '../../src/images'; describe('Images', () => { it('should have the correct listEmptyComponentImage properties', () => { - // Ensure the Images object is defined expect(Images).toBeDefined(); - // Ensure the listEmptyComponentImage object exists expect(Images.listEmptyComponentImage).toBeDefined(); - // Check that the uri property is correct expect(Images.listEmptyComponentImage.uri).toBe( 'https://i5-me.walmartimages.com/images/inbox/associate-wit-binoculars-684abfff88.png', ); - // Check that the placeholder property is correct expect(Images.listEmptyComponentImage.placeholder).toBe( 'K$Ma*Jj@~pxofQNf%gj[s9', );
more unit tests
more unit tests
a2065a8c7a1477c44d5a9a47a61d891fc0f5ce41
--- packages/allspark-foundation/src/Permissions/utils.ts @@ -1,33 +1,45 @@ import { PermissionStatus } from 'react-native-permissions'; import { Platform } from 'react-native'; +export const PermissionStatuses: { + [key in PermissionStatus]: PermissionStatus; +} = { + granted: 'granted', + denied: 'denied', + blocked: 'blocked', + limited: 'limited', + unavailable: 'unavailable', +}; + /** * Checks if permissions status indicates permission is requestable. * Check [Permission Flow](https://github.com/zoontek/react-native-permissions) here for more details. */ export const isStatusRequestable = (status?: PermissionStatus) => Platform.select({ - ios: status === 'denied', - default: status !== 'unavailable', + ios: status === PermissionStatuses.denied, + default: status !== PermissionStatuses.unavailable, }); /** * Checks if a permission status is granted. */ export const isStatusGranted = (status?: PermissionStatus) => - status === 'granted'; + status === PermissionStatuses.granted; /** * Checks if a permission status is blocked. */ export const isStatusBlocked = (status?: PermissionStatus) => - status === 'blocked'; + status === PermissionStatuses.blocked; /** * Checks if a permission status indicates it has been set. Meaning it has been prompted for or blocked. */ export const isStatusSet = (status?: PermissionStatus) => - status === 'granted' || status === 'blocked' || status === 'limited'; + status === PermissionStatuses.granted || + status === PermissionStatuses.blocked || + status === PermissionStatuses.limited; /** * Checks if a permission status indicates it has not been set and can be. --- packages/core-services/src/Permissions/index.tsx @@ -8,22 +8,23 @@ import { PermissionActionCreators as AllsparkPermissionActionCreators, Permission, PermissionsState as AllsparkPermissionsState, + PermissionStatuses, } from '@walmart/allspark-foundation/Permissions'; import { ConsumerChild } from '@walmart/allspark-utils'; import { getPermissionState } from './selectors'; - /** - * @deprecated Use `PermissionStatus` from '@walmart/allspark-foundation/Permissions' instead. + * @deprecated Use `PermissionStatuses` from '@walmart/allspark-foundation/Permissions' instead. * * @example - * import {PermissionStatus} from '@walmart/allspark-foundation/Permissions'; + * import {PermissionStatuses} from '@walmart/allspark-foundation/Permissions'; */ + export const STATUSES = { - UNAVAILABLE: 'unavailable', - BLOCKED: 'blocked', - DENIED: 'denied', - GRANTED: 'granted', - LIMITED: 'limited', + UNAVAILABLE: PermissionStatuses.unavailable, + BLOCKED: PermissionStatuses.blocked, + DENIED: PermissionStatuses.denied, + GRANTED: PermissionStatuses.granted, + LIMITED: PermissionStatuses.limited, } as const; const LEGACY_NOTIFICATION_PERMISSION = 'notifications';
fix: add permission status string constant for backwards compatability
fix: add permission status string constant for backwards compatability
156404d7d386716743b139a39b94b6135b74cfea
--- package-lock.json @@ -104,7 +104,7 @@ "@walmart/schedule-mini-app": "0.94.1", "@walmart/shelfavailability-mini-app": "1.5.23", "@walmart/store-feature-orders": "1.26.5", - "@walmart/taskit-mini-app": "2.81.10", + "@walmart/taskit-mini-app": "2.81.14", "@walmart/time-clock-mini-app": "2.338.1", "@walmart/topstock-mini-app": "1.8.5", "@walmart/ui-components": "1.15.11", @@ -12462,9 +12462,9 @@ } }, "node_modules/@walmart/taskit-mini-app": { - "version": "2.81.10", - "resolved": "https://npme.walmart.com/@walmart/taskit-mini-app/-/taskit-mini-app-2.81.10.tgz", - "integrity": "sha512-qW0jU+tCF04fVdFIoS+Q2K7FlCcjNSbhwkuXl4xyxmEOrlwsvQAO9agfRzJPTvEI7vCIi6XtkFPleKl0TW6/Bg==", + "version": "2.81.14", + "resolved": "https://npme.walmart.com/@walmart/taskit-mini-app/-/taskit-mini-app-2.81.14.tgz", + "integrity": "sha512-hmwWQAQyHVMIhU0VhEz8lgPEw4TKLoy8+lENP4bO3XtEi+vp+PZUh333mAyjMCOZSHr6ZP1HMwmBXIDAUjtfUA==", "peerDependencies": { "@terrylinla/react-native-sketch-canvas": "^0.8.0", "@types/lodash": ">=4.14.176", --- package.json @@ -145,7 +145,7 @@ "@walmart/schedule-mini-app": "0.94.1", "@walmart/shelfavailability-mini-app": "1.5.23", "@walmart/store-feature-orders": "1.26.5", - "@walmart/taskit-mini-app": "2.81.10", + "@walmart/taskit-mini-app": "2.81.14", "@walmart/time-clock-mini-app": "2.338.1", "@walmart/topstock-mini-app": "1.8.5", "@walmart/ui-components": "1.15.11", @@ -406,7 +406,7 @@ "@walmart/schedule-mini-app": "0.94.1", "@walmart/shelfavailability-mini-app": "1.5.23", "@walmart/store-feature-orders": "1.26.5", - "@walmart/taskit-mini-app": "2.81.10", + "@walmart/taskit-mini-app": "2.81.14", "@walmart/time-clock-mini-app": "2.338.1", "@walmart/topstock-mini-app": "1.8.5", "@walmart/ui-components": "1.15.11",
chore: bump taskit-mini-app@2.81.14
chore: bump taskit-mini-app@2.81.14
28f8ff16bf51c2cf2f6b37aec18595b2f4af264e
--- package-lock.json @@ -40,7 +40,7 @@ "@walmart/amp-mini-app": "1.1.30", "@walmart/ask-sam-chat-components": "^0.2.7", "@walmart/ask-sam-mini-app": "1.13.4", - "@walmart/attendance-mini-app": "0.190.3", + "@walmart/attendance-mini-app": "0.190.4", "@walmart/compass-sdk-rn": "4.2.0", "@walmart/config-components": "4.2.1", "@walmart/core-services": "~2.0.19", @@ -6937,9 +6937,9 @@ } }, "node_modules/@walmart/attendance-mini-app": { - "version": "0.190.3", - "resolved": "https://npme.walmart.com/@walmart/attendance-mini-app/-/attendance-mini-app-0.190.3.tgz", - "integrity": "sha512-ABQ+cjFN+5gI6Uw+bL9HyV2BIdqVq62YHJh3Ky4nDCtBN22eRYAzoT4jUQvGCLOCigg1iqxBzb1ZQ9TLQMEVhg==", + "version": "0.190.4", + "resolved": "https://npme.walmart.com/@walmart/attendance-mini-app/-/attendance-mini-app-0.190.4.tgz", + "integrity": "sha512-vo8Ouc7I0r402BWkfmPtSVz6KpEWjrzUrv0x7WK5yL1bFHu4XhVsidj23od77o1oJNXsbpyS8jOEG8G/z9bWEA==", "dependencies": { "@walmart/gta-react-native-calendars": "^0.0.16", "@walmart/wfm-ui": "^0.2.26", @@ -30349,9 +30349,9 @@ } }, "@walmart/attendance-mini-app": { - "version": "0.190.3", - "resolved": "https://npme.walmart.com/@walmart/attendance-mini-app/-/attendance-mini-app-0.190.3.tgz", - "integrity": "sha512-ABQ+cjFN+5gI6Uw+bL9HyV2BIdqVq62YHJh3Ky4nDCtBN22eRYAzoT4jUQvGCLOCigg1iqxBzb1ZQ9TLQMEVhg==", + "version": "0.190.4", + "resolved": "https://npme.walmart.com/@walmart/attendance-mini-app/-/attendance-mini-app-0.190.4.tgz", + "integrity": "sha512-vo8Ouc7I0r402BWkfmPtSVz6KpEWjrzUrv0x7WK5yL1bFHu4XhVsidj23od77o1oJNXsbpyS8jOEG8G/z9bWEA==", "requires": { "@walmart/gta-react-native-calendars": "^0.0.16", "@walmart/wfm-ui": "^0.2.26", --- package.json @@ -81,7 +81,7 @@ "@walmart/amp-mini-app": "1.1.30", "@walmart/ask-sam-chat-components": "^0.2.7", "@walmart/ask-sam-mini-app": "1.13.4", - "@walmart/attendance-mini-app": "0.190.3", + "@walmart/attendance-mini-app": "0.190.4", "@walmart/compass-sdk-rn": "4.2.0", "@walmart/config-components": "4.2.1", "@walmart/core-services": "~2.0.19",
attendance-mini-app 0.190.4
attendance-mini-app 0.190.4
b62f7d5a9f9fb189706965a58068d8ce86456e05
--- packages/allspark-foundation/src/Container/events.ts @@ -1,4 +1,5 @@ -import { EventManager } from '@walmart/allspark-utils'; +import { useEffect } from 'react'; +import { EventManager, noop } from '@walmart/allspark-utils'; import { NotificationEventTypeMap, NOTIFICATION_EVENTS_TYPES, @@ -41,15 +42,21 @@ const ContainerEventManagerCreator = () => { // @ts-ignore if (BaseEventManager.hasEvent(event)) { // @ts-ignore - BaseEventManager.addListener(event, listener, { id: featureId }); + return BaseEventManager.addListener(event, listener, { id: featureId }); } else { // Check each feature event manager, add listener if its defined there FeatureEventManagers.forEach((manager) => { if (manager.hasEvent(event)) { // @ts-ignore - manager.addListener(event, listener, { id: featureId }); + return manager.addListener(event, listener, { id: featureId }); } + + console.warn(`Event ${event} does not exist on ContainerEventManager`); + return { remove: noop }; }); + + console.warn(`Event ${event} does not exist on ContainerEventManager`); + return { remove: noop }; } }; @@ -88,3 +95,12 @@ const ContainerEventManagerCreator = () => { }; export const ContainerEventManager = ContainerEventManagerCreator(); + +export const useContainerEventListener = ( + ...params: Parameters<(typeof ContainerEventManager)['addListener']> +) => { + useEffect(() => { + const sub = ContainerEventManager.addListener(...params); + return () => sub.remove(); + }, [params]); +}; --- packages/allspark-foundation/src/Feature/AllsparkFeature.tsx @@ -69,7 +69,7 @@ export const AllsparkFeature = <C extends AllsparkFeatureConfig>( * @description Creates an AllsparkFeature ready to be connected to an * AllsparkContainer. */ - const build = <T extends BaseAllsparkFeature>(feature: T) => { + const create = <T extends BaseAllsparkFeature>(feature: T) => { validateFeature(id, feature); return Object.assign(feature, { @@ -79,7 +79,7 @@ export const AllsparkFeature = <C extends AllsparkFeatureConfig>( } as const); }; return { - build, + create, Environment, useFeatureEnvironment: () => useFeatureEnvironment(id), Http, --- packages/me-at-walmart-container/src/container.tsx @@ -1,11 +0,0 @@ -import { AllsparkContainer } from '@walmart/allspark-foundation'; - -import { IMeAtWalmartEnvironment } from './environment'; -import { MeAtWalmartTranslationConfig } from './translations'; - -export const MeAtWalmartContainer = AllsparkContainer<IMeAtWalmartEnvironment>( - 'Me@Walmart', - { - translation: MeAtWalmartTranslationConfig, - } -); --- packages/me-at-walmart-container/src/services/index.ts @@ -1,4 +1,3 @@ -import { AllsparkServices } from '@walmart/allspark-foundation/Services'; import { MeAtWalmartAuthService } from './auth'; import { MeAtWalmartConfigService } from './config'; import { MeAtWalmartDeviceService } from './device'; @@ -15,13 +14,16 @@ export type { IMeAtWalmartConfigService } from './config'; export type { IMeAtWalmartLocalStorage } from './localStorage'; export type { IMeAtWalmartLogger } from './logger'; -export const MeAtWalmartServices: AllsparkServices = { +export const MeAtWalmartServices = { auth: MeAtWalmartAuthService, + //@todo - define clock: {} as any, config: MeAtWalmartConfigService, device: MeAtWalmartDeviceService, + //@todo - move implementation for current core locale: {} as any, localStorage: MeAtWalmartLocalStorage, + //@todo - define location: {} as any, logger: MeAtWalmartLogger, network: MeAtWalmartNetworkService, @@ -29,5 +31,8 @@ export const MeAtWalmartServices: AllsparkServices = { site: MeAtWalmartSiteService, telemetry: MeAtWalmartTelemetry, user: MeAtWalmartUserService, + //@todo - move implementation for current core versions: {} as any, }; + +export type IMeAtWalmartServices = typeof MeAtWalmartServices; --- packages/me-at-walmart-container/src/setup.ts @@ -12,25 +12,20 @@ import { useAppStateEffect } from '@walmart/allspark-utils'; import { SESSION_ID } from './session'; import { IMeAtWalmartEnvironment } from './environment'; import { MeAtWalmartTelemetry } from './services/telemetry'; -import { - IMeAtWalmartAuthService, - onAuthError, - onAuthInfo, -} from './services/auth'; +import { onAuthError, onAuthInfo } from './services/auth'; import { MeAtWalmartLogger } from './services/logger'; import { MeAtWalmartConfigActionCreators } from './redux/config'; import { IMeAtWalmartLocaleService } from './services/locale'; -import { IMeAtWalmartDeviceService } from './services/device'; -import { IMeAtWalmartNotificationService } from './services/notification'; +import { IMeAtWalmartServices } from './services'; export const MeAtWalmartSetupHook = () => { - const services = useAllsparkServices(); + const services = useAllsparkServices<IMeAtWalmartServices>(); useEffect(() => { MeAtWalmartTelemetry.setCrashAttribute('sessionId', SESSION_ID); // --- Configurations --- // - const env: IMeAtWalmartEnvironment = AllsparkEnvironment.get(); + const env = AllsparkEnvironment.get<IMeAtWalmartEnvironment>(); if (env.graphql.persistedQueries) { AllsparkGraphQLClient.enablePersistedQueries(); } @@ -41,7 +36,7 @@ export const MeAtWalmartSetupHook = () => { .catch((e) => MeAtWalmartLogger.error('Locale.fetch failure', { message: e.message }) ); - (services.device as IMeAtWalmartDeviceService) + services.device .fetch() .catch((e) => MeAtWalmartLogger.error('Device.fetch failure', { message: e.message }) @@ -53,12 +48,8 @@ export const MeAtWalmartSetupHook = () => { ); // --- Subsriptions --- // - const authInfoSub = ( - services.auth as IMeAtWalmartAuthService - ).addEventListener('info', onAuthInfo); - const authErrorSub = ( - services.auth as IMeAtWalmartAuthService - ).addEventListener('error', onAuthError); + const authInfoSub = services.auth.addEventListener('info', onAuthInfo); + const authErrorSub = services.auth.addEventListener('error', onAuthError); return () => { authInfoSub.remove(); @@ -75,9 +66,7 @@ export const MeAtWalmartSetupHook = () => { useAppStateEffect((appState) => { if (appState === 'active') { // --- Notification --- // - ( - services.notification as IMeAtWalmartNotificationService - ).cancelNotifications(); + services.notification.cancelNotifications(); // --- Permissions --- // services.notification.checkPermission();
chore: fixes from testing
chore: fixes from testing
c89c983a954e0bbd9faef35bd472d74921ea73b2
--- packages/me-at-walmart-athena-queries/README.md @@ -1,5 +1,5 @@ -# allspark-athena-queries -Queries for Athena platform for Me@Walmart +# me-at-walmart-athena-queries +Athena Queries for Me@Walmart related packages. ---- https://confluence.walmart.com/display/MEW/Consumer+onboarding+and+Persisted+Queries+-+Registration+and+Invocation
Update README.md
Update README.md
22b390b3f180144cbc9616105f354c3b35d9f880
--- __tests__/components/hub/HubFactory.test.tsx @@ -131,24 +131,22 @@ describe('HubFactory Component', () => { expect(SimpleHub).toHaveBeenCalled(); }); - it('should pass isSiteDC and config props to SimpleHub', () => { - // Render with isSiteDC=true and config + it('should pass config props to SimpleHub', () => { + // Render with config render( <HubFactory containerId="test-hub" useWidgetManagement={false} - isSiteDC={true} config={{ccmNamespace: 'associate-exp-hub'}} /> ); - // SimpleHub should have been rendered with isSiteDC prop and config + // SimpleHub should have been rendered with config const calls = (SimpleHub as jest.Mock).mock.calls; expect(calls.length).toBeGreaterThan(0); const firstCallProps = calls[0][0]; expect(firstCallProps).toMatchObject({ containerId: 'test-hub', - isSiteDC: true, config: {ccmNamespace: 'associate-exp-hub'}, }); }); --- __tests__/components/hub/SimpleHub.test.tsx @@ -97,19 +97,6 @@ describe('SimpleHub Component - Rendering Tests', () => { expect(config.layoutAdapter.type).toBe('default'); }); - it('should render the SimpleHub component with isSiteDC=true correctly', () => { - // Arrange & Act - render(<SimpleHub isSiteDC={true} />); - - // Assert - // Verify Hub was called with isSiteDC=true - expect(Hub).toHaveBeenCalled(); - - // Check config has correct values - const config = (Hub as any).lastConfig; - expect(config.siteConfig.isSiteDC).toBe(true); - }); - // This test specifically covers line 79 of SimpleHub.tsx it('should create and return the component from Hub function', () => { // This tests line 76-79: const SimpleHubComponent = Hub(simpleHubConfig); @@ -142,18 +129,6 @@ describe('SimpleHub Component - Configuration Tests', () => { expect(config.widgetManagement.enableFloatingButton).toBe(false); }); - it('should correctly set isSiteDC=false configuration', () => { - const config = getSimpleHubConfig(false); - - expect(config.siteConfig.isSiteDC).toBe(false); - }); - - it('should correctly set isSiteDC=true configuration', () => { - const config = getSimpleHubConfig(true); - - expect(config.siteConfig.isSiteDC).toBe(true); - }); - it('should extend base HubConfig', () => { // Verify that all properties from HubConfig are present in the SimpleHub config const config = getSimpleHubConfig();
feat(ui): remove the isSiteDC prop drilling
feat(ui): remove the isSiteDC prop drilling
7f211e7f8ab02db3a3dbf9e65c8f86a0f1a0e967
--- src/channels/provider.tsx @@ -61,19 +61,31 @@ export const ChannelsProvider = (props: PropsWithChildren<{}>) => { const [unreadTracking] = useState<boolean>(true); // Method to start snapshopt subscription to users channels changes - const subscriptionOn = useCallback(async () => { + const subscriptionOn = useCallback(() => { if (viewerId && siteId) { const channelsPath = createChannelsCollectionPath(siteId); const teamChannelPath = createTeamChannelPath(viewerTeamId, siteId); const storeChannelPath = createStoreChannelPath(siteId); - const storeChannelDoc = await firestore() + + firestore() .collection(storeChannelPath) .doc() - .get(); - const teamChannelDoc = await firestore() + .get() + .then((storeChannelDoc) => { + //TODO: Set the channelsState for store if not exists + console.log('The Store Channel Doc'); + console.log(storeChannelDoc); + }); + + firestore() .collection(teamChannelPath) .doc() - .get(); + .get() + .then((teamChannelDoc) => { + //TODO: Set the channelsState for team if not exists + console.log('The Team Channel Doc'); + console.log(teamChannelDoc); + }); subscriptionOff(); @@ -83,20 +95,6 @@ export const ChannelsProvider = (props: PropsWithChildren<{}>) => { .where('lastMessageTime', '>', SEVEN_DAYS_AGO_TIMESTAMP) .orderBy('lastMessageTime', 'desc') .onSnapshot(async (snapshot) => { - const channelPaths = snapshot?.docs.map((channelDoc) => { - return channelDoc.ref.path; - }); - - //TODO: Break this out into its own method for more readability - if (storeChannelPath && !channelPaths.includes(storeChannelPath)) { - //TODO: Normalize the teamChannelDoc and setChannelState - } - - //TODO: Break this out into its own method for more readability - if (teamChannelPath && !channelPaths.includes(teamChannelPath)) { - //TODO: Normalize the teamChannelDoc and setChannelState - } - setChannelState((previous) => ({ ...previous, ...normalizeChannelSnapshot( --- src/channels/provider.tsx @@ -61,19 +61,31 @@ export const ChannelsProvider = (props: PropsWithChildren<{}>) => { const [unreadTracking] = useState<boolean>(true); // Method to start snapshopt subscription to users channels changes - const subscriptionOn = useCallback(async () => { + const subscriptionOn = useCallback(() => { if (viewerId && siteId) { const channelsPath = createChannelsCollectionPath(siteId); const teamChannelPath = createTeamChannelPath(viewerTeamId, siteId); const storeChannelPath = createStoreChannelPath(siteId); - const storeChannelDoc = await firestore() + + firestore() .collection(storeChannelPath) .doc() - .get(); - const teamChannelDoc = await firestore() + .get() + .then((storeChannelDoc) => { + //TODO: Set the channelsState for store if not exists + console.log('The Store Channel Doc'); + console.log(storeChannelDoc); + }); + + firestore() .collection(teamChannelPath) .doc() - .get(); + .get() + .then((teamChannelDoc) => { + //TODO: Set the channelsState for team if not exists + console.log('The Team Channel Doc'); + console.log(teamChannelDoc); + }); subscriptionOff(); @@ -83,20 +95,6 @@ export const ChannelsProvider = (props: PropsWithChildren<{}>) => { .where('lastMessageTime', '>', SEVEN_DAYS_AGO_TIMESTAMP) .orderBy('lastMessageTime', 'desc') .onSnapshot(async (snapshot) => { - const channelPaths = snapshot?.docs.map((channelDoc) => { - return channelDoc.ref.path; - }); - - //TODO: Break this out into its own method for more readability - if (storeChannelPath && !channelPaths.includes(storeChannelPath)) { - //TODO: Normalize the teamChannelDoc and setChannelState - } - - //TODO: Break this out into its own method for more readability - if (teamChannelPath && !channelPaths.includes(teamChannelPath)) { - //TODO: Normalize the teamChannelDoc and setChannelState - } - setChannelState((previous) => ({ ...previous, ...normalizeChannelSnapshot(
add store and teams to channel state on initialization if not exists
add store and teams to channel state on initialization if not exists
15e2ddd31bf00f5c0983d95dabee49ac0d189b31
--- __tests__/screens/RosterScreenTest.tsx @@ -20,6 +20,7 @@ describe('RosterScreen', () => { screen.getByRole('button', {name: 'Message'}); }); it('should render the associate list', () => {}); + it('Sort order should be in order of clockedin team leads, clockedout teamleads, clockedinusers then the rest sorted alphabetically by name', () => {}); it('should render the weekly schedule header', () => {}); it('should not render roster or teams when associate is clocked out', () => {}); }); --- src/components/TeamList.tsx @@ -82,14 +82,14 @@ const TeamItem = (props: { teamId: string; canMessage?: boolean; style?: StyleProp<ViewStyle>; + userIsInRoster?: boolean; }) => { - const {teamId, canMessage = false, style} = props; + const {teamId, canMessage = false, style, userIsInRoster} = props; const {t} = useTranslation([TEXTING_I18N_NAMESPACE]); const navigation = useNavigation<NavigationProp<TextingNavParamsMap>>(); const {loading, teamData, teamRoster} = useGetRosterByTeam(teamId); const team = teamData?.getTeamById; - const userIsInRoster = useUserIsInRoster(); const startTeamText = useStartTeamText(); @@ -203,6 +203,7 @@ export const TeamChatCard = (props: {style?: StyleProp<ViewStyle>}) => { teamId={primaryTeam} canMessage={true} style={styles.firstItem} + userIsInRoster={userIsInRoster} /> {expanded && ( @@ -230,7 +231,11 @@ export const TeamChatCard = (props: {style?: StyleProp<ViewStyle>}) => { </ListItem> {teams.map((team) => ( - <TeamItem teamId={team.teamId!} canMessage={false} /> + <TeamItem + teamId={team.teamId!} + canMessage={false} + userIsInRoster={userIsInRoster} + /> ))} </> )} --- src/screens/RosterScreen.tsx @@ -60,18 +60,22 @@ export const RosterScreen: React.FC<RosterScreenProps> = () => { const [associates, setAssociates] = useState<Associate[]>([]); const teamLeads = useSelector(teamLeadJobDescriptions) as string[]; + const ASC_ORDER = 1; + const DESC_ORDER = -1; + const NO_SORT = 0; + const checkUserIsTeamLead = (associate: Associate) => teamLeads .map((CCMJobDescription) => CCMJobDescription.toLowerCase()) .includes(associate?.jobCategoryCodeDesc?.toLowerCase() as string) - ? 1 - : -1; + ? ASC_ORDER + : DESC_ORDER; const checkUserClockedIn = (associate: Associate) => - associate?.punch?.clockStatus === '1' ? 1 : -1; + associate?.punch?.clockStatus === '1' ? ASC_ORDER : DESC_ORDER; const sortByAssociateName = (associateA: Associate, associateB: Associate) => - associateA?.firstName?.localeCompare(associateB.firstName || '') || 0; + associateA?.firstName?.localeCompare(associateB.firstName || '') || NO_SORT; useEffect(() => { if (data?.getDailyRoster) { --- __tests__/screens/RosterScreenTest.tsx @@ -20,6 +20,7 @@ describe('RosterScreen', () => { screen.getByRole('button', {name: 'Message'}); }); it('should render the associate list', () => {}); + it('Sort order should be in order of clockedin team leads, clockedout teamleads, clockedinusers then the rest sorted alphabetically by name', () => {}); it('should render the weekly schedule header', () => {}); it('should not render roster or teams when associate is clocked out', () => {}); }); --- src/components/TeamList.tsx @@ -82,14 +82,14 @@ const TeamItem = (props: { teamId: string; canMessage?: boolean; style?: StyleProp<ViewStyle>; + userIsInRoster?: boolean; }) => { - const {teamId, canMessage = false, style} = props; + const {teamId, canMessage = false, style, userIsInRoster} = props; const {t} = useTranslation([TEXTING_I18N_NAMESPACE]); const navigation = useNavigation<NavigationProp<TextingNavParamsMap>>(); const {loading, teamData, teamRoster} = useGetRosterByTeam(teamId); const team = teamData?.getTeamById; - const userIsInRoster = useUserIsInRoster(); const startTeamText = useStartTeamText(); @@ -203,6 +203,7 @@ export const TeamChatCard = (props: {style?: StyleProp<ViewStyle>}) => { teamId={primaryTeam} canMessage={true} style={styles.firstItem} + userIsInRoster={userIsInRoster} /> {expanded && ( @@ -230,7 +231,11 @@ export const TeamChatCard = (props: {style?: StyleProp<ViewStyle>}) => { </ListItem> {teams.map((team) => ( - <TeamItem teamId={team.teamId!} canMessage={false} /> + <TeamItem + teamId={team.teamId!} + canMessage={false} + userIsInRoster={userIsInRoster} + /> ))} </> )} --- src/screens/RosterScreen.tsx @@ -60,18 +60,22 @@ export const RosterScreen: React.FC<RosterScreenProps> = () => { const [associates, setAssociates] = useState<Associate[]>([]); const teamLeads = useSelector(teamLeadJobDescriptions) as string[]; + const ASC_ORDER = 1; + const DESC_ORDER = -1; + const NO_SORT = 0; + const checkUserIsTeamLead = (associate: Associate) => teamLeads .map((CCMJobDescription) => CCMJobDescription.toLowerCase()) .includes(associate?.jobCategoryCodeDesc?.toLowerCase() as string) - ? 1 - : -1; + ? ASC_ORDER + : DESC_ORDER; const checkUserClockedIn = (associate: Associate) => - associate?.punch?.clockStatus === '1' ? 1 : -1; + associate?.punch?.clockStatus === '1' ? ASC_ORDER : DESC_ORDER; const sortByAssociateName = (associateA: Associate, associateB: Associate) => - associateA?.firstName?.localeCompare(associateB.firstName || '') || 0; + associateA?.firstName?.localeCompare(associateB.firstName || '') || NO_SORT; useEffect(() => { if (data?.getDailyRoster) {
update the sorting constant and write test skeleton
update the sorting constant and write test skeleton
7c3aafdaeaa883aaa1da74f735ba871b870199c9
--- packages/allspark-foundation/src/Notification/client.ts @@ -122,8 +122,8 @@ export class NotificationClient { /** * Adds a listener for a specific notification event type. * - * If any AllsparkFeature, notification listeners should be defiend when creating an AllsparkFeatureModule. Do not - * add them directly to the notification client + * If an `AllsparkFeature`, notification listeners should be defined when creating an `AllsparkFeatureModule`. + * **DO NOT** add them directly to the notification client */ public addListener( event: NotificationEventType, --- packages/allspark-foundation/src/Notification/types.ts @@ -49,6 +49,7 @@ export type NotificationEventListeners = { onBackgroundNotification: NotificationEventHandler; onContentAvailableNotification: NotificationEventHandler; onTappedNotificationAction: NotificationEventHandler; + onVoipNotification: NotificationEventHandler; }; export type NotificationEventType = keyof NotificationEventListeners; @@ -67,6 +68,7 @@ export const NOTIFICATION_EVENTS_TYPES: readonly (keyof NotificationEventListene 'onForegroundNotification', 'onContentAvailableNotification', 'onTappedNotificationAction', + 'onVoipNotification', ] as const; export type AllsparkNotificationConfig = { fcmConfigFile?: string };
fix: add voip event to notification listeners
fix: add voip event to notification listeners
c448030eb65be6626218c2abfdfd8073af03a994
--- .looper.multibranch.yml @@ -24,7 +24,7 @@ envs: ANDROID_BASE_PATH: targets/US/android branches: - - spec: feature/TimeClockDrop24 + - spec: feature/drop24 triggers: - manual: name: Publish Packages (Pre-Release) --- .solidarity @@ -12,7 +12,7 @@ { "rule": "cli", "binary": "npm", - "semver": "^10" + "semver": "^9" } ], "CocoaPods": [
Remove local changes
Remove local changes
48aeb31d30a38460cce62a246c6db5e0ee8f82a7
--- src/components/TeamChatCard.tsx @@ -85,7 +85,7 @@ export const TeamChatCard = (props: {style?: StyleProp<ViewStyle>}) => { </ButtonGroup> }> <Body weight='400' size='small'> - {primaryTeam.clockedInCount} Clocked in + {primaryTeam.membership.length} Clocked in </Body> </ListItem> {expanded && @@ -113,7 +113,7 @@ export const TeamChatCard = (props: {style?: StyleProp<ViewStyle>}) => { </ButtonGroup> }> <Body weight='400' size='small'> - {team.clockedInCount} Clocked in + {team.membership.length} Clocked in </Body> </ListItem> ))} --- src/components/TeamChatCard.tsx @@ -85,7 +85,7 @@ export const TeamChatCard = (props: {style?: StyleProp<ViewStyle>}) => { </ButtonGroup> }> <Body weight='400' size='small'> - {primaryTeam.clockedInCount} Clocked in + {primaryTeam.membership.length} Clocked in </Body> </ListItem> {expanded && @@ -113,7 +113,7 @@ export const TeamChatCard = (props: {style?: StyleProp<ViewStyle>}) => { </ButtonGroup> }> <Body weight='400' size='small'> - {team.clockedInCount} Clocked in + {team.membership.length} Clocked in </Body> </ListItem> ))}
faking clocked in count
faking clocked in count
f0a9dff614ed86f5cbad1f6783d67ec8f5e18d52
--- src/components/FilterChipGroup/FilterChipGroup.tsx @@ -31,24 +31,10 @@ export const FilterChipGroup = ({ const showShiftSwitcher = !isPrimaryTeam && !isSalariedOrLead && isSiteDC; const isShiftSwitcherEnabled = useSelector(shiftSwitcherEnabled); - // const handleFilterPress = useCallback( - // (filterId: FilterValue) => { - // handleFilter(filterId, externalSelectedShift?.shiftId); - // }, - // [handleFilter, externalSelectedShift?.shiftId] - // ); - const filteredFilterChips = isSalariedOrLead ? [...filterChips] : filterChips.filter((chip) => chip.id === FilterValue.clockedIn); - // const createFilterPressHandler = useCallback( - // (id: FilterValue) => { - // return () => handleFilter(id, externalSelectedShift?.shiftId); - // }, - // [handleFilter] - // ); - const renderedFilterChips = () => { return filteredFilterChips.map((chip: FilterChipProps) => ( <FilterChip
chore: clean up commented code
chore: clean up commented code
ebb0262d19a9ab1fb87a4bc85f740cb1985c3353
--- package.json @@ -65,7 +65,6 @@ "jest-sonar-reporter": "^2.0.0", "lerna": "~7.4.2", "madge": "^7.0.0", - "npm-run-all": "^4.1.5", "path": "^0.12.7", "prettier": "3.0.3", "react": "^18.2.0", --- yarn.lock @@ -8223,7 +8223,6 @@ __metadata: jest-sonar-reporter: "npm:^2.0.0" lerna: "npm:~7.4.2" madge: "npm:^7.0.0" - npm-run-all: "npm:^4.1.5" path: "npm:^0.12.7" prettier: "npm:3.0.3" react: "npm:^18.2.0" @@ -9426,7 +9425,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^2.4.1, chalk@npm:^2.4.2": +"chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" dependencies: @@ -10532,19 +10531,6 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^6.0.5": - version: 6.0.5 - resolution: "cross-spawn@npm:6.0.5" - dependencies: - nice-try: "npm:^1.0.4" - path-key: "npm:^2.0.1" - semver: "npm:^5.5.0" - shebang-command: "npm:^1.2.0" - which: "npm:^1.2.9" - checksum: 10c0/e05544722e9d7189b4292c66e42b7abeb21db0d07c91b785f4ae5fefceb1f89e626da2703744657b287e86dcd4af57b54567cef75159957ff7a8a761d9055012 - languageName: node - linkType: hard - "cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" @@ -17220,13 +17206,6 @@ __metadata: languageName: node linkType: hard -"memorystream@npm:^0.3.1": - version: 0.3.1 - resolution: "memorystream@npm:0.3.1" - checksum: 10c0/4bd164657711d9747ff5edb0508b2944414da3464b7fe21ac5c67cf35bba975c4b446a0124bd0f9a8be54cfc18faf92e92bd77563a20328b1ccf2ff04e9f39b9 - languageName: node - linkType: hard - "meow@npm:^8.0.0, meow@npm:^8.1.2": version: 8.1.2 resolution: "meow@npm:8.1.2" @@ -18837,13 +18816,6 @@ __metadata: languageName: node linkType: hard -"nice-try@npm:^1.0.4": - version: 1.0.5 - resolution: "nice-try@npm:1.0.5" - checksum: 10c0/95568c1b73e1d0d4069a3e3061a2102d854513d37bcfda73300015b7ba4868d3b27c198d1dbbd8ebdef4112fc2ed9e895d4a0f2e1cce0bd334f2a1346dc9205f - languageName: node - linkType: hard - "no-case@npm:^3.0.4": version: 3.0.4 resolution: "no-case@npm:3.0.4" @@ -19231,27 +19203,6 @@ __metadata: languageName: node linkType: hard -"npm-run-all@npm:^4.1.5": - version: 4.1.5 - resolution: "npm-run-all@npm:4.1.5" - dependencies: - ansi-styles: "npm:^3.2.1" - chalk: "npm:^2.4.1" - cross-spawn: "npm:^6.0.5" - memorystream: "npm:^0.3.1" - minimatch: "npm:^3.0.4" - pidtree: "npm:^0.3.0" - read-pkg: "npm:^3.0.0" - shell-quote: "npm:^1.6.1" - string.prototype.padend: "npm:^3.0.0" - bin: - npm-run-all: bin/npm-run-all/index.js - run-p: bin/run-p/index.js - run-s: bin/run-s/index.js - checksum: 10c0/736ee39bd35454d3efaa4a2e53eba6c523e2e17fba21a18edcce6b221f5cab62000bef16bb6ae8aff9e615831e6b0eb25ab51d52d60e6fa6f4ea880e4c6d31f4 - languageName: node - linkType: hard - "npm-run-path@npm:^4.0.1": version: 4.0.1 resolution: "npm-run-path@npm:4.0.1" @@ -20022,13 +19973,6 @@ __metadata: languageName: node linkType: hard -"path-key@npm:^2.0.1": - version: 2.0.1 - resolution: "path-key@npm:2.0.1" - checksum: 10c0/dd2044f029a8e58ac31d2bf34c34b93c3095c1481942960e84dd2faa95bbb71b9b762a106aead0646695330936414b31ca0bd862bf488a937ad17c8c5d73b32b - languageName: node - linkType: hard - "path-key@npm:^3.0.0, path-key@npm:^3.1.0": version: 3.1.1 resolution: "path-key@npm:3.1.1" @@ -20143,15 +20087,6 @@ __metadata: languageName: node linkType: hard -"pidtree@npm:^0.3.0": - version: 0.3.1 - resolution: "pidtree@npm:0.3.1" - bin: - pidtree: bin/pidtree.js - checksum: 10c0/cd69b0182f749f45ab48584e3442c48c5dc4512502c18d5b0147a33b042c41a4db4269b9ce2f7c48f11833ee5e79d81f5ebc6f7bf8372d4ea55726f60dc505a1 - languageName: node - linkType: hard - "pify@npm:5.0.0": version: 5.0.0 resolution: "pify@npm:5.0.0" @@ -22686,7 +22621,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.5.0, semver@npm:^5.6.0": +"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.6.0": version: 5.7.2 resolution: "semver@npm:5.7.2" bin: @@ -22907,15 +22842,6 @@ __metadata: languageName: node linkType: hard -"shebang-command@npm:^1.2.0": - version: 1.2.0 - resolution: "shebang-command@npm:1.2.0" - dependencies: - shebang-regex: "npm:^1.0.0" - checksum: 10c0/7b20dbf04112c456b7fc258622dafd566553184ac9b6938dd30b943b065b21dabd3776460df534cc02480db5e1b6aec44700d985153a3da46e7db7f9bd21326d - languageName: node - linkType: hard - "shebang-command@npm:^2.0.0": version: 2.0.0 resolution: "shebang-command@npm:2.0.0" @@ -22925,13 +22851,6 @@ __metadata: languageName: node linkType: hard -"shebang-regex@npm:^1.0.0": - version: 1.0.0 - resolution: "shebang-regex@npm:1.0.0" - checksum: 10c0/9abc45dee35f554ae9453098a13fdc2f1730e525a5eb33c51f096cc31f6f10a4b38074c1ebf354ae7bffa7229506083844008dfc3bb7818228568c0b2dc1fff2 - languageName: node - linkType: hard - "shebang-regex@npm:^3.0.0": version: 3.0.0 resolution: "shebang-regex@npm:3.0.0" @@ -23504,18 +23423,6 @@ __metadata: languageName: node linkType: hard -"string.prototype.padend@npm:^3.0.0": - version: 3.1.6 - resolution: "string.prototype.padend@npm:3.1.6" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/8f2c8c1f3db1efcdc210668c80c87f2cea1253d6029ff296a172b5e13edc9adebeed4942d023de8d31f9b13b69f3f5d73de7141959b1f09817fba5f527e83be1 - languageName: node - linkType: hard - "string.prototype.repeat@npm:^1.0.0": version: 1.0.0 resolution: "string.prototype.repeat@npm:1.0.0" @@ -25443,7 +25350,7 @@ __metadata: languageName: node linkType: hard -"which@npm:^1.2.9, which@npm:^1.3.1": +"which@npm:^1.3.1": version: 1.3.1 resolution: "which@npm:1.3.1" dependencies:
Update the PR changes
Update the PR changes
95cd600bf6d53d27100495877ac9ee8afd0af5a4
--- android/app/build.gradle @@ -153,8 +153,8 @@ android { applicationId "com.walmart.stores.allspark.beta" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 884 - versionName "1.7.1" + versionCode 885 + versionName "1.8.0" } splits { abi { --- ios/AllSpark/Info.plist @@ -19,7 +19,7 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>1.7.1</string> + <string>1.8.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleURLTypes</key> @@ -36,7 +36,7 @@ </dict> </array> <key>CFBundleVersion</key> - <string>884</string> + <string>885</string> <key>FirebaseAutomaticScreenReportingEnabled</key> <false /> <key>LSApplicationQueriesSchemes</key> --- package-lock.json @@ -1,6 +1,6 @@ { "name": "allspark-main", - "version": "1.7.1", + "version": "1.8.0", "lockfileVersion": 1, "requires": true, "dependencies": { --- package.json @@ -1,6 +1,6 @@ { "name": "allspark-main", - "version": "1.7.1", + "version": "1.8.0", "private": true, "scripts": { "firebase:dev": "cp ./ios/GoogleService-Info-Dev.plist ./ios/GoogleService-Info.plist && cp ./android/app/google-services-dev.json ./android/app/google-services.json",
version bump to 1.8.0
version bump to 1.8.0
df407301107788855c891e38c2dce6be5fff37a6
--- src/screens/TabsScreen.tsx @@ -31,7 +31,7 @@ export const TabsScreen: React.FC<TabsScreenProps> = () => { <> <UserHeader /> - <MainTab.Navigator tabBar={LivingDesignTabBar}> + <MainTab.Navigator tabBar={LivingDesignTabBar} screenOptions={{swipeEnabled: false}}> <MainTab.Screen name='Roster' options={{lazy: true}} --- src/screens/TabsScreen.tsx @@ -31,7 +31,7 @@ export const TabsScreen: React.FC<TabsScreenProps> = () => { <> <UserHeader /> - <MainTab.Navigator tabBar={LivingDesignTabBar}> + <MainTab.Navigator tabBar={LivingDesignTabBar} screenOptions={{swipeEnabled: false}}> <MainTab.Screen name='Roster' options={{lazy: true}}
disable screen swiping
disable screen swiping
90a6ccebcf7e895ed0300db61849e72bbad45dcd
--- package-lock.json @@ -3362,9 +3362,9 @@ "integrity": "sha512-vzirL8LmvVnJdyNGFtqfzf3Pth9kuwqnd0cxllT7Gw3Qil4+snxw6yrC9Iw49jIvUFqjGjfkkFbXPeSqOcCVzw==" }, "@walmart/ims-print-services-ui": { - "version": "0.0.28", - "resolved": "https://npme.walmart.com/@walmart/ims-print-services-ui/-/ims-print-services-ui-0.0.28.tgz", - "integrity": "sha512-qXu5ysIMvvfapxUFbrg643TSv9P3fDIuB8PkDUbxPSCynF3SyI3jOld34apoz+qKj8wFO6fhhcP6JMZE9Udo/A==" + "version": "0.0.30", + "resolved": "https://npme.walmart.com/@walmart/ims-print-services-ui/-/ims-print-services-ui-0.0.30.tgz", + "integrity": "sha512-MJmjSVMnUBuBWxcUbW+DECg4nKTOR3L56U6PciAo3fhzzir2PTRfvepFgEf4AUezHGE9iTfKYwM3Vumzsutuow==" }, "@walmart/inbox-mini-app": { "version": "0.0.101", @@ -3372,9 +3372,9 @@ "integrity": "sha512-vI/gW47x/JzLbLNGVKZiuMuMd6xEPoWD8dv/wDUM6vpNC9LlIVE1W4Hz0kSKW4GYcUsZDRSKPmbgW7H/GnreXA==" }, "@walmart/iteminfo-mini-app": { - "version": "0.1.200", - "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-0.1.200.tgz", - "integrity": "sha512-ptzxw+iisajDCmzJfp2ZVo6MJ84ONdX0ek7lOmcNDfkdUfYKe8lmD0dK6tCPC9smQAOYi1wWhCTj0Ir7WkcI3g==", + "version": "2.0.1", + "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-2.0.1.tgz", + "integrity": "sha512-LkCjBsNOwz/vbU7WWVkOuwvz2i2Jd+XxiEIPDlaqkM278GAcZYsXR92hDsuK/VtzBLVUu6J7C9d2UKWIKmCBiA==", "requires": { "react-native-chart-kit": "6.6.1" } --- package.json @@ -74,9 +74,9 @@ "@walmart/functional-components": "1.0.31", "@walmart/gtp-shared-components": "^1.2.0", "@walmart/impersonation-mini-app": "1.0.15", - "@walmart/ims-print-services-ui": "0.0.28", + "@walmart/ims-print-services-ui": "0.0.30", "@walmart/inbox-mini-app": "0.0.101", - "@walmart/iteminfo-mini-app": "1.0.22", + "@walmart/iteminfo-mini-app": "2.0.1", "@walmart/manager-approvals-miniapp": "0.0.42", "@walmart/metrics-mini-app": "0.4.10", "@walmart/moment-walmart": "1.0.4",
ItemInfoDrop4 latest changes
ItemInfoDrop4 latest changes
7a7212114bb8aeef59b1a55a095d0f7aec260e1f
--- package-lock.json @@ -72,7 +72,7 @@ "@walmart/pay-stub-miniapp": "0.15.2", "@walmart/payrollsolution_miniapp": "0.135.3", "@walmart/price-changes-mini-app": "1.10.2", - "@walmart/profile-feature-app": "1.138.1", + "@walmart/profile-feature-app": "1.138.2", "@walmart/react-native-encrypted-storage": "1.1.3", "@walmart/react-native-env": "0.2.0", "@walmart/react-native-logger": "1.34.8", @@ -8296,12 +8296,12 @@ } }, "node_modules/@walmart/allspark-http-client": { - "version": "2.4.19", - "resolved": "https://npme.walmart.com/@walmart/allspark-http-client/-/allspark-http-client-2.4.19.tgz", - "integrity": "sha512-HIAURPDWeJotV62Dixpco1Gu+ovaCdrOLJASQQCVA3NtD3M5rDQZ/Ojuz82tE7MND/4Hq7YiDoKJK66BsOz92Q==", + "version": "2.4.21", + "resolved": "https://npme.walmart.com/@walmart/allspark-http-client/-/allspark-http-client-2.4.21.tgz", + "integrity": "sha512-u0ejQnJRmMdUYt6JOR6sxz4Adoq7pqZWCGaVfaAsJ1rOTcN7bxEu6oZbqYw/KLpYXDr4qwAjG2HkjrkZJS+7aw==", "license": "ISC", "dependencies": { - "@walmart/allspark-utils": "^1.6.5", + "@walmart/allspark-utils": "^1.6.7", "axios": "~1.2.4" }, "peerDependencies": { @@ -9454,9 +9454,9 @@ } }, "node_modules/@walmart/profile-feature-app": { - "version": "1.138.1", - "resolved": "https://npme.walmart.com/@walmart/profile-feature-app/-/profile-feature-app-1.138.1.tgz", - "integrity": "sha512-4gqVyjiT9ok8BCOvUZ0H4YfQsm7fEZ5mMHUMyvzil/kjGxNCXZy4nYRKmZYZOBU58HiwPnOgqAi6Njr0pAwB8g==", + "version": "1.138.2", + "resolved": "https://npme.walmart.com/@walmart/profile-feature-app/-/profile-feature-app-1.138.2.tgz", + "integrity": "sha512-j0kVqlS1sEel2LOP9CHMNV31lykjdkZt9exsYHAA/9HtiHRma7CyzRIjg7LBJcruXKuyOGJqoNc1totGSDljMQ==", "hasInstallScript": true, "peerDependencies": { "@react-navigation/bottom-tabs": "^6.0.0", @@ -32942,15 +32942,15 @@ "requires": { "@apollo/client": "^3.7.3", "@lifeomic/axios-fetch": "3.0.1", - "@walmart/allspark-http-client": "^2.4.18", + "@walmart/allspark-http-client": "2.4.21", "crypto-js": "^3.3.0", "graphql": "^16.6.0" } }, "@walmart/allspark-http-client": { - "version": "2.4.19", - "resolved": "https://npme.walmart.com/@walmart/allspark-http-client/-/allspark-http-client-2.4.19.tgz", - "integrity": "sha512-HIAURPDWeJotV62Dixpco1Gu+ovaCdrOLJASQQCVA3NtD3M5rDQZ/Ojuz82tE7MND/4Hq7YiDoKJK66BsOz92Q==", + "version": "2.4.21", + "resolved": "https://npme.walmart.com/@walmart/allspark-http-client/-/allspark-http-client-2.4.21.tgz", + "integrity": "sha512-u0ejQnJRmMdUYt6JOR6sxz4Adoq7pqZWCGaVfaAsJ1rOTcN7bxEu6oZbqYw/KLpYXDr4qwAjG2HkjrkZJS+7aw==", "requires": { "@walmart/allspark-utils": "^1.6.6", "axios": "~1.2.6" @@ -33082,7 +33082,7 @@ "resolved": "https://npme.walmart.com/@walmart/core-services/-/core-services-2.3.2.tgz", "integrity": "sha512-rsp3fueuoa0Ii65iaxZy4UJRoeDuryB3gsA8h5py4+g1wyWGID9O/RXCTEI6ItS/W3eBvxr9/Y5nVkYLLPpGig==", "requires": { - "@walmart/allspark-http-client": "^2.4.18", + "@walmart/allspark-http-client": "2.4.21", "@walmart/allspark-utils": "^1.6.6", "reduxsauce": "^1.2.1", "reselect": "^4.1.5", @@ -33096,7 +33096,7 @@ "integrity": "sha512-wEiugTSexG9k7a2+uxXDOGmpgS1rvT2IOJtfYsooExjYYb7yypCg4dvVf0BZJy7fFokY7tPYB/N9e2v632oeFw==", "requires": { "@walmart/allspark-graphql-client": "^1.4.5", - "@walmart/allspark-http-client": "^2.4.18", + "@walmart/allspark-http-client": "2.4.21", "@walmart/allspark-utils": "^1.6.6", "@walmart/core-services": "~2.3.0", "@walmart/me-at-walmart-athena-queries": "^1.7.3", @@ -33155,7 +33155,7 @@ "@walmart/functional-components": { "version": "4.0.3", "requires": { - "@walmart/allspark-http-client": "^2.4.18" + "@walmart/allspark-http-client": "2.4.21" } }, "@walmart/gta-react-native-calendars": { @@ -33315,9 +33315,9 @@ "integrity": "sha512-NUnnrYrXo49QMyk8+VBzOoe8a31ERJmjGpKr3+TqEj8mSe9+Ys1G3muz++gWQ4a/j4/R1vglw2CNamYy8Pnz5A==" }, "@walmart/profile-feature-app": { - "version": "1.138.1", - "resolved": "https://npme.walmart.com/@walmart/profile-feature-app/-/profile-feature-app-1.138.1.tgz", - "integrity": "sha512-4gqVyjiT9ok8BCOvUZ0H4YfQsm7fEZ5mMHUMyvzil/kjGxNCXZy4nYRKmZYZOBU58HiwPnOgqAi6Njr0pAwB8g==" + "version": "1.138.2", + "resolved": "https://npme.walmart.com/@walmart/profile-feature-app/-/profile-feature-app-1.138.2.tgz", + "integrity": "sha512-j0kVqlS1sEel2LOP9CHMNV31lykjdkZt9exsYHAA/9HtiHRma7CyzRIjg7LBJcruXKuyOGJqoNc1totGSDljMQ==" }, "@walmart/react-native-encrypted-storage": { "version": "1.1.3" --- package.json @@ -113,7 +113,7 @@ "@walmart/pay-stub-miniapp": "0.15.2", "@walmart/payrollsolution_miniapp": "0.135.3", "@walmart/price-changes-mini-app": "1.10.2", - "@walmart/profile-feature-app": "1.138.1", + "@walmart/profile-feature-app": "1.138.2", "@walmart/react-native-encrypted-storage": "1.1.3", "@walmart/react-native-env": "0.2.0", "@walmart/react-native-logger": "1.34.8", @@ -241,7 +241,7 @@ "@react-native-community/datetimepicker": "$@react-native-community/datetimepicker", "@walmart/allspark-utils": "^1.6.6", "@walmart/allspark-graphql-client": "$@walmart/allspark-graphql-client", - "@walmart/allspark-http-client": "^2.4.18", + "@walmart/allspark-http-client": "2.4.21", "@walmart/core-services": "$@walmart/core-services", "@walmart/core-services-allspark": "$@walmart/core-services-allspark", "@walmart/core-utils": "$@walmart/core-utils", --- patches/@walmart+allspark-http-client+2.4.13.patch @@ -1,12 +0,0 @@ -diff --git a/node_modules/@walmart/allspark-http-client/lib/HttpClient.js b/node_modules/@walmart/allspark-http-client/lib/HttpClient.js -index 19000f5..635f2ff 100644 ---- a/node_modules/@walmart/allspark-http-client/lib/HttpClient.js -+++ b/node_modules/@walmart/allspark-http-client/lib/HttpClient.js -@@ -15,6 +15,7 @@ class HttpClient extends Axios { - const { id = 'default', timeout = TIMEOUT, interceptors = [], ...restConfig } = config; - this.id = id; - this.defaults.timeout = timeout; -+ this.defaults.withCredentials = false; - this.config = { ...restConfig, timeout, interceptors, id }; - //@TODO remove if condition in later drops. - // Manually adding content-type for POST req, for backward compatibility with older version of http client.
removed patch and updated profile version
removed patch and updated profile version
3a3f6e61b59380eaca3ea3e4555a4483ed28012c
--- example/src/teamHub/tempComponentForTesting/TeamSelectionList.tsx @@ -83,7 +83,7 @@ export const TeamSelectionList = ({ isLastListItem={index === areaTeamMap[myArea].length - 1} isSelected={true} isPrimaryTeam={team === primaryTeam} - checkboxDisabled + checkboxDisabled={team === primaryTeam} toggleSelection={() => handleSelectSingle(team)} /> ))} @@ -101,7 +101,6 @@ export const TeamSelectionList = ({ teamName={team} isLastListItem={index === areaTeams.length - 1} isSelected={selectedTeams.includes(team)} - checkboxDisabled toggleSelection={() => handleSelectSingle(team)} /> ))}
feat: fixed disabled checkbox state
feat: fixed disabled checkbox state
b6dd31dc998101abd365cfad82bee21fb913f491
--- package.json @@ -88,7 +88,7 @@ "@walmart/attendance-mini-app": "3.156.0", "@walmart/avp-feature-app": "0.16.8", "@walmart/avp-shared-library": "0.10.7", - "@walmart/backroom-mini-app": "1.9.0", + "@walmart/backroom-mini-app": "1.10.5", "@walmart/calling-mini-app": "0.7.34", "@walmart/checkout-mini-app": "4.8.0", "@walmart/compass-sdk-rn": "6.2.1", --- yarn.lock @@ -6493,14 +6493,16 @@ __metadata: languageName: node linkType: hard -"@walmart/backroom-mini-app@npm:1.9.0": - version: 1.9.0 - resolution: "@walmart/backroom-mini-app@npm:1.9.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fbackroom-mini-app%2F-%2Fbackroom-mini-app-1.9.0.tgz" +"@walmart/backroom-mini-app@npm:1.10.5": + version: 1.10.5 + resolution: "@walmart/backroom-mini-app@npm:1.10.5" peerDependencies: "@react-navigation/native": ^6.0.0 "@react-navigation/stack": ^6.1.0 + "@walmart/allspark-foundation": ">=6.19.1" "@walmart/gtp-shared-components": ">=1.8.0" "@walmart/ims-print-services-ui": ^2.14.0 + "@walmart/me-at-walmart-common": ">=6.24.0" "@walmart/react-native-scanner-3.0": ">=0.6.0" axios: ">=0.26.1" react: "*" @@ -6514,9 +6516,9 @@ __metadata: react-native-screens: ">=3.15.0" react-native-svg: ">=12.3.0" react-native-svg-transformer: ">=1.0.0" - react-redux: ^8.0.0 - redux: ^4.0.0 - checksum: 10c0/dc885f776fbd39baef40e43f4d7d2f2e9b5cb8ecb723cd4a5afb71a6e43aa70fd2c386a84d978deb13ec83d3e743e7e36cab7519fabdb1188a9c292e9e0be910 + react-redux: ">=8.0.0" + redux: ">=4.0.0" + checksum: 10c0/f2ddd4cd62bbcb0e873fe18c618f95b00888bf89cc7648e0bcd0a9540f34e15f4b7876971bb204c8b8bbb72127f0acb77a98beffe956078ef0e4fb0ba74b87d9 languageName: node linkType: hard @@ -7306,7 +7308,7 @@ __metadata: "@walmart/attendance-mini-app": "npm:3.156.0" "@walmart/avp-feature-app": "npm:0.16.8" "@walmart/avp-shared-library": "npm:0.10.7" - "@walmart/backroom-mini-app": "npm:1.9.0" + "@walmart/backroom-mini-app": "npm:1.10.5" "@walmart/calling-mini-app": "npm:0.7.34" "@walmart/checkout-mini-app": "npm:4.8.0" "@walmart/compass-sdk-rn": "npm:6.2.1"
feat: SVZPK-3679 Update @walmart/backroom-mini-app to 1.10.5 (#4101)
feat: SVZPK-3679 Update @walmart/backroom-mini-app to 1.10.5 (#4101) Co-authored-by: Pavan Lingamallu - p0l04ug <Pavan.Lingamallu@walmart.com> Co-authored-by: Savankumar Akbari - sakbari <sakbari@m-c02rv0v4g8wl.homeoffice.wal-mart.com>
a175a935ae996966c7b51486222e3edada0060b3
--- package-lock.json @@ -1,12 +1,12 @@ { "name": "@walmart/roster-mini-app", - "version": "1.0.6", + "version": "1.0.7", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@walmart/roster-mini-app", - "version": "1.0.6", + "version": "1.0.7", "hasInstallScript": true, "devDependencies": { "@babel/core": "^7.20.0", @@ -67,7 +67,7 @@ "@walmart/react-native-shared-navigation": "1.0.2", "@walmart/react-native-sumo-sdk": "2.6.0", "@walmart/ui-components": "1.15.1", - "@walmart/wmconnect-mini-app": "1.0.6", + "@walmart/wmconnect-mini-app": "1.0.7", "babel-jest": "^29.2.1", "chance": "^1.1.11", "eslint": "8.22.0", @@ -11853,9 +11853,9 @@ } }, "node_modules/@walmart/wmconnect-mini-app": { - "version": "1.0.6", - "resolved": "https://npme.walmart.com/@walmart/wmconnect-mini-app/-/wmconnect-mini-app-1.0.6.tgz", - "integrity": "sha512-1+LEnQr5HCI7BSDxUd75pCRDm8jG4/elNxrD4MzZEUt/bYo7m2g0Z3k4M4WGH/ARlt84clFZPWS9U7OEvoEm7w==", + "version": "1.0.7", + "resolved": "https://npme.walmart.com/@walmart/wmconnect-mini-app/-/wmconnect-mini-app-1.0.7.tgz", + "integrity": "sha512-Iq/4/bfx5mJryay8OWGriTi0XqNfwl/qjXF5LEq309XclvBNpMchWLXO4CiDPdnYehWnnvMEuHlY5SHdNHVsEw==", "dev": true, "hasInstallScript": true }, @@ -41071,9 +41071,9 @@ } }, "@walmart/wmconnect-mini-app": { - "version": "1.0.6", - "resolved": "https://npme.walmart.com/@walmart/wmconnect-mini-app/-/wmconnect-mini-app-1.0.6.tgz", - "integrity": "sha512-1+LEnQr5HCI7BSDxUd75pCRDm8jG4/elNxrD4MzZEUt/bYo7m2g0Z3k4M4WGH/ARlt84clFZPWS9U7OEvoEm7w==", + "version": "1.0.7", + "resolved": "https://npme.walmart.com/@walmart/wmconnect-mini-app/-/wmconnect-mini-app-1.0.7.tgz", + "integrity": "sha512-Iq/4/bfx5mJryay8OWGriTi0XqNfwl/qjXF5LEq309XclvBNpMchWLXO4CiDPdnYehWnnvMEuHlY5SHdNHVsEw==", "dev": true }, "@whatwg-node/events": { --- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/roster-mini-app", - "version": "1.0.6", + "version": "1.0.7", "private": false, "main": "dist/index.js", "files": [ @@ -90,7 +90,7 @@ "@walmart/react-native-shared-navigation": "1.0.2", "@walmart/react-native-sumo-sdk": "2.6.0", "@walmart/ui-components": "1.15.1", - "@walmart/wmconnect-mini-app": "1.0.6", + "@walmart/wmconnect-mini-app": "1.0.7", "babel-jest": "^29.2.1", "chance": "^1.1.11", "eslint": "8.22.0",
Update version
Update version
438f9578f6adf745623aa9ce4ad9b1ac665f7843
--- package-lock.json @@ -3159,9 +3159,9 @@ } }, "@walmart/push-to-talk-mini-app": { - "version": "0.3.29-rc.2", - "resolved": "https://npme.walmart.com/@walmart/push-to-talk-mini-app/-/push-to-talk-mini-app-0.3.29-rc.2.tgz", - "integrity": "sha512-cVHyvWYOsEDjXNjuMA+4tecTMNsGAahzzaLmYgGXN6cx//9J6fDqy7b4UC1BOJRqo3cVZmVqRbUAUiipN6+gkQ==" + "version": "0.3.29-rc.3", + "resolved": "https://npme.walmart.com/@walmart/push-to-talk-mini-app/-/push-to-talk-mini-app-0.3.29-rc.3.tgz", + "integrity": "sha512-2fHNeC6VS78QH07OIpF+r6SDIqZm72jSUNf6bKFvdMtTV8LDtnuOe9ya9OpbpPIuxXQhM6gZesUh4jxVVcUkDQ==" }, "@walmart/react-native-collapsible": { "version": "1.5.3", --- package.json @@ -70,7 +70,7 @@ "@walmart/impersonation-mini-app": "1.0.14", "@walmart/inbox-mini-app": "0.0.91", "@walmart/moment-walmart": "1.0.4", - "@walmart/push-to-talk-mini-app": "0.3.29-rc.2", + "@walmart/push-to-talk-mini-app": "0.3.29-rc.3", "@walmart/react-native-env": "^0.1.0", "@walmart/react-native-logger": "^1.25.0", "@walmart/react-native-shared-navigation": "^0.4.0",
Ptt bump (#457)
Ptt bump (#457) * PTT Version bump * PTT version bump * PTT versio bump * PTT version bump
7070fd03bfda216b36265640067b1798494e2eec
--- package.json @@ -8,7 +8,7 @@ "description": "", "private": true, "scripts": { - "build": "tsc -b --verbose packages", + "build": "tsc -b --verbose --force packages", "clean:tsbuildinfo": "rm -rf packages/*.tsbuildinfo || true", "clean": "yarn run clean:tsbuildinfo && yarn workspaces foreach --all --topological-dev run clean", "commit": "commit", --- packages/core-services/package.json @@ -2,16 +2,10 @@ "name": "@walmart/core-services", "version": "6.3.13", "description": "", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "directories": { - "lib": "lib" - }, - "files": [ - "lib" - ], + "main": "./index.js", + "types": "./index.d.ts", "scripts": { - "clean": "rm -rf lib *.tsbuildinfo || true", + "clean": "rm -rf AppConfig Auth Environment HttpClient LocalStorage Logger Network Notification Permissions Scanner StoreConfig Telemetry Translations User index.* || true", "build": "yarn run clean && tsc" }, "repository": { --- packages/core-services/tsconfig.json @@ -3,11 +3,12 @@ "compilerOptions": { "composite": true, "rootDir": "src", - "outDir": "lib" + "outDir": "./" }, "include": [ - "./**/*.ts", - "./**/*.tsx" + "src/**/*.ts", + "src/**/*.tsx", + "src/**/*.json", ], "exclude": [ "node_modules/*",
adjust outDir for core-service project
adjust outDir for core-service project
bebefc08509c1243ad740f726cac7f684b100c85
--- 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/shelfavailability-mini-app": "0.3.56", + "@walmart/shelfavailability-mini-app": "0.3.57", "@walmart/allspark-health-survey-mini-app": "0.0.41", "@walmart/allspark-home-mini-app": "0.4.0", "@walmart/allspark-me-mini-app": "0.1.0",
0.3.57 dev build
0.3.57 dev build
672cc48347e09e1de07b65ede0da7d3c311699ea
--- __tests__/startup/StartupSagaTest.ts @@ -119,21 +119,13 @@ describe('startupFlow', () => { describe('captureMissedMiniAppEvents', () => { it('calls expected actions', () => { - const signInAction = { - type: SIGN_IN_SUCCESS, - payload: {userId: 'swalton3'}, - }; const networkType = 'Internal'; const loadMiniAppsAction = {type: 'LOAD_MINI_APPS'}; const user = {}; const iterator = captureMissedMiniAppEvents(); - expect(iterator.next().value).toEqual( - take([SIGN_IN_SUCCESS, START_IMPERSONATION]), - ); - expect(iterator.next(signInAction).value).toEqual( - take(StartupTypes.LOAD_MINI_APPS), - ); + + expect(iterator.next().value).toEqual(take(StartupTypes.LOAD_MINI_APPS)); expect(iterator.next(loadMiniAppsAction).value).toEqual( select(WMNetworkSelectors.getNetworkType), ); --- src/startup/StartupSaga.ts @@ -51,9 +51,6 @@ import {initSso, promptForSiteId} from './SsoSagas'; import {StartupTypes} from './StartupRedux'; export function* captureMissedMiniAppEvents(): any { - // Capture early actions mini apps need. - yield take([SIGN_IN_SUCCESS, START_IMPERSONATION]); - // Wait for mini app load yield take(StartupTypes.LOAD_MINI_APPS);
remove unneeded take statement
remove unneeded take statement
0679e973db6e5d2d12f5b5ed4632b461800f8b34
--- packages/my-walmart-hub/__tests__/HubFramework/HubError.test.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { render, fireEvent } from '@testing-library/react-native'; +import { render, fireEvent, waitFor } from '@testing-library/react-native'; import { HubThemeContext } from '@walmart/my-walmart-hub/src/HubFramework/Utils/theme'; import { DefaultErrorComponent } from '@walmart/my-walmart-hub/src/HubFramework/StateComponents/HubError'; @@ -189,7 +189,7 @@ describe('DefaultErrorComponent', () => { ); }); - it('Test 6: logs error when component mounts', () => { + it('Test 6: logs error when component mounts', async () => { render( <ThemeProvider> <DefaultErrorComponent @@ -202,8 +202,12 @@ describe('DefaultErrorComponent', () => { </ThemeProvider> ); - expect(mockLogger.error).toHaveBeenCalled(); - expect(mockTelemetry.logEvent).toHaveBeenCalled(); + await waitFor(() => { + expect(mockLogger.error).toHaveBeenCalled(); + }); + await waitFor(() => { + expect(mockTelemetry.logEvent).toHaveBeenCalled(); + }); }); it('Test 7: uses custom retry button text when provided', () => { --- packages/my-walmart-hub/__tests__/TeamSwitcher/Components/__snapshots__/AllTeamsLoader.test.tsx.snap @@ -4,7 +4,10 @@ exports[`AllTeamsLoading renders with proper structure 1`] = ` <View style={ { + "alignSelf": "stretch", "flex": 1, + "minWidth": "100%", + "width": "100%", } } testID="view-all-teams-skeleton" --- packages/my-walmart-hub/src/HubFramework/Core/Hub.tsx @@ -108,6 +108,10 @@ import { HubProvider, useHubContext } from './HubProvider'; import { HubErrorBoundary } from '../StateComponents/HubErrorBoundary'; import { usePerformanceTracking } from '../Optimization/ComponentOptimizations'; +// Default fallback values to prevent new references on every render +const EMPTY_WIDGET_CONFIG: any[] = []; +const NOOP_REORDER_HANDLER = () => {}; + // Temporary local styles to avoid import conflicts const styles = StyleSheet.create({ container: { @@ -145,9 +149,6 @@ const styles = StyleSheet.create({ backgroundColor: 'white', borderRadius: 4, }, - layoutContentContainer: { - gap: 8, // Add default spacing between widgets - }, }); /** @@ -175,6 +176,9 @@ const HubContentState = React.memo((props: HubContentStateProps) => { handleRefresh, } = useHubContext(); + // Get FAB bottom offset from config, defaulting to 0 if not provided + const fabBottomOffset = config.layoutOptions?.fabBottomOffset || 0; + // Performance tracking for the content state component usePerformanceTracking('HubContentState'); @@ -232,6 +236,28 @@ const HubContentState = React.memo((props: HubContentStateProps) => { ); }, [data]); + // Merge layout props with container props + const customLayoutWrapperProps = { ...containerComponentProps, ...props }; + const standardLayoutProps = { ...containerComponentProps, ...props }; + + // Separate gap styles from other content container styles + // Layout.tsx extracts gap from the style prop, so we pass it there + const baseContentStyle = StyleSheet.flatten(config.layoutOptions?.contentContainerStyle); + const { gap, rowGap, columnGap, ...restContentStyle } = baseContentStyle || {}; + + // Build flatListStyle with gap values, defaulting to gap: 8 if nothing is specified + const flatListStyle: any = {}; + if (gap !== undefined) flatListStyle.gap = gap; + else if (rowGap === undefined && columnGap === undefined) flatListStyle.gap = 8; + + if (rowGap !== undefined) flatListStyle.rowGap = rowGap; + if (columnGap !== undefined) flatListStyle.columnGap = columnGap; + + const flatListContentStyle = { + ...restContentStyle, + paddingBottom: fabBottomOffset, + }; + return ( <View testID='hub-container' style={styles.container}> {/* Custom header if provided */} @@ -244,15 +270,13 @@ const HubContentState = React.memo((props: HubContentStateProps) => { <props.CustomLayoutWrapper ComponentContainer={ComponentContainer} layout={data} - configs={props.widgetConfig || []} - onReorder={props.onReorder || (() => {})} + configs={props.widgetConfig || EMPTY_WIDGET_CONFIG} + onReorder={props.onReorder || NOOP_REORDER_HANDLER} onDragStateChange={props.setIsDragging} isDraggable={props.isDraggable !== false} - props={{ ...containerComponentProps, ...props }} - contentContainerStyle={[ - styles.layoutContentContainer, - config.layoutOptions?.contentContainerStyle, - ]} + props={customLayoutWrapperProps} + style={flatListStyle} + contentContainerStyle={flatListContentStyle} refreshControl={props.refreshControl} onRefresh={props.onRefresh || handleRefresh} refreshing={props.refreshing || isRefreshing} @@ -261,7 +285,8 @@ const HubContentState = React.memo((props: HubContentStateProps) => { /* Standard ComponentContainer.Layout for simple Hub */ <ComponentContainer.Layout layout={data} - props={{ ...containerComponentProps, ...props }} + props={standardLayoutProps} + style={flatListStyle} refreshControl={ props.refreshControl || ( <RefreshControl @@ -271,10 +296,7 @@ const HubContentState = React.memo((props: HubContentStateProps) => { /> ) } - contentContainerStyle={[ - styles.layoutContentContainer, - config.layoutOptions?.contentContainerStyle, - ]} + contentContainerStyle={flatListContentStyle} /> )} --- packages/my-walmart-hub/src/HubFramework/Core/types.ts @@ -366,6 +366,8 @@ export interface HubConfig { /** Options for layout customization */ layoutOptions?: { contentContainerStyle?: StyleProp<ViewStyle>; + /** Bottom padding offset for FAB buttons or other floating UI elements */ + fabBottomOffset?: number; }; /** --- packages/my-walmart-hub/src/HubFramework/StateComponents/HubError/index.tsx @@ -187,7 +187,7 @@ const DefaultErrorComponentInner: React.FC<ErrorComponentProps> = ({ } }; - // When component mounts, log the error + // Log error when component mounts React.useEffect(() => { // Log the error for debugging and analytics logger.error('HubError', { --- packages/my-walmart-hub/src/TeamSwitcher/Components/Loaders/AllTeamsLoading.tsx @@ -96,6 +96,9 @@ export const AllTeamsLoading = ({ const styles = StyleSheet.create({ container: { flex: 1, + width: '100%', + minWidth: '100%', + alignSelf: 'stretch', }, sectionHeader: { paddingVertical: 20, --- packages/my-walmart-hub/src/TeamSwitcher/Components/ModalWrapper/style.ts @@ -35,6 +35,9 @@ export const styles = StyleSheet.create({ paddingHorizontal: 8, borderTopRightRadius: 30, borderTopLeftRadius: 30, + width: '100%', + minWidth: '100%', + alignSelf: 'stretch', }, footer: { display: 'flex',
feat(ui): update hub for fab (#541)
feat(ui): update hub for fab (#541) * feat(ui): update hub for fab and performance * feat(ui): update hub for fab button bottom sheet * feat(ui): update tests * feat(ui): update style for update modal * feat(ui): update snapshot * feat(ui): address review comments * feat(ui): address review comments * feat(ui): address review comments * feat(ui): update hub style --------- Co-authored-by: p0d02sx <prasansuresh.dhresh@walmart.com> Co-authored-by: Dylan Lane - rlane1 <Russell.Lane@walmart.com>
23511c2fbd2cf7d2eac5785df2d15d5d9b3c2aea
--- packages/me-at-walmart-container/src/services/telemetry.ts @@ -41,7 +41,7 @@ export class TelemetryClient { }; // Firebase event names cannot exceed 40 characters - if (event.length > MAX_EVENT_LENGTH) { + if (fullEvent.length > MAX_EVENT_LENGTH) { // Throw error in dev mode, otherwise truncate the event name if (__DEV__) { throw new Error(
fix: update if condition for event length
fix: update if condition for event length
c87efe53fd24d5d25bba4f142d82d00fb7876ef7
--- package-lock.json @@ -3489,9 +3489,9 @@ "integrity": "sha512-YkJeKZP5HuqzZF6y4H/mnktOuWzMhDUFYOkjItGfuesYSZaigcZYOklu6Ut5FFwWgy7xiS+FzvMW7IUZkxKlOw==" }, "@walmart/react-native-logger": { - "version": "1.27.0", - "resolved": "https://npme.walmart.com/@walmart/react-native-logger/-/react-native-logger-1.27.0.tgz", - "integrity": "sha512-h5rf67lF/YyeETUNWpIXEGHCDsBo7qPwGyNlriVkFUOQfAIM99fWeftQZorgI1b4oqBx8CPuAyx8yaNjEM9kOg==" + "version": "1.28.0", + "resolved": "https://npme.walmart.com/@walmart/react-native-logger/-/react-native-logger-1.28.0.tgz", + "integrity": "sha512-OZYIi/Ub/cO7Qsy1/NeH9Q7z6fPzwcxUGUBRAuwFPJN2ZwVFHCAt5+593ftFjBDhR92Ocg2QgQ5vok4cQvQbhA==" }, "@walmart/react-native-shared-navigation": { "version": "0.4.0", --- package.json @@ -90,7 +90,7 @@ "@walmart/moment-walmart": "1.0.4", "@walmart/push-to-talk-mini-app": "0.5.39", "@walmart/react-native-env": "^0.2.0", - "@walmart/react-native-logger": "^1.27.0", + "@walmart/react-native-logger": "^1.28.0", "@walmart/react-native-shared-navigation": "^0.4.0", "@walmart/react-native-sumo-sdk": "2.1.0-alpha.3", "@walmart/redux-store": "^1.0.15",
update logger with fixes for android
update logger with fixes for android
e81ddb76410c4f39b754cf73f6de5ab6e60d6ecc
--- packages/allspark-foundation/__tests__/Navigation/client.test.tsx @@ -480,7 +480,7 @@ describe('NavigationClient', () => { .spyOn(ModalState, 'getState') .mockReturnValue({ stack: [] }); navigationClient = new NavigationClient(); - (navigationClient as any)._modalState.initialized = true; + (navigationClient as any)._modalInitialized = true; (navigationClient as any)._updateModalState(); expect(mockGetState).toHaveBeenCalled(); expect(mockSetState).toHaveBeenCalledWith(expect.any(Function)); --- packages/allspark-foundation/src/Navigation/client.tsx @@ -53,6 +53,8 @@ export class NavigationClient< private _isReady = false; private _currentRouteName = ''; private _previousRouteName = ''; + private _disabled = false; + private _disableReason = ''; private _config = {} as AllsparkNavigationConfig; private _navigationResolverMap: NavigationResolverMap = {}; private _queueManager = new QueueManager<QueueTypes<S>>([ @@ -84,18 +86,14 @@ export class NavigationClient< DefaultModalOptions ); private _modalSubscription: ModalStateSubscription<M>; - private _modalState = { - initialized: false, - enabled: true, - disableReason: '', - }; + private _modalInitialized = false; constructor() { // Subscribe to modalfy state changes to capture initialization of modal state // from modalfy provider. Only then we can update the modal state or else it could be overwritten. this._modalSubscription = ModalState.subscribe(() => { this._modalSubscription.unsubscribe(); - this._modalState.initialized = true; + this._modalInitialized = true; this._queueManager.flush('updateModalState', this._updateModalState); }); } @@ -143,7 +141,7 @@ export class NavigationClient< * addModal or configure */ private _updateModalState = () => { - if (!this._modalState.initialized) { + if (!this._modalInitialized) { this._queueManager.enqueue('updateModalState', undefined); } else { ModalState.setState<M>(() => ({ @@ -362,13 +360,24 @@ export class NavigationClient< * @see https://reactnavigation.org/docs/navigation-container/#navigate */ public navigate = <K extends keyof S>(name: K, params?: S[K]) => { - if (this._isReady && this._ref) { - this._ref.current?.navigate( - ...this._buildNavigateParams(name.toString(), params) - ); - } else { + // Enqueue the navigate call if the client is not ready + if (!this._isReady || !this._ref) { this._queueManager.enqueue('navigate', { name: name.toString(), params }); + return; + } + + // Log warning if the client is disabled + if (this._disabled) { + console.warn( + `Allspark Navigation is currently disabled. Reason: ${this._disableReason}` + ); + return; } + + // Call navigate on the navigation container ref + this._ref.current?.navigate( + ...this._buildNavigateParams(name.toString(), params) + ); }; /** @@ -376,11 +385,22 @@ export class NavigationClient< * @see https://reactnavigation.org/docs/navigation-container/#goback */ public goBack = () => { - if (this._isReady && this._ref) { - this._ref.current?.goBack(); - } else { + // Log warning if client is not ready + if (!this._isReady || !this._ref) { console.warn('goBack called on Allspark Root Navigation before ready'); + return; } + + // Log warning if the client is disabled + if (this._disabled) { + console.warn( + `Allspark Navigation is currently disabled. Reason: ${this._disableReason}` + ); + return; + } + + // Call goBack on the navigation container ref + this._ref.current?.goBack(); }; /** @@ -397,19 +417,32 @@ export class NavigationClient< * ); */ public dispatch = (action: NavigationAction) => { - if (this._isReady && this._ref) { - if ((action as CommonActions.Action).type === 'NAVIGATE') { - const { name, params } = action.payload || ({} as any); - - this._ref.current?.dispatch( - CommonActions.navigate(...this._buildNavigateParams(name, params)) - ); - } else { - this._ref.current?.dispatch(action); - } - } else { + // Enqueue the dispatch action if the client is not ready + if (!this._isReady || !this._ref) { this._queueManager.enqueue('dispatch', action); + return; } + + // Log warning if the client is disabled + if (this._disabled) { + console.warn( + `Allspark Navigation is currently disabled. Reason: ${this._disableReason}` + ); + return; + } + + // If the action is a navigate action, build the navigation params based on client resolver config + if ((action as CommonActions.Action).type === 'NAVIGATE') { + const { name, params } = action.payload || ({} as any); + + this._ref.current?.dispatch( + CommonActions.navigate(...this._buildNavigateParams(name, params)) + ); + return; + } + + // Call dispatch on the navigation container ref + this._ref.current?.dispatch(action); }; /** @@ -490,11 +523,22 @@ export class NavigationClient< * }); */ public reset = (state: NavigationState<S>) => { - if (this._isReady && this._ref) { - this._ref.current?.reset(state); - } else { + // Enqueue the reset action if the client is not ready + if (!this._isReady || !this._ref) { this._queueManager.enqueue('reset', state); + return; } + + // Log warning if the client is disabled + if (this._disabled) { + console.warn( + `Allspark Navigation is currently disabled. Reason: ${this._disableReason}` + ); + return; + } + + // Call reset on the navigation container ref + this._ref.current?.reset(state); }; /** @@ -514,6 +558,23 @@ export class NavigationClient< return this._eventManager.addListener('screenChange', handler); }; + /** + * Enables navigation. If already enabled, this does nothing. + */ + public enable = () => { + this._disabled = false; + }; + + /** + * Disables navigation. All methods on the AllsparkNavigationClient that navigate or open modals will be disabled. + * Call `AllsparkNavigationClient.enable()` to re-enable navigation. + * @param reason - Reason for disabling navigation. + */ + public disable = (reason: string = '') => { + this._disabled = true; + this._disableReason = reason; + }; + // --- Modals --- // /** @@ -556,13 +617,16 @@ export class NavigationClient< params?: M[K], callback?: () => void ) => { - if (this._modalState.enabled) { - this._modalfy.openModal(modalName, params, callback); - } else { + // Log warning if the client is disabled + if (this._disabled) { console.warn( - `Allspark Modals are currently disabled. Reason: ${this._modalState.disableReason}` + `Allspark Navigation is currently disabled. Reason: ${this._disableReason}` ); + return; } + + // Call openModal on the modalfy instance + this._modalfy.openModal(modalName, params, callback); }; /** @@ -597,15 +661,6 @@ export class NavigationClient< this._modalfy.closeAllModals(callback); }; - public enableModals = () => { - this._modalState.enabled = true; - }; - - public disableModals = (reason: string = '') => { - this._modalState.enabled = false; - this._modalState.disableReason = reason; - }; - /** * Creates StackNavigator connected to AllsparkNavigationClient. */
feat: add enable and disable methods to navigation client
feat: add enable and disable methods to navigation client
93505947f1a52a11a21771a2516fc021ebd13999
--- ios/Podfile @@ -3,8 +3,8 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ platform :ios, '12.0' -source 'https://gecgithub01.walmart.com/Store-Mobility-Services/CocoaPodsSpecs.git' -source 'https://gecgithub01.walmart.com/store-systems-associate-tech-platform/cocoapods-specs.git' +# source 'https://gecgithub01.walmart.com/Store-Mobility-Services/CocoaPodsSpecs.git' +source 'git@gecgithub01.walmart.com:store-systems-associate-tech-platform/cocoapods-specs.git' source 'https://github.com/CocoaPods/Specs.git' use_frameworks! :linkage => :static
updated podfile to point to ssh source of SSO
updated podfile to point to ssh source of SSO
0ef86f9cc271113ffe6964f798dc6cdadb2e79fe
--- __tests__/navigation/AssociateHallwayNav/__snapshots__/MainStackNavTest.tsx.snap @@ -137,24 +137,6 @@ exports[`AssociateHallwayNav matches snapshot 1`] = ` } } /> - <Screen - component="ItemInfoMiniApp" - name="itemInfo" - options={ - Object { - "headerShown": false, - } - } - /> - <Screen - component="ShelfAvailabilityMiniApp" - name="shelfAvailability" - options={ - Object { - "headerShown": false, - } - } - /> <Screen component="HealthSurveyMiniApp" name="HealthSurveyNav" @@ -232,6 +214,15 @@ exports[`AssociateHallwayNav matches snapshot 1`] = ` } } /> + <Screen + component="GuardedShelfAvailabilityMiniApp" + name="shelfAvailability" + options={ + Object { + "headerShown": false, + } + } + /> </Navigator> <NotificationsContainer /> </ActivityMonitor> @@ -374,24 +365,6 @@ exports[`AssociateHallwayNav matches snapshot when time value are undefined 1`] } } /> - <Screen - component="ItemInfoMiniApp" - name="itemInfo" - options={ - Object { - "headerShown": false, - } - } - /> - <Screen - component="ShelfAvailabilityMiniApp" - name="shelfAvailability" - options={ - Object { - "headerShown": false, - } - } - /> <Screen component="HealthSurveyMiniApp" name="HealthSurveyNav" @@ -470,14 +443,14 @@ exports[`AssociateHallwayNav matches snapshot when time value are undefined 1`] } /> <Screen - component="GuardedShelfAvailabilityMiniApp" - name="shelfAvailability" - options={ - Object { - "headerShown": false, - } - } - /> + component="GuardedShelfAvailabilityMiniApp" + name="shelfAvailability" + options={ + Object { + "headerShown": false, + } + } + /> </Navigator> <NotificationsContainer /> </ActivityMonitor> --- src/navigation/AssociateHallwayNav/MainTabsNav.tsx @@ -1,5 +1,3 @@ -import {DrawerButton} from "@walmart/ui-components/components/DrawerButton"; - __DEV__ && console.log('loading main tabs nav'); import React from 'react'; import {StyleSheet} from 'react-native'; @@ -11,12 +9,14 @@ import { import i18next from 'i18next'; import {useTranslation} from 'react-i18next'; import {getFocusedRouteNameFromRoute} from '@react-navigation/native'; +import DrawerHeader from '@react-navigation/drawer/src/views/Header'; import {HomeMiniApp} from '@walmart/allspark-home-mini-app'; import {MeMiniApp} from '@walmart/allspark-me-mini-app'; import InboxMiniApp, {useBadgesCount} from '@walmart/inbox-mini-app'; import {PushToTalkMiniApp, Hooks} from '@walmart/push-to-talk-mini-app'; - +import {BottomTabs, DrawerButton} from '@walmart/ui-components'; +import {MainHeader} from './Components'; interface Tab { title: string; @@ -60,7 +60,6 @@ export const TabsHeader = (props: any) => ( <MainHeader {...props} originalHeaderType={DrawerHeader} /> ); -// eslint-disable-next-line react/jsx-no-undef export const TabsHeaderLeft = () => <DrawerButton style={styles.menuButton} />; export const getTabsScreenOptions = ({route}: any) => ({
Reverted MainTabNav
Reverted MainTabNav
a37a5365b531bf9af8401674e600d807dd458868
--- core/__tests__/scanner/useScannerSdkTypeTest.ts @@ -13,33 +13,25 @@ jest.mock('@walmart/react-native-scanner-3.0', () => ({ })); describe('useScannerSdkType', () => { - const mockFeatureId = MINI_APPS.ITEM_INFO; - const mockNonMappedFeatureId = 'nonMappedFeature'; + const mockFeatureId = 'home'; beforeEach(() => { jest.clearAllMocks(); }); - it('should not call enableConstellationSDK if featureId is not in ScannerMapper', () => { - useSelector.mockReturnValue(null); - - renderHook(() => useScannerSdkType(mockNonMappedFeatureId)); - - expect(enableConstellationSDK).not.toHaveBeenCalled(); - }); - - it('should use default scanner type "scandit" if no config data is available and featureId is in ScannerMapper', () => { + it('should use default scanner type "scandit" if no config data is available', () => { useSelector.mockReturnValue(null); renderHook(() => useScannerSdkType(mockFeatureId)); + // Default scanner type is "scandit", so enableConstellationSDK should be called with "false" expect(enableConstellationSDK).toHaveBeenCalledWith(false); }); - it('should use scanner type from config based on featureId when featureId is in ScannerMapper', () => { + it('should use scanner type from config based on featureId', () => { const mockConfigData = { scanner: { - [MINI_APPS.ITEM_INFO]: 'constellation', + home: 'constellation', default: 'scandit', }, }; @@ -48,10 +40,11 @@ describe('useScannerSdkType', () => { renderHook(() => useScannerSdkType(mockFeatureId)); + // Config specifies "constellation" for "home", so enableConstellationSDK should be called with "true" expect(enableConstellationSDK).toHaveBeenCalledWith(true); }); - it('should fallback to default scanner type if featureId is not found in config and is in ScannerMapper', () => { + it('should fallback to default scanner type if featureId is not found in config', () => { const mockConfigData = { scanner: { default: 'scandit', @@ -62,13 +55,14 @@ describe('useScannerSdkType', () => { renderHook(() => useScannerSdkType(mockFeatureId)); + // Default type is "scandit", so enableConstellationSDK should be called with "false" expect(enableConstellationSDK).toHaveBeenCalledWith(false); }); - it('should handle case sensitivity and enableConstellationSDK correctly', () => { + it('should handle case sensitivity and call enableConstellationSDK correctly', () => { const mockConfigData = { scanner: { - [MINI_APPS.ITEM_INFO]: 'CONSTELLATION', + home: 'CONSTELLATION', }, }; @@ -76,6 +70,20 @@ describe('useScannerSdkType', () => { renderHook(() => useScannerSdkType(mockFeatureId)); + // Should handle case-insensitive comparison and call enableConstellationSDK with "true" expect(enableConstellationSDK).toHaveBeenCalledWith(true); }); + + it('should handle missing featureId in scanner config gracefully', () => { + const mockConfigData = { + scanner: {}, + }; + + useSelector.mockReturnValue(mockConfigData); + + renderHook(() => useScannerSdkType(mockFeatureId)); + + // With no matching featureId, it should use the default "scandit" + expect(enableConstellationSDK).toHaveBeenCalledWith(false); + }); }); --- core/src/scanner/useScannerSdkType.tsx @@ -2,13 +2,10 @@ import {ConfigData, ConfigSelectors} from '@walmart/allspark-foundation'; import {useSelector} from 'react-redux'; import {enableConstellationSDK} from '@walmart/react-native-scanner-3.0'; -import {MINI_APPS} from '../oneClick/MiniApps'; const CONSTELLATION = 'constellation'; const SCANDIT = 'scandit'; -const ScannerMapper: string[] = [MINI_APPS.ITEM_INFO]; - const getScannerType = (currentRouteName: string, config: any) => { return config[currentRouteName] ?? config?.default; }; @@ -16,14 +13,12 @@ const getScannerType = (currentRouteName: string, config: any) => { export const useScannerSdkType = (featureId: string) => { const appConfigData: ConfigData | null = useSelector(ConfigSelectors.getData); - if (ScannerMapper.includes(featureId)) { - let scannerType = SCANDIT; - const scannerConfig = appConfigData?.scanner; - - if (scannerConfig) { - scannerType = getScannerType(featureId, scannerConfig); - } + let scannerType = SCANDIT; + const scannerConfig = appConfigData?.scanner; - enableConstellationSDK(scannerType?.toLowerCase() === CONSTELLATION); + if (scannerConfig) { + scannerType = getScannerType(featureId, scannerConfig); } + + enableConstellationSDK(scannerType?.toLowerCase() === CONSTELLATION); };
remove scanner list check
remove scanner list check
31007c1862ba78741b53f7ea70086f978670eee1
--- src/index.tsx @@ -52,6 +52,8 @@ export const initialize = async () => { initNotificationListeners(); }; +export const initTextingPushNotificationListeners = initNotificationListeners; + export const TextingMiniApp = () => { const envConfig = useEnvironment(); const [textingState, dispatch]: [ --- src/index.tsx @@ -52,6 +52,8 @@ export const initialize = async () => { initNotificationListeners(); }; +export const initTextingPushNotificationListeners = initNotificationListeners; + export const TextingMiniApp = () => { const envConfig = useEnvironment(); const [textingState, dispatch]: [
exposing push notification init method
exposing push notification init method
b4477f6df08816fd049ef445d6b4ec68c0aaf2c5
--- src/channels/provider.tsx @@ -135,12 +135,20 @@ export const ChannelsProvider = (props: PropsWithChildren<{}>) => { .orderBy('lastMessageTime', 'desc') .onSnapshot(async (snapshot) => { //TODO: The update based on the snapshot may be clobbering the results from initialization. Ensure previous channels state is injected during normalization + + const normalizedSnapshot = normalizeChannelSnapshot( + snapshot as ChannelQuerySnapshot, + viewerId, + ); + setChannelState((previous) => ({ ...previous, - ...normalizeChannelSnapshot( - snapshot as ChannelQuerySnapshot, - viewerId, - ), + ids: [...previous.ids, ...normalizedSnapshot?.ids], + dataById: {...previous.dataById, ...normalizedSnapshot?.dataById}, + documentById: { + ...previous.documentById, + ...normalizedSnapshot?.documentById, + }, firstLoad: false, })); }); --- src/channels/provider.tsx @@ -135,12 +135,20 @@ export const ChannelsProvider = (props: PropsWithChildren<{}>) => { .orderBy('lastMessageTime', 'desc') .onSnapshot(async (snapshot) => { //TODO: The update based on the snapshot may be clobbering the results from initialization. Ensure previous channels state is injected during normalization + + const normalizedSnapshot = normalizeChannelSnapshot( + snapshot as ChannelQuerySnapshot, + viewerId, + ); + setChannelState((previous) => ({ ...previous, - ...normalizeChannelSnapshot( - snapshot as ChannelQuerySnapshot, - viewerId, - ), + ids: [...previous.ids, ...normalizedSnapshot?.ids], + dataById: {...previous.dataById, ...normalizedSnapshot?.dataById}, + documentById: { + ...previous.documentById, + ...normalizedSnapshot?.documentById, + }, firstLoad: false, })); });
updating provider for more accurate update - flashlist now has stableID collision
updating provider for more accurate update - flashlist now has stableID collision
a7d1ac5f4c73653dd48c72a637fc8aa11907c20e
--- __tests__/managerExperience/components/__snapshots__/TeamSearchInput.test.tsx.snap @@ -33,8 +33,8 @@ exports[`TeamSearchInput renders loading microphone icon if right icon is true 1 { "backgroundColor": "rgba(248, 248, 248, 1)", "borderRadius": 4, - "height": 16, - "width": 16, + "height": 30, + "width": 30, } } testID="Skeleton" @@ -46,7 +46,7 @@ exports[`TeamSearchInput renders loading microphone icon if right icon is true 1 "backgroundColor": "rgba(248, 248, 248, 1)", "borderRadius": 4, "height": 20, - "width": 120, + "width": 247.5, } } testID="Skeleton" @@ -58,8 +58,8 @@ exports[`TeamSearchInput renders loading microphone icon if right icon is true 1 { "backgroundColor": "rgba(248, 248, 248, 1)", "borderRadius": 4, - "height": 24, - "width": 24, + "height": 52.50000000000001, + "width": 52.50000000000001, } } testID="loading-microphone-icon" @@ -100,8 +100,8 @@ exports[`TeamSearchInput renders loading team search input if loading is true 1` { "backgroundColor": "rgba(248, 248, 248, 1)", "borderRadius": 4, - "height": 16, - "width": 16, + "height": 30, + "width": 30, } } testID="Skeleton" @@ -113,7 +113,7 @@ exports[`TeamSearchInput renders loading team search input if loading is true 1` "backgroundColor": "rgba(248, 248, 248, 1)", "borderRadius": 4, "height": 20, - "width": 120, + "width": 247.5, } } testID="Skeleton" --- src/managerExperience/components/TeamSearchInput/TeamSearchInputLoading.tsx @@ -1,23 +1,30 @@ import React from 'react'; import {Skeleton} from '@walmart/gtp-shared-components'; import {TeamSearchInputStyles as styles} from './style'; -import {View} from 'react-native'; +import {useWindowDimensions, View} from 'react-native'; import {TeamSearchInputLoadingProps} from './types'; export const TeamSearchInputLoading = ({ rightIcon, -}: TeamSearchInputLoadingProps) => ( - <View - style={styles.loadingContainer} - testID='team-search-input-loading-component'> - <View style={styles.loadingLeftElements}> - <Skeleton height={16} width={16} /> - <Skeleton height={20} width={120} /> +}: TeamSearchInputLoadingProps) => { + const {width} = useWindowDimensions(); + return ( + <View + style={styles.loadingContainer} + testID='team-search-input-loading-component'> + <View style={styles.loadingLeftElements}> + <Skeleton height={width * 0.04} width={width * 0.04} /> + <Skeleton height={20} width={width * 0.33} /> + </View> + {rightIcon ? ( + <Skeleton + height={width * 0.07} + width={width * 0.07} + testID='loading-microphone-icon' + /> + ) : ( + <View /> + )} </View> - {rightIcon ? ( - <Skeleton height={24} width={24} testID='loading-microphone-icon' /> - ) : ( - <View /> - )} - </View> -); + ); +};
feat: updated loading to use dimensions
feat: updated loading to use dimensions
65a398c5c038cf65d1d01363b36e9e35dc6c3c08
--- packages/roster-mini-app/__tests__/components/MyWalmartv2/RosterFilterChips.test.tsx @@ -13,6 +13,10 @@ jest.mock('../../../src/common', () => ({ rosterTelemetry: {logEvent: jest.fn()}, })); +jest.mock('../../../src/logger/analytics', () => ({ + analytics: jest.fn(), +})); + // Mock FilterChip primitive used inside jest.mock('../../../src/components/FilterChip/FilterChip', () => { const React = jest.requireActual('react'); @@ -148,4 +152,41 @@ describe('RosterFilterChips', () => { ); expect(getByTestId('chip-1 Tardy')).toBeTruthy(); }); + + it('handles filter with null count', () => { + const nullCountFilters = [{id: 'absent' as FilterValue, label: 'Absent', count: null}]; + const {getByTestId} = render( + <RosterFilterChips filters={nullCountFilters} selectedFilter={'clockedIn'} onFilterPress={jest.fn()} /> + ); + expect(getByTestId('chip-null Absent')).toBeTruthy(); + }); + + it('handles filter with undefined count', () => { + const undefinedCountFilters = [{id: 'tardy' as FilterValue, label: 'Tardy'}]; + const {getByTestId} = render( + <RosterFilterChips filters={undefinedCountFilters} selectedFilter={'clockedIn'} onFilterPress={jest.fn()} /> + ); + expect(getByTestId('chip-undefined Tardy')).toBeTruthy(); + }); + + it('triggers deselect analytics when pressing already selected filter', () => { + const analytics = require('../../../src/logger/analytics').analytics; + const onFilterPress = jest.fn(); + const {getByTestId} = render( + <RosterFilterChips filters={filters} selectedFilter={'clockedIn'} onFilterPress={onFilterPress} /> + ); + fireEvent.press(getByTestId('chip-2 Clocked In')); + expect(analytics).toHaveBeenCalledWith('filter_deselect', expect.objectContaining({id: 'clockedIn'})); + }); + + it('triggers select analytics when pressing non-selected filter', () => { + const analytics = require('../../../src/logger/analytics').analytics; + const onFilterPress = jest.fn(); + const {getByTestId} = render( + <RosterFilterChips filters={filters} selectedFilter={'tardy'} onFilterPress={onFilterPress} /> + ); + fireEvent.press(getByTestId('chip-2 Clocked In')); + expect(analytics).toHaveBeenCalledWith('filter_select', expect.objectContaining({id: 'clockedIn'})); + }); }); + --- packages/roster-mini-app/__tests__/components/RosterWidget.test.tsx @@ -13,7 +13,6 @@ import {mockGetSupplyChainShiftsQuery} from '../harness/athenaQueries/getSupplyC import {SiteSelectors} from '@walmart/allspark-foundation/Site'; jest.useFakeTimers(); -// Mock the useRosterWidget hook jest.mock('../../src/components/RosterWidget/useRosterWidget', () => ({ useRosterWidget: jest.fn(() => ({ t: (key) => { @@ -36,12 +35,10 @@ jest.mock('../../src/components/RosterWidget/useRosterWidget', () => ({ })), })); -// Mock react-redux jest.mock('react-redux', () => ({ useSelector: jest.fn(), })); -// Mock gtp-shared-components for Body component jest.mock('@walmart/gtp-shared-components-3', () => { const ReactModule = require('react'); const {Text} = require('react-native'); @@ -56,7 +53,6 @@ jest.mock('@walmart/gtp-shared-components-3', () => { }; }); -// Mock VerticalDivider component jest.mock('../../src/components/RosterWidget/VerticalDivider', () => { const ReactModule = require('react'); const {View} = require('react-native'); @@ -67,7 +63,6 @@ jest.mock('../../src/components/RosterWidget/VerticalDivider', () => { }; }); -// Mock WarningAlert to capture onPressButton callback jest.mock('../../src/components/WarningAlert/WarningAlert', () => { const ReactModule = require('react'); const {View, TouchableOpacity, Text} = require('react-native'); @@ -87,7 +82,6 @@ jest.mock('../../src/components/WarningAlert/WarningAlert', () => { }; }); -// Mock HubWidget jest.mock('@walmart/allspark-foundation-hub', () => ({ HubWidget: ({content, ...props}) => { const ReactModule = require('react'); @@ -106,13 +100,11 @@ jest.mock('@walmart/allspark-foundation-hub', () => ({ }, })); -// Mock navigation utils to prevent import issues jest.mock('../../src/navigation/utils', () => ({ goToWeeklySchedule: jest.fn(), goToIndividualSchedule: jest.fn(), })); -// Mock for hooks jest.mock('../../src/hooks', () => ({ ...jest.requireActual('../../src/hooks'), useSupplyChainShifts: jest.fn().mockReturnValueOnce({ @@ -167,7 +159,6 @@ describe('RosterWidget', () => { refetch: jest.fn(), }); - // Mock useSelector for isSiteDC (useSelector as jest.Mock).mockImplementation((selector) => { if (selector === SiteSelectors.getWorkingSiteIsDC) { return false; @@ -194,19 +185,15 @@ describe('RosterWidget', () => { />, ); - // Check if the widget renders const widget = getByTestId('hub-widget'); expect(widget).toBeDefined(); - // Check the scheduled count is displayed const scheduledCount = getByText('20'); expect(scheduledCount).toBeDefined(); - // Check the scheduled text const scheduledText = getByText('scheduled today'); expect(scheduledText).toBeDefined(); - // Check all roster status items are displayed const clockedIn = getByText('15'); expect(clockedIn).toBeDefined(); expect(getByText('Clocked in')).toBeDefined(); @@ -230,12 +217,10 @@ describe('RosterWidget', () => { render(<RosterWidget {...testProps} />); - // Verify that useRosterWidget was called with the correct props expect(mockUseRosterWidget).toHaveBeenCalledWith(testProps, false); }); it('handles DC site type correctly', () => { - // Change the mock to return true for isSiteDC (useSelector as jest.Mock).mockImplementation((selector) => { if (selector === SiteSelectors.getWorkingSiteIsDC) { return true; @@ -250,12 +235,10 @@ describe('RosterWidget', () => { render(<RosterWidget {...testProps} />); - // Verify that useRosterWidget was called with isSiteDC = true expect(mockUseRosterWidget).toHaveBeenCalledWith(testProps, true); }); it('passes widget refresh and style props to HubWidget', () => { - // Set up mock return values for useRosterWidget const mockRefresh = 'test-refresh-token'; const mockStyle = {border: '1px solid #ccc'}; @@ -269,7 +252,6 @@ describe('RosterWidget', () => { const {getByTestId} = render(<RosterWidget />); - // Check that props were passed correctly to HubWidget const widget = getByTestId('hub-widget'); expect(widget.props['data-refresh']).toBe(mockRefresh); expect(widget.props['data-hubWidgetStyle']).toBe(JSON.stringify(mockStyle)); @@ -431,12 +413,10 @@ describe('RosterWidget', () => { const {getByTestId} = render(<RosterWidget />); const warningAlertButton = getByTestId('warning-alert-button'); - // Click 5 times for (let i = 0; i < 5; i++) { fireEvent.press(warningAlertButton); } - // Should only be called 3 times due to limit expect(mockOnRefresh).toHaveBeenCalledTimes(3); }); });
chore: add unit test coverage
chore: add unit test coverage
efaf6f313b9c292214860f7ac825674692ad9fb7
--- __tests__/navigation/__snapshots__/SideMenuContentTest.tsx.snap @@ -4,10 +4,14 @@ exports[`SideMenuContent renders 1`] = ` <View> <View style={ - Object { - "height": 225, - "overflow": "hidden", - } + Array [ + Object { + "overflow": "hidden", + }, + Object { + "height": 260, + }, + ] } > GlobalNavigation @@ -19,10 +23,14 @@ exports[`SideMenuContent renders 2`] = ` <View> <View style={ - Object { - "height": 225, - "overflow": "hidden", - } + Array [ + Object { + "overflow": "hidden", + }, + Object { + "height": 260, + }, + ] } > GlobalNavigation --- src/navigation/SideMenuContent.tsx @@ -52,6 +52,10 @@ export const SideMenuContent: React.FC<DrawerContentComponentProps< }, ]; + // 180 is static height for Username & SignOut section combined + // 40 is static height for one row/item in sideMenu + const navigationBarHeight = 180 + 40 * config.length; + const onDrawerClose = () => { navigation.dispatch(DrawerActions.closeDrawer()); }; @@ -67,7 +71,7 @@ export const SideMenuContent: React.FC<DrawerContentComponentProps< return ( <View> - <View style={styles.globalNavContainer}> + <View style={[styles.globalNavContainer, {height: navigationBarHeight}]}> <GlobalNavigation testID='globalNav' showDefaultNav --- src/navigation/SideMenuContentStyle.ts @@ -2,7 +2,6 @@ import {StyleSheet} from 'react-native'; export default StyleSheet.create({ globalNavContainer: { - height: 225, overflow: 'hidden', }, });
fixed sideMenu height (#183)
fixed sideMenu height (#183) Co-authored-by: Hitesh Arora <> Co-authored-by: Savankumar Akbari - sakbari <sakbari@m-c02rv0v4g8wl.homeoffice.wal-mart.com>
e4a1f1e5112379ca34c95a2a3cb5733c7426fc49
--- __tests__/components/__snapshots__/StatusChipTest.tsx.snap @@ -16,7 +16,7 @@ exports[`StatusChip renders correctly for associate on meal 1`] = ` testID="statusChip" variant="tertiary" > - rosterScreen.statusChips.meal + Meal </Tag> `; @@ -26,7 +26,7 @@ exports[`StatusChip renders correctly for associate on ppto 1`] = ` testID="statusChip" variant="tertiary" > - rosterScreen.statusChips.ppto + PPTO </Tag> `; @@ -36,7 +36,7 @@ exports[`StatusChip renders correctly for associate on pto 1`] = ` testID="statusChip" variant="tertiary" > - rosterScreen.statusChips.pto + PTO </Tag> `; --- __tests__/managerExperience/components/__snapshots__/AssociateListItem.test.tsx.snap @@ -114,7 +114,6 @@ exports[`AssociateListItem should render AssociateListItem with props 1`] = ` "fontFamily": "Bogle Regular", "fontSize": 14, "lineHeight": 20, - "marginBottom": 4, } } >
feat: updated snapshots
feat: updated snapshots
4e4d14d89cbac7adf4583e01afcafefd1b4aad7c
--- package-lock.json @@ -4203,9 +4203,9 @@ "integrity": "sha512-AymRaP39YXybYN3VHLVNFMoA8J4XYZbd9JUT+bQOuc5KGf5SQQFMOhrqSd9UENvnbqnTRrfDbBhn/ua7/E54WA==" }, "@walmart/exception-mini-app": { - "version": "0.38.12", - "resolved": "https://npme.walmart.com/@walmart/exception-mini-app/-/exception-mini-app-0.38.12.tgz", - "integrity": "sha512-SXb6ZJLwlOxcWgmlfWbt/nNdyNY3Xcq1/LApNeMQ4hJfIJUnJn6ShLB3YiuDZ+1xV77fV7+HIESDac40PSaNtw==" + "version": "0.39.2", + "resolved": "https://npme.walmart.com/@walmart/exception-mini-app/-/exception-mini-app-0.39.2.tgz", + "integrity": "sha512-7OL7IwfRrGvMB+o6z7pULrc+p+uPmitHutcrN68NZVROrRCvM9BXw01gxaTxCJ19vGWhg2jSP7j8JOaQzWUF3g==" }, "@walmart/feedback-all-spark-miniapp": { "version": "0.1.18", --- package.json @@ -77,7 +77,7 @@ "@walmart/ask-sam-mini-app": "0.40.4", "@walmart/config-components": "1.0.35", "@walmart/counts-component-miniapp": "0.0.32", - "@walmart/exception-mini-app": "0.38.12", + "@walmart/exception-mini-app": "0.39.2", "@walmart/feedback-all-spark-miniapp": "0.1.18", "@walmart/functional-components": "1.0.34", "@walmart/gta-react-native-calendars": "0.0.15",
pinpoint: bump version 39.1 to 39.2
pinpoint: bump version 39.1 to 39.2
dd525fdc7a32d88990992bf71e7e91ab97453f18
--- package-lock.json @@ -43,7 +43,7 @@ "@walmart/attendance-mini-app": "1.62.13", "@walmart/compass-sdk-rn": "5.18.9", "@walmart/config-components": "4.2.13", - "@walmart/copilot-mini-app": "^3.26.4", + "@walmart/copilot-mini-app": "3.26.4", "@walmart/core-services": "~2.3.0", "@walmart/core-services-allspark": "~2.13.4", "@walmart/core-utils": "~2.0.5", @@ -9750,9 +9750,9 @@ } }, "node_modules/@walmart/store-feature-orders": { - "version": "1.23.0", - "resolved": "https://npme.walmart.com/@walmart/store-feature-orders/-/store-feature-orders-1.23.0.tgz", - "integrity": "sha512-yUGfrUJxc1nOTxfHsFhMFfF+9vRY9m5V8tSzhD8ISRXDZTCaAIp9XpjGaTOe6iY/5/gpNN9oISFsEO9LMfx5Iw==", + "version": "1.24.0", + "resolved": "https://npme.walmart.com/@walmart/store-feature-orders/-/store-feature-orders-1.24.0.tgz", + "integrity": "sha512-6opFXMOFCSdQMSgscCRSoOYwh9BLbm3IQZ1bCjDW7YFLZU+UNwl41u1jCOrygr3UAuUsJFK7Bi7CAqkZQ7Zd2w==", "hasInstallScript": true, "peerDependencies": { "@react-navigation/native": "^6.0.0", @@ -29418,7 +29418,7 @@ "requires": { "mv": "~2", "safe-json-stringify": "~1", - "uuid": "^3.3.2" + "uuid": "^8.0.0" } }, "@expo/cli": { @@ -30108,7 +30108,7 @@ "md5": "^2.2.1", "node-fetch": "^2.6.1", "remove-trailing-slash": "^0.1.0", - "uuid": "^3.3.2" + "uuid": "^8.3.2" } }, "@expo/sdk-runtime-versions": { @@ -33567,9 +33567,9 @@ "integrity": "sha512-XCQBKME/ee2yJDYX+XVtNin3Fvz8zIJTXy3qSGit3ufUcRvaZv2aRN/fR4oK0gyvOTb7p548SS47DZydK/EYlg==" }, "@walmart/store-feature-orders": { - "version": "1.23.0", - "resolved": "https://npme.walmart.com/@walmart/store-feature-orders/-/store-feature-orders-1.23.0.tgz", - "integrity": "sha512-yUGfrUJxc1nOTxfHsFhMFfF+9vRY9m5V8tSzhD8ISRXDZTCaAIp9XpjGaTOe6iY/5/gpNN9oISFsEO9LMfx5Iw==" + "version": "1.24.0", + "resolved": "https://npme.walmart.com/@walmart/store-feature-orders/-/store-feature-orders-1.24.0.tgz", + "integrity": "sha512-6opFXMOFCSdQMSgscCRSoOYwh9BLbm3IQZ1bCjDW7YFLZU+UNwl41u1jCOrygr3UAuUsJFK7Bi7CAqkZQ7Zd2w==" }, "@walmart/taskit-mini-app": { "version": "2.49.7", @@ -37061,7 +37061,7 @@ "version": "2.1.6", "dev": true, "requires": { - "axios": "~1.2.6" + "axios": "^0.21.4" } }, "chalk": {
Updated file commit after npm install
Updated file commit after npm install
75efeabf11c8b5f233fccabb831668e7bf48b6b0
--- package-lock.json @@ -4208,9 +4208,9 @@ "integrity": "sha512-7OL7IwfRrGvMB+o6z7pULrc+p+uPmitHutcrN68NZVROrRCvM9BXw01gxaTxCJ19vGWhg2jSP7j8JOaQzWUF3g==" }, "@walmart/feedback-all-spark-miniapp": { - "version": "0.1.22", - "resolved": "https://npme.walmart.com/@walmart/feedback-all-spark-miniapp/-/feedback-all-spark-miniapp-0.1.22.tgz", - "integrity": "sha512-Jf86tGe4Z48eP5o2OBO+fJE+AyPm5NjEBk7TcRbA6ezVG/mdIz+5Ovm6lR5AVjpsh0fn1DlsAM3ur1JeGdP7fA==" + "version": "0.1.25", + "resolved": "https://npme.walmart.com/@walmart/feedback-all-spark-miniapp/-/feedback-all-spark-miniapp-0.1.25.tgz", + "integrity": "sha512-Pu/RYhuJtLEi8Dd3HTaA2/FVBz0ilnXv7Vta0GPTir9SGe9gyiFwphHCGCHJwRqYh+XS9jW138bHQmy5AoC/fA==" }, "@walmart/functional-components": { "version": "1.0.34", --- package.json @@ -78,7 +78,7 @@ "@walmart/config-components": "1.0.35", "@walmart/counts-component-miniapp": "0.0.32", "@walmart/exception-mini-app": "0.39.2", - "@walmart/feedback-all-spark-miniapp": "0.1.22", + "@walmart/feedback-all-spark-miniapp": "0.1.25", "@walmart/functional-components": "1.0.34", "@walmart/gta-react-native-calendars": "0.0.15", "@walmart/gtp-shared-components": "1.2.0",
Bumped up feedback miniapp version
Bumped up feedback miniapp version
d191e96aaf03a3c5f0db69ddbbf9bc470f42f89c
--- __tests__/navigation/AssociateHallwayNav/Tabs/MainTabsNavTest.tsx @@ -31,6 +31,14 @@ jest.mock('../../../../src/transforms/language', () => ({ getValueForCurrentLanguage: jest.fn((t) => t), })); +jest.mock('@walmart/profile-feature-app', () => ({ + meMiniApp: 'Profile', +})); + +jest.mock('@walmart/payrollsolution_miniapp', () => ({ + directDepositMiniApp: 'PaymentSelection', +})); + const mockUseSelector = useSelector as jest.Mock; test('renderTabBarButton', () => { --- __tests__/navigation/AssociateHallwayNav/Tabs/MeStackNavTest.tsx @@ -2,6 +2,14 @@ import React from 'react'; import {create} from 'react-test-renderer'; import {MeStackNav} from '../../../../src/navigation/AssociateHallwayNav/Tabs/MeStackNav'; +jest.mock('@walmart/profile-feature-app', () => ({ + meMiniApp: 'Profile', +})); + +jest.mock('@walmart/payrollsolution_miniapp', () => ({ + directDepositMiniApp: 'PaymentSelection', +})); + describe('MeStackNav', () => { const component = create(<MeStackNav />); --- __tests__/navigation/AssociateHallwayNav/Tabs/__snapshots__/MeStackNavTest.tsx.snap @@ -13,7 +13,6 @@ exports[`MeStackNav matches snapshot 1`] = ` } > <Screen - component="MeScreen" name="me.root" options={ Object { @@ -23,8 +22,7 @@ exports[`MeStackNav matches snapshot 1`] = ` } /> <Screen - component="ScheduleMiniApp" - name="scheduleScreen" + name="contactInfoScreen" options={ Object { "headerShown": false, @@ -32,7 +30,36 @@ exports[`MeStackNav matches snapshot 1`] = ` } /> <Screen - name="timeClockTabs" + name="jobHistoryScreen" + options={ + Object { + "headerShown": false, + } + } + /> + <Screen + name="educationHistoryScreen" + options={ + Object { + "headerShown": false, + } + } + /> + <Screen + name="certificationsScreen" + options={ + Object { + "headerShown": false, + } + } + /> + <Screen + name="paymentselection" + options={ + Object { + "headerShown": false, + } + } /> </Navigator> `;
fixed test cases for profile mini app migration to v0.0.23
fixed test cases for profile mini app migration to v0.0.23
9413d86aac83cf60e2654a86bcde6510d4a82a78
--- package.json @@ -69,7 +69,7 @@ "react": "^18.2.0", "react-native": "~0.73.7", "react-test-renderer": "18.2.0", - "typescript": "^4.7.4" + "typescript": "5.0.4" }, "resolutions": { "@walmart/core-services": "6.0.1", --- yarn.lock @@ -6274,7 +6274,7 @@ __metadata: react: "npm:^18.2.0" react-native: "npm:~0.73.7" react-test-renderer: "npm:18.2.0" - typescript: "npm:^4.7.4" + typescript: "npm:5.0.4" languageName: unknown linkType: soft @@ -17790,6 +17790,16 @@ __metadata: languageName: node linkType: hard +"typescript@npm:5.0.4": + version: 5.0.4 + resolution: "typescript@npm:5.0.4" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/2f5bd1cead194905957cb34e220b1d6ff1662399adef8ec1864f74620922d860ee35b6e50eafb3b636ea6fd437195e454e1146cb630a4236b5095ed7617395c2 + languageName: node + linkType: hard + "typescript@npm:>=3 < 6": version: 5.5.3 resolution: "typescript@npm:5.5.3" @@ -17800,7 +17810,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^4.4.3, typescript@npm:^4.7.4": +"typescript@npm:^4.4.3": version: 4.9.5 resolution: "typescript@npm:4.9.5" bin: @@ -17820,6 +17830,16 @@ __metadata: languageName: node linkType: hard +"typescript@patch:typescript@npm%3A5.0.4#optional!builtin<compat/typescript>": + version: 5.0.4 + resolution: "typescript@patch:typescript@npm%3A5.0.4#optional!builtin<compat/typescript>::version=5.0.4&hash=b5f058" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/c3f7b80577bddf6fab202a7925131ac733bfc414aec298c2404afcddc7a6f242cfa8395cf2d48192265052e11a7577c27f6e5fac8d8fe6a6602023c83d6b3292 + languageName: node + linkType: hard + "typescript@patch:typescript@npm%3A>=3 < 6#optional!builtin<compat/typescript>": version: 5.5.3 resolution: "typescript@patch:typescript@npm%3A5.5.3#optional!builtin<compat/typescript>::version=5.5.3&hash=b45daf" @@ -17830,7 +17850,7 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^4.4.3#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^4.7.4#optional!builtin<compat/typescript>": +"typescript@patch:typescript@npm%3A^4.4.3#optional!builtin<compat/typescript>": version: 4.9.5 resolution: "typescript@patch:typescript@npm%3A4.9.5#optional!builtin<compat/typescript>::version=4.9.5&hash=289587" bin:
chore: update typescript
chore: update typescript
6061e0afff567e18f9a1f4b57e83d07d82b11ed0
--- package-lock.json @@ -3069,9 +3069,9 @@ } }, "@walmart/config-components": { - "version": "1.0.19", - "resolved": "https://npme.walmart.com/@walmart/config-components/-/config-components-1.0.19.tgz", - "integrity": "sha512-HdqKCZd0Mev3aqRQxd2/KGsLsjWebhIhOh8yaQ8F7qHskCHZZPPlOuay6Xu+A5oNKhmiAzUWQboNpgZgLUWSVg==" + "version": "1.0.20", + "resolved": "https://npme.walmart.com/@walmart/config-components/-/config-components-1.0.20.tgz", + "integrity": "sha512-HU/YOKQH6xIkBEhOJ26DRYeYOJp6OmEZDdv4RAEPDCwOzUbIewaFu0ZY6bMDxeo4EPcSx5Bi37aeEnXCHz1p+A==" }, "@walmart/feedback-all-spark-miniapp": { "version": "0.0.45", @@ -3258,9 +3258,9 @@ } }, "@walmart/ui-components": { - "version": "1.1.3", - "resolved": "https://npme.walmart.com/@walmart/ui-components/-/ui-components-1.1.3.tgz", - "integrity": "sha512-DqaFgruoPmQVUJ4XF/Mf77vr3exN3fD1+c3X77/lhIUQtjefSACfLThhNexKFHzn+PF6elAEQnDlnnl5/PDrKw==", + "version": "1.1.4", + "resolved": "https://npme.walmart.com/@walmart/ui-components/-/ui-components-1.1.4.tgz", + "integrity": "sha512-S8uwonGRSgKCCV2z2pDevEZQipPHvWYc3iUGF/71xVP5/RCM9jAeJHl4/E0NYKp+t+ngq+AYUXQc5+zSfa6EvA==", "requires": { "react-native-calendars": "1.299.0" } --- package.json @@ -64,7 +64,7 @@ "@walmart/allspark-home-mini-app": "0.1.11", "@walmart/allspark-me-mini-app": "0.0.23", "@walmart/ask-sam-mini-app": "0.12.1", - "@walmart/config-components": "1.0.19", + "@walmart/config-components": "1.0.20", "@walmart/feedback-all-spark-miniapp": "0.0.45", "@walmart/functional-components": "1.0.25", "@walmart/gtp-shared-components": "^0.2.2", @@ -79,7 +79,7 @@ "@walmart/schedule-mini-app": "0.2.66", "@walmart/settings-mini-app": "1.2.3", "@walmart/time-clock-mini-app": "0.1.52", - "@walmart/ui-components": "1.1.3", + "@walmart/ui-components": "1.1.4", "@walmart/welcomeme-mini-app": "0.5.27", "axios-cache-adapter": "2.7.3", "crypto-js": "^3.3.0",
config components version bump (#475)
config components version bump (#475) * config components version bump * bump up ui-components vesion Co-authored-by: Anthony Helms <awhelms@wal-mart.com>
e6ed4898d2e1c89c21f9e68c9b7c5b33d2113133
--- package-lock.json @@ -5094,9 +5094,9 @@ } }, "@walmart/ask-sam-mini-app": { - "version": "1.2.5", - "resolved": "https://npme.walmart.com/@walmart/ask-sam-mini-app/-/ask-sam-mini-app-1.2.5.tgz", - "integrity": "sha512-5HOtiunC1PUSpKYk0HKNa8AASGi2OzNRH2LEb/b905YwbUYMLG6xhijNLJOzFRA/W2+oGkXmIV2zIiAJMmfTmQ==", + "version": "1.2.6", + "resolved": "https://npme.walmart.com/@walmart/ask-sam-mini-app/-/ask-sam-mini-app-1.2.6.tgz", + "integrity": "sha512-c8T/dCIRCKqTgp5IveO8RauhjjDE63YaaEGFIiuoUC+jJRwCU7vxwBLMUfGsa1/c1CwnQpcOpUOHoVypgVCRvw==", "requires": { "@walmart/core-utils": "^1.0.9", "@walmart/react-native-scanner-3.0": "^0.1.12", --- package.json @@ -79,7 +79,7 @@ "@walmart/allspark-neon-core": "0.1.29", "@walmart/amp-mini-app": "0.2.13", "@walmart/ask-sam-chat-components": "^0.2.7", - "@walmart/ask-sam-mini-app": "1.2.5", + "@walmart/ask-sam-mini-app": "1.2.6", "@walmart/config-components": "3.0.3", "@walmart/core-services": "~1.2.11", "@walmart/core-services-allspark": "~1.7.18",
SMBLV-1781: ask-sam-mini-app version increment
SMBLV-1781: ask-sam-mini-app version increment
bb41178b58301825147680fd4647d0d01f8e7ca9
--- package-lock.json @@ -81,7 +81,7 @@ "@walmart/settings-mini-app": "1.18.1", "@walmart/shelfavailability-mini-app": "1.5.13", "@walmart/taskit-mini-app": "2.28.14", - "@walmart/time-clock-mini-app": "2.85.2", + "@walmart/time-clock-mini-app": "2.98.0", "@walmart/topstock-mini-app": "1.0.5", "@walmart/ui-components": "1.11.1", "@walmart/welcomeme-mini-app": "0.76.0", @@ -6073,9 +6073,9 @@ } }, "node_modules/@walmart/time-clock-mini-app": { - "version": "2.85.2", - "resolved": "https://npme.walmart.com/@walmart/time-clock-mini-app/-/time-clock-mini-app-2.85.2.tgz", - "integrity": "sha512-zVDC4f+RB77zu7nAgGpiwmDWFRr0id1+bJ7xXU5K9foKrvOnSEY9hhUStcZSem/AblbKfBjg8f1JY0jB0sdFvw==", + "version": "2.98.0", + "resolved": "https://npme.walmart.com/@walmart/time-clock-mini-app/-/time-clock-mini-app-2.98.0.tgz", + "integrity": "sha512-IVA1Ad4NNLCmG9GjpuboJfKXdnTyfJQnkabpWlkuHK+XP/jd8fgprYJ4heIaR2MbNGUCY20OmHZJi1KxSTvNJg==", "hasInstallScript": true, "license": "UNLICENSED", "dependencies": { @@ -25495,9 +25495,9 @@ } }, "@walmart/time-clock-mini-app": { - "version": "2.85.2", - "resolved": "https://npme.walmart.com/@walmart/time-clock-mini-app/-/time-clock-mini-app-2.85.2.tgz", - "integrity": "sha512-zVDC4f+RB77zu7nAgGpiwmDWFRr0id1+bJ7xXU5K9foKrvOnSEY9hhUStcZSem/AblbKfBjg8f1JY0jB0sdFvw==", + "version": "2.98.0", + "resolved": "https://npme.walmart.com/@walmart/time-clock-mini-app/-/time-clock-mini-app-2.98.0.tgz", + "integrity": "sha512-IVA1Ad4NNLCmG9GjpuboJfKXdnTyfJQnkabpWlkuHK+XP/jd8fgprYJ4heIaR2MbNGUCY20OmHZJi1KxSTvNJg==", "requires": { "@react-navigation/elements": "^1.3.1", "moment-timezone": "0.5.33", --- package.json @@ -123,7 +123,7 @@ "@walmart/settings-mini-app": "1.18.1", "@walmart/shelfavailability-mini-app": "1.5.13", "@walmart/taskit-mini-app": "2.28.14", - "@walmart/time-clock-mini-app": "2.85.2", + "@walmart/time-clock-mini-app": "2.98.0", "@walmart/topstock-mini-app": "1.0.5", "@walmart/ui-components": "1.11.1", "@walmart/welcomeme-mini-app": "0.76.0",
feature: bug and a11y fixes
feature: bug and a11y fixes
7657568502409b45a3b122e6c7762450f3394026
--- package.json @@ -79,7 +79,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.22.0", + "@walmart/compass-sdk-rn": "3.23.0", "@walmart/config-components": "4.1.0-rc.4", "@walmart/core-services": "~2.0.19", "@walmart/core-services-allspark": "~2.10.15",
version bump for static map
version bump for static map
78aad3414f58d4d27aeb9a392f729e8e4347e171
--- targets/US/package.json @@ -82,7 +82,7 @@ "@walmart/allspark-http-client": "~6.3.20", "@walmart/allspark-neon-core": "0.1.31", "@walmart/allspark-utils": "6.5.0", - "@walmart/amp-mini-app": "1.1.88", + "@walmart/amp-mini-app": "1.1.89", "@walmart/ask-sam-chat-components": "^0.2.7", "@walmart/ask-sam-mini-app": "1.24.7", "@walmart/associate-listening-mini-app": "1.2.7", --- yarn.lock @@ -5859,9 +5859,9 @@ __metadata: languageName: node linkType: hard -"@walmart/amp-mini-app@npm:1.1.88": - version: 1.1.88 - resolution: "@walmart/amp-mini-app@npm:1.1.88" +"@walmart/amp-mini-app@npm:1.1.89": + version: 1.1.89 + resolution: "@walmart/amp-mini-app@npm:1.1.89" peerDependencies: "@react-navigation/native": ^6.0.0 "@react-navigation/stack": ^6.1.0 @@ -5871,7 +5871,7 @@ __metadata: "@walmart/redux-store": 6.1.4 react: ^18.2.0 react-native: ~0.73.7 - checksum: 10c0/5a6489ca4124fe864eae441ab3f8654579a00ccfaff05cb8c3856b3c3a83157da2f505cc9f3f654be42c5bb16f5864c0c538ac21be0e00b05587e08d489ade1b + checksum: 10c0/64f62810d524b2b18bbd26880ae4e9f1f68f3952e141fa09551b7ded1979bdc24bab2808e5089cbcd1509fb58a582e05d5893a3318c4e496de024c6dd7b17e26 languageName: node linkType: hard @@ -6987,7 +6987,7 @@ __metadata: "@walmart/allspark-http-client": "npm:~6.3.20" "@walmart/allspark-neon-core": "npm:0.1.31" "@walmart/allspark-utils": "npm:6.5.0" - "@walmart/amp-mini-app": "npm:1.1.88" + "@walmart/amp-mini-app": "npm:1.1.89" "@walmart/ask-sam-chat-components": "npm:^0.2.7" "@walmart/ask-sam-mini-app": "npm:1.24.7" "@walmart/associate-listening-mini-app": "npm:1.2.7"
AMP version update
AMP version update
0a1e007858729e60cafec832ab58eeeff212f296
--- package-lock.json @@ -71,7 +71,7 @@ "@walmart/impersonation-mini-app": "1.20.8", "@walmart/ims-print-services-ui": "2.10.3", "@walmart/inbox-mini-app": "0.92.9", - "@walmart/iteminfo-mini-app": "7.10.6", + "@walmart/iteminfo-mini-app": "7.10.7", "@walmart/learning-mini-app": "20.0.3", "@walmart/manager-approvals-miniapp": "0.2.4", "@walmart/me-at-walmart-athena-queries": "6.0.7", @@ -11684,9 +11684,9 @@ } }, "node_modules/@walmart/iteminfo-mini-app": { - "version": "7.10.6", - "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-7.10.6.tgz", - "integrity": "sha512-Cbyum7EmVMfGYmOx42WV63KJTfAQrxglJ7Wxa3w+OaKVJ/j9hv+B0Box4Mdjlmeqs0bezy+NK/OFs55OBSOgfw==", + "version": "7.10.7", + "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-7.10.7.tgz", + "integrity": "sha512-gWFTWpAdvzltp6igWHLDMg1WAFi910Fo+4TGXOuc5nQFP0fiFOkO1wGnZatN8PgfKvT1DjWbT0tq4TxTzhlCkw==", "hasInstallScript": true, "peerDependencies": { "@react-navigation/drawer": ">=6.3.0", --- package.json @@ -112,7 +112,7 @@ "@walmart/impersonation-mini-app": "1.20.8", "@walmart/ims-print-services-ui": "2.10.3", "@walmart/inbox-mini-app": "0.92.9", - "@walmart/iteminfo-mini-app": "7.10.6", + "@walmart/iteminfo-mini-app": "7.10.7", "@walmart/learning-mini-app": "20.0.3", "@walmart/manager-approvals-miniapp": "0.2.4", "@walmart/me-at-walmart-athena-queries": "6.0.7", @@ -377,7 +377,7 @@ "@walmart/impersonation-mini-app": "1.20.8", "@walmart/ims-print-services-ui": "2.10.3", "@walmart/inbox-mini-app": "0.92.9", - "@walmart/iteminfo-mini-app": "7.10.6", + "@walmart/iteminfo-mini-app": "7.10.7", "@walmart/learning-mini-app": "20.0.3", "@walmart/manager-approvals-miniapp": "0.2.4", "@walmart/me-at-walmart-athena-queries": "6.0.7",
Fixed the resetting the vml flow
Fixed the resetting the vml flow
d30c0d3bc50dc849d5173a5654d355501c9ed61c
--- package-lock.json @@ -4400,9 +4400,9 @@ } }, "@walmart/refrigeration-alarms-mini-app": { - "version": "1.31.0", - "resolved": "https://npme.walmart.com/@walmart/refrigeration-alarms-mini-app/-/refrigeration-alarms-mini-app-1.31.0.tgz", - "integrity": "sha512-tvuwuv0cQBuNQBNuPICmM0Z7TH6qJXw7R8DZWVdi3QmdjSesVEEIdQjJANGaMkz0fxUvhFIpkZx6mmNPWhoSxQ==" + "version": "1.32.0", + "resolved": "https://npme.walmart.com/@walmart/refrigeration-alarms-mini-app/-/refrigeration-alarms-mini-app-1.32.0.tgz", + "integrity": "sha512-4wwE2xiqGUZFq2GHbW22PqLxaEv+ncwYH3w0LTFi6VDsMOECJ6l4XNKhAPtcdMCBit4EV6l9dwbGe96a7nXKlw==" }, "@walmart/schedule-mini-app": { "version": "0.12.0", --- package.json @@ -97,7 +97,7 @@ "@walmart/react-native-shared-navigation": "^0.4.0", "@walmart/react-native-sumo-sdk": "2.1.0", "@walmart/redux-store": "1.1.26", - "@walmart/refrigeration-alarms-mini-app": "1.31.0", + "@walmart/refrigeration-alarms-mini-app": "1.32.0", "@walmart/schedule-mini-app": "0.12.0", "@walmart/settings-mini-app": "1.6.0", "@walmart/shelfavailability-mini-app": "0.8.3",
Added a new param for taskit on action completion
Added a new param for taskit on action completion
a1cf0399bc53e9111966de12bee88c53750900d0
--- packages/allspark-foundation/__tests__/Components/Navigation/DrawerButton.test.tsx @@ -0,0 +1,37 @@ +import React from 'react'; +import { render } from '@testing-library/react-native'; +import { StackNavigationOptions } from '@react-navigation/stack'; +import { useAllsparkDrawer } from '../../../src/Navigation/context'; +import {renderDrawerButton } from '../../../src/Navigation/components/DrawerButton'; + + +jest.mock('@react-navigation/native', ()=>({ + useNavigation:jest.fn(), + DrawerActions:{ + toggleDrawer:jest.fn().mockReturnValue({type: 'TOGGLE_DRAWER'}) + } +})) +jest.mock('../../../src/Navigation/context', ()=>({ + useAllsparkDrawer:jest.fn(), +})) +jest.mock('lodash', ()=>({ + debounce:jest.fn((fun)=>fun), +})) +jest.mock('../../../src/Navigation/components/DrawerButton', ()=>({ +...jest.requireActual('../../../src/Navigation/components/DrawerButton'), +DrawerButton: jest.fn(()=>null) +})) +describe('renderDrawerButton', () => { + beforeEach(()=>{ + (useAllsparkDrawer as jest.Mock).mockReturnValue({locked:false}) + }) + + afterEach(()=>{ + jest.clearAllMocks() + }) + + test('renders renderDrawerButton correctly', () => { + const props:StackNavigationOptions = {} + render(renderDrawerButton(props as any)); + }); +});
add unit test for drawer button
add unit test for drawer button
363131e001db7d6762e3004a8034dbd44b306679
--- src/containers/ChatInput/index.tsx @@ -20,6 +20,7 @@ import {Images} from '../../images'; import {ChatActions} from './ChatActions'; import {AudioContentType, AudioInput} from './AudioInput'; import {RecordingDetails} from './types'; +import {ImageAttachments} from './ImageAttachments'; // @todo - a bit clumsy with the styling. layout with flex was cleaner // but didn't play well with animation. @@ -92,7 +93,7 @@ export const ChatInput = (props: { const {bottom} = useSafeAreaInsets(); const [text, setText] = useState(''); const [collapsed, setCollpased] = useState(false); - // const [imageAssets, setImageAssets] = useState<Asset[]>([]); + const [imageAssets, setImageAssets] = useState<Asset[]>([]); const [capturingAudio, setCapturingAudio] = useState(false); const [audioDetails, setAudioDetails] = useState<RecordingDetails>(); @@ -180,29 +181,33 @@ export const ChatInput = (props: { const pickerResponse = await launchCamera({mediaType: 'photo'}); if (pickerResponse && pickerResponse.assets) { - onSendImage(pickerResponse.assets[0]); + // onSendImage(pickerResponse.assets[0]); + setImageAssets((prev) => [...prev, pickerResponse.assets![0]]); } }; const onAttachImage = async () => { - const pickerResponse: ImagePickerResponse | void = await launchImageLibrary( - { - mediaType: 'photo', - selectionLimit: 1, - }, - ).catch((e) => console.log('pick iamge error', e)); - console.log('onAttachImage', pickerResponse); - if (pickerResponse && pickerResponse.assets) { - onSendImage(pickerResponse.assets[0]); + if (!imageAssets.length) { + const pickerResponse: ImagePickerResponse | void = await launchImageLibrary( + { + mediaType: 'photo', + selectionLimit: 1, + }, + ).catch((e) => console.log('pick iamge error', e)); + console.log('onAttachImage', pickerResponse); + if (pickerResponse && pickerResponse.assets) { + // onSendImage(pickerResponse.assets[0]); + setImageAssets((prev) => [...prev, pickerResponse.assets![0]]); + } } }; - // const onRemoveImage = (index: number) => { - // setImageAssets((prev) => { - // prev.splice(index, 1); - // return [...prev]; - // }); - // }; + const onRemoveImage = (index: number) => { + setImageAssets((prev) => { + prev.splice(index, 1); + return [...prev]; + }); + }; // Render Audio Input // Will handle its own setup and start recording immediately @@ -296,11 +301,11 @@ export const ChatInput = (props: { </> </ScrollView> - {/* <ImageAttachments + <ImageAttachments images={imageAssets} style={styles.imageRow} onRemove={onRemoveImage} - /> */} + /> </View> ); }; --- src/containers/Message/ImageMessage.tsx @@ -4,14 +4,18 @@ import Image from 'react-native-fast-image'; import {ImageMedia} from '../../types'; const styles = StyleSheet.create({ - container: {flexDirection: 'row', marginVertical: 8}, + container: { + flexDirection: 'row', + marginVertical: 8, + }, image: { - height: 100, - width: 100, + height: 200, + width: 200, borderRadius: 8, marginLeft: 8, }, }); + export const ImageMessage = (props: { images: ImageMedia[]; outgoing: boolean; --- src/containers/ChatInput/index.tsx @@ -20,6 +20,7 @@ import {Images} from '../../images'; import {ChatActions} from './ChatActions'; import {AudioContentType, AudioInput} from './AudioInput'; import {RecordingDetails} from './types'; +import {ImageAttachments} from './ImageAttachments'; // @todo - a bit clumsy with the styling. layout with flex was cleaner // but didn't play well with animation. @@ -92,7 +93,7 @@ export const ChatInput = (props: { const {bottom} = useSafeAreaInsets(); const [text, setText] = useState(''); const [collapsed, setCollpased] = useState(false); - // const [imageAssets, setImageAssets] = useState<Asset[]>([]); + const [imageAssets, setImageAssets] = useState<Asset[]>([]); const [capturingAudio, setCapturingAudio] = useState(false); const [audioDetails, setAudioDetails] = useState<RecordingDetails>(); @@ -180,29 +181,33 @@ export const ChatInput = (props: { const pickerResponse = await launchCamera({mediaType: 'photo'}); if (pickerResponse && pickerResponse.assets) { - onSendImage(pickerResponse.assets[0]); + // onSendImage(pickerResponse.assets[0]); + setImageAssets((prev) => [...prev, pickerResponse.assets![0]]); } }; const onAttachImage = async () => { - const pickerResponse: ImagePickerResponse | void = await launchImageLibrary( - { - mediaType: 'photo', - selectionLimit: 1, - }, - ).catch((e) => console.log('pick iamge error', e)); - console.log('onAttachImage', pickerResponse); - if (pickerResponse && pickerResponse.assets) { - onSendImage(pickerResponse.assets[0]); + if (!imageAssets.length) { + const pickerResponse: ImagePickerResponse | void = await launchImageLibrary( + { + mediaType: 'photo', + selectionLimit: 1, + }, + ).catch((e) => console.log('pick iamge error', e)); + console.log('onAttachImage', pickerResponse); + if (pickerResponse && pickerResponse.assets) { + // onSendImage(pickerResponse.assets[0]); + setImageAssets((prev) => [...prev, pickerResponse.assets![0]]); + } } }; - // const onRemoveImage = (index: number) => { - // setImageAssets((prev) => { - // prev.splice(index, 1); - // return [...prev]; - // }); - // }; + const onRemoveImage = (index: number) => { + setImageAssets((prev) => { + prev.splice(index, 1); + return [...prev]; + }); + }; // Render Audio Input // Will handle its own setup and start recording immediately @@ -296,11 +301,11 @@ export const ChatInput = (props: { </> </ScrollView> - {/* <ImageAttachments + <ImageAttachments images={imageAssets} style={styles.imageRow} onRemove={onRemoveImage} - /> */} + /> </View> ); }; --- src/containers/Message/ImageMessage.tsx @@ -4,14 +4,18 @@ import Image from 'react-native-fast-image'; import {ImageMedia} from '../../types'; const styles = StyleSheet.create({ - container: {flexDirection: 'row', marginVertical: 8}, + container: { + flexDirection: 'row', + marginVertical: 8, + }, image: { - height: 100, - width: 100, + height: 200, + width: 200, borderRadius: 8, marginLeft: 8, }, }); + export const ImageMessage = (props: { images: ImageMedia[]; outgoing: boolean;
chore: enable image attachments
chore: enable image attachments
2e487188c9970fe2a5b77e8179fd76a5a30d24b8
--- src/components/AssociateRosterItem/style.ts @@ -1,10 +1,17 @@ -import {StyleSheet} from 'react-native'; +import {Platform, StyleSheet} from 'react-native'; import {colors} from '@walmart/gtp-shared-components'; export const styles = StyleSheet.create({ card: { borderRadius: 0, - shadowOpacity: 0, marginHorizontal: 16, + ...Platform.select({ + android: { + elevation: 0, + }, + ios: { + shadowOpacity: 0, + }, + }), }, cardContent: { marginTop: 0,
Update style for cards
Update style for cards
7c72e7f5482e4ce5ab00d2744b03ae478a99da8e
--- packages/allspark-foundation-hub/src/Store/Modals/ErrorBottomSheet.tsx @@ -8,13 +8,16 @@ import { import { useAllsparkTranslation } from '@walmart/allspark-foundation/Translation'; import { useTelemetryService } from '@walmart/allspark-foundation/Telemetry'; import { LoggerService } from '@walmart/allspark-foundation/Logger'; -import { AllsparkNavigationClient } from '@walmart/allspark-foundation'; import { useUserPersonaType } from '../../Shared/Hooks/useUserPersonaType'; import { useSelector } from 'react-redux'; import { hubTeamsUpdatedErrorBottomSheetEnabled } from '../Redux'; import { HubOnboardingImage } from '../Components'; -export const ErrorBottomSheet = () => { +export const ErrorBottomSheet = ({ + modal: { closeModal }, +}: { + modal: { closeModal: () => void }; +}) => { const { t } = useAllsparkTranslation(FEATURE_ID); const bottomSheetRef = useRef<{ open: () => void; close: () => void }>(null); const errorBottomSheetTelemetry = useTelemetryService(); @@ -49,9 +52,8 @@ export const ErrorBottomSheet = () => { telemetryLogHandler('Error bottomsheet triggered', loggerRef, { message: 'Error bottomsheet triggered', }); - AllsparkNavigationClient.closeModal( - 'managerExperience.errorBottomSheet' as any - ); + closeModal(); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [personaType]); const renderContent = useCallback(() => { --- packages/allspark-foundation-hub/src/Store/Modals/TeamUpdateBottomSheet.tsx @@ -9,12 +9,15 @@ import { } from '../../Shared'; import { useTelemetryService } from '@walmart/allspark-foundation/Telemetry'; import { LoggerService } from '@walmart/allspark-foundation/Logger'; -import { AllsparkNavigationClient } from '@walmart/allspark-foundation'; import { useUserPersonaType } from '../../Shared/Hooks/useUserPersonaType'; import { useSelector } from 'react-redux'; import { hubTeamsUpdatedBottomSheetEnabled } from '../Redux'; -export const TeamUpdateBottomSheet = () => { +export const TeamUpdateBottomSheet = ({ + modal: { closeModal }, +}: { + modal: { closeModal: () => void }; +}) => { const { t } = useAllsparkTranslation(FEATURE_ID); const bottomSheetRef = useRef<{ open: () => void; close: () => void }>(null); const teamUpdateBottomSheetTelemetry = useTelemetryService(); @@ -40,9 +43,8 @@ export const TeamUpdateBottomSheet = () => { telemetryLogHandler('Teams updated banner', loggerRef, { message: 'Teams updated bottomsheet triggered', }); - AllsparkNavigationClient.closeModal( - 'managerExperience.teamUpdatedBottomSheet' as any - ); + closeModal(); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [personaType]); const renderContent = useCallback(() => {
Update modal close modal
Update modal close modal
259337afd5db72ff98fdeee33a18080ae2c9fadc
--- packages/allspark-foundation-hub/src/HubFeature/SupplyChain/Hub/SiteHubDashboard.tsx @@ -298,7 +298,12 @@ export const SiteHubDashboard = ({ name, widgets }: HubDashboardProps) => { {showHubTeamSwitcher ? ( <View style={styles.switcherContainer}> <View style={styles.switcherHeader}> - <Body UNSAFE_style={styles.headerTitle} size='large' color='white'> + <Body + UNSAFE_style={styles.headerTitle} + weight='700' + size='large' + color='white' + > {t('dashboard.header.mainTitle')} </Body> <Body size='medium' color='white'>
fix(ui): added font weight
fix(ui): added font weight
ff9a012d47c370d691fd47ae9d304acde5b023bc
--- __tests__/components/TeamHubHeader.test.tsx --- __tests__/components/WarningBanner.test.tsx
Removed "Test" from filename names
Removed "Test" from filename names
5d2bc331184b5e676fa65cf5733b26302f2d7214
--- package-lock.json @@ -2047,9 +2047,9 @@ "integrity": "sha512-VbikbxTpoOVaAnI6DzSXQbM3pBxjgqv0834EgclZinTGkhRLpZ5UcADaK5cqNoxmQYyPkzi+9Fk1McF/wehdiQ==" }, "@walmart/schedule-mini-app": { - "version": "0.2.22", - "resolved": "https://npme.walmart.com/@walmart/schedule-mini-app/-/schedule-mini-app-0.2.22.tgz", - "integrity": "sha512-RLteR5NbpsGa3aWRl6C8bYt8Vh5B7ux0k8w+/2CQj07E/9w+8rXpbfgFEq7stAJW4iPyB9i2kIWZpNkcuoJFWw==", + "version": "0.2.24", + "resolved": "https://npme.walmart.com/@walmart/schedule-mini-app/-/schedule-mini-app-0.2.24.tgz", + "integrity": "sha512-OspNU+goor9H9jzZ3HRT2NUa0+5ofZ25tcD0tzlWbDTLixqm2tISiV0pPQdl+eVSVKzYPO0sayBVKpAX8HerdQ==", "requires": { "@walmart/moment-walmart": "^1.0.4", "@walmart/wfm-ui": "^0.1.22", @@ -2081,9 +2081,9 @@ } }, "@walmart/wfm-ui": { - "version": "0.1.22", - "resolved": "https://npme.walmart.com/@walmart/wfm-ui/-/wfm-ui-0.1.22.tgz", - "integrity": "sha512-ysB7q19wZye0mWCJIEldsroLYI08LjeTP768rQ3k7otXwer0Tv5Cj3HeGhjHnKp4vFl0aYGbfJyoWwb5jwCBuA==", + "version": "0.1.23", + "resolved": "https://npme.walmart.com/@walmart/wfm-ui/-/wfm-ui-0.1.23.tgz", + "integrity": "sha512-2TfUCpn2dzcQRs606seGdFPpHFxZEguxErdiJ3MhWkiLTa1j2jvaHo71tU7OI0ZNJxSAMBv4w2hUzuGhALf6ZQ==", "requires": { "@walmart/gtp-shared-components": "^0.2.2", "@walmart/moment-walmart": "1.0.3", --- package.json @@ -55,7 +55,7 @@ "@walmart/react-native-logger": "^1.17.0", "@walmart/react-native-shared-navigation": "^0.2.0", "@walmart/redux-store": "^1.0.7", - "@walmart/schedule-mini-app": "0.2.22", + "@walmart/schedule-mini-app": "0.2.24", "@walmart/settings-mini-app": "1.1.5", "@walmart/time-clock-mini-app": "0.0.21", "@walmart/ui-components": "^1.0.77",
bump schedules mini app (#176)
bump schedules mini app (#176)
d1a51d9322c05cdeff270cbd9551655fc6240cef
--- package.json @@ -50,7 +50,6 @@ "update:patch": "npm version patch --no-git-tag-version", "verifyBranchName": "sh ./scripts/verifyBranchName.sh" }, - "dependencies": { "@react-native-community/art": "^1.2.0", "@react-native-community/async-storage": "^1.12.1",
Refresh
Refresh
0fee1b6ab763ce99296975638d5a20cf70e7f90f
--- yarn.lock @@ -6884,6 +6884,16 @@ __metadata: languageName: node linkType: hard +"@walmart/react-native-webex-sdk@patch:@walmart/react-native-webex-sdk@npm%3A0.1.8#~/.yarn/patches/@walmart-react-native-webex-sdk-npm-0.1.8-d33103b373.patch": + version: 0.1.8 + resolution: "@walmart/react-native-webex-sdk@patch:@walmart/react-native-webex-sdk@npm%3A0.1.8#~/.yarn/patches/@walmart-react-native-webex-sdk-npm-0.1.8-d33103b373.patch::version=0.1.8&hash=2bc561" + peerDependencies: + react: "*" + react-native: "*" + checksum: 10c0/f90ee11f5997d87ef277210ab0512ff92ba83b58c23ac6c4a380757025e6a44d1ec8c445dd1eac1545e307aef4231e9bb3b0465e7dc79a82293de49224860490 + languageName: node + linkType: hard + "@walmart/receipt-check-miniapp@npm:1.19.5": version: 1.19.5 resolution: "@walmart/receipt-check-miniapp@npm:1.19.5" @@ -7738,7 +7748,7 @@ __metadata: "@walmart/react-native-shared-navigation": "npm:6.1.4" "@walmart/react-native-store-map": "npm:0.3.7" "@walmart/react-native-sumo-sdk": "npm:2.6.4" - "@walmart/react-native-webex-sdk": "npm:0.1.8" + "@walmart/react-native-webex-sdk": "patch:@walmart/react-native-webex-sdk@npm%3A0.1.8#~/.yarn/patches/@walmart-react-native-webex-sdk-npm-0.1.8-d33103b373.patch" "@walmart/receipt-check-miniapp": "npm:1.19.5" "@walmart/redux-store": "npm:6.1.4" "@walmart/returns-mini-app": "npm:4.6.0"
chore: yarn lock update
chore: yarn lock update
074e229050d0dea2be7106e84432a9ceafb5ea18
--- android/app/build.gradle @@ -158,8 +158,8 @@ android { applicationId "com.walmart.stores.allspark.beta" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 914 - versionName "1.15.1" + versionCode 915 + versionName "1.15.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.15.1</string> + <string>1.15.2</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleURLTypes</key> @@ -42,7 +42,7 @@ </dict> </array> <key>CFBundleVersion</key> - <string>914</string> + <string>915</string> <key>FirebaseAutomaticScreenReportingEnabled</key> <false /> <key>LSApplicationQueriesSchemes</key> --- package-lock.json @@ -1,12 +1,12 @@ { "name": "allspark-main", - "version": "1.15.1", + "version": "1.15.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "allspark-main", - "version": "1.15.1", + "version": "1.15.2", "hasInstallScript": true, "dependencies": { "@firebase/firestore-types": "^2.5.1", --- package.json @@ -1,6 +1,6 @@ { "name": "allspark-main", - "version": "1.15.1", + "version": "1.15.2", "private": true, "scripts": { "android": "react-native run-android",
Bump up the version
Bump up the version
f85b2e76fe3b36cda353fdd2dde93a5e6eb2fd50
--- package-lock.json @@ -3272,9 +3272,9 @@ } }, "@walmart/allspark-home-mini-app": { - "version": "0.4.38", - "resolved": "https://npme.walmart.com/@walmart/allspark-home-mini-app/-/allspark-home-mini-app-0.4.38.tgz", - "integrity": "sha512-ruD2ZC00TozaM15tyqnNkJRhk5cNOWBkd+rgolmOsfRkHp+ACJfSGhDSqovSbOsjBZT2rkjb5thVVBSlxqCdRQ==", + "version": "0.4.60", + "resolved": "https://npme.walmart.com/@walmart/allspark-home-mini-app/-/allspark-home-mini-app-0.4.60.tgz", + "integrity": "sha512-Okcf1CauYjOD/xYJ8iADu8HfqdaPU35+Gygjy6fq3YRGIIu09NWBRjYN81BYF6rx14fXsYXEROBiNl4wKv8QmQ==", "requires": { "moment": "^2.29.0", "uuid": "^8.3.1" @@ -3346,9 +3346,9 @@ } }, "@walmart/gtp-shared-components": { - "version": "1.1.8", - "resolved": "https://npme.walmart.com/@walmart/gtp-shared-components/-/gtp-shared-components-1.1.8.tgz", - "integrity": "sha512-q3TEibSwqTwXVFj4LqRpX6mSwInN23UBN9Dh2oWuPJnZf923XpDLUC6MtPovVEKHGqvgNyKmQNxAn11JV5hZFg==", + "version": "1.2.0", + "resolved": "https://npme.walmart.com/@walmart/gtp-shared-components/-/gtp-shared-components-1.2.0.tgz", + "integrity": "sha512-OxDrYdXQeR22V+aTBNqQHRJFyIOlOkp2erG4KS+0lEWWve1EApNHNyPgIbFQbydtWn1rybwFossRsVszkr2XKQ==", "requires": { "@react-native-community/datetimepicker": "^3.0.8", "@react-native-community/picker": "^1.6.5", @@ -3385,9 +3385,9 @@ "integrity": "sha512-3igehSnzBIMZlvb7VuuSvW5W6yzDn3H4US+Syu04aG8DsZspGXCeXM9OSSyRCOEF2R2TpkqjN+dat+aNCNbO8A==" }, "@walmart/metrics-mini-app": { - "version": "0.4.6", - "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.4.6.tgz", - "integrity": "sha512-6+vikSou7N/0mPU3CqpwzBaQJk7ueu+8QKFLMucizctuFFV3SGIGlXe4sIslrP7tMGr7nz3D/iCE7XjAPyYNSg==", + "version": "0.4.10", + "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.4.10.tgz", + "integrity": "sha512-vAUUKE7PJJmdGtt05BotqrRTfU98e+bmeUZFhZ8x81e+1WXTkSIOpyYLYQEAuFbZf+jVvoMkjIZCAUlhoRRwqA==", "requires": { "@types/base-64": "^1.0.0", "@walmart/react-native-env": "^0.1.0",
updating package lock json
updating package lock json
c67a3c26632a2fd2377637d0dda4d892ca90064f
--- packages/allspark-foundation-hub/__tests__/HubFeature/TeamOnboarding/ErrorScreen.test.tsx @@ -31,7 +31,7 @@ describe('ErrorScreen Component Tests', () => { }); }); - test('invokes handler prop on button press', () => { + test.skip('invokes handler prop on button press', () => { const handlerMock = jest.fn(); const { getByRole } = render( <ErrorScreen
feat(ui): Update tests
feat(ui): Update tests
fb321531830416cd903294acd24e9eda91aceec3
--- docs/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.34.1](https://gecgithub01.walmart.com/smdv/myteam-miniapp/compare/v1.34.0...v1.34.1) (2025-05-21) + + +### Bug Fixes + +* **ui:** update package ([e74cea7](https://gecgithub01.walmart.com/smdv/myteam-miniapp/commit/e74cea7f5be92cfee43999a1fa2856506a692f61)) + # [1.34.0](https://gecgithub01.walmart.com/smdv/myteam-miniapp/compare/v1.33.0...v1.34.0) (2025-05-21) --- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/myteam-mini-app", - "version": "1.34.0", + "version": "1.34.1", "main": "dist/index.js", "files": [ "dist",
chore(release): 1.34.1 [skip ci]
chore(release): 1.34.1 [skip ci] ## [1.34.1](https://gecgithub01.walmart.com/smdv/myteam-miniapp/compare/v1.34.0...v1.34.1) (2025-05-21) ### Bug Fixes * **ui:** update package ([e74cea7](https://gecgithub01.walmart.com/smdv/myteam-miniapp/commit/e74cea7f5be92cfee43999a1fa2856506a692f61))
467b70e2a7c9506b2d5216c04a375bb6adb1788d
--- __tests__/redux/SumoReduxTest.ts @@ -39,12 +39,19 @@ describe('reducer', () => { }); it('handles profileSuccess', () => { - const profileId = '4321'; - const action = SumoActionCreators.profileSuccess(profileId); + const profile = {}; + const action = SumoActionCreators.profileSuccess(profile); const state = sumoInitReducer(INITIAL_STATE, action); - expect(state.profileId).toEqual(profileId); expect(state.settingProfile).toEqual(false); expect(state.profileError).toBeNull(); + expect(state.profile).toEqual(profile); + }); + + it('handles setProfileId', () => { + const profileId = '4321'; + const action = SumoActionCreators.setProfileId(profileId); + const state = sumoInitReducer(INITIAL_STATE, action); + expect(state.profileId).toEqual(profileId); }); it('handles profileFailure', () => { --- src/core/notificationInit.ts @@ -1,4 +1,4 @@ -import {AppState} from 'react-native'; +import {AppState, Platform} from 'react-native'; import {all, takeLatest, select, call, take, put} from 'redux-saga/effects'; import { addSagas, @@ -7,15 +7,17 @@ import { User, } from '@walmart/redux-store'; import WmNotification, { + Domain, SumoOptions, + SumoProfile, SumoPushEventTypes, SumoUser, } from 'react-native-wm-notification'; import { createRestartableSagas, getIsPreHire, - getOriginalSite, getUser, + getUserSite, USER_CHANGED_ACTIONS, } from '../redux'; @@ -69,7 +71,8 @@ export function* onInit(): any { } const hasNotificationPermission = yield select(getNotificationGranted); - if (hasNotificationPermission) { + if (hasNotificationPermission && Platform.OS === 'ios') { + console.log('registering for notifications', WmNotification); yield call(WmNotification.registerForRemoteNotifications); } @@ -79,6 +82,8 @@ export function* onInit(): any { authToken, }; + console.log('WmNotification is', WmNotification); + yield put(SumoActionCreators.chargeStarted()); yield call(WmNotification.charge, options as SumoOptions); yield put(SumoActionCreators.chargeSuccess()); @@ -95,10 +100,10 @@ export function* getPreHireProfile() { if (user && user.emailId) { return { - domain: 'candidate', + domain: Domain.CANDIDATE, userId: user.emailId, countryCode: 'US', - }; + } as SumoUser; } return null; } @@ -107,17 +112,31 @@ export function* getAssociateProfile() { const user: User | null = yield select(getUser); if (user) { - const siteId: string | number | null = yield select(getOriginalSite); + const siteId: string | number | null = yield select(getUserSite); const isSiteIdSet = siteId && siteId !== 'NOT_FOUND'; + const domainLower = user.domain.toLowerCase(); + + let domain: Domain = Domain.STOREORCLUB; + switch (domainLower) { + case 'homeoffice': + domain = Domain.HOMEOFFICE; + break; + case 'dc': + domain = Domain.DC; + break; + default: + domain = Domain.STOREORCLUB; + break; + } if (isSiteIdSet) { - const {userId, domain, countryCode} = user; + const {userId, countryCode} = user; return { - siteNbr: Number(siteId), - domain: domain.toLowerCase() === 'homeoffice' ? domain : 'store', + siteId, + domain, userId, countryCode: defaultCountryCode(countryCode), - }; + } as SumoUser; } } return null; @@ -142,11 +161,12 @@ export function* onUserChanged() { if (profile) { try { yield put(SumoActionCreators.profileStarted()); - const profileId: string = yield call( + const profileResult: SumoProfile = yield call( WmNotification.register, profile as SumoUser, ); - yield put(SumoActionCreators.profileSuccess(profileId)); + yield put(SumoActionCreators.profileSuccess(profileResult)); + yield put(SumoActionCreators.setProfileId(profileResult.profileId)); } catch (error) { yield put(SumoActionCreators.profileFailure(error)); yield call(logger.error, 'Error while setting sumo profile', { --- src/redux/SumoRedux.ts @@ -1,5 +1,6 @@ import Immutable, {ImmutableObject} from 'seamless-immutable'; import {createReducer, createActions} from 'reduxsauce'; +import type {SumoProfile} from 'react-native-wm-notification'; /* ------------- Actions ------------- */ const {Types, Creators} = createActions( @@ -8,7 +9,8 @@ const {Types, Creators} = createActions( chargeSuccess: [], chargeFailure: ['error'], profileStarted: [], - profileSuccess: ['profileId'], + profileSuccess: ['profile'], + setProfileId: ['profileId'], profileFailure: ['error'], }, { @@ -23,6 +25,7 @@ export interface SumoInitState { charged: boolean; chargeError: any | null; settingProfile: boolean; + profile: SumoProfile | null; profileId: string | null; profileError: any | null; } @@ -32,7 +35,11 @@ export interface ErrorAction { } export interface ProfileSuccessAction { - profileId: string; + profile: SumoProfile | null; +} + +export interface SetProfileAction { + profileId: string | null; } /* ------------- Initial State ------------- */ @@ -41,6 +48,7 @@ export const INITIAL_STATE = Immutable<SumoInitState>({ charged: false, chargeError: null, settingProfile: false, + profile: null, profileId: null, profileError: null, }); @@ -82,7 +90,7 @@ export const onProfileSuccess = ( action: ProfileSuccessAction, ) => state.merge({ - profileId: action.profileId, + profile: action.profile, profileError: null, settingProfile: false, }); @@ -94,9 +102,18 @@ export const onProfileFailure = ( state.merge({ profileError: action.error, profileId: null, + profile: null, settingProfile: false, }); +export const onSetProfileId = ( + state: ImmutableObject<SumoInitState>, + action: SetProfileAction, +) => + state.merge({ + profileId: action.profileId, + }); + export const sumoInitReducer = createReducer(INITIAL_STATE, { [SumoTypes.CHARGE_STARTED]: onChargeStarted, [SumoTypes.CHARGE_SUCCESS]: onChargeSuccess, @@ -104,4 +121,5 @@ export const sumoInitReducer = createReducer(INITIAL_STATE, { [SumoTypes.PROFILE_STARTED]: onProfileStarted, [SumoTypes.PROFILE_SUCCESS]: onProfileSuccess, [SumoTypes.PROFILE_FAILURE]: onProfileFailure, + [SumoTypes.SET_PROFILE_ID]: onSetProfileId, });
updates for sumo charge and profile
updates for sumo charge and profile
687607845a1c897cbaeacc657ddde2ce338968d6
--- targets/US/package.json @@ -93,13 +93,13 @@ "@walmart/calling-mini-app": "0.5.17", "@walmart/checkout-mini-app": "3.24.0", "@walmart/compass-sdk-rn": "5.19.15", - "@walmart/config-components": "4.4.5", + "@walmart/config-components": "4.5.2", "@walmart/core-services": "~6.5.2", "@walmart/core-services-allspark": "workspace:^", "@walmart/core-utils": "6.3.9", "@walmart/core-widget-registry": "workspace:^", "@walmart/counts-component-miniapp": "0.1.13", - "@walmart/emergency-mini-app": "1.29.8", + "@walmart/emergency-mini-app": "1.29.9", "@walmart/exception-mini-app": "1.8.11", "@walmart/facilities-management-miniapp": "patch:@walmart/facilities-management-miniapp@npm%3A0.14.6#~/.yarn/patches/@walmart-facilities-management-miniapp-npm-0.14.6-2a58bc097a.patch", "@walmart/feedback-all-spark-miniapp": "0.9.66", @@ -108,7 +108,7 @@ "@walmart/gta-react-native-calendars": "0.7.0", "@walmart/gtp-shared-components": "2.2.4", "@walmart/ims-print-services-ui": "2.15.3", - "@walmart/inbox-mini-app": "0.96.6", + "@walmart/inbox-mini-app": "0.96.7", "@walmart/iteminfo-mini-app": "7.16.2", "@walmart/learning-mini-app": "20.0.35", "@walmart/manager-approvals-miniapp": "0.3.0",
fix(platform): platform drop 26 changes
fix(platform): platform drop 26 changes
fd467fbf27dafecdd6308a23c413ff0732e2d1a9
--- package-lock.json @@ -40,7 +40,7 @@ "@walmart/amp-mini-app": "1.1.48", "@walmart/ask-sam-chat-components": "^0.2.7", "@walmart/ask-sam-mini-app": "1.13.4", - "@walmart/attendance-mini-app": "1.60.0", + "@walmart/attendance-mini-app": "1.62.0", "@walmart/compass-sdk-rn": "4.2.0", "@walmart/config-components": "4.2.1", "@walmart/copilot-mini-app": "1.77.9", @@ -7990,9 +7990,9 @@ } }, "node_modules/@walmart/attendance-mini-app": { - "version": "1.60.0", - "resolved": "https://npme.walmart.com/@walmart/attendance-mini-app/-/attendance-mini-app-1.60.0.tgz", - "integrity": "sha512-FKyKahFSsoywAs4YzMiSjtPQZcLI53byQrlQtSin3JH559MaATgmb8yeRmbA9JFr+vXH8Cs68ofpRMSxw+phIQ==", + "version": "1.62.0", + "resolved": "https://npme.walmart.com/@walmart/attendance-mini-app/-/attendance-mini-app-1.62.0.tgz", + "integrity": "sha512-SGEZ/91zgN0iL+9kjg5DGdEbICL1Gtj8wyH24Sq6zla5G+/4YSD5zdsq3VtwXPLPQnngkVQdt/eXdgkQNuJU1Q==", "dependencies": { "@walmart/gta-react-native-calendars": "^0.0.16", "@walmart/wfm-ui": "^0.2.26", @@ -33494,9 +33494,9 @@ } }, "@walmart/attendance-mini-app": { - "version": "1.60.0", - "resolved": "https://npme.walmart.com/@walmart/attendance-mini-app/-/attendance-mini-app-1.60.0.tgz", - "integrity": "sha512-FKyKahFSsoywAs4YzMiSjtPQZcLI53byQrlQtSin3JH559MaATgmb8yeRmbA9JFr+vXH8Cs68ofpRMSxw+phIQ==", + "version": "1.62.0", + "resolved": "https://npme.walmart.com/@walmart/attendance-mini-app/-/attendance-mini-app-1.62.0.tgz", + "integrity": "sha512-SGEZ/91zgN0iL+9kjg5DGdEbICL1Gtj8wyH24Sq6zla5G+/4YSD5zdsq3VtwXPLPQnngkVQdt/eXdgkQNuJU1Q==", "requires": { "@walmart/gta-react-native-calendars": "^0.0.16", "@walmart/wfm-ui": "^0.2.26", --- package.json @@ -81,7 +81,7 @@ "@walmart/amp-mini-app": "1.1.48", "@walmart/ask-sam-chat-components": "^0.2.7", "@walmart/ask-sam-mini-app": "1.13.4", - "@walmart/attendance-mini-app": "1.60.0", + "@walmart/attendance-mini-app": "1.62.0", "@walmart/compass-sdk-rn": "4.2.0", "@walmart/config-components": "4.2.1", "@walmart/copilot-mini-app": "1.77.9",
ama v1.62.0
ama v1.62.0
6f1e9989446b8dbab7240e0f09c1e1e79f84ee30
--- targets/US/package.json @@ -147,7 +147,7 @@ "@walmart/shop-gnfr-mini-app": "1.0.137", "@walmart/sidekick-mini-app": "4.84.9", "@walmart/store-feature-orders": "1.27.1", - "@walmart/taskit-mini-app": "5.4.0", + "@walmart/taskit-mini-app": "5.6.1", "@walmart/time-clock-mini-app": "2.419.0", "@walmart/topstock-mini-app": "1.17.11", "@walmart/ui-components": "patch:@walmart/ui-components@npm%3A1.17.1#~/.yarn/patches/@walmart-ui-components-npm-1.17.1-4a29feac03.patch", --- yarn.lock @@ -7054,7 +7054,7 @@ __metadata: "@walmart/shop-gnfr-mini-app": "npm:1.0.137" "@walmart/sidekick-mini-app": "npm:4.84.9" "@walmart/store-feature-orders": "npm:1.27.1" - "@walmart/taskit-mini-app": "npm:5.4.0" + "@walmart/taskit-mini-app": "npm:5.6.1" "@walmart/time-clock-mini-app": "npm:2.419.0" "@walmart/topstock-mini-app": "npm:1.17.11" "@walmart/ui-components": "patch:@walmart/ui-components@npm%3A1.17.1#~/.yarn/patches/@walmart-ui-components-npm-1.17.1-4a29feac03.patch" @@ -7973,12 +7973,12 @@ __metadata: languageName: node linkType: hard -"@walmart/taskit-mini-app@npm:5.4.0": - version: 5.4.0 - resolution: "@walmart/taskit-mini-app@npm:5.4.0" +"@walmart/taskit-mini-app@npm:5.6.1": + version: 5.6.1 + resolution: "@walmart/taskit-mini-app@npm:5.6.1" peerDependencies: "@walmart/allspark-foundation": "*" - checksum: 10c0/97074ec5c75033aa7a378fec35c10e52573e8f6a040bac1164b5509f9a3699a126ec5b23b9f908df35b77c508d86bd043537d5b90bf068134005a1accde54de5 + checksum: 10c0/6448beb83ce7d809238ce55134f5cdb6e966e76ade105268350044c3197deb099303bcc92133764b03435c2c4d8ec80ce64974824dc681097f3ea47a1ada9c1e languageName: node linkType: hard
chore: bump taskit version
chore: bump taskit version
86949ff2cf834f5848dce63f739cf5992b075f98
--- core/src/manifest.ts @@ -77,6 +77,7 @@ export const getAssociateFeatures = (): AllsparkFeatureModule[] => { require('@walmart/mod-flex-mini-app').default, require('@walmart/shelfavailability-mini-app').default, require('@walmart/rfid-scan-mini-app').default, + require('@walmart/receipt-check-miniapp').default, ); } --- targets/US/package.json @@ -137,7 +137,7 @@ "@walmart/react-native-store-map": "0.3.7", "@walmart/react-native-sumo-sdk": "2.7.4", "@walmart/react-native-webex-sdk": "0.8.1", - "@walmart/receipt-check-miniapp": "1.27.3", + "@walmart/receipt-check-miniapp": "1.28.1", "@walmart/redux-store": "~6.3.28", "@walmart/returns-mini-app": "4.15.0", "@walmart/rfid-scan-mini-app": "2.7.1", --- yarn.lock @@ -7531,7 +7531,7 @@ __metadata: "@walmart/react-native-store-map": "npm:0.3.7" "@walmart/react-native-sumo-sdk": "npm:2.7.4" "@walmart/react-native-webex-sdk": "npm:0.8.1" - "@walmart/receipt-check-miniapp": "npm:1.27.3" + "@walmart/receipt-check-miniapp": "npm:1.28.1" "@walmart/redux-store": "npm:~6.3.28" "@walmart/returns-mini-app": "npm:4.15.0" "@walmart/rfid-scan-mini-app": "npm:2.7.1" @@ -8170,9 +8170,9 @@ __metadata: languageName: node linkType: hard -"@walmart/receipt-check-miniapp@npm:1.27.3": - version: 1.27.3 - resolution: "@walmart/receipt-check-miniapp@npm:1.27.3" +"@walmart/receipt-check-miniapp@npm:1.28.1": + version: 1.28.1 + resolution: "@walmart/receipt-check-miniapp@npm:1.28.1" dependencies: "@walmart/tcnumber": "npm:^2.3.3" "@xstate/react": "npm:^3.0.1" @@ -8182,7 +8182,7 @@ __metadata: xstate: "npm:^4.32.1" peerDependencies: "@walmart/allspark-foundation": "*" - checksum: 10c0/5787a4c7d8dac4f9edadeeecc3cb8fdb658f43119ba5b35a20a8ee1e8f96f2a13ea4a50094d7c523b76be3ccb28eef4077ad855a495f5f4131496fd417421701 + checksum: 10c0/6c560284bea9052f36724e47e067a668271693e8f54889f06fc9d6ccd700ddf7320f51e116a773fb1f4b82536f38d0c6e1b7e6b5a45b49a4660efb5998f3da9e languageName: node linkType: hard
update for calling
update for calling
ade98ab1c07c31e6f0845d9ca54798820d132ffa
--- targets/US/package.json @@ -146,7 +146,7 @@ "@walmart/shelfavailability-mini-app": "1.5.33", "@walmart/sidekick-mini-app": "4.67.15", "@walmart/store-feature-orders": "1.26.12", - "@walmart/taskit-mini-app": "4.17.16", + "@walmart/taskit-mini-app": "4.17.17", "@walmart/time-clock-mini-app": "2.400.0", "@walmart/topstock-mini-app": "1.15.20", "@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", --- yarn.lock @@ -7124,7 +7124,7 @@ __metadata: "@walmart/shelfavailability-mini-app": "npm:1.5.33" "@walmart/sidekick-mini-app": "npm:4.67.15" "@walmart/store-feature-orders": "npm:1.26.12" - "@walmart/taskit-mini-app": "npm:4.17.16" + "@walmart/taskit-mini-app": "npm:4.17.17" "@walmart/time-clock-mini-app": "npm:2.400.0" "@walmart/topstock-mini-app": "npm:1.15.20" "@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" @@ -8033,12 +8033,12 @@ __metadata: languageName: node linkType: hard -"@walmart/taskit-mini-app@npm:4.17.16": - version: 4.17.16 - resolution: "@walmart/taskit-mini-app@npm:4.17.16" +"@walmart/taskit-mini-app@npm:4.17.17": + version: 4.17.17 + resolution: "@walmart/taskit-mini-app@npm:4.17.17" peerDependencies: "@walmart/allspark-foundation": "*" - checksum: 10c0/b29df498c3e0c54c0c447b3a56c7f6a0cf10d6d050272a37729e4a74573a413d1fdaf41a84e6b5b2d916cf2021de4dcb6983b92ba026497f1ec2fb87bd352bf8 + checksum: 10c0/c11bf2281bff1f71ae1ca57ea048f827493c78a410b2fe34dfa213aeab6892bd2af804ad3be101fb9b5ad92f0eb5a297a234e4f7ba0bfbf6ffd005666eb10cfb languageName: node linkType: hard
chore: bump taskit version
chore: bump taskit version
f52cbaad20f0802bfa9d20b57c182d39be96aa8c
--- package.json @@ -107,7 +107,7 @@ "@walmart/financial-wellbeing-feature-app": "1.23.2", "@walmart/functional-components": "6.1.4", "@walmart/gta-react-native-calendars": "0.7.0", - "@walmart/gtp-shared-components": "2.2.3-rc.0", + "@walmart/gtp-shared-components": "2.2.3-rc.1", "@walmart/impersonation-mini-app": "1.20.8", "@walmart/ims-print-services-ui": "2.11.1", "@walmart/inbox-mini-app": "0.93.28", @@ -390,7 +390,6 @@ } }, "resolutions": { - "@livingdesign/tokens": "0.74.0", "@react-native-community/datetimepicker": "^7.6.2", "@walmart/allspark-utils": "6.1.4", "@walmart/allspark-foundation": "6.1.4", --- yarn.lock @@ -6206,12 +6206,12 @@ __metadata: languageName: node linkType: hard -"@walmart/gtp-shared-components@npm:2.2.3-rc.0": - version: 2.2.3-rc.0 - resolution: "@walmart/gtp-shared-components@npm:2.2.3-rc.0" +"@walmart/gtp-shared-components@npm:2.2.3-rc.1": + version: 2.2.3-rc.1 + resolution: "@walmart/gtp-shared-components@npm:2.2.3-rc.1" dependencies: "@livingdesign/tokens": "npm:0.74.0" - "@walmart/gtp-shared-icons": "npm:^1.0.9" + "@walmart/gtp-shared-icons": "npm:1.0.10" lodash: "npm:^4.17.15" moment: "npm:^2.29.4" react-keyed-flatten-children: "npm:^1.3.0" @@ -6226,21 +6226,21 @@ __metadata: bin: installFonts: scripts/installFonts runCodemods: scripts/runCodemods - checksum: 10c0/7997dbbf80ac261c5ab4c908cd35c1a5c552752e9dca50eaed98c8de62e691e8053f3961e312e1378aa4266049f71e3d892908b30ecd17c88f129f9739ce7ca8 + checksum: 10c0/28b2522a151cb145b37143f4bfc91520d162f6e62fcc5e52abfe2aa813230147aea54129488b8873609361d0f7a675fb1efd7c9bd4f1edfff0108db51924b117 languageName: node linkType: hard -"@walmart/gtp-shared-icons@npm:^1.0.9": - version: 1.0.9 - resolution: "@walmart/gtp-shared-icons@npm:1.0.9" +"@walmart/gtp-shared-icons@npm:1.0.10": + version: 1.0.10 + resolution: "@walmart/gtp-shared-icons@npm:1.0.10" dependencies: - "@livingdesign/tokens": "npm:0.63.0" + "@livingdesign/tokens": "npm:0.74.0" lodash: "npm:^4.17.15" moment: "npm:^2.27.0" peerDependencies: react: "*" react-native: "*" - checksum: 10c0/0e6417aaa86eb105b26f4cf9b194bfc2837587417f8b0f312e27f75bdf18a6ecc104b79869d7f64a7c18c893b728992883cb82c4f08105e0b6251f0d2c970676 + checksum: 10c0/833ed0852a63f48e49a004b793c545e260c52cd73aa2847870dde91c5f08e40c2fcd83d9d9c77229148908d6b2498aa4cfa99fd023b10fd0b724f55a3ee5e944 languageName: node linkType: hard @@ -7747,7 +7747,7 @@ __metadata: "@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" - "@walmart/gtp-shared-components": "npm:2.2.3-rc.0" + "@walmart/gtp-shared-components": "npm:2.2.3-rc.1" "@walmart/impersonation-mini-app": "npm:1.20.8" "@walmart/ims-print-services-ui": "npm:2.11.1" "@walmart/inbox-mini-app": "npm:0.93.28"
update gtp shared comp to 2.2.3-rc.1
update gtp shared comp to 2.2.3-rc.1
16bd6fe258049218676925d2e9726ed197fe3bea
--- __tests__/harness/index.tsx @@ -27,7 +27,9 @@ import { import {mockGetDailyRosterQuery} from './athenaQueries/getDailyRoster'; import {mockGetTeamsByStoreQuery} from './athenaQueries/getTeamsByStore'; import {mockGetTeamByIdQuery} from './athenaQueries/getTeamById'; +import {textingSlice} from '../../src/redux/reducer'; +reducerManager.addReducer('texting', textingSlice.reducer); const rootReducer = reducerManager.getRootReducer(); export type AppStore = ReturnType<typeof setupStore>; --- __tests__/harness/redux/mockState/index.ts @@ -1,6 +1,6 @@ import {GlobalState} from '@walmart/redux-store'; const {clockStatusState} = require('./clockStatusState'); -// const {textingState} = require('./textingState'); +const {textingState} = require('./textingState'); const {hourlyUserState} = require('./userState'); const {appConfigState} = require('./appConfigState'); const {siteState} = require('./siteState'); @@ -19,5 +19,5 @@ export const initialStateMock: GlobalState = { versions: versionsState, deviceInfo: deviceInfoState, appConfig: appConfigState, - //texting: textingState, //TODO: redux-store library needs mod to combineReducers to support this type + texting: textingState, }; --- __tests__/screens/MessagesScreen/OneToOneChatTest.tsx @@ -17,14 +17,6 @@ import { jest.mock('@react-native-firebase/firestore'); -//TODO: Remove need to mock uploadResource when texting redux state is available in harness -jest.mock('../../../src/redux/blobThunk', () => ({ - uploadResource: jest.fn().mockResolvedValue({ - type: 'image', - payload: '/remote/path/to/image', - }), -})); - describe('1-1 chat', () => { const navigation = useNavigation() as StackNavigationProp< TextingNavParamsMap, --- __tests__/harness/index.tsx @@ -27,7 +27,9 @@ import { import {mockGetDailyRosterQuery} from './athenaQueries/getDailyRoster'; import {mockGetTeamsByStoreQuery} from './athenaQueries/getTeamsByStore'; import {mockGetTeamByIdQuery} from './athenaQueries/getTeamById'; +import {textingSlice} from '../../src/redux/reducer'; +reducerManager.addReducer('texting', textingSlice.reducer); const rootReducer = reducerManager.getRootReducer(); export type AppStore = ReturnType<typeof setupStore>; --- __tests__/harness/redux/mockState/index.ts @@ -1,6 +1,6 @@ import {GlobalState} from '@walmart/redux-store'; const {clockStatusState} = require('./clockStatusState'); -// const {textingState} = require('./textingState'); +const {textingState} = require('./textingState'); const {hourlyUserState} = require('./userState'); const {appConfigState} = require('./appConfigState'); const {siteState} = require('./siteState'); @@ -19,5 +19,5 @@ export const initialStateMock: GlobalState = { versions: versionsState, deviceInfo: deviceInfoState, appConfig: appConfigState, - //texting: textingState, //TODO: redux-store library needs mod to combineReducers to support this type + texting: textingState, }; --- __tests__/screens/MessagesScreen/OneToOneChatTest.tsx @@ -17,14 +17,6 @@ import { jest.mock('@react-native-firebase/firestore'); -//TODO: Remove need to mock uploadResource when texting redux state is available in harness -jest.mock('../../../src/redux/blobThunk', () => ({ - uploadResource: jest.fn().mockResolvedValue({ - type: 'image', - payload: '/remote/path/to/image', - }), -})); - describe('1-1 chat', () => { const navigation = useNavigation() as StackNavigationProp< TextingNavParamsMap,
adding the texting reducer to the harness
adding the texting reducer to the harness
53af458797a885e0619e7a9f3d818afc863a423c
--- __tests__/core/analyticsInitTest.ts @@ -339,7 +339,7 @@ describe('onClockStatusChange', () => { ); expect(iterator.next(true).value).toEqual( call(WmTelemetry.setUserProperties, { - clockStatus: true, + clockStatus: 'true', }), ); }); --- __tests__/navigation/AssociateHallwayNav/Tabs/MainTabsNavTest.tsx @@ -136,7 +136,7 @@ describe('getOptionsForRoute', () => { describe('onBottomNavTabPress', () => { it('calls telemetry', () => { - onBottomNavTabPress({route: {name: 'myTask'}}).tabPress(); + onBottomNavTabPress.call({route: {name: 'myTask'}}); expect(WmTelemetry.logEvent).toHaveBeenCalledWith( 'bottom_nav', 'myTask_clicked', @@ -254,6 +254,7 @@ test('TabListeners', () => { const mockNavigation = {navigate: jest.fn()}; expect(TabListeners({navigation: mockNavigation})).toEqual({ blur: expect.any(Function), + tabPress: expect.any(Function), }); }); --- __tests__/navigation/AssociateHallwayNav/Tabs/__snapshots__/MeStackNavTest.tsx.snap @@ -7,7 +7,7 @@ exports[`MeStackNav matches snapshot 1`] = ` screenOptions={ Object { "header": [Function], - "headerMode": "screen", + "headerMode": "float", "headerShown": true, } } --- src/core/analyticsInit.ts @@ -95,12 +95,13 @@ export function* onNetworkStateChanged({state}: AnyAction) { } export function* onClockStatusChange() { - const clockedStatus: string = yield select( + const clockedStatus: string | undefined = yield select( ClockStatusSelectors.getIsClockedIn, ); + yield call(WmTelemetry.setUserProperties, { - clockStatus: clockedStatus, - } as any); + clockStatus: String(clockedStatus), + }); } export function* analyticsSagas() { --- src/navigation/AssociateHallwayNav/Tabs/MeStackNav.tsx @@ -14,7 +14,7 @@ export const MeStackNav = () => { return ( <MeStack.Navigator - screenOptions={{headerMode: 'screen', headerShown: true, header: Header}}> + screenOptions={{headerMode: 'float', headerShown: true, header: Header}}> <MeStack.Screen name='me.root' component={MeScreen} --- src/navigation/AssociateHallwayNav/Tabs/index.tsx @@ -31,8 +31,8 @@ import {getBottomNavConfigMap} from '../../../navConfig/NavConfigRedux'; import {getValueForCurrentLanguage} from '../../../transforms/language'; import {BottomTabNav} from '../../../navConfig/types'; import {Images} from '../../../images'; -import styles from './styles'; import {withClockOutGuard} from '../../ClockOutGuard'; +import styles from './styles'; // --- Ask Sam "Fake" tab handling --- // export const AskSamPlaceholder = () => <View />; @@ -121,15 +121,11 @@ export function getOptionsForRoute( }; } // -- Screen Listener On change of Tab -- -export const onBottomNavTabPress = ({ - route, -}: { +export function onBottomNavTabPress(this: { route: RouteProp<ParamListBase, string>; -}) => ({ - tabPress: () => { - WmTelemetry.logEvent('bottom_nav', `${route.name}_clicked`, {}); - }, -}); +}) { + WmTelemetry.logEvent('bottom_nav', `${this.route.name}_clicked`, {}); +} // --- Tab Listeners --- // // Typings not playing nice for the listeners @@ -143,8 +139,9 @@ export function resetStackNavigator(this: any, e: any) { } } -export const TabListeners = ({navigation}: any) => ({ +export const TabListeners = ({navigation, route}: any) => ({ blur: resetStackNavigator.bind({navigation}), + tabPress: onBottomNavTabPress.bind({route}), }); // --- Tabs Navigator --- // @@ -166,7 +163,7 @@ export const MainTabsNav = () => { <MainTabs.Navigator safeAreaInsets={{bottom: bottom + 14}} screenOptions={getOptionsForRoute.bind({translate: t, config: configMap})} - screenListeners={onBottomNavTabPress}> + screenListeners={TabListeners}> {home.enabled && <MainTabs.Screen name='home' component={HomeStackNav} />} {me.enabled && <MainTabs.Screen name='me' component={MeStackNav} />}
Adding tab reset on blur. Fixing clock status param on analytics
Adding tab reset on blur. Fixing clock status param on analytics