@green-code-studio/objects-list 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -54,7 +54,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
54
54
  \**********************/
55
55
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
56
56
 
57
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ node: () => (/* binding */ node),\n/* harmony export */ t: () => (/* binding */ t),\n/* harmony export */ translator: () => (/* binding */ translator)\n/* harmony export */ });\n/* harmony import */ var _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @green-code-studio/internationalization/i18nNode.js */ \"./node_modules/@green-code-studio/internationalization/i18nNode.js\");\n/* harmony import */ var _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @green-code-studio/internationalization/i18nTextValue.js */ \"./node_modules/@green-code-studio/internationalization/i18nTextValue.js\");\n/* harmony import */ var _green_code_studio_internationalization_translator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @green-code-studio/internationalization/translator.js */ \"./node_modules/@green-code-studio/internationalization/translator.js\");\n/* harmony import */ var _green_code_studio_internationalization_languagesHierarchy_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @green-code-studio/internationalization/languagesHierarchy.js */ \"./node_modules/@green-code-studio/internationalization/languagesHierarchy.js\");\n\n\n\n\n\nconsole.log(_green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode);\nconst node = {name:\"\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([],[{name:\"objectList\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([],[{name:\"search\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Szukaj\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Search\")}],[])},{name:\"paginationMode\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Tryb paginacji\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Pagination mode\")}],[])},{name:\"scrollMode\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Tryb scrollowania\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Scroll mode\")}],[])},{name:\"tableView\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Widok tabeli\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Table view\")}],[])},{name:\"listView\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Widok listy\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"List view\")}],[])},{name:\"startMultiEdit\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Rozpocznij edycję wielu\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Start multi-edit\")}],[])},{name:\"saveRow\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Zapisz wiersz\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Save a row\")}],[])},{name:\"mode\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Tryb\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Mode\")}],[])},{name:\"view\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Widok\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"View\")}],[])},{name:\"columnEnabled\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Kolumna widoczna\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Column enabled\")}],[])},{name:\"columnName\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Nazwa kolumny\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Column name\")}],[])},{name:\"columnFilter\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Filtr\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Filter\")}],[])}])},{name:\"filter\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([],[{name:\"none\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Brak\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"None\")}],[])},{name:\"equals\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Równa się\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Equals\")}],[])},{name:\"lessThan\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Mniejsze niż\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Less than\")}],[])},{name:\"greaterThan\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Większe niż\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Greater than\")}],[])},{name:\"contains\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Zawiera\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Contains\")}],[])},{name:\"oneOf\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Jedno z\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"One of\")}],[])},{name:\"empty\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Puste\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Empty\")}],[])}])}])};\nconst translator=new _green_code_studio_internationalization_translator_js__WEBPACK_IMPORTED_MODULE_2__.Translator(_green_code_studio_internationalization_languagesHierarchy_js__WEBPACK_IMPORTED_MODULE_3__.LanguagesHierarchy.default, node.node);\nfunction t(q){var x=translator.translate(q);return x?x.toString():'';}\n\n\n//# sourceURL=webpack://@green-code-studio/objects-list/./src/i18n.xml?");
57
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ node: () => (/* binding */ node),\n/* harmony export */ t: () => (/* binding */ t),\n/* harmony export */ translator: () => (/* binding */ translator)\n/* harmony export */ });\n/* harmony import */ var _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @green-code-studio/internationalization/i18nNode.js */ \"./node_modules/@green-code-studio/internationalization/i18nNode.js\");\n/* harmony import */ var _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @green-code-studio/internationalization/i18nTextValue.js */ \"./node_modules/@green-code-studio/internationalization/i18nTextValue.js\");\n/* harmony import */ var _green_code_studio_internationalization_translator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @green-code-studio/internationalization/translator.js */ \"./node_modules/@green-code-studio/internationalization/translator.js\");\n/* harmony import */ var _green_code_studio_internationalization_languagesHierarchy_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @green-code-studio/internationalization/languagesHierarchy.js */ \"./node_modules/@green-code-studio/internationalization/languagesHierarchy.js\");\n\n\n\n\n\nconsole.log(_green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode);\nconst node = {name:\"\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([],[{name:\"objectList\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([],[{name:\"search\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Szukaj\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Search\")}],[])},{name:\"paginationMode\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Tryb paginacji\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Pagination mode\")}],[])},{name:\"scrollMode\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Tryb scrollowania\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Scroll mode\")}],[])},{name:\"tableView\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Widok tabeli\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Table view\")}],[])},{name:\"listView\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Widok listy\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"List view\")}],[])},{name:\"startMultiEdit\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Rozpocznij edycję wielu\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Start multi-edit\")}],[])},{name:\"saveRow\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Zapisz wiersz\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Save a row\")}],[])},{name:\"mode\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Tryb\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Mode\")}],[])},{name:\"view\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Widok\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"View\")}],[])},{name:\"columnEnabled\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Kolumna widoczna\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Column enabled\")}],[])},{name:\"columnName\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Nazwa kolumny\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Column name\")}],[])},{name:\"columnFilter\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Filtr\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Filter\")}],[])},{name:\"filtersCount\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Liczba filtrów\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Filters count\")}],[])},{name:\"clearFilters\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Wyczyść filtry\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Clear filters\")}],[])}])},{name:\"filter\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([],[{name:\"none\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Brak\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"None\")}],[])},{name:\"equals\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Równa się\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Equals\")}],[])},{name:\"lessThan\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Mniejsze niż\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Less than\")}],[])},{name:\"greaterThan\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Większe niż\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Greater than\")}],[])},{name:\"contains\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Zawiera\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Contains\")}],[])},{name:\"oneOf\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Jedno z\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"One of\")}],[])},{name:\"empty\", node:new _green_code_studio_internationalization_i18nNode_js__WEBPACK_IMPORTED_MODULE_0__.I18nNode([{lang:\"pl\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Puste\")},{lang:\"en\", value: new _green_code_studio_internationalization_i18nTextValue_js__WEBPACK_IMPORTED_MODULE_1__.I18nTextValue(\"Empty\")}],[])}])}])};\nconst translator=new _green_code_studio_internationalization_translator_js__WEBPACK_IMPORTED_MODULE_2__.Translator(_green_code_studio_internationalization_languagesHierarchy_js__WEBPACK_IMPORTED_MODULE_3__.LanguagesHierarchy.default, node.node);\nfunction t(q){var x=translator.translate(q);return x?x.toString():'';}\n\n\n//# sourceURL=webpack://@green-code-studio/objects-list/./src/i18n.xml?");
58
58
 
59
59
  /***/ }),
60
60
 
@@ -124,7 +124,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
124
124
  \****************************/
125
125
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
126
126
 
127
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ConfigPopup: () => (/* binding */ ConfigPopup)\n/* harmony export */ });\n/* harmony import */ var _ConfigPopup_mpts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ConfigPopup.mpts */ \"./src/ConfigPopup.mpts\");\n/* harmony import */ var _i18n_xml__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./i18n.xml */ \"./src/i18n.xml\");\n/* harmony import */ var _tableView_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tableView.js */ \"./src/tableView.js\");\n/* harmony import */ var _listView_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./listView.js */ \"./src/listView.js\");\n/* harmony import */ var _ColumnFilter_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ColumnFilter.js */ \"./src/ColumnFilter.js\");\n\r\n\r\n\r\n\r\n\r\n\r\nclass ConfigPopup extends HTMLElement {\r\n constructor(objectsList) {\r\n super();\r\n this.append((0,_ConfigPopup_mpts__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\r\n t: _i18n_xml__WEBPACK_IMPORTED_MODULE_1__.t,\r\n categories: [...objectsList.columns.groupBy(c => c.category)]\r\n .map(([category, columns]) => ({name: category ?? '', columns}))\r\n }))\r\n this.querySelector('.mode').onchange = () => {\r\n objectsList.infiniteScrollEnabled = this.querySelector('.mode').value == 'scrollMode'\r\n objectsList.refresh()\r\n }\r\n this.querySelector('.view').onchange = () => {\r\n if (this.querySelector('.view').value == 'tableView')\r\n objectsList.insideViewClass = _tableView_js__WEBPACK_IMPORTED_MODULE_2__.TableView\r\n else\r\n objectsList.insideViewClass = _listView_js__WEBPACK_IMPORTED_MODULE_3__.ListView\r\n objectsList.refresh()\r\n }\r\n this.addEventListener('blur', () => {\r\n if(!this.matches(':focus-within, :focus'))\r\n this.remove();\r\n })\r\n this.querySelector('select').focus()\r\n console.log('ssss')\r\n for (const checkbox of this.querySelectorAll('table input[type=\"checkbox\"]')) {\r\n checkbox.checked = !objectsList.hiddenColumns.has(checkbox.dataset.name)\r\n checkbox.onchange = () => {\r\n if (checkbox.checked)\r\n objectsList.hiddenColumns.delete(checkbox.dataset.name)\r\n else\r\n objectsList.hiddenColumns.add(checkbox.dataset.name)\r\n\r\n objectsList.refresh()\r\n }\r\n }\r\n\r\n for (const filterContainer of this.querySelectorAll('table .filter')) {\r\n const filter=new _ColumnFilter_js__WEBPACK_IMPORTED_MODULE_4__.ColumnFilter();\r\n filterContainer.append(filter)\r\n filter.addEventListener('x-filter', (e) => {\r\n console.log('dddd',e)\r\n objectsList.columnFilters.set(filterContainer.dataset.name, e.detail)\r\n objectsList.refresh()\r\n });\r\n }\r\n this.tabIndex = 0\r\n setTimeout(()=>this.focus(), 1)\r\n setTimeout(() => this.checkFocus(), 100)\r\n }\r\n checkFocus() {\r\n console.log('checkFocus')\r\n if (!this.matches(':focus-within, :focus'))\r\n this.remove();\r\n\r\n if(this.parentNode)\r\n setTimeout(() => this.checkFocus(), 100)\r\n }\r\n}\r\n\r\ncustomElements.define('config-popup', ConfigPopup);\r\n\n\n//# sourceURL=webpack://@green-code-studio/objects-list/./src/ConfigPopup.js?");
127
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ConfigPopup: () => (/* binding */ ConfigPopup)\n/* harmony export */ });\n/* harmony import */ var _ConfigPopup_mpts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ConfigPopup.mpts */ \"./src/ConfigPopup.mpts\");\n/* harmony import */ var _i18n_xml__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./i18n.xml */ \"./src/i18n.xml\");\n/* harmony import */ var _tableView_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tableView.js */ \"./src/tableView.js\");\n/* harmony import */ var _listView_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./listView.js */ \"./src/listView.js\");\n/* harmony import */ var _ColumnFilter_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ColumnFilter.js */ \"./src/ColumnFilter.js\");\n\r\n\r\n\r\n\r\n\r\n\r\nclass ConfigPopup extends HTMLElement {\r\n constructor(objectsList) {\r\n super();\r\n this.append((0,_ConfigPopup_mpts__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\r\n t: _i18n_xml__WEBPACK_IMPORTED_MODULE_1__.t,\r\n categories: Object.entries(objectsList.columns.reduce((o,c) => {\r\n o[c.category] = (o[c.category] ?? [])\r\n o[c.category].push(c);\r\n return o;\r\n }, {}))\r\n .map(([category, columns]) => ({name: category ?? '', columns}))\r\n }))\r\n this.querySelector('.mode').onchange = () => {\r\n objectsList.infiniteScrollEnabled = this.querySelector('.mode').value == 'scrollMode'\r\n objectsList.refresh()\r\n }\r\n this.querySelector('.view').onchange = () => {\r\n if (this.querySelector('.view').value == 'tableView')\r\n objectsList.insideViewClass = _tableView_js__WEBPACK_IMPORTED_MODULE_2__.TableView\r\n else\r\n objectsList.insideViewClass = _listView_js__WEBPACK_IMPORTED_MODULE_3__.ListView\r\n objectsList.refresh()\r\n }\r\n this.addEventListener('blur', () => {\r\n if(!this.matches(':focus-within, :focus'))\r\n this.remove();\r\n })\r\n this.querySelector('select').focus()\r\n console.log('ssss')\r\n for (const checkbox of this.querySelectorAll('table input[type=\"checkbox\"]')) {\r\n checkbox.checked = !objectsList.hiddenColumns.has(checkbox.dataset.name)\r\n checkbox.onchange = () => {\r\n if (checkbox.checked)\r\n objectsList.hiddenColumns.delete(checkbox.dataset.name)\r\n else\r\n objectsList.hiddenColumns.add(checkbox.dataset.name)\r\n\r\n objectsList.refresh()\r\n }\r\n }\r\n\r\n for (const filterContainer of this.querySelectorAll('table .filter')) {\r\n const filter=new _ColumnFilter_js__WEBPACK_IMPORTED_MODULE_4__.ColumnFilter();\r\n filterContainer.append(filter)\r\n filter.addEventListener('x-filter', (e) => {\r\n console.log('dddd',e)\r\n objectsList.columnFilters.set(filterContainer.dataset.name, e.detail)\r\n objectsList.refresh()\r\n });\r\n }\r\n this.tabIndex = 0\r\n setTimeout(()=>this.focus(), 1)\r\n setTimeout(() => this.checkFocus(), 100)\r\n }\r\n checkFocus() {\r\n console.log('checkFocus')\r\n if (!this.matches(':focus-within, :focus'))\r\n this.remove();\r\n\r\n if(this.parentNode)\r\n setTimeout(() => this.checkFocus(), 100)\r\n }\r\n}\r\n\r\ncustomElements.define('config-popup', ConfigPopup);\r\n\n\n//# sourceURL=webpack://@green-code-studio/objects-list/./src/ConfigPopup.js?");
128
128
 
129
129
  /***/ }),
130
130
 
@@ -174,7 +174,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
174
174
  \****************************/
175
175
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
176
176
 
177
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ObjectsList: () => (/* binding */ ObjectsList)\n/* harmony export */ });\n/* harmony import */ var _tableView_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tableView.js */ \"./src/tableView.js\");\n/* harmony import */ var _listView_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./listView.js */ \"./src/listView.js\");\n/* harmony import */ var _i18n_xml__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./i18n.xml */ \"./src/i18n.xml\");\n/* harmony import */ var _paginationButtons_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./paginationButtons.js */ \"./src/paginationButtons.js\");\n/* harmony import */ var _green_code_studio_context_menu_dist_index_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @green-code-studio/context-menu/dist/index.mjs */ \"./node_modules/@green-code-studio/context-menu/dist/index.mjs\");\n/* harmony import */ var _utils_concurencyLimiter_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/concurencyLimiter.js */ \"./src/utils/concurencyLimiter.js\");\n/* harmony import */ var _idsSet_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./idsSet.js */ \"./src/idsSet.js\");\n/* harmony import */ var _ConfigPopup_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ConfigPopup.js */ \"./src/ConfigPopup.js\");\n/* harmony import */ var fast_creator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! fast-creator */ \"./node_modules/fast-creator/dist/entry.js\");\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass ObjectsList extends HTMLElement {\r\n constructor(datasource) {\r\n super();\r\n this.columns = [];\r\n this.hiddenColumns = new Set()\r\n this.columnFilters = new Map();\r\n this.generateActions = () => [];\r\n this.insideViewClass = _tableView_js__WEBPACK_IMPORTED_MODULE_0__.TableView;\r\n this.icon = 'icon-document';\r\n this.loadConcurencyLimiter = new _utils_concurencyLimiter_js__WEBPACK_IMPORTED_MODULE_5__.ConcurencyLimiter();\r\n this.datasource = datasource;\r\n this.datasource.onchange = () => this.refresh();\r\n this.start = 0;\r\n this.limit = 10\r\n this.total = 0;\r\n this.selected = new _idsSet_js__WEBPACK_IMPORTED_MODULE_6__.IdsSet();\r\n this.selectedMain = null;\r\n this.dataById = new Map();\r\n this.initFoot();\r\n this.addEventListener('contextmenu', e => this.showGlobalContextMenu(e));\r\n addEventListener('resize', e => this.resize());\r\n this.infiniteScrollEnabled = false;\r\n }\r\n\r\n get visibleColumns() {\r\n return this.columns.filter(x => !this.hiddenColumns.has(x.dataName))\r\n }\r\n\r\n refreshLimit() {\r\n this.limit = this.insideView.calcMaxVisibleItems(this.clientHeight - this.foot.clientHeight - 2);\r\n if (this.limit < 1) this.limit = 1;\r\n if (this.infiniteScrollEnabled) {\r\n this.limit = Math.ceil(this.limit / 20) * 20 + 40;\r\n } else {\r\n this.start = Math.floor(Math.min(this.total, this.start) / this.limit) * this.limit;\r\n }\r\n }\r\n\r\n async refresh() {\r\n this.classList.toggle('infiniteScrollEnabled', this.infiniteScrollEnabled);\r\n\r\n if (!this.insideView || !(this.insideView instanceof this.insideViewClass))\r\n this.initInsideView();\r\n else if (this.insideView.refreshHeader)\r\n this.insideView.refreshHeader()\r\n\r\n this.refreshLimit();\r\n const refreshSymbol = Symbol();\r\n this.lastRefreshSymbol = refreshSymbol;\r\n await this.loadConcurencyLimiter.run(async () => {\r\n if (this.lastRefreshSymbol != refreshSymbol) return;\r\n\r\n let data = await this.datasource.get(this);\r\n if (this.lastRefreshSymbol != refreshSymbol) return;\r\n\r\n this.currentRows = data.rows;\r\n this.fillDataById(data.rows);\r\n this.total = data.total;\r\n this.insideView.loadData(data, this.start, this.limit, this.infiniteScrollEnabled);\r\n this.pagination.currentPage = Math.floor(this.start / this.limit);\r\n this.pagination.totalPages = Math.ceil(this.total / this.limit);\r\n this.pagination.render();\r\n });\r\n }\r\n\r\n initInsideView() {\r\n if (this.insideView) {\r\n this.insideView.remove();\r\n }\r\n this.insideView = new this.insideViewClass(this);\r\n this.insertBefore(this.insideView, this.foot);\r\n this.insideView.refresh = () => this.refresh();\r\n this.insideView.onPaginationChanged = (start, limit) => {\r\n if (this.start != start) {\r\n this.start = start;\r\n //this.limit=limit;\r\n this.refresh();\r\n }\r\n }\r\n }\r\n\r\n fillDataById(rows) {\r\n for (let row of rows) {\r\n this.dataById.set(parseInt(row.id), row);\r\n }\r\n }\r\n\r\n getSelectedData() {\r\n let data = Array.from(this.dataById).filter(([id, row]) => this.selected.has(id)).map(([id, row]) => row);\r\n if (data.length > 0) return data;\r\n else if (this.dataById[this.selectedMain])\r\n return [this.dataById[this.selectedMain]]\r\n else return [];\r\n }\r\n\r\n initFoot() {\r\n this.foot = (0,fast_creator__WEBPACK_IMPORTED_MODULE_8__.create)('.foot');\r\n this.append(this.foot);\r\n let menuButton = (0,fast_creator__WEBPACK_IMPORTED_MODULE_8__.create)('button.menuButton span.icon-settings');\r\n this.foot.append(menuButton)\r\n menuButton.onclick = e => this.showConfigPopup();\r\n this.pagination = new _paginationButtons_js__WEBPACK_IMPORTED_MODULE_3__.PaginationButtons();\r\n this.pagination.onpageclick = (page) => {\r\n this.start = page * this.limit;\r\n this.refresh();\r\n }\r\n this.foot.append(this.pagination);\r\n this.searchForm = (0,fast_creator__WEBPACK_IMPORTED_MODULE_8__.create)('form', {className: 'search'});\r\n this.foot.append(this.searchForm);\r\n this.searchForm.onsubmit = e => e.preventDefault();\r\n const searchInput = (0,fast_creator__WEBPACK_IMPORTED_MODULE_8__.create)('input', {\r\n name: 'search',\r\n type: 'search',\r\n placeholder: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_2__.t)('objectList.search')\r\n });\r\n this.searchForm.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_8__.create)(searchInput));\r\n searchInput.oninput = e => {\r\n this.start = 0;\r\n this.refresh();\r\n }\r\n\r\n }\r\n\r\n get search() {\r\n if (!this.foot) return '';\r\n const searchForm = this.foot.querySelector('.search');\r\n if (!searchForm) return '';\r\n return searchForm.search.value;\r\n }\r\n\r\n showGlobalContextMenu(e) {\r\n let elements = [{\r\n text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_2__.t)('objectList.paginationMode'),\r\n icon: 'icon-pagination',\r\n onclick: () => {\r\n this.infiniteScrollEnabled = false;\r\n this.refresh();\r\n }\r\n }, {\r\n text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_2__.t)('objectList.scrollMode'),\r\n icon: 'icon-scroll',\r\n onclick: () => {\r\n this.infiniteScrollEnabled = true;\r\n this.refresh();\r\n }\r\n }, {\r\n text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_2__.t)('objectList.tableView'),\r\n icon: 'icon-table',\r\n onclick: () => {\r\n this.insideViewClass = _tableView_js__WEBPACK_IMPORTED_MODULE_0__.TableView;\r\n this.refresh();\r\n }\r\n }, {\r\n text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_2__.t)('objectList.listView'),\r\n icon: 'icon-table',\r\n onclick: () => {\r\n this.insideViewClass = _listView_js__WEBPACK_IMPORTED_MODULE_1__.ListView;\r\n this.refresh();\r\n }\r\n }];\r\n if (this.allowTableEdit) {\r\n elements.push({\r\n text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_2__.t)('objectList.startMultiEdit'),\r\n icon: 'icon-edit',\r\n onclick: () => {\r\n this.insideViewClass = _tableView_js__WEBPACK_IMPORTED_MODULE_0__.TableView;\r\n this.refresh();\r\n this.insideView.startMultiEdit();\r\n }\r\n });\r\n }\r\n _green_code_studio_context_menu_dist_index_mjs__WEBPACK_IMPORTED_MODULE_4__.ContextMenu.openContextMenu(e, elements);\r\n }\r\n\r\n resize() {\r\n let limit = this.limit;\r\n this.refreshLimit();\r\n if (limit != this.limit) {\r\n this.refresh();\r\n }\r\n }\r\n\r\n multiEditChanged(id, data, save = false) {\r\n this.datasource.multiEditChanged(id, data, save);\r\n }\r\n\r\n showConfigPopup() {\r\n if (this.querySelector('config-popup')) {\r\n this.querySelector('config-popup').remove()\r\n } else {\r\n const popup = new _ConfigPopup_js__WEBPACK_IMPORTED_MODULE_7__.ConfigPopup(this)\r\n this.append(popup)\r\n }\r\n }\r\n gotoUrl(url) {\r\n window.location.href = url;\r\n }\r\n}\r\n\r\ncustomElements.define('data-view', ObjectsList);\r\n\n\n//# sourceURL=webpack://@green-code-studio/objects-list/./src/objectsList.js?");
177
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ObjectsList: () => (/* binding */ ObjectsList)\n/* harmony export */ });\n/* harmony import */ var _tableView_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tableView.js */ \"./src/tableView.js\");\n/* harmony import */ var _listView_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./listView.js */ \"./src/listView.js\");\n/* harmony import */ var _i18n_xml__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./i18n.xml */ \"./src/i18n.xml\");\n/* harmony import */ var _paginationButtons_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./paginationButtons.js */ \"./src/paginationButtons.js\");\n/* harmony import */ var _green_code_studio_context_menu_dist_index_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @green-code-studio/context-menu/dist/index.mjs */ \"./node_modules/@green-code-studio/context-menu/dist/index.mjs\");\n/* harmony import */ var _utils_concurencyLimiter_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/concurencyLimiter.js */ \"./src/utils/concurencyLimiter.js\");\n/* harmony import */ var _idsSet_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./idsSet.js */ \"./src/idsSet.js\");\n/* harmony import */ var _ConfigPopup_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ConfigPopup.js */ \"./src/ConfigPopup.js\");\n/* harmony import */ var fast_creator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! fast-creator */ \"./node_modules/fast-creator/dist/entry.js\");\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass ObjectsList extends HTMLElement {\r\n constructor(datasource) {\r\n super();\r\n this.columns = [];\r\n this.hiddenColumns = new Set()\r\n this.columnFilters = new Map();\r\n this.generateActions = () => [];\r\n this.insideViewClass = _tableView_js__WEBPACK_IMPORTED_MODULE_0__.TableView;\r\n this.icon = 'icon-document';\r\n this.loadConcurencyLimiter = new _utils_concurencyLimiter_js__WEBPACK_IMPORTED_MODULE_5__.ConcurencyLimiter();\r\n this.datasource = datasource;\r\n this.datasource.onchange = () => this.refresh();\r\n this.start = 0;\r\n this.limit = 10\r\n this.total = 0;\r\n this.selected = new _idsSet_js__WEBPACK_IMPORTED_MODULE_6__.IdsSet();\r\n this.selectedMain = null;\r\n this.dataById = new Map();\r\n this.initFoot();\r\n this.addEventListener('contextmenu', e => this.showGlobalContextMenu(e));\r\n addEventListener('resize', e => this.resize());\r\n this.infiniteScrollEnabled = false;\r\n }\r\n\r\n get visibleColumns() {\r\n return this.columns.filter(x => !this.hiddenColumns.has(x.dataName))\r\n }\r\n\r\n refreshLimit() {\r\n this.limit = this.insideView.calcMaxVisibleItems(this.clientHeight - this.foot.clientHeight - 2);\r\n if (this.limit < 1) this.limit = 1;\r\n if (this.infiniteScrollEnabled) {\r\n this.limit = Math.ceil(this.limit / 20) * 20 + 40;\r\n } else {\r\n this.start = Math.floor(Math.min(this.total, this.start) / this.limit) * this.limit;\r\n }\r\n }\r\n\r\n async refresh() {\r\n this.classList.toggle('infiniteScrollEnabled', this.infiniteScrollEnabled);\r\n\r\n if (!this.insideView || !(this.insideView instanceof this.insideViewClass))\r\n this.initInsideView();\r\n else if (this.insideView.refreshHeader)\r\n this.insideView.refreshHeader()\r\n\r\n this.refreshLimit();\r\n const refreshSymbol = Symbol();\r\n this.lastRefreshSymbol = refreshSymbol;\r\n await this.loadConcurencyLimiter.run(async () => {\r\n if (this.lastRefreshSymbol != refreshSymbol) return;\r\n\r\n let data = await this.datasource.get(this);\r\n if (this.lastRefreshSymbol != refreshSymbol) return;\r\n\r\n this.currentRows = data.rows;\r\n this.fillDataById(data.rows);\r\n this.total = data.total;\r\n this.insideView.loadData(data, this.start, this.limit, this.infiniteScrollEnabled);\r\n this.pagination.currentPage = Math.floor(this.start / this.limit);\r\n this.pagination.totalPages = Math.ceil(this.total / this.limit);\r\n this.pagination.render();\r\n });\r\n while(this.filterShortContainer.firstChild){\r\n this.filterShortContainer.firstChild.remove()\r\n }\r\n if(this.columnFilters.size)\r\n {\r\n this.filterShortContainer.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_8__.create)('span', {text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_2__.t)('objectList.filtersCount')+': '+this.columnFilters.size}));\r\n const clearButton=(0,fast_creator__WEBPACK_IMPORTED_MODULE_8__.create)('button', {text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_2__.t)('objectList.clearFilters')});\r\n clearButton.onclick=()=>{\r\n this.columnFilters.clear();\r\n this.refresh();\r\n }\r\n this.filterShortContainer.append(clearButton);\r\n }\r\n }\r\n\r\n initInsideView() {\r\n if (this.insideView) {\r\n this.insideView.remove();\r\n }\r\n this.insideView = new this.insideViewClass(this);\r\n this.insertBefore(this.insideView, this.foot);\r\n this.insideView.refresh = () => this.refresh();\r\n this.insideView.onPaginationChanged = (start, limit) => {\r\n if (this.start != start) {\r\n this.start = start;\r\n //this.limit=limit;\r\n this.refresh();\r\n }\r\n }\r\n }\r\n\r\n fillDataById(rows) {\r\n for (let row of rows) {\r\n this.dataById.set(parseInt(row.id), row);\r\n }\r\n }\r\n\r\n getSelectedData() {\r\n let data = Array.from(this.dataById).filter(([id, row]) => this.selected.has(id)).map(([id, row]) => row);\r\n if (data.length > 0) return data;\r\n else if (this.dataById[this.selectedMain])\r\n return [this.dataById[this.selectedMain]]\r\n else return [];\r\n }\r\n\r\n initFoot() {\r\n this.foot = (0,fast_creator__WEBPACK_IMPORTED_MODULE_8__.create)('.foot');\r\n this.append(this.foot);\r\n let menuButton = (0,fast_creator__WEBPACK_IMPORTED_MODULE_8__.create)('button.menuButton span.icon-settings');\r\n this.foot.append(menuButton)\r\n menuButton.onclick = e => this.showConfigPopup();\r\n this.pagination = new _paginationButtons_js__WEBPACK_IMPORTED_MODULE_3__.PaginationButtons();\r\n this.pagination.onpageclick = (page) => {\r\n this.start = page * this.limit;\r\n this.refresh();\r\n }\r\n this.foot.append(this.pagination);\r\n this.filterShortContainer = (0,fast_creator__WEBPACK_IMPORTED_MODULE_8__.create)('.filterShortContainer');\r\n this.foot.append(this.filterShortContainer);\r\n this.searchForm = (0,fast_creator__WEBPACK_IMPORTED_MODULE_8__.create)('form', {className: 'search'});\r\n this.foot.append(this.searchForm);\r\n this.searchForm.onsubmit = e => e.preventDefault();\r\n const searchInput = (0,fast_creator__WEBPACK_IMPORTED_MODULE_8__.create)('input', {\r\n name: 'search',\r\n type: 'search',\r\n placeholder: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_2__.t)('objectList.search')\r\n });\r\n this.searchForm.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_8__.create)(searchInput));\r\n searchInput.oninput = e => {\r\n this.start = 0;\r\n this.refresh();\r\n }\r\n\r\n }\r\n\r\n get search() {\r\n if (!this.foot) return '';\r\n const searchForm = this.foot.querySelector('.search');\r\n if (!searchForm) return '';\r\n return searchForm.search.value;\r\n }\r\n\r\n showGlobalContextMenu(e) {\r\n let elements = [{\r\n text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_2__.t)('objectList.paginationMode'),\r\n icon: 'icon-pagination',\r\n onclick: () => {\r\n this.infiniteScrollEnabled = false;\r\n this.refresh();\r\n }\r\n }, {\r\n text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_2__.t)('objectList.scrollMode'),\r\n icon: 'icon-scroll',\r\n onclick: () => {\r\n this.infiniteScrollEnabled = true;\r\n this.refresh();\r\n }\r\n }, {\r\n text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_2__.t)('objectList.tableView'),\r\n icon: 'icon-table',\r\n onclick: () => {\r\n this.insideViewClass = _tableView_js__WEBPACK_IMPORTED_MODULE_0__.TableView;\r\n this.refresh();\r\n }\r\n }, {\r\n text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_2__.t)('objectList.listView'),\r\n icon: 'icon-table',\r\n onclick: () => {\r\n this.insideViewClass = _listView_js__WEBPACK_IMPORTED_MODULE_1__.ListView;\r\n this.refresh();\r\n }\r\n }];\r\n if (this.allowTableEdit) {\r\n elements.push({\r\n text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_2__.t)('objectList.startMultiEdit'),\r\n icon: 'icon-edit',\r\n onclick: () => {\r\n this.insideViewClass = _tableView_js__WEBPACK_IMPORTED_MODULE_0__.TableView;\r\n this.refresh();\r\n this.insideView.startMultiEdit();\r\n }\r\n });\r\n }\r\n _green_code_studio_context_menu_dist_index_mjs__WEBPACK_IMPORTED_MODULE_4__.ContextMenu.openContextMenu(e, elements);\r\n }\r\n\r\n resize() {\r\n let limit = this.limit;\r\n this.refreshLimit();\r\n if (limit != this.limit) {\r\n this.refresh();\r\n }\r\n }\r\n\r\n multiEditChanged(id, data, save = false) {\r\n this.datasource.multiEditChanged(id, data, save);\r\n }\r\n\r\n showConfigPopup() {\r\n if (this.querySelector('config-popup')) {\r\n this.querySelector('config-popup').remove()\r\n } else {\r\n const popup = new _ConfigPopup_js__WEBPACK_IMPORTED_MODULE_7__.ConfigPopup(this)\r\n this.append(popup)\r\n }\r\n }\r\n gotoUrl(url) {\r\n window.location.href = url;\r\n }\r\n}\r\n\r\ncustomElements.define('data-view', ObjectsList);\r\n\n\n//# sourceURL=webpack://@green-code-studio/objects-list/./src/objectsList.js?");
178
178
 
179
179
  /***/ }),
180
180
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@green-code-studio/objects-list",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "main": "src/index.js",
5
5
  "author": "Mateusz Krawczyk",
6
6
  "license": "MIT",
@@ -9,7 +9,11 @@ export class ConfigPopup extends HTMLElement {
9
9
  super();
10
10
  this.append(template({
11
11
  t,
12
- categories: [...objectsList.columns.groupBy(c => c.category)]
12
+ categories: Object.entries(objectsList.columns.reduce((o,c) => {
13
+ o[c.category] = (o[c.category] ?? [])
14
+ o[c.category].push(c);
15
+ return o;
16
+ }, {}))
13
17
  .map(([category, columns]) => ({name: category ?? '', columns}))
14
18
  }))
15
19
  this.querySelector('.mode').onchange = () => {
package/src/i18n.xml CHANGED
@@ -49,6 +49,14 @@
49
49
  <value lang="pl">Filtr</value>
50
50
  <value lang="en">Filter</value>
51
51
  </node>
52
+ <node name="filtersCount">
53
+ <value lang="pl">Liczba filtrów</value>
54
+ <value lang="en">Filters count</value>
55
+ </node>
56
+ <node name="clearFilters">
57
+ <value lang="pl">Wyczyść filtry</value>
58
+ <value lang="en">Clear filters</value>
59
+ </node>
52
60
  </node>
53
61
  <node name="filter">
54
62
  <node name="none">
@@ -71,6 +71,19 @@ export class ObjectsList extends HTMLElement {
71
71
  this.pagination.totalPages = Math.ceil(this.total / this.limit);
72
72
  this.pagination.render();
73
73
  });
74
+ while(this.filterShortContainer.firstChild){
75
+ this.filterShortContainer.firstChild.remove()
76
+ }
77
+ if(this.columnFilters.size)
78
+ {
79
+ this.filterShortContainer.append(create('span', {text: t('objectList.filtersCount')+': '+this.columnFilters.size}));
80
+ const clearButton=create('button', {text: t('objectList.clearFilters')});
81
+ clearButton.onclick=()=>{
82
+ this.columnFilters.clear();
83
+ this.refresh();
84
+ }
85
+ this.filterShortContainer.append(clearButton);
86
+ }
74
87
  }
75
88
 
76
89
  initInsideView() {
@@ -115,6 +128,8 @@ export class ObjectsList extends HTMLElement {
115
128
  this.refresh();
116
129
  }
117
130
  this.foot.append(this.pagination);
131
+ this.filterShortContainer = create('.filterShortContainer');
132
+ this.foot.append(this.filterShortContainer);
118
133
  this.searchForm = create('form', {className: 'search'});
119
134
  this.foot.append(this.searchForm);
120
135
  this.searchForm.onsubmit = e => e.preventDefault();