@controleonline/ui-common 1.2.90 → 1.2.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,6 @@
1
+ import {useWebTranslationRefresh, useWebTranslationReset, useWebDeviceConfigReset, useWebRuntimeIp, useWebWebDeviceIdentity, useWebMainCompany, useWebDeviceRegistration, useWebPrinters, useWebPaymentTypes} from './DefaultProvider.web.lifecycle';
2
+ import {useWebDeviceConfigFetch, useWebDeviceConfigSync, useWebMainConfigReset, useWebMainConfigDiscovery, useWebMainConfigSeed, useWebTranslationBootstrap, useWebBootstrapReady, useWebCompanies, useWebMenus, useWebThemeFetch, useWebThemePalette} from './DefaultProvider.web.configuration';
3
+ import {resolveDomainThemeColors} from './resolveDomainThemeColors';
1
4
  import React, {
2
5
  createContext,
3
6
  useCallback,
@@ -316,75 +319,13 @@ export const DefaultProvider = ({
316
319
  ],
317
320
  );
318
321
 
319
- useEffect(() => {
320
- global.refreshTranslationsUI = () => {
321
- setTranslateVersion(version => version + 1);
322
- };
322
+ useWebTranslationRefresh({setTranslateVersion});
323
323
 
324
- return () => {
325
- if (global.refreshTranslationsUI) {
326
- delete global.refreshTranslationsUI;
327
- }
328
- };
329
- }, []);
324
+ useWebTranslationReset({isLogged, isPublicRouteActive, setTranslateReady, setActiveTranslateBootstrapKey, translateBootstrapKeyRef, translateActions});
330
325
 
331
- useEffect(() => {
332
- if (isLogged && !isPublicRouteActive) {
333
- return;
334
- }
326
+ useWebDeviceConfigReset({deviceConfigPeopleIri, lastDeviceConfigPeopleIriRef, setDeviceConfigFetched, setDeviceRuntimeConfigSynced, deviceConfigsActions});
335
327
 
336
- setTranslateReady(true);
337
- setActiveTranslateBootstrapKey('');
338
- translateBootstrapKeyRef.current = '';
339
- translateActions.setMessages({});
340
- translateActions.setPendingMessages?.({});
341
-
342
- if (global.t) {
343
- delete global.t;
344
- }
345
- }, [isLogged, isPublicRouteActive, translateActions]);
346
-
347
- useEffect(() => {
348
- if (
349
- !deviceConfigPeopleIri ||
350
- lastDeviceConfigPeopleIriRef.current === deviceConfigPeopleIri
351
- ) {
352
- return;
353
- }
354
-
355
- lastDeviceConfigPeopleIriRef.current = deviceConfigPeopleIri;
356
- setDeviceConfigFetched(false);
357
- setDeviceRuntimeConfigSynced(false);
358
- deviceConfigsActions.setItem({});
359
- }, [deviceConfigPeopleIri, deviceConfigsActions]);
360
-
361
- useEffect(() => {
362
- if (!isLogged) {
363
- return;
364
- }
365
-
366
- let cancelled = false;
367
-
368
- api
369
- .fetch('runtime/ip', {
370
- method: 'GET',
371
- })
372
- .then(response => {
373
- const nextRuntimeIp = getRuntimeIpFromResponse(response);
374
- if (!nextRuntimeIp || cancelled) {
375
- return;
376
- }
377
-
378
- setWebRuntimeIp(currentIp =>
379
- currentIp === nextRuntimeIp ? currentIp : nextRuntimeIp,
380
- );
381
- })
382
- .catch(() => {});
383
-
384
- return () => {
385
- cancelled = true;
386
- };
387
- }, [isLogged, user?.id]);
328
+ useWebRuntimeIp({isLogged, api, getRuntimeIpFromResponse, setWebRuntimeIp, user});
388
329
 
389
330
  const buildWebDevice = () => {
390
331
  const webDeviceId = getOrCreateWebDeviceInstanceId();
@@ -422,558 +363,37 @@ export const DefaultProvider = ({
422
363
  // effect pass (even when unchanged) re-entered the store after logout→login
423
364
  // and produced React #185 (app-community#827).
424
365
  const lastWebDeviceSyncRef = useRef('');
425
- useEffect(() => {
426
- if (!isLogged && !isShopClientApp) {
427
- return;
428
- }
429
-
430
- const nextDevice = buildWebDevice();
431
- if (!nextDevice) {
432
- return;
433
- }
434
-
435
- const signature = JSON.stringify({
436
- id: nextDevice.id,
437
- appVersion: nextDevice.appVersion,
438
- appName: nextDevice.appName,
439
- type: nextDevice.type,
440
- metadata: nextDevice.metadata || {},
441
- externalIp: nextDevice.externalIp || null,
442
- });
443
-
444
- if (lastWebDeviceSyncRef.current === signature) {
445
- return;
446
- }
447
-
448
- lastWebDeviceSyncRef.current = signature;
449
- setDevice(nextDevice);
450
- localStorage.setItem('device', JSON.stringify(nextDevice));
451
- deviceActions.setItem(nextDevice);
452
- localStorage.removeItem('master-device');
453
- }, [deviceActions, isLogged, isShopClientApp, packageVersion, user?.id, webRuntimeIp]);
454
-
455
- useEffect(() => {
456
- if (isShopClientApp || device?.id) {
457
- peopleActions.mainCompany().catch(() => {});
458
- }
459
- }, [device?.id, isShopClientApp, peopleActions]);
460
-
461
- useEffect(() => {
462
- if (!isLogged || !device?.id) {
463
- return;
464
- }
465
-
466
- // Device registration changes tenant context and is not valid without an
467
- // active company or administrative authority for that company.
468
- if (
469
- !currentCompany?.id ||
470
- !canAdministerCompany({company: currentCompany, mainCompany, user})
471
- ) {
472
- return;
473
- }
474
-
475
- let cancelled = false;
476
-
477
- const syncDeviceRegistration = async () => {
478
- const items = await deviceActions.getItems({
479
- device: device.id,
480
- });
481
-
482
- if (cancelled) {
483
- return;
484
- }
485
-
486
- const existingDevice =
487
- Array.isArray(items) && items.length > 0 ? items[0] : null;
488
- const nextDevice = buildDeviceRegistrationPayload({
489
- deviceInfo: device,
490
- appType: app_type,
491
- existingDevice,
492
- });
493
-
494
- if (!hasDeviceRecordChanges({existingDevice, nextDevice})) {
495
- const nextLocalDevice = {
496
- ...device,
497
- entityId: existingDevice?.id || device?.entityId || null,
498
- entityIri:
499
- existingDevice?.['@id'] ||
500
- device?.entityIri ||
501
- (existingDevice?.id ? `/devices/${existingDevice.id}` : null),
502
- alias: existingDevice?.alias || nextDevice.alias,
503
- type: device?.type || runtimeDeviceType,
504
- metadata: existingDevice?.metadata || nextDevice.metadata,
505
- };
506
-
507
- if (JSON.stringify(nextLocalDevice) !== JSON.stringify(device)) {
508
- setDevice(nextLocalDevice);
509
- localStorage.setItem('device', JSON.stringify(nextLocalDevice));
510
- deviceActions.setItem(nextLocalDevice);
511
- }
512
- return;
513
- }
514
-
515
- const savedDevice = await deviceActions.save(nextDevice);
516
- if (cancelled || !savedDevice) {
517
- return;
518
- }
519
-
520
- const nextLocalDevice = {
521
- ...device,
522
- entityId: savedDevice?.id || device?.entityId || null,
523
- entityIri:
524
- savedDevice?.['@id'] ||
525
- device?.entityIri ||
526
- (savedDevice?.id ? `/devices/${savedDevice.id}` : null),
527
- alias: savedDevice.alias || nextDevice.alias,
528
- type: device?.type || runtimeDeviceType,
529
- metadata: savedDevice.metadata || nextDevice.metadata,
530
- };
531
-
532
- if (JSON.stringify(nextLocalDevice) !== JSON.stringify(device)) {
533
- setDevice(nextLocalDevice);
534
- localStorage.setItem('device', JSON.stringify(nextLocalDevice));
535
- deviceActions.setItem(nextLocalDevice);
536
- }
537
- };
538
-
539
- syncDeviceRegistration().catch(() => {});
540
-
541
- return () => {
542
- cancelled = true;
543
- };
544
- }, [
545
- device?.appVersion,
546
- device?.batteryLevel,
547
- device?.buildNumber,
548
- device?.deviceType,
549
- device?.externalIp,
550
- device?.id,
551
- device?.manufacturer,
552
- device?.model,
553
- device?.systemVersion,
554
- isLogged,
555
- currentCompany,
556
- mainCompany,
557
- runtimeDeviceType,
558
- user,
559
- ]);
560
-
561
- useEffect(() => {
562
- if (isShopClientApp || !isLogged || !currentCompany?.id) {
563
- return;
564
- }
565
-
566
- printerActions
567
- .ensureCompanyPrintersLoaded({people: currentCompany.id})
568
- .catch(() => {});
569
- }, [currentCompany?.id, isLogged, isShopClientApp, printerActions]);
570
-
571
- useEffect(() => {
572
- const paymentConfigSource = isShopClientApp
573
- ? Object.keys(companyConfigs || {}).length > 0
574
- ? companyConfigs
575
- : currentCompany?.configs
576
- : device_config?.configs;
577
-
578
- if (!currentCompany?.id || !paymentConfigSource) {
579
- walletPaymentTypeRequestRef.current = {key: '', promise: null};
580
- walletPaymentTypeLoadedKeyRef.current = '';
581
- paymentTypeActions.setItems([]);
582
- return;
583
- }
366
+ useWebWebDeviceIdentity({isLogged, isShopClientApp, buildWebDevice, lastWebDeviceSyncRef, setDevice, deviceActions, packageVersion, user, webRuntimeIp});
584
367
 
585
- if (!isShopClientApp && !mainConfigsDiscovered) {
586
- return;
587
- }
588
-
589
- const paymentTypeSignature = resolveDevicePaymentTypeIds(paymentConfigSource)
590
- .sort()
591
- .join(',');
592
- const requestKey = `${currentCompany.id}:${paymentTypeSignature}`;
593
-
594
- if (walletPaymentTypeLoadedKeyRef.current === requestKey) {
595
- return;
596
- }
597
-
598
- const existingRequestPromise =
599
- walletPaymentTypeRequestRef.current.key === requestKey &&
600
- walletPaymentTypeRequestRef.current.promise
601
- ? walletPaymentTypeRequestRef.current.promise
602
- : null;
603
-
604
- let isMounted = true;
605
-
606
- const requestPromise =
607
- existingRequestPromise ||
608
- api.fetch('wallet_payment_types', {
609
- params: {
610
- people: `/people/${currentCompany.id}`,
611
- },
612
- });
613
-
614
- if (!existingRequestPromise) {
615
- walletPaymentTypeRequestRef.current = {
616
- key: requestKey,
617
- promise: requestPromise,
618
- };
619
- }
620
-
621
- requestPromise
622
- .then(response => {
623
- if (!isMounted) {
624
- return;
625
- }
626
-
627
- const walletPaymentTypes = Array.isArray(response?.member)
628
- ? response.member
629
- : Array.isArray(response?.['hydra:member'])
630
- ? response['hydra:member']
631
- : Array.isArray(response)
632
- ? response
633
- : [];
634
- paymentTypeActions.setItems(
635
- selectPosWalletPaymentTypes({
636
- walletPaymentTypes,
637
- deviceConfigs: paymentConfigSource,
638
- companyConfigs,
639
- gateway: getPaymentGateway(device_config || paymentConfigSource),
640
- }),
641
- );
642
- walletPaymentTypeLoadedKeyRef.current = requestKey;
643
- })
644
- .catch(() => {
645
- if (isMounted) {
646
- paymentTypeActions.setItems([]);
647
- }
648
- })
649
- .finally(() => {
650
- if (
651
- walletPaymentTypeRequestRef.current.key === requestKey &&
652
- walletPaymentTypeRequestRef.current.promise === requestPromise
653
- ) {
654
- walletPaymentTypeRequestRef.current = {key: '', promise: null};
655
- }
656
- });
657
-
658
- return () => {
659
- isMounted = false;
660
- };
661
- }, [
662
- companyConfigs,
663
- currentCompany?.configs,
664
- currentCompany?.id,
665
- device_config?.configs,
666
- isShopClientApp,
667
- paymentTypeActions,
668
- ]);
669
-
670
- useEffect(() => {
671
- if (!device?.id || !isLogged || !deviceConfigPeopleIri) {
672
- return;
673
- }
674
-
675
- setDeviceConfigFetched(false);
676
- setDeviceRuntimeConfigSynced(false);
677
- deviceConfigsActions.setItem({});
678
-
679
- deviceConfigsActions
680
- .getItems({
681
- 'device.device': device.id,
682
- people: deviceConfigPeopleIri,
683
- type: runtimeDeviceType,
684
- })
685
- .then(data => {
686
- const selectedConfig = selectRuntimeDeviceConfig({
687
- items: data,
688
- deviceId: device.id,
689
- companyId: deviceConfigPeopleIri,
690
- runtimeDeviceType,
691
- });
692
-
693
- if (selectedConfig) {
694
- const nextItem = {
695
- ...selectedConfig,
696
- configs: parseConfigsObject(selectedConfig?.configs),
697
- };
698
- deviceConfigsActions.setItem(nextItem);
699
- return;
700
- }
701
-
702
- deviceConfigsActions.setItem({});
703
- })
704
- .catch(() => {})
705
- .finally(() => {
706
- setDeviceConfigFetched(true);
707
- });
708
- }, [
709
- device?.id,
710
- deviceConfigPeopleIri,
711
- deviceConfigsActions,
712
- isLogged,
713
- runtimeDeviceType,
714
- ]);
715
-
716
- useEffect(() => {
717
- if (
718
- !deviceConfigFetched ||
719
- !isLogged ||
720
- !deviceConfigPeopleIri ||
721
- !device?.id ||
722
- deviceRuntimeConfigSynced
723
- ) {
724
- return;
725
- }
726
-
727
- const isNewPdvConfig =
728
- runtimeDeviceType === 'PDV' &&
729
- !device_config?.id &&
730
- !device_config?.['@id'];
731
- const buildDeviceConfigs = isNewPdvConfig
732
- ? buildDefaultDeviceConfigs
733
- : buildProviderManagedDeviceConfigs;
734
- const {nextConfigs, needsUpdate} = buildDeviceConfigs({
735
- configs: device_config?.configs,
736
- appVersion,
737
- deviceInfo: device,
738
- });
739
-
740
- if (!needsUpdate) {
741
- setDeviceRuntimeConfigSynced(true);
742
- return;
743
- }
744
-
745
- // app-community#821: never auto-persist device_config from global bootstrap.
746
- // Provider-managed fields (config-version, pos-gateway, screen metrics) stay
747
- // in memory only. POST/PUT to /device_configs* is reserved for explicit
748
- // device settings UI — avoids 403 from DeviceFinancialConfigAuthorizationSubscriber
749
- // on pages like order-history (PDV/MANAGER types are fully protected).
750
- const currentItem = device_config || {};
751
- deviceConfigsActions.setItem({
752
- ...currentItem,
753
- configs: nextConfigs,
754
- device: currentItem.device || device.id,
755
- people: currentItem.people || deviceConfigPeopleIri,
756
- type: currentItem.type || runtimeDeviceType,
757
- });
758
- setDeviceRuntimeConfigSynced(true);
759
- }, [
760
- appVersion,
761
- device?.id,
762
- device?.manufacturer,
763
- device?.isEmulator,
764
- deviceConfigFetched,
765
- deviceConfigPeopleIri,
766
- deviceRuntimeConfigSynced,
767
- deviceConfigsActions,
768
- device_config,
769
- isLogged,
770
- runtimeDeviceType,
771
- user,
772
- ]);
368
+ useWebMainCompany({isShopClientApp, device, peopleActions});
773
369
 
774
- useEffect(() => {
775
- if (!isLogged || !currentCompany?.id || !device?.id) {
776
- return;
777
- }
370
+ useWebDeviceRegistration({isLogged, device, currentCompany, canAdministerCompany, mainCompany, user, deviceActions, buildDeviceRegistrationPayload, app_type, hasDeviceRecordChanges, runtimeDeviceType, setDevice});
778
371
 
779
- setMainConfigsDiscovered(false);
780
- }, [isLogged, currentCompany?.id, device?.id]);
781
-
782
- useEffect(() => {
783
- if (
784
- !isLogged ||
785
- !currentCompany?.id ||
786
- !device?.id ||
787
- mainConfigsDiscovered
788
- ) {
789
- return;
790
- }
372
+ useWebPrinters({isShopClientApp, isLogged, currentCompany, printerActions});
791
373
 
792
- configActions
793
- .discoveryMainConfigs({
794
- people: '/people/' + currentCompany.id,
795
- })
796
- .catch(() => { })
797
- .finally(() => {
798
- setMainConfigsDiscovered(true);
799
- });
800
- }, [configActions, currentCompany?.id, device?.id, isLogged, mainConfigsDiscovered]);
801
-
802
- useEffect(() => {
803
- if (
804
- isLogged &&
805
- currentCompany &&
806
- Object.entries(currentCompany).length > 0 &&
807
- !mainConfigsDiscovered
808
- ) {
809
- configActions.setItems(currentCompany.configs);
810
- }
811
- }, [currentCompany, isLogged, mainConfigsDiscovered]);
374
+ useWebPaymentTypes({isShopClientApp, companyConfigs, currentCompany, device_config, walletPaymentTypeRequestRef, walletPaymentTypeLoadedKeyRef, paymentTypeActions, mainConfigsDiscovered, resolveDevicePaymentTypeIds, api, selectPosWalletPaymentTypes, getPaymentGateway});
812
375
 
813
- useEffect(() => {
814
- if (!currentRouteName || isPublicRouteActive) {
815
- return;
816
- }
376
+ useWebDeviceConfigFetch({device, isLogged, deviceConfigPeopleIri, setDeviceConfigFetched, setDeviceRuntimeConfigSynced, deviceConfigsActions, runtimeDeviceType, selectRuntimeDeviceConfig, parseConfigsObject});
817
377
 
818
- if (
819
- !isLogged ||
820
- !hasCurrentCompany ||
821
- !deviceConfigFetched ||
822
- !expectedTranslateBootstrapKey
823
- ) {
824
- return;
825
- }
378
+ useWebDeviceConfigSync({deviceConfigFetched, isLogged, deviceConfigPeopleIri, device, deviceRuntimeConfigSynced, runtimeDeviceType, device_config, buildDefaultDeviceConfigs, buildProviderManagedDeviceConfigs, appVersion, setDeviceRuntimeConfigSynced, deviceConfigsActions, user});
826
379
 
827
- const currentConfig = JSON.parse(localStorage.getItem('config') || '{}');
380
+ useWebMainConfigReset({isLogged, currentCompany, device, setMainConfigsDiscovered});
828
381
 
829
- if (
830
- translateBootstrapKeyRef.current === expectedTranslateBootstrapKey &&
831
- global.t
832
- ) {
833
- global.t.companies = companies;
834
- global.t.currentCompany = currentCompany;
835
- global.t.mainCompany = mainCompany;
836
- setActiveTranslateBootstrapKey(expectedTranslateBootstrapKey);
837
- setTranslateReady(true);
382
+ useWebMainConfigDiscovery({isLogged, currentCompany, device, mainConfigsDiscovered, configActions, setMainConfigsDiscovered});
838
383
 
839
- return;
840
- }
384
+ useWebMainConfigSeed({isLogged, currentCompany, mainConfigsDiscovered, configActions});
841
385
 
842
- setTranslateReady(false);
386
+ useWebTranslationBootstrap({currentRouteName, isPublicRouteActive, isLogged, hasCurrentCompany, deviceConfigFetched, expectedTranslateBootstrapKey, translateBootstrapKeyRef, companies, currentCompany, mainCompany, setActiveTranslateBootstrapKey, setTranslateReady, configuredTranslationLanguage, Translate, stores, translateStore});
843
387
 
844
- if (currentConfig.language !== configuredTranslationLanguage) {
845
- const nextConfig = {
846
- ...currentConfig,
847
- language: configuredTranslationLanguage,
848
- };
849
- localStorage.setItem(
850
- 'config',
851
- JSON.stringify(nextConfig),
852
- );
853
- }
388
+ useWebBootstrapReady({isLogged, hasCurrentCompany, currentRouteName, isTranslateBootstrapReady, onBootstrapReady});
854
389
 
855
- translateBootstrapKeyRef.current = expectedTranslateBootstrapKey;
856
- global.t = new Translate(
857
- companies,
858
- mainCompany,
859
- currentCompany,
860
- Object.keys(stores),
861
- translateStore,
862
- );
863
- setActiveTranslateBootstrapKey(expectedTranslateBootstrapKey);
864
- setTranslateReady(true);
865
- global.refreshTranslationsUI?.();
866
- }, [
867
- companies,
868
- configuredTranslationLanguage,
869
- currentCompany,
870
- currentRouteName,
871
- mainCompany,
872
- deviceConfigFetched,
873
- expectedTranslateBootstrapKey,
874
- hasCurrentCompany,
875
- isLogged,
876
- isPublicRouteActive,
877
- translateStore,
878
- ]);
879
-
880
- useEffect(() => {
881
- if (
882
- !isLogged ||
883
- !hasCurrentCompany ||
884
- (currentRouteName && isTranslateBootstrapReady)
885
- ) {
886
- onBootstrapReady?.();
887
- }
888
- }, [
889
- currentRouteName,
890
- hasCurrentCompany,
891
- isLogged,
892
- isTranslateBootstrapReady,
893
- onBootstrapReady,
894
- ]);
895
-
896
- useEffect(() => {
897
- if (device && device.id && isLogged) {
898
- peopleActions.myCompanies();
899
- }
900
- }, [isLogged, device?.id]);
390
+ useWebCompanies({device, isLogged, peopleActions});
901
391
 
902
- useEffect(() => {
903
- if (!isLogged || !currentCompany?.id) {
904
- actions.setMenus([]);
905
- return undefined;
906
- }
907
-
908
- let cancelled = false;
909
-
910
- api
911
- .fetch('menus-people', {
912
- params: {
913
- myCompany: currentCompany.id,
914
- appType,
915
- menuType: 'home',
916
- },
917
- })
918
- .then(result => {
919
- if (!cancelled) {
920
- actions.setMenus(normalizeRuntimeMenuResponse(result, {appType}));
921
- }
922
- })
923
- .catch(() => {
924
- if (!cancelled) {
925
- actions.setMenus(normalizeRuntimeMenuResponse(null, {appType}));
926
- }
927
- });
928
-
929
- return () => {
930
- cancelled = true;
931
- };
932
- }, [actions, appType, currentCompany?.id, isLogged]);
933
-
934
- useEffect(() => {
935
- const fetchColors = async () => {
936
- try {
937
- const cssText = await api.fetch('themes-colors.css', {
938
- responseType: 'text',
939
- });
940
- const parsedColors = parseThemeCss(cssText);
941
- setBaseThemeColors(parsedColors);
942
- actions.setColors(parsedColors);
943
- } catch {
944
- setBaseThemeColors({});
945
- }
946
- };
947
-
948
- fetchColors();
949
- }, [actions, currentCompany?.id, mainCompany?.id, device?.id]);
392
+ useWebMenus({isLogged, currentCompany, actions, api, appType, normalizeRuntimeMenuResponse});
950
393
 
951
- useEffect(() => {
952
- const companyThemeColors = isShopClientApp
953
- ? mainCompany?.theme?.colors || {}
954
- : currentCompany?.theme?.colors || mainCompany?.theme?.colors || {};
955
- const mergedThemeColors = {
956
- ...(baseThemeColors || {}),
957
- ...(companyThemeColors || {}),
958
- };
959
-
960
- const palette = resolveThemePalette(mergedThemeColors, runtimeColors);
961
- applyPaletteToRuntimeColors(palette, runtimeColors);
962
- applyThemeCssVariables({
963
- themeColors: mergedThemeColors,
964
- palette,
965
- });
394
+ useWebThemeFetch({api, parseThemeCss, setBaseThemeColors, actions, currentCompany, mainCompany, device});
966
395
 
967
- actions.setColors(mergedThemeColors);
968
- }, [
969
- actions,
970
- baseThemeColors,
971
- currentCompany?.id,
972
- currentCompany?.theme?.colors,
973
- mainCompany?.id,
974
- mainCompany?.theme?.colors,
975
- isShopClientApp,
976
- ]);
396
+ useWebThemePalette({resolveDomainThemeColors, baseThemeColors, mainCompany, resolveThemePalette, runtimeColors, applyPaletteToRuntimeColors, applyThemeCssVariables, actions, currentCompany, isShopClientApp});
977
397
 
978
398
  if (requiresTranslateBootstrap && !isTranslateBootstrapReady) {
979
399
  return <View style={providerStyles.loadingContainer} />;