@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,111 @@
|
|
1
|
+
export function Switch({ left: $left, onSwitch, children, className, ...rest }: SwitchParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
2
|
+
export default ImageEditor;
|
3
|
+
/**
|
4
|
+
* A simple switch view for image editor
|
5
|
+
*/
|
6
|
+
export type SwitchParams = {
|
7
|
+
left: boolean;
|
8
|
+
onSwitch: (value: boolean) => void;
|
9
|
+
};
|
10
|
+
export type OptionsParams = {
|
11
|
+
header: string;
|
12
|
+
selectedDefault?: number;
|
13
|
+
options?: EditingOptions[keyof EditingOptions][];
|
14
|
+
};
|
15
|
+
export type OptionsImpInterface = {
|
16
|
+
get: () => string;
|
17
|
+
};
|
18
|
+
/**
|
19
|
+
* image editor options
|
20
|
+
*/
|
21
|
+
export type EditingOptions = {
|
22
|
+
format: 'jpeg' | 'png' | 'webp';
|
23
|
+
quality: 0.5 | 0.75 | 0.8 | 0.9 | 1.0;
|
24
|
+
height: 128 | 256 | 384 | 512 | 640 | 768 | 896 | 1024;
|
25
|
+
};
|
26
|
+
/**
|
27
|
+
* params given to top-panel
|
28
|
+
*/
|
29
|
+
export type TransformValues = {
|
30
|
+
scale: number;
|
31
|
+
rotate: number;
|
32
|
+
trans: {
|
33
|
+
x: number;
|
34
|
+
y: number;
|
35
|
+
};
|
36
|
+
mode: 'crop' | 'move';
|
37
|
+
};
|
38
|
+
/**
|
39
|
+
* `TopPanel` view of image editor
|
40
|
+
*/
|
41
|
+
export type InnerTopPanelParams = {
|
42
|
+
/**
|
43
|
+
* current values
|
44
|
+
*/
|
45
|
+
values: TransformValues;
|
46
|
+
/**
|
47
|
+
* notify editing action
|
48
|
+
*/
|
49
|
+
notify: (values: TransformValues) => void;
|
50
|
+
/**
|
51
|
+
* notify close
|
52
|
+
*/
|
53
|
+
onComplete: ImageEditorParams["onComplete"];
|
54
|
+
/**
|
55
|
+
* approve editing
|
56
|
+
*/
|
57
|
+
onEditingApproved: (options: EditingOptions) => void;
|
58
|
+
};
|
59
|
+
/**
|
60
|
+
* `TopPanel` view of image editor
|
61
|
+
*/
|
62
|
+
export type TopPanelParams = InnerTopPanelParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
63
|
+
export type useStateInfer<T> = [T, import('react').Dispatch<import('react').SetStateAction<T>>];
|
64
|
+
/**
|
65
|
+
* `ImageEditor` is a simple and effective image editor, supports:
|
66
|
+
* - Transformations: `translate`, `rotate`, `scale`
|
67
|
+
* - Save as: 'jpeg', 'png', 'webp'
|
68
|
+
* - Height: 128, 256, 384, 512, 640, 768, 896, 1024
|
69
|
+
* - Adjustable Quality for lossy formats
|
70
|
+
*/
|
71
|
+
export type InnerImageEditorParams = {
|
72
|
+
source: string;
|
73
|
+
name: string;
|
74
|
+
onComplete: (blob?: Blob, format?: EditingOptions["format"], name?: string, width?: number, height?: number) => void;
|
75
|
+
};
|
76
|
+
/**
|
77
|
+
* `ImageEditor` is a simple and effective image editor, supports:
|
78
|
+
* - Transformations: `translate`, `rotate`, `scale`
|
79
|
+
* - Save as: 'jpeg', 'png', 'webp'
|
80
|
+
* - Height: 128, 256, 384, 512, 640, 768, 896, 1024
|
81
|
+
* - Adjustable Quality for lossy formats
|
82
|
+
*/
|
83
|
+
export type ImageEditorParams = InnerImageEditorParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
84
|
+
/**
|
85
|
+
* @template T
|
86
|
+
* @typedef {ReturnType<typeof useState<T>>} useStateInfer
|
87
|
+
*/
|
88
|
+
/**
|
89
|
+
* `ImageEditor` is a simple and effective image editor, supports:
|
90
|
+
* - Transformations: `translate`, `rotate`, `scale`
|
91
|
+
* - Save as: 'jpeg', 'png', 'webp'
|
92
|
+
* - Height: 128, 256, 384, 512, 640, 768, 896, 1024
|
93
|
+
* - Adjustable Quality for lossy formats
|
94
|
+
*
|
95
|
+
* @typedef {object} InnerImageEditorParams
|
96
|
+
* @prop {string} source
|
97
|
+
* @prop {string} name
|
98
|
+
* @prop {(
|
99
|
+
* blob?: Blob, format?: EditingOptions["format"],
|
100
|
+
* name?: string, width?: number, height?: number
|
101
|
+
* ) => void
|
102
|
+
* } onComplete
|
103
|
+
*
|
104
|
+
* @typedef {InnerImageEditorParams &
|
105
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
106
|
+
* } ImageEditorParams
|
107
|
+
*
|
108
|
+
* @param {ImageEditorParams} params
|
109
|
+
*
|
110
|
+
*/
|
111
|
+
declare function ImageEditor({ source, name, onComplete, className, ...rest }: ImageEditorParams): import("react").JSX.Element;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export default Img;
|
2
|
+
/**
|
3
|
+
* `Img` wraps the regular `<img/>` tag and analyzes the `src`
|
4
|
+
* url to decide:
|
5
|
+
*
|
6
|
+
* - If to use `storecraft` backend to fetch the image
|
7
|
+
* through a full download or signed urls.
|
8
|
+
* - Fetch a regular `url`
|
9
|
+
*/
|
10
|
+
export type ImgParams = React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
|
11
|
+
declare const Img: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & import('react').RefAttributes<any>>;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export function JsonViewCard({ value, setError, ...rest }: import('./fields-view.jsx').FieldLeafViewParams<object> & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
2
|
+
export default JsonView;
|
3
|
+
export type InnerJsonViewParams = {
|
4
|
+
value: any;
|
5
|
+
};
|
6
|
+
/**
|
7
|
+
* @typedef {object} InnerJsonViewParams
|
8
|
+
* @prop {any} value
|
9
|
+
*
|
10
|
+
* @param {InnerJsonViewParams &
|
11
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
12
|
+
* } params
|
13
|
+
*/
|
14
|
+
declare function JsonView({ value, ...rest }: InnerJsonViewParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
export default LazyCarousel;
|
3
|
+
/**
|
4
|
+
* Lazy ass `carousel`
|
5
|
+
*/
|
6
|
+
export type InnerCarouselParams = {
|
7
|
+
millis?: number;
|
8
|
+
};
|
9
|
+
/**
|
10
|
+
* Lazy ass `carousel`
|
11
|
+
*
|
12
|
+
* @typedef {object} InnerCarouselParams
|
13
|
+
* @prop {number} [millis=3000]
|
14
|
+
*
|
15
|
+
* @param {InnerCarouselParams &
|
16
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
17
|
+
* } params
|
18
|
+
*
|
19
|
+
*/
|
20
|
+
declare function LazyCarousel({ millis, children, ...rest }: InnerCarouselParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): React.JSX.Element;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export default LoginCopyright;
|
2
|
+
/**
|
3
|
+
*
|
4
|
+
* @param {React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
5
|
+
* } props
|
6
|
+
*/
|
7
|
+
declare function LoginCopyright(props: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
@@ -0,0 +1,44 @@
|
|
1
|
+
export default LoginForm;
|
2
|
+
export type LoginFormFieldsType = {
|
3
|
+
email?: string;
|
4
|
+
password?: string;
|
5
|
+
endpoint?: string;
|
6
|
+
};
|
7
|
+
export type InnerFieldParams = {
|
8
|
+
value: object;
|
9
|
+
desc: string;
|
10
|
+
/**
|
11
|
+
* key in value
|
12
|
+
*/
|
13
|
+
id: string;
|
14
|
+
label: string;
|
15
|
+
onChange: (id: string, value: string) => void;
|
16
|
+
};
|
17
|
+
export type InnerLoginFormParams = {
|
18
|
+
onChange: (id: string, value: string) => void;
|
19
|
+
onSubmit: React.FormEventHandler<HTMLFormElement>;
|
20
|
+
error: object;
|
21
|
+
className: string;
|
22
|
+
credentials: LoginFormFieldsType;
|
23
|
+
is_backend_endpoint_editable?: boolean;
|
24
|
+
};
|
25
|
+
/**
|
26
|
+
*
|
27
|
+
* @typedef {object} InnerLoginFormParams
|
28
|
+
* @prop {(id: string, value: string) => void} onChange
|
29
|
+
* @prop {React.FormEventHandler<HTMLFormElement>} onSubmit
|
30
|
+
* @prop {object} error
|
31
|
+
* @prop {string} className
|
32
|
+
* @prop {LoginFormFieldsType} credentials
|
33
|
+
* @prop {boolean} [is_backend_endpoint_editable=true]
|
34
|
+
|
35
|
+
*
|
36
|
+
* @param {InnerLoginFormParams &
|
37
|
+
* Omit<
|
38
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
39
|
+
* 'value' | 'onChange' | 'onSubmit'
|
40
|
+
* >
|
41
|
+
* } params
|
42
|
+
*
|
43
|
+
*/
|
44
|
+
declare function LoginForm({ onChange, onSubmit, error, className, credentials, is_backend_endpoint_editable, ...rest }: InnerLoginFormParams & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'value' | 'onChange' | 'onSubmit'>): import("react").JSX.Element;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export function MarkdownViewCard({ value, title, description, ...rest }: MarkdownViewCardParams & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'value'>): import("react").JSX.Element;
|
2
|
+
/**
|
3
|
+
* A card with `markdown content`
|
4
|
+
*/
|
5
|
+
export type MarkdownViewCardParams = {
|
6
|
+
/**
|
7
|
+
* markdown text
|
8
|
+
*/
|
9
|
+
value: string;
|
10
|
+
/**
|
11
|
+
* card title
|
12
|
+
*/
|
13
|
+
title: string;
|
14
|
+
/**
|
15
|
+
* card description
|
16
|
+
*/
|
17
|
+
description?: string;
|
18
|
+
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
export default MDEditor;
|
2
|
+
export type InternalMDEditorParams = {
|
3
|
+
field?: import('./fields-view.jsx').FieldData;
|
4
|
+
value?: string;
|
5
|
+
onChange?: (value: string) => void;
|
6
|
+
};
|
7
|
+
export type MDEditorParams = InternalMDEditorParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
8
|
+
/**
|
9
|
+
* @typedef {object} InternalMDEditorParams
|
10
|
+
* @prop {import("./fields-view.jsx").FieldData} [field]
|
11
|
+
* @prop {string} [value]
|
12
|
+
* @prop {(value: string) => void} [onChange]
|
13
|
+
*
|
14
|
+
* @typedef {InternalMDEditorParams &
|
15
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
16
|
+
* } MDEditorParams
|
17
|
+
*
|
18
|
+
* @param {MDEditorParams} param
|
19
|
+
*/
|
20
|
+
declare function MDEditor({ field, value, onChange, ...rest }: MDEditorParams): import("react").JSX.Element;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export default MDView;
|
2
|
+
export type InternalMDViewParams = {
|
3
|
+
value?: string;
|
4
|
+
};
|
5
|
+
export type MDViewParams = InternalMDViewParams & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'value'>;
|
6
|
+
/**
|
7
|
+
* @typedef {object} InternalMDViewParams
|
8
|
+
* @prop {string} [value]
|
9
|
+
*
|
10
|
+
* @typedef {InternalMDViewParams &
|
11
|
+
* Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'value'>
|
12
|
+
* } MDViewParams
|
13
|
+
*
|
14
|
+
* @param {MDViewParams} param
|
15
|
+
*/
|
16
|
+
declare function MDView({ value, ...rest }: MDViewParams): import("react").JSX.Element;
|
@@ -0,0 +1,107 @@
|
|
1
|
+
export default Media;
|
2
|
+
/**
|
3
|
+
* `CameraSource` will fetch image from local camera
|
4
|
+
*/
|
5
|
+
export type CameraSourceParams = {
|
6
|
+
onFile: (value: FileList) => void;
|
7
|
+
className: string;
|
8
|
+
};
|
9
|
+
/**
|
10
|
+
* `LocalSource` will fetch image from a local device
|
11
|
+
*/
|
12
|
+
export type LocalSourceParams = {
|
13
|
+
onFile: (value: FileList) => void;
|
14
|
+
className: string;
|
15
|
+
};
|
16
|
+
/**
|
17
|
+
* `GallerySource` will fetch file from the `images` database
|
18
|
+
*/
|
19
|
+
export type GallerySourceParams = {
|
20
|
+
onFinish: (url: string, requires_edit?: boolean) => void;
|
21
|
+
className: string;
|
22
|
+
};
|
23
|
+
export type useStateInfer<T> = [T, import('react').Dispatch<import('react').SetStateAction<T>>];
|
24
|
+
/**
|
25
|
+
* `UrlSource` will fetch image from a simple `url`
|
26
|
+
*/
|
27
|
+
export type UrlSourceParams = {
|
28
|
+
onFinish: (url: string, requires_edit?: boolean) => void;
|
29
|
+
className: string;
|
30
|
+
};
|
31
|
+
/**
|
32
|
+
* `Media` wraps a few media fetching sources together.
|
33
|
+
*/
|
34
|
+
export type InnerMediaParams = {
|
35
|
+
className: string;
|
36
|
+
};
|
37
|
+
/**
|
38
|
+
* `Media` wraps a few media fetching sources together.
|
39
|
+
*/
|
40
|
+
export type Upload = {
|
41
|
+
status: 'working' | 'failed';
|
42
|
+
id: string | number;
|
43
|
+
preview: string;
|
44
|
+
error_code?: string;
|
45
|
+
};
|
46
|
+
/**
|
47
|
+
* `Media` wraps a few media fetching sources together.
|
48
|
+
*/
|
49
|
+
export type MediaParams = InnerMediaParams & import('./fields-view.jsx').FieldLeafViewParams<string[]>;
|
50
|
+
/**
|
51
|
+
* `Images` manages images thumbnails and uploads.
|
52
|
+
*/
|
53
|
+
export type InnerImagesParams = {
|
54
|
+
urls: string[];
|
55
|
+
uploads: Upload[];
|
56
|
+
onImageClick: (ix: number) => void;
|
57
|
+
onImageRemove: (ix: number) => void;
|
58
|
+
onImageOrder: (ix: number, ij: number) => void;
|
59
|
+
};
|
60
|
+
/**
|
61
|
+
* drop `event` type of `react-drag-drop-container` lib
|
62
|
+
*/
|
63
|
+
export type ReactDropEvent = {
|
64
|
+
dragData: any;
|
65
|
+
dropElem: React.ReactNode;
|
66
|
+
dropData: any;
|
67
|
+
};
|
68
|
+
/**
|
69
|
+
* drop `event` type of `react-drag-drop-container` lib
|
70
|
+
*/
|
71
|
+
export type BaseReactDragDropEvent = {
|
72
|
+
dragData: any;
|
73
|
+
dragElem: HTMLDivElement;
|
74
|
+
containerElem: HTMLDivElement;
|
75
|
+
sourceElem: HTMLSpanElement;
|
76
|
+
};
|
77
|
+
/**
|
78
|
+
* `event` type of `react-drag-drop-container` lib
|
79
|
+
*/
|
80
|
+
export type DragLeaveEvent = BaseReactDragDropEvent;
|
81
|
+
/**
|
82
|
+
* `event` type of `react-drag-drop-container` lib
|
83
|
+
*/
|
84
|
+
export type DragEnterEvent = BaseReactDragDropEvent;
|
85
|
+
/**
|
86
|
+
* `Images` manages images thumbnails and uploads.
|
87
|
+
*/
|
88
|
+
export type ImagesParams = InnerImagesParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
89
|
+
/**
|
90
|
+
* `Media` wraps a few media fetching sources together.
|
91
|
+
*
|
92
|
+
* @typedef {object} InnerMediaParams
|
93
|
+
* @prop {string} className
|
94
|
+
*
|
95
|
+
* @typedef {object} Upload
|
96
|
+
* @prop {'working' | 'failed'} status
|
97
|
+
* @prop {string | number} id
|
98
|
+
* @prop {string} preview
|
99
|
+
* @prop {string} [error_code]
|
100
|
+
*
|
101
|
+
* @typedef {InnerMediaParams &
|
102
|
+
* import('./fields-view.jsx').FieldLeafViewParams<string[]>
|
103
|
+
* } MediaParams
|
104
|
+
*
|
105
|
+
* @param {MediaParams} params
|
106
|
+
*/
|
107
|
+
declare function Media({ field, value, onChange, className, ...rest }: MediaParams): import("react").JSX.Element;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export default Modal;
|
2
|
+
/**
|
3
|
+
* Imperative interface
|
4
|
+
*/
|
5
|
+
export type ImpInterface = {
|
6
|
+
show: Function;
|
7
|
+
hide: Function;
|
8
|
+
setDataAndMessage: (data: any, message: string, show?: boolean) => void;
|
9
|
+
};
|
10
|
+
export type InnerModalParams = {
|
11
|
+
title?: React.ReactElement;
|
12
|
+
onApprove: (key: string, value: any) => void;
|
13
|
+
};
|
14
|
+
export type ModalParams = InnerModalParams & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'title'>;
|
15
|
+
declare const Modal: import('react').ForwardRefExoticComponent<Omit<ModalParams, "ref"> & import('react').RefAttributes<any>>;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
export default NotificationButton;
|
3
|
+
export type InternalBubbleParams = {
|
4
|
+
outerClass?: string;
|
5
|
+
innerClass?: string;
|
6
|
+
};
|
7
|
+
export type BubbleParams = InternalBubbleParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
8
|
+
export type InternalNotificationButtonParams = {
|
9
|
+
isOpen?: boolean;
|
10
|
+
innerClass?: string;
|
11
|
+
};
|
12
|
+
export type NotificationButtonParams = InternalNotificationButtonParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
13
|
+
/**
|
14
|
+
*
|
15
|
+
* @typedef {object} InternalNotificationButtonParams
|
16
|
+
* @prop {boolean} [isOpen=false]
|
17
|
+
* @prop {string} [innerClass]
|
18
|
+
*
|
19
|
+
*
|
20
|
+
* @typedef {InternalNotificationButtonParams &
|
21
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
22
|
+
* } NotificationButtonParams
|
23
|
+
*
|
24
|
+
*
|
25
|
+
* @param {NotificationButtonParams} params
|
26
|
+
*
|
27
|
+
*/
|
28
|
+
declare function NotificationButton({ isOpen, onClick, ...rest }: NotificationButtonParams): React.JSX.Element;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
export default Notifications;
|
3
|
+
export type NotificationParams = {
|
4
|
+
notification: import('@storecraft/core/v-api').NotificationType;
|
5
|
+
};
|
6
|
+
export type FilterViewParams = {
|
7
|
+
notis: import('@storecraft/core/v-api').NotificationType[];
|
8
|
+
selected?: string;
|
9
|
+
onChange?: (filter: string) => void;
|
10
|
+
};
|
11
|
+
export type NotificationsViewParams = {
|
12
|
+
notis: import('@storecraft/core/v-api').NotificationType[];
|
13
|
+
onLoadMore: () => Promise<any>;
|
14
|
+
};
|
15
|
+
declare const Notifications: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export default OrderCouponInfo;
|
2
|
+
export type MDEditorParams = import('./fields-view.jsx').FieldLeafViewParams<import('@storecraft/core/v-api').DiscountType[]> & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
3
|
+
/**
|
4
|
+
*
|
5
|
+
* @typedef {import('./fields-view.jsx').FieldLeafViewParams<
|
6
|
+
* import('@storecraft/core/v-api').DiscountType[]> &
|
7
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
8
|
+
* } MDEditorParams
|
9
|
+
*
|
10
|
+
* @param {MDEditorParams} param
|
11
|
+
*/
|
12
|
+
declare function OrderCouponInfo({ field, value, onChange, ...rest }: MDEditorParams): import("react").JSX.Element;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export default OrderDeliveryMethod;
|
2
|
+
export type OrderDeliveryMethodParams = import('./fields-view.jsx').FieldLeafViewParams<import('@storecraft/core/v-api').ShippingMethodType> & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
3
|
+
/**
|
4
|
+
* @typedef {import('./fields-view.jsx').FieldLeafViewParams<
|
5
|
+
* import('@storecraft/core/v-api').ShippingMethodType> &
|
6
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
7
|
+
* } OrderDeliveryMethodParams
|
8
|
+
*
|
9
|
+
* @param {OrderDeliveryMethodParams} param
|
10
|
+
*/
|
11
|
+
declare function OrderDeliveryMethod({ field, value, onChange, ...rest }: OrderDeliveryMethodParams): import("react").JSX.Element;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
export default OrderLineItems;
|
2
|
+
export type Op = 'change-qty' | 'stock-change';
|
3
|
+
export type InternalLineitemsTableParams = {
|
4
|
+
items?: import('@storecraft/core/v-api').LineItem[];
|
5
|
+
context?: import('./fields-view.jsx').FieldContextData & import('../pages/order.jsx').Context;
|
6
|
+
onChangeItem: (ix: number, op: Op, extra: any) => void;
|
7
|
+
onRemoveItem: (ix: number, item: import('@storecraft/core/v-api').LineItem) => void;
|
8
|
+
};
|
9
|
+
export type LineitemsTableParams = InternalLineitemsTableParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
10
|
+
export type OrderLineItemsParams = import('./fields-view.jsx').FieldLeafViewParams<import('@storecraft/core/v-api').LineItem[]> & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
11
|
+
/**
|
12
|
+
* @typedef {import('./fields-view.jsx').FieldLeafViewParams<
|
13
|
+
* import('@storecraft/core/v-api').LineItem[]> &
|
14
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
15
|
+
* } OrderLineItemsParams
|
16
|
+
*
|
17
|
+
* @param {OrderLineItemsParams} param
|
18
|
+
*/
|
19
|
+
declare function OrderLineItems({ field, value, onChange, context, error, setError, ...rest }: OrderLineItemsParams): import("react").JSX.Element;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export default OrderPaymentGateway;
|
2
|
+
/**
|
3
|
+
*
|
4
|
+
* Action button for payment gateway
|
5
|
+
*/
|
6
|
+
export type ActionButtonParams = {
|
7
|
+
action: import('@storecraft/core/v-api').PaymentGatewayAction;
|
8
|
+
onClick: (action: import('@storecraft/core/v-api').PaymentGatewayAction) => Promise<void>;
|
9
|
+
};
|
10
|
+
export type OrderPaymentGatewayParams = import('./fields-view.jsx').FieldLeafViewParams<import('@storecraft/core/v-api').OrderPaymentGatewayData, import('../pages/order.jsx').Context, import('@storecraft/core/v-api').OrderData> & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
11
|
+
/**
|
12
|
+
*
|
13
|
+
* @typedef {import('./fields-view.jsx').FieldLeafViewParams<
|
14
|
+
* import('@storecraft/core/v-api').OrderPaymentGatewayData,
|
15
|
+
* import('../pages/order.jsx').Context,
|
16
|
+
* import('@storecraft/core/v-api').OrderData
|
17
|
+
* > &
|
18
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
19
|
+
* } OrderPaymentGatewayParams
|
20
|
+
*
|
21
|
+
* @param {OrderPaymentGatewayParams} param
|
22
|
+
*/
|
23
|
+
declare function OrderPaymentGateway({ field, value, onChange, setError, context, ...rest }: OrderPaymentGatewayParams): import("react").JSX.Element;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export default OrderPrice;
|
2
|
+
export type EntryParams = {
|
3
|
+
title: string;
|
4
|
+
value: number;
|
5
|
+
};
|
6
|
+
export type OrderPriceParams = import('./fields-view.jsx').FieldLeafViewParams<import('@storecraft/core/v-api').PricingData> & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
7
|
+
/**
|
8
|
+
* @typedef {import('./fields-view.jsx').FieldLeafViewParams<
|
9
|
+
* import('@storecraft/core/v-api').PricingData> &
|
10
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
11
|
+
* } OrderPriceParams
|
12
|
+
*
|
13
|
+
* @param {OrderPriceParams} param
|
14
|
+
*/
|
15
|
+
declare function OrderPrice({ field, context, setError, value, onChange, ...rest }: OrderPriceParams): import("react").JSX.Element;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export function id2ColorFulfill(id: any): "bg-gray-400 dark:bg-gray-400/40" | "bg-red-500 dark:bg-red-500/40" | "bg-green-600 dark:bg-green-600/40" | "bg-black dark:bg-black/40" | "bg-pink-400 dark:bg-pink-400/40";
|
2
|
+
export function id2ColorPayment(id: any): "bg-gray-400 dark:bg-gray-400/40" | "bg-green-600 dark:bg-green-600/40" | "bg-pink-400 dark:bg-pink-400/40" | "bg-green-500 dark:bg-green-500/40" | "bg-kf-400 dark:bg-kf-400/40" | "bg-malibu-500 dark:bg-malibu-500/40" | "bg-red-400 dark:bg-red-400/40" | "bg-cyan-400 dark:bg-cyan-400/40" | "bg-teal-500 dark:bg-teal-500/40" | "bg-teal-400 dark:bg-teal-400/40";
|
3
|
+
export default OrdersQuickSearchActions;
|
4
|
+
/**
|
5
|
+
*
|
6
|
+
* @param {React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
7
|
+
* } param
|
8
|
+
*/
|
9
|
+
declare function OrdersQuickSearchActions({ ...rest }: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
/**
|
3
|
+
* Imperative interface for public `ref` and for `useImperativeHandle`
|
4
|
+
*
|
5
|
+
* @typedef {object} ImpInterface
|
6
|
+
* @property {Function} show
|
7
|
+
* @property {Function} hide
|
8
|
+
* @property {() => boolean} isShown
|
9
|
+
*/
|
10
|
+
export const Overlay: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & React.RefAttributes<any>>;
|
11
|
+
export type OverlayParams = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
12
|
+
/**
|
13
|
+
* Imperative interface for public `ref` and for `useImperativeHandle`
|
14
|
+
*/
|
15
|
+
export type ImpInterface = {
|
16
|
+
show: Function;
|
17
|
+
hide: Function;
|
18
|
+
isShown: () => boolean;
|
19
|
+
};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
export default ProductDiscounts;
|
2
|
+
export type ItemParams = {
|
3
|
+
/**
|
4
|
+
* `discount`
|
5
|
+
*/
|
6
|
+
value: import('@storecraft/core/v-api').DiscountType;
|
7
|
+
/**
|
8
|
+
* callback
|
9
|
+
*/
|
10
|
+
onClick: (value: import('@storecraft/core/v-api').DiscountType) => void;
|
11
|
+
};
|
12
|
+
/**
|
13
|
+
*
|
14
|
+
* @param {import('./fields-view.jsx').FieldLeafViewParams<
|
15
|
+
* import('@storecraft/core/v-api').ProductType["discounts"],
|
16
|
+
* import('../pages/product.jsx').Context
|
17
|
+
* > &
|
18
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
19
|
+
* } params
|
20
|
+
*
|
21
|
+
*/
|
22
|
+
declare function ProductDiscounts({ field, context, value, onChange, ...rest }: import('./fields-view.jsx').FieldLeafViewParams<import('@storecraft/core/v-api').ProductType["discounts"], import('../pages/product.jsx').Context> & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export default RelatedProducts;
|
2
|
+
/**
|
3
|
+
*
|
4
|
+
* @param {import('./fields-view.jsx').FieldLeafViewParams<
|
5
|
+
* import('@storecraft/core/v-api').ProductType[]> &
|
6
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
7
|
+
* } params
|
8
|
+
*
|
9
|
+
*/
|
10
|
+
declare function RelatedProducts({ field, context, value, onChange, ...rest }: import('./fields-view.jsx').FieldLeafViewParams<import('@storecraft/core/v-api').ProductType[]> & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|