commit_hash
stringlengths
40
40
input
stringlengths
13
7.99k
output
stringlengths
5
155
full_message
stringlengths
6
8.96k
3b81974e441df5037d49438289ac2523f3e682db
--- packages/allspark-foundation-hub/package.json @@ -1,6 +1,6 @@ { "name": "@walmart/allspark-foundation-hub", - "version": "1.0.0-beat.1", + "version": "1.0.0-beta.1", "description": "", "main": "Core/index.js", "types": "Core/index.d.ts",
Update allspark-foundation hub version
Update allspark-foundation hub version
f220e98ceec9983fb6115c155276ca9cf5d107a3
--- .yarn/patches/README.md @@ -99,3 +99,9 @@ This directory contains patches that are applied to packages during the install - **Issue**: [react-native-vision-camera#1]() - **Description**: TODO + +### `react-native-modal` + +- **Issue**: [Accessibility issue with react-native-modal]() + +- **Description**: The pressable backdrop of the modal is made accessible and focusable to screen readers, interfering with the screen reader's ability to announce the modal content and actions. This patch sets accessible and focusable to false. The backdrop is still pressable. \ No newline at end of file
docs: updating patches README for react-native-modal patch
docs: updating patches README for react-native-modal patch
938ac836e9f7842803b6ccc7369db3801db50d3e
--- .gitignore @@ -8,6 +8,9 @@ node_modules/ dist/ web-build/ +coverage/ +test-report.xml + # Native *.orig.* *.jks --- package.json @@ -26,6 +26,8 @@ "start:minified": "expo start --no-dev --minify", "start": "ts-node scripts/runWithVariablePrompt.ts 'expo start --dev-client'", "prebuild": "ts-node scripts/runWithVariablePrompt.ts 'expo prebuild --clean' --skipContext", + "prebuild:build": "yarn prebuild && yarn build", + "postprebuild": "yarn build", "run:ios": "ts-node scripts/runWithVariablePrompt.ts 'expo run:ios'", "run:android": "ts-node scripts/runWithVariablePrompt.ts 'expo run:android'", "test": "jest --no-watchman", @@ -73,7 +75,7 @@ "@types/react-test-renderer": "^18.0.7", "@walmart/allspark-authentication": "6.4.1", "@walmart/allspark-foundation": "^6.32.0", - "@walmart/allspark-foundation-hub": "1.10.0-beta.4654+ab636fb8", + "@walmart/allspark-foundation-hub": "1.10.0-beta.4661+a953fe94", "@walmart/allspark-graphql-client": "6.3.29", "@walmart/allspark-http-client": "6.3.29", "@walmart/allspark-utils": "6.5.1", --- src/Components/index.ts @@ -1,4 +1,4 @@ -import {FEATURE_ID} from 'src/common/constants'; +import {FEATURE_ID} from '../common/constants'; import {TeamSwitcherFilter} from './TeamSwitcherFilter'; import {TeamSwitcherLoading} from './TeamSwitcherLoading'; --- src/Modals/HOC/updateModal.tsx @@ -14,7 +14,7 @@ import {AssociateExpHubSelectors} from '../../Redux/selectors'; import {AssociateExpHubActionCreators} from '../../Redux/actions'; import {useGetTeamsAdapter} from '../../Adapters'; import {useUpsertSupplyChainAssociatePreference} from '../../Hooks/useUpsertSupplyChainAssociatePreference'; -import {ShiftCode} from '../../common/types'; +import {ShiftCode, TeamSection} from '../../common/types'; import {filterTeamsBySearchInput} from '@walmart/allspark-foundation-hub'; import {MODALS} from '../../common/constants'; @@ -91,7 +91,7 @@ const UpdateModal = AssociateExpHubFeature.createModal( teamSections as any[], searchInput ); - setSearchedSections(searchApplied); + setSearchedSections(searchApplied as TeamSection[]); } else { setSearchedSections(teamSections); } --- tsconfig.json @@ -1,7 +1,7 @@ { "extends": "expo/tsconfig.base", "include": [ - "src" + "src" ], "compilerOptions": { "strict": true, --- yarn.lock @@ -5889,9 +5889,9 @@ __metadata: languageName: node linkType: hard -"@walmart/allspark-foundation-hub@npm:1.10.0-beta.4654+ab636fb8": - version: 1.10.0-beta.4654 - resolution: "@walmart/allspark-foundation-hub@npm:1.10.0-beta.4654::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fallspark-foundation-hub%2F-%2F%40walmart%2Fallspark-foundation-hub-1.10.0-beta.4654.tgz" +"@walmart/allspark-foundation-hub@npm:1.10.0-beta.4661+a953fe94": + version: 1.10.0-beta.4661 + resolution: "@walmart/allspark-foundation-hub@npm:1.10.0-beta.4661::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fallspark-foundation-hub%2F-%2F%40walmart%2Fallspark-foundation-hub-1.10.0-beta.4661.tgz" peerDependencies: "@react-navigation/native": 6.x "@walmart/allspark-foundation": ">=6.27" @@ -5901,7 +5901,7 @@ __metadata: react: "*" react-native: "*" react-native-safe-area-context: 4.x - checksum: 10c0/593a7727eb1393832cbbf0f067751a13bef1f117e9457846d1910f5690b20117d933d1f62923ea486f6c5aac3977e74fca92534519e827a88eaeee1f3ee51a72 + checksum: 10c0/2d2fcbe23fe251f7874703753651e1d12294a22360be289a901ff714fda46aa9a95ddd661e4ee61dddeabe5b8fdad4e55c7a37e41a198a1be031ea01955dcf6b languageName: node linkType: hard @@ -6078,7 +6078,7 @@ __metadata: "@types/react-test-renderer": "npm:^18.0.7" "@walmart/allspark-authentication": "npm:6.4.1" "@walmart/allspark-foundation": "npm:^6.32.0" - "@walmart/allspark-foundation-hub": "npm:1.10.0-beta.4654+ab636fb8" + "@walmart/allspark-foundation-hub": "npm:1.10.0-beta.4661+a953fe94" "@walmart/allspark-graphql-client": "npm:6.3.29" "@walmart/allspark-http-client": "npm:6.3.29" "@walmart/allspark-utils": "npm:6.5.1"
fix(ui): update associate exp hub packages and build erros
fix(ui): update associate exp hub packages and build erros
6133c4a6c227cc954a86a7c0eb6c4c6600806547
--- src/home/components/TaskCard/index.tsx @@ -34,14 +34,15 @@ export const TaskCard: FC<TaskCardProps> = (props) => { const copilot = configMap?.copilot; const showTaskClockStatus = useHomeAppConfig('showTaskClockStatus', true); const tmsVersion = useHomeAppConfig('tmsVersion', TMS_VERSION_2); - + /* istanbul ignore next */ + const displayStyle = copilot?.enabled ? 'none' : 'flex'; return isClockedIn ? ( <View style={[ styles.container, style, // eslint-disable-next-line react-native/no-inline-styles - {display: copilot?.enabled ? 'none' : 'flex'}, + {display: displayStyle}, ]} testID='taskCard'> <Headline style={styles.titleText}>
fix: lint
fix: lint
49d6642723084cae69188891a4ec506d30fb4269
--- __tests__/__mocks__/@react-native-firebase/firestore.js @@ -14,20 +14,6 @@ mockReactNativeFirestore(mockFirestoreDatabase, { const {Firestore} = require('@react-native-firebase/firestore'); const mockFirestore = () => new Firestore(); -jest.mock('../../../src/presence/constants', () => { - return { - USERS_COLLECTION: 'users', - FIRESTORE_OFFLINE_DATA: { - state: 'offline', - lastChanged: mockGenerateCreatedAt(), - }, - FIRESTORE_ONLINE_DATA: { - state: 'online', - lastChanged: mockGenerateCreatedAt(), - }, - }; -}); - mockFirestore.FieldValue = { serverTimestamp: () => 'mock-firestore-server-timestamp', }; --- src/channels/utils.ts @@ -0,0 +1,10 @@ +/** + * @description Create id for associate channel doc + * @param participants list of userids in channel + * @returns SHA256 encrypted value of sorted participants + */ +export const createAssociateChannelId = (participants: string[]) => { + const data = participants.sort().join('-'); + const hash = CryptoJS.SHA256(data); + return hash.toString(CryptoJS.enc.Hex); +};
fixing tests
fixing tests
b07663cfd7a744fa118cd50c1287b1b77bad976a
--- package.json @@ -138,7 +138,7 @@ "@walmart/react-native-store-map": "0.3.7", "@walmart/react-native-sumo-sdk": "2.7.4", "@walmart/react-native-webex-sdk": "patch:@walmart/react-native-webex-sdk@npm%3A0.8.11#~/.yarn/patches/@walmart-react-native-webex-sdk-npm-0.8.11-6123ac0660.patch", - "@walmart/receipt-check-miniapp": "1.28.1", + "@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.8.5", --- yarn.lock @@ -7359,7 +7359,7 @@ __metadata: "@walmart/react-native-store-map": "npm:0.3.7" "@walmart/react-native-sumo-sdk": "npm:2.7.4" "@walmart/react-native-webex-sdk": "patch:@walmart/react-native-webex-sdk@npm%3A0.8.11#~/.yarn/patches/@walmart-react-native-webex-sdk-npm-0.8.11-6123ac0660.patch" - "@walmart/receipt-check-miniapp": "npm:1.28.1" + "@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.8.5" @@ -7950,9 +7950,9 @@ __metadata: languageName: node linkType: hard -"@walmart/receipt-check-miniapp@npm:1.28.1": - version: 1.28.1 - resolution: "@walmart/receipt-check-miniapp@npm:1.28.1::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Freceipt-check-miniapp%2F-%2Freceipt-check-miniapp-1.28.1.tgz" +"@walmart/receipt-check-miniapp@npm:1.29.4": + version: 1.29.4 + resolution: "@walmart/receipt-check-miniapp@npm:1.29.4::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Freceipt-check-miniapp%2F-%2F%40walmart%2Freceipt-check-miniapp-1.29.4.tgz" dependencies: "@walmart/tcnumber": "npm:^2.3.3" "@xstate/react": "npm:^3.0.1" @@ -7962,7 +7962,7 @@ __metadata: xstate: "npm:^4.32.1" peerDependencies: "@walmart/allspark-foundation": "*" - checksum: 10c0/6c560284bea9052f36724e47e067a668271693e8f54889f06fc9d6ccd700ddf7320f51e116a773fb1f4b82536f38d0c6e1b7e6b5a45b49a4660efb5998f3da9e + checksum: 10c0/9ad9e18c1512aff381cb78ec4a27c6e9223b3021f3a542cc9a4f338d49b9064bd48f5ac52b7aa65b7e576c0f8b7c05894c51fecedd00dabd11a8afd705eebe71 languageName: node linkType: hard
feat(receipt-check-miniapp): FLB-2205 drop 29 changes (#3959)
feat(receipt-check-miniapp): FLB-2205 drop 29 changes (#3959) Co-authored-by: Brandon
5ba654dc36ebaa8e4fa0477f6c18a3928ff1efe7
--- package-lock.json @@ -3338,9 +3338,9 @@ "integrity": "sha512-53F4Ig1Bd7bMzwgmq0OnDa+T3PKdi0wyyTDg67F9mvdRn05Le+EVv6Dji8fft8XE8hGmgK5sjwpTuarBmnDsVQ==" }, "@walmart/exception-mini-app": { - "version": "0.36.0", - "resolved": "https://npme.walmart.com/@walmart/exception-mini-app/-/exception-mini-app-0.36.0.tgz", - "integrity": "sha512-tJX/GKopS1N77pk6HxYFo3xvaa1YJL6VrMVM3kZ5UXafitUBKhtyAmJitLgsLeJsDrBHU32cgTgnPE8slU3nzw==" + "version": "0.35.0-rc.0", + "resolved": "https://npme.walmart.com/@walmart/exception-mini-app/-/exception-mini-app-0.35.0-rc.0.tgz", + "integrity": "sha512-DwE5+TvBdwIV2cLOv2YYXg02PcBp52x18ckvA5L3yPBOrmhS5ACaKVf+wSNyFnBwYfgk7xZ6qFFBpEDz4v0+AA==" }, "@walmart/feedback-all-spark-miniapp": { "version": "0.0.58", @@ -3411,9 +3411,9 @@ "integrity": "sha512-f4KuVr2K+ITDD3vmd1FWWAdHYKUyd+/PGu3s0YpFCAMe97jEm9En9xcDT1iEqM+3+kpcunwzm/E09vexdz8VMQ==" }, "@walmart/metrics-mini-app": { - "version": "0.4.11", - "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.4.11.tgz", - "integrity": "sha512-GqO2SEWNHFhjDbf9Gy3rEYKubg2TPxdH1KBAxpeAfemQbupsL5EpNXS4xRPGlOBf9Unsv6jqsQwpu+vJynRofA==", + "version": "0.4.12", + "resolved": "https://npme.walmart.com/@walmart/metrics-mini-app/-/metrics-mini-app-0.4.12.tgz", + "integrity": "sha512-LAuiMisSTPFCaaTJ9J1DuaLW0va59dbskY8YiaTY/dziEtojPEkF4Sw4kX24pIQLEuKiipdBrjiWiuetSyR6JA==", "requires": { "@types/base-64": "^1.0.0", "apisauce": "^1.1.2", --- package.json @@ -76,7 +76,7 @@ "@walmart/ask-sam-mini-app": "0.30.15", "@walmart/config-components": "^1.0.31", "@walmart/counts-component-miniapp": "0.0.20", - "@walmart/exception-mini-app": "0.36.0", + "@walmart/exception-mini-app": "0.35.0-rc.0", "@walmart/feedback-all-spark-miniapp": "0.0.58", "@walmart/functional-components": "1.0.32", "@walmart/gta-react-native-calendars": "0.0.15",
updating exception-mini-app version
updating exception-mini-app version
f62a17d28362b7dbdf89fe8f0a5b29b57aef960e
--- package-lock.json @@ -81,7 +81,7 @@ "@walmart/schedule-mini-app": "0.32.0", "@walmart/settings-mini-app": "1.12.0", "@walmart/shelfavailability-mini-app": "1.5.11", - "@walmart/taskit-mini-app": "0.49.6", + "@walmart/taskit-mini-app": "0.49.11", "@walmart/time-clock-mini-app": "0.30.0", "@walmart/ui-components": "1.9.0", "@walmart/welcomeme-mini-app": "0.73.0", @@ -6109,9 +6109,9 @@ } }, "node_modules/@walmart/taskit-mini-app": { - "version": "0.49.6", - "resolved": "https://npme.walmart.com/@walmart/taskit-mini-app/-/taskit-mini-app-0.49.6.tgz", - "integrity": "sha512-uIOdjSxp9dB/x036dC8bnRom0hkr+FqvXT0GdrX69M+dVEV0rrHGARrBOVqQZIN1U2tg/EhyDh3Et1avL+ZJLw==", + "version": "0.49.11", + "resolved": "https://npme.walmart.com/@walmart/taskit-mini-app/-/taskit-mini-app-0.49.11.tgz", + "integrity": "sha512-D0Oi1XUgIvxIVjQL2wl0nyeTJr0Sqcvtezbag3ZG0tMlwxGJMXNB2PvkQ5n8JBuAV1YRlggsGtIp+yLz+slgCQ==", "peerDependencies": { "@terrylinla/react-native-sketch-canvas": "^0.8.0", "@types/lodash": ">=4.14.176",
updates post rebase
updates post rebase
c9d9994a8fcdf62eb24a804915014565c5b38382
--- package.json @@ -155,7 +155,7 @@ "@walmart/core-utils": "~6.3.9", "@walmart/core-widget-registry": "workspace:^", "@walmart/functional-components": "~6.3.28", - "@walmart/me-at-walmart-athena-queries": "6.30.3", + "@walmart/me-at-walmart-athena-queries": "6.30.4", "@walmart/me-at-walmart-common": "workspace:^", "@walmart/me-at-walmart-container": "workspace:^", "@walmart/moment-walmart": "1.0.4", --- packages/me-at-walmart-container/__tests__/services/user/transforms.test.ts @@ -169,6 +169,10 @@ describe('services/user/transforms.ts', () => { preferredMiddleName: '', preferredNameSocialSuffix: 'Mr', preferredNameTitle: 'Enginer', + shift: { + name: 'A', + number: 2, + }, }, wmBusinessUnitNumber: 'wmBusinessUnitNumber', wmBusinessUnitType: 'wmBusinessUnitType', @@ -221,6 +225,10 @@ describe('services/user/transforms.ts', () => { preferredMiddleName: '', preferredNameSocialSuffix: 'Mr', preferredNameTitle: 'Enginer', + shift: { + name: 'A', + number: 2, + }, regionNumber: '8969822', secondaryJobCode: '5432523', siteId: undefined, @@ -279,6 +287,7 @@ describe('services/user/transforms.ts', () => { regionNumber: undefined, siteId: '100', state: undefined, + shift: undefined, teams: [], title: 'undefined', userId: 'vn579n7', --- packages/me-at-walmart-container/src/services/user/transforms.ts @@ -175,6 +175,7 @@ export const parseUserResponse = ( preferredMiddleName: associate?.preferredMiddleName, preferredNameSocialSuffix: associate?.preferredNameSocialSuffix, preferredNameTitle: associate?.preferredNameTitle, + shift: associate?.shift, wmDivision: user.division, wmJobCode: user.wmJobCode, } as User; @@ -208,6 +209,7 @@ export const transformImpersonateeData = ( homeSite: siteId, workingSite: siteId, teams, + shift: data?.shift, fullyQualifiedUserID: data.userId, clockStatus: data.punch?.clockStatus, division: --- targets/US/package.json @@ -113,7 +113,7 @@ "@walmart/iteminfo-mini-app": "8.0.4", "@walmart/learning-mini-app": "20.0.39", "@walmart/manager-approvals-miniapp": "0.3.2", - "@walmart/me-at-walmart-athena-queries": "6.30.3", + "@walmart/me-at-walmart-athena-queries": "6.30.4", "@walmart/me-at-walmart-common": "workspace:^", "@walmart/me-at-walmart-container": "workspace:^", "@walmart/me-at-walmart-core": "workspace:^", --- yarn.lock @@ -7431,12 +7431,12 @@ __metadata: languageName: node linkType: hard -"@walmart/me-at-walmart-athena-queries@npm:6.30.3": - version: 6.30.3 - resolution: "@walmart/me-at-walmart-athena-queries@npm:6.30.3" +"@walmart/me-at-walmart-athena-queries@npm:6.30.4": + version: 6.30.4 + resolution: "@walmart/me-at-walmart-athena-queries@npm:6.30.4" peerDependencies: "@apollo/client": "*" - checksum: 10c0/fea2e73f761248b398198b3649d7163134580f306c4f112e94e5fb4bb6d0ad0f801a57527b46353dbde87e934134e93c176f23a966574acd5ee3eb39f284948c + checksum: 10c0/862add85bca86dc76eb7034d15e38806a7d28e16d6c4edb4773279f842a5c67f212ccc962468688e6b4c5e1b242973e8bdec4e06b5d4db8e4bf387dff5c8a1ee languageName: node linkType: hard @@ -7758,7 +7758,7 @@ __metadata: "@walmart/iteminfo-mini-app": "npm:8.0.4" "@walmart/learning-mini-app": "npm:20.0.39" "@walmart/manager-approvals-miniapp": "npm:0.3.2" - "@walmart/me-at-walmart-athena-queries": "npm:6.30.3" + "@walmart/me-at-walmart-athena-queries": "npm:6.30.4" "@walmart/me-at-walmart-common": "workspace:^" "@walmart/me-at-walmart-container": "workspace:^" "@walmart/me-at-walmart-core": "workspace:^"
add shift to the associate query
add shift to the associate query
125eaf853637e256149b7661a1a3e597bc6d77cf
--- packages/allspark-foundation/__tests__/Feature/AllsparkFeature.test.tsx @@ -8,8 +8,7 @@ jest.mock('../../src/Logger', () => ({ LoggerService: { createFeatureInstance: jest.fn(), }, -})) - +})); let feature: AllsparkFeature<'testFeature'>; @@ -81,7 +80,7 @@ describe('AllsparkFeature', () => { const config = { name: 'feature test', modals: { 'testFeature.0': 'testFeature-modal' }, - screens: { 'testFeature.0': 'testFeature-screen' } + screens: { 'testFeature.0': 'testFeature-screen' }, }; const module1 = feature.createModule(config); const module2 = feature.createModule(config); @@ -163,9 +162,15 @@ describe('AllsparkFeature', () => { }); it('should create a DynamicComponent with the given template', () => { const Template: FC = () => <Text>Test</Text>; - const result = feature.createDynamicComponent(Template); + const result = feature.createDynamicComponent( + 'testFeature.dynamicComponent', + Template + ); expect(result).toBeDefined(); - const res = feature.createComponentContainer({ limit: 2 }); + const res = feature.createComponentContainer( + 'testFeature.componentContainer', + { limit: 2 } + ); expect(res).toBeDefined(); }); it('should create translations', () => { @@ -183,7 +188,7 @@ describe('AllsparkFeature', () => { it('should create screens', () => { const screens = { screen1: jest.fn(), - screen2: jest.fn() + screen2: jest.fn(), }; const result = feature.createScreens(screens); expect(result).toBe(screens); @@ -191,14 +196,14 @@ describe('AllsparkFeature', () => { it('should create components', () => { const components = { containers: jest.fn(), - shared: jest.fn() + shared: jest.fn(), }; const result = feature.createComponents(components); expect(result).toBe(components); }); it('should create Modal', () => { const modal = { - name: 'modal' + name: 'modal', }; const result = feature.createModal(modal); expect(result).toMatchObject({ modal: modal }); @@ -206,7 +211,7 @@ describe('AllsparkFeature', () => { it('should create Redux', () => { const redux = { reducer: jest.fn(), - sagas: jest.fn() + sagas: jest.fn(), }; const result = feature.createRedux(redux); expect(result.reducer).toBeTruthy(); --- packages/allspark-foundation/__tests__/Work/client.test.ts @@ -1,16 +1,7 @@ -import * as reduxSagaEffects from 'redux-saga/effects'; - import { ActiveAllsparkContainer } from '../../src/Container/ActiveContainerManager'; -import { ReduxStoreClient } from '../../src/Redux/client'; import { AllsparkReduxStore } from '../../src/Redux/global'; -import { - WorkActionsCreators, - WorkActionTypes, - WorkflowError, - WorkflowErrors, -} from '../../src/Work'; +import { WorkActionsCreators, WorkflowErrors } from '../../src/Work'; import { WorkClient } from '../../src/Work/client'; -import mock from '@walmart/allspark-foundation-hub/src/SupplyChain/Components/EditSavedTeams/mock'; const mockAddMiddlewares = jest.fn(); jest.mock('../../src/Redux/middleware', () => ({ @@ -91,7 +82,7 @@ describe('WorkClient', () => { expect(mockDispatch).toHaveBeenCalledWith( WorkActionsCreators.WORK_FLOW_COMPLETE() ); - expect(result).toBe(WorkActionTypes.WORK_FLOW_COMPLETE); + expect(result).toBe('success'); }); test('throw a WorkflowError with the CANCELLED code when the task was cancelled, using task.cancel()', async () => {
tests: fix broken tests
tests: fix broken tests
15d8f9e23870b3ecfd658e55f428229954457334
--- .yarnrc.yml @@ -133,10 +133,6 @@ packageExtensions: optional: true realm: optional: true - "@walmart/rfid-scan-mini-app@*": - peerDependenciesMeta: - react-native-circular-progress: - optional: true "@walmart/rn-receiving-mini-app@*": peerDependenciesMeta: "@react-navigation/native-stack": --- package.json @@ -207,7 +207,6 @@ "react-native-ble-manager": "~11.4.0", "react-native-blob-util": "^0.19.5", "react-native-calendars": "^1.1291.0", - "react-native-circular-progress": "^1.3.7", "react-native-device-info": "~10.13.1", "react-native-drop-shadow": "1.0.0", "react-native-error-boundary": "^1.1.6", --- src/settings/thirdPartyNotices/third-party-notices.ts @@ -519,32 +519,6 @@ export const THIRD_PARTY_NOTICES_HTML = `<html> <p>limitations under the License.</p> <p>&nbsp;</p> <p>&nbsp;</p> - <p><strong>react-native-circular-progress</strong></p> - <p>&nbsp;</p> - <p>Copyright (c) 2015 Bart Gryszko</p> - <p>&nbsp;</p> - <p>&nbsp;</p> - <p>Permission is hereby granted, free of charge, to any person obtaining a copy</p> - <p>of this software and associated documentation files (the "Software"), to deal</p> - <p>in the Software without restriction, including without limitation the rights</p> - <p>to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</p> - <p>copies of the Software, and to permit persons to whom the Software is</p> - <p>furnished to do so, subject to the following conditions:</p> - <p>&nbsp;</p> - <p>&nbsp;</p> - <p>The above copyright notice and this permission notice shall be included in</p> - <p>all copies or substantial portions of the Software.</p> - <p>&nbsp;</p> - <p>&nbsp;</p> - <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</p> - <p>IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</p> - <p>FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.&nbsp; IN NO EVENT SHALL THE</p> - <p>AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</p> - <p>LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</p> - <p>OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN</p> - <p>THE SOFTWARE.</p> - <p>&nbsp;</p> - <p>&nbsp;</p> <p><strong>react-native-device-info</strong></p> <p>&nbsp;</p> <p>Copyright (c) 2015 Rebecca Hughes</p> --- yarn.lock @@ -8455,7 +8455,6 @@ __metadata: react-native-ble-manager: "npm:~11.4.0" react-native-blob-util: "npm:^0.19.5" react-native-calendars: "npm:^1.1291.0" - react-native-circular-progress: "npm:^1.3.7" react-native-device-info: "npm:~10.13.1" react-native-drop-shadow: "npm:1.0.0" react-native-error-boundary: "npm:^1.1.6" @@ -20358,19 +20357,6 @@ __metadata: languageName: node linkType: hard -"react-native-circular-progress@npm:^1.3.7": - version: 1.4.1 - resolution: "react-native-circular-progress@npm:1.4.1::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2Freact-native-circular-progress%2F-%2Freact-native-circular-progress-1.4.1.tgz" - dependencies: - prop-types: "npm:^15.8.1" - peerDependencies: - react: ">=16.0.0" - react-native: ">=0.50.0" - react-native-svg: ">=7.0.0" - checksum: 10c0/f6aa224eff9a01ca708443204e6b701d01b99138d225a1a083a6daac319a659088667e2a89644b258943e610b4892528c0e8aeb33fc0f250c60dc3842f56142c - languageName: node - linkType: hard - "react-native-device-info@npm:~10.13.1": version: 10.13.2 resolution: "react-native-device-info@npm:10.13.2::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2Freact-native-device-info%2F-%2Freact-native-device-info-10.13.2.tgz"
ALLSPARK-5130: Remove react-native-circular-progress which is unused (#3869)
ALLSPARK-5130: Remove react-native-circular-progress which is unused (#3869)
04e9131430165e66dc8a601a1490a5c197f94afa
--- jest.config.ts @@ -3,12 +3,7 @@ import type {Config} from 'jest'; const config: Config = { preset: 'jest-expo', displayName: 'allspark-core', - projects: [ - '<rootDir>', - 'packages/*/jest.config.ts', - 'scripts/dependencies-map/__tests__/*/jest.config.js', - 'scripts/mini-app-scan/validations/jest.config.js', - ], + projects: ['<rootDir>', 'packages/*/jest.config.ts', 'scripts/dependencies-map/__tests__/*/jest.config.js'], roots: [ '<rootDir>/__tests__', '<rootDir>/__mocks__', --- scripts/mini-app-scan/legacy-library-deprecated.json @@ -1,21 +1 @@ -[ - { - "legacyLibrary": "@walmart/core-services", - "replacement": "@walmart/allspark-foundation", - "enforcementDate": "2024-09-01", - "notes": "Use the foundation replacement for all new development.", - "exemptions": ["@walmart/time-clock-mini-app"] - }, - { - "legacyLibrary": "moment", - "replacement": "dayjs", - "enforcementDate": "2024-09-01", - "notes": "Moment.js is in maintenance mode, use dayjs instead" - }, - { - "legacyLibrary": "@walmart/redux-store#6.3.28", - "replacement": "@walmart/redux-store#6.3.29", - "enforcementDate": "2025-09-01", - "notes": "Upgrade to the latest version for all new development." - } -] \ No newline at end of file +[] \ No newline at end of file --- scripts/mini-app-scan/package-deprecation-mini-app-check.ts @@ -2,8 +2,9 @@ /** * This script analyzes changed packages in a GitHub PR for deprecated libraries - * using the deps-crawler logic. It generates dependency maps for only the - * changed packages and checks their dependencies against deprecation rules. + * using the deps-crawler logic. It generates dependency maps for only the changed + * packages and checks their dependencies against deprecation rules. + * */ import {join} from 'path'; @@ -20,18 +21,9 @@ import { getDiff, cleanupPRComment } from './github'; -import { - getDeprecatedLibraries, - getErrorMessage, - getPRComment, - getSettledResult, - isLibraryDeprecated, - readPackageJsonDependencies, - removeVersionFromPackageName -} from './helper'; +import {getDeprecatedLibraries, getErrorMessage, getPRComment, getSettledResult, isLibraryDeprecated, readPackageJsonDependencies, removeVersionFromPackageName} from './helper'; import {DeprecationFinding} from './types'; -import {isLibraryExempt} from './validations/isLibraryExempt'; const rootDir = join(__dirname, '../..'); process.chdir(rootDir); @@ -49,7 +41,7 @@ const prContext = getPRContext(); * * Note: This should be set to false in production. */ -const TESTING_MODE = true; +const TESTING_MODE = false; /** * Use hardcoded changed packages for testing purposes. * This is useful for local testing without a PR context. @@ -57,10 +49,7 @@ const TESTING_MODE = true; * * Note: This should be empty or TESTING_MODE should be set to false in production. */ -const HARDCODED_CHANGED_PACKAGES: string[] = [ - '@walmart/time-clock-mini-app', - '@walmart/profile-feature-app', -]; +const HARDCODED_CHANGED_PACKAGES: string[] = []; function getHardcodedChangedPackages(): Set<string> { console.log('🧪 Using hardcoded changed packages for testing:'); @@ -367,10 +356,7 @@ async function analyzePackageForDeprecation(pkgName: string, packageDependencies if (!deprecatedLib) return null; const isCurrentlyDeprecated = !deprecatedLib.enforcementDate || - ( - isLibraryDeprecated(deprecatedLib.enforcementDate) && - !isLibraryExempt(pkgName, deprecatedLib.exemptions) - ); + isLibraryDeprecated(deprecatedLib.enforcementDate); return { library: deprecatedLib, --- scripts/mini-app-scan/types.ts @@ -3,7 +3,7 @@ export interface LibraryEntry { replacement?: string; enforcementDate?: string; notes?: string; - exemptions?: string[]; + exemptions?: string[] | null; } export interface DeprecationFinding { --- scripts/mini-app-scan/validations/isLibraryExempt.test.ts @@ -1,18 +0,0 @@ -import {isLibraryExempt} from './isLibraryExempt'; - -describe('isLibraryExempt', () => { - it('should return true for exempt libraries', () => { - const exemptLibs = ['@walmart/time-clock-mini-app']; - expect(isLibraryExempt('@walmart/time-clock-mini-app', exemptLibs)).toBe(true); - }); - - it('should return false for non-exempt libraries', () => { - const exemptLibs = ['@walmart/time-clock-mini-app']; - expect(isLibraryExempt('@walmart/profile-feature-app', exemptLibs)).toBe(false); - }); - - it('should return false for non-exempt libraries', () => { - const exemptLibs: string[] = []; - expect(isLibraryExempt('@walmart/profile-feature-app', exemptLibs)).toBe(false); - }); -}); --- scripts/mini-app-scan/validations/isLibraryExempt.ts @@ -1,9 +0,0 @@ -/** - * Checks if a library is deprecated based on its enforcement date. - * @param enforcementDate The date when the library is enforced. - * - * @returns True if the library is exempt, false otherwise. - */ -export function isLibraryExempt(pkgName: string, exemptLibs?: string[]): boolean { - return exemptLibs?.includes(pkgName) ?? false; -} --- scripts/mini-app-scan/validations/jest.config.js @@ -1,6 +0,0 @@ -module.exports = { - transform: { - '^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', {rootMode: 'upward'}], - }, - testPathIgnorePatterns: ['<rootDir>/setup.js', '<rootDir>/jest.config.js', '<rootDir>/.eslintrc.js'], -};
revert: exemption check changes
revert: exemption check changes
dde17fbc5d2d029805e6c23068c9937f1b8da7da
--- package-lock.json @@ -12668,9 +12668,9 @@ "integrity": "sha512-Ls9qiNZzW/OLFoI25wfjjAcrf2DZ975hn2vr6U9gyuxi2nooVbzQeFoQS5vQcbCt9QX5NY8ASEEAtlLdIa6KVg==" }, "react-native-ssmp-sso-allspark": { - "version": "1.1.5", - "resolved": "https://npme.walmart.com/react-native-ssmp-sso-allspark/-/react-native-ssmp-sso-allspark-1.1.5.tgz", - "integrity": "sha512-fYPsMUU89nvYkf3Zw8ZcA5Y2PNuVVVCANSjTjxFqGE7wt8cfjUeX+GU9KTovrG6LJsg9VyVD1CE96NFZk2Ucvw==" + "version": "1.1.7", + "resolved": "https://npme.walmart.com/react-native-ssmp-sso-allspark/-/react-native-ssmp-sso-allspark-1.1.7.tgz", + "integrity": "sha512-/7PCfrUCHy3pcsY5SJs5RyAfPQk4VE/i6DGAziDdFKJSliKJqWhnmSkqHjUJ3b5oL5+gccyj3fu7nhOqwLxboQ==" }, "react-native-sumo-sdk": { "version": "2.7.4-rc.9",
updated package-lock for react-native-ssmp-sso-allspark
updated package-lock for react-native-ssmp-sso-allspark
1f111b81bf598d61420baaece005b979bf37c26b
--- __tests__/screens/SearchScreen/SearchScreenTest.tsx @@ -0,0 +1,17 @@ +import React from 'react'; +import { + SearchScreen, + SearchHeaderRight, +} from '../../../src/screens/SearchScreen'; + +const {renderWithProviders} = require('../../harness'); +describe('SearchScreenTest', () => { + it('should render search screen', () => { + const searchScreen = renderWithProviders(<SearchScreen />); + expect(searchScreen.toJSON()).toMatchSnapshot(); + }); + it('should render tabs screen with expected elements2', () => { + const searchHeaderRight = renderWithProviders(<SearchHeaderRight />); + expect(searchHeaderRight.toJSON()).toMatchSnapshot(); + }); +}); --- __tests__/screens/SearchScreen/__snapshots__/SearchScreenTest.tsx.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`SearchScreenTest should render search screen 1`] = ` +<View> + <Text> + Placeholder For Search Screen Integration + </Text> +</View> +`; + +exports[`SearchScreenTest should render tabs screen with expected elements2 1`] = ` +<View> + <Text> + Icon for SearchHeader Right From Roster App Goes Here + </Text> +</View> +`;
Adding test coverage for search screen
Adding test coverage for search screen
41e0e686547eb7c83bbb3b5acd6af78871a010f0
--- packages/allspark-foundation/__tests__/Hub/Header.test.tsx @@ -1,18 +1,101 @@ import React from 'react'; import { render } from '../utils'; import { Header } from '../../src/Components/Hub/Header'; +import { colors } from '@walmart/gtp-shared-components'; -describe('Header', () => { - afterEach(() => { - jest.clearAllMocks(); +//Helper function to find a style object in the styles array +const findStyleObject = (styles, styleProperty) => { + if (Array.isArray(styles)) { + return styles.find((style) => style && style[styleProperty] !== undefined); + } else if (styles && styles[styleProperty] !== undefined) { + return styles; + } + return null; +}; + +describe('Header Component', () => { + const props = { + title: 'Test Title', + subText: 'Test SubText', + backgroundColor: 'white', + textColor: 'black', + }; + + it('renders correctly with given title and subText', () => { + const { getByText, toJSON } = render(<Header {...props} />); + expect(toJSON()).toMatchSnapshot(); + + const headerTitle = getByText(props.title); + const headerSubText = getByText(props.subText); + + expect(headerTitle).toBeTruthy(); + expect(headerSubText).toBeTruthy(); + }); + + it('applies the correct styles based on props', () => { + const { getByText, getByTestId } = render(<Header {...props} />); + + const headerTitle = getByText(props.title); + const headerSubText = getByText(props.subText); + const container = getByTestId('container'); + + //Verify the styles applied to the title + const titleStyle = findStyleObject(headerTitle.props.style, 'color'); + expect(titleStyle).toEqual(expect.objectContaining({ color: 'black' })); + + //Verify the styles applied to the subText + const subTextStyle = findStyleObject(headerTitle.props.style, 'color'); + expect(subTextStyle).toEqual(expect.objectContaining({ color: 'black' })); + + //Verify the background color applied to the container + const containerStyle = findStyleObject( + container.props.style, + 'backgroundColor' + ); + expect(containerStyle).toEqual( + expect.objectContaining({ backgroundColor: 'white' }) + ); }); - test('should render snapshot', async () => { - const { toJSON } = render( - <Header - title='Hub value-prop title' - subText='Short introduction to convey the action we intend the associate to take through this hub.' - /> + + it('renders correctly with default colors when no colors are provided', () => { + const defaultProps = { + title: 'Default Title', + subText: 'Default SubText', + }; + const { getByText, getByTestId, toJSON } = render( + <Header {...defaultProps} /> ); expect(toJSON()).toMatchSnapshot(); + + const defaultHeaderTitle = getByText(defaultProps.title); + const defaultHeaderSubText = getByText(defaultProps.subText); + const defaultContainer = getByTestId('container'); + + //Verify the default styles applied to the title + const defaultTitleStyle = findStyleObject( + defaultHeaderTitle.props.style, + 'color' + ); + expect(defaultTitleStyle).toEqual( + expect.objectContaining({ color: colors.white }) + ); + + //Verify the default styles applied to the subText + const defaultSubTextStyle = findStyleObject( + defaultHeaderSubText.props.style, + 'color' + ); + expect(defaultSubTextStyle).toEqual( + expect.objectContaining({ color: colors.white }) + ); + + //Verify the default background color applied to the container + const defaultContainerStyle = findStyleObject( + defaultContainer.props.style, + 'backgroundColor' + ); + expect(defaultContainerStyle).toEqual( + expect.objectContaining({ backgroundColor: colors.blue['100'] }) + ); }); }); --- packages/allspark-foundation/__tests__/Hub/__snapshots__/Header.test.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Header should render snapshot 1`] = ` +exports[`Header Component renders correctly with default colors when no colors are provided 1`] = ` <View style={ { @@ -9,33 +9,75 @@ exports[`Header should render snapshot 1`] = ` "padding": 16, } } + testID="container" > <Text - accessibilityLabel="Hub value-prop title" + accessibilityLabel="Default Title" style={ { "color": "#fff", + "fontFamily": "Bogle-Bold", "fontSize": 24, - "fontWeight": "bold", "lineHeight": 32, "marginBottom": 4, } } > - Hub value-prop title + Default Title </Text> <Text - accessibilityLabel="Short introduction to convey the action we intend the associate to take through this hub." + accessibilityLabel="Default SubText" style={ { "color": "#fff", + "fontFamily": "Bogle-Regular", "fontSize": 16, - "fontWeight": "normal", "lineHeight": 24, } } > - Short introduction to convey the action we intend the associate to take through this hub. + Default SubText + </Text> +</View> +`; + +exports[`Header Component renders correctly with given title and subText 1`] = ` +<View + style={ + { + "backgroundColor": "white", + "flexDirection": "column", + "padding": 16, + } + } + testID="container" +> + <Text + accessibilityLabel="Test Title" + style={ + { + "color": "black", + "fontFamily": "Bogle-Bold", + "fontSize": 24, + "lineHeight": 32, + "marginBottom": 4, + } + } + > + Test Title + </Text> + <Text + accessibilityLabel="Test SubText" + style={ + { + "color": "black", + "fontFamily": "Bogle-Regular", + "fontSize": 16, + "lineHeight": 24, + } + } + > + Test SubText </Text> </View> `; --- packages/allspark-foundation/src/Components/Hub/Header/index.tsx @@ -13,7 +13,7 @@ export const Header = ({ }: HeaderTypes) => { const styles = HeaderStyles(backgroundColor, textColor); return ( - <View style={styles.container}> + <View style={styles.container} testID='container'> <Text style={styles.title} accessibilityLabel={title}> {title} </Text>
update test for header component
update test for header component
9849e32d8ae69bcd77b2c161a33c7217187ec3cf
--- ios/Podfile.lock @@ -506,14 +506,14 @@ PODS: - RNWMSSOLibrary (1.1.0): - AppAuth - React - - SSO (= 1.3.7) + - SSO (= 1.3.8) - SDWebImage (5.11.0): - SDWebImage/Core (= 5.11.0) - SDWebImage/Core (5.11.0) - SDWebImageWebPCoder (0.6.1): - libwebp (~> 1.0) - SDWebImage/Core (~> 5.7) - - SSO (1.3.7): + - SSO (1.3.8): - AppAuth - Starscream (3.0.6) - wifi-store-locator (1.0.0-alpha2): @@ -871,10 +871,10 @@ SPEC CHECKSUMS: RNSoundPlayer: e7f72cf262c8de4f1427b5f29cc47aebadd1d872 RNSVG: ce9d996113475209013317e48b05c21ee988d42e RNVectorIcons: bc69e6a278b14842063605de32bec61f0b251a59 - RNWMSSOLibrary: 281eb5d689558718bab655c395695160d21182d3 + RNWMSSOLibrary: 41741ad462a1cf2592d6dddf1aebeebb9a2b0743 SDWebImage: 7acbb57630ac7db4a495547fb73916ff3e432f6b SDWebImageWebPCoder: d0dac55073088d24b2ac1b191a71a8f8d0adac21 - SSO: 0396a3657c10ab33559af36fb9d6e6318a0e2358 + SSO: 6a7e963cb299184b6cf198991d232b1feb25bf04 Starscream: ef3ece99d765eeccb67de105bfa143f929026cf5 wifi-store-locator: 0f4d1e14ff9b98c559275105c655a5a6103ef427 Yoga: 4bd86afe9883422a7c4028c00e34790f560923d6 --- package-lock.json @@ -12816,9 +12816,9 @@ "integrity": "sha512-Ls9qiNZzW/OLFoI25wfjjAcrf2DZ975hn2vr6U9gyuxi2nooVbzQeFoQS5vQcbCt9QX5NY8ASEEAtlLdIa6KVg==" }, "react-native-ssmp-sso-allspark": { - "version": "1.1.9", - "resolved": "https://npme.walmart.com/react-native-ssmp-sso-allspark/-/react-native-ssmp-sso-allspark-1.1.9.tgz", - "integrity": "sha512-9oYco00xjGVXdfirDLISX7ChrUBwxFHBZKfq4+N/7l163aojGv4Pj6so+gpyzyMIfiIOLUAJr6w0toIQ1JFLow==" + "version": "1.2.0", + "resolved": "https://npme.walmart.com/react-native-ssmp-sso-allspark/-/react-native-ssmp-sso-allspark-1.2.0.tgz", + "integrity": "sha512-GCXmcdKZ3uwpCJtPeUdrvGkbWH43isyXRxc/3/WM9B4ZZHbYuEzw8haVjEagWhzUTLqgTtLYO5mnQZHTKFuUnQ==" }, "react-native-sumo-sdk": { "version": "2.7.4-rc.9",
SSO version update iOD
SSO version update iOD
3763b5c1d39d485ed26ad934eb4edb18522ec578
--- package.json @@ -77,7 +77,7 @@ "@types/redux-mock-store": "^1.0.2", "@walmart/allspark-authentication": "6.4.1", "@walmart/allspark-foundation": "^6.32.0", - "@walmart/allspark-foundation-hub": "1.10.0-beta.4692+6a06c79e", + "@walmart/allspark-foundation-hub": "1.10.0-beta.4694+4971e10e", "@walmart/allspark-graphql-client": "6.3.29", "@walmart/allspark-http-client": "6.3.29", "@walmart/allspark-utils": "6.5.1", --- yarn.lock @@ -5905,9 +5905,9 @@ __metadata: languageName: node linkType: hard -"@walmart/allspark-foundation-hub@npm:1.10.0-beta.4692+6a06c79e": - version: 1.10.0-beta.4692 - resolution: "@walmart/allspark-foundation-hub@npm:1.10.0-beta.4692::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fallspark-foundation-hub%2F-%2F%40walmart%2Fallspark-foundation-hub-1.10.0-beta.4692.tgz" +"@walmart/allspark-foundation-hub@npm:1.10.0-beta.4694+4971e10e": + version: 1.10.0-beta.4694 + resolution: "@walmart/allspark-foundation-hub@npm:1.10.0-beta.4694::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fallspark-foundation-hub%2F-%2F%40walmart%2Fallspark-foundation-hub-1.10.0-beta.4694.tgz" peerDependencies: "@react-navigation/native": 6.x "@walmart/allspark-foundation": ">=6.27" @@ -5917,7 +5917,7 @@ __metadata: react: "*" react-native: "*" react-native-safe-area-context: 4.x - checksum: 10c0/2be44861629585f581c984a28a1674e8fed5204e8e5dc5466a118c8c2fcd0c76499a12057d4d8e41e244e71fce9700beb4a5f10721e552fd5ffd17cc8ce4f72f + checksum: 10c0/142b7e97752fc100131b1ef903ead8b3e20796fc1bef151a1897d25e2f712049c5a82fb5991d69d0c2e719221e1fe3173de05dc2250a32b207055cdd08d946c0 languageName: node linkType: hard @@ -6096,7 +6096,7 @@ __metadata: "@types/redux-mock-store": "npm:^1.0.2" "@walmart/allspark-authentication": "npm:6.4.1" "@walmart/allspark-foundation": "npm:^6.32.0" - "@walmart/allspark-foundation-hub": "npm:1.10.0-beta.4692+6a06c79e" + "@walmart/allspark-foundation-hub": "npm:1.10.0-beta.4694+4971e10e" "@walmart/allspark-graphql-client": "npm:6.3.29" "@walmart/allspark-http-client": "npm:6.3.29" "@walmart/allspark-utils": "npm:6.5.1"
feat(ui): update saved teams section
feat(ui): update saved teams section
b7780aafda1583ba1bf8e71be035bebb9ab51f02
--- __tests__/setup.ts @@ -33,7 +33,7 @@ jest.mock('react-native-reanimated', () => { jest.mock('@react-native-community/netinfo', () => mockRNCNetInfo); -jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper'); +// jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper'); jest.mock('@walmart/me-at-walmart-common', () => ({ ImpersonationFormContainer: { --- package.json @@ -96,7 +96,7 @@ "@walmart/react-native-sumo-sdk": "2.8.0", "@walmart/redux-store": "6.3.29", "@walmart/ui-components": "1.15.1", - "@walmart/wmconnect-mini-app": "2.36.2", + "@walmart/wmconnect-mini-app": "2.36.3", "babel-jest": "^29.6.3", "chance": "^1.1.11", "crypto-js": "~4.2.0", --- yarn.lock @@ -7067,7 +7067,7 @@ __metadata: "@walmart/react-native-sumo-sdk": "npm:2.8.0" "@walmart/redux-store": "npm:6.3.29" "@walmart/ui-components": "npm:1.15.1" - "@walmart/wmconnect-mini-app": "npm:2.36.2" + "@walmart/wmconnect-mini-app": "npm:2.36.3" babel-jest: "npm:^29.6.3" chance: "npm:^1.1.11" crypto-js: "npm:~4.2.0" @@ -7149,20 +7149,24 @@ __metadata: languageName: node linkType: hard -"@walmart/wmconnect-mini-app@npm:2.36.2": - version: 2.36.2 - resolution: "@walmart/wmconnect-mini-app@npm:2.36.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-2.36.2.tgz" +"@walmart/wmconnect-mini-app@npm:2.36.3": + version: 2.36.3 + resolution: "@walmart/wmconnect-mini-app@npm:2.36.3::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fwmconnect-mini-app%2F-%2F%40walmart%2Fwmconnect-mini-app-2.36.3.tgz" + dependencies: + expo: "npm:~52.0.46" + react: "npm:18.3.1" + react-native: "npm:0.76.9" peerDependencies: "@walmart/allspark-foundation": ">=6.32.0" - expo: ^51.0.0 - expo-image: ~1.13.0 + expo: ~52.0.46 + expo-image: ~2.0.7 react: "*" react-native: "*" react-native-wm-config: 0.1.1 dependenciesMeta: "@walmart/me-at-walmart": built: false - checksum: 10c0/d715fd08c3fcf74b3480896159cfb93b05e2100feac6c2e1773c66013015b1e515367c6fd30184c224edf6ccad5e22658a914e87d0403818cf0de011bd1dea47 + checksum: 10c0/7f40911ea24ce056af1c2a1c23d81cfd98fe4f6c839677a8ea1bc7ad9619db7f49f6e50a06a1dca762843557b5610fd08aea11e7739acfe8072377d98765c408 languageName: node linkType: hard
feat(ui): updating version and fixing tests
feat(ui): updating version and fixing tests
b784b01b5d068f08bf2b12a35ee0a00b0449b988
--- packages/allspark-foundation/src/Navigation/LinkingService.ts @@ -53,9 +53,9 @@ export class LinkingService { * Checks if screens are registered - if empty, sends undefined; if has at least 1, sends the actual options. * This prevents empty screens to be cached and returned after initialization. */ - public getStateFromPath = (path: string, options?: any) => { + public getStateFromPath = (path: string, _options?: any) => { //Since NavigationContainer doesn't re-render, the getStateFromPath needs to handle any enabling changes from here. - if(!this._linking.enabled) { + if (!this._linking.enabled) { return undefined; } const hasScreens = this._linking.config?.screens && Object.keys(this._linking.config.screens).length >= 1;
fix: lint fix for linking service
fix: lint fix for linking service
5e422c688ac7d6eb491c9972f5b103f75c2d319f
--- .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)&&!dualcore&&!MAC-LAB-MINI05) +node: ((osx||stable_osx)&&!dualcore) ## Global tools used across all flows. tools: @@ -38,7 +38,7 @@ envs: global: variables: CI: true - LOOPER_NODES: "((osx||stable_osx)&&!dualcore&&!MAC-LAB-MINI05)" + LOOPER_NODES: "((osx||stable_osx)&&!dualcore)" GITHUB_TOKEN: "%{credentials.secret('GITHUB_TOKEN')}" TMPDIR: /tmp
chore: revert looper configuration fixes
chore: revert looper configuration fixes
db47ea928d79373c3bb1055a8b8516e27266ce33
--- package-lock.json @@ -84,7 +84,7 @@ "@walmart/schedule-mini-app": "0.37.0", "@walmart/settings-mini-app": "1.19.1", "@walmart/shelfavailability-mini-app": "1.5.16", - "@walmart/taskit-mini-app": "2.47.3", + "@walmart/taskit-mini-app": "2.47.4", "@walmart/texting-mini-app": "2.0.29", "@walmart/time-clock-mini-app": "2.111.3", "@walmart/topstock-mini-app": "1.0.13", @@ -9142,9 +9142,9 @@ } }, "node_modules/@walmart/taskit-mini-app": { - "version": "2.47.3", - "resolved": "https://npme.walmart.com/@walmart/taskit-mini-app/-/taskit-mini-app-2.47.3.tgz", - "integrity": "sha512-LrbUehf++YXiDFxFYaIjaoFrELCueeVDH9ZRKtOiH5QTRSctJthTLfgPqf6zgywZ5BjTZR+OuuH4mvAAxtL+TQ==", + "version": "2.47.4", + "resolved": "https://npme.walmart.com/@walmart/taskit-mini-app/-/taskit-mini-app-2.47.4.tgz", + "integrity": "sha512-Sr9NGVIylnfhmgz14tDbO03hhdZqkv1TEuGWyr+rHt7qFi9q4g4KOYnNfcPsypjyIHKEMzDxZugz2Nq6Q0Tuew==", "peerDependencies": { "@terrylinla/react-native-sketch-canvas": "^0.8.0", "@types/lodash": ">=4.14.176", @@ -33828,9 +33828,9 @@ "version": "1.5.16" }, "@walmart/taskit-mini-app": { - "version": "2.47.3", - "resolved": "https://npme.walmart.com/@walmart/taskit-mini-app/-/taskit-mini-app-2.47.3.tgz", - "integrity": "sha512-LrbUehf++YXiDFxFYaIjaoFrELCueeVDH9ZRKtOiH5QTRSctJthTLfgPqf6zgywZ5BjTZR+OuuH4mvAAxtL+TQ==" + "version": "2.47.4", + "resolved": "https://npme.walmart.com/@walmart/taskit-mini-app/-/taskit-mini-app-2.47.4.tgz", + "integrity": "sha512-Sr9NGVIylnfhmgz14tDbO03hhdZqkv1TEuGWyr+rHt7qFi9q4g4KOYnNfcPsypjyIHKEMzDxZugz2Nq6Q0Tuew==" }, "@walmart/tcnumber": { "version": "2.3.3", --- package.json @@ -125,7 +125,7 @@ "@walmart/schedule-mini-app": "0.37.0", "@walmart/settings-mini-app": "1.19.1", "@walmart/shelfavailability-mini-app": "1.5.16", - "@walmart/taskit-mini-app": "2.47.3", + "@walmart/taskit-mini-app": "2.47.4", "@walmart/texting-mini-app": "2.0.29", "@walmart/time-clock-mini-app": "2.111.3", "@walmart/topstock-mini-app": "1.0.13",
chore: bump taskit@2.47.4
chore: bump taskit@2.47.4
1de8b57e7c544567a3a4c2f362ff48120856e427
--- packages/allspark-foundation/src/Redux/rootReducer.ts @@ -10,6 +10,7 @@ import { ILocaleAction, localeSlice } from '../Locale/redux'; import { ILocationAction, locationSlice } from '../Location/redux'; import { INetworkAction, networkSlice } from '../Network/redux'; import { INotificationAction, notificationSlice } from '../Notification/redux'; +import { permissionsSlice } from '../Permissions/redux'; import { ISiteAction, siteSlice } from '../Site/redux'; import { IUserAction, userSlice } from '../User/redux'; import { IVersionAction, versionsSlice } from '../Versions/redux'; @@ -29,6 +30,7 @@ export const AllsparkRootReducer = { [locationSlice.name]: locationSlice.reducer, [networkSlice.name]: networkSlice.reducer, [notificationSlice.name]: notificationSlice.reducer, + [permissionsSlice.name]: permissionsSlice.reducer, [siteSlice.name]: siteSlice.reducer, [userSlice.name]: userSlice.reducer, [versionsSlice.name]: versionsSlice.reducer,
fix: add permissions to root reducer
fix: add permissions to root reducer
7063e59895affbf50f5c776b2df6a92ea5c06681
--- package-lock.json @@ -79,7 +79,7 @@ "@walmart/react-native-shared-navigation": "1.0.2", "@walmart/react-native-store-map": "0.3.7", "@walmart/react-native-sumo-sdk": "2.6.1", - "@walmart/receipt-check-miniapp": "1.18.5", + "@walmart/receipt-check-miniapp": "1.18.6", "@walmart/redux-store": "3.7.0", "@walmart/returns-mini-app": "3.13.0", "@walmart/schedule-mini-app": "0.63.0", @@ -9564,9 +9564,9 @@ } }, "node_modules/@walmart/receipt-check-miniapp": { - "version": "1.18.5", - "resolved": "https://npme.walmart.com/@walmart/receipt-check-miniapp/-/receipt-check-miniapp-1.18.5.tgz", - "integrity": "sha512-6Ucoppilcl51HWa4YFpiHiQ3TxAZNu7g1c9UtPYoviRcmENpEQsB12mRsOa1ZVS7SBX0rF4LlNFlfHlkNKHghg==", + "version": "1.18.6", + "resolved": "https://npme.walmart.com/@walmart/receipt-check-miniapp/-/receipt-check-miniapp-1.18.6.tgz", + "integrity": "sha512-PIc3Y8QPdc4bzv9J77hb4kfu/lJ6ULSQGjER+1UAFZSUFSEgm/O9H645dGVvOA3RbLG2qVWMDyDkZMrSYdKGzg==", "hasInstallScript": true, "dependencies": { "@walmart/tcnumber": "^2.3.3", @@ -33499,9 +33499,9 @@ "integrity": "sha512-jGJ2GDvDka1L8scmqvU2puNj93TFRgpr61ef4XyFO+FPUIPhs4CUtxDAChg4XIHMjLcNkQOwpc2mtz4A01wJfg==" }, "@walmart/receipt-check-miniapp": { - "version": "1.18.5", - "resolved": "https://npme.walmart.com/@walmart/receipt-check-miniapp/-/receipt-check-miniapp-1.18.5.tgz", - "integrity": "sha512-6Ucoppilcl51HWa4YFpiHiQ3TxAZNu7g1c9UtPYoviRcmENpEQsB12mRsOa1ZVS7SBX0rF4LlNFlfHlkNKHghg==", + "version": "1.18.6", + "resolved": "https://npme.walmart.com/@walmart/receipt-check-miniapp/-/receipt-check-miniapp-1.18.6.tgz", + "integrity": "sha512-PIc3Y8QPdc4bzv9J77hb4kfu/lJ6ULSQGjER+1UAFZSUFSEgm/O9H645dGVvOA3RbLG2qVWMDyDkZMrSYdKGzg==", "requires": { "@walmart/tcnumber": "^2.3.3", "@xstate/react": "^3.0.1", --- package.json @@ -120,7 +120,7 @@ "@walmart/react-native-shared-navigation": "1.0.2", "@walmart/react-native-store-map": "0.3.7", "@walmart/react-native-sumo-sdk": "2.6.1", - "@walmart/receipt-check-miniapp": "1.18.5", + "@walmart/receipt-check-miniapp": "1.18.6", "@walmart/redux-store": "3.7.0", "@walmart/returns-mini-app": "3.13.0", "@walmart/schedule-mini-app": "0.63.0",
update to latest
update to latest
551e06624d0bee1fec4f8755245cdd2b7cb540ce
--- __tests__/__mocks__/@walmart/allspark-foundation.js @@ -54,6 +54,7 @@ module.exports = { createHttpClient: jest.fn().mockImplementation(() => ({...mockHttpClient})), createGraphQLClient: jest.fn(), createTranslations: jest.fn(), + createListeners: jest.fn(), createTranslationClient: jest.fn().mockImplementation(() => ({ useTranslation: jest.fn().mockReturnValue({ t: jest --- __tests__/config/foundationConfig.test.ts @@ -4,6 +4,7 @@ import {FEATURE_ID} from '../../src/common'; import rosterRedux from '../../src/redux'; import rosterScreens from '../../src/screens'; import rosterTranslations from '../../src/translations'; +import rosterListeners from '../../src/listeners'; import {rosterModals} from '../../src/modals'; beforeEach(() => { @@ -32,6 +33,10 @@ describe('foundationModuleConfig', () => { expect(foundationModuleConfig.tags).toEqual([FeatureTags.associate]); }); + it('should have the correct listeners', () => { + expect(foundationModuleConfig.listeners).toBe(rosterListeners); + }); + it('should have the correct modals', () => { expect(foundationModuleConfig.modals).toBe(rosterModals); }); --- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/roster-mini-app", - "version": "3.2.0-alpha.7", + "version": "3.2.0-alpha.8", "main": "dist/index.js", "files": [ "dist", --- src/config/foundationConfig.ts @@ -4,10 +4,12 @@ import rosterRedux from '../redux'; import rosterScreens from '../screens'; import rosterTranslations from '../translations'; import {rosterModals} from '../modals'; +import rosterListeners from '../listeners'; export const foundationModuleConfig = { name: FEATURE_ID, tags: [FeatureTags.associate], + listeners: rosterListeners, modals: rosterModals, screens: rosterScreens, redux: rosterRedux, --- src/listeners/index.ts @@ -0,0 +1,73 @@ +/** + * @fileoverview Listeners Module - Feature Event Listeners for Roster mini app + * + * This module defines and registers event listeners for the Roster mini app feature + * with the Allspark framework. It handles feature lifecycle events including connection + * and disconnection with related features. + * + * @architecture + * - **Feature Integration**: Manages connections with other Allspark features + * - **Lifecycle Management**: Handles feature connect/disconnect events + * - **Event Coordination**: Coordinates between different feature modules + * + * @lifecycle_events + * - **onConnect**: Fired when the feature is connected and ready + * - **onDisconnect**: Fired when the feature is being disconnected + * + * @integration_points + * - **Allspark Framework**: Integrates with core Allspark event system + * - **Feature Coordination**: Manages inter-feature communication + * + * @usage + * ```typescript + * // Listeners are automatically registered when this module is imported + * import listeners from './listeners'; + * + * // Feature events are handled automatically by the framework + * ``` + * + * @author MyTeam mini app + */ + +import {initializeRosterHub} from '../config/HubConfig'; +import {RosterFeature} from '../common/feature'; + +/** + * Feature event listeners for the Roster mini app + * + * This configuration defines the event listeners that handle feature lifecycle + * events for the Roster mini app. It manages connections with related + * features and ensures proper initialization and cleanup. + * + * @event_handlers + * - **onConnect**: Establishes connection with Roster feature + * - **onDisconnect**: Cleanly disconnects from Roster feature + * + * @example + * ```typescript + * // Event listeners are automatically registered and handle: + * // - Feature initialization and connection + * // - Inter-feature communication setup + * // - Cleanup and disconnection processes + * ``` + */ +export default RosterFeature.createListeners({ + feature: { + /** + * Handles feature connection event + * + * Called when the Roster mini app feature is connected + * and ready to interact with other features in the system. + */ + onConnect: () => { + initializeRosterHub(); + }, + /** + * Handles feature disconnection event + * + * Called when the Roster mini app feature is being + * disconnected and needs to clean up its connections. + */ + onDisconnect: () => {}, + }, +});
test(ui): update the tests
test(ui): update the tests
b61049e19717821c3c939ec1894b1a4e4b939778
--- package-lock.json @@ -52,9 +52,9 @@ "@walmart/gta-react-native-calendars": "0.0.16", "@walmart/gtp-shared-components": "2.0.4", "@walmart/impersonation-mini-app": "1.17.2", - "@walmart/ims-print-services-ui": "2.2.2", + "@walmart/ims-print-services-ui": "2.2.3", "@walmart/inbox-mini-app": "0.82.3", - "@walmart/iteminfo-mini-app": "7.2.1", + "@walmart/iteminfo-mini-app": "7.2.2", "@walmart/manager-approvals-miniapp": "0.2.1", "@walmart/me-field-mini-app": "1.3.0", "@walmart/metrics-mini-app": "0.9.61", @@ -5305,9 +5305,9 @@ } }, "node_modules/@walmart/ims-print-services-ui": { - "version": "2.2.2", - "resolved": "https://npme.walmart.com/@walmart/ims-print-services-ui/-/ims-print-services-ui-2.2.2.tgz", - "integrity": "sha512-L9Mqw+TfDvPwjwBopZZwRkBQRd7v7ysVM4loKDgbzuuXHLxtwJRhnLq3ZfF8ZwaQqP7Tqxp4gIjCgHxAipWxIA==", + "version": "2.2.3", + "resolved": "https://npme.walmart.com/@walmart/ims-print-services-ui/-/ims-print-services-ui-2.2.3.tgz", + "integrity": "sha512-6OETmP38kKWeWRHMPVuEXbO5U9f+/PEpQo5ebl1blucUc8XVeTFuAwES/vqT39574nzUAjrsQUEGab8sMp784Q==", "peerDependencies": { "@react-native-firebase/analytics": ">=10.5.1", "@react-native-firebase/app": ">=10.5.0", @@ -5348,9 +5348,9 @@ } }, "node_modules/@walmart/iteminfo-mini-app": { - "version": "7.2.1", - "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-7.2.1.tgz", - "integrity": "sha512-ueIY4qn71Sbh0g19rfv69IeqWbZqg9HIR6wui52woZbQ8/TQtJxpOJ4zx9IoCiwV0VRntC01TL3lSKthQXb9Wg==", + "version": "7.2.2", + "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-7.2.2.tgz", + "integrity": "sha512-9TXQLMuZhoLKo2UKcMQ38qkb2CoV+f4Vz7iids/hvM2mR8VQwb8sQZn55M+jrmw3kBaFGfE0Cb4mfGbu6nmaWQ==", "peerDependencies": { "@react-native-community/async-storage": ">=1.12.1", "@react-native-community/netinfo": ">=9.3.6", @@ -25276,9 +25276,9 @@ "integrity": "sha512-IDynuXjrS0zBA66Fq8ZAHj6xx4Hllx1cS8xLpDFvon/29MB84aO/pY2QKTXmldOP5/GbW+buGk89mtsQ6jYUJQ==" }, "@walmart/ims-print-services-ui": { - "version": "2.2.2", - "resolved": "https://npme.walmart.com/@walmart/ims-print-services-ui/-/ims-print-services-ui-2.2.2.tgz", - "integrity": "sha512-L9Mqw+TfDvPwjwBopZZwRkBQRd7v7ysVM4loKDgbzuuXHLxtwJRhnLq3ZfF8ZwaQqP7Tqxp4gIjCgHxAipWxIA==" + "version": "2.2.3", + "resolved": "https://npme.walmart.com/@walmart/ims-print-services-ui/-/ims-print-services-ui-2.2.3.tgz", + "integrity": "sha512-6OETmP38kKWeWRHMPVuEXbO5U9f+/PEpQo5ebl1blucUc8XVeTFuAwES/vqT39574nzUAjrsQUEGab8sMp784Q==" }, "@walmart/inbox-mini-app": { "version": "0.82.3", @@ -25290,9 +25290,9 @@ } }, "@walmart/iteminfo-mini-app": { - "version": "7.2.1", - "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-7.2.1.tgz", - "integrity": "sha512-ueIY4qn71Sbh0g19rfv69IeqWbZqg9HIR6wui52woZbQ8/TQtJxpOJ4zx9IoCiwV0VRntC01TL3lSKthQXb9Wg==" + "version": "7.2.2", + "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-7.2.2.tgz", + "integrity": "sha512-9TXQLMuZhoLKo2UKcMQ38qkb2CoV+f4Vz7iids/hvM2mR8VQwb8sQZn55M+jrmw3kBaFGfE0Cb4mfGbu6nmaWQ==" }, "@walmart/manager-approvals-miniapp": { "version": "0.2.1" --- package.json @@ -94,9 +94,9 @@ "@walmart/gta-react-native-calendars": "0.0.16", "@walmart/gtp-shared-components": "2.0.4", "@walmart/impersonation-mini-app": "1.17.2", - "@walmart/ims-print-services-ui": "2.2.2", + "@walmart/ims-print-services-ui": "2.2.3", "@walmart/inbox-mini-app": "0.82.3", - "@walmart/iteminfo-mini-app": "7.2.1", + "@walmart/iteminfo-mini-app": "7.2.2", "@walmart/manager-approvals-miniapp": "0.2.1", "@walmart/me-field-mini-app": "1.3.0", "@walmart/metrics-mini-app": "0.9.61",
upgrade print and iteminfo version for drop 11
upgrade print and iteminfo version for drop 11
39bbb79b95d265fadce4427d513c0940b510e10e
--- example/src/core/home.tsx @@ -9,64 +9,66 @@ import { AllsparkNavigationClient, useAllsparkDrawer, } from '@walmart/allspark-foundation/Navigation'; -import {TeamOnboardingScreen} from '@walmart/allspark-foundation/Components'; export function HomeScreen() { const dispatch = useDispatch(); const drawer = useAllsparkDrawer(); return ( - // <View style={{flex: 1, alignItems: 'center', justifyContent: 'center'}}> - // <Button - // variant="primary" - // UNSAFE_style={{marginBottom: 10}} - // onPress={() => dispatch(AuthActionCreators.SIGN_IN({} as any))}> - // Sign In (Redux) - // </Button> - // <Button - // variant="primary" - // UNSAFE_style={{marginBottom: 10}} - // onPress={() => AuthService.signIn({} as any)}> - // Sign In (Global) - // </Button> - // <Button - // variant="primary" - // UNSAFE_style={{marginBottom: 10}} - // onPress={() => (drawer.locked ? drawer.unlock() : drawer.lock())}> - // Toggle Lock Drawer - // </Button> - // <Button - // variant="primary" - // UNSAFE_style={{marginBottom: 10}} - // onPress={() => - // AllsparkNavigationClient.navigate('feature1.stack', { - // screen: 'nestedScreen1', - // }) - // }> - // Open Feature 1 - // </Button> - // <Button - // variant="primary" - // UNSAFE_style={{marginBottom: 10}} - // onPress={() => AllsparkNavigationClient.navigate('feature2.home')}> - // Open Feature 2 - // </Button> - // <Button - // variant="primary" - // UNSAFE_style={{marginBottom: 10}} - // onPress={() => - // AllsparkNotificationClient._EventManager.runEvent( - // 'onForegroundNotification', - // { - // data: {message: 'Hello!'}, - // }, - // ) - // }> - // Run onForegroundNotification Event - // </Button> - // </View> - <> - <TeamOnboardingScreen /> - </> + <View style={{flex: 1, alignItems: 'center', justifyContent: 'center'}}> + <Button + variant="primary" + UNSAFE_style={{marginBottom: 10}} + onPress={() => dispatch(AuthActionCreators.SIGN_IN({} as any))}> + Sign In (Redux) + </Button> + <Button + variant="primary" + UNSAFE_style={{marginBottom: 10}} + onPress={() => AuthService.signIn({} as any)}> + Sign In (Global) + </Button> + <Button + variant="primary" + UNSAFE_style={{marginBottom: 10}} + onPress={() => (drawer.locked ? drawer.unlock() : drawer.lock())}> + Toggle Lock Drawer + </Button> + <Button + variant="primary" + UNSAFE_style={{marginBottom: 10}} + onPress={() => + AllsparkNavigationClient.navigate('feature1.stack', { + screen: 'nestedScreen1', + }) + }> + Open Feature 1 + </Button> + <Button + variant="primary" + UNSAFE_style={{marginBottom: 10}} + onPress={() => AllsparkNavigationClient.navigate('feature2.home')}> + Open Feature 2 + </Button> + <Button + variant="primary" + UNSAFE_style={{marginBottom: 10}} + onPress={() => AllsparkNavigationClient.navigate('feature3.home')}> + Open Feature 3 + </Button> + <Button + variant="primary" + UNSAFE_style={{marginBottom: 10}} + onPress={() => + AllsparkNotificationClient._EventManager.runEvent( + 'onForegroundNotification', + { + data: {message: 'Hello!'}, + }, + ) + }> + Run onForegroundNotification Event + </Button> + </View> ); } --- example/src/feature3/constants.ts @@ -0,0 +1,2 @@ +export const FEATURE_ID = 'feature3' as const; +export const FEATURE_NAME = 'Feature 3' as const; --- example/src/feature3/environment.ts @@ -0,0 +1,10 @@ +import {InferEnvironmentFromMap} from '@walmart/allspark-foundation/Environment'; + +export const Feature3Environment = { + dev: {testing: true}, + prod: {testing: false}, +}; + +export type IFeature1Environment = InferEnvironmentFromMap< + typeof Feature3Environment +>; --- example/src/feature3/feature.ts @@ -0,0 +1,4 @@ +import {AllsparkFeature} from '@walmart/allspark-foundation'; +import {FEATURE_ID} from './constants'; + +export const Feature3 = new AllsparkFeature(FEATURE_ID); --- example/src/feature3/index.tsx @@ -0,0 +1,8 @@ +import {FEATURE_NAME} from './constants'; +import {Feature3} from './feature'; +import {Feature3Screens} from './screens'; + +export default Feature3.createModule({ + name: FEATURE_NAME, + screens: Feature3Screens, +}); --- example/src/feature3/screens/index.ts @@ -0,0 +1,5 @@ +import {TeamOnboardScreen} from './screen'; + +export const Feature3Screens = { + 'feature3.home': TeamOnboardScreen, +}; --- example/src/feature3/screens/screen.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import {Feature3} from '../feature'; +import {TeamOnboardingScreen} from '@walmart/allspark-foundation/Components'; + +export const TeamOnboardScreen = Feature3.createScreen( + () => { + return ( + <> + <TeamOnboardingScreen /> + </> + ); + }, + { + options: { + title: 'Feature 3 Home', + animationEnabled: false, + }, + }, +);
Adding onboarding screen to feature 3
Adding onboarding screen to feature 3
27cbdef6571f472ece0a8a85488ab3c63ca55536
--- targets/US/ios/Podfile.lock @@ -1929,7 +1929,7 @@ PODS: - React-Core - react-native-safe-area-context (4.10.8): - React-Core - - react-native-scanner-3.0 (0.8.2): + - react-native-scanner-3.0 (0.8.3): - Firebase/Analytics - React - ScanditBarcodeCapture (= 6.25.2) @@ -2847,7 +2847,7 @@ SPEC CHECKSUMS: react-native-pdf: 103940c90d62adfd259f63cca99c7c0c306b514c react-native-render-html: 984dfe2294163d04bf5fe25d7c9f122e60e05ebe react-native-safe-area-context: b7daa1a8df36095a032dff095a1ea8963cb48371 - react-native-scanner-3.0: cb097ec5234ea1c7713c9d5d74f323ee840e0dfb + react-native-scanner-3.0: 2cf72ac67890ea2d49096a34ea6998e44a8f1261 react-native-splash-screen: 4312f786b13a81b5169ef346d76d33bc0c6dc457 react-native-video: c26780b224543c62d5e1b2a7244a5cd1b50e8253 react-native-view-shot: 6b7ed61d77d88580fed10954d45fad0eb2d47688 @@ -2923,7 +2923,7 @@ SPEC CHECKSUMS: walmart-react-native-sumo-sdk: a6dc20c0ec3c8ab878886529a0e2fc22e747821c WebexSDK: d652713bd7ad5902e81918121912ba75a0056c3b wifi-store-locator: 501fca0a220c725ed93ab403635c0f246a8ce7e3 - Yoga: c716aea2ee01df6258550c7505fa61b248145ced + Yoga: 47d399a73c0c0caa9ff824e5c657eae31215bfee PODFILE CHECKSUM: 31fb4c0013ab60f6237bdb7e5793344753be6afe --- targets/US/package.json @@ -130,7 +130,7 @@ "@walmart/react-native-encrypted-storage": "~1.1.3", "@walmart/react-native-env": "~6.3.20", "@walmart/react-native-logger": "1.35.0", - "@walmart/react-native-scanner-3.0": "0.8.2", + "@walmart/react-native-scanner-3.0": "0.8.3", "@walmart/react-native-shared-navigation": "~6.3.20", "@walmart/react-native-store-map": "0.3.7", "@walmart/react-native-sumo-sdk": "2.7.0", --- yarn.lock @@ -7035,7 +7035,7 @@ __metadata: "@walmart/react-native-encrypted-storage": "npm:~1.1.3" "@walmart/react-native-env": "npm:~6.3.20" "@walmart/react-native-logger": "npm:1.35.0" - "@walmart/react-native-scanner-3.0": "npm:0.8.2" + "@walmart/react-native-scanner-3.0": "npm:0.8.3" "@walmart/react-native-shared-navigation": "npm:~6.3.20" "@walmart/react-native-store-map": "npm:0.3.7" "@walmart/react-native-sumo-sdk": "npm:2.7.0" @@ -7603,12 +7603,12 @@ __metadata: languageName: node linkType: hard -"@walmart/react-native-scanner-3.0@npm:0.8.2": - version: 0.8.2 - resolution: "@walmart/react-native-scanner-3.0@npm:0.8.2" +"@walmart/react-native-scanner-3.0@npm:0.8.3": + version: 0.8.3 + resolution: "@walmart/react-native-scanner-3.0@npm:0.8.3" peerDependencies: react-native: ">=0.47.1" - checksum: 10c0/d18b225cfacec354aac53be3225105662ff93e4779dc5c9545c9b7db942cfb9c3c1e734c0b85ac96d3947209171600fd8cb14e3133815b2bba37c05565dc23df + checksum: 10c0/1e02a32df8a67e797995cec47af428bc615597fec267107811a37a637def6b36b222bc8d55c6c46984895436334050e985f99f6ff7988c62f4ab1308cd6c2ced languageName: node linkType: hard
Defect fixes - Updated scanner version to 0.8.3
Defect fixes - Updated scanner version to 0.8.3
c20b7b3472b137330326b8092cdac627ca67140d
--- package-lock.json @@ -1,12 +1,12 @@ { "name": "@walmart/roster-mini-app", - "version": "1.1.1", + "version": "1.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@walmart/roster-mini-app", - "version": "1.1.1", + "version": "1.1.2", "hasInstallScript": true, "devDependencies": { "@babel/core": "^7.20.0", @@ -67,7 +67,7 @@ "@walmart/react-native-sumo-sdk": "2.6.0", "@walmart/redux-store": "3.7.0", "@walmart/ui-components": "1.15.1", - "@walmart/wmconnect-mini-app": "1.1.1", + "@walmart/wmconnect-mini-app": "1.1.2", "babel-jest": "^29.2.1", "chance": "^1.1.11", "eslint": "8.22.0", @@ -11836,9 +11836,9 @@ } }, "node_modules/@walmart/wmconnect-mini-app": { - "version": "1.1.1", - "resolved": "https://npme.walmart.com/@walmart/wmconnect-mini-app/-/wmconnect-mini-app-1.1.1.tgz", - "integrity": "sha512-r7Gkf2L57LcmDea/T9bQ2oWNsKnUFGQQzXT5MytFhf8eI47UmHtG9IfPODIMICz0ld+VvXLGiFLPNsaQ7JvA4Q==", + "version": "1.1.2", + "resolved": "https://npme.walmart.com/@walmart/wmconnect-mini-app/-/wmconnect-mini-app-1.1.2.tgz", + "integrity": "sha512-q1V0DbjEDZ3xdQqBPsgBC3Rddk2t+YqXb4X6Voceqq9aAhRK81igWVYGgoaq7V+oYFP2N1zjPdUVD9QQiYPb6w==", "dev": true, "hasInstallScript": true }, @@ -41047,9 +41047,9 @@ } }, "@walmart/wmconnect-mini-app": { - "version": "1.1.1", - "resolved": "https://npme.walmart.com/@walmart/wmconnect-mini-app/-/wmconnect-mini-app-1.1.1.tgz", - "integrity": "sha512-r7Gkf2L57LcmDea/T9bQ2oWNsKnUFGQQzXT5MytFhf8eI47UmHtG9IfPODIMICz0ld+VvXLGiFLPNsaQ7JvA4Q==", + "version": "1.1.2", + "resolved": "https://npme.walmart.com/@walmart/wmconnect-mini-app/-/wmconnect-mini-app-1.1.2.tgz", + "integrity": "sha512-q1V0DbjEDZ3xdQqBPsgBC3Rddk2t+YqXb4X6Voceqq9aAhRK81igWVYGgoaq7V+oYFP2N1zjPdUVD9QQiYPb6w==", "dev": true }, "@whatwg-node/events": { --- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/roster-mini-app", - "version": "1.1.1", + "version": "1.1.2", "private": false, "main": "dist/index.js", "files": [ @@ -90,7 +90,7 @@ "@walmart/react-native-sumo-sdk": "2.6.0", "@walmart/redux-store": "3.7.0", "@walmart/ui-components": "1.15.1", - "@walmart/wmconnect-mini-app": "1.1.1", + "@walmart/wmconnect-mini-app": "1.1.2", "babel-jest": "^29.2.1", "chance": "^1.1.11", "eslint": "8.22.0",
Update version
Update version
33f605d2461b66ee7bc0a4f53055dc679fd41bc3
--- packages/allspark-foundation/src/Redux/provider.tsx @@ -1,7 +1,7 @@ import React, { PropsWithChildren } from 'react'; import { Provider as ReduxProvider } from 'react-redux'; -import { AllsparkReduxStore } from './global'; import { RenderGuard } from '@walmart/allspark-utils'; +import { AllsparkReduxStore } from './global'; import { AllsparkReduxConfig } from './types'; /** --- packages/me-at-walmart-container/src/services/clock.ts @@ -3,6 +3,13 @@ import { ClockServiceCreator, } from '@walmart/allspark-foundation/Clock'; +/** + * This is a placeholder service. Currently clock status in managed by the + * time clock mini app. They dispatch actions from the legacy '@walmart/redux-store' + * library that now maps to the foundation redux store. + * + * Eventually, a service independent of the mini app will be created and implemented here. + */ export const MeAtWalmartClockService = ClockServiceCreator({ initialize: async () => true, fetch: async () => ({ clockStatus: ClockStatus.clockedIn, clockedIn: true }),
chore: comments and import order change
chore: comments and import order change
f21a317aacfd26a859f1e5a74f6140a274a6eb71
--- packages/allspark-foundation-hub/src/HubFeature/SupplyChain/Screens/EditSavedTeamModal/EditSavedTeamsModal.tsx @@ -16,7 +16,7 @@ import { AllTeamsSections } from './types'; import { UserSelectors } from '@walmart/allspark-foundation/User'; import { ManagerExperienceSelectors } from '../../Redux'; import { useUpsertSupplyChainAssociatePreference } from '../../Hooks'; - +import { AlertBanner } from '../../../Shared/Components'; export interface ModalProps { modal: { closeModal: () => void; @@ -43,6 +43,13 @@ export const EditSavedTeamsModal = ({ modal: { closeModal } }: any) => { ManagerExperienceSelectors.getAllSiteTeamsSections ); + const savedShifts = useSelector( + ManagerExperienceSelectors.getSavedSiteShifts + ); + + const isTeamPreferenceError = useSelector( + ManagerExperienceSelectors.getTeamUpsertError + ); const [selectedTeams, setSelectedTeams] = useState<string[]>(teamPreferenceData); @@ -127,12 +134,27 @@ export const EditSavedTeamsModal = ({ modal: { closeModal } }: any) => { ListFooterComponent={<View style={modalStyles.footerContainer} />} /> </ScrollView> - <ActionButtonGroup - primaryButtonLabel={t('editTeamsModal.button.save')} - secondaryButtonLabel={t('editTeamsModal.button.cancel')} - onPrimaryButtonPress={handleSaveButton} - onSecondaryButtonPress={closeModal} - /> + <View style={modalStyles.bottomContainer}> + <View style={modalStyles.alertContainer}> + {isTeamPreferenceError && ( + <AlertBanner + label={t('updateTeamsModal.upsertError.error')} + buttonLabel={t('updateTeamsModal.upsertError.buttonLable')} + onPressButton={() => { + upsertSupplyChainPreferences(savedShifts, selectedTeams); + }} + /> + )} + </View> + <View style={modalStyles.buttonGroupContainer}> + <ActionButtonGroup + primaryButtonLabel={t('editTeamsModal.button.save')} + secondaryButtonLabel={t('editTeamsModal.button.cancel')} + onPrimaryButtonPress={handleSaveButton} + onSecondaryButtonPress={closeModal} + /> + </View> + </View> </> ); }; --- packages/allspark-foundation-hub/src/HubFeature/SupplyChain/Screens/EditSavedTeamModal/styles.ts @@ -61,4 +61,19 @@ export const modalStyles = StyleSheet.create({ fontFamily: 'Bogle-Bold', }, footerContainer: { margin: 5 }, + bottomContainer: { + display: 'flex', + flexDirection: 'column', + justifyContent: 'center', + alignItems: 'center', + width: '100%', + backgroundColor: colors.white, + }, + alertContainer: { + width: '100%', + marginBottom: 16, + }, + buttonGroupContainer: { + width: '100%', + }, });
Adding error alert for editSavedTeams
Adding error alert for editSavedTeams
94c0c214c14f95553036a7c9260f19f0d07f1c6b
--- src/managerExperience/components/RosterWidget/RosterWidget.tsx @@ -2,7 +2,7 @@ import {useTranslation} from 'react-i18next'; import {ROSTER_I18N_NAMESPACE} from '../../../translations'; import React, {useCallback, useEffect, useMemo, useState} from 'react'; import {HubWidget} from '@walmart/allspark-foundation-hub/HubFeature'; -import {View} from 'react-native'; +import {Text, View} from 'react-native'; import {Body} from '@walmart/gtp-shared-components'; import {WidgetDataProps} from './types'; import { @@ -15,6 +15,7 @@ import {Associate, Team} from '../../../types'; import {useGetTeamsByStore} from '../../../hooks'; import {logger} from '../../../common/logger'; import {VerticalDivider} from './VerticalDivider'; +import {styles} from './styles'; export const RosterWidget = (props: WidgetDataProps) => { const {t} = useTranslation([ROSTER_I18N_NAMESPACE]); @@ -109,15 +110,15 @@ export const RosterWidget = (props: WidgetDataProps) => { const rosterWidgetContent = [ { value: state.clockedInCount, - subText: t('hubWidget.roster.clockedIn'), + subText: t('hubWidget.roster.content.clockedIn'), }, { value: state.tardyCount, - subText: t('hubWidget.roster.tardy'), + subText: t('hubWidget.roster.content.tardy'), }, { value: state.absentCount, - subText: t('hubWidget.roster.absent'), + subText: t('hubWidget.roster.content.absent'), }, ]; @@ -127,17 +128,24 @@ export const RosterWidget = (props: WidgetDataProps) => { iconName='AssociateIcon' moduleTitle={t('hubWidget.roster.title')} content={ - <View> - <Body> - {state.scheduledCount} {t('hubWidget.roster.title')} - </Body> - {rosterWidgetContent.map((rosterWidgetObj) => ( - <View> - <Body>{rosterWidgetObj.value}</Body> - <Body>{rosterWidgetObj.subText}</Body> - <VerticalDivider /> - </View> - ))} + <View style={styles.contentContainer}> + <View style={styles.scheduleInfoContainer}> + <Body weight='bold'>{state.scheduledCount}</Body> + <Body> {t('hubWidget.roster.content.scheduleInfo')}</Body> + </View> + <View style={styles.rosterStatusContainer}> + {rosterWidgetContent.map((rosterWidgetObj, index) => ( + <> + <View style={styles.widgetDataContainer}> + <Text style={styles.rosterStatusValue}> + {rosterWidgetObj.value} + </Text> + <Body>{rosterWidgetObj.subText}</Body> + </View> + {index < rosterWidgetContent.length - 1 && <VerticalDivider />} + </> + ))} + </View> <View /> </View> } --- src/managerExperience/components/RosterWidget/styles.ts @@ -2,11 +2,26 @@ import {colors} from '@walmart/gtp-shared-components'; import {StyleSheet} from 'react-native'; export const styles = StyleSheet.create({ + contentContainer: { + marginTop: 16, + }, + rosterStatusContainer: { + flexDirection: 'row', + }, + rosterStatusValue: { + fontSize: 24, + fontFamily: 'Bogle-Bold', + }, + scheduleInfoContainer: { + flexDirection: 'row', + marginBottom: 16, + }, + widgetDataContainer: { + flex: 1, + }, divider: { - height: 48, - width: 1, backgroundColor: colors.gray['20'], - alignSelf: 'center', - marginBottom: 24, + width: 1, + right: 16, }, });
feat(ui): add roster widget
feat(ui): add roster widget
6ee23aa7ac024d14113abc103b1588861d267c8e
--- graphql.yml @@ -36,18 +36,8 @@ applications: queryTemplate: 'packages/me-at-walmart-athena-queries/src/getLoggedInUser.graphql' tags: - 'v1' - - name: 'GetSupplyChainShifts' - hash: 'b0f8dbb33dfb79cf68890fa719d4a9a6a2ab8e851ea3a81708a31ac9078c988c' - queryTemplate: 'packages/me-at-walmart-athena-queries/src/getSupplyChainShifts.graphql' - tags: - - 'v1' - - name: 'getSupplyChainTeamPreference' - hash: '61253c3d4d8ab6db774a903969c2f63de9113f44c1947d52c3630dd38ce30839' - queryTemplate: 'packages/me-at-walmart-athena-queries/src/getSupplyChainTeamPreferenceQuery.graphql' - tags: - - 'v1' - name: 'GetSupplyChainTeamsByStore' - hash: '74bb80b3180028948952cb07a41ad7a621c0721110520631ee9d871f7a555b67' + hash: '628c21f19457c4deea7fd9d2dd15138c11da598add9f4f67441e0d7d9318c8d1' queryTemplate: 'packages/me-at-walmart-athena-queries/src/getSupplyChainTeamsByStore.graphql' tags: - 'v1' @@ -71,11 +61,6 @@ applications: queryTemplate: 'packages/me-at-walmart-athena-queries/src/updateManagerExperiencePreference.graphql' tags: - 'v1' - - name: 'upsertSupplyChainAssociatePreference' - hash: '39c45936c3b4d0020c6192b629c29860a30a5f2f70c5297c9e34dcffbaa0c7b0' - queryTemplate: 'packages/me-at-walmart-athena-queries/src/upsertSupplyChainAssociatePreference.graphql' - tags: - - 'v1' - name: 'prod' persistedQueries: - name: 'businessUnitByCountryAndNumber' @@ -88,11 +73,11 @@ applications: queryTemplate: 'packages/me-at-walmart-athena-queries/src/getAssociateById.graphql' tags: - 'v1' - - name: 'getAssociatePreferences' - hash: '38e0530d669fff42cb1dc8e5814369c40c33f6d6a77ed734e039948a0c06e8f4' - queryTemplate: 'packages/me-at-walmart-athena-queries/src/getAssociatePreference.graphql' - tags: - - 'v1' + # - name: "getAssociatePreferences" + # hash: "38e0530d669fff42cb1dc8e5814369c40c33f6d6a77ed734e039948a0c06e8f4" + # queryTemplate: "packages/me-at-walmart-athena-queries/src/getAssociatePreference.graphql" + # tags: + # - "v1" - name: 'getDailyRosterHome' hash: '3c492831585580bae535c3386ec48e90c2d1895450016f050653bd51ddf86c21' queryTemplate: 'packages/me-at-walmart-athena-queries/src/getDailyRosterHome.graphql' @@ -103,23 +88,28 @@ applications: queryTemplate: 'packages/me-at-walmart-athena-queries/src/getLoggedInUser.graphql' tags: - 'v1' + # - name: "GetSupplyChainTeamsByStore" + # hash: "628c21f19457c4deea7fd9d2dd15138c11da598add9f4f67441e0d7d9318c8d1" + # queryTemplate: "packages/me-at-walmart-athena-queries/src/getSupplyChainTeamsByStore.graphql" + # tags: + # - "v1" - name: 'getTeamByIdHome' hash: '6b4b876250309d85dd51831ace4595bd1764b3d41ef7fd65c08df03b4c4982e0' queryTemplate: 'packages/me-at-walmart-athena-queries/src/getTeamByIdHome.graphql' tags: - 'v1' - - name: 'GetTeamsByStore' - hash: 'e500ff0792181beb5a6281effd5b5324834295856eaaa4c2af8336f6643a0a44' - queryTemplate: 'packages/me-at-walmart-athena-queries/src/getTeamsbyStore.graphql' - tags: - - 'v1' + # - name: "GetTeamsByStore" + # hash: "e500ff0792181beb5a6281effd5b5324834295856eaaa4c2af8336f6643a0a44" + # queryTemplate: "packages/me-at-walmart-athena-queries/src/getTeamsbyStore.graphql" + # tags: + # - "v1" - name: 'upsertAssociatePreference' hash: '972c522c6ad0675f13587637cff2dd2ed46937a9878a48a66ad2bc2f7d51a036' queryTemplate: 'packages/me-at-walmart-athena-queries/src/updateAssociatePrivacyPreference.graphql' tags: - 'v1' - - name: 'upsertManagerExperiencePreference' - hash: 'bdf7ca7ba91a0c700df0b0dbd418064d98ef1c2818688e2a1c9e478d8cc3e1ca' - queryTemplate: 'packages/me-at-walmart-athena-queries/src/updateManagerExperiencePreference.graphql' - tags: - - 'v1' + # - name: "upsertManagerExperiencePreference" + # hash: "bdf7ca7ba91a0c700df0b0dbd418064d98ef1c2818688e2a1c9e478d8cc3e1ca" + # queryTemplate: "packages/me-at-walmart-athena-queries/src/updateManagerExperiencePreference.graphql" + # tags: + # - "v1"
feat(ui) reran codegen
feat(ui) reran codegen
52f4881942b9c0ab07d9af02d7d3897c164c5a70
--- .looper.yml @@ -23,4 +23,4 @@ flows: - (name Yarn Version) yarn --version - yarn install - yarn run lint - # - yarn run coverage + - yarn run coverage --- src/translations/en-US.ts @@ -1,6 +1,6 @@ export const enUS = { myTeams: { - title: 'My Teams', + title: 'My teams', }, roster: { title: 'Roster', --- src/translations/es-MX.ts @@ -1,6 +1,6 @@ export const esMX = { myTeams: { - title: 'Mis Equipos', + title: 'Mis equipos', }, roster: { title: 'Lista',
feat(ui): update the roster mini app
feat(ui): update the roster mini app
91b64ddf48c647fb01e2f7a509917b599c21360b
--- .looper.yml @@ -23,4 +23,4 @@ flows: - (name Yarn Version) yarn --version - yarn install - yarn run lint - # - yarn run coverage \ No newline at end of file + # - yarn run coverage
feat(ui): update myteam mini app version
feat(ui): update myteam mini app version
e0b54dc7c2fac801679d5fcc596b79fb482b08bf
--- package-lock.json @@ -5577,9 +5577,9 @@ "integrity": "sha512-kgl3PpMJiM1hqhpEfLMIEHBdq+e6mKLPZNT3fmJIgO3RZYV3xcCrO2gIacJL3j+nr8DuDdw/FzeCGzKdKurniw==" }, "@walmart/inbox-mini-app": { - "version": "0.69.0", - "resolved": "https://npme.walmart.com/@walmart/inbox-mini-app/-/inbox-mini-app-0.69.0.tgz", - "integrity": "sha512-uNm48lNJCeM1cz6Hn9d68IWomzr6I86jQ8W+bwlYfWvW/z5L6Svrxrs0tzDm1tqVvI/qyX4eHJ4TjCnCAoqZXw==", + "version": "0.70.0", + "resolved": "https://npme.walmart.com/@walmart/inbox-mini-app/-/inbox-mini-app-0.70.0.tgz", + "integrity": "sha512-txiJvNw3RjxksUxc1S0ijt9N7DunSBTOtAL+8R6l0O/tVMMH1rdDVTfirTdhcAbzKvwEYB6bplMjUFAkPmkJxA==", "requires": { "@walmart/walmart-fiscal-week": "^0.3.6" } --- package.json @@ -96,7 +96,7 @@ "@walmart/gtp-shared-components": "1.8.9", "@walmart/impersonation-mini-app": "1.2.0", "@walmart/ims-print-services-ui": "1.1.4", - "@walmart/inbox-mini-app": "0.69.0", + "@walmart/inbox-mini-app": "0.70.0", "@walmart/iteminfo-mini-app": "5.1.7", "@walmart/manager-approvals-miniapp": "0.1.1", "@walmart/me-field-mini-app": "1.1.30",
update inbox for data saver enable disable hook
update inbox for data saver enable disable hook
4517f4d8754db8f56d311b7b1d978e275ba09170
--- package-lock.json @@ -3471,9 +3471,9 @@ } }, "@walmart/push-to-talk-mini-app": { - "version": "0.5.36", - "resolved": "https://npme.walmart.com/@walmart/push-to-talk-mini-app/-/push-to-talk-mini-app-0.5.36.tgz", - "integrity": "sha512-3cUSGn87pjDUKzRaoFMOUTTpgGkYY0a29OqRaZ4YSTeTFJ0q5q7gJVigEg2WEUpLLYgCzAKC/XZcyihbraMufA==" + "version": "0.5.37", + "resolved": "https://npme.walmart.com/@walmart/push-to-talk-mini-app/-/push-to-talk-mini-app-0.5.37.tgz", + "integrity": "sha512-A67/TLeREAlUGETQzPBib7lc6zp4GSiHvFFI+vymAmDfWe+eguSXhQextY0kbWQz3YI1ijQ1nw7AoHzuf+kw4w==" }, "@walmart/react-native-collapsible": { "version": "1.5.3", --- package.json @@ -88,7 +88,7 @@ "@walmart/manager-approvals-miniapp": "0.0.51", "@walmart/metrics-mini-app": "0.4.11", "@walmart/moment-walmart": "1.0.4", - "@walmart/push-to-talk-mini-app": "0.5.36", + "@walmart/push-to-talk-mini-app": "0.5.37", "@walmart/react-native-env": "^0.2.0", "@walmart/react-native-logger": "^1.27.0", "@walmart/react-native-shared-navigation": "^0.4.0",
Ptt bug fix
Ptt bug fix
b83a853de0b7ae1a766f7f281e6c6a53b1b6d3ee
--- __tests__/auth/__snapshots__/ErrorScreenTest.tsx.snap @@ -9,26 +9,33 @@ exports[`ErrorScreen matches snapshot when dirty and no userId/siteId 1`] = ` } } > - <RCTScrollView - contentContainerStyle={ + <View + onLayout={[Function]} + style={ Object { - "flexGrow": 1, - "padding": 16, - "paddingTop": 24, + "flex": 1, + "flexDirection": "column", + "justifyContent": "center", } } > - <View> - <View - onLayout={[Function]} - > - <View - style={ - Object { - "bottom": 0, - } + <View + style={ + Object { + "bottom": 0, + } + } + > + <RCTScrollView + contentContainerStyle={ + Object { + "flexGrow": 1, + "padding": 16, + "paddingTop": 24, } - > + } + > + <View> <Subheader style={ Object { @@ -283,9 +290,9 @@ exports[`ErrorScreen matches snapshot when dirty and no userId/siteId 1`] = ` /> </View> </View> - </View> + </RCTScrollView> </View> - </RCTScrollView> + </View> <View style={ Array [ @@ -337,26 +344,33 @@ exports[`ErrorScreen renders default 1`] = ` } } > - <RCTScrollView - contentContainerStyle={ + <View + onLayout={[Function]} + style={ Object { - "flexGrow": 1, - "padding": 16, - "paddingTop": 24, + "flex": 1, + "flexDirection": "column", + "justifyContent": "center", } } > - <View> - <View - onLayout={[Function]} - > - <View - style={ - Object { - "bottom": 0, - } + <View + style={ + Object { + "bottom": 0, + } + } + > + <RCTScrollView + contentContainerStyle={ + Object { + "flexGrow": 1, + "padding": 16, + "paddingTop": 24, } - > + } + > + <View> <Subheader style={ Object { @@ -576,9 +590,9 @@ exports[`ErrorScreen renders default 1`] = ` /> </View> </View> - </View> + </RCTScrollView> </View> - </RCTScrollView> + </View> <View style={ Array [
update snapshot
update snapshot
fe6aae36fa92eca7345b252eb72837d4816c2ac8
--- core/src/termsOfUse/TermsOfUse.tsx @@ -38,7 +38,7 @@ const TermsOfUseSectionHeader = (props: { const hasNumberRegex = /\d+\./g; const hasNumber = hasNumberRegex.test(title); const headerProps = hasNumber - ? {size: 'medium' as BodySize, weight: '400'} + ? {size: 'medium' as BodySize, weight: '700'} : { size: 'large' as BodySize, weight: '700', --- core/src/termsOfUse/terms-of-use.ts @@ -12,19 +12,19 @@ export const TERMS_OF_USE_DATA: SectionListData< >[] = [ { title: - 'Me@Walmart Terms of Use for Walmart U.S. Associates \nDC-TDC-01-00-01', + 'MyWalmart Terms of Use for Walmart U.S. Associates \nDC-TDC-01-00-01', data: [], }, { title: 'Purpose', data: [ - 'The purpose of the Me@Walmart Terms of use is to establish general specifications for associates who are provided with usage access to the tools on a Walmart-owned device (“Company Device”), or on a personal smartphone device (“Personal Device”) through either enrollment in the BYOD program or downloading of the Me@Walmart mobile device Applications.', + 'The purpose of the MyWalmart Terms of use is to establish general specifications for associates who are provided with usage access to the tools on a Walmart-owned device (“Company Device”), or on a personal smartphone device (“Personal Device”) through either enrollment in the BYOD program or downloading of the MyWalmart mobile device Applications.', ], }, { title: 'Target Audience', data: [ - 'This policy applies to all associates who work for Walmart. “Walmart” means Walmart Inc., one of its subsidiary companies or any operating units in which Walmart Inc. has a majority or controlling interest (“Walmart”).', + 'This This Terms of use document applies to all associates who work for Walmart. “Walmart” means Walmart Inc., one of its subsidiary companies or any operating units in which Walmart Inc. has a majority or controlling interest (“Walmart”).', ], }, { @@ -34,6 +34,10 @@ export const TERMS_OF_USE_DATA: SectionListData< 'Your use of the Applications is also subject to all applicable Walmart policies, including, but not limited to, the Walmart Information Policy and Global Associate Technology Management and Usage Policy. We also expect you to act in a manner consistent with Walmart\'s Basic Beliefs: Respect for the Individual, Service to our Customers, Striving for Excellence, and Acting with Integrity. The Applications are designed and intended to present flexible means to access information for Walmart Associates. We encourage you to direct any complaints, concerns, ideas, or suggestions relating to your own work-related issues to a salaried member of management, by contacting the Global Ethics helpline, 1-800-WMETHIC (1-800-963-8442), or by using the "Open Door" process.', ], }, + { + title: 'Terms of Use', + data: [], + }, { title: '1. USE OF APPLICATION', data: [
Terms of use update for rebranding
Terms of use update for rebranding
4532d962079eb65c1f2238ddbbafcaedef9bb9ae
--- packages/allspark-foundation-hub/src/HubFeature/Hub/Container/Screens/HubDashboard.tsx @@ -16,7 +16,7 @@ import { AllsparkComponentContainers } from '@walmart/allspark-foundation/Compon import { HubDashboardProps } from './types'; import { isNil } from 'lodash'; import { ManagerExperienceCreators } from '../../../Redux'; -import { AllsparkNavigationClient } from '@walmart/allspark-foundation'; +import { AllsparkNavigationClient } from '@walmart/allspark-foundation/Navigation'; import BottomSheet from '../../../BottomSheet/BottomSheet'; import HubOnboardingImage from '../../../BottomSheet/HubOnboardingImage/OnboardingImage'; --- packages/allspark-foundation-hub/src/HubFeature/Onboarding/TeamSelection/Component/TeamSelectionList.tsx @@ -15,7 +15,7 @@ import { useDispatch, useSelector } from 'react-redux'; import { SelectionBannerFooterButtons } from './SelectionBannerFooterButtons'; import { useUpsertManagerExperiencePreferenceMutation } from '@walmart/me-at-walmart-athena-queries'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { AllsparkNavigationClient } from '@walmart/allspark-foundation'; +import { AllsparkNavigationClient } from '@walmart/allspark-foundation/Navigation'; import { LoggerService } from '@walmart/allspark-foundation/Logger'; import { useTelemetryService } from '@walmart/allspark-foundation/Telemetry'; import { useAllsparkTranslation } from '@walmart/allspark-foundation/Translation';
feat(ui): test changes
feat(ui): test changes
2caed4d9064594d8608960220ac122490055ffda
--- core/__tests__/navigation/USHallway/AssociateHallwayNav/__snapshots__/MainStackNavTest.tsx.snap @@ -682,6 +682,7 @@ exports[`AssociateHallwayNav matches snapshot; handles mount and unmount effects name="Impersonation" /> ManagerApprovalScreens + TranslatorScreens </Navigator> `; @@ -1367,5 +1368,6 @@ exports[`AssociateHallwayNav matches snapshot; handles mount and unmount effects name="Impersonation" /> ManagerApprovalScreens + TranslatorScreens </Navigator> `;
update snapshot
update snapshot
84fa5c3c45c9ddebdd7ac856d3778b02e6cb3ac0
--- src/screens/RosterDetailScreen/SupplyChainRosterDetailScreen.tsx @@ -108,8 +108,8 @@ export const SupplyChainRosterDetailScreen = ({ const showRoster = useSelector(displayRoster); const showSearchInput = useSelector(displaySearchInput); const showTeamHub: boolean = useSelector(showManagerTeamsHub); - const isSalariedOrLead = - showTeamHub && (isTeamLead || isSalaried || isPeopleLead || isHomeOffice); + const isSalariedOrLead = false; + // showTeamHub && (isTeamLead || isSalaried || isPeopleLead || isHomeOffice); const defaultTeamLabel = isSalariedOrLead ? selectedTeamPreference : initialTeamName; @@ -257,6 +257,9 @@ export const SupplyChainRosterDetailScreen = ({ }; } else { let scheduledCount = 0; + let clockedInCount = 0; + let absentCount = 0; + let tardyCount = 0; allTeams?.forEach((teamData: Team) => { if (teamState.teamIds?.includes(teamData?.teamId as string)) { scheduledCount = @@ -477,16 +480,18 @@ export const SupplyChainRosterDetailScreen = ({ <> <WarningBanner /> {isSalariedOrLead ? ( - <TeamShiftSwitcher - onTeamChange={(teamData, teamLabel, teamIds) => { - setTeamState({ - teamData: teamData, - teamLabel: teamLabel, - teamIds: teamIds, - }); - }} - refreshing={state.refreshing} - /> + <View style={styles.switcherContainer}> + <TeamShiftSwitcher + onTeamChange={(teamData, teamLabel, teamIds) => { + setTeamState({ + teamData: teamData, + teamLabel: teamLabel, + teamIds: teamIds, + }); + }} + refreshing={state.refreshing} + /> + </View> ) : ( <RosterDetailPageHeader header={headerAndSubtext.header} --- src/screens/RosterDetailScreen/styles.tsx @@ -32,4 +32,8 @@ export const rosterDetailScreenStyles = StyleSheet.create({ error: { margin: 16, }, + switcherContainer: { + backgroundColor: colors.blue[100], + minHeight: 70, + }, });
feat(ui): added view for switcher
feat(ui): added view for switcher
30410a9c352d236a6f30b613e028f74ecbd790ea
--- package-lock.json @@ -45,7 +45,7 @@ "@walmart/counts-component-miniapp": "0.1.2", "@walmart/emergency-mini-app": "1.19.0", "@walmart/exception-mini-app": "1.0.16", - "@walmart/facilities-management-miniapp": "0.5.26", + "@walmart/facilities-management-miniapp": "0.5.36", "@walmart/feedback-all-spark-miniapp": "0.9.10", "@walmart/financial-wellbeing-feature-app": "1.1.2", "@walmart/functional-components": "2.0.6", @@ -4948,9 +4948,9 @@ } }, "node_modules/@walmart/facilities-management-miniapp": { - "version": "0.5.26", - "resolved": "https://npme.walmart.com/@walmart/facilities-management-miniapp/-/facilities-management-miniapp-0.5.26.tgz", - "integrity": "sha512-0JMTSSuNBAS9CtUd+ydc2Z5X++w6jlW3GEIwLqxHBwn35mPy4SA9eMx1CfdaYC49RNX/BQ4gVWJGNGfnnx6Mfw==", + "version": "0.5.36", + "resolved": "https://npme.walmart.com/@walmart/facilities-management-miniapp/-/facilities-management-miniapp-0.5.36.tgz", + "integrity": "sha512-p5m5YmsrIZn116EQH+LCicHndhru5mmx0T435XnOsaaCD77Fc3U7/K8jgP/KQkbtmG/EmjhBHFkr0dCIh18V0w==", "hasInstallScript": true, "peerDependencies": { "@react-native-community/async-storage": "^1.12.1", @@ -25014,9 +25014,9 @@ "integrity": "sha512-mzesUeNPUwAWFUrFs6104aZ3NCM5eXa2uD8TrjL+BV+ZVgYG/A58k1xUUxNayw26w7Z41J7m4bxA9ctgNiNVMQ==" }, "@walmart/facilities-management-miniapp": { - "version": "0.5.26", - "resolved": "https://npme.walmart.com/@walmart/facilities-management-miniapp/-/facilities-management-miniapp-0.5.26.tgz", - "integrity": "sha512-0JMTSSuNBAS9CtUd+ydc2Z5X++w6jlW3GEIwLqxHBwn35mPy4SA9eMx1CfdaYC49RNX/BQ4gVWJGNGfnnx6Mfw==" + "version": "0.5.36", + "resolved": "https://npme.walmart.com/@walmart/facilities-management-miniapp/-/facilities-management-miniapp-0.5.36.tgz", + "integrity": "sha512-p5m5YmsrIZn116EQH+LCicHndhru5mmx0T435XnOsaaCD77Fc3U7/K8jgP/KQkbtmG/EmjhBHFkr0dCIh18V0w==" }, "@walmart/feedback-all-spark-miniapp": { "version": "0.9.10", --- package.json @@ -87,7 +87,7 @@ "@walmart/counts-component-miniapp": "0.1.2", "@walmart/emergency-mini-app": "1.19.0", "@walmart/exception-mini-app": "1.0.16", - "@walmart/facilities-management-miniapp": "0.5.26", + "@walmart/facilities-management-miniapp": "0.5.36", "@walmart/feedback-all-spark-miniapp": "0.9.10", "@walmart/financial-wellbeing-feature-app": "1.1.2", "@walmart/functional-components": "2.0.6",
feature/FixIT-Drop9-bugfix
feature/FixIT-Drop9-bugfix
91f23f71b634284ef9eb546ed2d8871d48e5a443
--- packages/core-services-allspark/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.10.17](https://gecgithub01.walmart.com/allspark/allspark-core-services/compare/@walmart/core-services-allspark@2.10.16...@walmart/core-services-allspark@2.10.17) (2023-06-20) + + +### Bug Fixes + +* **httpClient:** add telemtery and signout reason code in action ([223f868](https://gecgithub01.walmart.com/allspark/allspark-core-services/commit/223f868357b32141e3289a94f64ae853a5322f12)) + + + + + ## [2.10.16](https://gecgithub01.walmart.com/allspark/allspark-core-services/compare/@walmart/core-services-allspark@2.10.15...@walmart/core-services-allspark@2.10.16) (2023-06-13) --- packages/core-services-allspark/package-lock.json @@ -1,6 +1,6 @@ { "name": "@walmart/core-services-allspark", - "version": "2.10.16", + "version": "2.10.17", "lockfileVersion": 1, "requires": true, "packages": { --- packages/core-services-allspark/package.json @@ -1,6 +1,6 @@ { "name": "@walmart/core-services-allspark", - "version": "2.10.16", + "version": "2.10.17", "description": "", "main": "lib/index.js", "types": "lib/index.d.ts",
chore(version): updating package version
chore(version): updating package version - @walmart/core-services-allspark@2.10.17
cdc8f0bb4e16144904d62753108e1f5a36459400
--- packages/allspark-foundation/__tests__/Notification/client.test.ts @@ -1,21 +1,35 @@ -import { - NotificationClient, - AllsparkNotificationClient, -} from '../../src/Notification/client'; +import { NotificationClient } from '../../src/Notification/client'; import { AllsparkReduxStore } from '../../src/Redux'; -import { retry } from '@walmart/allspark-utils'; import Sumo from '@walmart/react-native-sumo-sdk'; import { NotificationActionCreators } from '../../src/Notification/redux'; import { AllsparkNotificationConfig } from '../../src/Notification/types'; import { AllsparkPermissionClient } from '../../src/Permissions'; import { ALL_EVENTS_PAUSED_MAP } from '../../src/Notification/constants'; -jest.mock('../../src/Redux'); -jest.mock('@walmart/allspark-utils'); -jest.mock('../../src/Permissions'); +const mockRetry = jest.fn(); +jest.mock('@walmart/allspark-utils', () => { + return { + __esModule: true, + ...jest.requireActual('@walmart/allspark-utils'), + retry: mockRetry, + }; +}); + +const spySumoCharge = jest.spyOn(Sumo, 'charge'); +const spySumoRegister = jest.spyOn(Sumo, 'register'); +const mockDispatch = jest.fn(); +const mockCheckNotifications = jest.fn(); +const mockRequestNotifications = jest.fn(); +jest.spyOn(AllsparkReduxStore, 'dispatch').mockImplementation(mockDispatch); +jest + .spyOn(AllsparkPermissionClient, 'checkNotifications') + .mockImplementation(mockCheckNotifications); +jest + .spyOn(AllsparkPermissionClient, 'requestNotifications') + .mockImplementation(mockRequestNotifications); describe('NotificationClient', () => { - let client; + let client: NotificationClient; const mockProfile = { userId: '123', someData: 'data' }; beforeEach(() => { @@ -23,17 +37,17 @@ describe('NotificationClient', () => { jest.clearAllMocks(); }); it('initialize the client', async () => { - Sumo.charge.mockResolvedValue(true); + spySumoCharge.mockResolvedValueOnce(true); const options = { someOption: true }; const result = await client.initialize(options); expect(result).toBe(true); - expect(AllsparkReduxStore.dispatch).toHaveBeenCalledWith({ + expect(mockDispatch).toHaveBeenCalledWith({ type: 'notification/INIT_PROGRESS', payload: undefined, }); }); it('handle initialization errors and dispatch INIT_ERROR action', async () => { - Sumo.charge.mockRejectedValue(new Error('Initialization error')); + spySumoCharge.mockRejectedValue(new Error('Initialization error')); const options = { someOption: true }; const result = await client.initialize(options); expect(result).toBe(false); @@ -44,8 +58,8 @@ describe('NotificationClient', () => { }); it('should register a user and dispatch REGISTER_SUCCESS action', async () => { const mockProfile = { userId: '123', profileId: '456' }; - Sumo.register.mockResolvedValue(mockProfile); - retry.mockImplementation((options, fn) => fn()); + spySumoRegister.mockResolvedValue(mockProfile); + mockRetry.mockImplementation((options, fn) => fn()); const config = { user: { id: '123' }, enabled: true }; const profile = await client.register(config); expect(profile).toEqual({ @@ -59,8 +73,8 @@ describe('NotificationClient', () => { }); }); it('should handle registration errors and dispatch REGISTER_ERROR action', async () => { - Sumo.register.mockRejectedValue(new Error('Registration error')); - retry.mockImplementation((options, fn) => fn()); + spySumoRegister.mockRejectedValue(new Error('Registration error')); + mockRetry.mockImplementation((options, fn) => fn()); const config = { user: { id: '123' }, enabled: true }; const profile = await client.register(config); expect(profile).toBeNull(); @@ -174,11 +188,9 @@ describe('NotificationClient', () => { }); it('call checkNotifications and UPDATE_PERMISSION and return the permission', async () => { const mockPermission = { status: 'granted' }; - ( - AllsparkPermissionClient.checkNotifications as jest.Mock - ).mockResolvedValueOnce(mockPermission); + mockCheckNotifications.mockResolvedValueOnce(mockPermission); const result = await client.checkPermission(); - expect(AllsparkPermissionClient.checkNotifications).toHaveBeenCalled(); + expect(mockCheckNotifications).toHaveBeenCalled(); expect(AllsparkReduxStore.dispatch).toHaveBeenCalledWith( NotificationActionCreators.UPDATE_PERMISSION(mockPermission) ); @@ -187,13 +199,9 @@ describe('NotificationClient', () => { it('call requestNotifications with the correct parameters', async () => { const mockParams = ['param1', 'param2']; const mockPermission = { status: 'granted' }; - ( - AllsparkPermissionClient.requestNotifications as jest.Mock - ).mockResolvedValueOnce(mockPermission); + mockRequestNotifications.mockResolvedValueOnce(mockPermission); const result = await client.requestPermission(...mockParams); - expect(AllsparkPermissionClient.requestNotifications).toHaveBeenCalledWith( - ...mockParams - ); + expect(mockRequestNotifications).toHaveBeenCalledWith(...mockParams); expect(AllsparkReduxStore.dispatch).toHaveBeenCalledWith( NotificationActionCreators.UPDATE_PERMISSION(mockPermission) ); @@ -262,5 +270,5 @@ describe('NotificationClient', () => { client['_EventManager'].addListener = handlerMock; client.addListener('onForegroundNotification', handlerMock, {id: 'test-id'}); expect(client['_EventManager'].addListener).toHaveBeenCalledWith('onForegroundNotification', handlerMock, {id: 'test-id'}); - }) + }); });
fix: breaking notification client test cases
fix: breaking notification client test cases
2e286ad4ddb60b6b9d24fc4bf5c49bdf2a0a4198
--- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/myteam-mini-app", - "version": "1.15.1-alpha.12", + "version": "1.15.1-alpha.13", "main": "dist/index.js", "files": [ "dist" @@ -99,7 +99,7 @@ "@walmart/react-native-shared-navigation": "6.1.4", "@walmart/react-native-sumo-sdk": "2.6.0", "@walmart/redux-store": "3.7.0", - "@walmart/roster-mini-app": "2.12.1-alpha.12", + "@walmart/roster-mini-app": "2.12.1-alpha.14", "@walmart/ui-components": "1.15.1", "@walmart/wmconnect-mini-app": "2.8.0-alpha.11", "babel-jest": "^29.2.1", --- yarn.lock @@ -6424,7 +6424,7 @@ __metadata: "@walmart/react-native-shared-navigation": "npm:6.1.4" "@walmart/react-native-sumo-sdk": "npm:2.6.0" "@walmart/redux-store": "npm:3.7.0" - "@walmart/roster-mini-app": "npm:2.12.1-alpha.12" + "@walmart/roster-mini-app": "npm:2.12.1-alpha.14" "@walmart/ui-components": "npm:1.15.1" "@walmart/wmconnect-mini-app": "npm:2.8.0-alpha.11" babel-jest: "npm:^29.2.1" @@ -6606,9 +6606,9 @@ __metadata: languageName: node linkType: hard -"@walmart/roster-mini-app@npm:2.12.1-alpha.12": - version: 2.12.1-alpha.12 - resolution: "@walmart/roster-mini-app@npm:2.12.1-alpha.12" +"@walmart/roster-mini-app@npm:2.12.1-alpha.14": + version: 2.12.1-alpha.14 + resolution: "@walmart/roster-mini-app@npm:2.12.1-alpha.14" peerDependencies: "@react-native-async-storage/async-storage": ^1.21.0 "@react-native-community/netinfo": ^11.0.1 @@ -6650,7 +6650,7 @@ __metadata: redux: ^4.2.1 redux-saga: ^1.2.3 wifi-store-locator: 1.4.1 - checksum: 10c0/7ec7e041217076613726c21963714eb07343829554b8c1a8066ed9861eac92198d40fc21f0d4a08865e375a1ba76eaa268ae81d095ea1417ebf54e26934a002d + checksum: 10c0/50614ce8c72c8a4d457efbfe939860468c3f58e4146191f04eb7ed642686bdbeb146748198a7119715b30673fc0865ecdce3bd32f9a435e7699cc28998f343fd languageName: node linkType: hard
Update my team app version
Update my team app version
791b7725879eb3929b5e96a296d820564b827335
--- .looper-pr.yml @@ -11,7 +11,7 @@ flows: - (name Yarn Set Version) yarn set version 4.4.0 - (name Yarn Version) yarn --version - (name Yarn Install) yarn install - # - (name Test Coverage) yarn run coverage + - (name Test Coverage) yarn run coverage envs: @@ -20,9 +20,9 @@ envs: APP_NAME: myteam-miniapp STAGES_TO_RUN: LINT: true - UNITTEST: false + UNITTEST: true BUILD: true - SONAR_SCAN: false + SONAR_SCAN: true ARTIFACT_PUBLISH: true AUTO_PR_MONO: false JIRAPREFIX: SSMP --- .looper.yml @@ -23,4 +23,4 @@ flows: - (name Yarn Version) yarn --version - yarn install - yarn run lint - # - yarn run coverage + - yarn run coverage --- package.json @@ -99,9 +99,9 @@ "@walmart/react-native-shared-navigation": "6.1.4", "@walmart/react-native-sumo-sdk": "2.6.0", "@walmart/redux-store": "3.7.0", - "@walmart/roster-mini-app": "2.21.0", + "@walmart/roster-mini-app": "2.25.0", "@walmart/ui-components": "1.15.1", - "@walmart/wmconnect-mini-app": "2.16.0", + "@walmart/wmconnect-mini-app": "2.23.0", "babel-jest": "^29.2.1", "chance": "^1.1.11", "eslint": "8.22.0", --- yarn.lock @@ -6561,9 +6561,9 @@ __metadata: "@walmart/react-native-shared-navigation": "npm:6.1.4" "@walmart/react-native-sumo-sdk": "npm:2.6.0" "@walmart/redux-store": "npm:3.7.0" - "@walmart/roster-mini-app": "npm:2.21.0" + "@walmart/roster-mini-app": "npm:2.25.0" "@walmart/ui-components": "npm:1.15.1" - "@walmart/wmconnect-mini-app": "npm:2.16.0" + "@walmart/wmconnect-mini-app": "npm:2.23.0" babel-jest: "npm:^29.2.1" chance: "npm:^1.1.11" eslint: "npm:8.22.0" @@ -6745,9 +6745,9 @@ __metadata: languageName: node linkType: hard -"@walmart/roster-mini-app@npm:2.21.0": - version: 2.21.0 - resolution: "@walmart/roster-mini-app@npm:2.21.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Froster-mini-app%2F-%2Froster-mini-app-2.21.0.tgz" +"@walmart/roster-mini-app@npm:2.25.0": + version: 2.25.0 + resolution: "@walmart/roster-mini-app@npm:2.25.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Froster-mini-app%2F-%2Froster-mini-app-2.25.0.tgz" peerDependencies: "@react-native-async-storage/async-storage": ^1.21.0 "@react-native-community/netinfo": ^11.0.1 @@ -6789,7 +6789,7 @@ __metadata: redux: ^4.2.1 redux-saga: ^1.2.3 wifi-store-locator: 1.4.1 - checksum: 10c0/ab2ca78134754ba4d8d09f49e751835ab0aed93a8231bf3597d24d15a8652dedc98ab56d7cda3bfe5500e5aea7329d2856eead72a32878f4257cfae04df2ad1d + checksum: 10c0/a92a7d87138b90f0affcb987780b3da5347a5dde9bcf8a6d512a1668f02c57eab2774749b4eb79546cb349fb1a0a52c78102335dfa937944ac98c080488a6e39 languageName: node linkType: hard @@ -6813,9 +6813,9 @@ __metadata: languageName: node linkType: hard -"@walmart/wmconnect-mini-app@npm:2.16.0": - version: 2.16.0 - resolution: "@walmart/wmconnect-mini-app@npm:2.16.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fwmconnect-mini-app%2F-%2Fwmconnect-mini-app-2.16.0.tgz" +"@walmart/wmconnect-mini-app@npm:2.23.0": + version: 2.23.0 + resolution: "@walmart/wmconnect-mini-app@npm:2.23.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fwmconnect-mini-app%2F-%2F%40walmart%2Fwmconnect-mini-app-2.23.0.tgz" peerDependencies: "@react-native-async-storage/async-storage": ^1.21.0 "@react-native-community/netinfo": ^11.0.1 @@ -6855,7 +6855,7 @@ __metadata: redux: ^4.2.1 redux-saga: ^1.2.3 wifi-store-locator: 1.4.1 - checksum: 10c0/83cc6b52ede043873f51166919468fa9c011b0ef69c4f20555aead856a44323e6588d85dcfa2704c9a7c4eda4c993885513bfd6da282467ee9b286c467e09167 + checksum: 10c0/3fb21cc559b7cfcf47f6a55a3659bb6dc2087c0f6599170bca13892b7013280e6c61d9c981e0eec4f248bac17ac5fbd994f3fa70092d7c0600295b9a00d50dc5 languageName: node linkType: hard
feat(ui): update package js and looper for myteam
feat(ui): update package js and looper for myteam
610def5db9ed9384b1f5996b517cbec7d3be4e3c
--- container/i18nInit.ts @@ -1,30 +1,8 @@ import i18n from 'i18next'; import {initReactI18next} from 'react-i18next'; import 'intl-pluralrules' - -const enUS = { - languageName: 'English', - common: { - container: { - openAskSam: 'Open Ask Sam', - signOut: 'Sign Out', - - }, - languageName: 'English', - }, -}; - -const esMX = { - languageName: 'Espanol', - common: { - container: { - openAskSam: 'Abierto Ask Sam', - signOut: 'Desconectar', - - }, - languageName: 'Espanol', - }, -}; +import {enUS} from "../src/translations/en-US"; +import {esMX} from "../src/translations/es-MX"; export const initI18n = () => { i18n.use(initReactI18next).init({ --- container/index.tsx @@ -65,7 +65,7 @@ const LauncherView: React.FC<LauncherViewProps> = (props) => { <PrimaryButton onPress={onStartTexting}> Open Texting </PrimaryButton> - <SecondaryButton style={{marginHorizontal: 20}} onPress={toggleLanguage} >Toggle {t('languageName')}</SecondaryButton> + <SecondaryButton style={{marginHorizontal: 20}} onPress={toggleLanguage} >Language: {t('container.languageName')}</SecondaryButton> <SecondaryButton onPress={signOut}> Sign Out --- src/translations/en-US.ts @@ -1,5 +1,10 @@ export const enUS = { - roster: { - testMsg: 'english test', + common: { + container: { + languageName: 'English', + }, + roster: { + testMsg: 'english test', + }, }, }; --- src/translations/es-MX.ts @@ -1,5 +1,10 @@ export const esMX = { - roster: { - testMsg: 'spanish test', + common: { + container: { + languageName: 'Español', + }, + roster: { + testMsg: 'spanish examen', + }, }, }; --- container/i18nInit.ts @@ -1,30 +1,8 @@ import i18n from 'i18next'; import {initReactI18next} from 'react-i18next'; import 'intl-pluralrules' - -const enUS = { - languageName: 'English', - common: { - container: { - openAskSam: 'Open Ask Sam', - signOut: 'Sign Out', - - }, - languageName: 'English', - }, -}; - -const esMX = { - languageName: 'Espanol', - common: { - container: { - openAskSam: 'Abierto Ask Sam', - signOut: 'Desconectar', - - }, - languageName: 'Espanol', - }, -}; +import {enUS} from "../src/translations/en-US"; +import {esMX} from "../src/translations/es-MX"; export const initI18n = () => { i18n.use(initReactI18next).init({ --- container/index.tsx @@ -65,7 +65,7 @@ const LauncherView: React.FC<LauncherViewProps> = (props) => { <PrimaryButton onPress={onStartTexting}> Open Texting </PrimaryButton> - <SecondaryButton style={{marginHorizontal: 20}} onPress={toggleLanguage} >Toggle {t('languageName')}</SecondaryButton> + <SecondaryButton style={{marginHorizontal: 20}} onPress={toggleLanguage} >Language: {t('container.languageName')}</SecondaryButton> <SecondaryButton onPress={signOut}> Sign Out --- src/translations/en-US.ts @@ -1,5 +1,10 @@ export const enUS = { - roster: { - testMsg: 'english test', + common: { + container: { + languageName: 'English', + }, + roster: { + testMsg: 'english test', + }, }, }; --- src/translations/es-MX.ts @@ -1,5 +1,10 @@ export const esMX = { - roster: { - testMsg: 'spanish test', + common: { + container: { + languageName: 'Español', + }, + roster: { + testMsg: 'spanish examen', + }, }, };
adding working language toggle
adding working language toggle
994466c4008c49e38bdbda4fcd6e0f7f1333184a
--- __tests__/navigation/AssociateHallwayNav/SideMenuContentTest.tsx @@ -60,22 +60,12 @@ const clockState: ClockStatusState = { loaded: false, error: false, }; -// TODO: revert - same as develop branch + const navConfig = [ - { - menuType: 'SUBMENU', - icon: 'barcode', - title: 'menu.itemInfo', - enabled: true, - action: { - type: 'NAVIGATE', - value: 'itemInfo', - }, - }, { menuType: 'SUBMENU', icon: 'settings', - title: 'menu.settings', + title: 'Settings', enabled: true, action: { type: 'NAVIGATE', @@ -85,23 +75,13 @@ const navConfig = [ { menuType: 'SUBMENU', icon: 'feedback', - title: 'menu.feedback', + title: 'Give feedback', enabled: true, action: { type: 'NAVIGATE', value: 'Feedback', }, }, - { - menuType: 'SUBMENU', - icon: 'rocket', - title: 'menu.whatsNew', - enabled: true, - action: { - type: 'NAVIGATE', - value: 'WhatsNew', - }, - }, ]; const setShowDialog = jest.fn(); @@ -232,4 +212,4 @@ describe('SideMenuContent', () => { component.update(<SideMenuContent {...baseProps} />); expect(component.toJSON()).toMatchSnapshot(); }); -}); +}); \ No newline at end of file
remote config
remote config
4ce0fdbadb802e67422560fea1964766719d9909
--- package.json @@ -77,7 +77,7 @@ "@walmart/ims-print-services-ui": "0.0.19", "@walmart/inbox-mini-app": "0.0.94", "@walmart/iteminfo-mini-app": "1.0.4", - "@walmart/manager-approvals-miniapp": "0.0.25", + "@walmart/manager-approvals-miniapp": "0.0.32", "@walmart/moment-walmart": "1.0.4", "@walmart/push-to-talk-mini-app": "0.5.21", "@walmart/react-native-env": "^0.1.0",
updating MA miniapp to show side menu drawer on landing screen
updating MA miniapp to show side menu drawer on landing screen
e370d499668d2a9aec847e32ad3ab3e103da450c
--- package-lock.json @@ -58,13 +58,13 @@ "@walmart/gta-react-native-calendars": "0.0.16", "@walmart/gtp-shared-components": "2.0.6", "@walmart/impersonation-mini-app": "1.20.2", - "@walmart/ims-print-services-ui": "2.5.1", + "@walmart/ims-print-services-ui": "2.5.5", "@walmart/inbox-mini-app": "0.86.1", - "@walmart/iteminfo-mini-app": "7.5.3", + "@walmart/iteminfo-mini-app": "7.5.4", "@walmart/manager-approvals-miniapp": "0.2.4", "@walmart/me-field-mini-app": "13.0.3", "@walmart/metrics-mini-app": "0.13.11", - "@walmart/mod-flex-mini-app": "1.10.4", + "@walmart/mod-flex-mini-app": "1.11.2", "@walmart/moment-walmart": "1.0.4", "@walmart/onewalmart-miniapp": "1.0.16", "@walmart/pay-stub-miniapp": "0.9.35", @@ -7407,9 +7407,9 @@ } }, "node_modules/@walmart/ims-print-services-ui": { - "version": "2.5.1", - "resolved": "https://npme.walmart.com/@walmart/ims-print-services-ui/-/ims-print-services-ui-2.5.1.tgz", - "integrity": "sha512-od8axStfj5GPLFu05HRXBlh4g+kssKIrpuIc+MpsN/oigmLFwvrnJiXr0KMYtgFzN8zmro3J4rbc27In6D1R+w==", + "version": "2.5.5", + "resolved": "https://npme.walmart.com/@walmart/ims-print-services-ui/-/ims-print-services-ui-2.5.5.tgz", + "integrity": "sha512-rIOk7ml4n938wLkZs9OuQ4OziX48Ia3F+/2ApciSVFxGGet53ildFyLJnf10CcepUrKfvGRbdFj2IAmWcAb9HQ==", "peerDependencies": { "@react-native-firebase/analytics": ">=10.5.1", "@react-native-firebase/app": ">=10.5.0", @@ -7450,9 +7450,9 @@ } }, "node_modules/@walmart/iteminfo-mini-app": { - "version": "7.5.3", - "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-7.5.3.tgz", - "integrity": "sha512-/sUhvLMgex8x1xTlunFZqb9SHqxmgIAbu36wrEBnFueIWc58MIDHL5zTtHqqcPXFpIjC3Fj0CaECCSuptzexAw==", + "version": "7.5.4", + "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-7.5.4.tgz", + "integrity": "sha512-e3XHe0fvNvV4whcmDyO/pcOigvy0dgYdUY4BxEr7p9HefdSSNCGdF4kN6nL8ona2yO4n/De7VSIdmfIDqleSzg==", "peerDependencies": { "@react-native-community/netinfo": ">=9.3.6", "@react-native-firebase/analytics": ">=15.1.1", @@ -7661,9 +7661,9 @@ "license": "MIT" }, "node_modules/@walmart/mod-flex-mini-app": { - "version": "1.10.4", - "resolved": "https://npme.walmart.com/@walmart/mod-flex-mini-app/-/mod-flex-mini-app-1.10.4.tgz", - "integrity": "sha512-yOdC2yPvUYwG+75Ro33MrSDhFmy70fjO90ZjwDUwgBEREt++6u9wbwx0jhKQmJxu/Y1beZzTn/bTdHgvnYiW2g==", + "version": "1.11.2", + "resolved": "https://npme.walmart.com/@walmart/mod-flex-mini-app/-/mod-flex-mini-app-1.11.2.tgz", + "integrity": "sha512-duxLkjTIggqBkhe+qH+BAMbZMvNExfE52fqR26GpoISiVdyBtXAlmgxRmSQutRkI/fqk2V524Q5aqmGM11Af1g==", "hasInstallScript": true, "peerDependencies": { "@react-native-async-storage/async-storage": "^1.19.0", @@ -7675,7 +7675,7 @@ "@walmart/core-services-allspark": "^1.3.1", "@walmart/functional-components": "^2.0.2", "@walmart/gtp-shared-components": "^2.0.4", - "@walmart/ims-print-services-ui": "^2.2.3", + "@walmart/ims-print-services-ui": "^2.6.0", "@walmart/react-native-env": "^0.2.0", "@walmart/react-native-logger": "^1.31.0-rc.0", "@walmart/react-native-scanner-3.0": "^0.1.30-rc.1", @@ -30542,9 +30542,9 @@ "integrity": "sha512-Eubyowsouh6ZEZEfJ4je0i+GwZzSFc36p5q1JeUfjrkLWNt/lJZUnIZ1cNKnEHVqCR+y5HwJ9JuRiioWyJ5sfQ==" }, "@walmart/ims-print-services-ui": { - "version": "2.5.1", - "resolved": "https://npme.walmart.com/@walmart/ims-print-services-ui/-/ims-print-services-ui-2.5.1.tgz", - "integrity": "sha512-od8axStfj5GPLFu05HRXBlh4g+kssKIrpuIc+MpsN/oigmLFwvrnJiXr0KMYtgFzN8zmro3J4rbc27In6D1R+w==" + "version": "2.5.5", + "resolved": "https://npme.walmart.com/@walmart/ims-print-services-ui/-/ims-print-services-ui-2.5.5.tgz", + "integrity": "sha512-rIOk7ml4n938wLkZs9OuQ4OziX48Ia3F+/2ApciSVFxGGet53ildFyLJnf10CcepUrKfvGRbdFj2IAmWcAb9HQ==" }, "@walmart/inbox-mini-app": { "version": "0.86.1", @@ -30556,9 +30556,9 @@ } }, "@walmart/iteminfo-mini-app": { - "version": "7.5.3", - "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-7.5.3.tgz", - "integrity": "sha512-/sUhvLMgex8x1xTlunFZqb9SHqxmgIAbu36wrEBnFueIWc58MIDHL5zTtHqqcPXFpIjC3Fj0CaECCSuptzexAw==" + "version": "7.5.4", + "resolved": "https://npme.walmart.com/@walmart/iteminfo-mini-app/-/iteminfo-mini-app-7.5.4.tgz", + "integrity": "sha512-e3XHe0fvNvV4whcmDyO/pcOigvy0dgYdUY4BxEr7p9HefdSSNCGdF4kN6nL8ona2yO4n/De7VSIdmfIDqleSzg==" }, "@walmart/manager-approvals-miniapp": { "version": "0.2.4" @@ -30599,9 +30599,9 @@ } }, "@walmart/mod-flex-mini-app": { - "version": "1.10.4", - "resolved": "https://npme.walmart.com/@walmart/mod-flex-mini-app/-/mod-flex-mini-app-1.10.4.tgz", - "integrity": "sha512-yOdC2yPvUYwG+75Ro33MrSDhFmy70fjO90ZjwDUwgBEREt++6u9wbwx0jhKQmJxu/Y1beZzTn/bTdHgvnYiW2g==" + "version": "1.11.2", + "resolved": "https://npme.walmart.com/@walmart/mod-flex-mini-app/-/mod-flex-mini-app-1.11.2.tgz", + "integrity": "sha512-duxLkjTIggqBkhe+qH+BAMbZMvNExfE52fqR26GpoISiVdyBtXAlmgxRmSQutRkI/fqk2V524Q5aqmGM11Af1g==" }, "@walmart/moment-walmart": { "version": "1.0.4" --- package.json @@ -99,13 +99,13 @@ "@walmart/gta-react-native-calendars": "0.0.16", "@walmart/gtp-shared-components": "2.0.6", "@walmart/impersonation-mini-app": "1.20.2", - "@walmart/ims-print-services-ui": "2.5.1", + "@walmart/ims-print-services-ui": "2.5.5", "@walmart/inbox-mini-app": "0.86.1", - "@walmart/iteminfo-mini-app": "7.5.3", + "@walmart/iteminfo-mini-app": "7.5.4", "@walmart/manager-approvals-miniapp": "0.2.4", "@walmart/me-field-mini-app": "13.0.3", "@walmart/metrics-mini-app": "0.13.11", - "@walmart/mod-flex-mini-app": "1.10.4", + "@walmart/mod-flex-mini-app": "1.11.2", "@walmart/moment-walmart": "1.0.4", "@walmart/onewalmart-miniapp": "1.0.16", "@walmart/pay-stub-miniapp": "0.9.35",
bump up ItemInfo and Print version for drop 15
bump up ItemInfo and Print version for drop 15
ccd9ad69eb9d1c755174384f36bc80e302445860
--- android/app/build.gradle @@ -134,7 +134,7 @@ android { applicationId "com.walmart.stores.allspark.beta" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 53 + versionCode 54 versionName "1.0.4" } splits { --- ios/AllSpark/Info.plist @@ -34,7 +34,7 @@ </dict> </array> <key>CFBundleVersion</key> - <string>53</string> + <string>54</string> <key>LSApplicationQueriesSchemes</key> <array> <string>invmgmt</string> --- ios/AllSparkTests/Info.plist @@ -19,6 +19,6 @@ <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> - <string>53</string> + <string>54</string> </dict> </plist>
Incrementing build number
Incrementing build number
d8c47733df9624873276a853e5e7a81db50545f0
--- ios/Podfile.lock @@ -940,9 +940,9 @@ PODS: - gRPC-Core/Interface (= 1.44.0) - Libuv-gRPC (= 0.0.10) - gRPC-Core/Interface (1.44.0) - - hermes-engine (0.72.5): - - hermes-engine/Pre-built (= 0.72.5) - - hermes-engine/Pre-built (0.72.5) + - hermes-engine (0.72.6): + - hermes-engine/Pre-built (= 0.72.6) + - hermes-engine/Pre-built (0.72.6) - JWT (3.0.0-beta.14): - Base64 (~> 1.1.2) - leveldb-library (1.22.2) @@ -2092,7 +2092,7 @@ SPEC CHECKSUMS: GoogleUtilities: 202e7a9f5128accd11160fb9c19612de1911aa19 "gRPC-C++": 9675f953ace2b3de7c506039d77be1f2e77a8db2 gRPC-Core: 943e491cb0d45598b0b0eb9e910c88080369290b - hermes-engine: f6cf92a471053245614d9d8097736f6337d5b86c + hermes-engine: 8057e75cfc1437b178ac86c8654b24e7fead7f60 JWT: ef71dfb03e1f842081e64dc42eef0e164f35d251 leveldb-library: f03246171cce0484482ec291f88b6d563699ee06 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
herems upgrade.
herems upgrade.
890178d381664ec017fced6b9e88df0699971f87
--- core/__tests__/permissions/PermissionsSagaTest.ts @@ -136,12 +136,12 @@ describe('getPermissionsUnset', () => { expect(generator.next(true).done).toBeTruthy(); }); - it('returns notificationsUnset if locationUnset is undefined', () => { + it('returns notificationsUnset if locationUnset is false', () => { const generator = getPermissionsUnset(); expect(generator.next().value).toEqual( select(getLocationUnset), ); - expect(generator.next().value).toEqual( + expect(generator.next(false).value).toEqual( select(NotificationSelectors.getPermissionUnset), ); expect(generator.next(true).done).toBeTruthy();
code cleanup
code cleanup
da02c08cbac02a9bbedf5490483de6b81c1a4988
--- ios/Podfile.lock @@ -263,7 +263,7 @@ PODS: - Permission-Notifications (3.6.1): - RNPermissions - PromisesObjC (2.1.1) - - PTT (1.8.3): + - PTT (1.8.6): - BinaryCodable (~> 0.2.1) - CocoaAsyncSocket (~> 7.6.3) - RealmSwift (= 10.32.3) @@ -530,8 +530,8 @@ PODS: - React-Core - react-native-pdf (6.6.2): - React-Core - - react-native-ptt-module (1.8.12): - - PTT (= 1.8.3) + - react-native-ptt-module (1.8.14): + - PTT (= 1.8.6) - React - react-native-render-html (6.3.4): - React-Core @@ -1187,7 +1187,7 @@ SPEC CHECKSUMS: Permission-LocationWhenInUse: 3ba99e45c852763f730eabecec2870c2382b7bd4 Permission-Notifications: 150484ae586eb9be4e32217582a78350a9bb31c3 PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb - PTT: ea5f9187d0be3094633434cbed7e227f50a7a061 + PTT: fa3706ddb417a5f3226f1c5fd86cd8764830a55f RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda RCTRequired: 21229f84411088e5d8538f21212de49e46cc83e2 RCTTypeSafety: 62eed57a32924b09edaaf170a548d1fc96223086 @@ -1220,7 +1220,7 @@ SPEC CHECKSUMS: react-native-netinfo: f80db8cac2151405633324cb645c60af098ee461 react-native-pager-view: 592421df0259bf7a7a4fe85b74c24f3f39905605 react-native-pdf: 33c622cbdf776a649929e8b9d1ce2d313347c4fa - react-native-ptt-module: aa0e823fe255aa402af72b48a0ad825e51ad80df + react-native-ptt-module: 54c1b622dacbdafab12a37b5f298f3919336e3e3 react-native-render-html: 984dfe2294163d04bf5fe25d7c9f122e60e05ebe react-native-safe-area-context: 6c12e3859b6f27b25de4fee8201cfb858432d8de react-native-scanner-3.0: e144733a1c98596d7cd53c3d6384785273b81aab --- package-lock.json @@ -136,7 +136,7 @@ "react-native-pdf": "^6.6.2", "react-native-permissions": "3.6.1", "react-native-popup-menu": "^0.16.0", - "react-native-ptt-module": "1.8.12", + "react-native-ptt-module": "1.8.14", "react-native-qrcode-svg": "^6.1.2", "react-native-reanimated": "2.12.0", "react-native-render-html": "^6.3.4", @@ -17938,9 +17938,9 @@ "license": "ISC" }, "node_modules/react-native-ptt-module": { - "version": "1.8.12", - "resolved": "https://npme.walmart.com/react-native-ptt-module/-/react-native-ptt-module-1.8.12.tgz", - "integrity": "sha512-cXh1sIEN0mruSXC9T8jat8cjNzK0/N2JnBvTuCuVhcskFgyVDu9CdLe861mZqdzrQnsYhOUilaBR+v0w1HvcEw==", + "version": "1.8.14", + "resolved": "https://npme.walmart.com/react-native-ptt-module/-/react-native-ptt-module-1.8.14.tgz", + "integrity": "sha512-mgaHecsw3L24aSWtZXAKwtDOnZzSatpLGjmYnN/30ejg2A9+ZtPsYyVdTZHpn150nnfQ6uKVW4uxi+iWcSFSUA==", "license": "MIT" }, "node_modules/react-native-qrcode-svg": { @@ -33092,9 +33092,9 @@ "version": "0.16.1" }, "react-native-ptt-module": { - "version": "1.8.12", - "resolved": "https://npme.walmart.com/react-native-ptt-module/-/react-native-ptt-module-1.8.12.tgz", - "integrity": "sha512-cXh1sIEN0mruSXC9T8jat8cjNzK0/N2JnBvTuCuVhcskFgyVDu9CdLe861mZqdzrQnsYhOUilaBR+v0w1HvcEw==" + "version": "1.8.14", + "resolved": "https://npme.walmart.com/react-native-ptt-module/-/react-native-ptt-module-1.8.14.tgz", + "integrity": "sha512-mgaHecsw3L24aSWtZXAKwtDOnZzSatpLGjmYnN/30ejg2A9+ZtPsYyVdTZHpn150nnfQ6uKVW4uxi+iWcSFSUA==" }, "react-native-qrcode-svg": { "version": "6.1.2", --- package.json @@ -178,7 +178,7 @@ "react-native-pdf": "^6.6.2", "react-native-permissions": "3.6.1", "react-native-popup-menu": "^0.16.0", - "react-native-ptt-module": "1.8.12", + "react-native-ptt-module": "1.8.14", "react-native-qrcode-svg": "^6.1.2", "react-native-reanimated": "2.12.0", "react-native-render-html": "^6.3.4",
update ptt module version
update ptt module version
bb0c092d16ebe4c23e6f781460fce666a20d0824
--- package-lock.json @@ -80,7 +80,7 @@ "@walmart/schedule-mini-app": "0.35.0", "@walmart/settings-mini-app": "1.18.1", "@walmart/shelfavailability-mini-app": "1.5.13", - "@walmart/taskit-mini-app": "2.32.1", + "@walmart/taskit-mini-app": "2.32.4", "@walmart/time-clock-mini-app": "2.85.0", "@walmart/topstock-mini-app": "1.0.5", "@walmart/ui-components": "1.11.1", @@ -6040,9 +6040,9 @@ } }, "node_modules/@walmart/taskit-mini-app": { - "version": "2.32.1", - "resolved": "https://npme.walmart.com/@walmart/taskit-mini-app/-/taskit-mini-app-2.32.1.tgz", - "integrity": "sha512-Iurup1CErFvoLKLpB+YQaNh641VF87SanQDcaLnhOvYqE3b/6RsNV59Ny7wjpn0YtG5U7DIsN3QHipPIPRWo+g==", + "version": "2.32.4", + "resolved": "https://npme.walmart.com/@walmart/taskit-mini-app/-/taskit-mini-app-2.32.4.tgz", + "integrity": "sha512-GjTemD+neH9K5kEt2iHZE/4JibcgeD1NfT6eUFXPn7bShBht94EXcNUjOOFYOAB573leHyFPMqvWUFrCBa6lAA==", "peerDependencies": { "@terrylinla/react-native-sketch-canvas": "^0.8.0", "@types/lodash": ">=4.14.176", @@ -25480,9 +25480,9 @@ "version": "1.5.13" }, "@walmart/taskit-mini-app": { - "version": "2.32.1", - "resolved": "https://npme.walmart.com/@walmart/taskit-mini-app/-/taskit-mini-app-2.32.1.tgz", - "integrity": "sha512-Iurup1CErFvoLKLpB+YQaNh641VF87SanQDcaLnhOvYqE3b/6RsNV59Ny7wjpn0YtG5U7DIsN3QHipPIPRWo+g==" + "version": "2.32.4", + "resolved": "https://npme.walmart.com/@walmart/taskit-mini-app/-/taskit-mini-app-2.32.4.tgz", + "integrity": "sha512-GjTemD+neH9K5kEt2iHZE/4JibcgeD1NfT6eUFXPn7bShBht94EXcNUjOOFYOAB573leHyFPMqvWUFrCBa6lAA==" }, "@walmart/tcnumber": { "version": "2.3.3", --- package.json @@ -122,7 +122,7 @@ "@walmart/schedule-mini-app": "0.35.0", "@walmart/settings-mini-app": "1.18.1", "@walmart/shelfavailability-mini-app": "1.5.13", - "@walmart/taskit-mini-app": "2.32.1", + "@walmart/taskit-mini-app": "2.32.4", "@walmart/time-clock-mini-app": "2.85.0", "@walmart/topstock-mini-app": "1.0.5", "@walmart/ui-components": "1.11.1",
updated taskit version
updated taskit version
b7c83a8a3631a02f2256fe56c2aac7c384d36920
--- src/utils/assoicateList.ts @@ -1,4 +1,4 @@ -import {associateIsNotScheduled} from '.'; +import {associateIsNotScheduled, associateIsTardy} from '.'; import {Associate} from '../types'; import { associateIsAbsent, @@ -6,6 +6,7 @@ import { associateIsClockedOut, associateIsOnMeal, associateIsOnPPTO, + associateIsOnPTO, } from './user'; const ASC_ORDER = 1; @@ -25,6 +26,9 @@ const checkUserClockedIn = (associate: Associate) => const checkUserClockedOut = (associate: Associate) => associateIsClockedOut(associate) ? ASC_ORDER : DESC_ORDER; +const checkUserTardy = (associate: Associate) => + associateIsTardy(associate) ? ASC_ORDER : DESC_ORDER; + const checkUserAbsent = (associate: Associate) => associateIsAbsent(associate) ? ASC_ORDER : DESC_ORDER; @@ -34,6 +38,9 @@ const checkUserAtMeal = (associate: Associate) => const checkUserNotScheduled = (associate: Associate) => associateIsNotScheduled(associate) ? ASC_ORDER : DESC_ORDER; +const checkUserOnPTO = (associate: Associate) => + associateIsOnPTO(associate) ? ASC_ORDER : DESC_ORDER; + const checkUserOnPPTO = (associate: Associate) => associateIsOnPPTO(associate) ? ASC_ORDER : DESC_ORDER; @@ -51,8 +58,10 @@ export const sortedAssociateList = ( checkUserClockedIn(associateB) - checkUserClockedIn(associateA) || checkUserAtMeal(associateB) - checkUserAtMeal(associateA) || checkUserClockedOut(associateB) - checkUserClockedOut(associateA) || + checkUserTardy(associateB) - checkUserTardy(associateA) || checkUserAbsent(associateB) - checkUserAbsent(associateA) || checkUserNotScheduled(associateB) - checkUserNotScheduled(associateA) || checkUserOnPPTO(associateB) - checkUserOnPPTO(associateA) || + checkUserOnPTO(associateB) - checkUserOnPTO(associateA) || sortByAssociateName(associateA, associateB), ); --- src/utils/user.ts @@ -40,6 +40,9 @@ export const associateIsClockedOut = (associate?: Associate) => { export const associateIsOnMeal = (associate?: Associate) => !associateIsClockedIn(associate) && associate?.punch?.lastPunchType === '5'; +export const associateIsOnPTO = (associate?: Associate) => + associate?.punch?.clockStatus === '3'; + // @todo - add correct logic, ptt has said this is correct but...doubt export const associateIsOnPPTO = (associate?: Associate) => associate?.punch?.clockStatus === '4'; --- src/utils/assoicateList.ts @@ -1,4 +1,4 @@ -import {associateIsNotScheduled} from '.'; +import {associateIsNotScheduled, associateIsTardy} from '.'; import {Associate} from '../types'; import { associateIsAbsent, @@ -6,6 +6,7 @@ import { associateIsClockedOut, associateIsOnMeal, associateIsOnPPTO, + associateIsOnPTO, } from './user'; const ASC_ORDER = 1; @@ -25,6 +26,9 @@ const checkUserClockedIn = (associate: Associate) => const checkUserClockedOut = (associate: Associate) => associateIsClockedOut(associate) ? ASC_ORDER : DESC_ORDER; +const checkUserTardy = (associate: Associate) => + associateIsTardy(associate) ? ASC_ORDER : DESC_ORDER; + const checkUserAbsent = (associate: Associate) => associateIsAbsent(associate) ? ASC_ORDER : DESC_ORDER; @@ -34,6 +38,9 @@ const checkUserAtMeal = (associate: Associate) => const checkUserNotScheduled = (associate: Associate) => associateIsNotScheduled(associate) ? ASC_ORDER : DESC_ORDER; +const checkUserOnPTO = (associate: Associate) => + associateIsOnPTO(associate) ? ASC_ORDER : DESC_ORDER; + const checkUserOnPPTO = (associate: Associate) => associateIsOnPPTO(associate) ? ASC_ORDER : DESC_ORDER; @@ -51,8 +58,10 @@ export const sortedAssociateList = ( checkUserClockedIn(associateB) - checkUserClockedIn(associateA) || checkUserAtMeal(associateB) - checkUserAtMeal(associateA) || checkUserClockedOut(associateB) - checkUserClockedOut(associateA) || + checkUserTardy(associateB) - checkUserTardy(associateA) || checkUserAbsent(associateB) - checkUserAbsent(associateA) || checkUserNotScheduled(associateB) - checkUserNotScheduled(associateA) || checkUserOnPPTO(associateB) - checkUserOnPPTO(associateA) || + checkUserOnPTO(associateB) - checkUserOnPTO(associateA) || sortByAssociateName(associateA, associateB), ); --- src/utils/user.ts @@ -40,6 +40,9 @@ export const associateIsClockedOut = (associate?: Associate) => { export const associateIsOnMeal = (associate?: Associate) => !associateIsClockedIn(associate) && associate?.punch?.lastPunchType === '5'; +export const associateIsOnPTO = (associate?: Associate) => + associate?.punch?.clockStatus === '3'; + // @todo - add correct logic, ptt has said this is correct but...doubt export const associateIsOnPPTO = (associate?: Associate) => associate?.punch?.clockStatus === '4';
update PTO and tardy in the sorting logic
update PTO and tardy in the sorting logic
2a3df61e92acebf5d1f141d17bba336c6b44d13a
--- __tests__/home/components/GreetingRowV2/useUserInfoTest.ts @@ -6,11 +6,11 @@ jest.mock('@walmart/me-at-walmart-athena-queries', () => ({ useGetForYouHeaderAssociateDetailsQuery: jest.fn(), })); -// Mock environment to include http.consumerIdHeader expected by hook +// Mock environment to include http.consumerIdSchedulingOnboarded expected by hook jest.mock('@walmart/allspark-foundation/Environment', () => ({ useEnvironment: jest.fn(() => ({ - http: {consumerIdHeader: 'test-consumer-id'}, + http: {consumerIdSchedulingOnboarded: 'test-consumer-id'}, env: 'test', })), })); --- src/home/components/GreetingRowV2/useUserInfo.ts @@ -164,7 +164,7 @@ export const useUserInfo = ( }, context: { headers: { - 'wm_consumer.id': env.http.consumerIdHeader, + 'wm_consumer.id': env.http.consumerIdSchedulingOnboarded, 'x-o-platform': 'allspark-core', 'x-o-platform-version': getVersion(), },
feat(header): change naming
feat(header): change naming
5cb1afce948a3a27160d30dccb788dfb4e0ac471
--- package-lock.json @@ -3119,9 +3119,9 @@ "integrity": "sha512-vzirL8LmvVnJdyNGFtqfzf3Pth9kuwqnd0cxllT7Gw3Qil4+snxw6yrC9Iw49jIvUFqjGjfkkFbXPeSqOcCVzw==" }, "@walmart/inbox-mini-app": { - "version": "0.0.94", - "resolved": "https://npme.walmart.com/@walmart/inbox-mini-app/-/inbox-mini-app-0.0.94.tgz", - "integrity": "sha512-Nw48GsUKz2HkFr1qjavFld2pryaG9Jzn/QPT9C/xk7UgxTs4UeCmSJEZ99oLeSIV3TA9rgAH8dThkqzwmjP6ew==" + "version": "0.0.96", + "resolved": "https://npme.walmart.com/@walmart/inbox-mini-app/-/inbox-mini-app-0.0.96.tgz", + "integrity": "sha512-jplu8SFzqVj1xWNlxMrPmR3oelBdyNBeQHJOr5YM7p7yqAWBiYO2jt9HyUkZCzRkEhrjjDufk9J5K9OJC1GhKA==" }, "@walmart/moment-walmart": { "version": "1.0.4", --- package.json @@ -72,7 +72,7 @@ "@walmart/functional-components": "1.0.27", "@walmart/gtp-shared-components": "^0.2.2", "@walmart/impersonation-mini-app": "1.0.15", - "@walmart/inbox-mini-app": "0.0.94", + "@walmart/inbox-mini-app": "0.0.96", "@walmart/moment-walmart": "1.0.4", "@walmart/push-to-talk-mini-app": "0.5.21", "@walmart/react-native-env": "^0.1.0",
SSMP-1524 inbox version bump
SSMP-1524 inbox version bump
7a07649fdc6425d424c3f083491cc67b89fe3243
--- .looper-pr.yml @@ -24,7 +24,7 @@ envs: STAGES_TO_RUN: LINT: true UNITTEST: true - BUILD: false + BUILD: true SONAR_SCAN: true ARTIFACT_PUBLISH: true AUTO_PR_MONO: false
feat(ui): update looper yml
feat(ui): update looper yml
4a50535158b7c1269f61672365297d660032cf35
--- example/src/teamHub/screens/onboarding.tsx @@ -5,13 +5,14 @@ import {TeamHub} from '../feature'; import {TeamHubLogger, TeamHubTelemetry} from '../services'; import {TeamOnboardingScreen} from '@walmart/allspark-foundation/Components'; import {teamOnboardingCardsMockData} from '@walmart/allspark-foundation/__mocks__/data/teamOnboardingCards'; +import {AllsparkNavigationClient} from '@walmart/allspark-foundation/Navigation'; export const OnboardingEntryScreen = TeamHub.createScreen( () => { const navigation = useNavigation(); const handleNavigation = () => { - //TODO: will be add when team selection screen is added + AllsparkNavigationClient.navigate('teamHub.teamSelection'); }; useEffect(() => { --- example/src/teamHub/screens/screen.tsx @@ -22,12 +22,6 @@ export const HomeScreen = TeamHub.createScreen( return ( <View style={{flex: 1}}> - <Header - backgroundColor="white" - textColor="black" - title="Hub value-prop title" - subText="Short introduction to convey the action we intend the associate to take through this hub." - /> <Button variant="primary" UNSAFE_style={{marginBottom: 10, marginTop: 20}} @@ -36,14 +30,6 @@ export const HomeScreen = TeamHub.createScreen( }> Team Onboarding </Button> - <Button - variant="primary" - UNSAFE_style={{marginBottom: 10, marginTop: 20}} - onPress={() => - AllsparkNavigationClient.navigate('teamHub.teamSelection') - }> - Team Selection - </Button> <Button variant="primary" UNSAFE_style={{marginBottom: 10}} --- packages/allspark-foundation/src/Components/Onboarding/TeamOnboarding/Component/TeamOnboardingCards.tsx @@ -1,26 +1,47 @@ -import React from 'react'; -import { View } from 'react-native'; +import React, { useRef } from 'react'; +import { View, ScrollView, Animated } from 'react-native'; import { TeamOnboardingCard, TeamOnboardingCardInfo, } from './TeamOnboardingCard'; import { teamOnboardingCardsStyles as styles } from './styles'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; interface TeamOnboardingCardProps { cards: TeamOnboardingCardInfo[]; } export const TeamOnboardingCards = ({ cards }: TeamOnboardingCardProps) => { + const { bottom } = useSafeAreaInsets(); + const scrollPosition = useRef(new Animated.Value(0)).current; + + const onScroll = Animated.event( + [ + { + nativeEvent: { contentOffset: { y: scrollPosition } }, + }, + ], + { useNativeDriver: false } + ); + return ( - <View style={styles.container}> - {cards.map((item) => ( - <TeamOnboardingCard - key={item.title} - icon={item.icon} - title={item.title} - description={item.description} - /> - ))} - </View> + <ScrollView + scrollEventThrottle={16} + scrollEnabled={true} + contentContainerStyle={[{ paddingBottom: bottom, flex: 1 }]} + onScroll={onScroll} + showsVerticalScrollIndicator={false} + > + <View style={styles.container}> + {cards.map((item) => ( + <TeamOnboardingCard + key={item.title} + icon={item.icon} + title={item.title} + description={item.description} + /> + ))} + </View> + </ScrollView> ); }; --- packages/allspark-foundation/src/Components/Onboarding/TeamOnboarding/Images/index.ts @@ -1,3 +1,4 @@ export const Images = { - teamOnboarding: require('./team-onboarding.png'), + teamOnboarding: + 'https://i5-me.walmartimages.com/images/teams/team-onboarding-mgr-exp-228277d75b.png', }; --- packages/allspark-foundation/src/Components/Onboarding/TeamOnboarding/Images/team-onboarding.png Binary files a/packages/allspark-foundation/src/Components/Onboarding/TeamOnboarding/Images/team-onboarding.png and /dev/null differ --- packages/allspark-foundation/src/Components/Onboarding/TeamOnboarding/Screens/TeamOnboardingScreen.tsx @@ -29,7 +29,7 @@ export const TeamOnboardingScreen = ({ <View style={styles.imageContainer}> <Image resizeMode='contain' - source={Images.teamOnboarding} + source={{ uri: Images.teamOnboarding }} style={styles.imageSize} /> </View> --- packages/allspark-foundation/src/Components/Onboarding/TeamOnboarding/Screens/styles.ts @@ -7,6 +7,7 @@ export const TeamOnboardingScreenStyles = StyleSheet.create({ height: '100%', width: '100%', backgroundColor: colors.white, + flex: 1, }, teamOnboardingViewContainer: { alignItems: 'center', @@ -14,6 +15,7 @@ export const TeamOnboardingScreenStyles = StyleSheet.create({ marginTop: 24, marginRight: 24, marginLeft: 24, + flex: 1, }, teamOnboardingView: { alignItems: 'center', @@ -42,6 +44,7 @@ export const TeamOnboardingScreenStyles = StyleSheet.create({ borderBottomWidth: 1, paddingTop: 20, width: '100%', + flex: 1, }, buttonContainer: { width: '100%',
feat(ui): make the onboarding cards scrollable
feat(ui): make the onboarding cards scrollable
726276149ba02494337995c618d7df6fa580056f
--- package.json @@ -164,7 +164,7 @@ "@walmart/rn-mobile-sdk-pairing": "2.1.8", "@walmart/rn-receiving-mini-app": "2.8.25", "@walmart/roster-mini-app": "3.8.12", - "@walmart/schedule-mini-app": "5.2.0", + "@walmart/schedule-mini-app": "5.3.1", "@walmart/shelfavailability-mini-app": "1.7.2", "@walmart/shop-gnfr-mini-app": "1.0.448", "@walmart/sidekick-mini-app": "4.253.2", --- yarn.lock @@ -8563,7 +8563,7 @@ __metadata: "@walmart/rn-mobile-sdk-pairing": "npm:2.1.8" "@walmart/rn-receiving-mini-app": "npm:2.8.25" "@walmart/roster-mini-app": "npm:3.8.12" - "@walmart/schedule-mini-app": "npm:5.2.0" + "@walmart/schedule-mini-app": "npm:5.3.1" "@walmart/shelfavailability-mini-app": "npm:1.7.2" "@walmart/shop-gnfr-mini-app": "npm:1.0.448" "@walmart/sidekick-mini-app": "npm:4.253.2" @@ -9310,9 +9310,9 @@ __metadata: languageName: node linkType: hard -"@walmart/schedule-mini-app@npm:5.2.0": - version: 5.2.0 - resolution: "@walmart/schedule-mini-app@npm:5.2.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fschedule-mini-app%2F-%2F%40walmart%2Fschedule-mini-app-5.2.0.tgz" +"@walmart/schedule-mini-app@npm:5.3.1": + version: 5.3.1 + resolution: "@walmart/schedule-mini-app@npm:5.3.1::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fschedule-mini-app%2F-%2F%40walmart%2Fschedule-mini-app-5.3.1.tgz" peerDependencies: "@react-native-community/datetimepicker": ">=7.6.2" "@react-native-firebase/remote-config": ">=10.1.1" @@ -9326,7 +9326,7 @@ __metadata: "@walmart/ax-components": ^1.1.0 "@walmart/gtp-shared-components": ">=0.2.2" "@walmart/gtp-shared-components-3": "*" - "@walmart/me-at-walmart-common": ">=6.36.0" + "@walmart/me-at-walmart-common": ">=6.39.0" "@walmart/moment-walmart": ">=1.0.4" "@walmart/ui-components": ">=1.15.0" "@walmart/wfm-ui": ">=4.1.0" @@ -9346,7 +9346,7 @@ __metadata: redux: ">=4.0.5" reselect: ">=4.0.0" wfm-allspark-data-library: ">=7.0.0" - checksum: 10c0/4c959b5f1c115cb9530a8f9be3202f2046454a2f01495d918f58d593279a6735b498242e181e1f19cf46823dd30872dec6d425afe4de0ff588e5d646d07f0951 + checksum: 10c0/67e5d057034724037aef2b3fe0fee795882bd58ca3967895e93694588858f821f0c53b67c89427d6fbb87bb6f662b013660cb5a5dd70538e1a6923a108677bac languageName: node linkType: hard
fix(schedules): ASWFMT-78326 Remove conditional import causing app crash (#5162)
fix(schedules): ASWFMT-78326 Remove conditional import causing app crash (#5162)
3ecb02ac152b277d1b802053c437b1342e1b89f4
--- package.json @@ -234,4 +234,4 @@ "pre-push": "npm run coverage" } } -} \ No newline at end of file +}
reverting newline removal
reverting newline removal
6c0efbaa25e07c679d4744c5713b5c4accb2681b
--- .looper.yml @@ -65,7 +65,7 @@ flows: - (name Yarn Set Version) yarn set version 4.6.0 - (name Yarn Version) yarn --version - (name Install Dependencies) yarn install - - (name Commit Lockfile Changes) sh -c 'git diff --quiet yarn.lock .yarnrc.yml || (git config user.email svc-looper@walmart.com && git config user.name svc-looper && git add yarn.lock .yarnrc.yml && git commit -m "chore: update lockfile from CI [skip ci]")' + - (name Commit Lockfile Changes) ./scripts/commit-lockfile-changes.sh buildPackages: - (name Build Packages) yarn run build --- scripts/commit-lockfile-changes.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Script to commit lockfile changes if they exist + +if ! git diff --quiet yarn.lock .yarnrc.yml; then + echo "Lockfile changes detected, committing..." + git config user.email "svc-looper@walmart.com" + git config user.name "svc-looper" + git add yarn.lock .yarnrc.yml + git commit -m "chore: update lockfile from CI [skip ci]" + echo "Lockfile changes committed" +else + echo "No lockfile changes detected" +fi
fix: use dedicated script for committing lockfile changes
fix: use dedicated script for committing lockfile changes
b93ebe909f0db4d2db1c932422cb82b6a60e8e5d
--- __tests__/harness/redux/mockState/appConfigState.ts @@ -1,7 +1,72 @@ -export const appConfigState = { +import {AppConfigState} from '@walmart/redux-store'; + +export const appConfigState: AppConfigState = { + loading: false, + loaded: true, + error: false, + appConfigInitProgress: false, + appConfigInitSuccess: true, data: { texting: { - enableMessageButton: 'true', + warningMessageContent: + 'All users must be on the most recent version of Me@ to send and receive messages.', + rmaPath: '/texting/weekly_schedule_link', + rmaAppId: '6b00c730-69d8-440f-86f7-2bc396dbc874', + codeOfConductLink: + 'https://www.walmartethics.com/content/walmartethics/en_us/code-of-conduct.html', + enableMessageButton: true, + useTexting: false, + setFirestorePersistenceEnabled: true, + // @ts-ignore + teamLeadJobDescriptions: [ + 'teamlead', + 'team lead', + 'ap team lead', + 'ap team lead, low volume', + 'apparel tl', + 'tl apparel', + 'auto care center tl', + 'tl auto care center', + 'clean team lead', + 'clean team lead on', + 'deli/bakery tl', + 'tl deli/bakery', + 'digital tl', + 'tl digital', + 'entertainment tl', + 'tl entertainment', + 'food & consum tl', + 'tl food & consum', + 'fresh tl', + 'tl fresh', + 'frontend tl', + 'tl frontend', + 'fuel tl', + 'tl fuel', + 'hardlines tl', + 'tl hardlines', + 'home tl', + 'tl home', + 'meat/produce tl', + 'tl meat/produce', + 'overnight mfc team lead', + 'people lead', + 'salesfloor tl', + 'tl salesfloor', + 'seasonal tl', + 'tl seasonal', + 'stocking 1 tl', + 'tl stocking 1', + 'stocking 2 tl', + 'tl stocking 2', + 'stocking 3 tl', + 'tl stocking 3', + 'peoplelead', + 'tl', + ], + pushToTalkEnabled: false, + shouldDisplayWarningBanner: false, + showViewTimeClock: false, }, }, }; --- __tests__/harness/redux/mockState/clockStatusState.ts @@ -1,8 +1,10 @@ -const clockCheckState = { +import {ClockStatusState, ClockCheck} from '@walmart/redux-store'; + +const clockCheckState: ClockCheck = { clockStatus: '1', }; -export const clockStatusState = { +export const clockStatusState: ClockStatusState = { loaded: true, error: false, data: clockCheckState, --- __tests__/harness/redux/mockState/deviceInfoState.ts @@ -1 +1,9 @@ -export const deviceInfoState = {}; +import {DeviceInfoState} from '@walmart/redux-store'; + +export const deviceInfoState: DeviceInfoState = { + loaded: true, + error: false, + fetchingDeviceInfo: false, + fetchingDeviceInfoError: false, + data: null, +}; --- __tests__/harness/redux/mockState/localeState.ts @@ -1 +1,9 @@ -export const localeState = {}; +import {LocaleState} from '@walmart/redux-store'; + +export const localeState: LocaleState = { + loaded: true, + error: false, + fetchingLocale: false, + fetchingLocaleError: false, + data: null, +}; --- __tests__/harness/redux/mockState/versionsState.ts @@ -1 +1,9 @@ -export const versionsState = {}; +import {VersionsState} from '@walmart/redux-store'; + +export const versionsState: VersionsState = { + loaded: true, + error: false, + fetchingVersions: false, + fetchingVersionsError: false, + data: null, +}; --- __tests__/harness/redux/mockState/appConfigState.ts @@ -1,7 +1,72 @@ -export const appConfigState = { +import {AppConfigState} from '@walmart/redux-store'; + +export const appConfigState: AppConfigState = { + loading: false, + loaded: true, + error: false, + appConfigInitProgress: false, + appConfigInitSuccess: true, data: { texting: { - enableMessageButton: 'true', + warningMessageContent: + 'All users must be on the most recent version of Me@ to send and receive messages.', + rmaPath: '/texting/weekly_schedule_link', + rmaAppId: '6b00c730-69d8-440f-86f7-2bc396dbc874', + codeOfConductLink: + 'https://www.walmartethics.com/content/walmartethics/en_us/code-of-conduct.html', + enableMessageButton: true, + useTexting: false, + setFirestorePersistenceEnabled: true, + // @ts-ignore + teamLeadJobDescriptions: [ + 'teamlead', + 'team lead', + 'ap team lead', + 'ap team lead, low volume', + 'apparel tl', + 'tl apparel', + 'auto care center tl', + 'tl auto care center', + 'clean team lead', + 'clean team lead on', + 'deli/bakery tl', + 'tl deli/bakery', + 'digital tl', + 'tl digital', + 'entertainment tl', + 'tl entertainment', + 'food & consum tl', + 'tl food & consum', + 'fresh tl', + 'tl fresh', + 'frontend tl', + 'tl frontend', + 'fuel tl', + 'tl fuel', + 'hardlines tl', + 'tl hardlines', + 'home tl', + 'tl home', + 'meat/produce tl', + 'tl meat/produce', + 'overnight mfc team lead', + 'people lead', + 'salesfloor tl', + 'tl salesfloor', + 'seasonal tl', + 'tl seasonal', + 'stocking 1 tl', + 'tl stocking 1', + 'stocking 2 tl', + 'tl stocking 2', + 'stocking 3 tl', + 'tl stocking 3', + 'peoplelead', + 'tl', + ], + pushToTalkEnabled: false, + shouldDisplayWarningBanner: false, + showViewTimeClock: false, }, }, }; --- __tests__/harness/redux/mockState/clockStatusState.ts @@ -1,8 +1,10 @@ -const clockCheckState = { +import {ClockStatusState, ClockCheck} from '@walmart/redux-store'; + +const clockCheckState: ClockCheck = { clockStatus: '1', }; -export const clockStatusState = { +export const clockStatusState: ClockStatusState = { loaded: true, error: false, data: clockCheckState, --- __tests__/harness/redux/mockState/deviceInfoState.ts @@ -1 +1,9 @@ -export const deviceInfoState = {}; +import {DeviceInfoState} from '@walmart/redux-store'; + +export const deviceInfoState: DeviceInfoState = { + loaded: true, + error: false, + fetchingDeviceInfo: false, + fetchingDeviceInfoError: false, + data: null, +}; --- __tests__/harness/redux/mockState/localeState.ts @@ -1 +1,9 @@ -export const localeState = {}; +import {LocaleState} from '@walmart/redux-store'; + +export const localeState: LocaleState = { + loaded: true, + error: false, + fetchingLocale: false, + fetchingLocaleError: false, + data: null, +}; --- __tests__/harness/redux/mockState/versionsState.ts @@ -1 +1,9 @@ -export const versionsState = {}; +import {VersionsState} from '@walmart/redux-store'; + +export const versionsState: VersionsState = { + loaded: true, + error: false, + fetchingVersions: false, + fetchingVersionsError: false, + data: null, +};
adding initial app config state
adding initial app config state
194fe6ac0a9c80c9f2670fc14d84c9d93601ee82
--- packages/me-at-walmart-container/__tests__/services/site/getParsedStoreMetaData.test.ts @@ -1,80 +1,88 @@ -import { getDivisionDepartments, getParsedStoreMetaData, fetchContacts } from "../../../src/services/site/getParsedStoreMetaData"; -import mockBusinessUnitByCountryAndNumber from "../../../__mocks__/mockBusinessUnitByCountryAndNumber"; -import mockBusinessUnitByCountryAndNumberParsed from "../../../__mocks__/mockBusinessUnitByCountryAndNumberParsed"; -describe("get parsed store metadata tests", () => { - it("throws error when businessUnitDetail is null", () => { +import { + getDivisionDepartments, + getParsedStoreMetaData, + fetchContacts, +} from '../../../src/services/site/getParsedStoreMetaData'; +import mockBusinessUnitByCountryAndNumber from '../../utils/mockBusinessUnitByCountryAndNumber'; +import mockBusinessUnitByCountryAndNumberParsed from '../../utils/mockBusinessUnitByCountryAndNumberParsed'; +describe('get parsed store metadata tests', () => { + it('throws error when businessUnitDetail is null', () => { expect(() => getParsedStoreMetaData(null, 'US', '12345')).toThrow( 'Business Unit Details not found', ); }); - - it("returns the parsed store metadata (happy path)", () => { - const parsedData = getParsedStoreMetaData(mockBusinessUnitByCountryAndNumber, 'US', '100'); - expect(parsedData).toEqual(mockBusinessUnitByCountryAndNumberParsed) + it('returns the parsed store metadata (happy path)', () => { + const parsedData = getParsedStoreMetaData( + mockBusinessUnitByCountryAndNumber, + 'US', + '100', + ); + expect(parsedData).toEqual(mockBusinessUnitByCountryAndNumberParsed); }); }); -describe("getDivisionDepartment tests", () => { - - it("returns [] when divisions is null", () => { +describe('getDivisionDepartment tests', () => { + it('returns [] when divisions is null', () => { expect(getDivisionDepartments(null)).toEqual([]); }); - it("returns an empty array when divisions is empty", () => { + it('returns an empty array when divisions is empty', () => { expect(getDivisionDepartments([])).toEqual([]); }); - it("filters out closed departments", () => { + it('filters out closed departments', () => { const inputDivision = [ { businessUnitId: '1234', status: { description: 'OPEN', }, - name: 'Division 1' + name: 'Division 1', }, - { // removed + { + // removed businessUnitId: '1234', status: { description: 'CLOSED', }, - name: 'Division 2' + name: 'Division 2', }, - { //removed + { + //removed businessUnitId: null, status: { description: 'OPEN', }, - name: 'Division 3' - } + name: 'Division 3', + }, ]; expect(getDivisionDepartments(inputDivision).length).toBe(1); expect(getDivisionDepartments(inputDivision)[0].name).toEqual('Division 1'); - }) - it("sorts the departments correctly", () => { + }); + it('sorts the departments correctly', () => { const inputDivision = [ { businessUnitId: '4', status: { description: 'OPEN', }, - name: 'Division 1' + name: 'Division 1', }, { businessUnitId: '3', status: { description: 'OPEN', }, - name: 'Division 2' + name: 'Division 2', }, { businessUnitId: null, status: { description: 'OPEN', }, - name: 'Division 3' - } + name: 'Division 3', + }, ]; expect(getDivisionDepartments(inputDivision)).toEqual([ { @@ -83,7 +91,7 @@ describe("getDivisionDepartment tests", () => { status: { description: 'OPEN', }, - name: 'Division 2' + name: 'Division 2', }, { altLocationType: undefined, @@ -91,11 +99,11 @@ describe("getDivisionDepartment tests", () => { status: { description: 'OPEN', }, - name: 'Division 1' + name: 'Division 1', }, - ]) + ]); }); - it("renames altLocationType: null to the object provided by bff", () => { + it('renames altLocationType: null to the object provided by bff', () => { const inputDivision = [ { altLocationType: null, @@ -103,11 +111,11 @@ describe("getDivisionDepartment tests", () => { status: { description: 'OPEN', }, - name: 'Division 1' - } + name: 'Division 1', + }, ]; - expect(getDivisionDepartments(inputDivision)).toEqual( - [{ + expect(getDivisionDepartments(inputDivision)).toEqual([ + { altLocationType: { code: '0', }, @@ -115,14 +123,14 @@ describe("getDivisionDepartment tests", () => { status: { description: 'OPEN', }, - name: 'Division 1' - }] - ) - }) + name: 'Division 1', + }, + ]); + }); }); -describe("fetchContacts tests", () => { - it("returns sorted contacts (happy path)", () => { +describe('fetchContacts tests', () => { + it('returns sorted contacts (happy path)', () => { const inputContacts = [ { faxNumber: '12345', @@ -132,7 +140,7 @@ describe("fetchContacts tests", () => { lastName: 'Tertiary', fullName: 'Jenny Tertiary', }, - phones: ['8675309'] + phones: ['8675309'], }, { faxNumber: '12345', @@ -142,7 +150,7 @@ describe("fetchContacts tests", () => { lastName: 'None 2', fullName: 'Jenny None 2', }, - phones: ['8675309'] + phones: ['8675309'], }, { faxNumber: '12345', @@ -152,7 +160,7 @@ describe("fetchContacts tests", () => { lastName: 'Secondary', fullName: 'Jenny Secondary', }, - phones: ['8675309'] + phones: ['8675309'], }, { faxNumber: '12345', @@ -162,7 +170,7 @@ describe("fetchContacts tests", () => { lastName: 'Primary', fullName: 'Jenny Primary', }, - phones: ['8675309'] + phones: ['8675309'], }, { faxNumber: '12345', @@ -172,18 +180,16 @@ describe("fetchContacts tests", () => { lastName: 'None', fullName: 'Jenny None', }, - phones: ['8675309'] + phones: ['8675309'], }, - ] + ]; const sortedContacts = fetchContacts(inputContacts); - expect(sortedContacts.map(contact => contact.type)).toEqual([ + expect(sortedContacts.map((contact) => contact.type)).toEqual([ 'Primary', 'Secondary', 'Tertiary', null, - null - ]) - + null, + ]); }); - -}) \ No newline at end of file +}); --- packages/me-at-walmart-container/__tests__/utils/mockBusinessUnitByCountryAndNumber.js --- packages/me-at-walmart-container/__tests__/utils/mockBusinessUnitByCountryAndNumberParsed.js
refactor tests
refactor tests
b23f1051d94f857a68dc99530019b82da5a81285
--- package.json @@ -117,7 +117,7 @@ "@walmart/me-at-walmart-athena-queries": "6.1.4", "@walmart/me-at-walmart-common": "6.1.4", "@walmart/me-at-walmart-container": "6.1.4", - "@walmart/metrics-mini-app": "0.22.4", + "@walmart/metrics-mini-app": "1.23.2", "@walmart/mod-flex-mini-app": "1.18.5", "@walmart/moment-walmart": "1.0.4", "@walmart/money-auth-shared-components": "0.1.6", --- yarn.lock @@ -6508,33 +6508,34 @@ __metadata: languageName: node linkType: hard -"@walmart/metrics-mini-app@npm:0.22.4": - version: 0.22.4 - resolution: "@walmart/metrics-mini-app@npm:0.22.4" +"@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: - "@react-native/gradle-plugin": ">=0.72.11" + "@react-native/gradle-plugin": ">=0.73.4" "@react-navigation/native": ">=6.0.0" - "@shopify/flash-list": ">=1.4.2" + "@shopify/flash-list": ">=1.6.4" + "@walmart/allspark-foundation": ">=6.2.0" + "@walmart/allspark-http-client": ">=6.2.0" "@walmart/ask-sam-chat-components": ">=0.2.7" - "@walmart/gtp-shared-components": ">=2.1.3" - "@walmart/react-native-shared-navigation": ">=1.0.2" - "@walmart/redux-store": ">=3.1.4" - apisauce: ">=3.0.1" - axios-cache-adapter: ">=2.7.3" - expo: 49.0.10 + "@walmart/gtp-shared-components": ">=2.2.1" + "@walmart/me-at-walmart-common": ">=6.2.0" + "@walmart/me-at-walmart-container": ">=6.2.0" + "@walmart/react-native-shared-navigation": ">=6.2.0" + "@walmart/redux-store": ">=6.2.0" + cache-parser: ">=1.2.4" + expo: 50.0.17 expo-linear-gradient: ">=12.7.2" lodash: ">=4.17.21" moment-timezone: ">=0.5.33" numeral: ">=2.0.6" react: 18.2.0 - react-native: 0.72.6 - react-native-drop-shadow: ">=1.0.0" - react-native-get-random-values: ">=1.8.0" + react-native: 0.73.7 react-redux: ">=8.0.4" reduxsauce: ">=1.2.0" - checksum: 10c0/5fd974a5fb7dc1d58884223b41eb67d3951f3d4119ddaa0a22c04d181f2dd5b29004bdf6b5b31506020942b1c5c06c05b2a60804917b3eb6555f8c7f14c0da84 + checksum: 10c0/69def61d1734eacf65abc63bff9526442823fb664a14b49e0ab7fa70c39ada62a9a55aedaa5b1a0b9a310d04b3b366473fca489c56a50b232606f744258117f9 languageName: node linkType: hard @@ -7832,7 +7833,7 @@ __metadata: "@walmart/me-at-walmart-athena-queries": "npm:6.1.4" "@walmart/me-at-walmart-common": "npm:6.1.4" "@walmart/me-at-walmart-container": "npm:6.1.4" - "@walmart/metrics-mini-app": "npm:0.22.4" + "@walmart/metrics-mini-app": "npm:1.23.2" "@walmart/mod-flex-mini-app": "npm:1.18.5" "@walmart/moment-walmart": "npm:1.0.4" "@walmart/money-auth-shared-components": "npm:0.1.6"
Reverting the version bump for metrics-mini-app after merging with latest changes
Reverting the version bump for metrics-mini-app after merging with latest changes
4fd24dba62a746ea55e3133b9557154379ede856
--- targets/US/package.json @@ -91,7 +91,7 @@ "@walmart/avp-shared-library": "0.10.5", "@walmart/backroom-mini-app": "1.8.7", "@walmart/calling-mini-app": "0.7.0", - "@walmart/checkout-mini-app": "4.3.5", + "@walmart/checkout-mini-app": "4.4.1", "@walmart/compass-sdk-rn": "5.19.15", "@walmart/config-components": "4.5.6", "@walmart/core-services": "~6.5.2", --- yarn.lock @@ -6549,9 +6549,9 @@ __metadata: languageName: node linkType: hard -"@walmart/checkout-mini-app@npm:4.3.5": - version: 4.3.5 - resolution: "@walmart/checkout-mini-app@npm:4.3.5::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fcheckout-mini-app%2F-%2F%40walmart%2Fcheckout-mini-app-4.3.5.tgz" +"@walmart/checkout-mini-app@npm:4.4.1": + version: 4.4.1 + resolution: "@walmart/checkout-mini-app@npm:4.4.1::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fcheckout-mini-app%2F-%2F%40walmart%2Fcheckout-mini-app-4.4.1.tgz" dependencies: "@stomp/stompjs": "npm:^7.0.0" cpc-input: "npm:^1.7.28" @@ -6589,7 +6589,7 @@ __metadata: react-native-safe-area-context: "*" react-redux: ^8.1.3 redux: ^4.0.5 - checksum: 10c0/486c0961e8fcfffb1a5ed12f2523b461e1354552e296c640703626a2781ad862de7f444fbcb74ae345e43c717a72215e038ff058fee1d7c8e37636426927a07b + checksum: 10c0/2d41258b65b3a41274c8c0b69e1c487f3d39608c9fbc55af5eba68dd9358342420b904bb82573e8fe9deb5320d3c84fb9729e75e2f642a61759b92d3d70f00d2 languageName: node linkType: hard @@ -7388,7 +7388,7 @@ __metadata: "@walmart/avp-shared-library": "npm:0.10.5" "@walmart/backroom-mini-app": "npm:1.8.7" "@walmart/calling-mini-app": "npm:0.7.0" - "@walmart/checkout-mini-app": "npm:4.3.5" + "@walmart/checkout-mini-app": "npm:4.4.1" "@walmart/compass-sdk-rn": "npm:5.19.15" "@walmart/config-components": "npm:4.5.6" "@walmart/core-services": "npm:~6.5.2"
Checkout 4.4.1
Checkout 4.4.1
b5741567eb54efc60fc461e9444f589a269d3789
--- ios/AllSpark.xcodeproj/project.pbxproj @@ -526,7 +526,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = B372B28AFCF2721547468DFD /* Pods-AllSpark.debug.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Beta"; + ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Dev"; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = AllSpark/AllSpark.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -570,7 +570,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = CB677EB3A9DBFA2656BADD9D /* Pods-AllSpark.release.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Beta"; + ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Dev"; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = AllSpark/AllSpark.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; --- ios/AllSpark/Info.plist @@ -108,7 +108,7 @@ <string>remote-notification</string> </array> <key>UILaunchStoryboardName</key> - <string>LaunchScreen-Beta</string> + <string>LaunchScreen-Dev</string> <key>UIRequiredDeviceCapabilities</key> <array> <string>armv7</string>
reverse auto change
reverse auto change
dd2820a72955d524f20ebc154abcefa505c32b05
--- .looper-pr.yml @@ -23,7 +23,7 @@ envs: LINT: true UNITTEST: false BUILD: true - SONAR_SCAN: true + SONAR_SCAN: false ARTIFACT_PUBLISH: true AUTO_PR_MONO: false JIRAPREFIX: SSMP
feat(ui): update the roster message button condition for total store and team
feat(ui): update the roster message button condition for total store and team
8ce30fe7f11d44ba69a83e833cfe1f3a09a9de56
--- package-lock.json @@ -32912,7 +32912,7 @@ "moment-timezone": "*", "react": "*", "react-native": "*", - "react-native-app-auth": "^6.4.3" + "react-native-app-auth": ">=6" } }, "packages/allspark-foundation": { @@ -32987,22 +32987,22 @@ "@react-navigation/drawer": "6.x", "@react-navigation/native": "6.x", "@react-navigation/stack": "6.x", - "@walmart/allspark-graphql-client": ">=6.0.0", - "@walmart/allspark-http-client": ">=6.0.0", - "@walmart/core-services": ">=6.0.0", - "@walmart/core-utils": ">=6.0.0", - "@walmart/functional-components": ">=6.0.0", - "@walmart/gtp-shared-components": ">=2.2", - "@walmart/react-native-env": ">=6.0.0", + "@walmart/allspark-graphql-client": ">=6", + "@walmart/allspark-http-client": ">=6", + "@walmart/core-services": ">=6", + "@walmart/core-utils": ">=6", + "@walmart/functional-components": ">=6", + "@walmart/gtp-shared-components": ">=2", + "@walmart/react-native-env": ">=6", "@walmart/react-native-scanner-3.0": "^0.3.0", - "@walmart/react-native-shared-navigation": ">=6.0.0", + "@walmart/react-native-shared-navigation": ">=6", "@walmart/react-native-sumo-sdk": "^2.6.0", - "@walmart/react-native-wm-network": ">=6.0.0", - "@walmart/react-native-wm-notification": ">=6.0.0", - "@walmart/react-native-wm-telemetry": ">=6.0.0", - "@walmart/redux-store": ">=6.0.0", - "react": "18.x", - "react-native": "0.72.x", + "@walmart/react-native-wm-network": ">=6", + "@walmart/react-native-wm-notification": ">=6", + "@walmart/react-native-wm-telemetry": ">=6", + "@walmart/redux-store": ">=6", + "react": "*", + "react-native": "*", "react-native-apollo-devtools-client": "*", "react-native-device-info": "*", "react-native-flipper": "*", @@ -34411,8 +34411,8 @@ "react-native": "~0.72.5" }, "peerDependencies": { - "react": "18.x", - "react-native": "0.72.x" + "react": "*", + "react-native": "*" } }, "packages/allspark-utils/node_modules/nanoid": { @@ -34837,17 +34837,17 @@ "@walmart/allspark-authentication": "*", "@walmart/allspark-foundation": "*", "@walmart/config-components": "4.x", - "@walmart/core-services": ">=6.0.0", - "@walmart/core-services-allspark": ">=6.0.0", - "@walmart/core-widget-registry": ">=6.0.0", - "@walmart/me-at-walmart-athena-queries": ">=6.0.0", + "@walmart/core-services": ">=6", + "@walmart/core-services-allspark": ">=6", + "@walmart/core-widget-registry": ">=6", + "@walmart/me-at-walmart-athena-queries": ">=6", "@walmart/me-at-walmart-common": "*", - "@walmart/react-native-encrypted-storage": "^1.1.13", - "@walmart/react-native-logger": "^1.34.7", - "react": "18.x", - "react-native": "0.72.x", + "@walmart/react-native-encrypted-storage": "1.x", + "@walmart/react-native-logger": "1.x", + "react": "*", + "react-native": "*", "react-native-device-info": "10.x", - "wifi-store-locator": "^1.4.0" + "wifi-store-locator": "1.x" }, "peerDependenciesMeta": { "@walmart/core-services": { --- packages/me-at-walmart-container/src/graphql/policies.ts @@ -7,12 +7,16 @@ export const TypePolicies: StrictTypedTypePolicies = { getAssociateById: { keyArgs: ['id', 'idType'], read(existing, { toReference, args, readField }) { + // If existing data is already found, no need for cache redirect. if (existing) return existing; + + // Transform query args into cache redirect. const reference = toReference({ __typename: 'Associate', associateId: args?.id, }); - // Transform query args into cache lookup + + // Reading field and explicity returning undefined to handle bug where undefined cache value is returned as {}. return reference && readField('associateId', reference) ? reference : undefined; @@ -20,14 +24,16 @@ export const TypePolicies: StrictTypedTypePolicies = { }, getTeamById: { read(existing, { args, toReference, readField }) { + // If existing data is already found, no need for cache redirect. if (existing) return existing; + // Transform query args into cache redirect. const reference = toReference({ __typename: 'Team', teamId: args?.teamId, site: args?.storeNbr, }); - // Transform query args into cache lookup + // Reading field and explicity returning undefined to handle bug where undefined cache value is returned as {}. return reference && readField('teamId', reference) ? reference : undefined;
chore: package lock update and comment fixes
chore: package lock update and comment fixes
ccda91e4fb85a9418a962c641d2c9e98a663db58
--- packages/allspark-foundation/src/Components/ComponentContainers.tsx @@ -223,11 +223,11 @@ export class ComponentContainer<Props = {}> { // If allow is set, map allow to component filtering out undefined. Otherwise use all components. const components = allow ? allow - .filter((id) => this._components.has(id)) - .map( - (id) => - [id, this._components.get(id)] as [string, ComponentType<Props>] - ) + .filter((id) => this._components.has(id)) + .map( + (id) => + [id, this._components.get(id)] as [string, ComponentType<Props>] + ) : Array.from(this._components.entries()); return (
chore: lint fixes
chore: lint fixes
8dac22eb55a683f8355dd644563f6ab564373c61
--- packages/me-at-walmart-container/__mocks__/@walmart/allspark-foundation/Environment.js @@ -10,12 +10,4 @@ module.exports = { AllsparkReduxStore: { select: jest.fn(), }, - - EnvironmentActionTypes: { - SET: 'environment/SET', - }, - - EnvironmentSelectors: { - getState: jest.fn(), - }, }; --- packages/me-at-walmart-container/__tests__/services/user/utils.test.ts @@ -34,7 +34,17 @@ describe('Module Functions', () => { describe('emailDomainMatches', () => { it('should match email domains correctly', () => { - expect(emailDomainMatches.homeoffice('user@homeoffice.com')).toBe(true); + expect( + emailDomainMatches.homeoffice('jdoe123@homeoffice.wal-mart.com'), + ).toBe(true); + expect( + emailDomainMatches['store/club']( + 'jdoe123.s03304@stores.us.wal-mart.com', + ), + ).toBe(true); + expect( + emailDomainMatches['distribution center']('jdoe123@wmsc.wal-mart.com'), + ).toBe(true); expect(emailDomainMatches.homeoffice('user@other.com')).toBe(false); }); }); @@ -43,15 +53,23 @@ describe('Module Functions', () => { it('should infer domain from business unit', () => { expect(inferDomainFromBusinessUnit('HO')).toBe('homeoffice'); expect(inferDomainFromBusinessUnit('ST')).toBe('store/club'); + expect(inferDomainFromBusinessUnit('SC')).toBe('store/club'); + expect(inferDomainFromBusinessUnit('DC')).toBe('distribution center'); expect(inferDomainFromBusinessUnit(null)).toBeUndefined(); }); }); describe('inferDomainFromUpn', () => { it('should infer domain from UPN', () => { - expect(inferDomainFromUpn('user@homeoffice.com')).toBe('homeoffice'); - expect(inferDomainFromUpn('user.s0@store.com')).toBe('store/club'); - expect(inferDomainFromUpn('user@wmsc.com')).toBe('distribution center'); + expect(inferDomainFromUpn('jdoe123@homeoffice.wal-mart.com')).toBe( + 'homeoffice', + ); + expect(inferDomainFromUpn('jdoe123.s03304@stores.us.wal-mart.com')).toBe( + 'store/club', + ); + expect(inferDomainFromUpn('jdoe123@wmsc.wal-mart.com')).toBe( + 'distribution center', + ); expect(inferDomainFromUpn('user@other.com')).toBeUndefined(); }); });
chore: fix test
chore: fix test
f0a9867d11038ce921d88e4be75df3db6d77031a
--- package.json @@ -100,7 +100,7 @@ "@walmart/core-utils": "6.1.4", "@walmart/core-widget-registry": "6.1.4", "@walmart/counts-component-miniapp": "0.1.11", - "@walmart/emergency-mini-app": "1.27.6", + "@walmart/emergency-mini-app": "1.27.7", "@walmart/exception-mini-app": "1.8.3", "@walmart/facilities-management-miniapp": "0.11.7", "@walmart/feedback-all-spark-miniapp": "0.9.63", --- yarn.lock @@ -5978,9 +5978,9 @@ __metadata: languageName: node linkType: hard -"@walmart/emergency-mini-app@npm:1.27.6": - version: 1.27.6 - resolution: "@walmart/emergency-mini-app@npm:1.27.6" +"@walmart/emergency-mini-app@npm:1.27.7": + version: 1.27.7 + resolution: "@walmart/emergency-mini-app@npm:1.27.7" dependencies: "@walmart/allspark-utils": "npm:^1.6.5" "@walmart/core-widget-registry": "npm:^0.6.6" @@ -5995,7 +5995,7 @@ __metadata: react-native: ^0.67.4 react-redux: ^7.2.1 redux: ^4.1.2 - checksum: 10c0/296663a99916dd1952d00425eeee386d9c0277b9080508a58b5095bc5cf477f4caced419745beb4a14815edb41044e18b6a49d084fe3f0aae4cdabefcc70f0c0 + checksum: 10c0/3f87c142c624f2c13ffb9cc5a7c24d762cc77a916e4db622ffaf14d18cc916ebba04fb8b36a1e7e23837e448d65cfb24ae534b791e5f44c28e6322c207faa5d5 languageName: node linkType: hard @@ -7837,7 +7837,7 @@ __metadata: "@walmart/core-utils": "npm:6.1.4" "@walmart/core-widget-registry": "npm:6.1.4" "@walmart/counts-component-miniapp": "npm:0.1.11" - "@walmart/emergency-mini-app": "npm:1.27.6" + "@walmart/emergency-mini-app": "npm:1.27.7" "@walmart/exception-mini-app": "npm:1.8.3" "@walmart/facilities-management-miniapp": "npm:0.11.7" "@walmart/feedback-all-spark-miniapp": "npm:0.9.63"
emergency version increased
emergency version increased
7245dc9a2c620168b1260025ae37d62644f81e0c
--- android/app/build.gradle @@ -5,6 +5,7 @@ plugins { id 'kotlin-android' id 'kotlin-kapt' id 'com.google.firebase.crashlytics' + id 'com.google.firebase.firebase-perf' } import com.android.build.OutputFile --- android/build.gradle @@ -24,6 +24,7 @@ buildscript { classpath "com.google.dagger:hilt-android-gradle-plugin:2.34.1-beta" classpath 'com.google.gms:google-services:4.3.3' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0' + classpath 'com.google.firebase:perf-plugin:1.4.1' classpath 'com.walmart.ssmp:android-signing:1.0.9' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.32" // NOTE: Do not place your application dependencies here; they belong
adding firebase perf plugin
adding firebase perf plugin
9b51cd49af0e8ac731e948f8816d09e122cec4fc
--- src/components/Roster/Roster.tsx @@ -78,10 +78,7 @@ export const Roster: React.FC<RosterProps> = (props) => { ); setAssociates(sortedAssociates); //TODO: set the associates based on the getDailyRoster response } - }, [ - shouldSkipQuery, - getDailyRosterResponse?.getDailyRoster, - dataOverride]); //TODO: Give more specific dependency with correct type + }, [shouldSkipQuery, getDailyRosterResponse?.getDailyRoster, dataOverride]); //TODO: Give more specific dependency with correct type return ( <View style={styles.screen}> --- src/screens/RosterScreen.tsx @@ -1,213 +1,6 @@ -import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; -import {RefreshControl, StyleSheet, View} from 'react-native'; -import {useSelector} from 'react-redux'; -import {useSafeAreaInsets} from 'react-native-safe-area-context'; -import {FlashList} from '@shopify/flash-list'; -import {StackNavigationProp} from '@react-navigation/stack'; -import {UserSelectors} from '@walmart/redux-store'; -import {Alert, Body, Spinner} from '@walmart/gtp-shared-components'; - -import {Associate} from '../types'; -import {TeamChatCard, renderAssociateRosterItem} from '../components'; -import {RosterHeader} from '../components/RosterHeader'; -import {FilterValue, RosterFilters} from '../containers/RosterFilters'; -import { - useDailyRoster, - useUserIsInRoster, - useSiteTranslationContext, -} from '../hooks'; -import {TextingNavParamsMap} from '../navigation'; -import {logger} from '../logger/Logger'; -import {TEXTING_I18N_NAMESPACE} from '../translations'; -import {useTranslation} from 'react-i18next'; -import {teamLeadJobDescriptions} from '../redux/selectors'; -import { - sortedAssociateList, - associateIsClockedIn, - associateIsAbsent, -} from '../utils'; -import {analytics} from '../logger/Analytics'; +import React from 'react'; import {Roster} from '../components/Roster/Roster'; -const styles = StyleSheet.create({ - screen: { - flex: 1, - }, - teamCard: { - marginTop: 16, - marginHorizontal: 16, - }, - error: { - margin: 16, - }, - spinner: { - marginTop: 32, - }, - associateRosterItemContainer: { - marginHorizontal: 16, - height: 100, - }, - emptyState: { - marginTop: 24, - alignItems: 'center', - }, -}); - -type RosterScreenProps = { - navigation: StackNavigationProp<TextingNavParamsMap, 'myTeam.roster'>; -}; - -export const RosterScreen: React.FC<RosterScreenProps> = () => { - // const {bottom: bottomInset} = useSafeAreaInsets(); - // const {t} = useTranslation([TEXTING_I18N_NAMESPACE]); - // const flashListRef: any = useRef(null); - // const currentUserSite: string = useSelector(UserSelectors.getUserSite); - // - // const {loading, data, error, refetch} = useDailyRoster(); - // const allAssociates = (data?.getDailyRoster || []) as Associate[]; - // const rosterData = useMemo(() => { - // const associateList = (data?.getDailyRoster || []) as Associate[]; - // return associateList; - // }, [data?.getDailyRoster]); - // const clockedInCount = rosterData?.filter(associateIsClockedIn)?.length ?? 0; - // const absentCount = rosterData?.filter(associateIsAbsent)?.length ?? 0; - // const [associates, setAssociates] = useState<Associate[]>([]); - // const teamLeads = useSelector(teamLeadJobDescriptions) as string[]; - // const [pullToRefresh, setPullToRefresh] = useState(false); - // const loaderOffSet = 10; - // const siteTranslationContext = useSiteTranslationContext(); - // - // const onPullToRefresh = useCallback(() => { - // setPullToRefresh(true); - // refetch() - // .then(() => { - // setPullToRefresh(false); - // analytics( - // 'rosterPullDown', - // {message: 'Pull down to refresh successful'}, - // 10, - // ); - // }) - // .catch((err: any) => { - // logger.error('Error in pull down to refresh on Roster screen: ', { - // message: err.toString(), - // }); - // setPullToRefresh(false); - // }); - // }, [pullToRefresh]); - // - // useEffect(() => { - // if (data?.getDailyRoster) { - // setAssociates(sortedAssociateList(allAssociates, teamLeads)); - // } - // }, [allAssociates]); - // - // // Used for reference, does not need to trigger render - // const selectedFilter = useRef<FilterValue>(FilterValue.all); - // - // const extraData = useMemo( - // () => ({listLength: associates.length}), - // [associates.length], - // ); - // - // const userIsInRoster = useUserIsInRoster(); - // - // const onFilter = (filteredAssociates: Associate[], filterId: FilterValue) => { - // selectedFilter.current = filterId; - // setAssociates(sortedAssociateList(filteredAssociates, teamLeads)); - // }; - // - // const handleScrollToTop = () => { - // if (flashListRef.current) { - // flashListRef.current.scrollToIndex({index: 0}); - // } - // }; - // - // const ListEmptyComponent = () => { - // if (loading) { - // return ( - // <Spinner - // color='gray' - // UNSAFE_style={styles.spinner} - // testID={'rosterScreenLoadingSpinner'} - // /> - // ); - // } - // - // if (error) { - // logger.error('error fetching daily roster', {message: error.toString()}); - // return ( - // <Alert - // variant='warning' - // children={'Error fetching daily roster'} - // UNSAFE_style={styles.error} - // /> - // ); - // } - // - // // @todo - improve styling and verbiage of empty state use translations for filter once defined - // return ( - // <View style={styles.emptyState}> - // {selectedFilter.current !== FilterValue.all ? ( - // <Body>{`No ${selectedFilter.current} users found`}</Body> - // ) : ( - // <Body>No users found</Body> - // )} - // </View> - // ); - // }; - - return ( - <Roster /> - ); - - // return ( - // <View style={styles.screen}> - // <FlashList - // ListHeaderComponent={ - // <> - // {/* @todo - determine if this should be shown on empty state */} - // - // <RosterFilters - // associates={allAssociates} - // clockedInCount={clockedInCount} - // absentCount={absentCount} - // onFilter={onFilter} - // /> - // {!loading && !userIsInRoster && ( - // <Alert variant='warning' UNSAFE_style={styles.error}> - // {t('rosterScreen.notInRoster', { - // siteId: currentUserSite, - // context: siteTranslationContext, - // })} - // </Alert> - // )} - // <TeamChatCard - // style={styles.teamCard} - // scrollToTop={handleScrollToTop} - // /> - // - // {/* @todo - determine if this should be shown on empty state */} - // {!!associates.length && <RosterHeader associates={associates} />} - // </> - // } - // ListEmptyComponent={ListEmptyComponent} - // data={associates} - // extraData={extraData} - // refreshing={loading} - // estimatedItemSize={100} - // renderItem={renderAssociateRosterItem} - // contentInset={{bottom: bottomInset}} - // showsVerticalScrollIndicator={false} - // ref={flashListRef} - // refreshControl={ - // <RefreshControl - // refreshing={pullToRefresh} - // onRefresh={onPullToRefresh} - // progressViewOffset={loaderOffSet} - // /> - // } - // /> - // </View> - // ); +export const RosterScreen: React.FC<any> = () => { + return <Roster />; };
simplify Roster screen to user roster component
simplify Roster screen to user roster component
93bec491bf6a16dc2543b44d46be83bf36577c3b
--- __tests__/channels/components/__snapshots__/UnreadBadge.test.tsx.snap @@ -10,6 +10,8 @@ exports[`UnreadBadge should display "99+" when unreadCount exceeds 99 1`] = ` [ { "backgroundColor": "#ffc220", + "borderColor": "#803d10", + "borderWidth": 1, }, { "alignItems": "center", @@ -65,6 +67,8 @@ exports[`UnreadBadge should render the badge when there are unread messages and [ { "backgroundColor": "#ffc220", + "borderColor": "#803d10", + "borderWidth": 1, }, { "alignItems": "center", --- __tests__/screens/MessagesScreen/ClockOutInputDisabledSimpleTest.tsx @@ -2,6 +2,11 @@ import React from 'react'; import {act} from '@testing-library/react-native'; import {MessagesScreen} from '../../../src/modals/MessagesScreen'; +// Import after mocks +import {renderWithProviders} from '../../harness'; +import {ClockSelectors} from '@walmart/allspark-foundation/Clock'; +import {ChatInput} from '../../../src/containers/ChatInput'; + // Track ChatInput props let chatInputProps: any = null; @@ -24,11 +29,6 @@ jest.mock('@walmart/allspark-foundation/Clock', () => ({ }, })); -// Import after mocks -import {renderWithProviders} from '../../harness'; -import {ClockSelectors} from '@walmart/allspark-foundation/Clock'; -import {ChatInput} from '../../../src/containers/ChatInput'; - // Mock other required dependencies jest.mock('@walmart/allspark-foundation/User', () => ({ UserSelectors: { @@ -37,7 +37,7 @@ jest.mock('@walmart/allspark-foundation/User', () => ({ getFirstName: jest.fn(() => 'Test'), getSiteId: jest.fn(() => '100'), getCountryCode: jest.fn(() => 'US'), - getData: jest.fn(() => ({ userID: 'test-user-123' })), + getData: jest.fn(() => ({userID: 'test-user-123'})), getTeamIds: jest.fn(() => []), }, })); @@ -57,11 +57,11 @@ jest.mock('@walmart/allspark-foundation/Network', () => ({ jest.mock('@react-navigation/native', () => ({ ...jest.requireActual('@react-navigation/native'), - useNavigation: () => ({ navigate: jest.fn(), goBack: jest.fn() }), + useNavigation: () => ({navigate: jest.fn(), goBack: jest.fn()}), useRoute: () => ({ params: { channelPath: '/channels/test-channel', - channel: { id: 'test-channel', name: 'Test Channel', type: 'team' }, + channel: {id: 'test-channel', name: 'Test Channel', type: 'team'}, }, }), })); @@ -78,12 +78,12 @@ jest.mock('../../../src/common/logger', () => ({ })); jest.mock('../../../src/hooks/roster', () => ({ - useDailyRoster: jest.fn(() => ({ - data: null, + useDailyRoster: jest.fn(() => ({ + data: null, loading: false, // Not loading so input isn't disabled by roster - refetch: jest.fn() + refetch: jest.fn() })), - useGetTeamById: jest.fn(() => ({ data: null, loading: false, refetch: jest.fn() })), + useGetTeamById: jest.fn(() => ({data: null, loading: false, refetch: jest.fn()})), })); jest.mock('../../../src/hooks/user', () => ({ @@ -145,7 +145,7 @@ describe('MessagesScreen - Clock Out Input Disabled Simple', () => { // Start with user clocked in (ClockSelectors.getIsClockedIn as jest.Mock).mockReturnValue(true); - const { rerender } = renderWithProviders( + const {rerender} = renderWithProviders( <MessagesScreen {...defaultProps} closeModal={mockCloseModal} /> ); @@ -169,4 +169,4 @@ describe('MessagesScreen - Clock Out Input Disabled Simple', () => { // Verify now disabled expect(chatInputProps.disabled).toBe(true); }); -}); \ No newline at end of file +}); --- __tests__/screens/MessagesScreen/__snapshots__/OneToOneChatTests.tsx.snap @@ -472,11 +472,6 @@ exports[`Messages Screen One To One Chat should load list empty state when no me testID="error-component" > <View - accessibilityLabel="error : Connection lost" - accessibilityRole="alert" - accessible={true} - importantForAccessibility="auto" - onAccessibilityAction={[Function]} style={ [ { @@ -543,6 +538,8 @@ exports[`Messages Screen One To One Chat should load list empty state when no me } > <Text + accessibilityRole="alert" + accessible={true} style={ [ { @@ -1311,11 +1308,6 @@ exports[`Messages Screen One To One Chat should send a text message and push not testID="error-component" > <View - accessibilityLabel="error : Connection lost" - accessibilityRole="alert" - accessible={true} - importantForAccessibility="auto" - onAccessibilityAction={[Function]} style={ [ { @@ -1382,6 +1374,8 @@ exports[`Messages Screen One To One Chat should send a text message and push not } > <Text + accessibilityRole="alert" + accessible={true} style={ [ {
feat(ui): update snapshots
feat(ui): update snapshots
cc0daf612e6d9c49b6221dacd603221c169a3ee4
--- packages/allspark-foundation-hub/src/HubFeature/SupplyChain/Components/ExpandedTeamShift/ExpandedTeamShift.tsx @@ -9,7 +9,11 @@ import { colors, Divider } from '@walmart/gtp-shared-components'; import { useAllsparkTranslation } from '@walmart/allspark-foundation'; import { ActionButtonGroup } from '../../../Shared/Components/ActionButtonGroup'; import { FEATURE_ID } from '../../constant'; +import { useSelector } from 'react-redux'; +import { shiftFilterGroupEnabled } from '../../Redux'; + export const ExpandedTeamShift = () => { + const showShiftFilterList = useSelector(shiftFilterGroupEnabled); const { t } = useAllsparkTranslation(FEATURE_ID); //TODO: Remove dummy data const shiftdata = [ @@ -47,12 +51,14 @@ export const ExpandedTeamShift = () => { return ( <> <View style={styles.container}> - <ShiftFilterList - filterListData={shiftdata} - handleSelectShift={() => {}} - isLoading={false} - isModal - /> + {showShiftFilterList && ( + <ShiftFilterList + filterListData={shiftdata} + handleSelectShift={() => {}} + isLoading={false} + isModal + /> + )} <Divider UNSAFE_style={styles.divider} /> <HubHeader title={t('expandedTeamShiftModal.Teams.title')}
feat: implemented show shift filter list ff
feat: implemented show shift filter list ff
9ebe786828bf119081d6829814aa6577794b4268
--- android/app/build.gradle @@ -1,4 +1,6 @@ apply plugin: "com.android.application" +apply plugin: 'com.google.gms.google-services' +apply plugin: 'com.google.firebase.crashlytics' import com.android.build.OutputFile @@ -242,3 +244,25 @@ task copyDownloadableDepsToLibs(type: Copy) { } apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) + +apply plugin: 'com.walmart.amp.androidsigning' + +android { + buildTypes { + release { + tasks.whenTaskAdded { task -> + if(task.name.matches(/^assemble.*Release$/)) { + task.finalizedBy 'signReleaseApkTask' + } + } + } + debug { + tasks.whenTaskAdded { task -> + if(task.name.matches(/^assemble.*Debug/) || task.name.matches(/^package.*Debug$/)) + task.finalizedBy 'signDebugApkTask' + if(task.name.matches(/^assemble.*DebugAndroidTest/) || task.name.matches(/^package.*DebugAndroidTest$/)) + task.finalizedBy 'signTestApkTask' + } + } + } +} \ No newline at end of file --- android/app/google-services.json @@ -0,0 +1,40 @@ +{ + "project_info": { + "project_number": "572613464107", + "firebase_url": "https://wmt-allspark-poc.firebaseio.com", + "project_id": "wmt-allspark-poc", + "storage_bucket": "wmt-allspark-poc.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:572613464107:android:60d1c24ec43a76d9091a6e", + "android_client_info": { + "package_name": "com.walmart.stores.allspark.beta" + } + }, + "oauth_client": [ + { + "client_id": "572613464107-7rkhp7khtiaud5q6r7icr7df7gil406n.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyCMVoZkqZehJNHwKor4dn9l8kB3iitKdrM" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "572613464107-7rkhp7khtiaud5q6r7icr7df7gil406n.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file --- android/app/src/main/AndroidManifest.xml @@ -24,7 +24,6 @@ android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" - android:launchMode="singleTask" android:windowSoftInputMode="adjustResize"> <intent-filter> <action android:name="android.intent.action.MAIN" /> --- android/build.gradle @@ -16,6 +16,8 @@ buildscript { } dependencies { classpath("com.android.tools.build:gradle:3.5.3") + classpath 'com.google.gms:google-services:4.3.3' + classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0' classpath 'com.walmart.amp:android-signing:1.0.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files --- index.js @@ -2,6 +2,9 @@ * @format */ +import 'intl'; +import 'intl/locale-data/jsonp/en'; + import {AppRegistry} from 'react-native'; import {RootContainer} from './src/core/RootContainer'; import {name as appName} from './app.json'; --- package-lock.json @@ -4800,6 +4800,11 @@ "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "optional": true }, + "intl": { + "version": "1.2.5", + "resolved": "https://npme.walmart.com/intl/-/intl-1.2.5.tgz", + "integrity": "sha1-giRKIZDE5Bn4Nx9ao02qNCDiq94=" + }, "invariant": { "version": "2.2.4", "resolved": "https://npme.walmart.com/invariant/-/invariant-2.2.4.tgz", --- package.json @@ -34,6 +34,7 @@ "@walmart/ask-sam-mini-app": "0.0.4", "@walmart/gtp-shared-components": "^0.1.3", "@walmart/redux-store": "0.0.11", + "intl": "^1.2.5", "lodash": "^4.17.20", "react": "16.13.1", "react-native": "0.63.2", --- src/auth/AuthenticatorView.tsx @@ -44,6 +44,7 @@ export const AuthenticatorView: React.FC<Props> = (props) => { const signIn = useMemo( () => () => { + console.log('signing in'); dispatch(actions.sso.signInStarted()); WMSingleSignOn.signIn(activityName); }, @@ -51,9 +52,24 @@ export const AuthenticatorView: React.FC<Props> = (props) => { ); useEffect(() => { + console.log('setting env'); + WMSingleSignOn.setEnv(env); + WMSingleSignOn.setRedirectUri(redirectUri); + + dispatch( + actions.storeConfig.storeConfigSuccess({ + market: 'walmart', + environment: 'dev', + }), + ); + }, [env, redirectUri, dispatch]); + + useEffect(() => { + console.log('setting sso event listeners'); const subscription = ssoEventEmitter.addListener( SSOPingFedEvents.name, (event: SSOPingFedEventData) => { + console.log('received sso event with action', event.action); switch (event.action) { case SSOPingFedEvents.types.authSuccess: case SSOPingFedEvents.types.userChanged: @@ -69,27 +85,17 @@ export const AuthenticatorView: React.FC<Props> = (props) => { return () => subscription.remove(); }, [dispatch]); - useEffect(() => { - WMSingleSignOn.setEnv(env); - WMSingleSignOn.setRedirectUri(redirectUri); - - dispatch( - actions.storeConfig.storeConfigSuccess({ - market: 'walmart', - environment: 'dev', - }), - ); - }, [env, redirectUri, dispatch]); - useEffect(() => { if (!user || !user.userId) { + console.log('no user or no user id '); signIn(); } }, [user, dispatch, activityName, signIn]); // this is a hack useEffect(() => { - if (user && !user.token) { + if (user && user.userId && !user.token) { + console.log('got a user but no token; querying for token'); WMSingleSignOn.getFreshAccessToken().then((token) => { dispatch( actions.sso.signInSuccess({
fix android stuff
fix android stuff
19b48e500c69b546abd02a4b9028184a000fec80
--- src/cafeOrders/components/messages/ChannelRow.tsx @@ -76,7 +76,7 @@ export const ChannelRow = (props: ChannelRowProps) => { recentRead, } = snapshot.data() as Channel; - const lastMessageData = (await lastMessage.get()).data(); + const lastMessageData = (await lastMessage?.get()).data(); const lastMessageMoment = moment(lastMessageTime?.toDate()); const unread = recentRead?.[viewer] ? moment(recentRead[viewer].toDate()).isBefore(lastMessageMoment) --- src/cafeOrders/screens/MessagesScreen.tsx @@ -190,6 +190,7 @@ export const MessagesScreen = () => { channelDoc.set({ participants: [user.userId, ...participants], createdAt: firestore.FieldValue.serverTimestamp(), + [`recentRead.${user.userId}`]: firestore.FieldValue.serverTimestamp(), }); } else { channelDoc.update({ --- src/cafeOrders/components/messages/ChannelRow.tsx @@ -76,7 +76,7 @@ export const ChannelRow = (props: ChannelRowProps) => { recentRead, } = snapshot.data() as Channel; - const lastMessageData = (await lastMessage.get()).data(); + const lastMessageData = (await lastMessage?.get()).data(); const lastMessageMoment = moment(lastMessageTime?.toDate()); const unread = recentRead?.[viewer] ? moment(recentRead[viewer].toDate()).isBefore(lastMessageMoment) --- src/cafeOrders/screens/MessagesScreen.tsx @@ -190,6 +190,7 @@ export const MessagesScreen = () => { channelDoc.set({ participants: [user.userId, ...participants], createdAt: firestore.FieldValue.serverTimestamp(), + [`recentRead.${user.userId}`]: firestore.FieldValue.serverTimestamp(), }); } else { channelDoc.update({
fix: fix recent read
fix: fix recent read
19be8da5d8a6e10e0e0d2f53f550eee526a3d12d
--- docs/CHANGELOG.md @@ -1,3 +1,10 @@ +# [2.4.0](https://gecgithub01.walmart.com/smdv/roster-miniapp/compare/v2.3.1...v2.4.0) (2024-06-17) + + +### Features + +* **ui:** update version SMDV-5884 ([c35c2bb](https://gecgithub01.walmart.com/smdv/roster-miniapp/commit/c35c2bb8362bddfd6397da0aec05096b9984cdeb)) + ## [2.3.1](https://gecgithub01.walmart.com/smdv/roster-miniapp/compare/v2.3.0...v2.3.1) (2024-06-13) --- package.json @@ -1,6 +1,6 @@ { "name": "@walmart/roster-mini-app", - "version": "2.3.1", + "version": "2.4.0", "main": "dist/index.js", "files": [ "dist"
chore(release): 2.4.0 [skip ci]
chore(release): 2.4.0 [skip ci] # [2.4.0](https://gecgithub01.walmart.com/smdv/roster-miniapp/compare/v2.3.1...v2.4.0) (2024-06-17) ### Features * **ui:** update version SMDV-5884 ([c35c2bb](https://gecgithub01.walmart.com/smdv/roster-miniapp/commit/c35c2bb8362bddfd6397da0aec05096b9984cdeb))
a33fff485250e24c8ffce49aedbdccb8517d20c6
--- package-lock.json @@ -4475,9 +4475,9 @@ } }, "@walmart/taskit-mini-app": { - "version": "0.220.0-rc.3", - "resolved": "https://npme.walmart.com/@walmart/taskit-mini-app/-/taskit-mini-app-0.220.0-rc.3.tgz", - "integrity": "sha512-z2/Jbqxuo4fn1cAhKDtglOaRx7L2Z2tE9kvkxK7CGwWowLdnSeJ/8AQd2TOxZrVJ3mPlf+h6rBi5ob/4AIRx4w==" + "version": "0.228.0-rc.0", + "resolved": "https://npme.walmart.com/@walmart/taskit-mini-app/-/taskit-mini-app-0.228.0-rc.0.tgz", + "integrity": "sha512-8SdqWRLpPznrF7mXgornPrOYEtdJsTU+85OEgCw+gn3odZTDMQxUJ7UOjJb7xiNX3OkVMWadPL1wqYaZMgEmHg==" }, "@walmart/time-clock-mini-app": { "version": "0.4.30", --- package.json @@ -101,7 +101,7 @@ "@walmart/schedule-mini-app": "0.12.0", "@walmart/settings-mini-app": "1.6.0", "@walmart/shelfavailability-mini-app": "0.8.3", - "@walmart/taskit-mini-app": "0.220.0-rc.3", + "@walmart/taskit-mini-app": "0.228.0-rc.0", "@walmart/time-clock-mini-app": "0.4.30", "@walmart/ui-components": "1.3.0-rc.14", "@walmart/welcomeme-mini-app": "0.45.0",
Updating taskIt version
Updating taskIt version
23473ca2c83024d0c06f07f98b55d6a506d88a19
--- android/build.gradle @@ -24,6 +24,8 @@ buildscript { // Otherwise we default to the side-by-side NDK version from AGP. ndkVersion = "21.4.7075529" } + androidXAnnotation = "1.2.0" + androidXBrowser = "1.3.0" } repositories { google() --- package-lock.json @@ -25223,9 +25223,9 @@ "integrity": "sha512-RjGgH87+RVySi+C2rvTc6Crav4XWA27wCqKM1iKRpxgepjo1d6SmtyDRlmYIAKvxgvaP0z6YkQFDTR0Ziqshxw==" }, "@walmart/feedback-all-spark-miniapp": { - "version": "0.9.25", - "resolved": "https://npme.walmart.com/@walmart/feedback-all-spark-miniapp/-/feedback-all-spark-miniapp-0.9.25.tgz", - "integrity": "sha512-xSrJMEScMx3bC5AzGIBn7B1DhTmMPG6Wd3q4IREQjiTv5H37ezd7YWu5CkpHTAmezFOiFbaNvPmeNyIkQl+A+A==" + "version": "0.9.32", + "resolved": "https://npme.walmart.com/@walmart/feedback-all-spark-miniapp/-/feedback-all-spark-miniapp-0.9.32.tgz", + "integrity": "sha512-rjO+YZ2W5CYKXwYXGZTVt5ztJOy9l5no1wOYmvbUsnZQZ8/U7J6ZYQQ3HOX5zabGEYtSdZadEGV0CBixLgGEGg==" }, "@walmart/financial-wellbeing-feature-app": { "version": "1.6.3", --- package.json @@ -88,7 +88,7 @@ "@walmart/emergency-mini-app": "1.23.2", "@walmart/exception-mini-app": "1.2.30", "@walmart/facilities-management-miniapp": "0.6.7", - "@walmart/feedback-all-spark-miniapp": "0.9.25", + "@walmart/feedback-all-spark-miniapp": "0.9.32", "@walmart/financial-wellbeing-feature-app": "1.6.3", "@walmart/functional-components": "~4.0.3", "@walmart/gta-react-native-calendars": "0.0.16",
feedback-mini-app version bump
feedback-mini-app version bump
11ed19eacf97608f26f0f2a8f5eb7aa64816504b
--- package.json @@ -96,7 +96,7 @@ "@walmart/react-native-sumo-sdk": "2.8.0", "@walmart/redux-store": "6.3.29", "@walmart/ui-components": "1.15.1", - "@walmart/wmconnect-mini-app": "2.37.0", + "@walmart/wmconnect-mini-app": "2.37.1", "babel-jest": "^29.6.3", "chance": "^1.1.11", "crypto-js": "~4.2.0", --- yarn.lock @@ -7116,7 +7116,7 @@ __metadata: "@walmart/react-native-sumo-sdk": "npm:2.8.0" "@walmart/redux-store": "npm:6.3.29" "@walmart/ui-components": "npm:1.15.1" - "@walmart/wmconnect-mini-app": "npm:2.37.0" + "@walmart/wmconnect-mini-app": "npm:2.37.1" babel-jest: "npm:^29.6.3" chance: "npm:^1.1.11" crypto-js: "npm:~4.2.0" @@ -7199,9 +7199,9 @@ __metadata: languageName: node linkType: hard -"@walmart/wmconnect-mini-app@npm:2.37.0": - version: 2.37.0 - resolution: "@walmart/wmconnect-mini-app@npm:2.37.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fwmconnect-mini-app%2F-%2F%40walmart%2Fwmconnect-mini-app-2.37.0.tgz" +"@walmart/wmconnect-mini-app@npm:2.37.1": + version: 2.37.1 + resolution: "@walmart/wmconnect-mini-app@npm:2.37.1::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fwmconnect-mini-app%2F-%2F%40walmart%2Fwmconnect-mini-app-2.37.1.tgz" dependencies: expo: "npm:~52.0.46" react: "npm:18.3.1" @@ -7216,7 +7216,7 @@ __metadata: dependenciesMeta: "@walmart/me-at-walmart": built: false - checksum: 10c0/c44e72c8868ce9a0a3f28f478ee90e7e6937bbecca70cc0b072eb3d3cb554d010569e647f8878d15148251bf27b229f54b9d596121f3013133074863f917194d + checksum: 10c0/da10edb453595540a412568513b18de5565279ff18dc6dae8af57aa197ed746a0f7832d0aa0e793620421e35ec922522271a6fcd2cf2ed7208e7a315ed62fc98 languageName: node linkType: hard
feat(ui): updating version
feat(ui): updating version
ca1fa9ca4ac8fd07bf0d11d8fbfca2edb989387a
--- src/index.tsx @@ -25,10 +25,12 @@ import {MeganavScreen} from './screens/MeganavScreen'; import {ClockedOutScreenGuard} from './components/ClockedOutScreenGuard'; import {useChannelUnreadCount, useMessagesUnreadCount} from './channels'; import {useTeamTextingFeature, useOneOnOneTextWithWin} from './hooks'; +import {onNewMessage} from './navigation/utils'; export {PushToTalkProvider} from './channels/pushToTalkProvider'; export const LOGGER_FIELDS = {id: 'texting-mini-app'}; +export const openNewMessageScreen = onNewMessage; export const MyTeamHooks = { useChannelUnreadCount: useChannelUnreadCount, useMessagesUnreadCount: useMessagesUnreadCount, --- src/navigation/utils.ts @@ -6,7 +6,16 @@ import { TransitionPresets, } from '@react-navigation/stack'; import {TextingNavParamsMap} from './types'; -import {navigate} from '@walmart/react-native-shared-navigation'; +import { + getCurrentRouteName, + navigate, +} from '@walmart/react-native-shared-navigation'; +import { + ROOT_CONTAINER_SCREEN_NAME, + APP_CONTAINER_SCREEN_NAME, + NEW_MESSAGES_SCREEN_NAME, +} from '../constants'; +import {analytics} from '../logger/Analytics'; let comingFrom: keyof TextingNavParamsMap | null = null; const REPLACE_SCREEN = 'myTeam.newMessage'; @@ -99,3 +108,25 @@ export const goToIndividualSchedule = ( }, }); }; + +export const onNewMessage = () => { + const routeInfo = getCurrentRouteName(); + console.log('Route info: ', routeInfo); + + analytics( + 'newMessageNavigation', + { + routeInfo: routeInfo, + message: 'New message navigation from outside MyTeam', + }, + 10, + ); + + navigate(ROOT_CONTAINER_SCREEN_NAME, { + // @ts-ignore + screen: APP_CONTAINER_SCREEN_NAME, + params: { + screen: NEW_MESSAGES_SCREEN_NAME, + }, + }); +}; --- src/index.tsx @@ -25,10 +25,12 @@ import {MeganavScreen} from './screens/MeganavScreen'; import {ClockedOutScreenGuard} from './components/ClockedOutScreenGuard'; import {useChannelUnreadCount, useMessagesUnreadCount} from './channels'; import {useTeamTextingFeature, useOneOnOneTextWithWin} from './hooks'; +import {onNewMessage} from './navigation/utils'; export {PushToTalkProvider} from './channels/pushToTalkProvider'; export const LOGGER_FIELDS = {id: 'texting-mini-app'}; +export const openNewMessageScreen = onNewMessage; export const MyTeamHooks = { useChannelUnreadCount: useChannelUnreadCount, useMessagesUnreadCount: useMessagesUnreadCount, --- src/navigation/utils.ts @@ -6,7 +6,16 @@ import { TransitionPresets, } from '@react-navigation/stack'; import {TextingNavParamsMap} from './types'; -import {navigate} from '@walmart/react-native-shared-navigation'; +import { + getCurrentRouteName, + navigate, +} from '@walmart/react-native-shared-navigation'; +import { + ROOT_CONTAINER_SCREEN_NAME, + APP_CONTAINER_SCREEN_NAME, + NEW_MESSAGES_SCREEN_NAME, +} from '../constants'; +import {analytics} from '../logger/Analytics'; let comingFrom: keyof TextingNavParamsMap | null = null; const REPLACE_SCREEN = 'myTeam.newMessage'; @@ -99,3 +108,25 @@ export const goToIndividualSchedule = ( }, }); }; + +export const onNewMessage = () => { + const routeInfo = getCurrentRouteName(); + console.log('Route info: ', routeInfo); + + analytics( + 'newMessageNavigation', + { + routeInfo: routeInfo, + message: 'New message navigation from outside MyTeam', + }, + 10, + ); + + navigate(ROOT_CONTAINER_SCREEN_NAME, { + // @ts-ignore + screen: APP_CONTAINER_SCREEN_NAME, + params: { + screen: NEW_MESSAGES_SCREEN_NAME, + }, + }); +};
initial commit for exposing the new message screen nav
initial commit for exposing the new message screen nav
36043a0998ec3f3b111d4f9e421a26e2b81fc405
--- core/__tests__/navigation/USHallway/AssociateHallwayNav/__snapshots__/MainStackNavTest.tsx.snap @@ -487,6 +487,15 @@ exports[`AssociateHallwayNav matches snapshot; handles mount and unmount effects } } /> + <Screen + component={[Function]} + name="DigitalLocksMiniApp" + options={ + { + "headerShown": false, + } + } + /> <Screen component={[Function]} name="Core.ChangeStoreModal" @@ -1127,6 +1136,15 @@ exports[`AssociateHallwayNav matches snapshot; handles mount and unmount effects } } /> + <Screen + component={[Function]} + name="DigitalLocksMiniApp" + options={ + { + "headerShown": false, + } + } + /> <Screen component={[Function]} name="Core.ChangeStoreModal"
snapshot updates
snapshot updates
0cace8833bf492a99fe581baade8e4da3d6534b4
--- package.json @@ -270,4 +270,4 @@ "engines": { "node": ">=18" } -} \ No newline at end of file +}
dummy commit to revive branch
dummy commit to revive branch
db580a7f79591d4bd0d65b06a19dd9a72567c952
--- src/home/index.tsx @@ -70,4 +70,8 @@ export const HomeFeature = new AllsparkFeatureModule('home', { // @ts-ignore - not typed for more than two levels deep 'es-MX': esMX, }, + metadata: { + configKey: 'home', + packageName: 'Me@Walmart' + }, });
fix(home): metadata for home page screen (#5337)
fix(home): metadata for home page screen (#5337) Co-authored-by: Maksym Novakh <maksym.novakh@walmart.com>
7d3148e1326e346b3e39dc1c5b5e45415e2d1b1e
--- __tests__/navigation/navigationUtils.test.tsx @@ -1,7 +1,6 @@ import { CardStyleInterpolators, TransitionPresets, - createStackNavigator, } from '@react-navigation/stack'; import { MessageStyleInterpolator,
Update roster widget on my Team mini app
Update roster widget on my Team mini app
3b886827b32f93e784341c040583e832ddd47e5d
--- packages/allspark-http-client/src/react/providers.tsx @@ -42,7 +42,7 @@ export const HttpClientProvider = ( */ export const HttpClientCloneProvider = forwardRef< IHttpClient, - { id: string; config: HttpClientConfig } + PropsWithChildren<{ id: string; config: HttpClientConfig }> >((props, ref) => { const { children, config = {}, id } = props; --- packages/allspark-http-client/src/warnings.ts @@ -1,20 +1,10 @@ export const warnForIncorrectInterceptors = (key: string) => { console.warn( - `HttpClient Warning - requestInterceptors or responseInterceptors are specified in clone config for ${key}. - This is deprecated and the interceptors filed should be used instead. Example: - config = { - interceptors: [ - { request: , response: } - ] - } - ` + `HttpClient Warning!\n"requestInterceptors" or "responseInterceptors" are specified in clone config for ${key}.\nThese fields are deprecated and "interceptors" should be used instead.` ); }; - export const warnForLegacyCalls = (method: string, url: string) => { console.warn( - `HttpClient Warning - ${method} request to ${url} may be using an incorrect request format. - ${method} calls should follow the format: ${method}(url, data, config). - ` + `HttpClient Warning!\n${method} request to ${url} may be using an incorrect format.\n${method} calls should follow the format: ${method}(url, data, config) not ${method}(url, config)` ); };
fix: adjust warning format. fix clone provider props type
fix: adjust warning format. fix clone provider props type
c6103bbe1aea679c3abb3da4fd37903bf41a9686
--- src/navigation/AssociateHallwayNav/SideMenuContent.tsx @@ -76,7 +76,7 @@ export const SideMenuContent: React.FC<DrawerContentComponentProps< action: { type: 'DEEPLINK', value: - 'https://walmartglobalcert.service-now.com/wm_sp?id=sc_cat_item&sys_id=e42427511bb5f0d0bcd8ca63604bcb20', + 'https://walmartglobal.service-now.com/wm_sp?id=sc_cat_item&sys_id=e42427511bb5f0d0bcd8ca63604bcb20', }, }, { @@ -88,8 +88,7 @@ export const SideMenuContent: React.FC<DrawerContentComponentProps< subMenuOverridden: false, action: { type: 'DEEPLINK', - value: - 'https://walmartglobalcert.service-now.com/wm_sp?id=wm_vac_stats', + value: 'https://walmartglobal.service-now.com/wm_sp?id=wm_vac_stats', }, }, {
updated covid verification links
updated covid verification links
0471e419d647e9be1fefd1c360f12a8daa325b41
--- __tests__/core/RootContainerTest.tsx @@ -23,6 +23,7 @@ jest.mock('../../src/core/httpClientInit', () => ({})); jest.mock('../../src/core/i18nInit', () => ({ initI18n: jest.fn(), })); +jest.mock('../../src/core/storeConfigInit.ts', () => ({})); describe('RootContainer', () => { it('renders', () => { --- __tests__/core/storeConfigInitTest.ts @@ -0,0 +1,113 @@ +import {takeLatest, all, call} from 'redux-saga/effects'; + +import {onUserChanged, storeSagas} from '../../src/core/storeConfigInit'; + +jest.mock('@walmart/config-components', () => ({ + StoreConfig: { + initialize: jest.fn(), + get: jest.fn(), + }, +})); + +jest.mock('@walmart/redux-store', () => ({ + storeConfigActions: { + storeConfigProgress: jest.fn(), + storeConfigSuccess: jest.fn(), + storeConfigError: jest.fn(), + }, + addSagas: jest.fn(), +})); + +import {User, Site, storeConfigActions} from '@walmart/redux-store'; +import {StoreConfig} from '@walmart/config-components'; + +describe('onUserChanged', () => { + const user: User = { + userId: 'test', + domain: 'store', + countryCode: 'us', + employeeType: 'x', + division: '1', + fullTimePartTime: 'f', + win: '123', + siteId: 'junk', + }; + + const storeConfig: Site = { + currency: {code: 'usd', description: 'dollahs'}, + division: {code: '1', description: 'wm'}, + hoursOpen: '8-7', + is24Hour: false, + isOpenSunday: false, + isStoreOpen: false, + isTempStore: false, + language: {code: 'en', description: 'anglish'}, + location: { + address: { + addressLine1: '123', + city: '123', + state: 'ar', + countryCode: 'us', + country: 'us', + county: 'benton', + postalCode: '72712', + }, + }, + relocationStoreNumber: 0, + siteId: 100, + specialHours: [], + timeZone: { + dstOffset: 1, + dstobservable: false, + rawOffset: 6, + standard: '', + timeZoneCode: 'cdt', + timeZoneId: 'c', + timeZoneName: 'central daylight', + }, + }; + + it('handles no site id', () => { + user.siteId = 'junk'; + const iterator = onUserChanged({payload: user, type: ''}); + expect(iterator.next().done).toBe(true); + }); + + it('handles success', () => { + user.siteId = '100'; + const iterator = onUserChanged({payload: user, type: ''}); + expect(iterator.next().value).toEqual( + call(storeConfigActions.storeConfigProgress), + ); + expect(iterator.next().value).toEqual(call(StoreConfig.get, user.siteId)); + expect(iterator.next(storeConfig).value).toEqual( + call(storeConfigActions.storeConfigSuccess, storeConfig), + ); + expect(iterator.next().done).toEqual(true); + }); + + it('handles failure', () => { + user.siteId = '4'; + user.siteId = '100'; + const iterator = onUserChanged({payload: user, type: ''}); + expect(iterator.next().value).toEqual( + call(storeConfigActions.storeConfigProgress), + ); + expect(iterator.next().value).toEqual(call(StoreConfig.get, user.siteId)); + const err = new Error('ops'); + expect(iterator.throw(err).value).toEqual( + call(storeConfigActions.storeConfigError, err), + ); + expect(iterator.next().done).toBe(true); + }); +}); + +describe('storeSagas', () => { + it('sets up watchers and otherwise inits sagas', () => { + const iterator = storeSagas(); + expect(iterator.next().value).toEqual( + all([takeLatest(expect.any(String), onUserChanged)]), + ); + expect(iterator.next().done).toEqual(true); + }); +}); --- package-lock.json @@ -1927,9 +1927,9 @@ "integrity": "sha512-mSdBGR2GjE0zowLmyi+pxJIA5CDvC0NZczKk3yqfhKghON4M+2K+vpm224WklY7+UpvlFtwr/CzNsfIYyNnW1w==" }, "@walmart/redux-store": { - "version": "1.0.3", - "resolved": "https://npme.walmart.com/@walmart/redux-store/-/redux-store-1.0.3.tgz", - "integrity": "sha512-j+jPTwESqYXtPZPj9l7kBJhP5eh/FXVMRHadtBGonR0WWrVv0xgt03pDEG8jvnuSrF2T31oR7kmjJ2mBa2XB5g==" + "version": "1.0.4", + "resolved": "https://npme.walmart.com/@walmart/redux-store/-/redux-store-1.0.4.tgz", + "integrity": "sha512-GFNpH0YBW+Y2wAvPPj8v9W3Ql8Qzy7zuAi71jhC4wn0VvdBbDnn5HcR8YFT7bgFRjCXmuWB7IM4snFrH74Nztw==" }, "@walmart/ui-components": { "version": "1.0.66", --- package.json @@ -43,7 +43,7 @@ "@walmart/gtp-shared-components": "^0.2.1", "@walmart/react-native-logger": "^1.14.0", "@walmart/react-native-shared-navigation": "^0.2.0", - "@walmart/redux-store": "^1.0.3", + "@walmart/redux-store": "^1.0.4", "@walmart/ui-components": "^1.0.66", "i18next": "^19.7.0", "intl": "^1.2.5", @@ -116,10 +116,11 @@ "collectCoverageFrom": [ "<rootDir>/src/**/*.{js,jsx,ts,tsx}", "!<rootDir>/src/navigation/Navigation.tsx", - "!<rootDir>/src/navigation/NavigationStyle.ts" + "!<rootDir>/src/navigation/NavigationStyle.ts", + "!<rootDir>/src/home/testApiCall.ts" ], "coverageReporters": [ - "lcov" + "lcov", "text" ], "testResultsProcessor": "jest-sonar-reporter", "coverageThreshold": { --- src/core/RootContainer.tsx @@ -14,6 +14,7 @@ import { } from './analyticsInit'; import {initSumoNotification} from './notificationInit'; import './httpClientInit'; +import './storeConfigInit'; import {initI18n} from './i18nInit'; import {RootNav} from '../navigation'; --- src/core/storeConfigInit.ts @@ -0,0 +1,28 @@ +import {takeLatest, all, call} from 'redux-saga/effects'; +import {StoreConfig} from '@walmart/config-components'; +import {addSagas, User, Site, storeConfigActions} from '@walmart/redux-store'; + +StoreConfig.initialize({ + // TODO + baseURL: 'https://ssmp-store-systems-bff.stg.walmart.net/', + timeout: 5000, +}); + +export function* onUserChanged(action: {payload: User; type: string}) { + const {payload: user} = action; + if (user.siteId && parseInt(user.siteId, 10)) { + yield call(storeConfigActions.storeConfigProgress); + try { + const storeConfig: Site = yield call(StoreConfig.get, `${user.siteId}`); + yield call(storeConfigActions.storeConfigSuccess, storeConfig); + } catch (err) { + yield call(storeConfigActions.storeConfigError, err); + } + } +} + +export function* storeSagas() { + yield all([takeLatest('global/SIGN_IN_SUCCESS', onUserChanged)]); +} + +addSagas(storeSagas); --- src/types/config-components.d.ts @@ -0,0 +1,15 @@ +declare module '@walmart/config-components' { + import {Site} from '@walmart/redux-store'; + + export interface StoreConfigInitParams { + baseURL: string; + timeout: number | string; + } + + export interface IStoreConfig { + initialize: (config: StoreConfigInitParams) => void; + get: (siteNbr: string) => Promise<Site>; + } + + export const StoreConfig: IStoreConfig; +}
adding store info values to redux store
adding store info values to redux store
0d4abc355a370b07e04348e5683cbd23fa09b71f
--- __tests__/components/TeamHubHeaderTest.tsx @@ -0,0 +1,23 @@ +import React from 'react'; +import { renderWithProviders } from '../harness'; +import { TeamHubHeader } from '../../src/components/TeamHubHeader'; +import { render, screen } from '@testing-library/react-native'; + +jest.mock('@walmart/allspark-foundation', () => ({ + AllsparkFeature: jest.fn(() => ({ + createTranslationClient: jest.fn(() => ({ + useTranslation: jest.fn(() => ({ + t: jest.fn(key => (key)), + })), + })), + })), +})); + +describe('Hub header tests', () => { + it('probably renders the header', () => { + console.log(TeamHubHeader) + renderWithProviders(<TeamHubHeader />); + const title = screen.getByLabelText('hubHeader.title'); + expect(title).toBeDefined(); + }); +});
Added teamhubheader test
Added teamhubheader test
85a5f9c37e7fd9e07f2a1a178ff3d04a92d3cec4
--- packages/allspark-foundation/README.md @@ -44,12 +44,12 @@ npx allspark link ### Create a Feature -To create a new feature app, start with the [AllsparkFeature]() documentation. +To create a new feature app, start with the [AllsparkFeature](./Feature/README.md) documentation. ### Create a Container -To create a new container app, start with the [AllsparkContainer]() documentation. +To create a new container app, start with the [AllsparkContainer](./Container/README.md) documentation. ### Create a Feature Runner -To create a feature runner, start with the [AllsparkFeatureRunner]() documentation. \ No newline at end of file +To create a feature runner, start with the [AllsparkFeatureRunner](./FeatureRunner/README.md) documentation.
chore: fix readme links
chore: fix readme links
25abda21c8da56640416689eb7254cb47a1bfc16
--- package.json @@ -142,7 +142,7 @@ "@walmart/redux-store": "~6.3.28", "@walmart/returns-mini-app": "4.16.7", "@walmart/rfid-scan-mini-app": "2.9.2", - "@walmart/rn-mobile-sdk-pairing": "2.1.7", + "@walmart/rn-mobile-sdk-pairing": "2.1.8", "@walmart/rn-receiving-mini-app": "2.4.81", "@walmart/roster-mini-app": "2.26.0", "@walmart/schedule-mini-app": "1.13.0", --- yarn.lock @@ -7360,7 +7360,7 @@ __metadata: "@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/rn-mobile-sdk-pairing": "npm:2.1.7" + "@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" "@walmart/schedule-mini-app": "npm:1.13.0" @@ -8026,13 +8026,13 @@ __metadata: languageName: node linkType: hard -"@walmart/rn-mobile-sdk-pairing@npm:2.1.7": - version: 2.1.7 - resolution: "@walmart/rn-mobile-sdk-pairing@npm:2.1.7::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Frn-mobile-sdk-pairing%2F-%2F%40walmart%2Frn-mobile-sdk-pairing-2.1.7.tgz" +"@walmart/rn-mobile-sdk-pairing@npm:2.1.8": + version: 2.1.8 + resolution: "@walmart/rn-mobile-sdk-pairing@npm:2.1.8::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Frn-mobile-sdk-pairing%2F-%2F%40walmart%2Frn-mobile-sdk-pairing-2.1.8.tgz" peerDependencies: react: "*" react-native: "*" - checksum: 10c0/d1e8a20132a04d2726a5fb2a34da2d8b9bda3fdaf5cb42aa6d8547165311025152796e6087ee00367ac643c3f5c2cdad3f845211119cdd9e9b66f6133a192efe + checksum: 10c0/94057ffa430c57dc5c08918a543ee745d51126265e0b06f430bb266242795151e46f07f5b08ae10d33e19ad6ee0cfea3d4ffe56cfef60029ceb8be2b3b9c49e4 languageName: node linkType: hard
fix(digitalkey): remove nfc requirement for pairing sdk to increase supported android devices (#4102)
fix(digitalkey): remove nfc requirement for pairing sdk to increase supported android devices (#4102) Co-authored-by: Alex Scarlett <Alex.Scarlett@walmart.com>
e836466c3cd1cba717273576fd93b6d0e17fa1c1
--- scripts/updateiOSProjectConfig.sh @@ -77,105 +77,51 @@ else CODE_PUSH_KEY=$DEV_CODE_PUSH_KEY fi -if [[ "$OSTYPE" == "darwin"* ]]; then #for MacOS - ## Find and replace the Team Id - echo "Updating \"$ENTERPRISE_TEAM_ID\" with Team Id \"$TEAM_ID\" " - sed -Ei '' "s/$ENTERPRISE_TEAM_ID|$iTUNESCONNECT_TEAM_ID/$TEAM_ID/" ${plist} +## Find and replace the Team Id +echo "Updating \"$ENTERPRISE_TEAM_ID\" with Team Id \"$TEAM_ID\" " +sed -Ei '' "s/$ENTERPRISE_TEAM_ID|$iTUNESCONNECT_TEAM_ID/$TEAM_ID/" ${plist} - ## Find and replace the storyboard name - echo "Updating Splash Screen \"$BETA_SPLASH_SCREEN_NAME\" with \"$SPLASH_SCREEN\" " - sed -Ei '' "s/$DEV_SPLASH_SCREEN_NAME|$BETA_SPLASH_SCREEN_NAME|$PROD_SPLASH_SCREEN_NAME|$TEFLON_SPLASH_SCREEN_NAME/$SPLASH_SCREEN/" ${plist} +## Find and replace the storyboard name +echo "Updating Splash Screen \"$BETA_SPLASH_SCREEN_NAME\" with \"$SPLASH_SCREEN\" " +sed -Ei '' "s/$DEV_SPLASH_SCREEN_NAME|$BETA_SPLASH_SCREEN_NAME|$PROD_SPLASH_SCREEN_NAME|$TEFLON_SPLASH_SCREEN_NAME/$SPLASH_SCREEN/" ${plist} - ## Find and replace the Bundle Id - echo "Updating Bundle Id \"$BETA_BUNDLE_ID\" with \"$BUNDLE_ID\" " - sed -Ei '' "s/$BETA_BUNDLE_ID|$PROD_BUNDLE_ID/$BUNDLE_ID/" ${plist} +## Find and replace the Bundle Id +echo "Updating Bundle Id \"$BETA_BUNDLE_ID\" with \"$BUNDLE_ID\" " +sed -Ei '' "s/$BETA_BUNDLE_ID|$PROD_BUNDLE_ID/$BUNDLE_ID/" ${plist} - ## Find and replace the SumoAppGroupId - echo "Updating SumoAppGroupId Id \"$BETA_SUMO_GROUP_ID\" with \"$SUMO_GROUP_ID\" " - sed -Ei '' "s/$BETA_SUMO_GROUP_ID|$PROD_SUMO_GROUP_ID/$SUMO_GROUP_ID/" ${plist} +## Find and replace the SumoAppGroupId +echo "Updating SumoAppGroupId Id \"$BETA_SUMO_GROUP_ID\" with \"$SUMO_GROUP_ID\" " +sed -Ei '' "s/$BETA_SUMO_GROUP_ID|$PROD_SUMO_GROUP_ID/$SUMO_GROUP_ID/" ${plist} - ## Find and replace the CodePush deployment key - echo "Updating CodePushDeploymentKey with \"$CODE_PUSH_KEY\" " - sed -Ei '' "s/$BETA_CODE_PUSH_KEY|$DEV_CODE_PUSH_KEY|$PROD_CODE_PUSH_KEY/$CODE_PUSH_KEY/" ${plist} +## Find and replace the CodePush deployment key +echo "Updating CodePushDeploymentKey with \"$CODE_PUSH_KEY\" " +sed -Ei '' "s/$BETA_CODE_PUSH_KEY|$DEV_CODE_PUSH_KEY|$PROD_CODE_PUSH_KEY/$CODE_PUSH_KEY/" ${plist} - ########### Finished updating Info.plist file ############# +########### Finished updating Info.plist file ############# - ########### Starting to update .pbxproj file ############# +########### Starting to update .pbxproj file ############# - pbxprojFile="${xcodeproj}/project.pbxproj" +pbxprojFile="${xcodeproj}/project.pbxproj" - ## Find and replace AppIcon with the prod one (without beta or dev). - echo "Updating AppIcon \"$BETA_APP_ICON\" or \"$DEV_APP_ICON\" or \"$TEFLON_APP_ICON\" with \"$APP_ICON\" " - sed -Ei '' "s/\"$BETA_APP_ICON\";|\"$DEV_APP_ICON\";|\"$PROD_APP_ICON\";|\"$TEFLON_APP_ICON\";/\"$APP_ICON\";/" ${pbxprojFile} +## Find and replace AppIcon with the prod one (without beta or dev). +echo "Updating AppIcon \"$BETA_APP_ICON\" or \"$DEV_APP_ICON\" or \"$TEFLON_APP_ICON\" with \"$APP_ICON\" " +sed -Ei '' "s/\"$BETA_APP_ICON\";|\"$DEV_APP_ICON\";|\"$PROD_APP_ICON\";|\"$TEFLON_APP_ICON\";/\"$APP_ICON\";/" ${pbxprojFile} - ## Find and replace bundle ids. - echo "Updating Bundle Id \"$BETA_BUNDLE_ID\" with Bundle Id \"$BUNDLE_ID\" " - sed -Ei '' "s/$BETA_BUNDLE_ID;|$PROD_BUNDLE_ID;/$BUNDLE_ID;/" $pbxprojFile +## Find and replace bundle ids. +echo "Updating Bundle Id \"$BETA_BUNDLE_ID\" with Bundle Id \"$BUNDLE_ID\" " +sed -Ei '' "s/$BETA_BUNDLE_ID;|$PROD_BUNDLE_ID;/$BUNDLE_ID;/" $pbxprojFile - ## Find and replace the Team Id - echo "Updating \"$ENTERPRISE_TEAM_ID\" with Team Id \"$TEAM_ID\" " - sed -Ei '' "s/$ENTERPRISE_TEAM_ID;|$iTUNESCONNECT_TEAM_ID;/$TEAM_ID;/" ${pbxprojFile} +## Find and replace the Team Id +echo "Updating \"$ENTERPRISE_TEAM_ID\" with Team Id \"$TEAM_ID\" " +sed -Ei '' "s/$ENTERPRISE_TEAM_ID;|$iTUNESCONNECT_TEAM_ID;/$TEAM_ID;/" ${pbxprojFile} - ## Find and replace provisiioning profiles. - echo "Updating InHouse Provisioning profile with \"$INHOUSE_PROVISION\" " - sed -Ei '' "s/$PROD_INHOUSE_PROVISIONING;|$BETA_INHOUSE_PROVISIONING;/$INHOUSE_PROVISION;/" ${pbxprojFile} +## Find and replace provisiioning profiles. +echo "Updating InHouse Provisioning profile with \"$INHOUSE_PROVISION\" " +sed -Ei '' "s/$PROD_INHOUSE_PROVISIONING;|$BETA_INHOUSE_PROVISIONING;/$INHOUSE_PROVISION;/" ${pbxprojFile} - echo "Updating Dev Provisioning profile with \"$DEV_PROVISION\" " - sed -Ei '' "s/$PROD_DEV_PROVISIONING;|$BETA_DEV_PROVISIONING;/$DEV_PROVISION;/" ${pbxprojFile} +echo "Updating Dev Provisioning profile with \"$DEV_PROVISION\" " +sed -Ei '' "s/$PROD_DEV_PROVISIONING;|$BETA_DEV_PROVISIONING;/$DEV_PROVISION;/" ${pbxprojFile} - echo "Copying contents of App Entitlements file with \"$ENTITLEMENTS\"" - cp $entitlementsPath/$ENTITLEMENTS $entitlementsPath/$DEFAULT_ENTITLEMENTS - -else #for linux - - ## Find and replace the Team Id - echo "Updating \"$ENTERPRISE_TEAM_ID\" with Team Id \"$TEAM_ID\" " - sed -Ei "s/$ENTERPRISE_TEAM_ID|$iTUNESCONNECT_TEAM_ID/$TEAM_ID/" ${plist} - - ## Find and replace the storyboard name - echo "Updating Splash Screen \"$BETA_SPLASH_SCREEN_NAME\" with \"$SPLASH_SCREEN\" " - sed -Ei "s/$DEV_SPLASH_SCREEN_NAME|$BETA_SPLASH_SCREEN_NAME|$PROD_SPLASH_SCREEN_NAME|$TEFLON_SPLASH_SCREEN_NAME/$SPLASH_SCREEN/" ${plist} - - ## Find and replace the Bundle Id - echo "Updating Bundle Id \"$BETA_BUNDLE_ID\" with \"$BUNDLE_ID\" " - sed -Ei "s/$BETA_BUNDLE_ID|$PROD_BUNDLE_ID/$BUNDLE_ID/" ${plist} - - ## Find and replace the SumoAppGroupId - echo "Updating SumoAppGroupId Id \"$BETA_SUMO_GROUP_ID\" with \"$SUMO_GROUP_ID\" " - sed -Ei "s/$BETA_SUMO_GROUP_ID|$PROD_SUMO_GROUP_ID/$SUMO_GROUP_ID/" ${plist} - - ## Find and replace the CodePush deployment key - echo "Updating CodePushDeploymentKey with \"$CODE_PUSH_KEY\" " - sed -Ei "s/$BETA_CODE_PUSH_KEY|$DEV_CODE_PUSH_KEY|$PROD_CODE_PUSH_KEY/$CODE_PUSH_KEY/" ${plist} - - ########### Finished updating Info.plist file ############# - - - ########### Starting to update .pbxproj file ############# - - pbxprojFile="${xcodeproj}/project.pbxproj" - - ## Find and replace AppIcon with the prod one (without beta or dev). - echo "Updating AppIcon \"$BETA_APP_ICON\" or \"$DEV_APP_ICON\" or \"$TEFLON_APP_ICON\" with \"$APP_ICON\" " - sed -Ei "s/\"$BETA_APP_ICON\";|\"$DEV_APP_ICON\";|\"$PROD_APP_ICON\";|\"$TEFLON_APP_ICON\";/\"$APP_ICON\";/" ${pbxprojFile} - - ## Find and replace bundle ids. - echo "Updating Bundle Id \"$BETA_BUNDLE_ID\" with Bundle Id \"$BUNDLE_ID\" " - sed -Ei "s/$BETA_BUNDLE_ID;|$PROD_BUNDLE_ID;/$BUNDLE_ID;/" $pbxprojFile - - ## Find and replace the Team Id - echo "Updating \"$ENTERPRISE_TEAM_ID\" with Team Id \"$TEAM_ID\" " - sed -Ei "s/$ENTERPRISE_TEAM_ID;|$iTUNESCONNECT_TEAM_ID;/$TEAM_ID;/" ${pbxprojFile} - - ## Find and replace provisiioning profiles. - echo "Updating InHouse Provisioning profile with \"$INHOUSE_PROVISION\" " - sed -Ei "s/$PROD_INHOUSE_PROVISIONING;|$BETA_INHOUSE_PROVISIONING;/$INHOUSE_PROVISION;/" ${pbxprojFile} - - echo "Updating Dev Provisioning profile with \"$DEV_PROVISION\" " - sed -Ei "s/$PROD_DEV_PROVISIONING;|$BETA_DEV_PROVISIONING;/$DEV_PROVISION;/" ${pbxprojFile} - - echo "Copying contents of App Entitlements file with \"$ENTITLEMENTS\"" - cp $entitlementsPath/$ENTITLEMENTS $entitlementsPath/$DEFAULT_ENTITLEMENTS - -fi +echo "Copying contents of App Entitlements file with \"$ENTITLEMENTS\"" +cp $entitlementsPath/$ENTITLEMENTS $entitlementsPath/$DEFAULT_ENTITLEMENTS
Update updateiOSProjectConfig.sh
Update updateiOSProjectConfig.sh
2952364b81a73f24101df1aa121fa40443c7367b
--- package.json @@ -86,7 +86,7 @@ "@walmart/ask-sam-chat-components": "^0.2.7", "@walmart/ask-sam-mini-app": "1.31.5", "@walmart/associate-listening-mini-app": "1.2.32", - "@walmart/attendance-mini-app": "3.169.0", + "@walmart/attendance-mini-app": "3.170.0", "@walmart/avp-feature-app": "0.16.19", "@walmart/avp-shared-library": "0.10.12", "@walmart/backroom-mini-app": "1.12.0", --- yarn.lock @@ -6560,9 +6560,9 @@ __metadata: languageName: node linkType: hard -"@walmart/attendance-mini-app@npm:3.169.0": - version: 3.169.0 - resolution: "@walmart/attendance-mini-app@npm:3.169.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fattendance-mini-app%2F-%2F%40walmart%2Fattendance-mini-app-3.169.0.tgz" +"@walmart/attendance-mini-app@npm:3.170.0": + version: 3.170.0 + resolution: "@walmart/attendance-mini-app@npm:3.170.0::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fattendance-mini-app%2F-%2F%40walmart%2Fattendance-mini-app-3.170.0.tgz" peerDependencies: "@react-native-community/datetimepicker": ">=5.1.0" "@react-navigation/native": ">=6.0.8" @@ -6593,7 +6593,7 @@ __metadata: redux-saga: ">=1.2.3" reselect: ">=4.1.0" wfm-allspark-data-library: ">=3.3.0" - checksum: 10c0/6f5f54fb3ad7b28b00799c9927f990327d20325984f35bea3eb6ec4f1c06dee1c21891bb914cd96acf766e866ccfae1ff4859d604b2ab896a9a815d3a94668e7 + checksum: 10c0/0e5fda6069253ff9b0b334d94960c3bbfcaf2739f8e2d42c164d5d788bf2294095a2b5d726086f8cdabc19ad796f772aaef11725b58e03730f13a62e0d5fe2a8 languageName: node linkType: hard @@ -7418,7 +7418,7 @@ __metadata: "@walmart/ask-sam-chat-components": "npm:^0.2.7" "@walmart/ask-sam-mini-app": "npm:1.31.5" "@walmart/associate-listening-mini-app": "npm:1.2.32" - "@walmart/attendance-mini-app": "npm:3.169.0" + "@walmart/attendance-mini-app": "npm:3.170.0" "@walmart/avp-feature-app": "npm:0.16.19" "@walmart/avp-shared-library": "npm:0.10.12" "@walmart/backroom-mini-app": "npm:1.12.0"
fix: GTA-161386 - Temporarily remove week column from calendar (#4376)
fix: GTA-161386 - Temporarily remove week column from calendar (#4376) * fix: GTA-161386 - Temporarily remove week column from calendar * fix: GTA-161386 - empty commit --------- Co-authored-by: Savankumar Akbari - sakbari <sakbari@m-c02rv0v4g8wl.homeoffice.wal-mart.com>
c36941d35ac9ba67e9d9d5fcb1785fbbb6db58f8
--- targets/US/package.json @@ -86,7 +86,7 @@ "@walmart/ask-sam-chat-components": "^0.2.7", "@walmart/ask-sam-mini-app": "1.24.7", "@walmart/associate-listening-mini-app": "1.2.7", - "@walmart/attendance-mini-app": "3.91.0", + "@walmart/attendance-mini-app": "3.92.0", "@walmart/avp-feature-app": "0.10.7", "@walmart/avp-shared-library": "0.10.1", "@walmart/backroom-mini-app": "1.5.20", --- yarn.lock @@ -6001,9 +6001,9 @@ __metadata: languageName: node linkType: hard -"@walmart/attendance-mini-app@npm:3.91.0": - version: 3.91.0 - resolution: "@walmart/attendance-mini-app@npm:3.91.0" +"@walmart/attendance-mini-app@npm:3.92.0": + version: 3.92.0 + resolution: "@walmart/attendance-mini-app@npm:3.92.0" dependencies: "@walmart/wfm-ui": "npm:^0.2.26" moment-timezone: "npm:0.5.40" @@ -6033,7 +6033,7 @@ __metadata: redux-saga: ^1.2.0 reselect: ^4.1.0 wfm-allspark-data-library: ^3.3.0 - checksum: 10c0/9f25605e8067e43bbdfe09511090a8e636a8f923d541265532c713649bba3d0cadaac05d59e8c55b42d4740f5e944e2bfe93d30f3e116f9a81eb5efd64524743 + checksum: 10c0/1ad55ab10c716a03266a33f4221e593d91fcbe4263752b439afc70d2bcbaf929461992bb2ed8393c56e5f32c206344b2a81e8bb305626f42aedc2df1ee9b179b languageName: node linkType: hard @@ -7002,7 +7002,7 @@ __metadata: "@walmart/ask-sam-chat-components": "npm:^0.2.7" "@walmart/ask-sam-mini-app": "npm:1.24.7" "@walmart/associate-listening-mini-app": "npm:1.2.7" - "@walmart/attendance-mini-app": "npm:3.91.0" + "@walmart/attendance-mini-app": "npm:3.92.0" "@walmart/avp-feature-app": "npm:0.10.7" "@walmart/avp-shared-library": "npm:0.10.1" "@walmart/backroom-mini-app": "npm:1.5.20"
bump ama verion 3.92.0
bump ama verion 3.92.0
03632d094cb03da37556189497e7990afb81dc68
--- packages/allspark-foundation-hub/__tests__/HubFeature/supplyChain/ActionButtonGroup.test.tsx @@ -0,0 +1,49 @@ +import React from 'react'; +import { + fireEvent, + render, +} from '@walmart/allspark-foundation/__tests__/utils'; +import { ActionButtonGroup } from '@walmart/allspark-foundation-hub/src/HubFeature/SupplyChain'; + +describe('ActionButtonGroup', () => { + const actionButtonGroupProps = { + negativeButtonLabel: 'Cancel', + positiveButtonLabel: 'Apply', + onNegativeButtonPress: jest.fn(), + onPositiveButtonPress: jest.fn(), + }; + + it('renders action button group component with required props', () => { + const { getByTestId } = render( + <ActionButtonGroup {...actionButtonGroupProps} /> + ); + const negativeButton = getByTestId('negative-button'); + const positiveButton = getByTestId('positive-button'); + expect(negativeButton).toBeDefined(); + expect(negativeButton.props.children).toStrictEqual( + actionButtonGroupProps.negativeButtonLabel + ); + expect(positiveButton).toBeDefined(); + expect(positiveButton.props.children).toStrictEqual( + actionButtonGroupProps.positiveButtonLabel + ); + }); + + it('it calls onNegativeButtonPress when negative button is press', () => { + const { getByTestId } = render( + <ActionButtonGroup {...actionButtonGroupProps} /> + ); + const negativeButton = getByTestId('negative-button'); + fireEvent.press(negativeButton); + expect(actionButtonGroupProps.onNegativeButtonPress).toHaveBeenCalled(); + }); + + it('it calls onPositiveButtonPress when negative button is press', () => { + const { getByTestId } = render( + <ActionButtonGroup {...actionButtonGroupProps} /> + ); + const positiveButton = getByTestId('positive-button'); + fireEvent.press(positiveButton); + expect(actionButtonGroupProps.onPositiveButtonPress).toHaveBeenCalled(); + }); +}); --- packages/allspark-foundation-hub/src/HubFeature/SupplyChain/Components/ActionButtonGroup/ActionButtonGroup.tsx @@ -18,6 +18,7 @@ export const ActionButtonGroup = ({ onPress={onNegativeButtonPress} accessibilityRole='button' accessibilityLabel={negativeButtonLabel} + testID='negative-button' > {negativeButtonLabel} </Button> @@ -29,6 +30,7 @@ export const ActionButtonGroup = ({ onPress={onPositiveButtonPress} accessibilityRole='button' accessibilityLabel={positiveButtonLabel} + testID='positive-button' > {positiveButtonLabel} </Button> --- packages/allspark-foundation-hub/src/HubFeature/SupplyChain/index.ts @@ -1,2 +1,3 @@ export * from './Components/HubHeader'; export * from './Components/Popover'; +export * from './Components/ActionButtonGroup';
feat: added unit tests
feat: added unit tests
6b58217f91e185c0fe9b0a7f0c60968b56ec977f
--- .looper.multibranch.yml @@ -1 +1 @@ -inherit: job:///allspark/allspark-core/allspark-template:allspark-template.yml \ No newline at end of file +inherit: job:///allspark/allspark-core/allspark-template:allspark-template.yml
Update .looper.multibranch.yml
Update .looper.multibranch.yml
7e1ad73a85fe23332d67a6c9518d0fe1d00cf535
--- yarn.lock @@ -6927,6 +6927,27 @@ __metadata: languageName: node linkType: hard +"@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": + version: 1.22.7 + resolution: "@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::version=1.22.7&hash=7ae90d" + dependencies: + "@walmart/tcnumber": "npm:^2.3.3" + "@xstate/react": "npm:^3.0.1" + cpc-input: "npm:^1.7.28" + dayjs: "npm:^1.11.1" + rxjs: "npm:^7.5.5" + uuid: "npm:^3.3.2" + xstate: "npm:^4.32.1" + peerDependencies: + "@walmart/core-services": ^1.4.11 + "@walmart/redux-store": ^2.0.4 + react-native-device-info: ^10.3.0 + react-redux: ^7.2.1 + redux: ^4.1.2 + checksum: 10c0/995631ae2c2773be5ab04b8c4496e9bff56f1c0b48995a3cb500b53d9fc463b3dad4559221fa80ddff133e5c7aaa1a1745b4ffbe14418ea1b594e7316740ddfe + languageName: node + linkType: hard + "@walmart/redux-store@npm:6.1.4": version: 6.1.4 resolution: "@walmart/redux-store@npm:6.1.4" @@ -7776,7 +7797,7 @@ __metadata: "@walmart/react-native-store-map": "npm:0.3.7" "@walmart/react-native-sumo-sdk": "npm: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": "npm: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": "npm:6.1.4" "@walmart/returns-mini-app": "npm:4.6.0" "@walmart/rfid-scan-mini-app": "npm:2.3.10"
update
update