@commercelayer/app-elements 2.12.1 → 3.0.1
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/{CodeEditorComponent-B3Yc7bb7.js → CodeEditorComponent-Cru9Y-Qc.js} +176 -174
- package/dist/{InputDateComponent-BQxmQyO8.js → InputDateComponent-B9rTA3XE.js} +980 -956
- package/dist/dictionaries/promotions.d.ts +1 -1
- package/dist/{main-s5Y-GzBf.js → main-r1-D6uI_.js} +8818 -8778
- package/dist/main.d.ts +1 -1
- package/dist/main.js +23 -23
- package/dist/providers/TokenProvider/TokenProvider.d.ts +0 -4
- package/dist/providers/TokenProvider/getOrganization.d.ts +1 -3
- package/dist/providers/TokenProvider/url.d.ts +1 -1
- package/dist/providers/TokenProvider/validateToken.d.ts +1 -2
- package/dist/providers/createApp.d.ts +1 -6
- package/dist/style.css +1 -1
- package/dist/ui/forms/CodeEditor/CodeEditorComponent.d.ts +4 -0
- package/dist/ui/resources/ResourceAddress/ResourceAddress.d.ts +13 -2
- package/dist/ui/resources/ResourceAddress/ResourceAddressForm.d.ts +4 -4
- package/dist/ui/resources/ResourceAddress/ResourceAddressFormFields.d.ts +3 -2
- package/dist/ui/resources/ResourceAddress/index.d.ts +1 -1
- package/dist/ui/resources/ResourceAddress/useResourceAddressOverlay.d.ts +4 -9
- package/dist/ui/resources/ResourceListItem/ResourceListItem.mocks.d.ts +106 -0
- package/dist/ui/resources/ResourceListItem/transformers/promotions.d.ts +4 -2
- package/dist/ui/resources/ResourceListItem/types.d.ts +2 -2
- package/package.json +17 -16
|
@@ -743,4 +743,110 @@ export declare const presetResourceListItem: {
|
|
|
743
743
|
updated_at: string;
|
|
744
744
|
};
|
|
745
745
|
};
|
|
746
|
+
promotionFlex: {
|
|
747
|
+
type: "flex_promotions";
|
|
748
|
+
id: string;
|
|
749
|
+
created_at: string;
|
|
750
|
+
updated_at: string;
|
|
751
|
+
name: string;
|
|
752
|
+
starts_at: string;
|
|
753
|
+
expires_at: string;
|
|
754
|
+
rules: {
|
|
755
|
+
rules: {
|
|
756
|
+
id: string;
|
|
757
|
+
name: string;
|
|
758
|
+
actions: {
|
|
759
|
+
type: string;
|
|
760
|
+
limit: {
|
|
761
|
+
type: string;
|
|
762
|
+
input: {
|
|
763
|
+
attribute: string;
|
|
764
|
+
};
|
|
765
|
+
value: number;
|
|
766
|
+
};
|
|
767
|
+
value: string;
|
|
768
|
+
groups: string[];
|
|
769
|
+
selector: string;
|
|
770
|
+
}[];
|
|
771
|
+
priority: number;
|
|
772
|
+
conditions: ({
|
|
773
|
+
field: string;
|
|
774
|
+
group: string;
|
|
775
|
+
value: number;
|
|
776
|
+
nested: {
|
|
777
|
+
conditions: {
|
|
778
|
+
field: string;
|
|
779
|
+
group: string;
|
|
780
|
+
value: number;
|
|
781
|
+
matcher: string;
|
|
782
|
+
}[];
|
|
783
|
+
};
|
|
784
|
+
matcher: string;
|
|
785
|
+
} | {
|
|
786
|
+
field: string;
|
|
787
|
+
group: string;
|
|
788
|
+
value: string;
|
|
789
|
+
matcher: string;
|
|
790
|
+
nested?: undefined;
|
|
791
|
+
})[];
|
|
792
|
+
conditions_logic: string;
|
|
793
|
+
}[];
|
|
794
|
+
};
|
|
795
|
+
};
|
|
796
|
+
promotionFlexWithCoupons: {
|
|
797
|
+
type: "flex_promotions";
|
|
798
|
+
id: string;
|
|
799
|
+
created_at: string;
|
|
800
|
+
updated_at: string;
|
|
801
|
+
name: string;
|
|
802
|
+
starts_at: string;
|
|
803
|
+
expires_at: string;
|
|
804
|
+
rules: {
|
|
805
|
+
rules: {
|
|
806
|
+
id: string;
|
|
807
|
+
name: string;
|
|
808
|
+
actions: {
|
|
809
|
+
type: string;
|
|
810
|
+
limit: {
|
|
811
|
+
type: string;
|
|
812
|
+
input: {
|
|
813
|
+
attribute: string;
|
|
814
|
+
};
|
|
815
|
+
value: number;
|
|
816
|
+
};
|
|
817
|
+
value: string;
|
|
818
|
+
groups: string[];
|
|
819
|
+
selector: string;
|
|
820
|
+
}[];
|
|
821
|
+
priority: number;
|
|
822
|
+
conditions: ({
|
|
823
|
+
field: string;
|
|
824
|
+
group: string;
|
|
825
|
+
value: number;
|
|
826
|
+
nested: {
|
|
827
|
+
conditions: {
|
|
828
|
+
field: string;
|
|
829
|
+
group: string;
|
|
830
|
+
value: number;
|
|
831
|
+
matcher: string;
|
|
832
|
+
}[];
|
|
833
|
+
};
|
|
834
|
+
matcher: string;
|
|
835
|
+
} | {
|
|
836
|
+
field: string;
|
|
837
|
+
group: string;
|
|
838
|
+
value: string;
|
|
839
|
+
matcher: string;
|
|
840
|
+
nested?: undefined;
|
|
841
|
+
})[];
|
|
842
|
+
conditions_logic: string;
|
|
843
|
+
}[];
|
|
844
|
+
};
|
|
845
|
+
coupon_codes_promotion_rule: {
|
|
846
|
+
type: "coupon_codes_promotion_rules";
|
|
847
|
+
id: string;
|
|
848
|
+
created_at: string;
|
|
849
|
+
updated_at: string;
|
|
850
|
+
};
|
|
851
|
+
};
|
|
746
852
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BuyXPayYPromotion, ExternalPromotion, FixedAmountPromotion, FixedPricePromotion, FlexPromotion, FreeGiftPromotion, FreeShippingPromotion, PercentageDiscountPromotion } from '@commercelayer/sdk';
|
|
2
2
|
import { ResourceToProps } from '../types';
|
|
3
|
-
|
|
3
|
+
type Promotion = BuyXPayYPromotion | ExternalPromotion | FixedAmountPromotion | FixedPricePromotion | FlexPromotion | FreeGiftPromotion | FreeShippingPromotion | PercentageDiscountPromotion;
|
|
4
|
+
export declare const promotionToProps: ResourceToProps<Promotion>;
|
|
5
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TokenProviderAuthUser } from '../../../providers/TokenProvider/types';
|
|
2
2
|
import { ListItemProps } from '../../composite/ListItem';
|
|
3
|
-
import { BuyXPayYPromotion, Customer, ExternalPromotion, FixedAmountPromotion, FixedPricePromotion, FreeGiftPromotion, FreeShippingPromotion, Order, PercentageDiscountPromotion, Return, Shipment, SkuListItem, StockTransfer } from '@commercelayer/sdk';
|
|
4
|
-
export type ResourceListItemType = Order | Return | Customer | StockTransfer | SkuListItem | Shipment | BuyXPayYPromotion | ExternalPromotion | FixedAmountPromotion | FixedPricePromotion | FreeGiftPromotion | FreeShippingPromotion | PercentageDiscountPromotion;
|
|
3
|
+
import { BuyXPayYPromotion, Customer, ExternalPromotion, FixedAmountPromotion, FixedPricePromotion, FlexPromotion, FreeGiftPromotion, FreeShippingPromotion, Order, PercentageDiscountPromotion, Return, Shipment, SkuListItem, StockTransfer } from '@commercelayer/sdk';
|
|
4
|
+
export type ResourceListItemType = Order | Return | Customer | StockTransfer | SkuListItem | Shipment | BuyXPayYPromotion | ExternalPromotion | FixedAmountPromotion | FixedPricePromotion | FreeGiftPromotion | FreeShippingPromotion | PercentageDiscountPromotion | FlexPromotion;
|
|
5
5
|
export interface ResourceListItemComponentProps {
|
|
6
6
|
name: React.ReactNode;
|
|
7
7
|
description: JSX.Element | string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercelayer/app-elements",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -27,12 +27,13 @@
|
|
|
27
27
|
"pnpm": ">=7"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@commercelayer/
|
|
30
|
+
"@commercelayer/js-auth": "^6.6.4",
|
|
31
|
+
"@commercelayer/sdk": "6.24.0",
|
|
31
32
|
"@monaco-editor/react": "4.6.0",
|
|
32
|
-
"@types/lodash": "^4.17.
|
|
33
|
-
"@types/react": "^18.3.
|
|
33
|
+
"@types/lodash": "^4.17.12",
|
|
34
|
+
"@types/react": "^18.3.12",
|
|
34
35
|
"@types/react-datepicker": "^7.0.0",
|
|
35
|
-
"@types/react-dom": "^18.3.
|
|
36
|
+
"@types/react-dom": "^18.3.1",
|
|
36
37
|
"classnames": "^2.5.1",
|
|
37
38
|
"jwt-decode": "^4.0.0",
|
|
38
39
|
"lodash": "^4.17.21",
|
|
@@ -40,10 +41,10 @@
|
|
|
40
41
|
"query-string": "^9.1.1",
|
|
41
42
|
"react": "^18.3.1",
|
|
42
43
|
"react-currency-input-field": "^3.8.0",
|
|
43
|
-
"react-datepicker": "^7.
|
|
44
|
+
"react-datepicker": "^7.5.0",
|
|
44
45
|
"react-dom": "^18.3.1",
|
|
45
|
-
"react-hook-form": "^7.53.
|
|
46
|
-
"react-select": "^5.8.
|
|
46
|
+
"react-hook-form": "^7.53.1",
|
|
47
|
+
"react-select": "^5.8.2",
|
|
47
48
|
"react-tooltip": "^5.28.0",
|
|
48
49
|
"swr": "^2.2.5",
|
|
49
50
|
"ts-invariant": "^0.10.3",
|
|
@@ -55,27 +56,27 @@
|
|
|
55
56
|
"@hookform/resolvers": "^3.9.0",
|
|
56
57
|
"@phosphor-icons/react": "v2.1.7",
|
|
57
58
|
"@tailwindcss/forms": "^0.5.9",
|
|
58
|
-
"@testing-library/jest-dom": "^6.
|
|
59
|
+
"@testing-library/jest-dom": "^6.6.2",
|
|
59
60
|
"@testing-library/react": "^16.0.1",
|
|
60
61
|
"@types/node": "^20.16.4",
|
|
61
62
|
"@types/pluralize": "^0.0.33",
|
|
62
|
-
"@types/react-gtm-module": "^2.0.
|
|
63
|
+
"@types/react-gtm-module": "^2.0.4",
|
|
63
64
|
"@types/testing-library__jest-dom": "^6.0.0",
|
|
64
|
-
"@vitejs/plugin-react": "^4.3.
|
|
65
|
+
"@vitejs/plugin-react": "^4.3.3",
|
|
65
66
|
"autoprefixer": "^10.4.20",
|
|
66
67
|
"cross-fetch": "^4.0.0",
|
|
67
68
|
"date-fns": "^4.1.0",
|
|
68
69
|
"date-fns-tz": "^3.2.0",
|
|
69
70
|
"eslint": "^8.57.0",
|
|
70
71
|
"jsdom": "^25.0.1",
|
|
71
|
-
"msw": "^2.
|
|
72
|
+
"msw": "^2.5.2",
|
|
72
73
|
"postcss": "^8.4.47",
|
|
73
74
|
"react-gtm-module": "^2.0.11",
|
|
74
|
-
"tailwindcss": "^3.4.
|
|
75
|
+
"tailwindcss": "^3.4.14",
|
|
75
76
|
"typescript": "^5.6.3",
|
|
76
|
-
"vite": "^5.4.
|
|
77
|
-
"vite-plugin-dts": "^4.
|
|
78
|
-
"vitest": "^2.1.
|
|
77
|
+
"vite": "^5.4.10",
|
|
78
|
+
"vite-plugin-dts": "^4.3.0",
|
|
79
|
+
"vitest": "^2.1.3",
|
|
79
80
|
"wouter": "^3.3.5"
|
|
80
81
|
},
|
|
81
82
|
"peerDependencies": {
|