@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
@@ -0,0 +1,60 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
import { CustomerType, DiscountType, Filter, FilterValue_o_date_in_range, FilterValue_o_items_count_in_range, FilterValue_o_subtotal_in_range, FilterValue_p_in_collections, FilterValue_p_in_price_range, FilterValue_p_in_products, FilterValue_p_in_tags } from '@storecraft/core/api';
|
3
|
+
import { FieldLeafViewParams } from './fields-view.js';
|
4
|
+
export type Filter_ProductInCollectionsParams = {
|
5
|
+
value: FilterValue_p_in_collections;
|
6
|
+
onChange: (filter_value: FilterValue_p_in_collections) => void;
|
7
|
+
context: import('../pages/discount.js').Context;
|
8
|
+
};
|
9
|
+
export type Filter_ProductHasTagsParams = {
|
10
|
+
value: FilterValue_p_in_tags;
|
11
|
+
onChange: (filter_value: FilterValue_p_in_tags) => void;
|
12
|
+
context: import('../pages/discount.js').Context;
|
13
|
+
};
|
14
|
+
export type Filter_ProductHasHandleParams = {
|
15
|
+
value: FilterValue_p_in_products;
|
16
|
+
onChange: (filter_value: FilterValue_p_in_products) => void;
|
17
|
+
context: import('../pages/discount.js').Context;
|
18
|
+
};
|
19
|
+
export type Filter_ProductPriceInRangeParams = {
|
20
|
+
value: FilterValue_p_in_price_range;
|
21
|
+
onChange: (filter_value: FilterValue_p_in_price_range) => void;
|
22
|
+
};
|
23
|
+
export type Filter_OrderSubTotalParams = {
|
24
|
+
value: FilterValue_o_subtotal_in_range;
|
25
|
+
onChange: (filter_value: FilterValue_o_subtotal_in_range) => void;
|
26
|
+
};
|
27
|
+
export type Filter_OrderItemCountParams = {
|
28
|
+
value?: FilterValue_o_items_count_in_range;
|
29
|
+
onChange: (filter_value: FilterValue_o_items_count_in_range) => void;
|
30
|
+
};
|
31
|
+
export type Filter_OrderDateParams = {
|
32
|
+
onChange: (value: FilterValue_o_date_in_range) => void;
|
33
|
+
value?: FilterValue_o_date_in_range;
|
34
|
+
};
|
35
|
+
export type Filter_OrderHasCustomersParams = {
|
36
|
+
onChange: (value: CustomerType[]) => void;
|
37
|
+
value: CustomerType[];
|
38
|
+
context: import('../pages/discount.js').Context;
|
39
|
+
};
|
40
|
+
export type ProductFilterContainerParams = {
|
41
|
+
name: string;
|
42
|
+
value: Filter["value"];
|
43
|
+
Comp: any;
|
44
|
+
CompParams: any;
|
45
|
+
type: Filter["meta"]["type"];
|
46
|
+
onChange: (value: Filter["value"]) => void;
|
47
|
+
onRemove: () => void;
|
48
|
+
ix: number;
|
49
|
+
context: import('../pages/discount.js').Context;
|
50
|
+
} & React.ComponentProps<'div'>;
|
51
|
+
export type AddFilterParams = {
|
52
|
+
type: string;
|
53
|
+
onAdd: (filter_id: string | number) => void;
|
54
|
+
};
|
55
|
+
export type DiscountFiltersParams = FieldLeafViewParams<Filter[], import('../pages/discount.js').Context, DiscountType> & React.ComponentProps<'div'> & {
|
56
|
+
types: ("product" | "order")[];
|
57
|
+
};
|
58
|
+
export declare const discount_filters_validator: (v: Filter["meta"][]) => (string | boolean)[];
|
59
|
+
declare const DiscountFilters: ({ value, onChange, types, context, ...rest }: DiscountFiltersParams) => import("react/jsx-runtime").JSX.Element;
|
60
|
+
export default DiscountFilters;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { FieldLeafViewParams } from './fields-view';
|
2
|
+
import { DiscountType } from '@storecraft/core/api';
|
3
|
+
export type DiscountPerformanceParams = FieldLeafViewParams<undefined, import('../pages/discount.js').Context, DiscountType> & React.ComponentProps<'div'>;
|
4
|
+
declare const DiscountPerformance: ({ field, context, error, setError, ...rest }: DiscountPerformanceParams) => import("react/jsx-runtime").JSX.Element;
|
5
|
+
export default DiscountPerformance;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { DiscountType } from '@storecraft/core/api';
|
2
|
+
import { TableSchemaViewContext } from './table-schema-view';
|
3
|
+
export type CodeParams = {
|
4
|
+
value: string;
|
5
|
+
context: TableSchemaViewContext<DiscountType>;
|
6
|
+
};
|
7
|
+
declare const Code: ({ value, context, ...rest }: CodeParams) => import("react/jsx-runtime").JSX.Element;
|
8
|
+
export default Code;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { DiscountDetails } from '@storecraft/core/api';
|
2
|
+
import { TableSchemaViewComponentParams } from './table-schema-view';
|
3
|
+
export declare const discount_types_to_color: (type: DiscountDetails["meta"]["type"]) => "bg-kf-400 dark:bg-kf-400/40" | "bg-red-400 dark:bg-red-400/40" | "bg-teal-600 dark:bg-teal-600/40" | "bg-cyan-500 dark:bg-cyan-500/40" | "bg-sky-500 dark:bg-sky-400/40" | "bg-slate-400 dark:bg-slate-400/20";
|
4
|
+
export type DiscountTypeParams = TableSchemaViewComponentParams<DiscountDetails["meta"]>;
|
5
|
+
declare const DiscountType: ({ value, ...rest }: DiscountTypeParams) => import("react/jsx-runtime").JSX.Element;
|
6
|
+
export default DiscountType;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export type RegularDocumentActionsParams = {
|
2
|
+
onClickSave?: () => Promise<any>;
|
3
|
+
onClickCreate?: () => Promise<any>;
|
4
|
+
onClickDuplicate?: () => Promise<any>;
|
5
|
+
onClickDelete?: (id: string) => Promise<any>;
|
6
|
+
onClickReload?: () => Promise<any>;
|
7
|
+
children?: React.ReactNode;
|
8
|
+
id?: string;
|
9
|
+
} & React.ComponentProps<'div'>;
|
10
|
+
export declare const RegularDocumentActions: ({ onClickSave, onClickCreate, onClickDelete, onClickDuplicate, onClickReload, id, children, ...rest }: RegularDocumentActionsParams) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export type DocumentDetailsParams = {
|
2
|
+
doc: import('@storecraft/core/api').BaseType;
|
3
|
+
collectionId: string;
|
4
|
+
className?: string;
|
5
|
+
} & React.ComponentProps<'div'>;
|
6
|
+
declare const DocumentDetails: ({ doc, collectionId, className, ...rest }: DocumentDetailsParams) => import("react/jsx-runtime").JSX.Element;
|
7
|
+
export default DocumentDetails;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export type DocumentTitleParams = {
|
2
|
+
major?: string[];
|
3
|
+
delimiter?: string;
|
4
|
+
className?: string;
|
5
|
+
} & React.ComponentProps<'div'>;
|
6
|
+
declare const DocumentTitle: ({ major, delimiter, className, ...rest }: DocumentTitleParams) => import("react/jsx-runtime").JSX.Element;
|
7
|
+
export default DocumentTitle;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* error message view from document pages
|
3
|
+
*/
|
4
|
+
export type EditMessageParams = {
|
5
|
+
error?: import('@storecraft/core/api').error;
|
6
|
+
positive?: boolean;
|
7
|
+
className?: string;
|
8
|
+
} & React.ComponentProps<'div'>;
|
9
|
+
/**
|
10
|
+
* Easily `format` errors coming from the `storecraft` backend
|
11
|
+
*
|
12
|
+
*/
|
13
|
+
export declare const format_storecraft_errors: (error: import('@storecraft/core/api').error) => string[];
|
14
|
+
/**
|
15
|
+
* error message view from document pages
|
16
|
+
*/
|
17
|
+
declare const ErrorMessage: ({ error, positive, className, ...rest }: EditMessageParams) => import("react/jsx-runtime").JSX.Element;
|
18
|
+
export default ErrorMessage;
|
@@ -1,11 +1,19 @@
|
|
1
1
|
import { default as React } from 'react';
|
2
|
-
export const EVENT_CHANGE
|
3
|
-
export const EVENT_REFRESH
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
export declare const EVENT_CHANGE = "pubsub.on_change";
|
3
|
+
export declare const EVENT_REFRESH = "pubsub.on_refresh";
|
4
|
+
type PubSubSubscriber = (event: string, value?: any) => void;
|
5
|
+
declare class PubSub {
|
6
|
+
_subscribers: Set<PubSubSubscriber>;
|
7
|
+
constructor();
|
8
|
+
add_sub: (cb: PubSubSubscriber) => () => void;
|
9
|
+
dispatch: (event: any, data?: any) => void;
|
10
|
+
}
|
11
|
+
export declare const pubsub: PubSub;
|
12
|
+
export type FieldData<PROPS extends any = any> = {
|
7
13
|
type?: string;
|
8
14
|
key?: string;
|
15
|
+
validate?: boolean;
|
16
|
+
editable?: boolean;
|
9
17
|
running_key?: string;
|
10
18
|
defaultValue?: any;
|
11
19
|
name?: string;
|
@@ -13,15 +21,16 @@ export type FieldData = {
|
|
13
21
|
/**
|
14
22
|
* nested fields
|
15
23
|
*/
|
16
|
-
fields?: FieldData[];
|
24
|
+
fields?: FieldData<any>[];
|
17
25
|
/**
|
18
26
|
* a react component
|
19
27
|
*/
|
20
|
-
comp?: React.
|
28
|
+
comp?: React.FC<PROPS>;
|
29
|
+
comp2?: React.FC<PROPS & FieldLeafViewParams<any> & Partial<React.ComponentProps<'div'>>>;
|
21
30
|
/**
|
22
31
|
* params for comp
|
23
32
|
*/
|
24
|
-
comp_params?:
|
33
|
+
comp_params?: PROPS;
|
25
34
|
};
|
26
35
|
export type FieldContextData<D extends unknown = {}> = {
|
27
36
|
/**
|
@@ -42,8 +51,8 @@ export type FieldContextData<D extends unknown = {}> = {
|
|
42
51
|
}>;
|
43
52
|
};
|
44
53
|
/**
|
45
|
-
|
46
|
-
|
54
|
+
* Root view params
|
55
|
+
*/
|
47
56
|
export type FieldViewParams<O extends unknown = {}, C extends unknown = {}> = {
|
48
57
|
/**
|
49
58
|
* running key for leafs
|
@@ -67,9 +76,9 @@ export type FieldNodeViewParams<V extends unknown = any, C extends {} = {}, O ex
|
|
67
76
|
isViewMode: boolean;
|
68
77
|
};
|
69
78
|
/**
|
70
|
-
|
71
|
-
|
72
|
-
|
79
|
+
* Every view in the `fields-view` schema will be injected with
|
80
|
+
* the following parameters
|
81
|
+
*/
|
73
82
|
export type FieldLeafViewParams<V, C = {}, O = {}> = {
|
74
83
|
field?: FieldData;
|
75
84
|
value?: V;
|
@@ -91,17 +100,5 @@ export type FieldViewImperativeInterface<T> = {
|
|
91
100
|
};
|
92
101
|
};
|
93
102
|
};
|
94
|
-
declare
|
95
|
-
|
96
|
-
notify_subscribers: () => void;
|
97
|
-
/**
|
98
|
-
* @param {(event: string, value: any) => void} cb
|
99
|
-
*/
|
100
|
-
add_sub: (cb: (event: string, value: any) => void) => () => void;
|
101
|
-
/**
|
102
|
-
* @param {string} event
|
103
|
-
* @param {any} data
|
104
|
-
*/
|
105
|
-
dispatch: (event: string, data: any) => void;
|
106
|
-
}
|
107
|
-
declare const FieldsView: React.ForwardRefExoticComponent<FieldViewParams<unknown, {}> & React.RefAttributes<any>>;
|
103
|
+
declare const FieldsView: React.ForwardRefExoticComponent<FieldViewParams<unknown, unknown> & React.RefAttributes<unknown>>;
|
104
|
+
export default FieldsView;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const GradientText: ({ className, ...rest }: React.ComponentProps<"span">) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export type HeaderParams = {
|
2
|
+
label?: string;
|
3
|
+
Icon?: import('react').FC<{
|
4
|
+
className?: string;
|
5
|
+
}>;
|
6
|
+
className?: string;
|
7
|
+
iconClassName?: string;
|
8
|
+
} & React.ComponentProps<'div'>;
|
9
|
+
declare const Header: ({ label, Icon, className, iconClassName, ...rest }: HeaderParams) => import("react/jsx-runtime").JSX.Element;
|
10
|
+
export default Header;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { OrdersStatisticsEntity } from '@storecraft/core/api';
|
2
|
+
export type HomeInfoCapsuleParams = {
|
3
|
+
label: string;
|
4
|
+
value: string;
|
5
|
+
} & React.ComponentProps<'div'>;
|
6
|
+
export type stat_entity_fn<V> = (k: string, v: OrdersStatisticsEntity) => V;
|
7
|
+
export type HomeTopSoldCardParams = {
|
8
|
+
data: [string, OrdersStatisticsEntity][];
|
9
|
+
label_prefix?: string;
|
10
|
+
label?: string;
|
11
|
+
linkFn: stat_entity_fn<string>;
|
12
|
+
valFn?: stat_entity_fn<number>;
|
13
|
+
labelFn?: stat_entity_fn<string>;
|
14
|
+
} & React.ComponentProps<'div'>;
|
15
|
+
export type HomePerformanceParams = {
|
16
|
+
nada?: object;
|
17
|
+
} & React.ComponentProps<'div'>;
|
18
|
+
declare const Performance: ({ ...rest }: HomePerformanceParams) => import("react/jsx-runtime").JSX.Element;
|
19
|
+
export default Performance;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { BaseChartViewParams } from './base-chart-view';
|
2
|
+
import { OrdersStatisticsType } from '@storecraft/core/api';
|
3
|
+
export type SalesChartParams = {
|
4
|
+
data: OrdersStatisticsType;
|
5
|
+
} & React.ComponentProps<'div'>;
|
6
|
+
export declare const ChartToolTip: BaseChartViewParams["config"]["tooltip"]["component"];
|
7
|
+
declare const SalesChart: ({ data, ...rest }: SalesChartParams) => import("react/jsx-runtime").JSX.Element;
|
8
|
+
export default SalesChart;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { default as Statistics } from '@storecraft/sdk/src/statistics';
|
2
|
+
export type StatCardParams = {
|
3
|
+
which_table: Parameters<Statistics["countOf"]>["0"];
|
4
|
+
msg: string;
|
5
|
+
link: string;
|
6
|
+
search?: string;
|
7
|
+
Icon?: React.ReactElement;
|
8
|
+
};
|
9
|
+
declare const StatCard: ({ which_table, msg, link, search, Icon }: StatCardParams) => import("react/jsx-runtime").JSX.Element;
|
10
|
+
export default StatCard;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export type CapsuleParams = {
|
2
|
+
label: string;
|
3
|
+
selected: boolean;
|
4
|
+
} & React.ComponentProps<'div'>;
|
5
|
+
export type TimeFrameParams = {
|
6
|
+
span: number;
|
7
|
+
onChange: (span: number) => void;
|
8
|
+
};
|
9
|
+
declare const TimeFrame: ({ span, onChange }: TimeFrameParams) => import("react/jsx-runtime").JSX.Element;
|
10
|
+
export default TimeFrame;
|
@@ -1,20 +1,17 @@
|
|
1
|
-
import { useState } from 'react';
|
2
|
-
export function Switch({ left: $left, onSwitch, children, className, ...rest }: SwitchParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
3
|
-
export default ImageEditor;
|
4
1
|
/**
|
5
2
|
* A simple switch view for image editor
|
6
3
|
*/
|
7
4
|
export type SwitchParams = {
|
8
5
|
left: boolean;
|
9
6
|
onSwitch: (value: boolean) => void;
|
10
|
-
}
|
7
|
+
} & React.ComponentProps<'div'>;
|
11
8
|
export type OptionsParams = {
|
12
9
|
header: string;
|
13
10
|
selectedDefault?: number;
|
14
11
|
options?: EditingOptions[keyof EditingOptions][];
|
15
12
|
};
|
16
13
|
export type OptionsImpInterface = {
|
17
|
-
get: () => string;
|
14
|
+
get: () => string | number;
|
18
15
|
};
|
19
16
|
/**
|
20
17
|
* image editor options
|
@@ -39,7 +36,7 @@ export type TransformValues = {
|
|
39
36
|
/**
|
40
37
|
* `TopPanel` view of image editor
|
41
38
|
*/
|
42
|
-
export type
|
39
|
+
export type TopPanelParams = {
|
43
40
|
/**
|
44
41
|
* current values
|
45
42
|
*/
|
@@ -56,12 +53,7 @@ export type InnerTopPanelParams = {
|
|
56
53
|
* approve editing
|
57
54
|
*/
|
58
55
|
onEditingApproved: (options: EditingOptions) => void;
|
59
|
-
}
|
60
|
-
/**
|
61
|
-
* `TopPanel` view of image editor
|
62
|
-
*/
|
63
|
-
export type TopPanelParams = InnerTopPanelParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
64
|
-
export type useStateInfer<T> = ReturnType<typeof useState<T>>;
|
56
|
+
} & React.ComponentProps<'div'>;
|
65
57
|
/**
|
66
58
|
* `ImageEditor` is a simple and effective image editor, supports:
|
67
59
|
* - Transformations: `translate`, `rotate`, `scale`
|
@@ -69,23 +61,12 @@ export type useStateInfer<T> = ReturnType<typeof useState<T>>;
|
|
69
61
|
* - Height: 128, 256, 384, 512, 640, 768, 896, 1024
|
70
62
|
* - Adjustable Quality for lossy formats
|
71
63
|
*/
|
72
|
-
export type
|
64
|
+
export type ImageEditorParams = {
|
73
65
|
source: string;
|
74
66
|
name: string;
|
75
67
|
onComplete: (blob?: Blob, format?: EditingOptions["format"], name?: string, width?: number, height?: number) => void;
|
76
|
-
}
|
77
|
-
|
78
|
-
* `ImageEditor` is a simple and effective image editor, supports:
|
79
|
-
* - Transformations: `translate`, `rotate`, `scale`
|
80
|
-
* - Save as: 'jpeg', 'png', 'webp'
|
81
|
-
* - Height: 128, 256, 384, 512, 640, 768, 896, 1024
|
82
|
-
* - Adjustable Quality for lossy formats
|
83
|
-
*/
|
84
|
-
export type ImageEditorParams = InnerImageEditorParams & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
85
|
-
/**
|
86
|
-
* @template T
|
87
|
-
* @typedef {ReturnType<typeof useState<T>>} useStateInfer
|
88
|
-
*/
|
68
|
+
} & React.ComponentProps<'div'>;
|
69
|
+
export declare const Switch: ({ left: $left, onSwitch, children, className, ...rest }: SwitchParams) => import("react/jsx-runtime").JSX.Element;
|
89
70
|
/**
|
90
71
|
* `ImageEditor` is a simple and effective image editor, supports:
|
91
72
|
* - Transformations: `translate`, `rotate`, `scale`
|
@@ -93,20 +74,6 @@ export type ImageEditorParams = InnerImageEditorParams & React.DetailedHTMLProps
|
|
93
74
|
* - Height: 128, 256, 384, 512, 640, 768, 896, 1024
|
94
75
|
* - Adjustable Quality for lossy formats
|
95
76
|
*
|
96
|
-
* @typedef {object} InnerImageEditorParams
|
97
|
-
* @prop {string} source
|
98
|
-
* @prop {string} name
|
99
|
-
* @prop {(
|
100
|
-
* blob?: Blob, format?: EditingOptions["format"],
|
101
|
-
* name?: string, width?: number, height?: number
|
102
|
-
* ) => void
|
103
|
-
* } onComplete
|
104
|
-
*
|
105
|
-
* @typedef {InnerImageEditorParams &
|
106
|
-
* React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
107
|
-
* } ImageEditorParams
|
108
|
-
*
|
109
|
-
* @param {ImageEditorParams} params
|
110
|
-
*
|
111
77
|
*/
|
112
|
-
declare
|
78
|
+
declare const ImageEditor: ({ source, name, onComplete, className, ...rest }: ImageEditorParams) => import("react/jsx-runtime").JSX.Element;
|
79
|
+
export default ImageEditor;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
/**
|
3
|
+
* `Img` wraps the regular `<img/>` tag and analyzes the `src`
|
4
|
+
* url to decide:
|
5
|
+
*
|
6
|
+
* - If to use `storecraft` backend to fetch the image
|
7
|
+
* through a full download or signed urls.
|
8
|
+
* - Fetch a regular `url`
|
9
|
+
*/
|
10
|
+
declare const Img: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
11
|
+
export default Img;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { FieldLeafViewParams } from './fields-view';
|
2
|
+
export type JsonViewParams = {
|
3
|
+
value: any;
|
4
|
+
} & React.ComponentProps<'div'>;
|
5
|
+
declare const JsonView: ({ value, ...rest }: JsonViewParams) => import("react/jsx-runtime").JSX.Element;
|
6
|
+
export type JsonViewCardParams = FieldLeafViewParams<object> & React.ComponentProps<'div'>;
|
7
|
+
export declare const JsonViewCard: ({ value, setError, ...rest }: JsonViewCardParams) => import("react/jsx-runtime").JSX.Element;
|
8
|
+
export default JsonView;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
/**
|
3
|
+
* Lazy ass `carousel`
|
4
|
+
*/
|
5
|
+
export type LazyCarouselParams = {
|
6
|
+
millis?: number;
|
7
|
+
} & React.ComponentProps<'div'>;
|
8
|
+
declare const LazyCarousel: ({ millis, children, ...rest }: LazyCarouselParams) => import("react/jsx-runtime").JSX.Element;
|
9
|
+
export default LazyCarousel;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
export declare const RegularLoader: () => import("react/jsx-runtime").JSX.Element;
|
2
|
+
export declare const LoadingImage: ({ src, children, ...rest }: React.ComponentProps<"img">) => import("react/jsx-runtime").JSX.Element;
|
3
|
+
export declare const LoadingSingleImage: ({ src, children, ...rest }: React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,7 +1,7 @@
|
|
1
|
+
declare const LoginContent: ({}: {}) => import("react/jsx-runtime").JSX.Element;
|
1
2
|
export default LoginContent;
|
2
3
|
export type ImageItemParams = {
|
3
4
|
src: string;
|
4
5
|
text: string;
|
5
6
|
className?: string;
|
6
7
|
};
|
7
|
-
declare function LoginContent({}: {}): import("react").JSX.Element;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { withDashDiv } from './types';
|
2
|
+
export type LoginFormFieldsType = {
|
3
|
+
email?: string;
|
4
|
+
password?: string;
|
5
|
+
endpoint?: string;
|
6
|
+
};
|
7
|
+
export type LoginFormProps = withDashDiv<{
|
8
|
+
onChange: (id: string, value: string) => void;
|
9
|
+
onSubmit: React.FormEventHandler<HTMLFormElement>;
|
10
|
+
error: object;
|
11
|
+
credentials: LoginFormFieldsType;
|
12
|
+
is_backend_endpoint_editable?: boolean;
|
13
|
+
}>;
|
14
|
+
declare const LoginForm: ({ dash: { onChange, onSubmit, error, credentials, is_backend_endpoint_editable, }, ...rest }: LoginFormProps) => import("react/jsx-runtime").JSX.Element;
|
15
|
+
export declare const SocialLogin: ({}: {}) => import("react/jsx-runtime").JSX.Element;
|
16
|
+
export default LoginForm;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import { default as React } from 'react';
|
2
2
|
export type GithubCommit = {
|
3
3
|
sha: string;
|
4
4
|
node_id: string;
|
@@ -25,8 +25,5 @@ export type GithubCommits = GithubCommit[];
|
|
25
25
|
export type CommitViewParams = {
|
26
26
|
commit: GithubCommit;
|
27
27
|
};
|
28
|
-
|
29
|
-
|
30
|
-
* @param {React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>} params
|
31
|
-
*/
|
32
|
-
declare function LoginLatestUpdates({ ...rest }: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>): import("react").JSX.Element;
|
28
|
+
declare const LoginLatestUpdates: ({ ...rest }: React.ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
|
29
|
+
export default LoginLatestUpdates;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export declare const StorecraftText: ({ className, classNameLines }: {
|
2
|
+
className?: string;
|
3
|
+
classNameLines?: string;
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
5
|
+
export declare const Logo: ({ ...rest }: {
|
6
|
+
[x: string]: any;
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
8
|
+
export declare const LogoV2: ({ className, ...props }: React.ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
export function MarkdownViewCard({ value, title, description, ...rest }: MarkdownViewCardParams & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "value">): import("react").JSX.Element;
|
2
1
|
/**
|
3
2
|
* A card with `markdown content`
|
4
3
|
*/
|
@@ -15,4 +14,5 @@ export type MarkdownViewCardParams = {
|
|
15
14
|
* card description
|
16
15
|
*/
|
17
16
|
description?: string;
|
18
|
-
}
|
17
|
+
} & Omit<React.ComponentProps<'div'>, 'value'>;
|
18
|
+
export declare const MarkdownViewCard: ({ value, title, description, ...rest }: MarkdownViewCardParams) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { FieldData } from './fields-view';
|
2
|
+
export type MDEditorParams = {
|
3
|
+
field?: FieldData;
|
4
|
+
value?: string;
|
5
|
+
onChange?: (value: string) => void;
|
6
|
+
} & React.ComponentProps<'div'>;
|
7
|
+
declare const MDEditor: ({ field, value, onChange, ...rest }: MDEditorParams) => import("react/jsx-runtime").JSX.Element;
|
8
|
+
export default MDEditor;
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
export default Media;
|
1
|
+
import { FieldLeafViewParams } from './fields-view';
|
3
2
|
/**
|
4
3
|
* `CameraSource` will fetch image from local camera
|
5
4
|
*/
|
@@ -21,7 +20,6 @@ export type GallerySourceParams = {
|
|
21
20
|
onFinish: (url: string, requires_edit?: boolean) => void;
|
22
21
|
className: string;
|
23
22
|
};
|
24
|
-
export type useStateInfer<T> = ReturnType<typeof useState<T>>;
|
25
23
|
/**
|
26
24
|
* `UrlSource` will fetch image from a simple `url`
|
27
25
|
*/
|
@@ -29,12 +27,6 @@ export type UrlSourceParams = {
|
|
29
27
|
onFinish: (url: string, requires_edit?: boolean) => void;
|
30
28
|
className: string;
|
31
29
|
};
|
32
|
-
/**
|
33
|
-
* `Media` wraps a few media fetching sources together.
|
34
|
-
*/
|
35
|
-
export type InnerMediaParams = {
|
36
|
-
className: string;
|
37
|
-
};
|
38
30
|
/**
|
39
31
|
* `Media` wraps a few media fetching sources together.
|
40
32
|
*/
|
@@ -47,17 +39,9 @@ export type Upload = {
|
|
47
39
|
/**
|
48
40
|
* `Media` wraps a few media fetching sources together.
|
49
41
|
*/
|
50
|
-
export type MediaParams =
|
51
|
-
|
52
|
-
|
53
|
-
*/
|
54
|
-
export type InnerImagesParams = {
|
55
|
-
urls: string[];
|
56
|
-
uploads: Upload[];
|
57
|
-
onImageClick: (ix: number) => void;
|
58
|
-
onImageRemove: (ix: number) => void;
|
59
|
-
onImageOrder: (ix: number, ij: number) => void;
|
60
|
-
};
|
42
|
+
export type MediaParams = {
|
43
|
+
className: string;
|
44
|
+
} & FieldLeafViewParams<string[]>;
|
61
45
|
/**
|
62
46
|
* drop `event` type of `react-drag-drop-container` lib
|
63
47
|
*/
|
@@ -86,23 +70,15 @@ export type DragEnterEvent = BaseReactDragDropEvent;
|
|
86
70
|
/**
|
87
71
|
* `Images` manages images thumbnails and uploads.
|
88
72
|
*/
|
89
|
-
export type ImagesParams =
|
73
|
+
export type ImagesParams = {
|
74
|
+
urls: string[];
|
75
|
+
uploads: Upload[];
|
76
|
+
onImageClick: (ix: number) => void;
|
77
|
+
onImageRemove: (ix: number) => void;
|
78
|
+
onImageOrder: (ix: number, ij: number) => void;
|
79
|
+
} & React.ComponentProps<'div'>;
|
90
80
|
/**
|
91
81
|
* `Media` wraps a few media fetching sources together.
|
92
|
-
*
|
93
|
-
* @typedef {object} InnerMediaParams
|
94
|
-
* @prop {string} className
|
95
|
-
*
|
96
|
-
* @typedef {object} Upload
|
97
|
-
* @prop {'working' | 'failed'} status
|
98
|
-
* @prop {string | number} id
|
99
|
-
* @prop {string} preview
|
100
|
-
* @prop {string} [error_code]
|
101
|
-
*
|
102
|
-
* @typedef {InnerMediaParams &
|
103
|
-
* import('./fields-view.jsx').FieldLeafViewParams<string[]>
|
104
|
-
* } MediaParams
|
105
|
-
*
|
106
|
-
* @param {MediaParams} params
|
107
82
|
*/
|
108
|
-
declare
|
83
|
+
declare const Media: ({ field, value, onChange, className, ...rest }: MediaParams) => import("react/jsx-runtime").JSX.Element;
|
84
|
+
export default Media;
|