@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,28 @@
|
|
|
1
|
+
export interface MeeoviAsset {
|
|
2
|
+
id: string;
|
|
3
|
+
storage: string;
|
|
4
|
+
filename_disk?: string | null;
|
|
5
|
+
filename_download: string;
|
|
6
|
+
title?: string | null;
|
|
7
|
+
type?: string | null;
|
|
8
|
+
folder?: string | null;
|
|
9
|
+
uploaded_by?: string | null;
|
|
10
|
+
created_on: string;
|
|
11
|
+
modified_by?: string | null;
|
|
12
|
+
modified_on?: string;
|
|
13
|
+
charset?: string | null;
|
|
14
|
+
filesize?: string | null;
|
|
15
|
+
width?: number | null;
|
|
16
|
+
height?: number | null;
|
|
17
|
+
duration?: number | null;
|
|
18
|
+
embed?: string | null;
|
|
19
|
+
description?: string | null;
|
|
20
|
+
location?: string | null;
|
|
21
|
+
tags?: string | null;
|
|
22
|
+
metadata?: Record<string, unknown> | null;
|
|
23
|
+
focal_point_x?: number | null;
|
|
24
|
+
focal_point_y?: number | null;
|
|
25
|
+
tus_id?: string | null;
|
|
26
|
+
tus_data?: Record<string, unknown> | null;
|
|
27
|
+
uploaded_on?: string | null;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface MeeoviPost {
|
|
2
|
+
id: number;
|
|
3
|
+
user_created?: string | null;
|
|
4
|
+
date_created?: string | null;
|
|
5
|
+
content?: string | null;
|
|
6
|
+
file?: string | null;
|
|
7
|
+
username?: string | null;
|
|
8
|
+
user_avatar?: string | null;
|
|
9
|
+
image?: string | null;
|
|
10
|
+
title?: string | null;
|
|
11
|
+
type?: string | null;
|
|
12
|
+
status?: string | null;
|
|
13
|
+
audio?: string | null;
|
|
14
|
+
slug?: string | null;
|
|
15
|
+
author?: string | null;
|
|
16
|
+
pinned_post?: boolean | null;
|
|
17
|
+
auto_publish?: boolean | null;
|
|
18
|
+
mastodon_id?: string | null;
|
|
19
|
+
blsky_id?: string | null;
|
|
20
|
+
target_audience?: string | null;
|
|
21
|
+
visibility_scope?: string | null;
|
|
22
|
+
link_preview?: Record<string, unknown> | null;
|
|
23
|
+
content_type?: string | null;
|
|
24
|
+
views?: number | null;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface MeeoviProfile {
|
|
2
|
+
id: string;
|
|
3
|
+
username?: string | null;
|
|
4
|
+
birth_date?: string | null;
|
|
5
|
+
description?: string | null;
|
|
6
|
+
slug?: string | null;
|
|
7
|
+
company?: string | null;
|
|
8
|
+
activitypub_handle?: string | null;
|
|
9
|
+
dropshipping_partner_id?: string | null;
|
|
10
|
+
user?: string | null;
|
|
11
|
+
commerce_auth_id?: string | null;
|
|
12
|
+
cms_auth_id?: string | null;
|
|
13
|
+
keycloak_id?: string | null;
|
|
14
|
+
supabase_user_id?: string | null;
|
|
15
|
+
role?: string | null;
|
|
16
|
+
seller_requested?: boolean | null;
|
|
17
|
+
seller_approved?: boolean | null;
|
|
18
|
+
position?: string | null;
|
|
19
|
+
links?: Record<string, unknown> | null;
|
|
20
|
+
magento_customer_id?: string | null;
|
|
21
|
+
avatar?: string | null;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface MeeoviSpace {
|
|
2
|
+
id: number;
|
|
3
|
+
status: string;
|
|
4
|
+
sort?: number | null;
|
|
5
|
+
user_created?: string | null;
|
|
6
|
+
date_created?: string | null;
|
|
7
|
+
user_updated?: string | null;
|
|
8
|
+
date_updated?: string | null;
|
|
9
|
+
name?: string | null;
|
|
10
|
+
description?: string | null;
|
|
11
|
+
image?: string | null;
|
|
12
|
+
media?: string | null;
|
|
13
|
+
numberOfMembers?: string | null;
|
|
14
|
+
groupType?: string | null;
|
|
15
|
+
creator_id?: string | null;
|
|
16
|
+
slug?: string | null;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ContentItem {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
body: any;
|
|
5
|
+
slug?: string;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
export interface ContentProvider {
|
|
9
|
+
getContent(slug: string): Promise<ContentItem>;
|
|
10
|
+
listContent(params?: Record<string, any>): Promise<ContentItem[]>;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getContentProvider } from './registry';
|
|
2
|
+
export function useContent() {
|
|
3
|
+
const config = useRuntimeConfig();
|
|
4
|
+
const providerName = config.public.contentProvider || 'directus';
|
|
5
|
+
const provider = getContentProvider(providerName);
|
|
6
|
+
return {
|
|
7
|
+
getContent: provider.getContent,
|
|
8
|
+
listContent: provider.listContent
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapter-aware request helpers.
|
|
3
|
+
* Tries to call a workspace `nuxt.$adapter` first, then falls back to Directus helpers
|
|
4
|
+
* injected on the Nuxt app (e.g. `$directus`, `$readItems`, `$createItem`, `$uploadFiles`).
|
|
5
|
+
*/
|
|
6
|
+
export default function useDirectusRequest(): {
|
|
7
|
+
request: (config: any) => Promise<any>;
|
|
8
|
+
readItems: (collection: string, opts?: any) => Promise<any>;
|
|
9
|
+
createItem: (collection: string, data: any) => Promise<any>;
|
|
10
|
+
updateItem: (collection: string, idOrFilter: any, data: any) => Promise<any>;
|
|
11
|
+
uploadFiles: (formData: FormData) => Promise<any>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapter-aware request helpers.
|
|
3
|
+
* Tries to call a workspace `nuxt.$adapter` first, then falls back to Directus helpers
|
|
4
|
+
* injected on the Nuxt app (e.g. `$directus`, `$readItems`, `$createItem`, `$uploadFiles`).
|
|
5
|
+
*/
|
|
6
|
+
export default function useDirectusRequest() {
|
|
7
|
+
const nuxt = useNuxtApp();
|
|
8
|
+
function _toast(message) {
|
|
9
|
+
try {
|
|
10
|
+
const toast = nuxt?.$toast;
|
|
11
|
+
if (toast && typeof toast.error === 'function')
|
|
12
|
+
toast.error(message);
|
|
13
|
+
}
|
|
14
|
+
catch (_) { }
|
|
15
|
+
}
|
|
16
|
+
async function request(config) {
|
|
17
|
+
try {
|
|
18
|
+
const adapter = nuxt?.$adapter;
|
|
19
|
+
if (adapter && typeof adapter.request === 'function') {
|
|
20
|
+
return await adapter.request(config);
|
|
21
|
+
}
|
|
22
|
+
const client = nuxt?.$directus;
|
|
23
|
+
if (!client || typeof client.request !== 'function') {
|
|
24
|
+
_toast('Data client unavailable');
|
|
25
|
+
throw new Error('Data client.request is not available');
|
|
26
|
+
}
|
|
27
|
+
return await client.request(config);
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
_toast('Request failed');
|
|
31
|
+
throw e;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
async function readItems(collection, opts) {
|
|
35
|
+
const adapter = nuxt?.$adapter;
|
|
36
|
+
if (adapter && typeof adapter.readItems === 'function')
|
|
37
|
+
return await adapter.readItems(collection, opts);
|
|
38
|
+
const client = nuxt?.$directus;
|
|
39
|
+
const builder = nuxt?.$readItems;
|
|
40
|
+
if (client && typeof client.request === 'function' && typeof builder === 'function') {
|
|
41
|
+
return await client.request(builder(collection, opts));
|
|
42
|
+
}
|
|
43
|
+
_toast('readItems not available');
|
|
44
|
+
throw new Error('readItems not available');
|
|
45
|
+
}
|
|
46
|
+
async function createItem(collection, data) {
|
|
47
|
+
const adapter = nuxt?.$adapter;
|
|
48
|
+
if (adapter && typeof adapter.createItem === 'function')
|
|
49
|
+
return await adapter.createItem(collection, data);
|
|
50
|
+
const client = nuxt?.$directus;
|
|
51
|
+
const builder = nuxt?.$createItem;
|
|
52
|
+
if (client && typeof client.request === 'function' && typeof builder === 'function') {
|
|
53
|
+
return await client.request(builder(collection, data));
|
|
54
|
+
}
|
|
55
|
+
_toast('createItem not available');
|
|
56
|
+
throw new Error('createItem not available');
|
|
57
|
+
}
|
|
58
|
+
async function updateItem(collection, idOrFilter, data) {
|
|
59
|
+
const adapter = nuxt?.$adapter;
|
|
60
|
+
if (adapter && typeof adapter.updateItem === 'function')
|
|
61
|
+
return await adapter.updateItem(collection, idOrFilter, data);
|
|
62
|
+
const client = nuxt?.$directus;
|
|
63
|
+
const builder = nuxt?.$updateItem;
|
|
64
|
+
if (client && typeof client.request === 'function' && typeof builder === 'function') {
|
|
65
|
+
return await client.request(builder(collection, idOrFilter, data));
|
|
66
|
+
}
|
|
67
|
+
_toast('updateItem not available');
|
|
68
|
+
throw new Error('updateItem not available');
|
|
69
|
+
}
|
|
70
|
+
async function uploadFiles(formData) {
|
|
71
|
+
const adapter = nuxt?.$adapter;
|
|
72
|
+
if (adapter && typeof adapter.uploadFiles === 'function')
|
|
73
|
+
return await adapter.uploadFiles(formData);
|
|
74
|
+
const client = nuxt?.$directus;
|
|
75
|
+
const builder = nuxt?.$uploadFiles;
|
|
76
|
+
if (client && typeof client.request === 'function' && typeof builder === 'function') {
|
|
77
|
+
return await client.request(builder(formData));
|
|
78
|
+
}
|
|
79
|
+
_toast('uploadFiles not available');
|
|
80
|
+
throw new Error('uploadFiles not available');
|
|
81
|
+
}
|
|
82
|
+
return { request, readItems, createItem, updateItem, uploadFiles };
|
|
83
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assert(condition: unknown, message: string): asserts condition;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function deepMerge<T extends object, U extends object>(target: T, source: U): T & U;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { isObject } from './isObject';
|
|
2
|
+
export function deepMerge(target, source) {
|
|
3
|
+
const output = { ...target };
|
|
4
|
+
for (const key of Object.keys(source)) {
|
|
5
|
+
const sourceValue = source[key];
|
|
6
|
+
const targetValue = target[key];
|
|
7
|
+
if (isObject(sourceValue) && isObject(targetValue)) {
|
|
8
|
+
output[key] = deepMerge(targetValue, sourceValue);
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
output[key] = sourceValue;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return output;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineNuxtModule, addPlugin, createResolver } from '@nuxt/kit';
|
|
2
|
+
export default defineNuxtModule({
|
|
3
|
+
meta: {
|
|
4
|
+
name: 'meeovi-shared',
|
|
5
|
+
configKey: 'meeoviShared',
|
|
6
|
+
},
|
|
7
|
+
// Default configuration options of the Nuxt module
|
|
8
|
+
defaults: {},
|
|
9
|
+
setup(_options, _nuxt) {
|
|
10
|
+
const resolver = createResolver(import.meta.url);
|
|
11
|
+
// Do not add the extension since the `.ts` will be transpiled to `.mjs` after `npm run prepack`
|
|
12
|
+
addPlugin(resolver.resolve('./runtime/plugin'));
|
|
13
|
+
},
|
|
14
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function safeGet<T, K extends keyof T>(obj: T | null | undefined, key: K, fallback?: T[K]): T[K] | undefined;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function getPrimaryBillingAddress(organization) {
|
|
2
|
+
if (!organization || !organization.addresses || !Array.isArray(organization.addresses)) {
|
|
3
|
+
return null;
|
|
4
|
+
}
|
|
5
|
+
if (organization.addresses.length === 1) {
|
|
6
|
+
const address = organization.addresses[0];
|
|
7
|
+
return typeof address === 'string' ? null : address;
|
|
8
|
+
}
|
|
9
|
+
for (const address of organization.addresses) {
|
|
10
|
+
if (typeof address === 'string') {
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
if (address.is_primary_billing) {
|
|
14
|
+
return address;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function getContrastColor(hexColor) {
|
|
2
|
+
// Convert hex color to RGB format
|
|
3
|
+
const red = parseInt(hexColor.slice(1, 3), 16);
|
|
4
|
+
const green = parseInt(hexColor.slice(3, 5), 16);
|
|
5
|
+
const blue = parseInt(hexColor.slice(5, 7), 16);
|
|
6
|
+
// Calculate relative luminance of the color
|
|
7
|
+
const luminance = (0.2126 * red + 0.7152 * green + 0.0722 * blue) / 255;
|
|
8
|
+
// Return black or white depending on the luminance value
|
|
9
|
+
return luminance > 0.5 ? '#000000' : '#ffffff';
|
|
10
|
+
}
|
|
11
|
+
export { getContrastColor };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const formatCurrency: (number: number, options?: {
|
|
2
|
+
hideZeros?: boolean;
|
|
3
|
+
}) => string;
|
|
4
|
+
declare function centsToDollars(cents: number): number;
|
|
5
|
+
declare function dollarsToCents(dollars: number): number;
|
|
6
|
+
export { formatCurrency, centsToDollars, dollarsToCents };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const formatCurrency = (number, options) => {
|
|
2
|
+
const formatter = new Intl.NumberFormat('en-US', {
|
|
3
|
+
style: 'currency',
|
|
4
|
+
currency: 'USD',
|
|
5
|
+
// These options are needed to round to whole numbers if that's what you want.
|
|
6
|
+
...(options &&
|
|
7
|
+
options.hideZeros && {
|
|
8
|
+
minimumFractionDigits: 0, // (this suffices for whole numbers, but will print 2500.10 as $2,500.1)
|
|
9
|
+
maximumFractionDigits: 0, // (causes 2500.99 to be printed as $2,501))
|
|
10
|
+
}),
|
|
11
|
+
});
|
|
12
|
+
return formatter.format(number);
|
|
13
|
+
};
|
|
14
|
+
function centsToDollars(cents) {
|
|
15
|
+
return Number((cents / 100).toFixed(2));
|
|
16
|
+
}
|
|
17
|
+
function dollarsToCents(dollars) {
|
|
18
|
+
return Math.round(dollars * 100);
|
|
19
|
+
}
|
|
20
|
+
export { formatCurrency, centsToDollars, dollarsToCents };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const transformations = [
|
|
2
|
+
// Video Players
|
|
3
|
+
{
|
|
4
|
+
pattern: /https:\/\/www\.youtube\.com\/watch\?v=(.+)/,
|
|
5
|
+
replacement: 'https://www.youtube.com/embed/$1',
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
pattern: /https:\/\/vimeo\.com\/(.+)/,
|
|
9
|
+
replacement: 'https://player.vimeo.com/video/$1',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
pattern: /https:\/\/www\.loom\.com\/share\/(.+)/,
|
|
13
|
+
replacement: 'https://www.loom.com/embed/$1',
|
|
14
|
+
},
|
|
15
|
+
// File Services
|
|
16
|
+
{
|
|
17
|
+
pattern: /https:\/\/drive\.google\.com\/file\/d\/(.*?)\/view/,
|
|
18
|
+
replacement: 'https://drive.google.com/file/d/$1/preview',
|
|
19
|
+
},
|
|
20
|
+
// Calendar Tools
|
|
21
|
+
// Calendly: Remains unchanged
|
|
22
|
+
// SavvyCal: Remains unchanged
|
|
23
|
+
// Hubspot: @TODO
|
|
24
|
+
];
|
|
25
|
+
export function transformUrlToIframeSrc(url) {
|
|
26
|
+
for (const transformation of transformations) {
|
|
27
|
+
if (transformation.pattern.test(url)) {
|
|
28
|
+
return url.replace(transformation.pattern, transformation.replacement);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
// If no transformation matches, return the original URL.
|
|
32
|
+
return url;
|
|
33
|
+
}
|
|
34
|
+
//Generate the Youtube, Vimeo, or Loom embed URL based on an URL from the user
|
|
35
|
+
export function generateVideoEmbed(url) {
|
|
36
|
+
if (url.includes('youtube.com')) {
|
|
37
|
+
return `https://www.youtube.com/embed/${url.split('v=')[1]}`;
|
|
38
|
+
}
|
|
39
|
+
// Handle youtu.be links
|
|
40
|
+
else if (url.includes('youtu.be')) {
|
|
41
|
+
return `https://www.youtube.com/embed/${url.split('be/')[1]}`;
|
|
42
|
+
}
|
|
43
|
+
else if (url.includes('vimeo.com')) {
|
|
44
|
+
return `https://player.vimeo.com/video/${url.split('vimeo.com/')[1]}`;
|
|
45
|
+
}
|
|
46
|
+
else if (url.includes('loom.com')) {
|
|
47
|
+
return `https://www.loom.com/embed/${url.split('loom.com/share/')[1]}`;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return url;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const formatFonts = (families, defaultWeights = [400]) => {
|
|
2
|
+
const formatted = [];
|
|
3
|
+
for (const font in families) {
|
|
4
|
+
const formattedFont = font.replace(/ /g, '+'); // Replace spaces with '+'
|
|
5
|
+
const weights = families[font];
|
|
6
|
+
if (weights === true) {
|
|
7
|
+
for (const weight of defaultWeights) {
|
|
8
|
+
formatted.push(`${formattedFont}:${weight}`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
else if (Array.isArray(weights)) {
|
|
12
|
+
for (const weight of weights) {
|
|
13
|
+
formatted.push(`${formattedFont}:${weight}`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return formatted;
|
|
18
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface Condition {
|
|
2
|
+
field: string;
|
|
3
|
+
action: 'show' | 'hide';
|
|
4
|
+
condition: 'is_empty' | 'is_filled' | 'contains' | 'not_contains' | 'equals' | 'not_equal';
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function mapConditions(conditions: Condition[]): void;
|
|
8
|
+
export declare function transformSchema(schema: Array<object>): {
|
|
9
|
+
$cmp: any;
|
|
10
|
+
children: any;
|
|
11
|
+
props: any;
|
|
12
|
+
}[];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { unref } from 'vue';
|
|
2
|
+
function convertBoolean(value) {
|
|
3
|
+
if (value === 'true' || value === 'false') {
|
|
4
|
+
return value === 'true';
|
|
5
|
+
}
|
|
6
|
+
else {
|
|
7
|
+
return value;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
function mapCondition(condition, target) {
|
|
11
|
+
switch (condition) {
|
|
12
|
+
case 'is_empty':
|
|
13
|
+
return `!$get(${target}).value)`;
|
|
14
|
+
case 'is_filled':
|
|
15
|
+
return `$get(${target}).value)`;
|
|
16
|
+
default:
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export function mapConditions(conditions) {
|
|
21
|
+
// Both $el and $cmp schema nodes can leverage an if property that roughly equates to a v-if in Vue. If the expression assigned to the if property is truthy, the node is rendered, otherwise it is not:
|
|
22
|
+
}
|
|
23
|
+
export function transformSchema(schema) {
|
|
24
|
+
// Loop through the form schema from Directus
|
|
25
|
+
// This is required for FormKit to work
|
|
26
|
+
const items = unref(schema);
|
|
27
|
+
return items.map((item) => {
|
|
28
|
+
const { conditions, field, name, children, ...props } = item;
|
|
29
|
+
// console.log('conditions', conditions);
|
|
30
|
+
// console.log('mapCondition', mapCondition(conditions[0].condition, field));
|
|
31
|
+
const cmpSchema = {
|
|
32
|
+
$cmp: item.$el ? item.$el : 'FormKit',
|
|
33
|
+
children: children,
|
|
34
|
+
// if: conditions ? mapCondition(conditions[0].condition, field) : undefined,
|
|
35
|
+
props: {
|
|
36
|
+
id: name,
|
|
37
|
+
...props,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
// Switch statement to handle item widths
|
|
41
|
+
switch (item.width) {
|
|
42
|
+
case '33':
|
|
43
|
+
cmpSchema.props.outerClass = 'md:col-span-2';
|
|
44
|
+
break;
|
|
45
|
+
case '50':
|
|
46
|
+
cmpSchema.props.outerClass = 'md:col-span-3';
|
|
47
|
+
break;
|
|
48
|
+
case '67':
|
|
49
|
+
cmpSchema.props.outerClass = 'md:col-span-4';
|
|
50
|
+
break;
|
|
51
|
+
case '100':
|
|
52
|
+
cmpSchema.props.outerClass = 'md:col-span-6';
|
|
53
|
+
break;
|
|
54
|
+
default:
|
|
55
|
+
cmpSchema.props.outerClass = 'md:col-span-6';
|
|
56
|
+
}
|
|
57
|
+
return cmpSchema;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
type FileType = 'folder' | 'image/jpeg' | 'image/png' | 'image/gif' | 'image/svg+xml' | 'image/webp' | 'video/mp4' | 'video/quicktime' | 'audio/mp3' | 'audio/aac' | 'audio/wav' | 'audio/ogg' | 'text/csv' | 'text/plain' | 'application/pdf' | 'application/vnd.ms-excel' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/msword' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.ms-powerpoint' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
|
|
2
|
+
export declare const fileIconMap: Record<FileType, string>;
|
|
3
|
+
export declare function getFileIcon(filetype: FileType | string | null | undefined): string;
|
|
4
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const fileIconMap = {
|
|
2
|
+
folder: 'material-symbols:folder',
|
|
3
|
+
// Images
|
|
4
|
+
'image/jpeg': 'material-symbols:image',
|
|
5
|
+
'image/png': 'material-symbols:image',
|
|
6
|
+
'image/gif': 'material-symbols:image',
|
|
7
|
+
'image/svg+xml': 'material-symbols:image',
|
|
8
|
+
'image/webp': 'material-symbols:image',
|
|
9
|
+
// Videos
|
|
10
|
+
'video/mp4': 'material-symbols:smart-display',
|
|
11
|
+
'video/quicktime': 'material-symbols:smart-display',
|
|
12
|
+
// Audio
|
|
13
|
+
'audio/mp3': 'material-symbols:audio-file',
|
|
14
|
+
'audio/aac': 'material-symbols:audio-file',
|
|
15
|
+
'audio/wav': 'material-symbols:audio-file',
|
|
16
|
+
'audio/ogg': 'material-symbols:audio-file',
|
|
17
|
+
// Text
|
|
18
|
+
'text/csv': 'material-symbols:csv',
|
|
19
|
+
'text/plain': 'material-symbols:text-snippet',
|
|
20
|
+
// Files
|
|
21
|
+
'application/pdf': 'material-symbols:picture-as-pdf-sharp',
|
|
22
|
+
'application/vnd.ms-excel': 'material-symbols:sheets',
|
|
23
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'material-symbols:sheets',
|
|
24
|
+
'application/msword': 'material-symbols:docs',
|
|
25
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': 'material-symbols:docs',
|
|
26
|
+
'application/vnd.ms-powerpoint': 'material-symbols:slides',
|
|
27
|
+
'application/vnd.openxmlformats-officedocument.presentationml.presentation': 'material-symbols:slides',
|
|
28
|
+
};
|
|
29
|
+
export function getFileIcon(filetype) {
|
|
30
|
+
if (!filetype)
|
|
31
|
+
return 'material-symbols:attachment';
|
|
32
|
+
if (typeof filetype === 'string' && !(filetype in fileIconMap)) {
|
|
33
|
+
return 'material-symbols:attachment';
|
|
34
|
+
}
|
|
35
|
+
return fileIconMap[filetype];
|
|
36
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Function to easily format a mailto link. Encodes the subject and body to preserve formatting.
|
|
2
|
+
export function createMailto(to, { subject, body, cc, bcc } = {}) {
|
|
3
|
+
const params = [
|
|
4
|
+
subject && `subject=${encodeURIComponent(subject)}`,
|
|
5
|
+
body && `body=${encodeURIComponent(body)}`,
|
|
6
|
+
cc && `cc=${encodeURIComponent(cc)}`,
|
|
7
|
+
bcc && `bcc=${encodeURIComponent(bcc)}`,
|
|
8
|
+
]
|
|
9
|
+
.filter(Boolean)
|
|
10
|
+
.join('&');
|
|
11
|
+
return `mailto:${to}?${params}`;
|
|
12
|
+
}
|
|
13
|
+
export function createTel(phoneNumber) {
|
|
14
|
+
// Remove all non-numeric characters
|
|
15
|
+
const cleanedNumber = phoneNumber.replace(/\D+/g, '');
|
|
16
|
+
// Check if the number has a country code (e.g., +1 for the US)
|
|
17
|
+
if (cleanedNumber.length > 10 && cleanedNumber.startsWith('1')) {
|
|
18
|
+
return `tel:+${cleanedNumber}`;
|
|
19
|
+
}
|
|
20
|
+
return `tel:${cleanedNumber}`;
|
|
21
|
+
}
|