diff --git a/.auto-changelog b/.auto-changelog new file mode 100644 index 000000000..c046a90fa --- /dev/null +++ b/.auto-changelog @@ -0,0 +1,7 @@ +{ + "output": "CHANGELOG.md", + "template": "changelog-template.hbs", + "unreleased": false, + "commitLimit": false, + "hideCredit": true +} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..88fc74061 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,1085 @@ +# Changelog du Système de design de l’État + +Toutes les modifications notables apportées à ce projet seront documentées dans ce fichier. + +Le format est basé sur [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +et ce projet respecte [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +Pour plus d’informations : [Voir la documentation](https://www.systeme-de-design.gouv.fr/) + +## [v1.9.2](https://github.com/GouvernementFR/dsfr/compare/v1.9.1...v1.9.2) + +### Merged + +#### 🐛 fix(analytics): correctifs analytics & page test spa [DS-3200,DS-3218] (#587) + +* Amélioration de la qualité des labels envoyés à Eulerian +* Maximum 50 caractères, couper avec […] au delà +* Récupère uniquement le premier texte +* Retrait des espaces en trop +* Ajout de la propriété `isDebugging` dans `dsfr.analytics` permettant d'activer/désactiver le debug Eulerian +* Mise en conformité avec les SPA (Single-page application - Angular, React, Vue) +* Ajout d’exemples de SPA (Vue & React) [`#587`](https://github.com/GouvernementFR/dsfr/pull/587) + +#### ✨ feat(analytics): polyfill legacy [DS-3221] (#588) + +Ajout des polyfills et correctifs nécessaires au support d'IE11 [`#588`](https://github.com/GouvernementFR/dsfr/pull/588) + +#### ✨ feat(changelog): ajoute changelog auto-généré [DS-3070] (#561) + +Outil en ligne de commande pour générer un journal des modifications `CHANGELOG.md` à partir des balises git et de l'historique des commits, nous utilisons [Auto-changelog](https://github.com/cookpete/auto-changelog). + +Commande à executer à la racine du projet, `git log` est exécuté en arrière-plan afin d'analyser l'historique des commits, en lançant : + +``` +yarn version +``` + +Il faut ensuite renseigner le numéro de version de la prochaine release : +``` +info Current version: x.x.x +question New version: [X.X.X] +``` + +La configuration est présente dans le fichier `.auto-changelog`. + +La gestion de l'affichage du changelog est présente dans le template [Handlebars](https://handlebarsjs.com/) `changelog-template.hbs`. [`#561`](https://github.com/GouvernementFR/dsfr/pull/561) + +## [v1.9.1](https://github.com/GouvernementFR/dsfr/compare/v1.9.0...v1.9.1) - 2023-04-11 + +### Merged + +#### fix(input): correction bug icone date-picker firefox version 109+ [DS-2547] (#585) + +Depuis la version 109 de Firefox, l'icone date-picker est en double sur les champs type date +- Ajout de l'icone date-picker si le navigateur le supporte uniquement [`#585`](https://github.com/GouvernementFR/dsfr/pull/585) + +#### ✨ feat(analytics): évolution et ajout de nouveaux composants [DS-3199,DS-3200] (#560) + +- Ajout d’un attribut id sur tous les éléments marqués. Les éléments où l'id manque sont recensés en warning dans la console. +- ⚠ Modification de la configuration analytics : +⋅ dsfr.analytics.mode devient dsfr.analytics.collection et peut maintenant prendre les valeurs MANUAL, LOAD, FULL, HASH (voir doc). +⋅ Ajout du support des SPA activé automatiquement si en mode ANGULAR, REACT ou VUE +⋅ Ajout de la variable `enableRating` dans dsfr.analytics.enableRating, permettant d’activer le taux de clic (désactivé par défaut). +- Ajout du support analytics sur les composants restants : +- [x] Ajout de fichier - File upload +- [x] Alertes - Alert +- [x] Badge +- [x] Bandeau d'information importante +- [x] Bouton FranceConnect +- [x] Champ de saisie - Input +- [x] Citation - Quote +- [x] Contenu médias - Responsive médias +- [x] Gestionnaire de consentement - Consent banner +- [x] Indicateur d'étape +- [x] Lettre d'information et réseaux sociaux - Newsletter & Follow us +- [x] Liens d'évitement - Skiplink +- [x] Liste déroulante - Select +- [x] Pagination +- [x] Sélecteur de langue +- [x] Tableau - Table +- [x] Tag +- [x] Téléchargement de fichier +- [x] Tuile - Tile +- [x] Transcription [`#560`](https://github.com/GouvernementFR/dsfr/pull/560) + +#### :sparkles: feat(header,navigation): fermeture de la navigation au clic sur lien ou bouton [DS-2742] (#583) + +Actuellement, la navigation reste présente en mobile et en desktop lorsque l'on clique sur un lien ou un bouton qu'elle contient, ce qui pose problème dans le cas des Single-page application. +La fonctionnalité est maintenant modifiée pour que tout clic sur un élément `<button>` ou `<a>` entraîne la fermeture de la navigation (modale et/ou menu). +L'ajout de l'attribut `data-fr-prevent-conceal` permet de préserver un lien ou un bouton particulier de ce nouveau comportement. [`#583`](https://github.com/GouvernementFR/dsfr/pull/583) + +#### 🐛 fix(build): changement des path pour compiler sur windows [DS-2992] (#580) + +Sur windows il n'est pas possible de recompiler le projet avec yarn build +Correction des path dans les tools (windows utilise "" et linux et mac "/") [`#580`](https://github.com/GouvernementFR/dsfr/pull/580) + +#### ✨ feat(github): ajout de templates d'issue github [DS-3201] (#569) + +Création de template d'issue Github pour indiquer les informations demandées lors d'un report de +- bug +- évolution +- documentation [`#569`](https://github.com/GouvernementFR/dsfr/pull/569) + +#### :bug: fix(core): correction icone lien externe IE (#548) + +Sur Internet Explorer, les icônes des liens externes ne s'affichent plus. +Correction css sur core. [`#548`](https://github.com/GouvernementFR/dsfr/pull/548) + +#### ⬆️ feat(deps): mise à jour des dépendances [DS-3011] (#553) [`#553`](https://github.com/GouvernementFR/dsfr/pull/553) + +#### 🐛 fix(transcription): corrige largeur du bouton a l'ouverture de la modale [DS-3070] (#565) + +à l'ouverture de la modale de la transcription, le déplacement des éléments en position fixed change la taille du bouton de la transcription à sa taille minimum. +La largeur étendue à 100% permet de la conserver constante. [`#565`](https://github.com/GouvernementFR/dsfr/pull/565) + +#### 🐛 fix(notice): ajoute 'importante' au bandeau d'information importante [DS-3073] (#563) + +Le nom du composant devient "Bandeau information importante" [`#563`](https://github.com/GouvernementFR/dsfr/pull/563) + +#### ✨ feat(footer): évolution des mentions légales [DS-3140] (#568) + +Nouveau texte : ”Sauf mention explicite de propriété intellectuelle détenue par des tiers, les contenus de ce site sont proposés sous” [`#568`](https://github.com/GouvernementFR/dsfr/pull/568) + +#### 🐛 fix(consent): consent placeholder video mal centré [DS-3026] (#573) + +Dans le cas d'une vidéo le placeholder est en display block +Retrait de la propriété non désirée [`#573`](https://github.com/GouvernementFR/dsfr/pull/573) + +#### :bug: fix(password): correctif erreur getModifierState [DS-2940] (#574) + +Lorsque le navigateur fait l'autocompletion du champ password, il lance un événement qui n'est pas forcément un évènement de clavier et provoque une erreur indiquant que la fonction getModifierState n'existe pas. [`#574`](https://github.com/GouvernementFR/dsfr/pull/574) + +#### 🐛 fix(modal): correctif prise de focus au focus-trap [DS-3211] (#566) + +à l'ouverture de la modale, le focus est automatiquement déplacé sur le premier des éléments interactifs de la modale. +Ce comportement pose problème lorsque le focus est déjà sur un des éléments contenus dans la modale. + +Ajout d'une condition qui vérifie que le focus n'est pas déjà sur un des éléments interactifs de la modale avant de déplacer le focus. [`#566`](https://github.com/GouvernementFR/dsfr/pull/566) + +#### :sparkles: feat(readme): Mise à jour du readme [DS-3193] (#559) + +Fine tuning, ajout de licence et droit d'utilisation et corrections. [`#559`](https://github.com/GouvernementFR/dsfr/pull/559) + +#### ✨ feat(artwork): ajout picto document-add [DS-3210] (#571) + +Ajout pictogramme : +- document/document-add [`#571`](https://github.com/GouvernementFR/dsfr/pull/571) + +## [v1.9.0](https://github.com/GouvernementFR/dsfr/compare/v1.8.5...v1.9.0) - 2023-03-01 + +### Merged + +#### fix(*): correctifs mineurs pa11y et buble + lint (#555) + +correction du chemin relatif du layout dans les exemples du package response +spread operator non supporté par buble, remplacé par Object.assign pour la transpilation IE11 +correctifs de false positive pa11y [`#555`](https://github.com/GouvernementFR/dsfr/pull/555) + +#### feat(analytics): ajout de la fonctionnalité Analytics [DS-2981,DS-2982] (#528) + +Outil de collecte de données basé sur la solution Eulerian [`#528`](https://github.com/GouvernementFR/dsfr/pull/528) + +#### fix(*): mise à jour browserlist (#554) [`#554`](https://github.com/GouvernementFR/dsfr/pull/554) + +#### fix(scheme): correctif du scheme boot pour omission par ie11 (#550) + +Le code inline du scheme boot provoque des erreurs interrompant l'exécution du javascript sur IE11 +Il faut ajouter l'attribut type="module" sur l'étiquette d'élément script liée au scheme-boot [`#550`](https://github.com/GouvernementFR/dsfr/pull/550) + +#### fix(header): copie du sélecteur de langue sans accès rapide [DS-2950] (#547) + +Les accès rapides sont dupliqués dans le menu mobile par le JS (sauf dans les modes SPA) +En l'absence d'accès rapide, le sélecteur de langue n'était pas dupliqué comme attendu [`#547`](https://github.com/GouvernementFR/dsfr/pull/547) + +#### fix(artwork): depreciation des xlink dans les artwork [DS-2979] (#545) + +xlink-href est déprécié : https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href +Il était privilégié jusqu'ici pour le support d'IE11. Un polyfill a été mis en place pour assurer la rétrocompatibilité avec IE11 [`#545`](https://github.com/GouvernementFR/dsfr/pull/545) + +#### fix(address): Inversion ordre immeuble et batiment [DS-2976] (#544) + +inversion de 2 champs dans les modèles formulaire d'adresse [`#544`](https://github.com/GouvernementFR/dsfr/pull/544) + +#### fix(core): correctif de la taille minimum de l'underline des liens [DS-2987] (#543) + +Sur Firefox, la relativité de l'épaisseur du lien (en em) provoque parfois son invisibilité lorsque celui-ci est inférieur à 1px. Ce correctif met en place un minimum de 1px pour l'épaisseur du lien. [`#543`](https://github.com/GouvernementFR/dsfr/pull/543) + +#### fix(header): alignement à gauche des raccourcis sans icônes [DS-2951] (#542) + +L'absence d'icône sur les accès rapides de l'En-tête provoque un alignement centré au lieu d'un alignement gauche attendu. [`#542`](https://github.com/GouvernementFR/dsfr/pull/542) + +#### fix(checkbox, radio): placement de l'input caché & alignement sm [DS-2941] (#539) + +Corrige le mauvais placement du curseur sur les cases à cocher et les boutons radio lors de l'utilisation de VoiceOver (screen reader de MacOs) [`#539`](https://github.com/GouvernementFR/dsfr/pull/539) + +#### feat(icon): ajout icones system [DS-3188] (#551) + +Ajout d'icônes dans system : +fr--arrow-right-up-circle-fill, +fr--arrow-right-down-circle-fill, +fr--equal-circle-fill, [`#551`](https://github.com/GouvernementFR/dsfr/pull/551) + +#### fix(scheme): ajout du mode sombre de la scrollbar du navigateur (#407) (#535) + +Permet de synchroniser le thème de la scrollbar avec celui du DSFR [`#535`](https://github.com/GouvernementFR/dsfr/pull/535) + +#### feat(color): ajout de token de couleurs artwork (#552) + +Ajoute les tokens des familles de couleurs neutral, primary et accent sur artwork dans les usages decorative, background et motif [`#552`](https://github.com/GouvernementFR/dsfr/pull/552) + +#### feat(pictograms): Ajouts des pictogrammes food, grocery, house (#520) [`#520`](https://github.com/GouvernementFR/dsfr/pull/520) + +#### feat(deps): mise à jour des dependances npm [DS-2936] (#533) [`#533`](https://github.com/GouvernementFR/dsfr/pull/533) + +#### fix(response): retrait du fil d'Arianne sur les pages d'erreur [DS-3012] (#507) [`#507`](https://github.com/GouvernementFR/dsfr/pull/507) + +#### fix(toggle): rend le composant compatible avec vite+svelte (#518) [`#518`](https://github.com/GouvernementFR/dsfr/pull/518) + +## [v1.8.5](https://github.com/GouvernementFR/dsfr/compare/v1.8.4...v1.8.5) - 2022-11-28 + +### Merged + +#### fix(tag): correction régression lien tag [DS-2975] (#480) [`#480`](https://github.com/GouvernementFR/dsfr/pull/480) + +#### fix(transcription): correction de la pleine largeur du composant (#483) [`#483`](https://github.com/GouvernementFR/dsfr/pull/483) + +## [v1.8.4](https://github.com/GouvernementFR/dsfr/compare/v1.8.3...v1.8.4) - 2022-11-15 + +### Merged + +#### fix(footer): correction sur le séparateur bleu du pied de page (#465) [`#465`](https://github.com/GouvernementFR/dsfr/pull/465) + +#### fix(transcription): correction sur la présence du titre de la modale (#466) [`#466`](https://github.com/GouvernementFR/dsfr/pull/466) + +## [v1.8.3](https://github.com/GouvernementFR/dsfr/compare/v1.8.2...v1.8.3) - 2022-11-15 + +### Merged + +#### fix(link): correction régression icône à droite sur les éléments interactifs (#461) [`#461`](https://github.com/GouvernementFR/dsfr/pull/461) + +## [v1.8.2](https://github.com/GouvernementFR/dsfr/compare/v1.8.1...v1.8.2) - 2022-11-09 + +### Merged + +#### fix(global): fix build, lint, clean (#456) [`#456`](https://github.com/GouvernementFR/dsfr/pull/456) + +#### fix(display): correctif duplication du sélecteur de langue [DS-2908] (#454) [`#454`](https://github.com/GouvernementFR/dsfr/pull/454) + +#### feat(pagination): border active sur version constrasté [DS-2717] (#436) [`#436`](https://github.com/GouvernementFR/dsfr/pull/436) + +#### fix(toggle): bug IE label et statut actif [DS-2286] (#443) [`#443`](https://github.com/GouvernementFR/dsfr/pull/443) + +#### fix(tag): déplacement du focus sur les tags supprimables [DS-2905] (#453) [`#453`](https://github.com/GouvernementFR/dsfr/pull/453) + +#### fix(transcription): titre du contenu (a11y) [DS-2906] (#452) [`#452`](https://github.com/GouvernementFR/dsfr/pull/452) + +#### fix(core, download): correction du enlarge link [DS-2777] (#451) [`#451`](https://github.com/GouvernementFR/dsfr/pull/451) + +#### fix(download): titre des cartes en h3 [DS-2904] (#449) [`#449`](https://github.com/GouvernementFR/dsfr/pull/449) + +#### fix(scheme): ajout du scheme-boot permettant d'éliminer le flash au load de la page en dark mode [DS-2166] (#455) [`#455`](https://github.com/GouvernementFR/dsfr/pull/455) + +#### fix(scheme): correctifs de l'API JS de couleur [DS-2907] (#448) [`#448`](https://github.com/GouvernementFR/dsfr/pull/448) + +#### fix(form): ajout du css deprecated legacy (#439) [`#439`](https://github.com/GouvernementFR/dsfr/pull/439) + +#### feat(pattern): form autocomplete [DS-2889] (#425) [`#425`](https://github.com/GouvernementFR/dsfr/pull/425) + +## [v1.8.1](https://github.com/GouvernementFR/dsfr/compare/v1.8.0...v1.8.1) - 2022-10-27 + +### Merged + +#### fix(scheme): correctif thème sombre (fix #440) (#442) [`#442`](https://github.com/GouvernementFR/dsfr/pull/442) + +### Fixed + +#### fix(scheme): correctif thème sombre (fix #440) (#442) [`#440`](https://github.com/GouvernementFR/dsfr/issues/440) + +## [v1.8.0](https://github.com/GouvernementFR/dsfr/compare/v1.7.3...v1.8.0) - 2022-10-27 + +### Merged + +#### fix(form): correction accessiblité des formulaires (#438) [`#438`](https://github.com/GouvernementFR/dsfr/pull/438) + +#### feat(nationality): pattern nationalité [DS-2658] (#426) [`#426`](https://github.com/GouvernementFR/dsfr/pull/426) + +#### fix(quote): couleur du texte quote__sources [DS-2806] (#437) [`#437`](https://github.com/GouvernementFR/dsfr/pull/437) + +#### fix(form, upload): error & disabled [DS-2746, DS-2700] (#428) [`#428`](https://github.com/GouvernementFR/dsfr/pull/428) + +#### fix(tag): correction tag selectionnable hover [DS-2724] (#430) [`#430`](https://github.com/GouvernementFR/dsfr/pull/430) + +#### fix(connect): correction wording "qu'est-ce que france connect" [DS-2700] (#431) [`#431`](https://github.com/GouvernementFR/dsfr/pull/431) + +#### fix(accordion): correction token de couleur [DS-2700] (#432) [`#432`](https://github.com/GouvernementFR/dsfr/pull/432) + +#### feat(api): ajout d'événements sur le scheme [DS-2888] (#434) [`#434`](https://github.com/GouvernementFR/dsfr/pull/434) + +#### feat(api): ajoute la class Colors [DS-2888] (#424) [`#424`](https://github.com/GouvernementFR/dsfr/pull/424) + +#### fix(tile, summary, sidemenu): niveau de titre des composants [DS-1805] (#420) [`#420`](https://github.com/GouvernementFR/dsfr/pull/420) + +#### feat(transcription): ajoute le composant transcription [DS-895] (#412) [`#412`](https://github.com/GouvernementFR/dsfr/pull/412) + +#### fix(doc): met a jour les urls de documentation [DS-2764] (#413) [`#413`](https://github.com/GouvernementFR/dsfr/pull/413) + +#### fix(tabs): Ouverture de modal à l'intérieur d'un composant onglet [DS-2731] (#405) [`#405`](https://github.com/GouvernementFR/dsfr/pull/405) + +#### fix(sidemenu): sidemenu disparait à l'ouverture modale FF [DS-2723] (#406) [`#406`](https://github.com/GouvernementFR/dsfr/pull/406) + +#### fix(page): ajustement des imbrications de container (#417) [`#417`](https://github.com/GouvernementFR/dsfr/pull/417) + +#### fix(footer): bordure bleu inset & logo toujours aligné en haut (#410) [`#410`](https://github.com/GouvernementFR/dsfr/pull/410) + +#### fix(response): met a jour les espacements des pages erreur [DS-2762] (#402) [`#402`](https://github.com/GouvernementFR/dsfr/pull/402) + +#### fix(response): Mise à jour des path des pictogrammes [DS-2762] (#400) [`#400`](https://github.com/GouvernementFR/dsfr/pull/400) + +#### fix(password): correction template password [DS-2637] (#399) [`#399`](https://github.com/GouvernementFR/dsfr/pull/399) + +#### feat(account, register, login): ajout de modèles de page de connexion et création de compte [DS-2625, DS-2666, DS-2670, DS-2628] (#403) [`#403`](https://github.com/GouvernementFR/dsfr/pull/403) + +#### Feat(pattern): ajoute le modele de date unique [DS-2655] (#396) [`#396`](https://github.com/GouvernementFR/dsfr/pull/396) + +#### feat(society): Ajout du pattern société [DS-2649] (#415) [`#415`](https://github.com/GouvernementFR/dsfr/pull/415) + +#### feat(address): Ajout du pattern adresse [DS-2643] (#398) [`#398`](https://github.com/GouvernementFR/dsfr/pull/398) + +#### refactor(form): Ajout des fr-control et correction des pattern civility & name (#401) [`#401`](https://github.com/GouvernementFR/dsfr/pull/401) + +#### feat(password): ajout du composant mot de passe [DS-2637] (#391) [`#391`](https://github.com/GouvernementFR/dsfr/pull/391) + +#### feat(artwork): ajout de pictogrammes à la librairie [DS-2709] (#375) [`#375`](https://github.com/GouvernementFR/dsfr/pull/375) + +#### feat(pattern): ajoute le modele de civilite [DS-2631] (#355) [`#355`](https://github.com/GouvernementFR/dsfr/pull/355) + +#### feat(pattern): ajoute le modele de nom et prenom [DS-2634] (#356) [`#356`](https://github.com/GouvernementFR/dsfr/pull/356) + +#### refactor(input): Séparation en sous composant d'input, ajout de input-email et input-tel [DS-2640] [DS-2646] (#363) [`#363`](https://github.com/GouvernementFR/dsfr/pull/363) + +#### feat(page-unexpected): ajoute le modele de page erreur inattendue [DS-2762] (#383) [`#383`](https://github.com/GouvernementFR/dsfr/pull/383) + +## [v1.7.3](https://github.com/GouvernementFR/dsfr/compare/v1.7.2...v1.7.3) - 2023-02-02 + +### Merged + +#### fix(header): retrait du log de la documentation dans la console (#524) [`#524`](https://github.com/GouvernementFR/dsfr/pull/524) + +## [v1.7.2](https://github.com/GouvernementFR/dsfr/compare/v1.7.1...v1.7.2) - 2022-07-29 + +## [v1.7.1](https://github.com/GouvernementFR/dsfr/compare/v1.7.0...v1.7.1) - 2022-07-25 + +### Merged + +#### fix(elevation): legacy z-index [DS-2761] (#384) [`#384`](https://github.com/GouvernementFR/dsfr/pull/384) + +## [v1.7.0](https://github.com/GouvernementFR/dsfr/compare/v1.6.0...v1.7.0) - 2022-07-21 + +### Merged + +#### fix(module): correction lint (#382) [`#382`](https://github.com/GouvernementFR/dsfr/pull/382) + +#### chore(global): mis à jour des dépendances (#381) [`#381`](https://github.com/GouvernementFR/dsfr/pull/381) + +#### fix(unavailable): ajout de la page d'exemple [DS-2662] (#380) [`#380`](https://github.com/GouvernementFR/dsfr/pull/380) + +#### fix(card): correction de l'aspect ratio par défaut des vidéos [DS-2729] (#378) [`#378`](https://github.com/GouvernementFR/dsfr/pull/378) + +#### fix(not-found): ajuste la template not-found [DS-1941] (#379) [`#379`](https://github.com/GouvernementFR/dsfr/pull/379) + +#### fix(card): correction aspect ratio par défaut [DS-2729] (#374) [`#374`](https://github.com/GouvernementFR/dsfr/pull/374) + +#### feat(server): Ajout page erreur serveur [DS-2662] (#330) [`#330`](https://github.com/GouvernementFR/dsfr/pull/330) + +#### feat(not-found): ajoute les modèles de page erreur 404 [DS-1941] (#371) [`#371`](https://github.com/GouvernementFR/dsfr/pull/371) + +#### fix(global): correction des erreurs pa11y (#376) [`#376`](https://github.com/GouvernementFR/dsfr/pull/376) + +#### feat(translate) : Ajout du sélecteur de langue [DS-2017] (#359) [`#359`](https://github.com/GouvernementFR/dsfr/pull/359) + +#### fix(footer, header): généralisation de l'attribut 'title' du lien retour/accueil du logo [DS-2682] (#353) [`#353`](https://github.com/GouvernementFR/dsfr/pull/353) + +#### fix(stepper): correction barre d'étape masquée sur Firefox [DS-2760] (#373) [`#373`](https://github.com/GouvernementFR/dsfr/pull/373) + +#### feat(global): évolution du système d'élévation et des ombres [DS-2128] (#372) [`#372`](https://github.com/GouvernementFR/dsfr/pull/372) + +#### fix(global): Amendements sur les CGU du DSFR (#370) [`#370`](https://github.com/GouvernementFR/dsfr/pull/370) + +#### Amendements sur les CGU du DSFR (#368) + +* fix: corrections typographiques + +Signed-off-by: Bastien Guerry <bastien.guerry@data.gouv.fr> + +* fix: levée d'une contradiction entre la licence et les CGU + +Personne n'est autorisé à utiliser les ressources du DSFR pour publier +un site ou une application mobile induisant son utilisateur en erreur +sur le caractère officiel du site ou de l'application. + +Restreindre les finalités de l'usage de la ressource par l'Utilisateur +de l'État est redondant au regard de l'interdiction ci-dessus et trop +limitant: un agent public peut vouloir tester le DSFR, le modifier sur +sa machine, partager des évolutions qu'il propose, même si celles-ci +ne sont pas appelées à être intégrées au DSFR, et donc à rester +interdites à l'usage sur des sites officiels. + +D'où l'inflexion dans la première modification de ce correctif et la +mention de "pour leurs sites et applications mobiles" dans la deuxième +modification, explicitant le fait qu'« utilisation » désigne ici une +utilisation dans le cadre d'une publication de site ou d'application. + +Il y a sinon une contradiction entre les libertés octroyées via la +licence MIT et les limitations imposées dans les CGU. + +Signed-off-by: Bastien Guerry <bastien.guerry@data.gouv.fr> + +* fix: suppression d'une phrase fausse et d'un paragraphe inutile + +La licence MIT permet aux utilisateurs d'utiliser le code source (pas +seulement de le consulter) et de vendre la ressource s'ils le veulent. + +Le paragraphe interdisant l'usage de la ressource aux fins de tromper +les utilisateurs de sites ou d'applications mobiles est redondant avec +le paragraphe suivant, rappellant que ces tromperies sont punissables. + +Signed-off-by: Bastien Guerry <bastien.guerry@data.gouv.fr> + +* fix: suppression des espaces en fin de lignes + +Signed-off-by: Bastien Guerry <bastien.guerry@data.gouv.fr> [`#368`](https://github.com/GouvernementFR/dsfr/pull/368) + +#### feat(i18n): système i18n globalisé (#365) [`#365`](https://github.com/GouvernementFR/dsfr/pull/365) + +#### fix(content, core): bug ratio vidéos ios [DS-2188] (#352) [`#352`](https://github.com/GouvernementFR/dsfr/pull/352) + +#### fix(pagination): correction couleur des liens de pagination en 'button' [DS-2577] (#354) [`#354`](https://github.com/GouvernementFR/dsfr/pull/354) + +#### fix(global): correction standalone locale pour i18n (#364) [`#364`](https://github.com/GouvernementFR/dsfr/pull/364) + +#### fix(core): correction du sens de l'extension du soulignement (#350) [`#350`](https://github.com/GouvernementFR/dsfr/pull/350) + +#### fix(global): correction pa11y test (#360) [`#360`](https://github.com/GouvernementFR/dsfr/pull/360) + +#### feat(global): module sass dsfr (#358) [`#358`](https://github.com/GouvernementFR/dsfr/pull/358) + +#### feat(global): multiplication des pages d'exemple et internationalisation [DS-1381] (#357) [`#357`](https://github.com/GouvernementFR/dsfr/pull/357) + +## [v1.6.0](https://github.com/GouvernementFR/dsfr/compare/v1.5.2...v1.6.0) - 2022-06-14 + +### Merged + +#### feat(core): mise à disposition de state et stage dans l'api js (#345) [`#345`](https://github.com/GouvernementFR/dsfr/pull/345) + +#### fix(core): correction du fond du svg - faux positif PA11Y (#343) [`#343`](https://github.com/GouvernementFR/dsfr/pull/343) + +#### fix(card): correctif des tailles fixes des cartes horizontales [DS-2707] (#338) [`#338`](https://github.com/GouvernementFR/dsfr/pull/338) + +#### fix(core): suppression de l'icône lien extérieur sur une balise form [DS-2706] (#340) [`#340`](https://github.com/GouvernementFR/dsfr/pull/340) + +#### fix(global): stylelint (#337) [`#337`](https://github.com/GouvernementFR/dsfr/pull/337) + +#### fix(follow, share): ajout texte explicatif icones RS disponibles [DS-2598][DS-2597] (#331) [`#331`](https://github.com/GouvernementFR/dsfr/pull/331) + +#### fix(core,link,button,tag,card): correctif icône lien extérieur [DS-2510] (#333) [`#333`](https://github.com/GouvernementFR/dsfr/pull/333) + +#### fix(icons): correctif depreciation fr-fi-checkbox-circle-line [DS-2702] (#334) [`#334`](https://github.com/GouvernementFR/dsfr/pull/334) + +#### fix(navigation): correctif focus au clic sur les liens [DS-2677] (#336) [`#336`](https://github.com/GouvernementFR/dsfr/pull/336) + +#### fix(header): correctif espacement liens rapides [DS-2680] (#335) [`#335`](https://github.com/GouvernementFR/dsfr/pull/335) + +#### fix(stepper): cache le détail de la dernière étape en css [DS-2446] (#329) [`#329`](https://github.com/GouvernementFR/dsfr/pull/329) + +#### fix(table): bug ios bordures qui n'apparaissent pas [DS-2186] (#332) [`#332`](https://github.com/GouvernementFR/dsfr/pull/332) + +#### fix(share,, follow): ajout icones réseau sociaux (#324) [`#324`](https://github.com/GouvernementFR/dsfr/pull/324) + +#### fix(follow): correctif de la version legacy deprecated (#326) [`#326`](https://github.com/GouvernementFR/dsfr/pull/326) + +#### chore(deps): mise à jour des dépendances (#325) [`#325`](https://github.com/GouvernementFR/dsfr/pull/325) + +#### feat(stepper): ajout du composant indicateur d'étapes [DS-2446] (#319) [`#319`](https://github.com/GouvernementFR/dsfr/pull/319) + +#### feat(artwork): ajout des pictogrammes illustratifs [DS-2483] (#317) [`#317`](https://github.com/GouvernementFR/dsfr/pull/317) + +#### refactor(core, card, content): ajout utilitaire fr-ratio et aspect-ratio des content img & vid [DS-2543] [DS-2571] (#316) [`#316`](https://github.com/GouvernementFR/dsfr/pull/316) + +#### feat(notice): Ajout du composant bandeau d'information [DS-2014] (#302) [`#302`](https://github.com/GouvernementFR/dsfr/pull/302) + +#### fix(download): couleur puce groupe de lien de téléchargement [DS-246] (#313) [`#313`](https://github.com/GouvernementFR/dsfr/pull/313) + +#### chore(global): migration vers sass dart [DS-1859] (#310) [`#310`](https://github.com/GouvernementFR/dsfr/pull/310) + +#### refactor(global): implémentation du positionnement des icônes en inline [DS-2526] (#320) [`#320`](https://github.com/GouvernementFR/dsfr/pull/320) + +#### refactor(header, link, button, follow, share, tag, badge): correction espacements des groupes [DS-2559] (#311) [`#311`](https://github.com/GouvernementFR/dsfr/pull/311) + +#### fix(sidemenu): changement balise du titre [DS-2508] (#290) [`#290`](https://github.com/GouvernementFR/dsfr/pull/290) + +#### fix(follow): correction link icon déprecié (#306) [`#306`](https://github.com/GouvernementFR/dsfr/pull/306) + +#### fix(core): correction de l'implémentation de $DIST-PATH (#300) [`#300`](https://github.com/GouvernementFR/dsfr/pull/300) + +#### chore: suppression de node-sass-magic-importer (#279) [`#279`](https://github.com/GouvernementFR/dsfr/pull/279) + +## [v1.5.2](https://github.com/GouvernementFR/dsfr/compare/v1.5.1...v1.5.2) - 2022-06-14 + +### Merged + +#### fix(core): correction de l'épaisseur du soulignement des liens (#346) [`#346`](https://github.com/GouvernementFR/dsfr/pull/346) + +#### fix(core): correction du soulignement des liens (#344) [`#344`](https://github.com/GouvernementFR/dsfr/pull/344) + +#### fix(core): correction du text-decoration sur les liens pour les version antérieures (#342) [`#342`](https://github.com/GouvernementFR/dsfr/pull/342) + +#### fix(core): suppression de l'icône lien extérieur sur une balise form [DS-2706] (#339) [`#339`](https://github.com/GouvernementFR/dsfr/pull/339) + +#### fix(link): correctif lien multiligne [DS-2562] (#322) [`#322`](https://github.com/GouvernementFR/dsfr/pull/322) + +#### fix(follow): correction link icon déprecié (#301) [`#301`](https://github.com/GouvernementFR/dsfr/pull/301) + +## [v1.5.1](https://github.com/GouvernementFR/dsfr/compare/v1.5.0...v1.5.1) - 2022-04-26 + +### Merged + +#### docs(utility): description et liens vers la documentation (#299) [`#299`](https://github.com/GouvernementFR/dsfr/pull/299) + +#### fix(icons-system): correction lint (#298) [`#298`](https://github.com/GouvernementFR/dsfr/pull/298) + +#### fix(icons): icônes dépréciées de la v1.4.0 [DS-2541] (#297) [`#297`](https://github.com/GouvernementFR/dsfr/pull/297) + +#### fix(core, utility): icones dépréciées [DS-2541] (#296) [`#296`](https://github.com/GouvernementFR/dsfr/pull/296) + +#### fix(download): correction erreur js legacy [DS-2540] (#292) [`#292`](https://github.com/GouvernementFR/dsfr/pull/292) + +#### fix(dsfr-deprecated): correction du nom de fichier sur le js legacy (#295) [`#295`](https://github.com/GouvernementFR/dsfr/pull/295) + +## [v1.5.0](https://github.com/GouvernementFR/dsfr/compare/v1.4.3...v1.5.0) - 2022-04-21 + +### Merged + +#### fix(download): titre groupe de liens en classe BEM [DS-246] (#289) [`#289`](https://github.com/GouvernementFR/dsfr/pull/289) + +#### fix: contributing.md et readme.md 1.5.0 (#286) [`#286`](https://github.com/GouvernementFR/dsfr/pull/286) + +#### fix: correctif icon alert et globale (#287) [`#287`](https://github.com/GouvernementFR/dsfr/pull/287) + +#### fix(legacy): media query legacy manquante (#285) [`#285`](https://github.com/GouvernementFR/dsfr/pull/285) + +#### fix(download): retrait exemple groupe sm [DS-246] (#284) [`#284`](https://github.com/GouvernementFR/dsfr/pull/284) + +#### fix(download,card): transpilation async et commentaire (#283) [`#283`](https://github.com/GouvernementFR/dsfr/pull/283) + +#### refactor(icon): Ajouts nouvelles icones & séparation en familles [DS-2514] (#280) [`#280`](https://github.com/GouvernementFR/dsfr/pull/280) + +#### feat(download): Ajout du composant téléchargement de fichier [DS-246] [DS-2507] (#272) [`#272`](https://github.com/GouvernementFR/dsfr/pull/272) + +#### fix(connect): correction de la variable de build isStandalone [DS-2528] (#281) [`#281`](https://github.com/GouvernementFR/dsfr/pull/281) + +#### fix(input): correction icone date [DS-2280] (#276) [`#276`](https://github.com/GouvernementFR/dsfr/pull/276) + +#### feat(header): bandeau de site en beta [DS-2417] (#269) [`#269`](https://github.com/GouvernementFR/dsfr/pull/269) + +#### fix(footer): alignement des logos partenaires [DS-2530] (#277) [`#277`](https://github.com/GouvernementFR/dsfr/pull/277) + +#### chore: suppression de node-sass-json-importer (#278) [`#278`](https://github.com/GouvernementFR/dsfr/pull/278) + +#### feat(card): ajout de la fonctionnalité card v2 [DS-2023] (#270) [`#270`](https://github.com/GouvernementFR/dsfr/pull/270) + +#### fix(global): mise à jour des dépendances (#274) [`#274`](https://github.com/GouvernementFR/dsfr/pull/274) + +#### feat(button): changement de la taille des boutons (padding) [DS-2500] (#266) [`#266`](https://github.com/GouvernementFR/dsfr/pull/266) + +#### fix(core): correction liste à puce sur android [DS-2287] (#268) [`#268`](https://github.com/GouvernementFR/dsfr/pull/268) + +#### fix(global): restitution des icones en background + mask [DS-2280] (#256) [`#256`](https://github.com/GouvernementFR/dsfr/pull/256) + +#### fix(core): bug checkbox NVDA - correction du reset appearance [DS-2442] (#252) [`#252`](https://github.com/GouvernementFR/dsfr/pull/252) + +#### refactor(connect): généralisation du build du standalone [DS-2434] (#255) [`#255`](https://github.com/GouvernementFR/dsfr/pull/255) + +## [v1.4.3](https://github.com/GouvernementFR/dsfr/compare/v1.4.2...v1.4.3) - 2022-06-14 + +### Merged + +#### fix(core): correction soulignement des liens (#348) [`#348`](https://github.com/GouvernementFR/dsfr/pull/348) + +#### chore(global): incrémentation du numéro de version (#347) [`#347`](https://github.com/GouvernementFR/dsfr/pull/347) + +## [v1.4.2](https://github.com/GouvernementFR/dsfr/compare/v1.4.1...v1.4.2) - 2022-06-13 + +### Merged + +#### fix(core): suppression de l'icône lien extérieur sur une balise form [DS-2706] (#341) [`#341`](https://github.com/GouvernementFR/dsfr/pull/341) + +## [v1.4.1](https://github.com/GouvernementFR/dsfr/compare/v1.4.0...v1.4.1) - 2022-03-29 + +### Merged + +#### fix(tag): correction tag activable sm et dans un group sm [DS-2491] (#258) [`#258`](https://github.com/GouvernementFR/dsfr/pull/258) + +#### fix(connect): retrait description & ajout target blank [DS-2490] (#261) [`#261`](https://github.com/GouvernementFR/dsfr/pull/261) + +#### fix(follow): correction de la dépréciation pour être plus générique [DS-2484] (#257) [`#257`](https://github.com/GouvernementFR/dsfr/pull/257) + +#### fix(connect): libelle FranceConnect attaché [DS-2479] (#260) [`#260`](https://github.com/GouvernementFR/dsfr/pull/260) + +## [v1.4.0](https://github.com/GouvernementFR/dsfr/compare/v1.3.1...v1.4.0) - 2022-03-16 + +### Merged + +#### fix(display): correction et support des versions dépréciées (#247) [`#247`](https://github.com/GouvernementFR/dsfr/pull/247) + +#### fix(header,follow,content): retours dépréciation [DS-2474] (#241) [`#241`](https://github.com/GouvernementFR/dsfr/pull/241) + +#### fix(sidemenu): correction hauteur & scroll sidemenu sticky [DS-2473] (#243) [`#243`](https://github.com/GouvernementFR/dsfr/pull/243) + +#### fix(navigation): correction affichage mega-menu [DS-2476] (#242) [`#242`](https://github.com/GouvernementFR/dsfr/pull/242) + +#### fix(connect): correction taille du lien en sm [DS-2402] (#239) [`#239`](https://github.com/GouvernementFR/dsfr/pull/239) + +#### feat(global): mise en place de la stratégie de dépréciation des composants [DS-2463] (#237) [`#237`](https://github.com/GouvernementFR/dsfr/pull/237) + +#### fix: corrections des retours dev 1.4.0 [DS-2467] (#240) [`#240`](https://github.com/GouvernementFR/dsfr/pull/240) + +#### fix(connect): retrait du hint text [DS-2402] (#238) [`#238`](https://github.com/GouvernementFR/dsfr/pull/238) + +#### feat(link): Ajout du lien "back to top" [DS-286] (#233) [`#233`](https://github.com/GouvernementFR/dsfr/pull/233) + +#### fix(megamenu): corrige erreur js en mode no-module [DS-2379] (#226) [`#226`](https://github.com/GouvernementFR/dsfr/pull/226) + +#### fix(collapse): corrige le collapse multi-navigateurs [DS-2332] (#227) [`#227`](https://github.com/GouvernementFR/dsfr/pull/227) + +#### fix: templates plus paramétrables [DS-2408][DS-2138] (#221) [`#221`](https://github.com/GouvernementFR/dsfr/pull/221) + +#### feat(footer): ajout d'un sample de footer paramétrable [DS-2132][DS-2408] (#215) [`#215`](https://github.com/GouvernementFR/dsfr/pull/215) + +#### fix(sidemenu): correction hauteur sidemenu sticky [DS-2355] (#223) [`#223`](https://github.com/GouvernementFR/dsfr/pull/223) + +#### fix(modal): <dialog> masqué en no-css [DS-2423] (#230) [`#230`](https://github.com/GouvernementFR/dsfr/pull/230) + +#### fix(tab): correction z-index des tab-panels [DS-2420] (#232) [`#232`](https://github.com/GouvernementFR/dsfr/pull/232) + +#### fix: margin bottom des textes et titres en css prop [DS-2013] (#229) [`#229`](https://github.com/GouvernementFR/dsfr/pull/229) + +#### feat(core): ajout d'icones [DS-2405] (#231) [`#231`](https://github.com/GouvernementFR/dsfr/pull/231) + +#### refactor(global): soulignement des liens et ajout des boutons tertiaires [DS-2022][DS-2427] (#234) [`#234`](https://github.com/GouvernementFR/dsfr/pull/234) + +#### feat(connect): ajout description et lien france connect [DS-2402] (#224) [`#224`](https://github.com/GouvernementFR/dsfr/pull/224) + +#### fix(core, tab, modal, button): injection js de styles en variables css [DS-2409][DS-2373] (#225) [`#225`](https://github.com/GouvernementFR/dsfr/pull/225) + +#### feat(core): variabilisation du core [DS-2315] (#212) [`#212`](https://github.com/GouvernementFR/dsfr/pull/212) + +#### feat(dependencies): mise a jour des dépendances node mineures (#228) [`#228`](https://github.com/GouvernementFR/dsfr/pull/228) + +#### feat(connect): Ajout de la fonctionnalité FranceConnect [DS-551] (#211) [`#211`](https://github.com/GouvernementFR/dsfr/pull/211) + +#### fix(toggle, modal): correction z-index de toggle [DS-2385] (#213) [`#213`](https://github.com/GouvernementFR/dsfr/pull/213) + +#### fix(accordion): a11y retrait des ul li du groupe d'accordéon [DS-2348] (#214) [`#214`](https://github.com/GouvernementFR/dsfr/pull/214) + +#### fix(core): nouvelle fonte Marianne avec correction de l'alignement [DS-1394] (#169) [`#169`](https://github.com/GouvernementFR/dsfr/pull/169) + +## [v1.3.1](https://github.com/GouvernementFR/dsfr/compare/v1.3.0...v1.3.1) - 2022-02-07 + +### Merged + +#### fix(toggle): correction de l'état précoché de l'interrupteur [DS-2392] (#210) [`#210`](https://github.com/GouvernementFR/dsfr/pull/210) + +#### fix(navigation, sidemenu): correction focus coupés [DS-2322][DS-2309][DS-2089] (#204) [`#204`](https://github.com/GouvernementFR/dsfr/pull/204) + +#### chore(deps): mise a jour des dépendances (#209) [`#209`](https://github.com/GouvernementFR/dsfr/pull/209) + +#### fix(checkbox,form, radio,toggle): correction de la gestion de l'attribut checked et de la page d'exemple de form [DS-2376] (#208) [`#208`](https://github.com/GouvernementFR/dsfr/pull/208) + +#### fix(core): correction de la mixin has-icon et has-not-icon [DS-2386] (#205) [`#205`](https://github.com/GouvernementFR/dsfr/pull/205) + +#### fix(core): faute dans le texte alternatif [DS-2153] (#206) [`#206`](https://github.com/GouvernementFR/dsfr/pull/206) + +#### fix(doc): met a jour la doc des templates ejs [DS-1787] (#171) [`#171`](https://github.com/GouvernementFR/dsfr/pull/171) + +#### fix(checkbox,radio,toggle): ajout de l'attribut checked [DS-2376] (#198) [`#198`](https://github.com/GouvernementFR/dsfr/pull/198) + +#### fix: ordre des media query au build css [DS-2381] (#202) [`#202`](https://github.com/GouvernementFR/dsfr/pull/202) + +#### fix(core): correction font-icon descent [DS-2382] (#201) [`#201`](https://github.com/GouvernementFR/dsfr/pull/201) + +#### refactor(alert): alerte dynamique refermable (#199) [`#199`](https://github.com/GouvernementFR/dsfr/pull/199) + +#### feat(alert): ajout exemple dynamique [DS-2368] (#194) [`#194`](https://github.com/GouvernementFR/dsfr/pull/194) + +#### refactor(core): standardisation des icones [DS-2367] (#196) [`#196`](https://github.com/GouvernementFR/dsfr/pull/196) + +#### fix(checkbox): exemple checkbox sup et sub [DS-2041] (#197) [`#197`](https://github.com/GouvernementFR/dsfr/pull/197) + +#### feat(core): ajout du module font-swap [DS-2272] (#195) [`#195`](https://github.com/GouvernementFR/dsfr/pull/195) + +#### fix(toggle): status width [DS-2272] (#193) [`#193`](https://github.com/GouvernementFR/dsfr/pull/193) + +#### fix(toggle, modal): patch 1.3.1 - status width & modal icon aria-hidden (#192) [`#192`](https://github.com/GouvernementFR/dsfr/pull/192) + +## [v1.3.0](https://github.com/GouvernementFR/dsfr/compare/v1.2.1...v1.3.0) - 2022-01-18 + +### Merged + +#### fix(core): icones statut & remix [DS-2371] (#190) [`#190`](https://github.com/GouvernementFR/dsfr/pull/190) + +#### fix(tag): sélectionnable [DS-2105] (#189) [`#189`](https://github.com/GouvernementFR/dsfr/pull/189) + +#### fix(toggle): statut activer/desactiver a11y [DS-2272] (#185) [`#185`](https://github.com/GouvernementFR/dsfr/pull/185) + +#### fix(alert): retrait attribut role='alert' et collapse [DS-2274] (#182) [`#182`](https://github.com/GouvernementFR/dsfr/pull/182) + +#### fix(radio): sup sub exemple [DS-2041] (#188) [`#188`](https://github.com/GouvernementFR/dsfr/pull/188) + +#### fix(follow): texte d'erreur email & centrage alignement icône erreur/valid [DS-2261] (#186) [`#186`](https://github.com/GouvernementFR/dsfr/pull/186) + +#### fix(consent): titre bandeau en h2 [DS-2250] (#187) [`#187`](https://github.com/GouvernementFR/dsfr/pull/187) + +#### chore(deps): mise a jour des dépendances (#184) [`#184`](https://github.com/GouvernementFR/dsfr/pull/184) + +#### fix(link, tag, pagination, share): role & aria link disabled [DS-2274] (#181) [`#181`](https://github.com/GouvernementFR/dsfr/pull/181) + +#### fix(tag): correctif js tag (#180) + + + +* fix(core): correctif js + +* fix(tag): correctif js [`#180`](https://github.com/GouvernementFR/dsfr/pull/180) + +#### fix(core): correctif lint + js (#179) [`#179`](https://github.com/GouvernementFR/dsfr/pull/179) + +#### feat(tag): Ajout des composants tag activable et tag supprimable [DS-2235] (#166) [`#166`](https://github.com/GouvernementFR/dsfr/pull/166) + +#### feat(badge): ajout du composant badge [DS-1921] (#59) [`#59`](https://github.com/GouvernementFR/dsfr/pull/59) + +#### feat(core): Ajout des valeurs d'espacement 0.5v et 1.5v [DS-2246] (#174) [`#174`](https://github.com/GouvernementFR/dsfr/pull/174) + +#### fix: commentaire des textes alternatif des images [DS-2153] (#175) [`#175`](https://github.com/GouvernementFR/dsfr/pull/175) + +#### fix: retours d'accessibilité a11y [DS-2253][DS-2255][DS-2256][DS-2260][DS-2261][DS-2262][DS-2263][DS-2267][DS-2273] (#176) [`#176`](https://github.com/GouvernementFR/dsfr/pull/176) + +#### fix(core): correctif des imports js [DS-2328] (#178) [`#178`](https://github.com/GouvernementFR/dsfr/pull/178) + +#### fix(scheme): ajoute methode de detection du localstorage [DS-2328] (#170) [`#170`](https://github.com/GouvernementFR/dsfr/pull/170) + +#### feat(icon): ajoute la nouvelle font-icon [DS-2327] (#168) [`#168`](https://github.com/GouvernementFR/dsfr/pull/168) + +#### fix(core): correctif du hover des actions (#177) [`#177`](https://github.com/GouvernementFR/dsfr/pull/177) + +#### fix(radio-checkbox): met a jour le style pour les indices et exposants [DS-2041] (#86) [`#86`](https://github.com/GouvernementFR/dsfr/pull/86) + +#### feat(logo): modifie l'intitulé par défaut [DS-2249] (#165) [`#165`](https://github.com/GouvernementFR/dsfr/pull/165) + +#### fix(legacy): retire les polyfills legacy du script module [DS-2304] (#173) [`#173`](https://github.com/GouvernementFR/dsfr/pull/173) + +#### fix(tab): retrait du smooth scroll [DS-2042] (#172) [`#172`](https://github.com/GouvernementFR/dsfr/pull/172) + +#### feat(tab): ajout de l'ombre au scroll & recentrage des boutons [DS-2073] [DS-2042] (#159) [`#159`](https://github.com/GouvernementFR/dsfr/pull/159) + +#### fix(legacy): ie listes et marges [DS-1088] (#154) [`#154`](https://github.com/GouvernementFR/dsfr/pull/154) + +#### fix(tile): background tile [DS-2329] (#167) [`#167`](https://github.com/GouvernementFR/dsfr/pull/167) + +#### feat(tab): ajout modifieur viewport-width [DS-2075] (#142) [`#142`](https://github.com/GouvernementFR/dsfr/pull/142) + +#### fix(tab): corrige le scroll horizontal [DS-2074] (#89) [`#89`](https://github.com/GouvernementFR/dsfr/pull/89) + +#### fix(card): corrige erreur à la compilation (#164) [`#164`](https://github.com/GouvernementFR/dsfr/pull/164) + +#### fix(card): bordure extérieure sur les cartes [DS-2295] (#162) [`#162`](https://github.com/GouvernementFR/dsfr/pull/162) + +#### refactor: nettoyage et simplification du système de couleur [DS-2212] (#160) [`#160`](https://github.com/GouvernementFR/dsfr/pull/160) + +## [v1.2.1](https://github.com/GouvernementFR/dsfr/compare/v1.2.0...v1.2.1) - 2021-11-29 + +### Merged + +#### feat(modal): ajout d'un attribut pour la fermeture au click [DS-2284] (#158) [`#158`](https://github.com/GouvernementFR/dsfr/pull/158) + +#### fix(modal): ajout de l'attribut aria-modal [DS-2281] (#157) [`#157`](https://github.com/GouvernementFR/dsfr/pull/157) + +#### fix(header): allègement hover bloc marque (#155) [`#155`](https://github.com/GouvernementFR/dsfr/pull/155) + +#### refactor: passage du noir et du blanc dans l'échelle des gris [DS-2236] (#156) [`#156`](https://github.com/GouvernementFR/dsfr/pull/156) + +#### fix(modal): accessibilité du focus [DS-2080] (#145) [`#145`](https://github.com/GouvernementFR/dsfr/pull/145) + +#### fix(card-tile): correction hover enlarge-link [DS-2248] (#153) [`#153`](https://github.com/GouvernementFR/dsfr/pull/153) + +#### fix: correction de la version minimum node [DS-2196] (#152) [`#152`](https://github.com/GouvernementFR/dsfr/pull/152) + +#### fix(sidemenu): correction du hover des liens [DS-2230] (#151) [`#151`](https://github.com/GouvernementFR/dsfr/pull/151) + +#### fix(header): corrections css pour IE, valeur initial [DS-1088] (#144) [`#144`](https://github.com/GouvernementFR/dsfr/pull/144) + +#### fix(card-tile): met a jour les noms de class d'accentuation [DS-2227] (#147) [`#147`](https://github.com/GouvernementFR/dsfr/pull/147) + +#### feat(core): ajout meta theme-color dans favicon [DS-2231] (#148) [`#148`](https://github.com/GouvernementFR/dsfr/pull/148) + +#### feat(core): ajout icone filter [DS-2228] (#149) [`#149`](https://github.com/GouvernementFR/dsfr/pull/149) + +#### fix(core): bug js tab conceal [DS-2218] (#150) [`#150`](https://github.com/GouvernementFR/dsfr/pull/150) + +#### feat(sidemenu): ajoute le chevron sur le aria-expanded [DS-2229] (#146) [`#146`](https://github.com/GouvernementFR/dsfr/pull/146) + +#### fix(upload): ajout aria described [DS-2213] (#141) [`#141`](https://github.com/GouvernementFR/dsfr/pull/141) + +#### feat(yarn) : mise à jour des dépendances de développement majeures et mineures [DS-2196] (#143) [`#143`](https://github.com/GouvernementFR/dsfr/pull/143) + +#### fix: hover ajusté dans navigation, consent et summary [DS-2195] [DS-2199] (#140) [`#140`](https://github.com/GouvernementFR/dsfr/pull/140) + +#### fix: bug legacy IE [DS-1088] (#139) [`#139`](https://github.com/GouvernementFR/dsfr/pull/139) + +## [v1.2.0](https://github.com/GouvernementFR/dsfr/compare/v1.1.0...v1.2.0) - 2021-11-17 + +### Merged + +#### fix(table): correction tableau avec bordure gris (#136) [`#136`](https://github.com/GouvernementFR/dsfr/pull/136) + +#### feat(tile): ajout de l'accentuation en usage contrast [DS-2164] (#134) [`#134`](https://github.com/GouvernementFR/dsfr/pull/134) + +#### fix(select): ajout temporaire du chevron (#133) [`#133`](https://github.com/GouvernementFR/dsfr/pull/133) + +#### chore: lint (#132) [`#132`](https://github.com/GouvernementFR/dsfr/pull/132) + +#### fix(inject-svg): ajoute une methode globale sur l'api pour definir legacy [DS-2103] (#127) [`#127`](https://github.com/GouvernementFR/dsfr/pull/127) + +#### fix(footer): couleur catégorie menu [DS-1436] (#131) [`#131`](https://github.com/GouvernementFR/dsfr/pull/131) + +#### fix: correction icon theme-fill (#130) [`#130`](https://github.com/GouvernementFR/dsfr/pull/130) + +#### fix(footer): correction couleur des liens [DS-1436] (#129) [`#129`](https://github.com/GouvernementFR/dsfr/pull/129) + +#### fix(callout): accentuation du background [DS-2181] (#125) [`#125`](https://github.com/GouvernementFR/dsfr/pull/125) + +#### fix(radio): bordure sur la classe radio-rich__img (#122) [`#122`](https://github.com/GouvernementFR/dsfr/pull/122) + +#### fix: correction hover sur lien fil du texte et card [DS-2146][DS-2179] (#128) [`#128`](https://github.com/GouvernementFR/dsfr/pull/128) + +#### fix(card): met a jour le modifier d'accent [DS-2164] (#123) [`#123`](https://github.com/GouvernementFR/dsfr/pull/123) + +#### fix(search): met à jour le reset des boutons et champs de saisie pour Safari [DS-2168] (#115) [`#115`](https://github.com/GouvernementFR/dsfr/pull/115) + +#### fix(display): corrige bouton d'affichage et bug a la selection du mode [DS-2147] [DS-2176] (#119) [`#119`](https://github.com/GouvernementFR/dsfr/pull/119) + +#### fix: correctifs ejs form [DS-1854] (#120) [`#120`](https://github.com/GouvernementFR/dsfr/pull/120) + +#### fix(card): ajoute un modifier d'accentuation [DS-2164] (#121) [`#121`](https://github.com/GouvernementFR/dsfr/pull/121) + +#### refactor(consent): fonctions pour générer l'objet consent (#103) [`#103`](https://github.com/GouvernementFR/dsfr/pull/103) + +#### fix(display): ajoute des attributs d'accessibilité sur les svg [DS-2103] (#118) [`#118`](https://github.com/GouvernementFR/dsfr/pull/118) + +#### fix(summary): correction du token (#117) [`#117`](https://github.com/GouvernementFR/dsfr/pull/117) + +#### feat(modal): mise en place de l'overlay [DS-2101] (#116) [`#116`](https://github.com/GouvernementFR/dsfr/pull/116) + +#### fix: hover radio / retour couleur [DS-2104][DS-2158][DS-2157][DS-2159][DS-2163][DS-2170][DS-2171] (#114) [`#114`](https://github.com/GouvernementFR/dsfr/pull/114) + +#### feat(example): ajoute un bouton fixe pour les parametre d'affichage [DS-2166] (#113) [`#113`](https://github.com/GouvernementFR/dsfr/pull/113) + +#### fix: ejs corrections multiples [DS-1854] (#112) [`#112`](https://github.com/GouvernementFR/dsfr/pull/112) + +#### feat: couleurs accentuation [DS-1183] (#111) [`#111`](https://github.com/GouvernementFR/dsfr/pull/111) + +#### fix: correction ombre table + lint / pa11y (#110) [`#110`](https://github.com/GouvernementFR/dsfr/pull/110) + +#### feat(display): Ajout icones illustratives & thème systeme [DS-2103] (#109) [`#109`](https://github.com/GouvernementFR/dsfr/pull/109) + +#### refactor: restructuration custom props / legacy [DS-2107] (#108) [`#108`](https://github.com/GouvernementFR/dsfr/pull/108) + +#### fix(navigation): espacement catégories mobile (#105) [`#105`](https://github.com/GouvernementFR/dsfr/pull/105) + +#### fix(toggle): espacement composant (#104) [`#104`](https://github.com/GouvernementFR/dsfr/pull/104) + +#### refactor(ejs): ajoute des exemples disabled et checked (#94) [`#94`](https://github.com/GouvernementFR/dsfr/pull/94) + +#### feat(icon): ajout icon logout [DS-2128] (#93) [`#93`](https://github.com/GouvernementFR/dsfr/pull/93) + +#### fix(navigation): nav-link hover sur a et button uniquement [DS-1982] (#68) [`#68`](https://github.com/GouvernementFR/dsfr/pull/68) + +#### fix: margin bottom <p> et <hx> des composants [DS-2013] (#73) [`#73`](https://github.com/GouvernementFR/dsfr/pull/73) + +#### feat(core): ajout du reset de hr [DS-1882] (#60) [`#60`](https://github.com/GouvernementFR/dsfr/pull/60) + +#### fix(upload): disabled input-upload & curseur pointeur (#102) [`#102`](https://github.com/GouvernementFR/dsfr/pull/102) + +#### feat(upload): ajout du composant upload [DS-1918] (#43) [`#43`](https://github.com/GouvernementFR/dsfr/pull/43) + +#### fix(modale): corrige la hauteur de la modale sur desktop [DS-2076] (#80) [`#80`](https://github.com/GouvernementFR/dsfr/pull/80) + +#### fix(consent): ajout d'id aux services (#101) [`#101`](https://github.com/GouvernementFR/dsfr/pull/101) + +#### fix(modal): focus trap avec iframe [DS-2127] (#92) [`#92`](https://github.com/GouvernementFR/dsfr/pull/92) + +#### fix: readme et contributing [DS-2078] (#90) [`#90`](https://github.com/GouvernementFR/dsfr/pull/90) + +#### refactor: inclusion des composants ejs dans locals.nomComposant [DS-1854] (#76) [`#76`](https://github.com/GouvernementFR/dsfr/pull/76) + +#### fix: bouton sidemenu display none / scheme package.yml / fr-input code inutile / table refactor et couleurs (#100) [`#100`](https://github.com/GouvernementFR/dsfr/pull/100) + +#### fix(logo): correction blue-france & mourning (#99) [`#99`](https://github.com/GouvernementFR/dsfr/pull/99) + +#### fix: correction du token art déprécié (#98) [`#98`](https://github.com/GouvernementFR/dsfr/pull/98) + +#### fix: correction des hovers (#97) [`#97`](https://github.com/GouvernementFR/dsfr/pull/97) + +#### Refactor: ajout des tokens artwork (#96) [`#96`](https://github.com/GouvernementFR/dsfr/pull/96) + +#### fix: corrige le lint en l'absence de fichier sass (#95) [`#95`](https://github.com/GouvernementFR/dsfr/pull/95) + +#### Fix(pa11y) : met a jour le scope des tests pa11y [DS-2090] (#85) [`#85`](https://github.com/GouvernementFR/dsfr/pull/85) + +#### refactor(scheme): nouveau système de couleur [DS-1186] (#83) [`#83`](https://github.com/GouvernementFR/dsfr/pull/83) + +#### fix: dsfr license npm [DS-1777] (#82) [`#82`](https://github.com/GouvernementFR/dsfr/pull/82) + +#### fix(sidemenu): bordures en desktop [DS-2077] (#77) [`#77`](https://github.com/GouvernementFR/dsfr/pull/77) + +#### fix(lint): supprime les polyfill du linter eslint [DS-2088] (#84) [`#84`](https://github.com/GouvernementFR/dsfr/pull/84) + +#### Fix: définition d'une valeur par défaut de l'objet de configuration window.dsfr [DS-2085] (#79) [`#79`](https://github.com/GouvernementFR/dsfr/pull/79) + +#### fix: licence.md devient license.md [DS-1777] (#78) [`#78`](https://github.com/GouvernementFR/dsfr/pull/78) + +#### fix(legacy-browser): corrige les erreurs JS sous ie11 [DS-1967] (#72) [`#72`](https://github.com/GouvernementFR/dsfr/pull/72) + +#### fix: correction du package.json [DS-1777] (#74) [`#74`](https://github.com/GouvernementFR/dsfr/pull/74) + +#### fix(api): Bug Modal JS [DS-1996] (#69) [`#69`](https://github.com/GouvernementFR/dsfr/pull/69) + +#### fix: page/pattern dossier vide et npm deploy [DS-1777] (#67) [`#67`](https://github.com/GouvernementFR/dsfr/pull/67) + +#### fix(core): exemple texte taille md [DS-1851] (#71) [`#71`](https://github.com/GouvernementFR/dsfr/pull/71) + +#### feat(core): ajout d'icones [DS-1973] (#65) [`#65`](https://github.com/GouvernementFR/dsfr/pull/65) + +#### feat: ajout d'un robots.txt à la racine de public [DS-1837] (#53) [`#53`](https://github.com/GouvernementFR/dsfr/pull/53) + +#### fix: favicon path (#66) + +dsfr-dev devient dsfr [`#66`](https://github.com/GouvernementFR/dsfr/pull/66) + +#### refactor: modification du gitignore (#62) [`#62`](https://github.com/GouvernementFR/dsfr/pull/62) + +#### fix(core): fr-text devient fr-text--md (#63) [`#63`](https://github.com/GouvernementFR/dsfr/pull/63) + +#### fix(search): correction fr-input--error et fr-input--valid [DS-1937] (#57) [`#57`](https://github.com/GouvernementFR/dsfr/pull/57) + +#### fix(content): Le composant media ne fonctionne pas avec une image svg [DS-1966] (#54) [`#54`](https://github.com/GouvernementFR/dsfr/pull/54) + +#### fix: correction structure dev, retrait underscore dist exemple [DS-1777] (#55) [`#55`](https://github.com/GouvernementFR/dsfr/pull/55) + +#### fix(core): marge sous les textes et titres [DS-1870] (#52) [`#52`](https://github.com/GouvernementFR/dsfr/pull/52) + +#### fix(header): correction semicolon manquant devant last-child (#50) [`#50`](https://github.com/GouvernementFR/dsfr/pull/50) + +#### fix(input): fr-input--error sur un textarea le passe en rouge [DS-1577] (#47) [`#47`](https://github.com/GouvernementFR/dsfr/pull/47) + +#### fix(share): correction espacements des boutons de partage [DS-1961] (#49) [`#49`](https://github.com/GouvernementFR/dsfr/pull/49) + +#### chore: passage au singulier des noms de fichiers et packages [DS-1777] (#45) [`#45`](https://github.com/GouvernementFR/dsfr/pull/45) + +#### refactor(pattern): évolution de la structure pattern, composant, page et du build [DS-1777] (#44) [`#44`](https://github.com/GouvernementFR/dsfr/pull/44) + +#### fix: dynamic js instances et minification (#41) [`#41`](https://github.com/GouvernementFR/dsfr/pull/41) + +#### fix(core): correction font-display (#40) [`#40`](https://github.com/GouvernementFR/dsfr/pull/40) + +#### refactor: implémentation du js dynamique [DS-1372][DS-1540] (#9) [`#9`](https://github.com/GouvernementFR/dsfr/pull/9) + +#### fix(core): text-rendering en optimizeLegibility [DS-1834] (#37) + +* fix(core): text-rendering en optimizeLegibility + +* fix(core): inputs en text rendering optimizeLegibility [`#37`](https://github.com/GouvernementFR/dsfr/pull/37) + +#### fix(core): font-display swap par défaut [DS-1802] (#38) [`#38`](https://github.com/GouvernementFR/dsfr/pull/38) + +## [v1.1.0](https://github.com/GouvernementFR/dsfr/compare/v1.0.0...v1.1.0) - 2021-07-27 + +### Merged + +#### fix(quotes): Suppression du alt de l'image [DS-1929] (#35) [`#35`](https://github.com/GouvernementFR/dsfr/pull/35) + +#### fix(share): correction title désactivé (#34) [`#34`](https://github.com/GouvernementFR/dsfr/pull/34) + +#### fix(doc): maj contributing.md (#33) [`#33`](https://github.com/GouvernementFR/dsfr/pull/33) + +#### fix(checkboxes, radios): input en position absolue [DS-1924] (#31) [`#31`](https://github.com/GouvernementFR/dsfr/pull/31) + +#### fix(share): tailles des popup de partage (#32) [`#32`](https://github.com/GouvernementFR/dsfr/pull/32) + +#### fix(follow): séparateur en box shadow [DS-1915] (#29) [`#29`](https://github.com/GouvernementFR/dsfr/pull/29) + +#### fix(share): correction template ejs et nom du composant [DS-510] (#30) [`#30`](https://github.com/GouvernementFR/dsfr/pull/30) + +#### fix(follow): corrections et nouveau nom composant (#28) [`#28`](https://github.com/GouvernementFR/dsfr/pull/28) + +#### feat: ajout du composant follow (nous suivre) [DS-801][DS-805] (#10) [`#10`](https://github.com/GouvernementFR/dsfr/pull/10) + +#### feat: ajout du composant quotes (citation) [DS-424] (#23) [`#23`](https://github.com/GouvernementFR/dsfr/pull/23) + +#### feat: ajout du composant share (boutons de partage) [DS-510] (#21) [`#21`](https://github.com/GouvernementFR/dsfr/pull/21) + +#### refactor(table): fonctionnement sans js [DS-1687] (#16) [`#16`](https://github.com/GouvernementFR/dsfr/pull/16) + +#### fix(buttons, modal, tabs): correction nouveau nom d'icône (#19) [`#19`](https://github.com/GouvernementFR/dsfr/pull/19) + +#### fix(alerts): Correction texte explicatif (#17) [`#17`](https://github.com/GouvernementFR/dsfr/pull/17) + +#### fix(modal): ajustements et correctifs [DS-1430][DS-1431][DS-1432] (#11) [`#11`](https://github.com/GouvernementFR/dsfr/pull/11) + +#### feat(consent): Ajout du composant gestionnaire de consentement [DS-378] (#12) [`#12`](https://github.com/GouvernementFR/dsfr/pull/12) + +#### feat(alerts): ajout du composant alerts [DS-495] (#7) + +* feat(alerts): style alertes + +* feat(alerts): ajout d'exemples + +* fix(alerts): examples + +* fix(alerts): attributs bouton close + +* fix(alerts): correction snippet + +* fix(alerts): title bem style h6 + +* fix(alerts): margin p, hx et lien documentation [`#7`](https://github.com/GouvernementFR/dsfr/pull/7) + +#### fix(summary): Ajustement de summary avec les nouvelles listes [DS-1813] (#6) + +* fix(summary): Ajustement de summary avec les nouvelles listes + +* doc(summary): Commentaire d'explication sur les nombres utilisés pour créer le décalage de l'hover + +* fix(summary): remplacement du marker par un before sur le lien (support safari + hover) [`#6`](https://github.com/GouvernementFR/dsfr/pull/6) + +#### fix(cards): ordre détail dans le snippet (#8) [`#8`](https://github.com/GouvernementFR/dsfr/pull/8) + +#### fix(core): correction des listes à puces [DS-1461] (#4) + +* fix(core): correction des listes pour un retour à un fonctionnement proche de celui par défaut + +* fix(core): correction espacement des listes + +* fix(core): nettoyage code commenté [`#4`](https://github.com/GouvernementFR/dsfr/pull/4) + +#### fix(radios checkboxes): correction bug windows inversion des nombres [DS-1639] (#5) + +* fix(radios, checkboxes): correction display des labels + +* feat: label checkbox & radios + +* fix: case insensitive flag retiré des sélecteurs d'attribut (non supporté par IE edge) + +Co-authored-by: lab9 <lab9.fr@gmail.com> [`#5`](https://github.com/GouvernementFR/dsfr/pull/5) + +#### fix: contributing (#2) [`#2`](https://github.com/GouvernementFR/dsfr/pull/2) + +## [v1.0.0](https://github.com/GouvernementFR/dsfr/compare/v0.6.0...v1.0.0) - 2021-04-07 + +## [v0.6.0](https://github.com/GouvernementFR/dsfr/compare/v0.5.4-unpublish.0...v0.6.0) - 2021-04-07 + +## [v0.5.4-unpublish.0](https://github.com/GouvernementFR/dsfr/compare/v0.5.3...v0.5.4-unpublish.0) - 2021-03-25 + +## [v0.5.3](https://github.com/GouvernementFR/dsfr/compare/v0.4.0...v0.5.3) - 2021-04-07 + +## [v0.4.0](https://github.com/GouvernementFR/dsfr/compare/v0.3.4...v0.4.0) - 2020-12-17 + +## [v0.3.4](https://github.com/GouvernementFR/dsfr/compare/v0.3.1...v0.3.4) - 2020-11-09 + +## [v0.3.1](https://github.com/GouvernementFR/dsfr/compare/v0.3.0...v0.3.1) - 2020-11-03 + +## [v0.3.0](https://github.com/GouvernementFR/dsfr/compare/v0.2.0...v0.3.0) - 2020-11-03 + +## [v0.2.0](https://github.com/GouvernementFR/dsfr/compare/v0.1.0...v0.2.0) - 2020-10-19 + +## v0.1.0 - 2020-10-19 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aabd51448..90f6868b9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,6 +24,7 @@ Si vous souhaitez contribuer au DSFR, veuillez prendre connaissance des document - [tests Sass](#tests-sass) - [tests Accessibilité](#tests-accessibilité) - [Lint](#lint) + - [Changelog](#changelog) ## Installation ### Installation locale @@ -365,3 +366,21 @@ yarn build --test ``` La configuration est présente dans le fichier `.eslintrc.json`. Elle reprend en grande partie la configuration standard de esLint +#### Changelog +Outil en ligne de commande pour générer un journal des modifications `CHANGELOG.md` à partir des balises git et de l'historique des commits, nous utilisons [Auto-changelog](https://github.com/cookpete/auto-changelog). + +Commande à executer à la racine du projet, `git log` est exécuté en arrière-plan afin d'analyser l'historique des commits, en lançant : + +``` +yarn version +``` + +Il faut ensuite renseigner le numéro de version de la prochaine release : +``` +info Current version: x.x.x +question New version: [X.X.X] +``` + +La configuration est présente dans le fichier `.auto-changelog`. + +La gestion de l'affichage du changelog est présente dans le template [Handlebars](https://handlebarsjs.com/) `changelog-template.hbs`. diff --git a/changelog-template.hbs b/changelog-template.hbs new file mode 100644 index 000000000..eeb656f31 --- /dev/null +++ b/changelog-template.hbs @@ -0,0 +1,40 @@ +# Changelog du Système de design de l’État + +Toutes les modifications notables apportées à ce projet seront documentées dans ce fichier. + +Le format est basé sur [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +et ce projet respecte [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +Pour plus d’informations : [Voir la documentation](https://www.systeme-de-design.gouv.fr/) + +{{#each releases}} + {{#if href}} + ## [{{title}}]({{href}}){{#if tag}} - {{isoDate}}{{/if}} + {{else}} + ## {{title}}{{#if tag}} - {{isoDate}}{{/if}} + {{/if}} + + {{#if summary}} + {{summary}} + {{/if}} + + {{#if merges}} + ### Merged + + {{#each merges}} + #### {{#if commit.breaking}}**Breaking change:** {{/if}}{{commit.message}} {{#if href}}[`#{{id}}`]({{href}}){{/if}} + + {{/each}} + {{/if}} + + {{#if fixes}} + ### Fixed + + {{#each fixes}} + #### {{#if commit.breaking}}**Breaking change:** {{/if}}{{commit.subject}}{{#each fixes}} {{#if href}}[`#{{id}}`]({{href}}){{/if}}{{/each}} + + {{/each}} + {{/if}} + +{{/each}} + diff --git a/doc/Analytics-1.9.1.pdf b/doc/Analytics-1.9.2.pdf similarity index 55% rename from doc/Analytics-1.9.1.pdf rename to doc/Analytics-1.9.2.pdf index 69907afac..ee4b980c5 100644 Binary files a/doc/Analytics-1.9.1.pdf and b/doc/Analytics-1.9.2.pdf differ diff --git a/package.json b/package.json index 58b338343..058ad3dc4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gouvfr/dsfr", - "version": "1.9.1", + "version": "1.9.2", "description": "Système de Design de l'Etat - DSFR", "repository": "git@github.com:GouvernementFR/dsfr.git", "author": "Service d'Information du Gouvernement ", @@ -19,7 +19,8 @@ "release": "node tool/tool.js release", "deploy": "node tool/tool.js deploy", "standalone": "node tool/tool.js standalone", - "serve": "browser-sync start --server --port 8080 --startPath example/" + "serve": "browser-sync start --server --port 8080 --startPath example/", + "version": "auto-changelog -p" }, "files": [ "/dist", @@ -38,6 +39,7 @@ "@commitlint/config-conventional": "^15.0.0", "@rollup/plugin-buble": "^0.21.3", "@rollup/plugin-virtual": "^2.1.0", + "auto-changelog": "^2.4.0", "browser-sync": "^2.27.10", "browserslist": "^4.21.5", "cssnano": "^5.1.15", diff --git a/src/analytics/example/spa/agnostic/index.ejs b/src/analytics/example/spa/agnostic/_index.ejs similarity index 100% rename from src/analytics/example/spa/agnostic/index.ejs rename to src/analytics/example/spa/agnostic/_index.ejs diff --git a/src/analytics/example/spa/angular/_index.ejs b/src/analytics/example/spa/angular/_index.ejs new file mode 100644 index 000000000..319571ce5 --- /dev/null +++ b/src/analytics/example/spa/angular/_index.ejs @@ -0,0 +1,102 @@ + + + + +
+ + + +
+
\ No newline at end of file diff --git a/src/analytics/example/spa/react/index.ejs b/src/analytics/example/spa/react/index.ejs new file mode 100644 index 000000000..de21d99e6 --- /dev/null +++ b/src/analytics/example/spa/react/index.ejs @@ -0,0 +1,116 @@ +
+
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/analytics/example/spa/route.js b/src/analytics/example/spa/route.js new file mode 100644 index 000000000..e69de29bb diff --git a/src/analytics/example/spa/vue/index.ejs b/src/analytics/example/spa/vue/index.ejs new file mode 100644 index 000000000..e6c72364f --- /dev/null +++ b/src/analytics/example/spa/vue/index.ejs @@ -0,0 +1,168 @@ +
+
+
+ + +
+ +

Contenu router view

+ + +
+
+ +

Affichage conditionné (v-if)

+ +
+

Page {{pagination}}

+ +
+
+

Page {{pagination}}

+ +
+ + +
+
+
+
+ + + + \ No newline at end of file diff --git a/src/analytics/i18n/fr.yml b/src/analytics/i18n/fr.yml index 1df3eb7cb..f2ac25380 100644 --- a/src/analytics/i18n/fr.yml +++ b/src/analytics/i18n/fr.yml @@ -5,11 +5,13 @@ subdir: title: Pages attribute: Attributs component: Composants + agnostic: sans framework alert: Alerte (alert) alert-close: Alerte avec bouton de fermeture alert-dynamic: Alerte ajoutée dynamiquement accordion: Accordéon (accordion) accordion-nested: Accordéon imbriqué + angular: Angular (angular) badge: Badge (badge) breadcrumb: Fil d’ariane (breadcrumb) breadcrumb-button: Fil d’ariane avec boutons @@ -46,14 +48,17 @@ subdir: modal-links: Modale avec zone d'action et liens navigation: Navigation principale (navigation) notice: Bandeau d'information (notice) + page: Pages pagination: Pagination (pagination) quote: Citation (quote) radio: Bouton radio (radio) radio-rich: Bouton radio riche + react: React (react) search: Barre de recherche (search) select: Liste déroulante (select) share: Boutons de partage (share) sidemenu: Menu latéral (sidemenu) + spa: Single-page application stepper: Indicateur d'étapes (stepper) summary: Sommaire (summary) tab: Onglets (tab) @@ -69,5 +74,5 @@ subdir: transcription: Transcription (transcription) translate: Sélecteur de langue (translate) upload: Ajout de fichier (upload) - spa: Single-page application - agnostic: sans framework + vue: Vue (vue) + diff --git a/src/analytics/script/analytics/action/action-element.js b/src/analytics/script/analytics/action/action-element.js index 7bdac0ab3..c3758cbc5 100644 --- a/src/analytics/script/analytics/action/action-element.js +++ b/src/analytics/script/analytics/action/action-element.js @@ -73,6 +73,10 @@ class ActionElement { act (data = {}) { if (this._isMuted) return; + if (!this._action) { + requestAnimationFrame(() => this.act(data)); + return; + } queue.appendEndingAction(this._action); } diff --git a/src/analytics/script/analytics/action/action.js b/src/analytics/script/analytics/action/action.js index 5f70770a0..fe4950400 100644 --- a/src/analytics/script/analytics/action/action.js +++ b/src/analytics/script/analytics/action/action.js @@ -99,7 +99,7 @@ class Action { if (this._reference) layer.push('actionref', this._reference); - if (data) layer.push.apply(layer, getParametersLayer({ ...this._parameters, ...data })); + layer.push.apply(layer, getParametersLayer(Object.assign(this._parameters, data || {}))); return layer; } diff --git a/src/analytics/script/analytics/analytics.js b/src/analytics/script/analytics/analytics.js index 63174ce5b..e832c8cbd 100644 --- a/src/analytics/script/analytics/analytics.js +++ b/src/analytics/script/analytics/analytics.js @@ -8,6 +8,7 @@ import PushType from './facade/push-type'; import actions from './action/actions'; import queue from './engine/queue'; import opt from './facade/opt'; +import debug from './facade/debug'; import { Collector } from './engine/collector'; class Analytics { @@ -105,6 +106,14 @@ class Analytics { return this._collector.collection; } + get isDebugging () { + return debug.isActive; + } + + set isDebugging (value) { + debug.isActive = value; + } + push (type, layer) { push(type, layer); } diff --git a/src/analytics/script/analytics/engine/queue.js b/src/analytics/script/analytics/engine/queue.js index e90a6200f..72dcb814f 100644 --- a/src/analytics/script/analytics/engine/queue.js +++ b/src/analytics/script/analytics/engine/queue.js @@ -2,6 +2,7 @@ import PushType from '../facade/push-type.js'; import push from '../facade/push.js'; import renderer from './renderer'; +import api from '../../../api'; const SLICE = 80; @@ -40,13 +41,19 @@ class Queue { } appendStartingAction (action) { - if (this._startingActions.indexOf(action) > -1) return; + if (!action || this._startingActions.indexOf(action) > -1) { + api.inspector.log('appendStartingAction', action, `index: ${this._startingActions.indexOf(action)}`); + return; + } this._startingActions.push(action); this._request(); } appendEndingAction (action) { - if (this._endingActions.indexOf(action) > -1) return; + if (!action || this._endingActions.indexOf(action) > -1) { + api.inspector.log('appendEndingAction', action, `index: ${this._endingActions.indexOf(action)}`); + return; + } this._endingActions.push(action); this._request(); } diff --git a/src/analytics/script/analytics/facade/debug.js b/src/analytics/script/analytics/facade/debug.js new file mode 100644 index 000000000..e768794e1 --- /dev/null +++ b/src/analytics/script/analytics/facade/debug.js @@ -0,0 +1,19 @@ +class Debug { + get debugger () { + return window._oEa; + } + + get isActive () { + if (!this.debugger) return false; + return this.debugger._dbg === '1'; + } + + set isActive (value) { + if (this.isActive === value) return; + this.debugger.debug(value ? 1 : 0); + } +} + +const debug = new Debug(); + +export default debug; diff --git a/src/analytics/script/analytics/facade/init.js b/src/analytics/script/analytics/facade/init.js index 42d329c1f..0a92a5ccf 100644 --- a/src/analytics/script/analytics/facade/init.js +++ b/src/analytics/script/analytics/facade/init.js @@ -13,34 +13,33 @@ class Init { }); } - configure () { - this.pushing(); - if (opt.isDisabled) this._reject(); - else this.load(); - return this._promise; - } - get id () { - if (!this._id) { - let bit = 5381; - for (let i = this._domain.length - 1; i > 0; i--) bit = (bit * 33) ^ this._domain.charCodeAt(i); - bit >>>= 0; - this._id = `_EA_${bit}`; - } return this._id; } get store () { - if (!this._store) { - this._store = []; - this._store.eah = this._domain; - window[this.id] = this._store; - } return this._store; } - pushing () { + configure () { + if (opt.isDisabled) this._reject(); + else this.init(); + return this._promise; + } + + init () { + let bit = 5381; + for (let i = this._domain.length - 1; i > 0; i--) bit = (bit * 33) ^ this._domain.charCodeAt(i); + bit >>>= 0; + this._id = `_EA_${bit}`; + + this._store = []; + this._store.eah = this._domain; + window[this._id] = this._store; + if (!window[PUSH]) window[PUSH] = (...args) => this.store.push(args); + + this.load(); } load () { diff --git a/src/analytics/script/analytics/utils/hierarchy/member.js b/src/analytics/script/analytics/utils/hierarchy/member.js index 1f56623b1..119abc9af 100644 --- a/src/analytics/script/analytics/utils/hierarchy/member.js +++ b/src/analytics/script/analytics/utils/hierarchy/member.js @@ -31,8 +31,8 @@ class Member { } _parseHeadings () { - const selector = Array.from({ length: this._level }, (v, i) => `:scope > h${i + 1}, :scope > * > h${i + 1}`).join(','); - this._headings = [...this._node.querySelectorAll(selector)].filter(heading => (this._target.compareDocumentPosition(heading) & NODE_POSITION) > 0).map(heading => new Heading(heading)).reverse(); + const selector = Array.from({ length: this._level }, (v, i) => `h${i + 1}`).join(','); + this._headings = Array.from(this._node.querySelectorAll(selector)).filter(heading => heading === this._node || heading.parentNode === this._node || (heading.parentNode != null && heading.parentNode.parentNode === this._node)).filter(heading => (this._target.compareDocumentPosition(heading) & NODE_POSITION) > 0).map(heading => new Heading(heading)).reverse(); } _getComponent () { diff --git a/src/analytics/script/integration/component/accordion/accordion-actionee.js b/src/analytics/script/integration/component/accordion/accordion-actionee.js index fc7cceb5f..567c47be3 100644 --- a/src/analytics/script/integration/component/accordion/accordion-actionee.js +++ b/src/analytics/script/integration/component/accordion/accordion-actionee.js @@ -23,14 +23,20 @@ class AccordionActionee extends ComponentActionee { get label () { if (this.wrapper) { const title = this.wrapper.querySelector(AccordionSelector.TITLE); - if (title) return this.getFirstText(title); + if (title) { + const text = this.getFirstText(title); + if (text) return text; + } } const instance = this.element.getInstance('Collapse'); if (instance) { const button = instance.buttons.filter(button => button.isPrimary)[0]; - if (button) return this.getFirstText(button); + if (button) { + const text = this.getFirstText(button); + if (text) return text; + } } - return null; + return 'accordéon'; } get component () { diff --git a/src/analytics/script/integration/component/accordion/accordion-button-actionee.js b/src/analytics/script/integration/component/accordion/accordion-button-actionee.js index 5dd3d3d55..7b5361842 100644 --- a/src/analytics/script/integration/component/accordion/accordion-button-actionee.js +++ b/src/analytics/script/integration/component/accordion/accordion-button-actionee.js @@ -25,7 +25,10 @@ class AccordionButtonActionee extends ComponentActionee { } get label () { - return this.node.textContent.trim(); + const firstText = this.getFirstText(); + if (firstText) return firstText; + + return 'bouton d\'accordéon'; } get component () { diff --git a/src/analytics/script/integration/component/alert/alert-actionee.js b/src/analytics/script/integration/component/alert/alert-actionee.js index a689e50ae..9b86b47aa 100644 --- a/src/analytics/script/integration/component/alert/alert-actionee.js +++ b/src/analytics/script/integration/component/alert/alert-actionee.js @@ -17,9 +17,11 @@ class AlertActionee extends ComponentActionee { get label () { const alertTitle = this.node.querySelector(AlertSelector.TITLE); - if (alertTitle) return this.getFirstText(alertTitle); - - return 'Alerte'; + if (alertTitle) { + const text = this.getFirstText(alertTitle); + if (text) return text; + } + return 'alerte'; } get component () { diff --git a/src/analytics/script/integration/component/badge/badge-actionee.js b/src/analytics/script/integration/component/badge/badge-actionee.js index 8f24f13dd..859e532f4 100644 --- a/src/analytics/script/integration/component/badge/badge-actionee.js +++ b/src/analytics/script/integration/component/badge/badge-actionee.js @@ -15,7 +15,10 @@ class BadgeActionee extends ComponentActionee { } get label () { - return this.getFirstText(); + const firstText = this.getFirstText(); + if (firstText) return firstText; + + return 'Badge'; } get component () { diff --git a/src/analytics/script/integration/component/breadcrumb/breadcrumb-button-actionee.js b/src/analytics/script/integration/component/breadcrumb/breadcrumb-button-actionee.js index d8556afb7..94744ea48 100644 --- a/src/analytics/script/integration/component/breadcrumb/breadcrumb-button-actionee.js +++ b/src/analytics/script/integration/component/breadcrumb/breadcrumb-button-actionee.js @@ -18,7 +18,9 @@ class BreadcrumbButtonActionee extends ComponentActionee { } get label () { - return this.node.textContent.trim(); + const firstText = this.getFirstText(); + if (firstText) return firstText; + return 'voir le fil d\'ariane'; } get component () { diff --git a/src/analytics/script/integration/component/breadcrumb/breadcrumb-link-actionee.js b/src/analytics/script/integration/component/breadcrumb/breadcrumb-link-actionee.js index 2bb4b648c..f2a21457e 100644 --- a/src/analytics/script/integration/component/breadcrumb/breadcrumb-link-actionee.js +++ b/src/analytics/script/integration/component/breadcrumb/breadcrumb-link-actionee.js @@ -19,7 +19,9 @@ class BreadcrumbLinkActionee extends ComponentActionee { } get label () { - return this.node.textContent.trim(); + const firstText = this.getFirstText(); + if (firstText) return firstText; + return 'lien fil d\'ariane'; } get component () { diff --git a/src/analytics/script/integration/component/button/button-actionee.js b/src/analytics/script/integration/component/button/button-actionee.js index 6b123c876..6e295d3ca 100644 --- a/src/analytics/script/integration/component/button/button-actionee.js +++ b/src/analytics/script/integration/component/button/button-actionee.js @@ -23,7 +23,9 @@ class ButtonActionee extends ComponentActionee { } get label () { - return this.getFirstText(); + const firstText = this.getFirstText(); + if (firstText) return firstText; + return 'bouton'; } get component () { diff --git a/src/analytics/script/integration/component/callout/callout-actionee.js b/src/analytics/script/integration/component/callout/callout-actionee.js index 7a96cd3d5..e78cc21c1 100644 --- a/src/analytics/script/integration/component/callout/callout-actionee.js +++ b/src/analytics/script/integration/component/callout/callout-actionee.js @@ -17,9 +17,12 @@ class CalloutActionee extends ComponentActionee { get label () { const calloutTitle = this.node.querySelector(CalloutSelector.TITLE); - if (calloutTitle) return this.getFirstText(calloutTitle); + if (calloutTitle) { + const text = this.getFirstText(calloutTitle); + if (text) return text; + } - return 'Mise en avant'; + return 'mise en avant'; } get component () { diff --git a/src/analytics/script/integration/component/card/card-actionee.js b/src/analytics/script/integration/component/card/card-actionee.js index b01effa0e..f5e60f780 100644 --- a/src/analytics/script/integration/component/card/card-actionee.js +++ b/src/analytics/script/integration/component/card/card-actionee.js @@ -22,23 +22,20 @@ class CardActionee extends ComponentActionee { get label () { const cardTitle = this.node.querySelector(CardSelector.TITLE); - if (cardTitle) return this.getFirstText(cardTitle); + if (cardTitle) { + const text = this.getFirstText(cardTitle); + if (text) return text; + } - const selector = Array.from({ length: 6 }, (v, i) => `h${i + 1}`).join(','); - const headings = this.node.querySelector(selector) ? [...this.node.querySelector(selector)].filter(heading => (this.node.compareDocumentPosition(heading) & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0) : []; - if (headings.length) return headings[0].textContent.trim(); + const heading = this.getHeadingLabel(); + if (heading) return heading; - return null; + return 'carte'; } get component () { return ID; } - - dispose () { - if (this.link) this.link.removeEventListener('click', this.handlingClick, { capture: true }); - super.dispose(); - } } export { CardActionee }; diff --git a/src/analytics/script/integration/component/checkbox/checkbox-actionee.js b/src/analytics/script/integration/component/checkbox/checkbox-actionee.js index a5f67aa65..bfda616e8 100644 --- a/src/analytics/script/integration/component/checkbox/checkbox-actionee.js +++ b/src/analytics/script/integration/component/checkbox/checkbox-actionee.js @@ -19,7 +19,11 @@ class CheckboxActionee extends ComponentActionee { get label () { const label = this.node.parentNode.querySelector(api.internals.ns.selector('label')); - return this.getFirstText(label); + if (label) { + const text = this.getFirstText(label); + if (text) return text; + } + return 'case à cocher'; } get component () { diff --git a/src/analytics/script/integration/component/component-actionee.js b/src/analytics/script/integration/component/component-actionee.js index bbb0bfbb9..3deb7aefd 100644 --- a/src/analytics/script/integration/component/component-actionee.js +++ b/src/analytics/script/integration/component/component-actionee.js @@ -140,25 +140,6 @@ class ComponentActionee extends Actionee { super.dispose(); } - - getFirstText (node) { - if (!node) node = this.node; - if (node.childNodes.length === 0) return ''; - - for (let i = 0; i < node.childNodes.length; i++) { - if (node.childNodes[i].nodeType === Node.TEXT_NODE) { - const text = node.childNodes[i].textContent.trim(); - if (text) return text; - } - } - - for (let i = 0; i < node.childNodes.length; i++) { - const text = this.getFirstText(node.childNodes[i]); - if (text) return text; - } - - return ''; - } } export { ComponentActionee }; diff --git a/src/analytics/script/integration/component/consent/consent-actionee.js b/src/analytics/script/integration/component/consent/consent-actionee.js index 279d0cb09..6f1380349 100644 --- a/src/analytics/script/integration/component/consent/consent-actionee.js +++ b/src/analytics/script/integration/component/consent/consent-actionee.js @@ -11,7 +11,7 @@ class ConsentActionee extends ComponentActionee { } get label () { - return 'Gestionnaire de consentement'; + return 'gestionnaire de consentement'; } get component () { diff --git a/src/analytics/script/integration/component/content/content-actionee.js b/src/analytics/script/integration/component/content/content-actionee.js index 0062a9111..0652e946f 100644 --- a/src/analytics/script/integration/component/content/content-actionee.js +++ b/src/analytics/script/integration/component/content/content-actionee.js @@ -15,26 +15,51 @@ class ContentActionee extends ComponentActionee { this.setImpressionType(); } - get label () { - if (this.getAttribute('aria-label')) return this.getAttribute('aria-label'); - - const selectorImg = this.querySelector(ContentSelector.IMG); - if (selectorImg) { - const contentImg = selectorImg.querySelector('img'); - const labelImg = contentImg.getAttribute('alt') || contentImg.getAttribute('aria-label'); - const contentSvg = selectorImg.querySelector('svg'); - const labelSvg = contentSvg.getAttribute('aria-label') || contentSvg.querySelector('title').textContent.trim(); - if (labelImg && labelImg !== '') return labelImg; - if (labelSvg && labelSvg !== '') return labelSvg; + _getImageLabel () { + const contentImg = this.querySelector(ContentSelector.IMG); + if (!contentImg) return false; + const img = contentImg.getElementsByTagName('img')[0]; + if (img) { + const alt = img.getAttribute('alt'); + if (alt) return alt; + const ariaLabel = img.getAttribute('aria-label'); + if (ariaLabel) return ariaLabel; + } + const svg = contentImg.getElementsByTagName('svg')[0]; + if (svg) { + const ariaLabel = svg.getAttribute('aria-label'); + if (ariaLabel) return ariaLabel; + const title = svg.querySelector('title'); + if (title) { + const textContent = title.textContent; + if (textContent) return textContent.trim(); + } } + return false; + } + + get label () { + const ariaLabel = this.getAttribute('aria-label'); + if (ariaLabel) return ariaLabel; + + const imageLabel = this._getImageLabel(); + if (imageLabel) return imageLabel; - const contentIframe = this.querySelector('iframe'); - if (contentIframe) return contentIframe.getAttribute('title') || contentIframe.getAttribute('aria-label'); + const iframe = this.querySelector('iframe'); + if (iframe) { + const title = iframe.getAttribute('title'); + if (title) return title; + const ariaLabel = iframe.getAttribute('aria-label'); + if (ariaLabel) return ariaLabel; + } - const contentVideo = this.querySelector('video'); - if (contentVideo) return contentVideo.getAttribute('aria-label'); + const video = this.querySelector('video'); + if (video) { + const ariaLabel = video.getAttribute('aria-label'); + if (ariaLabel) return ariaLabel; + } - return 'Contenu média'; + return 'contenu média'; } get component () { diff --git a/src/analytics/script/integration/component/download/download-actionee.js b/src/analytics/script/integration/component/download/download-actionee.js index 383eaad70..a0de04166 100644 --- a/src/analytics/script/integration/component/download/download-actionee.js +++ b/src/analytics/script/integration/component/download/download-actionee.js @@ -16,7 +16,9 @@ class DownloadActionee extends ComponentActionee { } get label () { - return this.getFirstText(); + const text = this.getFirstText(); + if (text) return text; + return 'téléchargement'; } get component () { diff --git a/src/analytics/script/integration/component/follow/follow-actionee.js b/src/analytics/script/integration/component/follow/follow-actionee.js index 2405c8881..ab25dade7 100644 --- a/src/analytics/script/integration/component/follow/follow-actionee.js +++ b/src/analytics/script/integration/component/follow/follow-actionee.js @@ -22,7 +22,7 @@ class FollowActionee extends ComponentActionee { } get label () { - return 'Lettre d\'information et Réseaux Sociaux'; + return 'lettre d\'information et réseaux sociaux'; } get component () { diff --git a/src/analytics/script/integration/component/footer/footer-actionee.js b/src/analytics/script/integration/component/footer/footer-actionee.js index d02493f57..c5785df1a 100644 --- a/src/analytics/script/integration/component/footer/footer-actionee.js +++ b/src/analytics/script/integration/component/footer/footer-actionee.js @@ -15,7 +15,7 @@ class FooterActionee extends ComponentActionee { } get label () { - return 'Pied de page'; + return 'pied de page'; } get component () { diff --git a/src/analytics/script/integration/component/footer/footer-link-actionee.js b/src/analytics/script/integration/component/footer/footer-link-actionee.js index 5364ea73d..8bafc5bd3 100644 --- a/src/analytics/script/integration/component/footer/footer-link-actionee.js +++ b/src/analytics/script/integration/component/footer/footer-link-actionee.js @@ -15,7 +15,10 @@ class FooterLinkActionee extends ComponentActionee { } get label () { - return this.getInteractionLabel(); + const label = this.getInteractionLabel(); + if (label) return label; + + return 'lien pied de page'; } } diff --git a/src/analytics/script/integration/component/header/header-actionee.js b/src/analytics/script/integration/component/header/header-actionee.js index 570ad82e8..1610f5b3e 100644 --- a/src/analytics/script/integration/component/header/header-actionee.js +++ b/src/analytics/script/integration/component/header/header-actionee.js @@ -15,7 +15,7 @@ class HeaderActionee extends ComponentActionee { } get label () { - return 'En-tête'; + return 'en-tête'; } get component () { diff --git a/src/analytics/script/integration/component/highlight/highlight-actionee.js b/src/analytics/script/integration/component/highlight/highlight-actionee.js index 48c3365ff..4b7d41457 100644 --- a/src/analytics/script/integration/component/highlight/highlight-actionee.js +++ b/src/analytics/script/integration/component/highlight/highlight-actionee.js @@ -15,7 +15,7 @@ class HighlightActionee extends ComponentActionee { } get label () { - return 'Mise en exergue'; + return 'mise en exergue'; } get component () { diff --git a/src/analytics/script/integration/component/input/input-actionee.js b/src/analytics/script/integration/component/input/input-actionee.js index f521cffff..ca7a31481 100644 --- a/src/analytics/script/integration/component/input/input-actionee.js +++ b/src/analytics/script/integration/component/input/input-actionee.js @@ -21,9 +21,12 @@ class InputActionee extends ComponentActionee { } get label () { - if (this._label) return this.getFirstText(this._label); + if (this._label) { + const text = this.getFirstText(this._label); + if (text) return text; + } - return 'Champ de saisie'; + return 'champ de saisie'; } get component () { diff --git a/src/analytics/script/integration/component/link/link-actionee.js b/src/analytics/script/integration/component/link/link-actionee.js index 8e92968ef..43a2eea28 100644 --- a/src/analytics/script/integration/component/link/link-actionee.js +++ b/src/analytics/script/integration/component/link/link-actionee.js @@ -16,7 +16,10 @@ class LinkActionee extends ComponentActionee { } get label () { - return this.getFirstText(); + const firstText = this.getFirstText(); + if (firstText) return firstText; + + return 'lien'; } get component () { diff --git a/src/analytics/script/integration/component/modal/modal-actionee.js b/src/analytics/script/integration/component/modal/modal-actionee.js index 6276cbb68..512ec91b4 100644 --- a/src/analytics/script/integration/component/modal/modal-actionee.js +++ b/src/analytics/script/integration/component/modal/modal-actionee.js @@ -20,19 +20,23 @@ class ModalActionee extends ComponentActionee { get label () { const title = this.node.querySelector(ModalSelector.TITLE); - if (title) return title.textContent.trim(); - - const selector = Array.from({ length: 2 }, (v, i) => `h${i + 1}`).join(','); - const headings = this.node.querySelector(selector) ? [...this.node.querySelector(selector)].filter(heading => (this.node.compareDocumentPosition(heading) & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0) : []; + if (title) { + const text = this.getFirstText(title); + if (text) return text; + } - if (headings.length) return headings[0].textContent.trim(); + const heading = this.getHeadingLabel(2); + if (heading) return heading; const instance = this.element.getInstance('Modal'); if (instance) { const button = instance.buttons.filter(button => button.isPrimary)[0]; - return this.getFirstText(button.node); + if (button) { + const text = this.getFirstText(button.node); + if (text) return text; + } } - return null; + return 'modale'; } get component () { diff --git a/src/analytics/script/integration/component/modal/modal-button-actionee.js b/src/analytics/script/integration/component/modal/modal-button-actionee.js index 2f1f3837d..b2d0ff06c 100644 --- a/src/analytics/script/integration/component/modal/modal-button-actionee.js +++ b/src/analytics/script/integration/component/modal/modal-button-actionee.js @@ -25,7 +25,9 @@ class ModalButtonActionee extends ComponentActionee { } get label () { - return this.getFirstText(); + const firstText = this.getFirstText(); + if (firstText) return firstText; + return 'bouton de modale'; } get component () { diff --git a/src/analytics/script/integration/component/navigation/navigation-actionee.js b/src/analytics/script/integration/component/navigation/navigation-actionee.js index 41aaedd39..7ebccf789 100644 --- a/src/analytics/script/integration/component/navigation/navigation-actionee.js +++ b/src/analytics/script/integration/component/navigation/navigation-actionee.js @@ -10,7 +10,7 @@ class NavigationActionee extends ComponentActionee { } get label () { - return 'Navigation'; + return 'navigation'; } } diff --git a/src/analytics/script/integration/component/navigation/navigation-link-actionee.js b/src/analytics/script/integration/component/navigation/navigation-link-actionee.js index a2c6fd979..5608139b8 100644 --- a/src/analytics/script/integration/component/navigation/navigation-link-actionee.js +++ b/src/analytics/script/integration/component/navigation/navigation-link-actionee.js @@ -16,7 +16,10 @@ class NavigationLinkActionee extends ComponentActionee { } get label () { - return this.getFirstText(); + const firstText = this.getFirstText(); + if (firstText) return firstText; + + return 'lien de navigation'; } get component () { diff --git a/src/analytics/script/integration/component/navigation/navigation-section-actionee.js b/src/analytics/script/integration/component/navigation/navigation-section-actionee.js index 21ea4ad8c..298788446 100644 --- a/src/analytics/script/integration/component/navigation/navigation-section-actionee.js +++ b/src/analytics/script/integration/component/navigation/navigation-section-actionee.js @@ -18,15 +18,21 @@ class NavigationSectionActionee extends ComponentActionee { get label () { if (this._wrapper) { const button = this._wrapper.querySelector(NavigationSelector.BUTTON); - if (button) return this.getFirstText(button); + if (button) { + const text = this.getFirstText(button); + if (text) return text; + } } const instance = this.element.getInstance('Collapse'); if (instance) { const button = instance.buttons.filter(button => button.isPrimary)[0]; - if (button) return this.getFirstText(button); + if (button) { + const text = this.getFirstText(button); + if (text) return text; + } } - return null; + return 'section de navigation'; } } diff --git a/src/analytics/script/integration/component/notice/notice-actionee.js b/src/analytics/script/integration/component/notice/notice-actionee.js index 9bdee2b8b..bb8766645 100644 --- a/src/analytics/script/integration/component/notice/notice-actionee.js +++ b/src/analytics/script/integration/component/notice/notice-actionee.js @@ -17,9 +17,12 @@ class NoticeActionee extends ComponentActionee { get label () { const noticeTitle = this.node.querySelector(NoticeSelector.TITLE); - if (noticeTitle) return this.getFirstText(noticeTitle); + if (noticeTitle) { + const firstText = this.getFirstText(noticeTitle); + if (firstText) return firstText; + } - return 'Bandeau information importante'; + return 'bandeau d\'information importante'; } get component () { diff --git a/src/analytics/script/integration/component/pagination/pagination-actionee.js b/src/analytics/script/integration/component/pagination/pagination-actionee.js index eccf83fd5..132ad28fd 100644 --- a/src/analytics/script/integration/component/pagination/pagination-actionee.js +++ b/src/analytics/script/integration/component/pagination/pagination-actionee.js @@ -16,7 +16,9 @@ class PaginationActionee extends ComponentActionee { } get label () { - return this.getFirstText(); + const firstText = this.getFirstText(); + if (firstText) return firstText; + return 'pagination'; } get component () { diff --git a/src/analytics/script/integration/component/quote/quote-actionee.js b/src/analytics/script/integration/component/quote/quote-actionee.js index 02120adf5..942c96e26 100644 --- a/src/analytics/script/integration/component/quote/quote-actionee.js +++ b/src/analytics/script/integration/component/quote/quote-actionee.js @@ -17,10 +17,12 @@ class QuoteActionee extends ComponentActionee { get label () { const blockquote = this.node.querySelector('blockquote'); if (blockquote) { - const quote = this.getFirstText(blockquote); - return quote.length > 50 ? `${quote.substring(0, 35).trim()}[...]` : quote; + const firstText = this.getFirstText(blockquote); + if (firstText) { + return firstText; + } } - return 'Citation'; + return 'citation'; } get component () { diff --git a/src/analytics/script/integration/component/radio/radio-actionee.js b/src/analytics/script/integration/component/radio/radio-actionee.js index 6515287bb..048a9da6e 100644 --- a/src/analytics/script/integration/component/radio/radio-actionee.js +++ b/src/analytics/script/integration/component/radio/radio-actionee.js @@ -23,10 +23,16 @@ class RadioActionee extends ComponentActionee { const fieldset = this.node.closest(FormSelector.FIELDSET); if (fieldset) { const legend = fieldset.querySelector(FormSelector.LEGEND); - if (legend) parts.push(this.getFirstText(legend)); + if (legend) { + const firstTextLegend = this.getFirstText(legend); + if (firstTextLegend) parts.push(firstTextLegend); + } } const label = this.node.parentNode.querySelector(api.internals.ns.selector('label')); - if (label) parts.push(this.getFirstText(label)); + if (label) { + const firstTextLabel = this.getFirstText(label); + if (firstTextLabel) parts.push(firstTextLabel); + } return parts.join(' › '); } diff --git a/src/analytics/script/integration/component/select/select-actionee.js b/src/analytics/script/integration/component/select/select-actionee.js index 0d3f5424e..a5989d578 100644 --- a/src/analytics/script/integration/component/select/select-actionee.js +++ b/src/analytics/script/integration/component/select/select-actionee.js @@ -19,7 +19,12 @@ class SelectActionee extends ComponentActionee { get label () { const label = this.node.parentNode.querySelector(api.internals.ns.selector('label')); - return this.getFirstText(label); + if (label) { + const firstText = this.getFirstText(label); + if (firstText) return firstText; + } + + return 'liste déroulante'; } get component () { diff --git a/src/analytics/script/integration/component/share/share-actionee.js b/src/analytics/script/integration/component/share/share-actionee.js index de3807a86..56e10e7eb 100644 --- a/src/analytics/script/integration/component/share/share-actionee.js +++ b/src/analytics/script/integration/component/share/share-actionee.js @@ -17,8 +17,11 @@ class ShareActionee extends ComponentActionee { get label () { const title = this.querySelector(ShareSelector.TITLE); - if (title) return this.getFirstText(title); - return 'Boutons de partage'; + if (title) { + const firstText = this.getFirstText(title); + if (firstText) return firstText; + } + return 'boutons de partage'; } get component () { diff --git a/src/analytics/script/integration/component/sidemenu/sidemenu-actionee.js b/src/analytics/script/integration/component/sidemenu/sidemenu-actionee.js index 24b9018c0..7d407b42e 100644 --- a/src/analytics/script/integration/component/sidemenu/sidemenu-actionee.js +++ b/src/analytics/script/integration/component/sidemenu/sidemenu-actionee.js @@ -14,10 +14,13 @@ class SidemenuActionee extends ComponentActionee { const sidemenu = this.node.closest(SidemenuSelector.SIDEMENU); if (sidemenu) { const title = sidemenu.querySelector(SidemenuSelector.TITLE); - if (title) return this.getFirstText(title); + if (title) { + const firstText = this.getFirstText(title); + if (firstText) return firstText; + } } - return 'Menu Latéral'; + return 'menu Latéral'; } } diff --git a/src/analytics/script/integration/component/sidemenu/sidemenu-link-actionee.js b/src/analytics/script/integration/component/sidemenu/sidemenu-link-actionee.js index 8db379eac..303916283 100644 --- a/src/analytics/script/integration/component/sidemenu/sidemenu-link-actionee.js +++ b/src/analytics/script/integration/component/sidemenu/sidemenu-link-actionee.js @@ -16,7 +16,10 @@ class SidemenuLinkActionee extends ComponentActionee { } get label () { - return this.node.textContent.trim(); + const firstText = this.getFirstText(); + if (firstText) return firstText; + + return 'lien menu latéral'; } get component () { diff --git a/src/analytics/script/integration/component/sidemenu/sidemenu-section-actionee.js b/src/analytics/script/integration/component/sidemenu/sidemenu-section-actionee.js index b1b66fe7a..c58644963 100644 --- a/src/analytics/script/integration/component/sidemenu/sidemenu-section-actionee.js +++ b/src/analytics/script/integration/component/sidemenu/sidemenu-section-actionee.js @@ -17,14 +17,20 @@ class SidemenuSectionActionee extends ComponentActionee { get label () { if (this._wrapper) { const button = this._wrapper.querySelector(SidemenuSelector.BUTTON); - if (button) return button.textContent.trim(); + if (button) { + const firstText = this.getFirstText(button); + if (firstText) return firstText; + } } const instance = this.element.getInstance('Collapse'); if (instance) { const button = instance.buttons.filter(button => button.isPrimary)[0]; - if (button) return this.getFirstText(button); + if (button) { + const firstTextBtn = this.getFirstText(button); + if (firstTextBtn) return firstTextBtn; + } } - return null; + return 'section menu latéral'; } } diff --git a/src/analytics/script/integration/component/stepper/stepper-actionee.js b/src/analytics/script/integration/component/stepper/stepper-actionee.js index 2285c5c4b..cad3e77e0 100644 --- a/src/analytics/script/integration/component/stepper/stepper-actionee.js +++ b/src/analytics/script/integration/component/stepper/stepper-actionee.js @@ -15,7 +15,7 @@ class StepperActionee extends ComponentActionee { } get label () { - return 'Indicateur d\'étapes'; + return 'indicateur d\'étapes'; } get component () { diff --git a/src/analytics/script/integration/component/summary/summary-actionee.js b/src/analytics/script/integration/component/summary/summary-actionee.js index 0d8b2a1e8..884075c50 100644 --- a/src/analytics/script/integration/component/summary/summary-actionee.js +++ b/src/analytics/script/integration/component/summary/summary-actionee.js @@ -12,8 +12,11 @@ class SummaryActionee extends ComponentActionee { get label () { const title = this.node.querySelector(SummarySelector.TITLE); - if (title) return this.getFirstText(title); - return 'Sommaire'; + if (title) { + const firstText = this.getFirstText(title); + if (firstText) return firstText; + } + return 'sommaire'; } } diff --git a/src/analytics/script/integration/component/summary/summary-link-actionee.js b/src/analytics/script/integration/component/summary/summary-link-actionee.js index 440673f46..592a4b1b3 100644 --- a/src/analytics/script/integration/component/summary/summary-link-actionee.js +++ b/src/analytics/script/integration/component/summary/summary-link-actionee.js @@ -16,7 +16,9 @@ class SummaryLinkActionee extends ComponentActionee { } get label () { - return this.getFirstText(); + const firstText = this.getFirstText(); + if (firstText) return firstText; + return 'lien sommaire'; } get component () { diff --git a/src/analytics/script/integration/component/summary/summary-section-actionee.js b/src/analytics/script/integration/component/summary/summary-section-actionee.js index 34705ab7e..927aea4a2 100644 --- a/src/analytics/script/integration/component/summary/summary-section-actionee.js +++ b/src/analytics/script/integration/component/summary/summary-section-actionee.js @@ -20,7 +20,9 @@ class SummarySectionActionee extends ComponentActionee { get label () { if (!this._link) return null; - return this.getFirstText(this._link); + const firstText = this.getFirstText(this._link); + if (firstText) return firstText; + return 'section sommaire'; } } diff --git a/src/analytics/script/integration/component/tab/tab-actionee.js b/src/analytics/script/integration/component/tab/tab-actionee.js index d6ebbfcbf..5b8584a72 100644 --- a/src/analytics/script/integration/component/tab/tab-actionee.js +++ b/src/analytics/script/integration/component/tab/tab-actionee.js @@ -23,12 +23,18 @@ class TabActionee extends ComponentActionee { const tabs = this.node.closest(api.tab.TabSelector.GROUP); if (tabs) { const tab = tabs.querySelector(`${api.tab.TabSelector.LIST} [aria-controls="${this.id}"]${api.tab.TabSelector.TAB}`); - if (tab) return this.getFirstText(); + if (tab) { + const firstTextTab = this.getFirstText(tab); + if (firstTextTab) return firstTextTab; + } } const button = this._instance.buttons.filter(button => button.isPrimary)[0]; - if (button) return this.getFirstText(button); - return null; + if (button) { + const firstTextBtn = this.getFirstText(button); + if (firstTextBtn) return firstTextBtn; + } + return 'onglet'; } get component () { diff --git a/src/analytics/script/integration/component/tab/tab-button-actionee.js b/src/analytics/script/integration/component/tab/tab-button-actionee.js index 8217f26f0..8cc444189 100644 --- a/src/analytics/script/integration/component/tab/tab-button-actionee.js +++ b/src/analytics/script/integration/component/tab/tab-button-actionee.js @@ -21,7 +21,9 @@ class TabButtonActionee extends ComponentActionee { } get label () { - return this.getFirstText(); + const text = this.getFirstText(); + if (text) return text; + return 'bouton onglet'; } get component () { diff --git a/src/analytics/script/integration/component/table/table-actionee.js b/src/analytics/script/integration/component/table/table-actionee.js index 9c3ee6134..bcefd1b6b 100644 --- a/src/analytics/script/integration/component/table/table-actionee.js +++ b/src/analytics/script/integration/component/table/table-actionee.js @@ -16,8 +16,11 @@ class TableActionee extends ComponentActionee { get label () { const caption = this.node.querySelector('caption'); - if (caption) return this.getFirstText(caption); - return 'Tableau'; + if (caption) { + const firstText = this.getFirstText(caption); + if (firstText) return firstText; + } + return 'tableau'; } get component () { diff --git a/src/analytics/script/integration/component/tag/tag-actionee.js b/src/analytics/script/integration/component/tag/tag-actionee.js index 1688273f9..80b934e11 100644 --- a/src/analytics/script/integration/component/tag/tag-actionee.js +++ b/src/analytics/script/integration/component/tag/tag-actionee.js @@ -33,7 +33,10 @@ class TagActionee extends ComponentActionee { } get label () { - return this.getFirstText(); + const firstText = this.getFirstText(); + if (firstText) return firstText; + + return 'tag'; } get component () { diff --git a/src/analytics/script/integration/component/tile/tile-actionee.js b/src/analytics/script/integration/component/tile/tile-actionee.js index 0b59db452..c1cfbb5ce 100644 --- a/src/analytics/script/integration/component/tile/tile-actionee.js +++ b/src/analytics/script/integration/component/tile/tile-actionee.js @@ -24,21 +24,16 @@ class TileActionee extends ComponentActionee { const tileTitle = this.node.querySelector(TileSelector.TITLE); if (tileTitle) return this.getFirstText(tileTitle); - const selector = Array.from({ length: 6 }, (v, i) => `h${i + 1}`).join(','); - const headings = this.node.querySelector(selector) ? [...this.node.querySelector(selector)].filter(heading => (this.node.compareDocumentPosition(heading) & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0) : []; - if (headings.length) return headings[0].textContent.trim(); + const heading = this.getHeadingLabel(); + if (heading) return heading; - return null; + return 'tuile'; } get component () { return ID; } - dispose () { - if (this.link) this.link.removeEventListener('click', this.handlingClick, { capture: true }); - super.dispose(); - } } export { TileActionee }; diff --git a/src/analytics/script/integration/component/toggle/toggle-actionee.js b/src/analytics/script/integration/component/toggle/toggle-actionee.js index 494b05b40..f67a525cf 100644 --- a/src/analytics/script/integration/component/toggle/toggle-actionee.js +++ b/src/analytics/script/integration/component/toggle/toggle-actionee.js @@ -19,7 +19,12 @@ class ToggleActionee extends ComponentActionee { get label () { const label = this.node.parentNode.querySelector(api.internals.ns.selector('toggle__label')); - return this.getFirstText(label) || 'Interrupteur'; + if (label) { + const firstText = this.getFirstText(label); + if (firstText) return firstText; + } + + return 'interrupteur'; } get component () { diff --git a/src/analytics/script/integration/component/transcription/transcription-actionee.js b/src/analytics/script/integration/component/transcription/transcription-actionee.js index 689cc0864..8362b42c8 100644 --- a/src/analytics/script/integration/component/transcription/transcription-actionee.js +++ b/src/analytics/script/integration/component/transcription/transcription-actionee.js @@ -23,14 +23,20 @@ class TranscriptionActionee extends ComponentActionee { get label () { if (this.wrapper) { const title = this.wrapper.querySelector(TranscriptionSelector.TITLE); - if (title) return this.getFirstText(title); + if (title) { + const firstTextTitle = this.getFirstText(title); + if (firstTextTitle) return firstTextTitle; + } } const instance = this.element.getInstance('Collapse'); if (instance) { const button = instance.buttons.filter(button => button.isPrimary)[0]; - if (button) return this.getFirstText(button); + if (button) { + const firstTextBtn = this.getFirstText(button); + if (firstTextBtn) return firstTextBtn; + } } - return null; + return 'transcription'; } get component () { diff --git a/src/analytics/script/integration/component/transcription/transcription-button-actionee.js b/src/analytics/script/integration/component/transcription/transcription-button-actionee.js index 3ced98245..132fce313 100644 --- a/src/analytics/script/integration/component/transcription/transcription-button-actionee.js +++ b/src/analytics/script/integration/component/transcription/transcription-button-actionee.js @@ -26,7 +26,9 @@ class TranscriptionButtonActionee extends ComponentActionee { } get label () { - return this.node.textContent.trim(); + const text = this.getFirstText(); + if (text) return text; + return 'bouton transcription'; } get component () { diff --git a/src/analytics/script/integration/component/translate/translate-actionee.js b/src/analytics/script/integration/component/translate/translate-actionee.js index 638069829..8a6679e17 100644 --- a/src/analytics/script/integration/component/translate/translate-actionee.js +++ b/src/analytics/script/integration/component/translate/translate-actionee.js @@ -20,7 +20,12 @@ class TranslateActionee extends ComponentActionee { get label () { const button = this.node.querySelector(TranslateSelector.BUTTON); - return button.getAttribute('title') || 'Sélecteur de langue'; + if (button) { + const title = button.getAttribute('title'); + if (title) return title; + } + + return 'sélecteur de langue'; } get component () { diff --git a/src/analytics/script/integration/component/translate/translate-button-actionee.js b/src/analytics/script/integration/component/translate/translate-button-actionee.js index 5eb56e68a..ab6155ff5 100644 --- a/src/analytics/script/integration/component/translate/translate-button-actionee.js +++ b/src/analytics/script/integration/component/translate/translate-button-actionee.js @@ -26,7 +26,9 @@ class TranslateButtonActionee extends ComponentActionee { } get label () { - return this.node.textContent.trim(); + const label = this.getInteractionLabel(); + if (label) return label; + return 'bouton sélecteur de langue'; } get component () { diff --git a/src/analytics/script/integration/component/upload/upload-actionee.js b/src/analytics/script/integration/component/upload/upload-actionee.js index 32b183912..404228a5f 100644 --- a/src/analytics/script/integration/component/upload/upload-actionee.js +++ b/src/analytics/script/integration/component/upload/upload-actionee.js @@ -1,5 +1,5 @@ import { ComponentActionee } from '../component-actionee'; -// import api from '../../../../api.js'; +import api from '../../../../api.js'; import ID from './id'; class UploadActionee extends ComponentActionee { @@ -13,13 +13,17 @@ class UploadActionee extends ComponentActionee { init () { this.setClickType(); - // this._label = this.node.parentNode.querySelector(api.internals.ns.selector('label')); + this._label = this.node.parentNode.querySelector(api.internals.ns.selector('label')); this.listenClick(); } get label () { - // if (this._label) return this._label.textContent.trim(); - return 'Ajout de fichier'; + if (this._label) { + const text = this.getFirstText(this._label); + if (text) return text; + } + + return 'ajout de fichier'; } getData () { diff --git a/src/analytics/script/integration/core/actionee.js b/src/analytics/script/integration/core/actionee.js index ac55bb77d..58d90d464 100644 --- a/src/analytics/script/integration/core/actionee.js +++ b/src/analytics/script/integration/core/actionee.js @@ -148,23 +148,63 @@ class Actionee extends api.core.Instance { if (this._actionElement !== undefined) this._actionElement.act(Object.assign(this._data, data)); } + getFirstText (node) { + if (!node) node = this.node; + if (node.childNodes && node.childNodes.length > 0) { + for (let i = 0; i < node.childNodes.length; i++) { + if (node.childNodes[i].nodeType === Node.TEXT_NODE) { + const text = node.childNodes[i].textContent.trim(); + if (text) { + return this.cropText(text); + } + } + } + + for (let i = 0; i < node.childNodes.length; i++) { + const text = this.getFirstText(node.childNodes[i]); + if (text) { + return this.cropText(text); + } + } + } + return ''; + } + + cropText (text, length = 50) { + return text.length > 50 ? `${text.substring(0, 50).trim()}[...]` : text; + } + getInteractionLabel () { const title = this.getAttribute('title'); - if (title) return title; + if (title) return this.cropText(title); - const content = this.node.textContent.trim(); - if (content) return content; + const text = this.getFirstText(); + if (text) return text; const img = this.node.querySelector('img'); - if (img) return img.getAttribute('alt').trim(); + if (img) { + const alt = img.getAttribute('alt'); + if (alt) return this.cropText(alt); + } return null; } + getHeadingLabel (length = 6) { + const selector = Array.from({ length: length }, (v, i) => `h${i + 1}`).join(','); + const headings = this.node.querySelector(selector) ? [...this.node.querySelector(selector)].filter(heading => (this.node.compareDocumentPosition(heading) & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0) : []; + if (headings.length) { + for (const heading of headings) { + const text = this.getFirstText(heading); + if (text) return text; + } + } + } + detectLevel (node) { if (!node) node = this.node; const selector = Array.from({ length: 6 }, (v, i) => `h${i + 1}`).join(','); - const levels = [...node.querySelectorAll(selector)].map(heading => Number(heading.tagName.charAt(1))); + const levels = Array.from(node.querySelectorAll(selector)).map(heading => Number(heading.tagName.charAt(1))); if (levels.length) this._level = Math.min.apply(null, levels) - 1; } diff --git a/src/legacy/script/index.js b/src/legacy/script/index.js index a2dd139f4..bd514c090 100644 --- a/src/legacy/script/index.js +++ b/src/legacy/script/index.js @@ -5,6 +5,16 @@ import './polyfill-io/add-event-listener-polyfill.min'; import './polyfill-io/foreach-polyfill.min'; import './polyfill-io/contains-polyfill.min'; import './polyfill-io/matches-polyfill.min'; +import './polyfill-io/promise-polyfill.min'; +import './polyfill-io/array-from-polyfill.min'; +import './polyfill-io/array-prototype-flat-polyfill.min'; +import './polyfill-io/object-assign-polyfill.min'; +import './polyfill-io/object-entries-polyfill.min'; +import './polyfill-io/object-from-entries-polyfill.min'; +import './polyfill-io/object-values-polyfill.min'; +import './polyfill-io/object-get-own-property-symbols-polyfill.min'; +import './polyfill-io/element-prototype-closest-polyfill.min'; +import './polyfill-io/url-search-params-polyfill.min'; // import { ObjectFitPolyfill } from './object-fit-polyfill/object-fit-polyfill'; diff --git a/src/legacy/script/polyfill-io/array-from-polyfill.min.js b/src/legacy/script/polyfill-io/array-from-polyfill.min.js new file mode 100644 index 000000000..9fed7c976 --- /dev/null +++ b/src/legacy/script/polyfill-io/array-from-polyfill.min.js @@ -0,0 +1,4 @@ +/* Polyfill service v3.111.0 + * Disable minification (remove `.min` from URL path) for more info */ + +(function(self, undefined) {function ArrayCreate(r){if(1/r==-Infinity&&(r=0),r>Math.pow(2,32)-1)throw new RangeError("Invalid array length");var n=[];return n.length=r,n}function Call(t,l){var n=arguments.length>2?arguments[2]:[];if(!1===IsCallable(t))throw new TypeError(Object.prototype.toString.call(t)+"is not a function.");return t.apply(l,n)}function CreateDataProperty(e,r,t){var a={value:t,writable:!0,enumerable:!0,configurable:!0};try{return Object.defineProperty(e,r,a),!0}catch(n){return!1}}function CreateDataPropertyOrThrow(t,r,o){var e=CreateDataProperty(t,r,o);if(!e)throw new TypeError("Cannot assign value `"+Object.prototype.toString.call(o)+"` to property `"+Object.prototype.toString.call(r)+"` on object `"+Object.prototype.toString.call(t)+"`");return e}function CreateMethodProperty(e,r,t){var a={value:t,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(e,r,a)}CreateMethodProperty(Object,"keys",function(){"use strict";function t(){var t;try{t=Object.create({})}catch(r){return!0}return o.call(t,"__proto__")}function r(t){var r=n.call(t),e="[object Arguments]"===r;return e||(e="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),e}var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=Object.prototype.propertyIsEnumerable,c=!o.call({toString:null},"toString"),l=o.call(function(){},"prototype"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(t){var r=t.constructor;return r&&r.prototype===t},a={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!a["$"+t]&&e.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{u(window[t])}catch(r){return!0}}catch(r){return!0}return!1}(),p=function(t){if("undefined"==typeof window||!f)return u(t);try{return u(t)}catch(r){return!1}};return function s(o){var u="[object Function]"===n.call(o),a=r(o),f="[object String]"===n.call(o),s=[];if(o===undefined||null===o)throw new TypeError("Cannot convert undefined or null to object");var y=l&&u;if(f&&o.length>0&&!e.call(o,0))for(var h=0;h0)for(var g=0;g2?arguments[2]:r,o=arguments.length>1?arguments[1]:[];if(!IsConstructor(r))throw new TypeError("F must be a constructor.");if(!IsConstructor(t))throw new TypeError("newTarget must be a constructor.");if(t===r)return new(Function.prototype.bind.apply(r,[null].concat(o)));var n=OrdinaryCreateFromConstructor(t,Object.prototype);return Call(r,n,o)}function IteratorClose(r,t){if("object"!==Type(r["[[Iterator]]"]))throw new Error(Object.prototype.toString.call(r["[[Iterator]]"])+"is not an Object.");var e=r["[[Iterator]]"],o=GetMethod(e,"return");if(o===undefined)return t;try{var n=Call(o,e)}catch(c){var a=c}if(t)return t;if(a)throw a;if("object"!==Type(n))throw new TypeError("Iterator's return method returned a non-object.");return t}function IteratorComplete(t){if("object"!==Type(t))throw new Error(Object.prototype.toString.call(t)+"is not an Object.");return ToBoolean(Get(t,"done"))}function IteratorNext(t){if(arguments.length<2)var e=Call(t["[[NextMethod]]"],t["[[Iterator]]"]);else e=Call(t["[[NextMethod]]"],t["[[Iterator]]"],[arguments[1]]);if("object"!==Type(e))throw new TypeError("bad iterator");return e}function IteratorStep(t){var r=IteratorNext(t);return!0!==IteratorComplete(r)&&r}function IteratorValue(t){if("object"!==Type(t))throw new Error(Object.prototype.toString.call(t)+"is not an Object.");return Get(t,"value")}function OrdinaryToPrimitive(r,t){if("string"===t)var e=["toString","valueOf"];else e=["valueOf","toString"];for(var i=0;i1?arguments[1]:undefined;if("object"===Type(e)){if(arguments.length<2)var i="default";else t===String?i="string":t===Number&&(i="number");var r="function"==typeof self.Symbol&&"symbol"==typeof self.Symbol.toPrimitive?GetMethod(e,self.Symbol.toPrimitive):undefined;if(r!==undefined){var n=Call(r,e,[i]);if("object"!==Type(n))return n;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===i&&(i="number"),OrdinaryToPrimitive(e,i)}return e}function ToString(t){switch(Type(t)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return ToString(ToPrimitive(t,String));default:return String(t)}}CreateMethodProperty(Array.prototype,"includes",function e(r){"use strict";var t=ToObject(this),o=ToLength(Get(t,"length"));if(0===o)return!1;var n=ToInteger(arguments[1]);if(n>=0)var a=n;else(a=o+n)<0&&(a=0);for(;a1?arguments[1]:GetMethod(t,Symbol.iterator),r=Call(e,t);if("object"!==Type(r))throw new TypeError("bad iterator");var o=GetV(r,"next"),a=Object.create(null);return a["[[Iterator]]"]=r,a["[[NextMethod]]"]=o,a["[[Done]]"]=!1,a}Object.defineProperty(Symbol,"species",{value:Symbol("species")});!function(e){function t(e,t){if("object"!==Type(e))throw new TypeError("createMapIterator called on incompatible receiver "+Object.prototype.toString.call(e));if(!0!==e._es6Map)throw new TypeError("createMapIterator called on incompatible receiver "+Object.prototype.toString.call(e));var r=Object.create(u);return Object.defineProperty(r,"[[Map]]",{configurable:!0,enumerable:!1,writable:!0,value:e}),Object.defineProperty(r,"[[MapNextIndex]]",{configurable:!0,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"[[MapIterationKind]]",{configurable:!0,enumerable:!1,writable:!0,value:t}),r}var r=function(){try{var e={};return Object.defineProperty(e,"t",{configurable:!0,enumerable:!1,get:function(){return!0},set:undefined}),!!e.t}catch(t){return!1}}(),o=0,a=Symbol("meta_"+(1e8*Math.random()+"").replace(".","")),n=function(e){if("object"==typeof e?null!==e:"function"==typeof e){if(!Object.isExtensible(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,a)){var t=typeof e+"-"+ ++o;Object.defineProperty(e,a,{configurable:!1,enumerable:!1,writable:!1,value:t})}return e[a]}return""+e},i=function(e,t){var r=n(t);if(!1===r)return p(e,t);var o=e._table[r];return o!==undefined&&o},p=function(e,t){for(var r=0;r0?arguments[0]:undefined;if(null===t||t===undefined)return e;var o=e.set;if(!IsCallable(o))throw new TypeError("Map.prototype.set is not a function");try{for(var a=GetIterator(t);;){var n=IteratorStep(a);if(!1===n)return e;var i=IteratorValue(n);if("object"!==Type(i))try{throw new TypeError("Iterator value "+i+" is not an entry object")}catch(u){return IteratorClose(a,u)}try{var p=i[0],l=i[1];o.call(e,p,l)}catch(s){return IteratorClose(a,s)}}}catch(s){if(Array.isArray(t)||"[object Arguments]"===Object.prototype.toString.call(t)||t.callee){var c,y=t.length;for(c=0;c0?arguments[0]:undefined;if(null===t||t===undefined)return e;var o=e.add;if(!IsCallable(o))throw new TypeError("Set.prototype.add is not a function");try{for(var n=GetIterator(t);;){var a=IteratorStep(n);if(!1===a)return e;var i=IteratorValue(a);try{o.call(e,i)}catch(y){return IteratorClose(n,y)}}}catch(y){if(!Array.isArray(t)&&"[object Arguments]"!==Object.prototype.toString.call(t)&&!t.callee)throw y;var l,p=t.length;for(l=0;l1?arguments[1]:undefined;if(a===undefined)var n=!1;else{if(!1===IsCallable(a))throw new TypeError(Object.prototype.toString.call(a)+" is not a function.");var i=arguments.length>2?arguments[2]:undefined;if(i!==undefined)var l=i;else l=undefined;n=!0}var u=GetMethod(t,Symbol.iterator);if(u!==undefined){if(IsConstructor(o))var f=Construct(o);else f=ArrayCreate(0);for(var c=GetIterator(t,u),s=0;;){if(s>=Math.pow(2,53)-1){var h=new TypeError("Iteration count can not be greater than or equal 9007199254740991.");return IteratorClose(c,h)}var y=ToString(s),C=IteratorStep(c);if(!1===C)return f.length=s,f;var g=IteratorValue(C);if(n)try{var p=Call(a,l,[g,s])}catch(b){return IteratorClose(c,b)}else p=g;try{CreateDataPropertyOrThrow(f,y,p)}catch(b){return IteratorClose(c,b)}s+=1}}if(r(t))var v=e.call(t,/[\uD800-\uDBFF][\uDC00-\uDFFF]?|[^\uD800-\uDFFF]|./g)||[];else v=ToObject(t);var d=ToLength(Get(v,"length"));for(f=IsConstructor(o)?Construct(o,[d]):ArrayCreate(d),s=0;sMath.pow(2,32)-1)throw new RangeError("Invalid array length");var n=[];return n.length=r,n}function Call(t,l){var n=arguments.length>2?arguments[2]:[];if(!1===IsCallable(t))throw new TypeError(Object.prototype.toString.call(t)+"is not a function.");return t.apply(l,n)}function CreateDataProperty(e,r,t){var a={value:t,writable:!0,enumerable:!0,configurable:!0};try{return Object.defineProperty(e,r,a),!0}catch(n){return!1}}function CreateDataPropertyOrThrow(t,r,o){var e=CreateDataProperty(t,r,o);if(!e)throw new TypeError("Cannot assign value `"+Object.prototype.toString.call(o)+"` to property `"+Object.prototype.toString.call(r)+"` on object `"+Object.prototype.toString.call(t)+"`");return e}function CreateMethodProperty(e,r,t){var a={value:t,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(e,r,a)}function Get(n,t){return n[t]}function HasProperty(n,r){return r in n}function IsArray(r){return"[object Array]"===Object.prototype.toString.call(r)}function IsCallable(n){return"function"==typeof n}function ToObject(e){if(null===e||e===undefined)throw TypeError();return Object(e)}function GetV(t,e){return ToObject(t)[e]}function GetMethod(e,n){var r=GetV(e,n);if(null===r||r===undefined)return undefined;if(!1===IsCallable(r))throw new TypeError("Method not callable: "+n);return r}function Type(e){switch(typeof e){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";default:return null===e?"null":"Symbol"in self&&(e instanceof self.Symbol||e.constructor===self.Symbol)?"symbol":"object"}}function GetPrototypeFromConstructor(t,o){var r=Get(t,"prototype");return"object"!==Type(r)&&(r=o),r}function OrdinaryCreateFromConstructor(r,e){var t=arguments[2]||{},o=GetPrototypeFromConstructor(r,e),a=Object.create(o);for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&Object.defineProperty(a,n,{configurable:!0,enumerable:!1,writable:!0,value:t[n]});return a}function IsConstructor(t){return"object"===Type(t)&&("function"==typeof t&&!!t.prototype)}function Construct(r){var t=arguments.length>2?arguments[2]:r,o=arguments.length>1?arguments[1]:[];if(!IsConstructor(r))throw new TypeError("F must be a constructor.");if(!IsConstructor(t))throw new TypeError("newTarget must be a constructor.");if(t===r)return new(Function.prototype.bind.apply(r,[null].concat(o)));var n=OrdinaryCreateFromConstructor(t,Object.prototype);return Call(r,n,o)}function ArraySpeciesCreate(e,r){if(0===r&&1/r==-Infinity&&(r=0),!1===IsArray(e))return ArrayCreate(r);var n=Get(e,"constructor");if("object"===Type(n)&&null===(n="Symbol"in self&&"species"in self.Symbol?Get(n,self.Symbol.species):undefined)&&(n=undefined),n===undefined)return ArrayCreate(r);if(!IsConstructor(n))throw new TypeError("C must be a constructor");return Construct(n,[r])}function OrdinaryToPrimitive(r,t){if("string"===t)var e=["toString","valueOf"];else e=["valueOf","toString"];for(var i=0;i1?arguments[1]:undefined;if("object"===Type(e)){if(arguments.length<2)var i="default";else t===String?i="string":t===Number&&(i="number");var r="function"==typeof self.Symbol&&"symbol"==typeof self.Symbol.toPrimitive?GetMethod(e,self.Symbol.toPrimitive):undefined;if(r!==undefined){var n=Call(r,e,[i]);if("object"!==Type(n))return n;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===i&&(i="number"),OrdinaryToPrimitive(e,i)}return e}function ToString(t){switch(Type(t)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return ToString(ToPrimitive(t,String));default:return String(t)}}function FlattenIntoArray(r,t,e,a,n){for(var o=arguments[5],i=arguments[6],l=a,g=0;g0&&(f=IsArray(y)),!0===f){l=FlattenIntoArray(r,y,ToLength(Get(y,"length")),l,n-1)}else{if(l>=Math.pow(2,53)-1)throw new TypeError("targetIndex is greater than or equal to 2^53-1");CreateDataPropertyOrThrow(r,ToString(l),y),l+=1}}g+=1}return l}CreateMethodProperty(Array.prototype,"flat",function t(){"use strict";var t=arguments[0],e=ToObject(this),r=ToLength(Get(e,"length")),o=1;void 0!==t&&(o=ToInteger(t));var a=ArraySpeciesCreate(e,0);return FlattenIntoArray(a,e,r,0,o),a});})('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); diff --git a/src/legacy/script/polyfill-io/element-prototype-closest-polyfill.min.js b/src/legacy/script/polyfill-io/element-prototype-closest-polyfill.min.js new file mode 100644 index 000000000..244a630a7 --- /dev/null +++ b/src/legacy/script/polyfill-io/element-prototype-closest-polyfill.min.js @@ -0,0 +1,4 @@ +/* Polyfill service v3.111.0 + * Disable minification (remove `.min` from URL path) for more info */ + +(function(self, undefined) {Element.prototype.matches=Element.prototype.webkitMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.mozMatchesSelector||function e(t){for(var o=this,r=(o.document||o.ownerDocument).querySelectorAll(t),c=0;r[c]&&r[c]!==o;)++c;return!!r[c]};Element.prototype.closest=function e(n){for(var t=this;t;){if(t.matches(n))return t;t="SVGElement"in window&&t instanceof SVGElement?t.parentNode:t.parentElement}return null};})('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); \ No newline at end of file diff --git a/src/legacy/script/polyfill-io/object-assign-polyfill.min.js b/src/legacy/script/polyfill-io/object-assign-polyfill.min.js new file mode 100644 index 000000000..61bc68618 --- /dev/null +++ b/src/legacy/script/polyfill-io/object-assign-polyfill.min.js @@ -0,0 +1,4 @@ +/* Polyfill service v3.111.0 + * Disable minification (remove `.min` from URL path) for more info */ + +(function(self, undefined) {function Call(t,l){var n=arguments.length>2?arguments[2]:[];if(!1===IsCallable(t))throw new TypeError(Object.prototype.toString.call(t)+"is not a function.");return t.apply(l,n)}function CreateMethodProperty(e,r,t){var a={value:t,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(e,r,a)}CreateMethodProperty(Object,"keys",function(){"use strict";function t(){var t;try{t=Object.create({})}catch(r){return!0}return o.call(t,"__proto__")}function r(t){var r=n.call(t),e="[object Arguments]"===r;return e||(e="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),e}var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=Object.prototype.propertyIsEnumerable,c=!o.call({toString:null},"toString"),l=o.call(function(){},"prototype"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(t){var r=t.constructor;return r&&r.prototype===t},a={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!a["$"+t]&&e.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{u(window[t])}catch(r){return!0}}catch(r){return!0}return!1}(),p=function(t){if("undefined"==typeof window||!f)return u(t);try{return u(t)}catch(r){return!1}};return function s(o){var u="[object Function]"===n.call(o),a=r(o),f="[object String]"===n.call(o),s=[];if(o===undefined||null===o)throw new TypeError("Cannot convert undefined or null to object");var y=l&&u;if(f&&o.length>0&&!e.call(o,0))for(var h=0;h0)for(var g=0;g1?arguments[1]:undefined;if("object"===Type(e)){if(arguments.length<2)var i="default";else t===String?i="string":t===Number&&(i="number");var r="function"==typeof self.Symbol&&"symbol"==typeof self.Symbol.toPrimitive?GetMethod(e,self.Symbol.toPrimitive):undefined;if(r!==undefined){var n=Call(r,e,[i]);if("object"!==Type(n))return n;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===i&&(i="number"),OrdinaryToPrimitive(e,i)}return e}function ToString(t){switch(Type(t)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return ToString(ToPrimitive(t,String));default:return String(t)}}function ToPropertyKey(r){var i=ToPrimitive(r,String);return"symbol"===Type(i)?i:ToString(i)}!function(){var e=Object.getOwnPropertyDescriptor,t=function(){try{return 1===Object.defineProperty(document.createElement("div"),"one",{get:function(){return 1}}).one}catch(e){return!1}},r={}.toString,n="".split;CreateMethodProperty(Object,"getOwnPropertyDescriptor",function c(o,i){var a=ToObject(o);a=("string"===Type(a)||a instanceof String)&&"[object String]"==r.call(o)?n.call(o,""):Object(o);var u=ToPropertyKey(i);if(t)try{return e(a,u)}catch(l){}if(HasOwnProperty(a,u))return{enumerable:!0,configurable:!0,writable:!0,value:a[u]}})}();CreateMethodProperty(Object,"assign",function e(t,r){var n=ToObject(t);if(1===arguments.length)return n;var o,c,a,l,i=Array.prototype.slice.call(arguments,1);for(o=0;o2?arguments[2]:[];if(!1===IsCallable(t))throw new TypeError(Object.prototype.toString.call(t)+"is not a function.");return t.apply(l,n)}function CreateMethodProperty(e,r,t){var a={value:t,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(e,r,a)}CreateMethodProperty(Object,"keys",function(){"use strict";function t(){var t;try{t=Object.create({})}catch(r){return!0}return o.call(t,"__proto__")}function r(t){var r=n.call(t),e="[object Arguments]"===r;return e||(e="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),e}var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=Object.prototype.propertyIsEnumerable,c=!o.call({toString:null},"toString"),l=o.call(function(){},"prototype"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(t){var r=t.constructor;return r&&r.prototype===t},a={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!a["$"+t]&&e.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{u(window[t])}catch(r){return!0}}catch(r){return!0}return!1}(),p=function(t){if("undefined"==typeof window||!f)return u(t);try{return u(t)}catch(r){return!1}};return function s(o){var u="[object Function]"===n.call(o),a=r(o),f="[object String]"===n.call(o),s=[];if(o===undefined||null===o)throw new TypeError("Cannot convert undefined or null to object");var y=l&&u;if(f&&o.length>0&&!e.call(o,0))for(var h=0;h0)for(var g=0;g1?arguments[1]:undefined;if("object"===Type(e)){if(arguments.length<2)var i="default";else t===String?i="string":t===Number&&(i="number");var r="function"==typeof self.Symbol&&"symbol"==typeof self.Symbol.toPrimitive?GetMethod(e,self.Symbol.toPrimitive):undefined;if(r!==undefined){var n=Call(r,e,[i]);if("object"!==Type(n))return n;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===i&&(i="number"),OrdinaryToPrimitive(e,i)}return e}function ToString(t){switch(Type(t)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return ToString(ToPrimitive(t,String));default:return String(t)}}function ToPropertyKey(r){var i=ToPrimitive(r,String);return"symbol"===Type(i)?i:ToString(i)}!function(){var e=Object.getOwnPropertyDescriptor,t=function(){try{return 1===Object.defineProperty(document.createElement("div"),"one",{get:function(){return 1}}).one}catch(e){return!1}},r={}.toString,n="".split;CreateMethodProperty(Object,"getOwnPropertyDescriptor",function c(o,i){var a=ToObject(o);a=("string"===Type(a)||a instanceof String)&&"[object String]"==r.call(o)?n.call(o,""):Object(o);var u=ToPropertyKey(i);if(t)try{return e(a,u)}catch(l){}if(HasOwnProperty(a,u))return{enumerable:!0,configurable:!0,writable:!0,value:a[u]}})}();function EnumerableOwnProperties(e,r){for(var t=Object.keys(e),n=[],s=t.length,a=0;a2?arguments[2]:[];if(!1===IsCallable(t))throw new TypeError(Object.prototype.toString.call(t)+"is not a function.");return t.apply(l,n)}function CreateDataProperty(e,r,t){var a={value:t,writable:!0,enumerable:!0,configurable:!0};try{return Object.defineProperty(e,r,a),!0}catch(n){return!1}}function CreateDataPropertyOrThrow(t,r,o){var e=CreateDataProperty(t,r,o);if(!e)throw new TypeError("Cannot assign value `"+Object.prototype.toString.call(o)+"` to property `"+Object.prototype.toString.call(r)+"` on object `"+Object.prototype.toString.call(t)+"`");return e}function CreateMethodProperty(e,r,t){var a={value:t,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(e,r,a)}CreateMethodProperty(Object,"keys",function(){"use strict";function t(){var t;try{t=Object.create({})}catch(r){return!0}return o.call(t,"__proto__")}function r(t){var r=n.call(t),e="[object Arguments]"===r;return e||(e="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),e}var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=Object.prototype.propertyIsEnumerable,c=!o.call({toString:null},"toString"),l=o.call(function(){},"prototype"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(t){var r=t.constructor;return r&&r.prototype===t},a={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!a["$"+t]&&e.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{u(window[t])}catch(r){return!0}}catch(r){return!0}return!1}(),p=function(t){if("undefined"==typeof window||!f)return u(t);try{return u(t)}catch(r){return!1}};return function s(o){var u="[object Function]"===n.call(o),a=r(o),f="[object String]"===n.call(o),s=[];if(o===undefined||null===o)throw new TypeError("Cannot convert undefined or null to object");var y=l&&u;if(f&&o.length>0&&!e.call(o,0))for(var h=0;h0)for(var g=0;g1?arguments[1]:undefined;if("object"===Type(e)){if(arguments.length<2)var i="default";else t===String?i="string":t===Number&&(i="number");var r="function"==typeof self.Symbol&&"symbol"==typeof self.Symbol.toPrimitive?GetMethod(e,self.Symbol.toPrimitive):undefined;if(r!==undefined){var n=Call(r,e,[i]);if("object"!==Type(n))return n;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===i&&(i="number"),OrdinaryToPrimitive(e,i)}return e}function ToString(t){switch(Type(t)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return ToString(ToPrimitive(t,String));default:return String(t)}}CreateMethodProperty(Array.prototype,"includes",function e(r){"use strict";var t=ToObject(this),o=ToLength(Get(t,"length"));if(0===o)return!1;var n=ToInteger(arguments[1]);if(n>=0)var a=n;else(a=o+n)<0&&(a=0);for(;a1?arguments[1]:undefined,n=RequireObjectCoercible(this),i=ToString(n);if(IsRegExp(t))throw new TypeError("First argument to String.prototype.includes must not be a regular expression");var o=ToString(t),g=ToInteger(r),a=i.length,p=Math.min(Math.max(g,0),a);return-1!==String.prototype.indexOf.call(i,o,p)});function ToPropertyKey(r){var i=ToPrimitive(r,String);return"symbol"===Type(i)?i:ToString(i)}!function(){var e=Object.getOwnPropertyDescriptor,t=function(){try{return 1===Object.defineProperty(document.createElement("div"),"one",{get:function(){return 1}}).one}catch(e){return!1}},r={}.toString,n="".split;CreateMethodProperty(Object,"getOwnPropertyDescriptor",function c(o,i){var a=ToObject(o);a=("string"===Type(a)||a instanceof String)&&"[object String]"==r.call(o)?n.call(o,""):Object(o);var u=ToPropertyKey(i);if(t)try{return e(a,u)}catch(l){}if(HasOwnProperty(a,u))return{enumerable:!0,configurable:!0,writable:!0,value:a[u]}})}();CreateMethodProperty(Object,"assign",function e(t,r){var n=ToObject(t);if(1===arguments.length)return n;var o,c,a,l,i=Array.prototype.slice.call(arguments,1);for(o=0;o1?arguments[1]:GetMethod(t,Symbol.iterator),r=Call(e,t);if("object"!==Type(r))throw new TypeError("bad iterator");var o=GetV(r,"next"),a=Object.create(null);return a["[[Iterator]]"]=r,a["[[NextMethod]]"]=o,a["[[Done]]"]=!1,a}var AddEntriesFromIterable=function(){var r={}.toString,t="".split;return function e(a,o,n){if(!1===IsCallable(n))throw new TypeError("adder is not callable.");for(var l=GetIterator(o);;){var c=IteratorStep(l);if(!1===c)return a;var i=IteratorValue(c);if("object"!==Type(i)){var s=new TypeError("nextItem is not an object");throw IteratorClose(l,s),s}i=("string"===Type(i)||i instanceof String)&&"[object String]"==r.call(i)?t.call(i,""):i;var I;try{I=Get(i,"0")}catch(I){return IteratorClose(l,I)}var u;try{u=Get(i,"1")}catch(u){return IteratorClose(l,u)}try{Call(n,a,[I,u])}catch(v){return IteratorClose(l,v)}}}}();Object.defineProperty(Symbol,"toStringTag",{value:Symbol("toStringTag")});var Iterator=function(){var e=function(){return this.length=0,this},t=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},_=function(e,n){if(!(this instanceof _))return new _(e,n);Object.defineProperties(this,{__list__:{writable:!0,value:e},__context__:{writable:!0,value:n},__nextIndex__:{writable:!0,value:0}}),n&&(t(n.on),n.on("_add",this._onAdd.bind(this)),n.on("_delete",this._onDelete.bind(this)),n.on("_clear",this._onClear.bind(this)))};return Object.defineProperties(_.prototype,Object.assign({constructor:{value:_,configurable:!0,enumerable:!1,writable:!0},_next:{value:function(){var e;if(this.__list__)return this.__redo__&&(e=this.__redo__.shift())!==undefined?e:this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void Object.defineProperty(this,"__redo__",{value:[e],configurable:!0,enumerable:!1,writable:!1});this.__redo__.forEach(function(t,_){t>=e&&(this.__redo__[_]=++t)},this),this.__redo__.push(e)}},configurable:!0,enumerable:!1,writable:!0},_onDelete:{value:function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),-1!==t&&this.__redo__.splice(t,1),this.__redo__.forEach(function(t,_){t>e&&(this.__redo__[_]=--t)},this)))},configurable:!0,enumerable:!1,writable:!0},_onClear:{value:function(){this.__redo__&&e.call(this.__redo__),this.__nextIndex__=0},configurable:!0,enumerable:!1,writable:!0}})),Object.defineProperty(_.prototype,Symbol.iterator,{value:function(){return this},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(_.prototype,Symbol.toStringTag,{value:"Iterator",configurable:!1,enumerable:!1,writable:!0}),_}();var ArrayIterator=function(){var e=function(t,r){if(!(this instanceof e))return new e(t,r);Iterator.call(this,t),r=r?String.prototype.includes.call(r,"key+value")?"key+value":String.prototype.includes.call(r,"key")?"key":"value":"value",Object.defineProperty(this,"__kind__",{value:r,configurable:!1,enumerable:!1,writable:!1})};return Object.setPrototypeOf&&Object.setPrototypeOf(e,Iterator.prototype),e.prototype=Object.create(Iterator.prototype,{constructor:{value:e,configurable:!0,enumerable:!1,writable:!0},_resolve:{value:function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e},configurable:!0,enumerable:!1,writable:!0},toString:{value:function(){return"[object Array Iterator]"},configurable:!0,enumerable:!1,writable:!0}}),e}();"Symbol"in self&&"iterator"in Symbol&&"function"==typeof Array.prototype[Symbol.iterator]?CreateMethodProperty(Array.prototype,"values",Array.prototype[Symbol.iterator]):CreateMethodProperty(Array.prototype,"values",function r(){var r=ToObject(this);return new ArrayIterator(r,"value")});CreateMethodProperty(Array.prototype,Symbol.iterator,Array.prototype.values);CreateMethodProperty(Object,"fromEntries",function r(e){RequireObjectCoercible(e);var t={},o=function(r,e){var t=this,o=ToPropertyKey(r);CreateDataPropertyOrThrow(t,o,e)};return AddEntriesFromIterable(t,e,o)});})('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); \ No newline at end of file diff --git a/src/legacy/script/polyfill-io/object-get-own-property-symbols-polyfill.min.js b/src/legacy/script/polyfill-io/object-get-own-property-symbols-polyfill.min.js new file mode 100644 index 000000000..462a430e7 --- /dev/null +++ b/src/legacy/script/polyfill-io/object-get-own-property-symbols-polyfill.min.js @@ -0,0 +1,4 @@ +/* Polyfill service v3.111.0 + * Disable minification (remove `.min` from URL path) for more info */ + +(function(self, undefined) {function Call(t,l){var n=arguments.length>2?arguments[2]:[];if(!1===IsCallable(t))throw new TypeError(Object.prototype.toString.call(t)+"is not a function.");return t.apply(l,n)}function CreateMethodProperty(e,r,t){var a={value:t,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(e,r,a)}CreateMethodProperty(Object,"keys",function(){"use strict";function t(){var t;try{t=Object.create({})}catch(r){return!0}return o.call(t,"__proto__")}function r(t){var r=n.call(t),e="[object Arguments]"===r;return e||(e="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),e}var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=Object.prototype.propertyIsEnumerable,c=!o.call({toString:null},"toString"),l=o.call(function(){},"prototype"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(t){var r=t.constructor;return r&&r.prototype===t},a={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!a["$"+t]&&e.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{u(window[t])}catch(r){return!0}}catch(r){return!0}return!1}(),p=function(t){if("undefined"==typeof window||!f)return u(t);try{return u(t)}catch(r){return!1}};return function s(o){var u="[object Function]"===n.call(o),a=r(o),f="[object String]"===n.call(o),s=[];if(o===undefined||null===o)throw new TypeError("Cannot convert undefined or null to object");var y=l&&u;if(f&&o.length>0&&!e.call(o,0))for(var h=0;h0)for(var g=0;g1?arguments[1]:undefined;if("object"===Type(e)){if(arguments.length<2)var i="default";else t===String?i="string":t===Number&&(i="number");var r="function"==typeof self.Symbol&&"symbol"==typeof self.Symbol.toPrimitive?GetMethod(e,self.Symbol.toPrimitive):undefined;if(r!==undefined){var n=Call(r,e,[i]);if("object"!==Type(n))return n;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===i&&(i="number"),OrdinaryToPrimitive(e,i)}return e}function ToString(t){switch(Type(t)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return ToString(ToPrimitive(t,String));default:return String(t)}}CreateMethodProperty(Array.prototype,"includes",function e(r){"use strict";var t=ToObject(this),o=ToLength(Get(t,"length"));if(0===o)return!1;var n=ToInteger(arguments[1]);if(n>=0)var a=n;else(a=o+n)<0&&(a=0);for(;a=0&&"[object Function]"===n.call(t.callee)),e}var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=Object.prototype.propertyIsEnumerable,c=!o.call({toString:null},"toString"),l=o.call(function(){},"prototype"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(t){var r=t.constructor;return r&&r.prototype===t},a={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!a["$"+t]&&e.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{u(window[t])}catch(r){return!0}}catch(r){return!0}return!1}(),p=function(t){if("undefined"==typeof window||!f)return u(t);try{return u(t)}catch(r){return!1}};return function s(o){var u="[object Function]"===n.call(o),a=r(o),f="[object String]"===n.call(o),s=[];if(o===undefined||null===o)throw new TypeError("Cannot convert undefined or null to object");var y=l&&u;if(f&&o.length>0&&!e.call(o,0))for(var h=0;h0)for(var g=0;g2?arguments[2]:[];if(!1===IsCallable(t))throw new TypeError(Object.prototype.toString.call(t)+"is not a function.");return t.apply(l,n)}function CreateMethodProperty(e,r,t){var a={value:t,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(e,r,a)}CreateMethodProperty(Object,"keys",function(){"use strict";function t(){var t;try{t=Object.create({})}catch(r){return!0}return o.call(t,"__proto__")}function r(t){var r=n.call(t),e="[object Arguments]"===r;return e||(e="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),e}var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=Object.prototype.propertyIsEnumerable,c=!o.call({toString:null},"toString"),l=o.call(function(){},"prototype"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(t){var r=t.constructor;return r&&r.prototype===t},a={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!a["$"+t]&&e.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{u(window[t])}catch(r){return!0}}catch(r){return!0}return!1}(),p=function(t){if("undefined"==typeof window||!f)return u(t);try{return u(t)}catch(r){return!1}};return function s(o){var u="[object Function]"===n.call(o),a=r(o),f="[object String]"===n.call(o),s=[];if(o===undefined||null===o)throw new TypeError("Cannot convert undefined or null to object");var y=l&&u;if(f&&o.length>0&&!e.call(o,0))for(var h=0;h0)for(var g=0;g1?arguments[1]:undefined;if("object"===Type(e)){if(arguments.length<2)var i="default";else t===String?i="string":t===Number&&(i="number");var r="function"==typeof self.Symbol&&"symbol"==typeof self.Symbol.toPrimitive?GetMethod(e,self.Symbol.toPrimitive):undefined;if(r!==undefined){var n=Call(r,e,[i]);if("object"!==Type(n))return n;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===i&&(i="number"),OrdinaryToPrimitive(e,i)}return e}function ToString(t){switch(Type(t)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return ToString(ToPrimitive(t,String));default:return String(t)}}CreateMethodProperty(Array.prototype,"includes",function e(r){"use strict";var t=ToObject(this),o=ToLength(Get(t,"length"));if(0===o)return!1;var n=ToInteger(arguments[1]);if(n>=0)var a=n;else(a=o+n)<0&&(a=0);for(;an&&(r.length=n)}var r=L(n),o=0;return function(n,t){r[o++]=n,r[o++]=t,2===o&&tn.nextTick(e)}}function s(n,t){var o,i,u,f,s=0;if(!n)throw a(N);var l=n[tn[q][z]];if(e(l))i=l.call(n);else{if(!e(n.next)){if(r(n,L)){for(o=n.length;sMath.pow(2,32)-1)throw new RangeError("Invalid array length");var n=[];return n.length=r,n}function Call(t,l){var n=arguments.length>2?arguments[2]:[];if(!1===IsCallable(t))throw new TypeError(Object.prototype.toString.call(t)+"is not a function.");return t.apply(l,n)}function CreateDataProperty(e,r,t){var a={value:t,writable:!0,enumerable:!0,configurable:!0};try{return Object.defineProperty(e,r,a),!0}catch(n){return!1}}function CreateDataPropertyOrThrow(t,r,o){var e=CreateDataProperty(t,r,o);if(!e)throw new TypeError("Cannot assign value `"+Object.prototype.toString.call(o)+"` to property `"+Object.prototype.toString.call(r)+"` on object `"+Object.prototype.toString.call(t)+"`");return e}function CreateMethodProperty(e,r,t){var a={value:t,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(e,r,a)}CreateMethodProperty(Object,"keys",function(){"use strict";function t(){var t;try{t=Object.create({})}catch(r){return!0}return o.call(t,"__proto__")}function r(t){var r=n.call(t),e="[object Arguments]"===r;return e||(e="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),e}var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=Object.prototype.propertyIsEnumerable,c=!o.call({toString:null},"toString"),l=o.call(function(){},"prototype"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(t){var r=t.constructor;return r&&r.prototype===t},a={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!a["$"+t]&&e.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{u(window[t])}catch(r){return!0}}catch(r){return!0}return!1}(),p=function(t){if("undefined"==typeof window||!f)return u(t);try{return u(t)}catch(r){return!1}};return function s(o){var u="[object Function]"===n.call(o),a=r(o),f="[object String]"===n.call(o),s=[];if(o===undefined||null===o)throw new TypeError("Cannot convert undefined or null to object");var y=l&&u;if(f&&o.length>0&&!e.call(o,0))for(var h=0;h0)for(var g=0;g2?arguments[2]:r,o=arguments.length>1?arguments[1]:[];if(!IsConstructor(r))throw new TypeError("F must be a constructor.");if(!IsConstructor(t))throw new TypeError("newTarget must be a constructor.");if(t===r)return new(Function.prototype.bind.apply(r,[null].concat(o)));var n=OrdinaryCreateFromConstructor(t,Object.prototype);return Call(r,n,o)}function IteratorClose(r,t){if("object"!==Type(r["[[Iterator]]"]))throw new Error(Object.prototype.toString.call(r["[[Iterator]]"])+"is not an Object.");var e=r["[[Iterator]]"],o=GetMethod(e,"return");if(o===undefined)return t;try{var n=Call(o,e)}catch(c){var a=c}if(t)return t;if(a)throw a;if("object"!==Type(n))throw new TypeError("Iterator's return method returned a non-object.");return t}function IteratorComplete(t){if("object"!==Type(t))throw new Error(Object.prototype.toString.call(t)+"is not an Object.");return ToBoolean(Get(t,"done"))}function IteratorNext(t){if(arguments.length<2)var e=Call(t["[[NextMethod]]"],t["[[Iterator]]"]);else e=Call(t["[[NextMethod]]"],t["[[Iterator]]"],[arguments[1]]);if("object"!==Type(e))throw new TypeError("bad iterator");return e}function IteratorStep(t){var r=IteratorNext(t);return!0!==IteratorComplete(r)&&r}function IteratorValue(t){if("object"!==Type(t))throw new Error(Object.prototype.toString.call(t)+"is not an Object.");return Get(t,"value")}function OrdinaryToPrimitive(r,t){if("string"===t)var e=["toString","valueOf"];else e=["valueOf","toString"];for(var i=0;i1?arguments[1]:undefined;if("object"===Type(e)){if(arguments.length<2)var i="default";else t===String?i="string":t===Number&&(i="number");var r="function"==typeof self.Symbol&&"symbol"==typeof self.Symbol.toPrimitive?GetMethod(e,self.Symbol.toPrimitive):undefined;if(r!==undefined){var n=Call(r,e,[i]);if("object"!==Type(n))return n;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===i&&(i="number"),OrdinaryToPrimitive(e,i)}return e}function ToString(t){switch(Type(t)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return ToString(ToPrimitive(t,String));default:return String(t)}}CreateMethodProperty(Array.prototype,"includes",function e(r){"use strict";var t=ToObject(this),o=ToLength(Get(t,"length"));if(0===o)return!1;var n=ToInteger(arguments[1]);if(n>=0)var a=n;else(a=o+n)<0&&(a=0);for(;a1?arguments[1]:GetMethod(t,Symbol.iterator),r=Call(e,t);if("object"!==Type(r))throw new TypeError("bad iterator");var o=GetV(r,"next"),a=Object.create(null);return a["[[Iterator]]"]=r,a["[[NextMethod]]"]=o,a["[[Done]]"]=!1,a}Object.defineProperty(Symbol,"species",{value:Symbol("species")});!function(e){function t(e,t){if("object"!==Type(e))throw new TypeError("createMapIterator called on incompatible receiver "+Object.prototype.toString.call(e));if(!0!==e._es6Map)throw new TypeError("createMapIterator called on incompatible receiver "+Object.prototype.toString.call(e));var r=Object.create(u);return Object.defineProperty(r,"[[Map]]",{configurable:!0,enumerable:!1,writable:!0,value:e}),Object.defineProperty(r,"[[MapNextIndex]]",{configurable:!0,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"[[MapIterationKind]]",{configurable:!0,enumerable:!1,writable:!0,value:t}),r}var r=function(){try{var e={};return Object.defineProperty(e,"t",{configurable:!0,enumerable:!1,get:function(){return!0},set:undefined}),!!e.t}catch(t){return!1}}(),o=0,a=Symbol("meta_"+(1e8*Math.random()+"").replace(".","")),n=function(e){if("object"==typeof e?null!==e:"function"==typeof e){if(!Object.isExtensible(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,a)){var t=typeof e+"-"+ ++o;Object.defineProperty(e,a,{configurable:!1,enumerable:!1,writable:!1,value:t})}return e[a]}return""+e},i=function(e,t){var r=n(t);if(!1===r)return p(e,t);var o=e._table[r];return o!==undefined&&o},p=function(e,t){for(var r=0;r0?arguments[0]:undefined;if(null===t||t===undefined)return e;var o=e.set;if(!IsCallable(o))throw new TypeError("Map.prototype.set is not a function");try{for(var a=GetIterator(t);;){var n=IteratorStep(a);if(!1===n)return e;var i=IteratorValue(n);if("object"!==Type(i))try{throw new TypeError("Iterator value "+i+" is not an entry object")}catch(u){return IteratorClose(a,u)}try{var p=i[0],l=i[1];o.call(e,p,l)}catch(s){return IteratorClose(a,s)}}}catch(s){if(Array.isArray(t)||"[object Arguments]"===Object.prototype.toString.call(t)||t.callee){var c,y=t.length;for(c=0;c0?arguments[0]:undefined;if(null===t||t===undefined)return e;var o=e.add;if(!IsCallable(o))throw new TypeError("Set.prototype.add is not a function");try{for(var n=GetIterator(t);;){var a=IteratorStep(n);if(!1===a)return e;var i=IteratorValue(a);try{o.call(e,i)}catch(y){return IteratorClose(n,y)}}}catch(y){if(!Array.isArray(t)&&"[object Arguments]"!==Object.prototype.toString.call(t)&&!t.callee)throw y;var l,p=t.length;for(l=0;l1?arguments[1]:undefined;if(a===undefined)var n=!1;else{if(!1===IsCallable(a))throw new TypeError(Object.prototype.toString.call(a)+" is not a function.");var i=arguments.length>2?arguments[2]:undefined;if(i!==undefined)var l=i;else l=undefined;n=!0}var u=GetMethod(t,Symbol.iterator);if(u!==undefined){if(IsConstructor(o))var f=Construct(o);else f=ArrayCreate(0);for(var c=GetIterator(t,u),s=0;;){if(s>=Math.pow(2,53)-1){var h=new TypeError("Iteration count can not be greater than or equal 9007199254740991.");return IteratorClose(c,h)}var y=ToString(s),C=IteratorStep(c);if(!1===C)return f.length=s,f;var g=IteratorValue(C);if(n)try{var p=Call(a,l,[g,s])}catch(b){return IteratorClose(c,b)}else p=g;try{CreateDataPropertyOrThrow(f,y,p)}catch(b){return IteratorClose(c,b)}s+=1}}if(r(t))var v=e.call(t,/[\uD800-\uDBFF][\uDC00-\uDFFF]?|[^\uD800-\uDFFF]|./g)||[];else v=ToObject(t);var d=ToLength(Get(v,"length"));for(f=IsConstructor(o)?Construct(o,[d]):ArrayCreate(d),s=0;s=e.length)return{done:!0,value:undefined};var r=e[n++];return{done:!1,value:"key"===t?r.name:"value"===t?r.value:[r.name,r.value]}}}function l(t,n){function r(){var e=l.href.replace(/#$|\?$|\?(?=#)/g,"");l.href!==e&&(l.href=e)}function u(){m._setList(l.search?a(l.search.substring(1)):[]),m._update_steps()}if(!(this instanceof e.URL))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator.");n&&(t=function(){if(c)return new s(t,n).href;var e;try{var r;if("[object OperaMini]"===Object.prototype.toString.call(window.operamini)?(e=document.createElement("iframe"),e.style.display="none",document.documentElement.appendChild(e),r=e.contentWindow.document):document.implementation&&document.implementation.createHTMLDocument?r=document.implementation.createHTMLDocument(""):document.implementation&&document.implementation.createDocument?(r=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),r.documentElement.appendChild(r.createElement("head")),r.documentElement.appendChild(r.createElement("body"))):window.ActiveXObject&&(r=new window.ActiveXObject("htmlfile"),r.write(""),r.close()),!r)throw Error("base not supported");var a=r.createElement("base");a.href=n,r.getElementsByTagName("head")[0].appendChild(a);var i=r.createElement("a");return i.href=t,i.href}finally{e&&e.parentNode.removeChild(e)}}());var l=i(t||""),f=function(){if(!("defineProperties"in Object))return!1;try{var e={};return Object.defineProperties(e,{prop:{get:function(){return!0}}}),e.prop}catch(t){return!1}}(),h=f?this:document.createElement("a"),m=new o(l.search?l.search.substring(1):null);return m._url_object=h,Object.defineProperties(h,{href:{get:function(){return l.href},set:function(e){l.href=e,r(),u()},enumerable:!0,configurable:!0},origin:{get:function(){return"data:"===this.protocol.toLowerCase()?null:"origin"in l?l.origin:this.protocol+"//"+this.host},enumerable:!0,configurable:!0},protocol:{get:function(){return l.protocol},set:function(e){l.protocol=e},enumerable:!0,configurable:!0},username:{get:function(){return l.username},set:function(e){l.username=e},enumerable:!0,configurable:!0},password:{get:function(){return l.password},set:function(e){l.password=e},enumerable:!0,configurable:!0},host:{get:function(){var e={"http:":/:80$/,"https:":/:443$/,"ftp:":/:21$/}[l.protocol];return e?l.host.replace(e,""):l.host},set:function(e){l.host=e},enumerable:!0,configurable:!0},hostname:{get:function(){return l.hostname},set:function(e){l.hostname=e},enumerable:!0,configurable:!0},port:{get:function(){return l.port},set:function(e){l.port=e},enumerable:!0,configurable:!0},pathname:{get:function(){return"/"!==l.pathname.charAt(0)?"/"+l.pathname:l.pathname},set:function(e){l.pathname=e},enumerable:!0,configurable:!0},search:{get:function(){return l.search},set:function(e){l.search!==e&&(l.search=e,r(),u())},enumerable:!0,configurable:!0},searchParams:{get:function(){return m},enumerable:!0,configurable:!0},hash:{get:function(){return l.hash},set:function(e){l.hash=e,r()},enumerable:!0,configurable:!0},toString:{value:function(){return l.toString()},enumerable:!1,configurable:!0},valueOf:{value:function(){return l.valueOf()},enumerable:!1,configurable:!0}}),h}var c,s=e.URL;try{if(s){if("searchParams"in(c=new e.URL("http://example.com"))){var f=new l("http://example.com");if(f.search="a=1&b=2","http://example.com/?a=1&b=2"===f.href&&(f.search="","http://example.com/"===f.href))return}"href"in c||(c=undefined),c=undefined}}catch(m){}if(Object.defineProperties(o.prototype,{append:{value:function(e,t){this._list.push({name:e,value:t}),this._update_steps()},writable:!0,enumerable:!0,configurable:!0},"delete":{value:function(e){for(var t=0;t1?arguments[1]:undefined;this._list.forEach(function(n){e.call(t,n.value,n.name)})},writable:!0,enumerable:!0,configurable:!0},toString:{value:function(){return n(this._list)},writable:!0,enumerable:!1,configurable:!0},sort:{value:function p(){for(var e=this.entries(),t=e.next(),n=[],r={};!t.done;){var a=t.value,i=a[0];n.push(i),Object.prototype.hasOwnProperty.call(r,i)||(r[i]=[]),r[i].push(a[1]),t=e.next()}n.sort();for(var o=0;o