@esri/solutions-components 5.1.0-next.108 → 5.1.0-next.109

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.
Files changed (59) hide show
  1. package/dist/cdn/{VWBA3XZ2.js → 4H6WLS2C.js} +1 -1
  2. package/dist/cdn/{CEMYU2JD.js → 6OCDWG7P.js} +1 -1
  3. package/dist/cdn/{TH43LXE6.js → AO6CNZVY.js} +1 -1
  4. package/dist/cdn/{4HRSTRIB.js → CTGCWSCT.js} +122 -123
  5. package/dist/cdn/{WQSFLIHK.js → KRFMW3F6.js} +1 -1
  6. package/dist/cdn/{GEMYMMEI.js → RTENTU3I.js} +2 -2
  7. package/dist/cdn/{EBC42SEO.js → VUOLILJK.js} +1 -1
  8. package/dist/cdn/{IY4475HT.js → WPB3VJUM.js} +1 -1
  9. package/dist/cdn/WPGT2HLS.js +2 -0
  10. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ar.json +1 -1
  11. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bg.json +1 -1
  12. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bs.json +1 -1
  13. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ca.json +1 -1
  14. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.cs.json +1 -1
  15. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.da.json +1 -1
  16. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.de.json +1 -1
  17. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.el.json +1 -1
  18. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.es.json +1 -1
  19. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.et.json +1 -1
  20. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fi.json +1 -1
  21. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fr.json +1 -1
  22. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.he.json +1 -1
  23. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hr.json +1 -1
  24. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hu.json +1 -1
  25. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.id.json +1 -1
  26. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.it.json +1 -1
  27. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ja.json +1 -1
  28. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ko.json +1 -1
  29. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lt.json +1 -1
  30. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lv.json +1 -1
  31. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.nl.json +1 -1
  32. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.no.json +1 -1
  33. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pl.json +1 -1
  34. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-BR.json +1 -1
  35. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-PT.json +1 -1
  36. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ro.json +1 -1
  37. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ru.json +1 -1
  38. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sk.json +1 -1
  39. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sl.json +1 -1
  40. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sr.json +1 -1
  41. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sv.json +1 -1
  42. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.th.json +1 -1
  43. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.tr.json +1 -1
  44. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.uk.json +1 -1
  45. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.vi.json +1 -1
  46. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-CN.json +1 -1
  47. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-HK.json +1 -1
  48. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-TW.json +1 -1
  49. package/dist/cdn/index.js +1 -1
  50. package/dist/chunks/converter.js +227 -249
  51. package/dist/chunks/solution-deploy-dialog.js +1 -1
  52. package/dist/components/arcgis-solutions-assistant/customElement.js +9079 -8664
  53. package/dist/components/map-draw-tools/customElement.js +5 -5
  54. package/dist/docs/api.json +1 -1
  55. package/dist/docs/docs.json +1 -1
  56. package/dist/docs/web-types.json +1 -1
  57. package/dist/solutions-components_commit.txt +8 -5
  58. package/package.json +1 -1
  59. package/dist/cdn/GKT3GU2L.js +0 -2
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- function u() {
2
+ function m() {
3
3
  return {
4
4
  renderer: {
5
5
  type: "simple",
@@ -248,7 +248,7 @@ function u() {
248
248
  }
249
249
  };
250
250
  }
251
- function _() {
251
+ function h() {
252
252
  return {
253
253
  renderer: {
254
254
  type: "simple",
@@ -265,19 +265,19 @@ function _() {
265
265
  }
266
266
  };
267
267
  }
268
- class p {
268
+ class u {
269
269
  constructor(e) {
270
- this.llm_fs_lookup = {}, this.structure = e, this._s = this.structure?.buildSolution;
270
+ this.llmFsLookup = {}, this.structure = e, this.buildSolution = this.structure?.buildSolution;
271
271
  }
272
272
  static {
273
- this.TYPE_LOOKUP = {
273
+ this.typeLookup = {
274
274
  point: "esriGeometryPoint",
275
275
  polyline: "esriGeometryPolyline",
276
276
  polygon: "esriGeometryPolygon"
277
277
  };
278
278
  }
279
279
  static {
280
- this.DRAWING_TOOL_LOOKUP = {
280
+ this.drawingToolLookup = {
281
281
  esriGeometryPoint: "esriFeatureEditToolPoint",
282
282
  esriGeometryPolyline: "esriFeatureEditToolLine",
283
283
  esriGeometryPolygon: "esriFeatureEditToolPolygon",
@@ -285,7 +285,7 @@ class p {
285
285
  };
286
286
  }
287
287
  static {
288
- this.FIELD_TYPE_TO_ESRI = {
288
+ this.fieldTypeToEsri = {
289
289
  string: "esriFieldTypeString",
290
290
  integer: "esriFieldTypeInteger",
291
291
  double: "esriFieldTypeDouble",
@@ -296,84 +296,84 @@ class p {
296
296
  };
297
297
  }
298
298
  static {
299
- this.FIELD_TYPE_TO_SIMPLE = Object.fromEntries(
300
- Object.entries(p.FIELD_TYPE_TO_ESRI).map(([e, t]) => [t, e])
299
+ this.fieldTypeToSimple = Object.fromEntries(
300
+ Object.entries(u.fieldTypeToEsri).map(([e, i]) => [i, e])
301
301
  );
302
302
  }
303
- dump_to_llm_template() {
304
- const e = this.structure?.buildSolution?.solution, t = Object.entries(e?.strings || {}).map(([s, r]) => ({
303
+ dumpToLlmTemplate() {
304
+ const e = this.structure?.buildSolution?.solution, i = Object.entries(e?.strings || {}).map(([s, r]) => ({
305
305
  key: s,
306
306
  value: r.value,
307
307
  description: r.description
308
- })), i = {
308
+ })), t = {
309
309
  title: e?.title,
310
310
  description: e?.description,
311
311
  tags: e?.tags,
312
- strings: t
313
- }, l = this.structure?.buildSolution?.items, o = Object.entries(l || {}).map(([s, r]) => ({
312
+ strings: i
313
+ }, o = this.structure?.buildSolution?.items, n = Object.entries(o || {}).map(([s, r]) => ({
314
314
  id: s,
315
315
  title: r.title,
316
316
  description: r.description,
317
317
  type: r.type
318
318
  }));
319
- let n = null;
320
- for (const [s, r] of Object.entries(l || {})) {
319
+ let l = null;
320
+ for (const [s, r] of Object.entries(o || {})) {
321
321
  if (r.type !== "Feature Layer (hosted)")
322
322
  continue;
323
- const a = [];
324
- for (const d of r.service?.layers || []) {
325
- const c = this._get_fields(d);
326
- a.push({
327
- id: d.id,
323
+ const d = [];
324
+ for (const p of r.service?.layers || []) {
325
+ const c = this.getFields(p);
326
+ d.push({
327
+ id: p.id,
328
328
  type: "",
329
- name: d.name,
329
+ name: p.name,
330
330
  customFields: [],
331
331
  requiredFields: c,
332
332
  systemFields: []
333
333
  });
334
334
  }
335
- for (const d of r.service?.tables || []) {
336
- const c = this._get_fields(d);
337
- a.push({
338
- id: d.id,
335
+ for (const p of r.service?.tables || []) {
336
+ const c = this.getFields(p);
337
+ d.push({
338
+ id: p.id,
339
339
  type: "Table",
340
- name: d.name,
340
+ name: p.name,
341
341
  customFields: [],
342
342
  requiredFields: c,
343
343
  systemFields: []
344
344
  });
345
345
  }
346
- n = {
346
+ l = {
347
347
  itemId: s,
348
348
  addLayers: r.addLayers,
349
- layers: a
349
+ layers: d
350
350
  };
351
351
  break;
352
352
  }
353
353
  return {
354
- solution: i,
355
- items: o,
356
- featureLayer: n ?? {
354
+ solution: t,
355
+ items: n,
356
+ featureLayer: l ?? {
357
357
  itemId: "",
358
358
  addLayers: !1,
359
359
  layers: []
360
360
  }
361
361
  };
362
362
  }
363
- _get_fields(e) {
364
- const t = [];
365
- for (const i of e.fields || [])
366
- t.push({
367
- name: i.name,
368
- type: p.FIELD_TYPE_TO_SIMPLE[i.type] || i.type,
369
- alias: i.alias,
370
- description: p._get_field_description(i.description),
371
- choiceList: p._get_field_domain(i.domain),
372
- length: i.length
363
+ getFields(e) {
364
+ const i = [];
365
+ for (const t of e.fields || [])
366
+ i.push({
367
+ name: t.name,
368
+ type: u.fieldTypeToSimple[t.type] || t.type,
369
+ alias: t.alias,
370
+ description: u.getFieldDescription(t.description),
371
+ choiceList: u.getFieldDomain(t.domain),
372
+ length: t.length
373
373
  });
374
- return t;
374
+ return i;
375
375
  }
376
- static _get_field_description(e) {
376
+ static getFieldDescription(e) {
377
377
  if (e)
378
378
  try {
379
379
  return JSON.parse(e).value || e;
@@ -381,159 +381,162 @@ class p {
381
381
  return e;
382
382
  }
383
383
  }
384
- static _get_field_domain(e) {
384
+ static getFieldDomain(e) {
385
385
  if (e)
386
- return e.codedValues?.map((t) => t.code);
386
+ return e.codedValues?.map((i) => i.code);
387
387
  }
388
- apply_llm_template(e) {
389
- const t = this._s.solution;
390
- if (this.llm_fs_lookup = {}, e.featureLayer?.itemId) {
391
- this.llm_fs_lookup[e.featureLayer.itemId] = {};
388
+ applyLlmTemplate(e) {
389
+ const i = this.buildSolution.solution;
390
+ if (this.llmFsLookup = {}, e.featureLayer?.itemId) {
391
+ this.llmFsLookup[e.featureLayer.itemId] = {};
392
392
  for (const s of e.featureLayer.layers)
393
- this.llm_fs_lookup[e.featureLayer.itemId][s.id] = s;
393
+ this.llmFsLookup[e.featureLayer.itemId][s.id] = s;
394
394
  }
395
- for (const [s, r] of Object.entries(this._s.items))
396
- r.type === "Feature Layer (hosted, view)" && (this.llm_fs_lookup[s] = { ...this.llm_fs_lookup[r.source] });
397
- t.title = e.solution.title, t.description = e.solution.description, t.tags = e.solution.tags;
398
- const i = t.strings;
395
+ for (const [s, r] of Object.entries(this.buildSolution.items))
396
+ r.type === "Feature Layer (hosted, view)" && (this.llmFsLookup[s] = { ...this.llmFsLookup[r.source] });
397
+ i.title = e.solution.title, i.description = e.solution.description, i.tags = e.solution.tags;
398
+ const t = i.strings;
399
399
  for (const s of e.solution.strings)
400
- i[s.key] && (i[s.key].value = s.value);
401
- const l = {}, o = /* @__PURE__ */ new Set(), n = this._s.items;
400
+ t[s.key] && (t[s.key].value = s.value);
401
+ const o = {}, n = /* @__PURE__ */ new Set(), l = this.buildSolution.items;
402
402
  for (const s of e.items) {
403
- const r = n[s.id];
403
+ const r = l[s.id];
404
404
  if (r)
405
405
  if (r.title = s.title, r.description = s.description, r.type === "Web Map")
406
- this._apply_web_map(r);
406
+ this.applyWebMap(r);
407
407
  else if (r.type === "Feature Layer (hosted)") {
408
- this._apply_feature_service(r, s.id, !1);
409
- const a = new y(r).generate_data();
410
- r.data = a, l[s.id] = a;
411
- } else r.type === "Feature Layer (hosted, view)" && (this._apply_feature_service(r, s.id, !0), o.add(s.id));
408
+ this.applyFeatureService(r, s.id, !1);
409
+ const d = b(r);
410
+ r.data = d, o[s.id] = d;
411
+ } else r.type === "Feature Layer (hosted, view)" && (this.applyFeatureService(r, s.id, !0), n.add(s.id));
412
412
  }
413
- for (const s of o) {
414
- const r = n[s];
415
- r.data = l[r.source];
413
+ for (const s of n) {
414
+ const r = l[s];
415
+ r.data = o[r.source];
416
416
  }
417
417
  return this.structure;
418
418
  }
419
- _apply_web_map(e) {
420
- if (!e.layerSources) return;
421
- for (const i of [...e.layers || [], ...e.tables || []]) {
422
- const [l, o] = this._extract_id_and_layid(i.url), n = this.llm_fs_lookup[l]?.[o];
423
- n && (i.title = n.name);
419
+ applyWebMap(e) {
420
+ if (!e.layerSources)
421
+ return;
422
+ for (const o of [...e.layers || [], ...e.tables || []]) {
423
+ const [n, l] = this.extractIdAndLayerId(o.url), s = this.llmFsLookup[n]?.[l];
424
+ s && (o.title = s.name);
424
425
  }
425
- if (e.layers?.length === 0 && e.tables?.length === 0)
426
- for (const i of e.layerSources) {
427
- const l = this.llm_fs_lookup[i];
428
- if (!l) continue;
429
- const o = crypto.randomUUID().replace(/-/g, "").substring(0, 10);
430
- for (const [n, s] of Object.entries(l)) {
431
- const r = Number(n), a = s.type.toLowerCase() === "table", d = {
432
- id: `${o}-layer-${r}`,
426
+ if (!(e.layers?.length === 0 && e.tables?.length === 0))
427
+ return;
428
+ const t = crypto.randomUUID().replace(/-/gu, "").substring(0, 10);
429
+ for (const o of e.layerSources) {
430
+ const n = this.llmFsLookup[o];
431
+ if (n)
432
+ for (const [l, s] of Object.entries(n)) {
433
+ const r = Number(l), d = s.type.toLowerCase() === "table", p = {
434
+ id: `${t}-layer-${r}`,
433
435
  title: s.name,
434
- url: `{{${i}.layer${r}.url}}`,
435
- itemId: `{{${i}.layer${r}.itemId}}`
436
+ url: `{{${o}.layer${r}.url}}`,
437
+ itemId: `{{${o}.layer${r}.itemId}}`
436
438
  };
437
- a ? e.tables.push(d) : (d.layerType = "ArcGISFeatureLayer", e.layers.push(d));
439
+ d ? e.tables.push(p) : (p.layerType = "ArcGISFeatureLayer", e.layers.push(p));
438
440
  }
439
- }
441
+ }
440
442
  }
441
- _extract_id_and_layid(e) {
442
- const t = e.replace(/[{}]/g, "").split("."), i = t[0], l = parseInt(t[1].replace("layer", ""));
443
- return [i, l];
443
+ extractIdAndLayerId(e) {
444
+ const i = e.replace(/[{}]/gu, "").split("."), t = i[0], o = Number.parseInt(i[1].replace("layer", ""));
445
+ return [t, o];
444
446
  }
445
- _apply_feature_service(e, t, i = !1) {
446
- const l = e.source || t, o = this.llm_fs_lookup[l];
447
+ applyFeatureService(e, i, t = !1) {
448
+ const o = e.source || i, n = this.llmFsLookup[o];
447
449
  for (const s of [...e.service.layers, ...e.service.tables])
448
- this._apply_layer(s, o, i);
449
- e.addLayers && !i && this._add_new_layers(e, o);
450
- const n = e.service.layers?.length === 0 && e.service.tables?.length === 0;
451
- i && n && this._add_new_view_layers(e, t, o);
450
+ this.applyLayer(s, n, t);
451
+ e.addLayers && !t && this.addNewLayers(e, n);
452
+ const l = e.service.layers?.length === 0 && e.service.tables?.length === 0;
453
+ t && l && this.addNewViewLayers(e, i, n);
452
454
  }
453
- _add_new_layers(e, t) {
454
- for (const [i, l] of Object.entries(t)) {
455
- const n = { id: Number(i) };
456
- this._apply_layer(n, t), l.type.toLowerCase() === "table" ? e.service.tables.push(n) : e.service.layers.push(n);
455
+ addNewLayers(e, i) {
456
+ for (const [t, o] of Object.entries(i)) {
457
+ const l = { id: Number(t) };
458
+ this.applyLayer(l, i), o.type.toLowerCase() === "table" ? e.service.tables.push(l) : e.service.layers.push(l);
457
459
  }
458
460
  }
459
- _add_new_view_layers(e, t, i) {
460
- const l = e.source;
461
- for (const [o, n] of Object.entries(i)) {
462
- const s = Number(o), r = n.type.toLowerCase() === "table", a = {
461
+ addNewViewLayers(e, i, t) {
462
+ const o = e.source;
463
+ for (const [n, l] of Object.entries(t)) {
464
+ const s = Number(n), r = l.type.toLowerCase() === "table", d = {
463
465
  adminLayerInfo: {
464
466
  geometryField: r ? null : { name: "Shape" },
465
467
  viewLayerDefinition: {
466
- sourceServiceName: `{{${l}.name}}`,
468
+ sourceServiceName: `{{${o}.name}}`,
467
469
  sourceLayerId: s,
468
470
  sourceLayerFields: "*"
469
471
  }
470
472
  },
471
473
  id: s,
472
- name: n.name,
473
- extent: `{{${t}.solutionExtent}}`,
474
+ name: l.name,
475
+ extent: `{{${i}.solutionExtent}}`,
474
476
  maxRecordCount: 2e3
475
477
  };
476
- r ? e.service.tables.push(a) : e.service.layers.push(a);
478
+ r ? e.service.tables.push(d) : e.service.layers.push(d);
477
479
  }
478
480
  }
479
- _apply_layer(e, t, i = !1) {
480
- const l = t[e.id];
481
- if (!l || (e.name = l.name, i)) return;
482
- const o = p.TYPE_LOOKUP[l.type.toLowerCase()] || l.type;
483
- o.toLowerCase() === "table" ? e.type = o : e.geometryType = o, e.editFieldsInfo = this._edit_fields_info(), e.globalIdField = "globalid", e.objectIdField = "objectid", e.uniqueIdField = { name: "objectid", isSystemMaintained: !0 }, e.hasAttachments = !0, this._update_relationships(e, t), this._update_fields(e, l), this._update_templates(e), this._update_drawing_info(e);
481
+ applyLayer(e, i, t = !1) {
482
+ const o = i[e.id];
483
+ if (!o || (e.name = o.name, t))
484
+ return;
485
+ const n = u.typeLookup[o.type.toLowerCase()] || o.type;
486
+ n.toLowerCase() === "table" ? e.type = n : e.geometryType = n, 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, o), this.updateTemplates(e), this.updateDrawingInfo(e);
484
487
  }
485
- _update_relationships(e, t) {
486
- const i = e.relationships || [];
487
- for (const l of i) {
488
- const o = t[l.relatedTableId];
489
- o && (l.name = o.name);
488
+ updateRelationships(e, i) {
489
+ const t = e.relationships || [];
490
+ for (const o of t) {
491
+ const n = i[o.relatedTableId];
492
+ n && (o.name = n.name);
490
493
  }
491
494
  }
492
- _update_fields(e, t) {
493
- const i = [], l = [
494
- [!1, t.customFields],
495
- [!0, t.requiredFields],
496
- [!0, t.systemFields]
495
+ updateFields(e, i) {
496
+ const t = [], o = [
497
+ [!1, i.customFields],
498
+ [!0, i.requiredFields],
499
+ [!0, i.systemFields]
497
500
  ];
498
- for (const [o, n] of l)
499
- if (Array.isArray(n))
500
- for (const s of n) {
501
+ for (const [n, l] of o)
502
+ if (Array.isArray(l))
503
+ for (const s of l) {
501
504
  const r = {
502
505
  name: s.name,
503
506
  alias: s.alias,
504
- type: p.FIELD_TYPE_TO_ESRI[s.type] || s.type,
507
+ type: u.fieldTypeToEsri[s.type] || s.type,
505
508
  description: JSON.stringify({ value: s.description, fieldValueType: "" }, null, 0),
506
- domain: this._create_domain(s.choiceList, s.name),
507
- required: o
509
+ domain: this.createDomain(s.choiceList, s.name),
510
+ required: n
508
511
  };
509
- s.type?.toLowerCase() === "string" && (r.length = s.length ?? 256), (s.type === "oid" || s.type === "globalid") && (r.editable = !1, r.nullable = !1), i.push(r);
512
+ s.type?.toLowerCase() === "string" && (r.length = s.length ?? 256), (s.type === "oid" || s.type === "globalid") && (r.editable = !1, r.nullable = !1), t.push(r);
510
513
  }
511
- e.fields = i;
514
+ e.fields = t;
512
515
  }
513
- _update_templates(e) {
514
- const t = p.DRAWING_TOOL_LOOKUP[e.geometryType || e.type];
516
+ updateTemplates(e) {
517
+ const i = u.drawingToolLookup[e.geometryType || e.type];
515
518
  e.templates ??= [{
516
519
  name: e.name,
517
520
  description: "",
518
521
  prototype: { attributes: {} }
519
522
  }];
520
- for (const i of e.templates)
521
- i.drawingTool = t;
523
+ for (const t of e.templates)
524
+ t.drawingTool = i;
522
525
  }
523
- _update_drawing_info(e) {
526
+ updateDrawingInfo(e) {
524
527
  if (e.drawingTool === "esriGeometryPoint")
525
- e.drawingInfo = _();
528
+ e.drawingInfo = h();
526
529
  else
527
530
  return;
528
531
  }
529
- _create_domain(e, t) {
532
+ createDomain(e, i) {
530
533
  return e ? {
531
534
  type: "codedValue",
532
- name: `${t}_${crypto.randomUUID().replace(/-/g, "")}`,
533
- codedValues: e.map((i) => ({ name: i, code: i }))
535
+ name: `${i}_${crypto.randomUUID().replace(/-/gu, "")}`,
536
+ codedValues: e.map((t) => ({ name: t, code: t }))
534
537
  } : null;
535
538
  }
536
- _edit_fields_info() {
539
+ editFieldsInfo() {
537
540
  return {
538
541
  creationDateField: "created_date",
539
542
  creatorField: "created_user",
@@ -542,124 +545,99 @@ class p {
542
545
  };
543
546
  }
544
547
  }
545
- class y {
546
- constructor(e) {
547
- this.item_def = e, this.source_service_props = this.item_def.service;
548
- }
549
- generate_data() {
550
- const e = {
551
- layers: [],
552
- tables: []
553
- };
554
- for (const t of this.source_service_props.layers || []) {
555
- const i = { id: t.id };
556
- i.formInfo = this._generate_form_info(t), i.popupInfo = this._generate_popup_info(t), i.layerDefinition = this._generate_drawing_info(t), e.layers.push(i);
557
- }
558
- for (const t of this.source_service_props.tables || []) {
559
- const i = { id: t.id };
560
- i.formInfo = this._generate_form_info(t), i.popupInfo = this._generate_popup_info(t), e.tables.push(i);
561
- }
562
- return e;
563
- }
564
- _generate_form_info(e) {
565
- const t = [];
566
- for (const o of e.fields) {
567
- if (o.required) continue;
568
- const n = {
569
- label: o.alias,
570
- type: "field",
571
- editableExpression: "expr/system/true",
572
- fieldName: o.name,
573
- inputType: this._get_input_type(o.type, o.domain, o.length)
574
- };
575
- t.push(n);
576
- }
577
- const i = e.relationships || [];
578
- for (const o of i)
579
- t.push({
580
- description: "",
581
- label: o.name,
548
+ function b(a) {
549
+ const e = a.service, i = {
550
+ layers: [],
551
+ tables: []
552
+ };
553
+ for (const t of e.layers || [])
554
+ i.layers.push({
555
+ id: t.id,
556
+ formInfo: y(t),
557
+ popupInfo: f(t),
558
+ layerDefinition: g(t)
559
+ });
560
+ for (const t of e.tables || [])
561
+ i.tables.push({
562
+ id: t.id,
563
+ formInfo: y(t),
564
+ popupInfo: f(t)
565
+ });
566
+ return i;
567
+ }
568
+ function y(a) {
569
+ const e = [];
570
+ for (const t of a.fields)
571
+ t.required || e.push({
572
+ label: t.alias,
573
+ type: "field",
574
+ editableExpression: "expr/system/true",
575
+ fieldName: t.name,
576
+ inputType: F(t.type, t.domain, t.length)
577
+ });
578
+ const i = a.relationships || [];
579
+ for (const t of i)
580
+ e.push({
581
+ description: "",
582
+ label: t.name,
583
+ type: "relationship",
584
+ displayCount: 3,
585
+ displayType: "list",
586
+ editableExpression: "expr/system/true",
587
+ orderByFields: [{ field: "created_date", order: "asc" }],
588
+ relationshipId: t.id
589
+ });
590
+ return {
591
+ formElements: e,
592
+ expressionInfos: [
593
+ { expression: "false", name: "expr/system/false", returnType: "boolean", title: "False" },
594
+ { expression: "true", name: "expr/system/true", returnType: "boolean", title: "True" }
595
+ ],
596
+ title: a.name
597
+ };
598
+ }
599
+ function f(a) {
600
+ const e = [], i = [];
601
+ for (const o of a.fields)
602
+ o.required || i.push({
603
+ fieldName: o.name,
604
+ isEditable: !0,
605
+ label: o.alias,
606
+ visible: !0
607
+ });
608
+ e.push({
609
+ type: "fields",
610
+ description: "",
611
+ fieldInfos: i
612
+ });
613
+ const t = a.relationships || [];
614
+ if (t.length && a.type !== "Table")
615
+ for (const o of t)
616
+ e.push({
582
617
  type: "relationship",
618
+ description: "",
583
619
  displayCount: 3,
584
620
  displayType: "list",
585
- editableExpression: "expr/system/true",
586
621
  orderByFields: [{ field: "created_date", order: "asc" }],
587
622
  relationshipId: o.id
588
623
  });
589
- return {
590
- formElements: t,
591
- expressionInfos: [
592
- {
593
- expression: "false",
594
- name: "expr/system/false",
595
- returnType: "boolean",
596
- title: "False"
597
- },
598
- {
599
- expression: "true",
600
- name: "expr/system/true",
601
- returnType: "boolean",
602
- title: "True"
603
- }
604
- ],
605
- title: e.name
606
- };
607
- }
608
- _generate_popup_info(e) {
609
- const t = [], i = [];
610
- for (const o of e.fields)
611
- o.required || i.push({
612
- fieldName: o.name,
613
- isEditable: !0,
614
- label: o.alias,
615
- visible: !0
616
- });
617
- t.push({
618
- type: "fields",
619
- description: "",
620
- fieldInfos: i
621
- });
622
- const l = e.relationships || [];
623
- if (l.length && e.type !== "Table")
624
- for (const o of l)
625
- t.push({
626
- type: "relationship",
627
- description: "",
628
- displayCount: 3,
629
- displayType: "list",
630
- orderByFields: [{ field: "created_date", order: "asc" }],
631
- relationshipId: o.id
632
- });
633
- return t.push({
634
- type: "attachments",
635
- description: "",
636
- displayType: "auto",
637
- title: ""
638
- }), {
639
- popupElements: t,
640
- showLastEditInfo: !1,
641
- title: ""
642
- };
643
- }
644
- _generate_drawing_info(e) {
645
- return e.geometryType === "esriGeometryPoint" ? { drawingInfo: u() } : { drawingInfo: {} };
646
- }
647
- _get_input_type(e, t, i) {
648
- return e === "esriFieldTypeString" && !t ? {
649
- type: "text-box",
650
- maxLength: i || 255,
651
- minLength: 0
652
- } : e === "esriFieldTypeString" && t ? {
653
- type: "combo-box",
654
- noValueOptionLabel: "No value",
655
- showNoValueOption: !0
656
- } : ["esriFieldTypeInteger", "esriFieldTypeDouble"].includes(e) ? { type: "text-box", minLength: 0 } : e === "esriFieldTypeDate" ? { type: "datetime-picker", includeTime: !1 } : {
657
- type: "text-box",
658
- maxLength: i || 255,
659
- minLength: 0
660
- };
661
- }
624
+ return e.push({
625
+ type: "attachments",
626
+ description: "",
627
+ displayType: "auto",
628
+ title: ""
629
+ }), {
630
+ popupElements: e,
631
+ showLastEditInfo: !1,
632
+ title: a.name
633
+ };
634
+ }
635
+ function g(a) {
636
+ return a.geometryType === "esriGeometryPoint" ? { drawingInfo: m() } : { drawingInfo: {} };
637
+ }
638
+ function F(a, e, i) {
639
+ 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 };
662
640
  }
663
641
  export {
664
- p as C
642
+ u as C
665
643
  };
@@ -205,7 +205,7 @@ class p extends D {
205
205
  const a = this.design?.sourceBuildSolution;
206
206
  return a ? new T({
207
207
  buildSolution: structuredClone(a)
208
- }).apply_llm_template(this.design)?.buildSolution ?? null : null;
208
+ }).applyLlmTemplate(this.design)?.buildSolution ?? null : null;
209
209
  } catch (a) {
210
210
  return console.warn("Unable to build params.buildSolution from design; deploying with standard params only.", a), null;
211
211
  }