@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,30 @@
|
|
1
|
+
export function Image({ data, onClickImage, className, ...rest }: ImageParams): import("react").JSX.Element;
|
2
|
+
export default ImageGrid;
|
3
|
+
export type InternalImageParams = {
|
4
|
+
data: import('@storecraft/core/v-api').ImageType;
|
5
|
+
onClickImage: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>, data: import('@storecraft/core/v-api').ImageType) => void;
|
6
|
+
className?: string;
|
7
|
+
};
|
8
|
+
export type ImageParams = InternalImageParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
9
|
+
export type InternalImageGridParams = {
|
10
|
+
images: import('@storecraft/core/v-api').ImageType[];
|
11
|
+
onClickImage: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>, data: import('@storecraft/core/v-api').ImageType) => void;
|
12
|
+
className?: string;
|
13
|
+
};
|
14
|
+
export type ImageGridParams = InternalImageGridParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
15
|
+
/**
|
16
|
+
* @typedef {object} InternalImageGridParams
|
17
|
+
* @prop {import('@storecraft/core/v-api').ImageType[]} images
|
18
|
+
* @prop {(
|
19
|
+
* e: React.MouseEvent<HTMLAnchorElement, MouseEvent>,
|
20
|
+
* data: import('@storecraft/core/v-api').ImageType
|
21
|
+
* ) => void} onClickImage
|
22
|
+
* @prop {string} [className]
|
23
|
+
*
|
24
|
+
* @typedef {InternalImageGridParams &
|
25
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
26
|
+
* } ImageGridParams
|
27
|
+
*
|
28
|
+
* @param {ImageGridParams} params
|
29
|
+
*/
|
30
|
+
declare function ImageGrid({ images, onClickImage, className, ...rest }: ImageGridParams): import("react").JSX.Element;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export default SearchBar;
|
2
|
+
export type InnerSearchBarParams = {
|
3
|
+
count: number;
|
4
|
+
searchTitle: string;
|
5
|
+
isLoading: boolean;
|
6
|
+
reload: () => void;
|
7
|
+
};
|
8
|
+
export type ImpInterface = {
|
9
|
+
getSearch: () => string;
|
10
|
+
setSearch: (value: string) => void;
|
11
|
+
};
|
12
|
+
/**
|
13
|
+
* @typedef {object} ImpInterface
|
14
|
+
* @prop {() => string} getSearch
|
15
|
+
* @prop {(value: string) => void} setSearch
|
16
|
+
*/
|
17
|
+
declare const SearchBar: import('react').ForwardRefExoticComponent<Omit<InnerSearchBarParams & import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<any>>;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export default GallerySelect;
|
2
|
+
export type ImpInterface = any;
|
3
|
+
export type GallerySelectParams = {
|
4
|
+
query_params?: import('@storecraft/core/v-api').ApiQuery;
|
5
|
+
onSelect: (img: import('@storecraft/core/v-api').ImageType) => void;
|
6
|
+
};
|
7
|
+
declare const GallerySelect: import('react').ForwardRefExoticComponent<GallerySelectParams & import('react').RefAttributes<any>>;
|
@@ -0,0 +1,56 @@
|
|
1
|
+
export default Gallery;
|
2
|
+
/**
|
3
|
+
* A `gallery` component. if contstrained on height, then image-grid
|
4
|
+
* will be scrollable
|
5
|
+
*
|
6
|
+
* Two modes of retrieving search:
|
7
|
+
* 1. onSearchUpdate=undefined will cause the comp to internally
|
8
|
+
* fetch data when user searches data
|
9
|
+
* 2. onSearchUpdate!=undefined will cause the comp to delegate
|
10
|
+
* the search params outside, where you can redirect again,
|
11
|
+
* this is useful for re-routing of all kinds
|
12
|
+
*/
|
13
|
+
export type InnerGalleryParams = {
|
14
|
+
/**
|
15
|
+
* { vql: '', limit: 5}
|
16
|
+
*/
|
17
|
+
query_params?: import('@storecraft/core/v-api').ApiQuery;
|
18
|
+
onClickImage?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>, data: import('@storecraft/core/v-api').ImageType) => void;
|
19
|
+
/**
|
20
|
+
* Use url navigation
|
21
|
+
* to paginate through search params, as opposed to in-memory. This
|
22
|
+
* is suited for pages, the later for individual components.
|
23
|
+
*/
|
24
|
+
useSearchParamsForQuery?: boolean;
|
25
|
+
};
|
26
|
+
/**
|
27
|
+
* A `gallery` component. if contstrained on height, then image-grid
|
28
|
+
* will be scrollable
|
29
|
+
*
|
30
|
+
* Two modes of retrieving search:
|
31
|
+
* 1. onSearchUpdate=undefined will cause the comp to internally
|
32
|
+
* fetch data when user searches data
|
33
|
+
* 2. onSearchUpdate!=undefined will cause the comp to delegate
|
34
|
+
* the search params outside, where you can redirect again,
|
35
|
+
* this is useful for re-routing of all kinds
|
36
|
+
*
|
37
|
+
*
|
38
|
+
* @typedef {object} InnerGalleryParams
|
39
|
+
* @prop {import('@storecraft/core/v-api').ApiQuery
|
40
|
+
* } [query_params={}] { vql: '', limit: 5}
|
41
|
+
* @prop {(
|
42
|
+
* e: React.MouseEvent<HTMLAnchorElement, MouseEvent>,
|
43
|
+
* data: import('@storecraft/core/v-api').ImageType
|
44
|
+
* ) => void} [onClickImage]
|
45
|
+
* @prop {boolean} [useSearchParamsForQuery=true] Use url navigation
|
46
|
+
* to paginate through search params, as opposed to in-memory. This
|
47
|
+
* is suited for pages, the later for individual components.
|
48
|
+
*
|
49
|
+
*
|
50
|
+
* @param {InnerGalleryParams &
|
51
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
52
|
+
* } params
|
53
|
+
*
|
54
|
+
*
|
55
|
+
*/
|
56
|
+
declare function Gallery({ query_params, onClickImage, useSearchParamsForQuery, className, ...rest }: InnerGalleryParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export default Header;
|
2
|
+
export type InnerHeaderParams = {
|
3
|
+
label: string;
|
4
|
+
Icon: React.FC<{
|
5
|
+
className: string;
|
6
|
+
}>;
|
7
|
+
};
|
8
|
+
/**
|
9
|
+
* @typedef {object} InnerHeaderParams
|
10
|
+
* @prop {string} label
|
11
|
+
* @prop {React.FC<{ className: string }>} Icon
|
12
|
+
*
|
13
|
+
* @param {InnerHeaderParams &
|
14
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>
|
15
|
+
* } params
|
16
|
+
*
|
17
|
+
*/
|
18
|
+
declare function Header({ label, Icon, className, ...rest }: InnerHeaderParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>): import("react").JSX.Element;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export default ImagePage;
|
2
|
+
export type InnerLabelCapsuleParams = {
|
3
|
+
value: string;
|
4
|
+
label?: string | ((value: string) => string);
|
5
|
+
bgColor?: string | ((value: string) => string);
|
6
|
+
};
|
7
|
+
export type InnerTagsParams = {
|
8
|
+
search: string[];
|
9
|
+
};
|
10
|
+
export type InnerUsageParams = {
|
11
|
+
usage: string[];
|
12
|
+
};
|
13
|
+
/**
|
14
|
+
*
|
15
|
+
*/
|
16
|
+
declare function ImagePage({}: {}): import("react").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
export default ActionBar;
|
3
|
+
export type InternalActionBarParams = {
|
4
|
+
menuOpen?: boolean;
|
5
|
+
className?: string;
|
6
|
+
onMenuClick?: React.MouseEventHandler;
|
7
|
+
};
|
8
|
+
export type ActionBarParams = InternalActionBarParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
9
|
+
/**
|
10
|
+
*
|
11
|
+
* @typedef {object} InternalActionBarParams
|
12
|
+
* @prop {boolean} [menuOpen]
|
13
|
+
* @prop {string} [className]
|
14
|
+
* @prop {React.MouseEventHandler} [onMenuClick]
|
15
|
+
*
|
16
|
+
*
|
17
|
+
* @typedef {InternalActionBarParams &
|
18
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>
|
19
|
+
* } ActionBarParams
|
20
|
+
*
|
21
|
+
*
|
22
|
+
* @param {ActionBarParams} params
|
23
|
+
*
|
24
|
+
*/
|
25
|
+
declare function ActionBar({ menuOpen, className, onMenuClick, ...rest }: ActionBarParams): React.JSX.Element;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export default Attributes;
|
2
|
+
export type InnerAttrParams = {
|
3
|
+
attribute: import('@storecraft/core/v-api').AttributeType;
|
4
|
+
onChange: (attribute: import('@storecraft/core/v-api').AttributeType) => void;
|
5
|
+
onDelete: () => void;
|
6
|
+
};
|
7
|
+
export type AttributesParams = import('./fields-view.jsx').FieldLeafViewParams<import('@storecraft/core/v-api').AttributeType[]> & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
8
|
+
/**
|
9
|
+
* @typedef {import('./fields-view.jsx').FieldLeafViewParams<
|
10
|
+
* import('@storecraft/core/v-api').AttributeType[]> &
|
11
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
12
|
+
* } AttributesParams
|
13
|
+
*
|
14
|
+
* @param {AttributesParams} params
|
15
|
+
*/
|
16
|
+
declare function Attributes({ field, value, onChange, ...rest }: AttributesParams): import("react").JSX.Element;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
export default BaseChartView;
|
2
|
+
export type InnerBaseChartViewParams = {
|
3
|
+
config: import('chart.js').ChartConfiguration;
|
4
|
+
};
|
5
|
+
export type BaseChartViewParams = InnerBaseChartViewParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
6
|
+
/**
|
7
|
+
*
|
8
|
+
* @typedef {object} InnerBaseChartViewParams
|
9
|
+
* @prop {import('chart.js').ChartConfiguration<>} config
|
10
|
+
*
|
11
|
+
*
|
12
|
+
* @typedef {InnerBaseChartViewParams &
|
13
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
14
|
+
* } BaseChartViewParams
|
15
|
+
*
|
16
|
+
*
|
17
|
+
* @param {BaseChartViewParams} params
|
18
|
+
*
|
19
|
+
*/
|
20
|
+
declare function BaseChartView({ config, ...rest }: BaseChartViewParams): import("react").JSX.Element;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export function LabelCapsule({ value, className, label, bgColor, ...rest }: CapsuleParams): import("react").JSX.Element;
|
2
|
+
export type InternalCapsuleParams = {
|
3
|
+
className?: string;
|
4
|
+
bgColor?: string | ((v: string) => string);
|
5
|
+
value: string;
|
6
|
+
label?: string | ((v: string) => string);
|
7
|
+
};
|
8
|
+
export type CapsuleParams = InternalCapsuleParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
export default CapsulesView;
|
2
|
+
export type CapsulesViewParams<T = any> = {
|
3
|
+
tags: T[];
|
4
|
+
name_fn?: (x: T) => string;
|
5
|
+
clsCapsule?: string;
|
6
|
+
className?: string;
|
7
|
+
onRemove?: (v: T) => void;
|
8
|
+
onClick: (v: T) => void;
|
9
|
+
};
|
10
|
+
/**
|
11
|
+
* @template [T=any]
|
12
|
+
*
|
13
|
+
* @typedef {object} CapsulesViewParams
|
14
|
+
* @property {T[]} tags
|
15
|
+
* @property {(x: T) => string} [name_fn]
|
16
|
+
* @property {string} [clsCapsule]
|
17
|
+
* @property {string} [className]
|
18
|
+
* @property {(v: T) => void} [onRemove]
|
19
|
+
* @property {(v: T) => void} onClick
|
20
|
+
*
|
21
|
+
*/
|
22
|
+
/**
|
23
|
+
* @template [T=any]
|
24
|
+
*
|
25
|
+
* @param {CapsulesViewParams<T>} params
|
26
|
+
*/
|
27
|
+
declare function CapsulesView<T = any>({ tags, name_fn, className, clsCapsule, onRemove, onClick }: CapsulesViewParams<T>): import("react").JSX.Element;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
*
|
3
|
+
* @param {React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
4
|
+
* } params
|
5
|
+
*/
|
6
|
+
export default function ClientOnly({ ...rest }: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
7
|
+
/**
|
8
|
+
*
|
9
|
+
* @param {React.FC} Component
|
10
|
+
*/
|
11
|
+
export function withClient(Component: React.FC): (props: any) => import("react").JSX.Element;
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/**
|
2
|
+
* @typedef {object} ImperativeInterface
|
3
|
+
* @prop {() => string} getSearch
|
4
|
+
* @prop {(value: string) => void} setSearch
|
5
|
+
*
|
6
|
+
*
|
7
|
+
* @typedef {object} TopActionsParams
|
8
|
+
* @prop {() => void} reload
|
9
|
+
* @prop {string} searchTitle
|
10
|
+
* @prop {boolean} isLoading
|
11
|
+
* @prop {string} [createLink]
|
12
|
+
* @prop {string} [className]
|
13
|
+
* @prop {boolean} [isCollectionEmpty=false]
|
14
|
+
*/
|
15
|
+
export const TopActions: import('react').ForwardRefExoticComponent<TopActionsParams & import('react').RefAttributes<any>>;
|
16
|
+
export function BottomActions({ next, prev, limit, onLimitChange, className }: BottomActionsParams): import("react").JSX.Element;
|
17
|
+
export type ImperativeInterface = {
|
18
|
+
getSearch: () => string;
|
19
|
+
setSearch: (value: string) => void;
|
20
|
+
};
|
21
|
+
export type TopActionsParams = {
|
22
|
+
reload: () => void;
|
23
|
+
searchTitle: string;
|
24
|
+
isLoading: boolean;
|
25
|
+
createLink?: string;
|
26
|
+
className?: string;
|
27
|
+
isCollectionEmpty?: boolean;
|
28
|
+
};
|
29
|
+
export type BottomActionsParams = {
|
30
|
+
next: () => Promise<any>;
|
31
|
+
prev: () => Promise<any>;
|
32
|
+
limit?: number;
|
33
|
+
onLimitChange: (v: number) => void;
|
34
|
+
className?: string;
|
35
|
+
};
|
@@ -0,0 +1,32 @@
|
|
1
|
+
export default CollectionProducts;
|
2
|
+
export type ImpInterface = {
|
3
|
+
refresh: () => Promise<void>;
|
4
|
+
};
|
5
|
+
export type CollectionBaseParams = {
|
6
|
+
/**
|
7
|
+
* `handle` or `id`
|
8
|
+
*/
|
9
|
+
collection_handle_or_id: string;
|
10
|
+
/**
|
11
|
+
* `limit` of query
|
12
|
+
*/
|
13
|
+
limit: number;
|
14
|
+
/**
|
15
|
+
* when loaded reports query count
|
16
|
+
*/
|
17
|
+
onLoaded: (count: number) => void;
|
18
|
+
/**
|
19
|
+
* context
|
20
|
+
*/
|
21
|
+
context: import('./fields-view.jsx').FieldContextData<import('@storecraft/core/v-api').CollectionType> & import('../pages/collection.jsx').Context;
|
22
|
+
};
|
23
|
+
/**
|
24
|
+
* `CollectionProducts` wraps and show the `products` of a given
|
25
|
+
* collection with pagination.
|
26
|
+
*
|
27
|
+
* @param {import('./fields-view.jsx').FieldLeafViewParams<
|
28
|
+
* import('@storecraft/core/v-api').CollectionType,
|
29
|
+
* import('../pages/collection.jsx').Context>
|
30
|
+
* } param
|
31
|
+
*/
|
32
|
+
declare function CollectionProducts({ value, context }: import('./fields-view.jsx').FieldLeafViewParams<import('@storecraft/core/v-api').CollectionType, import('../pages/collection.jsx').Context>): import("react").JSX.Element;
|
@@ -0,0 +1,77 @@
|
|
1
|
+
export function Button({ text, icon, className, classNameSpan, children, rightView, ...rest }: ButtonParams): import("react").JSX.Element;
|
2
|
+
export function Button2({ text, icon, className, classNameSpan, children, ...rest }: Button2params): import("react").JSX.Element;
|
3
|
+
export function LoadingButton({ Icon, show, text, keep_text_on_load, className, classNameLoading, classNameLeft, loading, ...rest }: LoadingButtonParams): import("react").JSX.Element;
|
4
|
+
/**
|
5
|
+
* A loading button which expects a promise for onClick
|
6
|
+
*/
|
7
|
+
export type PromisableLoadingButton = InternalPromisableLoadingButton & Omit<LoadingButtonParams, 'onClick'>;
|
8
|
+
export function PromisableLoadingButton({ onClick, loading: $loading, ...rest }: PromisableLoadingButton): import("react").JSX.Element;
|
9
|
+
export type PromisableLoadingBlingButton = InternalPromisableLoadingBlingButton & Omit<LoadingButtonParams, 'onClick'>;
|
10
|
+
export function PromisableLoadingBlingButton({ onClick, show, className, loading: $loading, stroke, rounded, from, to, ...rest }: PromisableLoadingBlingButton): import("react").JSX.Element;
|
11
|
+
export function BlingButton({ from, to, rounded, stroke, children, text, className, btnClassName, ...rest }: import('./common-ui.jsx').InternalBlingParams & {
|
12
|
+
btnClassName?: string;
|
13
|
+
text?: string;
|
14
|
+
} & React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>): import("react").JSX.Element;
|
15
|
+
export function BlingButton2({ from, to, rounded, stroke, ...rest }: Button2params & import('./common-ui.jsx').InternalBlingParams): import("react").JSX.Element;
|
16
|
+
export function GradientFillIcon({ Icon, from, to, ...rest }: GradientFillIconParams): import("react").JSX.Element;
|
17
|
+
export function GradientStrokeIcon({ Icon, from, to, ...rest }: GradientStrokeIconParams): import("react").JSX.Element;
|
18
|
+
export type InternalButtonparams = {
|
19
|
+
text?: string;
|
20
|
+
icon?: React.ReactElement;
|
21
|
+
className?: string;
|
22
|
+
classNameSpan?: string;
|
23
|
+
children?: any;
|
24
|
+
rightView?: any;
|
25
|
+
};
|
26
|
+
export type ButtonParams = InternalButtonparams & React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
27
|
+
export type InternalButton2params = {
|
28
|
+
text?: string;
|
29
|
+
icon?: React.ReactElement;
|
30
|
+
className?: string;
|
31
|
+
classNameSpan?: string;
|
32
|
+
children: any;
|
33
|
+
};
|
34
|
+
export type Button2params = InternalButton2params & React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
35
|
+
export type InternalLoadingButtonParams = {
|
36
|
+
Icon?: React.ReactNode;
|
37
|
+
text?: string;
|
38
|
+
keep_text_on_load?: boolean;
|
39
|
+
className?: string;
|
40
|
+
classNameLoading?: string;
|
41
|
+
classNameLeft?: string;
|
42
|
+
loading?: boolean;
|
43
|
+
show?: boolean;
|
44
|
+
};
|
45
|
+
export type LoadingButtonParams = InternalLoadingButtonParams & React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
46
|
+
/**
|
47
|
+
* A loading button which expects a promise for onClick
|
48
|
+
*/
|
49
|
+
export type InternalPromisableLoadingButton = {
|
50
|
+
onClick: () => Promise<any>;
|
51
|
+
loading?: boolean;
|
52
|
+
};
|
53
|
+
export type InternalPromisableLoadingBlingButton = {
|
54
|
+
onClick: () => Promise<any>;
|
55
|
+
show?: boolean;
|
56
|
+
loading?: boolean;
|
57
|
+
stroke?: string;
|
58
|
+
rounded?: string;
|
59
|
+
from?: string;
|
60
|
+
to?: string;
|
61
|
+
};
|
62
|
+
export type InternalGradientFillIconParams = {
|
63
|
+
from?: string;
|
64
|
+
to?: string;
|
65
|
+
Icon?: React.FC;
|
66
|
+
};
|
67
|
+
export type GradientFillIconParams = InternalGradientFillIconParams & {
|
68
|
+
[x: string]: any;
|
69
|
+
};
|
70
|
+
export type InternalGradientStrokeIconParams = {
|
71
|
+
from?: string;
|
72
|
+
to?: string;
|
73
|
+
Icon?: React.FC;
|
74
|
+
};
|
75
|
+
export type GradientStrokeIconParams = InternalGradientFillIconParams & {
|
76
|
+
[x: string]: any;
|
77
|
+
};
|
@@ -0,0 +1,61 @@
|
|
1
|
+
export function create_select_view(options: {
|
2
|
+
id: string | number;
|
3
|
+
name: string;
|
4
|
+
}[], defaultIndex?: number): ({ field, value, onChange }: import('./fields-view.jsx').FieldLeafViewParams<{
|
5
|
+
id: string;
|
6
|
+
}>) => import("react").JSX.Element;
|
7
|
+
export function TextArea({ field, value, onChange, ...rest }: import('./fields-view.jsx').FieldLeafViewParams<string>): import("react").JSX.Element;
|
8
|
+
export function Span<T>({ value, children, className, extra, ...rest }: SpanParams<T>): import("react").JSX.Element;
|
9
|
+
export function SpanArray({ field, value, className, name_fn, classNameDelimiter, delimiter, ...rest }: SpanArrayParams): import("react").JSX.Element;
|
10
|
+
export function TimeStampView({ field, value, ...rest }: import('./table-schema-view.jsx').TableSchemaViewComponentParams<string>): import("react").JSX.Element;
|
11
|
+
export function MInput({ field, value, onChange, type, ...rest }: MInputParams): import("react").JSX.Element;
|
12
|
+
export function InputWithClipboard({ value, field, onChange, setError, ...rest }: InputWithClipboardParams): import("react").JSX.Element;
|
13
|
+
export function Handle({ value, field, onChange, context, setError, ...rest }: HandleParams): import("react").JSX.Element;
|
14
|
+
export function Switch({ field, value, onChange, ...rest }: SwitchParams): import("react").JSX.Element;
|
15
|
+
export function ClipBoardCopy({ value, config, process_before_copy }: ClipBoardCopyButtonParams): import("react").JSX.Element;
|
16
|
+
export function withCard(Comp: React.FC, comp_params_inner?: any, border?: boolean, copy?: boolean): ({ field, value, disabled, onChange, children, error, setError, context, ...rest }: import('./fields-view.jsx').FieldLeafViewParams<any> & {
|
17
|
+
children: React.ReactNode;
|
18
|
+
}) => import("react").JSX.Element;
|
19
|
+
export function RecordActions<T>({ context, field, value, ...rest }: import('./table-schema-view.jsx').TableSchemaViewComponentParams<any, T>): import("react").JSX.Element;
|
20
|
+
/**
|
21
|
+
* This is used in `TableSchemaView`
|
22
|
+
*/
|
23
|
+
export type InternalSpanParams = {
|
24
|
+
className?: string;
|
25
|
+
extra?: string;
|
26
|
+
children?: React.ReactNode;
|
27
|
+
};
|
28
|
+
export type SpanParams<T> = import('./table-schema-view.jsx').TableSchemaViewComponentParams<string, T> & InternalSpanParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>;
|
29
|
+
/**
|
30
|
+
* This is used in `TableSchemaView`
|
31
|
+
*/
|
32
|
+
export type InternalSpanArrayParams = {
|
33
|
+
className?: string;
|
34
|
+
classNameDelimiter?: string;
|
35
|
+
delimiter?: string;
|
36
|
+
name_fn?: (value: any) => string;
|
37
|
+
};
|
38
|
+
/**
|
39
|
+
* This is used in `TableSchemaView`
|
40
|
+
*/
|
41
|
+
export type SpanArrayParams = import('./table-schema-view.jsx').TableSchemaViewComponentParams<any[]> & InternalSpanArrayParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>;
|
42
|
+
export type InternalMInputParams = import('./fields-view.jsx').FieldLeafViewParams<string>;
|
43
|
+
export type MInputParams = InternalMInputParams & import('./common-ui.jsx').InputParams;
|
44
|
+
export type InternalInputWithClipboardParams = import('./fields-view.jsx').FieldLeafViewParams<string>;
|
45
|
+
export type InputWithClipboardParams = InternalInputWithClipboardParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
46
|
+
export type InternalHandleParams = import('./fields-view.jsx').FieldLeafViewParams<string>;
|
47
|
+
export type HandleParams = InternalHandleParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
48
|
+
export type InternalSwitchParams = import('./fields-view.jsx').FieldLeafViewParams<boolean>;
|
49
|
+
export type SwitchParams = InternalSwitchParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
50
|
+
/**
|
51
|
+
* A `copy` to clipboard button
|
52
|
+
*/
|
53
|
+
export type ClipBoardCopyButtonParams = {
|
54
|
+
value: string;
|
55
|
+
config?: 0 | 1;
|
56
|
+
/**
|
57
|
+
* process the value
|
58
|
+
* before copying
|
59
|
+
*/
|
60
|
+
process_before_copy?: (value: string) => string;
|
61
|
+
};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export function SimpleLink({ context, value, children, className, extra, url_fn, get_state, ...rest }: SpanParams): import("react").JSX.Element;
|
2
|
+
/**
|
3
|
+
* This is used in `TableSchemaView`
|
4
|
+
*/
|
5
|
+
export type InternalSpanParams<T extends unknown> = {
|
6
|
+
className?: string;
|
7
|
+
extra?: string;
|
8
|
+
/**
|
9
|
+
* create a `url`
|
10
|
+
*/
|
11
|
+
url_fn: (item: T) => string;
|
12
|
+
/**
|
13
|
+
* get current navigatio `state`
|
14
|
+
*/
|
15
|
+
get_state: () => any;
|
16
|
+
children?: React.ReactNode;
|
17
|
+
};
|
18
|
+
export type SpanParams<T extends unknown = any> = import('./table-schema-view.jsx').TableSchemaViewComponentParams<string, T> & InternalSpanParams<T> & React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>;
|
@@ -0,0 +1,101 @@
|
|
1
|
+
/**
|
2
|
+
* @typedef {object} InternalCreateDateParams
|
3
|
+
* @prop {string} time
|
4
|
+
* @prop {boolean} [changes_made=false]
|
5
|
+
* @prop {string} [rightText] override
|
6
|
+
* @prop {string} className
|
7
|
+
*
|
8
|
+
* @typedef {InternalCreateDateParams &
|
9
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
10
|
+
* } CreateDateParams
|
11
|
+
*
|
12
|
+
* @typedef {object} CreateDateImperativeInterface
|
13
|
+
* @prop {() => boolean} get
|
14
|
+
* @prop {(value?: boolean) => void} set
|
15
|
+
*/
|
16
|
+
export const CreateDate: import('react').ForwardRefExoticComponent<Omit<CreateDateParams, "ref"> & import('react').RefAttributes<any>>;
|
17
|
+
export function CreateDate2({ time, className, ...rest }: {
|
18
|
+
time: number;
|
19
|
+
className: string;
|
20
|
+
}): import("react").JSX.Element;
|
21
|
+
export function HR({ dashed, ...rest }: React.InputHTMLAttributes<HTMLInputElement> & {
|
22
|
+
dashed?: boolean;
|
23
|
+
}): import("react").JSX.Element;
|
24
|
+
export function Title({ className, ...rest }: React.InputHTMLAttributes<HTMLInputElement> & {
|
25
|
+
className?: string;
|
26
|
+
}): import("react").JSX.Element;
|
27
|
+
export function Label({ ...rest }: {
|
28
|
+
[x: string]: any;
|
29
|
+
}): import("react").JSX.Element;
|
30
|
+
export const Input: import('react').ForwardRefExoticComponent<Omit<InputParams, "ref"> & import('react').RefAttributes<any>>;
|
31
|
+
export const BlingInput: import('react').ForwardRefExoticComponent<Omit<BlingInputParams, "ref"> & import('react').RefAttributes<any>>;
|
32
|
+
export function border_bling_style(color_stops?: string[]): {
|
33
|
+
style: {
|
34
|
+
'background-image': string;
|
35
|
+
'background-clip': string;
|
36
|
+
'border-color': string;
|
37
|
+
'background-origin': string;
|
38
|
+
};
|
39
|
+
};
|
40
|
+
export function Bling({ className, rounded, children, stroke, from, to, ...rest }: BlingParams): import("react").JSX.Element;
|
41
|
+
export function withBling(Comp: any, params?: {}): ({ ...rest }: {
|
42
|
+
[x: string]: any;
|
43
|
+
}) => import("react").JSX.Element;
|
44
|
+
export function withBling2(Comp: any): ({ ...rest }: {
|
45
|
+
[x: string]: any;
|
46
|
+
}) => import("react").JSX.Element;
|
47
|
+
export function Div({ setError, ...rest }: {
|
48
|
+
[x: string]: any;
|
49
|
+
setError: any;
|
50
|
+
}): import("react").JSX.Element;
|
51
|
+
export function Card({ name, setError, error, children, border, desc, rightView, cardClass, ...rest }: CardParams): import("react").JSX.Element;
|
52
|
+
export type InternalCreateDateParams = {
|
53
|
+
time: string;
|
54
|
+
changes_made?: boolean;
|
55
|
+
/**
|
56
|
+
* override
|
57
|
+
*/
|
58
|
+
rightText?: string;
|
59
|
+
className: string;
|
60
|
+
};
|
61
|
+
export type CreateDateParams = InternalCreateDateParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
62
|
+
export type CreateDateImperativeInterface = {
|
63
|
+
get: () => boolean;
|
64
|
+
set: (value?: boolean) => void;
|
65
|
+
};
|
66
|
+
export type InputInternalParams = {
|
67
|
+
overrideClass?: boolean;
|
68
|
+
className?: string;
|
69
|
+
};
|
70
|
+
export type InputParams = InputInternalParams & React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
71
|
+
export type BlingInputInternalParams = {
|
72
|
+
inputClsName?: string;
|
73
|
+
};
|
74
|
+
export type BlingInputParams = BlingInputInternalParams & InternalBlingParams & InputParams;
|
75
|
+
/**
|
76
|
+
* Background container with gradient
|
77
|
+
*/
|
78
|
+
export type InternalBlingParams = {
|
79
|
+
className?: string;
|
80
|
+
rounded?: string;
|
81
|
+
children?: any;
|
82
|
+
stroke?: string;
|
83
|
+
from?: string;
|
84
|
+
to?: string;
|
85
|
+
};
|
86
|
+
/**
|
87
|
+
* Background container with gradient
|
88
|
+
*/
|
89
|
+
export type BlingParams = InternalBlingParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
90
|
+
export type InternalCardParams = {
|
91
|
+
name?: React.ReactNode;
|
92
|
+
setError?: (e: string) => void;
|
93
|
+
error?: string;
|
94
|
+
children: React.ReactNode;
|
95
|
+
border?: boolean;
|
96
|
+
desc?: string;
|
97
|
+
rightView?: React.ReactElement;
|
98
|
+
cardClass?: string;
|
99
|
+
rest?: any[];
|
100
|
+
};
|
101
|
+
export type CardParams = InternalCardParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export function CopyableView({ value, process_before_copy, ...rest }: CopyableViewParams & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'value'>): import("react").JSX.Element;
|
2
|
+
/**
|
3
|
+
* A view with `markdown` context, that is `copyable`
|
4
|
+
*/
|
5
|
+
export type CopyableViewParams = {
|
6
|
+
/**
|
7
|
+
* markdown text
|
8
|
+
*/
|
9
|
+
value: string;
|
10
|
+
/**
|
11
|
+
* process the value
|
12
|
+
* before copying
|
13
|
+
*/
|
14
|
+
process_before_copy: (value: string) => string;
|
15
|
+
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export default CustomerOrders;
|
2
|
+
/**
|
3
|
+
*
|
4
|
+
* @param {import('./fields-view.jsx').FieldLeafViewParams<
|
5
|
+
* import('@storecraft/core/v-api').CustomerType,
|
6
|
+
* import('../pages/customer.jsx').Context,
|
7
|
+
* import('@storecraft/core/v-api').CustomerType
|
8
|
+
* > &
|
9
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
10
|
+
* } params
|
11
|
+
*
|
12
|
+
*/
|
13
|
+
declare function CustomerOrders({ value, field, context, error, setError, ...rest }: import('./fields-view.jsx').FieldLeafViewParams<import('@storecraft/core/v-api').CustomerType, import('../pages/customer.jsx').Context, import('@storecraft/core/v-api').CustomerType> & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|