@evergis/api 3.0.122 → 3.0.124

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/api.esm.js CHANGED
@@ -29,9 +29,6 @@ function _defineProperties(target, props) {
29
29
  function _createClass(Constructor, protoProps, staticProps) {
30
30
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
31
31
  if (staticProps) _defineProperties(Constructor, staticProps);
32
- Object.defineProperty(Constructor, "prototype", {
33
- writable: false
34
- });
35
32
  return Constructor;
36
33
  }
37
34
 
@@ -65,9 +62,6 @@ function _inherits(subClass, superClass) {
65
62
  configurable: true
66
63
  }
67
64
  });
68
- Object.defineProperty(subClass, "prototype", {
69
- writable: false
70
- });
71
65
  if (superClass) _setPrototypeOf(subClass, superClass);
72
66
  }
73
67
 
@@ -126,8 +120,6 @@ function _assertThisInitialized(self) {
126
120
  function _possibleConstructorReturn(self, call) {
127
121
  if (call && (typeof call === "object" || typeof call === "function")) {
128
122
  return call;
129
- } else if (call !== void 0) {
130
- throw new TypeError("Derived constructors may only return object or undefined");
131
123
  }
132
124
 
133
125
  return _assertThisInitialized(self);
@@ -161,7 +153,7 @@ function _superPropBase(object, property) {
161
153
  return object;
162
154
  }
163
155
 
164
- function _get() {
156
+ function _get(target, property, receiver) {
165
157
  if (typeof Reflect !== "undefined" && Reflect.get) {
166
158
  _get = Reflect.get;
167
159
  } else {
@@ -172,14 +164,14 @@ function _get() {
172
164
  var desc = Object.getOwnPropertyDescriptor(base, property);
173
165
 
174
166
  if (desc.get) {
175
- return desc.get.call(arguments.length < 3 ? target : receiver);
167
+ return desc.get.call(receiver);
176
168
  }
177
169
 
178
170
  return desc.value;
179
171
  };
180
172
  }
181
173
 
182
- return _get.apply(this, arguments);
174
+ return _get(target, property, receiver || target);
183
175
  }
184
176
 
185
177
  let HttpClient = /*#__PURE__*/function () {
@@ -975,8 +967,8 @@ let Notification = /*#__PURE__*/function (_NotificationService) {
975
967
  || event.code === 4002
976
968
  /* InvalidSession */
977
969
  ) {
978
- _this.connectStatus = ConnectionStatus.SessionClosed;
979
- } else if (_this.reconnectTries < _this.MAX_WS_RECONNECT_TRIES) {
970
+ _this.connectStatus = ConnectionStatus.SessionClosed;
971
+ } else if (_this.reconnectTries < _this.MAX_WS_RECONNECT_TRIES) {
980
972
  _this.connectStatus = ConnectionStatus.Break;
981
973
  _this.reconnectTries++;
982
974
 
@@ -1482,7 +1474,7 @@ let Scheduler = /*#__PURE__*/function (_SchedulerService) {
1482
1474
  const taskProgress = await this.getTaskProgress(id);
1483
1475
  this.resolveTaskStatus(taskProgress, resolve, reject);
1484
1476
 
1485
- const taskResultCallback = async _ref => {
1477
+ const taskResultCallback = async (_ref) => {
1486
1478
  let {
1487
1479
  data
1488
1480
  } = _ref;
@@ -3625,12 +3617,12 @@ let Resources = /*#__PURE__*/function () {
3625
3617
  }, {
3626
3618
  key: "getDependentNames",
3627
3619
  value: function getDependentNames(deps, depType) {
3628
- return deps.filter(_ref => {
3620
+ return deps.filter((_ref) => {
3629
3621
  let {
3630
3622
  type
3631
3623
  } = _ref;
3632
3624
  return type === depType;
3633
- }).map(_ref2 => {
3625
+ }).map((_ref2) => {
3634
3626
  let {
3635
3627
  name
3636
3628
  } = _ref2;
@@ -6280,6 +6272,22 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
6280
6272
  return Api;
6281
6273
  }(EventEmitter);
6282
6274
 
6275
+ function generateRandom(min, max) {
6276
+ if (min === void 0) {
6277
+ min = 0;
6278
+ }
6279
+
6280
+ if (max === void 0) {
6281
+ max = 100;
6282
+ }
6283
+
6284
+ let difference = max - min;
6285
+ let rand = Math.random();
6286
+ rand = Math.floor(rand * difference);
6287
+ rand = rand + min;
6288
+ return rand;
6289
+ }
6290
+
6283
6291
  let EvergisTileLayer = /*#__PURE__*/function (_TileLayer) {
6284
6292
  _inherits(EvergisTileLayer, _TileLayer);
6285
6293
 
@@ -6296,6 +6304,7 @@ let EvergisTileLayer = /*#__PURE__*/function (_TileLayer) {
6296
6304
  });
6297
6305
  _this.api = api;
6298
6306
  _this.name = configuration.name;
6307
+ _this.sourceUrl = configuration.sourceUrl;
6299
6308
  _this.subDomains = configuration.subDomains;
6300
6309
  return _this;
6301
6310
  }
@@ -6303,21 +6312,16 @@ let EvergisTileLayer = /*#__PURE__*/function (_TileLayer) {
6303
6312
  _createClass(EvergisTileLayer, [{
6304
6313
  key: "getTileUrl",
6305
6314
  value: function getTileUrl(x, y, level) {
6315
+ var _this$subDomains;
6316
+
6306
6317
  const name = this.name;
6307
- const subDomains = this.subDomains;
6308
- const subDomain = subDomains && subDomains[(x + y + level) % subDomains.length];
6309
- const urlMask = this.api.layers.getTilesLayerImage({
6318
+ const subDomainIndex = this.subDomains ? generateRandom(0, ((_this$subDomains = this.subDomains) == null ? void 0 : _this$subDomains.length) - 1) : undefined;
6319
+ return this.sourceUrl ? (this.subDomains && subDomainIndex !== undefined ? this.sourceUrl.replace("{0}", this.subDomains[subDomainIndex]) : this.sourceUrl).replace("{1}", "" + level).replace("{2}", "" + x).replace("{3}", "" + y) : this.api.layers.getTilesLayerImage({
6310
6320
  x,
6311
6321
  y,
6312
6322
  z: level,
6313
6323
  name
6314
6324
  });
6315
-
6316
- if (subDomain) {
6317
- return "" + addSubDomainToLocation(subDomain) + urlMask;
6318
- }
6319
-
6320
- return urlMask;
6321
6325
  }
6322
6326
  }]);
6323
6327
 
@@ -6630,47 +6634,47 @@ function isFeatureLayer(layer) {
6630
6634
 
6631
6635
  /**
6632
6636
  *
6633
-
6637
+
6634
6638
  None
6635
-
6639
+
6636
6640
  Array
6637
-
6641
+
6638
6642
  Min
6639
-
6643
+
6640
6644
  Max
6641
-
6645
+
6642
6646
  Avg
6643
-
6647
+
6644
6648
  Sum
6645
-
6649
+
6646
6650
  Extent
6647
-
6651
+
6648
6652
  H3
6649
-
6653
+
6650
6654
  Count
6651
-
6655
+
6652
6656
  TotalCount
6653
-
6657
+
6654
6658
  DistinctCount
6655
-
6659
+
6656
6660
  First
6657
-
6661
+
6658
6662
  Last
6659
-
6663
+
6660
6664
  Median
6661
-
6665
+
6662
6666
  Mod
6663
-
6667
+
6664
6668
  StdDeviation
6665
-
6669
+
6666
6670
  SumOfProduct
6667
-
6671
+
6668
6672
  OnlyValue
6669
-
6673
+
6670
6674
  WeightedAvg
6671
-
6675
+
6672
6676
  DensityIndicators
6673
-
6677
+
6674
6678
  DividedSum
6675
6679
  */
6676
6680
  var AggregationFunction;
@@ -6700,29 +6704,29 @@ var AggregationFunction;
6700
6704
  })(AggregationFunction || (AggregationFunction = {}));
6701
6705
  /**
6702
6706
  * Types of the attributes that are supported by the system.
6703
-
6707
+
6704
6708
  Unknown
6705
-
6709
+
6706
6710
  String
6707
-
6711
+
6708
6712
  Int32
6709
-
6713
+
6710
6714
  Int64
6711
-
6715
+
6712
6716
  Double
6713
-
6717
+
6714
6718
  DateTime
6715
-
6719
+
6716
6720
  Boolean
6717
-
6721
+
6718
6722
  Point
6719
-
6723
+
6720
6724
  Polyline
6721
-
6725
+
6722
6726
  Polygon
6723
-
6727
+
6724
6728
  Multipoint
6725
-
6729
+
6726
6730
  H3Index
6727
6731
  */
6728
6732
 
@@ -6745,15 +6749,15 @@ var AttributeType;
6745
6749
  })(AttributeType || (AttributeType = {}));
6746
6750
  /**
6747
6751
  * Describes classification methods.
6748
-
6752
+
6749
6753
  none
6750
-
6754
+
6751
6755
  naturalBreaks
6752
-
6756
+
6753
6757
  equalInterval
6754
-
6758
+
6755
6759
  quantile
6756
-
6760
+
6757
6761
  unique
6758
6762
  */
6759
6763
 
@@ -6769,11 +6773,11 @@ var ClassificationType;
6769
6773
  })(ClassificationType || (ClassificationType = {}));
6770
6774
  /**
6771
6775
  * Type of attribute.
6772
-
6776
+
6773
6777
  decimal
6774
-
6778
+
6775
6779
  dateTime
6776
-
6780
+
6777
6781
  text
6778
6782
  */
6779
6783
 
@@ -6787,55 +6791,55 @@ var ClassifyAttributeType;
6787
6791
  })(ClassifyAttributeType || (ClassifyAttributeType = {}));
6788
6792
  /**
6789
6793
  * Types of errors that can occur during layer initialize.
6790
-
6794
+
6791
6795
  Unknown
6792
-
6796
+
6793
6797
  SerializeError
6794
-
6798
+
6795
6799
  InvalidDataService
6796
-
6800
+
6797
6801
  InvalidConfiguration
6798
-
6802
+
6799
6803
  InvalidDataServiceName
6800
-
6804
+
6801
6805
  InvalidTableName
6802
-
6806
+
6803
6807
  InvalidLayerName
6804
-
6808
+
6805
6809
  ResourceNotFound
6806
-
6810
+
6807
6811
  InvalidCondition
6808
-
6812
+
6809
6813
  InvalidAttributes
6810
-
6814
+
6811
6815
  InvalidIdAttribute
6812
-
6816
+
6813
6817
  InvalidGeometryAttribute
6814
-
6818
+
6815
6819
  InvalidGeometryAttributeType
6816
-
6820
+
6817
6821
  InvalidColumnName
6818
-
6822
+
6819
6823
  InvalidIdColumnSettings
6820
-
6824
+
6821
6825
  ColumnNotExistsInTable
6822
-
6826
+
6823
6827
  InvalidStyle
6824
-
6828
+
6825
6829
  InvalidLayerType
6826
-
6830
+
6827
6831
  ColumnLoadingError
6828
-
6832
+
6829
6833
  InvalidAttributeFormat
6830
-
6834
+
6831
6835
  DataSourceNotFound
6832
-
6836
+
6833
6837
  DuplicateColumns
6834
-
6838
+
6835
6839
  DuplicateAttributes
6836
-
6840
+
6837
6841
  TableWithoutColumns
6838
-
6842
+
6839
6843
  InvalidTableReferenceConfiguration
6840
6844
  */
6841
6845
 
@@ -6871,15 +6875,15 @@ var ConfigurationErrorEnum;
6871
6875
  })(ConfigurationErrorEnum || (ConfigurationErrorEnum = {}));
6872
6876
  /**
6873
6877
  * Type of the error.
6874
-
6878
+
6875
6879
  ResourceLimitExceeded
6876
-
6880
+
6877
6881
  ResourceNotFound
6878
-
6882
+
6879
6883
  InternalError
6880
-
6884
+
6881
6885
  BadRequest
6882
-
6886
+
6883
6887
  DuplicateContent
6884
6888
  */
6885
6889
 
@@ -6934,9 +6938,9 @@ var ErrorType;
6934
6938
  })(ErrorType || (ErrorType = {}));
6935
6939
  /**
6936
6940
  * Type of the feature.
6937
-
6941
+
6938
6942
  Unknown
6939
-
6943
+
6940
6944
  GeometricFeature
6941
6945
  */
6942
6946
 
@@ -6949,11 +6953,11 @@ var FeatureType;
6949
6953
  })(FeatureType || (FeatureType = {}));
6950
6954
  /**
6951
6955
  * Sets whether font should be styled.
6952
-
6956
+
6953
6957
  normal
6954
-
6958
+
6955
6959
  oblique
6956
-
6960
+
6957
6961
  italic
6958
6962
  */
6959
6963
 
@@ -6967,27 +6971,27 @@ var FontStyle;
6967
6971
  })(FontStyle || (FontStyle = {}));
6968
6972
  /**
6969
6973
  * Specifies the weight (or boldness) of the font.
6970
-
6974
+
6971
6975
  Thin
6972
-
6976
+
6973
6977
  ExtraLight
6974
-
6978
+
6975
6979
  Light
6976
-
6980
+
6977
6981
  SemiLight
6978
-
6982
+
6979
6983
  Normal
6980
-
6984
+
6981
6985
  Medium
6982
-
6986
+
6983
6987
  DemiBold
6984
-
6988
+
6985
6989
  Bold
6986
-
6990
+
6987
6991
  ExtraBold
6988
-
6992
+
6989
6993
  Black
6990
-
6994
+
6991
6995
  ExtraBlack
6992
6996
  */
6993
6997
 
@@ -7009,17 +7013,17 @@ var FontWeight;
7009
7013
  })(FontWeight || (FontWeight = {}));
7010
7014
  /**
7011
7015
  *
7012
-
7016
+
7013
7017
  unknown
7014
-
7018
+
7015
7019
  point
7016
-
7020
+
7017
7021
  polyline
7018
-
7022
+
7019
7023
  polygon
7020
-
7024
+
7021
7025
  envelope
7022
-
7026
+
7023
7027
  multipoint
7024
7028
  */
7025
7029
 
@@ -7036,13 +7040,13 @@ var GeometryType;
7036
7040
  })(GeometryType || (GeometryType = {}));
7037
7041
  /**
7038
7042
  * Resource group.
7039
-
7043
+
7040
7044
  my
7041
-
7045
+
7042
7046
  role
7043
-
7047
+
7044
7048
  public
7045
-
7049
+
7046
7050
  all
7047
7051
  */
7048
7052
 
@@ -7058,9 +7062,9 @@ var Group;
7058
7062
  /**
7059
7063
  * The size of the line ending in a SPCore.Kernel.Rendering.Symbols.SimplePolylineSymbol. The values sent here can be one
7060
7064
  of the preset values, or a number representing the size of the ending in pixels for 1px wide lines.
7061
-
7065
+
7062
7066
  small
7063
-
7067
+
7064
7068
  large
7065
7069
  */
7066
7070
 
@@ -7073,19 +7077,19 @@ var LineEndingSize;
7073
7077
  })(LineEndingSize || (LineEndingSize = {}));
7074
7078
  /**
7075
7079
  * Type of the line ending.
7076
-
7080
+
7077
7081
  none
7078
-
7082
+
7079
7083
  arrow
7080
-
7084
+
7081
7085
  filledArrow
7082
-
7086
+
7083
7087
  square
7084
-
7088
+
7085
7089
  filledSquare
7086
-
7090
+
7087
7091
  circle
7088
-
7092
+
7089
7093
  filledCircle
7090
7094
  */
7091
7095
 
@@ -7103,15 +7107,15 @@ var LineEndingType;
7103
7107
  })(LineEndingType || (LineEndingType = {}));
7104
7108
  /**
7105
7109
  *
7106
-
7110
+
7107
7111
  Unknown
7108
-
7112
+
7109
7113
  union
7110
-
7114
+
7111
7115
  intersection
7112
-
7116
+
7113
7117
  subtraction
7114
-
7118
+
7115
7119
  symDifference
7116
7120
  */
7117
7121
 
@@ -7127,19 +7131,19 @@ var Operation;
7127
7131
  })(Operation || (Operation = {}));
7128
7132
  /**
7129
7133
  * User permissions for server security objects (services, projects etc.)
7130
-
7134
+
7131
7135
  none
7132
-
7136
+
7133
7137
  configure
7134
-
7138
+
7135
7139
  write
7136
-
7140
+
7137
7141
  read
7138
-
7142
+
7139
7143
  read,configure
7140
-
7144
+
7141
7145
  read,write
7142
-
7146
+
7143
7147
  read,write,configure
7144
7148
  */
7145
7149
 
@@ -7157,19 +7161,19 @@ var Permissions;
7157
7161
  })(Permissions || (Permissions = {}));
7158
7162
  /**
7159
7163
  * Type of the authorization policy.
7160
-
7164
+
7161
7165
  Unknown
7162
-
7166
+
7163
7167
  CreateTable
7164
-
7168
+
7165
7169
  CreateLayer
7166
-
7170
+
7167
7171
  CreateProject
7168
-
7172
+
7169
7173
  MaxFeaturesInOneTable
7170
-
7174
+
7171
7175
  MaxObjectsToExport
7172
-
7176
+
7173
7177
  MaxUploadContentSize
7174
7178
  */
7175
7179
 
@@ -7187,11 +7191,11 @@ var PolicyType;
7187
7191
  })(PolicyType || (PolicyType = {}));
7188
7192
  /**
7189
7193
  * Types of table reference.
7190
-
7194
+
7191
7195
  OneToMany
7192
-
7196
+
7193
7197
  OneToOne
7194
-
7198
+
7195
7199
  Intersect
7196
7200
  */
7197
7201
 
@@ -7205,19 +7209,19 @@ var ReferenceJoinType;
7205
7209
  })(ReferenceJoinType || (ReferenceJoinType = {}));
7206
7210
  /**
7207
7211
  * The `ResourceType` represents resource manager supports types.
7208
-
7212
+
7209
7213
  Unknown
7210
-
7214
+
7211
7215
  table
7212
-
7216
+
7213
7217
  layer
7214
-
7218
+
7215
7219
  project
7216
-
7220
+
7217
7221
  file
7218
-
7222
+
7219
7223
  feature
7220
-
7224
+
7221
7225
  tag
7222
7226
  */
7223
7227
 
@@ -7243,21 +7247,21 @@ var ResourceTypeLink;
7243
7247
  })(ResourceTypeLink || (ResourceTypeLink = {}));
7244
7248
  /**
7245
7249
  * Status of the server task.
7246
-
7250
+
7247
7251
  None
7248
-
7252
+
7249
7253
  Scheduled
7250
-
7254
+
7251
7255
  Planning
7252
-
7256
+
7253
7257
  Executing
7254
-
7258
+
7255
7259
  Completed
7256
-
7260
+
7257
7261
  Failed
7258
-
7262
+
7259
7263
  Canceled
7260
-
7264
+
7261
7265
  Timeout
7262
7266
  */
7263
7267
 
@@ -7276,9 +7280,9 @@ var ServerTaskStatus;
7276
7280
  })(ServerTaskStatus || (ServerTaskStatus = {}));
7277
7281
  /**
7278
7282
  * Simplify type.
7279
-
7283
+
7280
7284
  Basic
7281
-
7285
+
7282
7286
  PreserveTopology
7283
7287
  */
7284
7288
 
@@ -7291,11 +7295,11 @@ var SimplifyType;
7291
7295
  })(SimplifyType || (SimplifyType = {}));
7292
7296
  /**
7293
7297
  * The `StringSubType` provides information about string attribute subtype.
7294
-
7298
+
7295
7299
  None
7296
-
7300
+
7297
7301
  Image
7298
-
7302
+
7299
7303
  PkkCode
7300
7304
  */
7301
7305
 
@@ -7309,9 +7313,9 @@ var StringSubType;
7309
7313
  })(StringSubType || (StringSubType = {}));
7310
7314
  /**
7311
7315
  * Task owner group.
7312
-
7316
+
7313
7317
  my
7314
-
7318
+
7315
7319
  all
7316
7320
  */
7317
7321
 
@@ -7324,13 +7328,13 @@ var TaskGroup;
7324
7328
  })(TaskGroup || (TaskGroup = {}));
7325
7329
  /**
7326
7330
  * Sets the horizontal alignment of text.
7327
-
7331
+
7328
7332
  right
7329
-
7333
+
7330
7334
  left
7331
-
7335
+
7332
7336
  center
7333
-
7337
+
7334
7338
  justified
7335
7339
  */
7336
7340
 
@@ -7345,11 +7349,11 @@ var TextAlignment;
7345
7349
  })(TextAlignment || (TextAlignment = {}));
7346
7350
  /**
7347
7351
  * Sets the vertical alignment of text.
7348
-
7352
+
7349
7353
  top
7350
-
7354
+
7351
7355
  bottom
7352
-
7356
+
7353
7357
  middle
7354
7358
  */
7355
7359