@retailcrm/embed-ui-v1-contexts 0.6.0 → 0.7.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/meta.json
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
"name": "
|
|
34
|
+
"name": "priceTypeCode",
|
|
35
35
|
"type": "string",
|
|
36
36
|
"description": {
|
|
37
37
|
"en-GB": "Character price type code",
|
|
@@ -575,6 +575,84 @@
|
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
577
|
]
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"name": "Dimensions",
|
|
581
|
+
"fields": [
|
|
582
|
+
{
|
|
583
|
+
"name": "L",
|
|
584
|
+
"type": "number|null",
|
|
585
|
+
"description": {
|
|
586
|
+
"en-GB": "Length",
|
|
587
|
+
"es-ES": "Longitud",
|
|
588
|
+
"ru-RU": "Длина"
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
"name": "W",
|
|
593
|
+
"type": "number|null",
|
|
594
|
+
"description": {
|
|
595
|
+
"en-GB": "Width",
|
|
596
|
+
"es-ES": "Anchura",
|
|
597
|
+
"ru-RU": "Ширина"
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"name": "H",
|
|
602
|
+
"type": "number|null",
|
|
603
|
+
"description": {
|
|
604
|
+
"en-GB": "Height",
|
|
605
|
+
"es-ES": "Altura",
|
|
606
|
+
"ru-RU": "Высота"
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
]
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
"name": "Money",
|
|
613
|
+
"fields": [
|
|
614
|
+
{
|
|
615
|
+
"name": "amount",
|
|
616
|
+
"type": "number",
|
|
617
|
+
"description": {
|
|
618
|
+
"en-GB": "Amount",
|
|
619
|
+
"es-ES": "Cantidad",
|
|
620
|
+
"ru-RU": "Количество"
|
|
621
|
+
}
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
"name": "currency",
|
|
625
|
+
"type": "string",
|
|
626
|
+
"description": {
|
|
627
|
+
"en-GB": "Currency code",
|
|
628
|
+
"es-ES": "Código de moneda",
|
|
629
|
+
"ru-RU": "Символьный код валюты"
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
]
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"name": "Weight",
|
|
636
|
+
"fields": [
|
|
637
|
+
{
|
|
638
|
+
"name": "value",
|
|
639
|
+
"type": "number",
|
|
640
|
+
"description": {
|
|
641
|
+
"en-GB": "Weight value",
|
|
642
|
+
"es-ES": "Valor del peso",
|
|
643
|
+
"ru-RU": "Значение веса"
|
|
644
|
+
}
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
"name": "unit",
|
|
648
|
+
"type": "'grams'|'kilograms'|'tons'",
|
|
649
|
+
"description": {
|
|
650
|
+
"en-GB": "Weight unit",
|
|
651
|
+
"es-ES": "Unidad de peso",
|
|
652
|
+
"ru-RU": "Единица измерения"
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
]
|
|
578
656
|
}
|
|
579
657
|
],
|
|
580
658
|
"actions": {
|
|
@@ -670,6 +748,25 @@
|
|
|
670
748
|
"ru-RU": "Изменяет количество товарной позиции"
|
|
671
749
|
}
|
|
672
750
|
},
|
|
751
|
+
{
|
|
752
|
+
"name": "changeItemStatus",
|
|
753
|
+
"arguments": [
|
|
754
|
+
{
|
|
755
|
+
"name": "index",
|
|
756
|
+
"type": "number"
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
"name": "statusId",
|
|
760
|
+
"type": "number"
|
|
761
|
+
}
|
|
762
|
+
],
|
|
763
|
+
"returns": "Promise<void>",
|
|
764
|
+
"description": {
|
|
765
|
+
"en-GB": "Changes the status of an item by specified identifier",
|
|
766
|
+
"es-ES": "Cambia el estado de un artículo por identificador especificado",
|
|
767
|
+
"ru-RU": "Изменяет статус товарной позиции по указанному идентификатору"
|
|
768
|
+
}
|
|
769
|
+
},
|
|
673
770
|
{
|
|
674
771
|
"name": "removeItem",
|
|
675
772
|
"arguments": [
|
|
@@ -461,7 +461,7 @@ export declare const isCreateOrderItemInput: Predicate<{
|
|
|
461
461
|
productId: number;
|
|
462
462
|
offerId: number;
|
|
463
463
|
priceAmount: number | undefined;
|
|
464
|
-
|
|
464
|
+
priceTypeCode: string | undefined;
|
|
465
465
|
quantity: number | undefined;
|
|
466
466
|
}> & {
|
|
467
467
|
type: string;
|
|
@@ -470,14 +470,14 @@ export declare const isCreateOrderItemInput: Predicate<{
|
|
|
470
470
|
productId: string;
|
|
471
471
|
offerId: string;
|
|
472
472
|
priceAmount: string;
|
|
473
|
-
|
|
473
|
+
priceTypeCode: string;
|
|
474
474
|
quantity: string;
|
|
475
475
|
};
|
|
476
476
|
readonly shape: {
|
|
477
477
|
productId: [ PredicateWithMeta<number>, true];
|
|
478
478
|
offerId: [ PredicateWithMeta<number>, true];
|
|
479
479
|
priceAmount: [ PredicateWithMeta<number>, false];
|
|
480
|
-
|
|
480
|
+
priceTypeCode: [ PredicateWithMeta<string>, false];
|
|
481
481
|
quantity: [ PredicateWithMeta<number>, false];
|
|
482
482
|
};
|
|
483
483
|
};
|
|
@@ -107,7 +107,7 @@ const isCreateOrderItemInput = predicates.isShape({
|
|
|
107
107
|
productId: [predicates.isNumber, true],
|
|
108
108
|
offerId: [predicates.isNumber, true],
|
|
109
109
|
priceAmount: [predicates.isNumber, false],
|
|
110
|
-
|
|
110
|
+
priceTypeCode: [predicates.isString, false],
|
|
111
111
|
quantity: [predicates.isNumber, false]
|
|
112
112
|
}, "CreateOrderItemInput");
|
|
113
113
|
const id = "order/card";
|
|
@@ -328,6 +328,13 @@ const actions = {
|
|
|
328
328
|
),
|
|
329
329
|
expects: predicates.isVoid
|
|
330
330
|
},
|
|
331
|
+
"changeItemStatus": {
|
|
332
|
+
accepts: predicates.cortegeOf(
|
|
333
|
+
[predicates.isNumber, predicates.isNumber],
|
|
334
|
+
["index", "statusId"]
|
|
335
|
+
),
|
|
336
|
+
expects: predicates.isVoid
|
|
337
|
+
},
|
|
331
338
|
"removeItem": {
|
|
332
339
|
accepts: predicates.cortegeOf([predicates.isNumber], ["index"]),
|
|
333
340
|
expects: predicates.isVoid
|
|
@@ -13,6 +13,7 @@ export declare const useActions: () => {
|
|
|
13
13
|
percent: number | undefined;
|
|
14
14
|
}) => Promise<void>;
|
|
15
15
|
changeItemQuantity: (index: number, quantity: number) => Promise<void>;
|
|
16
|
+
changeItemStatus: (index: number, statusId: number) => Promise<void>;
|
|
16
17
|
removeItem: (index: number) => Promise<void>;
|
|
17
18
|
};
|
|
18
19
|
export declare const useContext: StoreDefinition<"order/card", Context<Schema>, {
|
|
@@ -105,7 +105,7 @@ const isCreateOrderItemInput = isShape({
|
|
|
105
105
|
productId: [isNumber, true],
|
|
106
106
|
offerId: [isNumber, true],
|
|
107
107
|
priceAmount: [isNumber, false],
|
|
108
|
-
|
|
108
|
+
priceTypeCode: [isString, false],
|
|
109
109
|
quantity: [isNumber, false]
|
|
110
110
|
}, "CreateOrderItemInput");
|
|
111
111
|
const id = "order/card";
|
|
@@ -326,6 +326,13 @@ const actions = {
|
|
|
326
326
|
),
|
|
327
327
|
expects: isVoid
|
|
328
328
|
},
|
|
329
|
+
"changeItemStatus": {
|
|
330
|
+
accepts: cortegeOf(
|
|
331
|
+
[isNumber, isNumber],
|
|
332
|
+
["index", "statusId"]
|
|
333
|
+
),
|
|
334
|
+
expects: isVoid
|
|
335
|
+
},
|
|
329
336
|
"removeItem": {
|
|
330
337
|
accepts: cortegeOf([isNumber], ["index"]),
|
|
331
338
|
expects: isVoid
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@retailcrm/embed-ui-v1-contexts",
|
|
3
3
|
"description": "Reactive contexts for RetailCRM JS API",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.7.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "RetailDriverLLC <integration@retailcrm.ru>",
|
|
8
8
|
"repository": "git@github.com:retailcrm/embed-ui.git",
|
|
@@ -104,10 +104,10 @@
|
|
|
104
104
|
"@floating-ui/core": "^1.6.9",
|
|
105
105
|
"@floating-ui/dom": "^1.6.13",
|
|
106
106
|
"@omnicajs/symfony-router": "^1.0.0",
|
|
107
|
-
"@retailcrm/embed-ui-v1-types": "^0.
|
|
107
|
+
"@retailcrm/embed-ui-v1-types": "^0.7.0"
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
110
|
-
"@retailcrm/embed-ui-v1-testing": "^0.
|
|
110
|
+
"@retailcrm/embed-ui-v1-testing": "^0.7.0",
|
|
111
111
|
"tsx": "^4.19.2",
|
|
112
112
|
"typescript": "^5.6.3",
|
|
113
113
|
"vite": "^5.4.11",
|
package/types/order/card.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export type MethodList = {
|
|
|
51
51
|
percent: number | undefined;
|
|
52
52
|
}) => void;
|
|
53
53
|
changeItemQuantity: (index: number, quantity: number) => void;
|
|
54
|
+
changeItemStatus: (index: number, statusId: number) => void;
|
|
54
55
|
removeItem: (index: number) => void;
|
|
55
56
|
}
|
|
56
57
|
|
|
@@ -58,7 +59,7 @@ export type CreateOrderItemInput = {
|
|
|
58
59
|
productId: number;
|
|
59
60
|
offerId: number;
|
|
60
61
|
priceAmount: number | undefined;
|
|
61
|
-
|
|
62
|
+
priceTypeCode: string | undefined;
|
|
62
63
|
quantity: number | undefined;
|
|
63
64
|
}
|
|
64
65
|
|