@cdek-it/widget 3.9.7 → 3.10.0

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.
@@ -127,7 +127,7 @@ declare class Widget {
127
127
  constructor(input: iWidget);
128
128
  updateOffices(offices: iOffice[]): Promise<void>;
129
129
  updateOfficesRaw(officesRaw: any): Promise<void>;
130
- updateLocation(location: any): Promise<void>;
130
+ updateLocation(location: any, zoom?: YandexMapZoomVariants): Promise<void>;
131
131
  updateTariff(tariff: iTariff): Promise<void>;
132
132
  clearSelection(): void;
133
133
  destroy(): void;
@@ -141,124 +141,125 @@ declare class Widget {
141
141
  weight: number;
142
142
  }[];
143
143
  resetParcels(): void;
144
+ selectOffice(code: string): void;
144
145
  private fixBounds;
145
146
  private init;
146
147
  }
147
148
  export default Widget;
148
149
 
149
- declare const widgetSchema: ObjectSchema<{
150
- apiKey: string;
151
- root: string;
152
- sender: boolean;
153
- canChoose: boolean;
154
- popup: boolean;
155
- servicePath: string;
156
- hideFilters: {
157
- have_cashless: boolean;
158
- have_cash: boolean;
159
- is_dressing_room: boolean;
160
- type: boolean;
161
- };
162
- forceFilters: {
163
- have_cashless: boolean | null;
164
- have_cash: boolean | null;
165
- is_dressing_room: boolean | null;
166
- type: OfficeType | null;
167
- allowed_cod: boolean | null;
168
- };
169
- hideDeliveryOptions: {
170
- door: boolean;
171
- office: boolean;
172
- };
173
- debug: boolean;
174
- requirePostcode: boolean;
175
- fixBounds: YandexGeocoderKind.COUNTRY | YandexGeocoderKind.PROVINCE | YandexGeocoderKind.LOCALITY | null;
176
- offices: any[] | null;
177
- officesRaw: any[] | null;
178
- tariff: {
179
- tariff_code?: number | undefined;
180
- tariff_name?: string | undefined;
181
- tariff_description?: string | undefined;
182
- delivery_mode?: number | undefined;
183
- period_min?: number | undefined;
184
- period_max?: number | undefined;
185
- delivery_sum?: number | undefined;
186
- } | null;
187
- goods: {
188
- width: number;
189
- length: number;
190
- height: number;
191
- weight: number;
192
- }[];
193
- from: string | {
194
- code: number | null;
195
- postal_code: string | null;
196
- country_code: string | null;
197
- city: string | null;
198
- address: string | null;
199
- } | null;
200
- defaultLocation: NonNullable<string | LngLat | undefined>;
201
- lang: Lang;
202
- currency: string;
203
- tariffs: {
204
- door: any[];
205
- office: any[];
206
- pickup: any[];
207
- };
208
- onReady: tReadyFunction | undefined;
209
- onCalculate: tCalculateFunction | undefined;
210
- onChoose: tChooseFunction | undefined;
211
- selected: {
212
- door: string | null;
213
- office: string | null;
214
- };
150
+ declare const widgetSchema: ObjectSchema< {
151
+ apiKey: string;
152
+ root: string;
153
+ sender: boolean;
154
+ canChoose: boolean;
155
+ popup: boolean;
156
+ servicePath: string;
157
+ hideFilters: {
158
+ have_cashless: boolean;
159
+ have_cash: boolean;
160
+ is_dressing_room: boolean;
161
+ type: boolean;
162
+ };
163
+ forceFilters: {
164
+ have_cashless: boolean | null;
165
+ have_cash: boolean | null;
166
+ is_dressing_room: boolean | null;
167
+ type: OfficeType | null;
168
+ allowed_cod: boolean | null;
169
+ };
170
+ hideDeliveryOptions: {
171
+ door: boolean;
172
+ office: boolean;
173
+ };
174
+ debug: boolean;
175
+ requirePostcode: boolean;
176
+ fixBounds: YandexGeocoderKind.COUNTRY | YandexGeocoderKind.PROVINCE | YandexGeocoderKind.LOCALITY | null;
177
+ offices: any[] | null;
178
+ officesRaw: any[] | null;
179
+ tariff: {
180
+ tariff_code?: number | undefined;
181
+ tariff_name?: string | undefined;
182
+ tariff_description?: string | undefined;
183
+ delivery_mode?: number | undefined;
184
+ period_min?: number | undefined;
185
+ period_max?: number | undefined;
186
+ delivery_sum?: number | undefined;
187
+ } | null;
188
+ goods: {
189
+ width: number;
190
+ length: number;
191
+ height: number;
192
+ weight: number;
193
+ }[];
194
+ from: string | {
195
+ code: number | null;
196
+ postal_code: string | null;
197
+ country_code: string | null;
198
+ city: string | null;
199
+ address: string | null;
200
+ } | null;
201
+ defaultLocation: NonNullable<string | LngLat | undefined>;
202
+ lang: Lang;
203
+ currency: string;
204
+ tariffs: {
205
+ door: any[];
206
+ office: any[];
207
+ pickup: any[];
208
+ };
209
+ onReady: tReadyFunction | undefined;
210
+ onCalculate: tCalculateFunction | undefined;
211
+ onChoose: tChooseFunction | undefined;
212
+ selected: {
213
+ door: string | null;
214
+ office: string | null;
215
+ };
215
216
  }, AnyObject, {
216
- apiKey: any;
217
- root: "cdek-map";
218
- sender: false;
219
- canChoose: true;
220
- popup: false;
221
- servicePath: "/service.php";
222
- hideFilters: {
223
- have_cashless: false;
224
- have_cash: false;
225
- is_dressing_room: false;
226
- type: false;
227
- };
228
- forceFilters: {
229
- have_cashless: null;
230
- have_cash: null;
231
- is_dressing_room: null;
232
- type: null;
233
- allowed_cod: null;
234
- };
235
- hideDeliveryOptions: {
236
- office: false;
237
- door: false;
238
- };
239
- debug: false;
240
- requirePostcode: false;
241
- fixBounds: null;
242
- offices: null;
243
- officesRaw: null;
244
- tariff: null;
245
- goods: "d";
246
- from: undefined;
247
- defaultLocation: undefined;
248
- lang: Lang.RUS;
249
- currency: "RUB";
250
- tariffs: {
251
- door: number[];
252
- office: number[];
253
- pickup: number[];
254
- };
255
- onReady: Maybe<tReadyFunction | undefined>;
256
- onCalculate: Maybe<tCalculateFunction | undefined>;
257
- onChoose: Maybe<tChooseFunction | undefined>;
258
- selected: {
259
- door: null;
260
- office: null;
261
- };
217
+ apiKey: any;
218
+ root: "cdek-map";
219
+ sender: false;
220
+ canChoose: true;
221
+ popup: false;
222
+ servicePath: "/service.php";
223
+ hideFilters: {
224
+ have_cashless: false;
225
+ have_cash: false;
226
+ is_dressing_room: false;
227
+ type: false;
228
+ };
229
+ forceFilters: {
230
+ have_cashless: null;
231
+ have_cash: null;
232
+ is_dressing_room: null;
233
+ type: null;
234
+ allowed_cod: null;
235
+ };
236
+ hideDeliveryOptions: {
237
+ office: false;
238
+ door: false;
239
+ };
240
+ debug: false;
241
+ requirePostcode: false;
242
+ fixBounds: null;
243
+ offices: null;
244
+ officesRaw: null;
245
+ tariff: null;
246
+ goods: "d";
247
+ from: undefined;
248
+ defaultLocation: undefined;
249
+ lang: Lang.RUS;
250
+ currency: "RUB";
251
+ tariffs: {
252
+ door: number[];
253
+ office: number[];
254
+ pickup: number[];
255
+ };
256
+ onReady: Maybe<tReadyFunction | undefined>;
257
+ onCalculate: Maybe<tCalculateFunction | undefined>;
258
+ onChoose: Maybe<tChooseFunction | undefined>;
259
+ selected: {
260
+ door: null;
261
+ office: null;
262
+ };
262
263
  }, "">;
263
264
 
264
265
  declare const enum YandexGeocoderKind {
@@ -290,4 +291,10 @@ declare const enum YandexGeocoderPrecision {
290
291
  EXACT = "exact"
291
292
  }
292
293
 
294
+ declare const enum YandexMapZoomVariants {
295
+ GENERAL = 10,
296
+ STREET = 15,
297
+ HOME = 17
298
+ }
299
+
293
300
  export { }