FreeDatas2HTML/public/JS/exampleWithHTML.app.js

216 lines
116 KiB
JavaScript
Raw Normal View History

/*
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/natural-orderby/esm/natural-orderby.js":
/*!*************************************************************!*\
!*** ./node_modules/natural-orderby/esm/natural-orderby.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"orderBy\": () => (/* binding */ orderBy),\n/* harmony export */ \"compare\": () => (/* binding */ compare)\n/* harmony export */ });\nvar compareNumbers = function compareNumbers(numberA, numberB) {\n if (numberA < numberB) {\n return -1;\n }\n\n if (numberA > numberB) {\n return 1;\n }\n\n return 0;\n};\n\nvar RE_NUMBERS = /(^0x[\\da-fA-F]+$|^([+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+)?(?!\\.\\d+)(?=\\D|\\s|$))|\\d+)/g;\nvar RE_LEADING_OR_TRAILING_WHITESPACES = /^\\s+|\\s+$/g; // trim pre-post whitespace\n\nvar RE_WHITESPACES = /\\s+/g; // normalize all whitespace to single ' ' character\n\nvar RE_INT_OR_FLOAT = /^[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+)?$/; // identify integers and floats\n\nvar RE_DATE = /(^([\\w ]+,?[\\w ]+)?[\\w ]+,?[\\w ]+\\d+:\\d+(:\\d+)?[\\w ]?|^\\d{1,4}[/-]\\d{1,4}[/-]\\d{1,4}|^\\w+, \\w+ \\d+, \\d{4})/; // identify date strings\n\nvar RE_LEADING_ZERO = /^0+[1-9]{1}[0-9]*$/;\nvar RE_UNICODE_CHARACTERS = /[^\\x00-\\x80]/;\n\nvar compareUnicode = function compareUnicode(stringA, stringB) {\n var result = stringA.localeCompare(stringB);\n return result ? result / Math.abs(result) : 0;\n};\n\nvar stringCompare = function stringCompare(stringA, stringB) {\n if (stringA < stringB) {\n return -1;\n }\n\n if (stringA > stringB) {\n return 1;\n }\n\n return 0;\n};\n\nvar compareChunks = function compareChunks(chunksA, chunksB) {\n var lengthA = chunksA.length;\n var lengthB = chunksB.length;\n var size = Math.min(lengthA, lengthB);\n\n for (var i = 0; i < size; i++) {\n var chunkA = chunksA[i];\n var chunkB = chunksB[i];\n\n if (chunkA.normalizedString !== chunkB.normalizedString) {\n if (chunkA.normalizedString === '' !== (chunkB.normalizedString === '')) {\n // empty strings have lowest value\n return chunkA.normalizedString === '' ? -1 : 1;\n }\n\n if (chunkA.parsedNumber !== undefined && chunkB.parsedNumber !== undefined) {\n // compare numbers\n var result = compareNumbers(chunkA.parsedNumber, chunkB.parsedNumber);\n\n if (result === 0) {\n // compare string value, if parsed numbers are equal\n // Example:\n // chunkA = { parsedNumber: 1, normalizedString: \"001\" }\n // chunkB = { parsedNumber: 1, normalizedString: \"01\" }\n // chunkA.parsedNumber === chunkB.parsedNumber\n // chunkA.normalizedString < chunkB.normalizedString\n return stringCompare(chunkA.normalizedString, chunkB.normalizedString);\n }\n\n return result;\n } else if (chunkA.parsedNumber !== undefined || chunkB.parsedNumber !== undefined) {\n // number < string\n return chunkA.parsedNumber !== undefined ? -1 : 1;\n } else if (RE_UNICODE_CHARACTERS.test(chunkA.normalizedString + chunkB.normalizedString) && chunkA.normalizedString.localeCompare) {\n // use locale comparison only if one of the chunks contains unicode characters\n return compareUnicode(chunkA.normalizedString, chunkB.normalizedString);\n } else {\n // use common string comparison for performance reason\n return stringCompare(chunkA.normalizedString, chunkB.normalizedString);\n }\n }\n } // if the chunks are equal so far, the one which has more chunks is greater than the other one\n\n\n if (lengthA > size || lengthB > size) {\n return lengthA <= size ? -1 : 1;\n }\n\n return 0;\n};\n\nvar compareOtherTypes = function compareOtherTypes(valueA, valueB) {\n if (!valueA.chunks ? valueB.chunks : !valueB.chunks) {\n return !valueA.chunks ? 1 : -1;\n }\n\n if (valueA.isNaN ? !valueB.isNaN : valueB.isNaN) {\n return valueA.isNaN ? -1 : 1;\n }\n\n if (valueA.isSymbol ? !valueB.isSymbol : valueB.isSymbol) {\n return valueA.isSymbol ? -1 : 1;\n }\n\n if (valueA.isObject ? !valueB.isObject : valueB.isObject) {\n return valueA.isObject ? -1 : 1;\n }\n\n if (valueA.isArra
/***/ }),
/***/ "./node_modules/papaparse/papaparse.min.js":
/*!*************************************************!*\
!*** ./node_modules/papaparse/papaparse.min.js ***!
\*************************************************/
/***/ (function(module, exports) {
eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* @license\nPapa Parse\nv5.3.1\nhttps://github.com/mholt/PapaParse\nLicense: MIT\n*/\n!function(e,t){ true?!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (t),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):0}(this,function s(){\"use strict\";var f=\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:void 0!==f?f:{};var n=!f.document&&!!f.postMessage,o=n&&/blob:/i.test((f.location||{}).protocol),a={},h=0,b={parse:function(e,t){var i=(t=t||{}).dynamicTyping||!1;M(i)&&(t.dynamicTypingFunction=i,i={});if(t.dynamicTyping=i,t.transform=!!M(t.transform)&&t.transform,t.worker&&b.WORKERS_SUPPORTED){var r=function(){if(!b.WORKERS_SUPPORTED)return!1;var e=(i=f.URL||f.webkitURL||null,r=s.toString(),b.BLOB_URL||(b.BLOB_URL=i.createObjectURL(new Blob([\"(\",r,\")();\"],{type:\"text/javascript\"})))),t=new f.Worker(e);var i,r;return t.onmessage=_,t.id=h++,a[t.id]=t}();return r.userStep=t.step,r.userChunk=t.chunk,r.userComplete=t.complete,r.userError=t.error,t.step=M(t.step),t.chunk=M(t.chunk),t.complete=M(t.complete),t.error=M(t.error),delete t.worker,void r.postMessage({input:e,config:t,workerId:r.id})}var n=null;b.NODE_STREAM_INPUT,\"string\"==typeof e?n=t.download?new l(t):new p(t):!0===e.readable&&M(e.read)&&M(e.on)?n=new g(t):(f.File&&e instanceof File||e instanceof Object)&&(n=new c(t));return n.stream(e)},unparse:function(e,t){var n=!1,_=!0,m=\",\",y=\"\\r\\n\",s='\"',a=s+s,i=!1,r=null,o=!1;!function(){if(\"object\"!=typeof t)return;\"string\"!=typeof t.delimiter||b.BAD_DELIMITERS.filter(function(e){return-1!==t.delimiter.indexOf(e)}).length||(m=t.delimiter);(\"boolean\"==typeof t.quotes||\"function\"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes);\"boolean\"!=typeof t.skipEmptyLines&&\"string\"!=typeof t.skipEmptyLines||(i=t.skipEmptyLines);\"string\"==typeof t.newline&&(y=t.newline);\"string\"==typeof t.quoteChar&&(s=t.quoteChar);\"boolean\"==typeof t.header&&(_=t.header);if(Array.isArray(t.columns)){if(0===t.columns.length)throw new Error(\"Option columns is empty\");r=t.columns}void 0!==t.escapeChar&&(a=t.escapeChar+s);\"boolean\"==typeof t.escapeFormulae&&(o=t.escapeFormulae)}();var h=new RegExp(j(s),\"g\");\"string\"==typeof e&&(e=JSON.parse(e));if(Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return u(null,e,i);if(\"object\"==typeof e[0])return u(r||Object.keys(e[0]),e,i)}else if(\"object\"==typeof e)return\"string\"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:\"object\"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||\"object\"==typeof e.data[0]||(e.data=[e.data])),u(e.fields||[],e.data||[],i);throw new Error(\"Unable to serialize unrecognized input\");function u(e,t,i){var r=\"\";\"string\"==typeof e&&(e=JSON.parse(e)),\"string\"==typeof t&&(t=JSON.parse(t));var n=Array.isArray(e)&&0<e.length,s=!Array.isArray(t[0]);if(n&&_){for(var a=0;a<e.length;a++)0<a&&(r+=m),r+=v(e[a],a);0<t.length&&(r+=y)}for(var o=0;o<t.length;o++){var h=n?e.length:t[o].length,u=!1,f=n?0===Object.keys(t[o]).length:0===t[o].length;if(i&&!n&&(u=\"greedy\"===i?\"\"===t[o].join(\"\").trim():1===t[o].length&&0===t[o][0].length),\"greedy\"===i&&n){for(var d=[],l=0;l<h;l++){var c=s?e[l]:l;d.push(t[o][c])}u=\"\"===d.join(\"\").trim()}if(!u){for(var p=0;p<h;p++){0<p&&!f&&(r+=m);var g=n&&s?e[p]:p;r+=v(t[o][g],p)}o<t.length-1&&(!i||0<h&&!f)&&(r+=y)}}return r}function v(e,t){if(null==e)return\"\";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);!0===o&&\"string\"==typeof e&&null!==e.match(/^[=+\\-@].*$/)&&(e=\"'\"+e);var i=e.toString().replace(h,a),r=\"boolean\"==typeof n&&n||\"function\"==
/***/ }),
/***/ "./src/exampleWithHTML.ts":
/*!********************************!*\
!*** ./src/exampleWithHTML.ts ***!
\********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _freeDatas2HTML__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./freeDatas2HTML */ \"./src/freeDatas2HTML.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\nvar initialise = function () { return __awaiter(void 0, void 0, void 0, function () {\n var converter, myRender, pagination, filtre1, sortingField1, sortingField2, e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 3, , 4]);\n converter = new _freeDatas2HTML__WEBPACK_IMPORTED_MODULE_0__.FreeDatas2HTML(\"HTML\");\n converter.datasViewElt = { id: \"datas\" };\n return [4, converter.run()];\n case 1:\n _a.sent();\n myRender = new _freeDatas2HTML__WEBPACK_IMPORTED_MODULE_0__.Render(converter);\n if (window.innerWidth < 800) {\n myRender.settings =\n {\n allBegining: \"<h4>Affichage petits écrans !</h4>\",\n allEnding: \"\",\n linesBegining: \"<ul>\",\n linesEnding: \"</ul>\",\n lineBegining: \"<li><ul>\",\n lineEnding: \"</ul></li>\",\n dataDisplaying: \"<li><b>#FIELDNAME :</b> #VALUE</li>\",\n };\n converter.datasRender = myRender;\n }\n else {\n
/***/ }),
/***/ "./src/freeDatas2HTML.ts":
/*!*******************************!*\
!*** ./src/freeDatas2HTML.ts ***!
\*******************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FreeDatas2HTML\": () => (/* binding */ FreeDatas2HTML),\n/* harmony export */ \"Pagination\": () => (/* reexport safe */ _freeDatas2HTMLPagination__WEBPACK_IMPORTED_MODULE_4__.Pagination),\n/* harmony export */ \"Render\": () => (/* reexport safe */ _freeDatas2HTMLRender__WEBPACK_IMPORTED_MODULE_3__.Render),\n/* harmony export */ \"Selector\": () => (/* reexport safe */ _freeDatas2HTMLSelector__WEBPACK_IMPORTED_MODULE_5__.Selector),\n/* harmony export */ \"SortingField\": () => (/* reexport safe */ _freeDatas2HTMLSortingField__WEBPACK_IMPORTED_MODULE_6__.SortingField)\n/* harmony export */ });\n/* harmony import */ var _freeDatas2HTMLParserForCSV__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./freeDatas2HTMLParserForCSV */ \"./src/freeDatas2HTMLParserForCSV.ts\");\n/* harmony import */ var _freeDatas2HTMLParserForHTML__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./freeDatas2HTMLParserForHTML */ \"./src/freeDatas2HTMLParserForHTML.ts\");\n/* harmony import */ var _freeDatas2HTMLParserForJSON__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./freeDatas2HTMLParserForJSON */ \"./src/freeDatas2HTMLParserForJSON.ts\");\n/* harmony import */ var _freeDatas2HTMLRender__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./freeDatas2HTMLRender */ \"./src/freeDatas2HTMLRender.ts\");\n/* harmony import */ var _freeDatas2HTMLPagination__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./freeDatas2HTMLPagination */ \"./src/freeDatas2HTMLPagination.ts\");\n/* harmony import */ var _freeDatas2HTMLSelector__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./freeDatas2HTMLSelector */ \"./src/freeDatas2HTMLSelector.ts\");\n/* harmony import */ var _freeDatas2HTMLSortingField__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./freeDatas2HTMLSortingField */ \"./src/freeDatas2HTMLSortingField.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.l
/***/ }),
/***/ "./src/freeDatas2HTMLPagination.ts":
/*!*****************************************!*\
!*** ./src/freeDatas2HTMLPagination.ts ***!
\*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Pagination\": () => (/* binding */ Pagination)\n/* harmony export */ });\n/* harmony import */ var _freeDatas2HTML__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./freeDatas2HTML */ \"./src/freeDatas2HTML.ts\");\nvar errors = __webpack_require__(/*! ./errors.js */ \"./src/errors.js\");\n\nvar Pagination = (function () {\n function Pagination(converter, pagesElt, pagesName) {\n if (pagesName === void 0) { pagesName = \"Pages\"; }\n if (converter.fields === undefined)\n throw new Error(errors.paginationNeedDatas);\n else {\n this._pages = { displayElement: _freeDatas2HTML__WEBPACK_IMPORTED_MODULE_0__.FreeDatas2HTML.checkInDOMById(pagesElt), name: pagesName };\n this._converter = converter;\n }\n }\n Pagination.isPositiveInteger = function (nb) {\n return (Number.isInteger(nb) === false || nb <= 0) ? false : true;\n };\n Object.defineProperty(Pagination.prototype, \"selectedValue\", {\n get: function () {\n return this._selectedValue;\n },\n set: function (value) {\n if (value === undefined || !Pagination.isPositiveInteger(value))\n throw new Error(errors.needPositiveInteger);\n if (this.options !== undefined && this.options.values.indexOf(value) === -1)\n throw new Error(errors.paginationNeedByfaultValueBeInOptions);\n this._selectedValue = value;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Pagination.prototype, \"options\", {\n get: function () {\n return this._options;\n },\n set: function (options) {\n if (options !== undefined) {\n options.displayElement = _freeDatas2HTML__WEBPACK_IMPORTED_MODULE_0__.FreeDatas2HTML.checkInDOMById(options.displayElement);\n if (options.values.length === 0)\n throw new Error(errors.paginationNeedOptionsValues);\n for (var _i = 0, _a = options.values; _i < _a.length; _i++) {\n var option = _a[_i];\n if (!Pagination.isPositiveInteger(option))\n throw new Error(errors.needPositiveInteger);\n }\n if (this.selectedValue !== undefined && options.values.indexOf(this.selectedValue) === -1)\n throw new Error(errors.paginationNeedByfaultValueBeInOptions);\n options.name = (options.name === undefined) ? \"Pagination\" : options.name;\n this._options = options;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Pagination.prototype, \"pages\", {\n get: function () {\n return this._pages;\n },\n enumerable: false,\n configurable: true\n });\n Pagination.prototype.rend2HTML = function () {\n if (this._converter === undefined || this._options === undefined)\n throw new Error(errors.pagination2HTMLFail);\n else {\n var selectorsHTML = \"<label for='freeDatas2HTMLPaginationSelector'>\" + this._options.name + \" </label><select name='freeDatas2HTMLPaginationSelector' id='freeDatas2HTMLPaginationSelector'><option value='0'>----</option>\";\n for (var i = 0; i < this._options.values.length; i++)\n selectorsHTML += \"<option value='\" + (i + 1) + \"'>\" + this._options.values[i] + \"</option>\";\n selectorsHTML += \"</select>\";\n this._options.displayElement.eltDOM.innerHTML = selectorsHTML;\n var selectElement_1 = document.getElementById(\"freeDatas2HTMLPaginationSelector\");\n if (this._selectedValue !== undefined) {\n var indexSelectedValue = this._options.values.indexOf(this._selectedValue) + 1;\n selectElement_1.value = \"\" + indexS
/***/ }),
/***/ "./src/freeDatas2HTMLParserForCSV.ts":
/*!*******************************************!*\
!*** ./src/freeDatas2HTMLParserForCSV.ts ***!
\*******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ParserForCSV\": () => (/* binding */ ParserForCSV)\n/* harmony export */ });\n/* harmony import */ var _freeDatas2HTMLRemoteSources__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./freeDatas2HTMLRemoteSources */ \"./src/freeDatas2HTMLRemoteSources.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar Papa = __webpack_require__(/*! papaparse */ \"./node_modules/papaparse/papaparse.min.js\");\nvar errors = __webpack_require__(/*! ./errors.js */ \"./src/errors.js\");\n\nvar ParserForCSV = (function () {\n function ParserForCSV(datasRemoteSource) {\n this._datas2Parse = \"\";\n this._parseResults = undefined;\n this.options = {\n delimiter: \"\",\n newline: \"\",\n quoteChar: '\"',\n escapeChar: '\"',\n transformHeader: function (field, index) { return field.trim(); },\n preview: 0,\n comments: \"\",\n fastMode: undefined,\n transform: undefined\n };\n this._privateOptions = {\n header: true,\n download: false,\n downloadRequestHeaders: undefined,\n skipEmptyLines: \"greedy\",\n withCredentials: undefined\n };\n if (datasRemoteSource !== undefined)\n this._datasRemoteSource = datasRemoteSource;\n else\n this._datasRemoteSource = new _freeDatas2HTMLRemoteSources__WEBPACK_IMPORTED_MODULE_0__.Re
/***/ }),
/***/ "./src/freeDatas2HTMLParserForHTML.ts":
/*!********************************************!*\
!*** ./src/freeDatas2HTMLParserForHTML.ts ***!
\********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ParserForHTML\": () => (/* binding */ ParserForHTML)\n/* harmony export */ });\n/* harmony import */ var _freeDatas2HTMLRemoteSources__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./freeDatas2HTMLRemoteSources */ \"./src/freeDatas2HTMLRemoteSources.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar errors = __webpack_require__(/*! ./errors.js */ \"./src/errors.js\");\n\nvar ParserForHTML = (function () {\n function ParserForHTML(datasRemoteSource) {\n this._document2Parse = document;\n this._parseResults = undefined;\n this._fieldsSelector = \"table > thead > tr > th\";\n this._rowsSelector = \"table > tbody > tr\";\n this._datasSelector = \"tr > td\";\n if (datasRemoteSource !== undefined)\n this._datasRemoteSource = datasRemoteSource;\n else\n this._datasRemoteSource = new _freeDatas2HTMLRemoteSources__WEBPACK_IMPORTED_MODULE_0__.RemoteSources({ url: \"\" });\n }\n ParserForHTML.prototype.setRemoteSource = function (source) {\n this._datasRemoteSource = new _freeDatas2HTMLRemoteSources__WEBPACK_IMPORTED_MODULE_0__.RemoteSources(source);\n };\n Object.defineProperty(ParserForHTML.prototype, \"datasRemoteSource\", {\n get: function () {\n return this._datasRemoteSource;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ParserForHTML.prototype, \"documen
/***/ }),
/***/ "./src/freeDatas2HTMLParserForJSON.ts":
/*!********************************************!*\
!*** ./src/freeDatas2HTMLParserForJSON.ts ***!
\********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ParserForJSON\": () => (/* binding */ ParserForJSON)\n/* harmony export */ });\n/* harmony import */ var _freeDatas2HTMLRemoteSources__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./freeDatas2HTMLRemoteSources */ \"./src/freeDatas2HTMLRemoteSources.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar errors = __webpack_require__(/*! ./errors.js */ \"./src/errors.js\");\n\nvar ParserForJSON = (function () {\n function ParserForJSON(datasRemoteSource) {\n this._datas2Parse = \"\";\n this._parseResults = undefined;\n if (datasRemoteSource !== undefined)\n this._datasRemoteSource = datasRemoteSource;\n else\n this._datasRemoteSource = new _freeDatas2HTMLRemoteSources__WEBPACK_IMPORTED_MODULE_0__.RemoteSources({ url: \"\" });\n }\n ParserForJSON.prototype.setRemoteSource = function (source) {\n this._datasRemoteSource = new _freeDatas2HTMLRemoteSources__WEBPACK_IMPORTED_MODULE_0__.RemoteSources(source);\n };\n Object.defineProperty(ParserForJSON.prototype, \"datasRemoteSource\", {\n get: function () {\n return this._datasRemoteSource;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ParserForJSON.prototype, \"datas2Parse\", {\n get: function () {\n return this._datas2Parse;\n },\n set: function (datas) {\n if (datas.trim().length === 0)\
/***/ }),
/***/ "./src/freeDatas2HTMLRemoteSources.ts":
/*!********************************************!*\
!*** ./src/freeDatas2HTMLRemoteSources.ts ***!
\********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RemoteSources\": () => (/* binding */ RemoteSources)\n/* harmony export */ });\nvar errors = __webpack_require__(/*! ./errors.js */ \"./src/errors.js\");\nvar RemoteSources = (function () {\n function RemoteSources(RemoteSettings) {\n this.allowedUrlProtocol = [\"https:\", \"http:\"];\n this._headers = [];\n this._withCredentials = false;\n this._url = RemoteSettings.url;\n if (RemoteSettings.headers !== undefined)\n this.headers = RemoteSettings.headers;\n if (RemoteSettings.withCredentials !== undefined)\n this.withCredentials = RemoteSettings.withCredentials;\n }\n Object.defineProperty(RemoteSources.prototype, \"url\", {\n get: function () {\n return this._url;\n },\n set: function (url) {\n if (url.trim().length === 0)\n throw new Error(errors.remoteSourceNeedUrl);\n else {\n try {\n var checkUrl = new URL(url);\n if (this.allowedUrlProtocol.indexOf(checkUrl.protocol) === -1)\n throw new Error();\n }\n catch (e) {\n throw new Error(errors.remoteSourceUrlFail);\n }\n this._url = url.trim();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(RemoteSources.prototype, \"headers\", {\n get: function () {\n return this._headers;\n },\n set: function (headers) {\n var forbiddenHeadersNames = [\"Accept-Charset\", \"Accept-Encoding\", \"Access-Control-Request-Headers\", \"Access-Control-Request-Method\", \"Connection\", \"Content-Length\", \"Cookie\", \"Cookie2\", \"Date\", \"DNT\", \"Expect\", \"Host\", \"Keep-Alive\", \"Origin\", \"Referer\", \"TE\", \"Trailer\", \"Transfer-Encoding\", \"Upgrade\", \"Via\"];\n for (var _i = 0, headers_1 = headers; _i < headers_1.length; _i++) {\n var header = headers_1[_i];\n header.key = header.key.trim();\n if (header.key.startsWith(\"Sec-\") || header.key.startsWith(\"Proxy-\") || forbiddenHeadersNames.indexOf(header.key) !== -1)\n console.error(errors.remoteSourceHeaderIsUnallowed);\n else\n this._headers.push({ key: header.key, value: header.value.trim() });\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(RemoteSources.prototype, \"withCredentials\", {\n get: function () {\n return this._withCredentials;\n },\n set: function (credentials) {\n this._withCredentials = credentials;\n },\n enumerable: false,\n configurable: true\n });\n RemoteSources.prototype.getFetchSettings = function () {\n var headers = new Headers();\n if (this._headers !== undefined) {\n for (var _i = 0, _a = this._headers; _i < _a.length; _i++) {\n var header = _a[_i];\n headers.append(header.key, header.value);\n }\n }\n var credentials = (this._withCredentials) ? \"include\" : \"omit\";\n return { method: \"GET\", headers: headers, credentials: credentials };\n };\n return RemoteSources;\n}());\n\n\n\n//# sourceURL=webpack://freedatas2html/./src/freeDatas2HTMLRemoteSources.ts?");
/***/ }),
/***/ "./src/freeDatas2HTMLRender.ts":
/*!*************************************!*\
!*** ./src/freeDatas2HTMLRender.ts ***!
\*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Render\": () => (/* binding */ Render)\n/* harmony export */ });\nvar errors = __webpack_require__(/*! ./errors.js */ \"./src/errors.js\");\nvar Render = (function () {\n function Render(converter, settings) {\n if (settings === void 0) { settings = Render.defaultSettings; }\n this._converter = converter;\n this.settings = settings;\n }\n Render.prototype.rend2HTML = function (datas) {\n if (this._converter.fields === undefined)\n throw new Error(errors.renderNeedDatas);\n else {\n var datasHTML = this.settings.allBegining;\n if (this.settings.fieldsBegining !== undefined && this.settings.fieldDisplaying !== undefined && this.settings.fieldsEnding !== undefined) {\n datasHTML += this.settings.fieldsBegining;\n for (var _i = 0, _a = this._converter.fields; _i < _a.length; _i++) {\n var field = _a[_i];\n datasHTML += this.settings.fieldDisplaying.replace(\"#FIELDNAME\", field);\n }\n datasHTML += this.settings.fieldsEnding;\n }\n datasHTML += this.settings.linesBegining;\n for (var _b = 0, datas_1 = datas; _b < datas_1.length; _b++) {\n var row = datas_1[_b];\n datasHTML += this.settings.lineBegining;\n for (var _c = 0, _d = this._converter.fields; _c < _d.length; _c++) {\n var field = _d[_c];\n if (row[field] !== undefined)\n datasHTML += this.settings.dataDisplaying.replace(\"#VALUE\", row[field]).replace(\"#FIELDNAME\", field);\n else\n datasHTML += this.settings.dataDisplaying.replace(\"#VALUE\", \"\").replace(\"#FIELDNAME\", field);\n }\n datasHTML += this.settings.lineEnding;\n }\n datasHTML += this.settings.linesEnding + this.settings.allEnding;\n return datasHTML;\n }\n };\n Render.defaultSettings = {\n allBegining: \"<table>\",\n allEnding: \"</table>\",\n fieldsBegining: \"<thead><tr>\",\n fieldsEnding: \"</tr></thead>\",\n fieldDisplaying: \"<th>#FIELDNAME</th>\",\n linesBegining: \"<tbody>\",\n linesEnding: \"</tbody>\",\n lineBegining: \"<tr>\",\n lineEnding: \"</tr>\",\n dataDisplaying: \"<td>#VALUE</td>\",\n };\n return Render;\n}());\n\n\n\n//# sourceURL=webpack://freedatas2html/./src/freeDatas2HTMLRender.ts?");
/***/ }),
/***/ "./src/freeDatas2HTMLSelector.ts":
/*!***************************************!*\
!*** ./src/freeDatas2HTMLSelector.ts ***!
\***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Selector\": () => (/* binding */ Selector)\n/* harmony export */ });\n/* harmony import */ var _freeDatas2HTML__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./freeDatas2HTML */ \"./src/freeDatas2HTML.ts\");\nvar compare = __webpack_require__(/*! natural-orderby */ \"./node_modules/natural-orderby/esm/natural-orderby.js\").compare;\nvar errors = __webpack_require__(/*! ./errors.js */ \"./src/errors.js\");\n\nvar Selector = (function () {\n function Selector(converter, datasFieldNb, elt) {\n this._datasViewElt = { id: \"\", eltDOM: undefined };\n this.name = \"\";\n this.values = [];\n if (converter.fields === undefined || converter.datas.length === 0)\n throw new Error(errors.selectorNeedDatas);\n else if (!converter.checkFieldExist(Number(datasFieldNb)))\n throw new Error(errors.selectorFieldNotFound);\n else {\n this._datasViewElt = _freeDatas2HTML__WEBPACK_IMPORTED_MODULE_0__.FreeDatas2HTML.checkInDOMById(elt);\n this._converter = converter;\n this._datasFieldNb = datasFieldNb;\n }\n }\n Object.defineProperty(Selector.prototype, \"separator\", {\n get: function () {\n return this._separator;\n },\n set: function (separator) {\n if (separator === \"\")\n this._separator = undefined;\n else\n this._separator = separator;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Selector.prototype, \"datasViewElt\", {\n get: function () {\n return this._datasViewElt;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Selector.prototype, \"datasFieldNb\", {\n get: function () {\n return this._datasFieldNb;\n },\n enumerable: false,\n configurable: true\n });\n Selector.prototype.selector2HTML = function () {\n if (this._converter === undefined || this._datasViewElt.eltDOM === undefined || this._datasFieldNb === undefined)\n throw new Error(errors.selector2HTMLFail);\n else {\n this.name = this._converter.fields[this._datasFieldNb];\n for (var _i = 0, _a = this._converter.datas; _i < _a.length; _i++) {\n var row = _a[_i];\n if (this._separator === undefined) {\n if (row[this.name] !== \"\" && this.values.indexOf(row[this.name]) === -1)\n this.values.push(row[this.name]);\n }\n else {\n var checkedValues = row[this.name].split(this._separator);\n for (var _b = 0, checkedValues_1 = checkedValues; _b < checkedValues_1.length; _b++) {\n var value = checkedValues_1[_b];\n if (value !== \"\" && this.values.indexOf(value) === -1)\n this.values.push(value);\n }\n }\n }\n if (this.values.length > 0) {\n if (this._converter.getSortingFunctionForField(this._datasFieldNb) !== undefined)\n this.values.sort(this._converter.getSortingFunctionForField(this._datasFieldNb).sort);\n else\n this.values.sort(compare());\n var selectorsHTML = \"<label for='freeDatas2HTML_\" + this._datasViewElt.id + \"'>\" + this.name + \" : </label><select name='freeDatas2HTML_\" + this._datasViewElt.id + \"' id='freeDatas2HTML_\" + this._datasViewElt.id + \"'><option value='0'>----</option>\";\n for (var i = 0; i < this.values.length; i++)\n selectorsHTML += \"<option value='\" + (i + 1) + \"'>\" + this.values[i] + \"</option>\";\n selectorsHTML += \"</select>\";\n this._datasViewElt.eltDOM.innerHTML = s
/***/ }),
/***/ "./src/freeDatas2HTMLSortingField.ts":
/*!*******************************************!*\
!*** ./src/freeDatas2HTMLSortingField.ts ***!
\*******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SortingField\": () => (/* binding */ SortingField)\n/* harmony export */ });\nvar compare = __webpack_require__(/*! natural-orderby */ \"./node_modules/natural-orderby/esm/natural-orderby.js\").compare;\nvar errors = __webpack_require__(/*! ./errors.js */ \"./src/errors.js\");\nvar SortingField = (function () {\n function SortingField(converter, datasFieldNb, fieldsDOMSelector) {\n if (fieldsDOMSelector === void 0) { fieldsDOMSelector = \"th\"; }\n this._order = undefined;\n if (converter.fields === undefined)\n throw new Error(errors.sortingFieldNeedDatas);\n else if (!converter.checkFieldExist(Number(datasFieldNb)))\n throw new Error(errors.sortingFieldFieldNotFound);\n else {\n var fields = document.querySelectorAll(fieldsDOMSelector);\n if (fields === undefined)\n throw new Error(errors.sortingFieldsNotInHTML);\n else if (fields.length !== converter.fields.length)\n throw new Error(errors.sortingFieldsNbFail);\n else {\n this._converter = converter;\n this._datasFieldNb = datasFieldNb;\n this._fieldsDOMSelector = fieldsDOMSelector;\n }\n }\n }\n Object.defineProperty(SortingField.prototype, \"fieldsDOMSelector\", {\n get: function () {\n return this._fieldsDOMSelector;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(SortingField.prototype, \"datasFieldNb\", {\n get: function () {\n return this._datasFieldNb;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(SortingField.prototype, \"order\", {\n get: function () {\n return this._order;\n },\n enumerable: false,\n configurable: true\n });\n SortingField.prototype.field2HTML = function () {\n if (this._converter === undefined || this._fieldsDOMSelector === \"\" || this._datasFieldNb === undefined)\n throw new Error(errors.sortingField2HTMLFail);\n else {\n var fields = document.querySelectorAll(this._fieldsDOMSelector);\n var htmlContent = fields[this._datasFieldNb].innerHTML;\n htmlContent = \"<a href='#freeDatas2HTMLSorting\" + this._datasFieldNb + \"' id='freeDatas2HTMLSorting\" + this._datasFieldNb + \"'>\" + htmlContent + \"</a>\";\n fields[this._datasFieldNb].innerHTML = htmlContent;\n var sortingElement = document.getElementById(\"freeDatas2HTMLSorting\" + this._datasFieldNb), field_1 = this;\n sortingElement.addEventListener(\"click\", function (e) {\n e.preventDefault();\n var order = field_1._order;\n if (order === undefined || order === \"desc\")\n field_1._order = \"asc\";\n else\n field_1._order = \"desc\";\n field_1._converter.datasSortedField = field_1;\n field_1._converter.refreshView();\n });\n }\n };\n return SortingField;\n}());\n\n\n\n//# sourceURL=webpack://freedatas2html/./src/freeDatas2HTMLSortingField.ts?");
/***/ }),
/***/ "./src/errors.js":
/*!***********************!*\
!*** ./src/errors.js ***!
\***********************/
/***/ ((module) => {
eval("module.exports =\n{\n converterElementNotFound : \"Aucun élément HTML n'a été trouvé ayant comme \\\"id\\\" : \",\n converterFieldNotFound : \"Le champ n'existe pas dans les données ou les données n'ont pas encore été chargées.\",\n converterNeedDatasElt: \"Merci de fournir un id valide pour l'élément où afficher les données.\",\n converterRefreshFail: \"Le nom des champs et l'élement du DOM receveur sont nécessaires à l'affichage des données.\",\n pagination2HTMLFail : \"Toutes les donnée nécessaires à la création des sélecteurs de pagination n'ont pas été fournies.\",\n paginationNeedByfaultValueBeInOptions: \"La valeur de pagination par défaut doit faire partie des options proposées.\",\n paginationNeedDatas: \"Il ne peut y avoir de pagination, si les données n'ont pas été récupérées.\",\n paginationNeedOptionsValues: \"Vous n'avez fourni aucune options possibles pour la pagination.\", \n paginationNeedPositiveInteger: \"Merci de fournir un nombre entier supérieur à zéro pour désigner chaque option de pagination.\",\n parserDatasNotFound : \"Aucune donnée n'a été trouvée.\",\n parserElementsNotFound: \"Aucun élément trouvé dans le document pour le sélecteur fourni : \",\n parserFail: \"La lecture des données a échoué.\",\n parserFieldNameFail: \"Les noms de champs fournis doivent être uniques et ne peuvent être vides.\",\n parserFieldsNotFound: \"Aucun nom de champs n'a été trouvé par le parseur.\",\n parserMeetErrors : \"Au moins une erreur a été rencontrée durant le traitement des données.\",\n parserNeedDatas: \"Merci de fournir une chaîne de caractères valide à parser.\",\n parserNeedSource: \"Merci de fournir une chaîne de caractères où une url pour les données à parser.\",\n parserRemoteFail: \"Erreur rencontrée durant l'accès aux données distantes.\",\n parserSelectorsIsEmpty: \"Les sélecteurs CSS ne peuvent pas être une chaîne vide.\",\n parserTypeError: \"Une donnée a été trouvée avec un type imprévu : \",\n remoteSourceHeaderUnallowed: \"Le nom d'une des entêtes passées n'est pas autorisé.\", \n remoteSourceNeedUrl: \"Merci de fournir une url valide pour la source distante de données.\", \n remoteSourceUrlFail: \"L'url fournie ne semble pas valide.\", \n renderNeedDatas: \"Il ne peut y avoir de pagination, si les données n'ont pas été récupérées.\",\n selector2HTMLFail: \"Le création d'un filtre dans le DOM nécessite l'initialisation de l'élément HTML et du numéro du champs à filter.\",\n selectorCheckIsOkFail: \"Le test est lancé sur un filtre incorrectement initialisé ou sur un attribut absent de la donnée à tester.\",\n selectorFieldNotFound: \"Au moins un des champs devant servir à filtrer les données n'existe pas dans le fichier.\",\n selectorNeedDatas: \"Le création d'un filtre nécessite la transmission des données à filtrer.\",\n selectorSelectedIndexNotFound: \"La valeur sélectionnée n'a pas été trouvée dans la liste des champs.\",\n sortingField2HTMLFail: \"Toutes les donnée nécessaires à la création du lien de classement n'ont pas été fournies.\",\n sortingFieldNeedDatas: \"Le création d'un champ de classement nécessite la transmission de la liste des champs.\",\n sortingFieldFieldNotFound: \"Au moins un des champs devant permettre de classer les données n'existe pas dans le fichier.\",\n sortingFieldsNbFail: \"Le nombre de champs trouvés dans le DOM ne correspond pas à celui des données à classer.\",\n sortingFieldsNotInHTML: \"Les champs pouvant servir à classer les données n'ont pas été trouvés dans le DOM.\",\n};\n\n//# sourceURL=webpack://freedatas2html/./src/errors.js?");
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval devtool is used.
/******/ var __webpack_exports__ = __webpack_require__("./src/exampleWithHTML.ts");
/******/
/******/ })()
;