apirocket 0.7.4 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/notifications/notifications.service.d.ts +9 -0
- package/dist/components/notifications/notifications.types.d.ts +18 -0
- package/dist/ecommerce.css +163 -36
- package/dist/ecommerce.js +2 -2
- package/dist/lib/api.d.ts +2 -4
- package/dist/lib/graphql.d.ts +1 -0
- package/dist/services/checkout.service.d.ts +8 -2
- package/dist/services/lock.service.d.ts +19 -0
- package/dist/types/checkout.type.d.ts +17 -0
- package/dist/types/types.d.ts +4 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NotificationInstance, NotificationItem, NotificationsService } from './notifications.types';
|
|
2
|
+
declare class NotificationsServiceClass implements NotificationsService {
|
|
3
|
+
#private;
|
|
4
|
+
constructor();
|
|
5
|
+
add(notification: NotificationItem): NotificationInstance;
|
|
6
|
+
delete(index: number): void;
|
|
7
|
+
}
|
|
8
|
+
export declare const notificationsService: Readonly<NotificationsServiceClass>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
export type NotificationItem = {
|
|
3
|
+
text: string;
|
|
4
|
+
position?: NotificationPosition;
|
|
5
|
+
time?: number;
|
|
6
|
+
};
|
|
7
|
+
export type NotificationInstance = {
|
|
8
|
+
index: number;
|
|
9
|
+
text: string;
|
|
10
|
+
position: NotificationPosition;
|
|
11
|
+
timer?: NodeJS.Timeout;
|
|
12
|
+
};
|
|
13
|
+
export type NotificationsMap = Map<number, NotificationInstance>;
|
|
14
|
+
export type NotificationPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
15
|
+
export interface NotificationsService {
|
|
16
|
+
add: (notification: NotificationItem) => void;
|
|
17
|
+
delete: (index: number) => void;
|
|
18
|
+
}
|
package/dist/ecommerce.css
CHANGED
|
@@ -84,7 +84,8 @@
|
|
|
84
84
|
top: 0;
|
|
85
85
|
overflow: hidden;
|
|
86
86
|
width: var(--cart-width, 540px);
|
|
87
|
-
height:
|
|
87
|
+
height: 100dvh;
|
|
88
|
+
/* height: fit-content; */
|
|
88
89
|
box-shadow: 1px 20px 8px rgba(0,0,0,.1);
|
|
89
90
|
font-family: var(--cart-font-family, "Arial, Helvetica, sans-serif");
|
|
90
91
|
background-color: var(--cart-background-color, #fff);
|
|
@@ -562,7 +563,7 @@
|
|
|
562
563
|
flex: 0 0 50px;
|
|
563
564
|
font-size: 16px;
|
|
564
565
|
font-weight: normal;
|
|
565
|
-
color: #a3a3a3;
|
|
566
|
+
color: #a3a3a3;
|
|
566
567
|
text-align: right;
|
|
567
568
|
}
|
|
568
569
|
|
|
@@ -570,7 +571,7 @@
|
|
|
570
571
|
flex: 0 0 100px;
|
|
571
572
|
font-size: 16px;
|
|
572
573
|
font-weight: bold;
|
|
573
|
-
color: #404040;
|
|
574
|
+
color: #404040;
|
|
574
575
|
text-align: right;
|
|
575
576
|
}
|
|
576
577
|
|
|
@@ -592,7 +593,7 @@
|
|
|
592
593
|
font-size: 18px;
|
|
593
594
|
font-weight: bold;
|
|
594
595
|
line-height: 18px;
|
|
595
|
-
color: #404040;
|
|
596
|
+
color: #404040;
|
|
596
597
|
}
|
|
597
598
|
|
|
598
599
|
.apirocket-checkout-summary-row-total {
|
|
@@ -622,7 +623,7 @@
|
|
|
622
623
|
font-size: 24px;
|
|
623
624
|
font-weight: bold;
|
|
624
625
|
line-height: 24px;
|
|
625
|
-
color: #404040;
|
|
626
|
+
color: #404040;
|
|
626
627
|
}
|
|
627
628
|
|
|
628
629
|
.apirocket-checkout-breadcrumbs ol {
|
|
@@ -678,11 +679,15 @@
|
|
|
678
679
|
padding: 16px;
|
|
679
680
|
}
|
|
680
681
|
|
|
682
|
+
.apirocket-checkout-steps-summary-row:last-child {
|
|
683
|
+
border-bottom: none !important;
|
|
684
|
+
}
|
|
685
|
+
|
|
681
686
|
.apirocket-checkout-steps-summary-label {
|
|
682
687
|
flex: 0 0 90px;
|
|
683
688
|
font-size: 14px;
|
|
684
689
|
font-weight: normal;
|
|
685
|
-
line-height: 14px;
|
|
690
|
+
line-height: 14px;
|
|
686
691
|
color: #a3a3a3;
|
|
687
692
|
}
|
|
688
693
|
|
|
@@ -855,11 +860,11 @@
|
|
|
855
860
|
font-weight: bold;
|
|
856
861
|
}
|
|
857
862
|
|
|
858
|
-
.apirocket-checkout-mobile-summary {
|
|
863
|
+
.apirocket-checkout-mobile-summary {
|
|
859
864
|
background-color: #f5f5f5;
|
|
860
865
|
transition-property: max-height;
|
|
861
866
|
transition-timing-function: ease-in;
|
|
862
|
-
transition-duration: 350ms;
|
|
867
|
+
transition-duration: 350ms;
|
|
863
868
|
max-height: 0px;
|
|
864
869
|
overflow: hidden;
|
|
865
870
|
border-bottom: 1px solid #d9d9d9;
|
|
@@ -871,8 +876,8 @@
|
|
|
871
876
|
}
|
|
872
877
|
|
|
873
878
|
.apirocket-checkout-mobile-summary-wrapper {
|
|
874
|
-
width: 90%;
|
|
875
|
-
max-width: 560px;
|
|
879
|
+
width: 90%;
|
|
880
|
+
max-width: 560px;
|
|
876
881
|
padding: 16px 0px;
|
|
877
882
|
margin: 0 auto;
|
|
878
883
|
}
|
|
@@ -918,7 +923,7 @@
|
|
|
918
923
|
}
|
|
919
924
|
.apirocket-checkout-fieldset-row > * { flex: 1 1; margin-right: 16px; }
|
|
920
925
|
.apirocket-checkout-fieldset-row > :first-child { flex: 1 1 auto;}
|
|
921
|
-
.apirocket-checkout-fieldset-row > :last-child {
|
|
926
|
+
.apirocket-checkout-fieldset-row > :last-child {
|
|
922
927
|
flex: 0 0 auto;
|
|
923
928
|
margin-right: 0px;
|
|
924
929
|
font-size: 16px;
|
|
@@ -927,9 +932,9 @@
|
|
|
927
932
|
color: #404040;
|
|
928
933
|
}
|
|
929
934
|
|
|
930
|
-
.apirocket-checkout-fieldset-row > :last-child img {
|
|
935
|
+
.apirocket-checkout-fieldset-row > :last-child img {
|
|
931
936
|
display: block;
|
|
932
|
-
max-height: 24px;
|
|
937
|
+
max-height: 24px;
|
|
933
938
|
}
|
|
934
939
|
|
|
935
940
|
.apirocket-checkout-fieldset-row-wrapper {
|
|
@@ -945,29 +950,113 @@
|
|
|
945
950
|
.apirocket-checkout-text-xl { font-size: 18px !important; }
|
|
946
951
|
.apirocket-checkout-text-xxl { font-size: 20px !important; }
|
|
947
952
|
|
|
953
|
+
|
|
954
|
+
.apirocket-checkout-discountcode {
|
|
955
|
+
padding-left: 2px;
|
|
956
|
+
padding-right: 2px;
|
|
957
|
+
padding-bottom: 0px;
|
|
958
|
+
margin-bottom: 8px;
|
|
959
|
+
border-bottom: 1px solid #d9d9d9;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.apirocket-checkout-discountcode.apirocket-checkout-discountcode-mobile {
|
|
963
|
+
display: none;
|
|
964
|
+
margin-top: 48px;
|
|
965
|
+
margin-bottom: 0px;
|
|
966
|
+
border-bottom: none !important;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
.apirocket-checkout-discountcode.apirocket-checkout-discountcode-mobile .apirocket-checkout-discountcode-codes {
|
|
970
|
+
margin-bottom: 0px !important;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
.apirocket-checkout-discountcode-input {
|
|
974
|
+
display: flex;
|
|
975
|
+
justify-content: space-between;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
.apirocket-checkout-discountcode .apirocket-form-input {
|
|
979
|
+
flex: 1 1 0%;
|
|
980
|
+
margin-right: 16px;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
.apirocket-checkout-discountcode button {
|
|
984
|
+
font-size: 14px !important;
|
|
985
|
+
width: 100px !important;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
.apirocket-checkout-discountcode-codes {
|
|
989
|
+
width: 100%;
|
|
990
|
+
margin-bottom: 8px;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
.apirocket-checkout-discountcode-code {
|
|
994
|
+
display: inline-flex;
|
|
995
|
+
align-content: center;
|
|
996
|
+
background-color: #e5e5e5;
|
|
997
|
+
font-size: 12px;
|
|
998
|
+
line-height: 16px;
|
|
999
|
+
color: #737373;
|
|
1000
|
+
border-top-left-radius: 4px;
|
|
1001
|
+
border-bottom-left-radius: 4px;
|
|
1002
|
+
margin-right: 8px;
|
|
1003
|
+
margin-bottom: 8px;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
.apirocket-checkout-discountcode-code-name {
|
|
1007
|
+
display: flex;
|
|
1008
|
+
align-items: center;
|
|
1009
|
+
padding: 4px 8px;
|
|
1010
|
+
user-select: none;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
.apirocket-checkout-discountcode-code-name svg {
|
|
1014
|
+
padding-right: 8px;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
.apirocket-checkout-discountcode-code-close {
|
|
1018
|
+
display: flex;
|
|
1019
|
+
justify-content: center;
|
|
1020
|
+
align-items: center;
|
|
1021
|
+
width: 24px;
|
|
1022
|
+
color: #e5e5e5;
|
|
1023
|
+
background-color: #c4c4c4;
|
|
1024
|
+
border-top-right-radius: 4px;
|
|
1025
|
+
border-bottom-right-radius: 4px;
|
|
1026
|
+
cursor: pointer;
|
|
1027
|
+
transition-property: color, border-color, background-color, box-shadow;
|
|
1028
|
+
transition-timing-function: ease;
|
|
1029
|
+
transition-duration: 350ms;
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
.apirocket-checkout-discountcode-code-close:hover {
|
|
1033
|
+
background-color: #000000;
|
|
1034
|
+
color: #ffffff;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
948
1037
|
/* Responsive */
|
|
949
1038
|
|
|
950
1039
|
@media (max-width: 1000px) {
|
|
951
1040
|
|
|
952
1041
|
.apirocket-checkout-mobile { display: block; }
|
|
953
|
-
|
|
1042
|
+
|
|
954
1043
|
.apirocket-checkout-wrap {
|
|
955
1044
|
flex-flow: column;
|
|
956
1045
|
margin: 0;
|
|
957
1046
|
padding: 0;
|
|
958
1047
|
width: 100%;
|
|
959
1048
|
}
|
|
960
|
-
|
|
1049
|
+
|
|
961
1050
|
.apirocket-checkout-main,
|
|
962
|
-
.apirocket-checkout-summary {
|
|
963
|
-
width: 90%;
|
|
964
|
-
max-width: 560px;
|
|
1051
|
+
.apirocket-checkout-summary {
|
|
1052
|
+
width: 90%;
|
|
1053
|
+
max-width: 560px;
|
|
965
1054
|
margin: 0 auto;
|
|
966
1055
|
padding: 0;
|
|
967
1056
|
}
|
|
968
1057
|
|
|
969
|
-
.apirocket-checkout-summary {
|
|
970
|
-
/* order: 0;
|
|
1058
|
+
.apirocket-checkout-summary {
|
|
1059
|
+
/* order: 0;
|
|
971
1060
|
padding: 16px 0; */
|
|
972
1061
|
display: none;
|
|
973
1062
|
}
|
|
@@ -978,7 +1067,7 @@
|
|
|
978
1067
|
|
|
979
1068
|
.apirocket-checkout-continue { display: none; }
|
|
980
1069
|
.apirocket-checkout-close { display: block; }
|
|
981
|
-
|
|
1070
|
+
|
|
982
1071
|
.apirocket-checkout-breadcrumbs { text-align: center; }
|
|
983
1072
|
.apirocket-checkout-breadcrumbs ol { display: inline-flex; text-align: center; }
|
|
984
1073
|
|
|
@@ -990,10 +1079,10 @@
|
|
|
990
1079
|
|
|
991
1080
|
.apirocket-checkout-row { display: block; }
|
|
992
1081
|
.apirocket-checkout-row > * { margin-right: 0; }
|
|
993
|
-
|
|
1082
|
+
|
|
994
1083
|
.apirocket-checkout-actions > :first-child { order: 2; }
|
|
995
1084
|
.apirocket-checkout-actions > :last-child { margin-bottom: 32px; }
|
|
996
|
-
.apirocket-checkout-actions {
|
|
1085
|
+
.apirocket-checkout-actions {
|
|
997
1086
|
flex-flow: column;
|
|
998
1087
|
align-items: stretch;
|
|
999
1088
|
}
|
|
@@ -1002,13 +1091,13 @@
|
|
|
1002
1091
|
|
|
1003
1092
|
.apirocket-checkout-fieldset-row-wrapper .apirocket-checkout-row > * { margin-bottom: 16px !important; }
|
|
1004
1093
|
.apirocket-checkout-fieldset-row-wrapper .apirocket-checkout-row:last-child > *:last-child { margin-bottom: 0px !important; }
|
|
1005
|
-
|
|
1094
|
+
|
|
1006
1095
|
.apirocket-checkout-section-subtitle {
|
|
1007
1096
|
padding-top: 16px;
|
|
1008
1097
|
margin-bottom: -16px;
|
|
1009
1098
|
}
|
|
1010
1099
|
|
|
1011
|
-
.apirocket-checkout-footer ul {
|
|
1100
|
+
.apirocket-checkout-footer ul {
|
|
1012
1101
|
display: block;
|
|
1013
1102
|
text-align: center !important;
|
|
1014
1103
|
line-height: 32px !important;
|
|
@@ -1024,29 +1113,29 @@
|
|
|
1024
1113
|
flex: 0 0 auto;
|
|
1025
1114
|
max-width: 80px;
|
|
1026
1115
|
}
|
|
1027
|
-
|
|
1028
|
-
.apirocket-checkout-summary-item-col-image img {
|
|
1116
|
+
|
|
1117
|
+
.apirocket-checkout-summary-item-col-image img {
|
|
1029
1118
|
max-height: 80px;
|
|
1030
1119
|
}
|
|
1031
|
-
|
|
1120
|
+
|
|
1032
1121
|
.apirocket-checkout-summary-item-col-description {
|
|
1033
1122
|
flex: 1 1;
|
|
1034
1123
|
padding-left: 8px;
|
|
1035
1124
|
font-size: 14px;
|
|
1036
1125
|
line-height: 16px;
|
|
1037
1126
|
}
|
|
1038
|
-
|
|
1127
|
+
|
|
1039
1128
|
.apirocket-checkout-summary-item-col-description small { font-size: 12px; }
|
|
1040
|
-
|
|
1129
|
+
|
|
1041
1130
|
.apirocket-checkout-summary-item-col-quantity {
|
|
1042
1131
|
flex: 0 0 25px;
|
|
1043
1132
|
font-size: 12px;
|
|
1044
1133
|
}
|
|
1045
|
-
|
|
1134
|
+
|
|
1046
1135
|
.apirocket-checkout-summary-item-col-price {
|
|
1047
1136
|
flex: 0 0 80px;
|
|
1048
1137
|
font-size: 14px;
|
|
1049
|
-
}
|
|
1138
|
+
}
|
|
1050
1139
|
|
|
1051
1140
|
.apirocket-checkout-summary-label-total {
|
|
1052
1141
|
font-size: 16px;
|
|
@@ -1063,14 +1152,14 @@
|
|
|
1063
1152
|
|
|
1064
1153
|
.apirocket-checkout-summary-label {
|
|
1065
1154
|
font-size: 14px;
|
|
1066
|
-
line-height: 14px;
|
|
1155
|
+
line-height: 14px;
|
|
1067
1156
|
}
|
|
1068
1157
|
|
|
1069
1158
|
.apirocket-checkout-summary-value,
|
|
1070
1159
|
.apirocket-checkout-summary-value-total {
|
|
1071
1160
|
font-size: 16px;
|
|
1072
1161
|
line-height: 16px;
|
|
1073
|
-
}
|
|
1162
|
+
}
|
|
1074
1163
|
|
|
1075
1164
|
.apirocket-checkout-mobile .apirocket-checkout-logo img {
|
|
1076
1165
|
max-height: 55px;
|
|
@@ -1080,14 +1169,17 @@
|
|
|
1080
1169
|
|
|
1081
1170
|
.apirocket-checkout-steps-summary-row { position: relative; }
|
|
1082
1171
|
|
|
1083
|
-
.apirocket-checkout-steps-summary-label {
|
|
1172
|
+
.apirocket-checkout-steps-summary-label {
|
|
1084
1173
|
position: absolute;
|
|
1085
1174
|
font-size: 14px;
|
|
1086
1175
|
}
|
|
1087
1176
|
|
|
1088
1177
|
.apirocket-checkout-steps-summary-text { margin-top: 18px; }
|
|
1089
1178
|
.apirocket-checkout-steps-summary-link { font-size: 12px; }
|
|
1090
|
-
|
|
1179
|
+
|
|
1180
|
+
.apirocket-checkout-discountcode.apirocket-checkout-discountcode-mobile {
|
|
1181
|
+
display: block;
|
|
1182
|
+
}
|
|
1091
1183
|
}
|
|
1092
1184
|
|
|
1093
1185
|
|
|
@@ -1508,6 +1600,23 @@ button.apirocket-button-primary:disabled {
|
|
|
1508
1600
|
box-shadow: var(--cart-shadow-button-primary-hover, none);
|
|
1509
1601
|
}
|
|
1510
1602
|
|
|
1603
|
+
.apirocket-button-discount,
|
|
1604
|
+
button.apirocket-button-discount {
|
|
1605
|
+
background-color: #c4c4c4;
|
|
1606
|
+
border: 1px solid var(--cart-button-border-color, #e5e5e5);
|
|
1607
|
+
color: #fff;
|
|
1608
|
+
height: 46px !important;
|
|
1609
|
+
text-decoration: none !important;
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
.apirocket-button-discount:hover,
|
|
1613
|
+
.apirocket-button-discount.active {
|
|
1614
|
+
background-color: #000000;
|
|
1615
|
+
border-color: #000000;
|
|
1616
|
+
color: #fff;
|
|
1617
|
+
box-shadow: #000000;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1511
1620
|
|
|
1512
1621
|
@media (max-width: 720px) {
|
|
1513
1622
|
|
|
@@ -1581,6 +1690,10 @@ button.apirocket-button-primary:disabled {
|
|
|
1581
1690
|
display: none !important;
|
|
1582
1691
|
}
|
|
1583
1692
|
|
|
1693
|
+
.apirocket-tab-menu-item {
|
|
1694
|
+
white-space: nowrap;
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1584
1697
|
|
|
1585
1698
|
.apirocket-tab-panel {
|
|
1586
1699
|
display: none;
|
|
@@ -1732,6 +1845,7 @@ button.apirocket-button-primary:disabled {
|
|
|
1732
1845
|
font-weight: normal;
|
|
1733
1846
|
color: #404040;
|
|
1734
1847
|
cursor: pointer;
|
|
1848
|
+
text-align: left;
|
|
1735
1849
|
}
|
|
1736
1850
|
|
|
1737
1851
|
.apirocket-form-checkbox-label small {
|
|
@@ -2053,6 +2167,19 @@ button.apirocket-button-primary:disabled {
|
|
|
2053
2167
|
box-shadow: 0 0 0 1px #dc2626;
|
|
2054
2168
|
}
|
|
2055
2169
|
|
|
2170
|
+
|
|
2171
|
+
|
|
2172
|
+
@media (max-width: 720px) {
|
|
2173
|
+
.apirocket-checkout input,
|
|
2174
|
+
.apirocket-checkout textarea,
|
|
2175
|
+
.apirocket-checkout select,
|
|
2176
|
+
.apirocket-my-account input,
|
|
2177
|
+
.apirocket-my-account textarea,
|
|
2178
|
+
.apirocket-my-account select,
|
|
2179
|
+
.apirocket-modal input,
|
|
2180
|
+
.apirocket-modal textarea,
|
|
2181
|
+
.apirocket-modal select { font-size: 16px !important;}
|
|
2182
|
+
}
|
|
2056
2183
|
.apirocket-error-block {
|
|
2057
2184
|
display: flex;
|
|
2058
2185
|
justify-content: start;
|