@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
@@ -1,51 +0,0 @@
|
|
1
|
-
import { App } from '@storecraft/core';
|
2
|
-
export function BrowseCustomers({ onSave, onCancel }: BrowseCustomersParams): import("react").JSX.Element;
|
3
|
-
export function BrowseProducts({ onSave, onCancel }: BrowseProductsParams): import("react").JSX.Element;
|
4
|
-
export default BrowseCollection;
|
5
|
-
/**
|
6
|
-
* `BrowseCollection` is used to :
|
7
|
-
* - **view** and **select** items in big collections
|
8
|
-
* - Infinite pagination
|
9
|
-
* - query and filtering with `vql` search query
|
10
|
-
* - designed to be used inside a popup modal.
|
11
|
-
*/
|
12
|
-
export type BrowseCollectionParams<T extends import('@storecraft/core/api').BaseType = import('@storecraft/core/api').BaseType> = {
|
13
|
-
resource: keyof App["db"]["resources"];
|
14
|
-
title?: string;
|
15
|
-
Comp?: React.FC<{
|
16
|
-
data: object;
|
17
|
-
}>;
|
18
|
-
onSave: (v: T[]) => void;
|
19
|
-
onCancel: () => void;
|
20
|
-
};
|
21
|
-
export type BrowseCustomersParams = {
|
22
|
-
onSave: (v: import('@storecraft/core/api').CustomerType[]) => void;
|
23
|
-
onCancel: () => void;
|
24
|
-
};
|
25
|
-
export type BrowseProductsParams = {
|
26
|
-
onSave: (v: import('@storecraft/core/api').ProductType[]) => void;
|
27
|
-
onCancel: () => void;
|
28
|
-
};
|
29
|
-
/**
|
30
|
-
* `BrowseCollection` is used to :
|
31
|
-
* - **view** and **select** items in big collections
|
32
|
-
* - Infinite pagination
|
33
|
-
* - query and filtering with `vql` search query
|
34
|
-
* - designed to be used inside a popup modal.
|
35
|
-
*
|
36
|
-
* @template {import('@storecraft/core/api').BaseType} [T=import('@storecraft/core/api').BaseType]
|
37
|
-
*
|
38
|
-
*
|
39
|
-
* @typedef {object} BrowseCollectionParams
|
40
|
-
* @prop {keyof App["db"]["resources"]} resource
|
41
|
-
* @prop {string} [title]
|
42
|
-
* @prop {React.FC<{data: object}>} [Comp]
|
43
|
-
* @prop {(v: T[]) => void} onSave
|
44
|
-
* @prop {() => void} onCancel
|
45
|
-
*/
|
46
|
-
/**
|
47
|
-
* @template {import('@storecraft/core/api').BaseType} [T=import('@storecraft/core/api').BaseType]
|
48
|
-
*
|
49
|
-
* @param {BrowseCollectionParams<T>} params
|
50
|
-
*/
|
51
|
-
declare function BrowseCollection<T extends import('@storecraft/core/api').BaseType = import('@storecraft/core/api').BaseType>({ resource, title, Comp, onSave, onCancel }: BrowseCollectionParams<T>): import("react").JSX.Element;
|
@@ -1,7 +0,0 @@
|
|
1
|
-
export function ResourceTitle({ resource, should_onboard, hasLoaded, overallCollectionCount: overallCollectionCount }: ResourceTitleParams): import("react").JSX.Element;
|
2
|
-
export type ResourceTitleParams = {
|
3
|
-
resource: string;
|
4
|
-
should_onboard?: boolean;
|
5
|
-
hasLoaded?: boolean;
|
6
|
-
overallCollectionCount?: number;
|
7
|
-
};
|
@@ -1,9 +0,0 @@
|
|
1
|
-
export default SecretView;
|
2
|
-
/**
|
3
|
-
*
|
4
|
-
* @param {import('./fields-view.jsx').FieldLeafViewParams<
|
5
|
-
* string> &
|
6
|
-
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
7
|
-
* } params
|
8
|
-
*/
|
9
|
-
declare function SecretView({ value, field, onChange, context, setError, ...rest }: import('./fields-view.jsx').FieldLeafViewParams<string> & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
@@ -1,88 +0,0 @@
|
|
1
|
-
import { App } from '@storecraft/core';
|
2
|
-
export function default_name_fn(it: import('@storecraft/core/api').BaseType): any;
|
3
|
-
export function default_transform_fn(window: any[]): any[];
|
4
|
-
export default SelectResource;
|
5
|
-
export function SelectResourceWithTags<T extends import('@storecraft/core/api').BaseType>({ field, context, value, onChange, resource, add_all, transform_fn, name_fn, slug, label, className, ...rest }: SelectResourceWithTagsParams<T>): import("react").JSX.Element;
|
6
|
-
/**
|
7
|
-
* A simple `select` control, that fetches all documents in a `collection`,
|
8
|
-
* this is a good option for super small collections/tables such as:
|
9
|
-
* - `Shipping Methods`
|
10
|
-
* - `Collections`
|
11
|
-
* - `Posts`
|
12
|
-
* - `Discounts`
|
13
|
-
* Which will mostly have no more that 50 items each.
|
14
|
-
*
|
15
|
-
* If you need something with pagination, try `BrowseCollection` instead.
|
16
|
-
*/
|
17
|
-
export type SelectResourceParams<T, TRANSFORM = T> = {
|
18
|
-
/**
|
19
|
-
* callback when selection is made (value) => any
|
20
|
-
*/
|
21
|
-
onSelect: (value: TRANSFORM) => any;
|
22
|
-
header: string;
|
23
|
-
/**
|
24
|
-
* add all sentinal
|
25
|
-
*/
|
26
|
-
add_all?: boolean;
|
27
|
-
/**
|
28
|
-
* add all sentinal
|
29
|
-
*/
|
30
|
-
layout: 0 | 1;
|
31
|
-
/**
|
32
|
-
* table identifier to query
|
33
|
-
*/
|
34
|
-
resource: keyof App["db"]["resources"];
|
35
|
-
/**
|
36
|
-
* number of item to query
|
37
|
-
*/
|
38
|
-
limit?: number;
|
39
|
-
className?: string;
|
40
|
-
clsHeader?: string;
|
41
|
-
clsReload?: string;
|
42
|
-
transform_fn?: (value: T[]) => TRANSFORM[];
|
43
|
-
name_fn?: (value: TRANSFORM) => string;
|
44
|
-
};
|
45
|
-
/**
|
46
|
-
* A `FieldView` `select` control with `capsules`
|
47
|
-
*/
|
48
|
-
export type InnerSelectResourceWithTagsParams = {
|
49
|
-
label: string;
|
50
|
-
slug: string;
|
51
|
-
};
|
52
|
-
export type SelectResourceWithTagsParams<T> = InnerSelectResourceWithTagsParams & SelectResourceParams<T> & import('./fields-view.jsx').FieldLeafViewParams<T[], import('../pages/index.jsx').BaseDocumentContext>;
|
53
|
-
/**
|
54
|
-
* A simple `select` control, that fetches all documents in a `collection`,
|
55
|
-
* this is a good option for super small collections/tables such as:
|
56
|
-
* - `Shipping Methods`
|
57
|
-
* - `Collections`
|
58
|
-
* - `Posts`
|
59
|
-
* - `Discounts`
|
60
|
-
* Which will mostly have no more that 50 items each.
|
61
|
-
*
|
62
|
-
* If you need something with pagination, try `BrowseCollection` instead.
|
63
|
-
*
|
64
|
-
* @template T
|
65
|
-
* @template [TRANSFORM=T]
|
66
|
-
*
|
67
|
-
* @typedef {object} SelectResourceParams
|
68
|
-
* @property {(value: TRANSFORM) => any} onSelect callback when selection is made (value) => any
|
69
|
-
* @property {string} header
|
70
|
-
* @property {boolean} [add_all] add all sentinal
|
71
|
-
* @property {0 | 1} layout add all sentinal
|
72
|
-
* @property {keyof App["db"]["resources"]} resource table identifier to query
|
73
|
-
* @property {number} [limit] number of item to query
|
74
|
-
* @property {string} [className]
|
75
|
-
* @property {string} [clsHeader]
|
76
|
-
* @property {string} [clsReload]
|
77
|
-
* @property {(value: T[]) => TRANSFORM[]} [transform_fn]
|
78
|
-
* @property {(value: TRANSFORM) => string} [name_fn]
|
79
|
-
*/
|
80
|
-
/**
|
81
|
-
*
|
82
|
-
* @template T
|
83
|
-
* @template [TRANSFORM=T]
|
84
|
-
*
|
85
|
-
* @param {SelectResourceParams<T, TRANSFORM>} params
|
86
|
-
*
|
87
|
-
*/
|
88
|
-
declare function SelectResource<T, TRANSFORM = T>({ onSelect, header, resource, limit, layout, add_all, transform_fn, name_fn, className, clsHeader, clsReload, ...rest }: SelectResourceParams<T, TRANSFORM>): import("react").JSX.Element;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
export default StorageSettingsView;
|
2
|
-
export type StorageProvider = {
|
3
|
-
key: string;
|
4
|
-
name: string;
|
5
|
-
select_comp: any;
|
6
|
-
config_comp: any;
|
7
|
-
};
|
8
|
-
/**
|
9
|
-
*
|
10
|
-
* @param {object} param0
|
11
|
-
* @param {StorageSettings} param0.value
|
12
|
-
*/
|
13
|
-
declare function StorageSettingsView({ field, value, onChange, className, ...rest }: {
|
14
|
-
value: StorageSettings;
|
15
|
-
}): import("react").JSX.Element;
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import { default as React } from 'react';
|
2
|
-
export function ShowSwitch({ index, children, ...rest }: ShowSwitchParams): React.JSX.Element;
|
3
|
-
export function ShowBinarySwitch({ toggle, children, ...rest }: InternalShowBinarySwitchParams & ShowSwitchParams): React.JSX.Element;
|
4
|
-
export default ShowIf;
|
5
|
-
export type ShowIfParams = {
|
6
|
-
show: any;
|
7
|
-
children: React.ReactNode;
|
8
|
-
};
|
9
|
-
export type internalShowSwitchParams = {
|
10
|
-
index?: number;
|
11
|
-
};
|
12
|
-
export type ShowSwitchParams = internalShowSwitchParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
13
|
-
export type InternalShowBinarySwitchParams = {
|
14
|
-
toggle?: any;
|
15
|
-
};
|
16
|
-
/**
|
17
|
-
*
|
18
|
-
* @typedef {object} ShowIfParams
|
19
|
-
* @prop {any} show
|
20
|
-
* @prop {React.ReactNode} children
|
21
|
-
*
|
22
|
-
*
|
23
|
-
* @param {ShowIfParams} params
|
24
|
-
*/
|
25
|
-
declare function ShowIf({ show, children }: ShowIfParams): React.ReactNode;
|
@@ -1,50 +0,0 @@
|
|
1
|
-
import { default as React } from 'react';
|
2
|
-
export default SideMenu;
|
3
|
-
export type MenuItemType = {
|
4
|
-
name: string;
|
5
|
-
slug?: string;
|
6
|
-
icon?: React.JSX.Element;
|
7
|
-
extra?: object;
|
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 InnerSideMenuParams = {
|
18
|
-
menu: MenuType;
|
19
|
-
onCloseClick: () => void;
|
20
|
-
};
|
21
|
-
/**
|
22
|
-
*
|
23
|
-
* @typedef {object} MenuItemType
|
24
|
-
* @prop {string} name
|
25
|
-
* @prop {string} [slug]
|
26
|
-
* @prop {React.JSX.Element} [icon]
|
27
|
-
* @prop {object} [extra]
|
28
|
-
* @prop {MenuItemType[]} [items]
|
29
|
-
*
|
30
|
-
*
|
31
|
-
* @typedef {object} MenuType
|
32
|
-
* @prop {MenuItemType[]} items
|
33
|
-
* @prop {object} info
|
34
|
-
* @prop {string} [info.name]
|
35
|
-
* @prop {React.JSX.Element} [info.icon]
|
36
|
-
*
|
37
|
-
*/
|
38
|
-
/**
|
39
|
-
*
|
40
|
-
* @typedef {object} InnerSideMenuParams
|
41
|
-
* @prop {MenuType} menu
|
42
|
-
* @prop {() => void} onCloseClick
|
43
|
-
*
|
44
|
-
*
|
45
|
-
* @param {InnerSideMenuParams &
|
46
|
-
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
47
|
-
* } params
|
48
|
-
*
|
49
|
-
*/
|
50
|
-
declare function SideMenu({ className, onCloseClick, menu: { items, info } }: InnerSideMenuParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): React.JSX.Element;
|
@@ -1 +0,0 @@
|
|
1
|
-
export function Splitter({ children, ...rest }: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
@@ -1,12 +0,0 @@
|
|
1
|
-
export default StorefrontProducts;
|
2
|
-
/**
|
3
|
-
* `StorefrontProducts` is located at the `storefront.jsx` page.
|
4
|
-
* It consists of abutton, that opens a modal to query `products`
|
5
|
-
* with pagination and selecting them.
|
6
|
-
*
|
7
|
-
* @param {import('./fields-view.jsx').FieldLeafViewParams<
|
8
|
-
* import('@storecraft/core/api').ProductType[],
|
9
|
-
* import('../pages/storefront.jsx').Context>} params
|
10
|
-
*
|
11
|
-
*/
|
12
|
-
declare function StorefrontProducts({ field, context, value, onChange }: import('./fields-view.jsx').FieldLeafViewParams<import('@storecraft/core/api').ProductType[], import('../pages/storefront.jsx').Context>): import("react").JSX.Element;
|
@@ -1,9 +0,0 @@
|
|
1
|
-
export function values_validator(v: any): (string | number)[];
|
2
|
-
export default TagValues;
|
3
|
-
/**
|
4
|
-
*
|
5
|
-
* @param {import("./fields-view.jsx").FieldLeafViewParams<
|
6
|
-
* string[]>
|
7
|
-
* } params
|
8
|
-
*/
|
9
|
-
declare function TagValues({ field, value, onChange, ...rest }: import('./fields-view.jsx').FieldLeafViewParams<string[]>): import("react").JSX.Element;
|
@@ -1,13 +0,0 @@
|
|
1
|
-
export function SelectTags({ onSelect, header, limit, layout, className, clsHeader, clsReload, ...rest }: Omit<import('./select-resource.jsx').SelectResourceParams<import('@storecraft/core/api').TagType, string>, "resource" | "transform_fn" | "name_fn">): import("react").JSX.Element;
|
2
|
-
export default TagsEdit;
|
3
|
-
export type InternalManualTagParams = {
|
4
|
-
onAdd: (values: string[]) => void;
|
5
|
-
};
|
6
|
-
/**
|
7
|
-
*
|
8
|
-
* @param {import("./fields-view.jsx").FieldLeafViewParams<string[],
|
9
|
-
* import("../pages/index.jsx").BaseDocumentContext> &
|
10
|
-
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
11
|
-
* } param0
|
12
|
-
*/
|
13
|
-
declare function TagsEdit({ field, context, value, onChange, setError, ...rest }: import('./fields-view.jsx').FieldLeafViewParams<string[], import('../pages/index.jsx').BaseDocumentContext> & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
@@ -1,3 +0,0 @@
|
|
1
|
-
export function TemplateExampleInput({ field, context, setError, value, onChange, ...rest }: TemplateTemplateParams & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "onChange">): import("react").JSX.Element;
|
2
|
-
export default TemplateExampleInput;
|
3
|
-
export type TemplateTemplateParams = import('./fields-view.jsx').FieldLeafViewParams<import('@storecraft/core/api').TemplateType["reference_example_input"]>;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
export function TemplateTemplate({ field, context, setError, value, onChange, isHtml, editor, defaultMode, showLayoutSwitcher, ...rest }: TemplateTemplateParams & Omit<React.ComponentProps<"div">, "onChange"> & {
|
2
|
-
editor?: {
|
3
|
-
width?: string;
|
4
|
-
height?: string;
|
5
|
-
options?: import('@monaco-editor/react').EditorProps["options"];
|
6
|
-
};
|
7
|
-
isHtml?: boolean;
|
8
|
-
defaultMode?: 0 | 1 | 2;
|
9
|
-
showLayoutSwitcher?: boolean;
|
10
|
-
}): import("react").JSX.Element;
|
11
|
-
export default TemplateTemplate;
|
12
|
-
export type DangerousHTMLViewParams = {
|
13
|
-
value?: string | TrustedHTML;
|
14
|
-
};
|
15
|
-
export type TemplateTemplateParams = import('./fields-view.jsx').FieldLeafViewParams<import('@storecraft/core/api').TemplateType["template_html" | "template_text" | "template_subject"]>;
|
@@ -1,51 +0,0 @@
|
|
1
|
-
export default Transition;
|
2
|
-
export type InnerTransitionParams = {
|
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
|
-
/**
|
32
|
-
*
|
33
|
-
* @typedef {object} InnerTransitionParams
|
34
|
-
* @prop {boolean} show
|
35
|
-
* @prop {boolean} unMountOnExit
|
36
|
-
* @prop {number} duration
|
37
|
-
* @prop {string} enter class-names for `event`
|
38
|
-
* @prop {string} enterFrom class-names for `event`
|
39
|
-
* @prop {string} enterTo class-names for `event`
|
40
|
-
* @prop {string} leave class-names for `event`
|
41
|
-
* @prop {string} leaveFrom class-names for `event`
|
42
|
-
* @prop {string} leaveTo class-names for `event`
|
43
|
-
*
|
44
|
-
*
|
45
|
-
*
|
46
|
-
* @param {InnerTransitionParams &
|
47
|
-
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
48
|
-
* } params
|
49
|
-
*
|
50
|
-
*/
|
51
|
-
declare function Transition({ show, duration, unMountOnExit, enter, enterFrom, enterTo, leave, leaveFrom, leaveTo, children, className, ...rest }: InnerTransitionParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
@@ -1,43 +0,0 @@
|
|
1
|
-
import { queryable_resources, InferQueryableType } from '@storecraft/sdk-react-hooks';
|
2
|
-
import { ApiQuery } from '@storecraft/core/api';
|
3
|
-
export default useCollectionsActions;
|
4
|
-
/**
|
5
|
-
* `useCollectionsActions` is a hook designed for the collections pages,
|
6
|
-
* for performing:
|
7
|
-
* - Viewing of collections
|
8
|
-
* - Pagination through querying or navigation
|
9
|
-
* - Querying
|
10
|
-
*
|
11
|
-
* This hook wraps `useCollection` hook
|
12
|
-
*
|
13
|
-
* @template {string | queryable_resources} [RESOURCE=(queryable_resources)]
|
14
|
-
* @template {InferQueryableType<RESOURCE>} [T=(InferQueryableType<RESOURCE>)]
|
15
|
-
*
|
16
|
-
* @param {RESOURCE} resource the collection id in backend
|
17
|
-
* @param {string} [slug] front end slug
|
18
|
-
* @param {boolean} [autoLoad=true]
|
19
|
-
* @param {ApiQuery<T>} [autoLoadQuery=q_initial]
|
20
|
-
*/
|
21
|
-
declare function useCollectionsActions<RESOURCE extends string | queryable_resources = queryable_resources, T extends InferQueryableType<RESOURCE> = InferQueryableType<RESOURCE>>(resource: RESOURCE, slug?: string, autoLoad?: boolean, autoLoadQuery?: ApiQuery<T>): {
|
22
|
-
resource: RESOURCE;
|
23
|
-
query_api: ApiQuery<T>;
|
24
|
-
ref_actions: import('react').MutableRefObject<import('../comps/collection-actions.jsx').ImperativeInterface>;
|
25
|
-
context: {
|
26
|
-
viewDocumentUrl: (id: string) => string;
|
27
|
-
editDocumentUrl: (id: string) => string;
|
28
|
-
deleteDocument: (document: string) => Promise<string>;
|
29
|
-
};
|
30
|
-
pages: T[][];
|
31
|
-
page: T[];
|
32
|
-
loading: boolean;
|
33
|
-
hasLoaded: boolean;
|
34
|
-
resource_is_probably_empty: boolean;
|
35
|
-
error: any;
|
36
|
-
queryCount: number;
|
37
|
-
actions: {
|
38
|
-
onLimitChange: ($limit: number, perform_navigation?: boolean) => ApiQuery<T>;
|
39
|
-
onReload: (perform_navigation?: boolean) => Promise<ApiQuery<T>>;
|
40
|
-
prev: (perform_navigation?: boolean) => Promise<ApiQuery<T>>;
|
41
|
-
next: (perform_navigation?: boolean) => Promise<ApiQuery<T>>;
|
42
|
-
};
|
43
|
-
};
|
@@ -1,37 +0,0 @@
|
|
1
|
-
import { App } from '@storecraft/core';
|
2
|
-
export function useDocumentActions<T>(resource: (keyof App["db"]["resources"] | "payments/gateways" | "extensions"), document: string, slug: string, mode?: DocumentActionsMode, base?: string): {
|
3
|
-
actions: {
|
4
|
-
reloadPromise: (try_cache?: boolean) => Promise<void>;
|
5
|
-
reload_hard: import('react').MutableRefObject<(try_cache?: boolean) => Promise<T>>;
|
6
|
-
savePromise: () => Promise<T>;
|
7
|
-
deletePromise: () => Promise<string>;
|
8
|
-
duplicate: (state_next_extra?: Partial<T>) => Promise<void>;
|
9
|
-
navWithState: (to: import('react-router').To, current_state?: (() => any) | any, next_state?: (() => any) | any) => void;
|
10
|
-
reload: (try_cache?: boolean) => Promise<T>;
|
11
|
-
setError: import('react').Dispatch<any>;
|
12
|
-
};
|
13
|
-
error: any;
|
14
|
-
key: string;
|
15
|
-
ref_head: import('react').MutableRefObject<import('../comps/common-ui.jsx').CreateDateImperativeInterface>;
|
16
|
-
ref_root: import('react').MutableRefObject<import('../comps/fields-view.jsx').FieldViewImperativeInterface<T>>;
|
17
|
-
doc: T;
|
18
|
-
sdk: import('@storecraft/sdk').StorecraftSDK;
|
19
|
-
isEditMode: boolean;
|
20
|
-
isCreateMode: boolean;
|
21
|
-
isViewMode: boolean;
|
22
|
-
op: import('@storecraft/sdk-react-hooks').Op;
|
23
|
-
loading: boolean;
|
24
|
-
hasChanged: any;
|
25
|
-
hasLoaded: boolean;
|
26
|
-
context: import('../pages/index.jsx').BaseDocumentContext<{
|
27
|
-
hasChanged?: boolean;
|
28
|
-
data?: T;
|
29
|
-
}>;
|
30
|
-
};
|
31
|
-
/**
|
32
|
-
* This `type` will give you the return type of the hook
|
33
|
-
*/
|
34
|
-
export type HookReturnType<T> = Omit<ReturnType<typeof useDocumentActions<T>>, "doc"> & {
|
35
|
-
doc: T;
|
36
|
-
};
|
37
|
-
export type DocumentActionsMode = "edit" | "view" | "create";
|
@@ -1,13 +0,0 @@
|
|
1
|
-
export default useInterval;
|
2
|
-
/**
|
3
|
-
*
|
4
|
-
* @param {(count: number)=>void} cb
|
5
|
-
* @param {number} [millis=5000]
|
6
|
-
* @param {boolean} [autoStart=true]
|
7
|
-
* @param {number} [runCount=Number.POSITIVE_INFINITY]
|
8
|
-
* can be a finite integer or `Number.POSITIVE_INFINITY`
|
9
|
-
*/
|
10
|
-
declare function useInterval(cb: (count: number) => void, millis?: number, autoStart?: boolean, runCount?: number): {
|
11
|
-
start: () => void;
|
12
|
-
stop: () => void;
|
13
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
export function useMounted(): () => boolean;
|
@@ -1,26 +0,0 @@
|
|
1
|
-
export function LinkWithState({ to, current_state, next_state, onClick, ...rest }: Params & import('react').AnchorHTMLAttributes<any>): import("react").JSX.Element;
|
2
|
-
export default useNavigateWithState;
|
3
|
-
export type Params = {
|
4
|
-
to: import('react-router-dom').To;
|
5
|
-
/**
|
6
|
-
* object or function
|
7
|
-
*/
|
8
|
-
current_state: () => any | object;
|
9
|
-
/**
|
10
|
-
* object or function
|
11
|
-
*/
|
12
|
-
next_state?: () => any | object;
|
13
|
-
/**
|
14
|
-
* callback
|
15
|
-
*/
|
16
|
-
onClick?: () => any;
|
17
|
-
};
|
18
|
-
/**
|
19
|
-
* A hook that navigates, BUT saves the state of the current
|
20
|
-
*/
|
21
|
-
declare function useNavigateWithState(): {
|
22
|
-
nav: import('react-router-dom').NavigateFunction;
|
23
|
-
navWithState: (to: import('react-router-dom').To, current_state?: (() => any) | any, next_state?: (() => any) | any) => void;
|
24
|
-
location: import('react-router-dom').Location<any>;
|
25
|
-
state: any;
|
26
|
-
};
|