Browse Source

Update 31/01

dienianindya 1 year ago
parent
commit
2ce56fd9e5
100 changed files with 9486 additions and 1614 deletions
  1. 40
    0
      android/app/google-services.json
  2. 0
    2
      android/app/src/main/AndroidManifest.xml
  3. BIN
      android/app/src/main/res/ic_launcher-web.png
  4. 5
    0
      android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  5. 5
    0
      android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  6. BIN
      android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  7. BIN
      android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
  8. BIN
      android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  9. BIN
      android/app/src/main/res/mipmap-ldpi/ic_launcher.png
  10. BIN
      android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  11. BIN
      android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
  12. BIN
      android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  13. BIN
      android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  14. BIN
      android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
  15. BIN
      android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  16. BIN
      android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  17. BIN
      android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
  18. BIN
      android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  19. BIN
      android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  20. BIN
      android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
  21. BIN
      android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  22. BIN
      android/app/src/main/res/playstore-icon.png
  23. 4
    0
      android/app/src/main/res/values/ic_launcher_background.xml
  24. BIN
      assets/icons/menu/ic_about_3.png
  25. BIN
      assets/images/arrow_right.png
  26. BIN
      assets/images/ic_arrow_white.png
  27. BIN
      assets/images/location.png
  28. BIN
      assets/images/location1.png
  29. BIN
      firebase.exe
  30. 36
    0
      ios/Runner/GoogleService-Info.plist
  31. 7
    0
      ios/firebase_app_id_file.json
  32. 43
    7
      lib/Screens/Home/home_screen.dart
  33. 8
    6
      lib/Screens/Login/background.dart
  34. 24
    21
      lib/Screens/Login/login_screen.dart
  35. 1
    12
      lib/Screens/Login/post_result_model.dart
  36. 1
    1
      lib/Screens/Menu/About/about_screen.dart
  37. 34
    0
      lib/Screens/Menu/Absensi/RequestHttp/checkIn_post.dart
  38. 34
    0
      lib/Screens/Menu/Absensi/RequestHttp/checkOut_post.dart
  39. 34
    0
      lib/Screens/Menu/Absensi/RequestHttp/checkStatus_post.dart
  40. 34
    0
      lib/Screens/Menu/Absensi/RequestHttp/historyAbsensi_post.dart
  41. 357
    2
      lib/Screens/Menu/Absensi/absensi_history_screen.dart
  42. 700
    187
      lib/Screens/Menu/Absensi/absensi_screen.dart
  43. 2
    2
      lib/Screens/Menu/AjukanCuti/ajukancuti_screen.dart
  44. 4
    2
      lib/Screens/Menu/AjukanCuti/backgroundHistory.dart
  45. 1
    1
      lib/Screens/Menu/AjukanCuti/history_cuti.dart
  46. 1
    1
      lib/Screens/Menu/Reimburse/history_reimburse.dart
  47. 2
    2
      lib/Screens/Menu/Reimburse/reimburse_screen.dart
  48. 5
    2
      lib/Screens/Menu/SlipGaji/background.dart
  49. 1
    1
      lib/Screens/Menu/SlipGaji/slipgaji_screen.dart
  50. 159
    750
      lib/Screens/Menu/SuratTugas/deklarasi_st.dart
  51. 1
    1
      lib/Screens/Menu/SuratTugas/history_st.dart
  52. 1
    1
      lib/Screens/Menu/SuratTugas/pengajuan_st.dart
  53. 1
    1
      lib/Screens/Menu/SuratTugas/surattugas_screen.dart
  54. 1
    1
      lib/Screens/Settings/RequestHttp/getProfileImage_post.dart
  55. 5
    3
      lib/Screens/Settings/settings_screen.dart
  56. 5
    3
      lib/Screens/Splash/splash_screen.dart
  57. 71
    0
      lib/firebase_options.dart
  58. 1
    1
      macos/Flutter/GeneratedPluginRegistrant.swift
  59. 12
    0
      node_modules/.bin/pbjs
  60. 17
    0
      node_modules/.bin/pbjs.cmd
  61. 28
    0
      node_modules/.bin/pbjs.ps1
  62. 12
    0
      node_modules/.bin/pbts
  63. 17
    0
      node_modules/.bin/pbts.cmd
  64. 28
    0
      node_modules/.bin/pbts.ps1
  65. 12
    0
      node_modules/.bin/proto-loader-gen-types
  66. 17
    0
      node_modules/.bin/proto-loader-gen-types.cmd
  67. 28
    0
      node_modules/.bin/proto-loader-gen-types.ps1
  68. 1356
    604
      node_modules/.package-lock.json
  69. 195
    0
      node_modules/@firebase/analytics-compat/CHANGELOG.md
  70. 5
    0
      node_modules/@firebase/analytics-compat/README.md
  71. 146
    0
      node_modules/@firebase/analytics-compat/dist/esm/index.esm.js
  72. 1
    0
      node_modules/@firebase/analytics-compat/dist/esm/index.esm.js.map
  73. 145
    0
      node_modules/@firebase/analytics-compat/dist/esm/index.esm2017.js
  74. 1
    0
      node_modules/@firebase/analytics-compat/dist/esm/index.esm2017.js.map
  75. 1
    0
      node_modules/@firebase/analytics-compat/dist/esm/package.json
  76. 55
    0
      node_modules/@firebase/analytics-compat/dist/esm/src/constants.d.ts
  77. 29
    0
      node_modules/@firebase/analytics-compat/dist/esm/src/index.d.ts
  78. 33
    0
      node_modules/@firebase/analytics-compat/dist/esm/src/service.d.ts
  79. 1
    0
      node_modules/@firebase/analytics-compat/dist/esm/src/service.test.d.ts
  80. 154
    0
      node_modules/@firebase/analytics-compat/dist/index.cjs.js
  81. 1
    0
      node_modules/@firebase/analytics-compat/dist/index.cjs.js.map
  82. 55
    0
      node_modules/@firebase/analytics-compat/dist/src/constants.d.ts
  83. 172
    0
      node_modules/@firebase/analytics-compat/dist/src/index.d.ts
  84. 33
    0
      node_modules/@firebase/analytics-compat/dist/src/service.d.ts
  85. 1
    0
      node_modules/@firebase/analytics-compat/dist/src/service.test.d.ts
  86. 68
    0
      node_modules/@firebase/analytics-compat/package.json
  87. 39
    0
      node_modules/@firebase/analytics-types/CHANGELOG.md
  88. 3
    0
      node_modules/@firebase/analytics-types/README.md
  89. 687
    0
      node_modules/@firebase/analytics-types/index.d.ts
  90. 25
    0
      node_modules/@firebase/analytics-types/package.json
  91. 422
    0
      node_modules/@firebase/analytics/CHANGELOG.md
  92. 5
    0
      node_modules/@firebase/analytics/README.md
  93. 748
    0
      node_modules/@firebase/analytics/dist/analytics-public.d.ts
  94. 748
    0
      node_modules/@firebase/analytics/dist/analytics.d.ts
  95. 1363
    0
      node_modules/@firebase/analytics/dist/esm/index.esm.js
  96. 1
    0
      node_modules/@firebase/analytics/dist/esm/index.esm.js.map
  97. 1192
    0
      node_modules/@firebase/analytics/dist/esm/index.esm2017.js
  98. 1
    0
      node_modules/@firebase/analytics/dist/esm/index.esm2017.js.map
  99. 1
    0
      node_modules/@firebase/analytics/dist/esm/package.json
  100. 0
    0
      node_modules/@firebase/analytics/dist/esm/src/api.d.ts

+ 40
- 0
android/app/google-services.json View File

1
+{
2
+  "project_info": {
3
+    "project_number": "372840384875",
4
+    "firebase_url": "https://gsi---employee-self-service-default-rtdb.asia-southeast1.firebasedatabase.app",
5
+    "project_id": "gsi---employee-self-service",
6
+    "storage_bucket": "gsi---employee-self-service.appspot.com"
7
+  },
8
+  "client": [
9
+    {
10
+      "client_info": {
11
+        "mobilesdk_app_id": "1:372840384875:android:cbf80d0700f53d3ffd642e",
12
+        "android_client_info": {
13
+          "package_name": "com.example.hris_selfservice_mobile"
14
+        }
15
+      },
16
+      "oauth_client": [
17
+        {
18
+          "client_id": "372840384875-6pj63n6au94f00vr8lirqgvo9i82lvh0.apps.googleusercontent.com",
19
+          "client_type": 3
20
+        }
21
+      ],
22
+      "api_key": [
23
+        {
24
+          "current_key": "AIzaSyDUzNWQ2cvWrL77QHekf_FASfMb5KTDnuY"
25
+        }
26
+      ],
27
+      "services": {
28
+        "appinvite_service": {
29
+          "other_platform_oauth_client": [
30
+            {
31
+              "client_id": "372840384875-6pj63n6au94f00vr8lirqgvo9i82lvh0.apps.googleusercontent.com",
32
+              "client_type": 3
33
+            }
34
+          ]
35
+        }
36
+      }
37
+    }
38
+  ],
39
+  "configuration_version": "1"
40
+}

+ 0
- 2
android/app/src/main/AndroidManifest.xml View File

2
     xmlns:tools="http://schemas.android.com/tools"
2
     xmlns:tools="http://schemas.android.com/tools"
3
     package="com.example.hris_selfservice_mobile">
3
     package="com.example.hris_selfservice_mobile">
4
 
4
 
5
-
6
     <uses-permission android:name="android.permission.INTERNET" />
5
     <uses-permission android:name="android.permission.INTERNET" />
7
     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
6
     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
8
-    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
9
     <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
7
     <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
10
 
8
 
11
     <application
9
     <application

BIN
android/app/src/main/res/ic_launcher-web.png View File


+ 5
- 0
android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml View File

1
+<?xml version="1.0" encoding="utf-8"?>
2
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3
+    <background android:drawable="@color/ic_launcher_background"/>
4
+    <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5
+</adaptive-icon>

+ 5
- 0
android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml View File

1
+<?xml version="1.0" encoding="utf-8"?>
2
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3
+    <background android:drawable="@color/ic_launcher_background"/>
4
+    <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5
+</adaptive-icon>

BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher.png View File


BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png View File


BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png View File


BIN
android/app/src/main/res/mipmap-ldpi/ic_launcher.png View File


BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher.png View File


BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png View File


BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png View File


BIN
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png View File


BIN
android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png View File


BIN
android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png View File


BIN
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png View File


BIN
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png View File


BIN
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png View File


BIN
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png View File


BIN
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png View File


BIN
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png View File


BIN
android/app/src/main/res/playstore-icon.png View File


+ 4
- 0
android/app/src/main/res/values/ic_launcher_background.xml View File

1
+<?xml version="1.0" encoding="utf-8"?>
2
+<resources>
3
+    <color name="ic_launcher_background">#3c4c93</color>
4
+</resources>

BIN
assets/icons/menu/ic_about_3.png View File


BIN
assets/images/arrow_right.png View File


BIN
assets/images/ic_arrow_white.png View File


BIN
assets/images/location.png View File


BIN
assets/images/location1.png View File


BIN
firebase.exe View File


+ 36
- 0
ios/Runner/GoogleService-Info.plist View File

1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>CLIENT_ID</key>
6
+	<string>372840384875-g36dgtu6u66umuvp045b6pivb58cldlp.apps.googleusercontent.com</string>
7
+	<key>REVERSED_CLIENT_ID</key>
8
+	<string>com.googleusercontent.apps.372840384875-g36dgtu6u66umuvp045b6pivb58cldlp</string>
9
+	<key>API_KEY</key>
10
+	<string>AIzaSyA2vkFoBVFd1B59MwvZlkkg0AgZpd6vzZw</string>
11
+	<key>GCM_SENDER_ID</key>
12
+	<string>372840384875</string>
13
+	<key>PLIST_VERSION</key>
14
+	<string>1</string>
15
+	<key>BUNDLE_ID</key>
16
+	<string>com.example.hrisSelfserviceMobile</string>
17
+	<key>PROJECT_ID</key>
18
+	<string>gsi---employee-self-service</string>
19
+	<key>STORAGE_BUCKET</key>
20
+	<string>gsi---employee-self-service.appspot.com</string>
21
+	<key>IS_ADS_ENABLED</key>
22
+	<false></false>
23
+	<key>IS_ANALYTICS_ENABLED</key>
24
+	<false></false>
25
+	<key>IS_APPINVITE_ENABLED</key>
26
+	<true></true>
27
+	<key>IS_GCM_ENABLED</key>
28
+	<true></true>
29
+	<key>IS_SIGNIN_ENABLED</key>
30
+	<true></true>
31
+	<key>GOOGLE_APP_ID</key>
32
+	<string>1:372840384875:ios:729b20a1d7ac16b0fd642e</string>
33
+	<key>DATABASE_URL</key>
34
+	<string>https://gsi---employee-self-service-default-rtdb.asia-southeast1.firebasedatabase.app</string>
35
+</dict>
36
+</plist>

+ 7
- 0
ios/firebase_app_id_file.json View File

1
+{
2
+  "file_generated_by": "FlutterFire CLI",
3
+  "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory",
4
+  "GOOGLE_APP_ID": "1:372840384875:ios:729b20a1d7ac16b0fd642e",
5
+  "FIREBASE_PROJECT_ID": "gsi---employee-self-service",
6
+  "GCM_SENDER_ID": "372840384875"
7
+}

+ 43
- 7
lib/Screens/Home/home_screen.dart View File

19
 import '../Settings/RequestHttp/getDetail_post.dart';
19
 import '../Settings/RequestHttp/getDetail_post.dart';
20
 import '../Settings/RequestHttp/getProfileImage_post.dart';
20
 import '../Settings/RequestHttp/getProfileImage_post.dart';
21
 
21
 
22
-
23
 var _imageToShow;
22
 var _imageToShow;
24
 late String nameShared;
23
 late String nameShared;
25
 String name = "",
24
 String name = "",
116
                   .image;
115
                   .image;
117
             });
116
             });
118
           }
117
           }
118
+          loading.hide();
119
         } else if (status == "failed") {
119
         } else if (status == "failed") {
120
           String message = object['result']['message'].toString();
120
           String message = object['result']['message'].toString();
121
           Fluttertoast.showToast(
121
           Fluttertoast.showToast(
291
   @override
291
   @override
292
   Widget build(BuildContext context) {
292
   Widget build(BuildContext context) {
293
     var size = MediaQuery.of(context).size;
293
     var size = MediaQuery.of(context).size;
294
+
295
+    ProgressDialog loading = ProgressDialog(context);
296
+    loading = ProgressDialog(context,
297
+    type: ProgressDialogType.normal,
298
+    isDismissible: false,
299
+    showLogs: true);
300
+    loading.style(
301
+    message: 'Please Wait .....',
302
+    borderRadius: 5,
303
+    backgroundColor: Colors.white,
304
+    progressWidget: CircularProgressIndicator(),
305
+    elevation: 10.0,
306
+    padding: EdgeInsets.all(10),
307
+    insetAnimCurve: Curves.easeInOut,
308
+    progress: 0.0,
309
+    maxProgress: 100.0,
310
+    progressTextStyle: TextStyle(
311
+    color: Colors.black, fontSize: 10.0, fontWeight: FontWeight.w400),
312
+    messageTextStyle: TextStyle(
313
+    color: Colors.black,
314
+    fontSize: 15.0,
315
+    fontWeight: FontWeight.w600));
316
+
294
     return FocusDetector(
317
     return FocusDetector(
295
-      onFocusLost: (){
318
+      /*onVisibilityGained: (){
319
+        getProfileImage();
320
+        loading.hide();
321
+      },
322
+      onVisibilityLost: (){
296
         getProfileImage();
323
         getProfileImage();
324
+        loading.hide();
297
       },
325
       },
326
+      onFocusLost: (){
327
+        getProfileImage();
328
+        loading.hide();
329
+      },*/
298
       onFocusGained: (){
330
       onFocusGained: (){
299
         getProfileImage();
331
         getProfileImage();
332
+        loading.hide();
300
       },
333
       },
301
-      onForegroundLost: (){
334
+/*      onForegroundLost: (){
302
         getProfileImage();
335
         getProfileImage();
336
+        loading.hide();
303
       },
337
       },
304
       onForegroundGained: (){
338
       onForegroundGained: (){
305
         getProfileImage();
339
         getProfileImage();
306
-      },
340
+        loading.hide();
341
+      },*/
307
       child: Scaffold(
342
       child: Scaffold(
308
           body: SingleChildScrollView(
343
           body: SingleChildScrollView(
309
             child: Stack(
344
             child: Stack(
315
                           begin: Alignment.topRight,
350
                           begin: Alignment.topRight,
316
                           end: Alignment.bottomRight,
351
                           end: Alignment.bottomRight,
317
                           colors: [
352
                           colors: [
318
-                            Color(0xFFD21404),
319
-                            Color(0xFFFD7267),
353
+                            Color(0xFF4858A7),
354
+                            Color(0xFF6474C6),
355
+                            //Color(0xFF8C99DD),
320
                           ])),
356
                           ])),
321
                 ),
357
                 ),
322
                 SafeArea(
358
                 SafeArea(
640
                                       width: 70,
676
                                       width: 70,
641
                                       height: 70,
677
                                       height: 70,
642
                                       child: Image.asset(
678
                                       child: Image.asset(
643
-                                          "assets/icons/menu/ic_about_2.png",
679
+                                          "assets/icons/menu/ic_about_3.png",
644
                                           fit: BoxFit.fill,
680
                                           fit: BoxFit.fill,
645
                                           alignment: Alignment.center),
681
                                           alignment: Alignment.center),
646
                                     ),
682
                                     ),

+ 8
- 6
lib/Screens/Login/background.dart View File

46
 }
46
 }
47
 
47
 
48
 const List<Color> orangeGradients = [
48
 const List<Color> orangeGradients = [
49
-  Color(0xFFD21404),
50
-  Color(0xFFFD7267)
49
+  Color(0xFF4858A7),
50
+  Color(0xFF6474C6),
51
 ];
51
 ];
52
 
52
 
53
 const List<Color> aquaGradients = [
53
 const List<Color> aquaGradients = [
54
-  Color(0xFF8EF7DA),
54
+  /*Color(0xFF8EF7DA),
55
   Color(0xFF5AEAF1),
55
   Color(0xFF5AEAF1),
56
-  Colors.blueAccent,
56
+  Colors.blueAccent,*/
57
+  Color(0xFFD170AD),
58
+  Color(0xFFF19BD1),
57
 ];
59
 ];
58
 
60
 
59
 class WavyHeader extends StatelessWidget {
61
 class WavyHeader extends StatelessWidget {
98
     return Transform.translate(
100
     return Transform.translate(
99
       offset: Offset(-70.0, 90.0),
101
       offset: Offset(-70.0, 90.0),
100
       child: Material(
102
       child: Material(
101
-        color: Color(0xFFFF9844),
103
+        color: Color(0xFF32B44C),
102
         child: Padding(padding: EdgeInsets.all(120)),
104
         child: Padding(padding: EdgeInsets.all(120)),
103
         shape: CircleBorder(side: BorderSide(color: Colors.white, width: 15.0)),
105
         shape: CircleBorder(side: BorderSide(color: Colors.white, width: 15.0)),
104
       ),
106
       ),
112
     return Transform.translate(
114
     return Transform.translate(
113
       offset: Offset(0.0, 210.0),
115
       offset: Offset(0.0, 210.0),
114
       child: Material(
116
       child: Material(
115
-        color: Colors.yellow,
117
+        color: Color(0xFFFEE612),
116
         child: Padding(padding: EdgeInsets.all(140)),
118
         child: Padding(padding: EdgeInsets.all(140)),
117
         shape: CircleBorder(side: BorderSide(color: Colors.white, width: 15.0)),
119
         shape: CircleBorder(side: BorderSide(color: Colors.white, width: 15.0)),
118
       ),
120
       ),

+ 24
- 21
lib/Screens/Login/login_screen.dart View File

1
 import 'dart:async';
1
 import 'dart:async';
2
 import 'dart:convert';
2
 import 'dart:convert';
3
 import 'package:firebase_core/firebase_core.dart';
3
 import 'package:firebase_core/firebase_core.dart';
4
+import 'package:firebase_messaging/firebase_messaging.dart';
4
 import 'package:flutter/material.dart';
5
 import 'package:flutter/material.dart';
5
 import 'package:flutter/services.dart';
6
 import 'package:flutter/services.dart';
6
 import 'package:flutter_udid/flutter_udid.dart';
7
 import 'package:flutter_udid/flutter_udid.dart';
12
 import 'package:hris_selfservice_mobile/Screens/Splash/splash_screen.dart';
13
 import 'package:hris_selfservice_mobile/Screens/Splash/splash_screen.dart';
13
 import 'package:progress_dialog_null_safe/progress_dialog_null_safe.dart';
14
 import 'package:progress_dialog_null_safe/progress_dialog_null_safe.dart';
14
 import 'package:shared_preferences/shared_preferences.dart';
15
 import 'package:shared_preferences/shared_preferences.dart';
16
+import '../../firebase_options.dart';
15
 import '../Home/home_screen.dart';
17
 import '../Home/home_screen.dart';
16
 import 'inputWidget.dart';
18
 import 'inputWidget.dart';
17
 import 'dart:developer' as logDev;
19
 import 'dart:developer' as logDev;
18
-import 'package:plain_notification_token/plain_notification_token.dart';
20
+//import 'package:plain_notification_token/plain_notification_token.dart';
19
 import 'dart:io' show Platform;
21
 import 'dart:io' show Platform;
20
 
22
 
21
 class LoginView extends StatefulWidget {
23
 class LoginView extends StatefulWidget {
50
   String notif_token = "";
52
   String notif_token = "";
51
 
53
 
52
   String _pushToken = '0819';
54
   String _pushToken = '0819';
53
-  IosNotificationSettings? _settings;
55
+  //IosNotificationSettings? _settings;
54
   late StreamSubscription onTokenRefreshSubscription;
56
   late StreamSubscription onTokenRefreshSubscription;
55
 
57
 
56
   @override
58
   @override
57
   void initState() {
59
   void initState() {
58
-    WidgetsBinding.instance.addPostFrameCallback((_) {
60
+    /*WidgetsBinding.instance.addPostFrameCallback((_) {
59
       getNotifToken();
61
       getNotifToken();
60
-    });
62
+    });*/
61
     super.initState();
63
     super.initState();
62
   }
64
   }
63
   
65
   
64
-  getNotifToken () async {
65
-    await Firebase.initializeApp();
66
-    final plainNotificationToken = PlainNotificationToken();
67
-    if (Platform.isIOS) {
68
-      plainNotificationToken.requestPermission();
69
-      await plainNotificationToken.onIosSettingsRegistered.first;
70
-    }
71
-    onTokenRefreshSubscription = PlainNotificationToken().onTokenRefresh.listen((token) {
72
-      setState(() {
73
-        _pushToken = token;
74
-      });
75
-    });
76
-    logDev.log(_pushToken, name: "Notif TOKEN");
77
-   /* final notif_token = await plainNotificationToken.onTokenRefresh.listen ((t));*/
78
-  }
66
+  /*getNotifToken () async {
67
+    await Firebase.initializeApp(
68
+      options: DefaultFirebaseOptions.currentPlatform,
69
+    );
70
+    final notif_token = await FirebaseMessaging.instance.getToken();
71
+    logDev.log(notif_token.toString(), name: "NOTIFICATION TOKEN");
72
+  }*/
79
 
73
 
80
   @override
74
   @override
81
   Widget build(BuildContext context) {
75
   Widget build(BuildContext context) {
192
                                   return;
186
                                   return;
193
                                 } else {
187
                                 } else {
194
                                   await loading.show();
188
                                   await loading.show();
189
+
190
+                                  await Firebase.initializeApp(
191
+                                    options: DefaultFirebaseOptions.currentPlatform,
192
+                                  );
193
+                                  final notif_token = await FirebaseMessaging.instance.getToken();
194
+                                  logDev.log(notif_token.toString(), name: "NOTIFICATION TOKEN");
195
+
195
                                   LoginPostResult.connectToAPI(
196
                                   LoginPostResult.connectToAPI(
196
                                           emailController.text.toString(),
197
                                           emailController.text.toString(),
197
                                           passwordController.text.toString(),
198
                                           passwordController.text.toString(),
198
-                                          notif_token,
199
+                                          notif_token!,
199
                                           version,
200
                                           version,
200
                                           platform(),
201
                                           platform(),
201
                                           imei)
202
                                           imei)
302
             ),
303
             ),
303
             child: Text(title,
304
             child: Text(title,
304
                 style: TextStyle(
305
                 style: TextStyle(
306
+                    decoration: TextDecoration.underline,
305
                     color: Colors.white,
307
                     color: Colors.white,
306
                     fontSize: 15,
308
                     fontSize: 15,
307
                     fontWeight: FontWeight.w500)),
309
                     fontWeight: FontWeight.w500)),
324
 }
326
 }
325
 
327
 
326
 const List<Color> Gradients1 = [
328
 const List<Color> Gradients1 = [
327
-  Color(0xFF0EDED2),
329
+  /*Color(0xFFFFFFFF),
330
+  Color(0xFFFFFFFF),*/
328
   Color(0xFF03A0FE),
331
   Color(0xFF03A0FE),
329
   Colors.pink,
332
   Colors.pink,
330
 ];
333
 ];

+ 1
- 12
lib/Screens/Login/post_result_model.dart View File

45
     String URL = baseURL + "/api/v1/login";
45
     String URL = baseURL + "/api/v1/login";
46
     print(URL);
46
     print(URL);
47
 
47
 
48
-
49
-
50
-    /*DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
51
-    AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
52
-    developer.log(androidInfo.manufacturer, name: "MAP IMEI");
53
-    //imei = androidInfo.data;
54
-    developer.log(imei, name: "IMEI Number");
55
-
56
-    imei = await DeviceImei.getImei().toString();
57
-    developer.log(imei, name: "IMEI Number");*/
58
-
59
-
60
     var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
48
     var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
61
       "data": [
49
       "data": [
62
         {
50
         {
73
       "Api-key": apiKey
61
       "Api-key": apiKey
74
     });
62
     });
75
 
63
 
64
+    developer.log(sendData.body.toString(), name: "LOGIN RESULT");
76
     return sendData.body;
65
     return sendData.body;
77
 
66
 
78
     /*var jsonObject = json.decode(sendData.body);
67
     /*var jsonObject = json.decode(sendData.body);

+ 1
- 1
lib/Screens/Menu/About/about_screen.dart View File

32
                             maxLines: 1,
32
                             maxLines: 1,
33
                             style: GoogleFonts.luckiestGuy(
33
                             style: GoogleFonts.luckiestGuy(
34
                               fontSize: 28,
34
                               fontSize: 28,
35
-                              color: Colors.red,
35
+                              color: Color(0xFF4858A7),
36
                               fontStyle: FontStyle.italic,
36
                               fontStyle: FontStyle.italic,
37
                             ),
37
                             ),
38
                           ),
38
                           ),

+ 34
- 0
lib/Screens/Menu/Absensi/RequestHttp/checkIn_post.dart View File

1
+import 'dart:convert';
2
+import 'dart:core';
3
+import 'package:http/http.dart' as http;
4
+import 'package:hris_selfservice_mobile/constants.dart';
5
+import 'dart:developer' as developer;
6
+
7
+import 'package:shared_preferences/shared_preferences.dart';
8
+
9
+class CheckIn_Post {
10
+  late String session;
11
+
12
+  CheckIn_Post({required this.session});
13
+
14
+  static Future<String> connectToAPI() async {
15
+    String URL = baseURL + "/api/v1/check_in";
16
+
17
+    final SharedPreferences prefs = await SharedPreferences.getInstance();
18
+    final session = prefs.getString('session');
19
+
20
+    var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
21
+      "data": [
22
+        {
23
+          "session": session
24
+        }
25
+      ]
26
+    }), headers: {
27
+      "Content-Type": "application/json",
28
+      "Api-key": apiKey
29
+    });
30
+
31
+    //developer.log(sendData.body, name: "Get Check In Result");
32
+    return sendData.body;
33
+  }
34
+}

+ 34
- 0
lib/Screens/Menu/Absensi/RequestHttp/checkOut_post.dart View File

1
+import 'dart:convert';
2
+import 'dart:core';
3
+import 'package:http/http.dart' as http;
4
+import 'package:hris_selfservice_mobile/constants.dart';
5
+import 'dart:developer' as developer;
6
+
7
+import 'package:shared_preferences/shared_preferences.dart';
8
+
9
+class CheckOut_Post {
10
+  late String session;
11
+
12
+  CheckOut_Post({required this.session});
13
+
14
+  static Future<String> connectToAPI() async {
15
+    String URL = baseURL + "/api/v1/check_out";
16
+
17
+    final SharedPreferences prefs = await SharedPreferences.getInstance();
18
+    final session = prefs.getString('session');
19
+
20
+    var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
21
+      "data": [
22
+        {
23
+          "session": session
24
+        }
25
+      ]
26
+    }), headers: {
27
+      "Content-Type": "application/json",
28
+      "Api-key": apiKey
29
+    });
30
+
31
+    //developer.log(sendData.body, name: "Get Check Out Result");
32
+    return sendData.body;
33
+  }
34
+}

+ 34
- 0
lib/Screens/Menu/Absensi/RequestHttp/checkStatus_post.dart View File

1
+import 'dart:convert';
2
+import 'dart:core';
3
+import 'package:http/http.dart' as http;
4
+import 'package:hris_selfservice_mobile/constants.dart';
5
+import 'dart:developer' as developer;
6
+
7
+import 'package:shared_preferences/shared_preferences.dart';
8
+
9
+class CheckStatus_Post {
10
+  late String session;
11
+
12
+  CheckStatus_Post({required this.session});
13
+
14
+  static Future<String> connectToAPI() async {
15
+    String URL = baseURL + "/api/v1/check_status";
16
+
17
+    final SharedPreferences prefs = await SharedPreferences.getInstance();
18
+    final session = prefs.getString('session');
19
+
20
+    var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
21
+      "data": [
22
+        {
23
+          "session": session
24
+        }
25
+      ]
26
+    }), headers: {
27
+      "Content-Type": "application/json",
28
+      "Api-key": apiKey
29
+    });
30
+
31
+    //developer.log(sendData.body, name: "Get Status Absensi Result");
32
+    return sendData.body;
33
+  }
34
+}

+ 34
- 0
lib/Screens/Menu/Absensi/RequestHttp/historyAbsensi_post.dart View File

1
+import 'dart:convert';
2
+import 'dart:core';
3
+import 'package:http/http.dart' as http;
4
+import 'package:hris_selfservice_mobile/constants.dart';
5
+import 'dart:developer' as developer;
6
+
7
+import 'package:shared_preferences/shared_preferences.dart';
8
+
9
+class HistoryAbsensi_Post {
10
+  late String session;
11
+
12
+  HistoryAbsensi_Post({required this.session});
13
+
14
+  static Future<String> connectToAPI() async {
15
+    String URL = baseURL + "/api/v1/history_absensi";
16
+
17
+    final SharedPreferences prefs = await SharedPreferences.getInstance();
18
+    final session = prefs.getString('session');
19
+
20
+    var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
21
+      "data": [
22
+        {
23
+          "session": session
24
+        }
25
+      ]
26
+    }), headers: {
27
+      "Content-Type": "application/json",
28
+      "Api-key": apiKey
29
+    });
30
+
31
+    developer.log(sendData.body, name: "Get History Absensi Result");
32
+    return sendData.body;
33
+  }
34
+}

+ 357
- 2
lib/Screens/Menu/Absensi/absensi_history_screen.dart View File

1
+import 'dart:convert';
1
 import 'package:flutter/material.dart';
2
 import 'package:flutter/material.dart';
3
+import 'package:google_fonts/google_fonts.dart';
4
+import 'package:intl/intl.dart';
5
+import 'package:progress_dialog_null_safe/progress_dialog_null_safe.dart';
6
+import 'dart:developer' as logDev;
2
 
7
 
3
-class HistoryAbsensi extends StatelessWidget {
8
+import '../AjukanCuti/backgroundHistory.dart';
9
+import 'RequestHttp/historyAbsensi_post.dart';
10
+
11
+class HistoryAbsensi extends StatefulWidget {
4
   const HistoryAbsensi({Key? key}) : super(key: key);
12
   const HistoryAbsensi({Key? key}) : super(key: key);
5
 
13
 
14
+  @override
15
+  State<HistoryAbsensi> createState() => _HistoryAbsensi();
16
+}
17
+
18
+class _HistoryAbsensi extends State<HistoryAbsensi> {
19
+  late List <String> id_List;
20
+  late List <String> employee_name_List;
21
+  late List <String> check_in_List;
22
+  late List <String> check_out_List;
23
+  late List <String> worked_hours_List;
24
+
25
+  late List <String> dayDate_List;
26
+  late List <String> date_List;
27
+  late List <String> month_List;
28
+  //late List <String> workingHours_List;
29
+  late List <String> showCheckIn_List;
30
+  late List <String> showCheckOut_List;
31
+
32
+  int HistoryLength = 0;
33
+
34
+  @override
35
+  initState() {
36
+    super.initState();
37
+    id_List = [""];
38
+    employee_name_List = [""];
39
+    check_in_List = [""];
40
+    check_out_List = [""];
41
+    worked_hours_List = [""];
42
+
43
+    dayDate_List = [""];
44
+    date_List = [""];
45
+    month_List = [""];
46
+    //workingHours_List = [""];
47
+    showCheckIn_List = [""];
48
+    showCheckOut_List = [""];
49
+
50
+    WidgetsBinding.instance.addPostFrameCallback((_) async {
51
+      getHistoryData();
52
+    });
53
+  }
54
+
55
+  getHistoryData() async {
56
+    ProgressDialog loading = ProgressDialog(context);
57
+    loading = ProgressDialog(context,
58
+        type: ProgressDialogType.normal, isDismissible: false, showLogs: true);
59
+    loading.style(
60
+        message: 'Please Wait .....',
61
+        borderRadius: 3,
62
+        backgroundColor: Colors.white,
63
+        progressWidget: CircularProgressIndicator(),
64
+        elevation: 10.0,
65
+        padding: EdgeInsets.all(10),
66
+        insetAnimCurve: Curves.easeInOut,
67
+        progress: 0.0,
68
+        maxProgress: 100.0,
69
+        progressTextStyle: TextStyle(
70
+            color: Colors.black, fontSize: 10.0, fontWeight: FontWeight.w400),
71
+        messageTextStyle: TextStyle(
72
+            color: Colors.black, fontSize: 15.0, fontWeight: FontWeight.w600));
73
+
74
+    loading.show();
75
+    HistoryAbsensi_Post.connectToAPI().then((valueResult) async {
76
+      Map<String, dynamic> object = jsonDecode(valueResult);
77
+      if (object.containsKey("result").toString() == "true") {
78
+        String result = object['result'].toString();
79
+        if (result.contains("failed")) {
80
+          loading.hide();
81
+          alertDialogFailedRetrievedData(context);
82
+        } else {
83
+          List <dynamic> historyAbsensi = object['result'];
84
+          loading.hide();
85
+          setState(() {
86
+            for (int i = 0; i < historyAbsensi.length; i++){
87
+              String id = historyAbsensi[i]['id'].toString();
88
+              String employee_name = historyAbsensi[i]['employee_name'].toString();
89
+              String check_in = historyAbsensi[i]['check_in'].toString();
90
+              String check_out = historyAbsensi[i]['check_out'].toString();
91
+              String worked_hours = historyAbsensi[i]['worked_hours'].toString();
92
+
93
+              double hours = double.parse(worked_hours);
94
+
95
+              if (check_in != "false"){
96
+                //Get Day
97
+                String dayDate = DateFormat('EEEE').format(DateTime.parse(check_in));
98
+                String date = DateFormat('dd').format(DateTime.parse(check_in));
99
+                String month = DateFormat('MMM').format(DateTime.parse(check_in));
100
+
101
+                //Convert UTC to Local Time - Check In Time
102
+                DateTime checkInTime = DateFormat("yyyy-MM-dd HH:mm:ss").parse(check_in, true);
103
+                String checkInTimeLocal = checkInTime.toLocal().toString();
104
+                String showCheckInTime = checkInTimeLocal.substring(11, 19);
105
+                //logDev.log(showCheckInTime.substring(0,5), name: "SHOW CHECK IN TIME");
106
+
107
+                dayDate_List.add(dayDate.substring(0,3));
108
+                date_List.add(date);
109
+                month_List.add(month);
110
+                showCheckIn_List.add(showCheckInTime.substring(0,5));
111
+              }
112
+              if (check_out != "false"){
113
+                //Convert UTC to Local Time - Check Out Time
114
+                DateTime checkOutTime = DateFormat("yyyy-MM-dd HH:mm:ss").parse(check_out, true);
115
+                String dayDateOut = DateFormat('EEEE').format(DateTime.parse(check_out));
116
+                String dateOut = DateFormat('dd').format(DateTime.parse(check_out));
117
+                String checkOutTimeLocal = checkOutTime.toLocal().toString();
118
+                String showCheckOutTime = checkOutTimeLocal.substring(11, 19);
119
+                //logDev.log(showCheckOutTime, name: "SHOW CHECK OUT TIME");
120
+
121
+                showCheckOut_List.add(showCheckOutTime.substring(0,5));
122
+              }
123
+              if (check_in == "false"){
124
+                String show_check_in = "-";
125
+                showCheckIn_List.add(show_check_in);
126
+              }
127
+              if (check_out == "false"){
128
+                String show_check_out = "-";
129
+                //String workingHours = "-";
130
+                //workingHours_List.add(workingHours);
131
+                showCheckOut_List.add(show_check_out);
132
+              }
133
+              if (check_in != "false" && check_out != "false"){
134
+                DateFormat format = DateFormat("HH:mm");
135
+                DateTime cIn = format.parse(check_in.substring(11,16));
136
+                DateTime cOut = format.parse(check_out.substring(11,16));
137
+                //workingHours_List.add("${cOut.difference(cIn)}".substring(0,4));
138
+              }
139
+
140
+              id_List.add(id);
141
+              employee_name_List.add(employee_name);
142
+              check_in_List.add(check_in);
143
+              check_out_List.add(check_out);
144
+              worked_hours_List.add(hours.toStringAsFixed(3));
145
+            }
146
+
147
+            id_List.removeAt(0);
148
+            employee_name_List.removeAt(0);
149
+            check_in_List.removeAt(0);
150
+            check_out_List.removeAt(0);
151
+            worked_hours_List.removeAt(0);
152
+
153
+            dayDate_List.removeAt(0);
154
+            date_List.removeAt(0);
155
+            month_List.removeAt(0);
156
+            //workingHours_List.removeAt(0);
157
+            showCheckIn_List.removeAt(0);
158
+            showCheckOut_List.removeAt(0);
159
+
160
+            HistoryLength = historyAbsensi.length;
161
+          });
162
+        }
163
+      } else {
164
+        alertDialogFailedRetrievedData(context);
165
+      }
166
+    });
167
+    loading.hide();
168
+  }
169
+
6
   @override
170
   @override
7
   Widget build(BuildContext context) {
171
   Widget build(BuildContext context) {
8
-    return Container();
172
+    var size = MediaQuery.of(context).size;
173
+    return Scaffold(
174
+      body: Stack(
175
+          children: [
176
+            Column(
177
+              children: <Widget>[
178
+                Stack(
179
+                  children: [
180
+                    WavyHeader(),
181
+                    Container(
182
+                        margin: EdgeInsets.only(
183
+                            top: (size.height / 6) - 20),
184
+                        padding: EdgeInsets.fromLTRB(0, 5, 25, 5),
185
+                        child: Row(
186
+                          mainAxisAlignment: MainAxisAlignment.end,
187
+                          crossAxisAlignment: CrossAxisAlignment.end,
188
+                          children: [
189
+                            Text(
190
+                              'Attendance History\t\t',
191
+                              maxLines: 1,
192
+                              style: GoogleFonts.luckiestGuy(
193
+                                fontSize: 28,
194
+                                color: Color(0xFF4858A7),
195
+                                //fontWeight: FontWeight.bold,
196
+                                fontStyle: FontStyle.italic,
197
+                              ),
198
+                            ),
199
+                            Image.asset(
200
+                              'assets/images/ic_history.png',
201
+                              width: 40,
202
+                              height: 40,
203
+                            ),
204
+                          ],
205
+                        )
206
+                    ),
207
+                  ],
208
+                ),
209
+              ],
210
+            ),
211
+            Container(
212
+              margin: EdgeInsets.only(top: (MediaQuery.of(context).size.height / 6) + 40,
213
+                  left: 5, right: 5, bottom: 10),
214
+              child: ListView.builder(
215
+                scrollDirection: Axis.vertical,
216
+                shrinkWrap: true,
217
+                itemCount: HistoryLength,
218
+                itemBuilder: (context, int i) {
219
+                  return Container(
220
+                    margin: EdgeInsets.fromLTRB(5, 5, 5, 5),
221
+                    child: InkWell(
222
+                      child: Card(
223
+                        elevation: 8,
224
+                        child: Container(
225
+                          padding: EdgeInsets.all(10),
226
+                          child: Row(
227
+                            children: [
228
+                              Expanded(
229
+                                  flex: 2,
230
+                                  child:
231
+                                  Container(
232
+                                    padding: EdgeInsets.all(5),
233
+                                    decoration: BoxDecoration(
234
+                                        border: Border.all(color: Colors.black),
235
+                                        borderRadius: BorderRadius.all(Radius.circular(3)),
236
+                                    ),
237
+                                    child: Column(
238
+                                      children: [
239
+                                        Text(dayDate_List[i], style: GoogleFonts.fredokaOne(fontSize: 16, color: Colors.blueGrey)),
240
+                                        Text(date_List[i], style: GoogleFonts.fredokaOne(fontSize: 16, color: Colors.blueGrey)),
241
+                                        Text(month_List[i], style: GoogleFonts.fredokaOne(fontSize: 16, color: Colors.blueGrey)),
242
+                                      ],
243
+                                    ),
244
+                                  )
245
+                              ),
246
+                              Expanded(
247
+                                flex: 2,
248
+                                child: Column(
249
+                                  children: [
250
+                                    Text("Check In", style: GoogleFonts.fredokaOne(fontSize: 17),),
251
+                                    Text(showCheckIn_List[i], style: GoogleFonts.barlowSemiCondensed(fontSize: 17),),
252
+                                  ],
253
+                                ),
254
+                              ),
255
+                              Expanded(
256
+                                flex: 2,
257
+                                child: Column(
258
+                                  children: [
259
+                                    Text("Check Out", style: GoogleFonts.fredokaOne(fontSize: 16),),
260
+                                    Text(showCheckOut_List[i], style: GoogleFonts.barlowSemiCondensed(fontSize: 17),),
261
+                                  ],
262
+                                ),
263
+                              ),
264
+                              Expanded(
265
+                                flex: 3,
266
+                                child: Column(
267
+                                  children: [
268
+                                    Text("Working Hours", style: GoogleFonts.fredokaOne(fontSize: 16),),
269
+                                    Text(worked_hours_List[i], style: GoogleFonts.barlowSemiCondensed(fontSize: 17),),
270
+                                  ],
271
+                                ),
272
+                              ),
273
+                            ],
274
+                          ),
275
+                        ),
276
+                      ),
277
+                      onTap: (){
278
+                        setState(() {
279
+                          //visible[i] = !visible[i];
280
+                        });
281
+                      },
282
+                    ),
283
+                  );
284
+                },
285
+              ),
286
+            )
287
+          ]),
288
+    );
9
   }
289
   }
290
+}
291
+
292
+alertDialogFailedRetrievedData(BuildContext context) {
293
+  Widget okButton = TextButton(
294
+    child: Text("Refresh"),
295
+    onPressed: () {
296
+      Navigator.of(context, rootNavigator: true).pop();
297
+      Navigator.pushReplacement(
298
+          context, MaterialPageRoute(builder: (context) => HistoryAbsensi()));
299
+    },
300
+  );
301
+
302
+  Widget noButton = TextButton(
303
+    child: Text("Back"),
304
+    onPressed: () {
305
+      Navigator.of(context, rootNavigator: true).pop();
306
+      Navigator.pop(context);
307
+    },
308
+  );
309
+
310
+  // set up the AlertDialog
311
+  AlertDialog alert = AlertDialog(
312
+    title: Text("Employee Self Service"),
313
+    content: Text("Failed to Retrieve Data"),
314
+    actions: [
315
+      noButton,
316
+      okButton,
317
+    ],
318
+  );
319
+
320
+  // show the dialog
321
+  showDialog(
322
+    context: context,
323
+    builder: (BuildContext context) {
324
+      return alert;
325
+    },
326
+  );
327
+}
328
+
329
+alertDialogFailedResponse(BuildContext context){
330
+  Widget okButton = TextButton(
331
+    child: Text("Refresh"),
332
+    onPressed: () {
333
+      Navigator.of(context, rootNavigator: true).pop();
334
+      Navigator.pushReplacement(context, MaterialPageRoute(
335
+          builder: (context) => HistoryAbsensi()));
336
+    },
337
+  );
338
+
339
+  Widget noButton = TextButton(
340
+    child: Text("Back"),
341
+    onPressed: () {
342
+      Navigator.of(context, rootNavigator: true).pop();
343
+      Navigator.pop(context);
344
+
345
+    },
346
+  );
347
+
348
+  // set up the AlertDialog
349
+  AlertDialog alert = AlertDialog(
350
+    title: Text("Employee Self Service"),
351
+    content: Text("Server Response Error"),
352
+    actions: [
353
+      noButton,
354
+      okButton,
355
+    ],
356
+  );
357
+
358
+  // show the dialog
359
+  showDialog(
360
+    context: context,
361
+    builder: (BuildContext context) {
362
+      return alert;
363
+    },
364
+  );
10
 }
365
 }

+ 700
- 187
lib/Screens/Menu/Absensi/absensi_screen.dart View File

1
+import 'dart:async';
2
+import 'dart:convert';
3
+
1
 import 'package:flutter/material.dart';
4
 import 'package:flutter/material.dart';
2
 import 'package:flutter_map/plugin_api.dart';
5
 import 'package:flutter_map/plugin_api.dart';
3
 import 'package:geolocator/geolocator.dart';
6
 import 'package:geolocator/geolocator.dart';
7
+import 'package:google_fonts/google_fonts.dart';
8
+import 'package:hris_selfservice_mobile/Screens/Menu/Absensi/RequestHttp/checkIn_post.dart';
9
+import 'package:hris_selfservice_mobile/Screens/Menu/Absensi/RequestHttp/checkStatus_post.dart';
4
 import 'package:hris_selfservice_mobile/Screens/Menu/Absensi/absensi_history_screen.dart';
10
 import 'package:hris_selfservice_mobile/Screens/Menu/Absensi/absensi_history_screen.dart';
5
-//import 'package:latlong/latlong.dart' as latlong;
6
 import 'package:latlong2/latlong.dart' as latlong;
11
 import 'package:latlong2/latlong.dart' as latlong;
12
+import 'dart:developer' as logDev;
13
+
14
+import 'package:progress_dialog_null_safe/progress_dialog_null_safe.dart';
15
+
16
+import 'RequestHttp/checkOut_post.dart';
7
 
17
 
8
 class AbsensiScreen extends StatefulWidget {
18
 class AbsensiScreen extends StatefulWidget {
9
   const AbsensiScreen({Key? key}) : super(key: key);
19
   const AbsensiScreen({Key? key}) : super(key: key);
13
 }
23
 }
14
 
24
 
15
 class _AbsensiScreenState extends State<AbsensiScreen> {
25
 class _AbsensiScreenState extends State<AbsensiScreen> {
16
-  double long = 49.5;
17
-  double lat = -0.09;
18
-  latlong.LatLng point = latlong.LatLng(-6.186729296979901, 106.93023205185953);
19
-  var location = [];
26
+  //Visibility Button Check In & Check Out
27
+  bool visibleCheckIn = false;
28
+  bool visibleCheckOut = false;
29
+
30
+  latlong.LatLng point = latlong.LatLng(-6.183580253674716, 106.93103973792664);
31
+  late Position position;
32
+
33
+  MapController _mapController = MapController();
34
+
35
+  @override
36
+  void initState() {
37
+    WidgetsBinding.instance.addPostFrameCallback((_) {
38
+      determinePosition();
39
+    });
40
+    super.initState();
41
+  }
42
+
43
+  determinePosition() async {
44
+    ProgressDialog loading = ProgressDialog(context);
45
+    loading = ProgressDialog(context,
46
+        type: ProgressDialogType.normal, isDismissible: false, showLogs: true);
47
+    loading.style(
48
+        message: 'Please Wait .....',
49
+        borderRadius: 3,
50
+        backgroundColor: Colors.white,
51
+        progressWidget: CircularProgressIndicator(),
52
+        elevation: 10.0,
53
+        padding: EdgeInsets.all(10),
54
+        insetAnimCurve: Curves.easeInOut,
55
+        progress: 0.0,
56
+        maxProgress: 100.0,
57
+        progressTextStyle: TextStyle(
58
+            color: Colors.black, fontSize: 10.0, fontWeight: FontWeight.w400),
59
+        messageTextStyle: TextStyle(
60
+            color: Colors.black, fontSize: 15.0, fontWeight: FontWeight.w600));
61
+
62
+    bool serviceEnabled;
63
+    LocationPermission permission;
64
+
65
+    loading.show();
66
+    serviceEnabled = await Geolocator.isLocationServiceEnabled();
67
+    if (!serviceEnabled) {
68
+      loading.hide();
69
+      return Future.error('Location services are disabled.');
70
+    }
71
+
72
+    permission = await Geolocator.checkPermission();
73
+
74
+    if (permission == LocationPermission.deniedForever) {
75
+      loading.hide();
76
+      //return Future.error('Location permissions are permanently denied, we cannot request permissions.');
77
+      return alertDialogPermissionDeniedForever(context);
78
+    } else if (permission == LocationPermission.denied) {
79
+      permission = await Geolocator.requestPermission();
80
+      if (permission != LocationPermission.whileInUse && permission != LocationPermission.always) {
81
+        loading.hide();
82
+        //return Future.error('Location permissions are denied (actual value: $permission).');
83
+        return alertDialogPermissionDenied(context);
84
+      }
85
+    }
86
+
87
+    position = await Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
88
+    logDev.log(position.toString(), name: "Position GEOLOCATOR");
89
+    if (position.isMocked) {
90
+      loading.hide();
91
+      setState(() {
92
+        alertDialogFakeGPSDetected(context);
93
+      });
94
+    } else {
95
+      point = latlong.LatLng(position.latitude, position.longitude);
96
+      logDev.log(point.toString(), name: "POINT GEOLOCATOR");
97
+      _mapController.move(point, 18);
98
+
99
+      //Check Status
100
+      CheckStatus_Post.connectToAPI().then((valueResult) async {
101
+        Map<String, dynamic> object = json.decode(valueResult);
102
+        if (object.containsKey("result").toString() == "true") {
103
+          String result = object['result'].toString();
104
+          logDev.log(result, name: "Status Absensi Result");
105
+          if (result.contains("belum")) {
106
+            setState(() {
107
+              visibleCheckIn = !visibleCheckIn;
108
+              visibleCheckOut = visibleCheckOut;
109
+            });
110
+            loading.hide();
111
+          } else if (result.contains("sudah")) {
112
+            setState(() {
113
+              visibleCheckIn = visibleCheckIn;
114
+              visibleCheckOut = !visibleCheckOut;
115
+            });
116
+            loading.hide();
117
+          }
118
+        } else {
119
+          setState(() {
120
+            alertDialogFailedResponse(context);
121
+          });
122
+          loading.hide();
123
+        }
124
+      });
125
+
126
+      //loading.hide();
127
+    }
128
+  }
129
+
130
+  updatePosition() async {
131
+    ProgressDialog loading = ProgressDialog(context);
132
+    loading = ProgressDialog(context,
133
+        type: ProgressDialogType.normal, isDismissible: false, showLogs: true);
134
+    loading.style(
135
+        message: 'Please Wait .....',
136
+        borderRadius: 3,
137
+        backgroundColor: Colors.white,
138
+        progressWidget: CircularProgressIndicator(),
139
+        elevation: 10.0,
140
+        padding: EdgeInsets.all(10),
141
+        insetAnimCurve: Curves.easeInOut,
142
+        progress: 0.0,
143
+        maxProgress: 100.0,
144
+        progressTextStyle: TextStyle(
145
+            color: Colors.black, fontSize: 10.0, fontWeight: FontWeight.w400),
146
+        messageTextStyle: TextStyle(
147
+            color: Colors.black, fontSize: 15.0, fontWeight: FontWeight.w600));
148
+
149
+    bool serviceEnabled;
150
+    LocationPermission permission;
151
+
152
+    loading.show();
153
+    serviceEnabled = await Geolocator.isLocationServiceEnabled();
154
+    if (!serviceEnabled) {
155
+      loading.hide();
156
+      return Future.error('Location services are disabled.');
157
+    }
158
+
159
+    permission = await Geolocator.checkPermission();
160
+
161
+    if (permission == LocationPermission.deniedForever) {
162
+      loading.hide();
163
+      //return Future.error('Location permissions are permanently denied, we cannot request permissions.');
164
+      return alertDialogPermissionDeniedForever(context);
165
+    } else if (permission == LocationPermission.denied) {
166
+      permission = await Geolocator.requestPermission();
167
+      if (permission != LocationPermission.whileInUse && permission != LocationPermission.always) {
168
+        loading.hide();
169
+        //return Future.error('Location permissions are denied (actual value: $permission).');
170
+        return alertDialogPermissionDenied(context);
171
+      }
172
+    }
173
+
174
+    position = await Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
175
+    logDev.log(position.toString(), name: "Position GEOLOCATOR");
176
+    if (position.isMocked) {
177
+      loading.hide();
178
+      setState(() {
179
+        alertDialogFakeGPSDetected(context);
180
+      });
181
+    } else {
182
+      setState((){
183
+        point = latlong.LatLng(position.latitude, position.longitude);
184
+        logDev.log(point.toString(), name: "POINT GEOLOCATOR");
185
+        _mapController.move(point, 18);
186
+      });
187
+      loading.hide();
188
+    }
189
+  }
190
+
191
+  goCheckIn() {
192
+    ProgressDialog loading = ProgressDialog(context);
193
+    loading = ProgressDialog(context,
194
+        type: ProgressDialogType.normal, isDismissible: false, showLogs: true);
195
+    loading.style(
196
+        message: 'Please Wait .....',
197
+        borderRadius: 3,
198
+        backgroundColor: Colors.white,
199
+        progressWidget: CircularProgressIndicator(),
200
+        elevation: 10.0,
201
+        padding: EdgeInsets.all(10),
202
+        insetAnimCurve: Curves.easeInOut,
203
+        progress: 0.0,
204
+        maxProgress: 100.0,
205
+        progressTextStyle: TextStyle(
206
+            color: Colors.black, fontSize: 10.0, fontWeight: FontWeight.w400),
207
+        messageTextStyle: TextStyle(
208
+            color: Colors.black, fontSize: 15.0, fontWeight: FontWeight.w600));
209
+
210
+    loading.show();
211
+    CheckIn_Post.connectToAPI().then((valueResult) async {
212
+      Map<String, dynamic> object = json.decode(valueResult);
213
+      if (object.containsKey("result").toString() == "true") {
214
+        String result = object['result'].toString();
215
+        logDev.log(result, name: "Check In Result");
216
+        if (result.contains("failed")) {
217
+          loading.hide();
218
+          setState(() {
219
+            alertDialogFailedRetrievedData(context);
220
+          });
221
+        } else if (result.contains("Anda sudah check in")) {
222
+          loading.hide();
223
+          setState(() {
224
+            alertDialogFailedCheckIn(context);
225
+          });
226
+        } else {
227
+          loading.hide();
228
+          setState(() {
229
+            alertDialogSuccessCheckIn(context);
230
+          });
231
+        }
232
+      } else {
233
+        setState(() {
234
+          alertDialogFailedResponse(context);
235
+        });
236
+        loading.hide();
237
+      }
238
+    });
239
+  }
240
+
241
+  goCheckOut() {
242
+    ProgressDialog loading = ProgressDialog(context);
243
+    loading = ProgressDialog(context,
244
+        type: ProgressDialogType.normal, isDismissible: false, showLogs: true);
245
+    loading.style(
246
+        message: 'Please Wait .....',
247
+        borderRadius: 3,
248
+        backgroundColor: Colors.white,
249
+        progressWidget: CircularProgressIndicator(),
250
+        elevation: 10.0,
251
+        padding: EdgeInsets.all(10),
252
+        insetAnimCurve: Curves.easeInOut,
253
+        progress: 0.0,
254
+        maxProgress: 100.0,
255
+        progressTextStyle: TextStyle(
256
+            color: Colors.black, fontSize: 10.0, fontWeight: FontWeight.w400),
257
+        messageTextStyle: TextStyle(
258
+            color: Colors.black, fontSize: 15.0, fontWeight: FontWeight.w600));
259
+
260
+    loading.show();
261
+    CheckOut_Post.connectToAPI().then((valueResult) async {
262
+      Map<String, dynamic> object = json.decode(valueResult);
263
+      if (object.containsKey("result").toString() == "true") {
264
+        String result = object['result'].toString();
265
+        logDev.log(result, name: "Check Out Result");
266
+        if (result.contains("failed")) {
267
+          loading.hide();
268
+          setState(() {
269
+            alertDialogFailedRetrievedData(context);
270
+          });
271
+        } else if (result.contains("Anda belum check in")) {
272
+          loading.hide();
273
+          setState(() {
274
+            alertDialogFailedCheckOut(context);
275
+          });
276
+        } else {
277
+          loading.hide();
278
+          setState(() {
279
+            alertDialogSuccessCheckOut(context);
280
+          });
281
+        }
282
+      } else {
283
+        setState(() {
284
+          alertDialogFailedResponse(context);
285
+        });
286
+        loading.hide();
287
+      }
288
+    });
289
+  }
20
 
290
 
21
   @override
291
   @override
22
   Widget build(BuildContext context) {
292
   Widget build(BuildContext context) {
23
     var size = MediaQuery.of(context).size;
293
     var size = MediaQuery.of(context).size;
24
-
25
     return Scaffold(
294
     return Scaffold(
26
       body: SingleChildScrollView(
295
       body: SingleChildScrollView(
27
         child: Column(
296
         child: Column(
28
           children: [
297
           children: [
29
             Container(
298
             Container(
30
-              //Ganti yg ini untuk maps
31
-              height: size.height * 0.5,
32
-              child: FlutterMap(
33
-                options: MapOptions(
34
-                  onTap: (p, point) async{
35
-
36
-                  },
37
-                  center: point
38
-                ),
299
+              height: size.height * 0.6,
300
+              child: Stack(
39
                 children: [
301
                 children: [
40
-                  TileLayer(
41
-                    minZoom: 1,
42
-                    maxZoom: 14,
43
-                    backgroundColor: Colors.black54,
44
-                    urlTemplate: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
45
-                     subdomains: ['a', 'b', 'c'],
302
+                  FlutterMap(
303
+                    mapController: _mapController,
304
+                    options: new MapOptions(
305
+                        onTap: (p, point) async {}, center: point, zoom: 15),
306
+                    children: [
307
+                      TileLayer(
308
+                        minZoom: 1,
309
+                        maxZoom: 22,
310
+                        maxNativeZoom: 18,
311
+                        minNativeZoom: 1,
312
+                        backgroundColor: Colors.black54,
313
+                        urlTemplate:
314
+                            'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
315
+                        subdomains: ['a', 'b', 'c'],
316
+                      ),
317
+                      MarkerLayer(markers: [
318
+                        Marker(
319
+                            width: 135,
320
+                            height: 135,
321
+                            point: point,
322
+                            builder: (ctx) => Container(
323
+                                  child: Icon(
324
+                                    Icons.location_on,
325
+                                    color: Colors.red,
326
+                                  ),
327
+                                ))
328
+                      ])
329
+                    ],
46
                   ),
330
                   ),
47
-                 /* MarkerLayer(
48
-                    markers: [point]
49
-                  )*/
331
+                  Align(
332
+                    alignment: AlignmentDirectional.bottomEnd,
333
+                    child: Container(
334
+                      margin: EdgeInsets.fromLTRB(10, 15, 0, 15),
335
+                      child: RawMaterialButton(
336
+                        onPressed: () {
337
+                          setState(() {
338
+                            updatePosition();
339
+                          });
340
+                        },
341
+                        elevation: 5.0,
342
+                        fillColor: Colors.white,
343
+                        child: Image.asset('assets/images/location1.png',
344
+                            height: 40, width: 40),
345
+                        padding: EdgeInsets.all(5.0),
346
+                        shape: CircleBorder(),
347
+                      ),
348
+                    ),
349
+                  )
50
                 ],
350
                 ],
51
-              )
351
+              ),
52
             ),
352
             ),
53
             Container(
353
             Container(
54
               width: double.infinity,
354
               width: double.infinity,
55
-              margin: EdgeInsets.fromLTRB(10, 10, 10, 10),
355
+              margin: EdgeInsets.fromLTRB(10, 15, 10, 10),
56
               decoration:
356
               decoration:
57
                   BoxDecoration(border: Border.all(color: Colors.black)),
357
                   BoxDecoration(border: Border.all(color: Colors.black)),
58
               child: Column(
358
               child: Column(
59
                 children: <Widget>[
359
                 children: <Widget>[
60
                   Container(
360
                   Container(
61
-                    child: Text("Attendance"),
361
+                    child: Text(
362
+                      "Attendance Today",
363
+                      style: GoogleFonts.patrickHand(
364
+                          fontSize: 21, color: Colors.white),
365
+                    ),
62
                     width: double.infinity,
366
                     width: double.infinity,
63
                     alignment: Alignment.center,
367
                     alignment: Alignment.center,
64
                     decoration: BoxDecoration(
368
                     decoration: BoxDecoration(
66
                             begin: Alignment.topRight,
370
                             begin: Alignment.topRight,
67
                             end: Alignment.bottomRight,
371
                             end: Alignment.bottomRight,
68
                             colors: [
372
                             colors: [
69
-                              Color(0xFFD21404),
70
-                              Color(0xFFFD7267),
373
+                              /*Color(0xFFD21404),
374
+                              Color(0xFFFD7267),*/
375
+                              Color(0xFF4858A7),
376
+                              Color(0xFF6474C6),
71
                             ]),
377
                             ]),
72
                         border: Border.all(color: Colors.black)),
378
                         border: Border.all(color: Colors.black)),
73
                   ),
379
                   ),
74
                   Container(
380
                   Container(
75
                     width: double.infinity,
381
                     width: double.infinity,
76
                     padding: EdgeInsets.all(15),
382
                     padding: EdgeInsets.all(15),
77
-                    child: Row(
78
-                      mainAxisAlignment: MainAxisAlignment.spaceAround,
383
+                    decoration:
384
+                        BoxDecoration(border: Border.all(color: Colors.black)),
385
+                    child: Column(
79
                       children: [
386
                       children: [
80
-                        Column(
387
+                        Row(
388
+                          mainAxisAlignment: MainAxisAlignment.spaceAround,
81
                           children: [
389
                           children: [
82
-                            Text('Check In'),
83
-                            Text('07.15'),
390
+                            Expanded(
391
+                                flex: 5,
392
+                                child: Column(
393
+                                  children: [
394
+                                    Text('Check In',
395
+                                        style: GoogleFonts.fredokaOne(
396
+                                            fontSize: 19)),
397
+                                    Text('07.15',
398
+                                        style: GoogleFonts.barlowSemiCondensed(
399
+                                            fontSize: 19)),
400
+                                  ],
401
+                                )),
402
+                            Expanded(
403
+                                flex: 5,
404
+                                child: Column(
405
+                                  children: [
406
+                                    Text('Check Out',
407
+                                        style: GoogleFonts.fredokaOne(
408
+                                            fontSize: 19)),
409
+                                    Text('16.45',
410
+                                        style: GoogleFonts.barlowSemiCondensed(
411
+                                            fontSize: 19)),
412
+                                  ],
413
+                                )),
84
                           ],
414
                           ],
85
                         ),
415
                         ),
86
-                        Column(
416
+                        Row(
87
                           children: [
417
                           children: [
88
-                            Text('Check Out'),
89
-                            Text('16.45'),
418
+                            Visibility(
419
+                              visible: visibleCheckIn,
420
+                              child: Container(
421
+                                margin: EdgeInsets.fromLTRB(0, 10, 0, 0),
422
+                                width: size.width - 54,
423
+                                child: ElevatedButton(
424
+                                  onPressed: () {
425
+                                    goCheckIn();
426
+                                  },
427
+                                  child: Text('Check In'),
428
+                                  style: ButtonStyle(
429
+                                      backgroundColor: MaterialStateProperty.all(
430
+                                          Color(0xFF6474C6))),
431
+                                ),
432
+                              ),
433
+                            ),
434
+                            Visibility(
435
+                              visible: visibleCheckOut,
436
+                              child: Container(
437
+                                margin: EdgeInsets.fromLTRB(0, 10, 0, 0),
438
+                                width: size.width - 54,
439
+                                child: ElevatedButton(
440
+                                  onPressed: () {
441
+                                    goCheckOut();
442
+                                  },
443
+                                  child: Text('Check Out'),
444
+                                  style: ButtonStyle(
445
+                                      backgroundColor: MaterialStateProperty.all(
446
+                                          Color(0xFF6474C6))),
447
+                                ),
448
+                              ),
449
+                            ),
90
                           ],
450
                           ],
91
-                        ),
451
+                        )
92
                       ],
452
                       ],
93
                     ),
453
                     ),
94
                   )
454
                   )
95
                 ],
455
                 ],
96
               ),
456
               ),
97
             ),
457
             ),
98
-            Row(
99
-              mainAxisAlignment: MainAxisAlignment.center,
100
-              children: [
101
-                Visibility(
102
-                  visible: true,
103
-                  child: ElevatedButton(
104
-                    onPressed: () {
105
-                      ScaffoldMessenger.of(context).showSnackBar(
106
-                          const SnackBar(content: Text('Check Status Button')));
107
-                    },
108
-                    child: Text('Check In'),
109
-                    style: ButtonStyle(
110
-                        backgroundColor: MaterialStateProperty.all(Colors.red)),
111
-                  ),
112
-                ),
113
-                Visibility(
114
-                  visible: false,
115
-                  child: ElevatedButton(
116
-                    onPressed: () {
117
-                      ScaffoldMessenger.of(context).showSnackBar(
118
-                          const SnackBar(content: Text('Check Status Button')));
119
-                    },
120
-                    child: Text('Check Out'),
121
-                    style: ButtonStyle(
122
-                        backgroundColor: MaterialStateProperty.all(Colors.red)),
123
-                  ),
124
-                ),
125
-              ],
126
-            ),
127
-            InkWell(
128
-              child: Container(
129
-                alignment: Alignment.centerRight,
130
-                child:
131
-                    TextButton(onPressed: () {}, child: Text('View More...')),
132
-              ),
133
-              onTap: () {
134
-                Navigator.push(context,
135
-                    MaterialPageRoute(builder: (context) => HistoryAbsensi()));
136
-              },
137
-            ),
138
-            Container(
458
+            /*Container(
139
                 width: double.infinity,
459
                 width: double.infinity,
140
                 margin: EdgeInsets.fromLTRB(10, 10, 10, 0),
460
                 margin: EdgeInsets.fromLTRB(10, 10, 10, 0),
141
                 padding: EdgeInsets.all(15),
461
                 padding: EdgeInsets.all(15),
238
                     ),
558
                     ),
239
                     Text('Location : Global Service Indonesia', maxLines: 1),
559
                     Text('Location : Global Service Indonesia', maxLines: 1),
240
                   ],
560
                   ],
241
-                )),
561
+                )),*/
242
             Container(
562
             Container(
243
-                width: double.infinity,
244
-                margin: EdgeInsets.fromLTRB(10, 10, 10, 0),
245
-                padding: EdgeInsets.all(15),
246
-                decoration:
247
-                    BoxDecoration(border: Border.all(color: Colors.black)),
248
-                child: Column(
249
-                  children: [
250
-                    Row(
251
-                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
252
-                      children: [
253
-                        Text('Rabu, 23 November 2022', maxLines: 1),
254
-                        Column(
255
-                          children: [Text('Check In'), Text('07.00')],
256
-                        ),
257
-                        Column(
258
-                          children: [
259
-                            Text('Check Out'),
260
-                            Text('16.30'),
261
-                          ],
262
-                        ),
263
-                      ],
264
-                    ),
265
-                    Text('Location : Global Service Indonesia', maxLines: 1),
266
-                  ],
267
-                )),
268
-            Container(
269
-                width: double.infinity,
270
-                margin: EdgeInsets.fromLTRB(10, 10, 10, 0),
271
-                padding: EdgeInsets.all(15),
272
-                decoration:
273
-                    BoxDecoration(border: Border.all(color: Colors.black)),
274
-                child: Column(
275
-                  children: [
276
-                    Row(
277
-                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
563
+              margin: EdgeInsets.fromLTRB(10, 15, 10, 15),
564
+              child: InkWell(
565
+                child: Container(
566
+                    padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
567
+                    width: double.infinity,
568
+                    decoration: BoxDecoration(
569
+                        borderRadius: BorderRadius.circular(5),
570
+                        gradient: LinearGradient(colors: [
571
+                          Color(0xFF2D4059),
572
+                          Color(0xFF2D4059),
573
+                          /*Color(0xFFEAFFD0),
574
+                                  Color(0xFF95E1D3),*/
575
+                        ])),
576
+                    child: Row(
577
+                      mainAxisAlignment: MainAxisAlignment.center,
278
                       children: [
578
                       children: [
279
-                        Text('Rabu, 23 November 2022', maxLines: 1),
280
-                        Column(
281
-                          children: [Text('Check In'), Text('07.00')],
282
-                        ),
283
-                        Column(
284
-                          children: [
285
-                            Text('Check Out'),
286
-                            Text('16.30'),
287
-                          ],
288
-                        ),
579
+                        Text(' See Attendance History   \t\t',
580
+                            textAlign: TextAlign.center,
581
+                            style: TextStyle(
582
+                                color: Colors.white,
583
+                                fontSize: 17,
584
+                                fontWeight: FontWeight.w500)),
585
+                        Image.asset(
586
+                          'assets/images/ic_arrow_white.png',
587
+                          width: 30,
588
+                          height: 30,
589
+                        )
289
                       ],
590
                       ],
290
-                    ),
291
-                    Text('Location : Global Service Indonesia', maxLines: 1),
292
-                  ],
293
-                )),
294
-
295
-            /*SizedBox(
296
-              */ /*child: GoogleMap(
297
-                initialCameraPosition: initialCameraPosition,
298
-                markers: markers,
299
-                zoomControlsEnabled: false,
300
-                mapType: MapType.normal,
301
-                onMapCreated: (GoogleMapController controller) {
302
-                  googleMapController = controller;
591
+                    )),
592
+                onTap: () {
593
+                  Navigator.push(
594
+                      context,
595
+                      MaterialPageRoute(
596
+                          builder: (context) => HistoryAbsensi()));
303
                 },
597
                 },
304
               ),
598
               ),
305
-            ),*/ /*
306
-            ),*/
599
+            ),
307
           ],
600
           ],
308
         ),
601
         ),
309
       ),
602
       ),
310
-      /* floatingActionButton: FloatingActionButton.extended(
311
-        onPressed: () async {
312
-          Position position = await _determinePosition();
313
-          googleMapController
314
-              .animateCamera(CameraUpdate.newCameraPosition(CameraPosition(
315
-              target: LatLng(position.latitude, position.longitude),
316
-              zoom: 14)));
317
-          markers.clear();
318
-          markers.add(Marker(markerId: const MarkerId('currentLocation'),
319
-              position: LatLng(position.latitude, position.longitude)));
320
-          setState(() {});
321
-        },
322
-        label: Text("Current Location"),
323
-        icon: Icon(Icons.location_history),),*/
324
     );
603
     );
325
   }
604
   }
326
 }
605
 }
327
 
606
 
328
-/*_getCurrentLocation() {
329
-  Geolocator
330
-      .getCurrentPosition(desiredAccuracy: LocationAccuracy.best, forceAndroidLocationManager: true)
331
-      .then((Position position) {
332
-    setState(() {
333
-      _currentPosition = position;
334
-      _getAddressFromLatLng();
335
-    });
336
-  }).catchError((e) {
337
-    print(e);
338
-  });
339
-}*/
607
+alertDialogFailedRetrievedData(BuildContext context) {
608
+  Widget okButton = TextButton(
609
+    child: Text("Refresh"),
610
+    onPressed: () {
611
+      Navigator.of(context, rootNavigator: true).pop();
612
+      Navigator.pushReplacement(
613
+          context, MaterialPageRoute(builder: (context) => AbsensiScreen()));
614
+    },
615
+  );
340
 
616
 
617
+  Widget noButton = TextButton(
618
+    child: Text("Back"),
619
+    onPressed: () {
620
+      Navigator.of(context, rootNavigator: true).pop();
621
+      Navigator.pop(context);
622
+    },
623
+  );
341
 
624
 
342
-/*
343
-Future<Position> _determinePosition() async {
344
-  bool serviceEnabled;
345
-  LocationPermission permission;
625
+  // set up the AlertDialog
626
+  AlertDialog alert = AlertDialog(
627
+    title: Text("Employee Self Service"),
628
+    content: Text("Failed to Retrieve Data"),
629
+    actions: [
630
+      noButton,
631
+      okButton,
632
+    ],
633
+  );
346
 
634
 
347
-  serviceEnabled = await Geolocator.isLocationServiceEnabled();
635
+  // show the dialog
636
+  showDialog(
637
+    context: context,
638
+    builder: (BuildContext context) {
639
+      return alert;
640
+    },
641
+  );
642
+}
348
 
643
 
349
-  if (!serviceEnabled) {
350
-    return Future.error('Location services are disabled');
351
-  }
644
+alertDialogFailedResponse(BuildContext context) {
645
+  Widget okButton = TextButton(
646
+    child: Text("Refresh"),
647
+    onPressed: () {
648
+      Navigator.of(context, rootNavigator: true).pop();
649
+      Navigator.pushReplacement(
650
+          context, MaterialPageRoute(builder: (context) => AbsensiScreen()));
651
+    },
652
+  );
352
 
653
 
353
-  permission = await Geolocator.checkPermission();
654
+  Widget noButton = TextButton(
655
+    child: Text("Back"),
656
+    onPressed: () {
657
+      Navigator.of(context, rootNavigator: true).pop();
658
+      Navigator.pop(context);
659
+    },
660
+  );
354
 
661
 
355
-  if (permission == LocationPermission.denied) {
356
-    permission = await Geolocator.requestPermission();
662
+  // set up the AlertDialog
663
+  AlertDialog alert = AlertDialog(
664
+    title: Text("Employee Self Service"),
665
+    content: Text("Server Response Error"),
666
+    actions: [
667
+      noButton,
668
+      okButton,
669
+    ],
670
+  );
357
 
671
 
358
-    if (permission == LocationPermission.denied) {
359
-      return Future.error("Location permission denied");
360
-    }
361
-  }
672
+  // show the dialog
673
+  showDialog(
674
+    context: context,
675
+    builder: (BuildContext context) {
676
+      return alert;
677
+    },
678
+  );
679
+}
362
 
680
 
363
-  if (permission == LocationPermission.deniedForever) {
364
-    return Future.error('Location permissions are permanently denied');
365
-  }
681
+alertDialogSuccessCheckIn(BuildContext context) {
682
+  Widget okButton = TextButton(
683
+    child: Text("Ok"),
684
+    onPressed: () {
685
+      Navigator.of(context, rootNavigator: true).pop();
686
+      Navigator.pushReplacement(
687
+          context, MaterialPageRoute(builder: (context) => AbsensiScreen()));
688
+    },
689
+  );
366
 
690
 
367
-  Position position = await Geolocator.getCurrentPosition();
691
+  // set up the AlertDialog
692
+  AlertDialog alert = AlertDialog(
693
+    title: Text("Employee Self Service"),
694
+    content: Text("Successfully Checked In"),
695
+    actions: [
696
+      okButton,
697
+    ],
698
+  );
368
 
699
 
369
-  return position;
370
-}*/
700
+  // show the dialog
701
+  showDialog(
702
+    context: context,
703
+    builder: (BuildContext context) {
704
+      return alert;
705
+    },
706
+  );
707
+}
708
+
709
+alertDialogSuccessCheckOut(BuildContext context) {
710
+  Widget okButton = TextButton(
711
+    child: Text("Ok"),
712
+    onPressed: () {
713
+      Navigator.of(context, rootNavigator: true).pop();
714
+      Navigator.pushReplacement(
715
+          context, MaterialPageRoute(builder: (context) => AbsensiScreen()));
716
+    },
717
+  );
718
+
719
+  // set up the AlertDialog
720
+  AlertDialog alert = AlertDialog(
721
+    title: Text("Employee Self Service"),
722
+    content: Text("Successfully Checked Out"),
723
+    actions: [
724
+      okButton,
725
+    ],
726
+  );
727
+
728
+  // show the dialog
729
+  showDialog(
730
+    context: context,
731
+    builder: (BuildContext context) {
732
+      return alert;
733
+    },
734
+  );
735
+}
736
+
737
+alertDialogFailedCheckIn(BuildContext context) {
738
+  Widget okButton = TextButton(
739
+    child: Text("Ok"),
740
+    onPressed: () {
741
+      Navigator.of(context, rootNavigator: true).pop();
742
+      Navigator.pushReplacement(
743
+          context, MaterialPageRoute(builder: (context) => AbsensiScreen()));
744
+    },
745
+  );
746
+
747
+  // set up the AlertDialog
748
+  AlertDialog alert = AlertDialog(
749
+    title: Text("Employee Self Service"),
750
+    content: Text("You've already checked in"),
751
+    actions: [
752
+      okButton,
753
+    ],
754
+  );
755
+
756
+  // show the dialog
757
+  showDialog(
758
+    context: context,
759
+    builder: (BuildContext context) {
760
+      return alert;
761
+    },
762
+  );
763
+}
764
+
765
+alertDialogFailedCheckOut(BuildContext context) {
766
+  Widget okButton = TextButton(
767
+    child: Text("Ok"),
768
+    onPressed: () {
769
+      Navigator.of(context, rootNavigator: true).pop();
770
+      Navigator.pushReplacement(
771
+          context, MaterialPageRoute(builder: (context) => AbsensiScreen()));
772
+    },
773
+  );
774
+
775
+  // set up the AlertDialog
776
+  AlertDialog alert = AlertDialog(
777
+    title: Text("Employee Self Service"),
778
+    content: Text("You haven't checked in"),
779
+    actions: [
780
+      okButton,
781
+    ],
782
+  );
783
+
784
+  // show the dialog
785
+  showDialog(
786
+    context: context,
787
+    builder: (BuildContext context) {
788
+      return alert;
789
+    },
790
+  );
791
+}
792
+
793
+alertDialogFakeGPSDetected(BuildContext context) {
794
+  Widget okButton = TextButton(
795
+    child: Text("Refresh"),
796
+    onPressed: () {
797
+      Navigator.of(context, rootNavigator: true).pop();
798
+      Navigator.pushReplacement(
799
+          context, MaterialPageRoute(builder: (context) => AbsensiScreen()));
800
+    },
801
+  );
802
+
803
+  // set up the AlertDialog
804
+  AlertDialog alert = AlertDialog(
805
+    title: Text("Employee Self Service"),
806
+    content: Text("Fake GPS Detected, Please Use Default GPS!"),
807
+    actions: [
808
+      okButton,
809
+    ],
810
+  );
811
+
812
+  // show the dialog
813
+  showDialog(
814
+    context: context,
815
+    builder: (BuildContext context) {
816
+      return alert;
817
+    },
818
+  );
819
+}
820
+
821
+alertDialogPermissionDenied(BuildContext context) {
822
+  Widget okButton = TextButton(
823
+    child: Text("Refresh"),
824
+    onPressed: () {
825
+      Navigator.of(context, rootNavigator: true).pop();
826
+      Navigator.pushReplacement(
827
+          context, MaterialPageRoute(builder: (context) => AbsensiScreen()));
828
+    },
829
+  );
830
+
831
+  Widget noButton = TextButton(
832
+    child: Text("Back"),
833
+    onPressed: () {
834
+      Navigator.of(context, rootNavigator: true).pop();
835
+      Navigator.pop(context);
836
+    },
837
+  );
838
+
839
+  // set up the AlertDialog
840
+  AlertDialog alert = AlertDialog(
841
+    title: Text("Employee Self Service"),
842
+    content:
843
+        Text("Location permissions are denied, we cannot request permissions"),
844
+    actions: [
845
+      noButton,
846
+      okButton,
847
+    ],
848
+  );
849
+
850
+  // show the dialog
851
+  showDialog(
852
+    context: context,
853
+    builder: (BuildContext context) {
854
+      return alert;
855
+    },
856
+  );
857
+}
858
+
859
+alertDialogPermissionDeniedForever(BuildContext context) {
860
+  Widget noButton = TextButton(
861
+    child: Text("Back"),
862
+    onPressed: () {
863
+      Navigator.of(context, rootNavigator: true).pop();
864
+      Navigator.pop(context);
865
+    },
866
+  );
867
+
868
+  // set up the AlertDialog
869
+  AlertDialog alert = AlertDialog(
870
+    title: Text("Employee Self Service"),
871
+    content: Text(
872
+        "Location permissions are permanently denied, we cannot request permissions.\nPlease configure it in your device settings."),
873
+    actions: [noButton],
874
+  );
875
+
876
+  // show the dialog
877
+  showDialog(
878
+    context: context,
879
+    builder: (BuildContext context) {
880
+      return alert;
881
+    },
882
+  );
883
+}

+ 2
- 2
lib/Screens/Menu/AjukanCuti/ajukancuti_screen.dart View File

145
                         maxLines: 1,
145
                         maxLines: 1,
146
                         style: GoogleFonts.luckiestGuy(
146
                         style: GoogleFonts.luckiestGuy(
147
                           fontSize: 28,
147
                           fontSize: 28,
148
-                          color: Colors.red,
148
+                          color: Color(0xFF4858A7),
149
                           fontStyle: FontStyle.italic,
149
                           fontStyle: FontStyle.italic,
150
                         ),
150
                         ),
151
                       ),
151
                       ),
189
                                         fontSize: 17,
189
                                         fontSize: 17,
190
                                         fontWeight: FontWeight.w500)),
190
                                         fontWeight: FontWeight.w500)),
191
                                 Image.asset(
191
                                 Image.asset(
192
-                                  'assets/images/ic_history.png',
192
+                                  'assets/images/ic_arrow_white.png',
193
                                   width: 30,
193
                                   width: 30,
194
                                   height: 30,
194
                                   height: 30,
195
                                 )
195
                                 )

+ 4
- 2
lib/Screens/Menu/AjukanCuti/backgroundHistory.dart View File

22
 }
22
 }
23
 
23
 
24
 const List<Color> orangeGradients = [
24
 const List<Color> orangeGradients = [
25
-  Color(0xFFD21404),
26
-  Color(0xFFFD7267)
25
+  /*Color(0xFFD21404),
26
+  Color(0xFFFD7267)*/
27
+  Color(0xFF4858A7),
28
+  Color(0xFF6474C6),
27
 ];
29
 ];
28
 
30
 
29
 const List<Color> aquaGradients = [
31
 const List<Color> aquaGradients = [

+ 1
- 1
lib/Screens/Menu/AjukanCuti/history_cuti.dart View File

178
                               maxLines: 1,
178
                               maxLines: 1,
179
                               style: GoogleFonts.luckiestGuy(
179
                               style: GoogleFonts.luckiestGuy(
180
                                 fontSize: 28,
180
                                 fontSize: 28,
181
-                                color: Colors.red,
181
+                                color: Color(0xFF4858A7),
182
                                 fontStyle: FontStyle.italic,
182
                                 fontStyle: FontStyle.italic,
183
                               ),
183
                               ),
184
                             ),
184
                             ),

+ 1
- 1
lib/Screens/Menu/Reimburse/history_reimburse.dart View File

163
                               maxLines: 1,
163
                               maxLines: 1,
164
                               style: GoogleFonts.luckiestGuy(
164
                               style: GoogleFonts.luckiestGuy(
165
                                 fontSize: 28,
165
                                 fontSize: 28,
166
-                                color: Colors.red,
166
+                                color: Color(0xFF4858A7),
167
                                 fontStyle: FontStyle.italic,
167
                                 fontStyle: FontStyle.italic,
168
                               ),
168
                               ),
169
                             ),
169
                             ),

+ 2
- 2
lib/Screens/Menu/Reimburse/reimburse_screen.dart View File

132
                             maxLines: 2,
132
                             maxLines: 2,
133
                             style: GoogleFonts.luckiestGuy(
133
                             style: GoogleFonts.luckiestGuy(
134
                               fontSize: 28,
134
                               fontSize: 28,
135
-                              color: Colors.red,
135
+                              color: Color(0xFF4858A7),
136
                               fontStyle: FontStyle.italic,
136
                               fontStyle: FontStyle.italic,
137
                             ),
137
                             ),
138
                           ),
138
                           ),
176
                                             fontSize: 17,
176
                                             fontSize: 17,
177
                                             fontWeight: FontWeight.w500)),
177
                                             fontWeight: FontWeight.w500)),
178
                                     Image.asset(
178
                                     Image.asset(
179
-                                      'assets/images/ic_history.png',
179
+                                      'assets/images/ic_arrow_white.png',
180
                                       width: 30,
180
                                       width: 30,
181
                                       height: 30,
181
                                       height: 30,
182
                                     )
182
                                     )

+ 5
- 2
lib/Screens/Menu/SlipGaji/background.dart View File

22
 }
22
 }
23
 
23
 
24
 const List<Color> orangeGradients = [
24
 const List<Color> orangeGradients = [
25
-  Color(0xFFD21404),
26
-  Color(0xFFFD7267)
25
+  /*Color(0xFFD21404),
26
+  Color(0xFFFD7267)*/
27
+  //Color(0xFF03A0FE),
28
+  Color(0xFF4858A7),
29
+  Color(0xFF6474C6),
27
 ];
30
 ];
28
 
31
 
29
 const List<Color> aquaGradients = [
32
 const List<Color> aquaGradients = [

+ 1
- 1
lib/Screens/Menu/SlipGaji/slipgaji_screen.dart View File

271
                       maxLines: 1,
271
                       maxLines: 1,
272
                       style: GoogleFonts.luckiestGuy(
272
                       style: GoogleFonts.luckiestGuy(
273
                         fontSize: 28,
273
                         fontSize: 28,
274
-                        color: Colors.red,
274
+                        color: Color(0xFF4858A7),
275
                         fontStyle: FontStyle.italic,
275
                         fontStyle: FontStyle.italic,
276
                       ),
276
                       ),
277
                     ),
277
                     ),

+ 159
- 750
lib/Screens/Menu/SuratTugas/deklarasi_st.dart
File diff suppressed because it is too large
View File


+ 1
- 1
lib/Screens/Menu/SuratTugas/history_st.dart View File

332
                               maxLines: 1,
332
                               maxLines: 1,
333
                               style: GoogleFonts.luckiestGuy(
333
                               style: GoogleFonts.luckiestGuy(
334
                                 fontSize: 28,
334
                                 fontSize: 28,
335
-                                color: Colors.red,
335
+                                color: Color(0xFF4858A7),
336
                                 fontStyle: FontStyle.italic,
336
                                 fontStyle: FontStyle.italic,
337
                               ),
337
                               ),
338
                             ),
338
                             ),

+ 1
- 1
lib/Screens/Menu/SuratTugas/pengajuan_st.dart View File

108
                             maxLines: 2,
108
                             maxLines: 2,
109
                             style: GoogleFonts.luckiestGuy(
109
                             style: GoogleFonts.luckiestGuy(
110
                               fontSize: 28,
110
                               fontSize: 28,
111
-                              color: Colors.red,
111
+                              color: Color(0xFF4858A7),
112
                               fontStyle: FontStyle.italic,
112
                               fontStyle: FontStyle.italic,
113
                             ),
113
                             ),
114
                           ),
114
                           ),

+ 1
- 1
lib/Screens/Menu/SuratTugas/surattugas_screen.dart View File

40
                         'Assignment\nLetter\t\t',
40
                         'Assignment\nLetter\t\t',
41
                         style: GoogleFonts.luckiestGuy(
41
                         style: GoogleFonts.luckiestGuy(
42
                           fontSize: 28,
42
                           fontSize: 28,
43
-                          color: Colors.red,
43
+                          color: Color(0xFF4858A7),
44
                           fontStyle: FontStyle.italic,
44
                           fontStyle: FontStyle.italic,
45
                         ),
45
                         ),
46
                       ),
46
                       ),

+ 1
- 1
lib/Screens/Settings/RequestHttp/getProfileImage_post.dart View File

28
       "Api-key": apiKey
28
       "Api-key": apiKey
29
     });
29
     });
30
 
30
 
31
-    developer.log(sendData.body, name: "sendatabody");
31
+    //developer.log(sendData.body, name: "sendatabody");
32
     return sendData.body;
32
     return sendData.body;
33
 
33
 
34
     /*var jsonObject = json.decode(sendData.body);
34
     /*var jsonObject = json.decode(sendData.body);

+ 5
- 3
lib/Screens/Settings/settings_screen.dart View File

229
                     begin: Alignment.topRight,
229
                     begin: Alignment.topRight,
230
                     end: Alignment.bottomRight,
230
                     end: Alignment.bottomRight,
231
                     colors: [
231
                     colors: [
232
-                  Color(0xFFD21404),
233
-                  Color(0xFFFD7267),
232
+                      Color(0xFF4858A7),
233
+                      Color(0xFF6474C6),
234
                 ])),
234
                 ])),
235
           ),
235
           ),
236
           SafeArea(
236
           SafeArea(
759
 }
759
 }
760
 
760
 
761
 const List<Color> Gradients1 = [
761
 const List<Color> Gradients1 = [
762
-  Color(0xFF0EDED2),
762
+  //Color(0xFF0EDED2),
763
   Color(0xFF03A0FE),
763
   Color(0xFF03A0FE),
764
+  Color(0xFF4858A7),
765
+  //Color(0xFF6474C6),
764
 ];
766
 ];
765
 
767
 
766
 const List<Color> Gradients2 = [
768
 const List<Color> Gradients2 = [

+ 5
- 3
lib/Screens/Splash/splash_screen.dart View File

54
               begin: Alignment.topRight,
54
               begin: Alignment.topRight,
55
               end: Alignment.bottomRight,
55
               end: Alignment.bottomRight,
56
               colors: [
56
               colors: [
57
-            Color(0xFFD21404),
58
-            Color(0xFFFD7267),
57
+                Color(0xFF4858A7),
58
+                Color(0xFF6474C6),
59
+                Color(0xFF8C99DD),
60
+                //Color(0xFFFFFFFF)
59
           ])),
61
           ])),
60
       child: Center(
62
       child: Center(
61
         child: Column(
63
         child: Column(
75
               ),
77
               ),
76
             ),
78
             ),
77
             Text('Employee Self Service',
79
             Text('Employee Self Service',
78
-                style: GoogleFonts.knewave(fontSize: 22, color: Colors.white))
80
+                style: GoogleFonts.carterOne(fontSize: 25, color: Colors.white))
79
           ],
81
           ],
80
         ),
82
         ),
81
       ),
83
       ),

+ 71
- 0
lib/firebase_options.dart View File

1
+// File generated by FlutterFire CLI.
2
+// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
3
+import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
4
+import 'package:flutter/foundation.dart'
5
+    show defaultTargetPlatform, kIsWeb, TargetPlatform;
6
+
7
+/// Default [FirebaseOptions] for use with your Firebase apps.
8
+///
9
+/// Example:
10
+/// ```dart
11
+/// import 'firebase_options.dart';
12
+/// // ...
13
+/// await Firebase.initializeApp(
14
+///   options: DefaultFirebaseOptions.currentPlatform,
15
+/// );
16
+/// ```
17
+class DefaultFirebaseOptions {
18
+  static FirebaseOptions get currentPlatform {
19
+    if (kIsWeb) {
20
+      throw UnsupportedError(
21
+        'DefaultFirebaseOptions have not been configured for web - '
22
+        'you can reconfigure this by running the FlutterFire CLI again.',
23
+      );
24
+    }
25
+    switch (defaultTargetPlatform) {
26
+      case TargetPlatform.android:
27
+        return android;
28
+      case TargetPlatform.iOS:
29
+        return ios;
30
+      case TargetPlatform.macOS:
31
+        throw UnsupportedError(
32
+          'DefaultFirebaseOptions have not been configured for macos - '
33
+          'you can reconfigure this by running the FlutterFire CLI again.',
34
+        );
35
+      case TargetPlatform.windows:
36
+        throw UnsupportedError(
37
+          'DefaultFirebaseOptions have not been configured for windows - '
38
+          'you can reconfigure this by running the FlutterFire CLI again.',
39
+        );
40
+      case TargetPlatform.linux:
41
+        throw UnsupportedError(
42
+          'DefaultFirebaseOptions have not been configured for linux - '
43
+          'you can reconfigure this by running the FlutterFire CLI again.',
44
+        );
45
+      default:
46
+        throw UnsupportedError(
47
+          'DefaultFirebaseOptions are not supported for this platform.',
48
+        );
49
+    }
50
+  }
51
+
52
+  static const FirebaseOptions android = FirebaseOptions(
53
+    apiKey: 'AIzaSyDUzNWQ2cvWrL77QHekf_FASfMb5KTDnuY',
54
+    appId: '1:372840384875:android:cbf80d0700f53d3ffd642e',
55
+    messagingSenderId: '372840384875',
56
+    projectId: 'gsi---employee-self-service',
57
+    databaseURL: 'https://gsi---employee-self-service-default-rtdb.asia-southeast1.firebasedatabase.app',
58
+    storageBucket: 'gsi---employee-self-service.appspot.com',
59
+  );
60
+
61
+  static const FirebaseOptions ios = FirebaseOptions(
62
+    apiKey: 'AIzaSyA2vkFoBVFd1B59MwvZlkkg0AgZpd6vzZw',
63
+    appId: '1:372840384875:ios:729b20a1d7ac16b0fd642e',
64
+    messagingSenderId: '372840384875',
65
+    projectId: 'gsi---employee-self-service',
66
+    databaseURL: 'https://gsi---employee-self-service-default-rtdb.asia-southeast1.firebasedatabase.app',
67
+    storageBucket: 'gsi---employee-self-service.appspot.com',
68
+    iosClientId: '372840384875-g36dgtu6u66umuvp045b6pivb58cldlp.apps.googleusercontent.com',
69
+    iosBundleId: 'com.example.hrisSelfserviceMobile',
70
+  );
71
+}

+ 1
- 1
macos/Flutter/GeneratedPluginRegistrant.swift View File

13
 import flutter_udid
13
 import flutter_udid
14
 import geolocator_apple
14
 import geolocator_apple
15
 import location
15
 import location
16
-import path_provider_macos
16
+import path_provider_foundation
17
 import shared_preferences_foundation
17
 import shared_preferences_foundation
18
 import url_launcher_macos
18
 import url_launcher_macos
19
 
19
 

+ 12
- 0
node_modules/.bin/pbjs View File

1
+#!/bin/sh
2
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+case `uname` in
5
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
6
+esac
7
+
8
+if [ -x "$basedir/node" ]; then
9
+  exec "$basedir/node"  "$basedir/../protobufjs/bin/pbjs" "$@"
10
+else 
11
+  exec node  "$basedir/../protobufjs/bin/pbjs" "$@"
12
+fi

+ 17
- 0
node_modules/.bin/pbjs.cmd View File

1
+@ECHO off
2
+GOTO start
3
+:find_dp0
4
+SET dp0=%~dp0
5
+EXIT /b
6
+:start
7
+SETLOCAL
8
+CALL :find_dp0
9
+
10
+IF EXIST "%dp0%\node.exe" (
11
+  SET "_prog=%dp0%\node.exe"
12
+) ELSE (
13
+  SET "_prog=node"
14
+  SET PATHEXT=%PATHEXT:;.JS;=;%
15
+)
16
+
17
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\protobufjs\bin\pbjs" %*

+ 28
- 0
node_modules/.bin/pbjs.ps1 View File

1
+#!/usr/bin/env pwsh
2
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
+
4
+$exe=""
5
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
+  # Fix case when both the Windows and Linux builds of Node
7
+  # are installed in the same directory
8
+  $exe=".exe"
9
+}
10
+$ret=0
11
+if (Test-Path "$basedir/node$exe") {
12
+  # Support pipeline input
13
+  if ($MyInvocation.ExpectingInput) {
14
+    $input | & "$basedir/node$exe"  "$basedir/../protobufjs/bin/pbjs" $args
15
+  } else {
16
+    & "$basedir/node$exe"  "$basedir/../protobufjs/bin/pbjs" $args
17
+  }
18
+  $ret=$LASTEXITCODE
19
+} else {
20
+  # Support pipeline input
21
+  if ($MyInvocation.ExpectingInput) {
22
+    $input | & "node$exe"  "$basedir/../protobufjs/bin/pbjs" $args
23
+  } else {
24
+    & "node$exe"  "$basedir/../protobufjs/bin/pbjs" $args
25
+  }
26
+  $ret=$LASTEXITCODE
27
+}
28
+exit $ret

+ 12
- 0
node_modules/.bin/pbts View File

1
+#!/bin/sh
2
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+case `uname` in
5
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
6
+esac
7
+
8
+if [ -x "$basedir/node" ]; then
9
+  exec "$basedir/node"  "$basedir/../protobufjs/bin/pbts" "$@"
10
+else 
11
+  exec node  "$basedir/../protobufjs/bin/pbts" "$@"
12
+fi

+ 17
- 0
node_modules/.bin/pbts.cmd View File

1
+@ECHO off
2
+GOTO start
3
+:find_dp0
4
+SET dp0=%~dp0
5
+EXIT /b
6
+:start
7
+SETLOCAL
8
+CALL :find_dp0
9
+
10
+IF EXIST "%dp0%\node.exe" (
11
+  SET "_prog=%dp0%\node.exe"
12
+) ELSE (
13
+  SET "_prog=node"
14
+  SET PATHEXT=%PATHEXT:;.JS;=;%
15
+)
16
+
17
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\protobufjs\bin\pbts" %*

+ 28
- 0
node_modules/.bin/pbts.ps1 View File

1
+#!/usr/bin/env pwsh
2
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
+
4
+$exe=""
5
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
+  # Fix case when both the Windows and Linux builds of Node
7
+  # are installed in the same directory
8
+  $exe=".exe"
9
+}
10
+$ret=0
11
+if (Test-Path "$basedir/node$exe") {
12
+  # Support pipeline input
13
+  if ($MyInvocation.ExpectingInput) {
14
+    $input | & "$basedir/node$exe"  "$basedir/../protobufjs/bin/pbts" $args
15
+  } else {
16
+    & "$basedir/node$exe"  "$basedir/../protobufjs/bin/pbts" $args
17
+  }
18
+  $ret=$LASTEXITCODE
19
+} else {
20
+  # Support pipeline input
21
+  if ($MyInvocation.ExpectingInput) {
22
+    $input | & "node$exe"  "$basedir/../protobufjs/bin/pbts" $args
23
+  } else {
24
+    & "node$exe"  "$basedir/../protobufjs/bin/pbts" $args
25
+  }
26
+  $ret=$LASTEXITCODE
27
+}
28
+exit $ret

+ 12
- 0
node_modules/.bin/proto-loader-gen-types View File

1
+#!/bin/sh
2
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+case `uname` in
5
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
6
+esac
7
+
8
+if [ -x "$basedir/node" ]; then
9
+  exec "$basedir/node"  "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" "$@"
10
+else 
11
+  exec node  "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" "$@"
12
+fi

+ 17
- 0
node_modules/.bin/proto-loader-gen-types.cmd View File

1
+@ECHO off
2
+GOTO start
3
+:find_dp0
4
+SET dp0=%~dp0
5
+EXIT /b
6
+:start
7
+SETLOCAL
8
+CALL :find_dp0
9
+
10
+IF EXIST "%dp0%\node.exe" (
11
+  SET "_prog=%dp0%\node.exe"
12
+) ELSE (
13
+  SET "_prog=node"
14
+  SET PATHEXT=%PATHEXT:;.JS;=;%
15
+)
16
+
17
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\@grpc\proto-loader\build\bin\proto-loader-gen-types.js" %*

+ 28
- 0
node_modules/.bin/proto-loader-gen-types.ps1 View File

1
+#!/usr/bin/env pwsh
2
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
+
4
+$exe=""
5
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
+  # Fix case when both the Windows and Linux builds of Node
7
+  # are installed in the same directory
8
+  $exe=".exe"
9
+}
10
+$ret=0
11
+if (Test-Path "$basedir/node$exe") {
12
+  # Support pipeline input
13
+  if ($MyInvocation.ExpectingInput) {
14
+    $input | & "$basedir/node$exe"  "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" $args
15
+  } else {
16
+    & "$basedir/node$exe"  "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" $args
17
+  }
18
+  $ret=$LASTEXITCODE
19
+} else {
20
+  # Support pipeline input
21
+  if ($MyInvocation.ExpectingInput) {
22
+    $input | & "node$exe"  "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" $args
23
+  } else {
24
+    & "node$exe"  "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" $args
25
+  }
26
+  $ret=$LASTEXITCODE
27
+}
28
+exit $ret

+ 1356
- 604
node_modules/.package-lock.json
File diff suppressed because it is too large
View File


+ 195
- 0
node_modules/@firebase/analytics-compat/CHANGELOG.md View File

1
+# @firebase/analytics-compat
2
+
3
+## 0.2.1
4
+
5
+### Patch Changes
6
+
7
+- Updated dependencies [[`d4114a4f7`](https://github.com/firebase/firebase-js-sdk/commit/d4114a4f7da3f469c0c900416ac8beee58885ec3), [`06dc1364d`](https://github.com/firebase/firebase-js-sdk/commit/06dc1364d7560f4c563e1ccc89af9cad4cd91df8)]:
8
+  - @firebase/util@1.9.0
9
+  - @firebase/analytics@0.9.1
10
+  - @firebase/component@0.6.1
11
+
12
+## 0.2.0
13
+
14
+### Minor Changes
15
+
16
+- [`1625f7a95`](https://github.com/firebase/firebase-js-sdk/commit/1625f7a95cc3ffb666845db0a8044329be74b5be) [#6799](https://github.com/firebase/firebase-js-sdk/pull/6799) - Update TypeScript version to 4.7.4.
17
+
18
+### Patch Changes
19
+
20
+- Updated dependencies [[`c20633ed3`](https://github.com/firebase/firebase-js-sdk/commit/c20633ed35056cbadc9d65d9ceddf4e28d1ea666), [`1625f7a95`](https://github.com/firebase/firebase-js-sdk/commit/1625f7a95cc3ffb666845db0a8044329be74b5be)]:
21
+  - @firebase/util@1.8.0
22
+  - @firebase/analytics@0.9.0
23
+  - @firebase/analytics-types@0.8.0
24
+  - @firebase/component@0.6.0
25
+
26
+## 0.1.17
27
+
28
+### Patch Changes
29
+
30
+- [`4af28c1a4`](https://github.com/firebase/firebase-js-sdk/commit/4af28c1a42bd25ce2353f694ca1724c6101cbce5) [#6682](https://github.com/firebase/firebase-js-sdk/pull/6682) - Upgrade TypeScript to 4.7.4.
31
+
32
+- Updated dependencies [[`4af28c1a4`](https://github.com/firebase/firebase-js-sdk/commit/4af28c1a42bd25ce2353f694ca1724c6101cbce5)]:
33
+  - @firebase/analytics@0.8.4
34
+  - @firebase/analytics-types@0.7.1
35
+  - @firebase/component@0.5.21
36
+  - @firebase/util@1.7.3
37
+
38
+## 0.1.16
39
+
40
+### Patch Changes
41
+
42
+- Updated dependencies [[`807f06aa2`](https://github.com/firebase/firebase-js-sdk/commit/807f06aa26438a91aaea08fd38efb6c706bb8a5d), [`03d1fabcb`](https://github.com/firebase/firebase-js-sdk/commit/03d1fabcb652b3af61631d1e1100ed13efa6fc87)]:
43
+  - @firebase/util@1.7.2
44
+  - @firebase/analytics@0.8.3
45
+  - @firebase/component@0.5.20
46
+
47
+## 0.1.15
48
+
49
+### Patch Changes
50
+
51
+- Updated dependencies [[`171b78b76`](https://github.com/firebase/firebase-js-sdk/commit/171b78b762826a640d267dd4dd172ad9459c4561), [`1fbc4c4b7`](https://github.com/firebase/firebase-js-sdk/commit/1fbc4c4b7f893ac1f973ccc29205771adec536ca), [`29d034072`](https://github.com/firebase/firebase-js-sdk/commit/29d034072c20af394ce384e42aa10a37d5dfcb18)]:
52
+  - @firebase/util@1.7.1
53
+  - @firebase/analytics@0.8.2
54
+  - @firebase/component@0.5.19
55
+
56
+## 0.1.14
57
+
58
+### Patch Changes
59
+
60
+- Updated dependencies [[`fdd4ab464`](https://github.com/firebase/firebase-js-sdk/commit/fdd4ab464b59a107bdcc195df3f01e32efd89ed4)]:
61
+  - @firebase/util@1.7.0
62
+  - @firebase/analytics@0.8.1
63
+  - @firebase/component@0.5.18
64
+
65
+## 0.1.13
66
+
67
+### Patch Changes
68
+
69
+- Updated dependencies [[`b12af44a5`](https://github.com/firebase/firebase-js-sdk/commit/b12af44a5c7500e1192d6cc1a4afc4d77efadbaf), [`1d3a34d7d`](https://github.com/firebase/firebase-js-sdk/commit/1d3a34d7da5bf3c267d014efb587e03c46ff3064), [`69e2ee064`](https://github.com/firebase/firebase-js-sdk/commit/69e2ee064e0729d8da823f1e60f6fb7f3bbe5700)]:
70
+  - @firebase/util@1.6.3
71
+  - @firebase/analytics@0.8.0
72
+  - @firebase/component@0.5.17
73
+
74
+## 0.1.12
75
+
76
+### Patch Changes
77
+
78
+- Updated dependencies [[`835f1d46a`](https://github.com/firebase/firebase-js-sdk/commit/835f1d46a6780535bc660ef7dc23293350d5fe43), [`efe2000fc`](https://github.com/firebase/firebase-js-sdk/commit/efe2000fc499e2c85c4e5e0fef6741ff3bad2eb0)]:
79
+  - @firebase/analytics@0.7.11
80
+  - @firebase/util@1.6.2
81
+  - @firebase/component@0.5.16
82
+
83
+## 0.1.11
84
+
85
+### Patch Changes
86
+
87
+- [`2cd1cc76f`](https://github.com/firebase/firebase-js-sdk/commit/2cd1cc76f2a308135cd60f424fe09084a34b5cb5) [#6307](https://github.com/firebase/firebase-js-sdk/pull/6307) (fixes [#6300](https://github.com/firebase/firebase-js-sdk/issues/6300)) - fix: add type declarations to exports field
88
+
89
+- Updated dependencies [[`2cd1cc76f`](https://github.com/firebase/firebase-js-sdk/commit/2cd1cc76f2a308135cd60f424fe09084a34b5cb5)]:
90
+  - @firebase/analytics@0.7.10
91
+  - @firebase/component@0.5.15
92
+  - @firebase/util@1.6.1
93
+
94
+## 0.1.10
95
+
96
+### Patch Changes
97
+
98
+- Updated dependencies [[`9c5c9c36d`](https://github.com/firebase/firebase-js-sdk/commit/9c5c9c36da80b98b73cfd60ef2e2965087e9f801)]:
99
+  - @firebase/util@1.6.0
100
+  - @firebase/analytics@0.7.9
101
+  - @firebase/component@0.5.14
102
+
103
+## 0.1.9
104
+
105
+### Patch Changes
106
+
107
+- Updated dependencies [[`e9e5f6b3c`](https://github.com/firebase/firebase-js-sdk/commit/e9e5f6b3ca9d61323b22f87986d9959f5297ec59)]:
108
+  - @firebase/util@1.5.2
109
+  - @firebase/analytics@0.7.8
110
+  - @firebase/component@0.5.13
111
+
112
+## 0.1.8
113
+
114
+### Patch Changes
115
+
116
+- Updated dependencies [[`3198d58dc`](https://github.com/firebase/firebase-js-sdk/commit/3198d58dcedbf7583914dbcc76984f6f7df8d2ef)]:
117
+  - @firebase/util@1.5.1
118
+  - @firebase/analytics@0.7.7
119
+  - @firebase/component@0.5.12
120
+
121
+## 0.1.7
122
+
123
+### Patch Changes
124
+
125
+- Updated dependencies [[`2d672cead`](https://github.com/firebase/firebase-js-sdk/commit/2d672cead167187cb714cd89b638c0884ba58f03)]:
126
+  - @firebase/util@1.5.0
127
+  - @firebase/analytics@0.7.6
128
+  - @firebase/component@0.5.11
129
+
130
+## 0.1.6
131
+
132
+### Patch Changes
133
+
134
+- Updated dependencies [[`3b481f572`](https://github.com/firebase/firebase-js-sdk/commit/3b481f572456e1eab3435bfc25717770d95a8c49)]:
135
+  - @firebase/util@1.4.3
136
+  - @firebase/analytics@0.7.5
137
+  - @firebase/component@0.5.10
138
+
139
+## 0.1.5
140
+
141
+### Patch Changes
142
+
143
+- [`3281315fa`](https://github.com/firebase/firebase-js-sdk/commit/3281315fae9c6f535f9d5052ee17d60861ea569a) [#5708](https://github.com/firebase/firebase-js-sdk/pull/5708) (fixes [#1487](https://github.com/firebase/firebase-js-sdk/issues/1487)) - Update build scripts to work with the exports field
144
+
145
+- Updated dependencies [[`3281315fa`](https://github.com/firebase/firebase-js-sdk/commit/3281315fae9c6f535f9d5052ee17d60861ea569a)]:
146
+  - @firebase/analytics@0.7.4
147
+  - @firebase/component@0.5.9
148
+  - @firebase/util@1.4.2
149
+
150
+## 0.1.4
151
+
152
+### Patch Changes
153
+
154
+- [`2322b6023`](https://github.com/firebase/firebase-js-sdk/commit/2322b6023c628cd9f4f4172767c17d215dd91684) [#5693](https://github.com/firebase/firebase-js-sdk/pull/5693) - Add exports field to all packages
155
+
156
+- Updated dependencies [[`2322b6023`](https://github.com/firebase/firebase-js-sdk/commit/2322b6023c628cd9f4f4172767c17d215dd91684)]:
157
+  - @firebase/analytics@0.7.3
158
+  - @firebase/component@0.5.8
159
+  - @firebase/util@1.4.1
160
+
161
+## 0.1.3
162
+
163
+### Patch Changes
164
+
165
+- Updated dependencies [[`93795c780`](https://github.com/firebase/firebase-js-sdk/commit/93795c7801d6b28ccbbe5855fd2f3fc377b1db5f)]:
166
+  - @firebase/analytics@0.7.2
167
+
168
+## 0.1.2
169
+
170
+### Patch Changes
171
+
172
+- [`b835b4cba`](https://github.com/firebase/firebase-js-sdk/commit/b835b4cbabc4b7b180ae38b908c49205ce31a422) [#5506](https://github.com/firebase/firebase-js-sdk/pull/5506) - checking isSupported led to runtime errors in certain environments
173
+
174
+- Updated dependencies [[`a99943fe3`](https://github.com/firebase/firebase-js-sdk/commit/a99943fe3bd5279761aa29d138ec91272b06df39), [`b835b4cba`](https://github.com/firebase/firebase-js-sdk/commit/b835b4cbabc4b7b180ae38b908c49205ce31a422), [`b835b4cba`](https://github.com/firebase/firebase-js-sdk/commit/b835b4cbabc4b7b180ae38b908c49205ce31a422)]:
175
+  - @firebase/util@1.4.0
176
+  - @firebase/analytics@0.7.1
177
+  - @firebase/component@0.5.7
178
+
179
+## 0.1.1
180
+
181
+### Patch Changes
182
+
183
+- [`cd15df0d1`](https://github.com/firebase/firebase-js-sdk/commit/cd15df0d1f51110f448e4284244b06be8d37f1c3) [#5400](https://github.com/firebase/firebase-js-sdk/pull/5400) (fixes [#2903](https://github.com/firebase/firebase-js-sdk/issues/2903)) - Fix cjs builds by removing the named export from app-compat
184
+
185
+## 0.1.0
186
+
187
+### Minor Changes
188
+
189
+- [`cdada6c68`](https://github.com/firebase/firebase-js-sdk/commit/cdada6c68f9740d13dd6674bcb658e28e68253b6) [#5345](https://github.com/firebase/firebase-js-sdk/pull/5345) (fixes [#5015](https://github.com/firebase/firebase-js-sdk/issues/5015)) - Release modularized SDKs
190
+
191
+### Patch Changes
192
+
193
+- Updated dependencies [[`cdada6c68`](https://github.com/firebase/firebase-js-sdk/commit/cdada6c68f9740d13dd6674bcb658e28e68253b6)]:
194
+  - @firebase/analytics@0.7.0
195
+  - @firebase/analytics-types@0.7.0

+ 5
- 0
node_modules/@firebase/analytics-compat/README.md View File

1
+# @firebase/analytics-compat
2
+
3
+This is the compatibility layer for the Firebase Analytics component of the Firebase JS SDK.
4
+
5
+**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**

+ 146
- 0
node_modules/@firebase/analytics-compat/dist/esm/index.esm.js View File

1
+import firebase from '@firebase/app-compat';
2
+import { logEvent, setCurrentScreen, setUserId, setUserProperties, setAnalyticsCollectionEnabled, settings, isSupported } from '@firebase/analytics';
3
+import { Component } from '@firebase/component';
4
+
5
+var name = "@firebase/analytics-compat";
6
+var version = "0.2.1";
7
+
8
+/**
9
+ * @license
10
+ * Copyright 2020 Google LLC
11
+ *
12
+ * Licensed under the Apache License, Version 2.0 (the "License");
13
+ * you may not use this file except in compliance with the License.
14
+ * You may obtain a copy of the License at
15
+ *
16
+ *   http://www.apache.org/licenses/LICENSE-2.0
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software
19
+ * distributed under the License is distributed on an "AS IS" BASIS,
20
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ * See the License for the specific language governing permissions and
22
+ * limitations under the License.
23
+ */
24
+var AnalyticsService = /** @class */ (function () {
25
+    function AnalyticsService(app, _delegate) {
26
+        this.app = app;
27
+        this._delegate = _delegate;
28
+    }
29
+    AnalyticsService.prototype.logEvent = function (eventName, eventParams, options) {
30
+        logEvent(this._delegate, eventName, eventParams, options);
31
+    };
32
+    /**
33
+     * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.
34
+     * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.
35
+     */
36
+    AnalyticsService.prototype.setCurrentScreen = function (screenName, options) {
37
+        setCurrentScreen(this._delegate, screenName, options);
38
+    };
39
+    AnalyticsService.prototype.setUserId = function (id, options) {
40
+        setUserId(this._delegate, id, options);
41
+    };
42
+    AnalyticsService.prototype.setUserProperties = function (properties, options) {
43
+        setUserProperties(this._delegate, properties, options);
44
+    };
45
+    AnalyticsService.prototype.setAnalyticsCollectionEnabled = function (enabled) {
46
+        setAnalyticsCollectionEnabled(this._delegate, enabled);
47
+    };
48
+    return AnalyticsService;
49
+}());
50
+
51
+/**
52
+ * @license
53
+ * Copyright 2021 Google LLC
54
+ *
55
+ * Licensed under the Apache License, Version 2.0 (the "License");
56
+ * you may not use this file except in compliance with the License.
57
+ * You may obtain a copy of the License at
58
+ *
59
+ *   http://www.apache.org/licenses/LICENSE-2.0
60
+ *
61
+ * Unless required by applicable law or agreed to in writing, software
62
+ * distributed under the License is distributed on an "AS IS" BASIS,
63
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
64
+ * See the License for the specific language governing permissions and
65
+ * limitations under the License.
66
+ */
67
+/**
68
+ * Officially recommended event names for gtag.js
69
+ * Any other string is also allowed.
70
+ */
71
+var EventName;
72
+(function (EventName) {
73
+    EventName["ADD_SHIPPING_INFO"] = "add_shipping_info";
74
+    EventName["ADD_PAYMENT_INFO"] = "add_payment_info";
75
+    EventName["ADD_TO_CART"] = "add_to_cart";
76
+    EventName["ADD_TO_WISHLIST"] = "add_to_wishlist";
77
+    EventName["BEGIN_CHECKOUT"] = "begin_checkout";
78
+    /**
79
+     * @deprecated
80
+     * This event name is deprecated and is unsupported in updated
81
+     * Enhanced Ecommerce reports.
82
+     */
83
+    EventName["CHECKOUT_PROGRESS"] = "checkout_progress";
84
+    EventName["EXCEPTION"] = "exception";
85
+    EventName["GENERATE_LEAD"] = "generate_lead";
86
+    EventName["LOGIN"] = "login";
87
+    EventName["PAGE_VIEW"] = "page_view";
88
+    EventName["PURCHASE"] = "purchase";
89
+    EventName["REFUND"] = "refund";
90
+    EventName["REMOVE_FROM_CART"] = "remove_from_cart";
91
+    EventName["SCREEN_VIEW"] = "screen_view";
92
+    EventName["SEARCH"] = "search";
93
+    EventName["SELECT_CONTENT"] = "select_content";
94
+    EventName["SELECT_ITEM"] = "select_item";
95
+    EventName["SELECT_PROMOTION"] = "select_promotion";
96
+    /** @deprecated */
97
+    EventName["SET_CHECKOUT_OPTION"] = "set_checkout_option";
98
+    EventName["SHARE"] = "share";
99
+    EventName["SIGN_UP"] = "sign_up";
100
+    EventName["TIMING_COMPLETE"] = "timing_complete";
101
+    EventName["VIEW_CART"] = "view_cart";
102
+    EventName["VIEW_ITEM"] = "view_item";
103
+    EventName["VIEW_ITEM_LIST"] = "view_item_list";
104
+    EventName["VIEW_PROMOTION"] = "view_promotion";
105
+    EventName["VIEW_SEARCH_RESULTS"] = "view_search_results";
106
+})(EventName || (EventName = {}));
107
+
108
+/**
109
+ * @license
110
+ * Copyright 2021 Google LLC
111
+ *
112
+ * Licensed under the Apache License, Version 2.0 (the "License");
113
+ * you may not use this file except in compliance with the License.
114
+ * You may obtain a copy of the License at
115
+ *
116
+ *   http://www.apache.org/licenses/LICENSE-2.0
117
+ *
118
+ * Unless required by applicable law or agreed to in writing, software
119
+ * distributed under the License is distributed on an "AS IS" BASIS,
120
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
121
+ * See the License for the specific language governing permissions and
122
+ * limitations under the License.
123
+ */
124
+var factory = function (container) {
125
+    // Dependencies
126
+    var app = container.getProvider('app-compat').getImmediate();
127
+    var analyticsServiceExp = container.getProvider('analytics').getImmediate();
128
+    return new AnalyticsService(app, analyticsServiceExp);
129
+};
130
+function registerAnalytics() {
131
+    var namespaceExports = {
132
+        Analytics: AnalyticsService,
133
+        settings: settings,
134
+        isSupported: isSupported,
135
+        // We removed this enum in exp so need to re-create it here for compat.
136
+        EventName: EventName
137
+    };
138
+    firebase.INTERNAL.registerComponent(new Component('analytics-compat', factory, "PUBLIC" /* ComponentType.PUBLIC */)
139
+        .setServiceProps(namespaceExports)
140
+        .setMultipleInstances(true));
141
+}
142
+registerAnalytics();
143
+firebase.registerVersion(name, version);
144
+
145
+export { registerAnalytics };
146
+//# sourceMappingURL=index.esm.js.map

+ 1
- 0
node_modules/@firebase/analytics-compat/dist/esm/index.esm.js.map
File diff suppressed because it is too large
View File


+ 145
- 0
node_modules/@firebase/analytics-compat/dist/esm/index.esm2017.js View File

1
+import firebase from '@firebase/app-compat';
2
+import { logEvent, setCurrentScreen, setUserId, setUserProperties, setAnalyticsCollectionEnabled, settings, isSupported } from '@firebase/analytics';
3
+import { Component } from '@firebase/component';
4
+
5
+const name = "@firebase/analytics-compat";
6
+const version = "0.2.1";
7
+
8
+/**
9
+ * @license
10
+ * Copyright 2020 Google LLC
11
+ *
12
+ * Licensed under the Apache License, Version 2.0 (the "License");
13
+ * you may not use this file except in compliance with the License.
14
+ * You may obtain a copy of the License at
15
+ *
16
+ *   http://www.apache.org/licenses/LICENSE-2.0
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software
19
+ * distributed under the License is distributed on an "AS IS" BASIS,
20
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ * See the License for the specific language governing permissions and
22
+ * limitations under the License.
23
+ */
24
+class AnalyticsService {
25
+    constructor(app, _delegate) {
26
+        this.app = app;
27
+        this._delegate = _delegate;
28
+    }
29
+    logEvent(eventName, eventParams, options) {
30
+        logEvent(this._delegate, eventName, eventParams, options);
31
+    }
32
+    /**
33
+     * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.
34
+     * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.
35
+     */
36
+    setCurrentScreen(screenName, options) {
37
+        setCurrentScreen(this._delegate, screenName, options);
38
+    }
39
+    setUserId(id, options) {
40
+        setUserId(this._delegate, id, options);
41
+    }
42
+    setUserProperties(properties, options) {
43
+        setUserProperties(this._delegate, properties, options);
44
+    }
45
+    setAnalyticsCollectionEnabled(enabled) {
46
+        setAnalyticsCollectionEnabled(this._delegate, enabled);
47
+    }
48
+}
49
+
50
+/**
51
+ * @license
52
+ * Copyright 2021 Google LLC
53
+ *
54
+ * Licensed under the Apache License, Version 2.0 (the "License");
55
+ * you may not use this file except in compliance with the License.
56
+ * You may obtain a copy of the License at
57
+ *
58
+ *   http://www.apache.org/licenses/LICENSE-2.0
59
+ *
60
+ * Unless required by applicable law or agreed to in writing, software
61
+ * distributed under the License is distributed on an "AS IS" BASIS,
62
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
63
+ * See the License for the specific language governing permissions and
64
+ * limitations under the License.
65
+ */
66
+/**
67
+ * Officially recommended event names for gtag.js
68
+ * Any other string is also allowed.
69
+ */
70
+var EventName;
71
+(function (EventName) {
72
+    EventName["ADD_SHIPPING_INFO"] = "add_shipping_info";
73
+    EventName["ADD_PAYMENT_INFO"] = "add_payment_info";
74
+    EventName["ADD_TO_CART"] = "add_to_cart";
75
+    EventName["ADD_TO_WISHLIST"] = "add_to_wishlist";
76
+    EventName["BEGIN_CHECKOUT"] = "begin_checkout";
77
+    /**
78
+     * @deprecated
79
+     * This event name is deprecated and is unsupported in updated
80
+     * Enhanced Ecommerce reports.
81
+     */
82
+    EventName["CHECKOUT_PROGRESS"] = "checkout_progress";
83
+    EventName["EXCEPTION"] = "exception";
84
+    EventName["GENERATE_LEAD"] = "generate_lead";
85
+    EventName["LOGIN"] = "login";
86
+    EventName["PAGE_VIEW"] = "page_view";
87
+    EventName["PURCHASE"] = "purchase";
88
+    EventName["REFUND"] = "refund";
89
+    EventName["REMOVE_FROM_CART"] = "remove_from_cart";
90
+    EventName["SCREEN_VIEW"] = "screen_view";
91
+    EventName["SEARCH"] = "search";
92
+    EventName["SELECT_CONTENT"] = "select_content";
93
+    EventName["SELECT_ITEM"] = "select_item";
94
+    EventName["SELECT_PROMOTION"] = "select_promotion";
95
+    /** @deprecated */
96
+    EventName["SET_CHECKOUT_OPTION"] = "set_checkout_option";
97
+    EventName["SHARE"] = "share";
98
+    EventName["SIGN_UP"] = "sign_up";
99
+    EventName["TIMING_COMPLETE"] = "timing_complete";
100
+    EventName["VIEW_CART"] = "view_cart";
101
+    EventName["VIEW_ITEM"] = "view_item";
102
+    EventName["VIEW_ITEM_LIST"] = "view_item_list";
103
+    EventName["VIEW_PROMOTION"] = "view_promotion";
104
+    EventName["VIEW_SEARCH_RESULTS"] = "view_search_results";
105
+})(EventName || (EventName = {}));
106
+
107
+/**
108
+ * @license
109
+ * Copyright 2021 Google LLC
110
+ *
111
+ * Licensed under the Apache License, Version 2.0 (the "License");
112
+ * you may not use this file except in compliance with the License.
113
+ * You may obtain a copy of the License at
114
+ *
115
+ *   http://www.apache.org/licenses/LICENSE-2.0
116
+ *
117
+ * Unless required by applicable law or agreed to in writing, software
118
+ * distributed under the License is distributed on an "AS IS" BASIS,
119
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
120
+ * See the License for the specific language governing permissions and
121
+ * limitations under the License.
122
+ */
123
+const factory = (container) => {
124
+    // Dependencies
125
+    const app = container.getProvider('app-compat').getImmediate();
126
+    const analyticsServiceExp = container.getProvider('analytics').getImmediate();
127
+    return new AnalyticsService(app, analyticsServiceExp);
128
+};
129
+function registerAnalytics() {
130
+    const namespaceExports = {
131
+        Analytics: AnalyticsService,
132
+        settings: settings,
133
+        isSupported: isSupported,
134
+        // We removed this enum in exp so need to re-create it here for compat.
135
+        EventName
136
+    };
137
+    firebase.INTERNAL.registerComponent(new Component('analytics-compat', factory, "PUBLIC" /* ComponentType.PUBLIC */)
138
+        .setServiceProps(namespaceExports)
139
+        .setMultipleInstances(true));
140
+}
141
+registerAnalytics();
142
+firebase.registerVersion(name, version);
143
+
144
+export { registerAnalytics };
145
+//# sourceMappingURL=index.esm2017.js.map

+ 1
- 0
node_modules/@firebase/analytics-compat/dist/esm/index.esm2017.js.map
File diff suppressed because it is too large
View File


+ 1
- 0
node_modules/@firebase/analytics-compat/dist/esm/package.json View File

1
+{"type":"module"}

+ 55
- 0
node_modules/@firebase/analytics-compat/dist/esm/src/constants.d.ts View File

1
+/**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ *   http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+/**
18
+ * Officially recommended event names for gtag.js
19
+ * Any other string is also allowed.
20
+ */
21
+export declare enum EventName {
22
+    ADD_SHIPPING_INFO = "add_shipping_info",
23
+    ADD_PAYMENT_INFO = "add_payment_info",
24
+    ADD_TO_CART = "add_to_cart",
25
+    ADD_TO_WISHLIST = "add_to_wishlist",
26
+    BEGIN_CHECKOUT = "begin_checkout",
27
+    /**
28
+     * @deprecated
29
+     * This event name is deprecated and is unsupported in updated
30
+     * Enhanced Ecommerce reports.
31
+     */
32
+    CHECKOUT_PROGRESS = "checkout_progress",
33
+    EXCEPTION = "exception",
34
+    GENERATE_LEAD = "generate_lead",
35
+    LOGIN = "login",
36
+    PAGE_VIEW = "page_view",
37
+    PURCHASE = "purchase",
38
+    REFUND = "refund",
39
+    REMOVE_FROM_CART = "remove_from_cart",
40
+    SCREEN_VIEW = "screen_view",
41
+    SEARCH = "search",
42
+    SELECT_CONTENT = "select_content",
43
+    SELECT_ITEM = "select_item",
44
+    SELECT_PROMOTION = "select_promotion",
45
+    /** @deprecated */
46
+    SET_CHECKOUT_OPTION = "set_checkout_option",
47
+    SHARE = "share",
48
+    SIGN_UP = "sign_up",
49
+    TIMING_COMPLETE = "timing_complete",
50
+    VIEW_CART = "view_cart",
51
+    VIEW_ITEM = "view_item",
52
+    VIEW_ITEM_LIST = "view_item_list",
53
+    VIEW_PROMOTION = "view_promotion",
54
+    VIEW_SEARCH_RESULTS = "view_search_results"
55
+}

+ 29
- 0
node_modules/@firebase/analytics-compat/dist/esm/src/index.d.ts View File

1
+/**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ *   http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+import { FirebaseAnalytics } from '@firebase/analytics-types';
18
+export declare function registerAnalytics(): void;
19
+/**
20
+ * Define extension behavior of `registerAnalytics`
21
+ */
22
+declare module '@firebase/app-compat' {
23
+    interface FirebaseNamespace {
24
+        analytics(app?: FirebaseApp): FirebaseAnalytics;
25
+    }
26
+    interface FirebaseApp {
27
+        analytics(): FirebaseAnalytics;
28
+    }
29
+}

+ 33
- 0
node_modules/@firebase/analytics-compat/dist/esm/src/service.d.ts View File

1
+/**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ *   http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+import { AnalyticsCallOptions, CustomParams, EventParams, FirebaseAnalytics } from '@firebase/analytics-types';
18
+import { Analytics as AnalyticsServiceExp } from '@firebase/analytics';
19
+import { _FirebaseService, FirebaseApp } from '@firebase/app-compat';
20
+export declare class AnalyticsService implements FirebaseAnalytics, _FirebaseService {
21
+    app: FirebaseApp;
22
+    readonly _delegate: AnalyticsServiceExp;
23
+    constructor(app: FirebaseApp, _delegate: AnalyticsServiceExp);
24
+    logEvent(eventName: string, eventParams?: EventParams | CustomParams, options?: AnalyticsCallOptions): void;
25
+    /**
26
+     * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.
27
+     * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.
28
+     */
29
+    setCurrentScreen(screenName: string, options?: AnalyticsCallOptions): void;
30
+    setUserId(id: string, options?: AnalyticsCallOptions): void;
31
+    setUserProperties(properties: CustomParams, options?: AnalyticsCallOptions): void;
32
+    setAnalyticsCollectionEnabled(enabled: boolean): void;
33
+}

+ 1
- 0
node_modules/@firebase/analytics-compat/dist/esm/src/service.test.d.ts View File

1
+export {};

+ 154
- 0
node_modules/@firebase/analytics-compat/dist/index.cjs.js View File

1
+'use strict';
2
+
3
+Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+var firebase = require('@firebase/app-compat');
6
+var analytics = require('@firebase/analytics');
7
+var component = require('@firebase/component');
8
+
9
+function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
+
11
+var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
12
+
13
+var name = "@firebase/analytics-compat";
14
+var version = "0.2.1";
15
+
16
+/**
17
+ * @license
18
+ * Copyright 2020 Google LLC
19
+ *
20
+ * Licensed under the Apache License, Version 2.0 (the "License");
21
+ * you may not use this file except in compliance with the License.
22
+ * You may obtain a copy of the License at
23
+ *
24
+ *   http://www.apache.org/licenses/LICENSE-2.0
25
+ *
26
+ * Unless required by applicable law or agreed to in writing, software
27
+ * distributed under the License is distributed on an "AS IS" BASIS,
28
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29
+ * See the License for the specific language governing permissions and
30
+ * limitations under the License.
31
+ */
32
+var AnalyticsService = /** @class */ (function () {
33
+    function AnalyticsService(app, _delegate) {
34
+        this.app = app;
35
+        this._delegate = _delegate;
36
+    }
37
+    AnalyticsService.prototype.logEvent = function (eventName, eventParams, options) {
38
+        analytics.logEvent(this._delegate, eventName, eventParams, options);
39
+    };
40
+    /**
41
+     * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.
42
+     * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.
43
+     */
44
+    AnalyticsService.prototype.setCurrentScreen = function (screenName, options) {
45
+        analytics.setCurrentScreen(this._delegate, screenName, options);
46
+    };
47
+    AnalyticsService.prototype.setUserId = function (id, options) {
48
+        analytics.setUserId(this._delegate, id, options);
49
+    };
50
+    AnalyticsService.prototype.setUserProperties = function (properties, options) {
51
+        analytics.setUserProperties(this._delegate, properties, options);
52
+    };
53
+    AnalyticsService.prototype.setAnalyticsCollectionEnabled = function (enabled) {
54
+        analytics.setAnalyticsCollectionEnabled(this._delegate, enabled);
55
+    };
56
+    return AnalyticsService;
57
+}());
58
+
59
+/**
60
+ * @license
61
+ * Copyright 2021 Google LLC
62
+ *
63
+ * Licensed under the Apache License, Version 2.0 (the "License");
64
+ * you may not use this file except in compliance with the License.
65
+ * You may obtain a copy of the License at
66
+ *
67
+ *   http://www.apache.org/licenses/LICENSE-2.0
68
+ *
69
+ * Unless required by applicable law or agreed to in writing, software
70
+ * distributed under the License is distributed on an "AS IS" BASIS,
71
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
+ * See the License for the specific language governing permissions and
73
+ * limitations under the License.
74
+ */
75
+/**
76
+ * Officially recommended event names for gtag.js
77
+ * Any other string is also allowed.
78
+ */
79
+var EventName;
80
+(function (EventName) {
81
+    EventName["ADD_SHIPPING_INFO"] = "add_shipping_info";
82
+    EventName["ADD_PAYMENT_INFO"] = "add_payment_info";
83
+    EventName["ADD_TO_CART"] = "add_to_cart";
84
+    EventName["ADD_TO_WISHLIST"] = "add_to_wishlist";
85
+    EventName["BEGIN_CHECKOUT"] = "begin_checkout";
86
+    /**
87
+     * @deprecated
88
+     * This event name is deprecated and is unsupported in updated
89
+     * Enhanced Ecommerce reports.
90
+     */
91
+    EventName["CHECKOUT_PROGRESS"] = "checkout_progress";
92
+    EventName["EXCEPTION"] = "exception";
93
+    EventName["GENERATE_LEAD"] = "generate_lead";
94
+    EventName["LOGIN"] = "login";
95
+    EventName["PAGE_VIEW"] = "page_view";
96
+    EventName["PURCHASE"] = "purchase";
97
+    EventName["REFUND"] = "refund";
98
+    EventName["REMOVE_FROM_CART"] = "remove_from_cart";
99
+    EventName["SCREEN_VIEW"] = "screen_view";
100
+    EventName["SEARCH"] = "search";
101
+    EventName["SELECT_CONTENT"] = "select_content";
102
+    EventName["SELECT_ITEM"] = "select_item";
103
+    EventName["SELECT_PROMOTION"] = "select_promotion";
104
+    /** @deprecated */
105
+    EventName["SET_CHECKOUT_OPTION"] = "set_checkout_option";
106
+    EventName["SHARE"] = "share";
107
+    EventName["SIGN_UP"] = "sign_up";
108
+    EventName["TIMING_COMPLETE"] = "timing_complete";
109
+    EventName["VIEW_CART"] = "view_cart";
110
+    EventName["VIEW_ITEM"] = "view_item";
111
+    EventName["VIEW_ITEM_LIST"] = "view_item_list";
112
+    EventName["VIEW_PROMOTION"] = "view_promotion";
113
+    EventName["VIEW_SEARCH_RESULTS"] = "view_search_results";
114
+})(EventName || (EventName = {}));
115
+
116
+/**
117
+ * @license
118
+ * Copyright 2021 Google LLC
119
+ *
120
+ * Licensed under the Apache License, Version 2.0 (the "License");
121
+ * you may not use this file except in compliance with the License.
122
+ * You may obtain a copy of the License at
123
+ *
124
+ *   http://www.apache.org/licenses/LICENSE-2.0
125
+ *
126
+ * Unless required by applicable law or agreed to in writing, software
127
+ * distributed under the License is distributed on an "AS IS" BASIS,
128
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
129
+ * See the License for the specific language governing permissions and
130
+ * limitations under the License.
131
+ */
132
+var factory = function (container) {
133
+    // Dependencies
134
+    var app = container.getProvider('app-compat').getImmediate();
135
+    var analyticsServiceExp = container.getProvider('analytics').getImmediate();
136
+    return new AnalyticsService(app, analyticsServiceExp);
137
+};
138
+function registerAnalytics() {
139
+    var namespaceExports = {
140
+        Analytics: AnalyticsService,
141
+        settings: analytics.settings,
142
+        isSupported: analytics.isSupported,
143
+        // We removed this enum in exp so need to re-create it here for compat.
144
+        EventName: EventName
145
+    };
146
+    firebase__default["default"].INTERNAL.registerComponent(new component.Component('analytics-compat', factory, "PUBLIC" /* ComponentType.PUBLIC */)
147
+        .setServiceProps(namespaceExports)
148
+        .setMultipleInstances(true));
149
+}
150
+registerAnalytics();
151
+firebase__default["default"].registerVersion(name, version);
152
+
153
+exports.registerAnalytics = registerAnalytics;
154
+//# sourceMappingURL=index.cjs.js.map

+ 1
- 0
node_modules/@firebase/analytics-compat/dist/index.cjs.js.map
File diff suppressed because it is too large
View File


+ 55
- 0
node_modules/@firebase/analytics-compat/dist/src/constants.d.ts View File

1
+/**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ *   http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+/**
18
+ * Officially recommended event names for gtag.js
19
+ * Any other string is also allowed.
20
+ */
21
+export declare enum EventName {
22
+    ADD_SHIPPING_INFO = "add_shipping_info",
23
+    ADD_PAYMENT_INFO = "add_payment_info",
24
+    ADD_TO_CART = "add_to_cart",
25
+    ADD_TO_WISHLIST = "add_to_wishlist",
26
+    BEGIN_CHECKOUT = "begin_checkout",
27
+    /**
28
+     * @deprecated
29
+     * This event name is deprecated and is unsupported in updated
30
+     * Enhanced Ecommerce reports.
31
+     */
32
+    CHECKOUT_PROGRESS = "checkout_progress",
33
+    EXCEPTION = "exception",
34
+    GENERATE_LEAD = "generate_lead",
35
+    LOGIN = "login",
36
+    PAGE_VIEW = "page_view",
37
+    PURCHASE = "purchase",
38
+    REFUND = "refund",
39
+    REMOVE_FROM_CART = "remove_from_cart",
40
+    SCREEN_VIEW = "screen_view",
41
+    SEARCH = "search",
42
+    SELECT_CONTENT = "select_content",
43
+    SELECT_ITEM = "select_item",
44
+    SELECT_PROMOTION = "select_promotion",
45
+    /** @deprecated */
46
+    SET_CHECKOUT_OPTION = "set_checkout_option",
47
+    SHARE = "share",
48
+    SIGN_UP = "sign_up",
49
+    TIMING_COMPLETE = "timing_complete",
50
+    VIEW_CART = "view_cart",
51
+    VIEW_ITEM = "view_item",
52
+    VIEW_ITEM_LIST = "view_item_list",
53
+    VIEW_PROMOTION = "view_promotion",
54
+    VIEW_SEARCH_RESULTS = "view_search_results"
55
+}

+ 172
- 0
node_modules/@firebase/analytics-compat/dist/src/index.d.ts View File

1
+/**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ *   http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+import { FirebaseAnalytics } from '@firebase/analytics-types';
18
+export declare function registerAnalytics(): void;
19
+/**
20
+ * Define extension behavior of `registerAnalytics`
21
+ */
22
+declare module '@firebase/app-compat' {
23
+    interface FirebaseNamespace {
24
+        analytics(app?: FirebaseApp): FirebaseAnalytics;
25
+    }
26
+    interface FirebaseApp {
27
+        analytics(): FirebaseAnalytics;
28
+    }
29
+}
30
+
31
+import { FirebaseApp as FirebaseAppCompat } from "@firebase/app-compat";
32
+import { type Analytics, type AnalyticsSettings, type EventParams, type AnalyticsCallOptions, type CustomEventName, type CustomParams } from "@firebase/analytics";
33
+declare module "@firebase/analytics" {
34
+    function getAnalytics(app?: FirebaseAppCompat): Analytics;
35
+    function initializeAnalytics(app: FirebaseAppCompat, options?: AnalyticsSettings): Analytics;
36
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'add_payment_info', eventParams?: {
37
+        coupon?: EventParams['coupon'];
38
+        currency?: EventParams['currency'];
39
+        items?: EventParams['items'];
40
+        payment_type?: EventParams['payment_type'];
41
+        value?: EventParams['value'];
42
+        [key: string]: any;
43
+    }, options?: AnalyticsCallOptions): void;
44
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'add_shipping_info', eventParams?: {
45
+        coupon?: EventParams['coupon'];
46
+        currency?: EventParams['currency'];
47
+        items?: EventParams['items'];
48
+        shipping_tier?: EventParams['shipping_tier'];
49
+        value?: EventParams['value'];
50
+        [key: string]: any;
51
+    }, options?: AnalyticsCallOptions): void;
52
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'add_to_cart' | 'add_to_wishlist' | 'remove_from_cart', eventParams?: {
53
+        currency?: EventParams['currency'];
54
+        value?: EventParams['value'];
55
+        items?: EventParams['items'];
56
+        [key: string]: any;
57
+    }, options?: AnalyticsCallOptions): void;
58
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'begin_checkout', eventParams?: {
59
+        currency?: EventParams['currency'];
60
+        coupon?: EventParams['coupon'];
61
+        value?: EventParams['value'];
62
+        items?: EventParams['items'];
63
+        [key: string]: any;
64
+    }, options?: AnalyticsCallOptions): void;
65
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'checkout_progress', eventParams?: {
66
+        currency?: EventParams['currency'];
67
+        coupon?: EventParams['coupon'];
68
+        value?: EventParams['value'];
69
+        items?: EventParams['items'];
70
+        checkout_step?: EventParams['checkout_step'];
71
+        checkout_option?: EventParams['checkout_option'];
72
+        [key: string]: any;
73
+    }, options?: AnalyticsCallOptions): void;
74
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'exception', eventParams?: {
75
+        description?: EventParams['description'];
76
+        fatal?: EventParams['fatal'];
77
+        [key: string]: any;
78
+    }, options?: AnalyticsCallOptions): void;
79
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'generate_lead', eventParams?: {
80
+        value?: EventParams['value'];
81
+        currency?: EventParams['currency'];
82
+        [key: string]: any;
83
+    }, options?: AnalyticsCallOptions): void;
84
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'login', eventParams?: {
85
+        method?: EventParams['method'];
86
+        [key: string]: any;
87
+    }, options?: AnalyticsCallOptions): void;
88
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'page_view', eventParams?: {
89
+        page_title?: string;
90
+        page_location?: string;
91
+        page_path?: string;
92
+        [key: string]: any;
93
+    }, options?: AnalyticsCallOptions): void;
94
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'purchase' | 'refund', eventParams?: {
95
+        value?: EventParams['value'];
96
+        currency?: EventParams['currency'];
97
+        transaction_id: EventParams['transaction_id'];
98
+        tax?: EventParams['tax'];
99
+        shipping?: EventParams['shipping'];
100
+        items?: EventParams['items'];
101
+        coupon?: EventParams['coupon'];
102
+        affiliation?: EventParams['affiliation'];
103
+        [key: string]: any;
104
+    }, options?: AnalyticsCallOptions): void;
105
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'screen_view', eventParams?: {
106
+        firebase_screen: EventParams['firebase_screen'];
107
+        firebase_screen_class: EventParams['firebase_screen_class'];
108
+        [key: string]: any;
109
+    }, options?: AnalyticsCallOptions): void;
110
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'search' | 'view_search_results', eventParams?: {
111
+        search_term?: EventParams['search_term'];
112
+        [key: string]: any;
113
+    }, options?: AnalyticsCallOptions): void;
114
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'select_content', eventParams?: {
115
+        content_type?: EventParams['content_type'];
116
+        item_id?: EventParams['item_id'];
117
+        [key: string]: any;
118
+    }, options?: AnalyticsCallOptions): void;
119
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'select_item', eventParams?: {
120
+        items?: EventParams['items'];
121
+        item_list_name?: EventParams['item_list_name'];
122
+        item_list_id?: EventParams['item_list_id'];
123
+        [key: string]: any;
124
+    }, options?: AnalyticsCallOptions): void;
125
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'select_promotion' | 'view_promotion', eventParams?: {
126
+        items?: EventParams['items'];
127
+        promotion_id?: EventParams['promotion_id'];
128
+        promotion_name?: EventParams['promotion_name'];
129
+        [key: string]: any;
130
+    }, options?: AnalyticsCallOptions): void;
131
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'set_checkout_option', eventParams?: {
132
+        checkout_step?: EventParams['checkout_step'];
133
+        checkout_option?: EventParams['checkout_option'];
134
+        [key: string]: any;
135
+    }, options?: AnalyticsCallOptions): void;
136
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'share', eventParams?: {
137
+        method?: EventParams['method'];
138
+        content_type?: EventParams['content_type'];
139
+        item_id?: EventParams['item_id'];
140
+        [key: string]: any;
141
+    }, options?: AnalyticsCallOptions): void;
142
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'sign_up', eventParams?: {
143
+        method?: EventParams['method'];
144
+        [key: string]: any;
145
+    }, options?: AnalyticsCallOptions): void;
146
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'timing_complete', eventParams?: {
147
+        name: string;
148
+        value: number;
149
+        event_category?: string;
150
+        event_label?: string;
151
+        [key: string]: any;
152
+    }, options?: AnalyticsCallOptions): void;
153
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'view_cart' | 'view_item', eventParams?: {
154
+        currency?: EventParams['currency'];
155
+        items?: EventParams['items'];
156
+        value?: EventParams['value'];
157
+        [key: string]: any;
158
+    }, options?: AnalyticsCallOptions): void;
159
+    function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'view_item_list', eventParams?: {
160
+        items?: EventParams['items'];
161
+        item_list_name?: EventParams['item_list_name'];
162
+        item_list_id?: EventParams['item_list_id'];
163
+        [key: string]: any;
164
+    }, options?: AnalyticsCallOptions): void;
165
+    function logEvent<T extends string>(analyticsInstance: FirebaseAnalytics, eventName: CustomEventName<T>, eventParams?: {
166
+        [key: string]: any;
167
+    }, options?: AnalyticsCallOptions): void;
168
+    function setAnalyticsCollectionEnabled(analyticsInstance: FirebaseAnalytics, enabled: boolean): void;
169
+    function setCurrentScreen(analyticsInstance: FirebaseAnalytics, screenName: string, options?: AnalyticsCallOptions): void;
170
+    function setUserId(analyticsInstance: FirebaseAnalytics, id: string | null, options?: AnalyticsCallOptions): void;
171
+    function setUserProperties(analyticsInstance: FirebaseAnalytics, properties: CustomParams, options?: AnalyticsCallOptions): void;
172
+}

+ 33
- 0
node_modules/@firebase/analytics-compat/dist/src/service.d.ts View File

1
+/**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ *   http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+import { AnalyticsCallOptions, CustomParams, EventParams, FirebaseAnalytics } from '@firebase/analytics-types';
18
+import { Analytics as AnalyticsServiceExp } from '@firebase/analytics';
19
+import { _FirebaseService, FirebaseApp } from '@firebase/app-compat';
20
+export declare class AnalyticsService implements FirebaseAnalytics, _FirebaseService {
21
+    app: FirebaseApp;
22
+    readonly _delegate: AnalyticsServiceExp;
23
+    constructor(app: FirebaseApp, _delegate: AnalyticsServiceExp);
24
+    logEvent(eventName: string, eventParams?: EventParams | CustomParams, options?: AnalyticsCallOptions): void;
25
+    /**
26
+     * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.
27
+     * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.
28
+     */
29
+    setCurrentScreen(screenName: string, options?: AnalyticsCallOptions): void;
30
+    setUserId(id: string, options?: AnalyticsCallOptions): void;
31
+    setUserProperties(properties: CustomParams, options?: AnalyticsCallOptions): void;
32
+    setAnalyticsCollectionEnabled(enabled: boolean): void;
33
+}

+ 1
- 0
node_modules/@firebase/analytics-compat/dist/src/service.test.d.ts View File

1
+export {};

+ 68
- 0
node_modules/@firebase/analytics-compat/package.json View File

1
+{
2
+  "name": "@firebase/analytics-compat",
3
+  "version": "0.2.1",
4
+  "description": "",
5
+  "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
+  "main": "dist/index.cjs.js",
7
+  "browser": "dist/esm/index.esm2017.js",
8
+  "module": "dist/esm/index.esm2017.js",
9
+  "esm5": "dist/esm/index.esm.js",
10
+  "exports": {
11
+    ".": {
12
+      "types": "./dist/src/index.d.ts",
13
+      "require": "./dist/index.cjs.js",
14
+      "esm5": "./dist/esm/index.esm.js",
15
+      "default": "./dist/esm/index.esm2017.js"
16
+    },
17
+    "./package.json": "./package.json"
18
+  },
19
+  "files": [
20
+    "dist"
21
+  ],
22
+  "license": "Apache-2.0",
23
+  "peerDependencies": {
24
+    "@firebase/app-compat": "0.x"
25
+  },
26
+  "devDependencies": {
27
+    "@firebase/app-compat": "0.2.1",
28
+    "rollup": "2.79.1",
29
+    "@rollup/plugin-json": "4.1.0",
30
+    "rollup-plugin-typescript2": "0.31.2",
31
+    "typescript": "4.7.4"
32
+  },
33
+  "repository": {
34
+    "directory": "packages/analytics-compat",
35
+    "type": "git",
36
+    "url": "https://github.com/firebase/firebase-js-sdk.git"
37
+  },
38
+  "bugs": {
39
+    "url": "https://github.com/firebase/firebase-js-sdk/issues"
40
+  },
41
+  "scripts": {
42
+    "lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
43
+    "lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
44
+    "build": "rollup -c",
45
+    "build:deps": "lerna run --scope @firebase/analytics-compat --include-dependencies build",
46
+    "build:release": "yarn build && yarn add-compat-overloads",
47
+    "dev": "rollup -c -w",
48
+    "test": "run-p lint test:browser",
49
+    "test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
50
+    "test:browser": "karma start --single-run",
51
+    "test:browser:debug": "karma start --browsers=Chrome --auto-watch",
52
+    "add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../analytics/dist/analytics-public.d.ts -o dist/src/index.d.ts -a -r Analytics:FirebaseAnalytics -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/analytics"
53
+  },
54
+  "typings": "dist/src/index.d.ts",
55
+  "dependencies": {
56
+    "@firebase/component": "0.6.1",
57
+    "@firebase/analytics": "0.9.1",
58
+    "@firebase/analytics-types": "0.8.0",
59
+    "@firebase/util": "1.9.0",
60
+    "tslib": "^2.1.0"
61
+  },
62
+  "nyc": {
63
+    "extension": [
64
+      ".ts"
65
+    ],
66
+    "reportDir": "./coverage/node"
67
+  }
68
+}

+ 39
- 0
node_modules/@firebase/analytics-types/CHANGELOG.md View File

1
+# @firebase/analytics-types
2
+
3
+## 0.8.0
4
+
5
+### Minor Changes
6
+
7
+- [`1625f7a95`](https://github.com/firebase/firebase-js-sdk/commit/1625f7a95cc3ffb666845db0a8044329be74b5be) [#6799](https://github.com/firebase/firebase-js-sdk/pull/6799) - Update TypeScript version to 4.7.4.
8
+
9
+## 0.7.1
10
+
11
+### Patch Changes
12
+
13
+- [`4af28c1a4`](https://github.com/firebase/firebase-js-sdk/commit/4af28c1a42bd25ce2353f694ca1724c6101cbce5) [#6682](https://github.com/firebase/firebase-js-sdk/pull/6682) - Upgrade TypeScript to 4.7.4.
14
+
15
+## 0.7.0
16
+
17
+### Minor Changes
18
+
19
+- [`cdada6c68`](https://github.com/firebase/firebase-js-sdk/commit/cdada6c68f9740d13dd6674bcb658e28e68253b6) [#5345](https://github.com/firebase/firebase-js-sdk/pull/5345) (fixes [#5015](https://github.com/firebase/firebase-js-sdk/issues/5015)) - Release modularized SDKs
20
+
21
+## 0.6.0
22
+
23
+### Minor Changes
24
+
25
+- [`bd50d8310`](https://github.com/firebase/firebase-js-sdk/commit/bd50d83107be3d87064f72800c608abc94ae3456) [#5206](https://github.com/firebase/firebase-js-sdk/pull/5206) - Fix formatting of links in comments and update some event typings to correctly match GA4 specs.
26
+
27
+## 0.5.0
28
+
29
+### Minor Changes
30
+
31
+- [`02586c975`](https://github.com/firebase/firebase-js-sdk/commit/02586c9754318b01a0051561d2c7c4906059b5af) [#5070](https://github.com/firebase/firebase-js-sdk/pull/5070) - Add `firebase_screen` and `firebase_screen_class` to `logEvent()` overload for `screen_view` events.
32
+
33
+## 0.4.0
34
+
35
+### Minor Changes
36
+
37
+- [`fb3b095e4`](https://github.com/firebase/firebase-js-sdk/commit/fb3b095e4b7c8f57fdb3172bc039c84576abf290) [#2800](https://github.com/firebase/firebase-js-sdk/pull/2800) - Analytics now dynamically fetches the app's Measurement ID from the Dynamic Config backend
38
+  instead of depending on the local Firebase config. It will fall back to any `measurementId`
39
+  value found in the local config if the Dynamic Config fetch fails.

+ 3
- 0
node_modules/@firebase/analytics-types/README.md View File

1
+# @firebase/analytics-types
2
+
3
+**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**

+ 687
- 0
node_modules/@firebase/analytics-types/index.d.ts View File

1
+/**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ *   http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+import { FirebaseApp } from '@firebase/app-types';
19
+
20
+export type GtagCommand = 'event' | 'set' | 'config';
21
+
22
+export type DataLayer = Array<IArguments>;
23
+
24
+/**
25
+ * Additional options that can be passed to Firebase Analytics method
26
+ * calls such as `logEvent`, etc.
27
+ */
28
+export interface AnalyticsCallOptions {
29
+  /**
30
+   * If true, this config or event call applies globally to all
31
+   * analytics properties on the page.
32
+   */
33
+  global: boolean;
34
+}
35
+
36
+export interface FirebaseAnalytics {
37
+  app: FirebaseApp;
38
+
39
+  /**
40
+   * Sends analytics event with given `eventParams`. This method
41
+   * automatically associates this logged event with this Firebase web
42
+   * app instance on this device.
43
+   * List of recommended event parameters can be found in
44
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
45
+   * | the GA4 reference documentation}.
46
+   */
47
+  logEvent(
48
+    eventName: 'add_payment_info',
49
+    eventParams?: {
50
+      coupon?: EventParams['coupon'];
51
+      currency?: EventParams['currency'];
52
+      items?: EventParams['items'];
53
+      payment_type?: EventParams['payment_type'];
54
+      value?: EventParams['value'];
55
+      [key: string]: any;
56
+    },
57
+    options?: AnalyticsCallOptions
58
+  ): void;
59
+
60
+  /**
61
+   * Sends analytics event with given `eventParams`. This method
62
+   * automatically associates this logged event with this Firebase web
63
+   * app instance on this device.
64
+   * List of recommended event parameters can be found in
65
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
66
+   * | the GA4 reference documentation}.
67
+   */
68
+  logEvent(
69
+    eventName: 'add_shipping_info',
70
+    eventParams?: {
71
+      coupon?: EventParams['coupon'];
72
+      currency?: EventParams['currency'];
73
+      items?: EventParams['items'];
74
+      shipping_tier?: EventParams['shipping_tier'];
75
+      value?: EventParams['value'];
76
+      [key: string]: any;
77
+    },
78
+    options?: AnalyticsCallOptions
79
+  ): void;
80
+
81
+  /**
82
+   * Sends analytics event with given `eventParams`. This method
83
+   * automatically associates this logged event with this Firebase web
84
+   * app instance on this device.
85
+   * List of recommended event parameters can be found in
86
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
87
+   * | the GA4 reference documentation}.
88
+   */
89
+  logEvent(
90
+    eventName: 'add_to_cart' | 'add_to_wishlist' | 'remove_from_cart',
91
+    eventParams?: {
92
+      currency?: EventParams['currency'];
93
+      value?: EventParams['value'];
94
+      items?: EventParams['items'];
95
+      [key: string]: any;
96
+    },
97
+    options?: AnalyticsCallOptions
98
+  ): void;
99
+
100
+  /**
101
+   * Sends analytics event with given `eventParams`. This method
102
+   * automatically associates this logged event with this Firebase web
103
+   * app instance on this device.
104
+   * List of recommended event parameters can be found in
105
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
106
+   * | the GA4 reference documentation}.
107
+   */
108
+  logEvent(
109
+    eventName: 'begin_checkout',
110
+    eventParams?: {
111
+      currency?: EventParams['currency'];
112
+      coupon?: EventParams['coupon'];
113
+      value?: EventParams['value'];
114
+      items?: EventParams['items'];
115
+      [key: string]: any;
116
+    },
117
+    options?: AnalyticsCallOptions
118
+  ): void;
119
+
120
+  /**
121
+   * Sends analytics event with given `eventParams`. This method
122
+   * automatically associates this logged event with this Firebase web
123
+   * app instance on this device.
124
+   * List of recommended event parameters can be found in
125
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
126
+   * | the GA4 reference documentation}.
127
+   */
128
+  logEvent(
129
+    eventName: 'checkout_progress',
130
+    eventParams?: {
131
+      currency?: EventParams['currency'];
132
+      coupon?: EventParams['coupon'];
133
+      value?: EventParams['value'];
134
+      items?: EventParams['items'];
135
+      checkout_step?: EventParams['checkout_step'];
136
+      checkout_option?: EventParams['checkout_option'];
137
+      [key: string]: any;
138
+    },
139
+    options?: AnalyticsCallOptions
140
+  ): void;
141
+
142
+  /**
143
+   * Sends analytics event with given `eventParams`. This method
144
+   * automatically associates this logged event with this Firebase web
145
+   * app instance on this device.
146
+   * See
147
+   * {@link https://developers.google.com/analytics/devguides/collection/ga4/exceptions
148
+   * | Measure exceptions}.
149
+   */
150
+  logEvent(
151
+    eventName: 'exception',
152
+    eventParams?: {
153
+      description?: EventParams['description'];
154
+      fatal?: EventParams['fatal'];
155
+      [key: string]: any;
156
+    },
157
+    options?: AnalyticsCallOptions
158
+  ): void;
159
+
160
+  /**
161
+   * Sends analytics event with given `eventParams`. This method
162
+   * automatically associates this logged event with this Firebase web
163
+   * app instance on this device.
164
+   * List of recommended event parameters can be found in
165
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
166
+   * | the GA4 reference documentation}.
167
+   */
168
+  logEvent(
169
+    eventName: 'generate_lead',
170
+    eventParams?: {
171
+      value?: EventParams['value'];
172
+      currency?: EventParams['currency'];
173
+      [key: string]: any;
174
+    },
175
+    options?: AnalyticsCallOptions
176
+  ): void;
177
+
178
+  /**
179
+   * Sends analytics event with given `eventParams`. This method
180
+   * automatically associates this logged event with this Firebase web
181
+   * app instance on this device.
182
+   * List of recommended event parameters can be found in
183
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
184
+   * | the GA4 reference documentation}.
185
+   */
186
+  logEvent(
187
+    eventName: 'login',
188
+    eventParams?: {
189
+      method?: EventParams['method'];
190
+      [key: string]: any;
191
+    },
192
+    options?: AnalyticsCallOptions
193
+  ): void;
194
+
195
+  /**
196
+   * Sends analytics event with given `eventParams`. This method
197
+   * automatically associates this logged event with this Firebase web
198
+   * app instance on this device.
199
+   * See
200
+   * {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view
201
+   * | Page views}.
202
+   */
203
+  logEvent(
204
+    eventName: 'page_view',
205
+    eventParams?: {
206
+      page_title?: string;
207
+      page_location?: string;
208
+      page_path?: string;
209
+      [key: string]: any;
210
+    },
211
+    options?: AnalyticsCallOptions
212
+  ): void;
213
+
214
+  /**
215
+   * Sends analytics event with given `eventParams`. This method
216
+   * automatically associates this logged event with this Firebase web
217
+   * app instance on this device.
218
+   * List of recommended event parameters can be found in
219
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
220
+   * | the GA4 reference documentation}.
221
+   */
222
+  logEvent(
223
+    eventName: 'purchase' | 'refund',
224
+    eventParams?: {
225
+      value?: EventParams['value'];
226
+      currency?: EventParams['currency'];
227
+      transaction_id: EventParams['transaction_id'];
228
+      tax?: EventParams['tax'];
229
+      shipping?: EventParams['shipping'];
230
+      items?: EventParams['items'];
231
+      coupon?: EventParams['coupon'];
232
+      affiliation?: EventParams['affiliation'];
233
+      [key: string]: any;
234
+    },
235
+    options?: AnalyticsCallOptions
236
+  ): void;
237
+
238
+  /**
239
+   * Sends analytics event with given `eventParams`. This method
240
+   * automatically associates this logged event with this Firebase web
241
+   * app instance on this device.
242
+   * See {@link https://firebase.google.com/docs/analytics/screenviews
243
+   * | Track Screenviews}.
244
+   */
245
+  logEvent(
246
+    eventName: 'screen_view',
247
+    eventParams?: {
248
+      firebase_screen: EventParams['firebase_screen'];
249
+      firebase_screen_class: EventParams['firebase_screen_class'];
250
+      [key: string]: any;
251
+    },
252
+    options?: AnalyticsCallOptions
253
+  ): void;
254
+
255
+  /**
256
+   * Sends analytics event with given `eventParams`. This method
257
+   * automatically associates this logged event with this Firebase web
258
+   * app instance on this device.
259
+   * List of recommended event parameters can be found in
260
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
261
+   * | the GA4 reference documentation}.
262
+   */
263
+  logEvent(
264
+    eventName: 'search' | 'view_search_results',
265
+    eventParams?: {
266
+      search_term?: EventParams['search_term'];
267
+      [key: string]: any;
268
+    },
269
+    options?: AnalyticsCallOptions
270
+  ): void;
271
+
272
+  /**
273
+   * Sends analytics event with given `eventParams`. This method
274
+   * automatically associates this logged event with this Firebase web
275
+   * app instance on this device.
276
+   * List of recommended event parameters can be found in
277
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
278
+   * | the GA4 reference documentation}.
279
+   */
280
+  logEvent(
281
+    eventName: 'select_content',
282
+    eventParams?: {
283
+      content_type?: EventParams['content_type'];
284
+      item_id?: EventParams['item_id'];
285
+      [key: string]: any;
286
+    },
287
+    options?: AnalyticsCallOptions
288
+  ): void;
289
+
290
+  /**
291
+   * Sends analytics event with given `eventParams`. This method
292
+   * automatically associates this logged event with this Firebase web
293
+   * app instance on this device.
294
+   * List of recommended event parameters can be found in
295
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
296
+   * | the GA4 reference documentation}.
297
+   */
298
+  logEvent(
299
+    eventName: 'select_item',
300
+    eventParams?: {
301
+      items?: EventParams['items'];
302
+      item_list_name?: EventParams['item_list_name'];
303
+      item_list_id?: EventParams['item_list_id'];
304
+      [key: string]: any;
305
+    },
306
+    options?: AnalyticsCallOptions
307
+  ): void;
308
+
309
+  /**
310
+   * Sends analytics event with given `eventParams`. This method
311
+   * automatically associates this logged event with this Firebase web
312
+   * app instance on this device.
313
+   * List of recommended event parameters can be found in
314
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
315
+   * | the GA4 reference documentation}.
316
+   */
317
+  logEvent(
318
+    eventName: 'select_promotion' | 'view_promotion',
319
+    eventParams?: {
320
+      items?: EventParams['items'];
321
+      promotion_id?: EventParams['promotion_id'];
322
+      promotion_name?: EventParams['promotion_name'];
323
+      [key: string]: any;
324
+    },
325
+    options?: AnalyticsCallOptions
326
+  ): void;
327
+
328
+  /**
329
+   * Sends analytics event with given `eventParams`. This method
330
+   * automatically associates this logged event with this Firebase web
331
+   * app instance on this device.
332
+   * List of recommended event parameters can be found in
333
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
334
+   * | the GA4 reference documentation}.
335
+   */
336
+  logEvent(
337
+    eventName: 'set_checkout_option',
338
+    eventParams?: {
339
+      checkout_step?: EventParams['checkout_step'];
340
+      checkout_option?: EventParams['checkout_option'];
341
+      [key: string]: any;
342
+    },
343
+    options?: AnalyticsCallOptions
344
+  ): void;
345
+
346
+  /**
347
+   * Sends analytics event with given `eventParams`. This method
348
+   * automatically associates this logged event with this Firebase web
349
+   * app instance on this device.
350
+   * List of recommended event parameters can be found in
351
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
352
+   * | the GA4 reference documentation}.
353
+   */
354
+  logEvent(
355
+    eventName: 'share',
356
+    eventParams?: {
357
+      method?: EventParams['method'];
358
+      content_type?: EventParams['content_type'];
359
+      item_id?: EventParams['item_id'];
360
+      [key: string]: any;
361
+    },
362
+    options?: AnalyticsCallOptions
363
+  ): void;
364
+
365
+  /**
366
+   * Sends analytics event with given `eventParams`. This method
367
+   * automatically associates this logged event with this Firebase web
368
+   * app instance on this device.
369
+   * List of recommended event parameters can be found in
370
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
371
+   * | the GA4 reference documentation}.
372
+   */
373
+  logEvent(
374
+    eventName: 'sign_up',
375
+    eventParams?: {
376
+      method?: EventParams['method'];
377
+      [key: string]: any;
378
+    },
379
+    options?: AnalyticsCallOptions
380
+  ): void;
381
+
382
+  /**
383
+   * Sends analytics event with given `eventParams`. This method
384
+   * automatically associates this logged event with this Firebase web
385
+   * app instance on this device.
386
+   * List of recommended event parameters can be found in
387
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
388
+   * | the GA4 reference documentation}.
389
+   */
390
+  logEvent(
391
+    eventName: 'timing_complete',
392
+    eventParams?: {
393
+      name: string;
394
+      value: number;
395
+      event_category?: string;
396
+      event_label?: string;
397
+      [key: string]: any;
398
+    },
399
+    options?: AnalyticsCallOptions
400
+  ): void;
401
+
402
+  /**
403
+   * Sends analytics event with given `eventParams`. This method
404
+   * automatically associates this logged event with this Firebase web
405
+   * app instance on this device.
406
+   * List of recommended event parameters can be found in
407
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
408
+   * | the GA4 reference documentation}.
409
+   */
410
+  logEvent(
411
+    eventName: 'view_cart' | 'view_item',
412
+    eventParams?: {
413
+      currency?: EventParams['currency'];
414
+      items?: EventParams['items'];
415
+      value?: EventParams['value'];
416
+      [key: string]: any;
417
+    },
418
+    options?: AnalyticsCallOptions
419
+  ): void;
420
+
421
+  /**
422
+   * Sends analytics event with given `eventParams`. This method
423
+   * automatically associates this logged event with this Firebase web
424
+   * app instance on this device.
425
+   * List of recommended event parameters can be found in
426
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
427
+   * | the GA4 reference documentation}.
428
+   */
429
+  logEvent(
430
+    eventName: 'view_item_list',
431
+    eventParams?: {
432
+      items?: EventParams['items'];
433
+      item_list_name?: EventParams['item_list_name'];
434
+      item_list_id?: EventParams['item_list_id'];
435
+      [key: string]: any;
436
+    },
437
+    options?: AnalyticsCallOptions
438
+  ): void;
439
+
440
+  /**
441
+   * Sends analytics event with given `eventParams`. This method
442
+   * automatically associates this logged event with this Firebase web
443
+   * app instance on this device.
444
+   * List of recommended event parameters can be found in
445
+   * {@link https://developers.google.com/gtagjs/reference/ga4-events
446
+   * | the GA4 reference documentation}.
447
+   */
448
+  logEvent<T extends string>(
449
+    eventName: CustomEventName<T>,
450
+    eventParams?: { [key: string]: any },
451
+    options?: AnalyticsCallOptions
452
+  ): void;
453
+
454
+  /**
455
+   * Use gtag 'config' command to set 'screen_name'.
456
+   *
457
+   * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.
458
+   * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.
459
+   */
460
+  setCurrentScreen(screenName: string, options?: AnalyticsCallOptions): void;
461
+
462
+  /**
463
+   * Use gtag 'config' command to set 'user_id'.
464
+   */
465
+  setUserId(id: string, options?: AnalyticsCallOptions): void;
466
+
467
+  /**
468
+   * Use gtag 'config' command to set all params specified.
469
+   */
470
+  setUserProperties(
471
+    properties: { [key: string]: any },
472
+    options?: AnalyticsCallOptions
473
+  ): void;
474
+
475
+  /**
476
+   * Sets whether analytics collection is enabled for this app on this device.
477
+   * window['ga-disable-analyticsId'] = true;
478
+   */
479
+  setAnalyticsCollectionEnabled(enabled: boolean): void;
480
+}
481
+
482
+export type CustomEventName<T> = T extends EventNameString ? never : T;
483
+
484
+/**
485
+ * Specifies custom options for your Firebase Analytics instance.
486
+ * You must set these before initializing `firebase.analytics()`.
487
+ */
488
+export interface SettingsOptions {
489
+  /** Sets custom name for `gtag` function. */
490
+  gtagName?: string;
491
+  /** Sets custom name for `dataLayer` array used by gtag. */
492
+  dataLayerName?: string;
493
+}
494
+
495
+/**
496
+ * Standard `gtag` function provided by gtag.js.
497
+ */
498
+export interface Gtag {
499
+  (
500
+    command: 'config',
501
+    targetId: string,
502
+    config?: ControlParams | EventParams | CustomParams
503
+  ): void;
504
+  (command: 'set', config: CustomParams): void;
505
+  (
506
+    command: 'event',
507
+    eventName: string,
508
+    eventParams?: ControlParams | EventParams | CustomParams
509
+  ): void;
510
+}
511
+
512
+/**
513
+ * Standard gtag.js control parameters.
514
+ * For more information, see
515
+ * {@link https://developers.google.com/gtagjs/reference/parameter
516
+ * the gtag.js documentation on parameters}.
517
+ */
518
+export interface ControlParams {
519
+  groups?: string | string[];
520
+  send_to?: string | string[];
521
+  event_callback?: () => void;
522
+  event_timeout?: number;
523
+}
524
+
525
+/**
526
+ * Standard gtag.js event parameters.
527
+ * For more information, see
528
+ * {@link https://developers.google.com/gtagjs/reference/parameter
529
+ * the gtag.js documentation on parameters}.
530
+ */
531
+export interface EventParams {
532
+  checkout_option?: string;
533
+  checkout_step?: number;
534
+  item_id?: string;
535
+  content_type?: string;
536
+  coupon?: string;
537
+  currency?: string;
538
+  description?: string;
539
+  fatal?: boolean;
540
+  items?: Item[];
541
+  method?: string;
542
+  number?: string;
543
+  promotions?: Promotion[];
544
+  screen_name?: string;
545
+  /**
546
+   * Firebase-specific. Use to log a `screen_name` to Firebase Analytics.
547
+   */
548
+  firebase_screen?: string;
549
+  /**
550
+   * Firebase-specific. Use to log a `screen_class` to Firebase Analytics.
551
+   */
552
+  firebase_screen_class?: string;
553
+  search_term?: string;
554
+  shipping?: Currency;
555
+  tax?: Currency;
556
+  transaction_id?: string;
557
+  value?: number;
558
+  event_label?: string;
559
+  event_category?: string;
560
+  shipping_tier?: string;
561
+  item_list_id?: string;
562
+  item_list_name?: string;
563
+  promotion_id?: string;
564
+  promotion_name?: string;
565
+  payment_type?: string;
566
+  affiliation?: string;
567
+}
568
+
569
+/**
570
+ * Any custom params the user may pass to gtag.js.
571
+ */
572
+export interface CustomParams {
573
+  [key: string]: any;
574
+}
575
+
576
+/**
577
+ * Type for standard gtag.js event names. `logEvent` also accepts any
578
+ * custom string and interprets it as a custom event name.
579
+ */
580
+export type EventNameString =
581
+  | 'add_payment_info'
582
+  | 'add_shipping_info'
583
+  | 'add_to_cart'
584
+  | 'add_to_wishlist'
585
+  | 'begin_checkout'
586
+  | 'checkout_progress'
587
+  | 'exception'
588
+  | 'generate_lead'
589
+  | 'login'
590
+  | 'page_view'
591
+  | 'purchase'
592
+  | 'refund'
593
+  | 'remove_from_cart'
594
+  | 'screen_view'
595
+  | 'search'
596
+  | 'select_content'
597
+  | 'select_item'
598
+  | 'select_promotion'
599
+  | 'set_checkout_option'
600
+  | 'share'
601
+  | 'sign_up'
602
+  | 'timing_complete'
603
+  | 'view_cart'
604
+  | 'view_item'
605
+  | 'view_item_list'
606
+  | 'view_promotion'
607
+  | 'view_search_results';
608
+
609
+export type Currency = string | number;
610
+
611
+export interface Item {
612
+  item_id?: string;
613
+  item_name?: string;
614
+  item_brand?: string;
615
+  item_category?: string;
616
+  item_category2?: string;
617
+  item_category3?: string;
618
+  item_category4?: string;
619
+  item_category5?: string;
620
+  item_variant?: string;
621
+  price?: Currency;
622
+  quantity?: number;
623
+  index?: number;
624
+  coupon?: string;
625
+  item_list_name?: string;
626
+  item_list_id?: string;
627
+  discount?: Currency;
628
+  affiliation?: string;
629
+  creative_name?: string;
630
+  creative_slot?: string;
631
+  promotion_id?: string;
632
+  promotion_name?: string;
633
+  location_id?: string;
634
+  /** @deprecated Use item_brand instead. */
635
+  brand?: string;
636
+  /** @deprecated Use item_category instead. */
637
+  category?: string;
638
+  /** @deprecated Use item_id instead. */
639
+  id?: string;
640
+  /** @deprecated Use item_name instead. */
641
+  name?: string;
642
+}
643
+
644
+/** @deprecated Use Item instead. */
645
+export interface Promotion {
646
+  creative_name?: string;
647
+  creative_slot?: string;
648
+  id?: string;
649
+  name?: string;
650
+}
651
+
652
+/**
653
+ * Dynamic configuration fetched from server.
654
+ * See https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects.webApps/getConfig
655
+ */
656
+interface DynamicConfig {
657
+  projectId: string;
658
+  appId: string;
659
+  databaseURL: string;
660
+  storageBucket: string;
661
+  locationId: string;
662
+  apiKey: string;
663
+  authDomain: string;
664
+  messagingSenderId: string;
665
+  measurementId: string;
666
+}
667
+
668
+interface MinimalDynamicConfig {
669
+  appId: string;
670
+  measurementId: string;
671
+}
672
+
673
+/**
674
+ * Encapsulates metadata concerning throttled fetch requests.
675
+ */
676
+export interface ThrottleMetadata {
677
+  // The number of times fetch has backed off. Used for resuming backoff after a timeout.
678
+  backoffCount: number;
679
+  // The Unix timestamp in milliseconds when callers can retry a request.
680
+  throttleEndTimeMillis: number;
681
+}
682
+
683
+declare module '@firebase/component' {
684
+  interface NameServiceMapping {
685
+    'analytics-compat': FirebaseAnalytics;
686
+  }
687
+}

+ 25
- 0
node_modules/@firebase/analytics-types/package.json View File

1
+{
2
+  "name": "@firebase/analytics-types",
3
+  "version": "0.8.0",
4
+  "description": "@firebase/analytics Types",
5
+  "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
+  "license": "Apache-2.0",
7
+  "scripts": {
8
+    "test": "tsc",
9
+    "test:ci": "node ../../scripts/run_tests_in_ci.js"
10
+  },
11
+  "files": [
12
+    "index.d.ts"
13
+  ],
14
+  "repository": {
15
+    "directory": "packages/analytics-types",
16
+    "type": "git",
17
+    "url": "https://github.com/firebase/firebase-js-sdk.git"
18
+  },
19
+  "bugs": {
20
+    "url": "https://github.com/firebase/firebase-js-sdk/issues"
21
+  },
22
+  "devDependencies": {
23
+    "typescript": "4.7.4"
24
+  }
25
+}

+ 422
- 0
node_modules/@firebase/analytics/CHANGELOG.md View File

1
+# @firebase/analytics
2
+
3
+## 0.9.1
4
+
5
+### Patch Changes
6
+
7
+- Updated dependencies [[`d4114a4f7`](https://github.com/firebase/firebase-js-sdk/commit/d4114a4f7da3f469c0c900416ac8beee58885ec3), [`06dc1364d`](https://github.com/firebase/firebase-js-sdk/commit/06dc1364d7560f4c563e1ccc89af9cad4cd91df8)]:
8
+  - @firebase/util@1.9.0
9
+  - @firebase/component@0.6.1
10
+  - @firebase/installations@0.6.1
11
+
12
+## 0.9.0
13
+
14
+### Minor Changes
15
+
16
+- [`1625f7a95`](https://github.com/firebase/firebase-js-sdk/commit/1625f7a95cc3ffb666845db0a8044329be74b5be) [#6799](https://github.com/firebase/firebase-js-sdk/pull/6799) - Update TypeScript version to 4.7.4.
17
+
18
+### Patch Changes
19
+
20
+- Updated dependencies [[`c20633ed3`](https://github.com/firebase/firebase-js-sdk/commit/c20633ed35056cbadc9d65d9ceddf4e28d1ea666), [`1625f7a95`](https://github.com/firebase/firebase-js-sdk/commit/1625f7a95cc3ffb666845db0a8044329be74b5be)]:
21
+  - @firebase/util@1.8.0
22
+  - @firebase/component@0.6.0
23
+  - @firebase/installations@0.6.0
24
+  - @firebase/logger@0.4.0
25
+
26
+## 0.8.4
27
+
28
+### Patch Changes
29
+
30
+- [`4af28c1a4`](https://github.com/firebase/firebase-js-sdk/commit/4af28c1a42bd25ce2353f694ca1724c6101cbce5) [#6682](https://github.com/firebase/firebase-js-sdk/pull/6682) - Upgrade TypeScript to 4.7.4.
31
+
32
+- Updated dependencies [[`4af28c1a4`](https://github.com/firebase/firebase-js-sdk/commit/4af28c1a42bd25ce2353f694ca1724c6101cbce5)]:
33
+  - @firebase/component@0.5.21
34
+  - @firebase/installations@0.5.16
35
+  - @firebase/logger@0.3.4
36
+  - @firebase/util@1.7.3
37
+
38
+## 0.8.3
39
+
40
+### Patch Changes
41
+
42
+- [`03d1fabcb`](https://github.com/firebase/firebase-js-sdk/commit/03d1fabcb652b3af61631d1e1100ed13efa6fc87) [#6671](https://github.com/firebase/firebase-js-sdk/pull/6671) - Correct `id` type in `setUserId`
43
+
44
+- Updated dependencies [[`807f06aa2`](https://github.com/firebase/firebase-js-sdk/commit/807f06aa26438a91aaea08fd38efb6c706bb8a5d)]:
45
+  - @firebase/util@1.7.2
46
+  - @firebase/component@0.5.20
47
+  - @firebase/installations@0.5.15
48
+
49
+## 0.8.2
50
+
51
+### Patch Changes
52
+
53
+- [`1fbc4c4b7`](https://github.com/firebase/firebase-js-sdk/commit/1fbc4c4b7f893ac1f973ccc29205771adec536ca) [#6655](https://github.com/firebase/firebase-js-sdk/pull/6655) - Update to allow for multiple instance of gtag with different datalayer names
54
+
55
+- Updated dependencies [[`171b78b76`](https://github.com/firebase/firebase-js-sdk/commit/171b78b762826a640d267dd4dd172ad9459c4561), [`29d034072`](https://github.com/firebase/firebase-js-sdk/commit/29d034072c20af394ce384e42aa10a37d5dfcb18)]:
56
+  - @firebase/util@1.7.1
57
+  - @firebase/component@0.5.19
58
+  - @firebase/installations@0.5.14
59
+
60
+## 0.8.1
61
+
62
+### Patch Changes
63
+
64
+- Updated dependencies [[`fdd4ab464`](https://github.com/firebase/firebase-js-sdk/commit/fdd4ab464b59a107bdcc195df3f01e32efd89ed4)]:
65
+  - @firebase/util@1.7.0
66
+  - @firebase/installations@0.5.13
67
+  - @firebase/component@0.5.18
68
+
69
+## 0.8.0
70
+
71
+### Minor Changes
72
+
73
+- [`1d3a34d7d`](https://github.com/firebase/firebase-js-sdk/commit/1d3a34d7da5bf3c267d014efb587e03c46ff3064) [#6376](https://github.com/firebase/firebase-js-sdk/pull/6376) - Add function `setConsent()` to set the applicable end user "consent" state.
74
+
75
+* [`69e2ee064`](https://github.com/firebase/firebase-js-sdk/commit/69e2ee064e0729d8da823f1e60f6fb7f3bbe5700) [#6367](https://github.com/firebase/firebase-js-sdk/pull/6367) - Add function `setDefaultEventParameters()` to set data that will be logged on every Analytics SDK event
76
+
77
+### Patch Changes
78
+
79
+- Updated dependencies [[`b12af44a5`](https://github.com/firebase/firebase-js-sdk/commit/b12af44a5c7500e1192d6cc1a4afc4d77efadbaf)]:
80
+  - @firebase/util@1.6.3
81
+  - @firebase/component@0.5.17
82
+  - @firebase/installations@0.5.12
83
+
84
+## 0.7.11
85
+
86
+### Patch Changes
87
+
88
+- [`835f1d46a`](https://github.com/firebase/firebase-js-sdk/commit/835f1d46a6780535bc660ef7dc23293350d5fe43) [#6357](https://github.com/firebase/firebase-js-sdk/pull/6357) - Fix typo in GtagConfigParams
89
+
90
+- Updated dependencies [[`efe2000fc`](https://github.com/firebase/firebase-js-sdk/commit/efe2000fc499e2c85c4e5e0fef6741ff3bad2eb0)]:
91
+  - @firebase/util@1.6.2
92
+  - @firebase/component@0.5.16
93
+  - @firebase/installations@0.5.11
94
+
95
+## 0.7.10
96
+
97
+### Patch Changes
98
+
99
+- [`2cd1cc76f`](https://github.com/firebase/firebase-js-sdk/commit/2cd1cc76f2a308135cd60f424fe09084a34b5cb5) [#6307](https://github.com/firebase/firebase-js-sdk/pull/6307) (fixes [#6300](https://github.com/firebase/firebase-js-sdk/issues/6300)) - fix: add type declarations to exports field
100
+
101
+- Updated dependencies [[`2cd1cc76f`](https://github.com/firebase/firebase-js-sdk/commit/2cd1cc76f2a308135cd60f424fe09084a34b5cb5)]:
102
+  - @firebase/component@0.5.15
103
+  - @firebase/installations@0.5.10
104
+  - @firebase/logger@0.3.3
105
+  - @firebase/util@1.6.1
106
+
107
+## 0.7.9
108
+
109
+### Patch Changes
110
+
111
+- Updated dependencies [[`9c5c9c36d`](https://github.com/firebase/firebase-js-sdk/commit/9c5c9c36da80b98b73cfd60ef2e2965087e9f801)]:
112
+  - @firebase/util@1.6.0
113
+  - @firebase/installations@0.5.9
114
+  - @firebase/component@0.5.14
115
+
116
+## 0.7.8
117
+
118
+### Patch Changes
119
+
120
+- Updated dependencies [[`e9e5f6b3c`](https://github.com/firebase/firebase-js-sdk/commit/e9e5f6b3ca9d61323b22f87986d9959f5297ec59)]:
121
+  - @firebase/util@1.5.2
122
+  - @firebase/component@0.5.13
123
+  - @firebase/installations@0.5.8
124
+
125
+## 0.7.7
126
+
127
+### Patch Changes
128
+
129
+- Updated dependencies [[`3198d58dc`](https://github.com/firebase/firebase-js-sdk/commit/3198d58dcedbf7583914dbcc76984f6f7df8d2ef)]:
130
+  - @firebase/util@1.5.1
131
+  - @firebase/component@0.5.12
132
+  - @firebase/installations@0.5.7
133
+
134
+## 0.7.6
135
+
136
+### Patch Changes
137
+
138
+- Updated dependencies [[`2d672cead`](https://github.com/firebase/firebase-js-sdk/commit/2d672cead167187cb714cd89b638c0884ba58f03), [`ddeff8384`](https://github.com/firebase/firebase-js-sdk/commit/ddeff8384ab8a927f02244e2591db525fd58c7dd)]:
139
+  - @firebase/installations@0.5.6
140
+  - @firebase/util@1.5.0
141
+  - @firebase/component@0.5.11
142
+
143
+## 0.7.5
144
+
145
+### Patch Changes
146
+
147
+- Updated dependencies [[`3b481f572`](https://github.com/firebase/firebase-js-sdk/commit/3b481f572456e1eab3435bfc25717770d95a8c49)]:
148
+  - @firebase/util@1.4.3
149
+  - @firebase/component@0.5.10
150
+  - @firebase/installations@0.5.5
151
+
152
+## 0.7.4
153
+
154
+### Patch Changes
155
+
156
+- [`3281315fa`](https://github.com/firebase/firebase-js-sdk/commit/3281315fae9c6f535f9d5052ee17d60861ea569a) [#5708](https://github.com/firebase/firebase-js-sdk/pull/5708) (fixes [#1487](https://github.com/firebase/firebase-js-sdk/issues/1487)) - Update build scripts to work with the exports field
157
+
158
+- Updated dependencies [[`3281315fa`](https://github.com/firebase/firebase-js-sdk/commit/3281315fae9c6f535f9d5052ee17d60861ea569a)]:
159
+  - @firebase/component@0.5.9
160
+  - @firebase/installations@0.5.4
161
+  - @firebase/logger@0.3.2
162
+  - @firebase/util@1.4.2
163
+
164
+## 0.7.3
165
+
166
+### Patch Changes
167
+
168
+- [`2322b6023`](https://github.com/firebase/firebase-js-sdk/commit/2322b6023c628cd9f4f4172767c17d215dd91684) [#5693](https://github.com/firebase/firebase-js-sdk/pull/5693) - Add exports field to all packages
169
+
170
+- Updated dependencies [[`2322b6023`](https://github.com/firebase/firebase-js-sdk/commit/2322b6023c628cd9f4f4172767c17d215dd91684)]:
171
+  - @firebase/component@0.5.8
172
+  - @firebase/installations@0.5.3
173
+  - @firebase/logger@0.3.1
174
+  - @firebase/util@1.4.1
175
+
176
+## 0.7.2
177
+
178
+### Patch Changes
179
+
180
+- [`93795c780`](https://github.com/firebase/firebase-js-sdk/commit/93795c7801d6b28ccbbe5855fd2f3fc377b1db5f) [#5596](https://github.com/firebase/firebase-js-sdk/pull/5596) - report build variants for packages
181
+
182
+- Updated dependencies [[`93795c780`](https://github.com/firebase/firebase-js-sdk/commit/93795c7801d6b28ccbbe5855fd2f3fc377b1db5f)]:
183
+  - @firebase/installations@0.5.2
184
+
185
+## 0.7.1
186
+
187
+### Patch Changes
188
+
189
+- [`b835b4cba`](https://github.com/firebase/firebase-js-sdk/commit/b835b4cbabc4b7b180ae38b908c49205ce31a422) [#5506](https://github.com/firebase/firebase-js-sdk/pull/5506) - checking isSupported led to runtime errors in certain environments
190
+
191
+- Updated dependencies [[`a99943fe3`](https://github.com/firebase/firebase-js-sdk/commit/a99943fe3bd5279761aa29d138ec91272b06df39), [`b835b4cba`](https://github.com/firebase/firebase-js-sdk/commit/b835b4cbabc4b7b180ae38b908c49205ce31a422)]:
192
+  - @firebase/logger@0.3.0
193
+  - @firebase/util@1.4.0
194
+  - @firebase/component@0.5.7
195
+  - @firebase/installations@0.5.1
196
+
197
+## 0.7.0
198
+
199
+### Minor Changes
200
+
201
+- [`cdada6c68`](https://github.com/firebase/firebase-js-sdk/commit/cdada6c68f9740d13dd6674bcb658e28e68253b6) [#5345](https://github.com/firebase/firebase-js-sdk/pull/5345) (fixes [#5015](https://github.com/firebase/firebase-js-sdk/issues/5015)) - Release modularized SDKs
202
+
203
+### Patch Changes
204
+
205
+- Updated dependencies [[`cdada6c68`](https://github.com/firebase/firebase-js-sdk/commit/cdada6c68f9740d13dd6674bcb658e28e68253b6)]:
206
+  - @firebase/installations@0.5.0
207
+
208
+## 0.6.18
209
+
210
+### Patch Changes
211
+
212
+- Updated dependencies [[`bb6b5abff`](https://github.com/firebase/firebase-js-sdk/commit/bb6b5abff6f89ce9ec1bd66ff4e795a059a98eec), [`3c6a11c8d`](https://github.com/firebase/firebase-js-sdk/commit/3c6a11c8d0b35afddb50e9c3e0c4d2e30f642131)]:
213
+  - @firebase/component@0.5.6
214
+  - @firebase/util@1.3.0
215
+  - @firebase/installations@0.4.32
216
+
217
+## 0.6.17
218
+
219
+### Patch Changes
220
+
221
+- Updated dependencies [[`bd50d8310`](https://github.com/firebase/firebase-js-sdk/commit/bd50d83107be3d87064f72800c608abc94ae3456)]:
222
+  - @firebase/analytics-types@0.6.0
223
+
224
+## 0.6.16
225
+
226
+### Patch Changes
227
+
228
+- Updated dependencies [[`a3cbe719b`](https://github.com/firebase/firebase-js-sdk/commit/a3cbe719b1bd733a5c4c15ee0d0e6388d512054c)]:
229
+  - @firebase/util@1.2.0
230
+  - @firebase/component@0.5.5
231
+  - @firebase/installations@0.4.31
232
+
233
+## 0.6.15
234
+
235
+### Patch Changes
236
+
237
+- Updated dependencies [[`02586c975`](https://github.com/firebase/firebase-js-sdk/commit/02586c9754318b01a0051561d2c7c4906059b5af)]:
238
+  - @firebase/analytics-types@0.5.0
239
+
240
+## 0.6.14
241
+
242
+### Patch Changes
243
+
244
+- Updated dependencies [[`56a6a9d4a`](https://github.com/firebase/firebase-js-sdk/commit/56a6a9d4af2766154584a0f66d3c4d8024d74ba5)]:
245
+  - @firebase/component@0.5.4
246
+  - @firebase/installations@0.4.30
247
+
248
+## 0.6.13
249
+
250
+### Patch Changes
251
+
252
+- Updated dependencies [[`725ab4684`](https://github.com/firebase/firebase-js-sdk/commit/725ab4684ef0999a12f71e704c204a00fb030e5d)]:
253
+  - @firebase/component@0.5.3
254
+  - @firebase/installations@0.4.29
255
+
256
+## 0.6.12
257
+
258
+### Patch Changes
259
+
260
+- Updated dependencies [[`4c4b6aed9`](https://github.com/firebase/firebase-js-sdk/commit/4c4b6aed9757c9a7e75fb698a15e53274f93880b)]:
261
+  - @firebase/component@0.5.2
262
+  - @firebase/installations@0.4.28
263
+
264
+## 0.6.11
265
+
266
+### Patch Changes
267
+
268
+- Updated dependencies [[`5fbc5fb01`](https://github.com/firebase/firebase-js-sdk/commit/5fbc5fb0140d7da980fd7ebbfbae810f8c64ae19)]:
269
+  - @firebase/component@0.5.1
270
+  - @firebase/installations@0.4.27
271
+
272
+## 0.6.10
273
+
274
+### Patch Changes
275
+
276
+- Updated dependencies [[`c34ac7a92`](https://github.com/firebase/firebase-js-sdk/commit/c34ac7a92a616915f38d192654db7770d81747ae), [`ac4ad08a2`](https://github.com/firebase/firebase-js-sdk/commit/ac4ad08a284397ec966e991dd388bb1fba857467)]:
277
+  - @firebase/component@0.5.0
278
+  - @firebase/util@1.1.0
279
+  - @firebase/installations@0.4.26
280
+
281
+## 0.6.9
282
+
283
+### Patch Changes
284
+
285
+- Updated dependencies [[`7354a0ed4`](https://github.com/firebase/firebase-js-sdk/commit/7354a0ed438f4e3df6577e4927e8c8f8f1fbbfda)]:
286
+  - @firebase/util@1.0.0
287
+  - @firebase/component@0.4.1
288
+  - @firebase/installations@0.4.25
289
+
290
+## 0.6.8
291
+
292
+### Patch Changes
293
+
294
+- Updated dependencies [[`f24d8961b`](https://github.com/firebase/firebase-js-sdk/commit/f24d8961b3b87821413297688803fc85113086b3)]:
295
+  - @firebase/component@0.4.0
296
+  - @firebase/installations@0.4.24
297
+
298
+## 0.6.7
299
+
300
+### Patch Changes
301
+
302
+- Updated dependencies [[`de5f90501`](https://github.com/firebase/firebase-js-sdk/commit/de5f9050137acc9ed1490082e5aa429b5de3cb2a)]:
303
+  - @firebase/util@0.4.1
304
+  - @firebase/component@0.3.1
305
+  - @firebase/installations@0.4.23
306
+
307
+## 0.6.6
308
+
309
+### Patch Changes
310
+
311
+- Updated dependencies [[`5c1a83ed7`](https://github.com/firebase/firebase-js-sdk/commit/5c1a83ed70bae979322bd8751c0885d683ce4bf3)]:
312
+  - @firebase/component@0.3.0
313
+  - @firebase/installations@0.4.22
314
+
315
+## 0.6.5
316
+
317
+### Patch Changes
318
+
319
+- Updated dependencies [[`ec95df3d0`](https://github.com/firebase/firebase-js-sdk/commit/ec95df3d07e5f091f2a7f7327e46417f64d04b4e)]:
320
+  - @firebase/util@0.4.0
321
+  - @firebase/component@0.2.1
322
+  - @firebase/installations@0.4.21
323
+
324
+## 0.6.4
325
+
326
+### Patch Changes
327
+
328
+- Updated dependencies [[`6afe42613`](https://github.com/firebase/firebase-js-sdk/commit/6afe42613ed3d7a842d378dc1a09a795811db2ac)]:
329
+  - @firebase/component@0.2.0
330
+  - @firebase/installations@0.4.20
331
+
332
+## 0.6.3
333
+
334
+### Patch Changes
335
+
336
+- [`74bf52009`](https://github.com/firebase/firebase-js-sdk/commit/74bf52009b291a62deabfd865084d4e0fcacc483) [#4458](https://github.com/firebase/firebase-js-sdk/pull/4458) - Fixed a behavior causing `gtag` to be downloaded twice on Firebase Analytics initialization. This did not seem to affect the functionality of Firebase Analytics but adds noise to the logs when users are trying to debug.
337
+
338
+## 0.6.2
339
+
340
+### Patch Changes
341
+
342
+- Updated dependencies [[`9cf727fcc`](https://github.com/firebase/firebase-js-sdk/commit/9cf727fcc3d049551b16ae0698ac33dc2fe45ada)]:
343
+  - @firebase/util@0.3.4
344
+  - @firebase/component@0.1.21
345
+  - @firebase/installations@0.4.19
346
+
347
+## 0.6.1
348
+
349
+### Patch Changes
350
+
351
+- Updated dependencies [[`a5768b0aa`](https://github.com/firebase/firebase-js-sdk/commit/a5768b0aa7d7ce732279931aa436e988c9f36487), [`7d916d905`](https://github.com/firebase/firebase-js-sdk/commit/7d916d905ba16816ac8ac7c8748c83831ff614ce)]:
352
+  - @firebase/component@0.1.20
353
+  - @firebase/util@0.3.3
354
+  - @firebase/installations@0.4.18
355
+
356
+## 0.6.0
357
+
358
+### Minor Changes
359
+
360
+- [`d4db75ff8`](https://github.com/firebase/firebase-js-sdk/commit/d4db75ff81388430489bd561ac2247fe9e0b6eb5) [#3836](https://github.com/firebase/firebase-js-sdk/pull/3836) (fixes [#3573](https://github.com/firebase/firebase-js-sdk/issues/3573)) - Analytics now warns instead of throwing if it detects a browser environment where analytics does not work.
361
+
362
+## 0.5.0
363
+
364
+### Minor Changes
365
+
366
+- [`fb3b095e4`](https://github.com/firebase/firebase-js-sdk/commit/fb3b095e4b7c8f57fdb3172bc039c84576abf290) [#2800](https://github.com/firebase/firebase-js-sdk/pull/2800) - Analytics now dynamically fetches the app's Measurement ID from the Dynamic Config backend
367
+  instead of depending on the local Firebase config. It will fall back to any `measurementId`
368
+  value found in the local config if the Dynamic Config fetch fails.
369
+
370
+### Patch Changes
371
+
372
+- Updated dependencies [[`da1c7df79`](https://github.com/firebase/firebase-js-sdk/commit/da1c7df7982b08bbef82fcc8d93255f3e2d23cca), [`fb3b095e4`](https://github.com/firebase/firebase-js-sdk/commit/fb3b095e4b7c8f57fdb3172bc039c84576abf290), [`fb3b095e4`](https://github.com/firebase/firebase-js-sdk/commit/fb3b095e4b7c8f57fdb3172bc039c84576abf290)]:
373
+  - @firebase/component@0.1.19
374
+  - @firebase/util@0.3.2
375
+  - @firebase/analytics-types@0.4.0
376
+  - @firebase/installations@0.4.17
377
+
378
+## 0.4.2
379
+
380
+### Patch Changes
381
+
382
+- [`2a0d254f`](https://github.com/firebase/firebase-js-sdk/commit/2a0d254fa58e607842fc0380c8cfa7bbbb69df75) [#3555](https://github.com/firebase/firebase-js-sdk/pull/3555) - Added Browser Extension check for Firebase Analytics. `analytics.isSupported()` will now return `Promise<false>` for extension environments.
383
+
384
+- Updated dependencies [[`d4ca3da0`](https://github.com/firebase/firebase-js-sdk/commit/d4ca3da0a59fcea1261ba69d7eb663bba38d3089)]:
385
+  - @firebase/util@0.3.1
386
+  - @firebase/component@0.1.18
387
+  - @firebase/installations@0.4.16
388
+
389
+## 0.4.1
390
+
391
+### Patch Changes
392
+
393
+- [`a87676b8`](https://github.com/firebase/firebase-js-sdk/commit/a87676b84b78ccc2f057a22eb947a5d13402949c) [#3472](https://github.com/firebase/firebase-js-sdk/pull/3472) - - Fix an error where an analytics PR included a change to `@firebase/util`, but
394
+  the util package was not properly included in the changeset for a patch bump.
395
+
396
+  - `@firebase/util` adds environment check methods `isIndexedDBAvailable`
397
+    `validateIndexedDBOpenable`, and `areCookiesEnabled`.
398
+
399
+- Updated dependencies [[`a87676b8`](https://github.com/firebase/firebase-js-sdk/commit/a87676b84b78ccc2f057a22eb947a5d13402949c)]:
400
+  - @firebase/util@0.3.0
401
+  - @firebase/component@0.1.17
402
+  - @firebase/installations@0.4.15
403
+
404
+## 0.4.0
405
+
406
+### Minor Changes
407
+
408
+- [`02419ce8`](https://github.com/firebase/firebase-js-sdk/commit/02419ce8470141f012d9ce425a6a4a4aa912e480) [#3165](https://github.com/firebase/firebase-js-sdk/pull/3165) - Issue 2393 fix - analytics module
409
+
410
+  - Added a public method `isSupported` to Analytics module which returns true if current browser context supports initialization of analytics module.
411
+  - Added runtime checks to Analytics module that validate if cookie is enabled in current browser and if current browser environment supports indexedDB functionalities.
412
+
413
+## 0.3.9
414
+
415
+### Patch Changes
416
+
417
+- [`a754645e`](https://github.com/firebase/firebase-js-sdk/commit/a754645ec2be1b8c205f25f510196eee298b0d6e) [#3297](https://github.com/firebase/firebase-js-sdk/pull/3297) Thanks [@renovate](https://github.com/apps/renovate)! - Update dependency typescript to v3.9.5
418
+
419
+- Updated dependencies [[`a754645e`](https://github.com/firebase/firebase-js-sdk/commit/a754645ec2be1b8c205f25f510196eee298b0d6e)]:
420
+  - @firebase/component@0.1.16
421
+  - @firebase/installations@0.4.14
422
+  - @firebase/logger@0.2.6

+ 5
- 0
node_modules/@firebase/analytics/README.md View File

1
+# @firebase/analytics
2
+
3
+This is the Firebase Analytics component of the Firebase JS SDK.
4
+
5
+**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**

+ 748
- 0
node_modules/@firebase/analytics/dist/analytics-public.d.ts View File

1
+/**
2
+ * Firebase Analytics
3
+ *
4
+ * @packageDocumentation
5
+ */
6
+
7
+import { FirebaseApp } from '@firebase/app';
8
+
9
+/**
10
+ * An instance of Firebase Analytics.
11
+ * @public
12
+ */
13
+export declare interface Analytics {
14
+    /**
15
+     * The {@link @firebase/app#FirebaseApp} this {@link Analytics} instance is associated with.
16
+     */
17
+    app: FirebaseApp;
18
+}
19
+
20
+/**
21
+ * Additional options that can be passed to Analytics method
22
+ * calls such as `logEvent`, etc.
23
+ * @public
24
+ */
25
+export declare interface AnalyticsCallOptions {
26
+    /**
27
+     * If true, this config or event call applies globally to all
28
+     * Google Analytics properties on the page.
29
+     */
30
+    global: boolean;
31
+}
32
+
33
+/**
34
+ * {@link Analytics} instance initialization options.
35
+ * @public
36
+ */
37
+export declare interface AnalyticsSettings {
38
+    /**
39
+     * Params to be passed in the initial `gtag` config call during Firebase
40
+     * Analytics initialization.
41
+     */
42
+    config?: GtagConfigParams | EventParams;
43
+}
44
+
45
+/**
46
+ * Consent status settings for each consent type.
47
+ * For more information, see
48
+ * {@link https://developers.google.com/tag-platform/tag-manager/templates/consent-apis
49
+ * | the GA4 reference documentation for consent state and consent types}.
50
+ * @public
51
+ */
52
+export declare interface ConsentSettings {
53
+    /** Enables storage, such as cookies, related to advertising */
54
+    ad_storage?: ConsentStatusString;
55
+    /** Enables storage, such as cookies, related to analytics (for example, visit duration) */
56
+    analytics_storage?: ConsentStatusString;
57
+    /**
58
+     * Enables storage that supports the functionality of the website or app such as language settings
59
+     */
60
+    functionality_storage?: ConsentStatusString;
61
+    /** Enables storage related to personalization such as video recommendations */
62
+    personalization_storage?: ConsentStatusString;
63
+    /**
64
+     * Enables storage related to security such as authentication functionality, fraud prevention,
65
+     * and other user protection.
66
+     */
67
+    security_storage?: ConsentStatusString;
68
+    [key: string]: unknown;
69
+}
70
+
71
+/**
72
+ * Whether a particular consent type has been granted or denied.
73
+ * @public
74
+ */
75
+export declare type ConsentStatusString = 'granted' | 'denied';
76
+
77
+/**
78
+ * Standard `gtag.js` control parameters.
79
+ * For more information, see
80
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
81
+ * | the GA4 reference documentation}.
82
+ * @public
83
+ */
84
+export declare interface ControlParams {
85
+    groups?: string | string[];
86
+    send_to?: string | string[];
87
+    event_callback?: () => void;
88
+    event_timeout?: number;
89
+}
90
+
91
+/**
92
+ * Standard Google Analytics currency type.
93
+ * @public
94
+ */
95
+export declare type Currency = string | number;
96
+
97
+/**
98
+ * Any custom event name string not in the standard list of recommended
99
+ * event names.
100
+ * @public
101
+ */
102
+export declare type CustomEventName<T> = T extends EventNameString ? never : T;
103
+
104
+/**
105
+ * Any custom params the user may pass to `gtag`.
106
+ * @public
107
+ */
108
+export declare interface CustomParams {
109
+    [key: string]: unknown;
110
+}
111
+
112
+/**
113
+ * Type for standard Google Analytics event names. `logEvent` also accepts any
114
+ * custom string and interprets it as a custom event name.
115
+ * @public
116
+ */
117
+export declare type EventNameString = 'add_payment_info' | 'add_shipping_info' | 'add_to_cart' | 'add_to_wishlist' | 'begin_checkout' | 'checkout_progress' | 'exception' | 'generate_lead' | 'login' | 'page_view' | 'purchase' | 'refund' | 'remove_from_cart' | 'screen_view' | 'search' | 'select_content' | 'select_item' | 'select_promotion' | 'set_checkout_option' | 'share' | 'sign_up' | 'timing_complete' | 'view_cart' | 'view_item' | 'view_item_list' | 'view_promotion' | 'view_search_results';
118
+
119
+/**
120
+ * Standard `gtag.js` event parameters.
121
+ * For more information, see
122
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
123
+ * | the GA4 reference documentation}.
124
+ * @public
125
+ */
126
+export declare interface EventParams {
127
+    checkout_option?: string;
128
+    checkout_step?: number;
129
+    item_id?: string;
130
+    content_type?: string;
131
+    coupon?: string;
132
+    currency?: string;
133
+    description?: string;
134
+    fatal?: boolean;
135
+    items?: Item[];
136
+    method?: string;
137
+    number?: string;
138
+    promotions?: Promotion[];
139
+    screen_name?: string;
140
+    /**
141
+     * Firebase-specific. Use to log a `screen_name` to Firebase Analytics.
142
+     */
143
+    firebase_screen?: string;
144
+    /**
145
+     * Firebase-specific. Use to log a `screen_class` to Firebase Analytics.
146
+     */
147
+    firebase_screen_class?: string;
148
+    search_term?: string;
149
+    shipping?: Currency;
150
+    tax?: Currency;
151
+    transaction_id?: string;
152
+    value?: number;
153
+    event_label?: string;
154
+    event_category?: string;
155
+    shipping_tier?: string;
156
+    item_list_id?: string;
157
+    item_list_name?: string;
158
+    promotion_id?: string;
159
+    promotion_name?: string;
160
+    payment_type?: string;
161
+    affiliation?: string;
162
+    page_title?: string;
163
+    page_location?: string;
164
+    page_path?: string;
165
+    [key: string]: unknown;
166
+}
167
+
168
+/**
169
+ * Returns an {@link Analytics} instance for the given app.
170
+ *
171
+ * @public
172
+ *
173
+ * @param app - The {@link @firebase/app#FirebaseApp} to use.
174
+ */
175
+export declare function getAnalytics(app?: FirebaseApp): Analytics;
176
+
177
+/**
178
+ * A set of common Google Analytics config settings recognized by
179
+ * `gtag.js`.
180
+ * @public
181
+ */
182
+export declare interface GtagConfigParams {
183
+    /**
184
+     * Whether or not a page view should be sent.
185
+     * If set to true (default), a page view is automatically sent upon initialization
186
+     * of analytics.
187
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view | Page views }
188
+     */
189
+    'send_page_view'?: boolean;
190
+    /**
191
+     * The title of the page.
192
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view | Page views }
193
+     */
194
+    'page_title'?: string;
195
+    /**
196
+     * The URL of the page.
197
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view | Page views }
198
+     */
199
+    'page_location'?: string;
200
+    /**
201
+     * Defaults to `auto`.
202
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
203
+     */
204
+    'cookie_domain'?: string;
205
+    /**
206
+     * Defaults to 63072000 (two years, in seconds).
207
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
208
+     */
209
+    'cookie_expires'?: number;
210
+    /**
211
+     * Defaults to `_ga`.
212
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
213
+     */
214
+    'cookie_prefix'?: string;
215
+    /**
216
+     * If set to true, will update cookies on each page load.
217
+     * Defaults to true.
218
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
219
+     */
220
+    'cookie_update'?: boolean;
221
+    /**
222
+     * Appends additional flags to the cookie when set.
223
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
224
+     */
225
+    'cookie_flags'?: string;
226
+    /**
227
+     * If set to false, disables all advertising features with `gtag.js`.
228
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
229
+     */
230
+    'allow_google_signals'?: boolean;
231
+    /**
232
+     * If set to false, disables all advertising personalization with `gtag.js`.
233
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
234
+     */
235
+    'allow_ad_personalization_signals'?: boolean;
236
+    [key: string]: unknown;
237
+}
238
+
239
+/**
240
+ * Returns an {@link Analytics} instance for the given app.
241
+ *
242
+ * @public
243
+ *
244
+ * @param app - The {@link @firebase/app#FirebaseApp} to use.
245
+ */
246
+export declare function initializeAnalytics(app: FirebaseApp, options?: AnalyticsSettings): Analytics;
247
+
248
+/**
249
+ * This is a public static method provided to users that wraps four different checks:
250
+ *
251
+ * 1. Check if it's not a browser extension environment.
252
+ * 2. Check if cookies are enabled in current browser.
253
+ * 3. Check if IndexedDB is supported by the browser environment.
254
+ * 4. Check if the current browser context is valid for using `IndexedDB.open()`.
255
+ *
256
+ * @public
257
+ *
258
+ */
259
+export declare function isSupported(): Promise<boolean>;
260
+
261
+/**
262
+ * Standard Google Analytics `Item` type.
263
+ * @public
264
+ */
265
+export declare interface Item {
266
+    item_id?: string;
267
+    item_name?: string;
268
+    item_brand?: string;
269
+    item_category?: string;
270
+    item_category2?: string;
271
+    item_category3?: string;
272
+    item_category4?: string;
273
+    item_category5?: string;
274
+    item_variant?: string;
275
+    price?: Currency;
276
+    quantity?: number;
277
+    index?: number;
278
+    coupon?: string;
279
+    item_list_name?: string;
280
+    item_list_id?: string;
281
+    discount?: Currency;
282
+    affiliation?: string;
283
+    creative_name?: string;
284
+    creative_slot?: string;
285
+    promotion_id?: string;
286
+    promotion_name?: string;
287
+    location_id?: string;
288
+    /** @deprecated Use item_brand instead. */
289
+    brand?: string;
290
+    /** @deprecated Use item_category instead. */
291
+    category?: string;
292
+    /** @deprecated Use item_id instead. */
293
+    id?: string;
294
+    /** @deprecated Use item_name instead. */
295
+    name?: string;
296
+}
297
+
298
+/**
299
+ * Sends a Google Analytics event with given `eventParams`. This method
300
+ * automatically associates this logged event with this Firebase web
301
+ * app instance on this device.
302
+ * @public
303
+ * List of recommended event parameters can be found in
304
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
305
+ * | the GA4 reference documentation}.
306
+ */
307
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'add_payment_info', eventParams?: {
308
+    coupon?: EventParams['coupon'];
309
+    currency?: EventParams['currency'];
310
+    items?: EventParams['items'];
311
+    payment_type?: EventParams['payment_type'];
312
+    value?: EventParams['value'];
313
+    [key: string]: any;
314
+}, options?: AnalyticsCallOptions): void;
315
+
316
+/**
317
+ * Sends a Google Analytics event with given `eventParams`. This method
318
+ * automatically associates this logged event with this Firebase web
319
+ * app instance on this device.
320
+ * @public
321
+ * List of recommended event parameters can be found in
322
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
323
+ * | the GA4 reference documentation}.
324
+ */
325
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'add_shipping_info', eventParams?: {
326
+    coupon?: EventParams['coupon'];
327
+    currency?: EventParams['currency'];
328
+    items?: EventParams['items'];
329
+    shipping_tier?: EventParams['shipping_tier'];
330
+    value?: EventParams['value'];
331
+    [key: string]: any;
332
+}, options?: AnalyticsCallOptions): void;
333
+
334
+/**
335
+ * Sends a Google Analytics event with given `eventParams`. This method
336
+ * automatically associates this logged event with this Firebase web
337
+ * app instance on this device.
338
+ * @public
339
+ * List of recommended event parameters can be found in
340
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
341
+ * | the GA4 reference documentation}.
342
+ */
343
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'add_to_cart' | 'add_to_wishlist' | 'remove_from_cart', eventParams?: {
344
+    currency?: EventParams['currency'];
345
+    value?: EventParams['value'];
346
+    items?: EventParams['items'];
347
+    [key: string]: any;
348
+}, options?: AnalyticsCallOptions): void;
349
+
350
+/**
351
+ * Sends a Google Analytics event with given `eventParams`. This method
352
+ * automatically associates this logged event with this Firebase web
353
+ * app instance on this device.
354
+ * @public
355
+ * List of recommended event parameters can be found in
356
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
357
+ * | the GA4 reference documentation}.
358
+ */
359
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'begin_checkout', eventParams?: {
360
+    currency?: EventParams['currency'];
361
+    coupon?: EventParams['coupon'];
362
+    value?: EventParams['value'];
363
+    items?: EventParams['items'];
364
+    [key: string]: any;
365
+}, options?: AnalyticsCallOptions): void;
366
+
367
+/**
368
+ * Sends a Google Analytics event with given `eventParams`. This method
369
+ * automatically associates this logged event with this Firebase web
370
+ * app instance on this device.
371
+ * @public
372
+ * List of recommended event parameters can be found in
373
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
374
+ * | the GA4 reference documentation}.
375
+ */
376
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'checkout_progress', eventParams?: {
377
+    currency?: EventParams['currency'];
378
+    coupon?: EventParams['coupon'];
379
+    value?: EventParams['value'];
380
+    items?: EventParams['items'];
381
+    checkout_step?: EventParams['checkout_step'];
382
+    checkout_option?: EventParams['checkout_option'];
383
+    [key: string]: any;
384
+}, options?: AnalyticsCallOptions): void;
385
+
386
+/**
387
+ * Sends a Google Analytics event with given `eventParams`. This method
388
+ * automatically associates this logged event with this Firebase web
389
+ * app instance on this device.
390
+ * @public
391
+ * See
392
+ * {@link https://developers.google.com/analytics/devguides/collection/ga4/exceptions
393
+ * | Measure exceptions}.
394
+ */
395
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'exception', eventParams?: {
396
+    description?: EventParams['description'];
397
+    fatal?: EventParams['fatal'];
398
+    [key: string]: any;
399
+}, options?: AnalyticsCallOptions): void;
400
+
401
+/**
402
+ * Sends a Google Analytics event with given `eventParams`. This method
403
+ * automatically associates this logged event with this Firebase web
404
+ * app instance on this device.
405
+ * @public
406
+ * List of recommended event parameters can be found in
407
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
408
+ * | the GA4 reference documentation}.
409
+ */
410
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'generate_lead', eventParams?: {
411
+    value?: EventParams['value'];
412
+    currency?: EventParams['currency'];
413
+    [key: string]: any;
414
+}, options?: AnalyticsCallOptions): void;
415
+
416
+/**
417
+ * Sends a Google Analytics event with given `eventParams`. This method
418
+ * automatically associates this logged event with this Firebase web
419
+ * app instance on this device.
420
+ * @public
421
+ * List of recommended event parameters can be found in
422
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
423
+ * | the GA4 reference documentation}.
424
+ */
425
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'login', eventParams?: {
426
+    method?: EventParams['method'];
427
+    [key: string]: any;
428
+}, options?: AnalyticsCallOptions): void;
429
+
430
+/**
431
+ * Sends a Google Analytics event with given `eventParams`. This method
432
+ * automatically associates this logged event with this Firebase web
433
+ * app instance on this device.
434
+ * @public
435
+ * See
436
+ * {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view
437
+ * | Page views}.
438
+ */
439
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'page_view', eventParams?: {
440
+    page_title?: string;
441
+    page_location?: string;
442
+    page_path?: string;
443
+    [key: string]: any;
444
+}, options?: AnalyticsCallOptions): void;
445
+
446
+/**
447
+ * Sends a Google Analytics event with given `eventParams`. This method
448
+ * automatically associates this logged event with this Firebase web
449
+ * app instance on this device.
450
+ * @public
451
+ * List of recommended event parameters can be found in
452
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
453
+ * | the GA4 reference documentation}.
454
+ */
455
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'purchase' | 'refund', eventParams?: {
456
+    value?: EventParams['value'];
457
+    currency?: EventParams['currency'];
458
+    transaction_id: EventParams['transaction_id'];
459
+    tax?: EventParams['tax'];
460
+    shipping?: EventParams['shipping'];
461
+    items?: EventParams['items'];
462
+    coupon?: EventParams['coupon'];
463
+    affiliation?: EventParams['affiliation'];
464
+    [key: string]: any;
465
+}, options?: AnalyticsCallOptions): void;
466
+
467
+/**
468
+ * Sends a Google Analytics event with given `eventParams`. This method
469
+ * automatically associates this logged event with this Firebase web
470
+ * app instance on this device.
471
+ * @public
472
+ * See {@link https://firebase.google.com/docs/analytics/screenviews
473
+ * | Track Screenviews}.
474
+ */
475
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'screen_view', eventParams?: {
476
+    firebase_screen: EventParams['firebase_screen'];
477
+    firebase_screen_class: EventParams['firebase_screen_class'];
478
+    [key: string]: any;
479
+}, options?: AnalyticsCallOptions): void;
480
+
481
+/**
482
+ * Sends a Google Analytics event with given `eventParams`. This method
483
+ * automatically associates this logged event with this Firebase web
484
+ * app instance on this device.
485
+ * @public
486
+ * List of recommended event parameters can be found in
487
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
488
+ * | the GA4 reference documentation}.
489
+ */
490
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'search' | 'view_search_results', eventParams?: {
491
+    search_term?: EventParams['search_term'];
492
+    [key: string]: any;
493
+}, options?: AnalyticsCallOptions): void;
494
+
495
+/**
496
+ * Sends a Google Analytics event with given `eventParams`. This method
497
+ * automatically associates this logged event with this Firebase web
498
+ * app instance on this device.
499
+ * @public
500
+ * List of recommended event parameters can be found in
501
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
502
+ * | the GA4 reference documentation}.
503
+ */
504
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'select_content', eventParams?: {
505
+    content_type?: EventParams['content_type'];
506
+    item_id?: EventParams['item_id'];
507
+    [key: string]: any;
508
+}, options?: AnalyticsCallOptions): void;
509
+
510
+/**
511
+ * Sends a Google Analytics event with given `eventParams`. This method
512
+ * automatically associates this logged event with this Firebase web
513
+ * app instance on this device.
514
+ * @public
515
+ * List of recommended event parameters can be found in
516
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
517
+ * | the GA4 reference documentation}.
518
+ */
519
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'select_item', eventParams?: {
520
+    items?: EventParams['items'];
521
+    item_list_name?: EventParams['item_list_name'];
522
+    item_list_id?: EventParams['item_list_id'];
523
+    [key: string]: any;
524
+}, options?: AnalyticsCallOptions): void;
525
+
526
+/**
527
+ * Sends a Google Analytics event with given `eventParams`. This method
528
+ * automatically associates this logged event with this Firebase web
529
+ * app instance on this device.
530
+ * @public
531
+ * List of recommended event parameters can be found in
532
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
533
+ * | the GA4 reference documentation}.
534
+ */
535
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'select_promotion' | 'view_promotion', eventParams?: {
536
+    items?: EventParams['items'];
537
+    promotion_id?: EventParams['promotion_id'];
538
+    promotion_name?: EventParams['promotion_name'];
539
+    [key: string]: any;
540
+}, options?: AnalyticsCallOptions): void;
541
+
542
+/**
543
+ * Sends a Google Analytics event with given `eventParams`. This method
544
+ * automatically associates this logged event with this Firebase web
545
+ * app instance on this device.
546
+ * @public
547
+ * List of recommended event parameters can be found in
548
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
549
+ * | the GA4 reference documentation}.
550
+ */
551
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'set_checkout_option', eventParams?: {
552
+    checkout_step?: EventParams['checkout_step'];
553
+    checkout_option?: EventParams['checkout_option'];
554
+    [key: string]: any;
555
+}, options?: AnalyticsCallOptions): void;
556
+
557
+/**
558
+ * Sends a Google Analytics event with given `eventParams`. This method
559
+ * automatically associates this logged event with this Firebase web
560
+ * app instance on this device.
561
+ * @public
562
+ * List of recommended event parameters can be found in
563
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
564
+ * | the GA4 reference documentation}.
565
+ */
566
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'share', eventParams?: {
567
+    method?: EventParams['method'];
568
+    content_type?: EventParams['content_type'];
569
+    item_id?: EventParams['item_id'];
570
+    [key: string]: any;
571
+}, options?: AnalyticsCallOptions): void;
572
+
573
+/**
574
+ * Sends a Google Analytics event with given `eventParams`. This method
575
+ * automatically associates this logged event with this Firebase web
576
+ * app instance on this device.
577
+ * @public
578
+ * List of recommended event parameters can be found in
579
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
580
+ * | the GA4 reference documentation}.
581
+ */
582
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'sign_up', eventParams?: {
583
+    method?: EventParams['method'];
584
+    [key: string]: any;
585
+}, options?: AnalyticsCallOptions): void;
586
+
587
+/**
588
+ * Sends a Google Analytics event with given `eventParams`. This method
589
+ * automatically associates this logged event with this Firebase web
590
+ * app instance on this device.
591
+ * @public
592
+ * List of recommended event parameters can be found in
593
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
594
+ * | the GA4 reference documentation}.
595
+ */
596
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'timing_complete', eventParams?: {
597
+    name: string;
598
+    value: number;
599
+    event_category?: string;
600
+    event_label?: string;
601
+    [key: string]: any;
602
+}, options?: AnalyticsCallOptions): void;
603
+
604
+/**
605
+ * Sends a Google Analytics event with given `eventParams`. This method
606
+ * automatically associates this logged event with this Firebase web
607
+ * app instance on this device.
608
+ * @public
609
+ * List of recommended event parameters can be found in
610
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
611
+ * | the GA4 reference documentation}.
612
+ */
613
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'view_cart' | 'view_item', eventParams?: {
614
+    currency?: EventParams['currency'];
615
+    items?: EventParams['items'];
616
+    value?: EventParams['value'];
617
+    [key: string]: any;
618
+}, options?: AnalyticsCallOptions): void;
619
+
620
+/**
621
+ * Sends a Google Analytics event with given `eventParams`. This method
622
+ * automatically associates this logged event with this Firebase web
623
+ * app instance on this device.
624
+ * @public
625
+ * List of recommended event parameters can be found in
626
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
627
+ * | the GA4 reference documentation}.
628
+ */
629
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'view_item_list', eventParams?: {
630
+    items?: EventParams['items'];
631
+    item_list_name?: EventParams['item_list_name'];
632
+    item_list_id?: EventParams['item_list_id'];
633
+    [key: string]: any;
634
+}, options?: AnalyticsCallOptions): void;
635
+
636
+/**
637
+ * Sends a Google Analytics event with given `eventParams`. This method
638
+ * automatically associates this logged event with this Firebase web
639
+ * app instance on this device.
640
+ * @public
641
+ * List of recommended event parameters can be found in
642
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
643
+ * | the GA4 reference documentation}.
644
+ */
645
+export declare function logEvent<T extends string>(analyticsInstance: Analytics, eventName: CustomEventName<T>, eventParams?: {
646
+    [key: string]: any;
647
+}, options?: AnalyticsCallOptions): void;
648
+
649
+/**
650
+ * Field previously used by some Google Analytics events.
651
+ * @deprecated Use `Item` instead.
652
+ * @public
653
+ */
654
+export declare interface Promotion {
655
+    creative_name?: string;
656
+    creative_slot?: string;
657
+    id?: string;
658
+    name?: string;
659
+}
660
+
661
+/**
662
+ * Sets whether Google Analytics collection is enabled for this app on this device.
663
+ * Sets global `window['ga-disable-analyticsId'] = true;`
664
+ *
665
+ * @public
666
+ *
667
+ * @param analyticsInstance - The {@link Analytics} instance.
668
+ * @param enabled - If true, enables collection, if false, disables it.
669
+ */
670
+export declare function setAnalyticsCollectionEnabled(analyticsInstance: Analytics, enabled: boolean): void;
671
+
672
+/**
673
+ * Sets the applicable end user consent state for this web app across all gtag references once
674
+ * Firebase Analytics is initialized.
675
+ *
676
+ * Use the {@link ConsentSettings} to specify individual consent type values. By default consent
677
+ * types are set to "granted".
678
+ * @public
679
+ * @param consentSettings - Maps the applicable end user consent state for gtag.js.
680
+ */
681
+export declare function setConsent(consentSettings: ConsentSettings): void;
682
+
683
+/**
684
+ * Use gtag `config` command to set `screen_name`.
685
+ *
686
+ * @public
687
+ *
688
+ * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.
689
+ * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.
690
+ *
691
+ * @param analyticsInstance - The {@link Analytics} instance.
692
+ * @param screenName - Screen name to set.
693
+ */
694
+export declare function setCurrentScreen(analyticsInstance: Analytics, screenName: string, options?: AnalyticsCallOptions): void;
695
+
696
+/**
697
+ * Adds data that will be set on every event logged from the SDK, including automatic ones.
698
+ * With gtag's "set" command, the values passed persist on the current page and are passed with
699
+ * all subsequent events.
700
+ * @public
701
+ * @param customParams - Any custom params the user may pass to gtag.js.
702
+ */
703
+export declare function setDefaultEventParameters(customParams: CustomParams): void;
704
+
705
+/**
706
+ * Configures Firebase Analytics to use custom `gtag` or `dataLayer` names.
707
+ * Intended to be used if `gtag.js` script has been installed on
708
+ * this page independently of Firebase Analytics, and is using non-default
709
+ * names for either the `gtag` function or for `dataLayer`.
710
+ * Must be called before calling `getAnalytics()` or it won't
711
+ * have any effect.
712
+ *
713
+ * @public
714
+ *
715
+ * @param options - Custom gtag and dataLayer names.
716
+ */
717
+export declare function settings(options: SettingsOptions): void;
718
+
719
+/**
720
+ * Specifies custom options for your Firebase Analytics instance.
721
+ * You must set these before initializing `firebase.analytics()`.
722
+ * @public
723
+ */
724
+export declare interface SettingsOptions {
725
+    /** Sets custom name for `gtag` function. */
726
+    gtagName?: string;
727
+    /** Sets custom name for `dataLayer` array used by `gtag.js`. */
728
+    dataLayerName?: string;
729
+}
730
+
731
+/**
732
+ * Use gtag `config` command to set `user_id`.
733
+ *
734
+ * @public
735
+ *
736
+ * @param analyticsInstance - The {@link Analytics} instance.
737
+ * @param id - User ID to set.
738
+ */
739
+export declare function setUserId(analyticsInstance: Analytics, id: string | null, options?: AnalyticsCallOptions): void;
740
+
741
+/**
742
+ * Use gtag `config` command to set all params specified.
743
+ *
744
+ * @public
745
+ */
746
+export declare function setUserProperties(analyticsInstance: Analytics, properties: CustomParams, options?: AnalyticsCallOptions): void;
747
+
748
+export { }

+ 748
- 0
node_modules/@firebase/analytics/dist/analytics.d.ts View File

1
+/**
2
+ * Firebase Analytics
3
+ *
4
+ * @packageDocumentation
5
+ */
6
+
7
+import { FirebaseApp } from '@firebase/app';
8
+
9
+/**
10
+ * An instance of Firebase Analytics.
11
+ * @public
12
+ */
13
+export declare interface Analytics {
14
+    /**
15
+     * The {@link @firebase/app#FirebaseApp} this {@link Analytics} instance is associated with.
16
+     */
17
+    app: FirebaseApp;
18
+}
19
+
20
+/**
21
+ * Additional options that can be passed to Analytics method
22
+ * calls such as `logEvent`, etc.
23
+ * @public
24
+ */
25
+export declare interface AnalyticsCallOptions {
26
+    /**
27
+     * If true, this config or event call applies globally to all
28
+     * Google Analytics properties on the page.
29
+     */
30
+    global: boolean;
31
+}
32
+
33
+/**
34
+ * {@link Analytics} instance initialization options.
35
+ * @public
36
+ */
37
+export declare interface AnalyticsSettings {
38
+    /**
39
+     * Params to be passed in the initial `gtag` config call during Firebase
40
+     * Analytics initialization.
41
+     */
42
+    config?: GtagConfigParams | EventParams;
43
+}
44
+
45
+/**
46
+ * Consent status settings for each consent type.
47
+ * For more information, see
48
+ * {@link https://developers.google.com/tag-platform/tag-manager/templates/consent-apis
49
+ * | the GA4 reference documentation for consent state and consent types}.
50
+ * @public
51
+ */
52
+export declare interface ConsentSettings {
53
+    /** Enables storage, such as cookies, related to advertising */
54
+    ad_storage?: ConsentStatusString;
55
+    /** Enables storage, such as cookies, related to analytics (for example, visit duration) */
56
+    analytics_storage?: ConsentStatusString;
57
+    /**
58
+     * Enables storage that supports the functionality of the website or app such as language settings
59
+     */
60
+    functionality_storage?: ConsentStatusString;
61
+    /** Enables storage related to personalization such as video recommendations */
62
+    personalization_storage?: ConsentStatusString;
63
+    /**
64
+     * Enables storage related to security such as authentication functionality, fraud prevention,
65
+     * and other user protection.
66
+     */
67
+    security_storage?: ConsentStatusString;
68
+    [key: string]: unknown;
69
+}
70
+
71
+/**
72
+ * Whether a particular consent type has been granted or denied.
73
+ * @public
74
+ */
75
+export declare type ConsentStatusString = 'granted' | 'denied';
76
+
77
+/**
78
+ * Standard `gtag.js` control parameters.
79
+ * For more information, see
80
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
81
+ * | the GA4 reference documentation}.
82
+ * @public
83
+ */
84
+export declare interface ControlParams {
85
+    groups?: string | string[];
86
+    send_to?: string | string[];
87
+    event_callback?: () => void;
88
+    event_timeout?: number;
89
+}
90
+
91
+/**
92
+ * Standard Google Analytics currency type.
93
+ * @public
94
+ */
95
+export declare type Currency = string | number;
96
+
97
+/**
98
+ * Any custom event name string not in the standard list of recommended
99
+ * event names.
100
+ * @public
101
+ */
102
+export declare type CustomEventName<T> = T extends EventNameString ? never : T;
103
+
104
+/**
105
+ * Any custom params the user may pass to `gtag`.
106
+ * @public
107
+ */
108
+export declare interface CustomParams {
109
+    [key: string]: unknown;
110
+}
111
+
112
+/**
113
+ * Type for standard Google Analytics event names. `logEvent` also accepts any
114
+ * custom string and interprets it as a custom event name.
115
+ * @public
116
+ */
117
+export declare type EventNameString = 'add_payment_info' | 'add_shipping_info' | 'add_to_cart' | 'add_to_wishlist' | 'begin_checkout' | 'checkout_progress' | 'exception' | 'generate_lead' | 'login' | 'page_view' | 'purchase' | 'refund' | 'remove_from_cart' | 'screen_view' | 'search' | 'select_content' | 'select_item' | 'select_promotion' | 'set_checkout_option' | 'share' | 'sign_up' | 'timing_complete' | 'view_cart' | 'view_item' | 'view_item_list' | 'view_promotion' | 'view_search_results';
118
+
119
+/**
120
+ * Standard `gtag.js` event parameters.
121
+ * For more information, see
122
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
123
+ * | the GA4 reference documentation}.
124
+ * @public
125
+ */
126
+export declare interface EventParams {
127
+    checkout_option?: string;
128
+    checkout_step?: number;
129
+    item_id?: string;
130
+    content_type?: string;
131
+    coupon?: string;
132
+    currency?: string;
133
+    description?: string;
134
+    fatal?: boolean;
135
+    items?: Item[];
136
+    method?: string;
137
+    number?: string;
138
+    promotions?: Promotion[];
139
+    screen_name?: string;
140
+    /**
141
+     * Firebase-specific. Use to log a `screen_name` to Firebase Analytics.
142
+     */
143
+    firebase_screen?: string;
144
+    /**
145
+     * Firebase-specific. Use to log a `screen_class` to Firebase Analytics.
146
+     */
147
+    firebase_screen_class?: string;
148
+    search_term?: string;
149
+    shipping?: Currency;
150
+    tax?: Currency;
151
+    transaction_id?: string;
152
+    value?: number;
153
+    event_label?: string;
154
+    event_category?: string;
155
+    shipping_tier?: string;
156
+    item_list_id?: string;
157
+    item_list_name?: string;
158
+    promotion_id?: string;
159
+    promotion_name?: string;
160
+    payment_type?: string;
161
+    affiliation?: string;
162
+    page_title?: string;
163
+    page_location?: string;
164
+    page_path?: string;
165
+    [key: string]: unknown;
166
+}
167
+
168
+/**
169
+ * Returns an {@link Analytics} instance for the given app.
170
+ *
171
+ * @public
172
+ *
173
+ * @param app - The {@link @firebase/app#FirebaseApp} to use.
174
+ */
175
+export declare function getAnalytics(app?: FirebaseApp): Analytics;
176
+
177
+/**
178
+ * A set of common Google Analytics config settings recognized by
179
+ * `gtag.js`.
180
+ * @public
181
+ */
182
+export declare interface GtagConfigParams {
183
+    /**
184
+     * Whether or not a page view should be sent.
185
+     * If set to true (default), a page view is automatically sent upon initialization
186
+     * of analytics.
187
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view | Page views }
188
+     */
189
+    'send_page_view'?: boolean;
190
+    /**
191
+     * The title of the page.
192
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view | Page views }
193
+     */
194
+    'page_title'?: string;
195
+    /**
196
+     * The URL of the page.
197
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view | Page views }
198
+     */
199
+    'page_location'?: string;
200
+    /**
201
+     * Defaults to `auto`.
202
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
203
+     */
204
+    'cookie_domain'?: string;
205
+    /**
206
+     * Defaults to 63072000 (two years, in seconds).
207
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
208
+     */
209
+    'cookie_expires'?: number;
210
+    /**
211
+     * Defaults to `_ga`.
212
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
213
+     */
214
+    'cookie_prefix'?: string;
215
+    /**
216
+     * If set to true, will update cookies on each page load.
217
+     * Defaults to true.
218
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
219
+     */
220
+    'cookie_update'?: boolean;
221
+    /**
222
+     * Appends additional flags to the cookie when set.
223
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
224
+     */
225
+    'cookie_flags'?: string;
226
+    /**
227
+     * If set to false, disables all advertising features with `gtag.js`.
228
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
229
+     */
230
+    'allow_google_signals'?: boolean;
231
+    /**
232
+     * If set to false, disables all advertising personalization with `gtag.js`.
233
+     * See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
234
+     */
235
+    'allow_ad_personalization_signals'?: boolean;
236
+    [key: string]: unknown;
237
+}
238
+
239
+/**
240
+ * Returns an {@link Analytics} instance for the given app.
241
+ *
242
+ * @public
243
+ *
244
+ * @param app - The {@link @firebase/app#FirebaseApp} to use.
245
+ */
246
+export declare function initializeAnalytics(app: FirebaseApp, options?: AnalyticsSettings): Analytics;
247
+
248
+/**
249
+ * This is a public static method provided to users that wraps four different checks:
250
+ *
251
+ * 1. Check if it's not a browser extension environment.
252
+ * 2. Check if cookies are enabled in current browser.
253
+ * 3. Check if IndexedDB is supported by the browser environment.
254
+ * 4. Check if the current browser context is valid for using `IndexedDB.open()`.
255
+ *
256
+ * @public
257
+ *
258
+ */
259
+export declare function isSupported(): Promise<boolean>;
260
+
261
+/**
262
+ * Standard Google Analytics `Item` type.
263
+ * @public
264
+ */
265
+export declare interface Item {
266
+    item_id?: string;
267
+    item_name?: string;
268
+    item_brand?: string;
269
+    item_category?: string;
270
+    item_category2?: string;
271
+    item_category3?: string;
272
+    item_category4?: string;
273
+    item_category5?: string;
274
+    item_variant?: string;
275
+    price?: Currency;
276
+    quantity?: number;
277
+    index?: number;
278
+    coupon?: string;
279
+    item_list_name?: string;
280
+    item_list_id?: string;
281
+    discount?: Currency;
282
+    affiliation?: string;
283
+    creative_name?: string;
284
+    creative_slot?: string;
285
+    promotion_id?: string;
286
+    promotion_name?: string;
287
+    location_id?: string;
288
+    /** @deprecated Use item_brand instead. */
289
+    brand?: string;
290
+    /** @deprecated Use item_category instead. */
291
+    category?: string;
292
+    /** @deprecated Use item_id instead. */
293
+    id?: string;
294
+    /** @deprecated Use item_name instead. */
295
+    name?: string;
296
+}
297
+
298
+/**
299
+ * Sends a Google Analytics event with given `eventParams`. This method
300
+ * automatically associates this logged event with this Firebase web
301
+ * app instance on this device.
302
+ * @public
303
+ * List of recommended event parameters can be found in
304
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
305
+ * | the GA4 reference documentation}.
306
+ */
307
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'add_payment_info', eventParams?: {
308
+    coupon?: EventParams['coupon'];
309
+    currency?: EventParams['currency'];
310
+    items?: EventParams['items'];
311
+    payment_type?: EventParams['payment_type'];
312
+    value?: EventParams['value'];
313
+    [key: string]: any;
314
+}, options?: AnalyticsCallOptions): void;
315
+
316
+/**
317
+ * Sends a Google Analytics event with given `eventParams`. This method
318
+ * automatically associates this logged event with this Firebase web
319
+ * app instance on this device.
320
+ * @public
321
+ * List of recommended event parameters can be found in
322
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
323
+ * | the GA4 reference documentation}.
324
+ */
325
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'add_shipping_info', eventParams?: {
326
+    coupon?: EventParams['coupon'];
327
+    currency?: EventParams['currency'];
328
+    items?: EventParams['items'];
329
+    shipping_tier?: EventParams['shipping_tier'];
330
+    value?: EventParams['value'];
331
+    [key: string]: any;
332
+}, options?: AnalyticsCallOptions): void;
333
+
334
+/**
335
+ * Sends a Google Analytics event with given `eventParams`. This method
336
+ * automatically associates this logged event with this Firebase web
337
+ * app instance on this device.
338
+ * @public
339
+ * List of recommended event parameters can be found in
340
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
341
+ * | the GA4 reference documentation}.
342
+ */
343
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'add_to_cart' | 'add_to_wishlist' | 'remove_from_cart', eventParams?: {
344
+    currency?: EventParams['currency'];
345
+    value?: EventParams['value'];
346
+    items?: EventParams['items'];
347
+    [key: string]: any;
348
+}, options?: AnalyticsCallOptions): void;
349
+
350
+/**
351
+ * Sends a Google Analytics event with given `eventParams`. This method
352
+ * automatically associates this logged event with this Firebase web
353
+ * app instance on this device.
354
+ * @public
355
+ * List of recommended event parameters can be found in
356
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
357
+ * | the GA4 reference documentation}.
358
+ */
359
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'begin_checkout', eventParams?: {
360
+    currency?: EventParams['currency'];
361
+    coupon?: EventParams['coupon'];
362
+    value?: EventParams['value'];
363
+    items?: EventParams['items'];
364
+    [key: string]: any;
365
+}, options?: AnalyticsCallOptions): void;
366
+
367
+/**
368
+ * Sends a Google Analytics event with given `eventParams`. This method
369
+ * automatically associates this logged event with this Firebase web
370
+ * app instance on this device.
371
+ * @public
372
+ * List of recommended event parameters can be found in
373
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
374
+ * | the GA4 reference documentation}.
375
+ */
376
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'checkout_progress', eventParams?: {
377
+    currency?: EventParams['currency'];
378
+    coupon?: EventParams['coupon'];
379
+    value?: EventParams['value'];
380
+    items?: EventParams['items'];
381
+    checkout_step?: EventParams['checkout_step'];
382
+    checkout_option?: EventParams['checkout_option'];
383
+    [key: string]: any;
384
+}, options?: AnalyticsCallOptions): void;
385
+
386
+/**
387
+ * Sends a Google Analytics event with given `eventParams`. This method
388
+ * automatically associates this logged event with this Firebase web
389
+ * app instance on this device.
390
+ * @public
391
+ * See
392
+ * {@link https://developers.google.com/analytics/devguides/collection/ga4/exceptions
393
+ * | Measure exceptions}.
394
+ */
395
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'exception', eventParams?: {
396
+    description?: EventParams['description'];
397
+    fatal?: EventParams['fatal'];
398
+    [key: string]: any;
399
+}, options?: AnalyticsCallOptions): void;
400
+
401
+/**
402
+ * Sends a Google Analytics event with given `eventParams`. This method
403
+ * automatically associates this logged event with this Firebase web
404
+ * app instance on this device.
405
+ * @public
406
+ * List of recommended event parameters can be found in
407
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
408
+ * | the GA4 reference documentation}.
409
+ */
410
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'generate_lead', eventParams?: {
411
+    value?: EventParams['value'];
412
+    currency?: EventParams['currency'];
413
+    [key: string]: any;
414
+}, options?: AnalyticsCallOptions): void;
415
+
416
+/**
417
+ * Sends a Google Analytics event with given `eventParams`. This method
418
+ * automatically associates this logged event with this Firebase web
419
+ * app instance on this device.
420
+ * @public
421
+ * List of recommended event parameters can be found in
422
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
423
+ * | the GA4 reference documentation}.
424
+ */
425
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'login', eventParams?: {
426
+    method?: EventParams['method'];
427
+    [key: string]: any;
428
+}, options?: AnalyticsCallOptions): void;
429
+
430
+/**
431
+ * Sends a Google Analytics event with given `eventParams`. This method
432
+ * automatically associates this logged event with this Firebase web
433
+ * app instance on this device.
434
+ * @public
435
+ * See
436
+ * {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view
437
+ * | Page views}.
438
+ */
439
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'page_view', eventParams?: {
440
+    page_title?: string;
441
+    page_location?: string;
442
+    page_path?: string;
443
+    [key: string]: any;
444
+}, options?: AnalyticsCallOptions): void;
445
+
446
+/**
447
+ * Sends a Google Analytics event with given `eventParams`. This method
448
+ * automatically associates this logged event with this Firebase web
449
+ * app instance on this device.
450
+ * @public
451
+ * List of recommended event parameters can be found in
452
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
453
+ * | the GA4 reference documentation}.
454
+ */
455
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'purchase' | 'refund', eventParams?: {
456
+    value?: EventParams['value'];
457
+    currency?: EventParams['currency'];
458
+    transaction_id: EventParams['transaction_id'];
459
+    tax?: EventParams['tax'];
460
+    shipping?: EventParams['shipping'];
461
+    items?: EventParams['items'];
462
+    coupon?: EventParams['coupon'];
463
+    affiliation?: EventParams['affiliation'];
464
+    [key: string]: any;
465
+}, options?: AnalyticsCallOptions): void;
466
+
467
+/**
468
+ * Sends a Google Analytics event with given `eventParams`. This method
469
+ * automatically associates this logged event with this Firebase web
470
+ * app instance on this device.
471
+ * @public
472
+ * See {@link https://firebase.google.com/docs/analytics/screenviews
473
+ * | Track Screenviews}.
474
+ */
475
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'screen_view', eventParams?: {
476
+    firebase_screen: EventParams['firebase_screen'];
477
+    firebase_screen_class: EventParams['firebase_screen_class'];
478
+    [key: string]: any;
479
+}, options?: AnalyticsCallOptions): void;
480
+
481
+/**
482
+ * Sends a Google Analytics event with given `eventParams`. This method
483
+ * automatically associates this logged event with this Firebase web
484
+ * app instance on this device.
485
+ * @public
486
+ * List of recommended event parameters can be found in
487
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
488
+ * | the GA4 reference documentation}.
489
+ */
490
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'search' | 'view_search_results', eventParams?: {
491
+    search_term?: EventParams['search_term'];
492
+    [key: string]: any;
493
+}, options?: AnalyticsCallOptions): void;
494
+
495
+/**
496
+ * Sends a Google Analytics event with given `eventParams`. This method
497
+ * automatically associates this logged event with this Firebase web
498
+ * app instance on this device.
499
+ * @public
500
+ * List of recommended event parameters can be found in
501
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
502
+ * | the GA4 reference documentation}.
503
+ */
504
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'select_content', eventParams?: {
505
+    content_type?: EventParams['content_type'];
506
+    item_id?: EventParams['item_id'];
507
+    [key: string]: any;
508
+}, options?: AnalyticsCallOptions): void;
509
+
510
+/**
511
+ * Sends a Google Analytics event with given `eventParams`. This method
512
+ * automatically associates this logged event with this Firebase web
513
+ * app instance on this device.
514
+ * @public
515
+ * List of recommended event parameters can be found in
516
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
517
+ * | the GA4 reference documentation}.
518
+ */
519
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'select_item', eventParams?: {
520
+    items?: EventParams['items'];
521
+    item_list_name?: EventParams['item_list_name'];
522
+    item_list_id?: EventParams['item_list_id'];
523
+    [key: string]: any;
524
+}, options?: AnalyticsCallOptions): void;
525
+
526
+/**
527
+ * Sends a Google Analytics event with given `eventParams`. This method
528
+ * automatically associates this logged event with this Firebase web
529
+ * app instance on this device.
530
+ * @public
531
+ * List of recommended event parameters can be found in
532
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
533
+ * | the GA4 reference documentation}.
534
+ */
535
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'select_promotion' | 'view_promotion', eventParams?: {
536
+    items?: EventParams['items'];
537
+    promotion_id?: EventParams['promotion_id'];
538
+    promotion_name?: EventParams['promotion_name'];
539
+    [key: string]: any;
540
+}, options?: AnalyticsCallOptions): void;
541
+
542
+/**
543
+ * Sends a Google Analytics event with given `eventParams`. This method
544
+ * automatically associates this logged event with this Firebase web
545
+ * app instance on this device.
546
+ * @public
547
+ * List of recommended event parameters can be found in
548
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
549
+ * | the GA4 reference documentation}.
550
+ */
551
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'set_checkout_option', eventParams?: {
552
+    checkout_step?: EventParams['checkout_step'];
553
+    checkout_option?: EventParams['checkout_option'];
554
+    [key: string]: any;
555
+}, options?: AnalyticsCallOptions): void;
556
+
557
+/**
558
+ * Sends a Google Analytics event with given `eventParams`. This method
559
+ * automatically associates this logged event with this Firebase web
560
+ * app instance on this device.
561
+ * @public
562
+ * List of recommended event parameters can be found in
563
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
564
+ * | the GA4 reference documentation}.
565
+ */
566
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'share', eventParams?: {
567
+    method?: EventParams['method'];
568
+    content_type?: EventParams['content_type'];
569
+    item_id?: EventParams['item_id'];
570
+    [key: string]: any;
571
+}, options?: AnalyticsCallOptions): void;
572
+
573
+/**
574
+ * Sends a Google Analytics event with given `eventParams`. This method
575
+ * automatically associates this logged event with this Firebase web
576
+ * app instance on this device.
577
+ * @public
578
+ * List of recommended event parameters can be found in
579
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
580
+ * | the GA4 reference documentation}.
581
+ */
582
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'sign_up', eventParams?: {
583
+    method?: EventParams['method'];
584
+    [key: string]: any;
585
+}, options?: AnalyticsCallOptions): void;
586
+
587
+/**
588
+ * Sends a Google Analytics event with given `eventParams`. This method
589
+ * automatically associates this logged event with this Firebase web
590
+ * app instance on this device.
591
+ * @public
592
+ * List of recommended event parameters can be found in
593
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
594
+ * | the GA4 reference documentation}.
595
+ */
596
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'timing_complete', eventParams?: {
597
+    name: string;
598
+    value: number;
599
+    event_category?: string;
600
+    event_label?: string;
601
+    [key: string]: any;
602
+}, options?: AnalyticsCallOptions): void;
603
+
604
+/**
605
+ * Sends a Google Analytics event with given `eventParams`. This method
606
+ * automatically associates this logged event with this Firebase web
607
+ * app instance on this device.
608
+ * @public
609
+ * List of recommended event parameters can be found in
610
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
611
+ * | the GA4 reference documentation}.
612
+ */
613
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'view_cart' | 'view_item', eventParams?: {
614
+    currency?: EventParams['currency'];
615
+    items?: EventParams['items'];
616
+    value?: EventParams['value'];
617
+    [key: string]: any;
618
+}, options?: AnalyticsCallOptions): void;
619
+
620
+/**
621
+ * Sends a Google Analytics event with given `eventParams`. This method
622
+ * automatically associates this logged event with this Firebase web
623
+ * app instance on this device.
624
+ * @public
625
+ * List of recommended event parameters can be found in
626
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
627
+ * | the GA4 reference documentation}.
628
+ */
629
+export declare function logEvent(analyticsInstance: Analytics, eventName: 'view_item_list', eventParams?: {
630
+    items?: EventParams['items'];
631
+    item_list_name?: EventParams['item_list_name'];
632
+    item_list_id?: EventParams['item_list_id'];
633
+    [key: string]: any;
634
+}, options?: AnalyticsCallOptions): void;
635
+
636
+/**
637
+ * Sends a Google Analytics event with given `eventParams`. This method
638
+ * automatically associates this logged event with this Firebase web
639
+ * app instance on this device.
640
+ * @public
641
+ * List of recommended event parameters can be found in
642
+ * {@link https://developers.google.com/gtagjs/reference/ga4-events
643
+ * | the GA4 reference documentation}.
644
+ */
645
+export declare function logEvent<T extends string>(analyticsInstance: Analytics, eventName: CustomEventName<T>, eventParams?: {
646
+    [key: string]: any;
647
+}, options?: AnalyticsCallOptions): void;
648
+
649
+/**
650
+ * Field previously used by some Google Analytics events.
651
+ * @deprecated Use `Item` instead.
652
+ * @public
653
+ */
654
+export declare interface Promotion {
655
+    creative_name?: string;
656
+    creative_slot?: string;
657
+    id?: string;
658
+    name?: string;
659
+}
660
+
661
+/**
662
+ * Sets whether Google Analytics collection is enabled for this app on this device.
663
+ * Sets global `window['ga-disable-analyticsId'] = true;`
664
+ *
665
+ * @public
666
+ *
667
+ * @param analyticsInstance - The {@link Analytics} instance.
668
+ * @param enabled - If true, enables collection, if false, disables it.
669
+ */
670
+export declare function setAnalyticsCollectionEnabled(analyticsInstance: Analytics, enabled: boolean): void;
671
+
672
+/**
673
+ * Sets the applicable end user consent state for this web app across all gtag references once
674
+ * Firebase Analytics is initialized.
675
+ *
676
+ * Use the {@link ConsentSettings} to specify individual consent type values. By default consent
677
+ * types are set to "granted".
678
+ * @public
679
+ * @param consentSettings - Maps the applicable end user consent state for gtag.js.
680
+ */
681
+export declare function setConsent(consentSettings: ConsentSettings): void;
682
+
683
+/**
684
+ * Use gtag `config` command to set `screen_name`.
685
+ *
686
+ * @public
687
+ *
688
+ * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.
689
+ * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.
690
+ *
691
+ * @param analyticsInstance - The {@link Analytics} instance.
692
+ * @param screenName - Screen name to set.
693
+ */
694
+export declare function setCurrentScreen(analyticsInstance: Analytics, screenName: string, options?: AnalyticsCallOptions): void;
695
+
696
+/**
697
+ * Adds data that will be set on every event logged from the SDK, including automatic ones.
698
+ * With gtag's "set" command, the values passed persist on the current page and are passed with
699
+ * all subsequent events.
700
+ * @public
701
+ * @param customParams - Any custom params the user may pass to gtag.js.
702
+ */
703
+export declare function setDefaultEventParameters(customParams: CustomParams): void;
704
+
705
+/**
706
+ * Configures Firebase Analytics to use custom `gtag` or `dataLayer` names.
707
+ * Intended to be used if `gtag.js` script has been installed on
708
+ * this page independently of Firebase Analytics, and is using non-default
709
+ * names for either the `gtag` function or for `dataLayer`.
710
+ * Must be called before calling `getAnalytics()` or it won't
711
+ * have any effect.
712
+ *
713
+ * @public
714
+ *
715
+ * @param options - Custom gtag and dataLayer names.
716
+ */
717
+export declare function settings(options: SettingsOptions): void;
718
+
719
+/**
720
+ * Specifies custom options for your Firebase Analytics instance.
721
+ * You must set these before initializing `firebase.analytics()`.
722
+ * @public
723
+ */
724
+export declare interface SettingsOptions {
725
+    /** Sets custom name for `gtag` function. */
726
+    gtagName?: string;
727
+    /** Sets custom name for `dataLayer` array used by `gtag.js`. */
728
+    dataLayerName?: string;
729
+}
730
+
731
+/**
732
+ * Use gtag `config` command to set `user_id`.
733
+ *
734
+ * @public
735
+ *
736
+ * @param analyticsInstance - The {@link Analytics} instance.
737
+ * @param id - User ID to set.
738
+ */
739
+export declare function setUserId(analyticsInstance: Analytics, id: string | null, options?: AnalyticsCallOptions): void;
740
+
741
+/**
742
+ * Use gtag `config` command to set all params specified.
743
+ *
744
+ * @public
745
+ */
746
+export declare function setUserProperties(analyticsInstance: Analytics, properties: CustomParams, options?: AnalyticsCallOptions): void;
747
+
748
+export { }

+ 1363
- 0
node_modules/@firebase/analytics/dist/esm/index.esm.js
File diff suppressed because it is too large
View File


+ 1
- 0
node_modules/@firebase/analytics/dist/esm/index.esm.js.map
File diff suppressed because it is too large
View File


+ 1192
- 0
node_modules/@firebase/analytics/dist/esm/index.esm2017.js
File diff suppressed because it is too large
View File


+ 1
- 0
node_modules/@firebase/analytics/dist/esm/index.esm2017.js.map
File diff suppressed because it is too large
View File


+ 1
- 0
node_modules/@firebase/analytics/dist/esm/package.json View File

1
+{"type":"module"}

+ 0
- 0
node_modules/@firebase/analytics/dist/esm/src/api.d.ts View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save