commit_hash
stringlengths
40
40
input
stringlengths
13
7.99k
output
stringlengths
5
155
full_message
stringlengths
6
8.96k
b2cefd4d297f4a7541f672ea2b33e67ad364752e
--- __tests__/containers/ChatInput/__snapshots__/index.test.tsx.snap @@ -198,6 +198,7 @@ exports[`ChatInput should render properly with required and optional props 1`] = } > <TextInput + accessibilityLabel="Type a message" autoFocus={true} blurOnSubmit={false} maxLength={250} @@ -507,6 +508,7 @@ exports[`ChatInput should render properly with required and optional props 2`] = } > <TextInput + accessibilityLabel="Type a message" autoFocus={true} blurOnSubmit={false} maxLength={250} @@ -816,6 +818,7 @@ exports[`ChatInput should render properly with required and optional props 3`] = } > <TextInput + accessibilityLabel="Type a message" autoFocus={true} blurOnSubmit={false} maxLength={250} --- __tests__/screens/MessagesScreen/__snapshots__/OneToOneChatTests.tsx.snap @@ -1583,6 +1583,7 @@ exports[`Messages Screen One To One Chat should send a text message and push not } > <TextInput + accessibilityLabel="Type a message" autoFocus={true} blurOnSubmit={false} maxLength={250}
fix: SMDV-7777 fix tests
fix: SMDV-7777 fix tests
d6fbbe24bb05af5b3ca2480cd5afd34caf402ecd
--- src/components/FilterChipGroup/FilterChipGroup.tsx @@ -16,6 +16,7 @@ import { AllsparkNavigationClient, SiteSelectors, } from '@walmart/allspark-foundation'; +import {analytics} from '../../logger/analytics'; export const FilterChipGroup = ({ isPrimaryTeam, @@ -75,6 +76,9 @@ export const FilterChipGroup = ({ //TO-DO: add a featureFlag to the shiftSwitcher Modal const toggleShiftSwitcherModal = () => { + analytics('open_shift_modal', { + message: 'Open Shift Switcher Modal', + }); AllsparkNavigationClient.openModal('roster.ShiftSwitcherModal' as any, { setShift, selectedShift, --- src/components/ShiftSwitcherModal/ShiftSwitcherModal.tsx @@ -13,6 +13,7 @@ import { } from '@walmart/gtp-shared-components'; import {modalProps} from '../../modals'; import {mapAvailableShifts} from '../../utils/allTeams'; +import {analytics} from '../../logger/analytics'; export const ShiftSwitcherModal = ({ modal: {closeModal, getParam}, @@ -39,6 +40,10 @@ export const ShiftSwitcherModal = ({ const saveSelection = () => { setShift(pickedShift!); closeModal(); + + analytics('close_shift_modal', { + message: 'Close Shift Switcher Modal', + }); }; return (
feat: telemetry for roster sc
feat: telemetry for roster sc
90ac08980bcd21320d24ab2b9150dd924ba9fbf3
--- packages/core-services/Logger/index.tsx @@ -7,12 +7,16 @@ import React, { useMemo, } from 'react'; import { - LoggerBaseService, LoggerConfig, LoggerService, } from '@walmart/allspark-foundation/Logger'; import { ConsumerChild, noop } from '@walmart/allspark-utils'; +type LegacyLogLevel = { + defaultLevel: string; + overrides: { key: string; value: string; level: string }[]; +}; + export const LegacyLoggerService = { clone: (config: LoggerConfig, fields: { id: string; [key: string]: any }) => { const FeatureLogger = LoggerService.createFeatureInstance( @@ -27,12 +31,10 @@ export const LegacyLoggerService = { warn: FeatureLogger.warn, error: FeatureLogger.error, debug: FeatureLogger.debug, - setLogLevel: (logLevel: { - defaultLevel: string; - overrides: { key: string; value: string; level: string }[]; - }) => { + setLogLevel: (logLevel: LegacyLogLevel) => { FeatureLogger.setLogLevel(logLevel.defaultLevel as any); }, + configure: noop, }; return LegacyFeatureLogger; @@ -49,7 +51,11 @@ export const LegacyLoggerService = { debug: (message: string, fields?: { [key: string]: any }) => { return LoggerService.getContainerInstance().debug(message, fields); }, - setLogLevel: noop, + setLogLevel: (logLevel: LegacyLogLevel) => { + LoggerService.getContainerInstance().setLogLevel( + logLevel.defaultLevel as any + ); + }, configure: noop, }; @@ -122,7 +128,7 @@ export const getLoggerContext = () => LegacyLoggerService; export const getDeferredLoggerContext = async () => LegacyLoggerService; // Have to maintain a context for logger for backwards compatability -const LegacyLoggerContext = createContext<LoggerBaseService | undefined>( +const LegacyLoggerContext = createContext<ILegacyLoggerService | undefined>( undefined ); @@ -142,7 +148,7 @@ const LegacyLoggerContext = createContext<LoggerBaseService | undefined>( * } * }); */ -export const LoggerProvider = forwardRef<LoggerBaseService, any>( +export const LoggerProvider = forwardRef<ILegacyLoggerService, any>( (props, ref) => { const { children } = props; @@ -196,7 +202,7 @@ export const useLogger = () => { * FeatureLogger.error(...); */ export const LoggerCloneProvider = forwardRef< - LoggerBaseService, + ILegacyLoggerService, PropsWithChildren<{ fields: { id: string; [key: string]: any }; config: LoggerConfig; @@ -210,9 +216,11 @@ export const LoggerCloneProvider = forwardRef< [] ); + // @ts-ignore - not returning nested clone on purpose useImperativeHandle(ref, () => logger); return ( + // @ts-ignore - not returning nested clone on purpose <LegacyLoggerContext.Provider value={logger}> {children} </LegacyLoggerContext.Provider> @@ -267,8 +275,8 @@ export const useLoggerClone = ( * FeatureLogger.info(...); // Use scoped logger */ export const LoggerConsumer = forwardRef< - LoggerBaseService, - ConsumerChild<LoggerBaseService> + ILegacyLoggerService, + ConsumerChild<ILegacyLoggerService> >((props, ref) => { const { children } = props; const logger = useLogger(); @@ -287,4 +295,4 @@ export const LoggerConsumer = forwardRef< * @example * import {AllsparkLoggerService} from '@walmart/allspark-foundation'; */ -export type LoggerInstance = LoggerBaseService; +export type LoggerInstance = ILegacyLoggerService;
fix: legacy logger incorrectly typed
fix: legacy logger incorrectly typed
216d9425147477f79e10c385234e58b1e60955f7
--- .looper-pr.yml @@ -0,0 +1,19 @@ +inherit: job:///allspark/allspark-miniapp-cicd-templates:allspark-miniapp-cicd-template.yml + +envs: + global: + variables: + APP_NAME: myteam-miniapp + STAGES_TO_RUN: + LINT: true + UNITTEST: true + BUILD: true + SONAR_SCAN: true + ARTIFACT_PUBLISH: true + AUTO_PR_MONO: false + JIRAPREFIX: SSMP + MONO_REPO: allspark/allspark-core + MONO_REPO_BASE_BRANCH: develop + AUTHOR: temp + SLACK_CHANNEL: "smdv-miniapp" + --- sonar-project.properties @@ -1,5 +1,5 @@ -sonar.projectKey=com.walmart.stores.allspark.texting -sonar.projectName=TextingMiniApp +sonar.projectKey=com.walmart.stores.allspark.myTeam +sonar.projectName=MyTeamMiniApp sonar.projectVersion=1.0.0 sonar.host.url=http://sonar.looper.prod.walmartlabs.com
Update version
Update version
20019e5a0f702ed35f859dc05525a4b6f1de56a3
--- .looper.multibranch.yml @@ -4,7 +4,7 @@ inherit: "job:///metropolis/metroloop/metroloop-parent" ## Whenever you update the nodes, please update it at the two-place, below line & the global variable LOOPER_NODES ## -node: ((osx||stable_osx)&&!MAC-LAB-MINI29&&!MAC-LAB-MINI39&&!MAC-LAB-MINI32&&!MAC-LAB-MINI22&&!MAC-DRFQLAB-MINI22) +node: MAC-DRFQLAB-MINI29||MAC-LAB-MINI22 ##((osx||stable_osx)&&!MAC-LAB-MINI29&&!MAC-LAB-MINI39&&!MAC-LAB-MINI32&&!MAC-LAB-MINI22&&!MAC-DRFQLAB-MINI22) tools: android: @@ -47,7 +47,7 @@ envs: global: variables: CI: true - LOOPER_NODES: "((osx||stable_osx)&&!MAC-LAB-MINI29&&!MAC-LAB-MINI39&&!MAC-LAB-MINI32&&!MAC-LAB-MINI22&&!MAC-DRFQLAB-MINI22)" + LOOPER_NODES: "MAC-DRFQLAB-MINI29||MAC-LAB-MINI22" ##"((osx||stable_osx)&&!MAC-LAB-MINI29&&!MAC-LAB-MINI39&&!MAC-LAB-MINI32&&!MAC-LAB-MINI22&&!MAC-DRFQLAB-MINI22)" GITHUB_TOKEN: "%{credentials.secret('GITHUB_TOKEN')}" TMPDIR: /tmp
trying some stuff out
trying some stuff out
de832b8fd631138a1ea1e7087aeeead4f16f1e6b
--- packages/allspark-foundation-hub/package.json @@ -1,6 +1,6 @@ { "name": "@walmart/allspark-foundation-hub", - "version": "1.0.0-beta.5", + "version": "1.0.0-beta.6", "description": "", "main": "Core/index.js", "types": "Core/index.d.ts", --- packages/allspark-foundation-hub/src/HubFeature/Hub/Container/Screens/HubDashboard.tsx @@ -19,7 +19,11 @@ import { hubTeamsUpdatedBottomSheetEnabled, hubTeamsUpdatedErrorBottomSheetEnabled, } from '../../../Redux/selectors'; -import { FEATURE_ID } from '../../../constant'; +import { + FEATURE_ID, + TOTAL_STORE_TEAM_ID, + TOTAL_STORE_TEAM_LABEL, +} from '../../../constant'; import { TeamSwitcher } from '../../TeamSwitcher'; import styles from '../styles'; import { Body } from '@walmart/gtp-shared-components'; @@ -48,7 +52,7 @@ export const HubDashboard = ({ const [teamState, setTeamState] = useState<{ teamLabel: string; teamIds: string[]; - }>({ teamLabel: 'Total store', teamIds: ['total'] }); + }>({ teamLabel: TOTAL_STORE_TEAM_LABEL, teamIds: [TOTAL_STORE_TEAM_ID] }); const [allowedWidgetsList, setAllowedWidgetsList] = useState<LayoutConfig>( [] );
Update hubs version
Update hubs version
2964a7bc2d56975c0c4432c5c723cb9848d8093d
--- packages/allspark-foundation-hub/src/HubFeature/AllsparkHubContainer.tsx @@ -16,6 +16,7 @@ import { HubDashboard } from './Store/Hub/Container'; import { SiteHubDashboard } from './SupplyChain/Hub/SiteHubDashboard'; import { SiteSelectors } from '@walmart/allspark-foundation/Site'; import { ManagerExperienceCreators } from './Store/Redux'; +import { ManagerExperienceCreators as SupplyChainManagerExperienceCreators } from './SupplyChain/Redux'; import { useHubConfig } from './Store/Hooks/useHubConfig'; import { TeamSelection } from './Store/TeamSelection'; import { OnboardingProvider } from './Store/Onboarding/TeamOnboarding/OnboardingContext'; @@ -121,6 +122,7 @@ export class AllsparkHubContainer { const screenName = typeof screeName === 'string' ? screeName : screeName.screen; dispatch(ManagerExperienceCreators.setHubScreenName(screenName)); + dispatch(SupplyChainManagerExperienceCreators.setHubScreenName(screenName)); dispatch(ManagerExperienceCreators.setDefaultWidgets(defaultWidgets)); this.AllsparkWidgetContainer = AllsparkComponentContainers.create(name); return this; --- packages/allspark-foundation-hub/src/HubFeature/Store/translation.ts @@ -77,6 +77,11 @@ export const enUS = { primaryButtonText: 'Refresh', secondaryButtonText: 'Cancel', }, + managerExperience: { + myTeam: { + root: 'Team', + }, + }, }; export const esMX = { @@ -160,4 +165,9 @@ export const esMX = { primaryButtonText: 'Actualizar página', secondaryButtonText: 'Cancelar', }, + managerExperience: { + myTeam: { + root: 'Equipo', + }, + }, }; --- packages/allspark-foundation-hub/src/HubFeature/SupplyChain/Hub/SiteHubDashboard.tsx @@ -291,7 +291,7 @@ export const SiteHubDashboard = ({ name, widgets }: HubDashboardProps) => { <Popover content={"Tap here to change the team you're viewing."} handleClose={handlePopoverClose} - showPopover={show} //TODO: Need to update logic + showPopover={false} //TODO: Need to update logic UNSAFE_style={{ width: '60%' }} /> )} --- packages/allspark-foundation-hub/src/HubFeature/SupplyChain/Redux/reducer.ts @@ -34,6 +34,9 @@ export const supplyChainManagerExperienceSlice = createSlice({ setDefaultWidgets: (state, action: PayloadAction<string[]>) => { state.defaultWidgets = action.payload; }, + setHubScreenName: (state, action: PayloadAction<string>) => { + state.hubScreenName = action.payload; + }, setAllSiteTeamsSections: ( state, action: PayloadAction<AllTeamsSections[]> --- packages/allspark-foundation-hub/src/HubFeature/SupplyChain/translation.ts @@ -90,6 +90,11 @@ export const enUS = { primaryButtonText: 'Refresh', secondaryButtonText: 'Cancel', }, + managerExperience: { + myTeam: { + root: 'Team', + }, + }, }; export const esMX: typeof enUS = { @@ -185,4 +190,9 @@ export const esMX: typeof enUS = { primaryButtonText: 'Actualizar página', secondaryButtonText: 'Cancelar', }, + managerExperience: { + myTeam: { + root: 'Equipo', + }, + }, };
Adding container screen name fix
Adding container screen name fix
ba5dc261bb3d5d46ca5d5e31e2ae2279773e1997
--- package-lock.json @@ -47,7 +47,7 @@ "@walmart/emergency-mini-app": "1.25.1", "@walmart/exception-mini-app": "1.4.2", "@walmart/facilities-management-miniapp": "0.6.42", - "@walmart/feedback-all-spark-miniapp": "0.9.33", + "@walmart/feedback-all-spark-miniapp": "0.9.39", "@walmart/financial-wellbeing-feature-app": "1.8.1", "@walmart/functional-components": "~4.0.3", "@walmart/gta-react-native-calendars": "0.0.16", @@ -5164,26 +5164,34 @@ } }, "node_modules/@walmart/feedback-all-spark-miniapp": { - "version": "0.9.33", - "hasInstallScript": true, + "version": "0.9.39", + "resolved": "https://npme.walmart.com/@walmart/feedback-all-spark-miniapp/-/feedback-all-spark-miniapp-0.9.39.tgz", + "integrity": "sha512-nUpYKCiKuYD7u268qh60wiBkYh+hFTe3aECmAhq/QrCFMtlXeiIIE8S3s5idGnRipXqO9OeqXSaLnTfiW+qFiQ==", + "dependencies": { + "react-native-image-crop-picker": "^0.38.1", + "react-native-keyboard-aware-scroll-view": "^0.9.5" + }, "peerDependencies": { - "@react-native-community/async-storage": "^1.12.1", + "@react-native-async-storage/async-storage": "^1.19.0", "@react-native-community/datetimepicker": "^6.1.3", "@react-native-picker/picker": "2.4.2", "@react-navigation/native": "^6.0.0", "@react-navigation/stack": "^6.1.0", - "@walmart/gtp-shared-components": "^2.0.0-rc.1", - "@walmart/react-native-logger": "^1.17.0", - "@walmart/react-native-shared-navigation": "^0.2.0", - "@walmart/redux-store": "^1.0.12", - "@walmart/ui-components": "1.6.0-rc.1", + "@walmart/core-services": "~2.0.19", + "@walmart/gtp-shared-components": "2.0.2", + "@walmart/impersonation-mini-app": "1.18.3", + "@walmart/react-native-logger": "1.33.0", + "@walmart/react-native-shared-navigation": "1.0.2", + "@walmart/redux-store": "3.1.5", + "@walmart/ui-components": "1.10.1", "crypto-js": "^3.3.0", "react": "^18.2.0", - "react-native": "0.70.5", + "react-native": "~0.70.8", "react-native-background-timer": "^2.4.1", - "react-native-vector-icons": "^7.0.0", + "react-native-keyboard-aware-scroll-view": "^0.9.5", + "react-native-vector-icons": "^9.2.0", "react-native-webview": "^11.18.2", - "react-native-wm-telemetry": "^0.2.0", + "react-native-wm-telemetry": "0.4.0", "react-navigation": "^4.4.3", "react-redux": "^7.2.1", "reduxsauce": "^1.2.0", @@ -25175,7 +25183,13 @@ "version": "0.6.42" }, "@walmart/feedback-all-spark-miniapp": { - "version": "0.9.33" + "version": "0.9.39", + "resolved": "https://npme.walmart.com/@walmart/feedback-all-spark-miniapp/-/feedback-all-spark-miniapp-0.9.39.tgz", + "integrity": "sha512-nUpYKCiKuYD7u268qh60wiBkYh+hFTe3aECmAhq/QrCFMtlXeiIIE8S3s5idGnRipXqO9OeqXSaLnTfiW+qFiQ==", + "requires": { + "react-native-image-crop-picker": "^0.38.1", + "react-native-keyboard-aware-scroll-view": "^0.9.5" + } }, "@walmart/financial-wellbeing-feature-app": { "version": "1.8.1" --- package.json @@ -89,7 +89,7 @@ "@walmart/emergency-mini-app": "1.25.1", "@walmart/exception-mini-app": "1.4.2", "@walmart/facilities-management-miniapp": "0.6.42", - "@walmart/feedback-all-spark-miniapp": "0.9.33", + "@walmart/feedback-all-spark-miniapp": "0.9.39", "@walmart/financial-wellbeing-feature-app": "1.8.1", "@walmart/functional-components": "~4.0.3", "@walmart/gta-react-native-calendars": "0.0.16", --- patches/@walmart+feedback-all-spark-miniapp+0.9.33.patch @@ -1,10 +0,0 @@ -diff --git a/node_modules/@walmart/feedback-all-spark-miniapp/dist/src/utils/storage.js b/node_modules/@walmart/feedback-all-spark-miniapp/dist/src/utils/storage.js -index 67c6cde..f599716 100644 ---- a/node_modules/@walmart/feedback-all-spark-miniapp/dist/src/utils/storage.js -+++ b/node_modules/@walmart/feedback-all-spark-miniapp/dist/src/utils/storage.js -@@ -1,4 +1,4 @@ --import AsyncStorage from '@react-native-community/async-storage'; -+import AsyncStorage from '@react-native-async-storage/async-storage'; - export const SURVEY_POPUPS = 'feedback/SURVEY_POPUPS'; - const set = async (key, value) => { - try {
feedbackmini app version bump
feedbackmini app version bump
b62932d6f4e1a566cbba6df242903eef35acae07
--- .yarn/patches/@walmart-receipt-check-miniapp-npm-1.22.7-b46b7175e3.patch @@ -0,0 +1,14 @@ +diff --git a/src/machines/scan-home-page.machine.ts b/src/machines/scan-home-page.machine.ts +index 4f4c26ccc12b76950f336c3d7a8ff814c053a2f1..018a2a1bed38c3214ac17c17c0adabf9e0c0dda6 100644 +--- a/src/machines/scan-home-page.machine.ts ++++ b/src/machines/scan-home-page.machine.ts +@@ -657,6 +657,9 @@ export const SCAN_PAGE_MACHINE = createMachine< + toggleLoading: { + actions: ['toggleLoading'] + }, ++ resetTorch: { ++ actions: ['resetTorch'] ++ }, + modifyBottomSheet: [ + { + cond: (_ctx, e) => !!e.complete, --- package.json @@ -136,7 +136,7 @@ "@walmart/react-native-store-map": "0.3.7", "@walmart/react-native-sumo-sdk": "2.7.0", "@walmart/react-native-webex-sdk": "patch:@walmart/react-native-webex-sdk@npm%3A0.1.11#~/.yarn/patches/@walmart-react-native-webex-sdk-npm-0.1.11-31a5a73745.patch", - "@walmart/receipt-check-miniapp": "1.22.7", + "@walmart/receipt-check-miniapp": "patch:@walmart/receipt-check-miniapp@npm%3A1.22.7#~/.yarn/patches/@walmart-receipt-check-miniapp-npm-1.22.7-b46b7175e3.patch", "@walmart/redux-store": "6.1.4", "@walmart/returns-mini-app": "4.6.0", "@walmart/rfid-scan-mini-app": "2.3.10",
update
update
8b7638e07fbad9df3c0d6a1f11bcd2dd6184bfd2
--- src/screens/PushToTalkScreen.tsx @@ -22,7 +22,7 @@ import {createStoreChannelPath, createVoiceChannelPath} from '../channels'; import Modal from 'react-native-modal'; import {MessagesHeader} from '../components'; import {analytics} from '../logger/Analytics'; -import moment from 'moment'; +import moment, {Moment} from 'moment'; const styles = StyleSheet.create({ container: { @@ -110,6 +110,7 @@ export const PushToTalkScreen: FC<PushToTalkScreenProps> = (props) => { route.params?.channelPath ?? createStoreChannelPath(site!); const [isRecording, setIsRecording] = useState<Boolean>(false); + const [startTime, setStartTime] = useState<Moment>(); const RecordingRef = useRef<Audio.Recording>(); const [recordingDetails, setRecordingDetails] = useState< Omit<RecordingDetails, 'uri'> | undefined @@ -204,6 +205,15 @@ export const PushToTalkScreen: FC<PushToTalkScreenProps> = (props) => { lengthMS: recordingDetails.secs * 1000, }, }); + analytics( + 'pttMessageSend', + { + uri: remoteURI, + totalDuration: recordingDetails.secs * 1000, + message: 'After sending the PTT message', + }, + 10, + ); setRecordingDetails(undefined); } } @@ -216,12 +226,14 @@ export const PushToTalkScreen: FC<PushToTalkScreenProps> = (props) => { async function completeRecording() { const uri = RecordingRef.current?.getURI(); await stopRecording(); + const currentDate = moment(); + const totalDuration = currentDate.diff(startTime, 'seconds', true); analytics( 'pttMessageRecordComplete', { uri: uri, - time: moment().unix(), + time: totalDuration, message: 'On complete recording the PTT message', }, 10, @@ -229,15 +241,6 @@ export const PushToTalkScreen: FC<PushToTalkScreenProps> = (props) => { if (uri) { onSendAudio(uri); - analytics( - 'pttMessageSend', - { - uri: uri, - time: moment().unix(), - message: 'After sending the PTT message', - }, - 10, - ); } else { onRecordingFail(new Error('No URI found for recording')); } @@ -265,13 +268,14 @@ export const PushToTalkScreen: FC<PushToTalkScreenProps> = (props) => { {volume: 1.0, shouldPlay: true}, ).then((sound) => { sound.sound.playAsync(); + setStartTime(moment()); }); analytics( 'startRecordingPTT', { message: 'Start recording the PTT message', - startTime: moment().unix(), + startTime: startTime, }, 10, ); --- src/screens/PushToTalkScreen.tsx @@ -22,7 +22,7 @@ import {createStoreChannelPath, createVoiceChannelPath} from '../channels'; import Modal from 'react-native-modal'; import {MessagesHeader} from '../components'; import {analytics} from '../logger/Analytics'; -import moment from 'moment'; +import moment, {Moment} from 'moment'; const styles = StyleSheet.create({ container: { @@ -110,6 +110,7 @@ export const PushToTalkScreen: FC<PushToTalkScreenProps> = (props) => { route.params?.channelPath ?? createStoreChannelPath(site!); const [isRecording, setIsRecording] = useState<Boolean>(false); + const [startTime, setStartTime] = useState<Moment>(); const RecordingRef = useRef<Audio.Recording>(); const [recordingDetails, setRecordingDetails] = useState< Omit<RecordingDetails, 'uri'> | undefined @@ -204,6 +205,15 @@ export const PushToTalkScreen: FC<PushToTalkScreenProps> = (props) => { lengthMS: recordingDetails.secs * 1000, }, }); + analytics( + 'pttMessageSend', + { + uri: remoteURI, + totalDuration: recordingDetails.secs * 1000, + message: 'After sending the PTT message', + }, + 10, + ); setRecordingDetails(undefined); } } @@ -216,12 +226,14 @@ export const PushToTalkScreen: FC<PushToTalkScreenProps> = (props) => { async function completeRecording() { const uri = RecordingRef.current?.getURI(); await stopRecording(); + const currentDate = moment(); + const totalDuration = currentDate.diff(startTime, 'seconds', true); analytics( 'pttMessageRecordComplete', { uri: uri, - time: moment().unix(), + time: totalDuration, message: 'On complete recording the PTT message', }, 10, @@ -229,15 +241,6 @@ export const PushToTalkScreen: FC<PushToTalkScreenProps> = (props) => { if (uri) { onSendAudio(uri); - analytics( - 'pttMessageSend', - { - uri: uri, - time: moment().unix(), - message: 'After sending the PTT message', - }, - 10, - ); } else { onRecordingFail(new Error('No URI found for recording')); } @@ -265,13 +268,14 @@ export const PushToTalkScreen: FC<PushToTalkScreenProps> = (props) => { {volume: 1.0, shouldPlay: true}, ).then((sound) => { sound.sound.playAsync(); + setStartTime(moment()); }); analytics( 'startRecordingPTT', { message: 'Start recording the PTT message', - startTime: moment().unix(), + startTime: startTime, }, 10, );
update the total duration
update the total duration
5c792c3297a60a187a051172499eb34fb0eef29d
--- ios/AllSpark/AppDelegate.mm @@ -4,6 +4,7 @@ #import <React/RCTBundleURLProvider.h> #import <React/RCTRootView.h> #import <React/RCTLinkingManager.h> +#import <CodePush/CodePush.h> #import <React/RCTAppSetupUtils.h> #import "RNSplashScreen.h" @@ -121,7 +122,7 @@ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge #if DEBUG return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; #else - return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; + return [CodePush bundleURL]; #endif } --- ios/AllSpark/Info.plist @@ -74,6 +74,8 @@ </dict> </dict> </dict> + <key>CodePushDeploymentKey</key> + <string>LCVCkTeZVt9h-JYHlQ4NFkOQfYJkTL3RKk4nt</string> <key>NSCameraUsageDescription</key> <string>We use your camera for scanning images of barcodes</string> <key>NSFaceIDUsageDescription</key> --- ios/Podfile.lock @@ -607,6 +607,8 @@ PODS: - AppAuth/ExternalUserAgent (= 1.4.0) - AppAuth/Core (1.4.0) - AppAuth/ExternalUserAgent (1.4.0) + - Base64 (1.1.2) + - BinaryCodable (0.2.1) - boost (1.76.0) - BoringSSL-GRPC (0.0.24): - BoringSSL-GRPC/Implementation (= 0.0.24) @@ -620,6 +622,11 @@ PODS: - compass-sdk-ios (0.2.9) - compass-sdk-rn (5.5.0): - compass-sdk-ios (= 0.2.9) + - CodePush (7.1.0): + - Base64 (~> 1.1) + - JWT (~> 3.0.0-beta.12) + - React-Core + - SSZipArchive (~> 2.2.2) - React-Core - DoubleConversion (1.1.6) - EXAV (13.2.1): @@ -934,6 +941,8 @@ PODS: - Libuv-gRPC (= 0.0.10) - gRPC-Core/Interface (1.44.0) - hermes-engine (0.70.9) + - JWT (3.0.0-beta.14): + - Base64 (~> 1.1.2) - leveldb-library (1.22.2) - libevent (2.1.12) - Libuv-gRPC (0.0.10): @@ -1394,6 +1403,8 @@ PODS: - TOCropViewController - RNInAppBrowser (3.7.0): - React-Core + - RNInAppBrowser (3.7.0): + - React-Core - RNPermissions (3.6.1): - React-Core - RNReactNativeHapticFeedback (1.14.0): @@ -1451,6 +1462,8 @@ PODS: - SQLite.swift (0.13.3): - SQLite.swift/standard (= 0.13.3) - SQLite.swift/standard (0.13.3) + - SSZipArchive (2.2.3) + - Starscream (3.0.6) - StructuredLogAssistantIOS (0.0.7) - SumoSDK (2.6.0): - Apollo (~> 0.45) @@ -1477,6 +1490,7 @@ DEPENDENCIES: - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - BVLinearGradient (from `../node_modules/react-native-linear-gradient`) - CocoaAsyncSocket + - CodePush (from `../node_modules/react-native-code-push`) - "compass-sdk-rn (from `../node_modules/@walmart/compass-sdk-rn`)" - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - EXAV (from `../node_modules/expo-av/ios`) @@ -1626,6 +1640,7 @@ SPEC REPOS: - abseil - Apollo - AppAuth + - Base64 - BoringSSL-GRPC - CocoaAsyncSocket - Firebase @@ -1658,6 +1673,7 @@ SPEC REPOS: - GoogleUtilities - "gRPC-C++" - gRPC-Core + - JWT - leveldb-library - libevent - Libuv-gRPC @@ -1673,6 +1689,9 @@ SPEC REPOS: - SDWebImageWebPCoder - SocketRocket - SQLite.swift + - SSZipArchive + - Starscream + - SwiftProtobuf - TOCropViewController - YogaKit @@ -1681,6 +1700,8 @@ EXTERNAL SOURCES: :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" BVLinearGradient: :path: "../node_modules/react-native-linear-gradient" + CodePush: + :path: "../node_modules/react-native-code-push" compass-sdk-rn: :path: "../node_modules/@walmart/compass-sdk-rn" DoubleConversion: @@ -1894,12 +1915,15 @@ SPEC CHECKSUMS: abseil: ebe5b5529fb05d93a8bdb7951607be08b7fa71bc Apollo: 204819ea82022fbc59ad05056820df867f19bd02 AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7 + Base64: cecfb41a004124895a7bcee567a89bae5a89d49b + BinaryCodable: 92908a9338a428dd3bbb6ae9c97ec907e5f6e4a7 boost: a7c83b31436843459a1961bfd74b96033dc77234 BoringSSL-GRPC: 3175b25143e648463a56daeaaa499c6cb86dad33 BVLinearGradient: 34a999fda29036898a09c6a6b728b0b4189e1a44 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 compass-sdk-ios: 0f9e97e5d07833562783c61fc0640e40050c93ac compass-sdk-rn: 4a141f5ed1f651d57679a57c18956cf4adef584b + CodePush: dce1b253fde81078249ea9cd4b948e4ac7b761a9 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 EXAV: f1f69397ecdcf44cfacd4ff5d338cd1b96891e87 EXConstants: f348da07e21b23d2b085e270d7b74f282df1a7d9 @@ -1941,6 +1965,7 @@ SPEC CHECKSUMS: "gRPC-C++": 9675f953ace2b3de7c506039d77be1f2e77a8db2 gRPC-Core: 943e491cb0d45598b0b0eb9e910c88080369290b hermes-engine: 918ec5addfbc430c9f443376d739f088b6dc96c3 + JWT: ef71dfb03e1f842081e64dc42eef0e164f35d251 leveldb-library: f03246171cce0484482ec291f88b6d563699ee06 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 Libuv-gRPC: 55e51798e14ef436ad9bc45d12d43b77b49df378 @@ -2043,6 +2068,8 @@ SPEC CHECKSUMS: SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 SQLite.swift: 903bfa3bc9ab06345fdfbb578e34f47cfcf417da + SSZipArchive: 62d4947b08730e4cda640473b0066d209ff033c9 + Starscream: ef3ece99d765eeccb67de105bfa143f929026cf5 StructuredLogAssistantIOS: d48c327b3b67366d954435891dc1e748a6aeb9c1 SumoSDK: fef064694cb7fd0f4d8c633f03d2d9e11876fdda TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863 @@ -2053,6 +2080,6 @@ SPEC CHECKSUMS: Yoga: dc109b79db907f0f589fc423e991b09ec42d2295 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: aa974c743da6f2b8f34d7624b49e605b95240d31 +PODFILE CHECKSUM: 428e0e59976a5af07a4bda2ef6a2bae4353919ea COCOAPODS: 1.12.0
cp init ios
cp init ios
1839878dc47d74af71eda7ee4e48bfa939534074
--- ios/AllSpark.xcodeproj/project.pbxproj @@ -500,7 +500,7 @@ "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", "${PODS_XCFRAMEWORKS_BUILD_DIR}/ScanditBarcodeCapture/ScanditBarcodeCapture.framework/ScanditBarcodeCapture", "${PODS_XCFRAMEWORKS_BUILD_DIR}/ScanditCaptureCore/ScanditCaptureCore.framework/ScanditCaptureCore", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/compass-sdk-rn/compass_sdk_ios.framework/compass_sdk_ios", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/compass-sdk-ios/compass_sdk_ios.framework/compass_sdk_ios", "${PODS_XCFRAMEWORKS_BUILD_DIR}/compass-sdk-rn/IPSFramework.framework/IPSFramework", "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework/hermes", ); --- ios/Podfile @@ -21,6 +21,7 @@ flipper_config = ENV['NO_FLIPPER'] == '1' ? FlipperConfiguration.disabled : Flip source 'git@gecgithub01.walmart.com:store-systems-associate-tech-platform/cocoapods-specs.git' source 'git@gecgithub01.walmart.com:ssaeSCTP/CocoaPodSpecs.git' source 'https://github.com/CocoaPods/Specs.git' +source 'git@gecgithub01.walmart.com:Compass/compass-ios-private-pods.git' Pod::UI.puts "Flipper enabed: #{ENV['NO_FLIPPER'] == '1' ? 'false' : 'true'}" # production = ENV["PRODUCTION"] == "1" --- ios/Podfile.lock @@ -617,7 +617,9 @@ PODS: - BVLinearGradient (2.6.2): - React-Core - CocoaAsyncSocket (7.6.5) - - compass-sdk-rn (4.2.0): + - compass-sdk-ios (0.2.9) + - compass-sdk-rn (5.5.0): + - compass-sdk-ios (= 0.2.9) - React-Core - DoubleConversion (1.1.6) - EXAV (13.2.1): @@ -632,8 +634,6 @@ PODS: - ExpoModulesCore (1.2.7): - React-Core - ReactCommon/turbomodule/core - - EXSharing (11.2.2): - - ExpoModulesCore - FBLazyVector (0.70.9) - FBReactNativeSpec (0.70.9): - RCT-Folly (= 2021.07.22.00) @@ -1482,7 +1482,6 @@ DEPENDENCIES: - EXFileSystem (from `../node_modules/expo-file-system/ios`) - Expo (from `../node_modules/expo`) - ExpoModulesCore (from `../node_modules/expo-modules-core`) - - EXSharing (from `../node_modules/expo-sharing/ios`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) - FirebaseCore @@ -1615,6 +1614,8 @@ DEPENDENCIES: - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: + "git@gecgithub01.walmart.com:Compass/compass-ios-private-pods.git": + - compass-sdk-ios "git@gecgithub01.walmart.com:ssaeSCTP/CocoaPodSpecs.git": - StructuredLogAssistantIOS - SumoSDK @@ -1691,8 +1692,6 @@ EXTERNAL SOURCES: :path: "../node_modules/expo" ExpoModulesCore: :path: "../node_modules/expo-modules-core" - EXSharing: - :path: "../node_modules/expo-sharing/ios" FBLazyVector: :path: "../node_modules/react-native/Libraries/FBLazyVector" FBReactNativeSpec: @@ -1894,14 +1893,14 @@ SPEC CHECKSUMS: BoringSSL-GRPC: 3175b25143e648463a56daeaaa499c6cb86dad33 BVLinearGradient: 34a999fda29036898a09c6a6b728b0b4189e1a44 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 - compass-sdk-rn: 74054f14da7a76b2b36d48573e6c9da5bde06f2e + compass-sdk-ios: 0f9e97e5d07833562783c61fc0640e40050c93ac + compass-sdk-rn: 4a141f5ed1f651d57679a57c18956cf4adef584b DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 EXAV: f1f69397ecdcf44cfacd4ff5d338cd1b96891e87 EXConstants: f348da07e21b23d2b085e270d7b74f282df1a7d9 EXFileSystem: 844e86ca9b5375486ecc4ef06d3838d5597d895d Expo: 8448e3a2aa1b295f029c81551e1ab6d986517fdb ExpoModulesCore: 0749525babb492117f864873612b56c79611bb95 - EXSharing: 09839ace249f61bfa13c50c6a28256c31d260355 FBLazyVector: bc76253beb7463b688aa6af913b822ed631de31a FBReactNativeSpec: 85d34420d92cb178897de05e3aba90e7a8568162 Firebase: 0219acf760880eeec8ce479895bd7767466d9f81 @@ -2048,6 +2047,6 @@ SPEC CHECKSUMS: Yoga: dc109b79db907f0f589fc423e991b09ec42d2295 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 5e9af5bffc9ed6ee9db34b0f1573f68bd919bf97 +PODFILE CHECKSUM: aa974c743da6f2b8f34d7624b49e605b95240d31 COCOAPODS: 1.11.3
Updating the pod file
Updating the pod file
c70ba2a322521c4b94b2237cbf80e4647c0232a4
--- package-lock.json @@ -74,7 +74,7 @@ "@walmart/myteam-mini-app": "1.0.18", "@walmart/onewalmart-miniapp": "1.0.24", "@walmart/pay-stub-miniapp": "0.15.2", - "@walmart/payrollsolution_miniapp": "0.138.4", + "@walmart/payrollsolution_miniapp": "0.140.1", "@walmart/price-changes-mini-app": "1.10.6", "@walmart/profile-feature-app": "1.138.2", "@walmart/react-native-encrypted-storage": "1.1.3", @@ -9461,9 +9461,9 @@ } }, "node_modules/@walmart/payrollsolution_miniapp": { - "version": "0.138.4", - "resolved": "https://npme.walmart.com/@walmart/payrollsolution_miniapp/-/payrollsolution_miniapp-0.138.4.tgz", - "integrity": "sha512-WcRGvQn7mIyyLBUJfOSzjLyYC4I/csxt7bRnVOWj06g1enI3ImdmiiSpwMVA6XkYR+yvUauaaYYhu4AMI5xM5Q==", + "version": "0.140.1", + "resolved": "https://npme.walmart.com/@walmart/payrollsolution_miniapp/-/payrollsolution_miniapp-0.140.1.tgz", + "integrity": "sha512-9XCsrETQNy2upiG4JlKKk6ujH3E9JPksvudEtfi0PpjSJfjpLRfL7gd76axRM+31JFUzB8yQeZ9yjGMZcTr2Ug==", "hasInstallScript": true, "dependencies": { "crypto-js": "^3.3.0", @@ -33392,9 +33392,9 @@ } }, "@walmart/payrollsolution_miniapp": { - "version": "0.138.4", - "resolved": "https://npme.walmart.com/@walmart/payrollsolution_miniapp/-/payrollsolution_miniapp-0.138.4.tgz", - "integrity": "sha512-WcRGvQn7mIyyLBUJfOSzjLyYC4I/csxt7bRnVOWj06g1enI3ImdmiiSpwMVA6XkYR+yvUauaaYYhu4AMI5xM5Q==", + "version": "0.140.1", + "resolved": "https://npme.walmart.com/@walmart/payrollsolution_miniapp/-/payrollsolution_miniapp-0.140.1.tgz", + "integrity": "sha512-9XCsrETQNy2upiG4JlKKk6ujH3E9JPksvudEtfi0PpjSJfjpLRfL7gd76axRM+31JFUzB8yQeZ9yjGMZcTr2Ug==", "requires": { "crypto-js": "^3.3.0", "expo-sharing": "~11.5.0" --- package.json @@ -115,7 +115,7 @@ "@walmart/myteam-mini-app": "1.0.18", "@walmart/onewalmart-miniapp": "1.0.24", "@walmart/pay-stub-miniapp": "0.15.2", - "@walmart/payrollsolution_miniapp": "0.138.4", + "@walmart/payrollsolution_miniapp": "0.140.1", "@walmart/price-changes-mini-app": "1.10.6", "@walmart/profile-feature-app": "1.138.2", "@walmart/react-native-encrypted-storage": "1.1.3",
bump version
bump version
c70c3ba9bf1296ddd3c29ad9a072328d647fa2ab
--- src/home/containers/HomeScreen/defaultLayout.ts @@ -24,14 +24,6 @@ export default [ }, }, ], - [ - { - component: 'AnnouncementCard', - metaData: { - url: 'https://one.walmart.com/content/usone/en_us/me/time/loaptoinfo-hourly1.html', - }, - }, - ], [ { component: 'TimeClockCard',
update layout
update layout
e7a0049ab6e9b7aeac8abe626353f388f086abe7
--- package-lock.json @@ -60,7 +60,7 @@ "@walmart/counts-component-miniapp": "0.1.11", "@walmart/emergency-mini-app": "1.27.0", "@walmart/exception-mini-app": "1.7.10", - "@walmart/facilities-management-miniapp": "0.9.1", + "@walmart/facilities-management-miniapp": "0.9.2", "@walmart/feedback-all-spark-miniapp": "0.9.60", "@walmart/financial-wellbeing-feature-app": "1.23.2", "@walmart/functional-components": "6.0.16", @@ -11436,9 +11436,9 @@ } }, "node_modules/@walmart/facilities-management-miniapp": { - "version": "0.9.1", - "resolved": "https://npme.walmart.com/@walmart/facilities-management-miniapp/-/facilities-management-miniapp-0.9.1.tgz", - "integrity": "sha512-d6B+Dkic5AVr4qGYp+3uuCxEv70wWpplwGDeZ2xCEkLWQosouU5hWLiTMERpBKXiyMVkM7n8f4s4d4FRRjR9KA==", + "version": "0.9.2", + "resolved": "https://npme.walmart.com/@walmart/facilities-management-miniapp/-/facilities-management-miniapp-0.9.2.tgz", + "integrity": "sha512-cdj55zjrNPKcq/ws2yAOEzx5RgMmkg384amAOiFK2xV2cZq0Xg+kFib6BVNsDuCrMlt9bZUrQe03lMsKz2AK9Q==", "hasInstallScript": true, "engines": { "node": ">=16" --- package.json @@ -102,7 +102,7 @@ "@walmart/counts-component-miniapp": "0.1.11", "@walmart/emergency-mini-app": "1.27.0", "@walmart/exception-mini-app": "1.7.10", - "@walmart/facilities-management-miniapp": "0.9.1", + "@walmart/facilities-management-miniapp": "0.9.2", "@walmart/feedback-all-spark-miniapp": "0.9.60", "@walmart/financial-wellbeing-feature-app": "1.23.2", "@walmart/functional-components": "6.0.16", @@ -367,7 +367,7 @@ "@walmart/counts-component-miniapp": "0.1.11", "@walmart/emergency-mini-app": "1.27.0", "@walmart/exception-mini-app": "1.7.10", - "@walmart/facilities-management-miniapp": "0.9.1", + "@walmart/facilities-management-miniapp": "0.9.2", "@walmart/feedback-all-spark-miniapp": "0.9.60", "@walmart/financial-wellbeing-feature-app": "1.23.2", "@walmart/functional-components": "6.0.16",
drop 21 version bump
drop 21 version bump * conflict fix
6ccd26d6a0e676c7182c8b4954ceff0f8b18559a
--- packages/me-at-walmart-container/src/services/user/transforms.ts @@ -71,9 +71,9 @@ export const determineTeams = (assignedBusinessUnit: AssignedBusinessUnit) => { return teams; }; -export const determineDomainImpersonatedUser = (props: { workEmail: string | null | undefined, division: string }): string => { - const {workEmail, division} = props - return inferDomainFromUpn(workEmail || '') || inferDomainFromDivision(division) || UserDomain.homeoffice; +export const determineDomainImpersonatedUser = (props: { workEmail: string | null | undefined, division: string, jobCategoryCodeDesc: string }): string => { + const {workEmail, division, jobCategoryCodeDesc} = props + return inferDomainFromUpn(workEmail || '') || inferDomainFromDivision(division, jobCategoryCodeDesc) || UserDomain.homeoffice; } // Convert auth token data to our expected redux user format @@ -191,7 +191,11 @@ export const transformImpersonateeData = ( // workEmail works for store/club users. In case if it missed, we falls back to look for it through division number // 1 - store/club, 7 - dc. In case none of them match, we fallback to homeofiice. - const domain = determineDomainImpersonatedUser({workEmail: data.workEmail, division}) + const domain = determineDomainImpersonatedUser({ + workEmail: data.workEmail, + division, + jobCategoryCodeDesc: data.jobCategoryCodeDesc || '' + }) const win = data.win ? String(data.win) : impersonator.win; const emailDomain = --- packages/me-at-walmart-container/src/services/user/utils.ts @@ -122,10 +122,11 @@ export const generateImpersonationToken = (impersonatee: { return signedToken; }; -export const inferDomainFromDivision = (division: string): UserDomain | undefined => { +export const inferDomainFromDivision = (division: string, jobCategoryCodeDesc: string = ''): UserDomain | undefined => { if (divisionIsDC(division)) { return UserDomain.dc } - if (division === '1') return UserDomain.store + const isMarketMgr = jobCategoryCodeDesc.toLowerCase().includes('mgr') + if (division === '1' && !isMarketMgr) return UserDomain.store return }
feat(ui): ALLSPARK-0000 add logic to imperonation for market manager (#4121)
feat(ui): ALLSPARK-0000 add logic to imperonation for market manager (#4121) Co-authored-by: Maksym Novakh <maksym.novakh@walmart.com>
3a07af00dcc2b23b04aea07debc71653ff781c8e
--- .looper-native-common.yml @@ -3,6 +3,7 @@ inherit: "job:///metropolis/metroloop/metroloop-parent" envs: global: variables: + TMPDIR: /tmp TARGET_XCODE: "12.0" RCT_NO_LAUNCH_PACKAGER: true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true --- .looper-pr.yml @@ -4,6 +4,11 @@ tools: nodejs: 12.4.0 sonarscanner: 3.0.3.778 +envs: + global: + variables: + TMPDIR: /tmp + triggers: - push: ignoreCommitter: jenkinspan --- __tests__/core/initSsoTest.ts @@ -7,12 +7,14 @@ import { ssoTelemetryEventListener, navLogin, onAppStateChanged, + onAppInactive, } from '../../src/core/SSOinit'; import {connectedSSO} from '../../src/auth'; import {SSO_APP} from '../../src/types/telemetryConstants'; import WMSingleSignOn, {SSOPingFedEvents} from 'react-native-ssmp-sso-allspark'; import {DefaultLogger} from '@walmart/react-native-logger'; import {reset} from '@walmart/react-native-shared-navigation'; +import AsyncStorage from '@react-native-community/async-storage'; import {getCurrentRoute} from '../../src/core/screenTracker'; const mockSetEnv = jest.fn(); @@ -21,6 +23,37 @@ const mockGetUser = jest.fn(); const mockGetCurrentRoute = getCurrentRoute as jest.Mock; +const mockGetState = jest.fn( + () => + ({ + user: { + data: { + userId: 'swalton3', + }, + }, + } as any), +); + +jest.mock('@walmart/redux-store', () => ({ + ...(jest.requireActual('@walmart/redux-store') as any), + getStore: () => ({ + getState: mockGetState, + }), +})); + +jest.mock('@react-native-community/async-storage', () => ({ + __esModule: true, + default: { + getItem: jest.fn(), + setItem: jest.fn(), + removeItem: jest.fn(), + }, +})); + +jest.mock('lodash', () => ({ + debounce: jest.fn((func: any) => func), +})); + jest.mock('../../src/core/screenTracker', () => ({ getCurrentRoute: jest.fn(), })); @@ -203,6 +236,26 @@ describe('navLogin', () => { }); }); +describe('onAppInactive', () => { + it('calls set item if user present', async () => { + await onAppInactive(); + expect(mockGetState).toHaveBeenCalled(); + expect(AsyncStorage.setItem).toHaveBeenCalledWith( + 'user_was_present', + 'true', + ); + }); + + it('calls remove item if user not present', async () => { + mockGetState.mockReturnValueOnce({ + user: {data: null}, + }); + await onAppInactive(); + expect(mockGetState).toHaveBeenCalled(); + expect(AsyncStorage.removeItem).toHaveBeenCalledWith('user_was_present'); + }); +}); + describe('onAppStateChanged', () => { const signOutSpy = jest.spyOn(ssoActions, 'signOutSuccess'); @@ -228,6 +281,7 @@ describe('onAppStateChanged', () => { it('handles user exists', async () => { (WMSingleSignOn.getUser as jest.Mock).mockResolvedValue({}); mockGetCurrentRoute.mockReturnValue('stuff'); + (AsyncStorage.getItem as jest.Mock).mockReturnValueOnce('true'); await onAppStateChanged('active'); expect(WMSingleSignOn.getUser).toHaveBeenCalled(); @@ -238,6 +292,7 @@ describe('onAppStateChanged', () => { it('handles user does not exist', async () => { (WMSingleSignOn.getUser as jest.Mock).mockResolvedValue(null); mockGetCurrentRoute.mockReturnValue('stuff'); + (AsyncStorage.getItem as jest.Mock).mockReturnValueOnce('true'); await onAppStateChanged('active'); expect(WMSingleSignOn.getUser).toHaveBeenCalled(); @@ -250,10 +305,22 @@ describe('onAppStateChanged', () => { new Error('it did not work'), ); mockGetCurrentRoute.mockReturnValue('stuff'); + (AsyncStorage.getItem as jest.Mock).mockReturnValueOnce('true'); await onAppStateChanged('active'); expect(WMSingleSignOn.getUser).toHaveBeenCalled(); expect(signOutSpy).toHaveBeenCalled(); expect(reset).toHaveBeenCalled(); }); + + it('handles user previously not being present on app resume', async () => { + (WMSingleSignOn.getUser as jest.Mock).mockResolvedValue(null); + mockGetCurrentRoute.mockReturnValue('stuff'); + (AsyncStorage.getItem as jest.Mock).mockReturnValueOnce(null); + await onAppStateChanged('active'); + + expect(WMSingleSignOn.getUser).not.toHaveBeenCalled(); + expect(signOutSpy).not.toHaveBeenCalled(); + expect(reset).not.toHaveBeenCalled(); + }); }); --- saucelabs/.looper-native-common-saucelabs.yml @@ -3,6 +3,7 @@ inherit: "job:///metropolis/metroloop/metroloop-parent" envs: global: variables: + TMPDIR: /tmp TARGET_XCODE: "12.0" TARGET_SIMULATOR: "iPhone 11" TARGET_SIMULATOR_OS: "14.0" --- src/core/SSOinit.ts @@ -1,5 +1,5 @@ import {AppState, AppStateStatus} from 'react-native'; -import {ssoActions} from '@walmart/redux-store'; +import {getStore, ssoActions} from '@walmart/redux-store'; import {checkImpersonationEnabled} from '@walmart/impersonation-mini-app'; import WMSingleSignOn, { SSOPingFedEvents, @@ -10,11 +10,14 @@ import WmTelemetry from 'react-native-wm-telemetry'; import {DefaultLogger} from '@walmart/react-native-logger'; import {SSOEnv} from 'react-native-ssmp-sso-allspark'; import {reset} from '@walmart/react-native-shared-navigation'; +import AsyncStorage from '@react-native-community/async-storage'; +import {debounce} from 'lodash'; -import {getCurrentRoute} from './screenTracker'; import Config from '../../env'; import {connectedSSO} from '../auth'; import {SSO_APP} from '../types/telemetryConstants'; +import {getUser} from '../redux'; +import {getCurrentRoute} from './screenTracker'; export const initSso = async () => { const impersonation = await checkImpersonationEnabled(); @@ -65,27 +68,51 @@ export const navLogin = () => { }); }; -export const onAppStateChanged = async (state: AppStateStatus) => { - if (state === 'active' && getCurrentRoute() !== 'login') { - try { - const user = await WMSingleSignOn.getUser(); - if (!user) { - DefaultLogger.info( - 'app resumed; there is no user and we are not on signIn screen; navigating to login', - ); - navLogin(); - } - } catch (err) { - DefaultLogger.error( - 'caught error while checking for user on app resume; navigating to login', - { - message: err.message, - stack: err.stack, - }, - ); - navLogin(); - } +export const onAppInactive = async () => { + const store = getStore(); + // @ts-ignore + const user = getUser(store.getState()); + if (user) { + await AsyncStorage.setItem('user_was_present', 'true'); + } else { + await AsyncStorage.removeItem('user_was_present'); } }; +export const onAppStateChanged = debounce(async (state: AppStateStatus) => { + switch (state) { + case 'inactive': + onAppInactive(); + break; + case 'background': + onAppInactive(); + break; + case 'active': + if (getCurrentRoute() !== 'login') { + const userWasPresent = await AsyncStorage.getItem('user_was_present'); + + if (userWasPresent) { + try { + const user = await WMSingleSignOn.getUser(); + if (!user) { + DefaultLogger.info( + 'app resumed; there is no user and we are not on signIn screen; navigating to login', + ); + navLogin(); + } + } catch (err) { + DefaultLogger.error( + 'caught error while checking for user on app resume; navigating to login', + { + message: err.message, + stack: err.stack, + }, + ); + navLogin(); + } + } + } + } +}, 500); + AppState.addEventListener('change', onAppStateChanged);
Hotfix - App Resume from Hiring Center (#476)
Hotfix - App Resume from Hiring Center (#476) * Updating app state change listener to avoid sign out logic when user previously not present * Removing comment * Removing line for testing * fix pr checks maybe Co-authored-by: rlane1 <rlane1@walmart.com> Co-authored-by: Anthony Helms <awhelms@wal-mart.com>
247169dff800a4b80d69f5511aa6e7cff0b680da
--- targets/US/android/settings.gradle @@ -28,4 +28,4 @@ useExpoModules() * This flag is not advisable if you need to download new dependencies of your Andriod SDK with each run. * (Like testing new compass SDK version each time you run the app) */ -gradle.startParameter.offline=true +gradle.startParameter.offline=false
inbox update
inbox update
202152be5a3f2e67468f85c4f6023f31340efb03
--- targets/US/ios/Podfile.lock @@ -2957,4 +2957,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: e45caceff59820fc357600d6b2277634c8242734 -COCOAPODS: 1.14.3 +COCOAPODS: 1.15.2
Update targets/US/ios/Podfile.lock
Update targets/US/ios/Podfile.lock
46c596562e48282a57e3f59e97bf1d8157372868
--- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/roster-mini-app", - "version": "3.3.0-alpha.5", + "version": "3.3.0-alpha.6", "main": "dist/index.js", "files": [ "dist", @@ -89,7 +89,7 @@ "@walmart/react-native-scanner-3.0": "0.10.4", "@walmart/react-native-sumo-sdk": "2.8.0", "@walmart/ui-components": "1.15.1", - "@walmart/wmconnect-mini-app": "3.2.0-alpha.6", + "@walmart/wmconnect-mini-app": "3.2.0-alpha.7", "babel-jest": "^29.6.3", "chance": "^1.1.11", "crypto-js": "~4.2.0", --- yarn.lock @@ -6368,7 +6368,7 @@ __metadata: "@walmart/react-native-scanner-3.0": "npm:0.10.4" "@walmart/react-native-sumo-sdk": "npm:2.8.0" "@walmart/ui-components": "npm:1.15.1" - "@walmart/wmconnect-mini-app": "npm:3.2.0-alpha.6" + "@walmart/wmconnect-mini-app": "npm:3.2.0-alpha.7" babel-jest: "npm:^29.6.3" chance: "npm:^1.1.11" crypto-js: "npm:~4.2.0" @@ -6451,9 +6451,9 @@ __metadata: languageName: node linkType: hard -"@walmart/wmconnect-mini-app@npm:3.2.0-alpha.6": - version: 3.2.0-alpha.6 - resolution: "@walmart/wmconnect-mini-app@npm:3.2.0-alpha.6::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fwmconnect-mini-app%2F-%2F%40walmart%2Fwmconnect-mini-app-3.2.0-alpha.6.tgz" +"@walmart/wmconnect-mini-app@npm:3.2.0-alpha.7": + version: 3.2.0-alpha.7 + resolution: "@walmart/wmconnect-mini-app@npm:3.2.0-alpha.7::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fwmconnect-mini-app%2F-%2F%40walmart%2Fwmconnect-mini-app-3.2.0-alpha.7.tgz" peerDependencies: "@walmart/allspark-foundation": ">=6.32.0" expo: ~52.0.46 @@ -6464,7 +6464,7 @@ __metadata: dependenciesMeta: "@walmart/me-at-walmart": built: false - checksum: 10c0/a7daf649bc8bd6e0b6e4bb2cc24398de92ea7e903361ca9a6e4c4469811f1af8f14f354b9e1822f3ae92311d896b546d00c4e9f88c3179d4414d5fec3543a67e + checksum: 10c0/61e192498afd2036244757bfa51ed3cdf8ea9d5d3492ffecc3ff5d0560bc1cfa5a63904ab070a7ca5a8a01fab122f1b6e9aad30f5a72d630f1df65b4ccd9ef34 languageName: node linkType: hard
feat(ui): adding new version for drop 34
feat(ui): adding new version for drop 34
2b6f846d05d8526d19edd19059a5d9e37b779c06
--- packages/allspark-foundation-hub/src/HubFeature/Hub/TeamSwitcher/types.ts @@ -7,5 +7,5 @@ export type TeamSwitcherTypes = { export type TeamSwitcherProps = { onTeamChange: (teamId: string) => void; refetch: () => void; - refreshing: boolean; + refreshing?: boolean; };
feat(ui): Update navigation for onboarding
feat(ui): Update navigation for onboarding
59781b23c849c04a0d3ca963891801cf0ff8098e
--- packages/me-at-walmart-athena-queries/src/getSupplyChainTeamsByStore.graphql @@ -0,0 +1,36 @@ +query GetSupplyChainTeamsByStore($businessUnitNumber: Int!, $countryCode: String!, $date: Date!, $includeManagement: Boolean) { + supplyChainTeamsByBusinessUnit( + businessUnitNumber: $businessUnitNumber + countryCode: $countryCode + includeManagement: $includeManagement + ) { + __typename + teams { + __typename + businessUnitNumber + countryCode + members + membership(includeProxyMembers: true, role: []) { + __typename + functionCode + functionCodeDesc + role + shiftCode + userId + walmartIdentificationNumber + } + mewAbsentCount(date: $date) + mewAbsentCount(date: $date) + mewClockedInCount + mewClockedOutCount + mewTardyCount(date: $date) + opsareaCode + opsareaName + proxyMembers + teamId + teamName + workareaCode + workareaName + } + } +} \ No newline at end of file
feat(ui): added query for supplyhainGetTeamsByStore
feat(ui): added query for supplyhainGetTeamsByStore
09b242990e593a19a679971daad96fcf755c03e6
--- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/roster-mini-app", - "version": "2.12.13", + "version": "2.12.14", "main": "dist/index.js", "files": [ "dist" --- src/screens/RosterDetailScreen/RosterDetailScreen.tsx @@ -18,6 +18,7 @@ import { useGetTeamsByStore, useGetViewersPrimaryTeamId, useGetViewersPrimaryTeamName, + useIsImpersonatedOnDev, useTotalSiteOrTotalStore, useUserIsInRoster, } from '../../hooks'; @@ -115,6 +116,7 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { const currentSiteId = useSelector(UserSelectors.getSiteId); const parentSiteID = useRef(currentSiteId); + const userIsImpersonatedOnDev = useIsImpersonatedOnDev(); useEffect(() => { setTeamState({ @@ -496,7 +498,10 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { {!dataLoading && ( <AllsparkSharedComponents.Component id='wmConnect.GroupMessageButton' - props={{teamIds: teamState.teamIds}} + props={{ + teamIds: teamState.teamIds, + disabled: !userIsInRoster || !userIsImpersonatedOnDev, + }} /> )} </>
Update the disabled field for the roster group button
Update the disabled field for the roster group button
0df4aa24c3477e29015e7011950aeab1eec87bca
--- .looper-pr.yml @@ -21,7 +21,7 @@ envs: ALLOW_NPM_PUSH_TO_AF: true STAGES_TO_RUN: LINT: true - UNITTEST: false + UNITTEST: true BUILD: true SONAR_SCAN: true ARTIFACT_PUBLISH: true
fix(ui): update roster and wmconnect mini app version smdv-9999
fix(ui): update roster and wmconnect mini app version smdv-9999
3f080b21ead684f24f091b2dfb5012cad0c69a1f
--- package-lock.json @@ -78,7 +78,7 @@ "@walmart/returns-mini-app": "0.12.0", "@walmart/schedule-mini-app": "0.33.0", "@walmart/settings-mini-app": "1.12.0", - "@walmart/shelfavailability-mini-app": "1.5.11", + "@walmart/shelfavailability-mini-app": "1.5.12", "@walmart/taskit-mini-app": "0.49.12", "@walmart/time-clock-mini-app": "2.25.0", "@walmart/ui-components": "1.9.0", @@ -5881,9 +5881,9 @@ } }, "node_modules/@walmart/shelfavailability-mini-app": { - "version": "1.5.11", - "resolved": "https://npme.walmart.com/@walmart/shelfavailability-mini-app/-/shelfavailability-mini-app-1.5.11.tgz", - "integrity": "sha512-raDv8a9MZR5y2hpWo5YtAcfad6x+MZFWvqNQ1raaIntPJ1E3LHdA3Qf48Q4cfkjRIpjqLxc3q+Y4d1WTmpYjnQ==", + "version": "1.5.12", + "resolved": "https://npme.walmart.com/@walmart/shelfavailability-mini-app/-/shelfavailability-mini-app-1.5.12.tgz", + "integrity": "sha512-/9PQ4UsVnfK8z2oo9blOZMaWsoCclJCDn0g/zayDBzkkQx1jmlHrn0z0AmEjrNqxlL+E6Iru4ugQV2JdVOYY0w==", "peerDependencies": { "@react-native-community/async-storage": "^1.12.1", "@react-native-community/eslint-config": "^2.0.0", @@ -5903,7 +5903,7 @@ "@walmart/impersonation-mini-app": "1.4.0", "@walmart/react-native-env": "^0.2.0", "@walmart/react-native-logger": "1.31.0-rc.1", - "@walmart/react-native-scanner-3.0": "0.1.27", + "@walmart/react-native-scanner-3.0": ">=0.1.27", "@walmart/react-native-shared-navigation": "1.0.2", "@walmart/react-native-sumo-sdk": "2.4.0-rc.2", "@walmart/redux-store": "3.1.3", @@ -25293,9 +25293,9 @@ "integrity": "sha512-zOMTzrKXTxFosdbiNnFCkxcsJqi81JRdiHPq2Qs/0jnZZiIE85dB6liCDgO69rkSIKo+CCJThnz0HYi/jU07cQ==" }, "@walmart/shelfavailability-mini-app": { - "version": "1.5.11", - "resolved": "https://npme.walmart.com/@walmart/shelfavailability-mini-app/-/shelfavailability-mini-app-1.5.11.tgz", - "integrity": "sha512-raDv8a9MZR5y2hpWo5YtAcfad6x+MZFWvqNQ1raaIntPJ1E3LHdA3Qf48Q4cfkjRIpjqLxc3q+Y4d1WTmpYjnQ==" + "version": "1.5.12", + "resolved": "https://npme.walmart.com/@walmart/shelfavailability-mini-app/-/shelfavailability-mini-app-1.5.12.tgz", + "integrity": "sha512-/9PQ4UsVnfK8z2oo9blOZMaWsoCclJCDn0g/zayDBzkkQx1jmlHrn0z0AmEjrNqxlL+E6Iru4ugQV2JdVOYY0w==" }, "@walmart/taskit-mini-app": { "version": "0.49.12", --- package.json @@ -120,8 +120,8 @@ "@walmart/returns-mini-app": "0.12.0", "@walmart/schedule-mini-app": "0.33.0", "@walmart/settings-mini-app": "1.12.0", - "@walmart/shelfavailability-mini-app": "1.5.11", - "@walmart/taskit-mini-app": "0.49.12", + "@walmart/shelfavailability-mini-app": "1.5.12", + "@walmart/taskit-mini-app": "0.49.12", "@walmart/time-clock-mini-app": "2.25.0", "@walmart/ui-components": "1.9.0", "@walmart/welcomeme-mini-app": "0.76.0",
SA-348 added logic to handle QR code short-form urls
SA-348 added logic to handle QR code short-form urls
20587e421280d63e00630a2c0213b5582f99aae4
--- packages/allspark-foundation/src/Navigation/Elements/factories.tsx @@ -36,7 +36,9 @@ export const StackElementsFactory = (): StackNavigationElements => { )); }; - return { banners, addBanner, removeBanner }; + const renderBanners = banners.createAllWidgets; + + return { banners, addBanner, removeBanner, renderBanners }; }; export const DrawerElementsFactory = (): DrawerNavigationElements => { @@ -55,7 +57,10 @@ export const DrawerElementsFactory = (): DrawerNavigationElements => { const removeBadge = () => badge.unregister('badge'); - return { badge, addBadge, removeBadge }; + const renderBadge = (props: BadgeRegistryProps) => + badge.createWidget('badge', props); + + return { badge, addBadge, removeBadge, renderBadge }; }; export const TabElementsFactory = (): TabNavigationElements => { @@ -77,5 +82,7 @@ export const TabElementsFactory = (): TabNavigationElements => { badges.unregister(id); }; - return { badges, addBadge, removeBadge }; + const renderBadge = badges.createWidget; + + return { badges, addBadge, removeBadge, renderBadge }; }; --- packages/allspark-foundation/src/Navigation/Elements/hooks.ts @@ -5,40 +5,38 @@ import { StackElementsContext, TabElementsContext, } from './context'; -import { TabNavigationElements } from './types'; export const useStackElements = () => { - const elements = useContext(StackElementsContext); - - if (!elements) { + const context = useContext(StackElementsContext); + if (!context) { throw new Error( 'useStackElements must be used within an NavigationElementsProvider' ); } - const banners = useRegistry(elements.banners); - return Object.assign(elements, { banners }); + useRegistry(context.banners); + return context; }; export const useDrawerElements = () => { - const elements = useContext(DrawerElementsContext); - if (!elements) { + const context = useContext(DrawerElementsContext); + if (!context) { throw new Error( 'useDrawerElements must be used within an NavigationElementsProvider' ); } - const badge = useRegistry(elements.badge); - return Object.assign(elements, { badge }); + useRegistry(context.badge); + return context; }; -export const useTabElements = <Tabs extends string = string>() => { - const elements = useContext(TabElementsContext); - if (!elements) { +export const useTabElements = () => { + const context = useContext(TabElementsContext); + if (!context) { throw new Error( 'useTabElements must be used within an NavigationElementsProvider' ); } - const badges = useRegistry(elements.badges); - return Object.assign(elements, { badges }) as TabNavigationElements<Tabs>; + useRegistry(context.badges); + return context; }; --- packages/allspark-foundation/src/Navigation/Elements/types.ts @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import { FC, FunctionComponentElement } from 'react'; import { GestureResponderEvent, StyleProp, ViewStyle } from 'react-native'; import { WidgetRegistry } from '@walmart/allspark-utils'; import { BadgeColor, BannerVariant } from '@walmart/gtp-shared-components'; @@ -18,6 +18,9 @@ export type StackNavigationElements = { banners: WidgetRegistry<Record<string, FC<BannerRegistryProps>>>; addBanner: (config: AddBannerConfig) => void; removeBanner: (id: string) => void; + renderBanners: WidgetRegistry< + Record<string, FC<BannerRegistryProps>> + >['createAllWidgets']; }; export type AddBadgeConfig = { @@ -33,6 +36,9 @@ export type DrawerNavigationElements = { badge: WidgetRegistry<Record<'badge', FC<BadgeRegistryProps>>>; addBadge: (config: AddBadgeConfig) => void; removeBadge: () => void; + renderBadge: ( + props: BadgeRegistryProps + ) => FunctionComponentElement<any> | null; }; export type AddTabBadgeConfig<T extends string> = { @@ -45,4 +51,7 @@ export type TabNavigationElements<Tabs extends string = string> = { badges: WidgetRegistry<Record<string, FC<BadgeRegistryProps>>>; addBadge: (config: AddTabBadgeConfig<Tabs>) => void; removeBadge: (tab: Tabs) => void; + renderBadge: WidgetRegistry< + Record<string, FC<BadgeRegistryProps>> + >['createWidget']; }; --- packages/allspark-foundation/src/Navigation/components/DrawerButton.tsx @@ -36,7 +36,7 @@ export const DrawerButton = (props: DrawerButtonProps) => { > <> <MenuIcon color='white' size={24} UNSAFE_style={iconStyle} /> - {drawer.badge.createWidget('badge', {})} + {drawer.renderBadge({})} </> </TouchableOpacity> ); --- packages/allspark-foundation/src/Navigation/components/Header.tsx @@ -39,7 +39,7 @@ export const Header = (props: StackHeaderProps) => { return ( <> <RNHeader {...newProps} /> - {stack.banners.createAllWidgets({})} + {stack.renderBanners({})} </> ); };
refactor: navigation elements refactor
refactor: navigation elements refactor
a7a1d818400e9754136ae33a9b805a48d20dd840
--- package-lock.json @@ -38,7 +38,7 @@ "@walmart/ask-sam-chat-components": "^0.2.7", "@walmart/ask-sam-mini-app": "1.3.56", "@walmart/attendance-mini-app": "0.59.0", - "@walmart/config-components": "4.1.0-rc.2", + "@walmart/config-components": "4.1.0-rc.3", "@walmart/core-services": "~1.4.11", "@walmart/core-services-allspark": "~2.2.2", "@walmart/core-utils": "~1.3.0", @@ -4882,9 +4882,9 @@ } }, "node_modules/@walmart/config-components": { - "version": "4.1.0-rc.2", - "resolved": "https://npme.walmart.com/@walmart/config-components/-/config-components-4.1.0-rc.2.tgz", - "integrity": "sha512-Fw9GGhqRu1TX/b+qzgHtbsQa3kIc0EU0vCrdCmwAKk9P2O3RMivw4NwBhemwH8gTdqwAo8QTih6wQTcm72boSA==", + "version": "4.1.0-rc.3", + "resolved": "https://npme.walmart.com/@walmart/config-components/-/config-components-4.1.0-rc.3.tgz", + "integrity": "sha512-2ll7yqln6W5D3sbyj+m9FbPmUUXASUfXO3WAMycGS2gq7t+vmdJKWsw3kDVzF+sG6xMiq02qyjTFaLHFV8JsAA==", "dependencies": { "reduxsauce": "^1.2.1", "reselect": "^4.1.5" @@ -25261,9 +25261,9 @@ } }, "@walmart/config-components": { - "version": "4.1.0-rc.2", - "resolved": "https://npme.walmart.com/@walmart/config-components/-/config-components-4.1.0-rc.2.tgz", - "integrity": "sha512-Fw9GGhqRu1TX/b+qzgHtbsQa3kIc0EU0vCrdCmwAKk9P2O3RMivw4NwBhemwH8gTdqwAo8QTih6wQTcm72boSA==", + "version": "4.1.0-rc.3", + "resolved": "https://npme.walmart.com/@walmart/config-components/-/config-components-4.1.0-rc.3.tgz", + "integrity": "sha512-2ll7yqln6W5D3sbyj+m9FbPmUUXASUfXO3WAMycGS2gq7t+vmdJKWsw3kDVzF+sG6xMiq02qyjTFaLHFV8JsAA==", "requires": { "reduxsauce": "^1.2.1", "reselect": "^4.1.5" --- package.json @@ -80,7 +80,7 @@ "@walmart/ask-sam-chat-components": "^0.2.7", "@walmart/ask-sam-mini-app": "1.3.56", "@walmart/attendance-mini-app": "0.59.0", - "@walmart/config-components": "4.1.0-rc.2", + "@walmart/config-components": "4.1.0-rc.3", "@walmart/core-services": "~1.4.11", "@walmart/core-services-allspark": "~2.2.2", "@walmart/core-utils": "~1.3.0",
bug fix for app crash
bug fix for app crash
48baceb3d96f46b687da5b7d62298c477ccca915
--- __tests__/hooks/user.test.ts @@ -40,10 +40,10 @@ describe('useIsSalariedOrTeamlead', () => { }); describe('useIsHourly', () => { - it('should return true for the default mocked user (H)', () => { - const {result} = renderHookWithProviders(() => useIsHourly()); - expect(result.current).toBe(true); - }); + it('should return true for the default mocked user (H)', () => { + const {result} = renderHookWithProviders(() => useIsHourly()); + expect(result.current).toBe(true); + }); it('should return false for mocked salaried user', () => { const {result} = renderHookWithProviders(() => useIsHourly(), {
Adding user test coverage
Adding user test coverage
f936097197246479f2958ecf929e76a25ae174a8
--- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/roster-mini-app", - "version": "2.12.1-alpha.12", + "version": "2.12.1-alpha.13", "main": "dist/index.js", "files": [ "dist" --- src/managerExperience/screens/AllTeamsScreen/AllTeamsScreen.tsx @@ -69,7 +69,7 @@ export const AllTeamsScreen = () => { ListHeaderComponent={ <> <TeamListItem - teamId='Total store' + teamId='total' iconType='navArrow' isLastListItem subText={t('rosterScreen.teamListItem.clockedIn', { @@ -84,6 +84,7 @@ export const AllTeamsScreen = () => { }); navigation.navigate('myTeam.rosterDetail', { teamId: TOTAL_STORE_TEAM_ID, + teamName: TOTAL_STORE_TEAM_LABEL, }); }} /> @@ -129,7 +130,7 @@ export const AllTeamsScreen = () => { teamName, teamId, }); - navigation.navigate('myTeam.rosterDetail', {teamId}); + navigation.navigate('myTeam.rosterDetail', {teamId, teamName}); }} /> )} --- src/managerExperience/screens/RosterDetailScreen/RosterDetailScreen.tsx @@ -133,7 +133,7 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { [allTeamsData?.getTeamsByStore], ); - const getHeaderAndSubtext = () => { + const getHeaderAndSubtext = useCallback(() => { if (teamState.teamLabel === TOTAL_STORE_TEAM_LABEL) { return { header: t('rosterScreen.storeChatCard.title'), @@ -150,9 +150,9 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { subText: '', }; } - }; + }, [teamState]); - const getCurrentTeamName = () => { + const getCurrentTeamName = useCallback(() => { if (currentTeam?.teamName) { return currentTeam?.teamName; } else { @@ -162,7 +162,7 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { return t('rosterScreen.teamWorkgroup.myTeam'); } } - }; + }, [teamState]); const currentTeam = currentTeamData?.getTeamById; const currentTeamName = getCurrentTeamName(); @@ -209,7 +209,7 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { tardyCount: tardyCount, }; } - }, [teamState]); + }, [teamState, allTeamsData?.getTeamsByStore]); const [filteredAssociates, setFilteredAssociates] = useState( sortedAssociateList(teamRoster, teamLeads), @@ -351,7 +351,7 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { searchInput, ); setFilteredAssociates(sortedAssociateList(associatesFiltered, teamLeads)); - }, [searchInput, selectedFilter, teamState]); + }, [searchInput, selectedFilter, teamState, rosterData?.getDailyRoster]); return ( <>
Update roster mini app version
Update roster mini app version
2656f23b7968381b976377f9b360079d745d4d53
--- packages/allspark-foundation/src/Feature/README.md @@ -1,6 +1,6 @@ # Allspark Feature -An `AllsparkFeature` is a collection of related screens, listeners, redux, translations, etc. to be added to an `AllsparkContainer`. +An `AllsparkFeature` is a collection of related capabilities (screens, listeners, redux, translations, etc). to be added to an `AllsparkContainer`. ## How does it work? @@ -14,7 +14,7 @@ const MyFeature = new AllsparkFeature('myFeature' as const); ### Step 2: Create Services & Clients -Use an `AllsparkFeature` instance to [create feature-scoped services and clients](#feature-services--clients) to use throughout a feature's functionality. +Use the `AllsparkFeature` instance to [create feature-scoped services and clients](#feature-creators) to use throughout a feature's functionality. ```js const MyFeatureHttpClient = MyFeature.createHttpClient(config); @@ -26,7 +26,7 @@ const MyFeatureLogger = MyFeature.createLogger(config); ### Step 3: Create a Feature Module -Use an `AllsparkFeature` instance to [create a feature module](#createmodule) that defines the functionality of a feature. +Use the `AllsparkFeature` instance to [create a feature module](#createmodule) that defines the capabilities of a feature. This module is used to connect with an `AllsparkContainer` and should be the default export of your feature library. @@ -102,7 +102,7 @@ MyFeature.createModule({ }); ``` -See [AllsparkFeatureListeners](#allsparkfeaturelisteners) for a utility to more easily create and type a listener config. +A capability creator [createListeners](#createlisteners) is provided on the feature instance to more easily create and type a listener config. #### `config.modals` @@ -130,7 +130,7 @@ MyFeature.createModule({ See [Allspark Navigation: Modals](../Navigation/README.md#modals) for configuration details. -See [AllsparkFeatureModal](#allsparkfeaturemodal) for a utility to more easily create and type a modal config. +A capability creator [createModal](#createmodal) is provided on the feature instance to more easily create and type a modal config. #### `config.redux` @@ -152,7 +152,7 @@ MyFeature.createModule({ }); ``` -See [AllsparkFeatureRedux](#allsparkfeatureredux) for a utility to more easily create and type a redux config. +A capability creator [createRedux](#createredux) is provided on the feature instance to more easily create and type a redux config. #### `config.screens` @@ -180,7 +180,7 @@ MyFeature.createModule({ See [Allspark Navigation: Screens](../Navigation/README.md#screens) for configuration details. -See [AllsparkFeatureScreen](#allsparkfeaturescreen) for a utility to more easily create and type a modal config. +A capability creator [createScreen](#createscreen) is provided on the feature instance to more easily create and type a screen config. #### `config.translations` @@ -204,12 +204,14 @@ MyFeature.createModule({ See [Allspark Translation: Translation Resources](../Translation/README.md#translation-resources) for more details. -See [AllsparkFeatureTranslations](#allsparkfeaturetranslations) for a utility to more easily create and type a translation config. +A capability creator [createTranslations](#createtranslations) is provided on the feature instance to more easily create and type a translation config. ## Feature Creators Use these methods on the feature instance to create services, screens, capabilities, etc. that are scoped to the feature. +## Service & Client Creators + ### createHttpClient Creates an `AllsparkHttpClient` instance that is scoped to the feature.
docs: update feature readme
docs: update feature readme
b6667fe28d2bccc01c3dd304d47df0b05ae42bc1
--- sr.yaml @@ -25,6 +25,8 @@ applications: consumerIdInfos: - consumerId: 1bfc1d19-903b-438b-be7e-b0733aade46b publicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiO/GyYc8U769GsAlKTDD1fjWqN6ME5sSrtHiAQQtKoMGZP7GYzbRsuoIsCNLc39a2+JN76q6cR0mWX8WyZsXYJKpnV6I/TqdH6QsvTLbfPxe4qCBtwYS98uhVfHCrOlqXa2CoeuQwNDx42YZ3uDSD3CYMH2pxbKRN/dXXmwWYqO/8zf9DhMCPaqPrsSI+1etNDYDSKN48mCo6jJq0CzYdseTHzhkeDDyRj9nzNpZbDq8jotp7f11n0GpQzwH/TTRIfw8WieNTok4vIvSIf5BOj/TUCtjry/Ide2BcEd3wRDneOW3mHbCZff+sHkHAtqAfzGppYcJ6FgKxzVgaytWcwIDAQAB + - name: dev + type: DEVELOPMENT consumerIdInfos: - consumerId: 12f4fad8-2bba-439d-86bb-3aba6be9a807 - publicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiO/GyYc8U769GsAlKTDD1fjWqN6ME5sSrtHiAQQtKoMGZP7GYzbRsuoIsCNLc39a2+JN76q6cR0mWX8WyZsXYJKpnV6I/TqdH6QsvTLbfPxe4qCBtwYS98uhVfHCrOlqXa2CoeuQwNDx42YZ3uDSD3CYMH2pxbKRN/dXXmwWYqO/8zf9DhMCPaqPrsSI+1etNDYDSKN48mCo6jJq0CzYdseTHzhkeDDyRj9nzNpZbDq8jotp7f11n0GpQzwH/TTRIfw8WieNTok4vIvSIf5BOj/TUCtjry/Ide2BcEd3wRDneOW3mHbCZff+sHkHAtqAfzGppYcJ6FgKxzVgaytWcwIDAQAB \ No newline at end of file + publicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiO/GyYc8U769GsAlKTDD1fjWqN6ME5sSrtHiAQQtKoMGZP7GYzbRsuoIsCNLc39a2+JN76q6cR0mWX8WyZsXYJKpnV6I/TqdH6QsvTLbfPxe4qCBtwYS98uhVfHCrOlqXa2CoeuQwNDx42YZ3uDSD3CYMH2pxbKRN/dXXmwWYqO/8zf9DhMCPaqPrsSI+1etNDYDSKN48mCo6jJq0CzYdseTHzhkeDDyRj9nzNpZbDq8jotp7f11n0GpQzwH/TTRIfw8WieNTok4vIvSIf5BOj/TUCtjry/Ide2BcEd3wRDneOW3mHbCZff+sHkHAtqAfzGppYcJ6FgKxzVgaytWcwIDAQAB
test(roster): fixing looper issue
test(roster): fixing looper issue
0a221d53dc8bd5c95b6e9d0866496e19f1b540b5
--- package-lock.json @@ -63,7 +63,7 @@ "@walmart/iteminfo-mini-app": "7.5.7", "@walmart/manager-approvals-miniapp": "0.2.4", "@walmart/me-field-mini-app": "14.0.2", - "@walmart/metrics-mini-app": "0.15.13", + "@walmart/metrics-mini-app": "0.15.14", "@walmart/mod-flex-mini-app": "1.11.6", "@walmart/moment-walmart": "1.0.4", "@walmart/onewalmart-miniapp": "1.0.16", @@ -8708,9 +8708,9 @@ } }, "node_modules/@walmart/metrics-mini-app": { - "version": "0.15.13", - "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.15.13.tgz", - "integrity": "sha512-l6q4v8UStQNtFNOcuZPF8nnViN4aCoAtH6qmBz9J4UqIt35vXySDkKxbcBPtIH2O4I7DRGvumnY1sfNn0B2aiA==", + "version": "0.15.14", + "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.15.14.tgz", + "integrity": "sha512-JGGZtSrS1bxxtoEP9dCqTXYXCUmtrfo/YWYEyza2vJC73y6aYWMb9D7oVAR/oi9WPZ1bs4ddJeUna5dC/6Rltg==", "dependencies": { "@types/base-64": "^1.0.0", "apisauce": "1.1.2", @@ -33784,9 +33784,9 @@ "integrity": "sha512-JGf97zQqXPczaYyCjbkSHZ/inO1AkewmMqaj9GgdIGQumgRL17lLsviNp2drH2yFLMee2JIMx2zMJ0g62LCuPw==" }, "@walmart/metrics-mini-app": { - "version": "0.15.13", - "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.15.13.tgz", - "integrity": "sha512-l6q4v8UStQNtFNOcuZPF8nnViN4aCoAtH6qmBz9J4UqIt35vXySDkKxbcBPtIH2O4I7DRGvumnY1sfNn0B2aiA==", + "version": "0.15.14", + "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.15.14.tgz", + "integrity": "sha512-JGGZtSrS1bxxtoEP9dCqTXYXCUmtrfo/YWYEyza2vJC73y6aYWMb9D7oVAR/oi9WPZ1bs4ddJeUna5dC/6Rltg==", "requires": { "@types/base-64": "^1.0.0", "apisauce": "1.1.2",
Updated package lock json
Updated package lock json
ac6c1349e53c20fc2d5ba58481b73e448379c6be
--- packages/allspark-foundation-hub/src/HubFeature/Hub/HubWidget/types.ts @@ -20,6 +20,7 @@ interface HubWidgetBaseTypes { infoText?: string; selectedTeamPreference?: string; selectedTeamIds?: string[]; + refresh: string | null; } interface HubWidgetActionalable extends HubWidgetBaseTypes {
Add refresh props to widget
Add refresh props to widget
89744e29053ad4e9bed5cb952b3710d686e552d2
--- src/channels/components/TextingDisabled.tsx @@ -2,8 +2,6 @@ import React from 'react'; import {Image, StyleSheet, View} from 'react-native'; import {Body} from '@walmart/gtp-shared-components'; import {Images} from '../../images'; -import {useTranslation} from 'react-i18next'; -import {TEXTING_I18N_NAMESPACE} from '../../translations'; const styles = StyleSheet.create({ textingDisabledView: { --- src/channels/components/TextingDisabled.tsx @@ -2,8 +2,6 @@ import React from 'react'; import {Image, StyleSheet, View} from 'react-native'; import {Body} from '@walmart/gtp-shared-components'; import {Images} from '../../images'; -import {useTranslation} from 'react-i18next'; -import {TEXTING_I18N_NAMESPACE} from '../../translations'; const styles = StyleSheet.create({ textingDisabledView: {
remove unused imports
remove unused imports
388e90adb4f7901339b73b3594298871ba35457a
--- package.json @@ -183,7 +183,7 @@ "react-native-modal": "^13.0.1", "react-native-new-snap-carousel": "^3.9.3", "react-native-pager-view": "~6.3.0", - "react-native-pdf": "^6.6.2", + "react-native-pdf": "^6.7.5", "react-native-permissions": "^3.10.1", "react-native-popup-menu": "^0.16.0", "react-native-qrcode-svg": "^6.1.2", --- yarn.lock @@ -18610,9 +18610,9 @@ __metadata: languageName: node linkType: hard -"react-native-pdf@npm:^6.6.2": - version: 6.7.4 - resolution: "react-native-pdf@npm:6.7.4" +"react-native-pdf@npm:^6.7.5": + version: 6.7.5 + resolution: "react-native-pdf@npm:6.7.5" dependencies: crypto-js: "npm:4.2.0" deprecated-react-native-prop-types: "npm:^2.3.0" @@ -18620,7 +18620,7 @@ __metadata: react: "*" react-native: "*" react-native-blob-util: ">=0.13.7" - checksum: 10c0/a0471616696c7c0e48511d726bc0637300ad7f175e8e96398858f667c10b84050b3160796683294964deeb820b12e3b95d3db93fd0b73718e530822d86894782 + checksum: 10c0/7f14eb53b5a1bd43ac563d07796a810ae594a2c9ded8732eec1b64e24f9cb367c75feda1208c79cc8824389615be749a1481c3a594f32ad3535264f53c70d067 languageName: node linkType: hard
Bump react-native-pdf to latest version
Bump react-native-pdf to latest version
f90305de71c51f18bd0b2f6dd505dff09b9e3619
--- package.json @@ -90,7 +90,7 @@ "@walmart/exception-mini-app": "0.43.1", "@walmart/facilities-management-miniapp": "0.3.26", "@walmart/feedback-all-spark-miniapp": "0.9.0", - "@walmart/financial-wellbeing-feature-app": "1.0.56", + "@walmart/financial-wellbeing-feature-app": "1.0.58", "@walmart/functional-components": "2.0.6", "@walmart/gta-react-native-calendars": "0.0.15", "@walmart/gtp-shared-components": "1.8.17",
bumped financial-wellbeing-feature-app to 1.0.58
bumped financial-wellbeing-feature-app to 1.0.58
5489d0db968b9ff4df7cff3c56e80df9570260d1
--- package-lock.json @@ -5612,9 +5612,9 @@ "integrity": "sha512-+2MW/LQi8PqCiPpJXBs2uvhOa4mMKwHcjp3m4XpA8fVtndQLd76C0FivBSqOvAZgBoQc1DYRbVMdqM9nkCdy6Q==" }, "@walmart/taskit-mini-app": { - "version": "0.34.5-beta.4", - "resolved": "https://npme.walmart.com/@walmart/taskit-mini-app/-/taskit-mini-app-0.34.5-beta.4.tgz", - "integrity": "sha512-NNHuZxYcG99M4CiUKPB+/kaymCz2jK0opVr1gnUb56x/S0+N0IPeYj5fUX6qdcXJ2AKfteflMiPPdnmnMsPYgA==" + "version": "0.34.5-beta.5", + "resolved": "https://npme.walmart.com/@walmart/taskit-mini-app/-/taskit-mini-app-0.34.5-beta.5.tgz", + "integrity": "sha512-y7KHKakPPCMfaGWVO6ESSo8UDIpW/XPewxNzKrL3QeTLm2dk1s+PrOpoDp8iso6ulDbWq+Q/ya5LMOk5fVNccQ==" }, "@walmart/tcnumber": { "version": "2.3.1", @@ -21755,7 +21755,7 @@ "isarray": { "version": "1.0.0", "resolved": "https://npme.walmart.com/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "process-nextick-args": { "version": "2.0.1", @@ -22734,7 +22734,7 @@ "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": "sha1-/SHw48C+3muBMp2bynExhYPZl0s=" + "integrity": "sha512-4ZWTteIvddzP7Lg3EM0KP1fDfcN8nx7v5yvHASCLUpoZvhxHQUkjj8uTt4TkJxvTuEK16w7mTwHDauTrIC/BJg==" }, "reduxsauce": { "version": "1.2.1", --- package.json @@ -120,7 +120,7 @@ "@walmart/schedule-mini-app": "0.25.0", "@walmart/settings-mini-app": "1.9.0", "@walmart/shelfavailability-mini-app": "1.2.4", - "@walmart/taskit-mini-app": "0.34.5-beta.4", + "@walmart/taskit-mini-app": "0.34.5-beta.5", "@walmart/time-clock-mini-app": "0.22.0", "@walmart/ui-components": "1.5.0-rc.1", "@walmart/welcomeme-mini-app": "0.71.0",
upgrade taskit version and added enable task badge for signoff tasks
upgrade taskit version and added enable task badge for signoff tasks
5bdf48e715add46a236e50b18590ce9cab010e64
--- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/texting-mini-app", - "version": "2.0.5", + "version": "2.0.6", "private": false, "main": "bundle/dist/index.js", "files": [ --- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/texting-mini-app", - "version": "2.0.5", + "version": "2.0.6", "private": false, "main": "bundle/dist/index.js", "files": [
Update package.json
Update package.json
4f3673299ed863176bb854b2ac9a44fc10903bbf
--- package.json @@ -44,7 +44,7 @@ "@walmart/functional-components": "^1.0.21", "@walmart/gtp-shared-components": "^0.2.2", "@walmart/moment-walmart": "1.0.4", - "@walmart/push-to-talk-mini-app": "0.0.17", + "@walmart/push-to-talk-mini-app": "0.0.19", "@walmart/react-native-logger": "^1.14.0", "@walmart/react-native-shared-navigation": "^0.2.0", "@walmart/redux-store": "^1.0.4",
Update package.json
Update package.json
9adda2c41c58e9bddac643a11ee841af2b6cd93c
--- package.json @@ -89,7 +89,7 @@ "@walmart/counts-component-miniapp": "0.0.42", "@walmart/emergency-mini-app": "1.17.0", "@walmart/exception-mini-app": "1.0.14", - "@walmart/facilities-management-miniapp": "0.5.15", + "@walmart/facilities-management-miniapp": "0.5.16", "@walmart/feedback-all-spark-miniapp": "0.9.9", "@walmart/financial-wellbeing-feature-app": "1.0.64", "@walmart/functional-components": "2.0.6",
Update package.json
Update package.json
82d130850e22b315696bee93506afc8016b7ee40
--- package-lock.json @@ -4532,9 +4532,9 @@ } }, "@walmart/ui-components": { - "version": "1.3.0-rc.0", - "resolved": "https://npme.walmart.com/@walmart/ui-components/-/ui-components-1.3.0-rc.0.tgz", - "integrity": "sha512-PTD6udC8L89Gx//I8SyclZupuyNy2OLYrRNsn2PCLybkGVmcD2CZbFgPsQ479LB0VTAjm7+1a+z/QD9gjuzE8Q==", + "version": "1.3.0-beta.2", + "resolved": "https://npme.walmart.com/@walmart/ui-components/-/ui-components-1.3.0-beta.2.tgz", + "integrity": "sha512-Au4Hoprm+Vw2n8b/lLlo52zVDa07wH7moy1alRBtO8OlfcO6I/p+oGhqzzpC1GtkVU4AgOVcG6Ubaubi8ouBrg==", "requires": { "react-native-calendars": "1.299.0" } --- package.json @@ -99,7 +99,7 @@ "@walmart/shelfavailability-mini-app": "0.5.0", "@walmart/taskit-mini-app": "0.0.77-rc.0", "@walmart/time-clock-mini-app": "0.4.24", - "@walmart/ui-components": "v1.3.0-rc.0", + "@walmart/ui-components": "1.3.0-beta.2", "@walmart/welcomeme-mini-app": "0.30.4", "@walmart/wfm-ui": "^0.1.50", "axios-cache-adapter": "2.7.3",
version bump up ui components
version bump up ui components (cherry picked from commit d9106ced974c4cf2a308c03e421a7d52a6f6d48c)
2ea93d657d77d649ef7752a534b6c4ba600070d6
--- packages/allspark-foundation-hub/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.24.6](https://gecgithub01.walmart.com/allspark/allspark/compare/@walmart/allspark-foundation-hub@1.24.5...@walmart/allspark-foundation-hub@1.24.6) (2025-11-14) + +**Note:** Version bump only for package @walmart/allspark-foundation-hub + ## [1.24.5](https://gecgithub01.walmart.com/allspark/allspark/compare/@walmart/allspark-foundation-hub@1.24.4...@walmart/allspark-foundation-hub@1.24.5) (2025-11-13) **Note:** Version bump only for package @walmart/allspark-foundation-hub --- packages/allspark-foundation-hub/package.json @@ -1,6 +1,6 @@ { "name": "@walmart/allspark-foundation-hub", - "version": "1.24.5", + "version": "1.24.6", "description": "", "main": "lib/index.js", "types": "lib/index.d.ts", --- packages/allspark-foundation/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [7.13.6](https://gecgithub01.walmart.com/allspark/allspark/compare/@walmart/allspark-foundation@7.13.5...@walmart/allspark-foundation@7.13.6) (2025-11-14) + +### Bug Fixes + +- **ALLSPARK-7244:** impersonation sign in loop fix ([#489](https://gecgithub01.walmart.com/allspark/allspark/issues/489)) ([c6f68f1](https://gecgithub01.walmart.com/allspark/allspark/commit/c6f68f1092125534e7f6b1822ff42244ae745e58)) +- cleaner json edit in dev menu ([#490](https://gecgithub01.walmart.com/allspark/allspark/issues/490)) ([ea457cf](https://gecgithub01.walmart.com/allspark/allspark/commit/ea457cfca3f74342af5eb30c125575aa8a9c75b4)) + ## [7.13.5](https://gecgithub01.walmart.com/allspark/allspark/compare/@walmart/allspark-foundation@7.13.4...@walmart/allspark-foundation@7.13.5) (2025-11-13) ### Bug Fixes --- packages/allspark-foundation/package.json @@ -1,6 +1,6 @@ { "name": "@walmart/allspark-foundation", - "version": "7.13.5", + "version": "7.13.6", "description": "", "main": "Core/index.js", "types": "Core/index.d.ts", --- packages/me-at-walmart-geolocation/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.9](https://gecgithub01.walmart.com/allspark/allspark/compare/@walmart/me-at-walmart-geolocation@1.4.8...@walmart/me-at-walmart-geolocation@1.4.9) (2025-11-14) + +**Note:** Version bump only for package @walmart/me-at-walmart-geolocation + ## [1.4.8](https://gecgithub01.walmart.com/allspark/allspark/compare/@walmart/me-at-walmart-geolocation@1.4.7...@walmart/me-at-walmart-geolocation@1.4.8) (2025-11-13) **Note:** Version bump only for package @walmart/me-at-walmart-geolocation --- packages/me-at-walmart-geolocation/package.json @@ -1,6 +1,6 @@ { "name": "@walmart/me-at-walmart-geolocation", - "version": "1.4.8", + "version": "1.4.9", "description": "Geofencing, location tracking and location services for me@ apps", "author": "m0n09mr <maksym.novakh@walmart.com>", "main": "./lib/cjs/index.js", --- packages/me-at-walmart-location/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.2.9](https://gecgithub01.walmart.com/allspark/allspark/compare/@walmart/me-at-walmart-location@1.2.8...@walmart/me-at-walmart-location@1.2.9) (2025-11-14) + +**Note:** Version bump only for package @walmart/me-at-walmart-location + ## [1.2.8](https://gecgithub01.walmart.com/allspark/allspark/compare/@walmart/me-at-walmart-location@1.2.7...@walmart/me-at-walmart-location@1.2.8) (2025-11-13) **Note:** Version bump only for package @walmart/me-at-walmart-location --- packages/me-at-walmart-location/package.json @@ -1,6 +1,6 @@ { "name": "@walmart/me-at-walmart-location", - "version": "1.2.8", + "version": "1.2.9", "description": "Geofencing, location tracking and location services for me@ apps", "author": "m0n09mr <maksym.novakh@walmart.com>", "main": "./lib/cjs/index.js", --- packages/my-walmart-hub/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.6](https://gecgithub01.walmart.com/allspark/allspark/compare/@walmart/my-walmart-hub@1.4.5...@walmart/my-walmart-hub@1.4.6) (2025-11-14) + +**Note:** Version bump only for package @walmart/my-walmart-hub + ## [1.4.5](https://gecgithub01.walmart.com/allspark/allspark/compare/@walmart/my-walmart-hub@1.4.4...@walmart/my-walmart-hub@1.4.5) (2025-11-13) **Note:** Version bump only for package @walmart/my-walmart-hub --- packages/my-walmart-hub/package.json @@ -1,6 +1,6 @@ { "name": "@walmart/my-walmart-hub", - "version": "1.4.5", + "version": "1.4.6", "description": "My Walmart Hub - A comprehensive hub framework for building dynamic widget-based interfaces", "main": "lib/index.js", "types": "lib/index.d.ts",
chore(version): updating package version
chore(version): updating package version - @walmart/allspark-foundation@7.13.6 - @walmart/allspark-foundation-hub@1.24.6 - @walmart/me-at-walmart-geolocation@1.4.9 - @walmart/me-at-walmart-location@1.2.9 - @walmart/my-walmart-hub@1.4.6
2ec9d40ec2c65c3e69af0e07eb14a3fbe1599a99
--- .husky/generate-commit-msg.sh @@ -0,0 +1,88 @@ +#!/usr/bin/env bash + +# Generate commit message based on git diff +COMMIT_MSG_FILE=$1 + +# Check if there's already a user-written message (not just comments) +# Count non-comment, non-empty lines +USER_LINES=$(grep -v '^#' "$COMMIT_MSG_FILE" 2>/dev/null | grep -v '^[[:space:]]*$' | wc -l) +if [ "$USER_LINES" -gt 0 ]; then + # User has already written something, don't override + exit 0 +fi + +# Get the staged changes +DIFF=$(git diff --cached --stat) + +if [ -z "$DIFF" ]; then + echo "No staged changes to commit" + exit 1 +fi + +# Analyze the changes and suggest a commit message +generate_commit_message() { + local files_changed=$(git diff --cached --name-only) + local additions=$(git diff --cached --numstat | awk '{sum+=$1} END {print sum}') + local deletions=$(git diff --cached --numstat | awk '{sum+=$2} END {print sum}') + + # Determine commit type based on file changes + local type="chore" + local scope="" + local description="update code" + + # Check for test files (highest priority) + if echo "$files_changed" | grep -q "test\|spec"; then + type="test" + description="update tests" + # Check for documentation + elif echo "$files_changed" | grep -q "README\|\.md$\|docs/"; then + type="docs" + description="update documentation" + # Check for styling changes + elif echo "$files_changed" | grep -q "\.css$\|\.scss$\|styles"; then + type="style" + description="update styles" + # Check for configuration files + elif echo "$files_changed" | grep -q "config\|\.json$\|\.yml$\|\.yaml$\|eslint\|prettier\|husky"; then + type="chore" + description="update configuration" + # Check for source code changes + elif echo "$files_changed" | grep -q "\.ts$\|\.tsx$\|\.js$\|\.jsx$"; then + if [ "$deletions" -gt "$additions" ]; then + type="refactor" + description="refactor code" + elif [ "$additions" -gt 50 ]; then + type="feat" + description="add new feature" + else + type="fix" + description="fix issue" + fi + fi + + # Try to extract scope from file paths + local common_path=$(echo "$files_changed" | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -1 | awk '{print $2}') + if [ -n "$common_path" ]; then + scope=$(basename "$common_path") + fi + + # Generate the commit message + if [ -n "$scope" ]; then + echo "$type($scope): $description" + else + echo "$type: $description" + fi + + echo "" + echo "# Staged changes:" + echo "# $(git diff --cached --stat | tail -1)" + echo "#" + echo "# Files modified:" + echo "$files_changed" | sed 's/^/# /' + echo "#" + echo "# You can modify this message or replace it entirely." + echo "# Lines starting with '#' will be ignored." +} + +# Generate and write the commit message +generate_commit_message > "$COMMIT_MSG_FILE" --- .husky/prepare-commit-msg @@ -2,25 +2,38 @@ # Skip if commit message was provided via command line (-m, -F, etc.) if [ "$2" = "message" ] || [ "$2" = "template" ] || [ "$2" = "merge" ] || [ "$2" = "squash" ]; then - echo "Commit message already provided, skipping commitizen" + echo "Commit message already provided, skipping auto-generation" exit 0 fi if [ "$2" = "commit" ]; then - echo Skip commitized quizze due to amend mode + echo "Amend mode detected, skipping auto-generation" exit 0 fi if [ -n "$GIT_SEQUENCE_EDITOR" ]; then - echo Skip commitized due to rebase mode + echo "Rebase mode detected, skipping auto-generation" exit 0 fi -# Skip interactive prompt in CI environments like looper +# Generate commit message suggestion +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +if [ -f "$SCRIPT_DIR/generate-commit-msg.sh" ]; then + "$SCRIPT_DIR/generate-commit-msg.sh" "$1" || echo "Warning: Failed to generate commit message" + # Verify the commit message file was created and has content + if [ ! -s "$1" ]; then + echo "chore: update code" > "$1" + fi +else + echo "Error: generate-commit-msg.sh not found at $SCRIPT_DIR" + echo "chore: update code" > "$1" +fi + +# In CI/looper environments, just use the generated message if [ -n "$CI" ] || [ -n "$LOOPER" ] || [ -z "$TERM" ] || [ "$TERM" = "dumb" ]; then - echo "CI/looper environment detected, skipping commitizen hook" + echo "CI/looper environment detected, using generated commit message" exit 0 fi -# Only try to use TTY in interactive environments -exec </dev/tty && git cz --hook || true +# In interactive mode, open editor for user to review/modify +exit 0
chore(.husky): update configuration
chore(.husky): update configuration
4e3fa072192428b09db0b9780bb26db74fde4bb5
--- package.json @@ -102,7 +102,7 @@ "@walmart/beneficiary-online-mini-app": "0.1.26", "@walmart/beneficiary-online-shared-library": "1.2.7", "@walmart/calling-mini-app": "0.8.18", - "@walmart/candidate-authentication-lib": "0.0.8", + "@walmart/candidate-authentication-lib": "0.0.12", "@walmart/celebration-mini-app": "1.34.0", "@walmart/checkout-mini-app": "4.19.0", "@walmart/clock-status-plugin": "0.13.0", --- yarn.lock @@ -6218,13 +6218,6 @@ __metadata: languageName: node linkType: hard -"@types/crypto-js@npm:^3.1.43": - version: 3.1.47 - resolution: "@types/crypto-js@npm:3.1.47::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40types%2Fcrypto-js%2F-%2Fcrypto-js-3.1.47.tgz" - checksum: 10c0/372c3f266d01b4bda2255d83bde099d6965edb1c8cc59de0c815fe1d19a4bc0c403f6f26db76de5caa7bde8d1464a541e81eb275c8ed7604d96d4b27397ea165 - languageName: node - linkType: hard - "@types/crypto-js@npm:^4.1.3": version: 4.2.2 resolution: "@types/crypto-js@npm:4.2.2::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40types%2Fcrypto-js%2F-%2Fcrypto-js-4.2.2.tgz" @@ -7668,13 +7661,12 @@ __metadata: languageName: node linkType: hard -"@walmart/candidate-authentication-lib@npm:0.0.8": - version: 0.0.8 - resolution: "@walmart/candidate-authentication-lib@npm:0.0.8::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fcandidate-authentication-lib%2F-%2Fcandidate-authentication-lib-0.0.8.tgz" +"@walmart/candidate-authentication-lib@npm:0.0.12": + version: 0.0.12 + resolution: "@walmart/candidate-authentication-lib@npm:0.0.12::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fcandidate-authentication-lib%2F-%2F%40walmart%2Fcandidate-authentication-lib-0.0.12.tgz" dependencies: - allspark-log-crypto: "npm:^1.1.0" sonarqube-scanner: "npm:^3.3.0" - checksum: 10c0/df487483b2b4778206957f4e49f7403f71ad9d8c45dd4a3d74c6ab06cb7945e3af0a200f0333e4ed2d6a949f4b7558352e5b2f760818a56b3e3b68b34b1f6764 + checksum: 10c0/106c98bf7854f812fffcaa9d82e9b2384dd887dffba3edaead3bcec1f48830d8850c71507f52b31dc5451ce239f52f95200193760c06c896a501abbf2f8cfd56 languageName: node linkType: hard @@ -8450,7 +8442,7 @@ __metadata: "@walmart/beneficiary-online-mini-app": "npm:0.1.26" "@walmart/beneficiary-online-shared-library": "npm:1.2.7" "@walmart/calling-mini-app": "npm:0.8.18" - "@walmart/candidate-authentication-lib": "npm:0.0.8" + "@walmart/candidate-authentication-lib": "npm:0.0.12" "@walmart/celebration-mini-app": "npm:1.34.0" "@walmart/checkout-mini-app": "npm:4.19.0" "@walmart/clock-status-plugin": "npm:0.13.0" @@ -10082,19 +10074,6 @@ __metadata: languageName: node linkType: hard -"allspark-log-crypto@npm:^1.1.0": - version: 1.1.0 - resolution: "allspark-log-crypto@npm:1.1.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2Fallspark-log-crypto%2F-%2Fallspark-log-crypto-1.1.0.tgz" - dependencies: - "@types/crypto-js": "npm:^3.1.43" - crypto-js: "npm:^3.3.0" - yargs: "npm:^16.2.0" - bin: - allspark-log-crypto: ./cli.js - checksum: 10c0/42f9e97c0876a428091101c05316003271fc4e2316d42c8f670683cb45a0b6c74e8eb7819a62b16b359b4bd594585fce60b1c7b224d4ea01db789d3458fe4483 - languageName: node - linkType: hard - "anser@npm:^1.4.9": version: 1.4.10 resolution: "anser@npm:1.4.10::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2Fanser%2F-%2Fanser-1.4.10.tgz" @@ -11438,17 +11417,6 @@ __metadata: languageName: node linkType: hard -"cliui@npm:^7.0.2": - version: 7.0.4 - resolution: "cliui@npm:7.0.4::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2Fcliui%2F-%2Fcliui-7.0.4.tgz" - dependencies: - string-width: "npm:^4.2.0" - strip-ansi: "npm:^6.0.0" - wrap-ansi: "npm:^7.0.0" - checksum: 10c0/6035f5daf7383470cef82b3d3db00bec70afb3423538c50394386ffbbab135e26c3689c41791f911fa71b62d13d3863c712fdd70f0fbdffd938a1e6fd09aac00 - languageName: node - linkType: hard - "cliui@npm:^8.0.1": version: 8.0.1 resolution: "cliui@npm:8.0.1::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2Fcliui%2F-%2Fcliui-8.0.1.tgz" @@ -11928,13 +11896,6 @@ __metadata: languageName: node linkType: hard -"crypto-js@npm:^3.3.0": - version: 3.3.0 - resolution: "crypto-js@npm:3.3.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2Fcrypto-js%2F-%2Fcrypto-js-3.3.0.tgz" - checksum: 10c0/10b5d91bdc85095df9be01f9d0d954b8a3aba6202f143efa6215b8b3d5dd984e0883e10aeff792ef4a51b77cd4442320242b496acf6dce5069d0e0fc2e1d75d2 - languageName: node - linkType: hard - "crypto-random-string@npm:^2.0.0": version: 2.0.0 resolution: "crypto-random-string@npm:2.0.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2Fcrypto-random-string%2F-%2Fcrypto-random-string-2.0.0.tgz" @@ -24655,13 +24616,6 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:^20.2.2": - version: 20.2.9 - resolution: "yargs-parser@npm:20.2.9::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2Fyargs-parser%2F-%2Fyargs-parser-20.2.9.tgz" - checksum: 10c0/0685a8e58bbfb57fab6aefe03c6da904a59769bd803a722bb098bd5b0f29d274a1357762c7258fb487512811b8063fb5d2824a3415a0a4540598335b3b086c72 - languageName: node - linkType: hard - "yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2Fyargs-parser%2F-%2Fyargs-parser-21.1.1.tgz" @@ -24688,21 +24642,6 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^16.2.0": - version: 16.2.0 - resolution: "yargs@npm:16.2.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2Fyargs%2F-%2Fyargs-16.2.0.tgz" - dependencies: - cliui: "npm:^7.0.2" - escalade: "npm:^3.1.1" - get-caller-file: "npm:^2.0.5" - require-directory: "npm:^2.1.1" - string-width: "npm:^4.2.0" - y18n: "npm:^5.0.5" - yargs-parser: "npm:^20.2.2" - checksum: 10c0/b1dbfefa679848442454b60053a6c95d62f2d2e21dd28def92b647587f415969173c6e99a0f3bab4f1b67ee8283bf735ebe3544013f09491186ba9e8a9a2b651 - languageName: node - linkType: hard - "yargs@npm:^17.0.0, yargs@npm:^17.3.1, yargs@npm:^17.6.2, yargs@npm:^17.7.2": version: 17.7.2 resolution: "yargs@npm:17.7.2::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2Fyargs%2F-%2Fyargs-17.7.2.tgz"
feat: updated talent preboarding mini app package (#5148)
feat: updated talent preboarding mini app package (#5148) Co-authored-by: j0n00f4 <j0n00f4@homeoffice.wal-mart.com> Co-authored-by: Savankumar Akbari - sakbari <sakbari@m-c02rv0v4g8wl.homeoffice.wal-mart.com>
b48f493784bc23cac6eaf9ca5052b5a90860e797
--- package.json @@ -24,6 +24,7 @@ "android:prod": "npm run env:prod && react-native run-android --variant=prodDebug", "ios": "react-native run-ios", "ios:dev": "npm run env:dev && react-native run-ios", + "ios:beta": "npm run env:beta && react-native run-ios", "ios:prod": "npm run env:prod && react-native run-ios", "start": "react-native start", "coverage": "jest --coverage",
Update package.json
Update package.json Added ios beta script
f55f4b81f440af88464c62d3073c8dec771f3830
--- src/navigation/AssociateHallwayNav/SideMenuContent.tsx @@ -173,9 +173,7 @@ export const SideMenuContent: React.FC<DrawerContentComponentProps> = ( onRetry={onRetry} enableTaskItAlert={!!highPriorityCount || !!signOffTaskCount} showInboxBadge={!!badgesCount} - enablePttAlert={ - !isNil(unreadMessageCount) ? unreadMessageCount : undefined - } + enablePttAlert={unreadMessageCount || undefined} enableTimeClock={getIsClockingEnabled} />
updaye ptt alert count
updaye ptt alert count
5c05d47fde7d866a73c1f09d3556fcd3bda9d8c5
--- package-lock.json @@ -59,7 +59,7 @@ "@walmart/manager-approvals-miniapp": "0.2.4", "@walmart/me-field-mini-app": "12.0.24", "@walmart/metrics-mini-app": "0.12.10", - "@walmart/mod-flex-mini-app": "1.9.3", + "@walmart/mod-flex-mini-app": "1.9.4", "@walmart/moment-walmart": "1.0.4", "@walmart/onewalmart-miniapp": "1.0.14", "@walmart/pay-stub-miniapp": "0.9.35", @@ -5528,7 +5528,9 @@ "license": "MIT" }, "node_modules/@walmart/mod-flex-mini-app": { - "version": "1.9.3", + "version": "1.9.4", + "resolved": "https://npme.walmart.com/@walmart/mod-flex-mini-app/-/mod-flex-mini-app-1.9.4.tgz", + "integrity": "sha512-Z2Mh6hXBXAdZl6suTlO7lCa9GODtImMITZfhqNwYeDVT1fesqbW80s4zgUI2OyqDarPs9/wizWBooeyk+Anb2A==", "hasInstallScript": true, "peerDependencies": { "@react-native-community/async-storage": "^1.11.0", @@ -25256,7 +25258,7 @@ } }, "@walmart/mod-flex-mini-app": { - "version": "1.9.3" + "version": "1.9.4" }, "@walmart/moment-walmart": { "version": "1.0.4" --- package.json @@ -101,7 +101,7 @@ "@walmart/manager-approvals-miniapp": "0.2.4", "@walmart/me-field-mini-app": "12.0.24", "@walmart/metrics-mini-app": "0.12.10", - "@walmart/mod-flex-mini-app": "1.9.3", + "@walmart/mod-flex-mini-app": "1.9.4", "@walmart/moment-walmart": "1.0.4", "@walmart/onewalmart-miniapp": "1.0.14", "@walmart/pay-stub-miniapp": "0.9.35",
update modflex 1.9.4
update modflex 1.9.4
9038675a4e650d95ef28326fa29d36f91f420f7e
--- package-lock.json @@ -46,7 +46,7 @@ "@walmart/counts-component-miniapp": "0.0.42", "@walmart/emergency-mini-app": "1.17.0", "@walmart/exception-mini-app": "1.0.14", - "@walmart/facilities-management-miniapp": "0.5.19", + "@walmart/facilities-management-miniapp": "0.5.20", "@walmart/feedback-all-spark-miniapp": "0.9.9", "@walmart/financial-wellbeing-feature-app": "1.0.64", "@walmart/functional-components": "2.0.6", @@ -5082,9 +5082,9 @@ } }, "node_modules/@walmart/facilities-management-miniapp": { - "version": "0.5.19", - "resolved": "https://npme.walmart.com/@walmart/facilities-management-miniapp/-/facilities-management-miniapp-0.5.19.tgz", - "integrity": "sha512-IdXD+H5OBTStYaaY3MWJkTIyOyOdemkiBV2h/91syzsX+Lt59iWLxmdIOeVijSqCgnR8+17fdjN0rCWkS5e6lg==", + "version": "0.5.20", + "resolved": "https://npme.walmart.com/@walmart/facilities-management-miniapp/-/facilities-management-miniapp-0.5.20.tgz", + "integrity": "sha512-KfC0MkI2RGq9F2JCSCp44nHbyz8X1Ja7zMIdRAq1ZCIdwiXlpJg0crsUFwjdyt9Go4bU1KvVSuwf1RNKqtmDrg==", "hasInstallScript": true, "peerDependencies": { "@react-native-community/async-storage": "^1.12.1", @@ -25164,9 +25164,9 @@ "integrity": "sha512-SaexB86EUhjf0oQiOc3RbsEMz9TsSM3av62l46CVznEOOVGmdcrm3naA37GxXSX5LeD0Brft2bWJ5xJbRkqwKg==" }, "@walmart/facilities-management-miniapp": { - "version": "0.5.19", - "resolved": "https://npme.walmart.com/@walmart/facilities-management-miniapp/-/facilities-management-miniapp-0.5.19.tgz", - "integrity": "sha512-IdXD+H5OBTStYaaY3MWJkTIyOyOdemkiBV2h/91syzsX+Lt59iWLxmdIOeVijSqCgnR8+17fdjN0rCWkS5e6lg==" + "version": "0.5.20", + "resolved": "https://npme.walmart.com/@walmart/facilities-management-miniapp/-/facilities-management-miniapp-0.5.20.tgz", + "integrity": "sha512-KfC0MkI2RGq9F2JCSCp44nHbyz8X1Ja7zMIdRAq1ZCIdwiXlpJg0crsUFwjdyt9Go4bU1KvVSuwf1RNKqtmDrg==" }, "@walmart/feedback-all-spark-miniapp": { "version": "0.9.9", --- package.json @@ -123,7 +123,7 @@ "@walmart/schedule-mini-app": "0.29.0", "@walmart/settings-mini-app": "1.12.0", "@walmart/shelfavailability-mini-app": "1.5.2", - "@walmart/taskit-mini-app": "0.49.11", + "@walmart/taskit-mini-app": "0.49.6", "@walmart/time-clock-mini-app": "0.30.0", "@walmart/ui-components": "1.9.0", "@walmart/welcomeme-mini-app": "0.73.0", --- patches/@walmart+facilities-management-miniapp+0.5.20.patch
Reverted taskit version
Reverted taskit version
7140e0d04b9428df6d47df46b4fba719f169357f
--- package-lock.json @@ -76,8 +76,8 @@ "@walmart/react-native-sumo-sdk": "2.5.1", "@walmart/receipt-check-miniapp": "1.12.4", "@walmart/redux-store": "3.1.5", - "@walmart/returns-mini-app": "0.13.3", "@walmart/schedule-mini-app": "0.35.0", + "@walmart/returns-mini-app": "1.2.0", "@walmart/settings-mini-app": "1.18.1", "@walmart/shelfavailability-mini-app": "1.5.13", "@walmart/taskit-mini-app": "2.28.14", @@ -5890,7 +5890,9 @@ } }, "node_modules/@walmart/returns-mini-app": { - "version": "0.13.3", + "version": "1.2.0", + "resolved": "https://npme.walmart.com/@walmart/returns-mini-app/-/returns-mini-app-1.2.0.tgz", + "integrity": "sha512-DSGOHZfFOREzRA0kYoSpTyR4H44Tj8YAyuSlbNquTwrQeMw4y7hkHRL/o6OJ55D6brN1hIHE2BmCoImuoTsKQA==", "hasInstallScript": true, "dependencies": { "@walmart/common-utilities-js": "^1.2.10", @@ -5903,8 +5905,8 @@ "@react-navigation/stack": "^5.9.0", "@walmart/core-services": "0.1.34", "@walmart/functional-components": "^1.0.27", - "@walmart/gtp-shared-components": "^2.0.2", - "@walmart/react-native-logger": "1.29.0", + "@walmart/gtp-shared-components": "^2.0.6", + "@walmart/react-native-logger": "1.31.0-rc.1", "@walmart/react-native-scanner-3.0": "0.1.24", "@walmart/react-native-shared-navigation": "^0.2.0", "@walmart/redux-store": "^2.0.4", @@ -5912,7 +5914,7 @@ "cpc-input": "^1.7.28", "promise.allsettled": "^1.0.6", "react": "^16.13.1", - "react-native": "^0.70.6", + "react-native": "^0.70.4", "react-native-html-parser": "^0.1.0", "react-redux": "^7.2.1", "redux": "^4.0.5" @@ -25451,7 +25453,9 @@ } }, "@walmart/returns-mini-app": { - "version": "0.13.3", + "version": "1.2.0", + "resolved": "https://npme.walmart.com/@walmart/returns-mini-app/-/returns-mini-app-1.2.0.tgz", + "integrity": "sha512-DSGOHZfFOREzRA0kYoSpTyR4H44Tj8YAyuSlbNquTwrQeMw4y7hkHRL/o6OJ55D6brN1hIHE2BmCoImuoTsKQA==", "requires": { "@walmart/common-utilities-js": "^1.2.10", "@walmart/virtual-zpl-printer-model": "^0.2.11", --- package.json @@ -118,8 +118,8 @@ "@walmart/react-native-sumo-sdk": "2.5.1", "@walmart/receipt-check-miniapp": "1.12.4", "@walmart/redux-store": "3.1.5", - "@walmart/returns-mini-app": "0.13.3", "@walmart/schedule-mini-app": "0.35.0", + "@walmart/returns-mini-app": "1.2.0", "@walmart/settings-mini-app": "1.18.1", "@walmart/shelfavailability-mini-app": "1.5.13", "@walmart/taskit-mini-app": "2.28.14",
feature: returns-mini-app drop 12
feature: returns-mini-app drop 12
ace4180f8b5762e5fa860b05664a9d3e5c676b40
--- package-lock.json @@ -4263,9 +4263,9 @@ "integrity": "sha512-Kcf+R1iCgxHOLCwMoW+zrde/AgO41H65qWBwGxBnKfHzy0JRJcdpZBldAksoK6j2RlT6IvCZoju3WydXMElJyw==" }, "@walmart/iteminfo-mini-app": { - "version": "4.0.13", - "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-4.0.13.tgz", - "integrity": "sha512-C3k7LvosXr7vY1sM4n3A9sW9MxzwfkbE7is/mvjZFmKjQCa9CPvZfVjcd8isd6HkzGRWpbGVdHCNbco9WIoehQ==" + "version": "4.0.15", + "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-4.0.15.tgz", + "integrity": "sha512-2oAUTDsEZwGoXlzp5WVEzCgd3jkgCo+plSKn/OBGrA1N4YWRZr4TPo1zPq8RMTN8qc18/nGu97RWvPVwCnV0VQ==" }, "@walmart/manager-approvals-miniapp": { "version": "0.0.59", --- package.json @@ -85,7 +85,7 @@ "@walmart/impersonation-mini-app": "1.0.27", "@walmart/ims-print-services-ui": "0.1.16", "@walmart/inbox-mini-app": "0.26.0", - "@walmart/iteminfo-mini-app": "4.0.13", + "@walmart/iteminfo-mini-app": "4.0.15", "@walmart/manager-approvals-miniapp": "0.0.59", "@walmart/metrics-mini-app": "0.5.21", "@walmart/moment-walmart": "1.0.4",
Item info new version adding a flag
Item info new version adding a flag
bda7af5cada1cde682d1ad90c531e34be98bc216
--- packages/allspark-foundation/__tests__/Container/registries.test.tsx @@ -6,59 +6,35 @@ import { import { WidgetRegistry, MethodRegistry, Registry } from '@walmart/allspark-utils'; describe('Registry Managers', () => { - describe('ComponentRegistryManager', () => { it('Registry Managers should add a feature registry and create a widget', () => { const mockWidgetRegistry = { createWidget: jest.fn(), } as unknown as WidgetRegistry; - const componentRegistry = ComponentRegistryManager(); componentRegistry.addFeatureRegistry('feature1', mockWidgetRegistry); componentRegistry.createComponent('feature1', 'component1', { prop: 'value' }); expect(mockWidgetRegistry.createWidget).toHaveBeenCalledWith('component1', { prop: 'value' }); }); - - it('Registry Managers should return undefined if the featureId is not found', () => { - const componentRegistry = ComponentRegistryManager(); - const result = componentRegistry.createComponent('unknownFeature', 'component1', {}); - expect(result).toBeUndefined(); - }); it('MethodRegistryManager should add a method registry and run a method', () => { const mockMethodRegistry = { runMethod: jest.fn(), } as unknown as MethodRegistry; - const methodRegistry = MethodRegistryManager(); methodRegistry.addFeatureRegistry('feature1', mockMethodRegistry); methodRegistry.createComponent('feature1', 'method1', 'param1', 'param2'); - expect(mockMethodRegistry.runMethod).toHaveBeenCalledWith('method1', 'param1', 'param2'); }); - - it('MethodRegistryManager should return undefined if the featureId is not found', () => { - const methodRegistry = MethodRegistryManager(); - const result = methodRegistry.createComponent('unknownFeature', 'method1', 'param1'); - expect(result).toBeUndefined(); - }); it('FeatureRegistryManager should add feature registries and register a key-value pair', () => { const mockRegistry = { register: jest.fn(), } as unknown as Registry; - const featureRegistries = new Map<string, Registry>(); featureRegistries.set('registry1', mockRegistry); - const featureRegistryManager = FeatureRegistryManager(); featureRegistryManager.addFeatureRegistries('feature1', featureRegistries); featureRegistryManager.register('feature1', 'registry1', 'key1', 'value1'); expect(mockRegistry.register).toHaveBeenCalledWith('key1', 'value1'); }); - it('FeatureRegistryManager should return undefined if the featureId or registryId is not found', () => { - const featureRegistryManager = FeatureRegistryManager(); - const result = featureRegistryManager.register('unknownFeature', 'unknownRegistry', 'key1', 'value1'); - expect(result).toBeUndefined(); - }); - }); }); \ No newline at end of file
registeries test update
registeries test update
fcff3816b2601340f4b50b1081bf6f54925d7a26
--- __tests__/navigation/AssociateHallwayNav/__snapshots__/MainStackNavTest.tsx.snap @@ -31,15 +31,6 @@ Array [ component="SettingsMiniApp" name="Settings" /> - <Screen - component="RefrigerationApp" - initialParams={ - Object { - "navigateToTaskIt": true, - } - } - name="fixIt.alarms" - /> <Screen component="HealthSurveyMiniApp" name="HealthSurveyNav" @@ -72,6 +63,10 @@ Array [ component="GuardedPriceChangesMiniApp" name="priceChanges" /> + <Screen + component="GuardedRefrigerationApp" + name="fixIt.alarms" + /> </Group> <Screen component="WhatsNewScreen" --- __tests__/navigation/ClockOutGuardTest.tsx @@ -17,7 +17,7 @@ const mockNavigation = { describe('ClockOutGuard', () => { (useSelector as jest.Mock).mockReturnValueOnce(true); // isClockedOut const component = create( - <ClockOutGuard appName='App Name'> + <ClockOutGuard> <Text>Children</Text> </ClockOutGuard>, ); @@ -34,7 +34,7 @@ describe('ClockOutGuard', () => { (useSelector as jest.Mock).mockReturnValueOnce(false); // isClockedOut component.update( - <ClockOutGuard appName='App Name'> + <ClockOutGuard> <Text>Children</Text> </ClockOutGuard>, ); @@ -44,10 +44,7 @@ describe('ClockOutGuard', () => { describe('withClockOutGuard', () => { it('wraps component in ClockOutGuard', () => { - const GuardedComponent = withClockOutGuard( - 'GuardedComponent', - 'Guarded App', - ); + const GuardedComponent = withClockOutGuard('GuardedComponent'); (useSelector as jest.Mock).mockReturnValueOnce(false); // isClockedOut const component = create(<GuardedComponent />); --- __tests__/navigation/__snapshots__/ClockOutGuardTest.tsx.snap @@ -9,7 +9,7 @@ exports[`ClockOutGuard matches snapshot when clocked in 1`] = ` exports[`ClockOutGuard matches snapshot when clocked out; navigates home on button press 1`] = ` <ClockOutOverlay buttonTitle="clockOutGuard.action" - content="clockOutGuard.content App Name" + content="clockOutGuard.content" onButtonPress={[Function]} title="clockOutGuard.title" /> --- src/navigation/AssociateHallwayNav/MainStackNav.tsx @@ -43,29 +43,28 @@ const MainStack = createStackNavigator(); const WorkMiniApps = [ { screenName: 'Pinpoint', - appName: 'Pinpoint', component: PinpointMiniApp, }, { screenName: 'ManagerApprovals', - appName: 'Manager Approvals', component: ApprovalsMiniApp, }, { screenName: 'itemInfo', - appName: 'Item Info', component: ItemInfoMiniApp, }, { screenName: 'shelfAvailability', - appName: 'Shelf Availability', component: ShelfAvailabilityMiniApp, }, { screenName: 'priceChanges', - appName: 'Price Changes', component: PriceChangesMiniApp, }, + { + screenName: 'fixIt.alarms', + component: RefrigerationApp, + }, ]; const WorkMiniAppScreens = WorkMiniApps.map((screen) => { @@ -107,12 +106,6 @@ export const MainStackNav = () => { <MainStack.Screen name='Settings' component={SettingsMiniApp} /> - <MainStack.Screen - name='fixIt.alarms' - component={RefrigerationApp} - initialParams={{navigateToTaskIt: true}} - /> - <MainStack.Screen name='HealthSurveyNav' component={HealthSurveyMiniApp} --- src/navigation/ClockOutGuard.tsx @@ -6,7 +6,7 @@ import {ClockOutOverlay} from '@walmart/ui-components'; import {ClockStatusSelectors} from '@walmart/redux-store'; export const ClockOutGuard = (props: any) => { - const {appName, children} = props; + const {children} = props; const navigation = useNavigation(); const [translate] = useTranslation(); const isClockedOut = useSelector(ClockStatusSelectors.getIsClockedOut); @@ -16,7 +16,7 @@ export const ClockOutGuard = (props: any) => { return isClockedOut ? ( <ClockOutOverlay title={translate('clockOutGuard.title')} - content={`${translate('clockOutGuard.content')} ${appName}`} + content={translate('clockOutGuard.content')} buttonTitle={translate('clockOutGuard.action')} onButtonPress={onGoHome} /> @@ -25,9 +25,9 @@ export const ClockOutGuard = (props: any) => { ); }; -export const withClockOutGuard = (Component: any, appName: string) => { +export const withClockOutGuard = (Component: any) => { return (props: any) => ( - <ClockOutGuard appName={appName}> + <ClockOutGuard> <Component {...props} /> </ClockOutGuard> ); --- src/translations/en-US.ts @@ -25,7 +25,7 @@ export const enUS = { navigation: { main: 'Me@Walmart', home: 'Home', - me: 'Me', + me: 'Profile', myTeam: 'My Team', inbox: 'Inbox', taskit: 'Tasks', @@ -162,9 +162,9 @@ export const enUS = { TouchID: 'Touch ID', }, clockOutGuard: { - title: 'Must be clocked in', - content: 'You must be clocked in to use', - action: 'Me@Walmart home', + title: 'Clock in required', + content: 'You must be clocked in to access this feature.', + action: 'Got it', }, loginError: { title: 'Sign in failed', --- src/translations/es-MX.ts @@ -25,7 +25,7 @@ export const esMX = { navigation: { main: 'Me@Walmart', home: 'Inicio', - me: 'Mi trabajo', + me: 'Perfil', myTeam: 'Mi equipo', inbox: 'Buzón', taskit: 'Tasks', @@ -163,9 +163,9 @@ export const esMX = { TouchID: 'Touch ID', }, clockOutGuard: { - title: 'Must be clocked in', - content: 'You must be clocked in to use', - action: 'Me@Walmart home', + title: 'Clock in required', + content: 'You must be clocked in to access this feature.', + action: 'Got it', }, loginError: { title: 'Sign in error',
VQA MegaNav fixes
VQA MegaNav fixes
51e0bd4fa342288ba4176674001e1b950bf457ea
--- targets/US/package.json @@ -113,7 +113,7 @@ "@walmart/ims-print-services-ui": "2.16.4", "@walmart/inbox-mini-app": "0.97.13", "@walmart/invue-react-native-sdk": "0.1.26-beta.3", - "@walmart/iteminfo-mini-app": "8.0.4", + "@walmart/iteminfo-mini-app": "8.1.0", "@walmart/learning-mini-app": "20.0.39", "@walmart/manager-approvals-miniapp": "0.3.2", "@walmart/me-at-walmart-athena-queries": "6.27.0",
bump up iteminfo for drop 28
bump up iteminfo for drop 28
e0e94605432d6e93e326812ae9fdc80079283655
--- packages/allspark-utils/__tests__/createRestarableSagaTest.ts @@ -0,0 +1,57 @@ +import { call, takeEvery, takeLatest } from 'redux-saga/effects'; +import { createRestartableSagas } from '../src/createRestartableSaga'; + +const testActionSaga = jest.fn(); +const otherActionSaga = jest.fn(); +const onErrorMock = jest.fn(); +const localFailureMessage = 'Cannot read property of undefined!!'; + +const detachedSpawnSaga = { + '@@redux-saga/IO': true, + 'combinator': false, + 'type': 'FORK', + 'payload': { + context: null, + fn: expect.any(Function), + args: [], + detached: true, + }, +}; + +describe('createRestartableSagas', () => { + const sagas = [ + takeEvery('TEST_ACTION', testActionSaga), + takeLatest('OTHER_ACTION', otherActionSaga), + ]; + + const result = createRestartableSagas(sagas, onErrorMock); + const [TestActionSpawn, OtherActionSpawn] = result; + + it('returns correct detached spawns', () => { + expect(result).toBeDefined(); + expect(TestActionSpawn).toEqual(detachedSpawnSaga); + expect(OtherActionSpawn).toEqual(detachedSpawnSaga); + }); + + it('calls expected test action on success & failure', () => { + const OtherActionSpawnIterator = OtherActionSpawn.payload.fn(); + OtherActionSpawnIterator.next(); + + // Make it fail first + const error = new Error(localFailureMessage); + expect(OtherActionSpawnIterator.throw(error).value).toEqual( + call(onErrorMock, 'Caught exception in saga', { + message: localFailureMessage, + stack: error.stack, + }) + ); + + // Restart the saga + const NextIteratorValue = OtherActionSpawnIterator.next().value; + const OtherActionIterator = NextIteratorValue.payload.fn(); + expect(OtherActionIterator.next().value).toEqual( + takeLatest('OTHER_ACTION', otherActionSaga) + ); + expect(OtherActionSpawnIterator.next().done).toEqual(true); + }); +}); --- packages/allspark-utils/__tests__/getCorrelationIdTest.ts @@ -0,0 +1,19 @@ +import { getCorrelationId } from '../src/getCorrelationId'; + +jest.mock('nanoid', () => ({ + nanoid: jest.fn(() => 'V1StGXR8_Z5jdHi6B-myT'), +})); + +describe('getCorrelationId', () => { + it('get correct correlation id', () => { + const userId = { countryCode: 'US', siteId: '100' } + const result = getCorrelationId(userId); + expect(result).toEqual('US-100-V1StGXR8_Z5jdHi6B-myT'); + }); + + it('get correct correlation id if user id has missing params', () => { + const result = getCorrelationId(null); + expect(result).toEqual('US-V1StGXR8_Z5jdHi6B-myT'); + }); + +}); --- packages/allspark-utils/__tests__/getScaledHeightTest.ts @@ -0,0 +1,26 @@ +import { + Dimensions, + Image, + ImageResolvedAssetSource, + ScaledSize, +} from 'react-native'; +import { getScaledImageHeight } from '../src/getScaledImageHeight'; + +jest + .spyOn(Dimensions, 'get') + .mockImplementation(() => ({ height: 600, width: 350 }) as ScaledSize); + +jest + .spyOn(Image, 'resolveAssetSource') + .mockImplementation( + () => ({ height: 150, width: 100 }) as ImageResolvedAssetSource + ); + +describe('getScaledImageHeight', () => { + it('returns expected result', () => { + const height = getScaledImageHeight( + require('./mockImages/sample-landing.png') + ); + expect(height).toEqual(525); + }); +}); --- packages/allspark-utils/__tests__/mockImages/sample-landing.png Binary files /dev/null and b/packages/allspark-utils/__tests__/mockImages/sample-landing.png differ
chore: saga tests
chore: saga tests
f91452679c6928bb547b33cc78d5829f1e8c3f15
--- __tests__/components/UnreadBadgeTest.tsx @@ -24,4 +24,10 @@ describe('unreadBadge', () => { const unreadBadge = renderWithProviders(<UnreadBadge />); expect(unreadBadge.queryByTestId('unreadBadge')).toBeNull(); }); + it('should render component when useTextingFeatureEnabled is true', () => { + (useTextingFeatureEnabled as jest.Mock<boolean>).mockReturnValue(true); + (useUnread as jest.Mock<number | null>).mockReturnValue(null); + const unreadBadge = renderWithProviders(<UnreadBadge />); + expect(unreadBadge.queryByTestId('unreadBadge')).toBeNull(); + }); }); --- __tests__/components/UnreadBadgeTest.tsx @@ -24,4 +24,10 @@ describe('unreadBadge', () => { const unreadBadge = renderWithProviders(<UnreadBadge />); expect(unreadBadge.queryByTestId('unreadBadge')).toBeNull(); }); + it('should render component when useTextingFeatureEnabled is true', () => { + (useTextingFeatureEnabled as jest.Mock<boolean>).mockReturnValue(true); + (useUnread as jest.Mock<number | null>).mockReturnValue(null); + const unreadBadge = renderWithProviders(<UnreadBadge />); + expect(unreadBadge.queryByTestId('unreadBadge')).toBeNull(); + }); });
Addresing pr comments
Addresing pr comments
ffd750c3aeb5189f1030799b86aaccc6e3ff28c9
--- __tests__/components/StoreChatCardTest.tsx @@ -5,7 +5,6 @@ import {useNavigation} from '@react-navigation/native'; import {StackNavigationProp} from '@react-navigation/stack'; import {TextingNavParamsMap} from '../../src/navigation'; import {fireEvent} from '@testing-library/react-native'; -import * as utils from '../../src/utils/user'; import {useSelector} from 'react-redux'; import * as lodash from 'lodash';
Removing unused vars
Removing unused vars
cbe96621cc57900ddea4f828b5a228f23f8fb219
--- .looper-pr.yml @@ -4,8 +4,6 @@ tools: nodejs: 12.4.0 flows: - default: - - call: pr pr: - npm install - npm run env:dev
removing temp default flow
removing temp default flow
61253da2426ddc73d772d6c3f12307f19e5d296d
--- package.json @@ -117,7 +117,7 @@ "@walmart/me-at-walmart-athena-queries": "6.3.0", "@walmart/me-at-walmart-common": "6.3.0", "@walmart/me-at-walmart-container": "6.3.0", - "@walmart/metrics-mini-app": "1.23.1", + "@walmart/metrics-mini-app": "1.23.2", "@walmart/mod-flex-mini-app": "1.17.5", "@walmart/moment-walmart": "1.0.4", "@walmart/money-auth-shared-components": "0.1.4", --- yarn.lock @@ -6522,9 +6522,9 @@ __metadata: languageName: node linkType: hard -"@walmart/metrics-mini-app@npm:1.23.1": - version: 1.23.1 - resolution: "@walmart/metrics-mini-app@npm:1.23.1" +"@walmart/metrics-mini-app@npm:1.23.2": + version: 1.23.2 + resolution: "@walmart/metrics-mini-app@npm:1.23.2" dependencies: base-64: "npm:^1.0.0" peerDependencies: @@ -6549,7 +6549,7 @@ __metadata: react-native: 0.73.7 react-redux: ">=8.0.4" reduxsauce: ">=1.2.0" - checksum: 10c0/88383fdbc3dd24cfc2a2841cedca51d60bfce9c7fb37005975ccc723f7d6912cad2e653edc8e6c3da3992b7ada0ed1c81eaeaf4f86727c216772a4c36b0c1d62 + checksum: 10c0/69def61d1734eacf65abc63bff9526442823fb664a14b49e0ab7fa70c39ada62a9a55aedaa5b1a0b9a310d04b3b366473fca489c56a50b232606f744258117f9 languageName: node linkType: hard @@ -7758,7 +7758,7 @@ __metadata: "@walmart/me-at-walmart-athena-queries": "npm:6.3.0" "@walmart/me-at-walmart-common": "npm:6.3.0" "@walmart/me-at-walmart-container": "npm:6.3.0" - "@walmart/metrics-mini-app": "npm:1.23.1" + "@walmart/metrics-mini-app": "npm:1.23.2" "@walmart/mod-flex-mini-app": "npm:1.17.5" "@walmart/moment-walmart": "npm:1.0.4" "@walmart/money-auth-shared-components": "npm:0.1.4"
metrics version bump
metrics version bump
3fc7d73ba296177809650342f6873af663247375
--- package.json @@ -123,7 +123,7 @@ "@walmart/moment-walmart": "1.0.4", "@walmart/money-auth-shared-components": "2.3.6", "@walmart/myteam-mini-app": "1.26.0", - "@walmart/native-rfid-scanner": "4.0.20", + "@walmart/native-rfid-scanner": "4.0.22", "@walmart/onewalmart-miniapp": "1.0.27", "@walmart/pay-stub-miniapp": "0.20.15", "@walmart/payrollsolution_miniapp": "0.145.35", @@ -141,7 +141,7 @@ "@walmart/receipt-check-miniapp": "1.29.4", "@walmart/redux-store": "~6.3.28", "@walmart/returns-mini-app": "4.16.7", - "@walmart/rfid-scan-mini-app": "2.9.2", + "@walmart/rfid-scan-mini-app": "2.10.4", "@walmart/rn-mobile-sdk-pairing": "2.1.8", "@walmart/rn-receiving-mini-app": "2.4.81", "@walmart/roster-mini-app": "2.26.0", @@ -175,6 +175,7 @@ "expo-image": "~1.13.0", "expo-image-manipulator": "~12.0.5", "expo-image-picker": "~15.1.0", + "expo-keep-awake": "~13.0.2", "expo-linear-gradient": "~13.0.2", "expo-linking": "~6.3.1", "expo-local-authentication": "~14.0.1", --- yarn.lock @@ -8356,7 +8356,7 @@ __metadata: "@walmart/moment-walmart": "npm:1.0.4" "@walmart/money-auth-shared-components": "npm:2.3.6" "@walmart/myteam-mini-app": "npm:1.26.0" - "@walmart/native-rfid-scanner": "npm:4.0.20" + "@walmart/native-rfid-scanner": "npm:4.0.22" "@walmart/onewalmart-miniapp": "npm:1.0.27" "@walmart/pay-stub-miniapp": "npm:0.20.15" "@walmart/payrollsolution_miniapp": "npm:0.145.35" @@ -8374,7 +8374,7 @@ __metadata: "@walmart/receipt-check-miniapp": "npm:1.29.4" "@walmart/redux-store": "npm:~6.3.28" "@walmart/returns-mini-app": "npm:4.16.7" - "@walmart/rfid-scan-mini-app": "npm:2.9.2" + "@walmart/rfid-scan-mini-app": "npm:2.10.4" "@walmart/rn-mobile-sdk-pairing": "npm:2.1.8" "@walmart/rn-receiving-mini-app": "npm:2.4.81" "@walmart/roster-mini-app": "npm:2.26.0" @@ -8413,6 +8413,7 @@ __metadata: expo-image: "npm:~1.13.0" expo-image-manipulator: "npm:~12.0.5" expo-image-picker: "npm:~15.1.0" + expo-keep-awake: "npm:~13.0.2" expo-linear-gradient: "npm:~13.0.2" expo-linking: "npm:~6.3.1" expo-local-authentication: "npm:~14.0.1" @@ -8746,13 +8747,13 @@ __metadata: languageName: node linkType: hard -"@walmart/native-rfid-scanner@npm:4.0.20": - version: 4.0.20 - resolution: "@walmart/native-rfid-scanner@npm:4.0.20::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fnative-rfid-scanner%2F-%2F%40walmart%2Fnative-rfid-scanner-4.0.20.tgz" +"@walmart/native-rfid-scanner@npm:4.0.22": + version: 4.0.22 + resolution: "@walmart/native-rfid-scanner@npm:4.0.22::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fnative-rfid-scanner%2F-%2F%40walmart%2Fnative-rfid-scanner-4.0.22.tgz" peerDependencies: react: "*" react-native: "*" - checksum: 10c0/416cf7459c5e25b89439b604bcb6edf405d43bc5050e0298f6188f762340ba1821af6cfcdb15b7ff1d1063bd8f1bf910fcc3eeadf086153d3748db3ed12e6b89 + checksum: 10c0/9c5dae465130cebe7af23d316abfcf8a2709d96a44997814a2f312cda8990a1aa60ce638bdb9f1861dfac667a9dd61d73e8eae8770b44bad5b43979b94f80057 languageName: node linkType: hard @@ -9018,9 +9019,9 @@ __metadata: languageName: node linkType: hard -"@walmart/rfid-scan-mini-app@npm:2.9.2": - version: 2.9.2 - resolution: "@walmart/rfid-scan-mini-app@npm:2.9.2::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Frfid-scan-mini-app%2F-%2F%40walmart%2Frfid-scan-mini-app-2.9.2.tgz" +"@walmart/rfid-scan-mini-app@npm:2.10.4": + version: 2.10.4 + resolution: "@walmart/rfid-scan-mini-app@npm:2.10.4::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Frfid-scan-mini-app%2F-%2F%40walmart%2Frfid-scan-mini-app-2.10.4.tgz" peerDependencies: "@react-navigation/native": ">=6.0.0" "@react-navigation/stack": ">=6.1.0" @@ -9029,15 +9030,15 @@ __metadata: "@walmart/allspark-utils": ">=6.5.0" "@walmart/gtp-shared-components": ">=2.2.6" "@walmart/ims-print-services-ui": ">=2.10.3" - "@walmart/me-at-walmart-common": ">=6.26.0" - "@walmart/native-rfid-scanner": ">=4.0.20" + "@walmart/native-rfid-scanner": ">=4.0.22" "@walmart/react-native-scanner-3.0": ">=0.10.0" "@walmart/ui-components": ">=1.20.4" expo-image: ">=1.10.0" + expo-keep-awake: ">=13.0.0" + luxon: ">=1.28.0" react: "*" react-i18next: ">=13.3.1" react-native: "*" - react-native-background-timer: ">=2.4.1" react-native-ble-manager: ">=11.0.4" react-native-haptic-feedback: ">=1.14.0" react-native-new-snap-carousel: ">=3.9.3" @@ -9047,7 +9048,7 @@ __metadata: redux: ">=4.1.2" reselect: ">=4.0.0" uuid: ">=3.3.2" - checksum: 10c0/7ba28d436c086ebea861d678d578c9664f7685d69293d8521900f30d93b57e4729715e12e598e0e29491a6049809158802c49222e7bb792586fb7dbabb858e0e + checksum: 10c0/24fc15a8169621c87803cd9add9333abdb6a35e31666a2efca25afc11b965fff4848fa231b7f5c2f19d9e2943cb315586a46146a85360885f9ece67c659436ba languageName: node linkType: hard
feat(rfid): RFIDSI-1553 rfid packages drop 30 version bumps (#4184)
feat(rfid): RFIDSI-1553 rfid packages drop 30 version bumps (#4184) Co-authored-by: Shubhang Shah - s0s0zug <Shubhang.Shah@walmart.com>
469499519e6a5eea600ba83ef96dd06ddd6b126e
--- README.md @@ -3,9 +3,13 @@ Allspark is a framework used to build container and mini apps in React Native. A ### Allspark Framework Packages -#### [@walmart/allspark-authentication](https://gecgithub01.walmart.com/allspark/allspark/tree/main/packages/allspark-authentication) +#### [@walmart/allspark-authentication](https://gecgithub01.walmart.com/allspark/allspark/tree/main/packages/allspark-authentication) (**WIP**) -Default **Authentication** library for Allspark framework. (**WIP**) +**Authentication** library for Allspark framework. + +#### @walmart/allspark-environment (**Coming soon**) + +**Environment** library for Allspark framework. (Replacing [@walmart/react-native-env](https://gecgithub01.walmart.com/store-systems-associate-tech-platform/react-native-env)) #### [@walmart/allspark-foundation](https://gecgithub01.walmart.com/allspark/allspark/tree/main/packages/allspark-foundation) @@ -13,15 +17,31 @@ Default **Authentication** library for Allspark framework. (**WIP**) #### [@walmart/allspark-graphql-client](https://gecgithub01.walmart.com/allspark/allspark/tree/main/packages/allspark-graphql-client) -Default **GraphQL** library for Allspark framework. +**GraphQL** library for Allspark framework. #### [@walmart/allspark-http-client](https://gecgithub01.walmart.com/allspark/allspark/tree/main/packages/allspark-http-client) -Default **HTTP** library for Allspark framework. (Replacing [@walmart/functional-components](https://gecgithub01.walmart.com/store-systems-associate-tech-platform/functional-components)) +**HTTP** library for Allspark framework. (Replacing [@walmart/functional-components](https://gecgithub01.walmart.com/store-systems-associate-tech-platform/functional-components)) + +#### [@walmart/allspark-navigation](https://gecgithub01.walmart.com/allspark/allspark/tree/main/packages/allspark-navigation) (**WIP**) + +**Navigation** library for Allspark framework. (Replacing [@walmart/functional-components](https://gecgithub01.walmart.com/store-systems-associate-tech-platform/functional-components))(Replacing [@walmart/react-native-shared-navigation](https://gecgithub01.walmart.com/store-systems-associate-tech-platform/react-native-shared-navigation)) + +#### @walmart/allspark-network (**Coming soon**) + +**Network** library for Allspark framework. (Replacing [react-native-wm-network](https://gecgithub01.walmart.com/store-systems-associate-tech-platform/react-native-wm-network)) + +#### @walmart/allspark-notification (**Coming soon**) + +**Notification** library for Allspark framework. (Replacing [react-native-wm-notification](https://gecgithub01.walmart.com/store-systems-associate-tech-platform/react-native-wm-notification)) + +#### [@walmart/allspark-redux-store](https://gecgithub01.walmart.com/allspark/allspark/tree/main/packages/allspark-redux-store) (**WIP**) + +**Redux** library for Allspark framework.(Replacing [@walmart/redux-store](https://gecgithub01.walmart.com/store-systems-associate-tech-platform/redux-store)) -#### [@walmart/allspark-redux-store](https://gecgithub01.walmart.com/allspark/allspark/tree/main/packages/allspark-redux-store) +#### @walmart/allspark-telemetry (**Coming soon**) -Default **Redux** library for Allspark framework. (**WIP**) (Replacing [@walmart/redux-store](https://gecgithub01.walmart.com/store-systems-associate-tech-platform/redux-store)) +**Telemetry** library for Allspark framework. (Replacing [react-native-wm-telemetry](https://gecgithub01.walmart.com/store-systems-associate-tech-platform/react-native-wm-telemetry)) #### [@walmart/allspark-utils](https://gecgithub01.walmart.com/allspark/allspark/tree/main/packages/allspark-utils)
Update README.md
Update README.md
578d7c398507f582dd84bc94ea307dec2fba25dd
--- src/impersonation/ImpersonationScreen.tsx @@ -1,5 +1,5 @@ import React, {useState, useEffect} from 'react'; -import {InteractionManager, ScrollView, View} from 'react-native'; +import {ScrollView, View} from 'react-native'; import {useDispatch, useSelector} from 'react-redux'; import {Controller, useForm} from 'react-hook-form'; import {SafeAreaView} from 'react-native-safe-area-context';
chore: lint fix
chore: lint fix
f695034f078b85f6a33f6878253c12b60d7bada9
--- package-lock.json @@ -43,7 +43,7 @@ "@walmart/attendance-mini-app": "0.190.4", "@walmart/compass-sdk-rn": "4.2.0", "@walmart/config-components": "4.2.1", - "@walmart/copilot-mini-app": "^1.77.7", + "@walmart/copilot-mini-app": "1.77.8", "@walmart/core-services": "~2.1.1", "@walmart/core-services-allspark": "~2.11.1", "@walmart/core-utils": "~2.0.5", @@ -7030,9 +7030,9 @@ } }, "node_modules/@walmart/copilot-mini-app": { - "version": "1.77.7", - "resolved": "https://npme.walmart.com/@walmart/copilot-mini-app/-/copilot-mini-app-1.77.7.tgz", - "integrity": "sha512-QkbEgzGNrG6m9j7URKlbKxJW5CReifTJkzepvspZTPOmGitkI7cda3f/OXQAaiDUcpwHNbrZeNfKwTRP9t7UaQ==", + "version": "1.77.8", + "resolved": "https://npme.walmart.com/@walmart/copilot-mini-app/-/copilot-mini-app-1.77.8.tgz", + "integrity": "sha512-lMcC9wJWAlhP1MxJXNNx82ZxLt/jpCKpr59MQy8PSyjN+QDyYfJBbz3GfDQuCj+3wQjKsXOjMg1u3+LTI7iIVA==", "hasInstallScript": true, "peerDependencies": { "@react-navigation/native": "^6.0.0", @@ -30415,9 +30415,9 @@ } }, "@walmart/copilot-mini-app": { - "version": "1.77.7", - "resolved": "https://npme.walmart.com/@walmart/copilot-mini-app/-/copilot-mini-app-1.77.7.tgz", - "integrity": "sha512-QkbEgzGNrG6m9j7URKlbKxJW5CReifTJkzepvspZTPOmGitkI7cda3f/OXQAaiDUcpwHNbrZeNfKwTRP9t7UaQ==" + "version": "1.77.8", + "resolved": "https://npme.walmart.com/@walmart/copilot-mini-app/-/copilot-mini-app-1.77.8.tgz", + "integrity": "sha512-lMcC9wJWAlhP1MxJXNNx82ZxLt/jpCKpr59MQy8PSyjN+QDyYfJBbz3GfDQuCj+3wQjKsXOjMg1u3+LTI7iIVA==" }, "@walmart/core-services": { "version": "2.1.1", --- package.json @@ -84,7 +84,7 @@ "@walmart/attendance-mini-app": "0.190.4", "@walmart/compass-sdk-rn": "4.2.0", "@walmart/config-components": "4.2.1", - "@walmart/copilot-mini-app": "1.77.7", + "@walmart/copilot-mini-app": "1.77.8", "@walmart/core-services": "~2.1.1", "@walmart/core-services-allspark": "~2.11.1", "@walmart/core-utils": "~2.0.5",
chore: bump 1.77.8
chore: bump 1.77.8
ee3a64b37b6eb50cd8753f3d010f252a564c9ddc
--- __tests__/core/analyticsInitTest.ts @@ -260,7 +260,7 @@ describe('onUserChanged', () => { expect(iterator.next(deviceType).value).toEqual( select(ClockStatusSelectors.getIsClockedIn), ); - expect(iterator.next(null).value).toEqual( + expect(iterator.next(false).value).toEqual( call(WmTelemetry.setUserId, preHireUser.emailId), ); expect(iterator.next().value).toEqual( @@ -275,7 +275,7 @@ describe('onUserChanged', () => { sessionId: SESSION_ID, deviceType, title: '', - clock_status: '', + clock_status: false, }), ); expect(iterator.next().done).toEqual(true); --- src/core/analyticsInit.ts @@ -56,7 +56,7 @@ export function* onUserChanged() { sessionId: SESSION_ID, deviceType, homeSite: userData.homeSite, - clock_status: clockedIn || '', + clock_status: clockedIn, } as any); } }
analytics update
analytics update
f0dff6227f16078e0a27f31c87e70bc477dd8070
--- src/home/components/GreetingRowV2/BaseGreetingV2.tsx @@ -76,7 +76,7 @@ export const BaseGreetingV2 = (props: BaseGreetingProps) => { const {t} = useTranslation(); const isClockedIn = useSelector(ClockSelectors.getIsClockedIn); - const clockStatus = isClockedIn ? t('ClockedIn') : t('ClockedOut'); + const clockStatus = isClockedIn ? t('clockedIn') : t('clockedOut'); const isMyWalmartV2Enabled = useMyWalmartV2(); --- src/translations/locales/en-US.ts @@ -102,8 +102,8 @@ export const enUS = { 'changeStore.successMessage_site': 'Your site has been updated', 'changeStore.successMessage_store': 'Your store has been updated', 'changeStore.updateAction': 'Update', - 'ClockedIn': 'Clocked In', - 'ClockedOut': 'Clocked Out', + 'clockedIn': 'Clocked In', + 'clockedOut': 'Clocked Out', 'clockOutGuard.action': 'Got it', 'clockOutGuard.content': 'You must be clocked in to access this feature.', 'clockOutGuard.title': 'Clock in required',
feat(header): add text to translation
feat(header): add text to translation
41b30fa7c6e76114e7b5bc0846364f7892bac1b1
--- packages/allspark-foundation/__tests__/Components/ComponentContainers.test.tsx @@ -0,0 +1,190 @@ +import React from 'react'; +import { render } from '@testing-library/react-native'; +import { Text } from 'react-native'; +import { ComponentContainer, AllsparkComponentContainers } from '../../src/Components/ComponentContainers'; + +const MockComponent = (props: { greeting: string }) => <Text>{props.greeting}</Text>; + +describe('ComponentContainer', () => { + let container: ComponentContainer<{ greeting: string }>; + + beforeEach(() => { + container = new ComponentContainer(); + }); + + test('constructor sets config correctly', () => { + const configContainer = new ComponentContainer(undefined, { limit: 1 }); + expect(configContainer['_config']).toEqual({ limit: 1 }); + }); + + test('adds a component and verifies it exists', () => { + container.add('mockComponent', MockComponent); + expect(container.hasComponent('mockComponent')).toBe(true); + expect(container.getComponents()).toContain('mockComponent'); + }); + + test('removes a component and verifies it does not exist', () => { + container.add('mockComponent', MockComponent); + container.remove('mockComponent'); + expect(container.hasComponent('mockComponent')).toBe(false); + expect(container.getComponents()).not.toContain('mockComponent'); + }); + + test('renders a specific component with given props', () => { + container.add('mockComponent', MockComponent); + + const { getByText } = render(<container.Component id="mockComponent" greeting="Hello" />); + expect(getByText('Hello')).toBeTruthy(); + }); + + test('renders all components with given props', () => { + container.add('mockComponent1', MockComponent); + container.add('mockComponent2', MockComponent); + + const { getAllByText } = render(<container.List greeting="Hello" />); + expect(getAllByText('Hello').length).toBe(2); + }); + + test('renders components based on allowed list', () => { + container.add('mockComponent1', MockComponent); + container.add('mockComponent2', MockComponent); + + const { getByText } = render( + <container.List greeting="Hello" allow={['mockComponent1']} /> + ); + expect(getByText('Hello')).toBeTruthy(); + }); + + test('add multiple components and verify', () => { + container.addMultiple([ + ['mockComponent1', MockComponent], + ['mockComponent2', MockComponent], + ]); + + expect(container.getComponents()).toContain('mockComponent1'); + expect(container.getComponents()).toContain('mockComponent2'); + }); + + test('remove non-existent component does not affect existing components', () => { + container.add('mockComponent', MockComponent); + container.remove('nonExistentComponent'); + expect(container.hasComponent('mockComponent')).toBe(true); + }); + +// test('layout renders components with given layout config', () => { +// container.add('mockComponent1', MockComponent); +// container.add('mockComponent2', MockComponent); + +// const { getAllByText } = render( +// <container.Layout config={{ component1: 'mockComponent1', component2: 'mockComponent2' }} greeting="Hello" /> +// ); + +// expect(getAllByText('Hello').length).toBe(2); +// }); + + test('does not exceed the component limit', () => { + container = new ComponentContainer('1'); + container.add('mockComponent1', MockComponent); + container.add('mockComponent2', MockComponent); + + expect(container.getComponents().length).toBe(2); + expect(container.hasComponent('mockComponent1')).toBe(true); + expect(container.hasComponent('mockComponent2')).toBe(true); + }); + + test('register method adds a component (deprecated)', () => { + container.register('mockComponent', MockComponent); + expect(container.hasComponent('mockComponent')).toBe(true); + }); + + test('multiRegister method adds multiple components (deprecated)', () => { + container.multiRegister([ + ['mockComponent1', MockComponent], + ['mockComponent2', MockComponent], + ]); + + expect(container.getComponents()).toContain('mockComponent1'); + expect(container.getComponents()).toContain('mockComponent2'); + }); + + test('add event triggers change event', () => { + const changeListener = jest.fn(); + container['_eventManager'].addListener('change', changeListener); + + container.add('mockComponent', MockComponent); + expect(changeListener).toHaveBeenCalledWith('mockComponent'); + }); + + test('remove event triggers change event', () => { + container.add('mockComponent', MockComponent); + const changeListener = jest.fn(); + container['_eventManager'].addListener('change', changeListener); + + container.remove('mockComponent'); + expect(changeListener).toHaveBeenCalledWith('mockComponent'); + }); +}); + +describe('AllsparkComponentContainers', () => { + beforeEach(() => { + AllsparkComponentContainers.create('test'); + }); + + test('creates a container', () => { + const container = AllsparkComponentContainers.create('test'); + expect(container).toBeInstanceOf(ComponentContainer); + }); + + test('adds and verifies component in the container', () => { + AllsparkComponentContainers.add('test', 'mockComponent', MockComponent); + expect(AllsparkComponentContainers.hasComponent('test', 'mockComponent')).toBe(true); + }); + + test('removes and verifies component from the container', () => { + AllsparkComponentContainers.add('test', 'mockComponent', MockComponent); + AllsparkComponentContainers.remove('test', 'mockComponent'); + expect(AllsparkComponentContainers.hasComponent('test', 'mockComponent')).toBe(false); + }); + + test('handles adding multiple components', () => { + AllsparkComponentContainers.addMultiple('test', [ + ['mockComponent1', MockComponent], + ['mockComponent2', MockComponent], + ]); + + expect(AllsparkComponentContainers.getComponents('test')).toContain('mockComponent1'); + expect(AllsparkComponentContainers.getComponents('test')).toContain('mockComponent2'); + }); + + test('renders container list with given props', () => { + AllsparkComponentContainers.add('test', 'mockComponent', MockComponent); + + const { getByText } = render( + <AllsparkComponentContainers.List container="test" props={{ greeting: 'Hello' }} /> + ); + expect(getByText('Hello')).toBeTruthy(); + }); + + test('renders specific component from container', () => { + AllsparkComponentContainers.add('test', 'mockComponent', MockComponent); + + const { getByText } = render( + <AllsparkComponentContainers.Component container="test" id="mockComponent" props={{ greeting: 'Hello' }} /> + ); + expect(getByText('Hello')).toBeTruthy(); + }); + + test('flushes queue for container on creation', () => { + AllsparkComponentContainers.add('test', 'mockComponent', MockComponent); + expect(AllsparkComponentContainers.hasComponent('test', 'mockComponent')).toBe(true); + + AllsparkComponentContainers.create('test'); + expect(AllsparkComponentContainers.hasComponent('test', 'mockComponent')).toBe(false); + }); + + test('registers existing container', () => { + const container = new ComponentContainer<{ greeting: string }>(); + AllsparkComponentContainers.register('test', container); + expect(AllsparkComponentContainers.getComponents('test')).toEqual([]); + }); +});
unit test for components containers
unit test for components containers
e24f496c8ec99a7f5a985f72844d2a9c2c1a9af8
--- package-lock.json @@ -69,7 +69,7 @@ "@walmart/react-native-encrypted-storage": "1.1.3", "@walmart/react-native-env": "0.2.0", "@walmart/react-native-logger": "1.31.0-rc.1", - "@walmart/react-native-scanner-3.0": "0.1.30-rc.3", + "@walmart/react-native-scanner-3.0": "0.1.31", "@walmart/react-native-shared-navigation": "1.0.2", "@walmart/react-native-store-map": "0.3.7", "@walmart/react-native-sumo-sdk": "2.5.1", @@ -5696,9 +5696,9 @@ } }, "node_modules/@walmart/react-native-scanner-3.0": { - "version": "0.1.30-rc.3", - "resolved": "https://npme.walmart.com/@walmart/react-native-scanner-3.0/-/react-native-scanner-3.0-0.1.30-rc.3.tgz", - "integrity": "sha512-QNmSlHRDhmkirF5jnwFlUvylQA82pxACro/Vii56WhBoSVctVdnNYYzHFdJZcGbnoKTto2B6OxLif8jBHx6ysw==", + "version": "0.1.31", + "resolved": "https://npme.walmart.com/@walmart/react-native-scanner-3.0/-/react-native-scanner-3.0-0.1.31.tgz", + "integrity": "sha512-Kcu32uitdmdYgVWhMacc6ArG90oF7w/qzGyXRC0KewUqhFM9g4KHIESOjS33HyvNRStK/yXRbVSVpfMGnL3+eA==", "license": "ISC", "peerDependencies": { "react-native": ">=0.47.1" @@ -25216,9 +25216,9 @@ "integrity": "sha512-ZZEh/qRdjMPdX87EzSpAMRO9urGTsqBeqlctPk6b4EbMjJe2vwcbBawaamzhO+33zbxdv2riZ7yRukii7E5uXA==" }, "@walmart/react-native-scanner-3.0": { - "version": "0.1.30-rc.3", - "resolved": "https://npme.walmart.com/@walmart/react-native-scanner-3.0/-/react-native-scanner-3.0-0.1.30-rc.3.tgz", - "integrity": "sha512-QNmSlHRDhmkirF5jnwFlUvylQA82pxACro/Vii56WhBoSVctVdnNYYzHFdJZcGbnoKTto2B6OxLif8jBHx6ysw==" + "version": "0.1.31", + "resolved": "https://npme.walmart.com/@walmart/react-native-scanner-3.0/-/react-native-scanner-3.0-0.1.31.tgz", + "integrity": "sha512-Kcu32uitdmdYgVWhMacc6ArG90oF7w/qzGyXRC0KewUqhFM9g4KHIESOjS33HyvNRStK/yXRbVSVpfMGnL3+eA==" }, "@walmart/react-native-shared-navigation": { "version": "1.0.2", --- package.json @@ -111,7 +111,7 @@ "@walmart/react-native-encrypted-storage": "1.1.3", "@walmart/react-native-env": "0.2.0", "@walmart/react-native-logger": "1.31.0-rc.1", - "@walmart/react-native-scanner-3.0": "0.1.30-rc.3", + "@walmart/react-native-scanner-3.0": "0.1.31", "@walmart/react-native-shared-navigation": "1.0.2", "@walmart/react-native-store-map": "0.3.7", "@walmart/react-native-sumo-sdk": "2.5.1",
updated scanner version
updated scanner version
653bdd7e656d30d8d46a61f374736b2dab8c57a1
--- packages/allspark-foundation-hub/__tests__/supplyChain/Modals/UpdateTeamsModal.test.tsx @@ -8,7 +8,11 @@ import { useUpsertSupplyChainAssociatePreference, } from '../../../src'; import { mockGetSupplyChainTeamsByStoreQueryResponse } from '../../../src/SupplyChain/Modals'; -import { SC_ManagerExperienceSelectors } from '../../../src/SupplyChain/Redux'; +import { + SC_ManagerExperienceSelectors, + teamSearchInputEnabled, + allTeamsListEnabled, +} from '../../../src/SupplyChain/Redux'; jest.mock('react-redux', () => ({ ...jest.requireActual('react-redux'), @@ -58,6 +62,8 @@ jest.mock('../../../src/SupplyChain/Redux', () => ({ getIsShiftUpsertError: jest.fn(), }, teamSwitcherImageEnabled: jest.fn(), + allTeamsListEnabled: jest.fn(() => true), + teamSearchInputEnabled: jest.fn(() => true), })); jest.mock('@walmart/allspark-foundation/Telemetry', () => ({ @@ -329,3 +335,88 @@ describe('handleSelectShift logic', () => { expect(upsertMock).toHaveBeenCalledWith({}, ['A1'], []); }); }); + +describe('handleSearchInput logic', () => { + let renderResult: ReturnType<typeof render>; + let closeModalMock: { closeModal: jest.Mock<any, any> | (() => void) }; + let dispatchMock; + + beforeEach(() => { + closeModalMock = { closeModal: jest.fn() }; + dispatchMock = jest.fn(); + (useDispatch as jest.Mock).mockReturnValue(dispatchMock); + (useSelector as jest.Mock).mockImplementation((selector) => { + if (selector === SC_ManagerExperienceSelectors.getIsShiftUpsertError) { + return false; + } + if (selector === SC_ManagerExperienceSelectors.getSavedSiteTeams) { + return []; + } + if (selector === SC_ManagerExperienceSelectors.getAllSiteTeamsSections) { + return [ + { + title: 'Section 1', + data: [ + { teamName: 'Alpha', teamId: '1' }, + { teamName: 'Beta', teamId: '2' }, + { teamName: 'Gamma', teamId: '3' }, + ], + }, + ]; + } + if (selector === SC_ManagerExperienceSelectors.getSelectedTeamIDs) { + return []; + } + if (selector === teamSearchInputEnabled) return true; + if (selector === allTeamsListEnabled) return true; + return undefined; + }); + (useGetSupplyChainTeamsPreferenceQuery as jest.Mock).mockReturnValue({ + shiftPreferenceData: ['A1', 'A2'], + teamPreferenceData: [], + loading: false, + }); + (useGetSupplyChainAllTeamsBySite as jest.Mock).mockReturnValue({ + allSiteTeams: [], + error: false, + loading: false, + }); + renderResult = render(<UpdateTeamsModal modal={closeModalMock} />); + }); + + it('filters teams when input length > 2', () => { + // Find the search input (TextInput) and simulate typing 'Alp' + const searchInput = renderResult.getByTestId('search-input'); + fireEvent.changeText(searchInput, 'Alp'); + // Re-render to reflect state change + renderResult.rerender(<UpdateTeamsModal modal={closeModalMock} />); + const updatedList = renderResult.getByTestId('all-supply-teams-list'); + console.log('TEST DEBUG updatedList.props:', updatedList.props); + // Should only contain 'Alpha' in the data + const foundAlpha = updatedList.props.data.some((section) => + section.data.some((team) => team.teamName === 'Alpha') + ); + expect(foundAlpha).toBe(true); + }); + + it('resets teams when input length <= 2', () => { + const searchInput = renderResult.getByTestId('search-input'); + fireEvent.changeText(searchInput, 'Al'); + renderResult.rerender(<UpdateTeamsModal modal={closeModalMock} />); + const updatedList = renderResult.getByTestId('all-supply-teams-list'); + console.log('TEST DEBUG updatedList.props:', updatedList.props); + // Should contain all original teams + const foundAlpha = updatedList.props.data.some((section) => + section.data.some((team) => team.teamName === 'Alpha') + ); + const foundBeta = updatedList.props.data.some((section) => + section.data.some((team) => team.teamName === 'Beta') + ); + const foundGamma = updatedList.props.data.some((section) => + section.data.some((team) => team.teamName === 'Gamma') + ); + expect(foundAlpha).toBe(true); + expect(foundBeta).toBe(true); + expect(foundGamma).toBe(true); + }); +}); --- packages/allspark-foundation-hub/src/Shared/Components/SearchInput/SearchInput.tsx @@ -17,6 +17,7 @@ export const TeamSearchInput = ({ RightIcon, loading, handleChange, + testID, }: TeamSearchInputProps) => { const showSearchIcon = useSelector(searchIconEnabled); const showMicrophoneIcon = useSelector(microphoneIconEnabled); @@ -44,7 +45,7 @@ export const TeamSearchInput = ({ placeholder={t('searchTeamInput.placeHolder')} placeholderTextColor={colors.gray['100']} onChangeText={handleChange} - testID='search-input' + testID={testID || 'search-input'} /> <View style={styles.iconRight} testID='microphone-icon'> {rightIconComponent} --- packages/allspark-foundation-hub/src/Shared/Components/SearchInput/types.ts @@ -11,6 +11,7 @@ export interface TeamSearchInputProps { }>; loading?: boolean; handleChange: (text: string) => void; + testID?: string; } export interface TeamSearchInputLoadingProps { --- packages/allspark-foundation-hub/src/SupplyChain/Components/AllSupplyTeamsList/AllSupplyTeamsList.tsx @@ -82,7 +82,10 @@ export const AllSupplyTeamList: React.FC<AllSupplyTeamListProps> = ({ backgroundColorOverride={style.headerContainer} /> {isModal && showSearchInput && ( - <TeamSearchInput handleChange={handleSearchInput} /> + <TeamSearchInput + handleChange={handleSearchInput} + testID='search-input' + /> )} <SectionList testID='all-supply-teams-list' --- packages/allspark-foundation-hub/src/SupplyChain/Modals/UpdateTeamsModal/UpdateTeamsModal.tsx @@ -91,8 +91,6 @@ export const UpdateTeamsModal = ({ SC_ManagerExperienceSelectors.getIsShiftUpsertError ); - console.log('isShiftUpsertError -> ', isShiftUpsertError); - const handleSelection = useCallback( (item: string) => { setSelectedTeams([item]);
feat(SMDV-7634): adding test coverage for UpdateTeamsModal
feat(SMDV-7634): adding test coverage for UpdateTeamsModal
e5727543a3396f5ac9dc9f8651051faa5df3f9a7
--- package-lock.json @@ -3509,9 +3509,9 @@ "integrity": "sha512-bSYWNNt5wFADM8milPDSKuNAbPk5uz6hXl+9Ht/4ZrRq4wvB6Gzo47Q7kui5xlFmKT9WXqnYK8Ayr/WT1HEyfQ==" }, "@walmart/shelfavailability-mini-app": { - "version": "0.3.63", - "resolved": "https://npme.walmart.com/@walmart/shelfavailability-mini-app/-/shelfavailability-mini-app-0.3.63.tgz", - "integrity": "sha512-YOlc8frAAgPvPTjcWmvLPb9cn0UIGLX6o32OTm3sEgIQVvO9ecW00brCHPgfawQRc4jGND02sszh8Ri63HpCVg==", + "version": "0.3.64", + "resolved": "https://npme.walmart.com/@walmart/shelfavailability-mini-app/-/shelfavailability-mini-app-0.3.64.tgz", + "integrity": "sha512-47pfaSXBCx7tp6IXLIzP+4R7A06YxxPo+8sxnh5kezwJBVgOBUeUiWt8Pz1r/sFTLGFgwF48raNT7vOwXEADTg==", "requires": { "@types/uuid": "^8.3.0", "@types/xdate": "^0.8.31", --- 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.63", + "@walmart/shelfavailability-mini-app": "0.3.64", "@walmart/allspark-health-survey-mini-app": "0.0.41", "@walmart/allspark-home-mini-app": "0.4.24", "@walmart/allspark-me-mini-app": "0.1.0",
0.3.64 bugfix
0.3.64 bugfix
1e31b40e19920a4963ca8e642755aece1ad0835a
--- packages/allspark-foundation/__tests__/Components/AllsparkBanner.test.tsx @@ -42,6 +42,7 @@ describe('AllsparkBanner', () => { type: 'alert', variant: 'info', value: 'Test Banner', + closable: true, } as ComponentRecord<AllsparkBannerConfig>, onRemove: jest.fn(), }; --- packages/allspark-foundation/__tests__/Components/__snapshots__/AllsparkBanner.test.tsx.snap @@ -15,7 +15,9 @@ exports[`AllsparkBanner renders banner snaphot 1`] = ` { "backgroundColor": "#e3e4e5", }, - undefined, + { + "paddingRight": 16, + }, ] } testID="Banner" @@ -86,6 +88,11 @@ exports[`AllsparkBanner renders banner snaphot 1`] = ` onResponderTerminate={[Function]} onResponderTerminationRequest={[Function]} onStartShouldSetResponder={[Function]} + style={ + { + "display": "none", + } + } > <View style={ --- packages/allspark-foundation/__tests__/FeatureRunner/modals/TranslationModal.test.tsx @@ -1,48 +0,0 @@ -import { TranslationModal } from '../../../src/FeatureRunner/modals/TranslationModal'; - -import React from 'react'; -import { render, fireEvent } from '@testing-library/react-native'; - -import { - AllsparkTranslationClient, - useAllsparkModal, -} from '../../../src/Translation'; - -jest.mock('../../../src/Translation', () => ({ - AllsparkTranslationClient: { - changeLanguage: jest.fn(), - languages: ['English (EN)'], - }, - - useAllsparkModal: jest.fn().mockImplementation(() => ({ - openModal: jest.fn(), - closeModal: jest.fn(), - })), - useAllsparkTranslation: jest.fn(() => ({ - i18n: { - language: 'en-US', - }, - })), -})); - -describe('TranslationModal', () => { - afterEach(() => { - jest.clearAllMocks(); - }); - - test('should render snapshot', async () => { - const { toJSON } = render(<TranslationModal />); - - expect(toJSON()).toMatchSnapshot(); - }); - - test('should be interactive', async () => { - const { getByTestId } = render(<TranslationModal />); - const radio = getByTestId('English (EN)'); - fireEvent.press(radio); - - expect(AllsparkTranslationClient.changeLanguage).toHaveBeenCalledWith( - 'English (EN)' - ); - }); -}); --- packages/allspark-foundation/__tests__/FeatureRunner/modals/__snapshots__/TranslationModal.test.tsx.snap @@ -1,30 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`TranslationModal should render snapshot 1`] = ` -<BottomSheet - isOpen={true} - onClose={[Function]} - showCloseHandle={true} - title="Choose your preferred language" -> - <SafeAreaView - edges={ - [ - "bottom", - ] - } - > - <Radio - UNSAFE_style={ - { - "marginBottom": 16, - } - } - checked={false} - label="English (EN)" - onPress={[Function]} - testID="English (EN)" - /> - </SafeAreaView> -</BottomSheet> -`; --- packages/allspark-foundation/src/Components/Banners/AllsparkBanner.tsx @@ -81,7 +81,11 @@ export const AllsparkBanner = (props: { {value} </Alert> {closable && ( - <IconButton UNSAFE_style={styles.closeButton} onPress={onClose}> + <IconButton + testID='banner-icon-btn' + UNSAFE_style={styles.closeButton} + onPress={onClose} + > <CloseIcon /> </IconButton> )} --- packages/me-at-walmart-container/__tests__/http/utils.test.ts @@ -4,7 +4,7 @@ import { getAsyncAllowedHttp401ErrorLimit, } from '../../src/http/utils'; import { MeAtWalmartLocalStorage } from '../../src/services/localStorage'; -import { MeAtWalmartLogger } from '../../src/services/logger'; +import { HttpLogger } from '../../src/http/logger'; import { DEFAULT_HTTP_SUCCESS_LOG_RATE, @@ -12,15 +12,15 @@ import { DEFAULT_ALLOWED_HTTP_401_LIMIT, } from '../../src/http/constants'; -// Mock MeAtWalmartLocalStorage and MeAtWalmartLogger +// Mock MeAtWalmartLocalStorage and HttpLogger jest.mock('../../src/services/localStorage', () => ({ MeAtWalmartLocalStorage: { get: jest.fn(), }, })); -jest.mock('../../src/services/logger', () => ({ - MeAtWalmartLogger: { +jest.mock('../../src/http/logger', () => ({ + HttpLogger: { warn: jest.fn(), }, })); @@ -37,7 +37,7 @@ describe('HTTP/utils', () => { ); const rate = await getAsyncLogRate(); expect(rate).toEqual(DEFAULT_HTTP_SUCCESS_LOG_RATE); - expect(MeAtWalmartLogger.warn).not.toHaveBeenCalled(); + expect(HttpLogger.warn).not.toHaveBeenCalled(); }); }); @@ -48,7 +48,7 @@ describe('HTTP/utils', () => { ); const limit = await getAsyncHeaderSizeLimit(); expect(limit).toEqual(DEFAULT_HTTP_HEADER_SIZE_LIMIT); - expect(MeAtWalmartLogger.warn).not.toHaveBeenCalled(); + expect(HttpLogger.warn).not.toHaveBeenCalled(); }); }); @@ -59,7 +59,7 @@ describe('HTTP/utils', () => { ); const limit = await getAsyncAllowedHttp401ErrorLimit(); expect(limit).toEqual(DEFAULT_ALLOWED_HTTP_401_LIMIT); - expect(MeAtWalmartLogger.warn).not.toHaveBeenCalled(); + expect(HttpLogger.warn).not.toHaveBeenCalled(); }); }); });
fix failing tests
fix failing tests
0e9f05c914342b79b5a74079f37f9302d162a1a8
--- package-lock.json @@ -3349,9 +3349,9 @@ "integrity": "sha512-Am5QrgtwxJ23j3GsZZivaZknjiWTuPFvFxV1J0ysrQZ3H4wZcgsxuFdsCJqA3Hzufo3pZdyMTZhNtAx4IuQjjw==" }, "@walmart/inbox-mini-app": { - "version": "0.1.0", - "resolved": "https://npme.walmart.com/@walmart/inbox-mini-app/-/inbox-mini-app-0.1.0.tgz", - "integrity": "sha512-ItMErwEl2WKyN/4e5eapVcnlA6GPy+PDUS+BnMQpkymb0gX1gYZKO9F+o3pIZ1Tl3XNsC4M1BxJ54Aq9X/f4RQ==" + "version": "0.3.0", + "resolved": "https://npme.walmart.com/@walmart/inbox-mini-app/-/inbox-mini-app-0.3.0.tgz", + "integrity": "sha512-snhN7iZrP2VSNtEzpi1pi7/nlvU0+lbniTNnGCD23SfjAHBkipVpaPxCnHgX0X+YwQTn1LtAJc4yvDH0BWyzhg==" }, "@walmart/iteminfo-mini-app": { "version": "1.0.22", --- package.json @@ -75,7 +75,7 @@ "@walmart/gtp-shared-components": "^1.1.8", "@walmart/impersonation-mini-app": "1.0.15", "@walmart/ims-print-services-ui": "0.0.19", - "@walmart/inbox-mini-app": "0.1.0", + "@walmart/inbox-mini-app": "0.3.0", "@walmart/iteminfo-mini-app": "1.0.22", "@walmart/manager-approvals-miniapp": "0.0.40", "@walmart/moment-walmart": "1.0.4",
Bump inbox version
Bump inbox version
b579a920830c7245e8a609ffbf31566cbe6ac0b2
--- .looper.multibranch.yml @@ -1,2 +1 @@ inherit: job:///allspark/allspark-core/allspark-template:allspark-template.yml -
Update .looper.multibranch.yml
Update .looper.multibranch.yml
6c628dff0487d4910d1dd5ecbbd883a1895256da
--- src/presence/components/DoNotDisturbAutoReset.tsx @@ -10,11 +10,11 @@ import { } from '../../redux/selectors'; import {logger} from '../../logger/Logger'; -type DNDType = { - children?: React.ReactChildren; -}; - -export const DoNotDisturbAutoReset = (props: DNDType) => { +export const DoNotDisturbAutoReset = ({ + children, +}: { + children: React.ReactChildren; +}) => { const userId = useSelector(getEncryptedUserId); const storeId: string = useSelector(SiteSelectors.getUserWorkingSite); @@ -45,5 +45,5 @@ export const DoNotDisturbAutoReset = (props: DNDType) => { } }; }, [storeId, userId, dndOfflineTimeLimit, dndAutoSwitchThreshold]); - return <>{props.children}</>; + return {children}; }; --- src/presence/components/DoNotDisturbAutoReset.tsx @@ -10,11 +10,11 @@ import { } from '../../redux/selectors'; import {logger} from '../../logger/Logger'; -type DNDType = { - children?: React.ReactChildren; -}; - -export const DoNotDisturbAutoReset = (props: DNDType) => { +export const DoNotDisturbAutoReset = ({ + children, +}: { + children: React.ReactChildren; +}) => { const userId = useSelector(getEncryptedUserId); const storeId: string = useSelector(SiteSelectors.getUserWorkingSite); @@ -45,5 +45,5 @@ export const DoNotDisturbAutoReset = (props: DNDType) => { } }; }, [storeId, userId, dndOfflineTimeLimit, dndAutoSwitchThreshold]); - return <>{props.children}</>; + return {children}; };
refactor children of component
refactor children of component
e4d5509e4acf2478263894c0cde56b4e9854e6e8
--- src/screens/SearchScreen.tsx @@ -73,6 +73,7 @@ type SearchScreenProps = { route: RouteProp<TextingNavParamsMap, 'myTeam.searchScreen'>; }; +//TODO: Refactor Search Screen and move into myteam app as shared responsibility with wmConnect. Have discussion about this. export const SearchScreen: React.FC<SearchScreenProps> = (props) => { const {route} = props; const {searchInput} = route?.params; @@ -159,11 +160,10 @@ export const SearchScreen: React.FC<SearchScreenProps> = (props) => { //TODO: Consider under which condition an item is added to recent search. Suggestion to add to recent search for any action btn click on the screen const tmpMessageBtn = { i18nLabel: 'Message', - action: (associate: AssociateRosterItem) => { - const name = associateDisplayName(associate); + action: (associateRosterItem: AssociateRosterItem) => { + const name = associateDisplayName(associateRosterItem); const associateName = namecase(name.slice(0, 20)); dispatch(rosterSlice.actions.SET_SEARCH_TEXT('')); - console.log('Storing the associate name for ' + associateName); storeAssociateName(associateName); }, }; @@ -178,11 +178,6 @@ export const SearchScreen: React.FC<SearchScreenProps> = (props) => { ); }; - useEffect(() => { - console.log('The Recent Search History Data'); - console.log(recentSearchHistory); - }, [recentSearchHistory]); - //TODO: Unable to re-use the roster component on this screen so duplicating flashList. Investigate this render bug and fix return ( <View style={styles.searchScreenContainer}>
making the search screen functional
making the search screen functional
0f26a204faccc48b49247fdeec9241c5a96bb5a0
--- ios/Podfile.lock @@ -746,14 +746,14 @@ PODS: - RNWMSSOLibrary (1.1.0): - AppAuth - React - - SSO (= 1.2.8) + - SSO (= 1.2.9) - SDWebImage (5.11.1): - SDWebImage/Core (= 5.11.1) - SDWebImage/Core (5.11.1) - SDWebImageWebPCoder (0.6.1): - libwebp (~> 1.0) - SDWebImage/Core (~> 5.7) - - SSO (1.2.8): + - SSO (1.2.9): - AppAuth - Starscream (3.0.6) - Yoga (1.14.0) @@ -1116,10 +1116,10 @@ SPEC CHECKSUMS: RNSketchCanvas: 6939b18677cd1794151cc3d8eb5a0a2158a4a05b RNSVG: ce9d996113475209013317e48b05c21ee988d42e RNVectorIcons: bc69e6a278b14842063605de32bec61f0b251a59 - RNWMSSOLibrary: c252a5290fcf088b5974c454d4b17a1d6e66174d + RNWMSSOLibrary: 3103d2f05e6c559dfab7da9ca82c07472b0d0d6b SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d SDWebImageWebPCoder: d0dac55073088d24b2ac1b191a71a8f8d0adac21 - SSO: 29ee67602c1a6a982ffe74ade095215f182d13f9 + SSO: 62a1e2954866c8b66c21541d2ebe48506a2eb7f5 Starscream: ef3ece99d765eeccb67de105bfa143f929026cf5 Yoga: 7740b94929bbacbddda59bf115b5317e9a161598 --- package-lock.json @@ -12389,9 +12389,9 @@ "integrity": "sha512-Ls9qiNZzW/OLFoI25wfjjAcrf2DZ975hn2vr6U9gyuxi2nooVbzQeFoQS5vQcbCt9QX5NY8ASEEAtlLdIa6KVg==" }, "react-native-ssmp-sso-allspark": { - "version": "1.0.9", - "resolved": "https://npme.walmart.com/react-native-ssmp-sso-allspark/-/react-native-ssmp-sso-allspark-1.0.9.tgz", - "integrity": "sha512-JVi8upB0i3uUC2lomee4Od2H4tGfPF1fki21hQcDGKBpAuI8ueZxarlJ6h2FdNRpYhonoXOGBfvzYUK/kMz9Fg==" + "version": "1.1.0", + "resolved": "https://npme.walmart.com/react-native-ssmp-sso-allspark/-/react-native-ssmp-sso-allspark-1.1.0.tgz", + "integrity": "sha512-Po7TGrF3QQMcoszMxktllMwUAp5XERD0+62dow0OJHZiabU5XfnKU7K/T0WfYqAHpEdtABbHHuhSVuQt5kV8AQ==" }, "react-native-sumo-sdk": { "version": "2.7.4-rc.9", --- package.json @@ -115,7 +115,7 @@ "react-native-screens": "^2.10.1", "react-native-sha256": "^1.3.6", "react-native-splash-screen": "^3.2.0", - "react-native-ssmp-sso-allspark": "1.0.9", + "react-native-ssmp-sso-allspark": "1.1.0", "react-native-sumo-sdk": "^2.7.4-rc.9", "react-native-svg": "^12.1.0", "react-native-tab-view": "^2.15.2",
SSO version bump up (#508)
SSO version bump up (#508) Co-authored-by: Hitesh Arora - h0a006n <Hitesh.Arora@walmart.com>
6cc71c57704f4fc738d830b7a54ae74897cb19ab
--- __tests__/navigation/AssociateHallwayNav/__snapshots__/MainStackNavTest.tsx.snap @@ -122,7 +122,7 @@ Array [ } > <Screen - component={[Function]} + component="AskSamMiniApp" name="askSam" options={ Object { --- __tests__/navigation/PreHireHallwayNav/__snapshots__/PreHireStackTest.tsx.snap @@ -12,7 +12,7 @@ exports[`PreHireHallwayNav matches snapshot 1`] = ` } /> <Screen - component={[Function]} + component="AskSamMiniApp" name="askSam" options={ Object { --- __tests__/startup/AssociateStartupTest.ts @@ -4,7 +4,6 @@ import {useDispatch} from 'react-redux'; import {useLogger} from '@walmart/core-services/Logger'; import {addSagas} from '@walmart/redux-store'; import {useHttpClient} from '@walmart/core-services/HttpClient'; -import {AskSamMiniApp} from '@walmart/ask-sam-mini-app'; import {useRbacConfig} from '@walmart/config-components'; import {useAssociateStartup} from '../../src/startup/AssociateStartup';
update snapshot, lint fix
update snapshot, lint fix
b912235be89b4086837ac79cf041a8e96f950c91
--- package-lock.json @@ -4271,9 +4271,9 @@ "integrity": "sha512-7nXe02E/AOFtT1u6/tVerIskwWvSoJcMgYN2DNH7vMgbb0YIFOsqwzX+nbRh/AcaZhC7YX5H2irVCc6/5/HjJw==" }, "@walmart/metrics-mini-app": { - "version": "0.5.8", - "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.5.8.tgz", - "integrity": "sha512-PHoCdNqARbKpM+8x4v0tcO26SYyYq6kAqWDAjm1LRrx961JnZefubfTP4KSgRKHSY705nAQtPKFTCYr2e18Nzg==", + "version": "0.5.9", + "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.5.9.tgz", + "integrity": "sha512-sRoSZUpXwpiVa1eGXoi3KhfagkGbBJGQMg4yJggbXfb9+7CWixr9j4pt7m3CSzhQPc2nFLX3Kyx48r/5sBhmnw==", "requires": { "@types/base-64": "^1.0.0", "apisauce": "^1.1.2", --- package.json @@ -86,7 +86,7 @@ "@walmart/inbox-mini-app": "0.21.0", "@walmart/iteminfo-mini-app": "2.0.16", "@walmart/manager-approvals-miniapp": "0.0.58", - "@walmart/metrics-mini-app": "0.5.8", + "@walmart/metrics-mini-app": "0.5.9", "@walmart/moment-walmart": "1.0.4", "@walmart/push-to-talk-mini-app": "0.5.39", "@walmart/react-native-env": "^0.2.0",
updating metrics mini app version
updating metrics mini app version
b0f1fcc8744561b8f5a21ffec5ce49ea87b3f088
--- docs/docs/introduction.md @@ -0,0 +1,6 @@ +--- + sidebar_position: 1 + title: Allspark Documentation +--- + +Get all the updated documentation for MyWalmart and Allspark: [MyWalmart DX Documentation](https://dx.walmart.com/meplatform/documentation/dx/overview) \ No newline at end of file --- docs/src/pages/index.tsx @@ -26,7 +26,7 @@ function HomepageHeader() { styles.getStarted, 'button button--outline button--secondary button--lg' )} - to={useBaseUrl('docs/getting-started')} + to={useBaseUrl('docs/introduction')} > Get Started </Link>
chore(docs): update docs for new structure (#234)
chore(docs): update docs for new structure (#234)
9c41044d71476d9a43fdabd2392e3a214e3d25d4
--- packages/allspark-foundation-hub/src/Store/Modules/TeamSelection/Screens/TeamSelection.tsx @@ -231,9 +231,7 @@ export const TeamSelection = () => { default: 'Try Again', fallbackLng: 'en-US', })} - onPressButton={() => { - onWarningAlertPress(); - }} + onPressButton={onWarningAlertPress} /> )} <TeamSelectionList --- packages/allspark-foundation-hub/src/Store/Modules/TeamSwitcher/index.tsx @@ -442,9 +442,7 @@ export const TeamSwitcher = ({ default: 'Try Again', fallbackLng: 'en-US', })} - onPressButton={() => { - onWarningAlertPress(); - }} + onPressButton={onWarningAlertPress} /> )} <View style={styles.teamSwitcherContainer}> --- packages/allspark-foundation-hub/src/SupplyChain/Components/EditSavedTeams/EditSavedTeams.tsx @@ -170,9 +170,7 @@ const EditSavedTeams = ({ handleEdit }: { handleEdit: () => void }) => { default: 'Try Again', fallbackLng: 'en-US', })} - onPressButton={() => { - onWarningAlertPress(); - }} + onPressButton={onWarningAlertPress} /> )} <FlashList --- packages/allspark-foundation-hub/src/SupplyChain/Hub/SiteHubDashboard.tsx @@ -249,6 +249,16 @@ export const SiteHubDashboard = ({ name, widgets }: HubDashboardProps) => { // eslint-disable-next-line react-hooks/exhaustive-deps }, []); + const [warningAlertClickCount, setWarningAlertClickCount] = useState(0); + + const onWarningAlertPress = useCallback(() => { + if (warningAlertClickCount < 3) { + setWarningAlertClickCount(warningAlertClickCount + 1); + refetchAllTeams(); + refetchPreferences(); + } + }, [refetchAllTeams, refetchPreferences, warningAlertClickCount]); + useFocusEffect( useCallback(() => { if (routeParams?.teamOnboardingComplete) { @@ -307,16 +317,6 @@ export const SiteHubDashboard = ({ name, widgets }: HubDashboardProps) => { return [TOTAL_SITE_TEAM_ID]; }; - const [warningAlertClickCount, setWarningAlertClickCount] = useState(0); - - const onWarningAlertPress = useCallback(() => { - if (warningAlertClickCount < 3) { - setWarningAlertClickCount(warningAlertClickCount + 1); - refetchAllTeams(); - refetchPreferences(); - } - }, [refetchAllTeams, refetchPreferences, warningAlertClickCount]); - return ( <> {showHubTeamSwitcher ? ( @@ -344,9 +344,7 @@ export const SiteHubDashboard = ({ name, widgets }: HubDashboardProps) => { default: 'Try Again', fallbackLng: 'en-US', })} - onPressButton={() => { - onWarningAlertPress(); - }} + onPressButton={onWarningAlertPress} /> )} <TeamShiftSwitcher --- packages/allspark-foundation-hub/src/SupplyChain/Modals/EditSavedTeamModal/EditSavedTeamsModal.tsx @@ -202,9 +202,7 @@ export const EditSavedTeamsModal = ({ default: 'Try Again', fallbackLng: 'en-US', })} - onPressButton={() => { - onWarningAlertPress(); - }} + onPressButton={onWarningAlertPress} /> )} {showAllTeamsList && ( --- packages/allspark-foundation-hub/src/SupplyChain/Modals/UpdateTeamsModal/UpdateTeamsModal.tsx @@ -252,9 +252,7 @@ export const UpdateTeamsModal = ({ default: 'Try Again', fallbackLng: 'en-US', })} - onPressButton={() => { - onWarningAlertPress(); - }} + onPressButton={onWarningAlertPress} /> )} <ScrollView --- packages/allspark-foundation-hub/src/SupplyChain/Screens/OnboardingScreen/OnboardingScreen.tsx @@ -243,9 +243,7 @@ export const OnboardingScreen = () => { default: 'Try Again', fallbackLng: 'en-US', })} - onPressButton={() => { - onWarningAlertPress(); - }} + onPressButton={onWarningAlertPress} /> )} <ScrollView
feat(ui): looper job failure fix
feat(ui): looper job failure fix
42d1f3233f4d12df65f681028960ddd7ec0f0231
--- packages/me-at-walmart-athena-queries/src/getForYouHeaderAssociateDetails.graphql @@ -1,4 +1,4 @@ -query GetAssociateDetails( +query GetForYouHeaderAssociateDetails( $userId: String!, $idType: idType = USERID, $startDate: String!, --- packages/me-at-walmart-athena-queries/src/getForYouHeaderAssociateDetails.ts @@ -5,7 +5,7 @@ import * as ApolloReactHooks from '@apollo/client'; const defaultOptions = {} as const; -export type GetAssociateDetailsQueryVariables = { +export type GetForYouHeaderAssociateDetailsQueryVariables = { userId: string; idType?: Types.InputMaybe<Types.IdType>; startDate: string; @@ -14,7 +14,7 @@ export type GetAssociateDetailsQueryVariables = { country: string; }; -export type GetAssociateDetailsQuery = { +export type GetForYouHeaderAssociateDetailsQuery = { __typename?: 'Query'; getAssociateById?: { __typename?: 'Associate'; @@ -65,8 +65,8 @@ export type GetAssociateDetailsQuery = { }; }; -export const GetAssociateDetailsDocument = gql` - query GetAssociateDetails( +export const GetForYouHeaderAssociateDetailsDocument = gql` + query GetForYouHeaderAssociateDetails( $userId: String! $idType: idType = USERID $startDate: String! @@ -129,58 +129,58 @@ export const GetAssociateDetailsDocument = gql` } `; -export function useGetAssociateDetailsQuery( +export function useGetForYouHeaderAssociateDetailsQuery( baseOptions: ApolloReactHooks.QueryHookOptions< - GetAssociateDetailsQuery, - GetAssociateDetailsQueryVariables + GetForYouHeaderAssociateDetailsQuery, + GetForYouHeaderAssociateDetailsQueryVariables > ) { const options = { ...defaultOptions, ...baseOptions }; return ApolloReactHooks.useQuery< - GetAssociateDetailsQuery, - GetAssociateDetailsQueryVariables - >(GetAssociateDetailsDocument, options); + GetForYouHeaderAssociateDetailsQuery, + GetForYouHeaderAssociateDetailsQueryVariables + >(GetForYouHeaderAssociateDetailsDocument, options); } -export function useGetAssociateDetailsLazyQuery( +export function useGetForYouHeaderAssociateDetailsLazyQuery( baseOptions?: ApolloReactHooks.LazyQueryHookOptions< - GetAssociateDetailsQuery, - GetAssociateDetailsQueryVariables + GetForYouHeaderAssociateDetailsQuery, + GetForYouHeaderAssociateDetailsQueryVariables > ) { const options = { ...defaultOptions, ...baseOptions }; return ApolloReactHooks.useLazyQuery< - GetAssociateDetailsQuery, - GetAssociateDetailsQueryVariables - >(GetAssociateDetailsDocument, options); + GetForYouHeaderAssociateDetailsQuery, + GetForYouHeaderAssociateDetailsQueryVariables + >(GetForYouHeaderAssociateDetailsDocument, options); } -export function useGetAssociateDetailsSuspenseQuery( +export function useGetForYouHeaderAssociateDetailsSuspenseQuery( baseOptions?: ApolloReactHooks.SuspenseQueryHookOptions< - GetAssociateDetailsQuery, - GetAssociateDetailsQueryVariables + GetForYouHeaderAssociateDetailsQuery, + GetForYouHeaderAssociateDetailsQueryVariables > ) { const options = { ...defaultOptions, ...baseOptions }; return ApolloReactHooks.useSuspenseQuery< - GetAssociateDetailsQuery, - GetAssociateDetailsQueryVariables - >(GetAssociateDetailsDocument, options); + GetForYouHeaderAssociateDetailsQuery, + GetForYouHeaderAssociateDetailsQueryVariables + >(GetForYouHeaderAssociateDetailsDocument, options); } -export type GetAssociateDetailsQueryHookResult = ReturnType< - typeof useGetAssociateDetailsQuery +export type GetForYouHeaderAssociateDetailsQueryHookResult = ReturnType< + typeof useGetForYouHeaderAssociateDetailsQuery >; -export type GetAssociateDetailsLazyQueryHookResult = ReturnType< - typeof useGetAssociateDetailsLazyQuery +export type GetForYouHeaderAssociateDetailsLazyQueryHookResult = ReturnType< + typeof useGetForYouHeaderAssociateDetailsLazyQuery >; -export type GetAssociateDetailsSuspenseQueryHookResult = ReturnType< - typeof useGetAssociateDetailsSuspenseQuery +export type GetForYouHeaderAssociateDetailsSuspenseQueryHookResult = ReturnType< + typeof useGetForYouHeaderAssociateDetailsSuspenseQuery >; -export type GetAssociateDetailsQueryResult = Apollo.QueryResult< - GetAssociateDetailsQuery, - GetAssociateDetailsQueryVariables +export type GetForYouHeaderAssociateDetailsQueryResult = Apollo.QueryResult< + GetForYouHeaderAssociateDetailsQuery, + GetForYouHeaderAssociateDetailsQueryVariables >; --- packages/me-at-walmart-athena-queries/src/schema.graphql @@ -7733,7 +7733,7 @@ type Query { getAssociateById(id: String!, idType: idType = WIN): Associate getAssociateByIds(associateIds: [String!]!): [WorkdayAssociate]! getAssociateByWinAndSSN(id: String!, ssn: String!): ProfileDetails - getAssociateDetails(id: String!, idType: idType = WIN, startDate: String!, endDate: String!, businessUnitNumber: Int!, country: String!): Associate + GetForYouHeaderAssociateDetails(id: String!, idType: idType = WIN, startDate: String!, endDate: String!, businessUnitNumber: Int!, country: String!): Associate getAssociateFilters(associateFilterInput: GetAssociateFiltersInput): GetAssociateFiltersResponse! getAssociateProfilePic(associateId: String!, size: ProfilePictureSize): ProfilePicture getAssociateTimeOffRequests(input: TimeOffRequestListInput): [TimeOffRequestDetail] --- packages/me-at-walmart-athena-queries/src/schema.types.ts @@ -7014,7 +7014,7 @@ export type Query = { getAssociateById?: Maybe<Associate>; getAssociateByIds: Array<Maybe<WorkdayAssociate>>; getAssociateByWinAndSSN?: Maybe<ProfileDetails>; - getAssociateDetails?: Maybe<Associate>; + GetForYouHeaderAssociateDetails?: Maybe<Associate>; getAssociateFilters: GetAssociateFiltersResponse; getAssociateProfilePic?: Maybe<ProfilePicture>; getAssociateTimeOffRequests?: Maybe<Array<Maybe<TimeOffRequestDetail>>>; @@ -7199,7 +7199,7 @@ export type QueryGetAssociateByIdsArgs = { associateIds: Array<Scalars['String']['input']>; }; -export type QueryGetAssociateDetailsArgs = { +export type QueryGetForYouHeaderAssociateDetailsArgs = { id: Scalars['String']['input']; idType?: InputMaybe<IdType>; startDate: Scalars['Date']['input'];
fix(graphql): change name
fix(graphql): change name
4cefb726a318bd536881958c0567da05ed956e56
--- package-lock.json @@ -5390,9 +5390,9 @@ } }, "@walmart/mod-flex-mini-app": { - "version": "1.2.6", - "resolved": "https://npme.walmart.com/@walmart/mod-flex-mini-app/-/mod-flex-mini-app-1.2.6.tgz", - "integrity": "sha512-4Fx4Mmijuf27hqyZMnTi8tTi+uYqgY+KsJt6qZGtnI6hkt520FIARPSHi5RE+QrroD13sFS4FkyNRp+LNCIRUg==" + "version": "1.2.7", + "resolved": "https://npme.walmart.com/@walmart/mod-flex-mini-app/-/mod-flex-mini-app-1.2.7.tgz", + "integrity": "sha512-OhzzJk0I570r6rUnQoTte6AggS+u0S2EzQu9JY9zoBwIPIGEydSeBcXiYTpmpLTotZlwXn8Weu4Ks2kyBJsriQ==" }, "@walmart/moment-walmart": { "version": "1.0.4", --- package.json @@ -100,7 +100,7 @@ "@walmart/manager-approvals-miniapp": "0.1.1", "@walmart/me-field-mini-app": "1.1.30", "@walmart/metrics-mini-app": "0.9.28", - "@walmart/mod-flex-mini-app": "^1.2.6", + "@walmart/mod-flex-mini-app": "^1.2.7", "@walmart/moment-walmart": "1.0.4", "@walmart/pay-stub-miniapp": "0.8.6", "@walmart/payrollsolution_miniapp": "0.129.0",
Update modflex version to 1.2.7
Update modflex version to 1.2.7
3c379ed86d41c86d003613f1da56d0b6e28b35a7
--- packages/allspark-foundation-hub/src/Store/Modules/TeamSwitcher/index.tsx @@ -118,6 +118,19 @@ export const TeamSwitcher = ({ } }); + useEffect(() => { + const selectedIndex = teamSwitcherList.findIndex( + (item) => item.teamLabel === selectedTeamPreference + ); + if (selectedIndex >= 0) { + flatListRef.current?.scrollToIndex({ + animated: false, + index: selectedIndex, + viewOffset: 0.5, + }); + } + }, [teamSwitcherList, selectedTeamPreference]); + const isSalariedAndNotHomeOffice = isOffSite && empType === EMP_TYPE_SALARIED && !isHomeOffice; const isHourlyAndHomeOffice = @@ -215,7 +228,7 @@ export const TeamSwitcher = ({ }); setSelectedTeam(teamLabel); dispatch( - StoreManagerExperienceCreators.updateSelectedTeamPreference(teamId) + StoreManagerExperienceCreators.updateSelectedTeamPreference(teamLabel) ); if (teamId === 'myTeams') { const selectedTeamsList = teamData @@ -345,6 +358,13 @@ export const TeamSwitcher = ({ ListFooterComponent={ isOffSite ? <></> : <AddEditButton onPress={handleAddEditPress} /> } + onScrollToIndexFailed={(_) => { + flatListRef.current?.scrollToIndex({ + animated: false, + index: 0, + viewOffset: 0.5, + }); + }} /> </View> {error && (
selected tab on Roster Page
selected tab on Roster Page
a3641cb5d577c6a42740b2f93d33190ce718986b
--- graphql.yml @@ -11,7 +11,7 @@ applications: - name: 'stg' persistedQueries: - name: 'getAssociateById' - hash: 'e609e5adcd5ac1192cf093640da3e6c9a5af94d9938e8a112f0c57a76e70d398' + hash: 'b53f3817eb84fcc835a48da052c13a24d61536222ab7fa6dc0ce2f23ac0425a4' queryTemplate: 'packages/me-at-walmart-athena-queries/src/getAssociateById.graphql' tags: - 'v1' @@ -21,7 +21,7 @@ applications: tags: - 'v1' - name: 'getLoggedInUser' - hash: 'b5aac4723be345a0b6d11485deb829f04ae17421162df0ac0b763d16882422e7' + hash: '4fb568b7c74baee633703a0fec00c7261f9456bcab8942e65127ed1f36dfa9e7' queryTemplate: 'packages/me-at-walmart-athena-queries/src/getLoggedInUser.graphql' tags: - 'v1' @@ -33,7 +33,7 @@ applications: - name: 'prod' persistedQueries: - name: 'getAssociateById' - hash: 'e609e5adcd5ac1192cf093640da3e6c9a5af94d9938e8a112f0c57a76e70d398' + hash: 'b53f3817eb84fcc835a48da052c13a24d61536222ab7fa6dc0ce2f23ac0425a4' queryTemplate: 'packages/me-at-walmart-athena-queries/src/getAssociateById.graphql' tags: - 'v1' @@ -43,7 +43,7 @@ applications: tags: - 'v1' - name: 'getLoggedInUser' - hash: 'b5aac4723be345a0b6d11485deb829f04ae17421162df0ac0b763d16882422e7' + hash: '4fb568b7c74baee633703a0fec00c7261f9456bcab8942e65127ed1f36dfa9e7' queryTemplate: 'packages/me-at-walmart-athena-queries/src/getLoggedInUser.graphql' tags: - 'v1' --- packages/me-at-walmart-athena-queries/src/getAssociateById.graphql @@ -47,9 +47,18 @@ query getAssociateById($idType: idType = USERID, $userId: String!) { teams { __typename members + membership { + __typename + baseTeam + role + win + } + merchDeptNbrs site teamId teamName + workgroup + workgroupId } userId win --- packages/me-at-walmart-athena-queries/src/getAssociateById.ts @@ -59,9 +59,18 @@ export type GetAssociateByIdQuery = { teams?: Array<{ __typename: 'Team'; members?: Array<string | null> | null; + merchDeptNbrs?: Array<number | null> | null; site?: string | null; teamId?: string | null; teamName?: string | null; + workgroup?: string | null; + workgroupId?: string | null; + membership?: Array<{ + __typename: 'TeamAssociateMembership'; + baseTeam?: boolean | null; + role?: string | null; + win?: string | null; + } | null> | null; } | null> | null; } | null; }; @@ -116,9 +125,18 @@ export const GetAssociateByIdDocument = gql` teams { __typename members + membership { + __typename + baseTeam + role + win + } + merchDeptNbrs site teamId teamName + workgroup + workgroupId } userId win --- packages/me-at-walmart-athena-queries/src/getLoggedInUser.graphql @@ -23,15 +23,19 @@ query getLoggedInUser { preferredNameTitle teams { __typename + members membership { __typename baseTeam role win } + merchDeptNbrs site teamId teamName + workgroup + workgroupId } } city --- packages/me-at-walmart-athena-queries/src/getLoggedInUser.ts @@ -55,9 +55,13 @@ export type GetLoggedInUserQuery = { birthDate?: { __typename: 'Birthday'; raw?: string | null } | null; teams?: Array<{ __typename: 'Team'; + members?: Array<string | null> | null; + merchDeptNbrs?: Array<number | null> | null; site?: string | null; teamId?: string | null; teamName?: string | null; + workgroup?: string | null; + workgroupId?: string | null; membership?: Array<{ __typename: 'TeamAssociateMembership'; baseTeam?: boolean | null; @@ -95,15 +99,19 @@ export const GetLoggedInUserDocument = gql` preferredNameTitle teams { __typename + members membership { __typename baseTeam role win } + merchDeptNbrs site teamId teamName + workgroup + workgroupId } } city --- packages/me-at-walmart-athena-queries/src/schema.graphql @@ -2917,6 +2917,9 @@ type InstantMessengerDetail { usageDetails: [UsageDetail] } +""" +The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). +""" scalar JSON """
feat: update query for additonal teaming fields
feat: update query for additonal teaming fields
f2293af2a350ec5b07473b8d18607c8441496a31
--- __tests__/auth/ErrorScreenTest.tsx @@ -28,13 +28,6 @@ jest.mock('../../src/services/MaskUserId', () => ({ encryptUserId: jest.fn((user, site) => `Encrypted-${user}-${site}`), })); -// jest.mock('react-native-wm-config'); -// jest.mock('react-native-wm-config', () => ({ -// WmConfig: { -// getValue: jest.fn(), -// }, -// })); - const mockUseState = useState as jest.Mock; const mockNavigation = { goBack: jest.fn(), @@ -51,7 +44,6 @@ const setErrorCategory = jest.fn(); const setErrorCategoriesFb = jest.fn(); const setOtherErrorFb = jest.fn(); const setSelectedOther = jest.fn(); -// const mockGetValue = wmConfig.getValue as jest.Mock; describe('ErrorScreen', () => { afterEach(() => { @@ -63,10 +55,15 @@ describe('ErrorScreen', () => { mockUseState.mockReturnValueOnce(['', setDetail]); mockUseState.mockReturnValueOnce([false, setFormDirty]); mockUseState.mockReturnValueOnce(['', setErrorCategory]); - mockUseState.mockReturnValueOnce([defaultConfig.issues, setErrorCategoriesFb]); - mockUseState.mockReturnValueOnce([defaultConfig.otherIssues, setOtherErrorFb]); + mockUseState.mockReturnValueOnce([ + defaultConfig.issues, + setErrorCategoriesFb, + ]); + mockUseState.mockReturnValueOnce([ + defaultConfig.otherIssues, + setOtherErrorFb, + ]); mockUseState.mockReturnValueOnce([{}, setSelectedOther]); - // (wmConfig.getValue as jest.Mock).mockReturnValueOnce({}); const component = create(<ErrorScreen navigation={mockNavigation} />); it('renders default', () => { @@ -83,8 +80,14 @@ describe('ErrorScreen', () => { mockUseState.mockReturnValueOnce(['', setDetail]); mockUseState.mockReturnValueOnce([false, setFormDirty]); mockUseState.mockReturnValueOnce(['', setErrorCategory]); - mockUseState.mockReturnValueOnce([defaultConfig.issues, setErrorCategoriesFb]); - mockUseState.mockReturnValueOnce([defaultConfig.otherIssues, setOtherErrorFb]); + mockUseState.mockReturnValueOnce([ + defaultConfig.issues, + setErrorCategoriesFb, + ]); + mockUseState.mockReturnValueOnce([ + defaultConfig.otherIssues, + setOtherErrorFb, + ]); mockUseState.mockReturnValueOnce([{}, setSelectedOther]); component.update(<ErrorScreen navigation={mockNavigation} />); @@ -102,8 +105,14 @@ describe('ErrorScreen', () => { 'Store transfer issue', setErrorCategory, ]); - mockUseState.mockReturnValueOnce([defaultConfig.issues, setErrorCategoriesFb]); - mockUseState.mockReturnValueOnce([defaultConfig.otherIssues, setOtherErrorFb]); + mockUseState.mockReturnValueOnce([ + defaultConfig.issues, + setErrorCategoriesFb, + ]); + mockUseState.mockReturnValueOnce([ + defaultConfig.otherIssues, + setOtherErrorFb, + ]); mockUseState.mockReturnValueOnce([{}, setSelectedOther]); component.update(<ErrorScreen navigation={mockNavigation} />); @@ -144,8 +153,14 @@ describe('ErrorScreen', () => { 'Store transfer issue', setErrorCategory, ]); - mockUseState.mockReturnValueOnce([defaultConfig.issues, setErrorCategoriesFb]); - mockUseState.mockReturnValueOnce([defaultConfig.otherIssues, setOtherErrorFb]); + mockUseState.mockReturnValueOnce([ + defaultConfig.issues, + setErrorCategoriesFb, + ]); + mockUseState.mockReturnValueOnce([ + defaultConfig.otherIssues, + setOtherErrorFb, + ]); mockUseState.mockReturnValueOnce([{}, setSelectedOther]); component.update(<ErrorScreen navigation={mockNavigation} />); @@ -184,8 +199,14 @@ describe('ErrorScreen', () => { mockUseState.mockReturnValueOnce(['', setDetail]); mockUseState.mockReturnValueOnce([false, setFormDirty]); mockUseState.mockReturnValueOnce(['', setErrorCategory]); - mockUseState.mockReturnValueOnce([defaultConfig.issues, setErrorCategoriesFb]); - mockUseState.mockReturnValueOnce([defaultConfig.otherIssues, setOtherErrorFb]); + mockUseState.mockReturnValueOnce([ + defaultConfig.issues, + setErrorCategoriesFb, + ]); + mockUseState.mockReturnValueOnce([ + defaultConfig.otherIssues, + setOtherErrorFb, + ]); mockUseState.mockReturnValueOnce([{}, setSelectedOther]); component.update(<ErrorScreen navigation={mockNavigation} />); @@ -204,8 +225,14 @@ describe('ErrorScreen', () => { mockUseState.mockReturnValueOnce(['N/A', setDetail]); mockUseState.mockReturnValueOnce([true, setFormDirty]); mockUseState.mockReturnValueOnce(['', setErrorCategory]); - mockUseState.mockReturnValueOnce([defaultConfig.issues, setErrorCategoriesFb]); - mockUseState.mockReturnValueOnce([defaultConfig.otherIssues, setOtherErrorFb]); + mockUseState.mockReturnValueOnce([ + defaultConfig.issues, + setErrorCategoriesFb, + ]); + mockUseState.mockReturnValueOnce([ + defaultConfig.otherIssues, + setOtherErrorFb, + ]); mockUseState.mockReturnValueOnce([{}, setSelectedOther]); component.update(<ErrorScreen navigation={mockNavigation} />); @@ -227,8 +254,14 @@ describe('ErrorScreen', () => { mockUseState.mockReturnValueOnce(['', setDetail]); mockUseState.mockReturnValueOnce([true, setFormDirty]); mockUseState.mockReturnValueOnce(['', setErrorCategory]); - mockUseState.mockReturnValueOnce([defaultConfig.issues, setErrorCategoriesFb]); - mockUseState.mockReturnValueOnce([defaultConfig.otherIssues, setOtherErrorFb]); + mockUseState.mockReturnValueOnce([ + defaultConfig.issues, + setErrorCategoriesFb, + ]); + mockUseState.mockReturnValueOnce([ + defaultConfig.otherIssues, + setOtherErrorFb, + ]); mockUseState.mockReturnValueOnce([{}, setSelectedOther]); component.update(<ErrorScreen navigation={mockNavigation} />);
code clean and lint
code clean and lint
11910d8ed675f89196d2a3b5f8eccdbf5e4d3eb2
--- package.json @@ -88,9 +88,9 @@ "@walmart/react-native-logger": "1.35.0", "@walmart/react-native-scanner-3.0": "0.10.4", "@walmart/react-native-sumo-sdk": "2.8.0", - "@walmart/roster-mini-app": "3.5.0", + "@walmart/roster-mini-app": "3.6.0", "@walmart/ui-components": "1.15.1", - "@walmart/wmconnect-mini-app": "3.4.0", + "@walmart/wmconnect-mini-app": "3.5.0", "babel-jest": "^29.6.3", "chance": "^1.1.11", "crypto-js": "~4.2.0", --- yarn.lock @@ -6318,9 +6318,9 @@ __metadata: "@walmart/react-native-logger": "npm:1.35.0" "@walmart/react-native-scanner-3.0": "npm:0.10.4" "@walmart/react-native-sumo-sdk": "npm:2.8.0" - "@walmart/roster-mini-app": "npm:3.5.0" + "@walmart/roster-mini-app": "npm:3.6.0" "@walmart/ui-components": "npm:1.15.1" - "@walmart/wmconnect-mini-app": "npm:3.4.0" + "@walmart/wmconnect-mini-app": "npm:3.5.0" babel-jest: "npm:^29.6.3" chance: "npm:^1.1.11" crypto-js: "npm:~4.2.0" @@ -6425,9 +6425,9 @@ __metadata: languageName: node linkType: hard -"@walmart/roster-mini-app@npm:3.5.0": - version: 3.5.0 - resolution: "@walmart/roster-mini-app@npm:3.5.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Froster-mini-app%2F-%2F%40walmart%2Froster-mini-app-3.5.0.tgz" +"@walmart/roster-mini-app@npm:3.6.0": + version: 3.6.0 + resolution: "@walmart/roster-mini-app@npm:3.6.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Froster-mini-app%2F-%2F%40walmart%2Froster-mini-app-3.6.0.tgz" peerDependencies: "@walmart/allspark-foundation": ">=6.32.0" expo: ~52.0.46 @@ -6438,7 +6438,7 @@ __metadata: dependenciesMeta: "@walmart/me-at-walmart": built: false - checksum: 10c0/fd9d31fc38ed4493d4fd88a313d0e56e3353b1279385d7cc40e82109f25b6f1ba7903257ad3918e9007eb31f0363eb975cad415fa8398fce433894a70f65792c + checksum: 10c0/37b5670243b1e290dd4ce01539576716012e0a12e54708cdebce8e58f7331e0eac2e32e75d67c56d12aaeb3ad0c6c8ab0cbebae530e6283ed87bb6919b4c2e00 languageName: node linkType: hard @@ -6462,9 +6462,9 @@ __metadata: languageName: node linkType: hard -"@walmart/wmconnect-mini-app@npm:3.4.0": - version: 3.4.0 - resolution: "@walmart/wmconnect-mini-app@npm:3.4.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fwmconnect-mini-app%2F-%2F%40walmart%2Fwmconnect-mini-app-3.4.0.tgz" +"@walmart/wmconnect-mini-app@npm:3.5.0": + version: 3.5.0 + resolution: "@walmart/wmconnect-mini-app@npm:3.5.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fwmconnect-mini-app%2F-%2F%40walmart%2Fwmconnect-mini-app-3.5.0.tgz" peerDependencies: "@walmart/allspark-foundation": ">=6.32.0" expo: ~52.0.46 @@ -6475,7 +6475,7 @@ __metadata: dependenciesMeta: "@walmart/me-at-walmart": built: false - checksum: 10c0/6b9ababd18c0706138e32c5e55bf85831753a6c4e5f334c806e0e3b2169c4a4a27c4102d2aba974394a763ee9feb208db192c05424bd12ae5a1225b4873196f8 + checksum: 10c0/9241abf7dc5c5a3732c1fc144097600bcf758514d1e64a2b7c36262709dbd28bcec92c06b2b8077be8b5fc764a2e690e387ca8c21808bc2776392e4d1f7143f1 languageName: node linkType: hard
feat(ui): updating wmconnect version for firestore changes
feat(ui): updating wmconnect version for firestore changes
99c847462d54998ac9c43c18c06bcc760ccde670
--- package.json @@ -107,7 +107,7 @@ "@walmart/global-vpi-mini-app": "1.1.14", "@walmart/gta-react-native-calendars": "0.7.0", "@walmart/gtp-shared-components": "2.2.7-rc.0", - "@walmart/ims-print-services-ui": "2.17.3", + "@walmart/ims-print-services-ui": "2.18.0", "@walmart/inbox-mini-app": "0.98.4", "@walmart/invue-react-native-sdk": "0.1.26-alpha.8-wt2", "@walmart/iteminfo-mini-app": "8.1.2", --- yarn.lock @@ -6735,9 +6735,9 @@ __metadata: languageName: node linkType: hard -"@walmart/ims-print-services-ui@npm:2.17.3": - version: 2.17.3 - resolution: "@walmart/ims-print-services-ui@npm:2.17.3::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fims-print-services-ui%2F-%2Fims-print-services-ui-2.17.3.tgz" +"@walmart/ims-print-services-ui@npm:2.18.0": + version: 2.18.0 + resolution: "@walmart/ims-print-services-ui@npm:2.18.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fims-print-services-ui%2F-%2F%40walmart%2Fims-print-services-ui-2.18.0.tgz" peerDependencies: "@react-native-firebase/analytics": ">=10.5.1" "@react-native-firebase/app": ">=10.5.0" @@ -6758,7 +6758,7 @@ __metadata: react-native-segmented-control-tab: ">=4.0.0" react-native-wm-telemetry: ">=0.2.0" uuid: ">=3.3.2" - checksum: 10c0/98c4ff17f880471ec8493f6f1e9e52dc44c9ebcee0be0be38bd45d8082dd3a62b5971acca1789f16b735494e2185639d899c593a25132a375d8e59416fa3157f + checksum: 10c0/7eefb17cec1c033ce70647c55e5864a7ba87a890473c30880de892445de88c8bbf7ebd0135c96963111e3011a119e6b58d0d016b18e93159abe3d083598605c8 languageName: node linkType: hard @@ -7134,7 +7134,7 @@ __metadata: "@walmart/global-vpi-mini-app": "npm:1.1.14" "@walmart/gta-react-native-calendars": "npm:0.7.0" "@walmart/gtp-shared-components": "npm:2.2.7-rc.0" - "@walmart/ims-print-services-ui": "npm:2.17.3" + "@walmart/ims-print-services-ui": "npm:2.18.0" "@walmart/inbox-mini-app": "npm:0.98.4" "@walmart/invue-react-native-sdk": "npm:0.1.26-alpha.8-wt2" "@walmart/iteminfo-mini-app": "npm:8.1.2"
Bump Print UI to v2.18.0
Bump Print UI to v2.18.0
e6afd4bb8793c9d7a92cab6db224f6e8cf4a192f
--- src/home/containers/HomeScreen/index.tsx @@ -1,10 +1,11 @@ import React, {useCallback, useEffect, useRef, useState, useMemo} from 'react'; import {useSelector} from 'react-redux'; -import {ScrollView, RefreshControl, Animated} from 'react-native'; +import {ScrollView, RefreshControl, Animated, Text} from 'react-native'; import {StackNavigationProp} from '@react-navigation/stack'; import {ParamListBase} from '@react-navigation/native'; import LinearGradient from 'react-native-linear-gradient'; import moment from 'moment-timezone'; +import CodePush, { LocalPackage } from 'react-native-code-push'; import {UserSelectors} from '@walmart/redux-store'; import {Body, colors} from '@walmart/gtp-shared-components'; @@ -54,6 +55,7 @@ export const HomeScreen: React.FC<Props> = () => { {}, ); const [parentSiteId, setParentSiteId] = useState(currentSiteId); + const [codePushLabel, setCodePushLabel] = useState<string | null>(null); const scrollPosition = useRef(new Animated.Value(0)).current; const lastUpdatedTimeout = useRef<any>(); const layout = useHomeAppConfig('layout', defaultLayout); @@ -84,6 +86,14 @@ export const HomeScreen: React.FC<Props> = () => { } }, [showTimestamp]); + useEffect(() => { + CodePush.getUpdateMetadata().then((update: LocalPackage | null) => { + if(update) { + setCodePushLabel(update.label); + } + }) + }) + const onRefreshStart = (key: string) => { setRefreshingMap((prev) => ({ ...prev, @@ -168,6 +178,7 @@ export const HomeScreen: React.FC<Props> = () => { style={styles.walmartSpinner} scrollPosition={scrollPosition} /> + {codePushLabel && <Text>Code push label: {codePushLabel}</Text>} <ScrollView style={styles.scrollView} contentContainerStyle={styles.scrollContainerView}
debug add cp label
debug add cp label
5ef0ef6a8818222042fa9946c16532dfe04fab96
--- .looper.multibranch.yml @@ -24,7 +24,7 @@ envs: ANDROID_BASE_PATH: targets/US/android branches: - - spec: feature/pc-drop24 + - spec: feature/drop24 triggers: - manual: name: Publish Packages (Pre-Release)
chore: Revert looper file change
chore: Revert looper file change
bb17bb4747f700ff69699e70f1b21b63ec1c1435
--- packages/me-at-walmart-container/src/translations/index.ts @@ -2,7 +2,7 @@ import { TranslationClientOptions } from '@walmart/allspark-foundation/Translati export const MeAtWalmartTranslationConfig: TranslationClientOptions = { lng: 'en-US', - fallbackLng: ['en-US', 'es-MX'], + fallbackLng: 'en-US', ns: ['container'], defaultNS: 'container', compatibilityJSON: 'v3',
fix: spanish translations were being used as a fallback when undefined in english
fix: spanish translations were being used as a fallback when undefined in english
86c5b67cbf73374a758385a1fc08bc4504687c32
--- src/screens/RosterDetailScreen/RosterDetailScreen.tsx @@ -33,7 +33,7 @@ import { } from '../../redux/selectors'; import { sortedAssociateList, - transformToAssociateFormat, + //transformToAssociateFormat, } from '../../utils/associateList'; import {UserSelectors} from '@walmart/allspark-foundation/User'; import { @@ -242,20 +242,6 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { ); const [searchInput, setSearchInput] = useState(''); - // Add loading state (remove after DC data integration) - const [isLoading, setIsLoading] = useState(true); - - useEffect(() => { - // Simulate loading for DC sites (remove after DC data integration) - if (isSiteDC) { - setIsLoading(true); - const timer = setTimeout(() => { - setIsLoading(false); - }, 1000); - return () => clearTimeout(timer); - } - }, [isSiteDC]); - // Filter count for non-DC sites const filterCount = useMemo(() => { if (teamState.teamIds?.[0] === TOTAL_STORE_TEAM_ID) { @@ -291,45 +277,6 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { } }, [teamState, allTeamsData?.getTeamsByStore]); - // Handle DC site filtering - const filteredDCMembers = useMemo(() => { - if (!mockSupplyChainTeam?.membership || !isSiteDC || isLoading) return []; - let filtered = [...mockSupplyChainTeam.membership]; - filtered.sort((a, b) => a.shiftCode - b.shiftCode); - - if (selectedFilter === FilterValue.clockedIn) { - filtered = filtered.slice(0, mockSupplyChainTeam.mewClockedInCount); - } - - // Filter by search input if provided - if (searchInput) { - filtered = filtered.filter((member) => { - const fullName = - `${member.associate.firstName} ${member.associate.lastName}`.toLowerCase(); - return fullName.includes(searchInput.toLowerCase()); - }); - } - - if (shiftSelected === undefined || shiftSelected === 'all') { - filtered = filtered; - } else { - filtered = filtered.filter((member) => { - return `${member.shiftCode}` === shiftSelected; - }); - } - - // Transform supply chain membership into Associate format - return transformToAssociateFormat(filtered); - }, [ - mockSupplyChainTeam?.membership, - mockSupplyChainTeam?.mewClockedInCount, - selectedFilter, - isSiteDC, - isLoading, - searchInput, - shiftSelected, - ]); - // Filter chips based on site type const filterChips: FilterChipProps[] = useMemo(() => { if (isSiteDC) { @@ -337,7 +284,7 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { { label: t('rosterScreen.filters.clockedIn'), id: FilterValue.clockedIn, - count: mockSupplyChainTeam?.mewClockedInCount ?? 0, + count: filterCount.clockedInCount ?? 0, isApplied: selectedFilter === FilterValue.clockedIn, }, ]; @@ -396,7 +343,7 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { }, [selectedFilter, t]); const renderListEmptyComponent = () => { - if (isLoading || dataLoading) { + if (dataLoading) { return <AssociateListLoading />; } @@ -480,15 +427,13 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { // Effect for non-DC sites filtering useEffect(() => { - if (!isSiteDC) { - const associatesFiltered = filterAssociatesByStatusAndSearchInputAndShift( - teamRoster, - selectedFilter, - searchInput, - shiftSelected, - ); - setFilteredAssociates(sortedAssociateList(associatesFiltered, teamLeads)); - } + const associatesFiltered = filterAssociatesByStatusAndSearchInputAndShift( + teamRoster, + selectedFilter, + searchInput, + shiftSelected, + ); + setFilteredAssociates(sortedAssociateList(associatesFiltered, teamLeads)); }, [ searchInput, selectedFilter, @@ -590,7 +535,7 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { )} <FlashList contentContainerStyle={styles.container} - data={isSiteDC ? (filteredDCMembers as any) : filteredAssociates} + data={filteredAssociates} refreshing={dataLoading} estimatedItemSize={100} contentInset={{bottom: bottomInset}} @@ -614,14 +559,8 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { )} <RosterFiltersAndInfo isPrimaryTeam={isPrimaryTeam} - totalScheduleCount={ - isSiteDC - ? mockSupplyChainTeam?.membership?.length ?? 0 - : filterCount.scheduledCount - } - associates={ - isSiteDC ? (filteredDCMembers as any) : filteredAssociates - } + totalScheduleCount={filterCount.scheduledCount} + associates={filteredAssociates} filterChips={filterChips} headerText={ isSiteDC @@ -634,7 +573,7 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { }) : t('rosterScreen.rosterName') } - loading={isLoading || dataLoading} + loading={dataLoading} teamName={currentTeamName} handleFilter={( filterId: FilterValue, @@ -669,10 +608,7 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => { <View style={styles.associateListContainer}> <AssociateListItem associate={item as any} - isLastItem={ - index === - (isSiteDC ? filteredDCMembers : filteredAssociates).length - 1 - } + isLastItem={index === filteredAssociates.length - 1} handleViewSchedule={() => { handleViewAssociateSchedule(item as any, storeId, countryCode); }} --- src/utils/user.ts @@ -35,7 +35,8 @@ export const associateIsClockedIn = (associate?: Associate) => { return ClockStatusEnum.clockedOut !== Number(associate?.punch?.clockStatus); }; -export const associateShift = (associate?: Associate) => associate?.shiftCode; +export const associateShift = (associate?: Associate) => + associate?.shift?.number; export const isAssociateClockedIn = ( associate?: Associate,
feat: integrate getDailyRoster
feat: integrate getDailyRoster
2b2cd6708bc31d96cbf690a3782fdb5b07c060e5
--- src/auth/ErrorScreen.tsx @@ -26,7 +26,7 @@ import {SSO_APP} from '../types/telemetryConstants'; import {logger} from '../services/Logger'; import {encryptUserId} from '../services/MaskUserId'; import styles from './styles'; -import {defaultConfig} from './constants'; +import {initialConfig} from './constants'; import WmConfig from 'react-native-wm-config'; interface Lang { @@ -48,9 +48,9 @@ export const ErrorScreen: FC<any> = (props) => { const [formDirty, setFormDirty] = useState(false); const [errorCategory, setErrorCategory] = useState(''); const [errorCategoriesFb, setErrorCategoriesFb] = useState( - defaultConfig.issues, + initialConfig.issues, ); - const [otherErrorFb, setOtherErrorFb] = useState(defaultConfig.otherIssues); + const [otherErrorFb, setOtherErrorFb] = useState(initialConfig.otherIssues); const [selectedOther, setSelectedOther] = useState({}); const [formatedMsgOther, setFormatedOther] = useState({}); @@ -195,6 +195,7 @@ export const ErrorScreen: FC<any> = (props) => { label='' placeholder={translate('ssoError.selectIssue')} value={errorCategory} + style={styles.dropdown} values={getErrCategoryList(errorCategoriesFb)} onSelect={(value) => { setErrorCategory(value); --- src/auth/styles.ts @@ -175,6 +175,11 @@ export default StyleSheet.create({ color: colors.gray['100'], backgroundColor: colors.white, }, + dropdown: { + marginLeft: 17, + bottom: -17, + borderBottom: 0, + }, requiredErrorContainer: { marginLeft: 17, marginBottom: 20,
update the dropdown style
update the dropdown style
51ae4914e4cd5d62900d9afcf540ba6d1f02226a
--- packages/allspark-foundation/allspark.config.js @@ -10,6 +10,7 @@ module.exports = { '@walmart/react-native-scanner-3.0': {}, 'react-native-flipper': {}, 'react-native-gesture-handler': {}, + 'react-native-get-random-values': {}, 'react-native-permissions': {}, 'react-native-reanimated': {}, 'react-native-safe-area-context': {}, --- packages/allspark-foundation/package.json @@ -101,6 +101,7 @@ "react-native-flipper": "^0.191.0", "react-native-gesture-handler": "^2.9.0", "react-native-permissions": "^3.6.1", + "react-native-get-random-values": "1.9.0", "react-native-reanimated": "^3.3.0", "react-native-safe-area-context": "~4.4.1", "react-native-screens": "~3.15.0", --- packages/allspark-foundation/src/Container/AllsparkContainer.tsx @@ -39,9 +39,9 @@ import { export class AllsparkContainer<E extends IAllsparkEnvironment> { public id: string; public config: Partial<AllsparkContainerConfig> = {}; - private _config: Partial<AllsparkContainerInputConfig<E>>; + private _config: AllsparkContainerInputConfig<E>; - constructor(id: string, config: Partial<AllsparkContainerInputConfig<E>>) { + constructor(id: string, config: AllsparkContainerInputConfig<E>) { this.id = id; this._config = config; this.config.services = config.services; --- packages/allspark-foundation/src/Container/types.ts @@ -17,15 +17,28 @@ export type AllsparkContainerConfig = { }; export type AllsparkContainerInputConfig<E extends IAllsparkEnvironment> = { - http: HttpClientConfig | ((env: E) => HttpClientConfig); - graphQL: GraphQLClientConfig | ((env: E) => GraphQLClientConfig); - translation: + http?: HttpClientConfig | ((env: E) => HttpClientConfig); + graphQL?: GraphQLClientConfig | ((env: E) => GraphQLClientConfig); + translation?: | TranslationClientOptions | ((env: E) => TranslationClientOptions); - redux: AllsparkReduxConfig | ((env: E) => AllsparkReduxConfig); - navigation: AllsparkNavigationConfig | ((env: E) => AllsparkNavigationConfig); + redux?: AllsparkReduxConfig | ((env: E) => AllsparkReduxConfig); + navigation?: + | AllsparkNavigationConfig + | ((env: E) => AllsparkNavigationConfig); services: AllsparkServices; - setupHook: () => boolean; + setupHook?: () => boolean; +}; + +export type ContainerConfigFromInput< + E extends IAllsparkEnvironment, + C extends AllsparkContainerInputConfig<E> +> = { + [K in keyof C]: C[K] extends () => any + ? K extends 'setupHook' + ? C[K] + : ReturnType<C[K]> + : C[K]; }; export type AllsparkContainerEventMap = { --- packages/allspark-foundation/src/Feature/AllsparkFeature.tsx @@ -274,7 +274,7 @@ export class AllsparkFeature< * Each capability can also be added seperately through unique methods on an AllsparkFeature. * @example * const MyFeature = new AllsparkFeature('myFeature', featureConfig) - * .capabilities({ + * .configure({ * environment: { * 'en-US': {...}, * 'es-MX': {...},
fix: add random values package to dependencies and config file
fix: add random values package to dependencies and config file
870a6dae229b8baaea870cd629c4a0117a5c847b
--- package-lock.json @@ -51,7 +51,7 @@ "@walmart/financial-wellbeing-feature-app": "1.0.64", "@walmart/functional-components": "2.0.6", "@walmart/gta-react-native-calendars": "0.0.15", - "@walmart/gtp-shared-components": "^2.0.0-rc.1", + "@walmart/gtp-shared-components": "^2.0.0", "@walmart/impersonation-mini-app": "1.9.0", "@walmart/ims-print-services-ui": "1.2.0", "@walmart/inbox-mini-app": "0.78.0", @@ -5243,9 +5243,9 @@ } }, "node_modules/@walmart/gtp-shared-components": { - "version": "2.0.0-rc.2", - "resolved": "https://npme.walmart.com/@walmart/gtp-shared-components/-/gtp-shared-components-2.0.0-rc.2.tgz", - "integrity": "sha512-f/m/bEd6BasW2xTK8AO+/JePzwUa7gGg6GXufXIS6ujHu/pbU77BnXJ4F1OLJ6iDqlXc+3TcTx0BoVNPVfiCqQ==", + "version": "2.0.0", + "resolved": "https://npme.walmart.com/@walmart/gtp-shared-components/-/gtp-shared-components-2.0.0.tgz", + "integrity": "sha512-8uSt2lOq4HaZNUu12cO0zspwJMg2yFjaa8OMpxUytA9n98CngqAKYUome+gALSHQbuUVFrfFhQ0oOZHzJ2388w==", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { @@ -25235,9 +25235,9 @@ } }, "@walmart/gtp-shared-components": { - "version": "2.0.0-rc.2", - "resolved": "https://npme.walmart.com/@walmart/gtp-shared-components/-/gtp-shared-components-2.0.0-rc.2.tgz", - "integrity": "sha512-f/m/bEd6BasW2xTK8AO+/JePzwUa7gGg6GXufXIS6ujHu/pbU77BnXJ4F1OLJ6iDqlXc+3TcTx0BoVNPVfiCqQ==", + "version": "2.0.0", + "resolved": "https://npme.walmart.com/@walmart/gtp-shared-components/-/gtp-shared-components-2.0.0.tgz", + "integrity": "sha512-8uSt2lOq4HaZNUu12cO0zspwJMg2yFjaa8OMpxUytA9n98CngqAKYUome+gALSHQbuUVFrfFhQ0oOZHzJ2388w==", "requires": { "@livingdesign/tokens": "0.61.0", "@walmart/gtp-shared-icons": "1.0.5", --- package.json @@ -94,7 +94,7 @@ "@walmart/financial-wellbeing-feature-app": "1.0.64", "@walmart/functional-components": "2.0.6", "@walmart/gta-react-native-calendars": "0.0.15", - "@walmart/gtp-shared-components": "^2.0.0-rc.1", + "@walmart/gtp-shared-components": "^2.0.0", "@walmart/impersonation-mini-app": "1.9.0", "@walmart/ims-print-services-ui": "1.2.0", "@walmart/inbox-mini-app": "0.78.0",
chore: bump gtp shared components
chore: bump gtp shared components
54bbeac50e55ba755b1c88084a4edb35b5ba3749
--- package.json @@ -93,7 +93,7 @@ "@walmart/react-native-scanner-3.0": "patch:@walmart/react-native-scanner-3.0@npm%3A0.15.8#~/.yarn/patches/@walmart-react-native-scanner-3.0-npm-0.15.8-6fb92a01bb.patch", "@walmart/react-native-sumo-sdk": "patch:@walmart/react-native-sumo-sdk@npm%3A2.8.0#~/.yarn/patches/@walmart-react-native-sumo-sdk-npm-2.8.0-31dfe1d845.patch", "@walmart/ui-components": "1.26.3-423-05e66f8", - "@walmart/wmconnect-mini-app": "3.7.1", + "@walmart/wmconnect-mini-app": "3.7.2", "babel-jest": "^29.6.3", "chance": "^1.1.11", "crypto-js": "~4.2.0", --- yarn.lock @@ -8429,7 +8429,7 @@ __metadata: "@walmart/react-native-scanner-3.0": "patch:@walmart/react-native-scanner-3.0@npm%3A0.15.8#~/.yarn/patches/@walmart-react-native-scanner-3.0-npm-0.15.8-6fb92a01bb.patch" "@walmart/react-native-sumo-sdk": "patch:@walmart/react-native-sumo-sdk@npm%3A2.8.0#~/.yarn/patches/@walmart-react-native-sumo-sdk-npm-2.8.0-31dfe1d845.patch" "@walmart/ui-components": "npm:1.26.3-423-05e66f8" - "@walmart/wmconnect-mini-app": "npm:3.7.1" + "@walmart/wmconnect-mini-app": "npm:3.7.2" babel-jest: "npm:^29.6.3" chance: "npm:^1.1.11" crypto-js: "npm:~4.2.0" @@ -8521,9 +8521,9 @@ __metadata: languageName: node linkType: hard -"@walmart/wmconnect-mini-app@npm:3.7.1": - version: 3.7.1 - resolution: "@walmart/wmconnect-mini-app@npm:3.7.1::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fwmconnect-mini-app%2F-%2F%40walmart%2Fwmconnect-mini-app-3.7.1.tgz" +"@walmart/wmconnect-mini-app@npm:3.7.2": + version: 3.7.2 + resolution: "@walmart/wmconnect-mini-app@npm:3.7.2::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fwmconnect-mini-app%2F-%2F%40walmart%2Fwmconnect-mini-app-3.7.2.tgz" peerDependencies: "@walmart/allspark-foundation": ">=7.12.0" "@walmart/gtp-shared-components": ^2.3.0-rc.0 @@ -8535,7 +8535,7 @@ __metadata: dependenciesMeta: "@walmart/me-at-walmart": built: false - checksum: 10c0/f4ccc96b90f37971c3c253c95db01407513ab779c184e93f012faa05b2802de5a80ffc8d995eac551d8497227b2f5ba194e0a99d470ee813cd0710b99b8321b4 + checksum: 10c0/eb685814b9a2bb8b138bccd7db7d243c167f59cfc3fcc2973d11325ef659ff4a93041049b054024f3afdd3cf4d00145f689b1bfb9eb98b6b400005d510d5066d languageName: node linkType: hard
feat(ui): remove isSiteDC check
feat(ui): remove isSiteDC check
cdf8284ae61f64d040a8b7f981676943943fe521
--- packages/allspark-foundation/src/Hooks/teams.ts @@ -1,24 +0,0 @@ -import { useGetTeamsByStoreQuery } from '@walmart/me-at-walmart-athena-queries'; -// import { SiteSelectors } from '../Site'; -// import { useSelector } from 'react-redux'; -// import { UserSelectors } from '../User'; - -export const useGetTeamsByStore = () => { - console.log('useGetTeamsByStoreQuery'); - //TODO: Add storeNbr and countryCode to the redux store - return useGetTeamsByStoreQuery({ - variables: { - storeNbr: '100', - date: '2024-07-13', - countryCode: 'US', - }, - // skip: !storeNbr || !countryCode, - // context: getGraphQLConfig(envConfig), - onError(error) { - console.error('useGetTeamsByStoreQuery error', error); - }, - onCompleted: () => { - console.log('useGetTeamsByStoreQuery completed successfully'); - }, - }); -};
Cleaning up unused code
Cleaning up unused code
4ee1e46b03a3750a105d88303b9a645e6264b892
--- package-lock.json @@ -57,7 +57,7 @@ "@walmart/iteminfo-mini-app": "7.0.8", "@walmart/manager-approvals-miniapp": "0.2.1", "@walmart/me-field-mini-app": "1.1.45", - "@walmart/metrics-mini-app": "0.9.56", + "@walmart/metrics-mini-app": "0.9.57", "@walmart/mod-flex-mini-app": "1.5.5", "@walmart/moment-walmart": "1.0.4", "@walmart/onewalmart-miniapp": "1.0.14", @@ -5505,9 +5505,9 @@ } }, "node_modules/@walmart/metrics-mini-app": { - "version": "0.9.56", - "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.9.56.tgz", - "integrity": "sha512-EcTTC+lwzQld8R8hVwS2nx57fLP0fi4DjraxaP7M3YoSKpnjZIB+Wl3GoN1r48bW19oV+xBWRz/M90l2dGhMGQ==", + "version": "0.9.57", + "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.9.57.tgz", + "integrity": "sha512-Eg+S/oZWzd5F2UHsKz9jNQgTVhmHO8g6UnchJLqA//QB1kIokaBidaO/QL+bCAD13+j7bX3o8bsQ1wsOWjCgOA==", "dependencies": { "@types/base-64": "^1.0.0", "apisauce": "1.1.2", @@ -25158,9 +25158,9 @@ "version": "1.1.45" }, "@walmart/metrics-mini-app": { - "version": "0.9.56", - "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.9.56.tgz", - "integrity": "sha512-EcTTC+lwzQld8R8hVwS2nx57fLP0fi4DjraxaP7M3YoSKpnjZIB+Wl3GoN1r48bW19oV+xBWRz/M90l2dGhMGQ==", + "version": "0.9.57", + "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.9.57.tgz", + "integrity": "sha512-Eg+S/oZWzd5F2UHsKz9jNQgTVhmHO8g6UnchJLqA//QB1kIokaBidaO/QL+bCAD13+j7bX3o8bsQ1wsOWjCgOA==", "requires": { "@types/base-64": "^1.0.0", "apisauce": "1.1.2", --- package.json @@ -99,7 +99,7 @@ "@walmart/iteminfo-mini-app": "7.0.8", "@walmart/manager-approvals-miniapp": "0.2.1", "@walmart/me-field-mini-app": "1.1.45", - "@walmart/metrics-mini-app": "0.9.56", + "@walmart/metrics-mini-app": "0.9.57", "@walmart/mod-flex-mini-app": "1.5.5", "@walmart/moment-walmart": "1.0.4", "@walmart/onewalmart-miniapp": "1.0.14",
Version bump for SMBLV-3601
Version bump for SMBLV-3601
662eb7fe5565df1a832c4a33d7aa7af08b270a96
--- package-lock.json @@ -66,7 +66,7 @@ "@walmart/payrollsolution_miniapp": "0.130.23", "@walmart/price-changes-mini-app": "1.6.10", "@walmart/profile-feature-app": "0.76.0", - "@walmart/push-to-talk-mini-app": "1.9.8", + "@walmart/push-to-talk-mini-app": "1.9.9", "@walmart/react-native-encrypted-storage": "1.1.3", "@walmart/react-native-env": "0.2.0", "@walmart/react-native-logger": "1.31.0-rc.1", @@ -5734,9 +5734,9 @@ } }, "node_modules/@walmart/push-to-talk-mini-app": { - "version": "1.9.8", - "resolved": "https://npme.walmart.com/@walmart/push-to-talk-mini-app/-/push-to-talk-mini-app-1.9.8.tgz", - "integrity": "sha512-gZV9w2Bny+yU63mtY+xMqbjsdwXJQlTikU0NAPSp5FUtU/ijXJ+ORBM9HeP9FLTKLoZNYJ6CCcDHTNIXXqwPxg==", + "version": "1.9.9", + "resolved": "https://npme.walmart.com/@walmart/push-to-talk-mini-app/-/push-to-talk-mini-app-1.9.9.tgz", + "integrity": "sha512-f8xyzyU/BvmMUKiHqhZLIVe1F+KGK1qAOWC0QSYZDvxZMeJlx3l+r4jDY1+GtIMgW12KmvfiCBj9Pl31talWqg==", "license": "UNLICENSED", "peerDependencies": { "@react-native-community/async-storage": "^1.11.0", @@ -25334,9 +25334,9 @@ "integrity": "sha512-P4fXm0HihY3jsOkUX7ZVICRiLOUIDo16FVOZHeie7o611ZmslNScFNWwuzEcFulKsLRq4jSU+XQKrOlUqQlW2g==" }, "@walmart/push-to-talk-mini-app": { - "version": "1.9.8", - "resolved": "https://npme.walmart.com/@walmart/push-to-talk-mini-app/-/push-to-talk-mini-app-1.9.8.tgz", - "integrity": "sha512-gZV9w2Bny+yU63mtY+xMqbjsdwXJQlTikU0NAPSp5FUtU/ijXJ+ORBM9HeP9FLTKLoZNYJ6CCcDHTNIXXqwPxg==" + "version": "1.9.9", + "resolved": "https://npme.walmart.com/@walmart/push-to-talk-mini-app/-/push-to-talk-mini-app-1.9.9.tgz", + "integrity": "sha512-f8xyzyU/BvmMUKiHqhZLIVe1F+KGK1qAOWC0QSYZDvxZMeJlx3l+r4jDY1+GtIMgW12KmvfiCBj9Pl31talWqg==" }, "@walmart/react-native-encrypted-storage": { "version": "1.1.3", --- package.json @@ -73,6 +73,7 @@ "@react-navigation/stack": "^6.1.0", "@sharcoux/slider": "^6.1.1", "@terrylinla/react-native-sketch-canvas": "0.8.0", + "@walmart/OneWalmart-MiniApp": "1.0.12", "@walmart/allspark-graphql-client": "^0.1.0", "@walmart/allspark-home-mini-app": "0.6.14", "@walmart/allspark-neon-core": "0.1.31", @@ -103,12 +104,11 @@ "@walmart/metrics-mini-app": "0.9.38", "@walmart/mod-flex-mini-app": "1.3.15", "@walmart/moment-walmart": "1.0.4", - "@walmart/OneWalmart-MiniApp": "1.0.12", "@walmart/pay-stub-miniapp": "0.9.21", "@walmart/payrollsolution_miniapp": "0.130.23", "@walmart/price-changes-mini-app": "1.6.10", "@walmart/profile-feature-app": "0.76.0", - "@walmart/push-to-talk-mini-app": "1.9.8", + "@walmart/push-to-talk-mini-app": "1.9.9", "@walmart/react-native-encrypted-storage": "1.1.3", "@walmart/react-native-env": "0.2.0", "@walmart/react-native-logger": "1.31.0-rc.1",
using 1.9.9 of PTT mini app
using 1.9.9 of PTT mini app
5bc21771220cd1a2df436ba5ff60f82a97546281
--- package-lock.json @@ -1,12 +1,12 @@ { "name": "@walmart/texting-mini-app", - "version": "2.0.39", + "version": "2.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@walmart/texting-mini-app", - "version": "2.0.39", + "version": "2.1.0", "hasInstallScript": true, "devDependencies": { "@babel/core": "^7.12.9", --- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/texting-mini-app", - "version": "2.0.39", + "version": "2.1.0", "private": false, "main": "dist/index.js", "files": [ --- package-lock.json @@ -1,12 +1,12 @@ { "name": "@walmart/texting-mini-app", - "version": "2.0.39", + "version": "2.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@walmart/texting-mini-app", - "version": "2.0.39", + "version": "2.1.0", "hasInstallScript": true, "devDependencies": { "@babel/core": "^7.12.9", --- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/texting-mini-app", - "version": "2.0.39", + "version": "2.1.0", "private": false, "main": "dist/index.js", "files": [
Drop 17 package version change
Drop 17 package version change
989765b44eb325eec6b2135288534fe3aaa3fbc7
--- __tests__/permissions/__snapshots__/LocationScreenTest.tsx.snap @@ -85,7 +85,7 @@ exports[`LocationScreen matches snapshot 1`] = ` } testID="enableButton" > - permissions.enableLocationButton + permissions.continueButton </PrimaryButton> </View> </View> --- __tests__/permissions/__snapshots__/NotificationsScreenTest.tsx.snap @@ -87,7 +87,7 @@ exports[`NotificationsScreen matches snapshot 1`] = ` } testID="enableButton" > - permissions.enableNotificationsButton + permissions.continueButton </PrimaryButton> </View> </View> --- package-lock.json @@ -61,8 +61,8 @@ "@walmart/mod-flex-mini-app": "1.2.7", "@walmart/moment-walmart": "1.0.4", "@walmart/OneWalmart-MiniApp": "1.0.12", - "@walmart/pay-stub-miniapp": "^0.9.5", - "@walmart/payrollsolution_miniapp": "^0.130.1", + "@walmart/pay-stub-miniapp": "0.9.5", + "@walmart/payrollsolution_miniapp": "0.130.1", "@walmart/price-changes-mini-app": "1.5.6", "@walmart/profile-feature-app": "0.0.71", "@walmart/push-to-talk-mini-app": "1.8.15", @@ -27820,7 +27820,7 @@ "version": "2.1.6", "dev": true, "requires": { - "axios": "^0.21.4" + "axios": "^0.26.1" } }, "chalk": { @@ -31442,7 +31442,7 @@ "is-wsl": "^2.2.0", "semver": "^7.3.2", "shellwords": "^0.1.1", - "uuid": "^8.3.0", + "uuid": "^3.3.2", "which": "^2.0.2" }, "dependencies": { @@ -35284,7 +35284,7 @@ "version": "3.0.1", "requires": { "simple-plist": "^1.1.0", - "uuid": "^7.0.3" + "uuid": "^3.3.2" }, "dependencies": { "uuid": { --- package.json @@ -73,6 +73,7 @@ "@react-navigation/stack": "^6.1.0", "@sharcoux/slider": "^6.1.1", "@terrylinla/react-native-sketch-canvas": "0.8.0", + "@walmart/OneWalmart-MiniApp": "1.0.12", "@walmart/allspark-health-survey-mini-app": "0.0.44", "@walmart/allspark-home-mini-app": "0.6.12", "@walmart/allspark-neon-core": "0.1.31", @@ -102,7 +103,6 @@ "@walmart/metrics-mini-app": "0.9.32", "@walmart/mod-flex-mini-app": "1.2.7", "@walmart/moment-walmart": "1.0.4", - "@walmart/OneWalmart-MiniApp": "1.0.12", "@walmart/pay-stub-miniapp": "0.9.5", "@walmart/payrollsolution_miniapp": "0.130.1", "@walmart/price-changes-mini-app": "1.5.6", --- src/permissions/LocationScreen.tsx @@ -28,10 +28,6 @@ export const LocationScreen: FC< permissions.request(PLATFORM_LOCATION_PERMISSION); }; - // const onSkip = () => { - // permissions.set(PLATFORM_LOCATION_PERMISSION, 'skipped'); - // }; - return ( <View style={styles.container}> <View style={{height: insets.top, backgroundColor: ImageTopColor}} /> @@ -47,16 +43,8 @@ export const LocationScreen: FC< testID='enableButton' onPress={onEnable} style={styles.primaryButton}> - {translate('permissions.enableLocationButton')} + {translate('permissions.continueButton')} </PrimaryButton> - {/* <TouchableOpacity - testID='skipButton' - onPress={onSkip} - style={styles.textButton}> - <Text style={styles.textButtonText}> - {translate('permissions.skipButton')} - </Text> - </TouchableOpacity> */} </View> </View> ); --- src/permissions/NotificationsScreen.tsx @@ -25,10 +25,6 @@ export const NotificationsScreen: FC<StackScreenProps<RootStackMap>> = () => { permissions.request(PLATFORM_NOTIFICATION_PERMISSION); }; - // const onSkip = () => { - // permissions.set(NOTIFICATION_PERMISSION, 'skipped'); - // }; - return ( <View style={styles.container}> <View style={[{height: insets.top, backgroundColor: ImageTopColor}]} /> @@ -44,16 +40,8 @@ export const NotificationsScreen: FC<StackScreenProps<RootStackMap>> = () => { testID='enableButton' onPress={onEnable} style={styles.primaryButton}> - {translate('permissions.enableNotificationsButton')} + {translate('permissions.continueButton')} </PrimaryButton> - {/* <TouchableOpacity - testID='skipButton' - onPress={onSkip} - style={styles.textButton}> - <Text style={styles.textButtonText}> - {translate('permissions.skipButton')} - </Text> - </TouchableOpacity> */} </View> </View> ); --- src/translations/en-US.ts @@ -100,15 +100,12 @@ export const enUS = { }, permissions: { continueButton: 'Continue', - enableLocationButton: 'Enable location', - enableNotificationsButton: 'Enable notifications', locationMessage: 'Enable location and connect to store WiFi to clock in and out.', locationTitle: 'Share your location', notificationsMessage: "We'll notify you about schedule updates, time off requests, team communications and other important alerts.", notificationsTitle: 'Get updates', - skipButton: 'Not now', welcomeMessage: "Thanks for downloading the app, you're going to love it! There are a couple of things to set up so the app is just right for you.", welcomeTitle: 'Welcome to Me@Walmart', --- src/translations/es-MX.ts @@ -107,15 +107,12 @@ export const esMX = { }, permissions: { continueButton: 'Seguir', - enableLocationButton: 'Habilitar ubicación', - enableNotificationsButton: 'Permitir notificaciones', locationMessage: 'Habilita la ubicación y conéctate al WiFi de la tienda para registrarte al inicio y a la salida.', locationTitle: 'Comparte tu ubicación', notificationsMessage: 'Te notificaremos acerca de actualizaciones de horarios, solicitudes de tiempo libre, comunicaciones del equipo y otras alertas importantes.', notificationsTitle: 'Obtén actualizaciones', - skipButton: 'Ahora no', welcomeMessage: 'Gracias por descargar la aplicación, ¡te va a encantar! Hay que configurar un par de cosas para que la aplicación sea la adecuada para usted.', welcomeTitle: 'Bienvenido a Me@Walmart',
fix: update permission primary button verbiage
fix: update permission primary button verbiage
d4826d9cf9d0a710631597416a8c961eb6ac7285
--- targets/US/android/app/src/main/res/raw/vizpick_pop.mp3 Binary files /dev/null and b/targets/US/android/app/src/main/res/raw/vizpick_pop.mp3 differ --- targets/US/ios/AllSpark.xcodeproj/project.pbxproj @@ -35,6 +35,7 @@ 6DA4A04F2B31FF560029B319 /* call_1_1_ringback.wav in Resources */ = {isa = PBXBuildFile; fileRef = 6DA4A0492B31FF560029B319 /* call_1_1_ringback.wav */; }; 6DA4A0502B31FF560029B319 /* call_1_1_ringtone.wav in Resources */ = {isa = PBXBuildFile; fileRef = 6DA4A04A2B31FF560029B319 /* call_1_1_ringtone.wav */; }; 6DA4A0512B31FF560029B319 /* CallWaiting.wav in Resources */ = {isa = PBXBuildFile; fileRef = 6DA4A04B2B31FF560029B319 /* CallWaiting.wav */; }; + 7B77B52E2CD989F500074945 /* vizpick_pop.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 7B77B52D2CD989F500074945 /* vizpick_pop.mp3 */; }; 8063AF072BF52A9B00C02185 /* version.txt in Resources */ = {isa = PBXBuildFile; fileRef = 8063AF062BF52A9B00C02185 /* version.txt */; }; 8081353125433D1300844649 /* PTMono-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8081353025433D1300844649 /* PTMono-Regular.ttf */; }; 9D01483725F17B3100A8E049 /* LaunchScreen-Prod.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9D01483625F17B3000A8E049 /* LaunchScreen-Prod.storyboard */; }; @@ -79,6 +80,7 @@ 6DA4A04A2B31FF560029B319 /* call_1_1_ringtone.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = call_1_1_ringtone.wav; sourceTree = "<group>"; }; 6DA4A04B2B31FF560029B319 /* CallWaiting.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = CallWaiting.wav; sourceTree = "<group>"; }; 791B25E6CC3E142AC5BD129C /* Pods-AllSpark.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AllSpark.release.xcconfig"; path = "Target Support Files/Pods-AllSpark/Pods-AllSpark.release.xcconfig"; sourceTree = "<group>"; }; + 7B77B52D2CD989F500074945 /* vizpick_pop.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = vizpick_pop.mp3; sourceTree = "<group>"; }; 7E03751FFBC04D1E977A672C /* icomoon.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = icomoon.ttf; path = "../node_modules/@walmart/ui-components/assets/fonts/icomoon.ttf"; sourceTree = "<group>"; }; 8063AF062BF52A9B00C02185 /* version.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = version.txt; path = "../../../node_modules/@walmart/gtp-shared-components/assets/fonts/version.txt"; sourceTree = "<group>"; }; 8081353025433D1300844649 /* PTMono-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "PTMono-Regular.ttf"; sourceTree = "<group>"; }; @@ -230,6 +232,7 @@ 83CBB9F61A601CBA00E9B192 = { isa = PBXGroup; children = ( + 7B77B52D2CD989F500074945 /* vizpick_pop.mp3 */, 8063AF062BF52A9B00C02185 /* version.txt */, 252A4F092BDC5618006404A5 /* PrivacyInfo.xcprivacy */, 31C9750625D6BD2F00044347 /* icomoon.ttf */, @@ -377,6 +380,7 @@ 31E17248255A601A0039C18F /* Bogle-LightItalic.otf in Resources */, 31E17249255A601A0039C18F /* Bogle-Medium.otf in Resources */, 31E17243255A601A0039C18F /* Bogle-Black.otf in Resources */, + 7B77B52E2CD989F500074945 /* vizpick_pop.mp3 in Resources */, 31E17244255A601A0039C18F /* Bogle-BlackItalic.otf in Resources */, 6DA4A04C2B31FF560029B319 /* FastBusy.mp3 in Resources */, E9AD4B182679309900D8DDD4 /* clockin.mp3 in Resources */, --- targets/US/ios/vizpick_pop.mp3 Binary files /dev/null and b/targets/US/ios/vizpick_pop.mp3 differ
Add VizPick pop sound to assets
Add VizPick pop sound to assets
cc992af23bb93a3f27af360f1ec83c8fd3b47305
--- packages/allspark-foundation/__tests__/Hooks/useUserPreferences.test.ts @@ -1,4 +1,4 @@ -import { useUserPreferences } from '../../src/Hooks/useUserPreferences'; +import { useUserPreferences } from '../../src/HubFeature/Hooks/useUserPreferences'; import { renderHook } from '@testing-library/react-native'; import { useQuery } from '@apollo/client'; --- packages/allspark-foundation/src/HubFeature/Hooks/useUserPreferences.ts @@ -1,10 +1,10 @@ import { useSelector } from 'react-redux'; import { useGetAssociatePreferencesQuery } from '@walmart/me-at-walmart-athena-queries'; import { useState } from 'react'; -import { teamImageIcon } from '../HubFeature/Hub/Container/mockData'; -import { UserSelectors } from '../User'; -import { SiteSelectors } from '../Site'; -import { TeamSwitcherTypes } from '../HubFeature'; +import { teamImageIcon } from '../Hub/Container/mockData'; +import { UserSelectors } from '../../User'; +import { SiteSelectors } from '../../Site'; +import { TeamSwitcherTypes } from '..'; const sorter = (data: TeamSwitcherTypes[]): TeamSwitcherTypes[] => { const TOTAL_STORE = 'Total store'; --- packages/allspark-foundation/src/HubFeature/Hub/Container/AllsparkHubContainer.tsx @@ -11,7 +11,8 @@ import { useSelector } from 'react-redux'; import { validateWidgets } from './utils'; import { ValidatedTeamWidgetMapping } from './types'; import { LayoutConfig } from '@walmart/allspark-utils'; -import { useUserPreferences } from '../../../Hooks/useUserPreferences'; +import { useUserPreferences } from '../../Hooks/useUserPreferences'; +import { ScrollView } from 'react-native'; export class AllsparkHubContainer { private AllsparkWidgetContainer = {} as ComponentContainer; @@ -66,7 +67,10 @@ export class AllsparkHubContainer { setAllowedWidgets(this.allowedWidgets); }, [teamId]); return ( - <> + <ScrollView + stickyHeaderIndices={[1]} + showsVerticalScrollIndicator={false} + > <HubHeader title='Hub value-prop title' subText='Short introduction to convey the action we intend the associate to take through this hub.' @@ -81,7 +85,7 @@ export class AllsparkHubContainer { layout={allowedWidgetsList} props={{ teamId: teamId }} /> - </> + </ScrollView> ); }; } --- packages/allspark-foundation/src/HubFeature/Hub/TeamSwitcher/index.tsx @@ -5,7 +5,7 @@ import { TeamSwitcherStyles, scale } from './styles'; import { VerticalDivider } from './VerticalDivider'; import { AddEditButton } from './AddEditButton'; import { Skeleton } from '@walmart/gtp-shared-components'; -import { useUserPreferences } from '../../../Hooks/useUserPreferences'; +import { useUserPreferences } from '../../Hooks/useUserPreferences'; import { teamImageIcon } from '../Container/mockData'; import { useTeamHubImage } from '../../HubImages';
feat(ui): update the team switcher to be sticky SMDV-5858
feat(ui): update the team switcher to be sticky SMDV-5858