@salla.sa/twilight-components 2.12.6 → 2.12.7

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.
Files changed (73) hide show
  1. package/dist/cjs/{app-globals-4b66abc1.js → app-globals-4f8bbf37.js} +2 -2
  2. package/dist/cjs/app-globals-4f8bbf37.js.map +1 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/salla-add-product-button_40.cjs.entry.js +19 -26
  5. package/dist/cjs/salla-add-product-button_40.cjs.entry.js.map +1 -1
  6. package/dist/cjs/salla-product-options.cjs.entry.js +2 -1
  7. package/dist/cjs/salla-product-options.cjs.entry.js.map +1 -1
  8. package/dist/cjs/twilight.cjs.js +1 -1
  9. package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +1 -1
  10. package/dist/collection/components/salla-add-product-button/salla-add-product-button.js.map +1 -1
  11. package/dist/collection/components/salla-product-options/salla-product-options.js +2 -1
  12. package/dist/collection/components/salla-product-options/salla-product-options.js.map +1 -1
  13. package/dist/collection/components/salla-quick-order/salla-quick-order.css +3 -0
  14. package/dist/collection/components/salla-social-share/salla-social-share.js +16 -23
  15. package/dist/collection/components/salla-social-share/salla-social-share.js.map +1 -1
  16. package/dist/collection/components/salla-user-menu/salla-user-menu.js +1 -1
  17. package/dist/collection/components/salla-user-menu/salla-user-menu.js.map +1 -1
  18. package/dist/components/index.js +1 -1
  19. package/dist/components/index.js.map +1 -1
  20. package/dist/components/salla-add-product-button2.js +1 -1
  21. package/dist/components/salla-add-product-button2.js.map +1 -1
  22. package/dist/components/salla-product-options.js +2 -1
  23. package/dist/components/salla-product-options.js.map +1 -1
  24. package/dist/components/salla-quick-order.js +1 -1
  25. package/dist/components/salla-quick-order.js.map +1 -1
  26. package/dist/components/salla-social-share.js +16 -23
  27. package/dist/components/salla-social-share.js.map +1 -1
  28. package/dist/components/salla-user-menu.js +1 -1
  29. package/dist/components/salla-user-menu.js.map +1 -1
  30. package/dist/esm/{app-globals-4d6e9944.js → app-globals-9b658056.js} +2 -2
  31. package/dist/esm/app-globals-9b658056.js.map +1 -0
  32. package/dist/esm/loader.js +1 -1
  33. package/dist/esm/salla-add-product-button_40.entry.js +19 -26
  34. package/dist/esm/salla-add-product-button_40.entry.js.map +1 -1
  35. package/dist/esm/salla-product-options.entry.js +2 -1
  36. package/dist/esm/salla-product-options.entry.js.map +1 -1
  37. package/dist/esm/twilight.js +1 -1
  38. package/dist/esm-es5/{app-globals-4d6e9944.js → app-globals-9b658056.js} +2 -2
  39. package/dist/esm-es5/app-globals-9b658056.js.map +1 -0
  40. package/dist/esm-es5/loader.js +1 -1
  41. package/dist/esm-es5/salla-add-product-button_40.entry.js +2 -2
  42. package/dist/esm-es5/salla-add-product-button_40.entry.js.map +1 -1
  43. package/dist/esm-es5/salla-product-options.entry.js +1 -1
  44. package/dist/esm-es5/salla-product-options.entry.js.map +1 -1
  45. package/dist/esm-es5/twilight.js +1 -1
  46. package/dist/twilight/{p-6727a00e.system.js → p-03cfdef7.system.js} +2 -2
  47. package/dist/twilight/{p-1ffb1df3.js → p-17d95443.js} +2 -2
  48. package/dist/twilight/p-17d95443.js.map +1 -0
  49. package/dist/twilight/{p-5f434037.system.js → p-21935458.system.js} +2 -2
  50. package/dist/twilight/p-21935458.system.js.map +1 -0
  51. package/dist/twilight/{p-f303a498.system.entry.js → p-9a09ec73.system.entry.js} +3 -3
  52. package/dist/twilight/p-9a09ec73.system.entry.js.map +1 -0
  53. package/dist/twilight/{p-39da1865.system.entry.js → p-9c38bff9.system.entry.js} +2 -2
  54. package/dist/twilight/p-9c38bff9.system.entry.js.map +1 -0
  55. package/dist/twilight/{p-f352e833.entry.js → p-d511f5f7.entry.js} +3 -3
  56. package/dist/twilight/p-d511f5f7.entry.js.map +1 -0
  57. package/dist/twilight/p-d5a1906c.entry.js +5 -0
  58. package/dist/twilight/p-d5a1906c.entry.js.map +1 -0
  59. package/dist/twilight/twilight.esm.js +1 -1
  60. package/dist/twilight/twilight.js +1 -1
  61. package/dist/types/components/salla-social-share/salla-social-share.d.ts +0 -1
  62. package/package.json +3 -3
  63. package/dist/cjs/app-globals-4b66abc1.js.map +0 -1
  64. package/dist/esm/app-globals-4d6e9944.js.map +0 -1
  65. package/dist/esm-es5/app-globals-4d6e9944.js.map +0 -1
  66. package/dist/twilight/p-1ffb1df3.js.map +0 -1
  67. package/dist/twilight/p-39da1865.system.entry.js.map +0 -1
  68. package/dist/twilight/p-5f434037.system.js.map +0 -1
  69. package/dist/twilight/p-d9dd6370.entry.js +0 -5
  70. package/dist/twilight/p-d9dd6370.entry.js.map +0 -1
  71. package/dist/twilight/p-f303a498.system.entry.js.map +0 -1
  72. package/dist/twilight/p-f352e833.entry.js.map +0 -1
  73. /package/dist/twilight/{p-6727a00e.system.js.map → p-03cfdef7.system.js.map} +0 -0
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-511744e7.js');
9
- const appGlobals = require('./app-globals-4b66abc1.js');
9
+ const appGlobals = require('./app-globals-4f8bbf37.js');
10
10
  require('./_commonjsHelpers-691dd63b.js');
11
11
 
12
12
  /*
@@ -41,7 +41,7 @@ const SallaAddProductButton = class {
41
41
  this.selectedOptions = [];
42
42
  this.showQuickBuy = undefined;
43
43
  salla.onReady(() => {
44
- this.showQuickBuy = this.quickBuy && !!salla.config.get('store.settings.buy_now');
44
+ this.showQuickBuy = this.quickBuy && !!salla.config.get('store.settings.buy_now') && this.productStatus == 'sale' && this.productType !== 'booking';
45
45
  });
46
46
  }
47
47
  getLabel() {
@@ -25016,7 +25016,7 @@ const IphoneXIcon = `<!-- Generated by IcoMoon.io -->
25016
25016
  </svg>
25017
25017
  `;
25018
25018
 
25019
- const sallaQuickOrderCss = "";
25019
+ const sallaQuickOrderCss = ".s-quick-order-expandable:not(.s-quick-order-shown){overflow:hidden}";
25020
25020
 
25021
25021
  const SallaQuickOrder = class {
25022
25022
  constructor(hostRef) {
@@ -26257,47 +26257,40 @@ const SallaSocialShare = class {
26257
26257
  * Activate or open the share menu.
26258
26258
  */
26259
26259
  async open() {
26260
- this.opened = !this.opened;
26261
- if (this.opened) {
26262
- this.shareMenu.classList.add('opened');
26263
- }
26264
- else {
26265
- this.shareMenu.classList.remove('opened');
26266
- }
26267
- new anime_es.anime.timeline().add({
26260
+ const animateList = new anime_es.anime.timeline().add({
26268
26261
  targets: this.shareMenu,
26269
26262
  translateY: [-50, 0],
26270
26263
  opacity: [0, 1],
26271
26264
  duration: 300,
26272
26265
  podding: '0',
26273
26266
  easing: 'easeInOutSine'
26274
- }).add({
26275
- targets: this.platformItem,
26267
+ });
26268
+ animateList.add({
26269
+ targets: this.shareMenu.children,
26276
26270
  translateZ: 0,
26277
26271
  translateY: [-30, 0],
26278
26272
  scaleY: [0, 1],
26279
26273
  opacity: [0, 1],
26280
- duration: 1200,
26274
+ duration: 1400,
26281
26275
  delay: anime_es.anime.stagger(100)
26282
26276
  }, '-=200');
26277
+ this.opened = !this.opened;
26278
+ if (this.opened) {
26279
+ this.shareMenu.classList.add('opened');
26280
+ }
26281
+ else {
26282
+ animateList.pause();
26283
+ animateList.seek(0);
26284
+ this.shareMenu.classList.remove('opened');
26285
+ }
26283
26286
  }
26284
26287
  async refresh() {
26285
26288
  var _a;
26286
- if (document.getElementById('a2a-script')) {
26287
- (_a = document.getElementById('a2a-script')) === null || _a === void 0 ? void 0 : _a.remove();
26288
- const script = document.createElement('script');
26289
- script.src = 'https://static.addtoany.com/menu/page.js';
26290
- script.setAttribute('id', 'a2a-script');
26291
- script.async = true;
26292
- script.onload = function () {
26293
- window.a2a_config.locale = salla.config.get('user.language_code', salla.lang.getLocale());
26294
- };
26295
- document.body.appendChild(script);
26296
- }
26289
+ (_a = window.a2a) === null || _a === void 0 ? void 0 : _a.init('page');
26297
26290
  }
26298
26291
  render() {
26299
26292
  return (index.h("div", { class: "s-social-share-wrapper" }, index.h("slot", { name: 'widget' }, index.h("salla-button", { "aria-label": "Share", onClick: () => this.open(), class: "s-social-share-btn", shape: "icon", fill: "outline", color: "light" }, index.h("span", { innerHTML: this.opened ? Cancel$1 : ShareAlt }))), index.h("ul", { ref: el => this.shareMenu = el, class: "s-social-share-list a2a_kit share", "data-a2a-url": this.url ? this.url : window.location.href, "data-a2a-title": this.urlName ? this.urlName : document.title }, this.platforms.split(',').map(platform => {
26300
- return (index.h("li", { ref: el => this.platformItem = el }, index.h("a", { class: `a2a_button_${platform}`, "aria-label": `Share Via ${platform}` }, this.platformIcons.map((icon) => {
26293
+ return (index.h("li", null, index.h("a", { class: `a2a_button_${platform}`, "aria-label": `Share Via ${platform}` }, this.platformIcons.map((icon) => {
26301
26294
  if (icon.name === platform) {
26302
26295
  return index.h("span", { class: "s-social-share-icon", innerHTML: icon.icon });
26303
26296
  }
@@ -28037,7 +28030,7 @@ const SallaUserMenu = class {
28037
28030
  return;
28038
28031
  }
28039
28032
  event.preventDefault();
28040
- salla.auth.logout();
28033
+ salla.auth.logout('sall-user-menu');
28041
28034
  }
28042
28035
  getTheHeader() {
28043
28036
  return index.h("div", { class: {