@gem-sdk/analytics 1.0.1 → 1.0.2-dev.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.
Files changed (39) hide show
  1. package/dist/esm/components/GModalOrderJourney/GModalOrderJourney.d.ts +2 -1
  2. package/dist/esm/components/GModalOrderJourney/context/OrderJourneyContext.d.ts +1 -0
  3. package/dist/esm/components/OrderAnalytic/components/OrderListing/OrderListingTable.d.ts +10 -5
  4. package/dist/esm/components/OrderAnalytic/components/OrderListing/index.d.ts +2 -0
  5. package/dist/esm/components/OrderAnalytic/components/index.d.ts +1 -0
  6. package/dist/esm/components/OrderAnalytic/hooks/useOrderListingData.d.ts +4 -1
  7. package/dist/esm/components/OrderAnalytic/index.d.ts +3 -2
  8. package/dist/esm/components/OrderAnalytic/types/order.d.ts +1 -0
  9. package/dist/esm/gemxql.js +26 -13
  10. package/dist/esm/gemxql.mjs +26 -13
  11. package/dist/esm/index.js +1013 -964
  12. package/dist/esm/index.mjs +1013 -964
  13. package/dist/esm/shared/journey/ui/JourneyTitle/components/GemxIdBadge.d.ts +1 -0
  14. package/dist/esm/shared/journey/ui/JourneyTitle/components/index.d.ts +1 -0
  15. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/GemxIdCell.d.ts +2 -0
  16. package/dist/esm/shared/reports/ui/ReportTable/types/report-columns.d.ts +1 -0
  17. package/dist/esm/types/index.d.ts +5 -4
  18. package/dist/esm/types/report-columns.d.ts +1 -0
  19. package/dist/esm/types.js +51 -38
  20. package/dist/esm/types.mjs +51 -38
  21. package/dist/style.css +1 -1
  22. package/dist/umd/esm/components/GModalOrderJourney/GModalOrderJourney.d.ts +2 -1
  23. package/dist/umd/esm/components/GModalOrderJourney/context/OrderJourneyContext.d.ts +1 -0
  24. package/dist/umd/esm/components/OrderAnalytic/components/OrderListing/OrderListingTable.d.ts +10 -5
  25. package/dist/umd/esm/components/OrderAnalytic/components/OrderListing/index.d.ts +2 -0
  26. package/dist/umd/esm/components/OrderAnalytic/components/index.d.ts +1 -0
  27. package/dist/umd/esm/components/OrderAnalytic/hooks/useOrderListingData.d.ts +4 -1
  28. package/dist/umd/esm/components/OrderAnalytic/index.d.ts +3 -2
  29. package/dist/umd/esm/components/OrderAnalytic/types/order.d.ts +1 -0
  30. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/GemxIdBadge.d.ts +1 -0
  31. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/index.d.ts +1 -0
  32. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/GemxIdCell.d.ts +2 -0
  33. package/dist/umd/esm/shared/reports/ui/ReportTable/types/report-columns.d.ts +1 -0
  34. package/dist/umd/esm/types/index.d.ts +5 -4
  35. package/dist/umd/esm/types/report-columns.d.ts +1 -0
  36. package/dist/umd/gemxql.js +1 -1
  37. package/dist/umd/index.js +1 -1
  38. package/dist/umd/types.js +1 -1
  39. package/package.json +1 -1
@@ -6,6 +6,7 @@ export interface GModalOrderJourneyProps {
6
6
  onClose: () => void;
7
7
  title: string;
8
8
  orderId: string;
9
+ gxId?: string;
9
10
  journeyItems: IOrderJourneyItem[];
10
11
  isLoading?: boolean;
11
12
  hasNextPage?: boolean;
@@ -17,4 +18,4 @@ export interface GModalOrderJourneyProps {
17
18
  journeySource?: EReportSource;
18
19
  onViewOrderDetails?: (orderId: string) => void;
19
20
  }
20
- export declare const GModalOrderJourney: ({ open, onClose, title, orderId, journeyItems, isLoading, hasNextPage, isFetchingNextPage, fetchNextPage, reportCampaign, pageAnalytic, mode, journeySource, onViewOrderDetails, }: GModalOrderJourneyProps) => import("react/jsx-runtime").JSX.Element | null;
21
+ export declare const GModalOrderJourney: ({ open, onClose, title, orderId, gxId, journeyItems, isLoading, hasNextPage, isFetchingNextPage, fetchNextPage, reportCampaign, pageAnalytic, mode, journeySource, onViewOrderDetails, }: GModalOrderJourneyProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,5 +1,6 @@
1
1
  export interface OrderJourneyContextValue {
2
2
  orderId: string;
3
+ gxId?: string;
3
4
  onViewOrderDetails?: (orderId: string) => void;
4
5
  }
5
6
  export declare const OrderJourneyProvider: import("react").Provider<OrderJourneyContextValue | undefined>;
@@ -1,8 +1,9 @@
1
- import type { IOrder } from '../../types';
2
1
  import type { GPaginationProps } from '@/shared';
3
- import type { IReportCampaign } from '../../types/report';
4
2
  import type { IReportColumn } from '@/shared/reports/common/Visualization/types';
5
- interface OrderListingTableOptions {
3
+ import type { EReportColumnKey } from '@/shared/reports/ui/ReportTable/types/report-columns';
4
+ import type { IOrder } from '../../types';
5
+ import type { IReportCampaign } from '../../types/report';
6
+ export interface OrderListingTableOptions {
6
7
  hideSummary?: boolean;
7
8
  limitRowAmount?: number;
8
9
  hidePaginationRow?: boolean;
@@ -10,7 +11,7 @@ interface OrderListingTableOptions {
10
11
  fixedColumns?: IReportColumn['name'][];
11
12
  isLatestTable?: boolean;
12
13
  }
13
- interface OrderListingTableProps {
14
+ export interface OrderListingTableProps {
14
15
  orders: IOrder[];
15
16
  isLoading: boolean;
16
17
  totalStoreOrders: number;
@@ -19,9 +20,13 @@ interface OrderListingTableProps {
19
20
  paginationProps?: GPaginationProps;
20
21
  tableOptions?: OrderListingTableOptions;
21
22
  isMockData?: boolean;
23
+ selectedColumns?: EReportColumnKey[];
24
+ columnsOrder?: EReportColumnKey[];
25
+ isFilteredByCampaign?: boolean;
26
+ isHasControlFilters?: boolean;
22
27
  onViewAllStoreOrders?: () => void;
23
28
  onViewOrderJourney?: (orderId: string) => void;
24
29
  onViewOrderDetails?: (orderId: string) => void;
25
30
  }
26
- declare const _default: import("react").MemoExoticComponent<({ orders, isLoading, totalStoreOrders, queryValue, paginationProps, tableOptions, isMockData, onViewAllStoreOrders, onViewOrderJourney, onViewOrderDetails, }: OrderListingTableProps) => import("react/jsx-runtime").JSX.Element>;
31
+ declare const _default: import("react").MemoExoticComponent<({ orders, isLoading, totalStoreOrders, queryValue, paginationProps, tableOptions, isMockData, selectedColumns, columnsOrder, isFilteredByCampaign, isHasControlFilters, onViewAllStoreOrders, onViewOrderJourney, onViewOrderDetails, }: OrderListingTableProps) => import("react/jsx-runtime").JSX.Element>;
27
32
  export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as OrderListingTable } from './OrderListingTable';
2
+ export type { OrderListingTableOptions, OrderListingTableProps } from './OrderListingTable';
@@ -0,0 +1 @@
1
+ export * from './OrderListing';
@@ -1,11 +1,14 @@
1
1
  import type { IReportColumn } from '@/shared/reports/common/Visualization/types';
2
+ import type { EReportColumnKey } from '@/shared/reports/ui/ReportTable/types/report-columns';
2
3
  import type { IOrder } from '../types';
3
4
  interface UseOrderListingDataProps {
4
5
  limitRowAmount?: number;
5
6
  orderListing?: IOrder[];
6
7
  fixedColumns?: IReportColumn['name'][];
8
+ selectedColumns?: EReportColumnKey[];
9
+ columnsOrder?: EReportColumnKey[];
7
10
  }
8
- export declare const useOrderListingData: ({ limitRowAmount, orderListing, fixedColumns }: UseOrderListingDataProps) => {
11
+ export declare const useOrderListingData: ({ limitRowAmount, orderListing, fixedColumns, selectedColumns: externalSelectedColumns, columnsOrder: externalColumnsOrder, }: UseOrderListingDataProps) => {
9
12
  showColumns: IReportColumn[];
10
13
  tableData: {
11
14
  rows: import("@/shared/reports/common/Visualization/types").ReportRowType<import("@/shared/reports/common/Visualization/types").ReportValueType>[];
@@ -1,4 +1,5 @@
1
- export * from './OrderListingLatestTable';
1
+ export * from './components';
2
2
  export * from './constants';
3
- export * from './types';
3
+ export * from './OrderListingLatestTable';
4
4
  export * from './stores';
5
+ export * from './types';
@@ -67,6 +67,7 @@ export interface IOrderExperiment {
67
67
  }
68
68
  export interface IOrder {
69
69
  order_id: string;
70
+ gx_id: string;
70
71
  events: IBaseJourneyEvent[];
71
72
  items: IOrderItem;
72
73
  total_price: number;
@@ -1139,6 +1139,20 @@ var ETrafficSourceType;
1139
1139
  ETrafficSourceType["SMS"] = "sms";
1140
1140
  })(ETrafficSourceType || (ETrafficSourceType = {}));
1141
1141
 
1142
+ var ICampaignType;
1143
+ (function (ICampaignType) {
1144
+ // CONTENT = 'CONTENT',
1145
+ ICampaignType["PRICE"] = "PRICE";
1146
+ ICampaignType["TEMPLATE"] = "TEMPLATE";
1147
+ ICampaignType["TEMPLATE_BUNDLE"] = "TEMPLATE_BUNDLE";
1148
+ // THEME = 'THEME',
1149
+ })(ICampaignType || (ICampaignType = {}));
1150
+ var IVariantType;
1151
+ (function (IVariantType) {
1152
+ IVariantType["VARIANT_A"] = "A";
1153
+ IVariantType["VARIANT_B"] = "B";
1154
+ })(IVariantType || (IVariantType = {}));
1155
+
1142
1156
  /**
1143
1157
  * Pricing enums mirrored from the host app (`~/modules/pricing/types`).
1144
1158
  *
@@ -1176,19 +1190,18 @@ var IShopPlanState;
1176
1190
  IShopPlanState["ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT"] = "ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT";
1177
1191
  })(IShopPlanState || (IShopPlanState = {}));
1178
1192
 
1179
- var ICampaignType;
1180
- (function (ICampaignType) {
1181
- // CONTENT = 'CONTENT',
1182
- ICampaignType["PRICE"] = "PRICE";
1183
- ICampaignType["TEMPLATE"] = "TEMPLATE";
1184
- ICampaignType["TEMPLATE_BUNDLE"] = "TEMPLATE_BUNDLE";
1185
- // THEME = 'THEME',
1186
- })(ICampaignType || (ICampaignType = {}));
1187
- var IVariantType;
1188
- (function (IVariantType) {
1189
- IVariantType["VARIANT_A"] = "A";
1190
- IVariantType["VARIANT_B"] = "B";
1191
- })(IVariantType || (IVariantType = {}));
1193
+ var EReportColumnKey;
1194
+ (function (EReportColumnKey) {
1195
+ EReportColumnKey["ORDER_ID"] = "order_id";
1196
+ EReportColumnKey["GEMX_ID"] = "gx_id";
1197
+ EReportColumnKey["ORDER_DATE"] = "order_date";
1198
+ EReportColumnKey["TOTAL"] = "total_price";
1199
+ EReportColumnKey["CAMPAIGNS"] = "experiments";
1200
+ EReportColumnKey["TRAFFIC_SOURCE"] = "traffic_source";
1201
+ EReportColumnKey["ITEMS"] = "items";
1202
+ EReportColumnKey["DEVICE"] = "device";
1203
+ EReportColumnKey["VISITOR"] = "visitor_type";
1204
+ })(EReportColumnKey || (EReportColumnKey = {}));
1192
1205
 
1193
1206
  [
1194
1207
  { value: EVisitorType.NEW, label: 'New' },
@@ -1139,6 +1139,20 @@ var ETrafficSourceType;
1139
1139
  ETrafficSourceType["SMS"] = "sms";
1140
1140
  })(ETrafficSourceType || (ETrafficSourceType = {}));
1141
1141
 
1142
+ var ICampaignType;
1143
+ (function (ICampaignType) {
1144
+ // CONTENT = 'CONTENT',
1145
+ ICampaignType["PRICE"] = "PRICE";
1146
+ ICampaignType["TEMPLATE"] = "TEMPLATE";
1147
+ ICampaignType["TEMPLATE_BUNDLE"] = "TEMPLATE_BUNDLE";
1148
+ // THEME = 'THEME',
1149
+ })(ICampaignType || (ICampaignType = {}));
1150
+ var IVariantType;
1151
+ (function (IVariantType) {
1152
+ IVariantType["VARIANT_A"] = "A";
1153
+ IVariantType["VARIANT_B"] = "B";
1154
+ })(IVariantType || (IVariantType = {}));
1155
+
1142
1156
  /**
1143
1157
  * Pricing enums mirrored from the host app (`~/modules/pricing/types`).
1144
1158
  *
@@ -1176,19 +1190,18 @@ var IShopPlanState;
1176
1190
  IShopPlanState["ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT"] = "ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT";
1177
1191
  })(IShopPlanState || (IShopPlanState = {}));
1178
1192
 
1179
- var ICampaignType;
1180
- (function (ICampaignType) {
1181
- // CONTENT = 'CONTENT',
1182
- ICampaignType["PRICE"] = "PRICE";
1183
- ICampaignType["TEMPLATE"] = "TEMPLATE";
1184
- ICampaignType["TEMPLATE_BUNDLE"] = "TEMPLATE_BUNDLE";
1185
- // THEME = 'THEME',
1186
- })(ICampaignType || (ICampaignType = {}));
1187
- var IVariantType;
1188
- (function (IVariantType) {
1189
- IVariantType["VARIANT_A"] = "A";
1190
- IVariantType["VARIANT_B"] = "B";
1191
- })(IVariantType || (IVariantType = {}));
1193
+ var EReportColumnKey;
1194
+ (function (EReportColumnKey) {
1195
+ EReportColumnKey["ORDER_ID"] = "order_id";
1196
+ EReportColumnKey["GEMX_ID"] = "gx_id";
1197
+ EReportColumnKey["ORDER_DATE"] = "order_date";
1198
+ EReportColumnKey["TOTAL"] = "total_price";
1199
+ EReportColumnKey["CAMPAIGNS"] = "experiments";
1200
+ EReportColumnKey["TRAFFIC_SOURCE"] = "traffic_source";
1201
+ EReportColumnKey["ITEMS"] = "items";
1202
+ EReportColumnKey["DEVICE"] = "device";
1203
+ EReportColumnKey["VISITOR"] = "visitor_type";
1204
+ })(EReportColumnKey || (EReportColumnKey = {}));
1192
1205
 
1193
1206
  [
1194
1207
  { value: EVisitorType.NEW, label: 'New' },