@deck.gl/carto
Advanced tools
Comparing version 8.7.9 to 8.8.0-alpha.2
@@ -203,3 +203,2 @@ "use strict"; | ||
columns = _ref5.columns, | ||
schema = _ref5.schema, | ||
clientId = _ref5.clientId, | ||
@@ -209,7 +208,2 @@ aggregationExp = _ref5.aggregationExp, | ||
var parameters = [(0, _mapsApiCommon.encodeParameter)('client', clientId || DEFAULT_CLIENT)]; | ||
if (schema) { | ||
parameters.push((0, _mapsApiCommon.encodeParameter)('schema', true)); | ||
} | ||
var sourceName = type === _mapsApiCommon.MAP_TYPES.QUERY ? 'q' : 'name'; | ||
@@ -243,3 +237,3 @@ parameters.push((0, _mapsApiCommon.encodeParameter)(sourceName, source)); | ||
_mapInstantiation = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee4(_ref6) { | ||
var type, source, connection, credentials, geoColumn, columns, schema, clientId, aggregationExp, aggregationResLevel, baseUrl, url, accessToken, body; | ||
var type, source, connection, credentials, geoColumn, columns, clientId, aggregationExp, aggregationResLevel, baseUrl, url, accessToken, body; | ||
return _regenerator.default.wrap(function _callee4$(_context4) { | ||
@@ -249,3 +243,3 @@ while (1) { | ||
case 0: | ||
type = _ref6.type, source = _ref6.source, connection = _ref6.connection, credentials = _ref6.credentials, geoColumn = _ref6.geoColumn, columns = _ref6.columns, schema = _ref6.schema, clientId = _ref6.clientId, aggregationExp = _ref6.aggregationExp, aggregationResLevel = _ref6.aggregationResLevel; | ||
type = _ref6.type, source = _ref6.source, connection = _ref6.connection, credentials = _ref6.credentials, geoColumn = _ref6.geoColumn, columns = _ref6.columns, clientId = _ref6.clientId, aggregationExp = _ref6.aggregationExp, aggregationResLevel = _ref6.aggregationResLevel; | ||
baseUrl = "".concat(credentials.mapsUrl, "/").concat(connection, "/").concat(type); | ||
@@ -257,3 +251,2 @@ url = "".concat(baseUrl, "?").concat(getParameters({ | ||
columns: columns, | ||
schema: schema, | ||
clientId: clientId, | ||
@@ -353,3 +346,3 @@ aggregationExp: aggregationExp, | ||
_fetchLayerData = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee5(_ref8) { | ||
var type, source, connection, credentials, geoColumn, columns, format, formatTiles, schema, clientId, aggregationExp, aggregationResLevel, _yield$_fetchDataUrl, url, accessToken, mapFormat, metadata, data, result; | ||
var type, source, connection, credentials, geoColumn, columns, format, formatTiles, clientId, aggregationExp, aggregationResLevel, _yield$_fetchDataUrl, url, accessToken, mapFormat, metadata, data, result; | ||
@@ -360,3 +353,3 @@ return _regenerator.default.wrap(function _callee5$(_context5) { | ||
case 0: | ||
type = _ref8.type, source = _ref8.source, connection = _ref8.connection, credentials = _ref8.credentials, geoColumn = _ref8.geoColumn, columns = _ref8.columns, format = _ref8.format, formatTiles = _ref8.formatTiles, schema = _ref8.schema, clientId = _ref8.clientId, aggregationExp = _ref8.aggregationExp, aggregationResLevel = _ref8.aggregationResLevel; | ||
type = _ref8.type, source = _ref8.source, connection = _ref8.connection, credentials = _ref8.credentials, geoColumn = _ref8.geoColumn, columns = _ref8.columns, format = _ref8.format, formatTiles = _ref8.formatTiles, clientId = _ref8.clientId, aggregationExp = _ref8.aggregationExp, aggregationResLevel = _ref8.aggregationResLevel; | ||
_context5.next = 3; | ||
@@ -372,3 +365,2 @@ return _fetchDataUrl({ | ||
formatTiles: formatTiles, | ||
schema: schema, | ||
clientId: clientId, | ||
@@ -396,12 +388,8 @@ aggregationExp: aggregationExp, | ||
data: data, | ||
format: mapFormat | ||
format: mapFormat, | ||
schema: metadata.schema | ||
}; | ||
if (schema) { | ||
result.schema = metadata.schema; | ||
} | ||
return _context5.abrupt("return", result); | ||
case 14: | ||
case 13: | ||
case "end": | ||
@@ -422,3 +410,3 @@ return _context5.stop(); | ||
_fetchDataUrl2 = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee6(_ref9) { | ||
var type, source, connection, credentials, geoColumn, columns, format, formatTiles, schema, clientId, aggregationExp, aggregationResLevel, defaultCredentials, localCreds, metadata, url, mapFormat, prioritizedFormats, _i, _prioritizedFormats, f, accessToken; | ||
var type, source, connection, credentials, geoColumn, columns, format, formatTiles, clientId, aggregationExp, aggregationResLevel, defaultCredentials, localCreds, metadata, url, mapFormat, prioritizedFormats, _i, _prioritizedFormats, f, accessToken; | ||
@@ -429,3 +417,3 @@ return _regenerator.default.wrap(function _callee6$(_context6) { | ||
case 0: | ||
type = _ref9.type, source = _ref9.source, connection = _ref9.connection, credentials = _ref9.credentials, geoColumn = _ref9.geoColumn, columns = _ref9.columns, format = _ref9.format, formatTiles = _ref9.formatTiles, schema = _ref9.schema, clientId = _ref9.clientId, aggregationExp = _ref9.aggregationExp, aggregationResLevel = _ref9.aggregationResLevel; | ||
type = _ref9.type, source = _ref9.source, connection = _ref9.connection, credentials = _ref9.credentials, geoColumn = _ref9.geoColumn, columns = _ref9.columns, format = _ref9.format, formatTiles = _ref9.formatTiles, clientId = _ref9.clientId, aggregationExp = _ref9.aggregationExp, aggregationResLevel = _ref9.aggregationResLevel; | ||
defaultCredentials = (0, _config.getDefaultCredentials)(); | ||
@@ -456,3 +444,2 @@ localCreds = _objectSpread(_objectSpread({}, defaultCredentials.apiVersion === _mapsApiCommon.API_VERSIONS.V3 && defaultCredentials), credentials); | ||
columns: columns, | ||
schema: schema, | ||
clientId: clientId, | ||
@@ -556,3 +543,2 @@ aggregationExp: aggregationExp, | ||
format: format, | ||
schema: false, | ||
clientId: clientId | ||
@@ -559,0 +545,0 @@ }); |
@@ -18,4 +18,2 @@ "use strict"; | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
@@ -33,2 +31,4 @@ | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _core = require("@deck.gl/core"); | ||
@@ -48,4 +48,7 @@ | ||
var _excluded = ["type", "data", "clientId", "credentials"]; | ||
var _utils = require("../utils"); | ||
var _excluded = ["type", "data", "clientId", "credentials", "connection"], | ||
_excluded2 = ["data"]; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } | ||
@@ -174,3 +177,3 @@ | ||
var _updateData2 = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee() { | ||
var _this$props, type, source, clientId, credentials, rest, localConfig, apiVersion, result; | ||
var _this$props$onDataLoa, _this$props2, _this$props, type, source, clientId, credentials, connection, rest, localConfig, apiVersion, result; | ||
@@ -182,3 +185,3 @@ return _regenerator.default.wrap(function _callee$(_context) { | ||
_context.prev = 0; | ||
_this$props = this.props, type = _this$props.type, source = _this$props.data, clientId = _this$props.clientId, credentials = _this$props.credentials, rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded); | ||
_this$props = this.props, type = _this$props.type, source = _this$props.data, clientId = _this$props.clientId, credentials = _this$props.credentials, connection = _this$props.connection, rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded); | ||
localConfig = _objectSpread(_objectSpread({}, (0, _config.getDefaultCredentials)()), credentials); | ||
@@ -213,3 +216,4 @@ apiVersion = localConfig.apiVersion; | ||
clientId: clientId, | ||
credentials: credentials | ||
credentials: credentials, | ||
connection: connection | ||
}, rest)); | ||
@@ -224,3 +228,6 @@ | ||
})); | ||
this.props.onDataLoad(result.data); | ||
(_this$props$onDataLoa = (_this$props2 = this.props).onDataLoad) === null || _this$props$onDataLoa === void 0 ? void 0 : _this$props$onDataLoa.call(_this$props2, result.data, { | ||
propName: 'data', | ||
layer: this | ||
}); | ||
_context.next = 25; | ||
@@ -262,2 +269,3 @@ break; | ||
value: function _getSubLayerAndProps() { | ||
(0, _utils.assert)(this.state); | ||
var _this$state = this.state, | ||
@@ -268,9 +276,10 @@ data = _this$state.data, | ||
var uniqueIdProperty = defaultProps.uniqueIdProperty; | ||
var _this$props3 = this.props, | ||
_notUsed = _this$props3.data, | ||
propsNoData = (0, _objectWithoutProperties2.default)(_this$props3, _excluded2); | ||
var props = _objectSpread({ | ||
uniqueIdProperty: uniqueIdProperty | ||
}, this.props); | ||
}, propsNoData); | ||
delete props.data; | ||
if (apiVersion === _api.API_VERSIONS.V1 || apiVersion === _api.API_VERSIONS.V2) { | ||
@@ -291,2 +300,3 @@ return [_geoLayers.MVTLayer, props]; | ||
value: function renderLayers() { | ||
(0, _utils.assert)(this.state); | ||
var data = this.state.data; | ||
@@ -312,4 +322,4 @@ if (!data) return null; | ||
exports.default = CartoLayer; | ||
CartoLayer.layerName = 'CartoLayer'; | ||
CartoLayer.defaultProps = defaultProps; | ||
(0, _defineProperty2.default)(CartoLayer, "layerName", 'CartoLayer'); | ||
(0, _defineProperty2.default)(CartoLayer, "defaultProps", defaultProps); | ||
//# sourceMappingURL=carto-layer.js.map |
@@ -109,3 +109,2 @@ import { getDefaultCredentials, buildMapsUrlFromBase } from '../config'; | ||
columns, | ||
schema, | ||
clientId, | ||
@@ -116,7 +115,2 @@ aggregationExp, | ||
const parameters = [encodeParameter('client', clientId || DEFAULT_CLIENT)]; | ||
if (schema) { | ||
parameters.push(encodeParameter('schema', true)); | ||
} | ||
const sourceName = type === MAP_TYPES.QUERY ? 'q' : 'name'; | ||
@@ -151,3 +145,2 @@ parameters.push(encodeParameter(sourceName, source)); | ||
columns, | ||
schema, | ||
clientId, | ||
@@ -163,3 +156,2 @@ aggregationExp, | ||
columns, | ||
schema, | ||
clientId, | ||
@@ -244,3 +236,2 @@ aggregationExp, | ||
formatTiles, | ||
schema, | ||
clientId, | ||
@@ -264,3 +255,2 @@ aggregationExp, | ||
formatTiles, | ||
schema, | ||
clientId, | ||
@@ -277,9 +267,5 @@ aggregationExp, | ||
data, | ||
format: mapFormat | ||
format: mapFormat, | ||
schema: metadata.schema | ||
}; | ||
if (schema) { | ||
result.schema = metadata.schema; | ||
} | ||
return result; | ||
@@ -297,3 +283,2 @@ } | ||
formatTiles, | ||
schema, | ||
clientId, | ||
@@ -329,3 +314,2 @@ aggregationExp, | ||
columns, | ||
schema, | ||
clientId, | ||
@@ -392,3 +376,2 @@ aggregationExp, | ||
format, | ||
schema: false, | ||
clientId | ||
@@ -395,0 +378,0 @@ }); |
@@ -0,1 +1,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import { CompositeLayer, log } from '@deck.gl/core'; | ||
@@ -8,2 +9,3 @@ import CartoTileLayer from './carto-tile-layer'; | ||
import { getDefaultCredentials } from '../config'; | ||
import { assert } from '../utils'; | ||
const defaultProps = { | ||
@@ -107,2 +109,4 @@ data: null, | ||
try { | ||
var _this$props$onDataLoa, _this$props; | ||
const { | ||
@@ -113,2 +117,3 @@ type, | ||
credentials, | ||
connection, | ||
...rest | ||
@@ -129,3 +134,3 @@ } = this.props; | ||
source, | ||
credentials | ||
credentials: credentials | ||
}) | ||
@@ -138,3 +143,4 @@ }; | ||
clientId, | ||
credentials, | ||
credentials: credentials, | ||
connection: connection, | ||
...rest | ||
@@ -147,3 +153,6 @@ }); | ||
}); | ||
this.props.onDataLoad(result.data); | ||
(_this$props$onDataLoa = (_this$props = this.props).onDataLoad) === null || _this$props$onDataLoa === void 0 ? void 0 : _this$props$onDataLoa.call(_this$props, result.data, { | ||
propName: 'data', | ||
layer: this | ||
}); | ||
} catch (err) { | ||
@@ -159,2 +168,3 @@ if (this.props.onDataError) { | ||
_getSubLayerAndProps() { | ||
assert(this.state); | ||
const { | ||
@@ -168,7 +178,10 @@ data, | ||
} = defaultProps; | ||
const { | ||
data: _notUsed, | ||
...propsNoData | ||
} = this.props; | ||
const props = { | ||
uniqueIdProperty, | ||
...this.props | ||
...propsNoData | ||
}; | ||
delete props.data; | ||
@@ -189,2 +202,3 @@ if (apiVersion === API_VERSIONS.V1 || apiVersion === API_VERSIONS.V2) { | ||
renderLayers() { | ||
assert(this.state); | ||
const { | ||
@@ -208,4 +222,6 @@ data | ||
} | ||
CartoLayer.layerName = 'CartoLayer'; | ||
CartoLayer.defaultProps = defaultProps; | ||
_defineProperty(CartoLayer, "layerName", 'CartoLayer'); | ||
_defineProperty(CartoLayer, "defaultProps", defaultProps); | ||
//# sourceMappingURL=carto-layer.js.map |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "8.7.9", | ||
"version": "8.8.0-alpha.2", | ||
"publishConfig": { | ||
@@ -35,8 +35,8 @@ "access": "public" | ||
"dependencies": { | ||
"@loaders.gl/gis": "^3.1.5", | ||
"@loaders.gl/loader-utils": "^3.1.5", | ||
"@loaders.gl/mvt": "^3.1.5", | ||
"@loaders.gl/tiles": "^3.1.5", | ||
"@loaders.gl/gis": "^3.2.0-alpha.4", | ||
"@loaders.gl/loader-utils": "^3.2.0-alpha.4", | ||
"@loaders.gl/mvt": "^3.2.0-alpha.4", | ||
"@loaders.gl/tiles": "^3.2.0-alpha.4", | ||
"@luma.gl/constants": "^8.5.10", | ||
"@math.gl/web-mercator": "^3.5.7", | ||
"@math.gl/web-mercator": "3.6.0-alpha.5", | ||
"cartocolor": "^4.0.2", | ||
@@ -58,7 +58,8 @@ "d3-array": "^2.8.0", | ||
"@deck.gl/core": "^8.0.0", | ||
"@deck.gl/extensions": "^8.0.0", | ||
"@deck.gl/geo-layers": "^8.0.0", | ||
"@deck.gl/layers": "^8.0.0", | ||
"@loaders.gl/core": "^3.1.5" | ||
"@loaders.gl/core": "^3.0.0" | ||
}, | ||
"gitHead": "c060732d18d0dcf68b277da889a79bc428aca347" | ||
"gitHead": "a52215449dff06fb683f5afd6399526353d11f35" | ||
} |
@@ -23,4 +23,4 @@ export const DEFAULT_USER_COMPONENT_IN_URL = '{user}'; | ||
export type MapType = ValuesOf<typeof MAP_TYPES>; | ||
export const COLUMNS_SUPPORT = [MAP_TYPES.TABLE]; | ||
export const GEO_COLUMN_SUPPORT = [MAP_TYPES.QUERY, MAP_TYPES.TABLE]; | ||
export const COLUMNS_SUPPORT: MapType[] = [MAP_TYPES.TABLE]; | ||
export const GEO_COLUMN_SUPPORT: MapType[] = [MAP_TYPES.QUERY, MAP_TYPES.TABLE]; | ||
@@ -63,3 +63,3 @@ // AVAILABLE FORMATS | ||
size?: number; | ||
schema?: SchemaField[]; | ||
schema: SchemaField[]; | ||
} | ||
@@ -66,0 +66,0 @@ |
@@ -115,3 +115,2 @@ /** | ||
columns?: string[]; | ||
schema?: boolean; | ||
clientId?: string; | ||
@@ -132,3 +131,2 @@ format?: Format; | ||
columns, | ||
schema, | ||
clientId, | ||
@@ -139,5 +137,2 @@ aggregationExp, | ||
const parameters = [encodeParameter('client', clientId || DEFAULT_CLIENT)]; | ||
if (schema) { | ||
parameters.push(encodeParameter('schema', true)); | ||
} | ||
@@ -170,3 +165,2 @@ const sourceName = type === MAP_TYPES.QUERY ? 'q' : 'name'; | ||
columns, | ||
schema, | ||
clientId, | ||
@@ -182,3 +176,2 @@ aggregationExp, | ||
columns, | ||
schema, | ||
clientId, | ||
@@ -256,4 +249,4 @@ aggregationExp, | ||
data: any; | ||
format: Format; | ||
schema?: SchemaField[]; | ||
format?: Format; | ||
schema: SchemaField[]; | ||
} | ||
@@ -269,3 +262,2 @@ export async function fetchLayerData({ | ||
formatTiles, | ||
schema, | ||
clientId, | ||
@@ -286,3 +278,2 @@ aggregationExp, | ||
formatTiles, | ||
schema, | ||
clientId, | ||
@@ -294,7 +285,3 @@ aggregationExp, | ||
const data = await requestData({url, format: mapFormat, accessToken}); | ||
const result: FetchLayerDataResult = {data, format: mapFormat}; | ||
if (schema) { | ||
result.schema = metadata.schema; | ||
} | ||
const result: FetchLayerDataResult = {data, format: mapFormat, schema: metadata.schema}; | ||
return result; | ||
@@ -312,3 +299,2 @@ } | ||
formatTiles, | ||
schema, | ||
clientId, | ||
@@ -347,3 +333,2 @@ aggregationExp, | ||
columns, | ||
schema, | ||
clientId, | ||
@@ -404,3 +389,2 @@ aggregationExp, | ||
format, | ||
schema: false, | ||
clientId | ||
@@ -407,0 +391,0 @@ }); |
@@ -19,1 +19,3 @@ export {getDefaultCredentials, setDefaultCredentials} from './config'; | ||
} from './api'; | ||
export type {CartoLayerProps} from './layers/carto-layer'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2990192
19
50438
3
+ Added@math.gl/web-mercator@3.6.0-alpha.5(transitive)