From 3891f5ce9849c4eebdff0db752dca75713cafae5 Mon Sep 17 00:00:00 2001 From: Herwin Date: Wed, 16 Aug 2023 14:58:26 +0200 Subject: [PATCH] Improved workbench's formulas' MVC, Added utils, Fixed missing file Update strings.json, compile.bat, and 6 more files... --- commons/strings.json | 2 +- compile.bat | 22 +- tools/items/formula-wizard/page.php | 1 - tools/items/formula-wizard/src/lang.ts | 2 +- tools/items/formula-wizard/src/main.ts | 10 +- tools/items/formula-wizard/src/mvc_formula.ts | 227 +++++++++++++++--- tools/items/formula-wizard/src/tsconfig.json | 127 ++++++++++ .../formula-wizard/src/utils_templates.ts | 63 +++++ 8 files changed, 399 insertions(+), 55 deletions(-) create mode 100644 tools/items/formula-wizard/src/tsconfig.json create mode 100644 tools/items/formula-wizard/src/utils_templates.ts diff --git a/commons/strings.json b/commons/strings.json index c380992..45e6857 100644 --- a/commons/strings.json +++ b/commons/strings.json @@ -1 +1 @@ -{"_compile_date":"2023-08-16T09:13:20.823019Z","en":{"about.head.title":"About - NibblePoker","about.head.description":"TODO: description","about.og.title":"NibblePoker - About","about.og.description":"TODO: description","about.header.title":"About","about.part.year.single":"year","about.part.year.multiple":"years","about.part.since":"since","about.education.title":"Education","about.skills.title":"Skills","about.work.title":"Work Experience","about.work.ctie.title":"Government IT Centre (CTIE)","about.work.ctie.role.1":"IoT Developer Internship","about.work.ctie.location":"Luxembourg","about.work.computrade.title":"CompuTrade Luxembourg Ltd","about.work.computrade.role.1":"Full & Half-time student job","about.work.computrade.location":"Steinfort, Luxembourg","about.work.lih.title":"Luxembourg Institute of Health (LIH)","about.work.lih.role.1":"IT Support Internship","about.work.lih.location":"Luxembourg","about.work.crlux.title":"Luxembourg Red Cross","about.work.crlux.role.1":"Volunteer Excel VBA programmer.","about.work.crlux.location":"Luxembourg","about.work.buttek.title":"Luxembourg Red Cross - Buttek","about.work.buttek.role.1":"Volunteer ???","about.work.buttek.role.2":"Student cashier ???","about.work.buttek.location":"Luxembourg","about.work.current.title":"Current employer kept private","about.work.current.role.1":"???","about.work.current.location":"Belgium","contact.head.title":"Contact - NibblePoker","contact.head.description":"TODO: description","contact.og.title":"NibblePoker - Contact","contact.og.description":"TODO: description","contact.header.title":"Contact","contact.email.title":"Email","contact.email.compose":"Send an email to herwin.bozet@gmail.com","contact.twitter.title":"Twitter","contact.twitter.compose":"Compose DM to @NibblePoker on Twitter","content.search.head.title":"Content search - NibblePoker","content.search.head.description":"TODO: description","content.search.og.title":"NibblePoker - Content search","content.search.og.description":"TODO: description","content.search.heading.main.single":"Search result","content.search.heading.main.multiple":"Search results","content.search.count.single":"result","content.search.count.multiple":"results","content.header.base":"Projects","content.search.header":"Search","content.error.header":"Error","content.error.head.title":"Content error - NibblePoker","content.error.og.title":"NibblePoker - Content error","content.error.heading.main.search":"Search error","content.error.heading.main.content":"Content error","content.error.heading.main.fallback":"Unknown error","content.error.message.none":"No explicit error was encountered.","content.error.message.tags.length":"The \"tags\" URL parameter is too long.","content.error.message.tags.alphanumeric":"One of the tags given in the \"tags\" URL parameter is not a valid alphanumeric string.","content.error.message.detect.empty":"No content could be found for the given tags.","content.error.message.id.alphanumeric":"The requested resource's ID isn't a valid alphanumeric string.","content.error.message.data.not.exist":"The requested content doesn't have an internal item file associated to it.","content.error.message.cannot.load":"The requested content couldn't be loaded on our end !","content.error.message.data.no.tags":"No tags found !","content.error.message.data.no.title":"No title found !","content.item.head.title.prefix":"","content.item.head.title.suffix":" - NibblePoker","content.item.og.title.prefix":"","content.item.og.title.suffix":" - NibblePoker","content.commons.version.current":"Current version","content.commons.version.previous.single":"Previous version","content.commons.version.previous.multiple":"Previous versions","content.commons.version.old.single":"Old version","content.commons.version.old.multiple":"Old versions","content.commons.version.source":"Source code","content.commons.cpu":"CPU Architecture","content.commons.cpu.responsive":"CPU Architecture","content.commons.cpu.any":"Any architecture","content.commons.cpu.x64":"x64","content.commons.cpu.x86":"x86","content.commons.cpu.arm":"arm","content.commons.cpu.arm64":"arm64","content.commons.na.italic":"N/A","content.commons.na":"N/A","content.commons.lang":"Language","content.commons.download.single":"Download","content.commons.download.multiple":"Downloads","content.commons.version":"Version","content.commons.github":"GitHub Repository","content.commons.gitea":"Self-hosted Gitea Repository","content.commons.nuget":"Nuget Package","content.commons.license.mit.single":"MIT License","content.commons.lang.english":"English","content.commons.lang.french":"French","content.commons.lang.luxembourgish":"Luxembourgish","content.commons.lang.english.639-3":"English (eng)","content.commons.lang.french.639-3":"French (fra)","content.commons.lang.luxembourgish.639-3":"Luxembourgish (ltz)","error.403.head.title":"403 - NibblePoker","error.403.head.description":"Access to the requested resource isn't unauthorized.","error.403.og.title":"NibblePoker - 403 Error","error.403.og.description":"Access to the requested resource isn't unauthorized.","error.403.header.title":"Error\u2771403 Error","error.404.head.title":"404 - NibblePoker","error.404.head.description":"The server couldn't find the requested resource.","error.404.og.title":"NibblePoker - 404 Error","error.404.og.description":"The server couldn't find the requested resource.","error.404.header.title":"Error\u2771404 Error","error.500.head.title":"500 - NibblePoker","error.500.head.description":"The server has encountered a situation it doesn't know how to handle.","error.500.og.title":"NibblePoker - 500 Error","error.500.og.description":"The server has encountered a situation it doesn't know how to handle.","error.500.header.title":"Error\u2771500 Error","error.skit.pc.dead":"Drawing of an old PC with a face with crossed eyes.","footer.text.privacy":"Privacy policy","footer.alt.sidebar.button":"Open and close the navigation sidebar.","footer.alt.logo":"Website's logo","home.head.title":"NibblePoker","home.head.description":"TODO: description","home.og.title":"NibblePoker","home.og.description":"TODO: description","home.header.title":"Homepage","home.showcase.title":"Showcase","home.updates.title":"Updates","home.updates.text.privacy":"\u25cf  Updated our privacy policy.","home.updates.2.date":"August 15 2023","home.updates.2.text.1":"\u25cf  The website is back online.","home.updates.2.text.2":"\u25cf  New and much lighter design.","home.updates.2.text.3":"\u25cf  Changed our host to HostBrr.","home.updates.2.text.4":"\u25cf  Added a section for web-based tools.","home.updates.1.date":"September 9 2022","home.updates.1.text.1":"\u25cf  Changed our host to v6Node.","lang.menu.title":"Language","lang.current":"English","lang.automatic":"Automatic","lang.english":"English","lang.french":"French","lang.german":"German","lang.luxembourgish":"Luxembourgish","links.head.title":"Links - NibblePoker","links.head.description":"TODO: description","links.og.title":"NibblePoker - Links","links.og.description":"TODO: description","links.header.title":"Links","privacy.head.title":"Privacy policy - NibblePoker","privacy.head.description":"Our privacy policy in a clear and easy to understand format.","privacy.og.title":"NibblePoker - Privacy Policy","privacy.og.description":"Our privacy policy in a clear and easy to understand format.","privacy.header.title":"Privacy policy","privacy.introduction.title":"Introduction","privacy.introduction.text.1":"This privacy policy is written in accordance with the 12th and 13th articles of the GDPR.","privacy.introduction.text.2":"If you wish to consult it, you can do so on the following websites:","privacy.contact.title":"How to contact us ?","privacy.contact.text.1":"If you wish to contact us for more information regarding our privacy policy, please contact us via the form included on the contact page, or at the following email address:","privacy.complaint.title":"How to contact the appropriate authorities ?","privacy.complaint.text.1":"Should you wish to report a complaint or if you feel that our privacy policy has not addressed your concern in a satisfactory manner, you may contact your national Data Protection Authority (DPA).","privacy.complaint.text.2":"More information on this procedure can be found on the following websites:","privacy.v2.data.title":"Data collection","privacy.v2.data.intro.1":"This websites only collects data through generic access logs in order to detect and block bad actors from accessing this website.","privacy.v2.data.intro.2":"None of the data collected is used for any other purpose, it is never shared with any other third-party and is never use in any sort of analytics.","privacy.v2.data.private.1":"Here is the list of private data being collected:","privacy.v2.data.private_list.1":"IP address","privacy.v2.data.private_list.2":"Browser's User-Agent","privacy.v2.data.non_private.1":"And here is the list of non-private data being collected:","privacy.v2.data.non_private_list.1":"Requested resource' URI","privacy.v2.data.non_private_list.2":"Date and time","privacy.v2.data.end.1":"Once the data has been logged in the access logs, it is automatically retrieved and processed by a locally-hosted application every 30 seconds and then deleted from said logs.","privacy.v2.data.end.2":"This application compares this information against a list of known threat sources, targets and behaviours and if a match is found, the private information is anonymized and stored for 7 days pending a manual review.","privacy.v2.data.end.3":"Once that 7 day period has elapsed, or once the report has been reviewed, all the relevant data is automatically deleted.","privacy.v2.data.end.4":"If your request wasn't flagged as potentially malicious, every data collected from it is thrown out instantly.","privacy.v2.data.end.5":"This process should normally never be triggered for regular traffic since most of the triggering actions are ones that should not be possible to accomplish through normal browsing.","privacy.v2.data.end.6":"However, this process isn't infallible and there is always an off chance that false positives may happen.","privacy.v2.update.title":"Changes to our privacy policy","privacy.v2.update.intro.1":"The content of this privacy policy was originally written on the 4th of December 2021 and was last updated on the 18th of March 2022.","privacy.v2.update.history.1.date":"2021/12/04","privacy.v2.update.history.1.desc.1":"Original version","privacy.v2.update.history.2.date":"2022/03/18","privacy.v2.update.history.2.desc.1":"Changed section on data collection to reflect new policy.","privacy.v2.update.history.2.desc.2":"Added mention about CloudFlare and linked to their privacy policy.","privacy.v2.update.history.2.desc.3":"Improved the \"Changes to our privacy policy\" section.","privacy.v2.update.history.3.date":"2022/09/09","privacy.v2.update.history.3.desc.1":"Changed references to external services to reflect the migration to v6Node.","privacy.v2.update.history.3.desc.1.1":"Added mention about v6Node and linked to their privacy policy.","privacy.v2.update.history.3.desc.1.2":"Removed mentions of CloudFlare.","privacy.v2.update.history.3.desc.2":"Changed the \"Cookies\" section to indicate that none should be used on public domains.","privacy.v2.update.end.2":"In the event of a change to our privacy policy, you will be informed explicitly, and a copy of previous versions of the policy will be available through this page.","privacy.v2.third.title":"Third Parties","privacy.v2.third.intro.1":"Our websites uses some services provided by v6Node in order to prevent bad actors from accessing this website and in order to put in place a reverse-proxy system.","privacy.v2.third.intro.2":"The goal of this system is to improve your browsing experience with the help of a private caching service and custom traffic filtering rules.","privacy.v2.third.intro.3":"None of the data that may be gathered by v6Node or the system described above is ever used or stored.","privacy.v2.third.intro.4":"If you'd wish to consult their privacy policy and their partners', you can do so by using the following URLs:","privacy.v2.cookies.title":"Cookies","privacy.v2.cookies.intro.1":"Our websites doesn't use nor store any cookies in your browser.","privacy.v2.personal.title":"Personal Measures & Convictions","privacy.v2.personal.disabled.intro":"While not required by any laws, we decided to improve your online privacy by disabling some features:","privacy.v2.personal.disabled.list.1":"Disabling hidden HTTP Referer system.","privacy.v2.personal.disabled.list.2":"Disabling Google's predatory Topics API and defunct Cohort ad-serving systems.","privacy.v2.personal.disabled.list.3":"Preventing any external third-party code from being injected into the page.","privacy.v2.personal.tracking.text.1":"It is our belief that the web and modern technology in general should never be used to track and spy on people in any way shape or form.","privacy.v2.personal.tracking.text.2":"We believe that any service that is in any way trying to force you to disable any ad-blocking or privacy-enhancing extensions should be avoided at all cost and shunned for their practices.","privacy.v2.personal.tracking.text.3":"Modern website should never break with those type of extensions unless they are purposefully built to track you to near-illegal extents, this excuse is only used to force you to accept these predatory practices.","privacy.v2.personal.recommendations":"We also strongly recommend you to read the ENISA's Privacy considerations of online behavioural tracking report in order to improve your online privacy.","sidebar.alt.logo":"Website's logo","sidebar.text.home":"Home","sidebar.text.projects":"Projects","sidebar.text.applications":"Applications","sidebar.text.libraries":"Libraries","sidebar.text.electronics":"Electronics","sidebar.text.tools":"Tools","sidebar.text.links":"Links","sidebar.text.downloads":"Downloads","sidebar.text.gitea":"Git Repos.","sidebar.text.wiki":"Wiki","sidebar.text.about":"About","sidebar.text.contact":"Contact","tools.head.title":"Tools - NibblePoker","tools.head.description":"TODO: description","tools.og.title":"NibblePoker - Tools","tools.og.description":"TODO: description","tools.header.title":"Tools"},"fr":{"about.head.title":"\u00c0-propos - NibblePoker","about.head.description":"TODO: description","about.og.title":"NibblePoker - \u00c0-propos","about.og.description":"TODO: description","about.header.title":"\u00c0-propos","contact.head.title":"Contact - NibblePoker","contact.head.description":"TODO: description","contact.og.title":"NibblePoker - Contact","contact.og.description":"TODO: description","contact.header.title":"Contact","contact.email.title":"Courriel","contact.email.compose":"Envoyer un courriel \u00e0 herwin.bozet@gmail.com","contact.twitter.title":"Twitter","contact.twitter.compose":"Composer un message priv\u00e9 pour @NibblePoker sur Twitter","content.search.head.title":"Recherche de contenu - NibblePoker","content.search.head.description":"TODO: description","content.search.og.title":"NibblePoker - Recherche de contenu","content.search.og.description":"TODO: description","content.search.heading.main.single":"R\u00e9sultat de recherche","content.search.heading.main.multiple":"R\u00e9sultats de recherche","content.search.count.single":"r\u00e9sultat","content.search.count.multiple":"r\u00e9sultats","content.header.base":"Projets","content.search.header":"Recherche","content.error.header":"Erreur","content.error.head.title":"Erreur de contenu - NibblePoker","content.error.og.title":"NibblePoker - Erreur de contenu","content.error.heading.main.search":"Erreur de recherche","content.error.heading.main.content":"Erreur de contenu","content.error.heading.main.fallback":"Erreur inconnue","content.error.message.none":"Aucune erreur n'a \u00e9t\u00e9 d\u00e9tect\u00e9e.","content.error.message.tags.length":"Le param\u00e8tre d'URL \"tags\" est trop long.","content.error.message.tags.alphanumeric":"Un des tags donn\u00e9 dans le param\u00e8tre d'URL \"tags\" n'est pas une cha\u00eene de texte alphanum\u00e9rique valide.","content.error.message.detect.empty":"Aucun contenu en rapport avec les tags choisi n'as \u00e9t\u00e9 trouv\u00e9.","content.error.message.id.alphanumeric":"L'ID de la ressource demand\u00e9e n'est pas une cha\u00eene de texte alphanum\u00e9rique valide.","content.error.message.data.not.exist":"Le contenu demand\u00e9e n'a pas de fichier de rendu interne associ\u00e9.","content.error.message.cannot.load":"Le contenu demand\u00e9 n'a pas pu \u00eatre charg\u00e9 de notre c\u00f4t\u00e9 !","content.error.message.data.no.tags":"Aucun tag trouv\u00e9 !","content.error.message.data.no.title":"Aucun titre trouv\u00e9 !","content.item.head.title.prefix":"","content.item.head.title.suffix":" - NibblePoker","content.item.og.title.prefix":"","content.item.og.title.suffix":" - NibblePoker","content.commons.version.current":"Version actuelle","content.commons.version.previous.single":"Version pr\u00e9c\u00e9dente","content.commons.version.previous.multiple":"Versions pr\u00e9c\u00e9dentes","content.commons.version.old.single":"Ancienne version","content.commons.version.old.multiple":"Anciennes versions","content.commons.version.source":"Code source","content.commons.cpu":"Architecture de CPU","content.commons.cpu.any":"Ind\u00e9pendante","content.commons.cpu.x64":"x64","content.commons.cpu.x86":"x86","content.commons.cpu.arm":"arm","content.commons.cpu.arm64":"arm64","content.commons.na.italic":"N/A","content.commons.na":"N/A","content.commons.lang":"Langue","content.commons.download.single":"T\u00e9l\u00e9chargement","content.commons.download.multiple":"T\u00e9l\u00e9chargements","content.commons.version":"Version","content.commons.github":"D\u00e9p\u00f4t GitHub","content.commons.gitea":"D\u00e9p\u00f4t Gitea auto-h\u00e9berg\u00e9","content.commons.nuget":"Packet Nuget","content.commons.license.mit.single":"License MIT","content.commons.lang.english":"Anglais","content.commons.lang.french":"Fran\u00e7ais","content.commons.lang.luxembourgish":"Luxembourgeois","content.commons.lang.english.639-3":"Anglais (eng)","content.commons.lang.french.639-3":"Fran\u00e7ais (fra)","content.commons.lang.luxembourgish.639-3":"Luxembourgeois (ltz)","footer.text.privacy":"Politique de confidentialit\u00e9","footer.alt.sidebar.button":"Ouvrir et fermer le menu lat\u00e9ral de navigation.","footer.alt.logo":"Logo du site web","home.head.title":"NibblePoker","home.head.description":"TODO: description","home.og.title":"NibblePoker","home.og.description":"TODO: description","home.header.title":"Page d'accueil","home.showcase.title":"Vitrine","home.updates.title":"Updates","home.updates.text.privacy":"\u25cf  Mise-\u00e0-jour de notre politique de confidentialit\u00e9.","home.updates.2.date":"15 Ao\u00fbt 2023","home.updates.2.text.1":"\u25cf  Le site internet est \u00e0 nouveau disponible.","home.updates.2.text.2":"\u25cf  Mise en place d'un nouveau design plus l\u00e9ger.","home.updates.2.text.3":"\u25cf  Changement d'h\u00e9bergeur vers HostBrr.","home.updates.2.text.4":"\u25cf  Ajout d'une nouvelle section pour les outils.","home.updates.1.date":" 9 Septembre 2022","home.updates.1.text.1":"\u25cf  Changement d'h\u00e9bergeur vers v6Node.","lang.menu.title":"Langue","lang.current":"Fran\u00e7ais","lang.automatic":"Automatique","lang.english":"Anglais","lang.french":"Fran\u00e7ais","lang.german":"Allemand","lang.luxembourgish":"Luxembourgeois","links.head.title":"Liens - NibblePoker","links.head.description":"TODO: description","links.og.title":"NibblePoker - Liens","links.og.description":"TODO: description","links.header.title":"Liens","privacy.head.title":"Politique de confidentialit\u00e9 - NibblePoker","privacy.head.description":"Notre politique de confidentialit\u00e9 dans un format clair et compr\u00e9hensible.","privacy.og.title":"NibblePoker - Politique de confidentialit\u00e9","privacy.og.description":"Notre politique de confidentialit\u00e9 dans un format clair et compr\u00e9hensible.","privacy.header.title":"Politique de confidentialit\u00e9","privacy.introduction.title":"Introduction","privacy.introduction.text.1":"La politique de confidentialit\u00e9 ci-pr\u00e9sente a \u00e9t\u00e9 \u00e9crite en accord avec les articles 12 et 13 de la RGPD.","privacy.introduction.text.2":"Si vous souhaitez consulter le texte officiel en question, vous pouvez le faire sur les sites internet suivants :","privacy.contact.title":"Comment nous contacter ?","privacy.contact.text.1":"Si vous souhaitez nous contacter afin d'obtenir plus d'informations concernant notre politique de confidentialit\u00e9, nous vous recommandons d'utiliser le formulaire pr\u00e9sent sur la page de contact, ou par courriel \u00e0 l'adresse suivante:","privacy.complaint.title":"Comment contacter les autorit\u00e9s comp\u00e9tentes ?","privacy.complaint.text.1":"Dans l'\u00e9ventualit\u00e9 o\u00f9 vous souhaiteriez d\u00e9poser une plainte pour une quelconque raison en rapport avec notre politique de confidentialit\u00e9, veuillez vous adresser \u00e0 l'autorit\u00e9 nationale de protection des donn\u00e9es (DPA).","privacy.complaint.text.2":"Les informations concernant cette proc\u00e9dure peuvent \u00eatre trouv\u00e9es sur les sites internet suivants:","privacy.v2.data.title":"Collecte de donn\u00e9es","privacy.v2.data.intro.1":"Ce site web collecte des donn\u00e9es au travers des journaux d'\u00e9v\u00e8nements afin de d\u00e9tecter et bloquer de potentiels acteurs malveillants.","privacy.v2.data.intro.2":"Les donn\u00e9es collect\u00e9es ne sont en aucun cas utilis\u00e9es pour une quelconque autre raison.","privacy.v2.data.private.1":"Voici la liste des donn\u00e9es personelles collect\u00e9es:","privacy.v2.data.private_list.1":"L'addresse IP source","privacy.v2.data.private_list.2":"Le \"User-Agent\" de votre navigateur internet","privacy.v2.data.non_private.1":"Et voici la liste des donn\u00e9es non-personelles collect\u00e9es:","privacy.v2.data.non_private_list.1":"L'URI de la ressource demand\u00e9e","privacy.v2.data.non_private_list.2":"La date et l'heure","privacy.v2.data.end.1":"Les donn\u00e9es pr\u00e9sentes dans les journaux d'\u00e9v\u00e8nements sont extraites et retir\u00e9es pour \u00eatre trait\u00e9es par une application qui tourne en local toute les 30 secondes.","privacy.v2.data.end.2":"L'application en question utilise et compare ces informations avec une liste d'acteurs malveillants et comportement suspects connus.
Si une correspondance est d\u00e9tect\u00e9e, les informations priv\u00e9es sont anonymis\u00e9es et sont stock\u00e9es pendant 7 jours en attendant qu'un examen manuel soit effectu\u00e9.","privacy.v2.data.end.3":"Apr\u00e8s cette p\u00e9riode de 7 jours, ou apr\u00e8s qu'un examen ait \u00e9t\u00e9 effectu\u00e9, les donn\u00e9es sont automatiquement supprim\u00e9es.","privacy.v2.data.end.4":"Toute information concernant une requ\u00eate non suspecte est automatiquement supprim\u00e9e.","privacy.v2.data.end.5":"Ce processus n'est normalement jamais utilis\u00e9 sur des requ\u00eates provenant d'un trafic l\u00e9gitime d\u00fb au fait qu'il isole principalement les actions et requ\u00eates qui ne devraient pas \u00eatre possible sur ce site.","privacy.v2.data.end.6":"Cependant, ce processus n'est pas infaillible et il est toujours possible qu'une requ\u00eate soit isol\u00e9e par erreur.","privacy.v2.update.title":"Changements \u00e0 notre politique de confidentialit\u00e9","privacy.v2.update.intro.1":"Le contenu de notre politique de confidentialit\u00e9 a \u00e9t\u00e9 originalement \u00e9crit et le 4 d\u00e9cembre 2021 modifi\u00e9 pour la derni\u00e8re fois le 18 mars 2022.","privacy.v2.update.history.1.date":"2021/12/04","privacy.v2.update.history.1.desc.1":"Version originale","privacy.v2.update.history.2.date":"2022/03/18","privacy.v2.update.history.2.desc.1":"Mise-\u00e0-jour de la section sur la collection des donn\u00e9es.","privacy.v2.update.history.2.desc.2":"Ajout d'une mention de CloudFlare et ajout de liens vers leur politique de confidentialit\u00e9.","privacy.v2.update.history.2.desc.3":"Am\u00e9lioration de la section \"Changements \u00e0 notre politique de confidentialit\u00e9\".","privacy.v2.update.history.3.date":"2022/09/09","privacy.v2.update.history.3.desc.1":"Changement des r\u00e9f\u00e9rences aux services externes pour indiquer l'utilisation de v6Node.","privacy.v2.update.history.3.desc.1.1":"Ajout de mentions de v6Node et liens vers leur politique de vie confidentialit\u00e9.","privacy.v2.update.history.3.desc.1.2":"Suppression de mentions de CloudFlare.","privacy.v2.update.history.3.desc.2":"Changement de la section \"Cookies\" afin d'indiquer qu'ils ne seront plus utilis\u00e9s sur les domaines publics.","privacy.v2.update.end.2":"En cas de changement, vous serez clairement inform\u00e9 et une copie des anciennes versions de notre politique sera disponible au travers de cette page.","privacy.v2.third.title":"Organismes tiers","privacy.v2.third.intro.1":"Ce site web utilise les services propos\u00e9s par v6Node afin d'emp\u00eacher des acteurs malveillants d'y acc\u00e9der et dans le but de mettre en place un syst\u00e8me de reverse-proxy.","privacy.v2.third.intro.2":"Ceci a pour but d'am\u00e9liorer l'exp\u00e9rience des personnes le visitant gr\u00e2ce \u00e0 un syst\u00e8me de filtrage et caching priv\u00e9.","privacy.v2.third.intro.3":"Aucune des donn\u00e9es collect\u00e9es et stock\u00e9es par v6Node et le syst\u00e8me d\u00e9cris ci-dessus n'est utilis\u00e9 ou stock\u00e9.","privacy.v2.third.intro.4":"Si vous souhaitez consulter leur politique de confidentialit\u00e9 ainsi que celle de leur partenaires, vous pouvez le faire en suivant les liens ci-dessous:","privacy.v2.cookies.title":"Cookies de navigation","privacy.v2.cookies.intro.1":"Ce site web n'utilise pas, et ne stocke aucun cookies dans votre navigateur internet.","sidebar.alt.logo":"Logo du site web","sidebar.text.home":"Accueil","sidebar.text.projects":"Projets","sidebar.text.applications":"Applications","sidebar.text.libraries":"Librairies","sidebar.text.electronics":"\u00c9lectronique","sidebar.text.tools":"Outils","sidebar.text.links":"Liens","sidebar.text.downloads":"T\u00e9l\u00e9chargements","sidebar.text.gitea":"D\u00e9p\u00f4ts Git","sidebar.text.wiki":"Wiki","sidebar.text.about":"\u00c0-propos","sidebar.text.contact":"Contact","tools.head.title":"Outils - NibblePoker","tools.head.description":"TODO: description","tools.og.title":"NibblePoker - Outils","tools.og.description":"TODO: description","tools.header.title":"Outils"}} \ No newline at end of file +{"_compile_date":"2023-08-16T12:56:08.299253Z","en":{"about.head.title":"About - NibblePoker","about.head.description":"TODO: description","about.og.title":"NibblePoker - About","about.og.description":"TODO: description","about.header.title":"About","about.part.year.single":"year","about.part.year.multiple":"years","about.part.since":"since","about.education.title":"Education","about.skills.title":"Skills","about.work.title":"Work Experience","about.work.ctie.title":"Government IT Centre (CTIE)","about.work.ctie.role.1":"IoT Developer Internship","about.work.ctie.location":"Luxembourg","about.work.computrade.title":"CompuTrade Luxembourg Ltd","about.work.computrade.role.1":"Full & Half-time student job","about.work.computrade.location":"Steinfort, Luxembourg","about.work.lih.title":"Luxembourg Institute of Health (LIH)","about.work.lih.role.1":"IT Support Internship","about.work.lih.location":"Luxembourg","about.work.crlux.title":"Luxembourg Red Cross","about.work.crlux.role.1":"Volunteer Excel VBA programmer.","about.work.crlux.location":"Luxembourg","about.work.buttek.title":"Luxembourg Red Cross - Buttek","about.work.buttek.role.1":"Volunteer ???","about.work.buttek.role.2":"Student cashier ???","about.work.buttek.location":"Luxembourg","about.work.current.title":"Current employer kept private","about.work.current.role.1":"???","about.work.current.location":"Belgium","contact.head.title":"Contact - NibblePoker","contact.head.description":"TODO: description","contact.og.title":"NibblePoker - Contact","contact.og.description":"TODO: description","contact.header.title":"Contact","contact.email.title":"Email","contact.email.compose":"Send an email to herwin.bozet@gmail.com","contact.twitter.title":"Twitter","contact.twitter.compose":"Compose DM to @NibblePoker on Twitter","content.search.head.title":"Content search - NibblePoker","content.search.head.description":"TODO: description","content.search.og.title":"NibblePoker - Content search","content.search.og.description":"TODO: description","content.search.heading.main.single":"Search result","content.search.heading.main.multiple":"Search results","content.search.count.single":"result","content.search.count.multiple":"results","content.header.base":"Projects","content.search.header":"Search","content.error.header":"Error","content.error.head.title":"Content error - NibblePoker","content.error.og.title":"NibblePoker - Content error","content.error.heading.main.search":"Search error","content.error.heading.main.content":"Content error","content.error.heading.main.fallback":"Unknown error","content.error.message.none":"No explicit error was encountered.","content.error.message.tags.length":"The \"tags\" URL parameter is too long.","content.error.message.tags.alphanumeric":"One of the tags given in the \"tags\" URL parameter is not a valid alphanumeric string.","content.error.message.detect.empty":"No content could be found for the given tags.","content.error.message.id.alphanumeric":"The requested resource's ID isn't a valid alphanumeric string.","content.error.message.data.not.exist":"The requested content doesn't have an internal item file associated to it.","content.error.message.cannot.load":"The requested content couldn't be loaded on our end !","content.error.message.data.no.tags":"No tags found !","content.error.message.data.no.title":"No title found !","content.item.head.title.prefix":"","content.item.head.title.suffix":" - NibblePoker","content.item.og.title.prefix":"","content.item.og.title.suffix":" - NibblePoker","content.commons.version.current":"Current version","content.commons.version.previous.single":"Previous version","content.commons.version.previous.multiple":"Previous versions","content.commons.version.old.single":"Old version","content.commons.version.old.multiple":"Old versions","content.commons.version.source":"Source code","content.commons.cpu":"CPU Architecture","content.commons.cpu.responsive":"CPU Architecture","content.commons.cpu.any":"Any architecture","content.commons.cpu.x64":"x64","content.commons.cpu.x86":"x86","content.commons.cpu.arm":"arm","content.commons.cpu.arm64":"arm64","content.commons.na.italic":"N/A","content.commons.na":"N/A","content.commons.lang":"Language","content.commons.download.single":"Download","content.commons.download.multiple":"Downloads","content.commons.version":"Version","content.commons.github":"GitHub Repository","content.commons.gitea":"Self-hosted Gitea Repository","content.commons.nuget":"Nuget Package","content.commons.license.mit.single":"MIT License","content.commons.lang.english":"English","content.commons.lang.french":"French","content.commons.lang.luxembourgish":"Luxembourgish","content.commons.lang.english.639-3":"English (eng)","content.commons.lang.french.639-3":"French (fra)","content.commons.lang.luxembourgish.639-3":"Luxembourgish (ltz)","error.403.head.title":"403 - NibblePoker","error.403.head.description":"Access to the requested resource isn't unauthorized.","error.403.og.title":"NibblePoker - 403 Error","error.403.og.description":"Access to the requested resource isn't unauthorized.","error.403.header.title":"Error\u2771403 Error","error.404.head.title":"404 - NibblePoker","error.404.head.description":"The server couldn't find the requested resource.","error.404.og.title":"NibblePoker - 404 Error","error.404.og.description":"The server couldn't find the requested resource.","error.404.header.title":"Error\u2771404 Error","error.500.head.title":"500 - NibblePoker","error.500.head.description":"The server has encountered a situation it doesn't know how to handle.","error.500.og.title":"NibblePoker - 500 Error","error.500.og.description":"The server has encountered a situation it doesn't know how to handle.","error.500.header.title":"Error\u2771500 Error","error.skit.pc.dead":"Drawing of an old PC with a face with crossed eyes.","footer.text.privacy":"Privacy policy","footer.alt.sidebar.button":"Open and close the navigation sidebar.","footer.alt.logo":"Website's logo","home.head.title":"NibblePoker","home.head.description":"TODO: description","home.og.title":"NibblePoker","home.og.description":"TODO: description","home.header.title":"Homepage","home.showcase.title":"Showcase","home.updates.title":"Updates","home.updates.text.privacy":"\u25cf  Updated our privacy policy.","home.updates.2.date":"August 15 2023","home.updates.2.text.1":"\u25cf  The website is back online.","home.updates.2.text.2":"\u25cf  New and much lighter design.","home.updates.2.text.3":"\u25cf  Changed our host to HostBrr.","home.updates.2.text.4":"\u25cf  Added a section for web-based tools.","home.updates.1.date":"September 9 2022","home.updates.1.text.1":"\u25cf  Changed our host to v6Node.","lang.menu.title":"Language","lang.current":"English","lang.automatic":"Automatic","lang.english":"English","lang.french":"French","lang.german":"German","lang.luxembourgish":"Luxembourgish","links.head.title":"Links - NibblePoker","links.head.description":"TODO: description","links.og.title":"NibblePoker - Links","links.og.description":"TODO: description","links.header.title":"Links","privacy.head.title":"Privacy policy - NibblePoker","privacy.head.description":"Our privacy policy in a clear and easy to understand format.","privacy.og.title":"NibblePoker - Privacy Policy","privacy.og.description":"Our privacy policy in a clear and easy to understand format.","privacy.header.title":"Privacy policy","privacy.introduction.title":"Introduction","privacy.introduction.text.1":"This privacy policy is written in accordance with the 12th and 13th articles of the GDPR.","privacy.introduction.text.2":"If you wish to consult it, you can do so on the following websites:","privacy.contact.title":"How to contact us ?","privacy.contact.text.1":"If you wish to contact us for more information regarding our privacy policy, please contact us via the form included on the contact page, or at the following email address:","privacy.complaint.title":"How to contact the appropriate authorities ?","privacy.complaint.text.1":"Should you wish to report a complaint or if you feel that our privacy policy has not addressed your concern in a satisfactory manner, you may contact your national Data Protection Authority (DPA).","privacy.complaint.text.2":"More information on this procedure can be found on the following websites:","privacy.v2.data.title":"Data collection","privacy.v2.data.intro.1":"This websites only collects data through generic access logs in order to detect and block bad actors from accessing this website.","privacy.v2.data.intro.2":"None of the data collected is used for any other purpose, it is never shared with any other third-party and is never use in any sort of analytics.","privacy.v2.data.private.1":"Here is the list of private data being collected:","privacy.v2.data.private_list.1":"IP address","privacy.v2.data.private_list.2":"Browser's User-Agent","privacy.v2.data.non_private.1":"And here is the list of non-private data being collected:","privacy.v2.data.non_private_list.1":"Requested resource' URI","privacy.v2.data.non_private_list.2":"Date and time","privacy.v2.data.end.1":"Once the data has been logged in the access logs, it is automatically retrieved and processed by a locally-hosted application every 30 seconds and then deleted from said logs.","privacy.v2.data.end.2":"This application compares this information against a list of known threat sources, targets and behaviours and if a match is found, the private information is anonymized and stored for 7 days pending a manual review.","privacy.v2.data.end.3":"Once that 7 day period has elapsed, or once the report has been reviewed, all the relevant data is automatically deleted.","privacy.v2.data.end.4":"If your request wasn't flagged as potentially malicious, every data collected from it is thrown out instantly.","privacy.v2.data.end.5":"This process should normally never be triggered for regular traffic since most of the triggering actions are ones that should not be possible to accomplish through normal browsing.","privacy.v2.data.end.6":"However, this process isn't infallible and there is always an off chance that false positives may happen.","privacy.v2.update.title":"Changes to our privacy policy","privacy.v2.update.intro.1":"The content of this privacy policy was originally written on the 4th of December 2021 and was last updated on the 18th of March 2022.","privacy.v2.update.history.1.date":"2021/12/04","privacy.v2.update.history.1.desc.1":"Original version","privacy.v2.update.history.2.date":"2022/03/18","privacy.v2.update.history.2.desc.1":"Changed section on data collection to reflect new policy.","privacy.v2.update.history.2.desc.2":"Added mention about CloudFlare and linked to their privacy policy.","privacy.v2.update.history.2.desc.3":"Improved the \"Changes to our privacy policy\" section.","privacy.v2.update.history.3.date":"2022/09/09","privacy.v2.update.history.3.desc.1":"Changed references to external services to reflect the migration to v6Node.","privacy.v2.update.history.3.desc.1.1":"Added mention about v6Node and linked to their privacy policy.","privacy.v2.update.history.3.desc.1.2":"Removed mentions of CloudFlare.","privacy.v2.update.history.3.desc.2":"Changed the \"Cookies\" section to indicate that none should be used on public domains.","privacy.v2.update.end.2":"In the event of a change to our privacy policy, you will be informed explicitly, and a copy of previous versions of the policy will be available through this page.","privacy.v2.third.title":"Third Parties","privacy.v2.third.intro.1":"Our websites uses some services provided by v6Node in order to prevent bad actors from accessing this website and in order to put in place a reverse-proxy system.","privacy.v2.third.intro.2":"The goal of this system is to improve your browsing experience with the help of a private caching service and custom traffic filtering rules.","privacy.v2.third.intro.3":"None of the data that may be gathered by v6Node or the system described above is ever used or stored.","privacy.v2.third.intro.4":"If you'd wish to consult their privacy policy and their partners', you can do so by using the following URLs:","privacy.v2.cookies.title":"Cookies","privacy.v2.cookies.intro.1":"Our websites doesn't use nor store any cookies in your browser.","privacy.v2.personal.title":"Personal Measures & Convictions","privacy.v2.personal.disabled.intro":"While not required by any laws, we decided to improve your online privacy by disabling some features:","privacy.v2.personal.disabled.list.1":"Disabling hidden HTTP Referer system.","privacy.v2.personal.disabled.list.2":"Disabling Google's predatory Topics API and defunct Cohort ad-serving systems.","privacy.v2.personal.disabled.list.3":"Preventing any external third-party code from being injected into the page.","privacy.v2.personal.tracking.text.1":"It is our belief that the web and modern technology in general should never be used to track and spy on people in any way shape or form.","privacy.v2.personal.tracking.text.2":"We believe that any service that is in any way trying to force you to disable any ad-blocking or privacy-enhancing extensions should be avoided at all cost and shunned for their practices.","privacy.v2.personal.tracking.text.3":"Modern website should never break with those type of extensions unless they are purposefully built to track you to near-illegal extents, this excuse is only used to force you to accept these predatory practices.","privacy.v2.personal.recommendations":"We also strongly recommend you to read the ENISA's Privacy considerations of online behavioural tracking report in order to improve your online privacy.","sidebar.alt.logo":"Website's logo","sidebar.text.home":"Home","sidebar.text.projects":"Projects","sidebar.text.applications":"Applications","sidebar.text.libraries":"Libraries","sidebar.text.electronics":"Electronics","sidebar.text.tools":"Tools","sidebar.text.links":"Links","sidebar.text.downloads":"Downloads","sidebar.text.gitea":"Git Repos.","sidebar.text.wiki":"Wiki","sidebar.text.about":"About","sidebar.text.contact":"Contact","tools.head.title":"Tools - NibblePoker","tools.head.description":"TODO: description","tools.og.title":"NibblePoker - Tools","tools.og.description":"TODO: description","tools.header.title":"Tools"},"fr":{"about.head.title":"\u00c0-propos - NibblePoker","about.head.description":"TODO: description","about.og.title":"NibblePoker - \u00c0-propos","about.og.description":"TODO: description","about.header.title":"\u00c0-propos","contact.head.title":"Contact - NibblePoker","contact.head.description":"TODO: description","contact.og.title":"NibblePoker - Contact","contact.og.description":"TODO: description","contact.header.title":"Contact","contact.email.title":"Courriel","contact.email.compose":"Envoyer un courriel \u00e0 herwin.bozet@gmail.com","contact.twitter.title":"Twitter","contact.twitter.compose":"Composer un message priv\u00e9 pour @NibblePoker sur Twitter","content.search.head.title":"Recherche de contenu - NibblePoker","content.search.head.description":"TODO: description","content.search.og.title":"NibblePoker - Recherche de contenu","content.search.og.description":"TODO: description","content.search.heading.main.single":"R\u00e9sultat de recherche","content.search.heading.main.multiple":"R\u00e9sultats de recherche","content.search.count.single":"r\u00e9sultat","content.search.count.multiple":"r\u00e9sultats","content.header.base":"Projets","content.search.header":"Recherche","content.error.header":"Erreur","content.error.head.title":"Erreur de contenu - NibblePoker","content.error.og.title":"NibblePoker - Erreur de contenu","content.error.heading.main.search":"Erreur de recherche","content.error.heading.main.content":"Erreur de contenu","content.error.heading.main.fallback":"Erreur inconnue","content.error.message.none":"Aucune erreur n'a \u00e9t\u00e9 d\u00e9tect\u00e9e.","content.error.message.tags.length":"Le param\u00e8tre d'URL \"tags\" est trop long.","content.error.message.tags.alphanumeric":"Un des tags donn\u00e9 dans le param\u00e8tre d'URL \"tags\" n'est pas une cha\u00eene de texte alphanum\u00e9rique valide.","content.error.message.detect.empty":"Aucun contenu en rapport avec les tags choisi n'as \u00e9t\u00e9 trouv\u00e9.","content.error.message.id.alphanumeric":"L'ID de la ressource demand\u00e9e n'est pas une cha\u00eene de texte alphanum\u00e9rique valide.","content.error.message.data.not.exist":"Le contenu demand\u00e9e n'a pas de fichier de rendu interne associ\u00e9.","content.error.message.cannot.load":"Le contenu demand\u00e9 n'a pas pu \u00eatre charg\u00e9 de notre c\u00f4t\u00e9 !","content.error.message.data.no.tags":"Aucun tag trouv\u00e9 !","content.error.message.data.no.title":"Aucun titre trouv\u00e9 !","content.item.head.title.prefix":"","content.item.head.title.suffix":" - NibblePoker","content.item.og.title.prefix":"","content.item.og.title.suffix":" - NibblePoker","content.commons.version.current":"Version actuelle","content.commons.version.previous.single":"Version pr\u00e9c\u00e9dente","content.commons.version.previous.multiple":"Versions pr\u00e9c\u00e9dentes","content.commons.version.old.single":"Ancienne version","content.commons.version.old.multiple":"Anciennes versions","content.commons.version.source":"Code source","content.commons.cpu":"Architecture de CPU","content.commons.cpu.any":"Ind\u00e9pendante","content.commons.cpu.x64":"x64","content.commons.cpu.x86":"x86","content.commons.cpu.arm":"arm","content.commons.cpu.arm64":"arm64","content.commons.na.italic":"N/A","content.commons.na":"N/A","content.commons.lang":"Langue","content.commons.download.single":"T\u00e9l\u00e9chargement","content.commons.download.multiple":"T\u00e9l\u00e9chargements","content.commons.version":"Version","content.commons.github":"D\u00e9p\u00f4t GitHub","content.commons.gitea":"D\u00e9p\u00f4t Gitea auto-h\u00e9berg\u00e9","content.commons.nuget":"Packet Nuget","content.commons.license.mit.single":"License MIT","content.commons.lang.english":"Anglais","content.commons.lang.french":"Fran\u00e7ais","content.commons.lang.luxembourgish":"Luxembourgeois","content.commons.lang.english.639-3":"Anglais (eng)","content.commons.lang.french.639-3":"Fran\u00e7ais (fra)","content.commons.lang.luxembourgish.639-3":"Luxembourgeois (ltz)","footer.text.privacy":"Politique de confidentialit\u00e9","footer.alt.sidebar.button":"Ouvrir et fermer le menu lat\u00e9ral de navigation.","footer.alt.logo":"Logo du site web","home.head.title":"NibblePoker","home.head.description":"TODO: description","home.og.title":"NibblePoker","home.og.description":"TODO: description","home.header.title":"Page d'accueil","home.showcase.title":"Vitrine","home.updates.title":"Updates","home.updates.text.privacy":"\u25cf  Mise-\u00e0-jour de notre politique de confidentialit\u00e9.","home.updates.2.date":"15 Ao\u00fbt 2023","home.updates.2.text.1":"\u25cf  Le site internet est \u00e0 nouveau disponible.","home.updates.2.text.2":"\u25cf  Mise en place d'un nouveau design plus l\u00e9ger.","home.updates.2.text.3":"\u25cf  Changement d'h\u00e9bergeur vers HostBrr.","home.updates.2.text.4":"\u25cf  Ajout d'une nouvelle section pour les outils.","home.updates.1.date":" 9 Septembre 2022","home.updates.1.text.1":"\u25cf  Changement d'h\u00e9bergeur vers v6Node.","lang.menu.title":"Langue","lang.current":"Fran\u00e7ais","lang.automatic":"Automatique","lang.english":"Anglais","lang.french":"Fran\u00e7ais","lang.german":"Allemand","lang.luxembourgish":"Luxembourgeois","links.head.title":"Liens - NibblePoker","links.head.description":"TODO: description","links.og.title":"NibblePoker - Liens","links.og.description":"TODO: description","links.header.title":"Liens","privacy.head.title":"Politique de confidentialit\u00e9 - NibblePoker","privacy.head.description":"Notre politique de confidentialit\u00e9 dans un format clair et compr\u00e9hensible.","privacy.og.title":"NibblePoker - Politique de confidentialit\u00e9","privacy.og.description":"Notre politique de confidentialit\u00e9 dans un format clair et compr\u00e9hensible.","privacy.header.title":"Politique de confidentialit\u00e9","privacy.introduction.title":"Introduction","privacy.introduction.text.1":"La politique de confidentialit\u00e9 ci-pr\u00e9sente a \u00e9t\u00e9 \u00e9crite en accord avec les articles 12 et 13 de la RGPD.","privacy.introduction.text.2":"Si vous souhaitez consulter le texte officiel en question, vous pouvez le faire sur les sites internet suivants :","privacy.contact.title":"Comment nous contacter ?","privacy.contact.text.1":"Si vous souhaitez nous contacter afin d'obtenir plus d'informations concernant notre politique de confidentialit\u00e9, nous vous recommandons d'utiliser le formulaire pr\u00e9sent sur la page de contact, ou par courriel \u00e0 l'adresse suivante:","privacy.complaint.title":"Comment contacter les autorit\u00e9s comp\u00e9tentes ?","privacy.complaint.text.1":"Dans l'\u00e9ventualit\u00e9 o\u00f9 vous souhaiteriez d\u00e9poser une plainte pour une quelconque raison en rapport avec notre politique de confidentialit\u00e9, veuillez vous adresser \u00e0 l'autorit\u00e9 nationale de protection des donn\u00e9es (DPA).","privacy.complaint.text.2":"Les informations concernant cette proc\u00e9dure peuvent \u00eatre trouv\u00e9es sur les sites internet suivants:","privacy.v2.data.title":"Collecte de donn\u00e9es","privacy.v2.data.intro.1":"Ce site web collecte des donn\u00e9es au travers des journaux d'\u00e9v\u00e8nements afin de d\u00e9tecter et bloquer de potentiels acteurs malveillants.","privacy.v2.data.intro.2":"Les donn\u00e9es collect\u00e9es ne sont en aucun cas utilis\u00e9es pour une quelconque autre raison.","privacy.v2.data.private.1":"Voici la liste des donn\u00e9es personelles collect\u00e9es:","privacy.v2.data.private_list.1":"L'addresse IP source","privacy.v2.data.private_list.2":"Le \"User-Agent\" de votre navigateur internet","privacy.v2.data.non_private.1":"Et voici la liste des donn\u00e9es non-personelles collect\u00e9es:","privacy.v2.data.non_private_list.1":"L'URI de la ressource demand\u00e9e","privacy.v2.data.non_private_list.2":"La date et l'heure","privacy.v2.data.end.1":"Les donn\u00e9es pr\u00e9sentes dans les journaux d'\u00e9v\u00e8nements sont extraites et retir\u00e9es pour \u00eatre trait\u00e9es par une application qui tourne en local toute les 30 secondes.","privacy.v2.data.end.2":"L'application en question utilise et compare ces informations avec une liste d'acteurs malveillants et comportement suspects connus.
Si une correspondance est d\u00e9tect\u00e9e, les informations priv\u00e9es sont anonymis\u00e9es et sont stock\u00e9es pendant 7 jours en attendant qu'un examen manuel soit effectu\u00e9.","privacy.v2.data.end.3":"Apr\u00e8s cette p\u00e9riode de 7 jours, ou apr\u00e8s qu'un examen ait \u00e9t\u00e9 effectu\u00e9, les donn\u00e9es sont automatiquement supprim\u00e9es.","privacy.v2.data.end.4":"Toute information concernant une requ\u00eate non suspecte est automatiquement supprim\u00e9e.","privacy.v2.data.end.5":"Ce processus n'est normalement jamais utilis\u00e9 sur des requ\u00eates provenant d'un trafic l\u00e9gitime d\u00fb au fait qu'il isole principalement les actions et requ\u00eates qui ne devraient pas \u00eatre possible sur ce site.","privacy.v2.data.end.6":"Cependant, ce processus n'est pas infaillible et il est toujours possible qu'une requ\u00eate soit isol\u00e9e par erreur.","privacy.v2.update.title":"Changements \u00e0 notre politique de confidentialit\u00e9","privacy.v2.update.intro.1":"Le contenu de notre politique de confidentialit\u00e9 a \u00e9t\u00e9 originalement \u00e9crit et le 4 d\u00e9cembre 2021 modifi\u00e9 pour la derni\u00e8re fois le 18 mars 2022.","privacy.v2.update.history.1.date":"2021/12/04","privacy.v2.update.history.1.desc.1":"Version originale","privacy.v2.update.history.2.date":"2022/03/18","privacy.v2.update.history.2.desc.1":"Mise-\u00e0-jour de la section sur la collection des donn\u00e9es.","privacy.v2.update.history.2.desc.2":"Ajout d'une mention de CloudFlare et ajout de liens vers leur politique de confidentialit\u00e9.","privacy.v2.update.history.2.desc.3":"Am\u00e9lioration de la section \"Changements \u00e0 notre politique de confidentialit\u00e9\".","privacy.v2.update.history.3.date":"2022/09/09","privacy.v2.update.history.3.desc.1":"Changement des r\u00e9f\u00e9rences aux services externes pour indiquer l'utilisation de v6Node.","privacy.v2.update.history.3.desc.1.1":"Ajout de mentions de v6Node et liens vers leur politique de vie confidentialit\u00e9.","privacy.v2.update.history.3.desc.1.2":"Suppression de mentions de CloudFlare.","privacy.v2.update.history.3.desc.2":"Changement de la section \"Cookies\" afin d'indiquer qu'ils ne seront plus utilis\u00e9s sur les domaines publics.","privacy.v2.update.end.2":"En cas de changement, vous serez clairement inform\u00e9 et une copie des anciennes versions de notre politique sera disponible au travers de cette page.","privacy.v2.third.title":"Organismes tiers","privacy.v2.third.intro.1":"Ce site web utilise les services propos\u00e9s par v6Node afin d'emp\u00eacher des acteurs malveillants d'y acc\u00e9der et dans le but de mettre en place un syst\u00e8me de reverse-proxy.","privacy.v2.third.intro.2":"Ceci a pour but d'am\u00e9liorer l'exp\u00e9rience des personnes le visitant gr\u00e2ce \u00e0 un syst\u00e8me de filtrage et caching priv\u00e9.","privacy.v2.third.intro.3":"Aucune des donn\u00e9es collect\u00e9es et stock\u00e9es par v6Node et le syst\u00e8me d\u00e9cris ci-dessus n'est utilis\u00e9 ou stock\u00e9.","privacy.v2.third.intro.4":"Si vous souhaitez consulter leur politique de confidentialit\u00e9 ainsi que celle de leur partenaires, vous pouvez le faire en suivant les liens ci-dessous:","privacy.v2.cookies.title":"Cookies de navigation","privacy.v2.cookies.intro.1":"Ce site web n'utilise pas, et ne stocke aucun cookies dans votre navigateur internet.","sidebar.alt.logo":"Logo du site web","sidebar.text.home":"Accueil","sidebar.text.projects":"Projets","sidebar.text.applications":"Applications","sidebar.text.libraries":"Librairies","sidebar.text.electronics":"\u00c9lectronique","sidebar.text.tools":"Outils","sidebar.text.links":"Liens","sidebar.text.downloads":"T\u00e9l\u00e9chargements","sidebar.text.gitea":"D\u00e9p\u00f4ts Git","sidebar.text.wiki":"Wiki","sidebar.text.about":"\u00c0-propos","sidebar.text.contact":"Contact","tools.head.title":"Outils - NibblePoker","tools.head.description":"TODO: description","tools.og.title":"NibblePoker - Outils","tools.og.description":"TODO: description","tools.header.title":"Outils"}} \ No newline at end of file diff --git a/compile.bat b/compile.bat index e20ddd3..4cf9cd0 100644 --- a/compile.bat +++ b/compile.bat @@ -69,8 +69,8 @@ echo ----------------------------- echo Cleaning... pushd %CD% cd %~dp0\tools\items\formula-wizard\src\ -del *.js -del *.map +del *.js 2>nul +del *.map 2>nul popd :formula-wizard-compile @@ -84,14 +84,15 @@ popd echo Fixing imports... pushd %CD% cd %~dp0\tools\items\formula-wizard\src\ -call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js" "decimal" "decimal.min.mjs" -call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js" "lang" "lang.js" -call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js" "formulas" "formulas.js" -call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js" "units" "units.js" -call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js" "ui_catalog" "ui_catalog.js" -call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js" "mvc_context" "mvc_context.js" -call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js" "sets" "sets.js" -call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js" "mvc_formula" "mvc_formula.js" +call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js;utils_templates.js" "decimal" "decimal.min.mjs" +call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js;utils_templates.js" "lang" "lang.js" +call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js;utils_templates.js" "formulas" "formulas.js" +call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js;utils_templates.js" "units" "units.js" +call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js;utils_templates.js" "ui_catalog" "ui_catalog.js" +call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js;utils_templates.js" "mvc_context" "mvc_context.js" +call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js;utils_templates.js" "sets" "sets.js" +call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js;utils_templates.js" "mvc_formula" "mvc_formula.js" +call node "%~dp0fix-import-path.js" "formulas.js;lang.js;main.js;units.js;ui_catalog.js;mvc_context.js;sets.js;mvc_formula.js;utils_templates.js" "utils_templates" "utils_templates.js" popd :formula-wizard-bundle @@ -113,6 +114,7 @@ call "%~dp0node_modules\.bin\terser" ui_catalog.js -c -m --toplevel -o ui_catalo call "%~dp0node_modules\.bin\terser" mvc_context.js -c -m --toplevel -o mvc_context.min.js call "%~dp0node_modules\.bin\terser" sets.js -c -m --toplevel -o sets.min.js call "%~dp0node_modules\.bin\terser" mvc_formula.js -c -m --toplevel -o mvc_formula.min.js +call "%~dp0node_modules\.bin\terser" utils_templates.js -c -m --toplevel -o utils_templates.min.js call "%~dp0node_modules\.bin\terser" formula-wizard.js -c -m --toplevel -o formula-wizard.min.js popd diff --git a/tools/items/formula-wizard/page.php b/tools/items/formula-wizard/page.php index 277651b..46a8960 100644 --- a/tools/items/formula-wizard/page.php +++ b/tools/items/formula-wizard/page.php @@ -212,7 +212,6 @@ echo(getMainHeader(localize("tool.formula-wizard.workbench"), null, null, null, -
diff --git a/tools/items/formula-wizard/src/lang.ts b/tools/items/formula-wizard/src/lang.ts index 178c640..d71694d 100644 --- a/tools/items/formula-wizard/src/lang.ts +++ b/tools/items/formula-wizard/src/lang.ts @@ -1,4 +1,4 @@ -// TODO: Move into a common lib with parameter support ! +// TODO: Move into a common lib with parameter support! export const langKey= document.documentElement.lang.match("(en|fr)") ? document.documentElement.lang : "en"; diff --git a/tools/items/formula-wizard/src/main.ts b/tools/items/formula-wizard/src/main.ts index 003a19e..b7e8181 100644 --- a/tools/items/formula-wizard/src/main.ts +++ b/tools/items/formula-wizard/src/main.ts @@ -1,5 +1,5 @@ /*! - * Formula Wizard v0.0.3 + * NibblePoker - Formula Wizard * [Short desc here] * https://github.com/aziascreations/Web-NibblePoker * Copyright (c) 2023 Herwin Bozet @@ -7,7 +7,7 @@ */ // Preparing some things before the import statements. -const version = [0, 0, 2]; +const version = [0, 0, 3]; console.log("Initializing 'Formula Wizard v" + version.join(".") + "'..."); const startTime = new Date().getMilliseconds(); @@ -27,7 +27,7 @@ Decimal.set({ precision: 25, rounding: 8 }); initUnits(); initFormulas(); -// Preparing the UI +// Preparing the UI & MVC stuff initCatalog(); setupWorkbenchContext(); setupWorkbenchFormula(); @@ -35,6 +35,8 @@ setupWorkbenchFormula(); // ??? // Tests -console.log(localize("joe.mama")); console.log(units); console.log(formulas); + +const endTime = new Date().getMilliseconds(); +console.log("Done, took " + (endTime - startTime) + "ms !"); diff --git a/tools/items/formula-wizard/src/mvc_formula.ts b/tools/items/formula-wizard/src/mvc_formula.ts index c807aa5..6dbb782 100644 --- a/tools/items/formula-wizard/src/mvc_formula.ts +++ b/tools/items/formula-wizard/src/mvc_formula.ts @@ -3,11 +3,12 @@ * [Short desc here] * https://github.com/aziascreations/Web-NibblePoker * Copyright (c) 2023 Herwin Bozet - * Unlicense Licence */ import {localize} from "./lang"; import {isCatalogInitialized, catalogFormulas} from "./ui_catalog"; +import {FormulaValue, FormulaVariant} from "./formulas"; +import {retrieveTemplate, makeElementFromFragment, appendToAllIds} from "./utils_templates"; // ----------- // Constants @@ -18,6 +19,17 @@ const ID_TEMPLATE_FORMULA_VALUE = ID_TEMPLATE_FORMULA + "-value"; const ID_FORMULA_PREFIX = "fw-workbench-formula-"; const ID_FORMULA_SPAWN_POINT = ID_FORMULA_PREFIX + "spawn"; +const ID_FORMULA_NAME = ID_FORMULA_PREFIX + "name"; +const ID_FORMULA_INPUTS = ID_FORMULA_PREFIX + "inputs"; +const ID_FORMULA_OUTPUTS = ID_FORMULA_PREFIX + "outputs"; + +const ID_FORMULA_VALUE_PREFIX = ID_FORMULA_PREFIX + "value-"; +const ID_FORMULA_VALUE_ID = ID_FORMULA_VALUE_PREFIX + "id"; +const ID_FORMULA_VALUE_NAME = ID_FORMULA_VALUE_PREFIX + "name"; +const ID_FORMULA_VALUE_LINK = ID_FORMULA_VALUE_PREFIX + "link"; +const ID_FORMULA_VALUE_TEST_VALUE = ID_FORMULA_VALUE_PREFIX + "test-value"; +const ID_FORMULA_VALUE_TEST_SCALE = ID_FORMULA_VALUE_PREFIX + "test-scale"; +const ID_FORMULA_VALUE_TEST_VALUE_SET = ID_FORMULA_VALUE_PREFIX + "test-value-set"; //const idWorkbenchFormulaPrefix = "fw-workbench-formula-"; //const idWorkbenchFormulaSpawnPoint = idWorkbenchFormulaPrefix + "spawn"; @@ -40,12 +52,14 @@ const ID_FORMULA_SPAWN_POINT = ID_FORMULA_PREFIX + "spawn"; //const idFormulaValueTestValueSet = idFormulaValuePrefix + "test-value-set"; + + // --------- // Globals // --------- -let eTemplateWorkbenchFormula: HTMLElement | DocumentFragment | null = null; -let eTemplateWorkbenchFormulaValue: HTMLElement | DocumentFragment | null = null; +let eTemplateWorkbenchFormula: DocumentFragment | null = null; +let eTemplateWorkbenchFormulaValue: DocumentFragment | null = null; export let workbenchFormulas: WorkbenchFormula[] = []; @@ -56,12 +70,30 @@ export let workbenchFormulas: WorkbenchFormula[] = []; function deleteWorkbenchFormula(deletedFormula: WorkbenchFormula, removeDom: boolean = true) { workbenchFormulas = workbenchFormulas.filter(item => item !== deletedFormula); - //if(removeDom) { - // //deletedFormula.uiElement - //} - //if(workbenchContextComponents.length < 1) { - // eContextStatusMessage!.hidden = false; - //} + if(removeDom) { + deletedFormula.uiElement.eRootElement.remove(); + } +} + +function handleCatalogInsertion(formulaVariant: FormulaVariant, eSpawnPointAnchor: HTMLAnchorElement) { + console.group("Adding new formula to workbench..."); + + console.debug("Instantiating 'WorkbenchFormula'..."); + const newWorkbenchFormula = new WorkbenchFormula( + eTemplateWorkbenchFormula as DocumentFragment, + eTemplateWorkbenchFormulaValue as DocumentFragment, + formulaVariant + ); + + console.debug("Registering controller..."); + workbenchFormulas.push(newWorkbenchFormula); + + console.debug("Adding to workbench's DOM..."); + eSpawnPointAnchor!.parentNode!.insertBefore(newWorkbenchFormula.uiElement.eRootElement, eSpawnPointAnchor); + + console.debug(newWorkbenchFormula); + + console.groupEnd(); } // -------------------- @@ -76,29 +108,90 @@ enum EWorkbenchFormulaValueTypes { class WorkbenchFormulaValueData { id: string; + valueType: EWorkbenchFormulaValueTypes + formulaValue: FormulaValue; - constructor(controllerId: string) { + constructor(controllerId: string, valueType: EWorkbenchFormulaValueTypes, formulaValue: FormulaValue) { this.id = controllerId; + this.valueType = valueType; + this.formulaValue = formulaValue; } } class WorkbenchFormulaValueInterface { + public eRootElement: HTMLElement; + private readonly eFormulaValueId: HTMLInputElement; + private readonly eFormulaValueName: HTMLParagraphElement; + private readonly eFormulaValueLink: HTMLSelectElement; + private readonly eFormulaValueTestValue: HTMLInputElement; + private readonly eFormulaValueTestScale: HTMLSelectElement; + private readonly eFormulaValueTestValueSet: HTMLInputElement; + + constructor(eRootFragment: DocumentFragment, setupValueType: EWorkbenchFormulaValueTypes) { + this.eRootElement = makeElementFromFragment(eRootFragment); + + // Grabbing references to all the form's fields. + this.eFormulaValueId = this.eRootElement.querySelector(`input#${ID_FORMULA_VALUE_ID}`)!; + this.eFormulaValueName = this.eRootElement.querySelector(`p#${ID_FORMULA_VALUE_NAME}`)!; + this.eFormulaValueLink = this.eRootElement.querySelector(`select#${ID_FORMULA_VALUE_LINK}`)!; + this.eFormulaValueTestValue = this.eRootElement.querySelector(`input#${ID_FORMULA_VALUE_TEST_VALUE}`)!; + this.eFormulaValueTestScale = this.eRootElement.querySelector(`select#${ID_FORMULA_VALUE_TEST_SCALE}`)!; + this.eFormulaValueTestValueSet = this.eRootElement.querySelector(`select#${ID_FORMULA_VALUE_TEST_VALUE_SET}`)!; + + if([this.eFormulaValueId, this.eFormulaValueName, this.eFormulaValueLink, this.eFormulaValueTestValue, + this.eFormulaValueTestScale, this.eFormulaValueTestValueSet].some((item) => item === null)) { + alert("error.ui.formula.value.missingElement"); + throw Error("error.ui.formula.value.missingElement"); + } + + //// Adding the relevant scale factors. + //populateScaleSelectForUnit(this.formulaValue.unit, this.eFormulaValueTestScale, this.formulaValue.scaleFactor); + + //if(setupValueType === EWorkbenchFormulaValueTypes.INPUT) { + // this.setupInput(); + //} else { + // this.setupOutput(); + //} + } + + toggleField(eFormField: HTMLElement, hidden: boolean) { + // We hide the parent "tr" element. + (eFormField.parentNode!.parentNode! as HTMLElement).hidden = hidden; + } + + private setupInput() { + this.toggleField(this.eFormulaValueId, true); + this.eFormulaValueTestValue.value = "0"; + //this.eFormulaValueTestValue.onchange = this.onTestFieldChange.bind(this); + //this.eFormulaValueTestScale.onchange = this.onTestFieldChange.bind(this); + } + + private setupOutput() { + this.toggleField(this.eFormulaValueLink, true); + //this.eFormulaValueTestValue.readOnly = true; + //this.eFormulaValueTestScale.onchange = this.onTestFieldChange.bind(this); + } + + setName(newName: string) { + this.eFormulaValueName.innerText = newName; + } } class WorkbenchFormulaValue { - uiElement: WorkbenchFormulaValueInterface; data: WorkbenchFormulaValueData; + uiElement: WorkbenchFormulaValueInterface; - constructor(uiElement: WorkbenchFormulaValueInterface, data: WorkbenchFormulaValueData) { - this.uiElement = uiElement; - this.data = data; + constructor(eRootFragment: DocumentFragment, valueType: EWorkbenchFormulaValueTypes, + parentAssignedControllerId: string, formulaValue: FormulaValue) { + this.data = new WorkbenchFormulaValueData(parentAssignedControllerId, valueType, formulaValue); + this.uiElement = new WorkbenchFormulaValueInterface(eRootFragment, valueType); + + this.setName(`${this.data.formulaValue.unit.name} (${this.data.formulaValue.unit.symbol})`); } - public static createNew(eRootElement: HTMLElement): WorkbenchFormulaValue { - const id: string = Date.now().toString(); - - return null!; + setName(newName: string) { + this.uiElement.setName(newName); } } @@ -109,29 +202,88 @@ class WorkbenchFormulaValue { class WorkbenchFormulaData { id: string; + formulaVariant: FormulaVariant; - constructor(controllerId: string) { + constructor(controllerId: string, formulaVariant: FormulaVariant) { this.id = controllerId; + this.formulaVariant = formulaVariant; } } class WorkbenchFormulaInterface { + public eRootElement: HTMLElement; + private readonly eTitle: HTMLParagraphElement; + public readonly eInputsContainer: HTMLDivElement; + public readonly eOutputsContainer: HTMLDivElement; + + constructor(eRootFragment: DocumentFragment) { + this.eRootElement = makeElementFromFragment(eRootFragment); + + this.eTitle = this.eRootElement.querySelector(`p#${ID_FORMULA_NAME}`)!; + this.eInputsContainer = this.eRootElement.querySelector(`div#${ID_FORMULA_INPUTS}`)!; + this.eOutputsContainer = this.eRootElement.querySelector(`div#${ID_FORMULA_OUTPUTS}`)!; + + if([this.eTitle, this.eInputsContainer, this.eOutputsContainer].some((item) => item === null)) { + alert(localize("error.ui.formula.missingElement")); + throw Error(localize("error.ui.formula.missingElement")); + } + } + + setTitle(newTitle: string) { + this.eTitle.innerText = newTitle; + } } class WorkbenchFormula { uiElement: WorkbenchFormulaInterface; data: WorkbenchFormulaData; - constructor(uiElement: WorkbenchFormulaInterface, data: WorkbenchFormulaData) { - this.uiElement = uiElement; - this.data = data; - } + inputControllers: WorkbenchFormulaValue[]; + outputControllers: WorkbenchFormulaValue[]; - public static createNew(eRootElement: HTMLElement): WorkbenchFormula { + constructor(fragRootElement: DocumentFragment, fragValueElement: DocumentFragment, formulaVariant: FormulaVariant) { const id: string = Date.now().toString(); - return null!; + // Preparing core MVC components. + this.uiElement = new WorkbenchFormulaInterface(fragRootElement); + this.data = new WorkbenchFormulaData(id, formulaVariant); + + // Preparing children MVC components. + let valueIdSuffix = 0; + this.inputControllers = this.data.formulaVariant.getInputValuesDefinition().map( + inputFormulaValue => new WorkbenchFormulaValue( + fragValueElement, + EWorkbenchFormulaValueTypes.INPUT, + this.data.id + (valueIdSuffix++).toString(), + inputFormulaValue + ) + ); + this.outputControllers = [this.data.formulaVariant.getOutputValueDefinition()].map( + outputFormulaValue => new WorkbenchFormulaValue( + fragValueElement, + EWorkbenchFormulaValueTypes.OUTPUT, + this.data.id + (valueIdSuffix++).toString(), + outputFormulaValue + ) + ); + + // Preparing the interface... + this.setTitle(this.data.formulaVariant.parentFormula.name); + + // Adding the value elements into their proper container. + this.inputControllers.every(inputController => + this.uiElement.eInputsContainer.appendChild(inputController.uiElement.eRootElement)); + this.outputControllers.every(outputController => + this.uiElement.eOutputsContainer.appendChild(outputController.uiElement.eRootElement)); + + // Finalizing the interface by making its IDs unique. + // This is purely a UX thing to ensure proper input selection via the labels. + appendToAllIds(this.uiElement.eRootElement, this.data.id); + } + + public setTitle(newTitle: string) { + this.uiElement.setTitle(newTitle); } } @@ -153,16 +305,9 @@ export function setupWorkbenchFormula() { throw Error(localize("error.ui.workbench.catalog.no-init")); } - console.debug("Grabbing & processing the templates from the DOM..."); - eTemplateWorkbenchFormula = document.getElementById(ID_TEMPLATE_FORMULA); - eTemplateWorkbenchFormulaValue = document.getElementById(ID_TEMPLATE_FORMULA_VALUE); - if(eTemplateWorkbenchFormula === null || eTemplateWorkbenchFormulaValue === null) { - console.groupEnd(); - alert(localize("error.ui.workbench.noTemplate")); - throw Error(localize("error.ui.workbench.noTemplate")); - } - eTemplateWorkbenchFormula = (eTemplateWorkbenchFormula.cloneNode(true) as HTMLTemplateElement).content; - eTemplateWorkbenchFormulaValue = (eTemplateWorkbenchFormulaValue.cloneNode(true) as HTMLTemplateElement).content; + console.debug("Grabbing, processing & removing the templates from the DOM..."); + eTemplateWorkbenchFormula = retrieveTemplate(ID_TEMPLATE_FORMULA, true); + eTemplateWorkbenchFormulaValue = retrieveTemplate(ID_TEMPLATE_FORMULA_VALUE, true); console.debug("Grabbing the anchor point for new formulas..."); const eWorkbenchFormulaSpawnPoint: HTMLAnchorElement | null = document.querySelector(`a#${ID_FORMULA_SPAWN_POINT}`); @@ -172,10 +317,16 @@ export function setupWorkbenchFormula() { throw Error(localize("error.ui.workbench.noAnchor")); } - // catalogFormulas - - + console.debug("Preparing the catalog's buttons actions & inserting them in the DOM"); + catalogFormulas.forEach(catalogFormula => { + for(let iVariant = 0; iVariant < catalogFormula.formula.variants.length; iVariant++) { + catalogFormula.eVariantButtons[iVariant].onclick = function (){ + handleCatalogInsertion(catalogFormula.formula.variants[iVariant], eWorkbenchFormulaSpawnPoint); + } + } + catalogFormula.insertIntoCategories(); + }); isWorkbenchFormulaSetup = true; diff --git a/tools/items/formula-wizard/src/tsconfig.json b/tools/items/formula-wizard/src/tsconfig.json new file mode 100644 index 0000000..808ade1 --- /dev/null +++ b/tools/items/formula-wizard/src/tsconfig.json @@ -0,0 +1,127 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2019", + /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "ES6", + /* Specify what module code is generated. */ + "rootDir": "./", + /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + "sourceMap": true, + /* Create source map files for emitted JavaScript files. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + //"outFile": "./formula-wizard.js", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + "removeComments": true, + /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, + /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, + /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, + /* Enable all strict type-checking options. */ + "noImplicitAny": true, + /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + "noImplicitThis": true, + /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + "alwaysStrict": true, + /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true + /* Skip type checking all .d.ts files. */ + }, + "files": [ + "./main.ts" + ], + "exclude": [ + "../../../../resources/DecimalJs/10.4.3" + ] +} \ No newline at end of file diff --git a/tools/items/formula-wizard/src/utils_templates.ts b/tools/items/formula-wizard/src/utils_templates.ts new file mode 100644 index 0000000..7563165 --- /dev/null +++ b/tools/items/formula-wizard/src/utils_templates.ts @@ -0,0 +1,63 @@ +// TODO: Move into a common lib at some point ! + +import {localize} from "./lang"; + +/** + * Retrieves a `template` element from the current document and returns it while optionally removing it from the DOM. + * @param templateId + * @param removeFromDocument + */ +export function retrieveTemplate(templateId: string, removeFromDocument: boolean): DocumentFragment { + const retrievedTemplate = document.querySelector(`template#${templateId}`); + + if(retrievedTemplate === null) { + alert(localize("error.templatator.template.404")); + throw Error(localize("error.templatator.template.404")); + } + + const templateFragment = (retrievedTemplate.cloneNode(true) as HTMLTemplateElement).content; + + if(removeFromDocument) { + retrievedTemplate.remove(); + } + + return templateFragment; +} + +/** + * Converts a given `DocumentFragment` in a cloned `HTMLElement` that can be manipulated and inserted back into the DOM. + * @param fragment + */ +export function makeElementFromFragment(fragment: DocumentFragment): HTMLElement { + return (fragment.cloneNode(true) as DocumentFragment).firstElementChild as HTMLElement; +} + +export function wipeAllIds(eRootElement: HTMLElement, doLabels: boolean = true): void { + eRootElement.querySelectorAll(`*`).forEach(eElement => { + if(eElement.hasAttribute("id")) { + eElement.removeAttribute("id"); + } + }); + if(doLabels) { + eRootElement.querySelectorAll(`label`).forEach(eLabel => { + if (eLabel.hasAttribute("for")) { + eLabel.removeAttribute("for"); + } + }); + } +} + +export function appendToAllIds(eRootElement: HTMLElement, newIdSuffix: string, doLabels: boolean = true): void { + eRootElement.querySelectorAll(`input, select, p, div`).forEach(eElement => { + if(eElement.hasAttribute("id")) { + eElement.setAttribute("id", eElement.getAttribute("id") + newIdSuffix); + } + }); + if(doLabels) { + eRootElement.querySelectorAll(`label`).forEach(eLabel => { + if(eLabel.hasAttribute("for")) { + eLabel.setAttribute("for", eLabel.getAttribute("for") + newIdSuffix); + } + }); + } +}