add-to-calendar-button 2.6.15 → 2.6.17

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/README.md CHANGED
@@ -4,7 +4,6 @@
4
4
  [![npm Installations Total](https://img.shields.io/npm/dt/add-to-calendar-button?label=npm%20Installations&style=for-the-badge)](https://www.npmjs.com/package/add-to-calendar-button)
5
5
  [![npm Installations per Month](https://img.shields.io/npm/dm/add-to-calendar-button?label=npm%20Installations%2FMonth&style=for-the-badge)](https://www.npmjs.com/package/add-to-calendar-button)
6
6
  [![jsDelivr npm Hits](https://img.shields.io/jsdelivr/npm/hm/add-to-calendar-button?label=jsDelivr%20npm%20hits&style=for-the-badge)](https://www.jsdelivr.com/package/npm/add-to-calendar-button?tab=stats)
7
- ![npm bundle size](https://img.shields.io/bundlephobia/minzip/add-to-calendar-button?style=for-the-badge)
8
7
 
9
8
  <br />
10
9
 
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Style: 3D
7
7
  *
8
- * Version: 2.6.15
8
+ * Version: 2.6.17
9
9
  * Creator: Jens Kuerschner (https://jekuer.com)
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.6.15
8
+ * Version: 2.6.17
9
9
  * Creator: Jens Kuerschner (https://jekuer.com)
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.6.15
8
+ * Version: 2.6.17
9
9
  * Creator: Jens Kuerschner (https://jekuer.com)
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.6.15
8
+ * Version: 2.6.17
9
9
  * Creator: Jens Kuerschner (https://jekuer.com)
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.6.15
8
+ * Version: 2.6.17
9
9
  * Creator: Jens Kuerschner (https://jekuer.com)
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.6.15
8
+ * Version: 2.6.17
9
9
  * Creator: Jens Kuerschner (https://jekuer.com)
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.6.15
8
+ * Version: 2.6.17
9
9
  * Creator: Jens Kuerschner (https://jekuer.com)
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)
@@ -974,14 +974,14 @@ function tzlib_get_timezones(jsonType = false) {
974
974
  * Add to Calendar Button
975
975
  * ++++++++++++++++++++++
976
976
  *
977
- * Version: 2.6.15
977
+ * Version: 2.6.17
978
978
  * Creator: Jens Kuerschner (https://jekuer.com)
979
979
  * Project: https://github.com/add2cal/add-to-calendar-button
980
980
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
981
981
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
982
982
  *
983
983
  */
984
- const atcbVersion = '2.6.15';
984
+ const atcbVersion = '2.6.17';
985
985
  const atcbCssTemplate = {};
986
986
  const atcbIsBrowser = () => {
987
987
  if (typeof window === 'undefined') {
@@ -1072,6 +1072,7 @@ const atcbAndroidInvalidOptions = ['apple'];
1072
1072
  const atcbStates = [];
1073
1073
  const atcbWcParams = [
1074
1074
  'debug',
1075
+ 'prooOverride',
1075
1076
  'cspnonce',
1076
1077
  'identifier',
1077
1078
  'name',
@@ -1148,6 +1149,7 @@ const atcbWcParams = [
1148
1149
  ];
1149
1150
  const atcbWcProParams = [
1150
1151
  'debug',
1152
+ 'prooOverride',
1151
1153
  'cspnonce',
1152
1154
  'attendee',
1153
1155
  'images',
@@ -1174,6 +1176,7 @@ const atcbWcProParams = [
1174
1176
  ];
1175
1177
  const atcbWcBooleanParams = [
1176
1178
  'debug',
1179
+ 'prooOverride',
1177
1180
  'useUserTZ',
1178
1181
  'hideIconButton',
1179
1182
  'hideIconList',
@@ -2843,6 +2846,7 @@ async function atcb_generate_modal_host(host, data, reset = true) {
2843
2846
  newModalHost.setAttribute('cspnonce', host.host.getAttribute('cspnonce'));
2844
2847
  }
2845
2848
  newModalHost.setAttribute('atcb-button-id', data.identifier);
2849
+ newModalHost.classList.add('add-to-calendar');
2846
2850
  newModalHost.setAttribute('style', 'transform:translate3D(0, 0, 0);visibility:visible;opacity:1;position:fixed;top:0;left:0;width:100%;height:100%;display:flex;z-index:13999998;');
2847
2851
  document.body.append(newModalHost);
2848
2852
  newModalHost.attachShadow({ mode: 'open', delegateFocus: true });
@@ -5023,6 +5027,15 @@ if (atcbIsBrowser()) {
5023
5027
  this.state.initializing = true;
5024
5028
  const debugVal = this.getAttribute('debug');
5025
5029
  this.debug = this.hasAttribute('debug') && (!debugVal || debugVal === 'true' || debugVal === '') ? true : false;
5030
+ if (this.hasAttribute('proOverride') || this.hasAttribute('prooverride')) {
5031
+ let proOverrideVal = null;
5032
+ if (this.hasAttribute('proOverride') && this.getAttribute('proOverride') !== '') {
5033
+ proOverrideVal = this.getAttribute('proOverride');
5034
+ } else {
5035
+ proOverrideVal = this.getAttribute('prooverride');
5036
+ }
5037
+ this.proOverride = !proOverrideVal || proOverrideVal === 'true' || proOverrideVal === '' ? true : false;
5038
+ }
5026
5039
  if ((this.hasAttribute('proKey') && this.getAttribute('proKey') !== '') || (this.hasAttribute('prokey') && this.getAttribute('prokey') !== '')) {
5027
5040
  if (this.hasAttribute('proKey') && this.getAttribute('proKey') !== '') {
5028
5041
  this.data = await atcb_get_pro_data(this.getAttribute('proKey'), this);
@@ -5148,6 +5161,7 @@ if (atcbIsBrowser()) {
5148
5161
  this.identifier = this.data.identifier;
5149
5162
  }
5150
5163
  this.setAttribute('atcb-button-id', this.data.identifier);
5164
+ this.classList.add('add-to-calendar');
5151
5165
  try {
5152
5166
  this.style.visibility = 'visible';
5153
5167
  this.style.opacity = '1';
@@ -5589,18 +5603,27 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
5589
5603
  */
5590
5604
  if (licenseKey && licenseKey !== '') {
5591
5605
  try {
5592
- const dataOverrides = el ? atcb_read_attributes(el, atcbWcProParams) : directData;
5606
+ const proOverride = el ? el.proOverride : directData.proOverride;
5607
+ const dataOverrides = el ? atcb_read_attributes(el, proOverride ? atcbWcParams : atcbWcProParams) : directData;
5593
5608
  const response = await fetch((dataOverrides.dev ? 'https://event-dev.caldn.net/' : 'https://event.caldn.net/') + licenseKey + '/config.json');
5594
5609
  if (response.ok) {
5595
5610
  const data = await response.json();
5596
5611
  if (!data.name || data.name === '') {
5597
5612
  throw new Error('Not possible to read proKey config from server...');
5598
5613
  }
5599
- atcbWcProParams.forEach((key) => {
5600
- if (Object.prototype.hasOwnProperty.call(dataOverrides, key)) {
5601
- data[`${key}`] = dataOverrides[`${key}`];
5602
- }
5603
- });
5614
+ if (proOverride) {
5615
+ atcbWcParams.forEach((key) => {
5616
+ if (Object.prototype.hasOwnProperty.call(dataOverrides, key)) {
5617
+ data[`${key}`] = dataOverrides[`${key}`];
5618
+ }
5619
+ });
5620
+ } else {
5621
+ atcbWcProParams.forEach((key) => {
5622
+ if (Object.prototype.hasOwnProperty.call(dataOverrides, key)) {
5623
+ data[`${key}`] = dataOverrides[`${key}`];
5624
+ }
5625
+ });
5626
+ }
5604
5627
  data.proKey = licenseKey;
5605
5628
  data.identifier = licenseKey;
5606
5629
  return data;
@@ -974,14 +974,14 @@ function tzlib_get_timezones(jsonType = false) {
974
974
  * Add to Calendar Button
975
975
  * ++++++++++++++++++++++
976
976
  *
977
- * Version: 2.6.15
977
+ * Version: 2.6.17
978
978
  * Creator: Jens Kuerschner (https://jekuer.com)
979
979
  * Project: https://github.com/add2cal/add-to-calendar-button
980
980
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
981
981
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
982
982
  *
983
983
  */
984
- const atcbVersion = '2.6.15';
984
+ const atcbVersion = '2.6.17';
985
985
  const atcbCssTemplate = {
986
986
  if (typeof window === 'undefined') {
987
987
  return false;
@@ -1071,6 +1071,7 @@ const atcbAndroidInvalidOptions = ['apple'];
1071
1071
  const atcbStates = [];
1072
1072
  const atcbWcParams = [
1073
1073
  'debug',
1074
+ 'prooOverride',
1074
1075
  'cspnonce',
1075
1076
  'identifier',
1076
1077
  'name',
@@ -1147,6 +1148,7 @@ const atcbWcParams = [
1147
1148
  ];
1148
1149
  const atcbWcProParams = [
1149
1150
  'debug',
1151
+ 'prooOverride',
1150
1152
  'cspnonce',
1151
1153
  'attendee',
1152
1154
  'images',
@@ -1173,6 +1175,7 @@ const atcbWcProParams = [
1173
1175
  ];
1174
1176
  const atcbWcBooleanParams = [
1175
1177
  'debug',
1178
+ 'prooOverride',
1176
1179
  'useUserTZ',
1177
1180
  'hideIconButton',
1178
1181
  'hideIconList',
@@ -2842,6 +2845,7 @@ async function atcb_generate_modal_host(host, data, reset = true) {
2842
2845
  newModalHost.setAttribute('cspnonce', host.host.getAttribute('cspnonce'));
2843
2846
  }
2844
2847
  newModalHost.setAttribute('atcb-button-id', data.identifier);
2848
+ newModalHost.classList.add('add-to-calendar');
2845
2849
  newModalHost.setAttribute('style', 'transform:translate3D(0, 0, 0);visibility:visible;opacity:1;position:fixed;top:0;left:0;width:100%;height:100%;display:flex;z-index:13999998;');
2846
2850
  document.body.append(newModalHost);
2847
2851
  newModalHost.attachShadow({ mode: 'open', delegateFocus: true });
@@ -5022,6 +5026,15 @@ if (atcbIsBrowser()) {
5022
5026
  this.state.initializing = true;
5023
5027
  const debugVal = this.getAttribute('debug');
5024
5028
  this.debug = this.hasAttribute('debug') && (!debugVal || debugVal === 'true' || debugVal === '') ? true : false;
5029
+ if (this.hasAttribute('proOverride') || this.hasAttribute('prooverride')) {
5030
+ let proOverrideVal = null;
5031
+ if (this.hasAttribute('proOverride') && this.getAttribute('proOverride') !== '') {
5032
+ proOverrideVal = this.getAttribute('proOverride');
5033
+ } else {
5034
+ proOverrideVal = this.getAttribute('prooverride');
5035
+ }
5036
+ this.proOverride = !proOverrideVal || proOverrideVal === 'true' || proOverrideVal === '' ? true : false;
5037
+ }
5025
5038
  if ((this.hasAttribute('proKey') && this.getAttribute('proKey') !== '') || (this.hasAttribute('prokey') && this.getAttribute('prokey') !== '')) {
5026
5039
  if (this.hasAttribute('proKey') && this.getAttribute('proKey') !== '') {
5027
5040
  this.data = await atcb_get_pro_data(this.getAttribute('proKey'), this);
@@ -5147,6 +5160,7 @@ if (atcbIsBrowser()) {
5147
5160
  this.identifier = this.data.identifier;
5148
5161
  }
5149
5162
  this.setAttribute('atcb-button-id', this.data.identifier);
5163
+ this.classList.add('add-to-calendar');
5150
5164
  try {
5151
5165
  this.style.visibility = 'visible';
5152
5166
  this.style.opacity = '1';
@@ -5588,18 +5602,27 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
5588
5602
  */
5589
5603
  if (licenseKey && licenseKey !== '') {
5590
5604
  try {
5591
- const dataOverrides = el ? atcb_read_attributes(el, atcbWcProParams) : directData;
5605
+ const proOverride = el ? el.proOverride : directData.proOverride;
5606
+ const dataOverrides = el ? atcb_read_attributes(el, proOverride ? atcbWcParams : atcbWcProParams) : directData;
5592
5607
  const response = await fetch((dataOverrides.dev ? 'https://event-dev.caldn.net/' : 'https://event.caldn.net/') + licenseKey + '/config.json');
5593
5608
  if (response.ok) {
5594
5609
  const data = await response.json();
5595
5610
  if (!data.name || data.name === '') {
5596
5611
  throw new Error('Not possible to read proKey config from server...');
5597
5612
  }
5598
- atcbWcProParams.forEach((key) => {
5599
- if (Object.prototype.hasOwnProperty.call(dataOverrides, key)) {
5600
- data[`${key}`] = dataOverrides[`${key}`];
5601
- }
5602
- });
5613
+ if (proOverride) {
5614
+ atcbWcParams.forEach((key) => {
5615
+ if (Object.prototype.hasOwnProperty.call(dataOverrides, key)) {
5616
+ data[`${key}`] = dataOverrides[`${key}`];
5617
+ }
5618
+ });
5619
+ } else {
5620
+ atcbWcProParams.forEach((key) => {
5621
+ if (Object.prototype.hasOwnProperty.call(dataOverrides, key)) {
5622
+ data[`${key}`] = dataOverrides[`${key}`];
5623
+ }
5624
+ });
5625
+ }
5603
5626
  data.proKey = licenseKey;
5604
5627
  data.identifier = licenseKey;
5605
5628
  return data;
@@ -974,14 +974,14 @@ function tzlib_get_timezones(jsonType = false) {
974
974
  * Add to Calendar Button
975
975
  * ++++++++++++++++++++++
976
976
  *
977
- * Version: 2.6.15
977
+ * Version: 2.6.17
978
978
  * Creator: Jens Kuerschner (https://jekuer.com)
979
979
  * Project: https://github.com/add2cal/add-to-calendar-button
980
980
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
981
981
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
982
982
  *
983
983
  */
984
- const atcbVersion = '2.6.15';
984
+ const atcbVersion = '2.6.17';
985
985
  const atcbCssTemplate = {};
986
986
  const atcbIsBrowser = () => {
987
987
  if (typeof window === 'undefined') {
@@ -1072,6 +1072,7 @@ const atcbAndroidInvalidOptions = ['apple'];
1072
1072
  const atcbStates = [];
1073
1073
  const atcbWcParams = [
1074
1074
  'debug',
1075
+ 'prooOverride',
1075
1076
  'cspnonce',
1076
1077
  'identifier',
1077
1078
  'name',
@@ -1148,6 +1149,7 @@ const atcbWcParams = [
1148
1149
  ];
1149
1150
  const atcbWcProParams = [
1150
1151
  'debug',
1152
+ 'prooOverride',
1151
1153
  'cspnonce',
1152
1154
  'attendee',
1153
1155
  'images',
@@ -1174,6 +1176,7 @@ const atcbWcProParams = [
1174
1176
  ];
1175
1177
  const atcbWcBooleanParams = [
1176
1178
  'debug',
1179
+ 'prooOverride',
1177
1180
  'useUserTZ',
1178
1181
  'hideIconButton',
1179
1182
  'hideIconList',
@@ -3549,6 +3552,7 @@ async function atcb_generate_modal_host(host, data, reset = true) {
3549
3552
  newModalHost.setAttribute('cspnonce', host.host.getAttribute('cspnonce'));
3550
3553
  }
3551
3554
  newModalHost.setAttribute('atcb-button-id', data.identifier);
3555
+ newModalHost.classList.add('add-to-calendar');
3552
3556
  newModalHost.setAttribute('style', 'transform:translate3D(0, 0, 0);visibility:visible;opacity:1;position:fixed;top:0;left:0;width:100%;height:100%;display:flex;z-index:13999998;');
3553
3557
  document.body.append(newModalHost);
3554
3558
  newModalHost.attachShadow({ mode: 'open', delegateFocus: true });
@@ -5729,6 +5733,15 @@ if (atcbIsBrowser()) {
5729
5733
  this.state.initializing = true;
5730
5734
  const debugVal = this.getAttribute('debug');
5731
5735
  this.debug = this.hasAttribute('debug') && (!debugVal || debugVal === 'true' || debugVal === '') ? true : false;
5736
+ if (this.hasAttribute('proOverride') || this.hasAttribute('prooverride')) {
5737
+ let proOverrideVal = null;
5738
+ if (this.hasAttribute('proOverride') && this.getAttribute('proOverride') !== '') {
5739
+ proOverrideVal = this.getAttribute('proOverride');
5740
+ } else {
5741
+ proOverrideVal = this.getAttribute('prooverride');
5742
+ }
5743
+ this.proOverride = !proOverrideVal || proOverrideVal === 'true' || proOverrideVal === '' ? true : false;
5744
+ }
5732
5745
  if ((this.hasAttribute('proKey') && this.getAttribute('proKey') !== '') || (this.hasAttribute('prokey') && this.getAttribute('prokey') !== '')) {
5733
5746
  if (this.hasAttribute('proKey') && this.getAttribute('proKey') !== '') {
5734
5747
  this.data = await atcb_get_pro_data(this.getAttribute('proKey'), this);
@@ -5854,6 +5867,7 @@ if (atcbIsBrowser()) {
5854
5867
  this.identifier = this.data.identifier;
5855
5868
  }
5856
5869
  this.setAttribute('atcb-button-id', this.data.identifier);
5870
+ this.classList.add('add-to-calendar');
5857
5871
  try {
5858
5872
  this.style.visibility = 'visible';
5859
5873
  this.style.opacity = '1';
@@ -6295,18 +6309,27 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
6295
6309
  */
6296
6310
  if (licenseKey && licenseKey !== '') {
6297
6311
  try {
6298
- const dataOverrides = el ? atcb_read_attributes(el, atcbWcProParams) : directData;
6312
+ const proOverride = el ? el.proOverride : directData.proOverride;
6313
+ const dataOverrides = el ? atcb_read_attributes(el, proOverride ? atcbWcParams : atcbWcProParams) : directData;
6299
6314
  const response = await fetch((dataOverrides.dev ? 'https://event-dev.caldn.net/' : 'https://event.caldn.net/') + licenseKey + '/config.json');
6300
6315
  if (response.ok) {
6301
6316
  const data = await response.json();
6302
6317
  if (!data.name || data.name === '') {
6303
6318
  throw new Error('Not possible to read proKey config from server...');
6304
6319
  }
6305
- atcbWcProParams.forEach((key) => {
6306
- if (Object.prototype.hasOwnProperty.call(dataOverrides, key)) {
6307
- data[`${key}`] = dataOverrides[`${key}`];
6308
- }
6309
- });
6320
+ if (proOverride) {
6321
+ atcbWcParams.forEach((key) => {
6322
+ if (Object.prototype.hasOwnProperty.call(dataOverrides, key)) {
6323
+ data[`${key}`] = dataOverrides[`${key}`];
6324
+ }
6325
+ });
6326
+ } else {
6327
+ atcbWcProParams.forEach((key) => {
6328
+ if (Object.prototype.hasOwnProperty.call(dataOverrides, key)) {
6329
+ data[`${key}`] = dataOverrides[`${key}`];
6330
+ }
6331
+ });
6332
+ }
6310
6333
  data.proKey = licenseKey;
6311
6334
  data.identifier = licenseKey;
6312
6335
  return data;
package/dist/atcb.js CHANGED
@@ -974,14 +974,14 @@ function tzlib_get_timezones(jsonType = false) {
974
974
  * Add to Calendar Button
975
975
  * ++++++++++++++++++++++
976
976
  *
977
- * Version: 2.6.15
977
+ * Version: 2.6.17
978
978
  * Creator: Jens Kuerschner (https://jekuer.com)
979
979
  * Project: https://github.com/add2cal/add-to-calendar-button
980
980
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
981
981
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
982
982
  *
983
983
  */
984
- const atcbVersion = '2.6.15';
984
+ const atcbVersion = '2.6.17';
985
985
  const atcbCssTemplate = {
986
986
  if (typeof window === 'undefined') {
987
987
  return false;
@@ -1071,6 +1071,7 @@ const atcbAndroidInvalidOptions = ['apple'];
1071
1071
  const atcbStates = [];
1072
1072
  const atcbWcParams = [
1073
1073
  'debug',
1074
+ 'prooOverride',
1074
1075
  'cspnonce',
1075
1076
  'identifier',
1076
1077
  'name',
@@ -1147,6 +1148,7 @@ const atcbWcParams = [
1147
1148
  ];
1148
1149
  const atcbWcProParams = [
1149
1150
  'debug',
1151
+ 'prooOverride',
1150
1152
  'cspnonce',
1151
1153
  'attendee',
1152
1154
  'images',
@@ -1173,6 +1175,7 @@ const atcbWcProParams = [
1173
1175
  ];
1174
1176
  const atcbWcBooleanParams = [
1175
1177
  'debug',
1178
+ 'prooOverride',
1176
1179
  'useUserTZ',
1177
1180
  'hideIconButton',
1178
1181
  'hideIconList',
@@ -3548,6 +3551,7 @@ async function atcb_generate_modal_host(host, data, reset = true) {
3548
3551
  newModalHost.setAttribute('cspnonce', host.host.getAttribute('cspnonce'));
3549
3552
  }
3550
3553
  newModalHost.setAttribute('atcb-button-id', data.identifier);
3554
+ newModalHost.classList.add('add-to-calendar');
3551
3555
  newModalHost.setAttribute('style', 'transform:translate3D(0, 0, 0);visibility:visible;opacity:1;position:fixed;top:0;left:0;width:100%;height:100%;display:flex;z-index:13999998;');
3552
3556
  document.body.append(newModalHost);
3553
3557
  newModalHost.attachShadow({ mode: 'open', delegateFocus: true });
@@ -5728,6 +5732,15 @@ if (atcbIsBrowser()) {
5728
5732
  this.state.initializing = true;
5729
5733
  const debugVal = this.getAttribute('debug');
5730
5734
  this.debug = this.hasAttribute('debug') && (!debugVal || debugVal === 'true' || debugVal === '') ? true : false;
5735
+ if (this.hasAttribute('proOverride') || this.hasAttribute('prooverride')) {
5736
+ let proOverrideVal = null;
5737
+ if (this.hasAttribute('proOverride') && this.getAttribute('proOverride') !== '') {
5738
+ proOverrideVal = this.getAttribute('proOverride');
5739
+ } else {
5740
+ proOverrideVal = this.getAttribute('prooverride');
5741
+ }
5742
+ this.proOverride = !proOverrideVal || proOverrideVal === 'true' || proOverrideVal === '' ? true : false;
5743
+ }
5731
5744
  if ((this.hasAttribute('proKey') && this.getAttribute('proKey') !== '') || (this.hasAttribute('prokey') && this.getAttribute('prokey') !== '')) {
5732
5745
  if (this.hasAttribute('proKey') && this.getAttribute('proKey') !== '') {
5733
5746
  this.data = await atcb_get_pro_data(this.getAttribute('proKey'), this);
@@ -5853,6 +5866,7 @@ if (atcbIsBrowser()) {
5853
5866
  this.identifier = this.data.identifier;
5854
5867
  }
5855
5868
  this.setAttribute('atcb-button-id', this.data.identifier);
5869
+ this.classList.add('add-to-calendar');
5856
5870
  try {
5857
5871
  this.style.visibility = 'visible';
5858
5872
  this.style.opacity = '1';
@@ -6294,18 +6308,27 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
6294
6308
  */
6295
6309
  if (licenseKey && licenseKey !== '') {
6296
6310
  try {
6297
- const dataOverrides = el ? atcb_read_attributes(el, atcbWcProParams) : directData;
6311
+ const proOverride = el ? el.proOverride : directData.proOverride;
6312
+ const dataOverrides = el ? atcb_read_attributes(el, proOverride ? atcbWcParams : atcbWcProParams) : directData;
6298
6313
  const response = await fetch((dataOverrides.dev ? 'https://event-dev.caldn.net/' : 'https://event.caldn.net/') + licenseKey + '/config.json');
6299
6314
  if (response.ok) {
6300
6315
  const data = await response.json();
6301
6316
  if (!data.name || data.name === '') {
6302
6317
  throw new Error('Not possible to read proKey config from server...');
6303
6318
  }
6304
- atcbWcProParams.forEach((key) => {
6305
- if (Object.prototype.hasOwnProperty.call(dataOverrides, key)) {
6306
- data[`${key}`] = dataOverrides[`${key}`];
6307
- }
6308
- });
6319
+ if (proOverride) {
6320
+ atcbWcParams.forEach((key) => {
6321
+ if (Object.prototype.hasOwnProperty.call(dataOverrides, key)) {
6322
+ data[`${key}`] = dataOverrides[`${key}`];
6323
+ }
6324
+ });
6325
+ } else {
6326
+ atcbWcProParams.forEach((key) => {
6327
+ if (Object.prototype.hasOwnProperty.call(dataOverrides, key)) {
6328
+ data[`${key}`] = dataOverrides[`${key}`];
6329
+ }
6330
+ });
6331
+ }
6309
6332
  data.proKey = licenseKey;
6310
6333
  data.identifier = licenseKey;
6311
6334
  return data;
@@ -7,14 +7,14 @@ const tzlibActions = require('timezones-ical-library');
7
7
  * Add to Calendar Button
8
8
  * ++++++++++++++++++++++
9
9
  *
10
- * Version: 2.6.15
10
+ * Version: 2.6.17
11
11
  * Creator: Jens Kuerschner (https://jekuer.com)
12
12
  * Project: https://github.com/add2cal/add-to-calendar-button
13
13
  * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)
14
14
  * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE!
15
15
  *
16
16
  */
17
- const atcbVersion = '2.6.15';
17
+ const atcbVersion = '2.6.17';
18
18
  const atcbCssTemplate = {
19
19
  if (typeof window === 'undefined') {
20
20
  return false;
@@ -104,6 +104,7 @@ const atcbAndroidInvalidOptions = ['apple'];
104
104
  const atcbStates = [];
105
105
  const atcbWcParams = [
106
106
  'debug',
107
+ 'prooOverride',
107
108
  'cspnonce',
108
109
  'identifier',
109
110
  'name',
@@ -180,6 +181,7 @@ const atcbWcParams = [
180
181
  ];
181
182
  const atcbWcProParams = [
182
183
  'debug',
184
+ 'prooOverride',
183
185
  'cspnonce',
184
186
  'attendee',
185
187
  'images',
@@ -206,6 +208,7 @@ const atcbWcProParams = [
206
208
  ];
207
209
  const atcbWcBooleanParams = [
208
210
  'debug',
211
+ 'prooOverride',
209
212
  'useUserTZ',
210
213
  'hideIconButton',
211
214
  'hideIconList',
@@ -2581,6 +2584,7 @@ async function atcb_generate_modal_host(host, data, reset = true) {
2581
2584
  newModalHost.setAttribute('cspnonce', host.host.getAttribute('cspnonce'));
2582
2585
  }
2583
2586
  newModalHost.setAttribute('atcb-button-id', data.identifier);
2587
+ newModalHost.classList.add('add-to-calendar');
2584
2588
  newModalHost.setAttribute('style', 'transform:translate3D(0, 0, 0);visibility:visible;opacity:1;position:fixed;top:0;left:0;width:100%;height:100%;display:flex;z-index:13999998;');
2585
2589
  document.body.append(newModalHost);
2586
2590
  newModalHost.attachShadow({ mode: 'open', delegateFocus: true });
@@ -4761,6 +4765,15 @@ if (atcbIsBrowser()) {
4761
4765
  this.state.initializing = true;
4762
4766
  const debugVal = this.getAttribute('debug');
4763
4767
  this.debug = this.hasAttribute('debug') && (!debugVal || debugVal === 'true' || debugVal === '') ? true : false;
4768
+ if (this.hasAttribute('proOverride') || this.hasAttribute('prooverride')) {
4769
+ let proOverrideVal = null;
4770
+ if (this.hasAttribute('proOverride') && this.getAttribute('proOverride') !== '') {
4771
+ proOverrideVal = this.getAttribute('proOverride');
4772
+ } else {
4773
+ proOverrideVal = this.getAttribute('prooverride');
4774
+ }
4775
+ this.proOverride = !proOverrideVal || proOverrideVal === 'true' || proOverrideVal === '' ? true : false;
4776
+ }
4764
4777
  if ((this.hasAttribute('proKey') && this.getAttribute('proKey') !== '') || (this.hasAttribute('prokey') && this.getAttribute('prokey') !== '')) {
4765
4778
  if (this.hasAttribute('proKey') && this.getAttribute('proKey') !== '') {
4766
4779
  this.data = await atcb_get_pro_data(this.getAttribute('proKey'), this);
@@ -4886,6 +4899,7 @@ if (atcbIsBrowser()) {
4886
4899
  this.identifier = this.data.identifier;
4887
4900
  }
4888
4901
  this.setAttribute('atcb-button-id', this.data.identifier);
4902
+ this.classList.add('add-to-calendar');
4889
4903
  try {
4890
4904
  this.style.visibility = 'visible';
4891
4905
  this.style.opacity = '1';
@@ -5327,18 +5341,27 @@ async function atcb_get_pro_data(licenseKey, el = null, directData = {}) {
5327
5341
  */
5328
5342
  if (licenseKey && licenseKey !== '') {
5329
5343
  try {
5330
- const dataOverrides = el ? atcb_read_attributes(el, atcbWcProParams) : directData;
5344
+ const proOverride = el ? el.proOverride : directData.proOverride;
5345
+ const dataOverrides = el ? atcb_read_attributes(el, proOverride ? atcbWcParams : atcbWcProParams) : directData;
5331
5346
  const response = await fetch((dataOverrides.dev ? 'https://event-dev.caldn.net/' : 'https://event.caldn.net/') + licenseKey + '/config.json');
5332
5347
  if (response.ok) {
5333
5348
  const data = await response.json();
5334
5349
  if (!data.name || data.name === '') {
5335
5350
  throw new Error('Not possible to read proKey config from server...');
5336
5351
  }
5337
- atcbWcProParams.forEach((key) => {
5338
- if (Object.prototype.hasOwnProperty.call(dataOverrides, key)) {
5339
- data[`${key}`] = dataOverrides[`${key}`];
5340
- }
5341
- });
5352
+ if (proOverride) {
5353
+ atcbWcParams.forEach((key) => {
5354
+ if (Object.prototype.hasOwnProperty.call(dataOverrides, key)) {
5355
+ data[`${key}`] = dataOverrides[`${key}`];
5356
+ }
5357
+ });
5358
+ } else {
5359
+ atcbWcProParams.forEach((key) => {
5360
+ if (Object.prototype.hasOwnProperty.call(dataOverrides, key)) {
5361
+ data[`${key}`] = dataOverrides[`${key}`];
5362
+ }
5363
+ });
5364
+ }
5342
5365
  data.proKey = licenseKey;
5343
5366
  data.identifier = licenseKey;
5344
5367
  return data;