add-to-calendar-button 2.5.2 → 2.5.3

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.
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Style: 3D
7
7
  *
8
- * Version: 2.5.2
8
+ * Version: 2.5.3
9
9
  * Creator: Jens Kuerschner (https://jenskuerschner.de)
10
10
  * Project: https://github.com/add2cal/add-to-calendar-button
11
11
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Style: Date
7
7
  *
8
- * Version: 2.5.2
8
+ * Version: 2.5.3
9
9
  * Creator: Jens Kuerschner (https://jenskuerschner.de)
10
10
  * Project: https://github.com/add2cal/add-to-calendar-button
11
11
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Style: Flat
7
7
  *
8
- * Version: 2.5.2
8
+ * Version: 2.5.3
9
9
  * Creator: Jens Kuerschner (https://jenskuerschner.de)
10
10
  * Project: https://github.com/add2cal/add-to-calendar-button
11
11
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Style: Neumorphism
7
7
  *
8
- * Version: 2.5.2
8
+ * Version: 2.5.3
9
9
  * Creator: Jens Kuerschner (https://jenskuerschner.de)
10
10
  * Project: https://github.com/add2cal/add-to-calendar-button
11
11
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Style: Round
7
7
  *
8
- * Version: 2.5.2
8
+ * Version: 2.5.3
9
9
  * Creator: Jens Kuerschner (https://jenskuerschner.de)
10
10
  * Project: https://github.com/add2cal/add-to-calendar-button
11
11
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Style: Text
7
7
  *
8
- * Version: 2.5.2
8
+ * Version: 2.5.3
9
9
  * Creator: Jens Kuerschner (https://jenskuerschner.de)
10
10
  * Project: https://github.com/add2cal/add-to-calendar-button
11
11
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Style: Default
7
7
  *
8
- * Version: 2.5.2
8
+ * Version: 2.5.3
9
9
  * Creator: Jens Kuerschner (https://jenskuerschner.de)
10
10
  * Project: https://github.com/add2cal/add-to-calendar-button
11
11
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
@@ -977,14 +977,14 @@ function tzlib_get_timezones(jsonType = false) {
977
977
  * Add to Calendar Button
978
978
  * ++++++++++++++++++++++
979
979
  *
980
- * Version: 2.5.2
980
+ * Version: 2.5.3
981
981
  * Creator: Jens Kuerschner (https://jenskuerschner.de)
982
982
  * Project: https://github.com/add2cal/add-to-calendar-button
983
983
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
984
984
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
985
985
  *
986
986
  */
987
- const atcbVersion = '2.5.2';
987
+ const atcbVersion = '2.5.3';
988
988
  const atcbCssTemplate = {};
989
989
  const atcbIsBrowser = () => {
990
990
  if (typeof window === 'undefined') {
@@ -977,14 +977,14 @@ function tzlib_get_timezones(jsonType = false) {
977
977
  * Add to Calendar Button
978
978
  * ++++++++++++++++++++++
979
979
  *
980
- * Version: 2.5.2
980
+ * Version: 2.5.3
981
981
  * Creator: Jens Kuerschner (https://jenskuerschner.de)
982
982
  * Project: https://github.com/add2cal/add-to-calendar-button
983
983
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
984
984
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
985
985
  *
986
986
  */
987
- const atcbVersion = '2.5.2';
987
+ const atcbVersion = '2.5.3';
988
988
  const atcbCssTemplate = {
989
989
  if (typeof window === 'undefined') {
990
990
  return false;
@@ -977,14 +977,14 @@ function tzlib_get_timezones(jsonType = false) {
977
977
  * Add to Calendar Button
978
978
  * ++++++++++++++++++++++
979
979
  *
980
- * Version: 2.5.2
980
+ * Version: 2.5.3
981
981
  * Creator: Jens Kuerschner (https://jenskuerschner.de)
982
982
  * Project: https://github.com/add2cal/add-to-calendar-button
983
983
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
984
984
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
985
985
  *
986
986
  */
987
- const atcbVersion = '2.5.2';
987
+ const atcbVersion = '2.5.3';
988
988
  const atcbCssTemplate = {};
989
989
  const atcbIsBrowser = () => {
990
990
  if (typeof window === 'undefined') {
@@ -3061,7 +3061,7 @@ async function atcb_generate_ty(host, data) {
3061
3061
  tyContent += '<p class="pro-pt"><a href="' + tyData.url + '" target="_blank" rel="noopener" class="atcb-modal-btn atcb-modal-btn-primary atcb-modal-btn-border">' + label + '</a></p>';
3062
3062
  }
3063
3063
  tyContent += '</div></div>';
3064
- atcb_create_modal(tyHost, data, 'checkmark', tyData.headline, tyContent);
3064
+ await atcb_create_modal(tyHost, data, 'checkmark', tyData.headline, tyContent);
3065
3065
  if (tyData.type === 'share') {
3066
3066
  const copyBtn = tyHost.getElementById('atcb-ty-share-copy');
3067
3067
  copyBtn.addEventListener('click', function () {
@@ -3316,15 +3316,11 @@ async function atcb_generate_rsvp(host, data, keyboardTrigger = false, inline =
3316
3316
  '</button><span id="pro-form-submitting" class="pro-waiting"><span>.</span><span>.</span><span>.</span></span></p>';
3317
3317
  rsvpContent += '</form>';
3318
3318
  rsvpContent += '</div></div>';
3319
- const rsvpHost = (async function () {
3320
- if (!inline || directModal) {
3321
- return await atcb_generate_modal_host(host, data);
3322
- }
3323
- return host;
3324
- })();
3319
+ let rsvpHost = null;
3325
3320
  if (!inline || directModal) {
3321
+ rsvpHost = await atcb_generate_modal_host(host, data);
3326
3322
  atcb_set_fullsize(rsvpHost.querySelector('.atcb-modal-host-initialized'));
3327
- atcb_create_modal(
3323
+ await atcb_create_modal(
3328
3324
  rsvpHost,
3329
3325
  data,
3330
3326
  undefined,
@@ -3341,6 +3337,7 @@ async function atcb_generate_rsvp(host, data, keyboardTrigger = false, inline =
3341
3337
  false,
3342
3338
  );
3343
3339
  } else {
3340
+ rsvpHost = host;
3344
3341
  const rsvpInlineWrapper = document.createElement('div');
3345
3342
  rsvpInlineWrapper.classList.add('atcb-modal-box', 'rsvp-inline-wrapper');
3346
3343
  if (data.rtl) {
package/dist/atcb.js CHANGED
@@ -977,14 +977,14 @@ function tzlib_get_timezones(jsonType = false) {
977
977
  * Add to Calendar Button
978
978
  * ++++++++++++++++++++++
979
979
  *
980
- * Version: 2.5.2
980
+ * Version: 2.5.3
981
981
  * Creator: Jens Kuerschner (https://jenskuerschner.de)
982
982
  * Project: https://github.com/add2cal/add-to-calendar-button
983
983
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
984
984
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
985
985
  *
986
986
  */
987
- const atcbVersion = '2.5.2';
987
+ const atcbVersion = '2.5.3';
988
988
  const atcbCssTemplate = {
989
989
  if (typeof window === 'undefined') {
990
990
  return false;
@@ -3060,7 +3060,7 @@ async function atcb_generate_ty(host, data) {
3060
3060
  tyContent += '<p class="pro-pt"><a href="' + tyData.url + '" target="_blank" rel="noopener" class="atcb-modal-btn atcb-modal-btn-primary atcb-modal-btn-border">' + label + '</a></p>';
3061
3061
  }
3062
3062
  tyContent += '</div></div>';
3063
- atcb_create_modal(tyHost, data, 'checkmark', tyData.headline, tyContent);
3063
+ await atcb_create_modal(tyHost, data, 'checkmark', tyData.headline, tyContent);
3064
3064
  if (tyData.type === 'share') {
3065
3065
  const copyBtn = tyHost.getElementById('atcb-ty-share-copy');
3066
3066
  copyBtn.addEventListener('click', function () {
@@ -3315,15 +3315,11 @@ async function atcb_generate_rsvp(host, data, keyboardTrigger = false, inline =
3315
3315
  '</button><span id="pro-form-submitting" class="pro-waiting"><span>.</span><span>.</span><span>.</span></span></p>';
3316
3316
  rsvpContent += '</form>';
3317
3317
  rsvpContent += '</div></div>';
3318
- const rsvpHost = (async function () {
3319
- if (!inline || directModal) {
3320
- return await atcb_generate_modal_host(host, data);
3321
- }
3322
- return host;
3323
- })();
3318
+ let rsvpHost = null;
3324
3319
  if (!inline || directModal) {
3320
+ rsvpHost = await atcb_generate_modal_host(host, data);
3325
3321
  atcb_set_fullsize(rsvpHost.querySelector('.atcb-modal-host-initialized'));
3326
- atcb_create_modal(
3322
+ await atcb_create_modal(
3327
3323
  rsvpHost,
3328
3324
  data,
3329
3325
  undefined,
@@ -3340,6 +3336,7 @@ async function atcb_generate_rsvp(host, data, keyboardTrigger = false, inline =
3340
3336
  false,
3341
3337
  );
3342
3338
  } else {
3339
+ rsvpHost = host;
3343
3340
  const rsvpInlineWrapper = document.createElement('div');
3344
3341
  rsvpInlineWrapper.classList.add('atcb-modal-box', 'rsvp-inline-wrapper');
3345
3342
  if (data.rtl) {