@esri/solutions-components 0.7.44 → 0.7.45

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. package/dist/cjs/calcite-alert_4.cjs.entry.js +1 -1
  2. package/dist/cjs/calcite-combobox_5.cjs.entry.js +1 -1
  3. package/dist/cjs/calcite-flow_5.cjs.entry.js +1 -1
  4. package/dist/cjs/card-manager_3.cjs.entry.js +3 -6
  5. package/dist/cjs/crowdsource-manager.cjs.entry.js +1 -1
  6. package/dist/cjs/crowdsource-reporter.cjs.entry.js +1 -1
  7. package/dist/cjs/{downloadUtils-abf7decd.js → downloadUtils-82bc9a04.js} +2 -2
  8. package/dist/cjs/{index.es-478ec781.js → index.es-79d8773c.js} +2 -2
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
  11. package/dist/cjs/{mapViewUtils-290dbc9e.js → mapViewUtils-3e0fa457.js} +4 -8
  12. package/dist/cjs/public-notification.cjs.entry.js +2 -2
  13. package/dist/cjs/solutions-components.cjs.js +1 -1
  14. package/dist/collection/components/layer-table/layer-table.js +2 -4
  15. package/dist/collection/utils/queryUtils.js +4 -8
  16. package/dist/collection/utils/queryUtils.ts +6 -9
  17. package/dist/components/layer-table2.js +2 -4
  18. package/dist/components/queryUtils.js +4 -8
  19. package/dist/esm/calcite-alert_4.entry.js +1 -1
  20. package/dist/esm/calcite-combobox_5.entry.js +1 -1
  21. package/dist/esm/calcite-flow_5.entry.js +1 -1
  22. package/dist/esm/card-manager_3.entry.js +3 -6
  23. package/dist/esm/crowdsource-manager.entry.js +1 -1
  24. package/dist/esm/crowdsource-reporter.entry.js +1 -1
  25. package/dist/esm/{downloadUtils-be13a13d.js → downloadUtils-3bab4b5f.js} +2 -2
  26. package/dist/esm/{index.es-623fddee.js → index.es-be703f2b.js} +2 -2
  27. package/dist/esm/loader.js +1 -1
  28. package/dist/esm/map-select-tools_3.entry.js +2 -2
  29. package/dist/esm/{mapViewUtils-a177d4f9.js → mapViewUtils-20504620.js} +4 -8
  30. package/dist/esm/public-notification.entry.js +2 -2
  31. package/dist/esm/solutions-components.js +1 -1
  32. package/dist/solutions-components/{p-f053c268.entry.js → p-4623754a.entry.js} +1 -1
  33. package/dist/solutions-components/{p-42233edc.entry.js → p-766c0b57.entry.js} +1 -1
  34. package/dist/solutions-components/{p-2bec3d88.js → p-91d3732f.js} +1 -1
  35. package/dist/solutions-components/{p-0c427d9a.entry.js → p-a4bb0787.entry.js} +1 -1
  36. package/dist/solutions-components/{p-c6af6407.entry.js → p-c05467fd.entry.js} +1 -1
  37. package/dist/solutions-components/p-c897e3eb.js +36 -0
  38. package/dist/solutions-components/{p-9294f273.entry.js → p-d561c970.entry.js} +1 -1
  39. package/dist/solutions-components/{p-dc4fcddc.js → p-d9995b7e.js} +2 -2
  40. package/dist/solutions-components/{p-32adb2cc.entry.js → p-dbb6f1e2.entry.js} +1 -1
  41. package/dist/solutions-components/{p-6fe5e1d5.entry.js → p-e46617d1.entry.js} +2 -2
  42. package/dist/solutions-components/{p-6c86a392.entry.js → p-e8cd89c2.entry.js} +1 -1
  43. package/dist/solutions-components/solutions-components.esm.js +1 -1
  44. package/dist/solutions-components/utils/queryUtils.ts +6 -9
  45. package/dist/types/components/layer-table/layer-table.d.ts +4 -4
  46. package/package.json +1 -1
  47. package/dist/solutions-components/p-3eedaead.js +0 -36
@@ -133,13 +133,14 @@ export async function queryFeaturesByID(
133
133
  const num = layer.capabilities?.query.maxRecordCount;
134
134
  const start = 0;
135
135
 
136
+ if (ids.length === 0) {
137
+ ids = await layer.queryObjectIds();
138
+ }
139
+
136
140
  const q = layer.createQuery();
137
- q.start = start;
138
141
  q.returnGeometry = returnGeometry;
139
142
  q.objectIds = ids.slice(start, num);
140
- if (num) {
141
- q.num = num;
142
- }
143
+
143
144
  if (outSpatialReference) {
144
145
  q.outSpatialReference = outSpatialReference;
145
146
  }
@@ -147,10 +148,6 @@ export async function queryFeaturesByID(
147
148
  q.outFields = fields;
148
149
  }
149
150
 
150
- if (ids.length === 0) {
151
- ids = await layer.queryObjectIds();
152
- }
153
-
154
151
  const result = await layer.queryFeatures(q);
155
152
 
156
153
  graphics = graphics.concat(
@@ -159,7 +156,7 @@ export async function queryFeaturesByID(
159
156
 
160
157
  const remainingIds = ids.slice(num, ids.length);
161
158
  return remainingIds.length > 0 ?
162
- queryFeaturesByID(remainingIds, layer, graphics, returnGeometry, outSpatialReference) :
159
+ queryFeaturesByID(remainingIds, layer, graphics, returnGeometry, outSpatialReference, fields) :
163
160
  Promise.resolve(graphics);
164
161
  }
165
162
 
@@ -93,6 +93,10 @@ export declare class LayerTable {
93
93
  * boolean: When true the selected feature will zoomed to in the map and the row will be scrolled to within the table
94
94
  */
95
95
  zoomAndScrollToSelected: boolean;
96
+ /**
97
+ * number[]: A list of all IDs for the current layer
98
+ */
99
+ _allIds: number[];
96
100
  /**
97
101
  * IToolSizeInfo[]: The controls that currently fit based on toolbar size
98
102
  */
@@ -142,10 +146,6 @@ export declare class LayerTable {
142
146
  * esri/widgets/FeatureTable/support/TableTemplate: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-support-TableTemplate.html
143
147
  */
144
148
  protected TableTemplate: typeof import("esri/widgets/FeatureTable/support/TableTemplate");
145
- /**
146
- * number[]: A list of all IDs for the current layer
147
- */
148
- protected _allIds: number[];
149
149
  /**
150
150
  * IColumnsInfo: Key/value pair with fieldname/(visible in table)
151
151
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/solutions-components",
3
- "version": "0.7.44",
3
+ "version": "0.7.45",
4
4
  "description": "Web Components for Esri's Solutions Applications",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1,36 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{a as t}from"./p-c1cf3ebc.js";
7
- /** @license
8
- * Copyright 2022 Esri
9
- *
10
- * Licensed under the Apache License, Version 2.0 (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * http://www.apache.org/licenses/LICENSE-2.0
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" BASIS,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- */async function n(t){const n=t.createQuery();return n.where=t.definitionExpression||"1=1",await t.queryObjectIds(n)}async function a(t,n){let a=[];const s=t?t.map((t=>async function(t,n){const a=n.createQuery();return a.spatialRelationship="intersects",a.geometry=t,n.queryObjectIds(a)}
22
- /** @license
23
- * Copyright 2022 Esri
24
- *
25
- * Licensed under the Apache License, Version 2.0 (the "License");
26
- * you may not use this file except in compliance with the License.
27
- * You may obtain a copy of the License at
28
- *
29
- * http://www.apache.org/licenses/LICENSE-2.0
30
- *
31
- * Unless required by applicable law or agreed to in writing, software
32
- * distributed under the License is distributed on an "AS IS" BASIS,
33
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34
- * See the License for the specific language governing permissions and
35
- * limitations under the License.
36
- */(t,n))):[Promise.resolve()];return(await Promise.all(s)).forEach((t=>{a=[...a,...t||[]]})),a}async function s(t,n,a,c,o,e){var i;const r=null===(i=n.capabilities)||void 0===i?void 0:i.query.maxRecordCount,u=n.createQuery();u.start=0,u.returnGeometry=c,u.objectIds=t.slice(0,r),r&&(u.num=r),o&&(u.outSpatialReference=o),e&&(u.outFields=e),0===t.length&&(t=await n.queryObjectIds());const f=await n.queryFeatures(u);a=a.concat(f.features);const w=t.slice(r,t.length);return w.length>0?s(w,n,a,c,o):Promise.resolve(a)}async function c(t,n){const a=n.globalIdField;if(!a)return[];const s=n.createQuery();return s.returnGeometry=!1,s.outFields=[n.objectIdField],s.where=t.map((t=>`${a} = '${t}'`)).join(" or "),(await n.queryFeatures(s)).features}async function o(t,n,a,s){const c=n.capabilities.query.maxRecordCount,e=n.createQuery();e.start=t,e.num=c,e.geometry=a;const i=await n.queryFeatures(e);return s[n.id]=s[n.id].concat(i.features),i.exceededTransferLimit?o(t+=c,n,a,s):Promise.resolve(s)}async function e(t,n,a){const s=t.createQuery();return s.where=n||"1=1",s.orderByFields=a,await t.queryObjectIds(s)}function i(t,n){return[...r(t,"polygon",n),...r(t,"polyline",n),...r(t,"point",n)]}function r(t,n,a){const s=(null==t?void 0:t.filter((t=>t.type===n)))||[];return s.length<=1?s:[a.union(s)]}async function u(t,n){let a;return await t.when((()=>{a=t.map.allLayers.toArray().reduce(((t,n)=>("feature"===n.type&&(t[n.id]={name:n.title,supportsUpdate:void 0}),t)),{})})),w(n,a,t)}async function f(t,n){let a;return await t.when((()=>{a=t.map.allTables.toArray().reduce(((t,n)=>(t[n.id]={name:n.title,supportsUpdate:void 0},t)),{})})),w(n,a,t)}async function w(t,n,a){if(t){const t={},s=Object.keys(n);for(let c=0;c<s.length;c++){const o=s[c],e=await l(a,o);await e.load(),await e.when(),t[o]={name:n[o].name,supportsUpdate:e.editingEnabled&&e.capabilities.operations.supportsUpdate}}return t}return n}async function y(t,n){const a=await l(t,n);return a?await t.whenLayerView(a):void 0}async function l(t,n){let a=[];return await t.when((()=>{a=[...t.map.allLayers.toArray(),...t.map.allTables.toArray()].filter((t=>t.id===n))})),a.length>0?a[0]:void 0}async function d(t){const n=t.map.allLayers.toArray();let a;return await t.when((()=>{a=n.map((n=>t.whenLayerView(n)))})),await Promise.allSettled(a),n}async function p(t,n,a,s=!1){return s&&(await j(t,n,a,!1),await new Promise((t=>setTimeout(t,1e3)))),n.highlight(t)}async function m(t){const n=b(t);return Object.keys(n).reduce(((t,a)=>{const s=n[a];return t.push(s.layerView.highlight(s.ids)),t}),[])}function b(n){return n.reduce(((n,a)=>{const s=a.layerView,c=null==s?void 0:s.layer.id;return c&&Object.keys(n).indexOf(c)>-1?n[c].ids=[...new Set([...a.selectedIds,...n[c].ids])]:c&&(n[c]={layerView:s,ids:a.selectedIds}),a.workflowType===t.REFINE&&Object.keys(a.refineInfos).forEach((t=>{const s=a.refineInfos[t];Object.keys(n).indexOf(t)>-1&&(n[t].ids=[...new Set([...s.addIds,...n[t].ids])],n[t].ids=n[t].ids.filter((t=>s.removeIds.indexOf(t)<0)))})),n}),{})}async function j(t,n,a,s=!0,c){const o=await async function(t,n){const a=n.createQuery();return a.objectIds=t,n.queryExtent(a)}(t,n.layer);await a.goTo(o.extent),s&&await async function(t,n,a){const s={objectIds:t};n.featureEffect=Object.assign(Object.assign({},a),{filter:s}),setTimeout((()=>{n.featureEffect=void 0}),1300)}(t,n,c)}export{d as a,y as b,j as c,u as d,n as e,e as f,l as g,p as h,c as i,a as j,i as k,o as l,b as m,m as n,f as o,s as q}