@nordicsemiconductor/pc-nrfconnect-shared 109.0.0 → 111.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,26 @@ 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
+ ## 111 - 2023-09-22
11
+
12
+ ### Added
13
+
14
+ - Optional property `nrfConnectForDesktop.supportedDevices` in `package.json`.
15
+ Will for now only be used by the Quickstart app.
16
+ - Output link to where in Azure a release should be created.
17
+
18
+ ### Fixed
19
+
20
+ - List items in dialog bodies had the wrong size: They inherited the size from
21
+ the document body instead of using the same size as was used in the dialog
22
+ in paragraphs.
23
+
24
+ ## 110 - 2023-09-22
25
+
26
+ ### Fixed
27
+
28
+ - `MasonryLayout` dropdown component forced cards on different row to shift.
29
+
10
30
  ## 109 - 2023-09-21
11
31
 
12
32
  ### Changed
@@ -71,7 +91,8 @@ every new version is a new major version.
71
91
 
72
92
  ### Steps to upgrade
73
93
 
74
- - Update `nrfConnectForDesktop.nrfutil` to version 1.4.2 in `package.json`
94
+ - Update `nrfConnectForDesktop.nrfutil.device` to version 1.4.2 in
95
+ `package.json`
75
96
 
76
97
  ## 102 - 2023-09-05
77
98
 
@@ -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="3207" lines-covered="1788" line-rate="0.5575" branches-valid="1532" branches-covered="448" branch-rate="0.2924" timestamp="1695307913420" complexity="0" version="0.1">
3
+ <coverage lines-valid="3208" lines-covered="1788" line-rate="0.5573" branches-valid="1532" branches-covered="448" branch-rate="0.2924" timestamp="1695416714971" complexity="0" version="0.1">
4
4
  <sources>
5
5
  <source>/home/vsts/work/1/s</source>
6
6
  </sources>
@@ -1615,9 +1615,9 @@
1615
1615
  </class>
1616
1616
  </classes>
1617
1617
  </package>
1618
- <package name="scripts" line-rate="0.7118000000000001" branch-rate="0.36">
1618
+ <package name="scripts" line-rate="0.7" branch-rate="0.36">
1619
1619
  <classes>
1620
- <class name="release-shared.ts" filename="scripts/release-shared.ts" line-rate="0.7118000000000001" branch-rate="0.36">
1620
+ <class name="release-shared.ts" filename="scripts/release-shared.ts" line-rate="0.7" branch-rate="0.36">
1621
1621
  <methods>
1622
1622
  <method name="(anonymous_7)" hits="0" signature="()V">
1623
1623
  <lines>
@@ -1757,9 +1757,10 @@
1757
1757
  <line number="197" hits="0" branch="true" condition-coverage="0% (0/2)"/>
1758
1758
  <line number="200" hits="0" branch="true" condition-coverage="0% (0/1)"/>
1759
1759
  <line number="201" hits="0" branch="false"/>
1760
- <line number="205" hits="1" branch="false"/>
1761
- <line number="206" hits="1" branch="true" condition-coverage="0% (0/1)"/>
1762
- <line number="207" hits="0" branch="false"/>
1760
+ <line number="202" hits="0" branch="false"/>
1761
+ <line number="208" hits="1" branch="false"/>
1762
+ <line number="209" hits="1" branch="true" condition-coverage="0% (0/1)"/>
1763
+ <line number="210" hits="0" branch="false"/>
1763
1764
  </lines>
1764
1765
  </class>
1765
1766
  </classes>
package/ipc/MetaFiles.ts CHANGED
@@ -4,6 +4,8 @@
4
4
  * SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
5
5
  */
6
6
 
7
+ import { DevicePCA } from '../src/Device/deviceInfo/deviceInfo';
8
+
7
9
  export type UrlString = string;
8
10
 
9
11
  export interface SourceJson {
@@ -43,6 +45,7 @@ interface ObjectContainingOptionalStrings {
43
45
  }
44
46
 
45
47
  interface NrfConnectForDesktop {
48
+ supportedDevices?: DevicePCA[];
46
49
  nrfutil?: NrfutilModules;
47
50
  html?: string;
48
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nordicsemiconductor/pc-nrfconnect-shared",
3
- "version": "109.0.0",
3
+ "version": "111.0.0",
4
4
  "description": "Shared commodities for developing pc-nrfconnect-* packages",
5
5
  "repository": {
6
6
  "type": "git",
@@ -199,6 +199,9 @@ const main = () => {
199
199
 
200
200
  if (noErrors) {
201
201
  doRelease(nextReleaseNumber);
202
+ console.log(
203
+ 'All done on GitHub. Now go to Azure and create a release there:\nhttps://dev.azure.com/NordicSemiconductor/Wayland/_release?definitionId=33'
204
+ );
202
205
  }
203
206
  };
204
207
 
@@ -43,7 +43,7 @@ import unknownNordicLogo from '!!@svgr!./unknown-nordic-logo.svg';
43
43
 
44
44
  type Device = NrfutilDevice | WrappedDevice;
45
45
 
46
- type DevicePCA =
46
+ export type DevicePCA =
47
47
  | 'PCA10028'
48
48
  | 'PCA10031'
49
49
  | 'PCA10040'
@@ -36,7 +36,8 @@
36
36
  overflow-wrap: anywhere;
37
37
  padding: 32px 16px 16px 16px;
38
38
  margin: 0;
39
- p {
39
+ p,
40
+ li {
40
41
  font-size: 14px;
41
42
  }
42
43
  }
@@ -102,7 +102,8 @@ export default ({
102
102
 
103
103
  const generateMetaData = (col: number) => {
104
104
  let child = masonryLayoutRef.current?.firstElementChild;
105
- const heightMatrix: number[][] = [];
105
+ const offsetHeightMatrix: number[][] = [];
106
+ const scrollHeightMatrix: number[][] = [];
106
107
  const zeroHeightChildren: boolean[] = [];
107
108
 
108
109
  let i = 0;
@@ -111,11 +112,14 @@ export default ({
111
112
  if (!child.hasAttribute('data-filler')) {
112
113
  const rowIndex = Math.floor(i / col);
113
114
 
114
- if (heightMatrix[rowIndex] === undefined) {
115
- heightMatrix[rowIndex] = [];
115
+ if (offsetHeightMatrix[rowIndex] === undefined) {
116
+ offsetHeightMatrix[rowIndex] = [];
117
+ scrollHeightMatrix[rowIndex] = [];
116
118
  }
117
119
 
118
- const row = heightMatrix[rowIndex];
120
+ const offsetHeightRow = offsetHeightMatrix[rowIndex];
121
+ const scrollHeightRow = scrollHeightMatrix[rowIndex];
122
+ let scrollHeightRowDiff = 0;
119
123
  const columnIndex = i % col;
120
124
 
121
125
  i += 1;
@@ -123,19 +127,34 @@ export default ({
123
127
  child.offsetHeight <=
124
128
  Number.parseInt(styles.margin, 10)
125
129
  ) {
126
- row[columnIndex] = 0;
130
+ offsetHeightRow[columnIndex] = 0;
127
131
  zeroHeightChildren.push(true);
128
132
  } else {
129
- row[columnIndex] = child.scrollHeight + 9; // 8 border bottom + 1px to round as value might be decimal
133
+ offsetHeightRow[columnIndex] =
134
+ child.offsetHeight + 1; // 1px to round as value might be decimal
135
+ scrollHeightRowDiff =
136
+ child.scrollHeight +
137
+ 9 -
138
+ offsetHeightRow[columnIndex]; // 8 border bottom + 1px to round as value might be decimal
130
139
  zeroHeightChildren.push(false);
131
140
  }
141
+
142
+ scrollHeightRow[columnIndex] =
143
+ offsetHeightMatrix.reduce(
144
+ (p, c) => p + c[columnIndex],
145
+ 0
146
+ ) + scrollHeightRowDiff;
132
147
  }
133
148
 
134
149
  child = child.nextElementSibling;
135
150
  }
136
151
  }
137
152
 
138
- return { heightMatrix, hiddenChildren: zeroHeightChildren };
153
+ return {
154
+ offsetHeightMatrix,
155
+ scrollHeightMatrix,
156
+ hiddenChildren: zeroHeightChildren,
157
+ };
139
158
  };
140
159
 
141
160
  const calcData = (col: number) => {
@@ -143,7 +162,7 @@ export default ({
143
162
  const heights: number[] = Array(col).fill(0);
144
163
  const newOrder: number[] = [];
145
164
 
146
- metaData.heightMatrix.forEach(row => {
165
+ metaData.offsetHeightMatrix.forEach(row => {
147
166
  row.forEach(itemHeight => {
148
167
  const smallest =
149
168
  heights.findIndex(h => h === Math.min(...heights)) ?? 0;
@@ -153,7 +172,10 @@ export default ({
153
172
  });
154
173
 
155
174
  return {
156
- maxHeight: Math.max(...heights, 0),
175
+ maxHeight: Math.max(
176
+ ...heights,
177
+ ...metaData.scrollHeightMatrix.flat()
178
+ ),
157
179
  order: newOrder,
158
180
  columnHeights: heights,
159
181
  columns: Math.min(
@@ -1,3 +1,4 @@
1
+ import { DevicePCA } from '../src/Device/deviceInfo/deviceInfo';
1
2
  export type UrlString = string;
2
3
  export interface SourceJson {
3
4
  name: string;
@@ -30,6 +31,7 @@ interface ObjectContainingOptionalStrings {
30
31
  [index: string]: string | undefined;
31
32
  }
32
33
  interface NrfConnectForDesktop {
34
+ supportedDevices?: DevicePCA[];
33
35
  nrfutil?: NrfutilModules;
34
36
  html?: string;
35
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MetaFiles.d.ts","sourceRoot":"","sources":["../../../ipc/MetaFiles.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,MAAM,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC;AAExC,MAAM,MAAM,WAAW,GAAG;IACtB,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,SAAS,CAAC;IACtB,cAAc,CAAC,EAAE,cAAc,CAAC;CACnC,CAAC;AAEF,MAAM,WAAW,OAAO;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,SAAS,CAAC;IACnB,eAAe,EAAE,SAAS,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,WAAW,CAAC;IACtB,SAAS,CAAC,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACL;AAED,UAAU,+BAA+B;IACrC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACvC;AAED,UAAU,oBAAoB;IAC1B,OAAO,CAAC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AED,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,YAAY,CAAC;IAGtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,+BAA+B,GAAG,MAAM,CAAC;IAC/C,YAAY,CAAC,EAAE,+BAA+B,CAAC;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,eAAe,CAAC,EAAE,+BAA+B,CAAC;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,+BAA+B,CAAC;IAC1C,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,+BAA+B,CAAC;IACnD,UAAU,CAAC,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,SAAS,CAAC;KAClB,CAAC;IACF,OAAO,CAAC,EAAE,+BAA+B,CAAC;CAC7C"}
@@ -2,6 +2,7 @@
2
2
  import { NrfutilDevice } from '../../../nrfutil';
3
3
  import type { Device as WrappedDevice } from '../deviceSlice';
4
4
  type Device = NrfutilDevice | WrappedDevice;
5
+ export type DevicePCA = 'PCA10028' | 'PCA10031' | 'PCA10040' | 'PCA10056' | 'PCA10059' | 'PCA10090' | 'PCA10095' | 'PCA10100' | 'PCA10121' | 'PCA20020' | 'PCA20035' | 'PCA10143' | 'PCA10152' | 'PCA10153' | 'PCA20049';
5
6
  interface DeviceInfo {
6
7
  name?: string | null;
7
8
  cores?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"deviceInfo.d.ts","sourceRoot":"","sources":["../../../../../src/Device/deviceInfo/deviceInfo.ts"],"names":[],"mappings":";AA8BA,OAAO,EAAE,aAAa,EAAE,MAA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CAAC,EAAE,MAAM,CAAC;QACzB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC5B,CAAC;CACL;AAoLD,eAAO,MAAM,UAAU,WAAY,MAAM,KAAG,UAC2B,CAAC;AASxE,eAAO,MAAM,mBAAmB,WACpB,MAAM;;YAQjB,CAAC;AAEF,eAAO,MAAM,cAAc,WAAY,MAAM,uBAEiC,CAAC;AAE/E,eAAO,MAAM,YAAY,WAAY,MAAM,uBAIrC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MasonryLayout.d.ts","sourceRoot":"","sources":["../../../../src/MasonryLayout/MasonryLayout.tsx"],"names":[],"mappings":"AAKA,OAAc,EAAE,iBAAiB,EAA+B,MAAM,OAAO,CAAC;AAM9E,UAAU,uBAAuB;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAiED;;;;;;GAMG;6DAKA,kBAAkB,uBAAuB,CAAC;AAJ7C,wBA2IE"}
1
+ {"version":3,"file":"MasonryLayout.d.ts","sourceRoot":"","sources":["../../../../src/MasonryLayout/MasonryLayout.tsx"],"names":[],"mappings":"AAKA,OAAc,EAAE,iBAAiB,EAA+B,MAAM,OAAO,CAAC;AAM9E,UAAU,uBAAuB;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAiED;;;;;;GAMG;6DAKA,kBAAkB,uBAAuB,CAAC;AAJ7C,wBAiKE"}