@lancom/shared 0.0.62 → 0.0.66
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/assets/js/api/admin.js +332 -0
- package/assets/js/api/helpers.js +31 -0
- package/assets/js/api/index.js +162 -0
- package/assets/js/constants/colors.js +4 -0
- package/assets/js/constants/currencies.js +112 -0
- package/assets/js/constants/fonts.js +137 -0
- package/assets/js/constants/order.js +26 -0
- package/assets/js/constants/print-type.js +16 -0
- package/assets/js/constants/prints.js +17 -0
- package/assets/js/constants/product.js +11 -0
- package/assets/js/constants/sides.js +6 -0
- package/assets/js/constants/sizes.js +1 -0
- package/assets/js/constants/states.js +10 -0
- package/assets/js/models/print-area.js +72 -0
- package/assets/js/models/product-layers.js +108 -0
- package/assets/js/utils/breakpoints.js +67 -0
- package/assets/js/utils/cart.js +31 -0
- package/assets/js/utils/colors.js +71 -0
- package/assets/js/utils/copy-to-clipboard.js +10 -0
- package/assets/js/utils/custom-validation-rules.js +13 -0
- package/assets/js/utils/dom.js +12 -0
- package/assets/js/utils/event-bus.js +3 -0
- package/assets/js/utils/event-dispatcher.js +22 -0
- package/assets/js/utils/export-print-to-svg.js +97 -0
- package/assets/js/utils/fabric/files-loader.js +36 -0
- package/assets/js/utils/fabric/object-factory.js +50 -0
- package/assets/js/utils/fabric/selection-style.js +59 -0
- package/assets/js/utils/fabric/wireframe.js +143 -0
- package/assets/js/utils/fabric-helper.js +381 -0
- package/assets/js/utils/filters.js +87 -0
- package/assets/js/utils/fonts-helper.js +85 -0
- package/assets/js/utils/gtm.js +20 -0
- package/assets/js/utils/guid.js +3 -0
- package/assets/js/utils/news.js +10 -0
- package/assets/js/utils/order.js +73 -0
- package/assets/js/utils/pricing.js +5 -0
- package/assets/js/utils/prints.js +53 -0
- package/assets/js/utils/product.js +141 -0
- package/assets/js/utils/products-grouping/by-colors.js +23 -0
- package/assets/js/utils/products-grouping/by-design.js +49 -0
- package/assets/js/utils/products-grouping/by-prints.js +43 -0
- package/assets/js/utils/products-grouping/by-sku.js +18 -0
- package/assets/js/utils/products-grouping/index.js +7 -0
- package/assets/js/utils/products-grouping/prints-by-print-area.js +26 -0
- package/assets/js/utils/products-grouping/prints-by-size.js +20 -0
- package/assets/js/utils/products-grouping/sizes-by-price.js +21 -0
- package/assets/js/utils/quote.js +27 -0
- package/assets/js/utils/sizes.js +14 -0
- package/assets/scss/_common.scss +138 -0
- package/assets/scss/_reset.scss +50 -0
- package/assets/scss/_transitions.scss +472 -0
- package/assets/scss/main.scss +4 -0
- package/assets/scss/normalize/_index.scss +565 -0
- package/assets/scss/ui_kit/_buttons.scss +322 -0
- package/assets/scss/ui_kit/_forms.scss +625 -0
- package/assets/scss/ui_kit/_grid.scss +799 -0
- package/assets/scss/ui_kit/_index.scss +9 -0
- package/assets/scss/ui_kit/_modals.scss +64 -0
- package/assets/scss/ui_kit/_table.scss +90 -0
- package/assets/scss/ui_kit/_toast.scss +52 -0
- package/assets/scss/ui_kit/_tooltip.scss +131 -0
- package/assets/scss/ui_kit/_typography.scss +358 -0
- package/assets/scss/variables/_breakpoints.scss +12 -0
- package/assets/scss/variables/_index.scss +2 -0
- package/assets/scss/variables/_theme.scss +73 -0
- package/components/asides/contact_us/contact-us.scss +68 -0
- package/components/asides/contact_us/contact-us.vue +209 -0
- package/components/asides/menu/menu.scss +23 -0
- package/components/asides/menu/menu.vue +47 -0
- package/components/asides/offer_screen_printing/offer-screen-printing.scss +68 -0
- package/components/asides/offer_screen_printing/offer-screen-printing.vue +201 -0
- package/components/checkout/cart/cart.mixin.js +70 -0
- package/components/checkout/cart/cart.scss +115 -0
- package/components/checkout/cart/cart.vue +77 -0
- package/components/checkout/cart/cart_entities_group/cart-entities-group.mixin.js +114 -0
- package/components/checkout/cart/cart_entities_group/cart-entities-group.scss +74 -0
- package/components/checkout/cart/cart_entities_group/cart-entities-group.vue +82 -0
- package/components/checkout/cart/cart_entities_group/cart_entities_group_prints/cart-entities-group-prints.scss +29 -0
- package/components/checkout/cart/cart_entities_group/cart_entities_group_prints/cart-entities-group-prints.vue +75 -0
- package/components/checkout/cart/cart_entities_group/cart_entities_group_prints/cart_entities_group_print/cart-entities-group-print.scss +0 -0
- package/components/checkout/cart/cart_entities_group/cart_entities_group_prints/cart_entities_group_print/cart-entities-group-print.vue +88 -0
- package/components/checkout/cart/cart_entities_group/cart_entities_group_size_cell/cart-entities-group-size-cell.scss +23 -0
- package/components/checkout/cart/cart_entities_group/cart_entities_group_size_cell/cart-entities-group-size-cell.vue +91 -0
- package/components/checkout/cart/cart_entities_group_table/cart-entities-group-table.scss +7 -0
- package/components/checkout/cart/cart_entities_group_table/cart-entities-group-table.vue +57 -0
- package/components/checkout/cart/cart_entities_group_table/cart_entities_group_tr/cart-entities-group-tr.scss +10 -0
- package/components/checkout/cart/cart_entities_group_table/cart_entities_group_tr/cart-entities-group-tr.vue +100 -0
- package/components/checkout/cart/cart_entity/cart-entity.mixin.js +56 -0
- package/components/checkout/cart/cart_entity/cart-entity.scss +52 -0
- package/components/checkout/cart/cart_entity/cart-entity.vue +69 -0
- package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart-entity-color-simple-products.mixin.js +83 -0
- package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart-entity-color-simple-products.scss +96 -0
- package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart-entity-color-simple-products.vue +89 -0
- package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart_entity_color_simple_product/cart-entity-color-simple-product.scss +74 -0
- package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart_entity_color_simple_product/cart-entity-color-simple-product.vue +129 -0
- package/components/checkout/cart/cart_entity/cart_entity_prints/cart-entity-prints.scss +65 -0
- package/components/checkout/cart/cart_entity/cart_entity_prints/cart-entity-prints.vue +72 -0
- package/components/checkout/cart/cart_entity/cart_entity_prints/cart_entity_print/cart-entity-print.scss +31 -0
- package/components/checkout/cart/cart_entity/cart_entity_prints/cart_entity_print/cart-entity-print.vue +102 -0
- package/components/checkout/cart/cart_price_info/cart-price-info.scss +0 -0
- package/components/checkout/cart/cart_price_info/cart-price-info.vue +66 -0
- package/components/checkout/cart/cart_quantity_errors/cart-quantity-errors.scss +8 -0
- package/components/checkout/cart/cart_quantity_errors/cart-quantity-errors.vue +32 -0
- package/components/checkout/order/address-form/address-form.scss +17 -0
- package/components/checkout/order/address-form/address-form.vue +301 -0
- package/components/checkout/order/order-billing-information/order-billing-information.scss +5 -0
- package/components/checkout/order/order-billing-information/order-billing-information.vue +68 -0
- package/components/checkout/order/order-checkout-method/order-checkout-method.scss +9 -0
- package/components/checkout/order/order-checkout-method/order-checkout-method.vue +102 -0
- package/components/checkout/order/order-payment-information/order-payment-information.scss +44 -0
- package/components/checkout/order/order-payment-information/order-payment-information.vue +166 -0
- package/components/checkout/order/order-review/order-review.scss +13 -0
- package/components/checkout/order/order-review/order-review.vue +127 -0
- package/components/checkout/order/order-shipping-information/order-shipping-information.scss +11 -0
- package/components/checkout/order/order-shipping-information/order-shipping-information.vue +50 -0
- package/components/checkout/order/order-shipping-method/order-shipping-method.scss +0 -0
- package/components/checkout/order/order-shipping-method/order-shipping-method.vue +67 -0
- package/components/checkout/order/order-success/order-success.scss +42 -0
- package/components/checkout/order/order-success/order-success.vue +41 -0
- package/components/checkout/order/order.scss +44 -0
- package/components/checkout/order/order.vue +145 -0
- package/components/checkout/payment/payment-cart/payment-cart.scss +53 -0
- package/components/checkout/payment/payment-cart/payment-cart.vue +196 -0
- package/components/checkout/payment/payment_failed/payment-failed.scss +19 -0
- package/components/checkout/payment/payment_failed/payment-failed.vue +41 -0
- package/components/checkout/payment/payment_success/payment-success.scss +19 -0
- package/components/checkout/payment/payment_success/payment-success.vue +40 -0
- package/components/common/breadcrumbs/breadcrumbs.scss +20 -0
- package/components/common/breadcrumbs/breadcrumbs.vue +65 -0
- package/components/common/breakpoint.vue +51 -0
- package/components/common/btn.vue +159 -0
- package/components/common/checkbox.vue +156 -0
- package/components/common/checked-icon.vue +48 -0
- package/components/common/color-picker.vue +108 -0
- package/components/common/file_uploader.vue +186 -0
- package/components/common/image_viewer/image-viewer.scss +139 -0
- package/components/common/image_viewer/image-viewer.vue +152 -0
- package/components/common/info-popover.vue +61 -0
- package/components/common/logo/logo.scss +16 -0
- package/components/common/logo/logo.vue +30 -0
- package/components/common/postcode_select/postcode-select.scss +8 -0
- package/components/common/postcode_select/postcode-select.vue +141 -0
- package/components/common/pricing_discounts_table/pricing-discounts-table.scss +5 -0
- package/components/common/pricing_discounts_table/pricing-discounts-table.vue +53 -0
- package/components/common/pricing_table/pricing-table.scss +8 -0
- package/components/common/pricing_table/pricing-table.vue +133 -0
- package/components/common/product_side_with_print/product-side-with-print.scss +19 -0
- package/components/common/product_side_with_print/product-side-with-print.vue +128 -0
- package/components/common/products_list_dropdown/products-list-dropdown.scss +0 -0
- package/components/common/products_list_dropdown/products-list-dropdown.vue +69 -0
- package/components/common/products_list_dropdown/products_list_dropdown_option/products-list-dropdown-option.scss +30 -0
- package/components/common/products_list_dropdown/products_list_dropdown_option/products-list-dropdown-option.vue +35 -0
- package/components/common/products_total_pricing/products-total-pricing.scss +12 -0
- package/components/common/products_total_pricing/products-total-pricing.vue +53 -0
- package/components/common/progress_steps/progress-steps.scss +169 -0
- package/components/common/progress_steps/progress-steps.vue +166 -0
- package/components/common/progress_steps/progress_steps_controls/progress-steps-controls.scss +0 -0
- package/components/common/progress_steps/progress_steps_controls/progress-steps-controls.vue +67 -0
- package/components/common/range/range.scss +51 -0
- package/components/common/range/range.vue +116 -0
- package/components/common/rich-text.vue +30 -0
- package/components/common/shops-multiselect.vue +46 -0
- package/components/common/single-item-price.vue +30 -0
- package/components/common/spinner.vue +73 -0
- package/components/common/stars-mark.vue +98 -0
- package/components/common/tabs.vue +174 -0
- package/components/common/toggle-content.vue +59 -0
- package/components/customer/customer.scss +9 -0
- package/components/customer/customer.vue +84 -0
- package/components/customer/customer_form/customer-form.scss +12 -0
- package/components/customer/customer_form/customer-form.vue +276 -0
- package/components/customer/customer_password/customer-password.scss +0 -0
- package/components/customer/customer_password/customer-password.vue +99 -0
- package/components/customer/recovery_form/recovery-form.scss +0 -0
- package/components/customer/recovery_form/recovery-form.vue +96 -0
- package/components/customer/signin_form/signin-form.scss +22 -0
- package/components/customer/signin_form/signin-form.vue +147 -0
- package/components/design/approve_design_header/approve-design-header.scss +71 -0
- package/components/design/approve_design_header/approve-design-header.vue +69 -0
- package/components/design/approve_design_prints/approve-design-prints.scss +76 -0
- package/components/design/approve_design_prints/approve-design-prints.vue +98 -0
- package/components/design/approve_design_tables/approve-design-tables.scss +47 -0
- package/components/design/approve_design_tables/approve-design-tables.vue +136 -0
- package/components/design/approve_design_tees/approve-design-tees.scss +87 -0
- package/components/design/approve_design_tees/approve-design-tees.vue +59 -0
- package/components/editor/editor.scss +42 -0
- package/components/editor/editor.vue +214 -0
- package/components/editor/editor_layers/editor-layers.scss +22 -0
- package/components/editor/editor_layers/editor-layers.vue +154 -0
- package/components/editor/editor_layers/editor_layer_forms/editor_layer_common_fields/editor-layer-common-fields.scss +37 -0
- package/components/editor/editor_layers/editor_layer_forms/editor_layer_common_fields/editor-layer-common-fields.vue +110 -0
- package/components/editor/editor_layers/editor_layer_forms/editor_layer_form_art/editor-layer-form-art.scss +7 -0
- package/components/editor/editor_layers/editor_layer_forms/editor_layer_form_art/editor-layer-form-art.vue +55 -0
- package/components/editor/editor_layers/editor_layer_forms/editor_layer_form_text/editor-layer-form-text.scss +49 -0
- package/components/editor/editor_layers/editor_layer_forms/editor_layer_form_text/editor-layer-form-text.vue +236 -0
- package/components/editor/editor_layers/editor_layer_forms/editor_layer_form_text/font-family_select/font-family-select.scss +147 -0
- package/components/editor/editor_layers/editor_layer_forms/editor_layer_form_text/font-family_select/font-family-select.vue +141 -0
- package/components/editor/editor_layers/editor_layer_forms/index.js +7 -0
- package/components/editor/editor_layers/editor_layers_layer/editor-layers-layer.scss +140 -0
- package/components/editor/editor_layers/editor_layers_layer/editor-layers-layer.vue +127 -0
- package/components/editor/editor_layers/editor_layers_toolbar/editor-layers-toolbar.scss +75 -0
- package/components/editor/editor_layers/editor_layers_toolbar/editor-layers-toolbar.vue +112 -0
- package/components/editor/editor_pricing/editor-pricing.scss +56 -0
- package/components/editor/editor_pricing/editor-pricing.vue +311 -0
- package/components/editor/editor_print_area_options/editor-print-area-options.scss +28 -0
- package/components/editor/editor_print_area_options/editor-print-area-options.vue +91 -0
- package/components/editor/editor_print_area_options/editor_print_area_option/editor-print-area-option.scss +28 -0
- package/components/editor/editor_print_area_options/editor_print_area_option/editor-print-area-option.vue +103 -0
- package/components/editor/editor_product_details/editor-product-details.scss +50 -0
- package/components/editor/editor_product_details/editor-product-details.vue +124 -0
- package/components/editor/editor_workspace/editor-workspace.scss +114 -0
- package/components/editor/editor_workspace/editor-workspace.vue +182 -0
- package/components/editor/editor_workspace/editor_workspace_side/editor-workspace-side.scss +110 -0
- package/components/editor/editor_workspace/editor_workspace_side/editor-workspace-side.vue +344 -0
- package/components/editor/mobile_editor_product_details/mobile-editor-product-details.scss +103 -0
- package/components/editor/mobile_editor_product_details/mobile-editor-product-details.vue +147 -0
- package/components/errors/404.vue +54 -0
- package/components/errors/500.vue +54 -0
- package/components/modals/cart_modal/cart-modal.scss +26 -0
- package/components/modals/cart_modal/cart-modal.vue +62 -0
- package/components/modals/confirmation_modal/confirmation-modal.scss +7 -0
- package/components/modals/confirmation_modal/confirmation-modal.vue +57 -0
- package/components/modals/editor_layers_templates/editor-layers-templates.scss +36 -0
- package/components/modals/editor_layers_templates/editor-layers-templates.vue +90 -0
- package/components/modals/failed_conversion_modal/failed-conversion-modal.scss +18 -0
- package/components/modals/failed_conversion_modal/failed-conversion-modal.vue +182 -0
- package/components/modals/order_modal/order-modal.scss +7 -0
- package/components/modals/order_modal/order-modal.vue +359 -0
- package/components/modals/payment_modal/payment-modal.scss +57 -0
- package/components/modals/payment_modal/payment-modal.vue +313 -0
- package/components/news/news.scss +77 -0
- package/components/news/news.vue +52 -0
- package/components/news/news_list/news-list.scss +24 -0
- package/components/news/news_list/news-list.vue +38 -0
- package/components/news/news_list_item/news-list-item.scss +84 -0
- package/components/news/news_list_item/news-list-item.vue +70 -0
- package/components/order/order_approval/order-approval.scss +15 -0
- package/components/order/order_approval/order-approval.vue +84 -0
- package/components/order/order_approval/order_approval_message/order-approval-message.scss +1 -0
- package/components/order/order_approval/order_approval_message/order-approval-message.vue +82 -0
- package/components/order/order_entity/order-entity.scss +25 -0
- package/components/order/order_entity/order-entity.vue +76 -0
- package/components/order/order_entity/order_entity_side_layers/order-entity-side-layers.scss +14 -0
- package/components/order/order_entity/order_entity_side_layers/order-entity-side-layers.vue +84 -0
- package/components/order/order_main_info/order-main-info.scss +11 -0
- package/components/order/order_main_info/order-main-info.vue +115 -0
- package/components/order/order_price/order-price.scss +8 -0
- package/components/order/order_price/order-price.vue +67 -0
- package/components/order/order_prints_groups/order-prints-groups.scss +14 -0
- package/components/order/order_prints_groups/order-prints-groups.vue +127 -0
- package/components/order/order_products_groups/order-products-groups.scss +11 -0
- package/components/order/order_products_groups/order-products-groups.vue +129 -0
- package/components/order/order_products_groups/order_products_group/order-products-group.scss +28 -0
- package/components/order/order_products_groups/order_products_group/order-products-group.vue +129 -0
- package/components/order/order_setup_groups/order-setup-groups.scss +7 -0
- package/components/order/order_setup_groups/order-setup-groups.vue +99 -0
- package/components/order/order_sku_groups/order-sku-groups.scss +7 -0
- package/components/order/order_sku_groups/order-sku-groups.vue +125 -0
- package/components/order/order_status/order-status.scss +12 -0
- package/components/order/order_status/order-status.vue +77 -0
- package/components/order/order_timeline/order-timeline.scss +15 -0
- package/components/order/order_timeline/order-timeline.vue +76 -0
- package/components/order/order_tracking_numbers/order-tracking-numbers.scss +34 -0
- package/components/order/order_tracking_numbers/order-tracking-numbers.vue +161 -0
- package/components/order/order_view/order-view.mixin.js +51 -0
- package/components/order/order_view/order-view.scss +52 -0
- package/components/order/order_view/order-view.vue +145 -0
- package/components/order/order_view/order_product_color_simple_products/order-product-color-simple-products.mixin.js +37 -0
- package/components/order/order_view/order_product_color_simple_products/order-product-color-simple-products.scss +95 -0
- package/components/order/order_view/order_product_color_simple_products/order-product-color-simple-products.vue +88 -0
- package/components/order/order_view/order_product_color_simple_products/order_product_color_simple_product/order-product-color-simple-product.scss +32 -0
- package/components/order/order_view/order_product_color_simple_products/order_product_color_simple_product/order-product-color-simple-product.vue +27 -0
- package/components/order/order_view/order_product_prints/order-product-prints.scss +67 -0
- package/components/order/order_view/order_product_prints/order-product-prints.vue +60 -0
- package/components/order/order_view/order_product_prints/order_product_print/order-product-print.scss +31 -0
- package/components/order/order_view/order_product_prints/order_product_print/order-product-print.vue +78 -0
- package/components/order/order_view/order_view_product/order-view-product.scss +29 -0
- package/components/order/order_view/order_view_product/order-view-product.vue +110 -0
- package/components/pages/customer/confirm_email/confirm-email.vue +52 -0
- package/components/pages/customer/create/create.vue +41 -0
- package/components/pages/customer/recovery/recovery.vue +51 -0
- package/components/pages/customer/settings/settings.vue +39 -0
- package/components/pages/customer/sign_in/sign-in.vue +31 -0
- package/components/pricing/pricing_digital_printing/pricing-digital-printing.scss +248 -0
- package/components/pricing/pricing_digital_printing/pricing-digital-printing.vue +293 -0
- package/components/pricing/pricing_example/pricing-example.scss +79 -0
- package/components/pricing/pricing_example/pricing-example.vue +104 -0
- package/components/pricing/pricing_garment/pricing-garment.scss +73 -0
- package/components/pricing/pricing_garment/pricing-garment.vue +92 -0
- package/components/pricing/pricing_how_we_calculate/pricing-how-we-calculate.scss +44 -0
- package/components/pricing/pricing_how_we_calculate/pricing-how-we-calculate.vue +96 -0
- package/components/pricing/pricing_main_section/pricing-main-section.scss +54 -0
- package/components/pricing/pricing_main_section/pricing-main-section.vue +61 -0
- package/components/pricing/pricing_print/discounts_table/discounts-table.scss +8 -0
- package/components/pricing/pricing_print/discounts_table/discounts-table.vue +91 -0
- package/components/pricing/pricing_print/pricing-print.scss +28 -0
- package/components/pricing/pricing_print/pricing-print.vue +58 -0
- package/components/pricing/pricing_screen_print/discounts_table/discounts-table.scss +14 -0
- package/components/pricing/pricing_screen_print/discounts_table/discounts-table.vue +78 -0
- package/components/pricing/pricing_screen_print/pricing-screen-print.scss +8 -0
- package/components/pricing/pricing_screen_print/pricing-screen-print.vue +38 -0
- package/components/pricing/pricing_screen_printing/pricing-screen-printing.scss +253 -0
- package/components/pricing/pricing_screen_printing/pricing-screen-printing.vue +339 -0
- package/components/product/layouts/product_colors_selector/product-colors-selector.scss +15 -0
- package/components/product/layouts/product_colors_selector/product-colors-selector.vue +55 -0
- package/components/product/layouts/product_colors_selector/product_colors_selector_options/product-colors-selector-options.scss +67 -0
- package/components/product/layouts/product_colors_selector/product_colors_selector_options/product-colors-selector-options.vue +76 -0
- package/components/product/layouts/product_fabric_and_size_info/product-fabric-and-size-info.scss +24 -0
- package/components/product/layouts/product_fabric_and_size_info/product-fabric-and-size-info.vue +58 -0
- package/components/product/layouts/product_gallery/product-gallery.scss +39 -0
- package/components/product/layouts/product_gallery/product-gallery.vue +79 -0
- package/components/product/layouts/product_labels_customization/product-labels-customization.scss +61 -0
- package/components/product/layouts/product_labels_customization/product-labels-customization.vue +147 -0
- package/components/product/layouts/product_main_info/product-main-info.scss +22 -0
- package/components/product/layouts/product_main_info/product-main-info.vue +79 -0
- package/components/product/layouts/product_model_measurements/product-model-measurements.scss +18 -0
- package/components/product/layouts/product_model_measurements/product-model-measurements.vue +66 -0
- package/components/product/layouts/product_packaging/product-packaging.scss +32 -0
- package/components/product/layouts/product_packaging/product-packaging.vue +99 -0
- package/components/product/layouts/product_size_table/product-size-table.scss +23 -0
- package/components/product/layouts/product_size_table/product-size-table.vue +73 -0
- package/components/product/layouts/product_tier_prices/product-tier-prices.scss +23 -0
- package/components/product/layouts/product_tier_prices/product-tier-prices.vue +74 -0
- package/components/product/product.scss +24 -0
- package/components/product/product.vue +80 -0
- package/components/product/product_color_image/product-color-image.scss +8 -0
- package/components/product/product_color_image/product-color-image.vue +34 -0
- package/components/product/product_color_thumbnails/product-color-thumbnails.scss +61 -0
- package/components/product/product_color_thumbnails/product-color-thumbnails.vue +67 -0
- package/components/product/product_info_tabs/product-info-tabs.scss +24 -0
- package/components/product/product_info_tabs/product-info-tabs.vue +63 -0
- package/components/product/product_price_range/product-price-range.scss +0 -0
- package/components/product/product_price_range/product-price-range.vue +79 -0
- package/components/product/product_prints_price_info/product-prints-price-info.scss +25 -0
- package/components/product/product_prints_price_info/product-prints-price-info.vue +36 -0
- package/components/product/product_prints_price_info/product_print_price_info/product-print-price-info.scss +46 -0
- package/components/product/product_prints_price_info/product_print_price_info/product-print-price-info.vue +130 -0
- package/components/product/product_reviews/add_review/add-review.scss +42 -0
- package/components/product/product_reviews/add_review/add-review.vue +185 -0
- package/components/product/product_reviews/add_review_modal/add-review-modal.scss +5 -0
- package/components/product/product_reviews/add_review_modal/add-review-modal.vue +35 -0
- package/components/product/product_reviews/product-reviews.scss +68 -0
- package/components/product/product_reviews/product-reviews.vue +76 -0
- package/components/product/product_reviews/product_review/product-review.scss +47 -0
- package/components/product/product_reviews/product_review/product-review.vue +56 -0
- package/components/product/product_size_selector/product-size-selector.scss +13 -0
- package/components/product/product_size_selector/product-size-selector.vue +75 -0
- package/components/product/product_size_selector/product_size_selector_color/product-size-selector-color.scss +50 -0
- package/components/product/product_size_selector/product_size_selector_color/product-size-selector-color.vue +66 -0
- package/components/product/product_size_selector/product_size_selector_color/product_size_selector_color_cell/product-size-selector-color-cell.scss +60 -0
- package/components/product/product_size_selector/product_size_selector_color/product_size_selector_color_cell/product-size-selector-color-cell.vue +125 -0
- package/components/product/product_sizes_info/product-sizes-info.scss +55 -0
- package/components/product/product_sizes_info/product-sizes-info.vue +100 -0
- package/components/product/simple_products_price_info/simple-products-price-info.scss +19 -0
- package/components/product/simple_products_price_info/simple-products-price-info.vue +37 -0
- package/components/products/product_list/product-list.scss +47 -0
- package/components/products/product_list/product-list.vue +78 -0
- package/components/products/product_list_product/product-list-product.scss +124 -0
- package/components/products/product_list_product/product-list-product.vue +113 -0
- package/components/products/products_aside/products-aside.scss +14 -0
- package/components/products/products_aside/products-aside.vue +81 -0
- package/components/products/products_attributes/products-attributes.scss +27 -0
- package/components/products/products_attributes/products-attributes.vue +43 -0
- package/components/products/products_attributes/products_attribute/products-attribute.scss +28 -0
- package/components/products/products_attributes/products_attribute/products-attribute.vue +56 -0
- package/components/products/products_autocomplete/products-autocomplete.scss +54 -0
- package/components/products/products_autocomplete/products-autocomplete.vue +87 -0
- package/components/products/products_autocomplete/products_autocomplete-item/products-autocomplete-item.scss +0 -0
- package/components/products/products_autocomplete/products_autocomplete-item/products-autocomplete-item.vue +22 -0
- package/components/products/products_brands/products-brands.scss +28 -0
- package/components/products/products_brands/products-brands.vue +58 -0
- package/components/products/products_catalog/products-catalog.scss +43 -0
- package/components/products/products_catalog/products-catalog.vue +58 -0
- package/components/products/products_colors/products-colors.scss +59 -0
- package/components/products/products_colors/products-colors.vue +73 -0
- package/components/products/products_filters/products-filters.scss +50 -0
- package/components/products/products_filters/products-filters.vue +91 -0
- package/components/products/products_link/products-link.scss +0 -0
- package/components/products/products_link/products-link.vue +56 -0
- package/components/products/products_tags/products-tags.scss +34 -0
- package/components/products/products_tags/products-tags.vue +53 -0
- package/components/products/products_types/products-types.scss +37 -0
- package/components/products/products_types/products-types.vue +65 -0
- package/components/quotes/quote_request/quote-request.scss +146 -0
- package/components/quotes/quote_request/quote-request.vue +404 -0
- package/components/quotes/quote_request_modal/quote-request-modal.scss +5 -0
- package/components/quotes/quote_request_modal/quote-request-modal.vue +27 -0
- package/components/quotes/quote_view/quote-view.mixin.js +52 -0
- package/components/quotes/quote_view/quote-view.scss +16 -0
- package/components/quotes/quote_view/quote-view.vue +79 -0
- package/components/quotes/quote_view/quote_option_view/quote-option-view.scss +10 -0
- package/components/quotes/quote_view/quote_option_view/quote-option-view.vue +56 -0
- package/components/quotes/quote_view/quote_product_color_simple_products/quote-product-color-simple-products.mixin.js +37 -0
- package/components/quotes/quote_view/quote_product_color_simple_products/quote-product-color-simple-products.scss +95 -0
- package/components/quotes/quote_view/quote_product_color_simple_products/quote-product-color-simple-products.vue +88 -0
- package/components/quotes/quote_view/quote_product_color_simple_products/quote_product_color_simple_product/quote-product-color-simple-product.scss +32 -0
- package/components/quotes/quote_view/quote_product_color_simple_products/quote_product_color_simple_product/quote-product-color-simple-product.vue +27 -0
- package/components/quotes/quote_view/quote_product_prints/quote-product-prints.scss +67 -0
- package/components/quotes/quote_view/quote_product_prints/quote-product-prints.vue +60 -0
- package/components/quotes/quote_view/quote_product_prints/quote_product_print/quote-product-print.scss +31 -0
- package/components/quotes/quote_view/quote_product_prints/quote_product_print/quote-product-print.vue +78 -0
- package/components/quotes/quote_view/quote_view_product/quote-view-product.scss +29 -0
- package/components/quotes/quote_view/quote_view_product/quote-view-product.vue +122 -0
- package/components/static_page/static-page.scss +11 -0
- package/components/static_page/static-page.vue +26 -0
- package/components/subscribe/subscribe.scss +23 -0
- package/components/subscribe/subscribe.vue +124 -0
- package/components/the_aside/the-aside.scss +79 -0
- package/components/the_aside/the-aside.vue +95 -0
- package/components/the_breadcrumbs/the-breadcrumbs.scss +36 -0
- package/components/the_breadcrumbs/the-breadcrumbs.vue +78 -0
- package/components/the_changes_saved_indicator/the-changes-saved-indicator.scss +60 -0
- package/components/the_changes_saved_indicator/the-changes-saved-indicator.vue +55 -0
- package/components/the_footer/the-footer.scss +96 -0
- package/components/the_footer/the-footer.vue +86 -0
- package/components/the_navbar/the-navbar.scss +43 -0
- package/components/the_navbar/the-navbar.vue +45 -0
- package/middleware/notAuthenticated.js +5 -0
- package/middleware/page-info.js +11 -0
- package/middleware/setVH.js +11 -0
- package/mixins/confirm.js +39 -0
- package/mixins/meta-info.js +93 -0
- package/mixins/modals.js +117 -0
- package/mixins/payment.js +84 -0
- package/mixins/product-preview.js +69 -0
- package/mixins/products-price.js +82 -0
- package/nuxt.config.js +119 -0
- package/package.json +14 -8
- package/pages/quotes/view/_id.js +20 -0
- package/plugins/aos-animation.js +39 -0
- package/plugins/aos.js +12 -0
- package/plugins/directives.js +10 -0
- package/plugins/error-handler.js +6 -0
- package/plugins/global-components.js +14 -0
- package/plugins/jsonld.js +4 -0
- package/plugins/save-state.js +38 -0
- package/plugins/vee-validate.js +20 -0
- package/plugins/vue-click-outside.js +4 -0
- package/plugins/vue-color.js +4 -0
- package/plugins/vue-fragment.js +4 -0
- package/plugins/vue-hummer.js +7 -0
- package/plugins/vue-js-modal.js +15 -0
- package/plugins/vue-multiselect.js +4 -0
- package/plugins/vue-recaptcha.js +18 -0
- package/plugins/vue-tables-2.js +6 -0
- package/plugins/vue-toastr.js +7 -0
- package/plugins/vue-tooltip.js +4 -0
- package/static/fonts/archivo_black.woff2 +0 -0
- package/static/fonts/open_sans_bold.woff2 +0 -0
- package/static/fonts/orbitron_medium.woff +0 -0
- package/static/icons/arrow-left.svg +3 -0
- package/static/icons/arrow-right.svg +3 -0
- package/static/icons/back_hoodie.svg +3 -0
- package/static/icons/back_hoodie_a3.svg +4 -0
- package/static/icons/back_hoodie_a4_v.svg +4 -0
- package/static/icons/back_hoodie_half_a4_h.svg +4 -0
- package/static/icons/back_hoodie_rect10_l.svg +4 -0
- package/static/icons/back_polo.svg +3 -0
- package/static/icons/back_polo_a3.svg +4 -0
- package/static/icons/back_polo_a4_v.svg +4 -0
- package/static/icons/back_polo_half_a4_h.svg +4 -0
- package/static/icons/back_polo_rect10_l.svg +4 -0
- package/static/icons/back_tee.svg +3 -0
- package/static/icons/back_tee_a3.svg +4 -0
- package/static/icons/back_tee_a4_v.svg +4 -0
- package/static/icons/back_tee_half_a4_h.svg +4 -0
- package/static/icons/back_tee_rect10_l.svg +4 -0
- package/static/icons/calc_delivery_price.svg +13 -0
- package/static/icons/calc_print_price.svg +17 -0
- package/static/icons/calc_tee_price.svg +5 -0
- package/static/icons/calc_total_price.svg +6 -0
- package/static/icons/delivery.svg +12 -0
- package/static/icons/error.svg +4 -0
- package/static/icons/front_hoodie.svg +3 -0
- package/static/icons/front_hoodie_a3.svg +4 -0
- package/static/icons/front_hoodie_a4_v.svg +4 -0
- package/static/icons/front_hoodie_half_a4_h.svg +4 -0
- package/static/icons/front_hoodie_rect10_l.svg +4 -0
- package/static/icons/front_polo.svg +3 -0
- package/static/icons/front_polo_a3.svg +4 -0
- package/static/icons/front_polo_a4_v.svg +4 -0
- package/static/icons/front_polo_half_a4_h.svg +4 -0
- package/static/icons/front_polo_rect10_l.svg +4 -0
- package/static/icons/front_tee.svg +3 -0
- package/static/icons/front_tee_a3.svg +4 -0
- package/static/icons/front_tee_a4_v.svg +4 -0
- package/static/icons/front_tee_half_a4_h.svg +4 -0
- package/static/icons/front_tee_rect10_l.svg +4 -0
- package/static/icons/garments.svg +4 -0
- package/static/icons/general.svg +25 -0
- package/static/icons/other.svg +8 -0
- package/static/icons/printing.svg +9 -0
- package/static/icons/product_hoodie.svg +4 -0
- package/static/icons/product_polo.svg +4 -0
- package/static/icons/product_tee.svg +4 -0
- package/static/icons/rotate.png +0 -0
- package/static/icons/star_gray.svg +3 -0
- package/static/icons/star_green.svg +3 -0
- package/static/icons/success.svg +4 -0
- package/static/images/american-express.svg +8 -0
- package/static/images/catalog_bg.png +0 -0
- package/static/images/check.svg +51 -0
- package/static/images/fonts-bengali-sprite.png +0 -0
- package/static/images/fonts-gujarati-sprite.png +0 -0
- package/static/images/fonts-hebrew-sprite.png +0 -0
- package/static/images/fonts-hindi-sprite.png +0 -0
- package/static/images/fonts-kannada-sprite.png +0 -0
- package/static/images/fonts-malyalam-sprite.png +0 -0
- package/static/images/fonts-marathi-sprite.png +0 -0
- package/static/images/fonts-oriya-sprite.png +0 -0
- package/static/images/fonts-sprite.png +0 -0
- package/static/images/fonts-tamil-sprite.png +0 -0
- package/static/images/fonts-telugu-sprite.png +0 -0
- package/static/images/jcb.svg +8 -0
- package/static/images/logo.png +0 -0
- package/static/images/logo.svg +13 -0
- package/static/images/maestro.svg +11 -0
- package/static/images/mastercard.svg +23 -0
- package/static/images/measurements_model.svg +9 -0
- package/static/images/packaging_quantity.svg +8 -0
- package/static/images/packaging_size.svg +6 -0
- package/static/images/packaging_weight.svg +4 -0
- package/static/images/paid.svg +5 -0
- package/static/images/paypal.svg +9 -0
- package/static/images/price_calc_example.png +0 -0
- package/static/images/pricing-header.png +0 -0
- package/static/images/pricing_garment_tee.png +0 -0
- package/static/images/tear-away-tag.svg +5 -0
- package/static/images/tee.svg +4 -0
- package/static/images/tee_label_1.svg +4 -0
- package/static/images/tee_label_2.svg +8 -0
- package/static/images/tee_size.svg +9 -0
- package/static/images/tee_with_1_label.svg +11 -0
- package/static/images/tee_with_2_labels.svg +13 -0
- package/static/images/tee_with_no_labels.svg +5 -0
- package/static/images/trasnparent-pattern.png +0 -0
- package/static/images/type_here.png +0 -0
- package/static/images/visa.svg +13 -0
- package/static/images/watermark.png +0 -0
- package/store/auth.js +70 -0
- package/store/cart.js +154 -0
- package/store/index.js +108 -0
- package/store/layers.js +28 -0
- package/store/order.js +55 -0
- package/store/page.js +22 -0
- package/store/product.js +373 -0
- package/store/products.js +91 -0
- package/store/quote.js +72 -0
- package/lib/module.js +0 -57
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
export const FONTS = {
|
|
2
|
+
acme: '/assets/fonts/Acme_Regular.ttf',
|
|
3
|
+
allan: '/assets/fonts/Allan-Regular.ttf',
|
|
4
|
+
'allan-bold': '/assets/fonts/Allan-Bold.ttf',
|
|
5
|
+
amaranth: '/assets/fonts/Amaranth_Regular.ttf',
|
|
6
|
+
anton: '/assets/fonts/Anton_Regular.ttf',
|
|
7
|
+
'archivo-black': '/assets/fonts/ArchivoBlack-Regular.ttf',
|
|
8
|
+
'asap-medium': '/assets/fonts/Asap_Medium.ttf',
|
|
9
|
+
'assistant-semibold': '/assets/fonts/Assistant_SemiBold.ttf',
|
|
10
|
+
'baloo-bhaina': '/assets/fonts/BalooBhaina-Regular.ttf',
|
|
11
|
+
bangers: '/assets/fonts/Bangers_Regular.ttf',
|
|
12
|
+
baumans: '/assets/fonts/Baumans-Regular.ttf',
|
|
13
|
+
'berkshire-swash': '/assets/fonts/BerkshireSwash_Regular.ttf',
|
|
14
|
+
bevan: '/assets/fonts/Bevan_Regular.ttf',
|
|
15
|
+
'black-ops-one': '/assets/fonts/BlackOpsOne_Regular.ttf',
|
|
16
|
+
bonbon: '/assets/fonts/Bonbon_Regular.ttf',
|
|
17
|
+
boongaloo: '/assets/fonts/Boogaloo_Regular.ttf',
|
|
18
|
+
'bree-serif': '/assets/fonts/BreeSerif_Regular.ttf',
|
|
19
|
+
'bubblegum-sans': '/assets/fonts/BubblegumSans-Regular.ttf',
|
|
20
|
+
'carter-one': '/assets/fonts/CarterOne-Regular.ttf',
|
|
21
|
+
'caveat-b': '/assets/fonts/Caveat_Bold.ttf',
|
|
22
|
+
'caveat-brush': '/assets/fonts/CaveatBrush_Regular.ttf',
|
|
23
|
+
'chela-one': '/assets/fonts/ChelaOne_Regular.ttf',
|
|
24
|
+
'cherry-swash-bold': '/assets/fonts/CherrySwash_Bold.ttf',
|
|
25
|
+
chewy: '/assets/fonts/Chewy_Regular.ttf',
|
|
26
|
+
coiny: '/assets/fonts/Coiny_Regular.ttf',
|
|
27
|
+
'concert-one': '/assets/fonts/ConcertOne_Regular.ttf',
|
|
28
|
+
cookie: '/assets/fonts/Cookie_Regular.ttf',
|
|
29
|
+
creepster: '/assets/fonts/Creepster_Regular.ttf',
|
|
30
|
+
cutive: '/assets/fonts/Cutive_Regular.ttf',
|
|
31
|
+
'dancing-script_bold': '/assets/fonts/DancingScript_Bold.ttf',
|
|
32
|
+
'dr-sugiyama': '/assets/fonts/DrSugiyama_Regular.ttf',
|
|
33
|
+
'eagle-lake': '/assets/fonts/EagleLake_Regular.ttf',
|
|
34
|
+
fascinate: '/assets/fonts/Fascinate_Regular.ttf',
|
|
35
|
+
'fredoka-one': '/assets/fonts/FredokaOne_Regular.ttf',
|
|
36
|
+
'fugaz-one': '/assets/fonts/FugazOne-Regular.ttf',
|
|
37
|
+
'germania-one': '/assets/fonts/GermaniaOne_Regular.ttf',
|
|
38
|
+
graduate: '/assets/fonts/Graduate_Regular.ttf',
|
|
39
|
+
'grand-hotel': '/assets/fonts/GrandHotel_Regular.ttf',
|
|
40
|
+
'hanalei-fill': '/assets/fonts/HanaleiFill_Regular.ttf',
|
|
41
|
+
'josefin-sans': '/assets/fonts/JosefinSans-Regular.ttf',
|
|
42
|
+
'just-me-again': '/assets/fonts/JustMeAgainDownHere_Regular.ttf',
|
|
43
|
+
'kaushan-script': '/assets/fonts/KaushanScript_Regular.ttf',
|
|
44
|
+
knewave: '/assets/fonts/Knewave_Regular.ttf',
|
|
45
|
+
'leckerli-one': '/assets/fonts/LeckerliOne_Regular.ttf',
|
|
46
|
+
lemonada: '/assets/fonts/Lemonada_Regular.ttf',
|
|
47
|
+
'lemonada-bold': '/assets/fonts/Lemonada_Bold.ttf',
|
|
48
|
+
'lexend-deca': '/assets/fonts/LexendDeca-Regular.ttf',
|
|
49
|
+
'londrina-solid': '/assets/fonts/LondrinaSolid_Regular.ttf',
|
|
50
|
+
'love-ya': '/assets/fonts/LoveYaLikeASister_Regular.ttf',
|
|
51
|
+
'luckiest-guy': '/assets/fonts/LuckiestGuy_Regular.ttf',
|
|
52
|
+
mclaren: '/assets/fonts/McLaren-Regular.ttf',
|
|
53
|
+
molle: '/assets/fonts/Molle_RegularItalic.ttf',
|
|
54
|
+
'montserrat-b': '/assets/fonts/Montserrat_Bold.ttf',
|
|
55
|
+
'montserrat-m': '/assets/fonts/Montserrat_Medium.ttf',
|
|
56
|
+
'mountains-of-christmas-bold': '/assets/fonts/MountainsofChristmas_Bold.ttf',
|
|
57
|
+
notable: '/assets/fonts/Notable-Regular.ttf',
|
|
58
|
+
'noto-sans-jp': '/assets/fonts/NotoSansJP-Regular.otf',
|
|
59
|
+
'noto-sans-jp-black': '/assets/fonts/NotoSansJP-Black.otf',
|
|
60
|
+
'oleo-script': '/assets/fonts/OleoScript-Regular.ttf',
|
|
61
|
+
'open-sans-b': '/assets/fonts/OpenSans_Bold.ttf',
|
|
62
|
+
'open-sans-eb': '/assets/fonts/OpenSans_ExtraBold.ttf',
|
|
63
|
+
'orbitron-medium': '/assets/fonts/Orbitron_Medium.ttf',
|
|
64
|
+
'oswald-b': '/assets/fonts/Oswald_Bold.ttf',
|
|
65
|
+
'oswald-m': '/assets/fonts/Oswald_Medium.ttf',
|
|
66
|
+
pacifico: '/assets/fonts/Pacifico_Regular.ttf',
|
|
67
|
+
'passion-one': '/assets/fonts/PassionOne-Regular.ttf',
|
|
68
|
+
'passion-one-bold': '/assets/fonts/PassionOne-Bold.ttf',
|
|
69
|
+
pattaya: '/assets/fonts/Pattaya_Regular.ttf',
|
|
70
|
+
'patua-one': '/assets/fonts/PatuaOne_Regular.ttf',
|
|
71
|
+
'permanent-marker': '/assets/fonts/PermanentMarker_Regular.ttf',
|
|
72
|
+
'playfair-display-bold': '/assets/fonts/PlayfairDisplay_Bold.ttf',
|
|
73
|
+
'poppins-medium': '/assets/fonts/Poppins_Medium.ttf',
|
|
74
|
+
'press-start-2p': '/assets/fonts/PressStart2P_Regular.ttf',
|
|
75
|
+
'princess-sofia': '/assets/fonts/PrincessSofia_Regular.ttf',
|
|
76
|
+
'pt-sans-bold': '/assets/fonts/PTSans_Bold.ttf',
|
|
77
|
+
quantico: '/assets/fonts/Quantico_Regular.ttf',
|
|
78
|
+
'quicksand-bold': '/assets/fonts/Quicksand_Bold.ttf',
|
|
79
|
+
rakkas: '/assets/fonts/Rakkas-Regular.ttf',
|
|
80
|
+
'rammetto-one': '/assets/fonts/RammettoOne_Regular.ttf',
|
|
81
|
+
shojumaru: '/assets/fonts/Shojumaru_Regular.ttf',
|
|
82
|
+
shrikhand: '/assets/fonts/Shrikhand_Regular.ttf',
|
|
83
|
+
'spicy-rice': '/assets/fonts/SpicyRice_Regular.ttf',
|
|
84
|
+
'squada-one': '/assets/fonts/SquadaOne-Regular.ttf',
|
|
85
|
+
swanky: '/assets/fonts/SwankyandMooMoo_Regular.ttf',
|
|
86
|
+
'vampiro-one': '/assets/fonts/VampiroOne_Regular.ttf',
|
|
87
|
+
'vollkorn-b': '/assets/fonts/Vollkorn_Bold.ttf',
|
|
88
|
+
'vollkorn-sb': '/assets/fonts/Vollkorn_SemiBold.ttf',
|
|
89
|
+
'wendy-one': '/assets/fonts/WendyOne_Regular.ttf',
|
|
90
|
+
'yeseva-one': '/assets/fonts/YesevaOne-Regular.ttf'
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export const FONTS_HEBREW = {
|
|
94
|
+
secular_one: '/assets/fonts/hebrew/SecularOne-Regular.ttf',
|
|
95
|
+
frank_ruhl_libre: '/assets/fonts/hebrew/FrankRuhlLibre-Medium.ttf',
|
|
96
|
+
rubik: '/assets/fonts/hebrew/Rubik-Medium.ttf',
|
|
97
|
+
bellefair: '/assets/fonts/hebrew/Bellefair-Regular.ttf',
|
|
98
|
+
amatic_sc: '/assets/fonts/hebrew/AmaticSC-Bold.ttf'
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export const FONTS_HINDI = {
|
|
102
|
+
hind: '/assets/fonts/hindi/Hind-Regular.ttf',
|
|
103
|
+
kalam: '/assets/fonts/hindi/Kalam-Bold.ttf'
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export const FONTS_BENGALI = {
|
|
107
|
+
hind_siliguri: '/assets/fonts/bengali/HindSiliguri-Medium.ttf'
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export const FONTS_GUJARATI = {
|
|
111
|
+
kumar_one: '/assets/fonts/gujarati/KumarOne-Regular.ttf'
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export const FONTS_KANNADA = {
|
|
115
|
+
baloo_tamma2: '/assets/fonts/kannada/BalooTamma2-SemiBold.ttf'
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export const FONTS_MALYALAM = {
|
|
119
|
+
gayathri: '/assets/fonts/malyalam/Gayathri-Bold.ttf'
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export const FONTS_MARATHI = {
|
|
123
|
+
lohit_marathi: '/assets/fonts/marathi/Lohit-Marathi.ttf'
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export const FONTS_TAMIL = {
|
|
127
|
+
pavanam: '/assets/fonts/tamil/Pavanam-Regular.ttf'
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export const FONTS_TELUGU = {
|
|
131
|
+
suranna: '/assets/fonts/telugu/Suranna-Regular.ttf',
|
|
132
|
+
timmana: '/assets/fonts/telugu/Timmana-Regular.ttf'
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export const FONTS_ORIYA = {
|
|
136
|
+
baloo_bhaina2: '/assets/fonts/oriya/BalooBhaina2-SemiBold.ttf'
|
|
137
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export const ORDER_STATUS = {
|
|
2
|
+
PENDING_STAFF_REVIEW: 'pending staff review',
|
|
3
|
+
PENDING_CUSTOMER_APPROVAL: 'pending customer approval',
|
|
4
|
+
ORDER_PICKING_FOR_PRINT: 'order picking for print',
|
|
5
|
+
MANUAL_EXCEPTION: 'manual exception',
|
|
6
|
+
CANCELLED: 'cancelled',
|
|
7
|
+
PRINTED: 'printed, awaiting courier',
|
|
8
|
+
DISPATCHED: 'dispatched'
|
|
9
|
+
};
|
|
10
|
+
export const ORDER_STATUSES_LIST = Object.keys(ORDER_STATUS).map(key => ORDER_STATUS[key]);
|
|
11
|
+
|
|
12
|
+
export const ORDER_STEPS = {
|
|
13
|
+
CHECKOUT_METHOD: 'Checkout Method',
|
|
14
|
+
BILLING_INFORMATION: 'Delivery Address',
|
|
15
|
+
// SHIPPING_INFORMATION: 'Shipping Information',
|
|
16
|
+
// SHIPPING_METHOD: 'Shipping Method',
|
|
17
|
+
PAYMENT_INFORMATION: 'Payment Info',
|
|
18
|
+
// ORDER_REVIEW: 'Order Review',
|
|
19
|
+
SUCCESS: 'Success'
|
|
20
|
+
};
|
|
21
|
+
export const ORDER_STEPS_LIST = Object.keys(ORDER_STEPS).map(k => ORDER_STEPS[k]);
|
|
22
|
+
|
|
23
|
+
export const ORDER_PAYMENT_METHOD = {
|
|
24
|
+
CARD: 'card',
|
|
25
|
+
DEPOSIT: 'deposit'
|
|
26
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const PRINT_TYPES = {
|
|
2
|
+
BLACK: 'black print',
|
|
3
|
+
FULL_COLOUR: 'full colour print',
|
|
4
|
+
EMBROIDERY: 'embroidery',
|
|
5
|
+
SCREEN: 'screen print'
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const PRINT_TYPES_LIST = Object.keys(PRINT_TYPES).map(k => PRINT_TYPES[k]);
|
|
9
|
+
|
|
10
|
+
export const COST_TYPES = {
|
|
11
|
+
SETUP_AND_ITEM_COST: 'setup and item cost',
|
|
12
|
+
SETUP_ONLY: 'setup only',
|
|
13
|
+
ITEM_COST_ONLY: 'item cost only'
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const COST_TYPES_LIST = Object.keys(COST_TYPES).map(k => COST_TYPES[k]);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const printsLabels = {
|
|
2
|
+
a3: 'A3',
|
|
3
|
+
a4_v: 'A4 Vertical',
|
|
4
|
+
a4_h: 'A4 Horizontal',
|
|
5
|
+
half_a4_h: 'Half A4 Horizontal',
|
|
6
|
+
rect6: '6x6',
|
|
7
|
+
rect10_l: '10x10 Left',
|
|
8
|
+
rect10_r: '10x10 Right'
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const COST_TYPES = {
|
|
12
|
+
SETUP_AND_ITEM_COST: 'setup and item cost',
|
|
13
|
+
SETUP_ONLY: 'setup only',
|
|
14
|
+
ITEM_COST_ONLY: 'item cost only'
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const COST_TYPES_LIST = Object.keys(COST_TYPES).map(k => COST_TYPES[k]);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const PRODUCT_TYPES = {
|
|
2
|
+
TEE: 'tee',
|
|
3
|
+
HOODIE: 'hoodie',
|
|
4
|
+
POLO: 'polo'
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const PRODUCT_TYPES_LIST = [
|
|
8
|
+
{ type: PRODUCT_TYPES.TEE, label: 'Classic Unisex Tee' },
|
|
9
|
+
{ type: PRODUCT_TYPES.HOODIE, label: 'Pullover Hoodie' },
|
|
10
|
+
{ type: PRODUCT_TYPES.POLO, label: 'Classic Polo' }
|
|
11
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const cmToInchesRatio = 0.393701;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { cmToInchesRatio } from '../constants/sizes';
|
|
2
|
+
|
|
3
|
+
const DEFAULT_PRINT_SIZE_CM = 21;
|
|
4
|
+
|
|
5
|
+
const DEFAULT_PRINT_AREA = {
|
|
6
|
+
printArea: {
|
|
7
|
+
top: 0,
|
|
8
|
+
left: 0,
|
|
9
|
+
width: 0,
|
|
10
|
+
height: 0
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const PIXELS_PER_CM = 37.795275591;
|
|
15
|
+
|
|
16
|
+
export const getProductPrintAreas = product => {
|
|
17
|
+
if (!product) {
|
|
18
|
+
return {};
|
|
19
|
+
}
|
|
20
|
+
const getSizesFromAreas = (areas, map) => (areas || []).reduce((list, { printSize, printAreaOffsets, sizes }) => {
|
|
21
|
+
if (printSize) {
|
|
22
|
+
list[printSize.alias] = { printSize, printAreaOffsets };
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (sizes) {
|
|
26
|
+
getSizesFromAreas(sizes, list);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return list;
|
|
30
|
+
}, map || {});
|
|
31
|
+
|
|
32
|
+
return getSizesFromAreas(product.printAreas);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const getProductPrintsAreasPrices = product => {
|
|
36
|
+
const areas = getProductPrintAreas(product);
|
|
37
|
+
Object.keys(areas).forEach(key => {
|
|
38
|
+
areas[key] = areas[key].printArea?.pricing || [];
|
|
39
|
+
});
|
|
40
|
+
return areas;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const getPrintAreaByName = ({ printArea, editorWidth, editorHeight }, product) => {
|
|
44
|
+
const printAreas = getProductPrintAreas(product);
|
|
45
|
+
const { printSize, printAreaOffsets } = printAreas[printArea] || DEFAULT_PRINT_AREA;
|
|
46
|
+
const pxPerCm = (editorWidth * product.productToImageRatio) / product.productWidthInCm;
|
|
47
|
+
const widthCm = printSize ? printSize.width : DEFAULT_PRINT_SIZE_CM;
|
|
48
|
+
const heightCm = printSize ? printSize.height : DEFAULT_PRINT_SIZE_CM;
|
|
49
|
+
let width = widthCm * pxPerCm;
|
|
50
|
+
let height = heightCm * pxPerCm;
|
|
51
|
+
let top = 0;
|
|
52
|
+
let left = 0;
|
|
53
|
+
if (printAreaOffsets) {
|
|
54
|
+
top = (editorHeight - height) / (100 / printAreaOffsets.top);
|
|
55
|
+
left = (editorWidth - width) / (100 / printAreaOffsets.left);
|
|
56
|
+
} else {
|
|
57
|
+
left = 30;
|
|
58
|
+
top = 30;
|
|
59
|
+
height = editorHeight - 60;
|
|
60
|
+
width = editorWidth - 60;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const center = {
|
|
64
|
+
top: top + height / 2,
|
|
65
|
+
left: left + width / 2
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const widthInInches = widthCm * cmToInchesRatio;
|
|
69
|
+
const heightInInches = heightCm * cmToInchesRatio;
|
|
70
|
+
|
|
71
|
+
return { width, height, top, left, center, printArea, widthInInches, heightInInches };
|
|
72
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
|
|
2
|
+
import { filesLoader } from '@lancom/shared/assets/js/utils/fabric/files-loader';
|
|
3
|
+
import { generateGUID } from '@lancom/shared/assets/js/utils/guid';
|
|
4
|
+
export class Layer {
|
|
5
|
+
type = null;
|
|
6
|
+
colorId = null;
|
|
7
|
+
angle = 0;
|
|
8
|
+
alignVertically = 'center';
|
|
9
|
+
alignHorizontally = 'center';
|
|
10
|
+
originX = 'center';
|
|
11
|
+
originY = 'center';
|
|
12
|
+
fill = 'black';
|
|
13
|
+
top = null;
|
|
14
|
+
left = null;
|
|
15
|
+
centeredScaling = true;
|
|
16
|
+
lockUniScaling = true;
|
|
17
|
+
|
|
18
|
+
// selection style
|
|
19
|
+
rotatingPointOffset = 30;
|
|
20
|
+
transparentCorners = false;
|
|
21
|
+
borderColor = '#38C88D';
|
|
22
|
+
cornerColor = '#38C88D';
|
|
23
|
+
cornerStrokeColor = '#38C88D';
|
|
24
|
+
cornerSize = 13;
|
|
25
|
+
cornerStyle = 'circle';
|
|
26
|
+
lockScalingFlip = true;
|
|
27
|
+
padding = 0;
|
|
28
|
+
selectionDashArray = [10, 5];
|
|
29
|
+
borderDashArray = [5, 3];
|
|
30
|
+
cornerDashArray = [10, 5];
|
|
31
|
+
|
|
32
|
+
constructor(colorId, top, left) {
|
|
33
|
+
this.guid = generateGUID();
|
|
34
|
+
this.createdAt = new Date().getTime();
|
|
35
|
+
this.colorId = colorId;
|
|
36
|
+
this.top = top;
|
|
37
|
+
this.left = left;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export class TextLayer extends Layer {
|
|
42
|
+
copy = '';
|
|
43
|
+
editableDetails = true;
|
|
44
|
+
isEditMode = false;
|
|
45
|
+
textAlign = 'center';
|
|
46
|
+
fontFamily = 'acme';
|
|
47
|
+
fontStyle = 'normal';
|
|
48
|
+
fontSize = 16;
|
|
49
|
+
lineHeight = 1;
|
|
50
|
+
fill = 'rgb(0, 0, 0)';
|
|
51
|
+
stroke = 'rgb(255, 255, 255)';
|
|
52
|
+
enableOutline = false;
|
|
53
|
+
strokeWidth = 1;
|
|
54
|
+
paintFirst = 'stroke'; // stroke behind fill
|
|
55
|
+
|
|
56
|
+
constructor(type, colorId, top, left, isEditMode) {
|
|
57
|
+
super(colorId, top, left);
|
|
58
|
+
this.type = type;
|
|
59
|
+
this.isEditMode = isEditMode;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export class ArtLayer extends Layer {
|
|
64
|
+
url = null;
|
|
65
|
+
fileName = 'default';
|
|
66
|
+
editableDetails = true;
|
|
67
|
+
scaleX = 1;
|
|
68
|
+
scaleY = 1;
|
|
69
|
+
width = null;
|
|
70
|
+
height = null;
|
|
71
|
+
|
|
72
|
+
constructor(type, colorId, top, left, url, originalSize) {
|
|
73
|
+
super(colorId, top, left);
|
|
74
|
+
this.type = type;
|
|
75
|
+
this.url = url;
|
|
76
|
+
this.originalSize = originalSize;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const getLayerModel = async ({ type, colorId, top, left, isEditMode, url, originalSize, properties = {} }) => {
|
|
81
|
+
if (!type) {
|
|
82
|
+
throw new Error('When creating a new layer, you must specify its type');
|
|
83
|
+
}
|
|
84
|
+
if (!colorId) {
|
|
85
|
+
throw new Error('When creating a new layer, you must specify coresponding colorId');
|
|
86
|
+
}
|
|
87
|
+
let layer;
|
|
88
|
+
switch (type) {
|
|
89
|
+
case 'text':
|
|
90
|
+
layer = new TextLayer(type, colorId, top, left, isEditMode);
|
|
91
|
+
if (properties.fontFamily) {
|
|
92
|
+
await filesLoader.loadFont(properties.fontFamily);
|
|
93
|
+
}
|
|
94
|
+
break;
|
|
95
|
+
case 'art':
|
|
96
|
+
layer = new ArtLayer(type, colorId, top, left, url, originalSize);
|
|
97
|
+
break;
|
|
98
|
+
default:
|
|
99
|
+
throw new Error(`Layer type '${type}' not found or not supported.`);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
Object.assign(layer, properties);
|
|
103
|
+
return layer;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export const cloneLayerModel = layer => {
|
|
107
|
+
return { ...layer, createdAt: Date.now() };
|
|
108
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import Vue from 'vue';
|
|
2
|
+
import debounce from 'lodash.debounce';
|
|
3
|
+
|
|
4
|
+
class Breakpoints {
|
|
5
|
+
screens = {
|
|
6
|
+
sm: 768,
|
|
7
|
+
md: 1024,
|
|
8
|
+
lg: 1280,
|
|
9
|
+
xl: 1600
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
constructor() {
|
|
13
|
+
this.breakpoints = Vue.observable({
|
|
14
|
+
w: window.innerWidth,
|
|
15
|
+
h: window.innerHeight,
|
|
16
|
+
is: this.getBreakpoint(window.innerWidth)
|
|
17
|
+
});
|
|
18
|
+
window.addEventListener(
|
|
19
|
+
'resize',
|
|
20
|
+
debounce(() => {
|
|
21
|
+
this.breakpoints.w = window.innerWidth;
|
|
22
|
+
this.breakpoints.h = window.innerHeight;
|
|
23
|
+
this.breakpoints.is = this.getBreakpoint(window.innerWidth);
|
|
24
|
+
}, 50),
|
|
25
|
+
false
|
|
26
|
+
);
|
|
27
|
+
return this.breakpoints;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
getBreakpoint(w) {
|
|
31
|
+
if (this.isXs(w)) {
|
|
32
|
+
return 'xs';
|
|
33
|
+
} else if (this.isSm(w)) {
|
|
34
|
+
return 'sm';
|
|
35
|
+
} else if (this.isMd(w)) {
|
|
36
|
+
return 'md';
|
|
37
|
+
} else if (this.isLg(w)) {
|
|
38
|
+
return 'lg';
|
|
39
|
+
} else if (this.isXl(w)) {
|
|
40
|
+
return 'xl';
|
|
41
|
+
} else {
|
|
42
|
+
return 'all';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
isXs(val) {
|
|
47
|
+
return val < this.screens.sm;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
isSm(val) {
|
|
51
|
+
return val >= this.screens.sm && val < this.screens.md;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
isMd(val) {
|
|
55
|
+
return val >= this.screens.md && val < this.screens.lg;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
isLg(val) {
|
|
59
|
+
return val >= this.screens.lg && val < this.screens.xl;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
isXl(val) {
|
|
63
|
+
return val >= this.screens.xl;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export default Breakpoints;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { sortBySize } from './sizes';
|
|
2
|
+
|
|
3
|
+
export function groupSimpleProducts(entity, isGroupByColor, isPopulateEmptyProducts = false, onlyColors) {
|
|
4
|
+
const groups = new Map();
|
|
5
|
+
(entity.simpleProducts || [])
|
|
6
|
+
.filter(sp => (isGroupByColor && onlyColors) ? onlyColors.some(c => c._id === sp.color._id) : true)
|
|
7
|
+
.forEach(simpleProduct => {
|
|
8
|
+
const key = isGroupByColor ? simpleProduct.color._id : simpleProduct.guid;
|
|
9
|
+
const defaultGroup = {
|
|
10
|
+
color: simpleProduct.color,
|
|
11
|
+
images: entity.product?.images || [],
|
|
12
|
+
prints: entity.prints,
|
|
13
|
+
product: entity.product,
|
|
14
|
+
simpleProducts: [],
|
|
15
|
+
amount: 0,
|
|
16
|
+
productsTotal: 0
|
|
17
|
+
};
|
|
18
|
+
const group = groups.get(key) || defaultGroup;
|
|
19
|
+
|
|
20
|
+
if (isPopulateEmptyProducts || simpleProduct.amount > 0) {
|
|
21
|
+
group.simpleProducts = sortBySize([...group.simpleProducts, simpleProduct]);
|
|
22
|
+
const amount = simpleProduct.amount || 0;
|
|
23
|
+
group.amount += amount;
|
|
24
|
+
|
|
25
|
+
group.productsTotal += amount * (simpleProduct.productCost || 0);
|
|
26
|
+
groups.set(key, group);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
return groups;
|
|
31
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
|
|
2
|
+
import { staticLink } from './filters';
|
|
3
|
+
import { COLORS_IMAGES_TYPES } from './../constants/colors';
|
|
4
|
+
|
|
5
|
+
export const isValidImageType = (i, type) => i.type === type || (i.types || []).includes(type);
|
|
6
|
+
|
|
7
|
+
export const isValidImageTypes = (i, types) => types.some(type => isValidImageType(i, type));
|
|
8
|
+
|
|
9
|
+
export const getColorImage = (product = {}, size = 'small', type, color, allowAnyColor = false) => {
|
|
10
|
+
const colorImage = color && (product.images || []).find(i => isValidImageType(i, type || COLORS_IMAGES_TYPES.FRONT) && color._id === i.color);
|
|
11
|
+
const image = colorImage || (product.images || []).find(i => isValidImageType(i, type || COLORS_IMAGES_TYPES.FRONT) && (allowAnyColor || !i.color));
|
|
12
|
+
return image && staticLink(image[size]);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const getProductCover = (product = {}, size = 'small', type = COLORS_IMAGES_TYPES.FRONT, color, allowAnyColor = false) => {
|
|
16
|
+
let getFunc = getMediumColorImage;
|
|
17
|
+
switch (size) {
|
|
18
|
+
case 'fill':
|
|
19
|
+
getFunc = getFillColorImage;
|
|
20
|
+
break;
|
|
21
|
+
case 'small':
|
|
22
|
+
getFunc = getSmallColorImage;
|
|
23
|
+
break;
|
|
24
|
+
case 'large':
|
|
25
|
+
getFunc = getLargeColorImage;
|
|
26
|
+
break;
|
|
27
|
+
case 'origin':
|
|
28
|
+
getFunc = getOriginColorImage;
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
return (color && getFunc(product, `catalog_${type}`, color)) ||
|
|
32
|
+
(color && getFunc(product, type, color)) ||
|
|
33
|
+
getFunc(product, `catalog_${type}`, null, true) ||
|
|
34
|
+
getFunc(product, type, color) ||
|
|
35
|
+
getFunc(product, type, null, true);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const getFillColorImage = (product, type, color, allowAnyColor) => getColorImage(product, 'color', type, color, allowAnyColor);
|
|
39
|
+
export const getSmallColorImage = (product, type, color, allowAnyColor) => getColorImage(product, 'small', type, color, allowAnyColor);
|
|
40
|
+
export const getMediumColorImage = (product, type, color, allowAnyColor) => getColorImage(product, 'medium', type, color, allowAnyColor);
|
|
41
|
+
export const getLargeColorImage = (product, type, color, allowAnyColor) => getColorImage(product, 'large', type, color, allowAnyColor);
|
|
42
|
+
export const getOriginColorImage = (product, type, color, allowAnyColor) => getColorImage(product, 'origin', type, color, allowAnyColor);
|
|
43
|
+
|
|
44
|
+
export const getProductFillCover = (product, type, color) => getProductCover(product, 'color', type, color);
|
|
45
|
+
export const getProductSmallCover = (product, type, color) => getProductCover(product, 'small', type, color);
|
|
46
|
+
export const getProductMediumCover = (product, type, color) => getProductCover(product, 'medium', type, color);
|
|
47
|
+
export const getProductLargeCover = (product, type, color) => getProductCover(product, 'large', type, color);
|
|
48
|
+
export const getProductOriginCover = (product, type, color) => getProductCover(product, 'origin', type, color);
|
|
49
|
+
|
|
50
|
+
export function getColorBackgroundStyle(color) {
|
|
51
|
+
const { rgb, pattern, name } = color || {};
|
|
52
|
+
|
|
53
|
+
if (pattern) {
|
|
54
|
+
return {
|
|
55
|
+
'background-image': `url("${pattern}")`
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
'background-color': rgb || (name || '').replace(/\s+/g, '-').toLowerCase()
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function getProductHoverCover(product, currentColor) {
|
|
65
|
+
return getMediumColorImage(product, 'catalog_hover', currentColor) || (currentColor && getMediumColorImage(product, 'back', currentColor)) || getMediumColorImage(product, 'catalog_hover', null, true);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function getColorOfDefaultCatalogFrontImage(product) {
|
|
69
|
+
const { color } = (product?.images || []).find(i => i.color && isValidImageType(i, 'catalog_front')) || {};
|
|
70
|
+
return color;
|
|
71
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function copyToClipboard(str) {
|
|
2
|
+
const el = document.createElement('textarea');
|
|
3
|
+
el.value = str;
|
|
4
|
+
el.setAttribute('readonly', '');
|
|
5
|
+
el.style = { position: 'absolute', left: '-9999px' };
|
|
6
|
+
document.body.appendChild(el);
|
|
7
|
+
el.select();
|
|
8
|
+
document.execCommand('copy');
|
|
9
|
+
document.body.removeChild(el);
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const phone = {
|
|
2
|
+
validate: value => {
|
|
3
|
+
return /^[0-9]+$/.test(`${value}`); // todo add validation for phone number
|
|
4
|
+
},
|
|
5
|
+
message: 'Phone number is not valid'
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const float = {
|
|
9
|
+
validate: value => {
|
|
10
|
+
return /^[-0-9.]+$/.test(value || value === 0 ? value : '');
|
|
11
|
+
},
|
|
12
|
+
message: 'Float number is not valid'
|
|
13
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export default class EventDispatcher {
|
|
2
|
+
constructor(eventName) {
|
|
3
|
+
this.eventName = eventName;
|
|
4
|
+
this.callbacks = [];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
registerCallback(callback) {
|
|
8
|
+
this.callbacks.push(callback);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
unregisterCallback(callback) {
|
|
12
|
+
const index = this.callbacks.indexOf(callback);
|
|
13
|
+
if (index > -1) {
|
|
14
|
+
this.callbacks.splice(index, 1);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
fire(data) {
|
|
19
|
+
const callbacks = this.callbacks.slice(0);
|
|
20
|
+
callbacks.forEach(callback => callback(data));
|
|
21
|
+
}
|
|
22
|
+
};
|