From 95c3f4e993067ca3e347f68dbadbe32e1a4fe215 Mon Sep 17 00:00:00 2001 From: Philip Kueng Date: Wed, 12 Aug 2020 14:04:05 +0200 Subject: [PATCH 01/15] added fixture for similar multiple footnotes --- .../data/display-similar-footnotes.json | 67 +++++++++++++++++ routes/fixtures/data.js | 7 +- tasks/updateFixtureData.js | 74 ++++++++++--------- test/e2e-tests.js | 4 +- 4 files changed, 112 insertions(+), 40 deletions(-) create mode 100644 resources/fixtures/data/display-similar-footnotes.json diff --git a/resources/fixtures/data/display-similar-footnotes.json b/resources/fixtures/data/display-similar-footnotes.json new file mode 100644 index 00000000..a11b441c --- /dev/null +++ b/resources/fixtures/data/display-similar-footnotes.json @@ -0,0 +1,67 @@ +{ + "title": "FIXTURE: display similar footnotes", + "data": { + "table": [ + ["Rank", "Name", "Medien", "Forschung"], + ["1", "Hanspeter Musterfrau", "250", "0"], + ["2", "Fridolin Hanspeter", "240", "3"], + ["3", "Ruedi Müller", "200", "4"], + ["4", "Peter Hinterbach", "190", "0"], + ["5", "Ralf Vorderbach", "150", "10"] + ], + "metaData": { + "cells": [ + { + "data": { + "footnote": "Frisch verheiratet, früher Hanspeter Mustermann" + }, + "rowIndex": 1, + "colIndex": 1 + }, + { + "data": { + "footnote": "Frisch verheiratet, früher Hanspeter Mustermann" + }, + "rowIndex": 4, + "colIndex": 1 + }, + { + "data": { + "footnote": "Frisch verheiratet, früher Hanspeter Mustermann" + }, + "rowIndex": 5, + "colIndex": 1 + }, + { + "data": { + "footnote": "Frisch verheiratet, früher Hanspeter Mustermann" + }, + "rowIndex": 1, + "colIndex": 3 + } + ] + } + }, + "sources": [], + "options": { + "hideTableHeader": false, + "cardLayout": false, + "cardLayoutIfSmall": false, + "minibar": { + "invertColors": false, + "barColor": { + "positive": { + "className": "", + "colorCode": "" + }, + "negative": { + "className": "", + "colorCode": "" + } + }, + "selectedColumn": null + } + }, + "tool": "table", + "subtitle": "Einfluss auf Medien und Forschung" +} diff --git a/routes/fixtures/data.js b/routes/fixtures/data.js index 3e54e5d7..53e0cf86 100644 --- a/routes/fixtures/data.js +++ b/routes/fixtures/data.js @@ -19,6 +19,7 @@ const fixtureData = [ require(`${fixtureDataDirectory}/minibars-custom-className.json`), require(`${fixtureDataDirectory}/minibars-custom-colorCode.json`), require(`${fixtureDataDirectory}/display-footnotes.json`), + require(`${fixtureDataDirectory}/display-similar-footnotes.json`), require(`${fixtureDataDirectory}/display-footnotes-before-minibar.json`), require(`${fixtureDataDirectory}/display-alot-of-footnotes.json`), require(`${fixtureDataDirectory}/hide-footnotes-in-header.json`), @@ -32,7 +33,7 @@ const fixtureData = [ require(`${fixtureDataDirectory}/special-characters.json`), require(`${fixtureDataDirectory}/formatted-numbers.json`), require(`${fixtureDataDirectory}/formatted-numbers-mixed.json`), - require(`${fixtureDataDirectory}/formatted-numbers-negative.json`) + require(`${fixtureDataDirectory}/formatted-numbers-negative.json`), ]; module.exports = { @@ -40,9 +41,9 @@ module.exports = { method: "GET", options: { tags: ["api"], - cors: true + cors: true, }, handler: (request, h) => { return fixtureData; - } + }, }; diff --git a/tasks/updateFixtureData.js b/tasks/updateFixtureData.js index 86859813..7c6bb105 100644 --- a/tasks/updateFixtureData.js +++ b/tasks/updateFixtureData.js @@ -5,135 +5,139 @@ var fs = require("fs"); const fixtureData = [ [ `${fixtureDataDirectory}/two-column.json`, - require(`${fixtureDataDirectory}/two-column.json`) + require(`${fixtureDataDirectory}/two-column.json`), ], [ `${fixtureDataDirectory}/four-column.json`, - require(`${fixtureDataDirectory}/four-column.json`) + require(`${fixtureDataDirectory}/four-column.json`), ], [ `${fixtureDataDirectory}/four-column-no-header.json`, - require(`${fixtureDataDirectory}/four-column-no-header.json`) + require(`${fixtureDataDirectory}/four-column-no-header.json`), ], [ `${fixtureDataDirectory}/dates-in-data.json`, - require(`${fixtureDataDirectory}/dates-in-data.json`) + require(`${fixtureDataDirectory}/dates-in-data.json`), ], [ `${fixtureDataDirectory}/mixed-numbers-and-text-in-cell.json`, - require(`${fixtureDataDirectory}/mixed-numbers-and-text-in-cell.json`) + require(`${fixtureDataDirectory}/mixed-numbers-and-text-in-cell.json`), ], [ `${fixtureDataDirectory}/hyphen-sign-as-number.json`, - require(`${fixtureDataDirectory}/hyphen-sign-as-number.json`) + require(`${fixtureDataDirectory}/hyphen-sign-as-number.json`), ], [ `${fixtureDataDirectory}/multiline-text.json`, - require(`${fixtureDataDirectory}/multiline-text.json`) + require(`${fixtureDataDirectory}/multiline-text.json`), ], [ `${fixtureDataDirectory}/show-more-button.json`, - require(`${fixtureDataDirectory}/show-more-button.json`) + require(`${fixtureDataDirectory}/show-more-button.json`), ], [ `${fixtureDataDirectory}/disappearing-columns.json`, - require(`${fixtureDataDirectory}/disappearing-columns.json`) + require(`${fixtureDataDirectory}/disappearing-columns.json`), ], [ `${fixtureDataDirectory}/column-spacing.json`, - require(`${fixtureDataDirectory}/column-spacing.json`) + require(`${fixtureDataDirectory}/column-spacing.json`), ], [ `${fixtureDataDirectory}/minibars-mixed.json`, - require(`${fixtureDataDirectory}/minibars-mixed.json`) + require(`${fixtureDataDirectory}/minibars-mixed.json`), ], [ `${fixtureDataDirectory}/minibars-positive.json`, - require(`${fixtureDataDirectory}/minibars-positive.json`) + require(`${fixtureDataDirectory}/minibars-positive.json`), ], [ `${fixtureDataDirectory}/minibars-negative.json`, - require(`${fixtureDataDirectory}/minibars-negative.json`) + require(`${fixtureDataDirectory}/minibars-negative.json`), ], [ `${fixtureDataDirectory}/minibars-header-with-numbers.json`, - require(`${fixtureDataDirectory}/minibars-header-with-numbers.json`) + require(`${fixtureDataDirectory}/minibars-header-with-numbers.json`), ], [ `${fixtureDataDirectory}/minibars-custom-className.json`, - require(`${fixtureDataDirectory}/minibars-custom-className.json`) + require(`${fixtureDataDirectory}/minibars-custom-className.json`), ], [ `${fixtureDataDirectory}/minibars-custom-colorCode.json`, - require(`${fixtureDataDirectory}/minibars-custom-colorCode.json`) + require(`${fixtureDataDirectory}/minibars-custom-colorCode.json`), ], [ `${fixtureDataDirectory}/display-footnotes.json`, - require(`${fixtureDataDirectory}/display-footnotes.json`) + require(`${fixtureDataDirectory}/display-footnotes.json`), + ], + [ + `${fixtureDataDirectory}/display-similar-footnotes.json`, + require(`${fixtureDataDirectory}/display-similar-footnotes.json`), ], [ `${fixtureDataDirectory}/display-footnotes-before-minibar.json`, - require(`${fixtureDataDirectory}/display-footnotes-before-minibar.json`) + require(`${fixtureDataDirectory}/display-footnotes-before-minibar.json`), ], [ `${fixtureDataDirectory}/display-alot-of-footnotes.json`, - require(`${fixtureDataDirectory}/display-alot-of-footnotes.json`) + require(`${fixtureDataDirectory}/display-alot-of-footnotes.json`), ], [ `${fixtureDataDirectory}/hide-footnotes-in-header.json`, - require(`${fixtureDataDirectory}/hide-footnotes-in-header.json`) + require(`${fixtureDataDirectory}/hide-footnotes-in-header.json`), ], [ `${fixtureDataDirectory}/display-footnotes-in-cardlayout.json`, - require(`${fixtureDataDirectory}/display-footnotes-in-cardlayout.json`) + require(`${fixtureDataDirectory}/display-footnotes-in-cardlayout.json`), ], [ `${fixtureDataDirectory}/footnote-positive-minibars.json`, - require(`${fixtureDataDirectory}/footnote-positive-minibars.json`) + require(`${fixtureDataDirectory}/footnote-positive-minibars.json`), ], [ `${fixtureDataDirectory}/footnote-negative-minibars.json`, - require(`${fixtureDataDirectory}/footnote-negative-minibars.json`) + require(`${fixtureDataDirectory}/footnote-negative-minibars.json`), ], [ `${fixtureDataDirectory}/footnote-mixed-minibars.json`, - require(`${fixtureDataDirectory}/footnote-mixed-minibars.json`) + require(`${fixtureDataDirectory}/footnote-mixed-minibars.json`), ], [ `${fixtureDataDirectory}/cardlayout.json`, - require(`${fixtureDataDirectory}/cardlayout.json`) + require(`${fixtureDataDirectory}/cardlayout.json`), ], [ `${fixtureDataDirectory}/cardlayout-mobile.json`, - require(`${fixtureDataDirectory}/cardlayout-mobile.json`) + require(`${fixtureDataDirectory}/cardlayout-mobile.json`), ], [ `${fixtureDataDirectory}/lots-of-data.json`, - require(`${fixtureDataDirectory}/lots-of-data.json`) + require(`${fixtureDataDirectory}/lots-of-data.json`), ], [ `${fixtureDataDirectory}/formatted-number.json`, - require(`${fixtureDataDirectory}/formatted-number.json`) + require(`${fixtureDataDirectory}/formatted-number.json`), ], [ `${fixtureDataDirectory}/formatted-number-mixed.json`, - require(`${fixtureDataDirectory}/formatted-number-mixed.json`) + require(`${fixtureDataDirectory}/formatted-number-mixed.json`), ], [ `${fixtureDataDirectory}/formatted-number-negative.json`, - require(`${fixtureDataDirectory}/formatted-number-negative.json`) - ] + require(`${fixtureDataDirectory}/formatted-number-negative.json`), + ], ]; // register migration scripts here in order of version, // i.e. list the smallest version first const migrationScripts = [ require("../migration-scripts/to-v2.0.0.js"), - require("../migration-scripts/to-v3.0.0.js") + require("../migration-scripts/to-v3.0.0.js"), ]; -fixtureData.forEach(item => { - migrationScripts.forEach(script => { +fixtureData.forEach((item) => { + migrationScripts.forEach((script) => { if ( item[1].data !== undefined && (item[1].data !== null) & (item[1].options !== undefined) && @@ -143,7 +147,7 @@ fixtureData.forEach(item => { fs.writeFile( item[0].split("../")[1], JSON.stringify(item[1], null, 2), - function(err) { + function (err) { if (err) { return console.log(err); } diff --git a/test/e2e-tests.js b/test/e2e-tests.js index d8d138b3..1e11cee7 100644 --- a/test/e2e-tests.js +++ b/test/e2e-tests.js @@ -166,9 +166,9 @@ lab.experiment("dynamic schema endpoint", () => { }); lab.experiment("fixture data endpoint", () => { - it("returns 31 fixture data items for /fixtures/data", async () => { + it("returns 32 fixture data items for /fixtures/data", async () => { const response = await server.inject("/fixtures/data"); expect(response.statusCode).to.be.equal(200); - expect(response.result.length).to.be.equal(31); + expect(response.result.length).to.be.equal(32); }); }); From fc21c8eea5309431d78eb3ec8cd96329f0e1cd98 Mon Sep 17 00:00:00 2001 From: Philip Kueng Date: Thu, 13 Aug 2020 08:24:32 +0200 Subject: [PATCH 02/15] added function to accumulate footnotes --- helpers/footnotes.js | 50 +++++++++++++++++++++++++++++++++----------- views/table.html | 2 +- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/helpers/footnotes.js b/helpers/footnotes.js index a73ab519..93040b83 100644 --- a/helpers/footnotes.js +++ b/helpers/footnotes.js @@ -8,11 +8,11 @@ function appendFootnoteAnnotationsToTableData(tableData, footnotes, options) { 6: "\u2076", 7: "\u2077", 8: "\u2078", - 9: "\u2079" + 9: "\u2079", }; let spacings = []; - footnotes.forEach((footnote, index) => { + footnotes.forEach((footnote) => { let footnoteClass = getClass( options, footnote, @@ -23,14 +23,14 @@ function appendFootnoteAnnotationsToTableData(tableData, footnotes, options) { if (footnoteClass) { spacings.push({ colIndex: footnote.colIndex, - class: footnoteClass + class: footnoteClass, }); } // create a new property to safe the index of the footnote tableData[footnote.rowIndex][footnote.colIndex].footnote = { - value: index + 1, - unicode: unicodes[index + 1], - class: footnoteClass + value: footnote.index, + unicode: unicodes[footnote.index], + class: footnoteClass, }; }); @@ -38,7 +38,7 @@ function appendFootnoteAnnotationsToTableData(tableData, footnotes, options) { tableData.forEach((row, index) => { // assign class when not cardlayout but cardlayoutifsmall if (!options.cardLayout || options.cardLayoutIfSmall) { - spacings.forEach(spacing => { + spacings.forEach((spacing) => { row[spacing.colIndex].classes.push(spacing.class); }); } @@ -46,7 +46,7 @@ function appendFootnoteAnnotationsToTableData(tableData, footnotes, options) { // assign class when cardlayout or cardlayoutifsmall is active if (options.cardLayout || options.cardLayoutIfSmall) { if (!options.hideTableHeader && index !== 0) { - row.forEach(cell => { + row.forEach((cell) => { footnotes.length >= 10 ? cell.classes.push("q-table-col-footnotes-cardlayout-double") : cell.classes.push("q-table-col-footnotes-cardlayout-single"); @@ -77,8 +77,8 @@ function getClass(options, footnote, amountOfFootnotes, type, lastColIndex) { } function getFilteredMetaDataFootnotes(metaData, hideTableHeader) { - return metaData.cells - .filter(cell => { + let filteredFootnotes = metaData.cells + .filter((cell) => { if (!cell.data.footnote || (hideTableHeader && cell.rowIndex === 0)) { return false; } @@ -91,9 +91,35 @@ function getFilteredMetaDataFootnotes(metaData, hideTableHeader) { } return a.colIndex - b.colIndex; }); + + if (filteredFootnotes.length > 0) { + let uniqueFootnotes = getUniqueFootnotes(filteredFootnotes); + + filteredFootnotes.forEach((footnote) => { + let unique = uniqueFootnotes.find( + (uniqueFootnote) => + uniqueFootnote.data.footnote === footnote.data.footnote + ); + if (unique) { + footnote.index = unique.index; + } + }); + } + + return filteredFootnotes; +} + +function getUniqueFootnotes(footnotes) { + let uniquteFootnotes = footnotes.filter( + (v, i, a) => a.findIndex((t) => t.data.footnote === v.data.footnote) === i + ); + uniquteFootnotes.forEach((footnote, index) => { + footnote.index = index + 1; + }); + return uniquteFootnotes; } module.exports = { - appendFootnoteAnnotationsToTableData: appendFootnoteAnnotationsToTableData, - getFilteredMetaDataFootnotes: getFilteredMetaDataFootnotes + appendFootnoteAnnotationsToTableData, + getFilteredMetaDataFootnotes, }; diff --git a/views/table.html b/views/table.html index cfc02fc2..595b6665 100644 --- a/views/table.html +++ b/views/table.html @@ -50,7 +50,7 @@

{{ item.title }}

{% endif %} {%- if item.subtitl {%- if loop.index >= 10 -%} style="width: 9px!important" {%- endif -%}> - {{loop.index}} {{footnote.data.footnote}} + {{footnote.index}} {{footnote.data.footnote}} {%- endfor -%} {%- endif -%} From 8067d7a7d21a95142568c2fac3a716aab35c3ae9 Mon Sep 17 00:00:00 2001 From: Philip Kueng Date: Thu, 13 Aug 2020 08:27:10 +0200 Subject: [PATCH 03/15] changed doc --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 91a7955b..c87c275a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Q Table [![Build Status](https://travis-ci.com/nzzdev/Q-table.svg?token=g43MZxbtUcZ6QyxqUoJM&branch=dev)](https://travis-ci.com/nzzdev/Q-table) +# Q Table [![Build Status](https://travis-ci.com/nzzdev/Q-table.svg?token=g43MZxbtUcZ6QyxqUoJM&branch=dev)](https://travis-ci.com/nzzdev/Q-table) **Maintainer**: [philipkueng](https://github.com/philipkueng) @@ -134,7 +134,8 @@ Footnotes are a feature to display annotations in the table and the sources in t ###### Implementation details serverside -- The function `getFilteredMetaDataFootnotes()` will filter and sort all footnotes from `item.data.metaData`. The function will always return an object, when not used the object will be empty +- The function `getFilteredMetaDataFootnotes()` will filter and sort all footnotes from `item.data.metaData`. The function will always return an object, when not used the object will be empty. +- Withing `getFilteredMetaDataFootnotes()`, the function `getUniqueFootnotes()` will return an array without mutiple similar footnotes. The indexes of multiple similar footnotes then will be replaced. - Those footnotes will then be passed to the function `getTableData()` - Once the `tableData` is adjusted in `getTableData()`, there's a check if footnotes are set - If there are footnotes, they will be passed to the function `appendFootnoteAnnotationsToTableData()` along with `tableData` and `options` @@ -153,9 +154,9 @@ Footnotes are a feature to display annotations in the table and the sources in t footnote: { value: 1, unicode: "¹", - class: null - } - } + class: null, + }, + }, ], [ { @@ -165,10 +166,10 @@ Footnotes are a feature to display annotations in the table and the sources in t footnote: { value: 2, unicode: "²", - class: null - } - } - ] + class: null, + }, + }, + ], ]; ``` From e6d54657cd0b03fdb2ad76e3c7b70f2aa9e78b00 Mon Sep 17 00:00:00 2001 From: Philip Kueng Date: Thu, 13 Aug 2020 08:33:27 +0200 Subject: [PATCH 04/15] added test for multiple similar footnotes --- test/dom-tests.js | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/test/dom-tests.js b/test/dom-tests.js index 35c7798f..e5a33e09 100644 --- a/test/dom-tests.js +++ b/test/dom-tests.js @@ -429,6 +429,50 @@ lab.experiment("footnotes", () => { ]); }); + it("shows multiple similar footnotes in footer of table with right index", async () => { + const response = await server.inject({ + url: "/rendering-info/web?_id=someid", + method: "POST", + payload: { + item: require("../resources/fixtures/data/display-similar-footnotes.json"), + toolRuntimeConfig: {}, + }, + }); + + const dom = new JSDOM(response.result.markup); + const footnotes = dom.window.document.querySelectorAll( + "div.q-table-footer-footnote" + ); + + let arrayOfFootnotes = []; + + footnotes.forEach((footnote) => { + arrayOfFootnotes.push({ + index: footnote.childNodes[1].innerHTML.replace("\n ", ""), + text: footnote.childNodes[2].innerHTML.replace("\n ", ""), + }); + }); + + expect(arrayOfFootnotes).to.be.equal([ + { + index: "1", + text: " Frisch verheiratet, früher Hanspeter Mustermann", + }, + { + index: "1", + text: " Frisch verheiratet, früher Hanspeter Mustermann", + }, + { + index: "1", + text: " Frisch verheiratet, früher Hanspeter Mustermann", + }, + { + index: "1", + text: " Frisch verheiratet, früher Hanspeter Mustermann", + }, + ]); + }); + it("shows annotation of footnotes in header of cardlayout", async () => { const response = await server.inject({ url: "/rendering-info/web?_id=someid", From 9a1a35e324fdfe8fc0d1b268a6506044a3fdebee Mon Sep 17 00:00:00 2001 From: Philip Kueng Date: Thu, 13 Aug 2020 11:34:55 +0200 Subject: [PATCH 05/15] format css file --- styles_src/q-table.scss | 64 +++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/styles_src/q-table.scss b/styles_src/q-table.scss index 16e3ef5c..df90d910 100644 --- a/styles_src/q-table.scss +++ b/styles_src/q-table.scss @@ -47,7 +47,9 @@ td.q-table__cell--numeric { } } // when the text-column follows a numeric-column, the text-column should have a padding for spacing reasons -.q-table:not(.q-table--card-layout) .q-table__cell--numeric:not(#q-table-minibar-header) + .q-table__cell:not(.q-table__cell--numeric){ +.q-table:not(.q-table--card-layout) + .q-table__cell--numeric:not(#q-table-minibar-header) + + .q-table__cell:not(.q-table__cell--numeric) { padding-left: 20px; } @@ -114,47 +116,53 @@ td.q-table__cell--numeric { border-bottom: 0; } - .q-table-minibar-cell, .q-table-minibar-bar--negative, .q-table-minibar-bar--positive { - display:none!important; + .q-table-minibar-cell, + .q-table-minibar-bar--negative, + .q-table-minibar-bar--positive { + display: none !important; } - + .q-table-minibar-cell--value { background-color: white; - display: block!important; - } - + display: block !important; + } + .q-table-minibar--mixed { background-color: white; - width: 100%!important; + width: 100% !important; } - + .q-table-minibar-alignment--positive { float: none; - width: 100%!important; + width: 100% !important; } - + .q-table-minibar-alignment--empty { - text-align: right!important; + text-align: right !important; } - + .q-table-minibar-alignment--negative { - text-align: right!important; + text-align: right !important; float: none; left: 0; } - + .q-table-col-footnotes-cardlayout-single { - margin-right: 7px!important; + margin-right: 7px !important; - .q-table-minibar-alignment--negative, .q-table-minibar-alignment--empty, .q-table-minibar-alignment--positive { + .q-table-minibar-alignment--negative, + .q-table-minibar-alignment--empty, + .q-table-minibar-alignment--positive { padding-right: 7px; } - } - + } + .q-table-col-footnotes-cardlayout-double { - margin-right: 14px!important; + margin-right: 14px !important; - .q-table-minibar-alignment--negative, .q-table-minibar-alignment--empty, .q-table-minibar-alignment--positive { + .q-table-minibar-alignment--negative, + .q-table-minibar-alignment--empty, + .q-table-minibar-alignment--positive { padding-right: 14px; } } @@ -185,7 +193,7 @@ tr.q-table-state-visible { } .q-table-minibar--mixed { - background-color:rgba(200, 200, 200, 0.15); + background-color: rgba(200, 200, 200, 0.15); min-width: 180px; padding-right: 12px !important; padding-left: 12px !important; @@ -196,7 +204,7 @@ tr.q-table-state-visible { } .q-table-minibar-cell { - background-color:rgba(200, 200, 200, 0.15); + background-color: rgba(200, 200, 200, 0.15); min-width: 140px; } @@ -205,7 +213,7 @@ tr.q-table-state-visible { } .q-table-minibar-cell--value { - background-color:rgba(200, 200, 200, 0.15); + background-color: rgba(200, 200, 200, 0.15); } .q-table-minibar-bar--positive { @@ -231,7 +239,7 @@ tr.q-table-state-visible { height: 17px; } -.q-table-minibar-bar--negative::before{ +.q-table-minibar-bar--negative::before { content: ""; border-right: 0.5px solid #393855; position: absolute; @@ -265,7 +273,7 @@ tr.q-table-state-visible { position: relative; } -.q-table-annotation:after { +.q-table-annotation::after { content: attr(data-annotation); position: absolute; color: #6e6e7e; @@ -283,11 +291,11 @@ tr.q-table-state-visible { .q-table-col-footnotes { &-single { - padding-right: 8px!important; + padding-right: 8px !important; } &-double { - padding-right: 16px!important; + padding-right: 16px !important; } } From 33207d2d2d2c67dabb0879f0d763bce08103534e Mon Sep 17 00:00:00 2001 From: Philip Kueng Date: Thu, 13 Aug 2020 12:33:06 +0200 Subject: [PATCH 06/15] footer with one entry per footnote --- helpers/footnotes.js | 15 +---------- routes/rendering-info/web.js | 48 +++++++++++++++++++++++------------- test/dom-tests.js | 12 --------- 3 files changed, 32 insertions(+), 43 deletions(-) diff --git a/helpers/footnotes.js b/helpers/footnotes.js index 93040b83..f7c78c0e 100644 --- a/helpers/footnotes.js +++ b/helpers/footnotes.js @@ -92,20 +92,6 @@ function getFilteredMetaDataFootnotes(metaData, hideTableHeader) { return a.colIndex - b.colIndex; }); - if (filteredFootnotes.length > 0) { - let uniqueFootnotes = getUniqueFootnotes(filteredFootnotes); - - filteredFootnotes.forEach((footnote) => { - let unique = uniqueFootnotes.find( - (uniqueFootnote) => - uniqueFootnote.data.footnote === footnote.data.footnote - ); - if (unique) { - footnote.index = unique.index; - } - }); - } - return filteredFootnotes; } @@ -122,4 +108,5 @@ function getUniqueFootnotes(footnotes) { module.exports = { appendFootnoteAnnotationsToTableData, getFilteredMetaDataFootnotes, + getUniqueFootnotes, }; diff --git a/routes/rendering-info/web.js b/routes/rendering-info/web.js index 0832127c..c9d07294 100644 --- a/routes/rendering-info/web.js +++ b/routes/rendering-info/web.js @@ -27,7 +27,7 @@ const renderingInfoScripts = require("../../helpers/renderingInfoScript.js"); // hence we fetch the JSON schema... const schemaString = JSON.parse( fs.readFileSync(resourcesDir + "schema.json", { - encoding: "utf-8" + encoding: "utf-8", }) ); const Ajv = require("ajv"); @@ -61,20 +61,20 @@ module.exports = { options: { validate: { options: { - allowUnknown: true + allowUnknown: true, }, - payload: validatePayload - } + payload: validatePayload, + }, }, - handler: async function(request, h) { + handler: async function (request, h) { const renderingInfo = { - polyfills: ["Promise"] + polyfills: ["Promise"], }; renderingInfo.stylesheets = [ { - name: styleHashMap["q-table"] - } + name: styleHashMap["q-table"], + }, ]; const item = request.payload.item; @@ -83,11 +83,25 @@ module.exports = { item.data.metaData, item.options.hideTableHeader ); - + let uniqueFootnotes = []; + + if (footnotes.length > 0) { + uniqueFootnotes = footnoteHelpers.getUniqueFootnotes(footnotes); + + footnotes.forEach((footnote) => { + let unique = uniqueFootnotes.find( + (uniqueFootnote) => + uniqueFootnote.data.footnote === footnote.data.footnote + ); + if (unique) { + footnote.index = unique.index; + } + }); + } const minibarsAvailable = await request.server.inject({ url: "/option-availability/selectedColumn", method: "POST", - payload: { item: item } + payload: { item: item }, }); const context = { @@ -100,13 +114,13 @@ module.exports = { minibar: minibarsAvailable.result.available ? minibarHelpers.getMinibarContext(item.options, itemDataCopy) : {}, - footnotes: footnotes, + footnotes: uniqueFootnotes, numberOfRows: item.data.table.length - 1, // do not count the header displayOptions: request.payload.toolRuntimeConfig.displayOptions || {}, id: `q_table_${request.query._id}_${Math.floor( Math.random() * 100000 )}`.replace(/-/g, ""), - width: getExactPixelWidth(request.payload.toolRuntimeConfig) + width: getExactPixelWidth(request.payload.toolRuntimeConfig), }; // if we have a width and cardLayoutIfSmall is true, we will initWithCardLayout @@ -181,7 +195,7 @@ module.exports = { Object.keys(context.minibar).length !== 0 ) { renderingInfo.scripts.push({ - content: renderingInfoScripts.getDefaultScript(context) + content: renderingInfoScripts.getDefaultScript(context), }); } @@ -192,19 +206,19 @@ module.exports = { item.options.cardLayoutIfSmall === true ) { renderingInfo.scripts.push({ - content: renderingInfoScripts.getCardLayoutScript(context) + content: renderingInfoScripts.getCardLayoutScript(context), }); } if (possibleToHaveToHideRows) { renderingInfo.scripts.push({ - content: renderingInfoScripts.getShowMoreButtonScript(context) + content: renderingInfoScripts.getShowMoreButtonScript(context), }); } if (Object.keys(context.minibar).length !== 0) { renderingInfo.scripts.push({ - content: renderingInfoScripts.getMinibarsScript(context) + content: renderingInfoScripts.getMinibarsScript(context), }); } @@ -214,5 +228,5 @@ module.exports = { } return renderingInfo; - } + }, }; diff --git a/test/dom-tests.js b/test/dom-tests.js index e5a33e09..5af0f1c6 100644 --- a/test/dom-tests.js +++ b/test/dom-tests.js @@ -458,18 +458,6 @@ lab.experiment("footnotes", () => { index: "1", text: " Frisch verheiratet, früher Hanspeter Mustermann", }, - { - index: "1", - text: " Frisch verheiratet, früher Hanspeter Mustermann", - }, - { - index: "1", - text: " Frisch verheiratet, früher Hanspeter Mustermann", - }, - { - index: "1", - text: " Frisch verheiratet, früher Hanspeter Mustermann", - }, ]); }); From 83e33acd35f00923075d39eae712a5ed9db56064 Mon Sep 17 00:00:00 2001 From: Philip Kueng Date: Thu, 13 Aug 2020 13:08:31 +0200 Subject: [PATCH 07/15] fix firefox after-element footnote bug --- package-lock.json | 711 +++++++++++++--------------------------- package.json | 20 +- styles_src/q-table.scss | 2 + 3 files changed, 248 insertions(+), 485 deletions(-) diff --git a/package-lock.json b/package-lock.json index d800235e..fe408ce4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,23 +5,22 @@ "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.3.tgz", - "integrity": "sha512-fDx9eNW0qz0WkUeqL6tXEXzVlPh6Y5aCDEZesl0xBGA8ndRukX91Uk44ZqnkECp01NAZUdCAl+aiQNGi0k88Eg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { - "@babel/highlight": "^7.10.3" + "@babel/highlight": "^7.10.4" } }, "@babel/generator": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.3.tgz", - "integrity": "sha512-drt8MUHbEqRzNR0xnF8nMehbY11b1SDkRw03PSNH/3Rb2Z35oxkddVSi3rcaak0YJQ86PCuE7Qx1jSFhbLNBMA==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.0.tgz", + "integrity": "sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ==", "dev": true, "requires": { - "@babel/types": "^7.10.3", + "@babel/types": "^7.11.0", "jsesc": "^2.5.1", - "lodash": "^4.17.13", "source-map": "^0.5.0" }, "dependencies": { @@ -34,93 +33,93 @@ } }, "@babel/helper-function-name": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.3.tgz", - "integrity": "sha512-FvSj2aiOd8zbeqijjgqdMDSyxsGHaMt5Tr0XjQsGKHD3/1FP3wksjnLAWzxw7lvXiej8W1Jt47SKTZ6upQNiRw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.3", - "@babel/template": "^7.10.3", - "@babel/types": "^7.10.3" + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.3.tgz", - "integrity": "sha512-iUD/gFsR+M6uiy69JA6fzM5seno8oE85IYZdbVVEuQaZlEzMO2MXblh+KSPJgsZAUx0EEbWXU0yJaW7C9CdAVg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { - "@babel/types": "^7.10.3" + "@babel/types": "^7.10.4" } }, "@babel/helper-split-export-declaration": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", - "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.11.0" } }, "@babel/helper-validator-identifier": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.3.tgz", - "integrity": "sha512-bU8JvtlYpJSBPuj1VUmKpFGaDZuLxASky3LhaKj3bmpSTY6VWooSM8msk+Z0CZoErFye2tlABF6yDkT3FOPAXw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", "dev": true }, "@babel/highlight": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.3.tgz", - "integrity": "sha512-Ih9B/u7AtgEnySE2L2F0Xm0GaM729XqqLfHkalTsbjXGyqmf/6M0Cu0WpvqueUlW+xk88BHw9Nkpj49naU+vWw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.3", + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.3.tgz", - "integrity": "sha512-oJtNJCMFdIMwXGmx+KxuaD7i3b8uS7TTFYW/FNG2BT8m+fmGHoiPYoH0Pe3gya07WuFmM5FCDIr1x0irkD/hyA==", + "version": "7.11.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.3.tgz", + "integrity": "sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA==", "dev": true }, "@babel/template": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.3.tgz", - "integrity": "sha512-5BjI4gdtD+9fHZUsaxPHPNpwa+xRkDO7c7JbhYn2afvrkDu5SfAAbi9AIMXw2xEhO/BR35TqiW97IqNvCo/GqA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.3", - "@babel/parser": "^7.10.3", - "@babel/types": "^7.10.3" + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/traverse": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.3.tgz", - "integrity": "sha512-qO6623eBFhuPm0TmmrUFMT1FulCmsSeJuVGhiLodk2raUDFhhTECLd9E9jC4LBIWziqt4wgF6KuXE4d+Jz9yug==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.0.tgz", + "integrity": "sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.3", - "@babel/generator": "^7.10.3", - "@babel/helper-function-name": "^7.10.3", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/parser": "^7.10.3", - "@babel/types": "^7.10.3", + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.11.0", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.11.0", + "@babel/types": "^7.11.0", "debug": "^4.1.0", "globals": "^11.1.0", - "lodash": "^4.17.13" + "lodash": "^4.17.19" } }, "@babel/types": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.3.tgz", - "integrity": "sha512-nZxaJhBXBQ8HVoIcGsf9qWep3Oh3jCENK54V4mRF7qaJabVsAYdbTtmSD8WmAp1R6ytPiu5apMwSXyxB1WlaBA==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz", + "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.3", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, @@ -131,13 +130,6 @@ "requires": { "@hapi/boom": "9.x.x", "@hapi/hoek": "9.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } } }, "@hapi/address": { @@ -161,13 +153,6 @@ "integrity": "sha512-FbCNwcTbnQP4VYYhLNGZmA76xb2aHg9AMPiy18NZyWMG310P5KdFGyA9v2rm5ujrIny77dEEIkMOwl0Xv+fSSA==", "requires": { "@hapi/hoek": "9.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } } }, "@hapi/b64": { @@ -176,13 +161,6 @@ "integrity": "sha512-ngu0tSEmrezoiIaNGG6rRvKOUkUuDdf4XTPnONHGYfSGRmDqPZX5oJL6HAdKTo1UQHECbdB4OzhWrfgVppjHUw==", "requires": { "@hapi/hoek": "9.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } } }, "@hapi/boom": { @@ -201,14 +179,14 @@ } }, "@hapi/bossy": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@hapi/bossy/-/bossy-5.0.0.tgz", - "integrity": "sha512-/P89CNhRos1/rcytf19erNvnGsGDWuC7UxBRfoKIqkKHthnG9qRIRZCc5gmc7i/yp5ettKWqiYSf65HKDPz2bg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@hapi/bossy/-/bossy-5.0.1.tgz", + "integrity": "sha512-/HP5KSQ7EGLcnIdmwYj47mKh6f1htos2Dd8QlQjy59k61lENzKgvFbaPa+REQQGGgVQK7QREO55w/Wjkw2dzrQ==", "dev": true, "requires": { "@hapi/boom": "9.x.x", "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x" + "@hapi/validate": "1.x.x" } }, "@hapi/bounce": { @@ -218,13 +196,6 @@ "requires": { "@hapi/boom": "9.x.x", "@hapi/hoek": "9.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } } }, "@hapi/bourne": { @@ -233,38 +204,23 @@ "integrity": "sha512-WEezM1FWztfbzqIUbsDzFRVMxSoLy3HugVcux6KDDtTqzPsLE8NDRHfXvev66aH1i2oOKKar3/XDjbvh/OUBdg==" }, "@hapi/call": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@hapi/call/-/call-8.0.0.tgz", - "integrity": "sha512-4xHIWWqaIDQlVU88XAnomACSoC7iWUfaLfdu2T7I0y+HFFwZUrKKGfwn6ik4kwKsJRMnOliG3UXsF8V/94+Lkg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@hapi/call/-/call-8.0.1.tgz", + "integrity": "sha512-bOff6GTdOnoe5b8oXRV3lwkQSb/LAWylvDMae6RgEWWntd0SHtkYbQukDHKlfaYtVnSAgIavJ0kqszF/AIBb6g==", "requires": { - "@hapi/address": "4.x.x", "@hapi/boom": "9.x.x", "@hapi/hoek": "9.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } } }, "@hapi/catbox": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-11.1.0.tgz", - "integrity": "sha512-FDEjfn26RZRyOEPeZdaAL7dRiAK5FOGuwTnTw0gxK30csAlKeOHsEnoIxnLIXx7QOS17eUaOk6+MiweWQM6Keg==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-11.1.1.tgz", + "integrity": "sha512-u/8HvB7dD/6X8hsZIpskSDo4yMKpHxFd7NluoylhGrL6cUfYxdQPnvUp9YU2C6F9hsyBVLGulBd9vBN1ebfXOQ==", "requires": { "@hapi/boom": "9.x.x", "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x", - "@hapi/podium": "4.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } + "@hapi/podium": "4.x.x", + "@hapi/validate": "1.x.x" } }, "@hapi/catbox-memory": { @@ -274,19 +230,12 @@ "requires": { "@hapi/boom": "9.x.x", "@hapi/hoek": "9.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } } }, "@hapi/code": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@hapi/code/-/code-8.0.1.tgz", - "integrity": "sha512-umAOdgEjv1o2PbOQRpiy+XWb2RnHGMejhUUVR41vIkzVtBXQnql0wTU2UNq2/vI6KJx1ReR/P999QGFiSLk5hQ==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@hapi/code/-/code-8.0.2.tgz", + "integrity": "sha512-JG3yfRMU/acl48i14YAwucyf12wtIyyfEJ4PyL/qZxDd3ltjqCVIlZmOSCazxFjtDZTfMx6TLVcDU5XWvP8tNQ==", "dev": true, "requires": { "@hapi/hoek": "9.x.x" @@ -338,16 +287,16 @@ "integrity": "sha512-V87P8fv7PI0LH7LiVi8Lkf3x+KCO7pQozXRssAHNXXL9L1K+uyu4XypLXwxqVDKgyQai6qj3/KteNlrqDx4W5A==" }, "@hapi/hapi": { - "version": "19.1.1", - "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-19.1.1.tgz", - "integrity": "sha512-rpQzSs0XsHSF7usM4qdJJ0Bcmhs9stWhUW3OiamW33bw4qL8q3uEgUKB9KH8ODmluCAkkXOQ0X0Dh9t94E5VIw==", + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-19.2.0.tgz", + "integrity": "sha512-Isf/BUPQMRMYK+xx4y2B05lrrGw6PSbJKytk1SlaXeV7tXm6m+6tFRBog6c/na0QNgojafb0bjMB+vBg64CwUA==", "requires": { "@hapi/accept": "^5.0.1", "@hapi/ammo": "^5.0.1", "@hapi/boom": "9.x.x", "@hapi/bounce": "2.x.x", "@hapi/call": "8.x.x", - "@hapi/catbox": "11.x.x", + "@hapi/catbox": "^11.1.0", "@hapi/catbox-memory": "5.x.x", "@hapi/heavy": "7.x.x", "@hapi/hoek": "9.x.x", @@ -360,56 +309,34 @@ "@hapi/subtext": "^7.0.3", "@hapi/teamwork": "4.x.x", "@hapi/topo": "5.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } } }, "@hapi/heavy": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-7.0.0.tgz", - "integrity": "sha512-n/nheUG6zNleWkjY+3fzV3VJIAumUCaa/WoTmurjqlYY5JgC5ZKOpvP7tWi8rXmKZhbcXgjH3fHFoM55LoBT7g==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-7.0.1.tgz", + "integrity": "sha512-vJ/vzRQ13MtRzz6Qd4zRHWS3FaUc/5uivV2TIuExGTM9Qk+7Zzqj0e2G7EpE6KztO9SalTbiIkTh7qFKj/33cA==", "requires": { "@hapi/boom": "9.x.x", "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } + "@hapi/validate": "1.x.x" } }, "@hapi/hoek": { "version": "9.0.4", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==", - "dev": true + "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" }, "@hapi/inert": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@hapi/inert/-/inert-6.0.1.tgz", - "integrity": "sha512-oLxAmtWni3nH4INU2gcXFnHBw0GhHYF3HR71hAWrPc91dq+iFYGfawfaMbonwGr5DkzFiGe8Ir5sZAt2AqeINA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@hapi/inert/-/inert-6.0.2.tgz", + "integrity": "sha512-cq0a8jstkLW1+oJaw4jp52PZBEkVbX9d0YDy5aOs3rOKYSjpzs2nQBahnCHEMchOrOSUffLpE+IDoivYHcx8uA==", "requires": { "@hapi/ammo": "5.x.x", "@hapi/boom": "9.x.x", "@hapi/bounce": "2.x.x", "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x", + "@hapi/validate": "1.x.x", "lru-cache": "5.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } } }, "@hapi/iron": { @@ -422,13 +349,6 @@ "@hapi/bourne": "2.x.x", "@hapi/cryptiles": "5.x.x", "@hapi/hoek": "9.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } } }, "@hapi/joi": { @@ -451,9 +371,9 @@ } }, "@hapi/lab": { - "version": "22.0.4", - "resolved": "https://registry.npmjs.org/@hapi/lab/-/lab-22.0.4.tgz", - "integrity": "sha512-gh7mO6ElxIucsYjIIRHJXT9bFzz7iJPg93IsBbj/1k3xVSs1Pf/D2Hkmn839VvW5f65h/tVWobF1xIjimYLqlg==", + "version": "22.0.5", + "resolved": "https://registry.npmjs.org/@hapi/lab/-/lab-22.0.5.tgz", + "integrity": "sha512-Pzwud8x2cVMw0Xu9MSvQVcAKI01VkAy9n4HYxMS1Lqcb7Gd7h8vZZ+xr7KRTwyq7XMy8PHggti/vO6T8ZaMjCw==", "dev": true, "requires": { "@hapi/bossy": "5.x.x", @@ -504,48 +424,27 @@ "requires": { "@hapi/hoek": "9.x.x", "mime-db": "1.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } } }, "@hapi/nigel": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@hapi/nigel/-/nigel-4.0.0.tgz", - "integrity": "sha512-Bqs1pjcDnDQo/XGoiCCNHWTFcMzPbz3L4KU04njeFQMzzEmsojMRX7TX+PezQYCMKtHJOtMg0bHxZyMGqYtbSA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@hapi/nigel/-/nigel-4.0.2.tgz", + "integrity": "sha512-ht2KoEsDW22BxQOEkLEJaqfpoKPXxi7tvabXy7B/77eFtOyG5ZEstfZwxHQcqAiZhp58Ae5vkhEqI03kawkYNw==", "requires": { - "@hapi/hoek": "9.x.x", - "@hapi/vise": "4.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } + "@hapi/hoek": "^9.0.4", + "@hapi/vise": "^4.0.0" } }, "@hapi/pez": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@hapi/pez/-/pez-5.0.2.tgz", - "integrity": "sha512-jr1lAm8mE7J2IBxvDIuDI1qy2aAsoaD2jxOUd/7JRg/Vmrzco8HdKhtz4fKk6KHU6zbbsAp5m5aSWWVTUrag7g==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@hapi/pez/-/pez-5.0.3.tgz", + "integrity": "sha512-mpikYRJjtrbJgdDHG/H9ySqYqwJ+QU/D7FXsYciS9P7NYBXE2ayKDAy3H0ou6CohOCaxPuTV4SZ0D936+VomHA==", "requires": { "@hapi/b64": "5.x.x", "@hapi/boom": "9.x.x", "@hapi/content": "^5.0.2", "@hapi/hoek": "9.x.x", "@hapi/nigel": "4.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } } }, "@hapi/pinpoint": { @@ -554,19 +453,19 @@ "integrity": "sha512-vzXR5MY7n4XeIvLpfl3HtE3coZYO4raKXW766R6DZw/6aLqR26iuZ109K7a0NtF2Db0jxqh7xz2AxkUwpUFybw==" }, "@hapi/podium": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-4.1.0.tgz", - "integrity": "sha512-k/n0McAu8PvonfQRLyKKUvvdb+Gh/O5iAeIwv535Hpxw9B1qZcrYdZyWtHZ8O5PkA9/b/Kk+BdvtgcxeKMB/2g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-4.1.1.tgz", + "integrity": "sha512-jh7a6+5Z4FUWzx8fgmxjaAa1DTBu+Qfg+NbVdo0f++rE5DgsVidUYrLDp3db65+QjDLleA2MfKQXkpT8ylBDXA==", "requires": { "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x", - "@hapi/teamwork": "4.x.x" + "@hapi/teamwork": "5.x.x", + "@hapi/validate": "1.x.x" }, "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" + "@hapi/teamwork": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-5.1.0.tgz", + "integrity": "sha512-llqoQTrAJDTXxG3c4Kz/uzhBS1TsmSBa/XG5SPcVXgmffHE1nFtyLIK0hNJHCB3EuBKT84adzd1hZNY9GJLWtg==" } } }, @@ -601,19 +500,12 @@ "dev": true }, "@hapi/shot": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-5.0.0.tgz", - "integrity": "sha512-JXddnJkRh3Xhv9lY1tA+TSIUaoODKbdNIPL/M8WFvFQKOttmGaDeqTW5e8Gf01LtLI7L5DraLMULHjrK1+YNFg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-5.0.1.tgz", + "integrity": "sha512-AnhIhB0UCBi8JpJ+BEkNs29FQGpp9yrFWDzPO/J9maS11VyDRh5cd1c6di6dX8IpYs/rUYr6uchXZ94OCo1ZDA==", "requires": { "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } + "@hapi/validate": "1.x.x" } }, "@hapi/somever": { @@ -623,19 +515,12 @@ "requires": { "@hapi/bounce": "2.x.x", "@hapi/hoek": "9.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } } }, "@hapi/statehood": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-7.0.2.tgz", - "integrity": "sha512-+0VNxysQu+UYzkfvAXq3X4aN65TnUwiR7gsq2cQ/4Rq26nCJjHAfrkYReEeshU2hPmJ3m5QuaBzyDqRm8WOpyg==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-7.0.3.tgz", + "integrity": "sha512-pYB+pyCHkf2Amh67QAXz7e/DN9jcMplIL7Z6N8h0K+ZTy0b404JKPEYkbWHSnDtxLjJB/OtgElxocr2fMH4G7w==", "requires": { "@hapi/boom": "9.x.x", "@hapi/bounce": "2.x.x", @@ -643,14 +528,7 @@ "@hapi/cryptiles": "5.x.x", "@hapi/hoek": "9.x.x", "@hapi/iron": "6.x.x", - "@hapi/joi": "17.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } + "@hapi/validate": "1.x.x" } }, "@hapi/subtext": { @@ -665,13 +543,6 @@ "@hapi/hoek": "9.x.x", "@hapi/pez": "^5.0.1", "@hapi/wreck": "17.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } } }, "@hapi/teamwork": { @@ -694,19 +565,21 @@ } } }, + "@hapi/validate": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-1.1.2.tgz", + "integrity": "sha512-ojg3iE/haKh8aCZFObkOzuJ1vQ8NP+EiuibliJKe01IMstBPXQc4Xl08+8zqAL+iZSZKp1TaWdwaNSzq8HIMKA==", + "requires": { + "@hapi/hoek": "^9.0.0", + "@hapi/topo": "^5.0.0" + } + }, "@hapi/vise": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@hapi/vise/-/vise-4.0.0.tgz", "integrity": "sha512-eYyLkuUiFZTer59h+SGy7hUm+qE9p+UemePTHLlIWppEd+wExn3Df5jO04bFQTm7nleF5V8CtuYQYb+VFpZ6Sg==", "requires": { "@hapi/hoek": "9.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } } }, "@hapi/wreck": { @@ -717,13 +590,6 @@ "@hapi/boom": "9.x.x", "@hapi/bourne": "2.x.x", "@hapi/hoek": "9.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" - } } }, "@nodelib/fs.scandir": { @@ -759,9 +625,9 @@ "dev": true }, "@types/glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-VgNIkxK+j7Nz5P7jvUZlRvhuPSmsEfS03b0alKcq5V/STUKAa3Plemsn5mrQUO7am6OErJ4rhGEGJbACclrtRA==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", "dev": true, "requires": { "@types/minimatch": "*", @@ -775,9 +641,9 @@ "dev": true }, "@types/node": { - "version": "14.0.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.13.tgz", - "integrity": "sha512-rouEWBImiRaSJsVA+ITTFM6ZxibuAlTuNOCyxVbwreu6k6+ujs7DfnU9o+PShFhET78pMBl3eH+AGSI5eOTkPA==", + "version": "14.0.27", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.27.tgz", + "integrity": "sha512-kVrqXhbclHNHGu9ztnAwSncIgJv/FaxmzXJvGXNdcCpV1b8u1/Mi6z6m0vwy0LzKeXFTPLH0NzwmoJ3fNCIq0g==", "dev": true }, "@types/q": { @@ -792,15 +658,15 @@ "integrity": "sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==" }, "abab": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.3.tgz", - "integrity": "sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.4.tgz", + "integrity": "sha512-Eu9ELJWCz/c1e9gTiCY+FceWxcqzjYEbqMgtndnuSqZSUCOL73TWNK2mHfIj4Cw2E/ongOp+JISVNCmovt2KYQ==", "dev": true }, "acorn": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz", - "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz", + "integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==", "dev": true }, "acorn-globals": { @@ -826,9 +692,9 @@ "dev": true }, "ajv": { - "version": "6.12.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", - "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", + "version": "6.12.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", + "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -936,14 +802,14 @@ "dev": true }, "autoprefixer": { - "version": "9.8.4", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.4.tgz", - "integrity": "sha512-84aYfXlpUe45lvmS+HoAWKCkirI/sw4JK0/bTeeqgHYco3dcsOn0NqdejISjptsYwNji/21dnkDri9PsYKk89A==", + "version": "9.8.6", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.6.tgz", + "integrity": "sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg==", "dev": true, "requires": { "browserslist": "^4.12.0", - "caniuse-lite": "^1.0.30001087", - "colorette": "^1.2.0", + "caniuse-lite": "^1.0.30001109", + "colorette": "^1.2.1", "normalize-range": "^0.1.2", "num2fraction": "^1.2.2", "postcss": "^7.0.32", @@ -951,33 +817,33 @@ }, "dependencies": { "browserslist": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.0.tgz", - "integrity": "sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg==", + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.0.tgz", + "integrity": "sha512-pUsXKAF2lVwhmtpeA3LJrZ76jXuusrNyhduuQs7CDFf9foT4Y38aQOserd2lMe5DSSrjf3fx34oHwryuvxAUgQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001043", - "electron-to-chromium": "^1.3.413", - "node-releases": "^1.1.53", - "pkg-up": "^2.0.0" + "caniuse-lite": "^1.0.30001111", + "electron-to-chromium": "^1.3.523", + "escalade": "^3.0.2", + "node-releases": "^1.1.60" } }, "caniuse-lite": { - "version": "1.0.30001088", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001088.tgz", - "integrity": "sha512-6eYUrlShRYveyqKG58HcyOfPgh3zb2xqs7NvT2VVtP3hEUeeWvc3lqhpeMTxYWBBeeaT9A4bKsrtjATm66BTHg==", + "version": "1.0.30001113", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001113.tgz", + "integrity": "sha512-qMvjHiKH21zzM/VDZr6oosO6Ri3U0V2tC015jRXjOecwQCJtsU5zklTNTk31jQbIOP8gha0h1ccM/g0ECP+4BA==", "dev": true }, "electron-to-chromium": { - "version": "1.3.481", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.481.tgz", - "integrity": "sha512-q2PeCP2PQXSYadDo9uNY+uHXjdB9PcsUpCVoGlY8TZOPHGlXdevlqW9PkKeqCxn2QBkGB8b6AcMO++gh8X82bA==", + "version": "1.3.533", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.533.tgz", + "integrity": "sha512-YqAL+NXOzjBnpY+dcOKDlZybJDCOzgsq4koW3fvyty/ldTmsb4QazZpOWmVvZ2m0t5jbBf7L0lIGU3BUipwG+A==", "dev": true }, "node-releases": { - "version": "1.1.58", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.58.tgz", - "integrity": "sha512-NxBudgVKiRh/2aPWMgPR7bPTX0VPmGx5QBwCtdHitnqFE5/O8DeBXuIMH1nwNnw/aMo6AjOrpsHzfY3UbUJ7yg==", + "version": "1.1.60", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.60.tgz", + "integrity": "sha512-gsO4vjEdQaTusZAEebUWp2a5d7dF5DYoIpDG7WySnk7BuZDW+GPpHXoXXuYawRBr/9t5q54tirPz79kFIWg4dA==", "dev": true }, "postcss-value-parser": { @@ -995,9 +861,9 @@ "dev": true }, "aws4": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", - "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", + "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==", "dev": true }, "babel-eslint": { @@ -1041,9 +907,9 @@ } }, "binary-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", - "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==" }, "boolbase": { "version": "1.0.0", @@ -1065,7 +931,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -1169,9 +1034,9 @@ "dev": true }, "chokidar": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz", - "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", + "integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==", "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", @@ -1181,53 +1046,6 @@ "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.4.0" - }, - "dependencies": { - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { - "fill-range": "^7.0.1" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", - "requires": { - "is-glob": "^4.0.1" - } - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "requires": { - "is-number": "^7.0.0" - } - } } }, "clean-css": { @@ -1249,9 +1067,9 @@ } }, "cli-width": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", - "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", "dev": true }, "clone": { @@ -1306,9 +1124,9 @@ } }, "colorette": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.0.tgz", - "integrity": "sha512-soRSroY+OF/8OdA3PTQXwaDJeMc7TfknKKrxeSCencL2a4+Tx5zhxmmv7hdpCjhKBjehzp8+bwe/T68K0hpIjw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", + "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==", "dev": true }, "combined-stream": { @@ -1765,6 +1583,12 @@ "is-symbol": "^1.0.2" } }, + "escalade": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.2.tgz", + "integrity": "sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -1924,9 +1748,9 @@ }, "dependencies": { "estraverse": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", - "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", "dev": true } } @@ -2036,7 +1860,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -2047,15 +1870,6 @@ "integrity": "sha512-YEox27Ie95/zoqkxm6BYSPguJsvYz9d9G1YuaNKhxjSgZbjMC9q5blmvbL4+Ail8yacQIE0OObhDb+ZwvfJafw==", "dev": true }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, "flat-cache": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", @@ -2141,7 +1955,6 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", - "dev": true, "requires": { "is-glob": "^4.0.1" } @@ -2204,12 +2017,12 @@ "dev": true }, "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "dev": true, "requires": { - "ajv": "^6.5.5", + "ajv": "^6.12.3", "har-schema": "^2.0.0" } }, @@ -2353,21 +2166,21 @@ "dev": true }, "inquirer": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.2.0.tgz", - "integrity": "sha512-E0c4rPwr9ByePfNlTIB8z51kK1s2n6jrHuJeEHENl/sbq2G/S1auvibgEwNR4uSyiU+PiYHqSwsgGiXjG8p5ZQ==", + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", "dev": true, "requires": { "ansi-escapes": "^4.2.1", - "chalk": "^3.0.0", + "chalk": "^4.1.0", "cli-cursor": "^3.1.0", - "cli-width": "^2.0.0", + "cli-width": "^3.0.0", "external-editor": "^3.0.3", "figures": "^3.0.0", - "lodash": "^4.17.15", + "lodash": "^4.17.19", "mute-stream": "0.0.8", "run-async": "^2.4.0", - "rxjs": "^6.5.3", + "rxjs": "^6.6.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0", "through": "^2.3.6" @@ -2384,9 +2197,9 @@ } }, "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -2507,7 +2320,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -2515,8 +2327,7 @@ "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "is-obj": { "version": "1.0.1", @@ -2604,9 +2415,9 @@ "dev": true }, "jsdom": { - "version": "16.2.2", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.2.2.tgz", - "integrity": "sha512-pDFQbcYtKBHxRaP55zGXCJWgFHkDAYbKcsXEK/3Icu9nKYZkutUXfLBwbD+09XDutkYSHcgfQLZ0qvpAAm9mvg==", + "version": "16.4.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.4.0.tgz", + "integrity": "sha512-lYMm3wYdgPhrl7pDcRmvzPhhrGVBeVhPIqeHjzeiHN3DFmD1RBpbExbi8vU7BJdH8VAZYovR8DMt0PNNDM7k8w==", "dev": true, "requires": { "abab": "^2.0.3", @@ -2629,7 +2440,7 @@ "tough-cookie": "^3.0.1", "w3c-hr-time": "^1.0.2", "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.0.0", + "webidl-conversions": "^6.1.0", "whatwg-encoding": "^1.0.5", "whatwg-mimetype": "^2.3.0", "whatwg-url": "^8.0.0", @@ -2694,20 +2505,10 @@ "type-check": "~0.3.2" } }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", "dev": true }, "lodash.memoize": { @@ -2827,9 +2628,9 @@ "dev": true }, "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, "nice-try": { @@ -2889,20 +2690,20 @@ "dev": true }, "nunjucks": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.1.tgz", - "integrity": "sha512-LYlVuC1ZNSalQQkLNNPvcgPt2M9FTY9bs39mTCuFXtqh7jWbYzhDlmz2M6onPiXEhdZo+b9anRhc+uBGuJZ2bQ==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.2.tgz", + "integrity": "sha512-KUi85OoF2NMygwODAy28Lh9qHmq5hO3rBlbkYoC8v377h4l8Pt5qFjILl0LWpMbOrZ18CzfVVUvIHUIrtED3sA==", "requires": { "a-sync-waterfall": "^1.0.0", "asap": "^2.0.3", "chokidar": "^3.3.0", - "commander": "^3.0.2" + "commander": "^5.1.0" }, "dependencies": { "commander": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", - "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==" + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==" } } }, @@ -2956,9 +2757,9 @@ } }, "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "requires": { "mimic-fn": "^2.1.0" @@ -2984,30 +2785,6 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, "param-case": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", @@ -3050,12 +2827,6 @@ "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", "dev": true }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -3097,15 +2868,6 @@ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, - "pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, "postcss": { "version": "7.0.32", "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz", @@ -3590,21 +3352,21 @@ } }, "request-promise-core": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz", - "integrity": "sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", "dev": true, "requires": { - "lodash": "^4.17.15" + "lodash": "^4.17.19" } }, "request-promise-native": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.8.tgz", - "integrity": "sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", "dev": true, "requires": { - "request-promise-core": "1.1.3", + "request-promise-core": "1.1.4", "stealthy-require": "^1.1.1", "tough-cookie": "^2.3.3" }, @@ -3686,9 +3448,9 @@ "dev": true }, "rxjs": { - "version": "6.5.5", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz", - "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==", + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.2.tgz", + "integrity": "sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -3707,9 +3469,9 @@ "dev": true }, "sass": { - "version": "1.26.9", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.26.9.tgz", - "integrity": "sha512-t8AkRVi+xvba4yZiLWkJdgJHBFCB3Dh4johniQkPy9ywkgFHNasXFEFP+RG/F6LhQ+aoE4aX+IorIWQjS0esVw==", + "version": "1.26.10", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.26.10.tgz", + "integrity": "sha512-bzN0uvmzfsTvjz0qwccN1sPm2HxxpNI/Xa+7PlUEMS+nQvbyuEK7Y0qFqxlPHhiNHb1Ze8WQJtU31olMObkAMw==", "dev": true, "requires": { "chokidar": ">=2.0.0 <4.0.0" @@ -3896,9 +3658,9 @@ } }, "strip-json-comments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", - "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "stylehacks": { @@ -4036,7 +3798,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "requires": { "is-number": "^7.0.0" } @@ -4104,9 +3865,9 @@ "dev": true }, "uglify-js": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz", - "integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==" + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.1.tgz", + "integrity": "sha512-RjxApKkrPJB6kjJxQS3iZlf///REXWYxYJxO/MpmlQzVkDWVI3PSnCBWezMecmTU/TRkNxrl8bmsfFQCp+LO+Q==" }, "uniq": { "version": "1.0.1", @@ -4280,9 +4041,9 @@ } }, "ws": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.0.tgz", - "integrity": "sha512-iFtXzngZVXPGgpTlP1rBqsUK82p9tKqsWRPg5L56egiljujJT3vGAYnHANvFxBieXrTFavhzhxW52jnaWV+w2w==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", + "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==", "dev": true }, "xml-name-validator": { diff --git a/package.json b/package.json index 8103918e..b1215224 100644 --- a/package.json +++ b/package.json @@ -12,25 +12,25 @@ "license": "MIT", "dependencies": { "@hapi/boom": "^9.1.0", - "@hapi/hapi": "^19.1.1", - "@hapi/inert": "^6.0.1", + "@hapi/hapi": "^19.2.0", + "@hapi/inert": "^6.0.2", "@hapi/joi": "^17.1.1", - "ajv": "^6.12.2", + "ajv": "^6.12.3", "array2d": "0.0.5", "clone": "^2.1.2", "d3-format": "^1.4.4", - "nunjucks": "^3.2.1", - "uglify-js": "^3.10.0" + "nunjucks": "^3.2.2", + "uglify-js": "^3.10.1" }, "devDependencies": { - "@hapi/code": "^8.0.1", - "@hapi/lab": "^22.0.4", - "autoprefixer": "^9.8.4", + "@hapi/code": "^8.0.2", + "@hapi/lab": "^22.0.5", + "autoprefixer": "^9.8.6", "cssnano": "^4.1.10", "html-minifier": "^4.0.0", - "jsdom": "^16.2.2", + "jsdom": "^16.4.0", "postcss": "^7.0.32", "postcss-import": "^12.0.1", - "sass": "^1.26.9" + "sass": "^1.26.10" } } diff --git a/styles_src/q-table.scss b/styles_src/q-table.scss index df90d910..1247c468 100644 --- a/styles_src/q-table.scss +++ b/styles_src/q-table.scss @@ -271,6 +271,8 @@ tr.q-table-state-visible { .q-table-annotation { position: relative; + display: block; + width: 100%; } .q-table-annotation::after { From dace1008d7e02edf24fac0a4f712ff0ccfe8c027 Mon Sep 17 00:00:00 2001 From: philipkueng Date: Tue, 18 Aug 2020 15:37:18 +0200 Subject: [PATCH 08/15] Update README.md Co-authored-by: Sharon Funke --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c87c275a..c6b7fe31 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ Footnotes are a feature to display annotations in the table and the sources in t ###### Implementation details serverside - The function `getFilteredMetaDataFootnotes()` will filter and sort all footnotes from `item.data.metaData`. The function will always return an object, when not used the object will be empty. -- Withing `getFilteredMetaDataFootnotes()`, the function `getUniqueFootnotes()` will return an array without mutiple similar footnotes. The indexes of multiple similar footnotes then will be replaced. +- Within `getFilteredMetaDataFootnotes()`, the function `getUniqueFootnotes()` will merge footnotes with the same content. The indexes of multiple same footnotes will be replaced. - Those footnotes will then be passed to the function `getTableData()` - Once the `tableData` is adjusted in `getTableData()`, there's a check if footnotes are set - If there are footnotes, they will be passed to the function `appendFootnoteAnnotationsToTableData()` along with `tableData` and `options` From 25289623e085f1ea9c3bd5884eaf9f1d2b2a8285 Mon Sep 17 00:00:00 2001 From: Philip Kueng Date: Tue, 18 Aug 2020 15:39:17 +0200 Subject: [PATCH 09/15] rename fixture-data --- ...y-similar-footnotes.json => display-merged-footnotes.json} | 2 +- routes/fixtures/data.js | 2 +- tasks/updateFixtureData.js | 4 ++-- test/dom-tests.js | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) rename resources/fixtures/data/{display-similar-footnotes.json => display-merged-footnotes.json} (96%) diff --git a/resources/fixtures/data/display-similar-footnotes.json b/resources/fixtures/data/display-merged-footnotes.json similarity index 96% rename from resources/fixtures/data/display-similar-footnotes.json rename to resources/fixtures/data/display-merged-footnotes.json index a11b441c..2decdfe5 100644 --- a/resources/fixtures/data/display-similar-footnotes.json +++ b/resources/fixtures/data/display-merged-footnotes.json @@ -1,5 +1,5 @@ { - "title": "FIXTURE: display similar footnotes", + "title": "FIXTURE: display merge footnotes", "data": { "table": [ ["Rank", "Name", "Medien", "Forschung"], diff --git a/routes/fixtures/data.js b/routes/fixtures/data.js index 53e0cf86..747fb96b 100644 --- a/routes/fixtures/data.js +++ b/routes/fixtures/data.js @@ -19,7 +19,7 @@ const fixtureData = [ require(`${fixtureDataDirectory}/minibars-custom-className.json`), require(`${fixtureDataDirectory}/minibars-custom-colorCode.json`), require(`${fixtureDataDirectory}/display-footnotes.json`), - require(`${fixtureDataDirectory}/display-similar-footnotes.json`), + require(`${fixtureDataDirectory}/display-merged-footnotes.json`), require(`${fixtureDataDirectory}/display-footnotes-before-minibar.json`), require(`${fixtureDataDirectory}/display-alot-of-footnotes.json`), require(`${fixtureDataDirectory}/hide-footnotes-in-header.json`), diff --git a/tasks/updateFixtureData.js b/tasks/updateFixtureData.js index 7c6bb105..eb5a91be 100644 --- a/tasks/updateFixtureData.js +++ b/tasks/updateFixtureData.js @@ -72,8 +72,8 @@ const fixtureData = [ require(`${fixtureDataDirectory}/display-footnotes.json`), ], [ - `${fixtureDataDirectory}/display-similar-footnotes.json`, - require(`${fixtureDataDirectory}/display-similar-footnotes.json`), + `${fixtureDataDirectory}/display-merged-footnotes.json`, + require(`${fixtureDataDirectory}/display-merged-footnotes.json`), ], [ `${fixtureDataDirectory}/display-footnotes-before-minibar.json`, diff --git a/test/dom-tests.js b/test/dom-tests.js index 5af0f1c6..a214a8ab 100644 --- a/test/dom-tests.js +++ b/test/dom-tests.js @@ -429,12 +429,12 @@ lab.experiment("footnotes", () => { ]); }); - it("shows multiple similar footnotes in footer of table with right index", async () => { + it("shows merged footnotes in footer of table with right index", async () => { const response = await server.inject({ url: "/rendering-info/web?_id=someid", method: "POST", payload: { - item: require("../resources/fixtures/data/display-similar-footnotes.json"), + item: require("../resources/fixtures/data/display-merged-footnotes.json"), toolRuntimeConfig: {}, }, }); From d2d7de8ffda3fd89ef82b6962763eb6ce923375c Mon Sep 17 00:00:00 2001 From: Philip Kueng Date: Tue, 18 Aug 2020 15:39:47 +0200 Subject: [PATCH 10/15] refactored structure of footnotes-object --- helpers/footnotes.js | 65 ++++++++++++++++++++++++++---------- routes/rendering-info/web.js | 19 ++--------- views/table.html | 2 +- 3 files changed, 51 insertions(+), 35 deletions(-) diff --git a/helpers/footnotes.js b/helpers/footnotes.js index f7c78c0e..f009f197 100644 --- a/helpers/footnotes.js +++ b/helpers/footnotes.js @@ -11,12 +11,13 @@ function appendFootnoteAnnotationsToTableData(tableData, footnotes, options) { 9: "\u2079", }; let spacings = []; + let flattenedFootnotes = getFlattenedFootnotes(footnotes); - footnotes.forEach((footnote) => { + flattenedFootnotes.forEach((footnote) => { let footnoteClass = getClass( options, footnote, - footnotes.length, + flattenedFootnotes.length, tableData[footnote.rowIndex][footnote.colIndex].type, tableData[footnote.rowIndex].length - 1 ); @@ -28,8 +29,8 @@ function appendFootnoteAnnotationsToTableData(tableData, footnotes, options) { } // create a new property to safe the index of the footnote tableData[footnote.rowIndex][footnote.colIndex].footnote = { - value: footnote.index, - unicode: unicodes[footnote.index], + value: footnote.value, + unicode: unicodes[footnote.value], class: footnoteClass, }; }); @@ -47,7 +48,7 @@ function appendFootnoteAnnotationsToTableData(tableData, footnotes, options) { if (options.cardLayout || options.cardLayoutIfSmall) { if (!options.hideTableHeader && index !== 0) { row.forEach((cell) => { - footnotes.length >= 10 + flattenedFootnotes.length >= 10 ? cell.classes.push("q-table-col-footnotes-cardlayout-double") : cell.classes.push("q-table-col-footnotes-cardlayout-single"); }); @@ -76,8 +77,8 @@ function getClass(options, footnote, amountOfFootnotes, type, lastColIndex) { return null; } -function getFilteredMetaDataFootnotes(metaData, hideTableHeader) { - let filteredFootnotes = metaData.cells +function getFootnotes(metaData, hideTableHeader) { + let footnotes = metaData.cells .filter((cell) => { if (!cell.data.footnote || (hideTableHeader && cell.rowIndex === 0)) { return false; @@ -91,22 +92,52 @@ function getFilteredMetaDataFootnotes(metaData, hideTableHeader) { } return a.colIndex - b.colIndex; }); + return getStructuredFootnotes(footnotes); +} - return filteredFootnotes; +function getStructuredFootnotes(footnotes) { + let structuredFootnotes = []; + footnotes.forEach((footnote) => { + let existingFootnote = structuredFootnotes.find( + (filterFootnote) => footnote.data.footnote === filterFootnote.value + ); + + if (existingFootnote) { + existingFootnote.coords.push({ + colIndex: footnote.colIndex, + rowIndex: footnote.rowIndex, + }); + } else { + structuredFootnotes.push({ + value: footnote.data.footnote, + index: structuredFootnotes.length + 1, + coords: [ + { + colIndex: footnote.colIndex, + rowIndex: footnote.rowIndex, + }, + ], + }); + } + }); + return structuredFootnotes; } -function getUniqueFootnotes(footnotes) { - let uniquteFootnotes = footnotes.filter( - (v, i, a) => a.findIndex((t) => t.data.footnote === v.data.footnote) === i - ); - uniquteFootnotes.forEach((footnote, index) => { - footnote.index = index + 1; +function getFlattenedFootnotes(footnotes) { + let flattenedFootnotes = []; + footnotes.forEach((footnote) => { + footnote.coords.forEach((coord) => { + flattenedFootnotes.push({ + value: footnote.index, + colIndex: coord.colIndex, + rowIndex: coord.rowIndex, + }); + }); }); - return uniquteFootnotes; + return flattenedFootnotes; } module.exports = { appendFootnoteAnnotationsToTableData, - getFilteredMetaDataFootnotes, - getUniqueFootnotes, + getFootnotes, }; diff --git a/routes/rendering-info/web.js b/routes/rendering-info/web.js index c9d07294..0b3b782a 100644 --- a/routes/rendering-info/web.js +++ b/routes/rendering-info/web.js @@ -79,25 +79,10 @@ module.exports = { const item = request.payload.item; const itemDataCopy = request.payload.item.data.table.slice(0); // get unformated copy of data for minibars - const footnotes = footnoteHelpers.getFilteredMetaDataFootnotes( + const footnotes = footnoteHelpers.getFootnotes( item.data.metaData, item.options.hideTableHeader ); - let uniqueFootnotes = []; - - if (footnotes.length > 0) { - uniqueFootnotes = footnoteHelpers.getUniqueFootnotes(footnotes); - - footnotes.forEach((footnote) => { - let unique = uniqueFootnotes.find( - (uniqueFootnote) => - uniqueFootnote.data.footnote === footnote.data.footnote - ); - if (unique) { - footnote.index = unique.index; - } - }); - } const minibarsAvailable = await request.server.inject({ url: "/option-availability/selectedColumn", method: "POST", @@ -114,7 +99,7 @@ module.exports = { minibar: minibarsAvailable.result.available ? minibarHelpers.getMinibarContext(item.options, itemDataCopy) : {}, - footnotes: uniqueFootnotes, + footnotes: footnotes, numberOfRows: item.data.table.length - 1, // do not count the header displayOptions: request.payload.toolRuntimeConfig.displayOptions || {}, id: `q_table_${request.query._id}_${Math.floor( diff --git a/views/table.html b/views/table.html index 595b6665..291d748e 100644 --- a/views/table.html +++ b/views/table.html @@ -50,7 +50,7 @@

{{ item.title }}

{% endif %} {%- if item.subtitl {%- if loop.index >= 10 -%} style="width: 9px!important" {%- endif -%}> - {{footnote.index}} {{footnote.data.footnote}} + {{footnote.index}} {{footnote.value}} {%- endfor -%} {%- endif -%} From f2505b91f9eafca85c5286150b0e587028b51dba Mon Sep 17 00:00:00 2001 From: Philip Kueng Date: Tue, 18 Aug 2020 15:56:27 +0200 Subject: [PATCH 11/15] added new test for multiple merged footnotes --- .../display-merged-footnotes-multiple.json | 88 +++++++++++++++++++ .../data/display-merged-footnotes.json | 2 +- routes/fixtures/data.js | 1 + tasks/updateFixtureData.js | 4 + test/dom-tests.js | 36 ++++++++ test/e2e-tests.js | 4 +- 6 files changed, 132 insertions(+), 3 deletions(-) create mode 100644 resources/fixtures/data/display-merged-footnotes-multiple.json diff --git a/resources/fixtures/data/display-merged-footnotes-multiple.json b/resources/fixtures/data/display-merged-footnotes-multiple.json new file mode 100644 index 00000000..b95572d1 --- /dev/null +++ b/resources/fixtures/data/display-merged-footnotes-multiple.json @@ -0,0 +1,88 @@ +{ + "title": "FIXTURE: display multiple merged footnotes", + "data": { + "table": [ + ["Rank", "Name", "Medien", "Forschung"], + ["1", "Hanspeter Musterfrau", "250", "0"], + ["2", "Fridolin Hanspeter", "240", "3"], + ["3", "Ruedi Müller", "200", "4"], + ["4", "Peter Hinterbach", "190", "0"], + ["5", "Ralf Vorderbach", "150", "10"] + ], + "metaData": { + "cells": [ + { + "data": { + "footnote": "Frisch verheiratet, früher Hanspeter Mustermann" + }, + "rowIndex": 1, + "colIndex": 1 + }, + { + "data": { + "footnote": "Frisch verheiratet, früher Hanspeter Mustermann" + }, + "rowIndex": 4, + "colIndex": 1 + }, + { + "data": { + "footnote": "Frisch verheiratet, früher Hanspeter Mustermann" + }, + "rowIndex": 5, + "colIndex": 1 + }, + { + "data": { + "footnote": "Frisch verheiratet, früher Hanspeter Mustermann" + }, + "rowIndex": 1, + "colIndex": 3 + }, + { + "data": { + "footnote": "Frisch verheiratet, früher Hanspeter Musterfrau" + }, + "rowIndex": 2, + "colIndex": 2 + }, + { + "data": { + "footnote": "Frisch verheiratet, früher Hanspeter Musterfrau" + }, + "rowIndex": 2, + "colIndex": 3 + }, + { + "data": { + "footnote": "Frisch verheiratet, früher Hanspeter Musterfrau" + }, + "rowIndex": 3, + "colIndex": 2 + } + ] + } + }, + "sources": [], + "options": { + "hideTableHeader": false, + "cardLayout": false, + "cardLayoutIfSmall": false, + "minibar": { + "invertColors": false, + "barColor": { + "positive": { + "className": "", + "colorCode": "" + }, + "negative": { + "className": "", + "colorCode": "" + } + }, + "selectedColumn": null + } + }, + "tool": "table", + "subtitle": "Einfluss auf Medien und Forschung" +} diff --git a/resources/fixtures/data/display-merged-footnotes.json b/resources/fixtures/data/display-merged-footnotes.json index 2decdfe5..75bdf66f 100644 --- a/resources/fixtures/data/display-merged-footnotes.json +++ b/resources/fixtures/data/display-merged-footnotes.json @@ -1,5 +1,5 @@ { - "title": "FIXTURE: display merge footnotes", + "title": "FIXTURE: display merged footnotes", "data": { "table": [ ["Rank", "Name", "Medien", "Forschung"], diff --git a/routes/fixtures/data.js b/routes/fixtures/data.js index 747fb96b..18ef90a2 100644 --- a/routes/fixtures/data.js +++ b/routes/fixtures/data.js @@ -20,6 +20,7 @@ const fixtureData = [ require(`${fixtureDataDirectory}/minibars-custom-colorCode.json`), require(`${fixtureDataDirectory}/display-footnotes.json`), require(`${fixtureDataDirectory}/display-merged-footnotes.json`), + require(`${fixtureDataDirectory}/display-merged-footnotes-multiple.json`), require(`${fixtureDataDirectory}/display-footnotes-before-minibar.json`), require(`${fixtureDataDirectory}/display-alot-of-footnotes.json`), require(`${fixtureDataDirectory}/hide-footnotes-in-header.json`), diff --git a/tasks/updateFixtureData.js b/tasks/updateFixtureData.js index eb5a91be..1a7eda90 100644 --- a/tasks/updateFixtureData.js +++ b/tasks/updateFixtureData.js @@ -75,6 +75,10 @@ const fixtureData = [ `${fixtureDataDirectory}/display-merged-footnotes.json`, require(`${fixtureDataDirectory}/display-merged-footnotes.json`), ], + [ + `${fixtureDataDirectory}/display-merged-footnotes-multiple.json`, + require(`${fixtureDataDirectory}/display-merged-footnotes-multiple.json`), + ], [ `${fixtureDataDirectory}/display-footnotes-before-minibar.json`, require(`${fixtureDataDirectory}/display-footnotes-before-minibar.json`), diff --git a/test/dom-tests.js b/test/dom-tests.js index a214a8ab..83d58298 100644 --- a/test/dom-tests.js +++ b/test/dom-tests.js @@ -461,6 +461,42 @@ lab.experiment("footnotes", () => { ]); }); + it("shows multiple merged footnotes in footer of table with right index", async () => { + const response = await server.inject({ + url: "/rendering-info/web?_id=someid", + method: "POST", + payload: { + item: require("../resources/fixtures/data/display-merged-footnotes-multiple.json"), + toolRuntimeConfig: {}, + }, + }); + + const dom = new JSDOM(response.result.markup); + const footnotes = dom.window.document.querySelectorAll( + "div.q-table-footer-footnote" + ); + + let arrayOfFootnotes = []; + + footnotes.forEach((footnote) => { + arrayOfFootnotes.push({ + index: footnote.childNodes[1].innerHTML.replace("\n ", ""), + text: footnote.childNodes[2].innerHTML.replace("\n ", ""), + }); + }); + + expect(arrayOfFootnotes).to.be.equal([ + { + index: "1", + text: " Frisch verheiratet, früher Hanspeter Mustermann", + }, + { + index: "2", + text: " Frisch verheiratet, früher Hanspeter Musterfrau", + }, + ]); + }); + it("shows annotation of footnotes in header of cardlayout", async () => { const response = await server.inject({ url: "/rendering-info/web?_id=someid", diff --git a/test/e2e-tests.js b/test/e2e-tests.js index 1e11cee7..acc6727f 100644 --- a/test/e2e-tests.js +++ b/test/e2e-tests.js @@ -166,9 +166,9 @@ lab.experiment("dynamic schema endpoint", () => { }); lab.experiment("fixture data endpoint", () => { - it("returns 32 fixture data items for /fixtures/data", async () => { + it("returns 33 fixture data items for /fixtures/data", async () => { const response = await server.inject("/fixtures/data"); expect(response.statusCode).to.be.equal(200); - expect(response.result.length).to.be.equal(32); + expect(response.result.length).to.be.equal(33); }); }); From a72bc836c8c80a6c432aa8156325047e0cf5170c Mon Sep 17 00:00:00 2001 From: Philip Kueng Date: Wed, 19 Aug 2020 17:03:44 +0200 Subject: [PATCH 12/15] added doc --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c6b7fe31..ed66afa5 100644 --- a/README.md +++ b/README.md @@ -130,16 +130,16 @@ This is a feature to shorten large tables in the article and make them collapsab -Footnotes are a feature to display annotations in the table and the sources in the footer of the table. It uses the `metaData` feature of [Q-Editor](https://github.com/nzzdev/Q-editor/blob/d27d6f9e88a982b10e9e812139712026a7971977/client/src/elements/schema-editor/schema-editor-table.js) +Footnotes are a feature to display annotations in the table and the sources in the footer of the table. It uses the `metaData` feature of [Q-Editor](https://github.com/nzzdev/Q-editor/blob/d27d6f9e88a982b10e9e812139712026a7971977/client/src/elements/schema-editor/schema-editor-table.js). Similar footnotes will be merged together. ###### Implementation details serverside -- The function `getFilteredMetaDataFootnotes()` will filter and sort all footnotes from `item.data.metaData`. The function will always return an object, when not used the object will be empty. -- Within `getFilteredMetaDataFootnotes()`, the function `getUniqueFootnotes()` will merge footnotes with the same content. The indexes of multiple same footnotes will be replaced. +- The function `getFootnotes()` will filter and sort all footnotes from `item.data.metaData`. Additional the data will be transitioned, that there will be listed only unique footnotes, with an array of coordinates, where the footnote will be placed. The function will always return an object, when not used the object will be empty. - Those footnotes will then be passed to the function `getTableData()` - Once the `tableData` is adjusted in `getTableData()`, there's a check if footnotes are set - If there are footnotes, they will be passed to the function `appendFootnoteAnnotationsToTableData()` along with `tableData` and `options` - In `appendFootnoteAnnotationsToTableData()` the `footnoteClass` will be calculated and determined if extra spacing is used or not +- Before appending the footnotes to the `tableData`, the footnotes array will be flattened and prepared to ease to complexity. - [This](https://github.com/nzzdev/Q-table/blob/e4fbf189ce8c1191cdfad2fac60ee9677cc8eda7/helpers/footnotes.js#L62-L75) is the matrix how we apply spacing classes to the cell - Because the title in the Card-Layout is already set by the `::before` pseudo element, it's not possible to apply the annotation with this selector as well. Therefore we have to add the unicode to the dataset `data-label` when the Card-Layout is set so we map the footnote annoation value to the `unicode`. **Important**: The mapping of the value is from **1** to **9**. - After applying the annotations to the `tableData`, the function `appendFootnoteAnnotationsToTableData()` should return an object like this: From 94aa6f8370c436ff57a4f0e013d0d4350fec2ee8 Mon Sep 17 00:00:00 2001 From: Philip Kueng Date: Wed, 19 Aug 2020 17:05:01 +0200 Subject: [PATCH 13/15] update npm packages --- package-lock.json | 280 +++++++++++++++++++++++++--------------------- package.json | 2 +- 2 files changed, 155 insertions(+), 127 deletions(-) diff --git a/package-lock.json b/package-lock.json index fe408ce4..d5d760e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -647,9 +647,9 @@ "dev": true }, "@types/q": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", - "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", + "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==", "dev": true }, "a-sync-waterfall": { @@ -692,9 +692,9 @@ "dev": true }, "ajv": { - "version": "6.12.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", - "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", + "version": "6.12.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz", + "integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==", "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -1198,13 +1198,13 @@ } }, "css-select": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.0.2.tgz", - "integrity": "sha512-dSpYaDVoWaELjvZ3mS6IKZM/y2PMPa/XYoEfYNZePL4U/XgyxZNroHEHReDx/d+VgXh9VbCTtFqLkFbmeqeaRQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", + "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", "dev": true, "requires": { "boolbase": "^1.0.0", - "css-what": "^2.1.2", + "css-what": "^3.2.1", "domutils": "^1.7.0", "nth-check": "^1.0.2" } @@ -1216,21 +1216,13 @@ "dev": true }, "css-tree": { - "version": "1.0.0-alpha.28", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.28.tgz", - "integrity": "sha512-joNNW1gCp3qFFzj4St6zk+Wh/NBv0vM5YbEreZk0SD4S23S+1xBKb6cLDg2uj4P4k/GUMlIm6cKIDqIG+vdt0w==", + "version": "1.0.0-alpha.37", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", + "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==", "dev": true, "requires": { - "mdn-data": "~1.1.0", - "source-map": "^0.5.3" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "mdn-data": "2.0.4", + "source-map": "^0.6.1" } }, "css-unit-converter": { @@ -1239,16 +1231,10 @@ "integrity": "sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY=", "dev": true }, - "css-url-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/css-url-regex/-/css-url-regex-1.1.0.tgz", - "integrity": "sha1-g4NCMMyfdMRX3lnuvRVD/uuDt+w=", - "dev": true - }, "css-what": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", - "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.3.0.tgz", + "integrity": "sha512-pv9JPyatiPaQ6pf4OvD/dbfm0o5LviWmwxNWzblYf/1u9QZd0ihV+PMwy5jdQWQ3349kZmKEx9WXuSka2dM4cg==", "dev": true }, "cssesc": { @@ -1335,28 +1321,28 @@ "dev": true }, "csso": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/csso/-/csso-3.5.1.tgz", - "integrity": "sha512-vrqULLffYU1Q2tLdJvaCYbONStnfkfimRxXNaGjxMldI0C7JPBC4rB1RyjhfdZ4m1frm8pM9uRPKH3d2knZ8gg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.0.3.tgz", + "integrity": "sha512-NL3spysxUkcrOgnpsT4Xdl2aiEiBG6bXswAABQVHcMrfjjBisFOKwLDOmf4wf32aPdcJws1zds2B0Rg+jqMyHQ==", "dev": true, "requires": { - "css-tree": "1.0.0-alpha.29" + "css-tree": "1.0.0-alpha.39" }, "dependencies": { "css-tree": { - "version": "1.0.0-alpha.29", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.29.tgz", - "integrity": "sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg==", + "version": "1.0.0-alpha.39", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.39.tgz", + "integrity": "sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA==", "dev": true, "requires": { - "mdn-data": "~1.1.0", - "source-map": "^0.5.3" + "mdn-data": "2.0.6", + "source-map": "^0.6.1" } }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "mdn-data": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.6.tgz", + "integrity": "sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA==", "dev": true } } @@ -1470,13 +1456,21 @@ } }, "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", "dev": true, "requires": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz", + "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==", + "dev": true + } } }, "domelementtype": { @@ -1514,12 +1508,8 @@ }, "dot-prop": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } + "resolved": "", + "dev": true }, "ecc-jsbn": { "version": "0.1.2", @@ -1544,9 +1534,9 @@ "dev": true }, "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==", "dev": true }, "error-ex": { @@ -1559,23 +1549,28 @@ } }, "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", + "version": "1.17.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", "dev": true, "requires": { - "es-to-primitive": "^1.2.0", + "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" + "has-symbols": "^1.0.1", + "is-callable": "^1.2.0", + "is-regex": "^1.1.0", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" } }, "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, "requires": { "is-callable": "^1.1.4", @@ -2042,9 +2037,9 @@ "dev": true }, "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", "dev": true }, "he": { @@ -2274,9 +2269,9 @@ } }, "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", + "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", "dev": true }, "is-color-stop": { @@ -2294,9 +2289,9 @@ } }, "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", "dev": true }, "is-directory": { @@ -2329,12 +2324,6 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, "is-potential-custom-element-name": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz", @@ -2342,12 +2331,12 @@ "dev": true }, "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", + "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", "dev": true, "requires": { - "has": "^1.0.1" + "has-symbols": "^1.0.1" } }, "is-resolvable": { @@ -2366,12 +2355,12 @@ } }, "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "dev": true, "requires": { - "has-symbols": "^1.0.0" + "has-symbols": "^1.0.1" } }, "is-typedarray": { @@ -2399,9 +2388,9 @@ "dev": true }, "js-yaml": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz", - "integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -2544,9 +2533,9 @@ } }, "mdn-data": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz", - "integrity": "sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", + "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", "dev": true }, "merge2": { @@ -2595,18 +2584,18 @@ } }, "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "dev": true, "requires": { - "minimist": "0.0.8" + "minimist": "^1.2.5" } }, "ms": { @@ -2719,30 +2708,48 @@ "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true }, + "object-inspect": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "dev": true + }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", "dev": true, "requires": { "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" } }, "object.values": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", - "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", + "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", "dev": true, "requires": { "define-properties": "^1.1.3", - "es-abstract": "^1.12.0", + "es-abstract": "^1.17.0-next.1", "function-bind": "^1.1.1", "has": "^1.0.3" } @@ -3640,6 +3647,26 @@ } } }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", @@ -3697,19 +3724,18 @@ } }, "svgo": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.2.1.tgz", - "integrity": "sha512-Y1+LyT4/y1ms4/0yxPMSlvx6dIbgklE9w8CIOnfeoFGB74MEkq8inSfEr6NhocTaFbyYp0a1dvNgRKGRmEBlzA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", + "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==", "dev": true, "requires": { "chalk": "^2.4.1", "coa": "^2.0.2", "css-select": "^2.0.0", "css-select-base-adapter": "^0.1.1", - "css-tree": "1.0.0-alpha.28", - "css-url-regex": "^1.1.0", - "csso": "^3.5.1", - "js-yaml": "^3.13.0", + "css-tree": "1.0.0-alpha.37", + "csso": "^4.0.2", + "js-yaml": "^3.13.1", "mkdirp": "~0.5.1", "object.values": "^1.1.0", "sax": "~1.2.4", @@ -3902,13 +3928,15 @@ } }, "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz", + "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==", "dev": true, "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.2", + "has-symbols": "^1.0.1", + "object.getownpropertydescriptors": "^2.1.0" } }, "uuid": { diff --git a/package.json b/package.json index b1215224..5a38621c 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@hapi/hapi": "^19.2.0", "@hapi/inert": "^6.0.2", "@hapi/joi": "^17.1.1", - "ajv": "^6.12.3", + "ajv": "^6.12.4", "array2d": "0.0.5", "clone": "^2.1.2", "d3-format": "^1.4.4", From 8831f2cf58fb7fd5e061c9b013d528256abaf625 Mon Sep 17 00:00:00 2001 From: philipkueng Date: Thu, 20 Aug 2020 11:57:54 +0200 Subject: [PATCH 14/15] Update README.md Co-authored-by: Sharon Funke --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ed66afa5..22263211 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ This is a feature to shorten large tables in the article and make them collapsab -Footnotes are a feature to display annotations in the table and the sources in the footer of the table. It uses the `metaData` feature of [Q-Editor](https://github.com/nzzdev/Q-editor/blob/d27d6f9e88a982b10e9e812139712026a7971977/client/src/elements/schema-editor/schema-editor-table.js). Similar footnotes will be merged together. +Footnotes are a feature to display annotations in the table and the sources in the footer of the table. It uses the `metaData` feature of [Q-Editor](https://github.com/nzzdev/Q-editor/blob/d27d6f9e88a982b10e9e812139712026a7971977/client/src/elements/schema-editor/schema-editor-table.js). Footnotes with the same text will be merged together. ###### Implementation details serverside From 9a4b3c16173db2dae7b97cf3f370ae258edd5dc7 Mon Sep 17 00:00:00 2001 From: Philip Kueng Date: Thu, 20 Aug 2020 12:04:04 +0200 Subject: [PATCH 15/15] update version --- package-lock.json | 16 +++++++++++++--- package.json | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index d5d760e1..7b25f109 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "q-table", - "version": "3.2.1", + "version": "3.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1508,8 +1508,12 @@ }, "dot-prop": { "version": "4.2.0", - "resolved": "", - "dev": true + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } }, "ecc-jsbn": { "version": "0.1.2", @@ -2324,6 +2328,12 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, "is-potential-custom-element-name": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz", diff --git a/package.json b/package.json index 5a38621c..0fabaf9e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "q-table", - "version": "3.2.1", + "version": "3.3.0", "description": "", "main": "index.js", "scripts": {