@retailcrm/embed-ui 0.2.7 → 0.2.9
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/CHANGELOG.md +14 -0
- package/README.md +32 -11
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/meta.json +220 -4
- package/package.json +2 -1
- package/types/host/callable.d.ts +1 -1
- package/types/widget.d.ts +48 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.2.9](https://github.com/retailcrm/embed-ui/compare/v0.2.8...v0.2.9) (2024-11-18)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* Added new targets' definitions for order/card ([6054272](https://github.com/retailcrm/embed-ui/commit/60542721c4380e702fd7353993304ee37a0d3ac8))
|
|
11
|
+
|
|
12
|
+
### [0.2.8](https://github.com/retailcrm/embed-ui/compare/v0.2.7...v0.2.8) (2024-11-14)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* 'payload' argument of httpCall methods was made optional ([103b6a4](https://github.com/retailcrm/embed-ui/commit/103b6a4b608a252d6dc27334ae7bffdd8acbb23b))
|
|
18
|
+
|
|
5
19
|
### [0.2.7](https://github.com/retailcrm/embed-ui/compare/v0.2.6...v0.2.7) (2024-11-13)
|
|
6
20
|
|
|
7
21
|
|
package/README.md
CHANGED
|
@@ -1,27 +1,48 @@
|
|
|
1
1
|
# @retailcrm/embed-ui
|
|
2
|
+
|
|
2
3
|
API и компоненты для создания расширений интерфейса RetailCRM
|
|
3
4
|
|
|
4
|
-
## Цели
|
|
5
|
+
## Цели встраивания
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
Цели встраивания определяют места, где будет размещена разметка виджета, генерируемая расширением.
|
|
8
|
+
|
|
9
|
+
### Карточка клиента
|
|
10
|
+
|
|
11
|
+
* `customer/card:phone` – Для виджетов в списке телефонов клиента в карточке клиента
|
|
12
|
+
|
|
13
|
+
### Карточка заказа
|
|
14
|
+
|
|
15
|
+
#### Основная секция
|
|
16
|
+
|
|
17
|
+
* `order/card:common.before` – начало секции, над полями ввода
|
|
18
|
+
* `order/card:common.after` – конец секции, под полями ввода
|
|
19
|
+
|
|
20
|
+
#### Секция данных клиента
|
|
7
21
|
|
|
8
|
-
|
|
22
|
+
* `order/card:customer.before` – начало секции, над полями ввода
|
|
23
|
+
* `order/card:customer.after` – конец секции, под полями ввода
|
|
24
|
+
* `order/card:customer.email` – под полем ввода "Email"
|
|
25
|
+
* `order/card:customer.phone` – под полем ввода "Телефон"
|
|
9
26
|
|
|
10
|
-
|
|
27
|
+
#### Секция данных склада
|
|
11
28
|
|
|
12
|
-
|
|
29
|
+
* `order/card:store.before` – начало секции, над полями ввода
|
|
30
|
+
* `order/card:store.after` – конец секции, под полями ввода
|
|
13
31
|
|
|
14
|
-
|
|
32
|
+
#### Секция габаритов и веса
|
|
15
33
|
|
|
16
|
-
|
|
34
|
+
* `order/card:dimensions.before` – начало секции, над полями ввода
|
|
35
|
+
* `order/card:dimensions.after` – конец секции, под полями ввода
|
|
17
36
|
|
|
18
|
-
|
|
37
|
+
#### Секция данных доставки
|
|
19
38
|
|
|
20
|
-
|
|
39
|
+
* `order/card:delivery.before` – начало секции, над полями ввода
|
|
40
|
+
* `order/card:delivery.after` – конец секции, под полями ввода
|
|
41
|
+
* `order/card:delivery.address` – под полем "Адрес"
|
|
21
42
|
|
|
22
|
-
|
|
43
|
+
#### Секция данных по оплате
|
|
23
44
|
|
|
24
|
-
|
|
45
|
+
* `order/card:payment.before` – начало секции, над полями ввода
|
|
25
46
|
|
|
26
47
|
## Контексты
|
|
27
48
|
|
package/dist/index.cjs
CHANGED
|
@@ -163,8 +163,8 @@ const useInternal = pinia.defineStore("@retailcrm/embed-ui/_internal", {});
|
|
|
163
163
|
const useHost = () => {
|
|
164
164
|
const store = useInternal();
|
|
165
165
|
return {
|
|
166
|
-
httpCall(action, payload) {
|
|
167
|
-
return store.endpoint.call.httpCall(action, payload);
|
|
166
|
+
httpCall(action, payload = void 0) {
|
|
167
|
+
return payload ? store.endpoint.call.httpCall(action, payload) : store.endpoint.call.httpCall(action);
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -161,8 +161,8 @@ const useInternal = defineStore("@retailcrm/embed-ui/_internal", {});
|
|
|
161
161
|
const useHost = () => {
|
|
162
162
|
const store = useInternal();
|
|
163
163
|
return {
|
|
164
|
-
httpCall(action, payload) {
|
|
165
|
-
return store.endpoint.call.httpCall(action, payload);
|
|
164
|
+
httpCall(action, payload = void 0) {
|
|
165
|
+
return payload ? store.endpoint.call.httpCall(action, payload) : store.endpoint.call.httpCall(action);
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
168
|
};
|
package/dist/meta.json
CHANGED
|
@@ -148,17 +148,68 @@
|
|
|
148
148
|
"settings"
|
|
149
149
|
]
|
|
150
150
|
},
|
|
151
|
+
{
|
|
152
|
+
"id": "order/card:common.before",
|
|
153
|
+
"description": {
|
|
154
|
+
"en-GB": "Widget for the section with common data",
|
|
155
|
+
"es-ES": "",
|
|
156
|
+
"ru-RU": "Виджет для секции с основными данными"
|
|
157
|
+
},
|
|
158
|
+
"location": {
|
|
159
|
+
"en-GB": "Section start, right above the input fields",
|
|
160
|
+
"es-ES": "",
|
|
161
|
+
"ru-RU": "Начало секции, над полями ввода"
|
|
162
|
+
},
|
|
163
|
+
"contexts": [
|
|
164
|
+
"order/card",
|
|
165
|
+
"settings"
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"id": "order/card:common.after",
|
|
170
|
+
"description": {
|
|
171
|
+
"en-GB": "Widget for the section with common data",
|
|
172
|
+
"es-ES": "",
|
|
173
|
+
"ru-RU": "Виджет для секции с основными данными"
|
|
174
|
+
},
|
|
175
|
+
"location": {
|
|
176
|
+
"en-GB": "Section end, right under the input fields",
|
|
177
|
+
"es-ES": "",
|
|
178
|
+
"ru-RU": "Конец секции, под полями ввода"
|
|
179
|
+
},
|
|
180
|
+
"contexts": [
|
|
181
|
+
"order/card",
|
|
182
|
+
"settings"
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"id": "order/card:customer.before",
|
|
187
|
+
"description": {
|
|
188
|
+
"en-GB": "Widget for the section with customer data",
|
|
189
|
+
"es-ES": "",
|
|
190
|
+
"ru-RU": "Виджет для секции с данными клиента"
|
|
191
|
+
},
|
|
192
|
+
"location": {
|
|
193
|
+
"en-GB": "Section start, right above the input fields",
|
|
194
|
+
"es-ES": "",
|
|
195
|
+
"ru-RU": "Начало секции, над полями ввода"
|
|
196
|
+
},
|
|
197
|
+
"contexts": [
|
|
198
|
+
"order/card",
|
|
199
|
+
"settings"
|
|
200
|
+
]
|
|
201
|
+
},
|
|
151
202
|
{
|
|
152
203
|
"id": "order/card:customer.after",
|
|
153
204
|
"description": {
|
|
154
|
-
"en-GB": "Widget for section with customer data",
|
|
205
|
+
"en-GB": "Widget for the section with customer data",
|
|
155
206
|
"es-ES": "",
|
|
156
207
|
"ru-RU": "Виджет для секции с данными клиента"
|
|
157
208
|
},
|
|
158
209
|
"location": {
|
|
159
|
-
"en-GB": "
|
|
210
|
+
"en-GB": "Section end, right under the input fields",
|
|
160
211
|
"es-ES": "",
|
|
161
|
-
"ru-RU": "
|
|
212
|
+
"ru-RU": "Конец секции, под полями ввода"
|
|
162
213
|
},
|
|
163
214
|
"contexts": [
|
|
164
215
|
"order/card",
|
|
@@ -199,6 +250,142 @@
|
|
|
199
250
|
"settings"
|
|
200
251
|
]
|
|
201
252
|
},
|
|
253
|
+
{
|
|
254
|
+
"id": "order/card:list.before",
|
|
255
|
+
"description": {
|
|
256
|
+
"en-GB": "Widget for the list of ordered items",
|
|
257
|
+
"es-ES": "",
|
|
258
|
+
"ru-RU": "Виджет для списка позиций заказа"
|
|
259
|
+
},
|
|
260
|
+
"location": {
|
|
261
|
+
"en-GB": "Section start, right above the list",
|
|
262
|
+
"es-ES": "",
|
|
263
|
+
"ru-RU": "Начало секции, над списком"
|
|
264
|
+
},
|
|
265
|
+
"contexts": [
|
|
266
|
+
"order/card",
|
|
267
|
+
"settings"
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"id": "order/card:list.after",
|
|
272
|
+
"description": {
|
|
273
|
+
"en-GB": "Widget for the list of ordered items",
|
|
274
|
+
"es-ES": "",
|
|
275
|
+
"ru-RU": "Виджет для списка позиций заказа"
|
|
276
|
+
},
|
|
277
|
+
"location": {
|
|
278
|
+
"en-GB": "Section start, right under the list",
|
|
279
|
+
"es-ES": "",
|
|
280
|
+
"ru-RU": "Начало секции, под списком"
|
|
281
|
+
},
|
|
282
|
+
"contexts": [
|
|
283
|
+
"order/card",
|
|
284
|
+
"settings"
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"id": "order/card:store.before",
|
|
289
|
+
"description": {
|
|
290
|
+
"en-GB": "Widget for the section with warehouse data",
|
|
291
|
+
"es-ES": "",
|
|
292
|
+
"ru-RU": "Виджет для секции с данными склада"
|
|
293
|
+
},
|
|
294
|
+
"location": {
|
|
295
|
+
"en-GB": "Section start, right above the input fields",
|
|
296
|
+
"es-ES": "",
|
|
297
|
+
"ru-RU": "Начало секции, над полями ввода"
|
|
298
|
+
},
|
|
299
|
+
"contexts": [
|
|
300
|
+
"order/card",
|
|
301
|
+
"settings"
|
|
302
|
+
]
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"id": "order/card:store.after",
|
|
306
|
+
"description": {
|
|
307
|
+
"en-GB": "Widget for the section with warehouse data",
|
|
308
|
+
"es-ES": "",
|
|
309
|
+
"ru-RU": "Виджет для секции с данными склада"
|
|
310
|
+
},
|
|
311
|
+
"location": {
|
|
312
|
+
"en-GB": "Section end, right under the input fields",
|
|
313
|
+
"es-ES": "",
|
|
314
|
+
"ru-RU": "Конец секции, под полями ввода"
|
|
315
|
+
},
|
|
316
|
+
"contexts": [
|
|
317
|
+
"order/card",
|
|
318
|
+
"settings"
|
|
319
|
+
]
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"id": "order/card:dimensions.before",
|
|
323
|
+
"description": {
|
|
324
|
+
"en-GB": "Widget for the section with dimensions and weight",
|
|
325
|
+
"es-ES": "",
|
|
326
|
+
"ru-RU": "Виджет для секции с данными габаритов и веса"
|
|
327
|
+
},
|
|
328
|
+
"location": {
|
|
329
|
+
"en-GB": "Section start, right above the input fields",
|
|
330
|
+
"es-ES": "",
|
|
331
|
+
"ru-RU": "Начало секции, над полями ввода"
|
|
332
|
+
},
|
|
333
|
+
"contexts": [
|
|
334
|
+
"order/card",
|
|
335
|
+
"settings"
|
|
336
|
+
]
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"id": "order/card:dimensions.after",
|
|
340
|
+
"description": {
|
|
341
|
+
"en-GB": "Widget for the section with dimensions and weight",
|
|
342
|
+
"es-ES": "",
|
|
343
|
+
"ru-RU": "Виджет для секции с данными габаритов и веса"
|
|
344
|
+
},
|
|
345
|
+
"location": {
|
|
346
|
+
"en-GB": "Section end, right under the input fields",
|
|
347
|
+
"es-ES": "",
|
|
348
|
+
"ru-RU": "Конец секции, под полями ввода"
|
|
349
|
+
},
|
|
350
|
+
"contexts": [
|
|
351
|
+
"order/card",
|
|
352
|
+
"settings"
|
|
353
|
+
]
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"id": "order/card:delivery.before",
|
|
357
|
+
"description": {
|
|
358
|
+
"en-GB": "Widget for the section with delivery data",
|
|
359
|
+
"es-ES": "",
|
|
360
|
+
"ru-RU": "Виджет для секции с данными доставки"
|
|
361
|
+
},
|
|
362
|
+
"location": {
|
|
363
|
+
"en-GB": "Section start, right above the input fields",
|
|
364
|
+
"es-ES": "",
|
|
365
|
+
"ru-RU": "Начало секции, над полями ввода"
|
|
366
|
+
},
|
|
367
|
+
"contexts": [
|
|
368
|
+
"order/card",
|
|
369
|
+
"settings"
|
|
370
|
+
]
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"id": "order/card:delivery.after",
|
|
374
|
+
"description": {
|
|
375
|
+
"en-GB": "Widget for the section with delivery data",
|
|
376
|
+
"es-ES": "",
|
|
377
|
+
"ru-RU": "Виджет для секции с данными доставки"
|
|
378
|
+
},
|
|
379
|
+
"location": {
|
|
380
|
+
"en-GB": "Section end, right under the input fields",
|
|
381
|
+
"es-ES": "",
|
|
382
|
+
"ru-RU": "Конец секции, под полями ввода"
|
|
383
|
+
},
|
|
384
|
+
"contexts": [
|
|
385
|
+
"order/card",
|
|
386
|
+
"settings"
|
|
387
|
+
]
|
|
388
|
+
},
|
|
202
389
|
{
|
|
203
390
|
"id": "order/card:delivery.address",
|
|
204
391
|
"description": {
|
|
@@ -215,6 +402,23 @@
|
|
|
215
402
|
"order/card",
|
|
216
403
|
"settings"
|
|
217
404
|
]
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"id": "order/card:payment.before",
|
|
408
|
+
"description": {
|
|
409
|
+
"en-GB": "Widget for the section with payment data",
|
|
410
|
+
"es-ES": "",
|
|
411
|
+
"ru-RU": "Виджет для секции с данными по оплате"
|
|
412
|
+
},
|
|
413
|
+
"location": {
|
|
414
|
+
"en-GB": "Section start, right above the input fields",
|
|
415
|
+
"es-ES": "",
|
|
416
|
+
"ru-RU": "Начало секции, над полями ввода"
|
|
417
|
+
},
|
|
418
|
+
"contexts": [
|
|
419
|
+
"order/card",
|
|
420
|
+
"settings"
|
|
421
|
+
]
|
|
218
422
|
}
|
|
219
423
|
],
|
|
220
424
|
"pages": [
|
|
@@ -237,10 +441,22 @@
|
|
|
237
441
|
"ru-RU": "Страница с формой создания/редактирования заказа"
|
|
238
442
|
},
|
|
239
443
|
"targets": [
|
|
444
|
+
"order/card:common.before",
|
|
445
|
+
"order/card:common.after",
|
|
446
|
+
"order/card:customer.before",
|
|
240
447
|
"order/card:customer.after",
|
|
241
448
|
"order/card:customer.email",
|
|
242
449
|
"order/card:customer.phone",
|
|
243
|
-
"order/card:
|
|
450
|
+
"order/card:list.before",
|
|
451
|
+
"order/card:list.after",
|
|
452
|
+
"order/card:store.before",
|
|
453
|
+
"order/card:store.after",
|
|
454
|
+
"order/card:dimensions.before",
|
|
455
|
+
"order/card:dimensions.after",
|
|
456
|
+
"order/card:delivery.before",
|
|
457
|
+
"order/card:delivery.after",
|
|
458
|
+
"order/card:delivery.address",
|
|
459
|
+
"order/card:payment.before"
|
|
244
460
|
]
|
|
245
461
|
}
|
|
246
462
|
]
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@retailcrm/embed-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.9",
|
|
5
5
|
"description": "API and components for creating RetailCRM UI extensions",
|
|
6
6
|
"repository": "git@github.com:retailcrm/embed-ui.git",
|
|
7
7
|
"author": "RetailDriverLLC <integration@retailcrm.ru>",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"@stylistic/eslint-plugin": "^1.7.2",
|
|
45
45
|
"@types/node": "^22.7.9",
|
|
46
46
|
"@vitejs/plugin-vue": "^5.1.4",
|
|
47
|
+
"@vue/language-server": "^2.1.10",
|
|
47
48
|
"@vue/test-utils": "^2.4.6",
|
|
48
49
|
"eslint": "^9.13.0",
|
|
49
50
|
"eslint-plugin-import": "^2.31.0",
|
package/types/host/callable.d.ts
CHANGED
package/types/widget.d.ts
CHANGED
|
@@ -37,6 +37,18 @@ export type SchemaListByTarget = {
|
|
|
37
37
|
| 'customer/card:phone'
|
|
38
38
|
| 'settings'
|
|
39
39
|
>;
|
|
40
|
+
'order/card:common.before': Pick<SchemaList,
|
|
41
|
+
| 'order/card'
|
|
42
|
+
| 'settings'
|
|
43
|
+
>;
|
|
44
|
+
'order/card:common.after': Pick<SchemaList,
|
|
45
|
+
| 'order/card'
|
|
46
|
+
| 'settings'
|
|
47
|
+
>;
|
|
48
|
+
'order/card:customer.before': Pick<SchemaList,
|
|
49
|
+
| 'order/card'
|
|
50
|
+
| 'settings'
|
|
51
|
+
>;
|
|
40
52
|
'order/card:customer.after': Pick<SchemaList,
|
|
41
53
|
| 'order/card'
|
|
42
54
|
| 'settings'
|
|
@@ -49,8 +61,44 @@ export type SchemaListByTarget = {
|
|
|
49
61
|
| 'order/card'
|
|
50
62
|
| 'settings'
|
|
51
63
|
>;
|
|
64
|
+
'order/card:list.before': Pick<SchemaList,
|
|
65
|
+
| 'order/card'
|
|
66
|
+
| 'settings'
|
|
67
|
+
>;
|
|
68
|
+
'order/card:list.after': Pick<SchemaList,
|
|
69
|
+
| 'order/card'
|
|
70
|
+
| 'settings'
|
|
71
|
+
>;
|
|
72
|
+
'order/card:store.before': Pick<SchemaList,
|
|
73
|
+
| 'order/card'
|
|
74
|
+
| 'settings'
|
|
75
|
+
>;
|
|
76
|
+
'order/card:store.after': Pick<SchemaList,
|
|
77
|
+
| 'order/card'
|
|
78
|
+
| 'settings'
|
|
79
|
+
>;
|
|
80
|
+
'order/card:dimensions.before': Pick<SchemaList,
|
|
81
|
+
| 'order/card'
|
|
82
|
+
| 'settings'
|
|
83
|
+
>;
|
|
84
|
+
'order/card:dimensions.after': Pick<SchemaList,
|
|
85
|
+
| 'order/card'
|
|
86
|
+
| 'settings'
|
|
87
|
+
>;
|
|
88
|
+
'order/card:delivery.before': Pick<SchemaList,
|
|
89
|
+
| 'order/card'
|
|
90
|
+
| 'settings'
|
|
91
|
+
>;
|
|
92
|
+
'order/card:delivery.after': Pick<SchemaList,
|
|
93
|
+
| 'order/card'
|
|
94
|
+
| 'settings'
|
|
95
|
+
>;
|
|
52
96
|
'order/card:delivery.address': Pick<SchemaList,
|
|
53
97
|
| 'order/card'
|
|
54
98
|
| 'settings'
|
|
55
99
|
>;
|
|
100
|
+
'order/card:payment.before': Pick<SchemaList,
|
|
101
|
+
| 'order/card'
|
|
102
|
+
| 'settings'
|
|
103
|
+
>;
|
|
56
104
|
}
|