@esri/arcgis-rest-feature-service
Advanced tools
Comparing version 1.17.0 to 1.17.1
/* @preserve | ||
* @esri/arcgis-rest-feature-service - v1.17.0 - Apache-2.0 | ||
* @esri/arcgis-rest-feature-service - v1.17.1 - Apache-2.0 | ||
* Copyright (c) 2017-2019 Esri, Inc. | ||
* Mon Feb 25 2019 11:04:56 GMT-0800 (Pacific Standard Time) | ||
* Mon Mar 04 2019 21:08:38 GMT-0800 (Pacific Standard Time) | ||
*/ | ||
@@ -6,0 +6,0 @@ (function (global, factory) { |
/* @preserve | ||
* @esri/arcgis-rest-feature-service - v1.17.0 - Apache-2.0 | ||
* @esri/arcgis-rest-feature-service - v1.17.1 - Apache-2.0 | ||
* Copyright (c) 2017-2019 Esri, Inc. | ||
* Mon Feb 25 2019 11:04:59 GMT-0800 (Pacific Standard Time) | ||
* Mon Mar 04 2019 21:08:41 GMT-0800 (Pacific Standard Time) | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@esri/arcgis-rest-request")):"function"==typeof define&&define.amd?define(["exports","@esri/arcgis-rest-request"],t):t(e.arcgisRest=e.arcgisRest||{},e.arcgisRest)}(this,function(e,t){"use strict";var a=function(){return(a=Object.assign||function(e){for(var t,a=1,r=arguments.length;a<r;a++)for(var s in t=arguments[a])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};function r(e,a){return t.request(t.cleanUrl(e),a)}function s(e,t){var a=t.codedValues.find(function(t){return e===t.code});return a?a.name:e}e.getFeature=function(e){var r=t.cleanUrl(e.url)+"/"+e.id,s=a({httpMethod:"GET"},e);return t.request(r,s).then(function(e){return s.rawResponse?e:e.feature})},e.queryFeatures=function(e){var r=a({params:{},httpMethod:"GET",url:e.url},e);return t.appendCustomParams(e,r),r.params.where||(r.params.where="1=1"),r.params.outFields||(r.params.outFields="*"),t.request(t.cleanUrl(r.url)+"/query",r)},e.addFeatures=function(e){var r=t.cleanUrl(e.url)+"/addFeatures",s=a({params:{}},e);return t.appendCustomParams(e,s),s.params.adds&&s.params.adds.length&&(s.params.features=e.adds,delete s.params.adds,t.warn("The `adds` parameter is deprecated and will be removed in a future release. Please use `features` instead.")),t.request(r,s)},e.updateFeatures=function(e){var r=t.cleanUrl(e.url)+"/updateFeatures",s=a({params:{}},e);return t.appendCustomParams(e,s),s.params.updates&&s.params.updates.length&&(s.params.features=e.updates,delete s.params.updates,t.warn("The `updates` parameter is deprecated and will be removed in a future release. Please use `features` instead.")),t.request(r,s)},e.deleteFeatures=function(e){var r=t.cleanUrl(e.url)+"/deleteFeatures",s=a({params:{}},e);return t.appendCustomParams(e,s),s.params.deletes&&s.params.deletes.length&&(s.params.objectIds=e.deletes,delete s.params.deletes,t.warn("The `deletes` parameter is deprecated and will be removed in a future release. Please use `objectIds` instead.")),t.request(r,s)},e.getAttachments=function(e){return t.request(t.cleanUrl(e.url)+"/"+e.featureId+"/attachments",e)},e.addAttachment=function(e){var r=a({params:{}},e);return r.params.attachment=e.attachment,t.request(t.cleanUrl(r.url)+"/"+r.featureId+"/addAttachment",r)},e.updateAttachment=function(e){var r=a({params:{}},e);return r.params.attachment=e.attachment,r.params.attachmentId=e.attachmentId,t.request(t.cleanUrl(r.url)+"/"+r.featureId+"/updateAttachment",r)},e.deleteAttachments=function(e){var r=a({params:{}},e);return r.params.attachmentIds=e.attachmentIds,t.request(t.cleanUrl(r.url)+"/"+r.featureId+"/deleteAttachments",r)},e.queryRelated=function(e){var r=a({params:{},httpMethod:"GET",url:e.url},e);return t.appendCustomParams(e,r),r.params.definitionExpression||(r.params.definitionExpression="1=1"),r.params.outFields||(r.params.outFields="*"),r.params.relationshipId||(r.params.relationshipId=0),t.request(t.cleanUrl(r.url)+"/queryRelatedRecords",r)},e.getLayer=r,e.decodeValues=function(e){return new Promise(function(t){if(!e.fields)return r(e.url,e).then(function(a){t(e.fields=a.fields)});t(e.fields)}).then(function(t){var r=function(e){return e.reduce(function(e,t){var a=t.domain;return a&&"codedValue"===a.type&&(e[t.name]=a),e},{})}(t);if(Object.keys(r).length<1)return e.queryResponse;var n=e.queryResponse.features.map(function(e){var t={};for(var n in e.attributes)if(e.attributes.hasOwnProperty(n)){var u=e.attributes[n],d=r[n];t[n]=null!==u&&d?s(u,d):u}return a({},e,{attributes:t})});return a({},e.queryResponse,{features:n})})},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=feature-service.umd.min.js.map |
{ | ||
"name": "@esri/arcgis-rest-feature-service", | ||
"version": "1.17.0", | ||
"version": "1.17.1", | ||
"description": "Feature service helpers for @esri/arcgis-rest-request", | ||
@@ -18,4 +18,4 @@ "main": "dist/node/index.js", | ||
"devDependencies": { | ||
"@esri/arcgis-rest-common-types": "^1.17.0", | ||
"@esri/arcgis-rest-request": "^1.17.0" | ||
"@esri/arcgis-rest-common-types": "^1.17.1", | ||
"@esri/arcgis-rest-request": "^1.17.1" | ||
}, | ||
@@ -53,3 +53,11 @@ "peerDependencies": { | ||
}, | ||
"homepage": "https://github.com/Esri/arcgis-rest-js#readme" | ||
"homepage": "https://github.com/Esri/arcgis-rest-js#readme", | ||
"keywords": [ | ||
"typescript", | ||
"promise", | ||
"fetch", | ||
"arcgis", | ||
"esri", | ||
"ES6" | ||
] | ||
} |
@@ -63,3 +63,3 @@ [![npm version][npm-img]][npm-url] | ||
Copyright © 2017-2018 Esri | ||
Copyright © 2017-2019 Esri | ||
@@ -66,0 +66,0 @@ Licensed under the Apache License, Version 2.0 (the "License"); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
173359