@mframework/layer-shared 0.0.1
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/README.md +2 -0
- package/dist/api/global-search.d.ts +8 -0
- package/dist/api/global-search.js +1 -0
- package/dist/app/components/Gallery/__tests__/Gallery.spec.d.ts +1 -0
- package/dist/app/components/Gallery/__tests__/Gallery.spec.js +12 -0
- package/dist/app/components/Heading/__tests__/Heading.spec.d.ts +1 -0
- package/dist/app/components/Heading/__tests__/Heading.spec.js +12 -0
- package/dist/app/components/Heading/types.d.ts +5 -0
- package/dist/app/components/Heading/types.js +1 -0
- package/dist/app/components/ui/AccordionItem/__tests__/AccordionItem.spec.d.ts +1 -0
- package/dist/app/components/ui/AccordionItem/__tests__/AccordionItem.spec.js +12 -0
- package/dist/app/components/ui/AccordionItem/types.d.ts +5 -0
- package/dist/app/components/ui/AccordionItem/types.js +1 -0
- package/dist/app/components/ui/Alert/types.d.ts +5 -0
- package/dist/app/components/ui/Alert/types.js +1 -0
- package/dist/app/components/ui/Breadcrumbs/__tests__/Breadcrumbs.spec.d.ts +1 -0
- package/dist/app/components/ui/Breadcrumbs/__tests__/Breadcrumbs.spec.js +12 -0
- package/dist/app/components/ui/Breadcrumbs/types.d.ts +7 -0
- package/dist/app/components/ui/Breadcrumbs/types.js +1 -0
- package/dist/app/components/ui/CartProductCard/types.d.ts +17 -0
- package/dist/app/components/ui/CartProductCard/types.js +1 -0
- package/dist/app/components/ui/CategoryCard/types.d.ts +8 -0
- package/dist/app/components/ui/CategoryCard/types.js +1 -0
- package/dist/app/components/ui/Display/types.d.ts +12 -0
- package/dist/app/components/ui/Display/types.js +1 -0
- package/dist/app/components/ui/Divider/__tests__/Divider.spec.d.ts +1 -0
- package/dist/app/components/ui/Divider/__tests__/Divider.spec.js +8 -0
- package/dist/app/components/ui/Form/__tests__/FormHelperText.spec.d.ts +1 -0
- package/dist/app/components/ui/Form/__tests__/FormHelperText.spec.js +8 -0
- package/dist/app/components/ui/Form/__tests__/FormLabel.spec.d.ts +1 -0
- package/dist/app/components/ui/Form/__tests__/FormLabel.spec.js +8 -0
- package/dist/app/components/ui/Hero/types.d.ts +10 -0
- package/dist/app/components/ui/Hero/types.js +1 -0
- package/dist/app/components/ui/Modal/types.d.ts +7 -0
- package/dist/app/components/ui/Modal/types.js +1 -0
- package/dist/app/components/ui/Overlay/__tests__/Overlay.spec.d.ts +1 -0
- package/dist/app/components/ui/Overlay/__tests__/Overlay.spec.js +12 -0
- package/dist/app/components/ui/Overlay/types.d.ts +3 -0
- package/dist/app/components/ui/Overlay/types.js +1 -0
- package/dist/app/components/ui/Pagination/__tests__/Pagination.spec.d.ts +1 -0
- package/dist/app/components/ui/Pagination/__tests__/Pagination.spec.js +15 -0
- package/dist/app/components/ui/Pagination/types.d.ts +6 -0
- package/dist/app/components/ui/Pagination/types.js +1 -0
- package/dist/app/components/ui/ProductCard/__tests__/ProductCard.spec.d.ts +1 -0
- package/dist/app/components/ui/ProductCard/__tests__/ProductCard.spec.js +14 -0
- package/dist/app/components/ui/ProductCard/types.d.ts +12 -0
- package/dist/app/components/ui/ProductCard/types.js +1 -0
- package/dist/app/components/ui/ProductCardHorizontal/__tests__/ProductCardHorizontal.spec.d.ts +1 -0
- package/dist/app/components/ui/ProductCardHorizontal/__tests__/ProductCardHorizontal.spec.js +34 -0
- package/dist/app/components/ui/ProductCardHorizontal/types.d.ts +4 -0
- package/dist/app/components/ui/ProductCardHorizontal/types.js +1 -0
- package/dist/app/components/ui/PurchaseCard/__tests__/PurchaseCard.spec.d.ts +1 -0
- package/dist/app/components/ui/PurchaseCard/__tests__/PurchaseCard.spec.js +12 -0
- package/dist/app/components/ui/PurchaseCard/types.d.ts +4 -0
- package/dist/app/components/ui/PurchaseCard/types.js +1 -0
- package/dist/app/components/ui/QuantitySelector/__tests__/QuantitySelector.spec.d.ts +1 -0
- package/dist/app/components/ui/QuantitySelector/__tests__/QuantitySelector.spec.js +13 -0
- package/dist/app/components/ui/QuantitySelector/types.d.ts +5 -0
- package/dist/app/components/ui/QuantitySelector/types.js +1 -0
- package/dist/app/components/ui/Review/__tests__/Review.spec.d.ts +1 -0
- package/dist/app/components/ui/Review/__tests__/Review.spec.js +13 -0
- package/dist/app/components/ui/Review/types.d.ts +4 -0
- package/dist/app/components/ui/Review/types.js +1 -0
- package/dist/app/components/ui/Tag/__tests__/Tag.spec.d.ts +1 -0
- package/dist/app/components/ui/Tag/__tests__/Tag.spec.js +8 -0
- package/dist/app/components/ui/Tag/types.d.ts +14 -0
- package/dist/app/components/ui/Tag/types.js +11 -0
- package/dist/app/composables/globals/useAdminTable.d.ts +3 -0
- package/dist/app/composables/globals/useAdminTable.js +9 -0
- package/dist/app/composables/globals/useCustomFetch.d.ts +2 -0
- package/dist/app/composables/globals/useCustomFetch.js +8 -0
- package/dist/app/composables/globals/useDirectusField.d.ts +10 -0
- package/dist/app/composables/globals/useDirectusField.js +119 -0
- package/dist/app/composables/globals/useDirectusForm.d.ts +10 -0
- package/dist/app/composables/globals/useDirectusForm.js +66 -0
- package/dist/app/composables/globals/useFileManager.d.ts +14 -0
- package/dist/app/composables/globals/useFileManager.js +62 -0
- package/dist/app/composables/globals/useLivePreview.d.ts +1 -0
- package/dist/app/composables/globals/useLivePreview.js +16 -0
- package/dist/app/composables/globals/useLoading.d.ts +6 -0
- package/dist/app/composables/globals/useLoading.js +19 -0
- package/dist/app/composables/globals/useNotifications.d.ts +35 -0
- package/dist/app/composables/globals/useNotifications.js +133 -0
- package/dist/app/composables/globals/useRichText.d.ts +1 -0
- package/dist/app/composables/globals/useRichText.js +32 -0
- package/dist/app/composables/globals/useServerRootMixin.d.ts +3 -0
- package/dist/app/composables/globals/useServerRootMixin.js +15 -0
- package/dist/app/composables/globals/useVisualEditing.d.ts +17 -0
- package/dist/app/composables/globals/useVisualEditing.js +27 -0
- package/dist/app/composables/mappers/createMapper.d.ts +2 -0
- package/dist/app/composables/mappers/createMapper.js +6 -0
- package/dist/app/composables/mappers/errors.d.ts +6 -0
- package/dist/app/composables/mappers/errors.js +12 -0
- package/dist/app/composables/mappers/index.d.ts +6 -0
- package/dist/app/composables/mappers/index.js +7 -0
- package/dist/app/composables/mappers/registry.d.ts +5 -0
- package/dist/app/composables/mappers/registry.js +18 -0
- package/dist/app/composables/mappers/testHarness.d.ts +13 -0
- package/dist/app/composables/mappers/testHarness.js +98 -0
- package/dist/app/composables/mappers/types.d.ts +5 -0
- package/dist/app/composables/mappers/types.js +1 -0
- package/dist/app/composables/mappers/zodMapper.d.ts +9 -0
- package/dist/app/composables/mappers/zodMapper.js +17 -0
- package/dist/app/composables/media/useFile.d.ts +2 -0
- package/dist/app/composables/media/useFile.js +4 -0
- package/dist/app/composables/media/useMediaCenter.d.ts +29 -0
- package/dist/app/composables/media/useMediaCenter.js +321 -0
- package/dist/app/composables/media/useVideojs.d.ts +11 -0
- package/dist/app/composables/media/useVideojs.js +42 -0
- package/dist/app/composables/registry.d.ts +3 -0
- package/dist/app/composables/registry.js +10 -0
- package/dist/app/composables/schema/commerce/attributes.d.ts +7 -0
- package/dist/app/composables/schema/commerce/attributes.js +1 -0
- package/dist/app/composables/schema/commerce/blocks.d.ts +6 -0
- package/dist/app/composables/schema/commerce/blocks.js +1 -0
- package/dist/app/composables/schema/commerce/bundleProduts.d.ts +10 -0
- package/dist/app/composables/schema/commerce/bundleProduts.js +1 -0
- package/dist/app/composables/schema/commerce/cart.d.ts +29 -0
- package/dist/app/composables/schema/commerce/cart.js +1 -0
- package/dist/app/composables/schema/commerce/category.d.ts +12 -0
- package/dist/app/composables/schema/commerce/category.js +1 -0
- package/dist/app/composables/schema/commerce/checkout.d.ts +9 -0
- package/dist/app/composables/schema/commerce/checkout.js +1 -0
- package/dist/app/composables/schema/commerce/company.d.ts +7 -0
- package/dist/app/composables/schema/commerce/company.js +1 -0
- package/dist/app/composables/schema/commerce/configurableProducts.d.ts +12 -0
- package/dist/app/composables/schema/commerce/configurableProducts.js +1 -0
- package/dist/app/composables/schema/commerce/coupons.d.ts +9 -0
- package/dist/app/composables/schema/commerce/coupons.js +1 -0
- package/dist/app/composables/schema/commerce/credit-memos.d.ts +48 -0
- package/dist/app/composables/schema/commerce/credit-memos.js +1 -0
- package/dist/app/composables/schema/commerce/digitalProducts.d.ts +11 -0
- package/dist/app/composables/schema/commerce/digitalProducts.js +1 -0
- package/dist/app/composables/schema/commerce/directory.d.ts +7 -0
- package/dist/app/composables/schema/commerce/directory.js +1 -0
- package/dist/app/composables/schema/commerce/events.d.ts +27 -0
- package/dist/app/composables/schema/commerce/events.js +1 -0
- package/dist/app/composables/schema/commerce/gift-registry.d.ts +7 -0
- package/dist/app/composables/schema/commerce/gift-registry.js +1 -0
- package/dist/app/composables/schema/commerce/guest-cart.d.ts +4 -0
- package/dist/app/composables/schema/commerce/guest-cart.js +1 -0
- package/dist/app/composables/schema/commerce/inventory.d.ts +8 -0
- package/dist/app/composables/schema/commerce/inventory.js +1 -0
- package/dist/app/composables/schema/commerce/invoices.d.ts +47 -0
- package/dist/app/composables/schema/commerce/invoices.js +1 -0
- package/dist/app/composables/schema/commerce/orders.d.ts +32 -0
- package/dist/app/composables/schema/commerce/orders.js +1 -0
- package/dist/app/composables/schema/commerce/payments.d.ts +8 -0
- package/dist/app/composables/schema/commerce/payments.js +1 -0
- package/dist/app/composables/schema/commerce/price.d.ts +9 -0
- package/dist/app/composables/schema/commerce/price.js +1 -0
- package/dist/app/composables/schema/commerce/product-types.d.ts +6 -0
- package/dist/app/composables/schema/commerce/product-types.js +1 -0
- package/dist/app/composables/schema/commerce/product.d.ts +20 -0
- package/dist/app/composables/schema/commerce/product.js +1 -0
- package/dist/app/composables/schema/commerce/quotes.d.ts +13 -0
- package/dist/app/composables/schema/commerce/quotes.js +1 -0
- package/dist/app/composables/schema/commerce/requisition-lists.d.ts +9 -0
- package/dist/app/composables/schema/commerce/requisition-lists.js +1 -0
- package/dist/app/composables/schema/commerce/returns.d.ts +8 -0
- package/dist/app/composables/schema/commerce/returns.js +1 -0
- package/dist/app/composables/schema/commerce/reward.d.ts +7 -0
- package/dist/app/composables/schema/commerce/reward.js +1 -0
- package/dist/app/composables/schema/commerce/rules.d.ts +7 -0
- package/dist/app/composables/schema/commerce/rules.js +1 -0
- package/dist/app/composables/schema/commerce/shipment.d.ts +18 -0
- package/dist/app/composables/schema/commerce/shipment.js +1 -0
- package/dist/app/composables/schema/commerce/shops.d.ts +8 -0
- package/dist/app/composables/schema/commerce/shops.js +1 -0
- package/dist/app/composables/schema/commerce/stockItems.d.ts +7 -0
- package/dist/app/composables/schema/commerce/stockItems.js +1 -0
- package/dist/app/composables/schema/commerce/store.d.ts +7 -0
- package/dist/app/composables/schema/commerce/store.js +1 -0
- package/dist/app/composables/schema/commerce/subscriptons.d.ts +9 -0
- package/dist/app/composables/schema/commerce/subscriptons.js +1 -0
- package/dist/app/composables/schema/commerce/taxRates.d.ts +7 -0
- package/dist/app/composables/schema/commerce/taxRates.js +1 -0
- package/dist/app/composables/schema/commerce/taxRules.d.ts +7 -0
- package/dist/app/composables/schema/commerce/taxRules.js +1 -0
- package/dist/app/composables/schema/commerce/teams.d.ts +6 -0
- package/dist/app/composables/schema/commerce/teams.js +1 -0
- package/dist/app/composables/schema/commerce/transactions.d.ts +11 -0
- package/dist/app/composables/schema/commerce/transactions.js +1 -0
- package/dist/app/composables/schema/identity/customerGroup.d.ts +7 -0
- package/dist/app/composables/schema/identity/customerGroup.js +1 -0
- package/dist/app/composables/schema/identity/user.d.ts +45 -0
- package/dist/app/composables/schema/identity/user.js +1 -0
- package/dist/app/composables/schema/media/asset.d.ts +28 -0
- package/dist/app/composables/schema/media/asset.js +1 -0
- package/dist/app/composables/schema/social/post.d.ts +25 -0
- package/dist/app/composables/schema/social/post.js +1 -0
- package/dist/app/composables/schema/social/profile.d.ts +22 -0
- package/dist/app/composables/schema/social/profile.js +1 -0
- package/dist/app/composables/schema/social/space.d.ts +17 -0
- package/dist/app/composables/schema/social/space.js +1 -0
- package/dist/app/composables/types.d.ts +11 -0
- package/dist/app/composables/types.js +1 -0
- package/dist/app/composables/useContent.d.ts +4 -0
- package/dist/app/composables/useContent.js +10 -0
- package/dist/app/composables/useDirectusRequest.d.ts +12 -0
- package/dist/app/composables/useDirectusRequest.js +83 -0
- package/dist/app/composables/utils/assert.d.ts +1 -0
- package/dist/app/composables/utils/assert.js +5 -0
- package/dist/app/composables/utils/deepMerge.d.ts +1 -0
- package/dist/app/composables/utils/deepMerge.js +15 -0
- package/dist/app/composables/utils/index.d.ts +4 -0
- package/dist/app/composables/utils/index.js +4 -0
- package/dist/app/composables/utils/isObject.d.ts +1 -0
- package/dist/app/composables/utils/isObject.js +5 -0
- package/dist/app/composables/utils/module.d.ts +4 -0
- package/dist/app/composables/utils/module.js +14 -0
- package/dist/app/composables/utils/safeGet.d.ts +1 -0
- package/dist/app/composables/utils/safeGet.js +5 -0
- package/dist/app/stores/index.d.ts +0 -0
- package/dist/app/stores/index.js +1 -0
- package/dist/app/utils/billing-address.d.ts +2 -0
- package/dist/app/utils/billing-address.js +18 -0
- package/dist/app/utils/color.d.ts +2 -0
- package/dist/app/utils/color.js +11 -0
- package/dist/app/utils/currency.d.ts +6 -0
- package/dist/app/utils/currency.js +20 -0
- package/dist/app/utils/embed.d.ts +2 -0
- package/dist/app/utils/embed.js +52 -0
- package/dist/app/utils/errors.d.ts +5 -0
- package/dist/app/utils/errors.js +6 -0
- package/dist/app/utils/fonts.d.ts +5 -0
- package/dist/app/utils/fonts.js +18 -0
- package/dist/app/utils/formkit.d.ts +12 -0
- package/dist/app/utils/formkit.js +59 -0
- package/dist/app/utils/icons.d.ts +4 -0
- package/dist/app/utils/icons.js +36 -0
- package/dist/app/utils/links.d.ts +7 -0
- package/dist/app/utils/links.js +21 -0
- package/dist/app/utils/lodash.d.ts +2 -0
- package/dist/app/utils/lodash.js +23 -0
- package/dist/app/utils/markdown.d.ts +1 -0
- package/dist/app/utils/markdown.js +8 -0
- package/dist/app/utils/math.d.ts +6 -0
- package/dist/app/utils/math.js +21 -0
- package/dist/app/utils/navigation.d.ts +2 -0
- package/dist/app/utils/navigation.js +9 -0
- package/dist/app/utils/objects.d.ts +3 -0
- package/dist/app/utils/objects.js +11 -0
- package/dist/app/utils/paths.d.ts +21 -0
- package/dist/app/utils/paths.js +21 -0
- package/dist/app/utils/relations.d.ts +9 -0
- package/dist/app/utils/relations.js +24 -0
- package/dist/app/utils/strings.d.ts +14 -0
- package/dist/app/utils/strings.js +92 -0
- package/dist/app/utils/time.d.ts +13 -0
- package/dist/app/utils/time.js +124 -0
- package/dist/app/utils/url.d.ts +12 -0
- package/dist/app/utils/url.js +20 -0
- package/dist/app/utils/user-name.d.ts +2 -0
- package/dist/app/utils/user-name.js +15 -0
- package/dist/blocks/block-button-group.d.ts +6 -0
- package/dist/blocks/block-button-group.js +1 -0
- package/dist/blocks/block-button.d.ts +13 -0
- package/dist/blocks/block-button.js +1 -0
- package/dist/blocks/block-column.d.ts +18 -0
- package/dist/blocks/block-column.js +1 -0
- package/dist/blocks/block-cta.d.ts +11 -0
- package/dist/blocks/block-cta.js +1 -0
- package/dist/blocks/block-divider.d.ts +4 -0
- package/dist/blocks/block-divider.js +1 -0
- package/dist/blocks/block-faq.d.ts +11 -0
- package/dist/blocks/block-faq.js +1 -0
- package/dist/blocks/block-form.d.ts +7 -0
- package/dist/blocks/block-form.js +1 -0
- package/dist/blocks/block-gallery.d.ts +13 -0
- package/dist/blocks/block-gallery.js +1 -0
- package/dist/blocks/block-hero.d.ts +11 -0
- package/dist/blocks/block-hero.js +1 -0
- package/dist/blocks/block-html.d.ts +4 -0
- package/dist/blocks/block-html.js +1 -0
- package/dist/blocks/block-logocloud.d.ts +13 -0
- package/dist/blocks/block-logocloud.js +1 -0
- package/dist/blocks/block-quote.d.ts +10 -0
- package/dist/blocks/block-quote.js +1 -0
- package/dist/blocks/block-richtext.d.ts +7 -0
- package/dist/blocks/block-richtext.js +1 -0
- package/dist/blocks/block-steps.d.ts +21 -0
- package/dist/blocks/block-steps.js +1 -0
- package/dist/blocks/block-team.d.ts +6 -0
- package/dist/blocks/block-team.js +1 -0
- package/dist/blocks/block-testimonial.d.ts +13 -0
- package/dist/blocks/block-testimonial.js +1 -0
- package/dist/blocks/block-video.d.ts +9 -0
- package/dist/blocks/block-video.js +1 -0
- package/dist/blocks/block.d.ts +17 -0
- package/dist/blocks/block.js +1 -0
- package/dist/blocks/index.d.ts +18 -0
- package/dist/blocks/index.js +1 -0
- package/dist/componentMap.d.ts +6 -0
- package/dist/componentMap.js +8 -0
- package/dist/content/category.d.ts +10 -0
- package/dist/content/category.js +1 -0
- package/dist/content/form.d.ts +21 -0
- package/dist/content/form.js +1 -0
- package/dist/content/index.d.ts +6 -0
- package/dist/content/index.js +1 -0
- package/dist/content/page.d.ts +38 -0
- package/dist/content/page.js +1 -0
- package/dist/content/post.d.ts +38 -0
- package/dist/content/post.js +1 -0
- package/dist/content/team.d.ts +17 -0
- package/dist/content/team.js +1 -0
- package/dist/content/testimonial.d.ts +18 -0
- package/dist/content/testimonial.js +1 -0
- package/dist/help/index.d.ts +51 -0
- package/dist/help/index.js +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1 -0
- package/dist/meta/analytics.d.ts +21 -0
- package/dist/meta/analytics.js +1 -0
- package/dist/meta/config.d.ts +22 -0
- package/dist/meta/config.js +1 -0
- package/dist/meta/globals.d.ts +33 -0
- package/dist/meta/globals.js +1 -0
- package/dist/meta/index.d.ts +6 -0
- package/dist/meta/index.js +1 -0
- package/dist/meta/navigation.d.ts +31 -0
- package/dist/meta/navigation.js +1 -0
- package/dist/meta/redirect.d.ts +12 -0
- package/dist/meta/redirect.js +1 -0
- package/dist/meta/seo.d.ts +19 -0
- package/dist/meta/seo.js +1 -0
- package/dist/os/contact.d.ts +22 -0
- package/dist/os/contact.js +1 -0
- package/dist/os/conversation.d.ts +23 -0
- package/dist/os/conversation.js +1 -0
- package/dist/os/index.d.ts +16 -0
- package/dist/os/index.js +1 -0
- package/dist/os/organization.d.ts +51 -0
- package/dist/os/organization.js +1 -0
- package/dist/os/os-activity.d.ts +26 -0
- package/dist/os/os-activity.js +1 -0
- package/dist/os/os-deal.d.ts +42 -0
- package/dist/os/os-deal.js +1 -0
- package/dist/os/os-expense.d.ts +21 -0
- package/dist/os/os-expense.js +1 -0
- package/dist/os/os-invoice.d.ts +46 -0
- package/dist/os/os-invoice.js +1 -0
- package/dist/os/os-item.d.ts +17 -0
- package/dist/os/os-item.js +1 -0
- package/dist/os/os-payment.d.ts +27 -0
- package/dist/os/os-payment.js +1 -0
- package/dist/os/os-project.d.ts +45 -0
- package/dist/os/os-project.js +1 -0
- package/dist/os/os-proposal.d.ts +61 -0
- package/dist/os/os-proposal.js +1 -0
- package/dist/os/os-settings.d.ts +17 -0
- package/dist/os/os-settings.js +1 -0
- package/dist/os/os-subscription.d.ts +12 -0
- package/dist/os/os-subscription.js +1 -0
- package/dist/os/os-task.d.ts +32 -0
- package/dist/os/os-task.js +1 -0
- package/dist/os/os-tax-rate.d.ts +12 -0
- package/dist/os/os-tax-rate.js +1 -0
- package/dist/package.json +72 -0
- package/dist/pageComponentMap.d.ts +2 -0
- package/dist/pageComponentMap.js +7 -0
- package/dist/schema.d.ts +78 -0
- package/dist/schema.js +1 -0
- package/dist/system/file.d.ts +47 -0
- package/dist/system/file.js +1 -0
- package/dist/system/folder.d.ts +8 -0
- package/dist/system/folder.js +1 -0
- package/dist/system/index.d.ts +4 -0
- package/dist/system/index.js +1 -0
- package/dist/system/role.d.ts +20 -0
- package/dist/system/role.js +1 -0
- package/dist/system/user.d.ts +57 -0
- package/dist/system/user.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/i18n/.gitkeep +0 -0
- package/i18n/config.ts +9 -0
- package/i18n/da_DK.json +613 -0
- package/i18n/de-DE/account.json +100 -0
- package/i18n/de-DE/cart.json +19 -0
- package/i18n/de-DE/changePassword.json +15 -0
- package/i18n/de-DE/checkout.json +68 -0
- package/i18n/de-DE/de-DE.ts +27 -0
- package/i18n/de-DE/errors.json +46 -0
- package/i18n/de-DE/form.json +42 -0
- package/i18n/de-DE/general.json +62 -0
- package/i18n/de-DE/listing.json +15 -0
- package/i18n/de-DE/newsletter.json +11 -0
- package/i18n/de-DE/product.json +48 -0
- package/i18n/de-DE/recoveryPassword.json +21 -0
- package/i18n/de-DE/validations.json +24 -0
- package/i18n/de_DE.json +613 -0
- package/i18n/en-GB/account.json +102 -0
- package/i18n/en-GB/cart.json +19 -0
- package/i18n/en-GB/changePassword.json +15 -0
- package/i18n/en-GB/checkout.json +68 -0
- package/i18n/en-GB/en-GB.ts +27 -0
- package/i18n/en-GB/errors.json +47 -0
- package/i18n/en-GB/form.json +42 -0
- package/i18n/en-GB/general.json +64 -0
- package/i18n/en-GB/listing.json +15 -0
- package/i18n/en-GB/newsletter.json +11 -0
- package/i18n/en-GB/product.json +48 -0
- package/i18n/en-GB/recoveryPassword.json +21 -0
- package/i18n/en-GB/validations.json +24 -0
- package/i18n/en_US.json +264 -0
- package/i18n/es_ES.json +613 -0
- package/i18n/fa_IR.json +613 -0
- package/i18n/fi_FI.json +613 -0
- package/i18n/fr_FR.json +613 -0
- package/i18n/it_IT.json +613 -0
- package/i18n/lv_LV.json +613 -0
- package/i18n/nb_NO.json +613 -0
- package/i18n/nl_NL.json +613 -0
- package/i18n/pl-PL/account.json +100 -0
- package/i18n/pl-PL/cart.json +19 -0
- package/i18n/pl-PL/changePassword.json +15 -0
- package/i18n/pl-PL/checkout.json +69 -0
- package/i18n/pl-PL/errors.json +46 -0
- package/i18n/pl-PL/form.json +42 -0
- package/i18n/pl-PL/general.json +64 -0
- package/i18n/pl-PL/listing.json +15 -0
- package/i18n/pl-PL/newsletter.json +11 -0
- package/i18n/pl-PL/pl-PL.ts +25 -0
- package/i18n/pl-PL/product.json +48 -0
- package/i18n/pl-PL/recoveryPassword.json +21 -0
- package/i18n/pl-PL/validations.json +24 -0
- package/i18n/pl_PL.json +613 -0
- package/i18n/pt_BR.json +613 -0
- package/i18n/ru_RU.json +613 -0
- package/i18n/sl_SI.json +613 -0
- package/i18n/src/helpers/prefix.ts +17 -0
- package/i18n/src/langs/de-DE.ts +2 -0
- package/i18n/src/langs/en-GB.ts +2 -0
- package/i18n/src/langs/pl-PL.ts +2 -0
- package/i18n/sv_SE.json +613 -0
- package/i18n/tr_TR.json +613 -0
- package/i18n/utils/i18n-validators.ts +31 -0
- package/i18n/zh_TW.json +613 -0
- package/nuxt.config.ts +91 -0
- package/package.json +72 -0
- package/prisma/generated/browser.ts +44 -0
- package/prisma/generated/client.ts +66 -0
- package/prisma/generated/commonInputTypes.ts +432 -0
- package/prisma/generated/enums.ts +15 -0
- package/prisma/generated/internal/class.ts +232 -0
- package/prisma/generated/internal/prismaNamespace.ts +1154 -0
- package/prisma/generated/internal/prismaNamespaceBrowser.ts +179 -0
- package/prisma/generated/models/Account.ts +1620 -0
- package/prisma/generated/models/Session.ts +1484 -0
- package/prisma/generated/models/Upload.ts +1291 -0
- package/prisma/generated/models/User.ts +1780 -0
- package/prisma/generated/models/Verification.ts +1172 -0
- package/prisma/generated/models.ts +16 -0
- package/prisma/schema.prisma +102 -0
- package/runtime/plugins/vuetify.ts +12 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export function omit(object, keysToOmit) {
|
|
2
|
+
const result = { ...object };
|
|
3
|
+
for (const key of keysToOmit) {
|
|
4
|
+
delete result[key];
|
|
5
|
+
}
|
|
6
|
+
return result;
|
|
7
|
+
}
|
|
8
|
+
export function get(object, path, defaultValue) {
|
|
9
|
+
if (typeof path === 'string') {
|
|
10
|
+
path = path.split('.').map((key) => {
|
|
11
|
+
const numKey = Number(key);
|
|
12
|
+
return isNaN(numKey) ? key : numKey;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
let result = object;
|
|
16
|
+
for (const key of path) {
|
|
17
|
+
if (result === undefined || result === null) {
|
|
18
|
+
return defaultValue;
|
|
19
|
+
}
|
|
20
|
+
result = result[key];
|
|
21
|
+
}
|
|
22
|
+
return result !== undefined ? result : defaultValue;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function markdownToHtml(markdown: string): any;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare function formatPercent(number: number): string;
|
|
2
|
+
declare function percentChange(num1: number, num2: number): number;
|
|
3
|
+
declare function roundToDecimal(value: number | string, decimals: number | string): number;
|
|
4
|
+
declare function isEven(n: number): boolean;
|
|
5
|
+
declare function isOdd(n: number): boolean;
|
|
6
|
+
export { formatPercent, percentChange, roundToDecimal, isEven, isOdd };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
function formatPercent(number) {
|
|
2
|
+
return Number((number * 100).toFixed(1)) + '%';
|
|
3
|
+
}
|
|
4
|
+
function percentChange(num1, num2) {
|
|
5
|
+
if (num1 === 0 || num2 === 0)
|
|
6
|
+
return 0;
|
|
7
|
+
return (num1 - num2) / num1;
|
|
8
|
+
}
|
|
9
|
+
function roundToDecimal(value, decimals) {
|
|
10
|
+
const val = typeof value === 'string' ? parseFloat(value) : value;
|
|
11
|
+
const dec = typeof decimals === 'string' ? parseInt(decimals, 10) : decimals;
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
return Number(Math.round(val + 'e' + dec) + 'e-' + dec);
|
|
14
|
+
}
|
|
15
|
+
function isEven(n) {
|
|
16
|
+
return n % 2 === 0;
|
|
17
|
+
}
|
|
18
|
+
function isOdd(n) {
|
|
19
|
+
return Math.abs(n % 2) === 1;
|
|
20
|
+
}
|
|
21
|
+
export { formatPercent, percentChange, roundToDecimal, isEven, isOdd };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Clone an onbject deeply
|
|
2
|
+
export function cloneObject(obj) {
|
|
3
|
+
return JSON.parse(JSON.stringify(obj));
|
|
4
|
+
}
|
|
5
|
+
// Clone an array deeply
|
|
6
|
+
export function cloneArray(arr) {
|
|
7
|
+
return JSON.parse(JSON.stringify(arr));
|
|
8
|
+
}
|
|
9
|
+
export function isObject(objValue) {
|
|
10
|
+
return objValue && typeof objValue === 'object' && objValue.constructor === Object;
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const paths: {
|
|
2
|
+
home: string;
|
|
3
|
+
category: string;
|
|
4
|
+
product: string;
|
|
5
|
+
cart: string;
|
|
6
|
+
checkout: string;
|
|
7
|
+
search: string;
|
|
8
|
+
account: string;
|
|
9
|
+
orderSuccess: string;
|
|
10
|
+
orderFailed: string;
|
|
11
|
+
accountPersonalData: string;
|
|
12
|
+
accountBillingDetails: string;
|
|
13
|
+
accountShippingDetails: string;
|
|
14
|
+
accountMyOrders: string;
|
|
15
|
+
accountReturns: string;
|
|
16
|
+
authResetPassword: string;
|
|
17
|
+
authResetPasswordSuccess: string;
|
|
18
|
+
authSetNewPassword: string;
|
|
19
|
+
authLogin: string;
|
|
20
|
+
authSignup: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const paths = {
|
|
2
|
+
home: '/',
|
|
3
|
+
category: '/category',
|
|
4
|
+
product: '/product/',
|
|
5
|
+
cart: '/cart',
|
|
6
|
+
checkout: '/checkout',
|
|
7
|
+
search: '/search',
|
|
8
|
+
account: '/my-account',
|
|
9
|
+
orderSuccess: '/order/success',
|
|
10
|
+
orderFailed: '/order/failed',
|
|
11
|
+
accountPersonalData: '/my-account/personal-data',
|
|
12
|
+
accountBillingDetails: '/my-account/billing-details',
|
|
13
|
+
accountShippingDetails: '/my-account/shipping-details',
|
|
14
|
+
accountMyOrders: '/my-account/my-orders',
|
|
15
|
+
accountReturns: '/my-account/returns',
|
|
16
|
+
authResetPassword: '/reset-password',
|
|
17
|
+
authResetPasswordSuccess: '/reset-password-success',
|
|
18
|
+
authSetNewPassword: '/set-new-password',
|
|
19
|
+
authLogin: '/login',
|
|
20
|
+
authSignup: '/signup',
|
|
21
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function safeRelation(idOrObject: string | {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
} | null | undefined): {
|
|
4
|
+
id: string;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
} | null | undefined;
|
|
7
|
+
export declare function safeRelationId(idOrObject: string | {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
} | null | undefined): string | null | undefined;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export function safeRelation(idOrObject) {
|
|
2
|
+
if (!idOrObject)
|
|
3
|
+
return undefined;
|
|
4
|
+
if (typeof idOrObject === 'string') {
|
|
5
|
+
return {
|
|
6
|
+
id: idOrObject,
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
if (idOrObject.id) {
|
|
10
|
+
return idOrObject.id;
|
|
11
|
+
}
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
export function safeRelationId(idOrObject) {
|
|
15
|
+
if (!idOrObject)
|
|
16
|
+
return null;
|
|
17
|
+
if (typeof idOrObject === 'string') {
|
|
18
|
+
return idOrObject;
|
|
19
|
+
}
|
|
20
|
+
if (idOrObject.id) {
|
|
21
|
+
return idOrObject.id;
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare function generateId(): string;
|
|
2
|
+
declare function stripHTML(original: string | undefined): string | undefined;
|
|
3
|
+
declare function truncateString(str: string | undefined, num: number): string | undefined;
|
|
4
|
+
declare function truncateHTML(html: string | undefined, num: number): string | undefined;
|
|
5
|
+
declare function slugify(str: string | undefined): string | undefined;
|
|
6
|
+
declare function deslugify(str: string | undefined): string | undefined;
|
|
7
|
+
declare function getDomainNameFromEmail(email: string): string;
|
|
8
|
+
declare function toTitleCase(str: string | undefined): string | undefined;
|
|
9
|
+
declare function snakeToCamel(s: string): string;
|
|
10
|
+
declare function convertIconName(name: string): string | null | undefined;
|
|
11
|
+
declare function snakeToKebab(s: string): string;
|
|
12
|
+
declare function maybePluralize(count: number, noun: string, suffix?: string): string;
|
|
13
|
+
declare function calculateReadTime(str: string | undefined, wordsPerMinute?: number): string | undefined;
|
|
14
|
+
export { generateId, stripHTML, truncateHTML, truncateString, maybePluralize, toTitleCase, snakeToCamel, snakeToKebab, convertIconName, slugify, deslugify, getDomainNameFromEmail, calculateReadTime, };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
2
|
+
function generateId() {
|
|
3
|
+
return uuidv4();
|
|
4
|
+
}
|
|
5
|
+
function stripHTML(original) {
|
|
6
|
+
if (!original)
|
|
7
|
+
return;
|
|
8
|
+
else
|
|
9
|
+
return original.replace(/(<([^>]+)>)/gi, '');
|
|
10
|
+
}
|
|
11
|
+
function truncateString(str, num) {
|
|
12
|
+
if (!str)
|
|
13
|
+
return;
|
|
14
|
+
if (str.length <= num) {
|
|
15
|
+
return str;
|
|
16
|
+
}
|
|
17
|
+
return str.slice(0, num) + '...';
|
|
18
|
+
}
|
|
19
|
+
function truncateHTML(html, num) {
|
|
20
|
+
if (!html)
|
|
21
|
+
return;
|
|
22
|
+
return truncateString(stripHTML(html), num);
|
|
23
|
+
}
|
|
24
|
+
// Slugify a string for hyphens and underscores
|
|
25
|
+
function slugify(str) {
|
|
26
|
+
if (!str)
|
|
27
|
+
return;
|
|
28
|
+
return str
|
|
29
|
+
.toString()
|
|
30
|
+
.trim()
|
|
31
|
+
.toLowerCase()
|
|
32
|
+
.replace(/[^\w ]+/g, '')
|
|
33
|
+
.replace(/ +/g, '-');
|
|
34
|
+
}
|
|
35
|
+
// Deslugify a string for hyphens and underscores and capitalize each word
|
|
36
|
+
function deslugify(str) {
|
|
37
|
+
if (!str)
|
|
38
|
+
return;
|
|
39
|
+
return str
|
|
40
|
+
.trim()
|
|
41
|
+
.toLowerCase()
|
|
42
|
+
.replace(/[-_]+/g, ' ')
|
|
43
|
+
.replace(/ +/g, ' ')
|
|
44
|
+
.replace(/(^| )(\w)/g, (s) => s.toUpperCase());
|
|
45
|
+
}
|
|
46
|
+
function getDomainNameFromEmail(email) {
|
|
47
|
+
const temp = email.replace(/.*@/, '').split('.');
|
|
48
|
+
return temp[temp.length - 2] ?? temp[0] ?? '';
|
|
49
|
+
}
|
|
50
|
+
function toTitleCase(str) {
|
|
51
|
+
if (!str)
|
|
52
|
+
return;
|
|
53
|
+
return str.replace(/\w\S*/g, function (txt) {
|
|
54
|
+
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function snakeToCamel(s) {
|
|
58
|
+
return s.replace(/_(\w)/g, function (_m, p1) {
|
|
59
|
+
return p1 ? p1.toUpperCase() : '';
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function convertIconName(name) {
|
|
63
|
+
if (!name)
|
|
64
|
+
return;
|
|
65
|
+
// Convert the icon coming from the API to the name of the icon component
|
|
66
|
+
// Directus uses Google Material Icons and the icon values are snake_case (e.g. "account_circle")
|
|
67
|
+
const prefix = 'material-symbols:';
|
|
68
|
+
// Change snake case to kebab case
|
|
69
|
+
const kebabCase = name.replace(/_/g, '-');
|
|
70
|
+
const iconName = prefix + kebabCase;
|
|
71
|
+
return iconName;
|
|
72
|
+
}
|
|
73
|
+
function snakeToKebab(s) {
|
|
74
|
+
return s.replace(/_(\w)/g, function (_m, p1) {
|
|
75
|
+
return p1 ? '-' + p1.toLowerCase() : '';
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function maybePluralize(count, noun, suffix = 's') {
|
|
79
|
+
return `${noun}${count !== 1 ? suffix : ''}`;
|
|
80
|
+
}
|
|
81
|
+
// Calculate read time for a string
|
|
82
|
+
function calculateReadTime(str, wordsPerMinute = 200) {
|
|
83
|
+
if (!str)
|
|
84
|
+
return;
|
|
85
|
+
// Strip HTML tags
|
|
86
|
+
str = str.replace(/(<([^>]+)>)/gi, '');
|
|
87
|
+
const noOfWords = str.split(/\s/g).length;
|
|
88
|
+
const minutes = noOfWords / wordsPerMinute;
|
|
89
|
+
const readTime = Math.ceil(minutes);
|
|
90
|
+
return readTime + ' min read';
|
|
91
|
+
}
|
|
92
|
+
export { generateId, stripHTML, truncateHTML, truncateString, maybePluralize, toTitleCase, snakeToCamel, snakeToKebab, convertIconName, slugify, deslugify, getDomainNameFromEmail, calculateReadTime, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const monthsAbbr: string[];
|
|
2
|
+
declare function getRelativeTime(d1: Date | string, d2?: Date): string;
|
|
3
|
+
declare function getFriendlyDate(dateString: string, { monthAbbr }?: {
|
|
4
|
+
monthAbbr?: {} | undefined;
|
|
5
|
+
}): string;
|
|
6
|
+
declare function destructureDate(date: string): Record<string, number | string>;
|
|
7
|
+
declare function greetUser(): string;
|
|
8
|
+
declare function subtractDates(date1: string | number | Date, date2: string | number | Date, unit?: string): number;
|
|
9
|
+
declare function toDateTime(secs: number): Date;
|
|
10
|
+
declare function getMonth(dateString: string): string;
|
|
11
|
+
declare function getDate(dateString: string): number;
|
|
12
|
+
declare function getDay(dateString: string): string;
|
|
13
|
+
export { getRelativeTime, getFriendlyDate, greetUser, toDateTime, subtractDates as subtractDates, monthsAbbr, destructureDate, getMonth, getDate, getDay, };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
const months = [
|
|
2
|
+
'January',
|
|
3
|
+
'February',
|
|
4
|
+
'March',
|
|
5
|
+
'April',
|
|
6
|
+
'May',
|
|
7
|
+
'June',
|
|
8
|
+
'July',
|
|
9
|
+
'August',
|
|
10
|
+
'September',
|
|
11
|
+
'October',
|
|
12
|
+
'November',
|
|
13
|
+
'December',
|
|
14
|
+
];
|
|
15
|
+
const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
16
|
+
const monthsAbbr = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
17
|
+
const daysAbbr = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
18
|
+
const units = {
|
|
19
|
+
year: 24 * 60 * 60 * 1000 * 365,
|
|
20
|
+
month: (24 * 60 * 60 * 1000 * 365) / 12,
|
|
21
|
+
week: 24 * 60 * 60 * 1000 * 7,
|
|
22
|
+
day: 24 * 60 * 60 * 1000,
|
|
23
|
+
hour: 60 * 60 * 1000,
|
|
24
|
+
minute: 60 * 1000,
|
|
25
|
+
second: 1000,
|
|
26
|
+
};
|
|
27
|
+
const rtf = new Intl.RelativeTimeFormat('en', { numeric: 'auto' });
|
|
28
|
+
function getRelativeTime(d1, d2 = new Date()) {
|
|
29
|
+
if (!(d1 instanceof Date))
|
|
30
|
+
d1 = new Date(d1);
|
|
31
|
+
const elapsed = d1.getTime() - d2.getTime();
|
|
32
|
+
for (const u in units) {
|
|
33
|
+
if (Math.abs(elapsed) > units[u] || u === 'second') {
|
|
34
|
+
return rtf.format(Math.round(elapsed / units[u]), u);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return '';
|
|
38
|
+
}
|
|
39
|
+
function getFriendlyDate(dateString, { monthAbbr = {} } = {}) {
|
|
40
|
+
const d = new Date(dateString);
|
|
41
|
+
const year = d.getFullYear();
|
|
42
|
+
const date = d.getDate();
|
|
43
|
+
const dateSuffix = (date) => {
|
|
44
|
+
if (date > 3 && date < 21)
|
|
45
|
+
return 'th';
|
|
46
|
+
switch (date % 10) {
|
|
47
|
+
case 1:
|
|
48
|
+
return 'st';
|
|
49
|
+
case 2:
|
|
50
|
+
return 'nd';
|
|
51
|
+
case 3:
|
|
52
|
+
return 'rd';
|
|
53
|
+
default:
|
|
54
|
+
return 'th';
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const monthIndex = d.getMonth();
|
|
58
|
+
const monthName = monthAbbr ? monthsAbbr[monthIndex] : months[monthIndex];
|
|
59
|
+
const dayName = daysAbbr[d.getDay()];
|
|
60
|
+
const formatted = `${dayName}, ${monthName} ${date}${dateSuffix(date)}, ${year}`;
|
|
61
|
+
return formatted;
|
|
62
|
+
}
|
|
63
|
+
function destructureDate(date) {
|
|
64
|
+
const d = new Date(date);
|
|
65
|
+
const year = d.getFullYear();
|
|
66
|
+
const month = d.getMonth();
|
|
67
|
+
const day = d.getDate();
|
|
68
|
+
const dayName = days[d.getDay()];
|
|
69
|
+
const monthName = monthsAbbr[month];
|
|
70
|
+
const hour = d.getHours();
|
|
71
|
+
const minute = d.getMinutes();
|
|
72
|
+
const second = d.getSeconds();
|
|
73
|
+
return { year, month, day, hour, minute, second, dayName, monthName };
|
|
74
|
+
}
|
|
75
|
+
function greetUser() {
|
|
76
|
+
const hour = new Date().getHours();
|
|
77
|
+
if (hour < 12)
|
|
78
|
+
return 'Good Morning';
|
|
79
|
+
if (hour < 18)
|
|
80
|
+
return 'Good Afternoon';
|
|
81
|
+
return 'Good Evening';
|
|
82
|
+
}
|
|
83
|
+
function subtractDates(date1, date2, unit) {
|
|
84
|
+
if (isNaN(date1) || isNaN(date2)) {
|
|
85
|
+
date1 = new Date(date1);
|
|
86
|
+
date2 = new Date(date2);
|
|
87
|
+
}
|
|
88
|
+
const diff = date1.getTime() - date2.getTime();
|
|
89
|
+
if (unit === 'years')
|
|
90
|
+
return diff / units.year;
|
|
91
|
+
if (unit === 'months')
|
|
92
|
+
return diff / units.month;
|
|
93
|
+
if (unit === 'weeks')
|
|
94
|
+
return diff / units.week;
|
|
95
|
+
if (unit === 'days')
|
|
96
|
+
return diff / units.day;
|
|
97
|
+
if (unit === 'hours')
|
|
98
|
+
return diff / units.hour;
|
|
99
|
+
if (unit === 'minutes')
|
|
100
|
+
return diff / units.minute;
|
|
101
|
+
if (unit === 'seconds')
|
|
102
|
+
return diff / units.second;
|
|
103
|
+
return diff;
|
|
104
|
+
}
|
|
105
|
+
function toDateTime(secs) {
|
|
106
|
+
const t = new Date('1970-01-01T00:30:00Z');
|
|
107
|
+
t.setSeconds(secs);
|
|
108
|
+
return t;
|
|
109
|
+
}
|
|
110
|
+
function getMonth(dateString) {
|
|
111
|
+
const d = new Date(dateString);
|
|
112
|
+
const monthIndex = d.getMonth();
|
|
113
|
+
return monthsAbbr[monthIndex];
|
|
114
|
+
}
|
|
115
|
+
function getDate(dateString) {
|
|
116
|
+
const d = new Date(dateString);
|
|
117
|
+
return d.getDate();
|
|
118
|
+
}
|
|
119
|
+
function getDay(dateString) {
|
|
120
|
+
const d = new Date(dateString);
|
|
121
|
+
const dayIndex = d.getDay();
|
|
122
|
+
return days[dayIndex];
|
|
123
|
+
}
|
|
124
|
+
export { getRelativeTime, getFriendlyDate, greetUser, toDateTime, subtractDates as subtractDates, monthsAbbr, destructureDate, getMonth, getDate, getDay, };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encode filename for URL usage
|
|
3
|
+
*/
|
|
4
|
+
export declare function encodeImageSlug(pathname: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Decode URL slug back to filename
|
|
7
|
+
*/
|
|
8
|
+
export declare function decodeImageSlug(slug: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Check if two image paths match (handling encoding)
|
|
11
|
+
*/
|
|
12
|
+
export declare function isImageMatch(pathname: string, slug: string): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encode filename for URL usage
|
|
3
|
+
*/
|
|
4
|
+
export function encodeImageSlug(pathname) {
|
|
5
|
+
return encodeURIComponent(pathname.split('.')[0]);
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Decode URL slug back to filename
|
|
9
|
+
*/
|
|
10
|
+
export function decodeImageSlug(slug) {
|
|
11
|
+
return decodeURIComponent(slug);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Check if two image paths match (handling encoding)
|
|
15
|
+
*/
|
|
16
|
+
export function isImageMatch(pathname, slug) {
|
|
17
|
+
const imageName = pathname.split('.')[0];
|
|
18
|
+
const decodedSlug = decodeImageSlug(slug);
|
|
19
|
+
return imageName === decodedSlug;
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function userName(user) {
|
|
2
|
+
if (!user) {
|
|
3
|
+
return 'Unknown User';
|
|
4
|
+
}
|
|
5
|
+
if (user.first_name && user.last_name) {
|
|
6
|
+
return `${user.first_name} ${user.last_name}`;
|
|
7
|
+
}
|
|
8
|
+
if (user.first_name) {
|
|
9
|
+
return user.first_name;
|
|
10
|
+
}
|
|
11
|
+
if (user.email) {
|
|
12
|
+
return user.email;
|
|
13
|
+
}
|
|
14
|
+
return 'Unknown User';
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Post, Page } from '../content';
|
|
2
|
+
export interface BlockButton {
|
|
3
|
+
id: string;
|
|
4
|
+
sort: number | null;
|
|
5
|
+
type: ('pages' | 'posts' | 'external') | null;
|
|
6
|
+
label: string | null;
|
|
7
|
+
color: 'primary' | 'white' | 'gray' | 'white' | 'black';
|
|
8
|
+
variant: 'solid' | 'outline' | 'ghost' | 'link' | 'soft';
|
|
9
|
+
page: string | Page | null;
|
|
10
|
+
post: string | Post | null;
|
|
11
|
+
external_url: string | null;
|
|
12
|
+
icon: string | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { File } from '../system';
|
|
2
|
+
import type { BlockButtonGroup } from '.';
|
|
3
|
+
export interface BlockColumn {
|
|
4
|
+
headline?: string | null;
|
|
5
|
+
id?: string;
|
|
6
|
+
title?: string | null;
|
|
7
|
+
rows?: (number | BlockColumnRow)[];
|
|
8
|
+
}
|
|
9
|
+
export interface BlockColumnRow {
|
|
10
|
+
block_columns?: (string | BlockColumn) | null;
|
|
11
|
+
content?: string | null;
|
|
12
|
+
headline?: string | null;
|
|
13
|
+
id?: string;
|
|
14
|
+
image?: (string | File) | null;
|
|
15
|
+
image_position?: string | null;
|
|
16
|
+
title?: string | null;
|
|
17
|
+
button_group?: (string | BlockButtonGroup) | null;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BlockButtonGroup } from '.';
|
|
2
|
+
export interface BlockCta {
|
|
3
|
+
buttons?: {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
} | null;
|
|
6
|
+
content?: string | null;
|
|
7
|
+
headline?: string | null;
|
|
8
|
+
id?: string;
|
|
9
|
+
title?: string | null;
|
|
10
|
+
button_group?: (string | BlockButtonGroup) | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface BlockFaq {
|
|
2
|
+
faqs?: BlockFaqQuestion[] | null;
|
|
3
|
+
headline?: string | null;
|
|
4
|
+
id?: string;
|
|
5
|
+
title?: string | null;
|
|
6
|
+
alignment?: 'left' | 'center' | null;
|
|
7
|
+
}
|
|
8
|
+
export interface BlockFaqQuestion {
|
|
9
|
+
title: string | null;
|
|
10
|
+
answer: string | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { File } from '../system';
|
|
2
|
+
export interface BlockGallery {
|
|
3
|
+
headline?: string | null;
|
|
4
|
+
id?: string;
|
|
5
|
+
title?: string | null;
|
|
6
|
+
gallery_items?: BlockGalleryFile[] | null;
|
|
7
|
+
}
|
|
8
|
+
export interface BlockGalleryFile {
|
|
9
|
+
block_gallery?: (string | BlockGallery) | null;
|
|
10
|
+
directus_files_id?: (string | File) | null;
|
|
11
|
+
id?: number;
|
|
12
|
+
sort?: number | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { File } from '../system';
|
|
2
|
+
import type { BlockButtonGroup } from '.';
|
|
3
|
+
export interface BlockHero {
|
|
4
|
+
id?: string;
|
|
5
|
+
title?: string | null;
|
|
6
|
+
headline?: string | null;
|
|
7
|
+
content?: string | null;
|
|
8
|
+
image?: (string | File) | null;
|
|
9
|
+
image_position?: 'left' | 'right' | null;
|
|
10
|
+
button_group?: (string | BlockButtonGroup) | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { File } from '../system';
|
|
2
|
+
export interface BlockLogocloud {
|
|
3
|
+
headline?: string | null;
|
|
4
|
+
id?: string;
|
|
5
|
+
title?: string | null;
|
|
6
|
+
logos?: (string | BlockLogocloudFile)[];
|
|
7
|
+
}
|
|
8
|
+
export interface BlockLogocloudFile {
|
|
9
|
+
id?: string;
|
|
10
|
+
sort?: number | null;
|
|
11
|
+
block_logocloud_id?: (string | BlockLogocloud) | null;
|
|
12
|
+
directus_files_id?: (string | File) | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|