@iris.interactive/handcook 7.1.1-beta → 8.0.0-alpha.1
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/.gitlab-ci.yml +2 -2
- package/.nvmrc +1 -1
- package/README.md +1 -1
- package/package.json +12 -18
- package/public/index.html +33 -36
- package/public/scripts/components/collapse/collapse.component.js +1 -95
- package/public/scripts/components/collapse/collapse.component.scss +4 -4
- package/public/scripts/components/dropdown/dropdown.component.js +1 -81
- package/public/scripts/components/lazyload/lazyload.component.js +1 -61
- package/public/scripts/components/lightbox/lightbox.component.js +1 -91
- package/public/scripts/components/modal/modal.component.js +1 -83
- package/public/scripts/components/nats/nats.component.js +1 -62
- package/public/scripts/components/overlay/overlay.component.js +1 -88
- package/public/scripts/components/popin/popin.component.js +1 -150
- package/public/scripts/components/scroll-reveal/scroll-reveal.component.js +1 -168
- package/public/scripts/components/scrollspy/scrollspy.component.js +1 -93
- package/public/scripts/components/share/share.component.js +1 -0
- package/public/scripts/components/slider/slider.component.js +1 -317
- package/public/scripts/components/smooth-scroll/smooth-scroll.component.js +1 -59
- package/public/scripts/components/tab/tab.component.js +1 -82
- package/public/scripts/components/toggle/toggle.component.js +1 -51
- package/public/scripts/components/tooltip/tooltip.component.js +1 -119
- package/public/scripts/enumerators/element.enum.js +1 -40
- package/public/scripts/enumerators/share.enum.js +1 -0
- package/public/scripts/enumerators/smooth-scroll.enum.js +1 -19
- package/public/scripts/enumerators/tooltip.enum.js +1 -25
- package/public/scripts/handcook.js +1 -49
- package/public/scripts/support/cookie.support.js +1 -0
- package/public/scripts/support/hash.support.js +1 -0
- package/public/scripts/support/toggle-html.support.js +1 -0
- package/public/scripts/support/wrap-select.support.js +1 -0
- package/public/static/css/989.b832cc44.css +1 -0
- package/public/static/css/index.0ac21166.css +1 -0
- package/public/static/js/989.a4a97e0e.js +23 -0
- package/public/static/js/989.a4a97e0e.js.LICENSE.txt +5 -0
- package/public/static/js/index.67977b9b.js +1 -0
- package/public/styles/scss/_utils.scss +21 -17
- package/public/styles/scss/_variables.scss +0 -4
- package/public/styles/scss/handcook.scss +5 -5
- package/public/styles/scss/mixins/_mixin-font.scss +8 -6
- package/public/styles/scss/mixins/_mixin-layout.scss +17 -14
- package/public/styles/scss/mixins/_mixin-style.scss +70 -63
- package/public/styles/scss/style.css +1 -172
- package/mix-manifest.json +0 -51
- package/public/scripts/components/collapse/collapse.component.min.js +0 -1
- package/public/scripts/components/dropdown/dropdown.component.min.js +0 -1
- package/public/scripts/components/lazyload/lazyload.component.min.js +0 -1
- package/public/scripts/components/lightbox/lightbox.component.min.js +0 -1
- package/public/scripts/components/modal/modal.component.min.js +0 -1
- package/public/scripts/components/scrollspy/scrollspy.component.min.js +0 -1
- package/public/scripts/components/slider/slider.component.min.js +0 -1
- package/public/scripts/components/smooth-scroll/smooth-scroll.component.min.js +0 -1
- package/public/scripts/components/tab/tab.component.min.js +0 -1
- package/public/scripts/components/toggle/toggle.component.min.js +0 -1
- package/public/scripts/components/tooltip/tooltip.component.min.js +0 -1
- package/public/scripts/index.js.LICENSE.txt +0 -1
- package/public/styles/style.css +0 -28
package/.gitlab-ci.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
image: node:
|
|
1
|
+
image: node:23.6-alpine3.21
|
|
2
2
|
|
|
3
3
|
stages:
|
|
4
4
|
- publish
|
|
@@ -94,4 +94,4 @@ Release:
|
|
|
94
94
|
links:
|
|
95
95
|
- name: "@iris.interactive/handcook@${CI_COMMIT_REF_NAME}"
|
|
96
96
|
url: "https://www.npmjs.com/package/@iris.interactive/handcook?activeTab=versions"
|
|
97
|
-
link_type: other
|
|
97
|
+
link_type: other
|
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
stable
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Welcome to HandCook 👨🍳
|
|
2
|
-

|
|
3
3
|

|
|
4
4
|
[](#)
|
|
5
5
|
[](https://twitter.com/captain\_iris)
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iris.interactive/handcook",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-alpha.1",
|
|
4
4
|
"description": "The web cooking by IRIS Interactive",
|
|
5
5
|
"main": "./public/scripts/index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
7
|
+
"dev": "rsbuild dev",
|
|
8
|
+
"build": "rsbuild build",
|
|
9
|
+
"preview": "rsbuild preview"
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
12
12
|
"IRIS Interactive",
|
|
@@ -18,25 +18,19 @@
|
|
|
18
18
|
},
|
|
19
19
|
"author": "IRIS Interactive <dev@iris-interactive.fr> (https://www.iris-interactive.fr)",
|
|
20
20
|
"license": "UNLICENSED",
|
|
21
|
-
"devDependencies": {
|
|
22
|
-
"@wordpress/browserslist-config": "^4.0.0",
|
|
23
|
-
"browser-sync": "^2.26.14",
|
|
24
|
-
"browser-sync-webpack-plugin": "^2.3.0",
|
|
25
|
-
"iconfont-plugin-webpack": "^1.1.4",
|
|
26
|
-
"laravel-mix": "^6.0.19",
|
|
27
|
-
"laravel-mix-glob": "^1.1.10",
|
|
28
|
-
"mix-env-file": "^0.1.1",
|
|
29
|
-
"postcss": "^8.3.0",
|
|
30
|
-
"resolve-url-loader": "^4.0.0",
|
|
31
|
-
"sass": "^1.34.0",
|
|
32
|
-
"sass-loader": "11.1.1"
|
|
33
|
-
},
|
|
34
21
|
"dependencies": {
|
|
35
|
-
"@nats-io/nats-core": "^3.0.0-27",
|
|
36
22
|
"@fancyapps/ui": "^4.0.22",
|
|
23
|
+
"@nats-io/nats-core": "^3.0.0-27",
|
|
37
24
|
"bootstrap": "^5.1.3",
|
|
38
25
|
"swiper": "8.0.6",
|
|
39
26
|
"tippy.js": "^6.3.7",
|
|
40
27
|
"vanilla-lazyload": "^17.6.1"
|
|
28
|
+
},
|
|
29
|
+
"packageManager": "pnpm@10.0.0+sha512.b8fef5494bd3fe4cbd4edabd0745df2ee5be3e4b0b8b08fa643aa3e4c6702ccc0f00d68fa8a8c9858a735a0032485a44990ed2810526c875e416f001b17df12b",
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@rsbuild/core": "^1.1.13",
|
|
32
|
+
"@rsbuild/plugin-sass": "^1.1.2",
|
|
33
|
+
"sass-embedded": "^1.83.4",
|
|
34
|
+
"sass-migrator": "^2.3.0"
|
|
41
35
|
}
|
|
42
36
|
}
|
package/public/index.html
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
|
-
<html>
|
|
2
|
+
<html lang="fr">
|
|
3
3
|
<head>
|
|
4
4
|
<title>IRIStyle</title>
|
|
5
|
-
<script type="text/javascript">var exports = {};</script>
|
|
6
|
-
<script type="text/javascript" src="../public/scripts/index.js"></script>
|
|
7
|
-
<link rel="stylesheet" href="../public/styles/style.css">
|
|
8
5
|
<style>
|
|
9
6
|
a {
|
|
10
7
|
text-decoration: none;
|
|
@@ -129,7 +126,7 @@
|
|
|
129
126
|
color: blue;
|
|
130
127
|
}
|
|
131
128
|
</style>
|
|
132
|
-
|
|
129
|
+
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/989.a4a97e0e.js"></script><script defer src="/static/js/index.67977b9b.js"></script><link href="/static/css/989.b832cc44.css" rel="stylesheet"><link href="/static/css/index.0ac21166.css" rel="stylesheet"></head>
|
|
133
130
|
<body style="font-family: 'Helvetica Neue';" class="has-iris-scroll-reveal">
|
|
134
131
|
<div class="wrapper">
|
|
135
132
|
<main style="display: grid; grid-template-columns: 10% 90%;">
|
|
@@ -196,8 +193,8 @@
|
|
|
196
193
|
<h2 class="component__content__title">Lightbox</h2>
|
|
197
194
|
<div class="component__content">
|
|
198
195
|
<div class="component__content__topbar">
|
|
199
|
-
<a href="https://
|
|
200
|
-
<img src="https://
|
|
196
|
+
<a href="https://fakeimg.pl/1000x500" data-hc-lightbox>
|
|
197
|
+
<img src="https://fakeimg.pl/150" alt="" width="150" height="150">
|
|
201
198
|
</a>
|
|
202
199
|
</div>
|
|
203
200
|
</div>
|
|
@@ -206,10 +203,10 @@
|
|
|
206
203
|
<h2 class="component__content__title">Lazyload</h2>
|
|
207
204
|
<div class="component__content">
|
|
208
205
|
<div class="component__content__topbar">
|
|
209
|
-
<div><img data-hc-src="https://
|
|
210
|
-
<div><img data-hc-src="https://
|
|
211
|
-
<div><img data-hc-src="https://
|
|
212
|
-
<div data-hc-bg="https://
|
|
206
|
+
<div><img data-hc-src="https://fakeimg.pl/150" alt="" width="150" height="150"></div>
|
|
207
|
+
<div><img data-hc-src="https://fakeimg.pl/150" alt="" width="150" height="150"></div>
|
|
208
|
+
<div><img data-hc-src="https://fakeimg.pl/150" alt="" width="150" height="150"></div>
|
|
209
|
+
<div data-hc-bg="https://fakeimg.pl/150"></div>
|
|
213
210
|
</div>
|
|
214
211
|
</div>
|
|
215
212
|
</article>
|
|
@@ -339,71 +336,71 @@
|
|
|
339
336
|
<div class="component__content__topbar">
|
|
340
337
|
<div data-hc-slider>
|
|
341
338
|
<div>
|
|
342
|
-
<img data-hc-src="https://
|
|
339
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
343
340
|
</div>
|
|
344
341
|
<div>
|
|
345
|
-
<img data-hc-src="https://
|
|
342
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
346
343
|
</div>
|
|
347
344
|
<div>
|
|
348
|
-
<img data-hc-src="https://
|
|
345
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
349
346
|
</div>
|
|
350
347
|
<div>
|
|
351
|
-
<img data-hc-src="https://
|
|
348
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
352
349
|
</div>
|
|
353
350
|
<div>
|
|
354
|
-
<img data-hc-src="https://
|
|
351
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
355
352
|
</div>
|
|
356
353
|
</div>
|
|
357
354
|
<div data-hc-slider data-hc-slider-arrows id="slider-full">
|
|
358
355
|
<div>
|
|
359
|
-
<img data-hc-src="https://
|
|
356
|
+
<img data-hc-src="https://fakeimg.pl/1280x500" alt="" width="1280" height="500">
|
|
360
357
|
</div>
|
|
361
358
|
<div>
|
|
362
|
-
<img data-hc-src="https://
|
|
359
|
+
<img data-hc-src="https://fakeimg.pl/1280x500" alt="" width="1280" height="500">
|
|
363
360
|
</div>
|
|
364
361
|
<div>
|
|
365
|
-
<img data-hc-src="https://
|
|
362
|
+
<img data-hc-src="https://fakeimg.pl/1280x500" alt="" width="1280" height="500">
|
|
366
363
|
</div>
|
|
367
364
|
<div>
|
|
368
|
-
<img data-hc-src="https://
|
|
365
|
+
<img data-hc-src="https://fakeimg.pl/1280x500" alt="" width="1280" height="500">
|
|
369
366
|
</div>
|
|
370
367
|
<div>
|
|
371
|
-
<img data-hc-src="https://
|
|
368
|
+
<img data-hc-src="https://fakeimg.pl/1280x500" alt="" width="1280" height="500">
|
|
372
369
|
</div>
|
|
373
370
|
</div>
|
|
374
371
|
<div data-hc-slider data-hc-slider-pagination>
|
|
375
372
|
<div>
|
|
376
|
-
<img data-hc-src="https://
|
|
373
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
377
374
|
</div>
|
|
378
375
|
<div>
|
|
379
|
-
<img data-hc-src="https://
|
|
376
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
380
377
|
</div>
|
|
381
378
|
<div>
|
|
382
|
-
<img data-hc-src="https://
|
|
379
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
383
380
|
</div>
|
|
384
381
|
<div>
|
|
385
|
-
<img data-hc-src="https://
|
|
382
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
386
383
|
</div>
|
|
387
384
|
<div>
|
|
388
|
-
<img data-hc-src="https://
|
|
385
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
389
386
|
</div>
|
|
390
387
|
</div>
|
|
391
388
|
<div style="position: relative">
|
|
392
389
|
<div data-hc-slider data-hc-slider-arrows data-hc-slider-arrow-prev=".button-prev-test">
|
|
393
390
|
<div>
|
|
394
|
-
<img data-hc-src="https://
|
|
391
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
395
392
|
</div>
|
|
396
393
|
<div>
|
|
397
|
-
<img data-hc-src="https://
|
|
394
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
398
395
|
</div>
|
|
399
396
|
<div>
|
|
400
|
-
<img data-hc-src="https://
|
|
397
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
401
398
|
</div>
|
|
402
399
|
<div>
|
|
403
|
-
<img data-hc-src="https://
|
|
400
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
404
401
|
</div>
|
|
405
402
|
<div>
|
|
406
|
-
<img data-hc-src="https://
|
|
403
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
407
404
|
</div>
|
|
408
405
|
</div>
|
|
409
406
|
<a href="#" class="button-prev-test">Bouton precedent de test</a>
|
|
@@ -411,19 +408,19 @@
|
|
|
411
408
|
<div style="position: relative">
|
|
412
409
|
<div data-hc-slider data-hc-slider-slides-per-view="1" data-hc-slider-slides-per-view-large="2" data-hc-slider-arrows data-hc-slider-arrow-prev=".button-prev-test" data-hc-slider-no-swipe="true" data-hc-slider-no-swipe-medium="false">
|
|
413
410
|
<div>
|
|
414
|
-
<img data-hc-src="https://
|
|
411
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
415
412
|
</div>
|
|
416
413
|
<div>
|
|
417
|
-
<img data-hc-src="https://
|
|
414
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
418
415
|
</div>
|
|
419
416
|
<div>
|
|
420
|
-
<img data-hc-src="https://
|
|
417
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
421
418
|
</div>
|
|
422
419
|
<div>
|
|
423
|
-
<img data-hc-src="https://
|
|
420
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
424
421
|
</div>
|
|
425
422
|
<div>
|
|
426
|
-
<img data-hc-src="https://
|
|
423
|
+
<img data-hc-src="https://fakeimg.pl/500x250" alt="" width="500" height="250">
|
|
427
424
|
</div>
|
|
428
425
|
</div>
|
|
429
426
|
</div>
|
|
@@ -1,95 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* IRIS Interactive
|
|
3
|
-
*
|
|
4
|
-
* NOTICE OF LICENSE
|
|
5
|
-
*
|
|
6
|
-
* This source file is no subject to a specific license
|
|
7
|
-
* but it belongs to the company IRIS Interactive.
|
|
8
|
-
* You can contact IRIS Interactive at the following
|
|
9
|
-
* address: contact@iris-interactive.fr
|
|
10
|
-
*
|
|
11
|
-
* @author Lucas ROCHE
|
|
12
|
-
* @date 21/02/2022 17:30
|
|
13
|
-
* @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
import ElementEnum from "../../enumerators/element.enum";
|
|
17
|
-
import "./collapse.component.scss";
|
|
18
|
-
import Collapse from "bootstrap/js/src/collapse";
|
|
19
|
-
|
|
20
|
-
export class HcCollapse {
|
|
21
|
-
|
|
22
|
-
showEvent;
|
|
23
|
-
shownEvent;
|
|
24
|
-
hideEvent;
|
|
25
|
-
hiddenEvent;
|
|
26
|
-
|
|
27
|
-
constructor(elements = ElementEnum.collapse, type = "collapse") {
|
|
28
|
-
this.createEvent();
|
|
29
|
-
const collapseElementList = [].slice.call(document.querySelectorAll(elements));
|
|
30
|
-
const collapseList = collapseElementList.map(function (collapseElement) {
|
|
31
|
-
const parent = collapseElement.getAttribute('data-hc-collapse-parent');
|
|
32
|
-
let option = {
|
|
33
|
-
toggle: false
|
|
34
|
-
};
|
|
35
|
-
if (parent !== null) {
|
|
36
|
-
option.parent = parent;
|
|
37
|
-
}
|
|
38
|
-
return new Collapse(collapseElement, option);
|
|
39
|
-
});
|
|
40
|
-
collapseList.map(function (collapse) {
|
|
41
|
-
document.querySelectorAll(`[data-hc-collapse-trigger="${collapse._element.getAttribute("data-hc-collapse")}"]`).forEach(trigger => {
|
|
42
|
-
const handleTriggerAction = (e) => {
|
|
43
|
-
e.preventDefault();
|
|
44
|
-
collapse.toggle();
|
|
45
|
-
};
|
|
46
|
-
trigger.addEventListener('click', handleTriggerAction);
|
|
47
|
-
trigger.addEventListener('keydown', (e) => {
|
|
48
|
-
if (e.which == 13 ) {
|
|
49
|
-
handleTriggerAction(e);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
document.querySelectorAll('[data-hc-collapse]').forEach(trigger => {
|
|
55
|
-
const triggerEls = document.querySelectorAll(`[data-hc-collapse-trigger="${trigger.getAttribute('id')}"]`);
|
|
56
|
-
trigger.addEventListener('hide.bs.collapse', (e) => {
|
|
57
|
-
triggerEls.forEach(triggerEl => {
|
|
58
|
-
if (triggerEl.classList.contains('active')) {
|
|
59
|
-
triggerEl.classList.remove('active');
|
|
60
|
-
}
|
|
61
|
-
triggerEl.setAttribute('aria-expanded', 'false');
|
|
62
|
-
});
|
|
63
|
-
trigger.dispatchEvent(this.hideEvent);
|
|
64
|
-
});
|
|
65
|
-
trigger.addEventListener('hidden.bs.collapse', (e) => {
|
|
66
|
-
trigger.dispatchEvent(this.hiddenEvent);
|
|
67
|
-
});
|
|
68
|
-
trigger.addEventListener('show.bs.collapse', (e) => {
|
|
69
|
-
triggerEls.forEach(triggerEl => {
|
|
70
|
-
if (!triggerEl.classList.contains('active')) {
|
|
71
|
-
triggerEl.classList.add('active');
|
|
72
|
-
}
|
|
73
|
-
triggerEl.setAttribute('aria-expanded', 'true');
|
|
74
|
-
});
|
|
75
|
-
trigger.dispatchEvent(this.showEvent);
|
|
76
|
-
});
|
|
77
|
-
trigger.addEventListener('shown.bs.collapse', (e) => {
|
|
78
|
-
trigger.dispatchEvent(this.shownEvent);
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
createEvent() {
|
|
84
|
-
this.showEvent = new Event("show.hc.collapse");
|
|
85
|
-
this.shownEvent = new Event("shown.hc.collapse");
|
|
86
|
-
this.hideEvent = new Event("hide.hc.collapse");
|
|
87
|
-
this.hiddenEvent = new Event("hidden.hc.collapse");
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const hc_collapse = function (trigger) {
|
|
93
|
-
return new HcCollapse(trigger);
|
|
94
|
-
};
|
|
95
|
-
export default hc_collapse;
|
|
1
|
+
import e from"../../enumerators/element.enum";import"./collapse.component.scss";import t from"bootstrap/js/src/collapse";export class HcCollapse{showEvent;shownEvent;hideEvent;hiddenEvent;constructor(s=e.collapse,n="collapse"){this.createEvent(),[].slice.call(document.querySelectorAll(s)).map(function(e){let s=e.getAttribute("data-hc-collapse-parent"),n={toggle:!1};return null!==s&&(n.parent=s),new t(e,n)}).map(function(e){document.querySelectorAll(`[data-hc-collapse-trigger="${e._element.getAttribute("data-hc-collapse")}"]`).forEach(t=>{t.addEventListener("click",function(t){t.preventDefault(),e.toggle()})})}),document.querySelectorAll("[data-hc-collapse]").forEach(e=>{let t=document.querySelectorAll(`[data-hc-collapse-trigger="${e.getAttribute("id")}"]`);e.addEventListener("hide.bs.collapse",s=>{t.forEach(e=>{e.classList.contains("active")&&e.classList.remove("active")}),e.dispatchEvent(this.hideEvent)}),e.addEventListener("hidden.bs.collapse",t=>{e.dispatchEvent(this.hiddenEvent)}),e.addEventListener("show.bs.collapse",s=>{t.forEach(e=>{!e.classList.contains("active")&&e.classList.add("active")}),e.dispatchEvent(this.showEvent)}),e.addEventListener("shown.bs.collapse",t=>{e.dispatchEvent(this.shownEvent)})})}createEvent(){this.showEvent=new Event("show.hc.collapse"),this.shownEvent=new Event("shown.hc.collapse"),this.hideEvent=new Event("hide.hc.collapse"),this.hiddenEvent=new Event("hidden.hc.collapse")}}let hc_collapse=function(e){return new HcCollapse(e)};export default hc_collapse;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
@import "
|
|
17
|
-
@import "
|
|
18
|
-
@import "
|
|
19
|
-
@import "
|
|
16
|
+
@import "bootstrap/scss/functions";
|
|
17
|
+
@import "bootstrap/scss/variables";
|
|
18
|
+
@import "bootstrap/scss/mixins";
|
|
19
|
+
@import "bootstrap/scss/transitions";
|
|
@@ -1,81 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* IRIS Interactive
|
|
3
|
-
*
|
|
4
|
-
* NOTICE OF LICENSE
|
|
5
|
-
*
|
|
6
|
-
* This source file is no subject to a specific license
|
|
7
|
-
* but it belongs to the company IRIS Interactive.
|
|
8
|
-
* You can contact IRIS Interactive at the following
|
|
9
|
-
* address: contact@iris-interactive.fr
|
|
10
|
-
*
|
|
11
|
-
* @author Lucas ROCHE
|
|
12
|
-
* @date 21/02/2022 10:14
|
|
13
|
-
* @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
import ElementEnum from "../../enumerators/element.enum";
|
|
18
|
-
import tippy, {hideAll} from "tippy.js";
|
|
19
|
-
import "tippy.js/dist/tippy.css";
|
|
20
|
-
import "./dropdown.component.scss";
|
|
21
|
-
|
|
22
|
-
export class HcDropdown {
|
|
23
|
-
|
|
24
|
-
showEvent;
|
|
25
|
-
shownEvent;
|
|
26
|
-
hideEvent;
|
|
27
|
-
hiddenEvent;
|
|
28
|
-
|
|
29
|
-
constructor(elements = ElementEnum.dropdown) {
|
|
30
|
-
|
|
31
|
-
window.hc_dropdown = window.hc_dropdown || [];
|
|
32
|
-
|
|
33
|
-
this.createEvent();
|
|
34
|
-
document.querySelectorAll(elements).forEach(element => {
|
|
35
|
-
|
|
36
|
-
const template = document.querySelector(element.dataset.hcDropdownMenu);
|
|
37
|
-
const tippyObject = tippy(element, {
|
|
38
|
-
trigger: 'click',
|
|
39
|
-
allowHTML: true,
|
|
40
|
-
content: template.innerHTML,
|
|
41
|
-
arrow: false,
|
|
42
|
-
placement: "bottom",
|
|
43
|
-
theme: "dropdown",
|
|
44
|
-
interactive: true,
|
|
45
|
-
onShow: (instance) => {
|
|
46
|
-
instance.reference.dispatchEvent(this.showEvent)
|
|
47
|
-
},
|
|
48
|
-
onShown: (instance) => {
|
|
49
|
-
instance.reference.dispatchEvent(this.shownEvent)
|
|
50
|
-
},
|
|
51
|
-
onHide: (instance) => {
|
|
52
|
-
instance.reference.dispatchEvent(this.hideEvent)
|
|
53
|
-
},
|
|
54
|
-
onHidden: (instance) => {
|
|
55
|
-
instance.reference.dispatchEvent(this.hiddenEvent)
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
window.hc_dropdown.push(tippyObject);
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
static hideAll() {
|
|
63
|
-
if (window.hc_dropdown !== undefined) {
|
|
64
|
-
window.hc_dropdown.forEach( instance => {
|
|
65
|
-
instance.hide();
|
|
66
|
-
} )
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
createEvent() {
|
|
71
|
-
this.showEvent = new Event('show.hc.dropdown');
|
|
72
|
-
this.shownEvent = new Event('shown.hc.dropdown');
|
|
73
|
-
this.hideEvent = new Event('hide.hc.dropdown');
|
|
74
|
-
this.hiddenEvent = new Event('hidden.hc.dropdown');
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const hc_dropdown = function (trigger) {
|
|
79
|
-
return new HcDropdown(trigger);
|
|
80
|
-
}
|
|
81
|
-
export default hc_dropdown;
|
|
1
|
+
import e from"../../enumerators/element.enum";import n,{hideAll as o}from"tippy.js";import"tippy.js/dist/tippy.css";import"./dropdown.component.scss";export class HcDropdown{showEvent;shownEvent;hideEvent;hiddenEvent;constructor(o=e.dropdown){window.hc_dropdown=window.hc_dropdown||[],this.createEvent(),document.querySelectorAll(o).forEach(e=>{let o=document.querySelector(e.dataset.hcDropdownMenu),t=n(e,{trigger:"click",allowHTML:!0,content:o.innerHTML,arrow:!1,placement:"bottom",theme:"dropdown",interactive:!0,onShow:e=>{e.reference.dispatchEvent(this.showEvent)},onShown:e=>{e.reference.dispatchEvent(this.shownEvent)},onHide:e=>{e.reference.dispatchEvent(this.hideEvent)},onHidden:e=>{e.reference.dispatchEvent(this.hiddenEvent)}});window.hc_dropdown.push(t)})}static hideAll(){void 0!==window.hc_dropdown&&window.hc_dropdown.forEach(e=>{e.hide()})}createEvent(){this.showEvent=new Event("show.hc.dropdown"),this.shownEvent=new Event("shown.hc.dropdown"),this.hideEvent=new Event("hide.hc.dropdown"),this.hiddenEvent=new Event("hidden.hc.dropdown")}}let hc_dropdown=function(e){return new HcDropdown(e)};export default hc_dropdown;
|
|
@@ -1,61 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* IRIS Interactive
|
|
3
|
-
*
|
|
4
|
-
* NOTICE OF LICENSE
|
|
5
|
-
*
|
|
6
|
-
* This source file is no subject to a specific license
|
|
7
|
-
* but it belongs to the company IRIS Interactive.
|
|
8
|
-
* You can contact IRIS Interactive at the following
|
|
9
|
-
* address: contact@iris-interactive.fr
|
|
10
|
-
*
|
|
11
|
-
* @author Lucas ROCHE
|
|
12
|
-
* @date 22/02/2022 14:16
|
|
13
|
-
* @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
import LazyLoad from "vanilla-lazyload";
|
|
18
|
-
|
|
19
|
-
export class HcLazyload {
|
|
20
|
-
|
|
21
|
-
static instance;
|
|
22
|
-
|
|
23
|
-
constructor(options = {}) {
|
|
24
|
-
options = Object.assign({
|
|
25
|
-
elements_selector: '[data-hc-src], [data-hc-bg], [data-hc-bg-hidpi], [data-hc-srcset]',
|
|
26
|
-
data_src: 'hc-src',
|
|
27
|
-
data_bg: 'hc-bg',
|
|
28
|
-
data_bg_hidpi: 'hc-bg-hidpi',
|
|
29
|
-
data_srcset: 'hc-srcset'
|
|
30
|
-
}, options);
|
|
31
|
-
|
|
32
|
-
this.lazyLoadInstance = new LazyLoad(options);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
static getInstance(options = {}) {
|
|
36
|
-
if (!HcLazyload.instance) {
|
|
37
|
-
HcLazyload.instance = new HcLazyload(options);
|
|
38
|
-
}
|
|
39
|
-
return HcLazyload.instance.lazyLoadInstance;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
static update(options = {}) {
|
|
43
|
-
const instance = HcLazyload.getInstance(options);
|
|
44
|
-
if (instance && typeof instance.update === 'function') {
|
|
45
|
-
instance.update();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
static loadAll(options = {}) {
|
|
50
|
-
const instance = HcLazyload.getInstance(options);
|
|
51
|
-
if (instance && typeof instance.loadAll === 'function') {
|
|
52
|
-
instance.loadAll();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const hc_lazyload = function (options = {}) {
|
|
58
|
-
return HcLazyload.getInstance(options);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export default hc_lazyload;
|
|
1
|
+
import a from"vanilla-lazyload";export class HcLazyload{static instance;constructor(t={}){t=Object.assign({elements_selector:"[data-hc-src], [data-hc-bg], [data-hc-bg-hidpi], [data-hc-srcset]",data_src:"hc-src",data_bg:"hc-bg",data_bg_hidpi:"hc-bg-hidpi",data_srcset:"hc-srcset"},t),this.lazyLoadInstance=new a(t)}static getInstance(a={}){return!HcLazyload.instance&&(HcLazyload.instance=new HcLazyload(a)),HcLazyload.instance.lazyLoadInstance}static update(a={}){let t=HcLazyload.getInstance(a);t&&"function"==typeof t.update&&t.update()}static loadAll(a={}){let t=HcLazyload.getInstance(a);t&&"function"==typeof t.loadAll&&t.loadAll()}}let hc_lazyload=function(a={}){return HcLazyload.getInstance(a)};export default hc_lazyload;
|
|
@@ -1,91 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* IRIS Interactive
|
|
3
|
-
*
|
|
4
|
-
* NOTICE OF LICENSE
|
|
5
|
-
*
|
|
6
|
-
* This source file is no subject to a specific license
|
|
7
|
-
* but it belongs to the company IRIS Interactive.
|
|
8
|
-
* You can contact IRIS Interactive at the following
|
|
9
|
-
* address: contact@iris-interactive.fr
|
|
10
|
-
*
|
|
11
|
-
* @author Lucas ROCHE
|
|
12
|
-
* @date 21/02/2022 09:57
|
|
13
|
-
* @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
import {Fancybox} from "@fancyapps/ui";
|
|
17
|
-
import '@fancyapps/ui/dist/fancybox.css';
|
|
18
|
-
import "./lightbox.component.scss";
|
|
19
|
-
import ElementEnum from "../../enumerators/element.enum";
|
|
20
|
-
|
|
21
|
-
export class HcLightbox {
|
|
22
|
-
|
|
23
|
-
constructor(elements = ElementEnum.lightbox, options = {}) {
|
|
24
|
-
if (elements === ElementEnum.lightbox) {
|
|
25
|
-
Object.assign(options, {
|
|
26
|
-
groupAttr: ElementEnum.lightboxAttr,
|
|
27
|
-
l10n: this.getTranslation()
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
Fancybox.bind(elements, options);
|
|
31
|
-
|
|
32
|
-
this.attachEventToShowButton();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
attachEventToShowButton() {
|
|
36
|
-
document.querySelectorAll("[data-hc-lightbox-show]").forEach(trigger => {
|
|
37
|
-
trigger.addEventListener('click', (e) => {
|
|
38
|
-
e.preventDefault();
|
|
39
|
-
document.querySelector(trigger.getAttribute('href') + ' img').click();
|
|
40
|
-
});
|
|
41
|
-
})
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
getTranslation() {
|
|
45
|
-
const lang = document.querySelector('html')?.getAttribute('lang');
|
|
46
|
-
|
|
47
|
-
if ( typeof lang == "string" && lang.indexOf('fr-FR') !== false) {
|
|
48
|
-
return {
|
|
49
|
-
CLOSE: "Fermer",
|
|
50
|
-
NEXT: "Suivant",
|
|
51
|
-
PREV: "Précédent",
|
|
52
|
-
MODAL: "Vous pouvez fermer la modal avec la touche echap",
|
|
53
|
-
ERROR: "Quelque chose c'est mal passé. Merci d'essayer plus tard\n",
|
|
54
|
-
IMAGE_ERROR: "Image introuvable",
|
|
55
|
-
ELEMENT_NOT_FOUND: "Élement HTML introuvable",
|
|
56
|
-
AJAX_NOT_FOUND: "Erreur de chargement AJAX : Introuvable",
|
|
57
|
-
AJAX_FORBIDDEN: "Erreur de chargement AJAX : Interdit",
|
|
58
|
-
IFRAME_ERROR: "Erreur du chargement de la page",
|
|
59
|
-
TOGGLE_ZOOM: "Zoome/dezoome",
|
|
60
|
-
TOGGLE_THUMBS: "Affiche/cache les miniatures",
|
|
61
|
-
TOGGLE_SLIDESHOW: "Active/désactive le défilement automatique",
|
|
62
|
-
TOGGLE_FULLSCREEN: "Bascule le mode plein écran",
|
|
63
|
-
DOWNLOAD: "Télécharger",
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return {
|
|
68
|
-
CLOSE: "Close",
|
|
69
|
-
NEXT: "Next",
|
|
70
|
-
PREV: "Previous",
|
|
71
|
-
MODAL: "You can close this modal content with the ESC key",
|
|
72
|
-
ERROR: "Something Went Wrong, Please Try Again Later",
|
|
73
|
-
IMAGE_ERROR: "Image Not Found",
|
|
74
|
-
ELEMENT_NOT_FOUND: "HTML Element Not Found",
|
|
75
|
-
AJAX_NOT_FOUND: "Error Loading AJAX : Not Found",
|
|
76
|
-
AJAX_FORBIDDEN: "Error Loading AJAX : Forbidden",
|
|
77
|
-
IFRAME_ERROR: "Error Loading Page",
|
|
78
|
-
TOGGLE_ZOOM: "Toggle zoom level",
|
|
79
|
-
TOGGLE_THUMBS: "Toggle thumbnails",
|
|
80
|
-
TOGGLE_SLIDESHOW: "Toggle slideshow",
|
|
81
|
-
TOGGLE_FULLSCREEN: "Toggle full-screen mode",
|
|
82
|
-
DOWNLOAD: "Download",
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const hc_lightbox = function (trigger = ElementEnum.lightbox, options = {}) {
|
|
88
|
-
return new HcLightbox(trigger, options);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export default hc_lightbox;
|
|
1
|
+
import{Fancybox as e}from"@fancyapps/ui";import"@fancyapps/ui/dist/fancybox.css";import"./lightbox.component.scss";import t from"../../enumerators/element.enum";export class HcLightbox{constructor(o=t.lightbox,r={}){o===t.lightbox&&Object.assign(r,{groupAttr:t.lightboxAttr,l10n:this.getTranslation()}),e.bind(o,r),this.attachEventToShowButton()}attachEventToShowButton(){document.querySelectorAll("[data-hc-lightbox-show]").forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),document.querySelector(e.getAttribute("href")+" img").click()})})}getTranslation(){let e=document.querySelector("html")?.getAttribute("lang");return"string"==typeof e&&!1!==e.indexOf("fr-FR")?{CLOSE:"Fermer",NEXT:"Suivant",PREV:"Pr\xe9c\xe9dent",MODAL:"Vous pouvez fermer la modal avec la touche echap",ERROR:"Quelque chose c'est mal pass\xe9. Merci d'essayer plus tard\n",IMAGE_ERROR:"Image introuvable",ELEMENT_NOT_FOUND:"\xc9lement HTML introuvable",AJAX_NOT_FOUND:"Erreur de chargement AJAX : Introuvable",AJAX_FORBIDDEN:"Erreur de chargement AJAX : Interdit",IFRAME_ERROR:"Erreur du chargement de la page",TOGGLE_ZOOM:"Zoome/dezoome",TOGGLE_THUMBS:"Affiche/cache les miniatures",TOGGLE_SLIDESHOW:"Active/d\xe9sactive le d\xe9filement automatique",TOGGLE_FULLSCREEN:"Bascule le mode plein \xe9cran",DOWNLOAD:"T\xe9l\xe9charger"}:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}}}let hc_lightbox=function(e=t.lightbox,o={}){return new HcLightbox(e,o)};export default hc_lightbox;
|