@cdek-it/widget 3.9.6 → 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.
- package/dist/cdek-widget.es.d.ts +120 -113
- package/dist/cdek-widget.es.js +523 -359
- package/dist/cdek-widget.umd.js +2 -2
- package/dist/service.php +3 -3
- package/package.json +24 -24
package/dist/cdek-widget.es.d.ts
CHANGED
|
@@ -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
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
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
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
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 { }
|