@endora-commerce/admin-kit 0.0.0-stage → 0.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +212 -2
- package/dist/components/FileDropzone.d.ts +13 -0
- package/dist/components/FileDropzone.d.ts.map +1 -0
- package/dist/components/FileDropzone.js +39 -0
- package/dist/components/FileDropzone.js.map +1 -0
- package/dist/components/PaginationFooter.d.ts +25 -0
- package/dist/components/PaginationFooter.d.ts.map +1 -0
- package/dist/components/PaginationFooter.js +33 -0
- package/dist/components/PaginationFooter.js.map +1 -0
- package/dist/components/ResponsiveTable.d.ts +26 -0
- package/dist/components/ResponsiveTable.d.ts.map +1 -0
- package/dist/components/ResponsiveTable.js +34 -0
- package/dist/components/ResponsiveTable.js.map +1 -0
- package/dist/components/RowActionMenu.d.ts +40 -0
- package/dist/components/RowActionMenu.d.ts.map +1 -0
- package/dist/components/RowActionMenu.js +15 -0
- package/dist/components/RowActionMenu.js.map +1 -0
- package/dist/components/StickyFormActions.d.ts +10 -0
- package/dist/components/StickyFormActions.d.ts.map +1 -0
- package/dist/components/StickyFormActions.js +10 -0
- package/dist/components/StickyFormActions.js.map +1 -0
- package/dist/components/TouchReorderButtons.d.ts +13 -0
- package/dist/components/TouchReorderButtons.d.ts.map +1 -0
- package/dist/components/TouchReorderButtons.js +12 -0
- package/dist/components/TouchReorderButtons.js.map +1 -0
- package/dist/components/admin-user-picker/AdminUserPicker.d.ts +14 -0
- package/dist/components/admin-user-picker/AdminUserPicker.d.ts.map +1 -0
- package/dist/components/admin-user-picker/AdminUserPicker.js +68 -0
- package/dist/components/admin-user-picker/AdminUserPicker.js.map +1 -0
- package/dist/components/asset-picker/AssetFieldPicker.d.ts +32 -0
- package/dist/components/asset-picker/AssetFieldPicker.d.ts.map +1 -0
- package/dist/components/asset-picker/AssetFieldPicker.js +42 -0
- package/dist/components/asset-picker/AssetFieldPicker.js.map +1 -0
- package/dist/components/asset-picker/AssetPicker.d.ts +31 -0
- package/dist/components/asset-picker/AssetPicker.d.ts.map +1 -0
- package/dist/components/asset-picker/AssetPicker.js +68 -0
- package/dist/components/asset-picker/AssetPicker.js.map +1 -0
- package/dist/components/asset-picker/AssetUploader.d.ts +15 -0
- package/dist/components/asset-picker/AssetUploader.d.ts.map +1 -0
- package/dist/components/asset-picker/AssetUploader.js +61 -0
- package/dist/components/asset-picker/AssetUploader.js.map +1 -0
- package/dist/components/asset-picker/assets-api.d.ts +49 -0
- package/dist/components/asset-picker/assets-api.d.ts.map +1 -0
- package/dist/components/asset-picker/assets-api.js +67 -0
- package/dist/components/asset-picker/assets-api.js.map +1 -0
- package/dist/components/category-picker/CategorySelect.d.ts +14 -0
- package/dist/components/category-picker/CategorySelect.d.ts.map +1 -0
- package/dist/components/category-picker/CategorySelect.js +41 -0
- package/dist/components/category-picker/CategorySelect.js.map +1 -0
- package/dist/components/category-tree-picker/CategoryTreeNodeRow.d.ts +18 -0
- package/dist/components/category-tree-picker/CategoryTreeNodeRow.d.ts.map +1 -0
- package/dist/components/category-tree-picker/CategoryTreeNodeRow.js +19 -0
- package/dist/components/category-tree-picker/CategoryTreeNodeRow.js.map +1 -0
- package/dist/components/category-tree-picker/CategoryTreePicker.d.ts +23 -0
- package/dist/components/category-tree-picker/CategoryTreePicker.d.ts.map +1 -0
- package/dist/components/category-tree-picker/CategoryTreePicker.js +82 -0
- package/dist/components/category-tree-picker/CategoryTreePicker.js.map +1 -0
- package/dist/components/category-tree-picker/category-tree-utils.d.ts +35 -0
- package/dist/components/category-tree-picker/category-tree-utils.d.ts.map +1 -0
- package/dist/components/category-tree-picker/category-tree-utils.js +140 -0
- package/dist/components/category-tree-picker/category-tree-utils.js.map +1 -0
- package/dist/components/category-tree-picker/index.d.ts +4 -0
- package/dist/components/category-tree-picker/index.d.ts.map +1 -0
- package/dist/components/category-tree-picker/index.js +2 -0
- package/dist/components/category-tree-picker/index.js.map +1 -0
- package/dist/components/charts/echart.d.ts +17 -0
- package/dist/components/charts/echart.d.ts.map +1 -0
- package/dist/components/charts/echart.js +61 -0
- package/dist/components/charts/echart.js.map +1 -0
- package/dist/components/cms-picker/CmsBlockPicker.d.ts +14 -0
- package/dist/components/cms-picker/CmsBlockPicker.d.ts.map +1 -0
- package/dist/components/cms-picker/CmsBlockPicker.js +40 -0
- package/dist/components/cms-picker/CmsBlockPicker.js.map +1 -0
- package/dist/components/cms-picker/CmsPagePicker.d.ts +15 -0
- package/dist/components/cms-picker/CmsPagePicker.d.ts.map +1 -0
- package/dist/components/cms-picker/CmsPagePicker.js +80 -0
- package/dist/components/cms-picker/CmsPagePicker.js.map +1 -0
- package/dist/components/content-language-tabs/ContentLanguageTabs.d.ts +30 -0
- package/dist/components/content-language-tabs/ContentLanguageTabs.d.ts.map +1 -0
- package/dist/components/content-language-tabs/ContentLanguageTabs.js +14 -0
- package/dist/components/content-language-tabs/ContentLanguageTabs.js.map +1 -0
- package/dist/components/country-select/CountrySelect.d.ts +29 -0
- package/dist/components/country-select/CountrySelect.d.ts.map +1 -0
- package/dist/components/country-select/CountrySelect.js +40 -0
- package/dist/components/country-select/CountrySelect.js.map +1 -0
- package/dist/components/country-select/index.d.ts +3 -0
- package/dist/components/country-select/index.d.ts.map +1 -0
- package/dist/components/country-select/index.js +3 -0
- package/dist/components/country-select/index.js.map +1 -0
- package/dist/components/country-select/useCountriesQuery.d.ts +12 -0
- package/dist/components/country-select/useCountriesQuery.d.ts.map +1 -0
- package/dist/components/country-select/useCountriesQuery.js +69 -0
- package/dist/components/country-select/useCountriesQuery.js.map +1 -0
- package/dist/components/custom-field-values/CustomFieldValuesPanel.d.ts +48 -0
- package/dist/components/custom-field-values/CustomFieldValuesPanel.d.ts.map +1 -0
- package/dist/components/custom-field-values/CustomFieldValuesPanel.js +122 -0
- package/dist/components/custom-field-values/CustomFieldValuesPanel.js.map +1 -0
- package/dist/components/customer-group-picker/CustomerGroupPicker.d.ts +14 -0
- package/dist/components/customer-group-picker/CustomerGroupPicker.d.ts.map +1 -0
- package/dist/components/customer-group-picker/CustomerGroupPicker.js +36 -0
- package/dist/components/customer-group-picker/CustomerGroupPicker.js.map +1 -0
- package/dist/components/customer-picker/CustomerPicker.d.ts +18 -0
- package/dist/components/customer-picker/CustomerPicker.d.ts.map +1 -0
- package/dist/components/customer-picker/CustomerPicker.js +85 -0
- package/dist/components/customer-picker/CustomerPicker.js.map +1 -0
- package/dist/components/dictionary-picker/CountryPicker.d.ts +26 -0
- package/dist/components/dictionary-picker/CountryPicker.d.ts.map +1 -0
- package/dist/components/dictionary-picker/CountryPicker.js +29 -0
- package/dist/components/dictionary-picker/CountryPicker.js.map +1 -0
- package/dist/components/dictionary-picker/CurrencyPicker.d.ts +17 -0
- package/dist/components/dictionary-picker/CurrencyPicker.d.ts.map +1 -0
- package/dist/components/dictionary-picker/CurrencyPicker.js +29 -0
- package/dist/components/dictionary-picker/CurrencyPicker.js.map +1 -0
- package/dist/components/dictionary-picker/dictionary-api.d.ts +21 -0
- package/dist/components/dictionary-picker/dictionary-api.d.ts.map +1 -0
- package/dist/components/dictionary-picker/dictionary-api.js +26 -0
- package/dist/components/dictionary-picker/dictionary-api.js.map +1 -0
- package/dist/components/dictionary-picker/index.d.ts +4 -0
- package/dist/components/dictionary-picker/index.d.ts.map +1 -0
- package/dist/components/dictionary-picker/index.js +4 -0
- package/dist/components/dictionary-picker/index.js.map +1 -0
- package/dist/components/fulfilment-strategy-picker/FulfilmentStrategyPicker.d.ts +49 -0
- package/dist/components/fulfilment-strategy-picker/FulfilmentStrategyPicker.d.ts.map +1 -0
- package/dist/components/fulfilment-strategy-picker/FulfilmentStrategyPicker.js +43 -0
- package/dist/components/fulfilment-strategy-picker/FulfilmentStrategyPicker.js.map +1 -0
- package/dist/components/hooks/useFocusTrap.d.ts +6 -0
- package/dist/components/hooks/useFocusTrap.d.ts.map +1 -0
- package/dist/components/hooks/useFocusTrap.js +41 -0
- package/dist/components/hooks/useFocusTrap.js.map +1 -0
- package/dist/components/hooks/useViewportTier.d.ts +7 -0
- package/dist/components/hooks/useViewportTier.d.ts.map +1 -0
- package/dist/components/hooks/useViewportTier.js +23 -0
- package/dist/components/hooks/useViewportTier.js.map +1 -0
- package/dist/components/index.d.ts +101 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +63 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/organization-picker/OrganizationPicker.d.ts +28 -0
- package/dist/components/organization-picker/OrganizationPicker.d.ts.map +1 -0
- package/dist/components/organization-picker/OrganizationPicker.js +35 -0
- package/dist/components/organization-picker/OrganizationPicker.js.map +1 -0
- package/dist/components/organization-picker/OrganizationPickerMulti.d.ts +32 -0
- package/dist/components/organization-picker/OrganizationPickerMulti.d.ts.map +1 -0
- package/dist/components/organization-picker/OrganizationPickerMulti.js +55 -0
- package/dist/components/organization-picker/OrganizationPickerMulti.js.map +1 -0
- package/dist/components/organization-picker/OrganizationStatusBadge.d.ts +7 -0
- package/dist/components/organization-picker/OrganizationStatusBadge.d.ts.map +1 -0
- package/dist/components/organization-picker/OrganizationStatusBadge.js +33 -0
- package/dist/components/organization-picker/OrganizationStatusBadge.js.map +1 -0
- package/dist/components/organization-picker/useOrganizationsQuery.d.ts +33 -0
- package/dist/components/organization-picker/useOrganizationsQuery.d.ts.map +1 -0
- package/dist/components/organization-picker/useOrganizationsQuery.js +92 -0
- package/dist/components/organization-picker/useOrganizationsQuery.js.map +1 -0
- package/dist/components/payment-method-availability/MethodAvailabilityCell.d.ts +38 -0
- package/dist/components/payment-method-availability/MethodAvailabilityCell.d.ts.map +1 -0
- package/dist/components/payment-method-availability/MethodAvailabilityCell.js +50 -0
- package/dist/components/payment-method-availability/MethodAvailabilityCell.js.map +1 -0
- package/dist/components/product-picker/ProductPicker.d.ts +22 -0
- package/dist/components/product-picker/ProductPicker.d.ts.map +1 -0
- package/dist/components/product-picker/ProductPicker.js +143 -0
- package/dist/components/product-picker/ProductPicker.js.map +1 -0
- package/dist/components/reorder/ReorderAnnouncer.d.ts +29 -0
- package/dist/components/reorder/ReorderAnnouncer.d.ts.map +1 -0
- package/dist/components/reorder/ReorderAnnouncer.js +6 -0
- package/dist/components/reorder/ReorderAnnouncer.js.map +1 -0
- package/dist/components/reorder/useReorderList.d.ts +121 -0
- package/dist/components/reorder/useReorderList.d.ts.map +1 -0
- package/dist/components/reorder/useReorderList.js +241 -0
- package/dist/components/reorder/useReorderList.js.map +1 -0
- package/dist/components/rule-builder/RuleBuilder.d.ts +105 -0
- package/dist/components/rule-builder/RuleBuilder.d.ts.map +1 -0
- package/dist/components/rule-builder/RuleBuilder.js +138 -0
- package/dist/components/rule-builder/RuleBuilder.js.map +1 -0
- package/dist/components/sales-channel-picker/SalesChannelPicker.d.ts +15 -0
- package/dist/components/sales-channel-picker/SalesChannelPicker.d.ts.map +1 -0
- package/dist/components/sales-channel-picker/SalesChannelPicker.js +79 -0
- package/dist/components/sales-channel-picker/SalesChannelPicker.js.map +1 -0
- package/dist/components/scope-notice/ScopeNotice.d.ts +33 -0
- package/dist/components/scope-notice/ScopeNotice.d.ts.map +1 -0
- package/dist/components/scope-notice/ScopeNotice.js +11 -0
- package/dist/components/scope-notice/ScopeNotice.js.map +1 -0
- package/dist/components/scope-picker/ScopePicker.d.ts +28 -0
- package/dist/components/scope-picker/ScopePicker.d.ts.map +1 -0
- package/dist/components/scope-picker/ScopePicker.js +114 -0
- package/dist/components/scope-picker/ScopePicker.js.map +1 -0
- package/dist/components/scope-picker/sales-channels-api.d.ts +19 -0
- package/dist/components/scope-picker/sales-channels-api.d.ts.map +1 -0
- package/dist/components/scope-picker/sales-channels-api.js +30 -0
- package/dist/components/scope-picker/sales-channels-api.js.map +1 -0
- package/dist/components/status-transition-graph/StatusTransitionGraph.d.ts +26 -0
- package/dist/components/status-transition-graph/StatusTransitionGraph.d.ts.map +1 -0
- package/dist/components/status-transition-graph/StatusTransitionGraph.js +241 -0
- package/dist/components/status-transition-graph/StatusTransitionGraph.js.map +1 -0
- package/dist/components/status-transition-graph/index.d.ts +3 -0
- package/dist/components/status-transition-graph/index.d.ts.map +1 -0
- package/dist/components/status-transition-graph/index.js +2 -0
- package/dist/components/status-transition-graph/index.js.map +1 -0
- package/dist/contributions/index.d.ts +44 -0
- package/dist/contributions/index.d.ts.map +1 -0
- package/dist/contributions/index.js +42 -0
- package/dist/contributions/index.js.map +1 -0
- package/dist/contributions/zone-component.d.ts +70 -0
- package/dist/contributions/zone-component.d.ts.map +1 -0
- package/dist/contributions/zone-component.js +26 -0
- package/dist/contributions/zone-component.js.map +1 -0
- package/dist/field-protection/FieldProtectionPricePanel.d.ts +26 -0
- package/dist/field-protection/FieldProtectionPricePanel.d.ts.map +1 -0
- package/dist/field-protection/FieldProtectionPricePanel.js +14 -0
- package/dist/field-protection/FieldProtectionPricePanel.js.map +1 -0
- package/dist/field-protection/FieldProtectionSummary.d.ts +18 -0
- package/dist/field-protection/FieldProtectionSummary.d.ts.map +1 -0
- package/dist/field-protection/FieldProtectionSummary.js +18 -0
- package/dist/field-protection/FieldProtectionSummary.js.map +1 -0
- package/dist/field-protection/FieldProtectionToggle.d.ts +36 -0
- package/dist/field-protection/FieldProtectionToggle.d.ts.map +1 -0
- package/dist/field-protection/FieldProtectionToggle.js +30 -0
- package/dist/field-protection/FieldProtectionToggle.js.map +1 -0
- package/dist/field-protection/describe-path.d.ts +27 -0
- package/dist/field-protection/describe-path.d.ts.map +1 -0
- package/dist/field-protection/describe-path.js +28 -0
- package/dist/field-protection/describe-path.js.map +1 -0
- package/dist/field-protection/index.d.ts +46 -0
- package/dist/field-protection/index.d.ts.map +1 -0
- package/dist/field-protection/index.js +41 -0
- package/dist/field-protection/index.js.map +1 -0
- package/dist/field-protection/types.d.ts +93 -0
- package/dist/field-protection/types.d.ts.map +1 -0
- package/dist/field-protection/types.js +2 -0
- package/dist/field-protection/types.js.map +1 -0
- package/dist/field-protection/use-field-protection.d.ts +27 -0
- package/dist/field-protection/use-field-protection.d.ts.map +1 -0
- package/dist/field-protection/use-field-protection.js +149 -0
- package/dist/field-protection/use-field-protection.js.map +1 -0
- package/dist/i18n/TranslationProvider.d.ts +27 -0
- package/dist/i18n/TranslationProvider.d.ts.map +1 -0
- package/dist/i18n/TranslationProvider.js +130 -0
- package/dist/i18n/TranslationProvider.js.map +1 -0
- package/dist/i18n/app-language-context.d.ts +8 -0
- package/dist/i18n/app-language-context.d.ts.map +1 -0
- package/dist/i18n/app-language-context.js +13 -0
- package/dist/i18n/app-language-context.js.map +1 -0
- package/dist/i18n/index.d.ts +29 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +25 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/interpolate.d.ts +2 -0
- package/dist/i18n/interpolate.d.ts.map +1 -0
- package/dist/i18n/interpolate.js +10 -0
- package/dist/i18n/interpolate.js.map +1 -0
- package/dist/i18n/language-storage.d.ts +16 -0
- package/dist/i18n/language-storage.d.ts.map +1 -0
- package/dist/i18n/language-storage.js +26 -0
- package/dist/i18n/language-storage.js.map +1 -0
- package/dist/i18n/resolver.d.ts +19 -0
- package/dist/i18n/resolver.d.ts.map +1 -0
- package/dist/i18n/resolver.js +23 -0
- package/dist/i18n/resolver.js.map +1 -0
- package/dist/i18n/types.d.ts +12 -0
- package/dist/i18n/types.d.ts.map +1 -0
- package/dist/i18n/types.js +7 -0
- package/dist/i18n/types.js.map +1 -0
- package/dist/i18n/useTranslation.d.ts +2 -0
- package/dist/i18n/useTranslation.d.ts.map +1 -0
- package/dist/i18n/useTranslation.js +16 -0
- package/dist/i18n/useTranslation.js.map +1 -0
- package/dist/lib/admin-actions/icon-map.d.ts +3 -0
- package/dist/lib/admin-actions/icon-map.d.ts.map +1 -0
- package/dist/lib/admin-actions/icon-map.js +115 -0
- package/dist/lib/admin-actions/icon-map.js.map +1 -0
- package/dist/lib/api-client.d.ts +55 -0
- package/dist/lib/api-client.d.ts.map +1 -0
- package/dist/lib/api-client.js +89 -0
- package/dist/lib/api-client.js.map +1 -0
- package/dist/lib/asset-url.d.ts +32 -0
- package/dist/lib/asset-url.d.ts.map +1 -0
- package/dist/lib/asset-url.js +42 -0
- package/dist/lib/asset-url.js.map +1 -0
- package/dist/lib/auth.d.ts +92 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +133 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/format.d.ts +2 -0
- package/dist/lib/format.d.ts.map +1 -0
- package/dist/lib/format.js +9 -0
- package/dist/lib/format.js.map +1 -0
- package/dist/lib/index.d.ts +46 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +41 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/invoice-email-outcome.d.ts +53 -0
- package/dist/lib/invoice-email-outcome.d.ts.map +1 -0
- package/dist/lib/invoice-email-outcome.js +43 -0
- package/dist/lib/invoice-email-outcome.js.map +1 -0
- package/dist/lib/module-presence/ModulePresenceProvider.d.ts +49 -0
- package/dist/lib/module-presence/ModulePresenceProvider.d.ts.map +1 -0
- package/dist/lib/module-presence/ModulePresenceProvider.js +73 -0
- package/dist/lib/module-presence/ModulePresenceProvider.js.map +1 -0
- package/dist/lib/module-presence/api.d.ts +15 -0
- package/dist/lib/module-presence/api.d.ts.map +1 -0
- package/dist/lib/module-presence/api.js +25 -0
- package/dist/lib/module-presence/api.js.map +1 -0
- package/dist/lib/module-presence/index.d.ts +3 -0
- package/dist/lib/module-presence/index.d.ts.map +1 -0
- package/dist/lib/module-presence/index.js +3 -0
- package/dist/lib/module-presence/index.js.map +1 -0
- package/dist/lib/money.d.ts +22 -0
- package/dist/lib/money.d.ts.map +1 -0
- package/dist/lib/money.js +51 -0
- package/dist/lib/money.js.map +1 -0
- package/dist/lib/page-size-options.d.ts +15 -0
- package/dist/lib/page-size-options.d.ts.map +1 -0
- package/dist/lib/page-size-options.js +14 -0
- package/dist/lib/page-size-options.js.map +1 -0
- package/dist/lib/status-color.d.ts +32 -0
- package/dist/lib/status-color.d.ts.map +1 -0
- package/dist/lib/status-color.js +24 -0
- package/dist/lib/status-color.js.map +1 -0
- package/dist/lib/surface-visibility.d.ts +70 -0
- package/dist/lib/surface-visibility.d.ts.map +1 -0
- package/dist/lib/surface-visibility.js +37 -0
- package/dist/lib/surface-visibility.js.map +1 -0
- package/dist/lib/text-normalization.d.ts +56 -0
- package/dist/lib/text-normalization.d.ts.map +1 -0
- package/dist/lib/text-normalization.js +59 -0
- package/dist/lib/text-normalization.js.map +1 -0
- package/dist/lib/use-page-size-preference.d.ts +29 -0
- package/dist/lib/use-page-size-preference.d.ts.map +1 -0
- package/dist/lib/use-page-size-preference.js +61 -0
- package/dist/lib/use-page-size-preference.js.map +1 -0
- package/dist/lib/use-unsaved-changes-prompt.d.ts +23 -0
- package/dist/lib/use-unsaved-changes-prompt.d.ts.map +1 -0
- package/dist/lib/use-unsaved-changes-prompt.js +75 -0
- package/dist/lib/use-unsaved-changes-prompt.js.map +1 -0
- package/dist/lib/utils.d.ts +9 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +12 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/uuid.d.ts +8 -0
- package/dist/lib/uuid.d.ts.map +1 -0
- package/dist/lib/uuid.js +18 -0
- package/dist/lib/uuid.js.map +1 -0
- package/dist/ui/alert.d.ts +12 -0
- package/dist/ui/alert.d.ts.map +1 -0
- package/dist/ui/alert.js +22 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/badge.d.ts +10 -0
- package/dist/ui/badge.d.ts.map +1 -0
- package/dist/ui/badge.js +21 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/button.d.ts +12 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/button.js +31 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/card.d.ts +8 -0
- package/dist/ui/card.d.ts.map +1 -0
- package/dist/ui/card.js +16 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/checkbox.d.ts +8 -0
- package/dist/ui/checkbox.d.ts.map +1 -0
- package/dist/ui/checkbox.js +11 -0
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/color-picker.d.ts +23 -0
- package/dist/ui/color-picker.d.ts.map +1 -0
- package/dist/ui/color-picker.js +76 -0
- package/dist/ui/color-picker.js.map +1 -0
- package/dist/ui/combobox.d.ts +68 -0
- package/dist/ui/combobox.d.ts.map +1 -0
- package/dist/ui/combobox.js +182 -0
- package/dist/ui/combobox.js.map +1 -0
- package/dist/ui/dropdown-menu.d.ts +26 -0
- package/dist/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/dropdown-menu.js +38 -0
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/index.d.ts +47 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +38 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/input.d.ts +3 -0
- package/dist/ui/input.d.ts.map +1 -0
- package/dist/ui/input.js +8 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/label.d.ts +4 -0
- package/dist/ui/label.d.ts.map +1 -0
- package/dist/ui/label.js +9 -0
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/multi-select.d.ts +32 -0
- package/dist/ui/multi-select.d.ts.map +1 -0
- package/dist/ui/multi-select.js +63 -0
- package/dist/ui/multi-select.js.map +1 -0
- package/dist/ui/page-header.d.ts +21 -0
- package/dist/ui/page-header.d.ts.map +1 -0
- package/dist/ui/page-header.js +9 -0
- package/dist/ui/page-header.js.map +1 -0
- package/dist/ui/route-tabs.d.ts +58 -0
- package/dist/ui/route-tabs.d.ts.map +1 -0
- package/dist/ui/route-tabs.js +34 -0
- package/dist/ui/route-tabs.js.map +1 -0
- package/dist/ui/save-button-group.d.ts +27 -0
- package/dist/ui/save-button-group.d.ts.map +1 -0
- package/dist/ui/save-button-group.js +44 -0
- package/dist/ui/save-button-group.js.map +1 -0
- package/dist/ui/section.d.ts +20 -0
- package/dist/ui/section.d.ts.map +1 -0
- package/dist/ui/section.js +7 -0
- package/dist/ui/section.js.map +1 -0
- package/dist/ui/select.d.ts +10 -0
- package/dist/ui/select.d.ts.map +1 -0
- package/dist/ui/select.js +15 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/separator.d.ts +3 -0
- package/dist/ui/separator.d.ts.map +1 -0
- package/dist/ui/separator.js +7 -0
- package/dist/ui/separator.js.map +1 -0
- package/dist/ui/table.d.ts +10 -0
- package/dist/ui/table.d.ts.map +1 -0
- package/dist/ui/table.js +20 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/textarea.d.ts +3 -0
- package/dist/ui/textarea.d.ts.map +1 -0
- package/dist/ui/textarea.js +8 -0
- package/dist/ui/textarea.js.map +1 -0
- package/dist/zones/AdminContributionsProvider.d.ts +72 -0
- package/dist/zones/AdminContributionsProvider.d.ts.map +1 -0
- package/dist/zones/AdminContributionsProvider.js +63 -0
- package/dist/zones/AdminContributionsProvider.js.map +1 -0
- package/dist/zones/AdminZone.d.ts +30 -0
- package/dist/zones/AdminZone.d.ts.map +1 -0
- package/dist/zones/AdminZone.js +59 -0
- package/dist/zones/AdminZone.js.map +1 -0
- package/dist/zones/RouteTabsZone.d.ts +62 -0
- package/dist/zones/RouteTabsZone.d.ts.map +1 -0
- package/dist/zones/RouteTabsZone.js +25 -0
- package/dist/zones/RouteTabsZone.js.map +1 -0
- package/dist/zones/ZoneErrorBoundary.d.ts +36 -0
- package/dist/zones/ZoneErrorBoundary.d.ts.map +1 -0
- package/dist/zones/ZoneErrorBoundary.js +44 -0
- package/dist/zones/ZoneErrorBoundary.js.map +1 -0
- package/dist/zones/index.d.ts +31 -0
- package/dist/zones/index.d.ts.map +1 -0
- package/dist/zones/index.js +27 -0
- package/dist/zones/index.js.map +1 -0
- package/dist/zones/use-admin-zone.d.ts +32 -0
- package/dist/zones/use-admin-zone.d.ts.map +1 -0
- package/dist/zones/use-admin-zone.js +96 -0
- package/dist/zones/use-admin-zone.js.map +1 -0
- package/package.json +94 -3
- package/tailwind.css +14 -0
- package/theme.css +2056 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ReactElement, type SelectHTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A `<select>` over the admin dictionary's countries (feature 091, batch 8).
|
|
4
|
+
*
|
|
5
|
+
* The admin one, not {@link CountrySelect}, and the two are not duplicates: this
|
|
6
|
+
* reads `GET /api/v1/admin/dictionary/countries`, which serves inactive rows and
|
|
7
|
+
* groups them under their own `<optgroup>`, so an operator editing a tax rule
|
|
8
|
+
* can see that a country exists and is switched off. `CountrySelect` reads the
|
|
9
|
+
* **public** facade, which serves active rows only and cannot answer that
|
|
10
|
+
* question.
|
|
11
|
+
*
|
|
12
|
+
* **Its copy is `core`'s, not `dictionaries`'** (R-1). A translation namespace
|
|
13
|
+
* is module knowledge on R6's own test: the bundle behind it is shipped by a
|
|
14
|
+
* module package the kit does not and may not depend on, it is resolved at
|
|
15
|
+
* runtime by string, and a key that did not travel renders `core.<key>` into
|
|
16
|
+
* the operator's screen instead of failing to compile. The three keys moved
|
|
17
|
+
* from `dictionaries`' bundle to `_i18n`'s under the same spelling, so the
|
|
18
|
+
* rendered output is unchanged in both shipped languages.
|
|
19
|
+
*/
|
|
20
|
+
export interface CountryPickerProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'children'> {
|
|
21
|
+
includeBlank?: boolean;
|
|
22
|
+
blankLabel?: string;
|
|
23
|
+
activeOnly?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare function CountryPicker({ includeBlank, blankLabel, activeOnly, ...props }: CountryPickerProps): ReactElement;
|
|
26
|
+
//# sourceMappingURL=CountryPicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CountryPicker.d.ts","sourceRoot":"","sources":["../../../src/components/dictionary-picker/CountryPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,YAAY,EAAE,KAAK,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAOnG;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IACjE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,aAAa,CAAC,EAC5B,YAAoB,EACpB,UAAU,EACV,UAAiB,EACjB,GAAG,KAAK,EACT,EAAE,kBAAkB,GAAG,YAAY,CA+CnC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { Select } from '../../ui/select.js';
|
|
4
|
+
import { useTranslation } from '../../i18n/useTranslation.js';
|
|
5
|
+
import { listDictionaryCountries } from './dictionary-api.js';
|
|
6
|
+
export function CountryPicker({ includeBlank = false, blankLabel, activeOnly = true, ...props }) {
|
|
7
|
+
const t = useTranslation('core');
|
|
8
|
+
const resolvedBlankLabel = blankLabel ?? t('countryPicker.selectCountry');
|
|
9
|
+
const [rows, setRows] = useState([]);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
let cancelled = false;
|
|
12
|
+
void listDictionaryCountries()
|
|
13
|
+
.then((page) => {
|
|
14
|
+
if (!cancelled)
|
|
15
|
+
setRows(page.data);
|
|
16
|
+
})
|
|
17
|
+
.catch(() => {
|
|
18
|
+
if (!cancelled)
|
|
19
|
+
setRows([]);
|
|
20
|
+
});
|
|
21
|
+
return () => {
|
|
22
|
+
cancelled = true;
|
|
23
|
+
};
|
|
24
|
+
}, []);
|
|
25
|
+
const visible = useMemo(() => rows.filter((row) => !activeOnly || row.isActive), [activeOnly, rows]);
|
|
26
|
+
const inactive = useMemo(() => rows.filter((row) => activeOnly && !row.isActive), [activeOnly, rows]);
|
|
27
|
+
return (_jsxs(Select, { ...props, children: [includeBlank ? _jsx("option", { value: "", children: resolvedBlankLabel }) : null, visible.map((row) => (_jsx("option", { value: row.code, children: row.label }, row.code))), inactive.length > 0 ? (_jsx("optgroup", { label: t('countryPicker.inactiveGroup'), children: inactive.map((row) => (_jsx("option", { value: row.code, children: t('countryPicker.inactiveLabel', { label: row.label }) }, row.code))) })) : null] }));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=CountryPicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CountryPicker.js","sourceRoot":"","sources":["../../../src/components/dictionary-picker/CountryPicker.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAgD,MAAM,OAAO,CAAC;AAGnG,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AA2B9D,MAAM,UAAU,aAAa,CAAC,EAC5B,YAAY,GAAG,KAAK,EACpB,UAAU,EACV,UAAU,GAAG,IAAI,EACjB,GAAG,KAAK,EACW;IACnB,MAAM,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IACjC,MAAM,kBAAkB,GAAG,UAAU,IAAI,CAAC,CAAC,6BAA6B,CAAC,CAAC;IAC1E,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAY,EAAE,CAAC,CAAC;IAEhD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,KAAK,uBAAuB,EAAE;aAC3B,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;YACb,IAAI,CAAC,SAAS;gBAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC,CAAC;aACD,KAAK,CAAC,GAAG,EAAE;YACV,IAAI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,CACZ,CAAC,CAAC,CAAC,IAAI,IACD,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ReactElement, type SelectHTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A `<select>` over the admin dictionary's currencies (feature 091, batch 8).
|
|
4
|
+
*
|
|
5
|
+
* The sibling of {@link CountryPicker} and identical in shape: the admin read,
|
|
6
|
+
* so an inactive currency is shown under its own `<optgroup>` rather than
|
|
7
|
+
* silently absent from a price list or a credit limit an operator is editing.
|
|
8
|
+
*
|
|
9
|
+
* Its copy is `core`'s for the reason recorded on `CountryPicker` (R-1).
|
|
10
|
+
*/
|
|
11
|
+
export interface CurrencyPickerProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'children'> {
|
|
12
|
+
includeBlank?: boolean;
|
|
13
|
+
blankLabel?: string;
|
|
14
|
+
activeOnly?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function CurrencyPicker({ includeBlank, blankLabel, activeOnly, ...props }: CurrencyPickerProps): ReactElement;
|
|
17
|
+
//# sourceMappingURL=CurrencyPicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CurrencyPicker.d.ts","sourceRoot":"","sources":["../../../src/components/dictionary-picker/CurrencyPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,YAAY,EAAE,KAAK,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAOnG;;;;;;;;GAQG;AACH,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IACjE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,cAAc,CAAC,EAC7B,YAAoB,EACpB,UAAU,EACV,UAAiB,EACjB,GAAG,KAAK,EACT,EAAE,mBAAmB,GAAG,YAAY,CA+CpC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { Select } from '../../ui/select.js';
|
|
4
|
+
import { useTranslation } from '../../i18n/useTranslation.js';
|
|
5
|
+
import { listDictionaryCurrencies } from './dictionary-api.js';
|
|
6
|
+
export function CurrencyPicker({ includeBlank = false, blankLabel, activeOnly = true, ...props }) {
|
|
7
|
+
const t = useTranslation('core');
|
|
8
|
+
const resolvedBlankLabel = blankLabel ?? t('currencyPicker.selectCurrency');
|
|
9
|
+
const [rows, setRows] = useState([]);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
let cancelled = false;
|
|
12
|
+
void listDictionaryCurrencies()
|
|
13
|
+
.then((page) => {
|
|
14
|
+
if (!cancelled)
|
|
15
|
+
setRows(page.data);
|
|
16
|
+
})
|
|
17
|
+
.catch(() => {
|
|
18
|
+
if (!cancelled)
|
|
19
|
+
setRows([]);
|
|
20
|
+
});
|
|
21
|
+
return () => {
|
|
22
|
+
cancelled = true;
|
|
23
|
+
};
|
|
24
|
+
}, []);
|
|
25
|
+
const visible = useMemo(() => rows.filter((row) => !activeOnly || row.isActive), [activeOnly, rows]);
|
|
26
|
+
const inactive = useMemo(() => rows.filter((row) => activeOnly && !row.isActive), [activeOnly, rows]);
|
|
27
|
+
return (_jsxs(Select, { ...props, children: [includeBlank ? _jsx("option", { value: "", children: resolvedBlankLabel }) : null, visible.map((row) => (_jsxs("option", { value: row.code, children: [row.label, " (", row.code, ")"] }, row.code))), inactive.length > 0 ? (_jsx("optgroup", { label: t('currencyPicker.inactiveGroup'), children: inactive.map((row) => (_jsx("option", { value: row.code, children: t('currencyPicker.inactiveLabel', { label: row.label, code: row.code }) }, row.code))) })) : null] }));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=CurrencyPicker.js.map
|
|
@@ -0,0 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IAAI,GAAG,CAAC,QAAQ,CAAC,EACvD,CAAC,UAAU,EAAE,IAAI,CAAC,CACnB,CAAC;IACF,MAAM,QAAQ,GAAG,OAAO,CACtB,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EACvD,CAAC,UAAU,EAAE,IAAI,CAAC,CACnB,CAAC;IAEF,OAAO,CACL,MAAC,MAAM,OAAK,KAAK,aACd,YAAY,CAAC,CAAC,CAAC,iBAAQ,KAAK,EAAC,EAAE,YAAE,kBAAkB,GAAU,CAAC,CAAC,CAAC,IAAI,EACpE,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACpB,kBAAuB,KAAK,EAAE,GAAG,CAAC,IAAI,aACnC,GAAG,CAAC,KAAK,QAAI,GAAG,CAAC,IAAI,UADX,GAAG,CAAC,IAAI,CAEZ,CACV,CAAC,EACD,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACrB,mBAAU,KAAK,EAAE,CAAC,CAAC,8BAA8B,CAAC,YAC/C,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACrB,iBAAuB,KAAK,EAAE,GAAG,CAAC,IAAI,YACnC,CAAC,CAAC,8BAA8B,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,IAD7D,GAAG,CAAC,IAAI,CAEZ,CACV,CAAC,GACO,CACZ,CAAC,CAAC,CAAC,IAAI,IACD,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two `dictionary` reads {@link CountryPicker} and {@link CurrencyPicker}
|
|
3
|
+
* need, built here (feature 091, batch 8).
|
|
4
|
+
*
|
|
5
|
+
* Until these two components moved into the kit they called `dictionaries`'
|
|
6
|
+
* own admin API client, which is a reach out of one module's admin surface
|
|
7
|
+
* into another's — `taxes`, `credit_limits`, `delivery_methods` and
|
|
8
|
+
* `inventory` each recorded one in
|
|
9
|
+
* `backend/scripts/ledgers/cross-module-imports/`. The exit is P2's, the one
|
|
10
|
+
* `sales-channel-picker`, `cms-picker` and `organization-picker` took: name
|
|
11
|
+
* the endpoint and the published response type, which both sides already
|
|
12
|
+
* compile, and depend on no module's code. `admin-kit-surface.md` R6's subject
|
|
13
|
+
* is a module's **code**, and an HTTP path plus a schema out of
|
|
14
|
+
* `@endora-commerce/contracts` is not that.
|
|
15
|
+
*
|
|
16
|
+
* Two of that client's fourteen methods, and only the `GET`s: a picker reads.
|
|
17
|
+
*/
|
|
18
|
+
import type { DictionaryCountriesPageResponse, DictionaryCurrenciesPageResponse } from '@endora-commerce/contracts';
|
|
19
|
+
export declare function listDictionaryCountries(): Promise<DictionaryCountriesPageResponse>;
|
|
20
|
+
export declare function listDictionaryCurrencies(): Promise<DictionaryCurrenciesPageResponse>;
|
|
21
|
+
//# sourceMappingURL=dictionary-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictionary-api.d.ts","sourceRoot":"","sources":["../../../src/components/dictionary-picker/dictionary-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EACV,+BAA+B,EAC/B,gCAAgC,EACjC,MAAM,4BAA4B,CAAC;AAyBpC,wBAAgB,uBAAuB,IAAI,OAAO,CAAC,+BAA+B,CAAC,CAElF;AAED,wBAAgB,wBAAwB,IAAI,OAAO,CAAC,gCAAgC,CAAC,CAEpF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// `apiClient` comes through the kit's published `lib` **barrel** for the reason
|
|
2
|
+
// `SalesChannelPicker.tsx` records at length: `vi.mock` keys on a resolved
|
|
3
|
+
// module id and the `exports` map declares no deep subpath, so the barrel is
|
|
4
|
+
// the only spelling an admin test outside this package can name. It is the
|
|
5
|
+
// same module record either way.
|
|
6
|
+
import { apiClient } from '../../lib/index.js';
|
|
7
|
+
const BASE = '/api/v1/admin/dictionary';
|
|
8
|
+
/**
|
|
9
|
+
* Both dictionaries are small and closed sets — ~250 countries, ~180
|
|
10
|
+
* currencies — so one page holds the whole of either and the picker filters in
|
|
11
|
+
* the browser. This is the page size the module's own screens use.
|
|
12
|
+
*/
|
|
13
|
+
const PICKER_PAGE_SIZE = 250;
|
|
14
|
+
function pageQuery() {
|
|
15
|
+
const params = new URLSearchParams();
|
|
16
|
+
params.set('pageSize', String(PICKER_PAGE_SIZE));
|
|
17
|
+
params.set('sort', 'sortOrder');
|
|
18
|
+
return params.toString();
|
|
19
|
+
}
|
|
20
|
+
export function listDictionaryCountries() {
|
|
21
|
+
return apiClient.get(`${BASE}/countries?${pageQuery()}`);
|
|
22
|
+
}
|
|
23
|
+
export function listDictionaryCurrencies() {
|
|
24
|
+
return apiClient.get(`${BASE}/currencies?${pageQuery()}`);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=dictionary-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictionary-api.js","sourceRoot":"","sources":["../../../src/components/dictionary-picker/dictionary-api.ts"],"names":[],"mappings":"AAsBA,gFAAgF;AAChF,2EAA2E;AAC3E,6EAA6E;AAC7E,2EAA2E;AAC3E,iCAAiC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,IAAI,GAAG,0BAA0B,CAAC;AAExC;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,SAAS,SAAS;IAChB,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;IACrC,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACjD,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAChC,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,uBAAuB;IACrC,OAAO,SAAS,CAAC,GAAG,CAAkC,GAAG,IAAI,cAAc,SAAS,EAAE,EAAE,CAAC,CAAC;AAC5F,CAAC;AAED,MAAM,UAAU,wBAAwB;IACtC,OAAO,SAAS,CAAC,GAAG,CAAmC,GAAG,IAAI,eAAe,SAAS,EAAE,EAAE,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { CountryPicker, type CountryPickerProps } from './CountryPicker.js';
|
|
2
|
+
export { CurrencyPicker, type CurrencyPickerProps } from './CurrencyPicker.js';
|
|
3
|
+
export { listDictionaryCountries, listDictionaryCurrencies } from './dictionary-api.js';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dictionary-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/dictionary-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA2B,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAA4B,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { FulfilmentStrategy } from '@endora-commerce/contracts';
|
|
3
|
+
/**
|
|
4
|
+
* Shared, controlled editor for a warehouse-picking (fulfilment) strategy.
|
|
5
|
+
*
|
|
6
|
+
* Reused by the per-product Inventory tab and the per-Organization detail
|
|
7
|
+
* page (and, later, anywhere the strategy is configurable). The sales-channel
|
|
8
|
+
* layer is edited through the generic Settings page, not here.
|
|
9
|
+
*
|
|
10
|
+
* Dumb/controlled: the parent owns `value` and the warehouse list; this
|
|
11
|
+
* component only renders the strategy `<select>` and — for `defined_order` —
|
|
12
|
+
* an ordered warehouse list with up/down/remove + an add-dropdown.
|
|
13
|
+
*
|
|
14
|
+
* **Published by feature 091, P9, and it never was a zone contribution.** The
|
|
15
|
+
* component sat under `inventory`'s admin directory and was rendered by
|
|
16
|
+
* `catalog`'s product Inventory tab and by `organizations`' fulfilment panel —
|
|
17
|
+
* two `cross-module-imports` keys over a picker that holds nothing of
|
|
18
|
+
* `inventory`. The signature above is `admin-component-contribution.md`'s Z1
|
|
19
|
+
* question 1 verbatim: a value in and a value back, with both consumers owning
|
|
20
|
+
* the PATCH. The plan's P7a and P7b rows counted it as a zone until §10.2 read
|
|
21
|
+
* the props off this file, which is §9.1's finding a second time.
|
|
22
|
+
*
|
|
23
|
+
* **Its home is the kit and not `./admin-ui`**, on Z1.1 checked rather than
|
|
24
|
+
* assumed: it names one `@endora-commerce/contracts` type, three kit primitives
|
|
25
|
+
* and `useTranslation('core')`, it calls no API, and it names no module id. Its
|
|
26
|
+
* copy was already `core`'s in both shipped languages, so R-1 §9.2 moved no key
|
|
27
|
+
* — the one case in this family where a kit move costs no i18n work.
|
|
28
|
+
*/
|
|
29
|
+
export interface FulfilmentStrategyValue {
|
|
30
|
+
strategy: FulfilmentStrategy | null;
|
|
31
|
+
warehouseOrder: string[];
|
|
32
|
+
}
|
|
33
|
+
export interface FulfilmentWarehouseOption {
|
|
34
|
+
id: string;
|
|
35
|
+
code: string;
|
|
36
|
+
name: string;
|
|
37
|
+
}
|
|
38
|
+
export interface FulfilmentStrategyPickerProps {
|
|
39
|
+
value: FulfilmentStrategyValue;
|
|
40
|
+
onChange: (next: FulfilmentStrategyValue) => void;
|
|
41
|
+
warehouses: FulfilmentWarehouseOption[];
|
|
42
|
+
/** When true, offers an "inherit" option that maps to a null strategy. */
|
|
43
|
+
allowInherit?: boolean;
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
/** Disambiguates element ids when several pickers share a page. */
|
|
46
|
+
idPrefix?: string;
|
|
47
|
+
}
|
|
48
|
+
export declare function FulfilmentStrategyPicker({ value, onChange, warehouses, allowInherit, disabled, idPrefix, }: FulfilmentStrategyPickerProps): ReactNode;
|
|
49
|
+
//# sourceMappingURL=FulfilmentStrategyPicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FulfilmentStrategyPicker.d.ts","sourceRoot":"","sources":["../../../src/components/fulfilment-strategy-picker/FulfilmentStrategyPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACpC,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,uBAAuB,CAAC;IAC/B,QAAQ,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAClD,UAAU,EAAE,yBAAyB,EAAE,CAAC;IACxC,0EAA0E;IAC1E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAUD,wBAAgB,wBAAwB,CAAC,EACvC,KAAK,EACL,QAAQ,EACR,UAAU,EACV,YAAoB,EACpB,QAAgB,EAChB,QAAuB,GACxB,EAAE,6BAA6B,GAAG,SAAS,CAiH3C"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import {} from 'react';
|
|
3
|
+
import { ArrowDown, ArrowUp, X } from 'lucide-react';
|
|
4
|
+
import { Button } from '../../ui/button.js';
|
|
5
|
+
import { Label } from '../../ui/label.js';
|
|
6
|
+
import { Select } from '../../ui/select.js';
|
|
7
|
+
import { useTranslation } from '../../i18n/useTranslation.js';
|
|
8
|
+
const STRATEGIES = [
|
|
9
|
+
'any',
|
|
10
|
+
'default_first',
|
|
11
|
+
'lowest_stock_first',
|
|
12
|
+
'highest_stock_first',
|
|
13
|
+
'defined_order',
|
|
14
|
+
];
|
|
15
|
+
export function FulfilmentStrategyPicker({ value, onChange, warehouses, allowInherit = false, disabled = false, idPrefix = 'fulfilment', }) {
|
|
16
|
+
const t = useTranslation('core');
|
|
17
|
+
const order = value.warehouseOrder ?? [];
|
|
18
|
+
const byId = new Map(warehouses.map((w) => [w.id, w]));
|
|
19
|
+
const available = warehouses.filter((w) => !order.includes(w.id));
|
|
20
|
+
const setStrategy = (raw) => {
|
|
21
|
+
const strategy = raw === '' ? null : raw;
|
|
22
|
+
onChange({ strategy, warehouseOrder: order });
|
|
23
|
+
};
|
|
24
|
+
const setOrder = (next) => {
|
|
25
|
+
onChange({ strategy: value.strategy, warehouseOrder: next });
|
|
26
|
+
};
|
|
27
|
+
const move = (index, delta) => {
|
|
28
|
+
const next = [...order];
|
|
29
|
+
const target = index + delta;
|
|
30
|
+
if (target < 0 || target >= next.length)
|
|
31
|
+
return;
|
|
32
|
+
[next[index], next[target]] = [next[target], next[index]];
|
|
33
|
+
setOrder(next);
|
|
34
|
+
};
|
|
35
|
+
return (_jsxs("div", { className: "space-y-3", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: `${idPrefix}-strategy`, children: t('fulfilment.label') }), _jsxs(Select, { id: `${idPrefix}-strategy`, value: value.strategy ?? '', disabled: disabled, onChange: (e) => setStrategy(e.target.value), children: [allowInherit ? _jsx("option", { value: "", children: t('fulfilment.inherit') }) : null, STRATEGIES.map((s) => (_jsx("option", { value: s, children: t(`fulfilment.strategy.${s}`) }, s)))] }), _jsx("p", { className: "text-xs text-muted-foreground", children: t('fulfilment.hint') })] }), value.strategy === 'defined_order' ? (_jsxs("div", { className: "space-y-2 rounded-md border p-3", children: [_jsx(Label, { children: t('fulfilment.warehouseOrder.title') }), order.length === 0 ? (_jsx("p", { className: "text-xs text-muted-foreground", children: t('fulfilment.warehouseOrder.empty') })) : (_jsx("ol", { className: "space-y-1", children: order.map((id, i) => {
|
|
36
|
+
const wh = byId.get(id);
|
|
37
|
+
return (_jsxs("li", { className: "flex items-center gap-2 text-sm", children: [_jsxs("span", { className: "w-5 text-right tabular-nums text-muted-foreground", children: [i + 1, "."] }), _jsxs("span", { className: "flex-1", children: [wh ? wh.name : id, ' ', wh ? _jsxs("span", { className: "font-mono text-xs text-muted-foreground", children: ["(", wh.code, ")"] }) : null] }), _jsx(Button, { type: "button", variant: "ghost", size: "sm", disabled: disabled || i === 0, "aria-label": t('fulfilment.warehouseOrder.up'), onClick: () => move(i, -1), children: _jsx(ArrowUp, {}) }), _jsx(Button, { type: "button", variant: "ghost", size: "sm", disabled: disabled || i === order.length - 1, "aria-label": t('fulfilment.warehouseOrder.down'), onClick: () => move(i, 1), children: _jsx(ArrowDown, {}) }), _jsx(Button, { type: "button", variant: "ghost", size: "sm", disabled: disabled, "aria-label": t('fulfilment.warehouseOrder.remove'), onClick: () => setOrder(order.filter((x) => x !== id)), children: _jsx(X, {}) })] }, id));
|
|
38
|
+
}) })), available.length > 0 ? (_jsxs(Select, { "aria-label": t('fulfilment.warehouseOrder.add'), value: "", disabled: disabled, onChange: (e) => {
|
|
39
|
+
if (e.target.value)
|
|
40
|
+
setOrder([...order, e.target.value]);
|
|
41
|
+
}, children: [_jsx("option", { value: "", children: t('fulfilment.warehouseOrder.add') }), available.map((w) => (_jsxs("option", { value: w.id, children: [w.name, " (", w.code, ")"] }, w.id)))] })) : null] })) : null] }));
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=FulfilmentStrategyPicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FulfilmentStrategyPicker.js","sourceRoot":"","sources":["../../../src/components/fulfilment-strategy-picker/FulfilmentStrategyPicker.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAkD9D,MAAM,UAAU,GAAyB;IACvC,KAAK;IACL,eAAe;IACf,oBAAoB;IACpB,qBAAqB;IACrB,eAAe;CAChB,CAAC;AAEF,MAAM,UAAU,wBAAwB,CAAC,EACvC,KAAK,EACL,QAAQ,EACR,UAAU,EACV,YAAY,GAAG,KAAK,EACpB,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,YAAY,GACO;IAC9B,MAAM,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,KAAK,CAAC,cAAc,IAAI,EAAE,CAAC;IACzC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CA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R,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,CAAC,CAAC,EAAQ,EAAE;4BACpB,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK;gCAAE,QAAQ,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;wBAC3D,CAAC,aAED,iBAAQ,KAAK,EAAC,EAAE,YAAE,CAAC,CAAC,+BAA+B,CAAC,GAAU,EAC7D,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACpB,kBAAmB,KAAK,EAAE,CAAC,CAAC,EAAE,aAC3B,CAAC,CAAC,IAAI,QAAI,CAAC,CAAC,IAAI,UADN,CAAC,CAAC,EAAE,CAER,CACV,CAAC,IACK,CACV,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Trap focus inside `containerRef` while `active` (feature 029 mobile drawer).
|
|
4
|
+
*/
|
|
5
|
+
export declare function useFocusTrap(containerRef: RefObject<HTMLElement | null>, active: boolean): void;
|
|
6
|
+
//# sourceMappingURL=useFocusTrap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../../src/components/hooks/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlD;;GAEG;AACH,wBAAgB,YAAY,CAC1B,YAAY,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAC3C,MAAM,EAAE,OAAO,GACd,IAAI,CAqCN"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
3
|
+
/**
|
|
4
|
+
* Trap focus inside `containerRef` while `active` (feature 029 mobile drawer).
|
|
5
|
+
*/
|
|
6
|
+
export function useFocusTrap(containerRef, active) {
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
if (!active || !containerRef.current)
|
|
9
|
+
return;
|
|
10
|
+
const root = containerRef.current;
|
|
11
|
+
const previous = document.activeElement;
|
|
12
|
+
const focusables = () => Array.from(root.querySelectorAll(FOCUSABLE)).filter((el) => !el.hasAttribute('disabled') && el.offsetParent !== null);
|
|
13
|
+
const first = focusables()[0];
|
|
14
|
+
first?.focus();
|
|
15
|
+
const onKeyDown = (e) => {
|
|
16
|
+
if (e.key !== 'Tab')
|
|
17
|
+
return;
|
|
18
|
+
const items = focusables();
|
|
19
|
+
if (items.length === 0)
|
|
20
|
+
return;
|
|
21
|
+
const current = document.activeElement;
|
|
22
|
+
const idx = items.indexOf(current);
|
|
23
|
+
if (e.shiftKey) {
|
|
24
|
+
if (idx <= 0) {
|
|
25
|
+
e.preventDefault();
|
|
26
|
+
items[items.length - 1]?.focus();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
else if (idx === items.length - 1) {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
items[0]?.focus();
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
root.addEventListener('keydown', onKeyDown);
|
|
35
|
+
return () => {
|
|
36
|
+
root.removeEventListener('keydown', onKeyDown);
|
|
37
|
+
previous?.focus?.();
|
|
38
|
+
};
|
|
39
|
+
}, [active, containerRef]);
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=useFocusTrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocusTrap.js","sourceRoot":"","sources":["../../../src/components/hooks/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkB,MAAM,OAAO,CAAC;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,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACpC,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;YACpB,CAAC;QACH,CAAC,CAAC;QAEF,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QAC5C,OAAO,GAAS,EAAE;YAChB,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YAC/C,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC;QACtB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type ViewportTier = 'mobile' | 'desktop';
|
|
2
|
+
/**
|
|
3
|
+
* Client-side viewport tier aligned with Tailwind `lg` and the mobile
|
|
4
|
+
* admin shell contract (feature 029).
|
|
5
|
+
*/
|
|
6
|
+
export declare function useViewportTier(): ViewportTier;
|
|
7
|
+
//# sourceMappingURL=useViewportTier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useViewportTier.d.ts","sourceRoot":"","sources":["../../../src/components/hooks/useViewportTier.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAC;AAShD;;;GAGG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAY9C"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
const DESKTOP_QUERY = '(min-width: 1024px)';
|
|
3
|
+
function readTier() {
|
|
4
|
+
if (typeof window === 'undefined')
|
|
5
|
+
return 'desktop';
|
|
6
|
+
return window.matchMedia(DESKTOP_QUERY).matches ? 'desktop' : 'mobile';
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Client-side viewport tier aligned with Tailwind `lg` and the mobile
|
|
10
|
+
* admin shell contract (feature 029).
|
|
11
|
+
*/
|
|
12
|
+
export function useViewportTier() {
|
|
13
|
+
const [tier, setTier] = useState(readTier);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const mq = window.matchMedia(DESKTOP_QUERY);
|
|
16
|
+
const onChange = () => setTier(mq.matches ? 'desktop' : 'mobile');
|
|
17
|
+
mq.addEventListener('change', onChange);
|
|
18
|
+
onChange();
|
|
19
|
+
return () => mq.removeEventListener('change', onChange);
|
|
20
|
+
}, []);
|
|
21
|
+
return tier;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=useViewportTier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useViewportTier.js","sourceRoot":"","sources":["../../../src/components/hooks/useViewportTier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,aAAa,GAAG,qBAAqB,CAAC;AAE5C,SAAS,QAAQ;IACf,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,SAAS,CAAC;IACpD,OAAO,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;AACzE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAe,QAAQ,CAAC,CAAC;IAEzD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;QAC5C,MAAM,QAAQ,GAAG,GAAS,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QACxE,EAAE,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACxC,QAAQ,EAAE,CAAC;QACX,OAAO,GAAS,EAAE,CAAC,EAAE,CAAC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAChE,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@endora-commerce/admin-kit/components` — The composites an admin screen builds a page out of — tables, pagination,
|
|
3
|
+
* pickers, the reorder helpers and the `<EChart>` wrapper.
|
|
4
|
+
*
|
|
5
|
+
* The membership is **derived, never designed**
|
|
6
|
+
* (`specs/091-module-owned-admin-surfaces/contracts/admin-kit-surface.md` §1): every
|
|
7
|
+
* `from '…'` specifier in the admin's module directories that resolves inside the admin
|
|
8
|
+
* source root and outside the importing file's own module directory, plus the transitive
|
|
9
|
+
* closure of those files, which is what has to live in one place for there to be one copy.
|
|
10
|
+
*
|
|
11
|
+
* The barrel is **explicit and holds no `export *`** (R2): a short published set reports
|
|
12
|
+
* more findings than a complete one, and its obvious repair is to widen the barrel
|
|
13
|
+
* silently. `check:admin-surface` refuses one and exits 2.
|
|
14
|
+
*
|
|
15
|
+
* Every binding here is the **only** copy in the process. `admin/src` keeps a re-export
|
|
16
|
+
* shim at each old path, so a `@/…` specifier and this subpath name one module record —
|
|
17
|
+
* proved by reference equality in `admin/test/kit/admin-kit-shims.test.ts`, not by a
|
|
18
|
+
* structural comparison, which a second React context would pass.
|
|
19
|
+
*/
|
|
20
|
+
export { FileDropzone } from './FileDropzone.js';
|
|
21
|
+
export { PaginationFooter } from './PaginationFooter.js';
|
|
22
|
+
export type { PaginationFooterProps } from './PaginationFooter.js';
|
|
23
|
+
export { ResponsiveTable } from './ResponsiveTable.js';
|
|
24
|
+
export type { ResponsiveColumn, ResponsiveTableProps } from './ResponsiveTable.js';
|
|
25
|
+
export { RowActionMenu, RowActionMenuItem, RowActionMenuSeparator } from './RowActionMenu.js';
|
|
26
|
+
export type { RowActionMenuItemProps, RowActionMenuProps } from './RowActionMenu.js';
|
|
27
|
+
export { StickyFormActions } from './StickyFormActions.js';
|
|
28
|
+
export type { StickyFormActionsProps } from './StickyFormActions.js';
|
|
29
|
+
export { TouchReorderButtons } from './TouchReorderButtons.js';
|
|
30
|
+
export type { TouchReorderButtonsProps } from './TouchReorderButtons.js';
|
|
31
|
+
export { AdminUserPicker } from './admin-user-picker/AdminUserPicker.js';
|
|
32
|
+
export type { AdminUserPickerProps } from './admin-user-picker/AdminUserPicker.js';
|
|
33
|
+
export { AssetFieldPicker } from './asset-picker/AssetFieldPicker.js';
|
|
34
|
+
export type { AssetFieldPickerProps } from './asset-picker/AssetFieldPicker.js';
|
|
35
|
+
export { AssetPicker } from './asset-picker/AssetPicker.js';
|
|
36
|
+
export type { AssetPickerProps } from './asset-picker/AssetPicker.js';
|
|
37
|
+
export { AssetUploader } from './asset-picker/AssetUploader.js';
|
|
38
|
+
export type { AssetUploaderProps } from './asset-picker/AssetUploader.js';
|
|
39
|
+
export { fetchAssetDetail, listAssets, uploadAsset } from './asset-picker/assets-api.js';
|
|
40
|
+
export type { AssetListQuery, AssetUploadFields } from './asset-picker/assets-api.js';
|
|
41
|
+
export { CategorySelect } from './category-picker/CategorySelect.js';
|
|
42
|
+
export type { CategorySelectProps } from './category-picker/CategorySelect.js';
|
|
43
|
+
export { CategoryTreePicker } from './category-tree-picker/CategoryTreePicker.js';
|
|
44
|
+
export type { CategoryTreePickerProps } from './category-tree-picker/CategoryTreePicker.js';
|
|
45
|
+
export { adminLanguageToLocale, ancestorIdsForSelected, buildCategoryTree, computeParentIndeterminateIds, expandedIdsForFilteredTree, filterCategoryTree, flattenCategoryTree, pickCategoryDisplayName, subtreeHasSelection, visibleFlattenedTree } from './category-tree-picker/category-tree-utils.js';
|
|
46
|
+
export type { CategoryTreeNode, CategoryTreePickerCategory } from './category-tree-picker/category-tree-utils.js';
|
|
47
|
+
export { EChart } from './charts/echart.js';
|
|
48
|
+
export { ContentLanguageTabs } from './content-language-tabs/ContentLanguageTabs.js';
|
|
49
|
+
export type { ContentLanguageTabsProps } from './content-language-tabs/ContentLanguageTabs.js';
|
|
50
|
+
export { CmsBlockPicker } from './cms-picker/CmsBlockPicker.js';
|
|
51
|
+
export type { CmsBlockPickerProps } from './cms-picker/CmsBlockPicker.js';
|
|
52
|
+
export { CmsPagePicker } from './cms-picker/CmsPagePicker.js';
|
|
53
|
+
export type { CmsPagePickerProps } from './cms-picker/CmsPagePicker.js';
|
|
54
|
+
export type { EChartEventHandler, EChartProps } from './charts/echart.js';
|
|
55
|
+
export { CountrySelect } from './country-select/CountrySelect.js';
|
|
56
|
+
export type { CountrySelectProps } from './country-select/CountrySelect.js';
|
|
57
|
+
export { CountryPicker } from './dictionary-picker/CountryPicker.js';
|
|
58
|
+
export type { CountryPickerProps } from './dictionary-picker/CountryPicker.js';
|
|
59
|
+
export { CurrencyPicker } from './dictionary-picker/CurrencyPicker.js';
|
|
60
|
+
export type { CurrencyPickerProps } from './dictionary-picker/CurrencyPicker.js';
|
|
61
|
+
export { listDictionaryCountries, listDictionaryCurrencies } from './dictionary-picker/dictionary-api.js';
|
|
62
|
+
export { useCountriesQuery } from './country-select/useCountriesQuery.js';
|
|
63
|
+
export type { UseCountriesQueryResult } from './country-select/useCountriesQuery.js';
|
|
64
|
+
export { CustomFieldValuesPanel } from './custom-field-values/CustomFieldValuesPanel.js';
|
|
65
|
+
export type { CustomFieldValuesPanelProps } from './custom-field-values/CustomFieldValuesPanel.js';
|
|
66
|
+
export { CustomerGroupPicker } from './customer-group-picker/CustomerGroupPicker.js';
|
|
67
|
+
export type { CustomerGroupPickerProps } from './customer-group-picker/CustomerGroupPicker.js';
|
|
68
|
+
export { CustomerPicker } from './customer-picker/CustomerPicker.js';
|
|
69
|
+
export type { CustomerPickerProps } from './customer-picker/CustomerPicker.js';
|
|
70
|
+
export { FulfilmentStrategyPicker } from './fulfilment-strategy-picker/FulfilmentStrategyPicker.js';
|
|
71
|
+
export type { FulfilmentStrategyPickerProps, FulfilmentStrategyValue, FulfilmentWarehouseOption } from './fulfilment-strategy-picker/FulfilmentStrategyPicker.js';
|
|
72
|
+
export { OrganizationPicker } from './organization-picker/OrganizationPicker.js';
|
|
73
|
+
export type { OrganizationPickerProps } from './organization-picker/OrganizationPicker.js';
|
|
74
|
+
export { OrganizationPickerMulti } from './organization-picker/OrganizationPickerMulti.js';
|
|
75
|
+
export type { OrganizationPickerMultiProps } from './organization-picker/OrganizationPickerMulti.js';
|
|
76
|
+
export { OrganizationStatusBadge } from './organization-picker/OrganizationStatusBadge.js';
|
|
77
|
+
export type { OrganizationStatusBadgeProps } from './organization-picker/OrganizationStatusBadge.js';
|
|
78
|
+
export { useOrganizationsQuery } from './organization-picker/useOrganizationsQuery.js';
|
|
79
|
+
export type { UseOrganizationsQueryOptions, UseOrganizationsQueryResult } from './organization-picker/useOrganizationsQuery.js';
|
|
80
|
+
export { useFocusTrap } from './hooks/useFocusTrap.js';
|
|
81
|
+
export { useViewportTier } from './hooks/useViewportTier.js';
|
|
82
|
+
export type { ViewportTier } from './hooks/useViewportTier.js';
|
|
83
|
+
export { MethodAvailabilityCaption, MethodAvailabilityCell, MethodNotOfferedNotice } from './payment-method-availability/MethodAvailabilityCell.js';
|
|
84
|
+
export { ReorderAnnouncer } from './reorder/ReorderAnnouncer.js';
|
|
85
|
+
export type { ReorderAnnouncerProps } from './reorder/ReorderAnnouncer.js';
|
|
86
|
+
export { moveItem, useReorderList } from './reorder/useReorderList.js';
|
|
87
|
+
export type { ReorderHandleProps, ReorderItemProps, ReorderKeyboardEvent, ReorderLabelContext, ReorderLabels, ReorderListOptions, UseReorderListOptions, UseReorderListResult } from './reorder/useReorderList.js';
|
|
88
|
+
export { RuleBuilder } from './rule-builder/RuleBuilder.js';
|
|
89
|
+
export { ProductPicker } from './product-picker/ProductPicker.js';
|
|
90
|
+
export type { ProductPickerProps } from './product-picker/ProductPicker.js';
|
|
91
|
+
export { ScopePicker } from './scope-picker/ScopePicker.js';
|
|
92
|
+
export type { ScopePickerProps, ScopePickerValue } from './scope-picker/ScopePicker.js';
|
|
93
|
+
export { fetchScopeSalesChannel, listScopeSalesChannels } from './scope-picker/sales-channels-api.js';
|
|
94
|
+
export { SalesChannelPicker } from './sales-channel-picker/SalesChannelPicker.js';
|
|
95
|
+
export type { SalesChannelPickerProps } from './sales-channel-picker/SalesChannelPicker.js';
|
|
96
|
+
export { StatusTransitionGraph } from './status-transition-graph/StatusTransitionGraph.js';
|
|
97
|
+
export type { StatusTransitionGraphProps, StatusTransitionGraphStatus, StatusTransitionGraphTransition } from './status-transition-graph/StatusTransitionGraph.js';
|
|
98
|
+
export { ScopeNotice } from './scope-notice/ScopeNotice.js';
|
|
99
|
+
export type { ScopeNoticeProps } from './scope-notice/ScopeNotice.js';
|
|
100
|
+
export type { RuleAttributeField, RuleBuilderBuiltinField, RuleBuilderLabels, RuleBuilderProps, RuleFieldOptions, StructuralRule, StructuralRuleCondition, StructuralRuleField, StructuralRuleValue } from './rule-builder/RuleBuilder.js';
|
|
101
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC9F,YAAY,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB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EAAE,MAAM,mCAAmC,CAAC;AAClE,YAAY,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,YAAY,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAC3F,YAAY,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,+BAA+B,EAAE,MAAM,oDAAoD,CAAC;AACnK,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,YAAY,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@endora-commerce/admin-kit/components` — The composites an admin screen builds a page out of — tables, pagination,
|
|
3
|
+
* pickers, the reorder helpers and the `<EChart>` wrapper.
|
|
4
|
+
*
|
|
5
|
+
* The membership is **derived, never designed**
|
|
6
|
+
* (`specs/091-module-owned-admin-surfaces/contracts/admin-kit-surface.md` §1): every
|
|
7
|
+
* `from '…'` specifier in the admin's module directories that resolves inside the admin
|
|
8
|
+
* source root and outside the importing file's own module directory, plus the transitive
|
|
9
|
+
* closure of those files, which is what has to live in one place for there to be one copy.
|
|
10
|
+
*
|
|
11
|
+
* The barrel is **explicit and holds no `export *`** (R2): a short published set reports
|
|
12
|
+
* more findings than a complete one, and its obvious repair is to widen the barrel
|
|
13
|
+
* silently. `check:admin-surface` refuses one and exits 2.
|
|
14
|
+
*
|
|
15
|
+
* Every binding here is the **only** copy in the process. `admin/src` keeps a re-export
|
|
16
|
+
* shim at each old path, so a `@/…` specifier and this subpath name one module record —
|
|
17
|
+
* proved by reference equality in `admin/test/kit/admin-kit-shims.test.ts`, not by a
|
|
18
|
+
* structural comparison, which a second React context would pass.
|
|
19
|
+
*/
|
|
20
|
+
export { FileDropzone } from './FileDropzone.js';
|
|
21
|
+
export { PaginationFooter } from './PaginationFooter.js';
|
|
22
|
+
export { ResponsiveTable } from './ResponsiveTable.js';
|
|
23
|
+
export { RowActionMenu, RowActionMenuItem, RowActionMenuSeparator } from './RowActionMenu.js';
|
|
24
|
+
export { StickyFormActions } from './StickyFormActions.js';
|
|
25
|
+
export { TouchReorderButtons } from './TouchReorderButtons.js';
|
|
26
|
+
export { AdminUserPicker } from './admin-user-picker/AdminUserPicker.js';
|
|
27
|
+
export { AssetFieldPicker } from './asset-picker/AssetFieldPicker.js';
|
|
28
|
+
export { AssetPicker } from './asset-picker/AssetPicker.js';
|
|
29
|
+
export { AssetUploader } from './asset-picker/AssetUploader.js';
|
|
30
|
+
export { fetchAssetDetail, listAssets, uploadAsset } from './asset-picker/assets-api.js';
|
|
31
|
+
export { CategorySelect } from './category-picker/CategorySelect.js';
|
|
32
|
+
export { CategoryTreePicker } from './category-tree-picker/CategoryTreePicker.js';
|
|
33
|
+
export { adminLanguageToLocale, ancestorIdsForSelected, buildCategoryTree, computeParentIndeterminateIds, expandedIdsForFilteredTree, filterCategoryTree, flattenCategoryTree, pickCategoryDisplayName, subtreeHasSelection, visibleFlattenedTree } from './category-tree-picker/category-tree-utils.js';
|
|
34
|
+
export { EChart } from './charts/echart.js';
|
|
35
|
+
export { ContentLanguageTabs } from './content-language-tabs/ContentLanguageTabs.js';
|
|
36
|
+
export { CmsBlockPicker } from './cms-picker/CmsBlockPicker.js';
|
|
37
|
+
export { CmsPagePicker } from './cms-picker/CmsPagePicker.js';
|
|
38
|
+
export { CountrySelect } from './country-select/CountrySelect.js';
|
|
39
|
+
export { CountryPicker } from './dictionary-picker/CountryPicker.js';
|
|
40
|
+
export { CurrencyPicker } from './dictionary-picker/CurrencyPicker.js';
|
|
41
|
+
export { listDictionaryCountries, listDictionaryCurrencies } from './dictionary-picker/dictionary-api.js';
|
|
42
|
+
export { useCountriesQuery } from './country-select/useCountriesQuery.js';
|
|
43
|
+
export { CustomFieldValuesPanel } from './custom-field-values/CustomFieldValuesPanel.js';
|
|
44
|
+
export { CustomerGroupPicker } from './customer-group-picker/CustomerGroupPicker.js';
|
|
45
|
+
export { CustomerPicker } from './customer-picker/CustomerPicker.js';
|
|
46
|
+
export { FulfilmentStrategyPicker } from './fulfilment-strategy-picker/FulfilmentStrategyPicker.js';
|
|
47
|
+
export { OrganizationPicker } from './organization-picker/OrganizationPicker.js';
|
|
48
|
+
export { OrganizationPickerMulti } from './organization-picker/OrganizationPickerMulti.js';
|
|
49
|
+
export { OrganizationStatusBadge } from './organization-picker/OrganizationStatusBadge.js';
|
|
50
|
+
export { useOrganizationsQuery } from './organization-picker/useOrganizationsQuery.js';
|
|
51
|
+
export { useFocusTrap } from './hooks/useFocusTrap.js';
|
|
52
|
+
export { useViewportTier } from './hooks/useViewportTier.js';
|
|
53
|
+
export { MethodAvailabilityCaption, MethodAvailabilityCell, MethodNotOfferedNotice } from './payment-method-availability/MethodAvailabilityCell.js';
|
|
54
|
+
export { ReorderAnnouncer } from './reorder/ReorderAnnouncer.js';
|
|
55
|
+
export { moveItem, useReorderList } from './reorder/useReorderList.js';
|
|
56
|
+
export { RuleBuilder } from './rule-builder/RuleBuilder.js';
|
|
57
|
+
export { ProductPicker } from './product-picker/ProductPicker.js';
|
|
58
|
+
export { ScopePicker } from './scope-picker/ScopePicker.js';
|
|
59
|
+
export { fetchScopeSalesChannel, listScopeSalesChannels } from './scope-picker/sales-channels-api.js';
|
|
60
|
+
export { SalesChannelPicker } from './sales-channel-picker/SalesChannelPicker.js';
|
|
61
|
+
export { StatusTransitionGraph } from './status-transition-graph/StatusTransitionGraph.js';
|
|
62
|
+
export { ScopeNotice } from './scope-notice/ScopeNotice.js';
|
|
63
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAEzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEzF,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAElF,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;A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