@itwin/presentation-shared 2.0.0-alpha.2 → 2.0.0-alpha.3
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 +6 -5
- package/README.md +0 -6
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @itwin/presentation-shared
|
|
2
2
|
|
|
3
|
+
## 2.0.0-alpha.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1112](https://github.com/iTwin/presentation/pull/1112): Version bump
|
|
8
|
+
|
|
3
9
|
## 2.0.0-alpha.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -17,7 +23,6 @@
|
|
|
17
23
|
### Major Changes
|
|
18
24
|
|
|
19
25
|
- [#954](https://github.com/iTwin/presentation/pull/954): Add additional requirements for types in `EC` metadata namespace, whose objects are returned by `ECSchemaProvider`.
|
|
20
|
-
|
|
21
26
|
- `EC.Schema`, `EC.Class` and `EC.Property` now all have an async `getCustomAttributes()` method that returns an `EC.CustomAttributeSet`, allowing consumers to access custom attributes of these schema items.
|
|
22
27
|
- `EC.Class` now additionally has these members:
|
|
23
28
|
- `baseClass: Promise<Class | undefined>`
|
|
@@ -50,7 +55,6 @@
|
|
|
50
55
|
### Minor Changes
|
|
51
56
|
|
|
52
57
|
- [#791](https://github.com/iTwin/presentation/pull/791): Added a number of mapped types:
|
|
53
|
-
|
|
54
58
|
- `Props<TFunc>` obtains the type of the first `TFunc` function argument.
|
|
55
59
|
|
|
56
60
|
```ts
|
|
@@ -104,12 +108,10 @@
|
|
|
104
108
|
- [#703](https://github.com/iTwin/presentation/pull/703): **BREAKING:** Removed the option to specify value + ECProperty identifier when creating a `ConcatenatedValue`.
|
|
105
109
|
|
|
106
110
|
The change provides two benefits:
|
|
107
|
-
|
|
108
111
|
1. Access to schema is not required to format `ConcatenatedValue` parts as they already contain all the necessary metadata required for formatting the value. This is a step towards supporting multiple data sources, where schema information might be not available during formatting.
|
|
109
112
|
2. Previously, the property type information had to be extracted for every row in the result set, which was inefficient. Now, the type information is extracted only once, when creating an ECSql query.
|
|
110
113
|
|
|
111
114
|
Full list of changes:
|
|
112
|
-
|
|
113
115
|
- `ConcatenatedValuePart.isProperty` - removed, as the "property" type was removed from the type union.
|
|
114
116
|
- `ECSql.createConcatenatedValueJsonSelector` and `ECSql.createConcatenatedValueStringSelector` don't accept an option to specify value + ECProperty identifier as a selector argument anymore. Instead, the option that specifies value selector + type information should be used. The latter kind of selector can be created using the newly added `ECSql.createPrimitivePropertyValueSelectorProps` function (see below).
|
|
115
117
|
- Added `ECSql.createPrimitivePropertyValueSelectorProps` function to help create a selector that specifies a value selector + type information. See README for more details.
|
|
@@ -185,7 +187,6 @@
|
|
|
185
187
|
### Minor Changes
|
|
186
188
|
|
|
187
189
|
- [#628](https://github.com/iTwin/presentation/pull/628): Added support for nested concatenated values by adding `ConcatenatedValue` to the `ConcatenatedValuePart` union. In addition:
|
|
188
|
-
|
|
189
190
|
- A type guard `ConcatenatedValuePart.isConcatenatedValue` has been added to distinguish it from other types of `ConcatenatedValuePart`.
|
|
190
191
|
- `ConcatenatedValue.serialize` has been modified to handle the new type of part seamlessly, so the `partFormatter` prop function receives the same 3 types of `ConcatenatedValuePart`, expanded from nested `ConcatenatedValue` if necessary.
|
|
191
192
|
|
package/README.md
CHANGED
|
@@ -125,7 +125,6 @@ The ECSql utilities group contains a number of functions to help create complex
|
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
- `createRawPrimitiveValueSelector` - creates an ECSQL selector for a raw primitive value.
|
|
128
|
-
|
|
129
128
|
- `undefined` is selected as `NULL`.
|
|
130
129
|
- `Date` values are selected in julian day format.
|
|
131
130
|
- `Point2d` and `Point3d` values are selected as serialized JSON objects, e.g. `{ x: 1, y: 2, z: 3 }`.
|
|
@@ -273,21 +272,17 @@ The APIs in Values group contain various value types and utilities to work with
|
|
|
273
272
|
- `InstanceKey` - a pair of full ECClass name and ECInstance ID, uniquely identifying an ECInstance in an iModel.
|
|
274
273
|
|
|
275
274
|
- `PrimitiveValue` - a union of different supported primitive values. Also, a namespace, containing the following utilities:
|
|
276
|
-
|
|
277
275
|
- `isPoint2d` - type guard to check if the given `PrimitiveValue` is a `Point2d`.
|
|
278
276
|
- `isPoint3d` - type guard to check if the given `PrimitiveValue` is a `Point3d`.
|
|
279
277
|
|
|
280
278
|
- `TypedPrimitiveValue` - a union of all supported combinations of `PrimitiveValue` and its type, possibly with some extra metadata like extended type name or units-related information. Also, a namespace, containing the following utilities:
|
|
281
|
-
|
|
282
279
|
- `create` - given a `PrimitiveValue`, its type and, optionally, extra information, validates the input and creates a `TypedPrimitiveValue`.
|
|
283
280
|
|
|
284
281
|
- `ConcatenatedValuePart` - a union of different types that may be used to create a single, combined value: nested `ConcatenatedValue`, `TypedPrimitiveValue` or just plain string. Also, a namespace, containing the following utilities:
|
|
285
|
-
|
|
286
282
|
- `isString` - type guard to check if the given `ConcatenatedValuePart` is a `string`.
|
|
287
283
|
- `isPrimitive` - type guard to check if the given `ConcatenatedValuePart` is a `TypedPrimitiveValue`.
|
|
288
284
|
|
|
289
285
|
- `ConcatenatedValue` - an array of `ConcatenatedValuePart`. Also, a namespace containing the following utilities:
|
|
290
|
-
|
|
291
286
|
- `serialize` - joins the given `ConcatenatedValue` parts using provided formatter and separator.
|
|
292
287
|
|
|
293
288
|
- `IPrimitiveValueFormatter` - an interface for a function that knows how to format a `TypedPrimitiveValue` into a string.
|
|
@@ -443,7 +438,6 @@ The package also delivers a number of utility types and functions:
|
|
|
443
438
|
```
|
|
444
439
|
|
|
445
440
|
- `trimWhitespace` - trims all extra whitespace from the given string, including:
|
|
446
|
-
|
|
447
441
|
- consecutive spaces,
|
|
448
442
|
- spaces before closing parentheses and comma,
|
|
449
443
|
- spaces after opening parentheses,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/presentation-shared",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.3",
|
|
4
4
|
"description": "The package contains types and utilities used across different iTwin.js Presentation packages.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -32,25 +32,25 @@
|
|
|
32
32
|
"./package.json": "./package.json"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@itwin/core-bentley": "^5.
|
|
35
|
+
"@itwin/core-bentley": "^5.3.2"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@itwin/build-tools": "^5.
|
|
38
|
+
"@itwin/build-tools": "^5.3.2",
|
|
39
39
|
"@itwin/eslint-plugin": "5.1.0",
|
|
40
|
-
"@types/chai": "^5.2.
|
|
40
|
+
"@types/chai": "^5.2.3",
|
|
41
41
|
"@types/chai-as-promised": "^8.0.2",
|
|
42
42
|
"@types/mocha": "^10.0.10",
|
|
43
|
-
"@types/node": "^22.
|
|
43
|
+
"@types/node": "^22.19.1",
|
|
44
44
|
"@types/sinon": "^17.0.4",
|
|
45
45
|
"@types/sinon-chai": "^4.0.0",
|
|
46
46
|
"c8": "^10.1.3",
|
|
47
|
-
"chai": "^5.
|
|
48
|
-
"chai-as-promised": "^8.0.
|
|
49
|
-
"eslint": "^9.
|
|
50
|
-
"mocha": "^11.
|
|
51
|
-
"rimraf": "^6.0
|
|
52
|
-
"sinon": "^19.0.
|
|
53
|
-
"sinon-chai": "^4.0.
|
|
47
|
+
"chai": "^5.3.3",
|
|
48
|
+
"chai-as-promised": "^8.0.2",
|
|
49
|
+
"eslint": "^9.39.1",
|
|
50
|
+
"mocha": "^11.7.5",
|
|
51
|
+
"rimraf": "^6.1.0",
|
|
52
|
+
"sinon": "^19.0.5",
|
|
53
|
+
"sinon-chai": "^4.0.1",
|
|
54
54
|
"typescript": "~5.7.3",
|
|
55
55
|
"presentation-test-utilities": "^0.0.0"
|
|
56
56
|
},
|