framework7 8.0.0-beta.6 → 8.0.0-beta.8

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Framework7 8.0.0-beta.6
2
+ * Framework7 8.0.0-beta.8
3
3
  * Full featured mobile HTML framework for building iOS & Android apps
4
4
  * https://framework7.io/
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Released under the MIT License
9
9
  *
10
- * Released on: March 24, 2023
10
+ * Released on: March 27, 2023
11
11
  */
12
12
 
13
13
  /*====================
@@ -17216,11 +17216,10 @@ swiper-container .swiper-notification {
17216
17216
  --f7-photobrowser-bars-bg-color: rgba(var(--f7-bars-bg-color-rgb), 0.95);
17217
17217
  --f7-photobrowser-bars-text-color: var(--f7-bars-text-color);
17218
17218
  --f7-photobrowser-bars-link-color: var(--f7-bars-link-color);
17219
- --f7-photobrowser-caption-font-size: 14px;
17219
+ --f7-photobrowser-caption-font-size: 13px;
17220
+ --f7-photobrowser-caption-font-weight: 500;
17220
17221
  --f7-photobrowser-caption-light-text-color: #000;
17221
- --f7-photobrowser-caption-light-bg-color: rgba(255, 255, 255, 0.8);
17222
17222
  --f7-photobrowser-caption-dark-text-color: #fff;
17223
- --f7-photobrowser-caption-dark-bg-color: rgba(0, 0, 0, 0.8);
17224
17223
  --f7-photobrowser-exposed-bg-color: #000;
17225
17224
  --f7-photobrowser-dark-bg-color: #000;
17226
17225
  --f7-photobrowser-dark-bars-bg-color: rgba(27, 27, 27, 0.8);
@@ -17249,7 +17248,6 @@ swiper-container .swiper-notification {
17249
17248
  }
17250
17249
  .photo-browser-standalone.photo-browser-transitioning {
17251
17250
  transition: 400ms;
17252
- transition-property: transform;
17253
17251
  animation: none !important;
17254
17252
  }
17255
17253
  .photo-browser-popup.modal-out.swipe-close-to-bottom,
@@ -17282,11 +17280,28 @@ swiper-container .swiper-notification {
17282
17280
  bottom: var(--f7-safe-area-bottom);
17283
17281
  z-index: 10;
17284
17282
  opacity: 1;
17285
- transition: 400ms;
17283
+ transition-duration: 400ms;
17286
17284
  }
17287
17285
  .photo-browser-captions.photo-browser-captions-exposed {
17288
17286
  opacity: 0;
17289
17287
  }
17288
+ .toolbar ~ .toolbar.photo-browser-thumbs {
17289
+ bottom: calc(var(--f7-toolbar-height) + var(--f7-safe-area-bottom));
17290
+ }
17291
+ .page ~ .photo-browser-page:not(.photo-browser-exposed) .toolbar ~ .toolbar.photo-browser-thumbs,
17292
+ .photo-browser-popup:not(.photo-browser-exposed) .toolbar ~ .toolbar.photo-browser-thumbs,
17293
+ .photo-browser-standalone:not(.photo-browser-exposed) .toolbar ~ .toolbar.photo-browser-thumbs {
17294
+ height: var(--f7-toolbar-height);
17295
+ }
17296
+ .photo-browser-exposed .toolbar ~ .toolbar.photo-browser-thumbs {
17297
+ transform: translate3d(0, calc(var(--f7-toolbar-height) + var(--f7-safe-area-bottom, 0)), 0);
17298
+ }
17299
+ .photo-browser-exposed .toolbar ~ .toolbar.photo-browser-thumbs .swiper {
17300
+ height: calc(100% - var(--f7-safe-area-bottom, 0));
17301
+ }
17302
+ .navbar + .toolbar.photo-browser-thumbs .swiper {
17303
+ height: calc(100% - var(--f7-safe-area-bottom, 0));
17304
+ }
17290
17305
  .toolbar ~ .photo-browser-captions {
17291
17306
  bottom: calc(var(--f7-toolbar-height) + var(--f7-safe-area-bottom));
17292
17307
  transform: translate3d(0, 0px, 0);
@@ -17294,9 +17309,45 @@ swiper-container .swiper-notification {
17294
17309
  .toolbar ~ .photo-browser-captions.photo-browser-captions-exposed {
17295
17310
  transform: translate3d(0, 0px, 0);
17296
17311
  }
17312
+ .toolbar ~ .toolbar ~ .photo-browser-captions {
17313
+ bottom: calc(var(--f7-toolbar-height) * 2 + var(--f7-safe-area-bottom));
17314
+ }
17315
+ .toolbar ~ .toolbar ~ .photo-browser-captions.photo-browser-captions-exposed {
17316
+ transform: translate3d(0, var(--f7-toolbar-height), 0);
17317
+ }
17318
+ .photo-browser-thumbs {
17319
+ transition-property: transform, background-color, color;
17320
+ }
17321
+ .photo-browser-thumbs .swiper {
17322
+ width: 100%;
17323
+ height: 100%;
17324
+ }
17325
+ .photo-browser-thumbs .swiper-slide {
17326
+ width: auto;
17327
+ display: flex;
17328
+ align-items: center;
17329
+ justify-content: center;
17330
+ }
17331
+ .photo-browser-thumbs img {
17332
+ width: auto;
17333
+ height: 75%;
17334
+ display: block;
17335
+ border-radius: 2px;
17336
+ min-width: 4px;
17337
+ }
17338
+ .photo-browser-thumbs .swiper-slide img {
17339
+ transform: translateX(-4px);
17340
+ transition-duration: 150ms;
17341
+ }
17342
+ .photo-browser-thumbs .swiper-slide-active img {
17343
+ transform: scale(1.2);
17344
+ }
17345
+ .photo-browser-thumbs .swiper-slide-active ~ .swiper-slide img {
17346
+ transform: translateX(4px);
17347
+ }
17297
17348
  .photo-browser-caption {
17298
17349
  box-sizing: border-box;
17299
- transition: 300ms;
17350
+ transition-duration: 400ms;
17300
17351
  position: absolute;
17301
17352
  bottom: 0;
17302
17353
  left: 0;
@@ -17305,6 +17356,13 @@ swiper-container .swiper-notification {
17305
17356
  width: 100%;
17306
17357
  text-align: center;
17307
17358
  font-size: var(--f7-photobrowser-caption-font-size);
17359
+ font-weight: var(--f7-photobrowser-caption-font-weight);
17360
+ }
17361
+ @supports ((-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px))) {
17362
+ .ios-translucent-bars .photo-browser-caption {
17363
+ -webkit-backdrop-filter: saturate(180%) blur(var(--f7-bars-translucent-blur));
17364
+ backdrop-filter: saturate(180%) blur(var(--f7-bars-translucent-blur));
17365
+ }
17308
17366
  }
17309
17367
  .photo-browser-caption:empty {
17310
17368
  display: none;
@@ -17314,11 +17372,10 @@ swiper-container .swiper-notification {
17314
17372
  }
17315
17373
  .photo-browser-captions-light .photo-browser-caption {
17316
17374
  color: var(--f7-photobrowser-caption-light-text-color);
17317
- background: var(--f7-photobrowser-caption-light-bg-color);
17318
17375
  }
17319
- .photo-browser-captions-dark .photo-browser-caption {
17376
+ .photo-browser-captions-dark .photo-browser-caption,
17377
+ .dark .photo-browser-caption {
17320
17378
  color: var(--f7-photobrowser-caption-dark-text-color);
17321
- background: var(--f7-photobrowser-caption-dark-bg-color);
17322
17379
  }
17323
17380
  .photo-browser-swiper-container {
17324
17381
  position: absolute;
@@ -17330,6 +17387,7 @@ swiper-container .swiper-notification {
17330
17387
  background: var(--f7-photobrowser-bg-color);
17331
17388
  transition: 400ms;
17332
17389
  transition-property: background-color;
17390
+ touch-action: pan-x pan-y;
17333
17391
  }
17334
17392
  .photo-browser-prev.swiper-button-disabled,
17335
17393
  .photo-browser-next.swiper-button-disabled {
@@ -17386,15 +17444,25 @@ swiper-container .swiper-notification {
17386
17444
  left: 50%;
17387
17445
  top: 50%;
17388
17446
  }
17447
+ .navbar-photo-browser .right .link svg,
17448
+ .navbar-photo-browser .right .link i {
17449
+ width: 24px;
17450
+ height: 24px;
17451
+ display: block;
17452
+ }
17389
17453
  .photo-browser-page .navbar-bg,
17390
17454
  .navbar-photo-browser .navbar-bg,
17391
- .photo-browser-page .toolbar {
17455
+ .photo-browser-page .toolbar,
17456
+ .photo-browser-caption {
17392
17457
  background-color: var(--f7-photobrowser-bars-bg-color, rgba(var(--f7-bars-bg-color-rgb), 0.95));
17393
17458
  }
17459
+ .photo-browser-page {
17460
+ touch-action: manipulation;
17461
+ }
17394
17462
  .photo-browser-page .navbar,
17395
17463
  .photo-browser-page .toolbar {
17396
17464
  transform: translate3d(0, 0, 0);
17397
- transition: 400ms;
17465
+ transition-duration: 400ms;
17398
17466
  color: var(--f7-photobrowser-bars-text-color, var(--f7-bars-text-color));
17399
17467
  }
17400
17468
  .photo-browser-page .navbar a,
@@ -17402,36 +17470,45 @@ swiper-container .swiper-notification {
17402
17470
  color: var(--f7-photobrowser-bars-link-color, var(--f7-bars-link-color, var(--f7-theme-color)));
17403
17471
  }
17404
17472
  .photo-browser-exposed .navbar,
17405
- .photo-browser-exposed .toolbar {
17473
+ .photo-browser-exposed .toolbar:not(.photo-browser-thumbs) {
17406
17474
  opacity: 0;
17407
17475
  visibility: hidden;
17408
17476
  pointer-events: none;
17409
17477
  }
17410
- .photo-browser-exposed .toolbar ~ .photo-browser-captions {
17478
+ .photo-browser-exposed .toolbar:not(.photo-browser-thumbs) ~ .photo-browser-captions,
17479
+ .photo-browser-exposed .toolbar ~ .toolbar.photo-browser-thumbs ~ .photo-browser-captions {
17411
17480
  transform: translate3d(0, var(--f7-toolbar-height), 0);
17412
17481
  }
17413
17482
  .photo-browser-exposed .photo-browser-swiper-container {
17414
17483
  background: var(--f7-photobrowser-exposed-bg-color);
17415
17484
  }
17416
- .photo-browser-exposed .photo-browser-caption {
17485
+ .photo-browser-exposed .photo-browser-thumbs,
17486
+ .photo-browser-dark .photo-browser-thumbs,
17487
+ .photo-browser-exposed .toolbar,
17488
+ .photo-browser-dark .toolbar {
17489
+ background-color: var(--f7-photobrowser-dark-bars-bg-color);
17490
+ }
17491
+ .photo-browser-exposed .photo-browser-caption,
17492
+ .photo-browser-dark .photo-browser-caption {
17417
17493
  color: var(--f7-photobrowser-caption-dark-text-color);
17418
- background: var(--f7-photobrowser-caption-dark-bg-color);
17494
+ background-color: var(--f7-photobrowser-dark-bars-bg-color);
17419
17495
  }
17420
17496
  .view.with-photo-browser-page-exposed .navbar {
17421
17497
  opacity: 0;
17422
17498
  pointer-events: none;
17423
17499
  }
17500
+ .photo-browser-page .toolbar:before,
17501
+ .photo-browser-page .toolbar:after {
17502
+ display: none !important;
17503
+ }
17424
17504
  .photo-browser-page-dark .navbar-bg,
17425
- .navbar-photo-browser-dark .navbar-bg,
17426
- .photo-browser-page-dark .toolbar {
17505
+ .navbar-photo-browser-dark .navbar-bg {
17427
17506
  background: var(--f7-photobrowser-dark-bars-bg-color);
17428
17507
  }
17429
17508
  .photo-browser-page-dark .navbar-bg:before,
17430
17509
  .navbar-photo-browser-dark .navbar-bg:before,
17431
- .photo-browser-page-dark .toolbar:before,
17432
17510
  .photo-browser-page-dark .navbar-bg:after,
17433
- .navbar-photo-browser-dark .navbar-bg:after,
17434
- .photo-browser-page-dark .toolbar:after {
17511
+ .navbar-photo-browser-dark .navbar-bg:after {
17435
17512
  display: none !important;
17436
17513
  }
17437
17514
  .navbar-photo-browser-dark,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Framework7 8.0.0-beta.6
2
+ * Framework7 8.0.0-beta.8
3
3
  * Full featured mobile HTML framework for building iOS & Android apps
4
4
  * https://framework7.io/
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Released under the MIT License
9
9
  *
10
- * Released on: March 24, 2023
10
+ * Released on: March 27, 2023
11
11
  */
12
12
 
13
13
  import $ from './shared/dom7.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Framework7 8.0.0-beta.6
2
+ * Framework7 8.0.0-beta.8
3
3
  * Full featured mobile HTML framework for building iOS & Android apps
4
4
  * https://framework7.io/
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Released under the MIT License
9
9
  *
10
- * Released on: March 24, 2023
10
+ * Released on: March 27, 2023
11
11
  */
12
12
 
13
13
  (function (global, factory) {
@@ -10760,6 +10760,118 @@
10760
10760
  };
10761
10761
 
10762
10762
  /* eslint no-underscore-dangle: "off" */
10763
+
10764
+ /* eslint-disable no-shadow */
10765
+ /* eslint-disable no-return-assign */
10766
+ /* eslint-disable no-plusplus */
10767
+ /* eslint-disable no-param-reassign */
10768
+ /* eslint-disable no-sequences */
10769
+ const types = [{
10770
+ name: 'array',
10771
+ init: i => i,
10772
+ type: i => [i].find(Array.isArray),
10773
+ update: (i, o) => [o].filter(Array.isArray).find(() => (i.length = 0, i.push(...o))),
10774
+ insert: function (i, x, o) {
10775
+ if (o === void 0) {
10776
+ o = [];
10777
+ }
10778
+ return i.splice(Math.max(x, 0), 0, ...[o].flat());
10779
+ },
10780
+ replace: function (i, x, o) {
10781
+ if (o === void 0) {
10782
+ o = [];
10783
+ }
10784
+ return i.splice(Math.max(x, 0), Math.min(++x, 1), ...[o].flat());
10785
+ },
10786
+ append: function (i, o) {
10787
+ if (o === void 0) {
10788
+ o = [];
10789
+ }
10790
+ return i.push(...[o].flat());
10791
+ },
10792
+ prepend: function (i, o) {
10793
+ if (o === void 0) {
10794
+ o = [];
10795
+ }
10796
+ return i.unshift(...[o].flat());
10797
+ },
10798
+ swap: (i, a, b) => {
10799
+ [i[a], i[b]] = [i[b], i[a]];
10800
+ },
10801
+ fromTo: function (i, a, b) {
10802
+ if (b === void 0) {
10803
+ b = a;
10804
+ }
10805
+ return i.splice(Math.max(b, 0), 0, ...i.splice(Math.max(a, 0), 1));
10806
+ },
10807
+ remove: function (i, o, a) {
10808
+ if (a === void 0) {
10809
+ a = i.map((_, x) => x);
10810
+ }
10811
+ return [o].flat().filter(i => a.includes(i)).sort((a, b) => b - a).forEach(x => i.splice(x, 1));
10812
+ },
10813
+ clear: i => i.length = 0
10814
+ }, {
10815
+ name: 'object',
10816
+ init: i => i,
10817
+ type: i => [i].filter(i => [i !== null, i !== undefined].every(i => i)).find(i => Object.getPrototypeOf(i) === Object.prototype),
10818
+ update: (i, o) => Object.assign(i, o),
10819
+ insert: () => {},
10820
+ replace: () => {},
10821
+ append: () => {},
10822
+ prepend: () => {},
10823
+ swap: () => ({}),
10824
+ // N/A
10825
+ fromTo: () => ({}),
10826
+ // N/A
10827
+ remove: (i, o) => [o].flat().forEach(k => delete i[k]),
10828
+ clear: i => Object.keys(i).forEach(k => delete i[k])
10829
+ }, {
10830
+ name: 'atoms',
10831
+ type: () => true,
10832
+ init: function (i, o) {
10833
+ if (o === void 0) {
10834
+ o = {};
10835
+ }
10836
+ return Object.defineProperty(o, 'value', {
10837
+ get: () => i,
10838
+ set: v => {
10839
+ // eslint-disable-next-line
10840
+ i = v;
10841
+ }
10842
+ }), o;
10843
+ },
10844
+ update: function (i, v) {
10845
+ if (v === void 0) {
10846
+ v = i.value;
10847
+ }
10848
+ i.value = v;
10849
+ },
10850
+ insert: () => ({}),
10851
+ // N/A
10852
+ replace: () => ({}),
10853
+ // N/A
10854
+ append: () => ({}),
10855
+ // N/A
10856
+ prepend: () => ({}),
10857
+ // N/A
10858
+ swap: () => ({}),
10859
+ // N/A
10860
+ fromTo: () => ({}),
10861
+ // N/A
10862
+ remove: () => ({}),
10863
+ // N/A
10864
+ clear: i => {
10865
+ i.value = undefined;
10866
+ }
10867
+ }];
10868
+
10869
+ /* eslint-enable no-shadow */
10870
+ /* eslint-enable no-return-assign */
10871
+ /* eslint-enable no-plusplus */
10872
+ /* eslint-enable no-param-reassign */
10873
+ /* eslint-enable no-sequences */
10874
+
10763
10875
  class Component {
10764
10876
  constructor(app, component, props, _temp) {
10765
10877
  if (props === void 0) {
@@ -10904,6 +11016,84 @@
10904
11016
  });
10905
11017
  return $store;
10906
11018
  }
11019
+
11020
+ /* eslint-disable no-sequences */
11021
+ getUseState() {
11022
+ var _this = this;
11023
+ return o => [o].reduce(function (t, _i, _x, _a, i) {
11024
+ if (i === void 0) {
11025
+ i = t.init(_i);
11026
+ }
11027
+ return {
11028
+ state: i,
11029
+ update: v => (t.update(i, v), _this.update()),
11030
+ remove: v => (t.remove(i, v), _this.update()),
11031
+ clear: () => (t.clear(i), _this.update()),
11032
+ insert: (x, v) => (t.insert(i, x, v), _this.update()),
11033
+ replace: (x, v) => (t.replace(i, x, v), _this.update()),
11034
+ append: v => (t.append(i, v), _this.update()),
11035
+ prepend: v => (t.prepend(i, v), _this.update()),
11036
+ swap: (a, b) => (t.swap(i, a, b), _this.update()),
11037
+ fromTo: (a, b) => (t.fromTo(i, a, b), _this.update()),
11038
+ method: function (f) {
11039
+ if (f === void 0) {
11040
+ f = () => ({});
11041
+ }
11042
+ return f(i), _this.update();
11043
+ },
11044
+ async: function (f) {
11045
+ if (f === void 0) {
11046
+ f = () => Promise.reject(i);
11047
+ }
11048
+ return f(i).then(() => _this.update());
11049
+ }
11050
+ };
11051
+ }, types.find(i => i.type(o)));
11052
+ }
11053
+ _getUseState() {
11054
+ var _this2 = this;
11055
+ return o => [o].reduce(function (t, _i, _x, _a, i) {
11056
+ if (i === void 0) {
11057
+ i = t.init(_i);
11058
+ }
11059
+ return [i,
11060
+ // state
11061
+ v => (t.update(i, v), _this2.update()),
11062
+ // update
11063
+ v => (t.remove(i, v), _this2.update()),
11064
+ // remove
11065
+ () => (t.clear(i), _this2.update()),
11066
+ // clear
11067
+ (x, v) => (t.insert(i, x, v), _this2.update()),
11068
+ // insert
11069
+ (x, v) => (t.replace(i, x, v), _this2.update()),
11070
+ // replace
11071
+ v => (t.append(i, v), _this2.update()),
11072
+ // append
11073
+ v => (t.prepend(i, v), _this2.update()),
11074
+ // prepend
11075
+ (a, b) => (t.swap(i, a, b), _this2.update()),
11076
+ // swap
11077
+ (a, b) => (t.fromTo(i, a, b), _this2.update()),
11078
+ // fromTo
11079
+ function (f) {
11080
+ if (f === void 0) {
11081
+ f = () => ({});
11082
+ }
11083
+ return f(i), _this2.update();
11084
+ },
11085
+ // method
11086
+ function (f) {
11087
+ if (f === void 0) {
11088
+ f = () => Promise.reject(i);
11089
+ }
11090
+ return f(i).then(() => _this2.update());
11091
+ } // async
11092
+ ];
11093
+ }, types.find(i => i.type(o)));
11094
+ }
11095
+ /* eslint-enable no-sequences */
11096
+
10907
11097
  getComponentContext(includeHooks) {
10908
11098
  const ctx = {
10909
11099
  $f7route: this.context.f7route,
@@ -10919,7 +11109,9 @@
10919
11109
  $emit: this.emit.bind(this),
10920
11110
  $store: this.getComponentStore(),
10921
11111
  $ref: this.getComponentRef(),
10922
- $el: {}
11112
+ $el: {},
11113
+ $useState: this.getUseState(),
11114
+ $_useState: this._getUseState()
10923
11115
  };
10924
11116
  Object.defineProperty(ctx.$el, 'value', {
10925
11117
  get: () => {
@@ -11141,6 +11333,7 @@
11141
11333
  var $update = $$ctx.$update;
11142
11334
  var $store = $$ctx.$store;
11143
11335
  var $ref = $$ctx.$ref;
11336
+ var $useState = $$ctx.$useState;
11144
11337
 
11145
11338
  return $h\`${template}\`
11146
11339
  }
@@ -39931,12 +40124,31 @@
39931
40124
  class: "photo-browser-of"
39932
40125
  }, pb.params.navbarOfText), $jsx$1("span", {
39933
40126
  class: "photo-browser-total"
39934
- })), isPopup && $jsx$1("div", {
40127
+ })), isPopup && (pb.params.popupCloseLinkText || pb.params.popupCloseLinkIcon) && $jsx$1("div", {
39935
40128
  class: "right"
39936
40129
  }, $jsx$1("a", {
39937
40130
  class: "link popup-close",
39938
40131
  "data-popup": ".photo-browser-popup"
39939
- }, $jsx$1("span", null, pb.params.popupCloseLinkText)))));
40132
+ }, pb.params.popupCloseLinkIcon && pb.app.theme === 'ios' && $jsx$1("i", null, $jsx$1("svg", {
40133
+ xmlns: "http://www.w3.org/2000/svg",
40134
+ width: "56",
40135
+ height: "56",
40136
+ viewBox: "0 0 56 56"
40137
+ }, $jsx$1("path", {
40138
+ fill: "currentColor",
40139
+ d: "M 10.0234 43.0234 C 9.2266 43.8203 9.2031 45.1797 10.0234 45.9766 C 10.8438 46.7734 12.1797 46.7734 13.0000 45.9766 L 28.0000 30.9766 L 43.0000 45.9766 C 43.7969 46.7734 45.1563 46.7969 45.9766 45.9766 C 46.7734 45.1562 46.7734 43.8203 45.9766 43.0234 L 30.9531 28.0000 L 45.9766 13.0000 C 46.7734 12.2031 46.7969 10.8437 45.9766 10.0469 C 45.1328 9.2266 43.7969 9.2266 43.0000 10.0469 L 28.0000 25.0469 L 13.0000 10.0469 C 12.1797 9.2266 10.8203 9.2031 10.0234 10.0469 C 9.2266 10.8672 9.2266 12.2031 10.0234 13.0000 L 25.0234 28.0000 Z"
40140
+ }))), pb.params.popupCloseLinkIcon && pb.app.theme === 'md' && $jsx$1("i", null, $jsx$1("svg", {
40141
+ xmlns: "http://www.w3.org/2000/svg",
40142
+ height: "24px",
40143
+ viewBox: "0 0 24 24",
40144
+ width: "24px",
40145
+ fill: "currentColor"
40146
+ }, $jsx$1("path", {
40147
+ d: "M0 0h24v24H0V0z",
40148
+ fill: "none"
40149
+ }), $jsx$1("path", {
40150
+ d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
40151
+ }))), pb.params.popupCloseLinkText && $jsx$1("span", null, pb.params.popupCloseLinkText)))));
39940
40152
  }
39941
40153
  renderToolbar() {
39942
40154
  const pb = this;
@@ -39956,6 +40168,16 @@
39956
40168
  class: `icon icon-forward ${iconsColor ? `color-${iconsColor}` : ''}`
39957
40169
  }))));
39958
40170
  }
40171
+ renderThumbs() {
40172
+ const pb = this;
40173
+ return $jsx$1("div", {
40174
+ class: "toolbar toolbar-bottom photo-browser-thumbs"
40175
+ }, $jsx$1("div", {
40176
+ class: "swiper"
40177
+ }, $jsx$1("div", {
40178
+ class: "swiper-wrapper"
40179
+ }, pb.params.thumbs.map((thumb, index) => pb.renderThumb(thumb, index)))));
40180
+ }
39959
40181
  renderCaption(caption, index) {
39960
40182
  const pb = this;
39961
40183
  if (pb.params.renderCaption) return pb.params.renderCaption.call(pb, caption, index);
@@ -39999,6 +40221,18 @@
39999
40221
  src: photo.url ? photo.url : photo
40000
40222
  })));
40001
40223
  }
40224
+ renderThumb(thumb, index) {
40225
+ const pb = this;
40226
+ const url = typeof thumb === 'string' ? thumb : thumb.url;
40227
+ if (pb.params.renderThumb) return pb.params.renderThumb.call(pb, thumb, index);
40228
+ return $jsx$1("div", {
40229
+ class: "photo-browser-thumbs-slide swiper-slide",
40230
+ "data-swiper-slide-index": index
40231
+ }, url && $jsx$1("img", {
40232
+ src: url,
40233
+ loading: "lazy"
40234
+ }));
40235
+ }
40002
40236
  render() {
40003
40237
  const pb = this;
40004
40238
  if (pb.params.render) return pb.params.render.call(pb, pb.params);
@@ -40009,7 +40243,7 @@
40009
40243
  }, $jsx$1("div", {
40010
40244
  class: `page photo-browser-page photo-browser-page-${pb.params.theme} no-toolbar ${!pb.params.navbar ? 'no-navbar' : ''}`,
40011
40245
  "data-name": "photo-browser-page"
40012
- }, pb.params.navbar && pb.renderNavbar(), pb.params.toolbar && pb.renderToolbar(), $jsx$1("div", {
40246
+ }, pb.params.navbar && pb.renderNavbar(), pb.params.toolbar && pb.renderToolbar(), pb.params.thumbs && pb.params.thumbs.length && pb.renderThumbs(), $jsx$1("div", {
40013
40247
  class: `photo-browser-captions photo-browser-captions-${pb.params.captionsTheme || pb.params.theme}`
40014
40248
  }, pb.params.photos.map((photo, index) => {
40015
40249
  if (photo.caption) return pb.renderCaption(photo.caption, index);
@@ -40062,11 +40296,15 @@
40062
40296
  pb.slides = pb.$el.find('.photo-browser-slide');
40063
40297
  pb.$captionsContainerEl = pb.$el.find('.photo-browser-captions');
40064
40298
  pb.captions = pb.$el.find('.photo-browser-caption');
40299
+ const hasThumbs = pb.params.thumbs && pb.params.thumbs.length > 0;
40065
40300
 
40066
40301
  // Init Swiper
40067
40302
  let clickTimeout;
40303
+ let preventThumbsSlide;
40304
+ let preventMainSlide;
40305
+ const initialSlide = pb.activeIndex;
40068
40306
  const swiperParams = extend$2({}, pb.params.swiper, {
40069
- initialSlide: pb.activeIndex,
40307
+ initialSlide,
40070
40308
  // cssMode:
40071
40309
  // typeof pb.params.swiper.cssMode === 'undefined' && (app.device.ios || app.device.android)
40072
40310
  // ? true
@@ -40089,6 +40327,13 @@
40089
40327
  },
40090
40328
  slideChange() {
40091
40329
  const swiper = this;
40330
+ if (hasThumbs && pb.thumbsSwiper && !preventMainSlide) {
40331
+ preventThumbsSlide = true;
40332
+ pb.thumbsSwiper.slideTo(pb.swiper.activeIndex);
40333
+ setTimeout(() => {
40334
+ preventThumbsSlide = false;
40335
+ });
40336
+ }
40092
40337
  pb.onSlideChange(swiper);
40093
40338
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
40094
40339
  args[_key] = arguments[_key];
@@ -40160,6 +40405,34 @@
40160
40405
  if (pb.activeIndex === 0 || pb.params.virtualSlides) {
40161
40406
  pb.onSlideChange(pb.swiper);
40162
40407
  }
40408
+ if (hasThumbs) {
40409
+ const thumbsSwiperParams = {
40410
+ el: pb.$el.find('.photo-browser-thumbs .swiper')[0],
40411
+ slidesPerView: 'auto',
40412
+ centeredSlides: true,
40413
+ spaceBetween: 4,
40414
+ watchSlidesProgress: true,
40415
+ initialSlide,
40416
+ on: {
40417
+ touchMove() {
40418
+ preventMainSlide = true;
40419
+ },
40420
+ touchEnd() {
40421
+ preventMainSlide = false;
40422
+ },
40423
+ slideChange(s) {
40424
+ if (preventThumbsSlide) return;
40425
+ pb.swiper.slideTo(s.activeIndex, 0);
40426
+ },
40427
+ click(s) {
40428
+ if (!s.clickedSlide) return;
40429
+ const index = parseInt($(s.clickedSlide).attr('data-swiper-slide-index'), 10);
40430
+ s.slideTo(index, 0);
40431
+ }
40432
+ }
40433
+ };
40434
+ pb.thumbsSwiper = app.swiper ? app.swiper.create(thumbsSwiperParams) : new window.Swiper(thumbsSwiperParams);
40435
+ }
40163
40436
  if (pb.$el) {
40164
40437
  pb.$el.trigger('photobrowser:open');
40165
40438
  }
@@ -40185,6 +40458,11 @@
40185
40458
  pb.swiper = null;
40186
40459
  delete pb.swiper;
40187
40460
  }
40461
+ if (pb.thumbsSwiper && pb.thumbsSwiper.destroy) {
40462
+ pb.thumbsSwiper.destroy(true, false);
40463
+ pb.thumbsSwiper = null;
40464
+ delete pb.thumbsSwiper;
40465
+ }
40188
40466
  if (pb.$el) {
40189
40467
  pb.$el.trigger('photobrowser:close');
40190
40468
  }
@@ -40398,6 +40676,7 @@
40398
40676
  params: {
40399
40677
  photoBrowser: {
40400
40678
  photos: [],
40679
+ thumbs: [],
40401
40680
  exposition: true,
40402
40681
  expositionHideCaptions: false,
40403
40682
  type: 'standalone',
@@ -40409,7 +40688,8 @@
40409
40688
  popupPush: false,
40410
40689
  swipeToClose: true,
40411
40690
  pageBackLinkText: 'Back',
40412
- popupCloseLinkText: 'Close',
40691
+ popupCloseLinkText: undefined,
40692
+ popupCloseLinkIcon: true,
40413
40693
  navbarOfText: 'of',
40414
40694
  navbarShowCount: undefined,
40415
40695
  view: undefined,
@@ -40424,6 +40704,7 @@
40424
40704
  renderObject: undefined,
40425
40705
  renderLazyPhoto: undefined,
40426
40706
  renderPhoto: undefined,
40707
+ renderThumb: undefined,
40427
40708
  renderPage: undefined,
40428
40709
  renderPopup: undefined,
40429
40710
  renderStandalone: undefined,