1.1.0 • Published 1 year ago

@cromology/shared-components v1.1.0

Weekly downloads
-
License
SEE LICENSE IN <f...
Repository
-
Last release
1 year ago

How to install

  • npm install @cromology/shared-components

Add this to your Vue entrypoint :

import Vue from 'vue'
import CromologySharedComponents from '@cromology/shared-components'

Vue.use(CromologySharedComponents)

This will allow you to use the following components anywhere you want :

  • CromologyStoreLocator
  • CromologyColorPicker

Cromology Store Locator

You can use the component by adding the component in your .vue files

This component is a right panel showing a list of 6 stores by default. You can click on "Geolocate me" to have a list of the closest stores around you. You can also search a store by postal code, city or name. Each card can be oppened (collapse) to see more details about a store (description, contact, website and schedule). By clicking on the "Choose this store" button, you will select a store to be your favorite store for the next 6 months. Choosing another store will override your current favorite store.

<cromology-store-locator :open="openLocator"... />

Props

Prop nameTyperequiredDefault valueComment
openBooleanyes-
companyStringyes-Must be value "T" for Tollens or "Z" for Zolpan
subtitleTextStringno"La sélection d'un autre magasin peut influencer la disponibilité des produits sélectionnés."
providerApolloProvider Instanceyes-Must be an instance of ApolloProvider
initSearchTermStringno-Initial term for the search
distanceNumberno-Distance in kilometers
storeCodeStringno-

Emits

Event NameEvent ValueComment
Cromology::StoreLocator::Close-Triggered when overlay or cross button are clicked
Cromology::StoreLocator::StoreSelected{ storeCode, titleLabel, primaryPhone, websiteUrl, description, fax, specialHours, clientCodePart, schedules { monday tuesday wednesday thursday friday saturday }, address { addressLines postalCode locality } latlng { lat lon } mediaItems { photo_url others }triggered when a store is chosen. Contains the store's informations inside an object

Cromology Color Picker

You can use the component by adding the component in your .vue files

This component is a right panel showing a color picker module. You can search a specific color or select it from the below picker.

<ColorPicker :open="openPicker"... />

Props

Prop nameTyperequiredDefault valueComment
openBooleanyes-
companyStringyes-Mst be "T" for Tollens or "Z" for Zolpan
providerApolloProvider Instanceyes-Must be an instance of ApolloProvider
profileStringyes-Must be PAR or PRO
articleIdsArray of Stringyes-Ids of product's articles

Emits

Event NameEvent ValueComment
Cromology::ColorPicker::Close-triggered when overlay or cross button are clicked
Cromology::ColorPicker::ColorSelected{ lib_teinte, collectionName, code_article, unite_tarif_teinte, id_teinte, rgb, code_marque, lib_marque, id_nuancier, code_nuancier, lib_nuancier, ACHAT_TESTEUR }, ...triggered when a color is chosen. Contains an array of color's informations inside an object
1.1.0

1 year ago

1.0.0

2 years ago

0.5.0

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.2

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago