@honua/react 0.1.16 → 0.1.17
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/contract/edit-session.js
CHANGED
|
@@ -162,7 +162,7 @@ export class EditWorkflowSession {
|
|
|
162
162
|
const value = values[field.name];
|
|
163
163
|
const serverAssignedOnCreate = this.kind === "create" && field.editable === false;
|
|
164
164
|
const required = (field.required === true || field.nullable === false) && !serverAssignedOnCreate;
|
|
165
|
-
if (required && isEmptyValue(value) && field.defaultValue
|
|
165
|
+
if (required && isEmptyValue(value) && (value !== undefined || isEmptyValue(field.defaultValue))) {
|
|
166
166
|
errors.push({
|
|
167
167
|
fieldName: field.name,
|
|
168
168
|
code: "required",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esri-geojson.d.ts","sourceRoot":"","sources":["../../../src/core/esri-geojson.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EACV,eAAe,EAIhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,YAAY,EAKZ,cAAc,EACd,YAAY,EACZ,qBAAqB,EACtB,MAAM,YAAY,CAAC;AA2MpB;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,GAClE,eAAe,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"esri-geojson.d.ts","sourceRoot":"","sources":["../../../src/core/esri-geojson.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EACV,eAAe,EAIhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,YAAY,EAKZ,cAAc,EACd,YAAY,EACZ,qBAAqB,EACtB,MAAM,YAAY,CAAC;AA2MpB;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,GAClE,eAAe,GAAG,IAAI,CAiFxB;AAkBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,YAAY,GAAG,cAAc,CAQ1E;AAyBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,EAC5C,gBAAgB,CAAC,EAAE,qBAAqB,GACvC,YAAY,GAAG,IAAI,CA6CrB"}
|
package/core/esri-geojson.js
CHANGED
|
@@ -196,9 +196,16 @@ export function esriGeometryToGeoJSON(geometry) {
|
|
|
196
196
|
}
|
|
197
197
|
const candidate = geometry;
|
|
198
198
|
if (hasNumber(candidate, "x") && hasNumber(candidate, "y")) {
|
|
199
|
+
if (candidate.z !== undefined && !hasNumber(candidate, "z")) {
|
|
200
|
+
return null;
|
|
201
|
+
}
|
|
199
202
|
return {
|
|
200
203
|
type: "Point",
|
|
201
|
-
coordinates: [
|
|
204
|
+
coordinates: [
|
|
205
|
+
candidate.x,
|
|
206
|
+
candidate.y,
|
|
207
|
+
...(candidate.z === undefined ? [] : [candidate.z]),
|
|
208
|
+
],
|
|
202
209
|
};
|
|
203
210
|
}
|
|
204
211
|
if (Array.isArray(candidate.points)) {
|
|
@@ -334,7 +341,9 @@ export function geoJsonToEsriGeometry(geometry, spatialReference) {
|
|
|
334
341
|
switch (geometry.type) {
|
|
335
342
|
case "Point": {
|
|
336
343
|
const [x, y, z] = geometry.coordinates;
|
|
337
|
-
if (typeof x !== "number" ||
|
|
344
|
+
if (typeof x !== "number" ||
|
|
345
|
+
typeof y !== "number" ||
|
|
346
|
+
(z !== undefined && (typeof z !== "number" || !Number.isFinite(z)))) {
|
|
338
347
|
return null;
|
|
339
348
|
}
|
|
340
349
|
// Keep the altitude of a 3D position: dropping it would hand back a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@honua/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "React bindings for the Honua SDK: provider, hooks, and map components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gis",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@maplibre/maplibre-gl-style-spec": "^24.7.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@honua/sdk": "0.1.
|
|
37
|
+
"@honua/sdk": "0.1.17",
|
|
38
38
|
"@bufbuild/protobuf": "^2.0.0",
|
|
39
39
|
"@connectrpc/connect": "^2.0.0",
|
|
40
40
|
"@connectrpc/connect-web": "^2.0.0",
|