cronofy-elements
Advanced tools
Comparing version
@@ -48,1 +48,21 @@ # Cronofy UI Elements | ||
bump_major | ||
### Releasing | ||
> Since moving UI Elements into the monorepo, the npm update flow has been, shall we say, janky. This is because the npm tooling assumes it's always going to be in the root of whatever repo it lives in. These are the new steps needed to account for this jankiness: | ||
You find yourself in the UI Elements root folder (`cronofy/js/elements`) inside the monorepo. You have made changes, and your PR has been approved. You want to cut a new version before releasing changes... | ||
- Run `make bump_patch` (or `bump_minor` or `bump_major` depending on the type of change you've made) | ||
- That task no longer commits its changes automatically - it will have changed the version number in `package-lock.json` and `package.json` and the changes will be unstaged. Commit these changes ("version bump" or similar is fine for a commit-message). | ||
- You then need to run `git tag -a vTHE_NEW_VERSION -m "overview of changes"` (so if you've gone from v1.12.0 to v1.12.1, the tag version should look like `tag -a v1.12.1`) *For consistency, run the tag on the branch that contains the changes.* | ||
- Then `git push` and `git push --tags` (if you haven't pushed the tag, the deployment will fail) | ||
- Now you can merge your PR and ask someone to deploy the changes for you (make sure you tell them the number of the version you want to be released, e.g. `v1.12.1` - they'll need this to run the deployment). *Note: a UI Elements deployment is not the same thing as a normal app deployment - they are different steps, and need to be initiated independently.* | ||
### Things that need to be published in order to call a UI Element change "done" | ||
- new build file added to S3 bucket (so that it shows up at this URL: `https://elements.cronofy.com/js/CronofyElements.vNEW_VERSION_NUMBER.js`) | ||
- publish changes to NPM (checkable here: [https://www.npmjs.com/package/cronofy-elements](https://www.npmjs.com/package/cronofy-elements)) | ||
- Add changes to docs if user-facing API has changed | ||
- Update v# and changelog in the docs (only do this *after* the S3 URL is available) |
{ | ||
"name": "cronofy-elements", | ||
"version": "1.20.8", | ||
"version": "1.20.9", | ||
"description": "Fast track scheduling with Cronofy's embeddable UI Elements", | ||
@@ -5,0 +5,0 @@ "main": "build/npm/CronofyElements.js", |
@@ -67,3 +67,3 @@ import React, { useContext, useState } from "react"; | ||
const label = backwards ? "back" : "forward"; | ||
const label = backwards ? "earlier" : "later"; | ||
const atMidnight = backwards | ||
@@ -70,0 +70,0 @@ ? extras.limits.start === hours[0] |
@@ -33,3 +33,3 @@ import React, { useContext, useState } from "react"; | ||
const label = backwards ? "back" : "forward"; | ||
const label = backwards ? "earlier" : "later"; | ||
const atMidnight = backwards | ||
@@ -36,0 +36,0 @@ ? limits.start === hours[0] |
@@ -59,2 +59,14 @@ import moment from "moment-timezone"; | ||
const validModes = ["confirm", "multi_select", "no_confirm", "free_select"]; | ||
const validMode = validModes.includes(mode); | ||
if (!validMode) { | ||
log.error( | ||
`Please provide a valid \`config.mode\`. \`${mode}\` is not a supported value.`, | ||
{ | ||
docsSlug: "availability-viewer/#config.mode" | ||
} | ||
); | ||
return false; | ||
} | ||
const slot_selection = | ||
@@ -61,0 +73,0 @@ typeof config.slot_selection === "undefined" || |
@@ -13,6 +13,18 @@ import { | ||
const config = typeof options.config === "undefined" ? {} : options.config; | ||
const mode = typeof config.mode === "undefined" ? "confirm" : config.mode; | ||
const logs = typeof config.logs === "undefined" ? "warn" : config.logs; | ||
const log = logConstructor(logs, "Slot Picker", options.callback); | ||
const mode = typeof config.mode === "undefined" ? "confirm" : config.mode; | ||
const validModes = ["confirm", "no_confirm"]; | ||
const validMode = validModes.includes(mode); | ||
if (!validMode) { | ||
log.error( | ||
`Please provide a valid \`config.mode\`. \`${mode}\` is not a supported value.`, | ||
{ | ||
docsSlug: "slot-picker/#config.mode" | ||
} | ||
); | ||
return false; | ||
} | ||
const demoMode = typeof options.demo === "undefined" ? false : options.demo; | ||
@@ -19,0 +31,0 @@ if (demoMode) { |
{ | ||
"availability_viewer": { | ||
"available": "Verfügbar", | ||
"booked": "Gebucht", | ||
"busy": "Beschäftigt", | ||
"confirm": "Bestätigen", | ||
"end": "Abschließen", | ||
"free": "Frei", | ||
"no_slots_found": "Keine Zeitfenster gefunden", | ||
"selected": "Ausgewählt", | ||
"start": "Starten", | ||
@@ -8,0 +12,0 @@ "unavailable": "Nicht verfügbar" |
@@ -5,4 +5,6 @@ { | ||
"close": "Schließen", | ||
"earlier": "Vorhin", | ||
"error": "Fehler", | ||
"global_error": "Das Element konnte nicht geladen werden.", | ||
"later": "Später", | ||
"loading": "Wird geladen", | ||
@@ -9,0 +11,0 @@ "next": "Weiter", |
{ | ||
"availability_viewer": { | ||
"available": "Available", | ||
"backward": "Backward", | ||
"booked": "Booked", | ||
@@ -9,3 +8,2 @@ "busy": "Busy", | ||
"end": "End", | ||
"forward": "Forward", | ||
"free": "Free", | ||
@@ -12,0 +10,0 @@ "no_slots_found": "No slots found", |
@@ -6,4 +6,5 @@ { | ||
"close": "Close", | ||
"earlier": "Earlier", | ||
"error": "Error", | ||
"exhange": "Exchange", | ||
"exchange": "Exchange", | ||
"global_error": "There was an error loading the element", | ||
@@ -13,2 +14,3 @@ "google": "Google", | ||
"icloud": "Apple", | ||
"later": "Later", | ||
"live_connect": "Outlook.com", | ||
@@ -15,0 +17,0 @@ "loading": "Loading", |
{ | ||
"availability_viewer": { | ||
"available": "Disponible", | ||
"booked": "Reservado", | ||
"busy": "Ocupado", | ||
"confirm": "Confirmar", | ||
"end": "Fin", | ||
"free": "Disponible", | ||
"no_slots_found": "No se encontraron opciones", | ||
"selected": "Seleccionado", | ||
"start": "Inicio", | ||
@@ -8,0 +12,0 @@ "unavailable": "No disponible" |
@@ -5,4 +5,6 @@ { | ||
"close": "Cerrar", | ||
"earlier": "Antes", | ||
"error": "Error", | ||
"global_error": "Se ha producido un error al cargar el elemento", | ||
"later": "Más tarde", | ||
"loading": "Cargando", | ||
@@ -9,0 +11,0 @@ "next": "Siguiente", |
{ | ||
"availability_viewer": { | ||
"available": "Disponible", | ||
"booked": "Réservé", | ||
"busy": "Occupé", | ||
"confirm": "Confirmer", | ||
"end": "Fin", | ||
"free": "Disponible", | ||
"no_slots_found": "Aucun créneau trouvé", | ||
"selected": "Sélectionné", | ||
"start": "Début", | ||
@@ -8,0 +12,0 @@ "unavailable": "Indisponible" |
@@ -5,4 +5,6 @@ { | ||
"close": "Fermer", | ||
"earlier": "Plus tôt", | ||
"error": "Erreur", | ||
"global_error": "Une erreur est survenue lors du chargement de l’élément", | ||
"later": "Plus tard", | ||
"loading": "Chargement", | ||
@@ -9,0 +11,0 @@ "next": "Suivant", |
{ | ||
"availability_viewer": { | ||
"available": "Disponibile", | ||
"booked": "Riservato", | ||
"busy": "Occupato", | ||
"confirm": "Conferma", | ||
"end": "Fine", | ||
"free": "Libero", | ||
"no_slots_found": "Nessuno slot trovato", | ||
"selected": "Selezionato", | ||
"start": "Inizio", | ||
@@ -8,0 +12,0 @@ "unavailable": "Non disponibile" |
@@ -5,4 +5,6 @@ { | ||
"close": "Chiudi", | ||
"earlier": "Prima", | ||
"error": "Errore", | ||
"global_error": "Si è verificato un errore durante il caricamento dell'elemento", | ||
"later": "Più tardi", | ||
"loading": "Caricamento in corso", | ||
@@ -9,0 +11,0 @@ "next": "Successivo", |
{ | ||
"availability_viewer": { | ||
"available": "利用できます", | ||
"booked": "予約済み", | ||
"busy": "忙しい", | ||
"confirm": "承認", | ||
"end": "終了", | ||
"free": "自由", | ||
"no_slots_found": "時間帯が見つかりません", | ||
"selected": "選択した", | ||
"start": "開始", | ||
@@ -8,0 +12,0 @@ "unavailable": "利用できません" |
@@ -5,4 +5,6 @@ { | ||
"close": "閉じる", | ||
"earlier": "前", | ||
"error": "エラー", | ||
"global_error": "要素の読み込み中にエラーが発生しました", | ||
"later": "後", | ||
"loading": "読み込み中", | ||
@@ -9,0 +11,0 @@ "next": "次へ", |
{ | ||
"availability_viewer": { | ||
"available": "Beschikbaar", | ||
"booked": "Bezet", | ||
"busy": "Bezet", | ||
"confirm": "Bevestigen", | ||
"end": "Einde", | ||
"free": "Vrij", | ||
"no_slots_found": "Geen tijdvakken gevonden", | ||
"selected": "Gekozen", | ||
"start": "Start", | ||
@@ -8,0 +12,0 @@ "unavailable": "Niet beschikbaar" |
@@ -5,4 +5,6 @@ { | ||
"close": "Sluiten", | ||
"earlier": "Eerder", | ||
"error": "Fout", | ||
"global_error": "Er is een fout opgetreden bij het laden van het element", | ||
"later": "Later", | ||
"loading": "Laden", | ||
@@ -9,0 +11,0 @@ "next": "Volgende", |
{ | ||
"availability_viewer": { | ||
"available": "Доступно", | ||
"booked": "Забронировано", | ||
"busy": "Занятый", | ||
"confirm": "Подтвердить", | ||
"end": "Конец", | ||
"free": "Свободно", | ||
"no_slots_found": "Интервалы не найдены", | ||
"selected": "Выбранный", | ||
"start": "Начало", | ||
@@ -8,0 +12,0 @@ "unavailable": "Недоступно" |
@@ -5,4 +5,6 @@ { | ||
"close": "Закрыть", | ||
"earlier": "Ранее", | ||
"error": "Ошибка", | ||
"global_error": "При загрузке элемента произошла ошибка", | ||
"later": "Позже", | ||
"loading": "Загрузка", | ||
@@ -9,0 +11,0 @@ "next": "Следующая", |
{ | ||
"availability_viewer": { | ||
"available": "Tillgänglig", | ||
"booked": "Bokad", | ||
"busy": "Upptagen", | ||
"confirm": "Bekräfta", | ||
"end": "Avsluta", | ||
"free": "Fri", | ||
"no_slots_found": "Inga luckor hittades", | ||
"selected": "Vald", | ||
"start": "Starta", | ||
@@ -8,0 +12,0 @@ "unavailable": "Inte tillgänglig" |
@@ -5,4 +5,6 @@ { | ||
"close": "Stäng", | ||
"earlier": "Tidigare", | ||
"error": "Fel", | ||
"global_error": "Ett fel uppstod när elementet hämtades", | ||
"later": "Senare", | ||
"loading": "Läser in", | ||
@@ -9,0 +11,0 @@ "next": "Nästa", |
Sorry, the diff of this file is too big to display
2616634
0.27%24363
0.32%