@redacto.io/consent-sdk-react 9.2.0-beta.0 → 9.2.0-beta.2
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/.turbo/turbo-build.log +15 -10
- package/CHANGELOG.md +12 -0
- package/dist/privacy-center.d.mts +51 -1
- package/dist/privacy-center.d.ts +51 -1
- package/dist/privacy-center.js +3463 -1148
- package/dist/privacy-center.mjs +3399 -1084
- package/package.json +1 -1
- package/src/RedactoPrivacyCenter/PrivacyCenterHomePage.tsx +3 -0
- package/src/RedactoPrivacyCenter/PrivacyCenterMyReceiptPage.tsx +26 -0
- package/src/RedactoPrivacyCenter/api/actions.ts +66 -0
- package/src/RedactoPrivacyCenter/api/client.ts +79 -0
- package/src/RedactoPrivacyCenter/components/DataRequest/ProductSelectionSection.tsx +222 -0
- package/src/RedactoPrivacyCenter/components/Form.tsx +402 -259
- package/src/RedactoPrivacyCenter/components/ReceiptsList.tsx +492 -0
- package/src/RedactoPrivacyCenter/components/RequestSubmit.tsx +95 -57
- package/src/RedactoPrivacyCenter/components/SideMenuBarPC/constants.tsx +6 -1
- package/src/RedactoPrivacyCenter/components/groupHelpers.ts +56 -0
- package/src/RedactoPrivacyCenter/components/receiptColumns.tsx +203 -0
- package/src/RedactoPrivacyCenter/components/types.ts +20 -2
- package/src/RedactoPrivacyCenter/context/NavigationContext.tsx +2 -2
- package/src/RedactoPrivacyCenter/lib/api.ts +67 -8
- package/src/RedactoPrivacyCenter/lib/constants.ts +5 -0
- package/src/RedactoPrivacyCenter/lib/types.ts +74 -0
- package/src/RedactoPrivacyCenter/locales/as/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/bho/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/bn/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/brx/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/doi/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/en/translation.json +44 -1
- package/src/RedactoPrivacyCenter/locales/gom/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/gu/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/hi/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/kn/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/ks/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/mai/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/ml/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/mni-Mtei/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/mr/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/ne/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/or/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/pa/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/sa/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/sat/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/sd/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/ta/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/te/translation.json +39 -1
- package/src/RedactoPrivacyCenter/locales/ur/translation.json +39 -1
- package/src/RedactoPrivacyCenter/styles/injectStyles.ts +301 -0
- package/tests/Form.test.tsx +1144 -0
- package/tests/ProductSelectionSection.test.tsx +328 -0
- package/tests/RequestSubmit.test.tsx +135 -0
|
@@ -551,6 +551,192 @@ export const injectPCStyles = () => {
|
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
|
|
554
|
+
.pc-product-select-section {
|
|
555
|
+
width: 100%;
|
|
556
|
+
max-width: 100%;
|
|
557
|
+
min-width: 0;
|
|
558
|
+
overflow: visible;
|
|
559
|
+
}
|
|
560
|
+
.pc-product-select-header {
|
|
561
|
+
padding-left: 0.75rem;
|
|
562
|
+
padding-right: 0.75rem;
|
|
563
|
+
margin-bottom: 0.75rem;
|
|
564
|
+
}
|
|
565
|
+
.pc-product-select-chips {
|
|
566
|
+
display: flex;
|
|
567
|
+
flex-wrap: wrap;
|
|
568
|
+
align-items: center;
|
|
569
|
+
gap: 0.4375rem;
|
|
570
|
+
width: 100%;
|
|
571
|
+
max-width: 100%;
|
|
572
|
+
min-width: 0;
|
|
573
|
+
padding-left: 0.75rem;
|
|
574
|
+
padding-right: 0.75rem;
|
|
575
|
+
padding-bottom: 0.125rem;
|
|
576
|
+
overflow: visible;
|
|
577
|
+
}
|
|
578
|
+
.pc-product-select-chip {
|
|
579
|
+
display: inline-flex;
|
|
580
|
+
align-items: center;
|
|
581
|
+
flex-wrap: nowrap;
|
|
582
|
+
box-sizing: border-box;
|
|
583
|
+
padding: 0.3125rem 0.6875rem;
|
|
584
|
+
border: 1px solid var(--pc-border-color);
|
|
585
|
+
border-radius: 9999px;
|
|
586
|
+
background-color: var(--pc-bg-secondary);
|
|
587
|
+
color: var(--pc-text-primary);
|
|
588
|
+
cursor: pointer;
|
|
589
|
+
appearance: none;
|
|
590
|
+
-webkit-appearance: none;
|
|
591
|
+
font-family: inherit;
|
|
592
|
+
line-height: 1.25;
|
|
593
|
+
transition: border-color 0.2s ease, background-color 0.2s ease;
|
|
594
|
+
max-width: 100%;
|
|
595
|
+
min-width: 0;
|
|
596
|
+
}
|
|
597
|
+
.pc-product-select-chip:disabled {
|
|
598
|
+
cursor: default;
|
|
599
|
+
opacity: 0.85;
|
|
600
|
+
}
|
|
601
|
+
.pc-product-select-chip--selected {
|
|
602
|
+
border-color: var(--pc-primary);
|
|
603
|
+
background-color: color-mix(in srgb, var(--pc-primary) 10%, var(--pc-bg-primary));
|
|
604
|
+
}
|
|
605
|
+
.pc-product-select-chip--skeleton {
|
|
606
|
+
cursor: default;
|
|
607
|
+
pointer-events: none;
|
|
608
|
+
}
|
|
609
|
+
.pc-product-select-chip-inner {
|
|
610
|
+
display: flex;
|
|
611
|
+
flex-direction: column;
|
|
612
|
+
align-items: flex-start;
|
|
613
|
+
gap: 0.0625rem;
|
|
614
|
+
min-width: 0;
|
|
615
|
+
max-width: min(100%, 11.5rem);
|
|
616
|
+
}
|
|
617
|
+
.pc-product-select-chip-label {
|
|
618
|
+
display: block;
|
|
619
|
+
overflow: hidden;
|
|
620
|
+
text-overflow: ellipsis;
|
|
621
|
+
white-space: nowrap;
|
|
622
|
+
max-width: 100%;
|
|
623
|
+
min-width: 0;
|
|
624
|
+
font-size: 0.8125rem;
|
|
625
|
+
font-weight: 500;
|
|
626
|
+
line-height: 1.25;
|
|
627
|
+
}
|
|
628
|
+
.pc-product-select-chip-suffix {
|
|
629
|
+
display: block;
|
|
630
|
+
overflow: hidden;
|
|
631
|
+
text-overflow: ellipsis;
|
|
632
|
+
white-space: nowrap;
|
|
633
|
+
max-width: 100%;
|
|
634
|
+
min-width: 0;
|
|
635
|
+
font-size: 0.6875rem;
|
|
636
|
+
font-weight: 500;
|
|
637
|
+
color: var(--pc-text-secondary);
|
|
638
|
+
line-height: 1.25;
|
|
639
|
+
}
|
|
640
|
+
.pc-product-select-chip-meta {
|
|
641
|
+
display: block;
|
|
642
|
+
overflow: hidden;
|
|
643
|
+
text-overflow: ellipsis;
|
|
644
|
+
white-space: nowrap;
|
|
645
|
+
max-width: 100%;
|
|
646
|
+
min-width: 0;
|
|
647
|
+
font-size: 0.6875rem;
|
|
648
|
+
color: var(--pc-text-secondary);
|
|
649
|
+
line-height: 1.25;
|
|
650
|
+
}
|
|
651
|
+
.pc-product-purpose-panel {
|
|
652
|
+
display: flex;
|
|
653
|
+
flex-direction: column;
|
|
654
|
+
width: 100%;
|
|
655
|
+
max-width: 100%;
|
|
656
|
+
min-width: 0;
|
|
657
|
+
border: 1px solid var(--pc-border-color);
|
|
658
|
+
border-radius: var(--pc-radius-lg, 0.5rem);
|
|
659
|
+
background-color: var(--pc-bg-secondary);
|
|
660
|
+
overflow: hidden;
|
|
661
|
+
}
|
|
662
|
+
.pc-product-purpose-panel-header {
|
|
663
|
+
display: flex;
|
|
664
|
+
flex-direction: column;
|
|
665
|
+
gap: 0.25rem;
|
|
666
|
+
padding: 0.75rem;
|
|
667
|
+
background-color: var(--pc-bg-primary);
|
|
668
|
+
border-bottom: 1px solid var(--pc-border-color);
|
|
669
|
+
}
|
|
670
|
+
.pc-product-purpose-panel-title-row {
|
|
671
|
+
display: flex;
|
|
672
|
+
align-items: center;
|
|
673
|
+
flex-wrap: wrap;
|
|
674
|
+
gap: 0.375rem 0.5rem;
|
|
675
|
+
min-width: 0;
|
|
676
|
+
}
|
|
677
|
+
.pc-product-purpose-panel-title {
|
|
678
|
+
overflow-wrap: anywhere;
|
|
679
|
+
word-break: break-word;
|
|
680
|
+
min-width: 0;
|
|
681
|
+
}
|
|
682
|
+
.pc-product-purpose-panel-nominator,
|
|
683
|
+
.pc-product-purpose-panel-subtitle {
|
|
684
|
+
overflow-wrap: anywhere;
|
|
685
|
+
word-break: break-word;
|
|
686
|
+
}
|
|
687
|
+
.pc-product-purpose-panel-body {
|
|
688
|
+
padding: 0.75rem;
|
|
689
|
+
background-color: var(--pc-bg-primary);
|
|
690
|
+
overflow-x: auto;
|
|
691
|
+
-webkit-overflow-scrolling: touch;
|
|
692
|
+
}
|
|
693
|
+
@media (min-width: 640px) {
|
|
694
|
+
.pc-product-select-header {
|
|
695
|
+
padding-left: 1rem;
|
|
696
|
+
padding-right: 1rem;
|
|
697
|
+
margin-bottom: 1rem;
|
|
698
|
+
}
|
|
699
|
+
.pc-product-select-chips {
|
|
700
|
+
gap: 0.4375rem;
|
|
701
|
+
padding-left: 1rem;
|
|
702
|
+
padding-right: 1rem;
|
|
703
|
+
}
|
|
704
|
+
.pc-product-purpose-panel-header {
|
|
705
|
+
padding: 0.875rem 1rem;
|
|
706
|
+
}
|
|
707
|
+
.pc-product-purpose-panel-body {
|
|
708
|
+
padding: 1rem;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
@media (min-width: 768px) {
|
|
712
|
+
.pc-product-select-chips {
|
|
713
|
+
gap: 0.4375rem;
|
|
714
|
+
}
|
|
715
|
+
.pc-product-purpose-panel-header {
|
|
716
|
+
padding: 1rem;
|
|
717
|
+
}
|
|
718
|
+
.pc-product-purpose-panel-body {
|
|
719
|
+
padding: 1rem;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
@media (min-width: 1024px) {
|
|
723
|
+
.pc-product-select-header {
|
|
724
|
+
padding-left: 1rem;
|
|
725
|
+
padding-right: 1rem;
|
|
726
|
+
}
|
|
727
|
+
.pc-product-select-chips {
|
|
728
|
+
gap: 0.4375rem;
|
|
729
|
+
}
|
|
730
|
+
.pc-product-select-chip-inner {
|
|
731
|
+
max-width: min(100%, 13rem);
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
@media (min-width: 1280px) {
|
|
735
|
+
.pc-product-select-chips {
|
|
736
|
+
gap: 0.625rem;
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
|
|
554
740
|
/* Responsive Flex Direction */
|
|
555
741
|
.pc-flex-responsive {
|
|
556
742
|
flex-direction: column;
|
|
@@ -901,6 +1087,121 @@ export const injectPCStyles = () => {
|
|
|
901
1087
|
}
|
|
902
1088
|
}
|
|
903
1089
|
|
|
1090
|
+
/* My Receipt — toolbar polish */
|
|
1091
|
+
.pc-receipts-filters-card {
|
|
1092
|
+
display: flex;
|
|
1093
|
+
flex-direction: column;
|
|
1094
|
+
gap: 0.75rem;
|
|
1095
|
+
border: 1px solid var(--pc-border-color);
|
|
1096
|
+
border-radius: var(--pc-border-radius-lg);
|
|
1097
|
+
background-color: var(--pc-bg-primary);
|
|
1098
|
+
padding: 0.75rem;
|
|
1099
|
+
}
|
|
1100
|
+
.pc-receipts-filters-header {
|
|
1101
|
+
display: flex;
|
|
1102
|
+
flex-direction: column;
|
|
1103
|
+
gap: 0.5rem;
|
|
1104
|
+
}
|
|
1105
|
+
.pc-receipts-filters-grid {
|
|
1106
|
+
display: grid;
|
|
1107
|
+
grid-template-columns: minmax(0, 1fr);
|
|
1108
|
+
gap: 0.75rem;
|
|
1109
|
+
width: 100%;
|
|
1110
|
+
}
|
|
1111
|
+
.pc-receipts-filter-control {
|
|
1112
|
+
width: 100% !important;
|
|
1113
|
+
min-width: 0 !important;
|
|
1114
|
+
max-width: none !important;
|
|
1115
|
+
flex: 1 1 auto !important;
|
|
1116
|
+
}
|
|
1117
|
+
.pc-receipts-summary-row {
|
|
1118
|
+
display: flex;
|
|
1119
|
+
flex-direction: column;
|
|
1120
|
+
gap: 0.5rem;
|
|
1121
|
+
border-top: 1px solid var(--pc-border-color);
|
|
1122
|
+
padding-top: 0.625rem;
|
|
1123
|
+
}
|
|
1124
|
+
.pc-receipts-active-chips {
|
|
1125
|
+
display: flex;
|
|
1126
|
+
flex-wrap: wrap;
|
|
1127
|
+
gap: 0.375rem;
|
|
1128
|
+
align-items: center;
|
|
1129
|
+
}
|
|
1130
|
+
.pc-receipts-filter-chip {
|
|
1131
|
+
display: inline-flex;
|
|
1132
|
+
align-items: center;
|
|
1133
|
+
gap: 0.25rem;
|
|
1134
|
+
border-radius: 9999px;
|
|
1135
|
+
border: 1px solid var(--pc-border-color);
|
|
1136
|
+
background-color: var(--pc-bg-secondary);
|
|
1137
|
+
color: var(--pc-text-secondary);
|
|
1138
|
+
font-size: 0.75rem;
|
|
1139
|
+
line-height: 1.2;
|
|
1140
|
+
padding: 0.1875rem 0.5rem;
|
|
1141
|
+
white-space: nowrap;
|
|
1142
|
+
}
|
|
1143
|
+
.pc-receipts-filter-chip-label {
|
|
1144
|
+
color: var(--pc-text-primary);
|
|
1145
|
+
font-weight: 600;
|
|
1146
|
+
}
|
|
1147
|
+
.pc-receipt-custom-hint {
|
|
1148
|
+
margin: 0;
|
|
1149
|
+
color: var(--pc-error);
|
|
1150
|
+
}
|
|
1151
|
+
@media (min-width: 768px) and (max-width: 1023px) {
|
|
1152
|
+
.pc-receipts-filters-grid {
|
|
1153
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
@media (min-width: 768px) {
|
|
1157
|
+
.pc-receipts-filters-card {
|
|
1158
|
+
padding: 0.875rem 1rem;
|
|
1159
|
+
}
|
|
1160
|
+
.pc-receipts-filters-header {
|
|
1161
|
+
flex-direction: row;
|
|
1162
|
+
align-items: flex-start;
|
|
1163
|
+
justify-content: space-between;
|
|
1164
|
+
gap: 1rem;
|
|
1165
|
+
}
|
|
1166
|
+
.pc-receipts-summary-row {
|
|
1167
|
+
flex-direction: row;
|
|
1168
|
+
align-items: flex-start;
|
|
1169
|
+
justify-content: space-between;
|
|
1170
|
+
gap: 0.75rem;
|
|
1171
|
+
}
|
|
1172
|
+
.pc-receipts-active-chips {
|
|
1173
|
+
justify-content: flex-end;
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
@media (min-width: 1024px) {
|
|
1177
|
+
.pc-receipts-filters-grid {
|
|
1178
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
/* My Receipt — custom date range (From / To pair) */
|
|
1183
|
+
.pc-receipt-date-range {
|
|
1184
|
+
display: flex;
|
|
1185
|
+
flex-direction: row;
|
|
1186
|
+
align-items: flex-end;
|
|
1187
|
+
gap: 0.5rem;
|
|
1188
|
+
width: 100%;
|
|
1189
|
+
margin-top: -0.125rem;
|
|
1190
|
+
}
|
|
1191
|
+
.pc-receipt-date-field {
|
|
1192
|
+
flex: 1 1 0;
|
|
1193
|
+
min-width: 0;
|
|
1194
|
+
}
|
|
1195
|
+
@media (min-width: 768px) {
|
|
1196
|
+
.pc-receipt-date-range {
|
|
1197
|
+
width: auto !important;
|
|
1198
|
+
}
|
|
1199
|
+
.pc-receipt-date-field {
|
|
1200
|
+
flex: 0 0 auto;
|
|
1201
|
+
width: 160px;
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
|
|
904
1205
|
.pc-navbar-actions {
|
|
905
1206
|
align-items: center !important;
|
|
906
1207
|
}
|