@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.
Files changed (167) hide show
  1. package/README.md +54 -0
  2. package/dist/a.html +31 -0
  3. package/dist/lib/index.cjs +802 -0
  4. package/dist/lib/index.js +67697 -0
  5. package/dist/lib/index.umd.cjs +802 -0
  6. package/dist/lib/src/apps/gallery/gallery-image-grid.d.ts +30 -0
  7. package/dist/lib/src/apps/gallery/gallery-page.d.ts +2 -0
  8. package/dist/lib/src/apps/gallery/gallery-searchbar.d.ts +17 -0
  9. package/dist/lib/src/apps/gallery/gallery-select.d.ts +7 -0
  10. package/dist/lib/src/apps/gallery/gallery.d.ts +56 -0
  11. package/dist/lib/src/apps/gallery/image-header.d.ts +18 -0
  12. package/dist/lib/src/apps/gallery/image-page.d.ts +16 -0
  13. package/dist/lib/src/apps/gallery/index.d.ts +1 -0
  14. package/dist/lib/src/apps/gallery/utils.d.ts +2 -0
  15. package/dist/lib/src/apps/index.d.ts +2 -0
  16. package/dist/lib/src/auto-mount.d.ts +1 -0
  17. package/dist/lib/src/comps/action-bar.d.ts +25 -0
  18. package/dist/lib/src/comps/attributes.d.ts +16 -0
  19. package/dist/lib/src/comps/base-chart-view.d.ts +20 -0
  20. package/dist/lib/src/comps/bulk-tag-products-in-collection.d.ts +5 -0
  21. package/dist/lib/src/comps/capsule.d.ts +8 -0
  22. package/dist/lib/src/comps/capsules-view.d.ts +27 -0
  23. package/dist/lib/src/comps/client-only.d.ts +11 -0
  24. package/dist/lib/src/comps/collection-actions.d.ts +35 -0
  25. package/dist/lib/src/comps/collection-products.d.ts +32 -0
  26. package/dist/lib/src/comps/common-button.d.ts +77 -0
  27. package/dist/lib/src/comps/common-fields.d.ts +61 -0
  28. package/dist/lib/src/comps/common-table-fields.d.ts +18 -0
  29. package/dist/lib/src/comps/common-ui.d.ts +101 -0
  30. package/dist/lib/src/comps/copyable-view.d.ts +15 -0
  31. package/dist/lib/src/comps/customer-orders.d.ts +13 -0
  32. package/dist/lib/src/comps/dark-mode.d.ts +5 -0
  33. package/dist/lib/src/comps/discount-details.d.ts +60 -0
  34. package/dist/lib/src/comps/discount-filters.d.ts +153 -0
  35. package/dist/lib/src/comps/discount-performance.d.ts +13 -0
  36. package/dist/lib/src/comps/discounts-quick-search-actions.d.ts +6 -0
  37. package/dist/lib/src/comps/discounts-table-code.d.ts +12 -0
  38. package/dist/lib/src/comps/discounts-table-type.d.ts +9 -0
  39. package/dist/lib/src/comps/document-actions.d.ts +11 -0
  40. package/dist/lib/src/comps/document-details.d.ts +20 -0
  41. package/dist/lib/src/comps/document-title.d.ts +20 -0
  42. package/dist/lib/src/comps/drawer.d.ts +18 -0
  43. package/dist/lib/src/comps/error-message.d.ts +29 -0
  44. package/dist/lib/src/comps/fields-view.d.ts +107 -0
  45. package/dist/lib/src/comps/gradient-text.d.ts +1 -0
  46. package/dist/lib/src/comps/home-header.d.ts +24 -0
  47. package/dist/lib/src/comps/home-invite-action-card.d.ts +17 -0
  48. package/dist/lib/src/comps/home-performace.d.ts +33 -0
  49. package/dist/lib/src/comps/home-sales-chart.d.ts +20 -0
  50. package/dist/lib/src/comps/home-stat-card.d.ts +24 -0
  51. package/dist/lib/src/comps/home-time-frame.d.ts +21 -0
  52. package/dist/lib/src/comps/image-editor.d.ts +111 -0
  53. package/dist/lib/src/comps/img.d.ts +11 -0
  54. package/dist/lib/src/comps/json.d.ts +14 -0
  55. package/dist/lib/src/comps/lazy-carousel.d.ts +20 -0
  56. package/dist/lib/src/comps/login-connect.d.ts +4 -0
  57. package/dist/lib/src/comps/login-content.d.ts +7 -0
  58. package/dist/lib/src/comps/login-copyright.d.ts +7 -0
  59. package/dist/lib/src/comps/login-form.d.ts +44 -0
  60. package/dist/lib/src/comps/login-marquee.d.ts +4 -0
  61. package/dist/lib/src/comps/logo.d.ts +4 -0
  62. package/dist/lib/src/comps/markdown-card.d.ts +18 -0
  63. package/dist/lib/src/comps/md-editor.d.ts +20 -0
  64. package/dist/lib/src/comps/md-view.d.ts +16 -0
  65. package/dist/lib/src/comps/media.d.ts +107 -0
  66. package/dist/lib/src/comps/modal.d.ts +15 -0
  67. package/dist/lib/src/comps/notifications-button.d.ts +28 -0
  68. package/dist/lib/src/comps/notifications.d.ts +15 -0
  69. package/dist/lib/src/comps/order-coupon-info.d.ts +12 -0
  70. package/dist/lib/src/comps/order-delivery-method.d.ts +11 -0
  71. package/dist/lib/src/comps/order-line-items.d.ts +19 -0
  72. package/dist/lib/src/comps/order-payment-gateway.d.ts +23 -0
  73. package/dist/lib/src/comps/order-price.d.ts +15 -0
  74. package/dist/lib/src/comps/orders-quick-search-actions.d.ts +9 -0
  75. package/dist/lib/src/comps/overlay.d.ts +19 -0
  76. package/dist/lib/src/comps/portal-creator.d.ts +6 -0
  77. package/dist/lib/src/comps/product-discounts.d.ts +22 -0
  78. package/dist/lib/src/comps/product-related-products.d.ts +10 -0
  79. package/dist/lib/src/comps/products-variants-test.d.ts +1 -0
  80. package/dist/lib/src/comps/products-variants.d.ts +38 -0
  81. package/dist/lib/src/comps/quick-search-browser.d.ts +32 -0
  82. package/dist/lib/src/comps/resource-browse.d.ts +51 -0
  83. package/dist/lib/src/comps/resource-onboard-svg.d.ts +2 -0
  84. package/dist/lib/src/comps/resource-title.d.ts +7 -0
  85. package/dist/lib/src/comps/resource-view.d.ts +25 -0
  86. package/dist/lib/src/comps/secret-view.d.ts +9 -0
  87. package/dist/lib/src/comps/select-resource.d.ts +88 -0
  88. package/dist/lib/src/comps/settings-api-keys.d.ts +2 -0
  89. package/dist/lib/src/comps/settings-storage.d.ts +15 -0
  90. package/dist/lib/src/comps/show-if.d.ts +25 -0
  91. package/dist/lib/src/comps/side-menu.d.ts +50 -0
  92. package/dist/lib/src/comps/splitter-view.d.ts +1 -0
  93. package/dist/lib/src/comps/storefront-products.d.ts +12 -0
  94. package/dist/lib/src/comps/symbols.d.ts +4 -0
  95. package/dist/lib/src/comps/table-schema-view.d.ts +68 -0
  96. package/dist/lib/src/comps/tag-values.d.ts +9 -0
  97. package/dist/lib/src/comps/tags-edit.d.ts +13 -0
  98. package/dist/lib/src/comps/template-example-input.d.ts +3 -0
  99. package/dist/lib/src/comps/template-template.d.ts +6 -0
  100. package/dist/lib/src/comps/transition.d.ts +51 -0
  101. package/dist/lib/src/hooks/createMediaQueryHook.d.ts +8 -0
  102. package/dist/lib/src/hooks/useCollectionsActions.d.ts +66 -0
  103. package/dist/lib/src/hooks/useDarkMode.d.ts +9 -0
  104. package/dist/lib/src/hooks/useDocumentActions.d.ts +35 -0
  105. package/dist/lib/src/hooks/useInterval.d.ts +13 -0
  106. package/dist/lib/src/hooks/useKeyboardMatch.d.ts +6 -0
  107. package/dist/lib/src/hooks/useMediaQuery.d.ts +3 -0
  108. package/dist/lib/src/hooks/useMounted.d.ts +1 -0
  109. package/dist/lib/src/hooks/useNavigateWithState.d.ts +26 -0
  110. package/dist/lib/src/hooks/useOnClickOutside.d.ts +7 -0
  111. package/dist/lib/src/hooks/usePreferences.d.ts +7 -0
  112. package/dist/lib/src/hooks/useScrollDelta.d.ts +4 -0
  113. package/dist/lib/src/hooks/useToggle.d.ts +7 -0
  114. package/dist/lib/src/hooks/useTrigger.d.ts +5 -0
  115. package/dist/lib/src/hooks/utils.browser.d.ts +7 -0
  116. package/dist/lib/src/index.d.ts +6 -0
  117. package/dist/lib/src/layout.d.ts +18 -0
  118. package/dist/lib/src/login.d.ts +17 -0
  119. package/dist/lib/src/main.d.ts +1 -0
  120. package/dist/lib/src/pages/collection.d.ts +15 -0
  121. package/dist/lib/src/pages/collections.d.ts +2 -0
  122. package/dist/lib/src/pages/customer.d.ts +15 -0
  123. package/dist/lib/src/pages/customers.d.ts +3 -0
  124. package/dist/lib/src/pages/discount.d.ts +15 -0
  125. package/dist/lib/src/pages/discounts.d.ts +2 -0
  126. package/dist/lib/src/pages/extension.d.ts +13 -0
  127. package/dist/lib/src/pages/extensions.d.ts +16 -0
  128. package/dist/lib/src/pages/home.d.ts +2 -0
  129. package/dist/lib/src/pages/index.d.ts +36 -0
  130. package/dist/lib/src/pages/order.d.ts +15 -0
  131. package/dist/lib/src/pages/orders.d.ts +2 -0
  132. package/dist/lib/src/pages/payment-gateway.d.ts +13 -0
  133. package/dist/lib/src/pages/payment-gateways.d.ts +16 -0
  134. package/dist/lib/src/pages/post.d.ts +15 -0
  135. package/dist/lib/src/pages/posts.d.ts +2 -0
  136. package/dist/lib/src/pages/product.d.ts +22 -0
  137. package/dist/lib/src/pages/products.d.ts +2 -0
  138. package/dist/lib/src/pages/settings.d.ts +4 -0
  139. package/dist/lib/src/pages/shipping-method.d.ts +15 -0
  140. package/dist/lib/src/pages/shipping-methods.d.ts +2 -0
  141. package/dist/lib/src/pages/storefront.d.ts +15 -0
  142. package/dist/lib/src/pages/storefronts.d.ts +2 -0
  143. package/dist/lib/src/pages/tag.d.ts +15 -0
  144. package/dist/lib/src/pages/tags.d.ts +2 -0
  145. package/dist/lib/src/pages/template.d.ts +15 -0
  146. package/dist/lib/src/pages/templates.d.ts +2 -0
  147. package/dist/lib/src/routes.d.ts +1 -0
  148. package/dist/lib/src/utils/index.d.ts +7 -0
  149. package/dist/lib/src/utils/time.d.ts +7 -0
  150. package/dist/website/a.html +31 -0
  151. package/dist/website/assets/index-Bcp1qc1F.js +801 -0
  152. package/dist/website/assets/index-C-yHq9o3.js +801 -0
  153. package/dist/website/assets/index-CUTe6Gm_.js +801 -0
  154. package/dist/website/assets/index-N4DVLmRv.js +801 -0
  155. package/dist/website/assets/style-AZ1dEhGu.css +1 -0
  156. package/dist/website/index.html +14 -0
  157. package/dist/website/index.js +67682 -0
  158. package/dist/website/index.umd.cjs +802 -0
  159. package/dist/website/main-old.png +0 -0
  160. package/dist/website/main.png +0 -0
  161. package/dist/website/main2.png +0 -0
  162. package/dist/website/main3.png +0 -0
  163. package/dist/website/main4.png +0 -0
  164. package/dist/website/main5.png +0 -0
  165. package/dist/website/main_half.png +0 -0
  166. package/dist/website/vite.svg +1 -0
  167. 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,4 @@
1
+ export default LoginConnect;
2
+ declare function LoginConnect({ ...rest }: {
3
+ [x: string]: any;
4
+ }): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ export default LoginContent;
2
+ export type ImageItemParams = {
3
+ src: string;
4
+ text: string;
5
+ className?: string;
6
+ };
7
+ declare function LoginContent({}: {}): import("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,4 @@
1
+ export default LoginMarquee;
2
+ declare function LoginMarquee({ ...rest }: {
3
+ [x: string]: any;
4
+ }): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export function Logo({ ...rest }: {
2
+ [x: string]: any;
3
+ }): import("react").JSX.Element;
4
+ export function LogoV2({ className, ...props }: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): 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,6 @@
1
+ export function createPortal(): {
2
+ Portal: import('react').FC<{}>;
3
+ PortalChild: import('react').FC<{
4
+ children?: React.ReactNode;
5
+ }>;
6
+ };
@@ -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 {};