@nordicsemiconductor/pc-nrfconnect-shared 120.0.0 → 121.0.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/Changelog.md CHANGED
@@ -7,6 +7,20 @@ This project does _not_ adhere to
7
7
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html) but contrary to it
8
8
  every new version is a new major version.
9
9
 
10
+ ## 121 - 2023-10-24
11
+
12
+ ### Added
13
+
14
+ - **NumberInputWithDropdown** component, which combines the
15
+ **NumberInlineInput** and the **Dropdown** components. Example usage found
16
+ in `Baudrate.tsx` in `pc-nrfconnect-serial-terminal`.
17
+
18
+ ### Fixed
19
+
20
+ - Device might end up stuck in device list of left event occurred while we are
21
+ waiting for device
22
+ - Device setup dialog is closed immediately pressing no to programming it
23
+
10
24
  ## 120 - 2023-10-13
11
25
 
12
26
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" ?>
2
2
  <!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
3
- <coverage lines-valid="3215" lines-covered="1792" line-rate="0.5573" branches-valid="1523" branches-covered="448" branch-rate="0.29410000000000003" timestamp="1697205972605" complexity="0" version="0.1">
3
+ <coverage lines-valid="3225" lines-covered="1793" line-rate="0.5559000000000001" branches-valid="1528" branches-covered="451" branch-rate="0.29510000000000003" timestamp="1698137886192" complexity="0" version="0.1">
4
4
  <sources>
5
5
  <source>/home/vsts/work/1/s</source>
6
6
  </sources>
@@ -1796,9 +1796,9 @@
1796
1796
  <line number="20" hits="114"/>
1797
1797
  </lines>
1798
1798
  </method>
1799
- <method name="(anonymous_4)" hits="242" signature="()V">
1799
+ <method name="(anonymous_4)" hits="243" signature="()V">
1800
1800
  <lines>
1801
- <line number="23" hits="242"/>
1801
+ <line number="23" hits="243"/>
1802
1802
  </lines>
1803
1803
  </method>
1804
1804
  <method name="(anonymous_5)" hits="57" signature="()V">
@@ -1830,7 +1830,7 @@
1830
1830
  <line number="18" hits="9" branch="false"/>
1831
1831
  <line number="20" hits="9" branch="false"/>
1832
1832
  <line number="21" hits="114" branch="true" condition-coverage="50% (1/2)"/>
1833
- <line number="23" hits="242" branch="true" condition-coverage="100% (1/1)"/>
1833
+ <line number="23" hits="243" branch="true" condition-coverage="100% (1/1)"/>
1834
1834
  <line number="25" hits="57" branch="true" condition-coverage="100% (1/1)"/>
1835
1835
  <line number="38" hits="9" branch="false"/>
1836
1836
  <line number="39" hits="57" branch="false"/>
@@ -2479,9 +2479,9 @@
2479
2479
  <classes>
2480
2480
  <class name="Button.tsx" filename="src/Button/Button.tsx" line-rate="1" branch-rate="0.7726999999999999">
2481
2481
  <methods>
2482
- <method name="(anonymous_2)" hits="88" signature="()V">
2482
+ <method name="(anonymous_2)" hits="86" signature="()V">
2483
2483
  <lines>
2484
- <line number="32" hits="88"/>
2484
+ <line number="32" hits="86"/>
2485
2485
  </lines>
2486
2486
  </method>
2487
2487
  </methods>
@@ -2489,8 +2489,8 @@
2489
2489
  <line number="7" hits="6" branch="false"/>
2490
2490
  <line number="9" hits="6" branch="false"/>
2491
2491
  <line number="32" hits="6" branch="false"/>
2492
- <line number="42" hits="88" branch="false"/>
2493
- <line number="74" hits="88" branch="false"/>
2492
+ <line number="42" hits="86" branch="false"/>
2493
+ <line number="74" hits="86" branch="false"/>
2494
2494
  </lines>
2495
2495
  </class>
2496
2496
  </classes>
@@ -2515,7 +2515,7 @@
2515
2515
  </class>
2516
2516
  </classes>
2517
2517
  </package>
2518
- <package name="src.Device" line-rate="0.37079999999999996" branch-rate="0.16949999999999998">
2518
+ <package name="src.Device" line-rate="0.3701" branch-rate="0.1705">
2519
2519
  <classes>
2520
2520
  <class name="deviceAutoSelectSlice.ts" filename="src/Device/deviceAutoSelectSlice.ts" line-rate="0.6111" branch-rate="0.2857">
2521
2521
  <methods>
@@ -2564,9 +2564,9 @@
2564
2564
  <line number="104" hits="0"/>
2565
2565
  </lines>
2566
2566
  </method>
2567
- <method name="(anonymous_29)" hits="78" signature="()V">
2567
+ <method name="(anonymous_29)" hits="80" signature="()V">
2568
2568
  <lines>
2569
- <line number="125" hits="78"/>
2569
+ <line number="125" hits="80"/>
2570
2570
  </lines>
2571
2571
  </method>
2572
2572
  <method name="(anonymous_30)" hits="67" signature="()V">
@@ -2646,7 +2646,7 @@
2646
2646
  <line number="121" hits="0" branch="false"/>
2647
2647
  <line number="123" hits="10" branch="false"/>
2648
2648
  <line number="125" hits="46" branch="false"/>
2649
- <line number="126" hits="78" branch="false"/>
2649
+ <line number="126" hits="80" branch="false"/>
2650
2650
  <line number="128" hits="26" branch="false"/>
2651
2651
  <line number="129" hits="67" branch="false"/>
2652
2652
  <line number="131" hits="72" branch="false"/>
@@ -2667,7 +2667,7 @@
2667
2667
  <line number="153" hits="8" branch="false"/>
2668
2668
  </lines>
2669
2669
  </class>
2670
- <class name="deviceLister.ts" filename="src/Device/deviceLister.ts" line-rate="0.3148" branch-rate="0.09699999999999999">
2670
+ <class name="deviceLister.ts" filename="src/Device/deviceLister.ts" line-rate="0.3063" branch-rate="0.099">
2671
2671
  <methods>
2672
2672
  <method name="(anonymous_7)" hits="0" signature="()V">
2673
2673
  <lines>
@@ -2831,7 +2831,10 @@
2831
2831
  <line number="144" hits="0" branch="false"/>
2832
2832
  <line number="145" hits="0" branch="true" condition-coverage="0% (0/1)"/>
2833
2833
  <line number="149" hits="0" branch="false"/>
2834
- <line number="152" hits="0" branch="true" condition-coverage="0% (0/1)"/>
2834
+ <line number="150" hits="0" branch="false"/>
2835
+ <line number="151" hits="0" branch="false"/>
2836
+ <line number="154" hits="0" branch="false"/>
2837
+ <line number="156" hits="0" branch="true" condition-coverage="0% (0/1)"/>
2835
2838
  <line number="157" hits="0" branch="false"/>
2836
2839
  <line number="160" hits="0" branch="true" condition-coverage="0% (0/1)"/>
2837
2840
  <line number="161" hits="0" branch="false"/>
@@ -2901,7 +2904,7 @@
2901
2904
  <line number="373" hits="1" branch="true" condition-coverage="100% (2/2)"/>
2902
2905
  </lines>
2903
2906
  </class>
2904
- <class name="deviceSetup.ts" filename="src/Device/deviceSetup.ts" line-rate="0.6933" branch-rate="0.409">
2907
+ <class name="deviceSetup.ts" filename="src/Device/deviceSetup.ts" line-rate="0.6973" branch-rate="0.409">
2905
2908
  <methods>
2906
2909
  <method name="(anonymous_5)" hits="4" signature="()V">
2907
2910
  <lines>
@@ -2945,32 +2948,32 @@
2945
2948
  </method>
2946
2949
  <method name="(anonymous_13)" hits="1" signature="()V">
2947
2950
  <lines>
2948
- <line number="183" hits="1"/>
2951
+ <line number="184" hits="1"/>
2949
2952
  </lines>
2950
2953
  </method>
2951
2954
  <method name="(anonymous_14)" hits="0" signature="()V">
2952
2955
  <lines>
2953
- <line number="208" hits="0"/>
2956
+ <line number="209" hits="0"/>
2954
2957
  </lines>
2955
2958
  </method>
2956
2959
  <method name="(anonymous_15)" hits="4" signature="()V">
2957
2960
  <lines>
2958
- <line number="225" hits="4"/>
2961
+ <line number="226" hits="4"/>
2959
2962
  </lines>
2960
2963
  </method>
2961
2964
  <method name="(anonymous_16)" hits="4" signature="()V">
2962
2965
  <lines>
2963
- <line number="231" hits="4"/>
2966
+ <line number="232" hits="4"/>
2964
2967
  </lines>
2965
2968
  </method>
2966
2969
  <method name="(anonymous_17)" hits="2" signature="()V">
2967
2970
  <lines>
2968
- <line number="239" hits="2"/>
2971
+ <line number="240" hits="2"/>
2969
2972
  </lines>
2970
2973
  </method>
2971
2974
  <method name="(anonymous_18)" hits="1" signature="()V">
2972
2975
  <lines>
2973
- <line number="250" hits="1"/>
2976
+ <line number="251" hits="1"/>
2974
2977
  </lines>
2975
2978
  </method>
2976
2979
  </methods>
@@ -3020,36 +3023,37 @@
3020
3023
  <line number="157" hits="1" branch="false"/>
3021
3024
  <line number="158" hits="1" branch="false"/>
3022
3025
  <line number="159" hits="1" branch="false"/>
3023
- <line number="161" hits="1" branch="false"/>
3024
- <line number="164" hits="1" branch="true" condition-coverage="0% (0/1)"/>
3025
- <line number="165" hits="0" branch="false"/>
3026
+ <line number="160" hits="1" branch="false"/>
3027
+ <line number="162" hits="1" branch="false"/>
3028
+ <line number="165" hits="1" branch="true" condition-coverage="0% (0/1)"/>
3026
3029
  <line number="166" hits="0" branch="false"/>
3027
- <line number="169" hits="0" branch="false"/>
3030
+ <line number="167" hits="0" branch="false"/>
3028
3031
  <line number="170" hits="0" branch="false"/>
3029
- <line number="173" hits="1" branch="false"/>
3030
- <line number="176" hits="1" branch="false"/>
3031
- <line number="179" hits="2" branch="true" condition-coverage="50% (1/2)"/>
3032
+ <line number="171" hits="0" branch="false"/>
3033
+ <line number="174" hits="1" branch="false"/>
3034
+ <line number="177" hits="1" branch="false"/>
3032
3035
  <line number="180" hits="2" branch="true" condition-coverage="50% (1/2)"/>
3033
- <line number="181" hits="2" branch="false"/>
3034
- <line number="184" hits="1" branch="true" condition-coverage="50% (1/2)"/>
3035
- <line number="185" hits="1" branch="false"/>
3036
- <line number="187" hits="0" branch="false"/>
3037
- <line number="196" hits="0" branch="false"/>
3038
- <line number="203" hits="0" branch="false"/>
3039
- <line number="206" hits="0" branch="false"/>
3040
- <line number="209" hits="0" branch="true" condition-coverage="0% (0/2)"/>
3041
- <line number="210" hits="0" branch="false"/>
3042
- <line number="212" hits="0" branch="true" condition-coverage="0% (0/4)"/>
3043
- <line number="224" hits="4" branch="false"/>
3044
- <line number="225" hits="1" branch="false"/>
3045
- <line number="231" hits="4" branch="false"/>
3036
+ <line number="181" hits="2" branch="true" condition-coverage="50% (1/2)"/>
3037
+ <line number="182" hits="2" branch="false"/>
3038
+ <line number="185" hits="1" branch="true" condition-coverage="50% (1/2)"/>
3039
+ <line number="186" hits="1" branch="false"/>
3040
+ <line number="188" hits="0" branch="false"/>
3041
+ <line number="197" hits="0" branch="false"/>
3042
+ <line number="204" hits="0" branch="false"/>
3043
+ <line number="207" hits="0" branch="false"/>
3044
+ <line number="210" hits="0" branch="true" condition-coverage="0% (0/2)"/>
3045
+ <line number="211" hits="0" branch="false"/>
3046
+ <line number="213" hits="0" branch="true" condition-coverage="0% (0/4)"/>
3047
+ <line number="225" hits="4" branch="false"/>
3048
+ <line number="226" hits="1" branch="false"/>
3046
3049
  <line number="232" hits="4" branch="false"/>
3047
- <line number="243" hits="2" branch="true" condition-coverage="100% (1/1)"/>
3048
- <line number="247" hits="2" branch="false"/>
3049
- <line number="251" hits="1" branch="false"/>
3050
+ <line number="233" hits="4" branch="false"/>
3051
+ <line number="244" hits="2" branch="true" condition-coverage="100% (1/1)"/>
3052
+ <line number="248" hits="2" branch="false"/>
3050
3053
  <line number="252" hits="1" branch="false"/>
3051
- <line number="255" hits="1" branch="false"/>
3054
+ <line number="253" hits="1" branch="false"/>
3052
3055
  <line number="256" hits="1" branch="false"/>
3056
+ <line number="257" hits="1" branch="false"/>
3053
3057
  </lines>
3054
3058
  </class>
3055
3059
  <class name="deviceSetupSlice.ts" filename="src/Device/deviceSetupSlice.ts" line-rate="0.8125" branch-rate="1">
@@ -3064,9 +3068,9 @@
3064
3068
  <line number="33" hits="2"/>
3065
3069
  </lines>
3066
3070
  </method>
3067
- <method name="(anonymous_16)" hits="3" signature="()V">
3071
+ <method name="(anonymous_16)" hits="4" signature="()V">
3068
3072
  <lines>
3069
- <line number="46" hits="3"/>
3073
+ <line number="46" hits="4"/>
3070
3074
  </lines>
3071
3075
  </method>
3072
3076
  <method name="(anonymous_17)" hits="0" signature="()V">
@@ -3089,29 +3093,29 @@
3089
3093
  <line number="60" hits="1"/>
3090
3094
  </lines>
3091
3095
  </method>
3092
- <method name="(anonymous_21)" hits="68" signature="()V">
3096
+ <method name="(anonymous_21)" hits="67" signature="()V">
3093
3097
  <lines>
3094
- <line number="78" hits="68"/>
3098
+ <line number="78" hits="67"/>
3095
3099
  </lines>
3096
3100
  </method>
3097
- <method name="(anonymous_22)" hits="71" signature="()V">
3101
+ <method name="(anonymous_22)" hits="70" signature="()V">
3098
3102
  <lines>
3099
- <line number="81" hits="71"/>
3103
+ <line number="81" hits="70"/>
3100
3104
  </lines>
3101
3105
  </method>
3102
- <method name="(anonymous_23)" hits="68" signature="()V">
3106
+ <method name="(anonymous_23)" hits="67" signature="()V">
3103
3107
  <lines>
3104
- <line number="84" hits="68"/>
3108
+ <line number="84" hits="67"/>
3105
3109
  </lines>
3106
3110
  </method>
3107
- <method name="(anonymous_24)" hits="71" signature="()V">
3111
+ <method name="(anonymous_24)" hits="70" signature="()V">
3108
3112
  <lines>
3109
- <line number="87" hits="71"/>
3113
+ <line number="87" hits="70"/>
3110
3114
  </lines>
3111
3115
  </method>
3112
- <method name="(anonymous_25)" hits="68" signature="()V">
3116
+ <method name="(anonymous_25)" hits="67" signature="()V">
3113
3117
  <lines>
3114
- <line number="90" hits="68"/>
3118
+ <line number="90" hits="67"/>
3115
3119
  </lines>
3116
3120
  </method>
3117
3121
  <method name="(anonymous_26)" hits="67" signature="()V">
@@ -3128,30 +3132,30 @@
3128
3132
  <line number="42" hits="2" branch="false"/>
3129
3133
  <line number="43" hits="2" branch="false"/>
3130
3134
  <line number="44" hits="2" branch="false"/>
3131
- <line number="46" hits="3" branch="false"/>
3135
+ <line number="46" hits="4" branch="false"/>
3132
3136
  <line number="49" hits="0" branch="false"/>
3133
3137
  <line number="52" hits="0" branch="false"/>
3134
3138
  <line number="58" hits="0" branch="false"/>
3135
3139
  <line number="61" hits="1" branch="false"/>
3136
3140
  <line number="67" hits="57" branch="false"/>
3137
3141
  <line number="69" hits="2" branch="false"/>
3138
- <line number="70" hits="3" branch="false"/>
3142
+ <line number="70" hits="4" branch="false"/>
3139
3143
  <line number="71" hits="0" branch="false"/>
3140
3144
  <line number="72" hits="0" branch="false"/>
3141
3145
  <line number="73" hits="0" branch="false"/>
3142
3146
  <line number="74" hits="1" branch="false"/>
3143
3147
  <line number="76" hits="10" branch="false"/>
3144
- <line number="78" hits="30" branch="false"/>
3145
- <line number="79" hits="68" branch="false"/>
3146
- <line number="81" hits="30" branch="false"/>
3147
- <line number="82" hits="71" branch="false"/>
3148
- <line number="84" hits="30" branch="false"/>
3149
- <line number="85" hits="68" branch="false"/>
3150
- <line number="87" hits="30" branch="false"/>
3151
- <line number="88" hits="71" branch="false"/>
3152
- <line number="90" hits="30" branch="false"/>
3153
- <line number="91" hits="68" branch="false"/>
3154
- <line number="93" hits="30" branch="false"/>
3148
+ <line number="78" hits="29" branch="false"/>
3149
+ <line number="79" hits="67" branch="false"/>
3150
+ <line number="81" hits="29" branch="false"/>
3151
+ <line number="82" hits="70" branch="false"/>
3152
+ <line number="84" hits="29" branch="false"/>
3153
+ <line number="85" hits="67" branch="false"/>
3154
+ <line number="87" hits="29" branch="false"/>
3155
+ <line number="88" hits="70" branch="false"/>
3156
+ <line number="90" hits="29" branch="false"/>
3157
+ <line number="91" hits="67" branch="false"/>
3158
+ <line number="93" hits="29" branch="false"/>
3155
3159
  <line number="94" hits="67" branch="false"/>
3156
3160
  </lines>
3157
3161
  </class>
@@ -3242,9 +3246,9 @@
3242
3246
  <line number="221" hits="75"/>
3243
3247
  </lines>
3244
3248
  </method>
3245
- <method name="(anonymous_35)" hits="31" signature="()V">
3249
+ <method name="(anonymous_35)" hits="32" signature="()V">
3246
3250
  <lines>
3247
- <line number="224" hits="31"/>
3251
+ <line number="224" hits="32"/>
3248
3252
  </lines>
3249
3253
  </method>
3250
3254
  <method name="(anonymous_36)" hits="10" signature="()V">
@@ -3324,7 +3328,7 @@
3324
3328
  <line number="221" hits="27" branch="false"/>
3325
3329
  <line number="222" hits="75" branch="false"/>
3326
3330
  <line number="224" hits="10" branch="false"/>
3327
- <line number="225" hits="31" branch="true" condition-coverage="100% (2/2)"/>
3331
+ <line number="225" hits="32" branch="true" condition-coverage="100% (2/2)"/>
3328
3332
  <line number="229" hits="10" branch="false"/>
3329
3333
  <line number="230" hits="28" branch="false"/>
3330
3334
  <line number="231" hits="85" branch="false"/>
@@ -4774,9 +4778,9 @@
4774
4778
  <classes>
4775
4779
  <class name="DeviceSetupView.tsx" filename="src/Device/DeviceSetup/DeviceSetupView.tsx" line-rate="0.8" branch-rate="0.7058">
4776
4780
  <methods>
4777
- <method name="(anonymous_5)" hits="30" signature="()V">
4781
+ <method name="(anonymous_5)" hits="29" signature="()V">
4778
4782
  <lines>
4779
- <line number="23" hits="30"/>
4783
+ <line number="23" hits="29"/>
4780
4784
  </lines>
4781
4785
  </method>
4782
4786
  <method name="(anonymous_6)" hits="0" signature="()V">
@@ -4808,16 +4812,16 @@
4808
4812
  <line number="12" hits="1" branch="false"/>
4809
4813
  <line number="21" hits="1" branch="false"/>
4810
4814
  <line number="23" hits="26" branch="false"/>
4811
- <line number="24" hits="30" branch="false"/>
4812
- <line number="25" hits="30" branch="false"/>
4813
- <line number="26" hits="30" branch="false"/>
4814
- <line number="27" hits="30" branch="false"/>
4815
- <line number="28" hits="30" branch="false"/>
4816
- <line number="29" hits="30" branch="false"/>
4817
- <line number="30" hits="30" branch="false"/>
4818
- <line number="31" hits="30" branch="false"/>
4819
- <line number="33" hits="30" branch="false"/>
4820
- <line number="35" hits="30" branch="false"/>
4815
+ <line number="24" hits="29" branch="false"/>
4816
+ <line number="25" hits="29" branch="false"/>
4817
+ <line number="26" hits="29" branch="false"/>
4818
+ <line number="27" hits="29" branch="false"/>
4819
+ <line number="28" hits="29" branch="false"/>
4820
+ <line number="29" hits="29" branch="false"/>
4821
+ <line number="30" hits="29" branch="false"/>
4822
+ <line number="31" hits="29" branch="false"/>
4823
+ <line number="33" hits="29" branch="false"/>
4824
+ <line number="35" hits="29" branch="false"/>
4821
4825
  <line number="51" hits="0" branch="false"/>
4822
4826
  <line number="56" hits="0" branch="false"/>
4823
4827
  <line number="79" hits="0" branch="true" condition-coverage="0% (0/1)"/>
@@ -4908,9 +4912,9 @@
4908
4912
  <classes>
4909
4913
  <class name="Dialog.tsx" filename="src/Dialog/Dialog.tsx" line-rate="0.84" branch-rate="0.6764">
4910
4914
  <methods>
4911
- <method name="(anonymous_8)" hits="68" signature="()V">
4915
+ <method name="(anonymous_8)" hits="67" signature="()V">
4912
4916
  <lines>
4913
- <line number="28" hits="68"/>
4917
+ <line number="28" hits="67"/>
4914
4918
  </lines>
4915
4919
  </method>
4916
4920
  <method name="(anonymous_9)" hits="0" signature="()V">
@@ -4928,19 +4932,19 @@
4928
4932
  <line number="46" hits="0"/>
4929
4933
  </lines>
4930
4934
  </method>
4931
- <method name="(anonymous_13)" hits="27" signature="()V">
4935
+ <method name="(anonymous_13)" hits="26" signature="()V">
4932
4936
  <lines>
4933
- <line number="80" hits="27"/>
4937
+ <line number="80" hits="26"/>
4934
4938
  </lines>
4935
4939
  </method>
4936
- <method name="(anonymous_14)" hits="27" signature="()V">
4940
+ <method name="(anonymous_14)" hits="26" signature="()V">
4937
4941
  <lines>
4938
- <line number="84" hits="27"/>
4942
+ <line number="84" hits="26"/>
4939
4943
  </lines>
4940
4944
  </method>
4941
- <method name="(anonymous_15)" hits="44" signature="()V">
4945
+ <method name="(anonymous_15)" hits="42" signature="()V">
4942
4946
  <lines>
4943
- <line number="98" hits="44"/>
4947
+ <line number="98" hits="42"/>
4944
4948
  </lines>
4945
4949
  </method>
4946
4950
  <method name="(anonymous_16)" hits="6" signature="()V">
@@ -4975,18 +4979,18 @@
4975
4979
  <line number="10" hits="6" branch="false"/>
4976
4980
  <line number="11" hits="6" branch="false"/>
4977
4981
  <line number="13" hits="6" branch="false"/>
4978
- <line number="28" hits="248" branch="false"/>
4979
- <line number="37" hits="68" branch="false"/>
4982
+ <line number="28" hits="244" branch="false"/>
4983
+ <line number="37" hits="67" branch="false"/>
4980
4984
  <line number="39" hits="0" branch="true" condition-coverage="0% (0/3)"/>
4981
4985
  <line number="40" hits="0" branch="false"/>
4982
4986
  <line number="47" hits="0" branch="true" condition-coverage="0% (0/3)"/>
4983
4987
  <line number="48" hits="0" branch="false"/>
4984
4988
  <line number="80" hits="6" branch="false"/>
4985
- <line number="81" hits="27" branch="false"/>
4989
+ <line number="81" hits="26" branch="false"/>
4986
4990
  <line number="84" hits="6" branch="false"/>
4987
- <line number="85" hits="27" branch="false"/>
4988
- <line number="98" hits="113" branch="false"/>
4989
- <line number="105" hits="44" branch="false"/>
4991
+ <line number="85" hits="26" branch="false"/>
4992
+ <line number="98" hits="111" branch="false"/>
4993
+ <line number="105" hits="42" branch="false"/>
4990
4994
  <line number="125" hits="6" branch="false"/>
4991
4995
  <line number="138" hits="6" branch="false"/>
4992
4996
  <line number="162" hits="6" branch="false"/>
@@ -5659,9 +5663,9 @@
5659
5663
  </class>
5660
5664
  </classes>
5661
5665
  </package>
5662
- <package name="src.InlineInput" line-rate="0.3333" branch-rate="0.25">
5666
+ <package name="src.InlineInput" line-rate="0.3" branch-rate="0.2857">
5663
5667
  <classes>
5664
- <class name="InlineInput.tsx" filename="src/InlineInput/InlineInput.tsx" line-rate="0.3333" branch-rate="0.25">
5668
+ <class name="InlineInput.tsx" filename="src/InlineInput/InlineInput.tsx" line-rate="0.3" branch-rate="0.2857">
5665
5669
  <methods>
5666
5670
  <method name="(anonymous_5)" hits="28" signature="()V">
5667
5671
  <lines>
@@ -5675,62 +5679,62 @@
5675
5679
  </method>
5676
5680
  <method name="(anonymous_7)" hits="28" signature="()V">
5677
5681
  <lines>
5678
- <line number="63" hits="28"/>
5682
+ <line number="66" hits="28"/>
5679
5683
  </lines>
5680
5684
  </method>
5681
5685
  <method name="(anonymous_8)" hits="0" signature="()V">
5682
5686
  <lines>
5683
- <line number="67" hits="0"/>
5687
+ <line number="70" hits="0"/>
5684
5688
  </lines>
5685
5689
  </method>
5686
5690
  <method name="(anonymous_9)" hits="0" signature="()V">
5687
5691
  <lines>
5688
- <line number="69" hits="0"/>
5692
+ <line number="72" hits="0"/>
5689
5693
  </lines>
5690
5694
  </method>
5691
5695
  <method name="(anonymous_10)" hits="0" signature="()V">
5692
5696
  <lines>
5693
- <line number="70" hits="0"/>
5697
+ <line number="73" hits="0"/>
5694
5698
  </lines>
5695
5699
  </method>
5696
5700
  <method name="(anonymous_11)" hits="0" signature="()V">
5697
5701
  <lines>
5698
- <line number="71" hits="0"/>
5702
+ <line number="74" hits="0"/>
5699
5703
  </lines>
5700
5704
  </method>
5701
5705
  <method name="(anonymous_12)" hits="0" signature="()V">
5702
5706
  <lines>
5703
- <line number="79" hits="0"/>
5707
+ <line number="86" hits="0"/>
5704
5708
  </lines>
5705
5709
  </method>
5706
5710
  <method name="(anonymous_13)" hits="0" signature="()V">
5707
5711
  <lines>
5708
- <line number="92" hits="0"/>
5712
+ <line number="104" hits="0"/>
5709
5713
  </lines>
5710
5714
  </method>
5711
5715
  <method name="(anonymous_14)" hits="0" signature="()V">
5712
5716
  <lines>
5713
- <line number="107" hits="0"/>
5717
+ <line number="126" hits="0"/>
5714
5718
  </lines>
5715
5719
  </method>
5716
5720
  <method name="(anonymous_15)" hits="0" signature="()V">
5717
5721
  <lines>
5718
- <line number="122" hits="0"/>
5722
+ <line number="141" hits="0"/>
5719
5723
  </lines>
5720
5724
  </method>
5721
5725
  <method name="(anonymous_16)" hits="0" signature="()V">
5722
5726
  <lines>
5723
- <line number="138" hits="0"/>
5727
+ <line number="157" hits="0"/>
5724
5728
  </lines>
5725
5729
  </method>
5726
5730
  <method name="(anonymous_17)" hits="0" signature="()V">
5727
5731
  <lines>
5728
- <line number="157" hits="0"/>
5732
+ <line number="179" hits="0"/>
5729
5733
  </lines>
5730
5734
  </method>
5731
5735
  <method name="(anonymous_18)" hits="0" signature="()V">
5732
5736
  <lines>
5733
- <line number="160" hits="0"/>
5737
+ <line number="182" hits="0"/>
5734
5738
  </lines>
5735
5739
  </method>
5736
5740
  </methods>
@@ -5745,50 +5749,56 @@
5745
5749
  <line number="44" hits="0" branch="false"/>
5746
5750
  <line number="45" hits="0" branch="false"/>
5747
5751
  <line number="48" hits="28" branch="false"/>
5748
- <line number="62" hits="1" branch="false"/>
5749
- <line number="67" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5750
- <line number="70" hits="0" branch="true" condition-coverage="100% (1/1)"/>
5751
- <line number="71" hits="0" branch="true" condition-coverage="100% (1/1)"/>
5752
- <line number="76" hits="28" branch="false"/>
5753
- <line number="77" hits="28" branch="false"/>
5754
- <line number="78" hits="28" branch="false"/>
5755
- <line number="79" hits="28" branch="false"/>
5756
- <line number="80" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5757
- <line number="81" hits="0" branch="false"/>
5758
- <line number="84" hits="0" branch="false"/>
5759
- <line number="85" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5760
- <line number="86" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5761
- <line number="87" hits="0" branch="false"/>
5762
- <line number="92" hits="28" branch="false"/>
5763
- <line number="93" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5764
- <line number="94" hits="0" branch="false"/>
5765
- <line number="97" hits="0" branch="true" condition-coverage="0% (0/2)"/>
5752
+ <line number="65" hits="1" branch="false"/>
5753
+ <line number="70" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5754
+ <line number="73" hits="0" branch="true" condition-coverage="100% (1/1)"/>
5755
+ <line number="74" hits="0" branch="true" condition-coverage="100% (1/1)"/>
5756
+ <line number="82" hits="28" branch="false"/>
5757
+ <line number="83" hits="28" branch="false"/>
5758
+ <line number="84" hits="28" branch="false"/>
5759
+ <line number="86" hits="28" branch="false"/>
5760
+ <line number="87" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5761
+ <line number="88" hits="0" branch="false"/>
5762
+ <line number="91" hits="0" branch="false"/>
5763
+ <line number="92" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5764
+ <line number="93" hits="0" branch="false"/>
5765
+ <line number="96" hits="0" branch="false"/>
5766
+ <line number="97" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5766
5767
  <line number="98" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5767
5768
  <line number="99" hits="0" branch="false"/>
5768
- <line number="100" hits="0" branch="false"/>
5769
- <line number="103" hits="0" branch="false"/>
5770
- <line number="107" hits="28" branch="false"/>
5771
- <line number="108" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5769
+ <line number="104" hits="28" branch="false"/>
5770
+ <line number="105" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5771
+ <line number="106" hits="0" branch="false"/>
5772
5772
  <line number="109" hits="0" branch="false"/>
5773
- <line number="112" hits="0" branch="false"/>
5774
- <line number="114" hits="0" branch="true" condition-coverage="0% (0/3)"/>
5775
- <line number="115" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5776
- <line number="116" hits="0" branch="false"/>
5773
+ <line number="111" hits="0" branch="true" condition-coverage="0% (0/2)"/>
5774
+ <line number="112" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5775
+ <line number="113" hits="0" branch="false"/>
5776
+ <line number="114" hits="0" branch="false"/>
5777
5777
  <line number="117" hits="0" branch="false"/>
5778
- <line number="122" hits="28" branch="false"/>
5779
- <line number="123" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5780
- <line number="124" hits="0" branch="false"/>
5781
- <line number="127" hits="0" branch="false"/>
5782
- <line number="129" hits="0" branch="true" condition-coverage="0% (0/2)"/>
5778
+ <line number="121" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5779
+ <line number="122" hits="0" branch="false"/>
5780
+ <line number="126" hits="28" branch="false"/>
5781
+ <line number="127" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5782
+ <line number="128" hits="0" branch="false"/>
5783
5783
  <line number="131" hits="0" branch="false"/>
5784
- <line number="132" hits="0" branch="false"/>
5785
- <line number="134" hits="0" branch="false"/>
5784
+ <line number="133" hits="0" branch="true" condition-coverage="0% (0/3)"/>
5785
+ <line number="134" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5786
5786
  <line number="135" hits="0" branch="false"/>
5787
- <line number="138" hits="28" branch="false"/>
5788
- <line number="139" hits="0" branch="false"/>
5787
+ <line number="136" hits="0" branch="false"/>
5788
+ <line number="141" hits="28" branch="false"/>
5789
+ <line number="142" hits="0" branch="true" condition-coverage="0% (0/1)"/>
5790
+ <line number="143" hits="0" branch="false"/>
5791
+ <line number="146" hits="0" branch="false"/>
5792
+ <line number="148" hits="0" branch="true" condition-coverage="0% (0/2)"/>
5793
+ <line number="150" hits="0" branch="false"/>
5794
+ <line number="151" hits="0" branch="false"/>
5795
+ <line number="153" hits="0" branch="false"/>
5796
+ <line number="154" hits="0" branch="false"/>
5797
+ <line number="157" hits="28" branch="false"/>
5789
5798
  <line number="158" hits="0" branch="false"/>
5790
- <line number="160" hits="0" branch="false"/>
5791
- <line number="170" hits="28" branch="false"/>
5799
+ <line number="180" hits="0" branch="false"/>
5800
+ <line number="182" hits="0" branch="false"/>
5801
+ <line number="192" hits="28" branch="false"/>
5792
5802
  </lines>
5793
5803
  </class>
5794
5804
  </classes>
@@ -7470,21 +7480,21 @@
7470
7480
  </class>
7471
7481
  <class name="classNames.ts" filename="src/utils/classNames.ts" line-rate="1" branch-rate="1">
7472
7482
  <methods>
7473
- <method name="(anonymous_1)" hits="1694" signature="()V">
7483
+ <method name="(anonymous_1)" hits="1698" signature="()V">
7474
7484
  <lines>
7475
- <line number="7" hits="1694"/>
7485
+ <line number="7" hits="1698"/>
7476
7486
  </lines>
7477
7487
  </method>
7478
- <method name="(anonymous_2)" hits="340" signature="()V">
7488
+ <method name="(anonymous_2)" hits="338" signature="()V">
7479
7489
  <lines>
7480
- <line number="24" hits="340"/>
7490
+ <line number="24" hits="338"/>
7481
7491
  </lines>
7482
7492
  </method>
7483
7493
  </methods>
7484
7494
  <lines>
7485
- <line number="7" hits="1694" branch="false"/>
7486
- <line number="24" hits="340" branch="false"/>
7487
- <line number="25" hits="340" branch="false"/>
7495
+ <line number="7" hits="1698" branch="false"/>
7496
+ <line number="24" hits="338" branch="false"/>
7497
+ <line number="25" hits="338" branch="false"/>
7488
7498
  </lines>
7489
7499
  </class>
7490
7500
  <class name="colors.ts" filename="src/utils/colors.ts" line-rate="1" branch-rate="1">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nordicsemiconductor/pc-nrfconnect-shared",
3
- "version": "120.0.0",
3
+ "version": "121.0.0",
4
4
  "description": "Shared commodities for developing pc-nrfconnect-* packages",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,7 +19,6 @@ body,
19
19
  body {
20
20
  -webkit-user-select: none;
21
21
  -webkit-app-region: drag;
22
- cursor: default;
23
22
  }
24
23
 
25
24
  .modal-content {
@@ -5,12 +5,7 @@
5
5
  */
6
6
 
7
7
  import React from 'react';
8
- import {
9
- fireEvent,
10
- screen,
11
- waitFor,
12
- waitForElementToBeRemoved,
13
- } from '@testing-library/react';
8
+ import { fireEvent, screen, waitFor } from '@testing-library/react';
14
9
 
15
10
  import render from '../../../test/testrenderer';
16
11
  import { addDevice, Device, removeDevice } from '../deviceSlice';
@@ -337,14 +332,19 @@ describe('DeviceSelector', () => {
337
332
 
338
333
  fireEvent.click(screen.getByText('Select device'));
339
334
  fireEvent.click(screen.getByText(testDevice.serialNumber));
340
- await screen.findByText('No');
335
+
336
+ await screen.findByText(
337
+ 'Device must be programmed, do you want to proceed?'
338
+ );
339
+
341
340
  fireEvent.click(screen.getByText('No'));
342
341
 
343
- await waitForElementToBeRemoved(() =>
342
+ expect(
344
343
  screen.queryByText(
345
344
  'Device must be programmed, do you want to proceed?'
346
345
  )
347
- );
346
+ ).toBeNull();
347
+
348
348
  expect(screen.getAllByText(testDevice.serialNumber)).toHaveLength(2);
349
349
  });
350
350
  });
@@ -59,10 +59,10 @@ export default ({
59
59
  const showSelectedDevice = deviceIsSelected || waitingToAutoReconnect;
60
60
 
61
61
  const doDeselectDevice = useCallback(() => {
62
- onDeviceDeselected();
63
- dispatch(deselectDevice());
64
62
  dispatch(clearWaitForDevice());
65
63
  dispatch(setAutoSelectDevice(undefined));
64
+ onDeviceDeselected();
65
+ dispatch(deselectDevice());
66
66
  }, [dispatch, onDeviceDeselected]);
67
67
 
68
68
  // Ensure that useCallback is
@@ -143,17 +143,17 @@ const removeDeviceFromList =
143
143
  ): AppThunk =>
144
144
  (dispatch, getState) => {
145
145
  if (
146
- removedDevice.serialNumber ===
146
+ removedDevice.serialNumber !==
147
147
  getState().device.selectedSerialNumber
148
148
  ) {
149
- onDeviceDeselected();
149
+ dispatch(removeDevice(removedDevice));
150
+ onDeviceDisconnected(removedDevice);
151
+ return;
150
152
  }
151
153
 
152
- if (
153
- removedDevice.serialNumber ===
154
- getState().device.selectedSerialNumber &&
155
- !getState().deviceAutoSelect.waitForDevice
156
- ) {
154
+ onDeviceDeselected();
155
+
156
+ if (!getState().deviceAutoSelect.waitForDevice) {
157
157
  dispatch(closeDeviceSetupDialog());
158
158
  }
159
159
 
@@ -153,6 +153,7 @@ export const prepareDevice =
153
153
  };
154
154
 
155
155
  const cancelAction = async () => {
156
+ dispatch(closeDeviceSetupDialog());
156
157
  let i = 0;
157
158
  do {
158
159
  const deviceSetup = validDeviceSetups[i];
@@ -11,9 +11,9 @@ import classNames from '../utils/classNames';
11
11
 
12
12
  import styles from './Dropdown.module.scss';
13
13
 
14
- export interface DropdownItem {
14
+ export interface DropdownItem<T = string> {
15
15
  label: React.ReactNode;
16
- value: string;
16
+ value: T;
17
17
  }
18
18
 
19
19
  export interface DropdownProps {
@@ -57,6 +57,9 @@ interface Props {
57
57
  onKeyboardIncrementAction?: () => string;
58
58
  onKeyboardDecrementAction?: () => string;
59
59
  className?: string;
60
+ textAlignLeft?: boolean;
61
+ onValidityChanged?: (validity: boolean) => void;
62
+ preventDefaultInvalidStyle?: boolean;
60
63
  }
61
64
 
62
65
  const InlineInput = React.forwardRef<HTMLInputElement, Props>(
@@ -70,19 +73,28 @@ const InlineInput = React.forwardRef<HTMLInputElement, Props>(
70
73
  onKeyboardIncrementAction = () => externalValue,
71
74
  onKeyboardDecrementAction = () => externalValue,
72
75
  className = '',
76
+ textAlignLeft = false,
77
+ onValidityChanged,
78
+ preventDefaultInvalidStyle,
73
79
  },
74
80
  ref
75
81
  ) => {
76
82
  const [internalValue, setInternalValue] = useState(externalValue);
77
83
  const [initialValue, setInitialValue] = useState(externalValue);
78
84
  useSynchronisationIfChangedFromOutside(externalValue, setInternalValue);
85
+
79
86
  const onChangeIfValid = (newValue: string) => {
80
87
  if (disabled) {
81
88
  return;
82
89
  }
83
90
 
91
+ const validity = isValid(newValue);
92
+ if (onValidityChanged != null) {
93
+ onValidityChanged(validity);
94
+ }
95
+
84
96
  setInternalValue(newValue);
85
- if (isValid(newValue)) {
97
+ if (validity) {
86
98
  if (externalValue !== newValue) {
87
99
  onChange(newValue);
88
100
  }
@@ -94,7 +106,9 @@ const InlineInput = React.forwardRef<HTMLInputElement, Props>(
94
106
  return;
95
107
  }
96
108
 
97
- if (isValid(internalValue)) {
109
+ const validity = isValid(internalValue);
110
+
111
+ if (validity) {
98
112
  if (initialValue !== internalValue) {
99
113
  setInitialValue(internalValue);
100
114
  onChangeComplete(internalValue);
@@ -102,6 +116,11 @@ const InlineInput = React.forwardRef<HTMLInputElement, Props>(
102
116
  } else {
103
117
  setInternalValue(externalValue);
104
118
  }
119
+
120
+ // Should always end up valid in this case
121
+ if (onValidityChanged != null) {
122
+ onValidityChanged(true);
123
+ }
105
124
  };
106
125
 
107
126
  const onChangeCompleteIfValid = (event: React.KeyboardEvent) => {
@@ -144,8 +163,11 @@ const InlineInput = React.forwardRef<HTMLInputElement, Props>(
144
163
  type="text"
145
164
  className={classNames(
146
165
  'inline-input',
147
- isValid(internalValue) || 'invalid',
166
+ preventDefaultInvalidStyle
167
+ ? null
168
+ : isValid(internalValue) || 'invalid',
148
169
  disabled && 'disabled',
170
+ textAlignLeft && 'tw-pl-2 tw-text-left',
149
171
  className
150
172
  )}
151
173
  size={
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
5
5
  */
6
6
 
7
- import React, { FC } from 'react';
7
+ import React from 'react';
8
8
 
9
9
  import { isFactor } from '../Slider/factor';
10
10
  import {
@@ -19,12 +19,16 @@ import InlineInput from './InlineInput';
19
19
 
20
20
  import './number-inline-input.scss';
21
21
 
22
- export interface Props {
22
+ export interface NumberInlineInput {
23
23
  disabled?: boolean;
24
24
  value: number;
25
25
  range: RangeOrValues;
26
+ className?: string;
26
27
  onChange: (value: number) => void;
27
28
  onChangeComplete?: (value: number) => void;
29
+ textAlignLeft?: boolean;
30
+ onValidityChanged?: (validity: boolean) => void;
31
+ preventDefaultInvalidStyle?: boolean;
28
32
  }
29
33
 
30
34
  const isInValues = (value: number, values: Values) => values.includes(value);
@@ -77,21 +81,24 @@ const changeValueStepwise = (
77
81
  return nextValue != null ? nextValue : current;
78
82
  };
79
83
 
80
- const NumberInlineInput: FC<Props> = ({
84
+ export default ({
81
85
  disabled,
82
86
  value,
83
87
  range,
88
+ className,
84
89
  onChange,
85
90
  onChangeComplete = () => {},
86
- }) => {
91
+ textAlignLeft,
92
+ onValidityChanged,
93
+ preventDefaultInvalidStyle,
94
+ }: NumberInlineInput) => {
87
95
  useValidatedRangeOrValues(range);
88
96
 
89
97
  return (
90
98
  <InlineInput
91
- className="number-inline-input"
99
+ className={`${className} number-inline-input`}
92
100
  disabled={disabled}
93
101
  value={String(value)}
94
- isValid={newValue => isValid(Number(newValue), range)}
95
102
  onChange={newValue => onChange(Number(newValue))}
96
103
  onChangeComplete={newValue => onChangeComplete(Number(newValue))}
97
104
  onKeyboardIncrementAction={() =>
@@ -100,8 +107,17 @@ const NumberInlineInput: FC<Props> = ({
100
107
  onKeyboardDecrementAction={() =>
101
108
  changeValueStepwise(value, range, -1).toString()
102
109
  }
110
+ textAlignLeft={textAlignLeft}
111
+ isValid={newValue => {
112
+ const validity = isValid(Number(newValue), range);
113
+ if (onValidityChanged != null) {
114
+ // Then propagate the validity back to parent
115
+ onValidityChanged(validity);
116
+ }
117
+ return validity;
118
+ }}
119
+ onValidityChanged={onValidityChanged}
120
+ preventDefaultInvalidStyle={preventDefaultInvalidStyle}
103
121
  />
104
122
  );
105
123
  };
106
-
107
- export default NumberInlineInput;
@@ -0,0 +1,132 @@
1
+ /*
2
+ * Copyright (c) 2023 Nordic Semiconductor ASA
3
+ *
4
+ * SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
5
+ */
6
+
7
+ import React, { useState } from 'react';
8
+ import FormLabel from 'react-bootstrap/esm/FormLabel';
9
+
10
+ import { DropdownItem } from '../Dropdown/Dropdown';
11
+ import { RangeOrValues } from '../Slider/range';
12
+ import classNames from '../utils/classNames';
13
+ import NumberInlineInput from './NumberInlineInput';
14
+
15
+ import styles from '../Dropdown/Dropdown.module.scss';
16
+
17
+ export type NumberDropdownItem = DropdownItem<number>;
18
+
19
+ interface DropdownProps {
20
+ id?: string;
21
+ label?: React.ReactNode;
22
+ items: NumberDropdownItem[];
23
+ value: number;
24
+ onChange: (value: number) => void;
25
+ range: RangeOrValues;
26
+ numItemsBeforeScroll?: number;
27
+ className?: string;
28
+ disabled?: boolean;
29
+ title?: string;
30
+ }
31
+
32
+ export default ({
33
+ id,
34
+ label,
35
+ items,
36
+ value,
37
+ onChange,
38
+ range,
39
+ numItemsBeforeScroll = 0,
40
+ className = '',
41
+ disabled = false,
42
+ title,
43
+ }: DropdownProps) => {
44
+ const [isActive, setIsActive] = useState(false);
45
+ const [inlineValue, setInlineValue] = useState(value);
46
+ const [isValid, setIsValid] = useState(true);
47
+
48
+ const setNewValue = (newValue: number) => {
49
+ setInlineValue(newValue);
50
+ onChange(newValue);
51
+ setIsActive(false);
52
+ };
53
+ const onClickItem = (item: NumberDropdownItem) => {
54
+ if (item.value != null && typeof item.value === 'number') {
55
+ setNewValue(item.value);
56
+ }
57
+ };
58
+
59
+ return (
60
+ <div
61
+ className={`tw-preflight tw-relative tw-w-full ${className}`}
62
+ onBlur={event => {
63
+ if (!event.currentTarget.contains(event.relatedTarget)) {
64
+ setIsActive(false);
65
+ }
66
+ }}
67
+ title={title}
68
+ >
69
+ <FormLabel className="tw-mb-1 tw-text-xs">{label}</FormLabel>
70
+ <div className="tw-flex tw-h-8 tw-w-full">
71
+ <NumberInlineInput
72
+ value={inlineValue}
73
+ range={range}
74
+ onChange={val => setInlineValue(val)}
75
+ onChangeComplete={val => setNewValue(val)}
76
+ className={`tw-x-2 tw-h-full tw-w-full tw-bg-gray-700 tw-text-white tw-underline tw-underline-offset-2 ${
77
+ isValid ? 'tw-decoration-white' : 'tw-decoration-red'
78
+ }`}
79
+ textAlignLeft
80
+ onValidityChanged={setIsValid}
81
+ preventDefaultInvalidStyle
82
+ />
83
+ <button
84
+ id={id}
85
+ type="button"
86
+ className="tw-overflow-hidden tw-border-b tw-border-solid tw-border-b-gray-200 tw-bg-gray-700 tw-px-2 tw-text-white"
87
+ onClick={() => setIsActive(!isActive)}
88
+ disabled={disabled}
89
+ >
90
+ <span
91
+ className={`mdi mdi-chevron-down tw-text-lg ${classNames(
92
+ isActive && 'tw-rotate-180'
93
+ )}`}
94
+ />
95
+ </button>
96
+ </div>
97
+ {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions -- We need an interactive handler as described below */}
98
+ <div
99
+ onMouseDown={ev => {
100
+ // To prevent the dropdown from closing when users click on the scrollbar of the items
101
+ ev.preventDefault();
102
+ }}
103
+ style={
104
+ numItemsBeforeScroll > 0
105
+ ? {
106
+ maxHeight: `${numItemsBeforeScroll * 24}px`,
107
+ }
108
+ : {}
109
+ }
110
+ data-height={
111
+ numItemsBeforeScroll > 0 &&
112
+ items.length > numItemsBeforeScroll
113
+ }
114
+ className={`tw-text-while tw-absolute tw-right-0 tw-z-10 tw-w-full tw-bg-gray-700 tw-p-0 ${classNames(
115
+ styles.content,
116
+ !isActive && 'tw-hidden'
117
+ )}`}
118
+ >
119
+ {items.map(item => (
120
+ <button
121
+ type="button"
122
+ className="tw-bg-transparent tw-clear-both tw-block tw-h-6 tw-w-full tw-whitespace-nowrap tw-border-0 tw-px-2 tw-py-1 tw-text-left tw-font-normal tw-text-white hover:tw-bg-gray-600 focus:tw-bg-gray-600"
123
+ key={item.value}
124
+ onClick={() => onClickItem(item)}
125
+ >
126
+ {item.label}
127
+ </button>
128
+ ))}
129
+ </div>
130
+ </div>
131
+ );
132
+ };
package/src/index.ts CHANGED
@@ -48,6 +48,8 @@ export { Group, CollapsibleGroup } from './SidePanel/Group';
48
48
  export { default as InlineInput } from './InlineInput/InlineInput';
49
49
  export { default as NumberInlineInput } from './InlineInput/NumberInlineInput';
50
50
  export { default as NumberInputSliderWithUnit } from './NumberInputWithSlider/NumberInputSliderWithUnit';
51
+ export { default as NumberInputWithDropdown } from './InlineInput/NumberInputWithDropdown';
52
+ export type { NumberDropdownItem } from './InlineInput/NumberInputWithDropdown';
51
53
 
52
54
  export { default as Spinner } from './Spinner/Spinner';
53
55
 
@@ -1 +1 @@
1
- {"version":3,"file":"deviceSetup.d.ts","sourceRoot":"","sources":["../../../../src/Device/deviceSetup.ts"],"names":[],"mappings":";AAOA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAO/C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,WAAW,QAAQ;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,UAAU;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IACxB,uBAAuB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IACrD,kBAAkB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK;QACpC,GAAG,EAAE,MAAM,CAAC;QACZ,WAAW,CAAC,EAAE,MAAM,CAAC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AAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,aAAa,WAEV,MAAM,qBACK,iBAAiB,sBAChB,MAAM,KAAK,IAAI,oBACjB,OAAO,KAAK,IAAI,+EAGnC,SAAS,SAAS,EAAE,QAAQ,IAAI,CAAC,CAwJnC,CAAC;AAEN,eAAO,MAAM,WAAW,WAER,MAAM,qBACK,iBAAiB,4BACV,MAAM,KAAK,IAAI,oBACvB,MAAM,IAAI,KAC7B,SAAS,SAAS,CA6BhB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- export interface DropdownItem {
2
+ export interface DropdownItem<T = string> {
3
3
  label: React.ReactNode;
4
- value: string;
4
+ value: T;
5
5
  }
6
6
  export interface DropdownProps {
7
7
  id?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../../src/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAOxC,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;mHAWE,aAAa;AAThB,wBAkFE"}
1
+ {"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../../src/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAOxC,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,MAAM;IACpC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,CAAC,CAAC;CACZ;AAED,MAAM,WAAW,aAAa;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;mHAWE,aAAa;AAThB,wBAkFE"}
@@ -9,6 +9,9 @@ interface Props {
9
9
  onKeyboardIncrementAction?: () => string;
10
10
  onKeyboardDecrementAction?: () => string;
11
11
  className?: string;
12
+ textAlignLeft?: boolean;
13
+ onValidityChanged?: (validity: boolean) => void;
14
+ preventDefaultInvalidStyle?: boolean;
12
15
  }
13
16
  declare const InlineInput: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLInputElement>>;
14
17
  export default InlineInput;
@@ -1 +1 @@
1
- {"version":3,"file":"InlineInput.d.ts","sourceRoot":"","sources":["../../../../src/InlineInput/InlineInput.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAI3D,OAAO,qBAAqB,CAAC;AAwC7B,UAAU,KAAK;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,yBAAyB,CAAC,EAAE,MAAM,MAAM,CAAC;IACzC,yBAAyB,CAAC,EAAE,MAAM,MAAM,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,WAAW,gFA0GhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"InlineInput.d.ts","sourceRoot":"","sources":["../../../../src/InlineInput/InlineInput.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAI3D,OAAO,qBAAqB,CAAC;AAwC7B,UAAU,KAAK;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,yBAAyB,CAAC,EAAE,MAAM,MAAM,CAAC;IACzC,yBAAyB,CAAC,EAAE,MAAM,MAAM,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACxC;AAED,QAAA,MAAM,WAAW,gFA6HhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,13 +1,17 @@
1
- import { FC } from 'react';
1
+ /// <reference types="react" />
2
2
  import { RangeOrValues } from '../Slider/range';
3
3
  import './number-inline-input.scss';
4
- export interface Props {
4
+ export interface NumberInlineInput {
5
5
  disabled?: boolean;
6
6
  value: number;
7
7
  range: RangeOrValues;
8
+ className?: string;
8
9
  onChange: (value: number) => void;
9
10
  onChangeComplete?: (value: number) => void;
11
+ textAlignLeft?: boolean;
12
+ onValidityChanged?: (validity: boolean) => void;
13
+ preventDefaultInvalidStyle?: boolean;
10
14
  }
11
- declare const NumberInlineInput: FC<Props>;
12
- export default NumberInlineInput;
15
+ declare const _default: ({ disabled, value, range, className, onChange, onChangeComplete, textAlignLeft, onValidityChanged, preventDefaultInvalidStyle, }: NumberInlineInput) => JSX.Element;
16
+ export default _default;
13
17
  //# sourceMappingURL=NumberInlineInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NumberInlineInput.d.ts","sourceRoot":"","sources":["../../../../src/InlineInput/NumberInlineInput.tsx"],"names":[],"mappings":"AAMA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,EAIH,aAAa,EAGhB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,4BAA4B,CAAC;AAEpC,MAAM,WAAW,KAAK;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAoDD,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,KAAK,CAyBhC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"NumberInlineInput.d.ts","sourceRoot":"","sources":["../../../../src/InlineInput/NumberInlineInput.tsx"],"names":[],"mappings":";AASA,OAAO,EAIH,aAAa,EAGhB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,4BAA4B,CAAC;AAEpC,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACxC;2JA8DE,iBAAiB;AAVpB,wBAuCE"}
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { DropdownItem } from '../Dropdown/Dropdown';
3
+ import { RangeOrValues } from '../Slider/range';
4
+ export type NumberDropdownItem = DropdownItem<number>;
5
+ interface DropdownProps {
6
+ id?: string;
7
+ label?: React.ReactNode;
8
+ items: NumberDropdownItem[];
9
+ value: number;
10
+ onChange: (value: number) => void;
11
+ range: RangeOrValues;
12
+ numItemsBeforeScroll?: number;
13
+ className?: string;
14
+ disabled?: boolean;
15
+ title?: string;
16
+ }
17
+ declare const _default: ({ id, label, items, value, onChange, range, numItemsBeforeScroll, className, disabled, title, }: DropdownProps) => JSX.Element;
18
+ export default _default;
19
+ //# sourceMappingURL=NumberInputWithDropdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberInputWithDropdown.d.ts","sourceRoot":"","sources":["../../../../src/InlineInput/NumberInputWithDropdown.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAMhD,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;AAEtD,UAAU,aAAa;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,aAAa,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;0HAaE,aAAa;AAXhB,wBAoGE"}
@@ -36,6 +36,8 @@ export { Group, CollapsibleGroup } from './SidePanel/Group';
36
36
  export { default as InlineInput } from './InlineInput/InlineInput';
37
37
  export { default as NumberInlineInput } from './InlineInput/NumberInlineInput';
38
38
  export { default as NumberInputSliderWithUnit } from './NumberInputWithSlider/NumberInputSliderWithUnit';
39
+ export { default as NumberInputWithDropdown } from './InlineInput/NumberInputWithDropdown';
40
+ export type { NumberDropdownItem } from './InlineInput/NumberInputWithDropdown';
39
41
  export { default as Spinner } from './Spinner/Spinner';
40
42
  export { default as MasonryLayout } from './MasonryLayout/MasonryLayout';
41
43
  export { default as sendFeedback } from './Feedback/sendFeedback';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,kBAAkB;;;;;;;;;CAA6B,CAAC;AAE7D,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACH,OAAO,IAAI,cAAc,EACzB,KAAK,KAAK,IAAI,mBAAmB,GACpC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACH,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,YAAY,GACf,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,O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