@storecraft/dashboard 1.0.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/README.md +54 -0
- package/dist/a.html +31 -0
- package/dist/lib/index.cjs +802 -0
- package/dist/lib/index.js +67697 -0
- package/dist/lib/index.umd.cjs +802 -0
- package/dist/lib/src/apps/gallery/gallery-image-grid.d.ts +30 -0
- package/dist/lib/src/apps/gallery/gallery-page.d.ts +2 -0
- package/dist/lib/src/apps/gallery/gallery-searchbar.d.ts +17 -0
- package/dist/lib/src/apps/gallery/gallery-select.d.ts +7 -0
- package/dist/lib/src/apps/gallery/gallery.d.ts +56 -0
- package/dist/lib/src/apps/gallery/image-header.d.ts +18 -0
- package/dist/lib/src/apps/gallery/image-page.d.ts +16 -0
- package/dist/lib/src/apps/gallery/index.d.ts +1 -0
- package/dist/lib/src/apps/gallery/utils.d.ts +2 -0
- package/dist/lib/src/apps/index.d.ts +2 -0
- package/dist/lib/src/auto-mount.d.ts +1 -0
- package/dist/lib/src/comps/action-bar.d.ts +25 -0
- package/dist/lib/src/comps/attributes.d.ts +16 -0
- package/dist/lib/src/comps/base-chart-view.d.ts +20 -0
- package/dist/lib/src/comps/bulk-tag-products-in-collection.d.ts +5 -0
- package/dist/lib/src/comps/capsule.d.ts +8 -0
- package/dist/lib/src/comps/capsules-view.d.ts +27 -0
- package/dist/lib/src/comps/client-only.d.ts +11 -0
- package/dist/lib/src/comps/collection-actions.d.ts +35 -0
- package/dist/lib/src/comps/collection-products.d.ts +32 -0
- package/dist/lib/src/comps/common-button.d.ts +77 -0
- package/dist/lib/src/comps/common-fields.d.ts +61 -0
- package/dist/lib/src/comps/common-table-fields.d.ts +18 -0
- package/dist/lib/src/comps/common-ui.d.ts +101 -0
- package/dist/lib/src/comps/copyable-view.d.ts +15 -0
- package/dist/lib/src/comps/customer-orders.d.ts +13 -0
- package/dist/lib/src/comps/dark-mode.d.ts +5 -0
- package/dist/lib/src/comps/discount-details.d.ts +60 -0
- package/dist/lib/src/comps/discount-filters.d.ts +153 -0
- package/dist/lib/src/comps/discount-performance.d.ts +13 -0
- package/dist/lib/src/comps/discounts-quick-search-actions.d.ts +6 -0
- package/dist/lib/src/comps/discounts-table-code.d.ts +12 -0
- package/dist/lib/src/comps/discounts-table-type.d.ts +9 -0
- package/dist/lib/src/comps/document-actions.d.ts +11 -0
- package/dist/lib/src/comps/document-details.d.ts +20 -0
- package/dist/lib/src/comps/document-title.d.ts +20 -0
- package/dist/lib/src/comps/drawer.d.ts +18 -0
- package/dist/lib/src/comps/error-message.d.ts +29 -0
- package/dist/lib/src/comps/fields-view.d.ts +107 -0
- package/dist/lib/src/comps/gradient-text.d.ts +1 -0
- package/dist/lib/src/comps/home-header.d.ts +24 -0
- package/dist/lib/src/comps/home-invite-action-card.d.ts +17 -0
- package/dist/lib/src/comps/home-performace.d.ts +33 -0
- package/dist/lib/src/comps/home-sales-chart.d.ts +20 -0
- package/dist/lib/src/comps/home-stat-card.d.ts +24 -0
- package/dist/lib/src/comps/home-time-frame.d.ts +21 -0
- package/dist/lib/src/comps/image-editor.d.ts +111 -0
- package/dist/lib/src/comps/img.d.ts +11 -0
- package/dist/lib/src/comps/json.d.ts +14 -0
- package/dist/lib/src/comps/lazy-carousel.d.ts +20 -0
- package/dist/lib/src/comps/login-connect.d.ts +4 -0
- package/dist/lib/src/comps/login-content.d.ts +7 -0
- package/dist/lib/src/comps/login-copyright.d.ts +7 -0
- package/dist/lib/src/comps/login-form.d.ts +44 -0
- package/dist/lib/src/comps/login-marquee.d.ts +4 -0
- package/dist/lib/src/comps/logo.d.ts +4 -0
- package/dist/lib/src/comps/markdown-card.d.ts +18 -0
- package/dist/lib/src/comps/md-editor.d.ts +20 -0
- package/dist/lib/src/comps/md-view.d.ts +16 -0
- package/dist/lib/src/comps/media.d.ts +107 -0
- package/dist/lib/src/comps/modal.d.ts +15 -0
- package/dist/lib/src/comps/notifications-button.d.ts +28 -0
- package/dist/lib/src/comps/notifications.d.ts +15 -0
- package/dist/lib/src/comps/order-coupon-info.d.ts +12 -0
- package/dist/lib/src/comps/order-delivery-method.d.ts +11 -0
- package/dist/lib/src/comps/order-line-items.d.ts +19 -0
- package/dist/lib/src/comps/order-payment-gateway.d.ts +23 -0
- package/dist/lib/src/comps/order-price.d.ts +15 -0
- package/dist/lib/src/comps/orders-quick-search-actions.d.ts +9 -0
- package/dist/lib/src/comps/overlay.d.ts +19 -0
- package/dist/lib/src/comps/portal-creator.d.ts +6 -0
- package/dist/lib/src/comps/product-discounts.d.ts +22 -0
- package/dist/lib/src/comps/product-related-products.d.ts +10 -0
- package/dist/lib/src/comps/products-variants-test.d.ts +1 -0
- package/dist/lib/src/comps/products-variants.d.ts +38 -0
- package/dist/lib/src/comps/quick-search-browser.d.ts +32 -0
- package/dist/lib/src/comps/resource-browse.d.ts +51 -0
- package/dist/lib/src/comps/resource-onboard-svg.d.ts +2 -0
- package/dist/lib/src/comps/resource-title.d.ts +7 -0
- package/dist/lib/src/comps/resource-view.d.ts +25 -0
- package/dist/lib/src/comps/secret-view.d.ts +9 -0
- package/dist/lib/src/comps/select-resource.d.ts +88 -0
- package/dist/lib/src/comps/settings-api-keys.d.ts +2 -0
- package/dist/lib/src/comps/settings-storage.d.ts +15 -0
- package/dist/lib/src/comps/show-if.d.ts +25 -0
- package/dist/lib/src/comps/side-menu.d.ts +50 -0
- package/dist/lib/src/comps/splitter-view.d.ts +1 -0
- package/dist/lib/src/comps/storefront-products.d.ts +12 -0
- package/dist/lib/src/comps/symbols.d.ts +4 -0
- package/dist/lib/src/comps/table-schema-view.d.ts +68 -0
- package/dist/lib/src/comps/tag-values.d.ts +9 -0
- package/dist/lib/src/comps/tags-edit.d.ts +13 -0
- package/dist/lib/src/comps/template-example-input.d.ts +3 -0
- package/dist/lib/src/comps/template-template.d.ts +6 -0
- package/dist/lib/src/comps/transition.d.ts +51 -0
- package/dist/lib/src/hooks/createMediaQueryHook.d.ts +8 -0
- package/dist/lib/src/hooks/useCollectionsActions.d.ts +66 -0
- package/dist/lib/src/hooks/useDarkMode.d.ts +9 -0
- package/dist/lib/src/hooks/useDocumentActions.d.ts +35 -0
- package/dist/lib/src/hooks/useInterval.d.ts +13 -0
- package/dist/lib/src/hooks/useKeyboardMatch.d.ts +6 -0
- package/dist/lib/src/hooks/useMediaQuery.d.ts +3 -0
- package/dist/lib/src/hooks/useMounted.d.ts +1 -0
- package/dist/lib/src/hooks/useNavigateWithState.d.ts +26 -0
- package/dist/lib/src/hooks/useOnClickOutside.d.ts +7 -0
- package/dist/lib/src/hooks/usePreferences.d.ts +7 -0
- package/dist/lib/src/hooks/useScrollDelta.d.ts +4 -0
- package/dist/lib/src/hooks/useToggle.d.ts +7 -0
- package/dist/lib/src/hooks/useTrigger.d.ts +5 -0
- package/dist/lib/src/hooks/utils.browser.d.ts +7 -0
- package/dist/lib/src/index.d.ts +6 -0
- package/dist/lib/src/layout.d.ts +18 -0
- package/dist/lib/src/login.d.ts +17 -0
- package/dist/lib/src/main.d.ts +1 -0
- package/dist/lib/src/pages/collection.d.ts +15 -0
- package/dist/lib/src/pages/collections.d.ts +2 -0
- package/dist/lib/src/pages/customer.d.ts +15 -0
- package/dist/lib/src/pages/customers.d.ts +3 -0
- package/dist/lib/src/pages/discount.d.ts +15 -0
- package/dist/lib/src/pages/discounts.d.ts +2 -0
- package/dist/lib/src/pages/extension.d.ts +13 -0
- package/dist/lib/src/pages/extensions.d.ts +16 -0
- package/dist/lib/src/pages/home.d.ts +2 -0
- package/dist/lib/src/pages/index.d.ts +36 -0
- package/dist/lib/src/pages/order.d.ts +15 -0
- package/dist/lib/src/pages/orders.d.ts +2 -0
- package/dist/lib/src/pages/payment-gateway.d.ts +13 -0
- package/dist/lib/src/pages/payment-gateways.d.ts +16 -0
- package/dist/lib/src/pages/post.d.ts +15 -0
- package/dist/lib/src/pages/posts.d.ts +2 -0
- package/dist/lib/src/pages/product.d.ts +22 -0
- package/dist/lib/src/pages/products.d.ts +2 -0
- package/dist/lib/src/pages/settings.d.ts +4 -0
- package/dist/lib/src/pages/shipping-method.d.ts +15 -0
- package/dist/lib/src/pages/shipping-methods.d.ts +2 -0
- package/dist/lib/src/pages/storefront.d.ts +15 -0
- package/dist/lib/src/pages/storefronts.d.ts +2 -0
- package/dist/lib/src/pages/tag.d.ts +15 -0
- package/dist/lib/src/pages/tags.d.ts +2 -0
- package/dist/lib/src/pages/template.d.ts +15 -0
- package/dist/lib/src/pages/templates.d.ts +2 -0
- package/dist/lib/src/routes.d.ts +1 -0
- package/dist/lib/src/utils/index.d.ts +7 -0
- package/dist/lib/src/utils/time.d.ts +7 -0
- package/dist/website/a.html +31 -0
- package/dist/website/assets/index-Bcp1qc1F.js +801 -0
- package/dist/website/assets/index-C-yHq9o3.js +801 -0
- package/dist/website/assets/index-CUTe6Gm_.js +801 -0
- package/dist/website/assets/index-N4DVLmRv.js +801 -0
- package/dist/website/assets/style-AZ1dEhGu.css +1 -0
- package/dist/website/index.html +14 -0
- package/dist/website/index.js +67682 -0
- package/dist/website/index.umd.cjs +802 -0
- package/dist/website/main-old.png +0 -0
- package/dist/website/main.png +0 -0
- package/dist/website/main2.png +0 -0
- package/dist/website/main3.png +0 -0
- package/dist/website/main4.png +0 -0
- package/dist/website/main5.png +0 -0
- package/dist/website/main_half.png +0 -0
- package/dist/website/vite.svg +1 -0
- package/package.json +83 -0
@@ -0,0 +1,60 @@
|
|
1
|
+
export function discount_details_validator(v: any): (string | boolean)[];
|
2
|
+
export const discount_types: {
|
3
|
+
id: number;
|
4
|
+
type: string;
|
5
|
+
name: string;
|
6
|
+
desc: string;
|
7
|
+
}[];
|
8
|
+
export default DiscountDetailsView;
|
9
|
+
export type DiscountTypesParams = {
|
10
|
+
selectedType: import('@storecraft/core/v-api').DiscountDetails["meta"];
|
11
|
+
onChange: (meta: import('@storecraft/core/v-api').DiscountDetails["meta"]) => void;
|
12
|
+
};
|
13
|
+
export type BulkDiscountParams = {
|
14
|
+
type: 'bulk';
|
15
|
+
value: import('@storecraft/core/v-api').BulkDiscountExtra;
|
16
|
+
onChange: (extra: import('@storecraft/core/v-api').BulkDiscountExtra) => void;
|
17
|
+
};
|
18
|
+
export type BundleDiscountParams = {
|
19
|
+
meta: 'bundle';
|
20
|
+
value: import('@storecraft/core/v-api').BundleDiscountExtra;
|
21
|
+
context: import('./fields-view.jsx').FieldContextData;
|
22
|
+
onChange: (extra: import('@storecraft/core/v-api').BundleDiscountExtra) => void;
|
23
|
+
};
|
24
|
+
export type ExplainPriceParams = {
|
25
|
+
prefix: string;
|
26
|
+
percent: number;
|
27
|
+
fixed: number;
|
28
|
+
};
|
29
|
+
export type RegularDiscountParams = {
|
30
|
+
type: 'regular';
|
31
|
+
value: import('@storecraft/core/v-api').RegularDiscountExtra;
|
32
|
+
onChange: (extra: import('@storecraft/core/v-api').RegularDiscountExtra) => void;
|
33
|
+
};
|
34
|
+
export type BuyXGetYDiscountParams = {
|
35
|
+
type: 'buy_x_get_y';
|
36
|
+
value: import('@storecraft/core/v-api').BuyXGetYDiscountExtra;
|
37
|
+
onChange: (extra: import('@storecraft/core/v-api').BuyXGetYDiscountExtra) => void;
|
38
|
+
context: import('../pages/discount.jsx').Context;
|
39
|
+
};
|
40
|
+
export type OrderDiscountParams = {
|
41
|
+
type: 'order';
|
42
|
+
value: import('@storecraft/core/v-api').OrderDiscountExtra;
|
43
|
+
onChange: (extra: import('@storecraft/core/v-api').OrderDiscountExtra) => void;
|
44
|
+
};
|
45
|
+
export type Type2CompParams = {
|
46
|
+
meta: import('@storecraft/core/v-api').DiscountDetails["meta"];
|
47
|
+
context: Parameters<({ field, value, context, onChange, ...rest }: import('./fields-view.jsx').FieldLeafViewParams<import('@storecraft/core/v-api').DiscountDetails, import('../pages/discount.jsx').Context, import('@storecraft/core/v-api').DiscountType>) => import("react").JSX.Element>["0"]["context"];
|
48
|
+
onChange: (extra: import('@storecraft/core/v-api').DiscountDetails["extra"]) => void;
|
49
|
+
value: import('@storecraft/core/v-api').DiscountDetails["extra"];
|
50
|
+
};
|
51
|
+
/**
|
52
|
+
*
|
53
|
+
* @param {import('./fields-view.jsx').FieldLeafViewParams<
|
54
|
+
* import('@storecraft/core/v-api').DiscountDetails,
|
55
|
+
* import('../pages/discount.jsx').Context,
|
56
|
+
* import('@storecraft/core/v-api').DiscountType
|
57
|
+
* >
|
58
|
+
* } params
|
59
|
+
*/
|
60
|
+
declare function DiscountDetailsView({ field, value, context, onChange, ...rest }: import('./fields-view.jsx').FieldLeafViewParams<import('@storecraft/core/v-api').DiscountDetails, import('../pages/discount.jsx').Context, import('@storecraft/core/v-api').DiscountType>): import("react").JSX.Element;
|
@@ -0,0 +1,153 @@
|
|
1
|
+
export function discount_filters_validator(v: import('@storecraft/core/v-api').Filter["meta"][]): (string | boolean)[];
|
2
|
+
export default DiscountFilters;
|
3
|
+
export type Filter_ProductInCollectionsParams = {
|
4
|
+
value: import('@storecraft/core/v-api').FilterValue_p_in_collections;
|
5
|
+
onChange: (filter_value: import('@storecraft/core/v-api').FilterValue_p_in_collections) => void;
|
6
|
+
context: import('../pages/discount.jsx').Context;
|
7
|
+
};
|
8
|
+
export type Filter_ProductHasTagsParams = {
|
9
|
+
value: import('@storecraft/core/v-api').FilterValue_p_in_tags;
|
10
|
+
onChange: (filter_value: import('@storecraft/core/v-api').FilterValue_p_in_tags) => void;
|
11
|
+
context: import('../pages/discount.jsx').Context;
|
12
|
+
};
|
13
|
+
export type Filter_ProductHasHandleParams = {
|
14
|
+
value: import('@storecraft/core/v-api').FilterValue_p_in_products;
|
15
|
+
onChange: (filter_value: import('@storecraft/core/v-api').FilterValue_p_in_products) => void;
|
16
|
+
context: import('../pages/discount.jsx').Context;
|
17
|
+
};
|
18
|
+
export type Filter_ProductPriceInRangeParams = {
|
19
|
+
value: import('@storecraft/core/v-api').FilterValue_p_in_price_range;
|
20
|
+
onChange: (filter_value: import('@storecraft/core/v-api').FilterValue_p_in_price_range) => void;
|
21
|
+
};
|
22
|
+
export type Filter_OrderSubTotalParams = {
|
23
|
+
value: import('@storecraft/core/v-api').FilterValue_o_subtotal_in_range;
|
24
|
+
onChange: (filter_value: import('@storecraft/core/v-api').FilterValue_o_subtotal_in_range) => void;
|
25
|
+
};
|
26
|
+
export type Filter_OrderItemCountParams = {
|
27
|
+
value?: import('@storecraft/core/v-api').FilterValue_o_items_count_in_range;
|
28
|
+
onChange: (filter_value: import('@storecraft/core/v-api').FilterValue_o_items_count_in_range) => void;
|
29
|
+
};
|
30
|
+
export type Filter_OrderDateParams = {
|
31
|
+
onChange: (value: import('@storecraft/core/v-api').FilterValue_o_date_in_range) => void;
|
32
|
+
value?: import('@storecraft/core/v-api').FilterValue_o_date_in_range;
|
33
|
+
};
|
34
|
+
export type Filter_OrderHasCustomersParams = {
|
35
|
+
onChange: (value: import('@storecraft/core/v-api').CustomerType[]) => void;
|
36
|
+
value: import('@storecraft/core/v-api').CustomerType[];
|
37
|
+
context: import('../pages/discount.jsx').Context;
|
38
|
+
};
|
39
|
+
export type ProductFilterContainerParams = {
|
40
|
+
name: string;
|
41
|
+
value: import('@storecraft/core/v-api').Filter["value"];
|
42
|
+
Comp: ({
|
43
|
+
Comp: ({ onChange, value, context }: Filter_ProductInCollectionsParams) => import("react").JSX.Element;
|
44
|
+
CompParams: {};
|
45
|
+
id: number;
|
46
|
+
type: string;
|
47
|
+
op: string;
|
48
|
+
name: string;
|
49
|
+
} | {
|
50
|
+
Comp: ({ onChange, value, context }: Filter_ProductHasTagsParams) => import("react").JSX.Element;
|
51
|
+
CompParams: {};
|
52
|
+
id: number;
|
53
|
+
type: string;
|
54
|
+
op: string;
|
55
|
+
name: string;
|
56
|
+
} | {
|
57
|
+
Comp: ({ onChange, value, }: Filter_ProductPriceInRangeParams) => import("react").JSX.Element;
|
58
|
+
CompParams: {};
|
59
|
+
id: number;
|
60
|
+
type: string;
|
61
|
+
op: string;
|
62
|
+
name: string;
|
63
|
+
} | {
|
64
|
+
Comp: ({ onChange, value }: Filter_OrderDateParams) => import("react").JSX.Element;
|
65
|
+
CompParams: {};
|
66
|
+
id: number;
|
67
|
+
type: string;
|
68
|
+
op: string;
|
69
|
+
name: string;
|
70
|
+
} | {
|
71
|
+
Comp: ({ onChange, value, context }: Filter_OrderHasCustomersParams) => import("react").JSX.Element;
|
72
|
+
CompParams: {};
|
73
|
+
id: number;
|
74
|
+
type: string;
|
75
|
+
op: string;
|
76
|
+
name: string;
|
77
|
+
})[][0]["Comp"];
|
78
|
+
CompParams: ({
|
79
|
+
Comp: ({ onChange, value, context }: Filter_ProductInCollectionsParams) => import("react").JSX.Element;
|
80
|
+
CompParams: {};
|
81
|
+
id: number;
|
82
|
+
type: string;
|
83
|
+
op: string;
|
84
|
+
name: string;
|
85
|
+
} | {
|
86
|
+
Comp: ({ onChange, value, context }: Filter_ProductHasTagsParams) => import("react").JSX.Element;
|
87
|
+
CompParams: {};
|
88
|
+
id: number;
|
89
|
+
type: string;
|
90
|
+
op: string;
|
91
|
+
name: string;
|
92
|
+
} | {
|
93
|
+
Comp: ({ onChange, value, }: Filter_ProductPriceInRangeParams) => import("react").JSX.Element;
|
94
|
+
CompParams: {};
|
95
|
+
id: number;
|
96
|
+
type: string;
|
97
|
+
op: string;
|
98
|
+
name: string;
|
99
|
+
} | {
|
100
|
+
Comp: ({ onChange, value }: Filter_OrderDateParams) => import("react").JSX.Element;
|
101
|
+
CompParams: {};
|
102
|
+
id: number;
|
103
|
+
type: string;
|
104
|
+
op: string;
|
105
|
+
name: string;
|
106
|
+
} | {
|
107
|
+
Comp: ({ onChange, value, context }: Filter_OrderHasCustomersParams) => import("react").JSX.Element;
|
108
|
+
CompParams: {};
|
109
|
+
id: number;
|
110
|
+
type: string;
|
111
|
+
op: string;
|
112
|
+
name: string;
|
113
|
+
})[][0]["CompParams"];
|
114
|
+
type: import('@storecraft/core/v-api').Filter["meta"]["type"];
|
115
|
+
onChange: (value: import('@storecraft/core/v-api').Filter["value"]) => void;
|
116
|
+
onRemove: () => void;
|
117
|
+
ix: number;
|
118
|
+
context: import('../pages/order.jsx').Context;
|
119
|
+
};
|
120
|
+
export type AddFilterParams = {
|
121
|
+
type: string;
|
122
|
+
onAdd: (filter_id: string | number) => void;
|
123
|
+
};
|
124
|
+
export type DiscountFiltersParams = {
|
125
|
+
/**
|
126
|
+
* bunch of filters
|
127
|
+
*/
|
128
|
+
value: import('@storecraft/core/v-api').Filter[];
|
129
|
+
/**
|
130
|
+
* bunch of filters
|
131
|
+
*/
|
132
|
+
types: ('product' | 'order')[];
|
133
|
+
/**
|
134
|
+
* bunch of filters
|
135
|
+
*/
|
136
|
+
onChange: (filters: import('@storecraft/core/v-api').Filter[]) => void;
|
137
|
+
context: import('../pages/discount.jsx').Context;
|
138
|
+
};
|
139
|
+
/**
|
140
|
+
*
|
141
|
+
* @typedef {object} DiscountFiltersParams
|
142
|
+
* @prop {import('@storecraft/core/v-api').Filter[]} value bunch of filters
|
143
|
+
* @prop {('product' | 'order')[]} types bunch of filters
|
144
|
+
* @prop {(filters:
|
145
|
+
* import('@storecraft/core/v-api').Filter[]) => void
|
146
|
+
* } onChange bunch of filters
|
147
|
+
* @prop {import('../pages/discount.jsx').Context} context
|
148
|
+
*
|
149
|
+
*
|
150
|
+
* @param {DiscountFiltersParams} params
|
151
|
+
*
|
152
|
+
*/
|
153
|
+
declare function DiscountFilters({ value, onChange, types, context, ...rest }: DiscountFiltersParams): import("react").JSX.Element;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export default DiscountPerformance;
|
2
|
+
/**
|
3
|
+
*
|
4
|
+
* @param {import('./fields-view.jsx').FieldLeafViewParams<
|
5
|
+
* undefined,
|
6
|
+
* import('../pages/discount.jsx').Context,
|
7
|
+
* import('@storecraft/core/v-api').DiscountType
|
8
|
+
* > &
|
9
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
10
|
+
* } params
|
11
|
+
*
|
12
|
+
*/
|
13
|
+
declare function DiscountPerformance({ field, context, error, setError, ...rest }: import('./fields-view.jsx').FieldLeafViewParams<undefined, import('../pages/discount.jsx').Context, import('@storecraft/core/v-api').DiscountType> & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export default DiscountsQuickSearchActions;
|
2
|
+
/**
|
3
|
+
*
|
4
|
+
* @param {React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>} param
|
5
|
+
*/
|
6
|
+
declare function DiscountsQuickSearchActions({ ...rest }: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export default Code;
|
2
|
+
/**
|
3
|
+
*
|
4
|
+
* @param {object} param
|
5
|
+
* @param {string} param.value
|
6
|
+
* @param {import("./table-schema-view.jsx").TableSchemaViewContext<
|
7
|
+
* import("@storecraft/core/v-api").DiscountType>} param.context
|
8
|
+
*/
|
9
|
+
declare function Code({ value, context, ...rest }: {
|
10
|
+
value: string;
|
11
|
+
context: import('./table-schema-view.jsx').TableSchemaViewContext<import('@storecraft/core/v-api').DiscountType>;
|
12
|
+
}): import("react").JSX.Element;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export function discount_types_to_color(type: import('@storecraft/core/v-api').DiscountDetails["meta"]["type"]): "bg-kf-400 dark:bg-kf-400/40" | "bg-red-400 dark:bg-red-400/40" | "bg-teal-600 dark:bg-teal-600/40" | "bg-cyan-500 dark:bg-cyan-500/40" | "bg-sky-500 dark:bg-sky-400/40" | "bg-slate-400 dark:bg-slate-400/20";
|
2
|
+
export default DiscountType;
|
3
|
+
/**
|
4
|
+
*
|
5
|
+
* @param {import('./table-schema-view.jsx').TableSchemaViewComponentParams<
|
6
|
+
* import('@storecraft/core/v-api').DiscountDetails["meta"]>} param0
|
7
|
+
* @returns
|
8
|
+
*/
|
9
|
+
declare function DiscountType({ value, ...rest }: import('./table-schema-view.jsx').TableSchemaViewComponentParams<import('@storecraft/core/v-api').DiscountDetails["meta"]>): import("react").JSX.Element;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export function RegularDocumentActions({ onClickSave, onClickCreate, onClickDelete, onClickDuplicate, onClickReload, id, children, ...rest }: RegularDocumentActionsParams): import("react").JSX.Element;
|
2
|
+
export type InternalRegularDocumentActionsParams = {
|
3
|
+
onClickSave?: () => Promise<any>;
|
4
|
+
onClickCreate?: () => Promise<any>;
|
5
|
+
onClickDuplicate?: () => Promise<any>;
|
6
|
+
onClickDelete?: (id: string) => Promise<any>;
|
7
|
+
onClickReload?: () => Promise<any>;
|
8
|
+
children?: React.ReactNode;
|
9
|
+
id?: string;
|
10
|
+
};
|
11
|
+
export type RegularDocumentActionsParams = InternalRegularDocumentActionsParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
export default DocumentDetails;
|
2
|
+
export type InternalDocumentDetailsParams = {
|
3
|
+
doc: import('@storecraft/core/v-api').BaseType;
|
4
|
+
collectionId: string;
|
5
|
+
className?: string;
|
6
|
+
};
|
7
|
+
export type DocumentDetailsParams = InternalDocumentDetailsParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
8
|
+
/**
|
9
|
+
* @typedef {object} InternalDocumentDetailsParams
|
10
|
+
* @prop {import('@storecraft/core/v-api').BaseType} doc
|
11
|
+
* @prop {string} collectionId
|
12
|
+
* @prop {string} [className]
|
13
|
+
*
|
14
|
+
* @typedef {InternalDocumentDetailsParams &
|
15
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
16
|
+
* } DocumentDetailsParams
|
17
|
+
*
|
18
|
+
* @param {DocumentDetailsParams} param
|
19
|
+
*/
|
20
|
+
declare function DocumentDetails({ doc, collectionId, className, ...rest }: DocumentDetailsParams): import("react").JSX.Element;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
export default DocumentTitle;
|
2
|
+
export type InternalDocumentTitleParams = {
|
3
|
+
major?: string[];
|
4
|
+
delimiter?: string;
|
5
|
+
className?: string;
|
6
|
+
};
|
7
|
+
export type DocumentTitleParams = InternalDocumentTitleParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
8
|
+
/**
|
9
|
+
* @typedef {object} InternalDocumentTitleParams
|
10
|
+
* @prop {string[]} [major]
|
11
|
+
* @prop {string} [delimiter]
|
12
|
+
* @prop {string} [className]
|
13
|
+
*
|
14
|
+
* @typedef {InternalDocumentTitleParams &
|
15
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
16
|
+
* } DocumentTitleParams
|
17
|
+
*
|
18
|
+
* @param {DocumentTitleParams} param
|
19
|
+
*/
|
20
|
+
declare function DocumentTitle({ major, delimiter, className, ...rest }: DocumentTitleParams): import("react").JSX.Element;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export default Drawer;
|
2
|
+
export type InternalDrawerParams = {
|
3
|
+
open?: boolean;
|
4
|
+
className?: string;
|
5
|
+
};
|
6
|
+
export type DrawerParams = InternalDrawerParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
7
|
+
/**
|
8
|
+
* @typedef {object} InternalDrawerParams
|
9
|
+
* @prop {boolean} [open]
|
10
|
+
* @prop {string} [className]
|
11
|
+
*
|
12
|
+
* @typedef {InternalDrawerParams &
|
13
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
14
|
+
* } DrawerParams
|
15
|
+
*
|
16
|
+
* @param {DrawerParams} param
|
17
|
+
*/
|
18
|
+
declare function Drawer({ className, open, ...rest }: DrawerParams): import("react").JSX.Element;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
export function format_storecraft_errors(error: import('@storecraft/core/v-api').error): string[];
|
2
|
+
export default ErrorMessage;
|
3
|
+
/**
|
4
|
+
* error message view from document pages
|
5
|
+
*/
|
6
|
+
export type InternalEditMessage = {
|
7
|
+
error?: import('@storecraft/core/v-api').error;
|
8
|
+
positive?: boolean;
|
9
|
+
className?: string;
|
10
|
+
};
|
11
|
+
/**
|
12
|
+
* error message view from document pages
|
13
|
+
*/
|
14
|
+
export type EditMessageParams = InternalEditMessage & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
15
|
+
/**
|
16
|
+
* error message view from document pages
|
17
|
+
*
|
18
|
+
* @typedef {object} InternalEditMessage
|
19
|
+
* @prop {import("@storecraft/core/v-api").error} [error]
|
20
|
+
* @prop {boolean} [positive]
|
21
|
+
* @prop {string} [className]
|
22
|
+
*
|
23
|
+
* @typedef {InternalEditMessage &
|
24
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
25
|
+
* } EditMessageParams
|
26
|
+
*
|
27
|
+
* @param {EditMessageParams} param
|
28
|
+
*/
|
29
|
+
declare function ErrorMessage({ error, positive, className, ...rest }: EditMessageParams): import("react").JSX.Element;
|
@@ -0,0 +1,107 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
export const EVENT_CHANGE: "pubsub.on_change";
|
3
|
+
export const EVENT_REFRESH: "pubsub.on_refresh";
|
4
|
+
export const pubsub: PubSub;
|
5
|
+
export default FieldsView;
|
6
|
+
export type FieldData = {
|
7
|
+
type?: string;
|
8
|
+
key?: string;
|
9
|
+
running_key?: string;
|
10
|
+
defaultValue?: any;
|
11
|
+
name?: string;
|
12
|
+
desc?: string;
|
13
|
+
/**
|
14
|
+
* nested fields
|
15
|
+
*/
|
16
|
+
fields?: FieldData[];
|
17
|
+
/**
|
18
|
+
* a react component
|
19
|
+
*/
|
20
|
+
comp?: React.ComponentType;
|
21
|
+
/**
|
22
|
+
* params for comp
|
23
|
+
*/
|
24
|
+
comp_params?: object;
|
25
|
+
};
|
26
|
+
export type FieldContextData<D extends unknown = {}> = {
|
27
|
+
/**
|
28
|
+
* running key for leafs
|
29
|
+
*/
|
30
|
+
running_key?: string;
|
31
|
+
pubsub?: PubSub;
|
32
|
+
/**
|
33
|
+
* the entire original data
|
34
|
+
*/
|
35
|
+
data?: D;
|
36
|
+
/**
|
37
|
+
* the entire original data
|
38
|
+
*/
|
39
|
+
query?: Record<string, {
|
40
|
+
get: () => any;
|
41
|
+
set?: (val: any) => void;
|
42
|
+
}>;
|
43
|
+
};
|
44
|
+
/**
|
45
|
+
* Root view params
|
46
|
+
*/
|
47
|
+
export type FieldViewParams<O extends unknown = {}, C extends unknown = {}> = {
|
48
|
+
/**
|
49
|
+
* running key for leafs
|
50
|
+
*/
|
51
|
+
running_key?: string;
|
52
|
+
field: FieldData;
|
53
|
+
value: O;
|
54
|
+
className?: string;
|
55
|
+
context?: C;
|
56
|
+
isViewMode: boolean;
|
57
|
+
};
|
58
|
+
export type FieldNodeViewParams<V extends unknown = any, C extends {} = {}, O extends unknown = {}> = {
|
59
|
+
/**
|
60
|
+
* running key for leafs
|
61
|
+
*/
|
62
|
+
running_key?: string;
|
63
|
+
field: FieldData;
|
64
|
+
value: V;
|
65
|
+
className?: string;
|
66
|
+
context?: FieldContextData<O> & C;
|
67
|
+
isViewMode: boolean;
|
68
|
+
};
|
69
|
+
/**
|
70
|
+
* Every view in the `fields-view` schema will be injected with
|
71
|
+
* the following parameters
|
72
|
+
*/
|
73
|
+
export type FieldLeafViewParams<V, C = {}, O = {}> = {
|
74
|
+
field?: FieldData;
|
75
|
+
value?: V;
|
76
|
+
context?: FieldContextData<O> & C;
|
77
|
+
disabled?: boolean;
|
78
|
+
onChange?: (value: V) => void;
|
79
|
+
setError?: (error: string) => void;
|
80
|
+
error?: string;
|
81
|
+
};
|
82
|
+
export type FieldViewImperativeInterface<T extends import('@storecraft/core/v-api').BaseType = {}> = {
|
83
|
+
/**
|
84
|
+
* Drill and get all nodes rendered data
|
85
|
+
*/
|
86
|
+
get: (validate?: boolean) => {
|
87
|
+
data: T;
|
88
|
+
validation: {
|
89
|
+
fine: Record<string, [valid: boolean, message: string, fieldname: string]>;
|
90
|
+
has_errors: boolean;
|
91
|
+
};
|
92
|
+
};
|
93
|
+
};
|
94
|
+
declare class PubSub {
|
95
|
+
_subscribers: Set<any>;
|
96
|
+
notify_subscribers: () => void;
|
97
|
+
/**
|
98
|
+
* @param {(event: string, value: any) => void} cb
|
99
|
+
*/
|
100
|
+
add_sub: (cb: (event: string, value: any) => void) => () => void;
|
101
|
+
/**
|
102
|
+
* @param {string} event
|
103
|
+
* @param {any} data
|
104
|
+
*/
|
105
|
+
dispatch: (event: string, data: any) => void;
|
106
|
+
}
|
107
|
+
declare const FieldsView: React.ForwardRefExoticComponent<FieldViewParams<unknown, {}> & React.RefAttributes<any>>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export function GradientText({ className, ...rest }: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>): import("react").JSX.Element;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
export default Header;
|
2
|
+
export type InternalHeaderParams = {
|
3
|
+
label?: string;
|
4
|
+
Icon?: import('react').FC<{
|
5
|
+
className?: string;
|
6
|
+
}>;
|
7
|
+
className?: string;
|
8
|
+
iconClassName?: string;
|
9
|
+
};
|
10
|
+
export type HeaderParams = InternalHeaderParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
11
|
+
/**
|
12
|
+
* @typedef {object} InternalHeaderParams
|
13
|
+
* @prop {string} [label]
|
14
|
+
* @prop {import("react").FC<{className?: string}>} [Icon]
|
15
|
+
* @prop {string} [className]
|
16
|
+
* @prop {string} [iconClassName]
|
17
|
+
*
|
18
|
+
* @typedef {InternalHeaderParams &
|
19
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
20
|
+
* } HeaderParams
|
21
|
+
*
|
22
|
+
* @param {HeaderParams} param
|
23
|
+
*/
|
24
|
+
declare function Header({ label, Icon, className, iconClassName, ...rest }: HeaderParams): import("react").JSX.Element;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export default InviteActionCard;
|
2
|
+
export type InviteActionCardParams = {
|
3
|
+
msg?: string;
|
4
|
+
link?: string;
|
5
|
+
Icon: React.ReactElement;
|
6
|
+
};
|
7
|
+
/**
|
8
|
+
*
|
9
|
+
* @typedef {object} InviteActionCardParams
|
10
|
+
* @prop {string} [msg='']
|
11
|
+
* @prop {string} [link='/admin']
|
12
|
+
* @prop {React.ReactElement} Icon
|
13
|
+
*
|
14
|
+
* @param {InviteActionCardParams} params
|
15
|
+
*
|
16
|
+
*/
|
17
|
+
declare function InviteActionCard({ msg, link, Icon }: InviteActionCardParams): import("react").JSX.Element;
|
@@ -0,0 +1,33 @@
|
|
1
|
+
export default Performance;
|
2
|
+
export type InnerHomeInfoCapsuleParams = {
|
3
|
+
label: string;
|
4
|
+
value: string;
|
5
|
+
};
|
6
|
+
export type HomeInfoCapsuleParams = InnerHomeInfoCapsuleParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
7
|
+
export type stat_entity_fn<V> = (k: string, v: import('@storecraft/core/v-api').OrdersStatisticsEntity) => V;
|
8
|
+
export type InnerHomeTopSoldCardParams = {
|
9
|
+
data: [string, import('@storecraft/core/v-api').OrdersStatisticsEntity][];
|
10
|
+
label_prefix?: string;
|
11
|
+
label?: string;
|
12
|
+
linkFn: stat_entity_fn<string>;
|
13
|
+
valFn?: stat_entity_fn<number>;
|
14
|
+
labelFn?: stat_entity_fn<string>;
|
15
|
+
};
|
16
|
+
export type HomeTopSoldCardParams = InnerHomeTopSoldCardParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
17
|
+
export type InnerHomePerformanceParams = {
|
18
|
+
nada?: object;
|
19
|
+
};
|
20
|
+
export type HomePerformanceParams = InnerHomePerformanceParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
21
|
+
/**
|
22
|
+
*
|
23
|
+
* @typedef {object} InnerHomePerformanceParams
|
24
|
+
* @prop {object} [nada]
|
25
|
+
*
|
26
|
+
* @typedef {InnerHomePerformanceParams &
|
27
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
28
|
+
* } HomePerformanceParams
|
29
|
+
*
|
30
|
+
* @param {HomePerformanceParams} params
|
31
|
+
*
|
32
|
+
*/
|
33
|
+
declare function Performance({ ...rest }: HomePerformanceParams): import("react").JSX.Element;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
export default SalesChart;
|
2
|
+
export type InnerSalesChartParams = {
|
3
|
+
data: import('@storecraft/core/v-api').OrdersStatisticsType;
|
4
|
+
};
|
5
|
+
export type SalesChartParams = InnerSalesChartParams & Omit<import('./base-chart-view.jsx').BaseChartViewParams, 'config'>;
|
6
|
+
/**
|
7
|
+
*
|
8
|
+
* @typedef {object} InnerSalesChartParams
|
9
|
+
* @prop {import('@storecraft/core/v-api').OrdersStatisticsType} data
|
10
|
+
*
|
11
|
+
*
|
12
|
+
* @typedef {InnerSalesChartParams &
|
13
|
+
* Omit<import('./base-chart-view.jsx').BaseChartViewParams, 'config'>
|
14
|
+
* } SalesChartParams
|
15
|
+
*
|
16
|
+
*
|
17
|
+
* @param {SalesChartParams} params
|
18
|
+
*
|
19
|
+
*/
|
20
|
+
declare function SalesChart({ data, ...rest }: SalesChartParams): import("react").JSX.Element;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
export default StatCard;
|
2
|
+
export type StatCardParams = {
|
3
|
+
which_table: [table: "search" | "products" | "collections" | "discounts" | "tags" | "shipping_methods" | "posts" | "auth_users" | "customers" | "storefronts" | "images" | "templates" | "notifications" | "orders", query?: import('@storecraft/core/v-api').ApiQuery]["0"];
|
4
|
+
msg: string;
|
5
|
+
link: string;
|
6
|
+
/**
|
7
|
+
* `VQL` search query
|
8
|
+
*/
|
9
|
+
search?: string;
|
10
|
+
Icon?: React.ReactElement;
|
11
|
+
};
|
12
|
+
/**
|
13
|
+
*
|
14
|
+
* @typedef {object} StatCardParams
|
15
|
+
* @prop {Parameters<Statistics["countOf"]>["0"]} which_table
|
16
|
+
* @prop {string} msg
|
17
|
+
* @prop {string} link
|
18
|
+
* @prop {string} [search] `VQL` search query
|
19
|
+
* @prop {React.ReactElement} [Icon]
|
20
|
+
*
|
21
|
+
* @param {StatCardParams} params
|
22
|
+
*
|
23
|
+
*/
|
24
|
+
declare function StatCard({ which_table, msg, link, search, Icon }: StatCardParams): import("react").JSX.Element;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
export default TimeFrame;
|
2
|
+
export type InnerCapsuleParams = {
|
3
|
+
label: string;
|
4
|
+
selected: boolean;
|
5
|
+
};
|
6
|
+
export type CapsuleParams = InnerCapsuleParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
7
|
+
export type TimeFrameParams = {
|
8
|
+
span: number;
|
9
|
+
onChange: (span: number) => void;
|
10
|
+
};
|
11
|
+
/**
|
12
|
+
*
|
13
|
+
* @typedef {object} TimeFrameParams
|
14
|
+
* @prop {number} span
|
15
|
+
* @prop {(span: number) => void} onChange
|
16
|
+
*
|
17
|
+
*
|
18
|
+
* @param {TimeFrameParams} params
|
19
|
+
*
|
20
|
+
*/
|
21
|
+
declare function TimeFrame({ span, onChange }: TimeFrameParams): import("react").JSX.Element;
|