@storecraft/dashboard 1.0.34 → 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 +34719 -62337
- 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 -6
- 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-DxEM6N8c.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
@@ -1,4 +1,3 @@
|
|
1
|
-
export default Modal;
|
2
1
|
/**
|
3
2
|
* Imperative interface
|
4
3
|
*/
|
@@ -7,9 +6,9 @@ export type ImpInterface = {
|
|
7
6
|
hide: Function;
|
8
7
|
setDataAndMessage: (data: any, message: string, show?: boolean) => void;
|
9
8
|
};
|
10
|
-
export type
|
9
|
+
export type ModalParams = {
|
11
10
|
title?: React.ReactElement;
|
12
11
|
onApprove: (key: string, value: any) => void;
|
13
|
-
}
|
14
|
-
|
15
|
-
|
12
|
+
} & Omit<React.ComponentProps<'div'>, "title">;
|
13
|
+
declare const Modal: import('react').ForwardRefExoticComponent<Omit<ModalParams, "ref"> & import('react').RefAttributes<ImpInterface>>;
|
14
|
+
export default Modal;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
export type BubbleParams = {
|
3
|
+
outerClass?: string;
|
4
|
+
innerClass?: string;
|
5
|
+
} & React.ComponentProps<'div'>;
|
6
|
+
export type NotificationButtonParams = {
|
7
|
+
isOpen?: boolean;
|
8
|
+
innerClass?: string;
|
9
|
+
} & React.ComponentProps<'div'>;
|
10
|
+
declare const NotificationButton: ({ isOpen, onClick, ...rest }: NotificationButtonParams) => import("react/jsx-runtime").JSX.Element;
|
11
|
+
export default NotificationButton;
|
@@ -1,15 +1,16 @@
|
|
1
1
|
import { default as React } from 'react';
|
2
|
-
|
2
|
+
import { NotificationType } from '@storecraft/core/api';
|
3
3
|
export type NotificationParams = {
|
4
|
-
notification:
|
4
|
+
notification: NotificationType;
|
5
5
|
};
|
6
6
|
export type FilterViewParams = {
|
7
|
-
notis:
|
7
|
+
notis: NotificationType[];
|
8
8
|
selected?: string;
|
9
9
|
onChange?: (filter: string) => void;
|
10
10
|
};
|
11
11
|
export type NotificationsViewParams = {
|
12
|
-
notis:
|
12
|
+
notis: NotificationType[];
|
13
13
|
onLoadMore: () => Promise<any>;
|
14
14
|
};
|
15
|
-
declare const Notifications: React.ForwardRefExoticComponent<Omit<
|
15
|
+
declare const Notifications: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
16
|
+
export default Notifications;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { DiscountType } from '@storecraft/core/api';
|
2
|
+
import { FieldLeafViewParams } from './fields-view';
|
3
|
+
export type MDEditorParams = FieldLeafViewParams<DiscountType[]> & React.ComponentProps<'div'>;
|
4
|
+
declare const OrderCouponInfo: ({ field, value, onChange, ...rest }: MDEditorParams) => import("react/jsx-runtime").JSX.Element;
|
5
|
+
export default OrderCouponInfo;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { FieldLeafViewParams } from './fields-view';
|
2
|
+
import { ShippingMethodType } from '@storecraft/core/api';
|
3
|
+
export type OrderDeliveryMethodParams = FieldLeafViewParams<ShippingMethodType> & React.ComponentProps<'div'>;
|
4
|
+
declare const OrderDeliveryMethod: ({ field, value, onChange, ...rest }: OrderDeliveryMethodParams) => import("react/jsx-runtime").JSX.Element;
|
5
|
+
export default OrderDeliveryMethod;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { LineItem } from '@storecraft/core/api';
|
2
|
+
import { FieldContextData, FieldLeafViewParams } from './fields-view';
|
3
|
+
export type Op = "change-qty" | "stock-change";
|
4
|
+
export type LineitemsTableParams = {
|
5
|
+
items?: LineItem[];
|
6
|
+
context?: FieldContextData & import('../pages/order.js').Context;
|
7
|
+
onChangeItem: (ix: number, op: Op, extra?: any) => void;
|
8
|
+
onRemoveItem: (ix: number, item: LineItem) => void;
|
9
|
+
} & React.ComponentProps<'div'>;
|
10
|
+
export type OrderLineItemsParams = FieldLeafViewParams<LineItem[], import('../pages/order.js').Context> & React.ComponentProps<'div'>;
|
11
|
+
declare const OrderLineItems: ({ field, value, onChange, context, error, setError, ...rest }: OrderLineItemsParams) => import("react/jsx-runtime").JSX.Element;
|
12
|
+
export default OrderLineItems;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { OrderData, OrderPaymentGatewayData, PaymentGatewayAction } from '@storecraft/core/api';
|
2
|
+
import { FieldLeafViewParams } from './fields-view';
|
3
|
+
/**
|
4
|
+
* Action button for payment gateway
|
5
|
+
*/
|
6
|
+
export type ActionButtonParams = {
|
7
|
+
action: PaymentGatewayAction;
|
8
|
+
onClick: (action: PaymentGatewayAction) => Promise<void>;
|
9
|
+
};
|
10
|
+
export type ChoosePaymentGatewayParams = {
|
11
|
+
full_order?: OrderData;
|
12
|
+
onCreate: (pg_handle: string) => Promise<any>;
|
13
|
+
};
|
14
|
+
export type OrderPaymentGatewayParams = FieldLeafViewParams<OrderPaymentGatewayData, import('../pages/order.js').Context, import('@storecraft/core/api').OrderData> & Omit<React.ComponentProps<'div'>, "onChange">;
|
15
|
+
declare const OrderPaymentGateway: ({ field, value, onChange, setError, context, ...rest }: OrderPaymentGatewayParams) => import("react/jsx-runtime").JSX.Element;
|
16
|
+
export default OrderPaymentGateway;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { FieldLeafViewParams } from './fields-view';
|
2
|
+
import { OrderData, PricingData } from '@storecraft/core/api';
|
3
|
+
export type EntryParams = {
|
4
|
+
title: string;
|
5
|
+
description?: string;
|
6
|
+
link?: string;
|
7
|
+
value: number;
|
8
|
+
context?: import('../pages/order.js').Context;
|
9
|
+
};
|
10
|
+
export type OrderPriceParams = FieldLeafViewParams<Partial<PricingData>, import('../pages/order.js').Context, OrderData> & React.ComponentProps<'div'>;
|
11
|
+
declare const OrderPrice: ({ field, context, setError, value, onChange, ...rest }: OrderPriceParams) => import("react/jsx-runtime").JSX.Element;
|
12
|
+
export default OrderPrice;
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export declare const id2ColorFulfill: (id: number) => "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 declare const id2ColorPayment: (id: number) => "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
|
+
declare const OrdersQuickSearchActions: ({ ...rest }: React.ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
|
4
|
+
export default OrdersQuickSearchActions;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
export type OverlayParams = React.ComponentProps<'div'>;
|
3
|
+
/**
|
4
|
+
* Imperative interface for public `ref` and for `useImperativeHandle`
|
5
|
+
*/
|
6
|
+
export type ImpInterface = {
|
7
|
+
show: Function;
|
8
|
+
hide: Function;
|
9
|
+
isShown: () => boolean;
|
10
|
+
};
|
11
|
+
export declare const Overlay: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<unknown>>;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
*
|
3
|
+
* @description Creates a `portal` component to bypass fixed positions in
|
4
|
+
* highly `nested`, `transformed` components
|
5
|
+
*
|
6
|
+
*/
|
7
|
+
export declare const createPortal: () => {
|
8
|
+
Portal: import('react').FC<{}>;
|
9
|
+
PortalChild: import('react').FC<{
|
10
|
+
children?: React.ReactNode;
|
11
|
+
}>;
|
12
|
+
};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { DiscountType, ProductType } from '@storecraft/core/api';
|
2
|
+
import { FieldLeafViewParams } from './fields-view';
|
3
|
+
export type ItemParams = {
|
4
|
+
/**
|
5
|
+
* `discount`
|
6
|
+
*/
|
7
|
+
value: DiscountType;
|
8
|
+
/**
|
9
|
+
* callback
|
10
|
+
*/
|
11
|
+
onClick: (value: DiscountType) => void;
|
12
|
+
};
|
13
|
+
export type ProductDiscountsParams = FieldLeafViewParams<ProductType["discounts"], import('../pages/product.jsx').Context> & React.ComponentProps<'div'>;
|
14
|
+
declare const ProductDiscounts: ({ field, context, value, onChange, setError, ...rest }: ProductDiscountsParams) => import("react/jsx-runtime").JSX.Element;
|
15
|
+
export default ProductDiscounts;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { FieldLeafViewParams } from './fields-view';
|
2
|
+
import { ProductType } from '@storecraft/core/api';
|
3
|
+
export type ItemParams = {
|
4
|
+
product: import('@storecraft/core/api').ProductType;
|
5
|
+
context: RelatedProductsParams["context"];
|
6
|
+
onRemove: () => void;
|
7
|
+
};
|
8
|
+
export type RelatedProductsParams = FieldLeafViewParams<ProductType[], import('../pages/product.jsx').Context> & React.ComponentProps<'div'>;
|
9
|
+
declare const RelatedProducts: ({ field, context, value, onChange, setError, ...rest }: RelatedProductsParams) => import("react/jsx-runtime").JSX.Element;
|
10
|
+
export default RelatedProducts;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { ProductType, VariantOption, VariantOptionSelection, VariantType } from '@storecraft/core/api';
|
2
|
+
import { FieldContextData, FieldLeafViewParams } from './fields-view';
|
3
|
+
export type ProductOptionParams = {
|
4
|
+
option: VariantOption;
|
5
|
+
onRemove: (option: VariantOption) => void;
|
6
|
+
onChange: (option: VariantOption) => void;
|
7
|
+
};
|
8
|
+
export type ProductOptionsParams = {
|
9
|
+
options: VariantOption[];
|
10
|
+
onChange: (option: VariantOption[]) => void;
|
11
|
+
};
|
12
|
+
export type VariantParams = {
|
13
|
+
options: VariantOption[];
|
14
|
+
combination: VariantOptionSelection[];
|
15
|
+
context: Context;
|
16
|
+
setError: (error: string) => void;
|
17
|
+
};
|
18
|
+
export type VariantsViewParams = {
|
19
|
+
options: VariantOption[];
|
20
|
+
context: Context;
|
21
|
+
setError: (error: string) => void;
|
22
|
+
};
|
23
|
+
export type Context = FieldContextData<VariantType & ProductType> & import('../pages/product.js').Context;
|
24
|
+
export type ProductVariantsParams = FieldLeafViewParams<VariantOption[], Context> & React.ComponentProps<'div'>;
|
25
|
+
declare const ProductVariants: ({ value, onChange, context, setError, ...rest }: ProductVariantsParams) => import("react/jsx-runtime").JSX.Element | "You have to create the product before you add variants";
|
26
|
+
export default ProductVariants;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { QuickSearchResource } from '@storecraft/core/api';
|
2
|
+
export type SearchGroupParams = {
|
3
|
+
name: string;
|
4
|
+
group: QuickSearchResource[];
|
5
|
+
/**
|
6
|
+
* The group index
|
7
|
+
*/
|
8
|
+
index: number;
|
9
|
+
/**
|
10
|
+
* The item index
|
11
|
+
*/
|
12
|
+
selectedItemIndex: number;
|
13
|
+
/**
|
14
|
+
* The item index
|
15
|
+
*/
|
16
|
+
scrollIntoView?: boolean;
|
17
|
+
onHover: (groupindex: number, itemIndex: number) => any;
|
18
|
+
onClick: (groupindex: number, itemIndex: number) => any;
|
19
|
+
};
|
20
|
+
export type QuickSearchBrowserParams = {
|
21
|
+
onCancel?: () => any;
|
22
|
+
onSelect?: (name: string, value: QuickSearchResource) => any;
|
23
|
+
};
|
24
|
+
export declare const QuickSearchButton: ({ onClick, ...rest }: React.ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
|
25
|
+
declare const QuickSearchBrowser: ({ onCancel, onSelect }: QuickSearchBrowserParams) => import("react/jsx-runtime").JSX.Element;
|
26
|
+
export default QuickSearchBrowser;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { InferQueryableType, queryable_resources } from '@storecraft/sdk-react-hooks';
|
2
|
+
import { CustomerType, ProductType } from '@storecraft/core/api';
|
3
|
+
/**
|
4
|
+
* `BrowseCollection` is used to :
|
5
|
+
* - **view** and **select** items in big collections
|
6
|
+
* - Infinite pagination
|
7
|
+
* - query and filtering with `vql` search query
|
8
|
+
* - designed to be used inside a popup modal.
|
9
|
+
*/
|
10
|
+
export type BrowseCollectionParams<RESOURCE extends queryable_resources = queryable_resources, T extends InferQueryableType<RESOURCE> = InferQueryableType<RESOURCE>> = {
|
11
|
+
resource: RESOURCE;
|
12
|
+
title?: string;
|
13
|
+
Comp?: React.FC<{
|
14
|
+
data: object;
|
15
|
+
}>;
|
16
|
+
onSave: (v: T[]) => void;
|
17
|
+
onCancel: () => void;
|
18
|
+
};
|
19
|
+
export type BrowseCustomersParams = {
|
20
|
+
onSave: (v: CustomerType[]) => void;
|
21
|
+
onCancel: () => void;
|
22
|
+
};
|
23
|
+
export type BrowseProductsParams = {
|
24
|
+
onSave: (v: ProductType[]) => void;
|
25
|
+
onCancel: () => void;
|
26
|
+
};
|
27
|
+
declare const BrowseCollection: <R extends queryable_resources = queryable_resources, T extends InferQueryableType<R> = InferQueryableType<R>>({ resource, title, Comp, onSave, onCancel }: BrowseCollectionParams<R>) => import("react/jsx-runtime").JSX.Element;
|
28
|
+
export declare const BrowseCustomers: ({ onSave, onCancel }: BrowseCustomersParams) => import("react/jsx-runtime").JSX.Element;
|
29
|
+
export declare const BrowseProducts: ({ onSave, onCancel }: BrowseProductsParams) => import("react/jsx-runtime").JSX.Element;
|
30
|
+
export default BrowseCollection;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export type ResourceTitleParams = {
|
2
|
+
resource: string;
|
3
|
+
should_onboard?: boolean;
|
4
|
+
hasLoaded?: boolean;
|
5
|
+
overallCollectionCount?: number;
|
6
|
+
};
|
7
|
+
export declare const ResourceTitle: ({ resource, should_onboard, hasLoaded, overallCollectionCount }: ResourceTitleParams) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
export default ResourceView;
|
2
1
|
export type ImpInterface = {
|
3
2
|
refresh: () => Promise<void>;
|
4
3
|
};
|
@@ -22,4 +21,5 @@ export type ResourceViewParams = {
|
|
22
21
|
* `ResourceView` lets you view and paginate big collections
|
23
22
|
* rendered in `TableSchemaView`
|
24
23
|
*/
|
25
|
-
declare const ResourceView: import('react').ForwardRefExoticComponent<ResourceViewParams & import('react').RefAttributes<
|
24
|
+
declare const ResourceView: import('react').ForwardRefExoticComponent<ResourceViewParams & import('react').RefAttributes<unknown>>;
|
25
|
+
export default ResourceView;
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { FieldLeafViewParams } from './fields-view';
|
2
|
+
export type SecretViewParams = FieldLeafViewParams<string> & React.ComponentProps<'div'>;
|
3
|
+
declare const SecretView: ({ value, field, onChange, context, setError, ...rest }: SecretViewParams) => import("react/jsx-runtime").JSX.Element;
|
4
|
+
export default SecretView;
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import { InferQueryableType, queryable_resources } from '@storecraft/sdk-react-hooks';
|
2
|
+
import { FieldLeafViewParams } from './fields-view';
|
3
|
+
import { BaseDocumentContext } from '../pages';
|
4
|
+
/**
|
5
|
+
* A simple `select` control, that fetches all documents in a `collection`,
|
6
|
+
* this is a good option for super small collections/tables such as:
|
7
|
+
* - `Shipping Methods`
|
8
|
+
* - `Collections`
|
9
|
+
* - `Posts`
|
10
|
+
* - `Discounts`
|
11
|
+
* Which will mostly have no more that 50 items each.
|
12
|
+
*
|
13
|
+
* If you need something with pagination, try `BrowseCollection` instead.
|
14
|
+
*/
|
15
|
+
export type SelectResourceParams<RESOURCE extends queryable_resources = queryable_resources, T extends InferQueryableType<RESOURCE> = InferQueryableType<RESOURCE>, TRANSFORM = T> = {
|
16
|
+
/**
|
17
|
+
* callback when selection is made (value) => any
|
18
|
+
*/
|
19
|
+
onSelect: (value: TRANSFORM) => any;
|
20
|
+
header: string;
|
21
|
+
/**
|
22
|
+
* add all sentinal
|
23
|
+
*/
|
24
|
+
add_all?: boolean;
|
25
|
+
/**
|
26
|
+
* add all sentinal
|
27
|
+
*/
|
28
|
+
layout: 0 | 1;
|
29
|
+
/**
|
30
|
+
* table identifier to query
|
31
|
+
*/
|
32
|
+
resource: RESOURCE;
|
33
|
+
/**
|
34
|
+
* number of item to query
|
35
|
+
*/
|
36
|
+
limit?: number;
|
37
|
+
className?: string;
|
38
|
+
clsHeader?: string;
|
39
|
+
clsReload?: string;
|
40
|
+
transform_fn?: (value: T[]) => TRANSFORM[];
|
41
|
+
name_fn?: (value: TRANSFORM) => string;
|
42
|
+
};
|
43
|
+
/**
|
44
|
+
* A `FieldView` `select` control with `capsules`
|
45
|
+
*/
|
46
|
+
export type SelectResourceWithTagsParams<RESOURCE extends queryable_resources = queryable_resources, T extends InferQueryableType<RESOURCE> = InferQueryableType<RESOURCE>> = {
|
47
|
+
label: string;
|
48
|
+
slug: string;
|
49
|
+
} & SelectResourceParams<RESOURCE, T> & FieldLeafViewParams<T[], BaseDocumentContext>;
|
50
|
+
/**
|
51
|
+
* picks the name from every item
|
52
|
+
*/
|
53
|
+
export declare const default_name_fn: (it: any) => any;
|
54
|
+
/**
|
55
|
+
* transform the batch of data
|
56
|
+
*/
|
57
|
+
export declare const default_transform_fn: (window: any[]) => any[];
|
58
|
+
declare const SelectResource: <RESOURCE extends queryable_resources = queryable_resources, T extends InferQueryableType<RESOURCE> = InferQueryableType<RESOURCE>, TRANSFORM = T>({ onSelect, header, resource, limit, layout, add_all, transform_fn, name_fn, className, clsHeader, clsReload, ...rest }: SelectResourceParams<RESOURCE, T, TRANSFORM>) => import("react/jsx-runtime").JSX.Element;
|
59
|
+
export default SelectResource;
|
60
|
+
/**
|
61
|
+
* A `FieldView` `select` control with `capsules`
|
62
|
+
*
|
63
|
+
* @typedef {object} InnerSelectResourceWithTagsParams
|
64
|
+
* @prop {string} label
|
65
|
+
* @prop {string} slug
|
66
|
+
*/
|
67
|
+
/**
|
68
|
+
*
|
69
|
+
* @template T
|
70
|
+
*
|
71
|
+
* @typedef {InnerSelectResourceWithTagsParams & SelectResourceParams<T> &
|
72
|
+
* import('./fields-view.jsx').FieldLeafViewParams<T[],
|
73
|
+
* import('../pages/index.jsx').BaseDocumentContext
|
74
|
+
* >} SelectResourceWithTagsParams
|
75
|
+
*
|
76
|
+
*/
|
77
|
+
/**
|
78
|
+
* A `FieldView` `select` control with `capsules`
|
79
|
+
*/
|
80
|
+
export declare const SelectResourceWithTags: <RESOURCE extends queryable_resources = queryable_resources, T extends InferQueryableType<RESOURCE> = InferQueryableType<RESOURCE>>({ field, context, value, onChange, resource, add_all, transform_fn, name_fn, slug, label, className, ...rest }: SelectResourceWithTagsParams<RESOURCE, T>) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { AuthUserType } from '@storecraft/core/api';
|
2
|
+
export type ApikeyUserParams = {
|
3
|
+
/**
|
4
|
+
* user object
|
5
|
+
*/
|
6
|
+
user: AuthUserType;
|
7
|
+
/**
|
8
|
+
* remove promise
|
9
|
+
*/
|
10
|
+
removePromise: (user: AuthUserType) => Promise<void>;
|
11
|
+
};
|
12
|
+
export declare const SettingsApiKeys: ({ ...rest }: React.ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const SettingsChangePassword: ({ ...rest }: React.ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
declare const ShowIf: ({ show, children }: {
|
3
|
+
show: any;
|
4
|
+
children: React.ReactNode;
|
5
|
+
}) => React.ReactNode;
|
6
|
+
export declare const ShowSwitch: ({ index, children, ...rest }: {
|
7
|
+
index?: number;
|
8
|
+
} & React.ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
|
9
|
+
export declare const ShowBinarySwitch: ({ toggle, children, ...rest }: {
|
10
|
+
toggle?: boolean;
|
11
|
+
} & React.ComponentProps<"div"> & {
|
12
|
+
children: React.ReactNode;
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
14
|
+
export default ShowIf;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
import { withDashDiv } from './types';
|
3
|
+
export type MenuItemType = {
|
4
|
+
name: string;
|
5
|
+
slug?: string;
|
6
|
+
icon?: React.JSX.Element;
|
7
|
+
extra?: any;
|
8
|
+
items?: MenuItemType[];
|
9
|
+
};
|
10
|
+
export type MenuType = {
|
11
|
+
items: MenuItemType[];
|
12
|
+
info: {
|
13
|
+
name?: string;
|
14
|
+
icon?: React.JSX.Element;
|
15
|
+
};
|
16
|
+
};
|
17
|
+
export type SideMenuProps = withDashDiv<{
|
18
|
+
menu: MenuType;
|
19
|
+
onCloseClick: () => void;
|
20
|
+
}>;
|
21
|
+
declare const SideMenu: ({ dash: { onCloseClick, menu: { items, info } }, className, ...rest }: SideMenuProps) => import("react/jsx-runtime").JSX.Element;
|
22
|
+
export default SideMenu;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const Splitter: ({ children, ...rest }: React.ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { FieldLeafViewParams } from './fields-view';
|
2
|
+
import { ProductType } from '@storecraft/core/api';
|
3
|
+
export type StorefrontProductsParams = FieldLeafViewParams<ProductType[], import('../pages/storefront.jsx').Context>;
|
4
|
+
/**
|
5
|
+
* `StorefrontProducts` is located at the `storefront.jsx` page.
|
6
|
+
* It consists of abutton, that opens a modal to query `products`
|
7
|
+
* with pagination and selecting them.
|
8
|
+
*
|
9
|
+
*/
|
10
|
+
declare const StorefrontProducts: ({ field, context, value, onChange }: StorefrontProductsParams) => import("react/jsx-runtime").JSX.Element;
|
11
|
+
export default StorefrontProducts;
|
@@ -1,10 +1,3 @@
|
|
1
|
-
export function TableSchemaView<T>({ context, fields, data, recordClassName, className }: {
|
2
|
-
context: any;
|
3
|
-
fields: TableSchemaViewField<T>[];
|
4
|
-
data: object[];
|
5
|
-
recordClassName?: string;
|
6
|
-
className?: string;
|
7
|
-
}): import("react").JSX.Element;
|
8
1
|
/**
|
9
2
|
* The context provided to
|
10
3
|
* components of `TableSchemaView`
|
@@ -26,7 +19,7 @@ export type Params<T> = T extends React.FC<infer P> ? P : never;
|
|
26
19
|
* The `field` parameter given to `TableSchemaView`
|
27
20
|
* components
|
28
21
|
*/
|
29
|
-
export type TableSchemaViewField<T extends
|
22
|
+
export type TableSchemaViewField<T extends any = any, Key extends Exclude<keyof T, symbol | number> = Exclude<keyof T, number | symbol>, Comp extends React.FC = React.FC> = {
|
30
23
|
/**
|
31
24
|
* Key of field in the data
|
32
25
|
*/
|
@@ -38,11 +31,11 @@ export type TableSchemaViewField<T extends unknown, Key extends Exclude<keyof T,
|
|
38
31
|
/**
|
39
32
|
* Name of field
|
40
33
|
*/
|
41
|
-
comp:
|
34
|
+
comp: Comp;
|
42
35
|
/**
|
43
36
|
* component parameters
|
44
37
|
*/
|
45
|
-
comp_params?:
|
38
|
+
comp_params?: React.ComponentProps<Comp>;
|
46
39
|
/**
|
47
40
|
* transform data
|
48
41
|
*/
|
@@ -66,3 +59,11 @@ export type TableSchemaViewComponentParams<V extends unknown, T extends unknown
|
|
66
59
|
*/
|
67
60
|
value?: V;
|
68
61
|
};
|
62
|
+
export type TableSchemaViewProps<T> = {
|
63
|
+
context: any;
|
64
|
+
fields: TableSchemaViewField<any>[];
|
65
|
+
data: object[];
|
66
|
+
recordClassName?: string;
|
67
|
+
className?: string;
|
68
|
+
};
|
69
|
+
export declare const TableSchemaView: <T>({ context, fields, data, recordClassName, className, }: TableSchemaViewProps<T>) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { FieldLeafViewParams } from './fields-view';
|
2
|
+
export type TagValuesParams = FieldLeafViewParams<string[]>;
|
3
|
+
declare const TagValues: ({ field, value, onChange, ...rest }: TagValuesParams) => import("react/jsx-runtime").JSX.Element;
|
4
|
+
export declare const values_validator: (v: any) => (string | number)[];
|
5
|
+
export default TagValues;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { SelectResourceParams } from './select-resource';
|
2
|
+
import { TagType } from '@storecraft/core/api';
|
3
|
+
import { FieldLeafViewParams } from './fields-view';
|
4
|
+
import { BaseDocumentContext } from '../pages';
|
5
|
+
export type ManualTagParams = {
|
6
|
+
onAdd: (values: string[]) => void;
|
7
|
+
} & React.ComponentProps<'div'>;
|
8
|
+
export type SelectTagsParams = Omit<SelectResourceParams<'tags', TagType, string>, 'resource' | 'transform_fn' | 'name_fn'>;
|
9
|
+
export declare const SelectTags: ({ onSelect, header, limit, layout, className, clsHeader, clsReload, ...rest }: SelectTagsParams) => import("react/jsx-runtime").JSX.Element;
|
10
|
+
export type TagsEditParams = FieldLeafViewParams<string[], BaseDocumentContext> & React.ComponentProps<'div'>;
|
11
|
+
declare const TagsEdit: ({ field, context, value, onChange, setError, ...rest }: TagsEditParams) => import("react/jsx-runtime").JSX.Element;
|
12
|
+
export default TagsEdit;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { TemplateType } from '@storecraft/core/api';
|
2
|
+
import { FieldLeafViewParams } from './fields-view';
|
3
|
+
export type TemplateExampleInputParams = FieldLeafViewParams<TemplateType["reference_example_input"]> & Omit<React.ComponentProps<'div'>, 'onChange'>;
|
4
|
+
export declare const TemplateExampleInput: ({ field, context, setError, value, onChange, ...rest }: TemplateExampleInputParams) => import("react/jsx-runtime").JSX.Element;
|
5
|
+
export default TemplateExampleInput;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
import { EditorProps } from '@monaco-editor/react';
|
3
|
+
import { FieldLeafViewParams } from './fields-view';
|
4
|
+
import { TemplateType } from '@storecraft/core/api';
|
5
|
+
export type TemplateTemplateParams = {
|
6
|
+
dash: {
|
7
|
+
editor?: {
|
8
|
+
width?: string;
|
9
|
+
height?: string;
|
10
|
+
options?: EditorProps["options"];
|
11
|
+
};
|
12
|
+
isHtml?: boolean;
|
13
|
+
defaultMode?: 0 | 1 | 2;
|
14
|
+
showLayoutSwitcher?: boolean;
|
15
|
+
};
|
16
|
+
} & FieldLeafViewParams<TemplateType["template_html" | "template_text" | 'template_subject']> & React.ComponentProps<'div'>;
|
17
|
+
export declare const TemplateTemplate: ({ field, context, setError, value, onChange, dash: { isHtml, editor, defaultMode, showLayoutSwitcher }, ...rest }: TemplateTemplateParams) => import("react/jsx-runtime").JSX.Element;
|
18
|
+
export default TemplateTemplate;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { withDashDiv } from './types';
|
2
|
+
export type TransitionParams = withDashDiv<{
|
3
|
+
show: boolean;
|
4
|
+
unMountOnExit: boolean;
|
5
|
+
duration: number;
|
6
|
+
/**
|
7
|
+
* class-names for `event`
|
8
|
+
*/
|
9
|
+
enter: string;
|
10
|
+
/**
|
11
|
+
* class-names for `event`
|
12
|
+
*/
|
13
|
+
enterFrom: string;
|
14
|
+
/**
|
15
|
+
* class-names for `event`
|
16
|
+
*/
|
17
|
+
enterTo: string;
|
18
|
+
/**
|
19
|
+
* class-names for `event`
|
20
|
+
*/
|
21
|
+
leave: string;
|
22
|
+
/**
|
23
|
+
* class-names for `event`
|
24
|
+
*/
|
25
|
+
leaveFrom: string;
|
26
|
+
/**
|
27
|
+
* class-names for `event`
|
28
|
+
*/
|
29
|
+
leaveTo: string;
|
30
|
+
}>;
|
31
|
+
declare const Transition: ({ dash: { show, duration, unMountOnExit, enter, enterFrom, enterTo, leave, leaveFrom, leaveTo, }, children, className, ...rest }: TransitionParams) => import("react/jsx-runtime").JSX.Element;
|
32
|
+
export default Transition;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
export
|
1
|
+
export declare const isSSR: boolean;
|
2
|
+
export declare const isBrowser: boolean;
|
3
|
+
export declare function create(screens: any): {
|
2
4
|
useBreakpoint: (breakpoint: any, defaultValue?: boolean) => boolean;
|
3
5
|
useBreakpointEffect: (breakpoint: any, effect: any) => any;
|
4
6
|
useBreakpointValue: (breakpoint: any, valid: any, invalid: any) => any;
|
5
7
|
};
|
6
|
-
export const isSSR: boolean;
|
7
|
-
export const isBrowser: boolean;
|
8
8
|
export default create;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { InferQueryableType, queryable_resources } from '@storecraft/sdk-react-hooks';
|
2
|
+
import { ApiQuery } from '@storecraft/core/api';
|
3
|
+
/**
|
4
|
+
* `useCollectionsActions` is a hook designed for the collections pages,
|
5
|
+
* for performing:
|
6
|
+
* - Viewing of collections
|
7
|
+
* - Pagination through querying or navigation
|
8
|
+
* - Querying
|
9
|
+
*
|
10
|
+
* This hook wraps `useCollection` hook
|
11
|
+
*
|
12
|
+
* @param resource the collection id in backend
|
13
|
+
* @param slug front end slug
|
14
|
+
* @param autoLoad
|
15
|
+
* @param autoLoadQuery
|
16
|
+
*/
|
17
|
+
declare const useCollectionsActions: <RESOURCE extends (string | queryable_resources) = queryable_resources, T extends InferQueryableType<RESOURCE> = InferQueryableType<RESOURCE>>(resource: RESOURCE, slug?: string, autoLoad?: boolean, autoLoadQuery?: ApiQuery<T>) => {
|
18
|
+
resource: RESOURCE;
|
19
|
+
query_api: ApiQuery<T>;
|
20
|
+
ref_actions: import('react').RefObject<import('../comps/collection-actions.jsx').ImperativeInterface>;
|
21
|
+
context: {
|
22
|
+
viewDocumentUrl: (id: string) => string;
|
23
|
+
editDocumentUrl: (id: string) => string;
|
24
|
+
deleteDocument: (document: string) => Promise<string>;
|
25
|
+
};
|
26
|
+
pages: T[][];
|
27
|
+
page: T[];
|
28
|
+
loading: boolean;
|
29
|
+
hasLoaded: boolean;
|
30
|
+
resource_is_probably_empty: boolean;
|
31
|
+
error: any;
|
32
|
+
queryCount: number;
|
33
|
+
actions: {
|
34
|
+
onLimitChange: ($limit: number, perform_navigation?: boolean) => ApiQuery<T>;
|
35
|
+
onReload: (perform_navigation?: boolean) => Promise<{
|
36
|
+
limit: number;
|
37
|
+
vql: string;
|
38
|
+
expand?: import('@storecraft/core/api').ExpandQuery<T>;
|
39
|
+
vqlParsed?: import("@storecraft/core/vql").VQL.AST;
|
40
|
+
sortBy?: import('@storecraft/core/api').SortCursor<T>;
|
41
|
+
order?: import('@storecraft/core/api').SortOrder;
|
42
|
+
equals?: import('@storecraft/core/api').Cursor<T>;
|
43
|
+
}>;
|
44
|
+
prev: (perform_navigation?: boolean) => Promise<ApiQuery<T>>;
|
45
|
+
next: (perform_navigation?: boolean) => Promise<ApiQuery<T>>;
|
46
|
+
};
|
47
|
+
};
|
48
|
+
export default useCollectionsActions;
|