diff --git a/dist/booking.js b/dist/booking.js index d2a4477..dcf877a 100644 --- a/dist/booking.js +++ b/dist/booking.js @@ -47376,7 +47376,7 @@ function Initialize() { // Get library version var getVersion = function() { - return "2.9.8"; + return "2.9.9"; }; var destroy = function() { diff --git a/dist/booking.min.js b/dist/booking.min.js index 1dcb328..20b86a5 100644 --- a/dist/booking.min.js +++ b/dist/booking.min.js @@ -15,7 +15,7 @@ e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_Augus * Copyright 2018 Timekit, Inc. * Booking.js is freely distributable under the MIT license. * - */var r=n(6),i=n(30),o=window.timekitBookingConfig;window&&o&&!1!==o.autoload?r(window).on("load",(function(){var t=new i;t.init(o),e.exports=t})):e.exports=i},function(e,t,n){"use strict";var r=n(6),i=n(31),o=n(56),a=n(59),s=n(61);e.exports=function(){var e=i.newInstance(),t=new o,n=new a({config:t}),c=new s({config:t,utils:n,sdk:e}),l=t.retrieve,u=function(t){e.configure(l().sdk)},d=function(t){if(!t.app_key)return c.triggerError('Missing "app_key" in conjunction with "project_id", please provide your "app_key" for authentication'),this;u(),e.makeRequest({url:"/projects/embed/"+t.project_id,method:"get"}).then((function(e){h(e,t)})).catch((function(e){c.triggerError(['The project could not be found, please double-check your "project_id" and "app_key"',e])}))},f=function(t){u(),e.makeRequest({url:"/projects/hosted/"+t.project_slug,method:"get"}).then((function(e){h(e,t)})).catch((function(e){c.triggerError(['The project could not be found, please double-check your "project_slug"',e])}))},h=function(e,t){var i=e.data;i.id&&(i.project_id=i.id,delete i.id),i.slug&&(i.project_slug=i.slug,delete i.slug);var o=r.extend(!0,{},i,t);n.logDebug(["Remote config:",i]),p(o)},p=function(e){try{t.parseAndUpdate(e)}catch(e){return c.triggerError(e),this}n.logDebug(["Final config:",l()]);try{return g()}catch(e){return c.triggerError(e),this}},g=function(){return n.doCallback("renderStarted"),u(),l().ui.timezone?c.setCustomerTimezone(l().ui.timezone):c.guessCustomerTimezone(),c.initializeCalendar(),c.getAvailability(),l().ui.avatar&&c.renderAvatarImage(),l().ui.display_name&&c.renderDisplayName(),c.renderFooter(),n.doCallback("renderCompleted"),this},m=function(){return"2.9.8"};return{setConfig:t.parseAndUpdate,getConfig:l,getVersion:m,render:g,init:function(e,r){r=r||window,t.setGlobal(r);var i=t.setDefaults(e||{});t.update(i),n.logDebug(["Version:",m()]),n.logDebug(["Supplied config:",e]);try{c.prepareDOM(e||{})}catch(e){return n.logError(e),this}if(!n.doesConfigExist(e))return c.triggerError("No configuration was supplied. Please supply a config object upon library initialization"),this;if(!n.isRemoteProject(e)||e.disable_remote_load){var o=t.setDefaultsWithoutProject(e);return p(o)}return n.isEmbeddedProject(e)&&d(e),n.isHostedProject(e)&&f(e),this},destroy:function(){return c.destroyFullCalendar(),c.prepareDOM({}),t.update({}),this},timekitCreateBooking:c.timekitCreateBooking,fullCalendar:c.fullCalendar,timekitSdk:e}}},function(e,t,n){"use strict";(function(t){ + */var r=n(6),i=n(30),o=window.timekitBookingConfig;window&&o&&!1!==o.autoload?r(window).on("load",(function(){var t=new i;t.init(o),e.exports=t})):e.exports=i},function(e,t,n){"use strict";var r=n(6),i=n(31),o=n(56),a=n(59),s=n(61);e.exports=function(){var e=i.newInstance(),t=new o,n=new a({config:t}),c=new s({config:t,utils:n,sdk:e}),l=t.retrieve,u=function(t){e.configure(l().sdk)},d=function(t){if(!t.app_key)return c.triggerError('Missing "app_key" in conjunction with "project_id", please provide your "app_key" for authentication'),this;u(),e.makeRequest({url:"/projects/embed/"+t.project_id,method:"get"}).then((function(e){h(e,t)})).catch((function(e){c.triggerError(['The project could not be found, please double-check your "project_id" and "app_key"',e])}))},f=function(t){u(),e.makeRequest({url:"/projects/hosted/"+t.project_slug,method:"get"}).then((function(e){h(e,t)})).catch((function(e){c.triggerError(['The project could not be found, please double-check your "project_slug"',e])}))},h=function(e,t){var i=e.data;i.id&&(i.project_id=i.id,delete i.id),i.slug&&(i.project_slug=i.slug,delete i.slug);var o=r.extend(!0,{},i,t);n.logDebug(["Remote config:",i]),p(o)},p=function(e){try{t.parseAndUpdate(e)}catch(e){return c.triggerError(e),this}n.logDebug(["Final config:",l()]);try{return g()}catch(e){return c.triggerError(e),this}},g=function(){return n.doCallback("renderStarted"),u(),l().ui.timezone?c.setCustomerTimezone(l().ui.timezone):c.guessCustomerTimezone(),c.initializeCalendar(),c.getAvailability(),l().ui.avatar&&c.renderAvatarImage(),l().ui.display_name&&c.renderDisplayName(),c.renderFooter(),n.doCallback("renderCompleted"),this},m=function(){return"2.9.9"};return{setConfig:t.parseAndUpdate,getConfig:l,getVersion:m,render:g,init:function(e,r){r=r||window,t.setGlobal(r);var i=t.setDefaults(e||{});t.update(i),n.logDebug(["Version:",m()]),n.logDebug(["Supplied config:",e]);try{c.prepareDOM(e||{})}catch(e){return n.logError(e),this}if(!n.doesConfigExist(e))return c.triggerError("No configuration was supplied. Please supply a config object upon library initialization"),this;if(!n.isRemoteProject(e)||e.disable_remote_load){var o=t.setDefaultsWithoutProject(e);return p(o)}return n.isEmbeddedProject(e)&&d(e),n.isHostedProject(e)&&f(e),this},destroy:function(){return c.destroyFullCalendar(),c.prepareDOM({}),t.update({}),this},timekitCreateBooking:c.timekitCreateBooking,fullCalendar:c.fullCalendar,timekitSdk:e}}},function(e,t,n){"use strict";(function(t){ /*! * Timekit JavaScript SDK * http://timekit.io diff --git a/package.json b/package.json index 5321a96..e9d2c03 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "2.9.8", + "version": "2.9.9", "name": "timekit-booking", "description": "Make a beautiful embeddable booking widget in minutes", "main": "dist/booking.min.js", diff --git a/version b/version index bd13c64..559308c 100644 --- a/version +++ b/version @@ -1 +1 @@ -v2.9.8 \ No newline at end of file +v2.9.9 \ No newline at end of file