@terreno/ui 0.7.1 → 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/BooleanField.js +23 -23
- package/dist/BooleanField.js.map +1 -1
- package/dist/ConsentFormScreen.d.ts +14 -0
- package/dist/ConsentFormScreen.js +93 -0
- package/dist/ConsentFormScreen.js.map +1 -0
- package/dist/ConsentHistory.d.ts +8 -0
- package/dist/ConsentHistory.js +70 -0
- package/dist/ConsentHistory.js.map +1 -0
- package/dist/ConsentNavigator.d.ts +9 -0
- package/dist/ConsentNavigator.js +72 -0
- package/dist/ConsentNavigator.js.map +1 -0
- package/dist/DataTable.js +1 -1
- package/dist/DataTable.js.map +1 -1
- package/dist/DateTimeActionSheet.js +24 -8
- package/dist/DateTimeActionSheet.js.map +1 -1
- package/dist/DateTimeField.d.ts +22 -0
- package/dist/DateTimeField.js +187 -67
- package/dist/DateTimeField.js.map +1 -1
- package/dist/DraggableList.d.ts +66 -0
- package/dist/DraggableList.js +241 -0
- package/dist/DraggableList.js.map +1 -0
- package/dist/Link.js +1 -1
- package/dist/Link.js.map +1 -1
- package/dist/MarkdownEditor.d.ts +12 -0
- package/dist/MarkdownEditor.js +12 -0
- package/dist/MarkdownEditor.js.map +1 -0
- package/dist/MarkdownEditorField.d.ts +1 -0
- package/dist/MarkdownEditorField.js +16 -16
- package/dist/MarkdownEditorField.js.map +1 -1
- package/dist/Modal.js +11 -1
- package/dist/Modal.js.map +1 -1
- package/dist/PickerSelect.js +10 -0
- package/dist/PickerSelect.js.map +1 -1
- package/dist/Slider.js +2 -8
- package/dist/Slider.js.map +1 -1
- package/dist/TerrenoProvider.js +10 -1
- package/dist/TerrenoProvider.js.map +1 -1
- package/dist/UpgradeRequiredScreen.d.ts +8 -0
- package/dist/UpgradeRequiredScreen.js +10 -0
- package/dist/UpgradeRequiredScreen.js.map +1 -0
- package/dist/generateConsentHistoryPdf.d.ts +2 -0
- package/dist/generateConsentHistoryPdf.js +185 -0
- package/dist/generateConsentHistoryPdf.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/useConsentForms.d.ts +29 -0
- package/dist/useConsentForms.js +50 -0
- package/dist/useConsentForms.js.map +1 -0
- package/dist/useConsentHistory.d.ts +31 -0
- package/dist/useConsentHistory.js +17 -0
- package/dist/useConsentHistory.js.map +1 -0
- package/dist/useSubmitConsent.d.ts +12 -0
- package/dist/useSubmitConsent.js +23 -0
- package/dist/useSubmitConsent.js.map +1 -0
- package/package.json +4 -2
- package/src/BooleanField.test.tsx +3 -5
- package/src/BooleanField.tsx +33 -31
- package/src/ConsentFormScreen.tsx +216 -0
- package/src/ConsentHistory.tsx +249 -0
- package/src/ConsentNavigator.test.tsx +111 -0
- package/src/ConsentNavigator.tsx +128 -0
- package/src/DataTable.tsx +1 -1
- package/src/DateTimeActionSheet.tsx +21 -8
- package/src/DateTimeField.tsx +416 -133
- package/src/DraggableList.tsx +424 -0
- package/src/Link.tsx +1 -1
- package/src/MarkdownEditor.tsx +66 -0
- package/src/MarkdownEditorField.tsx +32 -28
- package/src/Modal.tsx +19 -1
- package/src/PickerSelect.tsx +11 -0
- package/src/Slider.tsx +2 -1
- package/src/TerrenoProvider.tsx +10 -1
- package/src/TimezonePicker.test.tsx +9 -1
- package/src/UpgradeRequiredScreen.tsx +52 -0
- package/src/__snapshots__/BooleanField.test.tsx.snap +167 -203
- package/src/__snapshots__/DataTable.test.tsx.snap +0 -114
- package/src/__snapshots__/Field.test.tsx.snap +53 -69
- package/src/__snapshots__/Link.test.tsx.snap +14 -21
- package/src/__snapshots__/Slider.test.tsx.snap +0 -7
- package/src/__snapshots__/TimezonePicker.test.tsx.snap +0 -4710
- package/src/generateConsentHistoryPdf.ts +211 -0
- package/src/index.tsx +9 -1
- package/src/useConsentForms.ts +70 -0
- package/src/useConsentHistory.ts +40 -0
- package/src/useSubmitConsent.ts +35 -0
|
@@ -669,49 +669,17 @@ exports[`Field renders boolean field 1`] = `
|
|
|
669
669
|
"children": [
|
|
670
670
|
{
|
|
671
671
|
"$$typeof": Symbol(react.test.json),
|
|
672
|
-
"children":
|
|
673
|
-
{
|
|
674
|
-
"$$typeof": Symbol(react.test.json),
|
|
675
|
-
"children": null,
|
|
676
|
-
"props": {
|
|
677
|
-
"style": {
|
|
678
|
-
"alignItems": "center",
|
|
679
|
-
"backgroundColor": "#FFFFFF",
|
|
680
|
-
"borderColor": "#2B6072",
|
|
681
|
-
"borderRadius": 10,
|
|
682
|
-
"borderWidth": 1,
|
|
683
|
-
"height": 20,
|
|
684
|
-
"justifyContent": "center",
|
|
685
|
-
"width": 20,
|
|
686
|
-
},
|
|
687
|
-
"testID": undefined,
|
|
688
|
-
},
|
|
689
|
-
"type": "View",
|
|
690
|
-
},
|
|
691
|
-
],
|
|
672
|
+
"children": null,
|
|
692
673
|
"props": {
|
|
693
674
|
"style": {
|
|
694
675
|
"alignItems": "center",
|
|
695
|
-
"
|
|
696
|
-
"
|
|
676
|
+
"backgroundColor": "#FFFFFF",
|
|
677
|
+
"borderColor": "#2B6072",
|
|
678
|
+
"borderRadius": 10,
|
|
679
|
+
"borderWidth": 1,
|
|
680
|
+
"height": 20,
|
|
697
681
|
"justifyContent": "center",
|
|
698
|
-
"
|
|
699
|
-
"_value": -10,
|
|
700
|
-
"addListener": [class Function],
|
|
701
|
-
"animate": [class Function],
|
|
702
|
-
"extractOffset": [class Function],
|
|
703
|
-
"flattenOffset": [class Function],
|
|
704
|
-
"interpolate": [class Function],
|
|
705
|
-
"removeAllListeners": [class Function],
|
|
706
|
-
"removeListener": [class Function],
|
|
707
|
-
"resetAnimation": [class Function],
|
|
708
|
-
"setOffset": [class Function],
|
|
709
|
-
"setValue": [class Function],
|
|
710
|
-
"stopAnimation": [class Function],
|
|
711
|
-
"stopTracking": [class Function],
|
|
712
|
-
"track": [class Function],
|
|
713
|
-
},
|
|
714
|
-
"width": 36,
|
|
682
|
+
"width": 20,
|
|
715
683
|
},
|
|
716
684
|
"testID": undefined,
|
|
717
685
|
},
|
|
@@ -720,8 +688,12 @@ exports[`Field renders boolean field 1`] = `
|
|
|
720
688
|
],
|
|
721
689
|
"props": {
|
|
722
690
|
"style": {
|
|
723
|
-
"
|
|
724
|
-
|
|
691
|
+
"alignItems": "center",
|
|
692
|
+
"flex": 1,
|
|
693
|
+
"flexDirection": "row",
|
|
694
|
+
"justifyContent": "center",
|
|
695
|
+
"left": Value {
|
|
696
|
+
"_value": -10,
|
|
725
697
|
"addListener": [class Function],
|
|
726
698
|
"animate": [class Function],
|
|
727
699
|
"extractOffset": [class Function],
|
|
@@ -736,12 +708,6 @@ exports[`Field renders boolean field 1`] = `
|
|
|
736
708
|
"stopTracking": [class Function],
|
|
737
709
|
"track": [class Function],
|
|
738
710
|
},
|
|
739
|
-
"borderColor": "#2B6072",
|
|
740
|
-
"borderRadius": 20,
|
|
741
|
-
"borderWidth": 1,
|
|
742
|
-
"height": 20,
|
|
743
|
-
"marginHorizontal": 10,
|
|
744
|
-
"marginRight": undefined,
|
|
745
711
|
"width": 36,
|
|
746
712
|
},
|
|
747
713
|
"testID": undefined,
|
|
@@ -751,9 +717,29 @@ exports[`Field renders boolean field 1`] = `
|
|
|
751
717
|
],
|
|
752
718
|
"props": {
|
|
753
719
|
"style": {
|
|
754
|
-
"
|
|
755
|
-
|
|
756
|
-
|
|
720
|
+
"backgroundColor": Value {
|
|
721
|
+
"_value": 0,
|
|
722
|
+
"addListener": [class Function],
|
|
723
|
+
"animate": [class Function],
|
|
724
|
+
"extractOffset": [class Function],
|
|
725
|
+
"flattenOffset": [class Function],
|
|
726
|
+
"interpolate": [class Function],
|
|
727
|
+
"removeAllListeners": [class Function],
|
|
728
|
+
"removeListener": [class Function],
|
|
729
|
+
"resetAnimation": [class Function],
|
|
730
|
+
"setOffset": [class Function],
|
|
731
|
+
"setValue": [class Function],
|
|
732
|
+
"stopAnimation": [class Function],
|
|
733
|
+
"stopTracking": [class Function],
|
|
734
|
+
"track": [class Function],
|
|
735
|
+
},
|
|
736
|
+
"borderColor": "#2B6072",
|
|
737
|
+
"borderRadius": 20,
|
|
738
|
+
"borderWidth": 1,
|
|
739
|
+
"height": 20,
|
|
740
|
+
"marginHorizontal": 10,
|
|
741
|
+
"marginRight": undefined,
|
|
742
|
+
"width": 36,
|
|
757
743
|
},
|
|
758
744
|
"testID": undefined,
|
|
759
745
|
},
|
|
@@ -763,8 +749,13 @@ exports[`Field renders boolean field 1`] = `
|
|
|
763
749
|
"props": {
|
|
764
750
|
"aria-role": "button",
|
|
765
751
|
"onPress": [Function],
|
|
752
|
+
"style": {
|
|
753
|
+
"alignItems": "center",
|
|
754
|
+
"flexDirection": "row",
|
|
755
|
+
"justifyContent": "center",
|
|
756
|
+
},
|
|
766
757
|
},
|
|
767
|
-
"type": "
|
|
758
|
+
"type": "Pressable",
|
|
768
759
|
},
|
|
769
760
|
],
|
|
770
761
|
"props": {
|
|
@@ -1009,18 +1000,7 @@ exports[`Field renders date field 1`] = `
|
|
|
1009
1000
|
},
|
|
1010
1001
|
],
|
|
1011
1002
|
"props": {
|
|
1012
|
-
"
|
|
1013
|
-
"alignItems": "center",
|
|
1014
|
-
"flexDirection": "row",
|
|
1015
|
-
},
|
|
1016
|
-
"testID": undefined,
|
|
1017
|
-
},
|
|
1018
|
-
"type": "View",
|
|
1019
|
-
},
|
|
1020
|
-
{
|
|
1021
|
-
"$$typeof": Symbol(react.test.json),
|
|
1022
|
-
"children": null,
|
|
1023
|
-
"props": {
|
|
1003
|
+
"pointerEvents": "auto",
|
|
1024
1004
|
"style": {
|
|
1025
1005
|
"alignItems": "center",
|
|
1026
1006
|
"flexDirection": "row",
|
|
@@ -1031,7 +1011,9 @@ exports[`Field renders date field 1`] = `
|
|
|
1031
1011
|
},
|
|
1032
1012
|
],
|
|
1033
1013
|
"props": {
|
|
1014
|
+
"disabled": true,
|
|
1034
1015
|
"onLayout": [Function],
|
|
1016
|
+
"onPress": [Function],
|
|
1035
1017
|
"style": {
|
|
1036
1018
|
"alignItems": "center",
|
|
1037
1019
|
"backgroundColor": "#FFFFFF",
|
|
@@ -1044,9 +1026,8 @@ exports[`Field renders date field 1`] = `
|
|
|
1044
1026
|
"paddingHorizontal": 6,
|
|
1045
1027
|
"paddingVertical": 2,
|
|
1046
1028
|
},
|
|
1047
|
-
"testID": undefined,
|
|
1048
1029
|
},
|
|
1049
|
-
"type": "
|
|
1030
|
+
"type": "Pressable",
|
|
1050
1031
|
}
|
|
1051
1032
|
`;
|
|
1052
1033
|
|
|
@@ -1800,7 +1781,9 @@ exports[`Field renders time field 1`] = `
|
|
|
1800
1781
|
},
|
|
1801
1782
|
],
|
|
1802
1783
|
"props": {
|
|
1784
|
+
"disabled": true,
|
|
1803
1785
|
"onLayout": [Function],
|
|
1786
|
+
"onPress": [Function],
|
|
1804
1787
|
"style": {
|
|
1805
1788
|
"alignItems": "center",
|
|
1806
1789
|
"backgroundColor": "#FFFFFF",
|
|
@@ -1813,9 +1796,8 @@ exports[`Field renders time field 1`] = `
|
|
|
1813
1796
|
"paddingHorizontal": 6,
|
|
1814
1797
|
"paddingVertical": 2,
|
|
1815
1798
|
},
|
|
1816
|
-
"testID": undefined,
|
|
1817
1799
|
},
|
|
1818
|
-
"type": "
|
|
1800
|
+
"type": "Pressable",
|
|
1819
1801
|
}
|
|
1820
1802
|
`;
|
|
1821
1803
|
|
|
@@ -2039,6 +2021,7 @@ exports[`Field renders datetime field 1`] = `
|
|
|
2039
2021
|
},
|
|
2040
2022
|
],
|
|
2041
2023
|
"props": {
|
|
2024
|
+
"pointerEvents": "auto",
|
|
2042
2025
|
"style": {
|
|
2043
2026
|
"alignItems": "center",
|
|
2044
2027
|
"flexDirection": "row",
|
|
@@ -2806,7 +2789,9 @@ exports[`Field renders datetime field 1`] = `
|
|
|
2806
2789
|
},
|
|
2807
2790
|
],
|
|
2808
2791
|
"props": {
|
|
2792
|
+
"disabled": true,
|
|
2809
2793
|
"onLayout": [Function],
|
|
2794
|
+
"onPress": [Function],
|
|
2810
2795
|
"style": {
|
|
2811
2796
|
"alignItems": "center",
|
|
2812
2797
|
"backgroundColor": "#FFFFFF",
|
|
@@ -2819,9 +2804,8 @@ exports[`Field renders datetime field 1`] = `
|
|
|
2819
2804
|
"paddingHorizontal": 6,
|
|
2820
2805
|
"paddingVertical": 2,
|
|
2821
2806
|
},
|
|
2822
|
-
"testID": undefined,
|
|
2823
2807
|
},
|
|
2824
|
-
"type": "
|
|
2808
|
+
"type": "Pressable",
|
|
2825
2809
|
}
|
|
2826
2810
|
`;
|
|
2827
2811
|
|
|
@@ -7,28 +7,21 @@ exports[`Link renders correctly with href 1`] = `
|
|
|
7
7
|
{
|
|
8
8
|
"$$typeof": Symbol(react.test.json),
|
|
9
9
|
"children": [
|
|
10
|
-
|
|
11
|
-
"$$typeof": Symbol(react.test.json),
|
|
12
|
-
"children": [
|
|
13
|
-
"Click me",
|
|
14
|
-
],
|
|
15
|
-
"props": {
|
|
16
|
-
"numberOfLines": 0,
|
|
17
|
-
"selectable": undefined,
|
|
18
|
-
"style": {
|
|
19
|
-
"color": "#0A7092",
|
|
20
|
-
"fontFamily": "text-regular",
|
|
21
|
-
"fontSize": 14,
|
|
22
|
-
"textAlign": "left",
|
|
23
|
-
"textDecorationLine": "underline",
|
|
24
|
-
},
|
|
25
|
-
"testID": undefined,
|
|
26
|
-
},
|
|
27
|
-
"type": "Text",
|
|
28
|
-
},
|
|
10
|
+
"Click me",
|
|
29
11
|
],
|
|
30
|
-
"props": {
|
|
31
|
-
|
|
12
|
+
"props": {
|
|
13
|
+
"numberOfLines": 0,
|
|
14
|
+
"selectable": undefined,
|
|
15
|
+
"style": {
|
|
16
|
+
"color": "#0A7092",
|
|
17
|
+
"fontFamily": "text-regular",
|
|
18
|
+
"fontSize": 14,
|
|
19
|
+
"textAlign": "left",
|
|
20
|
+
"textDecorationLine": "underline",
|
|
21
|
+
},
|
|
22
|
+
"testID": undefined,
|
|
23
|
+
},
|
|
24
|
+
"type": "Text",
|
|
32
25
|
},
|
|
33
26
|
],
|
|
34
27
|
"props": {
|
|
@@ -21,7 +21,6 @@ exports[`Slider snapshots should match snapshot with default props 1`] = `
|
|
|
21
21
|
"thumbStyle": {
|
|
22
22
|
"backgroundColor": "white",
|
|
23
23
|
"borderRadius": 24,
|
|
24
|
-
"boxShadow": "0px 2px 4px rgba(0, 0, 0, 0.25)",
|
|
25
24
|
"elevation": 5,
|
|
26
25
|
"height": 48,
|
|
27
26
|
"width": 48,
|
|
@@ -133,7 +132,6 @@ exports[`Slider snapshots should match snapshot with title and showSelection 1`]
|
|
|
133
132
|
"thumbStyle": {
|
|
134
133
|
"backgroundColor": "white",
|
|
135
134
|
"borderRadius": 24,
|
|
136
|
-
"boxShadow": "0px 2px 4px rgba(0, 0, 0, 0.25)",
|
|
137
135
|
"elevation": 5,
|
|
138
136
|
"height": 48,
|
|
139
137
|
"width": 48,
|
|
@@ -191,7 +189,6 @@ exports[`Slider snapshots should match snapshot with labels 1`] = `
|
|
|
191
189
|
"thumbStyle": {
|
|
192
190
|
"backgroundColor": "white",
|
|
193
191
|
"borderRadius": 24,
|
|
194
|
-
"boxShadow": "0px 2px 4px rgba(0, 0, 0, 0.25)",
|
|
195
192
|
"elevation": 5,
|
|
196
193
|
"height": 48,
|
|
197
194
|
"width": 48,
|
|
@@ -363,7 +360,6 @@ exports[`Slider snapshots should match snapshot with inline labels 1`] = `
|
|
|
363
360
|
"thumbStyle": {
|
|
364
361
|
"backgroundColor": "white",
|
|
365
362
|
"borderRadius": 24,
|
|
366
|
-
"boxShadow": "0px 2px 4px rgba(0, 0, 0, 0.25)",
|
|
367
363
|
"elevation": 5,
|
|
368
364
|
"height": 48,
|
|
369
365
|
"width": 48,
|
|
@@ -505,7 +501,6 @@ exports[`Slider snapshots should match snapshot with helper text 1`] = `
|
|
|
505
501
|
"thumbStyle": {
|
|
506
502
|
"backgroundColor": "white",
|
|
507
503
|
"borderRadius": 24,
|
|
508
|
-
"boxShadow": "0px 2px 4px rgba(0, 0, 0, 0.25)",
|
|
509
504
|
"elevation": 5,
|
|
510
505
|
"height": 48,
|
|
511
506
|
"width": 48,
|
|
@@ -604,7 +599,6 @@ exports[`Slider snapshots should match snapshot with error text 1`] = `
|
|
|
604
599
|
"thumbStyle": {
|
|
605
600
|
"backgroundColor": "white",
|
|
606
601
|
"borderRadius": 24,
|
|
607
|
-
"boxShadow": "0px 2px 4px rgba(0, 0, 0, 0.25)",
|
|
608
602
|
"elevation": 5,
|
|
609
603
|
"height": 48,
|
|
610
604
|
"width": 48,
|
|
@@ -755,7 +749,6 @@ exports[`Slider snapshots should match snapshot when disabled 1`] = `
|
|
|
755
749
|
"thumbStyle": {
|
|
756
750
|
"backgroundColor": "white",
|
|
757
751
|
"borderRadius": 24,
|
|
758
|
-
"boxShadow": "0px 2px 4px rgba(0, 0, 0, 0.25)",
|
|
759
752
|
"elevation": 5,
|
|
760
753
|
"height": 48,
|
|
761
754
|
"width": 48,
|