@esri/solutions-components 5.1.0-next.140 → 5.1.0-next.142
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/cdn/{AYQT4HC4.js → 34JROLRM.js} +1 -1
- package/dist/cdn/4WJ2UJWQ.js +2 -0
- package/dist/cdn/{PV6MK2E6.js → FV4F6RW3.js} +1 -1
- package/dist/cdn/{QTZMCFZB.js → LLPT3R4B.js} +16 -16
- package/dist/cdn/{7J2F4TFI.js → PUQBEN7F.js} +1 -1
- package/dist/cdn/{TSYIZSCP.js → RYEEEMFO.js} +11 -1
- package/dist/cdn/S6U6SXMD.js +2 -0
- package/dist/cdn/{RMCQZMLA.js → TIRNZIMX.js} +1 -1
- package/dist/cdn/{OYBEDO63.js → UVOAWVML.js} +1 -1
- package/dist/cdn/{SAJPXZDW.js → WCOEPRRK.js} +1 -1
- package/dist/cdn/{NN52IXXG.js → YM3CRTWP.js} +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/converter.js +114 -105
- package/dist/chunks/designSolution.js +11 -1
- package/dist/chunks/solution-builder-assistant.js +56 -27
- package/dist/chunks/updateDesign.js +1 -1
- package/dist/components/arcgis-solutions-assistant/customElement.js +182 -174
- package/dist/components/solution-builder-assistant/customElement.d.ts +2 -0
- package/dist/components/solution-builder-assistant/customElement.js +3 -2
- package/dist/components/solution-builder-assistant/index.js +1 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +8 -5
- package/package.json +1 -1
- package/dist/cdn/LDNPRHOM.js +0 -2
- package/dist/cdn/WPGT2HLS.js +0 -2
package/dist/chunks/converter.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
function
|
|
2
|
+
function h() {
|
|
3
3
|
return {
|
|
4
4
|
renderer: {
|
|
5
5
|
type: "simple",
|
|
@@ -248,7 +248,7 @@ function m() {
|
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function b() {
|
|
252
252
|
return {
|
|
253
253
|
renderer: {
|
|
254
254
|
type: "simple",
|
|
@@ -276,6 +276,13 @@ class u {
|
|
|
276
276
|
polygon: "esriGeometryPolygon"
|
|
277
277
|
};
|
|
278
278
|
}
|
|
279
|
+
static {
|
|
280
|
+
this.simpleTypeLookup = {
|
|
281
|
+
esriGeometryPoint: "Point",
|
|
282
|
+
esriGeometryPolyline: "Polyline",
|
|
283
|
+
esriGeometryPolygon: "Polygon"
|
|
284
|
+
};
|
|
285
|
+
}
|
|
279
286
|
static {
|
|
280
287
|
this.drawingToolLookup = {
|
|
281
288
|
esriGeometryPoint: "esriFeatureEditToolPoint",
|
|
@@ -301,59 +308,61 @@ class u {
|
|
|
301
308
|
);
|
|
302
309
|
}
|
|
303
310
|
dumpToLlmTemplate() {
|
|
304
|
-
const e = this.structure?.buildSolution?.solution, i = Object.entries(e?.strings || {}).map(([s,
|
|
311
|
+
const e = this.structure?.buildSolution?.solution, i = Object.entries(e?.strings || {}).map(([s, o]) => ({
|
|
305
312
|
key: s,
|
|
306
|
-
value:
|
|
307
|
-
description:
|
|
313
|
+
value: o.value,
|
|
314
|
+
description: o.description
|
|
308
315
|
})), t = {
|
|
309
316
|
title: e?.title,
|
|
310
317
|
description: e?.description,
|
|
311
318
|
tags: e?.tags,
|
|
312
319
|
strings: i
|
|
313
|
-
},
|
|
320
|
+
}, r = this.structure?.buildSolution?.items, l = Object.entries(r || {}).map(([s, o]) => ({
|
|
314
321
|
id: s,
|
|
315
|
-
title:
|
|
316
|
-
description:
|
|
317
|
-
type:
|
|
322
|
+
title: o.title,
|
|
323
|
+
description: o.description,
|
|
324
|
+
type: o.type
|
|
318
325
|
}));
|
|
319
|
-
let
|
|
320
|
-
for (const [s,
|
|
321
|
-
if (
|
|
326
|
+
let n = null;
|
|
327
|
+
for (const [s, o] of Object.entries(r || {})) {
|
|
328
|
+
if (o.type !== "Feature Layer (hosted)")
|
|
322
329
|
continue;
|
|
323
|
-
const
|
|
324
|
-
for (const
|
|
325
|
-
const
|
|
326
|
-
|
|
327
|
-
id: p.id,
|
|
330
|
+
const p = [];
|
|
331
|
+
for (const d of o.service?.layers || []) {
|
|
332
|
+
const y = this.getFields(d), c = {
|
|
333
|
+
id: d.id,
|
|
328
334
|
type: "",
|
|
329
|
-
|
|
335
|
+
typeMutable: !0,
|
|
336
|
+
name: d.name,
|
|
330
337
|
customFields: [],
|
|
331
|
-
requiredFields:
|
|
338
|
+
requiredFields: y,
|
|
332
339
|
systemFields: []
|
|
333
|
-
}
|
|
340
|
+
};
|
|
341
|
+
d.geometryType && (c.type = u.simpleTypeLookup[d.geometryType] || "", c.typeMutable = !1), p.push(c);
|
|
334
342
|
}
|
|
335
|
-
for (const
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
-
id:
|
|
343
|
+
for (const d of o.service?.tables || []) {
|
|
344
|
+
const y = this.getFields(d);
|
|
345
|
+
p.push({
|
|
346
|
+
id: d.id,
|
|
339
347
|
type: "Table",
|
|
340
|
-
|
|
348
|
+
typeMutable: !1,
|
|
349
|
+
name: d.name,
|
|
341
350
|
customFields: [],
|
|
342
|
-
requiredFields:
|
|
351
|
+
requiredFields: y,
|
|
343
352
|
systemFields: []
|
|
344
353
|
});
|
|
345
354
|
}
|
|
346
|
-
|
|
355
|
+
n = {
|
|
347
356
|
itemId: s,
|
|
348
|
-
addLayers:
|
|
349
|
-
layers:
|
|
357
|
+
addLayers: o.addLayers,
|
|
358
|
+
layers: p
|
|
350
359
|
};
|
|
351
360
|
break;
|
|
352
361
|
}
|
|
353
362
|
return {
|
|
354
363
|
solution: t,
|
|
355
|
-
items:
|
|
356
|
-
featureLayer:
|
|
364
|
+
items: l,
|
|
365
|
+
featureLayer: n ?? {
|
|
357
366
|
itemId: "",
|
|
358
367
|
addLayers: !1,
|
|
359
368
|
layers: []
|
|
@@ -392,124 +401,124 @@ class u {
|
|
|
392
401
|
for (const s of e.featureLayer.layers)
|
|
393
402
|
this.llmFsLookup[e.featureLayer.itemId][s.id] = s;
|
|
394
403
|
}
|
|
395
|
-
for (const [s,
|
|
396
|
-
|
|
404
|
+
for (const [s, o] of Object.entries(this.buildSolution.items))
|
|
405
|
+
o.type === "Feature Layer (hosted, view)" && (this.llmFsLookup[s] = { ...this.llmFsLookup[o.source] });
|
|
397
406
|
i.title = e.solution.title, i.description = e.solution.description, i.tags = e.solution.tags;
|
|
398
407
|
const t = i.strings;
|
|
399
408
|
for (const s of e.solution.strings)
|
|
400
409
|
t[s.key] && (t[s.key].value = s.value);
|
|
401
|
-
const
|
|
410
|
+
const r = {}, l = /* @__PURE__ */ new Set(), n = this.buildSolution.items;
|
|
402
411
|
for (const s of e.items) {
|
|
403
|
-
const
|
|
404
|
-
if (
|
|
405
|
-
if (
|
|
406
|
-
this.applyWebMap(
|
|
407
|
-
else if (
|
|
408
|
-
this.applyFeatureService(
|
|
409
|
-
const
|
|
410
|
-
|
|
411
|
-
} else
|
|
412
|
+
const o = n[s.id];
|
|
413
|
+
if (o)
|
|
414
|
+
if (o.title = s.title, o.description = s.description, o.type === "Web Map")
|
|
415
|
+
this.applyWebMap(o);
|
|
416
|
+
else if (o.type === "Feature Layer (hosted)") {
|
|
417
|
+
this.applyFeatureService(o, s.id, !1);
|
|
418
|
+
const p = g(o);
|
|
419
|
+
o.data = p, r[s.id] = p;
|
|
420
|
+
} else o.type === "Feature Layer (hosted, view)" && (this.applyFeatureService(o, s.id, !0), l.add(s.id));
|
|
412
421
|
}
|
|
413
|
-
for (const s of
|
|
414
|
-
const
|
|
415
|
-
|
|
422
|
+
for (const s of l) {
|
|
423
|
+
const o = n[s];
|
|
424
|
+
o.data = r[o.source];
|
|
416
425
|
}
|
|
417
426
|
return this.structure;
|
|
418
427
|
}
|
|
419
428
|
applyWebMap(e) {
|
|
420
429
|
if (!e.layerSources)
|
|
421
430
|
return;
|
|
422
|
-
for (const
|
|
423
|
-
const [
|
|
424
|
-
s && (
|
|
431
|
+
for (const r of [...e.layers || [], ...e.tables || []]) {
|
|
432
|
+
const [l, n] = this.extractIdAndLayerId(r.url), s = this.llmFsLookup[l]?.[n];
|
|
433
|
+
s && (r.title = s.name);
|
|
425
434
|
}
|
|
426
435
|
if (!(e.layers?.length === 0 && e.tables?.length === 0))
|
|
427
436
|
return;
|
|
428
437
|
const t = crypto.randomUUID().replace(/-/gu, "").substring(0, 10);
|
|
429
|
-
for (const
|
|
430
|
-
const
|
|
431
|
-
if (
|
|
432
|
-
for (const [
|
|
433
|
-
const
|
|
434
|
-
id: `${t}-layer-${
|
|
438
|
+
for (const r of e.layerSources) {
|
|
439
|
+
const l = this.llmFsLookup[r];
|
|
440
|
+
if (l)
|
|
441
|
+
for (const [n, s] of Object.entries(l)) {
|
|
442
|
+
const o = Number(n), p = s.type.toLowerCase() === "table", d = {
|
|
443
|
+
id: `${t}-layer-${o}`,
|
|
435
444
|
title: s.name,
|
|
436
|
-
url: `{{${
|
|
437
|
-
itemId: `{{${
|
|
445
|
+
url: `{{${r}.layer${o}.url}}`,
|
|
446
|
+
itemId: `{{${r}.layer${o}.itemId}}`
|
|
438
447
|
};
|
|
439
|
-
|
|
448
|
+
p ? e.tables.push(d) : (d.layerType = "ArcGISFeatureLayer", e.layers.push(d));
|
|
440
449
|
}
|
|
441
450
|
}
|
|
442
451
|
}
|
|
443
452
|
extractIdAndLayerId(e) {
|
|
444
|
-
const i = e.replace(/[{}]/gu, "").split("."), t = i[0],
|
|
445
|
-
return [t,
|
|
453
|
+
const i = e.replace(/[{}]/gu, "").split("."), t = i[0], r = Number.parseInt(i[1].replace("layer", ""));
|
|
454
|
+
return [t, r];
|
|
446
455
|
}
|
|
447
456
|
applyFeatureService(e, i, t = !1) {
|
|
448
|
-
const
|
|
457
|
+
const r = e.source || i, l = this.llmFsLookup[r];
|
|
449
458
|
for (const s of [...e.service.layers, ...e.service.tables])
|
|
450
|
-
this.applyLayer(s,
|
|
451
|
-
e.addLayers && !t && this.addNewLayers(e,
|
|
452
|
-
const
|
|
453
|
-
t &&
|
|
459
|
+
this.applyLayer(s, l, t);
|
|
460
|
+
e.addLayers && !t && this.addNewLayers(e, l);
|
|
461
|
+
const n = e.service.layers?.length === 0 && e.service.tables?.length === 0;
|
|
462
|
+
t && n && this.addNewViewLayers(e, i, l);
|
|
454
463
|
}
|
|
455
464
|
addNewLayers(e, i) {
|
|
456
|
-
for (const [t,
|
|
457
|
-
const
|
|
458
|
-
this.applyLayer(
|
|
465
|
+
for (const [t, r] of Object.entries(i)) {
|
|
466
|
+
const n = { id: Number(t) };
|
|
467
|
+
this.applyLayer(n, i), r.type.toLowerCase() === "table" ? e.service.tables.push(n) : e.service.layers.push(n);
|
|
459
468
|
}
|
|
460
469
|
}
|
|
461
470
|
addNewViewLayers(e, i, t) {
|
|
462
|
-
const
|
|
463
|
-
for (const [
|
|
464
|
-
const s = Number(
|
|
471
|
+
const r = e.source;
|
|
472
|
+
for (const [l, n] of Object.entries(t)) {
|
|
473
|
+
const s = Number(l), o = n.type.toLowerCase() === "table", p = {
|
|
465
474
|
adminLayerInfo: {
|
|
466
|
-
geometryField:
|
|
475
|
+
geometryField: o ? null : { name: "Shape" },
|
|
467
476
|
viewLayerDefinition: {
|
|
468
|
-
sourceServiceName: `{{${
|
|
477
|
+
sourceServiceName: `{{${r}.name}}`,
|
|
469
478
|
sourceLayerId: s,
|
|
470
479
|
sourceLayerFields: "*"
|
|
471
480
|
}
|
|
472
481
|
},
|
|
473
482
|
id: s,
|
|
474
|
-
name:
|
|
483
|
+
name: n.name,
|
|
475
484
|
extent: `{{${i}.solutionExtent}}`,
|
|
476
485
|
maxRecordCount: 2e3
|
|
477
486
|
};
|
|
478
|
-
|
|
487
|
+
o ? e.service.tables.push(p) : e.service.layers.push(p);
|
|
479
488
|
}
|
|
480
489
|
}
|
|
481
490
|
applyLayer(e, i, t = !1) {
|
|
482
|
-
const
|
|
483
|
-
if (!
|
|
491
|
+
const r = i[e.id];
|
|
492
|
+
if (!r || (e.name = r.name, t))
|
|
484
493
|
return;
|
|
485
|
-
const
|
|
486
|
-
|
|
494
|
+
const l = u.typeLookup[r.type.toLowerCase()] || r.type;
|
|
495
|
+
l.toLowerCase() === "table" ? e.type = l : e.geometryType = l, e.editFieldsInfo = this.editFieldsInfo(), e.globalIdField = "globalid", e.objectIdField = "objectid", e.uniqueIdField = { name: "objectid", isSystemMaintained: !0 }, e.hasAttachments = !0, this.updateRelationships(e, i), this.updateFields(e, r), this.updateTemplates(e), this.updateDrawingInfo(e);
|
|
487
496
|
}
|
|
488
497
|
updateRelationships(e, i) {
|
|
489
498
|
const t = e.relationships || [];
|
|
490
|
-
for (const
|
|
491
|
-
const
|
|
492
|
-
|
|
499
|
+
for (const r of t) {
|
|
500
|
+
const l = i[r.relatedTableId];
|
|
501
|
+
l && (r.name = l.name);
|
|
493
502
|
}
|
|
494
503
|
}
|
|
495
504
|
updateFields(e, i) {
|
|
496
|
-
const t = [],
|
|
505
|
+
const t = [], r = [
|
|
497
506
|
[!1, i.customFields],
|
|
498
507
|
[!0, i.requiredFields],
|
|
499
508
|
[!0, i.systemFields]
|
|
500
509
|
];
|
|
501
|
-
for (const [
|
|
502
|
-
if (Array.isArray(
|
|
503
|
-
for (const s of
|
|
504
|
-
const
|
|
510
|
+
for (const [l, n] of r)
|
|
511
|
+
if (Array.isArray(n))
|
|
512
|
+
for (const s of n) {
|
|
513
|
+
const o = {
|
|
505
514
|
name: s.name,
|
|
506
515
|
alias: s.alias,
|
|
507
516
|
type: u.fieldTypeToEsri[s.type] || s.type,
|
|
508
517
|
description: JSON.stringify({ value: s.description, fieldValueType: "" }, null, 0),
|
|
509
518
|
domain: this.createDomain(s.choiceList, s.name),
|
|
510
|
-
required:
|
|
519
|
+
required: l
|
|
511
520
|
};
|
|
512
|
-
s.type?.toLowerCase() === "string" && (
|
|
521
|
+
s.type?.toLowerCase() === "string" && (o.length = s.length ?? 256), (s.type === "oid" || s.type === "globalid") && (o.editable = !1, o.nullable = !1), t.push(o);
|
|
513
522
|
}
|
|
514
523
|
e.fields = t;
|
|
515
524
|
}
|
|
@@ -525,7 +534,7 @@ class u {
|
|
|
525
534
|
}
|
|
526
535
|
updateDrawingInfo(e) {
|
|
527
536
|
if (e.drawingTool === "esriGeometryPoint")
|
|
528
|
-
e.drawingInfo =
|
|
537
|
+
e.drawingInfo = b();
|
|
529
538
|
else
|
|
530
539
|
return;
|
|
531
540
|
}
|
|
@@ -545,7 +554,7 @@ class u {
|
|
|
545
554
|
};
|
|
546
555
|
}
|
|
547
556
|
}
|
|
548
|
-
function
|
|
557
|
+
function g(a) {
|
|
549
558
|
const e = a.service, i = {
|
|
550
559
|
layers: [],
|
|
551
560
|
tables: []
|
|
@@ -553,19 +562,19 @@ function b(a) {
|
|
|
553
562
|
for (const t of e.layers || [])
|
|
554
563
|
i.layers.push({
|
|
555
564
|
id: t.id,
|
|
556
|
-
formInfo:
|
|
565
|
+
formInfo: m(t),
|
|
557
566
|
popupInfo: f(t),
|
|
558
|
-
layerDefinition:
|
|
567
|
+
layerDefinition: F(t)
|
|
559
568
|
});
|
|
560
569
|
for (const t of e.tables || [])
|
|
561
570
|
i.tables.push({
|
|
562
571
|
id: t.id,
|
|
563
|
-
formInfo:
|
|
572
|
+
formInfo: m(t),
|
|
564
573
|
popupInfo: f(t)
|
|
565
574
|
});
|
|
566
575
|
return i;
|
|
567
576
|
}
|
|
568
|
-
function
|
|
577
|
+
function m(a) {
|
|
569
578
|
const e = [];
|
|
570
579
|
for (const t of a.fields)
|
|
571
580
|
t.required || e.push({
|
|
@@ -573,7 +582,7 @@ function y(a) {
|
|
|
573
582
|
type: "field",
|
|
574
583
|
editableExpression: "expr/system/true",
|
|
575
584
|
fieldName: t.name,
|
|
576
|
-
inputType:
|
|
585
|
+
inputType: L(t.type, t.domain, t.length)
|
|
577
586
|
});
|
|
578
587
|
const i = a.relationships || [];
|
|
579
588
|
for (const t of i)
|
|
@@ -598,11 +607,11 @@ function y(a) {
|
|
|
598
607
|
}
|
|
599
608
|
function f(a) {
|
|
600
609
|
const e = [], i = [];
|
|
601
|
-
for (const
|
|
602
|
-
|
|
603
|
-
fieldName:
|
|
610
|
+
for (const r of a.fields)
|
|
611
|
+
r.required || i.push({
|
|
612
|
+
fieldName: r.name,
|
|
604
613
|
isEditable: !0,
|
|
605
|
-
label:
|
|
614
|
+
label: r.alias,
|
|
606
615
|
visible: !0
|
|
607
616
|
});
|
|
608
617
|
e.push({
|
|
@@ -612,14 +621,14 @@ function f(a) {
|
|
|
612
621
|
});
|
|
613
622
|
const t = a.relationships || [];
|
|
614
623
|
if (t.length && a.type !== "Table")
|
|
615
|
-
for (const
|
|
624
|
+
for (const r of t)
|
|
616
625
|
e.push({
|
|
617
626
|
type: "relationship",
|
|
618
627
|
description: "",
|
|
619
628
|
displayCount: 3,
|
|
620
629
|
displayType: "list",
|
|
621
630
|
orderByFields: [{ field: "created_date", order: "asc" }],
|
|
622
|
-
relationshipId:
|
|
631
|
+
relationshipId: r.id
|
|
623
632
|
});
|
|
624
633
|
return e.push({
|
|
625
634
|
type: "attachments",
|
|
@@ -632,10 +641,10 @@ function f(a) {
|
|
|
632
641
|
title: a.name
|
|
633
642
|
};
|
|
634
643
|
}
|
|
635
|
-
function
|
|
636
|
-
return a.geometryType === "esriGeometryPoint" ? { drawingInfo:
|
|
644
|
+
function F(a) {
|
|
645
|
+
return a.geometryType === "esriGeometryPoint" ? { drawingInfo: h() } : { drawingInfo: {} };
|
|
637
646
|
}
|
|
638
|
-
function
|
|
647
|
+
function L(a, e, i) {
|
|
639
648
|
return a === "esriFieldTypeString" && !e ? { type: "text-box", maxLength: i || 255, minLength: 0 } : a === "esriFieldTypeString" && e ? { type: "combo-box", noValueOptionLabel: "No value", showNoValueOption: !0 } : ["esriFieldTypeInteger", "esriFieldTypeDouble"].includes(a) ? { type: "text-box", minLength: 0 } : a === "esriFieldTypeDate" ? { type: "datetime-picker", includeTime: !1 } : { type: "text-box", maxLength: i || 255, minLength: 0 };
|
|
640
649
|
}
|
|
641
650
|
export {
|
|
@@ -48,7 +48,7 @@ Please review the draft design and let me know if you’d like to make any chang
|
|
|
48
48
|
\r
|
|
49
49
|
## Feature Layers\r
|
|
50
50
|
- Generate a detailed, normalized database schema for each Feature Layer\r
|
|
51
|
-
- Supported layer types: \`Point\`, \`
|
|
51
|
+
- Supported layer types: \`Point\`, \`Polyine\`, \`Polygon\`, \`Table\`\r
|
|
52
52
|
\r
|
|
53
53
|
### Layer Naming Rules\r
|
|
54
54
|
- Layer \`name\` values are user-facing and must be written in Title Case\r
|
|
@@ -59,9 +59,19 @@ Please review the draft design and let me know if you’d like to make any chang
|
|
|
59
59
|
- If \`addLayers: false\`:\r
|
|
60
60
|
- Layers cannot be added or removed\r
|
|
61
61
|
- Layer \`id\` values are immutable\r
|
|
62
|
+
- Do not edit the \`typeMutable\` property of layers\r
|
|
62
63
|
- If \`addLayers: true\`:\r
|
|
63
64
|
- Layers may be added or removed\r
|
|
64
65
|
- Each new layer must receive a unique \`id\` starting at 0\r
|
|
66
|
+
- Each new layer must have \`typeMutable\` property set to true\r
|
|
67
|
+
\r
|
|
68
|
+
### Layer Type Mutability Rule\r
|
|
69
|
+
- If \`typeMutable: true\`:\r
|
|
70
|
+
- The layer type must be chosen: \`Point\`, \`Polyline\`, \`Polygon\`, \`Table\`\r
|
|
71
|
+
- The layer type may be changed without restriction\r
|
|
72
|
+
- If \`typeMutable: false\`:\r
|
|
73
|
+
- The layer type may never be changed\r
|
|
74
|
+
- Requests to change the layer type should be ignored\r
|
|
65
75
|
\r
|
|
66
76
|
### Required Fields\r
|
|
67
77
|
- Fields in \`requiredFields\` are protected:\r
|