diff --git a/e2e/compute-reset-chained-links.e2e-spec.ts b/e2e/compute-reset-chained-links.e2e-spec.ts index dc72e70c07c07f8c04bfed9bb41286b03c22a127..bed024d00f8fee1cb06c5bc2408fce547a221500 100644 --- a/e2e/compute-reset-chained-links.e2e-spec.ts +++ b/e2e/compute-reset-chained-links.e2e-spec.ts @@ -37,7 +37,7 @@ describe("ngHyd − compute then reset chained results", () => { expect(await navbar.getAllCalculatorTabs().count()).toBe(3); // 1. get down-most module - await navbar.clickCalculatorTabForUid("dWs5bm"); + await navbar.clickCalculatorTabForUid("Y2l2Y3"); // check that "compute" button is active const calcButton = calcPage.getCalculateButton(); @@ -49,15 +49,15 @@ describe("ngHyd − compute then reset chained results", () => { // only down-most module should have results let hasResults = await calcPage.hasResults(); // other two should not - await navbar.clickCalculatorTabForUid("OGFzOH"); + await navbar.clickCalculatorTabForUid("ZTFxeW"); hasResults = await calcPage.hasResults(); expect(hasResults).toBe(false); - await navbar.clickCalculatorTabForUid("NWp1a3"); + await navbar.clickCalculatorTabForUid("Z3EwY2"); hasResults = await calcPage.hasResults(); expect(hasResults).toBe(false); // 2. get up-most module - await navbar.clickCalculatorTabForUid("OGFzOH"); + await navbar.clickCalculatorTabForUid("ZTFxeW"); // modify any input (for ex. "Ks") await calcPage.getInputById("Ks").clear(); @@ -83,7 +83,7 @@ describe("ngHyd − compute then reset chained results", () => { expect(await navbar.getAllCalculatorTabs().count()).toBe(3); // 1. get down-most module (PAB Dimensions) - await navbar.clickCalculatorTabForUid("bGZqcz"); + await navbar.clickCalculatorTabForUid("eHh5YX"); // check that "compute" button is active const calcButton = calcPage.getCalculateButton(); @@ -100,7 +100,7 @@ describe("ngHyd − compute then reset chained results", () => { } // 2. get up-most module (Macro-rugo) - await navbar.clickCalculatorTabForUid("dnRiY2"); + await navbar.clickCalculatorTabForUid("MGg5OH"); // modify any input (for ex. "Ks") await calcPage.getInputById("Ks").clear(); diff --git a/e2e/load-linked-params.e2e-spec.ts b/e2e/load-linked-params.e2e-spec.ts index 2b67e12b65d7869855d7d8af034ef52985175a30..6a1001fc2d74d0ca70933b07e7033c43f4cb4ec9 100644 --- a/e2e/load-linked-params.e2e-spec.ts +++ b/e2e/load-linked-params.e2e-spec.ts @@ -6,7 +6,7 @@ import { SideNav } from "./sidenav.po"; import { browser } from "protractor"; /** - * Load a session containing 4 calculators, having multiple linked parameters + * Load a session containing 5 calculators, having multiple linked parameters * from one to another * @TODO les valeurs des Select sont comparées au français, pas très générique :/ */ @@ -42,6 +42,7 @@ describe("ngHyd − load session with multiple linked parameters − ", () => { // 1. check Section paramétrée await navbar.clickCalculatorTab(0); + await browser.sleep(500); // check target params values const sp_lb = calcPage.getSelectById("linked_LargeurBerge"); @@ -50,23 +51,25 @@ describe("ngHyd − load session with multiple linked parameters − ", () => { // 2. check Passe à macro-rugosités await navbar.clickCalculatorTab(1); + await browser.sleep(500); // check target params values - const mr_b = calcPage.getSelectById("linked_B"); - const mr_bv = await calcPage.getSelectValueText(mr_b); - expect(mr_bv).toEqual("L (résultat de Ouvrages)"); + const mr_zf1 = calcPage.getSelectById("linked_ZF1"); + const mr_zf1v = await calcPage.getSelectValueText(mr_zf1); + expect(mr_zf1v).toEqual("Z1 (Ouvrages)"); const mr_q = calcPage.getSelectById("linked_Q"); const mr_qv = await calcPage.getSelectValueText(mr_q); - expect(mr_qv).toEqual("Q (R. uniforme)"); + expect(mr_qv).toEqual("Q (Sec. param., section)"); // 3. check Lois d'ouvrages await navbar.clickCalculatorTab(2); + await browser.sleep(500); // check target params values - const lo_z1 = calcPage.getSelectById("linked_Z1"); - const lo_z1v = await calcPage.getSelectValueText(lo_z1); - expect(lo_z1v).toEqual("ZF1 (Macro-rugo.)"); + const lo_z2 = calcPage.getSelectById("linked_Z2"); + const lo_z2v = await calcPage.getSelectValueText(lo_z2); + expect(lo_z2v).toEqual("ZF1 (Macro-rugo.)"); const lo_l = calcPage.getSelectById("linked_L"); // attention ID non unique, voir nghyd#173 const lo_lv = await calcPage.getSelectValueText(lo_l); @@ -82,6 +85,7 @@ describe("ngHyd − load session with multiple linked parameters − ", () => { // 4. check Régime uniforme await navbar.clickCalculatorTab(3); + await browser.sleep(500); // check target params values const lo_q = calcPage.getSelectById("linked_Q"); @@ -90,11 +94,12 @@ describe("ngHyd − load session with multiple linked parameters − ", () => { // 5. check Déver. dénoyés await navbar.clickCalculatorTab(4); + await browser.sleep(500); // check target params values const lo_br = calcPage.getSelectById("linked_BR"); const lo_brv = await calcPage.getSelectValueText(lo_br); - expect(lo_brv).toEqual("LargeurBerge (Sec. param.)"); + expect(lo_brv).toEqual("LargeurBerge (Sec. param., section)"); }); }); diff --git a/e2e/load-save-session.e2e-spec.ts b/e2e/load-save-session.e2e-spec.ts index 8ea125de99cdbb46a40da69bceb6c8f287d138c3..d18d7732b85ceac4c52827e813df8d9f7a0dd631 100644 --- a/e2e/load-save-session.e2e-spec.ts +++ b/e2e/load-save-session.e2e-spec.ts @@ -62,7 +62,9 @@ describe("ngHyd − save and load sessions", () => { await calcPage.changeSelectValue(calcPage.getSelectById("select_section"), 2); // mode "circulaire" await calcPage.getInputById("Ks").clear(); // coefficient de Strickler + await browser.sleep(1000); await calcPage.getInputById("Ks").sendKeys("42"); + await browser.sleep(1000); await calcPage.clickSaveCalcButton(); diff --git a/e2e/session-6-calc.test.json b/e2e/session-6-calc.test.json index a24a0012f32b98e2ecd3461342b56bcbb33d764c..a290fce0a75e44bbfe163ec47e860435f246180b 100644 --- a/e2e/session-6-calc.test.json +++ b/e2e/session-6-calc.test.json @@ -1,7 +1,7 @@ { "session": [ { - "uid": "NHY0cX", + "uid": "Zmpsej", "props": { "calcType": 5, "nodeType": 0 @@ -9,6 +9,7 @@ "meta": { "title": "PAB : dimensions" }, + "children": [], "parameters": [ { "symbol": "Pr", @@ -37,7 +38,7 @@ ] }, { - "uid": "YzAwMW", + "uid": "djBoZ3", "props": { "calcType": 11, "nodeType": 0 @@ -45,6 +46,7 @@ "meta": { "title": "Macro-rugo." }, + "children": [], "parameters": [ { "symbol": "Pr", @@ -108,7 +110,7 @@ ] }, { - "uid": "dGc5MD", + "uid": "dG1hZD", "props": { "calcType": 8, "nodeType": 0 @@ -116,15 +118,16 @@ "meta": { "title": "Ouvrages" }, - "structures": [ + "children": [ { - "uid": "NjZob3", + "uid": "OW1yMH", "props": { "calcType": 7, "nodeType": 5, "structureType": 1, "loiDebit": 1 }, + "children": [], "parameters": [ { "symbol": "ZDV", @@ -172,55 +175,71 @@ ] }, { - "uid": "OGZ4cm", + "uid": "OWpqMW", "props": { - "varCalc": "Hs", "calcType": 2, "nodeType": 2 }, "meta": { "title": "Sec. param." }, + "children": [ + { + "uid": "bGVwZH", + "props": { + "calcType": 14, + "nodeType": 2 + }, + "children": [], + "parameters": [ + { + "symbol": "Pr", + "mode": "SINGLE", + "value": 0.0001 + }, + { + "symbol": "Ks", + "mode": "SINGLE", + "value": 40 + }, + { + "symbol": "Q", + "mode": "SINGLE", + "value": 1.2 + }, + { + "symbol": "If", + "mode": "SINGLE", + "value": 0.001 + }, + { + "symbol": "YB", + "mode": "SINGLE", + "value": 1 + }, + { + "symbol": "Y", + "mode": "SINGLE", + "value": 0.8 + }, + { + "symbol": "LargeurBerge", + "mode": "SINGLE", + "value": 2.5 + } + ] + } + ], "parameters": [ { "symbol": "Pr", "mode": "SINGLE", "value": 0.0001 - }, - { - "symbol": "Ks", - "mode": "SINGLE", - "value": 40 - }, - { - "symbol": "Q", - "mode": "SINGLE", - "value": 1.2 - }, - { - "symbol": "If", - "mode": "SINGLE", - "value": 0.001 - }, - { - "symbol": "YB", - "mode": "SINGLE", - "value": 1 - }, - { - "symbol": "Y", - "mode": "SINGLE", - "value": 0.8 - }, - { - "symbol": "LargeurBerge", - "mode": "SINGLE", - "value": 2.5 } ] }, { - "uid": "ZTNvMD", + "uid": "dXNzYW", "props": { "methodeResolution": 0, "calcType": 4, @@ -229,6 +248,54 @@ "meta": { "title": "Remous" }, + "children": [ + { + "uid": "aGFudW", + "props": { + "methodeResolution": 0, + "calcType": 14, + "nodeType": 2 + }, + "children": [], + "parameters": [ + { + "symbol": "Pr", + "mode": "SINGLE", + "value": 0.0001 + }, + { + "symbol": "Ks", + "mode": "SINGLE", + "value": 40 + }, + { + "symbol": "Q", + "mode": "SINGLE", + "value": 1.2 + }, + { + "symbol": "If", + "mode": "SINGLE", + "value": 0.001 + }, + { + "symbol": "YB", + "mode": "SINGLE", + "value": 1 + }, + { + "symbol": "Y", + "mode": "SINGLE", + "value": 0.2863766123093061 + }, + { + "symbol": "LargeurBerge", + "mode": "SINGLE", + "value": 2.5 + } + ] + } + ], "parameters": [ { "symbol": "Pr", @@ -254,41 +321,11 @@ "symbol": "Dx", "mode": "SINGLE", "value": 5 - }, - { - "symbol": "Ks", - "mode": "SINGLE", - "value": 40 - }, - { - "symbol": "Q", - "mode": "SINGLE", - "value": 1.2 - }, - { - "symbol": "If", - "mode": "SINGLE", - "value": 0.001 - }, - { - "symbol": "YB", - "mode": "SINGLE", - "value": 1 - }, - { - "symbol": "Y", - "mode": "SINGLE", - "value": 0.2863766123093061 - }, - { - "symbol": "LargeurBerge", - "mode": "SINGLE", - "value": 2.5 } ] }, { - "uid": "eWllan", + "uid": "dWpsMT", "props": { "calcType": 1, "nodeType": 0 @@ -296,6 +333,7 @@ "meta": { "title": "Lechapt-Calmon" }, + "children": [], "parameters": [ { "symbol": "Pr", @@ -324,17 +362,17 @@ { "symbol": "L", "mode": "SINGLE", - "value": "1.863" + "value": 1.601 }, { "symbol": "M", "mode": "SINGLE", - "value": "2" + "value": 1.975 }, { "symbol": "N", "mode": "SINGLE", - "value": "5.33" + "value": 5.25 } ] } diff --git a/e2e/session-cascade-params.json b/e2e/session-cascade-params.json index 773053d5409813c93e2adfe6811d03ac299945d3..06d88c6615dce392f62249f6e46544ef9b015d78 100644 --- a/e2e/session-cascade-params.json +++ b/e2e/session-cascade-params.json @@ -1,55 +1,71 @@ { "session": [ { - "uid": "OGFzOH", + "uid": "ZTFxeW", "props": { - "varCalc": "Hs", "calcType": 2, "nodeType": 2 }, "meta": { "title": "Sec. param." }, + "children": [ + { + "uid": "b21rNG", + "props": { + "calcType": 14, + "nodeType": 2 + }, + "children": [], + "parameters": [ + { + "symbol": "Pr", + "mode": "SINGLE", + "value": 0.0001 + }, + { + "symbol": "Ks", + "mode": "SINGLE", + "value": 40 + }, + { + "symbol": "Q", + "mode": "SINGLE", + "value": 1.2 + }, + { + "symbol": "If", + "mode": "SINGLE", + "value": 0.001 + }, + { + "symbol": "YB", + "mode": "SINGLE", + "value": 1 + }, + { + "symbol": "Y", + "mode": "SINGLE", + "value": 0.8 + }, + { + "symbol": "LargeurBerge", + "mode": "SINGLE", + "value": 2.5 + } + ] + } + ], "parameters": [ { "symbol": "Pr", "mode": "SINGLE", "value": 0.0001 - }, - { - "symbol": "Ks", - "mode": "SINGLE", - "value": 40 - }, - { - "symbol": "Q", - "mode": "SINGLE", - "value": 1.2 - }, - { - "symbol": "If", - "mode": "SINGLE", - "value": 0.001 - }, - { - "symbol": "YB", - "mode": "SINGLE", - "value": 1 - }, - { - "symbol": "Y", - "mode": "SINGLE", - "value": 0.8 - }, - { - "symbol": "LargeurBerge", - "mode": "SINGLE", - "value": 2.5 } ] }, { - "uid": "NWp1a3", + "uid": "Z3EwY2", "props": { "calcType": 3, "nodeType": 2 @@ -57,46 +73,63 @@ "meta": { "title": "R. uniforme" }, + "children": [ + { + "uid": "ZnU0bn", + "props": { + "calcType": 14, + "nodeType": 2 + }, + "children": [], + "parameters": [ + { + "symbol": "Pr", + "mode": "SINGLE", + "value": 0.0001 + }, + { + "symbol": "Ks", + "mode": "SINGLE", + "value": 40 + }, + { + "symbol": "Q", + "mode": "CALCUL" + }, + { + "symbol": "If", + "mode": "SINGLE", + "value": 0.001 + }, + { + "symbol": "YB", + "mode": "SINGLE", + "value": 1 + }, + { + "symbol": "Y", + "mode": "SINGLE", + "value": 0.8 + }, + { + "symbol": "LargeurBerge", + "mode": "LINK", + "targetNub": "b21rNG", + "targetParam": "LargeurBerge" + } + ] + } + ], "parameters": [ { "symbol": "Pr", "mode": "SINGLE", "value": 0.0001 - }, - { - "symbol": "Ks", - "mode": "SINGLE", - "value": 40 - }, - { - "symbol": "Q", - "mode": "CALCUL" - }, - { - "symbol": "If", - "mode": "SINGLE", - "value": 0.001 - }, - { - "symbol": "YB", - "mode": "SINGLE", - "value": 1 - }, - { - "symbol": "Y", - "mode": "SINGLE", - "value": 0.8 - }, - { - "symbol": "LargeurBerge", - "mode": "LINK", - "targetNub": "OGFzOH", - "targetParam": "LargeurBerge" } ] }, { - "uid": "dWs5bm", + "uid": "Y2l2Y3", "props": { "calcType": 3, "nodeType": 2 @@ -104,41 +137,58 @@ "meta": { "title": "R. uniforme 1" }, + "children": [ + { + "uid": "MmV0dG", + "props": { + "calcType": 14, + "nodeType": 2 + }, + "children": [], + "parameters": [ + { + "symbol": "Pr", + "mode": "SINGLE", + "value": 0.0001 + }, + { + "symbol": "Ks", + "mode": "SINGLE", + "value": 40 + }, + { + "symbol": "Q", + "mode": "CALCUL" + }, + { + "symbol": "If", + "mode": "SINGLE", + "value": 0.001 + }, + { + "symbol": "YB", + "mode": "SINGLE", + "value": 1 + }, + { + "symbol": "Y", + "mode": "SINGLE", + "value": 0.8 + }, + { + "symbol": "LargeurBerge", + "mode": "LINK", + "targetNub": "ZnU0bn", + "targetParam": "LargeurBerge" + } + ] + } + ], "parameters": [ { "symbol": "Pr", "mode": "SINGLE", "value": 0.0001 - }, - { - "symbol": "Ks", - "mode": "SINGLE", - "value": 40 - }, - { - "symbol": "Q", - "mode": "CALCUL" - }, - { - "symbol": "If", - "mode": "SINGLE", - "value": 0.001 - }, - { - "symbol": "YB", - "mode": "SINGLE", - "value": 1 - }, - { - "symbol": "Y", - "mode": "SINGLE", - "value": 0.8 - }, - { - "symbol": "LargeurBerge", - "mode": "LINK", - "targetNub": "NWp1a3", - "targetParam": "LargeurBerge" } ] } diff --git a/e2e/session-cascade-results.json b/e2e/session-cascade-results.json index 3c144185070cf9e20ba23b314555d023eb9e6376..33d5a63e60621b1e44ffc621ee99b23458969639 100644 --- a/e2e/session-cascade-results.json +++ b/e2e/session-cascade-results.json @@ -1,7 +1,12 @@ { + "header": { + "source": "jalhyd", + "format_version": "1.0", + "created": "2019-04-26T09:58:17.228Z" + }, "session": [ { - "uid": "dnRiY2", + "uid": "MGg5OH", "props": { "calcType": 11, "nodeType": 0 @@ -9,6 +14,7 @@ "meta": { "title": "Macro-rugo." }, + "children": [], "parameters": [ { "symbol": "Pr", @@ -28,16 +34,16 @@ { "symbol": "B", "mode": "SINGLE", - "value": 1 + "value": 1.00028125 }, { "symbol": "If", - "mode": "CALCUL" + "mode": "SINGLE", + "value": 0.06359375 }, { "symbol": "Q", - "mode": "SINGLE", - "value": 1.57 + "mode": "CALCUL" }, { "symbol": "Y", @@ -72,14 +78,15 @@ ] }, { - "uid": "YjZyND", + "uid": "eHh5YX", "props": { - "calcType": 3, - "nodeType": 2 + "calcType": 5, + "nodeType": 0 }, "meta": { - "title": "R. uniforme" + "title": "PAB : dimensions" }, + "children": [], "parameters": [ { "symbol": "Pr", @@ -87,46 +94,37 @@ "value": 0.0001 }, { - "symbol": "Ks", - "mode": "SINGLE", - "value": 40 - }, - { - "symbol": "Q", + "symbol": "L", "mode": "LINK", - "targetNub": "dnRiY2", - "targetParam": "Q_GuideTech" - }, - { - "symbol": "If", - "mode": "SINGLE", - "value": 0.001 + "targetNub": "Y2s1cG", + "targetParam": "Lg" }, { - "symbol": "YB", - "mode": "SINGLE", - "value": 1 + "symbol": "W", + "mode": "CALCUL" }, { "symbol": "Y", "mode": "SINGLE", - "value": 0.8 + "value": 0.5 }, { - "symbol": "LargeurBerge", - "mode": "CALCUL" + "symbol": "V", + "mode": "SINGLE", + "value": 2 } ] }, { - "uid": "bGZqcz", + "uid": "Y2s1cG", "props": { - "calcType": 5, + "calcType": 0, "nodeType": 0 }, "meta": { - "title": "PAB : dimensions" + "title": "Conduite distri." }, + "children": [], "parameters": [ { "symbol": "Pr", @@ -134,24 +132,29 @@ "value": 0.0001 }, { - "symbol": "L", - "mode": "SINGLE", - "value": 2 + "symbol": "Q", + "mode": "LINK", + "targetNub": "MGg5OH", + "targetParam": "Q_GuideTech" }, { - "symbol": "W", - "mode": "LINK", - "targetNub": "YjZyND", - "targetParam": "LargeurBerge" + "symbol": "D", + "mode": "SINGLE", + "value": 1.2 }, { - "symbol": "Y", + "symbol": "J", "mode": "SINGLE", - "value": 0.5 + "value": 0.6 }, { - "symbol": "V", + "symbol": "Lg", "mode": "CALCUL" + }, + { + "symbol": "Nu", + "mode": "SINGLE", + "value": 0.000001 } ] } diff --git a/e2e/session-liens-spaghetti.json b/e2e/session-liens-spaghetti.json index 87b17d2a13cc46819f2620f39cf5ba412304773f..dd32d51c17ea9ce2fd5e3abd378c0e76f4ca52df 100644 --- a/e2e/session-liens-spaghetti.json +++ b/e2e/session-liens-spaghetti.json @@ -1,56 +1,77 @@ { + "header": { + "source": "jalhyd", + "format_version": "1.0", + "created": "2019-04-26T10:25:29.891Z" + }, "session": [ { - "uid": "OW9rd3", + "uid": "ZHh1YW", "props": { - "varCalc": "Hs", "calcType": 2, "nodeType": 2 }, "meta": { "title": "Sec. param." }, + "children": [ + { + "uid": "bXB1Y3", + "props": { + "calcType": 14, + "nodeType": 2 + }, + "children": [], + "parameters": [ + { + "symbol": "Pr", + "mode": "SINGLE", + "value": 0.0001 + }, + { + "symbol": "Ks", + "mode": "SINGLE", + "value": 40 + }, + { + "symbol": "Q", + "mode": "SINGLE", + "value": 1.2 + }, + { + "symbol": "If", + "mode": "SINGLE", + "value": 0.001 + }, + { + "symbol": "YB", + "mode": "SINGLE", + "value": 1 + }, + { + "symbol": "Y", + "mode": "SINGLE", + "value": 0.8 + }, + { + "symbol": "LargeurBerge", + "mode": "LINK", + "targetNub": "YTBjcm", + "targetParam": "L" + } + ] + } + ], "parameters": [ { "symbol": "Pr", "mode": "SINGLE", "value": 0.0001 - }, - { - "symbol": "Ks", - "mode": "SINGLE", - "value": 40 - }, - { - "symbol": "Q", - "mode": "SINGLE", - "value": 1.2 - }, - { - "symbol": "If", - "mode": "SINGLE", - "value": 0.001 - }, - { - "symbol": "YB", - "mode": "SINGLE", - "value": 1 - }, - { - "symbol": "Y", - "mode": "SINGLE", - "value": 0.8 - }, - { - "symbol": "LargeurBerge", - "mode": "LINK", - "targetNub": "dmh4Z3", - "targetParam": "L" } ] }, { - "uid": "dTB3ZG", + "uid": "eTgwMG", "props": { "calcType": 11, "nodeType": 0 @@ -58,6 +79,7 @@ "meta": { "title": "Macro-rugo." }, + "children": [], "parameters": [ { "symbol": "Pr", @@ -66,8 +88,9 @@ }, { "symbol": "ZF1", - "mode": "SINGLE", - "value": 12.5 + "mode": "LINK", + "targetNub": "dGx0em", + "targetParam": "Z1" }, { "symbol": "L", @@ -76,9 +99,7 @@ }, { "symbol": "B", - "mode": "LINK", - "targetNub": "ZW9icn", - "targetParam": "L" + "mode": "CALCUL" }, { "symbol": "If", @@ -88,12 +109,13 @@ { "symbol": "Q", "mode": "LINK", - "targetNub": "OGhuZj", + "targetNub": "bXB1Y3", "targetParam": "Q" }, { "symbol": "Y", - "mode": "CALCUL" + "mode": "SINGLE", + "value": 0.6 }, { "symbol": "Ks", @@ -112,20 +134,20 @@ }, { "symbol": "PBH", - "mode": "SINGLE", - "value": 0.8 + "mode": "MINMAX", + "min": 0.4, + "max": 1.6, + "step": 0.06000000000000001 }, { "symbol": "Cd0", - "mode": "MINMAX", - "min": 0.75, - "max": 3, - "step": 0.1125 + "mode": "SINGLE", + "value": 1.5 } ] }, { - "uid": "ZW9icn", + "uid": "dGx0em", "props": { "calcType": 8, "nodeType": 0 @@ -133,15 +155,16 @@ "meta": { "title": "Ouvrages" }, - "structures": [ + "children": [ { - "uid": "cjdyYW", + "uid": "ZmZ3bX", "props": { "calcType": 7, "nodeType": 5, "structureType": 1, "loiDebit": 1 }, + "children": [], "parameters": [ { "symbol": "ZDV", @@ -165,13 +188,14 @@ ] }, { - "uid": "Ynpnaj", + "uid": "aWo0M2", "props": { "calcType": 7, "nodeType": 5, "structureType": 1, "loiDebit": 1 }, + "children": [], "parameters": [ { "symbol": "ZDV", @@ -186,7 +210,7 @@ { "symbol": "L", "mode": "LINK", - "targetNub": "ZW9icn", + "targetNub": "dGx0em", "targetParam": "L" }, { @@ -197,13 +221,14 @@ ] }, { - "uid": "dmh4Z3", + "uid": "YTBjcm", "props": { "calcType": 7, "nodeType": 5, "structureType": 1, "loiDebit": 1 }, + "children": [], "parameters": [ { "symbol": "ZDV", @@ -213,7 +238,7 @@ { "symbol": "W", "mode": "LINK", - "targetNub": "Ynpnaj", + "targetNub": "aWo0M2", "targetParam": "W" }, { @@ -224,7 +249,7 @@ { "symbol": "Cd", "mode": "LINK", - "targetNub": "cjdyYW", + "targetNub": "ZmZ3bX", "targetParam": "Cd" } ] @@ -243,19 +268,19 @@ }, { "symbol": "Z1", - "mode": "LINK", - "targetNub": "dTB3ZG", - "targetParam": "ZF1" + "mode": "SINGLE", + "value": 102 }, { "symbol": "Z2", - "mode": "SINGLE", - "value": 101.5 + "mode": "LINK", + "targetNub": "eTgwMG", + "targetParam": "ZF1" } ] }, { - "uid": "OGhuZj", + "uid": "dzA1OX", "props": { "calcType": 3, "nodeType": 2 @@ -263,48 +288,65 @@ "meta": { "title": "R. uniforme" }, + "children": [ + { + "uid": "Ynlna2", + "props": { + "calcType": 14, + "nodeType": 2 + }, + "children": [], + "parameters": [ + { + "symbol": "Pr", + "mode": "SINGLE", + "value": 0.0001 + }, + { + "symbol": "Ks", + "mode": "SINGLE", + "value": 40 + }, + { + "symbol": "Q", + "mode": "LINK", + "targetNub": "cXFraW", + "targetParam": "CvQT" + }, + { + "symbol": "If", + "mode": "MINMAX", + "min": 0.0005, + "max": 0.002, + "step": 0.00007500000000000001 + }, + { + "symbol": "YB", + "mode": "SINGLE", + "value": 1 + }, + { + "symbol": "Y", + "mode": "SINGLE", + "value": 0.8 + }, + { + "symbol": "LargeurBerge", + "mode": "CALCUL" + } + ] + } + ], "parameters": [ { "symbol": "Pr", "mode": "SINGLE", "value": 0.0001 - }, - { - "symbol": "Ks", - "mode": "SINGLE", - "value": 40 - }, - { - "symbol": "Q", - "mode": "LINK", - "targetNub": "NGlpMn", - "targetParam": "CvQT" - }, - { - "symbol": "If", - "mode": "MINMAX", - "min": 0.0005, - "max": 0.002, - "step": 0.00007500000000000001 - }, - { - "symbol": "YB", - "mode": "SINGLE", - "value": 1 - }, - { - "symbol": "Y", - "mode": "SINGLE", - "value": 0.8 - }, - { - "symbol": "LargeurBerge", - "mode": "CALCUL" } ] }, { - "uid": "NGlpMn", + "uid": "cXFraW", "props": { "calcType": 9, "nodeType": 0 @@ -312,15 +354,16 @@ "meta": { "title": "Déver. dénoyés" }, - "structures": [ + "children": [ { - "uid": "M29rcW", + "uid": "Zzd1cH", "props": { "calcType": 7, "nodeType": 5, "structureType": 0, "loiDebit": 7 }, + "children": [], "parameters": [ { "symbol": "ZDV", @@ -358,7 +401,7 @@ { "symbol": "BR", "mode": "LINK", - "targetNub": "OW9rd3", + "targetNub": "bXB1Y3", "targetParam": "LargeurBerge" }, { diff --git a/e2e/session-optional-params.test.json b/e2e/session-optional-params.test.json index 6fb0e40e804a24c0926dec69b77e432a75c46355..19bafb16db82464c966302ac064801dc3a8d2196 100644 --- a/e2e/session-optional-params.test.json +++ b/e2e/session-optional-params.test.json @@ -1,55 +1,71 @@ { "session": [ { - "uid": "N2U4OH", + "uid": "eHpub2", "props": { - "varCalc": "Hs", "calcType": 2, "nodeType": 4 }, "meta": { "title": "Sec. param." }, + "children": [ + { + "uid": "YXNoY2", + "props": { + "calcType": 14, + "nodeType": 4 + }, + "children": [], + "parameters": [ + { + "symbol": "Pr", + "mode": "SINGLE", + "value": 0.0001 + }, + { + "symbol": "Ks", + "mode": "SINGLE", + "value": 40 + }, + { + "symbol": "Q", + "mode": "SINGLE", + "value": 1.2 + }, + { + "symbol": "If", + "mode": "SINGLE", + "value": 0.001 + }, + { + "symbol": "YB", + "mode": "SINGLE", + "value": 1 + }, + { + "symbol": "Y", + "mode": "SINGLE", + "value": 0.8 + }, + { + "symbol": "LargeurBerge", + "mode": "SINGLE", + "value": 4 + }, + { + "symbol": "k", + "mode": "SINGLE", + "value": 0.5 + } + ] + } + ], "parameters": [ { "symbol": "Pr", "mode": "SINGLE", "value": 0.0001 - }, - { - "symbol": "Ks", - "mode": "SINGLE", - "value": 40 - }, - { - "symbol": "Q", - "mode": "SINGLE", - "value": 1.2 - }, - { - "symbol": "If", - "mode": "SINGLE", - "value": 0.001 - }, - { - "symbol": "YB", - "mode": "SINGLE", - "value": 1 - }, - { - "symbol": "Y", - "mode": "SINGLE", - "value": 0.8 - }, - { - "symbol": "LargeurBerge", - "mode": "SINGLE", - "value": 4 - }, - { - "symbol": "k", - "mode": "SINGLE", - "value": 0.5 } ] } diff --git a/jalhyd_branch b/jalhyd_branch index 1d743538bd32b05247bd6b311debc7922c55211f..c20acdd3f0ec4b4d61298475f3bf35233f6a588a 100644 --- a/jalhyd_branch +++ b/jalhyd_branch @@ -1,2 +1,2 @@ -75-section-parametree-calculer-systematiquement-toutes-les-variables-meme-avec-un-parametre-qui-varie +refactor-nubs diff --git a/package-lock.json b/package-lock.json index 7c2ae060a3d57c1eeda417eee39b9309f6ff5f1a..21d7266f4042daa6d0ccd3f306c006be79fc3514 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,12 +5,12 @@ "requires": true, "dependencies": { "@angular-devkit/architect": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.12.4.tgz", - "integrity": "sha512-19f3jbGyP+GzTSBgrHR4SWGK81SUgtTxhkAcyhmsIEDuXrMJM8kPu0HB9WivJ5p08+jzwz6xdF9mpNYSeD9uqw==", + "version": "0.13.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.13.8.tgz", + "integrity": "sha512-gxUs5rhnP576T8ZclKqxlspiChrqRtqaJo54wqNVFvYKEjRZKyMa+1AK6p0oD9zcIToEkcjknj3BbtQa27lLHg==", "dev": true, "requires": { - "@angular-devkit/core": "7.2.4", + "@angular-devkit/core": "7.3.8", "rxjs": "6.3.3" }, "dependencies": { @@ -26,60 +26,70 @@ } }, "@angular-devkit/build-angular": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.12.4.tgz", - "integrity": "sha512-zzjpM9GpCGEUtTPv/T04CALzFXkTgAAiNt1whY1Vmtu2YYUksXOm1ysA2RBLEhb81RodTEwVV2zFUj5v2xHYEw==", - "dev": true, - "requires": { - "@angular-devkit/architect": "0.12.4", - "@angular-devkit/build-optimizer": "0.12.4", - "@angular-devkit/build-webpack": "0.12.4", - "@angular-devkit/core": "7.2.4", - "@ngtools/webpack": "7.2.4", - "ajv": "6.6.2", - "autoprefixer": "9.4.3", + "version": "0.13.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.13.8.tgz", + "integrity": "sha512-uRb8CKC0hUdcE+Fv2Ov9LJNelyjsiMuddBpo8pdTKCIHVVC6hvip9S/Z18Tvb207kKI3k7Dn+Ji1J63mCqmQzA==", + "dev": true, + "requires": { + "@angular-devkit/architect": "0.13.8", + "@angular-devkit/build-optimizer": "0.13.8", + "@angular-devkit/build-webpack": "0.13.8", + "@angular-devkit/core": "7.3.8", + "@ngtools/webpack": "7.3.8", + "ajv": "6.9.1", + "autoprefixer": "9.4.6", "circular-dependency-plugin": "5.0.2", "clean-css": "4.2.1", "copy-webpack-plugin": "4.6.0", - "file-loader": "2.0.0", + "file-loader": "3.0.1", "glob": "7.1.3", - "istanbul": "0.4.5", "istanbul-instrumenter-loader": "3.0.1", "karma-source-map-support": "1.3.0", "less": "3.9.0", "less-loader": "4.1.0", - "license-webpack-plugin": "2.0.4", - "loader-utils": "1.1.0", - "mini-css-extract-plugin": "0.4.4", + "license-webpack-plugin": "2.1.0", + "loader-utils": "1.2.3", + "mini-css-extract-plugin": "0.5.0", "minimatch": "3.0.4", - "node-sass": "4.10.0", - "opn": "5.4.0", + "node-sass": "4.11.0", + "open": "6.0.0", "parse5": "4.0.0", - "portfinder": "1.0.17", - "postcss": "7.0.13", + "postcss": "7.0.14", "postcss-import": "12.0.1", "postcss-loader": "3.0.0", - "raw-loader": "0.5.1", + "raw-loader": "1.0.0", "rxjs": "6.3.3", "sass-loader": "7.1.0", - "semver": "5.5.1", + "semver": "5.6.0", "source-map-loader": "0.2.4", - "source-map-support": "0.5.9", - "speed-measure-webpack-plugin": "1.2.5", + "source-map-support": "0.5.10", + "speed-measure-webpack-plugin": "1.3.1", "stats-webpack-plugin": "0.7.0", "style-loader": "0.23.1", "stylus": "0.54.5", "stylus-loader": "3.0.2", - "terser-webpack-plugin": "1.2.1", - "tree-kill": "1.2.0", - "webpack": "4.28.4", - "webpack-dev-middleware": "3.4.0", + "terser-webpack-plugin": "1.2.2", + "tree-kill": "1.2.1", + "webpack": "4.29.0", + "webpack-dev-middleware": "3.5.1", "webpack-dev-server": "3.1.14", - "webpack-merge": "4.1.4", + "webpack-merge": "4.2.1", "webpack-sources": "1.3.0", "webpack-subresource-integrity": "1.1.0-rc.6" }, "dependencies": { + "ajv": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.1.tgz", + "integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", @@ -226,6 +236,12 @@ "path-exists": "^3.0.0" } }, + "mime": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.2.tgz", + "integrity": "sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg==", + "dev": true + }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", @@ -279,9 +295,9 @@ } }, "p-try": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", - "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, "parse5": { @@ -309,6 +325,28 @@ "tslib": "^1.9.0" } }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", + "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -377,11 +415,17 @@ "yargs": "12.0.2" }, "dependencies": { - "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", - "dev": true + "webpack-dev-middleware": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.4.0.tgz", + "integrity": "sha512-Q9Iyc0X9dP9bAsYskAVJ/hmIZZQwf/3Sy4xCAZgL5cUkjZmUZLt4l5HpbST/Pdgjn3u6pE7u5OdGd1apgzRujA==", + "dev": true, + "requires": { + "memory-fs": "~0.4.1", + "mime": "^2.3.1", + "range-parser": "^1.0.3", + "webpack-log": "^2.0.0" + } } } }, @@ -423,15 +467,15 @@ } }, "@angular-devkit/build-optimizer": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.12.4.tgz", - "integrity": "sha512-KraU+ZARX7JMtttPjOku9wVF+dnjMsIbiIVsQrNXhpFiGT1fSJhQTPxc98ONgEmUiGROFXXq2mHLilvMr2WdwQ==", + "version": "0.13.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.13.8.tgz", + "integrity": "sha512-RvYxtsdYuvpFb1iivVixylSVN/Q8LsQ449uYuqEe3OsDjQBvUVG2fMLPOQjmKWhi0NC9WSsNiUluxLDNdvd0Vw==", "dev": true, "requires": { - "loader-utils": "1.1.0", + "loader-utils": "1.2.3", "source-map": "0.5.6", "typescript": "3.2.4", - "webpack-sources": "1.2.0" + "webpack-sources": "1.3.0" }, "dependencies": { "source-map": { @@ -445,35 +489,17 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.4.tgz", "integrity": "sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==", "dev": true - }, - "webpack-sources": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.2.0.tgz", - "integrity": "sha512-9BZwxR85dNsjWz3blyxdOhTgtnQvv3OEs5xofI0wPYTwu5kaWxS08UuD1oI7WLBLpRO+ylf0ofnXLXWmGb2WMw==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } } } }, "@angular-devkit/build-webpack": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.12.4.tgz", - "integrity": "sha512-1+t2MUB+dq+1LbfTnvzZwj2QTWiugyMywXqYjsyt0rrh7VcriD1lQ+P5yN8kgFz/R7Ut4LgvS05yDX1JHi20qw==", + "version": "0.13.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.13.8.tgz", + "integrity": "sha512-WMyn1vUHyx+VfJKgYuEHrICwQzPMDTaUNB1zlvzZt9gX/9H+XnetrebeWBZCITPXHBw/377oA6wmiHWJ0yaZRw==", "dev": true, "requires": { - "@angular-devkit/architect": "0.12.4", - "@angular-devkit/core": "7.2.4", + "@angular-devkit/architect": "0.13.8", + "@angular-devkit/core": "7.3.8", "rxjs": "6.3.3" }, "dependencies": { @@ -489,18 +515,30 @@ } }, "@angular-devkit/core": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-7.2.4.tgz", - "integrity": "sha512-XHF59tIHg2qEM1Wd415xhykBLjjfOK6yMB7CjNk1bToUMX2QDT87izJF4y1Vwa0lIw9G0jdgP/4/M/OqXcbYmA==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-7.3.8.tgz", + "integrity": "sha512-3X9uzaZXFpm5o2TSzhD6wEOtVU32CgeytKjD1Scxj+uMMVo48SWLlKiFh312T+smI9ko7tOT8VqxglwYkWosgg==", "dev": true, "requires": { - "ajv": "6.6.2", + "ajv": "6.9.1", "chokidar": "2.0.4", "fast-json-stable-stringify": "2.0.0", "rxjs": "6.3.3", "source-map": "0.7.3" }, "dependencies": { + "ajv": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.1.tgz", + "integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "rxjs": { "version": "6.3.3", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", @@ -982,12 +1020,12 @@ } }, "@babel/generator": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.4.tgz", - "integrity": "sha512-8EXhHRFqlVVWXPezBW5keTiQi/rJMQTg/Y9uVCEZ0CAF3PKtCCaVRnp64Ii1ujhkoDhhF1fVsImoN4yJ2uz4Wg==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", + "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==", "dev": true, "requires": { - "@babel/types": "^7.3.4", + "@babel/types": "^7.4.0", "jsesc": "^2.5.1", "lodash": "^4.17.11", "source-map": "^0.5.0", @@ -1029,12 +1067,12 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz", - "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz", + "integrity": "sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==", "dev": true, "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.4.0" } }, "@babel/highlight": { @@ -1057,9 +1095,9 @@ } }, "@babel/parser": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.4.tgz", - "integrity": "sha512-tXZCqWtlOOP4wgCp6RjRvLmfuhnqTLy9VHwRochJBCP2nDm27JnnuFEnXFASVyQNHk36jD1tAammsCEEqgscIQ==", + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.3.tgz", + "integrity": "sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ==", "dev": true }, "@babel/runtime": { @@ -1080,28 +1118,28 @@ } }, "@babel/template": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz", - "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.0.tgz", + "integrity": "sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.2.2", - "@babel/types": "^7.2.2" + "@babel/parser": "^7.4.0", + "@babel/types": "^7.4.0" } }, "@babel/traverse": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.3.4.tgz", - "integrity": "sha512-TvTHKp6471OYEcE/91uWmhR6PrrYywQntCHSaZ8CM8Vmp+pjAusal4nGB2WCCQd0rvI7nOMKn9GnbcvTUz3/ZQ==", + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.3.tgz", + "integrity": "sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.3.4", + "@babel/generator": "^7.4.0", "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.3.4", - "@babel/types": "^7.3.4", + "@babel/helper-split-export-declaration": "^7.4.0", + "@babel/parser": "^7.4.3", + "@babel/types": "^7.4.0", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.11" @@ -1131,9 +1169,9 @@ } }, "@babel/types": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.4.tgz", - "integrity": "sha512-WEkp8MsLftM7O/ty580wAmZzN1nDmCACc5+jFzUt+GUFNNIi3LdRlueYz0YIlmJhlZx1QYDMZL5vdWCL0fNjFQ==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", + "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -1222,8 +1260,26 @@ "js-yaml": "^3.9.0", "lodash.get": "^4.4.2", "parse-json": "^4.0.0" + }, + "dependencies": { + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + } } }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, "json5": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", @@ -1234,9 +1290,9 @@ } }, "marked": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.6.1.tgz", - "integrity": "sha512-+H0L3ibcWhAZE02SKMqmvYsErLo4EAVJxu5h3bHBBDvvjeWXtl92rGUSBYHL2++5Y+RSNgl8dYOAXcYe7lp1fA==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.6.2.tgz", + "integrity": "sha512-LqxwVH3P/rqKX4EKGz7+c2G9r98WeM/SW34ybhgNGhUQNKtf1GmmSkJ6cDGJ/t6tiyae49qRkpyTw2B9HOrgUA==", "dev": true }, "minimist": { @@ -1343,16 +1399,16 @@ } }, "@ngtools/webpack": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-7.2.4.tgz", - "integrity": "sha512-mXMDODmy53kk+Kb5jgLNQOsSrDBQQMf6C6KZNuGo8AdvUGdGaQeZDze4o7bcUz1KUjuaaP1Zh7pZtho8C4/T+Q==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-7.3.8.tgz", + "integrity": "sha512-gfjSKz+F/2T4tZHpnQ1XqelKP/CIfI87XdoHsOI53ceTUrAkVKsOb3ULmEfkcdsdQZ/HhmCiLivcutHcW8xkhQ==", "dev": true, "requires": { - "@angular-devkit/core": "7.2.4", + "@angular-devkit/core": "7.3.8", "enhanced-resolve": "4.1.0", "rxjs": "6.3.3", - "tree-kill": "1.2.0", - "webpack-sources": "1.2.0" + "tree-kill": "1.2.1", + "webpack-sources": "1.3.0" }, "dependencies": { "rxjs": { @@ -1363,22 +1419,6 @@ "requires": { "tslib": "^1.9.0" } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "webpack-sources": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.2.0.tgz", - "integrity": "sha512-9BZwxR85dNsjWz3blyxdOhTgtnQvv3OEs5xofI0wPYTwu5kaWxS08UuD1oI7WLBLpRO+ylf0ofnXLXWmGb2WMw==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - } } } }, @@ -1526,6 +1566,11 @@ "integrity": "sha512-8LCqostMfYwQs9by1k21/P4KZp9uFQk3Q528y3qtPKQnCJmKz0Em3YzgeNjTNV1FVrG/7n/6j12d4UKg9zSgDw==", "dev": true }, + "@types/pako": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@types/pako/-/pako-1.0.1.tgz", + "integrity": "sha512-GdZbRSJ3Cv5fiwT6I0SQ3ckeN2PWNqxd26W9Z2fCK1tGrrasGy4puvNFtnddqH9UJFMQYXxEuuB7B8UK+LLwSg==" + }, "@types/q": { "version": "0.0.32", "resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz", @@ -1769,10 +1814,11 @@ } }, "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true, + "optional": true }, "accepts": { "version": "1.3.5", @@ -1791,13 +1837,10 @@ "dev": true }, "acorn-dynamic-import": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", - "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", - "dev": true, - "requires": { - "acorn": "^5.0.0" - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", + "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", + "dev": true }, "adler-32": { "version": "1.2.0", @@ -2245,16 +2288,16 @@ "dev": true }, "autoprefixer": { - "version": "9.4.3", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.4.3.tgz", - "integrity": "sha512-/XSnzDepRkAU//xLcXA/lUWxpsBuw0WiriAHOqnxkuCtzLhaz+fL4it4gp20BQ8n5SyLzK/FOc7A0+u/rti2FQ==", + "version": "9.4.6", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.4.6.tgz", + "integrity": "sha512-Yp51mevbOEdxDUy5WjiKtpQaecqYq9OqZSL04rSoCiry7Tc5I9FEyo3bfxiTJc1DfHeKwSFCUYbBAiOQ2VGfiw==", "dev": true, "requires": { - "browserslist": "^4.3.6", - "caniuse-lite": "^1.0.30000921", + "browserslist": "^4.4.1", + "caniuse-lite": "^1.0.30000929", "normalize-range": "^0.1.2", "num2fraction": "^1.2.2", - "postcss": "^7.0.6", + "postcss": "^7.0.13", "postcss-value-parser": "^3.3.1" } }, @@ -2543,9 +2586,9 @@ } }, "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", "dev": true }, "binary-extensions": { @@ -2795,14 +2838,14 @@ } }, "browserslist": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.4.1.tgz", - "integrity": "sha512-pEBxEXg7JwaakBXjATYw/D1YZh4QUSCX/Mnd/wnqSRPPSi1U39iDhDoKGoBUcraKdxDlrYqJxSI5nNvD+dWP2A==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.4.tgz", + "integrity": "sha512-rAjx494LMjqKnMPhFkuLmLp8JWEX0o8ADTGeAbOqaF+XCvYLreZrG5uVjnPBlAQ8REZK4pzXGvp0bWgrFtKaag==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000929", - "electron-to-chromium": "^1.3.103", - "node-releases": "^1.1.3" + "caniuse-lite": "^1.0.30000955", + "electron-to-chromium": "^1.3.122", + "node-releases": "^1.1.13" } }, "browserstack": { @@ -2988,9 +3031,9 @@ } }, "caniuse-lite": { - "version": "1.0.30000936", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000936.tgz", - "integrity": "sha512-orX4IdpbFhdNO7bTBhSbahp1EBpqzBc+qrvTRVUFfZgA4zta7TdM6PN5ZxkEUgDnz36m+PfWGcdX7AVfFWItJw==", + "version": "1.0.30000960", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000960.tgz", + "integrity": "sha512-7nK5qs17icQaX6V3/RYrJkOsZyRNnroA4+ZwxaKJzIKy+crIy0Mz5CBlLySd2SNV+4nbUZeqeNfiaEieUBu3aA==", "dev": true }, "canonical-path": { @@ -4215,9 +4258,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.113", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.113.tgz", - "integrity": "sha512-De+lPAxEcpxvqPTyZAXELNpRZXABRxf+uL/rSykstQhzj/B0l1150G/ExIIxKc16lI89Hgz81J0BHAcbTqK49g==", + "version": "1.3.124", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.124.tgz", + "integrity": "sha512-glecGr/kFdfeXUHOHAWvGcXrxNU+1wSO/t5B23tT1dtlvYB26GY8aHzZSWD7HqhqC800Lr+w/hQul6C5AF542w==", "dev": true }, "elliptic": { @@ -4433,9 +4476,9 @@ } }, "eslint-scope": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -4924,9 +4967,9 @@ } }, "file-loader": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-2.0.0.tgz", - "integrity": "sha512-YCsBfd1ZGCyonOKLxPiKPdu+8ld9HAaMEvJewzz+b2eTF7uL5Zm/HdBF6FjCrpCMRq25Mi0U1gl4pwn2TlH7hQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-3.0.1.tgz", + "integrity": "sha512-4sNIOXgtH/9WZq4NvlfU3Opn5ynUsqBwSLyM+I7UOwdGigTBYfVVQEwe/msZNX/j4pCJTIM14Fsw66Svo1oVrw==", "dev": true, "requires": { "loader-utils": "^1.0.2", @@ -5936,26 +5979,17 @@ "dev": true }, "handlebars": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.0.tgz", - "integrity": "sha512-l2jRuU1NAWK6AW5qqcTATWQJvNPEwkM7NEKSiv/gqOsoSQbVoWyqVEY5GS+XPQ88zLNmqASRpzfdm8d79hJS+w==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", + "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", "dev": true, "requires": { - "async": "^2.5.0", + "neo-async": "^2.6.0", "optimist": "^0.6.1", "source-map": "^0.6.1", "uglify-js": "^3.1.4" }, "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -6311,9 +6345,9 @@ } }, "ieee754": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", "dev": true }, "iferr": { @@ -6911,75 +6945,23 @@ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, - "istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", - "dev": true, - "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - } - } - }, "istanbul-api": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.1.tgz", - "integrity": "sha512-kVmYrehiwyeBAk/wE71tW6emzLiHGjYIiDrc8sfyty4F8M02/lrgXSm+R1kXysmF20zArvmZXjlE/mg24TVPJw==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.4.tgz", + "integrity": "sha512-aAFQL0HA2BLUl18XmTQ7H7CGKI58DtZFvvfmg6e+rA3iNFergvpi16czLV4CpI7HOImMeZ5mqI62dvSNVtUQVA==", "dev": true, "requires": { "async": "^2.6.1", "compare-versions": "^3.2.1", "fileset": "^2.0.3", - "istanbul-lib-coverage": "^2.0.3", - "istanbul-lib-hook": "^2.0.3", - "istanbul-lib-instrument": "^3.1.0", - "istanbul-lib-report": "^2.0.4", - "istanbul-lib-source-maps": "^3.0.2", - "istanbul-reports": "^2.1.1", - "js-yaml": "^3.12.0", - "make-dir": "^1.3.0", + "istanbul-lib-coverage": "^2.0.4", + "istanbul-lib-hook": "^2.0.6", + "istanbul-lib-instrument": "^3.2.0", + "istanbul-lib-report": "^2.0.7", + "istanbul-lib-source-maps": "^3.0.5", + "istanbul-reports": "^2.2.2", + "js-yaml": "^3.13.0", + "make-dir": "^2.1.0", "minimatch": "^3.0.4", "once": "^1.4.0" }, @@ -6994,15 +6976,15 @@ } }, "istanbul-lib-coverage": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", - "integrity": "sha512-dKWuzRGCs4G+67VfW9pBFFz2Jpi4vSp/k7zBcJ888ofV5Mi1g5CUML5GvMvV6u9Cjybftu+E8Cgp+k0dI1E5lw==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-LXTBICkMARVgo579kWDm8SqfB6nvSDKNqIOBEjmJRnL04JvoMHCYGWaMddQnseJYtkEuEvO/sIcOxPLk9gERug==", "dev": true }, "istanbul-lib-instrument": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.0.tgz", - "integrity": "sha512-ooVllVGT38HIk8MxDj/OIHXSYvH+1tq/Vb38s8ixt9GoJadXska4WkGY+0wkmtYCZNYtaARniH/DixUGGLZ0uA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.2.0.tgz", + "integrity": "sha512-06IM3xShbNW4NgZv5AP4QH0oHqf1/ivFo8eFys0ZjPXHGldHJQWb3riYOKXqmOqfxXBfxu4B+g/iuhOPZH0RJg==", "dev": true, "requires": { "@babel/generator": "^7.0.0", @@ -7010,9 +6992,39 @@ "@babel/template": "^7.0.0", "@babel/traverse": "^7.0.0", "@babel/types": "^7.0.0", - "istanbul-lib-coverage": "^2.0.3", - "semver": "^5.5.0" + "istanbul-lib-coverage": "^2.0.4", + "semver": "^6.0.0" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + } } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "semver": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz", + "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==", + "dev": true } } }, @@ -7070,9 +7082,9 @@ "dev": true }, "istanbul-lib-hook": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.3.tgz", - "integrity": "sha512-CLmEqwEhuCYtGcpNVJjLV1DQyVnIqavMLFHV/DP+np/g3qvdxu3gsPqYoJMXm15sN84xOlckFB3VNvRbf5yEgA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.6.tgz", + "integrity": "sha512-829DKONApZ7UCiPXcOYWSgkFXa4+vNYoNOt3F+4uDJLKL1OotAoVwvThoEj1i8jmOj7odbYcR3rnaHu+QroaXg==", "dev": true, "requires": { "append-transform": "^1.0.0" @@ -7094,33 +7106,55 @@ } }, "istanbul-lib-report": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.4.tgz", - "integrity": "sha512-sOiLZLAWpA0+3b5w5/dq0cjm2rrNdAfHWaGhmn7XEFW6X++IV9Ohn+pnELAl9K3rfpaeBfbmH9JU5sejacdLeA==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.7.tgz", + "integrity": "sha512-wLH6beJBFbRBLiTlMOBxmb85cnVM1Vyl36N48e4e/aTKSM3WbOx7zbVIH1SQ537fhhsPbX0/C5JB4qsmyRXXyA==", "dev": true, "requires": { - "istanbul-lib-coverage": "^2.0.3", - "make-dir": "^1.3.0", + "istanbul-lib-coverage": "^2.0.4", + "make-dir": "^2.1.0", "supports-color": "^6.0.0" }, "dependencies": { "istanbul-lib-coverage": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", - "integrity": "sha512-dKWuzRGCs4G+67VfW9pBFFz2Jpi4vSp/k7zBcJ888ofV5Mi1g5CUML5GvMvV6u9Cjybftu+E8Cgp+k0dI1E5lw==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-LXTBICkMARVgo579kWDm8SqfB6nvSDKNqIOBEjmJRnL04JvoMHCYGWaMddQnseJYtkEuEvO/sIcOxPLk9gERug==", + "dev": true + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true } } }, "istanbul-lib-source-maps": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.2.tgz", - "integrity": "sha512-JX4v0CiKTGp9fZPmoxpu9YEkPbEqCqBbO3403VabKjH+NRXo72HafD5UgnjTEqHL2SAjaZK1XDuDOkn6I5QVfQ==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.5.tgz", + "integrity": "sha512-eDhZ7r6r1d1zQPVZehLc3D0K14vRba/eBYkz3rw16DLOrrTzve9RmnkcwrrkWVgO1FL3EK5knujVe5S8QHE9xw==", "dev": true, "requires": { "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.3", - "make-dir": "^1.3.0", + "istanbul-lib-coverage": "^2.0.4", + "make-dir": "^2.1.0", "rimraf": "^2.6.2", "source-map": "^0.6.1" }, @@ -7135,17 +7169,39 @@ } }, "istanbul-lib-coverage": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", - "integrity": "sha512-dKWuzRGCs4G+67VfW9pBFFz2Jpi4vSp/k7zBcJ888ofV5Mi1g5CUML5GvMvV6u9Cjybftu+E8Cgp+k0dI1E5lw==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-LXTBICkMARVgo579kWDm8SqfB6nvSDKNqIOBEjmJRnL04JvoMHCYGWaMddQnseJYtkEuEvO/sIcOxPLk9gERug==", "dev": true }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -7155,9 +7211,9 @@ } }, "istanbul-reports": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.1.1.tgz", - "integrity": "sha512-FzNahnidyEPBCI0HcufJoSEoKykesRlFcSzQqjH9x0+LC8tnnE/p/90PBLu8iZTxr8yYZNyTtiAujUqyN+CIxw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.2.tgz", + "integrity": "sha512-ZFuTdBQ3PSaPnm02aEA4R6mzQ2AF9w03CYiXADzWbbE48v/EFOWF4MaX4FT0NRdqIk48I7o0RPi+S8TMswaCbQ==", "dev": true, "requires": { "handlebars": "^4.1.0" @@ -9401,9 +9457,9 @@ "dev": true }, "js-yaml": { - "version": "3.12.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz", - "integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -9461,10 +9517,21 @@ "dev": true }, "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } }, "jsonfile": { "version": "4.0.0", @@ -9729,9 +9796,9 @@ } }, "license-webpack-plugin": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-2.0.4.tgz", - "integrity": "sha512-FQgOqrrIcD4C/VQo6ecWgXZULK5rs0kIDJtHcSVO6SBUrD63kEHZwmKOvBTquFQSgMQn/yeH68qooKDfqiBF2Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-2.1.0.tgz", + "integrity": "sha512-vDiBeMWxjE9n6TabQ9J4FH8urFdsRK0Nvxn1cit9biCiR9aq1zBR0X2BlAkEiIG6qPamLeU0GzvIgLkrFc398A==", "dev": true, "requires": { "@types/webpack-sources": "^0.1.5", @@ -9876,14 +9943,14 @@ "dev": true }, "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", "dev": true, "requires": { - "big.js": "^3.1.3", + "big.js": "^5.2.2", "emojis-list": "^2.0.0", - "json5": "^0.5.0" + "json5": "^1.0.1" } }, "locate-path": { @@ -10352,9 +10419,9 @@ "dev": true }, "mini-css-extract-plugin": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.4.tgz", - "integrity": "sha512-o+Jm+ocb0asEngdM6FsZWtZsRzA8koFUudIDwYUfl94M3PejPHG7Vopw5hN9V8WsMkSFpm3tZP3Fesz89EyrfQ==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.5.0.tgz", + "integrity": "sha512-IuaLjruM0vMKhUUT51fQdQzBYTX49dLj8w68ALEAe2A4iYNpIC4eMac67mt3NzycvjOlf07/kYxJDc0RTl1Wqw==", "dev": true, "requires": { "loader-utils": "^1.1.0", @@ -10721,18 +10788,18 @@ } }, "node-releases": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.7.tgz", - "integrity": "sha512-bKdrwaqJUPHqlCzDD7so/R+Nk0jGv9a11ZhLrD9f6i947qGLrGAhU3OxRENa19QQmwzGy/g6zCDEuLGDO8HPvA==", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.14.tgz", + "integrity": "sha512-d58EpVZRhQE60kWiWUaaPlK9dyC4zg3ZoMcHcky2d4hDksyQj0rUozwInOl0C66mBsqo01Tuns8AvxnL5S7PKg==", "dev": true, "requires": { "semver": "^5.3.0" } }, "node-sass": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.10.0.tgz", - "integrity": "sha512-fDQJfXszw6vek63Fe/ldkYXmRYK/QS6NbvM3i5oEo9ntPDy4XX7BcKZyTKv+/kSSxRtXXc7l+MSwEmYc0CSy6Q==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.11.0.tgz", + "integrity": "sha512-bHUdHTphgQJZaF1LASx0kAviPH7sGlcyNhWade4eVIpFp6tsn7SV8xNMTbsQFpEV9VXpnwTTnNYlfsZXgGgmkA==", "dev": true, "optional": true, "requires": { @@ -10792,6 +10859,7 @@ "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", "dev": true, + "optional": true, "requires": { "abbrev": "1" } @@ -11054,6 +11122,15 @@ "mimic-fn": "^1.0.0" } }, + "open": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/open/-/open-6.0.0.tgz", + "integrity": "sha512-/yb5mVZBz7mHLySMiSj2DcLtMBbFPJk5JBKEkHVZFxZAPzeg3L026O0T+lbdz1B2nyDnkClRSwRQJdeVUIF7zw==", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, "opencollective": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/opencollective/-/opencollective-1.0.3.tgz", @@ -11476,10 +11553,9 @@ } }, "pako": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.8.tgz", - "integrity": "sha512-6i0HVbUfcKaTv+EG8ZTr75az7GFXcLYk9UyLEg7Notv/Ma+z/UG3TCoz6GiNeOrn1E/e63I0X/Hpw18jHOTUnA==", - "dev": true + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", + "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==" }, "parallel-transform": { "version": "1.1.0", @@ -11493,9 +11569,9 @@ } }, "parse-asn1": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.3.tgz", - "integrity": "sha512-VrPoetlz7B/FqjBLD2f5wBVZvsZVLnRUrxVLfRYhGXCODa/NWE4p3Wp+6+aV3ZPL3KM7/OZmxDIwwijD7yuucg==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", + "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", "dev": true, "requires": { "asn1.js": "^4.0.0", @@ -11731,9 +11807,9 @@ "dev": true }, "postcss": { - "version": "7.0.13", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.13.tgz", - "integrity": "sha512-h8SY6kQTd1wISHWjz+E6cswdhMuyBZRb16pSTv3W4zYZ3/YbyWeJdNUeOXB5IdZqE1U76OUEjjjqsC3z2f3hVg==", + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", + "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -12111,9 +12187,9 @@ } }, "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { "safe-buffer": "^5.1.0" @@ -12148,10 +12224,14 @@ } }, "raw-loader": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", - "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=", - "dev": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-1.0.0.tgz", + "integrity": "sha512-Uqy5AqELpytJTRxYT4fhltcKPj0TyaEpzJDcGz7DFJi+pQOOi3GjR/DOdxTkTsF+NzhnldIoG6TORaBlInUuqA==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "schema-utils": "^1.0.0" + } }, "read-cache": { "version": "1.0.0", @@ -13200,12 +13280,12 @@ }, "dependencies": { "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", + "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", "dev": true, "requires": { - "lodash": "^4.17.10" + "lodash": "^4.17.11" } } } @@ -13358,9 +13438,9 @@ } }, "speed-measure-webpack-plugin": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/speed-measure-webpack-plugin/-/speed-measure-webpack-plugin-1.2.5.tgz", - "integrity": "sha512-S/guYjC4Izn5wY2d0+M4zowED/F77Lxh9yjkTZ+XAr244pr9c1MYNcXcRe9lx2hmAj0GPbOrBXgOF2YIp/CZ8A==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/speed-measure-webpack-plugin/-/speed-measure-webpack-plugin-1.3.1.tgz", + "integrity": "sha512-qVIkJvbtS9j/UeZumbdfz0vg+QfG/zxonAjzefZrqzkr7xOncLVXkeGbTpzd1gjCBM4PmVNkWlkeTVhgskAGSQ==", "dev": true, "requires": { "chalk": "^2.0.1" @@ -13752,9 +13832,9 @@ "dev": true }, "tapable": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.1.tgz", - "integrity": "sha512-9I2ydhj8Z9veORCw5PRm4u9uebCn0mcCa6scWoNcbZ6dAtoo2618u9UUzxgmsCOreJpqDDuv61LvwofW7hLcBA==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", "dev": true }, "tar": { @@ -13770,28 +13850,44 @@ } }, "terser": { - "version": "3.16.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.16.1.tgz", - "integrity": "sha512-JDJjgleBROeek2iBcSNzOHLKsB/MdDf+E/BOAJ0Tk9r7p9/fVobfv7LMJ/g/k3v9SXdmjZnIlFd5nfn/Rt0Xow==", + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz", + "integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==", "dev": true, "requires": { - "commander": "~2.17.1", + "commander": "^2.19.0", "source-map": "~0.6.1", - "source-map-support": "~0.5.9" + "source-map-support": "~0.5.10" }, "dependencies": { + "commander": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true + }, + "source-map-support": { + "version": "0.5.12", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", + "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } } } }, "terser-webpack-plugin": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.1.tgz", - "integrity": "sha512-GGSt+gbT0oKcMDmPx4SRSfJPE1XaN3kQRWG4ghxKQw9cn5G9x6aCKSsgYdvyM0na9NJ4Drv0RG6jbBByZ5CMjw==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.2.tgz", + "integrity": "sha512-1DMkTk286BzmfylAvLXwpJrI7dWa5BnFmscV/2dCr8+c56egFcbaeFAl7+sujAjdmpLam21XRdhA4oifLyiWWg==", "dev": true, "requires": { "cacache": "^11.0.2", @@ -13799,7 +13895,7 @@ "schema-utils": "^1.0.0", "serialize-javascript": "^1.4.0", "source-map": "^0.6.1", - "terser": "^3.8.1", + "terser": "^3.16.1", "webpack-sources": "^1.1.0", "worker-farm": "^1.5.2" }, @@ -13827,13 +13923,13 @@ } }, "find-cache-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.0.0.tgz", - "integrity": "sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", "dev": true, "requires": { "commondir": "^1.0.1", - "make-dir": "^1.0.0", + "make-dir": "^2.0.0", "pkg-dir": "^3.0.0" } }, @@ -13865,6 +13961,16 @@ "yallist": "^3.0.2" } }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, "mississippi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", @@ -13884,9 +13990,9 @@ } }, "p-limit": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", - "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -13902,9 +14008,15 @@ } }, "p-try": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", - "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true }, "pkg-dir": { @@ -13926,6 +14038,12 @@ "once": "^1.3.1" } }, + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -14092,9 +14210,9 @@ "dev": true }, "tree-kill": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz", - "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.1.tgz", + "integrity": "sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q==", "dev": true }, "trim-newlines": { @@ -14305,16 +14423,23 @@ "dev": true }, "uglify-js": { - "version": "3.4.9", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", - "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.4.tgz", + "integrity": "sha512-GpKo28q/7Bm5BcX9vOu4S46FwisbPbAmkkqPnGIpKvKTM96I85N6XHQV+k4I6FA2wxgLhcsSyHoNhzucwCflvA==", "dev": true, "optional": true, "requires": { - "commander": "~2.17.1", + "commander": "~2.20.0", "source-map": "~0.6.1" }, "dependencies": { + "commander": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "dev": true, + "optional": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -14661,17 +14786,17 @@ } }, "webpack": { - "version": "4.28.4", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.28.4.tgz", - "integrity": "sha512-NxjD61WsK/a3JIdwWjtIpimmvE6UrRi3yG54/74Hk9rwNj5FPkA4DJCf1z4ByDWLkvZhTZE+P3C/eh6UD5lDcw==", + "version": "4.29.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.29.0.tgz", + "integrity": "sha512-pxdGG0keDBtamE1mNvT5zyBdx+7wkh6mh7uzMOo/uRQ/fhsdj5FXkh/j5mapzs060forql1oXqXN9HJGju+y7w==", "dev": true, "requires": { "@webassemblyjs/ast": "1.7.11", "@webassemblyjs/helper-module-context": "1.7.11", "@webassemblyjs/wasm-edit": "1.7.11", "@webassemblyjs/wasm-parser": "1.7.11", - "acorn": "^5.6.2", - "acorn-dynamic-import": "^3.0.0", + "acorn": "^6.0.5", + "acorn-dynamic-import": "^4.0.0", "ajv": "^6.1.0", "ajv-keywords": "^3.1.0", "chrome-trace-event": "^1.0.0", @@ -14692,6 +14817,12 @@ "webpack-sources": "^1.3.0" }, "dependencies": { + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, "schema-utils": { "version": "0.4.7", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", @@ -14732,9 +14863,9 @@ } }, "webpack-dev-middleware": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.4.0.tgz", - "integrity": "sha512-Q9Iyc0X9dP9bAsYskAVJ/hmIZZQwf/3Sy4xCAZgL5cUkjZmUZLt4l5HpbST/Pdgjn3u6pE7u5OdGd1apgzRujA==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.5.1.tgz", + "integrity": "sha512-4dwCh/AyMOYAybggUr8fiCkRnjVDp+Cqlr9c+aaNB3GJYgRGYQWJ1YX/WAKUNA9dPNHZ6QSN2lYDKqjKSI8Vqw==", "dev": true, "requires": { "memory-fs": "~0.4.1", @@ -14744,9 +14875,9 @@ }, "dependencies": { "mime": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", - "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.2.tgz", + "integrity": "sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg==", "dev": true } } @@ -15062,9 +15193,9 @@ } }, "webpack-merge": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.1.4.tgz", - "integrity": "sha512-TmSe1HZKeOPey3oy1Ov2iS3guIZjWvMT2BBJDzzT5jScHTjVC3mpjJofgueEzaEd6ibhxRDD6MIblDr8tzh8iQ==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.1.tgz", + "integrity": "sha512-4p8WQyS98bUJcCvFMbdGZyZmsKuWjWVnVHnAS3FFg0HDaRVrPbkivx2RYCre8UiemD67RsiFFLfn4JhLAin8Vw==", "dev": true, "requires": { "lodash": "^4.17.5" diff --git a/package.json b/package.json index 48ffd434ccbb52b691a4715c4bcf7872de688acc..57219b5b6b90da03fd50c7e1432e91f6652433e5 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "@angular/platform-browser": "^7.2.7", "@angular/platform-browser-dynamic": "^7.2.7", "@angular/router": "^7.2.7", + "@types/pako": "^1.0.1", "@types/sprintf-js": "^1.1.2", "angular2-chartjs": "^0.5.1", "core-js": "^2.6.5", @@ -45,6 +46,7 @@ "ngx-material-file-input": "^1.1.1", "ngx-md": "^7.0.0", "ngx-webstorage-service": "^4.0.1", + "pako": "^1.0.10", "roboto-fontface": "^0.10.0", "rxjs": "^6.3.3", "rxjs-compat": "^6.3.3", @@ -53,7 +55,7 @@ "zone.js": "^0.8.28" }, "devDependencies": { - "@angular-devkit/build-angular": "^0.12.2", + "@angular-devkit/build-angular": "^0.13.8", "@angular/cli": "^7.3.4", "@angular/compiler-cli": "^7.2.7", "@angular/language-service": "^7.2.7", diff --git a/sessionDeflate.js b/sessionDeflate.js new file mode 100755 index 0000000000000000000000000000000000000000..95dddfe1b5e7f15d70ea7304915a9a40e25e2367 --- /dev/null +++ b/sessionDeflate.js @@ -0,0 +1,21 @@ +#!/usr/bin/env node + +'use strict'; + +const pako = require("pako"); +global.atob = require("atob"); + +const stdin = process.openStdin(); + +// let session = 'eJztXdtu4kgQ/Reeo5Vp48wkb2EAAxs3A+vgy2oefBM32xgDwXaUf1+SrOhiFEeWsjMr4LyFpOkkh+qqU6eq2k+1dbBez5Zx7fbvp9p25tdua1xNVi6rXdWSdJmsa7dPNc8JPT1PgtqtclWLl37w9kJ63q9xUicKNkG6ft1hnUfuMtxv8j3dbxDtl+6//qvH1fv2/vWjE25f3veHJEn15yuy/F6s/nZ3/+3hvnb0Y6N8s+N9rI9+q3K0dFy+lD3/eFn6Bodt7Bqe/D4cX3+GY71Jt95mmwZrAqimjnZO9/0dvtAdFLLB23fqV7VwOWsF7mzz+q+W4m23Pvh/6pJUFc6fUbr/CCW68Jv/0abXFFGnCHeuATwOFjZvzgYq8Dicl6geOiUO6BLx8FS/CFrA4+A/on4eRMDjELCLTubhvBzw8HU71hBfhD/tTvIAePz4z9jq8GO2atc/guL4z7bZR2vrezQoUYiUVCs56NWoKI9uGl588aYgEJX5tY/QSkJruPKRqgjqJS/lAVynwGP+UOclyfAl4mHFncgvgMchvpiTgiOVFVQ0vmuAmhM8us0VUrczoKID42tdKyEKv0Ek1npcuzNfXs/iV9OInKx223gxmiB5eXNdKfuY34PpF8jGvGhuy2Tj3wDQfY//uX+1cdJJsOFbl35kb9/8/vI7X9/0aan9PUir4uQa9aLMQ/7/1YZjO9vbwr+WxoSlSV+UX21LgfGQ2yVes2LeF9soQVDepg8VBzxW5MHmdMlhHyK8qTexA54ieJtpya4OPA7+lE1yG+dF4BFbOxe6Ii1RxdCNKINZSD7wOP28j8ejlVMimFejorY6ndqQiEQCVDQlDolI4BH7cYDQSkKJlvugoqQkM54htJJUxWwqAagX8R/9BPZB8NB5rEHqEP6jm2x8pLKnT0Uds78r61WoRkX3rlOyQb3E0VDLW90vEY+ByQsL1EuEkihbWgitpLq/yB2EEuGRWaZ4sA9hH7KN7jHaiGwmGaQOUoU07C1U8zOgonY0TcvKhRUL9MZOwkwczdLsNQpsRHefjyUPVIM0LGiNsjrEJeLh6M3EBh4itM7DDI3ZxH8UVgMztcQ+is4UM4IED6Y1XPPi8Th9KsqL6bLMsKtR0aCrFXAVBFH2dafhaAhV1GjXoZrTOgSXXDS0CJUnHl8PQEWFCshGKzRwkNRNvQkhdRA89PYumAMPwT8sGQ2CZ0BFtS5fBCWaVTUq6jJFCkC9hCpqJiuMLZHQatrXDlynsI+CRxbwEKE1HipI3UgDR7efoWGBpG7GlHmoMgn7YJsM10MRBiP3N7CPM6Cifncol2k0FVVR9aaBCViiAnbbCofKI0JJHK59ZK1CNZfvdjgvpMCmPzD0zhKqYXauPRToxXkxk3CA8yIituFJPqpMIrVnCW4UOAcq6qr9uOyKxGpU1GdSbsFViKMR8boH6iWoaDTJUGCjrnOBsTaKh+5B9aLUK+qvcakxSe1VicGfUiq6SXFpLamqdNsMvaJnQEUDc7T0Sz7IimNLqv2ooeAoyH3cnJVdi3yJePiFv3YQSgQeei93oHqJUKLumI1URfgPY/QIFZCkKsUkwywCoeZ6P8cEPaWiPcbRsHD6VFTTm7n1KSpqy32mIUsTKmDL3+HyIuIq5uE1egEJ1WDtAtSLUA1jlNsIJeK86B2G1I00cLDNCqoXidjyRPIQX0RqH/VTB/7j9KkoN6bLsidSVaOilj5ewxSIqzCyNQoo1HWOwgFUYkG94mWOe/CIytO9U9ArSlLZyM40UFFBNeKRDH9Kq26dVVkd8xLxCMw2wxjXGVBRTfYXwacuc/KMMMNlPVTlUTYcrlO4CmPBNNiHCCXd/kJDAZYUYJspHtxHPHI0neKKe4JHd5QjlSXnZb6PtxiLJQ0LPAmAx+lTUTf2irJ5vIoT9K0xVMCjpz9kUxfUSxQcY3uL0EpOXDGs4xEIRAVk/NFGr7nAQ+000EtMqKjupxqoBpE6hngEwlHqNn7EWOwZUFE7TtJPXnFvhgWHKRBE/RSqKHEVZq9AFk/sQ9UauNyK4FFouQ/7EKms7CccqrnwH4UfYxaBpCr6WC57PuIl4uEVPcxmnAMVteZWo2yopOIV96oS4wpzUjBoTTdwFQIPrvYZCmwCDz9u4h684+e9JTaol/AfRsjgP6g/HTVwjyZVzccZR7wVeLQ0GTdOnAEVdbs95pZoEtWoqGYMd5iAJUdD9vIB2sqFqsGUCG32VOXhc0wE04LjKMLYAcGDjaZoeCJiid7MMcZFU5Upg2pOGMz8geHphqdLRX88/wMHt56Z'; + +let session = ''; +stdin.on('data', function(chunk) { + session += chunk; +}); + +stdin.on('end', function() { + session = atob(session); // base64 + session = pako.inflate(session, { to: 'string' }); // gzip (zlib) + console.log(session); +}); diff --git a/src/app/app.component.html b/src/app/app.component.html index 0b4c83e46368616b11f9653e70c79afa9c29b224..880492fa2975b8f748ef35df6f79251e46233101 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -41,7 +41,8 @@ <!-- calculators list as a tabs bar--> <div id="tabs-container" [hidden]="! tabsFitInNavbar"> <button mat-raised-button color="primary" *ngFor="let c of calculators" class="" [title]="c.title" - [routerLink]="['/calculator/',c.uid]" [color]="c.active ? '' : 'primary'" (click)="setActiveCalc(c.uid)" + [routerLink]="['/calculator/',c.uid]" [color]="c.active ? '' : 'primary'" + (click)="setActiveCalc(c.uid)" (mouseup)="onMouseUp($event, c.uid)" [ngClass]="['calculator-button', 'calculator-uid-' + c.uid, c.active ? 'active' : '' ]"> <span class="calc-name"> @@ -89,6 +90,10 @@ <mat-icon>settings</mat-icon> {{ uitextSidenavParams }} </a> + <a id="side-nav-bug-report" (click)="reportBug(); sidenav.close()"> + <mat-icon>report_problem</mat-icon> + {{ uitextSidenavReportBug }} + </a> <a id="side-nav-help" target="_blank" href="assets/docs-fr/" (click)="sidenav.close()"> <mat-icon>help</mat-icon> {{ uitextSidenavHelp }} diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 9f7ad4caf20241acc0c3e4e8fc250b15327bdbfb..49857e2382267a1294d544c77d242aca23856207 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -15,11 +15,13 @@ import { HttpService } from "./services/http/http.service"; import { ApplicationSetupService } from "./services/app-setup/app-setup.service"; import { nghydDateRev, nghydVersion } from "../date_revision"; +import { DialogConfirmCloseCalcComponent } from "./components/dialog-confirm-close-calc/dialog-confirm-close-calc.component"; import { DialogConfirmEmptySessionComponent } from "./components/dialog-confirm-empty-session/dialog-confirm-empty-session.component"; import { DialogLoadSessionComponent } from "./components/dialog-load-session/dialog-load-session.component"; import { DialogSaveSessionComponent } from "./components/dialog-save-session/dialog-save-session.component"; import { NotificationsService } from "./services/notifications/notifications.service"; +import * as pako from "pako"; @Component({ selector: "nghyd-app", @@ -72,7 +74,8 @@ export class AppComponent implements OnInit, OnDestroy, Observer { private saveSessionDialog: MatDialog, private loadSessionDialog: MatDialog, private matIconRegistry: MatIconRegistry, - private domSanitizer: DomSanitizer + private domSanitizer: DomSanitizer, + private confirmCloseCalcDialog: MatDialog ) { ServiceFactory.instance.httpService = httpService; ServiceFactory.instance.applicationSetupService = appSetupService; @@ -152,6 +155,10 @@ export class AppComponent implements OnInit, OnDestroy, Observer { return this.intlService.localizeText("INFO_MENU_EMPTY_SESSION_TITLE"); } + public get uitextSidenavReportBug() { + return this.intlService.localizeText("INFO_MENU_REPORT_BUG"); + } + public get uitextSidenavHelp() { return this.intlService.localizeText("INFO_MENU_HELP_TITLE"); } @@ -185,6 +192,28 @@ export class AppComponent implements OnInit, OnDestroy, Observer { this.currentCalc = this._calculators[index]; } + /** + * Close calculator using middle click on tab + */ + public onMouseUp(event: any, uid: string) { + if (event.which === 2) { + const dialogRef = this.confirmCloseCalcDialog.open( + DialogConfirmCloseCalcComponent, + { + data: { + uid: uid + }, + disableClose: true + } + ); + dialogRef.afterClosed().subscribe(result => { + if (result) { + this.formulaireService.requestCloseForm(uid); + } + }); + } + } + /** * Returns true if sum of open calculator tabs witdh is lower than navbar * available space (ie. if navbar is not overflowing), false otherwise @@ -296,8 +325,12 @@ export class AppComponent implements OnInit, OnDestroy, Observer { * @param calcList modules to save * @param filename */ - private saveSession(calcList: any[], filename) { - const elems = []; + private saveSession(calcList: any[], filename: string) { + const session: string = this.buildSessionFile(calcList); + this.formulaireService.downloadTextFile(session, filename); + } + + private buildSessionFile(calcList: any[]): string { const serialiseOptions: { [key: string]: {} } = {}; for (const c of calcList) { if (c.selected) { @@ -306,8 +339,7 @@ export class AppComponent implements OnInit, OnDestroy, Observer { }; } } - const session: string = Session.getInstance().serialise(serialiseOptions); - this.formulaireService.downloadTextFile(session, filename); + return Session.getInstance().serialise(serialiseOptions); } /** @@ -411,6 +443,43 @@ export class AppComponent implements OnInit, OnDestroy, Observer { }); } + /** + * Demande au client d'envoyer un email (génère un lien mailto:), pré-rempli + * avec un texte standard, et le contenu de la session au format JSON + */ + public reportBug() { + const recipient = "bug@cassiopee.g-eau.fr"; + const subject = "[ISSUE] " + this.intlService.localizeText("INFO_REPORT_BUG_SUBJECT"); + let body = this.intlService.localizeText("INFO_REPORT_BUG_BODY"); + + // add session description + + // get all forms + const list = []; + for (const c of this._calculators) { + list.push({ + title: c.title, + uid: c.uid, + selected: true + }); + } + let session = this.buildSessionFile(list); + + // compress + session = pako.deflate(session, { to: "string" }); // gzip (zlib) + session = btoa(session); // base64 + + body += session + "\n"; + body = encodeURIComponent(body); + + const mailtoURL = `mailto:${recipient}?subject=${subject}&body=${body}`; + + // temporarily disable tab closing alert, as tab won't be closed for real + this.appSetupService.warnBeforeTabClose = false; + window.location.href = mailtoURL; + this.appSetupService.warnBeforeTabClose = true; + } + public get revisionInfo(): any { return { jalhyd: { @@ -470,7 +539,10 @@ export class AppComponent implements OnInit, OnDestroy, Observer { */ @HostListener("window:beforeunload", ["$event"]) confirmExit($event) { - if (environment.production) { + if ( + this.appSetupService.warnBeforeTabClose + && environment.production // otherwise prevents dev server to reload app after recompiling + ) { // affecter une valeur différente de null provoque l'affichage d'un dialogue de confirmation, mais le texte n'est pas affiché $event.returnValue = "Your data will be lost !"; } diff --git a/src/app/components/calculator-list/calculator-list.component.ts b/src/app/components/calculator-list/calculator-list.component.ts index 1e13c7ec4e540702e843a53c497fb4531de823a9..b44a8e98662a89564b751d4a8eb99de82dd4fb9f 100644 --- a/src/app/components/calculator-list/calculator-list.component.ts +++ b/src/app/components/calculator-list/calculator-list.component.ts @@ -75,7 +75,10 @@ export class CalculatorListComponent implements OnInit { }; for (const t of unusedCalculators) { - if (t !== CalculatorType.Structure) { + if ( // those 2 sub-Nub types cannot be built outside a parent + t !== CalculatorType.Structure + && t !== CalculatorType.Section + ) { unusedTheme.calculators.push({ type: t, label: ServiceFactory.instance.formulaireService.getLocalisedTitleFromCalculatorType(t), diff --git a/src/app/components/dialog-load-session/dialog-load-session.component.ts b/src/app/components/dialog-load-session/dialog-load-session.component.ts index 016cac379dc0d1855c749396a5992ded4cf45cb5..18a61355abefd8943ca2743b3058a39ff9c1af2d 100644 --- a/src/app/components/dialog-load-session/dialog-load-session.component.ts +++ b/src/app/components/dialog-load-session/dialog-load-session.component.ts @@ -1,5 +1,8 @@ import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material"; import { Inject, Component } from "@angular/core"; + +import { decode } from "he"; + import { I18nService } from "../../services/internationalisation/internationalisation.service"; import { FormGroup, FormBuilder, Validators } from "@angular/forms"; import { ServiceFactory } from "../../services/service-factory"; @@ -125,7 +128,11 @@ export class DialogLoadSessionComponent { calcInfos => { this.calculators = calcInfos; for (const n of this.calculators) { - n.selected = true; + n.selected = true; + // if no title was given, generate a default one + if (! n.title) { + n.title = decode(formService.getLocalisedShortTitleFromCalculatorType(n.type)); + } } } ); diff --git a/src/app/components/generic-calculator/calculator.component.ts b/src/app/components/generic-calculator/calculator.component.ts index d7a267bb7d34f8fc668b9263a7cfd371eccb717a..c6c4aaa8399883dd1d95f5d6e6c31ef8f2a12e1f 100644 --- a/src/app/components/generic-calculator/calculator.component.ts +++ b/src/app/components/generic-calculator/calculator.component.ts @@ -1,4 +1,5 @@ -import { Component, OnInit, DoCheck, OnDestroy, ViewChild, ViewChildren, QueryList, AfterViewChecked, ElementRef, Renderer2 } from "@angular/core"; +import { Component, OnInit, DoCheck, OnDestroy, ViewChild, ViewChildren, + QueryList, AfterViewChecked, ElementRef, Renderer2 } from "@angular/core"; import { ActivatedRoute, Router } from "@angular/router"; import { Observer, Session, ParamValueMode } from "jalhyd"; diff --git a/src/app/components/param-link/param-link.component.ts b/src/app/components/param-link/param-link.component.ts index 53e88589e031102b385cafaef769ef43bdbb15aa..d0510e69b3fb6d3f445bb6ef0dc69a6a53bc462d 100644 --- a/src/app/components/param-link/param-link.component.ts +++ b/src/app/components/param-link/param-link.component.ts @@ -2,7 +2,7 @@ import { Component, Input, Output, EventEmitter, OnChanges, OnDestroy } from "@a import { NgParameter } from "../../formulaire/ngparam"; import { ServiceFactory } from "../../services/service-factory"; -import { LinkedValue, ParamValueMode, Observer, Structure } from "jalhyd"; +import { LinkedValue, ParamValueMode, Observer, Structure, acSection } from "jalhyd"; import { FormulaireService } from "../../services/formulaire/formulaire.service"; import { I18nService } from "../../services/internationalisation/internationalisation.service"; import { FormulaireDefinition } from "../../formulaire/definition/form-definition"; @@ -51,16 +51,16 @@ export class ParamLinkComponent implements OnChanges, Observer, OnDestroy { } /** - * Returns true if current target needs to be calculated, + * Returns true if current target requires a calculation (direct or not), * whether the result is already available or not */ public get isCalculated(): boolean { const refValue = this.param.paramDefinition.referencedValue; - return (refValue.isResult() || refValue.isExtraResult()); + return refValue && refValue.isCalculated(); } /** - * Returns true if current target needs to be calculated, + * Returns true if current target requires a calculation (direct or not), * but result is not yet available */ public get isAwaitingCalculation(): boolean { @@ -149,7 +149,7 @@ export class ParamLinkComponent implements OnChanges, Observer, OnDestroy { const s = i.symbol; // nom associé au paramètre/à la valeur const c = i.meta["formTitle"]; // nom du module de calcul - // 1. Paramètre / résultat d'un ouvrage dans un Nub de type parallèle + // 1. Paramètre / résultat d'un ouvrage dans un Nub de type ParallelStructure if (i.nub instanceof Structure) { let p: number; p = i.nub.findPositionInParent(); @@ -167,14 +167,32 @@ export class ParamLinkComponent implements OnChanges, Observer, OnDestroy { ); } } else - // 2. Résultat + // 2. Paramètre / résultat d'une section dans un Nub de type SectionNub + if (i.nub instanceof acSection) { + let p: number; + p = i.nub.findPositionInParent(); + if (i.isResult()) { + // résultat de section + return sprintf( + this.intlService.localizeText("INFO_LINKED_VALUE_SECTION_RESULT"), + s, c + ); + } else { + // paramètre de section + return sprintf( + this.intlService.localizeText("INFO_LINKED_VALUE_SECTION"), + s, c + ); + } + } else + // 3. Résultat if (i.isResult()) { return sprintf( this.intlService.localizeText("INFO_LINKED_VALUE_RESULT"), s, c ); } else - // 3. Résultat complémentaire + // 4. Résultat complémentaire if (i.isExtraResult()) { if (i.meta["result"]) { // @TODO not used ? @@ -189,7 +207,7 @@ export class ParamLinkComponent implements OnChanges, Observer, OnDestroy { ); } } else { - // 4. Paramètre (cas général) + // 5. Paramètre (cas général) return `${s} (${c})`; } } @@ -230,6 +248,7 @@ export class ParamLinkComponent implements OnChanges, Observer, OnDestroy { // liste des paramètres liables if (this.param.valueMode === ParamValueMode.LINK) { this._linkableParams = this._formService.getLinkableValues(this.param); + console.log("UPDATED !", this._linkableParams); } else { this._linkableParams = []; } @@ -287,8 +306,8 @@ export class ParamLinkComponent implements OnChanges, Observer, OnDestroy { for (const lp of this._linkableParams) { if ( lp.nub.uid === f.currentNub.uid - || ( // repeatable structure inside parent module - lp.nub instanceof Structure + || ( // repeatable Nub inside parent Nub + lp.nub.parent && lp.nub.parent.uid === f.currentNub.uid ) ) { diff --git a/src/app/components/section-canvas/section-canvas.component.ts b/src/app/components/section-canvas/section-canvas.component.ts index 68187ba48a23b14f8c1552c438c6ce2c5b91fdf7..788528b8efed691b945c9e0bd82419c6715e096a 100644 --- a/src/app/components/section-canvas/section-canvas.component.ts +++ b/src/app/components/section-canvas/section-canvas.component.ts @@ -183,7 +183,7 @@ export class SectionCanvasComponent { try { // largeur au miroir - const B: Result = sect.Calc("B", yb); + const B: Result = sect.CalcSection("B", yb); if (!B.ok) { throw B; } @@ -203,7 +203,7 @@ export class SectionCanvasComponent { this._calcCanvas.setLineWidth(5); const wx: number = maxWidth / 2; - const alpha: Result = sect.Calc("Alpha", yb); + const alpha: Result = sect.CalcSection("Alpha", yb); if (!alpha.ok) { throw alpha; } diff --git a/src/app/formulaire/definition/concrete/form-courbe-remous.ts b/src/app/formulaire/definition/concrete/form-courbe-remous.ts index 6306ccb1e231f45499bdb8ece277912d98b78a2b..319f155d20a9b066f38f2e5758e866410990b927 100644 --- a/src/app/formulaire/definition/concrete/form-courbe-remous.ts +++ b/src/app/formulaire/definition/concrete/form-courbe-remous.ts @@ -1,4 +1,4 @@ -import { IObservable, MethodeResolution } from "jalhyd"; +import { IObservable, MethodeResolution, SectionNub, Session } from "jalhyd"; import { FormResultRemous } from "../form-result-remous"; import { FormDefSection } from "../form-def-section"; @@ -58,11 +58,13 @@ export class FormulaireCourbeRemous extends FormulaireBase { if (sender instanceof FieldSet && data.action === "propertyChange") { switch (sender.id) { case "fs_section": - this.replaceCurrentNub(sender.properties); + // replace underlying section without replacing whole Nub + const newSect = Session.getInstance().createSection(sender.properties.getPropValue("nodeType")); + (this._currentNub as SectionNub).setSection(newSect); + // reflect changes in GUI for (const fs of this.allFieldsets) { - fs.setNub(this._currentNub); - // treat the fieldset as new to re-subscribe to Nub properties change events - this.afterParseFieldset(fs); + // show / hide dependent fields + fs.updateFields(); } this.reset(); break; diff --git a/src/app/formulaire/definition/concrete/form-parallel-structures.ts b/src/app/formulaire/definition/concrete/form-parallel-structures.ts index 09e007bb6e4d5b3c2e3093d8b10cdeb9a03e77ea..2d703d83205641f1085b9c67dd6990564df10a73 100644 --- a/src/app/formulaire/definition/concrete/form-parallel-structures.ts +++ b/src/app/formulaire/definition/concrete/form-parallel-structures.ts @@ -1,4 +1,4 @@ -import { Structure, Nub, ParallelStructure, StructureType, LoiDebit, StructureProperties, Props, Session } from "jalhyd"; +import { Structure, Nub, ParallelStructure, LoiDebit, StructureProperties, Props, Session, StructureType } from "jalhyd"; import { FormDefParallelStructures } from "../form-def-parallel-structures"; import { FormComputeParallelStructures } from "../form-compute-parallel-structures"; @@ -51,7 +51,7 @@ export class FormulaireParallelStructure extends FormulaireBase { * @param after position après laquelle insérer la structure, à la fin sinon */ private addStructureNub(st: Structure, after?: number) { - this.parallelStructureNub.addStructure(st, after); + this.parallelStructureNub.addChild(st, after); } private get parallelStructureNub(): ParallelStructure { @@ -74,7 +74,7 @@ export class FormulaireParallelStructure extends FormulaireBase { protected replaceNub(sn: Structure, params: Props): Nub { const parent = (this.currentNub as ParallelStructure); const newStructure = this.createStructure(params); - parent.replaceStructureInplace(sn, newStructure); + parent.replaceChildInplace(sn, newStructure); return newStructure; } @@ -84,7 +84,7 @@ export class FormulaireParallelStructure extends FormulaireBase { */ protected deleteNub(sn: Structure) { const parent = (this.currentNub as ParallelStructure); - parent.deleteStructure(parent.getIndexForStructure(sn)); + parent.deleteChild(parent.getIndexForChild(sn)); } public createFieldset(parent: FormulaireNode, json: {}, data?: {}, nub?: Nub): FieldSet { @@ -137,7 +137,7 @@ export class FormulaireParallelStructure extends FormulaireBase { public moveFieldsetUp(fs: FieldSet) { if (fs.nub instanceof Structure) { // déplacement du nub - fs.nub.parent.moveStructureUp(fs.nub); + fs.nub.parent.moveChildUp(fs.nub); // déplacement du fieldset this.fieldsetContainer.moveFieldsetUp(fs); @@ -150,7 +150,7 @@ export class FormulaireParallelStructure extends FormulaireBase { public moveFieldsetDown(fs: FieldSet) { if (fs.nub instanceof Structure) { // déplacement du nub - fs.nub.parent.moveStructureDown(fs.nub); + fs.nub.parent.moveChildDown(fs.nub); // déplacement du fieldset this.fieldsetContainer.moveFieldsetDown(fs); @@ -184,130 +184,26 @@ export class FormulaireParallelStructure extends FormulaireBase { } /** - * recherche dans une config le 1er select avec une entrée "enum" avec une valeur donnée - */ - private findSelectWithEnum(conf: {}, enumName: string, enumVal: string): { - "select": { [key: string]: string; }, - "entry": { [key: string]: string; } - } { - let select; // select - let selectEntry; // entrée du select correspondant à la valeur de l'enum - - for (const k in conf) { - const kid = conf[k]; - if (kid.type === "select") { - // entrées - for (const e of kid.select) { - if (e.enum !== undefined) { - const tmp = e.enum.split("."); - const found = tmp[0] === enumName && tmp[1] === enumVal; - if (found) { - select = kid; - selectEntry = e; - break; - } - } - } - if (select !== undefined) { - break; - } - } - } - - if (select !== undefined) { - return { "select": select, "entry": selectEntry }; - } - } - - /** - * recherche dans une config le 1er objet avec dépendance donnée - */ - private findObjectWithDependency(conf: {}, refid: string, refvalue: string): {} { - for (const k in conf) { - const kid = conf[k]; - if (kid.dep_exist !== undefined) { - for (const dep of kid.dep_exist) { - if (dep.refid === refid && dep.refvalue === refvalue) { - return kid; - } - } - } - } - } - - /** - * trouve une loi de débit compatible avec un type de structure dans un Fieldset en tenant compte des dépendances entre selects - * @param fs - * @param structType - */ - private adjustLoiDebit(fs: FieldSet, structType: StructureType): Props { - const res: Props = fs.properties.clone(); - - // recherche du select "type de structure" - - const structSelect = this.findSelectWithEnum(fs.jsonConfig["fields"], "StructureType", StructureType[structType]); - if (structSelect === undefined) { - throw new Error(`pas de select trouvé pour la propriété StructureType=${StructureType[structType]}`); - } - - // recherche du select dépendant (lois de débit) - - const loidebitSelect = this.findObjectWithDependency(fs.jsonConfig["fields"], structSelect.select.id, structSelect.entry.id); - if (loidebitSelect === undefined || loidebitSelect["type"] !== "select") { - // tslint:disable-next-line:max-line-length - throw new Error(`pas de select trouvé avec une dépendance au select 'type de structure' pour la valeur ${structSelect.select.id}=${structSelect.entry.id} (1)`); - } - - // liste des enums du select dépendant - - const loisDebit = []; - for (const e of loidebitSelect["select"]) { - if (e.enum !== undefined) { - const tmp = e.enum.split("."); - loisDebit.push(LoiDebit[tmp[1]]); - } - } - - if (loisDebit.length === 0) { - // tslint:disable-next-line:max-line-length - throw new Error(`pas de select trouvé avec une dépendance au select 'type de structure' pour la valeur ${structSelect.select.id}=${structSelect.entry.id} (2)`); - } - - res.setPropValue("loiDebit", StructureProperties.findCompatibleLoiDebit( - structType, loisDebit, this.currentNub as ParallelStructure) // currentNub should always be a ParallelStructure here - ); - - return res; - } - - // private adjustTypeStruct(fs: FieldSet, loiDebit: LoiDebit): Props { - // return undefined; - // } - - /** - * après une modification, détermine si les propriétés d'un Fieldset sont compatibles entre elles et les ajuste au besoin + * Après une modification, détermine si les propriétés d'un Fieldset sont compatibles + * entre elles et les ajuste au besoin * @param props propriétés à vérifier * @param name nom de la propriété qui vient de changer * @param val nouvelle valeur de la propriété */ - private adjustProperties(fs: FieldSet, name: string, val: any): Props { - // si prop=type d'ouvrage, on prend la 1ère loi de débit compatible avec - // (spécifique aux ouvrages //), en tenant compte des dépendances. - // (par ex, s'il existe un select de lois de débit dépendant du select de types - // d'ouvrage, on prend la 1ère entrée du select de lois de débit compatible) + private adjustProperties(props: Props, name: string, val: any) { if (name === "structureType") { - if (!StructureProperties.isCompatibleValues( - val, fs.properties.getPropValue("loiDebit"), this.currentNub as ParallelStructure) - ) { - return this.adjustLoiDebit(fs, val); + if (! StructureProperties.isCompatibleValues( + val, props.getPropValue("loiDebit"), this.currentNub as ParallelStructure + )) { + // currentNub should always be a ParallelStructure here + const ld = StructureProperties.findCompatibleLoiDebit( + props.getPropValue("structureType"), + [], + this.currentNub as ParallelStructure + ); + props.setPropValue("loiDebit", ld); } } - // si prop=loi débit, on prend un type d'ouvrage compatible - // else if (name === "loiDebit") - // if (!StructureProperties.isCompatibleValues(fs.properties.getPropValue("structureType"), val)) - // return this.adjustTypeStruct(fs, val); - - return fs.properties; } /** @@ -354,7 +250,11 @@ export class FormulaireParallelStructure extends FormulaireBase { } else if (sender instanceof FieldSet && data.action === "propertyChange") { switch (sender.id) { case "fs_ouvrage": - const props = this.adjustProperties(sender, data["name"], data["value"]); + const props = sender.properties; + // ensure loiDebit is set + props.setPropValue("loiDebit", data.value); + this.adjustProperties(props, data["name"], data["value"]); + // replace Structure Nub const newNub = this.replaceNub((sender.nub as Structure), props); sender.setNub(newNub); // treat the fieldset as new to re-subscribe to Nub properties change events diff --git a/src/app/formulaire/definition/concrete/form-regime-uniforme.ts b/src/app/formulaire/definition/concrete/form-regime-uniforme.ts index 68ca39d9903dc8997e74966855d5ef233f594e97..9cfd228f1c4f6e3a3a1d30c42e80c2139f1f39df 100644 --- a/src/app/formulaire/definition/concrete/form-regime-uniforme.ts +++ b/src/app/formulaire/definition/concrete/form-regime-uniforme.ts @@ -1,7 +1,8 @@ -import { IObservable, Observer } from "jalhyd"; +import { IObservable, Observer, Session } from "jalhyd"; import { FormDefSection } from "../form-def-section"; import { FieldSet } from "../../fieldset"; import { FormulaireBase } from "./form-base"; +import { SectionNub } from "jalhyd/build/section/section_nub"; export class FormulaireRegimeUniforme extends FormulaireBase implements Observer { @@ -34,11 +35,13 @@ export class FormulaireRegimeUniforme extends FormulaireBase implements Observer // changement de propriété du FieldSet contenant le select de choix du type de section if (sender instanceof FieldSet && sender.id === "fs_section" && data.action === "propertyChange") { - this.replaceCurrentNub(sender.properties); + // replace underlying section without replacing whole Nub + const newSect = Session.getInstance().createSection(sender.properties.getPropValue("nodeType")); + (this._currentNub as SectionNub).setSection(newSect); + // reflect changes in GUI for (const fs of this.allFieldsets) { - fs.setNub(this._currentNub); - // treat the fieldset as new to re-subscribe to Nub properties change events - this.afterParseFieldset(fs); + // show / hide dependent fields + fs.updateFields(); } this.reset(); } diff --git a/src/app/formulaire/definition/concrete/form-section-parametree.ts b/src/app/formulaire/definition/concrete/form-section-parametree.ts index 48300e727bd897bfac711916bec1885f46825306..0e623cd402c44e46275cbcd5a711e0803b11e412 100644 --- a/src/app/formulaire/definition/concrete/form-section-parametree.ts +++ b/src/app/formulaire/definition/concrete/form-section-parametree.ts @@ -1,4 +1,4 @@ -import { IObservable, Nub } from "jalhyd"; +import { IObservable, Nub, Session, SectionNub } from "jalhyd"; import { FormResultSection } from "../form-result-section"; import { FormDefSection } from "../form-def-section"; @@ -17,10 +17,9 @@ export class FormulaireSectionParametree extends FormulaireBase { // remove obsolete observer set by super() this.removeObserver(this._formCompute); - this._formCompute = new FormComputeSectionParametree(this, this._formSection, (this._formResult as FormResultSection)); - - // default properties - this._props["varCalc"] = "Hs"; + this._formCompute = new FormComputeSectionParametree( + this, this._formSection, (this._formResult as FormResultSection) + ); } protected parseOptions(json: {}) { @@ -50,11 +49,13 @@ export class FormulaireSectionParametree extends FormulaireBase { if (sender instanceof FieldSet && data.action === "propertyChange") { switch (sender.id) { case "fs_section": - this.replaceCurrentNub(sender.properties); + // replace underlying section without replacing whole Nub + const newSect = Session.getInstance().createSection(sender.properties.getPropValue("nodeType")); + (this._currentNub as SectionNub).setSection(newSect); + // reflect changes in GUI for (const fs of this.allFieldsets) { - fs.setNub(this._currentNub); - // treat the fieldset as new to re-subscribe to Nub properties change events - this.afterParseFieldset(fs); + // show / hide dependent fields + fs.updateFields(); } this.reset(); break; diff --git a/src/app/formulaire/definition/form-compute-courbe-remous.ts b/src/app/formulaire/definition/form-compute-courbe-remous.ts index bd96cd99ed4682ed0bb27293054396817f290be6..8c6e8bbb31848f165378b62d521abfe82948379f 100644 --- a/src/app/formulaire/definition/form-compute-courbe-remous.ts +++ b/src/app/formulaire/definition/form-compute-courbe-remous.ts @@ -23,11 +23,10 @@ export class FormComputeCourbeRemous extends FormCompute { protected compute() { const cr: CourbeRemous = this._formBase.currentNub as CourbeRemous; - const prmCR: CourbeRemousParams = cr.prms as CourbeRemousParams; const sect: acSection = cr.Sn; - this.resultYn = sect.Calc("Yn"); // hauteur normale - this.resultYc = sect.Calc("Yc"); // hauteur critique + this.resultYn = sect.CalcSection("Yn"); // hauteur normale + this.resultYc = sect.CalcSection("Yc"); // hauteur critique this.reaffectResultComponents(); } diff --git a/src/app/formulaire/definition/form-def-section.ts b/src/app/formulaire/definition/form-def-section.ts index 9ad2dbf71baf45b31384f8558417fe3a583b559c..309a06613147474af44c2a683d39d325122842e3 100644 --- a/src/app/formulaire/definition/form-def-section.ts +++ b/src/app/formulaire/definition/form-def-section.ts @@ -8,11 +8,6 @@ export class FormDefSection { */ private _sectionSourceId: string; - /** - * id du select configurant la variable à calculer - */ - private _targetSelectId: string; - private _formBase: FormulaireDefinition; constructor(base: FormulaireDefinition) { @@ -36,9 +31,6 @@ export class FormDefSection { public parseOptions(json: {}) { // id de l'élément configurant le type de section this._sectionSourceId = this._formBase.getOption(json, "sectionSourceId"); - - // id du select configurant la variable à calculer - this._targetSelectId = this._formBase.getOption(json, "targetSelectId"); } /** @@ -53,14 +45,5 @@ export class FormDefSection { fs.properties.addObserver(this._formBase); } } - - // si le formulaire contient le select de la variable à calculer - if (this._targetSelectId) { - const sel = fs.getFormulaireNodeById(this._targetSelectId); - if (sel) { - // on abonne le formulaire aux propriétés du FieldSet - fs.properties.addObserver(this._formBase); - } - } } } diff --git a/src/app/formulaire/definition/form-definition.ts b/src/app/formulaire/definition/form-definition.ts index 0c43a6bf980161dcaabb17989f6fc704c888135c..859cad4fb3953c45572c4a808327d0bad025fb20 100644 --- a/src/app/formulaire/definition/form-definition.ts +++ b/src/app/formulaire/definition/form-definition.ts @@ -1,4 +1,4 @@ -import { CalculatorType, ComputeNodeType, Nub, Props, Observer, Session } from "jalhyd"; +import { CalculatorType, ComputeNodeType, Nub, Props, Observer, Session, SectionNub, acSection } from "jalhyd"; import { FormulaireElement } from "../formulaire-element"; import { NgParameter, ParamRadioConfig } from "../ngparam"; @@ -93,8 +93,19 @@ export abstract class FormulaireDefinition extends FormulaireNode implements Obs return this._props; } + /** + * Creates a Nub from the given properties, and associates it to the current form + */ public initNub(props?: Props) { - this.currentNub = this.createNub(props ? props : new Props(this.defaultProperties)); + const p = props ? props : new Props(this.defaultProperties); + const p2 = p.clone(); + this.currentNub = Session.getInstance().createSessionNub(p); + if (this.currentNub instanceof SectionNub) { + // add new Section as first child, from given nodeType + p2.setPropValue("calcType", CalculatorType.Section); + const section = Session.getInstance().createNub(p2); + this.currentNub.setSection(section as acSection); + } } public get currentNub(): Nub { @@ -118,23 +129,6 @@ export abstract class FormulaireDefinition extends FormulaireNode implements Obs this._currentNub.addObserver(this); } - /** - * Asks JaLHyd to create a Nub and keep in in the Session (for Calculator Modules, not for Structures) - * @param p properties for the new Nub - * @param parentNub optional parent Nub when creating a Structure Nub, for admissible laws check - */ - protected createNub(p: Props): Nub { - return Session.getInstance().createSessionNub(p); - } - - protected replaceCurrentNub(params: Props) { - this.currentNub = Session.getInstance().replaceNub(this._currentNub, params); - } - - protected replaceNub(sn: Nub, params: Props): Nub { - return Session.getInstance().replaceNub(sn, params); - } - protected deleteNub(sn: Nub) { Session.getInstance().deleteNub(sn); } diff --git a/src/app/formulaire/fieldset-template.ts b/src/app/formulaire/fieldset-template.ts index 1a47ec12dfe196b3dc4800e112042a9c09a3f286..97b0a9d4679e1284264a48e284d136aa0dbd9ff5 100644 --- a/src/app/formulaire/fieldset-template.ts +++ b/src/app/formulaire/fieldset-template.ts @@ -1,5 +1,5 @@ import { FieldSet } from "./fieldset"; -import { CalculatorType, ComputeNodeType, StructureType, LoiDebit, Nub } from "jalhyd"; +import { CalculatorType, ComputeNodeType, LoiDebit, Nub, StructureType } from "jalhyd"; import { FormulaireDefinition } from "./definition/form-definition"; import { FieldsetContainer } from "./fieldset-container"; diff --git a/src/app/formulaire/fieldset.ts b/src/app/formulaire/fieldset.ts index ff2789eb397c9c9e4cdd7f06657be1d9669e92d7..3781d03556ea07762fa233953c29bffed15ffd86 100644 --- a/src/app/formulaire/fieldset.ts +++ b/src/app/formulaire/fieldset.ts @@ -1,4 +1,4 @@ -import { CalculatorType, ComputeNodeType, ParamDefinition, LoiDebit, StructureType, Props, Observer, Nub, MethodeResolution } from "jalhyd"; +import { CalculatorType, ComputeNodeType, ParamDefinition, LoiDebit, Props, Observer, Nub, MethodeResolution, StructureType } from "jalhyd"; import { FormulaireElement } from "./formulaire-element"; import { Field } from "./field"; @@ -83,7 +83,6 @@ export class FieldSet extends FormulaireElement implements Observer { public get properties(): Props { return this.nub.properties; - // return this._props; } private getPropValue(key: string): any { @@ -180,7 +179,7 @@ export class FieldSet extends FormulaireElement implements Observer { /** * Reflects all properties values in the interface, through the values of the <select> fields */ - private updateFields() { + public updateFields() { this.clearFields(); this.parseFields(); this.parseDependencies(this._jsonConfig); @@ -214,7 +213,6 @@ export class FieldSet extends FormulaireElement implements Observer { break; case "fs_target_data": // courbe de remous - case "fs_computed_var": // section paramétrée this.setSelectValueFromProperty("select_target", "varCalc"); break; @@ -276,7 +274,7 @@ export class FieldSet extends FormulaireElement implements Observer { const node_type: ComputeNodeType = currentNt ? currentNt : (dnt ? ComputeNodeType[dnt] : parentForm.nodeType); this.setPropValue("nodeType", node_type); - this.setPropertyValueFromConfig(json, "defaultStructType", "structureType", StructureType); + this.setPropertyValueFromConfig(json, "defaultStructType", "structureType"); this.setPropertyValueFromConfig(json, "defaultLoiDebit", "loiDebit", LoiDebit); this.setPropertyValueFromConfig(json, "methodeResolution", "methodeResolution", MethodeResolution); this.setPropertyValueFromConfig(json, "varCalc", "varCalc"); diff --git a/src/app/results/remous-results.ts b/src/app/results/remous-results.ts index 23c2eeb133de914ed704bb86f22e94c0fc0b2153..1127bf61fb4b6b2015f46bee279a9dbb3bfccfbe 100644 --- a/src/app/results/remous-results.ts +++ b/src/app/results/remous-results.ts @@ -1,4 +1,4 @@ -import { cLog, Result, ResultElement, ParamValues, CourbeRemousParams, ParamDefinition, ParamDomainValue } from "jalhyd"; +import { cLog, Result, ResultElement, ParamValues, CourbeRemousParams, ParamDefinition, ParamDomainValue, Nub } from "jalhyd"; import { CalculatorResults } from "./calculator-results"; import { VarResults } from "./var-results"; @@ -85,16 +85,16 @@ export class RemousResults extends CalculatorResults { public set parameters(p: CourbeRemousParams) { // pente du fond - this._penteFond = p.map.If.v; + this._penteFond = (p.parent as Nub).getParameter("If").v; // hauteur de berge - this._hautBerge = p.map.YB.v; + this._hautBerge = (p.parent as Nub).getParameter("YB").v; // longueur du bief - const Long = p.map.Long.v; + const Long = (p.parent as Nub).getParameter("Long").v; // pas d'espace - const Dx = p.map.Dx.v; + const Dx = (p.parent as Nub).getParameter("Dx").v; // série de valeurs de X this._xValues = new ParamDefinition(p, "Abscisse", ParamDomainValue.POS_NULL); diff --git a/src/app/services/app-setup/app-setup.service.ts b/src/app/services/app-setup/app-setup.service.ts index d05c7a17400880060cae3e35d460400e54d45675..d70cda6a814002e85a45090daeb3aedc93f4d18c 100644 --- a/src/app/services/app-setup/app-setup.service.ts +++ b/src/app/services/app-setup/app-setup.service.ts @@ -30,6 +30,8 @@ export class ApplicationSetupService extends Observable { /** themes to group calculators, for displaying on the front page */ public themes: any[]; + public warnBeforeTabClose: boolean; + public constructor( private httpService: HttpService, @Inject(LOCAL_STORAGE) private storage: StorageService @@ -38,6 +40,9 @@ export class ApplicationSetupService extends Observable { // precedence: builtin values >> JSON config >> browser's language >> local storage const builtinLanguage = this.language; + // related to @HostListener("window:beforeunload") in AppComponent + this.warnBeforeTabClose = true; + // load JSON config this.readValuesFromConfig().then((data) => { const configLanguage = this.language; diff --git a/src/app/services/formulaire/formulaire.service.ts b/src/app/services/formulaire/formulaire.service.ts index 1f80b90b46ed17270145e8b54df6e20683806601..8490ef82890f7d2655bfcd6b4289e45e05f3afd2 100644 --- a/src/app/services/formulaire/formulaire.service.ts +++ b/src/app/services/formulaire/formulaire.service.ts @@ -445,7 +445,11 @@ export class FormulaireService extends Observable { const newNubs = Session.getInstance().unserialise(s, uids); // for each new Nub, create the related form, set its title newNubs.forEach((nn) => { - this.createFormulaire(nn.nub.calcType, nn.nub, nn.meta.title); + let title; + if (nn.meta && nn.meta.title) { + title = nn.meta.title; + } + this.createFormulaire(nn.nub.calcType, nn.nub, title); }); }).catch(err => { throw err; @@ -475,7 +479,8 @@ export class FormulaireService extends Observable { uid: e.uid, title: e.meta && e.meta.title ? e.meta.title : undefined, requires: [], - children: [] + children: [], + type: e.props.calcType }; // list linked params dependencies for each Nub if (e.parameters) { @@ -486,8 +491,8 @@ export class FormulaireService extends Observable { }); } // list children nubs for each Nub - if (e.structures) { - e.structures.forEach((p) => { + if (e.children) { + e.children.forEach((p) => { nubInfo.children.push(p.uid); }); } @@ -522,11 +527,9 @@ export class FormulaireService extends Observable { lv.meta["formTitle"] = f.calculatorName; } else { // child structures ? - if (f.currentNub instanceof ParallelStructure) { - for (const s of f.currentNub.structures) { - if (s.uid === lv.nub.uid) { - lv.meta["formTitle"] = f.calculatorName; - } + for (const s of f.currentNub.getChildren()) { + if (s.uid === lv.nub.uid) { + lv.meta["formTitle"] = f.calculatorName; } } } diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json index b6ae5181f44d5e9b930103adb2a79792fddb4eab..82ddc5098382fc95b9c911bdefed13a4bb3012a8 100644 --- a/src/locale/messages.en.json +++ b/src/locale/messages.en.json @@ -134,11 +134,14 @@ "INFO_LINKED_VALUE_DEVICE_RESULT": "%s (result of %s, device %s)", "INFO_LINKED_VALUE_EXTRA_RESULT": "%s (%s, extra result)", "INFO_LINKED_VALUE_EXTRA_RESULT_OF": "%s (%s, extra result of %s)", + "INFO_LINKED_VALUE_SECTION": "%s (%s, section)", + "INFO_LINKED_VALUE_SECTION_RESULT": "%s (result of %s, section)", "INFO_MACRORUGO_TITRE": "Rock-ramp fishpasses", "INFO_MACRORUGO_TITRE_COURT": "RR fishpasses", "INFO_MENU_HELP_TITLE": "Help", "INFO_MENU_LOAD_SESSION_TITLE": "Load session", "INFO_MENU_NOUVELLE_CALC": "New calculation module", + "INFO_MENU_REPORT_BUG": "Report an issue", "INFO_MENU_SAVE_SESSION_TITLE": "Save session", "INFO_MENU_SELECT_CALC": "Select calculator module", "INFO_MENU_EMPTY_SESSION_TITLE": "New session", @@ -212,6 +215,8 @@ "INFO_REMOUS_LARGEUR_BERGE": "Width at embankment level = %B% m", "INFO_REMOUS_RESSAUT_DEHORS": "Hydraulic jump detected %sens% abscissa %x% m", "INFO_REMOUS_RESSAUT_HYDRO": "Hydraulic jump detected between abscissa %xmin% and %xmax% m", + "INFO_REPORT_BUG_SUBJECT": "Issue report", + "INFO_REPORT_BUG_BODY": "This is an issue report.\n\nPlease describe quickly the issue you encoutered, and the steps you followed:\n\n\n\n\n--- Current session state - do not modify text below ---\n------------------------------------------------------------------------\n\n", "INFO_REQUIRES": "requires", "INFO_SECTIONPARAMETREE_TITRE": "Parametric section", "INFO_SECTIONPARAMETREE_TITRE_COURT": "Param. section", diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json index ec972c18db8ee1186072298cc1dd8d4975d53130..63b5167de6d3962dd4c327b55236a26015d0fb04 100644 --- a/src/locale/messages.fr.json +++ b/src/locale/messages.fr.json @@ -134,8 +134,11 @@ "INFO_LINKED_VALUE_DEVICE_RESULT": "%s (résultat de %s, ouvrage %s)", "INFO_LINKED_VALUE_EXTRA_RESULT": "%s (%s, résultat complémentaire)", "INFO_LINKED_VALUE_EXTRA_RESULT_OF": "%s (%s, résultat complémentaire de %s)", + "INFO_LINKED_VALUE_SECTION": "%s (%s, section)", + "INFO_LINKED_VALUE_SECTION_RESULT": "%s (résultat de %s, section)", "INFO_MENU_HELP_TITLE": "Aide", "INFO_MENU_LOAD_SESSION_TITLE": "Charger une session", + "INFO_MENU_REPORT_BUG": "Signaler un problème", "INFO_MENU_SAVE_SESSION_TITLE": "Enregistrer la session", "INFO_MENU_SELECT_CALC": "Choisir un module de calcul", "INFO_MENU_EMPTY_SESSION_TITLE": "Nouvelle session", @@ -212,6 +215,8 @@ "INFO_REMOUS_LARGEUR_BERGE": "Largeur au niveau des berges = %B% m", "INFO_REMOUS_RESSAUT_DEHORS": "Ressaut hydraulique détecté à l'%sens% de l'abscisse %x% m", "INFO_REMOUS_RESSAUT_HYDRO": "Ressaut hydraulique détecté entre les abscisses %xmin% et %xmax% m", + "INFO_REPORT_BUG_SUBJECT": "Rapport d'erreur", + "INFO_REPORT_BUG_BODY": "Ceci est un rapport d'erreur.\n\nMerci de décrire rapidement ci-dessous le problème rencontré, et les étapes qui vous y ont mené :\n\n\n\n\n--- État de la session en cours - ne pas modifier le texte ci-dessous ---\n--------------------------------------------------------------------------------------------\n\n", "INFO_REQUIRES": "dépend de", "INFO_SECTIONPARAMETREE_TITRE": "Section paramétrée", "INFO_SECTIONPARAMETREE_TITRE_COURT": "Sec. param.",