@storecraft/dashboard 1.0.35 → 1.0.36
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/dist/lib/src/index.js +34424 -61880
- package/dist/lib/src/index.umd.cjs +459 -573
- package/dist/lib/src/src/apps/gallery/gallery-image-grid.d.ts +14 -0
- package/dist/lib/src/src/apps/gallery/gallery-page.d.ts +2 -0
- package/dist/lib/src/{apps → src/apps}/gallery/gallery-searchbar.d.ts +8 -7
- package/dist/lib/src/src/apps/gallery/gallery-select.d.ts +9 -0
- package/dist/lib/src/src/apps/gallery/gallery.d.ts +29 -0
- package/dist/lib/src/src/apps/gallery/image-header.d.ts +9 -0
- package/dist/lib/src/src/apps/gallery/image-page.d.ts +16 -0
- package/dist/lib/src/src/apps/gallery/utils.d.ts +2 -0
- package/dist/lib/src/src/apps/index.d.ts +2 -0
- package/dist/lib/src/src/comps/action-bar.d.ts +8 -0
- package/dist/lib/src/src/comps/air-date-picker.d.ts +6 -0
- package/dist/lib/src/src/comps/asset-favicon.d.ts +1 -0
- package/dist/lib/src/src/comps/attributes.d.ts +23 -0
- package/dist/lib/src/src/comps/base-chart-view.d.ts +31 -0
- package/dist/lib/src/src/comps/bulk-tag-products-in-collection.d.ts +9 -0
- package/dist/lib/src/src/comps/capsule.d.ts +8 -0
- package/dist/lib/src/src/comps/capsules-view.d.ts +10 -0
- package/dist/lib/src/src/comps/chart.demo.tsx.d.ts +2 -0
- package/dist/lib/src/src/comps/client-only.d.ts +3 -0
- package/dist/lib/src/src/comps/collection-actions.d.ts +21 -0
- package/dist/lib/src/src/comps/collection-products.d.ts +26 -0
- package/dist/lib/src/src/comps/common-button.d.ts +78 -0
- package/dist/lib/src/src/comps/common-fields.d.ts +83 -0
- package/dist/lib/src/src/comps/common-table-fields.d.ts +18 -0
- package/dist/lib/src/src/comps/common-ui.d.ts +97 -0
- package/dist/lib/src/{comps → src/comps}/copyable-view.d.ts +5 -2
- package/dist/lib/src/src/comps/customer-orders.d.ts +5 -0
- package/dist/lib/src/src/comps/dark-mode.d.ts +2 -0
- package/dist/lib/src/src/comps/discount-details.d.ts +54 -0
- package/dist/lib/src/src/comps/discount-filters.d.ts +60 -0
- package/dist/lib/src/src/comps/discount-performance.d.ts +5 -0
- package/dist/lib/src/src/comps/discounts-quick-search-actions.d.ts +2 -0
- package/dist/lib/src/src/comps/discounts-table-code.d.ts +8 -0
- package/dist/lib/src/src/comps/discounts-table-type.d.ts +6 -0
- package/dist/lib/src/src/comps/document-actions.d.ts +10 -0
- package/dist/lib/src/src/comps/document-details.d.ts +7 -0
- package/dist/lib/src/src/comps/document-title.d.ts +7 -0
- package/dist/lib/src/src/comps/drawer.d.ts +6 -0
- package/dist/lib/src/src/comps/error-message.d.ts +18 -0
- package/dist/lib/src/{comps → src/comps}/fields-view.d.ts +24 -27
- package/dist/lib/src/src/comps/gradient-text.d.ts +1 -0
- package/dist/lib/src/src/comps/home-header.d.ts +10 -0
- package/dist/lib/src/src/comps/home-invite-action-card.d.ts +7 -0
- package/dist/lib/src/src/comps/home-performace.d.ts +19 -0
- package/dist/lib/src/src/comps/home-sales-chart.d.ts +8 -0
- package/dist/lib/src/src/comps/home-stat-card.d.ts +10 -0
- package/dist/lib/src/src/comps/home-time-frame.d.ts +10 -0
- package/dist/lib/src/{comps → src/comps}/image-editor.d.ts +9 -42
- package/dist/lib/src/src/comps/img.d.ts +11 -0
- package/dist/lib/src/src/comps/json.d.ts +8 -0
- package/dist/lib/src/src/comps/lazy-carousel.d.ts +9 -0
- package/dist/lib/src/src/comps/loading-image.d.ts +3 -0
- package/dist/lib/src/src/comps/login-connect.d.ts +3 -0
- package/dist/lib/src/{comps → src/comps}/login-content.d.ts +1 -1
- package/dist/lib/src/src/comps/login-copyright.d.ts +3 -0
- package/dist/lib/src/src/comps/login-form.d.ts +16 -0
- package/dist/lib/src/{comps → src/comps}/login-latest-updates.d.ts +3 -6
- package/dist/lib/src/src/comps/login-marquee.d.ts +3 -0
- package/dist/lib/src/src/comps/logo-text.d.ts +4 -0
- package/dist/lib/src/src/comps/logo.d.ts +8 -0
- package/dist/lib/src/{comps → src/comps}/markdown-card.d.ts +2 -2
- package/dist/lib/src/src/comps/md-editor.d.ts +8 -0
- package/dist/lib/src/src/comps/md-view.d.ts +5 -0
- package/dist/lib/src/{comps → src/comps}/media.d.ts +13 -37
- package/dist/lib/src/{comps → src/comps}/modal.d.ts +4 -5
- package/dist/lib/src/src/comps/notifications-button.d.ts +11 -0
- package/dist/lib/src/{comps → src/comps}/notifications.d.ts +6 -5
- package/dist/lib/src/src/comps/order-coupon-info.d.ts +5 -0
- package/dist/lib/src/src/comps/order-delivery-method.d.ts +5 -0
- package/dist/lib/src/src/comps/order-line-items.d.ts +12 -0
- package/dist/lib/src/src/comps/order-payment-gateway.d.ts +16 -0
- package/dist/lib/src/src/comps/order-price.d.ts +12 -0
- package/dist/lib/src/src/comps/orders-quick-search-actions.d.ts +4 -0
- package/dist/lib/src/src/comps/overlay.d.ts +11 -0
- package/dist/lib/src/src/comps/portal-creator.d.ts +12 -0
- package/dist/lib/src/src/comps/product-discounts.d.ts +15 -0
- package/dist/lib/src/src/comps/product-related-products.d.ts +10 -0
- package/dist/lib/src/src/comps/products-variants.d.ts +26 -0
- package/dist/lib/src/src/comps/quick-search-browser.d.ts +26 -0
- package/dist/lib/src/src/comps/resource-browse.d.ts +30 -0
- package/dist/lib/src/src/comps/resource-onboard-svg.d.ts +2 -0
- package/dist/lib/src/src/comps/resource-title.d.ts +7 -0
- package/dist/lib/src/{comps → src/comps}/resource-view.d.ts +2 -2
- package/dist/lib/src/src/comps/secret-view.d.ts +4 -0
- package/dist/lib/src/src/comps/select-resource.d.ts +80 -0
- package/dist/lib/src/src/comps/settings-api-keys.d.ts +12 -0
- package/dist/lib/src/src/comps/settings-change-password.d.ts +1 -0
- package/dist/lib/src/src/comps/show-if.d.ts +14 -0
- package/dist/lib/src/src/comps/side-menu.d.ts +22 -0
- package/dist/lib/src/src/comps/splitter-view.d.ts +1 -0
- package/dist/lib/src/src/comps/storefront-products.d.ts +11 -0
- package/dist/lib/src/src/comps/symbols.d.ts +4 -0
- package/dist/lib/src/{comps → src/comps}/table-schema-view.d.ts +11 -10
- package/dist/lib/src/src/comps/tag-values.d.ts +5 -0
- package/dist/lib/src/src/comps/tags-edit.d.ts +12 -0
- package/dist/lib/src/src/comps/template-example-input.d.ts +5 -0
- package/dist/lib/src/src/comps/template-template.d.ts +18 -0
- package/dist/lib/src/src/comps/transition.d.ts +32 -0
- package/dist/lib/src/{hooks → src/hooks}/create-media-query-hook.d.ts +3 -3
- package/dist/lib/src/src/hooks/use-collections-actions.d.ts +48 -0
- package/dist/lib/src/src/hooks/use-document-actions.d.ts +64 -0
- package/dist/lib/src/src/hooks/use-interval.d.ts +8 -0
- package/dist/lib/src/src/hooks/use-keyboard-match.d.ts +5 -0
- package/dist/lib/src/src/hooks/use-media-query.d.ts +1 -0
- package/dist/lib/src/src/hooks/use-mounted.d.ts +1 -0
- package/dist/lib/src/src/hooks/use-navigate-with-state.d.ts +18 -0
- package/dist/lib/src/src/hooks/use-on-click-outside.d.ts +5 -0
- package/dist/lib/src/{hooks → src/hooks}/use-preferences.d.ts +4 -4
- package/dist/lib/src/src/hooks/use-scroll-delta.d.ts +13 -0
- package/dist/lib/src/src/hooks/use-toggle.d.ts +5 -0
- package/dist/lib/src/{hooks → src/hooks}/use-trigger.d.ts +2 -2
- package/dist/lib/src/src/hooks/utils.browser.d.ts +11 -0
- package/dist/lib/src/src/index.d.ts +13 -0
- package/dist/lib/src/src/layout.d.ts +9 -0
- package/dist/lib/src/src/login.d.ts +5 -0
- package/dist/lib/src/src/pages/collection.d.ts +17 -0
- package/dist/lib/src/src/pages/collections.d.ts +2 -0
- package/dist/lib/src/src/pages/customer.d.ts +17 -0
- package/dist/lib/src/src/pages/customers.d.ts +4 -0
- package/dist/lib/src/src/pages/discount.d.ts +18 -0
- package/dist/lib/src/src/pages/discounts.d.ts +2 -0
- package/dist/lib/src/src/pages/extension.d.ts +14 -0
- package/dist/lib/src/src/pages/extensions.d.ts +8 -0
- package/dist/lib/src/src/pages/home.d.ts +2 -0
- package/dist/lib/src/src/pages/index.d.ts +33 -0
- package/dist/lib/src/src/pages/order.d.ts +24 -0
- package/dist/lib/src/src/pages/orders.d.ts +2 -0
- package/dist/lib/src/src/pages/payment-gateway.d.ts +14 -0
- package/dist/lib/src/src/pages/payment-gateways.d.ts +8 -0
- package/dist/lib/src/src/pages/post.d.ts +18 -0
- package/dist/lib/src/src/pages/posts.d.ts +2 -0
- package/dist/lib/src/src/pages/product.d.ts +30 -0
- package/dist/lib/src/src/pages/products.d.ts +2 -0
- package/dist/lib/src/src/pages/settings.d.ts +2 -0
- package/dist/lib/src/src/pages/shipping-method.d.ts +18 -0
- package/dist/lib/src/src/pages/shipping-methods.d.ts +2 -0
- package/dist/lib/src/src/pages/storefront.d.ts +18 -0
- package/dist/lib/src/src/pages/storefronts.d.ts +2 -0
- package/dist/lib/src/src/pages/tag.d.ts +17 -0
- package/dist/lib/src/src/pages/tags.d.ts +2 -0
- package/dist/lib/src/src/pages/template.d.ts +13 -0
- package/dist/lib/src/src/pages/templates.d.ts +2 -0
- package/dist/lib/src/src/routes.d.ts +1 -0
- package/dist/lib/src/src/screens.d.ts +10 -0
- package/dist/lib/src/src/utils/index.d.ts +7 -0
- package/dist/lib/src/src/utils/time.d.ts +7 -0
- package/dist/website/assets/index-BjGWqHuK.js +685 -0
- package/dist/website/assets/style-BJD2VYZP.css +1 -0
- package/dist/website/index.html +2 -2
- package/package.json +29 -24
- package/dist/lib/src/apps/gallery/gallery-image-grid.d.ts +0 -30
- package/dist/lib/src/apps/gallery/gallery-page.d.ts +0 -2
- package/dist/lib/src/apps/gallery/gallery-select.d.ts +0 -7
- package/dist/lib/src/apps/gallery/gallery.d.ts +0 -56
- package/dist/lib/src/apps/gallery/image-header.d.ts +0 -18
- package/dist/lib/src/apps/gallery/image-page.d.ts +0 -16
- package/dist/lib/src/apps/gallery/index.d.ts +0 -1
- package/dist/lib/src/apps/gallery/utils.d.ts +0 -2
- package/dist/lib/src/apps/index.d.ts +0 -2
- package/dist/lib/src/comps/action-bar.d.ts +0 -25
- package/dist/lib/src/comps/asset-favicon.d.ts +0 -1
- package/dist/lib/src/comps/attributes.d.ts +0 -16
- package/dist/lib/src/comps/base-chart-view.d.ts +0 -20
- package/dist/lib/src/comps/bulk-tag-products-in-collection.d.ts +0 -5
- package/dist/lib/src/comps/capsule.d.ts +0 -8
- package/dist/lib/src/comps/capsules-view.d.ts +0 -27
- package/dist/lib/src/comps/client-only.d.ts +0 -11
- package/dist/lib/src/comps/collection-actions.d.ts +0 -35
- package/dist/lib/src/comps/collection-products.d.ts +0 -33
- package/dist/lib/src/comps/common-button.d.ts +0 -77
- package/dist/lib/src/comps/common-fields.d.ts +0 -61
- package/dist/lib/src/comps/common-table-fields.d.ts +0 -18
- package/dist/lib/src/comps/common-ui.d.ts +0 -101
- package/dist/lib/src/comps/customer-orders.d.ts +0 -13
- package/dist/lib/src/comps/dark-mode.d.ts +0 -5
- package/dist/lib/src/comps/discount-details.d.ts +0 -60
- package/dist/lib/src/comps/discount-filters.d.ts +0 -83
- package/dist/lib/src/comps/discount-performance.d.ts +0 -13
- package/dist/lib/src/comps/discounts-quick-search-actions.d.ts +0 -6
- package/dist/lib/src/comps/discounts-table-code.d.ts +0 -12
- package/dist/lib/src/comps/discounts-table-type.d.ts +0 -9
- package/dist/lib/src/comps/document-actions.d.ts +0 -11
- package/dist/lib/src/comps/document-details.d.ts +0 -20
- package/dist/lib/src/comps/document-title.d.ts +0 -20
- package/dist/lib/src/comps/drawer.d.ts +0 -18
- package/dist/lib/src/comps/error-message.d.ts +0 -29
- package/dist/lib/src/comps/gradient-text.d.ts +0 -1
- package/dist/lib/src/comps/home-header.d.ts +0 -24
- package/dist/lib/src/comps/home-invite-action-card.d.ts +0 -17
- package/dist/lib/src/comps/home-performace.d.ts +0 -33
- package/dist/lib/src/comps/home-sales-chart.d.ts +0 -20
- package/dist/lib/src/comps/home-stat-card.d.ts +0 -25
- package/dist/lib/src/comps/home-time-frame.d.ts +0 -21
- package/dist/lib/src/comps/img.d.ts +0 -11
- package/dist/lib/src/comps/json.d.ts +0 -14
- package/dist/lib/src/comps/lazy-carousel.d.ts +0 -20
- package/dist/lib/src/comps/login-connect.d.ts +0 -4
- package/dist/lib/src/comps/login-copyright.d.ts +0 -7
- package/dist/lib/src/comps/login-form.d.ts +0 -45
- package/dist/lib/src/comps/login-marquee.d.ts +0 -4
- package/dist/lib/src/comps/logo-text.d.ts +0 -2
- package/dist/lib/src/comps/logo.d.ts +0 -8
- package/dist/lib/src/comps/md-editor.d.ts +0 -20
- package/dist/lib/src/comps/md-view.d.ts +0 -16
- package/dist/lib/src/comps/notifications-button.d.ts +0 -28
- package/dist/lib/src/comps/order-coupon-info.d.ts +0 -12
- package/dist/lib/src/comps/order-delivery-method.d.ts +0 -11
- package/dist/lib/src/comps/order-line-items.d.ts +0 -19
- package/dist/lib/src/comps/order-payment-gateway.d.ts +0 -27
- package/dist/lib/src/comps/order-price.d.ts +0 -21
- package/dist/lib/src/comps/orders-quick-search-actions.d.ts +0 -9
- package/dist/lib/src/comps/overlay.d.ts +0 -19
- package/dist/lib/src/comps/portal-creator.d.ts +0 -6
- package/dist/lib/src/comps/product-discounts.d.ts +0 -22
- package/dist/lib/src/comps/product-related-products.d.ts +0 -10
- package/dist/lib/src/comps/products-variants-test.d.ts +0 -1
- package/dist/lib/src/comps/products-variants.d.ts +0 -38
- package/dist/lib/src/comps/quick-search-browser.d.ts +0 -32
- package/dist/lib/src/comps/resource-browse.d.ts +0 -51
- package/dist/lib/src/comps/resource-onboard-svg.d.ts +0 -2
- package/dist/lib/src/comps/resource-title.d.ts +0 -7
- package/dist/lib/src/comps/secret-view.d.ts +0 -9
- package/dist/lib/src/comps/select-resource.d.ts +0 -88
- package/dist/lib/src/comps/settings-api-keys.d.ts +0 -2
- package/dist/lib/src/comps/settings-change-password.d.ts +0 -2
- package/dist/lib/src/comps/settings-storage.d.ts +0 -15
- package/dist/lib/src/comps/show-if.d.ts +0 -25
- package/dist/lib/src/comps/side-menu.d.ts +0 -50
- package/dist/lib/src/comps/splitter-view.d.ts +0 -1
- package/dist/lib/src/comps/storefront-products.d.ts +0 -12
- package/dist/lib/src/comps/symbols.d.ts +0 -4
- package/dist/lib/src/comps/tag-values.d.ts +0 -9
- package/dist/lib/src/comps/tags-edit.d.ts +0 -13
- package/dist/lib/src/comps/template-example-input.d.ts +0 -3
- package/dist/lib/src/comps/template-template.d.ts +0 -15
- package/dist/lib/src/comps/transition.d.ts +0 -51
- package/dist/lib/src/hooks/use-collections-actions.d.ts +0 -43
- package/dist/lib/src/hooks/use-document-actions.d.ts +0 -37
- package/dist/lib/src/hooks/use-interval.d.ts +0 -13
- package/dist/lib/src/hooks/use-keyboard-match.d.ts +0 -6
- package/dist/lib/src/hooks/use-media-query.d.ts +0 -3
- package/dist/lib/src/hooks/use-mounted.d.ts +0 -1
- package/dist/lib/src/hooks/use-navigate-with-state.d.ts +0 -26
- package/dist/lib/src/hooks/use-on-click-outside.d.ts +0 -7
- package/dist/lib/src/hooks/use-scroll-delta.d.ts +0 -4
- package/dist/lib/src/hooks/use-toggle.d.ts +0 -7
- package/dist/lib/src/hooks/utils.browser.d.ts +0 -7
- package/dist/lib/src/index.cjs +0 -800
- package/dist/lib/src/index.d.ts +0 -6
- package/dist/lib/src/layout.d.ts +0 -18
- package/dist/lib/src/login.d.ts +0 -17
- package/dist/lib/src/pages/collection.d.ts +0 -15
- package/dist/lib/src/pages/collections.d.ts +0 -2
- package/dist/lib/src/pages/customer.d.ts +0 -15
- package/dist/lib/src/pages/customers.d.ts +0 -3
- package/dist/lib/src/pages/discount.d.ts +0 -15
- package/dist/lib/src/pages/discounts.d.ts +0 -2
- package/dist/lib/src/pages/extension.d.ts +0 -13
- package/dist/lib/src/pages/extensions.d.ts +0 -16
- package/dist/lib/src/pages/home.d.ts +0 -2
- package/dist/lib/src/pages/index.d.ts +0 -36
- package/dist/lib/src/pages/order.d.ts +0 -21
- package/dist/lib/src/pages/orders.d.ts +0 -2
- package/dist/lib/src/pages/payment-gateway.d.ts +0 -13
- package/dist/lib/src/pages/payment-gateways.d.ts +0 -16
- package/dist/lib/src/pages/post.d.ts +0 -15
- package/dist/lib/src/pages/posts.d.ts +0 -2
- package/dist/lib/src/pages/product.d.ts +0 -22
- package/dist/lib/src/pages/products.d.ts +0 -2
- package/dist/lib/src/pages/settings.d.ts +0 -4
- package/dist/lib/src/pages/shipping-method.d.ts +0 -15
- package/dist/lib/src/pages/shipping-methods.d.ts +0 -2
- package/dist/lib/src/pages/storefront.d.ts +0 -15
- package/dist/lib/src/pages/storefronts.d.ts +0 -2
- package/dist/lib/src/pages/tag.d.ts +0 -15
- package/dist/lib/src/pages/tags.d.ts +0 -2
- package/dist/lib/src/pages/template.d.ts +0 -15
- package/dist/lib/src/pages/templates.d.ts +0 -2
- package/dist/lib/src/routes.d.ts +0 -1
- package/dist/lib/src/utils/index.d.ts +0 -7
- package/dist/lib/src/utils/time.d.ts +0 -7
- package/dist/website/assets/index-CKdUTkr6.js +0 -813
- package/dist/website/assets/style-DkU0t4eA.css +0 -1
- /package/dist/lib/src/{auto-mount.d.ts → src/auto-mount.d.ts} +0 -0
- /package/dist/lib/src/{hooks → src/hooks}/use-dark-mode.d.ts +0 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
import { ImageType } from '@storecraft/core/api';
|
2
|
+
export type ImageParams = {
|
3
|
+
data: ImageType;
|
4
|
+
onClickImage: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>, data: ImageType) => void;
|
5
|
+
className?: string;
|
6
|
+
} & React.ComponentProps<'div'>;
|
7
|
+
export type ImageGridParams = {
|
8
|
+
images: ImageType[];
|
9
|
+
onClickImage: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>, data: ImageType) => void;
|
10
|
+
className?: string;
|
11
|
+
} & React.ComponentProps<'div'>;
|
12
|
+
export declare const Image: ({ data, onClickImage, className, ...rest }: ImageParams) => import("react/jsx-runtime").JSX.Element;
|
13
|
+
declare const ImageGrid: ({ images, onClickImage, className, ...rest }: ImageGridParams) => import("react/jsx-runtime").JSX.Element;
|
14
|
+
export default ImageGrid;
|
@@ -1,17 +1,18 @@
|
|
1
|
-
export default SearchBar;
|
2
1
|
export type InnerSearchBarParams = {
|
3
2
|
count: number;
|
4
3
|
searchTitle: string;
|
5
4
|
isLoading: boolean;
|
6
5
|
reload: () => void;
|
7
6
|
};
|
7
|
+
export type SearchBarProps = {
|
8
|
+
count: number;
|
9
|
+
searchTitle: string;
|
10
|
+
isLoading: boolean;
|
11
|
+
reload: () => void;
|
12
|
+
} & React.ComponentProps<'div'>;
|
8
13
|
export type ImpInterface = {
|
9
14
|
getSearch: () => string;
|
10
15
|
setSearch: (value: string) => void;
|
11
16
|
};
|
12
|
-
|
13
|
-
|
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>>;
|
17
|
+
declare const SearchBar: import('react').ForwardRefExoticComponent<Omit<SearchBarProps, "ref"> & import('react').RefAttributes<unknown>>;
|
18
|
+
export default SearchBar;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
import { ImpInterface } from '../../comps/overlay';
|
3
|
+
import { ApiQuery, ImageType } from '@storecraft/core/api';
|
4
|
+
export type GallerySelectParams = {
|
5
|
+
query_params?: ApiQuery;
|
6
|
+
onSelect: (img: ImageType) => void;
|
7
|
+
};
|
8
|
+
declare const GallerySelect: React.ForwardRefExoticComponent<GallerySelectParams & React.RefAttributes<ImpInterface>>;
|
9
|
+
export default GallerySelect;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { ApiQuery, ImageType } from '@storecraft/core/api';
|
2
|
+
export type InnerGalleryParams = {
|
3
|
+
/**
|
4
|
+
* { vql: '', limit: 5}
|
5
|
+
*/
|
6
|
+
query_params?: ApiQuery;
|
7
|
+
onClickImage?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>, data: ImageType) => void;
|
8
|
+
/**
|
9
|
+
* Use url navigation
|
10
|
+
* to paginate through search params, as opposed to in-memory. This
|
11
|
+
* is suited for pages, the later for individual components.
|
12
|
+
*/
|
13
|
+
useSearchParamsForQuery?: boolean;
|
14
|
+
};
|
15
|
+
export type GalleryParams = InnerGalleryParams & React.ComponentProps<'div'>;
|
16
|
+
/**
|
17
|
+
* A `gallery` component. if contstrained on height, then image-grid
|
18
|
+
* will be scrollable
|
19
|
+
*
|
20
|
+
* Two modes of retrieving search:
|
21
|
+
* 1. onSearchUpdate=undefined will cause the comp to internally
|
22
|
+
* fetch data when user searches data
|
23
|
+
* 2. onSearchUpdate!=undefined will cause the comp to delegate
|
24
|
+
* the search params outside, where you can redirect again,
|
25
|
+
* this is useful for re-routing of all kinds
|
26
|
+
*
|
27
|
+
*/
|
28
|
+
declare const Gallery: ({ query_params, onClickImage, useSearchParamsForQuery, className, ...rest }: GalleryParams) => import("react/jsx-runtime").JSX.Element;
|
29
|
+
export default Gallery;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
export type HeaderParams = {
|
3
|
+
label: string;
|
4
|
+
Icon: React.FC<{
|
5
|
+
className: string;
|
6
|
+
}>;
|
7
|
+
} & React.ComponentProps<'p'>;
|
8
|
+
declare const Header: ({ label, Icon, className, ...rest }: HeaderParams) => import("react/jsx-runtime").JSX.Element;
|
9
|
+
export default Header;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export type LabelCapsuleParams = {
|
2
|
+
value: string;
|
3
|
+
label?: string | ((value: string) => string);
|
4
|
+
bgColor?: string | ((value: string) => string);
|
5
|
+
} & React.ComponentProps<'div'>;
|
6
|
+
export type TagsParams = {
|
7
|
+
search: string[];
|
8
|
+
} & React.ComponentProps<'div'>;
|
9
|
+
export type UsageParams = {
|
10
|
+
usage: string[];
|
11
|
+
} & React.ComponentProps<'div'>;
|
12
|
+
/**
|
13
|
+
*
|
14
|
+
*/
|
15
|
+
declare const ImagePage: ({}: {}) => import("react/jsx-runtime").JSX.Element;
|
16
|
+
export default ImagePage;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
export type ActionBarParams = {
|
3
|
+
menuOpen?: boolean;
|
4
|
+
className?: string;
|
5
|
+
onMenuClick?: React.MouseEventHandler;
|
6
|
+
} & React.ComponentProps<'nav'>;
|
7
|
+
declare const ActionBar: ({ menuOpen, className, onMenuClick, ...rest }: ActionBarParams) => import("react/jsx-runtime").JSX.Element;
|
8
|
+
export default ActionBar;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const Favicon: ({ ...rest }: Omit<React.ComponentProps<"svg">, "viewBox">) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { FieldLeafViewParams } from './fields-view';
|
2
|
+
import { AttributeType } from '@storecraft/core/api';
|
3
|
+
export type AttributeParams = {
|
4
|
+
attribute: AttributeType;
|
5
|
+
onChange: (attribute: AttributeType) => void;
|
6
|
+
onDelete: () => void;
|
7
|
+
} & FieldLeafViewParams<AttributeType[]> & React.ComponentProps<'div'>;
|
8
|
+
/**
|
9
|
+
* @typedef {import('./fields-view.jsx').FieldLeafViewParams<
|
10
|
+
* import('@storecraft/core/api').AttributeType[]> &
|
11
|
+
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
12
|
+
* } AttributesParams
|
13
|
+
*
|
14
|
+
* @param {AttributesParams} params
|
15
|
+
*/
|
16
|
+
declare const Attributes: ({ field, value, onChange, setError, ...rest }: {
|
17
|
+
[x: string]: any;
|
18
|
+
field: any;
|
19
|
+
value?: any[];
|
20
|
+
onChange: any;
|
21
|
+
setError: any;
|
22
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
23
|
+
export default Attributes;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { SeriesDataItemTypeMap, DeepPartial, ChartOptions, SeriesType, SeriesDefinition, SeriesPartialOptionsMap, MouseEventParams, Point, HorzScaleOptions, PriceScaleOptions } from 'lightweight-charts';
|
2
|
+
import { withDiv } from './types';
|
3
|
+
export type ToolTipParams = {
|
4
|
+
chart?: {
|
5
|
+
data?: SeriesDataItemTypeMap[SeriesType];
|
6
|
+
point?: Point;
|
7
|
+
event_params?: MouseEventParams;
|
8
|
+
};
|
9
|
+
};
|
10
|
+
export type SeriesConfig<T extends SeriesType> = {
|
11
|
+
definition: SeriesDefinition<T>;
|
12
|
+
data: SeriesDataItemTypeMap[T][];
|
13
|
+
options?: SeriesPartialOptionsMap[T];
|
14
|
+
priceScaleOptions?: DeepPartial<PriceScaleOptions>;
|
15
|
+
};
|
16
|
+
export type BaseChartViewParams = withDiv<{
|
17
|
+
config: {
|
18
|
+
series: SeriesConfig<SeriesType>[];
|
19
|
+
chart: {
|
20
|
+
options?: DeepPartial<ChartOptions>;
|
21
|
+
timeScaleOptions?: DeepPartial<HorzScaleOptions>;
|
22
|
+
priceScaleOptions?: DeepPartial<PriceScaleOptions>;
|
23
|
+
fitContent?: boolean;
|
24
|
+
};
|
25
|
+
tooltip?: {
|
26
|
+
component?: React.FC<ToolTipParams>;
|
27
|
+
};
|
28
|
+
};
|
29
|
+
}>;
|
30
|
+
declare const BaseChartView: ({ config, ...rest }: BaseChartViewParams) => import("react/jsx-runtime").JSX.Element;
|
31
|
+
export default BaseChartView;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export type BulkTagProductsInCollectionProps = {
|
2
|
+
collectionId: string;
|
3
|
+
value?: {
|
4
|
+
handle: string;
|
5
|
+
id: string;
|
6
|
+
};
|
7
|
+
} & React.ComponentProps<'div'>;
|
8
|
+
declare const BulkTagProductsInCollection: ({ collectionId, value }: BulkTagProductsInCollectionProps) => import("react/jsx-runtime").JSX.Element;
|
9
|
+
export default BulkTagProductsInCollection;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { withDiv } from './types';
|
2
|
+
export type CapsuleParams = withDiv<{
|
3
|
+
className?: string;
|
4
|
+
bgColor?: string | ((v: string) => string);
|
5
|
+
value: string;
|
6
|
+
label?: string | ((v: string) => string);
|
7
|
+
}>;
|
8
|
+
export declare const LabelCapsule: ({ value, className, label, bgColor, ...rest }: CapsuleParams) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export type CapsulesViewParams<T = any> = {
|
2
|
+
tags: T[];
|
3
|
+
name_fn?: (x: T) => string;
|
4
|
+
clsCapsule?: string;
|
5
|
+
className?: string;
|
6
|
+
onRemove?: (v: T) => void;
|
7
|
+
onClick: (v: T) => void;
|
8
|
+
};
|
9
|
+
declare const CapsulesView: <T>({ tags, name_fn, className, clsCapsule, onRemove, onClick }: CapsulesViewParams<T>) => import("react/jsx-runtime").JSX.Element;
|
10
|
+
export default CapsulesView;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
export default function ClientOnly({ ...rest }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
3
|
+
export declare function withClient(Component: React.FC): (props: any) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
export type ImperativeInterface = {
|
2
|
+
getSearch: () => string;
|
3
|
+
setSearch: (value: string) => void;
|
4
|
+
};
|
5
|
+
export type TopActionsParams = {
|
6
|
+
reload: () => void;
|
7
|
+
searchTitle: string;
|
8
|
+
isLoading: boolean;
|
9
|
+
createLink?: string;
|
10
|
+
className?: string;
|
11
|
+
isCollectionEmpty?: boolean;
|
12
|
+
};
|
13
|
+
export type BottomActionsParams = {
|
14
|
+
next: () => Promise<any>;
|
15
|
+
prev: () => Promise<any>;
|
16
|
+
limit?: number;
|
17
|
+
onLimitChange: (v: number) => void;
|
18
|
+
className?: string;
|
19
|
+
};
|
20
|
+
export declare const TopActions: import('react').ForwardRefExoticComponent<TopActionsParams & import('react').RefAttributes<unknown>>;
|
21
|
+
export declare const BottomActions: ({ next, prev, limit, onLimitChange, className }: BottomActionsParams) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { FieldContextData, FieldLeafViewParams } from './fields-view';
|
2
|
+
import { CollectionType } from '@storecraft/core/api';
|
3
|
+
export type ImpInterface = {
|
4
|
+
refresh: () => Promise<void>;
|
5
|
+
};
|
6
|
+
export type CollectionBaseParams = {
|
7
|
+
/**
|
8
|
+
* `handle` or `id`
|
9
|
+
*/
|
10
|
+
collection_handle_or_id: string;
|
11
|
+
/**
|
12
|
+
* `limit` of query
|
13
|
+
*/
|
14
|
+
limit?: number;
|
15
|
+
/**
|
16
|
+
* when loaded reports query count
|
17
|
+
*/
|
18
|
+
onLoaded: (count: number) => void;
|
19
|
+
/**
|
20
|
+
* context
|
21
|
+
*/
|
22
|
+
context: FieldContextData<CollectionType> & import('../pages/collection.js').Context;
|
23
|
+
};
|
24
|
+
export type CollectionProductsParams = FieldLeafViewParams<CollectionType, import('../pages/collection.js').Context, CollectionType>;
|
25
|
+
declare const CollectionProducts: ({ value, context }: CollectionProductsParams) => import("react/jsx-runtime").JSX.Element;
|
26
|
+
export default CollectionProducts;
|
@@ -0,0 +1,78 @@
|
|
1
|
+
import { InternalBlingParams } from './common-ui';
|
2
|
+
export type ButtonParams = {
|
3
|
+
text?: string;
|
4
|
+
icon?: React.ReactElement;
|
5
|
+
className?: string;
|
6
|
+
classNameSpan?: string;
|
7
|
+
children?: any;
|
8
|
+
rightView?: any;
|
9
|
+
} & React.ComponentProps<'button'>;
|
10
|
+
export type Button2Params = {
|
11
|
+
text?: string;
|
12
|
+
icon?: React.ReactElement;
|
13
|
+
className?: string;
|
14
|
+
classNameSpan?: string;
|
15
|
+
children: any;
|
16
|
+
} & React.ComponentProps<'button'>;
|
17
|
+
export type LoadingButtonParams = {
|
18
|
+
Icon?: React.ReactNode | JSX.Element;
|
19
|
+
text?: string;
|
20
|
+
keep_text_on_load?: boolean;
|
21
|
+
className?: string;
|
22
|
+
classNameLoading?: string;
|
23
|
+
classNameLeft?: string;
|
24
|
+
loading?: boolean;
|
25
|
+
show?: boolean;
|
26
|
+
} & React.ComponentProps<'button'>;
|
27
|
+
/**
|
28
|
+
* A loading button which expects a promise for onClick
|
29
|
+
*/
|
30
|
+
export type InternalPromisableLoadingButton = {
|
31
|
+
onClick: () => Promise<any>;
|
32
|
+
loading?: boolean;
|
33
|
+
};
|
34
|
+
export type PromisableLoadingButtonParams = {
|
35
|
+
onClick: () => Promise<any>;
|
36
|
+
loading?: boolean;
|
37
|
+
} & Omit<LoadingButtonParams, "onClick">;
|
38
|
+
export type PromisableLoadingBlingButtonParams = {
|
39
|
+
onClick: () => Promise<any>;
|
40
|
+
show?: boolean;
|
41
|
+
loading?: boolean;
|
42
|
+
stroke?: string;
|
43
|
+
rounded?: string;
|
44
|
+
from?: string;
|
45
|
+
to?: string;
|
46
|
+
} & Omit<LoadingButtonParams, "onClick">;
|
47
|
+
export type GradientFillIconParams = {
|
48
|
+
from?: string;
|
49
|
+
to?: string;
|
50
|
+
Icon?: React.FC<{
|
51
|
+
style?: any;
|
52
|
+
}>;
|
53
|
+
} & {
|
54
|
+
[x: string]: any;
|
55
|
+
};
|
56
|
+
export type GradientStrokeIconParams = {
|
57
|
+
from?: string;
|
58
|
+
to?: string;
|
59
|
+
Icon?: React.FC<{
|
60
|
+
style?: any;
|
61
|
+
}>;
|
62
|
+
} & {
|
63
|
+
[x: string]: any;
|
64
|
+
};
|
65
|
+
export declare const Button: ({ text, icon, className, classNameSpan, children, rightView, ...rest }: ButtonParams) => import("react/jsx-runtime").JSX.Element;
|
66
|
+
export declare const Button2: ({ text, icon, className, classNameSpan, children, ...rest }: Button2Params) => import("react/jsx-runtime").JSX.Element;
|
67
|
+
export declare const LoadingButton: ({ Icon, show, text, keep_text_on_load, className, classNameLoading, classNameLeft, loading, ...rest }: LoadingButtonParams) => import("react/jsx-runtime").JSX.Element;
|
68
|
+
export declare const PromisableLoadingButton: ({ onClick, loading: $loading, ...rest }: PromisableLoadingButtonParams) => import("react/jsx-runtime").JSX.Element;
|
69
|
+
export declare const PromisableLoadingBlingButton: ({ onClick, show, className, loading: $loading, stroke, rounded, from, to, ...rest }: PromisableLoadingBlingButtonParams) => import("react/jsx-runtime").JSX.Element;
|
70
|
+
export type BlingButtonParams = InternalBlingParams & {
|
71
|
+
btnClassName?: string;
|
72
|
+
text?: string;
|
73
|
+
} & React.ComponentProps<'button'>;
|
74
|
+
export declare const BlingButton: ({ from, to, rounded, stroke, children, text, className, btnClassName, ...rest }: BlingButtonParams) => import("react/jsx-runtime").JSX.Element;
|
75
|
+
export type BlingButton2Params = InternalBlingParams & Button2Params;
|
76
|
+
export declare const BlingButton2: ({ from, to, rounded, stroke, ...rest }: BlingButton2Params) => import("react/jsx-runtime").JSX.Element;
|
77
|
+
export declare const GradientFillIcon: ({ Icon, from, to, ...rest }: GradientFillIconParams) => import("react/jsx-runtime").JSX.Element;
|
78
|
+
export declare const GradientStrokeIcon: ({ Icon, from, to, ...rest }: GradientStrokeIconParams) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import { InputParams } from './common-ui';
|
2
|
+
import { FieldLeafViewParams } from './fields-view';
|
3
|
+
import { TableSchemaViewComponentParams } from './table-schema-view';
|
4
|
+
export type TextAreaParams = FieldLeafViewParams<string>;
|
5
|
+
export type TimeStampViewParams = TableSchemaViewComponentParams<string>;
|
6
|
+
export type RecordActionsParams<T> = TableSchemaViewComponentParams<any, T>;
|
7
|
+
/**
|
8
|
+
* This is used in `TableSchemaView`
|
9
|
+
*/
|
10
|
+
export type InternalSpanParams = {
|
11
|
+
className?: string;
|
12
|
+
extra?: string;
|
13
|
+
children?: React.ReactNode;
|
14
|
+
};
|
15
|
+
export type SpanParams<T> = TableSchemaViewComponentParams<string, T> & InternalSpanParams & React.ComponentProps<'p'>;
|
16
|
+
/**
|
17
|
+
* This is used in `TableSchemaView`
|
18
|
+
*/
|
19
|
+
export type InternalSpanArrayParams = {
|
20
|
+
className?: string;
|
21
|
+
classNameDelimiter?: string;
|
22
|
+
delimiter?: string;
|
23
|
+
name_fn?: (value: any) => string;
|
24
|
+
};
|
25
|
+
/**
|
26
|
+
* This is used in `TableSchemaView`
|
27
|
+
*/
|
28
|
+
export type SpanArrayParams = TableSchemaViewComponentParams<any[]> & InternalSpanArrayParams & React.ComponentProps<'p'>;
|
29
|
+
export type InternalMInputParams = FieldLeafViewParams<string>;
|
30
|
+
export type MInputParams = InternalMInputParams & InputParams;
|
31
|
+
export type InternalInputWithClipboardParams = FieldLeafViewParams<string>;
|
32
|
+
export type InputWithClipboardParams = InternalInputWithClipboardParams & React.ComponentProps<'div'>;
|
33
|
+
export type InternalHandleParams = FieldLeafViewParams<string>;
|
34
|
+
export type HandleParams = InternalHandleParams & React.ComponentProps<'div'>;
|
35
|
+
export type InternalSwitchParams = FieldLeafViewParams<boolean>;
|
36
|
+
export type SwitchParams = InternalSwitchParams & React.ComponentProps<'div'>;
|
37
|
+
/**
|
38
|
+
* A `copy` to clipboard button
|
39
|
+
*/
|
40
|
+
export type ClipBoardCopyButtonParams = {
|
41
|
+
value: string;
|
42
|
+
config?: 0 | 1;
|
43
|
+
/**
|
44
|
+
* process the value
|
45
|
+
* before copying
|
46
|
+
*/
|
47
|
+
process_before_copy?: (value: string) => string;
|
48
|
+
};
|
49
|
+
/**
|
50
|
+
* @param options [{id, name}, ...]
|
51
|
+
* @param defaultIndex do not use it (use defaultValue in fieldsview instead)
|
52
|
+
*/
|
53
|
+
export declare const create_select_view: (options: {
|
54
|
+
id: string | number;
|
55
|
+
name: string;
|
56
|
+
}[], defaultIndex?: number) => ({ field, value, onChange }: FieldLeafViewParams<{
|
57
|
+
id: string;
|
58
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
59
|
+
export declare const TextArea: ({ field, value, onChange, ...rest }: TextAreaParams) => import("react/jsx-runtime").JSX.Element;
|
60
|
+
export declare const Span: <T>({ value, children, className, extra, ...rest }: SpanParams<T>) => import("react/jsx-runtime").JSX.Element;
|
61
|
+
/**
|
62
|
+
* This is used in `TableSchemaView`
|
63
|
+
*/
|
64
|
+
export declare const SpanArray: ({ field, value, className, name_fn, classNameDelimiter, delimiter, ...rest }: SpanArrayParams) => import("react/jsx-runtime").JSX.Element;
|
65
|
+
/**
|
66
|
+
* This component is used in a `TableSchemaView`
|
67
|
+
*/
|
68
|
+
export declare const TimeStampView: ({ field, value, ...rest }: TimeStampViewParams) => import("react/jsx-runtime").JSX.Element;
|
69
|
+
export declare const MInput: ({ field, value, onChange, type, ...rest }: MInputParams) => import("react/jsx-runtime").JSX.Element;
|
70
|
+
export declare const InputWithClipboard: ({ value, field, onChange, setError, ...rest }: InputWithClipboardParams) => import("react/jsx-runtime").JSX.Element;
|
71
|
+
export declare const Handle: ({ value, field, onChange, context, setError, ...rest }: HandleParams) => import("react/jsx-runtime").JSX.Element;
|
72
|
+
export declare const Switch: ({ field, value, onChange, ...rest }: SwitchParams) => import("react/jsx-runtime").JSX.Element;
|
73
|
+
/**
|
74
|
+
* A `copy` to clipboard button
|
75
|
+
*/
|
76
|
+
export declare const ClipBoardCopy: ({ value, config, process_before_copy }: ClipBoardCopyButtonParams) => import("react/jsx-runtime").JSX.Element;
|
77
|
+
export declare const withCard: <P extends FieldLeafViewParams<any>>(Comp: React.FC<Partial<P>>, comp_params_inner?: Partial<P>, border?: boolean, copy?: boolean) => ({ field, value, disabled, onChange, children, error, setError, context, ...rest }: FieldLeafViewParams<any> & {
|
78
|
+
children?: React.ReactNode;
|
79
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
80
|
+
/**
|
81
|
+
* This component is used in a `TableSchemaView`
|
82
|
+
*/
|
83
|
+
export declare const RecordActions: <T>({ context, field, value, ...rest }: RecordActionsParams<T>) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { TableSchemaViewComponentParams } from './table-schema-view';
|
2
|
+
/**
|
3
|
+
* This is used in `TableSchemaView`
|
4
|
+
*/
|
5
|
+
export type SpanParams<T extends unknown = any> = TableSchemaViewComponentParams<string, T> & {
|
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
|
+
} & React.ComponentProps<'p'>;
|
18
|
+
export declare const SimpleLink: <T>({ context, value, children, className, extra, url_fn, get_state, ...rest }: SpanParams<T>) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,97 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
export type CreateDate2Params = {
|
3
|
+
time: number;
|
4
|
+
className: string;
|
5
|
+
} & React.ComponentProps<'div'>;
|
6
|
+
export type HRParams = {
|
7
|
+
dashed?: boolean;
|
8
|
+
} & React.ComponentProps<'input'>;
|
9
|
+
export type TitleParams = {} & React.ComponentProps<'input'>;
|
10
|
+
export type LabelParams = {} & React.ComponentProps<'div'>;
|
11
|
+
export type DivParams = {
|
12
|
+
setError: any;
|
13
|
+
} & React.ComponentProps<'div'>;
|
14
|
+
export type InternalCreateDateParams = {
|
15
|
+
time: string;
|
16
|
+
changes_made?: boolean;
|
17
|
+
/**
|
18
|
+
* override
|
19
|
+
*/
|
20
|
+
rightText?: string;
|
21
|
+
className: string;
|
22
|
+
};
|
23
|
+
export type CreateDateParams = InternalCreateDateParams & React.ComponentProps<'div'>;
|
24
|
+
export type CreateDateImperativeInterface = {
|
25
|
+
get: () => boolean;
|
26
|
+
set: (value?: boolean) => void;
|
27
|
+
};
|
28
|
+
export type InputInternalParams = {
|
29
|
+
overrideClass?: boolean;
|
30
|
+
className?: string;
|
31
|
+
};
|
32
|
+
export type InputParams = InputInternalParams & React.ComponentProps<'input'>;
|
33
|
+
export type BlingInputInternalParams = {
|
34
|
+
inputClsName?: string;
|
35
|
+
};
|
36
|
+
export type BlingInputParams = BlingInputInternalParams & InternalBlingParams & InputParams;
|
37
|
+
/**
|
38
|
+
* Background container with gradient
|
39
|
+
*/
|
40
|
+
export type InternalBlingParams = {
|
41
|
+
className?: string;
|
42
|
+
rounded?: string;
|
43
|
+
children?: any;
|
44
|
+
stroke?: string;
|
45
|
+
from?: string;
|
46
|
+
to?: string;
|
47
|
+
};
|
48
|
+
/**
|
49
|
+
* Background container with gradient
|
50
|
+
*/
|
51
|
+
export type BlingParams = InternalBlingParams & React.ComponentProps<'div'>;
|
52
|
+
export type InternalCardParams = {
|
53
|
+
name?: React.ReactNode;
|
54
|
+
setError?: (e: any) => void;
|
55
|
+
error?: string;
|
56
|
+
children: React.ReactNode;
|
57
|
+
border?: boolean;
|
58
|
+
desc?: string;
|
59
|
+
rightView?: React.ReactElement;
|
60
|
+
cardClass?: string;
|
61
|
+
rest?: any[];
|
62
|
+
};
|
63
|
+
export type CardParams = InternalCardParams & React.ComponentProps<'div'>;
|
64
|
+
export declare const CreateDate: React.ForwardRefExoticComponent<Omit<CreateDateParams, "ref"> & React.RefAttributes<unknown>>;
|
65
|
+
export declare const CreateDate2: ({ time, className, ...rest }: CreateDate2Params) => import("react/jsx-runtime").JSX.Element;
|
66
|
+
export declare const HR: ({ dashed, ...rest }: HRParams) => import("react/jsx-runtime").JSX.Element;
|
67
|
+
export declare const Title: ({ className, ...rest }: TitleParams) => import("react/jsx-runtime").JSX.Element;
|
68
|
+
export declare const Label: ({ ...rest }: {
|
69
|
+
[x: string]: any;
|
70
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
71
|
+
export declare const Input: React.ForwardRefExoticComponent<Omit<InputParams, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
72
|
+
export declare const BlingInput: React.ForwardRefExoticComponent<Omit<BlingInputParams, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
73
|
+
/**
|
74
|
+
* @param color_stops
|
75
|
+
*/
|
76
|
+
export declare const border_bling_style: (color_stops?: string[]) => {
|
77
|
+
style: {
|
78
|
+
'background-image': string;
|
79
|
+
'background-clip': string;
|
80
|
+
'border-color': string;
|
81
|
+
'background-origin': string;
|
82
|
+
};
|
83
|
+
};
|
84
|
+
/**
|
85
|
+
* Background container with gradient
|
86
|
+
*/
|
87
|
+
export declare const Bling: ({ className, rounded, children, stroke, from, to, ...rest }: BlingParams) => import("react/jsx-runtime").JSX.Element;
|
88
|
+
export declare const withBling: (Comp: any, params?: {}) => ({ ...rest }: {
|
89
|
+
[x: string]: any;
|
90
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
91
|
+
export declare const withBling2: (Comp: any) => ({ ...rest }: {
|
92
|
+
[x: string]: any;
|
93
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
94
|
+
export declare const Div: ({ setError, ...rest }: DivParams) => import("react/jsx-runtime").JSX.Element;
|
95
|
+
/**
|
96
|
+
*/
|
97
|
+
export declare const Card: ({ name, setError, error, children, border, desc, rightView, cardClass, ...rest }: CardParams) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
export function CopyableView({ value, process_before_copy, ...rest }: CopyableViewParams & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "value">): import("react").JSX.Element;
|
2
1
|
/**
|
3
2
|
* A view with `markdown` context, that is `copyable`
|
4
3
|
*/
|
@@ -12,4 +11,8 @@ export type CopyableViewParams = {
|
|
12
11
|
* before copying
|
13
12
|
*/
|
14
13
|
process_before_copy: (value: string) => string;
|
15
|
-
}
|
14
|
+
} & Omit<React.ComponentProps<'div'>, 'value'>;
|
15
|
+
/**
|
16
|
+
* A view with `markdown` context, that is `copyable`
|
17
|
+
*/
|
18
|
+
export declare const CopyableView: ({ value, process_before_copy, ...rest }: CopyableViewParams) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { FieldLeafViewParams } from './fields-view';
|
2
|
+
import { CustomerType } from '@storecraft/core/api';
|
3
|
+
export type CustomerOrdersParams = FieldLeafViewParams<CustomerType, import('../pages/customer.js').Context, CustomerType> & React.ComponentProps<'div'>;
|
4
|
+
declare const CustomerOrders: ({ value, field, context, error, setError, ...rest }: CustomerOrdersParams) => import("react/jsx-runtime").JSX.Element;
|
5
|
+
export default CustomerOrders;
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { BulkDiscountExtra, BundleDiscountExtra, BuyXGetYDiscountExtra, DiscountDetails, DiscountType, OrderDiscountExtra, RegularDiscountExtra } from '@storecraft/core/api';
|
2
|
+
import { FieldContextData, FieldLeafViewParams } from './fields-view';
|
3
|
+
export declare const discount_details_validator: (v: any) => (string | boolean)[];
|
4
|
+
export type DiscountTypesParams = {
|
5
|
+
selectedType: DiscountDetails["meta"];
|
6
|
+
onChange: (meta: DiscountDetails["meta"]) => void;
|
7
|
+
};
|
8
|
+
export type BulkDiscountParams = {
|
9
|
+
type: "bulk";
|
10
|
+
value: BulkDiscountExtra;
|
11
|
+
onChange: (extra: BulkDiscountExtra) => void;
|
12
|
+
};
|
13
|
+
export type BundleDiscountParams = {
|
14
|
+
meta: "bundle";
|
15
|
+
value: BundleDiscountExtra;
|
16
|
+
context: FieldContextData;
|
17
|
+
onChange: (extra: BundleDiscountExtra) => void;
|
18
|
+
};
|
19
|
+
export type ExplainPriceParams = {
|
20
|
+
prefix: string;
|
21
|
+
percent: number;
|
22
|
+
fixed: number;
|
23
|
+
};
|
24
|
+
export type RegularDiscountParams = {
|
25
|
+
type: "regular";
|
26
|
+
value: RegularDiscountExtra;
|
27
|
+
onChange: (extra: RegularDiscountExtra) => void;
|
28
|
+
};
|
29
|
+
export type BuyXGetYDiscountParams = {
|
30
|
+
type: "buy_x_get_y";
|
31
|
+
value: BuyXGetYDiscountExtra;
|
32
|
+
onChange: (extra: BuyXGetYDiscountExtra) => void;
|
33
|
+
context: import('../pages/discount.js').Context;
|
34
|
+
};
|
35
|
+
export type OrderDiscountParams = {
|
36
|
+
type: "order";
|
37
|
+
value: OrderDiscountExtra;
|
38
|
+
onChange: (extra: OrderDiscountExtra) => void;
|
39
|
+
};
|
40
|
+
export type Type2CompParams = {
|
41
|
+
meta: DiscountDetails["meta"];
|
42
|
+
context: FieldContextData<DiscountType>;
|
43
|
+
onChange: (extra: DiscountDetails["extra"]) => void;
|
44
|
+
value: DiscountDetails["extra"];
|
45
|
+
};
|
46
|
+
export type DiscountDetailsViewParams = FieldLeafViewParams<DiscountDetails, import('../pages/discount.js').Context, DiscountType>;
|
47
|
+
export declare const discount_types: {
|
48
|
+
id: number;
|
49
|
+
type: string;
|
50
|
+
name: string;
|
51
|
+
desc: string;
|
52
|
+
}[];
|
53
|
+
declare const DiscountDetailsView: ({ field, value, context, onChange, ...rest }: DiscountDetailsViewParams) => import("react/jsx-runtime").JSX.Element;
|
54
|
+
export default DiscountDetailsView;
|